PageSourceSearch

https://www.meinevent.com/assets/kategorie._category-BCq6E_Be.js

js meinevent.com collected 2026-10-09 22:03:15 UTC 7,547 bytes, 1 lines download raw bytes

1import{r as x,j as t,B as v,f as N,I as S,N as k,u as z}from"./index-YI259czl.js";import{L as M}from"./Layout-B-TRM6LF.js";import{u as F,a as L,L as T}from"./tags-CEBv9fTt.js";import{S as D,a as R,b as B,c as I,d as $,e as O}from"./sheet-CmTAr4xE.js";import{C as E}from"./checkbox-DZ3gvEM5.js";import{B as K}from"./badge-CqG5aRVF.js";import{S as G,a as P,b as V,c as H,d as w}from"./select-uX3mHJvX.js";import{D as J}from"./DateFilterPicker-UxOhu4Dh.js";import{F as C,R as _}from"./RegionMapModal-wo9I6Kij.js";import{X}from"./x-DdLRW-l_.js";import"./format-7Mkui-Kk.js";import"./star-DRa2UmrS.js";import"./users-BkKc9inG.js";import"./useQuery-DElbLCIL.js";import"./index-BOz7JcCQ.js";import"./index-gNwUONxb.js";import"./chevron-left-Ck41fzv0.js";import"./calendar-Dl8n_xZU.js";import"./popover-CmtKU9-y.js";import"./parse-Wlmvn7Eb.js";import"./calendar-lSIwalHs.js";import"./map-7DpJiu7U.js";function A({value:n,onChange:o,regions:i,tags:g,activeCount:b,triggerClassName:f,floating:y,fixed:a=!0}){const[m,p]=x.useState(!1),[l,c]=x.useState(n);x.useEffect(()=>{m&&c(n)},[m,n]);const d=b>0?` (${b})`:"",h=()=>{o(l),p(!1)},j=()=>{const e={region:void 0,guests:void 0,date:void 0,tags:[]};c(e),o(e),p(!1)},r=e=>{c(s=>({...s,tags:s.tags.includes(e)?s.tags.filter(u=>u!==e):[...s.tags,e]}))};return t.jsxs(D,{open:m,onOpenChange:p,children:[t.jsx(R,{asChild:!0,children:y?t.jsxs(v,{type:"button",size:"lg",className:N("z-40 shadow-lg rounded-full px-6 md:hidden bg-brand text-brand-foreground hover:bg-brand/90",a?"fixed bottom-6 left-1/2 -translate-x-1/2":"relative",f),children:[t.jsx(C,{className:"h-4 w-4 mr-2"}),"Filter",d]}):t.jsxs(v,{type:"button",variant:"outline",className:N("gap-2",f),children:[t.jsx(C,{className:"h-4 w-4"}),"Filter",d]})}),t.jsxs(B,{side:"right",className:"w-full sm:max-w-md flex flex-col p-0",children:[t.jsx(I,{className:"px-6 pt-6 pb-4 border-b border-border",children:t.jsx($,{children:"Angebote filtern"})}),t.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-5 space-y-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-xs uppercase tracking-wider font-bold text-muted-foreground mb-2",children:"Region"}),t.jsxs(G,{value:l.region??"__all",onValueChange:e=>c(s=>({...s,region:e==="__all"?void 0:e})),children:[t.jsx(P,{children:t.jsx(V,{placeholder:"Alle Regionen"})}),t.jsxs(H,{children:[t.jsx(w,{value:"__all",children:"Alle Regionen"}),i.map(e=>t.jsxs(w,{value:e.slug,children:[e.name," (",e.count,")"]},e.slug))]})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-xs uppercase tracking-wider font-bold text-muted-foreground mb-2",children:"Gästeanzahl"}),t.jsx(S,{type:"number",inputMode:"numeric",min:1,placeholder:"z. B. 25",value:l.guests??"",onChange:e=>{const s=parseInt(e.target.value,10);c(u=>({...u,guests:isNaN(s)||s<=0?void 0:s}))}})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-xs uppercase tracking-wider font-bold text-muted-foreground mb-2",children:"Datum"}),t.jsx(J,{value:l.date,onChange:e=>c(s=>({...s,date:e}))})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{className:"block text-xs uppercase tracking-wider font-bold text-muted-foreground",children:"Ausstattung & Tags"}),l.tags.length>0&&t.jsxs("button",{type:"button",onClick:()=>c(e=>({...e,tags:[]})),className:"text-xs text-muted-foreground hover:text-foreground inline-flex items-center gap-1",children:[t.jsx(X,{className:"h-3 w-3"})," zurücksetzen"]})]}),g.length===0?t.jsx("p",{className:"text-sm text-muted-foreground",children:"Keine Tags verfügbar."}):t.jsx("ul",{className:"space-y-1 max-h-72 overflow-y-auto pr-1",children:g.map(e=>{const s=l.tags.includes(e.slug);return t.jsx("li",{children:t.jsxs("label",{className:N("flex items-center gap-3 rounded-md px-2 py-2 cursor-pointer hover:bg-muted/60 transition-colors",s&&"bg-muted"),children:[t.jsx(E,{checked:s,onCheckedChange:()=>r(e.slug)}),t.jsx("span",{className:"flex-1 text-sm",children:e.label}),t.jsx(K,{variant:"secondary",className:"text-[10px]",children:e.count})]})},e.slug)})})]})]}),t.jsxs(O,{className:"px-6 py-4 border-t border-border flex-row gap-2 sm:justify-between",children:[t.jsx(v,{type:"button",variant:"ghost",onClick:j,children:"Alle zurücksetzen"}),t.jsx(v,{type:"button",onClick:h,className:"bg-brand text-brand-foreground hover:bg-brand/90",children:"Anwenden"})]})]})]})}function q(n,o){if(!o)return!0;
1if(n.valid_from&&o<n.valid_from||n.valid_until&&o>n.valid_until)return!1;const i=n.blocked_dates;return!(Array.isArray(i)&&i.includes(o))}function Q(n,o){return o?!(n.min_guests!=null&&o<n.min_guests||n.max_guests!=null&&o>n.max_guests):!0}function be(){const{data:n}=F(),{data:o}=L(),{category:i,locations:g,regions:b}=k.useLoaderData(),f=k.useSearch(),y=z(),a={region:f.region,guests:f.guests,date:f.date,tags:f.tags??[]},m=x.useMemo(()=>{const r=new Map;for(const e of b)r.set(e.id,e);return r},[b]),p=x.useMemo(()=>{const r=new Map;for(const e of g)e.region_id&&r.set(e.region_id,(r.get(e.region_id)??0)+1);return Array.from(r.entries()).map(([e,s])=>{const u=m.get(e);return{slug:u?.slug??e,name:u?.name??e,count:s}}).sort((e,s)=>s.count-e.count)},[g,m]),l=x.useMemo(()=>g.filter(r=>{if(a.region){const e=r.region_id?m.get(r.region_id):void 0;if(!e||e.slug!==a.region)return!1}return!(!Q(r,a.guests)||!q(r,a.date))}),[g,a.region,a.guests,a.date,m]),c=x.useMemo(()=>{const r=new Map;for(const e of l){const s=e.tags??[];if(Array.isArray(s))for(const u of s)u&&r.set(u,(r.get(u)??0)+1)}return Array.from(r.entries()).map(([e,s])=>({slug:e,label:n?.[e]??e,count:s})).sort((e,s)=>s.count-e.count||e.label.localeCompare(s.label))},[l,n]),d=x.useMemo(()=>a.tags.length===0?l:l.filter(r=>{const e=r.tags??[];return Array.isArray(e)?a.tags.every(s=>e.includes(s)):!1}),[l,a.tags]),h=(a.region?1:0)+(a.guests?1:0)+(a.date?1:0)+a.tags.length,j=r=>{y({to:"/kategorie/$category",params:{category:i.slug},search:{region:r.region,guests:r.guests,date:r.date,tags:r.tags.length>0?r.tags:void 0},replace:!0})};return t.jsx(M,{children:t.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-10 pb-24",children:[t.jsxs("h1",{className:"text-4xl font-bold mb-3",children:[i.emoji?`${i.emoji} `:"",i.name]}),t.jsx("p",{className:"text-muted-foreground max-w-3xl mb-6 whitespace-pre-line",children:i.description||`Top ${i.name} in ganz Deutschland. Jetzt vergleichen, unverbindlich anfragen und direkt online buchen.`}),t.jsxs("div",{className:"flex items-center justify-between gap-4 mb-6",children:[t.jsxs("p",{className:"text-sm text-muted-foreground",children:[d.length," ",d.length===1?"Angebot":"Angebote",h>0&&g.length!==d.length?` von ${g.length}`:""]}),t.jsxs("div",{className:"hidden md:flex items-center gap-2",children:[t.jsx(A,{value:a,onChange:j,regions:p,tags:c,activeCount:h}),t.jsx(_,{locations:d})]})]}),d.length===0?t.jsx("p",{className:"text-muted-foreground",children:h>0?"Keine Angebote passen zu den gewählten Filtern.":"Aktuell sind keine Angebote in dieser Kategorie gelistet."}):t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:d.map((r,e)=>t.jsx(T,{...r,index:e,tagLabels:n,categoryLabels:o},r.id))}),t.jsxs("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-40 flex items-center gap-2 rounded-full bg-background/90 backdrop-blur shadow-lg border border-border p-1.5 md:hidden",children:[t.jsx(A,{value:a,onChange:j,regions:p,tags:c,activeCount:h,floating:!0,fixed:!1}),t.jsx(_,{locations:d,floating:!0,fixed:!1})]})]})})}export{be as component};

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.