c.src),packageTier:u=>{const c=Array.isArray(r.package_tiers)?r.package_tiers:[],d=s(`package_tiers.${u}`,c[u]);return{src:d||JP[u],custom:d}}}}const Me={card:"#14170e",cardBorder:"rgba(168,225,12,0.16)",divider:"rgba(168,225,12,0.15)",text:"#f3f6ea",muted:"#9aa38c",label:"#8f987f",accent:"#b6e619",pillBorder:"rgba(168,225,12,0.28)"},xp={fontFamily:"'Michroma', sans-serif"};function uo(e,t=0){return e!=null&&e.launch_at?new Date(e.launch_at).getTime()-(Date.now()+t):0}function tN(e,t){return!(e!=null&&e.server_time)||!t?0:new Date(e.server_time).getTime()-t}function nN(e){const t=Math.max(0,Math.floor(e/1e3));return{days:Math.floor(t/86400),hours:Math.floor(t%86400/3600),minutes:Math.floor(t%3600/60),seconds:t%60}}function rN(e,t){const n=new Date(e),r=new Date(n.getTime()+60*60*1e3),s=a=>a.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),i=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//HifiPlanet//Countdown//DE","BEGIN:VEVENT",`UID:launch-${s(n)}@hifi-planet.de`,`DTSTAMP:${s(new Date)}`,`DTSTART:${s(n)}`,`DTEND:${s(r)}`,`SUMMARY:${t}`,`URL:${window.location.origin}`,"END:VEVENT","END:VCALENDAR"].join(`\r
`);return`data:text/calendar;charset=utf-8,${encodeURIComponent(i)}`}function sN({text:e}){const t=e.trimEnd().lastIndexOf(" ");return t<0?e:o.jsxs(o.Fragment,{children:[e.slice(0,t+1),o.jsx("span",{style:{color:Me.accent},children:e.slice(t+1)})]})}function iN({countdown:e,clockOffset:t=0,settings:n={},preview:r=!1,onClosePreview:s,onLaunch:i}){const{t:a,language:l,toggleLanguage:u}=ye(),[c,d]=m.useState(()=>uo(e,t)),f=Fo(n).slot("countdown_bg"),h=c<=0;m.useEffect(()=>{const k=()=>d(uo(e,t));k();const E=setInterval(k,250);return()=>clearInterval(E)},[e,t]),m.useEffect(()=>{if(!h||r)return;const k=setTimeout(()=>i==null?void 0:i(),2600);return()=>clearTimeout(k)},[h,r,i]),m.useEffect(()=>{const k=document.title;return document.title=`HifiPlanet – ${a("countdown.eyebrow")}`,()=>{document.title=k}},[a]);const g=nN(c),y=l==="en",b=h?a("countdown.liveTitle"):(y?e.title_en:e.title)||a("countdown.title"),w=h?a("countdown.liveMessage"):(y?e.message_en:e.message)||a("countdown.message"),p=e.launch_at?new Date(e.launch_at):null,x=p?p.toLocaleString(y?"en-GB":"de-DE",{weekday:"long",day:"numeric",month:"long",hour:"2-digit",minute:"2-digit",timeZone:"Europe/Berlin"}):"",v=[[g.days,a("countdown.days")],[g.hours,a("countdown.hours")],[g.minutes,a("countdown.minutes")],[g.seconds,a("countdown.seconds")]];return o.jsxs("div",{className:"flex min-h-[100svh] flex-col bg-[#0a0c06] bg-cover bg-center",style:{backgroundImage:`url(${f.src})`,color:Me.text,fontFamily:"'Barlow', sans-serif"},children:[r&&o.jsxs("div",{className:"flex items-center justify-center gap-3 px-4 py-2 text-xs font-semibold",style:{background:Me.accent,color:"#0f1208"},children:[a("countdown.preview"),o.jsxs("button",{type:"button",onClick:s,className:"inline-flex items-center gap-1 underline",children:[o.jsx(Ei,{className:"h-3.5 w-3.5"}),a("countdown.closePreview")]})]}),o.jsxs("div",{className:"mx-auto flex w-full max-w-[1280px] flex-1 flex-col px-4 pb-6 sm:px-10 sm:pb-10",children:[o.jsxs("header",{className:"flex items-center justify-between gap-4 border-b pb-5 pt-6 sm:pt-8",style:{borderColor:Me.divider},children:[o.jsx("img",{src:n.logo_dark_path||af,alt:"HifiPlanet",className:"h-12 w-auto sm:h-14"}),o.jsxs("div",{className:"flex items-center gap-5",children:[o.jsx("button",{type:"button",onClick:u,"aria-label":a("languageToggle.label"),className:"text-xs font-semibold uppercase tracking-[3px] hover:text-white",style:{color:Me.muted},children:l==="de"?"EN":"DE"}),n.phone&&o.jsxs("a",{href:rs(n.phone),className:"hidden items-center gap-2.5 rounded-full border py-2 pl-2 pr-5 text-sm font-semibold sm:inline-flex",style:{borderColor:Me.pillBorder,background:Me.card},children:[o.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-full",style:{background:"rgba(168,225,12,0.1)",color:Me.accent},children:o.jsx(zn,{className:"h-3.5 w-3.5"})}),n.phone]})]})]}),o.jsxs("main",{className:"flex flex-1 flex-col justify-center py-12 sm:py-16",children:[o.jsx("p",{className:"mb-3 text-[13px] font-semibold uppercase tracking-[6px]",style:{color:Me.accent},children:a(h?"countdown.liveEyebrow":"countdown.eyebrow")}),o.jsx("h1",{style:xp,className:"max-w-3xl text-[34px] leading-[1.08] sm:text-[clamp(34px,5vw,60px)]",children:o.jsx(sN,{text:b})}),o.jsx("p",{className:"mb-10 mt-5 max-w-[520px] text-lg leading-[1.55]",style:{color:Me.muted},children:w}),o.jsx("div",{className:"grid w-full max-w-[720px] grid-cols-4 rounded-[14px] border shadow-[0_24px_60px_rgba(0,0,0,0.55)]",style:{background:Me.card,borderColor:Me.cardBorder},children:v.map(([k,E],C)=>o.jsxs("div",{className:`px-2 py-5 text-center sm:px-6 sm:py-7 ${C>0?"border-l":""}`,style:{borderColor:Me.divider},children:[o.jsx("div",{style:xp,className:"text-[22px] tabular-nums leading-none min-[400px]:text-[26px] sm:text-[44px]",children:String(k).padStart(2,"0")}),o.jsx("div",{className:"mt-3 text-[10px] font-semibold uppercase tracking-[2px] sm:text-[11px] sm:tracking-[3px]",style:{color:Me.label},children:E})]},E))}),p&&!h&&o.jsxs("div",{className:"mt-6 flex flex-col gap-3 text-[15px] sm:flex-row sm:items-center sm:gap-8",children:[o.jsxs("p",{style:{color:Me.muted},children:[a("countdown.launchPrefix"),": ",o.jsx("span",{className:"font-semibold",style:{color:Me.text},children:x}),a("countdown.clock")&&` ${a("countdown.clock")}`]}),o.jsxs("a",{href:rN(e.launch_at,a("countdown.calendarTitle")),download:"hifiplanet-launch.ics",className:"text-[13px] font-bold uppercase tracking-[3px] hover:underline",style:{color:Me.accent},children:[a("countdown.addToCalendar")," →"]})]})]}),o.jsxs("footer",{className:"flex flex-wrap gap-x-6 gap-y-2 border-t pt-5 text-[13px]",style:{borderColor:Me.divider,color:Me.label},children:[n.phone&&o.jsx("a",{href:rs(n.phone),className:"hover:text-white sm:hidden",children:n.phone}),n.address_city&&o.jsxs("span",{children:[n.address_street,", ",n.address_zip," ",n.address_city]}),o.jsx(G,{to:"/impressum",className:"hover:text-white",children:"Impressum"}),o.jsx(G,{to:"/datenschutz",className:"hover:text-white",children:y?"Privacy":"Datenschutz"}),o.jsx(G,{to:"/admin/login","aria-label":a("maintenance.login"),title:a("maintenance.login"),className:"hover:text-white",children:o.jsx(rv,{className:"h-3.5 w-3.5"})})]})]})]})}function aN({countdown:e}){const{t,language:n}=ye(),r=new Date(e.launch_at).toLocaleString(n==="en"?"en-GB":"de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",timeZone:"Europe/Berlin"});return o.jsxs("div",{className:"bg-neutral-900 px-4 py-2 text-center text-xs font-semibold text-neutral-200",children:[t("countdown.adminActive").replace("{date}",r)," ",o.jsx(G,{to:"/?countdown=vorschau",className:"text-brand-300 underline hover:text-brand-200",children:t("countdown.adminPreview")})]})}function oN(){const{consent:e}=yr(),{ga_measurement_id:t}=kt(),n=m.useRef(!1),r=Qe();return m.useEffect(()=>{if(!t||!e.analytics||n.current)return;n.current=!0;const s=document.createElement("script");s.src=`https://www.googletagmanager.com/gtag/js?id=${t}`,s.async=!0,document.head.appendChild(s),window.dataLayer=window.dataLayer||[];function i(){window.dataLayer.push(arguments)}window.gtag=i,i("js",new Date),i("config",t,{anonymize_ip:!0,send_page_view:!1})},[t,e.analytics]),m.useEffect(()=>{!n.current||typeof window.gtag!="function"||window.gtag("consent","update",{analytics_storage:e.analytics?"granted":"denied"})},[e.analytics]),m.useEffect(()=>{!e.analytics||typeof window.gtag!="function"||window.gtag("event","page_view",{page_path:r.pathname+r.search,page_location:window.location.href,page_title:document.title})},[r.pathname,r.search,e.analytics,t]),null}const Pv=m.createContext({global:{enabled:!1,message:null},services:{enabled:!1,message:null},vehicles:{enabled:!1,message:null},bypass:!1}),lN=Pv.Provider;function Oo(){return m.useContext(Pv)}const of=m.createContext({}),uN=of.Provider;function mr(e,t){const n=e[t];if(!n)return{};const r={};return n.font_family&&(r.fontFamily=n.font_family),n.font_size&&(r.fontSize=n.font_size),n.color&&(r.color=n.color),r}function qe(e){const t=m.useContext(of);return mr(t,e)}function lf(){return m.useContext(of)}const cN=[{label:"Systemschrift",value:""},{label:"Serifenlos (Arial)",value:"Arial, Helvetica, sans-serif"},{label:"Serif (Georgia)",value:'Georgia, "Times New Roman", serif'},{label:"Klassisch (Times New Roman)",value:'"Times New Roman", Times, serif'},{label:"Modern (Verdana)",value:"Verdana, Geneva, sans-serif"},{label:"Schreibmaschine (Courier New)",value:'"Courier New", Courier, monospace'}],uf=m.createContext({fonts:[],refresh:()=>{}}),Nv=uf.Provider;function _v(){return m.useContext(uf).fonts}function T4(){return m.useContext(uf).refresh}function P4(){const e=_v();return[...cN,...e.map(t=>({label:t.name,value:t.font_family}))]}function dN(e){const t=/\.([a-z0-9]+)$/i.exec(e||"");return t?t[1].toLowerCase():""}const fN={woff2:"woff2",woff:"woff",ttf:"truetype",otf:"opentype"};function Mv(){const e=_v();if(e.length===0)return null;const t=e.map(n=>{const r=fN[dN(n.file_path)]||"woff2";return`@font-face { font-family: "${n.font_family}"; src: url("${n.file_path}") format("${r}"); font-display: swap; }`}).join(`
-`);return o.jsx("style",{children:t})}const hN=150,mN=300,pN=80,gN=5e3;function xN(){return o.jsx("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-white dark:bg-neutral-950",children:o.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-4 border-neutral-200 border-t-brand-500 dark:border-neutral-800 dark:border-t-brand-500"})})}function yN({enabled:e,children:t}){const n=Qe(),[r,s]=m.useState(!e),[i,a]=m.useState(!1),l=m.useRef(null);return m.useLayoutEffect(()=>{const u=l.current;if(!e||!u){s(!0),a(!1);return}s(!1),a(!1);let c=!1,d=0,f=null;const h=new Set,g=setTimeout(()=>{d=Date.now(),a(!0)},hN),y=()=>{s(!0),a(!1)},b=()=>{c=!0,clearTimeout(g),clearTimeout(f),clearTimeout(C),k.disconnect(),E()},w=()=>{if(c)return;b();const j=d?mN-(Date.now()-d):0;j>0?setTimeout(y,j):y()},p=()=>{clearTimeout(f),f=setTimeout(()=>{h.size===0&&QC()===0&&w()},pN)},x=j=>{if(h.has(j)||j.complete||j.getBoundingClientRect().top>=window.innerHeight)return;j.loading==="lazy"&&(j.loading="eager"),h.add(j);const S=()=>{h.delete(j),j.removeEventListener("load",S),j.removeEventListener("error",S),p()};j.addEventListener("load",S),j.addEventListener("error",S)},v=j=>{var S;j.nodeType===1&&(j.tagName==="IMG"&&x(j),(S=j.querySelectorAll)==null||S.call(j,"img").forEach(x))},k=new MutationObserver(j=>{j.forEach(S=>S.addedNodes.forEach(v)),p()});k.observe(u,{childList:!0,subtree:!0});const E=JC(p),C=setTimeout(w,gN);return u.querySelectorAll("img").forEach(x),p(),()=>{c||b()}},[n.pathname,e]),o.jsxs("div",{className:"relative",children:[o.jsx("div",{ref:l,style:e?{visibility:r?"visible":"hidden"}:void 0,children:t}),e&&i&&o.jsx(xN,{})]})}const vN=m.lazy(()=>Y(()=>import("./RichTextEditor-BQVBVwow.js"),[])),wN=m.lazy(()=>Y(()=>import("./ImageUploadField-DJjkYIyq.js"),__vite__mapDeps([0,1]))),cf={de:"Deutsch",en:"Englisch"},bN=["nav.","footer.","cookieConsent.","languageToggle.","themeToggle.","maintenance."],Qi=e=>bN.some(t=>e.startsWith(t));function $l(e,t){return t.split(".").reduce((n,r)=>n==null?void 0:n[r],e)}function kN({editor:e}){const t=Ue(),{entity:n,id:r,field:s,lang:i,kind:a,label:l,hint:u,original:c,aspect:d}=e,[f]=m.useState(()=>({value:c,wasPending:t.hasPending(n,r,s,i)})),[h,g]=m.useState(c),y=w=>{g(w),t.setValue(n,r,s,i,w)},b=()=>{f.wasPending?t.setValue(n,r,s,i,f.value):t.resetValue(n,r,s,i),t.closeEditor()};return o.jsxs("div",{className:"pointer-events-auto w-full rounded-xl border border-neutral-200 bg-white p-4 text-neutral-900 shadow-2xl dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 sm:w-[min(92vw,520px)]",children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between gap-3",children:[o.jsxs("p",{className:"text-sm font-semibold",children:[l," ",a!=="image"&&o.jsxs("span",{className:"font-normal text-neutral-500",children:["(",cf[i],")"]})]}),o.jsx("button",{type:"button",onClick:b,"aria-label":"Abbrechen",className:"rounded p-1 text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",children:o.jsx(Ei,{className:"h-4 w-4"})})]}),u&&o.jsx("p",{className:"mb-2 text-xs text-neutral-500 dark:text-neutral-400",children:u}),a==="image"?o.jsxs(m.Suspense,{fallback:o.jsx("p",{className:"p-3 text-sm text-neutral-500",children:"Lädt…"}),children:[o.jsx(wN,{value:h,onChange:w=>y(w||""),label:"Eigenes Bild",aspect:d}),o.jsx("p",{className:"mt-2 text-xs text-neutral-500 dark:text-neutral-400",children:"Ohne eigenes Bild (× am Vorschaubild) erscheint wieder das Standardbild."})]}):a==="html"?o.jsx("div",{className:"max-h-[45vh] overflow-y-auto rounded-md border border-neutral-300 dark:border-neutral-700",children:o.jsx(m.Suspense,{fallback:o.jsx("p",{className:"p-3 text-sm text-neutral-500",children:"Editor lädt…"}),children:o.jsx(vN,{value:h,onChange:y})})}):a==="input"?o.jsx("input",{autoFocus:!0,value:h,onChange:w=>y(w.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-800"}):o.jsx("textarea",{autoFocus:!0,rows:7,value:h,onChange:w=>y(w.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-800"}),o.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[o.jsx("button",{type:"button",onClick:b,className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm font-medium hover:bg-neutral-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:"Abbrechen"}),o.jsx("button",{type:"button",onClick:t.closeEditor,className:"rounded-md bg-brand-500 px-3 py-1.5 text-sm font-semibold text-white hover:bg-brand-600",children:"Übernehmen"})]})]})}function SN({onClose:e}){const t=Ue(),{language:n,t:r}=ye(),s=Qe(),[i,a]=m.useState(""),[l,u]=m.useState(0);m.useEffect(()=>{const h=setTimeout(()=>u(g=>g+1),400);return()=>clearTimeout(h)},[s.pathname]);const c=m.useMemo(()=>t.usedTextKeys(s.pathname).filter(h=>typeof $l(Cn.de,h)=="string").sort((h,g)=>Qi(h)-Qi(g)||h.localeCompare(g)),[s.pathname,l,t.usedTextKeys]),d=i.trim().toLowerCase(),f=c.filter(h=>!d||h.toLowerCase().includes(d)||r(h).toLowerCase().includes(d));return o.jsxs("div",{className:"pointer-events-auto flex max-h-[60vh] w-full flex-col rounded-xl border border-neutral-200 bg-white text-neutral-900 shadow-2xl dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 sm:w-[min(92vw,520px)]",children:[o.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-neutral-200 p-4 pb-3 dark:border-neutral-800",children:[o.jsxs("div",{children:[o.jsxs("p",{className:"text-sm font-semibold",children:["Feste Texte auf dieser Seite ",o.jsxs("span",{className:"font-normal text-neutral-500",children:["(",cf[n],")"]})]}),o.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:"Buttons, Beschriftungen, Menü und Fußzeile. Leer lassen = Standardtext."})]}),o.jsx("button",{type:"button",onClick:e,"aria-label":"Schließen",className:"rounded p-1 text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",children:o.jsx(Ei,{className:"h-4 w-4"})})]}),o.jsx("div",{className:"px-4 pt-3",children:o.jsx("input",{type:"search",value:i,onChange:h=>a(h.target.value),placeholder:"Suchen…",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-sm dark:border-neutral-700 dark:bg-neutral-800"})}),o.jsxs("ul",{className:"flex-1 space-y-3 overflow-y-auto p-4",children:[f.length===0&&o.jsx("li",{className:"text-sm text-neutral-500",children:"Keine Texte gefunden."}),f.map((h,g)=>{const y=$l(Cn[n],h)??$l(Cn.de,h),b=t.textOverride(n,h)!==void 0,w=r(h);return o.jsxs("li",{children:[Qi(h)&&(g===0||!Qi(f[g-1]))&&o.jsx("p",{className:"mb-3 border-t border-neutral-200 pt-3 text-xs font-semibold uppercase tracking-wide text-neutral-500 dark:border-neutral-800",children:"Auf allen Seiten (Menü, Fußzeile, Cookie-Hinweis)"}),o.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[o.jsx("label",{htmlFor:`live-text-${h}`,className:"truncate font-mono text-[11px] text-neutral-500",title:h,children:h}),b&&o.jsxs("button",{type:"button",onClick:()=>t.setValue("text",h,"value",n,""),className:"flex shrink-0 items-center gap-1 text-[11px] text-neutral-500 hover:text-brand-600",title:`Standard: ${y}`,children:[o.jsx(eP,{className:"h-3 w-3"})," Standard"]})]}),o.jsx("textarea",{id:`live-text-${h}`,rows:w.length>60?3:1,value:w,onChange:p=>t.setValue("text",h,"value",n,p.target.value===y?"":p.target.value),className:`w-full resize-y rounded-md border bg-white px-2.5 py-1.5 text-sm dark:bg-neutral-800 ${b?"border-amber-400 dark:border-amber-500":"border-neutral-300 dark:border-neutral-700"}`})]},h)})]})]})}function jN(){const e=Ue(),{language:t}=ye(),[n,r]=m.useState(!1);if(!e.enabled)return null;const s=()=>{e.pendingCount&&!window.confirm("Es gibt ungespeicherte Änderungen. Bearbeiten trotzdem beenden? Die Änderungen gehen dann verloren.")||(e.discard(),e.setEnabled(!1))},i=e.editor&&`${e.editor.entity}|${e.editor.id}|${e.editor.field}|${e.editor.lang}`;return o.jsxs("div",{className:"pointer-events-none fixed inset-x-0 bottom-0 z-[150] flex flex-col items-end gap-2 p-2 sm:p-4",children:[e.editor?o.jsx(kN,{editor:e.editor},i):n&&o.jsx(SN,{onClose:()=>r(!1)}),o.jsxs("div",{className:"pointer-events-auto flex w-full flex-wrap items-center justify-between gap-2 rounded-xl border border-neutral-700 bg-neutral-950/95 px-3 py-2.5 text-sm text-neutral-100 shadow-2xl backdrop-blur sm:px-4",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(iv,{className:"h-4 w-4 shrink-0 text-brand-400"}),o.jsxs("p",{className:"min-w-0 truncate",children:[o.jsx("span",{className:"font-semibold",children:"Bearbeiten"}),o.jsxs("span",{className:"hidden text-neutral-400 sm:inline",children:[" · ",cf[t]," · gestrichelte Stellen anklicken"]})]})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.error&&o.jsx("span",{className:"max-w-xs text-xs text-red-400",children:e.error}),o.jsxs("button",{type:"button",onClick:()=>{e.closeEditor(),r(a=>!a)},className:`flex items-center gap-1.5 rounded-md border px-3 py-1.5 font-medium ${n?"border-brand-400 text-brand-300":"border-neutral-700 hover:bg-neutral-800"}`,children:[o.jsx(zT,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Feste Texte"})]}),e.pendingCount>0&&o.jsx("button",{type:"button",onClick:e.discard,className:"rounded-md border border-neutral-700 px-3 py-1.5 font-medium hover:bg-neutral-800",children:"Verwerfen"}),o.jsxs("button",{type:"button",onClick:e.save,disabled:!e.pendingCount||e.saving,className:"flex items-center gap-1.5 rounded-md bg-brand-500 px-3 py-1.5 font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:[o.jsx(tv,{className:"h-4 w-4"}),e.saving?"Speichere…":e.pendingCount?`Speichern (${e.pendingCount})`:"Gespeichert"]}),o.jsx("button",{type:"button",onClick:s,"aria-label":"Bearbeiten beenden",title:"Bearbeiten beenden",className:"rounded-md p-1.5 text-neutral-400 hover:bg-neutral-800 hover:text-white",children:o.jsx(Ei,{className:"h-4 w-4"})})]})]})]})}const Lv=[{title:"Seiten",hint:"Ausgeblendete Seiten verschwinden aus dem Menü und leiten Besucher auf die Startseite um.",areas:[{key:"page.vehicles",label:"Fahrzeuge & Pakete",path:"/fahrzeuge"},{key:"page.services",label:"Leistungen",path:"/leistungen"},{key:"page.gallery",label:"Galerie",path:"/galerie"},{key:"page.downloads",label:"Downloads",path:"/downloads",note:"Erscheint ohnehin nur, wenn Downloads hinterlegt sind."}]},{title:"Startseite",hint:"Einzelne Abschnitte der Startseite. Das große Titelbild oben bleibt immer sichtbar.",areas:[{key:"home.stats",label:"Zahlen-Leiste"},{key:"home.partners",label:"Marken / Partner-Logos"},{key:"home.youtube",label:"Video-Abschnitt"},{key:"home.craft",label:"Handwerk & Beratung"},{key:"home.insights",label:"Einblicke (Bilder)"},{key:"home.reviews",label:"Kundenbewertungen"},{key:"home.more",label:'„Mehr als Car-Hifi"'},{key:"home.faq",label:"Häufige Fragen (FAQ)"}]}],EN=Lv[0].areas;function CN(e){if(!e)return null;const t=EN.find(n=>e===n.path||e.startsWith(`${n.path}/`));return t?t.key:null}function Av(e,t=[]){const n=CN(e);return!!n&&t.includes(n)}const TN=Lv.flatMap(e=>e.areas),PN={global:{enabled:!1,message:null},services:{enabled:!1,message:null},vehicles:{enabled:!1,message:null}},NN={mon:{open:"09:00",close:"18:00",closed:!1},tue:{open:"09:00",close:"18:00",closed:!1},wed:{open:"09:00",close:"18:00",closed:!1},thu:{open:"09:00",close:"18:00",closed:!1},fri:{open:"09:00",close:"18:00",closed:!1},sat:{open:"10:00",close:"13:00",closed:!1},sun:{open:"",close:"",closed:!0}},Hl={phone:"09373 20 62 390",whatsapp:null,contact_email:"info@hifi-planet-amorbach.de",address_street:"Boxbrunner Str. 20a",address_zip:"63916",address_city:"Amorbach",logo_path:null,logo_dark_path:null,business_hours:NN,hero_image_path:null,ga_measurement_id:null,package_card_theme:"graphite",package_card_layout:"strip",package_wheel_hint_interval:8,package_card_width:210,package_card_height:480,vehicle_tile_width:240,vehicle_tile_height:180,gallery_card_text_x:0,gallery_card_text_y:100,site_font:null,page_loader_enabled:1,has_downloads:!1,hidden_areas:[],price_note:null,price_note_en:null},_N=["/impressum","/datenschutz","/agb"],yp="hifi-site-settings",vp="hifi-maintenance";function wp(e){try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}}function bp(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}const MN={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"};function LN(e){var n,r,s;const t=document.getElementById("ld-business");if(t)try{const i=JSON.parse(t.textContent),a=(e.phone||"").replace(/[^\d+]/g,"");a&&(i.telephone=a.startsWith("+")?a:`+49${a.replace(/^0/,"")}`),e.contact_email&&(i.email=e.contact_email),i.address={"@type":"PostalAddress",streetAddress:e.address_street||((n=i.address)==null?void 0:n.streetAddress),postalCode:e.address_zip||((r=i.address)==null?void 0:r.postalCode),addressLocality:e.address_city||((s=i.address)==null?void 0:s.addressLocality),addressCountry:"DE"};const l=e.business_hours;l&&typeof l=="object"&&(i.openingHoursSpecification=Object.entries(MN).filter(([u])=>l[u]&&!l[u].closed&&l[u].open&&l[u].close).map(([u,c])=>({"@type":"OpeningHoursSpecification",dayOfWeek:c,opens:l[u].open,closes:l[u].close}))),t.textContent=JSON.stringify(i)}catch{}}function AN(){var N;const[e]=m.useState(()=>wp(yp)),[t,n]=m.useState(()=>wp(vp)),[r,s]=m.useState(()=>e?{...Hl,...e}:Hl),[i,a]=m.useState(!!e),[l,u]=m.useState({}),[c,d]=m.useState([]),{loading:f,hasPermission:h,user:g}=Wn(),y=Qe(),b=xr(),[w,p]=m.useState(!1),[x]=m.useState(()=>new Date(Date.now()+(7*24+3)*3600*1e3+42*60*1e3).toISOString());m.useEffect(()=>{oe.get("/maintenance").then(P=>{const V={...P,_received_at:Date.now()};n(V),bp(vp,V)}).catch(()=>n(P=>P||PN)),oe.get("/site-settings").then(P=>{s({...Hl,...P}),bp(yp,P)}).catch(()=>{}).finally(()=>a(!0)),oe.get("/text-styles").then(u).catch(()=>{}),oe.get("/custom-fonts").then(d).catch(()=>{})},[]),m.useEffect(()=>{r.site_font?document.documentElement.style.setProperty("--site-font",r.site_font):document.documentElement.style.removeProperty("--site-font")},[r.site_font]),m.useEffect(()=>{i&&LN(r)},[r,i]);const v=t==null?void 0:t.countdown,k=tN(v,t==null?void 0:t._received_at),E=!!(v!=null&&v.active)&&!w&&uo(v,k)>0;if(t===null||!i||((N=t.global)!=null&&N.enabled||E)&&f)return o.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"});const C=h("maintenance.bypass"),j=_N.includes(y.pathname),S=!!g&&new URLSearchParams(y.search).get("countdown")==="vorschau";if(!j&&(E&&!g||S)){const P=S&&!(v!=null&&v.launch_at&&uo(v,k)>0)?{...v,launch_at:x}:v;return o.jsx(Fl,{serverOverrides:r.text_overrides,children:o.jsx(Ol,{children:o.jsx(iN,{countdown:P,clockOffset:P===v?k:0,settings:r,preview:S,onClosePreview:()=>b("/",{replace:!0}),onLaunch:()=>p(!0)})})})}return t.global.enabled&&!C&&!j?o.jsx(Fl,{serverOverrides:r.text_overrides,children:o.jsx(Ol,{children:o.jsx(Ci,{message:t.global.message,fullScreen:!0})})}):o.jsx(Fl,{serverOverrides:r.text_overrides,children:o.jsx(Ol,{children:o.jsx(lN,{value:{...t,bypass:C},children:o.jsx(TP,{value:r,children:o.jsx(uN,{value:l,children:o.jsx(Nv,{value:{fonts:c,refresh:()=>{}},children:o.jsxs("div",{className:"page-texture flex min-h-screen flex-col text-neutral-900 dark:text-neutral-100",children:[o.jsx(Mv,{}),C&&t.global.enabled&&o.jsx(Ti,{}),!!g&&E&&o.jsx(aN,{countdown:v}),o.jsx(BP,{}),o.jsx(AP,{}),o.jsx("main",{className:"flex-1",children:o.jsx(yN,{enabled:y.pathname!=="/"&&!!r.page_loader_enabled,children:Av(y.pathname,r.hidden_areas)?o.jsx(fr,{to:"/",replace:!0}):o.jsx(m.Suspense,{fallback:o.jsx("div",{className:"min-h-[60vh]"}),children:o.jsx(Sd,{})})})}),o.jsx(zP,{}),o.jsx(GP,{}),o.jsx(UP,{}),o.jsx(oN,{}),o.jsx(jN,{})]})})})})})})})}const zo=m.createContext({toast:{success:()=>{},error:()=>{},info:()=>{}},setDirty:()=>{},confirmLeave:()=>!0,refreshCounters:()=>{}});let DN=0;function RN({children:e,onRefreshCounters:t}){const[n,r]=m.useState([]),s=m.useRef(new Set),i=m.useCallback(f=>r(h=>h.filter(g=>g.id!==f)),[]),a=m.useCallback((f,h,g={})=>{const y=++DN;return r(b=>[...b.slice(-3),{id:y,type:f,message:h,action:g.action}]),setTimeout(()=>i(y),g.duration||(f==="error"?7e3:3500)),y},[i]),l=m.useMemo(()=>({success:(f,h)=>a("success",f,h),error:(f,h)=>a("error",f,h),info:(f,h)=>a("info",f,h)}),[a]),u=m.useCallback((f,h)=>{h?s.current.add(f):s.current.delete(f)},[]),c=m.useCallback(()=>{if(s.current.size===0)return!0;const f=window.confirm("Du hast ungespeicherte Änderungen. Seite trotzdem verlassen? Die Änderungen gehen dann verloren.");return f&&s.current.clear(),f},[]);m.useEffect(()=>{const f=g=>{s.current.size!==0&&(g.preventDefault(),g.returnValue="")},h=g=>{var w,p;if(s.current.size===0||g.defaultPrevented||g.button!==0)return;const y=(p=(w=g.target).closest)==null?void 0:p.call(w,"a[href]");if(!y||y.target==="_blank"||g.metaKey||g.ctrlKey||g.shiftKey)return;const b=new URL(y.href,window.location.href);b.origin!==window.location.origin||b.pathname===window.location.pathname||c()||(g.preventDefault(),g.stopPropagation())};return window.addEventListener("beforeunload",f),document.addEventListener("click",h,!0),()=>{window.removeEventListener("beforeunload",f),document.removeEventListener("click",h,!0)}},[c]);const d=m.useMemo(()=>({toast:l,setDirty:u,confirmLeave:c,refreshCounters:t||(()=>{})}),[l,u,c,t]);return o.jsxs(zo.Provider,{value:d,children:[e,o.jsx("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[300] flex w-[min(92vw,380px)] flex-col gap-2","aria-live":"polite",children:n.map(f=>o.jsxs("div",{role:f.type==="error"?"alert":"status",className:`pointer-events-auto flex items-start justify-between gap-3 rounded-lg border px-4 py-3 text-sm shadow-lg ${f.type==="error"?"border-red-200 bg-red-50 text-red-800 dark:border-red-900 dark:bg-red-950 dark:text-red-200":f.type==="success"?"border-green-200 bg-green-50 text-green-800 dark:border-green-900 dark:bg-green-950 dark:text-green-200":"border-neutral-200 bg-white text-neutral-800 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100"}`,children:[o.jsxs("span",{children:[f.type==="success"?"✓ ":"",f.message]}),o.jsxs("span",{className:"flex shrink-0 items-center gap-3",children:[f.action&&o.jsx("button",{type:"button",onClick:()=>{f.action.onClick(),i(f.id)},className:"font-semibold underline",children:f.action.label}),o.jsx("button",{type:"button",onClick:()=>i(f.id),"aria-label":"Meldung schließen",className:"opacity-60 hover:opacity-100",children:"✕"})]})]},f.id))})]})}function N4(){return m.useContext(zo)}function _4(){return m.useContext(zo).toast}function M4(e,t="page"){const{setDirty:n}=m.useContext(zo);m.useEffect(()=>{n(t,!!e)},[e,t,n]),m.useEffect(()=>()=>n(t,!1),[t,n])}const IN=5*60*1e3,VN=30*60*1e3;function FN(){const{user:e,login:t,verifyTwoFactor:n}=Wn(),[r,s]=m.useState(!1),[i,a]=m.useState("credentials"),[l,u]=m.useState((e==null?void 0:e.username)||""),[c,d]=m.useState(""),[f,h]=m.useState(""),[g,y]=m.useState(""),[b,w]=m.useState(""),[p,x]=m.useState(!1),v=m.useRef(Date.now()),k=m.useRef(null);if(Pi(k,r,()=>{}),m.useEffect(()=>eT(()=>s(!0)),[]),m.useEffect(()=>{const N=()=>{v.current=Date.now()},P=["keydown","pointerdown","scroll"];P.forEach(B=>window.addEventListener(B,N,{passive:!0}));const V=setInterval(()=>{document.hidden||Date.now()-v.current>VN||oe.get("/auth/me").then(B=>{(B==null?void 0:B.authenticated)===!1&&s(!0)}).catch(()=>{})},IN);return()=>{P.forEach(B=>window.removeEventListener(B,N)),clearInterval(V)}},[]),!r)return null;const E=()=>{s(!1),a("credentials"),d(""),h(""),w("")},C=async N=>{N.preventDefault(),x(!0),w("");try{const P=await t(l,c);P.requires2fa?(y(P.method==="email"?`6-stelliger Code aus der Mail an ${P.emailHint}`:"6-stelliger Code aus der App"),a("code")):E()}catch(P){w(P.message)}finally{x(!1)}},j=async N=>{N.preventDefault(),x(!0),w("");try{await n(f),E()}catch(P){w(P.message)}finally{x(!1)}},S="w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900";return o.jsx("div",{className:"fixed inset-0 z-[400] flex items-center justify-center bg-black/50 p-4",children:o.jsxs("div",{ref:k,role:"dialog","aria-modal":"true","aria-labelledby":"session-expired-title",className:"w-full max-w-sm rounded-xl bg-white p-6 shadow-xl dark:bg-neutral-900",children:[o.jsx("h2",{id:"session-expired-title",className:"mb-1 text-lg font-bold text-neutral-900 dark:text-white",children:"Bitte erneut anmelden"}),o.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Deine Sitzung ist abgelaufen. Deine Eingaben auf dieser Seite bleiben erhalten – nach dem Anmelden einfach noch einmal speichern."}),i==="credentials"?o.jsxs("form",{onSubmit:C,className:"space-y-3",children:[o.jsx("input",{value:l,onChange:N=>u(N.target.value),required:!0,placeholder:"Benutzername oder E-Mail",autoComplete:"username",className:S}),o.jsx("input",{type:"password",value:c,onChange:N=>d(N.target.value),required:!0,placeholder:"Passwort",autoComplete:"current-password",className:S}),b&&o.jsx("p",{className:"text-sm text-red-600",children:b}),o.jsx("button",{type:"submit",disabled:p,className:"w-full rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:p?"Melde an…":"Anmelden"})]}):o.jsxs("form",{onSubmit:j,className:"space-y-3",children:[o.jsx("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:g}),o.jsx("input",{value:f,onChange:N=>h(N.target.value),required:!0,inputMode:"numeric",autoComplete:"one-time-code",placeholder:"123456",className:S}),b&&o.jsx("p",{className:"text-sm text-red-600",children:b}),o.jsx("button",{type:"submit",disabled:p,className:"w-full rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:p?"Prüfe…":"Bestätigen"})]})]})})}const _e=(...e)=>e.filter(Boolean).join(" "),Bo="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/60 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-neutral-950",ON={primary:"bg-brand-500 text-white shadow-sm hover:bg-brand-600 active:bg-brand-700",secondary:"border border-neutral-300 bg-white text-neutral-700 shadow-sm hover:bg-neutral-50 hover:border-neutral-400 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-200 dark:hover:bg-neutral-800",danger:"bg-red-600 text-white shadow-sm hover:bg-red-700",ghost:"text-neutral-600 hover:bg-neutral-100 hover:text-neutral-900 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:hover:text-white"},zN={sm:"h-8 gap-1.5 px-3 text-sm",md:"h-10 gap-2 px-4 text-sm"};function kc({variant:e="primary",size:t="md",className:n}={}){return _e("inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-lg font-semibold transition disabled:cursor-not-allowed disabled:opacity-50",Bo,ON[e],zN[t],n)}function L4({variant:e,size:t,className:n,icon:r,children:s,to:i,href:a,type:l="button",...u}){const c=kc({variant:e,size:t,className:n}),d=o.jsxs(o.Fragment,{children:[r&&o.jsx(Be,{name:r,className:"h-4 w-4"}),s]});return i?o.jsx(G,{to:i,className:c,...u,children:d}):a?o.jsx("a",{href:a,className:c,...u,children:d}):o.jsx("button",{type:l,className:c,...u,children:d})}const BN={default:"text-neutral-500 hover:bg-neutral-100 hover:text-neutral-900 dark:text-neutral-400 dark:hover:bg-neutral-800 dark:hover:text-white",danger:"text-neutral-400 hover:bg-red-50 hover:text-red-600 dark:text-neutral-500 dark:hover:bg-red-950/50 dark:hover:text-red-400"};function $N({icon:e,label:t,tone:n="default",className:r,to:s,href:i,...a}){const l=_e("inline-flex h-8 w-8 items-center justify-center rounded-lg transition",Bo,BN[n],r),u=o.jsx(Be,{name:e,className:"h-[18px] w-[18px]"});return s?o.jsx(G,{to:s,className:l,title:t,"aria-label":t,...a,children:u}):i?o.jsx("a",{href:i,className:l,title:t,"aria-label":t,...a,children:u}):o.jsx("button",{type:"button",className:l,title:t,"aria-label":t,...a,children:u})}const df=_e("block w-full rounded-lg border border-neutral-300 bg-white px-3 text-sm text-neutral-900 shadow-sm transition placeholder:text-neutral-400","focus:border-brand-500 focus:outline-none focus:ring-2 focus:ring-brand-500/25","disabled:cursor-not-allowed disabled:bg-neutral-50 disabled:text-neutral-500","dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 dark:placeholder:text-neutral-500 dark:disabled:bg-neutral-800"),A4=m.forwardRef(function({className:t,...n},r){return o.jsx("input",{ref:r,className:_e(df,"h-10",t),...n})}),D4=m.forwardRef(function({className:t,rows:n=4,...r},s){return o.jsx("textarea",{ref:s,rows:n,className:_e(df,"py-2",t),...r})}),R4=m.forwardRef(function({className:t,children:n,...r},s){return o.jsx("select",{ref:s,className:_e(df,"h-10 pr-8",t),...r,children:n})});function I4({label:e,hint:t,error:n,required:r,children:s,className:i}){const a=m.useId(),l=typeof s=="function"?s(a):s;return o.jsxs("div",{className:i,children:[e&&o.jsxs("label",{htmlFor:a,className:"mb-1.5 block text-sm font-medium text-neutral-800 dark:text-neutral-200",children:[e,r&&o.jsx("span",{className:"ml-0.5 text-brand-600 dark:text-brand-400",children:"*"})]}),m.isValidElement(l)&&!l.props.id?m.cloneElement(l,{id:a}):l,n?o.jsx("p",{className:"mt-1.5 text-xs font-medium text-red-600 dark:text-red-400",children:n}):t&&o.jsx("p",{className:"mt-1.5 text-xs text-neutral-500 dark:text-neutral-400",children:t})]})}function V4({checked:e,indeterminate:t=!1,onChange:n,label:r,disabled:s,className:i}){const a=m.useRef(null);return m.useEffect(()=>{a.current&&(a.current.indeterminate=!!t&&!e)},[t,e]),o.jsx("input",{ref:a,type:"checkbox",checked:!!e,disabled:s,"aria-label":r,onChange:l=>n==null?void 0:n(l.target.checked),onClick:l=>l.stopPropagation(),className:_e("h-4 w-4 shrink-0 cursor-pointer accent-brand-500 disabled:cursor-not-allowed disabled:opacity-50",i)})}function F4({checked:e,onChange:t,label:n,description:r,disabled:s,className:i}){const a=m.useId();return o.jsxs("div",{className:_e("flex items-center justify-between gap-4",i),children:[(n||r)&&o.jsxs("label",{htmlFor:a,className:"min-w-0 cursor-pointer",children:[n&&o.jsx("span",{className:"block text-sm font-medium text-neutral-800 dark:text-neutral-100",children:n}),r&&o.jsx("span",{className:"block text-xs text-neutral-500 dark:text-neutral-400",children:r})]}),o.jsx("button",{id:a,type:"button",role:"switch","aria-checked":!!e,disabled:s,onClick:()=>t==null?void 0:t(!e),className:_e("relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition disabled:opacity-50",Bo,e?"bg-brand-500":"bg-neutral-300 dark:bg-neutral-700"),children:o.jsx("span",{className:_e("inline-block h-5 w-5 rounded-full bg-white shadow transition",e?"translate-x-[22px]":"translate-x-0.5")})})]})}function O4({title:e,description:t,actions:n,children:r,className:s,padded:i=!0}){return o.jsxs("section",{className:_e("rounded-xl border border-neutral-200/80 bg-white shadow-sm shadow-neutral-900/[0.03] dark:border-neutral-800 dark:bg-neutral-900 dark:shadow-none",i&&"p-5 sm:p-6",s),children:[(e||n)&&o.jsxs("div",{className:_e("flex flex-wrap items-start justify-between gap-3",(t||r)&&"mb-4"),children:[o.jsxs("div",{className:"min-w-0",children:[e&&o.jsx("h2",{className:"text-base font-semibold text-neutral-900 dark:text-white",children:e}),t&&o.jsx("p",{className:"mt-0.5 text-sm text-neutral-500 dark:text-neutral-400",children:t})]}),n&&o.jsx("div",{className:"flex shrink-0 flex-wrap gap-2",children:n})]}),r]})}function z4({title:e,description:t,actions:n,className:r}){return o.jsxs("div",{className:_e("mb-6 flex flex-wrap items-end justify-between gap-4",r),children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("h1",{className:"text-2xl font-bold tracking-tight text-neutral-900 dark:text-white",children:e}),t&&o.jsx("p",{className:"mt-1 max-w-2xl text-sm text-neutral-500 dark:text-neutral-400",children:t})]}),n&&o.jsx("div",{className:"flex flex-wrap items-center gap-2",children:n})]})}const HN={neutral:"bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300",brand:"bg-brand-100 text-brand-800 dark:bg-brand-900/50 dark:text-brand-300",amber:"bg-amber-100 text-amber-800 dark:bg-amber-900/40 dark:text-amber-300",red:"bg-red-500 text-white"};function B4({tone:e="neutral",children:t,className:n}){return o.jsx("span",{className:_e("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-semibold",HN[e],n),children:t})}function $4({icon:e="inbox",title:t,description:n,actions:r}){return o.jsxs("div",{className:"flex flex-col items-center px-6 py-12 text-center",children:[o.jsx("span",{className:"mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-brand-50 text-brand-600 dark:bg-brand-900/30 dark:text-brand-400",children:o.jsx(Be,{name:e,className:"h-6 w-6"})}),o.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:t}),n&&o.jsx("p",{className:"mt-1 max-w-sm text-sm text-neutral-500 dark:text-neutral-400",children:n}),r&&o.jsx("div",{className:"mt-4 flex flex-wrap justify-center gap-2",children:r})]})}const UN={md:"max-w-md",lg:"max-w-xl",xl:"max-w-3xl"};function H4({open:e,onClose:t,title:n,description:r,headerExtra:s,children:i,footer:a,size:l="md",as:u="div",...c}){const d=m.useRef(null);return Pi(d,e,t),e?o.jsxs("div",{className:"fixed inset-0 z-50",children:[o.jsx("div",{className:"absolute inset-0 bg-neutral-950/40 backdrop-blur-[2px]",onClick:t}),o.jsxs(u,{ref:d,role:"dialog","aria-modal":"true","aria-label":n,className:_e("absolute inset-y-0 right-0 flex w-full flex-col bg-white shadow-2xl dark:bg-neutral-900",UN[l]),...c,children:[o.jsxs("div",{className:"flex items-start justify-between gap-4 border-b border-neutral-200 px-6 py-5 dark:border-neutral-800",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("h2",{className:"text-lg font-semibold text-neutral-900 dark:text-white",children:n}),r&&o.jsx("p",{className:"mt-0.5 text-sm text-neutral-500 dark:text-neutral-400",children:r})]}),s&&o.jsx("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:s}),o.jsx($N,{icon:"close",label:"Schließen",onClick:t,className:"-mr-2 -mt-1"})]}),o.jsx("div",{className:"flex-1 space-y-5 overflow-y-auto px-6 py-6",children:i}),a&&o.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-neutral-200 bg-neutral-50 px-6 py-4 dark:border-neutral-800 dark:bg-neutral-900/60",children:a})]})]}):null}function U4({file:e,onChange:t,accept:n,hint:r,current:s,disabled:i}){const a=m.useId(),[l,u]=m.useState(!1),c=f=>!i&&f&&t(f),d=f=>f>=1048576?`${(f/1048576).toFixed(1).replace(".",",")} MB`:`${Math.max(1,Math.round(f/1024))} KB`;return o.jsxs("label",{htmlFor:a,onDragOver:f=>{f.preventDefault(),u(!0)},onDragLeave:()=>u(!1),onDrop:f=>{var h;f.preventDefault(),u(!1),c((h=f.dataTransfer.files)==null?void 0:h[0])},className:_e("flex cursor-pointer flex-col items-center justify-center gap-1.5 rounded-xl border-2 border-dashed px-4 py-6 text-center transition",l?"border-brand-500 bg-brand-50 dark:bg-brand-900/20":"border-neutral-300 hover:border-brand-400 hover:bg-neutral-50 dark:border-neutral-700 dark:hover:bg-neutral-800/50",i&&"pointer-events-none opacity-60"),children:[o.jsx("input",{id:a,type:"file",accept:n,className:"sr-only",disabled:i,onChange:f=>{var h;return c((h=f.target.files)==null?void 0:h[0])}}),o.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-brand-50 text-brand-600 dark:bg-brand-900/30 dark:text-brand-400",children:o.jsx(Be,{name:e?"file":"download",className:_e("h-5 w-5",!e&&"rotate-180")})}),e?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"max-w-full truncate text-sm font-semibold text-neutral-900 dark:text-white",children:e.name}),o.jsxs("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:[d(e.size)," · Klicken, um eine andere Datei zu wählen"]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("span",{className:"text-sm font-semibold text-neutral-800 dark:text-neutral-100",children:["Datei hierher ziehen oder ",o.jsx("span",{className:"text-brand-600 dark:text-brand-400",children:"auswählen"})]}),s&&o.jsxs("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:["Aktuell: ",s]}),r&&o.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}function W4({value:e,onChange:t,options:n,size:r="md",className:s}){return o.jsx("div",{role:"radiogroup",className:_e("inline-flex rounded-lg bg-neutral-100 p-1 dark:bg-neutral-800",s),children:n.map(i=>o.jsx("button",{type:"button",role:"radio","aria-checked":e===i.value,onClick:()=>t(i.value),className:_e("rounded-md font-medium transition",Bo,r==="sm"?"px-2.5 py-1 text-xs":"px-3 py-1.5 text-sm",e===i.value?"bg-white text-neutral-900 shadow-sm dark:bg-neutral-950 dark:text-white":"text-neutral-500 hover:text-neutral-800 dark:text-neutral-400 dark:hover:text-neutral-200"),children:i.label},i.value))})}const WN={home:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9",tag:"M4 4h7l9 9-7 7-9-9V4Zm3.5 3.5h.01",car:"M3 13.5 4.5 9A2 2 0 0 1 6.4 7.5h11.2A2 2 0 0 1 19.5 9L21 13.5M3 13.5v4a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1h12v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-4M3 13.5h18M6.5 16.5h.01M17.5 16.5h.01",box:"M12 3 4 7.5v9L12 21l8-4.5v-9L12 3Zm0 9 8-4.5M12 12v9M12 12 4 7.5",mail:"M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Zm0 0 8 7 8-7",users:"M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-7 9v-1a6 6 0 0 1 12 0v1M16 3.5a4 4 0 0 1 0 7.5M22 20v-1a6 6 0 0 0-4-5.6",user:"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-7 8a7 7 0 0 1 14 0",shield:"M12 3 4 6v6c0 4.5 3.4 7.7 8 9 4.6-1.3 8-4.5 8-9V6l-8-3Zm-1.5 9.5 4-4 1 1-5 5-2.5-2.5 1-1 1.5 1.5Z",key:"M15 7a3 3 0 1 1 0 .01M21 3l-6.5 6.5M8.5 13.5a5 5 0 1 0 2 2L21 5M17 7l2 2",lock:"M6 10V8a6 6 0 1 1 12 0v2m-13 0h14a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1Zm7 5v2",briefcase:"M4 7h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1Zm4 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M3 12h18",image:"M4 5h16a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm2 12 4.5-5.5L14 16l2.5-3L20 17H6ZM8 9.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z",images:"M7 3h13a1 1 0 0 1 1 1v11M3 7h13a1 1 0 0 1 1 1v12H4a1 1 0 0 1-1-1V7Zm2 11 3.5-4 2.5 3 2-2 3 3",camera:"M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Zm8 9a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z",help:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-5.5v.01M9.5 9.25a2.5 2.5 0 1 1 3.5 2.29c-.7.32-1 .77-1 1.46v.3",download:"M12 4v11m0 0-4-4m4 4 4-4M5 19h14",transfer:"M7 4v13m0 0-3-3m3 3 3-3M17 20V7m0 0-3 3m3-3 3 3",gauge:"M4 13a8 8 0 1 1 16 0M12 13l3.5-3.5M6 17h12",inbox:"M3 13h5l1.5 2.5h5L16 13h5M5 5h14l2 8v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-5l2-8Z",building:"M4 21V5a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v16M15 9h4a1 1 0 0 1 1 1v11M3 21h18M8 8h3M8 12h3M8 16h3",palette:"M12 3a9 9 0 1 0 0 18c1 0 1.5-.7 1.5-1.5 0-.4-.2-.8-.4-1.1-.3-.3-.4-.7-.4-1.1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-7.8-9-7.8ZM7.5 12h.01M10 7.5h.01M15 7.5h.01",file:"M7 3h7l5 5v12a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm7 0v5h5M9 13h6M9 17h6",server:"M4 4h16v6H4V4Zm0 10h16v6H4v-6Zm3-7h.01M7 17h.01",link:"M10 13a5 5 0 0 0 7.07 0l3-3a5 5 0 0 0-7.07-7.07l-1.5 1.5M14 11a5 5 0 0 0-7.07 0l-3 3a5 5 0 0 0 7.07 7.07l1.5-1.5",globe:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-9-9h18M12 3c2.5 2.5 3.5 5.5 3.5 9s-1 6.5-3.5 9c-2.5-2.5-3.5-5.5-3.5-9s1-6.5 3.5-9Z",send:"M4 12 20 4l-4 16-4-7-8-1Zm8 1 8-9",refresh:"M20 11a8 8 0 0 0-14.9-3M4 4v4h4m-4 5a8 8 0 0 0 14.9 3M20 20v-4h-4",trash:"M5 7h14M10 11v6m4-6v6M6 7l1 13h10l1-13M9 7V4h6v3",external:"M14 4h6v6m0-6-9 9M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5",pause:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-2-12v6m4-6v6",timer:"M10 2h4M12 14l3-3M12 22a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",pencil:"M4 20h4L19 9l-4-4L4 16v4Zm9-13 4 4",eye:"M2.5 12S6 5 12 5s9.5 7 9.5 7-3.5 7-9.5 7-9.5-7-9.5-7Zm9.5 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",plus:"M12 5v14M5 12h14",search:"M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-2 4 4",chevron:"m9 6 6 6-6 6",menu:"M4 6h16M4 12h16M4 18h16",close:"M6 6l12 12M18 6 6 18",logout:"M15 4h3a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3M10 8l-4 4 4 4M6 12h10",sun:"M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0-13v2m0 14v2M3 12h2m14 0h2M5.6 5.6 7 7m10 10 1.4 1.4M5.6 18.4 7 17M17 7l1.4-1.4",moon:"M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5Z",wand:"M5 19 15 9m2-6v2m0 4v2m-3-5h2m4 0h2M4 20l1-1",template:"M4 4h16v5H4V4Zm0 9h7v7H4v-7Zm11 0h5v7h-5v-7Z",copy:"M8 8h11a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Zm-4 8V4a1 1 0 0 1 1-1h12",eyeOff:"M3 3l18 18M10.6 5.1A10 10 0 0 1 12 5c6 0 9.5 7 9.5 7a17 17 0 0 1-3 3.9M6.6 6.6A17 17 0 0 0 2.5 12S6 19 12 19a9.6 9.6 0 0 0 4.4-1.1M9.9 9.9a3 3 0 0 0 4.2 4.2",play:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-2-12.5v7l6-3.5-6-3.5Z",list:"M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01",grip:"M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01",check:"M5 12.5l4.5 4.5L19 7.5",chart:"M4 4v15a1 1 0 0 0 1 1h15M8 15l3.5-4 3 2.5L20 7"};function Be({name:e,className:t="h-5 w-5"}){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",className:_e("shrink-0",t),"aria-hidden":"true",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:WN[e]||""})})}const Dv=e=>String(e||"").toLowerCase().replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ü/g,"ue").replace(/ß/g,"ss").normalize("NFD").replace(/[̀-ͯ]/g,""),kp=(e,t)=>{const n=Dv(`${e.label} ${e.group||""} ${e.keywords||""}`);return t.every(r=>n.includes(r))};function GN({open:e,onClose:t,pages:n}){const r=xr(),{hasPermission:s}=Wn(),i=m.useRef(null),a=m.useRef(null),[l,u]=m.useState(""),[c,d]=m.useState(0),[f,h]=m.useState(null);Pi(i,e,t),m.useEffect(()=>{e&&(u(""),d(0),f===null&&(s("packages.manage")||s("models.manage"))&&oe.get("/models").then(w=>h(w)).catch(()=>h([])))},[e]);const g=m.useMemo(()=>{const w=Dv(l).split(/\s+/).filter(Boolean),p=n.map(v=>({...v,kind:"page"}));if(w.length===0)return p.slice(0,8);const x=(f||[]).map(v=>({key:`model-${v.id}`,kind:"model",icon:"car",label:`${v.brand_name||""} ${v.name}`.trim(),group:s("packages.manage")?"Pakete bearbeiten":"Modelle",to:s("packages.manage")?`/admin/packages?model=${v.id}`:"/admin/models"}));return[...p.filter(v=>kp(v,w)),...x.filter(v=>kp(v,w)).slice(0,8)]},[l,n,f,s]);if(m.useEffect(()=>{d(0)},[l]),m.useEffect(()=>{var w,p;(p=(w=a.current)==null?void 0:w.querySelector('[data-active="true"]'))==null||p.scrollIntoView({block:"nearest"})},[c]),!e)return null;const y=w=>{t(),w.href?window.open(w.href,"_blank","noopener"):r(w.to)},b=w=>{w.key==="ArrowDown"?(w.preventDefault(),d(p=>Math.min(p+1,g.length-1))):w.key==="ArrowUp"?(w.preventDefault(),d(p=>Math.max(p-1,0))):w.key==="Enter"&&g[c]&&(w.preventDefault(),y(g[c]))};return o.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-neutral-950/40 px-4 pt-[12vh] backdrop-blur-sm",onMouseDown:t,children:o.jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-label":"Schnellsuche",onMouseDown:w=>w.stopPropagation(),className:"w-full max-w-xl overflow-hidden rounded-2xl border border-neutral-200 bg-white shadow-2xl dark:border-neutral-800 dark:bg-neutral-900",children:[o.jsxs("div",{className:"flex items-center gap-3 border-b border-neutral-200 px-4 dark:border-neutral-800",children:[o.jsx(Be,{name:"search",className:"h-5 w-5 text-neutral-400"}),o.jsx("input",{value:l,onChange:w=>u(w.target.value),onKeyDown:b,placeholder:"Seite oder Fahrzeug suchen …",className:"h-14 flex-1 bg-transparent text-base text-neutral-900 placeholder:text-neutral-400 focus:outline-none dark:text-white"}),o.jsx("kbd",{className:"hidden rounded border border-neutral-200 px-1.5 py-0.5 text-[11px] font-medium text-neutral-400 dark:border-neutral-700 sm:block",children:"Esc"})]}),o.jsxs("ul",{ref:a,className:"max-h-[50vh] overflow-y-auto p-2",children:[g.length===0&&o.jsxs("li",{className:"px-3 py-8 text-center text-sm text-neutral-500 dark:text-neutral-400",children:["Nichts gefunden für „",l,"“."]}),g.map((w,p)=>o.jsx("li",{children:o.jsxs("button",{type:"button","data-active":p===c,onMouseMove:()=>d(p),onClick:()=>y(w),className:`flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left text-sm ${p===c?"bg-brand-50 text-brand-800 dark:bg-brand-900/30 dark:text-brand-200":"text-neutral-700 dark:text-neutral-200"}`,children:[o.jsx(Be,{name:w.icon,className:"h-[18px] w-[18px] opacity-70"}),o.jsx("span",{className:"flex-1 truncate font-medium",children:w.label}),w.group&&o.jsx("span",{className:"shrink-0 text-xs text-neutral-400",children:w.group})]})},w.key||w.to))]}),o.jsxs("div",{className:"flex items-center gap-4 border-t border-neutral-200 px-4 py-2 text-[11px] text-neutral-400 dark:border-neutral-800",children:[o.jsx("span",{children:"↑ ↓ auswählen"}),o.jsx("span",{children:"↵ öffnen"})]})]})})}const KN="/assets/logo-BNfZDkmN.png",Rv="hifi-admin-nav-collapsed",Sp={system:!0};function qN(){try{return{...Sp,...JSON.parse(localStorage.getItem(Rv)||"{}")}}catch{return Sp}}const jp=(e,t)=>t.end?e===t.to:e===t.to||e.startsWith(`${t.to}/`);function YN({user:e,onLogout:t}){const[n,r]=m.useState(!1),s=m.useRef(null),{theme:i,toggleTheme:a}=ov(),l=(e==null?void 0:e.username)||"",u=l.slice(0,2).toUpperCase();m.useEffect(()=>{if(!n)return;const d=h=>{var g;return!((g=s.current)!=null&&g.contains(h.target))&&r(!1)},f=h=>h.key==="Escape"&&r(!1);return document.addEventListener("mousedown",d),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",f)}},[n]);const c="flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm text-neutral-700 hover:bg-neutral-100 dark:text-neutral-200 dark:hover:bg-neutral-800";return o.jsxs("div",{ref:s,className:"relative",children:[o.jsx("button",{type:"button",onClick:()=>r(d=>!d),"aria-haspopup":"menu","aria-expanded":n,title:`Angemeldet als ${l}`,className:"flex h-9 w-9 items-center justify-center rounded-full bg-brand-500 text-xs font-bold text-white ring-2 ring-white transition hover:bg-brand-600 focus-visible:outline-none focus-visible:ring-brand-500/60 dark:ring-neutral-950",children:u}),n&&o.jsxs("div",{role:"menu",className:"absolute right-0 top-11 z-40 w-60 rounded-xl border border-neutral-200 bg-white p-1.5 shadow-xl dark:border-neutral-800 dark:bg-neutral-900",children:[o.jsxs("div",{className:"px-3 pb-2 pt-1.5",children:[o.jsx("p",{className:"truncate text-sm font-semibold text-neutral-900 dark:text-white",children:l}),o.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:e!=null&&e.is_super_admin?"Super-Admin":"Admin"})]}),o.jsx("div",{className:"my-1 border-t border-neutral-100 dark:border-neutral-800"}),o.jsxs(G,{to:"/admin/account",role:"menuitem",onClick:()=>r(!1),className:c,children:[o.jsx(Be,{name:"user",className:"h-4 w-4"})," Mein Konto"]}),o.jsxs("button",{type:"button",role:"menuitem",onClick:a,className:c,children:[o.jsx(Be,{name:i==="dark"?"sun":"moon",className:"h-4 w-4"}),i==="dark"?"Helles Design":"Dunkles Design"]}),o.jsx("div",{className:"my-1 border-t border-neutral-100 dark:border-neutral-800"}),o.jsxs("button",{type:"button",role:"menuitem",onClick:t,className:`${c} text-red-600 dark:text-red-400`,children:[o.jsx(Be,{name:"logout",className:"h-4 w-4"})," Abmelden"]})]})]})}function XN(){const{logout:e,user:t,hasPermission:n}=Wn(),r=xr(),{pathname:s}=Qe(),[i,a]=m.useState(!1),[l,u]=m.useState(!1),[c,d]=m.useState(qN),[f,h]=m.useState(0),[g,y]=m.useState([]),b=m.useRef(null),[w,p]=m.useState([]),[x,v]=m.useState(!1),[k,E]=m.useState(null);Pi(b,i,()=>a(!1));const C=m.useCallback(()=>{n("contact.manage")&&oe.get("/contact").then(I=>h(I.filter(T=>T.status==="new").length)).catch(()=>{}),oe.get("/site-settings").then(I=>p(I.hidden_areas||[])).catch(()=>{}),oe.get("/maintenance").then(I=>{var T,M;v(!!((T=I==null?void 0:I.global)!=null&&T.enabled)),E((M=I==null?void 0:I.countdown)!=null&&M.active?I.countdown.launch_at:null)}).catch(()=>{})},[t==null?void 0:t.id]);m.useEffect(()=>{C();const I=setInterval(C,2*60*1e3);return()=>clearInterval(I)},[C]),m.useEffect(()=>{const I=T=>{(T.ctrlKey||T.metaKey)&&T.key.toLowerCase()==="k"&&(T.preventDefault(),u(!0))};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[]),m.useEffect(()=>{a(!1)},[s]);const j=TN.filter(I=>w.includes(I.key)).map(I=>I.label),S=()=>oe.get("/custom-fonts").then(y).catch(()=>{});m.useEffect(()=>{S()},[]);const N=m.useMemo(()=>[{id:"main",title:null,links:[{to:"/admin",label:"Übersicht",icon:"gauge",end:!0,keywords:"dashboard start"},{to:"/admin/traffic",label:"Besucher",icon:"chart",permission:"system.admin",keywords:"statistik analytics traffic zugriffe trend"},{to:"/admin/contact-requests",label:"Anfragen",icon:"inbox",permission:"contact.manage",badge:f,keywords:"kontakt kunden nachrichten"}]},{id:"vehicles",title:"Fahrzeuge & Pakete",links:[{to:"/admin/brands",label:"Fahrzeugmarken",icon:"tag",permission:"brands.manage",keywords:"hersteller vorlage"},{to:"/admin/models",label:"Modelle",icon:"car",permission:"models.manage",keywords:"fahrzeuge"},{to:"/admin/packages",label:"Pakete",icon:"box",permission:"packages.manage",keywords:"preise produkte upgrades"}]},{id:"content",title:"Website-Inhalte",links:[{to:"/admin/home-sections",label:"Startseite",icon:"home",permission:"content.manage",keywords:"titelbild texte"},{to:"/admin/services",label:"Leistungen",icon:"briefcase",permission:"services.manage"},{to:"/admin/faqs",label:"FAQ",icon:"help",permission:"content.manage",keywords:"fragen"},{to:"/admin/partners",label:"Partner-Logos",icon:"shield",permission:"content.manage"},{to:"/admin/downloads",label:"Downloads",icon:"download",permission:"downloads.manage",keywords:"dateien pdf"}]},{id:"gallery",title:"Bildergalerie",links:[{to:"/admin/gallery-brands",label:"Galerie-Marken",icon:"images",permission:"gallery.manage"},{to:"/admin/gallery-projects",label:"Projekte & Fotos",icon:"camera",permission:"gallery.manage",keywords:"bilder hochladen"}]},{id:"company",title:"Firma & Aussehen",links:[{to:"/admin/settings/company",label:"Firmendaten",icon:"building",permission:"settings.manage",keywords:"oeffnungszeiten telefon adresse whatsapp email preis hinweis"},{to:"/admin/settings/design",label:"Aussehen",icon:"palette",permission:"settings.manage",keywords:"schrift farben kacheln"},{to:"/admin/settings/images",label:"Bilder",icon:"image",permission:"settings.manage",keywords:"logo favicon hintergrund"},{to:"/admin/settings/legal",label:"Rechtstexte",icon:"file",permission:"settings.manage",keywords:"impressum datenschutz agb"},{to:"/admin/settings/maintenance",label:"Wartungsmodus",icon:"pause",permission:"settings.manage",keywords:"wartung offline"},{to:"/admin/settings/countdown",label:"Launch-Countdown",icon:"timer",permission:"settings.manage",keywords:"start eroeffnung"}]},{id:"system",title:"System (Experten)",links:[{to:"/admin/users",label:"Benutzer",icon:"users",permission:"users.manage",keywords:"mitarbeiter konten"},{to:"/admin/permission-groups",label:"Berechtigungsgruppen",icon:"key",permission:"permission_groups.manage",keywords:"rechte rollen"},{to:"/admin/settings/email",label:"E-Mail-Versand",icon:"send",permission:"system.admin",keywords:"smtp mail"},{to:"/admin/settings/google",label:"Google-Dienste",icon:"globe",permission:"system.admin",keywords:"analytics rezensionen bewertungen"},{to:"/admin/settings/ai-images",label:"KI-Modellbilder",icon:"wand",permission:"system.admin",keywords:"higgsfield ki bilder generieren"},{to:"/admin/settings/connections",label:"Verbindungstest",icon:"link",permission:"system.admin"},{to:"/admin/settings/database",label:"Datenbank",icon:"server",permission:"system.admin"},{to:"/admin/settings/export-import",label:"Export & Import",icon:"transfer",permission:"system.admin",keywords:"sicherung backup"},{to:"/admin/settings/update",label:"Updates",icon:"refresh",permission:"system.update",keywords:"git version"},{to:"/admin/settings/reset",label:"Zurücksetzen",icon:"trash",permission:"system.admin",keywords:"loeschen"}]}].map(I=>({...I,links:I.links.filter(T=>!T.permission||n(T.permission))})).filter(I=>I.links.length>0),[t==null?void 0:t.id,f]),P=m.useMemo(()=>[...N.flatMap(I=>I.links.map(T=>({...T,group:I.title}))),{to:"/admin/account",label:"Mein Konto",icon:"user",keywords:"passwort 2fa profil"}],[N]),V=P.filter(I=>jp(s,I)).sort((I,T)=>T.to.length-I.to.length)[0],B=I=>{d(T=>{const M={...T,[I]:!T[I]};try{localStorage.setItem(Rv,JSON.stringify(M))}catch{}return M})},se=async()=>{await e(),r("/admin/login")},ne=["content.manage","services.manage","packages.manage","gallery.manage","settings.manage"].some(n),q=({isActive:I})=>`group relative flex items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm transition ${I?"bg-brand-50 font-semibold text-brand-800 before:absolute before:inset-y-1.5 before:left-0 before:w-[3px] before:rounded-full before:bg-brand-500 dark:bg-brand-500/10 dark:text-brand-300":"font-medium text-neutral-600 hover:bg-neutral-100 hover:text-neutral-900 dark:text-neutral-400 dark:hover:bg-neutral-800/70 dark:hover:text-neutral-100"}`,W=o.jsxs("div",{className:"flex h-full flex-col",children:[o.jsxs("div",{className:"flex items-center gap-2 px-5 pb-4 pt-5",children:[o.jsxs(G,{to:"/admin",className:"rounded-lg",children:[o.jsx("img",{src:KN,alt:"HifiPlanet",className:"h-7 w-auto dark:hidden"}),o.jsx("img",{src:af,alt:"HifiPlanet",className:"hidden h-7 w-auto dark:block"})]}),o.jsx("span",{className:"rounded-md bg-neutral-100 px-1.5 py-0.5 text-[11px] font-semibold uppercase tracking-wide text-neutral-500 dark:bg-neutral-800 dark:text-neutral-400",children:"Admin"})]}),o.jsx("div",{className:"px-3 pb-3",children:o.jsxs("button",{type:"button",onClick:()=>u(!0),className:"flex h-9 w-full items-center gap-2 rounded-lg border border-neutral-200 bg-white px-3 text-sm text-neutral-400 shadow-sm transition hover:border-neutral-300 hover:text-neutral-600 dark:border-neutral-800 dark:bg-neutral-900 dark:hover:border-neutral-700 dark:hover:text-neutral-300",children:[o.jsx(Be,{name:"search",className:"h-4 w-4"}),o.jsx("span",{className:"flex-1 text-left",children:"Suchen …"}),o.jsx("kbd",{className:"hidden rounded border border-neutral-200 px-1 text-[10px] font-medium dark:border-neutral-700 lg:block",children:"Strg K"})]})}),o.jsx("nav",{className:"flex-1 space-y-4 overflow-y-auto px-3 pb-6",children:N.map(I=>{const T=I.links.some(D=>jp(s,D)),M=I.title&&c[I.id]&&!T,L=I.links.reduce((D,H)=>D+(H.badge||0),0);return o.jsxs("div",{children:[I.title&&o.jsxs("button",{type:"button",onClick:()=>B(I.id),"aria-expanded":!M,className:"mb-1 flex w-full items-center justify-between rounded-md px-3 py-1 text-[11px] font-semibold uppercase tracking-wider text-neutral-400 hover:text-neutral-600 dark:text-neutral-500 dark:hover:text-neutral-300",children:[o.jsx("span",{children:I.title}),o.jsxs("span",{className:"flex items-center gap-1.5",children:[M&&L>0&&o.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"}),o.jsx(Be,{name:"chevron",className:`h-3.5 w-3.5 transition-transform ${M?"":"rotate-90"}`})]})]}),!M&&o.jsx("div",{className:"space-y-0.5",children:I.links.map(D=>o.jsxs(gk,{to:D.to,end:D.end,className:q,children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-3",children:[o.jsx(Be,{name:D.icon,className:"h-[18px] w-[18px] opacity-80"}),o.jsx("span",{className:"truncate",children:D.label})]}),!!D.badge&&o.jsx("span",{className:"min-w-[20px] rounded-full bg-red-500 px-1.5 py-0.5 text-center text-[11px] font-bold leading-none text-white",children:D.badge})]},D.to))})]},I.id)})})]});return o.jsxs(RN,{onRefreshCounters:C,children:[o.jsx(FN,{}),o.jsxs(Nv,{value:{fonts:g,refresh:S},children:[o.jsxs("div",{className:"flex min-h-screen bg-neutral-100/60 text-neutral-900 dark:bg-neutral-950 dark:text-neutral-100",children:[o.jsx(Mv,{}),o.jsx("aside",{className:"sticky top-0 hidden h-screen w-64 shrink-0 border-r border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900/40 lg:block",children:W}),i&&o.jsxs("div",{className:"fixed inset-0 z-40 lg:hidden",children:[o.jsx("div",{className:"absolute inset-0 bg-neutral-950/50 backdrop-blur-sm",onClick:()=>a(!1)}),o.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-label":"Menü",className:"absolute inset-y-0 left-0 w-72 max-w-[85vw] bg-white shadow-2xl dark:bg-neutral-900",children:[o.jsx("button",{type:"button",onClick:()=>a(!1),"aria-label":"Menü schließen",className:"absolute right-3 top-4 rounded-lg p-1.5 text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",children:o.jsx(Be,{name:"close",className:"h-5 w-5"})}),W]})]}),o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx("header",{className:"sticky top-0 z-30 border-b border-neutral-200 bg-white/85 backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/85",children:o.jsxs("div",{className:"flex h-16 items-center gap-3 px-4 sm:px-6",children:[o.jsx("button",{type:"button",onClick:()=>a(!0),"aria-label":"Menü öffnen",className:"-ml-1 rounded-lg p-2 text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800 lg:hidden",children:o.jsx(Be,{name:"menu",className:"h-6 w-6"})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[(V==null?void 0:V.group)&&o.jsx("p",{className:"hidden truncate text-xs font-medium text-neutral-400 sm:block",children:V.group}),o.jsx("p",{className:"truncate text-sm font-semibold text-neutral-900 dark:text-white",children:(V==null?void 0:V.label)||"Admin"})]}),o.jsx("button",{type:"button",onClick:()=>u(!0),"aria-label":"Suchen",className:"rounded-lg p-2 text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800 lg:hidden",children:o.jsx(Be,{name:"search",className:"h-5 w-5"})}),ne&&o.jsxs("a",{href:"/?bearbeiten=1",target:"_blank",rel:"noopener noreferrer",className:kc({variant:"secondary",size:"sm",className:"hidden sm:inline-flex"}),children:[o.jsx(Be,{name:"pencil",className:"h-4 w-4"}),"Live bearbeiten"]}),o.jsxs("a",{href:"/",target:"_blank",rel:"noopener noreferrer",title:"Website in neuem Tab öffnen",className:kc({variant:"secondary",size:"sm",className:"px-2 sm:px-3"}),children:[o.jsx(Be,{name:"external",className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Website"})]}),o.jsx(YN,{user:t,onLogout:se})]})}),(x||k||j.length>0)&&o.jsxs("div",{className:"border-b border-amber-200 bg-amber-50 px-4 py-2 text-sm text-amber-900 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-200 sm:px-6",children:[x&&o.jsxs("p",{children:[o.jsx("strong",{children:"Wartungsmodus ist aktiv"})," – Besucher sehen gerade nur die Wartungsseite."," ",n("settings.manage")&&o.jsx(G,{to:"/admin/settings/maintenance",className:"underline",children:"Ändern"})]}),k&&o.jsxs("p",{children:[o.jsx("strong",{children:"Launch-Countdown läuft"})," – Besucher sehen bis"," ",new Date(k).toLocaleString("de-DE",{dateStyle:"medium",timeStyle:"short",timeZone:"Europe/Berlin"})," Uhr nur den Countdown."," ",n("settings.manage")&&o.jsx(G,{to:"/admin/settings/countdown",className:"underline",children:"Ändern"})]}),j.length>0&&o.jsxs("p",{children:[o.jsx("strong",{children:"Ausgeblendet für Besucher:"})," ",j.join(", "),"."," ",o.jsx(G,{to:"/admin",className:"underline",children:"Auf der Übersicht ändern"})]})]}),o.jsx("main",{className:"mx-auto w-full max-w-7xl flex-1 p-4 sm:p-6 lg:p-8",children:o.jsx(m.Suspense,{fallback:o.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}),children:o.jsx(Sd,{})})})]})]}),o.jsx(GN,{open:l,onClose:()=>u(!1),pages:P})]})]})}function ZN(){const{user:e,loading:t}=Wn();return t?o.jsx("div",{className:"flex min-h-screen items-center justify-center text-neutral-500",children:"Lädt…"}):e?o.jsx(Sd,{}):o.jsx(fr,{to:"/admin/login",replace:!0})}function ue({permission:e,children:t}){const{hasPermission:n}=Wn();return(Array.isArray(e)?e:[e]).some(i=>n(i))?t:o.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-8 text-center dark:border-neutral-800 dark:bg-neutral-900",children:[o.jsx("h1",{className:"mb-2 text-lg font-bold text-neutral-900 dark:text-white",children:"Keine Berechtigung"}),o.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:"Du hast keinen Zugriff auf diesen Bereich. Bitte wende dich an einen Administrator, falls du hier Zugriff brauchst."})]})}function ka(e,t,n="name"){if(!t)return;let r=document.head.querySelector(`meta[${n}="${e}"]`);r||(r=document.createElement("meta"),r.setAttribute(n,e),document.head.appendChild(r)),r.setAttribute("content",t)}function QN(e){let t=document.head.querySelector('link[rel="canonical"]');t||(t=document.createElement("link"),t.setAttribute("rel","canonical"),document.head.appendChild(t)),t.setAttribute("href",`https://hifi-planet.de${e}`),ka("og:url",`https://hifi-planet.de${e}`,"property")}function Ep(e){let t=document.head.querySelector('meta[name="robots"]');if(!e){t==null||t.remove();return}t||(t=document.createElement("meta"),t.setAttribute("name","robots"),document.head.appendChild(t)),t.setAttribute("content","noindex")}function vr({title:e,description:t,path:n,noindex:r=!1}){m.useEffect(()=>(Ep(r),()=>Ep(!1)),[r]),m.useEffect(()=>{e&&(document.title=`${e} | HifiPlanet`,ka("og:title",`${e} | HifiPlanet`,"property")),t&&(ka("description",t),ka("og:description",t,"property")),n&&QN(n)},[e,t,n])}const JN=[.16,1,.3,1],Cp={up:{y:40},left:{x:-56},right:{x:56}};function e5(e){return{hidden:{opacity:0,scale:.96,filter:"blur(8px)",...Cp[e]||Cp.up},visible:{opacity:1,scale:1,x:0,y:0,filter:"blur(0px)"}}}const t5={hidden:{x:"-130%"},visible:{x:"230%",transition:{duration:1.1,ease:"easeInOut",delay:.4}}};function Ke({children:e,direction:t="up",className:n="",index:r=0,shine:s=!1,style:i}){const a=Math.min(r*.09,.45);return o.jsxs(an.div,{className:n,style:{position:"relative",overflow:"hidden",...i},initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.25,margin:"-100px"},variants:e5(t),transition:{duration:.75,ease:JN,delay:a},children:[e,s&&o.jsx(an.div,{"aria-hidden":!0,variants:t5,className:"pointer-events-none absolute inset-y-0 -left-1/3 w-1/3 rotate-12 bg-gradient-to-r from-transparent via-white/40 to-transparent"})]})}const $o=e=>{e.preventDefault(),e.stopPropagation()};function n5(e){e.preventDefault();const t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)}function fe({entity:e,id:t,field:n,lang:r,value:s,as:i="span",multiline:a=!1,placeholder:l="Text eingeben…",className:u="",...c}){const{language:d}=ye(),f=Ue(),h=r||d,g=f.getValue(e,t,n,h,s??"")??"";if(!f.canEdit(e))return o.jsx(i,{className:u,...c,children:g});const y=b=>{const w=a?b.innerText.replace(/\n{3,}/g,`
+`);return o.jsx("style",{children:t})}const hN=150,mN=300,pN=80,gN=5e3;function xN(){return o.jsx("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-white dark:bg-neutral-950",children:o.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-4 border-neutral-200 border-t-brand-500 dark:border-neutral-800 dark:border-t-brand-500"})})}function yN({enabled:e,children:t}){const n=Qe(),[r,s]=m.useState(!e),[i,a]=m.useState(!1),l=m.useRef(null);return m.useLayoutEffect(()=>{const u=l.current;if(!e||!u){s(!0),a(!1);return}s(!1),a(!1);let c=!1,d=0,f=null;const h=new Set,g=setTimeout(()=>{d=Date.now(),a(!0)},hN),y=()=>{s(!0),a(!1)},b=()=>{c=!0,clearTimeout(g),clearTimeout(f),clearTimeout(C),k.disconnect(),E()},w=()=>{if(c)return;b();const j=d?mN-(Date.now()-d):0;j>0?setTimeout(y,j):y()},p=()=>{clearTimeout(f),f=setTimeout(()=>{h.size===0&&QC()===0&&w()},pN)},x=j=>{if(h.has(j)||j.complete||j.getBoundingClientRect().top>=window.innerHeight)return;j.loading==="lazy"&&(j.loading="eager"),h.add(j);const S=()=>{h.delete(j),j.removeEventListener("load",S),j.removeEventListener("error",S),p()};j.addEventListener("load",S),j.addEventListener("error",S)},v=j=>{var S;j.nodeType===1&&(j.tagName==="IMG"&&x(j),(S=j.querySelectorAll)==null||S.call(j,"img").forEach(x))},k=new MutationObserver(j=>{j.forEach(S=>S.addedNodes.forEach(v)),p()});k.observe(u,{childList:!0,subtree:!0});const E=JC(p),C=setTimeout(w,gN);return u.querySelectorAll("img").forEach(x),p(),()=>{c||b()}},[n.pathname,e]),o.jsxs("div",{className:"relative",children:[o.jsx("div",{ref:l,style:e?{visibility:r?"visible":"hidden"}:void 0,children:t}),e&&i&&o.jsx(xN,{})]})}const vN=m.lazy(()=>Y(()=>import("./RichTextEditor-CPhkAwyB.js"),[])),wN=m.lazy(()=>Y(()=>import("./ImageUploadField-Clc_hod0.js"),__vite__mapDeps([0,1]))),cf={de:"Deutsch",en:"Englisch"},bN=["nav.","footer.","cookieConsent.","languageToggle.","themeToggle.","maintenance."],Qi=e=>bN.some(t=>e.startsWith(t));function $l(e,t){return t.split(".").reduce((n,r)=>n==null?void 0:n[r],e)}function kN({editor:e}){const t=Ue(),{entity:n,id:r,field:s,lang:i,kind:a,label:l,hint:u,original:c,aspect:d}=e,[f]=m.useState(()=>({value:c,wasPending:t.hasPending(n,r,s,i)})),[h,g]=m.useState(c),y=w=>{g(w),t.setValue(n,r,s,i,w)},b=()=>{f.wasPending?t.setValue(n,r,s,i,f.value):t.resetValue(n,r,s,i),t.closeEditor()};return o.jsxs("div",{className:"pointer-events-auto w-full rounded-xl border border-neutral-200 bg-white p-4 text-neutral-900 shadow-2xl dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 sm:w-[min(92vw,520px)]",children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between gap-3",children:[o.jsxs("p",{className:"text-sm font-semibold",children:[l," ",a!=="image"&&o.jsxs("span",{className:"font-normal text-neutral-500",children:["(",cf[i],")"]})]}),o.jsx("button",{type:"button",onClick:b,"aria-label":"Abbrechen",className:"rounded p-1 text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",children:o.jsx(Ei,{className:"h-4 w-4"})})]}),u&&o.jsx("p",{className:"mb-2 text-xs text-neutral-500 dark:text-neutral-400",children:u}),a==="image"?o.jsxs(m.Suspense,{fallback:o.jsx("p",{className:"p-3 text-sm text-neutral-500",children:"Lädt…"}),children:[o.jsx(wN,{value:h,onChange:w=>y(w||""),label:"Eigenes Bild",aspect:d}),o.jsx("p",{className:"mt-2 text-xs text-neutral-500 dark:text-neutral-400",children:"Ohne eigenes Bild (× am Vorschaubild) erscheint wieder das Standardbild."})]}):a==="html"?o.jsx("div",{className:"max-h-[45vh] overflow-y-auto rounded-md border border-neutral-300 dark:border-neutral-700",children:o.jsx(m.Suspense,{fallback:o.jsx("p",{className:"p-3 text-sm text-neutral-500",children:"Editor lädt…"}),children:o.jsx(vN,{value:h,onChange:y})})}):a==="input"?o.jsx("input",{autoFocus:!0,value:h,onChange:w=>y(w.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-800"}):o.jsx("textarea",{autoFocus:!0,rows:7,value:h,onChange:w=>y(w.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-800"}),o.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[o.jsx("button",{type:"button",onClick:b,className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm font-medium hover:bg-neutral-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:"Abbrechen"}),o.jsx("button",{type:"button",onClick:t.closeEditor,className:"rounded-md bg-brand-500 px-3 py-1.5 text-sm font-semibold text-white hover:bg-brand-600",children:"Übernehmen"})]})]})}function SN({onClose:e}){const t=Ue(),{language:n,t:r}=ye(),s=Qe(),[i,a]=m.useState(""),[l,u]=m.useState(0);m.useEffect(()=>{const h=setTimeout(()=>u(g=>g+1),400);return()=>clearTimeout(h)},[s.pathname]);const c=m.useMemo(()=>t.usedTextKeys(s.pathname).filter(h=>typeof $l(Cn.de,h)=="string").sort((h,g)=>Qi(h)-Qi(g)||h.localeCompare(g)),[s.pathname,l,t.usedTextKeys]),d=i.trim().toLowerCase(),f=c.filter(h=>!d||h.toLowerCase().includes(d)||r(h).toLowerCase().includes(d));return o.jsxs("div",{className:"pointer-events-auto flex max-h-[60vh] w-full flex-col rounded-xl border border-neutral-200 bg-white text-neutral-900 shadow-2xl dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 sm:w-[min(92vw,520px)]",children:[o.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-neutral-200 p-4 pb-3 dark:border-neutral-800",children:[o.jsxs("div",{children:[o.jsxs("p",{className:"text-sm font-semibold",children:["Feste Texte auf dieser Seite ",o.jsxs("span",{className:"font-normal text-neutral-500",children:["(",cf[n],")"]})]}),o.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:"Buttons, Beschriftungen, Menü und Fußzeile. Leer lassen = Standardtext."})]}),o.jsx("button",{type:"button",onClick:e,"aria-label":"Schließen",className:"rounded p-1 text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",children:o.jsx(Ei,{className:"h-4 w-4"})})]}),o.jsx("div",{className:"px-4 pt-3",children:o.jsx("input",{type:"search",value:i,onChange:h=>a(h.target.value),placeholder:"Suchen…",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-sm dark:border-neutral-700 dark:bg-neutral-800"})}),o.jsxs("ul",{className:"flex-1 space-y-3 overflow-y-auto p-4",children:[f.length===0&&o.jsx("li",{className:"text-sm text-neutral-500",children:"Keine Texte gefunden."}),f.map((h,g)=>{const y=$l(Cn[n],h)??$l(Cn.de,h),b=t.textOverride(n,h)!==void 0,w=r(h);return o.jsxs("li",{children:[Qi(h)&&(g===0||!Qi(f[g-1]))&&o.jsx("p",{className:"mb-3 border-t border-neutral-200 pt-3 text-xs font-semibold uppercase tracking-wide text-neutral-500 dark:border-neutral-800",children:"Auf allen Seiten (Menü, Fußzeile, Cookie-Hinweis)"}),o.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[o.jsx("label",{htmlFor:`live-text-${h}`,className:"truncate font-mono text-[11px] text-neutral-500",title:h,children:h}),b&&o.jsxs("button",{type:"button",onClick:()=>t.setValue("text",h,"value",n,""),className:"flex shrink-0 items-center gap-1 text-[11px] text-neutral-500 hover:text-brand-600",title:`Standard: ${y}`,children:[o.jsx(eP,{className:"h-3 w-3"})," Standard"]})]}),o.jsx("textarea",{id:`live-text-${h}`,rows:w.length>60?3:1,value:w,onChange:p=>t.setValue("text",h,"value",n,p.target.value===y?"":p.target.value),className:`w-full resize-y rounded-md border bg-white px-2.5 py-1.5 text-sm dark:bg-neutral-800 ${b?"border-amber-400 dark:border-amber-500":"border-neutral-300 dark:border-neutral-700"}`})]},h)})]})]})}function jN(){const e=Ue(),{language:t}=ye(),[n,r]=m.useState(!1);if(!e.enabled)return null;const s=()=>{e.pendingCount&&!window.confirm("Es gibt ungespeicherte Änderungen. Bearbeiten trotzdem beenden? Die Änderungen gehen dann verloren.")||(e.discard(),e.setEnabled(!1))},i=e.editor&&`${e.editor.entity}|${e.editor.id}|${e.editor.field}|${e.editor.lang}`;return o.jsxs("div",{className:"pointer-events-none fixed inset-x-0 bottom-0 z-[150] flex flex-col items-end gap-2 p-2 sm:p-4",children:[e.editor?o.jsx(kN,{editor:e.editor},i):n&&o.jsx(SN,{onClose:()=>r(!1)}),o.jsxs("div",{className:"pointer-events-auto flex w-full flex-wrap items-center justify-between gap-2 rounded-xl border border-neutral-700 bg-neutral-950/95 px-3 py-2.5 text-sm text-neutral-100 shadow-2xl backdrop-blur sm:px-4",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(iv,{className:"h-4 w-4 shrink-0 text-brand-400"}),o.jsxs("p",{className:"min-w-0 truncate",children:[o.jsx("span",{className:"font-semibold",children:"Bearbeiten"}),o.jsxs("span",{className:"hidden text-neutral-400 sm:inline",children:[" · ",cf[t]," · gestrichelte Stellen anklicken"]})]})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.error&&o.jsx("span",{className:"max-w-xs text-xs text-red-400",children:e.error}),o.jsxs("button",{type:"button",onClick:()=>{e.closeEditor(),r(a=>!a)},className:`flex items-center gap-1.5 rounded-md border px-3 py-1.5 font-medium ${n?"border-brand-400 text-brand-300":"border-neutral-700 hover:bg-neutral-800"}`,children:[o.jsx(zT,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Feste Texte"})]}),e.pendingCount>0&&o.jsx("button",{type:"button",onClick:e.discard,className:"rounded-md border border-neutral-700 px-3 py-1.5 font-medium hover:bg-neutral-800",children:"Verwerfen"}),o.jsxs("button",{type:"button",onClick:e.save,disabled:!e.pendingCount||e.saving,className:"flex items-center gap-1.5 rounded-md bg-brand-500 px-3 py-1.5 font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:[o.jsx(tv,{className:"h-4 w-4"}),e.saving?"Speichere…":e.pendingCount?`Speichern (${e.pendingCount})`:"Gespeichert"]}),o.jsx("button",{type:"button",onClick:s,"aria-label":"Bearbeiten beenden",title:"Bearbeiten beenden",className:"rounded-md p-1.5 text-neutral-400 hover:bg-neutral-800 hover:text-white",children:o.jsx(Ei,{className:"h-4 w-4"})})]})]})]})}const Lv=[{title:"Seiten",hint:"Ausgeblendete Seiten verschwinden aus dem Menü und leiten Besucher auf die Startseite um.",areas:[{key:"page.vehicles",label:"Fahrzeuge & Pakete",path:"/fahrzeuge"},{key:"page.services",label:"Leistungen",path:"/leistungen"},{key:"page.gallery",label:"Galerie",path:"/galerie"},{key:"page.downloads",label:"Downloads",path:"/downloads",note:"Erscheint ohnehin nur, wenn Downloads hinterlegt sind."}]},{title:"Startseite",hint:"Einzelne Abschnitte der Startseite. Das große Titelbild oben bleibt immer sichtbar.",areas:[{key:"home.stats",label:"Zahlen-Leiste"},{key:"home.partners",label:"Marken / Partner-Logos"},{key:"home.youtube",label:"Video-Abschnitt"},{key:"home.craft",label:"Handwerk & Beratung"},{key:"home.insights",label:"Einblicke (Bilder)"},{key:"home.reviews",label:"Kundenbewertungen"},{key:"home.more",label:'„Mehr als Car-Hifi"'},{key:"home.faq",label:"Häufige Fragen (FAQ)"}]}],EN=Lv[0].areas;function CN(e){if(!e)return null;const t=EN.find(n=>e===n.path||e.startsWith(`${n.path}/`));return t?t.key:null}function Av(e,t=[]){const n=CN(e);return!!n&&t.includes(n)}const TN=Lv.flatMap(e=>e.areas),PN={global:{enabled:!1,message:null},services:{enabled:!1,message:null},vehicles:{enabled:!1,message:null}},NN={mon:{open:"09:00",close:"18:00",closed:!1},tue:{open:"09:00",close:"18:00",closed:!1},wed:{open:"09:00",close:"18:00",closed:!1},thu:{open:"09:00",close:"18:00",closed:!1},fri:{open:"09:00",close:"18:00",closed:!1},sat:{open:"10:00",close:"13:00",closed:!1},sun:{open:"",close:"",closed:!0}},Hl={phone:"09373 20 62 390",whatsapp:null,contact_email:"info@hifi-planet-amorbach.de",address_street:"Boxbrunner Str. 20a",address_zip:"63916",address_city:"Amorbach",logo_path:null,logo_dark_path:null,business_hours:NN,hero_image_path:null,ga_measurement_id:null,package_card_theme:"graphite",package_card_layout:"strip",package_wheel_hint_interval:8,package_card_width:210,package_card_height:480,vehicle_tile_width:240,vehicle_tile_height:180,gallery_card_text_x:0,gallery_card_text_y:100,site_font:null,page_loader_enabled:1,has_downloads:!1,hidden_areas:[],price_note:null,price_note_en:null},_N=["/impressum","/datenschutz","/agb"],yp="hifi-site-settings",vp="hifi-maintenance";function wp(e){try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}}function bp(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}const MN={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"};function LN(e){var n,r,s;const t=document.getElementById("ld-business");if(t)try{const i=JSON.parse(t.textContent),a=(e.phone||"").replace(/[^\d+]/g,"");a&&(i.telephone=a.startsWith("+")?a:`+49${a.replace(/^0/,"")}`),e.contact_email&&(i.email=e.contact_email),i.address={"@type":"PostalAddress",streetAddress:e.address_street||((n=i.address)==null?void 0:n.streetAddress),postalCode:e.address_zip||((r=i.address)==null?void 0:r.postalCode),addressLocality:e.address_city||((s=i.address)==null?void 0:s.addressLocality),addressCountry:"DE"};const l=e.business_hours;l&&typeof l=="object"&&(i.openingHoursSpecification=Object.entries(MN).filter(([u])=>l[u]&&!l[u].closed&&l[u].open&&l[u].close).map(([u,c])=>({"@type":"OpeningHoursSpecification",dayOfWeek:c,opens:l[u].open,closes:l[u].close}))),t.textContent=JSON.stringify(i)}catch{}}function AN(){var N;const[e]=m.useState(()=>wp(yp)),[t,n]=m.useState(()=>wp(vp)),[r,s]=m.useState(()=>e?{...Hl,...e}:Hl),[i,a]=m.useState(!!e),[l,u]=m.useState({}),[c,d]=m.useState([]),{loading:f,hasPermission:h,user:g}=Wn(),y=Qe(),b=xr(),[w,p]=m.useState(!1),[x]=m.useState(()=>new Date(Date.now()+(7*24+3)*3600*1e3+42*60*1e3).toISOString());m.useEffect(()=>{oe.get("/maintenance").then(P=>{const V={...P,_received_at:Date.now()};n(V),bp(vp,V)}).catch(()=>n(P=>P||PN)),oe.get("/site-settings").then(P=>{s({...Hl,...P}),bp(yp,P)}).catch(()=>{}).finally(()=>a(!0)),oe.get("/text-styles").then(u).catch(()=>{}),oe.get("/custom-fonts").then(d).catch(()=>{})},[]),m.useEffect(()=>{r.site_font?document.documentElement.style.setProperty("--site-font",r.site_font):document.documentElement.style.removeProperty("--site-font")},[r.site_font]),m.useEffect(()=>{i&&LN(r)},[r,i]);const v=t==null?void 0:t.countdown,k=tN(v,t==null?void 0:t._received_at),E=!!(v!=null&&v.active)&&!w&&uo(v,k)>0;if(t===null||!i||((N=t.global)!=null&&N.enabled||E)&&f)return o.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"});const C=h("maintenance.bypass"),j=_N.includes(y.pathname),S=!!g&&new URLSearchParams(y.search).get("countdown")==="vorschau";if(!j&&(E&&!g||S)){const P=S&&!(v!=null&&v.launch_at&&uo(v,k)>0)?{...v,launch_at:x}:v;return o.jsx(Fl,{serverOverrides:r.text_overrides,children:o.jsx(Ol,{children:o.jsx(iN,{countdown:P,clockOffset:P===v?k:0,settings:r,preview:S,onClosePreview:()=>b("/",{replace:!0}),onLaunch:()=>p(!0)})})})}return t.global.enabled&&!C&&!j?o.jsx(Fl,{serverOverrides:r.text_overrides,children:o.jsx(Ol,{children:o.jsx(Ci,{message:t.global.message,fullScreen:!0})})}):o.jsx(Fl,{serverOverrides:r.text_overrides,children:o.jsx(Ol,{children:o.jsx(lN,{value:{...t,bypass:C},children:o.jsx(TP,{value:r,children:o.jsx(uN,{value:l,children:o.jsx(Nv,{value:{fonts:c,refresh:()=>{}},children:o.jsxs("div",{className:"page-texture flex min-h-screen flex-col text-neutral-900 dark:text-neutral-100",children:[o.jsx(Mv,{}),C&&t.global.enabled&&o.jsx(Ti,{}),!!g&&E&&o.jsx(aN,{countdown:v}),o.jsx(BP,{}),o.jsx(AP,{}),o.jsx("main",{className:"flex-1",children:o.jsx(yN,{enabled:y.pathname!=="/"&&!!r.page_loader_enabled,children:Av(y.pathname,r.hidden_areas)?o.jsx(fr,{to:"/",replace:!0}):o.jsx(m.Suspense,{fallback:o.jsx("div",{className:"min-h-[60vh]"}),children:o.jsx(Sd,{})})})}),o.jsx(zP,{}),o.jsx(GP,{}),o.jsx(UP,{}),o.jsx(oN,{}),o.jsx(jN,{})]})})})})})})})}const zo=m.createContext({toast:{success:()=>{},error:()=>{},info:()=>{}},setDirty:()=>{},confirmLeave:()=>!0,refreshCounters:()=>{}});let DN=0;function RN({children:e,onRefreshCounters:t}){const[n,r]=m.useState([]),s=m.useRef(new Set),i=m.useCallback(f=>r(h=>h.filter(g=>g.id!==f)),[]),a=m.useCallback((f,h,g={})=>{const y=++DN;return r(b=>[...b.slice(-3),{id:y,type:f,message:h,action:g.action}]),setTimeout(()=>i(y),g.duration||(f==="error"?7e3:3500)),y},[i]),l=m.useMemo(()=>({success:(f,h)=>a("success",f,h),error:(f,h)=>a("error",f,h),info:(f,h)=>a("info",f,h)}),[a]),u=m.useCallback((f,h)=>{h?s.current.add(f):s.current.delete(f)},[]),c=m.useCallback(()=>{if(s.current.size===0)return!0;const f=window.confirm("Du hast ungespeicherte Änderungen. Seite trotzdem verlassen? Die Änderungen gehen dann verloren.");return f&&s.current.clear(),f},[]);m.useEffect(()=>{const f=g=>{s.current.size!==0&&(g.preventDefault(),g.returnValue="")},h=g=>{var w,p;if(s.current.size===0||g.defaultPrevented||g.button!==0)return;const y=(p=(w=g.target).closest)==null?void 0:p.call(w,"a[href]");if(!y||y.target==="_blank"||g.metaKey||g.ctrlKey||g.shiftKey)return;const b=new URL(y.href,window.location.href);b.origin!==window.location.origin||b.pathname===window.location.pathname||c()||(g.preventDefault(),g.stopPropagation())};return window.addEventListener("beforeunload",f),document.addEventListener("click",h,!0),()=>{window.removeEventListener("beforeunload",f),document.removeEventListener("click",h,!0)}},[c]);const d=m.useMemo(()=>({toast:l,setDirty:u,confirmLeave:c,refreshCounters:t||(()=>{})}),[l,u,c,t]);return o.jsxs(zo.Provider,{value:d,children:[e,o.jsx("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[300] flex w-[min(92vw,380px)] flex-col gap-2","aria-live":"polite",children:n.map(f=>o.jsxs("div",{role:f.type==="error"?"alert":"status",className:`pointer-events-auto flex items-start justify-between gap-3 rounded-lg border px-4 py-3 text-sm shadow-lg ${f.type==="error"?"border-red-200 bg-red-50 text-red-800 dark:border-red-900 dark:bg-red-950 dark:text-red-200":f.type==="success"?"border-green-200 bg-green-50 text-green-800 dark:border-green-900 dark:bg-green-950 dark:text-green-200":"border-neutral-200 bg-white text-neutral-800 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100"}`,children:[o.jsxs("span",{children:[f.type==="success"?"✓ ":"",f.message]}),o.jsxs("span",{className:"flex shrink-0 items-center gap-3",children:[f.action&&o.jsx("button",{type:"button",onClick:()=>{f.action.onClick(),i(f.id)},className:"font-semibold underline",children:f.action.label}),o.jsx("button",{type:"button",onClick:()=>i(f.id),"aria-label":"Meldung schließen",className:"opacity-60 hover:opacity-100",children:"✕"})]})]},f.id))})]})}function N4(){return m.useContext(zo)}function _4(){return m.useContext(zo).toast}function M4(e,t="page"){const{setDirty:n}=m.useContext(zo);m.useEffect(()=>{n(t,!!e)},[e,t,n]),m.useEffect(()=>()=>n(t,!1),[t,n])}const IN=5*60*1e3,VN=30*60*1e3;function FN(){const{user:e,login:t,verifyTwoFactor:n}=Wn(),[r,s]=m.useState(!1),[i,a]=m.useState("credentials"),[l,u]=m.useState((e==null?void 0:e.username)||""),[c,d]=m.useState(""),[f,h]=m.useState(""),[g,y]=m.useState(""),[b,w]=m.useState(""),[p,x]=m.useState(!1),v=m.useRef(Date.now()),k=m.useRef(null);if(Pi(k,r,()=>{}),m.useEffect(()=>eT(()=>s(!0)),[]),m.useEffect(()=>{const N=()=>{v.current=Date.now()},P=["keydown","pointerdown","scroll"];P.forEach(B=>window.addEventListener(B,N,{passive:!0}));const V=setInterval(()=>{document.hidden||Date.now()-v.current>VN||oe.get("/auth/me").then(B=>{(B==null?void 0:B.authenticated)===!1&&s(!0)}).catch(()=>{})},IN);return()=>{P.forEach(B=>window.removeEventListener(B,N)),clearInterval(V)}},[]),!r)return null;const E=()=>{s(!1),a("credentials"),d(""),h(""),w("")},C=async N=>{N.preventDefault(),x(!0),w("");try{const P=await t(l,c);P.requires2fa?(y(P.method==="email"?`6-stelliger Code aus der Mail an ${P.emailHint}`:"6-stelliger Code aus der App"),a("code")):E()}catch(P){w(P.message)}finally{x(!1)}},j=async N=>{N.preventDefault(),x(!0),w("");try{await n(f),E()}catch(P){w(P.message)}finally{x(!1)}},S="w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900";return o.jsx("div",{className:"fixed inset-0 z-[400] flex items-center justify-center bg-black/50 p-4",children:o.jsxs("div",{ref:k,role:"dialog","aria-modal":"true","aria-labelledby":"session-expired-title",className:"w-full max-w-sm rounded-xl bg-white p-6 shadow-xl dark:bg-neutral-900",children:[o.jsx("h2",{id:"session-expired-title",className:"mb-1 text-lg font-bold text-neutral-900 dark:text-white",children:"Bitte erneut anmelden"}),o.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Deine Sitzung ist abgelaufen. Deine Eingaben auf dieser Seite bleiben erhalten – nach dem Anmelden einfach noch einmal speichern."}),i==="credentials"?o.jsxs("form",{onSubmit:C,className:"space-y-3",children:[o.jsx("input",{value:l,onChange:N=>u(N.target.value),required:!0,placeholder:"Benutzername oder E-Mail",autoComplete:"username",className:S}),o.jsx("input",{type:"password",value:c,onChange:N=>d(N.target.value),required:!0,placeholder:"Passwort",autoComplete:"current-password",className:S}),b&&o.jsx("p",{className:"text-sm text-red-600",children:b}),o.jsx("button",{type:"submit",disabled:p,className:"w-full rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:p?"Melde an…":"Anmelden"})]}):o.jsxs("form",{onSubmit:j,className:"space-y-3",children:[o.jsx("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:g}),o.jsx("input",{value:f,onChange:N=>h(N.target.value),required:!0,inputMode:"numeric",autoComplete:"one-time-code",placeholder:"123456",className:S}),b&&o.jsx("p",{className:"text-sm text-red-600",children:b}),o.jsx("button",{type:"submit",disabled:p,className:"w-full rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:p?"Prüfe…":"Bestätigen"})]})]})})}const _e=(...e)=>e.filter(Boolean).join(" "),Bo="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/60 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-neutral-950",ON={primary:"bg-brand-500 text-white shadow-sm hover:bg-brand-600 active:bg-brand-700",secondary:"border border-neutral-300 bg-white text-neutral-700 shadow-sm hover:bg-neutral-50 hover:border-neutral-400 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-200 dark:hover:bg-neutral-800",danger:"bg-red-600 text-white shadow-sm hover:bg-red-700",ghost:"text-neutral-600 hover:bg-neutral-100 hover:text-neutral-900 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:hover:text-white"},zN={sm:"h-8 gap-1.5 px-3 text-sm",md:"h-10 gap-2 px-4 text-sm"};function kc({variant:e="primary",size:t="md",className:n}={}){return _e("inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-lg font-semibold transition disabled:cursor-not-allowed disabled:opacity-50",Bo,ON[e],zN[t],n)}function L4({variant:e,size:t,className:n,icon:r,children:s,to:i,href:a,type:l="button",...u}){const c=kc({variant:e,size:t,className:n}),d=o.jsxs(o.Fragment,{children:[r&&o.jsx(Be,{name:r,className:"h-4 w-4"}),s]});return i?o.jsx(G,{to:i,className:c,...u,children:d}):a?o.jsx("a",{href:a,className:c,...u,children:d}):o.jsx("button",{type:l,className:c,...u,children:d})}const BN={default:"text-neutral-500 hover:bg-neutral-100 hover:text-neutral-900 dark:text-neutral-400 dark:hover:bg-neutral-800 dark:hover:text-white",danger:"text-neutral-400 hover:bg-red-50 hover:text-red-600 dark:text-neutral-500 dark:hover:bg-red-950/50 dark:hover:text-red-400"};function $N({icon:e,label:t,tone:n="default",className:r,to:s,href:i,...a}){const l=_e("inline-flex h-8 w-8 items-center justify-center rounded-lg transition",Bo,BN[n],r),u=o.jsx(Be,{name:e,className:"h-[18px] w-[18px]"});return s?o.jsx(G,{to:s,className:l,title:t,"aria-label":t,...a,children:u}):i?o.jsx("a",{href:i,className:l,title:t,"aria-label":t,...a,children:u}):o.jsx("button",{type:"button",className:l,title:t,"aria-label":t,...a,children:u})}const df=_e("block w-full rounded-lg border border-neutral-300 bg-white px-3 text-sm text-neutral-900 shadow-sm transition placeholder:text-neutral-400","focus:border-brand-500 focus:outline-none focus:ring-2 focus:ring-brand-500/25","disabled:cursor-not-allowed disabled:bg-neutral-50 disabled:text-neutral-500","dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 dark:placeholder:text-neutral-500 dark:disabled:bg-neutral-800"),A4=m.forwardRef(function({className:t,...n},r){return o.jsx("input",{ref:r,className:_e(df,"h-10",t),...n})}),D4=m.forwardRef(function({className:t,rows:n=4,...r},s){return o.jsx("textarea",{ref:s,rows:n,className:_e(df,"py-2",t),...r})}),R4=m.forwardRef(function({className:t,children:n,...r},s){return o.jsx("select",{ref:s,className:_e(df,"h-10 pr-8",t),...r,children:n})});function I4({label:e,hint:t,error:n,required:r,children:s,className:i}){const a=m.useId(),l=typeof s=="function"?s(a):s;return o.jsxs("div",{className:i,children:[e&&o.jsxs("label",{htmlFor:a,className:"mb-1.5 block text-sm font-medium text-neutral-800 dark:text-neutral-200",children:[e,r&&o.jsx("span",{className:"ml-0.5 text-brand-600 dark:text-brand-400",children:"*"})]}),m.isValidElement(l)&&!l.props.id?m.cloneElement(l,{id:a}):l,n?o.jsx("p",{className:"mt-1.5 text-xs font-medium text-red-600 dark:text-red-400",children:n}):t&&o.jsx("p",{className:"mt-1.5 text-xs text-neutral-500 dark:text-neutral-400",children:t})]})}function V4({checked:e,indeterminate:t=!1,onChange:n,label:r,disabled:s,className:i}){const a=m.useRef(null);return m.useEffect(()=>{a.current&&(a.current.indeterminate=!!t&&!e)},[t,e]),o.jsx("input",{ref:a,type:"checkbox",checked:!!e,disabled:s,"aria-label":r,onChange:l=>n==null?void 0:n(l.target.checked),onClick:l=>l.stopPropagation(),className:_e("h-4 w-4 shrink-0 cursor-pointer accent-brand-500 disabled:cursor-not-allowed disabled:opacity-50",i)})}function F4({checked:e,onChange:t,label:n,description:r,disabled:s,className:i}){const a=m.useId();return o.jsxs("div",{className:_e("flex items-center justify-between gap-4",i),children:[(n||r)&&o.jsxs("label",{htmlFor:a,className:"min-w-0 cursor-pointer",children:[n&&o.jsx("span",{className:"block text-sm font-medium text-neutral-800 dark:text-neutral-100",children:n}),r&&o.jsx("span",{className:"block text-xs text-neutral-500 dark:text-neutral-400",children:r})]}),o.jsx("button",{id:a,type:"button",role:"switch","aria-checked":!!e,disabled:s,onClick:()=>t==null?void 0:t(!e),className:_e("relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition disabled:opacity-50",Bo,e?"bg-brand-500":"bg-neutral-300 dark:bg-neutral-700"),children:o.jsx("span",{className:_e("inline-block h-5 w-5 rounded-full bg-white shadow transition",e?"translate-x-[22px]":"translate-x-0.5")})})]})}function O4({title:e,description:t,actions:n,children:r,className:s,padded:i=!0}){return o.jsxs("section",{className:_e("rounded-xl border border-neutral-200/80 bg-white shadow-sm shadow-neutral-900/[0.03] dark:border-neutral-800 dark:bg-neutral-900 dark:shadow-none",i&&"p-5 sm:p-6",s),children:[(e||n)&&o.jsxs("div",{className:_e("flex flex-wrap items-start justify-between gap-3",(t||r)&&"mb-4"),children:[o.jsxs("div",{className:"min-w-0",children:[e&&o.jsx("h2",{className:"text-base font-semibold text-neutral-900 dark:text-white",children:e}),t&&o.jsx("p",{className:"mt-0.5 text-sm text-neutral-500 dark:text-neutral-400",children:t})]}),n&&o.jsx("div",{className:"flex shrink-0 flex-wrap gap-2",children:n})]}),r]})}function z4({title:e,description:t,actions:n,className:r}){return o.jsxs("div",{className:_e("mb-6 flex flex-wrap items-end justify-between gap-4",r),children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("h1",{className:"text-2xl font-bold tracking-tight text-neutral-900 dark:text-white",children:e}),t&&o.jsx("p",{className:"mt-1 max-w-2xl text-sm text-neutral-500 dark:text-neutral-400",children:t})]}),n&&o.jsx("div",{className:"flex flex-wrap items-center gap-2",children:n})]})}const HN={neutral:"bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300",brand:"bg-brand-100 text-brand-800 dark:bg-brand-900/50 dark:text-brand-300",amber:"bg-amber-100 text-amber-800 dark:bg-amber-900/40 dark:text-amber-300",red:"bg-red-500 text-white"};function B4({tone:e="neutral",children:t,className:n}){return o.jsx("span",{className:_e("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-semibold",HN[e],n),children:t})}function $4({icon:e="inbox",title:t,description:n,actions:r}){return o.jsxs("div",{className:"flex flex-col items-center px-6 py-12 text-center",children:[o.jsx("span",{className:"mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-brand-50 text-brand-600 dark:bg-brand-900/30 dark:text-brand-400",children:o.jsx(Be,{name:e,className:"h-6 w-6"})}),o.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:t}),n&&o.jsx("p",{className:"mt-1 max-w-sm text-sm text-neutral-500 dark:text-neutral-400",children:n}),r&&o.jsx("div",{className:"mt-4 flex flex-wrap justify-center gap-2",children:r})]})}const UN={md:"max-w-md",lg:"max-w-xl",xl:"max-w-3xl"};function H4({open:e,onClose:t,title:n,description:r,headerExtra:s,children:i,footer:a,size:l="md",as:u="div",...c}){const d=m.useRef(null);return Pi(d,e,t),e?o.jsxs("div",{className:"fixed inset-0 z-50",children:[o.jsx("div",{className:"absolute inset-0 bg-neutral-950/40 backdrop-blur-[2px]",onClick:t}),o.jsxs(u,{ref:d,role:"dialog","aria-modal":"true","aria-label":n,className:_e("absolute inset-y-0 right-0 flex w-full flex-col bg-white shadow-2xl dark:bg-neutral-900",UN[l]),...c,children:[o.jsxs("div",{className:"flex items-start justify-between gap-4 border-b border-neutral-200 px-6 py-5 dark:border-neutral-800",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("h2",{className:"text-lg font-semibold text-neutral-900 dark:text-white",children:n}),r&&o.jsx("p",{className:"mt-0.5 text-sm text-neutral-500 dark:text-neutral-400",children:r})]}),s&&o.jsx("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:s}),o.jsx($N,{icon:"close",label:"Schließen",onClick:t,className:"-mr-2 -mt-1"})]}),o.jsx("div",{className:"flex-1 space-y-5 overflow-y-auto px-6 py-6",children:i}),a&&o.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-neutral-200 bg-neutral-50 px-6 py-4 dark:border-neutral-800 dark:bg-neutral-900/60",children:a})]})]}):null}function U4({file:e,onChange:t,accept:n,hint:r,current:s,disabled:i}){const a=m.useId(),[l,u]=m.useState(!1),c=f=>!i&&f&&t(f),d=f=>f>=1048576?`${(f/1048576).toFixed(1).replace(".",",")} MB`:`${Math.max(1,Math.round(f/1024))} KB`;return o.jsxs("label",{htmlFor:a,onDragOver:f=>{f.preventDefault(),u(!0)},onDragLeave:()=>u(!1),onDrop:f=>{var h;f.preventDefault(),u(!1),c((h=f.dataTransfer.files)==null?void 0:h[0])},className:_e("flex cursor-pointer flex-col items-center justify-center gap-1.5 rounded-xl border-2 border-dashed px-4 py-6 text-center transition",l?"border-brand-500 bg-brand-50 dark:bg-brand-900/20":"border-neutral-300 hover:border-brand-400 hover:bg-neutral-50 dark:border-neutral-700 dark:hover:bg-neutral-800/50",i&&"pointer-events-none opacity-60"),children:[o.jsx("input",{id:a,type:"file",accept:n,className:"sr-only",disabled:i,onChange:f=>{var h;return c((h=f.target.files)==null?void 0:h[0])}}),o.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-brand-50 text-brand-600 dark:bg-brand-900/30 dark:text-brand-400",children:o.jsx(Be,{name:e?"file":"download",className:_e("h-5 w-5",!e&&"rotate-180")})}),e?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"max-w-full truncate text-sm font-semibold text-neutral-900 dark:text-white",children:e.name}),o.jsxs("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:[d(e.size)," · Klicken, um eine andere Datei zu wählen"]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("span",{className:"text-sm font-semibold text-neutral-800 dark:text-neutral-100",children:["Datei hierher ziehen oder ",o.jsx("span",{className:"text-brand-600 dark:text-brand-400",children:"auswählen"})]}),s&&o.jsxs("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:["Aktuell: ",s]}),r&&o.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}function W4({value:e,onChange:t,options:n,size:r="md",className:s}){return o.jsx("div",{role:"radiogroup",className:_e("inline-flex rounded-lg bg-neutral-100 p-1 dark:bg-neutral-800",s),children:n.map(i=>o.jsx("button",{type:"button",role:"radio","aria-checked":e===i.value,onClick:()=>t(i.value),className:_e("rounded-md font-medium transition",Bo,r==="sm"?"px-2.5 py-1 text-xs":"px-3 py-1.5 text-sm",e===i.value?"bg-white text-neutral-900 shadow-sm dark:bg-neutral-950 dark:text-white":"text-neutral-500 hover:text-neutral-800 dark:text-neutral-400 dark:hover:text-neutral-200"),children:i.label},i.value))})}const WN={home:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9",tag:"M4 4h7l9 9-7 7-9-9V4Zm3.5 3.5h.01",car:"M3 13.5 4.5 9A2 2 0 0 1 6.4 7.5h11.2A2 2 0 0 1 19.5 9L21 13.5M3 13.5v4a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1h12v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-4M3 13.5h18M6.5 16.5h.01M17.5 16.5h.01",box:"M12 3 4 7.5v9L12 21l8-4.5v-9L12 3Zm0 9 8-4.5M12 12v9M12 12 4 7.5",mail:"M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Zm0 0 8 7 8-7",users:"M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-7 9v-1a6 6 0 0 1 12 0v1M16 3.5a4 4 0 0 1 0 7.5M22 20v-1a6 6 0 0 0-4-5.6",user:"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-7 8a7 7 0 0 1 14 0",shield:"M12 3 4 6v6c0 4.5 3.4 7.7 8 9 4.6-1.3 8-4.5 8-9V6l-8-3Zm-1.5 9.5 4-4 1 1-5 5-2.5-2.5 1-1 1.5 1.5Z",key:"M15 7a3 3 0 1 1 0 .01M21 3l-6.5 6.5M8.5 13.5a5 5 0 1 0 2 2L21 5M17 7l2 2",lock:"M6 10V8a6 6 0 1 1 12 0v2m-13 0h14a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1Zm7 5v2",briefcase:"M4 7h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1Zm4 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M3 12h18",image:"M4 5h16a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm2 12 4.5-5.5L14 16l2.5-3L20 17H6ZM8 9.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z",images:"M7 3h13a1 1 0 0 1 1 1v11M3 7h13a1 1 0 0 1 1 1v12H4a1 1 0 0 1-1-1V7Zm2 11 3.5-4 2.5 3 2-2 3 3",camera:"M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Zm8 9a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z",help:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-5.5v.01M9.5 9.25a2.5 2.5 0 1 1 3.5 2.29c-.7.32-1 .77-1 1.46v.3",download:"M12 4v11m0 0-4-4m4 4 4-4M5 19h14",transfer:"M7 4v13m0 0-3-3m3 3 3-3M17 20V7m0 0-3 3m3-3 3 3",gauge:"M4 13a8 8 0 1 1 16 0M12 13l3.5-3.5M6 17h12",inbox:"M3 13h5l1.5 2.5h5L16 13h5M5 5h14l2 8v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-5l2-8Z",building:"M4 21V5a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v16M15 9h4a1 1 0 0 1 1 1v11M3 21h18M8 8h3M8 12h3M8 16h3",palette:"M12 3a9 9 0 1 0 0 18c1 0 1.5-.7 1.5-1.5 0-.4-.2-.8-.4-1.1-.3-.3-.4-.7-.4-1.1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-7.8-9-7.8ZM7.5 12h.01M10 7.5h.01M15 7.5h.01",file:"M7 3h7l5 5v12a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm7 0v5h5M9 13h6M9 17h6",server:"M4 4h16v6H4V4Zm0 10h16v6H4v-6Zm3-7h.01M7 17h.01",link:"M10 13a5 5 0 0 0 7.07 0l3-3a5 5 0 0 0-7.07-7.07l-1.5 1.5M14 11a5 5 0 0 0-7.07 0l-3 3a5 5 0 0 0 7.07 7.07l1.5-1.5",globe:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-9-9h18M12 3c2.5 2.5 3.5 5.5 3.5 9s-1 6.5-3.5 9c-2.5-2.5-3.5-5.5-3.5-9s1-6.5 3.5-9Z",send:"M4 12 20 4l-4 16-4-7-8-1Zm8 1 8-9",refresh:"M20 11a8 8 0 0 0-14.9-3M4 4v4h4m-4 5a8 8 0 0 0 14.9 3M20 20v-4h-4",trash:"M5 7h14M10 11v6m4-6v6M6 7l1 13h10l1-13M9 7V4h6v3",external:"M14 4h6v6m0-6-9 9M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5",pause:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-2-12v6m4-6v6",timer:"M10 2h4M12 14l3-3M12 22a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",pencil:"M4 20h4L19 9l-4-4L4 16v4Zm9-13 4 4",eye:"M2.5 12S6 5 12 5s9.5 7 9.5 7-3.5 7-9.5 7-9.5-7-9.5-7Zm9.5 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",plus:"M12 5v14M5 12h14",search:"M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-2 4 4",chevron:"m9 6 6 6-6 6",menu:"M4 6h16M4 12h16M4 18h16",close:"M6 6l12 12M18 6 6 18",logout:"M15 4h3a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3M10 8l-4 4 4 4M6 12h10",sun:"M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0-13v2m0 14v2M3 12h2m14 0h2M5.6 5.6 7 7m10 10 1.4 1.4M5.6 18.4 7 17M17 7l1.4-1.4",moon:"M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5Z",wand:"M5 19 15 9m2-6v2m0 4v2m-3-5h2m4 0h2M4 20l1-1",template:"M4 4h16v5H4V4Zm0 9h7v7H4v-7Zm11 0h5v7h-5v-7Z",copy:"M8 8h11a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Zm-4 8V4a1 1 0 0 1 1-1h12",eyeOff:"M3 3l18 18M10.6 5.1A10 10 0 0 1 12 5c6 0 9.5 7 9.5 7a17 17 0 0 1-3 3.9M6.6 6.6A17 17 0 0 0 2.5 12S6 19 12 19a9.6 9.6 0 0 0 4.4-1.1M9.9 9.9a3 3 0 0 0 4.2 4.2",play:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-2-12.5v7l6-3.5-6-3.5Z",list:"M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01",grip:"M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01",check:"M5 12.5l4.5 4.5L19 7.5",chart:"M4 4v15a1 1 0 0 0 1 1h15M8 15l3.5-4 3 2.5L20 7"};function Be({name:e,className:t="h-5 w-5"}){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",className:_e("shrink-0",t),"aria-hidden":"true",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:WN[e]||""})})}const Dv=e=>String(e||"").toLowerCase().replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ü/g,"ue").replace(/ß/g,"ss").normalize("NFD").replace(/[̀-ͯ]/g,""),kp=(e,t)=>{const n=Dv(`${e.label} ${e.group||""} ${e.keywords||""}`);return t.every(r=>n.includes(r))};function GN({open:e,onClose:t,pages:n}){const r=xr(),{hasPermission:s}=Wn(),i=m.useRef(null),a=m.useRef(null),[l,u]=m.useState(""),[c,d]=m.useState(0),[f,h]=m.useState(null);Pi(i,e,t),m.useEffect(()=>{e&&(u(""),d(0),f===null&&(s("packages.manage")||s("models.manage"))&&oe.get("/models").then(w=>h(w)).catch(()=>h([])))},[e]);const g=m.useMemo(()=>{const w=Dv(l).split(/\s+/).filter(Boolean),p=n.map(v=>({...v,kind:"page"}));if(w.length===0)return p.slice(0,8);const x=(f||[]).map(v=>({key:`model-${v.id}`,kind:"model",icon:"car",label:`${v.brand_name||""} ${v.name}`.trim(),group:s("packages.manage")?"Pakete bearbeiten":"Modelle",to:s("packages.manage")?`/admin/packages?model=${v.id}`:"/admin/models"}));return[...p.filter(v=>kp(v,w)),...x.filter(v=>kp(v,w)).slice(0,8)]},[l,n,f,s]);if(m.useEffect(()=>{d(0)},[l]),m.useEffect(()=>{var w,p;(p=(w=a.current)==null?void 0:w.querySelector('[data-active="true"]'))==null||p.scrollIntoView({block:"nearest"})},[c]),!e)return null;const y=w=>{t(),w.href?window.open(w.href,"_blank","noopener"):r(w.to)},b=w=>{w.key==="ArrowDown"?(w.preventDefault(),d(p=>Math.min(p+1,g.length-1))):w.key==="ArrowUp"?(w.preventDefault(),d(p=>Math.max(p-1,0))):w.key==="Enter"&&g[c]&&(w.preventDefault(),y(g[c]))};return o.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-neutral-950/40 px-4 pt-[12vh] backdrop-blur-sm",onMouseDown:t,children:o.jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-label":"Schnellsuche",onMouseDown:w=>w.stopPropagation(),className:"w-full max-w-xl overflow-hidden rounded-2xl border border-neutral-200 bg-white shadow-2xl dark:border-neutral-800 dark:bg-neutral-900",children:[o.jsxs("div",{className:"flex items-center gap-3 border-b border-neutral-200 px-4 dark:border-neutral-800",children:[o.jsx(Be,{name:"search",className:"h-5 w-5 text-neutral-400"}),o.jsx("input",{value:l,onChange:w=>u(w.target.value),onKeyDown:b,placeholder:"Seite oder Fahrzeug suchen …",className:"h-14 flex-1 bg-transparent text-base text-neutral-900 placeholder:text-neutral-400 focus:outline-none dark:text-white"}),o.jsx("kbd",{className:"hidden rounded border border-neutral-200 px-1.5 py-0.5 text-[11px] font-medium text-neutral-400 dark:border-neutral-700 sm:block",children:"Esc"})]}),o.jsxs("ul",{ref:a,className:"max-h-[50vh] overflow-y-auto p-2",children:[g.length===0&&o.jsxs("li",{className:"px-3 py-8 text-center text-sm text-neutral-500 dark:text-neutral-400",children:["Nichts gefunden für „",l,"“."]}),g.map((w,p)=>o.jsx("li",{children:o.jsxs("button",{type:"button","data-active":p===c,onMouseMove:()=>d(p),onClick:()=>y(w),className:`flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left text-sm ${p===c?"bg-brand-50 text-brand-800 dark:bg-brand-900/30 dark:text-brand-200":"text-neutral-700 dark:text-neutral-200"}`,children:[o.jsx(Be,{name:w.icon,className:"h-[18px] w-[18px] opacity-70"}),o.jsx("span",{className:"flex-1 truncate font-medium",children:w.label}),w.group&&o.jsx("span",{className:"shrink-0 text-xs text-neutral-400",children:w.group})]})},w.key||w.to))]}),o.jsxs("div",{className:"flex items-center gap-4 border-t border-neutral-200 px-4 py-2 text-[11px] text-neutral-400 dark:border-neutral-800",children:[o.jsx("span",{children:"↑ ↓ auswählen"}),o.jsx("span",{children:"↵ öffnen"})]})]})})}const KN="/assets/logo-BNfZDkmN.png",Rv="hifi-admin-nav-collapsed",Sp={system:!0};function qN(){try{return{...Sp,...JSON.parse(localStorage.getItem(Rv)||"{}")}}catch{return Sp}}const jp=(e,t)=>t.end?e===t.to:e===t.to||e.startsWith(`${t.to}/`);function YN({user:e,onLogout:t}){const[n,r]=m.useState(!1),s=m.useRef(null),{theme:i,toggleTheme:a}=ov(),l=(e==null?void 0:e.username)||"",u=l.slice(0,2).toUpperCase();m.useEffect(()=>{if(!n)return;const d=h=>{var g;return!((g=s.current)!=null&&g.contains(h.target))&&r(!1)},f=h=>h.key==="Escape"&&r(!1);return document.addEventListener("mousedown",d),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",f)}},[n]);const c="flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm text-neutral-700 hover:bg-neutral-100 dark:text-neutral-200 dark:hover:bg-neutral-800";return o.jsxs("div",{ref:s,className:"relative",children:[o.jsx("button",{type:"button",onClick:()=>r(d=>!d),"aria-haspopup":"menu","aria-expanded":n,title:`Angemeldet als ${l}`,className:"flex h-9 w-9 items-center justify-center rounded-full bg-brand-500 text-xs font-bold text-white ring-2 ring-white transition hover:bg-brand-600 focus-visible:outline-none focus-visible:ring-brand-500/60 dark:ring-neutral-950",children:u}),n&&o.jsxs("div",{role:"menu",className:"absolute right-0 top-11 z-40 w-60 rounded-xl border border-neutral-200 bg-white p-1.5 shadow-xl dark:border-neutral-800 dark:bg-neutral-900",children:[o.jsxs("div",{className:"px-3 pb-2 pt-1.5",children:[o.jsx("p",{className:"truncate text-sm font-semibold text-neutral-900 dark:text-white",children:l}),o.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:e!=null&&e.is_super_admin?"Super-Admin":"Admin"})]}),o.jsx("div",{className:"my-1 border-t border-neutral-100 dark:border-neutral-800"}),o.jsxs(G,{to:"/admin/account",role:"menuitem",onClick:()=>r(!1),className:c,children:[o.jsx(Be,{name:"user",className:"h-4 w-4"})," Mein Konto"]}),o.jsxs("button",{type:"button",role:"menuitem",onClick:a,className:c,children:[o.jsx(Be,{name:i==="dark"?"sun":"moon",className:"h-4 w-4"}),i==="dark"?"Helles Design":"Dunkles Design"]}),o.jsx("div",{className:"my-1 border-t border-neutral-100 dark:border-neutral-800"}),o.jsxs("button",{type:"button",role:"menuitem",onClick:t,className:`${c} text-red-600 dark:text-red-400`,children:[o.jsx(Be,{name:"logout",className:"h-4 w-4"})," Abmelden"]})]})]})}function XN(){const{logout:e,user:t,hasPermission:n}=Wn(),r=xr(),{pathname:s}=Qe(),[i,a]=m.useState(!1),[l,u]=m.useState(!1),[c,d]=m.useState(qN),[f,h]=m.useState(0),[g,y]=m.useState([]),b=m.useRef(null),[w,p]=m.useState([]),[x,v]=m.useState(!1),[k,E]=m.useState(null);Pi(b,i,()=>a(!1));const C=m.useCallback(()=>{n("contact.manage")&&oe.get("/contact").then(I=>h(I.filter(T=>T.status==="new").length)).catch(()=>{}),oe.get("/site-settings").then(I=>p(I.hidden_areas||[])).catch(()=>{}),oe.get("/maintenance").then(I=>{var T,M;v(!!((T=I==null?void 0:I.global)!=null&&T.enabled)),E((M=I==null?void 0:I.countdown)!=null&&M.active?I.countdown.launch_at:null)}).catch(()=>{})},[t==null?void 0:t.id]);m.useEffect(()=>{C();const I=setInterval(C,2*60*1e3);return()=>clearInterval(I)},[C]),m.useEffect(()=>{const I=T=>{(T.ctrlKey||T.metaKey)&&T.key.toLowerCase()==="k"&&(T.preventDefault(),u(!0))};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[]),m.useEffect(()=>{a(!1)},[s]);const j=TN.filter(I=>w.includes(I.key)).map(I=>I.label),S=()=>oe.get("/custom-fonts").then(y).catch(()=>{});m.useEffect(()=>{S()},[]);const N=m.useMemo(()=>[{id:"main",title:null,links:[{to:"/admin",label:"Übersicht",icon:"gauge",end:!0,keywords:"dashboard start"},{to:"/admin/traffic",label:"Besucher",icon:"chart",permission:"system.admin",keywords:"statistik analytics traffic zugriffe trend"},{to:"/admin/contact-requests",label:"Anfragen",icon:"inbox",permission:"contact.manage",badge:f,keywords:"kontakt kunden nachrichten"}]},{id:"vehicles",title:"Fahrzeuge & Pakete",links:[{to:"/admin/brands",label:"Fahrzeugmarken",icon:"tag",permission:"brands.manage",keywords:"hersteller vorlage"},{to:"/admin/models",label:"Modelle",icon:"car",permission:"models.manage",keywords:"fahrzeuge"},{to:"/admin/packages",label:"Pakete",icon:"box",permission:"packages.manage",keywords:"preise produkte upgrades"}]},{id:"content",title:"Website-Inhalte",links:[{to:"/admin/home-sections",label:"Startseite",icon:"home",permission:"content.manage",keywords:"titelbild texte"},{to:"/admin/services",label:"Leistungen",icon:"briefcase",permission:"services.manage"},{to:"/admin/faqs",label:"FAQ",icon:"help",permission:"content.manage",keywords:"fragen"},{to:"/admin/partners",label:"Partner-Logos",icon:"shield",permission:"content.manage"},{to:"/admin/downloads",label:"Downloads",icon:"download",permission:"downloads.manage",keywords:"dateien pdf"}]},{id:"gallery",title:"Bildergalerie",links:[{to:"/admin/gallery-brands",label:"Galerie-Marken",icon:"images",permission:"gallery.manage"},{to:"/admin/gallery-projects",label:"Projekte & Fotos",icon:"camera",permission:"gallery.manage",keywords:"bilder hochladen"}]},{id:"company",title:"Firma & Aussehen",links:[{to:"/admin/settings/company",label:"Firmendaten",icon:"building",permission:"settings.manage",keywords:"oeffnungszeiten telefon adresse whatsapp email preis hinweis"},{to:"/admin/settings/design",label:"Aussehen",icon:"palette",permission:"settings.manage",keywords:"schrift farben kacheln"},{to:"/admin/settings/images",label:"Bilder",icon:"image",permission:"settings.manage",keywords:"logo favicon hintergrund"},{to:"/admin/settings/legal",label:"Rechtstexte",icon:"file",permission:"settings.manage",keywords:"impressum datenschutz agb"},{to:"/admin/settings/maintenance",label:"Wartungsmodus",icon:"pause",permission:"settings.manage",keywords:"wartung offline"},{to:"/admin/settings/countdown",label:"Launch-Countdown",icon:"timer",permission:"settings.manage",keywords:"start eroeffnung"}]},{id:"system",title:"System (Experten)",links:[{to:"/admin/users",label:"Benutzer",icon:"users",permission:"users.manage",keywords:"mitarbeiter konten"},{to:"/admin/permission-groups",label:"Berechtigungsgruppen",icon:"key",permission:"permission_groups.manage",keywords:"rechte rollen"},{to:"/admin/settings/email",label:"E-Mail-Versand",icon:"send",permission:"system.admin",keywords:"smtp mail"},{to:"/admin/settings/google",label:"Google-Dienste",icon:"globe",permission:"system.admin",keywords:"analytics rezensionen bewertungen"},{to:"/admin/settings/ai-images",label:"KI-Modellbilder",icon:"wand",permission:"system.admin",keywords:"higgsfield ki bilder generieren"},{to:"/admin/settings/connections",label:"Verbindungstest",icon:"link",permission:"system.admin"},{to:"/admin/settings/database",label:"Datenbank",icon:"server",permission:"system.admin"},{to:"/admin/settings/export-import",label:"Export & Import",icon:"transfer",permission:"system.admin",keywords:"sicherung backup"},{to:"/admin/settings/update",label:"Updates",icon:"refresh",permission:"system.update",keywords:"git version"},{to:"/admin/settings/reset",label:"Zurücksetzen",icon:"trash",permission:"system.admin",keywords:"loeschen"}]}].map(I=>({...I,links:I.links.filter(T=>!T.permission||n(T.permission))})).filter(I=>I.links.length>0),[t==null?void 0:t.id,f]),P=m.useMemo(()=>[...N.flatMap(I=>I.links.map(T=>({...T,group:I.title}))),{to:"/admin/account",label:"Mein Konto",icon:"user",keywords:"passwort 2fa profil"}],[N]),V=P.filter(I=>jp(s,I)).sort((I,T)=>T.to.length-I.to.length)[0],B=I=>{d(T=>{const M={...T,[I]:!T[I]};try{localStorage.setItem(Rv,JSON.stringify(M))}catch{}return M})},se=async()=>{await e(),r("/admin/login")},ne=["content.manage","services.manage","packages.manage","gallery.manage","settings.manage"].some(n),q=({isActive:I})=>`group relative flex items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm transition ${I?"bg-brand-50 font-semibold text-brand-800 before:absolute before:inset-y-1.5 before:left-0 before:w-[3px] before:rounded-full before:bg-brand-500 dark:bg-brand-500/10 dark:text-brand-300":"font-medium text-neutral-600 hover:bg-neutral-100 hover:text-neutral-900 dark:text-neutral-400 dark:hover:bg-neutral-800/70 dark:hover:text-neutral-100"}`,W=o.jsxs("div",{className:"flex h-full flex-col",children:[o.jsxs("div",{className:"flex items-center gap-2 px-5 pb-4 pt-5",children:[o.jsxs(G,{to:"/admin",className:"rounded-lg",children:[o.jsx("img",{src:KN,alt:"HifiPlanet",className:"h-7 w-auto dark:hidden"}),o.jsx("img",{src:af,alt:"HifiPlanet",className:"hidden h-7 w-auto dark:block"})]}),o.jsx("span",{className:"rounded-md bg-neutral-100 px-1.5 py-0.5 text-[11px] font-semibold uppercase tracking-wide text-neutral-500 dark:bg-neutral-800 dark:text-neutral-400",children:"Admin"})]}),o.jsx("div",{className:"px-3 pb-3",children:o.jsxs("button",{type:"button",onClick:()=>u(!0),className:"flex h-9 w-full items-center gap-2 rounded-lg border border-neutral-200 bg-white px-3 text-sm text-neutral-400 shadow-sm transition hover:border-neutral-300 hover:text-neutral-600 dark:border-neutral-800 dark:bg-neutral-900 dark:hover:border-neutral-700 dark:hover:text-neutral-300",children:[o.jsx(Be,{name:"search",className:"h-4 w-4"}),o.jsx("span",{className:"flex-1 text-left",children:"Suchen …"}),o.jsx("kbd",{className:"hidden rounded border border-neutral-200 px-1 text-[10px] font-medium dark:border-neutral-700 lg:block",children:"Strg K"})]})}),o.jsx("nav",{className:"flex-1 space-y-4 overflow-y-auto px-3 pb-6",children:N.map(I=>{const T=I.links.some(D=>jp(s,D)),M=I.title&&c[I.id]&&!T,L=I.links.reduce((D,H)=>D+(H.badge||0),0);return o.jsxs("div",{children:[I.title&&o.jsxs("button",{type:"button",onClick:()=>B(I.id),"aria-expanded":!M,className:"mb-1 flex w-full items-center justify-between rounded-md px-3 py-1 text-[11px] font-semibold uppercase tracking-wider text-neutral-400 hover:text-neutral-600 dark:text-neutral-500 dark:hover:text-neutral-300",children:[o.jsx("span",{children:I.title}),o.jsxs("span",{className:"flex items-center gap-1.5",children:[M&&L>0&&o.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"}),o.jsx(Be,{name:"chevron",className:`h-3.5 w-3.5 transition-transform ${M?"":"rotate-90"}`})]})]}),!M&&o.jsx("div",{className:"space-y-0.5",children:I.links.map(D=>o.jsxs(gk,{to:D.to,end:D.end,className:q,children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-3",children:[o.jsx(Be,{name:D.icon,className:"h-[18px] w-[18px] opacity-80"}),o.jsx("span",{className:"truncate",children:D.label})]}),!!D.badge&&o.jsx("span",{className:"min-w-[20px] rounded-full bg-red-500 px-1.5 py-0.5 text-center text-[11px] font-bold leading-none text-white",children:D.badge})]},D.to))})]},I.id)})})]});return o.jsxs(RN,{onRefreshCounters:C,children:[o.jsx(FN,{}),o.jsxs(Nv,{value:{fonts:g,refresh:S},children:[o.jsxs("div",{className:"flex min-h-screen bg-neutral-100/60 text-neutral-900 dark:bg-neutral-950 dark:text-neutral-100",children:[o.jsx(Mv,{}),o.jsx("aside",{className:"sticky top-0 hidden h-screen w-64 shrink-0 border-r border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900/40 lg:block",children:W}),i&&o.jsxs("div",{className:"fixed inset-0 z-40 lg:hidden",children:[o.jsx("div",{className:"absolute inset-0 bg-neutral-950/50 backdrop-blur-sm",onClick:()=>a(!1)}),o.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-label":"Menü",className:"absolute inset-y-0 left-0 w-72 max-w-[85vw] bg-white shadow-2xl dark:bg-neutral-900",children:[o.jsx("button",{type:"button",onClick:()=>a(!1),"aria-label":"Menü schließen",className:"absolute right-3 top-4 rounded-lg p-1.5 text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",children:o.jsx(Be,{name:"close",className:"h-5 w-5"})}),W]})]}),o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx("header",{className:"sticky top-0 z-30 border-b border-neutral-200 bg-white/85 backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/85",children:o.jsxs("div",{className:"flex h-16 items-center gap-3 px-4 sm:px-6",children:[o.jsx("button",{type:"button",onClick:()=>a(!0),"aria-label":"Menü öffnen",className:"-ml-1 rounded-lg p-2 text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800 lg:hidden",children:o.jsx(Be,{name:"menu",className:"h-6 w-6"})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[(V==null?void 0:V.group)&&o.jsx("p",{className:"hidden truncate text-xs font-medium text-neutral-400 sm:block",children:V.group}),o.jsx("p",{className:"truncate text-sm font-semibold text-neutral-900 dark:text-white",children:(V==null?void 0:V.label)||"Admin"})]}),o.jsx("button",{type:"button",onClick:()=>u(!0),"aria-label":"Suchen",className:"rounded-lg p-2 text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800 lg:hidden",children:o.jsx(Be,{name:"search",className:"h-5 w-5"})}),ne&&o.jsxs("a",{href:"/?bearbeiten=1",target:"_blank",rel:"noopener noreferrer",className:kc({variant:"secondary",size:"sm",className:"hidden sm:inline-flex"}),children:[o.jsx(Be,{name:"pencil",className:"h-4 w-4"}),"Live bearbeiten"]}),o.jsxs("a",{href:"/",target:"_blank",rel:"noopener noreferrer",title:"Website in neuem Tab öffnen",className:kc({variant:"secondary",size:"sm",className:"px-2 sm:px-3"}),children:[o.jsx(Be,{name:"external",className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"Website"})]}),o.jsx(YN,{user:t,onLogout:se})]})}),(x||k||j.length>0)&&o.jsxs("div",{className:"border-b border-amber-200 bg-amber-50 px-4 py-2 text-sm text-amber-900 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-200 sm:px-6",children:[x&&o.jsxs("p",{children:[o.jsx("strong",{children:"Wartungsmodus ist aktiv"})," – Besucher sehen gerade nur die Wartungsseite."," ",n("settings.manage")&&o.jsx(G,{to:"/admin/settings/maintenance",className:"underline",children:"Ändern"})]}),k&&o.jsxs("p",{children:[o.jsx("strong",{children:"Launch-Countdown läuft"})," – Besucher sehen bis"," ",new Date(k).toLocaleString("de-DE",{dateStyle:"medium",timeStyle:"short",timeZone:"Europe/Berlin"})," Uhr nur den Countdown."," ",n("settings.manage")&&o.jsx(G,{to:"/admin/settings/countdown",className:"underline",children:"Ändern"})]}),j.length>0&&o.jsxs("p",{children:[o.jsx("strong",{children:"Ausgeblendet für Besucher:"})," ",j.join(", "),"."," ",o.jsx(G,{to:"/admin",className:"underline",children:"Auf der Übersicht ändern"})]})]}),o.jsx("main",{className:"mx-auto w-full max-w-7xl flex-1 p-4 sm:p-6 lg:p-8",children:o.jsx(m.Suspense,{fallback:o.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}),children:o.jsx(Sd,{})})})]})]}),o.jsx(GN,{open:l,onClose:()=>u(!1),pages:P})]})]})}function ZN(){const{user:e,loading:t}=Wn();return t?o.jsx("div",{className:"flex min-h-screen items-center justify-center text-neutral-500",children:"Lädt…"}):e?o.jsx(Sd,{}):o.jsx(fr,{to:"/admin/login",replace:!0})}function ue({permission:e,children:t}){const{hasPermission:n}=Wn();return(Array.isArray(e)?e:[e]).some(i=>n(i))?t:o.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-8 text-center dark:border-neutral-800 dark:bg-neutral-900",children:[o.jsx("h1",{className:"mb-2 text-lg font-bold text-neutral-900 dark:text-white",children:"Keine Berechtigung"}),o.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:"Du hast keinen Zugriff auf diesen Bereich. Bitte wende dich an einen Administrator, falls du hier Zugriff brauchst."})]})}function ka(e,t,n="name"){if(!t)return;let r=document.head.querySelector(`meta[${n}="${e}"]`);r||(r=document.createElement("meta"),r.setAttribute(n,e),document.head.appendChild(r)),r.setAttribute("content",t)}function QN(e){let t=document.head.querySelector('link[rel="canonical"]');t||(t=document.createElement("link"),t.setAttribute("rel","canonical"),document.head.appendChild(t)),t.setAttribute("href",`https://hifi-planet.de${e}`),ka("og:url",`https://hifi-planet.de${e}`,"property")}function Ep(e){let t=document.head.querySelector('meta[name="robots"]');if(!e){t==null||t.remove();return}t||(t=document.createElement("meta"),t.setAttribute("name","robots"),document.head.appendChild(t)),t.setAttribute("content","noindex")}function vr({title:e,description:t,path:n,noindex:r=!1}){m.useEffect(()=>(Ep(r),()=>Ep(!1)),[r]),m.useEffect(()=>{e&&(document.title=`${e} | HifiPlanet`,ka("og:title",`${e} | HifiPlanet`,"property")),t&&(ka("description",t),ka("og:description",t,"property")),n&&QN(n)},[e,t,n])}const JN=[.16,1,.3,1],Cp={up:{y:40},left:{x:-56},right:{x:56}};function e5(e){return{hidden:{opacity:0,scale:.96,filter:"blur(8px)",...Cp[e]||Cp.up},visible:{opacity:1,scale:1,x:0,y:0,filter:"blur(0px)"}}}const t5={hidden:{x:"-130%"},visible:{x:"230%",transition:{duration:1.1,ease:"easeInOut",delay:.4}}};function Ke({children:e,direction:t="up",className:n="",index:r=0,shine:s=!1,style:i}){const a=Math.min(r*.09,.45);return o.jsxs(an.div,{className:n,style:{position:"relative",overflow:"hidden",...i},initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.25,margin:"-100px"},variants:e5(t),transition:{duration:.75,ease:JN,delay:a},children:[e,s&&o.jsx(an.div,{"aria-hidden":!0,variants:t5,className:"pointer-events-none absolute inset-y-0 -left-1/3 w-1/3 rotate-12 bg-gradient-to-r from-transparent via-white/40 to-transparent"})]})}const $o=e=>{e.preventDefault(),e.stopPropagation()};function n5(e){e.preventDefault();const t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)}function fe({entity:e,id:t,field:n,lang:r,value:s,as:i="span",multiline:a=!1,placeholder:l="Text eingeben…",className:u="",...c}){const{language:d}=ye(),f=Ue(),h=r||d,g=f.getValue(e,t,n,h,s??"")??"";if(!f.canEdit(e))return o.jsx(i,{className:u,...c,children:g});const y=b=>{const w=a?b.innerText.replace(/\n{3,}/g,`
-`).trim():b.innerText.replace(/\s+/g," ").trim();w!==g.trim()&&f.setValue(e,t,n,h,w),b.innerText!==w&&(b.innerText=w)};return o.jsx(i,{...c,className:`${u} live-editable${f.hasPending(e,t,n,h)?" live-editable-changed":""}`,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!0,"data-live-placeholder":l,onClick:$o,onPaste:n5,onKeyDown:b=>{b.key==="Enter"&&!a?(b.preventDefault(),b.currentTarget.blur()):b.key==="Escape"&&(b.currentTarget.innerText=g,b.currentTarget.blur()),b.stopPropagation()},onKeyUp:b=>b.stopPropagation(),onBlur:b=>y(b.currentTarget),children:g},`${h}:${g}`)}function Ye({k:e,...t}){const{t:n}=ye();return o.jsx(fe,{entity:"text",id:e,field:"value",value:n(e),placeholder:"Leer = Standardtext",...t})}function kr({entity:e,id:t,field:n,lang:r,value:s,label:i="Text",className:a="",...l}){const{language:u}=ye(),c=Ue(),d=r||u,f=c.getValue(e,t,n,d,s??"")??"";if(!c.canEdit(e))return o.jsx("div",{className:a,...l,dangerouslySetInnerHTML:{__html:f}});const h=g=>{$o(g),c.openEditor({kind:"html",entity:e,id:t,field:n,lang:d,label:i,original:f})};return o.jsx("div",{...l,className:`${a} live-editable live-editable-block${c.hasPending(e,t,n,d)?" live-editable-changed":""}`,role:"button",tabIndex:0,title:"Klicken zum Bearbeiten",onClick:h,onKeyDown:g=>g.key==="Enter"&&h(g),"data-live-placeholder":"Text hinzufügen…",dangerouslySetInnerHTML:{__html:f}})}function Sc({entity:e,id:t,field:n,lang:r,value:s,label:i,kind:a="textarea",hint:l,as:u="div",className:c="",children:d,...f}){const{language:h}=ye(),g=Ue(),y=r||h;if(!g.canEdit(e))return o.jsx(u,{className:c,...f,children:d});const b=g.getValue(e,t,n,y,s??"")??"",w=p=>{$o(p),g.openEditor({kind:a,entity:e,id:t,field:n,lang:y,label:i,hint:l,original:b})};return o.jsx(u,{...f,className:`${c} live-editable live-editable-block${g.hasPending(e,t,n,y)?" live-editable-changed":""}`,role:"button",tabIndex:0,title:`${i} bearbeiten`,onClickCapture:w,onKeyDown:p=>p.key==="Enter"&&w(p),children:d})}function Ss({id:e,value:t,label:n="Bild",aspect:r,buttonLabel:s="Bild tauschen",as:i="div",className:a="",children:l,...u}){const c=Ue();if(!c.canEdit("site_images"))return l?o.jsx(i,{className:a,...u,children:l}):null;const d=f=>{$o(f),c.openEditor({kind:"image",entity:"site_images",id:e,field:"path",lang:"de",label:n,aspect:r,original:t||""})};return o.jsxs(i,{...u,className:`${a}${/\babsolute\b/.test(a)?"":" relative"}${c.hasPending("site_images",e,"path","de")?" live-editable-changed":""}`,children:[l,o.jsxs("button",{type:"button",onClick:d,className:"absolute left-2 top-2 z-10 inline-flex items-center gap-1.5 rounded-full bg-black/75 px-3 py-1.5 text-xs font-semibold text-white shadow-lg ring-1 ring-white/30 backdrop-blur hover:bg-black/90",children:[o.jsxs("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[o.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),o.jsx("circle",{cx:"9",cy:"9",r:"2"}),o.jsx("path",{d:"m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21"})]}),s]})]})}function r5({items:e,entity:t="faqs"}){const[n,r]=m.useState(null),s=Ue(),{language:i}=ye();return s.canEdit(t)?o.jsx("div",{className:"divide-y divide-neutral-200 rounded-xl border border-neutral-200 bg-white dark:divide-neutral-800 dark:border-neutral-800 dark:bg-neutral-900",children:e.map((a,l)=>o.jsxs("div",{className:"space-y-3 px-5 py-4",children:[o.jsx(fe,{entity:t,id:a.id,field:"question",value:a.question,as:"p",className:"block font-medium text-neutral-900 dark:text-white",placeholder:"Frage"}),o.jsx(fe,{entity:t,id:a.id,field:"answer",value:a.answer,as:"p",multiline:!0,className:"block whitespace-pre-line text-sm text-neutral-600 dark:text-neutral-300",placeholder:"Antwort"})]},a.id??l))}):o.jsx("div",{className:"divide-y divide-neutral-200 rounded-xl border border-neutral-200 bg-white dark:divide-neutral-800 dark:border-neutral-800 dark:bg-neutral-900",children:e.map((a,l)=>{const u=n===l,c=a.id?{...a,question:s.getValue(t,a.id,"question",i,a.question),answer:s.getValue(t,a.id,"answer",i,a.answer)}:a;return o.jsxs("div",{children:[o.jsxs("button",{onClick:()=>r(u?null:l),className:"flex w-full items-center justify-between gap-4 px-5 py-4 text-left","aria-expanded":u,children:[o.jsx("span",{className:"font-medium text-neutral-900 dark:text-white",children:c.question}),o.jsx(an.svg,{animate:{rotate:u?180:0},transition:{duration:.2},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-5 w-5 shrink-0 text-neutral-500",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6 9 6 6 6-6"})})]}),o.jsx(dE,{initial:!1,children:u&&o.jsx(an.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},className:"overflow-hidden",children:o.jsx("p",{className:"px-5 pb-4 text-sm text-neutral-600 dark:text-neutral-300",children:c.answer})})})]},c.id??c.question)})})}function Iv({count:e=5,className:t="h-4 w-4"}){return o.jsx("div",{className:"flex gap-0.5 text-amber-400",children:Array.from({length:e}).map((n,r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:t,children:o.jsx("path",{d:"M10 1.5l2.6 5.6 6.1.6-4.6 4.1 1.3 6-5.4-3.1-5.4 3.1 1.3-6-4.6-4.1 6.1-.6L10 1.5z"})},r))})}const s5=70;function i5({testimonials:e}){const t=m.useRef(null),n=m.useRef(null),r=m.useRef({pos:0,half:0,hovering:!1,dragging:!1,dragStartX:0,dragStartPos:0,lastTime:null,rafId:null}).current;m.useLayoutEffect(()=>{const i=n.current,a=window.matchMedia("(prefers-reduced-motion: reduce)").matches,l=()=>{i.style.transform=`translateX(${r.pos}px)`},u=x=>{if(r.half<=0)return x;for(;x>0;)x-=r.half;for(;x<=-r.half;)x+=r.half;return x},c=()=>{r.half=i.scrollWidth/2,r.pos===0?r.pos=-r.half:r.pos=u(r.pos),l()};c();const d=new ResizeObserver(c);d.observe(i);const f=x=>{r.lastTime===null&&(r.lastTime=x);const v=(x-r.lastTime)/1e3;r.lastTime=x,!r.dragging&&!r.hovering&&!a&&(r.pos=u(r.pos+s5*v),l()),r.rafId=requestAnimationFrame(f)};r.rafId=requestAnimationFrame(f);const h=t.current,g=()=>{r.hovering=!0},y=()=>{r.hovering=!1},b=x=>{r.dragging=!0,r.dragStartX=x.clientX,r.dragStartPos=r.pos,h.setPointerCapture(x.pointerId),h.classList.add("cursor-grabbing"),h.classList.remove("cursor-grab")},w=x=>{r.dragging&&(r.pos=u(r.dragStartPos+(x.clientX-r.dragStartX)),l())},p=x=>{r.dragging&&(r.dragging=!1,h.hasPointerCapture(x.pointerId)&&h.releasePointerCapture(x.pointerId),h.classList.remove("cursor-grabbing"),h.classList.add("cursor-grab"))};return h.addEventListener("pointerenter",g),h.addEventListener("pointerleave",y),h.addEventListener("pointerdown",b),h.addEventListener("pointermove",w),h.addEventListener("pointerup",p),h.addEventListener("pointercancel",p),()=>{cancelAnimationFrame(r.rafId),d.disconnect(),h.removeEventListener("pointerenter",g),h.removeEventListener("pointerleave",y),h.removeEventListener("pointerdown",b),h.removeEventListener("pointermove",w),h.removeEventListener("pointerup",p),h.removeEventListener("pointercancel",p)}},[e.length]);const s=[...e,...e];return o.jsx("div",{ref:t,className:"marquee-viewport cursor-grab touch-pan-y select-none overflow-hidden",children:o.jsx("div",{ref:n,className:"marquee-track flex w-max gap-5",children:s.map((i,a)=>o.jsx("div",{className:"w-64 shrink-0 sm:w-72 lg:w-80",children:o.jsxs("div",{className:"relative flex h-full flex-col overflow-hidden rounded-xl border border-neutral-200 bg-white p-6 shadow-sm transition-shadow duration-300 hover:shadow-lg dark:border-neutral-800 dark:bg-neutral-900",children:[o.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 32 24",className:"absolute -right-1 -top-1 h-16 w-16 text-brand-500/10 dark:text-brand-400/10",children:o.jsx("path",{fill:"currentColor",d:"M9.4 0C4.4 3.5 1 9.1 1 15.3 1 20.6 4.3 24 8.4 24c3.8 0 6.6-3 6.6-6.6 0-3.4-2.4-5.9-5.4-5.9-.6 0-1.4.1-1.6.2C8.5 8.5 11.6 4.6 14.6 2.6L9.4 0zm16.5 0c-4.8 3.5-8.3 9.1-8.3 15.3 0 5.3 3.3 8.6 7.5 8.6 3.7 0 6.6-3 6.6-6.6 0-3.4-2.5-5.9-5.4-5.9-.6 0-1.4.1-1.6.2.5-3.3 3.6-7.1 6.7-9.1L25.9 0z"})}),o.jsx(Iv,{className:"relative z-10 mb-3 h-4 w-4",count:i.rating||5}),o.jsxs("p",{className:"relative z-10 mb-4 line-clamp-6 flex-1 text-sm leading-relaxed text-neutral-600 dark:text-neutral-300",children:["„",i.text,'"']}),o.jsxs("div",{className:"relative z-10 mt-auto flex items-center gap-3",children:[i.photo?o.jsx("img",{src:i.photo,alt:"",referrerPolicy:"no-referrer",className:"h-9 w-9 shrink-0 rounded-full object-cover"}):o.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-brand-100 text-sm font-semibold text-brand-700 dark:bg-brand-900/40 dark:text-brand-300",children:i.name.charAt(0).toUpperCase()}),o.jsx("p",{className:"text-sm font-semibold text-neutral-900 dark:text-white",children:i.name})]})]})},`${i.name}-${a}`))})})}function Tp(e,t,n={x:0,y:0}){const r=Math.max(0,Math.min(100,e==null?n.x:Number(e)||0)),s=Math.max(0,Math.min(100,t==null?n.y:Number(t)||0));return{left:`${r}%`,top:`${s}%`,transform:`translate(-${r}%, -${s}%)`}}const a5="/assets/gallery-dash2-CEVCErVK.webp",o5="/assets/youtube-hintergrund-BqSbCrLQ.mp4",l5="/assets/youtube-hintergrund-mobil-BolxAIc0.mp4",Ji={left:"text-left",center:"text-center",right:"text-right"},u5={left:"",center:"mx-auto",right:"ml-auto"},c5={eyebrow_de:"",eyebrow_en:"",title_de:"",title_en:"",body_html_de:"",body_html_en:"",text_align:"center",text_align_x:50,text_align_y:50,button_label_de:"",button_label_en:"",button_url:"",font_family:null};function Pp({slug:e,label:t,url:n,className:r,style:s}){const{hidden_areas:i}=kt(),a=Ue();return e&&a.canEdit("home_sections")?o.jsxs("span",{className:"inline-flex flex-wrap items-center justify-center gap-2",children:[o.jsx(fe,{entity:"home_sections",id:e,field:"button_label",value:t,className:r,style:s,placeholder:"Button-Text (leer = kein Button)"}),o.jsxs(Sc,{entity:"home_sections",id:e,field:"button_url",lang:"de",value:n,kind:"input",label:"Button-Ziel",hint:"Interne Seite mit / am Anfang (z. B. /leistungen) oder volle Adresse (https://...).",as:"span",className:"rounded bg-black/60 px-2 py-1 text-xs font-medium text-white",children:["Ziel: ",n||"–"]})]}):!t||!n||Av(n,i)?null:n.startsWith("/")?o.jsx(G,{to:n,className:r,style:s,children:t}):o.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:r,style:s,children:t})}function d5(){const{hero_image_path:e}=kt(),t=e||a5,{t:n,language:r}=ye(),s=Io(),i=Ue(),a=i.canEdit("home_sections"),l=!s("page.vehicles"),u=n("home.stats"),c=Fo(),d=c.slot("craft"),f=c.slot("advice"),h=c.slot("youtube_poster"),g=c.slot("more"),y=n("home.galleryAlts"),b=c.insights().map((z,ae)=>({...z,alt:y[ae]||y[0]||""})),[w,p]=m.useState([]),[x,v]=m.useState({}),[k,E]=m.useState(!1),[C,j]=m.useState([]),S=z=>{const ae=x[z]||c5,Uo=k&&{hero:n("home.heroTitle"),craft:n("home.craftTitle")}[z]||"",hf=k&&z==="hero"?`${n("home.heroSubtitle")}
`:"";return{eyebrow:i.getValue("home_sections",z,"eyebrow",r,ae[`eyebrow_${r}`]||""),title:i.getValue("home_sections",z,"title",r,ae[`title_${r}`]||Uo),bodyHtml:i.getValue("home_sections",z,"body_html",r,ae[`body_html_${r}`]||hf),align:ae.text_align||"center",alignX:ae.text_align_x,alignY:ae.text_align_y,buttonLabel:i.getValue("home_sections",z,"button_label",r,ae[`button_label_${r}`]||""),buttonUrl:i.getValue("home_sections",z,"button_url","de",ae.button_url||""),fontFamily:ae.font_family||void 0}},N=qe("home_sections.hero.eyebrow"),P=qe("home_sections.hero.title"),V=qe("home_sections.youtube.eyebrow"),B=qe("home_sections.youtube.title"),se=qe("home_sections.youtube.button_label"),ne=qe("home_sections.craft.eyebrow"),q=qe("home_sections.craft.title"),W=qe("home_sections.advice.eyebrow"),I=qe("home_sections.advice.title"),T=qe("home_sections.insights.eyebrow"),M=qe("home_sections.insights.title"),L=qe("home_sections.more.eyebrow"),D=qe("home_sections.more.title"),H=qe("home_sections.more.button_label");m.useEffect(()=>{oe.get("/home-sections").then(v).catch(()=>E(!0))},[]),m.useEffect(()=>{oe.get("/partners").then(j).catch(()=>{})},[]);const[_,R]=m.useState(null),X=_?_.reviews.filter(z=>z.review_text).map(z=>({name:z.author_name,text:z.review_text,rating:z.rating,photo:z.profile_photo_url})):n("home.testimonials");m.useEffect(()=>{oe.get("/faqs").then(z=>{p(z.map(ae=>({id:ae.id,question:r==="de"?ae.question_de:ae.question_en,answer:r==="de"?ae.answer_de:ae.answer_en})))}).catch(()=>{})},[r]),m.useEffect(()=>{oe.get("/google-reviews").then(z=>{z.rating!=null&&z.reviews.some(ae=>ae.review_text)&&R(z)}).catch(()=>{})},[]),vr({title:n("home.metaTitle"),description:n("home.metaDescription"),path:"/"}),m.useEffect(()=>{if(w.length===0||s("home.faq"))return;const z=document.createElement("script");return z.type="application/ld+json",z.text=JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:w.map(ae=>({"@type":"Question",name:ae.question,acceptedAnswer:{"@type":"Answer",text:ae.answer}}))}),document.head.appendChild(z),()=>document.head.removeChild(z)},[w]),m.useEffect(()=>{var z;w.length>0&&window.location.hash==="#faq"&&((z=document.getElementById("faq"))==null||z.scrollIntoView())},[w]);const Q=m.useRef(null);m.useEffect(()=>{var pf,gf,xf;const z=Q.current;if(!z)return;const ae=(pf=window.matchMedia)==null?void 0:pf.call(window,"(prefers-reduced-motion: reduce)").matches,Uo=(gf=navigator.connection)==null?void 0:gf.saveData;if(ae||Uo)return;const Fv=((xf=window.matchMedia)==null?void 0:xf.call(window,"(max-width: 767px), (pointer: coarse)").matches)?l5:o5,mf=new IntersectionObserver(([Ov])=>{Ov.isIntersecting?(z.getAttribute("src")||(z.src=Fv),z.play().catch(()=>{})):z.paused||z.pause()},{rootMargin:"300px 0px"});return mf.observe(z),()=>mf.disconnect()},[]);const de=m.useRef(null),{scrollYProgress:J}=Xy({target:de,offset:["start start","end start"]}),je=GC(),Ie=vn(J,[0,1],je?["0%","0%"]:["-6%","6%"]),Je=vn(J,[0,1],je?["0%","0%"]:["0%","60%"]),ht=vn(J,[0,.8],[1,0]),pe=vn(J,[.5,1],[0,1]),et=vn(pe,z=>z>.05?"auto":"none"),U=vn(J,[.5,1],[16,0]),K=m.useRef(null),[le,mt]=m.useState(()=>et.get()==="auto");vC(et,"change",z=>mt(z==="auto"));const[Gn,Vv]=m.useState(0);return m.useEffect(()=>{le&&K.current&&Vv(K.current.offsetHeight)},[le]),gv(le&&Gn>0,{offset:Gn}),o.jsxs("div",{children:[o.jsx(an.div,{ref:K,style:{opacity:pe,pointerEvents:et,y:U},className:"fixed inset-x-0 bottom-0 z-20 border-t border-neutral-200 bg-white/95 px-4 py-3 shadow-[0_-8px_24px_rgba(0,0,0,0.08)] backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/95 sm:px-6",children:o.jsxs("div",{className:"mx-auto flex max-w-6xl items-center justify-between gap-3",children:[o.jsx(Ye,{k:"home.stickyCta",as:"p",className:"hidden text-sm font-medium text-neutral-600 dark:text-neutral-300 sm:block"}),o.jsxs("div",{className:"flex w-full gap-3 sm:w-auto",children:[l&&o.jsx(G,{to:"/fahrzeuge",className:"flex-1 rounded-md bg-brand-500 px-5 py-2.5 text-center text-sm font-semibold text-white shadow-sm transition hover:-translate-y-0.5 hover:bg-brand-600 sm:flex-none",children:o.jsx(Ye,{k:"home.selectVehicle"})}),o.jsx(G,{to:"/kontakt",className:"flex-1 rounded-md border border-neutral-300 px-5 py-2.5 text-center text-sm font-semibold text-neutral-700 transition hover:-translate-y-0.5 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800 sm:flex-none",children:o.jsx(Ye,{k:"home.getInTouch"})})]})]})}),o.jsxs("section",{ref:de,className:"relative -mt-[89px] h-svh min-h-[560px] overflow-hidden sm:-mt-[97px]",children:[o.jsx(an.img,{style:{y:Ie,scale:1.15},src:t,alt:n("home.heroImageAlt"),className:"absolute inset-0 h-full w-full object-cover"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-neutral-950 via-neutral-950/80 to-neutral-950/40"}),o.jsx(an.div,{style:{y:Je,opacity:ht},className:"absolute inset-0",children:o.jsx("div",{className:"absolute w-full max-w-2xl px-4 text-center sm:px-6",style:{...Tp(S("hero").alignX,S("hero").alignY,{x:50,y:50}),fontFamily:S("hero").fontFamily},children:o.jsxs(an.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,ease:"easeOut"},children:[(S("hero").eyebrow||a)&&o.jsx(fe,{entity:"home_sections",id:"hero",field:"eyebrow",value:S("hero").eyebrow,as:"p",className:"mb-3 text-sm font-semibold uppercase tracking-wide text-brand-400",style:N,placeholder:"Vorspann (optional)"}),o.jsx(fe,{entity:"home_sections",id:"hero",field:"title",value:S("hero").title,as:"h1",className:"text-3xl font-extrabold tracking-tight text-white sm:text-5xl",style:P,placeholder:"Überschrift"}),o.jsx(kr,{entity:"home_sections",id:"hero",field:"body_html",value:S("hero").bodyHtml,label:"Text",className:"legal-content mx-auto mt-4 max-w-2xl text-base text-neutral-200 sm:text-lg"}),o.jsxs("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-3",children:[l&&o.jsx(G,{to:"/fahrzeuge",className:"rounded-md bg-brand-500 px-6 py-3 text-sm font-semibold text-white shadow-sm transition hover:-translate-y-0.5 hover:bg-brand-600 hover:shadow-lg",children:o.jsx(Ye,{k:"home.selectVehicle"})}),o.jsx(G,{to:"/kontakt",className:"rounded-md border border-white/30 bg-white/10 px-6 py-3 text-sm font-semibold text-white backdrop-blur transition hover:-translate-y-0.5 hover:bg-white/20",children:o.jsx(Ye,{k:"home.getInTouch"})})]})]})})})]}),!s("home.stats")&&o.jsx("section",{className:"border-b border-neutral-200 bg-neutral-950 py-8 dark:border-neutral-800",children:o.jsx("div",{className:"mx-auto grid max-w-6xl grid-cols-2 gap-6 px-4 text-center sm:grid-cols-4 sm:px-6",children:u.map((z,ae)=>o.jsxs(Ke,{index:ae,children:[o.jsx("p",{className:"text-2xl font-extrabold text-brand-400 sm:text-3xl",children:z.value}),o.jsx("p",{className:"text-sm text-neutral-400",children:z.label})]},z.label))})}),!s("home.partners")&&o.jsx("section",{className:"border-b border-neutral-200 py-8 dark:border-neutral-800",children:o.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[o.jsx(Ye,{k:"home.brandsHeading",as:"p",className:"mb-4 block text-center text-xs font-semibold uppercase tracking-wide text-neutral-400"}),o.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-8 gap-y-3",children:C.map((z,ae)=>o.jsx(Ke,{index:ae,children:z.logo_path?o.jsx("img",{src:z.logo_path,alt:z.name,className:"h-8 max-w-[8rem] object-contain opacity-70 grayscale transition hover:opacity-100 hover:grayscale-0"}):o.jsx(fe,{entity:"partners",id:z.id,field:"name",lang:"de",value:z.name,className:"text-lg font-bold text-neutral-400 dark:text-neutral-600"})},z.id))})]})}),!s("home.youtube")&&o.jsxs("section",{className:"relative min-h-[70vh] overflow-hidden sm:min-h-[85vh]",children:[o.jsx("video",{ref:Q,loop:!0,muted:!0,playsInline:!0,preload:"none",poster:h.src,className:"absolute inset-0 h-full w-full object-cover"}),o.jsx("div",{className:"absolute inset-0 bg-black/55"}),o.jsx(Ss,{id:"youtube_poster",value:h.custom,label:en.youtube_poster.label,aspect:en.youtube_poster.aspect,buttonLabel:"Video-Standbild tauschen",className:"absolute left-0 top-0 h-12 w-64"}),o.jsx("div",{className:"absolute w-full max-w-3xl px-4 text-center sm:px-6",style:{...Tp(S("youtube").alignX,S("youtube").alignY,{x:50,y:50}),fontFamily:S("youtube").fontFamily},children:o.jsxs(Ke,{children:[(S("youtube").eyebrow||a)&&o.jsx(fe,{entity:"home_sections",id:"youtube",field:"eyebrow",value:S("youtube").eyebrow,as:"p",className:"mb-4 text-xs font-semibold uppercase tracking-[0.2em] text-neutral-200 sm:text-sm",style:V,placeholder:"Vorspann (optional)"}),o.jsx(fe,{entity:"home_sections",id:"youtube",field:"title",value:S("youtube").title,as:"h2",className:"text-3xl font-bold uppercase tracking-wide text-white sm:text-5xl",style:B,placeholder:"Überschrift"}),o.jsx(kr,{entity:"home_sections",id:"youtube",field:"body_html",value:S("youtube").bodyHtml,label:"Text",className:"legal-content mt-4 text-xs font-semibold uppercase tracking-wide text-neutral-200 sm:text-sm"}),o.jsx(Pp,{slug:"youtube",label:S("youtube").buttonLabel,url:S("youtube").buttonUrl,className:"mt-8 inline-flex items-center justify-center rounded-full bg-white px-8 py-3 text-xs font-bold uppercase tracking-wide text-neutral-900 transition hover:-translate-y-0.5 hover:bg-neutral-100",style:se})]})})]}),!s("home.craft")&&o.jsx("section",{className:"grain-band border-y border-neutral-200 bg-neutral-50 py-16 dark:border-neutral-800 dark:bg-neutral-900/40",children:o.jsxs("div",{className:"mx-auto max-w-6xl space-y-16 overflow-hidden px-4 sm:px-6",children:[o.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[o.jsx(Ke,{direction:"left",shine:!0,className:"rounded-xl shadow-lg",children:o.jsx(Ss,{id:"craft",value:d.custom,label:en.craft.label,aspect:en.craft.aspect,children:o.jsx("img",{src:d.src,alt:n("home.craftImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})})}),o.jsxs(Ke,{direction:"right",index:1,className:Ji[S("craft").align],style:{fontFamily:S("craft").fontFamily},children:[(S("craft").eyebrow||a)&&o.jsx(fe,{entity:"home_sections",id:"craft",field:"eyebrow",value:S("craft").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:ne,placeholder:"Vorspann (optional)"}),o.jsx(fe,{entity:"home_sections",id:"craft",field:"title",value:S("craft").title,as:"h2",className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:q,placeholder:"Überschrift"}),o.jsx(kr,{entity:"home_sections",id:"craft",field:"body_html",value:S("craft").bodyHtml,label:"Text",className:"legal-content text-neutral-600 dark:text-neutral-300"})]})]}),o.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[o.jsxs(Ke,{direction:"left",className:`order-2 md:order-1 ${Ji[S("advice").align]}`,style:{fontFamily:S("advice").fontFamily},children:[(S("advice").eyebrow||a)&&o.jsx(fe,{entity:"home_sections",id:"advice",field:"eyebrow",value:S("advice").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:W,placeholder:"Vorspann (optional)"}),o.jsx(fe,{entity:"home_sections",id:"advice",field:"title",value:S("advice").title,as:"h2",className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:I,placeholder:"Überschrift"}),o.jsx(kr,{entity:"home_sections",id:"advice",field:"body_html",value:S("advice").bodyHtml,label:"Text",className:"legal-content text-neutral-600 dark:text-neutral-300"})]}),o.jsx(Ke,{direction:"right",index:1,shine:!0,className:"order-1 md:order-2 rounded-xl shadow-lg",children:o.jsx(Ss,{id:"advice",value:f.custom,label:en.advice.label,aspect:en.advice.aspect,children:o.jsx("img",{src:f.src,alt:n("home.adviceImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})})})]})]})}),!s("home.insights")&&o.jsxs("section",{className:"mx-auto max-w-6xl px-4 py-16 sm:px-6",children:[o.jsxs(Ke,{className:`mb-8 ${Ji[S("insights").align]}`,style:{fontFamily:S("insights").fontFamily},children:[(S("insights").eyebrow||a)&&o.jsx(fe,{entity:"home_sections",id:"insights",field:"eyebrow",value:S("insights").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:T,placeholder:"Vorspann (optional)"}),o.jsx(fe,{entity:"home_sections",id:"insights",field:"title",value:S("insights").title,as:"h2",className:"text-2xl font-bold text-neutral-900 dark:text-white",style:M,placeholder:"Überschrift"}),o.jsx(kr,{entity:"home_sections",id:"insights",field:"body_html",value:S("insights").bodyHtml,label:"Text",className:"legal-content mt-2 text-neutral-600 dark:text-neutral-300"})]}),o.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:b.map((z,ae)=>o.jsx(Ke,{index:ae%3,shine:!0,className:"aspect-square overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:o.jsx(Ss,{id:z.id,value:z.custom,label:`Einblicke: Foto ${ae+1}`,aspect:1,className:"h-full w-full",children:o.jsx("img",{src:z.src,alt:z.alt,width:z.width,height:z.height,loading:"lazy",className:"h-full w-full object-cover transition duration-300 hover:scale-105"})})},z.id))})]}),!s("home.reviews")&&o.jsx("section",{className:"grain-band border-y border-neutral-200 bg-neutral-50 py-16 dark:border-neutral-800 dark:bg-neutral-900/40",children:o.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[o.jsxs(Ke,{className:"mb-10 text-center",children:[o.jsx("div",{className:"mb-2 flex items-center justify-center gap-2",children:o.jsx(Iv,{className:"h-6 w-6",count:_?Math.round(_.rating):5})}),o.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",children:_?n("home.reviewsRatingDynamic")(_.rating,_.rating_count):n("home.reviewsRating")}),o.jsx(Ye,{k:"home.reviewsText",as:"p",className:"mt-1 text-neutral-600 dark:text-neutral-300"}),o.jsx("a",{href:"https://www.google.com/maps/search/?api=1&query=Hifi+Planet+Amorbach+Boxbrunner+Stra%C3%9Fe+20a",target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-block text-sm font-medium text-brand-600 hover:underline dark:text-brand-400",children:o.jsx(Ye,{k:"home.reviewsLink"})})]}),o.jsx(Ke,{children:o.jsx(i5,{testimonials:X})})]})}),!s("home.more")&&o.jsx("section",{className:"mx-auto max-w-6xl overflow-hidden px-4 py-16 sm:px-6",children:o.jsxs("div",{className:"grid items-center gap-10 md:grid-cols-2",children:[o.jsx(Ke,{direction:"left",shine:!0,className:"overflow-hidden rounded-xl shadow-lg",children:o.jsx(Ss,{id:"more",value:g.custom,label:en.more.label,aspect:en.more.aspect,className:"h-full w-full",children:o.jsx("img",{src:g.src,alt:n("home.moreImageAlt"),width:1600,height:905,className:"h-full w-full object-cover",loading:"lazy"})})}),o.jsxs(Ke,{direction:"right",index:1,className:`rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900 ${Ji[S("more").align]}`,style:{fontFamily:S("more").fontFamily},children:[(S("more").eyebrow||a)&&o.jsx(fe,{entity:"home_sections",id:"more",field:"eyebrow",value:S("more").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:L,placeholder:"Vorspann (optional)"}),o.jsx(fe,{entity:"home_sections",id:"more",field:"title",value:S("more").title,as:"h2",className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:D,placeholder:"Überschrift"}),o.jsx(kr,{entity:"home_sections",id:"more",field:"body_html",value:S("more").bodyHtml,label:"Text",className:`legal-content mb-8 max-w-2xl text-neutral-600 dark:text-neutral-300 ${u5[S("more").align]}`}),o.jsx(Pp,{slug:"more",label:S("more").buttonLabel,url:S("more").buttonUrl,className:"inline-block rounded-md border border-neutral-300 px-6 py-3 text-sm font-semibold text-neutral-700 transition hover:-translate-y-0.5 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",style:H})]})]})}),!s("home.faq")&&o.jsx("section",{id:"faq",className:"scroll-mt-20 border-t border-neutral-300 py-16 dark:border-neutral-700",children:o.jsxs("div",{className:"mx-auto max-w-3xl px-4 sm:px-6",children:[o.jsx(Ke,{className:"mb-8 text-center",children:o.jsx(Ye,{k:"home.faqHeading",as:"h2",className:"text-2xl font-bold text-neutral-900 dark:text-white"})}),o.jsx(Ke,{index:1,children:o.jsx(r5,{items:w})})]})})]})}function Ho(e,t){return e?e.code==="rate_limited"||e.status===429?t("errors.rateLimited"):e.code==="invalid_input"||e.status===422?t("errors.invalidInput"):e.status===404?t("errors.notFound"):e.status===503?t("errors.maintenance"):e.status>=500?t("errors.server"):e.status?t("errors.generic"):t("errors.network"):""}const Np={vw:"volkswagen",mercedes:"mercedes-benz",benz:"mercedes-benz",mb:"mercedes-benz",chevy:"chevrolet",alfa:"alfa romeo"},f5=8,Ws=e=>String(e||"").toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/ß/g,"ss").replace(/[-_./]+/g," ").replace(/\s+/g," ").trim(),co=e=>e.replace(/\s/g,"");function h5(e,t){const n=(e||[]).map(s=>{const i=Ws(s.name);return{key:`b${s.id}`,type:"brand",label:s.name,to:`/fahrzeuge/${s.slug}`,text:i,flat:co(i)}}),r=(t||[]).map(s=>{const i=Ws(`${s.brand_name} ${s.name}`);return{key:`m${s.id}`,type:"model",label:s.name,brand:s.brand_name,image:s.image_path,to:`/fahrzeuge/${s.brand_slug}/${s.slug}`,text:i,flat:co(i),modelText:Ws(s.name)}});return[...n,...r]}function m5(e,t){const n=Ws(t).split(" ").filter(Boolean);if(n.length===0)return[];const r=n.map(a=>Np[a]?[a,Ws(Np[a])]:[a]),s=co(n.join("")),i=[];for(const a of e){const l=c=>a.text.includes(c)||a.flat.includes(co(c));if(!r.every(c=>c.some(l))&&!a.flat.includes(s))continue;let u=0;for(const c of r)c.some(d=>a.text.startsWith(d))?u+=3:c.some(d=>` ${a.text}`.includes(` ${d}`))&&(u+=2),c.some(d=>{var f;return(f=a.modelText)==null?void 0:f.startsWith(d)})&&(u+=2);a.type==="brand"&&(u+=1),i.push({entry:a,score:u})}return i.sort((a,l)=>l.score-a.score||a.entry.text.localeCompare(l.entry.text,void 0,{numeric:!0})),i.slice(0,f5).map(a=>a.entry)}function p5({brands:e,width:t}){const{t:n}=ye(),r=xr(),s=m.useId(),i=m.useRef(null),[a,l]=m.useState(null),[u,c]=m.useState(""),[d,f]=m.useState(!1),[h,g]=m.useState(0),y=m.useRef(!1),b=()=>{a||y.current||(y.current=!0,oe.get("/vehicle-search").then(l).catch(()=>l([])).finally(()=>{y.current=!1}))},w=m.useMemo(()=>h5(e,a),[e,a]),p=m.useMemo(()=>m5(w,u),[w,u]),x=d&&u.trim()!=="",v=p.some(j=>j.image);m.useEffect(()=>g(0),[u]),m.useEffect(()=>{if(!x)return;const j=S=>{var N;(N=i.current)!=null&&N.contains(S.target)||f(!1)};return document.addEventListener("pointerdown",j),()=>document.removeEventListener("pointerdown",j)},[x]);const k=j=>{f(!1),r(j.to)},E=j=>{j.key==="ArrowDown"&&p.length?(j.preventDefault(),f(!0),g(S=>(S+1)%p.length)):j.key==="ArrowUp"&&p.length?(j.preventDefault(),g(S=>(S-1+p.length)%p.length)):j.key==="Enter"&&x&&p[h]?(j.preventDefault(),k(p[h])):j.key==="Escape"&&(x?f(!1):c(""))},C=a===null&&u.trim()!=="";return o.jsxs("div",{ref:i,className:"relative mb-8 max-w-full",style:{width:t?`${t}px`:"100%"},children:[o.jsx("label",{htmlFor:`${s}-input`,className:"sr-only",children:n("vehicleSearch.label")}),o.jsxs("div",{className:"relative flex items-center",children:[o.jsx(nP,{className:"pointer-events-none absolute left-4 h-[18px] w-[18px] text-neutral-400","aria-hidden":"true"}),o.jsx("input",{id:`${s}-input`,type:"search",role:"combobox","aria-expanded":x,"aria-controls":`${s}-list`,"aria-autocomplete":"list","aria-activedescendant":x&&p[h]?`${s}-${p[h].key}`:void 0,autoComplete:"off",spellCheck:!1,value:u,placeholder:n("vehicleSearch.placeholder"),onFocus:()=>{b(),f(!0)},onChange:j=>{b(),c(j.target.value),f(!0)},onKeyDown:E,className:"vehicle-search-input w-full rounded-xl border border-neutral-300 bg-gradient-to-b from-white to-neutral-50 py-3.5 pl-11 pr-11 text-[15px] text-neutral-900 outline-none transition-[border-color,box-shadow] duration-200 placeholder:text-neutral-400 focus:border-brand-500 dark:border-neutral-700 dark:from-neutral-800 dark:to-neutral-900 dark:text-white dark:placeholder:text-neutral-500 [&::-webkit-search-cancel-button]:hidden"}),u&&o.jsx("button",{type:"button",onClick:()=>c(""),"aria-label":n("vehicleSearch.clear"),className:"absolute right-3 rounded-md p-1 text-neutral-400 transition hover:text-neutral-700 dark:hover:text-neutral-200",children:o.jsx(Ei,{className:"h-4 w-4"})})]}),x&&o.jsx("div",{className:"absolute inset-x-0 top-full z-30 mt-2 overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-lg dark:border-neutral-800 dark:bg-neutral-900",children:p.length>0?o.jsx("ul",{id:`${s}-list`,role:"listbox",className:"max-h-[360px] overflow-y-auto py-1",children:p.map((j,S)=>o.jsx("li",{id:`${s}-${j.key}`,role:"option","aria-selected":S===h,children:o.jsxs(G,{to:j.to,onClick:()=>f(!1),onMouseEnter:()=>g(S),className:`flex items-center gap-3 px-4 py-2.5 text-[15px] ${S===h?"bg-neutral-100 dark:bg-neutral-800":""}`,children:[j.type==="model"?o.jsxs(o.Fragment,{children:[j.image?o.jsx("img",{src:j.image,alt:"",loading:"lazy",className:"h-9 w-14 shrink-0 rounded object-cover"}):v&&o.jsx("span",{className:"h-9 w-14 shrink-0 rounded bg-neutral-100 dark:bg-neutral-800"}),o.jsxs("span",{className:"min-w-0 flex-1 truncate text-neutral-900 dark:text-white",children:[o.jsx("span",{className:"text-neutral-500 dark:text-neutral-400",children:j.brand})," ",j.label]})]}):o.jsxs("span",{className:"min-w-0 flex-1 truncate text-neutral-900 dark:text-white",children:[j.label,o.jsx("span",{className:"ml-2 text-xs uppercase tracking-wider text-neutral-500 dark:text-neutral-400",children:n("vehicleSearch.allModels")})]}),o.jsx(uT,{className:`h-4 w-4 shrink-0 text-brand-500 transition-opacity ${S===h?"opacity-100":"opacity-0"}`,"aria-hidden":"true"})]})},j.key))}):o.jsx("div",{id:`${s}-list`,className:"px-4 py-3 text-sm text-neutral-500 dark:text-neutral-400",children:C?n("vehicleSearch.loading"):o.jsxs(o.Fragment,{children:[n("vehicleSearch.noResults")," ",o.jsx(G,{to:"/kontakt",className:"font-semibold text-brand-500 hover:underline",children:n("vehicleSearch.contact")})]})})})]})}function g5(){const[e,t]=m.useState(null),[n,r]=m.useState(null),s=Oo(),{t:i}=ye(),a=lf(),{vehicle_tile_width:l,vehicle_tile_height:u}=kt(),c={width:`${l}px`,height:`${u}px`},d=m.useRef(null),[f,h]=m.useState(0);m.useEffect(()=>{const p=d.current;if(!p)return;const x=new ResizeObserver(([v])=>h(v.contentRect.width));return x.observe(p),()=>x.disconnect()},[]);const g=16,y=e?e.length:6,b=Math.max(1,Math.min(y,Math.floor((f+g)/(Number(l)+g)))),w=f&&y?b*Number(l)+(b-1)*g:void 0;return vr({title:i("vehicleSelect.metaTitle"),description:i("vehicleSelect.metaDescription"),path:"/fahrzeuge"}),m.useEffect(()=>{s.vehicles.enabled&&!s.bypass||oe.get("/brands").then(t).catch(p=>r(p))},[s.vehicles.enabled,s.bypass]),s.vehicles.enabled&&!s.bypass?o.jsx(Ci,{message:s.vehicles.message}):o.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[o.jsx("div",{ref:d}),s.vehicles.enabled&&s.bypass&&o.jsx(Ti,{inline:!0}),o.jsx(Ye,{k:"vehicleSelect.title",as:"h1",className:"mb-2 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),o.jsx(Ye,{k:"vehicleSelect.intro",as:"p",className:"mb-6 block text-neutral-600 dark:text-neutral-300"}),o.jsx(p5,{brands:e,width:w}),n&&o.jsx("p",{className:"text-red-600",children:typeof n=="string"?n:Ho(n,i)}),e===null&&!n&&o.jsx("div",{className:"flex flex-wrap gap-4","aria-busy":"true","aria-label":i("vehicleSelect.loading"),children:Array.from({length:6},(p,x)=>o.jsx("div",{style:c,className:"shrink-0 animate-pulse rounded-xl bg-neutral-200 dark:bg-neutral-800"},x))}),(e==null?void 0:e.length)===0&&!n&&o.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:i("vehicleSelect.empty")}),o.jsx("div",{className:"flex flex-wrap gap-4",children:(e||[]).map(p=>p.image_path?o.jsxs(G,{to:`/fahrzeuge/${p.slug}`,style:c,className:"group relative block shrink-0 overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[o.jsx("img",{src:p.image_path,alt:"",loading:"lazy",decoding:"async",width:l,height:u,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),o.jsx(fe,{entity:"brands",id:p.id,field:"name",lang:"de",value:p.name,className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:mr(a,`brands.${p.id}.name`)})]},p.id):o.jsx(G,{to:`/fahrzeuge/${p.slug}`,style:c,className:"flex shrink-0 flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-white px-6 text-center font-semibold text-neutral-800 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-500 hover:shadow-md dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-100",children:o.jsx(fe,{entity:"brands",id:p.id,field:"name",lang:"de",value:p.name,style:mr(a,`brands.${p.id}.name`)})},p.id))})]})}function ff(){const{t:e}=ye(),{phone:t}=kt(),n=Io();return vr({title:e("notFound.metaTitle"),noindex:!0}),o.jsxs("div",{className:"mx-auto max-w-2xl px-4 py-20 text-center sm:px-6",children:[o.jsx("p",{className:"text-sm font-semibold uppercase tracking-[4px] text-brand-500",children:"404"}),o.jsx("h1",{className:"mt-3 text-3xl font-bold text-neutral-900 dark:text-white sm:text-4xl",children:e("notFound.title")}),o.jsx("p",{className:"mx-auto mt-4 max-w-md text-neutral-600 dark:text-neutral-300",children:e("notFound.text")}),o.jsxs("div",{className:"mt-10 flex flex-wrap justify-center gap-3",children:[!n("page.vehicles")&&o.jsxs(G,{to:"/fahrzeuge",className:"inline-flex items-center gap-2 rounded-md bg-brand-500 px-5 py-3 text-sm font-semibold text-white shadow-sm hover:bg-brand-600",children:[o.jsx(oo,{className:"h-4 w-4"}),e("notFound.toVehicles")]}),o.jsxs(G,{to:"/kontakt",className:"inline-flex items-center gap-2 rounded-md border border-neutral-300 px-5 py-3 text-sm font-semibold text-neutral-700 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",children:[o.jsx(vc,{className:"h-4 w-4"}),e("notFound.toContact")]}),t&&o.jsxs("a",{href:rs(t),className:"inline-flex items-center gap-2 rounded-md border border-neutral-300 px-5 py-3 text-sm font-semibold text-neutral-700 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",children:[o.jsx(zn,{className:"h-4 w-4"}),t]})]}),o.jsx(G,{to:"/",className:"mt-8 inline-block text-sm text-neutral-500 underline hover:text-brand-500",children:e("notFound.toHome")})]})}function x5(){const{brandSlug:e}=kd(),[t,n]=m.useState(null),[r,s]=m.useState(null),i=Oo(),{t:a}=ye(),l=lf(),u=qe(t?`brands.${t.brand.id}.name`:""),{vehicle_tile_width:c,vehicle_tile_height:d}=kt(),f={width:`${c}px`,height:`${d}px`};return m.useEffect(()=>{i.vehicles.enabled&&!i.bypass||oe.get(`/brands/${e}/models`).then(n).catch(h=>s(h))},[e,i.vehicles.enabled,i.bypass]),vr({title:t?`${t.brand.name} ${a("brandPage.titleSuffix")}`:a("brandPage.metaTitleFallback"),description:t?a("brandPage.metaDescription")(t.brand.name):void 0,path:`/fahrzeuge/${e}`}),i.vehicles.enabled&&!i.bypass?o.jsx(Ci,{message:i.vehicles.message}):r?r.status===404?o.jsx(ff,{}):o.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:Ho(r,a)}):t?o.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[i.vehicles.enabled&&i.bypass&&o.jsx(Ti,{inline:!0}),o.jsxs("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:[o.jsx("span",{style:u,children:t.brand.name})," – ",a("brandPage.titleSuffix")]}),t.models.length===0&&o.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:a("brandPage.empty")}),o.jsx("div",{className:"flex flex-wrap gap-4",children:t.models.map(h=>h.image_path?o.jsxs(G,{to:`/fahrzeuge/${e}/${h.slug}`,style:f,className:"group relative block shrink-0 overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[o.jsx("img",{src:h.image_path,alt:"",loading:"lazy",decoding:"async",width:c,height:d,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),o.jsx(fe,{entity:"car_models",id:h.id,field:"name",lang:"de",value:h.name,className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:mr(l,`car_models.${h.id}.name`)})]},h.id):o.jsx(G,{to:`/fahrzeuge/${e}/${h.slug}`,style:f,className:"flex shrink-0 flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-white px-6 text-center font-semibold text-neutral-800 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-500 hover:shadow-md dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-100",children:o.jsx(fe,{entity:"car_models",id:h.id,field:"name",lang:"de",value:h.name,style:mr(l,`car_models.${h.id}.name`)})},h.id))})]}):o.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:a("brandPage.loading")})}function y5({text:e}){return e?e.split(/(\*\*[^*]+\*\*)/g).map((n,r)=>{const s=n.match(/^\*\*([^*]+)\*\*$/);return s?o.jsx("strong",{children:s[1]},r):o.jsx("span",{children:n},r)}):null}const _p="data:image/webp;base64,UklGRmoNAABXRUJQVlA4IF4NAAAQjACdASrgAVYDPlEok0ajoqGhIRK4IHAKCWlu/F+5xDCoDux8VXNtc99B5Uf715Q+k/+V6E/yD7bfvf7tYI7QKys1Pu/n/K9wD+L/0L/aeqHflfZf937AH81/p//N/yXr9f9f+M/yf7c+4D6R/7n+O+BL9d+rb+0f//9yX9VQU+fHDhw4cN7KTkCBAgQIECBAgQIEB8GtgzU5WrVq1atWrVq1atTTWWxGRvDLM5r169evXr169evVcNgPhleRXp06dOnTp06dOnTpUIn65+OKaJVsmzZs2bNmzZs2bNmSyYC6ipEunTp06dOnTp06dOlydZVuN901q1atWrVq1atWrVXZqLYS16JYyeHDhw4cOHDhw4cN4wtQeDaQLgECBAgQIECBAgQIDddB6sEmQB2atWrVq1atWrVq1aq1iYS5JU9iBlzXr169evXr169evXeEPp+8N6OklatWrVq1atWrVq1V3IfqDdZ8CK1AgQIECBAgQIECBBQFoI3bXHSzdGb8+OHDhw4cOHDhw4ZwLNj/Gx48ePHjx48ePHjx5HaZ5q8hFQPLVq1atWrVq1atWrVWlrSSS1atWrVq1atWrVq1VouJ4vs1atWrVq1atWrVqzMNN6naRaj4OHDhw4cOHDhwzggYy8goXr169evXr169evXbAmy3nWg79+/fv379+/fv377Aw+GV3JG24BIkSJEiRIkSJEiRH091sORb3KZK2rVq1atWrVq1atWZgOgxn2g3CECBAgQIECBAgQHwEh4tRYq5WHRSJEiRIkSJEiRIkRmQ4gXd9q0Xa9evXr169evXr169SUP3aSDmqBOfHDhw4cOHDhw4cN/rYXzoW6jx48ePHjx48ePHjwyNgV/F/hRIkSJEiRIkSJEiRGcgeccx2x48ePHjx48ePHjx5+h2DL7y1q1atWrVq1atWrVqrLjxn1+UevXr169evXr169epWz/ixb7G7Fx48ePHjx48ePHjx64Dpo0+TFzjw4cOHDhw4cOHDhwr64/FOVqj1ftlBYsWLFixYsWLFixsB93m6MKtrfi/YePHjx48ePHjx48eGCFP4MdBX+BXbQiRIkSJEiRIkSJEiA+X4/Ne4l0FixYsWLFixYsWLTKZjxkHLs7TTrVq1atWrVq1atWrSGY83Cktx0PPjhw4cOHDhw4cN/7Xmd/H4DxEePHjx48ePHjx48ct7KWpas7p5jy5cuXLly5cuXLlyM+h2/gRIkSJEiRIkSJEiRAPRMs9EnbFixYsWLFixYsWLBwJstxClHwcOHDhw4cOHDhw3+o6GvCGxY8ePHjx48ePHjx45aAayr3BCnnxw4cOHDhw4cOG/2HuJWxIvK1JLZs2bNmzZs2bNmyAMNnZLnTo6dOnTp06dOnTp06Vd0rFPQfnwwCPHjx48ePHjx48eOU7jRhCFUn5bFixYsWLFixYsWKZRr/1LzwcOHDhw4cOHDhw4ZshIGgexQoECBAgQIECBAgQH+hD+jvXr169eu0AAP7/2BA2pStbx3f0LK6/mZcFuZpv73FLTm7GUv07j8lFLoOGX1EwKUHfPc4FImBkAvjxF1E2TgBogJKpQ2lbMv5bOqPckB4PELJo9ZXlMwGup4PkMOtTZPmrbNoaCJqn0H4Bx7A0xA439P5hkMGBnAEfInQIN5UeUIDb3y6tLej2gR8HhJ5XmTsxvmM15ltL5ZwdGmoNeW8NevUVUKqJ8mNngu7ocCsyGYaeYOGGZBBt6rj6bPVKVbxvb8onw6mljAaaxGTz0W+aNPv06kK3qhDe6/uHi8kg2qvjF3njhRMyOJKZzg12h4qOtVgTuKPAMRWYDkgwiRs9iYqcumonNNXvXk3FAk2LO5XnyjtD5sHSUO3pIrztpBvqq+UJzKeIwGBlPwA2NP46tOJxLzbrKeH4SQjt2HAsbrVcQ/b/TgKZGPwaqfGDN+OjqJK3Z9dyCkGGfGKeG1w9+HSZTm/qh052lQEJAcdUX6vm/+sDBxtrfl4Sg8iMcVnDsfTKJpsTYF/vzJ1oQ6/VPyIX1HpDwnPXsptu9rKDFazlkwc3ofi8uKJmycgPiG9xOLlzn4Af8Dm+LcjJUMAtA7XeZPLlW1bwogbRthU8oA4LcURuku6eXDJ1eb1IKUU7k/UK0cBeK+R5YVcmrOnZIyHzcIaClYnrIwerP535fHv4VXjURTO6/85BvSeTNWvQGqkW5v1hG6AEMrxBryfat3kmr+SNEz5wC2f54z1O7C2KsRpt3maISh9PhMg7jDIxmVe07eHtkLtz6v3yQUJQV95yazDYpH5JfpuYSb8dtmB1cKjeoDTPvik9dCA1UFCTZBfojpIOwXdwAR7JEdZkEi/24hMNKJJlB6udZZKqNJB1hNl24Z++z6lAGSAuRgSwDZGdbqxs+0iL6wmRHilqPOiYB6hQiPZ7cfpMZxesqRwyhcf1O29w4ORG/7BlerR8hYvY4B1XsPYbDORvPk6FHIDXwTXGpuDIta7G4F6RNDdOvCFkAl53GZo5h/p2QkWUry5YuyegnPlKjT3He6ewYypA9YOvMhaqip7kr9sF4TU2bX9foKZ+FFZNzhyySS+13+g4BdJo9YF3bw5b6eSxUfTWiDLNh50VjuqRQWHUEkiA8zJqnqkKCwuDy6iY2oF20FJQlGIPpCDKPBzdXSb/n9NDltaoUlbam7cDAU7CwNdaWFXTABRk0S0e49iF4tO106Uwul7DGYpq0Eu71TnKUjCtEBc83QH8skvRzHniEne3AtJLYRH0cMNSSzeCJ1g+Nfc8RaZkhLhCaZGZdYe5j0LGmQnVFt2iapZvGBi7Sw0X56zdziC9Foq0OPsqKFetZdICc2eUV5Vu1+nvisSzn8wlSDUt3OmRkt/gJxfJQfWxcu5HZ26qqNpA4ablWrX4E9DEmvXzpFGYCnYJMheN2BlWwBVLh1cyQ8INngXaoB8I5Pj9oYyuz/W+jvJQ6G074luX9D3pLkuc88D0Hae3ZqXrRYRzGF1vD8pHsk9Co8B6rpE/4GEwW/zsCtnjz5G8m4KFwf2qW1k0HkNv7Nlg38bcz6TdTzuw/jega5XZQQhflLu4I6l+s90BHFIR+JEXTBBqJwT+IgTnpHNc+h5Ek74HiKqXuGUNGIKIozHkiFxMlnrsklrpweBzYY6ype9CzepAuQF63xC/eIJw1pMZEC1pPgq/r+1gWx5M6g8fpu2O12sb6pLeqT+G4mK3yHMZTojfp1xwQedRmwZnWQ8SCh4XV2a/+3OTz4D4pmmumyBV7V2VW3he8y6usinSjfYPxLyTng27fgw6jQhHl2mVhxBBjiwr5ljvJV7L+MJYDiZjGWfBCsTmehk6rbNt7ahTJpHu4B9ctRqiZXjx0zGpTF91OKifmy4nTq31p1XaIsZAHCWvItXKeke06KKKRTIm6mCT9yBJVwG1sqQhjrkP77q0/JGYgOwgdCQCstsAZQ0FlOrGYXYTIQK/krLyCAZjg8vP/Ers/KVN8F88OsyU5/T1e5ba8A2F63qgwhtkWoVIEZErOVL8sM/DtpWTlcBNsvVOFl4tT+Sk6a2ScCptFL5F6cZXTIw8JmgoCbyqB6xyU+uPP5y09s5T8MDC7Em7NpxCjgD39eed40gHQrBm6CtAbS9JOCVPkPxbpcGDj/LoAGbnyYzMpOmTi28LJ9FTIqyGuAI0jxY/QpNelOOEvNK3io1HeYkK3AprImDk99tlUjgt9bc3ejCOFDXt9LqGHjFssGrhVHyJBmWjwHQipcIMHxF2jfP5jfAGuHtJRRncHIFgLWmJ1XmzJ0LLqWCJShdJSJLc7L6YeVcgKfzOZCwhtzJ7VeI3uBhPXQNOqCf5tlQ32HApAMvCIiBwhYrpfFo/kvjfTMB/NJ0w2Lk8GAFfFQY+U6uX1oB0hztGmA5HggJTwgLo8exG64m3Xu4fg2g4MmQol7z6xNwwubABnpoS3Og85giFkaarUP2ovQyixFpXki8Xf5a5NwjUGCPbx+LD3WKJiBtkiHsYMMV/VAZVNvdg/Ph/V4ZYOr+hw7g9mOJXi+oVZxG9pqJC9w8nRkegsnQ2lpRHn22lTsIa9aOkR0X8zp/IajQxUzv057a3WptBst0EZbZtfmWp6h2K0sDQS9oQT1PqOkGDJlz6ZHZzDMShDTcwJfIZMdnjpeHdPoYoqlcn3M8daRuMeTSP3mabP1/pdQrs6Wl7ToKog2Au/gv46pUMgVcKmdWNJdDF8RplMMXJpU2tZMdkTWq4ofSypsCfuWfeHOpFQGJdFF6OoH2pDJXvkqpj1a832g3uYtVQg1TGyqYqI7UBZQy4NEZbdj6O/s6MNEnfujUDQ8QZj7rSE2RI77egKDWzM708AsvlMFoeX4CVP09rMzXNP2aOZwY7zOBTvBgEEqCWlXAFlY8pW0zIm16gqSPiwRUgH41i1PuJx382C0zTWGT243ZhLnyOIlreUrMQAfwR/oYt+ljnDFKqa5PEczDPa+u/vWmR6UM+Q/lLFiIlgBJTfaekWoeLpPd9FPN4gIHzK1ZS8kDHyq3lh/e6FQ84a4Zg6JlfQC/qhAAAAA==";function In(e,t,n){if(!e)return"";if(n==="en"){const r=e[`${t}_en`];if(r)return r}return e[t]}const v5=(e,t,n)=>{t/=100,n/=100;const r=a=>(a+e/30)%12,s=t*Math.min(n,1-n),i=a=>n-s*Math.max(-1,Math.min(r(a)-3,Math.min(9-r(a),1)));return[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)]},Ul=(e,t,n)=>`rgb(${v5(e,t,n).join(", ")})`,Mp=e=>e.map(([t,n,r,s,i,a])=>({bgTop:Ul(t,n,r),border:Ul(t,n,r+8),accent:Ul(s,i,a),img:null})),Lp={graphite:[{accent:"#b6b6b6",border:"#2a2a2a",bgTop:"#1c1c1c",img:wv},{accent:"#d3d3d3",border:"#2e2e2e",bgTop:"#212121",img:bv},{accent:"#8fb8bd",border:"#26383b",bgTop:"#16282b",img:kv},{accent:"#6fbf73",border:"#1f3a24",bgTop:"#122916",img:Sv},{accent:"#63d34f",border:"#204a1c",bgTop:"#123312",img:jv},{accent:"#8bea3c",border:"#2b5518",bgTop:"#173a0f",img:Ev},{accent:"#d9a83c",border:"#4a3a16",bgTop:"#33270d",img:Cv},{accent:"#f2c14e",border:"#5a4718",bgTop:"#3d2f0c",img:Tv}],"deep-blue":Mp([[215,18,11,210,15,60],[212,25,11,208,32,60],[210,38,12,206,46,60],[212,46,12,205,56,61],[214,52,12,205,63,62],[216,58,12,205,68,63],[220,62,12,212,73,65],[226,66,12,216,78,68]]),"warm-bronze":Mp([[30,15,11,34,22,60],[34,32,11,34,46,60],[32,46,12,30,58,60],[26,52,12,24,65,60],[20,55,12,18,68,60],[14,55,12,12,68,61],[8,52,12,6,64,62],[2,50,12,358,60,63]])},w5="#f2f2f2",Ap="#8a8a8a",Dp="#c4c4c4",Rp=5,b5=3,k5={recommended:{Icon:cP,className:"bg-brand-500 text-white"},popular:{Icon:DT,className:"bg-amber-400 text-neutral-950"},tip:{Icon:FT,className:"bg-sky-500 text-white"},coming_soon:{Icon:nv,className:"bg-white text-neutral-900"},custom:{Icon:null,className:"bg-brand-500 text-white"}};function S5({pkg:e,tier:t,tierT:n,layout:r,bullets:s,formatPrice:i,contactUrl:a,priceNote:l,t:u}){const[c,d]=m.useState(!1),f=Ue().canEdit("packages"),[h,g]=m.useState(!1),y=m.useRef(null),b=s.length-Rp,w=c?s:s.slice(0,Rp);m.useLayoutEffect(()=>{const N=y.current;if(!N||c){g(!1);return}const P=()=>g([...N.querySelectorAll("[data-clamp]")].some(B=>B.scrollHeight>B.clientHeight+1));P();const V=new ResizeObserver(P);return V.observe(N),()=>V.disconnect()},[c,s.length,e.description]);const p=lf(),x=mr(p,`packages.${e.id}.description`),v=mr(p,`packages.${e.id}.price_text`),{package_card_height:k}=kt(),E=k5[e.badge],C=r!=="grid",j=e.badge==="custom"?e.badge_text:e.badge&&u(`modelPage.badges.${e.badge}`),S=t.img?null:{backgroundColor:t.accent,WebkitMaskImage:`url(${_p})`,maskImage:`url(${_p})`,maskMode:"luminance",WebkitMaskSize:"cover",maskSize:"cover",WebkitMaskPosition:"center",maskPosition:"center",WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat"};return o.jsxs("div",{style:{borderColor:t.border,background:`linear-gradient(180deg, ${t.bgTop} 0%, #0b0b0b 55%, #080808 100%)`,...C?{gridRow:"span 4",gridTemplateRows:"subgrid",gridTemplateColumns:"minmax(0, 1fr)",rowGap:0}:{minHeight:`${k}px`}},className:r==="strip"?"relative grid snap-start overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 dark:shadow-black/40":r==="coverflow"?"relative grid snap-center overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 will-change-transform dark:shadow-black/40":"relative flex flex-col overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 dark:shadow-black/40",children:[t.img?o.jsx("img",{src:t.img,alt:"","aria-hidden":"true",className:"pointer-events-none absolute inset-0 h-full w-full object-cover"}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...S,opacity:.2+n*.45,filter:"blur(18px)"},"aria-hidden":"true"}),o.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...S,opacity:.55+n*.45},"aria-hidden":"true"})]}),E&&j&&o.jsxs("span",{className:`absolute top-2 left-1/2 z-10 flex max-w-[calc(100%-16px)] -translate-x-1/2 items-center gap-1 whitespace-nowrap rounded-full px-3 py-1 text-xs font-bold shadow ${E.className}`,children:[E.Icon&&o.jsx(E.Icon,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),o.jsx("span",{className:"truncate",children:j})]}),o.jsxs("div",{className:"relative z-10 text-center",style:{padding:"34px 20px 0",gridRow:1},children:[o.jsx("div",{style:{fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",letterSpacing:"3px",fontWeight:600,color:t.accent,textTransform:"uppercase",lineHeight:1.1},children:o.jsx(fe,{entity:"packages",id:e.id,field:"name",lang:"de",value:e.name,placeholder:"Paketname"})}),o.jsx("div",{style:{width:"44px",height:"2px",margin:"14px auto 0",background:`linear-gradient(90deg, rgba(255,255,255,0) 0%, ${t.accent} 50%, rgba(255,255,255,0) 100%)`}})]}),s.length>0&&o.jsxs("div",{className:"relative z-10",style:{gridRow:2,padding:"18px 20px 14px",background:c?"linear-gradient(180deg, rgba(8,8,8,0.7) 0%, rgba(8,8,8,0.62) 94%, rgba(8,8,8,0) 100%)":"linear-gradient(180deg, rgba(8,8,8,0.55) 0%, rgba(8,8,8,0.48) 92%, rgba(8,8,8,0) 100%)"},children:[o.jsx(Sc,{entity:"packages",id:e.id,field:"description",value:e.description,label:"Zusätzliche Stichpunkte",hint:"Eine Zeile = ein Stichpunkt (unter den Produkten). **fett** wird fett dargestellt. Die Produkte selbst pflegst du im Admin unter Pakete.",children:o.jsx("ul",{ref:y,className:"space-y-1.5 text-left",children:w.map((N,P)=>o.jsxs("li",{className:"flex items-start gap-2",style:{fontSize:"13px",color:Dp,...N.fromDescription?x:null},children:[o.jsx(tv,{className:"mt-0.5 h-3.5 w-3.5 shrink-0",style:{color:t.accent}}),o.jsx("span",{"data-clamp":!0,className:"min-w-0 leading-snug",style:c?{overflowWrap:"anywhere",hyphens:"auto"}:{overflowWrap:"anywhere",hyphens:"auto",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:b5,overflow:"hidden"},children:N.fromDescription?o.jsx(y5,{text:N.text}):N.text.replace(/\//g,"/")})]},P))})}),(c||b>0||h)&&o.jsxs("button",{type:"button",onClick:()=>d(N=>!N),className:"mt-2.5 flex items-center gap-1 hover:opacity-80",style:{fontSize:"13px",color:t.accent},children:[c?u("modelPage.lessBullets"):b>0?u("modelPage.moreBullets")(b):u("modelPage.showMore"),c?o.jsx(ET,{className:"h-3.5 w-3.5"}):o.jsx(vT,{className:"h-3.5 w-3.5"})]})]}),s.length===0&&f&&o.jsx(Sc,{entity:"packages",id:e.id,field:"description",value:e.description,label:"Zusätzliche Stichpunkte",hint:"Eine Zeile = ein Stichpunkt. **fett** wird fett dargestellt.",className:"relative z-10 mx-5 mt-4 text-center text-xs",style:{gridRow:2,color:Dp},children:"+ Stichpunkte hinzufügen"}),o.jsx("div",{className:"relative z-10 flex-1",style:{gridRow:3}}),o.jsx("div",{className:"relative z-10",style:{gridRow:4,padding:"20px 20px 28px",background:"linear-gradient(180deg, rgba(8,8,8,0) 0%, rgba(8,8,8,0.85) 45%, rgba(8,8,8,0.95) 100%)"},children:o.jsxs("div",{className:"text-center",children:[!e.price_text&&o.jsx("div",{style:{fontSize:"13px",color:Ap},children:u("modelPage.totalPrice")}),o.jsx("div",{style:{marginTop:"4px",fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",fontWeight:600,letterSpacing:"1px",color:w5,...e.price_text?v:null},children:f?o.jsx(fe,{entity:"packages",id:e.id,field:"price_text",value:e.price_text,placeholder:i(e.total_price),title:"Leer lassen = Preis automatisch aus den Produkten"}):e.price_text||i(e.total_price)}),!e.price_text&&l&&o.jsx("div",{style:{marginTop:"2px",fontSize:"11px",color:Ap},children:l}),o.jsx(G,{to:a(e),onClick:()=>Zt("select_package",{package_name:e.name,value:Number(e.total_price)||void 0,currency:"EUR"}),className:"mt-4 inline-block rounded-md bg-brand-500 px-4 py-2 text-center text-sm font-semibold text-white shadow-lg shadow-brand-500/30 hover:bg-brand-400",children:u("modelPage.requestContact")}),e.video_url&&o.jsx("div",{className:"mt-3",children:o.jsxs("a",{href:e.video_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 rounded-full border border-white/15 bg-white/5 px-3 py-1 text-xs font-semibold text-white transition hover:bg-white/15",children:[o.jsx(TT,{className:"h-4 w-4 text-red-500","aria-hidden":"true"}),u("modelPage.videoLink")]})})]})})]})}function j5(){const{brandSlug:e,modelSlug:t}=kd(),[n,r]=m.useState(null),[s,i]=m.useState(null),a=Oo(),{t:l,language:u}=ye(),c=Ue(),{package_card_theme:d,package_card_layout:f,package_wheel_hint_interval:h,package_card_width:g,package_card_height:y,phone:b,whatsapp:w,price_note:p,price_note_en:x}=kt();gv(!!n&&!!(b||w),{hidesContact:!0});const v=u==="en"&&x||p,k=Fo(),E=(Lp[d]||Lp.graphite).map((_,R)=>{const{custom:X}=k.packageTier(R);return X?{..._,img:X}:_}),C=["grid","strip","coverflow"].includes(f)?f:"strip",j=Math.max(2,Number(h)||8)*1e3,S=m.useRef(null),N=m.useRef(null),P=m.useRef(null),[V,B]=m.useState(!1),se=_=>new Intl.NumberFormat(u==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(_);m.useEffect(()=>{a.vehicles.enabled&&!a.bypass||oe.get(`/models/${e}/${t}/packages`).then(r).catch(_=>i(_))},[e,t,a.vehicles.enabled,a.bypass]),m.useEffect(()=>{const _=S.current;if(C!=="coverflow"||!_)return;let R=0;const X=()=>{R=0;const J=_.scrollLeft+_.clientWidth/2;for(const je of _.children){const Ie=je.offsetLeft+je.offsetWidth/2,Je=Math.max(-1,Math.min(1,(Ie-J)/(je.offsetWidth*1.4))),ht=Math.abs(Je);je.style.transform=`rotateY(${(-Je*35).toFixed(2)}deg) scale(${(1-ht*.13).toFixed(3)}) translateZ(${(-ht*60).toFixed(1)}px)`,je.style.zIndex=String(100-Math.round(ht*50))}},Q=()=>{R||(R=requestAnimationFrame(X))};X(),_.addEventListener("scroll",Q,{passive:!0});const de=new ResizeObserver(Q);return de.observe(_),()=>{_.removeEventListener("scroll",Q),de.disconnect(),cancelAnimationFrame(R)}},[C,n]),m.useEffect(()=>{const _=S.current;if(C==="grid"||!_)return;const R=window.matchMedia("(pointer: coarse)").matches;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let Q=[],de=0;const J=()=>{const Ie=Math.min(_.clientWidth*.4,160);Q.push(setTimeout(()=>_.scrollTo({left:Ie,behavior:"smooth"}),500)),Q.push(setTimeout(()=>_.scrollTo({left:0,behavior:"smooth"}),1250)),R||(Q.push(setTimeout(()=>B(!0),450)),Q.push(setTimeout(()=>B(!1),1700)))},je=new IntersectionObserver(([Ie])=>{Ie.isIntersecting&&(je.disconnect(),J(),de=setInterval(()=>{_.scrollLeft<=1&&J()},j))},{threshold:.35});return je.observe(_),()=>{je.disconnect(),clearInterval(de),Q.forEach(clearTimeout)}},[C,n,j]),m.useEffect(()=>{const _=S.current;if(C==="grid"||!_)return;let R=0,X=0,Q=!1,de=0,J=0;const je=()=>[..._.children].map(pe=>pe.offsetLeft+pe.offsetWidth/2),Ie=(pe,et)=>{let U=0,K=1/0;return pe.forEach((le,mt)=>{const Gn=Math.abs(le-et);Gn{Q=!1;const pe=je();if(!pe.length)return;const et=_.scrollLeft+_.clientWidth/2,U=Ie(pe,et);let K=U;U===de&&Math.abs(J)>4&&(K=J>0?Math.min(de+1,pe.length-1):Math.max(de-1,0));const le=_.scrollWidth-_.clientWidth,mt=Math.max(0,Math.min(pe[K]-_.clientWidth/2,le));_.scrollTo({left:mt,behavior:"smooth"}),clearTimeout(X),X=setTimeout(()=>{_.style.scrollSnapType=""},450)},ht=pe=>{if(Math.abs(pe.deltaX)>Math.abs(pe.deltaY))return;const et=_.scrollWidth-_.clientWidth;if(et<=1)return;const U=_.scrollLeft<=1,K=_.scrollLeft>=et-1;pe.deltaY<0&&U||pe.deltaY>0&&K||(pe.preventDefault(),Q||(Q=!0,J=0,de=Ie(je(),_.scrollLeft+_.clientWidth/2)),J+=pe.deltaY,_.style.scrollSnapType="none",_.scrollLeft+=pe.deltaY,clearTimeout(R),R=setTimeout(Je,150))};return _.addEventListener("wheel",ht,{passive:!1}),()=>{_.removeEventListener("wheel",ht),clearTimeout(R),clearTimeout(X)}},[C,n]),m.useEffect(()=>{const _=S.current,R=N.current,X=P.current;if(C==="grid"||!_||!R||!X)return;let Q=0;const de=()=>{Q=0;const K=_.scrollWidth-_.clientWidth;if(K<=1){R.style.opacity="0",R.style.pointerEvents="none";return}R.style.opacity="1",R.style.pointerEvents="auto";const le=R.clientWidth,mt=Math.max(32,_.clientWidth/_.scrollWidth*le);X.style.width=`${mt}px`,X.style.transform=`translateX(${(_.scrollLeft/K*(le-mt)).toFixed(1)}px)`},J=()=>{Q||(Q=requestAnimationFrame(de))};de(),_.addEventListener("scroll",J,{passive:!0});const je=new ResizeObserver(J);je.observe(_);let Ie=!1,Je=0;const ht=K=>{const le=R.getBoundingClientRect(),mt=X.clientWidth,Gn=Math.min(Math.max(K-le.left-Je,0),le.width-mt);_.scrollLeft=Gn/(le.width-mt)*(_.scrollWidth-_.clientWidth)},pe=K=>{Ie=!0,R.setPointerCapture(K.pointerId),_.style.scrollSnapType="none";const le=X.getBoundingClientRect();Je=K.clientX>=le.left&&K.clientX<=le.right?K.clientX-le.left:X.clientWidth/2,K.clientX>=le.left&&K.clientX<=le.right||ht(K.clientX)},et=K=>{Ie&&ht(K.clientX)},U=K=>{var le;Ie&&(Ie=!1,(le=R.hasPointerCapture)!=null&&le.call(R,K.pointerId)&&R.releasePointerCapture(K.pointerId),_.style.scrollSnapType="")};return R.addEventListener("pointerdown",pe),R.addEventListener("pointermove",et),R.addEventListener("pointerup",U),R.addEventListener("pointercancel",U),()=>{_.removeEventListener("scroll",J),je.disconnect(),cancelAnimationFrame(Q),R.removeEventListener("pointerdown",pe),R.removeEventListener("pointermove",et),R.removeEventListener("pointerup",U),R.removeEventListener("pointercancel",U)}},[C,n]),vr({title:n?l("modelPage.metaTitle")(n.model.brand_name,n.model.name):l("modelPage.metaTitleFallback"),description:n?l("modelPage.metaDescription")(n.model.brand_name,n.model.name):void 0,path:`/fahrzeuge/${e}/${t}`});const ne=qe(n?`car_models.${n.model.id}.name`:"");if(a.vehicles.enabled&&!a.bypass)return o.jsx(Ci,{message:a.vehicles.message});if(s)return s.status===404?o.jsx(ff,{}):o.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:Ho(s,l)});if(!n)return o.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:l("modelPage.loading")});const{model:q}=n,W=n.packages.map(_=>({..._,name:c.getValue("packages",_.id,"name","de",_.name),description:c.getValue("packages",_.id,"description",u,In(_,"description",u)),tagline:In(_,"tagline",u),price_text:c.getValue("packages",_.id,"price_text",u,In(_,"price_text",u))})),I=new Map([...W].sort((_,R)=>_.total_price-R.total_price).map((_,R)=>[_.id,R])),T=_=>{const R=_.tier_count??W.length,X=_.tier_rank??I.get(_.id)??0,Q=R<=1?0:X/(R-1),de=Math.round(Q*(E.length-1));return{tier:E[de],tierT:Q}},M=_=>[..._.products.map(R=>({text:R.name_override||R.scraped_name||l("modelPage.productLoading"),fromDescription:!1})),...(_.description||"").split(`
-`).map(R=>R.trim()).filter(Boolean).map(R=>({text:R,fromDescription:!0}))],L=_=>`/kontakt?${new URLSearchParams({brand:q.brand_name,model:q.name,package:_.name,packageId:_.id,total:_.total_price,brandSlug:e,modelSlug:t}).toString()}`,D=`/kontakt?${new URLSearchParams({brand:q.brand_name,model:q.name}).toString()}`,H=l("modelPage.whatsappText")(q.brand_name,q.name);return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"mx-auto max-w-6xl px-4 pt-12 sm:px-6",children:[a.vehicles.enabled&&a.bypass&&o.jsx(Ti,{inline:!0}),o.jsxs("h1",{className:`text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl ${W.length?"mb-2":"mb-8"}`,children:[q.brand_name," ",o.jsx(fe,{entity:"car_models",id:q.id,field:"name",lang:"de",value:q.name,style:ne})," – ",l("modelPage.titleSuffix")]}),W.length===0&&o.jsxs("div",{className:"pb-12",children:[o.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:l("modelPage.empty")}),o.jsx(G,{to:D,className:"mt-5 inline-block rounded-md bg-brand-500 px-5 py-3 text-sm font-semibold text-white shadow-sm hover:bg-brand-600",children:l("modelPage.customRequest")})]})]}),W.length>0&&o.jsx("section",{className:"py-10 sm:py-14",style:{fontFamily:"'Barlow', sans-serif"},children:o.jsxs("div",{className:C==="grid"?"mx-auto max-w-6xl px-4 sm:px-6":"relative mx-auto max-w-[1880px] px-4 sm:px-6",children:[o.jsx("div",{ref:C==="grid"?void 0:S,className:C==="grid"?"grid items-stretch gap-[18px]":"grid select-none gap-x-[18px] overflow-x-auto pb-3 snap-x snap-mandatory [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",style:C==="grid"?{gridTemplateColumns:`repeat(auto-fill, minmax(${g}px, 1fr))`,gridAutoRows:"1fr"}:{gridAutoFlow:"column",gridAutoColumns:`${g}px`,gridTemplateRows:"auto auto 1fr auto",minHeight:`${Number(y)+(C==="coverflow"?22:12)}px`,...C==="coverflow"?{perspective:"1200px",paddingLeft:`calc(50% - ${g/2}px)`,paddingRight:`calc(50% - ${g/2}px)`,paddingTop:"10px"}:null},children:W.map(_=>{const{tier:R,tierT:X}=T(_);return o.jsx(S5,{pkg:_,tier:R,tierT:X,layout:C,bullets:M(_),formatPrice:se,contactUrl:L,priceNote:v,t:l},_.id)})}),C!=="grid"&&o.jsx("div",{className:`pointer-events-none absolute inset-x-0 top-1/2 z-[200] flex -translate-y-1/2 justify-center transition-opacity duration-300 ${V?"opacity-100":"opacity-0"}`,"aria-hidden":"true",children:o.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-neutral-900/85 px-4 py-2 text-xs font-medium text-white shadow-lg backdrop-blur-sm",children:[o.jsx(bT,{className:"h-3.5 w-3.5 text-brand-400"}),o.jsx(GT,{className:"h-4 w-4 text-brand-400"}),o.jsx(ST,{className:"h-3.5 w-3.5 text-brand-400"}),o.jsx("span",{children:l("modelPage.wheelHint")})]})}),C!=="grid"&&o.jsx("div",{ref:N,className:"relative mx-auto mt-5 h-2 w-56 max-w-full cursor-pointer rounded-full bg-neutral-900/10 transition-opacity duration-200 dark:bg-white/10",style:{touchAction:"none"},"aria-hidden":"true",children:o.jsx("div",{ref:P,className:"absolute left-0 top-0 h-full rounded-full bg-brand-500 shadow-[0_0_10px_rgba(107,166,38,0.7)]",style:{width:"48px"}})})]})}),W.length>0&&o.jsxs("div",{className:"mx-auto max-w-6xl px-4 pb-24 text-center sm:px-6 sm:pb-14",children:[o.jsx("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:l("modelPage.customHint")}),o.jsx(G,{to:D,className:"mt-2 inline-block text-sm font-semibold text-brand-600 underline hover:text-brand-500",children:l("modelPage.customRequest")})]}),(b||w)&&o.jsxs("div",{className:"fixed inset-x-0 bottom-0 z-20 flex gap-3 border-t border-neutral-200 bg-white/95 px-4 py-3 shadow-[0_-8px_24px_rgba(0,0,0,0.08)] backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/95 sm:hidden",children:[b&&o.jsxs("a",{href:rs(b),onClick:()=>Zt("contact_call"),className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white",children:[o.jsx(zn,{className:"h-4 w-4"}),l("nav.call")]}),w&&o.jsxs("a",{href:Vo(w,H),target:"_blank",rel:"noopener noreferrer",onClick:()=>Zt("contact_whatsapp"),className:"flex flex-1 items-center justify-center gap-2 rounded-md border border-neutral-300 px-4 py-2.5 text-sm font-semibold text-neutral-700 dark:border-neutral-700 dark:text-neutral-200",children:[o.jsx(rf,{className:"h-4 w-4"}),l("nav.whatsapp")]})]})]})}const E5={car:oo,caravan:gT,"car-front":hT,cog:_T,zap:xP,boxes:dT,"shield-alert":aP,video:mP},C5=m.lazy(()=>Y(()=>import("./iconRegistry-DGdCa1eX.js"),__vite__mapDeps([2,3,4,5])));function T5({name:e,className:t="h-6 w-6",...n}){if(!e)return null;const r=E5[e];return r?o.jsx(r,{className:t,...n}):o.jsx(m.Suspense,{fallback:o.jsx("span",{className:`inline-block ${t}`,"aria-hidden":"true"}),children:o.jsx(C5,{name:e,className:t,...n})})}function P5(){const[e,t]=m.useState([]),n=Oo(),{t:r,language:s}=ye(),i=Ue();return m.useEffect(()=>{oe.get("/services").then(t).catch(()=>t([]))},[]),vr({title:r("leistungen.metaTitle"),description:r("leistungen.metaDescription"),path:"/leistungen"}),n.services.enabled&&!n.bypass?o.jsx(Ci,{message:n.services.message}):o.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[n.services.enabled&&n.bypass&&o.jsx(Ti,{inline:!0}),o.jsx(Ye,{k:"leistungen.title",as:"h1",className:"mb-2 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),o.jsx(Ye,{k:"leistungen.intro",as:"p",className:"mb-10 block max-w-2xl text-neutral-600 dark:text-neutral-300"}),o.jsx("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:e.map(a=>({...a,title:In(a,"title",s),description:In(a,"description",s),cta_label:In(a,"cta_label",s)})).map((a,l)=>o.jsxs(Ke,{index:l%3,shine:!0,className:"overflow-hidden rounded-xl border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900",children:[o.jsxs("div",{className:"relative aspect-[4/3]",children:[a.image_path&&o.jsx("img",{src:a.image_path,alt:a.title,className:"h-full w-full object-cover",loading:"lazy"}),o.jsx("div",{className:"absolute -bottom-5 left-5 flex h-12 w-12 items-center justify-center rounded-full bg-brand-500 text-white shadow-lg ring-4 ring-white dark:ring-neutral-900",children:o.jsx(T5,{name:a.icon_name,className:"h-6 w-6"})})]}),o.jsxs("div",{className:"p-6 pt-8",children:[o.jsx(fe,{entity:"services",id:a.id,field:"title",value:a.title,as:"h2",className:"mb-2 block font-semibold text-neutral-900 dark:text-white"}),o.jsx(fe,{entity:"services",id:a.id,field:"description",value:a.description,as:"p",multiline:!0,className:"mb-3 block text-sm text-neutral-600 dark:text-neutral-300"}),o.jsxs(G,{to:a.cta_url||"/kontakt",className:"text-sm font-semibold text-brand-600 hover:underline dark:text-brand-400",children:[i.canEdit("services")||a.cta_label?o.jsx(fe,{entity:"services",id:a.id,field:"cta_label",value:a.cta_label,placeholder:r("leistungen.contact")}):r("leistungen.contact")," ","→"]})]})]},a.id))}),o.jsxs("div",{className:"mt-12 rounded-xl border border-neutral-200 bg-neutral-50 p-8 text-center dark:border-neutral-800 dark:bg-neutral-900/40",children:[o.jsx(Ye,{k:"leistungen.notListedTitle",as:"h2",className:"mb-2 block text-xl font-bold text-neutral-900 dark:text-white"}),o.jsx(Ye,{k:"leistungen.notListedText",as:"p",className:"mb-5 block text-neutral-600 dark:text-neutral-300"}),o.jsx(G,{to:"/kontakt",className:"inline-block rounded-md bg-brand-500 px-6 py-3 text-sm font-semibold text-white hover:bg-brand-600",children:o.jsx(Ye,{k:"leistungen.contact"})})]})]})}function N5({name:e,description:t,className:n="",children:r}){const{consent:s,acceptAll:i,openSettings:a}=yr();return s.external?r:o.jsxs("div",{className:`flex flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-neutral-50 p-6 text-center dark:border-neutral-800 dark:bg-neutral-900/40 ${n}`,children:[o.jsx("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:t||`${e} wird erst nach deiner Zustimmung geladen, da dabei Daten an Google übertragen werden.`}),o.jsxs("div",{className:"flex flex-wrap justify-center gap-2",children:[o.jsx("button",{type:"button",onClick:i,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:"Laden erlauben"}),o.jsx("button",{type:"button",onClick:a,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Cookie-Einstellungen"})]})]})}const _5=e=>(e||"").replace(/[^\d+]/g,""),Sa={fontFamily:"'Michroma', sans-serif"};function M5({className:e}){return o.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:o.jsx("path",{d:"M12 2a10 10 0 0 0-8.6 15l-1.3 4.8 5-1.3A10 10 0 1 0 12 2zm0 2a8 8 0 1 1-4.2 14.8l-.3-.2-2.6.7.7-2.5-.2-.3A8 8 0 0 1 12 4zm4.3 9.9c-.2-.1-1.4-.7-1.6-.8s-.4-.1-.5.1l-.7.9c-.1.1-.3.2-.5.1a6.5 6.5 0 0 1-3.2-2.8c-.1-.2 0-.4.1-.5l.4-.5.2-.4v-.4l-.7-1.7c-.2-.4-.4-.4-.5-.4h-.5c-.2 0-.4.1-.6.3-.7.7-.9 1.6-.6 2.7.5 1.7 1.6 3.1 3.4 4.2 1.7 1 2.5 1 3.4.9.5-.1 1.4-.6 1.6-1.1.2-.5.2-1 .1-1.1z"})})}function L5({path:e,className:t}){return o.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o.jsx("path",{d:e})})}const A5={premium:"M4 12v3M8 8v11M12 4v16M16 8v11M20 12v3",germany:"M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0 M12 2v2M12 20v2M2 12h2M20 12h2M5 5l1.5 1.5M17.5 17.5 19 19M19 5l-1.5 1.5M6.5 17.5 5 19",individual:"M6 3h12l4 6-10 12L2 9z M11 3 8 9l4 12 4-12-3-6M2 9h20",experts:"M20 6 9 17l-5-5"};function Ip({formatted:e,color:t}){const[n,r]=e.split("€");return o.jsxs("span",{style:{...Sa,color:t},children:[n,o.jsx("span",{style:{fontFamily:"'Barlow', sans-serif"},children:"€"}),r]})}function ea({icon:e,label:t,name:n,type:r="text",required:s,value:i,onChange:a,placeholder:l,autoComplete:u,inputMode:c}){return o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx("label",{htmlFor:`kf-${n}`,className:"text-xs font-semibold uppercase tracking-[2px]",style:{color:"var(--kf-label)"},children:t}),o.jsxs("div",{className:"relative flex items-center",children:[o.jsx(e,{className:"pointer-events-none absolute left-[14px] h-[17px] w-[17px]",style:{color:"var(--kf-fieldicon)"}}),o.jsx("input",{id:`kf-${n}`,name:n,type:r,required:s,autoComplete:u,inputMode:c,value:i,onChange:a,placeholder:l,className:"w-full rounded-lg border py-3.5 pl-[42px] pr-4 text-[15px] outline-none transition-colors",style:{background:"var(--kf-field)",borderColor:"var(--kf-fieldbrd)",color:"var(--kf-text2)"}})]})]})}function D5(){const[e]=vk(),{phone:t,whatsapp:n,contact_email:r,address_street:s,address_zip:i,address_city:a,business_hours:l,price_note:u,price_note_en:c}=kt(),{t:d,language:f}=ye(),h=Fo(),g=h.slot("contact_bg_light").custom,y=h.slot("contact_bg_dark").custom,b={...g&&{"--kontakt-bg-light":`url("${g}")`},...y&&{"--kontakt-bg-dark":`url("${y}")`}},{consent:w}=yr(),p=[s,[i,a].filter(Boolean).join(" ")].filter(Boolean).join(", "),x=encodeURIComponent(p),v=`https://www.google.com/maps/dir/?api=1&destination=${x}`,k=mv(l,d("footer.closed")),E=U=>new Intl.NumberFormat(f==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(U),[C,j]=m.useState(()=>({name:"",email:"",phone:"",vin:"",message:e.get("topic")||""})),[S,N]=m.useState("idle"),[P,V]=m.useState(""),[B,se]=m.useState([]),[ne,q]=m.useState([]),W=m.useRef(Date.now()),I=m.useRef(null),T=e.get("packageId"),M=e.get("brandSlug"),L=e.get("modelSlug"),[D,H]=m.useState(e.get("total")?Number(e.get("total")):null),[_,R]=m.useState(null),X=f==="en"&&c||u;m.useEffect(()=>{!T||!M||!L||oe.get(`/models/${encodeURIComponent(M)}/${encodeURIComponent(L)}/packages`).then(U=>{var le;const K=(le=U==null?void 0:U.packages)==null?void 0:le.find(mt=>String(mt.id)===String(T));K&&(H(Number(K.total_price)),R(K.price_text||null))}).catch(()=>{})},[T,M,L]),m.useEffect(()=>{if(!T){se([]);return}oe.get(`/packages/${T}/upgrades`).then(se).catch(()=>se([]))},[T]);const Q=U=>{q(K=>K.includes(U)?K.filter(le=>le!==U):[...K,U])},de=B.filter(U=>ne.includes(U.id)).reduce((U,K)=>U+Number(K.price),0);vr({title:d("contactPage.metaTitle"),description:d("contactPage.metaDescription"),path:"/kontakt"});const J={brand:e.get("brand")||"",model:e.get("model")||"",package:e.get("package")||""},je=!!(J.brand&&J.model&&J.package),Ie=!je&&!!(J.brand&&J.model),Je=U=>j(K=>({...K,[U.target.name]:U.target.value})),ht=async U=>{var K;U.preventDefault(),N("sending"),V("");try{await oe.post("/contact",{...C,website:((K=U.target.elements.website)==null?void 0:K.value)||"",fill_ms:Date.now()-W.current,brand_name:J.brand||null,model_name:J.model||null,package_name:J.package||null,product_name:e.get("product")||null,package_id:T||null,package_product_id:e.get("productId")||null,upgrade_ids:ne}),N("sent"),j({name:"",email:"",phone:"",vin:"",message:""}),Zt("generate_lead",{package_name:J.package||void 0,value:D||void 0,currency:"EUR"})}catch(le){V(Ho(le,d)),N("idle")}};m.useEffect(()=>{S==="sent"&&I.current&&(I.current.scrollIntoView({behavior:"smooth",block:"center"}),I.current.focus({preventScroll:!0}))},[S]);const pe=je?d("contactPage.whatsappText")(J.brand,J.model,J.package):Ie?d("modelPage.whatsappText")(J.brand,J.model):"",et=[{key:"premium",title:d("contactPage.featurePremiumTitle"),sub:d("contactPage.featurePremiumSub")},{key:"germany",title:d("contactPage.featureGermanyTitle"),sub:d("contactPage.featureGermanySub")},{key:"individual",title:d("contactPage.featureIndividualTitle"),sub:d("contactPage.featureIndividualSub")},{key:"experts",title:d("contactPage.featureExpertsTitle"),sub:d("contactPage.featureExpertsSub")}];return o.jsx("div",{className:"kf-page kontakt-sektion relative w-full overflow-hidden px-4 pb-10 sm:px-10",style:{color:"var(--kf-text2)",fontFamily:"'Barlow', sans-serif",...b},children:o.jsxs("div",{className:"relative z-10 mx-auto max-w-[1280px] pt-10 sm:pt-14",children:[o.jsx("div",{className:"mb-3 text-[13px] font-semibold uppercase tracking-[6px]",style:{color:"var(--kf-accent2)"},children:d("contactPage.heroEyebrow")}),o.jsxs("h1",{className:"text-[34px] leading-[1.08] sm:text-[46px] lg:text-[60px]",style:{...Sa,color:"var(--kf-text)"},children:[d("contactPage.heroTitlePre")," ",o.jsx("span",{style:{color:"var(--kf-accent2)"},children:d("contactPage.heroTitleAccent")})," ",d("contactPage.heroTitlePost")]}),o.jsx("p",{className:"mb-10 mt-5 max-w-[520px] text-lg leading-[1.55]",style:{color:"var(--kf-muted)"},children:d("contactPage.heroSubtitle")}),o.jsxs("div",{className:"grid grid-cols-1 items-start gap-10 min-[981px]:grid-cols-[minmax(0,1.35fr)_minmax(320px,1fr)]",children:[o.jsx("div",{children:o.jsxs("div",{className:"rounded-2xl border p-[22px] sm:p-10",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow)"},children:[je&&o.jsxs("div",{className:"mb-8 rounded-xl border px-6 py-[22px]",style:{background:"var(--kf-pkgbg)",borderColor:"var(--kf-pkgbrd)"},children:[o.jsxs("div",{className:"mb-3.5 flex items-center gap-2.5 text-xs font-bold uppercase tracking-[2px]",style:{color:"var(--kf-accent2)"},children:[o.jsx(XT,{className:"h-4 w-4"}),d("contactPage.packageBoxTitle")]}),o.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-5 gap-y-2 text-[15px]",children:[o.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.contextBrand")}),o.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:J.brand}),o.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.contextModel")}),o.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:J.model}),o.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.contextPackage")}),o.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:J.package})]}),o.jsxs("div",{className:"mt-3.5 flex items-baseline justify-between border-t pt-3.5",style:{borderColor:"var(--kf-pkgbrd)"},children:[o.jsx("span",{className:"text-[13px] font-semibold uppercase tracking-wide",style:{color:"var(--kf-muted)"},children:d("contactPage.packagePrice")}),o.jsx("span",{className:"text-xl",children:_||(D!=null?o.jsx(Ip,{formatted:E(D),color:"var(--kf-text)"}):"—")})]}),X&&!_&&o.jsx("div",{className:"mt-1 text-right text-xs",style:{color:"var(--kf-muted)"},children:X})]}),Ie&&o.jsxs("div",{className:"mb-8 flex items-center gap-3 rounded-xl border px-6 py-4 text-[15px]",style:{background:"var(--kf-pkgbg)",borderColor:"var(--kf-pkgbrd)"},children:[o.jsx(oo,{className:"h-4 w-4",style:{color:"var(--kf-accent2)"}}),o.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.vehicleBoxTitle")}),o.jsxs("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:[J.brand," ",J.model]})]}),B.length>0&&o.jsxs("div",{className:"mb-8 rounded-xl border p-5",style:{background:"var(--kf-field)",borderColor:"var(--kf-fieldbrd)"},children:[o.jsx("div",{className:"mb-3 text-xs font-bold uppercase tracking-[2px]",style:{color:"var(--kf-accent2)"},children:d("contactPage.optionalUpgrades")}),o.jsx("div",{className:"space-y-2",children:B.map(U=>o.jsxs("label",{className:"flex cursor-pointer items-start gap-3 rounded-lg border p-3 text-sm",style:{borderColor:"var(--kf-fieldbrd)"},children:[o.jsx("input",{type:"checkbox",checked:ne.includes(U.id),onChange:()=>Q(U.id),className:"mt-0.5 h-4 w-4 rounded",style:{accentColor:"var(--kf-accent)"}}),o.jsxs("span",{className:"flex-1",children:[o.jsx("span",{className:"block font-semibold",style:{color:"var(--kf-text2)"},children:In(U,"name",f)}),U.description&&o.jsx("span",{className:"block text-xs",style:{color:"var(--kf-muted)"},children:In(U,"description",f)})]}),o.jsxs("span",{className:"font-semibold",style:{color:"var(--kf-accent2)"},children:["+",E(U.price)]})]},U.id))}),ne.length>0&&D!=null&&!_&&o.jsxs("div",{className:"mt-3 flex items-baseline justify-between border-t pt-3 text-sm",style:{borderColor:"var(--kf-pkgbrd)"},children:[o.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide",style:{color:"var(--kf-muted)"},children:d("contactPage.totalWithUpgrades")}),o.jsx(Ip,{formatted:E(D+de),color:"var(--kf-text)"})]})]}),o.jsx("h2",{className:"mb-8 text-xl",style:{...Sa,color:"var(--kf-text)"},children:d("contactPage.formTitle")}),o.jsx("div",{role:"status","aria-live":"polite",children:S==="sent"&&o.jsxs("div",{ref:I,tabIndex:-1,className:"rounded-[10px] border p-5 outline-none",style:{borderColor:"var(--kf-accent)",background:"var(--kf-accentsoft)"},children:[o.jsx("div",{className:"text-base font-bold",style:{color:"var(--kf-accent2)"},children:d("contactPage.sentTitle")}),o.jsx("div",{className:"mt-1 text-sm",style:{color:"var(--kf-muted)"},children:d("contactPage.sentText")}),o.jsx("button",{type:"button",onClick:()=>{W.current=Date.now(),N("idle")},className:"mt-4 text-sm font-semibold underline",style:{color:"var(--kf-text2)"},children:d("contactPage.sendAnother")})]})}),S!=="sent"&&o.jsxs("form",{onSubmit:ht,noValidate:!1,children:[o.jsxs("div",{"aria-hidden":"true",style:{position:"absolute",left:"-10000px",width:"1px",height:"1px",overflow:"hidden"},children:[o.jsx("label",{htmlFor:"kf-website",children:"Website"}),o.jsx("input",{id:"kf-website",name:"website",type:"text",tabIndex:-1,autoComplete:"off",defaultValue:""})]}),o.jsxs("div",{className:"grid grid-cols-1 gap-6 min-[641px]:grid-cols-2",children:[o.jsx(ea,{icon:fP,label:d("contactPage.nameLabel"),name:"name",autoComplete:"name",required:!0,value:C.name,onChange:Je,placeholder:d("contactPage.namePlaceholder")}),o.jsx(ea,{icon:vc,label:d("contactPage.emailLabel"),name:"email",type:"email",autoComplete:"email",required:!0,value:C.email,onChange:Je,placeholder:d("contactPage.emailPlaceholder")}),o.jsx(ea,{icon:zn,label:d("contactPage.phoneLabel"),name:"phone",type:"tel",inputMode:"tel",autoComplete:"tel",value:C.phone,onChange:Je,placeholder:d("contactPage.phonePlaceholder")}),o.jsx(ea,{icon:oo,label:d("contactPage.vinLabel"),name:"vin",value:C.vin,onChange:Je,placeholder:d("contactPage.vinPlaceholder")})]}),o.jsxs("div",{className:"mt-6 flex flex-col gap-2",children:[o.jsx("label",{htmlFor:"kf-message",className:"text-xs font-semibold uppercase tracking-[2px]",style:{color:"var(--kf-label)"},children:d("contactPage.messageLabel")}),o.jsx("textarea",{id:"kf-message",name:"message",rows:5,value:C.message,onChange:Je,placeholder:d("contactPage.messagePlaceholder"),className:"w-full resize-y rounded-lg border px-4 py-3.5 text-[15px] outline-none",style:{background:"var(--kf-field)",borderColor:"var(--kf-fieldbrd)",color:"var(--kf-text2)"}})]}),o.jsx("div",{role:"alert","aria-live":"assertive",children:P&&o.jsx("p",{className:"mt-4 text-sm text-red-600 dark:text-red-400",children:P})}),o.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-5",children:[o.jsxs("button",{type:"submit",disabled:S==="sending",className:"inline-flex items-center gap-3 rounded-lg px-8 py-4 text-sm font-bold uppercase tracking-[3px] transition-[filter,box-shadow] hover:brightness-110 disabled:opacity-60",style:{background:"var(--kf-accent)",color:"var(--kf-btntext)",boxShadow:"0 10px 24px rgba(150,200,20,0.32)"},children:[o.jsx(sP,{className:"h-[18px] w-[18px]"}),d(S==="sending"?"contactPage.sending":"contactPage.submit")]}),o.jsx("div",{className:"text-[13px]",style:{color:"var(--kf-label)"},children:d("contactPage.requiredHint")})]}),o.jsxs("p",{className:"mt-5 text-[13px] leading-relaxed",style:{color:"var(--kf-muted)"},children:[d("contactPage.privacyPre"),o.jsx(G,{to:"/datenschutz",className:"underline",style:{color:"var(--kf-text2)"},children:d("contactPage.privacyLink")}),d("contactPage.privacyPost")]})]})]})}),o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsxs("div",{className:"relative overflow-hidden rounded-2xl border px-[22px] py-[26px] sm:px-8 sm:py-[34px]",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow)"},children:[o.jsx("div",{className:"pointer-events-none absolute -right-[60px] -top-[60px] h-[190px] w-[190px] rounded-full border border-dashed",style:{borderColor:"var(--kf-pkgbrd)"}}),o.jsx("h2",{className:"mb-7 text-[17px]",style:{...Sa,color:"var(--kf-text)"},children:d("contactPage.cardTitle")}),o.jsxs("div",{className:"flex flex-col gap-5",children:[o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:o.jsx(zn,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),o.jsxs("div",{children:[o.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:d("contactPage.phone")}),o.jsx("a",{href:`tel:${_5(t)}`,onClick:()=>Zt("contact_call"),className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:t})]})]}),o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:o.jsx(vc,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),o.jsxs("div",{children:[o.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:d("contactPage.email")}),o.jsx("a",{href:`mailto:${r}`,className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:r})]})]}),o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:o.jsx(sv,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),o.jsxs("div",{children:[o.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:d("contactPage.address")}),o.jsxs("div",{className:"text-base font-semibold leading-[1.4]",style:{color:"var(--kf-text2)"},children:[s,o.jsx("br",{}),[i,a].filter(Boolean).join(" ")]})]})]}),n&&o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:o.jsx(M5,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),o.jsxs("div",{children:[o.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:d("nav.whatsapp")}),o.jsx("a",{href:Vo(n,pe),target:"_blank",rel:"noopener noreferrer",onClick:()=>Zt("contact_whatsapp"),className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:n})]})]})]}),o.jsxs("div",{className:"mt-7 border-t pt-6",style:{borderColor:"var(--kf-divider)"},children:[o.jsx("div",{className:"mb-3 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:d("contactPage.hours")}),o.jsx("div",{className:"grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 text-[15px]",children:k.map(U=>o.jsxs("span",{style:{display:"contents"},children:[o.jsx("span",{style:{color:"var(--kf-label)"},children:U.days}),o.jsx("span",{children:U.label})]},U.key))})]})]}),o.jsxs("div",{className:"relative overflow-hidden rounded-2xl border",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow)"},children:[w.external&&o.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"absolute left-3.5 top-3.5 z-10 inline-flex items-center gap-2 rounded-lg border px-3.5 py-2 text-[13px] font-semibold hover:border-[var(--kf-accent)]",style:{background:"var(--kf-pill)",borderColor:"var(--kf-pillbrd)",color:"var(--kf-text2)",boxShadow:"var(--kf-shadow2)"},children:[d("contactPage.mapOpenChip"),o.jsx(LT,{className:"h-3.5 w-3.5",style:{color:"var(--kf-accent2)"}})]}),o.jsx(N5,{name:d("contactPage.mapEmbedName"),className:"h-[210px] w-full",children:o.jsx("div",{className:"h-[210px] overflow-hidden",children:o.jsx("iframe",{title:d("contactPage.mapIframeTitle"),src:`https://www.google.com/maps?q=${x}&output=embed`,width:"100%",height:"290",style:{border:0,display:"block",marginTop:"-60px"},loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})})}),o.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2.5 border-t px-4 py-4 text-[13px] font-bold uppercase tracking-[3px] hover:bg-[var(--kf-accentsoft)]",style:{borderColor:"var(--kf-divider)",color:"var(--kf-accent2)"},children:[d("contactPage.routePlan")," →"]})]})]})]}),o.jsx("div",{className:"mt-10 grid grid-cols-1 overflow-hidden rounded-2xl border min-[641px]:grid-cols-2 min-[901px]:grid-cols-4",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow2)"},children:et.map(U=>o.jsxs("div",{className:"flex items-center gap-4 border-b p-6 last:border-b-0 min-[641px]:border-b-0 min-[641px]:border-r min-[641px]:last:border-r-0",style:{borderColor:"var(--kf-divider)"},children:[o.jsx("div",{className:"flex h-[46px] w-[46px] flex-shrink-0 items-center justify-center rounded-full border-[1.5px]",style:{borderColor:"var(--kf-pkgbrd)",color:"var(--kf-accent2)"},children:o.jsx(L5,{path:A5[U.key],className:"h-[22px] w-[22px]"})}),o.jsxs("div",{children:[o.jsx("div",{className:"text-[15px] font-bold",style:{color:"var(--kf-text)"},children:U.title}),o.jsx("div",{className:"mt-0.5 text-[13px]",style:{color:"var(--kf-muted)"},children:U.sub})]})]},U.key))})]})})}const Wl="hifi-chunk-reload",Z=e=>m.lazy(()=>e().then(t=>{try{sessionStorage.removeItem(Wl)}catch{}return t},t=>{let n=!0;try{n=!!sessionStorage.getItem(Wl),sessionStorage.setItem(Wl,"1")}catch{}if(n)throw t;return window.location.reload(),new Promise(()=>{})})),R5=Z(()=>Y(()=>import("./GalleryOverview-BjhhRzy4.js"),[])),I5=Z(()=>Y(()=>import("./GalleryBrandPage-B8648MwY.js"),[])),V5=Z(()=>Y(()=>import("./GalleryProjectPage-x_7enCay.js"),[])),F5=Z(()=>Y(()=>import("./DownloadsPage-C4oU3BD1.js"),__vite__mapDeps([6,7,3]))),O5=Z(()=>Y(()=>import("./Impressum-CqsUDzsX.js"),__vite__mapDeps([8,9]))),z5=Z(()=>Y(()=>import("./Datenschutz-DZkhNEY0.js"),__vite__mapDeps([10,9]))),B5=Z(()=>Y(()=>import("./AGB-DdmSbwED.js"),__vite__mapDeps([11,9]))),$5=Z(()=>Y(()=>import("./SetupWizard-Bk7jDQz1.js"),[])),H5=Z(()=>Y(()=>import("./Login-eQfHc9mc.js"),[])),U5=Z(()=>Y(()=>import("./ConfirmEmail-DNhvEY5W.js"),[])),W5=Z(()=>Y(()=>import("./ResetPassword-BLLRbHQO.js"),[])),G5=Z(()=>Y(()=>import("./Dashboard-CW4pLHou.js"),__vite__mapDeps([12,13,14]))),K5=Z(()=>Y(()=>import("./Traffic-Ce8aXsLe.js"),[])),q5=Z(()=>Y(()=>import("./Brands-CjpbffVT.js"),__vite__mapDeps([15,0,1,16,17,18,4,19]))),Y5=Z(()=>Y(()=>import("./Models-D636IvZl.js"),__vite__mapDeps([20,0,1,16,17,18,4,19]))),X5=Z(()=>Y(()=>import("./GalleryBrands-Dab6Yn6a.js"),__vite__mapDeps([21,0,1,17,18,4,22]))),Z5=Z(()=>Y(()=>import("./GalleryProjects-CZtr1G06.js"),__vite__mapDeps([23,0,1,17,18,4,22]))),Q5=Z(()=>Y(()=>import("./GalleryPhotos-DncT1Eas.js"),__vite__mapDeps([24,17,18,4,22,1]))),J5=Z(()=>Y(()=>import("./Packages-hJmwX0i2.js"),__vite__mapDeps([25,26,16,18,5,4]))),e4=Z(()=>Y(()=>import("./Services-DC3iDQcC.js"),__vite__mapDeps([27,0,1,2,3,4,5,28,17,18]))),t4=Z(()=>Y(()=>import("./Faqs-r2Enrc17.js"),__vite__mapDeps([29,28,17,18,4]))),n4=Z(()=>Y(()=>import("./Partners-B2GlgbaG.js"),__vite__mapDeps([30,0,1,28,17,18,4]))),r4=Z(()=>Y(()=>import("./Downloads-CGNfTlgZ.js"),__vite__mapDeps([31,7,28,17,18,4]))),s4=Z(()=>Y(()=>import("./HomeSections-CN0u2c2D.js"),__vite__mapDeps([32,33,16,34]))),i4=Z(()=>Y(()=>import("./ContactRequests-J7cHaUWk.js"),__vite__mapDeps([35,14]))),a4=Z(()=>Y(()=>import("./AccountSettings-BHuzDIHq.js"),[])),o4=Z(()=>Y(()=>import("./AdminUsers-De-9lldc.js"),[])),l4=Z(()=>Y(()=>import("./PermissionGroups-B_oFmBLZ.js"),[])),u4=Z(()=>Y(()=>import("./SettingsLayout-Bdjn3IM6.js"),[])),ta=Z(()=>Y(()=>import("./WebsiteSettings-C3D3Fx8C.js"),__vite__mapDeps([36,0,1,34,17,18,4,26]))),c4=Z(()=>Y(()=>import("./LegalSettings-0KkFi3OT.js"),__vite__mapDeps([37,33]))),d4=Z(()=>Y(()=>import("./UpdateSettings-C1AinrWn.js"),[])),f4=Z(()=>Y(()=>import("./EmailSettings-D9QXbFdm.js"),__vite__mapDeps([38,33]))),h4=Z(()=>Y(()=>import("./DatabaseSettings-3UBP2xHY.js"),__vite__mapDeps([39,13]))),m4=Z(()=>Y(()=>import("./ExportImportSettings-Zgsg5sZ8.js"),[])),p4=Z(()=>Y(()=>import("./MaintenanceSettings-BAaE5XQz.js"),[])),g4=Z(()=>Y(()=>import("./CountdownSettings-CBe7ZBg2.js"),[])),x4=Z(()=>Y(()=>import("./ConnectionSettings-CwVBkv1K.js"),[])),y4=Z(()=>Y(()=>import("./HiggsfieldSettings-6YLtOuK1.js"),__vite__mapDeps([40,0,1]))),v4=Z(()=>Y(()=>import("./ResetSettings-D69mCGIf.js"),[])),w4=o.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"});function b4(){const{packageId:e}=kd();return o.jsx(fr,{to:`/admin/packages?paket=${e}`,replace:!0})}function k4(){return o.jsxs(gE,{reducedMotion:"user",children:[o.jsx(KC,{}),o.jsx(XC,{}),o.jsx(nT,{children:o.jsx(m.Suspense,{fallback:w4,children:o.jsxs(sk,{children:[o.jsx($,{path:"/setup",element:o.jsx($5,{})}),o.jsxs($,{element:o.jsx(AN,{}),children:[o.jsx($,{path:"/",element:o.jsx(d5,{})}),o.jsx($,{path:"/fahrzeuge",element:o.jsx(g5,{})}),o.jsx($,{path:"/fahrzeuge/:brandSlug",element:o.jsx(x5,{})}),o.jsx($,{path:"/fahrzeuge/:brandSlug/:modelSlug",element:o.jsx(j5,{})}),o.jsx($,{path:"/galerie",element:o.jsx(R5,{})}),o.jsx($,{path:"/galerie/:brandSlug",element:o.jsx(I5,{})}),o.jsx($,{path:"/galerie/:brandSlug/:projectSlug",element:o.jsx(V5,{})}),o.jsx($,{path:"/leistungen",element:o.jsx(P5,{})}),o.jsx($,{path:"/kontakt",element:o.jsx(D5,{})}),o.jsx($,{path:"/downloads",element:o.jsx(F5,{})}),o.jsx($,{path:"/impressum",element:o.jsx(O5,{})}),o.jsx($,{path:"/datenschutz",element:o.jsx(z5,{})}),o.jsx($,{path:"/agb",element:o.jsx(B5,{})}),o.jsx($,{path:"*",element:o.jsx(ff,{})})]}),o.jsx($,{path:"/admin/login",element:o.jsx(H5,{})}),o.jsx($,{path:"/admin/email-bestaetigen",element:o.jsx(U5,{})}),o.jsx($,{path:"/admin/passwort-zuruecksetzen",element:o.jsx(W5,{})}),o.jsx($,{path:"/admin",element:o.jsx(ZN,{}),children:o.jsxs($,{element:o.jsx(XN,{}),children:[o.jsx($,{index:!0,element:o.jsx(G5,{})}),o.jsx($,{path:"traffic",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(K5,{})})}),o.jsx($,{path:"account",element:o.jsx(a4,{})}),o.jsx($,{path:"brands",element:o.jsx(ue,{permission:"brands.manage",children:o.jsx(q5,{})})}),o.jsx($,{path:"models",element:o.jsx(ue,{permission:"models.manage",children:o.jsx(Y5,{})})}),o.jsx($,{path:"gallery-brands",element:o.jsx(ue,{permission:"gallery.manage",children:o.jsx(X5,{})})}),o.jsx($,{path:"gallery-projects",element:o.jsx(ue,{permission:"gallery.manage",children:o.jsx(Z5,{})})}),o.jsx($,{path:"gallery-projects/:projectId/photos",element:o.jsx(ue,{permission:"gallery.manage",children:o.jsx(Q5,{})})}),o.jsx($,{path:"packages",element:o.jsx(ue,{permission:"packages.manage",children:o.jsx(J5,{})})}),o.jsx($,{path:"packages/:packageId/*",element:o.jsx(b4,{})}),o.jsx($,{path:"services",element:o.jsx(ue,{permission:"services.manage",children:o.jsx(e4,{})})}),o.jsx($,{path:"faqs",element:o.jsx(ue,{permission:"content.manage",children:o.jsx(t4,{})})}),o.jsx($,{path:"partners",element:o.jsx(ue,{permission:"content.manage",children:o.jsx(n4,{})})}),o.jsx($,{path:"downloads",element:o.jsx(ue,{permission:"downloads.manage",children:o.jsx(r4,{})})}),o.jsx($,{path:"home-sections",element:o.jsx(ue,{permission:"content.manage",children:o.jsx(s4,{})})}),o.jsx($,{path:"contact-requests",element:o.jsx(ue,{permission:"contact.manage",children:o.jsx(i4,{})})}),o.jsx($,{path:"users",element:o.jsx(ue,{permission:"users.manage",children:o.jsx(o4,{})})}),o.jsx($,{path:"permission-groups",element:o.jsx(ue,{permission:"permission_groups.manage",children:o.jsx(l4,{})})}),o.jsxs($,{path:"settings",element:o.jsx(ue,{permission:["settings.manage","system.admin","system.update"],children:o.jsx(u4,{})}),children:[o.jsx($,{index:!0,element:o.jsx(fr,{to:"company",replace:!0})}),o.jsx($,{path:"website",element:o.jsx(fr,{to:"../company",replace:!0})}),o.jsx($,{path:"company",element:o.jsx(ue,{permission:"settings.manage",children:o.jsx(ta,{section:"company"})})}),o.jsx($,{path:"design",element:o.jsx(ue,{permission:"settings.manage",children:o.jsx(ta,{section:"design"})})}),o.jsx($,{path:"images",element:o.jsx(ue,{permission:"settings.manage",children:o.jsx(ta,{section:"images"})})}),o.jsx($,{path:"legal",element:o.jsx(ue,{permission:"settings.manage",children:o.jsx(c4,{})})}),o.jsx($,{path:"maintenance",element:o.jsx(ue,{permission:"settings.manage",children:o.jsx(p4,{})})}),o.jsx($,{path:"countdown",element:o.jsx(ue,{permission:"settings.manage",children:o.jsx(g4,{})})}),o.jsx($,{path:"google",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(ta,{section:"google"})})}),o.jsx($,{path:"connections",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(x4,{})})}),o.jsx($,{path:"ai-images",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(y4,{})})}),o.jsx($,{path:"email",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(f4,{})})}),o.jsx($,{path:"database",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(h4,{})})}),o.jsx($,{path:"export-import",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(m4,{})})}),o.jsx($,{path:"update",element:o.jsx(ue,{permission:"system.update",children:o.jsx(d4,{})})}),o.jsx($,{path:"reset",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(v4,{})})})]})]})})]})})})]})}Gl.createRoot(document.getElementById("root")).render(o.jsx(qp.StrictMode,{children:o.jsx(hk,{basename:"/".replace(/\/$/,"")||"/",children:o.jsx(vP,{children:o.jsx(kP,{children:o.jsx(DP,{children:o.jsx(k4,{})})})})})}));export{ZC as $,V4 as A,L4 as B,O4 as C,R4 as D,Ye as E,I4 as F,Pi as G,nP as H,Be as I,vT as J,ST as K,G as L,LT as M,ff as N,B4 as O,z4 as P,kc as Q,Ke as R,Lv as S,F4 as T,iv as U,df as V,D4 as W,Ei as X,JP as Y,T5 as Z,U4 as _,kt as a,P4 as a0,Qe as a1,Sd as a2,QP as a3,eN as a4,C4 as a5,en as a6,_v as a7,T4 as a8,qp as a9,sP as aA,aP as aB,lP as aC,cP as aD,fP as aE,mP as aF,xP as aG,oT as aH,E4 as aI,aT as aJ,S4 as aK,te as aa,Vp as ab,uT as ac,dT as ad,oo as ae,hT as af,gT as ag,tv as ah,bT as ai,ET as aj,TT as ak,nv as al,_T as am,DT as an,IT as ao,FT as ap,zT as aq,rv as ar,vc as as,sv as at,rf as au,GT as av,qT as aw,XT as ax,zn as ay,eP as az,vr as b,oe as c,fe as d,Ho as e,Tp as f,kd as g,yd as h,kr as i,o as j,Wn as k,KN as l,xr as m,fr as n,af as o,vk as p,N4 as q,m as r,$4 as s,W4 as t,ye as u,_4 as v,M4 as w,A4 as x,$N as y,H4 as z};
+`).trim():b.innerText.replace(/\s+/g," ").trim();w!==g.trim()&&f.setValue(e,t,n,h,w),b.innerText!==w&&(b.innerText=w)};return o.jsx(i,{...c,className:`${u} live-editable${f.hasPending(e,t,n,h)?" live-editable-changed":""}`,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!0,"data-live-placeholder":l,onClick:$o,onPaste:n5,onKeyDown:b=>{b.key==="Enter"&&!a?(b.preventDefault(),b.currentTarget.blur()):b.key==="Escape"&&(b.currentTarget.innerText=g,b.currentTarget.blur()),b.stopPropagation()},onKeyUp:b=>b.stopPropagation(),onBlur:b=>y(b.currentTarget),children:g},`${h}:${g}`)}function Ye({k:e,...t}){const{t:n}=ye();return o.jsx(fe,{entity:"text",id:e,field:"value",value:n(e),placeholder:"Leer = Standardtext",...t})}function kr({entity:e,id:t,field:n,lang:r,value:s,label:i="Text",className:a="",...l}){const{language:u}=ye(),c=Ue(),d=r||u,f=c.getValue(e,t,n,d,s??"")??"";if(!c.canEdit(e))return o.jsx("div",{className:a,...l,dangerouslySetInnerHTML:{__html:f}});const h=g=>{$o(g),c.openEditor({kind:"html",entity:e,id:t,field:n,lang:d,label:i,original:f})};return o.jsx("div",{...l,className:`${a} live-editable live-editable-block${c.hasPending(e,t,n,d)?" live-editable-changed":""}`,role:"button",tabIndex:0,title:"Klicken zum Bearbeiten",onClick:h,onKeyDown:g=>g.key==="Enter"&&h(g),"data-live-placeholder":"Text hinzufügen…",dangerouslySetInnerHTML:{__html:f}})}function Sc({entity:e,id:t,field:n,lang:r,value:s,label:i,kind:a="textarea",hint:l,as:u="div",className:c="",children:d,...f}){const{language:h}=ye(),g=Ue(),y=r||h;if(!g.canEdit(e))return o.jsx(u,{className:c,...f,children:d});const b=g.getValue(e,t,n,y,s??"")??"",w=p=>{$o(p),g.openEditor({kind:a,entity:e,id:t,field:n,lang:y,label:i,hint:l,original:b})};return o.jsx(u,{...f,className:`${c} live-editable live-editable-block${g.hasPending(e,t,n,y)?" live-editable-changed":""}`,role:"button",tabIndex:0,title:`${i} bearbeiten`,onClickCapture:w,onKeyDown:p=>p.key==="Enter"&&w(p),children:d})}function Ss({id:e,value:t,label:n="Bild",aspect:r,buttonLabel:s="Bild tauschen",as:i="div",className:a="",children:l,...u}){const c=Ue();if(!c.canEdit("site_images"))return l?o.jsx(i,{className:a,...u,children:l}):null;const d=f=>{$o(f),c.openEditor({kind:"image",entity:"site_images",id:e,field:"path",lang:"de",label:n,aspect:r,original:t||""})};return o.jsxs(i,{...u,className:`${a}${/\babsolute\b/.test(a)?"":" relative"}${c.hasPending("site_images",e,"path","de")?" live-editable-changed":""}`,children:[l,o.jsxs("button",{type:"button",onClick:d,className:"absolute left-2 top-2 z-10 inline-flex items-center gap-1.5 rounded-full bg-black/75 px-3 py-1.5 text-xs font-semibold text-white shadow-lg ring-1 ring-white/30 backdrop-blur hover:bg-black/90",children:[o.jsxs("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[o.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),o.jsx("circle",{cx:"9",cy:"9",r:"2"}),o.jsx("path",{d:"m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21"})]}),s]})]})}function r5({items:e,entity:t="faqs"}){const[n,r]=m.useState(null),s=Ue(),{language:i}=ye();return s.canEdit(t)?o.jsx("div",{className:"divide-y divide-neutral-200 rounded-xl border border-neutral-200 bg-white dark:divide-neutral-800 dark:border-neutral-800 dark:bg-neutral-900",children:e.map((a,l)=>o.jsxs("div",{className:"space-y-3 px-5 py-4",children:[o.jsx(fe,{entity:t,id:a.id,field:"question",value:a.question,as:"p",className:"block font-medium text-neutral-900 dark:text-white",placeholder:"Frage"}),o.jsx(fe,{entity:t,id:a.id,field:"answer",value:a.answer,as:"p",multiline:!0,className:"block whitespace-pre-line text-sm text-neutral-600 dark:text-neutral-300",placeholder:"Antwort"})]},a.id??l))}):o.jsx("div",{className:"divide-y divide-neutral-200 rounded-xl border border-neutral-200 bg-white dark:divide-neutral-800 dark:border-neutral-800 dark:bg-neutral-900",children:e.map((a,l)=>{const u=n===l,c=a.id?{...a,question:s.getValue(t,a.id,"question",i,a.question),answer:s.getValue(t,a.id,"answer",i,a.answer)}:a;return o.jsxs("div",{children:[o.jsxs("button",{onClick:()=>r(u?null:l),className:"flex w-full items-center justify-between gap-4 px-5 py-4 text-left","aria-expanded":u,children:[o.jsx("span",{className:"font-medium text-neutral-900 dark:text-white",children:c.question}),o.jsx(an.svg,{animate:{rotate:u?180:0},transition:{duration:.2},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-5 w-5 shrink-0 text-neutral-500",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6 9 6 6 6-6"})})]}),o.jsx(dE,{initial:!1,children:u&&o.jsx(an.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},className:"overflow-hidden",children:o.jsx("p",{className:"px-5 pb-4 text-sm text-neutral-600 dark:text-neutral-300",children:c.answer})})})]},c.id??c.question)})})}function Iv({count:e=5,className:t="h-4 w-4"}){return o.jsx("div",{className:"flex gap-0.5 text-amber-400",children:Array.from({length:e}).map((n,r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:t,children:o.jsx("path",{d:"M10 1.5l2.6 5.6 6.1.6-4.6 4.1 1.3 6-5.4-3.1-5.4 3.1 1.3-6-4.6-4.1 6.1-.6L10 1.5z"})},r))})}const s5=70;function i5({testimonials:e}){const t=m.useRef(null),n=m.useRef(null),r=m.useRef({pos:0,half:0,hovering:!1,dragging:!1,dragStartX:0,dragStartPos:0,lastTime:null,rafId:null}).current;m.useLayoutEffect(()=>{const i=n.current,a=window.matchMedia("(prefers-reduced-motion: reduce)").matches,l=()=>{i.style.transform=`translateX(${r.pos}px)`},u=x=>{if(r.half<=0)return x;for(;x>0;)x-=r.half;for(;x<=-r.half;)x+=r.half;return x},c=()=>{r.half=i.scrollWidth/2,r.pos===0?r.pos=-r.half:r.pos=u(r.pos),l()};c();const d=new ResizeObserver(c);d.observe(i);const f=x=>{r.lastTime===null&&(r.lastTime=x);const v=(x-r.lastTime)/1e3;r.lastTime=x,!r.dragging&&!r.hovering&&!a&&(r.pos=u(r.pos+s5*v),l()),r.rafId=requestAnimationFrame(f)};r.rafId=requestAnimationFrame(f);const h=t.current,g=()=>{r.hovering=!0},y=()=>{r.hovering=!1},b=x=>{r.dragging=!0,r.dragStartX=x.clientX,r.dragStartPos=r.pos,h.setPointerCapture(x.pointerId),h.classList.add("cursor-grabbing"),h.classList.remove("cursor-grab")},w=x=>{r.dragging&&(r.pos=u(r.dragStartPos+(x.clientX-r.dragStartX)),l())},p=x=>{r.dragging&&(r.dragging=!1,h.hasPointerCapture(x.pointerId)&&h.releasePointerCapture(x.pointerId),h.classList.remove("cursor-grabbing"),h.classList.add("cursor-grab"))};return h.addEventListener("pointerenter",g),h.addEventListener("pointerleave",y),h.addEventListener("pointerdown",b),h.addEventListener("pointermove",w),h.addEventListener("pointerup",p),h.addEventListener("pointercancel",p),()=>{cancelAnimationFrame(r.rafId),d.disconnect(),h.removeEventListener("pointerenter",g),h.removeEventListener("pointerleave",y),h.removeEventListener("pointerdown",b),h.removeEventListener("pointermove",w),h.removeEventListener("pointerup",p),h.removeEventListener("pointercancel",p)}},[e.length]);const s=[...e,...e];return o.jsx("div",{ref:t,className:"marquee-viewport cursor-grab touch-pan-y select-none overflow-hidden",children:o.jsx("div",{ref:n,className:"marquee-track flex w-max gap-5",children:s.map((i,a)=>o.jsx("div",{className:"w-64 shrink-0 sm:w-72 lg:w-80",children:o.jsxs("div",{className:"relative flex h-full flex-col overflow-hidden rounded-xl border border-neutral-200 bg-white p-6 shadow-sm transition-shadow duration-300 hover:shadow-lg dark:border-neutral-800 dark:bg-neutral-900",children:[o.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 32 24",className:"absolute -right-1 -top-1 h-16 w-16 text-brand-500/10 dark:text-brand-400/10",children:o.jsx("path",{fill:"currentColor",d:"M9.4 0C4.4 3.5 1 9.1 1 15.3 1 20.6 4.3 24 8.4 24c3.8 0 6.6-3 6.6-6.6 0-3.4-2.4-5.9-5.4-5.9-.6 0-1.4.1-1.6.2C8.5 8.5 11.6 4.6 14.6 2.6L9.4 0zm16.5 0c-4.8 3.5-8.3 9.1-8.3 15.3 0 5.3 3.3 8.6 7.5 8.6 3.7 0 6.6-3 6.6-6.6 0-3.4-2.5-5.9-5.4-5.9-.6 0-1.4.1-1.6.2.5-3.3 3.6-7.1 6.7-9.1L25.9 0z"})}),o.jsx(Iv,{className:"relative z-10 mb-3 h-4 w-4",count:i.rating||5}),o.jsxs("p",{className:"relative z-10 mb-4 line-clamp-6 flex-1 text-sm leading-relaxed text-neutral-600 dark:text-neutral-300",children:["„",i.text,'"']}),o.jsxs("div",{className:"relative z-10 mt-auto flex items-center gap-3",children:[i.photo?o.jsx("img",{src:i.photo,alt:"",referrerPolicy:"no-referrer",className:"h-9 w-9 shrink-0 rounded-full object-cover"}):o.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-brand-100 text-sm font-semibold text-brand-700 dark:bg-brand-900/40 dark:text-brand-300",children:i.name.charAt(0).toUpperCase()}),o.jsx("p",{className:"text-sm font-semibold text-neutral-900 dark:text-white",children:i.name})]})]})},`${i.name}-${a}`))})})}function Tp(e,t,n={x:0,y:0}){const r=Math.max(0,Math.min(100,e==null?n.x:Number(e)||0)),s=Math.max(0,Math.min(100,t==null?n.y:Number(t)||0));return{left:`${r}%`,top:`${s}%`,transform:`translate(-${r}%, -${s}%)`}}const a5="/assets/gallery-dash2-CEVCErVK.webp",o5="/assets/youtube-hintergrund-BqSbCrLQ.mp4",l5="/assets/youtube-hintergrund-mobil-BolxAIc0.mp4",Ji={left:"text-left",center:"text-center",right:"text-right"},u5={left:"",center:"mx-auto",right:"ml-auto"},c5={eyebrow_de:"",eyebrow_en:"",title_de:"",title_en:"",body_html_de:"",body_html_en:"",text_align:"center",text_align_x:50,text_align_y:50,button_label_de:"",button_label_en:"",button_url:"",font_family:null};function Pp({slug:e,label:t,url:n,className:r,style:s}){const{hidden_areas:i}=kt(),a=Ue();return e&&a.canEdit("home_sections")?o.jsxs("span",{className:"inline-flex flex-wrap items-center justify-center gap-2",children:[o.jsx(fe,{entity:"home_sections",id:e,field:"button_label",value:t,className:r,style:s,placeholder:"Button-Text (leer = kein Button)"}),o.jsxs(Sc,{entity:"home_sections",id:e,field:"button_url",lang:"de",value:n,kind:"input",label:"Button-Ziel",hint:"Interne Seite mit / am Anfang (z. B. /leistungen) oder volle Adresse (https://...).",as:"span",className:"rounded bg-black/60 px-2 py-1 text-xs font-medium text-white",children:["Ziel: ",n||"–"]})]}):!t||!n||Av(n,i)?null:n.startsWith("/")?o.jsx(G,{to:n,className:r,style:s,children:t}):o.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:r,style:s,children:t})}function d5(){const{hero_image_path:e}=kt(),t=e||a5,{t:n,language:r}=ye(),s=Io(),i=Ue(),a=i.canEdit("home_sections"),l=!s("page.vehicles"),u=n("home.stats"),c=Fo(),d=c.slot("craft"),f=c.slot("advice"),h=c.slot("youtube_poster"),g=c.slot("more"),y=n("home.galleryAlts"),b=c.insights().map((z,ae)=>({...z,alt:y[ae]||y[0]||""})),[w,p]=m.useState([]),[x,v]=m.useState({}),[k,E]=m.useState(!1),[C,j]=m.useState([]),S=z=>{const ae=x[z]||c5,Uo=k&&{hero:n("home.heroTitle"),craft:n("home.craftTitle")}[z]||"",hf=k&&z==="hero"?`${n("home.heroSubtitle")}
`:"";return{eyebrow:i.getValue("home_sections",z,"eyebrow",r,ae[`eyebrow_${r}`]||""),title:i.getValue("home_sections",z,"title",r,ae[`title_${r}`]||Uo),bodyHtml:i.getValue("home_sections",z,"body_html",r,ae[`body_html_${r}`]||hf),align:ae.text_align||"center",alignX:ae.text_align_x,alignY:ae.text_align_y,buttonLabel:i.getValue("home_sections",z,"button_label",r,ae[`button_label_${r}`]||""),buttonUrl:i.getValue("home_sections",z,"button_url","de",ae.button_url||""),fontFamily:ae.font_family||void 0}},N=qe("home_sections.hero.eyebrow"),P=qe("home_sections.hero.title"),V=qe("home_sections.youtube.eyebrow"),B=qe("home_sections.youtube.title"),se=qe("home_sections.youtube.button_label"),ne=qe("home_sections.craft.eyebrow"),q=qe("home_sections.craft.title"),W=qe("home_sections.advice.eyebrow"),I=qe("home_sections.advice.title"),T=qe("home_sections.insights.eyebrow"),M=qe("home_sections.insights.title"),L=qe("home_sections.more.eyebrow"),D=qe("home_sections.more.title"),H=qe("home_sections.more.button_label");m.useEffect(()=>{oe.get("/home-sections").then(v).catch(()=>E(!0))},[]),m.useEffect(()=>{oe.get("/partners").then(j).catch(()=>{})},[]);const[_,R]=m.useState(null),X=_?_.reviews.filter(z=>z.review_text).map(z=>({name:z.author_name,text:z.review_text,rating:z.rating,photo:z.profile_photo_url})):n("home.testimonials");m.useEffect(()=>{oe.get("/faqs").then(z=>{p(z.map(ae=>({id:ae.id,question:r==="de"?ae.question_de:ae.question_en,answer:r==="de"?ae.answer_de:ae.answer_en})))}).catch(()=>{})},[r]),m.useEffect(()=>{oe.get("/google-reviews").then(z=>{z.rating!=null&&z.reviews.some(ae=>ae.review_text)&&R(z)}).catch(()=>{})},[]),vr({title:n("home.metaTitle"),description:n("home.metaDescription"),path:"/"}),m.useEffect(()=>{if(w.length===0||s("home.faq"))return;const z=document.createElement("script");return z.type="application/ld+json",z.text=JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:w.map(ae=>({"@type":"Question",name:ae.question,acceptedAnswer:{"@type":"Answer",text:ae.answer}}))}),document.head.appendChild(z),()=>document.head.removeChild(z)},[w]),m.useEffect(()=>{var z;w.length>0&&window.location.hash==="#faq"&&((z=document.getElementById("faq"))==null||z.scrollIntoView())},[w]);const Q=m.useRef(null);m.useEffect(()=>{var pf,gf,xf;const z=Q.current;if(!z)return;const ae=(pf=window.matchMedia)==null?void 0:pf.call(window,"(prefers-reduced-motion: reduce)").matches,Uo=(gf=navigator.connection)==null?void 0:gf.saveData;if(ae||Uo)return;const Fv=((xf=window.matchMedia)==null?void 0:xf.call(window,"(max-width: 767px), (pointer: coarse)").matches)?l5:o5,mf=new IntersectionObserver(([Ov])=>{Ov.isIntersecting?(z.getAttribute("src")||(z.src=Fv),z.play().catch(()=>{})):z.paused||z.pause()},{rootMargin:"300px 0px"});return mf.observe(z),()=>mf.disconnect()},[]);const de=m.useRef(null),{scrollYProgress:J}=Xy({target:de,offset:["start start","end start"]}),je=GC(),Ie=vn(J,[0,1],je?["0%","0%"]:["-6%","6%"]),Je=vn(J,[0,1],je?["0%","0%"]:["0%","60%"]),ht=vn(J,[0,.8],[1,0]),pe=vn(J,[.5,1],[0,1]),et=vn(pe,z=>z>.05?"auto":"none"),U=vn(J,[.5,1],[16,0]),K=m.useRef(null),[le,mt]=m.useState(()=>et.get()==="auto");vC(et,"change",z=>mt(z==="auto"));const[Gn,Vv]=m.useState(0);return m.useEffect(()=>{le&&K.current&&Vv(K.current.offsetHeight)},[le]),gv(le&&Gn>0,{offset:Gn}),o.jsxs("div",{children:[o.jsx(an.div,{ref:K,style:{opacity:pe,pointerEvents:et,y:U},className:"fixed inset-x-0 bottom-0 z-20 border-t border-neutral-200 bg-white/95 px-4 py-3 shadow-[0_-8px_24px_rgba(0,0,0,0.08)] backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/95 sm:px-6",children:o.jsxs("div",{className:"mx-auto flex max-w-6xl items-center justify-between gap-3",children:[o.jsx(Ye,{k:"home.stickyCta",as:"p",className:"hidden text-sm font-medium text-neutral-600 dark:text-neutral-300 sm:block"}),o.jsxs("div",{className:"flex w-full gap-3 sm:w-auto",children:[l&&o.jsx(G,{to:"/fahrzeuge",className:"flex-1 rounded-md bg-brand-500 px-5 py-2.5 text-center text-sm font-semibold text-white shadow-sm transition hover:-translate-y-0.5 hover:bg-brand-600 sm:flex-none",children:o.jsx(Ye,{k:"home.selectVehicle"})}),o.jsx(G,{to:"/kontakt",className:"flex-1 rounded-md border border-neutral-300 px-5 py-2.5 text-center text-sm font-semibold text-neutral-700 transition hover:-translate-y-0.5 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800 sm:flex-none",children:o.jsx(Ye,{k:"home.getInTouch"})})]})]})}),o.jsxs("section",{ref:de,className:"relative -mt-[89px] h-svh min-h-[560px] overflow-hidden sm:-mt-[97px]",children:[o.jsx(an.img,{style:{y:Ie,scale:1.15},src:t,alt:n("home.heroImageAlt"),className:"absolute inset-0 h-full w-full object-cover"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-neutral-950 via-neutral-950/80 to-neutral-950/40"}),o.jsx(an.div,{style:{y:Je,opacity:ht},className:"absolute inset-0",children:o.jsx("div",{className:"absolute w-full max-w-2xl px-4 text-center sm:px-6",style:{...Tp(S("hero").alignX,S("hero").alignY,{x:50,y:50}),fontFamily:S("hero").fontFamily},children:o.jsxs(an.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,ease:"easeOut"},children:[(S("hero").eyebrow||a)&&o.jsx(fe,{entity:"home_sections",id:"hero",field:"eyebrow",value:S("hero").eyebrow,as:"p",className:"mb-3 text-sm font-semibold uppercase tracking-wide text-brand-400",style:N,placeholder:"Vorspann (optional)"}),o.jsx(fe,{entity:"home_sections",id:"hero",field:"title",value:S("hero").title,as:"h1",className:"text-3xl font-extrabold tracking-tight text-white sm:text-5xl",style:P,placeholder:"Überschrift"}),o.jsx(kr,{entity:"home_sections",id:"hero",field:"body_html",value:S("hero").bodyHtml,label:"Text",className:"legal-content mx-auto mt-4 max-w-2xl text-base text-neutral-200 sm:text-lg"}),o.jsxs("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-3",children:[l&&o.jsx(G,{to:"/fahrzeuge",className:"rounded-md bg-brand-500 px-6 py-3 text-sm font-semibold text-white shadow-sm transition hover:-translate-y-0.5 hover:bg-brand-600 hover:shadow-lg",children:o.jsx(Ye,{k:"home.selectVehicle"})}),o.jsx(G,{to:"/kontakt",className:"rounded-md border border-white/30 bg-white/10 px-6 py-3 text-sm font-semibold text-white backdrop-blur transition hover:-translate-y-0.5 hover:bg-white/20",children:o.jsx(Ye,{k:"home.getInTouch"})})]})]})})})]}),!s("home.stats")&&o.jsx("section",{className:"border-b border-neutral-200 bg-neutral-950 py-8 dark:border-neutral-800",children:o.jsx("div",{className:"mx-auto grid max-w-6xl grid-cols-2 gap-6 px-4 text-center sm:grid-cols-4 sm:px-6",children:u.map((z,ae)=>o.jsxs(Ke,{index:ae,children:[o.jsx("p",{className:"text-2xl font-extrabold text-brand-400 sm:text-3xl",children:z.value}),o.jsx("p",{className:"text-sm text-neutral-400",children:z.label})]},z.label))})}),!s("home.partners")&&o.jsx("section",{className:"border-b border-neutral-200 py-8 dark:border-neutral-800",children:o.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[o.jsx(Ye,{k:"home.brandsHeading",as:"p",className:"mb-4 block text-center text-xs font-semibold uppercase tracking-wide text-neutral-400"}),o.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-8 gap-y-3",children:C.map((z,ae)=>o.jsx(Ke,{index:ae,children:z.logo_path?o.jsx("img",{src:z.logo_path,alt:z.name,className:"h-8 max-w-[8rem] object-contain opacity-70 grayscale transition hover:opacity-100 hover:grayscale-0"}):o.jsx(fe,{entity:"partners",id:z.id,field:"name",lang:"de",value:z.name,className:"text-lg font-bold text-neutral-400 dark:text-neutral-600"})},z.id))})]})}),!s("home.youtube")&&o.jsxs("section",{className:"relative min-h-[70vh] overflow-hidden sm:min-h-[85vh]",children:[o.jsx("video",{ref:Q,loop:!0,muted:!0,playsInline:!0,preload:"none",poster:h.src,className:"absolute inset-0 h-full w-full object-cover"}),o.jsx("div",{className:"absolute inset-0 bg-black/55"}),o.jsx(Ss,{id:"youtube_poster",value:h.custom,label:en.youtube_poster.label,aspect:en.youtube_poster.aspect,buttonLabel:"Video-Standbild tauschen",className:"absolute left-0 top-0 h-12 w-64"}),o.jsx("div",{className:"absolute w-full max-w-3xl px-4 text-center sm:px-6",style:{...Tp(S("youtube").alignX,S("youtube").alignY,{x:50,y:50}),fontFamily:S("youtube").fontFamily},children:o.jsxs(Ke,{children:[(S("youtube").eyebrow||a)&&o.jsx(fe,{entity:"home_sections",id:"youtube",field:"eyebrow",value:S("youtube").eyebrow,as:"p",className:"mb-4 text-xs font-semibold uppercase tracking-[0.2em] text-neutral-200 sm:text-sm",style:V,placeholder:"Vorspann (optional)"}),o.jsx(fe,{entity:"home_sections",id:"youtube",field:"title",value:S("youtube").title,as:"h2",className:"text-3xl font-bold uppercase tracking-wide text-white sm:text-5xl",style:B,placeholder:"Überschrift"}),o.jsx(kr,{entity:"home_sections",id:"youtube",field:"body_html",value:S("youtube").bodyHtml,label:"Text",className:"legal-content mt-4 text-xs font-semibold uppercase tracking-wide text-neutral-200 sm:text-sm"}),o.jsx(Pp,{slug:"youtube",label:S("youtube").buttonLabel,url:S("youtube").buttonUrl,className:"mt-8 inline-flex items-center justify-center rounded-full bg-white px-8 py-3 text-xs font-bold uppercase tracking-wide text-neutral-900 transition hover:-translate-y-0.5 hover:bg-neutral-100",style:se})]})})]}),!s("home.craft")&&o.jsx("section",{className:"grain-band border-y border-neutral-200 bg-neutral-50 py-16 dark:border-neutral-800 dark:bg-neutral-900/40",children:o.jsxs("div",{className:"mx-auto max-w-6xl space-y-16 overflow-hidden px-4 sm:px-6",children:[o.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[o.jsx(Ke,{direction:"left",shine:!0,className:"rounded-xl shadow-lg",children:o.jsx(Ss,{id:"craft",value:d.custom,label:en.craft.label,aspect:en.craft.aspect,children:o.jsx("img",{src:d.src,alt:n("home.craftImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})})}),o.jsxs(Ke,{direction:"right",index:1,className:Ji[S("craft").align],style:{fontFamily:S("craft").fontFamily},children:[(S("craft").eyebrow||a)&&o.jsx(fe,{entity:"home_sections",id:"craft",field:"eyebrow",value:S("craft").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:ne,placeholder:"Vorspann (optional)"}),o.jsx(fe,{entity:"home_sections",id:"craft",field:"title",value:S("craft").title,as:"h2",className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:q,placeholder:"Überschrift"}),o.jsx(kr,{entity:"home_sections",id:"craft",field:"body_html",value:S("craft").bodyHtml,label:"Text",className:"legal-content text-neutral-600 dark:text-neutral-300"})]})]}),o.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[o.jsxs(Ke,{direction:"left",className:`order-2 md:order-1 ${Ji[S("advice").align]}`,style:{fontFamily:S("advice").fontFamily},children:[(S("advice").eyebrow||a)&&o.jsx(fe,{entity:"home_sections",id:"advice",field:"eyebrow",value:S("advice").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:W,placeholder:"Vorspann (optional)"}),o.jsx(fe,{entity:"home_sections",id:"advice",field:"title",value:S("advice").title,as:"h2",className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:I,placeholder:"Überschrift"}),o.jsx(kr,{entity:"home_sections",id:"advice",field:"body_html",value:S("advice").bodyHtml,label:"Text",className:"legal-content text-neutral-600 dark:text-neutral-300"})]}),o.jsx(Ke,{direction:"right",index:1,shine:!0,className:"order-1 md:order-2 rounded-xl shadow-lg",children:o.jsx(Ss,{id:"advice",value:f.custom,label:en.advice.label,aspect:en.advice.aspect,children:o.jsx("img",{src:f.src,alt:n("home.adviceImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})})})]})]})}),!s("home.insights")&&o.jsxs("section",{className:"mx-auto max-w-6xl px-4 py-16 sm:px-6",children:[o.jsxs(Ke,{className:`mb-8 ${Ji[S("insights").align]}`,style:{fontFamily:S("insights").fontFamily},children:[(S("insights").eyebrow||a)&&o.jsx(fe,{entity:"home_sections",id:"insights",field:"eyebrow",value:S("insights").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:T,placeholder:"Vorspann (optional)"}),o.jsx(fe,{entity:"home_sections",id:"insights",field:"title",value:S("insights").title,as:"h2",className:"text-2xl font-bold text-neutral-900 dark:text-white",style:M,placeholder:"Überschrift"}),o.jsx(kr,{entity:"home_sections",id:"insights",field:"body_html",value:S("insights").bodyHtml,label:"Text",className:"legal-content mt-2 text-neutral-600 dark:text-neutral-300"})]}),o.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:b.map((z,ae)=>o.jsx(Ke,{index:ae%3,shine:!0,className:"aspect-square overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:o.jsx(Ss,{id:z.id,value:z.custom,label:`Einblicke: Foto ${ae+1}`,aspect:1,className:"h-full w-full",children:o.jsx("img",{src:z.src,alt:z.alt,width:z.width,height:z.height,loading:"lazy",className:"h-full w-full object-cover transition duration-300 hover:scale-105"})})},z.id))})]}),!s("home.reviews")&&o.jsx("section",{className:"grain-band border-y border-neutral-200 bg-neutral-50 py-16 dark:border-neutral-800 dark:bg-neutral-900/40",children:o.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[o.jsxs(Ke,{className:"mb-10 text-center",children:[o.jsx("div",{className:"mb-2 flex items-center justify-center gap-2",children:o.jsx(Iv,{className:"h-6 w-6",count:_?Math.round(_.rating):5})}),o.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",children:_?n("home.reviewsRatingDynamic")(_.rating,_.rating_count):n("home.reviewsRating")}),o.jsx(Ye,{k:"home.reviewsText",as:"p",className:"mt-1 text-neutral-600 dark:text-neutral-300"}),o.jsx("a",{href:"https://www.google.com/maps/search/?api=1&query=Hifi+Planet+Amorbach+Boxbrunner+Stra%C3%9Fe+20a",target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-block text-sm font-medium text-brand-600 hover:underline dark:text-brand-400",children:o.jsx(Ye,{k:"home.reviewsLink"})})]}),o.jsx(Ke,{children:o.jsx(i5,{testimonials:X})})]})}),!s("home.more")&&o.jsx("section",{className:"mx-auto max-w-6xl overflow-hidden px-4 py-16 sm:px-6",children:o.jsxs("div",{className:"grid items-center gap-10 md:grid-cols-2",children:[o.jsx(Ke,{direction:"left",shine:!0,className:"overflow-hidden rounded-xl shadow-lg",children:o.jsx(Ss,{id:"more",value:g.custom,label:en.more.label,aspect:en.more.aspect,className:"h-full w-full",children:o.jsx("img",{src:g.src,alt:n("home.moreImageAlt"),width:1600,height:905,className:"h-full w-full object-cover",loading:"lazy"})})}),o.jsxs(Ke,{direction:"right",index:1,className:`rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900 ${Ji[S("more").align]}`,style:{fontFamily:S("more").fontFamily},children:[(S("more").eyebrow||a)&&o.jsx(fe,{entity:"home_sections",id:"more",field:"eyebrow",value:S("more").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:L,placeholder:"Vorspann (optional)"}),o.jsx(fe,{entity:"home_sections",id:"more",field:"title",value:S("more").title,as:"h2",className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:D,placeholder:"Überschrift"}),o.jsx(kr,{entity:"home_sections",id:"more",field:"body_html",value:S("more").bodyHtml,label:"Text",className:`legal-content mb-8 max-w-2xl text-neutral-600 dark:text-neutral-300 ${u5[S("more").align]}`}),o.jsx(Pp,{slug:"more",label:S("more").buttonLabel,url:S("more").buttonUrl,className:"inline-block rounded-md border border-neutral-300 px-6 py-3 text-sm font-semibold text-neutral-700 transition hover:-translate-y-0.5 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",style:H})]})]})}),!s("home.faq")&&o.jsx("section",{id:"faq",className:"scroll-mt-20 border-t border-neutral-300 py-16 dark:border-neutral-700",children:o.jsxs("div",{className:"mx-auto max-w-3xl px-4 sm:px-6",children:[o.jsx(Ke,{className:"mb-8 text-center",children:o.jsx(Ye,{k:"home.faqHeading",as:"h2",className:"text-2xl font-bold text-neutral-900 dark:text-white"})}),o.jsx(Ke,{index:1,children:o.jsx(r5,{items:w})})]})})]})}function Ho(e,t){return e?e.code==="rate_limited"||e.status===429?t("errors.rateLimited"):e.code==="invalid_input"||e.status===422?t("errors.invalidInput"):e.status===404?t("errors.notFound"):e.status===503?t("errors.maintenance"):e.status>=500?t("errors.server"):e.status?t("errors.generic"):t("errors.network"):""}const Np={vw:"volkswagen",mercedes:"mercedes-benz",benz:"mercedes-benz",mb:"mercedes-benz",chevy:"chevrolet",alfa:"alfa romeo"},f5=8,Ws=e=>String(e||"").toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/ß/g,"ss").replace(/[-_./]+/g," ").replace(/\s+/g," ").trim(),co=e=>e.replace(/\s/g,"");function h5(e,t){const n=(e||[]).map(s=>{const i=Ws(s.name);return{key:`b${s.id}`,type:"brand",label:s.name,to:`/fahrzeuge/${s.slug}`,text:i,flat:co(i)}}),r=(t||[]).map(s=>{const i=Ws(`${s.brand_name} ${s.name}`);return{key:`m${s.id}`,type:"model",label:s.name,brand:s.brand_name,image:s.image_path,to:`/fahrzeuge/${s.brand_slug}/${s.slug}`,text:i,flat:co(i),modelText:Ws(s.name)}});return[...n,...r]}function m5(e,t){const n=Ws(t).split(" ").filter(Boolean);if(n.length===0)return[];const r=n.map(a=>Np[a]?[a,Ws(Np[a])]:[a]),s=co(n.join("")),i=[];for(const a of e){const l=c=>a.text.includes(c)||a.flat.includes(co(c));if(!r.every(c=>c.some(l))&&!a.flat.includes(s))continue;let u=0;for(const c of r)c.some(d=>a.text.startsWith(d))?u+=3:c.some(d=>` ${a.text}`.includes(` ${d}`))&&(u+=2),c.some(d=>{var f;return(f=a.modelText)==null?void 0:f.startsWith(d)})&&(u+=2);a.type==="brand"&&(u+=1),i.push({entry:a,score:u})}return i.sort((a,l)=>l.score-a.score||a.entry.text.localeCompare(l.entry.text,void 0,{numeric:!0})),i.slice(0,f5).map(a=>a.entry)}function p5({brands:e,width:t}){const{t:n}=ye(),r=xr(),s=m.useId(),i=m.useRef(null),[a,l]=m.useState(null),[u,c]=m.useState(""),[d,f]=m.useState(!1),[h,g]=m.useState(0),y=m.useRef(!1),b=()=>{a||y.current||(y.current=!0,oe.get("/vehicle-search").then(l).catch(()=>l([])).finally(()=>{y.current=!1}))},w=m.useMemo(()=>h5(e,a),[e,a]),p=m.useMemo(()=>m5(w,u),[w,u]),x=d&&u.trim()!=="",v=p.some(j=>j.image);m.useEffect(()=>g(0),[u]),m.useEffect(()=>{if(!x)return;const j=S=>{var N;(N=i.current)!=null&&N.contains(S.target)||f(!1)};return document.addEventListener("pointerdown",j),()=>document.removeEventListener("pointerdown",j)},[x]);const k=j=>{f(!1),r(j.to)},E=j=>{j.key==="ArrowDown"&&p.length?(j.preventDefault(),f(!0),g(S=>(S+1)%p.length)):j.key==="ArrowUp"&&p.length?(j.preventDefault(),g(S=>(S-1+p.length)%p.length)):j.key==="Enter"&&x&&p[h]?(j.preventDefault(),k(p[h])):j.key==="Escape"&&(x?f(!1):c(""))},C=a===null&&u.trim()!=="";return o.jsxs("div",{ref:i,className:"relative mb-8 max-w-full",style:{width:t?`${t}px`:"100%"},children:[o.jsx("label",{htmlFor:`${s}-input`,className:"sr-only",children:n("vehicleSearch.label")}),o.jsxs("div",{className:"relative flex items-center",children:[o.jsx(nP,{className:"pointer-events-none absolute left-4 h-[18px] w-[18px] text-neutral-400","aria-hidden":"true"}),o.jsx("input",{id:`${s}-input`,type:"search",role:"combobox","aria-expanded":x,"aria-controls":`${s}-list`,"aria-autocomplete":"list","aria-activedescendant":x&&p[h]?`${s}-${p[h].key}`:void 0,autoComplete:"off",spellCheck:!1,value:u,placeholder:n("vehicleSearch.placeholder"),onFocus:()=>{b(),f(!0)},onChange:j=>{b(),c(j.target.value),f(!0)},onKeyDown:E,className:"vehicle-search-input w-full rounded-xl border border-neutral-300 bg-gradient-to-b from-white to-neutral-50 py-3.5 pl-11 pr-11 text-[15px] text-neutral-900 outline-none transition-[border-color,box-shadow] duration-200 placeholder:text-neutral-400 focus:border-brand-500 dark:border-neutral-700 dark:from-neutral-800 dark:to-neutral-900 dark:text-white dark:placeholder:text-neutral-500 [&::-webkit-search-cancel-button]:hidden"}),u&&o.jsx("button",{type:"button",onClick:()=>c(""),"aria-label":n("vehicleSearch.clear"),className:"absolute right-3 rounded-md p-1 text-neutral-400 transition hover:text-neutral-700 dark:hover:text-neutral-200",children:o.jsx(Ei,{className:"h-4 w-4"})})]}),x&&o.jsx("div",{className:"absolute inset-x-0 top-full z-30 mt-2 overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-lg dark:border-neutral-800 dark:bg-neutral-900",children:p.length>0?o.jsx("ul",{id:`${s}-list`,role:"listbox",className:"max-h-[360px] overflow-y-auto py-1",children:p.map((j,S)=>o.jsx("li",{id:`${s}-${j.key}`,role:"option","aria-selected":S===h,children:o.jsxs(G,{to:j.to,onClick:()=>f(!1),onMouseEnter:()=>g(S),className:`flex items-center gap-3 px-4 py-2.5 text-[15px] ${S===h?"bg-neutral-100 dark:bg-neutral-800":""}`,children:[j.type==="model"?o.jsxs(o.Fragment,{children:[j.image?o.jsx("img",{src:j.image,alt:"",loading:"lazy",className:"h-9 w-14 shrink-0 rounded object-cover"}):v&&o.jsx("span",{className:"h-9 w-14 shrink-0 rounded bg-neutral-100 dark:bg-neutral-800"}),o.jsxs("span",{className:"min-w-0 flex-1 truncate text-neutral-900 dark:text-white",children:[o.jsx("span",{className:"text-neutral-500 dark:text-neutral-400",children:j.brand})," ",j.label]})]}):o.jsxs("span",{className:"min-w-0 flex-1 truncate text-neutral-900 dark:text-white",children:[j.label,o.jsx("span",{className:"ml-2 text-xs uppercase tracking-wider text-neutral-500 dark:text-neutral-400",children:n("vehicleSearch.allModels")})]}),o.jsx(uT,{className:`h-4 w-4 shrink-0 text-brand-500 transition-opacity ${S===h?"opacity-100":"opacity-0"}`,"aria-hidden":"true"})]})},j.key))}):o.jsx("div",{id:`${s}-list`,className:"px-4 py-3 text-sm text-neutral-500 dark:text-neutral-400",children:C?n("vehicleSearch.loading"):o.jsxs(o.Fragment,{children:[n("vehicleSearch.noResults")," ",o.jsx(G,{to:"/kontakt",className:"font-semibold text-brand-500 hover:underline",children:n("vehicleSearch.contact")})]})})})]})}function g5(){const[e,t]=m.useState(null),[n,r]=m.useState(null),s=Oo(),{t:i}=ye(),a=lf(),{vehicle_tile_width:l,vehicle_tile_height:u}=kt(),c={width:`${l}px`,height:`${u}px`},d=m.useRef(null),[f,h]=m.useState(0);m.useEffect(()=>{const p=d.current;if(!p)return;const x=new ResizeObserver(([v])=>h(v.contentRect.width));return x.observe(p),()=>x.disconnect()},[]);const g=16,y=e?e.length:6,b=Math.max(1,Math.min(y,Math.floor((f+g)/(Number(l)+g)))),w=f&&y?b*Number(l)+(b-1)*g:void 0;return vr({title:i("vehicleSelect.metaTitle"),description:i("vehicleSelect.metaDescription"),path:"/fahrzeuge"}),m.useEffect(()=>{s.vehicles.enabled&&!s.bypass||oe.get("/brands").then(t).catch(p=>r(p))},[s.vehicles.enabled,s.bypass]),s.vehicles.enabled&&!s.bypass?o.jsx(Ci,{message:s.vehicles.message}):o.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[o.jsx("div",{ref:d}),s.vehicles.enabled&&s.bypass&&o.jsx(Ti,{inline:!0}),o.jsx(Ye,{k:"vehicleSelect.title",as:"h1",className:"mb-2 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),o.jsx(Ye,{k:"vehicleSelect.intro",as:"p",className:"mb-6 block text-neutral-600 dark:text-neutral-300"}),o.jsx(p5,{brands:e,width:w}),n&&o.jsx("p",{className:"text-red-600",children:typeof n=="string"?n:Ho(n,i)}),e===null&&!n&&o.jsx("div",{className:"flex flex-wrap gap-4","aria-busy":"true","aria-label":i("vehicleSelect.loading"),children:Array.from({length:6},(p,x)=>o.jsx("div",{style:c,className:"shrink-0 animate-pulse rounded-xl bg-neutral-200 dark:bg-neutral-800"},x))}),(e==null?void 0:e.length)===0&&!n&&o.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:i("vehicleSelect.empty")}),o.jsx("div",{className:"flex flex-wrap gap-4",children:(e||[]).map(p=>p.image_path?o.jsxs(G,{to:`/fahrzeuge/${p.slug}`,style:c,className:"group relative block shrink-0 overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[o.jsx("img",{src:p.image_path,alt:"",loading:"lazy",decoding:"async",width:l,height:u,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),o.jsx(fe,{entity:"brands",id:p.id,field:"name",lang:"de",value:p.name,className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:mr(a,`brands.${p.id}.name`)})]},p.id):o.jsx(G,{to:`/fahrzeuge/${p.slug}`,style:c,className:"flex shrink-0 flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-white px-6 text-center font-semibold text-neutral-800 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-500 hover:shadow-md dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-100",children:o.jsx(fe,{entity:"brands",id:p.id,field:"name",lang:"de",value:p.name,style:mr(a,`brands.${p.id}.name`)})},p.id))})]})}function ff(){const{t:e}=ye(),{phone:t}=kt(),n=Io();return vr({title:e("notFound.metaTitle"),noindex:!0}),o.jsxs("div",{className:"mx-auto max-w-2xl px-4 py-20 text-center sm:px-6",children:[o.jsx("p",{className:"text-sm font-semibold uppercase tracking-[4px] text-brand-500",children:"404"}),o.jsx("h1",{className:"mt-3 text-3xl font-bold text-neutral-900 dark:text-white sm:text-4xl",children:e("notFound.title")}),o.jsx("p",{className:"mx-auto mt-4 max-w-md text-neutral-600 dark:text-neutral-300",children:e("notFound.text")}),o.jsxs("div",{className:"mt-10 flex flex-wrap justify-center gap-3",children:[!n("page.vehicles")&&o.jsxs(G,{to:"/fahrzeuge",className:"inline-flex items-center gap-2 rounded-md bg-brand-500 px-5 py-3 text-sm font-semibold text-white shadow-sm hover:bg-brand-600",children:[o.jsx(oo,{className:"h-4 w-4"}),e("notFound.toVehicles")]}),o.jsxs(G,{to:"/kontakt",className:"inline-flex items-center gap-2 rounded-md border border-neutral-300 px-5 py-3 text-sm font-semibold text-neutral-700 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",children:[o.jsx(vc,{className:"h-4 w-4"}),e("notFound.toContact")]}),t&&o.jsxs("a",{href:rs(t),className:"inline-flex items-center gap-2 rounded-md border border-neutral-300 px-5 py-3 text-sm font-semibold text-neutral-700 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",children:[o.jsx(zn,{className:"h-4 w-4"}),t]})]}),o.jsx(G,{to:"/",className:"mt-8 inline-block text-sm text-neutral-500 underline hover:text-brand-500",children:e("notFound.toHome")})]})}function x5(){const{brandSlug:e}=kd(),[t,n]=m.useState(null),[r,s]=m.useState(null),i=Oo(),{t:a}=ye(),l=lf(),u=qe(t?`brands.${t.brand.id}.name`:""),{vehicle_tile_width:c,vehicle_tile_height:d}=kt(),f={width:`${c}px`,height:`${d}px`};return m.useEffect(()=>{i.vehicles.enabled&&!i.bypass||oe.get(`/brands/${e}/models`).then(n).catch(h=>s(h))},[e,i.vehicles.enabled,i.bypass]),vr({title:t?`${t.brand.name} ${a("brandPage.titleSuffix")}`:a("brandPage.metaTitleFallback"),description:t?a("brandPage.metaDescription")(t.brand.name):void 0,path:`/fahrzeuge/${e}`}),i.vehicles.enabled&&!i.bypass?o.jsx(Ci,{message:i.vehicles.message}):r?r.status===404?o.jsx(ff,{}):o.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:Ho(r,a)}):t?o.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[i.vehicles.enabled&&i.bypass&&o.jsx(Ti,{inline:!0}),o.jsxs("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:[o.jsx("span",{style:u,children:t.brand.name})," – ",a("brandPage.titleSuffix")]}),t.models.length===0&&o.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:a("brandPage.empty")}),o.jsx("div",{className:"flex flex-wrap gap-4",children:t.models.map(h=>h.image_path?o.jsxs(G,{to:`/fahrzeuge/${e}/${h.slug}`,style:f,className:"group relative block shrink-0 overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[o.jsx("img",{src:h.image_path,alt:`${t.brand.name} ${h.name} Car-Hifi`,loading:"lazy",decoding:"async",width:c,height:d,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),o.jsx(fe,{entity:"car_models",id:h.id,field:"name",lang:"de",value:h.name,className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:mr(l,`car_models.${h.id}.name`)})]},h.id):o.jsx(G,{to:`/fahrzeuge/${e}/${h.slug}`,style:f,className:"flex shrink-0 flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-white px-6 text-center font-semibold text-neutral-800 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-500 hover:shadow-md dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-100",children:o.jsx(fe,{entity:"car_models",id:h.id,field:"name",lang:"de",value:h.name,style:mr(l,`car_models.${h.id}.name`)})},h.id))})]}):o.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:a("brandPage.loading")})}function y5({text:e}){return e?e.split(/(\*\*[^*]+\*\*)/g).map((n,r)=>{const s=n.match(/^\*\*([^*]+)\*\*$/);return s?o.jsx("strong",{children:s[1]},r):o.jsx("span",{children:n},r)}):null}const _p="data:image/webp;base64,UklGRmoNAABXRUJQVlA4IF4NAAAQjACdASrgAVYDPlEok0ajoqGhIRK4IHAKCWlu/F+5xDCoDux8VXNtc99B5Uf715Q+k/+V6E/yD7bfvf7tYI7QKys1Pu/n/K9wD+L/0L/aeqHflfZf937AH81/p//N/yXr9f9f+M/yf7c+4D6R/7n+O+BL9d+rb+0f//9yX9VQU+fHDhw4cN7KTkCBAgQIECBAgQIEB8GtgzU5WrVq1atWrVq1atTTWWxGRvDLM5r169evXr169evVcNgPhleRXp06dOnTp06dOnTpUIn65+OKaJVsmzZs2bNmzZs2bNmSyYC6ipEunTp06dOnTp06dOlydZVuN901q1atWrVq1atWrVXZqLYS16JYyeHDhw4cOHDhw4cN4wtQeDaQLgECBAgQIECBAgQIDddB6sEmQB2atWrVq1atWrVq1aq1iYS5JU9iBlzXr169evXr169evXeEPp+8N6OklatWrVq1atWrVq1V3IfqDdZ8CK1AgQIECBAgQIECBBQFoI3bXHSzdGb8+OHDhw4cOHDhw4ZwLNj/Gx48ePHjx48ePHjx5HaZ5q8hFQPLVq1atWrVq1atWrVWlrSSS1atWrVq1atWrVq1VouJ4vs1atWrVq1atWrVqzMNN6naRaj4OHDhw4cOHDhwzggYy8goXr169evXr169evXbAmy3nWg79+/fv379+/fv377Aw+GV3JG24BIkSJEiRIkSJEiRH091sORb3KZK2rVq1atWrVq1atWZgOgxn2g3CECBAgQIECBAgQHwEh4tRYq5WHRSJEiRIkSJEiRIkRmQ4gXd9q0Xa9evXr169evXr169SUP3aSDmqBOfHDhw4cOHDhw4cN/rYXzoW6jx48ePHjx48ePHjwyNgV/F/hRIkSJEiRIkSJEiRGcgeccx2x48ePHjx48ePHjx5+h2DL7y1q1atWrVq1atWrVqrLjxn1+UevXr169evXr169epWz/ixb7G7Fx48ePHjx48ePHjx64Dpo0+TFzjw4cOHDhw4cOHDhwr64/FOVqj1ftlBYsWLFixYsWLFixsB93m6MKtrfi/YePHjx48ePHjx48eGCFP4MdBX+BXbQiRIkSJEiRIkSJEiA+X4/Ne4l0FixYsWLFixYsWLTKZjxkHLs7TTrVq1atWrVq1atWrSGY83Cktx0PPjhw4cOHDhw4cN/7Xmd/H4DxEePHjx48ePHjx48ct7KWpas7p5jy5cuXLly5cuXLlyM+h2/gRIkSJEiRIkSJEiRAPRMs9EnbFixYsWLFixYsWLBwJstxClHwcOHDhw4cOHDhw3+o6GvCGxY8ePHjx48ePHjx45aAayr3BCnnxw4cOHDhw4cOG/2HuJWxIvK1JLZs2bNmzZs2bNmyAMNnZLnTo6dOnTp06dOnTp06Vd0rFPQfnwwCPHjx48ePHjx48eOU7jRhCFUn5bFixYsWLFixYsWKZRr/1LzwcOHDhw4cOHDhw4ZshIGgexQoECBAgQIECBAgQH+hD+jvXr169eu0AAP7/2BA2pStbx3f0LK6/mZcFuZpv73FLTm7GUv07j8lFLoOGX1EwKUHfPc4FImBkAvjxF1E2TgBogJKpQ2lbMv5bOqPckB4PELJo9ZXlMwGup4PkMOtTZPmrbNoaCJqn0H4Bx7A0xA439P5hkMGBnAEfInQIN5UeUIDb3y6tLej2gR8HhJ5XmTsxvmM15ltL5ZwdGmoNeW8NevUVUKqJ8mNngu7ocCsyGYaeYOGGZBBt6rj6bPVKVbxvb8onw6mljAaaxGTz0W+aNPv06kK3qhDe6/uHi8kg2qvjF3njhRMyOJKZzg12h4qOtVgTuKPAMRWYDkgwiRs9iYqcumonNNXvXk3FAk2LO5XnyjtD5sHSUO3pIrztpBvqq+UJzKeIwGBlPwA2NP46tOJxLzbrKeH4SQjt2HAsbrVcQ/b/TgKZGPwaqfGDN+OjqJK3Z9dyCkGGfGKeG1w9+HSZTm/qh052lQEJAcdUX6vm/+sDBxtrfl4Sg8iMcVnDsfTKJpsTYF/vzJ1oQ6/VPyIX1HpDwnPXsptu9rKDFazlkwc3ofi8uKJmycgPiG9xOLlzn4Af8Dm+LcjJUMAtA7XeZPLlW1bwogbRthU8oA4LcURuku6eXDJ1eb1IKUU7k/UK0cBeK+R5YVcmrOnZIyHzcIaClYnrIwerP535fHv4VXjURTO6/85BvSeTNWvQGqkW5v1hG6AEMrxBryfat3kmr+SNEz5wC2f54z1O7C2KsRpt3maISh9PhMg7jDIxmVe07eHtkLtz6v3yQUJQV95yazDYpH5JfpuYSb8dtmB1cKjeoDTPvik9dCA1UFCTZBfojpIOwXdwAR7JEdZkEi/24hMNKJJlB6udZZKqNJB1hNl24Z++z6lAGSAuRgSwDZGdbqxs+0iL6wmRHilqPOiYB6hQiPZ7cfpMZxesqRwyhcf1O29w4ORG/7BlerR8hYvY4B1XsPYbDORvPk6FHIDXwTXGpuDIta7G4F6RNDdOvCFkAl53GZo5h/p2QkWUry5YuyegnPlKjT3He6ewYypA9YOvMhaqip7kr9sF4TU2bX9foKZ+FFZNzhyySS+13+g4BdJo9YF3bw5b6eSxUfTWiDLNh50VjuqRQWHUEkiA8zJqnqkKCwuDy6iY2oF20FJQlGIPpCDKPBzdXSb/n9NDltaoUlbam7cDAU7CwNdaWFXTABRk0S0e49iF4tO106Uwul7DGYpq0Eu71TnKUjCtEBc83QH8skvRzHniEne3AtJLYRH0cMNSSzeCJ1g+Nfc8RaZkhLhCaZGZdYe5j0LGmQnVFt2iapZvGBi7Sw0X56zdziC9Foq0OPsqKFetZdICc2eUV5Vu1+nvisSzn8wlSDUt3OmRkt/gJxfJQfWxcu5HZ26qqNpA4ablWrX4E9DEmvXzpFGYCnYJMheN2BlWwBVLh1cyQ8INngXaoB8I5Pj9oYyuz/W+jvJQ6G074luX9D3pLkuc88D0Hae3ZqXrRYRzGF1vD8pHsk9Co8B6rpE/4GEwW/zsCtnjz5G8m4KFwf2qW1k0HkNv7Nlg38bcz6TdTzuw/jega5XZQQhflLu4I6l+s90BHFIR+JEXTBBqJwT+IgTnpHNc+h5Ek74HiKqXuGUNGIKIozHkiFxMlnrsklrpweBzYY6ype9CzepAuQF63xC/eIJw1pMZEC1pPgq/r+1gWx5M6g8fpu2O12sb6pLeqT+G4mK3yHMZTojfp1xwQedRmwZnWQ8SCh4XV2a/+3OTz4D4pmmumyBV7V2VW3he8y6usinSjfYPxLyTng27fgw6jQhHl2mVhxBBjiwr5ljvJV7L+MJYDiZjGWfBCsTmehk6rbNt7ahTJpHu4B9ctRqiZXjx0zGpTF91OKifmy4nTq31p1XaIsZAHCWvItXKeke06KKKRTIm6mCT9yBJVwG1sqQhjrkP77q0/JGYgOwgdCQCstsAZQ0FlOrGYXYTIQK/krLyCAZjg8vP/Ers/KVN8F88OsyU5/T1e5ba8A2F63qgwhtkWoVIEZErOVL8sM/DtpWTlcBNsvVOFl4tT+Sk6a2ScCptFL5F6cZXTIw8JmgoCbyqB6xyU+uPP5y09s5T8MDC7Em7NpxCjgD39eed40gHQrBm6CtAbS9JOCVPkPxbpcGDj/LoAGbnyYzMpOmTi28LJ9FTIqyGuAI0jxY/QpNelOOEvNK3io1HeYkK3AprImDk99tlUjgt9bc3ejCOFDXt9LqGHjFssGrhVHyJBmWjwHQipcIMHxF2jfP5jfAGuHtJRRncHIFgLWmJ1XmzJ0LLqWCJShdJSJLc7L6YeVcgKfzOZCwhtzJ7VeI3uBhPXQNOqCf5tlQ32HApAMvCIiBwhYrpfFo/kvjfTMB/NJ0w2Lk8GAFfFQY+U6uX1oB0hztGmA5HggJTwgLo8exG64m3Xu4fg2g4MmQol7z6xNwwubABnpoS3Og85giFkaarUP2ovQyixFpXki8Xf5a5NwjUGCPbx+LD3WKJiBtkiHsYMMV/VAZVNvdg/Ph/V4ZYOr+hw7g9mOJXi+oVZxG9pqJC9w8nRkegsnQ2lpRHn22lTsIa9aOkR0X8zp/IajQxUzv057a3WptBst0EZbZtfmWp6h2K0sDQS9oQT1PqOkGDJlz6ZHZzDMShDTcwJfIZMdnjpeHdPoYoqlcn3M8daRuMeTSP3mabP1/pdQrs6Wl7ToKog2Au/gv46pUMgVcKmdWNJdDF8RplMMXJpU2tZMdkTWq4ofSypsCfuWfeHOpFQGJdFF6OoH2pDJXvkqpj1a832g3uYtVQg1TGyqYqI7UBZQy4NEZbdj6O/s6MNEnfujUDQ8QZj7rSE2RI77egKDWzM708AsvlMFoeX4CVP09rMzXNP2aOZwY7zOBTvBgEEqCWlXAFlY8pW0zIm16gqSPiwRUgH41i1PuJx382C0zTWGT243ZhLnyOIlreUrMQAfwR/oYt+ljnDFKqa5PEczDPa+u/vWmR6UM+Q/lLFiIlgBJTfaekWoeLpPd9FPN4gIHzK1ZS8kDHyq3lh/e6FQ84a4Zg6JlfQC/qhAAAAA==";function In(e,t,n){if(!e)return"";if(n==="en"){const r=e[`${t}_en`];if(r)return r}return e[t]}const v5=(e,t,n)=>{t/=100,n/=100;const r=a=>(a+e/30)%12,s=t*Math.min(n,1-n),i=a=>n-s*Math.max(-1,Math.min(r(a)-3,Math.min(9-r(a),1)));return[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)]},Ul=(e,t,n)=>`rgb(${v5(e,t,n).join(", ")})`,Mp=e=>e.map(([t,n,r,s,i,a])=>({bgTop:Ul(t,n,r),border:Ul(t,n,r+8),accent:Ul(s,i,a),img:null})),Lp={graphite:[{accent:"#b6b6b6",border:"#2a2a2a",bgTop:"#1c1c1c",img:wv},{accent:"#d3d3d3",border:"#2e2e2e",bgTop:"#212121",img:bv},{accent:"#8fb8bd",border:"#26383b",bgTop:"#16282b",img:kv},{accent:"#6fbf73",border:"#1f3a24",bgTop:"#122916",img:Sv},{accent:"#63d34f",border:"#204a1c",bgTop:"#123312",img:jv},{accent:"#8bea3c",border:"#2b5518",bgTop:"#173a0f",img:Ev},{accent:"#d9a83c",border:"#4a3a16",bgTop:"#33270d",img:Cv},{accent:"#f2c14e",border:"#5a4718",bgTop:"#3d2f0c",img:Tv}],"deep-blue":Mp([[215,18,11,210,15,60],[212,25,11,208,32,60],[210,38,12,206,46,60],[212,46,12,205,56,61],[214,52,12,205,63,62],[216,58,12,205,68,63],[220,62,12,212,73,65],[226,66,12,216,78,68]]),"warm-bronze":Mp([[30,15,11,34,22,60],[34,32,11,34,46,60],[32,46,12,30,58,60],[26,52,12,24,65,60],[20,55,12,18,68,60],[14,55,12,12,68,61],[8,52,12,6,64,62],[2,50,12,358,60,63]])},w5="#f2f2f2",Ap="#8a8a8a",Dp="#c4c4c4",Rp=5,b5=3,k5={recommended:{Icon:cP,className:"bg-brand-500 text-white"},popular:{Icon:DT,className:"bg-amber-400 text-neutral-950"},tip:{Icon:FT,className:"bg-sky-500 text-white"},coming_soon:{Icon:nv,className:"bg-white text-neutral-900"},custom:{Icon:null,className:"bg-brand-500 text-white"}};function S5({pkg:e,tier:t,tierT:n,layout:r,bullets:s,formatPrice:i,contactUrl:a,priceNote:l,t:u}){const[c,d]=m.useState(!1),f=Ue().canEdit("packages"),[h,g]=m.useState(!1),y=m.useRef(null),b=s.length-Rp,w=c?s:s.slice(0,Rp);m.useLayoutEffect(()=>{const N=y.current;if(!N||c){g(!1);return}const P=()=>g([...N.querySelectorAll("[data-clamp]")].some(B=>B.scrollHeight>B.clientHeight+1));P();const V=new ResizeObserver(P);return V.observe(N),()=>V.disconnect()},[c,s.length,e.description]);const p=lf(),x=mr(p,`packages.${e.id}.description`),v=mr(p,`packages.${e.id}.price_text`),{package_card_height:k}=kt(),E=k5[e.badge],C=r!=="grid",j=e.badge==="custom"?e.badge_text:e.badge&&u(`modelPage.badges.${e.badge}`),S=t.img?null:{backgroundColor:t.accent,WebkitMaskImage:`url(${_p})`,maskImage:`url(${_p})`,maskMode:"luminance",WebkitMaskSize:"cover",maskSize:"cover",WebkitMaskPosition:"center",maskPosition:"center",WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat"};return o.jsxs("div",{style:{borderColor:t.border,background:`linear-gradient(180deg, ${t.bgTop} 0%, #0b0b0b 55%, #080808 100%)`,...C?{gridRow:"span 4",gridTemplateRows:"subgrid",gridTemplateColumns:"minmax(0, 1fr)",rowGap:0}:{minHeight:`${k}px`}},className:r==="strip"?"relative grid snap-start overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 dark:shadow-black/40":r==="coverflow"?"relative grid snap-center overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 will-change-transform dark:shadow-black/40":"relative flex flex-col overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 dark:shadow-black/40",children:[t.img?o.jsx("img",{src:t.img,alt:"","aria-hidden":"true",className:"pointer-events-none absolute inset-0 h-full w-full object-cover"}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...S,opacity:.2+n*.45,filter:"blur(18px)"},"aria-hidden":"true"}),o.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...S,opacity:.55+n*.45},"aria-hidden":"true"})]}),E&&j&&o.jsxs("span",{className:`absolute top-2 left-1/2 z-10 flex max-w-[calc(100%-16px)] -translate-x-1/2 items-center gap-1 whitespace-nowrap rounded-full px-3 py-1 text-xs font-bold shadow ${E.className}`,children:[E.Icon&&o.jsx(E.Icon,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),o.jsx("span",{className:"truncate",children:j})]}),o.jsxs("div",{className:"relative z-10 text-center",style:{padding:"34px 20px 0",gridRow:1},children:[o.jsx("div",{style:{fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",letterSpacing:"3px",fontWeight:600,color:t.accent,textTransform:"uppercase",lineHeight:1.1},children:o.jsx(fe,{entity:"packages",id:e.id,field:"name",lang:"de",value:e.name,placeholder:"Paketname"})}),o.jsx("div",{style:{width:"44px",height:"2px",margin:"14px auto 0",background:`linear-gradient(90deg, rgba(255,255,255,0) 0%, ${t.accent} 50%, rgba(255,255,255,0) 100%)`}})]}),s.length>0&&o.jsxs("div",{className:"relative z-10",style:{gridRow:2,padding:"18px 20px 14px",background:c?"linear-gradient(180deg, rgba(8,8,8,0.7) 0%, rgba(8,8,8,0.62) 94%, rgba(8,8,8,0) 100%)":"linear-gradient(180deg, rgba(8,8,8,0.55) 0%, rgba(8,8,8,0.48) 92%, rgba(8,8,8,0) 100%)"},children:[o.jsx(Sc,{entity:"packages",id:e.id,field:"description",value:e.description,label:"Zusätzliche Stichpunkte",hint:"Eine Zeile = ein Stichpunkt (unter den Produkten). **fett** wird fett dargestellt. Die Produkte selbst pflegst du im Admin unter Pakete.",children:o.jsx("ul",{ref:y,className:"space-y-1.5 text-left",children:w.map((N,P)=>o.jsxs("li",{className:"flex items-start gap-2",style:{fontSize:"13px",color:Dp,...N.fromDescription?x:null},children:[o.jsx(tv,{className:"mt-0.5 h-3.5 w-3.5 shrink-0",style:{color:t.accent}}),o.jsx("span",{"data-clamp":!0,className:"min-w-0 leading-snug",style:c?{overflowWrap:"anywhere",hyphens:"auto"}:{overflowWrap:"anywhere",hyphens:"auto",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:b5,overflow:"hidden"},children:N.fromDescription?o.jsx(y5,{text:N.text}):N.text.replace(/\//g,"/")})]},P))})}),(c||b>0||h)&&o.jsxs("button",{type:"button",onClick:()=>d(N=>!N),className:"mt-2.5 flex items-center gap-1 hover:opacity-80",style:{fontSize:"13px",color:t.accent},children:[c?u("modelPage.lessBullets"):b>0?u("modelPage.moreBullets")(b):u("modelPage.showMore"),c?o.jsx(ET,{className:"h-3.5 w-3.5"}):o.jsx(vT,{className:"h-3.5 w-3.5"})]})]}),s.length===0&&f&&o.jsx(Sc,{entity:"packages",id:e.id,field:"description",value:e.description,label:"Zusätzliche Stichpunkte",hint:"Eine Zeile = ein Stichpunkt. **fett** wird fett dargestellt.",className:"relative z-10 mx-5 mt-4 text-center text-xs",style:{gridRow:2,color:Dp},children:"+ Stichpunkte hinzufügen"}),o.jsx("div",{className:"relative z-10 flex-1",style:{gridRow:3}}),o.jsx("div",{className:"relative z-10",style:{gridRow:4,padding:"20px 20px 28px",background:"linear-gradient(180deg, rgba(8,8,8,0) 0%, rgba(8,8,8,0.85) 45%, rgba(8,8,8,0.95) 100%)"},children:o.jsxs("div",{className:"text-center",children:[!e.price_text&&o.jsx("div",{style:{fontSize:"13px",color:Ap},children:u("modelPage.totalPrice")}),o.jsx("div",{style:{marginTop:"4px",fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",fontWeight:600,letterSpacing:"1px",color:w5,...e.price_text?v:null},children:f?o.jsx(fe,{entity:"packages",id:e.id,field:"price_text",value:e.price_text,placeholder:i(e.total_price),title:"Leer lassen = Preis automatisch aus den Produkten"}):e.price_text||i(e.total_price)}),!e.price_text&&l&&o.jsx("div",{style:{marginTop:"2px",fontSize:"11px",color:Ap},children:l}),o.jsx(G,{to:a(e),onClick:()=>Zt("select_package",{package_name:e.name,value:Number(e.total_price)||void 0,currency:"EUR"}),className:"mt-4 inline-block rounded-md bg-brand-500 px-4 py-2 text-center text-sm font-semibold text-white shadow-lg shadow-brand-500/30 hover:bg-brand-400",children:u("modelPage.requestContact")}),e.video_url&&o.jsx("div",{className:"mt-3",children:o.jsxs("a",{href:e.video_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 rounded-full border border-white/15 bg-white/5 px-3 py-1 text-xs font-semibold text-white transition hover:bg-white/15",children:[o.jsx(TT,{className:"h-4 w-4 text-red-500","aria-hidden":"true"}),u("modelPage.videoLink")]})})]})})]})}function j5(){const{brandSlug:e,modelSlug:t}=kd(),[n,r]=m.useState(null),[s,i]=m.useState(null),a=Oo(),{t:l,language:u}=ye(),c=Ue(),{package_card_theme:d,package_card_layout:f,package_wheel_hint_interval:h,package_card_width:g,package_card_height:y,phone:b,whatsapp:w,price_note:p,price_note_en:x}=kt();gv(!!n&&!!(b||w),{hidesContact:!0});const v=u==="en"&&x||p,k=Fo(),E=(Lp[d]||Lp.graphite).map((_,R)=>{const{custom:X}=k.packageTier(R);return X?{..._,img:X}:_}),C=["grid","strip","coverflow"].includes(f)?f:"strip",j=Math.max(2,Number(h)||8)*1e3,S=m.useRef(null),N=m.useRef(null),P=m.useRef(null),[V,B]=m.useState(!1),se=_=>new Intl.NumberFormat(u==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(_);m.useEffect(()=>{a.vehicles.enabled&&!a.bypass||oe.get(`/models/${e}/${t}/packages`).then(r).catch(_=>i(_))},[e,t,a.vehicles.enabled,a.bypass]),m.useEffect(()=>{const _=S.current;if(C!=="coverflow"||!_)return;let R=0;const X=()=>{R=0;const J=_.scrollLeft+_.clientWidth/2;for(const je of _.children){const Ie=je.offsetLeft+je.offsetWidth/2,Je=Math.max(-1,Math.min(1,(Ie-J)/(je.offsetWidth*1.4))),ht=Math.abs(Je);je.style.transform=`rotateY(${(-Je*35).toFixed(2)}deg) scale(${(1-ht*.13).toFixed(3)}) translateZ(${(-ht*60).toFixed(1)}px)`,je.style.zIndex=String(100-Math.round(ht*50))}},Q=()=>{R||(R=requestAnimationFrame(X))};X(),_.addEventListener("scroll",Q,{passive:!0});const de=new ResizeObserver(Q);return de.observe(_),()=>{_.removeEventListener("scroll",Q),de.disconnect(),cancelAnimationFrame(R)}},[C,n]),m.useEffect(()=>{const _=S.current;if(C==="grid"||!_)return;const R=window.matchMedia("(pointer: coarse)").matches;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let Q=[],de=0;const J=()=>{const Ie=Math.min(_.clientWidth*.4,160);Q.push(setTimeout(()=>_.scrollTo({left:Ie,behavior:"smooth"}),500)),Q.push(setTimeout(()=>_.scrollTo({left:0,behavior:"smooth"}),1250)),R||(Q.push(setTimeout(()=>B(!0),450)),Q.push(setTimeout(()=>B(!1),1700)))},je=new IntersectionObserver(([Ie])=>{Ie.isIntersecting&&(je.disconnect(),J(),de=setInterval(()=>{_.scrollLeft<=1&&J()},j))},{threshold:.35});return je.observe(_),()=>{je.disconnect(),clearInterval(de),Q.forEach(clearTimeout)}},[C,n,j]),m.useEffect(()=>{const _=S.current;if(C==="grid"||!_)return;let R=0,X=0,Q=!1,de=0,J=0;const je=()=>[..._.children].map(pe=>pe.offsetLeft+pe.offsetWidth/2),Ie=(pe,et)=>{let U=0,K=1/0;return pe.forEach((le,mt)=>{const Gn=Math.abs(le-et);Gn{Q=!1;const pe=je();if(!pe.length)return;const et=_.scrollLeft+_.clientWidth/2,U=Ie(pe,et);let K=U;U===de&&Math.abs(J)>4&&(K=J>0?Math.min(de+1,pe.length-1):Math.max(de-1,0));const le=_.scrollWidth-_.clientWidth,mt=Math.max(0,Math.min(pe[K]-_.clientWidth/2,le));_.scrollTo({left:mt,behavior:"smooth"}),clearTimeout(X),X=setTimeout(()=>{_.style.scrollSnapType=""},450)},ht=pe=>{if(Math.abs(pe.deltaX)>Math.abs(pe.deltaY))return;const et=_.scrollWidth-_.clientWidth;if(et<=1)return;const U=_.scrollLeft<=1,K=_.scrollLeft>=et-1;pe.deltaY<0&&U||pe.deltaY>0&&K||(pe.preventDefault(),Q||(Q=!0,J=0,de=Ie(je(),_.scrollLeft+_.clientWidth/2)),J+=pe.deltaY,_.style.scrollSnapType="none",_.scrollLeft+=pe.deltaY,clearTimeout(R),R=setTimeout(Je,150))};return _.addEventListener("wheel",ht,{passive:!1}),()=>{_.removeEventListener("wheel",ht),clearTimeout(R),clearTimeout(X)}},[C,n]),m.useEffect(()=>{const _=S.current,R=N.current,X=P.current;if(C==="grid"||!_||!R||!X)return;let Q=0;const de=()=>{Q=0;const K=_.scrollWidth-_.clientWidth;if(K<=1){R.style.opacity="0",R.style.pointerEvents="none";return}R.style.opacity="1",R.style.pointerEvents="auto";const le=R.clientWidth,mt=Math.max(32,_.clientWidth/_.scrollWidth*le);X.style.width=`${mt}px`,X.style.transform=`translateX(${(_.scrollLeft/K*(le-mt)).toFixed(1)}px)`},J=()=>{Q||(Q=requestAnimationFrame(de))};de(),_.addEventListener("scroll",J,{passive:!0});const je=new ResizeObserver(J);je.observe(_);let Ie=!1,Je=0;const ht=K=>{const le=R.getBoundingClientRect(),mt=X.clientWidth,Gn=Math.min(Math.max(K-le.left-Je,0),le.width-mt);_.scrollLeft=Gn/(le.width-mt)*(_.scrollWidth-_.clientWidth)},pe=K=>{Ie=!0,R.setPointerCapture(K.pointerId),_.style.scrollSnapType="none";const le=X.getBoundingClientRect();Je=K.clientX>=le.left&&K.clientX<=le.right?K.clientX-le.left:X.clientWidth/2,K.clientX>=le.left&&K.clientX<=le.right||ht(K.clientX)},et=K=>{Ie&&ht(K.clientX)},U=K=>{var le;Ie&&(Ie=!1,(le=R.hasPointerCapture)!=null&&le.call(R,K.pointerId)&&R.releasePointerCapture(K.pointerId),_.style.scrollSnapType="")};return R.addEventListener("pointerdown",pe),R.addEventListener("pointermove",et),R.addEventListener("pointerup",U),R.addEventListener("pointercancel",U),()=>{_.removeEventListener("scroll",J),je.disconnect(),cancelAnimationFrame(Q),R.removeEventListener("pointerdown",pe),R.removeEventListener("pointermove",et),R.removeEventListener("pointerup",U),R.removeEventListener("pointercancel",U)}},[C,n]),vr({title:n?l("modelPage.metaTitle")(n.model.brand_name,n.model.name):l("modelPage.metaTitleFallback"),description:n?l("modelPage.metaDescription")(n.model.brand_name,n.model.name):void 0,path:`/fahrzeuge/${e}/${t}`});const ne=qe(n?`car_models.${n.model.id}.name`:"");if(a.vehicles.enabled&&!a.bypass)return o.jsx(Ci,{message:a.vehicles.message});if(s)return s.status===404?o.jsx(ff,{}):o.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:Ho(s,l)});if(!n)return o.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:l("modelPage.loading")});const{model:q}=n,W=n.packages.map(_=>({..._,name:c.getValue("packages",_.id,"name","de",_.name),description:c.getValue("packages",_.id,"description",u,In(_,"description",u)),tagline:In(_,"tagline",u),price_text:c.getValue("packages",_.id,"price_text",u,In(_,"price_text",u))})),I=new Map([...W].sort((_,R)=>_.total_price-R.total_price).map((_,R)=>[_.id,R])),T=_=>{const R=_.tier_count??W.length,X=_.tier_rank??I.get(_.id)??0,Q=R<=1?0:X/(R-1),de=Math.round(Q*(E.length-1));return{tier:E[de],tierT:Q}},M=_=>[..._.products.map(R=>({text:R.name_override||R.scraped_name||l("modelPage.productLoading"),fromDescription:!1})),...(_.description||"").split(`
+`).map(R=>R.trim()).filter(Boolean).map(R=>({text:R,fromDescription:!0}))],L=_=>`/kontakt?${new URLSearchParams({brand:q.brand_name,model:q.name,package:_.name,packageId:_.id,total:_.total_price,brandSlug:e,modelSlug:t}).toString()}`,D=`/kontakt?${new URLSearchParams({brand:q.brand_name,model:q.name}).toString()}`,H=l("modelPage.whatsappText")(q.brand_name,q.name);return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"mx-auto max-w-6xl px-4 pt-12 sm:px-6",children:[a.vehicles.enabled&&a.bypass&&o.jsx(Ti,{inline:!0}),o.jsxs("h1",{className:`text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl ${W.length?"mb-2":"mb-8"}`,children:[q.brand_name," ",o.jsx(fe,{entity:"car_models",id:q.id,field:"name",lang:"de",value:q.name,style:ne})," – ",l("modelPage.titleSuffix")]}),W.length===0&&o.jsxs("div",{className:"pb-12",children:[o.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:l("modelPage.empty")}),o.jsx(G,{to:D,className:"mt-5 inline-block rounded-md bg-brand-500 px-5 py-3 text-sm font-semibold text-white shadow-sm hover:bg-brand-600",children:l("modelPage.customRequest")})]})]}),W.length>0&&o.jsx("section",{className:"py-10 sm:py-14",style:{fontFamily:"'Barlow', sans-serif"},children:o.jsxs("div",{className:C==="grid"?"mx-auto max-w-6xl px-4 sm:px-6":"relative mx-auto max-w-[1880px] px-4 sm:px-6",children:[o.jsx("div",{ref:C==="grid"?void 0:S,className:C==="grid"?"grid items-stretch gap-[18px]":"grid select-none gap-x-[18px] overflow-x-auto pb-3 snap-x snap-mandatory [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",style:C==="grid"?{gridTemplateColumns:`repeat(auto-fill, minmax(${g}px, 1fr))`,gridAutoRows:"1fr"}:{gridAutoFlow:"column",gridAutoColumns:`${g}px`,gridTemplateRows:"auto auto 1fr auto",minHeight:`${Number(y)+(C==="coverflow"?22:12)}px`,...C==="coverflow"?{perspective:"1200px",paddingLeft:`calc(50% - ${g/2}px)`,paddingRight:`calc(50% - ${g/2}px)`,paddingTop:"10px"}:null},children:W.map(_=>{const{tier:R,tierT:X}=T(_);return o.jsx(S5,{pkg:_,tier:R,tierT:X,layout:C,bullets:M(_),formatPrice:se,contactUrl:L,priceNote:v,t:l},_.id)})}),C!=="grid"&&o.jsx("div",{className:`pointer-events-none absolute inset-x-0 top-1/2 z-[200] flex -translate-y-1/2 justify-center transition-opacity duration-300 ${V?"opacity-100":"opacity-0"}`,"aria-hidden":"true",children:o.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-neutral-900/85 px-4 py-2 text-xs font-medium text-white shadow-lg backdrop-blur-sm",children:[o.jsx(bT,{className:"h-3.5 w-3.5 text-brand-400"}),o.jsx(GT,{className:"h-4 w-4 text-brand-400"}),o.jsx(ST,{className:"h-3.5 w-3.5 text-brand-400"}),o.jsx("span",{children:l("modelPage.wheelHint")})]})}),C!=="grid"&&o.jsx("div",{ref:N,className:"relative mx-auto mt-5 h-2 w-56 max-w-full cursor-pointer rounded-full bg-neutral-900/10 transition-opacity duration-200 dark:bg-white/10",style:{touchAction:"none"},"aria-hidden":"true",children:o.jsx("div",{ref:P,className:"absolute left-0 top-0 h-full rounded-full bg-brand-500 shadow-[0_0_10px_rgba(107,166,38,0.7)]",style:{width:"48px"}})})]})}),W.length>0&&o.jsxs("div",{className:"mx-auto max-w-6xl px-4 pb-24 text-center sm:px-6 sm:pb-14",children:[o.jsx("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:l("modelPage.customHint")}),o.jsx(G,{to:D,className:"mt-2 inline-block text-sm font-semibold text-brand-600 underline hover:text-brand-500",children:l("modelPage.customRequest")})]}),(b||w)&&o.jsxs("div",{className:"fixed inset-x-0 bottom-0 z-20 flex gap-3 border-t border-neutral-200 bg-white/95 px-4 py-3 shadow-[0_-8px_24px_rgba(0,0,0,0.08)] backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/95 sm:hidden",children:[b&&o.jsxs("a",{href:rs(b),onClick:()=>Zt("contact_call"),className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white",children:[o.jsx(zn,{className:"h-4 w-4"}),l("nav.call")]}),w&&o.jsxs("a",{href:Vo(w,H),target:"_blank",rel:"noopener noreferrer",onClick:()=>Zt("contact_whatsapp"),className:"flex flex-1 items-center justify-center gap-2 rounded-md border border-neutral-300 px-4 py-2.5 text-sm font-semibold text-neutral-700 dark:border-neutral-700 dark:text-neutral-200",children:[o.jsx(rf,{className:"h-4 w-4"}),l("nav.whatsapp")]})]})]})}const E5={car:oo,caravan:gT,"car-front":hT,cog:_T,zap:xP,boxes:dT,"shield-alert":aP,video:mP},C5=m.lazy(()=>Y(()=>import("./iconRegistry-UyWPKm7h.js"),__vite__mapDeps([2,3,4,5])));function T5({name:e,className:t="h-6 w-6",...n}){if(!e)return null;const r=E5[e];return r?o.jsx(r,{className:t,...n}):o.jsx(m.Suspense,{fallback:o.jsx("span",{className:`inline-block ${t}`,"aria-hidden":"true"}),children:o.jsx(C5,{name:e,className:t,...n})})}function P5(){const[e,t]=m.useState([]),n=Oo(),{t:r,language:s}=ye(),i=Ue();return m.useEffect(()=>{oe.get("/services").then(t).catch(()=>t([]))},[]),vr({title:r("leistungen.metaTitle"),description:r("leistungen.metaDescription"),path:"/leistungen"}),n.services.enabled&&!n.bypass?o.jsx(Ci,{message:n.services.message}):o.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[n.services.enabled&&n.bypass&&o.jsx(Ti,{inline:!0}),o.jsx(Ye,{k:"leistungen.title",as:"h1",className:"mb-2 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),o.jsx(Ye,{k:"leistungen.intro",as:"p",className:"mb-10 block max-w-2xl text-neutral-600 dark:text-neutral-300"}),o.jsx("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:e.map(a=>({...a,title:In(a,"title",s),description:In(a,"description",s),cta_label:In(a,"cta_label",s)})).map((a,l)=>o.jsxs(Ke,{index:l%3,shine:!0,className:"overflow-hidden rounded-xl border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900",children:[o.jsxs("div",{className:"relative aspect-[4/3]",children:[a.image_path&&o.jsx("img",{src:a.image_path,alt:a.title,className:"h-full w-full object-cover",loading:"lazy"}),o.jsx("div",{className:"absolute -bottom-5 left-5 flex h-12 w-12 items-center justify-center rounded-full bg-brand-500 text-white shadow-lg ring-4 ring-white dark:ring-neutral-900",children:o.jsx(T5,{name:a.icon_name,className:"h-6 w-6"})})]}),o.jsxs("div",{className:"p-6 pt-8",children:[o.jsx(fe,{entity:"services",id:a.id,field:"title",value:a.title,as:"h2",className:"mb-2 block font-semibold text-neutral-900 dark:text-white"}),o.jsx(fe,{entity:"services",id:a.id,field:"description",value:a.description,as:"p",multiline:!0,className:"mb-3 block text-sm text-neutral-600 dark:text-neutral-300"}),o.jsxs(G,{to:a.cta_url||"/kontakt",className:"text-sm font-semibold text-brand-600 hover:underline dark:text-brand-400",children:[i.canEdit("services")||a.cta_label?o.jsx(fe,{entity:"services",id:a.id,field:"cta_label",value:a.cta_label,placeholder:r("leistungen.contact")}):r("leistungen.contact")," ","→"]})]})]},a.id))}),o.jsxs("div",{className:"mt-12 rounded-xl border border-neutral-200 bg-neutral-50 p-8 text-center dark:border-neutral-800 dark:bg-neutral-900/40",children:[o.jsx(Ye,{k:"leistungen.notListedTitle",as:"h2",className:"mb-2 block text-xl font-bold text-neutral-900 dark:text-white"}),o.jsx(Ye,{k:"leistungen.notListedText",as:"p",className:"mb-5 block text-neutral-600 dark:text-neutral-300"}),o.jsx(G,{to:"/kontakt",className:"inline-block rounded-md bg-brand-500 px-6 py-3 text-sm font-semibold text-white hover:bg-brand-600",children:o.jsx(Ye,{k:"leistungen.contact"})})]})]})}function N5({name:e,description:t,className:n="",children:r}){const{consent:s,acceptAll:i,openSettings:a}=yr();return s.external?r:o.jsxs("div",{className:`flex flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-neutral-50 p-6 text-center dark:border-neutral-800 dark:bg-neutral-900/40 ${n}`,children:[o.jsx("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:t||`${e} wird erst nach deiner Zustimmung geladen, da dabei Daten an Google übertragen werden.`}),o.jsxs("div",{className:"flex flex-wrap justify-center gap-2",children:[o.jsx("button",{type:"button",onClick:i,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:"Laden erlauben"}),o.jsx("button",{type:"button",onClick:a,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Cookie-Einstellungen"})]})]})}const _5=e=>(e||"").replace(/[^\d+]/g,""),Sa={fontFamily:"'Michroma', sans-serif"};function M5({className:e}){return o.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:o.jsx("path",{d:"M12 2a10 10 0 0 0-8.6 15l-1.3 4.8 5-1.3A10 10 0 1 0 12 2zm0 2a8 8 0 1 1-4.2 14.8l-.3-.2-2.6.7.7-2.5-.2-.3A8 8 0 0 1 12 4zm4.3 9.9c-.2-.1-1.4-.7-1.6-.8s-.4-.1-.5.1l-.7.9c-.1.1-.3.2-.5.1a6.5 6.5 0 0 1-3.2-2.8c-.1-.2 0-.4.1-.5l.4-.5.2-.4v-.4l-.7-1.7c-.2-.4-.4-.4-.5-.4h-.5c-.2 0-.4.1-.6.3-.7.7-.9 1.6-.6 2.7.5 1.7 1.6 3.1 3.4 4.2 1.7 1 2.5 1 3.4.9.5-.1 1.4-.6 1.6-1.1.2-.5.2-1 .1-1.1z"})})}function L5({path:e,className:t}){return o.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o.jsx("path",{d:e})})}const A5={premium:"M4 12v3M8 8v11M12 4v16M16 8v11M20 12v3",germany:"M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0 M12 2v2M12 20v2M2 12h2M20 12h2M5 5l1.5 1.5M17.5 17.5 19 19M19 5l-1.5 1.5M6.5 17.5 5 19",individual:"M6 3h12l4 6-10 12L2 9z M11 3 8 9l4 12 4-12-3-6M2 9h20",experts:"M20 6 9 17l-5-5"};function Ip({formatted:e,color:t}){const[n,r]=e.split("€");return o.jsxs("span",{style:{...Sa,color:t},children:[n,o.jsx("span",{style:{fontFamily:"'Barlow', sans-serif"},children:"€"}),r]})}function ea({icon:e,label:t,name:n,type:r="text",required:s,value:i,onChange:a,placeholder:l,autoComplete:u,inputMode:c}){return o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx("label",{htmlFor:`kf-${n}`,className:"text-xs font-semibold uppercase tracking-[2px]",style:{color:"var(--kf-label)"},children:t}),o.jsxs("div",{className:"relative flex items-center",children:[o.jsx(e,{className:"pointer-events-none absolute left-[14px] h-[17px] w-[17px]",style:{color:"var(--kf-fieldicon)"}}),o.jsx("input",{id:`kf-${n}`,name:n,type:r,required:s,autoComplete:u,inputMode:c,value:i,onChange:a,placeholder:l,className:"w-full rounded-lg border py-3.5 pl-[42px] pr-4 text-[15px] outline-none transition-colors",style:{background:"var(--kf-field)",borderColor:"var(--kf-fieldbrd)",color:"var(--kf-text2)"}})]})]})}function D5(){const[e]=vk(),{phone:t,whatsapp:n,contact_email:r,address_street:s,address_zip:i,address_city:a,business_hours:l,price_note:u,price_note_en:c}=kt(),{t:d,language:f}=ye(),h=Fo(),g=h.slot("contact_bg_light").custom,y=h.slot("contact_bg_dark").custom,b={...g&&{"--kontakt-bg-light":`url("${g}")`},...y&&{"--kontakt-bg-dark":`url("${y}")`}},{consent:w}=yr(),p=[s,[i,a].filter(Boolean).join(" ")].filter(Boolean).join(", "),x=encodeURIComponent(p),v=`https://www.google.com/maps/dir/?api=1&destination=${x}`,k=mv(l,d("footer.closed")),E=U=>new Intl.NumberFormat(f==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(U),[C,j]=m.useState(()=>({name:"",email:"",phone:"",vin:"",message:e.get("topic")||""})),[S,N]=m.useState("idle"),[P,V]=m.useState(""),[B,se]=m.useState([]),[ne,q]=m.useState([]),W=m.useRef(Date.now()),I=m.useRef(null),T=e.get("packageId"),M=e.get("brandSlug"),L=e.get("modelSlug"),[D,H]=m.useState(e.get("total")?Number(e.get("total")):null),[_,R]=m.useState(null),X=f==="en"&&c||u;m.useEffect(()=>{!T||!M||!L||oe.get(`/models/${encodeURIComponent(M)}/${encodeURIComponent(L)}/packages`).then(U=>{var le;const K=(le=U==null?void 0:U.packages)==null?void 0:le.find(mt=>String(mt.id)===String(T));K&&(H(Number(K.total_price)),R(K.price_text||null))}).catch(()=>{})},[T,M,L]),m.useEffect(()=>{if(!T){se([]);return}oe.get(`/packages/${T}/upgrades`).then(se).catch(()=>se([]))},[T]);const Q=U=>{q(K=>K.includes(U)?K.filter(le=>le!==U):[...K,U])},de=B.filter(U=>ne.includes(U.id)).reduce((U,K)=>U+Number(K.price),0);vr({title:d("contactPage.metaTitle"),description:d("contactPage.metaDescription"),path:"/kontakt"});const J={brand:e.get("brand")||"",model:e.get("model")||"",package:e.get("package")||""},je=!!(J.brand&&J.model&&J.package),Ie=!je&&!!(J.brand&&J.model),Je=U=>j(K=>({...K,[U.target.name]:U.target.value})),ht=async U=>{var K;U.preventDefault(),N("sending"),V("");try{await oe.post("/contact",{...C,website:((K=U.target.elements.website)==null?void 0:K.value)||"",fill_ms:Date.now()-W.current,brand_name:J.brand||null,model_name:J.model||null,package_name:J.package||null,product_name:e.get("product")||null,package_id:T||null,package_product_id:e.get("productId")||null,upgrade_ids:ne}),N("sent"),j({name:"",email:"",phone:"",vin:"",message:""}),Zt("generate_lead",{package_name:J.package||void 0,value:D||void 0,currency:"EUR"})}catch(le){V(Ho(le,d)),N("idle")}};m.useEffect(()=>{S==="sent"&&I.current&&(I.current.scrollIntoView({behavior:"smooth",block:"center"}),I.current.focus({preventScroll:!0}))},[S]);const pe=je?d("contactPage.whatsappText")(J.brand,J.model,J.package):Ie?d("modelPage.whatsappText")(J.brand,J.model):"",et=[{key:"premium",title:d("contactPage.featurePremiumTitle"),sub:d("contactPage.featurePremiumSub")},{key:"germany",title:d("contactPage.featureGermanyTitle"),sub:d("contactPage.featureGermanySub")},{key:"individual",title:d("contactPage.featureIndividualTitle"),sub:d("contactPage.featureIndividualSub")},{key:"experts",title:d("contactPage.featureExpertsTitle"),sub:d("contactPage.featureExpertsSub")}];return o.jsx("div",{className:"kf-page kontakt-sektion relative w-full overflow-hidden px-4 pb-10 sm:px-10",style:{color:"var(--kf-text2)",fontFamily:"'Barlow', sans-serif",...b},children:o.jsxs("div",{className:"relative z-10 mx-auto max-w-[1280px] pt-10 sm:pt-14",children:[o.jsx("div",{className:"mb-3 text-[13px] font-semibold uppercase tracking-[6px]",style:{color:"var(--kf-accent2)"},children:d("contactPage.heroEyebrow")}),o.jsxs("h1",{className:"text-[34px] leading-[1.08] sm:text-[46px] lg:text-[60px]",style:{...Sa,color:"var(--kf-text)"},children:[d("contactPage.heroTitlePre")," ",o.jsx("span",{style:{color:"var(--kf-accent2)"},children:d("contactPage.heroTitleAccent")})," ",d("contactPage.heroTitlePost")]}),o.jsx("p",{className:"mb-10 mt-5 max-w-[520px] text-lg leading-[1.55]",style:{color:"var(--kf-muted)"},children:d("contactPage.heroSubtitle")}),o.jsxs("div",{className:"grid grid-cols-1 items-start gap-10 min-[981px]:grid-cols-[minmax(0,1.35fr)_minmax(320px,1fr)]",children:[o.jsx("div",{children:o.jsxs("div",{className:"rounded-2xl border p-[22px] sm:p-10",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow)"},children:[je&&o.jsxs("div",{className:"mb-8 rounded-xl border px-6 py-[22px]",style:{background:"var(--kf-pkgbg)",borderColor:"var(--kf-pkgbrd)"},children:[o.jsxs("div",{className:"mb-3.5 flex items-center gap-2.5 text-xs font-bold uppercase tracking-[2px]",style:{color:"var(--kf-accent2)"},children:[o.jsx(XT,{className:"h-4 w-4"}),d("contactPage.packageBoxTitle")]}),o.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-5 gap-y-2 text-[15px]",children:[o.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.contextBrand")}),o.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:J.brand}),o.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.contextModel")}),o.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:J.model}),o.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.contextPackage")}),o.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:J.package})]}),o.jsxs("div",{className:"mt-3.5 flex items-baseline justify-between border-t pt-3.5",style:{borderColor:"var(--kf-pkgbrd)"},children:[o.jsx("span",{className:"text-[13px] font-semibold uppercase tracking-wide",style:{color:"var(--kf-muted)"},children:d("contactPage.packagePrice")}),o.jsx("span",{className:"text-xl",children:_||(D!=null?o.jsx(Ip,{formatted:E(D),color:"var(--kf-text)"}):"—")})]}),X&&!_&&o.jsx("div",{className:"mt-1 text-right text-xs",style:{color:"var(--kf-muted)"},children:X})]}),Ie&&o.jsxs("div",{className:"mb-8 flex items-center gap-3 rounded-xl border px-6 py-4 text-[15px]",style:{background:"var(--kf-pkgbg)",borderColor:"var(--kf-pkgbrd)"},children:[o.jsx(oo,{className:"h-4 w-4",style:{color:"var(--kf-accent2)"}}),o.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.vehicleBoxTitle")}),o.jsxs("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:[J.brand," ",J.model]})]}),B.length>0&&o.jsxs("div",{className:"mb-8 rounded-xl border p-5",style:{background:"var(--kf-field)",borderColor:"var(--kf-fieldbrd)"},children:[o.jsx("div",{className:"mb-3 text-xs font-bold uppercase tracking-[2px]",style:{color:"var(--kf-accent2)"},children:d("contactPage.optionalUpgrades")}),o.jsx("div",{className:"space-y-2",children:B.map(U=>o.jsxs("label",{className:"flex cursor-pointer items-start gap-3 rounded-lg border p-3 text-sm",style:{borderColor:"var(--kf-fieldbrd)"},children:[o.jsx("input",{type:"checkbox",checked:ne.includes(U.id),onChange:()=>Q(U.id),className:"mt-0.5 h-4 w-4 rounded",style:{accentColor:"var(--kf-accent)"}}),o.jsxs("span",{className:"flex-1",children:[o.jsx("span",{className:"block font-semibold",style:{color:"var(--kf-text2)"},children:In(U,"name",f)}),U.description&&o.jsx("span",{className:"block text-xs",style:{color:"var(--kf-muted)"},children:In(U,"description",f)})]}),o.jsxs("span",{className:"font-semibold",style:{color:"var(--kf-accent2)"},children:["+",E(U.price)]})]},U.id))}),ne.length>0&&D!=null&&!_&&o.jsxs("div",{className:"mt-3 flex items-baseline justify-between border-t pt-3 text-sm",style:{borderColor:"var(--kf-pkgbrd)"},children:[o.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide",style:{color:"var(--kf-muted)"},children:d("contactPage.totalWithUpgrades")}),o.jsx(Ip,{formatted:E(D+de),color:"var(--kf-text)"})]})]}),o.jsx("h2",{className:"mb-8 text-xl",style:{...Sa,color:"var(--kf-text)"},children:d("contactPage.formTitle")}),o.jsx("div",{role:"status","aria-live":"polite",children:S==="sent"&&o.jsxs("div",{ref:I,tabIndex:-1,className:"rounded-[10px] border p-5 outline-none",style:{borderColor:"var(--kf-accent)",background:"var(--kf-accentsoft)"},children:[o.jsx("div",{className:"text-base font-bold",style:{color:"var(--kf-accent2)"},children:d("contactPage.sentTitle")}),o.jsx("div",{className:"mt-1 text-sm",style:{color:"var(--kf-muted)"},children:d("contactPage.sentText")}),o.jsx("button",{type:"button",onClick:()=>{W.current=Date.now(),N("idle")},className:"mt-4 text-sm font-semibold underline",style:{color:"var(--kf-text2)"},children:d("contactPage.sendAnother")})]})}),S!=="sent"&&o.jsxs("form",{onSubmit:ht,noValidate:!1,children:[o.jsxs("div",{"aria-hidden":"true",style:{position:"absolute",left:"-10000px",width:"1px",height:"1px",overflow:"hidden"},children:[o.jsx("label",{htmlFor:"kf-website",children:"Website"}),o.jsx("input",{id:"kf-website",name:"website",type:"text",tabIndex:-1,autoComplete:"off",defaultValue:""})]}),o.jsxs("div",{className:"grid grid-cols-1 gap-6 min-[641px]:grid-cols-2",children:[o.jsx(ea,{icon:fP,label:d("contactPage.nameLabel"),name:"name",autoComplete:"name",required:!0,value:C.name,onChange:Je,placeholder:d("contactPage.namePlaceholder")}),o.jsx(ea,{icon:vc,label:d("contactPage.emailLabel"),name:"email",type:"email",autoComplete:"email",required:!0,value:C.email,onChange:Je,placeholder:d("contactPage.emailPlaceholder")}),o.jsx(ea,{icon:zn,label:d("contactPage.phoneLabel"),name:"phone",type:"tel",inputMode:"tel",autoComplete:"tel",value:C.phone,onChange:Je,placeholder:d("contactPage.phonePlaceholder")}),o.jsx(ea,{icon:oo,label:d("contactPage.vinLabel"),name:"vin",value:C.vin,onChange:Je,placeholder:d("contactPage.vinPlaceholder")})]}),o.jsxs("div",{className:"mt-6 flex flex-col gap-2",children:[o.jsx("label",{htmlFor:"kf-message",className:"text-xs font-semibold uppercase tracking-[2px]",style:{color:"var(--kf-label)"},children:d("contactPage.messageLabel")}),o.jsx("textarea",{id:"kf-message",name:"message",rows:5,value:C.message,onChange:Je,placeholder:d("contactPage.messagePlaceholder"),className:"w-full resize-y rounded-lg border px-4 py-3.5 text-[15px] outline-none",style:{background:"var(--kf-field)",borderColor:"var(--kf-fieldbrd)",color:"var(--kf-text2)"}})]}),o.jsx("div",{role:"alert","aria-live":"assertive",children:P&&o.jsx("p",{className:"mt-4 text-sm text-red-600 dark:text-red-400",children:P})}),o.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-5",children:[o.jsxs("button",{type:"submit",disabled:S==="sending",className:"inline-flex items-center gap-3 rounded-lg px-8 py-4 text-sm font-bold uppercase tracking-[3px] transition-[filter,box-shadow] hover:brightness-110 disabled:opacity-60",style:{background:"var(--kf-accent)",color:"var(--kf-btntext)",boxShadow:"0 10px 24px rgba(150,200,20,0.32)"},children:[o.jsx(sP,{className:"h-[18px] w-[18px]"}),d(S==="sending"?"contactPage.sending":"contactPage.submit")]}),o.jsx("div",{className:"text-[13px]",style:{color:"var(--kf-label)"},children:d("contactPage.requiredHint")})]}),o.jsxs("p",{className:"mt-5 text-[13px] leading-relaxed",style:{color:"var(--kf-muted)"},children:[d("contactPage.privacyPre"),o.jsx(G,{to:"/datenschutz",className:"underline",style:{color:"var(--kf-text2)"},children:d("contactPage.privacyLink")}),d("contactPage.privacyPost")]})]})]})}),o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsxs("div",{className:"relative overflow-hidden rounded-2xl border px-[22px] py-[26px] sm:px-8 sm:py-[34px]",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow)"},children:[o.jsx("div",{className:"pointer-events-none absolute -right-[60px] -top-[60px] h-[190px] w-[190px] rounded-full border border-dashed",style:{borderColor:"var(--kf-pkgbrd)"}}),o.jsx("h2",{className:"mb-7 text-[17px]",style:{...Sa,color:"var(--kf-text)"},children:d("contactPage.cardTitle")}),o.jsxs("div",{className:"flex flex-col gap-5",children:[o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:o.jsx(zn,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),o.jsxs("div",{children:[o.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:d("contactPage.phone")}),o.jsx("a",{href:`tel:${_5(t)}`,onClick:()=>Zt("contact_call"),className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:t})]})]}),o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:o.jsx(vc,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),o.jsxs("div",{children:[o.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:d("contactPage.email")}),o.jsx("a",{href:`mailto:${r}`,className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:r})]})]}),o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:o.jsx(sv,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),o.jsxs("div",{children:[o.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:d("contactPage.address")}),o.jsxs("div",{className:"text-base font-semibold leading-[1.4]",style:{color:"var(--kf-text2)"},children:[s,o.jsx("br",{}),[i,a].filter(Boolean).join(" ")]})]})]}),n&&o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:o.jsx(M5,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),o.jsxs("div",{children:[o.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:d("nav.whatsapp")}),o.jsx("a",{href:Vo(n,pe),target:"_blank",rel:"noopener noreferrer",onClick:()=>Zt("contact_whatsapp"),className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:n})]})]})]}),o.jsxs("div",{className:"mt-7 border-t pt-6",style:{borderColor:"var(--kf-divider)"},children:[o.jsx("div",{className:"mb-3 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:d("contactPage.hours")}),o.jsx("div",{className:"grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 text-[15px]",children:k.map(U=>o.jsxs("span",{style:{display:"contents"},children:[o.jsx("span",{style:{color:"var(--kf-label)"},children:U.days}),o.jsx("span",{children:U.label})]},U.key))})]})]}),o.jsxs("div",{className:"relative overflow-hidden rounded-2xl border",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow)"},children:[w.external&&o.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"absolute left-3.5 top-3.5 z-10 inline-flex items-center gap-2 rounded-lg border px-3.5 py-2 text-[13px] font-semibold hover:border-[var(--kf-accent)]",style:{background:"var(--kf-pill)",borderColor:"var(--kf-pillbrd)",color:"var(--kf-text2)",boxShadow:"var(--kf-shadow2)"},children:[d("contactPage.mapOpenChip"),o.jsx(LT,{className:"h-3.5 w-3.5",style:{color:"var(--kf-accent2)"}})]}),o.jsx(N5,{name:d("contactPage.mapEmbedName"),className:"h-[210px] w-full",children:o.jsx("div",{className:"h-[210px] overflow-hidden",children:o.jsx("iframe",{title:d("contactPage.mapIframeTitle"),src:`https://www.google.com/maps?q=${x}&output=embed`,width:"100%",height:"290",style:{border:0,display:"block",marginTop:"-60px"},loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})})}),o.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2.5 border-t px-4 py-4 text-[13px] font-bold uppercase tracking-[3px] hover:bg-[var(--kf-accentsoft)]",style:{borderColor:"var(--kf-divider)",color:"var(--kf-accent2)"},children:[d("contactPage.routePlan")," →"]})]})]})]}),o.jsx("div",{className:"mt-10 grid grid-cols-1 overflow-hidden rounded-2xl border min-[641px]:grid-cols-2 min-[901px]:grid-cols-4",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow2)"},children:et.map(U=>o.jsxs("div",{className:"flex items-center gap-4 border-b p-6 last:border-b-0 min-[641px]:border-b-0 min-[641px]:border-r min-[641px]:last:border-r-0",style:{borderColor:"var(--kf-divider)"},children:[o.jsx("div",{className:"flex h-[46px] w-[46px] flex-shrink-0 items-center justify-center rounded-full border-[1.5px]",style:{borderColor:"var(--kf-pkgbrd)",color:"var(--kf-accent2)"},children:o.jsx(L5,{path:A5[U.key],className:"h-[22px] w-[22px]"})}),o.jsxs("div",{children:[o.jsx("div",{className:"text-[15px] font-bold",style:{color:"var(--kf-text)"},children:U.title}),o.jsx("div",{className:"mt-0.5 text-[13px]",style:{color:"var(--kf-muted)"},children:U.sub})]})]},U.key))})]})})}const Wl="hifi-chunk-reload",Z=e=>m.lazy(()=>e().then(t=>{try{sessionStorage.removeItem(Wl)}catch{}return t},t=>{let n=!0;try{n=!!sessionStorage.getItem(Wl),sessionStorage.setItem(Wl,"1")}catch{}if(n)throw t;return window.location.reload(),new Promise(()=>{})})),R5=Z(()=>Y(()=>import("./GalleryOverview-DnE7cUZt.js"),[])),I5=Z(()=>Y(()=>import("./GalleryBrandPage-Df5c9Hno.js"),[])),V5=Z(()=>Y(()=>import("./GalleryProjectPage-BKQAZaYg.js"),[])),F5=Z(()=>Y(()=>import("./DownloadsPage-Q4pDkpF5.js"),__vite__mapDeps([6,7,3]))),O5=Z(()=>Y(()=>import("./Impressum-DlW19Yy0.js"),__vite__mapDeps([8,9]))),z5=Z(()=>Y(()=>import("./Datenschutz-DXQp-Dck.js"),__vite__mapDeps([10,9]))),B5=Z(()=>Y(()=>import("./AGB-DYizcMuI.js"),__vite__mapDeps([11,9]))),$5=Z(()=>Y(()=>import("./SetupWizard-DuIfSRkZ.js"),[])),H5=Z(()=>Y(()=>import("./Login-xNnQ9FHl.js"),[])),U5=Z(()=>Y(()=>import("./ConfirmEmail-BCfrsIOi.js"),[])),W5=Z(()=>Y(()=>import("./ResetPassword-CbHRhZ0h.js"),[])),G5=Z(()=>Y(()=>import("./Dashboard-CUGhUE6I.js"),__vite__mapDeps([12,13,14]))),K5=Z(()=>Y(()=>import("./Traffic-apVLkUWU.js"),[])),q5=Z(()=>Y(()=>import("./Brands-B5BsjijH.js"),__vite__mapDeps([15,0,1,16,17,18,4,19]))),Y5=Z(()=>Y(()=>import("./Models-DWZXQq_i.js"),__vite__mapDeps([20,0,1,16,17,18,4,19]))),X5=Z(()=>Y(()=>import("./GalleryBrands-Be9ZUHmO.js"),__vite__mapDeps([21,0,1,17,18,4,22]))),Z5=Z(()=>Y(()=>import("./GalleryProjects-DOi26Sv2.js"),__vite__mapDeps([23,0,1,17,18,4,22]))),Q5=Z(()=>Y(()=>import("./GalleryPhotos-clLWNblw.js"),__vite__mapDeps([24,17,18,4,22,1]))),J5=Z(()=>Y(()=>import("./Packages-DwnbBkwT.js"),__vite__mapDeps([25,26,16,18,5,4]))),e4=Z(()=>Y(()=>import("./Services-CHiVzalF.js"),__vite__mapDeps([27,0,1,2,3,4,5,28,17,18]))),t4=Z(()=>Y(()=>import("./Faqs-B6PSmxC0.js"),__vite__mapDeps([29,28,17,18,4]))),n4=Z(()=>Y(()=>import("./Partners-BaJ38LoY.js"),__vite__mapDeps([30,0,1,28,17,18,4]))),r4=Z(()=>Y(()=>import("./Downloads-BCGs_5D3.js"),__vite__mapDeps([31,7,28,17,18,4]))),s4=Z(()=>Y(()=>import("./HomeSections-BBPqMF1k.js"),__vite__mapDeps([32,33,16,34]))),i4=Z(()=>Y(()=>import("./ContactRequests-CU6VTsgK.js"),__vite__mapDeps([35,14]))),a4=Z(()=>Y(()=>import("./AccountSettings-D-azVHsS.js"),[])),o4=Z(()=>Y(()=>import("./AdminUsers-CXcLpH77.js"),[])),l4=Z(()=>Y(()=>import("./PermissionGroups-DSN34R9P.js"),[])),u4=Z(()=>Y(()=>import("./SettingsLayout-COlkUaYx.js"),[])),ta=Z(()=>Y(()=>import("./WebsiteSettings-qR-6Aut2.js"),__vite__mapDeps([36,0,1,34,17,18,4,26]))),c4=Z(()=>Y(()=>import("./LegalSettings-D3pgm9Sw.js"),__vite__mapDeps([37,33]))),d4=Z(()=>Y(()=>import("./UpdateSettings-FK69-drs.js"),[])),f4=Z(()=>Y(()=>import("./EmailSettings-DEomCzCZ.js"),__vite__mapDeps([38,33]))),h4=Z(()=>Y(()=>import("./DatabaseSettings-D_q7DprE.js"),__vite__mapDeps([39,13]))),m4=Z(()=>Y(()=>import("./ExportImportSettings-C3XtC5qm.js"),[])),p4=Z(()=>Y(()=>import("./MaintenanceSettings-C3_-hwFp.js"),[])),g4=Z(()=>Y(()=>import("./CountdownSettings-hIO7JBhP.js"),[])),x4=Z(()=>Y(()=>import("./ConnectionSettings-R0A0k8au.js"),[])),y4=Z(()=>Y(()=>import("./HiggsfieldSettings-DTNh5wqu.js"),__vite__mapDeps([40,0,1]))),v4=Z(()=>Y(()=>import("./ResetSettings-DfdxGH4j.js"),[])),w4=o.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"});function b4(){const{packageId:e}=kd();return o.jsx(fr,{to:`/admin/packages?paket=${e}`,replace:!0})}function k4(){return o.jsxs(gE,{reducedMotion:"user",children:[o.jsx(KC,{}),o.jsx(XC,{}),o.jsx(nT,{children:o.jsx(m.Suspense,{fallback:w4,children:o.jsxs(sk,{children:[o.jsx($,{path:"/setup",element:o.jsx($5,{})}),o.jsxs($,{element:o.jsx(AN,{}),children:[o.jsx($,{path:"/",element:o.jsx(d5,{})}),o.jsx($,{path:"/fahrzeuge",element:o.jsx(g5,{})}),o.jsx($,{path:"/fahrzeuge/:brandSlug",element:o.jsx(x5,{})}),o.jsx($,{path:"/fahrzeuge/:brandSlug/:modelSlug",element:o.jsx(j5,{})}),o.jsx($,{path:"/galerie",element:o.jsx(R5,{})}),o.jsx($,{path:"/galerie/:brandSlug",element:o.jsx(I5,{})}),o.jsx($,{path:"/galerie/:brandSlug/:projectSlug",element:o.jsx(V5,{})}),o.jsx($,{path:"/leistungen",element:o.jsx(P5,{})}),o.jsx($,{path:"/kontakt",element:o.jsx(D5,{})}),o.jsx($,{path:"/downloads",element:o.jsx(F5,{})}),o.jsx($,{path:"/impressum",element:o.jsx(O5,{})}),o.jsx($,{path:"/datenschutz",element:o.jsx(z5,{})}),o.jsx($,{path:"/agb",element:o.jsx(B5,{})}),o.jsx($,{path:"*",element:o.jsx(ff,{})})]}),o.jsx($,{path:"/admin/login",element:o.jsx(H5,{})}),o.jsx($,{path:"/admin/email-bestaetigen",element:o.jsx(U5,{})}),o.jsx($,{path:"/admin/passwort-zuruecksetzen",element:o.jsx(W5,{})}),o.jsx($,{path:"/admin",element:o.jsx(ZN,{}),children:o.jsxs($,{element:o.jsx(XN,{}),children:[o.jsx($,{index:!0,element:o.jsx(G5,{})}),o.jsx($,{path:"traffic",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(K5,{})})}),o.jsx($,{path:"account",element:o.jsx(a4,{})}),o.jsx($,{path:"brands",element:o.jsx(ue,{permission:"brands.manage",children:o.jsx(q5,{})})}),o.jsx($,{path:"models",element:o.jsx(ue,{permission:"models.manage",children:o.jsx(Y5,{})})}),o.jsx($,{path:"gallery-brands",element:o.jsx(ue,{permission:"gallery.manage",children:o.jsx(X5,{})})}),o.jsx($,{path:"gallery-projects",element:o.jsx(ue,{permission:"gallery.manage",children:o.jsx(Z5,{})})}),o.jsx($,{path:"gallery-projects/:projectId/photos",element:o.jsx(ue,{permission:"gallery.manage",children:o.jsx(Q5,{})})}),o.jsx($,{path:"packages",element:o.jsx(ue,{permission:"packages.manage",children:o.jsx(J5,{})})}),o.jsx($,{path:"packages/:packageId/*",element:o.jsx(b4,{})}),o.jsx($,{path:"services",element:o.jsx(ue,{permission:"services.manage",children:o.jsx(e4,{})})}),o.jsx($,{path:"faqs",element:o.jsx(ue,{permission:"content.manage",children:o.jsx(t4,{})})}),o.jsx($,{path:"partners",element:o.jsx(ue,{permission:"content.manage",children:o.jsx(n4,{})})}),o.jsx($,{path:"downloads",element:o.jsx(ue,{permission:"downloads.manage",children:o.jsx(r4,{})})}),o.jsx($,{path:"home-sections",element:o.jsx(ue,{permission:"content.manage",children:o.jsx(s4,{})})}),o.jsx($,{path:"contact-requests",element:o.jsx(ue,{permission:"contact.manage",children:o.jsx(i4,{})})}),o.jsx($,{path:"users",element:o.jsx(ue,{permission:"users.manage",children:o.jsx(o4,{})})}),o.jsx($,{path:"permission-groups",element:o.jsx(ue,{permission:"permission_groups.manage",children:o.jsx(l4,{})})}),o.jsxs($,{path:"settings",element:o.jsx(ue,{permission:["settings.manage","system.admin","system.update"],children:o.jsx(u4,{})}),children:[o.jsx($,{index:!0,element:o.jsx(fr,{to:"company",replace:!0})}),o.jsx($,{path:"website",element:o.jsx(fr,{to:"../company",replace:!0})}),o.jsx($,{path:"company",element:o.jsx(ue,{permission:"settings.manage",children:o.jsx(ta,{section:"company"})})}),o.jsx($,{path:"design",element:o.jsx(ue,{permission:"settings.manage",children:o.jsx(ta,{section:"design"})})}),o.jsx($,{path:"images",element:o.jsx(ue,{permission:"settings.manage",children:o.jsx(ta,{section:"images"})})}),o.jsx($,{path:"legal",element:o.jsx(ue,{permission:"settings.manage",children:o.jsx(c4,{})})}),o.jsx($,{path:"maintenance",element:o.jsx(ue,{permission:"settings.manage",children:o.jsx(p4,{})})}),o.jsx($,{path:"countdown",element:o.jsx(ue,{permission:"settings.manage",children:o.jsx(g4,{})})}),o.jsx($,{path:"google",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(ta,{section:"google"})})}),o.jsx($,{path:"connections",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(x4,{})})}),o.jsx($,{path:"ai-images",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(y4,{})})}),o.jsx($,{path:"email",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(f4,{})})}),o.jsx($,{path:"database",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(h4,{})})}),o.jsx($,{path:"export-import",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(m4,{})})}),o.jsx($,{path:"update",element:o.jsx(ue,{permission:"system.update",children:o.jsx(d4,{})})}),o.jsx($,{path:"reset",element:o.jsx(ue,{permission:"system.admin",children:o.jsx(v4,{})})})]})]})})]})})})]})}Gl.createRoot(document.getElementById("root")).render(o.jsx(qp.StrictMode,{children:o.jsx(hk,{basename:"/".replace(/\/$/,"")||"/",children:o.jsx(vP,{children:o.jsx(kP,{children:o.jsx(DP,{children:o.jsx(k4,{})})})})})}));export{ZC as $,V4 as A,L4 as B,O4 as C,R4 as D,Ye as E,I4 as F,Pi as G,nP as H,Be as I,vT as J,ST as K,G as L,LT as M,ff as N,B4 as O,z4 as P,kc as Q,Ke as R,Lv as S,F4 as T,iv as U,df as V,D4 as W,Ei as X,JP as Y,T5 as Z,U4 as _,kt as a,P4 as a0,Qe as a1,Sd as a2,QP as a3,eN as a4,C4 as a5,en as a6,_v as a7,T4 as a8,qp as a9,sP as aA,aP as aB,lP as aC,cP as aD,fP as aE,mP as aF,xP as aG,oT as aH,E4 as aI,aT as aJ,S4 as aK,te as aa,Vp as ab,uT as ac,dT as ad,oo as ae,hT as af,gT as ag,tv as ah,bT as ai,ET as aj,TT as ak,nv as al,_T as am,DT as an,IT as ao,FT as ap,zT as aq,rv as ar,vc as as,sv as at,rf as au,GT as av,qT as aw,XT as ax,zn as ay,eP as az,vr as b,oe as c,fe as d,Ho as e,Tp as f,kd as g,yd as h,kr as i,o as j,Wn as k,KN as l,xr as m,fr as n,af as o,vk as p,N4 as q,m as r,$4 as s,W4 as t,ye as u,_4 as v,M4 as w,A4 as x,$N as y,H4 as z};
diff --git a/hifi/assets/music-CQp27_lu.js b/hifi/assets/music-DAfwv1ih.js
similarity index 98%
rename from hifi/assets/music-CQp27_lu.js
rename to hifi/assets/music-DAfwv1ih.js
index 1adaca6..938bf53 100644
--- a/hifi/assets/music-CQp27_lu.js
+++ b/hifi/assets/music-DAfwv1ih.js
@@ -1,4 +1,4 @@
-import{aa as a}from"./index-BBjAHUAg.js";/**
+import{aa as a}from"./index-gdxW-Q9g.js";/**
* @license lucide-react v1.23.0 - ISC
*
* This source code is licensed under the ISC license.
diff --git a/hifi/assets/sortable.esm-Csg9SDfn.js b/hifi/assets/sortable.esm-CEVsMzSe.js
similarity index 99%
rename from hifi/assets/sortable.esm-Csg9SDfn.js
rename to hifi/assets/sortable.esm-CEVsMzSe.js
index d6e8ec4..fba0588 100644
--- a/hifi/assets/sortable.esm-Csg9SDfn.js
+++ b/hifi/assets/sortable.esm-CEVsMzSe.js
@@ -1,4 +1,4 @@
-import{r as c,a9 as P,h as Oe}from"./index-BBjAHUAg.js";function Rn(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(o=>o(r))},t)}const et=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function pt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:pt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function bt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Ut(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:pt(e)?bt(e)?e:Be(e)||Ut(e)?e.ownerDocument:document:document:document}const Q=et?c.useLayoutEffect:c.useEffect;function wt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ke(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ge(e){const t=wt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function dt(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let at={};function $e(e,t){return c.useMemo(()=>{if(t)return t;const n=at[e]==null?0:at[e]+1;return at[e]=n,e+"-"+n},[e,t])}function Wt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=Wt(1),ze=Wt(-1);function En(e){return"clientX"in e&&"clientY"in e}function mt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Mn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ft(e){if(Mn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return En(e)?{x:e.clientX,y:e.clientY}:null}const Je=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Je.Translate.toString(e),Je.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Ot="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function In(e){return e.matches(Ot)?e:e.querySelector(Ot)}const An={display:"none"};function On(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:An},n)}function Tn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Nn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ht=c.createContext(null);function Ln(e){const t=c.useContext(Ht);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function kn(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const zn={draggable:`
+import{r as c,a9 as P,h as Oe}from"./index-gdxW-Q9g.js";function Rn(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(o=>o(r))},t)}const et=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function pt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:pt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function bt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Ut(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:pt(e)?bt(e)?e:Be(e)||Ut(e)?e.ownerDocument:document:document:document}const Q=et?c.useLayoutEffect:c.useEffect;function wt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ke(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ge(e){const t=wt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function dt(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let at={};function $e(e,t){return c.useMemo(()=>{if(t)return t;const n=at[e]==null?0:at[e]+1;return at[e]=n,e+"-"+n},[e,t])}function Wt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=Wt(1),ze=Wt(-1);function En(e){return"clientX"in e&&"clientY"in e}function mt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Mn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ft(e){if(Mn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return En(e)?{x:e.clientX,y:e.clientY}:null}const Je=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Je.Translate.toString(e),Je.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Ot="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function In(e){return e.matches(Ot)?e:e.querySelector(Ot)}const An={display:"none"};function On(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:An},n)}function Tn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Nn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ht=c.createContext(null);function Ln(e){const t=c.useContext(Ht);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function kn(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const zn={draggable:`
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
diff --git a/hifi/assets/trash-2-COtrCxAH.js b/hifi/assets/trash-2-BgdXWITC.js
similarity index 95%
rename from hifi/assets/trash-2-COtrCxAH.js
rename to hifi/assets/trash-2-BgdXWITC.js
index 71cd9cd..fe7df33 100644
--- a/hifi/assets/trash-2-COtrCxAH.js
+++ b/hifi/assets/trash-2-BgdXWITC.js
@@ -1,4 +1,4 @@
-import{aa as a}from"./index-BBjAHUAg.js";/**
+import{aa as a}from"./index-gdxW-Q9g.js";/**
* @license lucide-react v1.23.0 - ISC
*
* This source code is licensed under the ISC license.
diff --git a/hifi/index.html b/hifi/index.html
index fea5b8b..620ee61 100644
--- a/hifi/index.html
+++ b/hifi/index.html
@@ -49,7 +49,7 @@
"sameAs": ["https://www.youtube.com/@hifiplanet2812"]
}
-
+
diff --git a/hifi/robots.txt b/hifi/robots.txt
index d4acecb..4b51284 100644
--- a/hifi/robots.txt
+++ b/hifi/robots.txt
@@ -1,6 +1,5 @@
User-agent: *
Allow: /
Disallow: /admin
-Disallow: /api
Sitemap: https://hifi-planet.de/sitemap.xml