{"version":3,"file":"markdownItAnchor.mjs","sources":["../permalink.js","../index.js"],"sourcesContent":["let emittedWarning = false\n\nconst position = {\n false: 'push',\n true: 'unshift',\n after: 'push',\n before: 'unshift'\n}\n\nconst permalinkSymbolMeta = {\n isPermalinkSymbol: true\n}\n\nexport function legacy (slug, opts, state, idx) {\n if (!emittedWarning) {\n const warningText = 'Using deprecated markdown-it-anchor permalink option, see https://github.com/valeriangalliat/markdown-it-anchor#permalinks'\n\n if (typeof process === 'object' && process && process.emitWarning) {\n process.emitWarning(warningText)\n } else {\n console.warn(warningText)\n }\n\n emittedWarning = true\n }\n\n const linkTokens = [\n Object.assign(new state.Token('link_open', 'a', 1), {\n attrs: [\n ...(opts.permalinkClass ? [['class', opts.permalinkClass]] : []),\n ['href', opts.permalinkHref(slug, state)],\n ...Object.entries(opts.permalinkAttrs(slug, state))\n ]\n }),\n Object.assign(new state.Token('html_block', '', 0), { content: opts.permalinkSymbol, meta: permalinkSymbolMeta }),\n new state.Token('link_close', 'a', -1)\n ]\n\n if (opts.permalinkSpace) {\n state.tokens[idx + 1].children[position[opts.permalinkBefore]](Object.assign(new state.Token('text', '', 0), { content: ' ' }))\n }\n\n state.tokens[idx + 1].children[position[opts.permalinkBefore]](...linkTokens)\n}\n\nexport function renderHref (slug) {\n return `#${slug}`\n}\n\nexport function renderAttrs (slug) {\n return {}\n}\n\nconst commonDefaults = {\n class: 'header-anchor',\n symbol: '#',\n renderHref,\n renderAttrs\n}\n\nexport function makePermalink (renderPermalinkImpl) {\n function renderPermalink (opts) {\n opts = Object.assign({}, renderPermalink.defaults, opts)\n\n return (slug, anchorOpts, state, idx) => {\n return renderPermalinkImpl(slug, opts, anchorOpts, state, idx)\n }\n }\n\n renderPermalink.defaults = Object.assign({}, commonDefaults)\n renderPermalink.renderPermalinkImpl = renderPermalinkImpl\n\n return renderPermalink\n}\n\nexport const linkInsideHeader = makePermalink((slug, opts, anchorOpts, state, idx) => {\n const linkTokens = [\n Object.assign(new state.Token('link_open', 'a', 1), {\n attrs: [\n ...(opts.class ? [['class', opts.class]] : []),\n ['href', opts.renderHref(slug, state)],\n ...(opts.ariaHidden ? [['aria-hidden', 'true']] : []),\n ...Object.entries(opts.renderAttrs(slug, state))\n ]\n }),\n Object.assign(new state.Token('html_inline', '', 0), { content: opts.symbol, meta: permalinkSymbolMeta }),\n new state.Token('link_close', 'a', -1)\n ]\n\n if (opts.space) {\n const space = typeof opts.space === 'string' ? opts.space : ' '\n const type = typeof opts.space === 'string' ? 'html_inline' : 'text'\n state.tokens[idx + 1].children[position[opts.placement]](Object.assign(new state.Token(type, '', 0), { content: space }))\n }\n\n state.tokens[idx + 1].children[position[opts.placement]](...linkTokens)\n})\n\nObject.assign(linkInsideHeader.defaults, {\n space: true,\n placement: 'after',\n ariaHidden: false\n})\n\nexport const ariaHidden = makePermalink(linkInsideHeader.renderPermalinkImpl)\n\nariaHidden.defaults = Object.assign({}, linkInsideHeader.defaults, {\n ariaHidden: true\n})\n\nexport const headerLink = makePermalink((slug, opts, anchorOpts, state, idx) => {\n const linkTokens = [\n Object.assign(new state.Token('link_open', 'a', 1), {\n attrs: [\n ...(opts.class ? [['class', opts.class]] : []),\n ['href', opts.renderHref(slug, state)],\n ...Object.entries(opts.renderAttrs(slug, state))\n ]\n }),\n ...(opts.safariReaderFix ? [new state.Token('span_open', 'span', 1)] : []),\n ...state.tokens[idx + 1].children,\n ...(opts.safariReaderFix ? [new state.Token('span_close', 'span', -1)] : []),\n new state.Token('link_close', 'a', -1)\n ]\n\n state.tokens[idx + 1] = Object.assign(new state.Token('inline', '', 0), {\n children: linkTokens\n })\n})\n\nObject.assign(headerLink.defaults, {\n safariReaderFix: false\n})\n\nexport const linkAfterHeader = makePermalink((slug, opts, anchorOpts, state, idx) => {\n if (!['visually-hidden', 'aria-label', 'aria-describedby', 'aria-labelledby'].includes(opts.style)) {\n throw new Error(`\\`permalink.linkAfterHeader\\` called with unknown style option \\`${opts.style}\\``)\n }\n\n if (!['aria-describedby', 'aria-labelledby'].includes(opts.style) && !opts.assistiveText) {\n throw new Error(`\\`permalink.linkAfterHeader\\` called without the \\`assistiveText\\` option in \\`${opts.style}\\` style`)\n }\n\n if (opts.style === 'visually-hidden' && !opts.visuallyHiddenClass) {\n throw new Error('`permalink.linkAfterHeader` called without the `visuallyHiddenClass` option in `visually-hidden` style')\n }\n\n const title = state.tokens[idx + 1]\n .children\n .filter(token => token.type === 'text' || token.type === 'code_inline')\n .reduce((acc, t) => acc + t.content, '')\n\n const subLinkTokens = []\n const linkAttrs = []\n\n if (opts.class) {\n linkAttrs.push(['class', opts.class])\n }\n\n linkAttrs.push(['href', opts.renderHref(slug, state)])\n linkAttrs.push(...Object.entries(opts.renderAttrs(slug, state)))\n\n if (opts.style === 'visually-hidden') {\n subLinkTokens.push(\n Object.assign(new state.Token('span_open', 'span', 1), {\n attrs: [['class', opts.visuallyHiddenClass]],\n }),\n Object.assign(new state.Token('text', '', 0), {\n content: opts.assistiveText(title)\n }),\n new state.Token('span_close', 'span', -1)\n )\n\n if (opts.space) {\n const space = typeof opts.space === 'string' ? opts.space : ' '\n const type = typeof opts.space === 'string' ? 'html_inline' : 'text'\n subLinkTokens[position[opts.placement]](Object.assign(new state.Token(type, '', 0), { content: space }))\n }\n\n subLinkTokens[position[opts.placement]](\n Object.assign(new state.Token('span_open', 'span', 1), {\n attrs: [['aria-hidden', 'true']],\n }),\n Object.assign(new state.Token('html_inline', '', 0), {\n content: opts.symbol,\n meta: permalinkSymbolMeta\n }),\n new state.Token('span_close', 'span', -1)\n )\n } else {\n subLinkTokens.push(\n Object.assign(new state.Token('html_inline', '', 0), {\n content: opts.symbol,\n meta: permalinkSymbolMeta\n })\n )\n }\n\n if (opts.style === 'aria-label') {\n linkAttrs.push(['aria-label', opts.assistiveText(title)])\n } else if (['aria-describedby', 'aria-labelledby'].includes(opts.style)) {\n linkAttrs.push([opts.style, slug])\n }\n\n const linkTokens = [\n Object.assign(new state.Token('link_open', 'a', 1), {\n attrs: linkAttrs\n }),\n ...subLinkTokens,\n new state.Token('link_close', 'a', -1),\n ]\n\n state.tokens.splice(idx + 3, 0, ...linkTokens)\n\n if (opts.wrapper) {\n state.tokens.splice(idx, 0, Object.assign(new state.Token('html_block', '', 0), {\n content: opts.wrapper[0] + '\\n'\n }))\n\n state.tokens.splice(idx + 3 + linkTokens.length + 1, 0, Object.assign(new state.Token('html_block', '', 0), {\n content: opts.wrapper[1] + '\\n'\n }))\n }\n})\n\nObject.assign(linkAfterHeader.defaults, {\n style: 'visually-hidden',\n space: true,\n placement: 'after',\n wrapper: null\n})\n","import * as permalink from './permalink'\n\nconst slugify = (s) => encodeURIComponent(String(s).trim().toLowerCase().replace(/\\s+/g, '-'))\n\nfunction getTokensText (tokens) {\n return tokens\n .filter(t => ['text', 'code_inline'].includes(t.type))\n .map(t => t.content)\n .join('')\n}\n\nfunction uniqueSlug (slug, slugs, failOnNonUnique, startIndex) {\n let uniq = slug\n let i = startIndex\n\n if (failOnNonUnique && Object.prototype.hasOwnProperty.call(slugs, uniq)) {\n throw new Error(`User defined \\`id\\` attribute \\`${slug}\\` is not unique. Please fix it in your Markdown to continue.`)\n } else {\n while (Object.prototype.hasOwnProperty.call(slugs, uniq)) {\n uniq = `${slug}-${i}`\n i += 1\n }\n }\n\n slugs[uniq] = true\n\n return uniq\n}\n\nconst isLevelSelectedNumber = selection => level => level >= selection\nconst isLevelSelectedArray = selection => level => selection.includes(level)\n\nfunction anchor (md, opts) {\n opts = Object.assign({}, anchor.defaults, opts)\n\n md.core.ruler.push('anchor', state => {\n const slugs = {}\n const tokens = state.tokens\n\n const isLevelSelected = Array.isArray(opts.level)\n ? isLevelSelectedArray(opts.level)\n : isLevelSelectedNumber(opts.level)\n\n for (let idx = 0; idx < tokens.length; idx++) {\n const token = tokens[idx]\n\n if (token.type !== 'heading_open') {\n continue\n }\n\n if (!isLevelSelected(Number(token.tag.substr(1)))) {\n continue\n }\n\n // Aggregate the next token children text.\n const title = opts.getTokensText(tokens[idx + 1].children)\n\n let slug = token.attrGet('id')\n\n if (slug == null) {\n slug = uniqueSlug(opts.slugify(title), slugs, false, opts.uniqueSlugStartIndex)\n } else {\n slug = uniqueSlug(slug, slugs, true, opts.uniqueSlugStartIndex)\n }\n\n token.attrSet('id', slug)\n\n if (opts.tabIndex !== false) {\n token.attrSet('tabindex', `${opts.tabIndex}`)\n }\n\n if (typeof opts.permalink === 'function') {\n opts.permalink(slug, opts, state, idx)\n } else if (opts.permalink) {\n opts.renderPermalink(slug, opts, state, idx)\n } else if (opts.renderPermalink && opts.renderPermalink !== permalink.legacy) {\n opts.renderPermalink(slug, opts, state, idx)\n }\n\n // A permalink renderer could modify the `tokens` array so\n // make sure to get the up-to-date index on each iteration.\n idx = tokens.indexOf(token)\n\n if (opts.callback) {\n opts.callback(token, { slug, title })\n }\n }\n })\n}\n\nanchor.permalink = permalink\n\nanchor.defaults = {\n level: 1,\n slugify,\n uniqueSlugStartIndex: 1,\n tabIndex: '-1',\n getTokensText,\n\n // Legacy options.\n permalink: false,\n renderPermalink: permalink.legacy,\n permalinkClass: permalink.ariaHidden.defaults.class,\n permalinkSpace: permalink.ariaHidden.defaults.space,\n permalinkSymbol: 'ΒΆ',\n permalinkBefore: permalink.ariaHidden.defaults.placement === 'before',\n permalinkHref: permalink.ariaHidden.defaults.renderHref,\n permalinkAttrs: permalink.ariaHidden.defaults.renderAttrs\n}\n\n// Dirty hack to make `import anchor from 'markdown-it-anchor'` work with\n// TypeScript which doesn't support the `module` field of `package.json` and\n// will always get the CommonJS version which otherwise wouldn't have a\n// `default` key, resulting in markdown-it-anchor being undefined when being\n// imported that way.\nanchor.default = anchor\n\nexport default anchor\n"],"names":["emittedWarning","position","false","true","after","before","permalinkSymbolMeta","isPermalinkSymbol","legacy","slug","opts","state","idx","_state$tokens$childre","process","emitWarning","warningText","console","warn","linkTokens","Object","assign","Token","attrs","permalinkClass","permalinkHref","entries","permalinkAttrs","content","permalinkSymbol","meta","permalinkSpace","tokens","children","permalinkBefore","renderAttrs","commonDefaults","class","symbol","renderHref","renderPermalinkImpl","renderPermalink","defaults","anchorOpts","linkInsideHeader","makePermalink","_state$tokens$childre2","concat","ariaHidden","space","placement","headerLink","safariReaderFix","linkAfterHeader","includes","style","Error","assistiveText","visuallyHiddenClass","title","filter","token","type","reduce","acc","t","linkAttrs","push","subLinkTokens","splice","wrapper","length","uniqueSlug","slugs","failOnNonUnique","startIndex","uniq","i","prototype","hasOwnProperty","call","anchor","md","core","ruler","selection","isLevelSelected","Array","isArray","level","isLevelSelectedNumber","Number","tag","substr","getTokensText","attrGet","slugify","uniqueSlugStartIndex","attrSet","tabIndex","permalink","indexOf","callback","s","encodeURIComponent","String","trim","toLowerCase","replace","map","join"],"mappings":"AAAA,IAAIA,GAAiB,EAEPC,EAAG,CACfC,MAAO,OACPC,KAAM,UACNC,MAAO,OACPC,OAAQ,WAGeC,EAAG,CAC1BC,mBAAmB,GAGLC,SAAAA,EAAQC,EAAMC,EAAMC,EAAOC,GACzC,IAAAC,EAAA,IAAKb,EAAgB,CACnB,MAAoB,6HAEG,0BAAYc,SAAWA,QAAQC,YACpDD,QAAQC,YAAYC,GAEpBC,QAAQC,KAAKF,GAGfhB,GAAiB,CACnB,CAEA,IAAgBmB,EAAG,CACjBC,OAAOC,OAAO,IAAIV,EAAMW,MAAM,YAAa,IAAK,GAAI,CAClDC,gBACMb,EAAKc,eAAiB,CAAC,CAAC,QAASd,EAAKc,iBAAmB,IAC7D,CAAC,OAAQd,EAAKe,cAAchB,EAAME,KAC/BS,OAAOM,QAAQhB,EAAKiB,eAAelB,EAAME,OAGhDS,OAAOC,OAAO,IAAIV,EAAMW,MAAM,aAAc,GAAI,GAAI,CAAEM,QAASlB,EAAKmB,gBAAiBC,KAAMxB,IAC3F,IAASK,EAACW,MAAM,aAAc,KAAM,IAGlCZ,EAAKqB,gBACPpB,EAAMqB,OAAOpB,EAAM,GAAGqB,SAAShC,EAASS,EAAKwB,kBAAkBd,OAAOC,OAAO,MAAUC,MAAM,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