1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2764],{12268:(e,t,l)=>{l.d(t,{A:()=>n});let n=(0,l(79065).A)("coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]])},12764:(e,t,l)=>{l.r(t),l.d(t,{default:()=>M});var n=l(37876),s=l(14232),a=l(34846),i=l(21744),r=l(30359),o=l(42965),c=l(14e3),d=l(54587),u=l.n(d),m=l(12268),x=l(52974),h=l(17288),v=l(50364),f=l(18821);function p(e){var t,l;return null==e||null==(l=e.images)||null==(t=l.find(e=>null==e?void 0:e.is_primary))?void 0:t.image_url}function g(e,t){let l=(null==e?void 0:e.alias)||(null==e?void 0:e.slug)||(null==e?void 0:e.id),n=(null==e?void 0:e.is_for_teams)?"/tournaments/teams/":"/tournaments/solo/";return"".concat(n).concat(l).concat(t?"?lang=".concat(t):"")}function j(e){let t=null==e?void 0:e.prize;if(null==t||""===t)return"";let l=(null==e?void 0:e.currency)||"USD";return"USD"===l?"$".concat(t):"".concat(t," ").concat(l)}function b(){return(0,n.jsxs)("div",{className:"animate-pulse bg-card-gradient p-4 flex-shrink-0 overflow-hidden rounded-2xl flex flex-col",children:[(0,n.jsx)("div",{className:"relative overflow-hidden rounded-2xl w-full h-[120px] bg-[var(--brandBorderOne)]"}),(0,n.jsxs)("div",{className:"flex flex-col gap-2 mt-3 w-full",children:[(0,n.jsx)("div",{className:"h-5 w-4/5 rounded bg-[var(--brandBorderOne)]"}),(0,n.jsx)("div",{className:"h-4 w-2/3 rounded bg-[var(--brandBorderOne)]"}),(0,n.jsx)("div",{className:"h-4 w-full rounded bg-[var(--brandBorderOne)]"}),(0,n.jsx)("div",{className:"h-4 w-5/6 rounded bg-[var(--brandBorderOne)]"})]})]})}function w(e){var t;let{type:l,item:o}=e,d=(0,c.useRouter)(),{lang:b}=(0,x.o)(),{addToast:w}=(0,h.d)(),{t:N}=(0,a.Bd)("common"),y=(0,s.useMemo)(()=>{var e,t,n;if(!o)return null;if("blog"===l)return{title:null==o?void 0:o.title,subtitle:"",description:null==o?void 0:o.summary,date:null==o?void 0:o.created_at,views:(null==o?void 0:o.detail_view)||0,imageUrl:p(o),onClick:()=>d.push("/news/".concat(null==o?void 0:o.slug,"?lang=").concat(b))};if("game"===l){let e=(0,f.cJ)(null==o?void 0:o.id);return{title:null==o?void 0:o.title,subtitle:null==o?void 0:o.developer,description:(null==o?void 0:o.description)||(null==o?void 0:o.short_description)||(null==o?void 0:o.tagline),genreList:(null==o||null==(t=o.genres)?void 0:t.map(e=>null==e?void 0:e.name).filter(Boolean))||[],imageUrl:p(o),onClick:()=>d.push("/games/".concat((null==o?void 0:o.slug)||e,"?identity=").concat(encodeURIComponent(e),"&lang=").concat(b))}}return"tournament"===l?{title:null==o?void 0:o.name,subtitle:null==o||null==(n=o.game)?void 0:n.title,description:null==o?void 0:o.tagline,startDate:(null==o?void 0:o.start_date)||(null==o?void 0:o.created_at),prizePool:j(o),imageUrl:p(o),onClick:()=>d.push(g(o,b))}:{title:null==o?void 0:o.name,subtitle:null==o||null==(e=o.game)?void 0:e.title,description:null==o?void 0:o.tagline,startDate:(null==o?void 0:o.start_date)||(null==o?void 0:o.created_at),prizePool:j(o),imageUrl:p(o),onClick:()=>d.push(g(o,b))}},[w,o,b,d,N,l]);return y?(0,n.jsxs)("div",{onClick:y.onClick,className:"bg-card-gradient p-4 flex-shrink-0 overflow-hidden rounded-2xl flex flex-col cursor-pointer",children:[y.imageUrl&&(0,n.jsx)("div",{className:"relative overflow-hidden rounded-2xl group w-full h-[120px]",children:(0,n.jsx)(u(),{src:y.imageUrl,alt:y.title||N("trending"),fill:!0,className:"object-cover w-full h-full transition-transform duration-500 ease-in-out group-hover:scale-110"})}),(0,n.jsxs)("div",{className:"flex flex-col gap-1 mt-3 w-full text-white",children:[(0,n.jsx)("h1",{className:"text-base font-bold line-clamp-1",children:y.title}),y.subtitle&&(0,n.jsx)("p",{className:"text-sm text-neutral-one font-medium line-clamp-1",children:y.subtitle}),(0,n.jsx)("p",{className:"text-sm text-neutral-one font-medium line-clamp-2",style:{minHeight:"calc(1em * 1.5 * 2)"},children:y.description||"-"}),"game"===l?(0,n.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:null==(t=y.genreList)?void 0:t.slice(0,3).map(e=>(0,n.jsx)("span",{className:"px-2 py-0.5 text-xs text-tertiary border border-white/80 rounded-full",children:e},"".concat(y.title,"-").concat(e)))}):"tournament"===l?(0,n.jsxs)("div",{className:"flex justify-between text-white",children:[y.startDate?(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(i.A,{className:"w-4 h-4"}),(0,n.jsx)("span",{className:"truncate text-sm font-semibold",children:(0,n.jsx)(v.y,{date:y.startDate,contClass:"text-[var(--textSecondary)] font-medium"})})]}):(0,n.jsx)("div",{}),y.prizePool?(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(m.A,{className:"w-4 h-4"}),(0,n.jsx)("span",{className:"text-sm font-medium",children:y.prizePool})]}):(0,n.jsx)("div",{})]}):(0,n.jsxs)("div",{className:"flex justify-between text-white",children:[y.date?(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(i.A,{className:"w-4 h-4"}),(0,n.jsx)(v.y,{date:y.date,contClass:"text-sm font-semibold"})]}):(0,n.jsx)("div",{}),y.views?(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(r.A,{className:"w-4 h-4"}),(0,n.jsx)("span",{className:"text-sm font-medium",children:y.views})]}):(0,n.jsx)("div",{})]})]})]}):null}var N=l(44937),y=l(3738),k=l(48230),A=l.n(k);function _(e){var t,l;return null==e||null==(l=e.images)||null==(t=l.find(e=>null==e?void 0:e.is_primary))?void 0:t.image_url}function T(e){let{trendingItems:t,leftContent:l,trendingCards:i,fallbackBgImage:r="/images/home/hero_bg_1.png",viewAll:o="/#"}=e,{t:c}
1=(0,a.Bd)("screen"),[d,m]=(0,s.useState)(0),[x,h]=(0,s.useState)(0),v=(0,s.useRef)(null),[f,p]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=setTimeout(()=>{h(d)},100);return()=>clearTimeout(e)},[d]),(0,s.useEffect)(()=>{if(!t||0===t.length)return;let e=setInterval(()=>{if(v.current&&!f){let e=v.current,l=e.querySelector("div"),n=((null==l?void 0:l.offsetHeight)||200)+12,s=e.scrollHeight-e.clientHeight,a=e.scrollTop+n;a>=s?(e.scrollTo({top:0,behavior:"smooth"}),m(0)):(e.scrollTo({top:a,behavior:"smooth"}),m(Math.min(Math.round(a/n),t.length-1)))}},4e3);return()=>clearInterval(e)},[t,f]),(0,s.useEffect)(()=>{let e,l=v.current;if(!l||!t||0===t.length)return;let n=()=>{p(!0),clearTimeout(e);let n=l.querySelector("div"),s=(null==n?void 0:n.offsetHeight)||200;m(Math.max(0,Math.min(Math.round(l.scrollTop/(s+12)),t.length-1))),e=setTimeout(()=>{p(!1)},1500)};return l.addEventListener("scroll",n),()=>{l.removeEventListener("scroll",n),clearTimeout(e)}},[t]);let g=(null==t?void 0:t[d])?_(t[d]):null,j=(null==t?void 0:t[x])?_(t[x]):null,b=d!==x;return(0,n.jsxs)("section",{className:"relative rounded-3xl text-white overflow-hidden min-h-[650px]",children:[(0,n.jsx)("div",{className:"absolute inset-0 transition-opacity duration-700 ".concat(b?"opacity-0":"opacity-100"),children:j?(0,n.jsx)(u(),{src:j,alt:"Display Background",fill:!0,className:"object-cover",priority:!0},"display-".concat(x)):(0,n.jsx)("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url('".concat(r,"')")}})}),(0,n.jsx)("div",{className:"absolute inset-0 transition-opacity duration-700 ".concat(b?"opacity-100":"opacity-0"),children:g?(0,n.jsx)(u(),{src:g,alt:"Current Backgroun
1d",fill:!0,className:"object-cover",priority:!0},"current-".concat(d)):(0,n.jsx)("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url('".concat(r,"')")}})}),(0,n.jsx)("div",{className:"absolute inset-0 hero-section-gradient"}),(0,n.jsxs)("div",{className:"flex flex-row sm:justify-between min-h-[650px] relative z-10",children:[(0,n.jsx)("div",{className:"relative w-full max-w-3xl sm:py-12 md:py-20 flex flex-col justify-end",children:"function"==typeof l?l(t[x],x):l},x),(0,n.jsxs)("div",{className:"hidden sm:block w-full max-w-sm p-4 md:p-10",children:[(0,n.jsx)("h2",{className:"text-3xl md:text-4xl font-medium font-nyxerin mb-6 text-brand-gradient",children:c("news.title")}),(0,n.jsx)("div",{ref:v,className:"space-y-3 overflow-y-auto scrollbar-hide sm:min-h-[595px] max-h-[600px] scroll-smooth",children:i}),(0,n.jsxs)(A(),{href:"".concat(o),className:"mt-4 text-white hover:text-white/70 font-semibold transition-colors flex items-center justify-center gap-4 w-full",children:[(0,n.jsx)(N.A,{className:"h-5 w-5"}),c("home.viewAll"),(0,n.jsx)(y.A,{className:"h-5 w-5"})]})]})]})]})}var C=l(99361);function B(){var e;let{t:t}=(0,a.Bd)("screen"),{t:l}=(0,a.Bd)("common"),{data:s,isLoading:c}=(0,C.hA)(),d=null==s||null==(e=s.data)?void 0:e.data,u=Array.isArray(d)&&d.length>0,m=c?Array.from({length:3}).map((e,t)=>(0,n.jsx)(b,{},"home-trending-blog-skeleton-".concat(t))):u?d.map(e=>(0,n.jsx)(w,{type:"blog",item:e},e.id)):(0,n.jsx)("p",{className:"text-neutral-one",children:l("messages.noNews")});return(0,n.jsx)(T,{trendingItems:d||[],leftContent:e=>(0,n.jsxs)("div",{className:"relative z-10 px-4 py-6 sm:px-10 sm:py-0 animate-fadeIn",children:[(0,n.jsx)("h1",{className:"text-3xl sm:text-4xl md:text-5xl text-white font-bold leading-[100%] line-clamp-2",children:null==e?void 0:e.title}),(0,n.jsx)("p",{className:"mt-2 text-tertiary text-lg sm:text-xl font-medium max-w-md line-clamp-3 sm:line-clamp-5",children:null==e?void 0:e.summary}),(0,n.jsxs)("div",{className:"flex items-center sm:justify-between gap-6 mt-8 text-sm text-white",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(i.A,{className:"h-6 w-6 sm:h-8 sm:w-8"}),(0,n.jsx)(v.y,{date:null==e?void 0:e.created_at,contClass:"text-base sm:text-2xl font-semibold text-white"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(r.A,{className:"h-6 w-6 sm:h-8 sm:w-8"}),(0,n.jsx)("div",{className:"text-base sm:text-2xl font-semibold",children:(null==e?void 0:e.detail_view)||0})]})]}),(0,n.jsxs)("div",{className:"mt-6 sm:mt-16 flex flex-col sm:flex-row gap-5",children:[(0,n.jsxs)(A(),{prefetch:!0,href:"/news",className:"px-4 py-3 inline-flex items-center justify-center gap-2 text-secondary w-full rounded-full cursor-pointer transition-all bg-brand-gradient shadow-brand",children:[(0,n.jsx)(o.A,{className:"h-5 w-5"}),(0,n.jsx)("div",{className:"text-sm xl:text-base font-rajdhani font-bold",children:t("home.exploreNewsButton")})]}),(0,n.jsxs)(A(),{prefetch:!0,href:"/news/".concat(null==e?void 0:e.slug),className:"px-4 py-3 backdrop-blur-[1px] inline-flex items-center justify-center gap-2 w-full rounded-full cursor-pointer transition-colors border border-pink-200",children:[(0,n.jsx)(r.A,{className:"h-5 w-5",style:{stroke:"url(#icon-gradient)"}}),(0,n.jsx)("div",{className:"text-sm xl:text-base text-brand-gradient font-rajdhani font-bold",children:t("home.viewDetails")})]})]})]}),trendingCards:m,fallbackBgImage:"/images/home/hero_bg_3.png",viewAll:"/news"})}function M(){let{t:e}=(0,a.Bd)("screen"),[t,l]=(0,s.useState)(0),[i,r]=(0,s.useState)(!1),o=[{component:(0,n.jsx)(B,{}),key:"blogs"}];return(0,s.useEffect)(()=>{let e=setInterval(()=>{r(!0),setTimeout(()=>{l(e=>(e+1)%o.length),r(!1)},500)},1e4);return()=>clearInterval(e)},[o.length]),(0,n.jsx)("div",{className:"relative w-full",children:(0,n.jsxs)("div",{className:"relative overflow-hidden",children:[o.map((e,l)=>(0,n.jsx)("div",{className:"transition-opacity duration-500 ".concat(l===t?"opacity-100":"opacity-0 absolute inset-0 pointer-events-none"),children:e.component},e.key)),(0,n.jsx)("div",{className:"hidden absolute bottom-6 left-0 right-0 sm:flex justify-center gap-2 z-10",children:o.map((s,a)=>(0,n.jsx)("button",{onClick:()=>{a===t||i||(r(!0),setTimeout(()=>{l(a),r(!1)},500))},className:"w-3 h-3 rounded-full transition-all duration-500 ".concat(a===t?"bg-brand-gradient":"bg-[#999999]"),"aria-label":e("home.carouselGoToSlide",{number:a+1})},a))})]})})}},17288:(e,t,l)=>{l.d(t,{d:()=>a}),l(37876);var n=l(14232);let s=(0,n.createContext)(void 0);function a(){let e=(0,n.useContext)(s);if(void 0===e)throw Error("useToast must be used within a ToastProvider");return e}},50364:(e,t,l)=>{l.d(t,{u:()=>
1o,y:()=>r});var n=l(37876),s=l(14232),a=l(34846),i=l(1121);function r(e){let{date:t,contClass:l=""}=e,s=o(t);return(0,n.jsx)("span",{className:(0,i.cn)("text-xs",l),children:s})}function o(e){let[t,l]=(0,s.useState)(""),{t:n}=(0,a.Bd)("common");return(0,s.useEffect)(()=>{if(!e)return void l("");let t=()=>l(function(e){let t=function(e){if(!e)return null;if(e.includes("T")){let t=new Date(e);return isNaN(t.getTime())?null:t}let t=new Date(e.replace(" ","T")+"Z");return isNaN(t.getTime())?null:t}(e);if(!t)return"";let l=Math.floor((new Date().getTime()-t.getTime())/1e3),s=Math.floor(l/60),a=Math.round(s/60),i=Math.round(a/24),r=Math.round(i/7),o=Math.round(i/30),c=Math.round(i/365);return l<10?n("time.justNow"):l<60?n("time.secondsAgo",{count:l}):s<60?n("time.minutesAgo",{count:s}):a<24?n("time.hoursAgo",{count:a}):1===i?n("time.yesterday"):i<7?n("time.daysAgo",{count:i}):r<4?n("time.weeksAgo",{count:r}):o<12?n("time.monthsAgo",{count:o}):n("time.yearsAgo",{count:c})}(e));t();let s=setInterval(t,6e4);return()=>clearInterval(s)},[e,n]),t}},99361:(e,t,l)=>{l.d(t,{hA:()=>a});var n=l(37084),s=l(18821);function a(){let{userId:e,lang:t}=(0,n.K8)();return(0,n.Sk)(["blogs","feed",e,t],"/api/v1/app/blogs",{mode:"public",staleTime:s.nC})}}}]);
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.