{"version":3,"file":"get-series-labels.mjs","names":[],"sources":["../../../src/utils/get-series-labels/get-series-labels.ts"],"sourcesContent":["import { ChartSeries } from '../../types';\n\ntype ChartSeriesLabels = Record<string, string | undefined>;\n\nexport function getSeriesLabels(series: ChartSeries[] | undefined): ChartSeriesLabels {\n  if (!series) {\n    return {};\n  }\n\n  return series.reduce<ChartSeriesLabels>((acc, item) => {\n    const matchFound = item.name.search(/\\./);\n    if (matchFound >= 0) {\n      const key = item.name.substring(matchFound + 1);\n      acc[key] = item.label;\n      return acc;\n    }\n    acc[item.name] = item.label;\n    return acc;\n  }, {});\n}\n"],"mappings":";;AAIA,SAAgB,gBAAgB,QAAsD;CACpF,IAAI,CAAC,QACH,OAAO,CAAC;CAGV,OAAO,OAAO,QAA2B,KAAK,SAAS;EACrD,MAAM,aAAa,KAAK,KAAK,OAAO,IAAI;EACxC,IAAI,cAAc,GAAG;GACnB,MAAM,MAAM,KAAK,KAAK,UAAU,aAAa,CAAC;GAC9C,IAAI,OAAO,KAAK;GAChB,OAAO;EACT;EACA,IAAI,KAAK,QAAQ,KAAK;EACtB,OAAO;CACT,GAAG,CAAC,CAAC;AACP"}