1import{j as e,ab as G,ac as V,r as d,ad as $,a2 as I,o as U,x as M,ae as A,T as K,O as q,R as P,m as H,af as J,ag as Q,a1 as X}from"./vendor-Bxq6G7UH.js";import{u as B,c as m,h as Y,f as Z,e as ee,b as te}from"./index-CgZvr7S2.js";import{u as W,a as se,U as ie}from"./useParallaxManager-C2acrYsj.js";import"./maplibre-Ba-B3Bc2.js";function re(){const{t:g}=B();return e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center py-20 px-4 text-center animate-in fade-in zoom-in duration-700",children:[e.jsxs("div",{className:"relative mb-8 pt-8",children:[e.jsx("div",{className:"w-32 h-32 rounded-full bg-white flex items-center justify-center relative z-0",children:e.jsx("div",{className:"w-24 h-24 rounded-full bg-[#F3F4F6]"})}),e.jsxs("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 h-28 flex flex-col items-center z-10 pointer-events-none",children:[e.jsx("div",{className:"w-0 h-full border-l-2 border-dashed border-black/20"}),e.jsx("svg",{width:"18",height:"12",viewBox:"0 0 18 12",fill:"none",className:"text-black/30 -mt-1",children:e.jsx("path",{d:"M1 1L9 11L17 1",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),e.jsxs("div",{className:"mt-12 space-y-3",children:[e.jsx("h2",{className:"text-[26px] font-semibold text-gray-900 tracking-tight",children:g("wishlist.empty-compare-title")}),e.jsx("p",{className:"text-[17px] text-gray-500 font-medium",children:g("wishlist.empty-compare-desc")})]})]})}function ne({title:g,count:s,isExpanded:x,onToggle:p,children:k,viewMode:o="grid",hideHeader:f=!1}){const{containerRef:b,columns:N}=W(),t=o==="list"?1:N;return e.jsxs("div",{className:"mb-6 animate-in fade-in slide-in-from-top-2 duration-500",ref:b,children:[!f&&e.jsxs("button",{onClick:p,className:m("w-full flex items-center justify-between px-4 sm:px-8 py-3 sm:py-3.5 rounded-[20px] sm:rounded-[24px] transition-all duration-300","bg-[#e5e5e5] hover:bg-[#dbdbdb] text-[#1a1a1a] border-none shadow-none",!x&&"opacity-90"),children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("span",{className:"text-[14px] sm:text-[16px] font-bold tracking-tight",children:g}),e.jsxs("span",{className:"text-[14px] sm:text-[16px] font-medium opacity-80",children:["(",s,")"]})]}),e.jsx("div",{className:"w-7 h-7 sm:w-8 sm:h-8 rounded-full flex items-center justify-center text-gray-900 transition-all duration-300",children:x?e.jsx(G,{size:18,className:"animate-in fade-in zoom-in duration-300"}):e.jsx(V,{size:18,className:"animate-in fade-in zoom-in duration-300"})})]}),e.jsx("div",{className:m("transition-all duration-500 ease-in-out",x||f?"opacity-100":"hidden opacity-0 overflow-hidden",x&&!f&&"mt-6"),children:e.jsx("div",{className:m("w-full",o==="grid"?"gap-6 space-y-6":"flex flex-col gap-0 pr-0"),style:o==="grid"?{columnCount:t}:void 0,children:k})})]})}const ae=d.memo(function({item:s,onClick:x,index:p=0,className:k,isInCompare:o,isSelected:f,onToggleCompare:b,onToggleSelection:N,parallaxManager:t,hideCompareBadge:E=!1}){const[L,a]=d.useState(!1),{t:w}=B(),y=d.useRef(null),j=d.useRef(null),[z,_]=d.useState(!1),u=`${s.type}-${s.id}`;d.useEffect(()=>(t.register(u,y.current,j.current),()=>t.register(u,null,null)),[u,t]),d.useEffect(()=>{const v=y.current;if(!v)return;const h=new IntersectionObserver(([S])=>{t.setInView(u,S.isIntersecting)},{threshold:0,rootMargin:"600px"});return h.observe(v),()=>h.disconnect()},[u,t]);const R=e.jsxs("div",{className:"bg-[#56E39F]/90 text-black rounded-full flex items-center px-2.5 py-1.5 gap-1.5 shadow-[0_8px_20px_rgba(86,227,159,0.3)] border border-white/40 backdrop-blur-md animate-in fade-in slide-in-from-top-2 duration-500 whitespace-nowrap",children:[e.jsx($,{size:16,strokeWidth:2,className:"text-black"}),e.jsx("span",{className:"font-bold text-[13px] tracking-tight leading-none",children:w("results.vergleich")})]});return e.jsxs("div",{ref:y,className:m("group flex flex-col md:flex-row bg-white rounded-[20px] overflow-hidden border shadow-[0_4px_20px_rgba(0,0,0,0.03)] hover:shadow-[0_12px_40px_rgba(0,0,0,0.08)] transition-all duration-300 relative mb-3 animate-in fade-in slide-in-from-bottom-2 duration-500 w-full min-w-0 cursor-pointer",f?"border-black border-2 ring-2 ring-black ring-offset-2 ring-offset-gray-100 shadow-[0_12px_40px_rgba(0,0,0,0.18)]":"border-gray-100",k),style:{animationDelay:`${p*40}ms`},onClick:()=>{o||b(s),N(s)},children:[e.jsxs("div",{className:"relative w-full md:w-[32%] lg:w-[34%] xl:w-[300px] aspect-[16/9] md:aspect-auto overflow-hidden bg-gray-50 shrink-0",children:[s.thumbnailUrl&&!L?e.jsx("img",{ref:j,src:s.thumbnailUrl,alt:s.title,className:m("absolute top-[-25%] left-0 w-full h-[150%] object-cover will-change-transform transition-opacity duration-700",z?"opacity-100":"opacity-0"),onError:()=>a(!0),onLoad:()=>_(!0),loading:"lazy",decoding:"async"}):e.jsx("div",{className:"flex items-center justify-center h-full text-4xl opacity-10",children:"ð"}),e.jsx("div",{className:"absolute inset-0 p-3 z-30 pointer-events-none",children:e.jsx("div",{className:"flex items-start justify-end",children:e.jsx("div",{className:"pointer-events-auto flex items-center gap-2",children:o&&!E&&R})})}),f&&e.jsx("div",{className:"absolute top-3 left-3 z-40 flex h-8 w-8 items-center justify-center rounded-full bg-black text-white shadow-lg ring-2 ring-white animate-in fade-in zoom-in duration-200",children:e.jsx(I,{size:18,strokeWidth:3})})]}),e.jsxs("div",{className:"flex-1 min-w-0 p-3 sm:p-4 md:p-5 md:pr-6 flex flex-col justify-between gap-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 sm:gap-4",children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 min-w-0 flex-1",children:[e.jsx(U,{size:14,className:"text-gray-400 shrink-0"}),e.jsx("span",{className:"text-[12px] sm:text-[13px] font-medium text-gray-500 truncate tracking-tight",children:[s.city,s.region,s.country].filter(
1Boolean).join(", ")}),e.jsx(M,{size:12,className:"text-gray-300 hover:text-gray-600 transition-colors shrink-0 cursor-pointer pointer-events-auto hidden sm:block"})]}),e.jsx("button",{onClick:v=>{v.stopPropagation();const h=`/anbieter/${s.providerSlug||"detail"}/${s.offerSlug||s.id}`;window.open(h,"_blank","noopener,noreferrer")},className:"w-8 h-8 lg:w-10 lg:h-10 bg-black rounded-xl flex items-center justify-center text-white shadow-lg hover:bg-blue-600 transition-all transform hover:scale-110 active:scale-95 cursor-pointer shrink-0",children:e.jsx(A,{className:"w-[18px] h-[18px] lg:w-[20px] lg:h-[20px]",strokeWidth:2.5})})]}),e.jsx("h2",{className:"text-[16px] sm:text-[18px] md:text-[20px] font-bold text-gray-900 leading-tight line-clamp-2 min-w-0",children:s.title})]}),e.jsx("div",{className:"border-t border-gray-100 w-full"}),e.jsxs("div",{className:"flex flex-row items-center justify-between gap-x-4 gap-y-3 flex-wrap",children:[e.jsxs("div",{className:"flex flex-col min-w-0",children:[e.jsx("span",{className:"text-[18px] sm:text-[22px] font-black text-gray-900 leading-none tracking-tight",children:s.pricePerPerson!=null?Y(s.pricePerPerson):"â"}),e.jsxs("span",{className:"text-[10px] sm:text-[12px] text-gray-400 font-bold mt-1 tracking-tight uppercase",children:[w("results.pp")," â ",s.durationNights??s.durationDays??7," ",w("offer.nights")]})]}),e.jsxs("div",{className:"relative group/tt shrink-0",children:[e.jsx("button",{onClick:v=>{v.stopPropagation(),o&&f&&N(s),b(s)},"aria-label":w(o?"results.remove_compare":"results.add_compare"),className:m("w-10 h-10 rounded-full flex items-center justify-center transition-all active:scale-[0.95] border cursor-pointer",o?"bg-[#FEF2F2] text-[#991B1B] border-[#FEE2E2] hover:bg-[#FEE2E2]":"bg-[#F3F4F6] text-[#111827] border-transparent hover:bg-[#E5E7EB]"),children:o?e.jsx(K,{className:"w-[16px] h-[16px] shrink-0",strokeWidth:2.5}):e.jsx(q,{className:"w-[16px] h-[16px] shrink-0",strokeWidth:2.5})}),e.jsx("div",{className:"pointer-events-none absolute bottom-[calc(100%+8px)] right-0 z-[200] whitespace-nowrap rounded-xl bg-black px-3 py-2 text-[12px] font-medium tracking-tight text-white opacity-0 shadow-2xl transition-all duration-200 group-hover/tt:opacity-100",children:w(o?"results.remove_compare":"results.add_compare")})]})]})]})]})});function le({onCardClick:g}){const{items:s,clear:x,count:p,toggle:k,isBookmarked:o}=Z(),{isSelected:f,toggleSelection:b}=ee(),N=se(),{t}=B(),{setChatOpen:E}=te(),{getCardVariation:L}=W(),[a,w]=d.useState("None"),[y,j]=d.useState(new Set),[z,_]=d.useState(!1),[u,R]=d.useState("grid");d.useEffect(()=>{E(!0)},[E]);const v=["None","Region","Country","Price","Duration","Type"],h=d.useMemo(()=>{const r={},c=s.filter(i=>i&&i.id);return c.length===0?r:a==="None"?(r[t("wishlist.none")]=c,r):(c.forEach(i=>{var C;let n=t("wishlist.other");if(a==="Region")n=i.region||i.Region||t("wishlist.unknown-region");else if(a==="Country")n=i.country||i.Country||t("wishlist.unknown-country");else if(a==="Type"){const l=((C=i.type)==null?void 0:C.toLowerCase())||"";l.includes("offer")?n=t("wishlist.travel-offers"):l.includes("provider")?n=t("wishlist.travel-agencies"):l.includes("club")?n=t("wishlist.club-communities"):n=t("wishlist.other")}else if(a==="Price"){const l=i.pricePerPerson;l==null?n=t("wishlist.price-not-specified"):l<500?n=t("wishlist.under-500"):l<=1e3?n=t("wishlist.500-1000"):l<=2e3?n=t("wishlist.1000-2000"):n=t("wishlist.luxury-over-2000")}else if(a==="Duration"){const l=i.durationDays||i.durationNights;l?l<=3?n=t("wishlist.short-stay"):l<=7?n=t("wishlist.standard-week"):l<=14?n=t("wishlist.extended-tour"):n=t("wishlist.grand-expedition"):n=t("wishlist.duration-not-specified")}r[n]||(r[n]=[]),r[n].push(i)}),r)},[s,a,t]),S=P.useRef(a),F=P.useRef(s.length);P.useLayoutEffect(()=>{const r=S.current!==a,c=s.length>F.current;if(r||c){const i=Object.keys(h);i.length>0&&j(new Set(i))}S.current=a,F.current=s.length},[h,a,s.length]);const O=r=>{const c=new Set(y);c.has(r)?c.delete(r):c.add(r),j(c)},T=()=>{y.size>0?j(new Set):j(new Set(Object.keys(h)))};return e.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-[#f3f4f6] pb-24",children:e.jsxs("div",{className:"px-5 py-8 lg:px-12 lg:py-10",children:[e.jsxs("div",{className:"flex flex-col gap-8 mb-10",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[e.jsx("h1",{className:"text-[24px] sm:text-[32px] md:text-[40px] font-bold text-gray-900 tracking-tight",children:t("results.compare")}),e.jsxs("span",{className:"px-3 py-1 sm:px-4 sm:py-1.5 rounded-full bg-white border border-gray-100 text-[11px] sm:text-[13px] font-bold text-gray-900 shadow-sm animate-in fade-in duration-300 whitespace-nowrap",children:[p," ",t(p===1?"results.count_singular":"results.count_plural")]})]}),e.jsx("button",{onClick:x,className:"w-full sm:w-auto px-6 py-2.5 sm:py-3 rounded-2xl border-2 border-gray-900 text-[13px] sm:text-[14px] font-bold text-gray-900 hover:bg-gray-900 hover:text-white transition-all active:scale-95",children:t("wishlist.clear-all")})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 sm:gap-6",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>_(!z),className:"flex items-center gap-2 px-3 py-2.5 sm:px-5 sm:py-3.5 bg-white rounded-2xl border border-gray-100 shadow-sm hover:border-gray-300 transition-all active:scale-95",children:[e.jsx("span",{className:"text-[12px] sm:text-[14px] text-gray-500",children:t("wishlist.group-by")}),e.jsx("span",{className:"text-[12px] sm:text-[14px] font-bold text-gray-900",children:t(`wishlist.${a.toLowerCase()}`)}),e.jsx(H,{size:14,className:m("text-gray-400 transition-transform duration-300",z&&"rotate-180")}
1)]}),z&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>_(!1)}),e.jsx("div",{className:"absolute top-full left-0 mt-2 w-48 bg-white rounded-2xl border border-gray-100 shadow-xl z-50 py-2 animate-in fade-in zoom-in-95 duration-200",children:v.map(r=>e.jsx("button",{onClick:()=>{w(r),_(!1),j(new Set(Object.keys(h)))},className:m("w-full text-left px-5 py-3 text-[14px] transition-colors",a===r?"bg-gray-50 text-gray-900 font-bold":"text-gray-500 hover:bg-gray-50"),children:t(`wishlist.${r.toLowerCase()}`)},r))})]})]}),a!=="None"&&e.jsx("button",{onClick:T,className:"text-[13px] sm:text-[14px] font-medium text-gray-900 hover:underline decoration-2 underline-offset-4 whitespace-nowrap",children:y.size>0?t("wishlist.collapse-all"):t("wishlist.expand-all")})]}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0 bg-white border border-gray-100 p-1 rounded-2xl sm:bg-transparent sm:border-transparent sm:p-0",children:[e.jsx("button",{onClick:()=>R("grid"),className:m("p-1.5 sm:p-2 rounded-xl transition-all duration-300",u==="grid"?"bg-black text-white shadow-md shadow-black/20":"text-gray-900 hover:bg-gray-200/50"),title:t("wishlist.grid_view"),children:e.jsx(J,{className:"w-[18px] h-[18px] sm:w-[22px] sm:h-[22px]",strokeWidth:2.5})}),e.jsx("button",{onClick:()=>R("list"),className:m("p-1.5 sm:p-2 rounded-xl transition-all duration-300",u==="list"?"bg-black text-white shadow-md shadow-black/20":"text-gray-900 hover:bg-gray-200/50"),title:t("wishlist.list_view"),children:e.jsx(Q,{className:"w-[18px] h-[18px] sm:w-[22px] sm:h-[22px]",strokeWidth:2.5})})]})]})]}),e.jsx("div",{className:"space-y-4",children:s.length===0?e.jsx(re,{}):Object.entries(h).map(([r,c])=>e.jsx(ne,{title:r,count:c.length,isExpanded:y.has(r),onToggle:()=>O(r),viewMode:u,hideHeader:a==="None",children:c.map((i,n)=>{const C=o(i.id,i.type),l=f(i.id,i.type)&&C;if(u==="list")return e.jsx(ae,{item:i,onClick:g,index:n,isInCompare:C,isSelected:l,parallaxManager:N,onToggleCompare:k,onToggleSelection:b,hideCompareBadge:!0},i.id);const{aspectRatio:D}=L(n);return e.jsx(ie,{item:i,onClick:()=>b(i),variant:"detailed",aspectRatio:D,showCompareButton:!0,showSelectionCircle:!1,showMatchBadge:!1,index:n,isInCompare:C,isSelected:l,parallaxManager:N,onToggleCompare:k,onToggleSelection:b,hideCompareBadge:!0},i.id)})},r))})]})})}function pe(){const g=(s,x)=>{let p=s;!p&&typeof x=="string"&&x.includes("_")&&(p=x.split("_")[0]),window.dispatchEvent(new CustomEvent("open-detail",{detail:{type:p,id:x}}))};return e.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[e.jsxs(X,{children:[e.jsx("title",{children:"Reisevergleich | reiseagent.ai"}),e.jsx("meta",{name:"description",content:"Vergleiche Cluburlaube und Rundreisen direkt miteinander, um die beste Wahl für dich zu treffen."}),e.jsx("link",{rel:"canonical",href:"https://reiseagent.ai/vergleich"}),e.jsx("meta",{name:"robots",content:"noindex, follow"}),e.jsx("meta",{property:"og:title",content:"Reisevergleich | reiseagent.ai"}),e.jsx("meta",{property:"og:description",content:"Vergleiche Cluburlaube und Rundreisen direkt miteinander, um die beste Wahl für dich zu treffen."}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:url",content:"https://reiseagent.ai/vergleich"}),e.jsx("meta",{property:"og:image",content:"https://reiseagent.ai/assets/og-image.jpg"}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:"Reisevergleich | reiseagent.ai"}),e.jsx("meta",{name:"twitter:description",content:"Vergleiche Cluburlaube und Rundreisen direkt miteinander, um die beste Wahl für dich zu treffen."}),e.jsx("meta",{name:"twitter:image",content:"https://reiseagent.ai/assets/og-image.jpg"})]}),e.jsx(le,{onCardClick:g})]})}export{pe as default}; 2//# sourceMappingURL=CompareView-DIKgfDUD.js.map
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.