PageSourceSearch

https://tapin.gg/_next/static/chunks/pages/dev/admin-priority-preview-ce6f263104b46583.js

js tapin.gg collected 2026-09-29 20:36:08 UTC 7,985 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7474],{24986:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dev/admin-priority-preview",function(){return a(838)}])},32883:function(e,t,a){"use strict";a.d(t,{Z:function(){return P}});var s=a(11527),r=a(4914),n=a(1123),l=a(11879),o=a(82551),i=a(15820),d=a(3885),u=a(44668),c=a(88678),m=a(51808),h=a(22043),f=a(46687),v=a(76834),x=a(18077);let p={username:null,userId:null,discordId:null};var g=a(95339),b=a(65091),j=a(79644),w=a(92941),y=a(11588);function N(e){return"".concat(e.userId,":").concat(e.categoryKey,":").concat(e.productMode)}let S=[{id:"teammate",header:"Teammate",mobileLabel:"Teammate",cell:e=>(0,s.jsx)(y.B,{username:e.username,userId:e.userId,discordId:e.discordId,className:"max-w-[200px]"})},{id:"game",header:"Game \xb7 mode",mobileLabel:"Game \xb7 mode",cell:e=>{var t;return(0,s.jsxs)("div",{className:"flex min-w-0 max-w-[170px] flex-col",children:[(0,s.jsx)(j.L,{value:null!==(t=e.gameName)&&void 0!==t?t:e.categoryKey}),(0,s.jsx)("span",{className:"text-xs text-admin-muted-foreground",children:(0,x.Nl)(e.productMode)})]})}},{id:"base",header:"Evaluated",mobileLabel:"Evaluated",align:"right",className:"tabular-nums",cell:e=>(0,x.o6)(e.baseScore)},{id:"boost",header:"Boost",mobileLabel:"Boost",align:"right",className:"tabular-nums",cell:e=>(0,s.jsx)(_,{row:e})},{id:"adjustments",header:"Adjustments",mobileLabel:"Adjustments",align:"right",className:"tabular-nums",cell:e=>(0,s.jsx)(k,{row:e})},{id:"effective",header:"Effective",mobileLabel:"Effective",align:"right",className:"text-base font-semibold tabular-nums text-admin-foreground",cell:e=>(0,x.o6)(e.effectiveScore)},{id:"superstar",header:"Superstar",mobileLabel:"Superstar",cell:e=>(0,s.jsx)(C,{row:e})},{id:"evaluatedAt",header:"Evaluated at",mobileLabel:"Evaluated at",className:"whitespace-nowrap tabular-nums text-admin-muted-foreground",cell:e=>(0,s.jsx)("span",{title:(0,x.hB)(e.evaluatedAt),children:(0,x.fG)(e.evaluatedAt)})}];function _(e){let{row:t}=e;return null===t.boostedScore?(0,s.jsx)("span",{className:"text-admin-muted-foreground",children:"—"}):t.boostInEffect?(0,s.jsx)(w.C,{variant:"default",title:"The boost is the base in effect",children:(0,x.o6)(t.boostedScore)}):(0,s.jsx)("span",{className:"text-admin-muted-foreground",title:"Dormant: the evaluated score has caught up",children:(0,x.o6)(t.boostedScore)})}function k(e){let{row:t}=e;return 0===t.activeAdjustments?(0,s.jsx)("span",{className:"text-admin-muted-foreground",children:"—"}):(0,s.jsx)(w.C,{variant:t.adjustmentTotal>=0?"success":"destructive",title:"".concat(t.activeAdjustments," in effect"),children:(0,x.tO)(t.adjustmentTotal)})}function C(e){let{row:t}=e;return"qualified"===t.superstarHeldBy?(0,s.jsx)(w.C,{variant:"success",children:"Superstar"}):"grace"===t.superstarHeldBy?(0,s.jsx)(w.C,{variant:"secondary",title:"Held by the grace period; a cell slipped on the last evaluation",children:"Superstar \xb7 grace"}):(0,s.jsx)("span",{className:"text-admin-muted-foreground",children:"—"})}let E="__any__",I=[{value:E,label:"Any mode"},...b.qd.map(e=>{let{value:t,label:a}=e;return{value:t,label:a}})],Z={page:u.k.page(),game:u.k.key(),mode:u.k.key(),by:u.k.oneOf(b.SS.map(e=>e.value),"username"),q:u.k.string()},L={"data-testid":"tapin-score-row"};function P(){var e,t,a,j,w,y,_,k,C;let{values:P,set:T,replace:A}=(0,u.x)(Z),{search:M}=(0,c.o)(P.q,b.Gv),B=(0,r.GZ)(),G=(0,g.hr)({limit:b.h6,offset:(0,d.h8)(P.page,b.h6),categoryKey:P.game,productMode:P.mode,...function(e,t){let a=t.trim();if(!a)return p;switch(e){case"username":return{...p,username:a};case"userId":{let e=Number(a);return Number.isInteger(e)&&e>0?{...p,userId:e}:p}case"discordId":return/^\d{1,32}$/.test(a)?{...p,discordId:a}:p;default:return p}}(P.by,M)}),O=null!==(j=null===(e=G.data)||void 0===e?void 0:e.rows)&&void 0!==j?j:[],q=null!==(w=null===(t=G.data)||void 0===t?void 0:t.total)&&void 0!==w?w:0,K=(0,d.mZ)(P.page,null===(a=G.data)||void 0===a?void 0:a.total,b.h6),z=[{value:E,label:"Any game"},...(null!==(y=B.data)&&void 0!==y?y:[]).slice().sort((e,t)=>
1e.name.localeCompare(t.name)).map(e=>({value:e.key,label:e.name}))],D=null!==(_=b.SS.find(e=>e.value===P.by))&&void 0!==_?_:b.SS[0];return(0,s.jsx)("div",{className:"flex flex-col gap-6",children:(0,s.jsxs)(h.Zb,{children:[(0,s.jsxs)(h.Ol,{children:[(0,s.jsx)(h.ll,{children:"Tapin scores"}),(0,s.jsx)(h.SZ,{className:"col-start-1",children:"Every scored teammate and game mode from the last nightly evaluation, highest effective score first. Effective is what the matchmaker ranks by and the teammate sees: the boost when it is above the evaluated score, plus the adjustments in effect, clipped to 0–100. A Superstar under 100 is holding the grant through the grace period after a cell slipped."}),(0,s.jsx)(h.lY,{className:"col-span-2 col-start-1 row-span-1 row-start-3 mt-3 justify-self-stretch xl:col-span-1 xl:col-start-2 xl:row-span-2 xl:row-start-1 xl:mt-0 xl:justify-self-end",children:(0,s.jsx)(o.u,{page:K,pageCount:(0,d.mC)(q,b.h6),busy:G.isFetching,onPage:e=>void T({page:e}),summary:0===q?(0,s.jsx)("span",{children:"No scores"}):(0,x.Wx)(q,"score")})})]}),(0,s.jsxs)(h.aY,{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-end sm:gap-4",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:contents",children:[(0,s.jsx)(v.z,{id:"scores-game",label:"Game",value:null!==(k=P.game)&&void 0!==k?k:E,items:z,onChange:e=>void T({game:e===E?null:e},{resetPage:!0}),className:"w-full sm:w-48"}),(0,s.jsx)(v.z,{id:"scores-mode",label:"Mode",value:null!==(C=P.mode)&&void 0!==C?C:E,items:I,onChange:e=>void T({mode:e===E?null:e},{resetPage:!0}),className:"w-full sm:w-36"})]}),(0,s.jsx)(i.U,{id:"scores-teammate",label:"Teammate",value:P.q,placeholder:D.placeholder,inputMode:"username"===P.by?"text":"numeric",modes:b.SS,mode:P.by,onModeChange:e=>void T({by:e},{resetPage:!0}),onChange:e=>void T({q:e},{resetPage:!0})}),(0,s.jsx)(m.z,{type:"button",variant:"outline",className:"self-start border-admin-warning/30 bg-admin-warning/10 text-admin-warning hover:bg-admin-warning/20 sm:self-auto",onClick:()=>void A({}),children:"Reset"})]}),G.isLoading?(0,s.jsx)("p",{className:"text-sm text-admin-muted-foreground",children:"Loading scores…"}):G.isError?(0,s.jsx)(l.u,{tone:"destructive",title:"Could not load the scores."}):(0,s.jsx)(f.pn,{delay:0,children:(0,s.jsx)(n.w,{columns:S,rows:O,rowId:N,rowProps:()=>L,empty:(0,s.jsx)(l.u,{title:"No scores match these filters."})})})]})]})})}},45266:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});var s=a(11527),r=a(50959),n=a(94750);function l(e){let{session:t,children:a}=e,l=(0,r.useMemo)(()=>t?{data:t,status:"authenticated",update:async()=>t}:{data:null,status:"unauthenticated",update:async()=>null},[t]);return(0,s.jsx)(n.SessionContext.Provider,{value:l,children:a})}},14169:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});var s=a(94750),r=a(50959),n=a(94006);function l(){let{data:e}=(0,s.useSession)(),t=(0,r.useRef)(null);return e&&!t.current&&(t.current=(0,n.s4)(e)),(0,r.useEffect)(()=>(e&&!t.current&&(t.current=(0,n.s4)(e)),()=>{var e;null===(e=t.current)||void 0===e||e.call(t),t.current=null}),[e]),null}},838:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return c},default:function(){return m}});var s=a(11527),r=a(45266),n=a(14169),l=a(10935),o=a(36847),i=a(45593),d=a(32883);let u={user:{id:1,username:"preview-admin",roles:["admin","high admin"]},accessToken:"preview",accountKey:"preview",expires:new Date(Date.now()+36e5).toISOString()};var c=!0;function m(){let{query:e}=(0,o.useRouter)();return(0,s.jsxs)(r.Z,{session:u,children:[(0,s.jsx)(n.Z,{}),(0,s.jsx)(l.Z,{pageTitle:"Priority",children:"scores"===e.view?(0,s.jsx)(d.Z,{}):(0,s.jsx)(i.Z,{})})]})}}},function(e){e.O(0,[6183,8826,4358,2591,8851,38,935,4244,412,5593,2888,9774,179],function(){return e(e.s=24986)}),_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.