import{x as n,r as t}from"./p-DKrliuRO.js";const o=n({typingAdmins:[]});function c(){const n=t.get("memberList");let o=n.find((n=>n.is_current_admin));if(!o){const c=t.get("accessToken");if(c)try{const t=c.split(".")[1];if(t){const c=t.replace(/-/g,"+").replace(/_/g,"/"),e=decodeURIComponent(atob(c).split("").map((n=>"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2))).join("")),s=JSON.parse(e);s&&s.id&&(o=n.find((n=>n.id===s.id)))}}catch(n){}}if(!o)return null;const c=`${o.member_account?.first_name||""} ${o.member_account?.last_name||""}`.trim()||o.member_login_data?.email||"Admin";return{id:o.id,name:c}}function e(){const n=t.get("accessToken");if(!n)return null;try{const t=n.split(".")[1];if(!t)return null;const o=t.replace(/-/g,"+").replace(/_/g,"/"),c=decodeURIComponent(atob(o).split("").map((n=>"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2))).join("")),e=JSON.parse(c);return e?.id||null}catch{return null}}export{c as a,e as g,o as t}