{"version":3,"file":"utils.cjs","names":[],"sources":["../../../components/avatar/utils.js"],"sourcesContent":["export const extractInitialsFromName = (fullName) => {\n  if (typeof fullName !== 'string' || !fullName.trim()) return '';\n\n  // sanitize fullName by leaving only letters, numbers and spaces\n  fullName = fullName.replace(/[^\\p{L}\\p{N}\\s]/gu, '');\n\n  const names = fullName.trim().split(/\\s+/g);\n\n  return names.length === 1\n    ? names.join('').substring(0, 2)\n    : names.filter((_, index) => (index === 0 || index === names.length - 1))\n      .map(name => name.slice(0, 1).toUpperCase())\n      .join('');\n};\n"],"mappings":"mEAAA,IAAa,EAA2B,GAAa,CACnD,GAAI,OAAO,GAAa,UAAY,CAAC,EAAS,MAAM,CAAE,MAAO,GAG7D,EAAW,EAAS,QAAQ,oBAAqB,GAAG,CAEpD,IAAM,EAAQ,EAAS,MAAM,CAAC,MAAM,OAAO,CAE3C,OAAO,EAAM,SAAW,EACpB,EAAM,KAAK,GAAG,CAAC,UAAU,EAAG,EAAE,CAC9B,EAAM,QAAQ,EAAG,IAAW,IAAU,GAAK,IAAU,EAAM,OAAS,EAAG,CACtE,IAAI,GAAQ,EAAK,MAAM,EAAG,EAAE,CAAC,aAAa,CAAC,CAC3C,KAAK,GAAG"}