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kC,GAAS,IAAK0O,EAAK9B,GAElE,CAEJ,CAEA,GAAkB,YAAdA,EAAK2F,KAAoB,CAC3B,IAAIuzB,EAASwuB,GACRA,EAAgB/7C,SAAS3L,EAAKg2B,WAC/B4xB,GACAA,EAAmBj8C,SAAS3L,EAAKg2B,SAOrC,IAJKkD,GAAUyuB,GAAiC,kBAAVzrD,IACpCg9B,GAAUyuB,EAAa3nD,EAAM9D,EAAOyB,IAGlCu7B,GAAUv7B,GAA2B,kBAAVzB,EAO7B,OANI+rD,GAAoBjoD,EAAK60B,SAC3Bl3B,EAAOk3B,SAASv4B,OAAOJ,EAAO,KAAM8D,EAAK60B,UAEzCl3B,EAAOk3B,SAASv4B,OAAOJ,EAAO,GAGzBA,CAEX,CACF,IA7DOm4B,GAAausB,EAAU,CAC5BrsB,SAAQ,YACRa,aACAI,oBAAoB,EACpBlsB,IAAG,OACH4rB,KAAI,QACJO,UAAU,EACVC,UAAU,GAuDd,CAWO,SAASyyB,GAAoB/0D,GAIlC,MAAMm1D,EAAQn1D,EAAMgI,QAAQ,KACtBotD,EAAep1D,EAAMgI,QAAQ,KAC7BqtD,EAAar1D,EAAMgI,QAAQ,KAC3BsrC,EAAQtzC,EAAMgI,QAAQ,KAE5B,OAEEmtD,EAAQ,GAEP7hB,GAAS,GAAK6hB,EAAQ7hB,GACtB8hB,GAAgB,GAAKD,EAAQC,GAC7BC,GAAc,GAAKF,EAAQE,GAE5BlB,GAAah+C,KAAKnW,EAAM6G,MAAM,EAAGsuD,IAE1Bn1D,EAGF,EACT,C","sources":["../../../node_modules/ahooks/es/utils/index.js","../../../node_modules/ahooks/es/utils/isBrowser.js","../../../node_modules/ahooks/es/utils/domTarget.js","../../../node_modules/ahooks/es/useLatest/index.js","../../../node_modules/ahooks/es/useUnmount/index.js","../../../node_modules/ahooks/es/utils/depsAreSame.js","../../../node_modules/ahooks/es/utils/createEffectWithTarget.js","../../../node_modules/ahooks/es/utils/useEffectWithTarget.js","../../../node_modules/ahooks/es/useInViewport/index.js","../../../node_modules/ahooks/node_modules/intersection-observer/intersection-observer.js","../../../node_modules/extend/index.js","../../../node_modules/inline-style-parser/index.js","../../../node_modules/querystring/decode.js","../../../node_modules/querystring/encode.js","../../../node_modules/querystring/index.js","../../../node_modules/scroll-into-view-if-needed/es/index.js","../../../node_modules/style-to-object/cjs/index.js","../../../node_modules/estree-util-is-identifier-name/lib/index.js","../../../node_modules/hast-util-whitespace/lib/index.js","../../../node_modules/property-information/lib/util/schema.js","../../../node_modules/property-information/lib/util/merge.js","../../../node_modules/property-information/lib/normalize.js","../../../node_modules/property-information/lib/util/info.js","../../../node_modules/property-information/lib/util/types.js","../../../node_modules/property-information/lib/util/defined-info.js","../../../node_modules/property-information/lib/util/create.js","../../../node_modules/property-information/lib/xlink.js","../../../node_modules/property-information/lib/xml.js","../../../node_modules/property-information/lib/util/case-sensitive-transform.js","../../../node_modules/property-information/lib/util/case-insensitive-transform.js","../../../node_modules/property-information/lib/xmlns.js","../../../node_modules/property-information/lib/aria.js","../../../node_modules/property-information/lib/html.js","../../../node_modules/property-information/lib/svg.js","../../../node_modules/property-information/index.js","../../../node_modules/property-information/lib/find.js","../../../node_modules/property-information/lib/hast-to-react.js","../../../node_modules/style-to-object/esm/index.mjs","../../../node_modules/unist-util-position/lib/index.js","../../../node_modules/unist-util-stringify-position/lib/index.js","../../../node_modules/vfile-message/lib/index.js","../../../node_modules/hast-util-to-jsx-runtime/lib/index.js","../../../node_modules/comma-separated-tokens/index.js","../../../node_modules/space-separated-tokens/index.js","../../../node_modules/html-url-attributes/lib/index.js","../../../node_modules/mdast-util-to-string/lib/index.js","../../../node_modules/micromark-util-chunked/index.js","../../../node_modules/micromark-util-subtokenize/lib/splice-buffer.js","../../../node_modules/micromark-util-subtokenize/index.js","../../../node_modules/micromark-util-combine-extensions/index.js","../../../node_modules/micromark-util-character/index.js","../../../node_modules/micromark-factory-space/index.js","../../../node_modules/micromark/lib/initialize/content.js","../../../node_modules/micromark/lib/initialize/document.js","../../../node_modules/micromark-core-commonmark/lib/blank-line.js","../../../node_modules/micromark-core-commonmark/lib/content.js","../../../node_modules/micromark/lib/initialize/flow.js","../../../node_modules/micromark/lib/initialize/text.js","../../../node_modules/micromark-core-commonmark/lib/thematic-break.js","../../../node_modules/micromark-core-commonmark/lib/list.js","../../../node_modules/micromark-core-commonmark/lib/block-quote.js","../../../node_modules/micromark-factory-destination/index.js","../../../node_modules/micromark-factory-label/index.js","../../../node_modules/micromark-factory-title/index.js","../../../node_modules/micromark-factory-whitespace/index.js","../../../node_modules/micromark-util-normalize-identifier/index.js","../../../node_modules/micromark-core-commonmark/lib/definition.js","../../../node_modules/micromark-core-commonmark/lib/code-indented.js","../../../node_modules/micromark-core-commonmark/lib/heading-atx.js","../../../node_modules/micromark-core-commonmark/lib/setext-underline.js","../../../node_modules/micromark-util-html-tag-name/index.js","../../../node_modules/micromark-core-commonmark/lib/html-flow.js","../../../node_modules/micromark-core-commonmark/lib/code-fenced.js","../../../node_modules/decode-named-character-reference/index.dom.js","../../../node_modules/micromark-core-commonmark/lib/character-reference.js","../../../node_modules/micromark-core-commonmark/lib/character-escape.js","../../../node_modules/micromark-core-commonmark/lib/line-ending.js","../../../node_modules/micromark-util-resolve-all/index.js","../../../node_modules/micromark-core-commonmark/lib/label-end.js","../../../node_modules/micromark-core-commonmark/lib/label-start-image.js","../../../node_modules/micromark-util-classify-character/index.js","../../../node_modules/micromark-core-commonmark/lib/attention.js","../../../node_modules/micromark-core-commonmark/lib/autolink.js","../../../node_modules/micromark-core-commonmark/lib/html-text.js","../../../node_modules/micromark-core-commonmark/lib/label-start-link.js","../../../node_modules/micromark-core-commonmark/lib/hard-break-escape.js","../../../node_modules/micromark-core-commonmark/lib/code-text.js","../../../node_modules/micromark/lib/constructs.js","../../../node_modules/micromark/lib/create-tokenizer.js","../../../node_modules/micromark/lib/parse.js","../../../node_modules/micromark/lib/preprocess.js","../../../node_modules/micromark-util-decode-numeric-character-reference/index.js","../../../node_modules/micromark-util-decode-string/index.js","../../../node_modules/mdast-util-from-markdown/lib/index.js","../../../node_modules/micromark/lib/postprocess.js","../../../node_modules/remark-parse/lib/index.js","../../../node_modules/@ungap/structured-clone/esm/types.js","../../../node_modules/@ungap/structured-clone/esm/deserialize.js","../../../node_modules/@ungap/structured-clone/esm/serialize.js","../../../node_modules/@ungap/structured-clone/esm/index.js","../../../node_modules/micromark-util-sanitize-uri/index.js","../../../node_modules/mdast-util-to-hast/lib/footer.js","../../../node_modules/unist-util-is/lib/index.js","../../../node_modules/unist-util-visit-parents/lib/index.js","../../../node_modules/unist-util-visit/lib/index.js","../../../node_modules/mdast-util-to-hast/lib/revert.js","../../../node_modules/mdast-util-to-hast/lib/handlers/list-item.js","../../../node_modules/trim-lines/index.js","../../../node_modules/mdast-util-to-hast/lib/handlers/index.js","../../../node_modules/mdast-util-to-hast/lib/handlers/blockquote.js","../../../node_modules/mdast-util-to-hast/lib/handlers/break.js","../../../node_modules/mdast-util-to-hast/lib/handlers/code.js","../../../node_modules/mdast-util-to-hast/lib/handlers/delete.js","../../../node_modules/mdast-util-to-hast/lib/handlers/emphasis.js","../../../node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js","../../../node_modules/mdast-util-to-hast/lib/handlers/heading.js","../../../node_modules/mdast-util-to-hast/lib/handlers/html.js","../../../node_modules/mdast-util-to-hast/lib/handlers/image-reference.js","../../../node_modules/mdast-util-to-hast/lib/handlers/image.js","../../../node_modules/mdast-util-to-hast/lib/handlers/inline-code.js","../../../node_modules/mdast-util-to-hast/lib/handlers/link-reference.js","../../../node_modules/mdast-util-to-hast/lib/handlers/link.js","../../../node_modules/mdast-util-to-hast/lib/handlers/list.js","../../../node_modules/mdast-util-to-hast/lib/handlers/paragraph.js","../../../node_modules/mdast-util-to-hast/lib/handlers/root.js","../../../node_modules/mdast-util-to-hast/lib/handlers/strong.js","../../../node_modules/mdast-util-to-hast/lib/handlers/table.js","../../../node_modules/mdast-util-to-hast/lib/handlers/table-cell.js","../../../node_modules/mdast-util-to-hast/lib/handlers/table-row.js","../../../node_modules/mdast-util-to-hast/lib/handlers/text.js","../../../node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js","../../../node_modules/mdast-util-to-hast/lib/state.js","../../../node_modules/mdast-util-to-hast/lib/index.js","../../../node_modules/remark-rehype/lib/index.js","../../../node_modules/bail/index.js","../../../node_modules/unified/node_modules/is-plain-obj/index.js","../../../node_modules/trough/lib/index.js","../../../node_modules/vfile/lib/minpath.browser.js","../../../node_modules/vfile/lib/minproc.browser.js","../../../node_modules/vfile/lib/minurl.shared.js","../../../node_modules/vfile/lib/minurl.browser.js","../../../node_modules/vfile/lib/index.js","../../../node_modules/unified/lib/callable-instance.js","../../../node_modules/unified/lib/index.js","../../../node_modules/react-markdown/lib/index.js"],"sourcesContent":["export var isObject = function (value) {\n return value !== null && typeof value === 'object';\n};\nexport var isFunction = function (value) {\n return typeof value === 'function';\n};\nexport var isString = function (value) {\n return typeof value === 'string';\n};\nexport var isBoolean = function (value) {\n return typeof value === 'boolean';\n};\nexport var isNumber = function (value) {\n return typeof value === 'number';\n};\nexport var isUndef = function (value) {\n return typeof value === 'undefined';\n};","var isBrowser = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nexport default isBrowser;","import { isFunction } from './index';\nimport isBrowser from './isBrowser';\nexport function getTargetElement(target, defaultElement) {\n if (!isBrowser) {\n return undefined;\n }\n if (!target) {\n return defaultElement;\n }\n var targetElement;\n if (isFunction(target)) {\n targetElement = target();\n } else if ('current' in target) {\n targetElement = target.current;\n } else {\n targetElement = target;\n }\n return targetElement;\n}","import { useRef } from 'react';\nfunction useLatest(value) {\n var ref = useRef(value);\n ref.current = value;\n return ref;\n}\nexport default useLatest;","import { useEffect } from 'react';\nimport useLatest from '../useLatest';\nimport { isFunction } from '../utils';\nimport isDev from '../utils/isDev';\nvar useUnmount = function (fn) {\n if (isDev) {\n if (!isFunction(fn)) {\n console.error(\"useUnmount expected parameter is a function, got \".concat(typeof fn));\n }\n }\n var fnRef = useLatest(fn);\n useEffect(function () {\n return function () {\n fnRef.current();\n };\n }, []);\n};\nexport default useUnmount;","export default function depsAreSame(oldDeps, deps) {\n if (oldDeps === deps) return true;\n for (var i = 0; i < oldDeps.length; i++) {\n if (!Object.is(oldDeps[i], deps[i])) return false;\n }\n return true;\n}","import { useRef } from 'react';\nimport useUnmount from '../useUnmount';\nimport depsAreSame from './depsAreSame';\nimport { getTargetElement } from './domTarget';\nvar createEffectWithTarget = function (useEffectType) {\n /**\n *\n * @param effect\n * @param deps\n * @param target target should compare ref.current vs ref.current, dom vs dom, ()=>dom vs ()=>dom\n */\n var useEffectWithTarget = function (effect, deps, target) {\n var hasInitRef = useRef(false);\n var lastElementRef = useRef([]);\n var lastDepsRef = useRef([]);\n var unLoadRef = useRef();\n useEffectType(function () {\n var _a;\n var targets = Array.isArray(target) ? target : [target];\n var els = targets.map(function (item) {\n return getTargetElement(item);\n });\n // init run\n if (!hasInitRef.current) {\n hasInitRef.current = true;\n lastElementRef.current = els;\n lastDepsRef.current = deps;\n unLoadRef.current = effect();\n return;\n }\n if (els.length !== lastElementRef.current.length || !depsAreSame(els, lastElementRef.current) || !depsAreSame(deps, lastDepsRef.current)) {\n (_a = unLoadRef.current) === null || _a === void 0 ? void 0 : _a.call(unLoadRef);\n lastElementRef.current = els;\n lastDepsRef.current = deps;\n unLoadRef.current = effect();\n }\n });\n useUnmount(function () {\n var _a;\n (_a = unLoadRef.current) === null || _a === void 0 ? void 0 : _a.call(unLoadRef);\n // for react-refresh\n hasInitRef.current = false;\n });\n };\n return useEffectWithTarget;\n};\nexport default createEffectWithTarget;","import { useEffect } from 'react';\nimport createEffectWithTarget from './createEffectWithTarget';\nvar useEffectWithTarget = createEffectWithTarget(useEffect);\nexport default useEffectWithTarget;","import { __assign, __read, __rest, __values } from \"tslib\";\nimport 'intersection-observer';\nimport { useState } from 'react';\nimport { getTargetElement } from '../utils/domTarget';\nimport useEffectWithTarget from '../utils/useEffectWithTarget';\nfunction useInViewport(target, options) {\n var _a = options || {},\n callback = _a.callback,\n option = __rest(_a, [\"callback\"]);\n var _b = __read(useState(), 2),\n state = _b[0],\n setState = _b[1];\n var _c = __read(useState(), 2),\n ratio = _c[0],\n setRatio = _c[1];\n useEffectWithTarget(function () {\n var targets = Array.isArray(target) ? target : [target];\n var els = targets.map(function (element) {\n return getTargetElement(element);\n }).filter(Boolean);\n if (!els.length) {\n return;\n }\n var observer = new IntersectionObserver(function (entries) {\n var e_1, _a;\n try {\n for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {\n var entry = entries_1_1.value;\n setRatio(entry.intersectionRatio);\n setState(entry.isIntersecting);\n callback === null || callback === void 0 ? void 0 : callback(entry);\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return)) _a.call(entries_1);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n }, __assign(__assign({}, option), {\n root: getTargetElement(options === null || options === void 0 ? void 0 : options.root)\n }));\n els.forEach(function (el) {\n if (el) {\n observer.observe(el);\n }\n });\n return function () {\n observer.disconnect();\n };\n }, [options === null || options === void 0 ? void 0 : options.rootMargin, options === null || options === void 0 ? void 0 : options.threshold, callback], target);\n return [state, ratio];\n}\nexport default useInViewport;","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.\n *\n * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n *\n */\n(function() {\n'use strict';\n\n// Exit early if we're not running in a browser.\nif (typeof window !== 'object') {\n return;\n}\n\n// Exit early if all IntersectionObserver and IntersectionObserverEntry\n// features are natively supported.\nif ('IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'intersectionRatio' in window.IntersectionObserverEntry.prototype) {\n\n // Minimal polyfill for Edge 15's lack of `isIntersecting`\n // See: https://github.com/w3c/IntersectionObserver/issues/211\n if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {\n Object.defineProperty(window.IntersectionObserverEntry.prototype,\n 'isIntersecting', {\n get: function () {\n return this.intersectionRatio > 0;\n }\n });\n }\n return;\n}\n\n/**\n * Returns the embedding frame element, if any.\n * @param {!Document} doc\n * @return {!Element}\n */\nfunction getFrameElement(doc) {\n try {\n return doc.defaultView && doc.defaultView.frameElement || null;\n } catch (e) {\n // Ignore the error.\n return null;\n }\n}\n\n/**\n * A local reference to the root document.\n */\nvar document = (function(startDoc) {\n var doc = startDoc;\n var frame = getFrameElement(doc);\n while (frame) {\n doc = frame.ownerDocument;\n frame = getFrameElement(doc);\n }\n return doc;\n})(window.document);\n\n/**\n * An IntersectionObserver registry. This registry exists to hold a strong\n * reference to IntersectionObserver instances currently observing a target\n * element. Without this registry, instances without another reference may be\n * garbage collected.\n */\nvar registry = [];\n\n/**\n * The signal updater for cross-origin intersection. When not null, it means\n * that the polyfill is configured to work in a cross-origin mode.\n * @type {function(DOMRect|ClientRect, DOMRect|ClientRect)}\n */\nvar crossOriginUpdater = null;\n\n/**\n * The current cross-origin intersection. Only used in the cross-origin mode.\n * @type {DOMRect|ClientRect}\n */\nvar crossOriginRect = null;\n\n\n/**\n * Creates the global IntersectionObserverEntry constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry\n * @param {Object} entry A dictionary of instance properties.\n * @constructor\n */\nfunction IntersectionObserverEntry(entry) {\n this.time = entry.time;\n this.target = entry.target;\n this.rootBounds = ensureDOMRect(entry.rootBounds);\n this.boundingClientRect = ensureDOMRect(entry.boundingClientRect);\n this.intersectionRect = ensureDOMRect(entry.intersectionRect || getEmptyRect());\n this.isIntersecting = !!entry.intersectionRect;\n\n // Calculates the intersection ratio.\n var targetRect = this.boundingClientRect;\n var targetArea = targetRect.width * targetRect.height;\n var intersectionRect = this.intersectionRect;\n var intersectionArea = intersectionRect.width * intersectionRect.height;\n\n // Sets intersection ratio.\n if (targetArea) {\n // Round the intersection ratio to avoid floating point math issues:\n // https://github.com/w3c/IntersectionObserver/issues/324\n this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4));\n } else {\n // If area is zero and is intersecting, sets to 1, otherwise to 0\n this.intersectionRatio = this.isIntersecting ? 1 : 0;\n }\n}\n\n\n/**\n * Creates the global IntersectionObserver constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface\n * @param {Function} callback The function to be invoked after intersection\n * changes have queued. The function is not invoked if the queue has\n * been emptied by calling the `takeRecords` method.\n * @param {Object=} opt_options Optional configuration options.\n * @constructor\n */\nfunction IntersectionObserver(callback, opt_options) {\n\n var options = opt_options || {};\n\n if (typeof callback != 'function') {\n throw new Error('callback must be a function');\n }\n\n if (\n options.root &&\n options.root.nodeType != 1 &&\n options.root.nodeType != 9\n ) {\n throw new Error('root must be a Document or Element');\n }\n\n // Binds and throttles `this._checkForIntersections`.\n this._checkForIntersections = throttle(\n this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT);\n\n // Private properties.\n this._callback = callback;\n this._observationTargets = [];\n this._queuedEntries = [];\n this._rootMarginValues = this._parseRootMargin(options.rootMargin);\n\n // Public properties.\n this.thresholds = this._initThresholds(options.threshold);\n this.root = options.root || null;\n this.rootMargin = this._rootMarginValues.map(function(margin) {\n return margin.value + margin.unit;\n }).join(' ');\n\n /** @private @const {!Array} */\n this._monitoringDocuments = [];\n /** @private @const {!Array} */\n this._monitoringUnsubscribes = [];\n}\n\n\n/**\n * The minimum interval within which the document will be checked for\n * intersection changes.\n */\nIntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;\n\n\n/**\n * The frequency in which the polyfill polls for intersection changes.\n * this can be updated on a per instance basis and must be set prior to\n * calling `observe` on the first target.\n */\nIntersectionObserver.prototype.POLL_INTERVAL = null;\n\n/**\n * Use a mutation observer on the root element\n * to detect intersection changes.\n */\nIntersectionObserver.prototype.USE_MUTATION_OBSERVER = true;\n\n\n/**\n * Sets up the polyfill in the cross-origin mode. The result is the\n * updater function that accepts two arguments: `boundingClientRect` and\n * `intersectionRect` - just as these fields would be available to the\n * parent via `IntersectionObserverEntry`. This function should be called\n * each time the iframe receives intersection information from the parent\n * window, e.g. via messaging.\n * @return {function(DOMRect|ClientRect, DOMRect|ClientRect)}\n */\nIntersectionObserver._setupCrossOriginUpdater = function() {\n if (!crossOriginUpdater) {\n /**\n * @param {DOMRect|ClientRect} boundingClientRect\n * @param {DOMRect|ClientRect} intersectionRect\n */\n crossOriginUpdater = function(boundingClientRect, intersectionRect) {\n if (!boundingClientRect || !intersectionRect) {\n crossOriginRect = getEmptyRect();\n } else {\n crossOriginRect = convertFromParentRect(boundingClientRect, intersectionRect);\n }\n registry.forEach(function(observer) {\n observer._checkForIntersections();\n });\n };\n }\n return crossOriginUpdater;\n};\n\n\n/**\n * Resets the cross-origin mode.\n */\nIntersectionObserver._resetCrossOriginUpdater = function() {\n crossOriginUpdater = null;\n crossOriginRect = null;\n};\n\n\n/**\n * Starts observing a target element for intersection changes based on\n * the thresholds values.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.observe = function(target) {\n var isTargetAlreadyObserved = this._observationTargets.some(function(item) {\n return item.element == target;\n });\n\n if (isTargetAlreadyObserved) {\n return;\n }\n\n if (!(target && target.nodeType == 1)) {\n throw new Error('target must be an Element');\n }\n\n this._registerInstance();\n this._observationTargets.push({element: target, entry: null});\n this._monitorIntersections(target.ownerDocument);\n this._checkForIntersections();\n};\n\n\n/**\n * Stops observing a target element for intersection changes.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.unobserve = function(target) {\n this._observationTargets =\n this._observationTargets.filter(function(item) {\n return item.element != target;\n });\n this._unmonitorIntersections(target.ownerDocument);\n if (this._observationTargets.length == 0) {\n this._unregisterInstance();\n }\n};\n\n\n/**\n * Stops observing all target elements for intersection changes.\n */\nIntersectionObserver.prototype.disconnect = function() {\n this._observationTargets = [];\n this._unmonitorAllIntersections();\n this._unregisterInstance();\n};\n\n\n/**\n * Returns any queue entries that have not yet been reported to the\n * callback and clears the queue. This can be used in conjunction with the\n * callback to obtain the absolute most up-to-date intersection information.\n * @return {Array} The currently queued entries.\n */\nIntersectionObserver.prototype.takeRecords = function() {\n var records = this._queuedEntries.slice();\n this._queuedEntries = [];\n return records;\n};\n\n\n/**\n * Accepts the threshold value from the user configuration object and\n * returns a sorted array of unique threshold values. If a value is not\n * between 0 and 1 and error is thrown.\n * @private\n * @param {Array|number=} opt_threshold An optional threshold value or\n * a list of threshold values, defaulting to [0].\n * @return {Array} A sorted list of unique and valid threshold values.\n */\nIntersectionObserver.prototype._initThresholds = function(opt_threshold) {\n var threshold = opt_threshold || [0];\n if (!Array.isArray(threshold)) threshold = [threshold];\n\n return threshold.sort().filter(function(t, i, a) {\n if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {\n throw new Error('threshold must be a number between 0 and 1 inclusively');\n }\n return t !== a[i - 1];\n });\n};\n\n\n/**\n * Accepts the rootMargin value from the user configuration object\n * and returns an array of the four margin values as an object containing\n * the value and unit properties. If any of the values are not properly\n * formatted or use a unit other than px or %, and error is thrown.\n * @private\n * @param {string=} opt_rootMargin An optional rootMargin value,\n * defaulting to '0px'.\n * @return {Array} An array of margin objects with the keys\n * value and unit.\n */\nIntersectionObserver.prototype._parseRootMargin = function(opt_rootMargin) {\n var marginString = opt_rootMargin || '0px';\n var margins = marginString.split(/\\s+/).map(function(margin) {\n var parts = /^(-?\\d*\\.?\\d+)(px|%)$/.exec(margin);\n if (!parts) {\n throw new Error('rootMargin must be specified in pixels or percent');\n }\n return {value: parseFloat(parts[1]), unit: parts[2]};\n });\n\n // Handles shorthand.\n margins[1] = margins[1] || margins[0];\n margins[2] = margins[2] || margins[0];\n margins[3] = margins[3] || margins[1];\n\n return margins;\n};\n\n\n/**\n * Starts polling for intersection changes if the polling is not already\n * happening, and if the page's visibility state is visible.\n * @param {!Document} doc\n * @private\n */\nIntersectionObserver.prototype._monitorIntersections = function(doc) {\n var win = doc.defaultView;\n if (!win) {\n // Already destroyed.\n return;\n }\n if (this._monitoringDocuments.indexOf(doc) != -1) {\n // Already monitoring.\n return;\n }\n\n // Private state for monitoring.\n var callback = this._checkForIntersections;\n var monitoringInterval = null;\n var domObserver = null;\n\n // If a poll interval is set, use polling instead of listening to\n // resize and scroll events or DOM mutations.\n if (this.POLL_INTERVAL) {\n monitoringInterval = win.setInterval(callback, this.POLL_INTERVAL);\n } else {\n addEvent(win, 'resize', callback, true);\n addEvent(doc, 'scroll', callback, true);\n if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in win) {\n domObserver = new win.MutationObserver(callback);\n domObserver.observe(doc, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n });\n }\n }\n\n this._monitoringDocuments.push(doc);\n this._monitoringUnsubscribes.push(function() {\n // Get the window object again. When a friendly iframe is destroyed, it\n // will be null.\n var win = doc.defaultView;\n\n if (win) {\n if (monitoringInterval) {\n win.clearInterval(monitoringInterval);\n }\n removeEvent(win, 'resize', callback, true);\n }\n\n removeEvent(doc, 'scroll', callback, true);\n if (domObserver) {\n domObserver.disconnect();\n }\n });\n\n // Also monitor the parent.\n var rootDoc =\n (this.root && (this.root.ownerDocument || this.root)) || document;\n if (doc != rootDoc) {\n var frame = getFrameElement(doc);\n if (frame) {\n this._monitorIntersections(frame.ownerDocument);\n }\n }\n};\n\n\n/**\n * Stops polling for intersection changes.\n * @param {!Document} doc\n * @private\n */\nIntersectionObserver.prototype._unmonitorIntersections = function(doc) {\n var index = this._monitoringDocuments.indexOf(doc);\n if (index == -1) {\n return;\n }\n\n var rootDoc =\n (this.root && (this.root.ownerDocument || this.root)) || document;\n\n // Check if any dependent targets are still remaining.\n var hasDependentTargets =\n this._observationTargets.some(function(item) {\n var itemDoc = item.element.ownerDocument;\n // Target is in this context.\n if (itemDoc == doc) {\n return true;\n }\n // Target is nested in this context.\n while (itemDoc && itemDoc != rootDoc) {\n var frame = getFrameElement(itemDoc);\n itemDoc = frame && frame.ownerDocument;\n if (itemDoc == doc) {\n return true;\n }\n }\n return false;\n });\n if (hasDependentTargets) {\n return;\n }\n\n // Unsubscribe.\n var unsubscribe = this._monitoringUnsubscribes[index];\n this._monitoringDocuments.splice(index, 1);\n this._monitoringUnsubscribes.splice(index, 1);\n unsubscribe();\n\n // Also unmonitor the parent.\n if (doc != rootDoc) {\n var frame = getFrameElement(doc);\n if (frame) {\n this._unmonitorIntersections(frame.ownerDocument);\n }\n }\n};\n\n\n/**\n * Stops polling for intersection changes.\n * @param {!Document} doc\n * @private\n */\nIntersectionObserver.prototype._unmonitorAllIntersections = function() {\n var unsubscribes = this._monitoringUnsubscribes.slice(0);\n this._monitoringDocuments.length = 0;\n this._monitoringUnsubscribes.length = 0;\n for (var i = 0; i < unsubscribes.length; i++) {\n unsubscribes[i]();\n }\n};\n\n\n/**\n * Scans each observation target for intersection changes and adds them\n * to the internal entries queue. If new entries are found, it\n * schedules the callback to be invoked.\n * @private\n */\nIntersectionObserver.prototype._checkForIntersections = function() {\n if (!this.root && crossOriginUpdater && !crossOriginRect) {\n // Cross origin monitoring, but no initial data available yet.\n return;\n }\n\n var rootIsInDom = this._rootIsInDom();\n var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect();\n\n this._observationTargets.forEach(function(item) {\n var target = item.element;\n var targetRect = getBoundingClientRect(target);\n var rootContainsTarget = this._rootContainsTarget(target);\n var oldEntry = item.entry;\n var intersectionRect = rootIsInDom && rootContainsTarget &&\n this._computeTargetAndRootIntersection(target, targetRect, rootRect);\n\n var rootBounds = null;\n if (!this._rootContainsTarget(target)) {\n rootBounds = getEmptyRect();\n } else if (!crossOriginUpdater || this.root) {\n rootBounds = rootRect;\n }\n\n var newEntry = item.entry = new IntersectionObserverEntry({\n time: now(),\n target: target,\n boundingClientRect: targetRect,\n rootBounds: rootBounds,\n intersectionRect: intersectionRect\n });\n\n if (!oldEntry) {\n this._queuedEntries.push(newEntry);\n } else if (rootIsInDom && rootContainsTarget) {\n // If the new entry intersection ratio has crossed any of the\n // thresholds, add a new entry.\n if (this._hasCrossedThreshold(oldEntry, newEntry)) {\n this._queuedEntries.push(newEntry);\n }\n } else {\n // If the root is not in the DOM or target is not contained within\n // root but the previous entry for this target had an intersection,\n // add a new record indicating removal.\n if (oldEntry && oldEntry.isIntersecting) {\n this._queuedEntries.push(newEntry);\n }\n }\n }, this);\n\n if (this._queuedEntries.length) {\n this._callback(this.takeRecords(), this);\n }\n};\n\n\n/**\n * Accepts a target and root rect computes the intersection between then\n * following the algorithm in the spec.\n * TODO(philipwalton): at this time clip-path is not considered.\n * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo\n * @param {Element} target The target DOM element\n * @param {Object} targetRect The bounding rect of the target.\n * @param {Object} rootRect The bounding rect of the root after being\n * expanded by the rootMargin value.\n * @return {?Object} The final intersection rect object or undefined if no\n * intersection is found.\n * @private\n */\nIntersectionObserver.prototype._computeTargetAndRootIntersection =\n function(target, targetRect, rootRect) {\n // If the element isn't displayed, an intersection can't happen.\n if (window.getComputedStyle(target).display == 'none') return;\n\n var intersectionRect = targetRect;\n var parent = getParentNode(target);\n var atRoot = false;\n\n while (!atRoot && parent) {\n var parentRect = null;\n var parentComputedStyle = parent.nodeType == 1 ?\n window.getComputedStyle(parent) : {};\n\n // If the parent isn't displayed, an intersection can't happen.\n if (parentComputedStyle.display == 'none') return null;\n\n if (parent == this.root || parent.nodeType == /* DOCUMENT */ 9) {\n atRoot = true;\n if (parent == this.root || parent == document) {\n if (crossOriginUpdater && !this.root) {\n if (!crossOriginRect ||\n crossOriginRect.width == 0 && crossOriginRect.height == 0) {\n // A 0-size cross-origin intersection means no-intersection.\n parent = null;\n parentRect = null;\n intersectionRect = null;\n } else {\n parentRect = crossOriginRect;\n }\n } else {\n parentRect = rootRect;\n }\n } else {\n // Check if there's a frame that can be navigated to.\n var frame = getParentNode(parent);\n var frameRect = frame && getBoundingClientRect(frame);\n var frameIntersect =\n frame &&\n this._computeTargetAndRootIntersection(frame, frameRect, rootRect);\n if (frameRect && frameIntersect) {\n parent = frame;\n parentRect = convertFromParentRect(frameRect, frameIntersect);\n } else {\n parent = null;\n intersectionRect = null;\n }\n }\n } else {\n // If the element has a non-visible overflow, and it's not the \n // or element, update the intersection rect.\n // Note: and cannot be clipped to a rect that's not also\n // the document rect, so no need to compute a new intersection.\n var doc = parent.ownerDocument;\n if (parent != doc.body &&\n parent != doc.documentElement &&\n parentComputedStyle.overflow != 'visible') {\n parentRect = getBoundingClientRect(parent);\n }\n }\n\n // If either of the above conditionals set a new parentRect,\n // calculate new intersection data.\n if (parentRect) {\n intersectionRect = computeRectIntersection(parentRect, intersectionRect);\n }\n if (!intersectionRect) break;\n parent = parent && getParentNode(parent);\n }\n return intersectionRect;\n};\n\n\n/**\n * Returns the root rect after being expanded by the rootMargin value.\n * @return {ClientRect} The expanded root rect.\n * @private\n */\nIntersectionObserver.prototype._getRootRect = function() {\n var rootRect;\n if (this.root && !isDoc(this.root)) {\n rootRect = getBoundingClientRect(this.root);\n } else {\n // Use / instead of window since scroll bars affect size.\n var doc = isDoc(this.root) ? this.root : document;\n var html = doc.documentElement;\n var body = doc.body;\n rootRect = {\n top: 0,\n left: 0,\n right: html.clientWidth || body.clientWidth,\n width: html.clientWidth || body.clientWidth,\n bottom: html.clientHeight || body.clientHeight,\n height: html.clientHeight || body.clientHeight\n };\n }\n return this._expandRectByRootMargin(rootRect);\n};\n\n\n/**\n * Accepts a rect and expands it by the rootMargin value.\n * @param {DOMRect|ClientRect} rect The rect object to expand.\n * @return {ClientRect} The expanded rect.\n * @private\n */\nIntersectionObserver.prototype._expandRectByRootMargin = function(rect) {\n var margins = this._rootMarginValues.map(function(margin, i) {\n return margin.unit == 'px' ? margin.value :\n margin.value * (i % 2 ? rect.width : rect.height) / 100;\n });\n var newRect = {\n top: rect.top - margins[0],\n right: rect.right + margins[1],\n bottom: rect.bottom + margins[2],\n left: rect.left - margins[3]\n };\n newRect.width = newRect.right - newRect.left;\n newRect.height = newRect.bottom - newRect.top;\n\n return newRect;\n};\n\n\n/**\n * Accepts an old and new entry and returns true if at least one of the\n * threshold values has been crossed.\n * @param {?IntersectionObserverEntry} oldEntry The previous entry for a\n * particular target element or null if no previous entry exists.\n * @param {IntersectionObserverEntry} newEntry The current entry for a\n * particular target element.\n * @return {boolean} Returns true if a any threshold has been crossed.\n * @private\n */\nIntersectionObserver.prototype._hasCrossedThreshold =\n function(oldEntry, newEntry) {\n\n // To make comparing easier, an entry that has a ratio of 0\n // but does not actually intersect is given a value of -1\n var oldRatio = oldEntry && oldEntry.isIntersecting ?\n oldEntry.intersectionRatio || 0 : -1;\n var newRatio = newEntry.isIntersecting ?\n newEntry.intersectionRatio || 0 : -1;\n\n // Ignore unchanged ratios\n if (oldRatio === newRatio) return;\n\n for (var i = 0; i < this.thresholds.length; i++) {\n var threshold = this.thresholds[i];\n\n // Return true if an entry matches a threshold or if the new ratio\n // and the old ratio are on the opposite sides of a threshold.\n if (threshold == oldRatio || threshold == newRatio ||\n threshold < oldRatio !== threshold < newRatio) {\n return true;\n }\n }\n};\n\n\n/**\n * Returns whether or not the root element is an element and is in the DOM.\n * @return {boolean} True if the root element is an element and is in the DOM.\n * @private\n */\nIntersectionObserver.prototype._rootIsInDom = function() {\n return !this.root || containsDeep(document, this.root);\n};\n\n\n/**\n * Returns whether or not the target element is a child of root.\n * @param {Element} target The target element to check.\n * @return {boolean} True if the target element is a child of root.\n * @private\n */\nIntersectionObserver.prototype._rootContainsTarget = function(target) {\n var rootDoc =\n (this.root && (this.root.ownerDocument || this.root)) || document;\n return (\n containsDeep(rootDoc, target) &&\n (!this.root || rootDoc == target.ownerDocument)\n );\n};\n\n\n/**\n * Adds the instance to the global IntersectionObserver registry if it isn't\n * already present.\n * @private\n */\nIntersectionObserver.prototype._registerInstance = function() {\n if (registry.indexOf(this) < 0) {\n registry.push(this);\n }\n};\n\n\n/**\n * Removes the instance from the global IntersectionObserver registry.\n * @private\n */\nIntersectionObserver.prototype._unregisterInstance = function() {\n var index = registry.indexOf(this);\n if (index != -1) registry.splice(index, 1);\n};\n\n\n/**\n * Returns the result of the performance.now() method or null in browsers\n * that don't support the API.\n * @return {number} The elapsed time since the page was requested.\n */\nfunction now() {\n return window.performance && performance.now && performance.now();\n}\n\n\n/**\n * Throttles a function and delays its execution, so it's only called at most\n * once within a given time period.\n * @param {Function} fn The function to throttle.\n * @param {number} timeout The amount of time that must pass before the\n * function can be called again.\n * @return {Function} The throttled function.\n */\nfunction throttle(fn, timeout) {\n var timer = null;\n return function () {\n if (!timer) {\n timer = setTimeout(function() {\n fn();\n timer = null;\n }, timeout);\n }\n };\n}\n\n\n/**\n * Adds an event handler to a DOM node ensuring cross-browser compatibility.\n * @param {Node} node The DOM node to add the event handler to.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to add.\n * @param {boolean} opt_useCapture Optionally adds the even to the capture\n * phase. Note: this only works in modern browsers.\n */\nfunction addEvent(node, event, fn, opt_useCapture) {\n if (typeof node.addEventListener == 'function') {\n node.addEventListener(event, fn, opt_useCapture || false);\n }\n else if (typeof node.attachEvent == 'function') {\n node.attachEvent('on' + event, fn);\n }\n}\n\n\n/**\n * Removes a previously added event handler from a DOM node.\n * @param {Node} node The DOM node to remove the event handler from.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to remove.\n * @param {boolean} opt_useCapture If the event handler was added with this\n * flag set to true, it should be set to true here in order to remove it.\n */\nfunction removeEvent(node, event, fn, opt_useCapture) {\n if (typeof node.removeEventListener == 'function') {\n node.removeEventListener(event, fn, opt_useCapture || false);\n }\n else if (typeof node.detachEvent == 'function') {\n node.detachEvent('on' + event, fn);\n }\n}\n\n\n/**\n * Returns the intersection between two rect objects.\n * @param {Object} rect1 The first rect.\n * @param {Object} rect2 The second rect.\n * @return {?Object|?ClientRect} The intersection rect or undefined if no\n * intersection is found.\n */\nfunction computeRectIntersection(rect1, rect2) {\n var top = Math.max(rect1.top, rect2.top);\n var bottom = Math.min(rect1.bottom, rect2.bottom);\n var left = Math.max(rect1.left, rect2.left);\n var right = Math.min(rect1.right, rect2.right);\n var width = right - left;\n var height = bottom - top;\n\n return (width >= 0 && height >= 0) && {\n top: top,\n bottom: bottom,\n left: left,\n right: right,\n width: width,\n height: height\n } || null;\n}\n\n\n/**\n * Shims the native getBoundingClientRect for compatibility with older IE.\n * @param {Element} el The element whose bounding rect to get.\n * @return {DOMRect|ClientRect} The (possibly shimmed) rect of the element.\n */\nfunction getBoundingClientRect(el) {\n var rect;\n\n try {\n rect = el.getBoundingClientRect();\n } catch (err) {\n // Ignore Windows 7 IE11 \"Unspecified error\"\n // https://github.com/w3c/IntersectionObserver/pull/205\n }\n\n if (!rect) return getEmptyRect();\n\n // Older IE\n if (!(rect.width && rect.height)) {\n rect = {\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n }\n return rect;\n}\n\n\n/**\n * Returns an empty rect object. An empty rect is returned when an element\n * is not in the DOM.\n * @return {ClientRect} The empty rect.\n */\nfunction getEmptyRect() {\n return {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n width: 0,\n height: 0\n };\n}\n\n\n/**\n * Ensure that the result has all of the necessary fields of the DOMRect.\n * Specifically this ensures that `x` and `y` fields are set.\n *\n * @param {?DOMRect|?ClientRect} rect\n * @return {?DOMRect}\n */\nfunction ensureDOMRect(rect) {\n // A `DOMRect` object has `x` and `y` fields.\n if (!rect || 'x' in rect) {\n return rect;\n }\n // A IE's `ClientRect` type does not have `x` and `y`. The same is the case\n // for internally calculated Rect objects. For the purposes of\n // `IntersectionObserver`, it's sufficient to simply mirror `left` and `top`\n // for these fields.\n return {\n top: rect.top,\n y: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n x: rect.left,\n right: rect.right,\n width: rect.width,\n height: rect.height\n };\n}\n\n\n/**\n * Inverts the intersection and bounding rect from the parent (frame) BCR to\n * the local BCR space.\n * @param {DOMRect|ClientRect} parentBoundingRect The parent's bound client rect.\n * @param {DOMRect|ClientRect} parentIntersectionRect The parent's own intersection rect.\n * @return {ClientRect} The local root bounding rect for the parent's children.\n */\nfunction convertFromParentRect(parentBoundingRect, parentIntersectionRect) {\n var top = parentIntersectionRect.top - parentBoundingRect.top;\n var left = parentIntersectionRect.left - parentBoundingRect.left;\n return {\n top: top,\n left: left,\n height: parentIntersectionRect.height,\n width: parentIntersectionRect.width,\n bottom: top + parentIntersectionRect.height,\n right: left + parentIntersectionRect.width\n };\n}\n\n\n/**\n * Checks to see if a parent element contains a child element (including inside\n * shadow DOM).\n * @param {Node} parent The parent element.\n * @param {Node} child The child element.\n * @return {boolean} True if the parent node contains the child node.\n */\nfunction containsDeep(parent, child) {\n var node = child;\n while (node) {\n if (node == parent) return true;\n\n node = getParentNode(node);\n }\n return false;\n}\n\n\n/**\n * Gets the parent node of an element or its host element if the parent node\n * is a shadow root.\n * @param {Node} node The node whose parent to get.\n * @return {Node|null} The parent node or null if no parent exists.\n */\nfunction getParentNode(node) {\n var parent = node.parentNode;\n\n if (node.nodeType == /* DOCUMENT */ 9 && node != document) {\n // If this node is a document node, look for the embedding frame.\n return getFrameElement(node);\n }\n\n // If the parent has element that is assigned through shadow root slot\n if (parent && parent.assignedSlot) {\n parent = parent.assignedSlot.parentNode\n }\n\n if (parent && parent.nodeType == 11 && parent.host) {\n // If the parent is a shadow root, return the host element.\n return parent.host;\n }\n\n return parent;\n}\n\n/**\n * Returns true if `node` is a Document.\n * @param {!Node} node\n * @returns {boolean}\n */\nfunction isDoc(node) {\n return node && node.nodeType === 9;\n}\n\n\n// Exposes the constructors globally.\nwindow.IntersectionObserver = IntersectionObserver;\nwindow.IntersectionObserverEntry = IntersectionObserverEntry;\n\n}());\n","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar defineProperty = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) { /**/ }\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\n// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target\nvar setProperty = function setProperty(target, options) {\n\tif (defineProperty && options.name === '__proto__') {\n\t\tdefineProperty(target, options.name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\tvalue: options.newValue,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\ttarget[options.name] = options.newValue;\n\t}\n};\n\n// Return undefined instead of __proto__ if '__proto__' is not an own property\nvar getProperty = function getProperty(obj, name) {\n\tif (name === '__proto__') {\n\t\tif (!hasOwn.call(obj, name)) {\n\t\t\treturn void 0;\n\t\t} else if (gOPD) {\n\t\t\t// In early versions of node, obj['__proto__'] is buggy when obj has\n\t\t\t// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.\n\t\t\treturn gOPD(obj, name).value;\n\t\t}\n\t}\n\n\treturn obj[name];\n};\n\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone;\n\tvar target = arguments[0];\n\tvar i = 1;\n\tvar length = arguments.length;\n\tvar deep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\tif (target == null || (typeof target !== 'object' && typeof target !== 'function')) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = getProperty(target, name);\n\t\t\t\tcopy = getProperty(options, name);\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: extend(deep, clone, copy) });\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: copy });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n","// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n\n// strings\nvar NEWLINE = '\\n';\nvar FORWARD_SLASH = '/';\nvar ASTERISK = '*';\nvar EMPTY_STRING = '';\n\n// types\nvar TYPE_COMMENT = 'comment';\nvar TYPE_DECLARATION = 'declaration';\n\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */\nmodule.exports = function (style, options) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n if (!style) return [];\n\n options = options || {};\n\n /**\n * Positional.\n */\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n *\n * @param {String} str\n */\n function updatePosition(str) {\n var lines = str.match(NEWLINE_REGEX);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf(NEWLINE);\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n *\n * @return {Function}\n */\n function position() {\n var start = { line: lineno, column: column };\n return function (node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node.\n *\n * @constructor\n * @property {Object} start\n * @property {Object} end\n * @property {undefined|String} source\n */\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string.\n */\n Position.prototype.content = style;\n\n var errorsList = [];\n\n /**\n * Error `msg`.\n *\n * @param {String} msg\n * @throws {Error}\n */\n function error(msg) {\n var err = new Error(\n options.source + ':' + lineno + ':' + column + ': ' + msg\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = style;\n\n if (options.silent) {\n errorsList.push(err);\n } else {\n throw err;\n }\n }\n\n /**\n * Match `re` and return captures.\n *\n * @param {RegExp} re\n * @return {undefined|Array}\n */\n function match(re) {\n var m = re.exec(style);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n style = style.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n function whitespace() {\n match(WHITESPACE_REGEX);\n }\n\n /**\n * Parse comments.\n *\n * @param {Object[]} [rules]\n * @return {Object[]}\n */\n function comments(rules) {\n var c;\n rules = rules || [];\n while ((c = comment())) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n *\n * @return {Object}\n * @throws {Error}\n */\n function comment() {\n var pos = position();\n if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n\n var i = 2;\n while (\n EMPTY_STRING != style.charAt(i) &&\n (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))\n ) {\n ++i;\n }\n i += 2;\n\n if (EMPTY_STRING === style.charAt(i - 1)) {\n return error('End of comment missing');\n }\n\n var str = style.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n style = style.slice(i);\n column += 2;\n\n return pos({\n type: TYPE_COMMENT,\n comment: str\n });\n }\n\n /**\n * Parse declaration.\n *\n * @return {Object}\n * @throws {Error}\n */\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(PROPERTY_REGEX);\n if (!prop) return;\n comment();\n\n // :\n if (!match(COLON_REGEX)) return error(\"property missing ':'\");\n\n // val\n var val = match(VALUE_REGEX);\n\n var ret = pos({\n type: TYPE_DECLARATION,\n property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),\n value: val\n ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))\n : EMPTY_STRING\n });\n\n // ;\n match(SEMICOLON_REGEX);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n *\n * @return {Object[]}\n */\n function declarations() {\n var decls = [];\n\n comments(decls);\n\n // declarations\n var decl;\n while ((decl = declaration())) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n return decls;\n }\n\n whitespace();\n return declarations();\n};\n\n/**\n * Trim `str`.\n *\n * @param {String} str\n * @return {String}\n */\nfunction trim(str) {\n return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (Array.isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return Object.keys(obj).map(function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (Array.isArray(obj[k])) {\n return obj[k].map(function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).filter(Boolean).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","import compute from 'compute-scroll-into-view';\nfunction isOptionsObject(options) {\n return options === Object(options) && Object.keys(options).length !== 0;\n}\nfunction defaultBehavior(actions, behavior) {\n if (behavior === void 0) {\n behavior = 'auto';\n }\n var canSmoothScroll = ('scrollBehavior' in document.body.style);\n actions.forEach(function (_ref) {\n var el = _ref.el,\n top = _ref.top,\n left = _ref.left;\n if (el.scroll && canSmoothScroll) {\n el.scroll({\n top: top,\n left: left,\n behavior: behavior\n });\n } else {\n el.scrollTop = top;\n el.scrollLeft = left;\n }\n });\n}\nfunction getOptions(options) {\n if (options === false) {\n return {\n block: 'end',\n inline: 'nearest'\n };\n }\n if (isOptionsObject(options)) {\n return options;\n }\n return {\n block: 'start',\n inline: 'nearest'\n };\n}\nfunction scrollIntoView(target, options) {\n var isTargetAttached = target.isConnected || target.ownerDocument.documentElement.contains(target);\n if (isOptionsObject(options) && typeof options.behavior === 'function') {\n return options.behavior(isTargetAttached ? compute(target, options) : []);\n }\n if (!isTargetAttached) {\n return;\n }\n var computeOptions = getOptions(options);\n return defaultBehavior(compute(target, computeOptions), computeOptions.behavior);\n}\nexport default scrollIntoView;","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = StyleToObject;\nvar inline_style_parser_1 = __importDefault(require(\"inline-style-parser\"));\n/**\n * Parses inline style to object.\n *\n * @param style - Inline style.\n * @param iterator - Iterator.\n * @returns - Style object or null.\n *\n * @example Parsing inline style to object:\n *\n * ```js\n * import parse from 'style-to-object';\n * parse('line-height: 42;'); // { 'line-height': '42' }\n * ```\n */\nfunction StyleToObject(style, iterator) {\n var styleObject = null;\n if (!style || typeof style !== 'string') {\n return styleObject;\n }\n var declarations = (0, inline_style_parser_1.default)(style);\n var hasIterator = typeof iterator === 'function';\n declarations.forEach(function (declaration) {\n if (declaration.type !== 'declaration') {\n return;\n }\n var property = declaration.property, value = declaration.value;\n if (hasIterator) {\n iterator(property, value, declaration);\n }\n else if (value) {\n styleObject = styleObject || {};\n styleObject[property] = value;\n }\n });\n return styleObject;\n}\n//# sourceMappingURL=index.js.map","/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [jsx=false]\n * Support JSX identifiers (default: `false`).\n */\n\nconst startRe = /[$_\\p{ID_Start}]/u\nconst contRe = /[$_\\u{200C}\\u{200D}\\p{ID_Continue}]/u\nconst contReJsx = /[-$_\\u{200C}\\u{200D}\\p{ID_Continue}]/u\nconst nameRe = /^[$_\\p{ID_Start}][$_\\u{200C}\\u{200D}\\p{ID_Continue}]*$/u\nconst nameReJsx = /^[$_\\p{ID_Start}][-$_\\u{200C}\\u{200D}\\p{ID_Continue}]*$/u\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Checks if the given code point can start an identifier.\n *\n * @param {number | undefined} code\n * Code point to check.\n * @returns {boolean}\n * Whether `code` can start an identifier.\n */\n// Note: `undefined` is supported so you can pass the result from `''.codePointAt`.\nexport function start(code) {\n return code ? startRe.test(String.fromCodePoint(code)) : false\n}\n\n/**\n * Checks if the given code point can continue an identifier.\n *\n * @param {number | undefined} code\n * Code point to check.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {boolean}\n * Whether `code` can continue an identifier.\n */\n// Note: `undefined` is supported so you can pass the result from `''.codePointAt`.\nexport function cont(code, options) {\n const settings = options || emptyOptions\n const re = settings.jsx ? contReJsx : contRe\n return code ? re.test(String.fromCodePoint(code)) : false\n}\n\n/**\n * Checks if the given value is a valid identifier name.\n *\n * @param {string} name\n * Identifier to check.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {boolean}\n * Whether `name` can be an identifier.\n */\nexport function name(name, options) {\n const settings = options || emptyOptions\n const re = settings.jsx ? nameReJsx : nameRe\n return re.test(name)\n}\n","/**\n * @typedef {import('hast').Nodes} Nodes\n */\n\n// HTML whitespace expression.\n// See .\nconst re = /[ \\t\\n\\f\\r]/g\n\n/**\n * Check if the given value is *inter-element whitespace*.\n *\n * @param {Nodes | string} thing\n * Thing to check (`Node` or `string`).\n * @returns {boolean}\n * Whether the `value` is inter-element whitespace (`boolean`): consisting of\n * zero or more of space, tab (`\\t`), line feed (`\\n`), carriage return\n * (`\\r`), or form feed (`\\f`); if a node is passed it must be a `Text` node,\n * whose `value` field is checked.\n */\nexport function whitespace(thing) {\n return typeof thing === 'object'\n ? thing.type === 'text'\n ? empty(thing.value)\n : false\n : empty(thing)\n}\n\n/**\n * @param {string} value\n * @returns {boolean}\n */\nfunction empty(value) {\n return value.replace(re, '') === ''\n}\n","/**\n * @typedef {import('./info.js').Info} Info\n * @typedef {Record} Properties\n * @typedef {Record} Normal\n */\n\nexport class Schema {\n /**\n * @constructor\n * @param {Properties} property\n * @param {Normal} normal\n * @param {string} [space]\n */\n constructor(property, normal, space) {\n this.property = property\n this.normal = normal\n if (space) {\n this.space = space\n }\n }\n}\n\n/** @type {Properties} */\nSchema.prototype.property = {}\n/** @type {Normal} */\nSchema.prototype.normal = {}\n/** @type {string|null} */\nSchema.prototype.space = null\n","/**\n * @typedef {import('./schema.js').Properties} Properties\n * @typedef {import('./schema.js').Normal} Normal\n */\n\nimport {Schema} from './schema.js'\n\n/**\n * @param {Schema[]} definitions\n * @param {string} [space]\n * @returns {Schema}\n */\nexport function merge(definitions, space) {\n /** @type {Properties} */\n const property = {}\n /** @type {Normal} */\n const normal = {}\n let index = -1\n\n while (++index < definitions.length) {\n Object.assign(property, definitions[index].property)\n Object.assign(normal, definitions[index].normal)\n }\n\n return new Schema(property, normal, space)\n}\n","/**\n * @param {string} value\n * @returns {string}\n */\nexport function normalize(value) {\n return value.toLowerCase()\n}\n","export class Info {\n /**\n * @constructor\n * @param {string} property\n * @param {string} attribute\n */\n constructor(property, attribute) {\n /** @type {string} */\n this.property = property\n /** @type {string} */\n this.attribute = attribute\n }\n}\n\n/** @type {string|null} */\nInfo.prototype.space = null\nInfo.prototype.boolean = false\nInfo.prototype.booleanish = false\nInfo.prototype.overloadedBoolean = false\nInfo.prototype.number = false\nInfo.prototype.commaSeparated = false\nInfo.prototype.spaceSeparated = false\nInfo.prototype.commaOrSpaceSeparated = false\nInfo.prototype.mustUseProperty = false\nInfo.prototype.defined = false\n","let powers = 0\n\nexport const boolean = increment()\nexport const booleanish = increment()\nexport const overloadedBoolean = increment()\nexport const number = increment()\nexport const spaceSeparated = increment()\nexport const commaSeparated = increment()\nexport const commaOrSpaceSeparated = increment()\n\nfunction increment() {\n return 2 ** ++powers\n}\n","import {Info} from './info.js'\nimport * as types from './types.js'\n\n/** @type {Array} */\n// @ts-expect-error: hush.\nconst checks = Object.keys(types)\n\nexport class DefinedInfo extends Info {\n /**\n * @constructor\n * @param {string} property\n * @param {string} attribute\n * @param {number|null} [mask]\n * @param {string} [space]\n */\n constructor(property, attribute, mask, space) {\n let index = -1\n\n super(property, attribute)\n\n mark(this, 'space', space)\n\n if (typeof mask === 'number') {\n while (++index < checks.length) {\n const check = checks[index]\n mark(this, checks[index], (mask & types[check]) === types[check])\n }\n }\n }\n}\n\nDefinedInfo.prototype.defined = true\n\n/**\n * @param {DefinedInfo} values\n * @param {string} key\n * @param {unknown} value\n */\nfunction mark(values, key, value) {\n if (value) {\n // @ts-expect-error: assume `value` matches the expected value of `key`.\n values[key] = value\n }\n}\n","/**\n * @typedef {import('./schema.js').Properties} Properties\n * @typedef {import('./schema.js').Normal} Normal\n *\n * @typedef {Record} Attributes\n *\n * @typedef {Object} Definition\n * @property {Record} properties\n * @property {(attributes: Attributes, property: string) => string} transform\n * @property {string} [space]\n * @property {Attributes} [attributes]\n * @property {Array} [mustUseProperty]\n */\n\nimport {normalize} from '../normalize.js'\nimport {Schema} from './schema.js'\nimport {DefinedInfo} from './defined-info.js'\n\nconst own = {}.hasOwnProperty\n\n/**\n * @param {Definition} definition\n * @returns {Schema}\n */\nexport function create(definition) {\n /** @type {Properties} */\n const property = {}\n /** @type {Normal} */\n const normal = {}\n /** @type {string} */\n let prop\n\n for (prop in definition.properties) {\n if (own.call(definition.properties, prop)) {\n const value = definition.properties[prop]\n const info = new DefinedInfo(\n prop,\n definition.transform(definition.attributes || {}, prop),\n value,\n definition.space\n )\n\n if (\n definition.mustUseProperty &&\n definition.mustUseProperty.includes(prop)\n ) {\n info.mustUseProperty = true\n }\n\n property[prop] = info\n\n normal[normalize(prop)] = prop\n normal[normalize(info.attribute)] = prop\n }\n }\n\n return new Schema(property, normal, definition.space)\n}\n","import {create} from './util/create.js'\n\nexport const xlink = create({\n space: 'xlink',\n transform(_, prop) {\n return 'xlink:' + prop.slice(5).toLowerCase()\n },\n properties: {\n xLinkActuate: null,\n xLinkArcRole: null,\n xLinkHref: null,\n xLinkRole: null,\n xLinkShow: null,\n xLinkTitle: null,\n xLinkType: null\n }\n})\n","import {create} from './util/create.js'\n\nexport const xml = create({\n space: 'xml',\n transform(_, prop) {\n return 'xml:' + prop.slice(3).toLowerCase()\n },\n properties: {xmlLang: null, xmlBase: null, xmlSpace: null}\n})\n","/**\n * @param {Record} attributes\n * @param {string} attribute\n * @returns {string}\n */\nexport function caseSensitiveTransform(attributes, attribute) {\n return attribute in attributes ? attributes[attribute] : attribute\n}\n","import {caseSensitiveTransform} from './case-sensitive-transform.js'\n\n/**\n * @param {Record} attributes\n * @param {string} property\n * @returns {string}\n */\nexport function caseInsensitiveTransform(attributes, property) {\n return caseSensitiveTransform(attributes, property.toLowerCase())\n}\n","import {create} from './util/create.js'\nimport {caseInsensitiveTransform} from './util/case-insensitive-transform.js'\n\nexport const xmlns = create({\n space: 'xmlns',\n attributes: {xmlnsxlink: 'xmlns:xlink'},\n transform: caseInsensitiveTransform,\n properties: {xmlns: null, xmlnsXLink: null}\n})\n","import {booleanish, number, spaceSeparated} from './util/types.js'\nimport {create} from './util/create.js'\n\nexport const aria = create({\n transform(_, prop) {\n return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase()\n },\n properties: {\n ariaActiveDescendant: null,\n ariaAtomic: booleanish,\n ariaAutoComplete: null,\n ariaBusy: booleanish,\n ariaChecked: booleanish,\n ariaColCount: number,\n ariaColIndex: number,\n ariaColSpan: number,\n ariaControls: spaceSeparated,\n ariaCurrent: null,\n ariaDescribedBy: spaceSeparated,\n ariaDetails: null,\n ariaDisabled: booleanish,\n ariaDropEffect: spaceSeparated,\n ariaErrorMessage: null,\n ariaExpanded: booleanish,\n ariaFlowTo: spaceSeparated,\n ariaGrabbed: booleanish,\n ariaHasPopup: null,\n ariaHidden: booleanish,\n ariaInvalid: null,\n ariaKeyShortcuts: null,\n ariaLabel: null,\n ariaLabelledBy: spaceSeparated,\n ariaLevel: number,\n ariaLive: null,\n ariaModal: booleanish,\n ariaMultiLine: booleanish,\n ariaMultiSelectable: booleanish,\n ariaOrientation: null,\n ariaOwns: spaceSeparated,\n ariaPlaceholder: null,\n ariaPosInSet: number,\n ariaPressed: booleanish,\n ariaReadOnly: booleanish,\n ariaRelevant: null,\n ariaRequired: booleanish,\n ariaRoleDescription: spaceSeparated,\n ariaRowCount: number,\n ariaRowIndex: number,\n ariaRowSpan: number,\n ariaSelected: booleanish,\n ariaSetSize: number,\n ariaSort: null,\n ariaValueMax: number,\n ariaValueMin: number,\n ariaValueNow: number,\n ariaValueText: null,\n role: null\n }\n})\n","import {\n boolean,\n overloadedBoolean,\n booleanish,\n number,\n spaceSeparated,\n commaSeparated\n} from './util/types.js'\nimport {create} from './util/create.js'\nimport {caseInsensitiveTransform} from './util/case-insensitive-transform.js'\n\nexport const html = create({\n space: 'html',\n attributes: {\n acceptcharset: 'accept-charset',\n classname: 'class',\n htmlfor: 'for',\n httpequiv: 'http-equiv'\n },\n transform: caseInsensitiveTransform,\n mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],\n properties: {\n // Standard Properties.\n abbr: null,\n accept: commaSeparated,\n acceptCharset: spaceSeparated,\n accessKey: spaceSeparated,\n action: null,\n allow: null,\n allowFullScreen: boolean,\n allowPaymentRequest: boolean,\n allowUserMedia: boolean,\n alt: null,\n as: null,\n async: boolean,\n autoCapitalize: null,\n autoComplete: spaceSeparated,\n autoFocus: boolean,\n autoPlay: boolean,\n blocking: spaceSeparated,\n capture: null,\n charSet: null,\n checked: boolean,\n cite: null,\n className: spaceSeparated,\n cols: number,\n colSpan: null,\n content: null,\n contentEditable: booleanish,\n controls: boolean,\n controlsList: spaceSeparated,\n coords: number | commaSeparated,\n crossOrigin: null,\n data: null,\n dateTime: null,\n decoding: null,\n default: boolean,\n defer: boolean,\n dir: null,\n dirName: null,\n disabled: boolean,\n download: overloadedBoolean,\n draggable: booleanish,\n encType: null,\n enterKeyHint: null,\n fetchPriority: null,\n form: null,\n formAction: null,\n formEncType: null,\n formMethod: null,\n formNoValidate: boolean,\n formTarget: null,\n headers: spaceSeparated,\n height: number,\n hidden: boolean,\n high: number,\n href: null,\n hrefLang: null,\n htmlFor: spaceSeparated,\n httpEquiv: spaceSeparated,\n id: null,\n imageSizes: null,\n imageSrcSet: null,\n inert: boolean,\n inputMode: null,\n integrity: null,\n is: null,\n isMap: boolean,\n itemId: null,\n itemProp: spaceSeparated,\n itemRef: spaceSeparated,\n itemScope: boolean,\n itemType: spaceSeparated,\n kind: null,\n label: null,\n lang: null,\n language: null,\n list: null,\n loading: null,\n loop: boolean,\n low: number,\n manifest: null,\n max: null,\n maxLength: number,\n media: null,\n method: null,\n min: null,\n minLength: number,\n multiple: boolean,\n muted: boolean,\n name: null,\n nonce: null,\n noModule: boolean,\n noValidate: boolean,\n onAbort: null,\n onAfterPrint: null,\n onAuxClick: null,\n onBeforeMatch: null,\n onBeforePrint: null,\n onBeforeToggle: null,\n onBeforeUnload: null,\n onBlur: null,\n onCancel: null,\n onCanPlay: null,\n onCanPlayThrough: null,\n onChange: null,\n onClick: null,\n onClose: null,\n onContextLost: null,\n onContextMenu: null,\n onContextRestored: null,\n onCopy: null,\n onCueChange: null,\n onCut: null,\n onDblClick: null,\n onDrag: null,\n onDragEnd: null,\n onDragEnter: null,\n onDragExit: null,\n onDragLeave: null,\n onDragOver: null,\n onDragStart: null,\n onDrop: null,\n onDurationChange: null,\n onEmptied: null,\n onEnded: null,\n onError: null,\n onFocus: null,\n onFormData: null,\n onHashChange: null,\n onInput: null,\n onInvalid: null,\n onKeyDown: null,\n onKeyPress: null,\n onKeyUp: null,\n onLanguageChange: null,\n onLoad: null,\n onLoadedData: null,\n onLoadedMetadata: null,\n onLoadEnd: null,\n onLoadStart: null,\n onMessage: null,\n onMessageError: null,\n onMouseDown: null,\n onMouseEnter: null,\n onMouseLeave: null,\n onMouseMove: null,\n onMouseOut: null,\n onMouseOver: null,\n onMouseUp: null,\n onOffline: null,\n onOnline: null,\n onPageHide: null,\n onPageShow: null,\n onPaste: null,\n onPause: null,\n onPlay: null,\n onPlaying: null,\n onPopState: null,\n onProgress: null,\n onRateChange: null,\n onRejectionHandled: null,\n onReset: null,\n onResize: null,\n onScroll: null,\n onScrollEnd: null,\n onSecurityPolicyViolation: null,\n onSeeked: null,\n onSeeking: null,\n onSelect: null,\n onSlotChange: null,\n onStalled: null,\n onStorage: null,\n onSubmit: null,\n onSuspend: null,\n onTimeUpdate: null,\n onToggle: null,\n onUnhandledRejection: null,\n onUnload: null,\n onVolumeChange: null,\n onWaiting: null,\n onWheel: null,\n open: boolean,\n optimum: number,\n pattern: null,\n ping: spaceSeparated,\n placeholder: null,\n playsInline: boolean,\n popover: null,\n popoverTarget: null,\n popoverTargetAction: null,\n poster: null,\n preload: null,\n readOnly: boolean,\n referrerPolicy: null,\n rel: spaceSeparated,\n required: boolean,\n reversed: boolean,\n rows: number,\n rowSpan: number,\n sandbox: spaceSeparated,\n scope: null,\n scoped: boolean,\n seamless: boolean,\n selected: boolean,\n shadowRootClonable: boolean,\n shadowRootDelegatesFocus: boolean,\n shadowRootMode: null,\n shape: null,\n size: number,\n sizes: null,\n slot: null,\n span: number,\n spellCheck: booleanish,\n src: null,\n srcDoc: null,\n srcLang: null,\n srcSet: null,\n start: number,\n step: null,\n style: null,\n tabIndex: number,\n target: null,\n title: null,\n translate: null,\n type: null,\n typeMustMatch: boolean,\n useMap: null,\n value: booleanish,\n width: number,\n wrap: null,\n writingSuggestions: null,\n\n // Legacy.\n // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis\n align: null, // Several. Use CSS `text-align` instead,\n aLink: null, // ``. Use CSS `a:active {color}` instead\n archive: spaceSeparated, // ``. List of URIs to archives\n axis: null, // `` and ``. Use `scope` on ``\n background: null, // ``. Use CSS `background-image` instead\n bgColor: null, // `` and table elements. Use CSS `background-color` instead\n border: number, // ``. Use CSS `border-width` instead,\n borderColor: null, // `
`. Use CSS `border-color` instead,\n bottomMargin: number, // ``\n cellPadding: null, // `
`\n cellSpacing: null, // `
`\n char: null, // Several table elements. When `align=char`, sets the character to align on\n charOff: null, // Several table elements. When `char`, offsets the alignment\n classId: null, // ``\n clear: null, // `
`. Use CSS `clear` instead\n code: null, // ``\n codeBase: null, // ``\n codeType: null, // ``\n color: null, // `` and `
`. Use CSS instead\n compact: boolean, // Lists. Use CSS to reduce space between items instead\n declare: boolean, // ``\n event: null, // `\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationRawTagOpen(code) {\n if (code === 47) {\n effects.consume(code);\n buffer = '';\n return continuationRawEndTag;\n }\n return continuation(code);\n }\n\n /**\n * In raw continuation, after ` | \n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function continuationRawEndTag(code) {\n if (code === 62) {\n const name = buffer.toLowerCase();\n if (htmlRawNames.includes(name)) {\n effects.consume(code);\n return continuationClose;\n }\n return continuation(code);\n }\n if (asciiAlpha(code) && buffer.length < 8) {\n // Always the case.\n effects.consume(code);\n buffer += String.fromCharCode(code);\n return continuationRawEndTag;\n }\n return continuation(code);\n }\n\n /**\n * In cdata continuation, after `]`, expecting `]>`.\n *\n * ```markdown\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCdataInside(code) {\n if (code === 93) {\n effects.consume(code);\n return continuationDeclarationInside;\n }\n return continuation(code);\n }\n\n /**\n * In declaration or instruction continuation, at `>`.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationDeclarationInside(code) {\n if (code === 62) {\n effects.consume(code);\n return continuationClose;\n }\n\n // More dashes.\n if (code === 45 && marker === 2) {\n effects.consume(code);\n return continuationDeclarationInside;\n }\n return continuation(code);\n }\n\n /**\n * In closed continuation: everything we get until the eol/eof is part of it.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationClose(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"htmlFlowData\");\n return continuationAfter(code);\n }\n effects.consume(code);\n return continuationClose;\n }\n\n /**\n * Done.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationAfter(code) {\n effects.exit(\"htmlFlow\");\n // // Feel free to interrupt.\n // tokenizer.interrupt = false\n // // No longer concrete.\n // tokenizer.concrete = false\n return ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuationStart(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * At eol, before continuation.\n *\n * ```markdown\n * > | * ```js\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * A continuation.\n *\n * ```markdown\n * | * ```js\n * > | b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLineBefore(effects, ok, nok) {\n return start;\n\n /**\n * Before eol, expecting blank line.\n *\n * ```markdown\n * > |
\n * ^\n * |\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return effects.attempt(blankLine, ok, nok);\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nconst nonLazyContinuation = {\n partial: true,\n tokenize: tokenizeNonLazyContinuation\n};\n\n/** @type {Construct} */\nexport const codeFenced = {\n concrete: true,\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCodeFenced(effects, ok, nok) {\n const self = this;\n /** @type {Construct} */\n const closeStart = {\n partial: true,\n tokenize: tokenizeCloseStart\n };\n let initialPrefix = 0;\n let sizeOpen = 0;\n /** @type {NonNullable} */\n let marker;\n return start;\n\n /**\n * Start of code.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse whitespace like `markdown-rs`.\n return beforeSequenceOpen(code);\n }\n\n /**\n * In opening fence, after prefix, at sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeSequenceOpen(code) {\n const tail = self.events[self.events.length - 1];\n initialPrefix = tail && tail[1].type === \"linePrefix\" ? tail[2].sliceSerialize(tail[1], true).length : 0;\n marker = code;\n effects.enter(\"codeFenced\");\n effects.enter(\"codeFencedFence\");\n effects.enter(\"codeFencedFenceSequence\");\n return sequenceOpen(code);\n }\n\n /**\n * In opening fence sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === marker) {\n sizeOpen++;\n effects.consume(code);\n return sequenceOpen;\n }\n if (sizeOpen < 3) {\n return nok(code);\n }\n effects.exit(\"codeFencedFenceSequence\");\n return markdownSpace(code) ? factorySpace(effects, infoBefore, \"whitespace\")(code) : infoBefore(code);\n }\n\n /**\n * In opening fence, after the sequence (and optional whitespace), before info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function infoBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFencedFence\");\n return self.interrupt ? ok(code) : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);\n }\n effects.enter(\"codeFencedFenceInfo\");\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return info(code);\n }\n\n /**\n * In info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function info(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"chunkString\");\n effects.exit(\"codeFencedFenceInfo\");\n return infoBefore(code);\n }\n if (markdownSpace(code)) {\n effects.exit(\"chunkString\");\n effects.exit(\"codeFencedFenceInfo\");\n return factorySpace(effects, metaBefore, \"whitespace\")(code);\n }\n if (code === 96 && code === marker) {\n return nok(code);\n }\n effects.consume(code);\n return info;\n }\n\n /**\n * In opening fence, after info and whitespace, before meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function metaBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return infoBefore(code);\n }\n effects.enter(\"codeFencedFenceMeta\");\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return meta(code);\n }\n\n /**\n * In meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function meta(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"chunkString\");\n effects.exit(\"codeFencedFenceMeta\");\n return infoBefore(code);\n }\n if (code === 96 && code === marker) {\n return nok(code);\n }\n effects.consume(code);\n return meta;\n }\n\n /**\n * At eol/eof in code, before a non-lazy closing fence or content.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function atNonLazyBreak(code) {\n return effects.attempt(closeStart, after, contentBefore)(code);\n }\n\n /**\n * Before code content, not a closing fence, at eol.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentBefore(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return contentStart;\n }\n\n /**\n * Before code content, not a closing fence.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentStart(code) {\n return initialPrefix > 0 && markdownSpace(code) ? factorySpace(effects, beforeContentChunk, \"linePrefix\", initialPrefix + 1)(code) : beforeContentChunk(code);\n }\n\n /**\n * Before code content, after optional prefix.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeContentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);\n }\n effects.enter(\"codeFlowValue\");\n return contentChunk(code);\n }\n\n /**\n * In code content.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^^^^^^^^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFlowValue\");\n return beforeContentChunk(code);\n }\n effects.consume(code);\n return contentChunk;\n }\n\n /**\n * After code.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n effects.exit(\"codeFenced\");\n return ok(code);\n }\n\n /**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\n function tokenizeCloseStart(effects, ok, nok) {\n let size = 0;\n return startBefore;\n\n /**\n *\n *\n * @type {State}\n */\n function startBefore(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return start;\n }\n\n /**\n * Before closing fence, at optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Always populated by defaults.\n\n // To do: `enter` here or in next state?\n effects.enter(\"codeFencedFence\");\n return markdownSpace(code) ? factorySpace(effects, beforeSequenceClose, \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code) : beforeSequenceClose(code);\n }\n\n /**\n * In closing fence, after optional whitespace, at sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function beforeSequenceClose(code) {\n if (code === marker) {\n effects.enter(\"codeFencedFenceSequence\");\n return sequenceClose(code);\n }\n return nok(code);\n }\n\n /**\n * In closing fence sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n if (code === marker) {\n size++;\n effects.consume(code);\n return sequenceClose;\n }\n if (size >= sizeOpen) {\n effects.exit(\"codeFencedFenceSequence\");\n return markdownSpace(code) ? factorySpace(effects, sequenceCloseAfter, \"whitespace\")(code) : sequenceCloseAfter(code);\n }\n return nok(code);\n }\n\n /**\n * After closing fence sequence, after optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceCloseAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFencedFence\");\n return ok(code);\n }\n return nok(code);\n }\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuation(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n *\n *\n * @type {State}\n */\n function start(code) {\n if (code === null) {\n return nok(code);\n }\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return lineStart;\n }\n\n /**\n *\n *\n * @type {State}\n */\n function lineStart(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code);\n }\n}","/// \n\n/* eslint-env browser */\n\nconst element = document.createElement('i')\n\n/**\n * @param {string} value\n * @returns {string|false}\n */\nexport function decodeNamedCharacterReference(value) {\n const characterReference = '&' + value + ';'\n element.innerHTML = characterReference\n const char = element.textContent\n\n // Some named character references do not require the closing semicolon\n // (`¬`, for instance), which leads to situations where parsing the assumed\n // named reference of `¬it;` will result in the string `¬it;`.\n // When we encounter a trailing semicolon after parsing, and the character\n // reference to decode was not a semicolon (`;`), we can assume that the\n // matching was not complete.\n // @ts-expect-error: TypeScript is wrong that `textContent` on elements can\n // yield `null`.\n if (char.charCodeAt(char.length - 1) === 59 /* `;` */ && value !== 'semi') {\n return false\n }\n\n // If the decoded string is equal to the input, the character reference was\n // not valid.\n // @ts-expect-error: TypeScript is wrong that `textContent` on elements can\n // yield `null`.\n return char === characterReference ? false : char\n}\n","/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { decodeNamedCharacterReference } from 'decode-named-character-reference';\nimport { asciiAlphanumeric, asciiDigit, asciiHexDigit } from 'micromark-util-character';\n/** @type {Construct} */\nexport const characterReference = {\n name: 'characterReference',\n tokenize: tokenizeCharacterReference\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterReference(effects, ok, nok) {\n const self = this;\n let size = 0;\n /** @type {number} */\n let max;\n /** @type {(code: Code) => boolean} */\n let test;\n return start;\n\n /**\n * Start of character reference.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"characterReference\");\n effects.enter(\"characterReferenceMarker\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarker\");\n return open;\n }\n\n /**\n * After `&`, at `#` for numeric references or alphanumeric for named\n * references.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 35) {\n effects.enter(\"characterReferenceMarkerNumeric\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarkerNumeric\");\n return numeric;\n }\n effects.enter(\"characterReferenceValue\");\n max = 31;\n test = asciiAlphanumeric;\n return value(code);\n }\n\n /**\n * After `#`, at `x` for hexadecimals or digit for decimals.\n *\n * ```markdown\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function numeric(code) {\n if (code === 88 || code === 120) {\n effects.enter(\"characterReferenceMarkerHexadecimal\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarkerHexadecimal\");\n effects.enter(\"characterReferenceValue\");\n max = 6;\n test = asciiHexDigit;\n return value;\n }\n effects.enter(\"characterReferenceValue\");\n max = 7;\n test = asciiDigit;\n return value(code);\n }\n\n /**\n * After markers (`&#x`, `&#`, or `&`), in value, before `;`.\n *\n * The character reference kind defines what and how many characters are\n * allowed.\n *\n * ```markdown\n * > | a&b\n * ^^^\n * > | a{b\n * ^^^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function value(code) {\n if (code === 59 && size) {\n const token = effects.exit(\"characterReferenceValue\");\n if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self.sliceSerialize(token))) {\n return nok(code);\n }\n\n // To do: `markdown-rs` uses a different name:\n // `CharacterReferenceMarkerSemi`.\n effects.enter(\"characterReferenceMarker\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarker\");\n effects.exit(\"characterReference\");\n return ok;\n }\n if (test(code) && size++ < max) {\n effects.consume(code);\n return value;\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { asciiPunctuation } from 'micromark-util-character';\n/** @type {Construct} */\nexport const characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterEscape(effects, ok, nok) {\n return start;\n\n /**\n * Start of character escape.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"characterEscape\");\n effects.enter(\"escapeMarker\");\n effects.consume(code);\n effects.exit(\"escapeMarker\");\n return inside;\n }\n\n /**\n * After `\\`, at punctuation.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // ASCII punctuation.\n if (asciiPunctuation(code)) {\n effects.enter(\"characterEscapeValue\");\n effects.consume(code);\n effects.exit(\"characterEscapeValue\");\n effects.exit(\"characterEscape\");\n return ok;\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const lineEnding = {\n name: 'lineEnding',\n tokenize: tokenizeLineEnding\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLineEnding(effects, ok) {\n return start;\n\n /** @type {State} */\n function start(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return factorySpace(effects, ok, \"linePrefix\");\n }\n}","/**\n * @import {Event, Resolver, TokenizeContext} from 'micromark-util-types'\n */\n\n/**\n * Call all `resolveAll`s.\n *\n * @param {ReadonlyArray<{resolveAll?: Resolver | undefined}>} constructs\n * List of constructs, optionally with `resolveAll`s.\n * @param {Array} events\n * List of events.\n * @param {TokenizeContext} context\n * Context used by `tokenize`.\n * @returns {Array}\n * Changed events.\n */\nexport function resolveAll(constructs, events, context) {\n /** @type {Array} */\n const called = []\n let index = -1\n\n while (++index < constructs.length) {\n const resolve = constructs[index].resolveAll\n\n if (resolve && !called.includes(resolve)) {\n events = resolve(events, context)\n called.push(resolve)\n }\n }\n\n return events\n}\n","/**\n * @import {\n * Construct,\n * Event,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { factoryDestination } from 'micromark-factory-destination';\nimport { factoryLabel } from 'micromark-factory-label';\nimport { factoryTitle } from 'micromark-factory-title';\nimport { factoryWhitespace } from 'micromark-factory-whitespace';\nimport { markdownLineEndingOrSpace } from 'micromark-util-character';\nimport { push, splice } from 'micromark-util-chunked';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n resolveAll: resolveAllLabelEnd,\n resolveTo: resolveToLabelEnd,\n tokenize: tokenizeLabelEnd\n};\n\n/** @type {Construct} */\nconst resourceConstruct = {\n tokenize: tokenizeResource\n};\n/** @type {Construct} */\nconst referenceFullConstruct = {\n tokenize: tokenizeReferenceFull\n};\n/** @type {Construct} */\nconst referenceCollapsedConstruct = {\n tokenize: tokenizeReferenceCollapsed\n};\n\n/** @type {Resolver} */\nfunction resolveAllLabelEnd(events) {\n let index = -1;\n /** @type {Array} */\n const newEvents = [];\n while (++index < events.length) {\n const token = events[index][1];\n newEvents.push(events[index]);\n if (token.type === \"labelImage\" || token.type === \"labelLink\" || token.type === \"labelEnd\") {\n // Remove the marker.\n const offset = token.type === \"labelImage\" ? 4 : 2;\n token.type = \"data\";\n index += offset;\n }\n }\n\n // If the events are equal, we don't have to copy newEvents to events\n if (events.length !== newEvents.length) {\n splice(events, 0, events.length, newEvents);\n }\n return events;\n}\n\n/** @type {Resolver} */\nfunction resolveToLabelEnd(events, context) {\n let index = events.length;\n let offset = 0;\n /** @type {Token} */\n let token;\n /** @type {number | undefined} */\n let open;\n /** @type {number | undefined} */\n let close;\n /** @type {Array} */\n let media;\n\n // Find an opening.\n while (index--) {\n token = events[index][1];\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (token.type === \"link\" || token.type === \"labelLink\" && token._inactive) {\n break;\n }\n\n // Mark other link openings as inactive, as we can’t have links in\n // links.\n if (events[index][0] === 'enter' && token.type === \"labelLink\") {\n token._inactive = true;\n }\n } else if (close) {\n if (events[index][0] === 'enter' && (token.type === \"labelImage\" || token.type === \"labelLink\") && !token._balanced) {\n open = index;\n if (token.type !== \"labelLink\") {\n offset = 2;\n break;\n }\n }\n } else if (token.type === \"labelEnd\") {\n close = index;\n }\n }\n const group = {\n type: events[open][1].type === \"labelLink\" ? \"link\" : \"image\",\n start: {\n ...events[open][1].start\n },\n end: {\n ...events[events.length - 1][1].end\n }\n };\n const label = {\n type: \"label\",\n start: {\n ...events[open][1].start\n },\n end: {\n ...events[close][1].end\n }\n };\n const text = {\n type: \"labelText\",\n start: {\n ...events[open + offset + 2][1].end\n },\n end: {\n ...events[close - 2][1].start\n }\n };\n media = [['enter', group, context], ['enter', label, context]];\n\n // Opening marker.\n media = push(media, events.slice(open + 1, open + offset + 3));\n\n // Text open.\n media = push(media, [['enter', text, context]]);\n\n // Always populated by defaults.\n\n // Between.\n media = push(media, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + offset + 4, close - 3), context));\n\n // Text close, marker close, label close.\n media = push(media, [['exit', text, context], events[close - 2], events[close - 1], ['exit', label, context]]);\n\n // Reference, resource, or so.\n media = push(media, events.slice(close + 1));\n\n // Media close.\n media = push(media, [['exit', group, context]]);\n splice(events, open, events.length, media);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this;\n let index = self.events.length;\n /** @type {Token} */\n let labelStart;\n /** @type {boolean} */\n let defined;\n\n // Find an opening.\n while (index--) {\n if ((self.events[index][1].type === \"labelImage\" || self.events[index][1].type === \"labelLink\") && !self.events[index][1]._balanced) {\n labelStart = self.events[index][1];\n break;\n }\n }\n return start;\n\n /**\n * Start of label end.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // If there is not an okay opening.\n if (!labelStart) {\n return nok(code);\n }\n\n // If the corresponding label (link) start is marked as inactive,\n // it means we’d be wrapping a link, like this:\n //\n // ```markdown\n // > | a [b [c](d) e](f) g.\n // ^\n // ```\n //\n // We can’t have that, so it’s just balanced brackets.\n if (labelStart._inactive) {\n return labelEndNok(code);\n }\n defined = self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })));\n effects.enter(\"labelEnd\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelEnd\");\n return after;\n }\n\n /**\n * After `]`.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Note: `markdown-rs` also parses GFM footnotes here, which for us is in\n // an extension.\n\n // Resource (`[asd](fgh)`)?\n if (code === 40) {\n return effects.attempt(resourceConstruct, labelEndOk, defined ? labelEndOk : labelEndNok)(code);\n }\n\n // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?\n if (code === 91) {\n return effects.attempt(referenceFullConstruct, labelEndOk, defined ? referenceNotFull : labelEndNok)(code);\n }\n\n // Shortcut (`[asd]`) reference?\n return defined ? labelEndOk(code) : labelEndNok(code);\n }\n\n /**\n * After `]`, at `[`, but not at a full reference.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceNotFull(code) {\n return effects.attempt(referenceCollapsedConstruct, labelEndOk, labelEndNok)(code);\n }\n\n /**\n * Done, we found something.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndOk(code) {\n // Note: `markdown-rs` does a bunch of stuff here.\n return ok(code);\n }\n\n /**\n * Done, it’s nothing.\n *\n * There was an okay opening, but we didn’t match anything.\n *\n * ```markdown\n * > | [a](b c\n * ^\n * > | [a][b c\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndNok(code) {\n labelStart._balanced = true;\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeResource(effects, ok, nok) {\n return resourceStart;\n\n /**\n * At a resource.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceStart(code) {\n effects.enter(\"resource\");\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n return resourceBefore;\n }\n\n /**\n * In resource, after `(`, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBefore(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code);\n }\n\n /**\n * In resource, after optional whitespace, at `)` or a destination.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceOpen(code) {\n if (code === 41) {\n return resourceEnd(code);\n }\n return factoryDestination(effects, resourceDestinationAfter, resourceDestinationMissing, \"resourceDestination\", \"resourceDestinationLiteral\", \"resourceDestinationLiteralMarker\", \"resourceDestinationRaw\", \"resourceDestinationString\", 32)(code);\n }\n\n /**\n * In resource, after destination, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code);\n }\n\n /**\n * At invalid destination.\n *\n * ```markdown\n * > | [a](<<) b\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationMissing(code) {\n return nok(code);\n }\n\n /**\n * In resource, after destination and whitespace, at `(` or title.\n *\n * ```markdown\n * > | [a](b ) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBetween(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(effects, resourceTitleAfter, nok, \"resourceTitle\", \"resourceTitleMarker\", \"resourceTitleString\")(code);\n }\n return resourceEnd(code);\n }\n\n /**\n * In resource, after title, at optional whitespace.\n *\n * ```markdown\n * > | [a](b \"c\") d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceTitleAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code);\n }\n\n /**\n * In resource, at `)`.\n *\n * ```markdown\n * > | [a](b) d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceEnd(code) {\n if (code === 41) {\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n effects.exit(\"resource\");\n return ok;\n }\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceFull(effects, ok, nok) {\n const self = this;\n return referenceFull;\n\n /**\n * In a reference (full), at the `[`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFull(code) {\n return factoryLabel.call(self, effects, referenceFullAfter, referenceFullMissing, \"reference\", \"referenceMarker\", \"referenceString\")(code);\n }\n\n /**\n * In a reference (full), after `]`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullAfter(code) {\n return self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1))) ? ok(code) : nok(code);\n }\n\n /**\n * In reference (full) that was missing.\n *\n * ```markdown\n * > | [a][b d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullMissing(code) {\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceCollapsed(effects, ok, nok) {\n return referenceCollapsedStart;\n\n /**\n * In reference (collapsed), at `[`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedStart(code) {\n // We only attempt a collapsed label if there’s a `[`.\n\n effects.enter(\"reference\");\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n return referenceCollapsedOpen;\n }\n\n /**\n * In reference (collapsed), at `]`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedOpen(code) {\n if (code === 93) {\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n effects.exit(\"reference\");\n return ok;\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartImage\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelImage\");\n effects.enter(\"labelImageMarker\");\n effects.consume(code);\n effects.exit(\"labelImageMarker\");\n return open;\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 91) {\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelImage\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * ![^a](b)\n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n *

!^a

\n *

!^a

\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs ? nok(code) : ok(code);\n }\n}","/**\n * @import {Code} from 'micromark-util-types'\n */\n\nimport { markdownLineEndingOrSpace, unicodePunctuation, unicodeWhitespace } from 'micromark-util-character';\n/**\n * Classify whether a code represents whitespace, punctuation, or something\n * else.\n *\n * Used for attention (emphasis, strong), whose sequences can open or close\n * based on the class of surrounding characters.\n *\n * > 👉 **Note**: eof (`null`) is seen as whitespace.\n *\n * @param {Code} code\n * Code.\n * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}\n * Group.\n */\nexport function classifyCharacter(code) {\n if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return 1;\n }\n if (unicodePunctuation(code)) {\n return 2;\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * Event,\n * Point,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { push, splice } from 'micromark-util-chunked';\nimport { classifyCharacter } from 'micromark-util-classify-character';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/** @type {Construct} */\nexport const attention = {\n name: 'attention',\n resolveAll: resolveAllAttention,\n tokenize: tokenizeAttention\n};\n\n/**\n * Take all events and resolve attention to emphasis or strong.\n *\n * @type {Resolver}\n */\n// eslint-disable-next-line complexity\nfunction resolveAllAttention(events, context) {\n let index = -1;\n /** @type {number} */\n let open;\n /** @type {Token} */\n let group;\n /** @type {Token} */\n let text;\n /** @type {Token} */\n let openingSequence;\n /** @type {Token} */\n let closingSequence;\n /** @type {number} */\n let use;\n /** @type {Array} */\n let nextEvents;\n /** @type {number} */\n let offset;\n\n // Walk through all events.\n //\n // Note: performance of this is fine on an mb of normal markdown, but it’s\n // a bottleneck for malicious stuff.\n while (++index < events.length) {\n // Find a token that can close.\n if (events[index][0] === 'enter' && events[index][1].type === 'attentionSequence' && events[index][1]._close) {\n open = index;\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (events[open][0] === 'exit' && events[open][1].type === 'attentionSequence' && events[open][1]._open &&\n // If the markers are the same:\n context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) {\n // If the opening can close or the closing can open,\n // and the close size *is not* a multiple of three,\n // but the sum of the opening and closing size *is* multiple of three,\n // then don’t match.\n if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) {\n continue;\n }\n\n // Number of markers to use from the sequence.\n use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1;\n const start = {\n ...events[open][1].end\n };\n const end = {\n ...events[index][1].start\n };\n movePoint(start, -use);\n movePoint(end, use);\n openingSequence = {\n type: use > 1 ? \"strongSequence\" : \"emphasisSequence\",\n start,\n end: {\n ...events[open][1].end\n }\n };\n closingSequence = {\n type: use > 1 ? \"strongSequence\" : \"emphasisSequence\",\n start: {\n ...events[index][1].start\n },\n end\n };\n text = {\n type: use > 1 ? \"strongText\" : \"emphasisText\",\n start: {\n ...events[open][1].end\n },\n end: {\n ...events[index][1].start\n }\n };\n group = {\n type: use > 1 ? \"strong\" : \"emphasis\",\n start: {\n ...openingSequence.start\n },\n end: {\n ...closingSequence.end\n }\n };\n events[open][1].end = {\n ...openingSequence.start\n };\n events[index][1].start = {\n ...closingSequence.end\n };\n nextEvents = [];\n\n // If there are more markers in the opening, add them before.\n if (events[open][1].end.offset - events[open][1].start.offset) {\n nextEvents = push(nextEvents, [['enter', events[open][1], context], ['exit', events[open][1], context]]);\n }\n\n // Opening.\n nextEvents = push(nextEvents, [['enter', group, context], ['enter', openingSequence, context], ['exit', openingSequence, context], ['enter', text, context]]);\n\n // Always populated by defaults.\n\n // Between.\n nextEvents = push(nextEvents, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + 1, index), context));\n\n // Closing.\n nextEvents = push(nextEvents, [['exit', text, context], ['enter', closingSequence, context], ['exit', closingSequence, context], ['exit', group, context]]);\n\n // If there are more markers in the closing, add them after.\n if (events[index][1].end.offset - events[index][1].start.offset) {\n offset = 2;\n nextEvents = push(nextEvents, [['enter', events[index][1], context], ['exit', events[index][1], context]]);\n } else {\n offset = 0;\n }\n splice(events, open - 1, index - open + 3, nextEvents);\n index = open + nextEvents.length - offset - 2;\n break;\n }\n }\n }\n }\n\n // Remove remaining sequences.\n index = -1;\n while (++index < events.length) {\n if (events[index][1].type === 'attentionSequence') {\n events[index][1].type = 'data';\n }\n }\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeAttention(effects, ok) {\n const attentionMarkers = this.parser.constructs.attentionMarkers.null;\n const previous = this.previous;\n const before = classifyCharacter(previous);\n\n /** @type {NonNullable} */\n let marker;\n return start;\n\n /**\n * Before a sequence.\n *\n * ```markdown\n * > | **\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n marker = code;\n effects.enter('attentionSequence');\n return inside(code);\n }\n\n /**\n * In a sequence.\n *\n * ```markdown\n * > | **\n * ^^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code);\n return inside;\n }\n const token = effects.exit('attentionSequence');\n\n // To do: next major: move this to resolver, just like `markdown-rs`.\n const after = classifyCharacter(code);\n\n // Always populated by defaults.\n\n const open = !after || after === 2 && before || attentionMarkers.includes(code);\n const close = !before || before === 2 && after || attentionMarkers.includes(previous);\n token._open = Boolean(marker === 42 ? open : open && (before || !close));\n token._close = Boolean(marker === 42 ? close : close && (after || !open));\n return ok(code);\n }\n}\n\n/**\n * Move a point a bit.\n *\n * Note: `move` only works inside lines! It’s not possible to move past other\n * chunks (replacement characters, tabs, or line endings).\n *\n * @param {Point} point\n * Point.\n * @param {number} offset\n * Amount to move.\n * @returns {undefined}\n * Nothing.\n */\nfunction movePoint(point, offset) {\n point.column += offset;\n point.offset += offset;\n point._bufferIndex += offset;\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { asciiAlphanumeric, asciiAlpha, asciiAtext, asciiControl } from 'micromark-util-character';\n/** @type {Construct} */\nexport const autolink = {\n name: 'autolink',\n tokenize: tokenizeAutolink\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeAutolink(effects, ok, nok) {\n let size = 0;\n return start;\n\n /**\n * Start of an autolink.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"autolink\");\n effects.enter(\"autolinkMarker\");\n effects.consume(code);\n effects.exit(\"autolinkMarker\");\n effects.enter(\"autolinkProtocol\");\n return open;\n }\n\n /**\n * After `<`, at protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (asciiAlpha(code)) {\n effects.consume(code);\n return schemeOrEmailAtext;\n }\n if (code === 64) {\n return nok(code);\n }\n return emailAtext(code);\n }\n\n /**\n * At second byte of protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeOrEmailAtext(code) {\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {\n // Count the previous alphabetical from `open` too.\n size = 1;\n return schemeInsideOrEmailAtext(code);\n }\n return emailAtext(code);\n }\n\n /**\n * In ambiguous protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeInsideOrEmailAtext(code) {\n if (code === 58) {\n effects.consume(code);\n size = 0;\n return urlInside;\n }\n\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size++ < 32) {\n effects.consume(code);\n return schemeInsideOrEmailAtext;\n }\n size = 0;\n return emailAtext(code);\n }\n\n /**\n * After protocol, in URL.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function urlInside(code) {\n if (code === 62) {\n effects.exit(\"autolinkProtocol\");\n effects.enter(\"autolinkMarker\");\n effects.consume(code);\n effects.exit(\"autolinkMarker\");\n effects.exit(\"autolink\");\n return ok;\n }\n\n // ASCII control, space, or `<`.\n if (code === null || code === 32 || code === 60 || asciiControl(code)) {\n return nok(code);\n }\n effects.consume(code);\n return urlInside;\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailAtext(code) {\n if (code === 64) {\n effects.consume(code);\n return emailAtSignOrDot;\n }\n if (asciiAtext(code)) {\n effects.consume(code);\n return emailAtext;\n }\n return nok(code);\n }\n\n /**\n * In label, after at-sign or dot.\n *\n * ```markdown\n * > | ab\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function emailAtSignOrDot(code) {\n return asciiAlphanumeric(code) ? emailLabel(code) : nok(code);\n }\n\n /**\n * In label, where `.` and `>` are allowed.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailLabel(code) {\n if (code === 46) {\n effects.consume(code);\n size = 0;\n return emailAtSignOrDot;\n }\n if (code === 62) {\n // Exit, then change the token type.\n effects.exit(\"autolinkProtocol\").type = \"autolinkEmail\";\n effects.enter(\"autolinkMarker\");\n effects.consume(code);\n effects.exit(\"autolinkMarker\");\n effects.exit(\"autolink\");\n return ok;\n }\n return emailValue(code);\n }\n\n /**\n * In label, where `.` and `>` are *not* allowed.\n *\n * Though, this is also used in `emailLabel` to parse other values.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailValue(code) {\n // ASCII alphanumeric or `-`.\n if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {\n const next = code === 45 ? emailValue : emailLabel;\n effects.consume(code);\n return next;\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { asciiAlphanumeric, asciiAlpha, markdownLineEndingOrSpace, markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlText(effects, ok, nok) {\n const self = this;\n /** @type {NonNullable | undefined} */\n let marker;\n /** @type {number} */\n let index;\n /** @type {State} */\n let returnState;\n return start;\n\n /**\n * Start of HTML (text).\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"htmlText\");\n effects.enter(\"htmlTextData\");\n effects.consume(code);\n return open;\n }\n\n /**\n * After `<`, at tag name or other stuff.\n *\n * ```markdown\n * > | a c\n * ^\n * > | a c\n * ^\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code);\n return declarationOpen;\n }\n if (code === 47) {\n effects.consume(code);\n return tagCloseStart;\n }\n if (code === 63) {\n effects.consume(code);\n return instruction;\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code);\n return tagOpen;\n }\n return nok(code);\n }\n\n /**\n * After ` | a c\n * ^\n * > | a c\n * ^\n * > | a &<]]> c\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code);\n return commentOpenInside;\n }\n if (code === 91) {\n effects.consume(code);\n index = 0;\n return cdataOpenInside;\n }\n if (asciiAlpha(code)) {\n effects.consume(code);\n return declaration;\n }\n return nok(code);\n }\n\n /**\n * In a comment, after ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code);\n return commentEnd;\n }\n return nok(code);\n }\n\n /**\n * In comment.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function comment(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === 45) {\n effects.consume(code);\n return commentClose;\n }\n if (markdownLineEnding(code)) {\n returnState = comment;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return comment;\n }\n\n /**\n * In comment, after `-`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentClose(code) {\n if (code === 45) {\n effects.consume(code);\n return commentEnd;\n }\n return comment(code);\n }\n\n /**\n * In comment, after `--`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentEnd(code) {\n return code === 62 ? end(code) : code === 45 ? commentClose(code) : comment(code);\n }\n\n /**\n * After ` | a &<]]> b\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = \"CDATA[\";\n if (code === value.charCodeAt(index++)) {\n effects.consume(code);\n return index === value.length ? cdata : cdataOpenInside;\n }\n return nok(code);\n }\n\n /**\n * In CDATA.\n *\n * ```markdown\n * > | a &<]]> b\n * ^^^\n * ```\n *\n * @type {State}\n */\n function cdata(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === 93) {\n effects.consume(code);\n return cdataClose;\n }\n if (markdownLineEnding(code)) {\n returnState = cdata;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return cdata;\n }\n\n /**\n * In CDATA, after `]`, at another `]`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataClose(code) {\n if (code === 93) {\n effects.consume(code);\n return cdataEnd;\n }\n return cdata(code);\n }\n\n /**\n * In CDATA, after `]]`, at `>`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataEnd(code) {\n if (code === 62) {\n return end(code);\n }\n if (code === 93) {\n effects.consume(code);\n return cdataEnd;\n }\n return cdata(code);\n }\n\n /**\n * In declaration.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function declaration(code) {\n if (code === null || code === 62) {\n return end(code);\n }\n if (markdownLineEnding(code)) {\n returnState = declaration;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return declaration;\n }\n\n /**\n * In instruction.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instruction(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === 63) {\n effects.consume(code);\n return instructionClose;\n }\n if (markdownLineEnding(code)) {\n returnState = instruction;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return instruction;\n }\n\n /**\n * In instruction, after `?`, at `>`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instructionClose(code) {\n return code === 62 ? end(code) : instruction(code);\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code);\n return tagClose;\n }\n return nok(code);\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagClose(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return tagClose;\n }\n return tagCloseBetween(code);\n }\n\n /**\n * In closing tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseBetween(code) {\n if (markdownLineEnding(code)) {\n returnState = tagCloseBetween;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagCloseBetween;\n }\n return end(code);\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpen(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return tagOpen;\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code);\n }\n return nok(code);\n }\n\n /**\n * In opening tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenBetween(code) {\n if (code === 47) {\n effects.consume(code);\n return end;\n }\n\n // ASCII alphabetical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code);\n return tagOpenAttributeName;\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenBetween;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagOpenBetween;\n }\n return end(code);\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeName(code) {\n // ASCII alphabetical and `-`, `.`, `:`, and `_`.\n if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return tagOpenAttributeName;\n }\n return tagOpenAttributeNameAfter(code);\n }\n\n /**\n * After attribute name, before initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code);\n return tagOpenAttributeValueBefore;\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeNameAfter;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagOpenAttributeNameAfter;\n }\n return tagOpenBetween(code);\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueBefore(code) {\n if (code === null || code === 60 || code === 61 || code === 62 || code === 96) {\n return nok(code);\n }\n if (code === 34 || code === 39) {\n effects.consume(code);\n marker = code;\n return tagOpenAttributeValueQuoted;\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueBefore;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagOpenAttributeValueBefore;\n }\n effects.consume(code);\n return tagOpenAttributeValueUnquoted;\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code);\n marker = undefined;\n return tagOpenAttributeValueQuotedAfter;\n }\n if (code === null) {\n return nok(code);\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueQuoted;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return tagOpenAttributeValueQuoted;\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueUnquoted(code) {\n if (code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 96) {\n return nok(code);\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code);\n }\n effects.consume(code);\n return tagOpenAttributeValueUnquoted;\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the end\n * of the tag.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code);\n }\n return nok(code);\n }\n\n /**\n * In certain circumstances of a tag where only an `>` is allowed.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function end(code) {\n if (code === 62) {\n effects.consume(code);\n effects.exit(\"htmlTextData\");\n effects.exit(\"htmlText\");\n return ok;\n }\n return nok(code);\n }\n\n /**\n * At eol.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * > | a \n * ```\n *\n * @type {State}\n */\n function lineEndingBefore(code) {\n effects.exit(\"htmlTextData\");\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return lineEndingAfter;\n }\n\n /**\n * After eol, at optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfter(code) {\n // Always populated by defaults.\n\n return markdownSpace(code) ? factorySpace(effects, lineEndingAfterPrefix, \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code) : lineEndingAfterPrefix(code);\n }\n\n /**\n * After eol, after optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfterPrefix(code) {\n effects.enter(\"htmlTextData\");\n return returnState(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartLink\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of label (link) start.\n *\n * ```markdown\n * > | a [b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelLink\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelLink\");\n return after;\n }\n\n /** @type {State} */\n function after(code) {\n // To do: this isn’t needed in `micromark-extension-gfm-footnote`,\n // remove.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs ? nok(code) : ok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const hardBreakEscape = {\n name: 'hardBreakEscape',\n tokenize: tokenizeHardBreakEscape\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeHardBreakEscape(effects, ok, nok) {\n return start;\n\n /**\n * Start of a hard break (escape).\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"hardBreakEscape\");\n effects.consume(code);\n return after;\n }\n\n /**\n * After `\\`, at eol.\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (markdownLineEnding(code)) {\n effects.exit(\"hardBreakEscape\");\n return ok(code);\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * Previous,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const codeText = {\n name: 'codeText',\n previous,\n resolve: resolveCodeText,\n tokenize: tokenizeCodeText\n};\n\n// To do: next major: don’t resolve, like `markdown-rs`.\n/** @type {Resolver} */\nfunction resolveCodeText(events) {\n let tailExitIndex = events.length - 4;\n let headEnterIndex = 3;\n /** @type {number} */\n let index;\n /** @type {number | undefined} */\n let enter;\n\n // If we start and end with an EOL or a space.\n if ((events[headEnterIndex][1].type === \"lineEnding\" || events[headEnterIndex][1].type === 'space') && (events[tailExitIndex][1].type === \"lineEnding\" || events[tailExitIndex][1].type === 'space')) {\n index = headEnterIndex;\n\n // And we have data.\n while (++index < tailExitIndex) {\n if (events[index][1].type === \"codeTextData\") {\n // Then we have padding.\n events[headEnterIndex][1].type = \"codeTextPadding\";\n events[tailExitIndex][1].type = \"codeTextPadding\";\n headEnterIndex += 2;\n tailExitIndex -= 2;\n break;\n }\n }\n }\n\n // Merge adjacent spaces and data.\n index = headEnterIndex - 1;\n tailExitIndex++;\n while (++index <= tailExitIndex) {\n if (enter === undefined) {\n if (index !== tailExitIndex && events[index][1].type !== \"lineEnding\") {\n enter = index;\n }\n } else if (index === tailExitIndex || events[index][1].type === \"lineEnding\") {\n events[enter][1].type = \"codeTextData\";\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end;\n events.splice(enter + 2, index - enter - 2);\n tailExitIndex -= index - enter - 2;\n index = enter + 2;\n }\n enter = undefined;\n }\n }\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Previous}\n */\nfunction previous(code) {\n // If there is a previous code, there will always be a tail.\n return code !== 96 || this.events[this.events.length - 1][1].type === \"characterEscape\";\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCodeText(effects, ok, nok) {\n const self = this;\n let sizeOpen = 0;\n /** @type {number} */\n let size;\n /** @type {Token} */\n let token;\n return start;\n\n /**\n * Start of code (text).\n *\n * ```markdown\n * > | `a`\n * ^\n * > | \\`a`\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"codeText\");\n effects.enter(\"codeTextSequence\");\n return sequenceOpen(code);\n }\n\n /**\n * In opening sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === 96) {\n effects.consume(code);\n sizeOpen++;\n return sequenceOpen;\n }\n effects.exit(\"codeTextSequence\");\n return between(code);\n }\n\n /**\n * Between something and something else.\n *\n * ```markdown\n * > | `a`\n * ^^\n * ```\n *\n * @type {State}\n */\n function between(code) {\n // EOF.\n if (code === null) {\n return nok(code);\n }\n\n // To do: next major: don’t do spaces in resolve, but when compiling,\n // like `markdown-rs`.\n // Tabs don’t work, and virtual spaces don’t make sense.\n if (code === 32) {\n effects.enter('space');\n effects.consume(code);\n effects.exit('space');\n return between;\n }\n\n // Closing fence? Could also be data.\n if (code === 96) {\n token = effects.enter(\"codeTextSequence\");\n size = 0;\n return sequenceClose(code);\n }\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return between;\n }\n\n // Data.\n effects.enter(\"codeTextData\");\n return data(code);\n }\n\n /**\n * In data.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function data(code) {\n if (code === null || code === 32 || code === 96 || markdownLineEnding(code)) {\n effects.exit(\"codeTextData\");\n return between(code);\n }\n effects.consume(code);\n return data;\n }\n\n /**\n * In closing sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n // More.\n if (code === 96) {\n effects.consume(code);\n size++;\n return sequenceClose;\n }\n\n // Done!\n if (size === sizeOpen) {\n effects.exit(\"codeTextSequence\");\n effects.exit(\"codeText\");\n return ok(code);\n }\n\n // More or less accents: mark as data.\n token.type = \"codeTextData\";\n return data(code);\n }\n}","/**\n * @import {Extension} from 'micromark-util-types'\n */\n\nimport { attention, autolink, blockQuote, characterEscape, characterReference, codeFenced, codeIndented, codeText, definition, hardBreakEscape, headingAtx, htmlFlow, htmlText, labelEnd, labelStartImage, labelStartLink, lineEnding, list, setextUnderline, thematicBreak } from 'micromark-core-commonmark';\nimport { resolver as resolveText } from './initialize/text.js';\n\n/** @satisfies {Extension['document']} */\nexport const document = {\n [42]: list,\n [43]: list,\n [45]: list,\n [48]: list,\n [49]: list,\n [50]: list,\n [51]: list,\n [52]: list,\n [53]: list,\n [54]: list,\n [55]: list,\n [56]: list,\n [57]: list,\n [62]: blockQuote\n};\n\n/** @satisfies {Extension['contentInitial']} */\nexport const contentInitial = {\n [91]: definition\n};\n\n/** @satisfies {Extension['flowInitial']} */\nexport const flowInitial = {\n [-2]: codeIndented,\n [-1]: codeIndented,\n [32]: codeIndented\n};\n\n/** @satisfies {Extension['flow']} */\nexport const flow = {\n [35]: headingAtx,\n [42]: thematicBreak,\n [45]: [setextUnderline, thematicBreak],\n [60]: htmlFlow,\n [61]: setextUnderline,\n [95]: thematicBreak,\n [96]: codeFenced,\n [126]: codeFenced\n};\n\n/** @satisfies {Extension['string']} */\nexport const string = {\n [38]: characterReference,\n [92]: characterEscape\n};\n\n/** @satisfies {Extension['text']} */\nexport const text = {\n [-5]: lineEnding,\n [-4]: lineEnding,\n [-3]: lineEnding,\n [33]: labelStartImage,\n [38]: characterReference,\n [42]: attention,\n [60]: [autolink, htmlText],\n [91]: labelStartLink,\n [92]: [hardBreakEscape, characterEscape],\n [93]: labelEnd,\n [95]: attention,\n [96]: codeText\n};\n\n/** @satisfies {Extension['insideSpan']} */\nexport const insideSpan = {\n null: [attention, resolveText]\n};\n\n/** @satisfies {Extension['attentionMarkers']} */\nexport const attentionMarkers = {\n null: [42, 95]\n};\n\n/** @satisfies {Extension['disable']} */\nexport const disable = {\n null: []\n};","/**\n * @import {\n * Chunk,\n * Code,\n * ConstructRecord,\n * Construct,\n * Effects,\n * InitialConstruct,\n * ParseContext,\n * Point,\n * State,\n * TokenizeContext,\n * Token\n * } from 'micromark-util-types'\n */\n\n/**\n * @callback Restore\n * Restore the state.\n * @returns {undefined}\n * Nothing.\n *\n * @typedef Info\n * Info.\n * @property {Restore} restore\n * Restore.\n * @property {number} from\n * From.\n *\n * @callback ReturnHandle\n * Handle a successful run.\n * @param {Construct} construct\n * Construct.\n * @param {Info} info\n * Info.\n * @returns {undefined}\n * Nothing.\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\nimport { push, splice } from 'micromark-util-chunked';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/**\n * Create a tokenizer.\n * Tokenizers deal with one type of data (e.g., containers, flow, text).\n * The parser is the object dealing with it all.\n * `initialize` works like other constructs, except that only its `tokenize`\n * function is used, in which case it doesn’t receive an `ok` or `nok`.\n * `from` can be given to set the point before the first character, although\n * when further lines are indented, they must be set with `defineSkip`.\n *\n * @param {ParseContext} parser\n * Parser.\n * @param {InitialConstruct} initialize\n * Construct.\n * @param {Omit | undefined} [from]\n * Point (optional).\n * @returns {TokenizeContext}\n * Context.\n */\nexport function createTokenizer(parser, initialize, from) {\n /** @type {Point} */\n let point = {\n _bufferIndex: -1,\n _index: 0,\n line: from && from.line || 1,\n column: from && from.column || 1,\n offset: from && from.offset || 0\n };\n /** @type {Record} */\n const columnStart = {};\n /** @type {Array} */\n const resolveAllConstructs = [];\n /** @type {Array} */\n let chunks = [];\n /** @type {Array} */\n let stack = [];\n /** @type {boolean | undefined} */\n let consumed = true;\n\n /**\n * Tools used for tokenizing.\n *\n * @type {Effects}\n */\n const effects = {\n attempt: constructFactory(onsuccessfulconstruct),\n check: constructFactory(onsuccessfulcheck),\n consume,\n enter,\n exit,\n interrupt: constructFactory(onsuccessfulcheck, {\n interrupt: true\n })\n };\n\n /**\n * State and tools for resolving and serializing.\n *\n * @type {TokenizeContext}\n */\n const context = {\n code: null,\n containerState: {},\n defineSkip,\n events: [],\n now,\n parser,\n previous: null,\n sliceSerialize,\n sliceStream,\n write\n };\n\n /**\n * The state function.\n *\n * @type {State | undefined}\n */\n let state = initialize.tokenize.call(context, effects);\n\n /**\n * Track which character we expect to be consumed, to catch bugs.\n *\n * @type {Code}\n */\n let expectedCode;\n if (initialize.resolveAll) {\n resolveAllConstructs.push(initialize);\n }\n return context;\n\n /** @type {TokenizeContext['write']} */\n function write(slice) {\n chunks = push(chunks, slice);\n main();\n\n // Exit if we’re not done, resolve might change stuff.\n if (chunks[chunks.length - 1] !== null) {\n return [];\n }\n addResult(initialize, 0);\n\n // Otherwise, resolve, and exit.\n context.events = resolveAll(resolveAllConstructs, context.events, context);\n return context.events;\n }\n\n //\n // Tools.\n //\n\n /** @type {TokenizeContext['sliceSerialize']} */\n function sliceSerialize(token, expandTabs) {\n return serializeChunks(sliceStream(token), expandTabs);\n }\n\n /** @type {TokenizeContext['sliceStream']} */\n function sliceStream(token) {\n return sliceChunks(chunks, token);\n }\n\n /** @type {TokenizeContext['now']} */\n function now() {\n // This is a hot path, so we clone manually instead of `Object.assign({}, point)`\n const {\n _bufferIndex,\n _index,\n line,\n column,\n offset\n } = point;\n return {\n _bufferIndex,\n _index,\n line,\n column,\n offset\n };\n }\n\n /** @type {TokenizeContext['defineSkip']} */\n function defineSkip(value) {\n columnStart[value.line] = value.column;\n accountForPotentialSkip();\n }\n\n //\n // State management.\n //\n\n /**\n * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by\n * `consume`).\n * Here is where we walk through the chunks, which either include strings of\n * several characters, or numerical character codes.\n * The reason to do this in a loop instead of a call is so the stack can\n * drain.\n *\n * @returns {undefined}\n * Nothing.\n */\n function main() {\n /** @type {number} */\n let chunkIndex;\n while (point._index < chunks.length) {\n const chunk = chunks[point._index];\n\n // If we’re in a buffer chunk, loop through it.\n if (typeof chunk === 'string') {\n chunkIndex = point._index;\n if (point._bufferIndex < 0) {\n point._bufferIndex = 0;\n }\n while (point._index === chunkIndex && point._bufferIndex < chunk.length) {\n go(chunk.charCodeAt(point._bufferIndex));\n }\n } else {\n go(chunk);\n }\n }\n }\n\n /**\n * Deal with one code.\n *\n * @param {Code} code\n * Code.\n * @returns {undefined}\n * Nothing.\n */\n function go(code) {\n consumed = undefined;\n expectedCode = code;\n state = state(code);\n }\n\n /** @type {Effects['consume']} */\n function consume(code) {\n if (markdownLineEnding(code)) {\n point.line++;\n point.column = 1;\n point.offset += code === -3 ? 2 : 1;\n accountForPotentialSkip();\n } else if (code !== -1) {\n point.column++;\n point.offset++;\n }\n\n // Not in a string chunk.\n if (point._bufferIndex < 0) {\n point._index++;\n } else {\n point._bufferIndex++;\n\n // At end of string chunk.\n if (point._bufferIndex ===\n // Points w/ non-negative `_bufferIndex` reference\n // strings.\n /** @type {string} */\n chunks[point._index].length) {\n point._bufferIndex = -1;\n point._index++;\n }\n }\n\n // Expose the previous character.\n context.previous = code;\n\n // Mark as consumed.\n consumed = true;\n }\n\n /** @type {Effects['enter']} */\n function enter(type, fields) {\n /** @type {Token} */\n // @ts-expect-error Patch instead of assign required fields to help GC.\n const token = fields || {};\n token.type = type;\n token.start = now();\n context.events.push(['enter', token, context]);\n stack.push(token);\n return token;\n }\n\n /** @type {Effects['exit']} */\n function exit(type) {\n const token = stack.pop();\n token.end = now();\n context.events.push(['exit', token, context]);\n return token;\n }\n\n /**\n * Use results.\n *\n * @type {ReturnHandle}\n */\n function onsuccessfulconstruct(construct, info) {\n addResult(construct, info.from);\n }\n\n /**\n * Discard results.\n *\n * @type {ReturnHandle}\n */\n function onsuccessfulcheck(_, info) {\n info.restore();\n }\n\n /**\n * Factory to attempt/check/interrupt.\n *\n * @param {ReturnHandle} onreturn\n * Callback.\n * @param {{interrupt?: boolean | undefined} | undefined} [fields]\n * Fields.\n */\n function constructFactory(onreturn, fields) {\n return hook;\n\n /**\n * Handle either an object mapping codes to constructs, a list of\n * constructs, or a single construct.\n *\n * @param {Array | ConstructRecord | Construct} constructs\n * Constructs.\n * @param {State} returnState\n * State.\n * @param {State | undefined} [bogusState]\n * State.\n * @returns {State}\n * State.\n */\n function hook(constructs, returnState, bogusState) {\n /** @type {ReadonlyArray} */\n let listOfConstructs;\n /** @type {number} */\n let constructIndex;\n /** @type {Construct} */\n let currentConstruct;\n /** @type {Info} */\n let info;\n return Array.isArray(constructs) ? /* c8 ignore next 1 */\n handleListOfConstructs(constructs) : 'tokenize' in constructs ?\n // Looks like a construct.\n handleListOfConstructs([(/** @type {Construct} */constructs)]) : handleMapOfConstructs(constructs);\n\n /**\n * Handle a list of construct.\n *\n * @param {ConstructRecord} map\n * Constructs.\n * @returns {State}\n * State.\n */\n function handleMapOfConstructs(map) {\n return start;\n\n /** @type {State} */\n function start(code) {\n const left = code !== null && map[code];\n const all = code !== null && map.null;\n const list = [\n // To do: add more extension tests.\n /* c8 ignore next 2 */\n ...(Array.isArray(left) ? left : left ? [left] : []), ...(Array.isArray(all) ? all : all ? [all] : [])];\n return handleListOfConstructs(list)(code);\n }\n }\n\n /**\n * Handle a list of construct.\n *\n * @param {ReadonlyArray} list\n * Constructs.\n * @returns {State}\n * State.\n */\n function handleListOfConstructs(list) {\n listOfConstructs = list;\n constructIndex = 0;\n if (list.length === 0) {\n return bogusState;\n }\n return handleConstruct(list[constructIndex]);\n }\n\n /**\n * Handle a single construct.\n *\n * @param {Construct} construct\n * Construct.\n * @returns {State}\n * State.\n */\n function handleConstruct(construct) {\n return start;\n\n /** @type {State} */\n function start(code) {\n // To do: not needed to store if there is no bogus state, probably?\n // Currently doesn’t work because `inspect` in document does a check\n // w/o a bogus, which doesn’t make sense. But it does seem to help perf\n // by not storing.\n info = store();\n currentConstruct = construct;\n if (!construct.partial) {\n context.currentConstruct = construct;\n }\n\n // Always populated by defaults.\n\n if (construct.name && context.parser.constructs.disable.null.includes(construct.name)) {\n return nok(code);\n }\n return construct.tokenize.call(\n // If we do have fields, create an object w/ `context` as its\n // prototype.\n // This allows a “live binding”, which is needed for `interrupt`.\n fields ? Object.assign(Object.create(context), fields) : context, effects, ok, nok)(code);\n }\n }\n\n /** @type {State} */\n function ok(code) {\n consumed = true;\n onreturn(currentConstruct, info);\n return returnState;\n }\n\n /** @type {State} */\n function nok(code) {\n consumed = true;\n info.restore();\n if (++constructIndex < listOfConstructs.length) {\n return handleConstruct(listOfConstructs[constructIndex]);\n }\n return bogusState;\n }\n }\n }\n\n /**\n * @param {Construct} construct\n * Construct.\n * @param {number} from\n * From.\n * @returns {undefined}\n * Nothing.\n */\n function addResult(construct, from) {\n if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {\n resolveAllConstructs.push(construct);\n }\n if (construct.resolve) {\n splice(context.events, from, context.events.length - from, construct.resolve(context.events.slice(from), context));\n }\n if (construct.resolveTo) {\n context.events = construct.resolveTo(context.events, context);\n }\n }\n\n /**\n * Store state.\n *\n * @returns {Info}\n * Info.\n */\n function store() {\n const startPoint = now();\n const startPrevious = context.previous;\n const startCurrentConstruct = context.currentConstruct;\n const startEventsIndex = context.events.length;\n const startStack = Array.from(stack);\n return {\n from: startEventsIndex,\n restore\n };\n\n /**\n * Restore state.\n *\n * @returns {undefined}\n * Nothing.\n */\n function restore() {\n point = startPoint;\n context.previous = startPrevious;\n context.currentConstruct = startCurrentConstruct;\n context.events.length = startEventsIndex;\n stack = startStack;\n accountForPotentialSkip();\n }\n }\n\n /**\n * Move the current point a bit forward in the line when it’s on a column\n * skip.\n *\n * @returns {undefined}\n * Nothing.\n */\n function accountForPotentialSkip() {\n if (point.line in columnStart && point.column < 2) {\n point.column = columnStart[point.line];\n point.offset += columnStart[point.line] - 1;\n }\n }\n}\n\n/**\n * Get the chunks from a slice of chunks in the range of a token.\n *\n * @param {ReadonlyArray} chunks\n * Chunks.\n * @param {Pick} token\n * Token.\n * @returns {Array}\n * Chunks.\n */\nfunction sliceChunks(chunks, token) {\n const startIndex = token.start._index;\n const startBufferIndex = token.start._bufferIndex;\n const endIndex = token.end._index;\n const endBufferIndex = token.end._bufferIndex;\n /** @type {Array} */\n let view;\n if (startIndex === endIndex) {\n // @ts-expect-error `_bufferIndex` is used on string chunks.\n view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)];\n } else {\n view = chunks.slice(startIndex, endIndex);\n if (startBufferIndex > -1) {\n const head = view[0];\n if (typeof head === 'string') {\n view[0] = head.slice(startBufferIndex);\n } else {\n view.shift();\n }\n }\n if (endBufferIndex > 0) {\n // @ts-expect-error `_bufferIndex` is used on string chunks.\n view.push(chunks[endIndex].slice(0, endBufferIndex));\n }\n }\n return view;\n}\n\n/**\n * Get the string value of a slice of chunks.\n *\n * @param {ReadonlyArray} chunks\n * Chunks.\n * @param {boolean | undefined} [expandTabs=false]\n * Whether to expand tabs (default: `false`).\n * @returns {string}\n * Result.\n */\nfunction serializeChunks(chunks, expandTabs) {\n let index = -1;\n /** @type {Array} */\n const result = [];\n /** @type {boolean | undefined} */\n let atTab;\n while (++index < chunks.length) {\n const chunk = chunks[index];\n /** @type {string} */\n let value;\n if (typeof chunk === 'string') {\n value = chunk;\n } else switch (chunk) {\n case -5:\n {\n value = \"\\r\";\n break;\n }\n case -4:\n {\n value = \"\\n\";\n break;\n }\n case -3:\n {\n value = \"\\r\" + \"\\n\";\n break;\n }\n case -2:\n {\n value = expandTabs ? \" \" : \"\\t\";\n break;\n }\n case -1:\n {\n if (!expandTabs && atTab) continue;\n value = \" \";\n break;\n }\n default:\n {\n // Currently only replacement character.\n value = String.fromCharCode(chunk);\n }\n }\n atTab = chunk === -2;\n result.push(value);\n }\n return result.join('');\n}","/**\n * @import {\n * Create,\n * FullNormalizedExtension,\n * InitialConstruct,\n * ParseContext,\n * ParseOptions\n * } from 'micromark-util-types'\n */\n\nimport { combineExtensions } from 'micromark-util-combine-extensions';\nimport { content } from './initialize/content.js';\nimport { document } from './initialize/document.js';\nimport { flow } from './initialize/flow.js';\nimport { string, text } from './initialize/text.js';\nimport * as defaultConstructs from './constructs.js';\nimport { createTokenizer } from './create-tokenizer.js';\n\n/**\n * @param {ParseOptions | null | undefined} [options]\n * Configuration (optional).\n * @returns {ParseContext}\n * Parser.\n */\nexport function parse(options) {\n const settings = options || {};\n const constructs = /** @type {FullNormalizedExtension} */\n combineExtensions([defaultConstructs, ...(settings.extensions || [])]);\n\n /** @type {ParseContext} */\n const parser = {\n constructs,\n content: create(content),\n defined: [],\n document: create(document),\n flow: create(flow),\n lazy: {},\n string: create(string),\n text: create(text)\n };\n return parser;\n\n /**\n * @param {InitialConstruct} initial\n * Construct to start with.\n * @returns {Create}\n * Create a tokenizer.\n */\n function create(initial) {\n return creator;\n /** @type {Create} */\n function creator(from) {\n return createTokenizer(parser, initial, from);\n }\n }\n}","/**\n * @import {Chunk, Code, Encoding, Value} from 'micromark-util-types'\n */\n\n/**\n * @callback Preprocessor\n * Preprocess a value.\n * @param {Value} value\n * Value.\n * @param {Encoding | null | undefined} [encoding]\n * Encoding when `value` is a typed array (optional).\n * @param {boolean | null | undefined} [end=false]\n * Whether this is the last chunk (default: `false`).\n * @returns {Array}\n * Chunks.\n */\n\nconst search = /[\\0\\t\\n\\r]/g;\n\n/**\n * @returns {Preprocessor}\n * Preprocess a value.\n */\nexport function preprocess() {\n let column = 1;\n let buffer = '';\n /** @type {boolean | undefined} */\n let start = true;\n /** @type {boolean | undefined} */\n let atCarriageReturn;\n return preprocessor;\n\n /** @type {Preprocessor} */\n // eslint-disable-next-line complexity\n function preprocessor(value, encoding, end) {\n /** @type {Array} */\n const chunks = [];\n /** @type {RegExpMatchArray | null} */\n let match;\n /** @type {number} */\n let next;\n /** @type {number} */\n let startPosition;\n /** @type {number} */\n let endPosition;\n /** @type {Code} */\n let code;\n value = buffer + (typeof value === 'string' ? value.toString() : new TextDecoder(encoding || undefined).decode(value));\n startPosition = 0;\n buffer = '';\n if (start) {\n // To do: `markdown-rs` actually parses BOMs (byte order mark).\n if (value.charCodeAt(0) === 65279) {\n startPosition++;\n }\n start = undefined;\n }\n while (startPosition < value.length) {\n search.lastIndex = startPosition;\n match = search.exec(value);\n endPosition = match && match.index !== undefined ? match.index : value.length;\n code = value.charCodeAt(endPosition);\n if (!match) {\n buffer = value.slice(startPosition);\n break;\n }\n if (code === 10 && startPosition === endPosition && atCarriageReturn) {\n chunks.push(-3);\n atCarriageReturn = undefined;\n } else {\n if (atCarriageReturn) {\n chunks.push(-5);\n atCarriageReturn = undefined;\n }\n if (startPosition < endPosition) {\n chunks.push(value.slice(startPosition, endPosition));\n column += endPosition - startPosition;\n }\n switch (code) {\n case 0:\n {\n chunks.push(65533);\n column++;\n break;\n }\n case 9:\n {\n next = Math.ceil(column / 4) * 4;\n chunks.push(-2);\n while (column++ < next) chunks.push(-1);\n break;\n }\n case 10:\n {\n chunks.push(-4);\n column = 1;\n break;\n }\n default:\n {\n atCarriageReturn = true;\n column = 1;\n }\n }\n }\n startPosition = endPosition + 1;\n }\n if (end) {\n if (atCarriageReturn) chunks.push(-5);\n if (buffer) chunks.push(buffer);\n chunks.push(null);\n }\n return chunks;\n }\n}","/**\n * Turn the number (in string form as either hexa- or plain decimal) coming from\n * a numeric character reference into a character.\n *\n * Sort of like `String.fromCodePoint(Number.parseInt(value, base))`, but makes\n * non-characters and control characters safe.\n *\n * @param {string} value\n * Value to decode.\n * @param {number} base\n * Numeric base.\n * @returns {string}\n * Character.\n */\nexport function decodeNumericCharacterReference(value, base) {\n const code = Number.parseInt(value, base);\n if (\n // C0 except for HT, LF, FF, CR, space.\n code < 9 || code === 11 || code > 13 && code < 32 ||\n // Control character (DEL) of C0, and C1 controls.\n code > 126 && code < 160 ||\n // Lone high surrogates and low surrogates.\n code > 55_295 && code < 57_344 ||\n // Noncharacters.\n code > 64_975 && code < 65_008 || /* eslint-disable no-bitwise */\n (code & 65_535) === 65_535 || (code & 65_535) === 65_534 || /* eslint-enable no-bitwise */\n // Out of range\n code > 1_114_111) {\n return \"\\uFFFD\";\n }\n return String.fromCodePoint(code);\n}","import { decodeNamedCharacterReference } from 'decode-named-character-reference';\nimport { decodeNumericCharacterReference } from 'micromark-util-decode-numeric-character-reference';\nconst characterEscapeOrReference = /\\\\([!-/:-@[-`{-~])|&(#(?:\\d{1,7}|x[\\da-f]{1,6})|[\\da-z]{1,31});/gi;\n\n/**\n * Decode markdown strings (which occur in places such as fenced code info\n * strings, destinations, labels, and titles).\n *\n * The “string” content type allows character escapes and -references.\n * This decodes those.\n *\n * @param {string} value\n * Value to decode.\n * @returns {string}\n * Decoded value.\n */\nexport function decodeString(value) {\n return value.replace(characterEscapeOrReference, decode);\n}\n\n/**\n * @param {string} $0\n * Match.\n * @param {string} $1\n * Character escape.\n * @param {string} $2\n * Character reference.\n * @returns {string}\n * Decoded value\n */\nfunction decode($0, $1, $2) {\n if ($1) {\n // Escape.\n return $1;\n }\n\n // Reference.\n const head = $2.charCodeAt(0);\n if (head === 35) {\n const head = $2.charCodeAt(1);\n const hex = head === 120 || head === 88;\n return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10);\n }\n return decodeNamedCharacterReference($2) || $0;\n}","/**\n * @import {\n * Break,\n * Blockquote,\n * Code,\n * Definition,\n * Emphasis,\n * Heading,\n * Html,\n * Image,\n * InlineCode,\n * Link,\n * ListItem,\n * List,\n * Nodes,\n * Paragraph,\n * PhrasingContent,\n * ReferenceType,\n * Root,\n * Strong,\n * Text,\n * ThematicBreak\n * } from 'mdast'\n * @import {\n * Encoding,\n * Event,\n * Token,\n * Value\n * } from 'micromark-util-types'\n * @import {Point} from 'unist'\n * @import {\n * CompileContext,\n * CompileData,\n * Config,\n * Extension,\n * Handle,\n * OnEnterError,\n * Options\n * } from './types.js'\n */\n\nimport { toString } from 'mdast-util-to-string';\nimport { parse, postprocess, preprocess } from 'micromark';\nimport { decodeNumericCharacterReference } from 'micromark-util-decode-numeric-character-reference';\nimport { decodeString } from 'micromark-util-decode-string';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nimport { decodeNamedCharacterReference } from 'decode-named-character-reference';\nimport { stringifyPosition } from 'unist-util-stringify-position';\nconst own = {}.hasOwnProperty;\n\n/**\n * Turn markdown into a syntax tree.\n *\n * @overload\n * @param {Value} value\n * @param {Encoding | null | undefined} [encoding]\n * @param {Options | null | undefined} [options]\n * @returns {Root}\n *\n * @overload\n * @param {Value} value\n * @param {Options | null | undefined} [options]\n * @returns {Root}\n *\n * @param {Value} value\n * Markdown to parse.\n * @param {Encoding | Options | null | undefined} [encoding]\n * Character encoding for when `value` is `Buffer`.\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {Root}\n * mdast tree.\n */\nexport function fromMarkdown(value, encoding, options) {\n if (typeof encoding !== 'string') {\n options = encoding;\n encoding = undefined;\n }\n return compiler(options)(postprocess(parse(options).document().write(preprocess()(value, encoding, true))));\n}\n\n/**\n * Note this compiler only understand complete buffering, not streaming.\n *\n * @param {Options | null | undefined} [options]\n */\nfunction compiler(options) {\n /** @type {Config} */\n const config = {\n transforms: [],\n canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],\n enter: {\n autolink: opener(link),\n autolinkProtocol: onenterdata,\n autolinkEmail: onenterdata,\n atxHeading: opener(heading),\n blockQuote: opener(blockQuote),\n characterEscape: onenterdata,\n characterReference: onenterdata,\n codeFenced: opener(codeFlow),\n codeFencedFenceInfo: buffer,\n codeFencedFenceMeta: buffer,\n codeIndented: opener(codeFlow, buffer),\n codeText: opener(codeText, buffer),\n codeTextData: onenterdata,\n data: onenterdata,\n codeFlowValue: onenterdata,\n definition: opener(definition),\n definitionDestinationString: buffer,\n definitionLabelString: buffer,\n definitionTitleString: buffer,\n emphasis: opener(emphasis),\n hardBreakEscape: opener(hardBreak),\n hardBreakTrailing: opener(hardBreak),\n htmlFlow: opener(html, buffer),\n htmlFlowData: onenterdata,\n htmlText: opener(html, buffer),\n htmlTextData: onenterdata,\n image: opener(image),\n label: buffer,\n link: opener(link),\n listItem: opener(listItem),\n listItemValue: onenterlistitemvalue,\n listOrdered: opener(list, onenterlistordered),\n listUnordered: opener(list),\n paragraph: opener(paragraph),\n reference: onenterreference,\n referenceString: buffer,\n resourceDestinationString: buffer,\n resourceTitleString: buffer,\n setextHeading: opener(heading),\n strong: opener(strong),\n thematicBreak: opener(thematicBreak)\n },\n exit: {\n atxHeading: closer(),\n atxHeadingSequence: onexitatxheadingsequence,\n autolink: closer(),\n autolinkEmail: onexitautolinkemail,\n autolinkProtocol: onexitautolinkprotocol,\n blockQuote: closer(),\n characterEscapeValue: onexitdata,\n characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,\n characterReferenceMarkerNumeric: onexitcharacterreferencemarker,\n characterReferenceValue: onexitcharacterreferencevalue,\n characterReference: onexitcharacterreference,\n codeFenced: closer(onexitcodefenced),\n codeFencedFence: onexitcodefencedfence,\n codeFencedFenceInfo: onexitcodefencedfenceinfo,\n codeFencedFenceMeta: onexitcodefencedfencemeta,\n codeFlowValue: onexitdata,\n codeIndented: closer(onexitcodeindented),\n codeText: closer(onexitcodetext),\n codeTextData: onexitdata,\n data: onexitdata,\n definition: closer(),\n definitionDestinationString: onexitdefinitiondestinationstring,\n definitionLabelString: onexitdefinitionlabelstring,\n definitionTitleString: onexitdefinitiontitlestring,\n emphasis: closer(),\n hardBreakEscape: closer(onexithardbreak),\n hardBreakTrailing: closer(onexithardbreak),\n htmlFlow: closer(onexithtmlflow),\n htmlFlowData: onexitdata,\n htmlText: closer(onexithtmltext),\n htmlTextData: onexitdata,\n image: closer(onexitimage),\n label: onexitlabel,\n labelText: onexitlabeltext,\n lineEnding: onexitlineending,\n link: closer(onexitlink),\n listItem: closer(),\n listOrdered: closer(),\n listUnordered: closer(),\n paragraph: closer(),\n referenceString: onexitreferencestring,\n resourceDestinationString: onexitresourcedestinationstring,\n resourceTitleString: onexitresourcetitlestring,\n resource: onexitresource,\n setextHeading: closer(onexitsetextheading),\n setextHeadingLineSequence: onexitsetextheadinglinesequence,\n setextHeadingText: onexitsetextheadingtext,\n strong: closer(),\n thematicBreak: closer()\n }\n };\n configure(config, (options || {}).mdastExtensions || []);\n\n /** @type {CompileData} */\n const data = {};\n return compile;\n\n /**\n * Turn micromark events into an mdast tree.\n *\n * @param {Array} events\n * Events.\n * @returns {Root}\n * mdast tree.\n */\n function compile(events) {\n /** @type {Root} */\n let tree = {\n type: 'root',\n children: []\n };\n /** @type {Omit} */\n const context = {\n stack: [tree],\n tokenStack: [],\n config,\n enter,\n exit,\n buffer,\n resume,\n data\n };\n /** @type {Array} */\n const listStack = [];\n let index = -1;\n while (++index < events.length) {\n // We preprocess lists to add `listItem` tokens, and to infer whether\n // items the list itself are spread out.\n if (events[index][1].type === \"listOrdered\" || events[index][1].type === \"listUnordered\") {\n if (events[index][0] === 'enter') {\n listStack.push(index);\n } else {\n const tail = listStack.pop();\n index = prepareList(events, tail, index);\n }\n }\n }\n index = -1;\n while (++index < events.length) {\n const handler = config[events[index][0]];\n if (own.call(handler, events[index][1].type)) {\n handler[events[index][1].type].call(Object.assign({\n sliceSerialize: events[index][2].sliceSerialize\n }, context), events[index][1]);\n }\n }\n\n // Handle tokens still being open.\n if (context.tokenStack.length > 0) {\n const tail = context.tokenStack[context.tokenStack.length - 1];\n const handler = tail[1] || defaultOnError;\n handler.call(context, undefined, tail[0]);\n }\n\n // Figure out `root` position.\n tree.position = {\n start: point(events.length > 0 ? events[0][1].start : {\n line: 1,\n column: 1,\n offset: 0\n }),\n end: point(events.length > 0 ? events[events.length - 2][1].end : {\n line: 1,\n column: 1,\n offset: 0\n })\n };\n\n // Call transforms.\n index = -1;\n while (++index < config.transforms.length) {\n tree = config.transforms[index](tree) || tree;\n }\n return tree;\n }\n\n /**\n * @param {Array} events\n * @param {number} start\n * @param {number} length\n * @returns {number}\n */\n function prepareList(events, start, length) {\n let index = start - 1;\n let containerBalance = -1;\n let listSpread = false;\n /** @type {Token | undefined} */\n let listItem;\n /** @type {number | undefined} */\n let lineIndex;\n /** @type {number | undefined} */\n let firstBlankLineIndex;\n /** @type {boolean | undefined} */\n let atMarker;\n while (++index <= length) {\n const event = events[index];\n switch (event[1].type) {\n case \"listUnordered\":\n case \"listOrdered\":\n case \"blockQuote\":\n {\n if (event[0] === 'enter') {\n containerBalance++;\n } else {\n containerBalance--;\n }\n atMarker = undefined;\n break;\n }\n case \"lineEndingBlank\":\n {\n if (event[0] === 'enter') {\n if (listItem && !atMarker && !containerBalance && !firstBlankLineIndex) {\n firstBlankLineIndex = index;\n }\n atMarker = undefined;\n }\n break;\n }\n case \"linePrefix\":\n case \"listItemValue\":\n case \"listItemMarker\":\n case \"listItemPrefix\":\n case \"listItemPrefixWhitespace\":\n {\n // Empty.\n\n break;\n }\n default:\n {\n atMarker = undefined;\n }\n }\n if (!containerBalance && event[0] === 'enter' && event[1].type === \"listItemPrefix\" || containerBalance === -1 && event[0] === 'exit' && (event[1].type === \"listUnordered\" || event[1].type === \"listOrdered\")) {\n if (listItem) {\n let tailIndex = index;\n lineIndex = undefined;\n while (tailIndex--) {\n const tailEvent = events[tailIndex];\n if (tailEvent[1].type === \"lineEnding\" || tailEvent[1].type === \"lineEndingBlank\") {\n if (tailEvent[0] === 'exit') continue;\n if (lineIndex) {\n events[lineIndex][1].type = \"lineEndingBlank\";\n listSpread = true;\n }\n tailEvent[1].type = \"lineEnding\";\n lineIndex = tailIndex;\n } else if (tailEvent[1].type === \"linePrefix\" || tailEvent[1].type === \"blockQuotePrefix\" || tailEvent[1].type === \"blockQuotePrefixWhitespace\" || tailEvent[1].type === \"blockQuoteMarker\" || tailEvent[1].type === \"listItemIndent\") {\n // Empty\n } else {\n break;\n }\n }\n if (firstBlankLineIndex && (!lineIndex || firstBlankLineIndex < lineIndex)) {\n listItem._spread = true;\n }\n\n // Fix position.\n listItem.end = Object.assign({}, lineIndex ? events[lineIndex][1].start : event[1].end);\n events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]);\n index++;\n length++;\n }\n\n // Create a new list item.\n if (event[1].type === \"listItemPrefix\") {\n /** @type {Token} */\n const item = {\n type: 'listItem',\n _spread: false,\n start: Object.assign({}, event[1].start),\n // @ts-expect-error: we’ll add `end` in a second.\n end: undefined\n };\n listItem = item;\n events.splice(index, 0, ['enter', item, event[2]]);\n index++;\n length++;\n firstBlankLineIndex = undefined;\n atMarker = true;\n }\n }\n }\n events[start][1]._spread = listSpread;\n return length;\n }\n\n /**\n * Create an opener handle.\n *\n * @param {(token: Token) => Nodes} create\n * Create a node.\n * @param {Handle | undefined} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function opener(create, and) {\n return open;\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {undefined}\n */\n function open(token) {\n enter.call(this, create(token), token);\n if (and) and.call(this, token);\n }\n }\n\n /**\n * @type {CompileContext['buffer']}\n */\n function buffer() {\n this.stack.push({\n type: 'fragment',\n children: []\n });\n }\n\n /**\n * @type {CompileContext['enter']}\n */\n function enter(node, token, errorHandler) {\n const parent = this.stack[this.stack.length - 1];\n /** @type {Array} */\n const siblings = parent.children;\n siblings.push(node);\n this.stack.push(node);\n this.tokenStack.push([token, errorHandler || undefined]);\n node.position = {\n start: point(token.start),\n // @ts-expect-error: `end` will be patched later.\n end: undefined\n };\n }\n\n /**\n * Create a closer handle.\n *\n * @param {Handle | undefined} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function closer(and) {\n return close;\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {undefined}\n */\n function close(token) {\n if (and) and.call(this, token);\n exit.call(this, token);\n }\n }\n\n /**\n * @type {CompileContext['exit']}\n */\n function exit(token, onExitError) {\n const node = this.stack.pop();\n const open = this.tokenStack.pop();\n if (!open) {\n throw new Error('Cannot close `' + token.type + '` (' + stringifyPosition({\n start: token.start,\n end: token.end\n }) + '): it’s not open');\n } else if (open[0].type !== token.type) {\n if (onExitError) {\n onExitError.call(this, token, open[0]);\n } else {\n const handler = open[1] || defaultOnError;\n handler.call(this, token, open[0]);\n }\n }\n node.position.end = point(token.end);\n }\n\n /**\n * @type {CompileContext['resume']}\n */\n function resume() {\n return toString(this.stack.pop());\n }\n\n //\n // Handlers.\n //\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistordered() {\n this.data.expectingFirstListItemValue = true;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistitemvalue(token) {\n if (this.data.expectingFirstListItemValue) {\n const ancestor = this.stack[this.stack.length - 2];\n ancestor.start = Number.parseInt(this.sliceSerialize(token), 10);\n this.data.expectingFirstListItemValue = undefined;\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfenceinfo() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.lang = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfencemeta() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.meta = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfence() {\n // Exit if this is the closing fence.\n if (this.data.flowCodeInside) return;\n this.buffer();\n this.data.flowCodeInside = true;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefenced() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data.replace(/^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g, '');\n this.data.flowCodeInside = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodeindented() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data.replace(/(\\r?\\n|\\r)$/g, '');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitionlabelstring(token) {\n const label = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.label = label;\n node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase();\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiontitlestring() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.title = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiondestinationstring() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.url = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitatxheadingsequence(token) {\n const node = this.stack[this.stack.length - 1];\n if (!node.depth) {\n const depth = this.sliceSerialize(token).length;\n node.depth = depth;\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadingtext() {\n this.data.setextHeadingSlurpLineEnding = true;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadinglinesequence(token) {\n const node = this.stack[this.stack.length - 1];\n node.depth = this.sliceSerialize(token).codePointAt(0) === 61 ? 1 : 2;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheading() {\n this.data.setextHeadingSlurpLineEnding = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterdata(token) {\n const node = this.stack[this.stack.length - 1];\n /** @type {Array} */\n const siblings = node.children;\n let tail = siblings[siblings.length - 1];\n if (!tail || tail.type !== 'text') {\n // Add a new text node.\n tail = text();\n tail.position = {\n start: point(token.start),\n // @ts-expect-error: we’ll add `end` later.\n end: undefined\n };\n siblings.push(tail);\n }\n this.stack.push(tail);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitdata(token) {\n const tail = this.stack.pop();\n tail.value += this.sliceSerialize(token);\n tail.position.end = point(token.end);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlineending(token) {\n const context = this.stack[this.stack.length - 1];\n // If we’re at a hard break, include the line ending in there.\n if (this.data.atHardBreak) {\n const tail = context.children[context.children.length - 1];\n tail.position.end = point(token.end);\n this.data.atHardBreak = undefined;\n return;\n }\n if (!this.data.setextHeadingSlurpLineEnding && config.canContainEols.includes(context.type)) {\n onenterdata.call(this, token);\n onexitdata.call(this, token);\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithardbreak() {\n this.data.atHardBreak = true;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmlflow() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmltext() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcodetext() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlink() {\n const node = this.stack[this.stack.length - 1];\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n\n // To do: clean.\n if (this.data.inReference) {\n /** @type {ReferenceType} */\n const referenceType = this.data.referenceType || 'shortcut';\n node.type += 'Reference';\n // @ts-expect-error: mutate.\n node.referenceType = referenceType;\n // @ts-expect-error: mutate.\n delete node.url;\n delete node.title;\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier;\n // @ts-expect-error: mutate.\n delete node.label;\n }\n this.data.referenceType = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitimage() {\n const node = this.stack[this.stack.length - 1];\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n\n // To do: clean.\n if (this.data.inReference) {\n /** @type {ReferenceType} */\n const referenceType = this.data.referenceType || 'shortcut';\n node.type += 'Reference';\n // @ts-expect-error: mutate.\n node.referenceType = referenceType;\n // @ts-expect-error: mutate.\n delete node.url;\n delete node.title;\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier;\n // @ts-expect-error: mutate.\n delete node.label;\n }\n this.data.referenceType = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabeltext(token) {\n const string = this.sliceSerialize(token);\n const ancestor = this.stack[this.stack.length - 2];\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n ancestor.label = decodeString(string);\n // @ts-expect-error: same as above.\n ancestor.identifier = normalizeIdentifier(string).toLowerCase();\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabel() {\n const fragment = this.stack[this.stack.length - 1];\n const value = this.resume();\n const node = this.stack[this.stack.length - 1];\n // Assume a reference.\n this.data.inReference = true;\n if (node.type === 'link') {\n /** @type {Array} */\n const children = fragment.children;\n node.children = children;\n } else {\n node.alt = value;\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcedestinationstring() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.url = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcetitlestring() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.title = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresource() {\n this.data.inReference = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterreference() {\n this.data.referenceType = 'collapsed';\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitreferencestring(token) {\n const label = this.resume();\n const node = this.stack[this.stack.length - 1];\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n node.label = label;\n // @ts-expect-error: same as above.\n node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase();\n this.data.referenceType = 'full';\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcharacterreferencemarker(token) {\n this.data.characterReferenceType = token.type;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcharacterreferencevalue(token) {\n const data = this.sliceSerialize(token);\n const type = this.data.characterReferenceType;\n /** @type {string} */\n let value;\n if (type) {\n value = decodeNumericCharacterReference(data, type === \"characterReferenceMarkerNumeric\" ? 10 : 16);\n this.data.characterReferenceType = undefined;\n } else {\n const result = decodeNamedCharacterReference(data);\n value = result;\n }\n const tail = this.stack[this.stack.length - 1];\n tail.value += value;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcharacterreference(token) {\n const tail = this.stack.pop();\n tail.position.end = point(token.end);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkprotocol(token) {\n onexitdata.call(this, token);\n const node = this.stack[this.stack.length - 1];\n node.url = this.sliceSerialize(token);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkemail(token) {\n onexitdata.call(this, token);\n const node = this.stack[this.stack.length - 1];\n node.url = 'mailto:' + this.sliceSerialize(token);\n }\n\n //\n // Creaters.\n //\n\n /** @returns {Blockquote} */\n function blockQuote() {\n return {\n type: 'blockquote',\n children: []\n };\n }\n\n /** @returns {Code} */\n function codeFlow() {\n return {\n type: 'code',\n lang: null,\n meta: null,\n value: ''\n };\n }\n\n /** @returns {InlineCode} */\n function codeText() {\n return {\n type: 'inlineCode',\n value: ''\n };\n }\n\n /** @returns {Definition} */\n function definition() {\n return {\n type: 'definition',\n identifier: '',\n label: null,\n title: null,\n url: ''\n };\n }\n\n /** @returns {Emphasis} */\n function emphasis() {\n return {\n type: 'emphasis',\n children: []\n };\n }\n\n /** @returns {Heading} */\n function heading() {\n return {\n type: 'heading',\n // @ts-expect-error `depth` will be set later.\n depth: 0,\n children: []\n };\n }\n\n /** @returns {Break} */\n function hardBreak() {\n return {\n type: 'break'\n };\n }\n\n /** @returns {Html} */\n function html() {\n return {\n type: 'html',\n value: ''\n };\n }\n\n /** @returns {Image} */\n function image() {\n return {\n type: 'image',\n title: null,\n url: '',\n alt: null\n };\n }\n\n /** @returns {Link} */\n function link() {\n return {\n type: 'link',\n title: null,\n url: '',\n children: []\n };\n }\n\n /**\n * @param {Token} token\n * @returns {List}\n */\n function list(token) {\n return {\n type: 'list',\n ordered: token.type === 'listOrdered',\n start: null,\n spread: token._spread,\n children: []\n };\n }\n\n /**\n * @param {Token} token\n * @returns {ListItem}\n */\n function listItem(token) {\n return {\n type: 'listItem',\n spread: token._spread,\n checked: null,\n children: []\n };\n }\n\n /** @returns {Paragraph} */\n function paragraph() {\n return {\n type: 'paragraph',\n children: []\n };\n }\n\n /** @returns {Strong} */\n function strong() {\n return {\n type: 'strong',\n children: []\n };\n }\n\n /** @returns {Text} */\n function text() {\n return {\n type: 'text',\n value: ''\n };\n }\n\n /** @returns {ThematicBreak} */\n function thematicBreak() {\n return {\n type: 'thematicBreak'\n };\n }\n}\n\n/**\n * Copy a point-like value.\n *\n * @param {Point} d\n * Point-like value.\n * @returns {Point}\n * unist point.\n */\nfunction point(d) {\n return {\n line: d.line,\n column: d.column,\n offset: d.offset\n };\n}\n\n/**\n * @param {Config} combined\n * @param {Array | Extension>} extensions\n * @returns {undefined}\n */\nfunction configure(combined, extensions) {\n let index = -1;\n while (++index < extensions.length) {\n const value = extensions[index];\n if (Array.isArray(value)) {\n configure(combined, value);\n } else {\n extension(combined, value);\n }\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Extension} extension\n * @returns {undefined}\n */\nfunction extension(combined, extension) {\n /** @type {keyof Extension} */\n let key;\n for (key in extension) {\n if (own.call(extension, key)) {\n switch (key) {\n case 'canContainEols':\n {\n const right = extension[key];\n if (right) {\n combined[key].push(...right);\n }\n break;\n }\n case 'transforms':\n {\n const right = extension[key];\n if (right) {\n combined[key].push(...right);\n }\n break;\n }\n case 'enter':\n case 'exit':\n {\n const right = extension[key];\n if (right) {\n Object.assign(combined[key], right);\n }\n break;\n }\n // No default\n }\n }\n }\n}\n\n/** @type {OnEnterError} */\nfunction defaultOnError(left, right) {\n if (left) {\n throw new Error('Cannot close `' + left.type + '` (' + stringifyPosition({\n start: left.start,\n end: left.end\n }) + '): a different token (`' + right.type + '`, ' + stringifyPosition({\n start: right.start,\n end: right.end\n }) + ') is open');\n } else {\n throw new Error('Cannot close document, a token (`' + right.type + '`, ' + stringifyPosition({\n start: right.start,\n end: right.end\n }) + ') is still open');\n }\n}","/**\n * @import {Event} from 'micromark-util-types'\n */\n\nimport { subtokenize } from 'micromark-util-subtokenize';\n\n/**\n * @param {Array} events\n * Events.\n * @returns {Array}\n * Events.\n */\nexport function postprocess(events) {\n while (!subtokenize(events)) {\n // Empty\n }\n return events;\n}","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-from-markdown').Options} FromMarkdownOptions\n * @typedef {import('unified').Parser} Parser\n * @typedef {import('unified').Processor} Processor\n */\n\n/**\n * @typedef {Omit} Options\n */\n\nimport {fromMarkdown} from 'mdast-util-from-markdown'\n\n/**\n * Aadd support for parsing from markdown.\n *\n * @param {Readonly | null | undefined} [options]\n * Configuration (optional).\n * @returns {undefined}\n * Nothing.\n */\nexport default function remarkParse(options) {\n /** @type {Processor} */\n // @ts-expect-error: TS in JSDoc generates wrong types if `this` is typed regularly.\n const self = this\n\n self.parser = parser\n\n /**\n * @type {Parser}\n */\n function parser(doc) {\n return fromMarkdown(doc, {\n ...self.data('settings'),\n ...options,\n // Note: these options are not in the readme.\n // The goal is for them to be set by plugins on `data` instead of being\n // passed by users.\n extensions: self.data('micromarkExtensions') || [],\n mdastExtensions: self.data('fromMarkdownExtensions') || []\n })\n }\n}\n","export const VOID = -1;\nexport const PRIMITIVE = 0;\nexport const ARRAY = 1;\nexport const OBJECT = 2;\nexport const DATE = 3;\nexport const REGEXP = 4;\nexport const MAP = 5;\nexport const SET = 6;\nexport const ERROR = 7;\nexport const BIGINT = 8;\n// export const SYMBOL = 9;\n","import {\n VOID, PRIMITIVE,\n ARRAY, OBJECT,\n DATE, REGEXP, MAP, SET,\n ERROR, BIGINT\n} from './types.js';\n\nconst env = typeof self === 'object' ? self : globalThis;\n\nconst deserializer = ($, _) => {\n const as = (out, index) => {\n $.set(index, out);\n return out;\n };\n\n const unpair = index => {\n if ($.has(index))\n return $.get(index);\n\n const [type, value] = _[index];\n switch (type) {\n case PRIMITIVE:\n case VOID:\n return as(value, index);\n case ARRAY: {\n const arr = as([], index);\n for (const index of value)\n arr.push(unpair(index));\n return arr;\n }\n case OBJECT: {\n const object = as({}, index);\n for (const [key, index] of value)\n object[unpair(key)] = unpair(index);\n return object;\n }\n case DATE:\n return as(new Date(value), index);\n case REGEXP: {\n const {source, flags} = value;\n return as(new RegExp(source, flags), index);\n }\n case MAP: {\n const map = as(new Map, index);\n for (const [key, index] of value)\n map.set(unpair(key), unpair(index));\n return map;\n }\n case SET: {\n const set = as(new Set, index);\n for (const index of value)\n set.add(unpair(index));\n return set;\n }\n case ERROR: {\n const {name, message} = value;\n return as(new env[name](message), index);\n }\n case BIGINT:\n return as(BigInt(value), index);\n case 'BigInt':\n return as(Object(BigInt(value)), index);\n }\n return as(new env[type](value), index);\n };\n\n return unpair;\n};\n\n/**\n * @typedef {Array} Record a type representation\n */\n\n/**\n * Returns a deserialized value from a serialized array of Records.\n * @param {Record[]} serialized a previously serialized value.\n * @returns {any}\n */\nexport const deserialize = serialized => deserializer(new Map, serialized)(0);\n","import {\n VOID, PRIMITIVE,\n ARRAY, OBJECT,\n DATE, REGEXP, MAP, SET,\n ERROR, BIGINT\n} from './types.js';\n\nconst EMPTY = '';\n\nconst {toString} = {};\nconst {keys} = Object;\n\nconst typeOf = value => {\n const type = typeof value;\n if (type !== 'object' || !value)\n return [PRIMITIVE, type];\n\n const asString = toString.call(value).slice(8, -1);\n switch (asString) {\n case 'Array':\n return [ARRAY, EMPTY];\n case 'Object':\n return [OBJECT, EMPTY];\n case 'Date':\n return [DATE, EMPTY];\n case 'RegExp':\n return [REGEXP, EMPTY];\n case 'Map':\n return [MAP, EMPTY];\n case 'Set':\n return [SET, EMPTY];\n }\n\n if (asString.includes('Array'))\n return [ARRAY, asString];\n\n if (asString.includes('Error'))\n return [ERROR, asString];\n\n return [OBJECT, asString];\n};\n\nconst shouldSkip = ([TYPE, type]) => (\n TYPE === PRIMITIVE &&\n (type === 'function' || type === 'symbol')\n);\n\nconst serializer = (strict, json, $, _) => {\n\n const as = (out, value) => {\n const index = _.push(out) - 1;\n $.set(value, index);\n return index;\n };\n\n const pair = value => {\n if ($.has(value))\n return $.get(value);\n\n let [TYPE, type] = typeOf(value);\n switch (TYPE) {\n case PRIMITIVE: {\n let entry = value;\n switch (type) {\n case 'bigint':\n TYPE = BIGINT;\n entry = value.toString();\n break;\n case 'function':\n case 'symbol':\n if (strict)\n throw new TypeError('unable to serialize ' + type);\n entry = null;\n break;\n case 'undefined':\n return as([VOID], value);\n }\n return as([TYPE, entry], value);\n }\n case ARRAY: {\n if (type)\n return as([type, [...value]], value);\n \n const arr = [];\n const index = as([TYPE, arr], value);\n for (const entry of value)\n arr.push(pair(entry));\n return index;\n }\n case OBJECT: {\n if (type) {\n switch (type) {\n case 'BigInt':\n return as([type, value.toString()], value);\n case 'Boolean':\n case 'Number':\n case 'String':\n return as([type, value.valueOf()], value);\n }\n }\n\n if (json && ('toJSON' in value))\n return pair(value.toJSON());\n\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const key of keys(value)) {\n if (strict || !shouldSkip(typeOf(value[key])))\n entries.push([pair(key), pair(value[key])]);\n }\n return index;\n }\n case DATE:\n return as([TYPE, value.toISOString()], value);\n case REGEXP: {\n const {source, flags} = value;\n return as([TYPE, {source, flags}], value);\n }\n case MAP: {\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const [key, entry] of value) {\n if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))\n entries.push([pair(key), pair(entry)]);\n }\n return index;\n }\n case SET: {\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const entry of value) {\n if (strict || !shouldSkip(typeOf(entry)))\n entries.push(pair(entry));\n }\n return index;\n }\n }\n\n const {message} = value;\n return as([TYPE, {name: type, message}], value);\n };\n\n return pair;\n};\n\n/**\n * @typedef {Array} Record a type representation\n */\n\n/**\n * Returns an array of serialized Records.\n * @param {any} value a serializable value.\n * @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,\n * if `true`, will not throw errors on incompatible types, and behave more\n * like JSON stringify would behave. Symbol and Function will be discarded.\n * @returns {Record[]}\n */\n export const serialize = (value, {json, lossy} = {}) => {\n const _ = [];\n return serializer(!(json || lossy), !!json, new Map, _)(value), _;\n};\n","import {deserialize} from './deserialize.js';\nimport {serialize} from './serialize.js';\n\n/**\n * @typedef {Array} Record a type representation\n */\n\n/**\n * Returns an array of serialized Records.\n * @param {any} any a serializable value.\n * @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with\n * a transfer option (ignored when polyfilled) and/or non standard fields that\n * fallback to the polyfill if present.\n * @returns {Record[]}\n */\nexport default typeof structuredClone === \"function\" ?\n /* c8 ignore start */\n (any, options) => (\n options && ('json' in options || 'lossy' in options) ?\n deserialize(serialize(any, options)) : structuredClone(any)\n ) :\n (any, options) => deserialize(serialize(any, options));\n /* c8 ignore stop */\n\nexport {deserialize, serialize};\n","import { asciiAlphanumeric } from 'micromark-util-character';\nimport { encode } from 'micromark-util-encode';\n/**\n * Make a value safe for injection as a URL.\n *\n * This encodes unsafe characters with percent-encoding and skips already\n * encoded sequences (see `normalizeUri`).\n * Further unsafe characters are encoded as character references (see\n * `micromark-util-encode`).\n *\n * A regex of allowed protocols can be given, in which case the URL is\n * sanitized.\n * For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or\n * `/^https?$/i` for `img[src]` (this is what `github.com` allows).\n * If the URL includes an unknown protocol (one not matched by `protocol`, such\n * as a dangerous example, `javascript:`), the value is ignored.\n *\n * @param {string | null | undefined} url\n * URI to sanitize.\n * @param {RegExp | null | undefined} [protocol]\n * Allowed protocols.\n * @returns {string}\n * Sanitized URI.\n */\nexport function sanitizeUri(url, protocol) {\n const value = encode(normalizeUri(url || ''));\n if (!protocol) {\n return value;\n }\n const colon = value.indexOf(':');\n const questionMark = value.indexOf('?');\n const numberSign = value.indexOf('#');\n const slash = value.indexOf('/');\n if (\n // If there is no protocol, it’s relative.\n colon < 0 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n slash > -1 && colon > slash || questionMark > -1 && colon > questionMark || numberSign > -1 && colon > numberSign ||\n // It is a protocol, it should be allowed.\n protocol.test(value.slice(0, colon))) {\n return value;\n }\n return '';\n}\n\n/**\n * Normalize a URL.\n *\n * Encode unsafe characters with percent-encoding, skipping already encoded\n * sequences.\n *\n * @param {string} value\n * URI to normalize.\n * @returns {string}\n * Normalized URI.\n */\nexport function normalizeUri(value) {\n /** @type {Array} */\n const result = [];\n let index = -1;\n let start = 0;\n let skip = 0;\n while (++index < value.length) {\n const code = value.charCodeAt(index);\n /** @type {string} */\n let replace = '';\n\n // A correct percent encoded value.\n if (code === 37 && asciiAlphanumeric(value.charCodeAt(index + 1)) && asciiAlphanumeric(value.charCodeAt(index + 2))) {\n skip = 2;\n }\n // ASCII.\n else if (code < 128) {\n if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) {\n replace = String.fromCharCode(code);\n }\n }\n // Astral.\n else if (code > 55_295 && code < 57_344) {\n const next = value.charCodeAt(index + 1);\n\n // A correct surrogate pair.\n if (code < 56_320 && next > 56_319 && next < 57_344) {\n replace = String.fromCharCode(code, next);\n skip = 1;\n }\n // Lone surrogate.\n else {\n replace = \"\\uFFFD\";\n }\n }\n // Unicode.\n else {\n replace = String.fromCharCode(code);\n }\n if (replace) {\n result.push(value.slice(start, index), encodeURIComponent(replace));\n start = index + skip + 1;\n replace = '';\n }\n if (skip) {\n index += skip;\n skip = 0;\n }\n }\n return result.join('') + value.slice(start);\n}","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('./state.js').State} State\n */\n\n/**\n * @callback FootnoteBackContentTemplate\n * Generate content for the backreference dynamically.\n *\n * For the following markdown:\n *\n * ```markdown\n * Alpha[^micromark], bravo[^micromark], and charlie[^remark].\n *\n * [^remark]: things about remark\n * [^micromark]: things about micromark\n * ```\n *\n * This function will be called with:\n *\n * * `0` and `0` for the backreference from `things about micromark` to\n * `alpha`, as it is the first used definition, and the first call to it\n * * `0` and `1` for the backreference from `things about micromark` to\n * `bravo`, as it is the first used definition, and the second call to it\n * * `1` and `0` for the backreference from `things about remark` to\n * `charlie`, as it is the second used definition\n * @param {number} referenceIndex\n * Index of the definition in the order that they are first referenced,\n * 0-indexed.\n * @param {number} rereferenceIndex\n * Index of calls to the same definition, 0-indexed.\n * @returns {Array | ElementContent | string}\n * Content for the backreference when linking back from definitions to their\n * reference.\n *\n * @callback FootnoteBackLabelTemplate\n * Generate a back label dynamically.\n *\n * For the following markdown:\n *\n * ```markdown\n * Alpha[^micromark], bravo[^micromark], and charlie[^remark].\n *\n * [^remark]: things about remark\n * [^micromark]: things about micromark\n * ```\n *\n * This function will be called with:\n *\n * * `0` and `0` for the backreference from `things about micromark` to\n * `alpha`, as it is the first used definition, and the first call to it\n * * `0` and `1` for the backreference from `things about micromark` to\n * `bravo`, as it is the first used definition, and the second call to it\n * * `1` and `0` for the backreference from `things about remark` to\n * `charlie`, as it is the second used definition\n * @param {number} referenceIndex\n * Index of the definition in the order that they are first referenced,\n * 0-indexed.\n * @param {number} rereferenceIndex\n * Index of calls to the same definition, 0-indexed.\n * @returns {string}\n * Back label to use when linking back from definitions to their reference.\n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Generate the default content that GitHub uses on backreferences.\n *\n * @param {number} _\n * Index of the definition in the order that they are first referenced,\n * 0-indexed.\n * @param {number} rereferenceIndex\n * Index of calls to the same definition, 0-indexed.\n * @returns {Array}\n * Content.\n */\nexport function defaultFootnoteBackContent(_, rereferenceIndex) {\n /** @type {Array} */\n const result = [{type: 'text', value: '↩'}]\n\n if (rereferenceIndex > 1) {\n result.push({\n type: 'element',\n tagName: 'sup',\n properties: {},\n children: [{type: 'text', value: String(rereferenceIndex)}]\n })\n }\n\n return result\n}\n\n/**\n * Generate the default label that GitHub uses on backreferences.\n *\n * @param {number} referenceIndex\n * Index of the definition in the order that they are first referenced,\n * 0-indexed.\n * @param {number} rereferenceIndex\n * Index of calls to the same definition, 0-indexed.\n * @returns {string}\n * Label.\n */\nexport function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {\n return (\n 'Back to reference ' +\n (referenceIndex + 1) +\n (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')\n )\n}\n\n/**\n * Generate a hast footer for called footnote definitions.\n *\n * @param {State} state\n * Info passed around.\n * @returns {Element | undefined}\n * `section` element or `undefined`.\n */\n// eslint-disable-next-line complexity\nexport function footer(state) {\n const clobberPrefix =\n typeof state.options.clobberPrefix === 'string'\n ? state.options.clobberPrefix\n : 'user-content-'\n const footnoteBackContent =\n state.options.footnoteBackContent || defaultFootnoteBackContent\n const footnoteBackLabel =\n state.options.footnoteBackLabel || defaultFootnoteBackLabel\n const footnoteLabel = state.options.footnoteLabel || 'Footnotes'\n const footnoteLabelTagName = state.options.footnoteLabelTagName || 'h2'\n const footnoteLabelProperties = state.options.footnoteLabelProperties || {\n className: ['sr-only']\n }\n /** @type {Array} */\n const listItems = []\n let referenceIndex = -1\n\n while (++referenceIndex < state.footnoteOrder.length) {\n const definition = state.footnoteById.get(\n state.footnoteOrder[referenceIndex]\n )\n\n if (!definition) {\n continue\n }\n\n const content = state.all(definition)\n const id = String(definition.identifier).toUpperCase()\n const safeId = normalizeUri(id.toLowerCase())\n let rereferenceIndex = 0\n /** @type {Array} */\n const backReferences = []\n const counts = state.footnoteCounts.get(id)\n\n // eslint-disable-next-line no-unmodified-loop-condition\n while (counts !== undefined && ++rereferenceIndex <= counts) {\n if (backReferences.length > 0) {\n backReferences.push({type: 'text', value: ' '})\n }\n\n let children =\n typeof footnoteBackContent === 'string'\n ? footnoteBackContent\n : footnoteBackContent(referenceIndex, rereferenceIndex)\n\n if (typeof children === 'string') {\n children = {type: 'text', value: children}\n }\n\n backReferences.push({\n type: 'element',\n tagName: 'a',\n properties: {\n href:\n '#' +\n clobberPrefix +\n 'fnref-' +\n safeId +\n (rereferenceIndex > 1 ? '-' + rereferenceIndex : ''),\n dataFootnoteBackref: '',\n ariaLabel:\n typeof footnoteBackLabel === 'string'\n ? footnoteBackLabel\n : footnoteBackLabel(referenceIndex, rereferenceIndex),\n className: ['data-footnote-backref']\n },\n children: Array.isArray(children) ? children : [children]\n })\n }\n\n const tail = content[content.length - 1]\n\n if (tail && tail.type === 'element' && tail.tagName === 'p') {\n const tailTail = tail.children[tail.children.length - 1]\n if (tailTail && tailTail.type === 'text') {\n tailTail.value += ' '\n } else {\n tail.children.push({type: 'text', value: ' '})\n }\n\n tail.children.push(...backReferences)\n } else {\n content.push(...backReferences)\n }\n\n /** @type {Element} */\n const listItem = {\n type: 'element',\n tagName: 'li',\n properties: {id: clobberPrefix + 'fn-' + safeId},\n children: state.wrap(content, true)\n }\n\n state.patch(definition, listItem)\n\n listItems.push(listItem)\n }\n\n if (listItems.length === 0) {\n return\n }\n\n return {\n type: 'element',\n tagName: 'section',\n properties: {dataFootnotes: true, className: ['footnotes']},\n children: [\n {\n type: 'element',\n tagName: footnoteLabelTagName,\n properties: {\n ...structuredClone(footnoteLabelProperties),\n id: 'footnote-label'\n },\n children: [{type: 'text', value: footnoteLabel}]\n },\n {type: 'text', value: '\\n'},\n {\n type: 'element',\n tagName: 'ol',\n properties: {},\n children: state.wrap(listItems, true)\n },\n {type: 'text', value: '\\n'}\n ]\n }\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n */\n\n/**\n * @template Fn\n * @template Fallback\n * @typedef {Fn extends (value: any) => value is infer Thing ? Thing : Fallback} Predicate\n */\n\n/**\n * @callback Check\n * Check that an arbitrary value is a node.\n * @param {unknown} this\n * The given context.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean}\n * Whether this is a node and passes a test.\n *\n * @typedef {Record | Node} Props\n * Object to check for equivalence.\n *\n * Note: `Node` is included as it is common but is not indexable.\n *\n * @typedef {Array | Props | TestFunction | string | null | undefined} Test\n * Check for an arbitrary node.\n *\n * @callback TestFunction\n * Check if a node passes a test.\n * @param {unknown} this\n * The given context.\n * @param {Node} node\n * A node.\n * @param {number | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | undefined} [parent]\n * The node’s parent.\n * @returns {boolean | undefined | void}\n * Whether this node passes the test.\n *\n * Note: `void` is included until TS sees no return as `undefined`.\n */\n\n/**\n * Check if `node` is a `Node` and whether it passes the given test.\n *\n * @param {unknown} node\n * Thing to check, typically `Node`.\n * @param {Test} test\n * A check for a specific node.\n * @param {number | null | undefined} index\n * The node’s position in its parent.\n * @param {Parent | null | undefined} parent\n * The node’s parent.\n * @param {unknown} context\n * Context object (`this`) to pass to `test` functions.\n * @returns {boolean}\n * Whether `node` is a node and passes a test.\n */\nexport const is =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &\n * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &\n * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate) &\n * ((node?: null | undefined) => false) &\n * ((node: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &\n * ((node: unknown, test?: Test, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [node]\n * @param {Test} [test]\n * @param {number | null | undefined} [index]\n * @param {Parent | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function (node, test, index, parent, context) {\n const check = convert(test)\n\n if (\n index !== undefined &&\n index !== null &&\n (typeof index !== 'number' ||\n index < 0 ||\n index === Number.POSITIVE_INFINITY)\n ) {\n throw new Error('Expected positive finite index')\n }\n\n if (\n parent !== undefined &&\n parent !== null &&\n (!is(parent) || !parent.children)\n ) {\n throw new Error('Expected parent node')\n }\n\n if (\n (parent === undefined || parent === null) !==\n (index === undefined || index === null)\n ) {\n throw new Error('Expected both parent and index')\n }\n\n return looksLikeANode(node)\n ? check.call(context, node, index, parent)\n : false\n }\n )\n\n/**\n * Generate an assertion from a test.\n *\n * Useful if you’re going to test many nodes, for example when creating a\n * utility where something else passes a compatible test.\n *\n * The created function is a bit faster because it expects valid input only:\n * a `node`, `index`, and `parent`.\n *\n * @param {Test} test\n * * when nullish, checks if `node` is a `Node`.\n * * when `string`, works like passing `(node) => node.type === test`.\n * * when `function` checks if function passed the node is true.\n * * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.\n * * when `array`, checks if any one of the subtests pass.\n * @returns {Check}\n * An assertion.\n */\nexport const convert =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &\n * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &\n * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate) &\n * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &\n * ((test?: Test) => Check)\n * )}\n */\n (\n /**\n * @param {Test} [test]\n * @returns {Check}\n */\n function (test) {\n if (test === null || test === undefined) {\n return ok\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n if (typeof test === 'object') {\n return Array.isArray(test) ? anyFactory(test) : propsFactory(test)\n }\n\n if (typeof test === 'string') {\n return typeFactory(test)\n }\n\n throw new Error('Expected function, string, or object as test')\n }\n )\n\n/**\n * @param {Array} tests\n * @returns {Check}\n */\nfunction anyFactory(tests) {\n /** @type {Array} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convert(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @type {TestFunction}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].apply(this, parameters)) return true\n }\n\n return false\n }\n}\n\n/**\n * Turn an object into a test for a node with a certain fields.\n *\n * @param {Props} check\n * @returns {Check}\n */\nfunction propsFactory(check) {\n const checkAsRecord = /** @type {Record} */ (check)\n\n return castFactory(all)\n\n /**\n * @param {Node} node\n * @returns {boolean}\n */\n function all(node) {\n const nodeAsRecord = /** @type {Record} */ (\n /** @type {unknown} */ (node)\n )\n\n /** @type {string} */\n let key\n\n for (key in check) {\n if (nodeAsRecord[key] !== checkAsRecord[key]) return false\n }\n\n return true\n }\n}\n\n/**\n * Turn a string into a test for a node with a certain type.\n *\n * @param {string} check\n * @returns {Check}\n */\nfunction typeFactory(check) {\n return castFactory(type)\n\n /**\n * @param {Node} node\n */\n function type(node) {\n return node && node.type === check\n }\n}\n\n/**\n * Turn a custom test into a test for a node that passes that test.\n *\n * @param {TestFunction} testFunction\n * @returns {Check}\n */\nfunction castFactory(testFunction) {\n return check\n\n /**\n * @this {unknown}\n * @type {Check}\n */\n function check(value, index, parent) {\n return Boolean(\n looksLikeANode(value) &&\n testFunction.call(\n this,\n value,\n typeof index === 'number' ? index : undefined,\n parent || undefined\n )\n )\n }\n}\n\nfunction ok() {\n return true\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Node}\n */\nfunction looksLikeANode(value) {\n return value !== null && typeof value === 'object' && 'type' in value\n}\n","/**\n * @typedef {import('unist').Node} UnistNode\n * @typedef {import('unist').Parent} UnistParent\n */\n\n/**\n * @typedef {Exclude | undefined} Test\n * Test from `unist-util-is`.\n *\n * Note: we have remove and add `undefined`, because otherwise when generating\n * automatic `.d.ts` files, TS tries to flatten paths from a local perspective,\n * which doesn’t work when publishing on npm.\n */\n\n/**\n * @typedef {(\n * Fn extends (value: any) => value is infer Thing\n * ? Thing\n * : Fallback\n * )} Predicate\n * Get the value of a type guard `Fn`.\n * @template Fn\n * Value; typically function that is a type guard (such as `(x): x is Y`).\n * @template Fallback\n * Value to yield if `Fn` is not a type guard.\n */\n\n/**\n * @typedef {(\n * Check extends null | undefined // No test.\n * ? Value\n * : Value extends {type: Check} // String (type) test.\n * ? Value\n * : Value extends Check // Partial test.\n * ? Value\n * : Check extends Function // Function test.\n * ? Predicate extends Value\n * ? Predicate\n * : never\n * : never // Some other test?\n * )} MatchesOne\n * Check whether a node matches a primitive check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test, but not arrays.\n */\n\n/**\n * @typedef {(\n * Check extends Array\n * ? MatchesOne\n * : MatchesOne\n * )} Matches\n * Check whether a node matches a check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test.\n */\n\n/**\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint\n * Number; capped reasonably.\n */\n\n/**\n * @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment\n * Increment a number in the type system.\n * @template {Uint} [I=0]\n * Index.\n */\n\n/**\n * @typedef {(\n * Node extends UnistParent\n * ? Node extends {children: Array}\n * ? Child extends Children ? Node : never\n * : never\n * : never\n * )} InternalParent\n * Collect nodes that can be parents of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {InternalParent, Child>} Parent\n * Collect nodes in `Tree` that can be parents of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Depth extends Max\n * ? never\n * :\n * | InternalParent\n * | InternalAncestor, Max, Increment>\n * )} InternalAncestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {InternalAncestor, Child>} Ancestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Tree extends UnistParent\n * ? Depth extends Max\n * ? Tree\n * : Tree | InclusiveDescendant>\n * : Tree\n * )} InclusiveDescendant\n * Collect all (inclusive) descendants of `Tree`.\n *\n * > 👉 **Note**: for performance reasons, this seems to be the fastest way to\n * > recurse without actually running into an infinite loop, which the\n * > previous version did.\n * >\n * > Practically, a max of `2` is typically enough assuming a `Root` is\n * > passed, but it doesn’t improve performance.\n * > It gets higher with `List > ListItem > Table > TableRow > TableCell`.\n * > Using up to `10` doesn’t hurt or help either.\n * @template {UnistNode} Tree\n * Tree type.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {'skip' | boolean} Action\n * Union of the action types.\n *\n * @typedef {number} Index\n * Move to the sibling at `index` next (after node itself is completely\n * traversed).\n *\n * Useful if mutating the tree, such as removing the node the visitor is\n * currently on, or any of its previous siblings.\n * Results less than 0 or greater than or equal to `children.length` stop\n * traversing the parent.\n *\n * @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple\n * List with one or two values, the first an action, the second an index.\n *\n * @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult\n * Any value that can be returned from a visitor.\n */\n\n/**\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform the parent of node (the last of `ancestors`).\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of an ancestor still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Array} ancestors\n * Ancestors of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n * @template {UnistNode} [Visited=UnistNode]\n * Visited node type.\n * @template {UnistParent} [VisitedParents=UnistParent]\n * Ancestor type.\n */\n\n/**\n * @typedef {Visitor, Check>, Ancestor, Check>>>} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parents`.\n * @template {UnistNode} [Tree=UnistNode]\n * Tree type.\n * @template {Test} [Check=Test]\n * Test type.\n */\n\nimport {convert} from 'unist-util-is'\nimport {color} from 'unist-util-visit-parents/do-not-use-color'\n\n/** @type {Readonly} */\nconst empty = []\n\n/**\n * Continue traversing as normal.\n */\nexport const CONTINUE = true\n\n/**\n * Stop traversing immediately.\n */\nexport const EXIT = false\n\n/**\n * Do not traverse this node’s children.\n */\nexport const SKIP = 'skip'\n\n/**\n * Visit nodes, with ancestral information.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @overload\n * @param {Tree} tree\n * @param {Check} check\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @overload\n * @param {Tree} tree\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @param {UnistNode} tree\n * Tree to traverse.\n * @param {Visitor | Test} test\n * `unist-util-is`-compatible test\n * @param {Visitor | boolean | null | undefined} [visitor]\n * Handle each node.\n * @param {boolean | null | undefined} [reverse]\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns {undefined}\n * Nothing.\n *\n * @template {UnistNode} Tree\n * Node type.\n * @template {Test} Check\n * `unist-util-is`-compatible test.\n */\nexport function visitParents(tree, test, visitor, reverse) {\n /** @type {Test} */\n let check\n\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n // @ts-expect-error no visitor given, so `visitor` is test.\n visitor = test\n } else {\n // @ts-expect-error visitor given, so `test` isn’t a visitor.\n check = test\n }\n\n const is = convert(check)\n const step = reverse ? -1 : 1\n\n factory(tree, undefined, [])()\n\n /**\n * @param {UnistNode} node\n * @param {number | undefined} index\n * @param {Array} parents\n */\n function factory(node, index, parents) {\n const value = /** @type {Record} */ (\n node && typeof node === 'object' ? node : {}\n )\n\n if (typeof value.type === 'string') {\n const name =\n // `hast`\n typeof value.tagName === 'string'\n ? value.tagName\n : // `xast`\n typeof value.name === 'string'\n ? value.name\n : undefined\n\n Object.defineProperty(visit, 'name', {\n value:\n 'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')'\n })\n }\n\n return visit\n\n function visit() {\n /** @type {Readonly} */\n let result = empty\n /** @type {Readonly} */\n let subresult\n /** @type {number} */\n let offset\n /** @type {Array} */\n let grandparents\n\n if (!test || is(node, index, parents[parents.length - 1] || undefined)) {\n // @ts-expect-error: `visitor` is now a visitor.\n result = toResult(visitor(node, parents))\n\n if (result[0] === EXIT) {\n return result\n }\n }\n\n if ('children' in node && node.children) {\n const nodeAsParent = /** @type {UnistParent} */ (node)\n\n if (nodeAsParent.children && result[0] !== SKIP) {\n offset = (reverse ? nodeAsParent.children.length : -1) + step\n grandparents = parents.concat(nodeAsParent)\n\n while (offset > -1 && offset < nodeAsParent.children.length) {\n const child = nodeAsParent.children[offset]\n\n subresult = factory(child, offset, grandparents)()\n\n if (subresult[0] === EXIT) {\n return subresult\n }\n\n offset =\n typeof subresult[1] === 'number' ? subresult[1] : offset + step\n }\n }\n }\n\n return result\n }\n }\n}\n\n/**\n * Turn a return value into a clean result.\n *\n * @param {VisitorResult} value\n * Valid return values from visitors.\n * @returns {Readonly}\n * Clean result.\n */\nfunction toResult(value) {\n if (Array.isArray(value)) {\n return value\n }\n\n if (typeof value === 'number') {\n return [CONTINUE, value]\n }\n\n return value === null || value === undefined ? empty : [value]\n}\n","/**\n * @typedef {import('unist').Node} UnistNode\n * @typedef {import('unist').Parent} UnistParent\n * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult\n */\n\n/**\n * @typedef {Exclude | undefined} Test\n * Test from `unist-util-is`.\n *\n * Note: we have remove and add `undefined`, because otherwise when generating\n * automatic `.d.ts` files, TS tries to flatten paths from a local perspective,\n * which doesn’t work when publishing on npm.\n */\n\n// To do: use types from `unist-util-visit-parents` when it’s released.\n\n/**\n * @typedef {(\n * Fn extends (value: any) => value is infer Thing\n * ? Thing\n * : Fallback\n * )} Predicate\n * Get the value of a type guard `Fn`.\n * @template Fn\n * Value; typically function that is a type guard (such as `(x): x is Y`).\n * @template Fallback\n * Value to yield if `Fn` is not a type guard.\n */\n\n/**\n * @typedef {(\n * Check extends null | undefined // No test.\n * ? Value\n * : Value extends {type: Check} // String (type) test.\n * ? Value\n * : Value extends Check // Partial test.\n * ? Value\n * : Check extends Function // Function test.\n * ? Predicate extends Value\n * ? Predicate\n * : never\n * : never // Some other test?\n * )} MatchesOne\n * Check whether a node matches a primitive check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test, but not arrays.\n */\n\n/**\n * @typedef {(\n * Check extends Array\n * ? MatchesOne\n * : MatchesOne\n * )} Matches\n * Check whether a node matches a check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test.\n */\n\n/**\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint\n * Number; capped reasonably.\n */\n\n/**\n * @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment\n * Increment a number in the type system.\n * @template {Uint} [I=0]\n * Index.\n */\n\n/**\n * @typedef {(\n * Node extends UnistParent\n * ? Node extends {children: Array}\n * ? Child extends Children ? Node : never\n * : never\n * : never\n * )} InternalParent\n * Collect nodes that can be parents of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {InternalParent, Child>} Parent\n * Collect nodes in `Tree` that can be parents of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Depth extends Max\n * ? never\n * :\n * | InternalParent\n * | InternalAncestor, Max, Increment>\n * )} InternalAncestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {(\n * Tree extends UnistParent\n * ? Depth extends Max\n * ? Tree\n * : Tree | InclusiveDescendant>\n * : Tree\n * )} InclusiveDescendant\n * Collect all (inclusive) descendants of `Tree`.\n *\n * > 👉 **Note**: for performance reasons, this seems to be the fastest way to\n * > recurse without actually running into an infinite loop, which the\n * > previous version did.\n * >\n * > Practically, a max of `2` is typically enough assuming a `Root` is\n * > passed, but it doesn’t improve performance.\n * > It gets higher with `List > ListItem > Table > TableRow > TableCell`.\n * > Using up to `10` doesn’t hurt or help either.\n * @template {UnistNode} Tree\n * Tree type.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform `parent`.\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of `parent` still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Visited extends UnistNode ? number | undefined : never} index\n * Index of `node` in `parent`.\n * @param {Ancestor extends UnistParent ? Ancestor | undefined : never} parent\n * Parent of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n * @template {UnistNode} [Visited=UnistNode]\n * Visited node type.\n * @template {UnistParent} [Ancestor=UnistParent]\n * Ancestor type.\n */\n\n/**\n * @typedef {Visitor>} BuildVisitorFromMatch\n * Build a typed `Visitor` function from a node and all possible parents.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} Visited\n * Node type.\n * @template {UnistParent} Ancestor\n * Parent type.\n */\n\n/**\n * @typedef {(\n * BuildVisitorFromMatch<\n * Matches,\n * Extract\n * >\n * )} BuildVisitorFromDescendants\n * Build a typed `Visitor` function from a list of descendants and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} Descendant\n * Node type.\n * @template {Test} Check\n * Test type.\n */\n\n/**\n * @typedef {(\n * BuildVisitorFromDescendants<\n * InclusiveDescendant,\n * Check\n * >\n * )} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} [Tree=UnistNode]\n * Node type.\n * @template {Test} [Check=Test]\n * Test type.\n */\n\nimport {visitParents} from 'unist-util-visit-parents'\n\nexport {CONTINUE, EXIT, SKIP} from 'unist-util-visit-parents'\n\n/**\n * Visit nodes.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @overload\n * @param {Tree} tree\n * @param {Check} check\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @overload\n * @param {Tree} tree\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @param {UnistNode} tree\n * Tree to traverse.\n * @param {Visitor | Test} testOrVisitor\n * `unist-util-is`-compatible test (optional, omit to pass a visitor).\n * @param {Visitor | boolean | null | undefined} [visitorOrReverse]\n * Handle each node (when test is omitted, pass `reverse`).\n * @param {boolean | null | undefined} [maybeReverse=false]\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns {undefined}\n * Nothing.\n *\n * @template {UnistNode} Tree\n * Node type.\n * @template {Test} Check\n * `unist-util-is`-compatible test.\n */\nexport function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {\n /** @type {boolean | null | undefined} */\n let reverse\n /** @type {Test} */\n let test\n /** @type {Visitor} */\n let visitor\n\n if (\n typeof testOrVisitor === 'function' &&\n typeof visitorOrReverse !== 'function'\n ) {\n test = undefined\n visitor = testOrVisitor\n reverse = visitorOrReverse\n } else {\n // @ts-expect-error: assume the overload with test was given.\n test = testOrVisitor\n // @ts-expect-error: assume the overload with test was given.\n visitor = visitorOrReverse\n reverse = maybeReverse\n }\n\n visitParents(tree, test, overload, reverse)\n\n /**\n * @param {UnistNode} node\n * @param {Array} parents\n */\n function overload(node, parents) {\n const parent = parents[parents.length - 1]\n const index = parent ? parent.children.indexOf(node) : undefined\n return visitor(node, index, parent)\n }\n}\n","/**\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('mdast').Nodes} Nodes\n * @typedef {import('mdast').Reference} Reference\n *\n * @typedef {import('./state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Return the content of a reference without definition as plain text.\n *\n * @param {State} state\n * Info passed around.\n * @param {Extract} node\n * Reference node (image, link).\n * @returns {Array}\n * hast content.\n */\nexport function revert(state, node) {\n const subtype = node.referenceType\n let suffix = ']'\n\n if (subtype === 'collapsed') {\n suffix += '[]'\n } else if (subtype === 'full') {\n suffix += '[' + (node.label || node.identifier) + ']'\n }\n\n if (node.type === 'imageReference') {\n return [{type: 'text', value: '![' + node.alt + suffix}]\n }\n\n const contents = state.all(node)\n const head = contents[0]\n\n if (head && head.type === 'text') {\n head.value = '[' + head.value\n } else {\n contents.unshift({type: 'text', value: '['})\n }\n\n const tail = contents[contents.length - 1]\n\n if (tail && tail.type === 'text') {\n tail.value += suffix\n } else {\n contents.push({type: 'text', value: suffix})\n }\n\n return contents\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `listItem` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {ListItem} node\n * mdast node.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @returns {Element}\n * hast node.\n */\nexport function listItem(state, node, parent) {\n const results = state.all(node)\n const loose = parent ? listLoose(parent) : listItemLoose(node)\n /** @type {Properties} */\n const properties = {}\n /** @type {Array} */\n const children = []\n\n if (typeof node.checked === 'boolean') {\n const head = results[0]\n /** @type {Element} */\n let paragraph\n\n if (head && head.type === 'element' && head.tagName === 'p') {\n paragraph = head\n } else {\n paragraph = {type: 'element', tagName: 'p', properties: {}, children: []}\n results.unshift(paragraph)\n }\n\n if (paragraph.children.length > 0) {\n paragraph.children.unshift({type: 'text', value: ' '})\n }\n\n paragraph.children.unshift({\n type: 'element',\n tagName: 'input',\n properties: {type: 'checkbox', checked: node.checked, disabled: true},\n children: []\n })\n\n // According to github-markdown-css, this class hides bullet.\n // See: .\n properties.className = ['task-list-item']\n }\n\n let index = -1\n\n while (++index < results.length) {\n const child = results[index]\n\n // Add eols before nodes, except if this is a loose, first paragraph.\n if (\n loose ||\n index !== 0 ||\n child.type !== 'element' ||\n child.tagName !== 'p'\n ) {\n children.push({type: 'text', value: '\\n'})\n }\n\n if (child.type === 'element' && child.tagName === 'p' && !loose) {\n children.push(...child.children)\n } else {\n children.push(child)\n }\n }\n\n const tail = results[results.length - 1]\n\n // Add a final eol.\n if (tail && (loose || tail.type !== 'element' || tail.tagName !== 'p')) {\n children.push({type: 'text', value: '\\n'})\n }\n\n /** @type {Element} */\n const result = {type: 'element', tagName: 'li', properties, children}\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * @param {Parents} node\n * @return {Boolean}\n */\nfunction listLoose(node) {\n let loose = false\n if (node.type === 'list') {\n loose = node.spread || false\n const children = node.children\n let index = -1\n\n while (!loose && ++index < children.length) {\n loose = listItemLoose(children[index])\n }\n }\n\n return loose\n}\n\n/**\n * @param {ListItem} node\n * @return {Boolean}\n */\nfunction listItemLoose(node) {\n const spread = node.spread\n\n return spread === null || spread === undefined\n ? node.children.length > 1\n : spread\n}\n","const tab = 9 /* `\\t` */\nconst space = 32 /* ` ` */\n\n/**\n * Remove initial and final spaces and tabs at the line breaks in `value`.\n * Does not trim initial and final spaces and tabs of the value itself.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Trimmed value.\n */\nexport function trimLines(value) {\n const source = String(value)\n const search = /\\r?\\n|\\r/g\n let match = search.exec(source)\n let last = 0\n /** @type {Array} */\n const lines = []\n\n while (match) {\n lines.push(\n trimLine(source.slice(last, match.index), last > 0, true),\n match[0]\n )\n\n last = match.index + match[0].length\n match = search.exec(source)\n }\n\n lines.push(trimLine(source.slice(last), last > 0, false))\n\n return lines.join('')\n}\n\n/**\n * @param {string} value\n * Line to trim.\n * @param {boolean} start\n * Whether to trim the start of the line.\n * @param {boolean} end\n * Whether to trim the end of the line.\n * @returns {string}\n * Trimmed line.\n */\nfunction trimLine(value, start, end) {\n let startIndex = 0\n let endIndex = value.length\n\n if (start) {\n let code = value.codePointAt(startIndex)\n\n while (code === tab || code === space) {\n startIndex++\n code = value.codePointAt(startIndex)\n }\n }\n\n if (end) {\n let code = value.codePointAt(endIndex - 1)\n\n while (code === tab || code === space) {\n endIndex--\n code = value.codePointAt(endIndex - 1)\n }\n }\n\n return endIndex > startIndex ? value.slice(startIndex, endIndex) : ''\n}\n","import {blockquote} from './blockquote.js'\nimport {hardBreak} from './break.js'\nimport {code} from './code.js'\nimport {strikethrough} from './delete.js'\nimport {emphasis} from './emphasis.js'\nimport {footnoteReference} from './footnote-reference.js'\nimport {heading} from './heading.js'\nimport {html} from './html.js'\nimport {imageReference} from './image-reference.js'\nimport {image} from './image.js'\nimport {inlineCode} from './inline-code.js'\nimport {linkReference} from './link-reference.js'\nimport {link} from './link.js'\nimport {listItem} from './list-item.js'\nimport {list} from './list.js'\nimport {paragraph} from './paragraph.js'\nimport {root} from './root.js'\nimport {strong} from './strong.js'\nimport {table} from './table.js'\nimport {tableRow} from './table-row.js'\nimport {tableCell} from './table-cell.js'\nimport {text} from './text.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/**\n * Default handlers for nodes.\n *\n * @satisfies {import('../state.js').Handlers}\n */\nexport const handlers = {\n blockquote,\n break: hardBreak,\n code,\n delete: strikethrough,\n emphasis,\n footnoteReference,\n heading,\n html,\n imageReference,\n image,\n inlineCode,\n linkReference,\n link,\n listItem,\n list,\n paragraph,\n // @ts-expect-error: root is different, but hard to type.\n root,\n strong,\n table,\n tableCell,\n tableRow,\n text,\n thematicBreak,\n toml: ignore,\n yaml: ignore,\n definition: ignore,\n footnoteDefinition: ignore\n}\n\n// Return nothing for nodes that are ignored.\nfunction ignore() {\n return undefined\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `blockquote` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Blockquote} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function blockquote(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'blockquote',\n properties: {},\n children: state.wrap(state.all(node), true)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').Break} Break\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `break` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Break} node\n * mdast node.\n * @returns {Array}\n * hast element content.\n */\nexport function hardBreak(state, node) {\n /** @type {Element} */\n const result = {type: 'element', tagName: 'br', properties: {}, children: []}\n state.patch(node, result)\n return [state.applyData(node, result), {type: 'text', value: '\\n'}]\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Code} Code\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `code` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Code} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function code(state, node) {\n const value = node.value ? node.value + '\\n' : ''\n /** @type {Properties} */\n const properties = {}\n\n if (node.lang) {\n properties.className = ['language-' + node.lang]\n }\n\n // Create ``.\n /** @type {Element} */\n let result = {\n type: 'element',\n tagName: 'code',\n properties,\n children: [{type: 'text', value}]\n }\n\n if (node.meta) {\n result.data = {meta: node.meta}\n }\n\n state.patch(node, result)\n result = state.applyData(node, result)\n\n // Create `
`.\n  result = {type: 'element', tagName: 'pre', properties: {}, children: [result]}\n  state.patch(node, result)\n  return result\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Delete} Delete\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `delete` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Delete} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strikethrough(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'del',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `emphasis` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Emphasis} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function emphasis(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'em',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `footnoteReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {FootnoteReference} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function footnoteReference(state, node) {\n  const clobberPrefix =\n    typeof state.options.clobberPrefix === 'string'\n      ? state.options.clobberPrefix\n      : 'user-content-'\n  const id = String(node.identifier).toUpperCase()\n  const safeId = normalizeUri(id.toLowerCase())\n  const index = state.footnoteOrder.indexOf(id)\n  /** @type {number} */\n  let counter\n\n  let reuseCounter = state.footnoteCounts.get(id)\n\n  if (reuseCounter === undefined) {\n    reuseCounter = 0\n    state.footnoteOrder.push(id)\n    counter = state.footnoteOrder.length\n  } else {\n    counter = index + 1\n  }\n\n  reuseCounter += 1\n  state.footnoteCounts.set(id, reuseCounter)\n\n  /** @type {Element} */\n  const link = {\n    type: 'element',\n    tagName: 'a',\n    properties: {\n      href: '#' + clobberPrefix + 'fn-' + safeId,\n      id:\n        clobberPrefix +\n        'fnref-' +\n        safeId +\n        (reuseCounter > 1 ? '-' + reuseCounter : ''),\n      dataFootnoteRef: true,\n      ariaDescribedBy: ['footnote-label']\n    },\n    children: [{type: 'text', value: String(counter)}]\n  }\n  state.patch(node, link)\n\n  /** @type {Element} */\n  const sup = {\n    type: 'element',\n    tagName: 'sup',\n    properties: {},\n    children: [link]\n  }\n  state.patch(node, sup)\n  return state.applyData(node, sup)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `heading` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Heading} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function heading(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'h' + node.depth,\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Html} Html\n * @typedef {import('../state.js').State} State\n * @typedef {import('../../index.js').Raw} Raw\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise\n * nothing).\n *\n * @param {State} state\n *   Info passed around.\n * @param {Html} node\n *   mdast node.\n * @returns {Element | Raw | undefined}\n *   hast node.\n */\nexport function html(state, node) {\n  if (state.options.allowDangerousHtml) {\n    /** @type {Raw} */\n    const result = {type: 'raw', value: node.value}\n    state.patch(node, result)\n    return state.applyData(node, result)\n  }\n\n  return undefined\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `imageReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ImageReference} node\n *   mdast node.\n * @returns {Array | ElementContent}\n *   hast node.\n */\nexport function imageReference(state, node) {\n  const id = String(node.identifier).toUpperCase()\n  const definition = state.definitionById.get(id)\n\n  if (!definition) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(definition.url || ''), alt: node.alt}\n\n  if (definition.title !== null && definition.title !== undefined) {\n    properties.title = definition.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Image} Image\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `image` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Image} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function image(state, node) {\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(node.url)}\n\n  if (node.alt !== null && node.alt !== undefined) {\n    properties.alt = node.alt\n  }\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `inlineCode` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {InlineCode} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function inlineCode(state, node) {\n  /** @type {Text} */\n  const text = {type: 'text', value: node.value.replace(/\\r?\\n|\\r/g, ' ')}\n  state.patch(node, text)\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'code',\n    properties: {},\n    children: [text]\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `linkReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {LinkReference} node\n *   mdast node.\n * @returns {Array | ElementContent}\n *   hast node.\n */\nexport function linkReference(state, node) {\n  const id = String(node.identifier).toUpperCase()\n  const definition = state.definitionById.get(id)\n\n  if (!definition) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(definition.url || '')}\n\n  if (definition.title !== null && definition.title !== undefined) {\n    properties.title = definition.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Link} Link\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `link` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Link} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function link(state, node) {\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(node.url)}\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').List} List\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `list` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {List} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function list(state, node) {\n  /** @type {Properties} */\n  const properties = {}\n  const results = state.all(node)\n  let index = -1\n\n  if (typeof node.start === 'number' && node.start !== 1) {\n    properties.start = node.start\n  }\n\n  // Like GitHub, add a class for custom styling.\n  while (++index < results.length) {\n    const child = results[index]\n\n    if (\n      child.type === 'element' &&\n      child.tagName === 'li' &&\n      child.properties &&\n      Array.isArray(child.properties.className) &&\n      child.properties.className.includes('task-list-item')\n    ) {\n      properties.className = ['contains-task-list']\n      break\n    }\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: node.ordered ? 'ol' : 'ul',\n    properties,\n    children: state.wrap(results, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `paragraph` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Paragraph} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function paragraph(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'p',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Parents} HastParents\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `root` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastRoot} node\n *   mdast node.\n * @returns {HastParents}\n *   hast node.\n */\nexport function root(state, node) {\n  /** @type {HastRoot} */\n  const result = {type: 'root', children: state.wrap(state.all(node))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `strong` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Strong} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strong(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'strong',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Table} Table\n * @typedef {import('../state.js').State} State\n */\n\nimport {pointEnd, pointStart} from 'unist-util-position'\n\n/**\n * Turn an mdast `table` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Table} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function table(state, node) {\n  const rows = state.all(node)\n  const firstRow = rows.shift()\n  /** @type {Array} */\n  const tableContent = []\n\n  if (firstRow) {\n    /** @type {Element} */\n    const head = {\n      type: 'element',\n      tagName: 'thead',\n      properties: {},\n      children: state.wrap([firstRow], true)\n    }\n    state.patch(node.children[0], head)\n    tableContent.push(head)\n  }\n\n  if (rows.length > 0) {\n    /** @type {Element} */\n    const body = {\n      type: 'element',\n      tagName: 'tbody',\n      properties: {},\n      children: state.wrap(rows, true)\n    }\n\n    const start = pointStart(node.children[1])\n    const end = pointEnd(node.children[node.children.length - 1])\n    if (start && end) body.position = {start, end}\n    tableContent.push(body)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'table',\n    properties: {},\n    children: state.wrap(tableContent, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `tableCell` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableCell} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function tableCell(state, node) {\n  // Note: this function is normally not called: see `table-row` for how rows\n  // and their cells are compiled.\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'td', // Assume body cell.\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Parents} Parents\n * @typedef {import('mdast').TableRow} TableRow\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `tableRow` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableRow} node\n *   mdast node.\n * @param {Parents | undefined} parent\n *   Parent of `node`.\n * @returns {Element}\n *   hast node.\n */\nexport function tableRow(state, node, parent) {\n  const siblings = parent ? parent.children : undefined\n  // Generate a body row when without parent.\n  const rowIndex = siblings ? siblings.indexOf(node) : 1\n  const tagName = rowIndex === 0 ? 'th' : 'td'\n  // To do: option to use `style`?\n  const align = parent && parent.type === 'table' ? parent.align : undefined\n  const length = align ? align.length : node.children.length\n  let cellIndex = -1\n  /** @type {Array} */\n  const cells = []\n\n  while (++cellIndex < length) {\n    // Note: can also be undefined.\n    const cell = node.children[cellIndex]\n    /** @type {Properties} */\n    const properties = {}\n    const alignValue = align ? align[cellIndex] : undefined\n\n    if (alignValue) {\n      properties.align = alignValue\n    }\n\n    /** @type {Element} */\n    let result = {type: 'element', tagName, properties, children: []}\n\n    if (cell) {\n      result.children = state.all(cell)\n      state.patch(cell, result)\n      result = state.applyData(cell, result)\n    }\n\n    cells.push(result)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'tr',\n    properties: {},\n    children: state.wrap(cells, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').Text} HastText\n * @typedef {import('mdast').Text} MdastText\n * @typedef {import('../state.js').State} State\n */\n\nimport {trimLines} from 'trim-lines'\n\n/**\n * Turn an mdast `text` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastText} node\n *   mdast node.\n * @returns {HastElement | HastText}\n *   hast node.\n */\nexport function text(state, node) {\n  /** @type {HastText} */\n  const result = {type: 'text', value: trimLines(String(node.value))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('../state.js').State} State\n */\n\n// Make VS Code show references to the above types.\n''\n\n/**\n * Turn an mdast `thematicBreak` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ThematicBreak} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function thematicBreak(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'hr',\n    properties: {},\n    children: []\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').ElementContent} HastElementContent\n * @typedef {import('hast').Nodes} HastNodes\n * @typedef {import('hast').Properties} HastProperties\n * @typedef {import('hast').RootContent} HastRootContent\n * @typedef {import('hast').Text} HastText\n *\n * @typedef {import('mdast').Definition} MdastDefinition\n * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition\n * @typedef {import('mdast').Nodes} MdastNodes\n * @typedef {import('mdast').Parents} MdastParents\n *\n * @typedef {import('vfile').VFile} VFile\n *\n * @typedef {import('./footer.js').FootnoteBackContentTemplate} FootnoteBackContentTemplate\n * @typedef {import('./footer.js').FootnoteBackLabelTemplate} FootnoteBackLabelTemplate\n */\n\n/**\n * @callback Handler\n *   Handle a node.\n * @param {State} state\n *   Info passed around.\n * @param {any} node\n *   mdast node to handle.\n * @param {MdastParents | undefined} parent\n *   Parent of `node`.\n * @returns {Array | HastElementContent | undefined}\n *   hast node.\n *\n * @typedef {Partial>} Handlers\n *   Handle nodes.\n *\n * @typedef Options\n *   Configuration (optional).\n * @property {boolean | null | undefined} [allowDangerousHtml=false]\n *   Whether to persist raw HTML in markdown in the hast tree (default:\n *   `false`).\n * @property {string | null | undefined} [clobberPrefix='user-content-']\n *   Prefix to use before the `id` property on footnotes to prevent them from\n *   *clobbering* (default: `'user-content-'`).\n *\n *   Pass `''` for trusted markdown and when you are careful with\n *   polyfilling.\n *   You could pass a different prefix.\n *\n *   DOM clobbering is this:\n *\n *   ```html\n *   

\n * \n * ```\n *\n * The above example shows that elements are made available by browsers, by\n * their ID, on the `window` object.\n * This is a security risk because you might be expecting some other variable\n * at that place.\n * It can also break polyfills.\n * Using a prefix solves these problems.\n * @property {VFile | null | undefined} [file]\n * Corresponding virtual file representing the input document (optional).\n * @property {FootnoteBackContentTemplate | string | null | undefined} [footnoteBackContent]\n * Content of the backreference back to references (default: `defaultFootnoteBackContent`).\n *\n * The default value is:\n *\n * ```js\n * function defaultFootnoteBackContent(_, rereferenceIndex) {\n * const result = [{type: 'text', value: '↩'}]\n *\n * if (rereferenceIndex > 1) {\n * result.push({\n * type: 'element',\n * tagName: 'sup',\n * properties: {},\n * children: [{type: 'text', value: String(rereferenceIndex)}]\n * })\n * }\n *\n * return result\n * }\n * ```\n *\n * This content is used in the `a` element of each backreference (the `↩`\n * links).\n * @property {FootnoteBackLabelTemplate | string | null | undefined} [footnoteBackLabel]\n * Label to describe the backreference back to references (default:\n * `defaultFootnoteBackLabel`).\n *\n * The default value is:\n *\n * ```js\n * function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {\n * return (\n * 'Back to reference ' +\n * (referenceIndex + 1) +\n * (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')\n * )\n * }\n * ```\n *\n * Change it when the markdown is not in English.\n *\n * This label is used in the `ariaLabel` property on each backreference\n * (the `↩` links).\n * It affects users of assistive technology.\n * @property {string | null | undefined} [footnoteLabel='Footnotes']\n * Textual label to use for the footnotes section (default: `'Footnotes'`).\n *\n * Change it when the markdown is not in English.\n *\n * This label is typically hidden visually (assuming a `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass different properties with the `footnoteLabelProperties` option.\n * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]\n * Properties to use on the footnote label (default: `{className:\n * ['sr-only']}`).\n *\n * Change it to show the label and add other properties.\n *\n * This label is typically hidden visually (assuming an `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass an empty string.\n * You can also add different properties.\n *\n * > **Note**: `id: 'footnote-label'` is always added, because footnote\n * > calls use it with `aria-describedby` to provide an accessible label.\n * @property {string | null | undefined} [footnoteLabelTagName='h2']\n * HTML tag name to use for the footnote label element (default: `'h2'`).\n *\n * Change it to match your document structure.\n *\n * This label is typically hidden visually (assuming a `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass different properties with the `footnoteLabelProperties` option.\n * @property {Handlers | null | undefined} [handlers]\n * Extra handlers for nodes (optional).\n * @property {Array | null | undefined} [passThrough]\n * List of custom mdast node types to pass through (keep) in hast (note that\n * the node itself is passed, but eventual children are transformed)\n * (optional).\n * @property {Handler | null | undefined} [unknownHandler]\n * Handler for all unknown nodes (optional).\n *\n * @typedef State\n * Info passed around.\n * @property {(node: MdastNodes) => Array} all\n * Transform the children of an mdast parent to hast.\n * @property {(from: MdastNodes, to: Type) => HastElement | Type} applyData\n * Honor the `data` of `from`, and generate an element instead of `node`.\n * @property {Map} definitionById\n * Definitions by their identifier.\n * @property {Map} footnoteById\n * Footnote definitions by their identifier.\n * @property {Map} footnoteCounts\n * Counts for how often the same footnote was called.\n * @property {Array} footnoteOrder\n * Identifiers of order when footnote calls first appear in tree order.\n * @property {Handlers} handlers\n * Applied handlers.\n * @property {(node: MdastNodes, parent: MdastParents | undefined) => Array | HastElementContent | undefined} one\n * Transform an mdast node to hast.\n * @property {Options} options\n * Configuration.\n * @property {(from: MdastNodes, node: HastNodes) => undefined} patch\n * Copy a node’s positional info.\n * @property {(nodes: Array, loose?: boolean | undefined) => Array} wrap\n * Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.\n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {visit} from 'unist-util-visit'\nimport {position} from 'unist-util-position'\nimport {handlers as defaultHandlers} from './handlers/index.js'\n\nconst own = {}.hasOwnProperty\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Create `state` from an mdast tree.\n *\n * @param {MdastNodes} tree\n * mdast node to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {State}\n * `state` function.\n */\nexport function createState(tree, options) {\n const settings = options || emptyOptions\n /** @type {Map} */\n const definitionById = new Map()\n /** @type {Map} */\n const footnoteById = new Map()\n /** @type {Map} */\n const footnoteCounts = new Map()\n /** @type {Handlers} */\n // @ts-expect-error: the root handler returns a root.\n // Hard to type.\n const handlers = {...defaultHandlers, ...settings.handlers}\n\n /** @type {State} */\n const state = {\n all,\n applyData,\n definitionById,\n footnoteById,\n footnoteCounts,\n footnoteOrder: [],\n handlers,\n one,\n options: settings,\n patch,\n wrap\n }\n\n visit(tree, function (node) {\n if (node.type === 'definition' || node.type === 'footnoteDefinition') {\n const map = node.type === 'definition' ? definitionById : footnoteById\n const id = String(node.identifier).toUpperCase()\n\n // Mimick CM behavior of link definitions.\n // See: .\n if (!map.has(id)) {\n // @ts-expect-error: node type matches map.\n map.set(id, node)\n }\n }\n })\n\n return state\n\n /**\n * Transform an mdast node into a hast node.\n *\n * @param {MdastNodes} node\n * mdast node.\n * @param {MdastParents | undefined} [parent]\n * Parent of `node`.\n * @returns {Array | HastElementContent | undefined}\n * Resulting hast node.\n */\n function one(node, parent) {\n const type = node.type\n const handle = state.handlers[type]\n\n if (own.call(state.handlers, type) && handle) {\n return handle(state, node, parent)\n }\n\n if (state.options.passThrough && state.options.passThrough.includes(type)) {\n if ('children' in node) {\n const {children, ...shallow} = node\n const result = structuredClone(shallow)\n // @ts-expect-error: TS doesn’t understand…\n result.children = state.all(node)\n // @ts-expect-error: TS doesn’t understand…\n return result\n }\n\n // @ts-expect-error: it’s custom.\n return structuredClone(node)\n }\n\n const unknown = state.options.unknownHandler || defaultUnknownHandler\n\n return unknown(state, node, parent)\n }\n\n /**\n * Transform the children of an mdast node into hast nodes.\n *\n * @param {MdastNodes} parent\n * mdast node to compile\n * @returns {Array}\n * Resulting hast nodes.\n */\n function all(parent) {\n /** @type {Array} */\n const values = []\n\n if ('children' in parent) {\n const nodes = parent.children\n let index = -1\n while (++index < nodes.length) {\n const result = state.one(nodes[index], parent)\n\n // To do: see if we van clean this? Can we merge texts?\n if (result) {\n if (index && nodes[index - 1].type === 'break') {\n if (!Array.isArray(result) && result.type === 'text') {\n result.value = trimMarkdownSpaceStart(result.value)\n }\n\n if (!Array.isArray(result) && result.type === 'element') {\n const head = result.children[0]\n\n if (head && head.type === 'text') {\n head.value = trimMarkdownSpaceStart(head.value)\n }\n }\n }\n\n if (Array.isArray(result)) {\n values.push(...result)\n } else {\n values.push(result)\n }\n }\n }\n }\n\n return values\n }\n}\n\n/**\n * Copy a node’s positional info.\n *\n * @param {MdastNodes} from\n * mdast node to copy from.\n * @param {HastNodes} to\n * hast node to copy into.\n * @returns {undefined}\n * Nothing.\n */\nfunction patch(from, to) {\n if (from.position) to.position = position(from)\n}\n\n/**\n * Honor the `data` of `from` and maybe generate an element instead of `to`.\n *\n * @template {HastNodes} Type\n * Node type.\n * @param {MdastNodes} from\n * mdast node to use data from.\n * @param {Type} to\n * hast node to change.\n * @returns {HastElement | Type}\n * Nothing.\n */\nfunction applyData(from, to) {\n /** @type {HastElement | Type} */\n let result = to\n\n // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n if (from && from.data) {\n const hName = from.data.hName\n const hChildren = from.data.hChildren\n const hProperties = from.data.hProperties\n\n if (typeof hName === 'string') {\n // Transforming the node resulted in an element with a different name\n // than wanted:\n if (result.type === 'element') {\n result.tagName = hName\n }\n // Transforming the node resulted in a non-element, which happens for\n // raw, text, and root nodes (unless custom handlers are passed).\n // The intent of `hName` is to create an element, but likely also to keep\n // the content around (otherwise: pass `hChildren`).\n else {\n /** @type {Array} */\n // @ts-expect-error: assume no doctypes in `root`.\n const children = 'children' in result ? result.children : [result]\n result = {type: 'element', tagName: hName, properties: {}, children}\n }\n }\n\n if (result.type === 'element' && hProperties) {\n Object.assign(result.properties, structuredClone(hProperties))\n }\n\n if (\n 'children' in result &&\n result.children &&\n hChildren !== null &&\n hChildren !== undefined\n ) {\n result.children = hChildren\n }\n }\n\n return result\n}\n\n/**\n * Transform an unknown node.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdastNodes} node\n * Unknown mdast node.\n * @returns {HastElement | HastText}\n * Resulting hast node.\n */\nfunction defaultUnknownHandler(state, node) {\n const data = node.data || {}\n /** @type {HastElement | HastText} */\n const result =\n 'value' in node &&\n !(own.call(data, 'hProperties') || own.call(data, 'hChildren'))\n ? {type: 'text', value: node.value}\n : {\n type: 'element',\n tagName: 'div',\n properties: {},\n children: state.all(node)\n }\n\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * Wrap `nodes` with line endings between each node.\n *\n * @template {HastRootContent} Type\n * Node type.\n * @param {Array} nodes\n * List of nodes to wrap.\n * @param {boolean | undefined} [loose=false]\n * Whether to add line endings at start and end (default: `false`).\n * @returns {Array}\n * Wrapped nodes.\n */\nexport function wrap(nodes, loose) {\n /** @type {Array} */\n const result = []\n let index = -1\n\n if (loose) {\n result.push({type: 'text', value: '\\n'})\n }\n\n while (++index < nodes.length) {\n if (index) result.push({type: 'text', value: '\\n'})\n result.push(nodes[index])\n }\n\n if (loose && nodes.length > 0) {\n result.push({type: 'text', value: '\\n'})\n }\n\n return result\n}\n\n/**\n * Trim spaces and tabs at the start of `value`.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Result.\n */\nfunction trimMarkdownSpaceStart(value) {\n let index = 0\n let code = value.charCodeAt(index)\n\n while (code === 9 || code === 32) {\n index++\n code = value.charCodeAt(index)\n }\n\n return value.slice(index)\n}\n","/**\n * @typedef {import('hast').Nodes} HastNodes\n * @typedef {import('mdast').Nodes} MdastNodes\n * @typedef {import('./state.js').Options} Options\n */\n\nimport {ok as assert} from 'devlop'\nimport {footer} from './footer.js'\nimport {createState} from './state.js'\n\n/**\n * Transform mdast to hast.\n *\n * ##### Notes\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most utilities ignore `raw` nodes but two notable ones don’t:\n *\n * * `hast-util-to-html` also has an option `allowDangerousHtml` which will\n * output the raw HTML.\n * This is typically discouraged as noted by the option name but is useful\n * if you completely trust authors\n * * `hast-util-raw` can handle the raw embedded HTML strings by parsing them\n * into standard hast nodes (`element`, `text`, etc).\n * This is a heavy task as it needs a full HTML parser, but it is the only\n * way to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark, which we follow by default.\n * They are supported by GitHub, so footnotes can be enabled in markdown with\n * `mdast-util-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes, which is hidden for sighted users but shown to\n * assistive technology.\n * When your page is not in English, you must define translated values.\n *\n * Back references use ARIA attributes, but the section label itself uses a\n * heading that is hidden with an `sr-only` class.\n * To show it to sighted users, define different attributes in\n * `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem, as it links footnote calls to footnote\n * definitions on the page through `id` attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n *

\n * \n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * Example: headings (DOM clobbering) in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value` (and doesn’t have `data.hName`,\n * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`\n * node\n * * otherwise, create a `
` element (which could be changed with\n * `data.hName`), with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @param {MdastNodes} tree\n * mdast tree.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {HastNodes}\n * hast tree.\n */\nexport function toHast(tree, options) {\n const state = createState(tree, options)\n const node = state.one(tree, undefined)\n const foot = footer(state)\n /** @type {HastNodes} */\n const result = Array.isArray(node)\n ? {type: 'root', children: node}\n : node || {type: 'root', children: []}\n\n if (foot) {\n // If there’s a footer, there were definitions, meaning block\n // content.\n // So `result` is a parent node.\n assert('children' in result)\n result.children.push({type: 'text', value: '\\n'}, foot)\n }\n\n return result\n}\n","// Include `data` fields in mdast and `raw` nodes in hast.\n/// \n\n/**\n * @import {Root as HastRoot} from 'hast'\n * @import {Root as MdastRoot} from 'mdast'\n * @import {Options as ToHastOptions} from 'mdast-util-to-hast'\n * @import {Processor} from 'unified'\n * @import {VFile} from 'vfile'\n */\n\n/**\n * @typedef {Omit} Options\n *\n * @callback TransformBridge\n * Bridge-mode.\n *\n * Runs the destination with the new hast tree.\n * Discards result.\n * @param {MdastRoot} tree\n * Tree.\n * @param {VFile} file\n * File.\n * @returns {Promise}\n * Nothing.\n *\n * @callback TransformMutate\n * Mutate-mode.\n *\n * Further transformers run on the hast tree.\n * @param {MdastRoot} tree\n * Tree.\n * @param {VFile} file\n * File.\n * @returns {HastRoot}\n * Tree (hast).\n */\n\nimport {toHast} from 'mdast-util-to-hast'\n\n/**\n * Turn markdown into HTML.\n *\n * ##### Notes\n *\n * ###### Signature\n *\n * * if a processor is given, runs the (rehype) plugins used on it with a\n * hast tree, then discards the result (*bridge mode*)\n * * otherwise, returns a hast tree, the plugins used after `remarkRehype`\n * are rehype plugins (*mutate mode*)\n *\n * > 👉 **Note**: It’s highly unlikely that you want to pass a `processor`.\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most plugins ignore `raw` nodes but two notable ones don’t:\n *\n * * `rehype-stringify` also has an option `allowDangerousHtml` which will\n * output the raw HTML.\n * This is typically discouraged as noted by the option name but is useful if\n * you completely trust authors\n * * `rehype-raw` can handle the raw embedded HTML strings by parsing them\n * into standard hast nodes (`element`, `text`, etc).\n * This is a heavy task as it needs a full HTML parser, but it is the only way\n * to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark, which we follow by default.\n * They are supported by GitHub, so footnotes can be enabled in markdown with\n * `remark-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes, which is hidden for sighted users but shown to\n * assistive technology.\n * When your page is not in English, you must define translated values.\n *\n * Back references use ARIA attributes, but the section label itself uses a\n * heading that is hidden with an `sr-only` class.\n * To show it to sighted users, define different attributes in\n * `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem, as it links footnote calls to footnote\n * definitions on the page through `id` attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n *

\n * \n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * *Example: headings (DOM clobbering)* in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value` (and doesn’t have `data.hName`,\n * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`\n * node\n * * otherwise, create a `
` element (which could be changed with\n * `data.hName`), with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @overload\n * @param {Processor} processor\n * @param {Readonly | null | undefined} [options]\n * @returns {TransformBridge}\n *\n * @overload\n * @param {Readonly | null | undefined} [options]\n * @returns {TransformMutate}\n *\n * @param {Readonly | Processor | null | undefined} [destination]\n * Processor or configuration (optional).\n * @param {Readonly | null | undefined} [options]\n * When a processor was given, configuration (optional).\n * @returns {TransformBridge | TransformMutate}\n * Transform.\n */\nexport default function remarkRehype(destination, options) {\n if (destination && 'run' in destination) {\n /**\n * @type {TransformBridge}\n */\n return async function (tree, file) {\n // Cast because root in -> root out.\n const hastTree = /** @type {HastRoot} */ (\n toHast(tree, {file, ...options})\n )\n await destination.run(hastTree, file)\n }\n }\n\n /**\n * @type {TransformMutate}\n */\n return function (tree, file) {\n // Cast because root in -> root out.\n // To do: in the future, disallow ` || options` fallback.\n // With `unified-engine`, `destination` can be `undefined` but\n // `options` will be the file set.\n // We should not pass that as `options`.\n return /** @type {HastRoot} */ (\n toHast(tree, {file, ...(destination || options)})\n )\n }\n}\n","/**\n * Throw a given error.\n *\n * @param {Error|null|undefined} [error]\n * Maybe error.\n * @returns {asserts error is null|undefined}\n */\nexport function bail(error) {\n if (error) {\n throw error\n }\n}\n","export default function isPlainObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);\n}\n","// To do: remove `void`s\n// To do: remove `null` from output of our APIs, allow it as user APIs.\n\n/**\n * @typedef {(error?: Error | null | undefined, ...output: Array) => void} Callback\n * Callback.\n *\n * @typedef {(...input: Array) => any} Middleware\n * Ware.\n *\n * @typedef Pipeline\n * Pipeline.\n * @property {Run} run\n * Run the pipeline.\n * @property {Use} use\n * Add middleware.\n *\n * @typedef {(...input: Array) => void} Run\n * Call all middleware.\n *\n * Calls `done` on completion with either an error or the output of the\n * last middleware.\n *\n * > 👉 **Note**: as the length of input defines whether async functions get a\n * > `next` function,\n * > it’s recommended to keep `input` at one value normally.\n\n *\n * @typedef {(fn: Middleware) => Pipeline} Use\n * Add middleware.\n */\n\n/**\n * Create new middleware.\n *\n * @returns {Pipeline}\n * Pipeline.\n */\nexport function trough() {\n /** @type {Array} */\n const fns = []\n /** @type {Pipeline} */\n const pipeline = {run, use}\n\n return pipeline\n\n /** @type {Run} */\n function run(...values) {\n let middlewareIndex = -1\n /** @type {Callback} */\n const callback = values.pop()\n\n if (typeof callback !== 'function') {\n throw new TypeError('Expected function as last argument, not ' + callback)\n }\n\n next(null, ...values)\n\n /**\n * Run the next `fn`, or we’re done.\n *\n * @param {Error | null | undefined} error\n * @param {Array} output\n */\n function next(error, ...output) {\n const fn = fns[++middlewareIndex]\n let index = -1\n\n if (error) {\n callback(error)\n return\n }\n\n // Copy non-nullish input into values.\n while (++index < values.length) {\n if (output[index] === null || output[index] === undefined) {\n output[index] = values[index]\n }\n }\n\n // Save the newly created `output` for the next call.\n values = output\n\n // Next or done.\n if (fn) {\n wrap(fn, next)(...output)\n } else {\n callback(null, ...output)\n }\n }\n }\n\n /** @type {Use} */\n function use(middelware) {\n if (typeof middelware !== 'function') {\n throw new TypeError(\n 'Expected `middelware` to be a function, not ' + middelware\n )\n }\n\n fns.push(middelware)\n return pipeline\n }\n}\n\n/**\n * Wrap `middleware` into a uniform interface.\n *\n * You can pass all input to the resulting function.\n * `callback` is then called with the output of `middleware`.\n *\n * If `middleware` accepts more arguments than the later given in input,\n * an extra `done` function is passed to it after that input,\n * which must be called by `middleware`.\n *\n * The first value in `input` is the main input value.\n * All other input values are the rest input values.\n * The values given to `callback` are the input values,\n * merged with every non-nullish output value.\n *\n * * if `middleware` throws an error,\n * returns a promise that is rejected,\n * or calls the given `done` function with an error,\n * `callback` is called with that error\n * * if `middleware` returns a value or returns a promise that is resolved,\n * that value is the main output value\n * * if `middleware` calls `done`,\n * all non-nullish values except for the first one (the error) overwrite the\n * output values\n *\n * @param {Middleware} middleware\n * Function to wrap.\n * @param {Callback} callback\n * Callback called with the output of `middleware`.\n * @returns {Run}\n * Wrapped middleware.\n */\nexport function wrap(middleware, callback) {\n /** @type {boolean} */\n let called\n\n return wrapped\n\n /**\n * Call `middleware`.\n * @this {any}\n * @param {Array} parameters\n * @returns {void}\n */\n function wrapped(...parameters) {\n const fnExpectsCallback = middleware.length > parameters.length\n /** @type {any} */\n let result\n\n if (fnExpectsCallback) {\n parameters.push(done)\n }\n\n try {\n result = middleware.apply(this, parameters)\n } catch (error) {\n const exception = /** @type {Error} */ (error)\n\n // Well, this is quite the pickle.\n // `middleware` received a callback and called it synchronously, but that\n // threw an error.\n // The only thing left to do is to throw the thing instead.\n if (fnExpectsCallback && called) {\n throw exception\n }\n\n return done(exception)\n }\n\n if (!fnExpectsCallback) {\n if (result && result.then && typeof result.then === 'function') {\n result.then(then, done)\n } else if (result instanceof Error) {\n done(result)\n } else {\n then(result)\n }\n }\n }\n\n /**\n * Call `callback`, only once.\n *\n * @type {Callback}\n */\n function done(error, ...output) {\n if (!called) {\n called = true\n callback(error, ...output)\n }\n }\n\n /**\n * Call `done` with one value.\n *\n * @param {any} [value]\n */\n function then(value) {\n done(null, value)\n }\n}\n","// A derivative work based on:\n// .\n// Which is licensed:\n//\n// MIT License\n//\n// Copyright (c) 2013 James Halliday\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n// A derivative work based on:\n//\n// Parts of that are extracted from Node’s internal `path` module:\n// .\n// Which is licensed:\n//\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nexport const minpath = {basename, dirname, extname, join, sep: '/'}\n\n/* eslint-disable max-depth, complexity */\n\n/**\n * Get the basename from a path.\n *\n * @param {string} path\n * File path.\n * @param {string | null | undefined} [extname]\n * Extension to strip.\n * @returns {string}\n * Stem or basename.\n */\nfunction basename(path, extname) {\n if (extname !== undefined && typeof extname !== 'string') {\n throw new TypeError('\"ext\" argument must be a string')\n }\n\n assertPath(path)\n let start = 0\n let end = -1\n let index = path.length\n /** @type {boolean | undefined} */\n let seenNonSlash\n\n if (\n extname === undefined ||\n extname.length === 0 ||\n extname.length > path.length\n ) {\n while (index--) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1\n break\n }\n } else if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // path component.\n seenNonSlash = true\n end = index + 1\n }\n }\n\n return end < 0 ? '' : path.slice(start, end)\n }\n\n if (extname === path) {\n return ''\n }\n\n let firstNonSlashEnd = -1\n let extnameIndex = extname.length - 1\n\n while (index--) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1\n break\n }\n } else {\n if (firstNonSlashEnd < 0) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching.\n seenNonSlash = true\n firstNonSlashEnd = index + 1\n }\n\n if (extnameIndex > -1) {\n // Try to match the explicit extension.\n if (path.codePointAt(index) === extname.codePointAt(extnameIndex--)) {\n if (extnameIndex < 0) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = index\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extnameIndex = -1\n end = firstNonSlashEnd\n }\n }\n }\n }\n\n if (start === end) {\n end = firstNonSlashEnd\n } else if (end < 0) {\n end = path.length\n }\n\n return path.slice(start, end)\n}\n\n/**\n * Get the dirname from a path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * File path.\n */\nfunction dirname(path) {\n assertPath(path)\n\n if (path.length === 0) {\n return '.'\n }\n\n let end = -1\n let index = path.length\n /** @type {boolean | undefined} */\n let unmatchedSlash\n\n // Prefix `--` is important to not run on `0`.\n while (--index) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n if (unmatchedSlash) {\n end = index\n break\n }\n } else if (!unmatchedSlash) {\n // We saw the first non-path separator\n unmatchedSlash = true\n }\n }\n\n return end < 0\n ? path.codePointAt(0) === 47 /* `/` */\n ? '/'\n : '.'\n : end === 1 && path.codePointAt(0) === 47 /* `/` */\n ? '//'\n : path.slice(0, end)\n}\n\n/**\n * Get an extname from a path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * Extname.\n */\nfunction extname(path) {\n assertPath(path)\n\n let index = path.length\n\n let end = -1\n let startPart = 0\n let startDot = -1\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find.\n let preDotState = 0\n /** @type {boolean | undefined} */\n let unmatchedSlash\n\n while (index--) {\n const code = path.codePointAt(index)\n\n if (code === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (unmatchedSlash) {\n startPart = index + 1\n break\n }\n\n continue\n }\n\n if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // extension.\n unmatchedSlash = true\n end = index + 1\n }\n\n if (code === 46 /* `.` */) {\n // If this is our first dot, mark it as the start of our extension.\n if (startDot < 0) {\n startDot = index\n } else if (preDotState !== 1) {\n preDotState = 1\n }\n } else if (startDot > -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension.\n preDotState = -1\n }\n }\n\n if (\n startDot < 0 ||\n end < 0 ||\n // We saw a non-dot character immediately before the dot.\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly `..`.\n (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)\n ) {\n return ''\n }\n\n return path.slice(startDot, end)\n}\n\n/**\n * Join segments from a path.\n *\n * @param {Array} segments\n * Path segments.\n * @returns {string}\n * File path.\n */\nfunction join(...segments) {\n let index = -1\n /** @type {string | undefined} */\n let joined\n\n while (++index < segments.length) {\n assertPath(segments[index])\n\n if (segments[index]) {\n joined =\n joined === undefined ? segments[index] : joined + '/' + segments[index]\n }\n }\n\n return joined === undefined ? '.' : normalize(joined)\n}\n\n/**\n * Normalize a basic file path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * File path.\n */\n// Note: `normalize` is not exposed as `path.normalize`, so some code is\n// manually removed from it.\nfunction normalize(path) {\n assertPath(path)\n\n const absolute = path.codePointAt(0) === 47 /* `/` */\n\n // Normalize the path according to POSIX rules.\n let value = normalizeString(path, !absolute)\n\n if (value.length === 0 && !absolute) {\n value = '.'\n }\n\n if (value.length > 0 && path.codePointAt(path.length - 1) === 47 /* / */) {\n value += '/'\n }\n\n return absolute ? '/' + value : value\n}\n\n/**\n * Resolve `.` and `..` elements in a path with directory names.\n *\n * @param {string} path\n * File path.\n * @param {boolean} allowAboveRoot\n * Whether `..` can move above root.\n * @returns {string}\n * File path.\n */\nfunction normalizeString(path, allowAboveRoot) {\n let result = ''\n let lastSegmentLength = 0\n let lastSlash = -1\n let dots = 0\n let index = -1\n /** @type {number | undefined} */\n let code\n /** @type {number} */\n let lastSlashIndex\n\n while (++index <= path.length) {\n if (index < path.length) {\n code = path.codePointAt(index)\n } else if (code === 47 /* `/` */) {\n break\n } else {\n code = 47 /* `/` */\n }\n\n if (code === 47 /* `/` */) {\n if (lastSlash === index - 1 || dots === 1) {\n // Empty.\n } else if (lastSlash !== index - 1 && dots === 2) {\n if (\n result.length < 2 ||\n lastSegmentLength !== 2 ||\n result.codePointAt(result.length - 1) !== 46 /* `.` */ ||\n result.codePointAt(result.length - 2) !== 46 /* `.` */\n ) {\n if (result.length > 2) {\n lastSlashIndex = result.lastIndexOf('/')\n\n if (lastSlashIndex !== result.length - 1) {\n if (lastSlashIndex < 0) {\n result = ''\n lastSegmentLength = 0\n } else {\n result = result.slice(0, lastSlashIndex)\n lastSegmentLength = result.length - 1 - result.lastIndexOf('/')\n }\n\n lastSlash = index\n dots = 0\n continue\n }\n } else if (result.length > 0) {\n result = ''\n lastSegmentLength = 0\n lastSlash = index\n dots = 0\n continue\n }\n }\n\n if (allowAboveRoot) {\n result = result.length > 0 ? result + '/..' : '..'\n lastSegmentLength = 2\n }\n } else {\n if (result.length > 0) {\n result += '/' + path.slice(lastSlash + 1, index)\n } else {\n result = path.slice(lastSlash + 1, index)\n }\n\n lastSegmentLength = index - lastSlash - 1\n }\n\n lastSlash = index\n dots = 0\n } else if (code === 46 /* `.` */ && dots > -1) {\n dots++\n } else {\n dots = -1\n }\n }\n\n return result\n}\n\n/**\n * Make sure `path` is a string.\n *\n * @param {string} path\n * File path.\n * @returns {asserts path is string}\n * Nothing.\n */\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError(\n 'Path must be a string. Received ' + JSON.stringify(path)\n )\n }\n}\n\n/* eslint-enable max-depth, complexity */\n","// Somewhat based on:\n// .\n// But I don’t think one tiny line of code can be copyrighted. 😅\nexport const minproc = {cwd}\n\nfunction cwd() {\n return '/'\n}\n","/**\n * Checks if a value has the shape of a WHATWG URL object.\n *\n * Using a symbol or instanceof would not be able to recognize URL objects\n * coming from other implementations (e.g. in Electron), so instead we are\n * checking some well known properties for a lack of a better test.\n *\n * We use `href` and `protocol` as they are the only properties that are\n * easy to retrieve and calculate due to the lazy nature of the getters.\n *\n * We check for auth attribute to distinguish legacy url instance with\n * WHATWG URL instance.\n *\n * @param {unknown} fileUrlOrPath\n * File path or URL.\n * @returns {fileUrlOrPath is URL}\n * Whether it’s a URL.\n */\n// From: \nexport function isUrl(fileUrlOrPath) {\n return Boolean(\n fileUrlOrPath !== null &&\n typeof fileUrlOrPath === 'object' &&\n 'href' in fileUrlOrPath &&\n fileUrlOrPath.href &&\n 'protocol' in fileUrlOrPath &&\n fileUrlOrPath.protocol &&\n // @ts-expect-error: indexing is fine.\n fileUrlOrPath.auth === undefined\n )\n}\n","import {isUrl} from './minurl.shared.js'\n\nexport {isUrl} from './minurl.shared.js'\n\n// See: \n\n/**\n * @param {URL | string} path\n * File URL.\n * @returns {string}\n * File URL.\n */\nexport function urlToPath(path) {\n if (typeof path === 'string') {\n path = new URL(path)\n } else if (!isUrl(path)) {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'The \"path\" argument must be of type string or an instance of URL. Received `' +\n path +\n '`'\n )\n error.code = 'ERR_INVALID_ARG_TYPE'\n throw error\n }\n\n if (path.protocol !== 'file:') {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError('The URL must be of scheme file')\n error.code = 'ERR_INVALID_URL_SCHEME'\n throw error\n }\n\n return getPathFromURLPosix(path)\n}\n\n/**\n * Get a path from a POSIX URL.\n *\n * @param {URL} url\n * URL.\n * @returns {string}\n * File path.\n */\nfunction getPathFromURLPosix(url) {\n if (url.hostname !== '') {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'File URL host must be \"localhost\" or empty on darwin'\n )\n error.code = 'ERR_INVALID_FILE_URL_HOST'\n throw error\n }\n\n const pathname = url.pathname\n let index = -1\n\n while (++index < pathname.length) {\n if (\n pathname.codePointAt(index) === 37 /* `%` */ &&\n pathname.codePointAt(index + 1) === 50 /* `2` */\n ) {\n const third = pathname.codePointAt(index + 2)\n if (third === 70 /* `F` */ || third === 102 /* `f` */) {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'File URL path must not include encoded / characters'\n )\n error.code = 'ERR_INVALID_FILE_URL_PATH'\n throw error\n }\n }\n }\n\n return decodeURIComponent(pathname)\n}\n","/**\n * @import {Node, Point, Position} from 'unist'\n * @import {Options as MessageOptions} from 'vfile-message'\n * @import {Compatible, Data, Map, Options, Value} from 'vfile'\n */\n\n/**\n * @typedef {object & {type: string, position?: Position | undefined}} NodeLike\n */\n\nimport {VFileMessage} from 'vfile-message'\nimport {minpath} from '#minpath'\nimport {minproc} from '#minproc'\nimport {urlToPath, isUrl} from '#minurl'\n\n/**\n * Order of setting (least specific to most), we need this because otherwise\n * `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a\n * stem can be set.\n */\nconst order = /** @type {const} */ ([\n 'history',\n 'path',\n 'basename',\n 'stem',\n 'extname',\n 'dirname'\n])\n\nexport class VFile {\n /**\n * Create a new virtual file.\n *\n * `options` is treated as:\n *\n * * `string` or `Uint8Array` — `{value: options}`\n * * `URL` — `{path: options}`\n * * `VFile` — shallow copies its data over to the new file\n * * `object` — all fields are shallow copied over to the new file\n *\n * Path related fields are set in the following order (least specific to\n * most specific): `history`, `path`, `basename`, `stem`, `extname`,\n * `dirname`.\n *\n * You cannot set `dirname` or `extname` without setting either `history`,\n * `path`, `basename`, or `stem` too.\n *\n * @param {Compatible | null | undefined} [value]\n * File value.\n * @returns\n * New instance.\n */\n constructor(value) {\n /** @type {Options | VFile} */\n let options\n\n if (!value) {\n options = {}\n } else if (isUrl(value)) {\n options = {path: value}\n } else if (typeof value === 'string' || isUint8Array(value)) {\n options = {value}\n } else {\n options = value\n }\n\n /* eslint-disable no-unused-expressions */\n\n /**\n * Base of `path` (default: `process.cwd()` or `'/'` in browsers).\n *\n * @type {string}\n */\n // Prevent calling `cwd` (which could be expensive) if it’s not needed;\n // the empty string will be overridden in the next block.\n this.cwd = 'cwd' in options ? '' : minproc.cwd()\n\n /**\n * Place to store custom info (default: `{}`).\n *\n * It’s OK to store custom data directly on the file but moving it to\n * `data` is recommended.\n *\n * @type {Data}\n */\n this.data = {}\n\n /**\n * List of file paths the file moved between.\n *\n * The first is the original path and the last is the current path.\n *\n * @type {Array}\n */\n this.history = []\n\n /**\n * List of messages associated with the file.\n *\n * @type {Array}\n */\n this.messages = []\n\n /**\n * Raw value.\n *\n * @type {Value}\n */\n this.value\n\n // The below are non-standard, they are “well-known”.\n // As in, used in several tools.\n /**\n * Source map.\n *\n * This type is equivalent to the `RawSourceMap` type from the `source-map`\n * module.\n *\n * @type {Map | null | undefined}\n */\n this.map\n\n /**\n * Custom, non-string, compiled, representation.\n *\n * This is used by unified to store non-string results.\n * One example is when turning markdown into React nodes.\n *\n * @type {unknown}\n */\n this.result\n\n /**\n * Whether a file was saved to disk.\n *\n * This is used by vfile reporters.\n *\n * @type {boolean}\n */\n this.stored\n /* eslint-enable no-unused-expressions */\n\n // Set path related properties in the correct order.\n let index = -1\n\n while (++index < order.length) {\n const field = order[index]\n\n // Note: we specifically use `in` instead of `hasOwnProperty` to accept\n // `vfile`s too.\n if (\n field in options &&\n options[field] !== undefined &&\n options[field] !== null\n ) {\n // @ts-expect-error: TS doesn’t understand basic reality.\n this[field] = field === 'history' ? [...options[field]] : options[field]\n }\n }\n\n /** @type {string} */\n let field\n\n // Set non-path related properties.\n for (field in options) {\n // @ts-expect-error: fine to set other things.\n if (!order.includes(field)) {\n // @ts-expect-error: fine to set other things.\n this[field] = options[field]\n }\n }\n }\n\n /**\n * Get the basename (including extname) (example: `'index.min.js'`).\n *\n * @returns {string | undefined}\n * Basename.\n */\n get basename() {\n return typeof this.path === 'string'\n ? minpath.basename(this.path)\n : undefined\n }\n\n /**\n * Set basename (including extname) (`'index.min.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} basename\n * Basename.\n * @returns {undefined}\n * Nothing.\n */\n set basename(basename) {\n assertNonEmpty(basename, 'basename')\n assertPart(basename, 'basename')\n this.path = minpath.join(this.dirname || '', basename)\n }\n\n /**\n * Get the parent path (example: `'~'`).\n *\n * @returns {string | undefined}\n * Dirname.\n */\n get dirname() {\n return typeof this.path === 'string'\n ? minpath.dirname(this.path)\n : undefined\n }\n\n /**\n * Set the parent path (example: `'~'`).\n *\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} dirname\n * Dirname.\n * @returns {undefined}\n * Nothing.\n */\n set dirname(dirname) {\n assertPath(this.basename, 'dirname')\n this.path = minpath.join(dirname || '', this.basename)\n }\n\n /**\n * Get the extname (including dot) (example: `'.js'`).\n *\n * @returns {string | undefined}\n * Extname.\n */\n get extname() {\n return typeof this.path === 'string'\n ? minpath.extname(this.path)\n : undefined\n }\n\n /**\n * Set the extname (including dot) (example: `'.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} extname\n * Extname.\n * @returns {undefined}\n * Nothing.\n */\n set extname(extname) {\n assertPart(extname, 'extname')\n assertPath(this.dirname, 'extname')\n\n if (extname) {\n if (extname.codePointAt(0) !== 46 /* `.` */) {\n throw new Error('`extname` must start with `.`')\n }\n\n if (extname.includes('.', 1)) {\n throw new Error('`extname` cannot contain multiple dots')\n }\n }\n\n this.path = minpath.join(this.dirname, this.stem + (extname || ''))\n }\n\n /**\n * Get the full path (example: `'~/index.min.js'`).\n *\n * @returns {string}\n * Path.\n */\n get path() {\n return this.history[this.history.length - 1]\n }\n\n /**\n * Set the full path (example: `'~/index.min.js'`).\n *\n * Cannot be nullified.\n * You can set a file URL (a `URL` object with a `file:` protocol) which will\n * be turned into a path with `url.fileURLToPath`.\n *\n * @param {URL | string} path\n * Path.\n * @returns {undefined}\n * Nothing.\n */\n set path(path) {\n if (isUrl(path)) {\n path = urlToPath(path)\n }\n\n assertNonEmpty(path, 'path')\n\n if (this.path !== path) {\n this.history.push(path)\n }\n }\n\n /**\n * Get the stem (basename w/o extname) (example: `'index.min'`).\n *\n * @returns {string | undefined}\n * Stem.\n */\n get stem() {\n return typeof this.path === 'string'\n ? minpath.basename(this.path, this.extname)\n : undefined\n }\n\n /**\n * Set the stem (basename w/o extname) (example: `'index.min'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} stem\n * Stem.\n * @returns {undefined}\n * Nothing.\n */\n set stem(stem) {\n assertNonEmpty(stem, 'stem')\n assertPart(stem, 'stem')\n this.path = minpath.join(this.dirname || '', stem + (this.extname || ''))\n }\n\n // Normal prototypal methods.\n /**\n * Create a fatal message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `true` (error; file not usable)\n * and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {never}\n * Never.\n * @throws {VFileMessage}\n * Message.\n */\n fail(causeOrReason, optionsOrParentOrPlace, origin) {\n // @ts-expect-error: the overloads are fine.\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin)\n\n message.fatal = true\n\n throw message\n }\n\n /**\n * Create an info message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `undefined` (info; change\n * likely not needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n info(causeOrReason, optionsOrParentOrPlace, origin) {\n // @ts-expect-error: the overloads are fine.\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin)\n\n message.fatal = undefined\n\n return message\n }\n\n /**\n * Create a message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `false` (warning; change may be\n * needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n message(causeOrReason, optionsOrParentOrPlace, origin) {\n const message = new VFileMessage(\n // @ts-expect-error: the overloads are fine.\n causeOrReason,\n optionsOrParentOrPlace,\n origin\n )\n\n if (this.path) {\n message.name = this.path + ':' + message.name\n message.file = this.path\n }\n\n message.fatal = false\n\n this.messages.push(message)\n\n return message\n }\n\n /**\n * Serialize the file.\n *\n * > **Note**: which encodings are supported depends on the engine.\n * > For info on Node.js, see:\n * > .\n *\n * @param {string | null | undefined} [encoding='utf8']\n * Character encoding to understand `value` as when it’s a `Uint8Array`\n * (default: `'utf-8'`).\n * @returns {string}\n * Serialized file.\n */\n toString(encoding) {\n if (this.value === undefined) {\n return ''\n }\n\n if (typeof this.value === 'string') {\n return this.value\n }\n\n const decoder = new TextDecoder(encoding || undefined)\n return decoder.decode(this.value)\n }\n}\n\n/**\n * Assert that `part` is not a path (as in, does not contain `path.sep`).\n *\n * @param {string | null | undefined} part\n * File path part.\n * @param {string} name\n * Part name.\n * @returns {undefined}\n * Nothing.\n */\nfunction assertPart(part, name) {\n if (part && part.includes(minpath.sep)) {\n throw new Error(\n '`' + name + '` cannot be a path: did not expect `' + minpath.sep + '`'\n )\n }\n}\n\n/**\n * Assert that `part` is not empty.\n *\n * @param {string | undefined} part\n * Thing.\n * @param {string} name\n * Part name.\n * @returns {asserts part is string}\n * Nothing.\n */\nfunction assertNonEmpty(part, name) {\n if (!part) {\n throw new Error('`' + name + '` cannot be empty')\n }\n}\n\n/**\n * Assert `path` exists.\n *\n * @param {string | undefined} path\n * Path.\n * @param {string} name\n * Dependency name.\n * @returns {asserts path is string}\n * Nothing.\n */\nfunction assertPath(path, name) {\n if (!path) {\n throw new Error('Setting `' + name + '` requires `path` to be set too')\n }\n}\n\n/**\n * Assert `value` is an `Uint8Array`.\n *\n * @param {unknown} value\n * thing.\n * @returns {value is Uint8Array}\n * Whether `value` is an `Uint8Array`.\n */\nfunction isUint8Array(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'byteLength' in value &&\n 'byteOffset' in value\n )\n}\n","export const CallableInstance =\n /**\n * @type {new , Result>(property: string | symbol) => (...parameters: Parameters) => Result}\n */\n (\n /** @type {unknown} */\n (\n /**\n * @this {Function}\n * @param {string | symbol} property\n * @returns {(...parameters: Array) => unknown}\n */\n function (property) {\n const self = this\n const constr = self.constructor\n const proto = /** @type {Record} */ (\n // Prototypes do exist.\n // type-coverage:ignore-next-line\n constr.prototype\n )\n const value = proto[property]\n /** @type {(...parameters: Array) => unknown} */\n const apply = function () {\n return value.apply(apply, arguments)\n }\n\n Object.setPrototypeOf(apply, proto)\n\n // Not needed for us in `unified`: we only call this on the `copy`\n // function,\n // and we don't need to add its fields (`length`, `name`)\n // over.\n // See also: GH-246.\n // const names = Object.getOwnPropertyNames(value)\n //\n // for (const p of names) {\n // const descriptor = Object.getOwnPropertyDescriptor(value, p)\n // if (descriptor) Object.defineProperty(apply, p, descriptor)\n // }\n\n return apply\n }\n )\n )\n","/**\n * @typedef {import('trough').Pipeline} Pipeline\n *\n * @typedef {import('unist').Node} Node\n *\n * @typedef {import('vfile').Compatible} Compatible\n * @typedef {import('vfile').Value} Value\n *\n * @typedef {import('../index.js').CompileResultMap} CompileResultMap\n * @typedef {import('../index.js').Data} Data\n * @typedef {import('../index.js').Settings} Settings\n */\n\n/**\n * @typedef {CompileResultMap[keyof CompileResultMap]} CompileResults\n * Acceptable results from compilers.\n *\n * To register custom results, add them to\n * {@linkcode CompileResultMap}.\n */\n\n/**\n * @template {Node} [Tree=Node]\n * The node that the compiler receives (default: `Node`).\n * @template {CompileResults} [Result=CompileResults]\n * The thing that the compiler yields (default: `CompileResults`).\n * @callback Compiler\n * A **compiler** handles the compiling of a syntax tree to something else\n * (in most cases, text) (TypeScript type).\n *\n * It is used in the stringify phase and called with a {@linkcode Node}\n * and {@linkcode VFile} representation of the document to compile.\n * It should return the textual representation of the given tree (typically\n * `string`).\n *\n * > **Note**: unified typically compiles by serializing: most compilers\n * > return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n * @param {Tree} tree\n * Tree to compile.\n * @param {VFile} file\n * File associated with `tree`.\n * @returns {Result}\n * New content: compiled text (`string` or `Uint8Array`, for `file.value`) or\n * something else (for `file.result`).\n */\n\n/**\n * @template {Node} [Tree=Node]\n * The node that the parser yields (default: `Node`)\n * @callback Parser\n * A **parser** handles the parsing of text to a syntax tree.\n *\n * It is used in the parse phase and is called with a `string` and\n * {@linkcode VFile} of the document to parse.\n * It must return the syntax tree representation of the given file\n * ({@linkcode Node}).\n * @param {string} document\n * Document to parse.\n * @param {VFile} file\n * File associated with `document`.\n * @returns {Tree}\n * Node representing the given file.\n */\n\n/**\n * @typedef {(\n * Plugin, any, any> |\n * PluginTuple, any, any> |\n * Preset\n * )} Pluggable\n * Union of the different ways to add plugins and settings.\n */\n\n/**\n * @typedef {Array} PluggableList\n * List of plugins and presets.\n */\n\n// Note: we can’t use `callback` yet as it messes up `this`:\n// .\n/**\n * @template {Array} [PluginParameters=[]]\n * Arguments passed to the plugin (default: `[]`, the empty tuple).\n * @template {Node | string | undefined} [Input=Node]\n * Value that is expected as input (default: `Node`).\n *\n * * If the plugin returns a {@linkcode Transformer}, this\n * should be the node it expects.\n * * If the plugin sets a {@linkcode Parser}, this should be\n * `string`.\n * * If the plugin sets a {@linkcode Compiler}, this should be the\n * node it expects.\n * @template [Output=Input]\n * Value that is yielded as output (default: `Input`).\n *\n * * If the plugin returns a {@linkcode Transformer}, this\n * should be the node that that yields.\n * * If the plugin sets a {@linkcode Parser}, this should be the\n * node that it yields.\n * * If the plugin sets a {@linkcode Compiler}, this should be\n * result it yields.\n * @typedef {(\n * (this: Processor, ...parameters: PluginParameters) =>\n * Input extends string ? // Parser.\n * Output extends Node | undefined ? undefined | void : never :\n * Output extends CompileResults ? // Compiler.\n * Input extends Node | undefined ? undefined | void : never :\n * Transformer<\n * Input extends Node ? Input : Node,\n * Output extends Node ? Output : Node\n * > | undefined | void\n * )} Plugin\n * Single plugin.\n *\n * Plugins configure the processors they are applied on in the following\n * ways:\n *\n * * they change the processor, such as the parser, the compiler, or by\n * configuring data\n * * they specify how to handle trees and files\n *\n * In practice, they are functions that can receive options and configure the\n * processor (`this`).\n *\n * > **Note**: plugins are called when the processor is *frozen*, not when\n * > they are applied.\n */\n\n/**\n * Tuple of a plugin and its configuration.\n *\n * The first item is a plugin, the rest are its parameters.\n *\n * @template {Array} [TupleParameters=[]]\n * Arguments passed to the plugin (default: `[]`, the empty tuple).\n * @template {Node | string | undefined} [Input=undefined]\n * Value that is expected as input (optional).\n *\n * * If the plugin returns a {@linkcode Transformer}, this\n * should be the node it expects.\n * * If the plugin sets a {@linkcode Parser}, this should be\n * `string`.\n * * If the plugin sets a {@linkcode Compiler}, this should be the\n * node it expects.\n * @template [Output=undefined] (optional).\n * Value that is yielded as output.\n *\n * * If the plugin returns a {@linkcode Transformer}, this\n * should be the node that that yields.\n * * If the plugin sets a {@linkcode Parser}, this should be the\n * node that it yields.\n * * If the plugin sets a {@linkcode Compiler}, this should be\n * result it yields.\n * @typedef {(\n * [\n * plugin: Plugin,\n * ...parameters: TupleParameters\n * ]\n * )} PluginTuple\n */\n\n/**\n * @typedef Preset\n * Sharable configuration.\n *\n * They can contain plugins and settings.\n * @property {PluggableList | undefined} [plugins]\n * List of plugins and presets (optional).\n * @property {Settings | undefined} [settings]\n * Shared settings for parsers and compilers (optional).\n */\n\n/**\n * @template {VFile} [File=VFile]\n * The file that the callback receives (default: `VFile`).\n * @callback ProcessCallback\n * Callback called when the process is done.\n *\n * Called with either an error or a result.\n * @param {Error | undefined} [error]\n * Fatal error (optional).\n * @param {File | undefined} [file]\n * Processed file (optional).\n * @returns {undefined}\n * Nothing.\n */\n\n/**\n * @template {Node} [Tree=Node]\n * The tree that the callback receives (default: `Node`).\n * @callback RunCallback\n * Callback called when transformers are done.\n *\n * Called with either an error or results.\n * @param {Error | undefined} [error]\n * Fatal error (optional).\n * @param {Tree | undefined} [tree]\n * Transformed tree (optional).\n * @param {VFile | undefined} [file]\n * File (optional).\n * @returns {undefined}\n * Nothing.\n */\n\n/**\n * @template {Node} [Output=Node]\n * Node type that the transformer yields (default: `Node`).\n * @callback TransformCallback\n * Callback passed to transforms.\n *\n * If the signature of a `transformer` accepts a third argument, the\n * transformer may perform asynchronous operations, and must call it.\n * @param {Error | undefined} [error]\n * Fatal error to stop the process (optional).\n * @param {Output | undefined} [tree]\n * New, changed, tree (optional).\n * @param {VFile | undefined} [file]\n * New, changed, file (optional).\n * @returns {undefined}\n * Nothing.\n */\n\n/**\n * @template {Node} [Input=Node]\n * Node type that the transformer expects (default: `Node`).\n * @template {Node} [Output=Input]\n * Node type that the transformer yields (default: `Input`).\n * @callback Transformer\n * Transformers handle syntax trees and files.\n *\n * They are functions that are called each time a syntax tree and file are\n * passed through the run phase.\n * When an error occurs in them (either because it’s thrown, returned,\n * rejected, or passed to `next`), the process stops.\n *\n * The run phase is handled by [`trough`][trough], see its documentation for\n * the exact semantics of these functions.\n *\n * > **Note**: you should likely ignore `next`: don’t accept it.\n * > it supports callback-style async work.\n * > But promises are likely easier to reason about.\n *\n * [trough]: https://github.com/wooorm/trough#function-fninput-next\n * @param {Input} tree\n * Tree to handle.\n * @param {VFile} file\n * File to handle.\n * @param {TransformCallback} next\n * Callback.\n * @returns {(\n * Promise |\n * Promise | // For some reason this is needed separately.\n * Output |\n * Error |\n * undefined |\n * void\n * )}\n * If you accept `next`, nothing.\n * Otherwise:\n *\n * * `Error` — fatal error to stop the process\n * * `Promise` or `undefined` — the next transformer keeps using\n * same tree\n * * `Promise` or `Node` — new, changed, tree\n */\n\n/**\n * @template {Node | undefined} ParseTree\n * Output of `parse`.\n * @template {Node | undefined} HeadTree\n * Input for `run`.\n * @template {Node | undefined} TailTree\n * Output for `run`.\n * @template {Node | undefined} CompileTree\n * Input of `stringify`.\n * @template {CompileResults | undefined} CompileResult\n * Output of `stringify`.\n * @template {Node | string | undefined} Input\n * Input of plugin.\n * @template Output\n * Output of plugin (optional).\n * @typedef {(\n * Input extends string\n * ? Output extends Node | undefined\n * ? // Parser.\n * Processor<\n * Output extends undefined ? ParseTree : Output,\n * HeadTree,\n * TailTree,\n * CompileTree,\n * CompileResult\n * >\n * : // Unknown.\n * Processor\n * : Output extends CompileResults\n * ? Input extends Node | undefined\n * ? // Compiler.\n * Processor<\n * ParseTree,\n * HeadTree,\n * TailTree,\n * Input extends undefined ? CompileTree : Input,\n * Output extends undefined ? CompileResult : Output\n * >\n * : // Unknown.\n * Processor\n * : Input extends Node | undefined\n * ? Output extends Node | undefined\n * ? // Transform.\n * Processor<\n * ParseTree,\n * HeadTree extends undefined ? Input : HeadTree,\n * Output extends undefined ? TailTree : Output,\n * CompileTree,\n * CompileResult\n * >\n * : // Unknown.\n * Processor\n * : // Unknown.\n * Processor\n * )} UsePlugin\n * Create a processor based on the input/output of a {@link Plugin plugin}.\n */\n\n/**\n * @template {CompileResults | undefined} Result\n * Node type that the transformer yields.\n * @typedef {(\n * Result extends Value | undefined ?\n * VFile :\n * VFile & {result: Result}\n * )} VFileWithOutput\n * Type to generate a {@linkcode VFile} corresponding to a compiler result.\n *\n * If a result that is not acceptable on a `VFile` is used, that will\n * be stored on the `result` field of {@linkcode VFile}.\n */\n\nimport {bail} from 'bail'\nimport extend from 'extend'\nimport {ok as assert} from 'devlop'\nimport isPlainObj from 'is-plain-obj'\nimport {trough} from 'trough'\nimport {VFile} from 'vfile'\nimport {CallableInstance} from './callable-instance.js'\n\n// To do: next major: drop `Compiler`, `Parser`: prefer lowercase.\n\n// To do: we could start yielding `never` in TS when a parser is missing and\n// `parse` is called.\n// Currently, we allow directly setting `processor.parser`, which is untyped.\n\nconst own = {}.hasOwnProperty\n\n/**\n * @template {Node | undefined} [ParseTree=undefined]\n * Output of `parse` (optional).\n * @template {Node | undefined} [HeadTree=undefined]\n * Input for `run` (optional).\n * @template {Node | undefined} [TailTree=undefined]\n * Output for `run` (optional).\n * @template {Node | undefined} [CompileTree=undefined]\n * Input of `stringify` (optional).\n * @template {CompileResults | undefined} [CompileResult=undefined]\n * Output of `stringify` (optional).\n * @extends {CallableInstance<[], Processor>}\n */\nexport class Processor extends CallableInstance {\n /**\n * Create a processor.\n */\n constructor() {\n // If `Processor()` is called (w/o new), `copy` is called instead.\n super('copy')\n\n /**\n * Compiler to use (deprecated).\n *\n * @deprecated\n * Use `compiler` instead.\n * @type {(\n * Compiler<\n * CompileTree extends undefined ? Node : CompileTree,\n * CompileResult extends undefined ? CompileResults : CompileResult\n * > |\n * undefined\n * )}\n */\n this.Compiler = undefined\n\n /**\n * Parser to use (deprecated).\n *\n * @deprecated\n * Use `parser` instead.\n * @type {(\n * Parser |\n * undefined\n * )}\n */\n this.Parser = undefined\n\n // Note: the following fields are considered private.\n // However, they are needed for tests, and TSC generates an untyped\n // `private freezeIndex` field for, which trips `type-coverage` up.\n // Instead, we use `@deprecated` to visualize that they shouldn’t be used.\n /**\n * Internal list of configured plugins.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Array>>}\n */\n this.attachers = []\n\n /**\n * Compiler to use.\n *\n * @type {(\n * Compiler<\n * CompileTree extends undefined ? Node : CompileTree,\n * CompileResult extends undefined ? CompileResults : CompileResult\n * > |\n * undefined\n * )}\n */\n this.compiler = undefined\n\n /**\n * Internal state to track where we are while freezing.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {number}\n */\n this.freezeIndex = -1\n\n /**\n * Internal state to track whether we’re frozen.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {boolean | undefined}\n */\n this.frozen = undefined\n\n /**\n * Internal state.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Data}\n */\n this.namespace = {}\n\n /**\n * Parser to use.\n *\n * @type {(\n * Parser |\n * undefined\n * )}\n */\n this.parser = undefined\n\n /**\n * Internal list of configured transformers.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Pipeline}\n */\n this.transformers = trough()\n }\n\n /**\n * Copy a processor.\n *\n * @deprecated\n * This is a private internal method and should not be used.\n * @returns {Processor}\n * New *unfrozen* processor ({@linkcode Processor}) that is\n * configured to work the same as its ancestor.\n * When the descendant processor is configured in the future it does not\n * affect the ancestral processor.\n */\n copy() {\n // Cast as the type parameters will be the same after attaching.\n const destination =\n /** @type {Processor} */ (\n new Processor()\n )\n let index = -1\n\n while (++index < this.attachers.length) {\n const attacher = this.attachers[index]\n destination.use(...attacher)\n }\n\n destination.data(extend(true, {}, this.namespace))\n\n return destination\n }\n\n /**\n * Configure the processor with info available to all plugins.\n * Information is stored in an object.\n *\n * Typically, options can be given to a specific plugin, but sometimes it\n * makes sense to have information shared with several plugins.\n * For example, a list of HTML elements that are self-closing, which is\n * needed during all phases.\n *\n * > **Note**: setting information cannot occur on *frozen* processors.\n * > Call the processor first to create a new unfrozen processor.\n *\n * > **Note**: to register custom data in TypeScript, augment the\n * > {@linkcode Data} interface.\n *\n * @example\n * This example show how to get and set info:\n *\n * ```js\n * import {unified} from 'unified'\n *\n * const processor = unified().data('alpha', 'bravo')\n *\n * processor.data('alpha') // => 'bravo'\n *\n * processor.data() // => {alpha: 'bravo'}\n *\n * processor.data({charlie: 'delta'})\n *\n * processor.data() // => {charlie: 'delta'}\n * ```\n *\n * @template {keyof Data} Key\n *\n * @overload\n * @returns {Data}\n *\n * @overload\n * @param {Data} dataset\n * @returns {Processor}\n *\n * @overload\n * @param {Key} key\n * @returns {Data[Key]}\n *\n * @overload\n * @param {Key} key\n * @param {Data[Key]} value\n * @returns {Processor}\n *\n * @param {Data | Key} [key]\n * Key to get or set, or entire dataset to set, or nothing to get the\n * entire dataset (optional).\n * @param {Data[Key]} [value]\n * Value to set (optional).\n * @returns {unknown}\n * The current processor when setting, the value at `key` when getting, or\n * the entire dataset when getting without key.\n */\n data(key, value) {\n if (typeof key === 'string') {\n // Set `key`.\n if (arguments.length === 2) {\n assertUnfrozen('data', this.frozen)\n this.namespace[key] = value\n return this\n }\n\n // Get `key`.\n return (own.call(this.namespace, key) && this.namespace[key]) || undefined\n }\n\n // Set space.\n if (key) {\n assertUnfrozen('data', this.frozen)\n this.namespace = key\n return this\n }\n\n // Get space.\n return this.namespace\n }\n\n /**\n * Freeze a processor.\n *\n * Frozen processors are meant to be extended and not to be configured\n * directly.\n *\n * When a processor is frozen it cannot be unfrozen.\n * New processors working the same way can be created by calling the\n * processor.\n *\n * It’s possible to freeze processors explicitly by calling `.freeze()`.\n * Processors freeze automatically when `.parse()`, `.run()`, `.runSync()`,\n * `.stringify()`, `.process()`, or `.processSync()` are called.\n *\n * @returns {Processor}\n * The current processor.\n */\n freeze() {\n if (this.frozen) {\n return this\n }\n\n // Cast so that we can type plugins easier.\n // Plugins are supposed to be usable on different processors, not just on\n // this exact processor.\n const self = /** @type {Processor} */ (/** @type {unknown} */ (this))\n\n while (++this.freezeIndex < this.attachers.length) {\n const [attacher, ...options] = this.attachers[this.freezeIndex]\n\n if (options[0] === false) {\n continue\n }\n\n if (options[0] === true) {\n options[0] = undefined\n }\n\n const transformer = attacher.call(self, ...options)\n\n if (typeof transformer === 'function') {\n this.transformers.use(transformer)\n }\n }\n\n this.frozen = true\n this.freezeIndex = Number.POSITIVE_INFINITY\n\n return this\n }\n\n /**\n * Parse text to a syntax tree.\n *\n * > **Note**: `parse` freezes the processor if not already *frozen*.\n *\n * > **Note**: `parse` performs the parse phase, not the run phase or other\n * > phases.\n *\n * @param {Compatible | undefined} [file]\n * file to parse (optional); typically `string` or `VFile`; any value\n * accepted as `x` in `new VFile(x)`.\n * @returns {ParseTree extends undefined ? Node : ParseTree}\n * Syntax tree representing `file`.\n */\n parse(file) {\n this.freeze()\n const realFile = vfile(file)\n const parser = this.parser || this.Parser\n assertParser('parse', parser)\n return parser(String(realFile), realFile)\n }\n\n /**\n * Process the given file as configured on the processor.\n *\n * > **Note**: `process` freezes the processor if not already *frozen*.\n *\n * > **Note**: `process` performs the parse, run, and stringify phases.\n *\n * @overload\n * @param {Compatible | undefined} file\n * @param {ProcessCallback>} done\n * @returns {undefined}\n *\n * @overload\n * @param {Compatible | undefined} [file]\n * @returns {Promise>}\n *\n * @param {Compatible | undefined} [file]\n * File (optional); typically `string` or `VFile`]; any value accepted as\n * `x` in `new VFile(x)`.\n * @param {ProcessCallback> | undefined} [done]\n * Callback (optional).\n * @returns {Promise | undefined}\n * Nothing if `done` is given.\n * Otherwise a promise, rejected with a fatal error or resolved with the\n * processed file.\n *\n * The parsed, transformed, and compiled value is available at\n * `file.value` (see note).\n *\n * > **Note**: unified typically compiles by serializing: most\n * > compilers return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n process(file, done) {\n const self = this\n\n this.freeze()\n assertParser('process', this.parser || this.Parser)\n assertCompiler('process', this.compiler || this.Compiler)\n\n return done ? executor(undefined, done) : new Promise(executor)\n\n // Note: `void`s needed for TS.\n /**\n * @param {((file: VFileWithOutput) => undefined | void) | undefined} resolve\n * @param {(error: Error | undefined) => undefined | void} reject\n * @returns {undefined}\n */\n function executor(resolve, reject) {\n const realFile = vfile(file)\n // Assume `ParseTree` (the result of the parser) matches `HeadTree` (the\n // input of the first transform).\n const parseTree =\n /** @type {HeadTree extends undefined ? Node : HeadTree} */ (\n /** @type {unknown} */ (self.parse(realFile))\n )\n\n self.run(parseTree, realFile, function (error, tree, file) {\n if (error || !tree || !file) {\n return realDone(error)\n }\n\n // Assume `TailTree` (the output of the last transform) matches\n // `CompileTree` (the input of the compiler).\n const compileTree =\n /** @type {CompileTree extends undefined ? Node : CompileTree} */ (\n /** @type {unknown} */ (tree)\n )\n\n const compileResult = self.stringify(compileTree, file)\n\n if (looksLikeAValue(compileResult)) {\n file.value = compileResult\n } else {\n file.result = compileResult\n }\n\n realDone(error, /** @type {VFileWithOutput} */ (file))\n })\n\n /**\n * @param {Error | undefined} error\n * @param {VFileWithOutput | undefined} [file]\n * @returns {undefined}\n */\n function realDone(error, file) {\n if (error || !file) {\n reject(error)\n } else if (resolve) {\n resolve(file)\n } else {\n assert(done, '`done` is defined if `resolve` is not')\n done(undefined, file)\n }\n }\n }\n }\n\n /**\n * Process the given file as configured on the processor.\n *\n * An error is thrown if asynchronous transforms are configured.\n *\n * > **Note**: `processSync` freezes the processor if not already *frozen*.\n *\n * > **Note**: `processSync` performs the parse, run, and stringify phases.\n *\n * @param {Compatible | undefined} [file]\n * File (optional); typically `string` or `VFile`; any value accepted as\n * `x` in `new VFile(x)`.\n * @returns {VFileWithOutput}\n * The processed file.\n *\n * The parsed, transformed, and compiled value is available at\n * `file.value` (see note).\n *\n * > **Note**: unified typically compiles by serializing: most\n * > compilers return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n processSync(file) {\n /** @type {boolean} */\n let complete = false\n /** @type {VFileWithOutput | undefined} */\n let result\n\n this.freeze()\n assertParser('processSync', this.parser || this.Parser)\n assertCompiler('processSync', this.compiler || this.Compiler)\n\n this.process(file, realDone)\n assertDone('processSync', 'process', complete)\n assert(result, 'we either bailed on an error or have a tree')\n\n return result\n\n /**\n * @type {ProcessCallback>}\n */\n function realDone(error, file) {\n complete = true\n bail(error)\n result = file\n }\n }\n\n /**\n * Run *transformers* on a syntax tree.\n *\n * > **Note**: `run` freezes the processor if not already *frozen*.\n *\n * > **Note**: `run` performs the run phase, not other phases.\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {RunCallback} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} file\n * @param {RunCallback} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} [file]\n * @returns {Promise}\n *\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * Tree to transform and inspect.\n * @param {(\n * RunCallback |\n * Compatible\n * )} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @param {RunCallback} [done]\n * Callback (optional).\n * @returns {Promise | undefined}\n * Nothing if `done` is given.\n * Otherwise, a promise rejected with a fatal error or resolved with the\n * transformed tree.\n */\n run(tree, file, done) {\n assertNode(tree)\n this.freeze()\n\n const transformers = this.transformers\n\n if (!done && typeof file === 'function') {\n done = file\n file = undefined\n }\n\n return done ? executor(undefined, done) : new Promise(executor)\n\n // Note: `void`s needed for TS.\n /**\n * @param {(\n * ((tree: TailTree extends undefined ? Node : TailTree) => undefined | void) |\n * undefined\n * )} resolve\n * @param {(error: Error) => undefined | void} reject\n * @returns {undefined}\n */\n function executor(resolve, reject) {\n assert(\n typeof file !== 'function',\n '`file` can’t be a `done` anymore, we checked'\n )\n const realFile = vfile(file)\n transformers.run(tree, realFile, realDone)\n\n /**\n * @param {Error | undefined} error\n * @param {Node} outputTree\n * @param {VFile} file\n * @returns {undefined}\n */\n function realDone(error, outputTree, file) {\n const resultingTree =\n /** @type {TailTree extends undefined ? Node : TailTree} */ (\n outputTree || tree\n )\n\n if (error) {\n reject(error)\n } else if (resolve) {\n resolve(resultingTree)\n } else {\n assert(done, '`done` is defined if `resolve` is not')\n done(undefined, resultingTree, file)\n }\n }\n }\n }\n\n /**\n * Run *transformers* on a syntax tree.\n *\n * An error is thrown if asynchronous transforms are configured.\n *\n * > **Note**: `runSync` freezes the processor if not already *frozen*.\n *\n * > **Note**: `runSync` performs the run phase, not other phases.\n *\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * Tree to transform and inspect.\n * @param {Compatible | undefined} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @returns {TailTree extends undefined ? Node : TailTree}\n * Transformed tree.\n */\n runSync(tree, file) {\n /** @type {boolean} */\n let complete = false\n /** @type {(TailTree extends undefined ? Node : TailTree) | undefined} */\n let result\n\n this.run(tree, file, realDone)\n\n assertDone('runSync', 'run', complete)\n assert(result, 'we either bailed on an error or have a tree')\n return result\n\n /**\n * @type {RunCallback}\n */\n function realDone(error, tree) {\n bail(error)\n result = tree\n complete = true\n }\n }\n\n /**\n * Compile a syntax tree.\n *\n * > **Note**: `stringify` freezes the processor if not already *frozen*.\n *\n * > **Note**: `stringify` performs the stringify phase, not the run phase\n * > or other phases.\n *\n * @param {CompileTree extends undefined ? Node : CompileTree} tree\n * Tree to compile.\n * @param {Compatible | undefined} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @returns {CompileResult extends undefined ? Value : CompileResult}\n * Textual representation of the tree (see note).\n *\n * > **Note**: unified typically compiles by serializing: most compilers\n * > return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n stringify(tree, file) {\n this.freeze()\n const realFile = vfile(file)\n const compiler = this.compiler || this.Compiler\n assertCompiler('stringify', compiler)\n assertNode(tree)\n\n return compiler(tree, realFile)\n }\n\n /**\n * Configure the processor to use a plugin, a list of usable values, or a\n * preset.\n *\n * If the processor is already using a plugin, the previous plugin\n * configuration is changed based on the options that are passed in.\n * In other words, the plugin is not added a second time.\n *\n * > **Note**: `use` cannot be called on *frozen* processors.\n * > Call the processor first to create a new unfrozen processor.\n *\n * @example\n * There are many ways to pass plugins to `.use()`.\n * This example gives an overview:\n *\n * ```js\n * import {unified} from 'unified'\n *\n * unified()\n * // Plugin with options:\n * .use(pluginA, {x: true, y: true})\n * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):\n * .use(pluginA, {y: false, z: true})\n * // Plugins:\n * .use([pluginB, pluginC])\n * // Two plugins, the second with options:\n * .use([pluginD, [pluginE, {}]])\n * // Preset with plugins and settings:\n * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})\n * // Settings only:\n * .use({settings: {position: false}})\n * ```\n *\n * @template {Array} [Parameters=[]]\n * @template {Node | string | undefined} [Input=undefined]\n * @template [Output=Input]\n *\n * @overload\n * @param {Preset | null | undefined} [preset]\n * @returns {Processor}\n *\n * @overload\n * @param {PluggableList} list\n * @returns {Processor}\n *\n * @overload\n * @param {Plugin} plugin\n * @param {...(Parameters | [boolean])} parameters\n * @returns {UsePlugin}\n *\n * @param {PluggableList | Plugin | Preset | null | undefined} value\n * Usable value.\n * @param {...unknown} parameters\n * Parameters, when a plugin is given as a usable value.\n * @returns {Processor}\n * Current processor.\n */\n use(value, ...parameters) {\n const attachers = this.attachers\n const namespace = this.namespace\n\n assertUnfrozen('use', this.frozen)\n\n if (value === null || value === undefined) {\n // Empty.\n } else if (typeof value === 'function') {\n addPlugin(value, parameters)\n } else if (typeof value === 'object') {\n if (Array.isArray(value)) {\n addList(value)\n } else {\n addPreset(value)\n }\n } else {\n throw new TypeError('Expected usable value, not `' + value + '`')\n }\n\n return this\n\n /**\n * @param {Pluggable} value\n * @returns {undefined}\n */\n function add(value) {\n if (typeof value === 'function') {\n addPlugin(value, [])\n } else if (typeof value === 'object') {\n if (Array.isArray(value)) {\n const [plugin, ...parameters] =\n /** @type {PluginTuple>} */ (value)\n addPlugin(plugin, parameters)\n } else {\n addPreset(value)\n }\n } else {\n throw new TypeError('Expected usable value, not `' + value + '`')\n }\n }\n\n /**\n * @param {Preset} result\n * @returns {undefined}\n */\n function addPreset(result) {\n if (!('plugins' in result) && !('settings' in result)) {\n throw new Error(\n 'Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither'\n )\n }\n\n addList(result.plugins)\n\n if (result.settings) {\n namespace.settings = extend(true, namespace.settings, result.settings)\n }\n }\n\n /**\n * @param {PluggableList | null | undefined} plugins\n * @returns {undefined}\n */\n function addList(plugins) {\n let index = -1\n\n if (plugins === null || plugins === undefined) {\n // Empty.\n } else if (Array.isArray(plugins)) {\n while (++index < plugins.length) {\n const thing = plugins[index]\n add(thing)\n }\n } else {\n throw new TypeError('Expected a list of plugins, not `' + plugins + '`')\n }\n }\n\n /**\n * @param {Plugin} plugin\n * @param {Array} parameters\n * @returns {undefined}\n */\n function addPlugin(plugin, parameters) {\n let index = -1\n let entryIndex = -1\n\n while (++index < attachers.length) {\n if (attachers[index][0] === plugin) {\n entryIndex = index\n break\n }\n }\n\n if (entryIndex === -1) {\n attachers.push([plugin, ...parameters])\n }\n // Only set if there was at least a `primary` value, otherwise we’d change\n // `arguments.length`.\n else if (parameters.length > 0) {\n let [primary, ...rest] = parameters\n const currentPrimary = attachers[entryIndex][1]\n if (isPlainObj(currentPrimary) && isPlainObj(primary)) {\n primary = extend(true, currentPrimary, primary)\n }\n\n attachers[entryIndex] = [plugin, primary, ...rest]\n }\n }\n }\n}\n\n// Note: this returns a *callable* instance.\n// That’s why it’s documented as a function.\n/**\n * Create a new processor.\n *\n * @example\n * This example shows how a new processor can be created (from `remark`) and linked\n * to **stdin**(4) and **stdout**(4).\n *\n * ```js\n * import process from 'node:process'\n * import concatStream from 'concat-stream'\n * import {remark} from 'remark'\n *\n * process.stdin.pipe(\n * concatStream(function (buf) {\n * process.stdout.write(String(remark().processSync(buf)))\n * })\n * )\n * ```\n *\n * @returns\n * New *unfrozen* processor (`processor`).\n *\n * This processor is configured to work the same as its ancestor.\n * When the descendant processor is configured in the future it does not\n * affect the ancestral processor.\n */\nexport const unified = new Processor().freeze()\n\n/**\n * Assert a parser is available.\n *\n * @param {string} name\n * @param {unknown} value\n * @returns {asserts value is Parser}\n */\nfunction assertParser(name, value) {\n if (typeof value !== 'function') {\n throw new TypeError('Cannot `' + name + '` without `parser`')\n }\n}\n\n/**\n * Assert a compiler is available.\n *\n * @param {string} name\n * @param {unknown} value\n * @returns {asserts value is Compiler}\n */\nfunction assertCompiler(name, value) {\n if (typeof value !== 'function') {\n throw new TypeError('Cannot `' + name + '` without `compiler`')\n }\n}\n\n/**\n * Assert the processor is not frozen.\n *\n * @param {string} name\n * @param {unknown} frozen\n * @returns {asserts frozen is false}\n */\nfunction assertUnfrozen(name, frozen) {\n if (frozen) {\n throw new Error(\n 'Cannot call `' +\n name +\n '` on a frozen processor.\\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.'\n )\n }\n}\n\n/**\n * Assert `node` is a unist node.\n *\n * @param {unknown} node\n * @returns {asserts node is Node}\n */\nfunction assertNode(node) {\n // `isPlainObj` unfortunately uses `any` instead of `unknown`.\n // type-coverage:ignore-next-line\n if (!isPlainObj(node) || typeof node.type !== 'string') {\n throw new TypeError('Expected node, got `' + node + '`')\n // Fine.\n }\n}\n\n/**\n * Assert that `complete` is `true`.\n *\n * @param {string} name\n * @param {string} asyncName\n * @param {unknown} complete\n * @returns {asserts complete is true}\n */\nfunction assertDone(name, asyncName, complete) {\n if (!complete) {\n throw new Error(\n '`' + name + '` finished async. Use `' + asyncName + '` instead'\n )\n }\n}\n\n/**\n * @param {Compatible | undefined} [value]\n * @returns {VFile}\n */\nfunction vfile(value) {\n return looksLikeAVFile(value) ? value : new VFile(value)\n}\n\n/**\n * @param {Compatible | undefined} [value]\n * @returns {value is VFile}\n */\nfunction looksLikeAVFile(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'message' in value &&\n 'messages' in value\n )\n}\n\n/**\n * @param {unknown} [value]\n * @returns {value is Value}\n */\nfunction looksLikeAValue(value) {\n return typeof value === 'string' || isUint8Array(value)\n}\n\n/**\n * Assert `value` is an `Uint8Array`.\n *\n * @param {unknown} value\n * thing.\n * @returns {value is Uint8Array}\n * Whether `value` is an `Uint8Array`.\n */\nfunction isUint8Array(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'byteLength' in value &&\n 'byteOffset' in value\n )\n}\n","// Register `Raw` in tree:\n/// \n\n/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Nodes} Nodes\n * @typedef {import('hast').Parents} Parents\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast-util-to-jsx-runtime').Components} JsxRuntimeComponents\n * @typedef {import('remark-rehype').Options} RemarkRehypeOptions\n * @typedef {import('unist-util-visit').BuildVisitor} Visitor\n * @typedef {import('unified').PluggableList} PluggableList\n */\n\n/**\n * @callback AllowElement\n * Filter elements.\n * @param {Readonly} element\n * Element to check.\n * @param {number} index\n * Index of `element` in `parent`.\n * @param {Readonly | undefined} parent\n * Parent of `element`.\n * @returns {boolean | null | undefined}\n * Whether to allow `element` (default: `false`).\n *\n * @typedef {Partial} Components\n * Map tag names to components.\n *\n * @typedef Deprecation\n * Deprecation.\n * @property {string} from\n * Old field.\n * @property {string} id\n * ID in readme.\n * @property {keyof Options} [to]\n * New field.\n *\n * @typedef Options\n * Configuration.\n * @property {AllowElement | null | undefined} [allowElement]\n * Filter elements (optional);\n * `allowedElements` / `disallowedElements` is used first.\n * @property {ReadonlyArray | null | undefined} [allowedElements]\n * Tag names to allow (default: all tag names);\n * cannot combine w/ `disallowedElements`.\n * @property {string | null | undefined} [children]\n * Markdown.\n * @property {string | null | undefined} [className]\n * Wrap in a `div` with this class name.\n * @property {Components | null | undefined} [components]\n * Map tag names to components.\n * @property {ReadonlyArray | null | undefined} [disallowedElements]\n * Tag names to disallow (default: `[]`);\n * cannot combine w/ `allowedElements`.\n * @property {PluggableList | null | undefined} [rehypePlugins]\n * List of rehype plugins to use.\n * @property {PluggableList | null | undefined} [remarkPlugins]\n * List of remark plugins to use.\n * @property {Readonly | null | undefined} [remarkRehypeOptions]\n * Options to pass through to `remark-rehype`.\n * @property {boolean | null | undefined} [skipHtml=false]\n * Ignore HTML in markdown completely (default: `false`).\n * @property {boolean | null | undefined} [unwrapDisallowed=false]\n * Extract (unwrap) what’s in disallowed elements (default: `false`);\n * normally when say `strong` is not allowed, it and it’s children are dropped,\n * with `unwrapDisallowed` the element itself is replaced by its children.\n * @property {UrlTransform | null | undefined} [urlTransform]\n * Change URLs (default: `defaultUrlTransform`)\n *\n * @callback UrlTransform\n * Transform all URLs.\n * @param {string} url\n * URL.\n * @param {string} key\n * Property name (example: `'href'`).\n * @param {Readonly} node\n * Node.\n * @returns {string | null | undefined}\n * Transformed URL (optional).\n */\n\nimport {unreachable} from 'devlop'\nimport {toJsxRuntime} from 'hast-util-to-jsx-runtime'\nimport {urlAttributes} from 'html-url-attributes'\n// @ts-expect-error: untyped.\nimport {Fragment, jsx, jsxs} from 'react/jsx-runtime'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\nimport {visit} from 'unist-util-visit'\nimport {VFile} from 'vfile'\n\nconst changelog =\n 'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'\n\n/** @type {PluggableList} */\nconst emptyPlugins = []\n/** @type {Readonly} */\nconst emptyRemarkRehypeOptions = {allowDangerousHtml: true}\nconst safeProtocol = /^(https?|ircs?|mailto|xmpp)$/i\n\n// Mutable because we `delete` any time it’s used and a message is sent.\n/** @type {ReadonlyArray>} */\nconst deprecations = [\n {from: 'astPlugins', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'allowDangerousHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {\n from: 'allowNode',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowElement'\n },\n {\n from: 'allowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowedElements'\n },\n {\n from: 'disallowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'disallowedElements'\n },\n {from: 'escapeHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'includeElementIndex', id: '#remove-includeelementindex'},\n {\n from: 'includeNodeIndex',\n id: 'change-includenodeindex-to-includeelementindex'\n },\n {from: 'linkTarget', id: 'remove-linktarget'},\n {from: 'plugins', id: 'change-plugins-to-remarkplugins', to: 'remarkPlugins'},\n {from: 'rawSourcePos', id: '#remove-rawsourcepos'},\n {from: 'renderers', id: 'change-renderers-to-components', to: 'components'},\n {from: 'source', id: 'change-source-to-children', to: 'children'},\n {from: 'sourcePos', id: '#remove-sourcepos'},\n {from: 'transformImageUri', id: '#add-urltransform', to: 'urlTransform'},\n {from: 'transformLinkUri', id: '#add-urltransform', to: 'urlTransform'}\n]\n\n/**\n * Component to render markdown.\n *\n * @param {Readonly} options\n * Props.\n * @returns {JSX.Element}\n * React element.\n */\nexport function Markdown(options) {\n const allowedElements = options.allowedElements\n const allowElement = options.allowElement\n const children = options.children || ''\n const className = options.className\n const components = options.components\n const disallowedElements = options.disallowedElements\n const rehypePlugins = options.rehypePlugins || emptyPlugins\n const remarkPlugins = options.remarkPlugins || emptyPlugins\n const remarkRehypeOptions = options.remarkRehypeOptions\n ? {...options.remarkRehypeOptions, ...emptyRemarkRehypeOptions}\n : emptyRemarkRehypeOptions\n const skipHtml = options.skipHtml\n const unwrapDisallowed = options.unwrapDisallowed\n const urlTransform = options.urlTransform || defaultUrlTransform\n\n const processor = unified()\n .use(remarkParse)\n .use(remarkPlugins)\n .use(remarkRehype, remarkRehypeOptions)\n .use(rehypePlugins)\n\n const file = new VFile()\n\n if (typeof children === 'string') {\n file.value = children\n } else {\n unreachable(\n 'Unexpected value `' +\n children +\n '` for `children` prop, expected `string`'\n )\n }\n\n if (allowedElements && disallowedElements) {\n unreachable(\n 'Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other'\n )\n }\n\n for (const deprecation of deprecations) {\n if (Object.hasOwn(options, deprecation.from)) {\n unreachable(\n 'Unexpected `' +\n deprecation.from +\n '` prop, ' +\n (deprecation.to\n ? 'use `' + deprecation.to + '` instead'\n : 'remove it') +\n ' (see <' +\n changelog +\n '#' +\n deprecation.id +\n '> for more info)'\n )\n }\n }\n\n const mdastTree = processor.parse(file)\n /** @type {Nodes} */\n let hastTree = processor.runSync(mdastTree, file)\n\n // Wrap in `div` if there’s a class name.\n if (className) {\n hastTree = {\n type: 'element',\n tagName: 'div',\n properties: {className},\n // Assume no doctypes.\n children: /** @type {Array} */ (\n hastTree.type === 'root' ? hastTree.children : [hastTree]\n )\n }\n }\n\n visit(hastTree, transform)\n\n return toJsxRuntime(hastTree, {\n Fragment,\n components,\n ignoreInvalidStyle: true,\n jsx,\n jsxs,\n passKeys: true,\n passNode: true\n })\n\n /** @type {Visitor} */\n function transform(node, index, parent) {\n if (node.type === 'raw' && parent && typeof index === 'number') {\n if (skipHtml) {\n parent.children.splice(index, 1)\n } else {\n parent.children[index] = {type: 'text', value: node.value}\n }\n\n return index\n }\n\n if (node.type === 'element') {\n /** @type {string} */\n let key\n\n for (key in urlAttributes) {\n if (\n Object.hasOwn(urlAttributes, key) &&\n Object.hasOwn(node.properties, key)\n ) {\n const value = node.properties[key]\n const test = urlAttributes[key]\n if (test === null || test.includes(node.tagName)) {\n node.properties[key] = urlTransform(String(value || ''), key, node)\n }\n }\n }\n }\n\n if (node.type === 'element') {\n let remove = allowedElements\n ? !allowedElements.includes(node.tagName)\n : disallowedElements\n ? disallowedElements.includes(node.tagName)\n : false\n\n if (!remove && allowElement && typeof index === 'number') {\n remove = !allowElement(node, index, parent)\n }\n\n if (remove && parent && typeof index === 'number') {\n if (unwrapDisallowed && node.children) {\n parent.children.splice(index, 1, ...node.children)\n } else {\n parent.children.splice(index, 1)\n }\n\n return index\n }\n }\n }\n}\n\n/**\n * Make a URL safe.\n *\n * @satisfies {UrlTransform}\n * @param {string} value\n * URL.\n * @returns {string}\n * Safe URL.\n */\nexport function defaultUrlTransform(value) {\n // Same as:\n // \n // But without the `encode` part.\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n\n if (\n // If there is no protocol, it’s relative.\n colon < 0 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n (slash > -1 && colon > slash) ||\n (questionMark > -1 && colon > questionMark) ||\n (numberSign > -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n safeProtocol.test(value.slice(0, colon))\n ) {\n return value\n }\n\n return ''\n}\n"],"names":["isFunction","value","window","document","createElement","getTargetElement","target","defaultElement","current","ref","useRef","fn","fnRef","useEffect","depsAreSame","oldDeps","deps","i","length","Object","is","useEffectType","effect","hasInitRef","lastElementRef","lastDepsRef","unLoadRef","_a","els","Array","isArray","map","item","call","options","callback","option","_b","useState","state","setState","_c","ratio","setRatio","element","filter","Boolean","observer","IntersectionObserver","entries","e_1","entries_1","entries_1_1","next","done","entry","intersectionRatio","isIntersecting","e_1_1","error","return","root","forEach","el","observe","disconnect","rootMargin","threshold","IntersectionObserverEntry","prototype","defineProperty","get","this","startDoc","doc","frame","getFrameElement","ownerDocument","registry","crossOriginUpdater","crossOriginRect","THROTTLE_TIMEOUT","POLL_INTERVAL","USE_MUTATION_OBSERVER","_setupCrossOriginUpdater","boundingClientRect","intersectionRect","convertFromParentRect","top","bottom","left","right","width","height","_checkForIntersections","_resetCrossOriginUpdater","_observationTargets","some","nodeType","Error","_registerInstance","push","_monitorIntersections","unobserve","_unmonitorIntersections","_unregisterInstance","_unmonitorAllIntersections","takeRecords","records","_queuedEntries","slice","_initThresholds","opt_threshold","sort","t","a","isNaN","_parseRootMargin","opt_rootMargin","margins","split","margin","parts","exec","parseFloat","unit","win","defaultView","_monitoringDocuments","indexOf","monitoringInterval","domObserver","setInterval","addEvent","MutationObserver","attributes","childList","characterData","subtree","_monitoringUnsubscribes","clearInterval","removeEvent","rootDoc","index","hasDependentTargets","itemDoc","unsubscribe","splice","unsubscribes","rootIsInDom","_rootIsInDom","rootRect","_getRootRect","targetRect","getBoundingClientRect","rootContainsTarget","_rootContainsTarget","oldEntry","_computeTargetAndRootIntersection","rootBounds","newEntry","time","performance","now","_hasCrossedThreshold","_callback","getComputedStyle","display","parent","getParentNode","atRoot","parentRect","parentComputedStyle","frameRect","frameIntersect","body","documentElement","overflow","computeRectIntersection","isDoc","html","clientWidth","clientHeight","_expandRectByRootMargin","rect","_rootMarginValues","newRect","oldRatio","newRatio","thresholds","containsDeep","frameElement","e","ensureDOMRect","targetArea","intersectionArea","Number","toFixed","opt_options","timeout","timer","setTimeout","throttle","bind","join","node","event","opt_useCapture","addEventListener","attachEvent","removeEventListener","detachEvent","rect1","rect2","Math","max","min","err","y","x","parentBoundingRect","parentIntersectionRect","child","parentNode","assignedSlot","host","hasOwn","hasOwnProperty","toStr","toString","gOPD","getOwnPropertyDescriptor","arr","isPlainObject","obj","key","hasOwnConstructor","hasIsPrototypeOf","constructor","setProperty","name","enumerable","configurable","newValue","writable","getProperty","module","exports","extend","src","copy","copyIsArray","clone","arguments","deep","COMMENT_REGEX","NEWLINE_REGEX","WHITESPACE_REGEX","PROPERTY_REGEX","COLON_REGEX","VALUE_REGEX","SEMICOLON_REGEX","TRIM_REGEX","EMPTY_STRING","trim","str","replace","style","TypeError","lineno","column","updatePosition","lines","match","lastIndexOf","position","start","line","Position","whitespace","end","source","content","errorsList","msg","reason","filename","silent","re","m","comments","rules","c","comment","pos","charAt","type","declaration","prop","val","ret","property","decl","decls","declarations","qs","sep","eq","regexp","maxKeys","len","kstr","vstr","k","v","idx","substr","decodeURIComponent","stringifyPrimitive","isFinite","undefined","keys","ks","encodeURIComponent","decode","parse","encode","stringify","isOptionsObject","isTargetAttached","isConnected","contains","behavior","computeOptions","block","inline","getOptions","actions","canSmoothScroll","_ref","scroll","scrollTop","scrollLeft","defaultBehavior","__importDefault","mod","__esModule","iterator","styleObject","inline_style_parser_1","default","hasIterator","nameRe","nameReJsx","emptyOptions","jsx","test","empty","Schema","normal","space","merge","definitions","assign","normalize","toLowerCase","Info","attribute","boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated","mustUseProperty","defined","powers","increment","checks","DefinedInfo","mask","super","mark","check","values","own","create","definition","properties","info","transform","includes","xlink","_","xLinkActuate","xLinkArcRole","xLinkHref","xLinkRole","xLinkShow","xLinkTitle","xLinkType","xml","xmlLang","xmlBase","xmlSpace","caseSensitiveTransform","caseInsensitiveTransform","xmlns","xmlnsxlink","xmlnsXLink","aria","ariaActiveDescendant","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaControls","ariaCurrent","ariaDescribedBy","ariaDetails","ariaDisabled","ariaDropEffect","ariaErrorMessage","ariaExpanded","ariaFlowTo","ariaGrabbed","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLabelledBy","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaOwns","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRelevant","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText","role","acceptcharset","classname","htmlfor","httpequiv","abbr","accept","acceptCharset","accessKey","action","allow","allowFullScreen","allowPaymentRequest","allowUserMedia","alt","as","async","autoCapitalize","autoComplete","autoFocus","autoPlay","blocking","capture","charSet","checked","cite","className","cols","colSpan","contentEditable","controls","controlsList","coords","crossOrigin","data","dateTime","decoding","defer","dir","dirName","disabled","download","draggable","encType","enterKeyHint","fetchPriority","form","formAction","formEncType","formMethod","formNoValidate","formTarget","headers","hidden","high","href","hrefLang","htmlFor","httpEquiv","id","imageSizes","imageSrcSet","inert","inputMode","integrity","isMap","itemId","itemProp","itemRef","itemScope","itemType","kind","label","lang","language","list","loading","loop","low","manifest","maxLength","media","method","minLength","multiple","muted","nonce","noModule","noValidate","onAbort","onAfterPrint","onAuxClick","onBeforeMatch","onBeforePrint","onBeforeToggle","onBeforeUnload","onBlur","onCancel","onCanPlay","onCanPlayThrough","onChange","onClick","onClose","onContextLost","onContextMenu","onContextRestored","onCopy","onCueChange","onCut","onDblClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onDurationChange","onEmptied","onEnded","onError","onFocus","onFormData","onHashChange","onInput","onInvalid","onKeyDown","onKeyPress","onKeyUp","onLanguageChange","onLoad","onLoadedData","onLoadedMetadata","onLoadEnd","onLoadStart","onMessage","onMessageError","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onOffline","onOnline","onPageHide","onPageShow","onPaste","onPause","onPlay","onPlaying","onPopState","onProgress","onRateChange","onRejectionHandled","onReset","onResize","onScroll","onScrollEnd","onSecurityPolicyViolation","onSeeked","onSeeking","onSelect","onSlotChange","onStalled","onStorage","onSubmit","onSuspend","onTimeUpdate","onToggle","onUnhandledRejection","onUnload","onVolumeChange","onWaiting","onWheel","open","optimum","pattern","ping","placeholder","playsInline","popover","popoverTarget","popoverTargetAction","poster","preload","readOnly","referrerPolicy","rel","required","reversed","rows","rowSpan","sandbox","scope","scoped","seamless","selected","shadowRootClonable","shadowRootDelegatesFocus","shadowRootMode","shape","size","sizes","slot","span","spellCheck","srcDoc","srcLang","srcSet","step","tabIndex","title","translate","typeMustMatch","useMap","wrap","writingSuggestions","align","aLink","archive","axis","background","bgColor","border","borderColor","bottomMargin","cellPadding","cellSpacing","char","charOff","classId","clear","code","codeBase","codeType","color","compact","declare","face","frameBorder","hSpace","leftMargin","link","longDesc","lowSrc","marginHeight","marginWidth","noResize","noHref","noShade","noWrap","object","profile","prompt","rev","rightMargin","scheme","scrolling","standby","summary","text","topMargin","valueType","version","vAlign","vLink","vSpace","allowTransparency","autoCorrect","autoSave","disablePictureInPicture","disableRemotePlayback","prefix","results","security","unselectable","svg","accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dataType","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","horizOriginY","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","navDown","navDownLeft","navDownRight","navLeft","navNext","navPrev","navRight","navUp","navUpLeft","navUpRight","onActivate","onBegin","onEnd","onFocusIn","onFocusOut","onMouseWheel","onRepeat","onShow","onZoom","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDashArray","strokeDashOffset","strokeLineCap","strokeLineJoin","strokeMiterLimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","transformOrigin","typeOf","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xHeight","playbackOrder","timelineBegin","about","accumulate","additive","alphabetic","amplitude","ascent","attributeName","attributeType","azimuth","bandwidth","baseFrequency","baseProfile","bbox","begin","bias","by","calcMode","clip","clipPathUnits","contentScriptType","contentStyleType","cursor","cx","cy","d","defaultAction","descent","diffuseConstant","direction","dur","divisor","dx","dy","edgeMode","editable","elevation","exponent","externalResourcesRequired","fill","filterRes","filterUnits","focusable","focusHighlight","format","fr","from","fx","fy","g1","g2","glyphRef","gradientTransform","gradientUnits","handler","hanging","hatchContentUnits","hatchUnits","ideographic","initialVisibility","in","in2","intercept","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","kerning","lengthAdjust","limitingConeAngle","local","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","mathematical","mediaCharacterEncoding","mediaContentEncodings","mediaSize","mediaTime","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overlay","path","pathLength","patternContentUnits","patternTransform","patternUnits","phase","pitch","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","propagate","r","radius","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","requiredFonts","requiredFormats","resource","restart","result","rotate","rx","ry","scale","seed","side","slope","snapshotTime","specularConstant","specularExponent","spreadMethod","spacing","startOffset","stdDeviation","stemh","stemv","stitchTiles","string","stroke","surfaceScale","syncBehavior","syncBehaviorDefault","syncMaster","syncTolerance","syncToleranceDefault","systemLanguage","tableValues","targetX","targetY","textLength","transformBehavior","to","u1","u2","unicode","viewBox","viewTarget","visibility","widths","x1","x2","xChannelSelector","y1","y2","yChannelSelector","z","zoomAndPan","valid","dash","cap","kebab","$0","camelcase","toUpperCase","hastToReact","pointEnd","point","pointStart","stringifyPosition","VFileMessage","causeOrReason","optionsOrParentOrPlace","legacyCause","place","ancestors","cause","message","ruleId","fatal","file","stack","actual","expected","note","url","emptyMap","Map","dashSomething","tableElements","Set","tableCellElement","docs","toJsxRuntime","tree","Fragment","filePath","development","jsxDEV","props","isStaticChildren","children","columnNumber","fileName","lineNumber","developmentCreate","jsxs","productionCreate","components","elementAttributeNameCase","evaluater","createEvaluater","ignoreInvalidStyle","passKeys","passNode","schema","stylePropertyNameCase","tableCellAlignToStyle","one","parentSchema","tagName","findComponentFromName","alignValue","createProperty","has","createElementProps","createChildren","thing","addNode","addChildren","pop","estree","expression","evaluateExpression","crashEstree","mdxExpression","objectExpression","argument","createJsxElementProps","mdxJsxElement","evaluateProgram","mdxEsm","countsByName","count","set","Type","rest","dashes","find","settings","padRight","padLeft","replacer","toCamel","parseStyle","String","domCasing","cssCasing","transformStyleToCssCasing","transformStylesToCssCasing","allowExpression","identifiers","computed","optional","toDash","$1","urlAttributes","icon","includeImageAlt","includeHtml","remove","items","parameters","chunkStart","unshift","SpliceBuffer","initial","RangeError","shift","setCursor","stop","POSITIVE_INFINITY","reverse","concat","deleteCount","trunc","removed","chunkedPush","pushMany","unshiftMany","n","subtokenize","eventsArray","jumps","lineIndex","otherIndex","otherEvent","subevents","more","events","_tokenizer","_isInFirstContentOfListItem","contentType","subcontent","_container","eventIndex","token","context","startPosition","startPositions","tokenizer","parser","childEvents","gaps","stream","previous","adjust","breaks","sliceStream","defineSkip","_gfmTasklistFirstContentOfListItem","write","syntaxExtension","all","extension","hook","constructs","existing","before","add","asciiAlpha","regexCheck","asciiAlphanumeric","asciiAtext","asciiControl","asciiDigit","asciiHexDigit","asciiPunctuation","markdownLineEnding","markdownLineEndingOrSpace","markdownSpace","unicodePunctuation","unicodeWhitespace","regex","fromCharCode","factorySpace","effects","ok","limit","enter","consume","exit","tokenize","contentStart","attempt","contentInitial","lineStart","self","childFlow","childToken","lineStartOffset","continued","containerState","continuation","documentContinue","checkNewContainers","_closeFlow","closeFlow","indexBeforeExits","indexBeforeFlow","exitContainers","documentContinued","currentConstruct","concrete","flowStart","interrupt","_gfmTableDynamicInterruptHack","containerConstruct","thereIsANewContainer","thereIsNoNewContainer","lazy","containerContinue","flow","flowContinue","writeToChild","endOfFile","seen","nok","disable","null","blankLine","partial","after","resolve","chunkInside","contentEnd","continuationConstruct","contentContinue","prefixed","tail","sliceSerialize","flowInitial","afterConstruct","resolver","resolveAll","createResolver","initializeFactory","field","resolveAllLineSuffixes","notText","atBreak","extraResolver","chunks","tabs","bufferIndex","chunk","charCodeAt","_bufferIndex","_index","thematicBreak","marker","sequence","onBlank","notBlank","furtherBlankLines","initialBlankLine","notInCurrentItem","indentConstruct","initialSize","atMarker","inside","listItemPrefixWhitespaceConstruct","endOfPrefix","otherPrefix","blockQuote","contBefore","factoryDestination","literalType","literalMarkerType","rawType","stringType","balance","enclosedBefore","raw","enclosed","enclosedEscape","rawEscape","factoryLabel","markerType","labelInside","labelEscape","factoryTitle","escape","factoryWhitespace","normalizeIdentifier","identifier","labelAfter","markerAfter","destinationBefore","destinationAfter","titleBefore","afterWhitespace","beforeMarker","titleAfter","titleAfterOptionalWhitespace","codeIndented","afterPrefix","furtherStart","headingAtx","sequenceOpen","sequenceFurther","setextUnderline","resolveTo","heading","paragraph","htmlBlockNames","htmlRawNames","htmlFlow","closingTag","buffer","markerB","declarationOpen","tagCloseStart","continuationDeclarationInside","commentOpenInside","cdataOpenInside","slash","basicSelfClosing","completeClosingTagAfter","completeAttributeNameBefore","completeEnd","completeAttributeName","completeAttributeNameAfter","completeAttributeValueBefore","completeAttributeValueQuoted","completeAttributeValueUnquoted","completeAttributeValueQuotedAfter","completeAfter","continuationCommentInside","continuationRawTagOpen","continuationClose","continuationCdataInside","continuationStart","blankLineBefore","continuationAfter","nonLazyContinuationStart","continuationStartNonLazy","continuationBefore","continuationRawEndTag","nonLazyContinuation","codeFenced","closeStart","startBefore","beforeSequenceClose","sequenceClose","sizeOpen","sequenceCloseAfter","initialPrefix","beforeSequenceOpen","infoBefore","atNonLazyBreak","metaBefore","meta","contentBefore","beforeContentChunk","contentChunk","decodeNamedCharacterReference","characterReference","innerHTML","textContent","numeric","characterEscape","lineEnding","called","labelEnd","newEvents","close","_inactive","_balanced","group","insideSpan","labelStart","labelEndNok","resourceConstruct","labelEndOk","referenceFullConstruct","referenceNotFull","referenceCollapsedConstruct","resourceBefore","resourceOpen","resourceEnd","resourceDestinationAfter","resourceDestinationMissing","resourceBetween","resourceTitleAfter","referenceFullAfter","referenceFullMissing","referenceCollapsedOpen","labelStartImage","classifyCharacter","attention","openingSequence","closingSequence","use","nextEvents","_close","_open","movePoint","attentionMarkers","autolink","schemeOrEmailAtext","emailAtext","schemeInsideOrEmailAtext","urlInside","emailAtSignOrDot","emailLabel","emailValue","htmlText","returnState","instruction","tagOpen","commentEnd","commentClose","lineEndingBefore","cdata","cdataClose","cdataEnd","instructionClose","tagClose","tagCloseBetween","tagOpenBetween","tagOpenAttributeName","tagOpenAttributeNameAfter","tagOpenAttributeValueBefore","tagOpenAttributeValueQuoted","tagOpenAttributeValueUnquoted","tagOpenAttributeValueQuotedAfter","lineEndingAfter","lineEndingAfterPrefix","labelStartLink","hardBreakEscape","codeText","tailExitIndex","headEnterIndex","between","createTokenizer","initialize","columnStart","resolveAllConstructs","consumed","constructFactory","construct","addResult","onsuccessfulcheck","accountForPotentialSkip","fields","expandTabs","atTab","serializeChunks","main","expectedCode","startIndex","startBufferIndex","endIndex","endBufferIndex","view","head","sliceChunks","chunkIndex","go","restore","onreturn","bogusState","listOfConstructs","constructIndex","handleListOfConstructs","handleMapOfConstructs","handleConstruct","startPoint","startPrevious","startCurrentConstruct","startEventsIndex","startStack","store","extensions","combineExtensions","search","decodeNumericCharacterReference","base","parseInt","fromCodePoint","characterEscapeOrReference","$2","hex","fromMarkdown","encoding","config","transforms","canContainEols","opener","autolinkProtocol","onenterdata","autolinkEmail","atxHeading","codeFlow","codeFencedFenceInfo","codeFencedFenceMeta","codeTextData","codeFlowValue","definitionDestinationString","definitionLabelString","definitionTitleString","emphasis","hardBreak","hardBreakTrailing","htmlFlowData","htmlTextData","image","listItem","listItemValue","onenterlistitemvalue","listOrdered","onenterlistordered","listUnordered","reference","onenterreference","referenceString","resourceDestinationString","resourceTitleString","setextHeading","strong","closer","atxHeadingSequence","onexitatxheadingsequence","onexitautolinkemail","onexitautolinkprotocol","characterEscapeValue","onexitdata","characterReferenceMarkerHexadecimal","onexitcharacterreferencemarker","characterReferenceMarkerNumeric","characterReferenceValue","onexitcharacterreferencevalue","onexitcharacterreference","onexitcodefenced","codeFencedFence","onexitcodefencedfence","onexitcodefencedfenceinfo","onexitcodefencedfencemeta","onexitcodeindented","onexitcodetext","onexitdefinitiondestinationstring","onexitdefinitionlabelstring","onexitdefinitiontitlestring","onexithardbreak","onexithtmlflow","onexithtmltext","onexitimage","onexitlabel","labelText","onexitlabeltext","onexitlineending","onexitlink","onexitreferencestring","onexitresourcedestinationstring","onexitresourcetitlestring","onexitresource","onexitsetextheading","setextHeadingLineSequence","onexitsetextheadinglinesequence","setextHeadingText","onexitsetextheadingtext","configure","mdastExtensions","compile","tokenStack","resume","listStack","prepareList","defaultOnError","firstBlankLineIndex","containerBalance","listSpread","tailIndex","tailEvent","_spread","and","errorHandler","onExitError","expectingFirstListItemValue","flowCodeInside","depth","setextHeadingSlurpLineEnding","codePointAt","siblings","atHardBreak","inReference","referenceType","ancestor","decodeString","fragment","characterReferenceType","ordered","spread","compiler","postprocess","atCarriageReturn","endPosition","TextDecoder","lastIndex","ceil","preprocess","combined","remarkParse","env","globalThis","deserialize","serialized","$","out","unpair","Date","flags","RegExp","BigInt","deserializer","EMPTY","asString","shouldSkip","TYPE","serialize","json","lossy","strict","pair","valueOf","toJSON","toISOString","serializer","structuredClone","any","normalizeUri","skip","defaultFootnoteBackContent","rereferenceIndex","defaultFootnoteBackLabel","referenceIndex","convert","castFactory","tests","apply","anyFactory","checkAsRecord","nodeAsRecord","propsFactory","typeFactory","testFunction","looksLikeANode","CONTINUE","EXIT","SKIP","visitParents","visitor","factory","parents","visit","subresult","grandparents","toResult","nodeAsParent","testOrVisitor","visitorOrReverse","maybeReverse","revert","subtype","suffix","contents","listItemLoose","tab","trimLines","last","trimLine","blockquote","patch","applyData","break","delete","footnoteReference","clobberPrefix","safeId","footnoteOrder","counter","reuseCounter","footnoteCounts","dataFootnoteRef","sup","allowDangerousHtml","imageReference","definitionById","inlineCode","linkReference","loose","listLoose","table","firstRow","tableContent","tableCell","tableRow","cellIndex","cells","cell","toml","ignore","yaml","footnoteDefinition","hName","hChildren","hProperties","defaultUnknownHandler","nodes","trimMarkdownSpaceStart","toHast","footnoteById","handlers","handle","passThrough","shallow","unknownHandler","createState","foot","footnoteBackContent","footnoteBackLabel","footnoteLabel","footnoteLabelTagName","footnoteLabelProperties","listItems","backReferences","counts","dataFootnoteBackref","tailTail","dataFootnotes","footer","remarkRehype","destination","hastTree","run","bail","getPrototypeOf","Symbol","toStringTag","trough","fns","pipeline","middlewareIndex","output","middleware","wrapped","fnExpectsCallback","then","middelware","minpath","basename","extname","assertPath","seenNonSlash","firstNonSlashEnd","extnameIndex","dirname","unmatchedSlash","startPart","startDot","preDotState","segments","joined","absolute","allowAboveRoot","lastSlashIndex","lastSegmentLength","lastSlash","dots","normalizeString","JSON","minproc","cwd","isUrl","fileUrlOrPath","protocol","auth","urlToPath","URL","hostname","pathname","third","getPathFromURLPosix","VFile","isUint8Array","history","messages","stored","assertNonEmpty","assertPart","stem","fail","part","CallableInstance","proto","setPrototypeOf","Processor","Compiler","Parser","attachers","freezeIndex","frozen","namespace","transformers","attacher","assertUnfrozen","freeze","transformer","realFile","vfile","assertParser","process","assertCompiler","executor","Promise","reject","parseTree","realDone","compileTree","compileResult","processSync","complete","assertDone","assertNode","outputTree","resultingTree","runSync","addPlugin","addList","addPreset","plugin","plugins","entryIndex","primary","currentPrimary","unified","asyncName","looksLikeAVFile","emptyPlugins","emptyRemarkRehypeOptions","safeProtocol","deprecations","Markdown","allowedElements","allowElement","disallowedElements","rehypePlugins","remarkPlugins","remarkRehypeOptions","skipHtml","unwrapDisallowed","urlTransform","defaultUrlTransform","processor","deprecation","mdastTree","colon","questionMark","numberSign"],"sourceRoot":""}