{"version":3,"file":"index.mjs","names":[],"sources":["../../src/main/index.ts"],"sourcesContent":["/**\n * neosanitize, main entry (default / Node).\n *\n * Wires the engine core (./core) to the custom, browser-faithful WHATWG parser\n * (./parser, verified against html5lib-tests). This is the entry used everywhere\n * EXCEPT browser bundlers, which resolve the package's `browser` export condition\n * to ./browser instead (native `DOMParser`, zero parser bytes). Both builds expose\n * the identical `Sanitizer` class API, only the default parse adapter differs, and\n * either can be overridden per-instance with `.parser(adapter)`.\n *\n * See ./core for the policy engine + serializer and the full API docs.\n */\nexport * from './core';\n\nimport { SanitizerCore, type ParseAdapter, type Policy } from './core';\nimport { whatwgAdapter } from './whatwg-parser';\n\n// The default parse adapter. Re-exported from the whatwg-parser module so the\n// same import works in a browser bundle (where `.` resolves to the DOMParser build).\nexport { whatwgAdapter };\n\n/**\n * The default `Sanitizer`: parses untrusted HTML with the bundled WHATWG parser,\n * so it behaves identically in Node and the browser (no DOM required). Build one\n * with `Sanitizer.builder()`, e.g. `Sanitizer.builder(ugc).build()`. Override the\n * parser with `.parser(adapter)` (e.g. `parse5Adapter` from `neosanitize/parse5`).\n */\nexport class Sanitizer extends SanitizerCore {\n  constructor(policy?: Policy, parser: ParseAdapter | null = null) {\n    super(policy, whatwgAdapter, parser);\n  }\n}\n"],"mappings":";;;;;;;;;AA2BA,IAAa,YAAb,cAA+B,cAAc;CAC3C,YAAY,QAAiB,SAA8B,MAAM;EAC/D,MAAM,QAAQ,eAAe,MAAM;CACrC;AACF"}