PageSourceSearch

https://my05-app-58d50.web.app/assets/Sponsors-CE7BuykH.js

js my05-app-58d50.web.app collected 2026-10-03 12:31:13 UTC 37,194 bytes, 23 lines download raw bytes

1import{y as Ve,u as qe,a as Ze,A as Ye,r as n,W as Je,q as Qe,t as ye,j as e,L as W,O as et,X as te,$ as P,P as tt,a0 as st,M as T,C as at,a9 as lt,f as z,a1 as Me,a2 as Ue,a3 as Le,a4 as Ie,Q as nt,B as Te,e as se,S as rt}from"./index-CPP4aw51.js";import{C as it}from"./index.module-B7rKPSvm.js";import{M as ot,T as ct,a as dt,u as Pe,L as Ee}from"./leaflet-Ctimi1Cf.js";import{A as ht}from"./arrow-left-FTGe0X4D.js";import{L as mt}from"./layout-grid-DhnFHpT-.js";import{T as xt}from"./trash-2-G2KzcNqy.js";import{S as ut}from"./index.esm-CQ_Nafil.js";import{P as pt}from"./phone-CoXIPHG3.js";import{M as gt}from"./mail-CvOXpY2a.js";import{G as ft}from"./globe-DMhA7Aa2.js";import{E as bt}from"./external-link-DUv8pR57.js";import"./index-B4neZ-9A.js";const vt=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],jt=Ve("map",vt);function wt(t){const a=E(t),i=t.name.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),r=84,o=46,m=10,x=3+o+3+12+4+m,p=`
2<div style="position:relative;display:inline-block;filter:drop-shadow(0 2px 8px rgba(0,0,0,0.30));">
3  <div style="width:${r}px;background:#fff;border-radius:8px;padding:3px 3px 4px;overflow:hidden;">
4    ${a?`<img src="${a}" style="width:100%;height:${o}px;object-fit:cover;border-radius:5px;display:block;" />`:`<div style="width:100%;height:${o}px;background:#f1f5f9;border-radius:5px;"></div>`}
5    <div style="margin-top:3px;font-size:8.5px;font-weight:800;color:#0f172a;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:system-ui,sans-serif;line-height:1.3;">${i}</div>
6  </div>
7  <div style="position:absolute;bottom:-${m}px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:${m}px solid transparent;border-right:${m}px solid transparent;border-top:${m}px solid #fff;"></div>
8</div>`;return Ee.divIcon({html:p,className:"",iconSize:[r,x],iconAnchor:[r/2,x],popupAnchor:[0,-82]})}const D="calc(4rem + env(safe-area-inset-bottom))",G={name:"",owner:"",description:"",logoUrl:"",logoThumbUrl:"",thumbnailUrl:"",ogImage:"",phone:"",email:"",website:"",tariff:3,mobileColumns:2,category:"",address:""},Re=t=>new Promise((a,i)=>{const r=new Image;r.addEventListener("load",()=>a(r)),r.addEventListener("error",i),r.src=t});async function Nt(t,a){const i=await Re(t),r=document.createElement("canvas");r.width=a.width,r.height=a.height;const o=r.getContext("2d");return o?(o.drawImage(i,a.x,a.y,a.width,a.height,0,0,a.width,a.height),new Promise(m=>r.toBlob(m,"image/jpeg",.92))):null}const ke=new Set,E=t=>t.logoThumbUrl||t.thumbnailUrl||t.logoUrl||t.ogImage||"",yt=async t=>{if(!(t.logoThumbUrl||t.thumbnailUrl||!t.logoUrl||!t.id||ke.has(t.id))){ke.add(t.id);try{const a=await fetch(t.logoUrl,{mode:"cors"});if(!a.ok)return;const i=await a.blob(),r=URL.createObjectURL(i),o=await Re(r),m=Math.max(o.naturalWidth,o.naturalHeight)>420?420/Math.max(o.naturalWidth,o.naturalHeight):1,x=document.createElement("canvas");x.width=Math.max(1,Math.round(o.naturalWidth*m)),x.height=Math.max(1,Math.round(o.naturalHeight*m)),x.getContext("2d").drawImage(o,0,0,x.width,x.height),URL.revokeObjectURL(r);const p=await new Promise(w=>x.toBlob(w,"image/jpeg",.72));if(!p)return;const d=Me(Ue,`sponsors/${t.id}/thumb_${Date.now()}.jpg`);await Le(d,p,{contentType:"image/jpeg"});const k=await Ie(d);await Te(se(z,"sponsors",t.id),{logoThumbUrl:k,thumbnailUrl:k})}catch{}}};function kt(t){const a=Number(t.tariff)===1||Number(t.tariff)===2?Number(t.tariff):3;return{id:t.id,name:String(t.name||"").trim(),owner:String(t.owner||"").trim(),description:String(t.description||"").trim(),logoUrl:String(t.logoUrl||"").trim(),logoThumbUrl:String(t.logoThumbUrl||"").trim(),thumbnailUrl:String(t.thumbnailUrl||"").trim(),ogImage:String(t.ogImage||"").trim(),phone:String(t.phone||"").trim(),email:String(t.email||"").trim(),website:String(t.website||"").trim(),tariff:a,mobileColumns:Number(t.mobileColumns)===1?1:2,category:String(t.category||"").trim(),address:String(t.address||"").trim(),lat:typeof t.lat=="number"?t.lat:void 0,lng:typeof t.lng=="number"?t.lng:void 0}}function Ce(t){const a=t.trim();return a?/^https?:\/\//i.test(a)?a:`https://${a}`:""}function Ct(t){let a=0;for(let i=0;i<t.length;i++)a=a*31+t.charCodeAt(i)>>>0;return(a%1e5+1)/100001}function St(t){const a=new Date().toISOString().slice(0,10),i=r=>[...t.filter(o=>o.tariff===r)].map(o=>({i:o,s:Ct(`${a}-${r}-${o.id||o.name}`)})).sort((o,m)=>o.s-m.s).map(o=>o.i);return[...i(1),...i(2),...i(3)]}async function Mt(t){try{const i=await(await fetch(`https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(t)}`)).json();return i?.length>0?{lat:parseFloat(i[0].lat),lng:parseFloat(i[0].lon)}:null}catch{return null}}function Ut({partners:t}){const a=Pe(),i=n.useRef(!1);return n.useEffect(()=>{if(i.current)return;const r=t.filter(o=>o.lat!=null&&o.lng!=null);r.length>0&&(a.flyToBounds(Ee.latLngBounds(r.map(o=>[o.lat,o.lng])),{padding:[50,50],maxZoom:14}),i.current=!0)},[t,a]),null}function Lt({focused:t}){const a=Pe();return n.useEffect(()=>{t?.lat!=null&&t?.lng!=null&&a.flyTo([t.lat,t.lng],15,{duration:1.5})},[t,a]),null}function j({label:t,children:a}){return e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-[10px] font-black uppercase tracking-[0.28em] text-slate-400",children:t}),a]})}const y="w-full border border-slate-200 bg-white px-3 py-2.5 text-sm font-medium text-slate-800 outline-none transition-colors placeholder:text-slate-300 focus:border-tv05-green";function Se({mapped:t,focused:a,onSelect:i}){return e.jsxs(ot,{center:[51.4783,7.5534],zoom:8,style:{height:"100%",width:"100%"},zoomControl:!1,children:[e.jsx(ct,{url:"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",attribution:'© <a href="https://carto.com/">CARTO</a>'}),e.jsx(Ut,{partners:t}),e.jsx(Lt,{focused:a}),t.map(r=>e.jsx(dt,{position:[r.lat,r.lng],icon:wt(r),eventHandlers:{click:()=>i(r)}},r.id))]})}function It({partners:t,onSelect:a}){const[i,r]=n.useState(null),[o,m]=n.useState(()=>window.innerWidth<1024);n.useEffect(()=>{const d=window.matchMedia("(min-width: 1024px)"),k=w=>m(!w.matches);return d.addEventListener("change",k),()=>d.removeEventListener("change",k)},[]);const x=t.filter(d=>d.lat!=null&&d.lng!=null),p=t.filter(d=>d.lat==null||d.lng==null);return o?e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("div",{className:"relative flex-1",children:e.jsx(Se,{mapped:x,focused:i,onSelect:a})}),e.jsx("div",{className:"shrink-0 border-t border-slate-200 bg-white/95 backdrop-blur-sm px-3 py-2.5 overflow-x-auto overscroll-contain",children:e.jsxs("div",{className:"flex gap-2",style:{width:"max-content"},children:[x.map(d=>e.jsxs("button",{type:"button",onClick:()=>r(d),className:["flex items-center gap-1.5 whitespace-nowrap border px-3 py-1.5 text-xs font-bold transition-all active:scale-95",i?.id===d.id?"border-tv05-green bg-tv05-green text-white":"border-slate-200 bg-white text-slate-600 hover:border-tv05-green hover:text-tv05-green"].join(" "),children:[e.jsx(T,{size:10,
8className:"shrink-0"}),d.name]},d.id)),p.map(d=>e.jsxs("div",{className:"flex items-center gap-1.5 whitespace-nowrap border border-slate-100 bg-slate-50 px-3 py-1.5 text-xs font-bold text-slate-300",children:[e.jsx(T,{size:10,className:"text-red-300"}),d.name]},d.id))]})})]}):e.jsxs("div",{className:"flex h-full flex-row",children:[e.jsxs("div",{className:"w-64 xl:w-72 shrink-0 flex flex-col overflow-y-auto overscroll-contain custom-scrollbar border-r border-slate-200 bg-white",children:[x.map(d=>e.jsxs("button",{type:"button",onClick:()=>r(d),className:["flex w-full items-center gap-3 border-b border-slate-100 px-4 py-3.5 text-left transition-all",i?.id===d.id?"bg-sky-50 border-l-2 border-l-tv05-green":"hover:bg-slate-50"].join(" "),children:[e.jsx(T,{size:14,className:"shrink-0 text-tv05-green"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-sm font-bold text-slate-800",children:d.name}),d.category&&e.jsx("div",{className:"truncate text-[11px] text-slate-400",children:d.category})]})]},d.id)),p.length>0&&e.jsxs("div",{className:"px-4 py-3 border-t border-slate-100",children:[e.jsx("div",{className:"mb-2 text-[10px] font-black uppercase tracking-widest text-slate-300",children:"Ohne Koordinaten"}),p.map(d=>e.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[e.jsx(T,{size:13,className:"text-red-400"}),e.jsx("span",{className:"text-sm text-slate-400",children:d.name})]},d.id))]})]}),e.jsx("div",{className:"relative flex-1",children:e.jsx(Se,{mapped:x,focused:i,onSelect:a})})]})}const ae={background:"rgba(255,255,255,0.12)",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",border:"1px solid rgba(255,255,255,0.22)",boxShadow:"0 8px 32px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.25)"},ze={background:"rgba(255,255,255,0.18)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"};function Tt({partner:t,onClick:a,index:i}){const r=E(t);return e.jsxs("button",{type:"button",onClick:a,className:"group relative block w-full focus:outline-none active:scale-[0.99] transition-all duration-200 partner-in overflow-hidden rounded-2xl",style:{animationDelay:`${i*55}ms`,...ae},"aria-label":t.name,children:[e.jsxs("div",{className:"relative",style:{aspectRatio:"16/9",...ze},children:[r?e.jsx("img",{src:r,alt:t.name,loading:"lazy",decoding:"async",className:"absolute inset-0 h-full w-full object-contain p-4 rounded-xl transition-transform duration-500 group-hover:scale-[1.04]"}):e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(P,{className:"h-10 w-10 text-white/20"})}),e.jsx("div",{className:"absolute top-3 left-3 z-10 bg-tv05-green px-3 py-0.5 text-[7px] font-black uppercase tracking-[0.2em] text-white rounded-full shadow-sm",children:"Hauptpartner"})]}),e.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2.5",style:{borderTop:"1px solid rgba(255,255,255,0.12)"},children:[e.jsx("div",{className:"text-sm font-bold text-white/90 leading-tight line-clamp-1",children:t.name}),t.website&&e.jsx("a",{href:t.website,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"shrink-0 px-2.5 py-1 text-[8px] font-black uppercase tracking-widest text-white/55 hover:text-white/90 transition-colors rounded",style:{border:"1px solid rgba(255,255,255,0.18)"},children:"Webseite ↗"})]})]})}function Pt({partner:t,onClick:a}){const i=E(t);return e.jsx("button",{type:"button",onClick:a,className:"group relative w-full block focus:outline-none active:brightness-90 transition-[filter] duration-150 overflow-hidden",style:{aspectRatio:"16/9",...ze},"aria-label":t.name,children:i?e.jsx("img",{src:i,alt:t.name,loading:"lazy",decoding:"async",className:"absolute inset-0 h-full w-full object-contain p-2 rounded-xl transition-transform duration-500 group-hover:scale-[1.04]"}):e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(P,{className:"h-6 w-6 text-white/20"})})})}function Et({partner:t,onClick:a}){const i=E(t);return e.jsx("button",{type:"button",onClick:a,className:"group relative w-full block focus:outline-none active:brightness-90 transition-all duration-150 overflow-hidden rounded-xl",style:{aspectRatio:"16/9",...ae},"aria-label":t.name,children:i?e.jsx("img",{src:i,alt:t.name,loading:"lazy",decoding:"async",className:"absolute inset-0 h-full w-full object-contain p-1 rounded-lg transition-transform duration-300 group-hover:scale-[1.05]"}):e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(P,{className:"h-4 w-4 text-white/20"})})})}function Rt({value:t,onChange:a,inputCls:i}){const[r,o]=n.useState(!1),m=e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),e.jsx("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),e.jsx("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),e.jsx("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}),x=e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("polyline",{points:"15 3 21 3 21 9"}),e.jsx("polyline",{points:"9 21 3 21 3 15"}),e.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),e.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]});return e.jsxs(e.Fragment,{children:[r&&e.jsxs("div",{className:"fixed inset-x-0 top-0 z-[200] flex flex-col bg-white",style:{bottom:"4rem"},children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-4 py-2 shrink-0",children:[e.jsx("span",{className:"text-xs font-black uppercase tracking-widest text-slate-500",children:"Beschreibung"}),e.jsxs("button",{type:"button",onClick:()=>o(!1),className:"flex items-center gap-1.5 rounded px-2 py-1 text-xs text-slate-400 hover:text-slate-700 transition-colors",title:"Minimieren",children:[m,e.jsx("span",{children:"Minimieren"})]})]}),e.jsx("textarea",{value:t,onChange:p=>a(p.target.value),className:"flex-1 resize-none p-4 text-sm text-slate-800 placeholder:text-slate-300 outline-none",placeholder:"Kurze Beschreibung",autoFocus:!0})]}),e.jsxs(j,{label:"Beschreibung",children:[e.jsx("textarea",{value:t,onChange:p=>a(p.target.value),rows:3,className:i+" resize-none w-full",placeholder:"Kurze Beschreibung"}),e.jsxs("button",{type:"button",onClick:()=>o(!0),className:"mt-1.5 flex w-full items-center justify-center gap-1.5 border border-slate-200 bg-slate-50 py-1.5 text-xs font-semibold text-slate-500 hover:bg-slate-100 hover:text-slate-800 transition-colors",title:"Maximieren",children:[x,e.jsx("span",{children:"Vollbild bearbeiten"})]})]})]})}function Kt({user:t}){const a=qe(),i=Ze(),r=Ye(t),[o,m]=n.useState(!0),[x,p]=n.useState(!1),[d,k]=n.useState(!1),[w,$e]=n.useState([]),[h,X]=n.useState(null),[c,g]=n.useState(G),[U,$]=n.useState(!1),[K,V]=n.useState(!1),[q,le]=n.useState("grid"),[B,C]=n.useState("idle"),ne=n.useRef(null),[Be,F]=n.useState(!1),[Fe,Ae]=n.useState(void 0),R=n.useRef(null),[A,re]=n.useState(null),[_e,ie]=n.useState({x:0,y:0}),[oe,_]=n.useState(1),[ce,Oe]=n.useState(null),[de,he]=n.useState(!1);n.useEffect(()=>()=>{R.current&&URL.revokeObjectURL(R.current)},[]),n.useEffect(()=>Je(Qe(ye(z,"sponsors")),s=>{const l=s.docs.map(N=>kt({id:N.id,...N.data()}));l.forEach(N=>{yt(N)}),$e(l),m(!1)},()=>m(!1)),[]);const S=n.useMemo(()=>St(w),[w]);n.useMemo(()=>w.filter(s=>s.tariff===1).length,[w]);const b=n.useMemo(()=>S.filter(s=>s.tariff===1),[S]),f=n.useMemo(()=>S.filter(s=>s.tariff===2),[S]),u=n.useMemo(()=>S.filter(s=>s.tariff===3),[S]),[me,Z]=n.useState(0),[Y,J]=n.useState(0),[xe,Q]=n.useState(0),L=U||!!h;n.useEffect(()=>{if(L||b.length<2)return;const s=setInterval(()=>Z(l=>(l+1)%b.length),1e4);return()=>clearInterval(s)},[b.length,L]),n.useEffect(()=>{if(L||f.length<2)return;const s=setInterval(()=>J(l=>(l+1)%f.length),8e3);return()=>clearInterval(s)},[f.length,L]),n.useEffect(()=>{if(L||u.length<2)return;const s=setInterval(()=>Q(l=>(l+1)%u.length),6e3);return()=>clearInterval(s)},[u.length,L]);const ue=n.useRef(null),pe=n.useRef(null),ge=n.useRef(null);n.useEffect(()=>{const s=(v,M)=>{if(!v)return;let ve=0;const je=H=>{ve=H.touches[0].clientX},we=H=>{const Ne=H.changedTouches[0].clientX-ve;Math.abs(Ne)>40&&(H.preventDefault(),M(Ne<0?1:-1))};return v.addEventListener("touchstart",je,{passive:!0}),v.addEventListener("touchend",we,{passive:!1}),()=>{v.removeEventListener("touchstart",je),v.removeEventListener("touchend",we)}},l=s(ue.current,v=>Z(M=>(M+v+b.length)%b.length)),N=s(pe.current,v=>J(M=>(M+v+f.length)%f.length)),ee=s(ge.current,v=>Q(M=>(M+v+u.length)%u.length));return()=>{l?.(),N?.(),ee?.()}},[b.length,f.length,u.length]);const I=()=>{X(null),g(G),$(!1),V(!1),C("idle")},O=s=>{X(s),g(s),$(!1),V(!1),C("idle")},He=()=>{X(G),g(G),$(!0),V(!0),C("idle")},We=n.useCallback(async()=>
8{if(!c.address?.trim())return;C("loading");const s=await Mt(c.address);s?(g(l=>({...l,lat:s.lat,lng:s.lng})),C("ok")):C("fail")},[c.address]),fe=s=>{Ae(s==="camera"?"environment":void 0),F(!1),setTimeout(()=>ne.current?.click(),0)},De=s=>{const l=s.target.files?.[0];l&&(re(URL.createObjectURL(l)),_(1),ie({x:0,y:0}),he(!0))},be=()=>{re(null),he(!1),_(1),R.current&&(URL.revokeObjectURL(R.current),R.current=null)},Ge=async()=>{if(!(!A||!ce)){k(!0);try{const s=await Nt(A,ce);if(!s)throw new Error("crop failed");const l=Me(Ue,`sponsors/logo_${Date.now()}`);await Le(l,s);const N=await Ie(l);g(ee=>({...ee,logoUrl:N,logoThumbUrl:N,thumbnailUrl:N})),be()}catch{await a.alert({title:"Fehler",message:"Bild konnte nicht gespeichert werden.",tone:"danger"})}finally{k(!1)}}},Xe=async()=>{if(!r)return;const s=c.name.trim();if(!s){await a.alert({title:"Name fehlt",message:"Bitte einen Firmennamen angeben.",tone:"warning"});return}const l={name:s,owner:c.owner.trim(),description:c.description.trim(),logoUrl:c.logoUrl.trim(),logoThumbUrl:c.logoThumbUrl?.trim()||"",thumbnailUrl:c.thumbnailUrl?.trim()||"",ogImage:c.ogImage?.trim()||"",phone:c.phone.trim(),email:c.email.trim(),website:Ce(c.website),tariff:c.tariff,mobileColumns:c.mobileColumns,category:c.category?.trim()||"",address:c.address?.trim()||"",lat:c.lat,lng:c.lng};p(!0);try{K?await nt(ye(z,"sponsors"),l):h?.id&&await Te(se(z,"sponsors",h.id),l),I()}catch{await a.alert({title:"Fehler",message:"Speichern fehlgeschlagen.",tone:"danger"})}finally{p(!1)}},Ke=async()=>{if(!(!r||!h?.id||!await a.confirm({title:"Partner löschen?",message:"Der Eintrag wird dauerhaft entfernt.",confirmText:"Löschen",cancelText:"Abbrechen",tone:"danger"})))try{await rt(se(z,"sponsors",h.id)),I()}catch{await a.alert({title:"Fehler",message:"Löschen fehlgeschlagen.",tone:"danger"})}};return o?e.jsx("div",{className:"fixed inset-x-0 top-0 flex items-center justify-center",style:{bottom:D,background:"radial-gradient(ellipse 120% 50% at 50% 0%,rgba(0,160,90,0.35) 0%,transparent 60%),linear-gradient(160deg,#0d4a2e 0%,#0a3820 55%,#12280a 100%)"},children:e.jsx(W,{className:"h-8 w-8 animate-spin text-tv05-green"})}):e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
9        @keyframes partnerIn {
10          from { opacity:0; transform:translateY(12px); }
11          to   { opacity:1; transform:translateY(0); }
12        }
13        .partner-in { opacity:0; animation:partnerIn .4s cubic-bezier(0.16,1,0.3,1) forwards; }
14        .carousel-track { display:flex; transition: transform 0.45s cubic-bezier(0.4,0,0.2,1); }
15        .carousel-dot { width:5px; height:5px; border-radius:9999px; transition:all 0.35s cubic-bezier(0.4,0,0.2,1); background:rgba(255,255,255,0.25); }
16        .carousel-dot.active { width:20px; background:#005C3A; box-shadow:0 0 8px rgba(0,92,58,0.6); }
17        .sponsors-bg {
18          background:
19            radial-gradient(ellipse 120% 50% at 50% 0%, rgba(0,160,90,0.35) 0%, transparent 60%),
20            radial-gradient(ellipse 60% 35% at 90% 100%, rgba(139,0,0,0.2) 0%, transparent 55%),
21            linear-gradient(160deg, #0d4a2e 0%, #0a3820 55%, #12280a 100%);
22        }
23      `}),e.jsxs("div",{className:"fixed inset-x-0 top-0 overflow-hidden text-white sponsors-bg",style:{bottom:D,overflowX:"hidden"},children:[e.jsx("header",{className:"relative z-20 border-b border-white/[0.08] bg-black/20 backdrop-blur-2xl",children:e.jsxs("div",{className:"mx-auto flex w-full max-w-7xl items-center justify-between px-4 py-3.5 sm:px-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{type:"button",onClick:()=>{const s=window.history.state?.idx;s!=null&&s>0?i(-1):i("/",{replace:!0})},className:"flex h-8 w-8 items-center justify-center rounded-full border border-white/15 bg-white/8 text-white/70 transition-all hover:bg-white/15 hover:text-white active:scale-90","aria-label":"Zurück",children:e.jsx(ht,{className:"h-4 w-4"})}),e.jsx("h1",{className:"text-lg font-black uppercase tracking-tight text-white leading-none sm:text-xl",children:"Unsere Partner"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex rounded-lg overflow-hidden border border-white/10 bg-white/[0.06]",children:[e.jsx("button",{type:"button",onClick:()=>le("grid"),className:["flex h-8 w-8 items-center justify-center transition-all",q==="grid"?"bg-tv05-green text-white":"text-white/40 hover:text-white/70"].join(" "),"aria-label":"Raster",children:e.jsx(mt,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",onClick:()=>le("map"),className:["flex h-8 w-8 items-center justify-center border-l border-white/10 transition-all",q==="map"?"bg-tv05-green text-white":"text-white/40 hover:text-white/70"].join(" "),"aria-label":"Karte",children:e.jsx(jt,{className:"h-3.5 w-3.5"})})]}),r&&e.jsx("button",{type:"button",onClick:He,className:"flex h-8 w-8 items-center justify-center rounded-lg bg-tv05-green text-white shadow-lg shadow-tv05-green/30 transition-all hover:bg-tv05-green/80 active:scale-90","aria-label":"Neu",children:e.jsx(et,{className:"h-4 w-4"})})]})]})}),e.jsx("main",{className:"relative z-10 h-[calc(100%-57px)] overflow-hidden",children:q==="grid"?e.jsx("div",{className:"h-full overflow-y-auto overscroll-contain custom-scrollbar overflow-x-hidden",children:S.length===0?e.jsx("div",{className:"flex h-40 items-center justify-center text-white/30 text-sm tracking-wide",children:"Noch keine Partner angelegt."}):e.jsxs("div",{className:"w-full px-4 pt-4 pb-6 space-y-4",children:[b.length>0&&e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-3 w-0.5 bg-tv05-green rounded-full"}),e.jsx("span",{className:"text-[9px] font-black uppercase tracking-[0.3em] text-white/50",children:"Hauptpartner"})]}),b.length>1&&e.jsx("div",{className:"flex gap-1.5",children:b.map((s,l)=>e.jsx("button",{onClick:()=>Z(l),className:`carousel-dot${l===me%b.length?" active":""}`},l))})]}),e.jsx("div",{ref:ue,className:"overflow-hidden w-full rounded-2xl shadow-lg",children:e.jsx("div",{className:"carousel-track",style:{transform:`translateX(-${me%b.length*100}%)`},children:b.map(s=>e.jsx("div",{className:"min-w-full",children:e.jsx(Tt,{partner:s,index:0,onClick:()=>O(s)})},s.id))})})]}),f.length>0&&e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"h-3 w-0.5 bg-white/40 rounded-full"}),e.jsx("span",{className:"text-[9px] font-black uppercase tracking-[0.3em] text-white/50",children:"Partner"})]}),e.jsxs("div",{className:"overflow-hidden rounded-2xl",style:ae,children:[e.jsxs("div",{className:"flex items-stretch",children:[(()=>{const s=f[Y%f.length];return e.jsxs("div",{className:"w-[38%] shrink-0 flex flex-col justify-center gap-1.5 px-4 py-3",style:{borderRight:"1px solid rgba(255,255,255,0.1)"},children:[e.jsx("div",{className:"text-[9px] font-black uppercase tracking-[0.2em] text-tv05-green/90 mb-0.5",children:"Partner"}),e.jsx("div",{className:"text-sm font-bold text-white/90 leading-snug line-clamp-2",children:s?.name}),s?.website?e.jsx("a",{href:s.website,target:"_blank",rel:"noopener noreferrer",className:"mt-1 px-2 py-1 text-[8px] font-black uppercase tracking-widest text-white/50 text-center hover:text-white/80 transition-colors rounded",style:{border:"1px solid rgba(255,255,255,0.15)"},children:"Webseite ↗"}):e.jsx("div",{className:"mt-1 px-2 py-1 text-[8px] font-black uppercase tracking-widest text-white/20 text-center rounded",style:{border:"1px solid rgba(255,255,255,0.08)"},children:"Webseite"})]})})(),e.jsx("div",{ref:pe,className:"flex-1 min-w-0 overflow-hidden",children:e.jsx("div",{className:"carousel-track",style:{transform:`translateX(-${Y%f.length*100}%)`},children:f.map(s=>e.jsx("div",{className:"min-w-full",children:e.jsx(Pt,{partner:s,onClick:()=>O(s)})},s.id))})})]}),f.length>1&&e.jsx("div",{className:"flex justify-center gap-1.5 py-2",style:{borderTop:"1px solid rgba(255,255,255,0.08)"},children:f.map((s,l)=>e.jsx("button",{onClick:()=>J(l),className:`carousel-dot${l===Y%f.length?" active":""}`},l))})]})]}),u.length>0&&e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"h-3 w-0.5 bg-white/25 rounded-full"}),e.jsx("span",{className:"text-[9px] font-black uppercase tracking-[0.3em] text-white/40",children:"Förderer & Freunde"})]}),u.length>1&&e.jsx("div",{className:"flex justify-end gap-1.5 pb-1",children:u.map((s,l)=>e.jsx("button",{onClick:()=>Q(l),className:`carousel-dot${l===xe%u.length?" active":""}`},l))}),e.jsx("div",{ref:ge,className:"overflow-hidden",children:e.jsx("div",{className:"carousel-track gap-2",style:{transform:u.length>3?`translateX(calc(-${xe%u.length} * (33.333% + 2.67px)))`:void 0},children:(u.length>3?[...u,...u.slice(0,2)]:u).map((s,l)=>e.jsx("div",{className:"shrink-0",style:{width:"calc(33.333% - 5.33px)"},children:e.jsx(Et,{partner:s,onClick:()=>O(s)})},`${s.id}-${l}`))})})]})]})}):e.jsx("div",{className:"h-full bg-white",children:w.length===0?e.jsx("div",{className:"flex h-full items-center justify-center text-slate-400 text-sm",children:"Noch keine Partner angelegt."}):e.jsx(It,{partners:w,onSelect:O})})}
23),h&&!de&&e.jsxs("div",{className:"fixed inset-x-0 top-0 z-[60] flex items-end justify-center sm:items-center sm:p-4",style:{bottom:D},children:[e.jsx("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:I}),e.jsxs("div",{className:"relative z-10 flex h-full w-full flex-col overflow-hidden bg-white sm:h-auto sm:max-h-[92vh] sm:max-w-xl sm:border sm:border-slate-200 sm:shadow-2xl animate-in slide-in-from-bottom-3 fade-in duration-200",onClick:s=>s.stopPropagation(),children:[U?e.jsx("div",{className:"relative shrink-0 flex justify-end px-3 pt-3",children:e.jsx("button",{type:"button",onClick:I,className:"flex h-8 w-8 items-center justify-center bg-slate-100 text-slate-500 shadow-sm transition-all hover:text-slate-800","aria-label":"Schließen",children:e.jsx(te,{className:"h-4 w-4"})})}):e.jsxs("div",{className:"relative aspect-video shrink-0 bg-slate-100",children:[E(h)?e.jsx("img",{src:E(h),alt:h.name,className:"h-full w-full object-cover",loading:"eager",decoding:"async"}):e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(P,{className:"h-10 w-10 text-slate-300"})}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-white/60 via-trans
23parent to-transparent"}),e.jsx("button",{type:"button",onClick:I,className:"absolute right-3 top-3 flex h-8 w-8 items-center justify-center bg-white/80 text-slate-500 shadow-sm backdrop-blur-sm transition-all hover:text-slate-800 z-20","aria-label":"Schließen",children:e.jsx(te,{className:"h-4 w-4"})}),h.category&&e.jsx("span",{className:"absolute bottom-3 left-3 bg-white/90 px-2 py-0.5 text-[9px] font-black uppercase tracking-[0.22em] text-slate-600 shadow-sm backdrop-blur-sm",children:h.category})]}),e.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto overscroll-contain custom-scrollbar px-5 pb-8 pt-2 sm:px-6",children:[e.jsxs("div",{className:"mb-5 flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-black uppercase tracking-tight text-slate-800 sm:text-2xl",children:U?K?"Neuer Partner":"Bearbeiten":h.name}),!U&&r&&h.tariff===1&&e.jsx("div",{className:"mt-0.5 text-[10px] font-black uppercase tracking-[0.3em] text-slate-400",children:"Hauptpartner"})]}),r&&!U&&e.jsx("button",{type:"button",onClick:()=>$(!0),className:"shrink-0 border border-slate-200 bg-slate-50 p-2 text-slate-400 transition-all hover:border-slate-300 hover:text-slate-700 active:scale-95","aria-label":"Bearbeiten",children:e.jsx(tt,{className:"h-3.5 w-3.5"})})]}),U?e.jsxs("div",{className:"space-y-5",children:[e.jsx("input",{ref:ne,type:"file",accept:"image/*",capture:Fe,className:"hidden",onChange:De}),Be&&e.jsx("div",{className:"fixed inset-0 z-[150] flex items-end justify-center bg-black/40 backdrop-blur-sm p-4 animate-in fade-in",onClick:()=>F(!1),children:e.jsxs("div",{className:"w-full max-w-sm border border-slate-200 bg-white p-5 shadow-2xl",onClick:s=>s.stopPropagation(),children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h3",{className:"text-sm font-black uppercase tracking-wide text-slate-800",children:"Logo hinzufügen"}),e.jsx("button",{type:"button",onClick:()=>F(!1),className:"p-1 text-slate-400 hover:text-slate-700",children:e.jsx(te,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("button",{type:"button",onClick:()=>fe("gallery"),className:"border border-slate-200 bg-slate-50 p-4 text-left hover:bg-slate-100 transition-all active:scale-[0.98]",children:[e.jsx(P,{className:"mb-2 h-5 w-5 text-slate-400"}),e.jsx("span",{className:"block text-sm font-black text-slate-700",children:"Galerie"})]}),e.jsxs("button",{type:"button",onClick:()=>fe("camera"),className:"border border-tv05-green/40 bg-tv05-green/5 p-4 text-left hover:bg-tv05-green/10 transition-all active:scale-[0.98]",children:[e.jsx(st,{className:"mb-2 h-5 w-5 text-tv05-green"}),e.jsx("span",{className:"block text-sm font-black text-slate-700",children:"Kamera"})]})]})]})}),e.jsx(j,{label:"Logo",children:e.jsx("button",{type:"button",onClick:()=>F(!0),className:"group relative w-full overflow-hidden border border-dashed border-slate-300 bg-slate-50 transition-colors hover:border-tv05-green hover:bg-sky-50/30",children:e.jsx("div",{className:"aspect-[16/9]",children:d?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(W,{className:"h-6 w-6 animate-spin text-tv05-green"})}):c.logoUrl||c.ogImage?e.jsx("img",{src:c.logoUrl||c.ogImage,alt:"Logo",className:"h-full w-full object-cover"}):e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 text-slate-300",children:[e.jsx(P,{className:"h-7 w-7"}),e.jsx("span",{className:"text-[10px] font-black uppercase tracking-[0.2em]",children:"Hochladen"})]})})})}),e.jsx(j,{label:"Firmenname *",children:e.jsx("input",{value:c.name,onChange:s=>g(l=>({...l,name:s.target.value})),className:y,placeholder:"Name des Partners"})}),e.jsx(j,{label:"Branche / Kategorie",children:e.jsx("input",{value:c.category||"",onChange:s=>g(l=>({...l,category:s.target.value})),className:y,placeholder:"z. B. Handwerk, Gastronomie"})}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(j,{label:"Tarifstufe",children:e.jsxs("select",{value:c.tariff,onChange:s=>g(l=>({...l,tariff:Number(s.target.value)})),className:y,children:[e.jsx("option",{value:1,children:"Stufe 1 – Hauptpartner"}),e.jsx("option",{value:2,children:"Stufe 2 – Partner"}),e.jsx("option",{value:3,children:"Stufe 3 – Förderer"})]})}),e.jsx(j,{label:"Mobile Breite",children:e.jsxs("select",{value:c.mobileColumns,onChange:s=>g(l=>({...l,mobileColumns:Number(s.target.value)})),className:y,children:[e.jsx("option",{value:2,children:"Halbe Breite"}),e.jsx("option",{value:1,children:"Volle Breite"})]})})]}),e.jsx(j,{label:"Ansprechpartner",children:e.jsx("input",{value:c.owner,onChange:s=>g(l=>({...l,owner:s.target.value})),className:y,placeholder:"Max Mustermann"})}),e.jsx(Rt,{value:c.description,onChange:s=>g(l=>({...l,description:s})),inputCls:y}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(j,{label:"Telefon",children:e.jsx("input",{value:c.phone,onChange:s=>g(l=>({...l,phone:s.target.value})),className:y,placeholder:"+49 …"})}),e.jsx(j,{label:"E-Mail",children:e.jsx("input",{value:c.email,onChange:s=>g(l=>({...l,email:s.target.value})),className:y,placeholder:"[email protected]"})})]}),e.jsx(j,{label:"Webseite",children:e.jsx("input",{value:c.website,onChange:s=>g(l=>({...l,website:s.target.value})),className:y,placeholder:"www.partner.de"})}),e.jsxs(j,{label:"Adresse (für Karte)",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:c.address||"",onChange:s=>{g(l=>({...l,address:s.target.value,lat:void 0,lng:void 0})),C("idle")},className:y+" flex-1",placeholder:"Musterstr. 1, 12345 Ort"}),e.jsxs("button",{type:"button",onClick:We,disabled:!c.address?.trim()||B==="loading",className:"flex items-center gap-1.5 border border-slate-200 bg-slate-50 px-3 py-2 text-[11px] font-black uppercase tracking-wider text-slate-500 transition-all hover:border-slate-300 hover:text-slate-800 disabled:opacity-40 active:scale-95 shrink-0",children:[B==="loading"?e.jsx(W,{className:"h-3 w-3 animate-spin"}):e.jsx(T,{className:"h-3 w-3"}),"Prüfen"]})]}),B==="ok"&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-1.5 text-[11px] text-tv05-green font-medium",children:[e.jsx(at,{className:"h-3 w-3"})," Koordinaten gespeichert"]}),B==="fail"&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-1.5 text-[11px] text-red-500 font-medium",children:[e.jsx(lt,{className:"h-3 w-3"})," Adresse nicht gefunden"]})]}),e.jsxs("div",{className:"flex flex-col gap-2 pt-2 sm:flex-row",children:[!K&&r&&e.jsxs("button",{type:"button",onClick:Ke,className:"flex h-11 items-center justify-center gap-2 border border-red-200 bg-red-50 px-4 text-sm font-bold text-red-500 transition-all hover:bg-red-100 active:scale-95",children:[e.jsx(xt,{className:"h-3.5 w-3.5"})," Löschen"]}),e.jsx("button",{type:"button",onClick:I,className:"h-11 flex-1 border border-slate-200 bg-slate-50 px-4 text-sm font-bold text-slate-500 transition-all hover:bg-slate-100 hover:text-slate-800 active:scale-95",children:"Abbrechen"}),e.jsx("button",{type:"button",onClick:Xe,disabled:x,className:"h-11 flex-[1.4] bg-tv05-green px-4 text-sm font-black text-white transition-all hover:brightness-105 disabled:opacity-60 active:scale-95",children:e.jsxs("span",{className:"inline-flex items-center gap-2",children:[x?e.jsx(W,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ut,{className:"h-3.5 w-3.5"}),"Speichern"]})})]})]}):e.jsxs("div",{className:"space-y-3",children:[h.description&&e.jsx("p",{className:"text-sm leading-relaxed text-slate-500 
23whitespace-pre-wrap",children:h.description}),e.jsxs("div",{className:"mt-4 divide-y divide-slate-100",children:[h.owner&&e.jsxs("div",{className:"py-3",children:[e.jsx("div",{className:"text-[10px] font-black uppercase tracking-[0.25em] text-slate-300",children:"Ansprechpartner"}),e.jsx("div",{className:"mt-0.5 text-sm font-semibold text-slate-700",children:h.owner})]}),h.phone&&e.jsxs("a",{href:`tel:${h.phone}`,className:"flex items-center gap-3 py-3 text-slate-600 transition-colors hover:text-tv05-green",children:[e.jsx(pt,{className:"h-3.5 w-3.5 text-tv05-green shrink-0"}),e.jsx("span",{className:"text-sm font-semibold",children:h.phone})]}),h.email&&e.jsxs("a",{href:`mailto:${h.email}`,className:"flex items-center gap-3 py-3 text-slate-600 transition-colors hover:text-tv05-green",children:[e.jsx(gt,{className:"h-3.5 w-3.5 text-tv05-green shrink-0"}),e.jsx("span",{className:"text-sm font-semibold break-all",children:h.email})]}),h.website&&e.jsxs("a",{href:Ce(h.website),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 py-3 text-slate-600 transition-colors hover:text-tv05-green",children:[e.jsx(ft,{className:"h-3.5 w-3.5 text-tv05-green shrink-0"}),e.jsx("span",{className:"text-sm font-semibold",children:h.website.replace(/^https?:\/\/(www\.)?/,"")}),e.jsx(bt,{className:"h-3 w-3 ml-auto text-slate-300"})]}),h.address&&e.jsxs("div",{className:"flex items-start gap-3 py-3",children:[e.jsx(T,{className:"h-3.5 w-3.5 text-tv05-green shrink-0 mt-0.5"}),e.jsx("span",{className:"text-sm font-semibold text-slate-600",children:h.address})]})]})]})]})]})]}),de&&A&&e.jsx("div",{className:"fixed inset-x-0 top-0 z-[80] flex items-center justify-center bg-black/70 p-4",style:{bottom:D},children:e.jsxs("div",{className:"w-full max-w-2xl border border-slate-200 bg-white overflow-hidden shadow-2xl",children:[e.jsx("div",{className:"relative h-[52vh] min-h-[300px] bg-slate-900",children:e.jsx(it,{image:A,crop:_e,zoom:oe,aspect:16/9,objectFit:"contain",onCropChange:ie,onZoomChange:_,onCropComplete:(s,l)=>Oe(l)})}),e.jsxs("div",{className:"px-5 py-4 space-y-4 bg-white",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-[10px] font-black uppercase tracking-widest text-slate-400",children:"Zoom"}),e.jsx("input",{type:"range",min:1,max:3,step:.01,value:oe,onChange:s=>_(Number(s.target.value)),className:"w-full"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{type:"button",onClick:be,className:"h-11 flex-1 border border-slate-200 bg-slate-50 text-sm font-bold text-slate-500 hover:bg-slate-100 transition-all",children:"Abbrechen"}),e.jsx("button",{type:"button",onClick:Ge,disabled:d,className:"h-11 flex-1 bg-tv05-green text-sm font-black text-white transition-all disabled:opacity-60",children:d?"Lädt …":"Übernehmen"})]})]})]})})]})]})}export{Kt as default};

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