PageSourceSearch

https://tomato.gg/assets/Contacts-9z2Xw7uW.js

js tomato.gg collected 2026-10-04 05:24:40 UTC 198,478 bytes, 19 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/nivo-radar.es-Dlr1Rkgd.js","assets/index-D6h6POgK.js","assets/index-CN_6aBzh.css","assets/nivo-core.es-CyZM7F2I.js","assets/string-B6NtwyIl.js","assets/_defineProperty-Bz5qGQ-b.js","assets/_isIterateeCall-rO7taIQZ.js","assets/_baseAssignValue-D68-QOrz.js","assets/sortBy-D2IqbDWA.js","assets/identity-CdjJNdvM.js","assets/_initCloneObject-CFOa3ZOr.js","assets/isArrayLikeObject-D5XUxk-U.js","assets/get-DrasMaYq.js","assets/_arrayIncludesWith-XJRwRZaz.js","assets/isEqual-BkuW0-GO.js","assets/nivo-legends.es-BMCEJFtR.js","assets/linear-dN3TQtjf.js","assets/line-nH_P9Ild.js","assets/array-2GBN5xbU.js","assets/arc-Ct_Gm4oV.js","assets/nivo-pie.es-D-n0wKAa.js"])))=>i.map(i=>d[i]);
2import{r as a,E as he,t as o,bi as qe,j as e,d as s,aN as wa,ah as Ge,ai as w,a_ as _a,g as Tt,R as Et,et as un,c as ut,aT as ja,aP as Ca,aO as Te,o as ge,f3 as xn,H as He,bN as ka,bP as Ma,bQ as Aa,eX as fn,s as yn,ag as fe,dp as tt,bU as bn,a6 as vn,f as at,am as Na,aL as Oe,F as wn,ac as Pe,b5 as Fe,bk as Rt,di as jt,bO as Vt,e0 as _n}from"./index-D6h6POgK.js";import{b as F,c as pe,W as jn,P as Ke}from"./colors-Ceb-GOgv.js";import{c as Sa}from"./LazyClient-0EXbxws4.js";import{r as Ia}from"./CaretUp.es-MYJkyHlG.js";import{m as Ha}from"./Columns.es-C8tS_i_C.js";import{c as Ie}from"./checkbox-CXozvUR0.js";import{P as ct,s as dt,i as mt}from"./popover-qRX0UrQs.js";import{p as pt,l as Le}from"./segmented-control-ByddHzZN.js";import{s as Cn,p as kn,g as Mn,m as An}from"./dialog-jIHZetbs.js";import{c as Nn,u as Sn,g as In,d as Hn}from"./stats_._id._server-Bs_64YxB.js";import{OnslaughtProgressionChart as Ln}from"./OnslaughtProgression-qPzEWo8u.js";import{Q as Wn}from"./index-CzUsbNwf.js";import{a as Tn}from"./EyeSlash.es-B5-5QJmE.js";import{r as Bt}from"./Users.es-BqQK1h3r.js";import{r as En}from"./ArrowCounterClockwise.es-BX5Yjz-K.js";import{o as Fn}from"./Table.es-BHQ3E6Pd.js";import{u as $n,c as Rn}from"./text-field-CcbYxTrh.js";import{e as Vn}from"./CrownSimple.es-JrlDBh9K.js";import{e as Bn}from"./Plus.es-Bf1pudYk.js";import{o as Zt}from"./Warning.es-mP_B8i_Y.js";import{b as Zn}from"./Battles-DPSdn82Y.js";import{u as zn,a as Dn,c as On,f as zt,d as Pn}from"./TableHeader-DPrR6COp.js";import{c as Ft}from"./LoadoutIcons-De0EfCBW.js";import{g as Gn}from"./BattleRow-JbT00rTz.js";import{g as qn}from"./getHasMod-CmtR--GA.js";import"./require-react-element-CTOcGALR.js";import"./heading-BNOh9qFR.js";import"./text-CKCwnA_l.js";import"./FadeIn-DOH9TqCL.js";import"./GenericPage-LB9a0fml.js";import"./usePlayerData-XBlMaULM.js";import"./Tabs-DaiEIOOI.js";import"./CurrencyBond-B4igGShQ.js";import"./CurrencyGold-D-_4Jwxh.js";import"./tablePagination-DAjGE-UK.js";import"./CaretRight.es-CR8YaoZ2.js";import"./Play.es-DvbIlFuu.js";import"./TankFilters2-DEKmmqEJ.js";import"./ArrowClockwise.es-C8elHHK1.js";import"./identity-CdjJNdvM.js";import"./TierFilter-DdnFT0y3.js";import"./FilterButton-G2ptpqqN.js";import"./CurrencyFreeXP-qu8Nu_Aw.js";import"./ServerTag-DrDZ1XQP.js";import"./CoachingPromo-D36Pw6Y7.js";import"./NonIdealState-D-PMB9yo.js";import"./SelectButtonGroup-EMxuxGvn.js";import"./TankFilter-F8KrLytI.js";import"./sortBy-D2IqbDWA.js";import"./_defineProperty-Bz5qGQ-b.js";import"./_isIterateeCall-rO7taIQZ.js";import"./isNil-B-KBnkDN.js";import"./mapIdMapping-CmDC4woi.js";import"./TankDialog-DLEkw-bU.js";import"./TankGridItem-BItQuocB.js";import"./get-DrasMaYq.js";import"./nivoTheme-CTD6JYPn.js";import"./PreferredStatsSelector-B73iHYjD.js";import"./cellStyle-DNh9v2D5.js";import"./Table-cc6qULRG.js";import"./BattlesCell-CaATnbaU.js";import"./Users.es-BLrzCgcf.js";import"./noop-BdyXNs-O.js";import"./uniqueId-DHQDEogl.js";import"./fieldModsIndex-Cxt7bWNz.js";import"./_baseClone-CcwhEKUA.js";import"./_initCloneObject-CFOa3ZOr.js";import"./_baseAssignValue-D68-QOrz.js";import"./Share.es-Ch-_Ryea.js";import"./InlineWN8Label-Bhm6sTcx.js";import"./types-BPQfMkr0.js";const Un=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z",opacity:"0.2"}),a.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z"}
2))]]),La=a.forwardRef((t,n)=>a.createElement(he,{ref:n,...t,weights:Un}));La.displayName="ArrowSquareOutIcon";const Yn=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216.88,207.93l-160-176A12,12,0,1,0,39.12,48.07l14.8,16.29A83.58,83.58,0,0,0,44,104c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.68,186,19.75,19.75,0,0,0,48,196H84.19a44,44,0,0,0,87.62,0h1.79l25.52,28.07a12,12,0,0,0,17.76-16.14ZM68,104a59.84,59.84,0,0,1,3.52-20.29L151.78,172H54.68C63.52,154,68,131.14,68,104Zm60,108a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM88.89,42.35a12,12,0,0,1,6.37-15.73A84,84,0,0,1,212,104c0,18.68,2.38,34.93,7.07,48.28a12,12,0,1,1-22.64,8C190.83,144.32,188,125.4,188,104a60,60,0,0,0-83.38-55.28A12,12,0,0,1,88.89,42.35Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),a.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L58.82,63.8A79.59,79.59,0,0,0,48,104c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.8a40,40,0,0,0,78.4,0h15.44l19.44,21.38a8,8,0,1,0,11.84-10.76ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a63.65,63.65,0,0,1,6.26-27.62L168.09,184Zm166-4.73a8.13,8.13,0,0,1-2.93.55,8,8,0,0,1-7.44-5.08C196.35,156.19,192,129.75,192,104A64,64,0,0,0,96.43,48.31a8,8,0,0,1-7.9-13.91A80,80,0,0,1,208,104c0,35.35,8.05,58.59,10.52,64.88A8,8,0,0,1,214,179.25Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M221.84,192v0a1.85,1.85,0,0,1-3,.28L83.27,43.19a4,4,0,0,1,.8-6A79.55,79.55,0,0,1,129.17,24C173,24.66,207.8,61.1,208,104.92c.14,34.88,8.31,61.54,13.82,71A15.89,15.89,0,0,1,221.84,192Zm-7.92,18.62a8,8,0,0,1-11.85,10.76L182.62,200H167.16a40,40,0,0,1-78.41,0H47.91a15.78,15.78,0,0,1-13.59-7.59,16.42,16.42,0,0,1-.09-16.68c5.55-9.73,13.7-36.64,13.7-71.73A79.42,79.42,0,0,1,58.79,63.85L42,45.38A8,8,0,1,1,53.84,34.62ZM150.59,200H105.32a24,24,0,0,0,45.27,0Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L61.31,63.56A77.45,77.45,0,0,0,50,104c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198h42.5a38,38,0,0,0,75,0h18l20,22a6,6,0,0,0,8.88-8.08ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218ZM48,186a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.86,170,62,139.69,62,104a65.63,65.63,0,0,1,7.78-31.12L172.62,186Zm165.29-8.62a5.88,5.88,0,0,1-2.2.42,6,6,0,0,1-5.58-3.81c-7.2-18.31-11.49-44.48-11.49-70A66,66,0,0,0,95.45,46.57a6,6,0,1,1-5.93-10.43A78,78,0,0,1,206,104c0,35.7,8.16,59.24,10.66,65.61A6,6,0,0,1,213.27,177.38Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L58.82,63.8A79.59,79.59,0,0,0,48,104c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.8a40,40,0,0,0,78.4,0h15.44l19.44,21.38a8,8,0,1,0,11.84-10.76ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a63.65,63.65,0,0,1,6.26-27.62L168.09,184Zm166-4.73a8.13,8.13,0,0,1-2.93.55,8,8,0,0,1-7.44-5.08C196.35,156.19,192,129.75,192,104A64,64,0,0,0,96.43,48.31a8,8,0,0,1-7.9-13.91A80,80,0,0,1,208,104c0,35.35,8.05,58.59,10.52,64.88A8,8,0,0,1,214,179.25Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L63.8,63.32A75.52,75.52,0,0,0,52,104c0,36.13-8.58,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0h20.64L205,218.69a4,4,0,1,0,5.92-5.38ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220ZM48,188a3.89,3.89,0,0,1-3.43-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a67.58,67.58,0,0,1,9.4-34.51L177.14,188Zm164.55-12.48a3.94,3.94,0,0,1-1.46.28,4,4,0,0,1-3.72-2.54C200.24,155.17,196,129.28,196,104A68,68,0,0,0,94.46,44.83a4,4,0,1,1-4-6.95A76,76,0,0,1,204,104c0,36.05,8.26,59.89,10.79,66.34A4,4,0,0,1,212.53,175.52Z"}))]]),Wa=a.forwardRef((t,n)=>a.createElement(he,{ref:n,...t,weights:Yn}));Wa.displayName="BellSlashIcon";const Kn=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),a.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}
2))]]),Ta=a.forwardRef((t,n)=>a.createElement(he,{ref:n,...t,weights:Kn}));Ta.displayName="CheckCircleIcon";const Xn=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),a.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z"}))]]),Ht=a.forwardRef((t,n)=>a.createElement(he,{ref:n,...t,weights:Xn}));Ht.displayName="DownloadSimpleIcon";const Qn=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M112,148a12,12,0,0,0-12,12v19L69.17,148.2A4,4,0,0,1,68,145.37V97.94a36,36,0,1,0-24,0v47.43a27.81,27.81,0,0,0,8.2,19.8L83,196H64a12,12,0,0,0,0,24h48a12,12,0,0,0,12-12V160A12,12,0,0,0,112,148ZM56,52A12,12,0,1,1,44,64,12,12,0,0,1,56,52ZM212,158.06V110.63a27.81,27.81,0,0,0-8.2-19.8L173,60h19a12,12,0,0,0,0-24H144a12,12,0,0,0-12,12V96a12,12,0,0,0,24,0V77l30.83,30.83a4,4,0,0,1,1.17,2.83v47.43a36,36,0,1,0,24,0ZM200,204a12,12,0,1,1,12-12A12,12,0,0,1,200,204Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M80,64A24,24,0,1,1,56,40,24,24,0,0,1,80,64ZM200,168a24,24,0,1,0,24,24A24,24,0,0,0,200,168Z",opacity:"0.2"}),a.createElement("path",{d:"M112,152a8,8,0,0,0-8,8v28.69L66.34,151A8,8,0,0,1,64,145.37V95a32,32,0,1,0-16,0v50.38a23.85,23.85,0,0,0,7,17L92.69,200H64a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V160A8,8,0,0,0,112,152ZM40,64A16,16,0,1,1,56,80,16,16,0,0,1,40,64Zm168,97V110.63a23.85,23.85,0,0,0-7-17L163.31,56H192a8,8,0,0,0,0-16H144a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31L189.66,105a8,8,0,0,1,2.34,5.66V161a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,200,208Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M118.18,213.08c-.11.14-.24.27-.36.4l-.16.18-.17.15a4.83,4.83,0,0,1-.42.37,3.92,3.92,0,0,1-.32.25l-.3.22-.38.23a2.91,2.91,0,0,1-.3.17l-.37.19-.34.15-.36.13a2.84,2.84,0,0,1-.38.13l-.36.1c-.14,0-.26.07-.4.09l-.42.07-.35.05a7,7,0,0,1-.79,0H64a8,8,0,0,1,0-16H92.69L55,162.34a23.85,23.85,0,0,1-7-17V95a32,32,0,1,1,16,0v50.38A8,8,0,0,0,66.34,151L104,188.69V160a8,8,0,0,1,16,0v48a7,7,0,0,1,0,.8c0,.11,0,.21,0,.32s0,.3-.07.46a2.83,2.83,0,0,1-.09.37c0,.13-.06.26-.1.39s-.08.23-.12.35l-.14.39-.15.31c-.06.13-.12.27-.19.4s-.11.18-.16.28l-.24.39-.21.28ZM208,161V110.63a23.85,23.85,0,0,0-7-17L163.31,56H192a8,8,0,0,0,0-16H143.82l-.6,0c-.14,0-.28,0-.41.06l-.37,0-.43.11-.33.08-.4.14-.34.13-.35.16-.36.18a3.14,3.14,0,0,0-.31.18c-.12.07-.25.14-.36.22a3.55,3.55,0,0,0-.31.23,3.81,3.81,0,0,0-.32.24c-.15.12-.28.24-.42.37l-.17.15-.16.18c-.12.13-.25.26-.36.4l-.26.35-.21.28-.24.39c-.05.1-.11.19-.16.28s-.13.27-.19.4l-.15.31-.14.39c0,.12-.09.23-.12.35s-.07.26-.1.39a2.83,2.83,0,0,0-.09.37c0,.16,0,.31-.07.46s0,.21-.05.32a7,7,0,0,0,0,.8V96a8,8,0,0,0,16,0V67.31L189.66,105a8,8,0,0,1,2.34,5.66V161a32,32,0,1,0,16,0Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M112,154a6,6,0,0,0-6,6v33.52L64.93,152.44A9.93,9.93,0,0,1,62,145.37v-52a30,30,0,1,0-12,0v52a21.88,21.88,0,0,0,6.44,15.56L97.52,202H64a6,6,0,0,0,0,12h48a6,6,0,0,0,6-6V160A6,6,0,0,0,112,154ZM38,64A18,18,0,1,1,56,82,18,18,0,0,1,38,64Zm168,98.6v-52a21.88,21.88,0,0,0-6.44-15.56L158.48,54H192a6,6,0,0,0,0-12H144a6,6,0,0,0-6,6V96a6,6,0,0,0,12,0V62.48l41.07,41.08a9.93,9.93,0,0,1,2.93,7.07v52a30,30,0,1,0,12,0ZM200,210a18,18,0,1,1,18-18A18,18,0,0,1,200,210Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M112,152a8,8,0,0,0-8,8v28.69
2L66.34,151A8,8,0,0,1,64,145.37V95a32,32,0,1,0-16,0v50.38a23.85,23.85,0,0,0,7,17L92.69,200H64a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V160A8,8,0,0,0,112,152ZM40,64A16,16,0,1,1,56,80,16,16,0,0,1,40,64Zm168,97V110.63a23.85,23.85,0,0,0-7-17L163.31,56H192a8,8,0,0,0,0-16H144a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31L189.66,105a8,8,0,0,1,2.34,5.66V161a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,200,208Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M112,156a4,4,0,0,0-4,4v38.34L63.51,153.86A12,12,0,0,1,60,145.37V91.71a28,28,0,1,0-8,0v53.66a19.85,19.85,0,0,0,5.86,14.14L102.34,204H64a4,4,0,0,0,0,8h48a4,4,0,0,0,4-4V160A4,4,0,0,0,112,156ZM36,64A20,20,0,1,1,56,84,20,20,0,0,1,36,64ZM204,164.29V110.63a19.85,19.85,0,0,0-5.86-14.14L153.66,52H192a4,4,0,0,0,0-8H144a4,4,0,0,0-4,4V96a4,4,0,0,0,8,0V57.66l44.49,44.48a12,12,0,0,1,3.51,8.49v53.66a28,28,0,1,0,8,0ZM200,212a20,20,0,1,1,20-20A20,20,0,0,1,200,212Z"}))]]),Ea=a.forwardRef((t,n)=>a.createElement(he,{ref:n,...t,weights:Qn}));Ea.displayName="GitDiffIcon";const Jn=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M87.5,151.52l64-64a12,12,0,0,1,17,17l-64,64a12,12,0,0,1-17-17Zm131-114a60.08,60.08,0,0,0-84.87,0L103.51,67.61a12,12,0,0,0,17,17l30.07-30.06a36,36,0,0,1,50.93,50.92L171.4,135.52a12,12,0,1,0,17,17l30.08-30.06A60.09,60.09,0,0,0,218.45,37.55ZM135.52,171.4l-30.07,30.08a36,36,0,0,1-50.92-50.93l30.06-30.07a12,12,0,0,0-17-17L37.55,133.58a60,60,0,0,0,84.88,84.87l30.06-30.07a12,12,0,0,0-17-17Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M209.94,113.94l-96,96a48,48,0,0,1-67.88-67.88l96-96a48,48,0,0,1,67.88,67.88Z",opacity:"0.2"}),a.createElement("path",{d:"M165.66,90.34a8,8,0,0,1,0,11.32l-64,64a8,8,0,0,1-11.32-11.32l64-64A8,8,0,0,1,165.66,90.34ZM215.6,40.4a56,56,0,0,0-79.2,0L106.34,70.45a8,8,0,0,0,11.32,11.32l30.06-30a40,40,0,0,1,56.57,56.56l-30.07,30.06a8,8,0,0,0,11.31,11.32L215.6,119.6a56,56,0,0,0,0-79.2ZM138.34,174.22l-30.06,30.06a40,40,0,1,1-56.56-56.57l30.05-30.05a8,8,0,0,0-11.32-11.32L40.4,136.4a56,56,0,0,0,79.2,79.2l30.06-30.07a8,8,0,0,0-11.32-11.31Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM144.56,173.66l-21.45,21.45a44,44,0,0,1-62.22-62.22l21.45-21.46a8,8,0,0,1,11.32,11.31L72.2,144.2a28,28,0,0,0,39.6,39.6l21.45-21.46a8,8,0,0,1,11.31,11.32Zm-34.9-16a8,8,0,0,1-11.32-11.32l48-48a8,8,0,0,1,11.32,11.32Zm85.45-34.55-21.45,21.45a8,8,0,0,1-11.32-11.31L183.8,111.8a28,28,0,0,0-39.6-39.6L122.74,93.66a8,8,0,0,1-11.31-11.32l21.46-21.45a44,44,0,0,1,62.22,62.22Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M164.25,91.75a6,6,0,0,1,0,8.49l-64,64a6,6,0,0,1-8.49-8.48l64-64A6,6,0,0,1,164.25,91.75ZM214.2,41.8a54.07,54.07,0,0,0-76.38,0L107.75,71.85a6,6,0,0,0,8.49,8.49l30.07-30.06a42,42,0,0,1,59.41,59.41l-30.08,30.07a6,6,0,1,0,8.49,8.49l30.07-30.07A54,54,0,0,0,214.2,41.8ZM139.76,175.64l-30.07,30.08a42,42,0,0,1-59.41-59.41l30.06-30.07a6,6,0,0,0-8.49-8.49l-30,30.07a54,54,0,0,0,76.38,76.39l30.07-30.08a6,6,0,0,0-8.49-8.49Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M165.66,90.34a8,8,0,0,1,0,11.32l-64,64a8,8,0,0,1-11.32-11.32l64-64A8,8,0,0,1,165.66,90.34ZM215.6,40.4a56,56,0,0,0-79.2,0L106.34,70.45a8,8,0,0,0,11.32,11.32l30.06-30a40,40,0,0,1,56.57,56.56l-30.07,30.06a8,8,0,0,0,11.31,11.32L215.6,119.6a56,56,0,0,0,0-79.2ZM138.34,174.22l-30.06,30.06a40,40,0,1,1-56.56-56.57l30.05-30.05a8,8,0,0,0-11.32-11.32L40.4,136.4a56,56,0,0,0,79.2,79.2l30.06-30.07a8,8,0,0,0-11.32-11.31Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M162.84,93.16a4,4,0,0,1,0,5.66l-64,64a4,4,0,0,1-5.66-5.66l64-64A4,4,0,0,1,162.84,93.16Zm49.95-49.95a52.07,52.07,0,0,0-73.56,0L109.17,73.27a4,4,0,0,0,5.65,5.66l30.07-30.06a44,44,0,0,1,62.24,62.24l-30.07,30.06a4,4,0,0,0,5.66,5.66l30.07-30.06A52.07,52.07,0,0,0,212.79,43.21ZM141.17,177.06l-30.06,30.07a44,44,0,0,1-62.24-62.24l30.06-30.06a4,4,0,0,0-5.66-5.66L43.21,139.23a52,52,0,0,0,73.56,73.56l30.06-30.07a4,4,0,1,0-5.66-5.66Z"}
2))]]),Fa=a.forwardRef((t,n)=>a.createElement(he,{ref:n,...t,weights:Jn}));Fa.displayName="LinkSimpleIcon";const eo=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm84,108a83.6,83.6,0,0,1-16.75,50.28L77.72,60.75A84,84,0,0,1,212,128ZM44,128A83.6,83.6,0,0,1,60.75,77.72L178.28,195.25A84,84,0,0,1,44,128Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),a.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.56,87.56,0,0,1-20.41,56.28L71.72,60.4A88,88,0,0,1,216,128ZM40,128A87.56,87.56,0,0,1,60.41,71.72L184.28,195.6A88,88,0,0,1,40,128Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M200,128a71.69,71.69,0,0,1-15.78,44.91L83.09,71.78A71.95,71.95,0,0,1,200,128ZM56,128a71.95,71.95,0,0,0,116.91,56.22L71.78,83.09A71.69,71.69,0,0,0,56,128Zm180,0A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-20,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm90,102a89.6,89.6,0,0,1-22.29,59.22L68.78,60.29A89.95,89.95,0,0,1,218,128ZM38,128A89.6,89.6,0,0,1,60.29,68.78L187.22,195.71A89.95,89.95,0,0,1,38,128Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.56,87.56,0,0,1-20.41,56.28L71.72,60.4A88,88,0,0,1,216,128ZM40,128A87.56,87.56,0,0,1,60.41,71.72L184.28,195.6A88,88,0,0,1,40,128Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm92,100a91.67,91.67,0,0,1-24.21,62.13L65.87,60.21A92,92,0,0,1,220,128ZM36,128A91.67,91.67,0,0,1,60.21,65.87L190.13,195.79A92,92,0,0,1,36,128Z"}))]]),$a=a.forwardRef((t,n)=>a.createElement(he,{ref:n,...t,weights:eo}));$a.displayName="ProhibitIcon";const to=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M244,128a12,12,0,0,1-12,12H207.42l-36.69,73.37A12,12,0,0,1,160,220h-.6a12,12,0,0,1-10.61-7.72L95,71.15,66.92,133A12,12,0,0,1,56,140H24a12,12,0,0,1,0-24H48.27L85.08,35a12,12,0,0,1,22.13.7l54.28,142.46,27.78-55.56A12,12,0,0,1,200,116h32A12,12,0,0,1,244,128Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M96,40l33.52,88H56Zm104,88H129.52L160,208Z",opacity:"0.2"}),a.createElement("path",{d:"M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-8,96H188.64L159,188a8,8,0,0,1-6.95,4h-.46a8,8,0,0,1-6.89-4.84L103,89.92,79,132a8,8,0,0,1-7,4H48a8,8,0,0,1,0-16H67.36L97.05,68a8,8,0,0,1,14.3.82L153,166.08l24-42.05a8,8,0,0,1,6.95-4h24a8,8,0,0,1,0,16Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M238,128a6,6,0,0,1-6,6H203.71l-38.34,76.68A6,6,0,0,1,160,214h-.3a6,6,0,0,1-5.31-3.85L95.51,55.57,61.46,130.48A6,6,0,0,1,56,134H24a6,6,0,0,1,0-12H52.14l38.4-84.48a6,6,0,0,1,11.07.34L160.74,193.1l33.89-67.78A6,6,0,0,1,200,122h32A6,6,0,0,1,238,128Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M236,128a4,4,0,0,1-4,4H202.47l-38.89,77.79A4,4,0,0,1,160,212h-.2a4,4,0,0,1-3.54-2.58l-60.59-159-36,79.28A4,4,0,0,1,56,132H24a4,4,0,0,1,0-8H53.42L92.36,38.35a4,4,0,0,1,7.38.23L160.5,198.06l35.92-71.85A4,4,0,0,1,200,124h32A4,4,0,0,1,236,128Z"}
2))]]),Ra=a.forwardRef((t,n)=>a.createElement(he,{ref:n,...t,weights:to}));Ra.displayName="PulseIcon";const ao=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M208,136H48a20,20,0,0,0-20,20v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V156A20,20,0,0,0,208,136Zm-4,52H52V160H204Zm4-144H48A20,20,0,0,0,28,64v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm-4,52H52V68H204Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,152v40a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8H208A8,8,0,0,1,216,152Zm-8-96H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V64A8,8,0,0,0,208,56Z",opacity:"0.2"}),a.createElement("path",{d:"M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,152v40a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V152a16,16,0,0,1,16-16H208A16,16,0,0,1,224,152ZM208,48H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M208,138H48a14,14,0,0,0-14,14v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V152A14,14,0,0,0,208,138Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2ZM208,50H48A14,14,0,0,0,34,64v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V64A14,14,0,0,0,208,50Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M208,140H48a12,12,0,0,0-12,12v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V152A12,12,0,0,0,208,140Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4ZM208,52H48A12,12,0,0,0,36,64v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V64A12,12,0,0,0,208,52Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"}))]]),Va=a.forwardRef((t,n)=>a.createElement(he,{ref:n,...t,weights:ao}));Va.displayName="RowsIcon";const no=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M40,92H70.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24H137.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24Zm64-24A12,12,0,1,1,92,80,12,12,0,0,1,104,68Zm112,96H201.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24h94.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24Zm-48,24a12,12,0,1,1,12-12A12,12,0,0,1,168,188Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,80a24,24,0,1,1-24-24A24,24,0,0,1,128,80Zm40,72a24,24,0,1,0,24,24A24,24,0,0,0,168,152Z",opacity:"0.2"}),a.createElement("path",{d:"M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M32,80a8,8,0,0,1,8-8H77.17a28,28,0,0,1,53.66,0H216a8,8,0,0,1,0,16H130.83a28,28,0,0,1-53.66,0H40A8,8,0,0,1,32,80Zm184,88H194.83a28,28,0,0,0-53.66,0H40a8,8,0,0,0,0,16H141.17a28,28,0,0,0,53.66,0H216a8,8,0,0,0,0-16Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M40,86H74.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12H133.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12Zm64-24A18,18,0,1,1,86,80,18,18,0,0,1,104,62ZM216,170H197.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12h98.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12Zm-48,24a18,18,0,1,1,18-18A18,18,0,0,1,168,194Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M40,84H76.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8H131.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8Zm64-24A20,20,0,1,1,84,80,20,20,0,0,1,104,60ZM216,172H195.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8H140.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8Zm-48,24a20,20,0,1,1,20-20A20,20,0,0,1,168,196Z"}
2))]]),Ba=a.forwardRef((t,n)=>a.createElement(he,{ref:n,...t,weights:no}));Ba.displayName="SlidersHorizontalIcon";const oo=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M100,36H56A20,20,0,0,0,36,56v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,100,36ZM96,96H60V60H96ZM200,36H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,60H160V60h36Zm-96,40H56a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,100,136Zm-4,60H60V160H96Zm104-60H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,200,136Zm-4,60H160V160h36Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M112,56v48a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8h48A8,8,0,0,1,112,56Zm88-8H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V56A8,8,0,0,0,200,48Zm-96,96H56a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,104,144Zm96,0H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,200,144Z",opacity:"0.2"}),a.createElement("path",{d:"M200,136H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48ZM104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M120,56v48a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40h48A16,16,0,0,1,120,56Zm80-16H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm-96,96H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm96,0H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M104,42H56A14,14,0,0,0,42,56v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,104,42Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm-98,34H56a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,104,138Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,200,138Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M104,44H56A12,12,0,0,0,44,56v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,104,44Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4ZM104,140H56a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,104,140Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,200,140Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Z"}))]]),Za=a.forwardRef((t,n)=>a.createElement(he,{ref:n,...t,weights:oo}));Za.displayName="SquaresFourIcon";const ro=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),a.createElement("path",{d:"M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}
2))]]),za=a.forwardRef((t,n)=>a.createElement(he,{ref:n,...t,weights:ro}));za.displayName="XCircleIcon";const $t=50,Dt=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e4?`${Math.round(t/1e3)}k`:t>=1e3?`${(t/1e3).toFixed(1)}k`:Math.round(t).toLocaleString(),io=t=>{if(!t)return"—";const n=Math.floor(Date.now()/1e3),i=Math.max(0,n-t);return i<3600?`${Math.max(1,Math.round(i/60))}m ago`:i<86400?`${Math.round(i/3600)}h ago`:i<86400*30?`${Math.round(i/86400)}d ago`:i<86400*365?`${Math.round(i/86400/30)}mo ago`:`${(i/86400/365).toFixed(1)}y ago`},so=t=>{if(!t)return"—";const n=(Date.now()/1e3-t)/(86400*365.25);return n<1?`${Math.round(n*12)}mo`:`${n.toFixed(1)}y`},lo=t=>{const n=(t.battles||0)-(t.survived_battles||0);return n<=0?null:(t.frags||0)/n},co=t=>t.battles?(t.xp||0)/t.battles:null,mo=t=>{const n=t.overallWn8??0,i=t.recentWn8??0;return!n||!i||(t.recentBattles??0)<$t?null:i-n},Ue=[{id:"skill",label:"Skill",rows:[{id:"overallWn8",label:"WN8",key:"overallWn8",tooltip:"Overall WN8 — expected damage / spotting / wins normalized per tank.",placeholderOnZero:!0,colorFn:F,pill:!0},{id:"recentWn8",label:"Recent WN8",key:"recentWn8",tooltip:"WN8 over the last 28 days. Requires at least 50 recent battles.",placeholderOnZero:!0,requiresRecent:!0,colorFn:F,pill:!0},{id:"deltaWn8",label:"Δ WN8",compute:mo,tooltip:"Recent WN8 minus Overall WN8. Positive = recent improvement, negative = recent slump.",placeholderOnZero:!1,requiresRecent:!0,format:t=>`${t>=0?"+":""}${Math.round(t).toLocaleString()}`,colorFn:t=>t>=50?o.green:t<=-50?o.red:o.gray3,pill:!0}]},{id:"recent",label:"Last 28 days",rows:[{id:"recentWinrate",label:"Recent WR",key:"recentWinrate",tooltip:"Winrate over the last 28 days. Requires 50+ recent battles.",decimals:2,suffix:"%",placeholderOnZero:!0,requiresRecent:!0,colorFn:pe,pill:!0},{id:"recentBattles",label:"Recent battles",key:"recentBattles",tooltip:"Battles in the last 28 days.",placeholderOnZero:!0,format:t=>Dt(t)},{id:"lastBattle",label:"Last battle",compute:t=>t.last_battle_time||null,tooltip:"Time since the contact's last battle.",format:t=>io(t)}]},{id:"career",label:"Career",rows:[{id:"battles",label:"Battles",key:"battles",tooltip:"Total random-battle count over the contact's lifetime.",format:t=>Dt(t)},{id:"winrate",label:"Winrate",key:"winrate",tooltip:"Lifetime winrate across all random battles.",decimals:2,suffix:"%",colorFn:pe,pill:!0},{id:"avgTier",label:"Avg tier",key:"overallAvgTier",tooltip:"Average tank tier across all battles played.",placeholderOnZero:!0,decimals:1},{id:"accountAge",label:"Account age",compute:t=>t.created_at||null,tooltip:"Time since the WG account was created.",format:t=>so(t)}]},{id:"average",label:"Per battle",rows:[{id:"avg_damage_dealt",label:"Avg DMG",key:"avg_damage_dealt",tooltip:"Average damage dealt per battle."},{id:"avg_damage_assisted",label:"Avg Assist",key:"avg_damage_assisted",tooltip:"Average assisted damage per battle (spotting + tracking + radio)."},{id:"hits_percents",label:"Hits %",key:"hits_percents",tooltip:"Percentage of shots that hit a target.",decimals:1,suffix:"%"},{id:"survival_rate",label:"Survival %",key:"survival_rate",tooltip:"Percentage of battles the contact survived.",decimals:1,suffix:"%"},{id:"kd",label:"K/D",compute:lo,tooltip:"Kills divided by deaths (battles − survived).",decimals:2},{id:"avgXp",label:"Avg XP",compute:co,tooltip:"Average XP earned per battle."},{id:"avg_battles_on_stunning_vehicles",label:"Arty %",key:"avg_battles_on_stunning_vehicles",tooltip:"Percentage of battles played in artillery (lower is better for non-arty mains).",decimals:1,suffix:"%",flipped:!0}]},{id:"records",label:"Personal records",rows:[{id:"max_damage",label:"Max DMG",key:"max_damage",tooltip:"Highest single-battle damage on record."},{id:"max_xp",label:"Max XP",key:"max_xp",tooltip:"Highest single-battle XP on record."},{id:"max_frags",label:"Max Frags",key:"max_frags",tooltip:"Most kills in a single battle."}]}];function Da(t,n){if(t.requiresRecent&&(n.recentBattles??0)<$t)return null;let i;if(t.compute)i=t.compute(n);else if(t.key){const d=n[t.key];i=typeof d=="number"?d:Number(d??0)}else i=null;return i==null||Number.isNaN(i)||t.placeholderOnZero&&i===0?null:i}function po(t,n,i){return t.format?t.format(n,i):t.decimals!=null?n.toFixed(t.decimals):Math.round(n).toLocaleStr
2ing()}const go=`Less than ${$t} recent battles — not enough data`,ho="compareRowVisibility",uo="compareGroupCollapsed";function Ct(){const t={};for(const n of Ue)for(const i of n.rows)t[i.id]=!0;return t}function Ot(){return Object.fromEntries(Ue.map(t=>[t.id,!1]))}function xo(){const[t,n]=qe(ho,Ct()),[i,d]=qe(uo,Ot()),g=a.useMemo(()=>{const m=Ct();for(const _ of Object.keys(t))_ in m&&(m[_]=t[_]);return m},[t]),u=a.useCallback(m=>{n(_=>({..._,[m]:!(_[m]??!0)}))},[n]),l=a.useCallback(m=>{const _=Ue.find(j=>j.id===m);if(!_)return;const k=_.rows.every(j=>g[j.id]!==!1),f={...g};for(const j of _.rows)f[j.id]=!k;n(f)},[n,g]),c=a.useCallback(m=>{d(_=>({..._,[m]:!(_[m]??!1)}))},[d]),p=a.useCallback(()=>{n(Ct()),d(Ot())},[n,d]);return{visibility:g,collapsed:i,toggleRow:u,toggleGroup:l,toggleCollapsed:c,reset:p}}const fo=Sa(()=>wa(()=>import("./nivo-radar.es-Dlr1Rkgd.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>t.ResponsiveRadar)),yo=s.div.withConfig({displayName:"CompareRadar__Wrap",componentId:"sc-178b50s-0"})(["display:flex;flex-direction:column;gap:8px;"]),bo=s.div.withConfig({displayName:"CompareRadar__Legend",componentId:"sc-178b50s-1"})(["display:flex;flex-wrap:wrap;gap:10px 14px;font-size:11px;color:",";"],o.gray4),vo=s.span.withConfig({displayName:"CompareRadar__Swatch",componentId:"sc-178b50s-2"})(["display:inline-flex;align-items:center;gap:4px;opacity:",';&::before{content:"";width:10px;height:10px;border-radius:2px;background:',";opacity:0.8;}"],({$dim:t})=>t?.4:1,({$color:t})=>t),wo=s.div.withConfig({displayName:"CompareRadar__RingLegend",componentId:"sc-178b50s-3"})(["display:flex;flex-wrap:wrap;gap:10px 14px;font-size:11px;color:",";"],o.gray4),_o=s.span.withConfig({displayName:"CompareRadar__RingSwatch",componentId:"sc-178b50s-4"})(['display:inline-flex;align-items:center;gap:4px;&::before{content:"";width:10px;height:10px;border-radius:2px;background:',";opacity:0.5;}"],({$color:t})=>t),jo=s.div.withConfig({displayName:"CompareRadar__HelperNote",componentId:"sc-178b50s-5"})(["font-size:11px;color:",";font-style:italic;"],o.gray5),Co=[{value:450,color:F(225)},{value:900,color:F(675)},{value:1350,color:F(1125)},{value:1750,color:F(1550)},{value:2450,color:F(2200)}],kt=50,Pt=["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],Oa=a.memo(({contacts:t,scale:n,radarMode:i})=>{const d=i==="recent"?"recentWn8":"overallWn8",g=i==="recent"?"Recent WN8":"WN8",u=a.useMemo(()=>[{key:d,label:g,max:4e3,bands:Co},{key:"winrate",label:"WR",max:70},{key:"avg_damage_dealt",label:"DPG",max:4e3},{key:"avg_damage_assisted",label:"Assist",max:1500},{key:"hits_percents",label:"Hits",max:90},{key:"survival_rate",label:"Surv",max:80}],[d,g]),l=a.useMemo(()=>Object.fromEntries(n==="normalized"?u.map(f=>[f.label,100]):u.map(f=>{const j=Math.max(0,...t.map(V=>Number(V[f.key]??0)));return[f.label,Math.max(j*1.1,1)]})),[n,t,u]),c=a.useMemo(()=>i!=="recent"?new Set:new Set(t.filter(f=>(f.recentBattles??0)<kt).map(f=>f.account_id)),[t,i]),p=a.useMemo(()=>u.map(f=>{const j={stat:f.label},V=n==="normalized"?f.max:l[f.label]||1;for(const N of t){const H=c.has(N.account_id)?0:Number(N[f.key]??0);j[N.nickname]=Math.min(100,H/V*100)}return j}),[t,n,l,u,c]),m=u[0],_=n==="normalized"?m.max:l[m.label]||1,k=f=>{if(!m.bands)return null;const j=f,V=j.radiusScale.range()[1];return e.jsx("g",{pointerEvents:"none",children:m.bands.map((N,I)=>{const H=Math.min(1,N.value/_),O=I===0?0:Math.min(1,m.bands[I-1].value/_);return H<=O?null:e.jsx("circle",{cx:j.centerX,cy:j.centerY,r:H*V,fill:N.color,fillOpacity:I===0?.12:.08},I)})})};return e.jsxs(yo,{children:[e.jsx("div",{style:{height:320},children:e.jsx(fo,{data:p,keys:t.map(f=>f.nickname),indexBy:"stat",maxValue:100,margin:{top:30,right:60,bottom:30,left:60},curve:"linearClosed",borderWidth:2,gridLevels:4,gridShape:"circular",gridLabelOffset:16,enableDots:!0,dotSize:6,dotBorderWidth:2,fillOpacity:.25,blendMode:"normal",animate:!0,isInteractive:!0,colors:{scheme:"set2"},layers:[k,"grid","layers","slices","dots","legends"],theme:{text:{fill:o.gray3,fontSize:11},grid:{line:{stroke:o.gray8,strokeDasharray:"2 4"}},tooltip:{container:{background:o.darkgray2,color:o.gray1,fontSize:11}}}})}),e.jsx(bo,{children:t.map((f,j)=>e.jsx(vo,{$color:Pt[j%Pt.length],$dim:c.has(f.account_id),title:c.has(f.account_id)?`${f.nickname} has fewer than ${kt} recent battles — radar shows zero for the recent axis.`:f.nickname,children:f.nickname},f.account_id))}),e.jsxs(wo,{children:[e.jsx("span",{children:"WN8 rings:"}),[{label:"Bad",color:F(225)},{label:"Below",color:F(675)},{label:"Average",color:F(1125)},{label:"Good",color:F(1550)},{label:"Great+",color:F(2200)}].map(f=>e.jsx(_o,{$color:f.color,children:f.label},f.label))]}),i==="recent"&&c.size>0&&e.jsxs(jo,{children:["Dimmed contacts have fewer than ",kt," recent battles — switch to “Overall WN8” to compare them properly."]})]})});Oa.displayName="CompareRadar";const ko=s.div.withConfig({displayName:"CompareSummary__Wrap",componentId:"sc-kz2j8w-0"})(["display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:10px 12px;border-radius:8px;background:",";border:1px solid ",";font-size:12px;color:",";"],o.darkgray3,o.darkgray1,o.gray3),Mo=s.span.withConfig({displayName:"CompareSummary__Title",componentId:"sc-kz2j8w-1"})(["color:",";font-weight:600;text-transform:uppercase;letter-spacing:0.04em;font-size:10px;"],o.gray4),Ao=s.button.withConfig({displayName:"CompareSummary__Pill",componentId:"sc-kz2j8w-2"})(["display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border-radius:999px;background:","1e;border:1px solid ",";color:",";font-family:var(--font-roboto-mono);cursor:pointer;transition:border-color 120ms ease;&:hover{border-color:",";}"],({$color:t})=>t,({$color:t,$active:n})=>n?t:`${t}55`,o.gray1,({$color:t})=>t),No=s.span.withConfig({displayName:"CompareSummary__Count",componentId:"sc-kz2j8w-3"})(["font-weight:700;color:",";"],o.gray1),So=s.span.withConfig({displayName:"CompareSummary__Empty",componentId:"sc-kz2j8w-4"})(["color:",";font-style:italic;"],o.gray5),Gt=["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],Pa=a.memo(({contacts:t,rows:n,onScrollToContact:i})=>{const d=a.useMemo(()=>{const u=new Map;for(const l of t)u.set(l.account_id,0);for(const l of n){const p=t.map(k=>({id:k.account_id,v:Da(l,k)})).filter(k=>k.v!==null);if(p.length<2)continue;const m=l.flipped?Math.min(...p.map(k=>k.v)):Math.max(...p.map(k=>k.v)),_=p.filter(k=>k.v===m);if(_.length!==p.length)for(const k of _)u.set(k.id,(u.get(k.id)??0)+1)}return t.map((l,c)=>({id:l.account_id,nickname:l.nickname,count:u.get(l.account_id)??0,color:Gt[c%Gt.length]})).sort((l,c)=>c.count-l.count)},[t,n]),g=d.every(u=>u.count===0);return e.jsxs(ko,{children:[e.jsx(Mo,{children:"Best at"}),g?e.jsx(So,{children:"No clear leader across visible rows."}):d.map(u=>e.jsxs(Ao,{$color:u.color,$active:u.count>0,onClick:()=>i?.(u.id),title:`${u.nickname} leads ${u.count} ${u.count===1?"stat":"stats"}`,children:[e.jsx("span",{style:{color:u.color,fontWeight:700},children:u.nickname}),e.jsx(No,{children:u.count})]},u.id))]})});Pa.displayName="CompareSummary";const Io={search:"",activity:"all",wtr:"all",onlyTomato:!1,onlySameClan:!1},Ga=3600*24;function Ze(t,n){const i=Math.floor(Date.now()/1e3),d=Math.max(t||0,n||0);if(n>0&&i-n<900)return"online";if(d<=0)return"never";const g=(i-d)/Ga;return g<=1?"d1":g<=7?"d7":g<=30?"d30":"inactive"}function Ho(t,n){if(n==="all")return!0;const i=Ze(t.last_battle_time,t.logout_at);switch(n){case"online":return i==="online";case"active7d":return i==="online"||i==="d1"||i==="d7";case"active30d":return i==="online"||i==="d1"||i==="d7"||i==="d30";case"inactive90d":{const d=Math.max(t.last_battle_time||0,t.logout_at||0),u=(Math.floor(Date.now()/1e3)-d)/Ga;return i==="never"||u>90}default:return!0}}const Lo=[{id:"tomato",label:"Tomato",min:0,max:1400,color:"#B08059",rangeLabel:"Personal Rating < 1400"},{id:"low",label:"Low",min:1400,max:3200,color:"#EBE6E8",rangeLabel:"Personal Rating 1400 – 3200"},{id:"average",label:"Average",min:3200,max:5400,color:"#EBCB7E",rangeLabel:"Personal Rating 3200 – 5400"},{id:"good",label:"Good",min:5400,max:8e3,color:"#F9CB40",rangeLabel:"Personal Rating 5400 – 8000"},{id:"great",label:"Great",min:8e3,max:9e3,color:"#C091FF",rangeLabel:"Personal Rating 8000 – 9000"},{id:"unicum",label:"Unicum",min:9e3,max:1e4,color:"#9B5CF3",rangeLabel:"Personal Rating 9000 – 10000"},{id:"superunicum",label:"Super",min:1e4,max:1/0,color:"#6C2BD9",rangeLabel:"Personal Rating > 10000 (Super Unicum)"}];function Wo(t,n){if(n==="all")return!0;const i=t.global_rating||0,d=Lo.find(g=>g.id===n);return d?d.min===0?i>0&&i<d.max:i>=d.min&&i<d.max:!0}function To(t,n,i){return a.useMemo(()=>{const d=n.search.trim().toLowerCase();return t.filter(g=>
2{if(d){const u=(g.nickname||"").toLowerCase(),l=(g.clan?.tag||"").toLowerCase();if(!u.includes(d)&&!l.includes(d))return!1}return!(n.onlyTomato&&!g.hasMod||n.onlySameClan&&(!i||!g.clan_id||g.clan_id!==i)||!Ho(g,n.activity)||!Wo(g,n.wtr))})},[t,n,i])}function te(t){if(t.length===0)return 0;const n=[...t].sort((d,g)=>d-g),i=Math.floor(n.length/2);return n.length%2!==0?n[i]:(n[i-1]+n[i])/2}function X(t){return{color:Eo(t),background:t,padding:"0.15em 0.55em",borderRadius:"999px",lineHeight:1.2,fontWeight:700,display:"inline-block",whiteSpace:"nowrap"}}function Eo(t){if(typeof t!="string"||!t.startsWith("#"))return"#FFFFFF";let n=t.slice(1);if(n.length===3&&(n=n.split("").map(c=>c+c).join("")),n.length!==6)return"#FFFFFF";const i=parseInt(n.slice(0,2),16)/255,d=parseInt(n.slice(2,4),16)/255,g=parseInt(n.slice(4,6),16)/255;if([i,d,g].some(c=>Number.isNaN(c)))return"#FFFFFF";const u=c=>c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4);return .2126*u(i)+.7152*u(d)+.0722*u(g)>.5?"#0A0A0A":"#FFFFFF"}function Fo(t,n,i=!1){if(!n||!isFinite(t)||!isFinite(n))return o.gray2;const d=(t-n)/Math.max(n,1),g=i?-d:d;return Math.abs(g)<.05?o.gray2:g>.5?o.green:g>0?"hsl(120, 60%, 70%)":g>-.3?"hsl(15, 80%, 75%)":o.red}const qt={online:"#3CCB7A",d1:"#7ECBF9",d7:"#F9CB40",d30:"#B08059",inactive:o.gray6,never:o.gray6},$o=s.span.withConfig({displayName:"shared__OnlineDot",componentId:"sc-jyhxf9-0"})(["display:inline-block;width:8px;height:8px;border-radius:50%;background:",";box-shadow:",";flex-shrink:0;"],({$state:t})=>qt[t],({$state:t})=>t==="online"?`0 0 6px ${qt.online}`:"none"),xt=({lastBattleTime:t,logoutAt:n})=>{const i=Ze(t,n),d=Math.max(t,n),g=(()=>{switch(i){case"online":return"Online (active in the last 15 minutes)";case"d1":return"Active within the last 24 hours";case"d7":return"Active within the last 7 days";case"d30":return"Active within the last 30 days";case"never":return"Never seen";default:return`Last seen ${Ge.fromSeconds(d).toRelative()}`}})();return e.jsx(w,{message:g,children:e.jsx($o,{$state:i})})},Ro=s.span.withConfig({displayName:"shared__ClanWrap",componentId:"sc-jyhxf9-1"})(["display:inline-flex;align-items:center;gap:4px;font-family:var(--font-roboto-mono);font-weight:600;"]),ft=({clan:t})=>t?e.jsxs(Ro,{children:[t.emblem?e.jsx("img",{loading:"lazy",decoding:"async",src:t.emblem,alt:t.tag,width:14,height:14}):null,e.jsxs("span",{style:{color:t.color||o.gray2},children:["[",t.tag,"]"]})]}):e.jsx("span",{style:{color:o.gray6},children:"—"}),ke=({ts:t,prefix:n})=>{if(!t)return e.jsx("span",{style:{color:o.gray6},children:"—"});const i=Ge.fromSeconds(t),d=i.toRelative(),g=i.toLocaleString(Ge.DATETIME_MED);return e.jsxs("span",{title:g,style:{color:o.gray3},children:[n?`${n} `:"",d]})},Vo=s(ut).withConfig({displayName:"shared__PlayerLinkBase",componentId:"sc-jyhxf9-2"})(["color:",";text-decoration:none;&:hover{color:",";}"],o.gray1,o.red),Qe=({accountId:t,nickname:n,style:i})=>{const d=`${_a(t,n)}?tab=main`;return e.jsx(Vo,{to:d,style:i,children:n})},Bo=s(ut).withConfig({displayName:"shared__ClanCardWrap",componentId:"sc-jyhxf9-3"})(["display:grid;grid-template-columns:56px 1fr;gap:12px;padding:10px;border-radius:8px;background:",";border:1px solid ",";text-decoration:none;color:inherit;transition:border-color 120ms ease;&:hover{border-color:",";}"],o.darkgray3,o.darkgray1,o.red),Zo=s.div.withConfig({displayName:"shared__ClanCardMain",componentId:"sc-jyhxf9-4"})(["display:flex;flex-direction:column;gap:4px;min-width:0;"]),zo=s.div.withConfig({displayName:"shared__ClanCardTitleRow",componentId:"sc-jyhxf9-5"})(["display:flex;align-items:center;gap:6px;font-family:var(--font-roboto-mono);"]),Do=s.span.withConfig({displayName:"shared__ClanCardName",componentId:"sc-jyhxf9-6"})(["font-size:13px;color:",";overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"],o.gray2),Oo=s.div.withConfig({displayName:"shared__ClanCardMeta",componentId:"sc-jyhxf9-7"})(["display:flex;flex-wrap:wrap;gap:8px 12px;font-size:11px;color:",";"],o.gray4),nt=s.span.withConfig({displayName:"shared__ClanCardMetaItem",componentId:"sc-jyhxf9-8"})(["display:inline-flex;align-items:center;gap:4px;"]),Po=s.div.withConfig({displayName:"shared__ClanCardMotto",componentId:"sc-jyhxf9-9"})(["font-size:11px;color:",";font-style:italic;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
2"],o.gray5),Go=({clan:t,server:n,role:i,joinedAt:d})=>{const g=Tt({route:Et.CLAN_PAGE,server:n,id:t.clan_id,name:t.tag}),u=t.emblemLarge??t.emblem,l=i?un[i]??i:null;return e.jsxs(Bo,{to:g,children:[u?e.jsx("img",{loading:"lazy",decoding:"async",src:u,alt:t.tag,width:56,height:56,style:{borderRadius:4,objectFit:"contain"}}):e.jsx("div",{style:{width:56,height:56,background:o.darkgray2,borderRadius:4}}),e.jsxs(Zo,{children:[e.jsxs(zo,{children:[e.jsxs("span",{style:{color:t.color||o.gray2,fontWeight:700},children:["[",t.tag,"]"]}),e.jsx(Do,{children:t.name})]}),e.jsxs(Oo,{children:[l&&e.jsx(w,{message:`Role in ${t.tag}`,children:e.jsxs(nt,{children:[e.jsx("img",{loading:"lazy",decoding:"async",src:`/clan/roles/${i}.webp`,alt:l,width:14,height:14}),e.jsx("span",{style:{color:o.gray3},children:l})]})}),d?e.jsx(w,{message:Ge.fromSeconds(d).toLocaleString(Ge.DATE_FULL),children:e.jsxs(nt,{children:["Joined ",Ge.fromSeconds(d).toRelative()]})}):null,t.members_count!=null&&e.jsx(w,{message:"Total clan members",children:e.jsxs(nt,{children:[t.members_count," members"]})}),t.leader_name&&e.jsx(w,{message:"Clan commander",children:e.jsxs(nt,{children:["Leader ",t.leader_name]})})]}),t.motto&&e.jsxs(Po,{children:["“",t.motto,"”"]})]})]})},ze=({size:t=16,title:n="Used Tomato.gg in the last 30 days"})=>e.jsx("img",{loading:"lazy",decoding:"async",src:"/worries/worrylove.webp",alt:"Tomato.gg user",title:n,width:t,height:t,style:{flexShrink:0}});function qo(t,n){if(n.length===0)return;const i=Object.keys(n[0]),d=p=>{const m=String(p??"");return/[",\n]/.test(m)?`"${m.replace(/"/g,'""')}"`:m},g=[i.join(","),...n.map(p=>i.map(m=>d(p[m])).join(","))].join(`
3`),u=new Blob([g],{type:"text/csv;charset=utf-8"}),l=URL.createObjectURL(u),c=document.createElement("a");c.href=l,c.download=t,document.body.appendChild(c),c.click(),c.remove(),URL.revokeObjectURL(l)}const Uo=s.div.withConfig({displayName:"CompareTable__TableWrap",componentId:"sc-1ej7lda-0"})(["border:1px solid ",";border-radius:8px;overflow:auto;max-width:100%;"],o.darkgray1),Yo=s.div.withConfig({displayName:"CompareTable__Grid",componentId:"sc-1ej7lda-1"})(["display:grid;grid-template-columns:150px repeat(",",minmax(140px,1fr));font-size:12px;min-width:max-content;"],({$count:t})=>t),gt=s.div.withConfig({displayName:"CompareTable__Cell",componentId:"sc-1ej7lda-2"})(["padding:8px 10px;border-bottom:1px solid ",";border-right:1px solid ",";font-family:var(--font-roboto-mono);text-align:right;color:",";position:relative;&:last-child{border-right:none;}"],o.darkgray2,o.darkgray2,o.gray2),Ko=s(gt).withConfig({displayName:"CompareTable__StatLabelCell",componentId:"sc-1ej7lda-3"})(["text-align:left;background:",";color:",";position:sticky;left:0;z-index:1;border-right:1px solid ",";cursor:help;"],o.darkgray3,o.gray3,o.darkgray1),qa=s(gt).withConfig({displayName:"CompareTable__HeaderCell",componentId:"sc-1ej7lda-4"})(["background:",";color:",";font-weight:600;text-align:left;position:sticky;top:0;z-index:2;"],o.darkgray2,o.gray1),Xo=s(qa).withConfig({displayName:"CompareTable__StatHeaderCell",componentId:"sc-1ej7lda-5"})(["left:0;z-index:3;background:",";"],o.darkgray1),Qo=s.div.withConfig({displayName:"CompareTable__PlayerHeader",componentId:"sc-1ej7lda-6"})(["display:flex;flex-direction:column;gap:4px;min-width:0;"]),Jo=s.div.withConfig({displayName:"CompareTable__PlayerHeaderTop",componentId:"sc-1ej7lda-7"})(["display:flex;align-items:center;gap:6px;min-width:0;"]),er=s(Te).withConfig({displayName:"CompareTable__RemoveBtn",componentId:"sc-1ej7lda-8"})(["margin-left:auto;flex-shrink:0;"]),tr=s.div.withConfig({displayName:"CompareTable__PlayerHeaderBottom",componentId:"sc-1ej7lda-9"})(["display:flex;align-items:center;gap:6px;font-size:11px;color:",";"],o.gray4),ar=s.div.withConfig({displayName:"CompareTable__GroupRow",componentId:"sc-1ej7lda-10"})(["grid-column:1 / span ",";background:",";color:",";padding:6px 10px;font-size:11px;text-transform:uppercase;letter-spacing:0.04em;font-weight:700;border-bottom:1px solid ",";display:flex;align-items:center;gap:6px;cursor:pointer;user-select:none;position:sticky;left:0;&:hover{color:",";}"],({$count:t})=>t+1,o.darkgray1,o.gray2,o.darkgray2,o.gray1),nr=s.span.withConfig({displayName:"CompareTable__PillSpan",componentId:"sc-1ej7lda-11"})(["display:inline-block;"]),or=s.span.withConfig({displayName:"CompareTable__Placeholder",componentId:"sc-1ej7lda-12"})(["color:",";"],o.gray6);function rr(t,n){return t.map(i=>{const d=n.map(c=>({contact:c,value:Da(i,c)})),g=d.filter(c=>c.value!==null);let u=null,l=null;if(g.length>=2){const c=g.map(p=>p.value);u=i.flipped?Math.min(...c):Math.max(...c),l=i.flipped?Math.max(...c):Math.min(...c),u===l&&(u=null,l=null)}return{row:i,values:d,bestVal:u,worstVal:l}})}const Ua=a.memo(({contacts:t,visibility:n,collapsed:i,onToggleCollapsed:d,onRemoveContact:g,canRemove:u})=>{const l=a.useMemo(()=>Ue.map(m=>({group:m,rows:m.rows.filter(_=>n[_.id]!==!1)})).filter(m=>m.rows.length>0),[n]),c=t.length>=3,p=t.length;return e.jsx(Uo,{children:e.jsxs(Yo,{$count:p,children:[e.jsx(Xo,{children:"Stat"}),t.map(m=>{const _=F(m.overallWn8??0);return e.jsx(qa,{id:`compare-col-${m.account_id}`,children:e.jsxs(Qo,{children:[e.jsxs(Jo,{children:[e.jsx(xt,{lastBattleTime:m.last_battle_time,logoutAt:m.logout_at}),e.jsx(Qe,{accountId:m.account_id,nickname:m.nickname,style:(m.overallWn8??0)>0?X(_):{color:o.gray3}}),m.hasMod&&e.jsx(ze,{size:12}),u&&g&&e.jsx(w,{message:"Remove from comparison",children:e.jsx(er,{size:"1",variant:"ghost",color:"gray",onClick:()=>g(m.account_id),"aria-label":`Remove ${m.nickname}`,children:e.jsx(ja,{size:12})})})]}),e.jsx(tr,{children:e.jsx(ft,{clan:m.clan})})]})},m.account_id)}),l.map(({group:m,rows:_})=>{const k=!!i[m.id],f=k?[]:rr(_,t);return e.jsxs(a.Fragment,{children:[e.jsxs(ar,{$count:p,onClick:()=>d(m.id),role:"button","aria-expanded":!k,children:[k?e.jsx(Ca,{size:12}):e.jsx(Ia,{size:12}),m.label,e.jsxs("span",{style:{color:o.gray5,fontWeight:400,marginLeft:6},children:[_.length," ",_.length===1?"row":"rows"]})]}),!k&&f.map(({row:j,values:V,bestVal:N,worstVal:I})=>{const H=V.map(D=>D.value).filter(D=>D!==null),O=H.length?Math.max(...H.map(D=>Math.abs(D))):0;return e.jsxs(a.Fragment,{children:[e.jsx(w,{message:j.tooltip??j.label,children:e.jsx(Ko,{children:j.label})}),V.map(({contact:D,value:Z})=>{if(Z===null)return e.jsx(gt,{children:e.jsx(w,{message:j.requiresRecent?go:"No data",children:e.jsx(or,{children:"—"})})},`${j.id}-${D.account_id}`);const T=N!==null&&Z===N,P=c&&I!==null&&Z===I&&!T,U=O>0?Math.min(100,Math.abs(Z)/O*100):0,re=`linear-gradient(to right, ${T?o.green:P?o.red:j.colorFn?j.colorFn(Z):o.gray5}1f ${U}%, transparent ${U}%)`,M=po(j,Z,D),x=j.pill&&j.colorFn?e.jsxs(nr,{style:X(j.colorFn(Z)),children:[M,j.suffix??""]}):e.jsxs("span",{style:{color:j.colorFn?j.colorFn(Z):T?o.green:P?o.red:o.gray2,fontWeight:T?700:400},children:[M,j.suffix??""]});return e.jsx(gt,{style:{background:re,outline:T?`1px solid ${o.green}55`:P?`1px solid ${o.red}55`:void 0,outlineOffset:-1},children:x},`${j.id}-${D.account_id}`)})]},j.id)})]},m.id)})]})})});Ua.displayName="CompareTable";const ir=s.div.withConfig({displayName:"CompareToolbar__Bar",componentId:"sc-1psdwtw-0"})(["display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:8px 4px;background:",";border-radius:8px;color:",";font-size:12px;position:sticky;top:0;z-index:3;"],o.darkgray3,o.gray3),Mt=s.label.withConfig({displayName:"CompareToolbar__Item",componentId:"sc-1psdwtw-1"})(["display:inline-flex;align-items:center;gap:6px;cursor:pointer;user-select:none;padding:0 4px;"]),sr=s.div.withConfig({displayName:"CompareToolbar__Group",componentId:"sc-1psdwtw-2"})(["display:flex;flex-direction:column;gap:4px;border-bottom:1px solid ",";padding-bottom:6px;margin-bottom:6px;&:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0;}"],o.darkgray1),lr=s.label.withConfig({displayName:"CompareToolbar__GroupHeader",componentId:"sc-1psdwtw-3"})(["display:flex;align-items:center;gap:6px;color:",";font-weight:700;font-size:11px;text-transform:uppercase;letter-spacing:0.04em;cursor:pointer;"],o.gray2),cr=s.label.withConfig({displayName:"CompareToolbar__Sub",componentId:"sc-1psdwtw-4"})(["display:flex;align-items:center;gap:6px;color:",";font-size:12px;cursor:pointer;padding-left:14px;"],o.gray3),Ya=a.memo(({own:t,includeYou:n,onIncludeYouChange:i,includeYouDisabled:d,scale:g,onScaleChange:u,radarMode:l,onRadarModeChange:c,visibility:p,onToggleRow:m,onToggleGroup:_,onReset:k})=>e.jsxs(ir,{children:[t&&e.jsxs(Mt,{children:[e.jsx(Ie,{checked:n,disabled:d,onCheckedChange:f=>i(!!f)}),"Include you (",t.nickname,")"]}),e.jsxs(Mt,{as:"div",children:[e.jsx("span",{children:"Scale:"}),e.jsxs(pt,{value:g,onValueChange:f=>u(f),size:"1",children:[e.jsx(Le,{value:"normalized",children:"Normalized"}),e.jsx(Le,{value:"absolute",children:"Absolute"})]})]}),e.jsxs(Mt,{as:"div",children:[e.jsx("span",{children:"Radar:"}),e.jsxs(pt,{value:l,onValueChange:f=>c(f),size:"1",children:[e.jsx(Le,{value:"overall",children:"Overall WN8"}),e.jsx(Le,{value:"recent",children:"Recent WN8"})]})]}),e.jsxs("div",{style:{marginLeft:"auto",display:"flex",gap:8},children:[e.jsxs(ct,{children:[e.jsx(dt,{children:e.jsxs(ge,{size:"1",variant:"soft",color:"gray",children:[e.jsx(Ha,{size:14})," Customize rows"]})}),e.jsx(mt,{size:"1",style:{maxWidth:260,maxHeight:360,overflow:"auto"},children:Ue.map(f=>{const j=f.rows.every(N=>p[N.id]!==!1),V=f.rows.every(N=>p[N.id]===!1);return e.jsxs(sr,{children:[e.jsxs(lr,{children:[e.jsx(Ie,{checked:j?!0:V?!1:"indeterminate",onCheckedChange:()=>_(f.id)}),f.label]}),f.rows.map(N=>e.jsxs(cr,{children:[e.jsx(Ie,{checked:p[N.id]!==!1,onCheckedChange:()=>m(N.id)}),N.label]},N.id))]},f.id)})})]}),e.jsx(ge,{size:"1",variant:"soft",color:"gray",onClick:k,children:"Reset"})]})]}));Ya.displayName="CompareToolbar";const dr=s.div.withConfig({displayName:"CompareModal__Wrap",componentId:"sc-8rhopd-0"})(["display:flex;flex-direction:column;gap:14px;max-height:calc(90vh - 80px);overflow:auto;"]),mr=s.div.withConfig({displayName:"CompareModal__Empty",componentId:"sc-8rhopd-1"})(["color:",";padding:16px 0;"],o.gray4),Ka=a.memo(({open:t,onOpenChange:n,contacts:i,own:d,onRemoveContact:g})=>
3{const[u,l]=a.useState(!1),[c,p]=a.useState("normalized"),[m,_]=a.useState("overall"),{visibility:k,collapsed:f,toggleRow:j,toggleGroup:V,toggleCollapsed:N,reset:I}=xo(),H=a.useMemo(()=>u&&d&&!i.some(U=>U.account_id===d.account_id)?[d,...i]:i,[i,d,u]),O=a.useMemo(()=>Ue.flatMap(U=>U.rows).filter(U=>k[U.id]!==!1),[k]),D=a.useCallback(U=>{const K=document.getElementById(`compare-col-${U}`);K&&(K.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),K.animate([{boxShadow:"0 0 0 2px transparent"},{boxShadow:`0 0 0 2px ${o.red}`},{boxShadow:"0 0 0 2px transparent"}],{duration:1200,iterations:1}))},[]),Z=a.useCallback(()=>{I(),p("normalized"),_("overall"),l(!1)},[I]),T=a.useMemo(()=>!!d&&i.length>=6&&!i.some(U=>U.account_id===d.account_id),[i,d]),P=H.length>1&&i.length>1&&!!g;return e.jsx(Cn,{open:t,onOpenChange:n,children:e.jsxs(kn,{maxWidth:"1100px",style:{maxHeight:"90vh"},children:[e.jsx(Mn,{children:"Compare contacts"}),e.jsxs(An,{size:"2",color:"gray",style:{marginBottom:12},children:["Side-by-side comparison of ",H.length," players. Best per row is highlighted green, worst red (when 3+ players are compared)."]}),H.length<2?e.jsx(mr,{children:"Select 2 to 6 contacts to compare."}):e.jsxs(dr,{children:[e.jsx(Ya,{own:d,includeYou:u,onIncludeYouChange:l,includeYouDisabled:T,scale:c,onScaleChange:p,radarMode:m,onRadarModeChange:_,visibility:k,onToggleRow:j,onToggleGroup:V,onReset:Z}),e.jsx(Pa,{contacts:H,rows:O,onScrollToContact:D}),e.jsx(Ua,{contacts:H,visibility:k,collapsed:f,onToggleCollapsed:N,onRemoveContact:g,canRemove:P}),e.jsx(Oa,{contacts:H,scale:c,radarMode:m})]})]})})});Ka.displayName="CompareModal";const pr=ka`
4    from { transform: translateX(20px); opacity: 0; }
5    to   { transform: translateX(0); opacity: 1; }
6`,gr=s.div.withConfig({displayName:"ContactDrawer__Backdrop",componentId:"sc-3o4ypb-0"})(["position:fixed;inset:0;background:rgba(0,0,0,0.45);z-index:1000;"]),hr=s.aside.withConfig({displayName:"ContactDrawer__Panel",componentId:"sc-3o4ypb-1"})(["position:fixed;top:0;right:0;bottom:0;width:min(420px,100%);background:",";border-left:1px solid ",";z-index:1001;box-shadow:-8px 0 30px rgba(0,0,0,0.4);overflow-y:auto;animation:"," 0.18s ease-out;display:flex;flex-direction:column;"],o.darkgray4,o.darkgray1,pr),ur=s.div.withConfig({displayName:"ContactDrawer__Header",componentId:"sc-3o4ypb-2"})(["padding:16px;display:flex;align-items:center;gap:10px;border-bottom:1px solid ",";"],o.darkgray1),xr=s.div.withConfig({displayName:"ContactDrawer__Body",componentId:"sc-3o4ypb-3"})(["padding:16px;display:flex;flex-direction:column;gap:16px;"]),Ut=s.div.withConfig({displayName:"ContactDrawer__StatGrid",componentId:"sc-3o4ypb-4"})(["display:grid;grid-template-columns:repeat(2,1fr);gap:8px;"]),ce=s.div.withConfig({displayName:"ContactDrawer__StatBox",componentId:"sc-3o4ypb-5"})(["background:",";padding:10px;border-radius:8px;display:flex;flex-direction:column;gap:4px;"],o.darkgray3),de=s.span.withConfig({displayName:"ContactDrawer__StatLabel",componentId:"sc-3o4ypb-6"})(["font-size:10px;color:",";text-transform:uppercase;letter-spacing:1px;font-family:var(--font-roboto-mono);"],o.gray5),me=s.span.withConfig({displayName:"ContactDrawer__StatValue",componentId:"sc-3o4ypb-7"})(["font-size:18px;color:",";font-weight:600;"],o.gray1),ue=s.div.withConfig({displayName:"ContactDrawer__Section",componentId:"sc-3o4ypb-8"})(["display:flex;flex-direction:column;gap:6px;"]),xe=s.div.withConfig({displayName:"ContactDrawer__SectionTitle",componentId:"sc-3o4ypb-9"})(["font-size:11px;color:",";text-transform:uppercase;letter-spacing:1px;font-family:var(--font-roboto-mono);"],o.gray5),fr=s.div.withConfig({displayName:"ContactDrawer__HeaderDiffRow",componentId:"sc-3o4ypb-10"})(["display:flex;flex-wrap:wrap;gap:4px 8px;margin-top:4px;font-size:11px;color:",";"],o.gray4),Yt=s.span.withConfig({displayName:"ContactDrawer__DiffPill",componentId:"sc-3o4ypb-11"})(["display:inline-flex;align-items:center;gap:3px;background:","22;color:",";border:1px solid ","55;border-radius:999px;padding:1px 7px;font-family:var(--font-roboto-mono);font-size:10px;line-height:1.4;"],({$color:t})=>t,({$color:t})=>t,({$color:t})=>t),yr=s.div.withConfig({displayName:"ContactDrawer__NavButtons",componentId:"sc-3o4ypb-12"})(["display:flex;flex-direction:column;gap:2px;"]),br=s.a.withConfig({displayName:"ContactDrawer__TankRow",componentId:"sc-3o4ypb-13"})(["display:grid;grid-template-columns:36px 1fr auto auto;gap:8px;align-items:center;padding:6px;border-radius:6px;background:",";color:inherit;text-decoration:none;transition:background 120ms ease;&:hover{background:",";}"],o.darkgray3,o.darkgray2),Kt=s.span.withConfig({displayName:"ContactDrawer__TankIconSlot",componentId:"sc-3o4ypb-14"})(["display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;"]),vr=s.div.withConfig({displayName:"ContactDrawer__TankImageWrap",componentId:"sc-3o4ypb-15"})(["width:36px;height:24px;background:",";border-radius:3px;overflow:hidden;display:flex;align-items:center;justify-content:center;position:relative;"],o.darkgray2),wr=s.div.withConfig({displayName:"ContactDrawer__TankMeta",componentId:"sc-3o4ypb-16"})(["display:flex;flex-direction:column;min-width:0;gap:1px;"]),_r=s.span.withConfig({displayName:"ContactDrawer__TankName",componentId:"sc-3o4ypb-17"})(["font-size:12px;color:",";overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"],o.gray2),jr=s.span.withConfig({displayName:"ContactDrawer__TankSub",componentId:"sc-3o4ypb-18"})(["font-size:10px;color:",";font-family:var(--font-roboto-mono);"],o.gray5),Xt=s.div.withConfig({displayName:"ContactDrawer__MasteryPills",componentId:"sc-3o4ypb-19"})(["display:grid;grid-template-columns:repeat(4,1fr);gap:6px;"]),Qt=s.div.withConfig({displayName:"ContactDrawer__MasteryPill",componentId:"sc-3o4ypb-20"})(["display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 4px;border-radius:6px;background:","1f;border:1px solid ","66;"],({$color:t})=>t,({$color:t})=>t),Jt=s.span.withConfig({displayName:"ContactDrawer__MasteryCount",componentId:"sc-3o4ypb-21"})(["font-size:16px;font-weight:700;color:",";font-family:var(--font-roboto-mono);line-height:1;"],o.gray1),Cr=s.div.withConfig({displayName:"ContactDrawer__ClassRow",componentId:"sc-3o4ypb-22"})(["display:grid;grid-template-columns:36px 1fr auto;gap:8px;align-items:center;font-size:11px;color:",";"],o.gray3),kr=s.div.withConfig({displayName:"ContactDrawer__ClassBarTrack",componentId:"sc-3o4ypb-23"})(["height:8px;background:",";border-radius:4px;overflow:hidden;"],o.darkgray2),Mr=s.div.withConfig({displayName:"ContactDrawer__ClassBarFill",componentId:"sc-3o4ypb-24"})(["width:","%;height:100%;background:",";transition:width 250ms ease;"],({$w:t})=>Math.max(2,Math.min(100,t)),({$color:t})=>t),Ar=s.div.withConfig({displayName:"ContactDrawer__RecentMini",componentId:"sc-3o4ypb-25"})(["display:grid;grid-template-columns:repeat(3,1fr);gap:8px;"]),ea=[{mastery:4,label:"Mastery",color:"#F9CB40"},{mastery:3,label:"Class I",color:"#C091FF"},{mastery:2,label:"Class II",color:"#B7C2D6"},{mastery:1,label:"Class III",color:"#B08059"}],Nr=[{moe:3,label:"3 Marks",color:"#F9CB40"},{moe:2,label:"2 Marks",color:"#C091FF"}
6,{moe:1,label:"1 Mark",color:"#7ECBF9"}],ta={HT:"#9B5CF3",MT:"#F9CB40",LT:"#3CCB7A",TD:"#7ECBF9",SPG:"#B08059"},Sr={HT:"Heavy",MT:"Medium",LT:"Light",TD:"TD",SPG:"Arty"},Xa=a.memo(({contact:t,own:n,server:i,onClose:d,onPrev:g,onNext:u})=>{const l=t?.account_id??0,c=!!t&&l>0,p=xn(i,l,{cache:!0,enabled:c}),m=Nn(l||null,{enabled:c}),_=Sn(c&&t?.clan_id?l:null,c&&t?.clan_id?i:null);if(a.useEffect(()=>{if(!c)return;const y=S=>{S.key==="Escape"?d():S.key==="ArrowDown"&&u?(S.preventDefault(),u()):S.key==="ArrowUp"&&g&&(S.preventDefault(),g())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[c,d,u,g]),!t)return null;const k=`${_a(t.account_id,t.nickname)}?tab=main`,f=p.data?.data,j=f?.overallWNX??null,V=f?.overallWN8??null,N=(t.overallWn8&&t.overallWn8>0?t.overallWn8:V)??null,I=m.data??[],H=I.length>0?I[I.length-1].rating+I[I.length-1].delta:null,O=(y,S)=>{if(!S)return null;const G=y-S,Me=G/S*100;return{d:G,pct:Me}},D=f?.tanks??[],Z=[...D].sort((y,S)=>S.battles-y.battles).slice(0,5),T=ea.map(y=>({...y,count:D.filter(S=>S.mastery===y.mastery).length})),P=Nr.map(y=>({...y,count:D.filter(S=>S.moe===y.moe).length})),U=P.reduce((y,S)=>y+S.count,0),K=Object.keys(ta).map(y=>{const S=D.filter(ye=>ye.class===y),G=S.reduce((ye,Ae)=>ye+Ae.battles,0),Me=S.reduce((ye,Ae)=>ye+Ae.battles*(Ae.winrate/100),0);return{cls:y,label:Sr[y],color:ta[y],battles:G,winrate:G>0?Me/G*100:0}}),re=K.reduce((y,S)=>y+S.battles,0),M=n?.overallWn8&&N?N-n.overallWn8:null,x=n&&n.winrate?Number((t.winrate-n.winrate).toFixed(2)):null,A=t.recentBattles??0,C=t.recentWn8??0,L=t.recentWinrate??0;return e.jsxs(e.Fragment,{children:[e.jsx(gr,{onClick:d}),e.jsxs(hr,{onClick:y=>y.stopPropagation(),children:[e.jsxs(ur,{children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,minWidth:0},children:[e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx(xt,{lastBattleTime:t.last_battle_time,logoutAt:t.logout_at}),e.jsx("strong",{style:{color:o.gray1,fontSize:16},children:t.nickname}),t.hasMod&&e.jsx(w,{message:"Used Tomato.gg in the last 30 days",children:e.jsx("span",{style:{display:"inline-flex"},children:e.jsx(ze,{size:18})})})]}),e.jsx("span",{style:{fontSize:11,color:o.gray4},children:e.jsx(ft,{clan:t.clan})}),n&&(M!==null||x!==null)&&e.jsxs(fr,{children:[M!==null&&e.jsx(w,{message:"WN8 difference vs you (overall)",children:e.jsxs(Yt,{$color:M>=0?o.green:o.red,children:["WN8 ",M>=0?"+":"",Math.round(M).toLocaleString()]})}),x!==null&&e.jsx(w,{message:"Winrate difference vs you (overall)",children:e.jsxs(Yt,{$color:x>=0?o.green:o.red,children:["WR ",x>=0?"+":"",x.toFixed(2),"%"]})})]})]}),(g||u)&&e.jsxs(yr,{children:[e.jsx(w,{message:"Previous contact (↑)",children:e.jsx(Te,{size:"1",variant:"ghost",color:"gray",onClick:g,disabled:!g,"aria-label":"Previous contact",children:e.jsx(Ia,{size:14})})}),e.jsx(w,{message:"Next contact (↓)",children:e.jsx(Te,{size:"1",variant:"ghost",color:"gray",onClick:u,disabled:!u,"aria-label":"Next contact",children:e.jsx(Ca,{size:14})})})]}),e.jsx(Te,{size:"2",variant:"ghost",color:"gray",onClick:d,children:e.jsx(ja,{size:18})})]}),e.jsxs(xr,{children:[e.jsxs(ue,{children:[e.jsx(xe,{children:"Skill ratings"}),e.jsxs(Ut,{style:{gridTemplateColumns:"repeat(3, 1fr)"},children:[e.jsxs(ce,{children:[e.jsx(w,{message:"WN8 – overall expected damage / spotting / wins normalized per tank. Industry-standard skill metric.",children:e.jsx(de,{children:"WN8"})}),e.jsx(me,{style:N?X(F(N)):{color:o.gray5},children:N?Math.round(N).toLocaleString():p.isLoading?"…":"—"}),n?.overallWn8&&N?e.jsx("span",{style:{fontSize:10,color:o.gray5},children:(()=>{const y=O(N,n.overallWn8);return y?y.d>0?`+${Math.round(y.d)} vs you`:`${Math.round(y.d)} vs you`:null})()}):null]}),e.jsxs(ce,{children:[e.jsx(w,{title:"WNX",message:"Tomato.gg's next-gen skill metric. Assistance damage tracking started June 20, 2025 – players with few games since then may have a higher real WNX than shown.",children:e.jsx(de,{children:"WNX"})}),e.jsx(me,{style:j?X(jn(j)):{color:o.gray5}
6,children:j?Math.round(j).toLocaleString():p.isLoading?"…":"—"})]}),e.jsxs(ce,{children:[e.jsx(w,{message:"Current Onslaught Mode rating – last battle's rating + delta. Badge reflects the corresponding rank.",children:e.jsx(de,{children:"Onslaught"})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[H!==null&&e.jsx("img",{loading:"lazy",decoding:"async",src:In(H),alt:"Onslaught",width:24,height:24}),e.jsx(me,{style:H!==null?X(Hn(H)):{color:o.gray5},children:H!==null?Math.round(H).toLocaleString():m.isLoading?"…":"—"})]})]})]})]}),t.clan&&e.jsxs(ue,{children:[e.jsx(xe,{children:"Clan"}),e.jsx(Go,{clan:t.clan,server:i,role:_.data?.role,joinedAt:_.data?.joined})]}),A>0&&e.jsxs(ue,{children:[e.jsx(w,{message:"Stats from the player's most recent battle window (~28 days). Useful to see if a player is currently improving or slumping.",children:e.jsxs(xe,{children:["Recent (",A.toLocaleString()," battles)"]})}),e.jsxs(Ar,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:"Recent WN8"}),e.jsx(me,{style:C?X(F(C)):{color:o.gray5},children:C?Math.round(C).toLocaleString():"—"})]}),e.jsxs(ce,{children:[e.jsx(de,{children:"Recent WR"}),e.jsxs(me,{children:[L.toFixed(1),"%"]})]}),e.jsxs(ce,{children:[e.jsx(de,{children:"Battles"}),e.jsx(me,{children:A.toLocaleString()})]})]})]}),Z.length>0&&e.jsxs(ue,{children:[e.jsx(w,{message:"Five most-played tanks (overall battles). Click any tank to open its full profile in a new tab.",children:e.jsx(xe,{children:"Top 5 tanks"})}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:Z.map(y=>{const S=ea.find(G=>G.mastery===y.mastery);return e.jsxs(br,{href:Tt({route:Et.TANK_PAGE,server:i,id:y.id,name:y.name}),target:"_blank",rel:"noopener noreferrer",children:[e.jsx(vr,{children:y.image&&e.jsx("img",{loading:"lazy",decoding:"async",src:y.image,alt:y.name,sizes:"36px",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"contain"}})}),e.jsxs(wr,{children:[e.jsx(_r,{title:y.name,children:y.name}),e.jsxs(jr,{children:[y.battles.toLocaleString()," btl ·"," ",Math.round(y.dpg).toLocaleString()," DPG ·"," ",e.jsxs("span",{style:X(F(y.wn8)),children:[Math.round(y.wn8).toLocaleString()," WN8"]})]})]}),e.jsx(Kt,{children:y.moe>0&&e.jsx(w,{message:`${y.moe} Mark${y.moe===1?"":"s"} of Excellence`,children:e.jsx("img",{loading:"lazy",decoding:"async",src:`/markIcons/mark_${y.moe}.webp`,alt:`${y.moe} Marks of Excellence`,width:20,height:20})})}),e.jsx(Kt,{children:S&&y.mastery>0&&e.jsx(w,{message:`${S.label} earned`,children:e.jsx("img",{loading:"lazy",decoding:"async",src:`/masteryIcons/${y.mastery}.webp`,alt:S.label,width:20,height:20})})})]},y.id)})})]}),D.length>0&&e.jsxs(ue,{children:[e.jsx(w,{message:"Mastery badges earned across all played tanks. III is the lowest, Mastery is the highest (top 1% performance on a tank).",children:e.jsx(xe,{children:"Mastery summary"})}),e.jsx(Xt,{children:T.map(y=>e.jsx(w,{message:`${y.count} ${y.label}${y.count===1?"":"s"} earned`,children:e.jsxs(Qt,{$color:y.color,children:[e.jsx("img",{loading:"lazy",decoding:"async",src:`/masteryIcons/${y.mastery}.webp`,alt:y.label,width:26,height:26}),e.jsx(Jt,{children:y.count})]})},y.mastery))})]}),D.length>0&&e.jsxs(ue,{children:[e.jsx(w,{message:"Marks of Excellence summary. Marks are earned by performing in the top X% of damage on a given tank: 1 Mark = top 65%, 2 Marks = top 85%, 3 Marks = top 95%.",children:e.jsxs(xe,{children:["Marks of Excellence",U>0&&e.jsxs("span",{style:{color:o.gray5,fontWeight:400,marginLeft:6},children:["· ",U," total"]})]})}),e.jsx(Xt,{style:{gridTemplateColumns:"repeat(3, 1fr)"},children:P.map(y=>e.jsx(w,{message:`${y.count} tank${y.count===1?"":"s"} with ${y.label}`,children:e.jsxs(Qt,{$color:y.color,children:[e.jsx("img",{loading:"lazy",decoding:"async",src:`/markIcons/mark_${y.moe}.webp`,alt:y.label,width:26,height:26}),e.jsx(Jt,{children:y.count})]})},y.moe))})]}),re>0&&e.jsxs(ue,{children:[e.jsx(w,{message:"Battles per vehicle class with class winrate. Helps identify class specialists.",children:e.jsx(xe,{children:"Vehicle class breakdown"})}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:K.map(y=>{const S=re>0?y.battles/re*100:0;return e.jsxs(Cr,{children:[e.jsx("span",{style:{color:y.color,fontWeight:600},children:y.cls}),e.jsx(kr,{children:e.jsx(Mr,{$w:S,$color:y.color})}
6),e.jsx(w,{message:`${y.battles.toLocaleString()} ${y.label} battles · ${y.winrate.toFixed(1)}% WR`,children:e.jsxs("span",{style:{fontFamily:"var(--font-roboto-mono)"},children:[y.battles.toLocaleString()," · ",y.winrate.toFixed(1),"%"]})})]},y.cls)})})]}),!m.isLoading&&I.length>0&&e.jsxs(ue,{children:[e.jsx(xe,{children:"Onslaught Progression"}),e.jsx("div",{style:{height:170},children:e.jsx(Ln,{onslaughtData:I})})]}),e.jsxs(ue,{children:[e.jsx(xe,{children:"Key stats"}),e.jsxs(Ut,{children:[e.jsxs(ce,{children:[e.jsx(w,{message:"Win percentage across all random battles",children:e.jsx(de,{children:"Winrate"})}),e.jsxs(me,{children:[t.winrate.toFixed(2),"%"]})]}),e.jsxs(ce,{children:[e.jsx(w,{message:"Average damage dealt per battle (DPG)",children:e.jsx(de,{children:"Avg DMG"})}),e.jsx(me,{children:Math.round(t.avg_damage_dealt).toLocaleString()})]}),e.jsxs(ce,{children:[e.jsx(w,{message:"Total random battles played",children:e.jsx(de,{children:"Battles"})}),e.jsx(me,{children:Math.round(t.battles).toLocaleString()})]}),e.jsxs(ce,{children:[e.jsx(w,{message:"Direct hit accuracy %",children:e.jsx(de,{children:"Hits"})}),e.jsxs(me,{children:[t.hits_percents.toFixed(1),"%"]})]}),e.jsxs(ce,{children:[e.jsx(w,{message:"Share of battles the player survived",children:e.jsx(de,{children:"Survival"})}),e.jsxs(me,{children:[t.survival_rate.toFixed(1),"%"]})]}),e.jsxs(ce,{children:[e.jsx(w,{message:"Share of battles played in artillery (lower = more versatile)",children:e.jsx(de,{children:"Arty %"})}),e.jsxs(me,{children:[t.avg_battles_on_stunning_vehicles.toFixed(1),"%"]})]})]})]}),e.jsxs(ue,{children:[e.jsx(xe,{children:"Activity"}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:12},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{children:"Last battle"}),e.jsx(ke,{ts:t.last_battle_time})]}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{children:"Last logout"}),e.jsx(ke,{ts:t.logout_at})]}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{children:"Account created"}),e.jsx(ke,{ts:t.created_at})]})]})]}),e.jsxs(ue,{children:[e.jsx(xe,{children:"Flags"}),e.jsxs("div",{style:{display:"flex",gap:6,flexWrap:"wrap",alignItems:"center"},children:[t.hasMod?e.jsx(w,{message:"Detected use of the Tomato.gg mod within the last 30 days",children:e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[e.jsx(ze,{size:20}),e.jsx(He,{color:"green",children:"Tomato.gg user"})]})}):e.jsx(w,{message:"No Tomato.gg mod activity in the last 30 days",children:e.jsx(He,{color:"gray",children:"No Tomato"})}),t.clan?e.jsx(w,{message:`Member of ${t.clan.tag}`,children:e.jsx(He,{color:"indigo",children:"Clan member"})}):e.jsx(He,{color:"gray",children:"No clan"})]})]}),e.jsx(ge,{asChild:!0,size:"3",color:"ruby",children:e.jsxs("a",{href:k,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(La,{size:16})," Open full profile"]})})]})]})]})});Xa.displayName="ContactDrawer";const Ir="pinnedContacts";function Qa(){const[t,n]=qe(Ir,[]),i=a.useMemo(()=>new Set(t),[t]),d=a.useCallback(l=>i.has(l),[i]),g=a.useCallback(l=>{l&&n(c=>{const p=new Set(c);return p.has(l)?p.delete(l):p.add(l),Array.from(p)})},[n]),u=a.useCallback(()=>n([]),[n]);return{pinned:i,isPinned:d,toggle:g,clearAll:u,count:i.size}}const Hr=s.div.withConfig({displayName:"ContactGrid__ListContainer",componentId:"sc-bjakel-0"})(["display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px;padding:4px;"]),Lr=s.div.withConfig({displayName:"ContactGrid__ItemContainer",componentId:"sc-bjakel-1"})(["display:flex;width:100%;& > *{flex:1;}"]),Wr=s.div.withConfig({displayName:"ContactGrid__Card",componentId:"sc-bjakel-2"})(["background:",";border:1px solid ",";border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:10px;cursor:pointer;transition:border-color 0.15s ease,transform 0.15s ease;&:hover{border-color:",";transform:translateY(-1px);}"],o.darkgray3,({$selected:t})=>t?o.red:o.darkgray1,o.red),Tr=s.div.withConfig({displayName:"ContactGrid__Top",componentId:"sc-bjakel-3"})(["display:flex;align-items:center;gap:10px;"]),Er=s.div.withConfig({displayName:"ContactGrid__Right",componentId:"sc-bjakel-4"})(["margin-left:auto;display:flex;align-items:center;gap:4px;"]),Fr=s.div.withConfig({displayName:"ContactGrid__Stats",componentId:"sc-bjakel-5"})(["display:grid;grid-template-columns:repeat(2,1fr);gap:4px 10px;font-size:11px;color:",";"],o.gray3),ot=s.div.withConfig({displayName:"ContactGrid__StatRow",componentId:"sc-bjakel-6"})(["display:flex;justify-content:space-between;gap:8px;"]),$r=s.div.withConfig({displayName:"ContactGrid__Footer",componentId:"sc-bjakel-7"})(["display:flex;justify-content:space-between;align-items:center;font-size:10px;color:",";"],o.gray5),Rr=a.forwardRef(function({children:n,style:i},d){return e.jsx(Hr,{ref:d,style:i,children:n})}),Vr={List:Rr,Item:Lr},Ja=a.memo(({rows:t,selectedIds:n,onToggleSelect:i,onRowClick:d})=>{const{isPinned:g,toggle:u}=Qa(),l=a.useMemo(()=>[...t].sort((c,p)=>{const m=g(c.account_id)?0:1,_=g(p.account_id)?0:1;return m!==_?m-_:(p.overallWn8??0)-(c.overallWn8??0)}),[t,g]);return e.jsx(Wn,{style:{height:"70vh"},data:l,components:Vr,itemContent:(c,p)=>{const m=n.has(p.account_id);return e.jsxs(Wr,{$selected:m,onClick:()=>d(p.account_id),children:[e.jsxs(Tr,{children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",minWidth:0},children:[e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx(xt,{lastBattleTime:p.last_battle_time,logoutAt:p.logout_at}),e.jsx(Qe,{accountId:p.account_id,nickname:p.nickname}),p.hasMod&&e.jsx(w,{message:"Used Tomato.gg in the last 30 days",children:e.jsx("span",{style:{display:"inline-flex"},children:e.jsx(ze,{size:14})})})]}
6),e.jsx("span",{style:{fontSize:10,color:o.gray5},children:e.jsx(ft,{clan:p.clan})})]}),e.jsxs(Er,{onClick:_=>_.stopPropagation(),children:[e.jsx(w,{message:g(p.account_id)?"Unpin":"Pin to top",children:e.jsx(Te,{size:"1",variant:"ghost",color:g(p.account_id)?"ruby":"gray",onClick:()=>u(p.account_id),"aria-label":"Pin",children:g(p.account_id)?e.jsx(Ma,{size:14,weight:"fill"}):e.jsx(Aa,{size:14})})}),e.jsx(Ie,{checked:m,onCheckedChange:()=>i(p.account_id)})]})]}),e.jsxs(Fr,{children:[e.jsxs(ot,{children:[e.jsx("span",{children:"WN8"}),e.jsx("strong",{style:p.overallWn8?X(F(p.overallWn8)):{color:o.gray5},children:p.overallWn8?Math.round(p.overallWn8).toLocaleString():"—"})]}),e.jsxs(ot,{children:[e.jsx("span",{children:"Recent WN8"}),e.jsx("strong",{style:(p.recentBattles??0)>=50&&(p.recentWn8??0)>0?X(F(p.recentWn8??0)):{color:o.gray5},children:(p.recentBattles??0)>=50&&(p.recentWn8??0)>0?Math.round(p.recentWn8??0).toLocaleString():"—"})]}),e.jsxs(ot,{children:[e.jsx("span",{children:"WR"}),e.jsxs("strong",{style:{color:o.gray1},children:[p.winrate.toFixed(1),"%"]})]}),e.jsxs(ot,{children:[e.jsx("span",{children:"DPG"}),e.jsx("strong",{style:{color:o.gray1},children:Math.round(p.avg_damage_dealt).toLocaleString()})]})]}),e.jsxs($r,{children:[e.jsx(ke,{ts:p.last_battle_time,prefix:"Last"}),e.jsxs("span",{children:[Math.round(p.battles).toLocaleString()," battles"]})]})]})}})});Ja.displayName="ContactGrid";const Br=s.div.withConfig({displayName:"ContactsGroups__Wrap",componentId:"sc-132iaqo-0"})(["display:flex;flex-wrap:wrap;gap:6px;padding:8px 0;"]),Zr=s.button.withConfig({displayName:"ContactsGroups__ChipBtn",componentId:"sc-132iaqo-1"})(["display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid ",";background:",";color:",";font-size:12px;cursor:pointer;transition:all 0.15s ease;font-family:inherit;&:hover{color:",";border-color:",";}"],({$active:t,$danger:n})=>t?n?o.red:o.primary1:o.darkgray0,({$active:t,$danger:n})=>t?`${n?o.red:o.primary1}22`:"transparent",({$active:t})=>t?o.gray1:o.gray3,o.gray1,({$danger:t})=>t?o.red:o.primary1),zr=s.span.withConfig({displayName:"ContactsGroups__Count",componentId:"sc-132iaqo-2"})(["font-family:var(--font-roboto-mono);font-size:11px;color:",";background:",";padding:1px 6px;border-radius:999px;"],({$active:t})=>t?o.gray2:o.gray5,o.darkgray2);function Dr(t){switch(t){case"friends":return e.jsx(fn,{size:14});case"group":return e.jsx(Bt,{size:14});case"ungrouped":return e.jsx(Bt,{size:14});case"blocked":return e.jsx($a,{size:14});case"muted":return e.jsx(Wa,{size:14});case"ignored":return e.jsx(Tn,{size:14})}}const en=a.memo(({buckets:t,activeId:n,onSelect:i})=>t.length===0?null:e.jsx(Br,{children:t.map(d=>{const g=d.id===n,u=d.kind==="blocked"||d.kind==="muted"||d.kind==="ignored";return e.jsxs(Zr,{$active:g,$danger:u,onClick:()=>i(d.id),children:[Dr(d.kind),e.jsx("span",{children:d.label}),e.jsx(zr,{$active:g,children:d.accountIds.length})]},d.id)})}));en.displayName="ContactsGroups";const Or="contactsColumnVisibility",ht=[{id:"select",label:"",locked:!0,defaultVisible:!0},{id:"nickname",label:"Player",locked:!0,defaultVisible:!0},{id:"overallWn8",label:"WN8",defaultVisible:!0},{id:"recentWn8",label:"Recent WN8",defaultVisible:!1},{id:"wn8_delta",label:"Δ WN8",defaultVisible:!0},{id:"winrate",label:"Winrate",defaultVisible:!0},{id:"avg_damage_dealt",label:"DPG",defaultVisible:!0},{id:"avg_damage_assisted",label:"Assist",defaultVisible:!0},{id:"hits_percents",label:"Hits %",defaultVisible:!0},{id:"survival_rate",label:"Survival %",defaultVisible:!0},{id:"max_damage",label:"Max DMG",defaultVisible:!1},{id:"max_xp",label:"Max XP",defaultVisible:!1},{id:"max_frags",label:"Max Frags",defaultVisible:!1},{id:"avg_battles_on_stunning_vehicles",label:"Arty %",defaultVisible:!0},{id:"battles",label:"Battles",defaultVisible:!0},{id:"avgTier",label:"Avg Tier",defaultVisible:!1},{id:"last_battle_time",label:"Last battle",defaultVisible:!0},{id:"created_at",label:"Joined",defaultVisible:!1}];function At(){return Object.fromEntries(ht.map(t=>[t.id,t.defaultVisible!==!1]))}function Pr(){const[t,n]=qe(Or,At()),i=a.useMemo(()=>{const u=At();for(const l of Object.keys(t))l in u&&(u[l]=t[l]);
6for(const l of ht)l.locked&&(u[l.id]=!0);return u},[t]),d=a.useCallback(u=>{ht.find(c=>c.id===u)?.locked||n(c=>({...c,[u]:!i[u]}))},[n,i]),g=a.useCallback(()=>n(At()),[n]);return{visibility:i,toggle:d,reset:g}}const Gr=s.div.withConfig({displayName:"ContactsHeader__Bar",componentId:"sc-10etc1u-0"})(["display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:10px;background:",";border:1px solid ",";border-radius:8px;"],o.darkgray3,o.darkgray1),aa=s.div.withConfig({displayName:"ContactsHeader__ChipRow",componentId:"sc-10etc1u-1"})(["display:flex;flex-wrap:wrap;gap:6px;align-items:center;"]),Nt=s.button.withConfig({displayName:"ContactsHeader__Chip",componentId:"sc-10etc1u-2"})(["border:1px solid ",";background:",";color:",";border-radius:999px;padding:4px 10px;font-size:12px;cursor:pointer;transition:all 0.15s ease;font-family:inherit;&:hover{color:",";border-color:",";}"],({$active:t})=>t?o.red:o.darkgray0,({$active:t})=>t?`${o.red}22`:"transparent",({$active:t})=>t?o.gray1:o.gray3,o.gray1,o.red),qr=s.div.withConfig({displayName:"ContactsHeader__Spacer",componentId:"sc-10etc1u-3"})(["flex:1;"]),Ur=s.div.withConfig({displayName:"ContactsHeader__Group",componentId:"sc-10etc1u-4"})(["display:flex;align-items:center;gap:6px;"]),Yr=s.span.withConfig({displayName:"ContactsHeader__Label",componentId:"sc-10etc1u-5"})(["font-size:11px;color:",";text-transform:uppercase;letter-spacing:1px;font-family:var(--font-roboto-mono);"],o.gray5),na=s.span.withConfig({displayName:"ContactsHeader__IconLabel",componentId:"sc-10etc1u-6"})(["display:inline-flex;align-items:center;justify-content:center;gap:4px;svg{display:block;flex-shrink:0;}"]),Kr=[{id:"all",label:"All",tooltip:"Show contacts regardless of last activity"},{id:"online",label:"Online",tooltip:"Active within the last 15 minutes"},{id:"active7d",label:"≤7d",tooltip:"Last battle within the past 7 days"},{id:"active30d",label:"≤30d",tooltip:"Last battle within the past 30 days"},{id:"inactive90d",label:"Inactive 90d+",tooltip:"No battles in the last 90 days"}],tn=a.memo(({filter:t,setFilter:n,onResetFilters:i,view:d,setView:g,selectedCount:u,onClearSelection:l,onCompare:c,onCopyIds:p,onExportCsv:m,canSameClanFilter:_,totalShown:k,totalAvailable:f,columnVisibility:j,toggleColumn:V,resetColumns:N,density:I,setDensity:H,searchInputRef:O})=>{const D=(T,P)=>n({...t,[T]:P}),Z=t.search.trim()!==""||t.activity!=="all"||t.onlyTomato||t.onlySameClan;return e.jsxs(Gr,{children:[e.jsx(w,{message:"Search by nickname or clan tag · press / to focus",children:e.jsx($n,{size:"2",placeholder:"Search nickname or [TAG]",value:t.search,onChange:T=>D("search",T.target.value),style:{minWidth:220},ref:O,children:e.jsx(Rn,{children:e.jsx(yn,{size:14})})})}),e.jsxs(Ur,{children:[e.jsx(w,{message:"Filter contacts by their last battle / login activity",children:e.jsx(Yr,{children:"Activity"})}),e.jsx(aa,{children:Kr.map(T=>e.jsx(w,{message:T.tooltip,children:e.jsx(Nt,{$active:t.activity===T.id,onClick:()=>D("activity",T.id),children:T.label})},T.id))})]}),e.jsxs(aa,{children:[e.jsx(w,{message:"Show only contacts that used the Tomato.gg mod in the last 30 days",children:e.jsx(Nt,{$active:t.onlyTomato,onClick:()=>D("onlyTomato",!t.onlyTomato),children:"Tomato users"})}),_&&e.jsx(w,{message:"Show only contacts in the same clan as you",children:e.jsx(Nt,{$active:t.onlySameClan,onClick:()=>D("onlySameClan",!t.onlySameClan),children:"Same clan"})}),Z&&e.jsx(w,{message:"Clear search, activity and quick filters",children:e.jsxs(ge,{size:"1",variant:"ghost",color:"gray",onClick:i,children:[e.jsx(En,{size:14})," Reset"]})})]}),e.jsx(qr,{}),e.jsx(w,{message:`${k} contacts match the current filters out of ${f} total in this bucket`,children:e.jsxs(He,{color:"gray",variant:"soft",children:[k," / ",f]})}),e.jsxs(pt,{size:"1",value:d,onValueChange:T=>g(T),children:[e.jsx(Le,{value:"table",children:e.jsxs(na,{children:[e.jsx(Fn,{size:14})," Table"]})}),e.jsx(Le,{value:"grid",children:e.jsxs(na,{children:[e.jsx(Za,{size:14})," Grid"]})})]}),d==="table"&&e.jsx(w,{message:I==="comfortable"?"Switch to compact rows (denser table)":"Switch to comfortable rows",children:e.jsx(Te,{size:"1",variant:"soft",color:"gray",onClick:()=>H(I==="comfortable"?"compact":"comfortable"),"aria-label":"Toggle table density",children:e.jsx(Va,{size:14})})}),d==="table"&&e.jsxs(ct,{children:[e.jsx(dt,{children:e.jsxs(ge,{size:"1",variant:"soft",color:"gray",title:"Show / hide table columns and reset to defaults",children:[e.jsx(Ha,{size:14})," Columns"]})}),e.jsx(mt,{size:"1",style:{maxWidth:240},children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[ht.filter(T=>!!T.label).map(T=>e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,color:T.locked?o.gray5:o.gray2,fontSize:12,cursor:T.locked?"not-allowed":"pointer"},children:[e.jsx(Ie,{checked:!!j[T.id],disabled:T.locked,onCheckedChange:()=>V(T.id)}),T.label]},T.id)),e.jsx(ge,{size:"1",variant:"soft",color:"gray",onClick:N,style:{marginTop:4},children:"Reset"})]})})]}),u>0&&e.jsxs(e.Fragment,{children:[e.jsxs(He,{color:"ruby",variant:"soft",children:[u," selected"]}),e.jsx(w,{message:u<2?"Select 2 – 6 contacts to compare · shortcut: c":u>6?"Compare supports at most 6 contacts at once":"Open side-by-side comparison of selected contacts · shortcut: c",children:e.jsxs(ge,{size:"1",variant:"soft",color:"indigo",onClick:c,disabled:u<2||u>6,children:[e.jsx(Ea,{size:14})," Compare"]})}),e.jsx(w,{message:"Copy comma-separated account IDs of selected contacts to clipboard",children:e.jsxs(ge,{size:"1",variant:"soft",onClick:p,children:[e.jsx(Fa,{size:14})," Copy IDs"]})}),e.jsx(w,{message:"Download the selected contacts as CSV · shortcut: e",children:e.jsxs(ge,{size:"1",variant:"soft",onClick:m,children:[e.jsx(Ht,{size:14})," CSV"]})}),e.jsx(w,{message:"Clear selection",children:e.jsx(Te,{size:"1",variant:"ghost",color:"gray",onClick:l,"aria-label":"Clear selection",children:e.jsx(za,{size:16})})})]}),u===0&&e.jsx(w,{message:"Download all currently filtered contacts as CSV · shortcut: e",children:e.jsxs(ge,{size:"1",variant:"ghost",color:"gray",onClick:m,children:[e.jsx(Ht,{size:14})," CSV"]})})]})});tn.displayName="ContactsHeader";const Xr="contactsDistributionVisibility",Xe=[{id:"wn8",label:"WN8 distribution",tooltip:"Friends grouped by overall WN8. M = median across friends, avg = average, You = your own position.",defaultVisible:!0},{id:"recentWn8",label:"Recent WN8 distribution",tooltip:"Last-28-day WN8 distribution among friends with ≥ 50 recent battles. Compare with overall WN8 to spot collective hot or cold streaks.",defaultVisible:!0},{id:"formDelta",label:"Form delta",tooltip:"Recent WN8 minus overall WN8 per friend (≥ 50 recent battles). Positive values mean improving; negative values mean slumping.",defaultVisible:!0},{id:"tier",label:"Tier distribution",tooltip:"Friends grouped by their average tank tier. Higher avg tier usually means harder matchmaking.",defaultVisible:!0},{id:"battleVolume",label:"Battle volume",tooltip:"Friends grouped by lifetime battle count. Useful to know who's a fresh account vs a battle-hardened veteran.",defaultVisible:!0},{id:"accountAge",label:"Account age",tooltip:"Friends grouped by account age in years. Pairs nicely with battle volume to spot inactive long-time accounts.",defaultVisible:!0},{id:"winrate",label:"Winrate distribution",tooltip:"Friends grouped by overall winrate. Uses the same colour scale as WR badges across the rest of the app.",defaultVisible:!1},{id:"recentWinrate",label:"Recent winrate",tooltip:"Last-28-day winrate distribution among friends with ≥ 50 recent battles. Compare with overall winrate to see who's currently swinging above or below their long-term level.",defaultVisible:!1},{id:"dpg",label:"Avg damage (DPG)",tooltip:"Friends grouped by average damage per game. Skill-tier colours mirror the WN8 scale for quick comparison.",defaultVisible:!1},{id:"survival",label:"Survival rate",tooltip:"Friends grouped by % battles survived. Higher survival rate often correlates with patient, positional play.",defaultVisible:!1},{id:"hits",label:"Hit rate",tooltip:"Friends grouped by % shots that connect. Useful for spotting the snipers vs the spammers.",defaultVisible:!1},{id:"personalRating",label:"Personal Rating (PR)",tooltip:"Friends grouped by Wargaming's Personal Rating. Anchored to WN8-style colours so the scale reads the same across the app.",defaultVisible:!1},{id:"avgAssist",label:"Avg assist",tooltip:"Friends grouped by average damage assisted (sp
6otting + tracking + radio). High values usually mean dedicated scouts and supports.",defaultVisible:!1},{id:"fragsPerBattle",label:"Frags / battle",tooltip:"Friends grouped by average kills per battle. A handy aggressiveness / clean-up indicator that pairs well with DPG.",defaultVisible:!1},{id:"avgXp",label:"Avg XP",tooltip:"Friends grouped by average XP per battle. Captures impact better than winrate alone since it rewards damage, spotting and survival.",defaultVisible:!1},{id:"artyShare",label:"Arty share",tooltip:"Friends grouped by % of their battles spent in artillery. Useful for spotting the dedicated SPG mains.",defaultVisible:!1},{id:"inactivity",label:"Days since last battle",tooltip:"Friends grouped by how long it's been since their last battle. Pairs with Churn risk to spot who's drifting away.",defaultVisible:!1}];function St(){return Object.fromEntries(Xe.map(t=>[t.id,t.defaultVisible]))}function Qr(){const[t,n]=qe(Xr,St()),i=a.useMemo(()=>{const l=St();for(const c of Object.keys(t))c in l&&(l[c]=t[c]);return l},[t]),d=a.useCallback(l=>{n(c=>({...c,[l]:!i[l]}))},[n,i]),g=a.useCallback(()=>n(St()),[n]),u=a.useMemo(()=>Xe.filter(l=>i[l.id]),[i]);return{visibility:i,toggle:d,reset:g,visibleDefs:u}}const Jr=["Tomato","Panzer","Steel","Iron","Shadow","Lone","Mighty","Silent","Crimson","Velvet","Brave","Wild","Frosty","Stormy","Atomic","Rusty","Ghost","Phantom","Lucky","Quiet","Tiger","Wolf","Eagle","Hawk","Lynx","Cobra","Viper","Bear","Hunter","Reaper"],ei=["Wolf","Tank","Knight","Sniper","Driver","Crew","Striker","Hunter","Captain","Cadet","Major","Colonel","General","Recruit","Veteran","Pilot","Scout","Brawler","Rogue","Slayer","Champion","Rookie","Trooper","Operator","Commander","Tactician","Marshal","Sergeant","Specialist","Engineer"],oa=["TMTO","STEEL","PNZR","WOLF","BEAR","FROST","STORM","RNG","EAGLE","RUST","GHOST","PHNTM","VPR","HAWK","ROGUE","MOON","SUN","STAR","FIRE","ICE"],ti=["Tomato Brigade","Steel Sentinels","Panzer Pack","Lone Wolves","Bear Battalion","Frost Riders","Storm Front","RNG Reapers","Eagle Eye Squad","Rust Raiders","Ghost Recon","Phantom Crew","Viper Strike","Hawk Hunters","Rogue Republic","Moonlight Marauders","Sunset Squad","Starline Tankers","Firebrand Crew","Ice Kings"],ra=["#cc7a3b","#7ECBF9","#3CCB7A","#F9CB40","#dc322c","#b08059","#a78bfa","#22d3ee","#f472b6","#fbbf24"];function ai(t){let n=t>>>0;return function(){n|=0,n=n+1831565813|0;let i=n;return i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61),((i^i>>>14)>>>0)/4294967296}}function ia(t,n){return t[Math.floor(n()*t.length)]}function B(t,n,i){return Math.floor(t()*(i-n+1))+n}function $e(t,n,i){return t()*(i-n)+n}function ni(t,n){const i=ia(Jr,t),d=ia(ei,t),g=n%4===0?`_${B(t,10,9999)}
6`:"";return`${i}${d}${g}`}function oi(t,n){if(t()>n)return null;const i=Math.floor(t()*oa.length);return{clan_id:99e6+B(t,1,99999),tag:oa[i],name:ti[i],color:ra[i%ra.length],members_count:B(t,5,100)}}function an(t){if(t.length===0)return t;const n=ai(t.length*1337+42),i=Math.floor(Date.now()/1e3);return t.map((d,g)=>{const u=9e7+g,l=ni(n,g),c=B(n,1500,8e4),p=Math.round(c*$e(n,.42,.62)),m=c-p-B(n,0,Math.min(20,c)),_=c-p-m,k=p/c*100,f=B(n,600,3200),j=f*c,V=B(n,4e3,14e3),N=B(n,200,3300),I=Math.max(100,N+B(n,-600,600)),H=B(n,0,1500),O=$e(n,38,65),D=$e(n,5,9.5),Z=B(n,1500,12500),T=B(n,0,3600*24*60),P=i-T,U=P-B(n,0,3600*6);return{account_id:u,created_at:i-B(n,3600*24*365,3600*24*365*8),updated_at:P,nickname:l,global_rating:Z,logout_at:U,last_battle_time:P,clan_id:void 0,spotted:B(n,100,3e4),battles_on_stunning_vehicles:B(n,0,c),max_xp:B(n,1500,8e3),avg_damage_blocked:B(n,100,2500),direct_hits_received:B(n,100,5e4),explosion_hits:B(n,0,1e4),piercing_received:B(n,100,4e4),piercings:B(n,100,2e5),max_damage_tank_id:0,xp:B(n,1e5,5e7),survived_battles:B(n,100,c),dropped_capture_points:B(n,0,5e3),hits_percents:B(n,50,90),draws:Math.max(0,_),max_xp_tank_id:0,battles:c,damage_received:B(n,1e5,5e7),avg_damage_assisted:B(n,100,1500),max_frags_tank_id:0,avg_damage_assisted_track:B(n,0,800),frags:B(n,100,1e5),stun_number:B(n,0,1e4),avg_damage_assisted_radio:B(n,0,800),capture_points:B(n,0,5e3),stun_assisted_damage:B(n,0,1e6),max_damage:V,hits:B(n,100,5e5),battle_avg_xp:B(n,200,1500),wins:p,losses:Math.max(0,m),damage_dealt:j,no_damage_direct_hits_received:B(n,100,5e3),max_frags:B(n,3,13),shots:B(n,100,3e5),explosion_hits_received:B(n,0,5e3),tanking_factor:$e(n,.5,1.5),winrate:k,avg_battles_on_stunning_vehicles:$e(n,0,1),survival_rate:$e(n,20,70),avg_damage_dealt:f,avg_pens:$e(n,60,95),hasMod:n()<.18,clan:oi(n,.7),overallWn8:N,recentWn8:I,recentBattles:H,recentWinrate:O,overallAvgTier:D}})}function ri(t){return t&&an([t])[0]}const ii=s.button.withConfig({displayName:"OnlineFriendCard__Card",componentId:"sc-e5npxe-0"})(["display:grid;grid-template-columns:1fr;grid-template-rows:auto auto;column-gap:8px;row-gap:2px;align-items:center;padding:6px 10px;background:",";border:1px solid ",";border-radius:6px;color:inherit;text-align:left;cursor:pointer;width:100%;min-width:0;transition:border-color 120ms ease,transform 120ms ease;&:hover{border-color:",";transform:translateY(-1px);}"],o.darkgray2,o.darkgray1,o.gray5),si=s.div.withConfig({displayName:"OnlineFriendCard__Header",componentId:"sc-e5npxe-1"})(["display:flex;align-items:center;gap:6px;min-width:0;"]),li=s.span.withConfig({displayName:"OnlineFriendCard__Nickname",componentId:"sc-e5npxe-2"})(["color:",";font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1 1 auto;"],o.gray1),ci=s.span.withConfig({displayName:"OnlineFriendCard__ClanTagInline",componentId:"sc-e5npxe-3"})(["font-family:var(--font-roboto-mono);font-size:10px;font-weight:600;flex-shrink:0;"]),sa=s.span.withConfig({displayName:"OnlineFriendCard__Pr",componentId:"sc-e5npxe-4"})(["font-family:var(--font-roboto-mono);font-size:10px;font-weight:600;flex-shrink:0;"]),di=s.div.withConfig({displayName:"OnlineFriendCard__SubLine",componentId:"sc-e5npxe-5"})(["display:flex;align-items:center;gap:6px;font-size:10px;color:",";font-family:var(--font-roboto-mono);min-width:0;"],o.gray4),rt=s.span.withConfig({displayName:"OnlineFriendCard__VehicleSlot",componentId:"sc-e5npxe-6"})(["display:inline-flex;align-items:center;gap:4px;overflow:hidden;min-width:0;flex:1 1 auto;"]),mi=s.span.withConfig({displayName:"OnlineFriendCard__VehicleImg",componentId:"sc-e5npxe-7"})(["position:relative;display:inline-block;width:28px;height:14px;flex-shrink:0;"]),it=s.span.withConfig({displayName:"OnlineFriendCard__VehicleName",componentId:"sc-e5npxe-8"})(["color:",";font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;"],o.gray2),pi=s.span.withConfig({displayName:"OnlineFriendCard__PlatoonBadge",componentId:"sc-e5npxe-9"})(["display:inline-flex;align-items:center;flex-shrink:0;line-height:0;"]),gi=s.span.withConfig({displayName:"OnlineFriendCard__PendingDot",componentId:"sc-e5npxe-10"})(["display:inline-block;width:6px;height:6px;border-radius:50%;background:",";margin-left:2px;animation:pending-pulse 1200ms ease-in-out infinite;@keyframes pending-pulse{0%,100%{opacity:0.4;}50%{opacity:1;}}@media (prefers-reduced-motion:reduce){animation:none;}"],o.darkgray1),hi=s.div.withConfig({displayName:"OnlineFriendCard__TooltipBody",componentId:"sc-e5npxe-11"})(["display:flex;flex-direction:column;gap:6px;min-width:220px;max-width:280px;"]),be=s.div.withConfig({displayName:"OnlineFriendCard__TooltipRow",componentId:"sc-e5npxe-12"})(["display:flex;justify-content:space-between;gap:12px;font-size:11px;line-height:1.3;color:",";"],o.gray3),ve=s.span.withConfig({displayName:"OnlineFriendCard__TooltipLabel",componentId:"sc-e5npxe-13"})(["color:",";font-family:var(--font-roboto-mono);font-size:10px;text-transform:uppercase;letter-spacing:0.5px;"],o.gray5),we=s.span.withConfig({displayName:"OnlineFriendCard__TooltipValue",componentId:"sc-e5npxe-14"})(["color:",";text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"],o.gray1),ui=s.div.withConfig({displayName:"OnlineFriendCard__TooltipDivider",componentId:"sc-e5npxe-15"}
6)(["height:1px;background:",";margin:2px 0;"],o.darkgray1),nn=a.memo(({contact:t,onSelect:n,disableLazyFetch:i})=>{const d=!i&&!!t.hasMod&&t.account_id>0,{data:g,isLoading:u}=Zn(d?t.account_id:null,{limit:1}),c=g?.data?.[0]?.battles??[],p=c[0],m=a.useMemo(()=>c.reduce((N,I)=>I?.platoon>0?N+1:N,0),[c]),_=t.overallWn8??0,k=t.recentWn8??0,f=k>0?k:_,j=Math.max(t.last_battle_time||0,t.logout_at||0),V=e.jsxs(hi,{children:[e.jsxs(be,{children:[e.jsx(ve,{children:"Player"}),e.jsxs(we,{children:[t.clan?.tag&&e.jsxs("span",{style:{color:t.clan.color||o.gray4},children:["[",t.clan.tag,"] "]}),t.nickname]})]}),_>0&&e.jsxs(be,{children:[e.jsx(ve,{children:"WN8"}),e.jsx(we,{children:e.jsx("span",{style:X(F(_)),children:Math.round(_).toLocaleString()})})]}),k>0&&e.jsxs(be,{children:[e.jsx(ve,{children:"Recent WN8"}),e.jsx(we,{children:e.jsx("span",{style:X(F(k)),children:Math.round(k).toLocaleString()})})]}),j>0&&e.jsxs(be,{children:[e.jsx(ve,{children:"Last battle"}),e.jsx(we,{children:e.jsx(ke,{ts:j})})]}),e.jsx(ui,{}),d?t.hasMod?u?e.jsxs(be,{children:[e.jsx(ve,{children:"Recent"}),e.jsx(we,{style:{color:o.gray4},children:"Loading recent battles…"})]}):p?e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ve,{children:"Last vehicle"}),e.jsxs(we,{children:[p.short_name," ",e.jsxs("span",{style:{color:o.gray5},children:["· T",p.tier]})]})]}),e.jsxs(be,{children:[e.jsx(ve,{children:"Result"}),e.jsxs(we,{children:[e.jsx("span",{style:{color:p.won?"#3CCB7A":"#E08C61"},children:p.won?"Win":"Loss"})," ",e.jsxs("span",{style:{color:o.gray4},children:["· ",Math.round(p.damage).toLocaleString()," dmg"]})]})]}),e.jsxs(be,{children:[e.jsx(ve,{children:"Platoon"}),e.jsx(we,{children:m>0?e.jsxs("span",{style:{color:"#7ECBF9"},children:["Yes — ",m," of last ",c.length," battles"]}):e.jsx("span",{style:{color:o.gray5},children:"Solo recently"})})]})]}):e.jsxs(be,{children:[e.jsx(ve,{children:"Recent"}),e.jsx(we,{style:{color:o.gray5},children:"No tracked battles yet"})]}):e.jsxs(be,{children:[e.jsx(ve,{children:"Mod"}),e.jsx(we,{style:{color:o.gray5},children:"Not installed — last vehicle & platoon unavailable"})]}):null]});return e.jsx(w,{message:V,position:"top",children:e.jsxs(ii,{type:"button",onClick:()=>n?.(t.account_id),"aria-label":`Open ${t.nickname}`,children:[e.jsxs(si,{children:[t.clan?.tag&&e.jsxs(ci,{style:{color:t.clan.color||o.gray4},children:["[",t.clan.tag,"]"]}),e.jsx(li,{title:t.nickname,children:t.nickname}),t.hasMod&&e.jsx(ze,{size:12,title:"Uses Tomato.gg mod"}),f>0?e.jsx(sa,{style:X(F(f)),children:Math.round(f).toLocaleString()}):e.jsx(sa,{style:{color:o.gray5},children:"—"})]}),e.jsxs(di,{children:[!d||!t.hasMod?e.jsx(rt,{children:e.jsxs(it,{style:{color:o.gray5},children:["Last battle ",e.jsx(ke,{ts:j})]})}):u?e.jsxs(rt,{children:[e.jsx(it,{children:"Loading last vehicle"}),e.jsx(gi,{})]}):p?e.jsxs(rt,{children:[p.image&&e.jsx(mi,{children:e.jsx("img",{loading:"lazy",decoding:"async",src:p.image,alt:p.short_name,sizes:"28px",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"contain"}})}),e.jsx(it,{title:p.short_name,children:p.short_name})]}):e.jsx(rt,{children:e.jsx(it,{style:{color:o.gray5},children:"No recent battles tracked"})}),m>0&&e.jsx(pi,{title:`Platooned in ${m} of last ${c.length} battles`,"aria-label":"Platoon",children:e.jsx("img",{loading:"lazy",decoding:"async",src:"/result_icons/squad/squad_icon.webp",alt:"",width:14,height:14})})]})]})})});nn.displayName="OnlineFriendCard";const q=[F(225),F(675),F(1125),F(1550),F(2200)],xi=Sa(()=>wa(()=>import("./nivo-pie.es-D-n0wKAa.js"),__vite__mapDeps([20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,19,18,17])).then(t=>t.ResponsivePie));s.div.withConfig({displayName:"ContactsOverview__Big",componentId:"sc-fr2crb-0"})(["font-size:28px;font-weight:700;color:",";line-height:1.1;"],o.gray1);const Se=s.div.withConfig({displayName:"ContactsOverview__Sub",componentId:"sc-fr2crb-1"})(["font-size:12px;color:",";"],o.gray4),Re=s.div.withConfig({displayName:"ContactsOverview__Row",componentId:"sc-fr2crb-2"})(["display:flex;align-items:center;justify-content:space-between;font-size:12px;color:",";"],o.gray3),It=s.div.withConfig({displayName:"ContactsOverview__PodiumList",componentId:"sc-fr2crb-3"})(["display:flex;flex-direction:column;gap:2px;"]),la=s.div.withConfig({displayName:"ContactsOverview__PodiumRow",componentId:"sc-fr2crb-4"})(["display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:6px;font-size:12px;color:",";padding:2px 0;"],o.gray2),ca=s.span.withConfig({displayName:"ContactsOverview__RankNumber",componentId:"sc-fr2crb-5"})(["text-align:right;font-family:var(--font-roboto-mono);font-weight:600;font-size:11px;color:",";"],({$rank:t})=>t===1?o.mastery_ace:t===2?o.gray2:t===3?o.gray4:o.gray6),fi=s.div.withConfig({displayName:"ContactsOverview__DistributionStack",componentId:"sc-fr2crb-6"})(["display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px;@media (max-width:720px){grid-template-columns:1fr;}"]),yi=s.div.withConfig({displayName:"ContactsOverview__DistRow",componentId:"sc-fr2crb-7"})(["display:flex;flex-direction:column;gap:6px;"]),bi=s.div.withConfig({displayName:"ContactsOverview__DistRowTitle",componentId:"sc-fr2crb-8"})(["display:flex;align-items:center;gap:6px;font-size:11px;text-transform:uppercase;letter-spacing:1px;color:",";font-family:var(--font-roboto-mono);"],o.gray4),on=s.button.withConfig({displayName:"ContactsOverview__DistRowRemove",componentId:"sc-fr2crb-9"})(["margin-left:auto;background:none;border:0;padding:0 4px;color:",";font-family:var(--font-roboto-mono);font-size:11px;line-height:1;cursor:pointer;opacity:0;transition:opacity 0.15s ease,color 0.15s ease;&:hover{color:",";}"],o.gray6,o.red),vi=s.div.withConfig({displayName:"ContactsOverview__DistRowHeader",componentId:"sc-fr2crb-10"})(["display:flex;align-items:center;&:hover ","{opacity:1;}"],on),da=s.div.withConfig({displayName:"ContactsOverview__PickerHeader",componentId:"sc-fr2crb-11"})(["font-size:11px;text-transform:uppercase;letter-spacing:0.5px;color:",";padding:4px 4px 6px;"],o.gray5),ma=s.label.withConfig({displayName:"ContactsOverview__PickerItem",componentId:"sc-fr2crb-12"})(["display:flex;align-items:center;gap:8px;
6cursor:pointer;user-select:none;padding:4px 4px;border-radius:4px;color:",";font-size:12px;&:hover{background:",";}"],o.gray2,o.darkgray2),wi=s.div.withConfig({displayName:"ContactsOverview__EmptyDistributions",componentId:"sc-fr2crb-13"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:24px 12px;color:",";font-size:12px;text-align:center;"],o.gray5),_i=s.div.withConfig({displayName:"ContactsOverview__DistributionWrap",componentId:"sc-fr2crb-14"})(["display:flex;flex-direction:column;gap:8px;margin-top:4px;"]),ji=s.div.withConfig({displayName:"ContactsOverview__DistributionTrack",componentId:"sc-fr2crb-15"})(["position:relative;margin-top:14px;"]),Ci=s.div.withConfig({displayName:"ContactsOverview__DistributionBarRoot",componentId:"sc-fr2crb-16"})(["display:flex;width:100%;height:14px;border-radius:4px;overflow:hidden;background:",";"],o.darkgray2),ki=s.div.withConfig({displayName:"ContactsOverview__YouMarker",componentId:"sc-fr2crb-17"})(["position:absolute;top:-12px;left:","%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;pointer-events:auto;cursor:default;color:",';font-size:9px;font-family:var(--font-roboto-mono);text-transform:uppercase;letter-spacing:0.5px;line-height:1;&::after{content:"";margin-top:2px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid ',";}"],({$left:t})=>t,o.gray1,o.gray1),Mi=s.div.withConfig({displayName:"ContactsOverview__LegendList",componentId:"sc-fr2crb-18"})(["display:flex;flex-wrap:wrap;gap:4px 10px;font-size:10px;color:",";"],o.gray4),Ai=s.span.withConfig({displayName:"ContactsOverview__LegendItem",componentId:"sc-fr2crb-19"})(["display:inline-flex;align-items:center;gap:4px;"]),Ni=s.span.withConfig({displayName:"ContactsOverview__LegendDot",componentId:"sc-fr2crb-20"})(["width:8px;height:8px;border-radius:2px;background:",";display:inline-block;"],({$color:t})=>t),Si=t=>{const n=[50,100,150,200,250,500,750,1e3];for(const i of n)if(t<=i)return i;return 1e3},pa=t=>{const n=t.filter(p=>Number.isFinite(p)&&p>0);if(n.length===0)return[{label:"Bad",min:0,max:450,color:F(225)},{label:"Below",min:450,max:900,color:F(675)},{label:"Average",min:900,max:1350,color:F(1125)},{label:"Good",min:1350,max:1750,color:F(1550)},{label:"Great+",min:1750,max:1/0,color:F(2200)}];const i=Math.max(...n),g=Si(i/12),u=Math.max(g,Math.ceil(i/g)*g),l=Math.min(20,Math.max(1,Math.round(u/g))),c=[];for(let p=0;p<l;p++){const m=p*g,_=(p+1)*g,k=p===l-1;c.push({label:k?`${m.toLocaleString()}+`:`${m.toLocaleString()}-${_.toLocaleString()}`,min:m,max:k?1/0:_,color:F(m+g/2)})}return c},ga=s.div.withConfig({displayName:"ContactsOverview__StatMarker",componentId:"sc-fr2crb-21"})(["position:absolute;top:-10px;left:","%;transform:translateX(-50%);color:",';font-family:var(--font-roboto-mono);font-size:9px;line-height:1;pointer-events:auto;cursor:default;&::after{content:"";display:block;margin:2px auto 0;width:1px;height:6px;background:',";}"],({$left:t})=>t,({$color:t})=>t,({$color:t})=>t),Ii=s.div.withConfig({displayName:"ContactsOverview__NameTooltipBody",componentId:"sc-fr2crb-22"})(["display:flex;flex-direction:column;gap:2px;font-size:11px;line-height:1.35;.head{font-weight:600;color:",";margin-bottom:2px;}.row{color:",";display:flex;justify-content:space-between;gap:10px;}.more{color:",";font-style:italic;}"],o.gray1,o.gray3,o.gray5),Hi=s.button.withConfig({displayName:"ContactsOverview__DistributionSegmentButton",componentId:"sc-fr2crb-23"})(["flex:",";background:",";border:0;padding:0;min-width:0;height:100%;cursor:",";transition:filter 0.15s ease;&:hover{filter:brightness(1.15);}"],({$flex:t})=>t,({$color:t})=>t,({$clickable:t})=>t?"pointer":"default"),ie=({buckets:t,ownValue:n,formatOwn:i,values:d,getNamesForBucket:g,onSegmentClick:u,allowNonPositive:l=!1})=>{const c=t.reduce((x,A)=>x+A.count,0),p=t.map(x=>c>0?x.count/c*100:0),m=x=>t.findIndex(A=>x>=A.min&&x<A.max),_=n!=null&&(l||n>0),k=(d??[]).filter(x=>Number.isFinite(x)&&(l||x>0)),f=_?[...k,n]:k,j=f.length>0,V=j?Math.min(...f):0,N=j?Math.max(...f):0,I=N-V,H=(()=>
6{if(!j)return t.map(C=>c>0?C.count/c*100:100/t.length);if(I<=0){const C=m(V);return t.map((L,y)=>y===C?100:0)}const x=t.map(C=>{const L=Math.max(C.min,V),y=Math.min(C.max,N);return Math.max(0,y-L)}),A=x.reduce((C,L)=>C+L,0);if(A<=0){const C=m(V);return t.map((L,y)=>y===C?100:0)}return x.map(C=>C/A*100)})(),O=x=>{if(!j)return-1;if(I<=0)return 50;const A=(x-V)/I;return Math.min(100,Math.max(0,A*100))},D=_?m(n):-1,Z=_?O(n):-1,T=D>=0?t[D].label:null;let P=-1,U=0,K=-1,re=0;if(k.length>0){U=te(k),re=k.reduce((A,C)=>A+C,0)/k.length,P=O(U),K=O(re);const x=3;Z>=0&&Math.abs(P-Z)<x&&(P=-1),(Z>=0&&Math.abs(K-Z)<x||P>=0&&Math.abs(K-P)<x)&&(K=-1)}if(c===0)return e.jsx(Se,{children:"No data"});const M=(x,A)=>{const C=p[A].toFixed(0),L=`${x.label}: ${x.count} (${C}%)`;if(!g||x.count===0)return L;const y=g(x.min,x.max);if(y.length===0)return L;const S=x.count-y.length;return e.jsxs(Ii,{children:[e.jsx("span",{className:"head",children:L}),y.map(G=>e.jsxs("span",{className:"row",children:[e.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:G.name}),e.jsx("span",{style:{color:o.gray5},children:i(G.value)})]},G.name)),S>0&&e.jsxs("span",{className:"more",children:["+",S," more"]})]})};return e.jsxs(_i,{children:[e.jsxs(ji,{children:[P>=0&&e.jsx(w,{message:`Median across friends: ${i(U)}`,children:e.jsx(ga,{$left:P,$color:o.gray4,children:"M"})}),K>=0&&e.jsx(w,{message:`Average across friends: ${i(re)}`,children:e.jsx(ga,{$left:K,$color:o.gray5,children:"avg"})}),Z>=0&&n!=null&&e.jsx(w,{message:`You: ${i(n)} (${T})`,children:e.jsx(ki,{$left:Z,children:"You"})}),e.jsx(Ci,{children:t.map((x,A)=>{if(H[A]<=0)return null;const C=!!u&&!!x.id;return e.jsx(w,{message:M(x,A),children:e.jsx(Hi,{type:"button",$flex:H[A],$color:x.color,$clickable:C,onClick:()=>{C&&u(x.id)},"aria-label":`${x.label}: ${x.count}`})},x.label)})})]}),e.jsx(Mi,{children:t.map(x=>e.jsxs(Ai,{children:[e.jsx(Ni,{$color:x.color}),e.jsx("span",{style:{color:o.gray3},children:x.label}),e.jsx("span",{children:x.count})]},x.label))})]})};s(ut).withConfig({displayName:"ContactsOverview__ClanRow",componentId:"sc-fr2crb-24"})(["display:grid;grid-template-columns:18px auto 1fr auto;align-items:center;gap:6px;padding:2px 0;font-size:12px;color:",";text-decoration:none;min-width:0;&:hover{color:",";}"],o.gray2,o.red);s.span.withConfig({displayName:"ContactsOverview__ClanRowName",componentId:"sc-fr2crb-25"})(["color:",";font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;"],o.gray4);const Li=s.div.withConfig({displayName:"ContactsOverview__ClanEmblemFallback",componentId:"sc-fr2crb-26"})(["width:14px;height:14px;background:",";border-radius:2px;"],o.darkgray2),Wi=s.div.withConfig({displayName:"ContactsOverview__ClansGrid",componentId:"sc-fr2crb-27"})(["display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));"]),Ti=s(ut).withConfig({displayName:"ContactsOverview__ClanCard",componentId:"sc-fr2crb-28"})(["display:flex;flex-direction:row;align-items:stretch;gap:10px;padding:8px;border-radius:8px;background:",";border:1px solid ",";text-decoration:none;color:inherit;min-width:0;transition:border-color 0.15s ease,transform 0.15s ease;&:hover{border-color:",";transform:translateY(-1px);}"],o.darkgray3,o.darkgray1,o.primary1),Ei=s.div.withConfig({displayName:"ContactsOverview__ClanEmblemSlot",componentId:"sc-fr2crb-29"})(["width:64px;height:64px;position:relative;flex-shrink:0;border-radius:6px;overflow:hidden;background:",";"],o.darkgray2),Fi=s.div.withConfig({displayName:"ContactsOverview__ClanCardBody",componentId:"sc-fr2crb-30"})(["display:flex;flex-direction:column;gap:5px;flex:1;min-width:0;"]),$i=s.div.withConfig({displayName:"ContactsOverview__ClanCardHeader",componentId:"sc-fr2crb-31"})(["display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:6px;row-gap:0;align-items:center;min-width:0;"]),Ri=s.div.withConfig({displayName:"ContactsOverview__ClanCardTitleColumn",componentId:"sc-fr2crb-32"})(["display:flex;flex-direction:column;min-width:0;gap:1px;"]),Vi=s.span.withConfig({displayName:"ContactsOverview__ClanTagText",componentId:"sc-fr2crb-33"})(["font-family:var(--font-roboto-mono);font-weight:700;font-size:14px;white-space:nowrap;"]),Bi=s.span.withConfig({displayName:"ContactsOverview__ClanCardName",componentId:"sc-fr2crb-34"})(["color:",";font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;"],o.gray3),Zi=s.span.withConfig({displayName:"ContactsOverview__ClanFriendsCount",componentId:"sc-fr2crb-35"})(["display:inline-flex;align-items:center;gap:3px;padding:2px 6px;border-radius:4px;background:",";color:",";font-family:var(--font-roboto-mono);font-size:11px;font-weight:600;white-space:nowrap;"],o.darkgray2,o.gray3),zi=s.div.withConfig({displayName:"ContactsOverview__ClanStatRow",componentId:"sc-fr2crb-36"})(["display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center;font-size:12px;color:",";"],o.gray4),ha=s.span.withConfig({displayName:"ContactsOverview__ClanStatLabel",componentId:"sc-fr2crb-37"})(["color:",";text-transform:uppercase;font-family:var(--font-roboto-mono);letter-spacing:0.5px;margin-right:3px;font-size:10px;"],o.gray5),Di=s.div.withConfig({displayName:"ContactsOverview__ClanFriendsTooltip",componentId:"sc-fr2crb-38"})(["display:flex;flex-direction:column;gap:2px;max-width:220px;font-size:11px;"]),Oi=s.div.withConfig({displayName:"ContactsOverview__ClanFriendsTooltipRow",componentId:"sc-fr2crb-39"})(["display:flex;align-items:center;justify-content:space-between;gap:8px;font-family:var(--font-roboto-mono);"]),Pi=s.div.withConfig({displayName:"ContactsOverview__ActivityChips",componentId:"sc-fr2crb-40"})(["display:flex;flex-wrap:wrap;gap:4px;"]),st=s.span.withConfig({displayName:"ContactsOverview__ActivityChip",componentId:"sc-fr2crb-41"})(["display:inline-flex;align-items:center;gap:3px;padding:1px 6px;border-radius:999px;background:",";color:",";font-family:var(--font-roboto-mono);font-size:10px;font-weight:600;"],({$color:t})=>`${t}22`,({$color:t})=>t),Gi=s.div.withConfig({displayName:"ContactsOverview__ClanBest",componentId:"sc-fr2crb-42"})(["font-size:11px;color:",";display:flex;align-items:center;gap:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;"],o.gray5),qi=s.div.withConfig({displayName:"ContactsOverview__OnlineStrip",componentId:"sc-fr2crb-43"})(["display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:6px;padding:2px 0 6px;"]),Ui=s.span.withConfig({displayName:"ContactsOverview__OnlineCount",componentId:"sc-fr2crb-44"})(["display:inline-flex;align-items:center;gap:5px;margin-left:auto;padding:1px 6px 1px 5px;font-size:9px;text-transform:uppercase;letter-spacing:0.5px;background:",";border-radius:999px;color:",";.dot{width:6px;height:6px;border-radius:50%;background:#3ccb7a;box-shadow:0 0 6px #3ccb7a;animation:online-pulse 1600ms ease-in-out infinite;}@keyframes online-pulse{0%,100%{opacity:1;transform:scale(1);}50%{opacity:0.55;transform:scale(0.85);}}@media (prefers-reduced-motion:reduce){.dot{animation:none;}}"],o.darkgray2,o.gray3),Yi=s.div.withConfig({displayName:"ContactsOverview__HeatGrid",componentId:"sc-fr2crb-45"})(["display:grid;grid-template-columns:36px repeat(7,1fr);grid-auto-rows:14px;gap:3px;margin-top:4px;"]),Ki=s.div.withConfig({displayName:"ContactsOverview__ActivityBo
6dy",componentId:"sc-fr2crb-46"})(["display:grid;grid-template-columns:minmax(140px,200px) minmax(0,1fr);gap:16px;align-items:stretch;flex:1;@media (max-width:720px){grid-template-columns:1fr;}"]),Xi=s.div.withConfig({displayName:"ContactsOverview__ActivityPieColumn",componentId:"sc-fr2crb-47"})(["display:flex;flex-direction:column;justify-content:center;gap:6px;"]),Qi=s.div.withConfig({displayName:"ContactsOverview__ActivityHeatColumn",componentId:"sc-fr2crb-48"})(["display:flex;flex-direction:column;justify-content:center;"]),ua=s.div.withConfig({displayName:"ContactsOverview__HeatHeader",componentId:"sc-fr2crb-49"})(["font-size:9px;font-family:var(--font-roboto-mono);color:",";text-align:center;line-height:14px;"],o.gray5),Ji=s.div.withConfig({displayName:"ContactsOverview__HeatRowLabel",componentId:"sc-fr2crb-50"})(["font-size:9px;font-family:var(--font-roboto-mono);color:",";line-height:14px;text-align:right;padding-right:4px;"],o.gray5),xa=s.div.withConfig({displayName:"ContactsOverview__HeatCell",componentId:"sc-fr2crb-51"})(["background:",";border-radius:2px;outline:",";outline-offset:",";cursor:",";border:",";box-sizing:border-box;"],({$intensity:t,$future:n})=>n?"transparent":t===0?o.darkgray2:`rgba(126, 203, 249, ${.2+.8*t})`,({$today:t})=>t?`1px solid ${o.red}`:"none",({$today:t})=>t?"1px":"0",({$future:t})=>t?"default":"pointer",({$future:t})=>t?"1px dashed rgba(120,120,120,0.18)":"none"),es=s.div.withConfig({displayName:"ContactsOverview__ChurnHero",componentId:"sc-fr2crb-52"})(["display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:center;padding:10px 12px;border-radius:8px;background:linear-gradient(135deg,rgba(249,203,64,0.12) 0%,"," 60%);border:1px solid rgba(249,203,64,0.25);"],o.darkgray3),ts=s.div.withConfig({displayName:"ContactsOverview__ChurnHeroIcon",componentId:"sc-fr2crb-53"})(["display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:rgba(249,203,64,0.18);color:#f9cb40;flex-shrink:0;"]),as=s.div.withConfig({displayName:"ContactsOverview__ChurnHeroText",componentId:"sc-fr2crb-54"})(["display:flex;flex-direction:column;gap:2px;min-width:0;"]),ns=s.div.withConfig({displayName:"ContactsOverview__ChurnHeroNumber",componentId:"sc-fr2crb-55"})(["display:flex;align-items:baseline;gap:6px;"]),os=s.span.withConfig({displayName:"ContactsOverview__ChurnHeroBig",componentId:"sc-fr2crb-56"})(["font-size:26px;font-weight:700;color:",";line-height:1;"],o.gray1),rs=s.div.withConfig({displayName:"ContactsOverview__ChurnHeroLabel",componentId:"sc-fr2crb-57"})(["font-size:11px;color:",";text-transform:uppercase;letter-spacing:0.5px;font-family:var(--font-roboto-mono);"],o.gray4),is=s.div.withConfig({displayName:"ContactsOverview__ChurnSectionLabel",componentId:"sc-fr2crb-58"})(["display:flex;align-items:center;gap:6px;margin-top:4px;font-size:10px;font-family:var(--font-roboto-mono);text-transform:uppercase;letter-spacing:0.6px;color:",";"],o.gray5),ss=s.div.withConfig({displayName:"ContactsOverview__ChurnList",componentId:"sc-fr2crb-59"})(["display:flex;flex-direction:column;gap:2px;"]),ls=s.button.withConfig({displayName:"ContactsOverview__ChurnRow",componentId:"sc-fr2crb-60"})(["display:flex;align-items:center;gap:10px;background:none;border:0;padding:6px 8px;border-radius:6px;cursor:pointer;color:inherit;text-align:left;width:100%;transition:background 0.15s ease,transform 0.15s ease;&:hover{background:",";transform:translateX(2px);}"],o.darkgray2),cs=s.span.withConfig({displayName:"ContactsOverview__ChurnNickname",componentId:"sc-fr2crb-61"})(["max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:",";font-size:12px;font-weight:500;"],o.gray2),ds=s.div.withConfig({displayName:"ContactsOverview__ChurnDecayBar",componentId:"sc-fr2crb-62"})(["position:relative;width:80px;height:4px;border-radius:2px;background:",';overflow:hidden;flex-shrink:0;margin-left:auto;&::after{content:"";position:absolute;inset:0;width:',";background:",";border-radius:2px;}"],o.darkgray2,({$progress:t})=>`${Math.max(4,Math.min(100,t))}%`,({$color:t})=>t),ms=s.span.withConfig({displayName:"ContactsOverview__ChurnDays",componentId:"sc-fr2crb-63"})(["display:inline-flex;align-items:center;gap:3px;font-size:10px;font-family:var(--font-roboto-mono);font-weight:600;color:",";white-space:nowrap;min-width:32px;justify-content:flex-end;"],({$color:t})=>t),ps=s.div.withConfig({displayName:"ContactsOverview__ChurnEmpty",componentId:"sc-fr2crb-64"})(["display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 8px;color:",";text-align:center;font-size:12px;"],o.green),gs=s.div.withConfig({displayName:"ContactsOverview__ChurnMore",componentId:"sc-fr2crb-65"})(["margin-top:4px;padding:4px 8px;text-align:center;font-size:10px;font-family:var(--font-roboto-mono);text-transform:uppercase;letter-spacing:0.5px;color:",";border-top:1px dashed ",";"],o.gray5,o.darkgray1),hs=s.span.withConfig({displayName:"ContactsOverview__ImproveDelta",componentId:"sc-fr2crb-66"})(["padding:0.1em 0.45em;border-radius:0.35em;line-height:1.2;font-family:var(--font-roboto-mono);font-weight:600;font-size:11px;"]),us=s.span.withConfig({displayName:"ContactsOverview__Diff",componentId:"sc-fr2crb-67"})(["margin-left:6px;font-size:10px;font-family:var(--font-roboto-mono);color:",";white-space:nowrap;"],({$color:t})=>t),Ve=({own:t,median:n,format:i,suffix:d=""})=>
6{if(n===0)return null;const g=t-n;if(g===0)return null;const u=g>0,l=u?"▲":"▼",c=u?"#3CCB7A":"#E08C61",p=u?"+":"";return e.jsx(w,{message:`Your ${i(t)}${d} vs friends' median ${i(n)}${d}`,children:e.jsxs(us,{$color:c,children:[l," ",p,i(g),d]})})};function lt(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e4?`${Math.round(t/1e3)}k`:t>=1e3?`${(t/1e3).toFixed(1)}k`:Math.round(t).toLocaleString()}const xs=s.div.withConfig({displayName:"ContactsOverview__HeatTipBody",componentId:"sc-fr2crb-68"})(["display:flex;flex-direction:column;gap:6px;min-width:200px;max-width:260px;"]),fs=s.div.withConfig({displayName:"ContactsOverview__HeatTipHeader",componentId:"sc-fr2crb-69"})(["display:flex;align-items:center;justify-content:space-between;gap:8px;font-family:var(--font-roboto-mono);font-size:11px;color:",";"],o.gray3),ys=s.span.withConfig({displayName:"ContactsOverview__HeatTipDate",componentId:"sc-fr2crb-70"})(["color:",";font-weight:600;"],o.gray1),bs=s.span.withConfig({displayName:"ContactsOverview__HeatTipCount",componentId:"sc-fr2crb-71"})(["color:",";background:",";padding:1px 6px;border-radius:999px;font-size:10px;"],o.gray2,o.darkgray2),vs=s.div.withConfig({displayName:"ContactsOverview__HeatTipMeta",componentId:"sc-fr2crb-72"})(["display:flex;flex-wrap:wrap;gap:8px;font-size:10px;color:",";font-family:var(--font-roboto-mono);"],o.gray4),ws=s.ul.withConfig({displayName:"ContactsOverview__HeatTipFriendList",componentId:"sc-fr2crb-73"})(["list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:3px;font-size:11px;"]),_s=s.li.withConfig({displayName:"ContactsOverview__HeatTipFriendRow",componentId:"sc-fr2crb-74"})(["display:flex;align-items:center;justify-content:space-between;gap:8px;line-height:1.2;"]),js=s.span.withConfig({displayName:"ContactsOverview__HeatTipName",componentId:"sc-fr2crb-75"})(["color:",";overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto;min-width:0;"],o.gray2),Cs=s.div.withConfig({displayName:"ContactsOverview__HeatTipMore",componentId:"sc-fr2crb-76"})(["font-size:10px;color:",";font-family:var(--font-roboto-mono);"],o.gray5),ks=s.div.withConfig({displayName:"ContactsOverview__HeatTipEmpty",componentId:"sc-fr2crb-77"})(["font-size:11px;color:",";font-style:italic;"],o.gray5);function Ms({dateStr:t,cellFriends:n}){const i=n.length,d=a.useMemo(()=>{const c=n.map(p=>p.overallWn8||0).filter(p=>Number.isFinite(p)&&p>0);return c.length?Math.round(c.reduce((p,m)=>p+m,0)/c.length):0},[n]),u=a.useMemo(()=>[...n].sort((c,p)=>(p.overallWn8??0)-(c.overallWn8??0)),[n]).slice(0,6),l=Math.max(0,i-u.length);return e.jsxs(xs,{children:[e.jsxs(fs,{children:[e.jsx(ys,{children:t}),e.jsxs(bs,{children:[i," active"]})]}),i>0&&d>0&&e.jsx(vs,{children:e.jsxs("span",{children:["avg WN8 ",e.jsx("span",{style:X(F(d)),children:d.toLocaleString()})]})}),i===0?e.jsx(ks,{children:"No friends played on this day"}):e.jsxs(ws,{children:[u.map(c=>{const p=c.overallWn8??0;return e.jsxs(_s,{children:[e.jsxs(js,{title:c.nickname,children:[c.clan?.tag?e.jsxs("span",{style:{color:c.clan.color||o.gray4},children:["[",c.clan.tag,"] "]}):null,c.nickname]}),p>0?e.jsx("span",{style:{...X(F(p)),fontFamily:"var(--font-roboto-mono)",fontSize:10},children:Math.round(p).toLocaleString()}):e.jsx("span",{style:{color:o.gray5,fontFamily:"var(--font-roboto-mono)",fontSize:10},children:"—"})]},c.account_id)}),l>0&&e.jsxs(Cs,{children:["+",l," more"]})]})]})}const rn=a.memo(({friends:t,own:n,buckets:i,server:d,onSelectContact:g,hasPrem:u=!1})=>{const l=a.useMemo(()=>u?t:an(t),[u,t]),c=a.useMemo(()=>u?n:ri(n),[u,n]),p=a.useMemo(()=>{let r=l.length,h=0,v=0,b=0,R=0,$=Number.MAX_SAFE_INTEGER;for(const Y of l)h+=Y.global_rating||0,v+=Y.overallWn8||0,b+=Y.overallAvgTier||0,R+=Y.last_battle_time||0,Y.account_id<$&&($=Y.account_id);return`${r}|${h}|${Math.round(v)}|${Math.round(b*10)}|${R}|${$}`},[l]),m=a.useMemo(()=>{const r={online:0,"≤24h":0,"≤7d":0,"≤30d":0,Inactive:0};for(const h of l){const v=Ze(h.last_battle_time,h.logout_at);v==="online"?r.online+=1:v==="d1"?r["≤24h"]+=1:v==="d7"?r["≤7d"]+=1:v==="d30"?r["≤30d"]+=1:r.Inactive+=1}return r},[p]),_=a.useMemo(()=>{const r=[...l.map(v=>v.overallWn8??0),c?.overallWn8??0];
6return pa(r).map(v=>({...v,count:l.filter(b=>{const R=b.overallWn8??0;return R>0&&R>=v.min&&R<v.max}).length}))},[p,c?.overallWn8]),k=a.useMemo(()=>{const r=new Map;for(const h of l){if(!h.clan)continue;const v=String(h.clan.clan_id),b=r.get(v)??{tag:h.clan.tag,name:h.clan.name,clanId:h.clan.clan_id,color:h.clan.color,emblem:h.clan.emblem,members:[]};b.members.push(h),r.set(v,b)}return Array.from(r.values()).map(h=>{const v=h.members.map(z=>z.overallWn8??0).filter(z=>z>0),b=h.members.map(z=>z.winrate||0).filter(z=>z>0),R=h.members.reduce((z,Q)=>z+(Q.battles||0),0),$={online:0,d7:0,d30:0,inactive:0};for(const z of h.members){const Q=Ze(z.last_battle_time,z.logout_at);Q==="online"?$.online++:Q==="d1"||Q==="d7"?$.d7++:Q==="d30"?$.d30++:$.inactive++}const Y=[...h.members].filter(z=>(z.overallWn8??0)>0).sort((z,Q)=>(Q.overallWn8??0)-(z.overallWn8??0))[0];return{...h,count:h.members.length,medianWn8:v.length?Math.round(te(v)):0,medianWr:b.length?Math.round(te(b)*10)/10:0,totalBattles:R,activity:$,best:Y}}).sort((h,v)=>v.count-h.count).slice(0,5)},[l]),f=a.useMemo(()=>{if(!n||t.length===0)return null;const r=t.map(z=>z.winrate||0),h=t.map(z=>z.avg_damage_dealt||0),v=t.map(z=>z.avg_damage_assisted||0),b=t.map(z=>z.hits_percents||0),R=t.map(z=>z.survival_rate||0),$=t.map(z=>z.battles||0),Y=t.map(z=>z.overallWn8??0).filter(z=>z>0);return{medianWn8:Y.length>0?Math.round(te(Y)):0,medianWr:Math.round(te(r)*100)/100,medianDpg:Math.round(te(h)),medianAssist:Math.round(te(v)),medianHits:Math.round(te(b)*10)/10,medianSurv:Math.round(te(R)*10)/10,medianBattles:Math.round(te($)),ownWn8:Math.round(n.overallWn8??0),ownWr:Math.round((n.winrate||0)*100)/100,ownDpg:Math.round(n.avg_damage_dealt||0),ownAssist:Math.round(n.avg_damage_assisted||0),ownHits:Math.round((n.hits_percents||0)*10)/10,ownSurv:Math.round((n.survival_rate||0)*10)/10,ownBattles:Math.round(n.battles||0)}},[t,n]),{visibility:j,toggle:V,visibleDefs:N}=Qr(),[I,H]=a.useState("overall"),O=a.useMemo(()=>[...t].filter(r=>(r.overallWn8??0)>0&&r.battles>=100).sort((r,h)=>(h.overallWn8??0)-(r.overallWn8??0)).slice(0,5),[t]),D=a.useMemo(()=>[...t].filter(r=>(r.recentWn8??0)>0&&(r.recentBattles??0)>=50).sort((r,h)=>(h.recentWn8??0)-(r.recentWn8??0)).slice(0,5),[t]),Z=I==="overall"?O:D,T=a.useMemo(()=>Object.entries(m).filter(([,r])=>r>0).map(([r,h])=>({id:r,label:r,value:h})),[m]),P=a.useMemo(()=>[...t].filter(r=>{const h=r.recentWn8??0,v=r.overallWn8??0;return h>0&&v>0&&(r.recentBattles??0)>=50}).map(r=>({contact:r,delta:(r.recentWn8??0)-(r.overallWn8??0)})).sort((r,h)=>h.delta-r.delta).slice(0,5),[t]),U=a.useMemo(()=>l.filter(r=>Ze(r.last_battle_time,r.logout_at)==="online"),[l]),K=a.useMemo(()=>l.filter(r=>{const h=Ze(r.last_battle_time,r.logout_at);return h==="online"||h==="d1"||h==="d7"}).sort((r,h)=>(h.last_battle_time||0)-(r.last_battle_time||0)),[l]),re=a.useMemo(()=>[{label:"T1-4",min:1,max:5,color:"#B08059"},{label:"T5-7",min:5,max:8,color:"#EBE6E8"},{label:"T8",min:8,max:9,color:"#F9CB40"},{label:"T9",min:9,max:10,color:"#C091FF"},{label:"T10",min:10,max:1/0,color:"#9B5CF3"}].map(h=>({...h,count:l.filter(v=>{const b=v.overallAvgTier??0;return b>0&&b>=h.min&&b<h.max}).length})),[p]),M=a.useMemo(()=>{const r=l.filter(b=>(b.recentBattles??0)>=50).map(b=>
6b.recentWn8??0),h=(c?.recentBattles??0)>=50?c?.recentWn8??0:0;return pa([...r,h]).map(b=>({...b,count:l.filter(R=>{if((R.recentBattles??0)<50)return!1;const $=R.recentWn8??0;return $>0&&$>=b.min&&$<b.max}).length}))},[p,c?.recentWn8,c?.recentBattles]),x=a.useMemo(()=>[{label:"Slumping",min:-1/0,max:-500,color:"#D04A50"},{label:"Down",min:-500,max:-150,color:"#E08C61"},{label:"Steady",min:-150,max:150,color:"#EBE6E8"},{label:"Improving",min:150,max:500,color:"#7ECBF9"},{label:"Hot streak",min:500,max:1/0,color:"#3CCB7A"}].map(h=>({...h,count:l.filter(v=>{if((v.recentBattles??0)<50)return!1;const b=v.recentWn8??0,R=v.overallWn8??0;if(b<=0||R<=0)return!1;const $=b-R;return $>=h.min&&$<h.max}).length})),[p]),A=a.useMemo(()=>[{label:"Rookie",min:0,max:5e3,color:"#B08059"},{label:"Casual",min:5e3,max:2e4,color:"#EBE6E8"},{label:"Veteran",min:2e4,max:5e4,color:"#7ECBF9"},{label:"Hardcore",min:5e4,max:1e5,color:"#F9CB40"},{label:"Addict",min:1e5,max:1/0,color:"#9B5CF3"}].map(h=>({...h,count:l.filter(v=>{const b=v.battles||0;return b>0&&b>=h.min&&b<h.max}).length})),[p]),C=a.useMemo(()=>{const r=[{label:"< 1y",min:0,max:1,color:"#7ECBF9"},{label:"1-3y",min:1,max:3,color:"#3CCB7A"},{label:"3-6y",min:3,max:6,color:"#EBCB7E"},{label:"6-9y",min:6,max:9,color:"#F9CB40"},{label:"9y+",min:9,max:1/0,color:"#9B5CF3"}],h=Date.now()/1e3;return r.map(v=>({...v,count:l.filter(b=>{if(!b.created_at)return!1;const R=(h-b.created_at)/31557600;return R>=v.min&&R<v.max}).length}))},[p]),L=a.useMemo(()=>[{label:"<46%",min:0,max:46,color:pe(45)},{label:"46-49%",min:46,max:49,color:pe(47.5)},{label:"49-52%",min:49,max:52,color:pe(50.5)},{label:"52-56%",min:52,max:56,color:pe(54)},{label:"56%+",min:56,max:1/0,color:pe(58)}].map(h=>({...h,count:l.filter(v=>{const b=v.winrate||0;return b>0&&b>=h.min&&b<h.max}).length})),[p]),y=a.useMemo(()=>[{label:"<800",min:0,max:800,color:q[0]},{label:"800-1.2k",min:800,max:1200,color:q[1]},{label:"1.2-1.7k",min:1200,max:1700,color:q[2]},{label:"1.7-2.3k",min:1700,max:2300,color:q[3]},{label:"2.3k+",min:2300,max:1/0,color:q[4]}].map(h=>({...h,count:l.filter(v=>{const b=v.avg_damage_dealt||0;return b>0&&b>=h.min&&b<h.max}).length})),[p]),S=a.useMemo(()=>
6[{label:"<20%",min:0,max:20,color:q[0]},{label:"20-30%",min:20,max:30,color:q[1]},{label:"30-40%",min:30,max:40,color:q[2]},{label:"40-50%",min:40,max:50,color:q[3]},{label:"50%+",min:50,max:1/0,color:q[4]}].map(h=>({...h,count:l.filter(v=>{const b=v.survival_rate||0;return b>0&&b>=h.min&&b<h.max}).length})),[p]),G=a.useMemo(()=>[{label:"<60%",min:0,max:60,color:q[0]},{label:"60-65%",min:60,max:65,color:q[1]},{label:"65-70%",min:65,max:70,color:q[2]},{label:"70-75%",min:70,max:75,color:q[3]},{label:"75%+",min:75,max:1/0,color:q[4]}].map(h=>({...h,count:l.filter(v=>{const b=v.hits_percents||0;return b>0&&b>=h.min&&b<h.max}).length})),[p]),Me=a.useMemo(()=>[{label:"<46%",min:0,max:46,color:pe(45)},{label:"46-49%",min:46,max:49,color:pe(47.5)},{label:"49-52%",min:49,max:52,color:pe(50.5)},{label:"52-56%",min:52,max:56,color:pe(54)},{label:"56%+",min:56,max:1/0,color:pe(58)}].map(h=>({...h,count:l.filter(v=>{if((v.recentBattles??0)<50)return!1;const b=v.recentWinrate||0;return b>0&&b>=h.min&&b<h.max}).length})),[p]),ye=a.useMemo(()=>[{label:"<2.5k",min:0,max:2500,color:Ke(400)},{label:"2.5-5k",min:2500,max:5e3,color:Ke(900)},{label:"5-7.5k",min:5e3,max:7500,color:Ke(1500)},{label:"7.5-10k",min:7500,max:1e4,color:Ke(2200)},{label:"10k+",min:1e4,max:1/0,color:Ke(3200)}].map(h=>({...h,count:l.filter(v=>{const b=v.global_rating||0;return b>0&&b>=h.min&&b<h.max}).length})),[p]),Ae=a.useMemo(()=>[{label:"<300",min:0,max:300,color:q[0]},{label:"300-500",min:300,max:500,color:q[1]},{label:"500-700",min:500,max:700,color:q[2]},{label:"700-900",min:700,max:900,color:q[3]},{label:"900+",min:900,max:1/0,color:q[4]}].map(h=>({...h,count:l.filter(v=>{const b=v.avg_damage_assisted||0;return b>0&&b>=h.min&&b<h.max}).length})),[p]),yt=a.useMemo(()=>[{label:"<0.5",min:0,max:.5,color:q[0]},{label:"0.5-0.8",min:.5,max:.8,color:q[1]},{label:"0.8-1.1",min:.8,max:1.1,color:q[2]},{label:"1.1-1.4",min:1.1,max:1.4,color:q[3]},{label:"1.4+",min:1.4,max:1/0,color:q[4]}].map(h=>({...h,count:l.filter(v=>{const b=v.battles||0;if(b<100)return!1;const R=(v.frags||0)/b;return R>0&&R>=h.min&&R<h.max}).length})),[p]),Je=a.useMemo(()=>[{label:"<500",min:0,max:500,color:q[0]},{label:"500-700",min:500,max:700,color:q[1]},{label:"700-900",min:700,max:900,color:q[2]},{label:"900-1.1k",min:900,max:1100,color:q[3]},{label:"1.1k+",min:1100,max:1/0,color:q[4]}].map(h=>({...h,count:l.filter(v=>{const b=v.battle_avg_xp||0;return b>0&&b>=h.min&&b<h.max}).length})),[p]),bt=a.useMemo(()=>[{label:"0%",min:0,max:.5,color:"#3CCB7A"},{label:"<5%",min:.5,max:5,color:"#7ECBF9"},{label:"5-15%",min:5,max:15,color:"#EBE6E8"},{label:"15-30%",min:15,max:30,color:"#F9CB40"},{label:"30%+",min:30,max:1/0,color:"#9B5CF3"}].map(h=>({...h,count:l.filter(v=>{if((v.battles||0)<100)return!1;const b=v.avg_battles_on_stunning_vehicles||0;return b>=h.min&&b<h.max}).length})),[p]),vt=a.useMemo(()=>{const r=[{label:"<1d",min:0,max:1,color:"#3CCB7A"},{label:"1-7d",min:1,max:7,color:"#7ECBF9"},{label:"7-30d",min:7,max:30,color:"#F9CB40"},{label:"30-90d",min:30,max:90,color:"#E08C61"},{label:"90d+",min:90,max:1/0,color:"#D04A50"}],h=Date.now()/1e3;return r.map(v=>({...v,count:l.filter(b=>{const R=b.last_battle_time||0;if(!R)return!1;const $=(h-R)/86400;return $>=v.min&&$<v.max}).length}))},[p]),ee=a.useCallback((r,h={})=>(v,b)=>{const R=[];for(const $ of l){if(h.requireRecent&&($.recentBattles??0)<50)continue;const Y=r($);(h.allowNonPositive?Number.isFinite(Y):Y>0)&&(Y<v||Y>=b||R.push({name:$.nickname,value:Y}))}return R.sort(($,Y)=>Y.value-$.value),R.slice(0,5)},[p]),Ye=a.useMemo(()=>{const h=new Date,v=new Date(h.getFullYear(),h.getMonth(),h.getDate()),b=Math.floor(v.getTime()/1e3),R=(v.getDay()+6)%7,$=[];for(let Q=0;Q<4;Q++)for(let le=0;le<7;le++){const De=(3-Q)*7+(R-le),wt=b-De*86400;$.push({dayStart:wt,count:0,isToday:De===0,isFuture:De<0,weekdayIdx:le,friends:[]})}const Y=$[0].dayStart;for(const Q of l){const le=Q.last_battle_time||0;if(!le||le<Y)continue;const Ne=Math.floor((le-Y)/86400);Ne>=0&&Ne<$.length&&($[Ne].count+=1,$[Ne].friends.push(Q))}for(const Q of $)Q.friends.sort((le,Ne)=>(Ne.global_rating||0)-(le.global_rating||0));const z=Math.max(1,...$.map(Q=>Q.count));return{cells:$,max:z}}
6,[l]),et={wn8:e.jsx(ie,{buckets:_,ownValue:c?.overallWn8??null,formatOwn:r=>Math.round(r).toLocaleString(),values:l.map(r=>r.overallWn8??0),getNamesForBucket:ee(r=>r.overallWn8??0)}),recentWn8:e.jsx(ie,{buckets:M,ownValue:(c?.recentBattles??0)>=50?c?.recentWn8??null:null,formatOwn:r=>Math.round(r).toLocaleString(),values:l.filter(r=>(r.recentBattles??0)>=50).map(r=>r.recentWn8??0),getNamesForBucket:ee(r=>r.recentWn8??0,{requireRecent:!0})}),formDelta:e.jsx(ie,{buckets:x,ownValue:(c?.recentBattles??0)>=50&&(c?.recentWn8??0)>0&&(c?.overallWn8??0)>0?(c.recentWn8??0)-(c.overallWn8??0):null,formatOwn:r=>{const h=Math.round(r);return h>=0?`+${h}`:`${h}`},allowNonPositive:!0,values:l.filter(r=>(r.recentBattles??0)>=50&&(r.recentWn8??0)>0&&(r.overallWn8??0)>0).map(r=>(r.recentWn8??0)-(r.overallWn8??0)),getNamesForBucket:ee(r=>(r.recentWn8??0)>0&&(r.overallWn8??0)>0?(r.recentWn8??0)-(r.overallWn8??0):NaN,{requireRecent:!0,allowNonPositive:!0})}),tier:e.jsx(ie,{buckets:re,ownValue:c?.overallAvgTier??null,formatOwn:r=>r.toFixed(1),values:l.map(r=>r.overallAvgTier??0),getNamesForBucket:ee(r=>r.overallAvgTier??0)}),battleVolume:e.jsx(ie,{buckets:A,ownValue:c?.battles??null,formatOwn:r=>lt(r),values:l.map(r=>r.battles||0),getNamesForBucket:ee(r=>r.battles||0)}),accountAge:e.jsx(ie,{buckets:C,ownValue:c?.created_at?(Date.now()/1e3-c.created_at)/31557600:null,formatOwn:r=>`${r.toFixed(1)}y`,values:l.filter(r=>!!r.created_at).map(r=>(Date.now()/1e3-r.created_at)/31557600),getNamesForBucket:ee(r=>r.created_at?(Date.now()/1e3-r.created_at)/31557600:0)}),winrate:e.jsx(ie,{buckets:L,ownValue:c?.winrate??null,formatOwn:r=>`${r.toFixed(1)}%`,values:l.map(r=>r.winrate||0),getNamesForBucket:ee(r=>r.winrate||0)}),dpg:e.jsx(ie,{buckets:y,ownValue:c?.avg_damage_dealt??null,formatOwn:r=>Math.round(r).toLocaleString(),values:l.map(r=>r.avg_damage_dealt||0),getNamesForBucket:ee(r=>r.avg_damage_dealt||0)}),survival:e.jsx(ie,{buckets:S,ownValue:c?.survival_rate??null,formatOwn:r=>`${r.toFixed(1)}%`,values:l.map(r=>r.survival_rate||0),getNamesForBucket:ee(r=>r.survival_rate||0)}),hits:e.jsx(ie,{buckets:G,ownValue:c?.hits_percents??null,formatOwn:r=>`${r.toFixed(1)}%`,values:l.map(r=>r.hits_percents||0),getNamesForBucket:ee(r=>r.hits_percents||0)}),recentWinrate:e.jsx(ie,{buckets:Me,ownValue:(c?.recentBattles??0)>=50?c?.recentWinrate??null:null,formatOwn:r=>`${r.toFixed(1)}%`,values:l.filter(r=>(r.recentBattles??0)>=50).map(r=>r.recentWinrate||0),getNamesForBucket:ee(r=>r.recentWinrate||0,{requireRecent:!0})}),personalRating:e.jsx(ie,{buckets:ye,ownValue:c?.global_rating??null,formatOwn:r=>Math.round(r).toLocaleString(),values:l.map(r=>r.global_rating||0),getNamesForBucket:ee(r=>r.global_rating||0)}),avgAssist:e.jsx(ie,{buckets:Ae,ownValue:c?.avg_damage_assisted??null,formatOwn:r=>Math.round(r).toLocaleString(),values:l.map(r=>r.avg_damage_assisted||0),getNamesForBucket:ee(r=>r.avg_damage_assisted||0)}),fragsPerBattle:e.jsx(ie,{buckets:yt,ownValue:(c?.battles??0)>=100&&(c?.frags??0)>0?(c.frags??0)/(c.battles??1):null,formatOwn:r=>r.toFixed(2),values:l.filter(r=>(r.battles||0)>=100).map(r=>(r.frags||0)/(r.battles||1)),getNamesForBucket:ee(r=>(r.battles||0)>=100?(r.frags||0)/(r.battles||1):0)}),avgXp:e.jsx(ie,{buckets:Je,ownValue:c?.battle_avg_xp??null,formatOwn:r=>Math.round(r).toLocaleString(),values:l.map(r=>r.battle_avg_xp||0),getNamesForBucket:ee(r=>r.battle_avg_xp||0)}),artyShare:e.jsx(ie,{buckets:bt,ownValue:c?.avg_battles_on_stunning_vehicles??null,formatOwn:r=>`${r.toFixed(1)}%`,values:l.filter(r=>(r.battles||0)>=100).map(r=>r.avg_battles_on_stunning_vehicles||0),getNamesForBucket:ee(r=>(r.battles||0)>=100&&r.avg_battles_on_stunning_vehicles||0,{allowNonPositive:!0}),allowNonPositive:!0}),inactivity:e.jsx(ie,{buckets:vt,ownValue:c?.last_battle_time?(Date.now()/1e3-c.last_battle_time)/86400:null,formatOwn:r=>`${r.toFixed(1)}d`,values:l.filter(r=>!!r.last_battle_time).map(r=>(Date.now()/1e3-(r.last_battle_time||0))/86400),getNamesForBucket:ee(r=>r.last_battle_time?(Date.now()/1e3-r.last_battle_time)/86400:0)})},ne=a.useMemo(()=>{const r=Date.now()/1e3,h=14*86400,v=30*86400,b=l.filter(R=>{const $=R.last_battle_time||0;if(!$)return!1;const Y=r-$;return Y>=h&&Y<=v}).sort((R,$)=>(R.last_battle_time||0)-($.last_battle_time||0));
6return{all:b,top:b.slice(0,5),count:b.length}},[l]);return e.jsxs(e.Fragment,{children:[e.jsx(fe,{title:"You vs friends (median)",attribution:!0,info:"Quick comparison of your stats vs the median of all your contacts.",outerStyle:{gridColumn:"span 1"},children:f?e.jsxs(It,{children:[e.jsxs(Re,{children:[e.jsx("span",{children:"WN8"}),e.jsxs("span",{children:[f.ownWn8>0?e.jsx("strong",{style:X(F(f.ownWn8)),children:f.ownWn8}):e.jsx("span",{style:{color:o.gray5},children:"—"})," ",e.jsxs("span",{style:{color:o.gray5},children:["vs ",f.medianWn8>0?f.medianWn8:"—"]}),f.ownWn8>0&&e.jsx(Ve,{own:f.ownWn8,median:f.medianWn8,format:r=>Math.round(r).toLocaleString()})]})]}),e.jsxs(Re,{children:[e.jsx("span",{children:"Winrate"}),e.jsxs("span",{children:[e.jsxs("strong",{style:{color:o.gray1},children:[f.ownWr,"%"]})," ",e.jsxs("span",{style:{color:o.gray5},children:["vs ",f.medianWr,"%"]}),e.jsx(Ve,{own:f.ownWr,median:f.medianWr,format:r=>(Math.round(r*100)/100).toString(),suffix:"%"})]})]}),e.jsxs(Re,{children:[e.jsx("span",{children:"Avg DMG"}),e.jsxs("span",{children:[e.jsx("strong",{style:{color:o.gray1},children:f.ownDpg.toLocaleString()})," ",e.jsxs("span",{style:{color:o.gray5},children:["vs ",f.medianDpg.toLocaleString()]}),e.jsx(Ve,{own:f.ownDpg,median:f.medianDpg,format:r=>Math.round(r).toLocaleString()})]})]}),e.jsxs(Re,{children:[e.jsx("span",{children:"Avg Assist"}),e.jsxs("span",{children:[e.jsx("strong",{style:{color:o.gray1},children:f.ownAssist.toLocaleString()})," ",e.jsxs("span",{style:{color:o.gray5},children:["vs ",f.medianAssist.toLocaleString()]}),e.jsx(Ve,{own:f.ownAssist,median:f.medianAssist,format:r=>Math.round(r).toLocaleString()})]})]}),e.jsxs(Re,{children:[e.jsx("span",{children:"Hits %"}),e.jsxs("span",{children:[e.jsxs("strong",{style:{color:o.gray1},children:[f.ownHits,"%"]})," ",e.jsxs("span",{style:{color:o.gray5},children:["vs ",f.medianHits,"%"]}),e.jsx(Ve,{own:f.ownHits,median:f.medianHits,format:r=>(Math.round(r*10)/10).toString(),suffix:"%"})]})]}),e.jsxs(Re,{children:[e.jsx("span",{children:"Survival %"}),e.jsxs("span",{children:[e.jsxs("strong",{style:{color:o.gray1},children:[f.ownSurv,"%"]})," ",e.jsxs("span",{style:{color:o.gray5},children:["vs ",f.medianSurv,"%"]}),e.jsx(Ve,{own:f.ownSurv,median:f.medianSurv,format:r=>(Math.round(r*10)/10).toString(),suffix:"%"})]})]}),e.jsxs(Re,{children:[e.jsx("span",{children:"Battles"}),e.jsxs("span",{children:[e.jsx("strong",{style:{color:o.gray1},children:lt(f.ownBattles)})," ",e.jsxs("span",{style:{color:o.gray5},children:["vs ",lt(f.medianBattles)]}),e.jsx(Ve,{own:f.ownBattles,median:f.medianBattles,format:r=>lt(Math.abs(r))})]})]})]}):e.jsx(Se,{children:"No data"})}),e.jsx(fe,{title:"Top WN8",attribution:!0,info:I==="overall"?"Top friends by overall WN8 (≥100 battles).":"Top friends by recent WN8 (last 28 days, ≥50 recent battles).",headerLeft:e.jsxs(pt,{size:"1",value:I,onValueChange:r=>H(r),children:[e.jsx(Le,{value:"overall",children:"Overall"}),e.jsx(Le,{value:"recent",children:"Recent"})]}),outerStyle:{gridColumn:"span 1"},children:e.jsxs(It,{children:[Z.length===0&&e.jsx(Se,{children:I==="overall"?"No WN8 data yet":"No recent WN8 data (need ≥50 recent battles)"}),Z.map((r,h)=>{const v=I==="overall"?r.overallWn8??0:r.recentWn8??0;return e.jsxs(la,{children:[e.jsxs(ca,{$rank:h+1,children:[h+1,"."]}),e.jsx(Qe,{accountId:r.account_id,nickname:r.nickname,style:{display:"block",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}),e.jsx("span",{style:{...X(F(v)),whiteSpace:"nowrap"},children:Math.round(v).toLocaleString()})]},r.account_id)})]})}),e.jsx(fe,{title:"Most improved",attribution:!0,info:"Top 5 contacts whose recent WN8 most exceeds their overall WN8 (≥ 50 recent battles required). Great for spotting friends on a hot streak.",outerStyle:{gridColumn:"span 1"},children:e.jsxs(It,{children:[P.length===0&&e.jsx(Se,{children:"Need more recent battles"}),P.map(({contact:r,delta:h},v)=>e.jsxs(la,{children:[e.jsxs(ca,{$rank:v+1,children:[v+1,"."]}),e.jsx(Qe,{accountId:r.account_id,nickname:r.nickname,style:{display:"block",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}),e.jsx(w,{message:`Recent WN8: ${Math.round(r.recentWn8??0)} · Overall WN8: ${Math.round(r.overallWn8??0)}
6 · ${(r.recentBattles??0).toLocaleString()} recent btl`,children:e.jsxs(hs,{style:X(F(r.recentWn8??0)),children:["▲ ",Math.round(h).toLocaleString()]})})]},r.account_id))]})}),e.jsx(fe,{title:"Distributions",attribution:!0,info:"Friends grouped by various skill, activity and account-age metrics. M = median across friends, avg = average, You = your own position. Hover any bar for the names in that bucket. Use the picker on the right to add or remove distributions.",outerStyle:{gridColumn:"span 3"},headerRight:e.jsxs(ct,{children:[e.jsx(dt,{children:e.jsxs(ge,{size:"1",variant:"soft",color:"gray",children:[e.jsx(Ba,{size:14}),N.length,"/",Xe.length]})}),e.jsxs(mt,{size:"1",style:{maxWidth:280,maxHeight:360,overflow:"auto"},children:[e.jsx(da,{children:"Distributions"}),Xe.map(r=>e.jsxs(ma,{children:[e.jsx(Ie,{checked:!!j[r.id],onCheckedChange:()=>V(r.id)}),r.label]},r.id))]})]}),children:e.jsx(tt,{disabled:!u,message:"advanced contact insights",blur:6,borderRadius:10,children:N.length===0?e.jsxs(wi,{children:[e.jsx("span",{children:"No distributions selected."}),e.jsxs(ct,{children:[e.jsx(dt,{children:e.jsxs(ge,{size:"1",variant:"soft",color:"gray",children:[e.jsx(Bn,{size:14})," Add a distribution"]})}),e.jsxs(mt,{size:"1",style:{maxWidth:280,maxHeight:360,overflow:"auto"},children:[e.jsx(da,{children:"Distributions"}),Xe.map(r=>e.jsxs(ma,{children:[e.jsx(Ie,{checked:!!j[r.id],onCheckedChange:()=>V(r.id)}),r.label]},r.id))]})]})]}):e.jsx(fi,{children:N.map(r=>e.jsxs(yi,{children:[e.jsxs(vi,{children:[e.jsx(w,{message:r.tooltip,children:e.jsx(bi,{children:r.label})}),e.jsx(on,{type:"button","aria-label":`Hide ${r.label}`,title:`Hide ${r.label}`,onClick:()=>V(r.id),children:"×"})]}),et[r.id]]},r.id))})})}),e.jsx(fe,{title:"Friends by clan",attribution:!0,info:"Most-represented clans among your friends. Each card shows median WN8/WR, activity breakdown and the strongest WN8 player in that clan. Hover the friend count to see who's in the clan. Click a card to open the clan page.",outerStyle:{gridColumn:"span 3"},children:e.jsx(tt,{disabled:!u,message:"advanced contact insights",blur:6,borderRadius:10,children:k.length===0?e.jsx(Se,{children:"No clan data yet"}):e.jsx(Wi,{children:k.map(r=>{const h=[...r.members].sort((v,b)=>(b.overallWn8??0)-(v.overallWn8??0));return e.jsxs(Ti,{to:Tt({route:Et.CLAN_PAGE,server:d,name:r.name,id:r.clanId}),children:[e.jsx(Ei,{children:r.emblem?e.jsx("img",{loading:"lazy",decoding:"async",src:r.emblem,alt:r.tag,sizes:"80px",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"contain"}}):e.jsx(Li,{style:{width:"100%",height:"100%"}})}),e.jsxs(Fi,{children:[e.jsxs($i,{children:[e.jsxs(Ri,{children:[e.jsxs(Vi,{style:{color:r.color||o.gray2},children:["[",r.tag,"]"]}),e.jsx(Bi,{children:r.name})]}),e.jsx(w,{message:e.jsx(Di,{children:h.map(v=>{const b=v.overallWn8??0;return e.jsxs(Oi,{children:[e.jsx("span",{style:{color:o.gray2},children:v.nickname}),e.jsx("span",{style:b>0?X(F(b)):{color:o.gray5},children:b>0?Math.round(b).toLocaleString():"—"})]},v.account_id)})}),children:e.jsxs(Zi,{children:[r.count," ",r.count===1?"friend":"friends"]})})]}),e.jsxs(zi,{children:[e.jsx(w,{message:"Median overall WN8 of friends in this clan",children:e.jsxs("span",{children:[e.jsx(ha,{children:"WN8"}),r.medianWn8>0?e.jsx("strong",{style:X(F(r.medianWn8)),children:r.medianWn8.toLocaleString()}):e.jsx("span",{style:{color:o.gray5},children:"—"})]})}),e.jsx(w,{message:"Median win rate of friends in this clan",children:e.jsxs("span",{children:[e.jsx(ha,{children:"WR"}),r.medianWr>0?e.jsxs("strong",{style:{color:o.gray2},children:[r.medianWr,"%"]}):e.jsx("span",{style:{color:o.gray5},children:"—"})]})})]}),e.jsxs(Pi,{children:[r.activity.online>0&&e.jsx(w,{message:"Active within the last 15 minutes",children:e.jsxs(st,{$color:"#3CCB7A",children:["● ",r.activity.online," online"]})}),r.activity.d7>0&&e.jsx(w,{message:"Last battle within the past 7 days",children:e.jsxs(st,{$color:"#7ECBF9",children:["≤7d ",r.activity.d7]})}),r.activity.d30>0&&e.jsx(w,{message:"Last battle within the past 30 days",children:e.jsxs(st,{$color:"#F9CB40",children:["≤30d ",r.activity.d30]})}),r.activity.inactive>0&&e.jsx(w,{message:"Inactive (no battle in the last 30 days)",children:e.jsxs(st,{$color:"#5a5a5a",children:["inactive ",r.activity.inactive]})})]}),r.best&&e.jsxs(Gi,{children:[e.jsx(Vn,{size:12})," Best:"," ",e.jsx("strong",{style:{color:o.gray3},children:r.best.nickname}),e.jsx("span",{style:{...X(F(r.best.overallWn8??0)),marginLeft:4}
6,children:Math.round(r.best.overallWn8??0).toLocaleString()})]})]})]},r.clanId)})})})}),e.jsx(fe,{title:e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[e.jsx(Ra,{size:14})," Activity"]}),attribution:!0,info:"Friend activity at a glance: pie shows the recency mix (online / ≤24h / ≤7d / ≤30d / inactive), heatmap shows how many friends had their last battle on each day for the past 4 weeks. Bottom-right is today; cells with a dashed outline are still in the future.",headerRight:U.length>0?e.jsxs(Ui,{children:[e.jsx("span",{className:"dot"}),U.length," online now"]}):null,outerStyle:{gridColumn:"span 2"},innerStyle:{flex:1,display:"flex",flexDirection:"column"},children:e.jsx(tt,{disabled:!u,message:"advanced contact insights",blur:6,borderRadius:10,style:{flex:1,display:"flex",flexDirection:"column"},children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,flex:1},children:[K.length>0&&e.jsxs(qi,{children:[K.slice(0,12).map(r=>e.jsx(nn,{contact:r,onSelect:g,disableLazyFetch:!u},r.account_id)),K.length>12&&e.jsxs(Se,{style:{alignSelf:"center",justifySelf:"start",padding:"0 4px"},children:["+",K.length-12," more"]})]}),e.jsxs(Ki,{children:[e.jsxs(Xi,{children:[e.jsx("div",{style:{height:110},children:T.length>0?e.jsx(xi,{data:T,innerRadius:.65,padAngle:1,cornerRadius:3,margin:{top:5,right:5,bottom:5,left:5},colors:["#3CCB7A","#7ECBF9","#F9CB40","#B08059","#5a5a5a"],enableArcLabels:!1,enableArcLinkLabels:!1,isInteractive:!0,activeOuterRadiusOffset:4,tooltip:({datum:r})=>e.jsxs("div",{style:{background:o.darkgray2,padding:"4px 8px",borderRadius:4,color:o.gray1,fontSize:11,border:`1px solid ${o.darkgray0}`},children:[r.label,": ",r.value]})}):e.jsx(Se,{children:"No activity data"})}),e.jsx(Se,{children:m.online>0?`${m.online} online now`:`${m["≤24h"]} active in last 24h`})]}),e.jsx(Qi,{children:e.jsxs(Yi,{children:[e.jsx(ua,{}),["M","T","W","T","F","S","S"].map((r,h)=>e.jsx(ua,{children:r},`${r}-${h}`)),[0,1,2,3].map(r=>e.jsxs(a.Fragment,{children:[e.jsx(Ji,{children:r===0?"3w":r===3?"now":`${3-r}w`}),Ye.cells.slice(r*7,r*7+7).map(h=>{if(h.isFuture)return e.jsx(xa,{$intensity:0,$today:!1,$future:!0,"aria-hidden":!0},h.dayStart);const b=new Date(h.dayStart*1e3).toLocaleDateString(void 0,{weekday:"long",month:"short",day:"numeric"}),R=h.count/Ye.max;return e.jsx(w,{message:e.jsx(Ms,{dateStr:h.isToday?`Today · ${b}`:b,cellFriends:h.friends}),children:e.jsx(xa,{$intensity:R,$today:h.isToday,$future:!1})},h.dayStart)})]},r))]})})]})]})})}),e.jsx(fe,{title:e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[e.jsx(Zt,{size:14})," Churn risk"]}),attribution:!0,info:"Friends whose last battle was 14 - 30 days ago. They're trending towards inactive – good time to check in before they churn.",outerStyle:{gridColumn:"span 1"},children:e.jsx(tt,{disabled:!u,message:"advanced contact insights",blur:6,borderRadius:10,children:e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:ne.count===0?e.jsxs(ps,{children:[e.jsx(Ta,{size:28,weight:"duotone"}),e.jsx("span",{children:"All friends recently active"}),e.jsx(Se,{style:{color:o.gray5,fontSize:11},children:"Nobody silent in the 14 - 30 day window"})]}):e.jsxs(e.Fragment,{children:[e.jsxs(es,{children:[e.jsx(ts,{children:e.jsx(Zt,{size:20,weight:"fill"})}),e.jsxs(as,{children:[e.jsx(ns,{children:e.jsx(os,{children:ne.count})}),e.jsx(rs,{children:"silent for 14 - 30 days"})]})]}),e.jsxs(is,{children:[e.jsx(bn,{size:11})," Most at risk"]}),e.jsx(ss,{children:ne.top.map(r=>{const h=Math.round((Date.now()/1e3-(r.last_battle_time||0))/86400),v=(h-14)/16*100,b=h>=26?o.red:h>=21?"#f97316":"#f9cb40";return e.jsx(w,{message:`Last battle ${h} days ago · ${30-h} days until churn`,children:e.jsxs(ls,{type:"button",onClick:()=>g?.(r.account_id),"aria-label":`Open ${r.nickname}`,children:[e.jsx(cs,{style:(r.overallWn8??0)>0?X(F(r.overallWn8??0)):void 0,children:r.nickname}),e.jsx(ds,{$color:b,$progress:v}),e.jsxs(ms,{$color:b,children:[h,"d"]})]})},r.account_id)})}),ne.count>ne.top.length&&e.jsxs(gs,{children:["+",ne.count-ne.top.length," more at risk"]})]})})})})]})});rn.displayName="ContactsOverview";const As=ka`
7    0% { background-position: -400px 0; }
8    100% { background-position: 400px 0; }
9`,We=s.div.withConfig({displayName:"ContactsSkeleton__Block",componentId:"sc-j5rqzm-0"}
9)(["height:","px;width:",";border-radius:4px;background:linear-gradient(90deg,"," 0%,"," 50%,"," 100%);background-size:800px 100%;animation:"," 1.4s linear infinite;"],({$h:t})=>t??12,({$w:t})=>t??"100%",o.darkgray2,o.darkgray1,o.darkgray2,As),Ns=s.div.withConfig({displayName:"ContactsSkeleton__TileGrid",componentId:"sc-j5rqzm-1"})(["display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;"]),Ss=s.div.withConfig({displayName:"ContactsSkeleton__Tile",componentId:"sc-j5rqzm-2"})(["background:",";border:1px solid ",";border-radius:8px;padding:12px;display:flex;flex-direction:column;gap:10px;"],o.darkgray3,o.darkgray1),Is=s.div.withConfig({displayName:"ContactsSkeleton__TableWrap",componentId:"sc-j5rqzm-3"})(["border:1px solid ",";border-radius:8px;overflow:hidden;background:",";"],o.darkgray1,o.darkgray4),Hs=s.div.withConfig({displayName:"ContactsSkeleton__HeaderBar",componentId:"sc-j5rqzm-4"})(["display:flex;gap:12px;padding:8px 10px;background:",";border-bottom:1px solid ",";"],o.darkgray2,o.darkgray0),Ls=s.div.withConfig({displayName:"ContactsSkeleton__RowBar",componentId:"sc-j5rqzm-5"})(["display:flex;gap:12px;padding:8px 10px;border-bottom:1px solid ",";align-items:center;&:nth-child(odd){background:",";}"],o.darkgray2,o.darkgray3),sn=a.memo(({rows:t=8})=>e.jsxs(Is,{children:[e.jsx(Hs,{children:Array.from({length:8}).map((n,i)=>e.jsx(We,{$w:i===0?"120px":"60px",$h:10},i))}),Array.from({length:t}).map((n,i)=>e.jsxs(Ls,{children:[e.jsx(We,{$w:"20px",$h:20}),e.jsx(We,{$w:"160px",$h:14}),Array.from({length:6}).map((d,g)=>e.jsx(We,{$w:"50px",$h:12},g))]},i))]}));sn.displayName="TableSkeleton";const ln=a.memo(({tiles:t=8})=>e.jsx(Ns,{children:Array.from({length:t}).map((n,i)=>e.jsxs(Ss,{children:[e.jsx(We,{$w:"60%",$h:10}),e.jsx(We,{$w:"40%",$h:28}),e.jsx(We,{$w:"80%",$h:8}),e.jsx(We,{$w:"50%",$h:8})]},i))}));ln.displayName="OverviewSkeleton";const Ws=s.div.withConfig({displayName:"ContactsSummary__Wrap",componentId:"sc-6vvpol-0"})(["display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px 12px;"]),Ts=s.div.withConfig({displayName:"ContactsSummary__ChipRow",componentId:"sc-6vvpol-1"})(["display:flex;flex-wrap:wrap;align-items:center;gap:4px;"]),_e=s.span.withConfig({displayName:"ContactsSummary__StatChip",componentId:"sc-6vvpol-2"})(["display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;background:",";color:",";font-family:var(--font-roboto-mono);font-size:11px;font-weight:600;"],({$color:t})=>t?`${t}22`:o.darkgray2,({$color:t})=>t||o.gray3),je=s.span.withConfig({displayName:"ContactsSummary__ChipLabel",componentId:"sc-6vvpol-3"})(["color:",";font-weight:500;"],o.gray5),Es=s.div.withConfig({displayName:"ContactsSummary__TomatoLine",componentId:"sc-6vvpol-4"})(["display:flex;align-items:center;gap:6px;margin-left:auto;font-size:11px;color:",";"],o.gray4),cn=a.memo(({friends:t})=>{const n=a.useMemo(()=>{let d=0,g=0,u=0,l=0,c=0;const p=[],m=[],_=[],k=[],f=[],j=new Set,V=Date.now()/1e3;for(const N of t){const I=Ze(N.last_battle_time,N.logout_at);I==="online"&&(d+=1),(I==="online"||I==="d1"||I==="d7")&&(g+=1),u+=N.battles||0;const H=N.overallWn8??0;H>0&&(p.push(H),H>c&&(c=H),H>=2350&&(l+=1));const O=N.overallAvgTier??0;O>0&&m.push(O),N.winrate>0&&_.push(N.winrate),N.avg_damage_dealt>0&&k.push(N.avg_damage_dealt),N.created_at&&f.push((V-N.created_at)/31557600),N.clan?.clan_id&&j.add(N.clan.clan_id)}return{onlineNow:d,active7d:g,totalBattles:u,medianWn8:p.length?Math.round(te(p)):0,topWn8:Math.round(c),medianTier:m.length?Math.round(te(m)*10)/10:0,medianWr:_.length?Math.round(te(_)*10)/10:0,medianDpg:k.length?Math.round(te(k)):0,medianAge:f.length?Math.round(te(f)*10)/10:0,unicums:l,clansRepresented:j.size}},[t]),i=a.useMemo(()=>{const d=t.length||1,g=t.filter(u=>u.hasMod).length;return{using:g,total:d,pct:Math.round(g/d*100)}},[t]);return e.jsxs(Ws,{children:[e.jsxs(Ts,{children:[n.onlineNow>0&&e.jsx(w,{message:"Friends online right now (active within the last 15 minutes)",children:e.jsxs(_e,{$color:"#3CCB7A",children:[e.jsx(je,{children:"Online"}),n.onlineNow]})}),e.jsx(w,{message:"Friends with at least one battle in the last 7 days",children:e.jsxs(_e,{$color:"#7ECBF9",children:[e.jsx(je,{children:"≤7d"}),n.active7d]})}),n.totalBattles>0&&e.jsx(w,{message:"Combined random battles across all friends",children:e.jsxs(_e,{children:[e.jsx(je,{children:"Btl"}),n.totalBattles>=1e3?`${Math.round(n.totalBattles/100)/10}
9k`:n.totalBattles.toLocaleString()]})}),n.medianWn8>0&&e.jsx(w,{message:"Median overall WN8 across all friends",children:e.jsxs(_e,{$color:F(n.medianWn8),children:[e.jsx(je,{children:"WN8"}),n.medianWn8.toLocaleString()]})}),n.medianTier>0&&e.jsx(w,{message:"Median average tank tier across all friends",children:e.jsxs(_e,{children:[e.jsx(je,{children:"Tier"}),n.medianTier.toFixed(1)]})}),n.medianWr>0&&e.jsx(w,{message:"Median overall winrate across all friends",children:e.jsxs(_e,{children:[e.jsx(je,{children:"WR"}),n.medianWr.toFixed(1),"%"]})}),n.medianDpg>0&&e.jsx(w,{message:"Median average damage per game across all friends",children:e.jsxs(_e,{children:[e.jsx(je,{children:"DPG"}),n.medianDpg.toLocaleString()]})}),n.unicums>0&&e.jsx(w,{message:"Friends with overall WN8 ≥ 2350 (Unicum or higher)",children:e.jsxs(_e,{$color:F(2400),children:[e.jsx(je,{children:"Uni"}),n.unicums]})}),n.medianAge>0&&e.jsx(w,{message:"Median account age across all friends (years since account creation)",children:e.jsxs(_e,{children:[e.jsx(je,{children:"Age"}),n.medianAge.toFixed(1),"y"]})}),n.clansRepresented>0&&e.jsx(w,{message:"Distinct clans represented among your friends",children:e.jsxs(_e,{children:[e.jsx(je,{children:"Clans"}),n.clansRepresented]})})]}),e.jsx(w,{message:"Share of contacts that used the Tomato.gg mod within the last 30 days",children:e.jsxs(Es,{children:[e.jsx(ze,{size:16,title:"Friends using Tomato.gg in the last 30 days"}),e.jsxs("span",{children:[e.jsx("strong",{style:{color:o.gray1},children:i.using})," of ",i.total," use Tomato.gg (",e.jsxs("strong",{style:{color:o.gray1},children:[i.pct,"%"]}),")"]})]})})]})});cn.displayName="ContactsSummary";const Fs=s.div.withConfig({displayName:"ContactTable__Wrap",componentId:"sc-iw44xw-0"})(["position:relative;overflow:auto;max-height:70vh;border:1px solid ",";border-radius:8px;background:",";"],o.darkgray1,o.darkgray4),$s=s.table.withConfig({displayName:"ContactTable__T",componentId:"sc-iw44xw-1"})(["width:100%;border-collapse:separate;border-spacing:0;font-size:12px;font-family:var(--font-roboto-mono);"]),Rs=s.th.withConfig({displayName:"ContactTable__Th",componentId:"sc-iw44xw-2"})(["position:sticky;top:0;z-index:3;background:",";color:",";padding:8px 8px;text-align:right;font-weight:600;font-size:11px;border-bottom:1px solid ",";cursor:pointer;user-select:none;white-space:nowrap;&:first-child{text-align:center;left:0;z-index:4;}&:nth-child(2){text-align:left;}",""],o.darkgray2,o.gray2,o.darkgray0,({$sticky:t})=>t&&`
10        position: sticky;
11        left: 0;
12        z-index: 4;
13    `),J=s.td.withConfig({displayName:"ContactTable__Td",componentId:"sc-iw44xw-3"})(["padding:",";text-align:right;color:",";border-bottom:1px solid ",";background:",";white-space:nowrap;&:first-child{text-align:center;}&:nth-child(2){text-align:left;}",""],({$compact:t})=>t?"2px 8px":"6px 8px",o.gray2,o.darkgray2,({$bg:t})=>t?`linear-gradient(${t}, ${t}), ${o.darkgray4}`:"inherit",({$sticky:t,$bg:n,$top:i})=>{const d=t,g=i!=null;if(!d&&!g)return"";const u=d&&g?5:g?2:1,l=n?`linear-gradient(${n}, ${n}), ${o.darkgray4}`:o.darkgray3;return`
14            position: sticky;
15            ${d?"left: 0;":""}
16            ${g?`top: ${i}px;`:""}
17            z-index: ${u};
18            background: ${l};
19        `}),Vs=s.tr.withConfig({displayName:"ContactTable__Row",componentId:"sc-iw44xw-4"})(["background:",";&:nth-child(odd){background:",";}&:hover{background:",";cursor:pointer;}"],o.darkgray4,o.darkgray3,o.darkgray2),fa=s.tr.withConfig({displayName:"ContactTable__FixedRow",componentId:"sc-iw44xw-5"})(["background:",";font-weight:600;color:",";border-bottom:1px solid ",";"],({$color:t})=>t?`linear-gradient(${t}, ${t}), ${o.darkgray4}`:o.darkgray2,o.gray1,o.darkgray0),ya=s.div.withConfig({displayName:"ContactTable__NameCell",componentId:"sc-iw44xw-6"})(["display:flex;align-items:center;gap:8px;min-width:220px;"]),Bs=s.div.withConfig({displayName:"ContactTable__NameMeta",componentId:"sc-iw44xw-7"})(["display:flex;flex-direction:column;line-height:1.15;"]),Zs=({dir:t})=>t?e.jsx("span",{style:{marginLeft:4},children:t==="asc"?"▲":"▼"}):e.jsx("span",{style:{opacity:0}
19,children:" "}),se=({label:t,tooltip:n})=>e.jsx(w,{message:n,children:e.jsx("span",{children:t})}),zs=(t,n,i=!1)=>Fo(t,n,i),Ce=({value:t,threshold:n,suffix:i,flipped:d,decimals:g})=>e.jsxs("span",{style:{color:zs(t,n,d)},children:[g!=null?t.toFixed(g):Math.round(t).toLocaleString(),i]}),oe=Pn(),Ds=s.div.withConfig({displayName:"ContactTable__ScrollHint",componentId:"sc-iw44xw-8"})(["display:none;@media (max-width:600px){display:flex;align-items:center;gap:6px;font-size:11px;color:",";margin-bottom:4px;}"],o.gray5),dn=a.memo(({rows:t,own:n,selectedIds:i,onToggleSelect:d,onSelectAll:g,onRowClick:u,showOwnerRow:l,columnVisibility:c,density:p="comfortable"})=>{const m=p==="compact",[_,k]=vn.useState(!1),{isPinned:f,toggle:j}=Qa(),V=n??t[0],N=a.useMemo(()=>{if(t.length===0)return null;const M=["global_rating","max_xp","max_damage","max_frags","avg_damage_assisted","avg_damage_dealt","hits_percents","winrate","battles","survival_rate","avg_battles_on_stunning_vehicles","last_battle_time","created_at"],x={};for(const S of M)x[S]=te(t.map(G=>Number(G[S]??0)));const A=t.map(S=>S.overallWn8??0).filter(S=>S>0),C=t.map(S=>S.recentWn8??0).filter(S=>S>0),L=t.map(S=>S.overallAvgTier??0).filter(S=>S>0),y=t.map(S=>S.recentBattles??0).filter(S=>S>0);return{...t[0],...x,account_id:-1,nickname:"Median",hasMod:!1,clan:null,overallWn8:A.length>0?te(A):0,recentWn8:C.length>0?te(C):0,overallAvgTier:L.length>0?te(L):0,recentBattles:y.length>0?te(y):0}},[t]),I=a.useMemo(()=>{const M=new Set(t.filter(C=>f(C.account_id)).map(C=>C.account_id)),x=t.filter(C=>M.has(C.account_id)),A=t.filter(C=>!M.has(C.account_id));return[...x,...A]},[t,f]),H=t.length>0&&t.every(M=>i.has(M.account_id)),O=a.useMemo(()=>{const M=V;return[oe.display({id:"select",header:()=>e.jsx(Ie,{checked:H,onCheckedChange:x=>g(t.map(A=>A.account_id),!!x)}),cell:x=>{const A=x.row.original.account_id;return e.jsx("div",{onClick:C=>C.stopPropagation(),children:e.jsx(Ie,{checked:i.has(A),onCheckedChange:()=>d(A)})})},size:30}),oe.accessor("nickname",{header:"Player",cell:x=>{const A=x.row.original;return e.jsxs(ya,{children:[e.jsxs(Bs,{children:[e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx(xt,{lastBattleTime:A.last_battle_time,logoutAt:A.logout_at}),e.jsx(Qe,{accountId:A.account_id,nickname:A.nickname}),A.hasMod&&e.jsx(w,{message:"Used Tomato.gg in the last 30 days",children:e.jsx("span",{style:{display:"inline-flex"},children:e.jsx(ze,{size:14})})})]}),e.jsx("span",{style:{fontSize:10,color:o.gray5},children:e.jsx(ft,{clan:A.clan})})]}),e.jsx("div",{style:{marginLeft:"auto"},onClick:C=>C.stopPropagation(),children:e.jsx(w,{message:f(A.account_id)?"Unpin":"Pin",children:e.jsx(Te,{size:"1",variant:"ghost",color:f(A.account_id)?"ruby":"gray",onClick:()=>j(A.account_id),"aria-label":"Pin",children:f(A.account_id)?e.jsx(Ma,{size:14,weight:"fill"}):e.jsx(Aa,{size:14})})})})]})},sortingFn:"basic"}),oe.accessor(x=>x.overallWn8??0,{id:"overallWn8",header:()=>e.jsx(se,{label:"WN8",tooltip:"WN8 – overall expected damage / spotting / wins normalized per tank. Colored on the standard WN8 scale."}),cell:x=>{const A=x.getValue();return A?e.jsx("span",{style:X(F(A)),children:Math.round(A).toLocaleString()}):e.jsx("span",{style:{color:o.gray5},children:"—"})},sortingFn:"basic"}),oe.accessor(x=>x.recentWn8??0,{id:"recentWn8",header:()=>e.jsx(se,{label:"Recent WN8",tooltip:"Recent WN8 – skill in the last few hundred battles. Useful to spot players who are improving or slumping."}),cell:x=>{const A=x.row.original,C=x.getValue();return!C||(A.recentBattles??0)===0?e.jsx("span",{style:{color:o.gray5},children:"—"}):e.jsx(w,{message:A.recentBattles?`Based on ${A.recentBattles.toLocaleString()} recent battles`:"Recent WN8",children:e.jsx("span",{style:X(F(C)),children:Math.round(C).toLocaleString()})})},sortingFn:"basic"}),oe.accessor(x=>{const A=x.recentWn8??0,C=x.overallWn8??0;return A<=0||C<=0?0:A-C},{id:"wn8_delta",header:()=>e.jsx(se,{label:"Δ WN8",tooltip:"Recent WN8 minus overall WN8. ▲ green = improving, ▼ red = slumping. Empty when there is no recent data."}),cell:x=>{const A=x.row.original,C=A.recentWn8??0,L=A.overallWn8??0;if(C<=0||L<=0||(A.recentBattles??0)===0)return e.jsx("span",{style:{color:o.gray5},children:"—"});const y=C-L,S=y>0?"▲":y<0?"▼":"·",G=y>0?o.green:y<0?o.red:o.gray3;return e.jsxs("span",{style:{color:G}
19,children:[S," ",Math.abs(Math.round(y)).toLocaleString()]})},sortingFn:"basic"}),oe.accessor("winrate",{header:()=>e.jsx(se,{label:"WR",tooltip:"Winrate %"}),cell:x=>e.jsx(Ce,{value:x.getValue(),threshold:M.winrate,suffix:"%",decimals:1}),sortingFn:"basic"}),oe.accessor("avg_damage_dealt",{header:()=>e.jsx(se,{label:"DPG",tooltip:"Damage per Game"}),cell:x=>e.jsx(Ce,{value:x.getValue(),threshold:M.avg_damage_dealt})}),oe.accessor("avg_damage_assisted",{header:()=>e.jsx(se,{label:"Assist",tooltip:"Average assistance damage per game"}),cell:x=>e.jsx(Ce,{value:x.getValue(),threshold:M.avg_damage_assisted})}),oe.accessor("hits_percents",{header:()=>e.jsx(se,{label:"Hits",tooltip:"Direct hit accuracy %"}),cell:x=>e.jsx(Ce,{value:x.getValue(),threshold:M.hits_percents,suffix:"%",decimals:1}),sortingFn:"basic"}),oe.accessor("survival_rate",{header:()=>e.jsx(se,{label:"Surv",tooltip:"Survival rate %"}),cell:x=>e.jsx(Ce,{value:x.getValue(),threshold:M.survival_rate,suffix:"%",decimals:1}),sortingFn:"basic"}),oe.accessor("max_damage",{header:()=>e.jsx(se,{label:"Max DMG",tooltip:"Highest damage dealt in a single battle"}),cell:x=>e.jsx(Ce,{value:x.getValue(),threshold:M.max_damage})}),oe.accessor("max_xp",{header:()=>e.jsx(se,{label:"Max XP",tooltip:"Highest XP earned in a single battle"}),cell:x=>e.jsx(Ce,{value:x.getValue(),threshold:M.max_xp})}),oe.accessor("max_frags",{header:()=>e.jsx(se,{label:"Max Frags",tooltip:"Most kills in a single battle"}),cell:x=>e.jsx(Ce,{value:x.getValue(),threshold:M.max_frags})}),oe.accessor("avg_battles_on_stunning_vehicles",{header:()=>e.jsx(se,{label:"Arty %",tooltip:"Share of battles played in artillery (lower is generally better, hence flipped color)"}),cell:x=>e.jsx(Ce,{value:x.getValue(),threshold:M.avg_battles_on_stunning_vehicles,suffix:"%",decimals:1,flipped:!0}),sortingFn:"basic"}),oe.accessor("battles",{header:()=>e.jsx(se,{label:"Battles",tooltip:"Total random battles played"}),cell:x=>e.jsx(Ce,{value:x.getValue(),threshold:M.battles})}),oe.accessor(x=>x.overallAvgTier??0,{id:"avgTier",header:()=>e.jsx(se,{label:"Avg Tier",tooltip:"Average tier across all played tanks. Higher tiers usually mean tougher matchmaking."}),cell:x=>{const A=x.getValue();return A?e.jsx("span",{style:{color:o.gray2},children:A.toFixed(1)}):e.jsx("span",{style:{color:o.gray5},children:"—"})},sortingFn:"basic"}),oe.accessor("last_battle_time",{header:()=>e.jsx(se,{label:"Last battle",tooltip:"Time since last random battle"}),cell:x=>e.jsx(ke,{ts:x.getValue()})}),oe.accessor("created_at",{header:()=>e.jsx(se,{label:"Joined",tooltip:"Account creation date"}),cell:x=>e.jsx(ke,{ts:x.getValue()})})]},[V,H,t,i,d,g,f,j]),D=zn({data:I,columns:O,state:{columnVisibility:c},getCoreRowModel:On(),getSortedRowModel:Dn()}),Z=m?28:33,T=m?24:32,P=Z,U=P+(l?T:0),K=D.getVisibleLeafColumns().map(M=>M.id),re=(M,x,A,C,L)=>{switch(M){case"select":return e.jsx(J,{$sticky:!0,$bg:C,$top:L,$compact:m},M);case"nickname":{const y=A==="You"?"Your own stats – cell colors in the table are relative to these values":A==="Median"?`Median across ${t.length} currently filtered contacts`:null;return e.jsx(J,{$sticky:!0,$bg:C,$top:L,$compact:m,children:e.jsx(ya,{children:A?e.jsx(e.Fragment,{children:y?e.jsx(w,{message:y,children:e.jsx("span",{style:{color:o.gray1},children:A})}):e.jsx("span",{style:{color:o.gray1},children:A})}):null})},M)}case"overallWn8":{const y=x.overallWn8??0;return e.jsx(J,{$bg:C,$top:L,$compact:m,children:y>0?Math.round(y).toLocaleString():"—"},M)}case"recentWn8":{const y=x.recentWn8??0;return e.jsx(J,{$bg:C,$top:L,$compact:m,children:y>0?Math.round(y).toLocaleString():"—"},M)}case"wn8_delta":{const y=x.recentWn8??0,S=x.overallWn8??0;if(y<=0||S<=0)return e.jsx(J,{$bg:C,$top:L,$compact:m,children:"—"},M);const G=y-S,Me=G>
190?"▲":G<0?"▼":"·";return e.jsxs(J,{$bg:C,$top:L,$compact:m,children:[Me," ",Math.abs(Math.round(G)).toLocaleString()]},M)}case"winrate":return e.jsxs(J,{$bg:C,$top:L,$compact:m,children:[x.winrate.toFixed(1),"%"]},M);case"avg_damage_dealt":return e.jsx(J,{$bg:C,$top:L,$compact:m,children:Math.round(x.avg_damage_dealt).toLocaleString()},M);case"avg_damage_assisted":return e.jsx(J,{$bg:C,$top:L,$compact:m,children:Math.round(x.avg_damage_assisted).toLocaleString()},M);case"hits_percents":return e.jsxs(J,{$bg:C,$top:L,$compact:m,children:[x.hits_percents.toFixed(1),"%"]},M);case"survival_rate":return e.jsxs(J,{$bg:C,$top:L,$compact:m,children:[x.survival_rate.toFixed(1),"%"]},M);case"max_damage":return e.jsx(J,{$bg:C,$top:L,$compact:m,children:Math.round(x.max_damage).toLocaleString()},M);case"max_xp":return e.jsx(J,{$bg:C,$top:L,$compact:m,children:Math.round(x.max_xp).toLocaleString()},M);case"max_frags":return e.jsx(J,{$bg:C,$top:L,$compact:m,children:Math.round(x.max_frags).toLocaleString()},M);case"avg_battles_on_stunning_vehicles":return e.jsxs(J,{$bg:C,$top:L,$compact:m,children:[x.avg_battles_on_stunning_vehicles.toFixed(1),"%"]},M);case"battles":return e.jsx(J,{$bg:C,$top:L,$compact:m,children:Math.round(x.battles).toLocaleString()},M);case"avgTier":{const y=x.overallAvgTier??0;return e.jsx(J,{$bg:C,$top:L,$compact:m,children:y>0?y.toFixed(1):"—"},M)}case"last_battle_time":return e.jsx(J,{$bg:C,$top:L,$compact:m,children:e.jsx(ke,{ts:x.last_battle_time})},M);case"created_at":return e.jsx(J,{$bg:C,$top:L,$compact:m,children:e.jsx(ke,{ts:x.created_at})},M);default:return e.jsx(J,{$bg:C,$top:L,$compact:m},M)}};return e.jsxs(e.Fragment,{children:[!_&&e.jsx(Ds,{children:e.jsx("span",{children:"← swipe horizontally for more columns →"})}),e.jsx(Fs,{onScroll:M=>{!_&&M.target.scrollLeft>8&&k(!0)},children:e.jsxs($s,{children:[e.jsx("thead",{children:D.getHeaderGroups().map(M=>e.jsx("tr",{children:M.headers.map(x=>e.jsxs(Rs,{$sticky:x.column.id==="select",onClick:x.column.getToggleSortingHandler(),children:[zt(x.column.columnDef.header,x.getContext()),e.jsx(Zs,{dir:x.column.getIsSorted()})]},x.id))},M.id))}),e.jsxs("tbody",{children:[l&&n&&e.jsx(fa,{$color:`${o.red}22`,children:K.map(M=>re(M,n,M==="nickname"?"You":void 0,`${o.red}22`,P))}),N&&e.jsx(fa,{$color:o.darkgray2,children:K.map(M=>re(M,N,M==="nickname"?"Median":void 0,o.darkgray2,U))}),D.getRowModel().rows.map(M=>e.jsx(Vs,{onClick:()=>u(M.original.account_id),children:M.getVisibleCells().map(x=>e.jsx(J,{$sticky:x.column.id==="select"||x.column.id==="nickname",$compact:m,children:zt(x.column.columnDef.cell,x.getContext())},x.id))},M.id))]})]})})]})});dn.displayName="ContactTable";const Os=1e3;function Be(t,n){const i=new Set,d=[];for(const g of t)n!==void 0&&g===n||i.has(g)||(i.add(g),d.push(g));return d.slice(0,Os)}function Ps(t){return a.useMemo(()=>{const n=t?.private?.grouped_contacts,i=t?.account_id;if(!n)return{buckets:[],allAccountIds:[]};const d=n.ungrouped??[],g=n.groups??{},u=n.blocked??[],l=n.muted??[],c=n.ignored??[],p=Be([...d,...Object.values(g).flat()],i),m=[];m.push({id:"friends",kind:"friends",label:"All friends",accountIds:p});const _=Object.keys(g).sort((f,j)=>f.localeCompare(j));for(const f of _){const j=Be(g[f]??[],i);j.length!==0&&m.push({id:`group:${f}`,kind:"group",label:f,groupName:f,accountIds:j})}d.length>0&&m.push({id:"ungrouped",kind:"ungrouped",label:"Ungrouped",accountIds:Be(d,i)}),u.length>0&&m.push({id:"blocked",kind:"blocked",label:"Blocked",accountIds:Be(u,i)}),l.length>0&&m.push({id:"muted",kind:"muted",label:"Muted",accountIds:Be(l,i)}),c.length>0&&m.push({id:"ignored",kind:"ignored",label:"Ignored",accountIds:Be(c,i)});const k=Be([...p,...u,...l,...c],i);return{buckets:m,allAccountIds:k}},[t])}const Gs=100,qs=100,Us=100;function mn(t){const n=t.statistics?.all??{},i=n.battles??0,d=i||1;return{account_id:t.account_id,created_at:t.created_at??0,updated_at:t.updated_at??0,nickname:t.nickname,global_rating:t.global_rating??0,logout_at:t.logout_at??0,last_battle_time:t.last_battle_time??0,clan_id:t.clan_id??0,spotted:n.spotted??0,battles_on_stunning_vehicles:n.battles_on_stunning_vehicles??0,max_xp:n.max_xp??0,avg_damage_blocked:n.avg_damage_blocked??0,direct_hits_received:n.direct_hits_received??0,explosion_hits:n.explosion_hits??0,piercing_received:n.piercing_received??0,piercings:n.piercings??0,max_damage_tank_id:n.max_damage_tank_id??0,xp:n.xp??0,survived_battles:n.survived_battles??0,dropped_capture_points:n.dropped_capture_points??0,hits_percents:n.hits_percents??0,draws:n.draws??0,max_xp_tank_id:n.max_xp_tank_id??0,battles:i,damage_received:n.damage_received??0,avg_damage_assisted:Oe(n.avg_damage_assisted??0,0),max_frags_tank_id:n.max_frags_tank_id??0,avg_damage_assisted_track:n.avg_damage_assisted_track??0,frags:n.frags??0,stun_number:n.stun_number??0,avg_damage_assisted_radio:n.avg_damage_assisted_radio??0,capture_points:n.capture_points??0,stun_assisted_damage:n.stun_assisted_damage??0,max_damage:n.max_damage??0,hits:n.hits??0,battle_avg_xp:n.battle_avg_xp??0,wins:n.wins??0,losses:n.losses??0,damage_dealt:n.damage_dealt??0,no_damage_direct_hits_received:n.no_damage_direct_hits_received??0,max_frags:n.max_frags??0,shots:n.shots??0,explosion_hits_received:n.explosion_hits_received??0,tanking_factor:n.tanking_factor??0,winrate:Oe((n.wins??0)/d*100,2),avg_battles_on_stunning_vehicles:Oe((n.battles_on_stunning_vehicles??0)/d*100,2),survival_rate:Oe((n.survived_battles??0)/d*100,2),avg_damage_dealt:Oe((n.damage_dealt??0)/d,0),avg_pens:Oe((n.piercings??0)/(n.shots||1),2)}}async function Ys(t,n){if(!n.length)return[];const i=Ft(n,Gs),g=(await Promise.allSettled(i.map(async l=>{const c=await fetch(`https://api.worldoftanks.${t}/wot/account/info/?application_id=${Na}&account_id=${l.join(",")}&fields=account_id,created_at,updated_at,nickname,global_rating,logout_at,last_battle_time,clan_id,statistics.all`);if(!c.ok)throw new Error("WG account info request failed");return(await c.json()).data}))).filter(l=>l.status==="fulfilled");if(g.length===0)throw new Error("All WG account info chunks failed");const u=g.reduce((l,c)=>({...l,...c.value}),{});return Object.values(u).filter(l=>l!==null).map(mn)}async function Ks(t,n){const i=t.toLowerCase()==="na"?"com":t.toLowerCase(),d=Array.from(new Set(n.filter(l=>!!l&&l>0)));if(d.length===0)return{};const g=Ft(d,qs),u={};return await Promise.allSettled(g.map(async l=>{try{const c=await fetch(`https://api.worldoftanks.${i}/wot/clans/info/?application_id=${Na}&clan_id=${l.join(",")}`);
19if(!c.ok)return;const p=await c.json();Object.values(p.data||{}).forEach(m=>{m&&(u[m.clan_id]={clan_id:m.clan_id,tag:m.tag,name:m.name,color:m.color,emblem:m.emblems?.x64?.portal??m.emblems?.x195?.portal,emblemLarge:m.emblems?.x195?.portal??m.emblems?.x64?.portal,members_count:m.members_count,motto:m.motto,leader_id:m.leader_id,leader_name:m.leader_name,created_at:m.created_at,description:m.description})})}catch{}})),u}async function Xs(t){if(!t.length)return{};const n=Ft(t,Us),i={};return await Promise.allSettled(n.map(async d=>{try{const g=await Gn(d);for(const[u,l]of Object.entries(g.data??{})){const c=Number(u);Number.isFinite(c)&&(i[c]={overallWn8:l.overall?.wn8??0,recentWn8:l.recent?.wn8??0,recentBattles:l.recent?.battles??0,recentWinrate:l.recent?.winrate??0,overallAvgTier:l.overall?.avgTier??0})}}catch{}})),i}async function Qs(t){if(!t.length)return{};try{const n=await qn(t),i={},d=n.data?.[0]??[];for(const g of d)i[g.account_id]=!!g.hasMod;return i}catch{return{}}}function Js(t,n,i){const d=a.useMemo(()=>[...t].sort((I,H)=>I-H),[t]),g=d.join(","),u=at({queryKey:["contacts","accounts",i,g],queryFn:()=>Ys(i,d),enabled:d.length>0,staleTime:1e3*60*5,refetchOnWindowFocus:!1}),l=u.data??[],c=n?.account_id??0,p=n?.clan_id??0,m=a.useMemo(()=>{const I=new Set;for(const H of l)H.clan_id&&H.clan_id>0&&I.add(H.clan_id);return p>0&&I.add(p),Array.from(I).sort((H,O)=>H-O)},[l,p]),_=at({queryKey:["contacts","clans",i,m.join(",")],queryFn:()=>Ks(i,m),enabled:m.length>0,staleTime:1e3*60*30,refetchOnWindowFocus:!1}),k=a.useMemo(()=>{const I=new Set(d);return c>0&&I.add(c),Array.from(I).sort((H,O)=>H-O)},[d,c]),f=at({queryKey:["contacts","hasMod",g],queryFn:()=>Qs(d),enabled:d.length>0,staleTime:1e3*60*5,refetchOnWindowFocus:!1}),j=at({queryKey:["contacts","wn8",i,k.join(",")],queryFn:()=>Xs(k),enabled:k.length>0,staleTime:1e3*60*10,refetchOnWindowFocus:!1}),V=a.useMemo(()=>{const I=new Map,H=_.data??{},O=f.data??{},D=j.data??{};for(const Z of l){const T=D[Z.account_id];I.set(Z.account_id,{...Z,hasMod:!!O[Z.account_id],clan:Z.clan_id?H[Z.clan_id]??null:null,overallWn8:T?.overallWn8,recentWn8:T?.recentWn8,recentBattles:T?.recentBattles,recentWinrate:T?.recentWinrate,overallAvgTier:T?.overallAvgTier})}return I},[l,_.data,f.data,j.data]),N=a.useMemo(()=>{if(!n)return null;const I=mn(n),H=j.data?.[I.account_id],O=I.clan_id&&_.data?_.data[I.clan_id]??null:null;return{...I,hasMod:!0,clan:O,overallWn8:H?.overallWn8,recentWn8:H?.recentWn8,recentBattles:H?.recentBattles,recentWinrate:H?.recentWinrate,overallAvgTier:H?.overallAvgTier}},[n,j.data,_.data]);return{isLoading:u.isLoading,isError:u.isError,contactsById:V,ownContact:N}}const el=["all","online","active7d","active30d","inactive90d"],tl=["all","tomato","low","average","good","great","unicum","superunicum"],al=s.div.withConfig({displayName:"Contacts__Layout",componentId:"sc-1rirwa5-0"})(["display:flex;flex-direction:column;gap:12px;"]),ba=s.div.withConfig({displayName:"Contacts__OverviewGrid",componentId:"sc-1rirwa5-1"})(["display:grid;grid-template-columns:repeat(3,1fr);gap:12px;@media (max-width:1100px){grid-template-columns:1fr;}"]),pn=1e4,Lt=400,nl=s.div.withConfig({displayName:"Contacts__TopRow",componentId:"sc-1rirwa5-2"})(["display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding-top:24px;"]),ol=s.div.withConfig({displayName:"Contacts__QuoteWrap",componentId:"sc-1rirwa5-3"})(["display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:10px;color:",";min-height:80px;flex:1;min-width:0;.quote-content{display:flex;flex-direction:column;align-items:flex-start;gap:8px;animation:quote-in ","ms ease both;}.quote-content.out{animation:quote-out ","ms ease both;}@keyframes quote-in{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:translateY(0);}}@keyframes quote-out{from{opacity:1;transform:translateY(0);}to{opacity:0;transform:translateY(-6px);}}blockquote{margin:0;font-style:italic;font-size:18px;max-width:760px;line-height:1.45;position:relative;color:",';&::before{content:"\\201C";color:',';font-size:32px;line-height:0;margin-right:6px;vertical-align:-6px;}&::after{content:"\\201D";color:',";font-size:32px;line-height:0;margin-left:6px;vertical-align:-12px;}}cite{font-style:normal;font-size:13px;font-family:var(--font-roboto-mono);text-transform:uppercase;letter-spacing:1px;color:",';&::before{content:"— ";}}.quote-progress{margin-top:4px;
19height:3px;width:96px;border-radius:2px;background:',';overflow:hidden;}.quote-progress::after{content:"";display:block;height:100%;background:linear-gradient(90deg,'," 0%,"," 100%);transform-origin:left;transform:scaleX(0);animation:quote-progress ","ms linear both;}.quote-progress.paused::after{animation-play-state:paused;}@keyframes quote-progress{from{transform:scaleX(0);}to{transform:scaleX(1);}}@media (prefers-reduced-motion:reduce){.quote-content,.quote-content.out{animation:none;}.quote-progress::after{animation:none;transform:scaleX(0);}}"],o.gray4,Lt,Lt,o.gray2,o.gray5,o.gray5,o.gray4,o.darkgray2,o.gray5,o.gray3,pn),Wt=[{text:"You are the average of the five people you spend the most time with.",author:"Jim Rohn"},{text:"Show me your friends and I'll show you your future.",author:"Mark Ambrose"},{text:"Surround yourself with those who only lift you higher.",author:"Oprah Winfrey"},{text:"Tell me with whom you associate, and I will tell you who you are.",author:"Johann Wolfgang von Goethe"},{text:"A real platoon mate is one who walks in when the rest of the world walks out.",author:"Walter Winchell, adapted"},{text:"Alone we can do so little; together we can do so much.",author:"Helen Keller"},{text:"If you want to go fast, go alone. If you want to go far, go together.",author:"African proverb"},{text:"Friendship doubles your joy and divides your sorrow.",author:"Swedish proverb"},{text:"We rise by lifting others.",author:"Robert Ingersoll"},{text:"Iron sharpens iron, and one friend sharpens another.",author:"Proverbs 27:17"}];function rl(){return Math.floor(Date.now()/864e5)%Wt.length}const va=s.div.withConfig({displayName:"Contacts__Empty",componentId:"sc-1rirwa5-4"})(["padding:28px;text-align:center;color:",";background:",";border:1px dashed ",";border-radius:8px;"],o.gray4,o.darkgray3,o.darkgray1),il=s.div.withConfig({displayName:"Contacts__TableSection",componentId:"sc-1rirwa5-5"})(["display:flex;flex-direction:column;gap:14px;"]),sl=s.div.withConfig({displayName:"Contacts__SecondaryBadgeRow",componentId:"sc-1rirwa5-6"})(["display:flex;flex-wrap:wrap;gap:6px;margin-top:-6px;"]),ll=s.div.withConfig({displayName:"Contacts__InsightsTitleBar",componentId:"sc-1rirwa5-7"})(["display:flex;align-items:center;gap:10px;min-height:22px;flex-shrink:0;"]),cl=s.div.withConfig({displayName:"Contacts__PrivacyChip",componentId:"sc-1rirwa5-8"})(["display:inline-flex;align-items:center;gap:6px;font-size:11px;color:",";font-family:var(--font-roboto-mono);text-transform:uppercase;letter-spacing:1px;"],o.gray5),dl=e.jsx("p",{children:"Friends, blocked, muted and ignored data is fetched live from your Wargaming account and only visible while you are logged in. Tomato.gg does not store this data."}),ml=s.div.withConfig({displayName:"Contacts__ErrorBanner",componentId:"sc-1rirwa5-9"})(["display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;color:",";background:","22;border:1px solid ",";border-radius:6px;padding:8px 12px;"],o.gray1,o.red,o.red),pl=s.button.withConfig({displayName:"Contacts__RetryButton",componentId:"sc-1rirwa5-10"})(["background:transparent;border:1px solid ",";color:",";border-radius:4px;padding:2px 10px;font-size:11px;cursor:pointer;font-family:inherit;&:hover{background:","33;}"],o.red,o.gray1,o.red),gl=a.memo(({metaData:t,server:n})=>{const{hasPrem:i}=wn(),{buckets:d,allAccountIds:g}=Ps(t),[u,l]=a.useState(()=>rl()),[c,p]=a.useState(!1);a.useEffect(()=>{const W=window.setTimeout(()=>p(!0),pn);return()=>window.clearTimeout(W)}
19,[u]),a.useEffect(()=>{if(!c)return;const W=window.setTimeout(()=>{l(E=>(E+1)%Wt.length),p(!1)},Lt);return()=>window.clearTimeout(W)},[c]);const m=Wt[u],{contactsById:_,ownContact:k,isLoading:f,isError:j}=Js(g,t,n);a.useEffect(()=>{j&&Pe.error("Couldn't load contacts. Try refreshing in a moment.",{id:"contacts-error"})},[j]);const V=a.useRef(()=>{}),N=a.useRef(()=>{}),[I,H]=Fe("bucket",Rt.withDefault("friends")),[O,D]=Fe("view",jt(["table","grid"]).withDefault("table")),[Z,T]=Fe("q",Rt.withDefault("")),[P,U]=Fe("activity",jt(el).withDefault("all")),[K,re]=Fe("wtr",jt(tl).withDefault("all")),[M,x]=Fe("tomato",Vt.withDefault(!1)),[A,C]=Fe("sameClan",Vt.withDefault(!1)),[L,y]=a.useState(new Set),[S,G]=a.useState(null),[Me,ye]=a.useState(!1),[Ae,yt]=qe("contacts.density","comfortable"),{visibility:Je,toggle:bt,reset:vt}=Pr(),ee=a.useRef(null);a.useEffect(()=>{const W=E=>{const ae=E.target,Ee=ae instanceof HTMLInputElement||ae instanceof HTMLTextAreaElement||ae instanceof HTMLSelectElement||ae?.isContentEditable;if(E.key==="Escape"&&S!=null){G(null);return}Ee||E.metaKey||E.ctrlKey||E.altKey||(E.key==="/"?(E.preventDefault(),ee.current?.focus()):E.key.toLowerCase()==="c"?V.current():E.key.toLowerCase()==="e"&&N.current())};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[S]);const Ye=a.useMemo(()=>({search:Z,activity:P,wtr:K,onlyTomato:M,onlySameClan:A}),[Z,P,K,M,A]),et=a.useCallback(W=>{T(W.search||null),U(W.activity==="all"?null:W.activity),re(W.wtr==="all"?null:W.wtr),x(W.onlyTomato||null),C(W.onlySameClan||null)},[T,U,re,x,C]),ne=a.useMemo(()=>d.find(W=>W.id===I)??d[0],[d,I]),r=a.useMemo(()=>{const W=d.find(E=>E.kind==="friends");return W?W.accountIds.map(E=>_.get(E)).filter(E=>!!E):[]},[d,_]),h=a.useMemo(()=>{const W=E=>d.find(ae=>ae.kind===E)?.accountIds.length??0;return{muted:W("muted"),ignored:W("ignored")}},[d]),v=a.useMemo(()=>ne?ne.accountIds.map(W=>_.get(W)).filter(W=>!!W):[],[ne,_]),b=To(v,Ye,t?.clan_id),R=a.useCallback(W=>{y(E=>{const ae=new Set(E);return ae.has(W)?ae.delete(W):ae.add(W),ae})},[]),$=a.useCallback((W,E)=>{y(ae=>{const Ee=new Set(ae);return E?W.forEach(_t=>Ee.add(_t)):W.forEach(_t=>Ee.delete(_t)),Ee})},[]),Y=a.useCallback(()=>y(new Set),[]),z=a.useCallback(()=>{if(L.size<2){Pe.error("Select at least 2 contacts to compare");return}if(L.size>6){Pe.error("Compare supports up to 6 contacts");return}ye(!0)},[L]),Q=a.useCallback(()=>{const W=Array.from(L).join(",");navigator.clipboard.writeText(W).then(()=>Pe.success(`${L.size} IDs copied`),()=>Pe.error("Failed to copy"))},[L]),le=a.useCallback(()=>{const W=L.size>0?b.filter(E=>L.has(E.account_id)):b;if(W.length===0){Pe.error("Nothing to export");return}qo(`tomato-contacts-${ne?.id??"all"}.csv`,W.map(E=>({account_id:E.account_id,nickname:E.nickname,clan:E.clan?.tag??"",clan_color:E.clan?.color??"",personal_rating:Math.round(E.global_rating),wn8:Math.round(E.overallWn8??0),recent_wn8:Math.round(E.recentWn8??0),avg_tier:E.overallAvgTier?E.overallAvgTier.toFixed(1):"",winrate:E.winrate,avg_dmg:Math.round(E.avg_damage_dealt),battles:E.battles,last_battle:E.last_battle_time,has_mod:E.hasMod?"yes":"no"})))},[b,L,ne]);a.useEffect(()=>{V.current=z,N.current=le},[z,le]);const Ne=S!=null?_.get(S)??null:null,De=a.useMemo(()=>{if(S==null||b.length===0)return{onPrev:void 0,onNext:void 0};const W=b.findIndex(Ee=>Ee.account_id===S);if(W===-1)return{onPrev:void 0,onNext:void 0};const E=W>0?b[W-1]:null,ae=W<b.length-1?b[W+1]:null;return{onPrev:E?()=>G(E.account_id):void 0,onNext:ae?()=>G(ae.account_id):void 0}},[S,b]),wt=a.useMemo(()=>b.filter(W=>L.has(W.account_id)).slice(0,6),[b,L]);if(d.length===0)return e.jsx(fe,{attribution:!0,children:e.jsx(va,{children:"No contact data available. Make sure your Wargaming account is linked and you are logged in on your own profile."})});const gn=e.jsx(ll,{children:e.jsxs(cl,{children:[e.jsx(_n,{size:14,title:"How contacts data is fetched",message:dl}),e.jsx("span",{children:"Privacy"})]})}),hn=e.jsx(fe,{title:"Contacts",attribution:!0,info:"Total friends + breakdown of muted / blocked / ignored players, plus quick activity, battle and Tomato.gg usage chips above the table.",outerStyle:{gridColumn:"1 / -1"},children:e.jsxs(il,{children:[e.jsx(cn,{friends:r}),e.jsx(en,{buckets:d,activeId:ne?.id??"friends",onSelect:W=>{H(W),Y()}}),(h.muted>0||h.ignored>0)&&e.jsxs(sl,{children:[h.muted>0&&e.jsxs(He,{color:"amber",variant:"soft",children:[h.muted," muted"]}),h.ignored>0&&e.jsxs(He,{color:"gray",variant:"soft",children:[h.ignored," ignored"]})]}),e.jsx(tn,{filter:Ye,setFilter:et,onResetFilters:()=>et(Io),view:O,setView:W=>{D(W)},selectedCount:L.size,onClearSelection:Y,onCompare:z,onCopyIds:Q,onExportCsv:le,canSameClanFilter:!!t?.clan_id,totalShown:b.length,totalAvailable:v.length,columnVisibility:Je,toggleColumn:bt,resetColumns:vt,density:Ae,setDensity:yt,searchInputRef:ee}),b.length===0?e.jsx(va,{children:v.length===0?`No ${ne?.label.toLowerCase()??"contacts"} yet.`:"No contacts match your filters."}):O==="table"?e.jsx(dn,{rows:b,own:k,selectedIds:L,onToggleSelect:R,onSelectAll:$,onRowClick:G,showOwnerRow:ne?.kind==="friends"||ne?.kind==="group"||ne?.kind==="ungrouped",columnVisibility:Je,density:Ae}):e.jsx(Ja,{rows:b,selectedIds:L,onToggleSelect:R,onRowClick:G})]})});return e.jsxs(al,{children:[e.jsxs(nl,{children:[e.jsxs(ol,{"aria-live":"polite",children:[e.jsxs("div",{className:`quote-content${c?" out":""}`,children:[e.jsx("blockquote",{children:m.text}),e.jsx("cite",{children:m.author})]},u),e.jsx("div",{className:`quote-progress${c?" paused":""}`,"aria-hidden":!0},`pg-${u}`)]}),gn]}),j&&e.jsxs(ml,{children:[e.jsx("span",{children:"Couldn't load contacts. The Wargaming API might be temporarily down."}),e.jsx(pl,{onClick:()=>window.location.reload(),children:"Retry"})]}),f?e.jsxs(ba,{children:[e.jsx(fe,{outerStyle:{gridColumn:"1 / -1"},attribution:!0,children:e.jsx(ln,{tiles:6})}),e.jsx(fe,{outerStyle:{gridColumn:"1 / -1"},attribution:!0,children:e.jsx(sn,{rows:10})})]}):e.jsxs(ba,{children:[e.jsx(rn,{friends:r,own:k,buckets:d,server:n,onSelectContact:G,hasPrem:i}),hn]}),e.jsx(Xa,{contact:Ne,own:k,server:n,onClose:()=>G(null),onPrev:De.onPrev,onNext:De.onNext}),e.jsx(Ka,{open:Me,onOpenChange:ye,contacts:wt,own:k,onRemoveContact:W=>{y(E=>{const ae=new Set(E);return ae.delete(W),ae})}})]})});gl.displayName="Contacts";export{gl as Contacts};

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.