PageSourceSearch

https://www.partake.gg/_next/static/chunks/pages/teams/[id]/widgets/next-event-0677b38bcbf39a59.js

js partake.gg collected 2026-10-04 08:13:10 UTC 7,360 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2878],{53093:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/teams/[id]/widgets/next-event",function(){return n(43242)}])},73579:function(e,t,n){"use strict";n.d(t,{K:function(){return i},_:function(){return o}});var r=n(2784);let i=e=>{let t=new Date,n=new Date(e.startsAt),r=new Date(e.endsAt);return t<n?"upcoming":t>r?"past":"now"},o=()=>{let[e,t]=(0,r.useState)(!1),n=(0,r.useCallback)(()=>t(!0),[]),i=(0,r.useCallback)(()=>t(!1),[]);return{interactionProps:(0,r.useMemo)(()=>({onBlurCapture:i,onFocusCapture:n,onMouseEnter:n,onMouseLeave:i}),[n,i]),isImagePlaying:e}}},54368:function(e,t,n){"use strict";n.d(t,{g:function(){return o}});var r=n(52322),i=n(11664);let o=(0,n(2784).forwardRef)(function(e,t){let{icon:n,className:o,children:l}=e;return(0,r.jsxs)("div",{className:(0,i.cn)("flex items-center gap-2",o),ref:t,children:[n,l]})})},22523:function(e,t,n){"use strict";n.d(t,{V:function(){return s}});var r=n(52322),i=n(11664),o=n(2784);let l="gap-1 flex rounded-full items-center transition-all border border-ui/10 px-[0.5rem] hover:bg-ui/5",s=(0,o.forwardRef)(function(e,t){let{onClick:n,className:o,children:s}=e;return(0,r.jsx)("div",{ref:t,className:o?(0,i.cn)(l,o):l,onClick:n,children:s})})},79872:function(e,t,n){"use strict";n.d(t,{V:function(){return r.V}}),n(52322),n(2784),n(1944);var r=n(22523)},43242:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return G}});var r=n(52322),i=n(42822),o=n(77533),l=n(28535),s=n(50019),a=n(5632),u=n(2784),c=n(11881),d=n(20437),x=n(17993),f=n(4759),p=n(1944),h=n(54368),m=n(39097),g=n.n(m),v=n(62650),b=n(21820),j=n(79872),w=n(74803),_=n(73579);let y=e=>{var t;let{event:n}=e,{interactionProps:i,isImagePlaying:a}=(0,_._)(),u=(0,s.ff)(.65,.75),m=(0,s.ff)(.5,.6),y=null==n?void 0:null===(t=n.attachmentIds)||void 0===t?void 0:t[0],k=!!y,{src:N,srcSet:G}=(0,w.Tq)(y,{w:256},a);if(!n)return(0,r.jsx)(l.xu,{bg:"ui.5",minW:"280px",h:"280px"});let C=k?"uiDark.100":"ui.100",S=(0,_.K)(n);return(0,r.jsx)(c.f,{cursor:"pointer",as:"article",position:"relative",...i,children:(0,r.jsxs)(d.M,{w:"full",minW:"280px",bg:"ui.5",borderRadius:"md",overflow:"hidden",_hover:{bg:"ui.10"},className:"group",transition:"all 0.2s",templateRows:"280px 1fr",children:["now"===S&&(0,r.jsx)(l.xu,{position:"absolute",top:"4",right:"4",zIndex:"1",children:(0,r.jsx)(j.V,{className:k?"border-ui-dark/60 bg-ui-light/20":"border-ui/60",children:(0,r.jsx)(o.x,{textStyle:"label.sm",color:"accent.100",children:"LIVE"})})}),(0,r.jsxs)(l.xu,{w:"full",h:"full",overflow:"hidden",children:[k&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.xu,{position:"absolute",top:"0",left:"0",right:"0",bottom:"0",bgGradient:"linear(30deg, var(--pv-colors-uiLight-100), transparent)",opacity:u,transition:"all 0.2s",_groupHover:{opacity:m}}),(0,r.jsx)(f.E,{w:"full",h:"full",_placeholder:{bg:"ui.5"},objectFit:"cover",src:N,srcSet:G,sizes:"(max-width: 768px) 100vw, 280px",loading:"lazy",decoding:"async"})]}),(0,r.jsxs)(x.g,{position:"absolute",cursor:"pointer",spacing:"2",p:"4",align:"start",justify:"end",w:"full",opacity:"1",bottom:"0",h:"full",children:[(0,r.jsx)(o.x,{textStyle:"label.md",color:k?"white":"ui.100",noOfLines:2,children:(0,r.jsx)(g(),{href:"/events/".concat(null==n?void 0:n.id),passHref:!0,children:(0,r.jsx)(c.A,{children:n.title})})}),"now"!==S&&(0,r.jsxs)(h.g,{icon:(0,r.jsx)(p.IH,{boxSize:"4"}),children:["upcoming"===S&&(0,r.jsx)(o.x,{textStyle:"label.sm",color:"accent.100",children:(0,v.Z)(new Date(n.startsAt),"PPp")}),"past"===S&&(0,r.jsx)(o.x,{textStyle:"label.sm",color:k?"uiDark.60":"ui.60",children:(0,b.Z)(new Date(n.endsAt),{addSuffix:!0})})]}),"now"===S&&n.locationId&&n.locationData.server&&(0,r.jsx)(j.V,{children:(0,r.jsx)(o.x,{color:C,textStyle:"paragraph.sm",children:n.locationData.server.name})}),(0,r.jsx)(h.g,{icon:(0,r.jsx)(p._t,{color:C,boxSize:"4"}),children:(0,r.jsx)(o.x,{textStyle:"paragraph.sm",color:C,children:n.location})})]})]})]})})};var k=n(43552),N=n(11664),G=()=>{var e,t,n,c,d;let x=(0,u.useMemo)(()=>new Date,[]),f=(0,a.useRouter)(),p=Number(f.query.id),h=f.query.accent,m=(0,s.If)();(0,u.useEffect)(()=>
1{if(!m)return;let e="light"===f.query.mode;null==m||m.setColorMode(e?"light":"dark")},[null==f?void 0:f.query,m]);let g=(0,k.N1N)((0,N.O3)(),{teamId:p,endsBetween:{start:x}});return(null!==(d=null===(t=g.data)||void 0===t?void 0:null===(e=t.events)||void 0===e?void 0:e.length)&&void 0!==d?d:0)===0?(0,r.jsx)(i.M,{bg:"ui.5",minH:"280px",justifyItems:"center",alignContent:"center",children:(0,r.jsx)(o.x,{children:"No upcoming events"})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("style",{children:"\n        .chakra-ui-dark, .chakra-ui-light {\n          background: transparent;\n        }\n\n        ".concat(h?":root {\n          --pv-colors-accent-100: #".concat(h,";\n        }"):"")}),(0,r.jsx)(l.xu,{maxW:"520px",children:(0,r.jsx)(y,{event:null===(c=g.data)||void 0===c?void 0:null===(n=c.events)||void 0===n?void 0:n[0]})})]})}},96889:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(29058),i=n(52322),o=(0,r.G)(function(e,t){let{htmlWidth:n,htmlHeight:r,alt:o,...l}=e;return(0,i.jsx)("img",{width:n,height:r,ref:t,alt:o,...l})});o.displayName="NativeImage"},4759:function(e,t,n){"use strict";n.d(t,{E:function(){return s}});var r=n(96889),i=n(29058),o=n(94496),l=n(52322),s=(0,i.G)((e,t)=>(0,l.jsx)(o.m.img,{ref:t,as:r.Z,className:"chakra-image",...e}))},69251:function(e,t,n){"use strict";n.d(t,{r:function(){return l}});var r=n(29058),i=n(94496),o=n(52322),l=(0,r.G)(function(e,t){let{templateAreas:n,gap:r,rowGap:l,columnGap:s,column:a,row:u,autoFlow:c,autoRows:d,templateRows:x,autoColumns:f,templateColumns:p,...h}=e;return(0,o.jsx)(i.m.div,{ref:t,__css:{display:"grid",gridTemplateAreas:n,gridGap:r,gridRowGap:l,gridColumnGap:s,gridAutoColumns:f,gridColumn:a,gridRow:u,gridAutoFlow:c,gridAutoRows:d,gridTemplateRows:x,gridTemplateColumns:p},...h})});l.displayName="Grid"},20437:function(e,t,n){"use strict";n.d(t,{M:function(){return u}});var r=n(69251),i=n(29058),o=n(91148),l=n(48929),s=n(49456),a=n(52322),u=(0,i.G)(function(e,t){let{columns:n,spacingX:i,spacingY:u,spacing:c,minChildWidth:d,...x}=e,f=(0,o.F)(),p=d?(0,s.XQ)(d,e=>{let t=(0,l.LP)("sizes",e,"number"==typeof e?`${e}px`:e)(f);return null===e?null:`repeat(auto-fit, minmax(${t}, 1fr))`}):(0,s.XQ)(n,e=>null===e?null:`repeat(${e}, minmax(0, 1fr))`);return(0,a.jsx)(r.r,{ref:t,gap:c,columnGap:i,rowGap:u,templateColumns:p,...x})});u.displayName="SimpleGrid"},11881:function(e,t,n){"use strict";n.d(t,{A:function(){return s},f:function(){return a}});var r=n(29058),i=n(94496),o=n(31053),l=n(52322),s=(0,r.G)(function(e,t){let{isExternal:n,target:r,rel:s,className:a,...u}=e;return(0,l.jsx)(i.m.a,{...u,ref:t,className:(0,o.cx)("chakra-linkbox__overlay",a),rel:n?"noopener noreferrer":s,target:n?"_blank":r,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})}),a=(0,r.G)(function(e,t){let{className:n,...r}=e;return(0,l.jsx)(i.m.div,{ref:t,position:"relative",...r,className:(0,o.cx)("chakra-linkbox",n),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})})}},function(e){e.O(0,[2650,2888,9774,179],function(){return e(e.s=53093)}),_N_E=e.O()}]);

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.