1import O from"./wzzXBT4-.js";import T from"./PoIEhcH5.js";import{an as j,ao as V,aP as F,aY as D,ag as H,r as U,j as q,bH as W,v as L,M as _,k as I,x as g,F as R,A as E,o as N,m as B,bd as Y,l as A,b0 as J,a$ as K,H as Q,aB as X,bv as Z,b6 as ee}from"./Bl0pM-6a.js";import te from"./D_xO21V_.js";import{g as se}from"./eX6UHSWD.js";import{u as ae}from"./BoMW_ZdG.js";import{u as oe}from"./CY3wTTqK.js";import"./ClLSpleI.js";import"./B0c6qWlS.js";import"./DnOPtQeG.js";import"./Bxfrw9Bj.js";function ie(x){let{swiper:e,extendParams:y,on:S}=x;y({grid:{rows:1,fill:"column"}});let c,v,h,w;const M=()=>{let t=e.params.spaceBetween;return typeof t=="string"&&t.indexOf("%")>=0?t=parseFloat(t.replace("%",""))/100*e.size:typeof t=="string"&&(t=parseFloat(t)),t},C=t=>{const{slidesPerView:s}=e.params,{rows:a,fill:n}=e.params.grid,o=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:t.length;h=Math.floor(o/a),Math.floor(o/a)===o/a?c=o:c=Math.ceil(o/a)*a,s!=="auto"&&n==="row"&&(c=Math.max(c,s*a)),v=c/a},k=()=>{e.slides&&e.slides.forEach(t=>{t.swiperSlideGridSet&&(t.style.height="",t.style[e.getDirectionLabel("margin-top")]="")})},P=(t,s,a)=>{const{slidesPerGroup:n}=e.params,o=M(),{rows:i,fill:d}=e.params.grid,f=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:a.length;let l,p,u;if(d==="row"&&n>1){const $=Math.floor(t/(n*i)),z=t-i*n*$,G=$===0?n:Math.min(Math.ceil((f-$*i*n)/i),n);u=Math.floor(z/G),p=z-u*G+$*n,l=p+u*c/i,s.style.order=l}else d==="column"?(p=Math.floor(t/i),u=t-p*i,(p>h||p===h&&u===i-1)&&(u+=1,u>=i&&(u=0,p+=1))):(u=Math.floor(t/v),p=t-u*v);s.row=u,s.column=p,s.style.height=`calc((100% - ${(i-1)*o}px) / ${i})`,s.style[e.getDirectionLabel("margin-top")]=u!==0?o&&`${o}px`:"",s.swiperSlideGridSet=!0},r=(t,s)=>{const{centeredSlides:a,roundLengths:n}=e.params,o=M(),{rows:i}=e.params.grid;if(e.virtualSize=(t+o)*c,e.virtualSize=Math.ceil(e.virtualSize/i)-o,e.params.cssMode||(e.wrapperEl.style[e.getDirectionLabel("width")]=`${e.virtualSize+o}px`),a){const d=[];for(let f=0;f<s.length;f+=1){let l=s[f];n&&(l=Math.floor(l)),s[f]<e.virtualSize+s[0]&&d.push(l)}s.splice(0,s.length),s.push(...d)}},m=()=>{w=e.params.grid&&e.params.grid.rows>1},b=()=>{const{params:t,el:s}=e,a=t.grid&&t.grid.rows>1;w&&!a?(s.classList.remove(`${t.containerModifierClass}grid`,`${t.containerModifierClass}grid-column`),h=1,e.emitContainerClasses()):!w&&a&&(s.classList.add(`${t.containerModifierClass}grid`),t.grid.fill==="column"&&s.classList.add(`${t.containerModifierClass}grid-column`),e.emitContainerClasses()),w=a};S("init",m),S("update",b),e.grid={initSlides:C,unsetSlides:k,updateSlide:P,updateWrapperSize:r}}const le={class:"game-list-wrapper w-full card-primary rounded-[30px] p-3 pb-1"},ne={key:0,class:"w-full overflow-scroll flex gap-[6px] pb-3"},re={__name:"GameList",props:{category:{type:String,default:""}},setup(x){const e=x,y=W(),S=ae(),{user:c}=j(),{games:v}=V(F()),{provider:h}=V(D()),{fetchGames:w}=F(),{setting:M}=H(),C=U(!1),k=q(()=>{var t,s,a,n,o,i,d,f;const r=v.value.specialCategories[e==null?void 0:e.category]||{list:[]},m=(a=(s=(t=M.value)==null?void 0:t.layoutSite)==null?void 0:s.content)==null?void 0:a.find(l=>(l==null?void 0:l.component)==="huay-promote"),b=(o=(n=h.value.categories)==null?void 0:n.all)==null?void 0:o.find(l=>(l==null?void 0:l.providerPrefix)===(m==null?void 0:m.providerPrefix));return((i=y==null?void 0:y.public)==null?void 0:i.defaultLocale)==="th"&&b&&S.isOpen&&e.category==="hit"&&((d=r==null?void 0:r.list)!=null&&d.length)&&(m!=null&&m.component)?{...r,list:[{...b,images:[(f=se.specialEvent.lotto)==null?void 0:f.find(l=>{var p;return(l==null?void 0:l.type)===((p=M.value)==null?void 0:p.theme)})],types:["forcePlay"]},...r.list]}:r}),P=async()=>{var r;(r=k.value)!=null&&r.lenght||(C.value=!0),await w({page:1,pageSize:42,category:e==null?void 0:e.category}),C.value=!1};return e!=null&&e.category&&P(),(r,m)=>{var a,n;const b=Y,t=te,s=X;return _(),L("div",le,[g(C)?(_(),L("div",ne,[(_(),L(R,null,E(8,o=>N("div",{key:o,class:"skeleton-game-list-wrapper"},[B(b,{class:"skeleton-game-list"})])),64))])):(n=(a=g(k))==null?void 0:a.list)!=null&&n.length?(_(),I(g(K),{key:1,"slides-per-view":8,"space-between":6,pagination:{clickable:!0},breakpoints:{1100:{slidesPerView:7.4},1025:{slidesPerView:6.4},769:{slidesPerView:5.4},561:{slidesPerView:4.5},0:{slidesPerView:3.3}},modules:[g(ie)]},{default:A(()=>{var o;return[(_(!0),L(R,null,E((o=g(k))==null?void 0:o.list,(i,d)=>(_(),I(g(J),{key:d},{default:A(()=>[B(t,{game:i,user:g(c)},null,8,["game","user"])]),_:2},1024))),128))]}),_:1}
1,8,["modules"])):(_(),I(s,{key:2,title:("t"in r?r.t:g(Q))("noGamesFound"),icones:"i-solar:gamepad-bold"},null,8,["title"]))])}}},ce={class:"game-hit-slide-wrapper w-content p-content flex flex-col gap-1"},pe={class:"w-full flex justify-between"},be={__name:"index",props:{label:{type:Object,default:()=>({})}},setup(x){const y=oe(x.label,"category.tophit"),S=()=>{const c=Z();ee({path:c("games"),query:{specialCategory:"hit",i:!1}})};return(c,v)=>{const h=O,w=T;return _(),L("div",ce,[N("div",pe,[B(h,{name:g(y)},null,8,["name"]),B(w,{class:"items-end",onClick:S})]),B(re,{category:"hit"})])}}};export{be as default};
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.