{
  "version": 3,
  "sources": ["../src/index.ts", "../src/file-readers/front-matter.ts", "../src/entry-cjs.ts"],
  "sourcesContent": ["import { Package } from \"dgeni\";\nimport { frontMatterFileReaderFactory } from \"./file-readers/front-matter\";\nimport type { FileReader, ReadFilesProcessor } from \"./types\";\n\ninterface TemplateFinder {\n\ttemplatePatterns: string[];\n}\n\nfunction frontMatterReaderConfig(\n\treadFilesProcessor: ReadFilesProcessor,\n\tfrontMatterFileReader: FileReader,\n): void {\n\tconst { fileReaders = [] } = readFilesProcessor;\n\treadFilesProcessor.fileReaders = [frontMatterFileReader, ...fileReaders];\n}\n\nfunction frontMatterTemplateConfig(templateFinder: TemplateFinder): void {\n\ttemplateFinder.templatePatterns = [\n\t\t\"${ doc.template }\",\n\t\t\"${ doc.id }.${ doc.docType }.template.html\",\n\t\t\"${ doc.id }.template.html\",\n\t\t\"${ doc.docType }.template.html\",\n\t];\n}\n\nconst pkg = new Package(\"front-matter\", []);\npkg.factory(frontMatterFileReaderFactory);\npkg.config(frontMatterReaderConfig);\npkg.config(frontMatterTemplateConfig);\n\nexport default pkg;\n", "import fm from \"front-matter\";\nimport type { FileInfo, FileReader } from \"../types\";\n\ninterface Attributes {\n\tdocType?: string;\n\ttitle?: string;\n\tname?: string;\n}\n\nexport function frontMatterFileReaderFactory(): FileReader {\n\treturn {\n\t\tname: \"frontMatterFileReader\",\n\t\tdefaultPattern: /\\.md$/,\n\t\tgetDocs(fileInfo: FileInfo) {\n\t\t\tconst content = fm<Attributes>(fileInfo.content);\n\n\t\t\tif (!content.frontmatter) {\n\t\t\t\treturn [\n\t\t\t\t\t{\n\t\t\t\t\t\tcontent: fileInfo.content,\n\t\t\t\t\t\tstartingLine: 1,\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t}\n\n\t\t\tconst doc = {\n\t\t\t\tdocType: \"front-matter\",\n\t\t\t\tfrontMatter: true,\n\t\t\t\tcontent: content.body,\n\t\t\t\tstartingLine: 1,\n\t\t\t\t...content.attributes,\n\t\t\t};\n\t\t\treturn [doc];\n\t\t},\n\t};\n}\n\n/* This is needed for dgeni dependency injection to work: dgeni uses the\n * parameter name to lookup the function but esbuild does not allow shadowing\n * parameter names, dgeni inspects the `name` property so this way both tools\n * are happy. If you modify this code, ensure that the dependency injection\n * continues to work properly. */\nObject.defineProperty(frontMatterFileReaderFactory, \"name\", {\n\tvalue: \"frontMatterFileReader\",\n\tconfigurable: true,\n});\n", "import pkg from \"./index\";\n\nexport = pkg;\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mBAAwB;;;ACAxB,0BAAe;AASR,SAAS,+BAA2C;AAC1D,SAAO;AAAA,IACN,MAAM;AAAA,IACN,gBAAgB;AAAA,IAChB,QAAQ,UAAoB;AAC3B,YAAM,cAAU,oBAAAA,SAAe,SAAS,OAAO;AAE/C,UAAI,CAAC,QAAQ,aAAa;AACzB,eAAO;AAAA,UACN;AAAA,YACC,SAAS,SAAS;AAAA,YAClB,cAAc;AAAA,UACf;AAAA,QACD;AAAA,MACD;AAEA,YAAM,MAAM;AAAA,QACX,SAAS;AAAA,QACT,aAAa;AAAA,QACb,SAAS,QAAQ;AAAA,QACjB,cAAc;AAAA,QACd,GAAG,QAAQ;AAAA,MACZ;AACA,aAAO,CAAC,GAAG;AAAA,IACZ;AAAA,EACD;AACD;AAOA,OAAO,eAAe,8BAA8B,QAAQ;AAAA,EAC3D,OAAO;AAAA,EACP,cAAc;AACf,CAAC;;;ADrCD,SAAS,wBACR,oBACA,uBACO;AACP,QAAM,EAAE,cAAc,CAAC,EAAE,IAAI;AAC7B,qBAAmB,cAAc,CAAC,uBAAuB,GAAG,WAAW;AACxE;AAEA,SAAS,0BAA0B,gBAAsC;AACxE,iBAAe,mBAAmB;AAAA,IACjC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;AAEA,IAAM,MAAM,IAAI,qBAAQ,gBAAgB,CAAC,CAAC;AAC1C,IAAI,QAAQ,4BAA4B;AACxC,IAAI,OAAO,uBAAuB;AAClC,IAAI,OAAO,yBAAyB;AAEpC,IAAO,cAAQ;;;AE5Bf,iBAAS;",
  "names": ["fm"]
}
