{"version":3,"sources":["../../src/sections/authors.ts"],"sourcesContent":["import { type ListOptions, ListSection } from './list-section.js';\nimport { link } from '../elements/link.js';\nimport { mentionPerson } from '../elements/mention.js';\n\ninterface Author {\n  githubUsername: string;\n}\n\nexport interface AuthorsOptions extends Partial<ListOptions<Author>> {}\n\nexport class Authors extends ListSection<Author> {\n  constructor(options?: AuthorsOptions) {\n    super({\n      title: options?.title ?? 'Authors',\n      type: 'Unordered',\n      ...options,\n    });\n  }\n\n  protected itemMapper(author: Author): string {\n    return link(\n      mentionPerson(author.githubUsername),\n      new URL(author.githubUsername, 'https://www.github.com').toString(),\n    );\n  }\n}\n\nexport function authorsSection(options?: AuthorsOptions) {\n  return new Authors(options);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA8C;AAC9C,kBAAqB;AACrB,qBAA8B;AAQvB,MAAM,gBAAgB,gCAAoB;AAAA,EAC/C,YAAY,SAA0B;AACpC,UAAM;AAAA,MACJ,OAAO,SAAS,SAAS;AAAA,MACzB,MAAM;AAAA,MACN,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAAA,EAEU,WAAW,QAAwB;AAC3C,eAAO;AAAA,UACL,8BAAc,OAAO,cAAc;AAAA,MACnC,IAAI,IAAI,OAAO,gBAAgB,wBAAwB,EAAE,SAAS;AAAA,IACpE;AAAA,EACF;AACF;AAEO,SAAS,eAAe,SAA0B;AACvD,SAAO,IAAI,QAAQ,OAAO;AAC5B;","names":[]}