1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4982],{54982:(e,a,t)=>{t.r(a),t.d(a,{default:()=>k});var s=t(95155),l=t(20063),i=t(95604),r=t(12115),n=t(77542),o=t(52254),c=t(10565),d=t(89846),m=t(22837),x=t(47074),p=t(61151),g=t(80160),_=t(67645),h=t(60759),u=t(7170),j=t(30097),v=t(16933),N=t(22789),f=t(75018),b=t(65214),w=t(64269);let k=function(e){var a;let{gameId:t,createdAt:o,className:d,participantId:m}=e,x=(0,i.useTranslations)("Game"),{region:p}=(0,l.useParams)(),g=(0,u.A)(),_=(0,v.a8)(),h=(0,r.useRef)(null),N=(0,r.useRef)(!1),b=(0,r.useRef)(!1),k=(0,r.useRef)({RED:!1,BLUE:!1}),{data:E,isLoading:L}=(0,j.$)(n.l,{region:p,gameId:t,createdAt:o,locale:g},{onSuccess:e=>{var a,t,s,l;if(!e)return;let i=Array.isArray(e.team_red)?e.team_red:[],r=Array.isArray(e.teams)?e.teams:[];h.current=i.find(e=>e.url_profile===_)?"RED":"BLUE";let n=r.find(e=>e.key===h.current);if(!(null==n?void 0:n.game_stat)){h.current=null;return}k.current={RED:null==(t=r.find(e=>"RED"===e.key))||null==(a=t.game_stat)?void 0:a.is_win,BLUE:null==(l=r.find(e=>"BLUE"===e.key))||null==(s=l.game_stat)?void 0:s.is_win},N.current=!!n.game_stat.is_win,b.current=n.game_stat.is_remake},dedupeInterval:3e4});if(L)return(0,s.jsx)("div",{className:"flex h-[648px] items-center justify-center bg-gray-0 md:h-[580px]",children:(0,s.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-main-600 border-t-transparent"})});if(!E)return null;let D=Array.isArray(E.team_red)?E.team_red:[],R=Array.isArray(E.team_blue)?E.team_blue:[],S=Array.isArray(E.teams)?E.teams:[],C=(0,f.Ms)(E.game_type),O=E.is_opscore_active||C,G="RED"===h.current?D:R,T="RED"===h.current?R:D,P=S.find(e=>e.key===h.current),V=S.find(e=>e.key!==h.current);if(!h.current||!(null==P?void 0:P.game_stat)||!(null==V?void 0:V.game_stat))return null;let W=0,B=0;return[...D,...R].forEach(e=>{e.damage.total_damage_dealt_to_champions>W&&(W=e.damage.total_damage_dealt_to_champions),e.damage.total_damage_taken>B&&(B=e.damage.total_damage_taken)}),(0,s.jsxs)("div",{className:(0,w.cn)("flex flex-col",d),children:[(0,s.jsx)(A,{teamColor:h.current,isWin:N.current,data:G,participantId:m,isRemake:b.current,isOPScoreActive:O,showGold:C,showAugments:C,showWards:!C,showCs:!C,highestDamageDealt:W,highestDamageTaken:B}),!b.current&&(0,s.jsxs)("div",{className:"flex flex-col items-center justify-between border-y border-gray-200 bg-gray-100 px-4 py-2 md:flex-row",children:[(0,s.jsx)(y,{data:P,isWin:N.current,metaVersion:null==E?void 0:E.meta_version}),(0,s.jsxs)("div",{className:"my-[6px] text-white md:m-0",children:[(0,s.jsxs)("div",{className:"relative m-auto w-[300px] md:w-[383px]",children:[(0,s.jsx)(c.A,{value:P.game_stat.kill,totalValue:V.game_stat.kill+P.game_stat.kill,className:"h-[16px] w-full text-[11px] ".concat(N.current?"!bg-[var(--color-red-700)]":"!bg-[var(--color-main-700)]"),color:N.current?"bg-[var(--color-main-700)]":"bg-[var(--color-red-700)]"}),(0,s.jsx)("div",{className:"absolute left-[8px] top-0 text-[11px] leading-[16px]",children:P.game_stat.kill.toLocaleString()}),(0,s.jsx)("div",{className:"absolute left-1/2 top-0 -translate-x-1/2 transform text-[11px] leading-[16px]",children:x("total_kills")}),(0,s.jsx)("div",{className:"absolute right-[8px] top-0 text-[11px] leading-[16px]",children:V.game_stat.kill.toLocaleString()})]}),(0,s.jsxs)("div",{className:"relative my-auto mt-1 w-[300px] md:w-[383px]",children:[(0,s.jsx)(c.A,{value:P.game_stat.gold_earned,totalValue:V.game_stat.gold_earned+P.game_stat.gold_earned,className:"h-[16px] w-full text-[11px] ".concat(N.current?"!bg-[var(--color-red-700)]":"!bg-[var(--color-main-700)]"),color:N.current?"bg-[var(--color-main-700)]":"bg-[var(--color-red-700)]"}),(0,s.jsx)("div",{className:"absolute left-[8px] top-0 h-[16px] text-[11px] leading-[16px]",children:null==(a=P.game_stat.gold_earned)?void 0:a.toLocaleString()}),(0,s.jsx)("div",{className:"absolute left-1/2 top-0 -translate-x-1/2 transform text-[11px] leading-[16px]",children:x("total_gold")}),(0,s.jsx)("div",{className:"absolute right-[8px] top-0 text-[11px] leading-[16
1px]",children:V.game_stat.gold_earned.toLocaleString()})]})]}),(0,s.jsx)(y,{data:V,isWin:!N.current,metaVersion:null==E?void 0:E.meta_version,reverse:!0})]}),(0,s.jsx)(A,{teamColor:"RED"===h.current?"BLUE":"RED",isWin:k.current["RED"===h.current?"BLUE":"RED"],data:T,participantId:m,isRemake:b.current,isOPScoreActive:O,showGold:C,showAugments:C,showWards:!C,showCs:!C,highestDamageDealt:W,highestDamageTaken:B})]})},y=e=>{let{data:a,isWin:t,reverse:l,metaVersion:r}=e,n=t?"text-main-500":"text-red-500",o=(0,i.useTranslations)(),{game_stat:c}=a,d="flex content-center gap-1 text-[12px] text-gray-500",m="min-w-[14px] text-center";return(0,s.jsxs)("ul",{className:(0,w.cn)("flex gap-x-1 md:max-w-[150px] md:flex-wrap",l&&"justify-end"),children:[(0,s.jsxs)("li",{className:d,"data-tooltip-id":"opgg-tooltip","data-tooltip-content":o("GameObjectives.baron"),children:[(0,s.jsx)(g.ID,{className:n}),(0,s.jsx)("span",{className:m,children:c.baron_kill})]}),(0,s.jsxs)("li",{className:d,"data-tooltip-id":"opgg-tooltip","data-tooltip-content":o("GameObjectives.dragon"),children:[(0,s.jsx)(g.jC,{className:n}),(0,s.jsx)("span",{className:m,children:c.dragon_kill})]}),(0,s.jsxs)("li",{className:d,"data-tooltip-id":"opgg-tooltip","data-tooltip-content":o("GameObjectives.rift_herald"),children:[(0,s.jsx)(g.Q6,{className:n}),(0,s.jsx)("span",{className:m,children:c.rift_herald_kill})]}),r<"16.01"&&(0,s.jsxs)("li",{className:d,"data-tooltip-id":"opgg-tooltip","data-tooltip-content":o("GameObjectives.atakhan"),children:[(0,s.jsx)(g.f3,{className:n}),(0,s.jsx)("span",{className:m,children:c.atakhan_kill})]}),(0,s.jsxs)("li",{className:d,"data-tooltip-id":"opgg-tooltip","data-tooltip-content":o("GameObjectives.horde"),children:[(0,s.jsx)(g.wX,{className:n}),(0,s.jsx)("span",{className:m,children:c.horde_kill})]}),(0,s.jsxs)("li",{className:d,"data-tooltip-id":"opgg-tooltip","data-tooltip-content":o("GameObjectives.tower"),children:[(0,s.jsx)(g.Xz,{className:n}),(0,s.jsx)("span",{className:m,children:c.tower_kill})]}),(0,s.jsxs)("li",{className:d,"data-tooltip-id":"opgg-tooltip","data-tooltip-content":o("GameObjectives.inhibitor"),children:[(0,s.jsx)(g.eL,{className:n}),(0,s.jsx)("span",{className:m,children:c.inhibitor_kill})]})]})},A=e=>{let{teamColor:a,isWin:t,isRemake:l,data:r,participantId:n,isOPScoreActive:g,showGold:u,showAugments:j,showWards:f,showCs:k,highestDamageDealt:y,highestDamageTaken:A}=e,E=(0,i.useTranslations)("Game"),L=(0,i.useTranslations)("Tier"),D=l?(0,w.cn)("!bg-gray-100"):t?(0,w.cn)("!bg-main-100"):(0,w.cn)("!bg-red-100"),R=l?(0,w.cn)("!bg-gray-200"):t?(0,w.cn)("!bg-main-200"):(0,w.cn)("!bg-red-200"),S=Array.isArray(r)?r:[],C=100;return S.forEach(e=>{e.stats.op_score_rank<C&&(C=e.stats.op_score_rank)}),(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(h.default,{className:"w-full min-w-[740px] text-[11px] text-gray-500",children:[(0,s.jsxs)("colgroup",{children:[(0,s.jsx)("col",{className:"w-auto"}),(0,s.jsx)("col",{className:"w-[68px]"}),(0,s.jsx)("col",{className:"w-[98px]"}),(0,s.jsx)("col",{className:"w-[100px]"}),f&&(0,s.jsx)("col",{className:"w-[48px]"}),u&&(0,s.jsx)("col",{className:"w-[56px]"}),k&&(0,s.jsx)("col",{className:"w-[56px]"}),(0,s.jsx)("col",{className:"w-[195px]"})]}),(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsxs)("th",{scope:"col",className:"!rounded-none !bg-gray-0 text-left md:rounded",children:[(0,s.jsx)("span",{className:"mr-[4px] font-bold ".concat(t?"text-main-500":"text-red-500"),children:t?E("title_victory"):E("title_defeat")}),"(",E("RED"===a?"team_red":"team_blue"),")"]}),(0,s.jsx)("th",{scope:"col",className:"!bg-gray-0",children:g&&"OP Score"}),(0,s.jsx)("th",{scope:"col",className:"!bg-gray-0",children:"KDA"}),(0,s.jsx)("th",{scope:"col",className:"!bg-gray-0",children:E("table_damage")}),f&&(0,s.jsx)("th",{scope:"col",className:"!bg-gray-0",children:E("table_wards")}),u&&(0,s.jsx)("th",{scope:"col",className:"!bg-gray-0",children:E("table_gold")}),k&&(0,s.jsx)("th",{scope:"col",className:"!bg-gray-0",children:"CS"}),(0,s.jsx)("th",{scope:"col",className:"!bg-gray-0",children:E("table_items")})]})}),(0,s.jsx)("tbody",{children:S.map((e,a)=>{var i,r;let h=e.participant_id===n?R:D,S=(null==(i=e.tier_info)?void 0:i.value)?(0,b.Ck)({tier:e.tier_info.value,division:e.tier_info.division,lp:e.tier_info.lp},e=>L("tier",{tier:e.toLowerCase()})):"";return(0,s.jsxs)("tr",{className:"!border-b-0",children:[(0,s.jsx)("td",{className:h,children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[j?(0,s.jsx)(x.A,{isSmall:!0,augments:e.augments,augmentLimit:4,augmentMetaType:"aram-augment",championData:{key:e.champion.key,image_url:e.champion.image_url,name:e.champion.name,champion_level:e.stats.champion_level},spells:e.spells}):(0,s.jsx)(m.A,{championData:e.champion,spells:e.spells,runes:e.runes,targetSelf:!0,isSmall:!0}),(0,s.jsxs)("div",{className:"flex max-w-[90px] flex-col",children:[(0,s.jsxs)("div",{className:"flex max-w-[80px] items-center gap-1",children:[(0,s.jsx)(o.Ay.Role,{role:null==e?void 0:e.summoner_role}),(0,s.jsx)(v.N_,{href:"".concat(e.url_profile),target:"_blank",rel:"noreferrer",className:"flex-1 cursor-pointer truncate text-[12px] leading-[16
1px] text-gray-900","data-tooltip-id":"opgg-tooltip","data-tooltip-content":"".concat(e.game_name," #").concat(e.tagline),children:e.game_name})]}),e.tier_info&&(0,s.jsxs)("div",{className:"flex items-center gap-1 whitespace-nowrap",children:[e.tier_info.tier_mini_image_url&&(0,s.jsx)(N.default,{className:"basis-4",src:e.tier_info.tier_mini_image_url,width:16,height:16,alt:""}),(0,s.jsx)("span",{className:"leading-[14px] text-gray-600","data-tooltip-id":"opgg-tooltip","data-tooltip-content":((e,a)=>e.value?(0,b.Ck)({tier:e.value,division:e.division,lp:e.lp},e=>a("tier",{tier:e.toLowerCase()})):null)(e.tier_info,L),children:S||(e.tier_info.level?"Level ".concat(e.tier_info.level.toLocaleString()):" ")})]})]})]})}),(0,s.jsx)("td",{className:h,children:g&&(0,s.jsx)("div",{className:"flex items-center gap-1",children:!l&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"min-w-[20px] text-[12px] font-bold italic leading-[22px] text-gray-900",children:e.stats.op_score}),(0,s.jsx)(o.Ay.OpScoreRank,{opScoreRank:t&&e.stats.op_score_rank===C?"MVP":e.stats.op_score_rank===C?"ACE":e.stats.op_score_rank})]})})}),(0,s.jsxs)("td",{className:h,children:[(0,s.jsxs)("span",{className:"inline-block w-full text-center leading-[14px]",children:[e.stats.kda.kill,"/",e.stats.kda.death,"/",e.stats.kda.assist,(0,s.jsxs)("span",{className:"ml-1","data-tooltip-id":"opgg-tooltip","data-tooltip-content":E("kill_participation"),children:["(",e.stats.killParticipation,"%)"]})]}),(0,s.jsx)(_.A,{data:e.stats.kda,hasText:!1,className:"text-center font-bold leading-[14px]"})]}),(0,s.jsx)("td",{className:h,children:(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsxs)("div",{"data-tooltip-id":"opgg-tooltip","data-tooltip-content":"".concat(E("title_damage_dealt")," ").concat(e.damage.total_damage_dealt_to_champions.toLocaleString()),children:[(0,s.jsx)("div",{className:"text-center",children:e.damage.total_damage_dealt_to_champions.toLocaleString()}),(0,s.jsx)(c.A,{value:e.damage.total_damage_dealt_to_champions,totalValue:y,className:"h-[6px] w-[40px]",color:"bg-red-500"})]}),(0,s.jsxs)("div",{"data-tooltip-id":"opgg-tooltip","data-tooltip-content":"".concat(E("title_damage_taken")," ").concat(e.damage.total_damage_taken.toLocaleString()),children:[(0,s.jsx)("div",{className:"text-center",children:e.damage.total_damage_taken.toLocaleString()}),(0,s.jsx)(c.A,{value:e.damage.total_damage_taken,totalValue:A,className:"h-[6px] w-[40px]",color:"bg-gray-400"})]})]})}),f&&(0,s.jsx)("td",{className:h,children:(0,s.jsxs)("div",{className:"flex flex-col items-center","data-tooltip-id":"opgg-tooltip","data-tooltip-html":"\n <div>\n <div>\n <span>".concat(E("tooltip_control_ward"),":</span>\n <span>").concat(e.ward.vision_score,"</span>\n </div>\n <div>\n <span>").concat(E("tooltip_ward_placed"),":</span>\n <span>").concat(e.ward.ward_place,"</span>\n </div>\n <div>\n <span>").concat(E("tooltip_ward_kill"),":</span>\n <span>").concat(e.ward.ward_kill,"</span>\n </div>\n </div>\n "),children:[(0,s.jsx)("div",{className:"text-center leading-[14px]",children:e.ward.vision_score}),(0,s.jsxs)("div",{className:"text-center leading-[14px]",children:[e.ward.ward_place," / ",e.ward.ward_kill]})]})}),u&&(0,s.jsx)("td",{className:"".concat(h," text-center"),children:(null==(r=e.stats.gold_earned)?void 0:r.toLocaleString())||"-"}),k&&(0,s.jsx)("td",{className:h,children:(0,s.jsxs)("div",{className:"flex flex-col items-center",children:[(0,s.jsx)("div",{className:"text-center leading-[14px]",children:e.stats.cs.totalCs}),(0,s.jsx)("div",{className:"text-center leading-[14px]",children:E("unit_per_minute",{count:e.stats.cs.csPerMin})})]})}),(0,s.jsx)("td",{className:(0,w.cn)(h,(0,d.Qt)(l?"REMAKE":t?"WIN":"LOSE")),children:(0,s.jsx)(p.A,{items:e.items,al
1ign:"center"})})]},a)})})]})})}}}]);
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.