{"version":3,"file":"utils.cjs","sources":["../../src/components/avatar/utils/get-initials.ts","../../src/components/avatar/utils/get-full-name.ts"],"sourcesContent":["/**\n * Extract a one- or two-character initials string from the supplied names.\n *\n * Defensive against missing input: handles `undefined`, empty strings, and\n * whitespace-only strings by trimming and dropping empty parts. Codepoint-\n * safe: uses `Array.from` so astral-plane characters (e.g. emoji surrogate\n * pairs) are not split mid-surrogate. Returns an empty string when neither\n * input yields a usable character — callers use that signal to render the\n * `Person` icon fallback instead of text.\n */\nexport function getInitials(firstName?: string, lastName?: string) {\n  const first = Array.from((firstName ?? \"\").trim())[0]?.toUpperCase() ?? \"\";\n  const last = Array.from((lastName ?? \"\").trim())[0]?.toUpperCase() ?? \"\";\n  return `${first}${last}`;\n}\n","/**\n * Compose a display-ready full name from the trimmed non-empty parts.\n * Returns \"\" when both inputs are missing/empty/whitespace-only so the\n * caller can fall back to a generic localized label.\n */\nexport function getFullName(firstName?: string, lastName?: string) {\n  return [firstName, lastName]\n    .map((s) => s?.trim() ?? \"\")\n    .filter(Boolean)\n    .join(\" \");\n}\n"],"names":["getInitials","firstName","lastName","first","last","getFullName","s"],"mappings":"aAUO,SAASA,EAAYC,EAAoBC,EAAmB,CACjE,MAAMC,EAAQ,MAAM,MAAMF,GAAa,IAAI,KAAA,CAAM,EAAE,CAAC,GAAG,YAAA,GAAiB,GAClEG,EAAO,MAAM,MAAMF,GAAY,IAAI,KAAA,CAAM,EAAE,CAAC,GAAG,YAAA,GAAiB,GACtE,MAAO,GAAGC,CAAK,GAAGC,CAAI,EACxB,CCTO,SAASC,EAAYJ,EAAoBC,EAAmB,CACjE,MAAO,CAACD,EAAWC,CAAQ,EACxB,IAAKI,GAAMA,GAAG,KAAA,GAAU,EAAE,EAC1B,OAAO,OAAO,EACd,KAAK,GAAG,CACb"}