@e-llm-studio/instant-learning 0.0.104 → 0.0.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/IL-OTJ/ILOTJ.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponent.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/CitationLink.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/CognitiveDecisioningCard.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ILPopup.styles.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/InputDataReasoningCard.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/InputDataReasoningCard.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MinimizedThinkingSteps.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/cjs/node_modules/@e-llm-studio/citation/dist/features/Bookemon/Bookemon.js.map +1 -1
- package/dist/cjs/node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js +1 -1
- package/dist/cjs/node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-find-and-replace/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-find-and-replace/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/unist-util-is/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/unist-util-is/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/color.browser.js +2 -0
- package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/color.browser.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-from-markdown/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-from-markdown/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-gfm/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +2 -0
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-gfm-footnote/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-footnote/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-strikethrough/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-strikethrough/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-table/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-table/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-task-list-item/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-task-list-item/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/list-item.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/association.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/association.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/container-flow.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/container-flow.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/safe.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/safe.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/track.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/track.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-string/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark/lib/constructs.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/constructs.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/create-tokenizer.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/create-tokenizer.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/content.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/content.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/document.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/document.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/flow.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/flow.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/text.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/text.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/parse.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/parse.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/postprocess.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/postprocess.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/preprocess.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/preprocess.js.map +1 -0
- package/dist/cjs/node_modules/micromark/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/attention.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/attention.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/autolink.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/autolink.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/blank-line.js +1 -1
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -1
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/block-quote.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/block-quote.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/character-escape.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/character-escape.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/character-reference.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/character-reference.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/code-fenced.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/code-fenced.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/code-indented.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/code-indented.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/code-text.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/code-text.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/content.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/content.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/definition.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/definition.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/hard-break-escape.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/heading-atx.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/heading-atx.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/html-flow.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/html-flow.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/html-text.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/html-text.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/label-end.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/label-end.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/label-start-image.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/label-start-image.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/label-start-link.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/label-start-link.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/line-ending.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/line-ending.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/list.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/list.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/setext-underline.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/setext-underline.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/thematic-break.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/thematic-break.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm/index.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-footnote/lib/syntax.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-footnote/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-footnote/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/edit-map.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/edit-map.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/infer.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/syntax.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/syntax.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-table/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-table/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-task-list-item/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-task-list-item/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-destination/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-destination/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-destination/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-destination/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-label/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-label/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-label/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-label/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-space/index.js +1 -1
- package/dist/cjs/node_modules/micromark-factory-space/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-factory-space/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-space/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-title/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-title/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-title/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-title/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-whitespace/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-whitespace/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-whitespace/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-whitespace/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-chunked/index.js +1 -1
- package/dist/cjs/node_modules/micromark-util-chunked/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-util-classify-character/index.js +1 -1
- package/dist/cjs/node_modules/micromark-util-classify-character/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +2 -0
- package/dist/cjs/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-combine-extensions/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-util-decode-numeric-character-reference/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-decode-numeric-character-reference/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-decode-string/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-decode-string/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-html-tag-name/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-html-tag-name/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-normalize-identifier/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-util-resolve-all/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-util-subtokenize/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-subtokenize/index.js.map +1 -0
- package/dist/cjs/node_modules/react-markdown/lib/react-markdown.js +1 -1
- package/dist/cjs/node_modules/react-markdown/lib/react-markdown.js.map +1 -1
- package/dist/cjs/node_modules/react-markdown/node_modules/remark-parse/lib/index.js +1 -1
- package/dist/cjs/node_modules/react-markdown/node_modules/remark-parse/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/remark-gfm/index.js +2 -0
- package/dist/cjs/node_modules/remark-gfm/index.js.map +1 -0
- package/dist/cjs/node_modules/unified/lib/index.js +2 -0
- package/dist/cjs/node_modules/unified/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/is-plain-obj/index.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/is-plain-obj/index.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/unist-util-stringify-position/lib/index.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/index.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minpath.browser.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minpath.browser.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minproc.browser.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minproc.browser.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minurl.browser.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minurl.browser.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minurl.shared.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minurl.shared.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile-message/lib/index.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile-message/lib/index.js.map +1 -0
- package/dist/features/IL-OTJ/ILOTJ.js +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponent.js +1 -1
- package/dist/features/IL-OTJ/_components/CitationLink.js +1 -1
- package/dist/features/IL-OTJ/_components/CognitiveDecisioningCard.js +1 -1
- package/dist/features/IL-OTJ/_components/ILPopup.styles.js +1 -1
- package/dist/features/IL-OTJ/_components/InputDataReasoningCard.js +2 -0
- package/dist/features/IL-OTJ/_components/InputDataReasoningCard.js.map +1 -0
- package/dist/features/IL-OTJ/_components/MessageRendering.js +1 -1
- package/dist/features/IL-OTJ/_components/MinimizedThinkingSteps.js +1 -1
- package/dist/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
- package/dist/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/node_modules/@e-llm-studio/citation/dist/features/Bookemon/Bookemon.js.map +1 -1
- package/dist/node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js +1 -1
- package/dist/node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js.map +1 -1
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/unist-util-is/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/unist-util-is/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/color.browser.js +2 -0
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/color.browser.js.map +1 -0
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-gfm/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +2 -0
- package/dist/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-gfm-table/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-gfm-table/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/association.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/association.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/container-flow.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/container-flow.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/safe.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/safe.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/track.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/track.js.map +1 -0
- package/dist/node_modules/mdast-util-to-string/lib/index.js.map +1 -1
- package/dist/node_modules/micromark/lib/constructs.js +2 -0
- package/dist/node_modules/micromark/lib/constructs.js.map +1 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.js +2 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/content.js +2 -0
- package/dist/node_modules/micromark/lib/initialize/content.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/document.js +2 -0
- package/dist/node_modules/micromark/lib/initialize/document.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/flow.js +2 -0
- package/dist/node_modules/micromark/lib/initialize/flow.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/text.js +2 -0
- package/dist/node_modules/micromark/lib/initialize/text.js.map +1 -0
- package/dist/node_modules/micromark/lib/parse.js +2 -0
- package/dist/node_modules/micromark/lib/parse.js.map +1 -0
- package/dist/node_modules/micromark/lib/postprocess.js +2 -0
- package/dist/node_modules/micromark/lib/postprocess.js.map +1 -0
- package/dist/node_modules/micromark/lib/preprocess.js +2 -0
- package/dist/node_modules/micromark/lib/preprocess.js.map +1 -0
- package/dist/node_modules/micromark/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm/index.js +1 -1
- package/dist/node_modules/micromark-extension-gfm/index.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +1 -1
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +1 -1
- package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-footnote/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-footnote/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +1 -1
- package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-table/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +1 -1
- package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-task-list-item/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-task-list-item/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-destination/index.js +2 -0
- package/dist/node_modules/micromark-factory-destination/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-destination/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-factory-destination/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-label/index.js +2 -0
- package/dist/node_modules/micromark-factory-label/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-label/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-factory-label/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-space/index.js +1 -1
- package/dist/node_modules/micromark-factory-space/index.js.map +1 -1
- package/dist/node_modules/micromark-factory-space/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-factory-space/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-title/index.js +2 -0
- package/dist/node_modules/micromark-factory-title/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-title/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-factory-title/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-whitespace/index.js +2 -0
- package/dist/node_modules/micromark-factory-whitespace/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-whitespace/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-factory-whitespace/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-util-chunked/index.js +1 -1
- package/dist/node_modules/micromark-util-chunked/index.js.map +1 -1
- package/dist/node_modules/micromark-util-classify-character/index.js +1 -1
- package/dist/node_modules/micromark-util-classify-character/index.js.map +1 -1
- package/dist/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +2 -0
- package/dist/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js.map +1 -0
- package/dist/node_modules/micromark-util-combine-extensions/index.js.map +1 -1
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +2 -0
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js.map +1 -0
- package/dist/node_modules/micromark-util-decode-string/index.js +2 -0
- package/dist/node_modules/micromark-util-decode-string/index.js.map +1 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.js +2 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.js.map +1 -0
- package/dist/node_modules/micromark-util-normalize-identifier/index.js.map +1 -1
- package/dist/node_modules/micromark-util-resolve-all/index.js.map +1 -1
- package/dist/node_modules/micromark-util-subtokenize/index.js +2 -0
- package/dist/node_modules/micromark-util-subtokenize/index.js.map +1 -0
- package/dist/node_modules/react-markdown/lib/react-markdown.js +1 -1
- package/dist/node_modules/react-markdown/lib/react-markdown.js.map +1 -1
- package/dist/node_modules/react-markdown/node_modules/remark-parse/lib/index.js +1 -1
- package/dist/node_modules/react-markdown/node_modules/remark-parse/lib/index.js.map +1 -1
- package/dist/node_modules/remark-gfm/index.js +2 -0
- package/dist/node_modules/remark-gfm/index.js.map +1 -0
- package/dist/node_modules/unified/lib/index.js +2 -0
- package/dist/node_modules/unified/lib/index.js.map +1 -0
- package/dist/node_modules/unified/node_modules/is-plain-obj/index.js +2 -0
- package/dist/node_modules/unified/node_modules/is-plain-obj/index.js.map +1 -0
- package/dist/node_modules/unified/node_modules/unist-util-stringify-position/lib/index.js +2 -0
- package/dist/node_modules/unified/node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/index.js +2 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/index.js.map +1 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minpath.browser.js +2 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minpath.browser.js.map +1 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minproc.browser.js +2 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minproc.browser.js.map +1 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minurl.browser.js +2 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minurl.browser.js.map +1 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minurl.shared.js +2 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minurl.shared.js.map +1 -0
- package/dist/node_modules/unified/node_modules/vfile-message/lib/index.js +2 -0
- package/dist/node_modules/unified/node_modules/vfile-message/lib/index.js.map +1 -0
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponent.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/_components/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts +13 -0
- package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CognitiveDecisioningCard.d.ts +3 -0
- package/dist/types/src/features/IL-OTJ/_components/CognitiveDecisioningCard.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.styles.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.styles.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/InputDataReasoningCard.d.ts +10 -0
- package/dist/types/src/features/IL-OTJ/_components/InputDataReasoningCard.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering.d.ts +3 -1
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/_svg/RightSideIcons.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/_components/_svg/RightSideIcons.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts +3 -1
- package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pattern-in-scope.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js"],"sourcesContent":["/**\n * @
|
|
1
|
+
{"version":3,"file":"pattern-in-scope.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js"],"sourcesContent":["/**\n * @typedef {import('../types.js').Unsafe} Unsafe\n * @typedef {import('../types.js').ConstructName} ConstructName\n */\n\n/**\n * @param {Array<ConstructName>} stack\n * @param {Unsafe} pattern\n * @returns {boolean}\n */\nexport function patternInScope(stack, pattern) {\n return (\n listInScope(stack, pattern.inConstruct, true) &&\n !listInScope(stack, pattern.notInConstruct, false)\n )\n}\n\n/**\n * @param {Array<ConstructName>} stack\n * @param {Unsafe['inConstruct']} list\n * @param {boolean} none\n * @returns {boolean}\n */\nfunction listInScope(stack, list, none) {\n if (typeof list === 'string') {\n list = [list]\n }\n\n if (!list || list.length === 0) {\n return none\n }\n\n let index = -1\n\n while (++index < list.length) {\n if (stack.includes(list[index])) {\n return true\n }\n }\n\n return false\n}\n"],"names":["patternInScope","stack","pattern","listInScope","inConstruct","notInConstruct","list","none","length","index","includes"],"mappings":"AAUO,SAASA,EAAeC,EAAOC,GACpC,OACEC,EAAYF,EAAOC,EAAQE,aAAa,KACvCD,EAAYF,EAAOC,EAAQG,gBAAgB,EAEhD,CAQA,SAASF,EAAYF,EAAOK,EAAMC,GAKhC,GAJoB,iBAATD,IACTA,EAAO,CAACA,KAGLA,GAAwB,IAAhBA,EAAKE,OAChB,OAAOD,EAGT,IAAIE,GAAS,EAEb,OAASA,EAAQH,EAAKE,QACpB,GAAIP,EAAMS,SAASJ,EAAKG,IACtB,OAAO,EAIX,OAAO,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{patternCompile as e}from"./pattern-compile.js";import{patternInScope as t}from"./pattern-in-scope.js";function r(r,f,s){const c=(s.before||"")+(f||"")+(s.after||""),a=[],i=[],u={};let h=-1;for(;++h<r.unsafe.length;){const o=r.unsafe[h];if(!t(r.stack,o))continue;const n=e(o);let f;for(;f=n.exec(c);){const e="before"in o||Boolean(o.atBreak),t="after"in o,r=f.index+(e?f[1].length:0);a.includes(r)?(u[r].before&&!e&&(u[r].before=!1),u[r].after&&!t&&(u[r].after=!1)):(a.push(r),u[r]={before:e,after:t})}}a.sort(o);let l=s.before?s.before.length:0;const p=c.length-(s.after?s.after.length:0);for(h=-1;++h<a.length;){const e=a[h];e<l||e>=p||(e+1<p&&a[h+1]===e+1&&u[e].after&&!u[e+1].before&&!u[e+1].after||a[h-1]===e-1&&u[e].before&&!u[e-1].before&&!u[e-1].after||(l!==e&&i.push(n(c.slice(l,e),"\\")),l=e,!/[!-/:-@[-`{-~]/.test(c.charAt(e))||s.encode&&s.encode.includes(c.charAt(e))?(i.push("&#x"+c.charCodeAt(e).toString(16).toUpperCase()+";"),l++):i.push("\\")))}return i.push(n(c.slice(l,p),s.after)),i.join("")}function o(e,t){return e-t}function n(e,t){const r=/\\(?=[!-/:-@[-`{-~])/g,o=[],n=[],f=e+t;let s,c=-1,a=0;for(;s=r.exec(f);)o.push(s.index);for(;++c<o.length;)a!==o[c]&&n.push(e.slice(a,o[c])),n.push("\\"),a=o[c];return n.push(e.slice(a)),n.join("")}export{r as safe};
|
|
2
|
+
//# sourceMappingURL=safe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/util/safe.js"],"sourcesContent":["/**\n * @typedef {import('../types.js').State} State\n * @typedef {import('../types.js').SafeConfig} SafeConfig\n */\n\nimport {patternCompile} from './pattern-compile.js'\nimport {patternInScope} from './pattern-in-scope.js'\n\n/**\n * Make a string safe for embedding in markdown constructs.\n *\n * In markdown, almost all punctuation characters can, in certain cases,\n * result in something.\n * Whether they do is highly subjective to where they happen and in what\n * they happen.\n *\n * To solve this, `mdast-util-to-markdown` tracks:\n *\n * * Characters before and after something;\n * * What “constructs” we are in.\n *\n * This information is then used by this function to escape or encode\n * special characters.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {string | null | undefined} input\n * Raw value to make safe.\n * @param {SafeConfig} config\n * Configuration.\n * @returns {string}\n * Serialized markdown safe for embedding.\n */\nexport function safe(state, input, config) {\n const value = (config.before || '') + (input || '') + (config.after || '')\n /** @type {Array<number>} */\n const positions = []\n /** @type {Array<string>} */\n const result = []\n /** @type {Record<number, {before: boolean, after: boolean}>} */\n const infos = {}\n let index = -1\n\n while (++index < state.unsafe.length) {\n const pattern = state.unsafe[index]\n\n if (!patternInScope(state.stack, pattern)) {\n continue\n }\n\n const expression = patternCompile(pattern)\n /** @type {RegExpExecArray | null} */\n let match\n\n while ((match = expression.exec(value))) {\n const before = 'before' in pattern || Boolean(pattern.atBreak)\n const after = 'after' in pattern\n const position = match.index + (before ? match[1].length : 0)\n\n if (positions.includes(position)) {\n if (infos[position].before && !before) {\n infos[position].before = false\n }\n\n if (infos[position].after && !after) {\n infos[position].after = false\n }\n } else {\n positions.push(position)\n infos[position] = {before, after}\n }\n }\n }\n\n positions.sort(numerical)\n\n let start = config.before ? config.before.length : 0\n const end = value.length - (config.after ? config.after.length : 0)\n index = -1\n\n while (++index < positions.length) {\n const position = positions[index]\n\n // Character before or after matched:\n if (position < start || position >= end) {\n continue\n }\n\n // If this character is supposed to be escaped because it has a condition on\n // the next character, and the next character is definitly being escaped,\n // then skip this escape.\n if (\n (position + 1 < end &&\n positions[index + 1] === position + 1 &&\n infos[position].after &&\n !infos[position + 1].before &&\n !infos[position + 1].after) ||\n (positions[index - 1] === position - 1 &&\n infos[position].before &&\n !infos[position - 1].before &&\n !infos[position - 1].after)\n ) {\n continue\n }\n\n if (start !== position) {\n // If we have to use a character reference, an ampersand would be more\n // correct, but as backslashes only care about punctuation, either will\n // do the trick\n result.push(escapeBackslashes(value.slice(start, position), '\\\\'))\n }\n\n start = position\n\n if (\n /[!-/:-@[-`{-~]/.test(value.charAt(position)) &&\n (!config.encode || !config.encode.includes(value.charAt(position)))\n ) {\n // Character escape.\n result.push('\\\\')\n } else {\n // Character reference.\n result.push(\n '&#x' + value.charCodeAt(position).toString(16).toUpperCase() + ';'\n )\n start++\n }\n }\n\n result.push(escapeBackslashes(value.slice(start, end), config.after))\n\n return result.join('')\n}\n\n/**\n * @param {number} a\n * @param {number} b\n * @returns {number}\n */\nfunction numerical(a, b) {\n return a - b\n}\n\n/**\n * @param {string} value\n * @param {string} after\n * @returns {string}\n */\nfunction escapeBackslashes(value, after) {\n const expression = /\\\\(?=[!-/:-@[-`{-~])/g\n /** @type {Array<number>} */\n const positions = []\n /** @type {Array<string>} */\n const results = []\n const whole = value + after\n let index = -1\n let start = 0\n /** @type {RegExpExecArray | null} */\n let match\n\n while ((match = expression.exec(whole))) {\n positions.push(match.index)\n }\n\n while (++index < positions.length) {\n if (start !== positions[index]) {\n results.push(value.slice(start, positions[index]))\n }\n\n results.push('\\\\')\n start = positions[index]\n }\n\n results.push(value.slice(start))\n\n return results.join('')\n}\n"],"names":["safe","state","input","config","value","before","after","positions","result","infos","index","unsafe","length","pattern","patternInScope","stack","expression","patternCompile","match","exec","Boolean","atBreak","position","includes","push","sort","numerical","start","end","escapeBackslashes","slice","test","charAt","encode","charCodeAt","toString","toUpperCase","join","a","b","results","whole"],"mappings":"6GAiCO,SAASA,EAAKC,EAAOC,EAAOC,GACjC,MAAMC,GAASD,EAAOE,QAAU,KAAOH,GAAS,KAAOC,EAAOG,OAAS,IAEjEC,EAAY,GAEZC,EAAS,GAETC,EAAQ,CAAE,EAChB,IAAIC,GAAS,EAEb,OAASA,EAAQT,EAAMU,OAAOC,QAAQ,CACpC,MAAMC,EAAUZ,EAAMU,OAAOD,GAE7B,IAAKI,EAAeb,EAAMc,MAAOF,GAC/B,SAGF,MAAMG,EAAaC,EAAeJ,GAElC,IAAIK,EAEJ,KAAQA,EAAQF,EAAWG,KAAKf,IAAS,CACvC,MAAMC,EAAS,WAAYQ,GAAWO,QAAQP,EAAQQ,SAChDf,EAAQ,UAAWO,EACnBS,EAAWJ,EAAMR,OAASL,EAASa,EAAM,GAAGN,OAAS,GAEvDL,EAAUgB,SAASD,IACjBb,EAAMa,GAAUjB,SAAWA,IAC7BI,EAAMa,GAAUjB,QAAS,GAGvBI,EAAMa,GAAUhB,QAAUA,IAC5BG,EAAMa,GAAUhB,OAAQ,KAG1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AAKN,EAAMR,OAGvB,OAASA,EAAQH,EAAUK,QACrBe,IAAUpB,EAAUG,IACtB8B,EAAQhB,KAAKpB,EAAM0B,MAAMH,EAAOpB,EAAUG,KAG5C8B,EAAQhB,KAAK,MACbG,EAAQpB,EAAUG,GAKpB,OAFA8B,EAAQhB,KAAKpB,EAAM0B,MAAMH,IAElBa,EAAQH,KAAK,GACtB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function n(n){const t=n||{},e=t.now||{};let l=t.lineShift||0,i=e.line||1,o=e.column||1;return{move:function(n){const t=n||"",e=t.split(/\r?\n|\r/g),r=e[e.length-1];return i+=e.length-1,o=1===e.length?o+r.length:1+r.length+l,t},current:function(){return{now:{line:i,column:o},lineShift:l}},shift:function(n){l+=n}}}export{n as track};
|
|
2
|
+
//# sourceMappingURL=track.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"track.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/util/track.js"],"sourcesContent":["/**\n * @typedef {import('../types.js').CreateTracker} CreateTracker\n * @typedef {import('../types.js').TrackCurrent} TrackCurrent\n * @typedef {import('../types.js').TrackMove} TrackMove\n * @typedef {import('../types.js').TrackShift} TrackShift\n */\n\n/**\n * Track positional info in the output.\n *\n * @type {CreateTracker}\n */\nexport function track(config) {\n // Defaults are used to prevent crashes when older utilities somehow activate\n // this code.\n /* c8 ignore next 5 */\n const options = config || {}\n const now = options.now || {}\n let lineShift = options.lineShift || 0\n let line = now.line || 1\n let column = now.column || 1\n\n return {move, current, shift}\n\n /**\n * Get the current tracked info.\n *\n * @type {TrackCurrent}\n */\n function current() {\n return {now: {line, column}, lineShift}\n }\n\n /**\n * Define an increased line shift (the typical indent for lines).\n *\n * @type {TrackShift}\n */\n function shift(value) {\n lineShift += value\n }\n\n /**\n * Move past some generated markdown.\n *\n * @type {TrackMove}\n */\n function move(input) {\n // eslint-disable-next-line unicorn/prefer-default-parameters\n const value = input || ''\n const chunks = value.split(/\\r?\\n|\\r/g)\n const tail = chunks[chunks.length - 1]\n line += chunks.length - 1\n column =\n chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift\n return value\n }\n}\n"],"names":["track","config","options","now","lineShift","line","column","move","input","value","chunks","split","tail","length","current","shift"],"mappings":"AAYO,SAASA,EAAMC,GAIpB,MAAMC,EAAUD,GAAU,CAAE,EACtBE,EAAMD,EAAQC,KAAO,CAAE,EAC7B,IAAIC,EAAYF,EAAQE,WAAa,EACjCC,EAAOF,EAAIE,MAAQ,EACnBC,EAASH,EAAIG,QAAU,EAE3B,MAAO,CAACC,KAyBR,SAAcC,GAEZ,MAAMC,EAAQD,GAAS,GACjBE,EAASD,EAAME,MAAM,aACrBC,EAAOF,EAAOA,EAAOG,OAAS,GAIpC,OAHAR,GAAQK,EAAOG,OAAS,EACxBP,EACoB,IAAlBI,EAAOG,OAAeP,EAASM,EAAKC,OAAS,EAAID,EAAKC,OAAST,EAC1DK,CACR,EAlCaK,QAOd,WACE,MAAO,CAACX,IAAK,CAACE,OAAMC,UAASF,YAC9B,EATsBW,MAgBvB,SAAeN,GACbL,GAAaK,CACd,EAiBH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-to-string/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-to-string/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').Root|import('mdast').Content} Node\n *\n * @typedef Options\n * Configuration (optional).\n * @property {boolean | null | undefined} [includeImageAlt=true]\n * Whether to use `alt` for `image`s.\n * @property {boolean | null | undefined} [includeHtml=true]\n * Whether to use `value` of HTML.\n */\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Get the text content of a node or list of nodes.\n *\n * Prefers the node’s plain-text fields, otherwise serializes its children,\n * and if the given value is an array, serialize the nodes in it.\n *\n * @param {unknown} value\n * Thing to serialize, typically `Node`.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {string}\n * Serialized `value`.\n */\nexport function toString(value, options) {\n const settings = options || emptyOptions\n const includeImageAlt =\n typeof settings.includeImageAlt === 'boolean'\n ? settings.includeImageAlt\n : true\n const includeHtml =\n typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true\n\n return one(value, includeImageAlt, includeHtml)\n}\n\n/**\n * One node or several nodes.\n *\n * @param {unknown} value\n * Thing to serialize.\n * @param {boolean} includeImageAlt\n * Include image `alt`s.\n * @param {boolean} includeHtml\n * Include HTML.\n * @returns {string}\n * Serialized node.\n */\nfunction one(value, includeImageAlt, includeHtml) {\n if (node(value)) {\n if ('value' in value) {\n return value.type === 'html' && !includeHtml ? '' : value.value\n }\n\n if (includeImageAlt && 'alt' in value && value.alt) {\n return value.alt\n }\n\n if ('children' in value) {\n return all(value.children, includeImageAlt, includeHtml)\n }\n }\n\n if (Array.isArray(value)) {\n return all(value, includeImageAlt, includeHtml)\n }\n\n return ''\n}\n\n/**\n * Serialize a list of nodes.\n *\n * @param {Array<unknown>} values\n * Thing to serialize.\n * @param {boolean} includeImageAlt\n * Include image `alt`s.\n * @param {boolean} includeHtml\n * Include HTML.\n * @returns {string}\n * Serialized nodes.\n */\nfunction all(values, includeImageAlt, includeHtml) {\n /** @type {Array<string>} */\n const result = []\n let index = -1\n\n while (++index < values.length) {\n result[index] = one(values[index], includeImageAlt, includeHtml)\n }\n\n return result.join('')\n}\n\n/**\n * Check if `value` looks like a node.\n *\n * @param {unknown} value\n * Thing.\n * @returns {value is Node}\n * Whether `value` is a node.\n */\nfunction node(value) {\n return Boolean(value && typeof value === 'object')\n}\n"],"names":["emptyOptions","toString","value","options","settings","one","includeImageAlt","includeHtml","Boolean","node","type","alt","all","children","Array","isArray","values","result","index","length","join"],"mappings":"AAYA,MAAMA,EAAe,CAAE,EAehB,SAASC,EAASC,EAAOC,GAC9B,MAAMC,EAAWD,GAAWH,EAQ5B,OAAOK,EAAIH,EAN2B,kBAA7BE,EAASE,iBACZF,EAASE,gBAGmB,kBAAzBF,EAASG,aAA4BH,EAASG,YAGzD,CAcA,SAASF,EAAIH,EAAOI,EAAiBC,GACnC,GAqDF,SAAcL,GACZ,OAAOM,QAAQN,GAA0B,iBAAVA,EACjC,CAvDMO,CAAKP,GAAQ,CACf,GAAI,UAAWA,EACb,MAAsB,SAAfA,EAAMQ,MAAoBH,EAAmBL,EAAMA,MAAX,GAGjD,GAAII,GAAmB,QAASJ,GAASA,EAAMS,IAC7C,OAAOT,EAAMS,IAGf,GAAI,aAAcT,EAChB,OAAOU,EAAIV,EAAMW,SAAUP,EAAiBC,EAE/C,CAED,OAAIO,MAAMC,QAAQb,GACTU,EAAIV,EAAOI,EAAiBC,GAG9B,EACT,CAcA,SAASK,EAAII,EAAQV,EAAiBC,GAEpC,MAAMU,EAAS,GACf,IAAIC,GAAS,EAEb,OAASA,EAAQF,EAAOG,QACtBF,EAAOC,GAASb,EAAIW,EAAOE,GAAQZ,EAAiBC,GAGtD,OAAOU,EAAOG,KAAK,GACrB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{attention as m}from"../../micromark-core-commonmark/lib/attention.js";import{autolink as r}from"../../micromark-core-commonmark/lib/autolink.js";import{blockQuote as o}from"../../micromark-core-commonmark/lib/block-quote.js";import{characterEscape as i}from"../../micromark-core-commonmark/lib/character-escape.js";import{characterReference as c}from"../../micromark-core-commonmark/lib/character-reference.js";import{codeFenced as a}from"../../micromark-core-commonmark/lib/code-fenced.js";import{codeIndented as e}from"../../micromark-core-commonmark/lib/code-indented.js";import{codeText as t}from"../../micromark-core-commonmark/lib/code-text.js";import{definition as k}from"../../micromark-core-commonmark/lib/definition.js";import{hardBreakEscape as l}from"../../micromark-core-commonmark/lib/hard-break-escape.js";import{headingAtx as n}from"../../micromark-core-commonmark/lib/heading-atx.js";import{htmlFlow as s}from"../../micromark-core-commonmark/lib/html-flow.js";import{htmlText as b}from"../../micromark-core-commonmark/lib/html-text.js";import{labelEnd as f}from"../../micromark-core-commonmark/lib/label-end.js";import{labelStartImage as p}from"../../micromark-core-commonmark/lib/label-start-image.js";import{labelStartLink as j}from"../../micromark-core-commonmark/lib/label-start-link.js";import{lineEnding as d}from"../../micromark-core-commonmark/lib/line-ending.js";import{list as h}from"../../micromark-core-commonmark/lib/list.js";import{setextUnderline as u}from"../../micromark-core-commonmark/lib/setext-underline.js";import{thematicBreak as x}from"../../micromark-core-commonmark/lib/thematic-break.js";import{resolver as g}from"./initialize/text.js";const q={42:h,43:h,45:h,48:h,49:h,50:h,51:h,52:h,53:h,54:h,55:h,56:h,57:h,62:o},w={91:k},z={[-2]:e,[-1]:e,32:e},v={35:n,42:x,45:[u,x],60:s,61:u,95:x,96:a,126:a},y={38:c,92:i},A={[-5]:d,[-4]:d,[-3]:d,33:p,38:c,42:m,60:[r,b],91:j,92:[l,i],93:f,95:m,96:t},B={null:[m,g]},C={null:[42,95]},D={null:[]};export{C as attentionMarkers,w as contentInitial,D as disable,q as document,v as flow,z as flowInitial,B as insideSpan,y as string,A as text};
|
|
2
|
+
//# sourceMappingURL=constructs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constructs.js","sources":["../../../../node_modules/micromark/lib/constructs.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Extension} Extension\n */\n\nimport {\n attention,\n autolink,\n blockQuote,\n characterEscape,\n characterReference,\n codeFenced,\n codeIndented,\n codeText,\n definition,\n hardBreakEscape,\n headingAtx,\n htmlFlow,\n htmlText,\n labelEnd,\n labelStartImage,\n labelStartLink,\n lineEnding,\n list,\n setextUnderline,\n thematicBreak\n} 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"],"names":["document","list","blockQuote","contentInitial","definition","flowInitial","codeIndented","flow","headingAtx","thematicBreak","setextUnderline","htmlFlow","codeFenced","string","characterReference","characterEscape","text","lineEnding","labelStartImage","attention","autolink","htmlText","labelStartLink","hardBreakEscape","labelEnd","codeText","insideSpan","null","resolveText","attentionMarkers","disable"],"mappings":"upDA6BY,MAACA,EAAW,CACtB,GAAMC,EACN,GAAMA,EACN,GAAMA,EACN,GAAMA,EACN,GAAMA,EACN,GAAMA,EACN,GAAMA,EACN,GAAMA,EACN,GAAMA,EACN,GAAMA,EACN,GAAMA,EACN,GAAMA,EACN,GAAMA,EACN,GAAMC,GAIKC,EAAiB,CAC5B,GAAMC,GAIKC,EAAc,CACzB,EAAE,GAAIC,EACN,EAAE,GAAIA,EACN,GAAMA,GAIKC,EAAO,CAClB,GAAMC,EACN,GAAMC,EACN,GAAM,CAACC,EAAiBD,GACxB,GAAME,EACN,GAAMD,EACN,GAAMD,EACN,GAAMG,EACN,IAAOA,GAIIC,EAAS,CACpB,GAAMC,EACN,GAAMC,GAIKC,EAAO,CAClB,EAAE,GAAIC,EACN,EAAE,GAAIA,EACN,EAAE,GAAIA,EACN,GAAMC,EACN,GAAMJ,EACN,GAAMK,EACN,GAAM,CAACC,EAAUC,GACjB,GAAMC,EACN,GAAM,CAACC,EAAiBR,GACxB,GAAMS,EACN,GAAML,EACN,GAAMM,GAIKC,EAAa,CACxBC,KAAM,CAACR,EAAWS,IAIPC,EAAmB,CAC9BF,KAAM,CAAC,GAAI,KAIAG,EAAU,CACrBH,KAAM"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{markdownLineEnding as e}from"../node_modules/micromark-util-character/index.js";import{push as n,splice as t}from"../../micromark-util-chunked/index.js";import{resolveAll as r}from"../../micromark-util-resolve-all/index.js";function i(i,o,u){let s=Object.assign(u?Object.assign({},u):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const c={},f=[];let l=[],a=[];const d={consume:function(n){e(n)?(s.line++,s.column=1,s.offset+=-3===n?2:1,I()):-1!==n&&(s.column++,s.offset++);s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===l[s._index].length&&(s._bufferIndex=-1,s._index++));x.previous=n},enter:function(e,n){const t=n||{};return t.type=e,t.start=_(),x.events.push(["enter",t,x]),a.push(t),t},exit:function(e){const n=a.pop();return n.end=_(),x.events.push(["exit",n,x]),n},attempt:g((function(e,n){k(e,n.from)})),check:g(b),interrupt:g(b,{interrupt:!0})},x={previous:null,code:null,containerState:{},events:[],parser:i,sliceStream:p,sliceSerialize:function(e,n){return function(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const o=e[t];let u;if("string"==typeof o)u=o;else switch(o){case-5:u="\r";break;case-4:u="\n";break;case-3:u="\r\n";break;case-2:u=n?" ":"\t";break;case-1:if(!n&&i)continue;u=" ";break;default:u=String.fromCharCode(o)}i=-2===o,r.push(u)}return r.join("")}(p(e),n)},now:_,defineSkip:function(e){c[e.line]=e.column,I()},write:function(e){if(l=n(l,e),h(),null!==l[l.length-1])return[];return k(o,0),x.events=r(f,x.events,x),x.events}};let m=o.tokenize.call(x,d);return o.resolveAll&&f.push(o),x;function p(e){return function(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let u;if(t===i)u=[e[t].slice(r,o)];else{if(u=e.slice(t,i),r>-1){const e=u[0];"string"==typeof e?u[0]=e.slice(r):u.shift()}o>0&&u.push(e[i].slice(0,o))}return u}(l,e)}function _(){const{line:e,column:n,offset:t,_index:r,_bufferIndex:i}=s;return{line:e,column:n,offset:t,_index:r,_bufferIndex:i}}function h(){let e;for(;s._index<l.length;){const n=l[s._index];if("string"==typeof n)for(e=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===e&&s._bufferIndex<n.length;)v(n.charCodeAt(s._bufferIndex));else v(n)}}function v(e){m=m(e)}function b(e,n){n.restore()}function g(e,n){return function(t,r,i){let o,u,c,f;return Array.isArray(t)?l(t):"tokenize"in t?l([t]):function(e){return n;function n(n){const t=null!==n&&e[n],r=null!==n&&e.null;return l([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(r)?r:r?[r]:[]])(n)}}(t);function l(e){return o=e,u=0,0===e.length?i:m(e[u])}function m(e){return function(t){f=function(){const e=_(),n=x.previous,t=x.currentConstruct,r=x.events.length,i=Array.from(a);return{restore:o,from:r};function o(){s=e,x.previous=n,x.currentConstruct=t,x.events.length=r,a=i,I()}}(),c=e,e.partial||(x.currentConstruct=e);if(e.name&&x.parser.constructs.disable.null.includes(e.name))return h();return e.tokenize.call(n?Object.assign(Object.create(x),n):x,d,p,h)(t)}}function p(n){return e(c,f),r}function h(e){return f.restore(),++u<o.length?m(o[u]):i}}}function k(e,n){e.resolveAll&&!f.includes(e)&&f.push(e),e.resolve&&t(x.events,n,x.events.length-n,e.resolve(x.events.slice(n),x)),e.resolveTo&&(x.events=e.resolveTo(x.events,x))}function I(){s.line in c&&s.column<2&&(s.column=c[s.line],s.offset+=c[s.line]-1)}}export{i as createTokenizer};
|
|
2
|
+
//# sourceMappingURL=create-tokenizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-tokenizer.js","sources":["../../../../node_modules/micromark/lib/create-tokenizer.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Chunk} Chunk\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord\n * @typedef {import('micromark-util-types').Effects} Effects\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').ParseContext} ParseContext\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenType} TokenType\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n */\n\n/**\n * @callback Restore\n * @returns {void}\n *\n * @typedef Info\n * @property {Restore} restore\n * @property {number} from\n *\n * @callback ReturnHandle\n * Handle a successful run.\n * @param {Construct} construct\n * @param {Info} info\n * @returns {void}\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 * @param {InitialConstruct} initialize\n * @param {Omit<Point, '_bufferIndex' | '_index'> | undefined} [from]\n * @returns {TokenizeContext}\n */\nexport function createTokenizer(parser, initialize, from) {\n /** @type {Point} */\n let point = Object.assign(\n from\n ? Object.assign({}, from)\n : {\n line: 1,\n column: 1,\n offset: 0\n },\n {\n _index: 0,\n _bufferIndex: -1\n }\n )\n /** @type {Record<string, number>} */\n const columnStart = {}\n /** @type {Array<Construct>} */\n const resolveAllConstructs = []\n /** @type {Array<Chunk>} */\n let chunks = []\n /** @type {Array<Token>} */\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 consume,\n enter,\n exit,\n attempt: constructFactory(onsuccessfulconstruct),\n check: constructFactory(onsuccessfulcheck),\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 previous: null,\n code: null,\n containerState: {},\n events: [],\n parser,\n sliceStream,\n sliceSerialize,\n now,\n defineSkip,\n write\n }\n\n /**\n * The state function.\n *\n * @type {State | void}\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 {line, column, offset, _index, _bufferIndex} = point\n return {\n line,\n column,\n offset,\n _index,\n _bufferIndex\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 {void}\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 (\n point._index === chunkIndex &&\n point._bufferIndex < chunk.length\n ) {\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 * @returns {void}\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 // @ts-expect-error Points w/ non-negative `_bufferIndex` reference\n // strings.\n if (point._bufferIndex === 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 * @param {{interrupt?: boolean | undefined} | undefined} [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<Construct> | Construct | ConstructRecord} constructs\n * @param {State} returnState\n * @param {State | undefined} [bogusState]\n * @returns {State}\n */\n function hook(constructs, returnState, bogusState) {\n /** @type {Array<Construct>} */\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)\n : 'tokenize' in constructs\n ? // @ts-expect-error Looks like a construct.\n handleListOfConstructs([constructs])\n : handleMapOfConstructs(constructs)\n\n /**\n * Handle a list of construct.\n *\n * @param {ConstructRecord} map\n * @returns {State}\n */\n function handleMapOfConstructs(map) {\n return start\n\n /** @type {State} */\n function start(code) {\n const def = 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(def) ? def : def ? [def] : []),\n ...(Array.isArray(all) ? all : all ? [all] : [])\n ]\n return handleListOfConstructs(list)(code)\n }\n }\n\n /**\n * Handle a list of construct.\n *\n * @param {Array<Construct>} list\n * @returns {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 * @returns {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 (\n construct.name &&\n context.parser.constructs.disable.null.includes(construct.name)\n ) {\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,\n effects,\n ok,\n nok\n )(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 * @param {number} from\n * @returns {void}\n */\n function addResult(construct, from) {\n if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {\n resolveAllConstructs.push(construct)\n }\n if (construct.resolve) {\n splice(\n context.events,\n from,\n context.events.length - from,\n construct.resolve(context.events.slice(from), context)\n )\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 */\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 restore,\n from: startEventsIndex\n }\n\n /**\n * Restore state.\n *\n * @returns {void}\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 {void}\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 {Array<Chunk>} chunks\n * @param {Pick<Token, 'end' | 'start'>} token\n * @returns {Array<Chunk>}\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<Chunk>} */\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 {Array<Chunk>} chunks\n * @param {boolean | undefined} [expandTabs=false]\n * @returns {string}\n */\nfunction serializeChunks(chunks, expandTabs) {\n let index = -1\n /** @type {Array<string>} */\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\n switch (chunk) {\n case -5: {\n value = '\\r'\n break\n }\n case -4: {\n value = '\\n'\n break\n }\n case -3: {\n value = '\\r' + '\\n'\n break\n }\n case -2: {\n value = expandTabs ? ' ' : '\\t'\n break\n }\n case -1: {\n if (!expandTabs && atTab) continue\n value = ' '\n break\n }\n default: {\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"],"names":["createTokenizer","parser","initialize","from","point","Object","assign","line","column","offset","_index","_bufferIndex","columnStart","resolveAllConstructs","chunks","stack","effects","consume","code","markdownLineEnding","accountForPotentialSkip","length","context","previous","enter","type","fields","token","start","now","events","push","exit","pop","end","attempt","constructFactory","construct","info","addResult","check","onsuccessfulcheck","interrupt","containerState","sliceStream","sliceSerialize","expandTabs","index","result","atTab","chunk","value","String","fromCharCode","join","serializeChunks","defineSkip","write","slice","main","resolveAll","state","tokenize","call","startIndex","startBufferIndex","endIndex","endBufferIndex","view","head","shift","sliceChunks","chunkIndex","go","charCodeAt","_","restore","onreturn","constructs","returnState","bogusState","listOfConstructs","constructIndex","currentConstruct","Array","isArray","handleListOfConstructs","map","def","all","null","handleMapOfConstructs","list","handleConstruct","startPoint","startPrevious","startCurrentConstruct","startEventsIndex","startStack","store","partial","name","disable","includes","nok","create","ok","resolve","splice","resolveTo"],"mappings":"uOA+CO,SAASA,EAAgBC,EAAQC,EAAYC,GAElD,IAAIC,EAAQC,OAAOC,OACjBH,EACIE,OAAOC,OAAO,CAAE,EAAEH,GAClB,CACEI,KAAM,EACNC,OAAQ,EACRC,OAAQ,GAEd,CACEC,OAAQ,EACRC,cAAe,IAInB,MAAMC,EAAc,CAAE,EAEhBC,EAAuB,GAE7B,IAAIC,EAAS,GAETC,EAAQ,GASZ,MAAMC,EAAU,CACdC,QAkJF,SAAiBC,GACXC,EAAmBD,IACrBd,EAAMG,OACNH,EAAMI,OAAS,EACfJ,EAAMK,SAAoB,IAAVS,EAAc,EAAI,EAClCE,MACmB,IAAVF,IACTd,EAAMI,SACNJ,EAAMK,UAIJL,EAAMO,aAAe,EACvBP,EAAMM,UAENN,EAAMO,eAKFP,EAAMO,eAAiBG,EAAOV,EAAMM,QAAQW,SAC9CjB,EAAMO,cAAgB,EACtBP,EAAMM,WAKVY,EAAQC,SAAWL,CAIpB,EAhLCM,MAmLF,SAAeC,EAAMC,GAGnB,MAAMC,EAAQD,GAAU,CAAE,EAK1B,OAJA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EAAQ6D,iBAAmB9C,GAK7B,GACEA,EAAUgE,MACV/E,EAAQrB,OAAO6E,WAAWwB,QAAQZ,KAAKa,SAASlE,EAAUgE,MAE1D,OAAOG,IAET,OAAOnE,EAAUyB,SAASC,KAIxBrC,EAASrB,OAAOC,OAAOD,OAAOoG,OAAOnF,GAAUI,GAAUJ,EACzDN,EACA0F,EACAF,EAPKnE,CAQLnB,EACH,CACF,CAGD,SAASwF,EAAGxF,GAGV,OADA2D,EAASM,EAAkB7C,GACpByC,CACR,CAGD,SAASyB,EAAItF,GAGX,OADAoB,EAAKsC,YACCM,EAAiBD,EAAiB5D,OAC/BwE,EAAgBZ,EAAiBC,IAEnCF,CACR,CACF,CACF,CAOD,SAASzC,EAAUF,EAAWlC,GACxBkC,EAAUuB,aAAe/C,EAAqB0F,SAASlE,IACzDxB,EAAqBkB,KAAKM,GAExBA,EAAUsE,SACZC,EACEtF,EAAQQ,OACR3B,EACAmB,EAAQQ,OAAOT,OAASlB,EACxBkC,EAAUsE,QAAQrF,EAAQQ,OAAO4B,MAAMvD,GAAOmB,IAG9Ce,EAAUwE,YACZvF,EAAQQ,OAASO,EAAUwE,UAAUvF,EAAQQ,OAAQR,GAExD,CAuCD,SAASF,IACHhB,EAAMG,QAAQK,GAAeR,EAAMI,OAAS,IAC9CJ,EAAMI,OAASI,EAAYR,EAAMG,MACjCH,EAAMK,QAAUG,EAAYR,EAAMG,MAAQ,EAE7C,CACH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{factorySpace as n}from"../../../micromark-factory-space/index.js";import{markdownLineEnding as e}from"../../node_modules/micromark-util-character/index.js";const t={tokenize:function(t){const r=t.attempt(this.parser.constructs.contentInitial,(function(e){if(null===e)return void t.consume(e);return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),n(t,r,"linePrefix")}),(function(n){return t.enter("paragraph"),o(n)}));let i;return r;function o(n){const e=t.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=e),i=e,c(n)}function c(n){return null===n?(t.exit("chunkText"),t.exit("paragraph"),void t.consume(n)):e(n)?(t.consume(n),t.exit("chunkText"),o):(t.consume(n),c)}}};export{t as content};
|
|
2
|
+
//# sourceMappingURL=content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.js","sources":["../../../../../node_modules/micromark/lib/initialize/content.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').Initializer} Initializer\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {InitialConstruct} */\nexport const content = {\n tokenize: initializeContent\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Initializer}\n */\nfunction initializeContent(effects) {\n const contentStart = effects.attempt(\n this.parser.constructs.contentInitial,\n afterContentStartConstruct,\n paragraphInitial\n )\n /** @type {Token} */\n let previous\n return contentStart\n\n /** @type {State} */\n function afterContentStartConstruct(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, contentStart, 'linePrefix')\n }\n\n /** @type {State} */\n function paragraphInitial(code) {\n effects.enter('paragraph')\n return lineStart(code)\n }\n\n /** @type {State} */\n function lineStart(code) {\n const token = effects.enter('chunkText', {\n contentType: 'text',\n previous\n })\n if (previous) {\n previous.next = token\n }\n previous = token\n return data(code)\n }\n\n /** @type {State} */\n function data(code) {\n if (code === null) {\n effects.exit('chunkText')\n effects.exit('paragraph')\n effects.consume(code)\n return\n }\n if (markdownLineEnding(code)) {\n effects.consume(code)\n effects.exit('chunkText')\n return lineStart\n }\n\n // Data.\n effects.consume(code)\n return data\n }\n}\n"],"names":["content","tokenize","effects","contentStart","attempt","this","parser","constructs","contentInitial","code","consume","enter","exit","factorySpace","lineStart","previous","token","contentType","next","data","markdownLineEnding"],"mappings":"mKAWY,MAACA,EAAU,CACrBC,SAOF,SAA2BC,GACzB,MAAMC,EAAeD,EAAQE,QAC3BC,KAAKC,OAAOC,WAAWC,gBASzB,SAAoCC,GAClC,GAAa,OAATA,EAEF,YADAP,EAAQQ,QAAQD,GAMlB,OAHAP,EAAQS,MAAM,cACdT,EAAQQ,QAAQD,GAChBP,EAAQU,KAAK,cACNC,EAAaX,EAASC,EAAc,aAC5C,IAGD,SAA0BM,GAExB,OADAP,EAAQS,MAAM,aACPG,EAAUL,EAClB,IAnBD,IAAIM,EACJ,OAAOZ,EAqBP,SAASW,EAAUL,GACjB,MAAMO,EAAQd,EAAQS,MAAM,YAAa,CACvCM,YAAa,OACbF,aAMF,OAJIA,IACFA,EAASG,KAAOF,GAElBD,EAAWC,EACJG,EAAKV,EACb,CAGD,SAASU,EAAKV,GACZ,OAAa,OAATA,GACFP,EAAQU,KAAK,aACbV,EAAQU,KAAK,kBACbV,EAAQQ,QAAQD,IAGdW,EAAmBX,IACrBP,EAAQQ,QAAQD,GAChBP,EAAQU,KAAK,aACNE,IAITZ,EAAQQ,QAAQD,GACTU,EACR,CACH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{factorySpace as e}from"../../../micromark-factory-space/index.js";import{markdownLineEnding as t}from"../../node_modules/micromark-util-character/index.js";import{splice as n}from"../../../micromark-util-chunked/index.js";const r={tokenize:function(e){const r=this,i=[];let c,s,u,l=0;return a;function a(t){if(l<i.length){const n=i[l];return r.containerState=n[1],e.attempt(n[0].continuation,f,v)(t)}return v(t)}function f(e){if(l++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,c&&S();const t=r.events.length;let o,i=t;for(;i--;)if("exit"===r.events[i][0]&&"chunkFlow"===r.events[i][1].type){o=r.events[i][1].end;break}x(l);let s=t;for(;s<r.events.length;)r.events[s][1].end=Object.assign({},o),s++;return n(r.events,i+1,0,r.events.slice(t)),r.events.length=s,v(e)}return a(e)}function v(t){if(l===i.length){if(!c)return m(t);if(c.currentConstruct&&c.currentConstruct.concrete)return k(t);r.interrupt=Boolean(c.currentConstruct&&!c._gfmTableDynamicInterruptHack)}return r.containerState={},e.check(o,d,h)(t)}function d(e){return c&&S(),x(l),m(e)}function h(e){return r.parser.lazy[r.now().line]=l!==i.length,u=r.now().offset,k(e)}function m(t){return r.containerState={},e.attempt(o,p,k)(t)}function p(e){return l++,i.push([r.currentConstruct,r.containerState]),m(e)}function k(t){return null===t?(c&&S(),x(0),void e.consume(t)):(c=c||r.parser.flow(r.now()),e.enter("chunkFlow",{contentType:"flow",previous:s,_tokenizer:c}),g(t))}function g(n){return null===n?(w(e.exit("chunkFlow"),!0),x(0),void e.consume(n)):t(n)?(e.consume(n),w(e.exit("chunkFlow")),l=0,r.interrupt=void 0,a):(e.consume(n),g)}function w(e,t){const o=r.sliceStream(e);if(t&&o.push(null),e.previous=s,s&&(s.next=e),s=e,c.defineSkip(e.start),c.write(o),r.parser.lazy[e.start.line]){let e=c.events.length;for(;e--;)if(c.events[e][1].start.offset<u&&(!c.events[e][1].end||c.events[e][1].end.offset>u))return;const t=r.events.length;let o,i,s=t;for(;s--;)if("exit"===r.events[s][0]&&"chunkFlow"===r.events[s][1].type){if(o){i=r.events[s][1].end;break}o=!0}for(x(l),e=t;e<r.events.length;)r.events[e][1].end=Object.assign({},i),e++;n(r.events,s+1,0,r.events.slice(t)),r.events.length=e}}function x(t){let n=i.length;for(;n-- >t;){const t=i[n];r.containerState=t[1],t[0].exit.call(r,e)}i.length=t}function S(){c.write([null]),s=void 0,c=void 0,r.containerState._closeFlow=void 0}}},o={tokenize:function(t,n,r){return e(t,t.attempt(this.parser.constructs.document,n,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};export{r as document};
|
|
2
|
+
//# sourceMappingURL=document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.js","sources":["../../../../../node_modules/micromark/lib/initialize/document.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').ContainerState} ContainerState\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').Initializer} Initializer\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\n/**\n * @typedef {[Construct, ContainerState]} StackItem\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\nimport {splice} from 'micromark-util-chunked'\n/** @type {InitialConstruct} */\nexport const document = {\n tokenize: initializeDocument\n}\n\n/** @type {Construct} */\nconst containerConstruct = {\n tokenize: tokenizeContainer\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Initializer}\n */\nfunction initializeDocument(effects) {\n const self = this\n /** @type {Array<StackItem>} */\n const stack = []\n let continued = 0\n /** @type {TokenizeContext | undefined} */\n let childFlow\n /** @type {Token | undefined} */\n let childToken\n /** @type {number} */\n let lineStartOffset\n return start\n\n /** @type {State} */\n function start(code) {\n // First we iterate through the open blocks, starting with the root\n // document, and descending through last children down to the last open\n // block.\n // Each block imposes a condition that the line must satisfy if the block is\n // to remain open.\n // For example, a block quote requires a `>` character.\n // A paragraph requires a non-blank line.\n // In this phase we may match all or just some of the open blocks.\n // But we cannot close unmatched blocks yet, because we may have a lazy\n // continuation line.\n if (continued < stack.length) {\n const item = stack[continued]\n self.containerState = item[1]\n return effects.attempt(\n item[0].continuation,\n documentContinue,\n checkNewContainers\n )(code)\n }\n\n // Done.\n return checkNewContainers(code)\n }\n\n /** @type {State} */\n function documentContinue(code) {\n continued++\n\n // Note: this field is called `_closeFlow` but it also closes containers.\n // Perhaps a good idea to rename it but it’s already used in the wild by\n // extensions.\n if (self.containerState._closeFlow) {\n self.containerState._closeFlow = undefined\n if (childFlow) {\n closeFlow()\n }\n\n // Note: this algorithm for moving events around is similar to the\n // algorithm when dealing with lazy lines in `writeToChild`.\n const indexBeforeExits = self.events.length\n let indexBeforeFlow = indexBeforeExits\n /** @type {Point | undefined} */\n let point\n\n // Find the flow chunk.\n while (indexBeforeFlow--) {\n if (\n self.events[indexBeforeFlow][0] === 'exit' &&\n self.events[indexBeforeFlow][1].type === 'chunkFlow'\n ) {\n point = self.events[indexBeforeFlow][1].end\n break\n }\n }\n exitContainers(continued)\n\n // Fix positions.\n let index = indexBeforeExits\n while (index < self.events.length) {\n self.events[index][1].end = Object.assign({}, point)\n index++\n }\n\n // Inject the exits earlier (they’re still also at the end).\n splice(\n self.events,\n indexBeforeFlow + 1,\n 0,\n self.events.slice(indexBeforeExits)\n )\n\n // Discard the duplicate exits.\n self.events.length = index\n return checkNewContainers(code)\n }\n return start(code)\n }\n\n /** @type {State} */\n function checkNewContainers(code) {\n // Next, after consuming the continuation markers for existing blocks, we\n // look for new block starts (e.g. `>` for a block quote).\n // If we encounter a new block start, we close any blocks unmatched in\n // step 1 before creating the new block as a child of the last matched\n // block.\n if (continued === stack.length) {\n // No need to `check` whether there’s a container, of `exitContainers`\n // would be moot.\n // We can instead immediately `attempt` to parse one.\n if (!childFlow) {\n return documentContinued(code)\n }\n\n // If we have concrete content, such as block HTML or fenced code,\n // we can’t have containers “pierce” into them, so we can immediately\n // start.\n if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {\n return flowStart(code)\n }\n\n // If we do have flow, it could still be a blank line,\n // but we’d be interrupting it w/ a new container if there’s a current\n // construct.\n // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer\n // needed in micromark-extension-gfm-table@1.0.6).\n self.interrupt = Boolean(\n childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack\n )\n }\n\n // Check if there is a new container.\n self.containerState = {}\n return effects.check(\n containerConstruct,\n thereIsANewContainer,\n thereIsNoNewContainer\n )(code)\n }\n\n /** @type {State} */\n function thereIsANewContainer(code) {\n if (childFlow) closeFlow()\n exitContainers(continued)\n return documentContinued(code)\n }\n\n /** @type {State} */\n function thereIsNoNewContainer(code) {\n self.parser.lazy[self.now().line] = continued !== stack.length\n lineStartOffset = self.now().offset\n return flowStart(code)\n }\n\n /** @type {State} */\n function documentContinued(code) {\n // Try new containers.\n self.containerState = {}\n return effects.attempt(\n containerConstruct,\n containerContinue,\n flowStart\n )(code)\n }\n\n /** @type {State} */\n function containerContinue(code) {\n continued++\n stack.push([self.currentConstruct, self.containerState])\n // Try another.\n return documentContinued(code)\n }\n\n /** @type {State} */\n function flowStart(code) {\n if (code === null) {\n if (childFlow) closeFlow()\n exitContainers(0)\n effects.consume(code)\n return\n }\n childFlow = childFlow || self.parser.flow(self.now())\n effects.enter('chunkFlow', {\n contentType: 'flow',\n previous: childToken,\n _tokenizer: childFlow\n })\n return flowContinue(code)\n }\n\n /** @type {State} */\n function flowContinue(code) {\n if (code === null) {\n writeToChild(effects.exit('chunkFlow'), true)\n exitContainers(0)\n effects.consume(code)\n return\n }\n if (markdownLineEnding(code)) {\n effects.consume(code)\n writeToChild(effects.exit('chunkFlow'))\n // Get ready for the next line.\n continued = 0\n self.interrupt = undefined\n return start\n }\n effects.consume(code)\n return flowContinue\n }\n\n /**\n * @param {Token} token\n * @param {boolean | undefined} [eof]\n * @returns {void}\n */\n function writeToChild(token, eof) {\n const stream = self.sliceStream(token)\n if (eof) stream.push(null)\n token.previous = childToken\n if (childToken) childToken.next = token\n childToken = token\n childFlow.defineSkip(token.start)\n childFlow.write(stream)\n\n // Alright, so we just added a lazy line:\n //\n // ```markdown\n // > a\n // b.\n //\n // Or:\n //\n // > ~~~c\n // d\n //\n // Or:\n //\n // > | e |\n // f\n // ```\n //\n // The construct in the second example (fenced code) does not accept lazy\n // lines, so it marked itself as done at the end of its first line, and\n // then the content construct parses `d`.\n // Most constructs in markdown match on the first line: if the first line\n // forms a construct, a non-lazy line can’t “unmake” it.\n //\n // The construct in the third example is potentially a GFM table, and\n // those are *weird*.\n // It *could* be a table, from the first line, if the following line\n // matches a condition.\n // In this case, that second line is lazy, which “unmakes” the first line\n // and turns the whole into one content block.\n //\n // We’ve now parsed the non-lazy and the lazy line, and can figure out\n // whether the lazy line started a new flow block.\n // If it did, we exit the current containers between the two flow blocks.\n if (self.parser.lazy[token.start.line]) {\n let index = childFlow.events.length\n while (index--) {\n if (\n // The token starts before the line ending…\n childFlow.events[index][1].start.offset < lineStartOffset &&\n // …and either is not ended yet…\n (!childFlow.events[index][1].end ||\n // …or ends after it.\n childFlow.events[index][1].end.offset > lineStartOffset)\n ) {\n // Exit: there’s still something open, which means it’s a lazy line\n // part of something.\n return\n }\n }\n\n // Note: this algorithm for moving events around is similar to the\n // algorithm when closing flow in `documentContinue`.\n const indexBeforeExits = self.events.length\n let indexBeforeFlow = indexBeforeExits\n /** @type {boolean | undefined} */\n let seen\n /** @type {Point | undefined} */\n let point\n\n // Find the previous chunk (the one before the lazy line).\n while (indexBeforeFlow--) {\n if (\n self.events[indexBeforeFlow][0] === 'exit' &&\n self.events[indexBeforeFlow][1].type === 'chunkFlow'\n ) {\n if (seen) {\n point = self.events[indexBeforeFlow][1].end\n break\n }\n seen = true\n }\n }\n exitContainers(continued)\n\n // Fix positions.\n index = indexBeforeExits\n while (index < self.events.length) {\n self.events[index][1].end = Object.assign({}, point)\n index++\n }\n\n // Inject the exits earlier (they’re still also at the end).\n splice(\n self.events,\n indexBeforeFlow + 1,\n 0,\n self.events.slice(indexBeforeExits)\n )\n\n // Discard the duplicate exits.\n self.events.length = index\n }\n }\n\n /**\n * @param {number} size\n * @returns {void}\n */\n function exitContainers(size) {\n let index = stack.length\n\n // Exit open containers.\n while (index-- > size) {\n const entry = stack[index]\n self.containerState = entry[1]\n entry[0].exit.call(self, effects)\n }\n stack.length = size\n }\n function closeFlow() {\n childFlow.write([null])\n childToken = undefined\n childFlow = undefined\n self.containerState._closeFlow = undefined\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeContainer(effects, ok, nok) {\n // Always populated by defaults.\n\n return factorySpace(\n effects,\n effects.attempt(this.parser.constructs.document, ok, nok),\n 'linePrefix',\n this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4\n )\n}\n"],"names":["document","tokenize","effects","self","this","stack","childFlow","childToken","lineStartOffset","continued","start","code","length","item","containerState","attempt","continuation","documentContinue","checkNewContainers","_closeFlow","undefined","closeFlow","indexBeforeExits","events","point","indexBeforeFlow","type","end","exitContainers","index","Object","assign","splice","slice","documentContinued","currentConstruct","concrete","flowStart","interrupt","Boolean","_gfmTableDynamicInterruptHack","check","containerConstruct","thereIsANewContainer","thereIsNoNewContainer","parser","lazy","now","line","offset","containerContinue","push","consume","flow","enter","contentType","previous","_tokenizer","flowContinue","writeToChild","exit","markdownLineEnding","token","eof","stream","sliceStream","next","defineSkip","write","seen","size","entry","call","ok","nok","factorySpace","constructs","disable","null","includes"],"mappings":"qOAoBY,MAACA,EAAW,CACtBC,SAYF,SAA4BC,GAC1B,MAAMC,EAAOC,KAEPC,EAAQ,GACd,IAEIC,EAEAC,EAEAC,EANAC,EAAY,EAOhB,OAAOC,EAGP,SAASA,EAAMC,GAWb,GAAIF,EAAYJ,EAAMO,OAAQ,CAC5B,MAAMC,EAAOR,EAAMI,GAEnB,OADAN,EAAKW,eAAiBD,EAAK,GACpBX,EAAQa,QACbF,EAAK,GAAGG,aACRC,EACAC,EAHKhB,CAILS,EACH,CAGD,OAAOO,EAAmBP,EAC3B,CAGD,SAASM,EAAiBN,GAMxB,GALAF,IAKIN,EAAKW,eAAeK,WAAY,CAClChB,EAAKW,eAAeK,gBAAaC,EAC7Bd,GACFe,IAKF,MAAMC,EAAmBnB,EAAKoB,OAAOX,OACrC,IAEIY,EAFAC,EAAkBH,EAKtB,KAAOG,KACL,GACsC,SAApCtB,EAAKoB,OAAOE,GAAiB,IACY,cAAzCtB,EAAKoB,OAAOE,GAAiB,GAAGC,KAChC,CACAF,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AAQP,EACDO,EAAQ1B,EAAKoB,OAAOX,QACzBT,EAAKoB,OAAOM,GAAO,GAAGF,IAAMG,OAAOC,OAAO,CAAE,EAAEP,GAC9CK,IAIFG,EACE7B,EAAKoB,OACLE,EAAkB,EAClB,EACAtB,EAAKoB,OAAOU,MAAMX,IAIpBnB,EAAKoB,OAAOX,OAASiB,CACtB,CACF,CAMD,SAASD,EAAe0C,GACtB,IAAIzC,EAAQxB,EAAMO,OAGlB,KAAOiB,KAAUyC,GAAM,CACrB,MAAMC,EAAQlE,EAAMwB,GACpB1B,EAAKW,eAAiByD,EAAM,GAC5BA,EAAM,GAAGX,KAAKY,KAAKrE,EAAMD,EAC1B,CACDG,EAAMO,OAAS0D,CAChB,CACD,SAASjD,IACPf,EAAU8D,MAAM,CAAC,OACjB7D,OAAaa,EACbd,OAAYc,EACZjB,EAAKW,eAAeK,gBAAaC,CAClC,CACH,GArVMsB,EAAqB,CACzBzC,SA0VF,SAA2BC,EAASuE,EAAIC,GAGtC,OAAOC,EACLzE,EACAA,EAAQa,QAAQX,KAAKyC,OAAO+B,WAAW5E,SAAUyE,EAAIC,GACrD,aACAtE,KAAKyC,OAAO+B,WAAWC,QAAQC,KAAKC,SAAS,qBAAkB3D,EAAY,EAE/E"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{blankLine as r}from"../../../micromark-core-commonmark/lib/blank-line.js";import{factorySpace as n}from"../../../micromark-factory-space/index.js";import"../../../decode-named-character-reference/index.dom.js";import{content as t}from"../../../micromark-core-commonmark/lib/content.js";import"../../../micromark-core-commonmark/lib/label-start-image.js";import"../../../micromark-core-commonmark/lib/label-start-link.js";const e={tokenize:function(e){const o=this,i=e.attempt(r,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),o.currentConstruct=void 0,i}),e.attempt(this.parser.constructs.flowInitial,m,n(e,e.attempt(this.parser.constructs.flow,m,e.attempt(t,m)),"linePrefix")));return i;function m(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),o.currentConstruct=void 0,i;e.consume(r)}}};export{e as flow};
|
|
2
|
+
//# sourceMappingURL=flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow.js","sources":["../../../../../node_modules/micromark/lib/initialize/flow.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').Initializer} Initializer\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n */\n\nimport {blankLine, content} from 'micromark-core-commonmark'\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {InitialConstruct} */\nexport const flow = {\n tokenize: initializeFlow\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Initializer}\n */\nfunction initializeFlow(effects) {\n const self = this\n const initial = effects.attempt(\n // Try to parse a blank line.\n blankLine,\n atBlankEnding,\n // Try to parse initial flow (essentially, only code).\n effects.attempt(\n this.parser.constructs.flowInitial,\n afterConstruct,\n factorySpace(\n effects,\n effects.attempt(\n this.parser.constructs.flow,\n afterConstruct,\n effects.attempt(content, afterConstruct)\n ),\n 'linePrefix'\n )\n )\n )\n return initial\n\n /** @type {State} */\n function atBlankEnding(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n effects.enter('lineEndingBlank')\n effects.consume(code)\n effects.exit('lineEndingBlank')\n self.currentConstruct = undefined\n return initial\n }\n\n /** @type {State} */\n function afterConstruct(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n self.currentConstruct = undefined\n return initial\n }\n}\n"],"names":["flow","tokenize","effects","self","this","initial","attempt","blankLine","code","consume","enter","exit","currentConstruct","undefined","parser","constructs","flowInitial","afterConstruct","factorySpace","content"],"mappings":"4aAWY,MAACA,EAAO,CAClBC,SAOF,SAAwBC,GACtB,MAAMC,EAAOC,KACPC,EAAUH,EAAQI,QAEtBC,GAoBF,SAAuBC,GACrB,GAAa,OAATA,EAEF,YADAN,EAAQO,QAAQD,GAOlB,OAJAN,EAAQQ,MAAM,mBACdR,EAAQO,QAAQD,GAChBN,EAAQS,KAAK,mBACbR,EAAKS,sBAAmBC,EACjBR,CACR,GA3BCH,EAAQI,QACNF,KAAKU,OAAOC,WAAWC,YACvBC,EACAC,EACEhB,EACAA,EAAQI,QACNF,KAAKU,OAAOC,WAAWf,KACvBiB,EACAf,EAAQI,QAAQa,EAASF,IAE3B,gBAIN,OAAOZ,EAgBP,SAASY,EAAeT,GACtB,GAAa,OAATA,EAQJ,OAJAN,EAAQQ,MAAM,cACdR,EAAQO,QAAQD,GAChBN,EAAQS,KAAK,cACbR,EAAKS,sBAAmBC,EACjBR,EAPLH,EAAQO,QAAQD,EAQnB,CACH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e={resolveAll:i()},t=r("string"),n=r("text");function r(e){return{tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,o,s);return o;function o(e){return l(e)?i(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),f;t.consume(e)}function f(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),f)}function l(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:i("text"===e?o:void 0)}}function i(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function o(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],i=t.sliceStream(r);let o,s=i.length,f=-1,l=0;for(;s--;){const e=i[s];if("string"==typeof e){for(f=e.length;32===e.charCodeAt(f-1);)l++,f--;if(f)break;f=-1}else if(-2===e)o=!0,l++;else if(-1!==e){s++;break}}if(l){const i={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-l,offset:r.end.offset-l,_index:r.start._index+s,_bufferIndex:s?f:r.start._bufferIndex+f},end:Object.assign({},r.end)};r.end=Object.assign({},i.start),r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}export{e as resolver,t as string,n as text};
|
|
2
|
+
//# sourceMappingURL=text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.js","sources":["../../../../../node_modules/micromark/lib/initialize/text.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').Initializer} Initializer\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n */\n\nexport const resolver = {\n resolveAll: createResolver()\n}\nexport const string = initializeFactory('string')\nexport const text = initializeFactory('text')\n\n/**\n * @param {'string' | 'text'} field\n * @returns {InitialConstruct}\n */\nfunction initializeFactory(field) {\n return {\n tokenize: initializeText,\n resolveAll: createResolver(\n field === 'text' ? resolveAllLineSuffixes : undefined\n )\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Initializer}\n */\n function initializeText(effects) {\n const self = this\n const constructs = this.parser.constructs[field]\n const text = effects.attempt(constructs, start, notText)\n return start\n\n /** @type {State} */\n function start(code) {\n return atBreak(code) ? text(code) : notText(code)\n }\n\n /** @type {State} */\n function notText(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n effects.enter('data')\n effects.consume(code)\n return data\n }\n\n /** @type {State} */\n function data(code) {\n if (atBreak(code)) {\n effects.exit('data')\n return text(code)\n }\n\n // Data.\n effects.consume(code)\n return data\n }\n\n /**\n * @param {Code} code\n * @returns {boolean}\n */\n function atBreak(code) {\n if (code === null) {\n return true\n }\n const list = constructs[code]\n let index = -1\n if (list) {\n // Always populated by defaults.\n\n while (++index < list.length) {\n const item = list[index]\n if (!item.previous || item.previous.call(self, self.previous)) {\n return true\n }\n }\n }\n return false\n }\n }\n}\n\n/**\n * @param {Resolver | undefined} [extraResolver]\n * @returns {Resolver}\n */\nfunction createResolver(extraResolver) {\n return resolveAllText\n\n /** @type {Resolver} */\n function resolveAllText(events, context) {\n let index = -1\n /** @type {number | undefined} */\n let enter\n\n // A rather boring computation (to merge adjacent `data` events) which\n // improves mm performance by 29%.\n while (++index <= events.length) {\n if (enter === undefined) {\n if (events[index] && events[index][1].type === 'data') {\n enter = index\n index++\n }\n } else if (!events[index] || events[index][1].type !== 'data') {\n // Don’t do anything if there is one data token.\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end\n events.splice(enter + 2, index - enter - 2)\n index = enter + 2\n }\n enter = undefined\n }\n }\n return extraResolver ? extraResolver(events, context) : events\n }\n}\n\n/**\n * A rather ugly set of instructions which again looks at chunks in the input\n * stream.\n * The reason to do this here is that it is *much* faster to parse in reverse.\n * And that we can’t hook into `null` to split the line suffix before an EOF.\n * To do: figure out if we can make this into a clean utility, or even in core.\n * As it will be useful for GFMs literal autolink extension (and maybe even\n * tables?)\n *\n * @type {Resolver}\n */\nfunction resolveAllLineSuffixes(events, context) {\n let eventIndex = 0 // Skip first.\n\n while (++eventIndex <= events.length) {\n if (\n (eventIndex === events.length ||\n events[eventIndex][1].type === 'lineEnding') &&\n events[eventIndex - 1][1].type === 'data'\n ) {\n const data = events[eventIndex - 1][1]\n const chunks = context.sliceStream(data)\n let index = chunks.length\n let bufferIndex = -1\n let size = 0\n /** @type {boolean | undefined} */\n let tabs\n while (index--) {\n const chunk = chunks[index]\n if (typeof chunk === 'string') {\n bufferIndex = chunk.length\n while (chunk.charCodeAt(bufferIndex - 1) === 32) {\n size++\n bufferIndex--\n }\n if (bufferIndex) break\n bufferIndex = -1\n }\n // Number\n else if (chunk === -2) {\n tabs = true\n size++\n } else if (chunk === -1) {\n // Empty\n } else {\n // Replacement character, exit.\n index++\n break\n }\n }\n if (size) {\n const token = {\n type:\n eventIndex === events.length || tabs || size < 2\n ? 'lineSuffix'\n : 'hardBreakTrailing',\n start: {\n line: data.end.line,\n column: data.end.column - size,\n offset: data.end.offset - size,\n _index: data.start._index + index,\n _bufferIndex: index\n ? bufferIndex\n : data.start._bufferIndex + bufferIndex\n },\n end: Object.assign({}, data.end)\n }\n data.end = Object.assign({}, token.start)\n if (data.start.offset === data.end.offset) {\n Object.assign(data, token)\n } else {\n events.splice(\n eventIndex,\n 0,\n ['enter', token, context],\n ['exit', token, context]\n )\n eventIndex += 2\n }\n }\n eventIndex++\n }\n }\n return events\n}\n"],"names":["resolver","resolveAll","createResolver","string","initializeFactory","text","field","tokenize","effects","self","this","constructs","parser","attempt","start","notText","code","atBreak","enter","consume","data","exit","list","index","length","item","previous","call","resolveAllLineSuffixes","undefined","extraResolver","events","context","type","end","splice","eventIndex","chunks","sliceStream","tabs","bufferIndex","size","chunk","charCodeAt","token","line","column","offset","_index","_bufferIndex","Object","assign"],"mappings":"AASY,MAACA,EAAW,CACtBC,WAAYC,KAEDC,EAASC,EAAkB,UAC3BC,EAAOD,EAAkB,QAMtC,SAASA,EAAkBE,GACzB,MAAO,CACLC,SAUF,SAAwBC,GACtB,MAAMC,EAAOC,KACPC,EAAaD,KAAKE,OAAOD,WAAWL,GACpCD,EAAOG,EAAQK,QAAQF,EAAYG,EAAOC,GAChD,OAAOD,EAGP,SAASA,EAAME,GACb,OAAOC,EAAQD,GAAQX,EAAKW,GAAQD,EAAQC,EAC7C,CAGD,SAASD,EAAQC,GACf,GAAa,OAATA,EAMJ,OAFAR,EAAQU,MAAM,QACdV,EAAQW,QAAQH,GACTI,EALLZ,EAAQW,QAAQH,EAMnB,CAGD,SA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AMmB,EAAQL,EAAOd,GACrB,GAAqB,iBAAVmB,EAAoB,CAE7B,IADAF,EAAcE,EAAMlB,OACyB,KAAtCkB,EAAMC,WAAWH,EAAc,IACpCC,IACAD,IAEF,GAAIA,EAAa,MACjBA,GAAe,CAChB,MAEI,IAAe,IAAXE,EACPH,GAAO,EACPE,SACK,IAAe,IAAXC,EAEJ,CAELnB,IACA,KACD,CACF,CACD,GAAIkB,EAAM,CACR,MAAMG,EAAQ,CACZX,KACEG,IAAeL,EAAOP,QAAUe,GAAQE,EAAO,EAC3C,aACA,oBACN3B,MAAO,CACL+B,KAAMzB,EAAKc,IAAIW,KACfC,OAAQ1B,EAAKc,IAAIY,OAASL,EAC1BM,OAAQ3B,EAAKc,IAAIa,OAASN,EAC1BO,OAAQ5B,EAAKN,MAAMkC,OAASzB,EAC5B0B,aAAc1B,EACViB,EACApB,EAAKN,MAAMmC,aAAeT,GAEhCN,IAAKgB,OAAOC,OAAO,CAAA,EAAI/B,EAAKc,MAE9Bd,EAAKc,IAAMgB,OAAOC,OAAO,CAAE,EAAEP,EAAM9B,OAC/BM,EAAKN,MAAMiC,SAAW3B,EAAKc,IAAIa,OACjCG,OAAOC,OAAO/B,EAAMwB,IAEpBb,EAAOI,OACLC,EACA,EACA,CAAC,QAASQ,EAAOZ,GACjB,CAAC,OAAQY,EAAOZ,IAElBI,GAAc,EAEjB,CACDA,GACD,CAEH,OAAOL,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{combineExtensions as t}from"../../micromark-util-combine-extensions/index.js";import{content as i}from"./initialize/content.js";import{document as o}from"./initialize/document.js";import{flow as n}from"./initialize/flow.js";import{string as r,text as e}from"./initialize/text.js";import{createTokenizer as m}from"./create-tokenizer.js";import*as s from"./constructs.js";function c(c){const f={defined:[],lazy:{},constructs:t([s,...(c||{}).extensions||[]]),content:u(i),document:u(o),flow:u(n),string:u(r),text:u(e)};return f;function u(t){return function(i){return m(f,t,i)}}}export{c as parse};
|
|
2
|
+
//# sourceMappingURL=parse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.js","sources":["../../../../node_modules/micromark/lib/parse.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Create} Create\n * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').ParseContext} ParseContext\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\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 {text, string} from './initialize/text.js'\nimport {createTokenizer} from './create-tokenizer.js'\nimport * as defaultConstructs from './constructs.js'\n\n/**\n * @param {ParseOptions | null | undefined} [options]\n * @returns {ParseContext}\n */\nexport function parse(options) {\n const settings = options || {}\n const constructs =\n /** @type {FullNormalizedExtension} */\n combineExtensions([defaultConstructs, ...(settings.extensions || [])])\n\n /** @type {ParseContext} */\n const parser = {\n defined: [],\n lazy: {},\n constructs,\n content: create(content),\n document: create(document),\n flow: create(flow),\n string: create(string),\n text: create(text)\n }\n return parser\n\n /**\n * @param {InitialConstruct} initial\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"],"names":["parse","options","parser","defined","lazy","constructs","combineExtensions","defaultConstructs","extensions","content","create","document","flow","string","text","initial","from","createTokenizer"],"mappings":"yXAoBO,SAASA,EAAMC,GACpB,MAMMC,EAAS,CACbC,QAAS,GACTC,KAAM,CAAE,EACZC,WANIC,EAAkB,CAACC,MAHJN,GAAW,CAAE,GAGuBO,YAAc,KAOjEC,QAASC,EAAOD,GAChBE,SAAUD,EAAOC,GACjBC,KAAMF,EAAOE,GACbC,OAAQH,EAAOG,GACfC,KAAMJ,EAAOI,IAEf,OAAOZ,EAKP,SAASQ,EAAOK,GACd,OAEA,SAAiBC,GACf,OAAOC,EAAgBf,EAAQa,EAASC,EACzC,CACF,CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postprocess.js","sources":["../../../../node_modules/micromark/lib/postprocess.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Event} Event\n */\n\nimport {subtokenize} from 'micromark-util-subtokenize'\n\n/**\n * @param {Array<Event>} events\n * @returns {Array<Event>}\n */\nexport function postprocess(events) {\n while (!subtokenize(events)) {\n // Empty\n }\n return events\n}\n"],"names":["postprocess","events","subtokenize"],"mappings":"wEAUO,SAASA,EAAYC,GAC1B,MAAQC,EAAYD,KAGpB,OAAOA,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=/[\0\t\n\r]/g;function s(){let s,t=1,h="",n=!0;return function(u,i,r){const c=[];let o,a,l,p,d;u=h+u.toString(i),l=0,h="",n&&(65279===u.charCodeAt(0)&&l++,n=void 0);for(;l<u.length;){if(e.lastIndex=l,o=e.exec(u),p=o&&void 0!==o.index?o.index:u.length,d=u.charCodeAt(p),!o){h=u.slice(l);break}if(10===d&&l===p&&s)c.push(-3),s=void 0;else switch(s&&(c.push(-5),s=void 0),l<p&&(c.push(u.slice(l,p)),t+=p-l),d){case 0:c.push(65533),t++;break;case 9:for(a=4*Math.ceil(t/4),c.push(-2);t++<a;)c.push(-1);break;case 10:c.push(-4),t=1;break;default:s=!0,t=1}l=p+1}r&&(s&&c.push(-5),h&&c.push(h),c.push(null));return c}}export{s as preprocess};
|
|
2
|
+
//# sourceMappingURL=preprocess.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preprocess.js","sources":["../../../../node_modules/micromark/lib/preprocess.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Chunk} Chunk\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Value} Value\n */\n\n/**\n * @callback Preprocessor\n * @param {Value} value\n * @param {Encoding | null | undefined} [encoding]\n * @param {boolean | null | undefined} [end=false]\n * @returns {Array<Chunk>}\n */\n\nconst search = /[\\0\\t\\n\\r]/g\n\n/**\n * @returns {Preprocessor}\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 function preprocessor(value, encoding, end) {\n /** @type {Array<Chunk>} */\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\n // @ts-expect-error `Buffer` does allow an encoding.\n value = buffer + value.toString(encoding)\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 =\n 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 chunks.push(65533)\n column++\n break\n }\n case 9: {\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 chunks.push(-4)\n column = 1\n break\n }\n default: {\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"],"names":["search","preprocess","atCarriageReturn","column","buffer","start","value","encoding","end","chunks","match","next","startPosition","endPosition","code","toString","charCodeAt","undefined","length","lastIndex","exec","index","slice","push","Math","ceil"],"mappings":"AAeA,MAAMA,EAAS,cAKR,SAASC,IACd,IAKIC,EALAC,EAAS,EACTC,EAAS,GAETC,GAAQ,EAGZ,OAGA,SAAsBC,EAAOC,EAAUC,GAErC,MAAMC,EAAS,GAEf,IAAIC,EAEAC,EAEAC,EAEAC,EAEAC,EAGJR,EAAQF,EAASE,EAAMS,SAASR,GAChCK,EAAgB,EAChBR,EAAS,GACLC,IAE0B,QAAxBC,EAAMU,WAAW,IACnBJ,IAEFP,OAAQY,GAEV,KAAOL,EAAgBN,EAAMY,QAAQ,CAMnC,GALAlB,EAAOmB,UAAYP,EACnBF,EAAQV,EAAOoB,KAAKd,GACpBO,EACEH,QAAyBO,IAAhBP,EAAMW,MAAsBX,EAAMW,MAAQf,EAAMY,OAC3DJ,EAAOR,EAAMU,WAAWH,IACnBH,EAAO,CACVN,EAASE,EAAMgB,MAAMV,GACrB,KACD,CACD,GAAa,KAATE,GAAeF,IAAkBC,GAAeX,EAClDO,EAAOc,MAAM,GACbrB,OAAmBe,OAUnB,OARIf,IACFO,EAAOc,MAAM,GACbrB,OAAmBe,GAEjBL,EAAgBC,IAClBJ,EAAOc,KAAKjB,EAAMgB,MAAMV,EAAeC,IACvCV,GAAUU,EAAcD,GAElBE,GACN,KAAK,EACHL,EAAOc,KAAK,OACZpB,IACA,MAEF,KAAK,EAGH,IAFAQ,EAA+B,EAAxBa,KAAKC,KAAKtB,EAAS,GAC1BM,EAAOc,MAAM,GACNpB,IAAWQ,GAAMF,EAAOc,MAAM,GACrC,MAEF,KAAK,GACHd,EAAOc,MAAM,GACbpB,EAAS,EACT,MAEF,QACED,GAAmB,EACnBC,EAAS,EAIfS,EAAgBC,EAAc,CAC/B,CACGL,IACEN,GAAkBO,EAAOc,MAAM,GAC/BnB,GAAQK,EAAOc,KAAKnB,GACxBK,EAAOc,KAAK,OAEd,OAAOd,CACR,CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/micromark/node_modules/micromark-util-character/index.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Code} Code\n */\n\nimport {unicodePunctuationRegex} from './lib/unicode-punctuation-regex.js'\n\n/**\n * Check whether the character code represents an ASCII alpha (`a` through `z`,\n * case insensitive).\n *\n * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha.\n *\n * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`)\n * to U+005A (`Z`).\n *\n * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`)\n * to U+007A (`z`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiAlpha = regexCheck(/[A-Za-z]/)\n\n/**\n * Check whether the character code represents an ASCII alphanumeric (`a`\n * through `z`, case insensitive, or `0` through `9`).\n *\n * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha\n * (see `asciiAlpha`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiAlphanumeric = regexCheck(/[\\dA-Za-z]/)\n\n/**\n * Check whether the character code represents an ASCII atext.\n *\n * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in\n * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`),\n * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F\n * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E\n * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE\n * (`{`) to U+007E TILDE (`~`).\n *\n * See:\n * **\\[RFC5322]**:\n * [Internet Message Format](https://tools.ietf.org/html/rfc5322).\n * P. Resnick.\n * IETF.\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiAtext = regexCheck(/[#-'*+\\--9=?A-Z^-~]/)\n\n/**\n * Check whether a character code is an ASCII control character.\n *\n * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)\n * to U+001F (US), or U+007F (DEL).\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function asciiControl(code) {\n return (\n // Special whitespace codes (which have negative values), C0 and Control\n // character DEL\n code !== null && (code < 32 || code === 127)\n )\n}\n\n/**\n * Check whether the character code represents an ASCII digit (`0` through `9`).\n *\n * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to\n * U+0039 (`9`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiDigit = regexCheck(/\\d/)\n\n/**\n * Check whether the character code represents an ASCII hex digit (`a` through\n * `f`, case insensitive, or `0` through `9`).\n *\n * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex\n * digit, or an ASCII lower hex digit.\n *\n * An **ASCII upper hex digit** is a character in the inclusive range U+0041\n * (`A`) to U+0046 (`F`).\n *\n * An **ASCII lower hex digit** is a character in the inclusive range U+0061\n * (`a`) to U+0066 (`f`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiHexDigit = regexCheck(/[\\dA-Fa-f]/)\n\n/**\n * Check whether the character code represents ASCII punctuation.\n *\n * An **ASCII punctuation** is a character in the inclusive ranges U+0021\n * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT\n * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT\n * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/)\n\n/**\n * Check whether a character code is a markdown line ending.\n *\n * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN\n * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).\n *\n * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE\n * RETURN (CR) are replaced by these virtual characters depending on whether\n * they occurred together.\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownLineEnding(code) {\n return code !== null && code < -2\n}\n\n/**\n * Check whether a character code is a markdown line ending (see\n * `markdownLineEnding`) or markdown space (see `markdownSpace`).\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownLineEndingOrSpace(code) {\n return code !== null && (code < 0 || code === 32)\n}\n\n/**\n * Check whether a character code is a markdown space.\n *\n * A **markdown space** is the concrete character U+0020 SPACE (SP) and the\n * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).\n *\n * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is\n * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL\n * SPACE (VS) characters, depending on the column at which the tab occurred.\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownSpace(code) {\n return code === -2 || code === -1 || code === 32\n}\n\n// Size note: removing ASCII from the regex and using `asciiPunctuation` here\n// In fact adds to the bundle size.\n/**\n * Check whether the character code represents Unicode punctuation.\n *\n * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation,\n * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf`\n * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po`\n * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII\n * punctuation (see `asciiPunctuation`).\n *\n * See:\n * **\\[UNICODE]**:\n * [The Unicode Standard](https://www.unicode.org/versions/).\n * Unicode Consortium.\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const unicodePunctuation = regexCheck(unicodePunctuationRegex)\n\n/**\n * Check whether the character code represents Unicode whitespace.\n *\n * Note that this does handle micromark specific markdown whitespace characters.\n * See `markdownLineEndingOrSpace` to check that.\n *\n * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator,\n * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF),\n * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\\[UNICODE]**).\n *\n * See:\n * **\\[UNICODE]**:\n * [The Unicode Standard](https://www.unicode.org/versions/).\n * Unicode Consortium.\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const unicodeWhitespace = regexCheck(/\\s/)\n\n/**\n * Create a code check from a regex.\n *\n * @param {RegExp} regex\n * @returns {(code: Code) => boolean}\n */\nfunction regexCheck(regex) {\n return check\n\n /**\n * Check whether a code matches the bound regex.\n *\n * @param {Code} code\n * Character code.\n * @returns {boolean}\n * Whether the character code matches the bound regex.\n */\n function check(code) {\n return code !== null && regex.test(String.fromCharCode(code))\n }\n}\n"],"names":["markdownLineEnding","code"],"mappings":"AAgJO,SAASA,EAAmBC,GACjC,OAAgB,OAATA,GAAiBA,GAAQ,CAClC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{push as e,splice as t}from"../../micromark-util-chunked/index.js";import{classifyCharacter as n}from"../../micromark-util-classify-character/index.js";import{resolveAll as s}from"../../micromark-util-resolve-all/index.js";const r={name:"attention",tokenize:function(e,t){const s=this.parser.constructs.attentionMarkers.null,r=this.previous,o=n(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(c){if(c===i)return e.consume(c),a;const f=e.exit("attentionSequence"),u=n(c),l=!u||2===u&&o||s.includes(c),d=!o||2===o&&u||s.includes(r);return f._open=Boolean(42===i?l:l&&(o||!d)),f._close=Boolean(42===i?d:d&&(u||!l)),t(c)}},resolveAll:function(n,r){let i,a,c,f,u,l,d,p,m=-1;for(;++m<n.length;)if("enter"===n[m][0]&&"attentionSequence"===n[m][1].type&&n[m][1]._close)for(i=m;i--;)if("exit"===n[i][0]&&"attentionSequence"===n[i][1].type&&n[i][1]._open&&r.sliceSerialize(n[i][1]).charCodeAt(0)===r.sliceSerialize(n[m][1]).charCodeAt(0)){if((n[i][1]._close||n[m][1]._open)&&(n[m][1].end.offset-n[m][1].start.offset)%3&&!((n[i][1].end.offset-n[i][1].start.offset+n[m][1].end.offset-n[m][1].start.offset)%3))continue;l=n[i][1].end.offset-n[i][1].start.offset>1&&n[m][1].end.offset-n[m][1].start.offset>1?2:1;const g=Object.assign({},n[i][1].end),x=Object.assign({},n[m][1].start);o(g,-l),o(x,l),f={type:l>1?"strongSequence":"emphasisSequence",start:g,end:Object.assign({},n[i][1].end)},u={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},n[m][1].start),end:x},c={type:l>1?"strongText":"emphasisText",start:Object.assign({},n[i][1].end),end:Object.assign({},n[m][1].start)},a={type:l>1?"strong":"emphasis",start:Object.assign({},f.start),end:Object.assign({},u.end)},n[i][1].end=Object.assign({},f.start),n[m][1].start=Object.assign({},u.end),d=[],n[i][1].end.offset-n[i][1].start.offset&&(d=e(d,[["enter",n[i][1],r],["exit",n[i][1],r]])),d=e(d,[["enter",a,r],["enter",f,r],["exit",f,r],["enter",c,r]]),d=e(d,s(r.parser.constructs.insideSpan.null,n.slice(i+1,m),r)),d=e(d,[["exit",c,r],["enter",u,r],["exit",u,r],["exit",a,r]]),n[m][1].end.offset-n[m][1].start.offset?(p=2,d=e(d,[["enter",n[m][1],r],["exit",n[m][1],r]])):p=0,t(n,i-1,m-i+3,d),m=i+d.length-p-2;break}m=-1;for(;++m<n.length;)"attentionSequence"===n[m][1].type&&(n[m][1].type="data");return n}};function o(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}export{r as attention};
|
|
2
|
+
//# sourceMappingURL=attention.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attention.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/attention.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\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 tokenize: tokenizeAttention,\n resolveAll: resolveAllAttention\n}\n\n/**\n * Take all events and resolve attention to emphasis or strong.\n *\n * @type {Resolver}\n */\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<Event>} */\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 (\n events[index][0] === 'enter' &&\n events[index][1].type === 'attentionSequence' &&\n events[index][1]._close\n ) {\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 (\n events[open][0] === 'exit' &&\n events[open][1].type === 'attentionSequence' &&\n events[open][1]._open &&\n // If the markers are the same:\n context.sliceSerialize(events[open][1]).charCodeAt(0) ===\n context.sliceSerialize(events[index][1]).charCodeAt(0)\n ) {\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 (\n (events[open][1]._close || events[index][1]._open) &&\n (events[index][1].end.offset - events[index][1].start.offset) % 3 &&\n !(\n (events[open][1].end.offset -\n events[open][1].start.offset +\n events[index][1].end.offset -\n events[index][1].start.offset) %\n 3\n )\n ) {\n continue\n }\n\n // Number of markers to use from the sequence.\n use =\n events[open][1].end.offset - events[open][1].start.offset > 1 &&\n events[index][1].end.offset - events[index][1].start.offset > 1\n ? 2\n : 1\n const start = Object.assign({}, events[open][1].end)\n const end = Object.assign({}, events[index][1].start)\n movePoint(start, -use)\n movePoint(end, use)\n openingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start,\n end: Object.assign({}, events[open][1].end)\n }\n closingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start: Object.assign({}, events[index][1].start),\n end\n }\n text = {\n type: use > 1 ? 'strongText' : 'emphasisText',\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n }\n group = {\n type: use > 1 ? 'strong' : 'emphasis',\n start: Object.assign({}, openingSequence.start),\n end: Object.assign({}, closingSequence.end)\n }\n events[open][1].end = Object.assign({}, openingSequence.start)\n events[index][1].start = Object.assign({}, closingSequence.end)\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, [\n ['enter', events[open][1], context],\n ['exit', events[open][1], context]\n ])\n }\n\n // Opening.\n nextEvents = push(nextEvents, [\n ['enter', group, context],\n ['enter', openingSequence, context],\n ['exit', openingSequence, context],\n ['enter', text, context]\n ])\n\n // Always populated by defaults.\n\n // Between.\n nextEvents = push(\n nextEvents,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + 1, index),\n context\n )\n )\n\n // Closing.\n nextEvents = push(nextEvents, [\n ['exit', text, context],\n ['enter', closingSequence, context],\n ['exit', closingSequence, context],\n ['exit', group, context]\n ])\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, [\n ['enter', events[index][1], context],\n ['exit', events[index][1], context]\n ])\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 * @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<Code>} */\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 =\n !after || (after === 2 && before) || attentionMarkers.includes(code)\n const close =\n !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 * @param {number} offset\n * @returns {void}\n */\nfunction movePoint(point, offset) {\n point.column += offset\n point.offset += offset\n point._bufferIndex += offset\n}\n"],"names":["attention","name","tokenize","effects","ok","attentionMarkers","this","parser","constructs","null","previous","before","classifyCharacter","marker","code","enter","inside","consume","token","exit","after","open","includes","close","_open","Boolean","_close","resolveAll","events","context","group","text","openingSequence","closingSequence","use","nextEvents","offset","index","length","type","sliceSerialize","charCodeAt","end","start","Object","assign","movePoint","push","insideSpan","slice","splice","point","column","_bufferIndex"],"mappings":"qOA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ciiAtext as o}from"../node_modules/micromark-util-character/index.js";const r={name:"autolink",tokenize:function(r,u,i){let c=0;return function(n){return r.enter("autolink"),r.enter("autolinkMarker"),r.consume(n),r.exit("autolinkMarker"),r.enter("autolinkProtocol"),a};function a(t){return n(t)?(r.consume(t),l):s(t)}function l(n){return 43===n||45===n||46===n||t(n)?(c=1,k(n)):s(n)}function k(n){return 58===n?(r.consume(n),c=0,m):(43===n||45===n||46===n||t(n))&&c++<32?(r.consume(n),k):(c=0,s(n))}function m(n){return 62===n?(r.exit("autolinkProtocol"),r.enter("autolinkMarker"),r.consume(n),r.exit("autolinkMarker"),r.exit("autolink"),u):null===n||32===n||60===n||e(n)?i(n):(r.consume(n),m)}function s(n){return 64===n?(r.consume(n),f):o(n)?(r.consume(n),s):i(n)}function f(n){return t(n)?x(n):i(n)}function x(n){return 46===n?(r.consume(n),c=0,f):62===n?(r.exit("autolinkProtocol").type="autolinkEmail",r.enter("autolinkMarker"),r.consume(n),r.exit("autolinkMarker"),r.exit("autolink"),u):M(n)}function M(n){if((45===n||t(n))&&c++<63){const t=45===n?M:x;return r.consume(n),t}return i(n)}}};export{r as autolink};
|
|
2
|
+
//# sourceMappingURL=autolink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autolink.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/autolink.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n asciiAtext,\n asciiControl\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const autolink = {\n name: 'autolink',\n tokenize: tokenizeAutolink\n}\n\n/**\n * @this {TokenizeContext}\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 * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\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 * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n return schemeOrEmailAtext\n }\n return emailAtext(code)\n }\n\n /**\n * At second byte of protocol or atext.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\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 * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\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 (\n (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) &&\n size++ < 32\n ) {\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 * > | a<https://example.com>b\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 * > | a<user.name@example.com>b\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 * > | a<user.name@example.com>b\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 * > | a<user.name@example.com>b\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 * > | a<user.name@ex-ample.com>b\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"],"names":["autolink","name","tokenize","effects","ok","nok","size","code","enter","consume","exit","open","asciiAlpha","schemeOrEmailAtext","emailAtext","asciiAlphanumeric","schemeInsideOrEmailAtext","urlInside","asciiControl","emailAtSignOrDot","asciiAtext","emailLabel","type","emailValue","next"],"mappings":"wIAcY,MAACA,EAAW,CACtBC,KAAM,WACNC,SAOF,SAA0BC,EAASC,EAAIC,GACrC,IAAI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AAQO,KAAK,YACNN,GAEFmB,EAAWhB,EACnB,CAcD,SAASgB,EAAWhB,GAElB,IAAc,KAATA,GAAeQ,EAAkBR,KAAUD,IAAS,GAAI,CAC3D,MAAMkB,EAAgB,KAATjB,EAAcgB,EAAaF,EAExC,OADAlB,EAAQM,QAAQF,GACTiB,CACR,CACD,OAAOnB,EAAIE,EACZ,CACH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{factorySpace as r}from"../../micromark-factory-space/index.js";import{markdownSpace as n,markdownLineEnding as
|
|
1
|
+
import{factorySpace as r}from"../../micromark-factory-space/index.js";import{markdownSpace as n,markdownLineEnding as o}from"../node_modules/micromark-util-character/index.js";const t={tokenize:function(t,e,i){return function(o){return n(o)?r(t,c,"linePrefix")(o):c(o)};function c(r){return null===r||o(r)?e(r):i(r)}},partial:!0};export{t as blankLine};
|
|
2
2
|
//# sourceMappingURL=blank-line.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blank-line.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/blank-line.js"],"sourcesContent":["/**\n * @import
|
|
1
|
+
{"version":3,"file":"blank-line.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/blank-line.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/** @type {Construct} */\nexport const blankLine = {\n tokenize: tokenizeBlankLine,\n partial: true\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLine(effects, ok, nok) {\n return start\n\n /**\n * Start of blank line.\n *\n * > 👉 **Note**: `␠` represents a space character.\n *\n * ```markdown\n * > | ␠␠␊\n * ^\n * > | ␊\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n return markdownSpace(code)\n ? factorySpace(effects, after, 'linePrefix')(code)\n : after(code)\n }\n\n /**\n * At eof/eol, after optional whitespace.\n *\n * > 👉 **Note**: `␠` represents a space character.\n *\n * ```markdown\n * > | ␠␠␊\n * ^\n * > | ␊\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code)\n }\n}\n"],"names":["blankLine","tokenize","effects","ok","nok","code","markdownSpace","factorySpace","after","markdownLineEnding","partial"],"mappings":"gLAUY,MAACA,EAAY,CACvBC,SAQF,SAA2BC,EAASC,EAAIC,GACtC,OAgBA,SAAeC,GACb,OAAOC,EAAcD,GACjBE,EAAaL,EAASM,EAAO,aAA7BD,CAA2CF,GAC3CG,EAAMH,EACX,EAgBD,SAASG,EAAMH,GACb,OAAgB,OAATA,GAAiBI,EAAmBJ,GAAQF,EAAGE,GAAQD,EAAIC,EACnE,CACH,EA/CEK,SAAS"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{factorySpace as e}from"../../micromark-factory-space/index.js";import{markdownSpace as t}from"../node_modules/micromark-util-character/index.js";const o={name:"blockQuote",tokenize:function(e,o,n){const r=this;return function(t){if(62===t){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return t(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),o):(e.exit("blockQuotePrefix"),o(n))}},continuation:{tokenize:function(n,r,i){const c=this;return function(o){if(t(o))return e(n,u,"linePrefix",c.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o);return u(o)};function u(e){return n.attempt(o,r,i)(e)}}},exit:function(e){e.exit("blockQuote")}};export{o as blockQuote};
|
|
2
|
+
//# sourceMappingURL=block-quote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-quote.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/block-quote.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Exiter} Exiter\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownSpace} from 'micromark-util-character'\n/** @type {Construct} */\nexport const blockQuote = {\n name: 'blockQuote',\n tokenize: tokenizeBlockQuoteStart,\n continuation: {\n tokenize: tokenizeBlockQuoteContinuation\n },\n exit\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeBlockQuoteStart(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of block quote.\n *\n * ```markdown\n * > | > a\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (code === 62) {\n const state = self.containerState\n if (!state.open) {\n effects.enter('blockQuote', {\n _container: true\n })\n state.open = true\n }\n effects.enter('blockQuotePrefix')\n effects.enter('blockQuoteMarker')\n effects.consume(code)\n effects.exit('blockQuoteMarker')\n return after\n }\n return nok(code)\n }\n\n /**\n * After `>`, before optional whitespace.\n *\n * ```markdown\n * > | > a\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (markdownSpace(code)) {\n effects.enter('blockQuotePrefixWhitespace')\n effects.consume(code)\n effects.exit('blockQuotePrefixWhitespace')\n effects.exit('blockQuotePrefix')\n return ok\n }\n effects.exit('blockQuotePrefix')\n return ok(code)\n }\n}\n\n/**\n * Start of block quote continuation.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeBlockQuoteContinuation(effects, ok, nok) {\n const self = this\n return contStart\n\n /**\n * Start of block quote continuation.\n *\n * Also used to parse the first block quote opening.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @type {State}\n */\n function contStart(code) {\n if (markdownSpace(code)) {\n // Always populated by defaults.\n\n return factorySpace(\n effects,\n contBefore,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n }\n return contBefore(code)\n }\n\n /**\n * At `>`, after optional whitespace.\n *\n * Also used to parse the first block quote opening.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @type {State}\n */\n function contBefore(code) {\n return effects.attempt(blockQuote, ok, nok)(code)\n }\n}\n\n/** @type {Exiter} */\nfunction exit(effects) {\n effects.exit('blockQuote')\n}\n"],"names":["blockQuote","name","tokenize","effects","ok","nok","self","this","code","state","containerState","open","enter","_container","consume","exit","after","markdownSpace","continuation","factorySpace","contBefore","parser","constructs","disable","null","includes","undefined","attempt"],"mappings":"wJAWY,MAACA,EAAa,CACxBC,KAAM,aACNC,SAWF,SAAiCC,EAASC,EAAIC,GAC5C,MAAMC,EAAOC,KACb,OAYA,SAAeC,GACb,GAAa,KAATA,EAAa,CACf,MAAMC,EAAQH,EAAKI,eAWnB,OAVKD,EAAME,OACTR,EAAQS,MAAM,aAAc,CAC1BC,YAAY,IAEdJ,EAAME,MAAO,GAEfR,EAAQS,MAAM,oBACdT,EAAQS,MAAM,oBACdT,EAAQW,QAAQN,GAChBL,EAAQY,KAAK,oBACNC,CACR,CACD,OAAOX,EAAIG,EACZ,EAYD,SAASQ,EAAMR,GACb,OAAIS,EAAcT,IAChBL,EAAQS,MAAM,8BACdT,EAAQW,QAAQN,GAChBL,EAAQY,KAAK,8BACbZ,EAAQY,KAAK,oBACNX,IAETD,EAAQY,KAAK,oBACNX,EAAGI,GACX,CACH,EA/DEU,aAAc,CACZhB,SA4EJ,SAAwCC,EAASC,EAAIC,GACnD,MAAMC,EAAOC,KACb,OAeA,SAAmBC,GACjB,GAAIS,EAAcT,GAGhB,OAAOW,EACLhB,EACAiB,EACA,aACAd,EAAKe,OAAOC,WAAWC,QAAQC,KAAKC,SAAS,qBACzCC,EACA,EANCP,CAOLX,GAEJ,OAAOY,EAAWZ,EACnB,EAeD,SAASY,EAAWZ,GAClB,OAAOL,EAAQwB,QAAQ3B,EAAYI,EAAIC,EAAhCF,CAAqCK,EAC7C,CACH,GA3HEO,KA8HF,SAAcZ,GACZA,EAAQY,KAAK,aACf"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{asciiPunctuation as e}from"../node_modules/micromark-util-character/index.js";const r={name:"characterEscape",tokenize:function(r,c,a){return function(e){return r.enter("characterEscape"),r.enter("escapeMarker"),r.consume(e),r.exit("escapeMarker"),t};function t(t){return e(t)?(r.enter("characterEscapeValue"),r.consume(t),r.exit("characterEscapeValue"),r.exit("characterEscape"),c):a(t)}}};export{r as characterEscape};
|
|
2
|
+
//# sourceMappingURL=character-escape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-escape.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/character-escape.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\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 * @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"],"names":["characterEscape","name","tokenize","effects","ok","nok","code","enter","consume","exit","inside","asciiPunctuation"],"mappings":"qFASY,MAACA,EAAkB,CAC7BC,KAAM,kBACNC,SAOF,SAAiCC,EAASC,EAAIC,GAC5C,OAYA,SAAeC,GAKb,OAJAH,EAAQI,MAAM,mBACdJ,EAAQI,MAAM,gBACdJ,EAAQK,QAAQF,GAChBH,EAAQM,KAAK,gBACNC,CACR,EAYD,SAASA,EAAOJ,GAEd,OAAIK,EAAiBL,IACnBH,EAAQI,MAAM,wBACdJ,EAAQK,QAAQF,GAChBH,EAAQM,KAAK,wBACbN,EAAQM,KAAK,mBACNL,GAEFC,EAAIC,EACZ,CACH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{decodeNamedCharacterReference as e}from"../../decode-named-character-reference/index.dom.js";import{asciiAlphanumeric as r,asciiHexDigit as c,asciiDigit as a}from"../node_modules/micromark-util-character/index.js";const n={name:"characterReference",tokenize:function(n,t,i){const f=this;let o,u,m=0;return function(e){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(e),n.exit("characterReferenceMarker"),h};function h(e){return 35===e?(n.enter("characterReferenceMarkerNumeric"),n.consume(e),n.exit("characterReferenceMarkerNumeric"),R):(n.enter("characterReferenceValue"),o=31,u=r,s(e))}function R(e){return 88===e||120===e?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(e),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),o=6,u=c,s):(n.enter("characterReferenceValue"),o=7,u=a,s(e))}function s(c){if(59===c&&m){const a=n.exit("characterReferenceValue");return u!==r||e(f.sliceSerialize(a))?(n.enter("characterReferenceMarker"),n.consume(c),n.exit("characterReferenceMarker"),n.exit("characterReference"),t):i(c)}return u(c)&&m++<o?(n.consume(c),s):i(c)}}};export{n as characterReference};
|
|
2
|
+
//# sourceMappingURL=character-reference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-reference.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/character-reference.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {\n asciiAlphanumeric,\n asciiDigit,\n asciiHexDigit\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const characterReference = {\n name: 'characterReference',\n tokenize: tokenizeCharacterReference\n}\n\n/**\n * @this {TokenizeContext}\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 (\n test === asciiAlphanumeric &&\n !decodeNamedCharacterReference(self.sliceSerialize(token))\n ) {\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"],"names":["characterReference","name","tokenize","effects","ok","nok","self","this","max","test","size","code","enter","consume","exit","open","numeric","asciiAlphanumeric","value","asciiHexDigit","asciiDigit","token","decodeNamedCharacterReference","sliceSerialize"],"mappings":"6NAeY,MAACA,EAAqB,CAChCC,KAAM,qBACNC,SAOF,SAAoCC,EAASC,EAAIC,GAC/C,MAAMC,EAAOC,KACb,IAEIC,EAEAC,EAJAC,EAAO,EAKX,OAgBA,SAAeC,GAKb,OAJAR,EAAQS,MAAM,sBACdT,EAAQS,MAAM,4BACdT,EAAQU,QAAQF,GAChBR,EAAQW,KAAK,4BACNC,CACR,EAiBD,SAASA,EAAKJ,GACZ,OAAa,KAATA,GACFR,EAAQS,MAAM,mCACdT,EAAQU,QAAQF,GAChBR,EAAQW,KAAK,mCACNE,IAETb,EAAQS,MAAM,2BACdJ,EAAM,GACNC,EAAOQ,EACAC,EAAMP,GACd,CAcD,SAASK,EAAQL,GACf,OAAa,KAATA,GAAwB,MAATA,GACjBR,EAAQS,MAAM,uCACdT,EAAQU,QAAQF,GAChBR,EAAQW,KAAK,uCACbX,EAAQS,MAAM,2BACdJ,EAAM,EACNC,EAAOU,EACAD,IAETf,EAAQS,MAAM,2BACdJ,EAAM,EACNC,EAAOW,EACAF,EAAMP,GACd,CAmBD,SAASO,EAAMP,GACb,GAAa,KAATA,GAAeD,EAAM,CACvB,MAAMW,EAAQlB,EAAQW,KAAK,2BAC3B,OACEL,IAASQ,GACRK,EAA8BhB,EAAKiB,eAAeF,KAOrDlB,EAAQS,MAAM,4BACdT,EAAQU,QAAQF,GAChBR,EAAQW,KAAK,4BACbX,EAAQW,KAAK,sBACNV,GATEC,EAAIM,EAUd,CACD,OAAIF,EAAKE,IAASD,IAASF,GACzBL,EAAQU,QAAQF,GACTO,GAEFb,EAAIM,EACZ,CACH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{factorySpace as e}from"../../micromark-factory-space/index.js";import{markdownSpace as n,markdownLineEnding as t}from"../node_modules/micromark-util-character/index.js";const c={tokenize:function(e,n,t){const c=this;return function(n){if(null===n)return t(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r};function r(e){return c.parser.lazy[c.now().line]?t(e):n(e)}},partial:!0},r={name:"codeFenced",tokenize:function(r,i,u){const o=this,d={tokenize:function(c,r,i){let u=0;return d;function d(e){return c.enter("lineEnding"),c.consume(e),c.exit("lineEnding"),f}function f(t){return c.enter("codeFencedFence"),n(t)?e(c,F,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):F(t)}function F(e){return e===l?(c.enter("codeFencedFenceSequence"),a(e)):i(e)}function a(t){return t===l?(u++,c.consume(t),a):u>=s?(c.exit("codeFencedFenceSequence"),n(t)?e(c,x,"whitespace")(t):x(t)):i(t)}function x(e){return null===e||t(e)?(c.exit("codeFencedFence"),r(e)):i(e)}},partial:!0};let l,f=0,s=0;return function(e){return function(e){const n=o.events[o.events.length-1];return f=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,l=e,r.enter("codeFenced"),r.enter("codeFencedFence"),r.enter("codeFencedFenceSequence"),F(e)}(e)};function F(t){return t===l?(s++,r.consume(t),F):s<3?u(t):(r.exit("codeFencedFenceSequence"),n(t)?e(r,a,"whitespace")(t):a(t))}function a(e){return null===e||t(e)?(r.exit("codeFencedFence"),o.interrupt?i(e):r.check(c,g,E)(e)):(r.enter("codeFencedFenceInfo"),r.enter("chunkString",{contentType:"string"}),x(e))}function x(c){return null===c||t(c)?(r.exit("chunkString"),r.exit("codeFencedFenceInfo"),a(c)):n(c)?(r.exit("chunkString"),r.exit("codeFencedFenceInfo"),e(r,m,"whitespace")(c)):96===c&&c===l?u(c):(r.consume(c),x)}function m(e){return null===e||t(e)?a(e):(r.enter("codeFencedFenceMeta"),r.enter("chunkString",{contentType:"string"}),p(e))}function p(e){return null===e||t(e)?(r.exit("chunkString"),r.exit("codeFencedFenceMeta"),a(e)):96===e&&e===l?u(e):(r.consume(e),p)}function g(e){return r.attempt(d,E,h)(e)}function h(e){return r.enter("lineEnding"),r.consume(e),r.exit("lineEnding"),k}function k(t){return f>0&&n(t)?e(r,S,"linePrefix",f+1)(t):S(t)}function S(e){return null===e||t(e)?r.check(c,g,E)(e):(r.enter("codeFlowValue"),w(e))}function w(e){return null===e||t(e)?(r.exit("codeFlowValue"),S(e)):(r.consume(e),w)}function E(e){return r.exit("codeFenced"),i(e)}},concrete:!0};export{r as codeFenced};
|
|
2
|
+
//# sourceMappingURL=code-fenced.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-fenced.js","sources":["../../../../node_modules/micromark-core-commonmark/lib/code-fenced.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/** @type {Construct} */\nconst nonLazyContinuation = {\n tokenize: tokenizeNonLazyContinuation,\n partial: true\n}\n\n/** @type {Construct} */\nexport const codeFenced = {\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced,\n concrete: true\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeFenced(effects, ok, nok) {\n const self = this\n /** @type {Construct} */\n const closeStart = {\n tokenize: tokenizeCloseStart,\n partial: true\n }\n let initialPrefix = 0\n let sizeOpen = 0\n /** @type {NonNullable<Code>} */\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 =\n tail && tail[1].type === 'linePrefix'\n ? tail[2].sliceSerialize(tail[1], true).length\n : 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)\n ? factorySpace(effects, infoBefore, 'whitespace')(code)\n : 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\n ? ok(code)\n : 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)\n ? factorySpace(\n effects,\n beforeContentChunk,\n 'linePrefix',\n initialPrefix + 1\n )(code)\n : 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 * @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)\n ? factorySpace(\n effects,\n beforeSequenceClose,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n : 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)\n ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code)\n : 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 * @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"],"names":["nonLazyContinuation","tokenize","effects","ok","nok","self","this","code","enter","consume","exit","lineStart","parser","lazy","now","line","partial","codeFenced","name","closeStart","size","startBefore","start","markdownSpace","factorySpace","beforeSequenceClose","constructs","disable","null","includes","undefined","marker","sequenceClose","sizeOpen","sequenceCloseAfter","markdownLineEnding","initialPrefix","tail","events","length","type","sliceSerialize","sequenceOpen","beforeSequenceOpen","infoBefore","interrupt","check","atNonLazyBreak","after","contentType","info","metaBefore","meta","attempt","contentBefore","contentStart","beforeContentChunk","contentChunk","concrete"],"mappings":"gLAWA,MAAMA,EAAsB,CAC1BC,SAwbF,SAAqCC,EAASC,EAAIC,GAChD,MAAMC,EAAOC,KACb,OAOA,SAAeC,GACb,GAAa,OAATA,EACF,OAAOH,EAAIG,GAKb,OAHAL,EAAQM,MAAM,cACdN,EAAQO,QAAQF,GAChBL,EAAQQ,KAAK,cACNC,CACR,EAOD,SAASA,EAAUJ,GACjB,OAAOF,EAAKO,OAAOC,KAAKR,EAAKS,MAAMC,MAAQX,EAAIG,GAAQJ,EAAGI,EAC3D,CACH,EAldES,SAAS,GAIEC,EAAa,CACxBC,KAAM,aACNjB,SAQF,SAA4BC,EAASC,EAAIC,GACvC,MAAMC,EAAOC,KAEPa,EAAa,CACjBlB,SA+SF,SAA4BC,EAASC,EAAIC,GACvC,IAAIgB,EAAO,EACX,OAAOC,EAOP,SAASA,EAAYd,GAInB,OAHAL,EAAQM,MAAM,cACdN,EAAQO,QAAQF,GAChBL,EAAQQ,KAAK,cACNY,CACR,CAcD,SAASA,EAAMf,GAKb,OADAL,EAAQM,MAAM,mBACPe,EAAchB,GACjBiB,EACEtB,EACAuB,EACA,aACApB,EAAKO,OAAOc,WAAWC,QAAQC,KAAKC,SAAS,qBACzCC,EACA,EANNN,CAOEjB,GACFkB,EAAoBlB,EACzB,CAcD,SAASkB,EAAoBlB,GAC3B,OAAIA,IAASwB,GACX7B,EAAQM,MAAM,2BACPwB,EAAczB,IAEhBH,EAA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F,GACTkD,EACR,CAcD,SAAST,EAAMzC,GAEb,OADAL,EAAQQ,KAAK,cACNP,EAAGI,EACX,CAsHH,EA1aEmD,UAAU"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{factorySpace as e}from"../../micromark-factory-space/index.js";import{markdownLineEnding as n}from"../node_modules/micromark-util-character/index.js";const t={name:"codeIndented",tokenize:function(t,r,o){const c=this;return function(n){return t.enter("codeIndented"),e(t,l,"linePrefix",5)(n)};function l(e){const n=c.events[c.events.length-1];return n&&"linePrefix"===n[1].type&&n[2].sliceSerialize(n[1],!0).length>=4?u(e):o(e)}function u(e){return null===e?d(e):n(e)?t.attempt(i,u,d)(e):(t.enter("codeFlowValue"),s(e))}function s(e){return null===e||n(e)?(t.exit("codeFlowValue"),u(e)):(t.consume(e),s)}function d(e){return t.exit("codeIndented"),r(e)}}},i={tokenize:function(t,i,r){const o=this;return c;function c(i){return o.parser.lazy[o.now().line]?r(i):n(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),c):e(t,l,"linePrefix",5)(i)}function l(e){const t=o.events[o.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)?c(e):r(e)}},partial:!0};export{t as codeIndented};
|
|
2
|
+
//# sourceMappingURL=code-indented.js.map
|