import{n as e}from"./BNTlsKDJ.js";import{X as t,bt as n,ht as r,vt as i}from"./BT3KAag_.js";import{t as a}from"./9bCTHkeS.js";import{t as o}from"./CHgG1pyP.js";var s=e({AGENT_AVATAR_COLOR:()=>l,userColors:()=>m}),c=[`#FE3C3C`,`#C06A6A`,`#CC7013`,`#AB8630`,`#5A9A08`,`#369770`,`#289795`,`#4289C4`,`#718599`,`#7C7CD9`,`#B267F3`,`#B269C0`,`#DC6CD4`],l=`#7C7CD9`,u=n(r({}));async function d(){try{let{colors:e}=await a(`/api/auth/colors`);i(u,e,!0)}catch{}}function f(e,n){if(n===`agent`)return l;let r=t(u)[String(e)];if(r)return r;let i=typeof e==`number`?e:parseInt(String(e),10),a=(Number.isFinite(i)?i:p(String(e)))%c.length;return c[Math.abs(a)]}function p(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}d(),o.addConnectHandler(()=>d());var m={getColor:f,load:d,get colors(){return t(u)}};export{s as n,m as t};