PageSourceSearch

https://gdhdijital.com/assets/LiveScoreBar-rcXgZvnG.js

js gdhdijital.com collected 2026-10-09 16:57:10 UTC 5,353 bytes, 3 lines download raw bytes

1import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{I as u}from"./index-CLOilVAp.js";import{I as b}from"./index-CD93Vi8m.js";import{S as g}from"./index-FTf8LmPP.js";import{r as h}from"./components-BIH4siOm.js";import{S as y}from"./constants-BtRKe0Sv.js";import{D as w}from"./dev-only-CJUeFpCB.js";function v(n){const a=n.match(/^(\d{2})\/(\d{2})\/(\d{4}) (\d{2}):(\d{2})(?::(\d{2}))?$/);if(!a)return null;const[,t,i,l,d,o]=a;return new Date(Number(l),Number(i)-1,Number(t),Number(d),Number(o))}const T=new Intl.DateTimeFormat("tr-TR",{hour:"2-digit",minute:"2-digit"}),S=new Intl.DateTimeFormat("tr-TR",{day:"2-digit",month:"2-digit"});function j(n){if(!(n.home.score.current!==null&&n.away.score.current!==null)){const t=v(n.date);return{kind:"upcoming",kickoff:t?T.format(t):n.date,date:t?S.format(t):n.date}}return typeof n.currentMinute=="number"?{kind:"live",minute:n.currentMinute}:{kind:"finished",label:n.status.shortName}}const k={live:0,upcoming:1,finished:2};function I(n){const a=t=>{var i;return((i=v(t.date))==null?void 0:i.getTime())??0};return[...n].map(t=>({m:t,kind:j(t).kind,t:a(t)})).sort((t,i)=>k[t.kind]-k[i.kind]||(t.kind==="finished"?i.t-t.t:t.t-i.t)).map(({m:t})=>t)}const c="populer",L="Popüler Maçlar";function R({match:n}){var t;const a=j(n);return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-sans text-[9px] font-extrabold tracking-dossier-cta uppercase text-[#8b8b90] mb-1.75",children:(t=n.tournament)==null?void 0:t.name}),e.jsxs("div",{className:"flex items-center gap-6 text-ui font-semibold text-ink",children:[e.jsx("span",{className:"truncate font-sans text-card-sm font-extrabold text-ink-2 -tracking-amount",children:n.home.shortName}),e.jsxs("div",{className:"flex flex-col items-center justify-center gap-1.5",children:[a.kind==="upcoming"?e.jsx("span",{className:"font-sans text-chip font-bold bg-brand/10 px-2 py-0.75 tabular-nums text-[#d9534f]",children:a.kickoff}):e.jsxs("span",{className:"font-sans text-card-sm font-extrabold text-ink-2 tracking-header-link shrink-0 tabular-nums",children:[Number(n.home.score.current),"-",Number(n.away.score.current)]}),a.kind==="live"&&e.jsx("span",{className:"text-caption font-semibold tabular-nums text-brand",children:typeof a.minute=="number"?`${a.minute}'`:"CANLI"}),a.kind==="finished"&&e.jsx("span",{className:"font-sans text-[9px] font-bold tracking-dossier-cta uppercase text-[#8b8b90]",children:"BİTTİ"}),a.kind==="upcoming"&&e.jsx("span",{className:"font-sans text-[9px] font-bold tracking-dossier-cta uppercase text-[#8b8b90]",children:a.date})]}),e.jsx("span",{className:"truncate font-sans text-card-sm font-extrabold text-ink-2 -tracking-amount",children:n.away.shortName})]})]})}function _({matches:n,popularMatches:a,leagueOptions:t,defaultTournamentId:i}){const[l,d]=h.useState(()=>{var s,r;return a.length>0?c:((s=t.find(N=>N.tournamentId===i))==null?void 0:s.value)??((r=t[0])==null?void 0:r.value)??c}),o=h.useRef(null);function x(s){const r=o.current;r&&r.scrollBy({left:s*r.clientWidth*.8,behavior:"smooth"})}const f=l===c,m=t.find(s=>s.value===l),p=I(f?a:n.filter(s=>{var r;return((r=s.tournament)==null?void 0:r.id)===(m==null?void 0:m.tournamentId)}));return e.jsx("section",{className:"mb-6","aria-label":"Canlı skor",children:e.jsx("div",{className:y,children:e.jsxs("div",{className:"relative flex flex-col md:flex-row h-auto md:h-20.5 border border-rule",children:[e.jsxs("div",{className:"flex md:flex-col justify-between md:justify-center gap-1 py-2 px-4 shrink-0 sm:min-w-40 border-b md:border-b-0 border-r border-rule ",children:[e.jsxs("span",{className:"flex items-center gap-1.75 text-chip font-extrabold text-ink-2 -tracking-article-title",children:["Canlı Skor",e.jsx(w,{children:e.jsx(u,{name:"volume",size:"md",className:"text-ink-3"})})]}),e.jsxs(g,{variant:"bare",iconClassName:"right-0",value:l,onChange:s=>d(s.target.value),"aria-label":"Canlı skor bandı lig seçimi",className:"w-full md:w-auto h-9 font-sans text-right md:text-left py-2 md:py-0 md:pl-0 pr-4 text-ui md:text-kicker font-semibold md:truncate text-ink-2",children:[e.jsx("option",{value:c,children:L}),t.map(s=>e.jsx("option",{value:s.value,children:s.name},s.value))]})]}),e.jsxs("div",{className:"relative flex flex-1 min-w-0",children:[e.jsx(b,{icon:e.jsx(u,{name:"chevron-left"}),label:"Önceki maçlar",variant:"filled",size:"sm",className:"hidden md:block absolute top-1/2 left-2 -translate-y-1/2 shadow-sm z-20",onClick:()=>x(-1)}),p.length>0?e.jsx("div",{ref:o,className:"relative flex flex-1 min-w-0 items-stretch overflow-x-auto scroll-smooth scrollbar-hidden",children:p.map((s,r)=>e.jsx("div",{className:`
2                      relative flex flex-col items-center gap-1 shrink-0 py-2.5 ${r===0?"pl-8 md:pl-14 pr-8":"px-8"} after:absolute after:bg-rule after:w-px after:h-2/3 after:top-1/2 after:-translate-y-1/2 after:right-0
3                      `,children:e.jsx(R,{match:s})},s.id))}):e.jsx("div",{className:"flex flex-1 items-center justify-center p-4 text-ui text-ink-3",children:f?"Şu an öne çıkan popüler maç yok.":"Bu lig için bugün maç yok."}),e.jsx(b,{icon:e.jsx(u,{name:"chevron-right"}),label:"Sonraki maçlar",variant:"filled",size:"sm",className:"hidden md:block absolute top-1/2 right-2 -translate-y-1/2 shadow-sm",onClick:()=>x(1)})]})]})})})}export{T as F,_ as L,R as a,j as d,v as p,I as s};

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.