PageSourceSearch

https://capugc.ai/assets/c-CTOJj7Bh.js

js capugc.ai collected 2026-10-05 15:18:21 UTC 11,668 bytes, 2 lines download raw bytes

1import{j as e,L as A,fQ as R,V as L,q as D,c as u,ep as M,U as I,r,aP as O,h as V,ag as B,d6 as z,cH as H,di as $}from"./e-Cba82O0s.js";import{P as G}from"./c-DSeTAHaY.js";import{E as U,a as q}from"./c-DZUvQlJq.js";import{P as _,E as K,a as Q,b as Y,c as Z}from"./c-Q8kBQG3x.js";import{E as W,a as X,i as J,r as ee,f as te,b as se,D as C,c as ae,d as le,F as ie,P as re}from"./c-B0w4lZFf.js";import{u as ne}from"./c-CaFi1sjI.js";import{T as oe}from"./c-oOVlzjjD.js";import{f as de}from"./c-Ci5QTkhn.js";import"./c-tyK1KJRX.js";import"./c-CTwvKYTT.js";import"./c-CT8nZnxv.js";import"./c-Dc2bkqgm.js";import"./c-C-zi41S5.js";import"./c-Bej7xX49.js";import"./c-BXXekXmF.js";function ce({event:t,cardIndex:g}){var x;const l=(x=t.images)==null?void 0:x[0],b=W[ne(t.coverAspectRatio,l)].ratioClass,c=_[g%_.length],f=X({format:t.format??null,eventType:t.eventType}),i=J({venue:t.venue,city:t.city,deliveryMode:t.deliveryMode}),p=ee({date:t.date,startTime:t.startTime,endTime:t.endTime,status:t.status}),m=t.totalCapacity?t.soldTickets>=t.totalCapacity:!1,j=t.totalCapacity&&!m?t.totalCapacity-t.soldTickets:null,a=te(t.paymentMode,t.ticketPrice,t.currency),n=[t.venue,t.city].filter(Boolean).join(" · "),N=new Date(t.date).toLocaleDateString("tr-TR",{weekday:"short",day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}),h=t.startTime?`${t.startTime}${t.endTime?` – ${t.endTime}`:""}`:null;return e.jsx("article",{className:u("group relative flex h-full flex-col",Q,K),children:e.jsxs(A,{to:`/etkinlikler/${t.id}`,className:"flex min-h-0 flex-1 flex-col no-underline","aria-label":`${t.title} — detayları gör`,children:[e.jsx("div",{className:"relative shrink-0",children:e.jsxs("div",{className:u("relative block w-full overflow-hidden bg-slate-900",b,!l&&u("bg-gradient-to-br",c)),children:[l?e.jsx("img",{src:l,alt:"",className:"h-full w-full object-cover transition duration-700 ease-out group-hover:scale-[1.06]"}):e.jsx("span",{className:"absolute inset-0 flex flex-col justify-end p-5",children:e.jsx("span",{className:"font-manrope text-5xl font-black uppercase tracking-[0.25em] text-white/15",children:t.title.slice(0,2)})}),e.jsx("span",{className:"pointer-events-none absolute inset-0 bg-gradient-to-t from-slate-950/85 via-slate-950/20 to-slate-950/10","aria-hidden":!0}),e.jsxs("div",{className:"absolute inset-x-0 top-0 z-[2] flex items-start justify-between gap-2 p-3",children:[e.jsx("span",{className:"inline-flex max-w-[58%] items-center rounded-lg border border-white/15 bg-black/25 px-2 py-1 text-[10px] font-semibold text-white shadow-lg backdrop-blur-md",children:se[f]}),e.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1.5",children:[p?e.jsx(U,{kind:p,size:"xs"}):null,m?e.jsx("span",{className:"inline-flex rounded-full bg-rose-600 px-2 py-0.5 text-[9px] font-bold uppercase tracking-wide text-white",children:"Tükendi"}):null]})]}),e.jsx("div",{className:"absolute inset-x-0 bottom-0 z-[2] p-3 pt-8",children:n&&i!=="online"?e.jsxs("p",{className:"mb-1 flex items-center gap-1 text-[11px] font-medium text-white/80",children:[e.jsx(R,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{className:"truncate",children:n})]}):i==="online"?e.jsxs("p",{className:"mb-1 flex items-center gap-1 text-[11px] font-medium text-white/80",children:[e.jsx(L,{className:"h-3 w-3 shrink-0"}),C[i]]}):null}),e.jsx("span",{className:"absolute right-3 bottom-3 z-[3] flex h-9 w-9 items-center justify-center rounded-full bg-white/95 text-slate-900 opacity-0 shadow-lg ring-1 ring-white/50 transition-all duration-300 group-hover:translate-y-0 group-hover:opacity-100 translate-y-1",children:e.jsx(D,{className:"h-4 w-4"})})]})}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col p-4",children:[t.hostName?e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-indigo-600/90",children:t.hostName}):null,e.jsx("h3",{className:"mt-1 font-manrope text-[16px] font-bold leading-snug tracking-[-0.02em] text-slate-900 line-clamp-2 group-hover:text-indigo-950",children:t.title}),e.jsxs("div",{className:"mt-2.5 inline-flex max-w-full items-center gap-2 rounded-lg bg-slate-50 px-2.5 py-1.5 ring-1 ring-slate-100",children:[e.jsx(M,{className:"h-3.5 w-3.5 shrink-0 text-indigo-500"}),e.jsx("span",{className:"truncate text-xs font-semibold text-slate-700",children:N}),h?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-slate-300",children:"·"}),e.jsx("span",{className:"shrink-0 text-xs font-medium tabular-nums text-slate-500",children:h})]}):null]}),e.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"rounded-xl bg-white px-2.5 py-2 ring-1 ring-slate-100/90",children:[e.jsx(oe,{className:"h-3 w-3 text-indigo-500"}),e.jsx("p",{className:"mt-1 truncate text-[11px] font-bold leading-tight text-indigo-900",children:a}),e.jsx("p",{className:"text-[9px] font-semibold uppercase tracking-wide text-slate-400",children:"Bilet"})]}),e.jsxs("div",{className:"rounded-xl bg-white px-2.5 py-2 ring-1 ring-slate-100/90",children:[e.jsx(I,{className:"h-3 w-3 text-slate-400"}),e.jsx("p",{className:"mt-1 truncate text-[11px] font-bold leading-tight text-slate-800",children:j!==null?`${j} kalan`:t.totalCapacity?String(t.totalCapacity):"Açık"}),e.jsx("p",{className:"text-[9px] font-semibold uppercase tracking-wide text-slate-400",children:"Kapasite"})]})]}),(i==="hybrid"||i==="online")&&e.jsxs("p",{className:"mt-2.5 flex items-center gap-1.5 text-[11px] font-medium text-slate-500",children:[e.jsx(L,{className:"h-3 w-3 shrink-0 text-slate-400"}),C[i]]})]})]})})}const v=24;function Te(){const[t,g]=r.useState(""),[l,b]=r.useState(""),[c,f]=r.useState(""),[i,p]=r.useState(""),[m,j]=r.useState("date_asc"),[a,n]=r.useState(1),N=r.useMemo(()=>({sort:m,q:l||void 0}),[m,l]),{data:h=[],isLoading:x,isError:P,refetch:F}=O({queryKey:["public-events","all",N],queryFn:()=>de(N),staleTime:6e4}),w=r.useMemo(()=>ae(h,{format:c,deliveryMode:i,timelines:re,searchQ:l}),[h,c,i,l]),E=w.length,o=Math.max(1,Math.ceil(E/v)),T=r.useMemo(()=>{const s=(a-1)*v;return w.slice(s,s+v)},[w,a]),k=!!(c||i||l);r.useEffect(()=>{n(1)},[c,i,l,m]),r.useEffect(()=>{a>o&&n(o)},[a,o]),r.useEffect(()=>{const s=window.setTimeout(()=>{b(t.trim())},350);return()=>window.clearTimeout(s)},[t]);const S=()=>{g(""),b(""),f(""),p(""),n(1)};return e.jsx(G,{children:e.jsxs("div",{className:u(Z,"flex-1"),children:[e.jsx("div",{className:Y,"aria-hidden":!0}),e.jsxs("div",{className:"relative mx-auto w-full max-w-[1600px] min-w-0 px-4 pb-16 pt-6 sm:px-6 sm:pb-20 sm:pt-8",children:[e.jsx("header",{className:"mb-6 sm:mb-8",children:e.jsx("div",{className:"rounded-[1.75rem] border border-white/90 bg-white/80 p-6 shadow-[0_24px_64px_-28px_rgba(15,23,42,0.14)] ring-1 ring-slate-200/70 backdrop-blur-xl sm:p-8",children:e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"inline-flex items-center gap-1.5 rounded-full bg-indigo-50 px-3 py-1 text-[11px] font-bold uppercase tracking-[0.14em] text-indigo-700 ring-1 ring-indigo-100",children:[e.jsx(V,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Etkinlikler"]}),e.jsx("h1",{className:"mt-3 font-manrope text-3xl font-extrabold tracking-tight text-slate-900 sm:text-4xl",children:"Etkinlikler"}),e.jsx("p",{className:"mt-3 max-w-2xl text-[15px] leading-relaxed text-slate-500 sm:text-base",children:"Devam eden, bugünkü ve yaklaşan eğitim, seminer, konser ve networking etkinliklerini format ve mecraya göre keşfedin."})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("label",{className:"sr-only",htmlFor:"public-events-sort",children:"Sıralama"}),e.jsxs("select",{id:"public-events-sort",value:m,onChange:s=>j(s.target.value),className:"rounded-xl border border-slate-200/80 bg-white px-3 py-2 text-sm font-medium text-slate-700 shadow-sm focus:outline-none focus:ring-2 focus:ring-indigo-500/25",children:[e.jsx("option",{value:"date_asc",children:"Tarihe göre (yakın)"}),e.jsx("option",{value:"date_desc",children:"Tarihe göre (uzak)"})]}),k?e.jsxs("button",{type:"button",onClick:S,className:"inline-flex items-center gap-1.5 rounded-xl border border-slate-200/80 bg-white px-3 py-2 text-sm font-semibold text-slate-600 shadow-sm transition hover:bg-slate-50",children:[e.jsx(B,{className:"h-4 w-4","aria-hidden":!0}),"Temizle"]}):null]})]})})}),e.jsx(q,{showSearch:!0,searchQ:t,onSearchChange:g,showViewToggle:!1,showTimelineFilter:!1,formatFilter:c,onFormatChange:s=>
1f(s),formatOptions:ie,deliveryFilter:i,onDeliveryChange:s=>p(s),deliveryOptions:le}),e.jsxs("div",{className:"mt-6 sm:mt-8",children:[e.jsxs("div",{className:"mb-5 flex items-center justify-between gap-3",children:[e.jsx("h2",{className:"text-base font-bold text-slate-900 sm:text-lg",children:l?`"${l}" için sonuçlar`:k?"Filtrelenmiş etkinlikler":"Devam eden, bugün ve yaklaşan"}),x?null:e.jsxs("span",{className:"shrink-0 text-sm font-medium text-slate-500",children:[E.toLocaleString("tr-TR")," etkinlik"]})]}),x?e.jsx("div",{className:"grid grid-cols-1 items-start gap-5 sm:grid-cols-2 sm:gap-6 lg:grid-cols-3 xl:grid-cols-4",children:Array.from({length:8}).map((s,d)=>e.jsx("div",{className:"aspect-video animate-pulse rounded-2xl bg-slate-200/70"},d))}):P?e.jsxs("div",{className:"flex flex-col items-center justify-center rounded-[1.75rem] border border-dashed border-red-200/90 bg-red-50/40 py-24 text-center",children:[e.jsx("p",{className:"text-base font-semibold text-red-800",children:"Etkinlikler yüklenemedi"}),e.jsx("p",{className:"mt-1 text-sm text-red-700/90",children:"Bağlantınızı kontrol edip tekrar deneyin."}),e.jsx("button",{type:"button",onClick:()=>void F(),className:"mt-4 rounded-xl bg-indigo-600 px-4 py-2 text-sm font-semibold text-white transition hover:bg-indigo-700",children:"Tekrar dene"})]}):T.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center rounded-[1.75rem] border border-dashed border-slate-200/90 bg-white/60 py-24 text-center",children:[e.jsx(z,{className:"mb-3 h-14 w-14 text-slate-300","aria-hidden":!0}),e.jsx("p",{className:"text-base font-semibold text-slate-700",children:"Etkinlik bulunamadı"}),e.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Farklı bir arama veya filtre deneyin"}),k?e.jsx("button",{type:"button",onClick:S,className:"mt-4 rounded-xl bg-indigo-600 px-4 py-2 text-sm font-semibold text-white transition hover:bg-indigo-700",children:"Filtreleri temizle"}):null]}):e.jsx("div",{className:"grid grid-cols-1 items-start gap-5 sm:grid-cols-2 sm:gap-6 lg:grid-cols-3 xl:grid-cols-4",children:T.map((s,d)=>e.jsx(ce,{event:s,cardIndex:d},s.id))}),o>1&&!x?e.jsxs("div",{className:"mt-10 flex items-center justify-center gap-2",children:[e.jsx("button",{type:"button",disabled:a===1,onClick:()=>n(a-1),className:"rounded-xl border border-slate-200 p-2 hover:bg-white disabled:cursor-not-allowed disabled:opacity-30","aria-label":"Önceki sayfa",children:e.jsx(H,{className:"h-4 w-4"})}),Array.from({length:Math.min(o,7)},(s,d)=>{const y=o<=7||a<=4?d+1:a>=o-3?o-6+d:a-3+d;return e.jsx("button",{type:"button",onClick:()=>n(y),className:u("rounded-xl px-3.5 py-2 text-sm font-medium transition-colors",y===a?"bg-indigo-600 text-white":"border border-slate-200 bg-white text-slate-600 hover:bg-slate-50"),children:y},y)}),e.jsx("button",{type:"button",disabled:a===o,onClick:()=>n(a+1),className:"rounded-xl border border-slate-200 p-2 hover:bg-white disabled:cursor-not-allowed disabled:opacity-30","aria-label":"Sonraki sayfa",children:e.jsx($,{className:"h-4 w-4"})})]}):null]})]})]})})}export{Te as default};
2//# sourceMappingURL=c-CTOJj7Bh.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.