PageSourceSearch

https://sukarp.com/build/assets/useHome-C7vuFKgN.js

js sukarp.com collected 2026-10-08 16:16:55 UTC 3,630 bytes, 1 lines download raw bytes

1import{u as R}from"./@inertiajs-7zqq8wgj.js";import{u as v}from"./app-B3xOPy74.js";import{o as q,e as C,b as i,n as X,a}from"./@vue-4474Gfnj.js";function O(){const l=R(),n=i(()=>l.props.sliderList||[]),s=a(0);let m=null;const g=()=>{n.value.length>0&&(s.value=(s.value+1)%n.value.length)},A=()=>{n.value.length>0&&(s.value=(s.value-1+n.value.length)%n.value.length)},x=t=>{s.value=t},z=t=>{const e=(t==null?void 0:t.desk_image)||(t==null?void 0:t.image)||(t==null?void 0:t.img)||"";if(!e)return"";const r=v.decodeIfBase64String(e);return typeof r=="string"&&(r.startsWith("data:")||r.startsWith("http")||r.startsWith("/"))?r:v.toDataUrlIfBase64(e,(t==null?void 0:t.mime)||"image/png")},d=a("Rp. xx,xxx,xxx"),w=a(!0),E=async()=>{try{const t=typeof route=="function"?route("tournament.prize"):"/tournament/prize",e=await fetch(t,{method:"GET",credentials:"same-origin",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}});if(!e.ok)throw new Error("Network response was not ok");const r=await e.json();r&&r.prize&&(d.value=r.prize,w.value=!1)}catch{}},h=a([]),f=a(""),o=a(null),L=i(()=>typeof route=="function"?route("hotmatch"):"/hotmatch"),T=i(()=>{var t,e;return(e=(t=l.props)==null?void 0:t.auth)!=null&&e.user?typeof route=="function"?route("home"):"/":typeof route=="function"?route("register"):"/register"}),_=async()=>{var t,e;try{const r=await fetch(L.value,{method:"GET",credentials:"same-origin",headers:{Accept:"application/json"}});if(!r.ok)throw new Error("hotmatch fetch failed");const c=await r.json();h.value=Array.isArray(c)?c:[],f.value=((e=(t=h.value)==null?void 0:t[0])==null?void 0:e.slug)||"",await X()}catch{h.value=[],f.value=""}},j=t=>{f.value=t},y=t=>{o.value&&(t.preventDefault(),o.value.scrollLeft+=t.deltaY>0?100:-100)},D=(t=[])=>[...t].sort((e,r)=>{if(e.is_promo!=r.is_promo)return r.is_promo-e.is_promo;const c=new Date(e.match_time);return new Date(r.match_time)-c}),u=a([]),p=a(!1),H=i(()=>typeof route=="function"?route("altlinklist"):"/altlinklist"),M=async()=>{try{const t=await fetch(H.value,{method:"GET",credentials:"same-origin",headers:{Accept:"application/json"}});if(!t.ok)throw new Error("altlink fetch failed");const e=await t.json();Array.isArray(e)?u.value=e:e&&Array.isArray(e.data)&&(u.value=e.data),p.value=!0}catch{u.value=[],p.value=!0}},$=i(()=>u.value.map(t=>{const r=t.replace(/^https?:\/\//i,"").replace(/[^A-Za-z0-9\-.]/g,"");return{url:t,name:r}})),B=i(()=>{const t=(l.props||{}).newsinfo||{};return Object.entries(t).map(([e,r])=>({id:e,news:r}))}),I=t=>{if(!t)return"";const e=new Date(t);if(Number.isNaN(e.getTime()))return"";const r=String(e.getDate()).padStart(2,"0"),c=String(e.getMonth()+1).padStart(2,"0"),S=String(e.getFullYear()).slice(-2),k=e.getHours(),W=String(k%12||12).padStart(2,"0"),P=String(e.getMinutes()).padStart(2,"0"),G=k>=12?"PM":"AM";return`${r}/${c}/${S} ${W}:${P} ${G}`},N=t=>{if(!t)return"#";const e=String(t||"").replace(/^id_/,"");return typeof route=="function"?route("news",{id:e}):`/news/${e}`},U=t=>{try{return v.decodeIfBase64String(t||"")}catch{return t||""}};return q(()=>{n.value.length>1&&(m=setInterval(g,5e3)),E(),_().then(()=>{o.value&&o.value.addEventListener("wheel",y,{passive:!1})}),M()}),C(()=>{m&&clearInterval(m),o.value&&o.value.removeEventListener("wheel",y)}),{page:l,sliderList:n,currentSlide:s,nextSlide:g,prevSlide:A,goToSlide:x,getImageSrc:z,tournamentPrize:d,tournamentBlur:w,playHref:T,hotmatchCategories:h,activeHotmatchSlug:f,hotmatchEl:o,setActiveCategory:j,sortMatches:D,altlinks:u,altlinkLoaded:p,sanitizedAltlinks:$,newsList:B,formatNewsDate:
1I,getNewsLink:N,decodeTitle:U}}export{O as u};

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.