Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
From 0c4538265f36094db16b85cf0ebbeaf1b82b5af7 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Mon, 19 Aug 2024 08:31:46 +0000 Subject: [PATCH] Built from commit '2a6a794' --- .nojekyll | 0 404.html | 13 + assets/css/styles.de9a69f2.css | 1 + assets/js/0bdfdd3e.80e95944.js | 1 + assets/js/1.1ee68f45.js | 10323 +++ assets/js/1176.c653568f.js | 1 + assets/js/11859ee7.bc3b29fc.js | 1 + assets/js/121.0b1ee707.js | 28583 +++++++++ assets/js/130.97c3c1fe.js | 18475 ++++++ assets/js/147.e6f324c2.js | 20516 ++++++ assets/js/14eb3368.c4cc24ac.js | 1 + assets/js/1555.924b970a.js | 1 + assets/js/17896441.244ddac3.js | 2 + assets/js/17896441.244ddac3.js.LICENSE.txt | 9 + assets/js/1df93b7f.add0d0ab.js | 1 + assets/js/200.ef07ecb8.js | 1227 + assets/js/211.25fcccf8.js | 3478 ++ assets/js/2130.3d3496a1.js | 1 + assets/js/2235.de976e0b.js | 1 + assets/js/2237.3ee39997.js | 1 + assets/js/2317.e4f1577d.js | 1 + assets/js/235.d2e2ae6a.js | 24006 +++++++ assets/js/2662fbc1.16d1fb5d.js | 1 + assets/js/2746.90938529.js | 1 + assets/js/307.48d39973.js | 10065 +++ assets/js/317.bfe1114e.js | 26888 ++++++++ assets/js/327.b1507568.js | 1323 + assets/js/358.7f285e68.js | 1 + assets/js/3771.5dded75d.js | 2 + assets/js/3771.5dded75d.js.LICENSE.txt | 9 + assets/js/3863.4e79c37a.js | 1 + assets/js/3a55b9ff.2fb2e80e.js | 1 + assets/js/3b435a04.119fc3ad.js | 1 + assets/js/4.4581e262.js | 26263 ++++++++ assets/js/4.d4e84adf.js | 1 + assets/js/440.99fb5fa5.js | 1410 + assets/js/469.5198d491.js | 540 + assets/js/4f9ad5cc.d8973fd1.js | 1 + assets/js/506.f8e135de.js | 1820 + assets/js/51515e66.559d977c.js | 1 + assets/js/555.245cb126.js | 2105 + assets/js/5642.92622fe6.js | 1 + assets/js/5688.9d57ae43.js | 1 + assets/js/59f922ef.d5e41fd4.js | 1 + assets/js/5e95c892.ad8f2bde.js | 1 + assets/js/6063.c242930b.js | 1 + assets/js/609.fc671e1c.js | 10814 ++++ assets/js/6216.9c87e670.js | 1 + assets/js/6292.4446f967.js | 1 + assets/js/63.f064aa03.js | 742 + assets/js/642.72d21411.js | 1242 + assets/js/6506.9bc7806f.js | 1 + assets/js/67db73f0.e7ff6635.js | 1 + assets/js/688.b0db22c8.js | 26176 ++++++++ assets/js/69795df0.ec00bcca.js | 1 + assets/js/7121.4973c936.js | 1 + assets/js/7147.4c64959b.js | 1 + assets/js/7200.a1f6288d.js | 1 + assets/js/7211.a0650c88.js | 1 + assets/js/7308.998b0e41.js | 1 + assets/js/7438851d.1e66115a.js | 1 + assets/js/7440.6f324626.js | 1 + assets/js/751.56e1e341.js | 10825 ++++ assets/js/751.ef6780cb.js | 1 + assets/js/771.648de544.js | 51832 ++++++++++++++++ assets/js/7dbb84ad.de990a0e.js | 1 + assets/js/8159.f171b590.js | 1 + assets/js/8327.dda91e63.js | 1 + assets/js/8609.f71bdfb8.js | 1 + assets/js/863.1b5358f2.js | 2605 + assets/js/8747.7d832047.js | 1 + assets/js/8947.2ac7d40e.js | 1 + assets/js/9469.d0368221.js | 1 + assets/js/947.6a173dc7.js | 14654 +++++ assets/js/9688.ee807478.js | 1 + assets/js/980a27ad.1e6de9b3.js | 1 + assets/js/a7456010.51a4a774.js | 1 + assets/js/a7bd4aaa.3b66ce73.js | 1 + assets/js/a94703ab.52311314.js | 1 + assets/js/aba21aa0.49179dbc.js | 1 + assets/js/b0ef962e.4c4597cd.js | 1 + assets/js/common.020bfe42.js | 1 + assets/js/df9ca9a0.40b4d145.js | 1 + assets/js/ebd56198.35101d17.js | 1 + assets/js/f146017a.4804e705.js | 1 + assets/js/main.099aabdf.js | 2 + assets/js/main.099aabdf.js.LICENSE.txt | 64 + assets/js/runtime~main.aebe066b.js | 1 + docs/about/introduction/index.html | 46 + docs/about/usage/basic-usage/index.html | 160 + docs/about/usage/caching/index.html | 27 + docs/about/usage/data-source/index.html | 48 + docs/about/usage/fetching-metadata/index.html | 22 + docs/about/usage/time-zone/index.html | 35 + docs/category/developer-guide/index.html | 13 + docs/category/usage/index.html | 13 + .../development-guide/publishing/index.html | 14 + .../development-guide/setup/index.html | 46 + .../development-guide/testing/index.html | 14 + .../development-guide/upgrading/index.html | 14 + docs/contribute/documentation/index.html | 27 + docs/contribute/ground-rules/index.html | 25 + .../how-to-start-contributing/index.html | 33 + docs/contribute/overview/index.html | 19 + img/favicon.png | Bin 0 -> 493 bytes img/logo.svg | 7 + index.html | 13 + sitemap.xml | 1 + 108 files changed, 296647 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 assets/css/styles.de9a69f2.css create mode 100644 assets/js/0bdfdd3e.80e95944.js create mode 100644 assets/js/1.1ee68f45.js create mode 100644 assets/js/1176.c653568f.js create mode 100644 assets/js/11859ee7.bc3b29fc.js create mode 100644 assets/js/121.0b1ee707.js create mode 100644 assets/js/130.97c3c1fe.js create mode 100644 assets/js/147.e6f324c2.js create mode 100644 assets/js/14eb3368.c4cc24ac.js create mode 100644 assets/js/1555.924b970a.js create mode 100644 assets/js/17896441.244ddac3.js create mode 100644 assets/js/17896441.244ddac3.js.LICENSE.txt create mode 100644 assets/js/1df93b7f.add0d0ab.js create mode 100644 assets/js/200.ef07ecb8.js create mode 100644 assets/js/211.25fcccf8.js create mode 100644 assets/js/2130.3d3496a1.js create mode 100644 assets/js/2235.de976e0b.js create mode 100644 assets/js/2237.3ee39997.js create mode 100644 assets/js/2317.e4f1577d.js create mode 100644 assets/js/235.d2e2ae6a.js create mode 100644 assets/js/2662fbc1.16d1fb5d.js create mode 100644 assets/js/2746.90938529.js create mode 100644 assets/js/307.48d39973.js create mode 100644 assets/js/317.bfe1114e.js create mode 100644 assets/js/327.b1507568.js create mode 100644 assets/js/358.7f285e68.js create mode 100644 assets/js/3771.5dded75d.js create mode 100644 assets/js/3771.5dded75d.js.LICENSE.txt create mode 100644 assets/js/3863.4e79c37a.js create mode 100644 assets/js/3a55b9ff.2fb2e80e.js create mode 100644 assets/js/3b435a04.119fc3ad.js create mode 100644 assets/js/4.4581e262.js create mode 100644 assets/js/4.d4e84adf.js create mode 100644 assets/js/440.99fb5fa5.js create mode 100644 assets/js/469.5198d491.js create mode 100644 assets/js/4f9ad5cc.d8973fd1.js create mode 100644 assets/js/506.f8e135de.js create mode 100644 assets/js/51515e66.559d977c.js create mode 100644 assets/js/555.245cb126.js create mode 100644 assets/js/5642.92622fe6.js create mode 100644 assets/js/5688.9d57ae43.js create mode 100644 assets/js/59f922ef.d5e41fd4.js create mode 100644 assets/js/5e95c892.ad8f2bde.js create mode 100644 assets/js/6063.c242930b.js create mode 100644 assets/js/609.fc671e1c.js create mode 100644 assets/js/6216.9c87e670.js create mode 100644 assets/js/6292.4446f967.js create mode 100644 assets/js/63.f064aa03.js create mode 100644 assets/js/642.72d21411.js create mode 100644 assets/js/6506.9bc7806f.js create mode 100644 assets/js/67db73f0.e7ff6635.js create mode 100644 assets/js/688.b0db22c8.js create mode 100644 assets/js/69795df0.ec00bcca.js create mode 100644 assets/js/7121.4973c936.js create mode 100644 assets/js/7147.4c64959b.js create mode 100644 assets/js/7200.a1f6288d.js create mode 100644 assets/js/7211.a0650c88.js create mode 100644 assets/js/7308.998b0e41.js create mode 100644 assets/js/7438851d.1e66115a.js create mode 100644 assets/js/7440.6f324626.js create mode 100644 assets/js/751.56e1e341.js create mode 100644 assets/js/751.ef6780cb.js create mode 100644 assets/js/771.648de544.js create mode 100644 assets/js/7dbb84ad.de990a0e.js create mode 100644 assets/js/8159.f171b590.js create mode 100644 assets/js/8327.dda91e63.js create mode 100644 assets/js/8609.f71bdfb8.js create mode 100644 assets/js/863.1b5358f2.js create mode 100644 assets/js/8747.7d832047.js create mode 100644 assets/js/8947.2ac7d40e.js create mode 100644 assets/js/9469.d0368221.js create mode 100644 assets/js/947.6a173dc7.js create mode 100644 assets/js/9688.ee807478.js create mode 100644 assets/js/980a27ad.1e6de9b3.js create mode 100644 assets/js/a7456010.51a4a774.js create mode 100644 assets/js/a7bd4aaa.3b66ce73.js create mode 100644 assets/js/a94703ab.52311314.js create mode 100644 assets/js/aba21aa0.49179dbc.js create mode 100644 assets/js/b0ef962e.4c4597cd.js create mode 100644 assets/js/common.020bfe42.js create mode 100644 assets/js/df9ca9a0.40b4d145.js create mode 100644 assets/js/ebd56198.35101d17.js create mode 100644 assets/js/f146017a.4804e705.js create mode 100644 assets/js/main.099aabdf.js create mode 100644 assets/js/main.099aabdf.js.LICENSE.txt create mode 100644 assets/js/runtime~main.aebe066b.js create mode 100644 docs/about/introduction/index.html create mode 100644 docs/about/usage/basic-usage/index.html create mode 100644 docs/about/usage/caching/index.html create mode 100644 docs/about/usage/data-source/index.html create mode 100644 docs/about/usage/fetching-metadata/index.html create mode 100644 docs/about/usage/time-zone/index.html create mode 100644 docs/category/developer-guide/index.html create mode 100644 docs/category/usage/index.html create mode 100644 docs/contribute/development-guide/publishing/index.html create mode 100644 docs/contribute/development-guide/setup/index.html create mode 100644 docs/contribute/development-guide/testing/index.html create mode 100644 docs/contribute/development-guide/upgrading/index.html create mode 100644 docs/contribute/documentation/index.html create mode 100644 docs/contribute/ground-rules/index.html create mode 100644 docs/contribute/how-to-start-contributing/index.html create mode 100644 docs/contribute/overview/index.html create mode 100644 img/favicon.png create mode 100644 img/logo.svg create mode 100644 index.html create mode 100644 sitemap.xml diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..c56d6957 --- /dev/null +++ b/404.html @@ -0,0 +1,13 @@ + + +
+ + +We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
} */
+ let marker
+ return start
+
+ /**
+ * Start of thematic break.
+ *
+ * ```markdown
+ * > | ***
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('thematicBreak')
+ // To do: parse indent like `markdown-rs`.
+ return before(code)
+ }
+
+ /**
+ * After optional whitespace, at marker.
+ *
+ * ```markdown
+ * > | ***
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function before(code) {
+ marker = code
+ return atBreak(code)
+ }
+
+ /**
+ * After something, before something else.
+ *
+ * ```markdown
+ * > | ***
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function atBreak(code) {
+ if (code === marker) {
+ effects.enter('thematicBreakSequence')
+ return sequence(code)
+ }
+ if (size >= 3 && (code === null || markdownLineEnding(code))) {
+ effects.exit('thematicBreak')
+ return ok(code)
+ }
+ return nok(code)
+ }
+
+ /**
+ * In sequence.
+ *
+ * ```markdown
+ * > | ***
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function sequence(code) {
+ if (code === marker) {
+ effects.consume(code)
+ size++
+ return sequence
+ }
+ effects.exit('thematicBreakSequence')
+ return markdownSpace(code)
+ ? factorySpace(effects, atBreak, 'whitespace')(code)
+ : atBreak(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').ContainerState} ContainerState
+ * @typedef {import('micromark-util-types').Exiter} Exiter
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+
+
+
+/** @type {Construct} */
+const list = {
+ name: 'list',
+ tokenize: tokenizeListStart,
+ continuation: {
+ tokenize: tokenizeListContinuation
+ },
+ exit: tokenizeListEnd
+}
+
+/** @type {Construct} */
+const listItemPrefixWhitespaceConstruct = {
+ tokenize: tokenizeListItemPrefixWhitespace,
+ partial: true
+}
+
+/** @type {Construct} */
+const indentConstruct = {
+ tokenize: tokenizeIndent,
+ partial: true
+}
+
+// To do: `markdown-rs` parses list items on their own and later stitches them
+// together.
+
+/**
+ * @type {Tokenizer}
+ * @this {TokenizeContext}
+ */
+function tokenizeListStart(effects, ok, nok) {
+ const self = this
+ const tail = self.events[self.events.length - 1]
+ let initialSize =
+ tail && tail[1].type === 'linePrefix'
+ ? tail[2].sliceSerialize(tail[1], true).length
+ : 0
+ let size = 0
+ return start
+
+ /** @type {State} */
+ function start(code) {
+ const kind =
+ self.containerState.type ||
+ (code === 42 || code === 43 || code === 45
+ ? 'listUnordered'
+ : 'listOrdered')
+ if (
+ kind === 'listUnordered'
+ ? !self.containerState.marker || code === self.containerState.marker
+ : asciiDigit(code)
+ ) {
+ if (!self.containerState.type) {
+ self.containerState.type = kind
+ effects.enter(kind, {
+ _container: true
+ })
+ }
+ if (kind === 'listUnordered') {
+ effects.enter('listItemPrefix')
+ return code === 42 || code === 45
+ ? effects.check(thematicBreak, nok, atMarker)(code)
+ : atMarker(code)
+ }
+ if (!self.interrupt || code === 49) {
+ effects.enter('listItemPrefix')
+ effects.enter('listItemValue')
+ return inside(code)
+ }
+ }
+ return nok(code)
+ }
+
+ /** @type {State} */
+ function inside(code) {
+ if (asciiDigit(code) && ++size < 10) {
+ effects.consume(code)
+ return inside
+ }
+ if (
+ (!self.interrupt || size < 2) &&
+ (self.containerState.marker
+ ? code === self.containerState.marker
+ : code === 41 || code === 46)
+ ) {
+ effects.exit('listItemValue')
+ return atMarker(code)
+ }
+ return nok(code)
+ }
+
+ /**
+ * @type {State}
+ **/
+ function atMarker(code) {
+ effects.enter('listItemMarker')
+ effects.consume(code)
+ effects.exit('listItemMarker')
+ self.containerState.marker = self.containerState.marker || code
+ return effects.check(
+ blankLine,
+ // Can’t be empty when interrupting.
+ self.interrupt ? nok : onBlank,
+ effects.attempt(
+ listItemPrefixWhitespaceConstruct,
+ endOfPrefix,
+ otherPrefix
+ )
+ )
+ }
+
+ /** @type {State} */
+ function onBlank(code) {
+ self.containerState.initialBlankLine = true
+ initialSize++
+ return endOfPrefix(code)
+ }
+
+ /** @type {State} */
+ function otherPrefix(code) {
+ if (markdownSpace(code)) {
+ effects.enter('listItemPrefixWhitespace')
+ effects.consume(code)
+ effects.exit('listItemPrefixWhitespace')
+ return endOfPrefix
+ }
+ return nok(code)
+ }
+
+ /** @type {State} */
+ function endOfPrefix(code) {
+ self.containerState.size =
+ initialSize +
+ self.sliceSerialize(effects.exit('listItemPrefix'), true).length
+ return ok(code)
+ }
+}
+
+/**
+ * @type {Tokenizer}
+ * @this {TokenizeContext}
+ */
+function tokenizeListContinuation(effects, ok, nok) {
+ const self = this
+ self.containerState._closeFlow = undefined
+ return effects.check(blankLine, onBlank, notBlank)
+
+ /** @type {State} */
+ function onBlank(code) {
+ self.containerState.furtherBlankLines =
+ self.containerState.furtherBlankLines ||
+ self.containerState.initialBlankLine
+
+ // We have a blank line.
+ // Still, try to consume at most the items size.
+ return factorySpace(
+ effects,
+ ok,
+ 'listItemIndent',
+ self.containerState.size + 1
+ )(code)
+ }
+
+ /** @type {State} */
+ function notBlank(code) {
+ if (self.containerState.furtherBlankLines || !markdownSpace(code)) {
+ self.containerState.furtherBlankLines = undefined
+ self.containerState.initialBlankLine = undefined
+ return notInCurrentItem(code)
+ }
+ self.containerState.furtherBlankLines = undefined
+ self.containerState.initialBlankLine = undefined
+ return effects.attempt(indentConstruct, ok, notInCurrentItem)(code)
+ }
+
+ /** @type {State} */
+ function notInCurrentItem(code) {
+ // While we do continue, we signal that the flow should be closed.
+ self.containerState._closeFlow = true
+ // As we’re closing flow, we’re no longer interrupting.
+ self.interrupt = undefined
+ // Always populated by defaults.
+
+ return factorySpace(
+ effects,
+ effects.attempt(list, ok, nok),
+ 'linePrefix',
+ self.parser.constructs.disable.null.includes('codeIndented')
+ ? undefined
+ : 4
+ )(code)
+ }
+}
+
+/**
+ * @type {Tokenizer}
+ * @this {TokenizeContext}
+ */
+function tokenizeIndent(effects, ok, nok) {
+ const self = this
+ return factorySpace(
+ effects,
+ afterPrefix,
+ 'listItemIndent',
+ self.containerState.size + 1
+ )
+
+ /** @type {State} */
+ function afterPrefix(code) {
+ const tail = self.events[self.events.length - 1]
+ return tail &&
+ tail[1].type === 'listItemIndent' &&
+ tail[2].sliceSerialize(tail[1], true).length === self.containerState.size
+ ? ok(code)
+ : nok(code)
+ }
+}
+
+/**
+ * @type {Exiter}
+ * @this {TokenizeContext}
+ */
+function tokenizeListEnd(effects) {
+ effects.exit(this.containerState.type)
+}
+
+/**
+ * @type {Tokenizer}
+ * @this {TokenizeContext}
+ */
+function tokenizeListItemPrefixWhitespace(effects, ok, nok) {
+ const self = this
+
+ // Always populated by defaults.
+
+ return factorySpace(
+ effects,
+ afterPrefix,
+ 'listItemPrefixWhitespace',
+ self.parser.constructs.disable.null.includes('codeIndented')
+ ? undefined
+ : 4 + 1
+ )
+
+ /** @type {State} */
+ function afterPrefix(code) {
+ const tail = self.events[self.events.length - 1]
+ return !markdownSpace(code) &&
+ tail &&
+ tail[1].type === 'listItemPrefixWhitespace'
+ ? ok(code)
+ : nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').Exiter} Exiter
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const blockQuote = {
+ name: 'blockQuote',
+ tokenize: tokenizeBlockQuoteStart,
+ continuation: {
+ tokenize: tokenizeBlockQuoteContinuation
+ },
+ exit
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeBlockQuoteStart(effects, ok, nok) {
+ const self = this
+ return start
+
+ /**
+ * Start of block quote.
+ *
+ * ```markdown
+ * > | > a
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ if (code === 62) {
+ const state = self.containerState
+ if (!state.open) {
+ effects.enter('blockQuote', {
+ _container: true
+ })
+ state.open = true
+ }
+ effects.enter('blockQuotePrefix')
+ effects.enter('blockQuoteMarker')
+ effects.consume(code)
+ effects.exit('blockQuoteMarker')
+ return after
+ }
+ return nok(code)
+ }
+
+ /**
+ * After `>`, before optional whitespace.
+ *
+ * ```markdown
+ * > | > a
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function after(code) {
+ if (markdownSpace(code)) {
+ effects.enter('blockQuotePrefixWhitespace')
+ effects.consume(code)
+ effects.exit('blockQuotePrefixWhitespace')
+ effects.exit('blockQuotePrefix')
+ return ok
+ }
+ effects.exit('blockQuotePrefix')
+ return ok(code)
+ }
+}
+
+/**
+ * Start of block quote continuation.
+ *
+ * ```markdown
+ * | > a
+ * > | > b
+ * ^
+ * ```
+ *
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeBlockQuoteContinuation(effects, ok, nok) {
+ const self = this
+ return contStart
+
+ /**
+ * Start of block quote continuation.
+ *
+ * Also used to parse the first block quote opening.
+ *
+ * ```markdown
+ * | > a
+ * > | > b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function contStart(code) {
+ if (markdownSpace(code)) {
+ // Always populated by defaults.
+
+ return factorySpace(
+ effects,
+ contBefore,
+ 'linePrefix',
+ self.parser.constructs.disable.null.includes('codeIndented')
+ ? undefined
+ : 4
+ )(code)
+ }
+ return contBefore(code)
+ }
+
+ /**
+ * At `>`, after optional whitespace.
+ *
+ * Also used to parse the first block quote opening.
+ *
+ * ```markdown
+ * | > a
+ * > | > b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function contBefore(code) {
+ return effects.attempt(blockQuote, ok, nok)(code)
+ }
+}
+
+/** @type {Exiter} */
+function exit(effects) {
+ effects.exit('blockQuote')
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js
+/**
+ * @typedef {import('micromark-util-types').Effects} Effects
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenType} TokenType
+ */
+
+
+/**
+ * Parse destinations.
+ *
+ * ###### Examples
+ *
+ * ```markdown
+ *
+ * b>
+ *
+ *
+ * a
+ * a\)b
+ * a(b)c
+ * a(b)
+ * ```
+ *
+ * @param {Effects} effects
+ * Context.
+ * @param {State} ok
+ * State switched to when successful.
+ * @param {State} nok
+ * State switched to when unsuccessful.
+ * @param {TokenType} type
+ * Type for whole (`` or `b`).
+ * @param {TokenType} literalType
+ * Type when enclosed (``).
+ * @param {TokenType} literalMarkerType
+ * Type for enclosing (`<` and `>`).
+ * @param {TokenType} rawType
+ * Type when not enclosed (`b`).
+ * @param {TokenType} stringType
+ * Type for the value (`a` or `b`).
+ * @param {number | undefined} [max=Infinity]
+ * Depth of nested parens (inclusive).
+ * @returns {State}
+ * Start state.
+ */ // eslint-disable-next-line max-params
+function factoryDestination(
+ effects,
+ ok,
+ nok,
+ type,
+ literalType,
+ literalMarkerType,
+ rawType,
+ stringType,
+ max
+) {
+ const limit = max || Number.POSITIVE_INFINITY
+ let balance = 0
+ return start
+
+ /**
+ * Start of destination.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * > | aa
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ if (code === 60) {
+ effects.enter(type)
+ effects.enter(literalType)
+ effects.enter(literalMarkerType)
+ effects.consume(code)
+ effects.exit(literalMarkerType)
+ return enclosedBefore
+ }
+
+ // ASCII control, space, closing paren.
+ if (code === null || code === 32 || code === 41 || asciiControl(code)) {
+ return nok(code)
+ }
+ effects.enter(type)
+ effects.enter(rawType)
+ effects.enter(stringType)
+ effects.enter('chunkString', {
+ contentType: 'string'
+ })
+ return raw(code)
+ }
+
+ /**
+ * After `<`, at an enclosed destination.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function enclosedBefore(code) {
+ if (code === 62) {
+ effects.enter(literalMarkerType)
+ effects.consume(code)
+ effects.exit(literalMarkerType)
+ effects.exit(literalType)
+ effects.exit(type)
+ return ok
+ }
+ effects.enter(stringType)
+ effects.enter('chunkString', {
+ contentType: 'string'
+ })
+ return enclosed(code)
+ }
+
+ /**
+ * In enclosed destination.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function enclosed(code) {
+ if (code === 62) {
+ effects.exit('chunkString')
+ effects.exit(stringType)
+ return enclosedBefore(code)
+ }
+ if (code === null || code === 60 || markdownLineEnding(code)) {
+ return nok(code)
+ }
+ effects.consume(code)
+ return code === 92 ? enclosedEscape : enclosed
+ }
+
+ /**
+ * After `\`, at a special character.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function enclosedEscape(code) {
+ if (code === 60 || code === 62 || code === 92) {
+ effects.consume(code)
+ return enclosed
+ }
+ return enclosed(code)
+ }
+
+ /**
+ * In raw destination.
+ *
+ * ```markdown
+ * > | aa
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function raw(code) {
+ if (
+ !balance &&
+ (code === null || code === 41 || markdownLineEndingOrSpace(code))
+ ) {
+ effects.exit('chunkString')
+ effects.exit(stringType)
+ effects.exit(rawType)
+ effects.exit(type)
+ return ok(code)
+ }
+ if (balance < limit && code === 40) {
+ effects.consume(code)
+ balance++
+ return raw
+ }
+ if (code === 41) {
+ effects.consume(code)
+ balance--
+ return raw
+ }
+
+ // ASCII control (but *not* `\0`) and space and `(`.
+ // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it
+ // doesn’t.
+ if (code === null || code === 32 || code === 40 || asciiControl(code)) {
+ return nok(code)
+ }
+ effects.consume(code)
+ return code === 92 ? rawEscape : raw
+ }
+
+ /**
+ * After `\`, at special character.
+ *
+ * ```markdown
+ * > | a\*a
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function rawEscape(code) {
+ if (code === 40 || code === 41 || code === 92) {
+ effects.consume(code)
+ return raw
+ }
+ return raw(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js
+/**
+ * @typedef {import('micromark-util-types').Effects} Effects
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').TokenType} TokenType
+ */
+
+
+/**
+ * Parse labels.
+ *
+ * > 👉 **Note**: labels in markdown are capped at 999 characters in the string.
+ *
+ * ###### Examples
+ *
+ * ```markdown
+ * [a]
+ * [a
+ * b]
+ * [a\]b]
+ * ```
+ *
+ * @this {TokenizeContext}
+ * Tokenize context.
+ * @param {Effects} effects
+ * Context.
+ * @param {State} ok
+ * State switched to when successful.
+ * @param {State} nok
+ * State switched to when unsuccessful.
+ * @param {TokenType} type
+ * Type of the whole label (`[a]`).
+ * @param {TokenType} markerType
+ * Type for the markers (`[` and `]`).
+ * @param {TokenType} stringType
+ * Type for the identifier (`a`).
+ * @returns {State}
+ * Start state.
+ */ // eslint-disable-next-line max-params
+function factoryLabel(effects, ok, nok, type, markerType, stringType) {
+ const self = this
+ let size = 0
+ /** @type {boolean} */
+ let seen
+ return start
+
+ /**
+ * Start of label.
+ *
+ * ```markdown
+ * > | [a]
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter(type)
+ effects.enter(markerType)
+ effects.consume(code)
+ effects.exit(markerType)
+ effects.enter(stringType)
+ return atBreak
+ }
+
+ /**
+ * In label, at something, before something else.
+ *
+ * ```markdown
+ * > | [a]
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function atBreak(code) {
+ if (
+ size > 999 ||
+ code === null ||
+ code === 91 ||
+ (code === 93 && !seen) ||
+ // To do: remove in the future once we’ve switched from
+ // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
+ // which doesn’t need this.
+ // Hidden footnotes hook.
+ /* c8 ignore next 3 */
+ (code === 94 &&
+ !size &&
+ '_hiddenFootnoteSupport' in self.parser.constructs)
+ ) {
+ return nok(code)
+ }
+ if (code === 93) {
+ effects.exit(stringType)
+ effects.enter(markerType)
+ effects.consume(code)
+ effects.exit(markerType)
+ effects.exit(type)
+ return ok
+ }
+
+ // To do: indent? Link chunks and EOLs together?
+ if (markdownLineEnding(code)) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return atBreak
+ }
+ effects.enter('chunkString', {
+ contentType: 'string'
+ })
+ return labelInside(code)
+ }
+
+ /**
+ * In label, in text.
+ *
+ * ```markdown
+ * > | [a]
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function labelInside(code) {
+ if (
+ code === null ||
+ code === 91 ||
+ code === 93 ||
+ markdownLineEnding(code) ||
+ size++ > 999
+ ) {
+ effects.exit('chunkString')
+ return atBreak(code)
+ }
+ effects.consume(code)
+ if (!seen) seen = !markdownSpace(code)
+ return code === 92 ? labelEscape : labelInside
+ }
+
+ /**
+ * After `\`, at a special character.
+ *
+ * ```markdown
+ * > | [a\*a]
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function labelEscape(code) {
+ if (code === 91 || code === 92 || code === 93) {
+ effects.consume(code)
+ size++
+ return labelInside
+ }
+ return labelInside(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Effects} Effects
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenType} TokenType
+ */
+
+
+
+/**
+ * Parse titles.
+ *
+ * ###### Examples
+ *
+ * ```markdown
+ * "a"
+ * 'b'
+ * (c)
+ * "a
+ * b"
+ * 'a
+ * b'
+ * (a\)b)
+ * ```
+ *
+ * @param {Effects} effects
+ * Context.
+ * @param {State} ok
+ * State switched to when successful.
+ * @param {State} nok
+ * State switched to when unsuccessful.
+ * @param {TokenType} type
+ * Type of the whole title (`"a"`, `'b'`, `(c)`).
+ * @param {TokenType} markerType
+ * Type for the markers (`"`, `'`, `(`, and `)`).
+ * @param {TokenType} stringType
+ * Type for the value (`a`).
+ * @returns {State}
+ * Start state.
+ */ // eslint-disable-next-line max-params
+function factoryTitle(effects, ok, nok, type, markerType, stringType) {
+ /** @type {NonNullable} */
+ let marker
+ return start
+
+ /**
+ * Start of title.
+ *
+ * ```markdown
+ * > | "a"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ if (code === 34 || code === 39 || code === 40) {
+ effects.enter(type)
+ effects.enter(markerType)
+ effects.consume(code)
+ effects.exit(markerType)
+ marker = code === 40 ? 41 : code
+ return begin
+ }
+ return nok(code)
+ }
+
+ /**
+ * After opening marker.
+ *
+ * This is also used at the closing marker.
+ *
+ * ```markdown
+ * > | "a"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function begin(code) {
+ if (code === marker) {
+ effects.enter(markerType)
+ effects.consume(code)
+ effects.exit(markerType)
+ effects.exit(type)
+ return ok
+ }
+ effects.enter(stringType)
+ return atBreak(code)
+ }
+
+ /**
+ * At something, before something else.
+ *
+ * ```markdown
+ * > | "a"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function atBreak(code) {
+ if (code === marker) {
+ effects.exit(stringType)
+ return begin(marker)
+ }
+ if (code === null) {
+ return nok(code)
+ }
+
+ // Note: blank lines can’t exist in content.
+ if (markdownLineEnding(code)) {
+ // To do: use `space_or_tab_eol_with_options`, connect.
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return factorySpace(effects, atBreak, 'linePrefix')
+ }
+ effects.enter('chunkString', {
+ contentType: 'string'
+ })
+ return inside(code)
+ }
+
+ /**
+ *
+ *
+ * @type {State}
+ */
+ function inside(code) {
+ if (code === marker || code === null || markdownLineEnding(code)) {
+ effects.exit('chunkString')
+ return atBreak(code)
+ }
+ effects.consume(code)
+ return code === 92 ? escape : inside
+ }
+
+ /**
+ * After `\`, at a special character.
+ *
+ * ```markdown
+ * > | "a\*b"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function escape(code) {
+ if (code === marker || code === 92) {
+ effects.consume(code)
+ return inside
+ }
+ return inside(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js
+/**
+ * @typedef {import('micromark-util-types').Effects} Effects
+ * @typedef {import('micromark-util-types').State} State
+ */
+
+
+
+/**
+ * Parse spaces and tabs.
+ *
+ * There is no `nok` parameter:
+ *
+ * * line endings or spaces in markdown are often optional, in which case this
+ * factory can be used and `ok` will be switched to whether spaces were found
+ * or not
+ * * one line ending or space can be detected with
+ * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace`
+ *
+ * @param {Effects} effects
+ * Context.
+ * @param {State} ok
+ * State switched to when successful.
+ * @returns
+ * Start state.
+ */
+function factoryWhitespace(effects, ok) {
+ /** @type {boolean} */
+ let seen
+ return start
+
+ /** @type {State} */
+ function start(code) {
+ if (markdownLineEnding(code)) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ seen = true
+ return start
+ }
+ if (markdownSpace(code)) {
+ return factorySpace(
+ effects,
+ start,
+ seen ? 'linePrefix' : 'lineSuffix'
+ )(code)
+ }
+ return ok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js
+/**
+ * Normalize an identifier (as found in references, definitions).
+ *
+ * Collapses markdown whitespace, trim, and then lower- and uppercase.
+ *
+ * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their
+ * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different
+ * uppercase character (U+0398 (`Θ`)).
+ * So, to get a canonical form, we perform both lower- and uppercase.
+ *
+ * Using uppercase last makes sure keys will never interact with default
+ * prototypal values (such as `constructor`): nothing in the prototype of
+ * `Object` is uppercase.
+ *
+ * @param {string} value
+ * Identifier to normalize.
+ * @returns {string}
+ * Normalized identifier.
+ */
+function normalizeIdentifier(value) {
+ return (
+ value
+ // Collapse markdown whitespace.
+ .replace(/[\t\n\r ]+/g, ' ')
+ // Trim.
+ .replace(/^ | $/g, '')
+ // Some characters are considered “uppercase”, but if their lowercase
+ // counterpart is uppercased will result in a different uppercase
+ // character.
+ // Hence, to get that form, we perform both lower- and uppercase.
+ // Upper case makes sure keys will not interact with default prototypal
+ // methods: no method is uppercase.
+ .toLowerCase()
+ .toUpperCase()
+ )
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+
+
+
+
+
+/** @type {Construct} */
+const definition = {
+ name: 'definition',
+ tokenize: tokenizeDefinition
+}
+
+/** @type {Construct} */
+const titleBefore = {
+ tokenize: tokenizeTitleBefore,
+ partial: true
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeDefinition(effects, ok, nok) {
+ const self = this
+ /** @type {string} */
+ let identifier
+ return start
+
+ /**
+ * At start of a definition.
+ *
+ * ```markdown
+ * > | [a]: b "c"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ // Do not interrupt paragraphs (but do follow definitions).
+ // To do: do `interrupt` the way `markdown-rs` does.
+ // To do: parse whitespace the way `markdown-rs` does.
+ effects.enter('definition')
+ return before(code)
+ }
+
+ /**
+ * After optional whitespace, at `[`.
+ *
+ * ```markdown
+ * > | [a]: b "c"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function before(code) {
+ // To do: parse whitespace the way `markdown-rs` does.
+
+ return factoryLabel.call(
+ self,
+ effects,
+ labelAfter,
+ // Note: we don’t need to reset the way `markdown-rs` does.
+ nok,
+ 'definitionLabel',
+ 'definitionLabelMarker',
+ 'definitionLabelString'
+ )(code)
+ }
+
+ /**
+ * After label.
+ *
+ * ```markdown
+ * > | [a]: b "c"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function labelAfter(code) {
+ identifier = normalizeIdentifier(
+ self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)
+ )
+ if (code === 58) {
+ effects.enter('definitionMarker')
+ effects.consume(code)
+ effects.exit('definitionMarker')
+ return markerAfter
+ }
+ return nok(code)
+ }
+
+ /**
+ * After marker.
+ *
+ * ```markdown
+ * > | [a]: b "c"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function markerAfter(code) {
+ // Note: whitespace is optional.
+ return markdownLineEndingOrSpace(code)
+ ? factoryWhitespace(effects, destinationBefore)(code)
+ : destinationBefore(code)
+ }
+
+ /**
+ * Before destination.
+ *
+ * ```markdown
+ * > | [a]: b "c"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function destinationBefore(code) {
+ return factoryDestination(
+ effects,
+ destinationAfter,
+ // Note: we don’t need to reset the way `markdown-rs` does.
+ nok,
+ 'definitionDestination',
+ 'definitionDestinationLiteral',
+ 'definitionDestinationLiteralMarker',
+ 'definitionDestinationRaw',
+ 'definitionDestinationString'
+ )(code)
+ }
+
+ /**
+ * After destination.
+ *
+ * ```markdown
+ * > | [a]: b "c"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function destinationAfter(code) {
+ return effects.attempt(titleBefore, after, after)(code)
+ }
+
+ /**
+ * After definition.
+ *
+ * ```markdown
+ * > | [a]: b
+ * ^
+ * > | [a]: b "c"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function after(code) {
+ return markdownSpace(code)
+ ? factorySpace(effects, afterWhitespace, 'whitespace')(code)
+ : afterWhitespace(code)
+ }
+
+ /**
+ * After definition, after optional whitespace.
+ *
+ * ```markdown
+ * > | [a]: b
+ * ^
+ * > | [a]: b "c"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function afterWhitespace(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('definition')
+
+ // Note: we don’t care about uniqueness.
+ // It’s likely that that doesn’t happen very frequently.
+ // It is more likely that it wastes precious time.
+ self.parser.defined.push(identifier)
+
+ // To do: `markdown-rs` interrupt.
+ // // You’d be interrupting.
+ // tokenizer.interrupt = true
+ return ok(code)
+ }
+ return nok(code)
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeTitleBefore(effects, ok, nok) {
+ return titleBefore
+
+ /**
+ * After destination, at whitespace.
+ *
+ * ```markdown
+ * > | [a]: b
+ * ^
+ * > | [a]: b "c"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function titleBefore(code) {
+ return markdownLineEndingOrSpace(code)
+ ? factoryWhitespace(effects, beforeMarker)(code)
+ : nok(code)
+ }
+
+ /**
+ * At title.
+ *
+ * ```markdown
+ * | [a]: b
+ * > | "c"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function beforeMarker(code) {
+ return factoryTitle(
+ effects,
+ titleAfter,
+ nok,
+ 'definitionTitle',
+ 'definitionTitleMarker',
+ 'definitionTitleString'
+ )(code)
+ }
+
+ /**
+ * After title.
+ *
+ * ```markdown
+ * > | [a]: b "c"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function titleAfter(code) {
+ return markdownSpace(code)
+ ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code)
+ : titleAfterOptionalWhitespace(code)
+ }
+
+ /**
+ * After title, after optional whitespace.
+ *
+ * ```markdown
+ * > | [a]: b "c"
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function titleAfterOptionalWhitespace(code) {
+ return code === null || markdownLineEnding(code) ? ok(code) : nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const codeIndented = {
+ name: 'codeIndented',
+ tokenize: tokenizeCodeIndented
+}
+
+/** @type {Construct} */
+const furtherStart = {
+ tokenize: tokenizeFurtherStart,
+ partial: true
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeCodeIndented(effects, ok, nok) {
+ const self = this
+ return start
+
+ /**
+ * Start of code (indented).
+ *
+ * > **Parsing note**: it is not needed to check if this first line is a
+ * > filled line (that it has a non-whitespace character), because blank lines
+ * > are parsed already, so we never run into that.
+ *
+ * ```markdown
+ * > | aaa
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ // To do: manually check if interrupting like `markdown-rs`.
+
+ effects.enter('codeIndented')
+ // To do: use an improved `space_or_tab` function like `markdown-rs`,
+ // so that we can drop the next state.
+ return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code)
+ }
+
+ /**
+ * At start, after 1 or 4 spaces.
+ *
+ * ```markdown
+ * > | aaa
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function afterPrefix(code) {
+ const tail = self.events[self.events.length - 1]
+ return tail &&
+ tail[1].type === 'linePrefix' &&
+ tail[2].sliceSerialize(tail[1], true).length >= 4
+ ? atBreak(code)
+ : nok(code)
+ }
+
+ /**
+ * At a break.
+ *
+ * ```markdown
+ * > | aaa
+ * ^ ^
+ * ```
+ *
+ * @type {State}
+ */
+ function atBreak(code) {
+ if (code === null) {
+ return after(code)
+ }
+ if (markdownLineEnding(code)) {
+ return effects.attempt(furtherStart, atBreak, after)(code)
+ }
+ effects.enter('codeFlowValue')
+ return inside(code)
+ }
+
+ /**
+ * In code content.
+ *
+ * ```markdown
+ * > | aaa
+ * ^^^^
+ * ```
+ *
+ * @type {State}
+ */
+ function inside(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('codeFlowValue')
+ return atBreak(code)
+ }
+ effects.consume(code)
+ return inside
+ }
+
+ /** @type {State} */
+ function after(code) {
+ effects.exit('codeIndented')
+ // To do: allow interrupting like `markdown-rs`.
+ // Feel free to interrupt.
+ // tokenizer.interrupt = false
+ return ok(code)
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeFurtherStart(effects, ok, nok) {
+ const self = this
+ return furtherStart
+
+ /**
+ * At eol, trying to parse another indent.
+ *
+ * ```markdown
+ * > | aaa
+ * ^
+ * | bbb
+ * ```
+ *
+ * @type {State}
+ */
+ function furtherStart(code) {
+ // To do: improve `lazy` / `pierce` handling.
+ // If this is a lazy line, it can’t be code.
+ if (self.parser.lazy[self.now().line]) {
+ return nok(code)
+ }
+ if (markdownLineEnding(code)) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return furtherStart
+ }
+
+ // To do: the code here in `micromark-js` is a bit different from
+ // `markdown-rs` because there it can attempt spaces.
+ // We can’t yet.
+ //
+ // To do: use an improved `space_or_tab` function like `markdown-rs`,
+ // so that we can drop the next state.
+ return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code)
+ }
+
+ /**
+ * At start, after 1 or 4 spaces.
+ *
+ * ```markdown
+ * > | aaa
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function afterPrefix(code) {
+ const tail = self.events[self.events.length - 1]
+ return tail &&
+ tail[1].type === 'linePrefix' &&
+ tail[2].sliceSerialize(tail[1], true).length >= 4
+ ? ok(code)
+ : markdownLineEnding(code)
+ ? furtherStart(code)
+ : nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').Resolver} Resolver
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+
+/** @type {Construct} */
+const headingAtx = {
+ name: 'headingAtx',
+ tokenize: tokenizeHeadingAtx,
+ resolve: resolveHeadingAtx
+}
+
+/** @type {Resolver} */
+function resolveHeadingAtx(events, context) {
+ let contentEnd = events.length - 2
+ let contentStart = 3
+ /** @type {Token} */
+ let content
+ /** @type {Token} */
+ let text
+
+ // Prefix whitespace, part of the opening.
+ if (events[contentStart][1].type === 'whitespace') {
+ contentStart += 2
+ }
+
+ // Suffix whitespace, part of the closing.
+ if (
+ contentEnd - 2 > contentStart &&
+ events[contentEnd][1].type === 'whitespace'
+ ) {
+ contentEnd -= 2
+ }
+ if (
+ events[contentEnd][1].type === 'atxHeadingSequence' &&
+ (contentStart === contentEnd - 1 ||
+ (contentEnd - 4 > contentStart &&
+ events[contentEnd - 2][1].type === 'whitespace'))
+ ) {
+ contentEnd -= contentStart + 1 === contentEnd ? 2 : 4
+ }
+ if (contentEnd > contentStart) {
+ content = {
+ type: 'atxHeadingText',
+ start: events[contentStart][1].start,
+ end: events[contentEnd][1].end
+ }
+ text = {
+ type: 'chunkText',
+ start: events[contentStart][1].start,
+ end: events[contentEnd][1].end,
+ contentType: 'text'
+ }
+ splice(events, contentStart, contentEnd - contentStart + 1, [
+ ['enter', content, context],
+ ['enter', text, context],
+ ['exit', text, context],
+ ['exit', content, context]
+ ])
+ }
+ return events
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeHeadingAtx(effects, ok, nok) {
+ let size = 0
+ return start
+
+ /**
+ * Start of a heading (atx).
+ *
+ * ```markdown
+ * > | ## aa
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ // To do: parse indent like `markdown-rs`.
+ effects.enter('atxHeading')
+ return before(code)
+ }
+
+ /**
+ * After optional whitespace, at `#`.
+ *
+ * ```markdown
+ * > | ## aa
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function before(code) {
+ effects.enter('atxHeadingSequence')
+ return sequenceOpen(code)
+ }
+
+ /**
+ * In opening sequence.
+ *
+ * ```markdown
+ * > | ## aa
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function sequenceOpen(code) {
+ if (code === 35 && size++ < 6) {
+ effects.consume(code)
+ return sequenceOpen
+ }
+
+ // Always at least one `#`.
+ if (code === null || markdownLineEndingOrSpace(code)) {
+ effects.exit('atxHeadingSequence')
+ return atBreak(code)
+ }
+ return nok(code)
+ }
+
+ /**
+ * After something, before something else.
+ *
+ * ```markdown
+ * > | ## aa
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function atBreak(code) {
+ if (code === 35) {
+ effects.enter('atxHeadingSequence')
+ return sequenceFurther(code)
+ }
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('atxHeading')
+ // To do: interrupt like `markdown-rs`.
+ // // Feel free to interrupt.
+ // tokenizer.interrupt = false
+ return ok(code)
+ }
+ if (markdownSpace(code)) {
+ return factorySpace(effects, atBreak, 'whitespace')(code)
+ }
+
+ // To do: generate `data` tokens, add the `text` token later.
+ // Needs edit map, see: `markdown.rs`.
+ effects.enter('atxHeadingText')
+ return data(code)
+ }
+
+ /**
+ * In further sequence (after whitespace).
+ *
+ * Could be normal “visible” hashes in the heading or a final sequence.
+ *
+ * ```markdown
+ * > | ## aa ##
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function sequenceFurther(code) {
+ if (code === 35) {
+ effects.consume(code)
+ return sequenceFurther
+ }
+ effects.exit('atxHeadingSequence')
+ return atBreak(code)
+ }
+
+ /**
+ * In text.
+ *
+ * ```markdown
+ * > | ## aa
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function data(code) {
+ if (code === null || code === 35 || markdownLineEndingOrSpace(code)) {
+ effects.exit('atxHeadingText')
+ return atBreak(code)
+ }
+ effects.consume(code)
+ return data
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').Resolver} Resolver
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const setextUnderline = {
+ name: 'setextUnderline',
+ tokenize: tokenizeSetextUnderline,
+ resolveTo: resolveToSetextUnderline
+}
+
+/** @type {Resolver} */
+function resolveToSetextUnderline(events, context) {
+ // To do: resolve like `markdown-rs`.
+ let index = events.length
+ /** @type {number | undefined} */
+ let content
+ /** @type {number | undefined} */
+ let text
+ /** @type {number | undefined} */
+ let definition
+
+ // Find the opening of the content.
+ // It’ll always exist: we don’t tokenize if it isn’t there.
+ while (index--) {
+ if (events[index][0] === 'enter') {
+ if (events[index][1].type === 'content') {
+ content = index
+ break
+ }
+ if (events[index][1].type === 'paragraph') {
+ text = index
+ }
+ }
+ // Exit
+ else {
+ if (events[index][1].type === 'content') {
+ // Remove the content end (if needed we’ll add it later)
+ events.splice(index, 1)
+ }
+ if (!definition && events[index][1].type === 'definition') {
+ definition = index
+ }
+ }
+ }
+ const heading = {
+ type: 'setextHeading',
+ start: Object.assign({}, events[text][1].start),
+ end: Object.assign({}, events[events.length - 1][1].end)
+ }
+
+ // Change the paragraph to setext heading text.
+ events[text][1].type = 'setextHeadingText'
+
+ // If we have definitions in the content, we’ll keep on having content,
+ // but we need move it.
+ if (definition) {
+ events.splice(text, 0, ['enter', heading, context])
+ events.splice(definition + 1, 0, ['exit', events[content][1], context])
+ events[content][1].end = Object.assign({}, events[definition][1].end)
+ } else {
+ events[content][1] = heading
+ }
+
+ // Add the heading exit at the end.
+ events.push(['exit', heading, context])
+ return events
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeSetextUnderline(effects, ok, nok) {
+ const self = this
+ /** @type {NonNullable} */
+ let marker
+ return start
+
+ /**
+ * At start of heading (setext) underline.
+ *
+ * ```markdown
+ * | aa
+ * > | ==
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ let index = self.events.length
+ /** @type {boolean | undefined} */
+ let paragraph
+ // Find an opening.
+ while (index--) {
+ // Skip enter/exit of line ending, line prefix, and content.
+ // We can now either have a definition or a paragraph.
+ if (
+ self.events[index][1].type !== 'lineEnding' &&
+ self.events[index][1].type !== 'linePrefix' &&
+ self.events[index][1].type !== 'content'
+ ) {
+ paragraph = self.events[index][1].type === 'paragraph'
+ break
+ }
+ }
+
+ // To do: handle lazy/pierce like `markdown-rs`.
+ // To do: parse indent like `markdown-rs`.
+ if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {
+ effects.enter('setextHeadingLine')
+ marker = code
+ return before(code)
+ }
+ return nok(code)
+ }
+
+ /**
+ * After optional whitespace, at `-` or `=`.
+ *
+ * ```markdown
+ * | aa
+ * > | ==
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function before(code) {
+ effects.enter('setextHeadingLineSequence')
+ return inside(code)
+ }
+
+ /**
+ * In sequence.
+ *
+ * ```markdown
+ * | aa
+ * > | ==
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function inside(code) {
+ if (code === marker) {
+ effects.consume(code)
+ return inside
+ }
+ effects.exit('setextHeadingLineSequence')
+ return markdownSpace(code)
+ ? factorySpace(effects, after, 'lineSuffix')(code)
+ : after(code)
+ }
+
+ /**
+ * After sequence, after optional whitespace.
+ *
+ * ```markdown
+ * | aa
+ * > | ==
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function after(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('setextHeadingLine')
+ return ok(code)
+ }
+ return nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js
+/**
+ * List of lowercase HTML “block” tag names.
+ *
+ * The list, when parsing HTML (flow), results in more relaxed rules (condition
+ * 6).
+ * Because they are known blocks, the HTML-like syntax doesn’t have to be
+ * strictly parsed.
+ * For tag names not in this list, a more strict algorithm (condition 7) is used
+ * to detect whether the HTML-like syntax is seen as HTML (flow) or not.
+ *
+ * This is copied from:
+ * .
+ *
+ * > 👉 **Note**: `search` was added in `CommonMark@0.31`.
+ */
+const htmlBlockNames = [
+ 'address',
+ 'article',
+ 'aside',
+ 'base',
+ 'basefont',
+ 'blockquote',
+ 'body',
+ 'caption',
+ 'center',
+ 'col',
+ 'colgroup',
+ 'dd',
+ 'details',
+ 'dialog',
+ 'dir',
+ 'div',
+ 'dl',
+ 'dt',
+ 'fieldset',
+ 'figcaption',
+ 'figure',
+ 'footer',
+ 'form',
+ 'frame',
+ 'frameset',
+ 'h1',
+ 'h2',
+ 'h3',
+ 'h4',
+ 'h5',
+ 'h6',
+ 'head',
+ 'header',
+ 'hr',
+ 'html',
+ 'iframe',
+ 'legend',
+ 'li',
+ 'link',
+ 'main',
+ 'menu',
+ 'menuitem',
+ 'nav',
+ 'noframes',
+ 'ol',
+ 'optgroup',
+ 'option',
+ 'p',
+ 'param',
+ 'search',
+ 'section',
+ 'summary',
+ 'table',
+ 'tbody',
+ 'td',
+ 'tfoot',
+ 'th',
+ 'thead',
+ 'title',
+ 'tr',
+ 'track',
+ 'ul'
+]
+
+/**
+ * List of lowercase HTML “raw” tag names.
+ *
+ * The list, when parsing HTML (flow), results in HTML that can include lines
+ * without exiting, until a closing tag also in this list is found (condition
+ * 1).
+ *
+ * This module is copied from:
+ * .
+ *
+ * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`.
+ */
+const htmlRawNames = ['pre', 'script', 'style', 'textarea']
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').Resolver} Resolver
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+
+
+/** @type {Construct} */
+const htmlFlow = {
+ name: 'htmlFlow',
+ tokenize: tokenizeHtmlFlow,
+ resolveTo: resolveToHtmlFlow,
+ concrete: true
+}
+
+/** @type {Construct} */
+const blankLineBefore = {
+ tokenize: tokenizeBlankLineBefore,
+ partial: true
+}
+const nonLazyContinuationStart = {
+ tokenize: tokenizeNonLazyContinuationStart,
+ partial: true
+}
+
+/** @type {Resolver} */
+function resolveToHtmlFlow(events) {
+ let index = events.length
+ while (index--) {
+ if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') {
+ break
+ }
+ }
+ if (index > 1 && events[index - 2][1].type === 'linePrefix') {
+ // Add the prefix start to the HTML token.
+ events[index][1].start = events[index - 2][1].start
+ // Add the prefix start to the HTML line token.
+ events[index + 1][1].start = events[index - 2][1].start
+ // Remove the line prefix.
+ events.splice(index - 2, 2)
+ }
+ return events
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeHtmlFlow(effects, ok, nok) {
+ const self = this
+ /** @type {number} */
+ let marker
+ /** @type {boolean} */
+ let closingTag
+ /** @type {string} */
+ let buffer
+ /** @type {number} */
+ let index
+ /** @type {Code} */
+ let markerB
+ return start
+
+ /**
+ * Start of HTML (flow).
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ // To do: parse indent like `markdown-rs`.
+ return before(code)
+ }
+
+ /**
+ * At `<`, after optional whitespace.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function before(code) {
+ effects.enter('htmlFlow')
+ effects.enter('htmlFlowData')
+ effects.consume(code)
+ return open
+ }
+
+ /**
+ * After `<`, at tag name or other stuff.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * > |
+ * ^
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function open(code) {
+ if (code === 33) {
+ effects.consume(code)
+ return declarationOpen
+ }
+ if (code === 47) {
+ effects.consume(code)
+ closingTag = true
+ return tagCloseStart
+ }
+ if (code === 63) {
+ effects.consume(code)
+ marker = 3
+ // To do:
+ // tokenizer.concrete = true
+ // To do: use `markdown-rs` style interrupt.
+ // While we’re in an instruction instead of a declaration, we’re on a `?`
+ // right now, so we do need to search for `>`, similar to declarations.
+ return self.interrupt ? ok : continuationDeclarationInside
+ }
+
+ // ASCII alphabetical.
+ if (asciiAlpha(code)) {
+ effects.consume(code)
+ // @ts-expect-error: not null.
+ buffer = String.fromCharCode(code)
+ return tagName
+ }
+ return nok(code)
+ }
+
+ /**
+ * After ` |
+ * ^
+ * > |
+ * ^
+ * > | &<]]>
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function declarationOpen(code) {
+ if (code === 45) {
+ effects.consume(code)
+ marker = 2
+ return commentOpenInside
+ }
+ if (code === 91) {
+ effects.consume(code)
+ marker = 5
+ index = 0
+ return cdataOpenInside
+ }
+
+ // ASCII alphabetical.
+ if (asciiAlpha(code)) {
+ effects.consume(code)
+ marker = 4
+ // // Do not form containers.
+ // tokenizer.concrete = true
+ return self.interrupt ? ok : continuationDeclarationInside
+ }
+ return nok(code)
+ }
+
+ /**
+ * After ` |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function commentOpenInside(code) {
+ if (code === 45) {
+ effects.consume(code)
+ // // Do not form containers.
+ // tokenizer.concrete = true
+ return self.interrupt ? ok : continuationDeclarationInside
+ }
+ return nok(code)
+ }
+
+ /**
+ * After ` | &<]]>
+ * ^^^^^^
+ * ```
+ *
+ * @type {State}
+ */
+ function cdataOpenInside(code) {
+ const value = 'CDATA['
+ if (code === value.charCodeAt(index++)) {
+ effects.consume(code)
+ if (index === value.length) {
+ // // Do not form containers.
+ // tokenizer.concrete = true
+ return self.interrupt ? ok : continuation
+ }
+ return cdataOpenInside
+ }
+ return nok(code)
+ }
+
+ /**
+ * After ``, in closing tag, at tag name.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagCloseStart(code) {
+ if (asciiAlpha(code)) {
+ effects.consume(code)
+ // @ts-expect-error: not null.
+ buffer = String.fromCharCode(code)
+ return tagName
+ }
+ return nok(code)
+ }
+
+ /**
+ * In tag name.
+ *
+ * ```markdown
+ * > |
+ * ^^
+ * > |
+ * ^^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagName(code) {
+ if (
+ code === null ||
+ code === 47 ||
+ code === 62 ||
+ markdownLineEndingOrSpace(code)
+ ) {
+ const slash = code === 47
+ const name = buffer.toLowerCase()
+ if (!slash && !closingTag && htmlRawNames.includes(name)) {
+ marker = 1
+ // // Do not form containers.
+ // tokenizer.concrete = true
+ return self.interrupt ? ok(code) : continuation(code)
+ }
+ if (htmlBlockNames.includes(buffer.toLowerCase())) {
+ marker = 6
+ if (slash) {
+ effects.consume(code)
+ return basicSelfClosing
+ }
+
+ // // Do not form containers.
+ // tokenizer.concrete = true
+ return self.interrupt ? ok(code) : continuation(code)
+ }
+ marker = 7
+ // Do not support complete HTML when interrupting.
+ return self.interrupt && !self.parser.lazy[self.now().line]
+ ? nok(code)
+ : closingTag
+ ? completeClosingTagAfter(code)
+ : completeAttributeNameBefore(code)
+ }
+
+ // ASCII alphanumerical and `-`.
+ if (code === 45 || asciiAlphanumeric(code)) {
+ effects.consume(code)
+ buffer += String.fromCharCode(code)
+ return tagName
+ }
+ return nok(code)
+ }
+
+ /**
+ * After closing slash of a basic tag name.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function basicSelfClosing(code) {
+ if (code === 62) {
+ effects.consume(code)
+ // // Do not form containers.
+ // tokenizer.concrete = true
+ return self.interrupt ? ok : continuation
+ }
+ return nok(code)
+ }
+
+ /**
+ * After closing slash of a complete tag name.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function completeClosingTagAfter(code) {
+ if (markdownSpace(code)) {
+ effects.consume(code)
+ return completeClosingTagAfter
+ }
+ return completeEnd(code)
+ }
+
+ /**
+ * At an attribute name.
+ *
+ * At first, this state is used after a complete tag name, after whitespace,
+ * where it expects optional attributes or the end of the tag.
+ * It is also reused after attributes, when expecting more optional
+ * attributes.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * > |
+ * ^
+ * > |
+ * ^
+ * > |
+ * ^
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function completeAttributeNameBefore(code) {
+ if (code === 47) {
+ effects.consume(code)
+ return completeEnd
+ }
+
+ // ASCII alphanumerical and `:` and `_`.
+ if (code === 58 || code === 95 || asciiAlpha(code)) {
+ effects.consume(code)
+ return completeAttributeName
+ }
+ if (markdownSpace(code)) {
+ effects.consume(code)
+ return completeAttributeNameBefore
+ }
+ return completeEnd(code)
+ }
+
+ /**
+ * In attribute name.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * > |
+ * ^
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function completeAttributeName(code) {
+ // ASCII alphanumerical and `-`, `.`, `:`, and `_`.
+ if (
+ code === 45 ||
+ code === 46 ||
+ code === 58 ||
+ code === 95 ||
+ asciiAlphanumeric(code)
+ ) {
+ effects.consume(code)
+ return completeAttributeName
+ }
+ return completeAttributeNameAfter(code)
+ }
+
+ /**
+ * After attribute name, at an optional initializer, the end of the tag, or
+ * whitespace.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function completeAttributeNameAfter(code) {
+ if (code === 61) {
+ effects.consume(code)
+ return completeAttributeValueBefore
+ }
+ if (markdownSpace(code)) {
+ effects.consume(code)
+ return completeAttributeNameAfter
+ }
+ return completeAttributeNameBefore(code)
+ }
+
+ /**
+ * Before unquoted, double quoted, or single quoted attribute value, allowing
+ * whitespace.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function completeAttributeValueBefore(code) {
+ if (
+ code === null ||
+ code === 60 ||
+ code === 61 ||
+ code === 62 ||
+ code === 96
+ ) {
+ return nok(code)
+ }
+ if (code === 34 || code === 39) {
+ effects.consume(code)
+ markerB = code
+ return completeAttributeValueQuoted
+ }
+ if (markdownSpace(code)) {
+ effects.consume(code)
+ return completeAttributeValueBefore
+ }
+ return completeAttributeValueUnquoted(code)
+ }
+
+ /**
+ * In double or single quoted attribute value.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function completeAttributeValueQuoted(code) {
+ if (code === markerB) {
+ effects.consume(code)
+ markerB = null
+ return completeAttributeValueQuotedAfter
+ }
+ if (code === null || markdownLineEnding(code)) {
+ return nok(code)
+ }
+ effects.consume(code)
+ return completeAttributeValueQuoted
+ }
+
+ /**
+ * In unquoted attribute value.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function completeAttributeValueUnquoted(code) {
+ if (
+ code === null ||
+ code === 34 ||
+ code === 39 ||
+ code === 47 ||
+ code === 60 ||
+ code === 61 ||
+ code === 62 ||
+ code === 96 ||
+ markdownLineEndingOrSpace(code)
+ ) {
+ return completeAttributeNameAfter(code)
+ }
+ effects.consume(code)
+ return completeAttributeValueUnquoted
+ }
+
+ /**
+ * After double or single quoted attribute value, before whitespace or the
+ * end of the tag.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function completeAttributeValueQuotedAfter(code) {
+ if (code === 47 || code === 62 || markdownSpace(code)) {
+ return completeAttributeNameBefore(code)
+ }
+ return nok(code)
+ }
+
+ /**
+ * In certain circumstances of a complete tag where only an `>` is allowed.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function completeEnd(code) {
+ if (code === 62) {
+ effects.consume(code)
+ return completeAfter
+ }
+ return nok(code)
+ }
+
+ /**
+ * After `>` in a complete tag.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function completeAfter(code) {
+ if (code === null || markdownLineEnding(code)) {
+ // // Do not form containers.
+ // tokenizer.concrete = true
+ return continuation(code)
+ }
+ if (markdownSpace(code)) {
+ effects.consume(code)
+ return completeAfter
+ }
+ return nok(code)
+ }
+
+ /**
+ * In continuation of any HTML kind.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function continuation(code) {
+ if (code === 45 && marker === 2) {
+ effects.consume(code)
+ return continuationCommentInside
+ }
+ if (code === 60 && marker === 1) {
+ effects.consume(code)
+ return continuationRawTagOpen
+ }
+ if (code === 62 && marker === 4) {
+ effects.consume(code)
+ return continuationClose
+ }
+ if (code === 63 && marker === 3) {
+ effects.consume(code)
+ return continuationDeclarationInside
+ }
+ if (code === 93 && marker === 5) {
+ effects.consume(code)
+ return continuationCdataInside
+ }
+ if (markdownLineEnding(code) && (marker === 6 || marker === 7)) {
+ effects.exit('htmlFlowData')
+ return effects.check(
+ blankLineBefore,
+ continuationAfter,
+ continuationStart
+ )(code)
+ }
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('htmlFlowData')
+ return continuationStart(code)
+ }
+ effects.consume(code)
+ return continuation
+ }
+
+ /**
+ * In continuation, at eol.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * | asd
+ * ```
+ *
+ * @type {State}
+ */
+ function continuationStart(code) {
+ return effects.check(
+ nonLazyContinuationStart,
+ continuationStartNonLazy,
+ continuationAfter
+ )(code)
+ }
+
+ /**
+ * In continuation, at eol, before non-lazy content.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * | asd
+ * ```
+ *
+ * @type {State}
+ */
+ function continuationStartNonLazy(code) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return continuationBefore
+ }
+
+ /**
+ * In continuation, before non-lazy content.
+ *
+ * ```markdown
+ * |
+ * > | asd
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function continuationBefore(code) {
+ if (code === null || markdownLineEnding(code)) {
+ return continuationStart(code)
+ }
+ effects.enter('htmlFlowData')
+ return continuation(code)
+ }
+
+ /**
+ * In comment continuation, after one `-`, expecting another.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function continuationCommentInside(code) {
+ if (code === 45) {
+ effects.consume(code)
+ return continuationDeclarationInside
+ }
+ return continuation(code)
+ }
+
+ /**
+ * In raw continuation, after `<`, at `/`.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function continuationRawTagOpen(code) {
+ if (code === 47) {
+ effects.consume(code)
+ buffer = ''
+ return continuationRawEndTag
+ }
+ return continuation(code)
+ }
+
+ /**
+ * In raw continuation, after ``, in a raw tag name.
+ *
+ * ```markdown
+ * > |
+ * ^^^^^^
+ * ```
+ *
+ * @type {State}
+ */
+ function continuationRawEndTag(code) {
+ if (code === 62) {
+ const name = buffer.toLowerCase()
+ if (htmlRawNames.includes(name)) {
+ effects.consume(code)
+ return continuationClose
+ }
+ return continuation(code)
+ }
+ if (asciiAlpha(code) && buffer.length < 8) {
+ effects.consume(code)
+ // @ts-expect-error: not null.
+ buffer += String.fromCharCode(code)
+ return continuationRawEndTag
+ }
+ return continuation(code)
+ }
+
+ /**
+ * In cdata continuation, after `]`, expecting `]>`.
+ *
+ * ```markdown
+ * > | &<]]>
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function continuationCdataInside(code) {
+ if (code === 93) {
+ effects.consume(code)
+ return continuationDeclarationInside
+ }
+ return continuation(code)
+ }
+
+ /**
+ * In declaration or instruction continuation, at `>`.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * > | >
+ * ^
+ * > |
+ * ^
+ * > |
+ * ^
+ * > | &<]]>
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function continuationDeclarationInside(code) {
+ if (code === 62) {
+ effects.consume(code)
+ return continuationClose
+ }
+
+ // More dashes.
+ if (code === 45 && marker === 2) {
+ effects.consume(code)
+ return continuationDeclarationInside
+ }
+ return continuation(code)
+ }
+
+ /**
+ * In closed continuation: everything we get until the eol/eof is part of it.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function continuationClose(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('htmlFlowData')
+ return continuationAfter(code)
+ }
+ effects.consume(code)
+ return continuationClose
+ }
+
+ /**
+ * Done.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function continuationAfter(code) {
+ effects.exit('htmlFlow')
+ // // Feel free to interrupt.
+ // tokenizer.interrupt = false
+ // // No longer concrete.
+ // tokenizer.concrete = false
+ return ok(code)
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeNonLazyContinuationStart(effects, ok, nok) {
+ const self = this
+ return start
+
+ /**
+ * At eol, before continuation.
+ *
+ * ```markdown
+ * > | * ```js
+ * ^
+ * | b
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ if (markdownLineEnding(code)) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return after
+ }
+ return nok(code)
+ }
+
+ /**
+ * A continuation.
+ *
+ * ```markdown
+ * | * ```js
+ * > | b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function after(code) {
+ return self.parser.lazy[self.now().line] ? nok(code) : ok(code)
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeBlankLineBefore(effects, ok, nok) {
+ return start
+
+ /**
+ * Before eol, expecting blank line.
+ *
+ * ```markdown
+ * > |
+ * ^
+ * |
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return effects.attempt(blankLine, ok, nok)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const nonLazyContinuation = {
+ tokenize: tokenizeNonLazyContinuation,
+ partial: true
+}
+
+/** @type {Construct} */
+const codeFenced = {
+ name: 'codeFenced',
+ tokenize: tokenizeCodeFenced,
+ concrete: true
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeCodeFenced(effects, ok, nok) {
+ const self = this
+ /** @type {Construct} */
+ const closeStart = {
+ tokenize: tokenizeCloseStart,
+ partial: true
+ }
+ let initialPrefix = 0
+ let sizeOpen = 0
+ /** @type {NonNullable} */
+ let marker
+ return start
+
+ /**
+ * Start of code.
+ *
+ * ```markdown
+ * > | ~~~js
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ // To do: parse whitespace like `markdown-rs`.
+ return beforeSequenceOpen(code)
+ }
+
+ /**
+ * In opening fence, after prefix, at sequence.
+ *
+ * ```markdown
+ * > | ~~~js
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function beforeSequenceOpen(code) {
+ const tail = self.events[self.events.length - 1]
+ initialPrefix =
+ tail && tail[1].type === 'linePrefix'
+ ? tail[2].sliceSerialize(tail[1], true).length
+ : 0
+ marker = code
+ effects.enter('codeFenced')
+ effects.enter('codeFencedFence')
+ effects.enter('codeFencedFenceSequence')
+ return sequenceOpen(code)
+ }
+
+ /**
+ * In opening fence sequence.
+ *
+ * ```markdown
+ * > | ~~~js
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function sequenceOpen(code) {
+ if (code === marker) {
+ sizeOpen++
+ effects.consume(code)
+ return sequenceOpen
+ }
+ if (sizeOpen < 3) {
+ return nok(code)
+ }
+ effects.exit('codeFencedFenceSequence')
+ return markdownSpace(code)
+ ? factorySpace(effects, infoBefore, 'whitespace')(code)
+ : infoBefore(code)
+ }
+
+ /**
+ * In opening fence, after the sequence (and optional whitespace), before info.
+ *
+ * ```markdown
+ * > | ~~~js
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function infoBefore(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('codeFencedFence')
+ return self.interrupt
+ ? ok(code)
+ : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)
+ }
+ effects.enter('codeFencedFenceInfo')
+ effects.enter('chunkString', {
+ contentType: 'string'
+ })
+ return info(code)
+ }
+
+ /**
+ * In info.
+ *
+ * ```markdown
+ * > | ~~~js
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function info(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('chunkString')
+ effects.exit('codeFencedFenceInfo')
+ return infoBefore(code)
+ }
+ if (markdownSpace(code)) {
+ effects.exit('chunkString')
+ effects.exit('codeFencedFenceInfo')
+ return factorySpace(effects, metaBefore, 'whitespace')(code)
+ }
+ if (code === 96 && code === marker) {
+ return nok(code)
+ }
+ effects.consume(code)
+ return info
+ }
+
+ /**
+ * In opening fence, after info and whitespace, before meta.
+ *
+ * ```markdown
+ * > | ~~~js eval
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function metaBefore(code) {
+ if (code === null || markdownLineEnding(code)) {
+ return infoBefore(code)
+ }
+ effects.enter('codeFencedFenceMeta')
+ effects.enter('chunkString', {
+ contentType: 'string'
+ })
+ return meta(code)
+ }
+
+ /**
+ * In meta.
+ *
+ * ```markdown
+ * > | ~~~js eval
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function meta(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('chunkString')
+ effects.exit('codeFencedFenceMeta')
+ return infoBefore(code)
+ }
+ if (code === 96 && code === marker) {
+ return nok(code)
+ }
+ effects.consume(code)
+ return meta
+ }
+
+ /**
+ * At eol/eof in code, before a non-lazy closing fence or content.
+ *
+ * ```markdown
+ * > | ~~~js
+ * ^
+ * > | alert(1)
+ * ^
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function atNonLazyBreak(code) {
+ return effects.attempt(closeStart, after, contentBefore)(code)
+ }
+
+ /**
+ * Before code content, not a closing fence, at eol.
+ *
+ * ```markdown
+ * | ~~~js
+ * > | alert(1)
+ * ^
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function contentBefore(code) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return contentStart
+ }
+
+ /**
+ * Before code content, not a closing fence.
+ *
+ * ```markdown
+ * | ~~~js
+ * > | alert(1)
+ * ^
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function contentStart(code) {
+ return initialPrefix > 0 && markdownSpace(code)
+ ? factorySpace(
+ effects,
+ beforeContentChunk,
+ 'linePrefix',
+ initialPrefix + 1
+ )(code)
+ : beforeContentChunk(code)
+ }
+
+ /**
+ * Before code content, after optional prefix.
+ *
+ * ```markdown
+ * | ~~~js
+ * > | alert(1)
+ * ^
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function beforeContentChunk(code) {
+ if (code === null || markdownLineEnding(code)) {
+ return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)
+ }
+ effects.enter('codeFlowValue')
+ return contentChunk(code)
+ }
+
+ /**
+ * In code content.
+ *
+ * ```markdown
+ * | ~~~js
+ * > | alert(1)
+ * ^^^^^^^^
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function contentChunk(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('codeFlowValue')
+ return beforeContentChunk(code)
+ }
+ effects.consume(code)
+ return contentChunk
+ }
+
+ /**
+ * After code.
+ *
+ * ```markdown
+ * | ~~~js
+ * | alert(1)
+ * > | ~~~
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function after(code) {
+ effects.exit('codeFenced')
+ return ok(code)
+ }
+
+ /**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+ function tokenizeCloseStart(effects, ok, nok) {
+ let size = 0
+ return startBefore
+
+ /**
+ *
+ *
+ * @type {State}
+ */
+ function startBefore(code) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return start
+ }
+
+ /**
+ * Before closing fence, at optional whitespace.
+ *
+ * ```markdown
+ * | ~~~js
+ * | alert(1)
+ * > | ~~~
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ // Always populated by defaults.
+
+ // To do: `enter` here or in next state?
+ effects.enter('codeFencedFence')
+ return markdownSpace(code)
+ ? factorySpace(
+ effects,
+ beforeSequenceClose,
+ 'linePrefix',
+ self.parser.constructs.disable.null.includes('codeIndented')
+ ? undefined
+ : 4
+ )(code)
+ : beforeSequenceClose(code)
+ }
+
+ /**
+ * In closing fence, after optional whitespace, at sequence.
+ *
+ * ```markdown
+ * | ~~~js
+ * | alert(1)
+ * > | ~~~
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function beforeSequenceClose(code) {
+ if (code === marker) {
+ effects.enter('codeFencedFenceSequence')
+ return sequenceClose(code)
+ }
+ return nok(code)
+ }
+
+ /**
+ * In closing fence sequence.
+ *
+ * ```markdown
+ * | ~~~js
+ * | alert(1)
+ * > | ~~~
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function sequenceClose(code) {
+ if (code === marker) {
+ size++
+ effects.consume(code)
+ return sequenceClose
+ }
+ if (size >= sizeOpen) {
+ effects.exit('codeFencedFenceSequence')
+ return markdownSpace(code)
+ ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code)
+ : sequenceCloseAfter(code)
+ }
+ return nok(code)
+ }
+
+ /**
+ * After closing fence sequence, after optional whitespace.
+ *
+ * ```markdown
+ * | ~~~js
+ * | alert(1)
+ * > | ~~~
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function sequenceCloseAfter(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('codeFencedFence')
+ return ok(code)
+ }
+ return nok(code)
+ }
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeNonLazyContinuation(effects, ok, nok) {
+ const self = this
+ return start
+
+ /**
+ *
+ *
+ * @type {State}
+ */
+ function start(code) {
+ if (code === null) {
+ return nok(code)
+ }
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return lineStart
+ }
+
+ /**
+ *
+ *
+ * @type {State}
+ */
+ function lineStart(code) {
+ return self.parser.lazy[self.now().line] ? nok(code) : ok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/character-entities/index.js
+/**
+ * Map of named character references.
+ *
+ * @type {Record}
+ */
+const characterEntities = {
+ AElig: 'Æ',
+ AMP: '&',
+ Aacute: 'Á',
+ Abreve: 'Ă',
+ Acirc: 'Â',
+ Acy: 'А',
+ Afr: '𝔄',
+ Agrave: 'À',
+ Alpha: 'Α',
+ Amacr: 'Ā',
+ And: '⩓',
+ Aogon: 'Ą',
+ Aopf: '𝔸',
+ ApplyFunction: '',
+ Aring: 'Å',
+ Ascr: '𝒜',
+ Assign: '≔',
+ Atilde: 'Ã',
+ Auml: 'Ä',
+ Backslash: '∖',
+ Barv: '⫧',
+ Barwed: '⌆',
+ Bcy: 'Б',
+ Because: '∵',
+ Bernoullis: 'ℬ',
+ Beta: 'Β',
+ Bfr: '𝔅',
+ Bopf: '𝔹',
+ Breve: '˘',
+ Bscr: 'ℬ',
+ Bumpeq: '≎',
+ CHcy: 'Ч',
+ COPY: '©',
+ Cacute: 'Ć',
+ Cap: '⋒',
+ CapitalDifferentialD: 'ⅅ',
+ Cayleys: 'ℭ',
+ Ccaron: 'Č',
+ Ccedil: 'Ç',
+ Ccirc: 'Ĉ',
+ Cconint: '∰',
+ Cdot: 'Ċ',
+ Cedilla: '¸',
+ CenterDot: '·',
+ Cfr: 'ℭ',
+ Chi: 'Χ',
+ CircleDot: '⊙',
+ CircleMinus: '⊖',
+ CirclePlus: '⊕',
+ CircleTimes: '⊗',
+ ClockwiseContourIntegral: '∲',
+ CloseCurlyDoubleQuote: '”',
+ CloseCurlyQuote: '’',
+ Colon: '∷',
+ Colone: '⩴',
+ Congruent: '≡',
+ Conint: '∯',
+ ContourIntegral: '∮',
+ Copf: 'ℂ',
+ Coproduct: '∐',
+ CounterClockwiseContourIntegral: '∳',
+ Cross: '⨯',
+ Cscr: '𝒞',
+ Cup: '⋓',
+ CupCap: '≍',
+ DD: 'ⅅ',
+ DDotrahd: '⤑',
+ DJcy: 'Ђ',
+ DScy: 'Ѕ',
+ DZcy: 'Џ',
+ Dagger: '‡',
+ Darr: '↡',
+ Dashv: '⫤',
+ Dcaron: 'Ď',
+ Dcy: 'Д',
+ Del: '∇',
+ Delta: 'Δ',
+ Dfr: '𝔇',
+ DiacriticalAcute: '´',
+ DiacriticalDot: '˙',
+ DiacriticalDoubleAcute: '˝',
+ DiacriticalGrave: '`',
+ DiacriticalTilde: '˜',
+ Diamond: '⋄',
+ DifferentialD: 'ⅆ',
+ Dopf: '𝔻',
+ Dot: '¨',
+ DotDot: '⃜',
+ DotEqual: '≐',
+ DoubleContourIntegral: '∯',
+ DoubleDot: '¨',
+ DoubleDownArrow: '⇓',
+ DoubleLeftArrow: '⇐',
+ DoubleLeftRightArrow: '⇔',
+ DoubleLeftTee: '⫤',
+ DoubleLongLeftArrow: '⟸',
+ DoubleLongLeftRightArrow: '⟺',
+ DoubleLongRightArrow: '⟹',
+ DoubleRightArrow: '⇒',
+ DoubleRightTee: '⊨',
+ DoubleUpArrow: '⇑',
+ DoubleUpDownArrow: '⇕',
+ DoubleVerticalBar: '∥',
+ DownArrow: '↓',
+ DownArrowBar: '⤓',
+ DownArrowUpArrow: '⇵',
+ DownBreve: '̑',
+ DownLeftRightVector: '⥐',
+ DownLeftTeeVector: '⥞',
+ DownLeftVector: '↽',
+ DownLeftVectorBar: '⥖',
+ DownRightTeeVector: '⥟',
+ DownRightVector: '⇁',
+ DownRightVectorBar: '⥗',
+ DownTee: '⊤',
+ DownTeeArrow: '↧',
+ Downarrow: '⇓',
+ Dscr: '𝒟',
+ Dstrok: 'Đ',
+ ENG: 'Ŋ',
+ ETH: 'Ð',
+ Eacute: 'É',
+ Ecaron: 'Ě',
+ Ecirc: 'Ê',
+ Ecy: 'Э',
+ Edot: 'Ė',
+ Efr: '𝔈',
+ Egrave: 'È',
+ Element: '∈',
+ Emacr: 'Ē',
+ EmptySmallSquare: '◻',
+ EmptyVerySmallSquare: '▫',
+ Eogon: 'Ę',
+ Eopf: '𝔼',
+ Epsilon: 'Ε',
+ Equal: '⩵',
+ EqualTilde: '≂',
+ Equilibrium: '⇌',
+ Escr: 'ℰ',
+ Esim: '⩳',
+ Eta: 'Η',
+ Euml: 'Ë',
+ Exists: '∃',
+ ExponentialE: 'ⅇ',
+ Fcy: 'Ф',
+ Ffr: '𝔉',
+ FilledSmallSquare: '◼',
+ FilledVerySmallSquare: '▪',
+ Fopf: '𝔽',
+ ForAll: '∀',
+ Fouriertrf: 'ℱ',
+ Fscr: 'ℱ',
+ GJcy: 'Ѓ',
+ GT: '>',
+ Gamma: 'Γ',
+ Gammad: 'Ϝ',
+ Gbreve: 'Ğ',
+ Gcedil: 'Ģ',
+ Gcirc: 'Ĝ',
+ Gcy: 'Г',
+ Gdot: 'Ġ',
+ Gfr: '𝔊',
+ Gg: '⋙',
+ Gopf: '𝔾',
+ GreaterEqual: '≥',
+ GreaterEqualLess: '⋛',
+ GreaterFullEqual: '≧',
+ GreaterGreater: '⪢',
+ GreaterLess: '≷',
+ GreaterSlantEqual: '⩾',
+ GreaterTilde: '≳',
+ Gscr: '𝒢',
+ Gt: '≫',
+ HARDcy: 'Ъ',
+ Hacek: 'ˇ',
+ Hat: '^',
+ Hcirc: 'Ĥ',
+ Hfr: 'ℌ',
+ HilbertSpace: 'ℋ',
+ Hopf: 'ℍ',
+ HorizontalLine: '─',
+ Hscr: 'ℋ',
+ Hstrok: 'Ħ',
+ HumpDownHump: '≎',
+ HumpEqual: '≏',
+ IEcy: 'Е',
+ IJlig: 'IJ',
+ IOcy: 'Ё',
+ Iacute: 'Í',
+ Icirc: 'Î',
+ Icy: 'И',
+ Idot: 'İ',
+ Ifr: 'ℑ',
+ Igrave: 'Ì',
+ Im: 'ℑ',
+ Imacr: 'Ī',
+ ImaginaryI: 'ⅈ',
+ Implies: '⇒',
+ Int: '∬',
+ Integral: '∫',
+ Intersection: '⋂',
+ InvisibleComma: '',
+ InvisibleTimes: '',
+ Iogon: 'Į',
+ Iopf: '𝕀',
+ Iota: 'Ι',
+ Iscr: 'ℐ',
+ Itilde: 'Ĩ',
+ Iukcy: 'І',
+ Iuml: 'Ï',
+ Jcirc: 'Ĵ',
+ Jcy: 'Й',
+ Jfr: '𝔍',
+ Jopf: '𝕁',
+ Jscr: '𝒥',
+ Jsercy: 'Ј',
+ Jukcy: 'Є',
+ KHcy: 'Х',
+ KJcy: 'Ќ',
+ Kappa: 'Κ',
+ Kcedil: 'Ķ',
+ Kcy: 'К',
+ Kfr: '𝔎',
+ Kopf: '𝕂',
+ Kscr: '𝒦',
+ LJcy: 'Љ',
+ LT: '<',
+ Lacute: 'Ĺ',
+ Lambda: 'Λ',
+ Lang: '⟪',
+ Laplacetrf: 'ℒ',
+ Larr: '↞',
+ Lcaron: 'Ľ',
+ Lcedil: 'Ļ',
+ Lcy: 'Л',
+ LeftAngleBracket: '⟨',
+ LeftArrow: '←',
+ LeftArrowBar: '⇤',
+ LeftArrowRightArrow: '⇆',
+ LeftCeiling: '⌈',
+ LeftDoubleBracket: '⟦',
+ LeftDownTeeVector: '⥡',
+ LeftDownVector: '⇃',
+ LeftDownVectorBar: '⥙',
+ LeftFloor: '⌊',
+ LeftRightArrow: '↔',
+ LeftRightVector: '⥎',
+ LeftTee: '⊣',
+ LeftTeeArrow: '↤',
+ LeftTeeVector: '⥚',
+ LeftTriangle: '⊲',
+ LeftTriangleBar: '⧏',
+ LeftTriangleEqual: '⊴',
+ LeftUpDownVector: '⥑',
+ LeftUpTeeVector: '⥠',
+ LeftUpVector: '↿',
+ LeftUpVectorBar: '⥘',
+ LeftVector: '↼',
+ LeftVectorBar: '⥒',
+ Leftarrow: '⇐',
+ Leftrightarrow: '⇔',
+ LessEqualGreater: '⋚',
+ LessFullEqual: '≦',
+ LessGreater: '≶',
+ LessLess: '⪡',
+ LessSlantEqual: '⩽',
+ LessTilde: '≲',
+ Lfr: '𝔏',
+ Ll: '⋘',
+ Lleftarrow: '⇚',
+ Lmidot: 'Ŀ',
+ LongLeftArrow: '⟵',
+ LongLeftRightArrow: '⟷',
+ LongRightArrow: '⟶',
+ Longleftarrow: '⟸',
+ Longleftrightarrow: '⟺',
+ Longrightarrow: '⟹',
+ Lopf: '𝕃',
+ LowerLeftArrow: '↙',
+ LowerRightArrow: '↘',
+ Lscr: 'ℒ',
+ Lsh: '↰',
+ Lstrok: 'Ł',
+ Lt: '≪',
+ Map: '⤅',
+ Mcy: 'М',
+ MediumSpace: ' ',
+ Mellintrf: 'ℳ',
+ Mfr: '𝔐',
+ MinusPlus: '∓',
+ Mopf: '𝕄',
+ Mscr: 'ℳ',
+ Mu: 'Μ',
+ NJcy: 'Њ',
+ Nacute: 'Ń',
+ Ncaron: 'Ň',
+ Ncedil: 'Ņ',
+ Ncy: 'Н',
+ NegativeMediumSpace: '',
+ NegativeThickSpace: '',
+ NegativeThinSpace: '',
+ NegativeVeryThinSpace: '',
+ NestedGreaterGreater: '≫',
+ NestedLessLess: '≪',
+ NewLine: '\n',
+ Nfr: '𝔑',
+ NoBreak: '',
+ NonBreakingSpace: ' ',
+ Nopf: 'ℕ',
+ Not: '⫬',
+ NotCongruent: '≢',
+ NotCupCap: '≭',
+ NotDoubleVerticalBar: '∦',
+ NotElement: '∉',
+ NotEqual: '≠',
+ NotEqualTilde: '≂̸',
+ NotExists: '∄',
+ NotGreater: '≯',
+ NotGreaterEqual: '≱',
+ NotGreaterFullEqual: '≧̸',
+ NotGreaterGreater: '≫̸',
+ NotGreaterLess: '≹',
+ NotGreaterSlantEqual: '⩾̸',
+ NotGreaterTilde: '≵',
+ NotHumpDownHump: '≎̸',
+ NotHumpEqual: '≏̸',
+ NotLeftTriangle: '⋪',
+ NotLeftTriangleBar: '⧏̸',
+ NotLeftTriangleEqual: '⋬',
+ NotLess: '≮',
+ NotLessEqual: '≰',
+ NotLessGreater: '≸',
+ NotLessLess: '≪̸',
+ NotLessSlantEqual: '⩽̸',
+ NotLessTilde: '≴',
+ NotNestedGreaterGreater: '⪢̸',
+ NotNestedLessLess: '⪡̸',
+ NotPrecedes: '⊀',
+ NotPrecedesEqual: '⪯̸',
+ NotPrecedesSlantEqual: '⋠',
+ NotReverseElement: '∌',
+ NotRightTriangle: '⋫',
+ NotRightTriangleBar: '⧐̸',
+ NotRightTriangleEqual: '⋭',
+ NotSquareSubset: '⊏̸',
+ NotSquareSubsetEqual: '⋢',
+ NotSquareSuperset: '⊐̸',
+ NotSquareSupersetEqual: '⋣',
+ NotSubset: '⊂⃒',
+ NotSubsetEqual: '⊈',
+ NotSucceeds: '⊁',
+ NotSucceedsEqual: '⪰̸',
+ NotSucceedsSlantEqual: '⋡',
+ NotSucceedsTilde: '≿̸',
+ NotSuperset: '⊃⃒',
+ NotSupersetEqual: '⊉',
+ NotTilde: '≁',
+ NotTildeEqual: '≄',
+ NotTildeFullEqual: '≇',
+ NotTildeTilde: '≉',
+ NotVerticalBar: '∤',
+ Nscr: '𝒩',
+ Ntilde: 'Ñ',
+ Nu: 'Ν',
+ OElig: 'Œ',
+ Oacute: 'Ó',
+ Ocirc: 'Ô',
+ Ocy: 'О',
+ Odblac: 'Ő',
+ Ofr: '𝔒',
+ Ograve: 'Ò',
+ Omacr: 'Ō',
+ Omega: 'Ω',
+ Omicron: 'Ο',
+ Oopf: '𝕆',
+ OpenCurlyDoubleQuote: '“',
+ OpenCurlyQuote: '‘',
+ Or: '⩔',
+ Oscr: '𝒪',
+ Oslash: 'Ø',
+ Otilde: 'Õ',
+ Otimes: '⨷',
+ Ouml: 'Ö',
+ OverBar: '‾',
+ OverBrace: '⏞',
+ OverBracket: '⎴',
+ OverParenthesis: '⏜',
+ PartialD: '∂',
+ Pcy: 'П',
+ Pfr: '𝔓',
+ Phi: 'Φ',
+ Pi: 'Π',
+ PlusMinus: '±',
+ Poincareplane: 'ℌ',
+ Popf: 'ℙ',
+ Pr: '⪻',
+ Precedes: '≺',
+ PrecedesEqual: '⪯',
+ PrecedesSlantEqual: '≼',
+ PrecedesTilde: '≾',
+ Prime: '″',
+ Product: '∏',
+ Proportion: '∷',
+ Proportional: '∝',
+ Pscr: '𝒫',
+ Psi: 'Ψ',
+ QUOT: '"',
+ Qfr: '𝔔',
+ Qopf: 'ℚ',
+ Qscr: '𝒬',
+ RBarr: '⤐',
+ REG: '®',
+ Racute: 'Ŕ',
+ Rang: '⟫',
+ Rarr: '↠',
+ Rarrtl: '⤖',
+ Rcaron: 'Ř',
+ Rcedil: 'Ŗ',
+ Rcy: 'Р',
+ Re: 'ℜ',
+ ReverseElement: '∋',
+ ReverseEquilibrium: '⇋',
+ ReverseUpEquilibrium: '⥯',
+ Rfr: 'ℜ',
+ Rho: 'Ρ',
+ RightAngleBracket: '⟩',
+ RightArrow: '→',
+ RightArrowBar: '⇥',
+ RightArrowLeftArrow: '⇄',
+ RightCeiling: '⌉',
+ RightDoubleBracket: '⟧',
+ RightDownTeeVector: '⥝',
+ RightDownVector: '⇂',
+ RightDownVectorBar: '⥕',
+ RightFloor: '⌋',
+ RightTee: '⊢',
+ RightTeeArrow: '↦',
+ RightTeeVector: '⥛',
+ RightTriangle: '⊳',
+ RightTriangleBar: '⧐',
+ RightTriangleEqual: '⊵',
+ RightUpDownVector: '⥏',
+ RightUpTeeVector: '⥜',
+ RightUpVector: '↾',
+ RightUpVectorBar: '⥔',
+ RightVector: '⇀',
+ RightVectorBar: '⥓',
+ Rightarrow: '⇒',
+ Ropf: 'ℝ',
+ RoundImplies: '⥰',
+ Rrightarrow: '⇛',
+ Rscr: 'ℛ',
+ Rsh: '↱',
+ RuleDelayed: '⧴',
+ SHCHcy: 'Щ',
+ SHcy: 'Ш',
+ SOFTcy: 'Ь',
+ Sacute: 'Ś',
+ Sc: '⪼',
+ Scaron: 'Š',
+ Scedil: 'Ş',
+ Scirc: 'Ŝ',
+ Scy: 'С',
+ Sfr: '𝔖',
+ ShortDownArrow: '↓',
+ ShortLeftArrow: '←',
+ ShortRightArrow: '→',
+ ShortUpArrow: '↑',
+ Sigma: 'Σ',
+ SmallCircle: '∘',
+ Sopf: '𝕊',
+ Sqrt: '√',
+ Square: '□',
+ SquareIntersection: '⊓',
+ SquareSubset: '⊏',
+ SquareSubsetEqual: '⊑',
+ SquareSuperset: '⊐',
+ SquareSupersetEqual: '⊒',
+ SquareUnion: '⊔',
+ Sscr: '𝒮',
+ Star: '⋆',
+ Sub: '⋐',
+ Subset: '⋐',
+ SubsetEqual: '⊆',
+ Succeeds: '≻',
+ SucceedsEqual: '⪰',
+ SucceedsSlantEqual: '≽',
+ SucceedsTilde: '≿',
+ SuchThat: '∋',
+ Sum: '∑',
+ Sup: '⋑',
+ Superset: '⊃',
+ SupersetEqual: '⊇',
+ Supset: '⋑',
+ THORN: 'Þ',
+ TRADE: '™',
+ TSHcy: 'Ћ',
+ TScy: 'Ц',
+ Tab: '\t',
+ Tau: 'Τ',
+ Tcaron: 'Ť',
+ Tcedil: 'Ţ',
+ Tcy: 'Т',
+ Tfr: '𝔗',
+ Therefore: '∴',
+ Theta: 'Θ',
+ ThickSpace: ' ',
+ ThinSpace: ' ',
+ Tilde: '∼',
+ TildeEqual: '≃',
+ TildeFullEqual: '≅',
+ TildeTilde: '≈',
+ Topf: '𝕋',
+ TripleDot: '⃛',
+ Tscr: '𝒯',
+ Tstrok: 'Ŧ',
+ Uacute: 'Ú',
+ Uarr: '↟',
+ Uarrocir: '⥉',
+ Ubrcy: 'Ў',
+ Ubreve: 'Ŭ',
+ Ucirc: 'Û',
+ Ucy: 'У',
+ Udblac: 'Ű',
+ Ufr: '𝔘',
+ Ugrave: 'Ù',
+ Umacr: 'Ū',
+ UnderBar: '_',
+ UnderBrace: '⏟',
+ UnderBracket: '⎵',
+ UnderParenthesis: '⏝',
+ Union: '⋃',
+ UnionPlus: '⊎',
+ Uogon: 'Ų',
+ Uopf: '𝕌',
+ UpArrow: '↑',
+ UpArrowBar: '⤒',
+ UpArrowDownArrow: '⇅',
+ UpDownArrow: '↕',
+ UpEquilibrium: '⥮',
+ UpTee: '⊥',
+ UpTeeArrow: '↥',
+ Uparrow: '⇑',
+ Updownarrow: '⇕',
+ UpperLeftArrow: '↖',
+ UpperRightArrow: '↗',
+ Upsi: 'ϒ',
+ Upsilon: 'Υ',
+ Uring: 'Ů',
+ Uscr: '𝒰',
+ Utilde: 'Ũ',
+ Uuml: 'Ü',
+ VDash: '⊫',
+ Vbar: '⫫',
+ Vcy: 'В',
+ Vdash: '⊩',
+ Vdashl: '⫦',
+ Vee: '⋁',
+ Verbar: '‖',
+ Vert: '‖',
+ VerticalBar: '∣',
+ VerticalLine: '|',
+ VerticalSeparator: '❘',
+ VerticalTilde: '≀',
+ VeryThinSpace: ' ',
+ Vfr: '𝔙',
+ Vopf: '𝕍',
+ Vscr: '𝒱',
+ Vvdash: '⊪',
+ Wcirc: 'Ŵ',
+ Wedge: '⋀',
+ Wfr: '𝔚',
+ Wopf: '𝕎',
+ Wscr: '𝒲',
+ Xfr: '𝔛',
+ Xi: 'Ξ',
+ Xopf: '𝕏',
+ Xscr: '𝒳',
+ YAcy: 'Я',
+ YIcy: 'Ї',
+ YUcy: 'Ю',
+ Yacute: 'Ý',
+ Ycirc: 'Ŷ',
+ Ycy: 'Ы',
+ Yfr: '𝔜',
+ Yopf: '𝕐',
+ Yscr: '𝒴',
+ Yuml: 'Ÿ',
+ ZHcy: 'Ж',
+ Zacute: 'Ź',
+ Zcaron: 'Ž',
+ Zcy: 'З',
+ Zdot: 'Ż',
+ ZeroWidthSpace: '',
+ Zeta: 'Ζ',
+ Zfr: 'ℨ',
+ Zopf: 'ℤ',
+ Zscr: '𝒵',
+ aacute: 'á',
+ abreve: 'ă',
+ ac: '∾',
+ acE: '∾̳',
+ acd: '∿',
+ acirc: 'â',
+ acute: '´',
+ acy: 'а',
+ aelig: 'æ',
+ af: '',
+ afr: '𝔞',
+ agrave: 'à',
+ alefsym: 'ℵ',
+ aleph: 'ℵ',
+ alpha: 'α',
+ amacr: 'ā',
+ amalg: '⨿',
+ amp: '&',
+ and: '∧',
+ andand: '⩕',
+ andd: '⩜',
+ andslope: '⩘',
+ andv: '⩚',
+ ang: '∠',
+ ange: '⦤',
+ angle: '∠',
+ angmsd: '∡',
+ angmsdaa: '⦨',
+ angmsdab: '⦩',
+ angmsdac: '⦪',
+ angmsdad: '⦫',
+ angmsdae: '⦬',
+ angmsdaf: '⦭',
+ angmsdag: '⦮',
+ angmsdah: '⦯',
+ angrt: '∟',
+ angrtvb: '⊾',
+ angrtvbd: '⦝',
+ angsph: '∢',
+ angst: 'Å',
+ angzarr: '⍼',
+ aogon: 'ą',
+ aopf: '𝕒',
+ ap: '≈',
+ apE: '⩰',
+ apacir: '⩯',
+ ape: '≊',
+ apid: '≋',
+ apos: "'",
+ approx: '≈',
+ approxeq: '≊',
+ aring: 'å',
+ ascr: '𝒶',
+ ast: '*',
+ asymp: '≈',
+ asympeq: '≍',
+ atilde: 'ã',
+ auml: 'ä',
+ awconint: '∳',
+ awint: '⨑',
+ bNot: '⫭',
+ backcong: '≌',
+ backepsilon: '϶',
+ backprime: '‵',
+ backsim: '∽',
+ backsimeq: '⋍',
+ barvee: '⊽',
+ barwed: '⌅',
+ barwedge: '⌅',
+ bbrk: '⎵',
+ bbrktbrk: '⎶',
+ bcong: '≌',
+ bcy: 'б',
+ bdquo: '„',
+ becaus: '∵',
+ because: '∵',
+ bemptyv: '⦰',
+ bepsi: '϶',
+ bernou: 'ℬ',
+ beta: 'β',
+ beth: 'ℶ',
+ between: '≬',
+ bfr: '𝔟',
+ bigcap: '⋂',
+ bigcirc: '◯',
+ bigcup: '⋃',
+ bigodot: '⨀',
+ bigoplus: '⨁',
+ bigotimes: '⨂',
+ bigsqcup: '⨆',
+ bigstar: '★',
+ bigtriangledown: '▽',
+ bigtriangleup: '△',
+ biguplus: '⨄',
+ bigvee: '⋁',
+ bigwedge: '⋀',
+ bkarow: '⤍',
+ blacklozenge: '⧫',
+ blacksquare: '▪',
+ blacktriangle: '▴',
+ blacktriangledown: '▾',
+ blacktriangleleft: '◂',
+ blacktriangleright: '▸',
+ blank: '␣',
+ blk12: '▒',
+ blk14: '░',
+ blk34: '▓',
+ block: '█',
+ bne: '=⃥',
+ bnequiv: '≡⃥',
+ bnot: '⌐',
+ bopf: '𝕓',
+ bot: '⊥',
+ bottom: '⊥',
+ bowtie: '⋈',
+ boxDL: '╗',
+ boxDR: '╔',
+ boxDl: '╖',
+ boxDr: '╓',
+ boxH: '═',
+ boxHD: '╦',
+ boxHU: '╩',
+ boxHd: '╤',
+ boxHu: '╧',
+ boxUL: '╝',
+ boxUR: '╚',
+ boxUl: '╜',
+ boxUr: '╙',
+ boxV: '║',
+ boxVH: '╬',
+ boxVL: '╣',
+ boxVR: '╠',
+ boxVh: '╫',
+ boxVl: '╢',
+ boxVr: '╟',
+ boxbox: '⧉',
+ boxdL: '╕',
+ boxdR: '╒',
+ boxdl: '┐',
+ boxdr: '┌',
+ boxh: '─',
+ boxhD: '╥',
+ boxhU: '╨',
+ boxhd: '┬',
+ boxhu: '┴',
+ boxminus: '⊟',
+ boxplus: '⊞',
+ boxtimes: '⊠',
+ boxuL: '╛',
+ boxuR: '╘',
+ boxul: '┘',
+ boxur: '└',
+ boxv: '│',
+ boxvH: '╪',
+ boxvL: '╡',
+ boxvR: '╞',
+ boxvh: '┼',
+ boxvl: '┤',
+ boxvr: '├',
+ bprime: '‵',
+ breve: '˘',
+ brvbar: '¦',
+ bscr: '𝒷',
+ bsemi: '⁏',
+ bsim: '∽',
+ bsime: '⋍',
+ bsol: '\\',
+ bsolb: '⧅',
+ bsolhsub: '⟈',
+ bull: '•',
+ bullet: '•',
+ bump: '≎',
+ bumpE: '⪮',
+ bumpe: '≏',
+ bumpeq: '≏',
+ cacute: 'ć',
+ cap: '∩',
+ capand: '⩄',
+ capbrcup: '⩉',
+ capcap: '⩋',
+ capcup: '⩇',
+ capdot: '⩀',
+ caps: '∩︀',
+ caret: '⁁',
+ caron: 'ˇ',
+ ccaps: '⩍',
+ ccaron: 'č',
+ ccedil: 'ç',
+ ccirc: 'ĉ',
+ ccups: '⩌',
+ ccupssm: '⩐',
+ cdot: 'ċ',
+ cedil: '¸',
+ cemptyv: '⦲',
+ cent: '¢',
+ centerdot: '·',
+ cfr: '𝔠',
+ chcy: 'ч',
+ check: '✓',
+ checkmark: '✓',
+ chi: 'χ',
+ cir: '○',
+ cirE: '⧃',
+ circ: 'ˆ',
+ circeq: '≗',
+ circlearrowleft: '↺',
+ circlearrowright: '↻',
+ circledR: '®',
+ circledS: 'Ⓢ',
+ circledast: '⊛',
+ circledcirc: '⊚',
+ circleddash: '⊝',
+ cire: '≗',
+ cirfnint: '⨐',
+ cirmid: '⫯',
+ cirscir: '⧂',
+ clubs: '♣',
+ clubsuit: '♣',
+ colon: ':',
+ colone: '≔',
+ coloneq: '≔',
+ comma: ',',
+ commat: '@',
+ comp: '∁',
+ compfn: '∘',
+ complement: '∁',
+ complexes: 'ℂ',
+ cong: '≅',
+ congdot: '⩭',
+ conint: '∮',
+ copf: '𝕔',
+ coprod: '∐',
+ copy: '©',
+ copysr: '℗',
+ crarr: '↵',
+ cross: '✗',
+ cscr: '𝒸',
+ csub: '⫏',
+ csube: '⫑',
+ csup: '⫐',
+ csupe: '⫒',
+ ctdot: '⋯',
+ cudarrl: '⤸',
+ cudarrr: '⤵',
+ cuepr: '⋞',
+ cuesc: '⋟',
+ cularr: '↶',
+ cularrp: '⤽',
+ cup: '∪',
+ cupbrcap: '⩈',
+ cupcap: '⩆',
+ cupcup: '⩊',
+ cupdot: '⊍',
+ cupor: '⩅',
+ cups: '∪︀',
+ curarr: '↷',
+ curarrm: '⤼',
+ curlyeqprec: '⋞',
+ curlyeqsucc: '⋟',
+ curlyvee: '⋎',
+ curlywedge: '⋏',
+ curren: '¤',
+ curvearrowleft: '↶',
+ curvearrowright: '↷',
+ cuvee: '⋎',
+ cuwed: '⋏',
+ cwconint: '∲',
+ cwint: '∱',
+ cylcty: '⌭',
+ dArr: '⇓',
+ dHar: '⥥',
+ dagger: '†',
+ daleth: 'ℸ',
+ darr: '↓',
+ dash: '‐',
+ dashv: '⊣',
+ dbkarow: '⤏',
+ dblac: '˝',
+ dcaron: 'ď',
+ dcy: 'д',
+ dd: 'ⅆ',
+ ddagger: '‡',
+ ddarr: '⇊',
+ ddotseq: '⩷',
+ deg: '°',
+ delta: 'δ',
+ demptyv: '⦱',
+ dfisht: '⥿',
+ dfr: '𝔡',
+ dharl: '⇃',
+ dharr: '⇂',
+ diam: '⋄',
+ diamond: '⋄',
+ diamondsuit: '♦',
+ diams: '♦',
+ die: '¨',
+ digamma: 'ϝ',
+ disin: '⋲',
+ div: '÷',
+ divide: '÷',
+ divideontimes: '⋇',
+ divonx: '⋇',
+ djcy: 'ђ',
+ dlcorn: '⌞',
+ dlcrop: '⌍',
+ dollar: '$',
+ dopf: '𝕕',
+ dot: '˙',
+ doteq: '≐',
+ doteqdot: '≑',
+ dotminus: '∸',
+ dotplus: '∔',
+ dotsquare: '⊡',
+ doublebarwedge: '⌆',
+ downarrow: '↓',
+ downdownarrows: '⇊',
+ downharpoonleft: '⇃',
+ downharpoonright: '⇂',
+ drbkarow: '⤐',
+ drcorn: '⌟',
+ drcrop: '⌌',
+ dscr: '𝒹',
+ dscy: 'ѕ',
+ dsol: '⧶',
+ dstrok: 'đ',
+ dtdot: '⋱',
+ dtri: '▿',
+ dtrif: '▾',
+ duarr: '⇵',
+ duhar: '⥯',
+ dwangle: '⦦',
+ dzcy: 'џ',
+ dzigrarr: '⟿',
+ eDDot: '⩷',
+ eDot: '≑',
+ eacute: 'é',
+ easter: '⩮',
+ ecaron: 'ě',
+ ecir: '≖',
+ ecirc: 'ê',
+ ecolon: '≕',
+ ecy: 'э',
+ edot: 'ė',
+ ee: 'ⅇ',
+ efDot: '≒',
+ efr: '𝔢',
+ eg: '⪚',
+ egrave: 'è',
+ egs: '⪖',
+ egsdot: '⪘',
+ el: '⪙',
+ elinters: '⏧',
+ ell: 'ℓ',
+ els: '⪕',
+ elsdot: '⪗',
+ emacr: 'ē',
+ empty: '∅',
+ emptyset: '∅',
+ emptyv: '∅',
+ emsp13: ' ',
+ emsp14: ' ',
+ emsp: ' ',
+ eng: 'ŋ',
+ ensp: ' ',
+ eogon: 'ę',
+ eopf: '𝕖',
+ epar: '⋕',
+ eparsl: '⧣',
+ eplus: '⩱',
+ epsi: 'ε',
+ epsilon: 'ε',
+ epsiv: 'ϵ',
+ eqcirc: '≖',
+ eqcolon: '≕',
+ eqsim: '≂',
+ eqslantgtr: '⪖',
+ eqslantless: '⪕',
+ equals: '=',
+ equest: '≟',
+ equiv: '≡',
+ equivDD: '⩸',
+ eqvparsl: '⧥',
+ erDot: '≓',
+ erarr: '⥱',
+ escr: 'ℯ',
+ esdot: '≐',
+ esim: '≂',
+ eta: 'η',
+ eth: 'ð',
+ euml: 'ë',
+ euro: '€',
+ excl: '!',
+ exist: '∃',
+ expectation: 'ℰ',
+ exponentiale: 'ⅇ',
+ fallingdotseq: '≒',
+ fcy: 'ф',
+ female: '♀',
+ ffilig: 'ffi',
+ fflig: 'ff',
+ ffllig: 'ffl',
+ ffr: '𝔣',
+ filig: 'fi',
+ fjlig: 'fj',
+ flat: '♭',
+ fllig: 'fl',
+ fltns: '▱',
+ fnof: 'ƒ',
+ fopf: '𝕗',
+ forall: '∀',
+ fork: '⋔',
+ forkv: '⫙',
+ fpartint: '⨍',
+ frac12: '½',
+ frac13: '⅓',
+ frac14: '¼',
+ frac15: '⅕',
+ frac16: '⅙',
+ frac18: '⅛',
+ frac23: '⅔',
+ frac25: '⅖',
+ frac34: '¾',
+ frac35: '⅗',
+ frac38: '⅜',
+ frac45: '⅘',
+ frac56: '⅚',
+ frac58: '⅝',
+ frac78: '⅞',
+ frasl: '⁄',
+ frown: '⌢',
+ fscr: '𝒻',
+ gE: '≧',
+ gEl: '⪌',
+ gacute: 'ǵ',
+ gamma: 'γ',
+ gammad: 'ϝ',
+ gap: '⪆',
+ gbreve: 'ğ',
+ gcirc: 'ĝ',
+ gcy: 'г',
+ gdot: 'ġ',
+ ge: '≥',
+ gel: '⋛',
+ geq: '≥',
+ geqq: '≧',
+ geqslant: '⩾',
+ ges: '⩾',
+ gescc: '⪩',
+ gesdot: '⪀',
+ gesdoto: '⪂',
+ gesdotol: '⪄',
+ gesl: '⋛︀',
+ gesles: '⪔',
+ gfr: '𝔤',
+ gg: '≫',
+ ggg: '⋙',
+ gimel: 'ℷ',
+ gjcy: 'ѓ',
+ gl: '≷',
+ glE: '⪒',
+ gla: '⪥',
+ glj: '⪤',
+ gnE: '≩',
+ gnap: '⪊',
+ gnapprox: '⪊',
+ gne: '⪈',
+ gneq: '⪈',
+ gneqq: '≩',
+ gnsim: '⋧',
+ gopf: '𝕘',
+ grave: '`',
+ gscr: 'ℊ',
+ gsim: '≳',
+ gsime: '⪎',
+ gsiml: '⪐',
+ gt: '>',
+ gtcc: '⪧',
+ gtcir: '⩺',
+ gtdot: '⋗',
+ gtlPar: '⦕',
+ gtquest: '⩼',
+ gtrapprox: '⪆',
+ gtrarr: '⥸',
+ gtrdot: '⋗',
+ gtreqless: '⋛',
+ gtreqqless: '⪌',
+ gtrless: '≷',
+ gtrsim: '≳',
+ gvertneqq: '≩︀',
+ gvnE: '≩︀',
+ hArr: '⇔',
+ hairsp: ' ',
+ half: '½',
+ hamilt: 'ℋ',
+ hardcy: 'ъ',
+ harr: '↔',
+ harrcir: '⥈',
+ harrw: '↭',
+ hbar: 'ℏ',
+ hcirc: 'ĥ',
+ hearts: '♥',
+ heartsuit: '♥',
+ hellip: '…',
+ hercon: '⊹',
+ hfr: '𝔥',
+ hksearow: '⤥',
+ hkswarow: '⤦',
+ hoarr: '⇿',
+ homtht: '∻',
+ hookleftarrow: '↩',
+ hookrightarrow: '↪',
+ hopf: '𝕙',
+ horbar: '―',
+ hscr: '𝒽',
+ hslash: 'ℏ',
+ hstrok: 'ħ',
+ hybull: '⁃',
+ hyphen: '‐',
+ iacute: 'í',
+ ic: '',
+ icirc: 'î',
+ icy: 'и',
+ iecy: 'е',
+ iexcl: '¡',
+ iff: '⇔',
+ ifr: '𝔦',
+ igrave: 'ì',
+ ii: 'ⅈ',
+ iiiint: '⨌',
+ iiint: '∭',
+ iinfin: '⧜',
+ iiota: '℩',
+ ijlig: 'ij',
+ imacr: 'ī',
+ image: 'ℑ',
+ imagline: 'ℐ',
+ imagpart: 'ℑ',
+ imath: 'ı',
+ imof: '⊷',
+ imped: 'Ƶ',
+ in: '∈',
+ incare: '℅',
+ infin: '∞',
+ infintie: '⧝',
+ inodot: 'ı',
+ int: '∫',
+ intcal: '⊺',
+ integers: 'ℤ',
+ intercal: '⊺',
+ intlarhk: '⨗',
+ intprod: '⨼',
+ iocy: 'ё',
+ iogon: 'į',
+ iopf: '𝕚',
+ iota: 'ι',
+ iprod: '⨼',
+ iquest: '¿',
+ iscr: '𝒾',
+ isin: '∈',
+ isinE: '⋹',
+ isindot: '⋵',
+ isins: '⋴',
+ isinsv: '⋳',
+ isinv: '∈',
+ it: '',
+ itilde: 'ĩ',
+ iukcy: 'і',
+ iuml: 'ï',
+ jcirc: 'ĵ',
+ jcy: 'й',
+ jfr: '𝔧',
+ jmath: 'ȷ',
+ jopf: '𝕛',
+ jscr: '𝒿',
+ jsercy: 'ј',
+ jukcy: 'є',
+ kappa: 'κ',
+ kappav: 'ϰ',
+ kcedil: 'ķ',
+ kcy: 'к',
+ kfr: '𝔨',
+ kgreen: 'ĸ',
+ khcy: 'х',
+ kjcy: 'ќ',
+ kopf: '𝕜',
+ kscr: '𝓀',
+ lAarr: '⇚',
+ lArr: '⇐',
+ lAtail: '⤛',
+ lBarr: '⤎',
+ lE: '≦',
+ lEg: '⪋',
+ lHar: '⥢',
+ lacute: 'ĺ',
+ laemptyv: '⦴',
+ lagran: 'ℒ',
+ lambda: 'λ',
+ lang: '⟨',
+ langd: '⦑',
+ langle: '⟨',
+ lap: '⪅',
+ laquo: '«',
+ larr: '←',
+ larrb: '⇤',
+ larrbfs: '⤟',
+ larrfs: '⤝',
+ larrhk: '↩',
+ larrlp: '↫',
+ larrpl: '⤹',
+ larrsim: '⥳',
+ larrtl: '↢',
+ lat: '⪫',
+ latail: '⤙',
+ late: '⪭',
+ lates: '⪭︀',
+ lbarr: '⤌',
+ lbbrk: '❲',
+ lbrace: '{',
+ lbrack: '[',
+ lbrke: '⦋',
+ lbrksld: '⦏',
+ lbrkslu: '⦍',
+ lcaron: 'ľ',
+ lcedil: 'ļ',
+ lceil: '⌈',
+ lcub: '{',
+ lcy: 'л',
+ ldca: '⤶',
+ ldquo: '“',
+ ldquor: '„',
+ ldrdhar: '⥧',
+ ldrushar: '⥋',
+ ldsh: '↲',
+ le: '≤',
+ leftarrow: '←',
+ leftarrowtail: '↢',
+ leftharpoondown: '↽',
+ leftharpoonup: '↼',
+ leftleftarrows: '⇇',
+ leftrightarrow: '↔',
+ leftrightarrows: '⇆',
+ leftrightharpoons: '⇋',
+ leftrightsquigarrow: '↭',
+ leftthreetimes: '⋋',
+ leg: '⋚',
+ leq: '≤',
+ leqq: '≦',
+ leqslant: '⩽',
+ les: '⩽',
+ lescc: '⪨',
+ lesdot: '⩿',
+ lesdoto: '⪁',
+ lesdotor: '⪃',
+ lesg: '⋚︀',
+ lesges: '⪓',
+ lessapprox: '⪅',
+ lessdot: '⋖',
+ lesseqgtr: '⋚',
+ lesseqqgtr: '⪋',
+ lessgtr: '≶',
+ lesssim: '≲',
+ lfisht: '⥼',
+ lfloor: '⌊',
+ lfr: '𝔩',
+ lg: '≶',
+ lgE: '⪑',
+ lhard: '↽',
+ lharu: '↼',
+ lharul: '⥪',
+ lhblk: '▄',
+ ljcy: 'љ',
+ ll: '≪',
+ llarr: '⇇',
+ llcorner: '⌞',
+ llhard: '⥫',
+ lltri: '◺',
+ lmidot: 'ŀ',
+ lmoust: '⎰',
+ lmoustache: '⎰',
+ lnE: '≨',
+ lnap: '⪉',
+ lnapprox: '⪉',
+ lne: '⪇',
+ lneq: '⪇',
+ lneqq: '≨',
+ lnsim: '⋦',
+ loang: '⟬',
+ loarr: '⇽',
+ lobrk: '⟦',
+ longleftarrow: '⟵',
+ longleftrightarrow: '⟷',
+ longmapsto: '⟼',
+ longrightarrow: '⟶',
+ looparrowleft: '↫',
+ looparrowright: '↬',
+ lopar: '⦅',
+ lopf: '𝕝',
+ loplus: '⨭',
+ lotimes: '⨴',
+ lowast: '∗',
+ lowbar: '_',
+ loz: '◊',
+ lozenge: '◊',
+ lozf: '⧫',
+ lpar: '(',
+ lparlt: '⦓',
+ lrarr: '⇆',
+ lrcorner: '⌟',
+ lrhar: '⇋',
+ lrhard: '⥭',
+ lrm: '',
+ lrtri: '⊿',
+ lsaquo: '‹',
+ lscr: '𝓁',
+ lsh: '↰',
+ lsim: '≲',
+ lsime: '⪍',
+ lsimg: '⪏',
+ lsqb: '[',
+ lsquo: '‘',
+ lsquor: '‚',
+ lstrok: 'ł',
+ lt: '<',
+ ltcc: '⪦',
+ ltcir: '⩹',
+ ltdot: '⋖',
+ lthree: '⋋',
+ ltimes: '⋉',
+ ltlarr: '⥶',
+ ltquest: '⩻',
+ ltrPar: '⦖',
+ ltri: '◃',
+ ltrie: '⊴',
+ ltrif: '◂',
+ lurdshar: '⥊',
+ luruhar: '⥦',
+ lvertneqq: '≨︀',
+ lvnE: '≨︀',
+ mDDot: '∺',
+ macr: '¯',
+ male: '♂',
+ malt: '✠',
+ maltese: '✠',
+ map: '↦',
+ mapsto: '↦',
+ mapstodown: '↧',
+ mapstoleft: '↤',
+ mapstoup: '↥',
+ marker: '▮',
+ mcomma: '⨩',
+ mcy: 'м',
+ mdash: '—',
+ measuredangle: '∡',
+ mfr: '𝔪',
+ mho: '℧',
+ micro: 'µ',
+ mid: '∣',
+ midast: '*',
+ midcir: '⫰',
+ middot: '·',
+ minus: '−',
+ minusb: '⊟',
+ minusd: '∸',
+ minusdu: '⨪',
+ mlcp: '⫛',
+ mldr: '…',
+ mnplus: '∓',
+ models: '⊧',
+ mopf: '𝕞',
+ mp: '∓',
+ mscr: '𝓂',
+ mstpos: '∾',
+ mu: 'μ',
+ multimap: '⊸',
+ mumap: '⊸',
+ nGg: '⋙̸',
+ nGt: '≫⃒',
+ nGtv: '≫̸',
+ nLeftarrow: '⇍',
+ nLeftrightarrow: '⇎',
+ nLl: '⋘̸',
+ nLt: '≪⃒',
+ nLtv: '≪̸',
+ nRightarrow: '⇏',
+ nVDash: '⊯',
+ nVdash: '⊮',
+ nabla: '∇',
+ nacute: 'ń',
+ nang: '∠⃒',
+ nap: '≉',
+ napE: '⩰̸',
+ napid: '≋̸',
+ napos: 'ʼn',
+ napprox: '≉',
+ natur: '♮',
+ natural: '♮',
+ naturals: 'ℕ',
+ nbsp: ' ',
+ nbump: '≎̸',
+ nbumpe: '≏̸',
+ ncap: '⩃',
+ ncaron: 'ň',
+ ncedil: 'ņ',
+ ncong: '≇',
+ ncongdot: '⩭̸',
+ ncup: '⩂',
+ ncy: 'н',
+ ndash: '–',
+ ne: '≠',
+ neArr: '⇗',
+ nearhk: '⤤',
+ nearr: '↗',
+ nearrow: '↗',
+ nedot: '≐̸',
+ nequiv: '≢',
+ nesear: '⤨',
+ nesim: '≂̸',
+ nexist: '∄',
+ nexists: '∄',
+ nfr: '𝔫',
+ ngE: '≧̸',
+ nge: '≱',
+ ngeq: '≱',
+ ngeqq: '≧̸',
+ ngeqslant: '⩾̸',
+ nges: '⩾̸',
+ ngsim: '≵',
+ ngt: '≯',
+ ngtr: '≯',
+ nhArr: '⇎',
+ nharr: '↮',
+ nhpar: '⫲',
+ ni: '∋',
+ nis: '⋼',
+ nisd: '⋺',
+ niv: '∋',
+ njcy: 'њ',
+ nlArr: '⇍',
+ nlE: '≦̸',
+ nlarr: '↚',
+ nldr: '‥',
+ nle: '≰',
+ nleftarrow: '↚',
+ nleftrightarrow: '↮',
+ nleq: '≰',
+ nleqq: '≦̸',
+ nleqslant: '⩽̸',
+ nles: '⩽̸',
+ nless: '≮',
+ nlsim: '≴',
+ nlt: '≮',
+ nltri: '⋪',
+ nltrie: '⋬',
+ nmid: '∤',
+ nopf: '𝕟',
+ not: '¬',
+ notin: '∉',
+ notinE: '⋹̸',
+ notindot: '⋵̸',
+ notinva: '∉',
+ notinvb: '⋷',
+ notinvc: '⋶',
+ notni: '∌',
+ notniva: '∌',
+ notnivb: '⋾',
+ notnivc: '⋽',
+ npar: '∦',
+ nparallel: '∦',
+ nparsl: '⫽⃥',
+ npart: '∂̸',
+ npolint: '⨔',
+ npr: '⊀',
+ nprcue: '⋠',
+ npre: '⪯̸',
+ nprec: '⊀',
+ npreceq: '⪯̸',
+ nrArr: '⇏',
+ nrarr: '↛',
+ nrarrc: '⤳̸',
+ nrarrw: '↝̸',
+ nrightarrow: '↛',
+ nrtri: '⋫',
+ nrtrie: '⋭',
+ nsc: '⊁',
+ nsccue: '⋡',
+ nsce: '⪰̸',
+ nscr: '𝓃',
+ nshortmid: '∤',
+ nshortparallel: '∦',
+ nsim: '≁',
+ nsime: '≄',
+ nsimeq: '≄',
+ nsmid: '∤',
+ nspar: '∦',
+ nsqsube: '⋢',
+ nsqsupe: '⋣',
+ nsub: '⊄',
+ nsubE: '⫅̸',
+ nsube: '⊈',
+ nsubset: '⊂⃒',
+ nsubseteq: '⊈',
+ nsubseteqq: '⫅̸',
+ nsucc: '⊁',
+ nsucceq: '⪰̸',
+ nsup: '⊅',
+ nsupE: '⫆̸',
+ nsupe: '⊉',
+ nsupset: '⊃⃒',
+ nsupseteq: '⊉',
+ nsupseteqq: '⫆̸',
+ ntgl: '≹',
+ ntilde: 'ñ',
+ ntlg: '≸',
+ ntriangleleft: '⋪',
+ ntrianglelefteq: '⋬',
+ ntriangleright: '⋫',
+ ntrianglerighteq: '⋭',
+ nu: 'ν',
+ num: '#',
+ numero: '№',
+ numsp: ' ',
+ nvDash: '⊭',
+ nvHarr: '⤄',
+ nvap: '≍⃒',
+ nvdash: '⊬',
+ nvge: '≥⃒',
+ nvgt: '>⃒',
+ nvinfin: '⧞',
+ nvlArr: '⤂',
+ nvle: '≤⃒',
+ nvlt: '<⃒',
+ nvltrie: '⊴⃒',
+ nvrArr: '⤃',
+ nvrtrie: '⊵⃒',
+ nvsim: '∼⃒',
+ nwArr: '⇖',
+ nwarhk: '⤣',
+ nwarr: '↖',
+ nwarrow: '↖',
+ nwnear: '⤧',
+ oS: 'Ⓢ',
+ oacute: 'ó',
+ oast: '⊛',
+ ocir: '⊚',
+ ocirc: 'ô',
+ ocy: 'о',
+ odash: '⊝',
+ odblac: 'ő',
+ odiv: '⨸',
+ odot: '⊙',
+ odsold: '⦼',
+ oelig: 'œ',
+ ofcir: '⦿',
+ ofr: '𝔬',
+ ogon: '˛',
+ ograve: 'ò',
+ ogt: '⧁',
+ ohbar: '⦵',
+ ohm: 'Ω',
+ oint: '∮',
+ olarr: '↺',
+ olcir: '⦾',
+ olcross: '⦻',
+ oline: '‾',
+ olt: '⧀',
+ omacr: 'ō',
+ omega: 'ω',
+ omicron: 'ο',
+ omid: '⦶',
+ ominus: '⊖',
+ oopf: '𝕠',
+ opar: '⦷',
+ operp: '⦹',
+ oplus: '⊕',
+ or: '∨',
+ orarr: '↻',
+ ord: '⩝',
+ order: 'ℴ',
+ orderof: 'ℴ',
+ ordf: 'ª',
+ ordm: 'º',
+ origof: '⊶',
+ oror: '⩖',
+ orslope: '⩗',
+ orv: '⩛',
+ oscr: 'ℴ',
+ oslash: 'ø',
+ osol: '⊘',
+ otilde: 'õ',
+ otimes: '⊗',
+ otimesas: '⨶',
+ ouml: 'ö',
+ ovbar: '⌽',
+ par: '∥',
+ para: '¶',
+ parallel: '∥',
+ parsim: '⫳',
+ parsl: '⫽',
+ part: '∂',
+ pcy: 'п',
+ percnt: '%',
+ period: '.',
+ permil: '‰',
+ perp: '⊥',
+ pertenk: '‱',
+ pfr: '𝔭',
+ phi: 'φ',
+ phiv: 'ϕ',
+ phmmat: 'ℳ',
+ phone: '☎',
+ pi: 'π',
+ pitchfork: '⋔',
+ piv: 'ϖ',
+ planck: 'ℏ',
+ planckh: 'ℎ',
+ plankv: 'ℏ',
+ plus: '+',
+ plusacir: '⨣',
+ plusb: '⊞',
+ pluscir: '⨢',
+ plusdo: '∔',
+ plusdu: '⨥',
+ pluse: '⩲',
+ plusmn: '±',
+ plussim: '⨦',
+ plustwo: '⨧',
+ pm: '±',
+ pointint: '⨕',
+ popf: '𝕡',
+ pound: '£',
+ pr: '≺',
+ prE: '⪳',
+ prap: '⪷',
+ prcue: '≼',
+ pre: '⪯',
+ prec: '≺',
+ precapprox: '⪷',
+ preccurlyeq: '≼',
+ preceq: '⪯',
+ precnapprox: '⪹',
+ precneqq: '⪵',
+ precnsim: '⋨',
+ precsim: '≾',
+ prime: '′',
+ primes: 'ℙ',
+ prnE: '⪵',
+ prnap: '⪹',
+ prnsim: '⋨',
+ prod: '∏',
+ profalar: '⌮',
+ profline: '⌒',
+ profsurf: '⌓',
+ prop: '∝',
+ propto: '∝',
+ prsim: '≾',
+ prurel: '⊰',
+ pscr: '𝓅',
+ psi: 'ψ',
+ puncsp: ' ',
+ qfr: '𝔮',
+ qint: '⨌',
+ qopf: '𝕢',
+ qprime: '⁗',
+ qscr: '𝓆',
+ quaternions: 'ℍ',
+ quatint: '⨖',
+ quest: '?',
+ questeq: '≟',
+ quot: '"',
+ rAarr: '⇛',
+ rArr: '⇒',
+ rAtail: '⤜',
+ rBarr: '⤏',
+ rHar: '⥤',
+ race: '∽̱',
+ racute: 'ŕ',
+ radic: '√',
+ raemptyv: '⦳',
+ rang: '⟩',
+ rangd: '⦒',
+ range: '⦥',
+ rangle: '⟩',
+ raquo: '»',
+ rarr: '→',
+ rarrap: '⥵',
+ rarrb: '⇥',
+ rarrbfs: '⤠',
+ rarrc: '⤳',
+ rarrfs: '⤞',
+ rarrhk: '↪',
+ rarrlp: '↬',
+ rarrpl: '⥅',
+ rarrsim: '⥴',
+ rarrtl: '↣',
+ rarrw: '↝',
+ ratail: '⤚',
+ ratio: '∶',
+ rationals: 'ℚ',
+ rbarr: '⤍',
+ rbbrk: '❳',
+ rbrace: '}',
+ rbrack: ']',
+ rbrke: '⦌',
+ rbrksld: '⦎',
+ rbrkslu: '⦐',
+ rcaron: 'ř',
+ rcedil: 'ŗ',
+ rceil: '⌉',
+ rcub: '}',
+ rcy: 'р',
+ rdca: '⤷',
+ rdldhar: '⥩',
+ rdquo: '”',
+ rdquor: '”',
+ rdsh: '↳',
+ real: 'ℜ',
+ realine: 'ℛ',
+ realpart: 'ℜ',
+ reals: 'ℝ',
+ rect: '▭',
+ reg: '®',
+ rfisht: '⥽',
+ rfloor: '⌋',
+ rfr: '𝔯',
+ rhard: '⇁',
+ rharu: '⇀',
+ rharul: '⥬',
+ rho: 'ρ',
+ rhov: 'ϱ',
+ rightarrow: '→',
+ rightarrowtail: '↣',
+ rightharpoondown: '⇁',
+ rightharpoonup: '⇀',
+ rightleftarrows: '⇄',
+ rightleftharpoons: '⇌',
+ rightrightarrows: '⇉',
+ rightsquigarrow: '↝',
+ rightthreetimes: '⋌',
+ ring: '˚',
+ risingdotseq: '≓',
+ rlarr: '⇄',
+ rlhar: '⇌',
+ rlm: '',
+ rmoust: '⎱',
+ rmoustache: '⎱',
+ rnmid: '⫮',
+ roang: '⟭',
+ roarr: '⇾',
+ robrk: '⟧',
+ ropar: '⦆',
+ ropf: '𝕣',
+ roplus: '⨮',
+ rotimes: '⨵',
+ rpar: ')',
+ rpargt: '⦔',
+ rppolint: '⨒',
+ rrarr: '⇉',
+ rsaquo: '›',
+ rscr: '𝓇',
+ rsh: '↱',
+ rsqb: ']',
+ rsquo: '’',
+ rsquor: '’',
+ rthree: '⋌',
+ rtimes: '⋊',
+ rtri: '▹',
+ rtrie: '⊵',
+ rtrif: '▸',
+ rtriltri: '⧎',
+ ruluhar: '⥨',
+ rx: '℞',
+ sacute: 'ś',
+ sbquo: '‚',
+ sc: '≻',
+ scE: '⪴',
+ scap: '⪸',
+ scaron: 'š',
+ sccue: '≽',
+ sce: '⪰',
+ scedil: 'ş',
+ scirc: 'ŝ',
+ scnE: '⪶',
+ scnap: '⪺',
+ scnsim: '⋩',
+ scpolint: '⨓',
+ scsim: '≿',
+ scy: 'с',
+ sdot: '⋅',
+ sdotb: '⊡',
+ sdote: '⩦',
+ seArr: '⇘',
+ searhk: '⤥',
+ searr: '↘',
+ searrow: '↘',
+ sect: '§',
+ semi: ';',
+ seswar: '⤩',
+ setminus: '∖',
+ setmn: '∖',
+ sext: '✶',
+ sfr: '𝔰',
+ sfrown: '⌢',
+ sharp: '♯',
+ shchcy: 'щ',
+ shcy: 'ш',
+ shortmid: '∣',
+ shortparallel: '∥',
+ shy: '',
+ sigma: 'σ',
+ sigmaf: 'ς',
+ sigmav: 'ς',
+ sim: '∼',
+ simdot: '⩪',
+ sime: '≃',
+ simeq: '≃',
+ simg: '⪞',
+ simgE: '⪠',
+ siml: '⪝',
+ simlE: '⪟',
+ simne: '≆',
+ simplus: '⨤',
+ simrarr: '⥲',
+ slarr: '←',
+ smallsetminus: '∖',
+ smashp: '⨳',
+ smeparsl: '⧤',
+ smid: '∣',
+ smile: '⌣',
+ smt: '⪪',
+ smte: '⪬',
+ smtes: '⪬︀',
+ softcy: 'ь',
+ sol: '/',
+ solb: '⧄',
+ solbar: '⌿',
+ sopf: '𝕤',
+ spades: '♠',
+ spadesuit: '♠',
+ spar: '∥',
+ sqcap: '⊓',
+ sqcaps: '⊓︀',
+ sqcup: '⊔',
+ sqcups: '⊔︀',
+ sqsub: '⊏',
+ sqsube: '⊑',
+ sqsubset: '⊏',
+ sqsubseteq: '⊑',
+ sqsup: '⊐',
+ sqsupe: '⊒',
+ sqsupset: '⊐',
+ sqsupseteq: '⊒',
+ squ: '□',
+ square: '□',
+ squarf: '▪',
+ squf: '▪',
+ srarr: '→',
+ sscr: '𝓈',
+ ssetmn: '∖',
+ ssmile: '⌣',
+ sstarf: '⋆',
+ star: '☆',
+ starf: '★',
+ straightepsilon: 'ϵ',
+ straightphi: 'ϕ',
+ strns: '¯',
+ sub: '⊂',
+ subE: '⫅',
+ subdot: '⪽',
+ sube: '⊆',
+ subedot: '⫃',
+ submult: '⫁',
+ subnE: '⫋',
+ subne: '⊊',
+ subplus: '⪿',
+ subrarr: '⥹',
+ subset: '⊂',
+ subseteq: '⊆',
+ subseteqq: '⫅',
+ subsetneq: '⊊',
+ subsetneqq: '⫋',
+ subsim: '⫇',
+ subsub: '⫕',
+ subsup: '⫓',
+ succ: '≻',
+ succapprox: '⪸',
+ succcurlyeq: '≽',
+ succeq: '⪰',
+ succnapprox: '⪺',
+ succneqq: '⪶',
+ succnsim: '⋩',
+ succsim: '≿',
+ sum: '∑',
+ sung: '♪',
+ sup1: '¹',
+ sup2: '²',
+ sup3: '³',
+ sup: '⊃',
+ supE: '⫆',
+ supdot: '⪾',
+ supdsub: '⫘',
+ supe: '⊇',
+ supedot: '⫄',
+ suphsol: '⟉',
+ suphsub: '⫗',
+ suplarr: '⥻',
+ supmult: '⫂',
+ supnE: '⫌',
+ supne: '⊋',
+ supplus: '⫀',
+ supset: '⊃',
+ supseteq: '⊇',
+ supseteqq: '⫆',
+ supsetneq: '⊋',
+ supsetneqq: '⫌',
+ supsim: '⫈',
+ supsub: '⫔',
+ supsup: '⫖',
+ swArr: '⇙',
+ swarhk: '⤦',
+ swarr: '↙',
+ swarrow: '↙',
+ swnwar: '⤪',
+ szlig: 'ß',
+ target: '⌖',
+ tau: 'τ',
+ tbrk: '⎴',
+ tcaron: 'ť',
+ tcedil: 'ţ',
+ tcy: 'т',
+ tdot: '⃛',
+ telrec: '⌕',
+ tfr: '𝔱',
+ there4: '∴',
+ therefore: '∴',
+ theta: 'θ',
+ thetasym: 'ϑ',
+ thetav: 'ϑ',
+ thickapprox: '≈',
+ thicksim: '∼',
+ thinsp: ' ',
+ thkap: '≈',
+ thksim: '∼',
+ thorn: 'þ',
+ tilde: '˜',
+ times: '×',
+ timesb: '⊠',
+ timesbar: '⨱',
+ timesd: '⨰',
+ tint: '∭',
+ toea: '⤨',
+ top: '⊤',
+ topbot: '⌶',
+ topcir: '⫱',
+ topf: '𝕥',
+ topfork: '⫚',
+ tosa: '⤩',
+ tprime: '‴',
+ trade: '™',
+ triangle: '▵',
+ triangledown: '▿',
+ triangleleft: '◃',
+ trianglelefteq: '⊴',
+ triangleq: '≜',
+ triangleright: '▹',
+ trianglerighteq: '⊵',
+ tridot: '◬',
+ trie: '≜',
+ triminus: '⨺',
+ triplus: '⨹',
+ trisb: '⧍',
+ tritime: '⨻',
+ trpezium: '⏢',
+ tscr: '𝓉',
+ tscy: 'ц',
+ tshcy: 'ћ',
+ tstrok: 'ŧ',
+ twixt: '≬',
+ twoheadleftarrow: '↞',
+ twoheadrightarrow: '↠',
+ uArr: '⇑',
+ uHar: '⥣',
+ uacute: 'ú',
+ uarr: '↑',
+ ubrcy: 'ў',
+ ubreve: 'ŭ',
+ ucirc: 'û',
+ ucy: 'у',
+ udarr: '⇅',
+ udblac: 'ű',
+ udhar: '⥮',
+ ufisht: '⥾',
+ ufr: '𝔲',
+ ugrave: 'ù',
+ uharl: '↿',
+ uharr: '↾',
+ uhblk: '▀',
+ ulcorn: '⌜',
+ ulcorner: '⌜',
+ ulcrop: '⌏',
+ ultri: '◸',
+ umacr: 'ū',
+ uml: '¨',
+ uogon: 'ų',
+ uopf: '𝕦',
+ uparrow: '↑',
+ updownarrow: '↕',
+ upharpoonleft: '↿',
+ upharpoonright: '↾',
+ uplus: '⊎',
+ upsi: 'υ',
+ upsih: 'ϒ',
+ upsilon: 'υ',
+ upuparrows: '⇈',
+ urcorn: '⌝',
+ urcorner: '⌝',
+ urcrop: '⌎',
+ uring: 'ů',
+ urtri: '◹',
+ uscr: '𝓊',
+ utdot: '⋰',
+ utilde: 'ũ',
+ utri: '▵',
+ utrif: '▴',
+ uuarr: '⇈',
+ uuml: 'ü',
+ uwangle: '⦧',
+ vArr: '⇕',
+ vBar: '⫨',
+ vBarv: '⫩',
+ vDash: '⊨',
+ vangrt: '⦜',
+ varepsilon: 'ϵ',
+ varkappa: 'ϰ',
+ varnothing: '∅',
+ varphi: 'ϕ',
+ varpi: 'ϖ',
+ varpropto: '∝',
+ varr: '↕',
+ varrho: 'ϱ',
+ varsigma: 'ς',
+ varsubsetneq: '⊊︀',
+ varsubsetneqq: '⫋︀',
+ varsupsetneq: '⊋︀',
+ varsupsetneqq: '⫌︀',
+ vartheta: 'ϑ',
+ vartriangleleft: '⊲',
+ vartriangleright: '⊳',
+ vcy: 'в',
+ vdash: '⊢',
+ vee: '∨',
+ veebar: '⊻',
+ veeeq: '≚',
+ vellip: '⋮',
+ verbar: '|',
+ vert: '|',
+ vfr: '𝔳',
+ vltri: '⊲',
+ vnsub: '⊂⃒',
+ vnsup: '⊃⃒',
+ vopf: '𝕧',
+ vprop: '∝',
+ vrtri: '⊳',
+ vscr: '𝓋',
+ vsubnE: '⫋︀',
+ vsubne: '⊊︀',
+ vsupnE: '⫌︀',
+ vsupne: '⊋︀',
+ vzigzag: '⦚',
+ wcirc: 'ŵ',
+ wedbar: '⩟',
+ wedge: '∧',
+ wedgeq: '≙',
+ weierp: '℘',
+ wfr: '𝔴',
+ wopf: '𝕨',
+ wp: '℘',
+ wr: '≀',
+ wreath: '≀',
+ wscr: '𝓌',
+ xcap: '⋂',
+ xcirc: '◯',
+ xcup: '⋃',
+ xdtri: '▽',
+ xfr: '𝔵',
+ xhArr: '⟺',
+ xharr: '⟷',
+ xi: 'ξ',
+ xlArr: '⟸',
+ xlarr: '⟵',
+ xmap: '⟼',
+ xnis: '⋻',
+ xodot: '⨀',
+ xopf: '𝕩',
+ xoplus: '⨁',
+ xotime: '⨂',
+ xrArr: '⟹',
+ xrarr: '⟶',
+ xscr: '𝓍',
+ xsqcup: '⨆',
+ xuplus: '⨄',
+ xutri: '△',
+ xvee: '⋁',
+ xwedge: '⋀',
+ yacute: 'ý',
+ yacy: 'я',
+ ycirc: 'ŷ',
+ ycy: 'ы',
+ yen: '¥',
+ yfr: '𝔶',
+ yicy: 'ї',
+ yopf: '𝕪',
+ yscr: '𝓎',
+ yucy: 'ю',
+ yuml: 'ÿ',
+ zacute: 'ź',
+ zcaron: 'ž',
+ zcy: 'з',
+ zdot: 'ż',
+ zeetrf: 'ℨ',
+ zeta: 'ζ',
+ zfr: '𝔷',
+ zhcy: 'ж',
+ zigrarr: '⇝',
+ zopf: '𝕫',
+ zscr: '𝓏',
+ zwj: '',
+ zwnj: ''
+}
+
+;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js
+
+
+const own = {}.hasOwnProperty
+
+/**
+ * Decode a single character reference (without the `&` or `;`).
+ * You probably only need this when you’re building parsers yourself that follow
+ * different rules compared to HTML.
+ * This is optimized to be tiny in browsers.
+ *
+ * @param {string} value
+ * `notin` (named), `#123` (deci), `#x123` (hexa).
+ * @returns {string|false}
+ * Decoded reference.
+ */
+function decodeNamedCharacterReference(value) {
+ return own.call(characterEntities, value) ? characterEntities[value] : false
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const characterReference = {
+ name: 'characterReference',
+ tokenize: tokenizeCharacterReference
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeCharacterReference(effects, ok, nok) {
+ const self = this
+ let size = 0
+ /** @type {number} */
+ let max
+ /** @type {(code: Code) => boolean} */
+ let test
+ return start
+
+ /**
+ * Start of character reference.
+ *
+ * ```markdown
+ * > | a&b
+ * ^
+ * > | a{b
+ * ^
+ * > | a b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('characterReference')
+ effects.enter('characterReferenceMarker')
+ effects.consume(code)
+ effects.exit('characterReferenceMarker')
+ return open
+ }
+
+ /**
+ * After `&`, at `#` for numeric references or alphanumeric for named
+ * references.
+ *
+ * ```markdown
+ * > | a&b
+ * ^
+ * > | a{b
+ * ^
+ * > | a b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function open(code) {
+ if (code === 35) {
+ effects.enter('characterReferenceMarkerNumeric')
+ effects.consume(code)
+ effects.exit('characterReferenceMarkerNumeric')
+ return numeric
+ }
+ effects.enter('characterReferenceValue')
+ max = 31
+ test = asciiAlphanumeric
+ return value(code)
+ }
+
+ /**
+ * After `#`, at `x` for hexadecimals or digit for decimals.
+ *
+ * ```markdown
+ * > | a{b
+ * ^
+ * > | a b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function numeric(code) {
+ if (code === 88 || code === 120) {
+ effects.enter('characterReferenceMarkerHexadecimal')
+ effects.consume(code)
+ effects.exit('characterReferenceMarkerHexadecimal')
+ effects.enter('characterReferenceValue')
+ max = 6
+ test = asciiHexDigit
+ return value
+ }
+ effects.enter('characterReferenceValue')
+ max = 7
+ test = asciiDigit
+ return value(code)
+ }
+
+ /**
+ * After markers (``, ``, or `&`), in value, before `;`.
+ *
+ * The character reference kind defines what and how many characters are
+ * allowed.
+ *
+ * ```markdown
+ * > | a&b
+ * ^^^
+ * > | a{b
+ * ^^^
+ * > | a b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function value(code) {
+ if (code === 59 && size) {
+ const token = effects.exit('characterReferenceValue')
+ if (
+ test === asciiAlphanumeric &&
+ !decodeNamedCharacterReference(self.sliceSerialize(token))
+ ) {
+ return nok(code)
+ }
+
+ // To do: `markdown-rs` uses a different name:
+ // `CharacterReferenceMarkerSemi`.
+ effects.enter('characterReferenceMarker')
+ effects.consume(code)
+ effects.exit('characterReferenceMarker')
+ effects.exit('characterReference')
+ return ok
+ }
+ if (test(code) && size++ < max) {
+ effects.consume(code)
+ return value
+ }
+ return nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+/** @type {Construct} */
+const characterEscape = {
+ name: 'characterEscape',
+ tokenize: tokenizeCharacterEscape
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeCharacterEscape(effects, ok, nok) {
+ return start
+
+ /**
+ * Start of character escape.
+ *
+ * ```markdown
+ * > | a\*b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('characterEscape')
+ effects.enter('escapeMarker')
+ effects.consume(code)
+ effects.exit('escapeMarker')
+ return inside
+ }
+
+ /**
+ * After `\`, at punctuation.
+ *
+ * ```markdown
+ * > | a\*b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function inside(code) {
+ // ASCII punctuation.
+ if (asciiPunctuation(code)) {
+ effects.enter('characterEscapeValue')
+ effects.consume(code)
+ effects.exit('characterEscapeValue')
+ effects.exit('characterEscape')
+ return ok
+ }
+ return nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const lineEnding = {
+ name: 'lineEnding',
+ tokenize: tokenizeLineEnding
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeLineEnding(effects, ok) {
+ return start
+
+ /** @type {State} */
+ function start(code) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return factorySpace(effects, ok, 'linePrefix')
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').Event} Event
+ * @typedef {import('micromark-util-types').Resolver} Resolver
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+
+
+
+
+
+
+/** @type {Construct} */
+const labelEnd = {
+ name: 'labelEnd',
+ tokenize: tokenizeLabelEnd,
+ resolveTo: resolveToLabelEnd,
+ resolveAll: resolveAllLabelEnd
+}
+
+/** @type {Construct} */
+const resourceConstruct = {
+ tokenize: tokenizeResource
+}
+/** @type {Construct} */
+const referenceFullConstruct = {
+ tokenize: tokenizeReferenceFull
+}
+/** @type {Construct} */
+const referenceCollapsedConstruct = {
+ tokenize: tokenizeReferenceCollapsed
+}
+
+/** @type {Resolver} */
+function resolveAllLabelEnd(events) {
+ let index = -1
+ while (++index < events.length) {
+ const token = events[index][1]
+ if (
+ token.type === 'labelImage' ||
+ token.type === 'labelLink' ||
+ token.type === 'labelEnd'
+ ) {
+ // Remove the marker.
+ events.splice(index + 1, token.type === 'labelImage' ? 4 : 2)
+ token.type = 'data'
+ index++
+ }
+ }
+ return events
+}
+
+/** @type {Resolver} */
+function resolveToLabelEnd(events, context) {
+ let index = events.length
+ let offset = 0
+ /** @type {Token} */
+ let token
+ /** @type {number | undefined} */
+ let open
+ /** @type {number | undefined} */
+ let close
+ /** @type {Array} */
+ let media
+
+ // Find an opening.
+ while (index--) {
+ token = events[index][1]
+ if (open) {
+ // If we see another link, or inactive link label, we’ve been here before.
+ if (
+ token.type === 'link' ||
+ (token.type === 'labelLink' && token._inactive)
+ ) {
+ break
+ }
+
+ // Mark other link openings as inactive, as we can’t have links in
+ // links.
+ if (events[index][0] === 'enter' && token.type === 'labelLink') {
+ token._inactive = true
+ }
+ } else if (close) {
+ if (
+ events[index][0] === 'enter' &&
+ (token.type === 'labelImage' || token.type === 'labelLink') &&
+ !token._balanced
+ ) {
+ open = index
+ if (token.type !== 'labelLink') {
+ offset = 2
+ break
+ }
+ }
+ } else if (token.type === 'labelEnd') {
+ close = index
+ }
+ }
+ const group = {
+ type: events[open][1].type === 'labelLink' ? 'link' : 'image',
+ start: Object.assign({}, events[open][1].start),
+ end: Object.assign({}, events[events.length - 1][1].end)
+ }
+ const label = {
+ type: 'label',
+ start: Object.assign({}, events[open][1].start),
+ end: Object.assign({}, events[close][1].end)
+ }
+ const text = {
+ type: 'labelText',
+ start: Object.assign({}, events[open + offset + 2][1].end),
+ end: Object.assign({}, events[close - 2][1].start)
+ }
+ media = [
+ ['enter', group, context],
+ ['enter', label, context]
+ ]
+
+ // Opening marker.
+ media = push(media, events.slice(open + 1, open + offset + 3))
+
+ // Text open.
+ media = push(media, [['enter', text, context]])
+
+ // Always populated by defaults.
+
+ // Between.
+ media = push(
+ media,
+ resolveAll(
+ context.parser.constructs.insideSpan.null,
+ events.slice(open + offset + 4, close - 3),
+ context
+ )
+ )
+
+ // Text close, marker close, label close.
+ media = push(media, [
+ ['exit', text, context],
+ events[close - 2],
+ events[close - 1],
+ ['exit', label, context]
+ ])
+
+ // Reference, resource, or so.
+ media = push(media, events.slice(close + 1))
+
+ // Media close.
+ media = push(media, [['exit', group, context]])
+ splice(events, open, events.length, media)
+ return events
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeLabelEnd(effects, ok, nok) {
+ const self = this
+ let index = self.events.length
+ /** @type {Token} */
+ let labelStart
+ /** @type {boolean} */
+ let defined
+
+ // Find an opening.
+ while (index--) {
+ if (
+ (self.events[index][1].type === 'labelImage' ||
+ self.events[index][1].type === 'labelLink') &&
+ !self.events[index][1]._balanced
+ ) {
+ labelStart = self.events[index][1]
+ break
+ }
+ }
+ return start
+
+ /**
+ * Start of label end.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * > | [a][b] c
+ * ^
+ * > | [a][] b
+ * ^
+ * > | [a] b
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ // If there is not an okay opening.
+ if (!labelStart) {
+ return nok(code)
+ }
+
+ // If the corresponding label (link) start is marked as inactive,
+ // it means we’d be wrapping a link, like this:
+ //
+ // ```markdown
+ // > | a [b [c](d) e](f) g.
+ // ^
+ // ```
+ //
+ // We can’t have that, so it’s just balanced brackets.
+ if (labelStart._inactive) {
+ return labelEndNok(code)
+ }
+ defined = self.parser.defined.includes(
+ normalizeIdentifier(
+ self.sliceSerialize({
+ start: labelStart.end,
+ end: self.now()
+ })
+ )
+ )
+ effects.enter('labelEnd')
+ effects.enter('labelMarker')
+ effects.consume(code)
+ effects.exit('labelMarker')
+ effects.exit('labelEnd')
+ return after
+ }
+
+ /**
+ * After `]`.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * > | [a][b] c
+ * ^
+ * > | [a][] b
+ * ^
+ * > | [a] b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function after(code) {
+ // Note: `markdown-rs` also parses GFM footnotes here, which for us is in
+ // an extension.
+
+ // Resource (`[asd](fgh)`)?
+ if (code === 40) {
+ return effects.attempt(
+ resourceConstruct,
+ labelEndOk,
+ defined ? labelEndOk : labelEndNok
+ )(code)
+ }
+
+ // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?
+ if (code === 91) {
+ return effects.attempt(
+ referenceFullConstruct,
+ labelEndOk,
+ defined ? referenceNotFull : labelEndNok
+ )(code)
+ }
+
+ // Shortcut (`[asd]`) reference?
+ return defined ? labelEndOk(code) : labelEndNok(code)
+ }
+
+ /**
+ * After `]`, at `[`, but not at a full reference.
+ *
+ * > 👉 **Note**: we only get here if the label is defined.
+ *
+ * ```markdown
+ * > | [a][] b
+ * ^
+ * > | [a] b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function referenceNotFull(code) {
+ return effects.attempt(
+ referenceCollapsedConstruct,
+ labelEndOk,
+ labelEndNok
+ )(code)
+ }
+
+ /**
+ * Done, we found something.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * > | [a][b] c
+ * ^
+ * > | [a][] b
+ * ^
+ * > | [a] b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function labelEndOk(code) {
+ // Note: `markdown-rs` does a bunch of stuff here.
+ return ok(code)
+ }
+
+ /**
+ * Done, it’s nothing.
+ *
+ * There was an okay opening, but we didn’t match anything.
+ *
+ * ```markdown
+ * > | [a](b c
+ * ^
+ * > | [a][b c
+ * ^
+ * > | [a] b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function labelEndNok(code) {
+ labelStart._balanced = true
+ return nok(code)
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeResource(effects, ok, nok) {
+ return resourceStart
+
+ /**
+ * At a resource.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceStart(code) {
+ effects.enter('resource')
+ effects.enter('resourceMarker')
+ effects.consume(code)
+ effects.exit('resourceMarker')
+ return resourceBefore
+ }
+
+ /**
+ * In resource, after `(`, at optional whitespace.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceBefore(code) {
+ return markdownLineEndingOrSpace(code)
+ ? factoryWhitespace(effects, resourceOpen)(code)
+ : resourceOpen(code)
+ }
+
+ /**
+ * In resource, after optional whitespace, at `)` or a destination.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceOpen(code) {
+ if (code === 41) {
+ return resourceEnd(code)
+ }
+ return factoryDestination(
+ effects,
+ resourceDestinationAfter,
+ resourceDestinationMissing,
+ 'resourceDestination',
+ 'resourceDestinationLiteral',
+ 'resourceDestinationLiteralMarker',
+ 'resourceDestinationRaw',
+ 'resourceDestinationString',
+ 32
+ )(code)
+ }
+
+ /**
+ * In resource, after destination, at optional whitespace.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceDestinationAfter(code) {
+ return markdownLineEndingOrSpace(code)
+ ? factoryWhitespace(effects, resourceBetween)(code)
+ : resourceEnd(code)
+ }
+
+ /**
+ * At invalid destination.
+ *
+ * ```markdown
+ * > | [a](<<) b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceDestinationMissing(code) {
+ return nok(code)
+ }
+
+ /**
+ * In resource, after destination and whitespace, at `(` or title.
+ *
+ * ```markdown
+ * > | [a](b ) c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceBetween(code) {
+ if (code === 34 || code === 39 || code === 40) {
+ return factoryTitle(
+ effects,
+ resourceTitleAfter,
+ nok,
+ 'resourceTitle',
+ 'resourceTitleMarker',
+ 'resourceTitleString'
+ )(code)
+ }
+ return resourceEnd(code)
+ }
+
+ /**
+ * In resource, after title, at optional whitespace.
+ *
+ * ```markdown
+ * > | [a](b "c") d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceTitleAfter(code) {
+ return markdownLineEndingOrSpace(code)
+ ? factoryWhitespace(effects, resourceEnd)(code)
+ : resourceEnd(code)
+ }
+
+ /**
+ * In resource, at `)`.
+ *
+ * ```markdown
+ * > | [a](b) d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceEnd(code) {
+ if (code === 41) {
+ effects.enter('resourceMarker')
+ effects.consume(code)
+ effects.exit('resourceMarker')
+ effects.exit('resource')
+ return ok
+ }
+ return nok(code)
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeReferenceFull(effects, ok, nok) {
+ const self = this
+ return referenceFull
+
+ /**
+ * In a reference (full), at the `[`.
+ *
+ * ```markdown
+ * > | [a][b] d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function referenceFull(code) {
+ return factoryLabel.call(
+ self,
+ effects,
+ referenceFullAfter,
+ referenceFullMissing,
+ 'reference',
+ 'referenceMarker',
+ 'referenceString'
+ )(code)
+ }
+
+ /**
+ * In a reference (full), after `]`.
+ *
+ * ```markdown
+ * > | [a][b] d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function referenceFullAfter(code) {
+ return self.parser.defined.includes(
+ normalizeIdentifier(
+ self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)
+ )
+ )
+ ? ok(code)
+ : nok(code)
+ }
+
+ /**
+ * In reference (full) that was missing.
+ *
+ * ```markdown
+ * > | [a][b d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function referenceFullMissing(code) {
+ return nok(code)
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeReferenceCollapsed(effects, ok, nok) {
+ return referenceCollapsedStart
+
+ /**
+ * In reference (collapsed), at `[`.
+ *
+ * > 👉 **Note**: we only get here if the label is defined.
+ *
+ * ```markdown
+ * > | [a][] d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function referenceCollapsedStart(code) {
+ // We only attempt a collapsed label if there’s a `[`.
+
+ effects.enter('reference')
+ effects.enter('referenceMarker')
+ effects.consume(code)
+ effects.exit('referenceMarker')
+ return referenceCollapsedOpen
+ }
+
+ /**
+ * In reference (collapsed), at `]`.
+ *
+ * > 👉 **Note**: we only get here if the label is defined.
+ *
+ * ```markdown
+ * > | [a][] d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function referenceCollapsedOpen(code) {
+ if (code === 93) {
+ effects.enter('referenceMarker')
+ effects.consume(code)
+ effects.exit('referenceMarker')
+ effects.exit('reference')
+ return ok
+ }
+ return nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const labelStartImage = {
+ name: 'labelStartImage',
+ tokenize: tokenizeLabelStartImage,
+ resolveAll: labelEnd.resolveAll
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeLabelStartImage(effects, ok, nok) {
+ const self = this
+ return start
+
+ /**
+ * Start of label (image) start.
+ *
+ * ```markdown
+ * > | a ![b] c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('labelImage')
+ effects.enter('labelImageMarker')
+ effects.consume(code)
+ effects.exit('labelImageMarker')
+ return open
+ }
+
+ /**
+ * After `!`, at `[`.
+ *
+ * ```markdown
+ * > | a ![b] c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function open(code) {
+ if (code === 91) {
+ effects.enter('labelMarker')
+ effects.consume(code)
+ effects.exit('labelMarker')
+ effects.exit('labelImage')
+ return after
+ }
+ return nok(code)
+ }
+
+ /**
+ * After `![`.
+ *
+ * ```markdown
+ * > | a ![b] c
+ * ^
+ * ```
+ *
+ * This is needed in because, when GFM footnotes are enabled, images never
+ * form when started with a `^`.
+ * Instead, links form:
+ *
+ * ```markdown
+ * ![^a](b)
+ *
+ * ![^a][b]
+ *
+ * [b]: c
+ * ```
+ *
+ * ```html
+ * !^a
+ * !^a
+ * ```
+ *
+ * @type {State}
+ */
+ function after(code) {
+ // To do: use a new field to do this, this is still needed for
+ // `micromark-extension-gfm-footnote`, but the `label-start-link`
+ // behavior isn’t.
+ // Hidden footnotes hook.
+ /* c8 ignore next 3 */
+ return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs
+ ? nok(code)
+ : ok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ */
+
+
+/**
+ * Classify whether a code represents whitespace, punctuation, or something
+ * else.
+ *
+ * Used for attention (emphasis, strong), whose sequences can open or close
+ * based on the class of surrounding characters.
+ *
+ * > 👉 **Note**: eof (`null`) is seen as whitespace.
+ *
+ * @param {Code} code
+ * Code.
+ * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}
+ * Group.
+ */
+function classifyCharacter(code) {
+ if (
+ code === null ||
+ markdownLineEndingOrSpace(code) ||
+ unicodeWhitespace(code)
+ ) {
+ return 1
+ }
+ if (unicodePunctuation(code)) {
+ return 2
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').Event} Event
+ * @typedef {import('micromark-util-types').Point} Point
+ * @typedef {import('micromark-util-types').Resolver} Resolver
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+
+/** @type {Construct} */
+const attention = {
+ name: 'attention',
+ tokenize: tokenizeAttention,
+ resolveAll: resolveAllAttention
+}
+
+/**
+ * Take all events and resolve attention to emphasis or strong.
+ *
+ * @type {Resolver}
+ */
+function resolveAllAttention(events, context) {
+ let index = -1
+ /** @type {number} */
+ let open
+ /** @type {Token} */
+ let group
+ /** @type {Token} */
+ let text
+ /** @type {Token} */
+ let openingSequence
+ /** @type {Token} */
+ let closingSequence
+ /** @type {number} */
+ let use
+ /** @type {Array} */
+ let nextEvents
+ /** @type {number} */
+ let offset
+
+ // Walk through all events.
+ //
+ // Note: performance of this is fine on an mb of normal markdown, but it’s
+ // a bottleneck for malicious stuff.
+ while (++index < events.length) {
+ // Find a token that can close.
+ if (
+ events[index][0] === 'enter' &&
+ events[index][1].type === 'attentionSequence' &&
+ events[index][1]._close
+ ) {
+ open = index
+
+ // Now walk back to find an opener.
+ while (open--) {
+ // Find a token that can open the closer.
+ if (
+ events[open][0] === 'exit' &&
+ events[open][1].type === 'attentionSequence' &&
+ events[open][1]._open &&
+ // If the markers are the same:
+ context.sliceSerialize(events[open][1]).charCodeAt(0) ===
+ context.sliceSerialize(events[index][1]).charCodeAt(0)
+ ) {
+ // If the opening can close or the closing can open,
+ // and the close size *is not* a multiple of three,
+ // but the sum of the opening and closing size *is* multiple of three,
+ // then don’t match.
+ if (
+ (events[open][1]._close || events[index][1]._open) &&
+ (events[index][1].end.offset - events[index][1].start.offset) % 3 &&
+ !(
+ (events[open][1].end.offset -
+ events[open][1].start.offset +
+ events[index][1].end.offset -
+ events[index][1].start.offset) %
+ 3
+ )
+ ) {
+ continue
+ }
+
+ // Number of markers to use from the sequence.
+ use =
+ events[open][1].end.offset - events[open][1].start.offset > 1 &&
+ events[index][1].end.offset - events[index][1].start.offset > 1
+ ? 2
+ : 1
+ const start = Object.assign({}, events[open][1].end)
+ const end = Object.assign({}, events[index][1].start)
+ movePoint(start, -use)
+ movePoint(end, use)
+ openingSequence = {
+ type: use > 1 ? 'strongSequence' : 'emphasisSequence',
+ start,
+ end: Object.assign({}, events[open][1].end)
+ }
+ closingSequence = {
+ type: use > 1 ? 'strongSequence' : 'emphasisSequence',
+ start: Object.assign({}, events[index][1].start),
+ end
+ }
+ text = {
+ type: use > 1 ? 'strongText' : 'emphasisText',
+ start: Object.assign({}, events[open][1].end),
+ end: Object.assign({}, events[index][1].start)
+ }
+ group = {
+ type: use > 1 ? 'strong' : 'emphasis',
+ start: Object.assign({}, openingSequence.start),
+ end: Object.assign({}, closingSequence.end)
+ }
+ events[open][1].end = Object.assign({}, openingSequence.start)
+ events[index][1].start = Object.assign({}, closingSequence.end)
+ nextEvents = []
+
+ // If there are more markers in the opening, add them before.
+ if (events[open][1].end.offset - events[open][1].start.offset) {
+ nextEvents = push(nextEvents, [
+ ['enter', events[open][1], context],
+ ['exit', events[open][1], context]
+ ])
+ }
+
+ // Opening.
+ nextEvents = push(nextEvents, [
+ ['enter', group, context],
+ ['enter', openingSequence, context],
+ ['exit', openingSequence, context],
+ ['enter', text, context]
+ ])
+
+ // Always populated by defaults.
+
+ // Between.
+ nextEvents = push(
+ nextEvents,
+ resolveAll(
+ context.parser.constructs.insideSpan.null,
+ events.slice(open + 1, index),
+ context
+ )
+ )
+
+ // Closing.
+ nextEvents = push(nextEvents, [
+ ['exit', text, context],
+ ['enter', closingSequence, context],
+ ['exit', closingSequence, context],
+ ['exit', group, context]
+ ])
+
+ // If there are more markers in the closing, add them after.
+ if (events[index][1].end.offset - events[index][1].start.offset) {
+ offset = 2
+ nextEvents = push(nextEvents, [
+ ['enter', events[index][1], context],
+ ['exit', events[index][1], context]
+ ])
+ } else {
+ offset = 0
+ }
+ splice(events, open - 1, index - open + 3, nextEvents)
+ index = open + nextEvents.length - offset - 2
+ break
+ }
+ }
+ }
+ }
+
+ // Remove remaining sequences.
+ index = -1
+ while (++index < events.length) {
+ if (events[index][1].type === 'attentionSequence') {
+ events[index][1].type = 'data'
+ }
+ }
+ return events
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeAttention(effects, ok) {
+ const attentionMarkers = this.parser.constructs.attentionMarkers.null
+ const previous = this.previous
+ const before = classifyCharacter(previous)
+
+ /** @type {NonNullable} */
+ let marker
+ return start
+
+ /**
+ * Before a sequence.
+ *
+ * ```markdown
+ * > | **
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ marker = code
+ effects.enter('attentionSequence')
+ return inside(code)
+ }
+
+ /**
+ * In a sequence.
+ *
+ * ```markdown
+ * > | **
+ * ^^
+ * ```
+ *
+ * @type {State}
+ */
+ function inside(code) {
+ if (code === marker) {
+ effects.consume(code)
+ return inside
+ }
+ const token = effects.exit('attentionSequence')
+
+ // To do: next major: move this to resolver, just like `markdown-rs`.
+ const after = classifyCharacter(code)
+
+ // Always populated by defaults.
+
+ const open =
+ !after || (after === 2 && before) || attentionMarkers.includes(code)
+ const close =
+ !before || (before === 2 && after) || attentionMarkers.includes(previous)
+ token._open = Boolean(marker === 42 ? open : open && (before || !close))
+ token._close = Boolean(marker === 42 ? close : close && (after || !open))
+ return ok(code)
+ }
+}
+
+/**
+ * Move a point a bit.
+ *
+ * Note: `move` only works inside lines! It’s not possible to move past other
+ * chunks (replacement characters, tabs, or line endings).
+ *
+ * @param {Point} point
+ * @param {number} offset
+ * @returns {void}
+ */
+function movePoint(point, offset) {
+ point.column += offset
+ point.offset += offset
+ point._bufferIndex += offset
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+/** @type {Construct} */
+const autolink = {
+ name: 'autolink',
+ tokenize: tokenizeAutolink
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeAutolink(effects, ok, nok) {
+ let size = 0
+ return start
+
+ /**
+ * Start of an autolink.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('autolink')
+ effects.enter('autolinkMarker')
+ effects.consume(code)
+ effects.exit('autolinkMarker')
+ effects.enter('autolinkProtocol')
+ return open
+ }
+
+ /**
+ * After `<`, at protocol or atext.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function open(code) {
+ if (asciiAlpha(code)) {
+ effects.consume(code)
+ return schemeOrEmailAtext
+ }
+ return emailAtext(code)
+ }
+
+ /**
+ * At second byte of protocol or atext.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function schemeOrEmailAtext(code) {
+ // ASCII alphanumeric and `+`, `-`, and `.`.
+ if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {
+ // Count the previous alphabetical from `open` too.
+ size = 1
+ return schemeInsideOrEmailAtext(code)
+ }
+ return emailAtext(code)
+ }
+
+ /**
+ * In ambiguous protocol or atext.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function schemeInsideOrEmailAtext(code) {
+ if (code === 58) {
+ effects.consume(code)
+ size = 0
+ return urlInside
+ }
+
+ // ASCII alphanumeric and `+`, `-`, and `.`.
+ if (
+ (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) &&
+ size++ < 32
+ ) {
+ effects.consume(code)
+ return schemeInsideOrEmailAtext
+ }
+ size = 0
+ return emailAtext(code)
+ }
+
+ /**
+ * After protocol, in URL.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function urlInside(code) {
+ if (code === 62) {
+ effects.exit('autolinkProtocol')
+ effects.enter('autolinkMarker')
+ effects.consume(code)
+ effects.exit('autolinkMarker')
+ effects.exit('autolink')
+ return ok
+ }
+
+ // ASCII control, space, or `<`.
+ if (code === null || code === 32 || code === 60 || asciiControl(code)) {
+ return nok(code)
+ }
+ effects.consume(code)
+ return urlInside
+ }
+
+ /**
+ * In email atext.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function emailAtext(code) {
+ if (code === 64) {
+ effects.consume(code)
+ return emailAtSignOrDot
+ }
+ if (asciiAtext(code)) {
+ effects.consume(code)
+ return emailAtext
+ }
+ return nok(code)
+ }
+
+ /**
+ * In label, after at-sign or dot.
+ *
+ * ```markdown
+ * > | ab
+ * ^ ^
+ * ```
+ *
+ * @type {State}
+ */
+ function emailAtSignOrDot(code) {
+ return asciiAlphanumeric(code) ? emailLabel(code) : nok(code)
+ }
+
+ /**
+ * In label, where `.` and `>` are allowed.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function emailLabel(code) {
+ if (code === 46) {
+ effects.consume(code)
+ size = 0
+ return emailAtSignOrDot
+ }
+ if (code === 62) {
+ // Exit, then change the token type.
+ effects.exit('autolinkProtocol').type = 'autolinkEmail'
+ effects.enter('autolinkMarker')
+ effects.consume(code)
+ effects.exit('autolinkMarker')
+ effects.exit('autolink')
+ return ok
+ }
+ return emailValue(code)
+ }
+
+ /**
+ * In label, where `.` and `>` are *not* allowed.
+ *
+ * Though, this is also used in `emailLabel` to parse other values.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function emailValue(code) {
+ // ASCII alphanumeric or `-`.
+ if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {
+ const next = code === 45 ? emailValue : emailLabel
+ effects.consume(code)
+ return next
+ }
+ return nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const htmlText = {
+ name: 'htmlText',
+ tokenize: tokenizeHtmlText
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeHtmlText(effects, ok, nok) {
+ const self = this
+ /** @type {NonNullable | undefined} */
+ let marker
+ /** @type {number} */
+ let index
+ /** @type {State} */
+ let returnState
+ return start
+
+ /**
+ * Start of HTML (text).
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('htmlText')
+ effects.enter('htmlTextData')
+ effects.consume(code)
+ return open
+ }
+
+ /**
+ * After `<`, at tag name or other stuff.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * > | a c
+ * ^
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function open(code) {
+ if (code === 33) {
+ effects.consume(code)
+ return declarationOpen
+ }
+ if (code === 47) {
+ effects.consume(code)
+ return tagCloseStart
+ }
+ if (code === 63) {
+ effects.consume(code)
+ return instruction
+ }
+
+ // ASCII alphabetical.
+ if (asciiAlpha(code)) {
+ effects.consume(code)
+ return tagOpen
+ }
+ return nok(code)
+ }
+
+ /**
+ * After ` | a c
+ * ^
+ * > | a c
+ * ^
+ * > | a &<]]> c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function declarationOpen(code) {
+ if (code === 45) {
+ effects.consume(code)
+ return commentOpenInside
+ }
+ if (code === 91) {
+ effects.consume(code)
+ index = 0
+ return cdataOpenInside
+ }
+ if (asciiAlpha(code)) {
+ effects.consume(code)
+ return declaration
+ }
+ return nok(code)
+ }
+
+ /**
+ * In a comment, after ` | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function commentOpenInside(code) {
+ if (code === 45) {
+ effects.consume(code)
+ return commentEnd
+ }
+ return nok(code)
+ }
+
+ /**
+ * In comment.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function comment(code) {
+ if (code === null) {
+ return nok(code)
+ }
+ if (code === 45) {
+ effects.consume(code)
+ return commentClose
+ }
+ if (markdownLineEnding(code)) {
+ returnState = comment
+ return lineEndingBefore(code)
+ }
+ effects.consume(code)
+ return comment
+ }
+
+ /**
+ * In comment, after `-`.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function commentClose(code) {
+ if (code === 45) {
+ effects.consume(code)
+ return commentEnd
+ }
+ return comment(code)
+ }
+
+ /**
+ * In comment, after `--`.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function commentEnd(code) {
+ return code === 62
+ ? end(code)
+ : code === 45
+ ? commentClose(code)
+ : comment(code)
+ }
+
+ /**
+ * After ` | a &<]]> b
+ * ^^^^^^
+ * ```
+ *
+ * @type {State}
+ */
+ function cdataOpenInside(code) {
+ const value = 'CDATA['
+ if (code === value.charCodeAt(index++)) {
+ effects.consume(code)
+ return index === value.length ? cdata : cdataOpenInside
+ }
+ return nok(code)
+ }
+
+ /**
+ * In CDATA.
+ *
+ * ```markdown
+ * > | a &<]]> b
+ * ^^^
+ * ```
+ *
+ * @type {State}
+ */
+ function cdata(code) {
+ if (code === null) {
+ return nok(code)
+ }
+ if (code === 93) {
+ effects.consume(code)
+ return cdataClose
+ }
+ if (markdownLineEnding(code)) {
+ returnState = cdata
+ return lineEndingBefore(code)
+ }
+ effects.consume(code)
+ return cdata
+ }
+
+ /**
+ * In CDATA, after `]`, at another `]`.
+ *
+ * ```markdown
+ * > | a &<]]> b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function cdataClose(code) {
+ if (code === 93) {
+ effects.consume(code)
+ return cdataEnd
+ }
+ return cdata(code)
+ }
+
+ /**
+ * In CDATA, after `]]`, at `>`.
+ *
+ * ```markdown
+ * > | a &<]]> b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function cdataEnd(code) {
+ if (code === 62) {
+ return end(code)
+ }
+ if (code === 93) {
+ effects.consume(code)
+ return cdataEnd
+ }
+ return cdata(code)
+ }
+
+ /**
+ * In declaration.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function declaration(code) {
+ if (code === null || code === 62) {
+ return end(code)
+ }
+ if (markdownLineEnding(code)) {
+ returnState = declaration
+ return lineEndingBefore(code)
+ }
+ effects.consume(code)
+ return declaration
+ }
+
+ /**
+ * In instruction.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function instruction(code) {
+ if (code === null) {
+ return nok(code)
+ }
+ if (code === 63) {
+ effects.consume(code)
+ return instructionClose
+ }
+ if (markdownLineEnding(code)) {
+ returnState = instruction
+ return lineEndingBefore(code)
+ }
+ effects.consume(code)
+ return instruction
+ }
+
+ /**
+ * In instruction, after `?`, at `>`.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function instructionClose(code) {
+ return code === 62 ? end(code) : instruction(code)
+ }
+
+ /**
+ * After ``, in closing tag, at tag name.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagCloseStart(code) {
+ // ASCII alphabetical.
+ if (asciiAlpha(code)) {
+ effects.consume(code)
+ return tagClose
+ }
+ return nok(code)
+ }
+
+ /**
+ * After ` | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagClose(code) {
+ // ASCII alphanumerical and `-`.
+ if (code === 45 || asciiAlphanumeric(code)) {
+ effects.consume(code)
+ return tagClose
+ }
+ return tagCloseBetween(code)
+ }
+
+ /**
+ * In closing tag, after tag name.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagCloseBetween(code) {
+ if (markdownLineEnding(code)) {
+ returnState = tagCloseBetween
+ return lineEndingBefore(code)
+ }
+ if (markdownSpace(code)) {
+ effects.consume(code)
+ return tagCloseBetween
+ }
+ return end(code)
+ }
+
+ /**
+ * After ` | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpen(code) {
+ // ASCII alphanumerical and `-`.
+ if (code === 45 || asciiAlphanumeric(code)) {
+ effects.consume(code)
+ return tagOpen
+ }
+ if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {
+ return tagOpenBetween(code)
+ }
+ return nok(code)
+ }
+
+ /**
+ * In opening tag, after tag name.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenBetween(code) {
+ if (code === 47) {
+ effects.consume(code)
+ return end
+ }
+
+ // ASCII alphabetical and `:` and `_`.
+ if (code === 58 || code === 95 || asciiAlpha(code)) {
+ effects.consume(code)
+ return tagOpenAttributeName
+ }
+ if (markdownLineEnding(code)) {
+ returnState = tagOpenBetween
+ return lineEndingBefore(code)
+ }
+ if (markdownSpace(code)) {
+ effects.consume(code)
+ return tagOpenBetween
+ }
+ return end(code)
+ }
+
+ /**
+ * In attribute name.
+ *
+ * ```markdown
+ * > | a d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenAttributeName(code) {
+ // ASCII alphabetical and `-`, `.`, `:`, and `_`.
+ if (
+ code === 45 ||
+ code === 46 ||
+ code === 58 ||
+ code === 95 ||
+ asciiAlphanumeric(code)
+ ) {
+ effects.consume(code)
+ return tagOpenAttributeName
+ }
+ return tagOpenAttributeNameAfter(code)
+ }
+
+ /**
+ * After attribute name, before initializer, the end of the tag, or
+ * whitespace.
+ *
+ * ```markdown
+ * > | a d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenAttributeNameAfter(code) {
+ if (code === 61) {
+ effects.consume(code)
+ return tagOpenAttributeValueBefore
+ }
+ if (markdownLineEnding(code)) {
+ returnState = tagOpenAttributeNameAfter
+ return lineEndingBefore(code)
+ }
+ if (markdownSpace(code)) {
+ effects.consume(code)
+ return tagOpenAttributeNameAfter
+ }
+ return tagOpenBetween(code)
+ }
+
+ /**
+ * Before unquoted, double quoted, or single quoted attribute value, allowing
+ * whitespace.
+ *
+ * ```markdown
+ * > | a e
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenAttributeValueBefore(code) {
+ if (
+ code === null ||
+ code === 60 ||
+ code === 61 ||
+ code === 62 ||
+ code === 96
+ ) {
+ return nok(code)
+ }
+ if (code === 34 || code === 39) {
+ effects.consume(code)
+ marker = code
+ return tagOpenAttributeValueQuoted
+ }
+ if (markdownLineEnding(code)) {
+ returnState = tagOpenAttributeValueBefore
+ return lineEndingBefore(code)
+ }
+ if (markdownSpace(code)) {
+ effects.consume(code)
+ return tagOpenAttributeValueBefore
+ }
+ effects.consume(code)
+ return tagOpenAttributeValueUnquoted
+ }
+
+ /**
+ * In double or single quoted attribute value.
+ *
+ * ```markdown
+ * > | a e
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenAttributeValueQuoted(code) {
+ if (code === marker) {
+ effects.consume(code)
+ marker = undefined
+ return tagOpenAttributeValueQuotedAfter
+ }
+ if (code === null) {
+ return nok(code)
+ }
+ if (markdownLineEnding(code)) {
+ returnState = tagOpenAttributeValueQuoted
+ return lineEndingBefore(code)
+ }
+ effects.consume(code)
+ return tagOpenAttributeValueQuoted
+ }
+
+ /**
+ * In unquoted attribute value.
+ *
+ * ```markdown
+ * > | a e
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenAttributeValueUnquoted(code) {
+ if (
+ code === null ||
+ code === 34 ||
+ code === 39 ||
+ code === 60 ||
+ code === 61 ||
+ code === 96
+ ) {
+ return nok(code)
+ }
+ if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {
+ return tagOpenBetween(code)
+ }
+ effects.consume(code)
+ return tagOpenAttributeValueUnquoted
+ }
+
+ /**
+ * After double or single quoted attribute value, before whitespace or the end
+ * of the tag.
+ *
+ * ```markdown
+ * > | a e
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenAttributeValueQuotedAfter(code) {
+ if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {
+ return tagOpenBetween(code)
+ }
+ return nok(code)
+ }
+
+ /**
+ * In certain circumstances of a tag where only an `>` is allowed.
+ *
+ * ```markdown
+ * > | a e
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function end(code) {
+ if (code === 62) {
+ effects.consume(code)
+ effects.exit('htmlTextData')
+ effects.exit('htmlText')
+ return ok
+ }
+ return nok(code)
+ }
+
+ /**
+ * At eol.
+ *
+ * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about
+ * > empty tokens.
+ *
+ * ```markdown
+ * > | a
+ * ```
+ *
+ * @type {State}
+ */
+ function lineEndingBefore(code) {
+ effects.exit('htmlTextData')
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return lineEndingAfter
+ }
+
+ /**
+ * After eol, at optional whitespace.
+ *
+ * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about
+ * > empty tokens.
+ *
+ * ```markdown
+ * | a
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function lineEndingAfter(code) {
+ // Always populated by defaults.
+
+ return markdownSpace(code)
+ ? factorySpace(
+ effects,
+ lineEndingAfterPrefix,
+ 'linePrefix',
+ self.parser.constructs.disable.null.includes('codeIndented')
+ ? undefined
+ : 4
+ )(code)
+ : lineEndingAfterPrefix(code)
+ }
+
+ /**
+ * After eol, after optional whitespace.
+ *
+ * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about
+ * > empty tokens.
+ *
+ * ```markdown
+ * | a
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function lineEndingAfterPrefix(code) {
+ effects.enter('htmlTextData')
+ return returnState(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const labelStartLink = {
+ name: 'labelStartLink',
+ tokenize: tokenizeLabelStartLink,
+ resolveAll: labelEnd.resolveAll
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeLabelStartLink(effects, ok, nok) {
+ const self = this
+ return start
+
+ /**
+ * Start of label (link) start.
+ *
+ * ```markdown
+ * > | a [b] c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('labelLink')
+ effects.enter('labelMarker')
+ effects.consume(code)
+ effects.exit('labelMarker')
+ effects.exit('labelLink')
+ return after
+ }
+
+ /** @type {State} */
+ function after(code) {
+ // To do: this isn’t needed in `micromark-extension-gfm-footnote`,
+ // remove.
+ // Hidden footnotes hook.
+ /* c8 ignore next 3 */
+ return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs
+ ? nok(code)
+ : ok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+/** @type {Construct} */
+const hardBreakEscape = {
+ name: 'hardBreakEscape',
+ tokenize: tokenizeHardBreakEscape
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeHardBreakEscape(effects, ok, nok) {
+ return start
+
+ /**
+ * Start of a hard break (escape).
+ *
+ * ```markdown
+ * > | a\
+ * ^
+ * | b
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('hardBreakEscape')
+ effects.consume(code)
+ return after
+ }
+
+ /**
+ * After `\`, at eol.
+ *
+ * ```markdown
+ * > | a\
+ * ^
+ * | b
+ * ```
+ *
+ * @type {State}
+ */
+ function after(code) {
+ if (markdownLineEnding(code)) {
+ effects.exit('hardBreakEscape')
+ return ok(code)
+ }
+ return nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').Previous} Previous
+ * @typedef {import('micromark-util-types').Resolver} Resolver
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+/** @type {Construct} */
+const codeText = {
+ name: 'codeText',
+ tokenize: tokenizeCodeText,
+ resolve: resolveCodeText,
+ previous
+}
+
+// To do: next major: don’t resolve, like `markdown-rs`.
+/** @type {Resolver} */
+function resolveCodeText(events) {
+ let tailExitIndex = events.length - 4
+ let headEnterIndex = 3
+ /** @type {number} */
+ let index
+ /** @type {number | undefined} */
+ let enter
+
+ // If we start and end with an EOL or a space.
+ if (
+ (events[headEnterIndex][1].type === 'lineEnding' ||
+ events[headEnterIndex][1].type === 'space') &&
+ (events[tailExitIndex][1].type === 'lineEnding' ||
+ events[tailExitIndex][1].type === 'space')
+ ) {
+ index = headEnterIndex
+
+ // And we have data.
+ while (++index < tailExitIndex) {
+ if (events[index][1].type === 'codeTextData') {
+ // Then we have padding.
+ events[headEnterIndex][1].type = 'codeTextPadding'
+ events[tailExitIndex][1].type = 'codeTextPadding'
+ headEnterIndex += 2
+ tailExitIndex -= 2
+ break
+ }
+ }
+ }
+
+ // Merge adjacent spaces and data.
+ index = headEnterIndex - 1
+ tailExitIndex++
+ while (++index <= tailExitIndex) {
+ if (enter === undefined) {
+ if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') {
+ enter = index
+ }
+ } else if (
+ index === tailExitIndex ||
+ events[index][1].type === 'lineEnding'
+ ) {
+ events[enter][1].type = 'codeTextData'
+ if (index !== enter + 2) {
+ events[enter][1].end = events[index - 1][1].end
+ events.splice(enter + 2, index - enter - 2)
+ tailExitIndex -= index - enter - 2
+ index = enter + 2
+ }
+ enter = undefined
+ }
+ }
+ return events
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Previous}
+ */
+function previous(code) {
+ // If there is a previous code, there will always be a tail.
+ return (
+ code !== 96 ||
+ this.events[this.events.length - 1][1].type === 'characterEscape'
+ )
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeCodeText(effects, ok, nok) {
+ const self = this
+ let sizeOpen = 0
+ /** @type {number} */
+ let size
+ /** @type {Token} */
+ let token
+ return start
+
+ /**
+ * Start of code (text).
+ *
+ * ```markdown
+ * > | `a`
+ * ^
+ * > | \`a`
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('codeText')
+ effects.enter('codeTextSequence')
+ return sequenceOpen(code)
+ }
+
+ /**
+ * In opening sequence.
+ *
+ * ```markdown
+ * > | `a`
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function sequenceOpen(code) {
+ if (code === 96) {
+ effects.consume(code)
+ sizeOpen++
+ return sequenceOpen
+ }
+ effects.exit('codeTextSequence')
+ return between(code)
+ }
+
+ /**
+ * Between something and something else.
+ *
+ * ```markdown
+ * > | `a`
+ * ^^
+ * ```
+ *
+ * @type {State}
+ */
+ function between(code) {
+ // EOF.
+ if (code === null) {
+ return nok(code)
+ }
+
+ // To do: next major: don’t do spaces in resolve, but when compiling,
+ // like `markdown-rs`.
+ // Tabs don’t work, and virtual spaces don’t make sense.
+ if (code === 32) {
+ effects.enter('space')
+ effects.consume(code)
+ effects.exit('space')
+ return between
+ }
+
+ // Closing fence? Could also be data.
+ if (code === 96) {
+ token = effects.enter('codeTextSequence')
+ size = 0
+ return sequenceClose(code)
+ }
+ if (markdownLineEnding(code)) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return between
+ }
+
+ // Data.
+ effects.enter('codeTextData')
+ return data(code)
+ }
+
+ /**
+ * In data.
+ *
+ * ```markdown
+ * > | `a`
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function data(code) {
+ if (
+ code === null ||
+ code === 32 ||
+ code === 96 ||
+ markdownLineEnding(code)
+ ) {
+ effects.exit('codeTextData')
+ return between(code)
+ }
+ effects.consume(code)
+ return data
+ }
+
+ /**
+ * In closing sequence.
+ *
+ * ```markdown
+ * > | `a`
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function sequenceClose(code) {
+ // More.
+ if (code === 96) {
+ effects.consume(code)
+ size++
+ return sequenceClose
+ }
+
+ // Done!
+ if (size === sizeOpen) {
+ effects.exit('codeTextSequence')
+ effects.exit('codeText')
+ return ok(code)
+ }
+
+ // More or less accents: mark as data.
+ token.type = 'codeTextData'
+ return data(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js
+/**
+ * @typedef {import('micromark-util-types').Extension} Extension
+ */
+
+
+
+
+/** @satisfies {Extension['document']} */
+const constructs_document = {
+ [42]: list,
+ [43]: list,
+ [45]: list,
+ [48]: list,
+ [49]: list,
+ [50]: list,
+ [51]: list,
+ [52]: list,
+ [53]: list,
+ [54]: list,
+ [55]: list,
+ [56]: list,
+ [57]: list,
+ [62]: blockQuote
+}
+
+/** @satisfies {Extension['contentInitial']} */
+const contentInitial = {
+ [91]: definition
+}
+
+/** @satisfies {Extension['flowInitial']} */
+const flowInitial = {
+ [-2]: codeIndented,
+ [-1]: codeIndented,
+ [32]: codeIndented
+}
+
+/** @satisfies {Extension['flow']} */
+const constructs_flow = {
+ [35]: headingAtx,
+ [42]: thematicBreak,
+ [45]: [setextUnderline, thematicBreak],
+ [60]: htmlFlow,
+ [61]: setextUnderline,
+ [95]: thematicBreak,
+ [96]: codeFenced,
+ [126]: codeFenced
+}
+
+/** @satisfies {Extension['string']} */
+const constructs_string = {
+ [38]: characterReference,
+ [92]: characterEscape
+}
+
+/** @satisfies {Extension['text']} */
+const constructs_text = {
+ [-5]: lineEnding,
+ [-4]: lineEnding,
+ [-3]: lineEnding,
+ [33]: labelStartImage,
+ [38]: characterReference,
+ [42]: attention,
+ [60]: [autolink, htmlText],
+ [91]: labelStartLink,
+ [92]: [hardBreakEscape, characterEscape],
+ [93]: labelEnd,
+ [95]: attention,
+ [96]: codeText
+}
+
+/** @satisfies {Extension['insideSpan']} */
+const insideSpan = {
+ null: [attention, resolver]
+}
+
+/** @satisfies {Extension['attentionMarkers']} */
+const attentionMarkers = {
+ null: [42, 95]
+}
+
+/** @satisfies {Extension['disable']} */
+const disable = {
+ null: []
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js
+/**
+ * @typedef {import('micromark-util-types').Create} Create
+ * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension
+ * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
+ * @typedef {import('micromark-util-types').ParseContext} ParseContext
+ * @typedef {import('micromark-util-types').ParseOptions} ParseOptions
+ */
+
+
+
+
+
+
+
+
+
+/**
+ * @param {ParseOptions | null | undefined} [options]
+ * @returns {ParseContext}
+ */
+function parse(options) {
+ const settings = options || {}
+ const constructs =
+ /** @type {FullNormalizedExtension} */
+ combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])])
+
+ /** @type {ParseContext} */
+ const parser = {
+ defined: [],
+ lazy: {},
+ constructs,
+ content: create(content),
+ document: create(document_document),
+ flow: create(flow),
+ string: create(string),
+ text: create(text_text)
+ }
+ return parser
+
+ /**
+ * @param {InitialConstruct} initial
+ */
+ function create(initial) {
+ return creator
+ /** @type {Create} */
+ function creator(from) {
+ return createTokenizer(parser, initial, from)
+ }
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js
+/**
+ * @typedef {import('micromark-util-types').Chunk} Chunk
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Encoding} Encoding
+ * @typedef {import('micromark-util-types').Value} Value
+ */
+
+/**
+ * @callback Preprocessor
+ * @param {Value} value
+ * @param {Encoding | null | undefined} [encoding]
+ * @param {boolean | null | undefined} [end=false]
+ * @returns {Array}
+ */
+
+const search = /[\0\t\n\r]/g
+
+/**
+ * @returns {Preprocessor}
+ */
+function preprocess() {
+ let column = 1
+ let buffer = ''
+ /** @type {boolean | undefined} */
+ let start = true
+ /** @type {boolean | undefined} */
+ let atCarriageReturn
+ return preprocessor
+
+ /** @type {Preprocessor} */
+ function preprocessor(value, encoding, end) {
+ /** @type {Array} */
+ const chunks = []
+ /** @type {RegExpMatchArray | null} */
+ let match
+ /** @type {number} */
+ let next
+ /** @type {number} */
+ let startPosition
+ /** @type {number} */
+ let endPosition
+ /** @type {Code} */
+ let code
+
+ // @ts-expect-error `Buffer` does allow an encoding.
+ value = buffer + value.toString(encoding)
+ startPosition = 0
+ buffer = ''
+ if (start) {
+ // To do: `markdown-rs` actually parses BOMs (byte order mark).
+ if (value.charCodeAt(0) === 65279) {
+ startPosition++
+ }
+ start = undefined
+ }
+ while (startPosition < value.length) {
+ search.lastIndex = startPosition
+ match = search.exec(value)
+ endPosition =
+ match && match.index !== undefined ? match.index : value.length
+ code = value.charCodeAt(endPosition)
+ if (!match) {
+ buffer = value.slice(startPosition)
+ break
+ }
+ if (code === 10 && startPosition === endPosition && atCarriageReturn) {
+ chunks.push(-3)
+ atCarriageReturn = undefined
+ } else {
+ if (atCarriageReturn) {
+ chunks.push(-5)
+ atCarriageReturn = undefined
+ }
+ if (startPosition < endPosition) {
+ chunks.push(value.slice(startPosition, endPosition))
+ column += endPosition - startPosition
+ }
+ switch (code) {
+ case 0: {
+ chunks.push(65533)
+ column++
+ break
+ }
+ case 9: {
+ next = Math.ceil(column / 4) * 4
+ chunks.push(-2)
+ while (column++ < next) chunks.push(-1)
+ break
+ }
+ case 10: {
+ chunks.push(-4)
+ column = 1
+ break
+ }
+ default: {
+ atCarriageReturn = true
+ column = 1
+ }
+ }
+ }
+ startPosition = endPosition + 1
+ }
+ if (end) {
+ if (atCarriageReturn) chunks.push(-5)
+ if (buffer) chunks.push(buffer)
+ chunks.push(null)
+ }
+ return chunks
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js
+/**
+ * @typedef {import('micromark-util-types').Event} Event
+ */
+
+
+
+/**
+ * @param {Array} events
+ * @returns {Array}
+ */
+function postprocess(events) {
+ while (!subtokenize(events)) {
+ // Empty
+ }
+ return events
+}
+
+;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js
+/**
+ * Turn the number (in string form as either hexa- or plain decimal) coming from
+ * a numeric character reference into a character.
+ *
+ * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes
+ * non-characters and control characters safe.
+ *
+ * @param {string} value
+ * Value to decode.
+ * @param {number} base
+ * Numeric base.
+ * @returns {string}
+ * Character.
+ */
+function decodeNumericCharacterReference(value, base) {
+ const code = Number.parseInt(value, base)
+ if (
+ // C0 except for HT, LF, FF, CR, space.
+ code < 9 ||
+ code === 11 ||
+ (code > 13 && code < 32) ||
+ // Control character (DEL) of C0, and C1 controls.
+ (code > 126 && code < 160) ||
+ // Lone high surrogates and low surrogates.
+ (code > 55295 && code < 57344) ||
+ // Noncharacters.
+ (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ ||
+ (code & 65535) === 65535 ||
+ (code & 65535) === 65534 /* eslint-enable no-bitwise */ ||
+ // Out of range
+ code > 1114111
+ ) {
+ return '\uFFFD'
+ }
+ return String.fromCharCode(code)
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js
+
+
+const characterEscapeOrReference =
+ /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi
+
+/**
+ * Decode markdown strings (which occur in places such as fenced code info
+ * strings, destinations, labels, and titles).
+ *
+ * The “string” content type allows character escapes and -references.
+ * This decodes those.
+ *
+ * @param {string} value
+ * Value to decode.
+ * @returns {string}
+ * Decoded value.
+ */
+function decodeString(value) {
+ return value.replace(characterEscapeOrReference, decode)
+}
+
+/**
+ * @param {string} $0
+ * @param {string} $1
+ * @param {string} $2
+ * @returns {string}
+ */
+function decode($0, $1, $2) {
+ if ($1) {
+ // Escape.
+ return $1
+ }
+
+ // Reference.
+ const head = $2.charCodeAt(0)
+ if (head === 35) {
+ const head = $2.charCodeAt(1)
+ const hex = head === 120 || head === 88
+ return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10)
+ }
+ return decodeNamedCharacterReference($2) || $0
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js
+/**
+ * @typedef {import('unist').Node} Node
+ * @typedef {import('unist').Point} Point
+ * @typedef {import('unist').Position} Position
+ */
+
+/**
+ * @typedef NodeLike
+ * @property {string} type
+ * @property {PositionLike | null | undefined} [position]
+ *
+ * @typedef PositionLike
+ * @property {PointLike | null | undefined} [start]
+ * @property {PointLike | null | undefined} [end]
+ *
+ * @typedef PointLike
+ * @property {number | null | undefined} [line]
+ * @property {number | null | undefined} [column]
+ * @property {number | null | undefined} [offset]
+ */
+
+/**
+ * Serialize the positional info of a point, position (start and end points),
+ * or node.
+ *
+ * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value]
+ * Node, position, or point.
+ * @returns {string}
+ * Pretty printed positional info of a node (`string`).
+ *
+ * In the format of a range `ls:cs-le:ce` (when given `node` or `position`)
+ * or a point `l:c` (when given `point`), where `l` stands for line, `c` for
+ * column, `s` for `start`, and `e` for end.
+ * An empty string (`''`) is returned if the given value is neither `node`,
+ * `position`, nor `point`.
+ */
+function stringifyPosition(value) {
+ // Nothing.
+ if (!value || typeof value !== 'object') {
+ return ''
+ }
+
+ // Node.
+ if ('position' in value || 'type' in value) {
+ return position(value.position)
+ }
+
+ // Position.
+ if ('start' in value || 'end' in value) {
+ return position(value)
+ }
+
+ // Point.
+ if ('line' in value || 'column' in value) {
+ return point(value)
+ }
+
+ // ?
+ return ''
+}
+
+/**
+ * @param {Point | PointLike | null | undefined} point
+ * @returns {string}
+ */
+function point(point) {
+ return index(point && point.line) + ':' + index(point && point.column)
+}
+
+/**
+ * @param {Position | PositionLike | null | undefined} pos
+ * @returns {string}
+ */
+function position(pos) {
+ return point(pos && pos.start) + '-' + point(pos && pos.end)
+}
+
+/**
+ * @param {number | null | undefined} value
+ * @returns {number}
+ */
+function index(value) {
+ return value && typeof value === 'number' ? value : 1
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js
+/**
+ * @typedef {import('micromark-util-types').Encoding} Encoding
+ * @typedef {import('micromark-util-types').Event} Event
+ * @typedef {import('micromark-util-types').ParseOptions} ParseOptions
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Value} Value
+ *
+ * @typedef {import('unist').Parent} UnistParent
+ * @typedef {import('unist').Point} Point
+ *
+ * @typedef {import('mdast').PhrasingContent} PhrasingContent
+ * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent
+ * @typedef {import('mdast').Content} Content
+ * @typedef {import('mdast').Break} Break
+ * @typedef {import('mdast').Blockquote} Blockquote
+ * @typedef {import('mdast').Code} Code
+ * @typedef {import('mdast').Definition} Definition
+ * @typedef {import('mdast').Emphasis} Emphasis
+ * @typedef {import('mdast').Heading} Heading
+ * @typedef {import('mdast').HTML} HTML
+ * @typedef {import('mdast').Image} Image
+ * @typedef {import('mdast').ImageReference} ImageReference
+ * @typedef {import('mdast').InlineCode} InlineCode
+ * @typedef {import('mdast').Link} Link
+ * @typedef {import('mdast').LinkReference} LinkReference
+ * @typedef {import('mdast').List} List
+ * @typedef {import('mdast').ListItem} ListItem
+ * @typedef {import('mdast').Paragraph} Paragraph
+ * @typedef {import('mdast').Root} Root
+ * @typedef {import('mdast').Strong} Strong
+ * @typedef {import('mdast').Text} Text
+ * @typedef {import('mdast').ThematicBreak} ThematicBreak
+ * @typedef {import('mdast').ReferenceType} ReferenceType
+ * @typedef {import('../index.js').CompileData} CompileData
+ */
+
+/**
+ * @typedef {Root | Content} Node
+ * @typedef {Extract} Parent
+ *
+ * @typedef {Omit & {type: 'fragment', children: Array}} Fragment
+ */
+
+/**
+ * @callback Transform
+ * Extra transform, to change the AST afterwards.
+ * @param {Root} tree
+ * Tree to transform.
+ * @returns {Root | undefined | null | void}
+ * New tree or nothing (in which case the current tree is used).
+ *
+ * @callback Handle
+ * Handle a token.
+ * @param {CompileContext} this
+ * Context.
+ * @param {Token} token
+ * Current token.
+ * @returns {void}
+ * Nothing.
+ *
+ * @typedef {Record} Handles
+ * Token types mapping to handles
+ *
+ * @callback OnEnterError
+ * Handle the case where the `right` token is open, but it is closed (by the
+ * `left` token) or because we reached the end of the document.
+ * @param {Omit} this
+ * Context.
+ * @param {Token | undefined} left
+ * Left token.
+ * @param {Token} right
+ * Right token.
+ * @returns {void}
+ * Nothing.
+ *
+ * @callback OnExitError
+ * Handle the case where the `right` token is open but it is closed by
+ * exiting the `left` token.
+ * @param {Omit} this
+ * Context.
+ * @param {Token} left
+ * Left token.
+ * @param {Token} right
+ * Right token.
+ * @returns {void}
+ * Nothing.
+ *
+ * @typedef {[Token, OnEnterError | undefined]} TokenTuple
+ * Open token on the stack, with an optional error handler for when
+ * that token isn’t closed properly.
+ */
+
+/**
+ * @typedef Config
+ * Configuration.
+ *
+ * We have our defaults, but extensions will add more.
+ * @property {Array} canContainEols
+ * Token types where line endings are used.
+ * @property {Handles} enter
+ * Opening handles.
+ * @property {Handles} exit
+ * Closing handles.
+ * @property {Array} transforms
+ * Tree transforms.
+ *
+ * @typedef {Partial} Extension
+ * Change how markdown tokens from micromark are turned into mdast.
+ *
+ * @typedef CompileContext
+ * mdast compiler context.
+ * @property {Array} stack
+ * Stack of nodes.
+ * @property {Array} tokenStack
+ * Stack of tokens.
+ * @property {(key: Key) => CompileData[Key]} getData
+ * Get data from the key/value store.
+ * @property {(key: Key, value?: CompileData[Key]) => void} setData
+ * Set data into the key/value store.
+ * @property {(this: CompileContext) => void} buffer
+ * Capture some of the output data.
+ * @property {(this: CompileContext) => string} resume
+ * Stop capturing and access the output data.
+ * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter
+ * Enter a token.
+ * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit
+ * Exit a token.
+ * @property {TokenizeContext['sliceSerialize']} sliceSerialize
+ * Get the string value of a token.
+ * @property {Config} config
+ * Configuration.
+ *
+ * @typedef FromMarkdownOptions
+ * Configuration for how to build mdast.
+ * @property {Array> | null | undefined} [mdastExtensions]
+ * Extensions for this utility to change how tokens are turned into a tree.
+ *
+ * @typedef {ParseOptions & FromMarkdownOptions} Options
+ * Configuration.
+ */
+
+// To do: micromark: create a registry of tokens?
+// To do: next major: don’t return given `Node` from `enter`.
+// To do: next major: remove setter/getter.
+
+
+
+
+
+
+
+
+
+
+const lib_own = {}.hasOwnProperty
+
+/**
+ * @param value
+ * Markdown to parse.
+ * @param encoding
+ * Character encoding for when `value` is `Buffer`.
+ * @param options
+ * Configuration.
+ * @returns
+ * mdast tree.
+ */
+const fromMarkdown =
+ /**
+ * @type {(
+ * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &
+ * ((value: Value, options?: Options | null | undefined) => Root)
+ * )}
+ */
+
+ /**
+ * @param {Value} value
+ * @param {Encoding | Options | null | undefined} [encoding]
+ * @param {Options | null | undefined} [options]
+ * @returns {Root}
+ */
+ function (value, encoding, options) {
+ if (typeof encoding !== 'string') {
+ options = encoding
+ encoding = undefined
+ }
+ return compiler(options)(
+ postprocess(
+ parse(options).document().write(preprocess()(value, encoding, true))
+ )
+ )
+ }
+
+/**
+ * Note this compiler only understand complete buffering, not streaming.
+ *
+ * @param {Options | null | undefined} [options]
+ */
+function compiler(options) {
+ /** @type {Config} */
+ const config = {
+ transforms: [],
+ canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],
+ enter: {
+ autolink: opener(link),
+ autolinkProtocol: onenterdata,
+ autolinkEmail: onenterdata,
+ atxHeading: opener(heading),
+ blockQuote: opener(blockQuote),
+ characterEscape: onenterdata,
+ characterReference: onenterdata,
+ codeFenced: opener(codeFlow),
+ codeFencedFenceInfo: buffer,
+ codeFencedFenceMeta: buffer,
+ codeIndented: opener(codeFlow, buffer),
+ codeText: opener(codeText, buffer),
+ codeTextData: onenterdata,
+ data: onenterdata,
+ codeFlowValue: onenterdata,
+ definition: opener(definition),
+ definitionDestinationString: buffer,
+ definitionLabelString: buffer,
+ definitionTitleString: buffer,
+ emphasis: opener(emphasis),
+ hardBreakEscape: opener(hardBreak),
+ hardBreakTrailing: opener(hardBreak),
+ htmlFlow: opener(html, buffer),
+ htmlFlowData: onenterdata,
+ htmlText: opener(html, buffer),
+ htmlTextData: onenterdata,
+ image: opener(image),
+ label: buffer,
+ link: opener(link),
+ listItem: opener(listItem),
+ listItemValue: onenterlistitemvalue,
+ listOrdered: opener(list, onenterlistordered),
+ listUnordered: opener(list),
+ paragraph: opener(paragraph),
+ reference: onenterreference,
+ referenceString: buffer,
+ resourceDestinationString: buffer,
+ resourceTitleString: buffer,
+ setextHeading: opener(heading),
+ strong: opener(strong),
+ thematicBreak: opener(thematicBreak)
+ },
+ exit: {
+ atxHeading: closer(),
+ atxHeadingSequence: onexitatxheadingsequence,
+ autolink: closer(),
+ autolinkEmail: onexitautolinkemail,
+ autolinkProtocol: onexitautolinkprotocol,
+ blockQuote: closer(),
+ characterEscapeValue: onexitdata,
+ characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,
+ characterReferenceMarkerNumeric: onexitcharacterreferencemarker,
+ characterReferenceValue: onexitcharacterreferencevalue,
+ codeFenced: closer(onexitcodefenced),
+ codeFencedFence: onexitcodefencedfence,
+ codeFencedFenceInfo: onexitcodefencedfenceinfo,
+ codeFencedFenceMeta: onexitcodefencedfencemeta,
+ codeFlowValue: onexitdata,
+ codeIndented: closer(onexitcodeindented),
+ codeText: closer(onexitcodetext),
+ codeTextData: onexitdata,
+ data: onexitdata,
+ definition: closer(),
+ definitionDestinationString: onexitdefinitiondestinationstring,
+ definitionLabelString: onexitdefinitionlabelstring,
+ definitionTitleString: onexitdefinitiontitlestring,
+ emphasis: closer(),
+ hardBreakEscape: closer(onexithardbreak),
+ hardBreakTrailing: closer(onexithardbreak),
+ htmlFlow: closer(onexithtmlflow),
+ htmlFlowData: onexitdata,
+ htmlText: closer(onexithtmltext),
+ htmlTextData: onexitdata,
+ image: closer(onexitimage),
+ label: onexitlabel,
+ labelText: onexitlabeltext,
+ lineEnding: onexitlineending,
+ link: closer(onexitlink),
+ listItem: closer(),
+ listOrdered: closer(),
+ listUnordered: closer(),
+ paragraph: closer(),
+ referenceString: onexitreferencestring,
+ resourceDestinationString: onexitresourcedestinationstring,
+ resourceTitleString: onexitresourcetitlestring,
+ resource: onexitresource,
+ setextHeading: closer(onexitsetextheading),
+ setextHeadingLineSequence: onexitsetextheadinglinesequence,
+ setextHeadingText: onexitsetextheadingtext,
+ strong: closer(),
+ thematicBreak: closer()
+ }
+ }
+ configure(config, (options || {}).mdastExtensions || [])
+
+ /** @type {CompileData} */
+ const data = {}
+ return compile
+
+ /**
+ * Turn micromark events into an mdast tree.
+ *
+ * @param {Array} events
+ * Events.
+ * @returns {Root}
+ * mdast tree.
+ */
+ function compile(events) {
+ /** @type {Root} */
+ let tree = {
+ type: 'root',
+ children: []
+ }
+ /** @type {Omit} */
+ const context = {
+ stack: [tree],
+ tokenStack: [],
+ config,
+ enter,
+ exit,
+ buffer,
+ resume,
+ setData,
+ getData
+ }
+ /** @type {Array} */
+ const listStack = []
+ let index = -1
+ while (++index < events.length) {
+ // We preprocess lists to add `listItem` tokens, and to infer whether
+ // items the list itself are spread out.
+ if (
+ events[index][1].type === 'listOrdered' ||
+ events[index][1].type === 'listUnordered'
+ ) {
+ if (events[index][0] === 'enter') {
+ listStack.push(index)
+ } else {
+ const tail = listStack.pop()
+ index = prepareList(events, tail, index)
+ }
+ }
+ }
+ index = -1
+ while (++index < events.length) {
+ const handler = config[events[index][0]]
+ if (lib_own.call(handler, events[index][1].type)) {
+ handler[events[index][1].type].call(
+ Object.assign(
+ {
+ sliceSerialize: events[index][2].sliceSerialize
+ },
+ context
+ ),
+ events[index][1]
+ )
+ }
+ }
+
+ // Handle tokens still being open.
+ if (context.tokenStack.length > 0) {
+ const tail = context.tokenStack[context.tokenStack.length - 1]
+ const handler = tail[1] || defaultOnError
+ handler.call(context, undefined, tail[0])
+ }
+
+ // Figure out `root` position.
+ tree.position = {
+ start: lib_point(
+ events.length > 0
+ ? events[0][1].start
+ : {
+ line: 1,
+ column: 1,
+ offset: 0
+ }
+ ),
+ end: lib_point(
+ events.length > 0
+ ? events[events.length - 2][1].end
+ : {
+ line: 1,
+ column: 1,
+ offset: 0
+ }
+ )
+ }
+
+ // Call transforms.
+ index = -1
+ while (++index < config.transforms.length) {
+ tree = config.transforms[index](tree) || tree
+ }
+ return tree
+ }
+
+ /**
+ * @param {Array} events
+ * @param {number} start
+ * @param {number} length
+ * @returns {number}
+ */
+ function prepareList(events, start, length) {
+ let index = start - 1
+ let containerBalance = -1
+ let listSpread = false
+ /** @type {Token | undefined} */
+ let listItem
+ /** @type {number | undefined} */
+ let lineIndex
+ /** @type {number | undefined} */
+ let firstBlankLineIndex
+ /** @type {boolean | undefined} */
+ let atMarker
+ while (++index <= length) {
+ const event = events[index]
+ if (
+ event[1].type === 'listUnordered' ||
+ event[1].type === 'listOrdered' ||
+ event[1].type === 'blockQuote'
+ ) {
+ if (event[0] === 'enter') {
+ containerBalance++
+ } else {
+ containerBalance--
+ }
+ atMarker = undefined
+ } else if (event[1].type === 'lineEndingBlank') {
+ if (event[0] === 'enter') {
+ if (
+ listItem &&
+ !atMarker &&
+ !containerBalance &&
+ !firstBlankLineIndex
+ ) {
+ firstBlankLineIndex = index
+ }
+ atMarker = undefined
+ }
+ } else if (
+ event[1].type === 'linePrefix' ||
+ event[1].type === 'listItemValue' ||
+ event[1].type === 'listItemMarker' ||
+ event[1].type === 'listItemPrefix' ||
+ event[1].type === 'listItemPrefixWhitespace'
+ ) {
+ // Empty.
+ } else {
+ atMarker = undefined
+ }
+ if (
+ (!containerBalance &&
+ event[0] === 'enter' &&
+ event[1].type === 'listItemPrefix') ||
+ (containerBalance === -1 &&
+ event[0] === 'exit' &&
+ (event[1].type === 'listUnordered' ||
+ event[1].type === 'listOrdered'))
+ ) {
+ if (listItem) {
+ let tailIndex = index
+ lineIndex = undefined
+ while (tailIndex--) {
+ const tailEvent = events[tailIndex]
+ if (
+ tailEvent[1].type === 'lineEnding' ||
+ tailEvent[1].type === 'lineEndingBlank'
+ ) {
+ if (tailEvent[0] === 'exit') continue
+ if (lineIndex) {
+ events[lineIndex][1].type = 'lineEndingBlank'
+ listSpread = true
+ }
+ tailEvent[1].type = 'lineEnding'
+ lineIndex = tailIndex
+ } else if (
+ tailEvent[1].type === 'linePrefix' ||
+ tailEvent[1].type === 'blockQuotePrefix' ||
+ tailEvent[1].type === 'blockQuotePrefixWhitespace' ||
+ tailEvent[1].type === 'blockQuoteMarker' ||
+ tailEvent[1].type === 'listItemIndent'
+ ) {
+ // Empty
+ } else {
+ break
+ }
+ }
+ if (
+ firstBlankLineIndex &&
+ (!lineIndex || firstBlankLineIndex < lineIndex)
+ ) {
+ listItem._spread = true
+ }
+
+ // Fix position.
+ listItem.end = Object.assign(
+ {},
+ lineIndex ? events[lineIndex][1].start : event[1].end
+ )
+ events.splice(lineIndex || index, 0, ['exit', listItem, event[2]])
+ index++
+ length++
+ }
+
+ // Create a new list item.
+ if (event[1].type === 'listItemPrefix') {
+ listItem = {
+ type: 'listItem',
+ _spread: false,
+ start: Object.assign({}, event[1].start),
+ // @ts-expect-error: we’ll add `end` in a second.
+ end: undefined
+ }
+ // @ts-expect-error: `listItem` is most definitely defined, TS...
+ events.splice(index, 0, ['enter', listItem, event[2]])
+ index++
+ length++
+ firstBlankLineIndex = undefined
+ atMarker = true
+ }
+ }
+ }
+ events[start][1]._spread = listSpread
+ return length
+ }
+
+ /**
+ * Set data.
+ *
+ * @template {keyof CompileData} Key
+ * Field type.
+ * @param {Key} key
+ * Key of field.
+ * @param {CompileData[Key]} [value]
+ * New value.
+ * @returns {void}
+ * Nothing.
+ */
+ function setData(key, value) {
+ data[key] = value
+ }
+
+ /**
+ * Get data.
+ *
+ * @template {keyof CompileData} Key
+ * Field type.
+ * @param {Key} key
+ * Key of field.
+ * @returns {CompileData[Key]}
+ * Value.
+ */
+ function getData(key) {
+ return data[key]
+ }
+
+ /**
+ * Create an opener handle.
+ *
+ * @param {(token: Token) => Node} create
+ * Create a node.
+ * @param {Handle} [and]
+ * Optional function to also run.
+ * @returns {Handle}
+ * Handle.
+ */
+ function opener(create, and) {
+ return open
+
+ /**
+ * @this {CompileContext}
+ * @param {Token} token
+ * @returns {void}
+ */
+ function open(token) {
+ enter.call(this, create(token), token)
+ if (and) and.call(this, token)
+ }
+ }
+
+ /**
+ * @this {CompileContext}
+ * @returns {void}
+ */
+ function buffer() {
+ this.stack.push({
+ type: 'fragment',
+ children: []
+ })
+ }
+
+ /**
+ * @template {Node} Kind
+ * Node type.
+ * @this {CompileContext}
+ * Context.
+ * @param {Kind} node
+ * Node to enter.
+ * @param {Token} token
+ * Corresponding token.
+ * @param {OnEnterError | undefined} [errorHandler]
+ * Handle the case where this token is open, but it is closed by something else.
+ * @returns {Kind}
+ * The given node.
+ */
+ function enter(node, token, errorHandler) {
+ const parent = this.stack[this.stack.length - 1]
+ // @ts-expect-error: Assume `Node` can exist as a child of `parent`.
+ parent.children.push(node)
+ this.stack.push(node)
+ this.tokenStack.push([token, errorHandler])
+ // @ts-expect-error: `end` will be patched later.
+ node.position = {
+ start: lib_point(token.start)
+ }
+ return node
+ }
+
+ /**
+ * Create a closer handle.
+ *
+ * @param {Handle} [and]
+ * Optional function to also run.
+ * @returns {Handle}
+ * Handle.
+ */
+ function closer(and) {
+ return close
+
+ /**
+ * @this {CompileContext}
+ * @param {Token} token
+ * @returns {void}
+ */
+ function close(token) {
+ if (and) and.call(this, token)
+ exit.call(this, token)
+ }
+ }
+
+ /**
+ * @this {CompileContext}
+ * Context.
+ * @param {Token} token
+ * Corresponding token.
+ * @param {OnExitError | undefined} [onExitError]
+ * Handle the case where another token is open.
+ * @returns {Node}
+ * The closed node.
+ */
+ function exit(token, onExitError) {
+ const node = this.stack.pop()
+ const open = this.tokenStack.pop()
+ if (!open) {
+ throw new Error(
+ 'Cannot close `' +
+ token.type +
+ '` (' +
+ stringifyPosition({
+ start: token.start,
+ end: token.end
+ }) +
+ '): it’s not open'
+ )
+ } else if (open[0].type !== token.type) {
+ if (onExitError) {
+ onExitError.call(this, token, open[0])
+ } else {
+ const handler = open[1] || defaultOnError
+ handler.call(this, token, open[0])
+ }
+ }
+ node.position.end = lib_point(token.end)
+ return node
+ }
+
+ /**
+ * @this {CompileContext}
+ * @returns {string}
+ */
+ function resume() {
+ return lib_toString(this.stack.pop())
+ }
+
+ //
+ // Handlers.
+ //
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onenterlistordered() {
+ setData('expectingFirstListItemValue', true)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onenterlistitemvalue(token) {
+ if (getData('expectingFirstListItemValue')) {
+ const ancestor = this.stack[this.stack.length - 2]
+ ancestor.start = Number.parseInt(this.sliceSerialize(token), 10)
+ setData('expectingFirstListItemValue')
+ }
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitcodefencedfenceinfo() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.lang = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitcodefencedfencemeta() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.meta = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitcodefencedfence() {
+ // Exit if this is the closing fence.
+ if (getData('flowCodeInside')) return
+ this.buffer()
+ setData('flowCodeInside', true)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitcodefenced() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '')
+ setData('flowCodeInside')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitcodeindented() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.value = data.replace(/(\r?\n|\r)$/g, '')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitdefinitionlabelstring(token) {
+ const label = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.label = label
+ node.identifier = normalizeIdentifier(
+ this.sliceSerialize(token)
+ ).toLowerCase()
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitdefinitiontitlestring() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.title = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitdefinitiondestinationstring() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.url = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitatxheadingsequence(token) {
+ const node = this.stack[this.stack.length - 1]
+ if (!node.depth) {
+ const depth = this.sliceSerialize(token).length
+ node.depth = depth
+ }
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitsetextheadingtext() {
+ setData('setextHeadingSlurpLineEnding', true)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitsetextheadinglinesequence(token) {
+ const node = this.stack[this.stack.length - 1]
+ node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitsetextheading() {
+ setData('setextHeadingSlurpLineEnding')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onenterdata(token) {
+ const node = this.stack[this.stack.length - 1]
+ let tail = node.children[node.children.length - 1]
+ if (!tail || tail.type !== 'text') {
+ // Add a new text node.
+ tail = text()
+ // @ts-expect-error: we’ll add `end` later.
+ tail.position = {
+ start: lib_point(token.start)
+ }
+ // @ts-expect-error: Assume `parent` accepts `text`.
+ node.children.push(tail)
+ }
+ this.stack.push(tail)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitdata(token) {
+ const tail = this.stack.pop()
+ tail.value += this.sliceSerialize(token)
+ tail.position.end = lib_point(token.end)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitlineending(token) {
+ const context = this.stack[this.stack.length - 1]
+ // If we’re at a hard break, include the line ending in there.
+ if (getData('atHardBreak')) {
+ const tail = context.children[context.children.length - 1]
+ tail.position.end = lib_point(token.end)
+ setData('atHardBreak')
+ return
+ }
+ if (
+ !getData('setextHeadingSlurpLineEnding') &&
+ config.canContainEols.includes(context.type)
+ ) {
+ onenterdata.call(this, token)
+ onexitdata.call(this, token)
+ }
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexithardbreak() {
+ setData('atHardBreak', true)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexithtmlflow() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.value = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexithtmltext() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.value = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitcodetext() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.value = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitlink() {
+ const node = this.stack[this.stack.length - 1]
+ // Note: there are also `identifier` and `label` fields on this link node!
+ // These are used / cleaned here.
+ // To do: clean.
+ if (getData('inReference')) {
+ /** @type {ReferenceType} */
+ const referenceType = getData('referenceType') || 'shortcut'
+ node.type += 'Reference'
+ // @ts-expect-error: mutate.
+ node.referenceType = referenceType
+ // @ts-expect-error: mutate.
+ delete node.url
+ delete node.title
+ } else {
+ // @ts-expect-error: mutate.
+ delete node.identifier
+ // @ts-expect-error: mutate.
+ delete node.label
+ }
+ setData('referenceType')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitimage() {
+ const node = this.stack[this.stack.length - 1]
+ // Note: there are also `identifier` and `label` fields on this link node!
+ // These are used / cleaned here.
+ // To do: clean.
+ if (getData('inReference')) {
+ /** @type {ReferenceType} */
+ const referenceType = getData('referenceType') || 'shortcut'
+ node.type += 'Reference'
+ // @ts-expect-error: mutate.
+ node.referenceType = referenceType
+ // @ts-expect-error: mutate.
+ delete node.url
+ delete node.title
+ } else {
+ // @ts-expect-error: mutate.
+ delete node.identifier
+ // @ts-expect-error: mutate.
+ delete node.label
+ }
+ setData('referenceType')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitlabeltext(token) {
+ const string = this.sliceSerialize(token)
+ const ancestor = this.stack[this.stack.length - 2]
+ // @ts-expect-error: stash this on the node, as it might become a reference
+ // later.
+ ancestor.label = decodeString(string)
+ // @ts-expect-error: same as above.
+ ancestor.identifier = normalizeIdentifier(string).toLowerCase()
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitlabel() {
+ const fragment = this.stack[this.stack.length - 1]
+ const value = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ // Assume a reference.
+ setData('inReference', true)
+ if (node.type === 'link') {
+ /** @type {Array} */
+ // @ts-expect-error: Assume static phrasing content.
+ const children = fragment.children
+ node.children = children
+ } else {
+ node.alt = value
+ }
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitresourcedestinationstring() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.url = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitresourcetitlestring() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.title = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitresource() {
+ setData('inReference')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onenterreference() {
+ setData('referenceType', 'collapsed')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitreferencestring(token) {
+ const label = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ // @ts-expect-error: stash this on the node, as it might become a reference
+ // later.
+ node.label = label
+ // @ts-expect-error: same as above.
+ node.identifier = normalizeIdentifier(
+ this.sliceSerialize(token)
+ ).toLowerCase()
+ setData('referenceType', 'full')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitcharacterreferencemarker(token) {
+ setData('characterReferenceType', token.type)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitcharacterreferencevalue(token) {
+ const data = this.sliceSerialize(token)
+ const type = getData('characterReferenceType')
+ /** @type {string} */
+ let value
+ if (type) {
+ value = decodeNumericCharacterReference(
+ data,
+ type === 'characterReferenceMarkerNumeric' ? 10 : 16
+ )
+ setData('characterReferenceType')
+ } else {
+ const result = decodeNamedCharacterReference(data)
+ value = result
+ }
+ const tail = this.stack.pop()
+ tail.value += value
+ tail.position.end = lib_point(token.end)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitautolinkprotocol(token) {
+ onexitdata.call(this, token)
+ const node = this.stack[this.stack.length - 1]
+ node.url = this.sliceSerialize(token)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitautolinkemail(token) {
+ onexitdata.call(this, token)
+ const node = this.stack[this.stack.length - 1]
+ node.url = 'mailto:' + this.sliceSerialize(token)
+ }
+
+ //
+ // Creaters.
+ //
+
+ /** @returns {Blockquote} */
+ function blockQuote() {
+ return {
+ type: 'blockquote',
+ children: []
+ }
+ }
+
+ /** @returns {Code} */
+ function codeFlow() {
+ return {
+ type: 'code',
+ lang: null,
+ meta: null,
+ value: ''
+ }
+ }
+
+ /** @returns {InlineCode} */
+ function codeText() {
+ return {
+ type: 'inlineCode',
+ value: ''
+ }
+ }
+
+ /** @returns {Definition} */
+ function definition() {
+ return {
+ type: 'definition',
+ identifier: '',
+ label: null,
+ title: null,
+ url: ''
+ }
+ }
+
+ /** @returns {Emphasis} */
+ function emphasis() {
+ return {
+ type: 'emphasis',
+ children: []
+ }
+ }
+
+ /** @returns {Heading} */
+ function heading() {
+ // @ts-expect-error `depth` will be set later.
+ return {
+ type: 'heading',
+ depth: undefined,
+ children: []
+ }
+ }
+
+ /** @returns {Break} */
+ function hardBreak() {
+ return {
+ type: 'break'
+ }
+ }
+
+ /** @returns {HTML} */
+ function html() {
+ return {
+ type: 'html',
+ value: ''
+ }
+ }
+
+ /** @returns {Image} */
+ function image() {
+ return {
+ type: 'image',
+ title: null,
+ url: '',
+ alt: null
+ }
+ }
+
+ /** @returns {Link} */
+ function link() {
+ return {
+ type: 'link',
+ title: null,
+ url: '',
+ children: []
+ }
+ }
+
+ /**
+ * @param {Token} token
+ * @returns {List}
+ */
+ function list(token) {
+ return {
+ type: 'list',
+ ordered: token.type === 'listOrdered',
+ start: null,
+ spread: token._spread,
+ children: []
+ }
+ }
+
+ /**
+ * @param {Token} token
+ * @returns {ListItem}
+ */
+ function listItem(token) {
+ return {
+ type: 'listItem',
+ spread: token._spread,
+ checked: null,
+ children: []
+ }
+ }
+
+ /** @returns {Paragraph} */
+ function paragraph() {
+ return {
+ type: 'paragraph',
+ children: []
+ }
+ }
+
+ /** @returns {Strong} */
+ function strong() {
+ return {
+ type: 'strong',
+ children: []
+ }
+ }
+
+ /** @returns {Text} */
+ function text() {
+ return {
+ type: 'text',
+ value: ''
+ }
+ }
+
+ /** @returns {ThematicBreak} */
+ function thematicBreak() {
+ return {
+ type: 'thematicBreak'
+ }
+ }
+}
+
+/**
+ * Copy a point-like value.
+ *
+ * @param {Point} d
+ * Point-like value.
+ * @returns {Point}
+ * unist point.
+ */
+function lib_point(d) {
+ return {
+ line: d.line,
+ column: d.column,
+ offset: d.offset
+ }
+}
+
+/**
+ * @param {Config} combined
+ * @param {Array>} extensions
+ * @returns {void}
+ */
+function configure(combined, extensions) {
+ let index = -1
+ while (++index < extensions.length) {
+ const value = extensions[index]
+ if (Array.isArray(value)) {
+ configure(combined, value)
+ } else {
+ extension(combined, value)
+ }
+ }
+}
+
+/**
+ * @param {Config} combined
+ * @param {Extension} extension
+ * @returns {void}
+ */
+function extension(combined, extension) {
+ /** @type {keyof Extension} */
+ let key
+ for (key in extension) {
+ if (lib_own.call(extension, key)) {
+ if (key === 'canContainEols') {
+ const right = extension[key]
+ if (right) {
+ combined[key].push(...right)
+ }
+ } else if (key === 'transforms') {
+ const right = extension[key]
+ if (right) {
+ combined[key].push(...right)
+ }
+ } else if (key === 'enter' || key === 'exit') {
+ const right = extension[key]
+ if (right) {
+ Object.assign(combined[key], right)
+ }
+ }
+ }
+ }
+}
+
+/** @type {OnEnterError} */
+function defaultOnError(left, right) {
+ if (left) {
+ throw new Error(
+ 'Cannot close `' +
+ left.type +
+ '` (' +
+ stringifyPosition({
+ start: left.start,
+ end: left.end
+ }) +
+ '): a different token (`' +
+ right.type +
+ '`, ' +
+ stringifyPosition({
+ start: right.start,
+ end: right.end
+ }) +
+ ') is open'
+ )
+ } else {
+ throw new Error(
+ 'Cannot close document, a token (`' +
+ right.type +
+ '`, ' +
+ stringifyPosition({
+ start: right.start,
+ end: right.end
+ }) +
+ ') is still open'
+ )
+ }
+}
+
+// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js
+var esm = __webpack_require__(513);
+;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-6b48ae7d.js
+
+
+
+function preprocessMarkdown(markdown) {
+ const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n");
+ const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines);
+ return withoutExtraSpaces;
+}
+function markdownToLines(markdown) {
+ const preprocessedMarkdown = preprocessMarkdown(markdown);
+ const { children } = fromMarkdown(preprocessedMarkdown);
+ const lines = [[]];
+ let currentLine = 0;
+ function processNode(node, parentType = "normal") {
+ if (node.type === "text") {
+ const textLines = node.value.split("\n");
+ textLines.forEach((textLine, index) => {
+ if (index !== 0) {
+ currentLine++;
+ lines.push([]);
+ }
+ textLine.split(" ").forEach((word) => {
+ if (word) {
+ lines[currentLine].push({ content: word, type: parentType });
+ }
+ });
+ });
+ } else if (node.type === "strong" || node.type === "emphasis") {
+ node.children.forEach((contentNode) => {
+ processNode(contentNode, node.type);
+ });
+ }
+ }
+ children.forEach((treeNode) => {
+ if (treeNode.type === "paragraph") {
+ treeNode.children.forEach((contentNode) => {
+ processNode(contentNode);
+ });
+ }
+ });
+ return lines;
+}
+function markdownToHTML(markdown) {
+ const { children } = fromMarkdown(markdown);
+ function output(node) {
+ if (node.type === "text") {
+ return node.value.replace(/\n/g, "
");
+ } else if (node.type === "strong") {
+ return `${node.children.map(output).join("")}`;
+ } else if (node.type === "emphasis") {
+ return `${node.children.map(output).join("")}`;
+ } else if (node.type === "paragraph") {
+ return `${node.children.map(output).join("")}
`;
+ }
+ return `Unsupported markdown: ${node.type}`;
+ }
+ return children.map(output).join("");
+}
+function splitTextToChars(text) {
+ if (Intl.Segmenter) {
+ return [...new Intl.Segmenter().segment(text)].map((s) => s.segment);
+ }
+ return [...text];
+}
+function splitWordToFitWidth(checkFit, word) {
+ const characters = splitTextToChars(word.content);
+ return splitWordToFitWidthRecursion(checkFit, [], characters, word.type);
+}
+function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) {
+ if (remainingChars.length === 0) {
+ return [
+ { content: usedChars.join(""), type },
+ { content: "", type }
+ ];
+ }
+ const [nextChar, ...rest] = remainingChars;
+ const newWord = [...usedChars, nextChar];
+ if (checkFit([{ content: newWord.join(""), type }])) {
+ return splitWordToFitWidthRecursion(checkFit, newWord, rest, type);
+ }
+ if (usedChars.length === 0 && nextChar) {
+ usedChars.push(nextChar);
+ remainingChars.shift();
+ }
+ return [
+ { content: usedChars.join(""), type },
+ { content: remainingChars.join(""), type }
+ ];
+}
+function splitLineToFitWidth(line, checkFit) {
+ if (line.some(({ content }) => content.includes("\n"))) {
+ throw new Error("splitLineToFitWidth does not support newlines in the line");
+ }
+ return splitLineToFitWidthRecursion(line, checkFit);
+}
+function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) {
+ if (words.length === 0) {
+ if (newLine.length > 0) {
+ lines.push(newLine);
+ }
+ return lines.length > 0 ? lines : [];
+ }
+ let joiner = "";
+ if (words[0].content === " ") {
+ joiner = " ";
+ words.shift();
+ }
+ const nextWord = words.shift() ?? { content: " ", type: "normal" };
+ const lineWithNextWord = [...newLine];
+ if (joiner !== "") {
+ lineWithNextWord.push({ content: joiner, type: "normal" });
+ }
+ lineWithNextWord.push(nextWord);
+ if (checkFit(lineWithNextWord)) {
+ return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord);
+ }
+ if (newLine.length > 0) {
+ lines.push(newLine);
+ words.unshift(nextWord);
+ } else if (nextWord.content) {
+ const [line, rest] = splitWordToFitWidth(checkFit, nextWord);
+ lines.push([line]);
+ if (rest.content) {
+ words.unshift(rest);
+ }
+ }
+ return splitLineToFitWidthRecursion(words, checkFit, lines);
+}
+function applyStyle(dom, styleFn) {
+ if (styleFn) {
+ dom.attr("style", styleFn);
+ }
+}
+function addHtmlSpan(element, node, width, classes, addBackground = false) {
+ const fo = element.append("foreignObject");
+ const div = fo.append("xhtml:div");
+ const label = node.label;
+ const labelClass = node.isNode ? "nodeLabel" : "edgeLabel";
+ div.html(
+ `
+ " + label + ""
+ );
+ applyStyle(div, node.labelStyle);
+ div.style("display", "table-cell");
+ div.style("white-space", "nowrap");
+ div.style("max-width", width + "px");
+ div.attr("xmlns", "http://www.w3.org/1999/xhtml");
+ if (addBackground) {
+ div.attr("class", "labelBkg");
+ }
+ let bbox = div.node().getBoundingClientRect();
+ if (bbox.width === width) {
+ div.style("display", "table");
+ div.style("white-space", "break-spaces");
+ div.style("width", width + "px");
+ bbox = div.node().getBoundingClientRect();
+ }
+ fo.style("width", bbox.width);
+ fo.style("height", bbox.height);
+ return fo.node();
+}
+function createTspan(textElement, lineIndex, lineHeight) {
+ return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em");
+}
+function computeWidthOfText(parentNode, lineHeight, line) {
+ const testElement = parentNode.append("text");
+ const testSpan = createTspan(testElement, 1, lineHeight);
+ updateTextContentAndStyles(testSpan, line);
+ const textLength = testSpan.node().getComputedTextLength();
+ testElement.remove();
+ return textLength;
+}
+function computeDimensionOfText(parentNode, lineHeight, text) {
+ var _a;
+ const testElement = parentNode.append("text");
+ const testSpan = createTspan(testElement, 1, lineHeight);
+ updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]);
+ const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect();
+ if (textDimension) {
+ testElement.remove();
+ }
+ return textDimension;
+}
+function createFormattedText(width, g, structuredText, addBackground = false) {
+ const lineHeight = 1.1;
+ const labelGroup = g.append("g");
+ const bkg = labelGroup.insert("rect").attr("class", "background");
+ const textElement = labelGroup.append("text").attr("y", "-10.1");
+ let lineIndex = 0;
+ for (const line of structuredText) {
+ const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width;
+ const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth);
+ for (const preparedLine of linesUnderWidth) {
+ const tspan = createTspan(textElement, lineIndex, lineHeight);
+ updateTextContentAndStyles(tspan, preparedLine);
+ lineIndex++;
+ }
+ }
+ if (addBackground) {
+ const bbox = textElement.node().getBBox();
+ const padding = 2;
+ bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding);
+ return labelGroup.node();
+ } else {
+ return textElement.node();
+ }
+}
+function updateTextContentAndStyles(tspan, wrappedLine) {
+ tspan.text("");
+ wrappedLine.forEach((word, index) => {
+ const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal");
+ if (index === 0) {
+ innerTspan.text(word.content);
+ } else {
+ innerTspan.text(" " + word.content);
+ }
+ });
+}
+const createText = (el, text = "", {
+ style = "",
+ isTitle = false,
+ classes = "",
+ useHtmlLabels = true,
+ isNode = true,
+ width = 200,
+ addSvgBackground = false
+} = {}) => {
+ mermaid_f47111a7.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground);
+ if (useHtmlLabels) {
+ const htmlText = markdownToHTML(text);
+ const node = {
+ isNode,
+ label: (0,mermaid_f47111a7.M)(htmlText).replace(
+ /fa[blrs]?:fa-[\w-]+/g,
+ // cspell: disable-line
+ (s) => ``
+ ),
+ labelStyle: style.replace("fill:", "color:")
+ };
+ const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground);
+ return vertexNode;
+ } else {
+ const structuredText = markdownToLines(text);
+ const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground);
+ return svgLabel;
+ }
+};
+
+
+
+/***/ }),
+
+/***/ 8747:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ a: () => (/* binding */ insertMarkers$1),
+/* harmony export */ b: () => (/* binding */ clear$1),
+/* harmony export */ c: () => (/* binding */ createLabel$1),
+/* harmony export */ d: () => (/* binding */ clear),
+/* harmony export */ e: () => (/* binding */ insertNode),
+/* harmony export */ f: () => (/* binding */ insertEdgeLabel),
+/* harmony export */ g: () => (/* binding */ getSubGraphTitleMargins),
+/* harmony export */ h: () => (/* binding */ insertEdge),
+/* harmony export */ i: () => (/* binding */ intersectRect$1),
+/* harmony export */ j: () => (/* binding */ positionEdgeLabel),
+/* harmony export */ k: () => (/* binding */ getLineFunctionsWithOffset),
+/* harmony export */ l: () => (/* binding */ labelHelper),
+/* harmony export */ m: () => (/* binding */ addEdgeMarkers),
+/* harmony export */ p: () => (/* binding */ positionNode),
+/* harmony export */ s: () => (/* binding */ setNodeElem),
+/* harmony export */ u: () => (/* binding */ updateNodeBounds)
+/* harmony export */ });
+/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257);
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312);
+/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3791);
+
+
+
+const insertMarkers = (elem, markerArray, type, id) => {
+ markerArray.forEach((markerName) => {
+ markers[markerName](elem, type, id);
+ });
+};
+const extension = (elem, type, id) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id);
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
+};
+const composition = (elem, type, id) => {
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
+};
+const aggregation = (elem, type, id) => {
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
+};
+const dependency = (elem, type, id) => {
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
+};
+const lollipop = (elem, type, id) => {
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
+};
+const point = (elem, type, id) => {
+ elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
+ elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
+};
+const circle$1 = (elem, type, id) => {
+ elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
+ elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
+};
+const cross = (elem, type, id) => {
+ elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
+ elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
+};
+const barb = (elem, type, id) => {
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
+};
+const markers = {
+ extension,
+ composition,
+ aggregation,
+ dependency,
+ lollipop,
+ point,
+ circle: circle$1,
+ cross,
+ barb
+};
+const insertMarkers$1 = insertMarkers;
+function applyStyle(dom, styleFn) {
+ if (styleFn) {
+ dom.attr("style", styleFn);
+ }
+}
+function addHtmlLabel(node) {
+ const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject"));
+ const div = fo.append("xhtml:div");
+ const label = node.label;
+ const labelClass = node.isNode ? "nodeLabel" : "edgeLabel";
+ div.html(
+ '" + label + ""
+ );
+ applyStyle(div, node.labelStyle);
+ div.style("display", "inline-block");
+ div.style("white-space", "nowrap");
+ div.attr("xmlns", "http://www.w3.org/1999/xhtml");
+ return fo.node();
+}
+const createLabel = (_vertexText, style, isTitle, isNode) => {
+ let vertexText = _vertexText || "";
+ if (typeof vertexText === "object") {
+ vertexText = vertexText[0];
+ }
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ vertexText = vertexText.replace(/\\n|\n/g, "
");
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("vertexText" + vertexText);
+ const node = {
+ isNode,
+ label: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(vertexText).replace(
+ /fa[blrs]?:fa-[\w-]+/g,
+ // cspell: disable-line
+ (s) => ``
+ ),
+ labelStyle: style.replace("fill:", "color:")
+ };
+ let vertexNode = addHtmlLabel(node);
+ return vertexNode;
+ } else {
+ const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text");
+ svgLabel.setAttribute("style", style.replace("color:", "fill:"));
+ let rows = [];
+ if (typeof vertexText === "string") {
+ rows = vertexText.split(/\\n|\n|
/gi);
+ } else if (Array.isArray(vertexText)) {
+ rows = vertexText;
+ } else {
+ rows = [];
+ }
+ for (const row of rows) {
+ const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
+ tspan.setAttribute("dy", "1em");
+ tspan.setAttribute("x", "0");
+ if (isTitle) {
+ tspan.setAttribute("class", "title-row");
+ } else {
+ tspan.setAttribute("class", "row");
+ }
+ tspan.textContent = row.trim();
+ svgLabel.appendChild(tspan);
+ }
+ return svgLabel;
+ }
+};
+const createLabel$1 = createLabel;
+const labelHelper = async (parent, node, _classes, isNode) => {
+ let classes;
+ const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels);
+ if (!_classes) {
+ classes = "node default";
+ } else {
+ classes = _classes;
+ }
+ const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id);
+ const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle);
+ let labelText;
+ if (node.labelText === void 0) {
+ labelText = "";
+ } else {
+ labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0];
+ }
+ const textNode = label.node();
+ let text;
+ if (node.labelType === "markdown") {
+ text = (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()), {
+ useHtmlLabels,
+ width: node.width || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth,
+ classes: "markdown-node-label"
+ });
+ } else {
+ text = textNode.appendChild(
+ createLabel$1(
+ (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()),
+ node.labelStyle,
+ false,
+ isNode
+ )
+ );
+ }
+ let bbox = text.getBBox();
+ const halfPadding = node.padding / 2;
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text);
+ const images = div.getElementsByTagName("img");
+ if (images) {
+ const noImgText = labelText.replace(/]*>/g, "").trim() === "";
+ await Promise.all(
+ [...images].map(
+ (img) => new Promise((res) => {
+ function setupImage() {
+ img.style.display = "flex";
+ img.style.flexDirection = "column";
+ if (noImgText) {
+ const bodyFontSize = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize;
+ const enlargingFactor = 5;
+ const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px";
+ img.style.minWidth = width;
+ img.style.maxWidth = width;
+ } else {
+ img.style.width = "100%";
+ }
+ res(img);
+ }
+ setTimeout(() => {
+ if (img.complete) {
+ setupImage();
+ }
+ });
+ img.addEventListener("error", setupImage);
+ img.addEventListener("load", setupImage);
+ })
+ )
+ );
+ }
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ if (useHtmlLabels) {
+ label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
+ } else {
+ label.attr("transform", "translate(0, " + -bbox.height / 2 + ")");
+ }
+ if (node.centerLabel) {
+ label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
+ }
+ label.insert("rect", ":first-child");
+ return { shapeSvg, bbox, halfPadding, label };
+};
+const updateNodeBounds = (node, element) => {
+ const bbox = element.node().getBBox();
+ node.width = bbox.width;
+ node.height = bbox.height;
+};
+function insertPolygonShape(parent, w, h, points) {
+ return parent.insert("polygon", ":first-child").attr(
+ "points",
+ points.map(function(d) {
+ return d.x + "," + d.y;
+ }).join(" ")
+ ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")");
+}
+function intersectNode(node, point2) {
+ return node.intersect(point2);
+}
+function intersectEllipse(node, rx, ry, point2) {
+ var cx = node.x;
+ var cy = node.y;
+ var px = cx - point2.x;
+ var py = cy - point2.y;
+ var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);
+ var dx = Math.abs(rx * ry * px / det);
+ if (point2.x < cx) {
+ dx = -dx;
+ }
+ var dy = Math.abs(rx * ry * py / det);
+ if (point2.y < cy) {
+ dy = -dy;
+ }
+ return { x: cx + dx, y: cy + dy };
+}
+function intersectCircle(node, rx, point2) {
+ return intersectEllipse(node, rx, rx, point2);
+}
+function intersectLine(p1, p2, q1, q2) {
+ var a1, a2, b1, b2, c1, c2;
+ var r1, r2, r3, r4;
+ var denom, offset, num;
+ var x, y;
+ a1 = p2.y - p1.y;
+ b1 = p1.x - p2.x;
+ c1 = p2.x * p1.y - p1.x * p2.y;
+ r3 = a1 * q1.x + b1 * q1.y + c1;
+ r4 = a1 * q2.x + b1 * q2.y + c1;
+ if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {
+ return;
+ }
+ a2 = q2.y - q1.y;
+ b2 = q1.x - q2.x;
+ c2 = q2.x * q1.y - q1.x * q2.y;
+ r1 = a2 * p1.x + b2 * p1.y + c2;
+ r2 = a2 * p2.x + b2 * p2.y + c2;
+ if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {
+ return;
+ }
+ denom = a1 * b2 - a2 * b1;
+ if (denom === 0) {
+ return;
+ }
+ offset = Math.abs(denom / 2);
+ num = b1 * c2 - b2 * c1;
+ x = num < 0 ? (num - offset) / denom : (num + offset) / denom;
+ num = a2 * c1 - a1 * c2;
+ y = num < 0 ? (num - offset) / denom : (num + offset) / denom;
+ return { x, y };
+}
+function sameSign(r1, r2) {
+ return r1 * r2 > 0;
+}
+function intersectPolygon(node, polyPoints, point2) {
+ var x1 = node.x;
+ var y1 = node.y;
+ var intersections = [];
+ var minX = Number.POSITIVE_INFINITY;
+ var minY = Number.POSITIVE_INFINITY;
+ if (typeof polyPoints.forEach === "function") {
+ polyPoints.forEach(function(entry) {
+ minX = Math.min(minX, entry.x);
+ minY = Math.min(minY, entry.y);
+ });
+ } else {
+ minX = Math.min(minX, polyPoints.x);
+ minY = Math.min(minY, polyPoints.y);
+ }
+ var left = x1 - node.width / 2 - minX;
+ var top = y1 - node.height / 2 - minY;
+ for (var i = 0; i < polyPoints.length; i++) {
+ var p1 = polyPoints[i];
+ var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];
+ var intersect2 = intersectLine(
+ node,
+ point2,
+ { x: left + p1.x, y: top + p1.y },
+ { x: left + p2.x, y: top + p2.y }
+ );
+ if (intersect2) {
+ intersections.push(intersect2);
+ }
+ }
+ if (!intersections.length) {
+ return node;
+ }
+ if (intersections.length > 1) {
+ intersections.sort(function(p, q) {
+ var pdx = p.x - point2.x;
+ var pdy = p.y - point2.y;
+ var distp = Math.sqrt(pdx * pdx + pdy * pdy);
+ var qdx = q.x - point2.x;
+ var qdy = q.y - point2.y;
+ var distq = Math.sqrt(qdx * qdx + qdy * qdy);
+ return distp < distq ? -1 : distp === distq ? 0 : 1;
+ });
+ }
+ return intersections[0];
+}
+const intersectRect = (node, point2) => {
+ var x = node.x;
+ var y = node.y;
+ var dx = point2.x - x;
+ var dy = point2.y - y;
+ var w = node.width / 2;
+ var h = node.height / 2;
+ var sx, sy;
+ if (Math.abs(dy) * w > Math.abs(dx) * h) {
+ if (dy < 0) {
+ h = -h;
+ }
+ sx = dy === 0 ? 0 : h * dx / dy;
+ sy = h;
+ } else {
+ if (dx < 0) {
+ w = -w;
+ }
+ sx = w;
+ sy = dx === 0 ? 0 : w * dy / dx;
+ }
+ return { x: x + sx, y: y + sy };
+};
+const intersectRect$1 = intersectRect;
+const intersect = {
+ node: intersectNode,
+ circle: intersectCircle,
+ ellipse: intersectEllipse,
+ polygon: intersectPolygon,
+ rect: intersectRect$1
+};
+const note = async (parent, node) => {
+ const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels;
+ if (!useHtmlLabels) {
+ node.centerLabel = true;
+ }
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
+ parent,
+ node,
+ "node " + node.classes,
+ true
+ );
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+const note$1 = note;
+const expandAndDeduplicateDirections = (directions) => {
+ const uniqueDirections = /* @__PURE__ */ new Set();
+ for (const direction of directions) {
+ switch (direction) {
+ case "x":
+ uniqueDirections.add("right");
+ uniqueDirections.add("left");
+ break;
+ case "y":
+ uniqueDirections.add("up");
+ uniqueDirections.add("down");
+ break;
+ default:
+ uniqueDirections.add(direction);
+ break;
+ }
+ }
+ return uniqueDirections;
+};
+const getArrowPoints = (duplicatedDirections, bbox, node) => {
+ const directions = expandAndDeduplicateDirections(duplicatedDirections);
+ const f = 2;
+ const height = bbox.height + 2 * node.padding;
+ const midpoint = height / f;
+ const width = bbox.width + 2 * midpoint + node.padding;
+ const padding = node.padding / 2;
+ if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) {
+ return [
+ // Bottom
+ { x: 0, y: 0 },
+ { x: midpoint, y: 0 },
+ { x: width / 2, y: 2 * padding },
+ { x: width - midpoint, y: 0 },
+ { x: width, y: 0 },
+ // Right
+ { x: width, y: -height / 3 },
+ { x: width + 2 * padding, y: -height / 2 },
+ { x: width, y: -2 * height / 3 },
+ { x: width, y: -height },
+ // Top
+ { x: width - midpoint, y: -height },
+ { x: width / 2, y: -height - 2 * padding },
+ { x: midpoint, y: -height },
+ // Left
+ { x: 0, y: -height },
+ { x: 0, y: -2 * height / 3 },
+ { x: -2 * padding, y: -height / 2 },
+ { x: 0, y: -height / 3 }
+ ];
+ }
+ if (directions.has("right") && directions.has("left") && directions.has("up")) {
+ return [
+ { x: midpoint, y: 0 },
+ { x: width - midpoint, y: 0 },
+ { x: width, y: -height / 2 },
+ { x: width - midpoint, y: -height },
+ { x: midpoint, y: -height },
+ { x: 0, y: -height / 2 }
+ ];
+ }
+ if (directions.has("right") && directions.has("left") && directions.has("down")) {
+ return [
+ { x: 0, y: 0 },
+ { x: midpoint, y: -height },
+ { x: width - midpoint, y: -height },
+ { x: width, y: 0 }
+ ];
+ }
+ if (directions.has("right") && directions.has("up") && directions.has("down")) {
+ return [
+ { x: 0, y: 0 },
+ { x: width, y: -midpoint },
+ { x: width, y: -height + midpoint },
+ { x: 0, y: -height }
+ ];
+ }
+ if (directions.has("left") && directions.has("up") && directions.has("down")) {
+ return [
+ { x: width, y: 0 },
+ { x: 0, y: -midpoint },
+ { x: 0, y: -height + midpoint },
+ { x: width, y: -height }
+ ];
+ }
+ if (directions.has("right") && directions.has("left")) {
+ return [
+ { x: midpoint, y: 0 },
+ { x: midpoint, y: -padding },
+ { x: width - midpoint, y: -padding },
+ { x: width - midpoint, y: 0 },
+ { x: width, y: -height / 2 },
+ { x: width - midpoint, y: -height },
+ { x: width - midpoint, y: -height + padding },
+ { x: midpoint, y: -height + padding },
+ { x: midpoint, y: -height },
+ { x: 0, y: -height / 2 }
+ ];
+ }
+ if (directions.has("up") && directions.has("down")) {
+ return [
+ // Bottom center
+ { x: width / 2, y: 0 },
+ // Left pont of bottom arrow
+ { x: 0, y: -padding },
+ { x: midpoint, y: -padding },
+ // Left top over vertical section
+ { x: midpoint, y: -height + padding },
+ { x: 0, y: -height + padding },
+ // Top of arrow
+ { x: width / 2, y: -height },
+ { x: width, y: -height + padding },
+ // Top of right vertical bar
+ { x: width - midpoint, y: -height + padding },
+ { x: width - midpoint, y: -padding },
+ { x: width, y: -padding }
+ ];
+ }
+ if (directions.has("right") && directions.has("up")) {
+ return [
+ { x: 0, y: 0 },
+ { x: width, y: -midpoint },
+ { x: 0, y: -height }
+ ];
+ }
+ if (directions.has("right") && directions.has("down")) {
+ return [
+ { x: 0, y: 0 },
+ { x: width, y: 0 },
+ { x: 0, y: -height }
+ ];
+ }
+ if (directions.has("left") && directions.has("up")) {
+ return [
+ { x: width, y: 0 },
+ { x: 0, y: -midpoint },
+ { x: width, y: -height }
+ ];
+ }
+ if (directions.has("left") && directions.has("down")) {
+ return [
+ { x: width, y: 0 },
+ { x: 0, y: 0 },
+ { x: width, y: -height }
+ ];
+ }
+ if (directions.has("right")) {
+ return [
+ { x: midpoint, y: -padding },
+ { x: midpoint, y: -padding },
+ { x: width - midpoint, y: -padding },
+ { x: width - midpoint, y: 0 },
+ { x: width, y: -height / 2 },
+ { x: width - midpoint, y: -height },
+ { x: width - midpoint, y: -height + padding },
+ // top left corner of arrow
+ { x: midpoint, y: -height + padding },
+ { x: midpoint, y: -height + padding }
+ ];
+ }
+ if (directions.has("left")) {
+ return [
+ { x: midpoint, y: 0 },
+ { x: midpoint, y: -padding },
+ // Two points, the right corners
+ { x: width - midpoint, y: -padding },
+ { x: width - midpoint, y: -height + padding },
+ { x: midpoint, y: -height + padding },
+ { x: midpoint, y: -height },
+ { x: 0, y: -height / 2 }
+ ];
+ }
+ if (directions.has("up")) {
+ return [
+ // Bottom center
+ { x: midpoint, y: -padding },
+ // Left top over vertical section
+ { x: midpoint, y: -height + padding },
+ { x: 0, y: -height + padding },
+ // Top of arrow
+ { x: width / 2, y: -height },
+ { x: width, y: -height + padding },
+ // Top of right vertical bar
+ { x: width - midpoint, y: -height + padding },
+ { x: width - midpoint, y: -padding }
+ ];
+ }
+ if (directions.has("down")) {
+ return [
+ // Bottom center
+ { x: width / 2, y: 0 },
+ // Left pont of bottom arrow
+ { x: 0, y: -padding },
+ { x: midpoint, y: -padding },
+ // Left top over vertical section
+ { x: midpoint, y: -height + padding },
+ { x: width - midpoint, y: -height + padding },
+ { x: width - midpoint, y: -padding },
+ { x: width, y: -padding }
+ ];
+ }
+ return [{ x: 0, y: 0 }];
+};
+const formatClass = (str) => {
+ if (str) {
+ return " " + str;
+ }
+ return "";
+};
+const getClassesFromNode = (node, otherClasses) => {
+ return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass(
+ node.class
+ )}`;
+};
+const question = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const s = w + h;
+ const points = [
+ { x: s / 2, y: 0 },
+ { x: s, y: -s / 2 },
+ { x: s / 2, y: -s },
+ { x: 0, y: -s / 2 }
+ ];
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)");
+ const questionElem = insertPolygonShape(shapeSvg, s, s, points);
+ questionElem.attr("style", node.style);
+ updateNodeBounds(node, questionElem);
+ node.intersect = function(point2) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called");
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const choice = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
+ const s = 28;
+ const points = [
+ { x: 0, y: s / 2 },
+ { x: s / 2, y: 0 },
+ { x: 0, y: -s / 2 },
+ { x: -s / 2, y: 0 }
+ ];
+ const choice2 = shapeSvg.insert("polygon", ":first-child").attr(
+ "points",
+ points.map(function(d) {
+ return d.x + "," + d.y;
+ }).join(" ")
+ );
+ choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28);
+ node.width = 28;
+ node.height = 28;
+ node.intersect = function(point2) {
+ return intersect.circle(node, 14, point2);
+ };
+ return shapeSvg;
+};
+const hexagon = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const f = 4;
+ const h = bbox.height + node.padding;
+ const m = h / f;
+ const w = bbox.width + 2 * m + node.padding;
+ const points = [
+ { x: m, y: 0 },
+ { x: w - m, y: 0 },
+ { x: w, y: -h / 2 },
+ { x: w - m, y: -h },
+ { x: m, y: -h },
+ { x: 0, y: -h / 2 }
+ ];
+ const hex = insertPolygonShape(shapeSvg, w, h, points);
+ hex.attr("style", node.style);
+ updateNodeBounds(node, hex);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const block_arrow = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true);
+ const f = 2;
+ const h = bbox.height + 2 * node.padding;
+ const m = h / f;
+ const w = bbox.width + 2 * m + node.padding;
+ const points = getArrowPoints(node.directions, bbox, node);
+ const blockArrow = insertPolygonShape(shapeSvg, w, h, points);
+ blockArrow.attr("style", node.style);
+ updateNodeBounds(node, blockArrow);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const rect_left_inv_arrow = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: -h / 2, y: 0 },
+ { x: w, y: 0 },
+ { x: w, y: -h },
+ { x: -h / 2, y: -h },
+ { x: 0, y: -h / 2 }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ node.width = w + h;
+ node.height = h;
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const lean_right = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true);
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: -2 * h / 6, y: 0 },
+ { x: w - h / 6, y: 0 },
+ { x: w + 2 * h / 6, y: -h },
+ { x: h / 6, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const lean_left = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: 2 * h / 6, y: 0 },
+ { x: w + h / 6, y: 0 },
+ { x: w - 2 * h / 6, y: -h },
+ { x: -h / 6, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const trapezoid = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: -2 * h / 6, y: 0 },
+ { x: w + 2 * h / 6, y: 0 },
+ { x: w - h / 6, y: -h },
+ { x: h / 6, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const inv_trapezoid = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: h / 6, y: 0 },
+ { x: w - h / 6, y: 0 },
+ { x: w + 2 * h / 6, y: -h },
+ { x: -2 * h / 6, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const rect_right_inv_arrow = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: 0, y: 0 },
+ { x: w + h / 2, y: 0 },
+ { x: w, y: -h / 2 },
+ { x: w + h / 2, y: -h },
+ { x: 0, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const cylinder = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const rx = w / 2;
+ const ry = rx / (2.5 + w / 50);
+ const h = bbox.height + ry + node.padding;
+ const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h;
+ const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")");
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ const pos = intersect.rect(node, point2);
+ const x = pos.x - node.x;
+ if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {
+ let y = ry * ry * (1 - x * x / (rx * rx));
+ if (y != 0) {
+ y = Math.sqrt(y);
+ }
+ y = ry - y;
+ if (point2.y - node.y > 0) {
+ y = -y;
+ }
+ pos.y += y;
+ }
+ return pos;
+ };
+ return shapeSvg;
+};
+const rect = async (parent, node) => {
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
+ parent,
+ node,
+ "node " + node.classes + " " + node.class,
+ true
+ );
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const totalWidth = node.positioned ? node.width : bbox.width + node.padding;
+ const totalHeight = node.positioned ? node.height : bbox.height + node.padding;
+ const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;
+ const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;
+ rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight);
+ if (node.props) {
+ const propKeys = new Set(Object.keys(node.props));
+ if (node.props.borders) {
+ applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);
+ propKeys.delete("borders");
+ }
+ propKeys.forEach((propKey) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`);
+ });
+ }
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+const composite = async (parent, node) => {
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
+ parent,
+ node,
+ "node " + node.classes,
+ true
+ );
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const totalWidth = node.positioned ? node.width : bbox.width + node.padding;
+ const totalHeight = node.positioned ? node.height : bbox.height + node.padding;
+ const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;
+ const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;
+ rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight);
+ if (node.props) {
+ const propKeys = new Set(Object.keys(node.props));
+ if (node.props.borders) {
+ applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);
+ propKeys.delete("borders");
+ }
+ propKeys.forEach((propKey) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`);
+ });
+ }
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+const labelRect = async (parent, node) => {
+ const { shapeSvg } = await labelHelper(parent, node, "label", true);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const totalWidth = 0;
+ const totalHeight = 0;
+ rect2.attr("width", totalWidth).attr("height", totalHeight);
+ shapeSvg.attr("class", "label edgeLabel");
+ if (node.props) {
+ const propKeys = new Set(Object.keys(node.props));
+ if (node.props.borders) {
+ applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);
+ propKeys.delete("borders");
+ }
+ propKeys.forEach((propKey) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`);
+ });
+ }
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) {
+ const strokeDashArray = [];
+ const addBorder = (length) => {
+ strokeDashArray.push(length, 0);
+ };
+ const skipBorder = (length) => {
+ strokeDashArray.push(0, length);
+ };
+ if (borders.includes("t")) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border");
+ addBorder(totalWidth);
+ } else {
+ skipBorder(totalWidth);
+ }
+ if (borders.includes("r")) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border");
+ addBorder(totalHeight);
+ } else {
+ skipBorder(totalHeight);
+ }
+ if (borders.includes("b")) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border");
+ addBorder(totalWidth);
+ } else {
+ skipBorder(totalWidth);
+ }
+ if (borders.includes("l")) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border");
+ addBorder(totalHeight);
+ } else {
+ skipBorder(totalHeight);
+ }
+ rect2.attr("stroke-dasharray", strokeDashArray.join(" "));
+}
+const rectWithTitle = (parent, node) => {
+ let classes;
+ if (!node.classes) {
+ classes = "node default";
+ } else {
+ classes = "node " + node.classes;
+ }
+ const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const innerLine = shapeSvg.insert("line");
+ const label = shapeSvg.insert("g").attr("class", "label");
+ const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText;
+ let title = "";
+ if (typeof text2 === "object") {
+ title = text2[0];
+ } else {
+ title = text2;
+ }
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object");
+ const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true));
+ let bbox = { width: 0, height: 0 };
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2);
+ const textRows = text2.slice(1, text2.length);
+ let titleBox = text.getBBox();
+ const descr = label.node().appendChild(
+ createLabel$1(textRows.join ? textRows.join("
") : textRows, node.labelStyle, true, true)
+ );
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = descr.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ const halfPadding = node.padding / 2;
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr).attr(
+ "transform",
+ "translate( " + // (titleBox.width - bbox.width) / 2 +
+ (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")"
+ );
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text).attr(
+ "transform",
+ "translate( " + // (titleBox.width - bbox.width) / 2 +
+ (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)"
+ );
+ bbox = label.node().getBBox();
+ label.attr(
+ "transform",
+ "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")"
+ );
+ rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
+ innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+const stadium = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const h = bbox.height + node.padding;
+ const w = bbox.width + h / 4 + node.padding;
+ const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h);
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+const circle = async (parent, node) => {
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const circle2 = shapeSvg.insert("circle", ":first-child");
+ circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main");
+ updateNodeBounds(node, circle2);
+ node.intersect = function(point2) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2);
+ return intersect.circle(node, bbox.width / 2 + halfPadding, point2);
+ };
+ return shapeSvg;
+};
+const doublecircle = async (parent, node) => {
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const gap = 5;
+ const circleGroup = shapeSvg.insert("g", ":first-child");
+ const outerCircle = circleGroup.insert("circle");
+ const innerCircle = circleGroup.insert("circle");
+ circleGroup.attr("class", node.class);
+ outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2);
+ innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main");
+ updateNodeBounds(node, outerCircle);
+ node.intersect = function(point2) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2);
+ return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2);
+ };
+ return shapeSvg;
+};
+const subroutine = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: 0, y: 0 },
+ { x: w, y: 0 },
+ { x: w, y: -h },
+ { x: 0, y: -h },
+ { x: 0, y: 0 },
+ { x: -8, y: 0 },
+ { x: w + 8, y: 0 },
+ { x: w + 8, y: -h },
+ { x: -8, y: -h },
+ { x: -8, y: 0 }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const start = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
+ const circle2 = shapeSvg.insert("circle", ":first-child");
+ circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
+ updateNodeBounds(node, circle2);
+ node.intersect = function(point2) {
+ return intersect.circle(node, 7, point2);
+ };
+ return shapeSvg;
+};
+const forkJoin = (parent, node, dir) => {
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
+ let width = 70;
+ let height = 10;
+ if (dir === "LR") {
+ width = 10;
+ height = 70;
+ }
+ const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join");
+ updateNodeBounds(node, shape);
+ node.height = node.height + node.padding / 2;
+ node.width = node.width + node.padding / 2;
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+const end = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
+ const innerCircle = shapeSvg.insert("circle", ":first-child");
+ const circle2 = shapeSvg.insert("circle", ":first-child");
+ circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
+ innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10);
+ updateNodeBounds(node, circle2);
+ node.intersect = function(point2) {
+ return intersect.circle(node, 7, point2);
+ };
+ return shapeSvg;
+};
+const class_box = (parent, node) => {
+ const halfPadding = node.padding / 2;
+ const rowPadding = 4;
+ const lineHeight = 8;
+ let classes;
+ if (!node.classes) {
+ classes = "node default";
+ } else {
+ classes = "node " + node.classes;
+ }
+ const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const topLine = shapeSvg.insert("line");
+ const bottomLine = shapeSvg.insert("line");
+ let maxWidth = 0;
+ let maxHeight = rowPadding;
+ const labelContainer = shapeSvg.insert("g").attr("class", "label");
+ let verticalPos = 0;
+ const hasInterface = node.classData.annotations && node.classData.annotations[0];
+ const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : "";
+ const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true));
+ let interfaceBBox = interfaceLabel.getBBox();
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = interfaceLabel.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel);
+ interfaceBBox = div.getBoundingClientRect();
+ dv.attr("width", interfaceBBox.width);
+ dv.attr("height", interfaceBBox.height);
+ }
+ if (node.classData.annotations[0]) {
+ maxHeight += interfaceBBox.height + rowPadding;
+ maxWidth += interfaceBBox.width;
+ }
+ let classTitleString = node.classData.label;
+ if (node.classData.type !== void 0 && node.classData.type !== "") {
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) {
+ classTitleString += "<" + node.classData.type + ">";
+ } else {
+ classTitleString += "<" + node.classData.type + ">";
+ }
+ }
+ const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true));
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr("class", "classTitle");
+ let classTitleBBox = classTitleLabel.getBBox();
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = classTitleLabel.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel);
+ classTitleBBox = div.getBoundingClientRect();
+ dv.attr("width", classTitleBBox.width);
+ dv.attr("height", classTitleBBox.height);
+ }
+ maxHeight += classTitleBBox.height + rowPadding;
+ if (classTitleBBox.width > maxWidth) {
+ maxWidth = classTitleBBox.width;
+ }
+ const classAttributes = [];
+ node.classData.members.forEach((member) => {
+ const parsedInfo = member.getDisplayDetails();
+ let parsedText = parsedInfo.displayText;
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) {
+ parsedText = parsedText.replace(//g, ">");
+ }
+ const lbl = labelContainer.node().appendChild(
+ createLabel$1(
+ parsedText,
+ parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,
+ true,
+ true
+ )
+ );
+ let bbox = lbl.getBBox();
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = lbl.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ if (bbox.width > maxWidth) {
+ maxWidth = bbox.width;
+ }
+ maxHeight += bbox.height + rowPadding;
+ classAttributes.push(lbl);
+ });
+ maxHeight += lineHeight;
+ const classMethods = [];
+ node.classData.methods.forEach((member) => {
+ const parsedInfo = member.getDisplayDetails();
+ let displayText = parsedInfo.displayText;
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) {
+ displayText = displayText.replace(//g, ">");
+ }
+ const lbl = labelContainer.node().appendChild(
+ createLabel$1(
+ displayText,
+ parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,
+ true,
+ true
+ )
+ );
+ let bbox = lbl.getBBox();
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = lbl.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ if (bbox.width > maxWidth) {
+ maxWidth = bbox.width;
+ }
+ maxHeight += bbox.height + rowPadding;
+ classMethods.push(lbl);
+ });
+ maxHeight += lineHeight;
+ if (hasInterface) {
+ let diffX2 = (maxWidth - interfaceBBox.width) / 2;
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel).attr(
+ "transform",
+ "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")"
+ );
+ verticalPos = interfaceBBox.height + rowPadding;
+ }
+ let diffX = (maxWidth - classTitleBBox.width) / 2;
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr(
+ "transform",
+ "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")"
+ );
+ verticalPos += classTitleBBox.height + rowPadding;
+ topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);
+ verticalPos += lineHeight;
+ classAttributes.forEach((lbl) => {
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr(
+ "transform",
+ "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")"
+ );
+ const memberBBox = lbl == null ? void 0 : lbl.getBBox();
+ verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding;
+ });
+ verticalPos += lineHeight;
+ bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);
+ verticalPos += lineHeight;
+ classMethods.forEach((lbl) => {
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr(
+ "transform",
+ "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")"
+ );
+ const memberBBox = lbl == null ? void 0 : lbl.getBBox();
+ verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding;
+ });
+ rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding);
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+const shapes = {
+ rhombus: question,
+ composite,
+ question,
+ rect,
+ labelRect,
+ rectWithTitle,
+ choice,
+ circle,
+ doublecircle,
+ stadium,
+ hexagon,
+ block_arrow,
+ rect_left_inv_arrow,
+ lean_right,
+ lean_left,
+ trapezoid,
+ inv_trapezoid,
+ rect_right_inv_arrow,
+ cylinder,
+ start,
+ end,
+ note: note$1,
+ subroutine,
+ fork: forkJoin,
+ join: forkJoin,
+ class_box
+};
+let nodeElems = {};
+const insertNode = async (elem, node, dir) => {
+ let newEl;
+ let el;
+ if (node.link) {
+ let target;
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") {
+ target = "_top";
+ } else if (node.linkTarget) {
+ target = node.linkTarget || "_blank";
+ }
+ newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target);
+ el = await shapes[node.shape](newEl, node, dir);
+ } else {
+ el = await shapes[node.shape](elem, node, dir);
+ newEl = el;
+ }
+ if (node.tooltip) {
+ el.attr("title", node.tooltip);
+ }
+ if (node.class) {
+ el.attr("class", "node default " + node.class);
+ }
+ newEl.attr("data-node", "true");
+ newEl.attr("data-id", node.id);
+ nodeElems[node.id] = newEl;
+ if (node.haveCallback) {
+ nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable");
+ }
+ return newEl;
+};
+const setNodeElem = (elem, node) => {
+ nodeElems[node.id] = elem;
+};
+const clear$1 = () => {
+ nodeElems = {};
+};
+const positionNode = (node) => {
+ const el = nodeElems[node.id];
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace(
+ "Transforming node",
+ node.diff,
+ node,
+ "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")"
+ );
+ const padding = 8;
+ const diff = node.diff || 0;
+ if (node.clusterNode) {
+ el.attr(
+ "transform",
+ "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")"
+ );
+ } else {
+ el.attr("transform", "translate(" + node.x + ", " + node.y + ")");
+ }
+ return diff;
+};
+const getSubGraphTitleMargins = ({
+ flowchart
+}) => {
+ var _a, _b;
+ const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0;
+ const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0;
+ const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin;
+ return {
+ subGraphTitleTopMargin,
+ subGraphTitleBottomMargin,
+ subGraphTitleTotalMargin
+ };
+};
+const markerOffsets = {
+ aggregation: 18,
+ extension: 18,
+ composition: 18,
+ dependency: 6,
+ lollipop: 13.5,
+ arrow_point: 5.3
+};
+function calculateDeltaAndAngle(point1, point2) {
+ if (point1 === void 0 || point2 === void 0) {
+ return { angle: 0, deltaX: 0, deltaY: 0 };
+ }
+ point1 = pointTransformer(point1);
+ point2 = pointTransformer(point2);
+ const [x1, y1] = [point1.x, point1.y];
+ const [x2, y2] = [point2.x, point2.y];
+ const deltaX = x2 - x1;
+ const deltaY = y2 - y1;
+ return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY };
+}
+const pointTransformer = (data) => {
+ if (Array.isArray(data)) {
+ return { x: data[0], y: data[1] };
+ }
+ return data;
+};
+const getLineFunctionsWithOffset = (edge) => {
+ return {
+ x: function(d, i, data) {
+ let offset = 0;
+ if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) {
+ const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]);
+ offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1);
+ } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) {
+ const { angle, deltaX } = calculateDeltaAndAngle(
+ data[data.length - 1],
+ data[data.length - 2]
+ );
+ offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1);
+ }
+ return pointTransformer(d).x + offset;
+ },
+ y: function(d, i, data) {
+ let offset = 0;
+ if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) {
+ const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]);
+ offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1);
+ } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) {
+ const { angle, deltaY } = calculateDeltaAndAngle(
+ data[data.length - 1],
+ data[data.length - 2]
+ );
+ offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1);
+ }
+ return pointTransformer(d).y + offset;
+ }
+ };
+};
+const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => {
+ if (edge.arrowTypeStart) {
+ addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType);
+ }
+ if (edge.arrowTypeEnd) {
+ addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType);
+ }
+};
+const arrowTypesMap = {
+ arrow_cross: "cross",
+ arrow_point: "point",
+ arrow_barb: "barb",
+ arrow_circle: "circle",
+ aggregation: "aggregation",
+ extension: "extension",
+ composition: "composition",
+ dependency: "dependency",
+ lollipop: "lollipop"
+};
+const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => {
+ const endMarkerType = arrowTypesMap[arrowType];
+ if (!endMarkerType) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`);
+ return;
+ }
+ const suffix = position === "start" ? "Start" : "End";
+ svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`);
+};
+let edgeLabels = {};
+let terminalLabels = {};
+const clear = () => {
+ edgeLabels = {};
+ terminalLabels = {};
+};
+const insertEdgeLabel = (elem, edge) => {
+ const useHtmlLabels = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels);
+ const labelElement = edge.labelType === "markdown" ? (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, {
+ style: edge.labelStyle,
+ useHtmlLabels,
+ addSvgBackground: true
+ }) : createLabel$1(edge.label, edge.labelStyle);
+ const edgeLabel = elem.insert("g").attr("class", "edgeLabel");
+ const label = edgeLabel.insert("g").attr("class", "label");
+ label.node().appendChild(labelElement);
+ let bbox = labelElement.getBBox();
+ if (useHtmlLabels) {
+ const div = labelElement.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(labelElement);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
+ edgeLabels[edge.id] = edgeLabel;
+ edge.width = bbox.width;
+ edge.height = bbox.height;
+ let fo;
+ if (edge.startLabelLeft) {
+ const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle);
+ const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
+ const inner = startEdgeLabelLeft.insert("g").attr("class", "inner");
+ fo = inner.node().appendChild(startLabelElement);
+ const slBox = startLabelElement.getBBox();
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
+ if (!terminalLabels[edge.id]) {
+ terminalLabels[edge.id] = {};
+ }
+ terminalLabels[edge.id].startLeft = startEdgeLabelLeft;
+ setTerminalWidth(fo, edge.startLabelLeft);
+ }
+ if (edge.startLabelRight) {
+ const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle);
+ const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
+ const inner = startEdgeLabelRight.insert("g").attr("class", "inner");
+ fo = startEdgeLabelRight.node().appendChild(startLabelElement);
+ inner.node().appendChild(startLabelElement);
+ const slBox = startLabelElement.getBBox();
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
+ if (!terminalLabels[edge.id]) {
+ terminalLabels[edge.id] = {};
+ }
+ terminalLabels[edge.id].startRight = startEdgeLabelRight;
+ setTerminalWidth(fo, edge.startLabelRight);
+ }
+ if (edge.endLabelLeft) {
+ const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle);
+ const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
+ const inner = endEdgeLabelLeft.insert("g").attr("class", "inner");
+ fo = inner.node().appendChild(endLabelElement);
+ const slBox = endLabelElement.getBBox();
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
+ endEdgeLabelLeft.node().appendChild(endLabelElement);
+ if (!terminalLabels[edge.id]) {
+ terminalLabels[edge.id] = {};
+ }
+ terminalLabels[edge.id].endLeft = endEdgeLabelLeft;
+ setTerminalWidth(fo, edge.endLabelLeft);
+ }
+ if (edge.endLabelRight) {
+ const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle);
+ const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
+ const inner = endEdgeLabelRight.insert("g").attr("class", "inner");
+ fo = inner.node().appendChild(endLabelElement);
+ const slBox = endLabelElement.getBBox();
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
+ endEdgeLabelRight.node().appendChild(endLabelElement);
+ if (!terminalLabels[edge.id]) {
+ terminalLabels[edge.id] = {};
+ }
+ terminalLabels[edge.id].endRight = endEdgeLabelRight;
+ setTerminalWidth(fo, edge.endLabelRight);
+ }
+ return labelElement;
+};
+function setTerminalWidth(fo, value) {
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) {
+ fo.style.width = value.length * 9 + "px";
+ fo.style.height = "12px";
+ }
+}
+const positionEdgeLabel = (edge, paths) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths);
+ let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;
+ const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)();
+ const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);
+ if (edge.label) {
+ const el = edgeLabels[edge.id];
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(
+ "Moving label " + edge.label + " from (",
+ x,
+ ",",
+ y,
+ ") to (",
+ pos.x,
+ ",",
+ pos.y,
+ ") abc88"
+ );
+ if (paths.updatedPath) {
+ x = pos.x;
+ y = pos.y;
+ }
+ }
+ el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`);
+ }
+ if (edge.startLabelLeft) {
+ const el = terminalLabels[edge.id].startLeft;
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path);
+ x = pos.x;
+ y = pos.y;
+ }
+ el.attr("transform", `translate(${x}, ${y})`);
+ }
+ if (edge.startLabelRight) {
+ const el = terminalLabels[edge.id].startRight;
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(
+ edge.arrowTypeStart ? 10 : 0,
+ "start_right",
+ path
+ );
+ x = pos.x;
+ y = pos.y;
+ }
+ el.attr("transform", `translate(${x}, ${y})`);
+ }
+ if (edge.endLabelLeft) {
+ const el = terminalLabels[edge.id].endLeft;
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path);
+ x = pos.x;
+ y = pos.y;
+ }
+ el.attr("transform", `translate(${x}, ${y})`);
+ }
+ if (edge.endLabelRight) {
+ const el = terminalLabels[edge.id].endRight;
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path);
+ x = pos.x;
+ y = pos.y;
+ }
+ el.attr("transform", `translate(${x}, ${y})`);
+ }
+};
+const outsideNode = (node, point2) => {
+ const x = node.x;
+ const y = node.y;
+ const dx = Math.abs(point2.x - x);
+ const dy = Math.abs(point2.y - y);
+ const w = node.width / 2;
+ const h = node.height / 2;
+ if (dx >= w || dy >= h) {
+ return true;
+ }
+ return false;
+};
+const intersection = (node, outsidePoint, insidePoint) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`intersection calc abc89:
+ outsidePoint: ${JSON.stringify(outsidePoint)}
+ insidePoint : ${JSON.stringify(insidePoint)}
+ node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);
+ const x = node.x;
+ const y = node.y;
+ const dx = Math.abs(x - insidePoint.x);
+ const w = node.width / 2;
+ let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;
+ const h = node.height / 2;
+ const Q = Math.abs(outsidePoint.y - insidePoint.y);
+ const R = Math.abs(outsidePoint.x - insidePoint.x);
+ if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {
+ let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;
+ r = R * q / Q;
+ const res = {
+ x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,
+ y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q
+ };
+ if (r === 0) {
+ res.x = outsidePoint.x;
+ res.y = outsidePoint.y;
+ }
+ if (R === 0) {
+ res.x = outsidePoint.x;
+ }
+ if (Q === 0) {
+ res.y = outsidePoint.y;
+ }
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);
+ return res;
+ } else {
+ if (insidePoint.x < outsidePoint.x) {
+ r = outsidePoint.x - w - x;
+ } else {
+ r = x - w - outsidePoint.x;
+ }
+ let q = Q * r / R;
+ let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;
+ let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });
+ if (r === 0) {
+ _x = outsidePoint.x;
+ _y = outsidePoint.y;
+ }
+ if (R === 0) {
+ _x = outsidePoint.x;
+ }
+ if (Q === 0) {
+ _y = outsidePoint.y;
+ }
+ return { x: _x, y: _y };
+ }
+};
+const cutPathAtIntersect = (_points, boundaryNode) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 cutPathAtIntersect", _points, boundaryNode);
+ let points = [];
+ let lastPointOutside = _points[0];
+ let isInside = false;
+ _points.forEach((point2) => {
+ if (!outsideNode(boundaryNode, point2) && !isInside) {
+ const inter = intersection(boundaryNode, lastPointOutside, point2);
+ let pointPresent = false;
+ points.forEach((p) => {
+ pointPresent = pointPresent || p.x === inter.x && p.y === inter.y;
+ });
+ if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {
+ points.push(inter);
+ }
+ isInside = true;
+ } else {
+ lastPointOutside = point2;
+ if (!isInside) {
+ points.push(point2);
+ }
+ }
+ });
+ return points;
+};
+const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) {
+ let points = edge.points;
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 InsertEdge: edge=", edge, "e=", e);
+ let pointsHasChanged = false;
+ const tail = graph.node(e.v);
+ var head = graph.node(e.w);
+ if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) {
+ points = points.slice(1, edge.points.length - 1);
+ points.unshift(tail.intersect(points[0]));
+ points.push(head.intersect(points[points.length - 1]));
+ }
+ if (edge.toCluster) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("to cluster abc88", clusterDb[edge.toCluster]);
+ points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);
+ pointsHasChanged = true;
+ }
+ if (edge.fromCluster) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("from cluster abc88", clusterDb[edge.fromCluster]);
+ points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse();
+ pointsHasChanged = true;
+ }
+ const lineData = points.filter((p) => !Number.isNaN(p.y));
+ let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM;
+ if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) {
+ curve = edge.curve;
+ }
+ const { x, y } = getLineFunctionsWithOffset(edge);
+ const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(curve);
+ let strokeClasses;
+ switch (edge.thickness) {
+ case "normal":
+ strokeClasses = "edge-thickness-normal";
+ break;
+ case "thick":
+ strokeClasses = "edge-thickness-thick";
+ break;
+ case "invisible":
+ strokeClasses = "edge-thickness-thick";
+ break;
+ default:
+ strokeClasses = "";
+ }
+ switch (edge.pattern) {
+ case "solid":
+ strokeClasses += " edge-pattern-solid";
+ break;
+ case "dotted":
+ strokeClasses += " edge-pattern-dotted";
+ break;
+ case "dashed":
+ strokeClasses += " edge-pattern-dashed";
+ break;
+ }
+ const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style);
+ let url = "";
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) {
+ url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
+ url = url.replace(/\(/g, "\\(");
+ url = url.replace(/\)/g, "\\)");
+ }
+ addEdgeMarkers(svgPath, edge, url, id, diagramType);
+ let paths = {};
+ if (pointsHasChanged) {
+ paths.updatedPath = points;
+ }
+ paths.originalPath = edge.points;
+ return paths;
+};
+
+
+
+/***/ }),
+
+/***/ 6216:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ d: () => (/* binding */ db),
+/* harmony export */ f: () => (/* binding */ flowDb),
+/* harmony export */ p: () => (/* binding */ parser$1)
+/* harmony export */ });
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312);
+/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257);
+
+
+var parser = function() {
+ var o = function(k, v, o2, l) {
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
+ ;
+ return o2;
+ }, $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [1, 8, 9, 10, 11, 27, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $V4 = [2, 2], $V5 = [1, 13], $V6 = [1, 14], $V7 = [1, 15], $V8 = [1, 16], $V9 = [1, 23], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 49], $Ve = [1, 48], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 44], $Vl = [1, 46], $Vm = [1, 42], $Vn = [1, 47], $Vo = [1, 43], $Vp = [1, 50], $Vq = [1, 45], $Vr = [1, 51], $Vs = [1, 52], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 57], $Vy = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vz = [1, 61], $VA = [1, 60], $VB = [1, 62], $VC = [8, 9, 11, 73, 75], $VD = [1, 88], $VE = [1, 93], $VF = [1, 92], $VG = [1, 89], $VH = [1, 85], $VI = [1, 91], $VJ = [1, 87], $VK = [1, 94], $VL = [1, 90], $VM = [1, 95], $VN = [1, 86], $VO = [8, 9, 10, 11, 73, 75], $VP = [8, 9, 10, 11, 44, 73, 75], $VQ = [8, 9, 10, 11, 29, 42, 44, 46, 48, 50, 52, 54, 56, 58, 61, 63, 65, 66, 68, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VR = [8, 9, 11, 42, 58, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VS = [42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VT = [1, 121], $VU = [1, 120], $VV = [1, 128], $VW = [1, 142], $VX = [1, 143], $VY = [1, 144], $VZ = [1, 145], $V_ = [1, 130], $V$ = [1, 132], $V01 = [1, 136], $V11 = [1, 137], $V21 = [1, 138], $V31 = [1, 139], $V41 = [1, 140], $V51 = [1, 141], $V61 = [1, 146], $V71 = [1, 147], $V81 = [1, 126], $V91 = [1, 127], $Va1 = [1, 134], $Vb1 = [1, 129], $Vc1 = [1, 133], $Vd1 = [1, 131], $Ve1 = [8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vf1 = [1, 149], $Vg1 = [8, 9, 11], $Vh1 = [8, 9, 10, 11, 14, 42, 58, 86, 102, 103, 106, 108, 111, 112, 113], $Vi1 = [1, 169], $Vj1 = [1, 165], $Vk1 = [1, 166], $Vl1 = [1, 170], $Vm1 = [1, 167], $Vn1 = [1, 168], $Vo1 = [75, 113, 116], $Vp1 = [8, 9, 10, 11, 12, 14, 27, 29, 32, 42, 58, 73, 81, 82, 83, 84, 85, 86, 87, 102, 106, 108, 111, 112, 113], $Vq1 = [10, 103], $Vr1 = [31, 47, 49, 51, 53, 55, 60, 62, 64, 65, 67, 69, 113, 114, 115], $Vs1 = [1, 235], $Vt1 = [1, 233], $Vu1 = [1, 237], $Vv1 = [1, 231], $Vw1 = [1, 232], $Vx1 = [1, 234], $Vy1 = [1, 236], $Vz1 = [1, 238], $VA1 = [1, 255], $VB1 = [8, 9, 11, 103], $VC1 = [8, 9, 10, 11, 58, 81, 102, 103, 106, 107, 108, 109];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "graphConfig": 4, "document": 5, "line": 6, "statement": 7, "SEMI": 8, "NEWLINE": 9, "SPACE": 10, "EOF": 11, "GRAPH": 12, "NODIR": 13, "DIR": 14, "FirstStmtSeparator": 15, "ending": 16, "endToken": 17, "spaceList": 18, "spaceListNewline": 19, "vertexStatement": 20, "separator": 21, "styleStatement": 22, "linkStyleStatement": 23, "classDefStatement": 24, "classStatement": 25, "clickStatement": 26, "subgraph": 27, "textNoTags": 28, "SQS": 29, "text": 30, "SQE": 31, "end": 32, "direction": 33, "acc_title": 34, "acc_title_value": 35, "acc_descr": 36, "acc_descr_value": 37, "acc_descr_multiline_value": 38, "link": 39, "node": 40, "styledVertex": 41, "AMP": 42, "vertex": 43, "STYLE_SEPARATOR": 44, "idString": 45, "DOUBLECIRCLESTART": 46, "DOUBLECIRCLEEND": 47, "PS": 48, "PE": 49, "(-": 50, "-)": 51, "STADIUMSTART": 52, "STADIUMEND": 53, "SUBROUTINESTART": 54, "SUBROUTINEEND": 55, "VERTEX_WITH_PROPS_START": 56, "NODE_STRING[field]": 57, "COLON": 58, "NODE_STRING[value]": 59, "PIPE": 60, "CYLINDERSTART": 61, "CYLINDEREND": 62, "DIAMOND_START": 63, "DIAMOND_STOP": 64, "TAGEND": 65, "TRAPSTART": 66, "TRAPEND": 67, "INVTRAPSTART": 68, "INVTRAPEND": 69, "linkStatement": 70, "arrowText": 71, "TESTSTR": 72, "START_LINK": 73, "edgeText": 74, "LINK": 75, "edgeTextToken": 76, "STR": 77, "MD_STR": 78, "textToken": 79, "keywords": 80, "STYLE": 81, "LINKSTYLE": 82, "CLASSDEF": 83, "CLASS": 84, "CLICK": 85, "DOWN": 86, "UP": 87, "textNoTagsToken": 88, "stylesOpt": 89, "idString[vertex]": 90, "idString[class]": 91, "CALLBACKNAME": 92, "CALLBACKARGS": 93, "HREF": 94, "LINK_TARGET": 95, "STR[link]": 96, "STR[tooltip]": 97, "alphaNum": 98, "DEFAULT": 99, "numList": 100, "INTERPOLATE": 101, "NUM": 102, "COMMA": 103, "style": 104, "styleComponent": 105, "NODE_STRING": 106, "UNIT": 107, "BRKT": 108, "PCT": 109, "idStringToken": 110, "MINUS": 111, "MULT": 112, "UNICODE_TEXT": 113, "TEXT": 114, "TAGSTART": 115, "EDGE_TEXT": 116, "alphaNumToken": 117, "direction_tb": 118, "direction_bt": 119, "direction_rl": 120, "direction_lr": 121, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 8: "SEMI", 9: "NEWLINE", 10: "SPACE", 11: "EOF", 12: "GRAPH", 13: "NODIR", 14: "DIR", 27: "subgraph", 29: "SQS", 31: "SQE", 32: "end", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 42: "AMP", 44: "STYLE_SEPARATOR", 46: "DOUBLECIRCLESTART", 47: "DOUBLECIRCLEEND", 48: "PS", 49: "PE", 50: "(-", 51: "-)", 52: "STADIUMSTART", 53: "STADIUMEND", 54: "SUBROUTINESTART", 55: "SUBROUTINEEND", 56: "VERTEX_WITH_PROPS_START", 57: "NODE_STRING[field]", 58: "COLON", 59: "NODE_STRING[value]", 60: "PIPE", 61: "CYLINDERSTART", 62: "CYLINDEREND", 63: "DIAMOND_START", 64: "DIAMOND_STOP", 65: "TAGEND", 66: "TRAPSTART", 67: "TRAPEND", 68: "INVTRAPSTART", 69: "INVTRAPEND", 72: "TESTSTR", 73: "START_LINK", 75: "LINK", 77: "STR", 78: "MD_STR", 81: "STYLE", 82: "LINKSTYLE", 83: "CLASSDEF", 84: "CLASS", 85: "CLICK", 86: "DOWN", 87: "UP", 90: "idString[vertex]", 91: "idString[class]", 92: "CALLBACKNAME", 93: "CALLBACKARGS", 94: "HREF", 95: "LINK_TARGET", 96: "STR[link]", 97: "STR[tooltip]", 99: "DEFAULT", 101: "INTERPOLATE", 102: "NUM", 103: "COMMA", 106: "NODE_STRING", 107: "UNIT", 108: "BRKT", 109: "PCT", 111: "MINUS", 112: "MULT", 113: "UNICODE_TEXT", 114: "TEXT", 115: "TAGSTART", 116: "EDGE_TEXT", 118: "direction_tb", 119: "direction_bt", 120: "direction_rl", 121: "direction_lr" },
+ productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 2], [4, 3], [16, 2], [16, 1], [17, 1], [17, 1], [17, 1], [15, 1], [15, 1], [15, 2], [19, 2], [19, 2], [19, 1], [19, 1], [18, 2], [18, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 4], [7, 1], [7, 2], [7, 2], [7, 1], [21, 1], [21, 1], [21, 1], [20, 3], [20, 4], [20, 2], [20, 1], [40, 1], [40, 5], [41, 1], [41, 3], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 8], [43, 4], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 4], [43, 4], [43, 1], [39, 2], [39, 3], [39, 3], [39, 1], [39, 3], [74, 1], [74, 2], [74, 1], [74, 1], [70, 1], [71, 3], [30, 1], [30, 2], [30, 1], [30, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [28, 1], [28, 2], [28, 1], [28, 1], [24, 5], [25, 5], [26, 2], [26, 4], [26, 3], [26, 5], [26, 3], [26, 5], [26, 5], [26, 7], [26, 2], [26, 4], [26, 2], [26, 4], [26, 4], [26, 6], [22, 5], [23, 5], [23, 5], [23, 9], [23, 9], [23, 7], [23, 7], [100, 1], [100, 3], [89, 1], [89, 3], [104, 1], [104, 2], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [79, 1], [79, 1], [79, 1], [79, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [76, 1], [76, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [45, 1], [45, 2], [98, 1], [98, 2], [33, 1], [33, 1], [33, 1], [33, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 2:
+ this.$ = [];
+ break;
+ case 3:
+ if (!Array.isArray($$[$0]) || $$[$0].length > 0) {
+ $$[$0 - 1].push($$[$0]);
+ }
+ this.$ = $$[$0 - 1];
+ break;
+ case 4:
+ case 176:
+ this.$ = $$[$0];
+ break;
+ case 11:
+ yy.setDirection("TB");
+ this.$ = "TB";
+ break;
+ case 12:
+ yy.setDirection($$[$0 - 1]);
+ this.$ = $$[$0 - 1];
+ break;
+ case 27:
+ this.$ = $$[$0 - 1].nodes;
+ break;
+ case 28:
+ case 29:
+ case 30:
+ case 31:
+ case 32:
+ this.$ = [];
+ break;
+ case 33:
+ this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]);
+ break;
+ case 34:
+ this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]);
+ break;
+ case 35:
+ this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0);
+ break;
+ case 37:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 38:
+ case 39:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 43:
+ yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]);
+ this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) };
+ break;
+ case 44:
+ yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]);
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) };
+ break;
+ case 45:
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] };
+ break;
+ case 46:
+ this.$ = { stmt: $$[$0], nodes: $$[$0] };
+ break;
+ case 47:
+ this.$ = [$$[$0]];
+ break;
+ case 48:
+ this.$ = $$[$0 - 4].concat($$[$0]);
+ break;
+ case 49:
+ this.$ = $$[$0];
+ break;
+ case 50:
+ this.$ = $$[$0 - 2];
+ yy.setClass($$[$0 - 2], $$[$0]);
+ break;
+ case 51:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "square");
+ break;
+ case 52:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle");
+ break;
+ case 53:
+ this.$ = $$[$0 - 5];
+ yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle");
+ break;
+ case 54:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse");
+ break;
+ case 55:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium");
+ break;
+ case 56:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine");
+ break;
+ case 57:
+ this.$ = $$[$0 - 7];
+ yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]]));
+ break;
+ case 58:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder");
+ break;
+ case 59:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "round");
+ break;
+ case 60:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond");
+ break;
+ case 61:
+ this.$ = $$[$0 - 5];
+ yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon");
+ break;
+ case 62:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd");
+ break;
+ case 63:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid");
+ break;
+ case 64:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid");
+ break;
+ case 65:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right");
+ break;
+ case 66:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left");
+ break;
+ case 67:
+ this.$ = $$[$0];
+ yy.addVertex($$[$0]);
+ break;
+ case 68:
+ $$[$0 - 1].text = $$[$0];
+ this.$ = $$[$0 - 1];
+ break;
+ case 69:
+ case 70:
+ $$[$0 - 2].text = $$[$0 - 1];
+ this.$ = $$[$0 - 2];
+ break;
+ case 71:
+ this.$ = $$[$0];
+ break;
+ case 72:
+ var inf = yy.destructLink($$[$0], $$[$0 - 2]);
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] };
+ break;
+ case 73:
+ this.$ = { text: $$[$0], type: "text" };
+ break;
+ case 74:
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
+ break;
+ case 75:
+ this.$ = { text: $$[$0], type: "string" };
+ break;
+ case 76:
+ this.$ = { text: $$[$0], type: "markdown" };
+ break;
+ case 77:
+ var inf = yy.destructLink($$[$0]);
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length };
+ break;
+ case 78:
+ this.$ = $$[$0 - 1];
+ break;
+ case 79:
+ this.$ = { text: $$[$0], type: "text" };
+ break;
+ case 80:
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
+ break;
+ case 81:
+ this.$ = { text: $$[$0], type: "string" };
+ break;
+ case 82:
+ case 97:
+ this.$ = { text: $$[$0], type: "markdown" };
+ break;
+ case 94:
+ this.$ = { text: $$[$0], type: "text" };
+ break;
+ case 95:
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
+ break;
+ case 96:
+ this.$ = { text: $$[$0], type: "text" };
+ break;
+ case 98:
+ this.$ = $$[$0 - 4];
+ yy.addClass($$[$0 - 2], $$[$0]);
+ break;
+ case 99:
+ this.$ = $$[$0 - 4];
+ yy.setClass($$[$0 - 2], $$[$0]);
+ break;
+ case 100:
+ case 108:
+ this.$ = $$[$0 - 1];
+ yy.setClickEvent($$[$0 - 1], $$[$0]);
+ break;
+ case 101:
+ case 109:
+ this.$ = $$[$0 - 3];
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2]);
+ yy.setTooltip($$[$0 - 3], $$[$0]);
+ break;
+ case 102:
+ this.$ = $$[$0 - 2];
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
+ break;
+ case 103:
+ this.$ = $$[$0 - 4];
+ yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]);
+ yy.setTooltip($$[$0 - 4], $$[$0]);
+ break;
+ case 104:
+ this.$ = $$[$0 - 2];
+ yy.setLink($$[$0 - 2], $$[$0]);
+ break;
+ case 105:
+ this.$ = $$[$0 - 4];
+ yy.setLink($$[$0 - 4], $$[$0 - 2]);
+ yy.setTooltip($$[$0 - 4], $$[$0]);
+ break;
+ case 106:
+ this.$ = $$[$0 - 4];
+ yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
+ break;
+ case 107:
+ this.$ = $$[$0 - 6];
+ yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]);
+ yy.setTooltip($$[$0 - 6], $$[$0 - 2]);
+ break;
+ case 110:
+ this.$ = $$[$0 - 1];
+ yy.setLink($$[$0 - 1], $$[$0]);
+ break;
+ case 111:
+ this.$ = $$[$0 - 3];
+ yy.setLink($$[$0 - 3], $$[$0 - 2]);
+ yy.setTooltip($$[$0 - 3], $$[$0]);
+ break;
+ case 112:
+ this.$ = $$[$0 - 3];
+ yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
+ break;
+ case 113:
+ this.$ = $$[$0 - 5];
+ yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]);
+ yy.setTooltip($$[$0 - 5], $$[$0 - 2]);
+ break;
+ case 114:
+ this.$ = $$[$0 - 4];
+ yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]);
+ break;
+ case 115:
+ this.$ = $$[$0 - 4];
+ yy.updateLink([$$[$0 - 2]], $$[$0]);
+ break;
+ case 116:
+ this.$ = $$[$0 - 4];
+ yy.updateLink($$[$0 - 2], $$[$0]);
+ break;
+ case 117:
+ this.$ = $$[$0 - 8];
+ yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]);
+ yy.updateLink([$$[$0 - 6]], $$[$0]);
+ break;
+ case 118:
+ this.$ = $$[$0 - 8];
+ yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]);
+ yy.updateLink($$[$0 - 6], $$[$0]);
+ break;
+ case 119:
+ this.$ = $$[$0 - 6];
+ yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]);
+ break;
+ case 120:
+ this.$ = $$[$0 - 6];
+ yy.updateLinkInterpolate($$[$0 - 4], $$[$0]);
+ break;
+ case 121:
+ case 123:
+ this.$ = [$$[$0]];
+ break;
+ case 122:
+ case 124:
+ $$[$0 - 2].push($$[$0]);
+ this.$ = $$[$0 - 2];
+ break;
+ case 126:
+ this.$ = $$[$0 - 1] + $$[$0];
+ break;
+ case 174:
+ this.$ = $$[$0];
+ break;
+ case 175:
+ this.$ = $$[$0 - 1] + "" + $$[$0];
+ break;
+ case 177:
+ this.$ = $$[$0 - 1] + "" + $$[$0];
+ break;
+ case 178:
+ this.$ = { stmt: "dir", value: "TB" };
+ break;
+ case 179:
+ this.$ = { stmt: "dir", value: "BT" };
+ break;
+ case 180:
+ this.$ = { stmt: "dir", value: "RL" };
+ break;
+ case 181:
+ this.$ = { stmt: "dir", value: "LR" };
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: 2, 9: $V0, 10: $V1, 12: $V2 }, { 1: [3] }, o($V3, $V4, { 5: 6 }), { 4: 7, 9: $V0, 10: $V1, 12: $V2 }, { 4: 8, 9: $V0, 10: $V1, 12: $V2 }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: $Vx, 15: 53, 18: 56 }, o($Vy, [2, 3]), o($Vy, [2, 4]), o($Vy, [2, 5]), o($Vy, [2, 6]), o($Vy, [2, 7]), o($Vy, [2, 8]), { 8: $Vz, 9: $VA, 11: $VB, 21: 58, 39: 59, 70: 63, 73: [1, 64], 75: [1, 65] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 66 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 67 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 68 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 69 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 70 }, { 8: $Vz, 9: $VA, 10: [1, 71], 11: $VB, 21: 72 }, o($Vy, [2, 36]), { 35: [1, 73] }, { 37: [1, 74] }, o($Vy, [2, 39]), o($VC, [2, 46], { 18: 75, 10: $Vx }), { 10: [1, 76] }, { 10: [1, 77] }, { 10: [1, 78] }, { 10: [1, 79] }, { 14: $VD, 42: $VE, 58: $VF, 77: [1, 83], 86: $VG, 92: [1, 80], 94: [1, 81], 98: 82, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, o($Vy, [2, 178]), o($Vy, [2, 179]), o($Vy, [2, 180]), o($Vy, [2, 181]), o($VO, [2, 47]), o($VO, [2, 49], { 44: [1, 96] }), o($VP, [2, 67], { 110: 109, 29: [1, 97], 42: $Vd, 46: [1, 98], 48: [1, 99], 50: [1, 100], 52: [1, 101], 54: [1, 102], 56: [1, 103], 58: $Ve, 61: [1, 104], 63: [1, 105], 65: [1, 106], 66: [1, 107], 68: [1, 108], 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($VQ, [2, 174]), o($VQ, [2, 135]), o($VQ, [2, 136]), o($VQ, [2, 137]), o($VQ, [2, 138]), o($VQ, [2, 139]), o($VQ, [2, 140]), o($VQ, [2, 141]), o($VQ, [2, 142]), o($VQ, [2, 143]), o($VQ, [2, 144]), o($VQ, [2, 145]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 110] }, o($VR, [2, 26], { 18: 111, 10: $Vx }), o($Vy, [2, 27]), { 40: 112, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vy, [2, 40]), o($Vy, [2, 41]), o($Vy, [2, 42]), o($VS, [2, 71], { 71: 113, 60: [1, 115], 72: [1, 114] }), { 74: 116, 76: 117, 77: [1, 118], 78: [1, 119], 113: $VT, 116: $VU }, o([42, 58, 60, 72, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 77]), o($Vy, [2, 28]), o($Vy, [2, 29]), o($Vy, [2, 30]), o($Vy, [2, 31]), o($Vy, [2, 32]), { 10: $VV, 12: $VW, 14: $VX, 27: $VY, 28: 122, 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 77: [1, 124], 78: [1, 125], 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 123, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Ve1, $V4, { 5: 148 }), o($Vy, [2, 37]), o($Vy, [2, 38]), o($VC, [2, 45], { 42: $Vf1 }), { 42: $Vd, 45: 150, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 99: [1, 151], 100: 152, 102: [1, 153] }, { 42: $Vd, 45: 154, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 42: $Vd, 45: 155, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 100], { 10: [1, 156], 93: [1, 157] }), { 77: [1, 158] }, o($Vg1, [2, 108], { 117: 160, 10: [1, 159], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 110], { 10: [1, 161] }), o($Vh1, [2, 176]), o($Vh1, [2, 163]), o($Vh1, [2, 164]), o($Vh1, [2, 165]), o($Vh1, [2, 166]), o($Vh1, [2, 167]), o($Vh1, [2, 168]), o($Vh1, [2, 169]), o($Vh1, [2, 170]), o($Vh1, [2, 171]), o($Vh1, [2, 172]), o($Vh1, [2, 173]), { 42: $Vd, 45: 162, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 30: 163, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 171, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 173, 48: [1, 172], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 174, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 175, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 176, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 106: [1, 177] }, { 30: 178, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 179, 63: [1, 180], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 181, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 182, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 183, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VQ, [2, 175]), o($V3, [2, 20]), o($VR, [2, 25]), o($VC, [2, 43], { 18: 184, 10: $Vx }), o($VS, [2, 68], { 10: [1, 185] }), { 10: [1, 186] }, { 30: 187, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 75: [1, 188], 76: 189, 113: $VT, 116: $VU }, o($Vo1, [2, 73]), o($Vo1, [2, 75]), o($Vo1, [2, 76]), o($Vo1, [2, 161]), o($Vo1, [2, 162]), { 8: $Vz, 9: $VA, 10: $VV, 11: $VB, 12: $VW, 14: $VX, 21: 191, 27: $VY, 29: [1, 190], 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 192, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Vp1, [2, 94]), o($Vp1, [2, 96]), o($Vp1, [2, 97]), o($Vp1, [2, 150]), o($Vp1, [2, 151]), o($Vp1, [2, 152]), o($Vp1, [2, 153]), o($Vp1, [2, 154]), o($Vp1, [2, 155]), o($Vp1, [2, 156]), o($Vp1, [2, 157]), o($Vp1, [2, 158]), o($Vp1, [2, 159]), o($Vp1, [2, 160]), o($Vp1, [2, 83]), o($Vp1, [2, 84]), o($Vp1, [2, 85]), o($Vp1, [2, 86]), o($Vp1, [2, 87]), o($Vp1, [2, 88]), o($Vp1, [2, 89]), o($Vp1, [2, 90]), o($Vp1, [2, 91]), o($Vp1, [2, 92]), o($Vp1, [2, 93]), { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 193], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vx, 18: 194 }, { 10: [1, 195], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 196] }, { 10: [1, 197], 103: [1, 198] }, o($Vq1, [2, 121]), { 10: [1, 199], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 200], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 77: [1, 201] }, o($Vg1, [2, 102], { 10: [1, 202] }), o($Vg1, [2, 104], { 10: [1, 203] }), { 77: [1, 204] }, o($Vh1, [2, 177]), { 77: [1, 205], 95: [1, 206] }, o($VO, [2, 50], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), { 31: [1, 207], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Vr1, [2, 79]), o($Vr1, [2, 81]), o($Vr1, [2, 82]), o($Vr1, [2, 146]), o($Vr1, [2, 147]), o($Vr1, [2, 148]), o($Vr1, [2, 149]), { 47: [1, 209], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 210, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 49: [1, 211], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 51: [1, 212], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 53: [1, 213], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 55: [1, 214], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 58: [1, 215] }, { 62: [1, 216], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 64: [1, 217], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 218, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 31: [1, 219], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 220], 69: [1, 221], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 223], 69: [1, 222], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VC, [2, 44], { 42: $Vf1 }), o($VS, [2, 70]), o($VS, [2, 69]), { 60: [1, 224], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VS, [2, 72]), o($Vo1, [2, 74]), { 30: 225, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Ve1, $V4, { 5: 226 }), o($Vp1, [2, 95]), o($Vy, [2, 35]), { 41: 227, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 228, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 239, 101: [1, 240], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 241, 101: [1, 242], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 102: [1, 243] }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 244, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 42: $Vd, 45: 245, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 101]), { 77: [1, 246] }, { 77: [1, 247], 95: [1, 248] }, o($Vg1, [2, 109]), o($Vg1, [2, 111], { 10: [1, 249] }), o($Vg1, [2, 112]), o($VP, [2, 51]), o($Vr1, [2, 80]), o($VP, [2, 52]), { 49: [1, 250], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 59]), o($VP, [2, 54]), o($VP, [2, 55]), o($VP, [2, 56]), { 106: [1, 251] }, o($VP, [2, 58]), o($VP, [2, 60]), { 64: [1, 252], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 62]), o($VP, [2, 63]), o($VP, [2, 65]), o($VP, [2, 64]), o($VP, [2, 66]), o([10, 42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 78]), { 31: [1, 253], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 254], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($VO, [2, 48]), o($Vg1, [2, 114], { 103: $VA1 }), o($VB1, [2, 123], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($VC1, [2, 125]), o($VC1, [2, 127]), o($VC1, [2, 128]), o($VC1, [2, 129]), o($VC1, [2, 130]), o($VC1, [2, 131]), o($VC1, [2, 132]), o($VC1, [2, 133]), o($VC1, [2, 134]), o($Vg1, [2, 115], { 103: $VA1 }), { 10: [1, 257] }, o($Vg1, [2, 116], { 103: $VA1 }), { 10: [1, 258] }, o($Vq1, [2, 122]), o($Vg1, [2, 98], { 103: $VA1 }), o($Vg1, [2, 99], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($Vg1, [2, 103]), o($Vg1, [2, 105], { 10: [1, 259] }), o($Vg1, [2, 106]), { 95: [1, 260] }, { 49: [1, 261] }, { 60: [1, 262] }, { 64: [1, 263] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 264 }, o($Vy, [2, 34]), { 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 104: 265, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VC1, [2, 126]), { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 266, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 267, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 95: [1, 268] }, o($Vg1, [2, 113]), o($VP, [2, 53]), { 30: 269, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 61]), o($Ve1, $V4, { 5: 270 }), o($VB1, [2, 124], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($Vg1, [2, 119], { 117: 160, 10: [1, 271], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 120], { 117: 160, 10: [1, 272], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 107]), { 31: [1, 273], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 274], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 275, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 276, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VP, [2, 57]), o($Vy, [2, 33]), o($Vg1, [2, 117], { 103: $VA1 }), o($Vg1, [2, 118], { 103: $VA1 })],
+ defaultActions: {},
+ parseError: function parseError(str, hash) {
+ if (hash.recoverable) {
+ this.trace(str);
+ } else {
+ var error = new Error(str);
+ error.hash = hash;
+ throw error;
+ }
+ },
+ parse: function parse(input) {
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
+ var args = lstack.slice.call(arguments, 1);
+ var lexer2 = Object.create(this.lexer);
+ var sharedState = { yy: {} };
+ for (var k in this.yy) {
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
+ sharedState.yy[k] = this.yy[k];
+ }
+ }
+ lexer2.setInput(input, sharedState.yy);
+ sharedState.yy.lexer = lexer2;
+ sharedState.yy.parser = this;
+ if (typeof lexer2.yylloc == "undefined") {
+ lexer2.yylloc = {};
+ }
+ var yyloc = lexer2.yylloc;
+ lstack.push(yyloc);
+ var ranges = lexer2.options && lexer2.options.ranges;
+ if (typeof sharedState.yy.parseError === "function") {
+ this.parseError = sharedState.yy.parseError;
+ } else {
+ this.parseError = Object.getPrototypeOf(this).parseError;
+ }
+ function lex2() {
+ var token;
+ token = tstack.pop() || lexer2.lex() || EOF;
+ if (typeof token !== "number") {
+ if (token instanceof Array) {
+ tstack = token;
+ token = tstack.pop();
+ }
+ token = self.symbols_[token] || token;
+ }
+ return token;
+ }
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
+ while (true) {
+ state = stack[stack.length - 1];
+ if (this.defaultActions[state]) {
+ action = this.defaultActions[state];
+ } else {
+ if (symbol === null || typeof symbol == "undefined") {
+ symbol = lex2();
+ }
+ action = table[state] && table[state][symbol];
+ }
+ if (typeof action === "undefined" || !action.length || !action[0]) {
+ var errStr = "";
+ expected = [];
+ for (p in table[state]) {
+ if (this.terminals_[p] && p > TERROR) {
+ expected.push("'" + this.terminals_[p] + "'");
+ }
+ }
+ if (lexer2.showPosition) {
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
+ } else {
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
+ }
+ this.parseError(errStr, {
+ text: lexer2.match,
+ token: this.terminals_[symbol] || symbol,
+ line: lexer2.yylineno,
+ loc: yyloc,
+ expected
+ });
+ }
+ if (action[0] instanceof Array && action.length > 1) {
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
+ }
+ switch (action[0]) {
+ case 1:
+ stack.push(symbol);
+ vstack.push(lexer2.yytext);
+ lstack.push(lexer2.yylloc);
+ stack.push(action[1]);
+ symbol = null;
+ {
+ yyleng = lexer2.yyleng;
+ yytext = lexer2.yytext;
+ yylineno = lexer2.yylineno;
+ yyloc = lexer2.yylloc;
+ }
+ break;
+ case 2:
+ len = this.productions_[action[1]][1];
+ yyval.$ = vstack[vstack.length - len];
+ yyval._$ = {
+ first_line: lstack[lstack.length - (len || 1)].first_line,
+ last_line: lstack[lstack.length - 1].last_line,
+ first_column: lstack[lstack.length - (len || 1)].first_column,
+ last_column: lstack[lstack.length - 1].last_column
+ };
+ if (ranges) {
+ yyval._$.range = [
+ lstack[lstack.length - (len || 1)].range[0],
+ lstack[lstack.length - 1].range[1]
+ ];
+ }
+ r = this.performAction.apply(yyval, [
+ yytext,
+ yyleng,
+ yylineno,
+ sharedState.yy,
+ action[1],
+ vstack,
+ lstack
+ ].concat(args));
+ if (typeof r !== "undefined") {
+ return r;
+ }
+ if (len) {
+ stack = stack.slice(0, -1 * len * 2);
+ vstack = vstack.slice(0, -1 * len);
+ lstack = lstack.slice(0, -1 * len);
+ }
+ stack.push(this.productions_[action[1]][0]);
+ vstack.push(yyval.$);
+ lstack.push(yyval._$);
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
+ stack.push(newState);
+ break;
+ case 3:
+ return true;
+ }
+ }
+ return true;
+ }
+ };
+ var lexer = function() {
+ var lexer2 = {
+ EOF: 1,
+ parseError: function parseError(str, hash) {
+ if (this.yy.parser) {
+ this.yy.parser.parseError(str, hash);
+ } else {
+ throw new Error(str);
+ }
+ },
+ // resets the lexer, sets new input
+ setInput: function(input, yy) {
+ this.yy = yy || this.yy || {};
+ this._input = input;
+ this._more = this._backtrack = this.done = false;
+ this.yylineno = this.yyleng = 0;
+ this.yytext = this.matched = this.match = "";
+ this.conditionStack = ["INITIAL"];
+ this.yylloc = {
+ first_line: 1,
+ first_column: 0,
+ last_line: 1,
+ last_column: 0
+ };
+ if (this.options.ranges) {
+ this.yylloc.range = [0, 0];
+ }
+ this.offset = 0;
+ return this;
+ },
+ // consumes and returns one char from the input
+ input: function() {
+ var ch = this._input[0];
+ this.yytext += ch;
+ this.yyleng++;
+ this.offset++;
+ this.match += ch;
+ this.matched += ch;
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
+ if (lines) {
+ this.yylineno++;
+ this.yylloc.last_line++;
+ } else {
+ this.yylloc.last_column++;
+ }
+ if (this.options.ranges) {
+ this.yylloc.range[1]++;
+ }
+ this._input = this._input.slice(1);
+ return ch;
+ },
+ // unshifts one char (or a string) into the input
+ unput: function(ch) {
+ var len = ch.length;
+ var lines = ch.split(/(?:\r\n?|\n)/g);
+ this._input = ch + this._input;
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
+ this.offset -= len;
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
+ this.match = this.match.substr(0, this.match.length - 1);
+ this.matched = this.matched.substr(0, this.matched.length - 1);
+ if (lines.length - 1) {
+ this.yylineno -= lines.length - 1;
+ }
+ var r = this.yylloc.range;
+ this.yylloc = {
+ first_line: this.yylloc.first_line,
+ last_line: this.yylineno + 1,
+ first_column: this.yylloc.first_column,
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
+ };
+ if (this.options.ranges) {
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
+ }
+ this.yyleng = this.yytext.length;
+ return this;
+ },
+ // When called from action, caches matched text and appends it on next action
+ more: function() {
+ this._more = true;
+ return this;
+ },
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
+ reject: function() {
+ if (this.options.backtrack_lexer) {
+ this._backtrack = true;
+ } else {
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
+ text: "",
+ token: null,
+ line: this.yylineno
+ });
+ }
+ return this;
+ },
+ // retain first n characters of the match
+ less: function(n) {
+ this.unput(this.match.slice(n));
+ },
+ // displays already matched input, i.e. for error messages
+ pastInput: function() {
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
+ },
+ // displays upcoming input, i.e. for error messages
+ upcomingInput: function() {
+ var next = this.match;
+ if (next.length < 20) {
+ next += this._input.substr(0, 20 - next.length);
+ }
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
+ },
+ // displays the character position where the lexing error occurred, i.e. for error messages
+ showPosition: function() {
+ var pre = this.pastInput();
+ var c = new Array(pre.length + 1).join("-");
+ return pre + this.upcomingInput() + "\n" + c + "^";
+ },
+ // test the lexed token: return FALSE when not a match, otherwise return token
+ test_match: function(match, indexed_rule) {
+ var token, lines, backup;
+ if (this.options.backtrack_lexer) {
+ backup = {
+ yylineno: this.yylineno,
+ yylloc: {
+ first_line: this.yylloc.first_line,
+ last_line: this.last_line,
+ first_column: this.yylloc.first_column,
+ last_column: this.yylloc.last_column
+ },
+ yytext: this.yytext,
+ match: this.match,
+ matches: this.matches,
+ matched: this.matched,
+ yyleng: this.yyleng,
+ offset: this.offset,
+ _more: this._more,
+ _input: this._input,
+ yy: this.yy,
+ conditionStack: this.conditionStack.slice(0),
+ done: this.done
+ };
+ if (this.options.ranges) {
+ backup.yylloc.range = this.yylloc.range.slice(0);
+ }
+ }
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
+ if (lines) {
+ this.yylineno += lines.length;
+ }
+ this.yylloc = {
+ first_line: this.yylloc.last_line,
+ last_line: this.yylineno + 1,
+ first_column: this.yylloc.last_column,
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
+ };
+ this.yytext += match[0];
+ this.match += match[0];
+ this.matches = match;
+ this.yyleng = this.yytext.length;
+ if (this.options.ranges) {
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
+ }
+ this._more = false;
+ this._backtrack = false;
+ this._input = this._input.slice(match[0].length);
+ this.matched += match[0];
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
+ if (this.done && this._input) {
+ this.done = false;
+ }
+ if (token) {
+ return token;
+ } else if (this._backtrack) {
+ for (var k in backup) {
+ this[k] = backup[k];
+ }
+ return false;
+ }
+ return false;
+ },
+ // return next match in input
+ next: function() {
+ if (this.done) {
+ return this.EOF;
+ }
+ if (!this._input) {
+ this.done = true;
+ }
+ var token, match, tempMatch, index;
+ if (!this._more) {
+ this.yytext = "";
+ this.match = "";
+ }
+ var rules = this._currentRules();
+ for (var i = 0; i < rules.length; i++) {
+ tempMatch = this._input.match(this.rules[rules[i]]);
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
+ match = tempMatch;
+ index = i;
+ if (this.options.backtrack_lexer) {
+ token = this.test_match(tempMatch, rules[i]);
+ if (token !== false) {
+ return token;
+ } else if (this._backtrack) {
+ match = false;
+ continue;
+ } else {
+ return false;
+ }
+ } else if (!this.options.flex) {
+ break;
+ }
+ }
+ }
+ if (match) {
+ token = this.test_match(match, rules[index]);
+ if (token !== false) {
+ return token;
+ }
+ return false;
+ }
+ if (this._input === "") {
+ return this.EOF;
+ } else {
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
+ text: "",
+ token: null,
+ line: this.yylineno
+ });
+ }
+ },
+ // return next match that has a token
+ lex: function lex2() {
+ var r = this.next();
+ if (r) {
+ return r;
+ } else {
+ return this.lex();
+ }
+ },
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
+ begin: function begin(condition) {
+ this.conditionStack.push(condition);
+ },
+ // pop the previously active lexer condition state off the condition stack
+ popState: function popState() {
+ var n = this.conditionStack.length - 1;
+ if (n > 0) {
+ return this.conditionStack.pop();
+ } else {
+ return this.conditionStack[0];
+ }
+ },
+ // produce the lexer rule set which is active for the currently active lexer condition state
+ _currentRules: function _currentRules() {
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
+ } else {
+ return this.conditions["INITIAL"].rules;
+ }
+ },
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
+ topState: function topState(n) {
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
+ if (n >= 0) {
+ return this.conditionStack[n];
+ } else {
+ return "INITIAL";
+ }
+ },
+ // alias for begin(condition)
+ pushState: function pushState(condition) {
+ this.begin(condition);
+ },
+ // return the number of states currently on the stack
+ stateStackSize: function stateStackSize() {
+ return this.conditionStack.length;
+ },
+ options: {},
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
+ switch ($avoiding_name_collisions) {
+ case 0:
+ this.begin("acc_title");
+ return 34;
+ case 1:
+ this.popState();
+ return "acc_title_value";
+ case 2:
+ this.begin("acc_descr");
+ return 36;
+ case 3:
+ this.popState();
+ return "acc_descr_value";
+ case 4:
+ this.begin("acc_descr_multiline");
+ break;
+ case 5:
+ this.popState();
+ break;
+ case 6:
+ return "acc_descr_multiline_value";
+ case 7:
+ this.begin("callbackname");
+ break;
+ case 8:
+ this.popState();
+ break;
+ case 9:
+ this.popState();
+ this.begin("callbackargs");
+ break;
+ case 10:
+ return 92;
+ case 11:
+ this.popState();
+ break;
+ case 12:
+ return 93;
+ case 13:
+ return "MD_STR";
+ case 14:
+ this.popState();
+ break;
+ case 15:
+ this.begin("md_string");
+ break;
+ case 16:
+ return "STR";
+ case 17:
+ this.popState();
+ break;
+ case 18:
+ this.pushState("string");
+ break;
+ case 19:
+ return 81;
+ case 20:
+ return 99;
+ case 21:
+ return 82;
+ case 22:
+ return 101;
+ case 23:
+ return 83;
+ case 24:
+ return 84;
+ case 25:
+ return 94;
+ case 26:
+ this.begin("click");
+ break;
+ case 27:
+ this.popState();
+ break;
+ case 28:
+ return 85;
+ case 29:
+ if (yy.lex.firstGraph()) {
+ this.begin("dir");
+ }
+ return 12;
+ case 30:
+ if (yy.lex.firstGraph()) {
+ this.begin("dir");
+ }
+ return 12;
+ case 31:
+ if (yy.lex.firstGraph()) {
+ this.begin("dir");
+ }
+ return 12;
+ case 32:
+ return 27;
+ case 33:
+ return 32;
+ case 34:
+ return 95;
+ case 35:
+ return 95;
+ case 36:
+ return 95;
+ case 37:
+ return 95;
+ case 38:
+ this.popState();
+ return 13;
+ case 39:
+ this.popState();
+ return 14;
+ case 40:
+ this.popState();
+ return 14;
+ case 41:
+ this.popState();
+ return 14;
+ case 42:
+ this.popState();
+ return 14;
+ case 43:
+ this.popState();
+ return 14;
+ case 44:
+ this.popState();
+ return 14;
+ case 45:
+ this.popState();
+ return 14;
+ case 46:
+ this.popState();
+ return 14;
+ case 47:
+ this.popState();
+ return 14;
+ case 48:
+ this.popState();
+ return 14;
+ case 49:
+ return 118;
+ case 50:
+ return 119;
+ case 51:
+ return 120;
+ case 52:
+ return 121;
+ case 53:
+ return 102;
+ case 54:
+ return 108;
+ case 55:
+ return 44;
+ case 56:
+ return 58;
+ case 57:
+ return 42;
+ case 58:
+ return 8;
+ case 59:
+ return 103;
+ case 60:
+ return 112;
+ case 61:
+ this.popState();
+ return 75;
+ case 62:
+ this.pushState("edgeText");
+ return 73;
+ case 63:
+ return 116;
+ case 64:
+ this.popState();
+ return 75;
+ case 65:
+ this.pushState("thickEdgeText");
+ return 73;
+ case 66:
+ return 116;
+ case 67:
+ this.popState();
+ return 75;
+ case 68:
+ this.pushState("dottedEdgeText");
+ return 73;
+ case 69:
+ return 116;
+ case 70:
+ return 75;
+ case 71:
+ this.popState();
+ return 51;
+ case 72:
+ return "TEXT";
+ case 73:
+ this.pushState("ellipseText");
+ return 50;
+ case 74:
+ this.popState();
+ return 53;
+ case 75:
+ this.pushState("text");
+ return 52;
+ case 76:
+ this.popState();
+ return 55;
+ case 77:
+ this.pushState("text");
+ return 54;
+ case 78:
+ return 56;
+ case 79:
+ this.pushState("text");
+ return 65;
+ case 80:
+ this.popState();
+ return 62;
+ case 81:
+ this.pushState("text");
+ return 61;
+ case 82:
+ this.popState();
+ return 47;
+ case 83:
+ this.pushState("text");
+ return 46;
+ case 84:
+ this.popState();
+ return 67;
+ case 85:
+ this.popState();
+ return 69;
+ case 86:
+ return 114;
+ case 87:
+ this.pushState("trapText");
+ return 66;
+ case 88:
+ this.pushState("trapText");
+ return 68;
+ case 89:
+ return 115;
+ case 90:
+ return 65;
+ case 91:
+ return 87;
+ case 92:
+ return "SEP";
+ case 93:
+ return 86;
+ case 94:
+ return 112;
+ case 95:
+ return 108;
+ case 96:
+ return 42;
+ case 97:
+ return 106;
+ case 98:
+ return 111;
+ case 99:
+ return 113;
+ case 100:
+ this.popState();
+ return 60;
+ case 101:
+ this.pushState("text");
+ return 60;
+ case 102:
+ this.popState();
+ return 49;
+ case 103:
+ this.pushState("text");
+ return 48;
+ case 104:
+ this.popState();
+ return 31;
+ case 105:
+ this.pushState("text");
+ return 29;
+ case 106:
+ this.popState();
+ return 64;
+ case 107:
+ this.pushState("text");
+ return 63;
+ case 108:
+ return "TEXT";
+ case 109:
+ return "QUOTE";
+ case 110:
+ return 9;
+ case 111:
+ return 10;
+ case 112:
+ return 11;
+ }
+ },
+ rules: [/^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["][`])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:["])/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s])/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:[^-]|-(?!-)+)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:[^=]|=(?!))/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:[^\.]|\.(?!))/, /^(?:\s*~~[\~]+\s*)/, /^(?:[-/\)][\)])/, /^(?:[^\(\)\[\]\{\}]|!\)+)/, /^(?:\(-)/, /^(?:\]\))/, /^(?:\(\[)/, /^(?:\]\])/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:>)/, /^(?:\)\])/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\(\(\()/, /^(?:[\\(?=\])][\]])/, /^(?:\/(?=\])\])/, /^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:\*)/, /^(?:#)/, /^(?:&)/, /^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/, /^(?:-)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\|)/, /^(?:\))/, /^(?:\()/, /^(?:\])/, /^(?:\[)/, /^(?:(\}))/, /^(?:\{)/, /^(?:[^\[\]\(\)\{\}\|\"]+)/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/],
+ conditions: { "callbackargs": { "rules": [11, 12, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "callbackname": { "rules": [8, 9, 10, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "href": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "click": { "rules": [15, 18, 27, 28, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dottedEdgeText": { "rules": [15, 18, 67, 69, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "thickEdgeText": { "rules": [15, 18, 64, 66, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "edgeText": { "rules": [15, 18, 61, 63, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "trapText": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 84, 85, 86, 87, 88, 101, 103, 105, 107], "inclusive": false }, "ellipseText": { "rules": [15, 18, 70, 71, 72, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "text": { "rules": [15, 18, 70, 73, 74, 75, 76, 77, 80, 81, 82, 83, 87, 88, 100, 101, 102, 103, 104, 105, 106, 107, 108], "inclusive": false }, "vertex": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dir": { "rules": [15, 18, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr_multiline": { "rules": [5, 6, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr": { "rules": [3, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_title": { "rules": [1, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "md_string": { "rules": [13, 14, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "string": { "rules": [15, 16, 17, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 67, 68, 70, 73, 75, 77, 78, 79, 81, 83, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 103, 105, 107, 109, 110, 111, 112], "inclusive": true } }
+ };
+ return lexer2;
+ }();
+ parser2.lexer = lexer;
+ function Parser() {
+ this.yy = {};
+ }
+ Parser.prototype = parser2;
+ parser2.Parser = Parser;
+ return new Parser();
+}();
+parser.parser = parser;
+const parser$1 = parser;
+const MERMAID_DOM_ID_PREFIX = "flowchart-";
+let vertexCounter = 0;
+let config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)();
+let vertices = {};
+let edges = [];
+let classes = {};
+let subGraphs = [];
+let subGraphLookup = {};
+let tooltips = {};
+let subCount = 0;
+let firstGraphFlag = true;
+let direction;
+let version;
+let funs = [];
+const sanitizeText = (txt) => _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(txt, config);
+const lookUpDomId = function(id) {
+ const vertexKeys = Object.keys(vertices);
+ for (const vertexKey of vertexKeys) {
+ if (vertices[vertexKey].id === id) {
+ return vertices[vertexKey].domId;
+ }
+ }
+ return id;
+};
+const addVertex = function(_id, textObj, type, style, classes2, dir, props = {}) {
+ let txt;
+ let id = _id;
+ if (id === void 0) {
+ return;
+ }
+ if (id.trim().length === 0) {
+ return;
+ }
+ if (vertices[id] === void 0) {
+ vertices[id] = {
+ id,
+ labelType: "text",
+ domId: MERMAID_DOM_ID_PREFIX + id + "-" + vertexCounter,
+ styles: [],
+ classes: []
+ };
+ }
+ vertexCounter++;
+ if (textObj !== void 0) {
+ config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)();
+ txt = sanitizeText(textObj.text.trim());
+ vertices[id].labelType = textObj.type;
+ if (txt[0] === '"' && txt[txt.length - 1] === '"') {
+ txt = txt.substring(1, txt.length - 1);
+ }
+ vertices[id].text = txt;
+ } else {
+ if (vertices[id].text === void 0) {
+ vertices[id].text = _id;
+ }
+ }
+ if (type !== void 0) {
+ vertices[id].type = type;
+ }
+ if (style !== void 0 && style !== null) {
+ style.forEach(function(s) {
+ vertices[id].styles.push(s);
+ });
+ }
+ if (classes2 !== void 0 && classes2 !== null) {
+ classes2.forEach(function(s) {
+ vertices[id].classes.push(s);
+ });
+ }
+ if (dir !== void 0) {
+ vertices[id].dir = dir;
+ }
+ if (vertices[id].props === void 0) {
+ vertices[id].props = props;
+ } else if (props !== void 0) {
+ Object.assign(vertices[id].props, props);
+ }
+};
+const addSingleLink = function(_start, _end, type) {
+ let start = _start;
+ let end = _end;
+ const edge = { start, end, type: void 0, text: "", labelType: "text" };
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 Got edge...", edge);
+ const linkTextObj = type.text;
+ if (linkTextObj !== void 0) {
+ edge.text = sanitizeText(linkTextObj.text.trim());
+ if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') {
+ edge.text = edge.text.substring(1, edge.text.length - 1);
+ }
+ edge.labelType = linkTextObj.type;
+ }
+ if (type !== void 0) {
+ edge.type = type.type;
+ edge.stroke = type.stroke;
+ edge.length = type.length;
+ }
+ if ((edge == null ? void 0 : edge.length) > 10) {
+ edge.length = 10;
+ }
+ if (edges.length < (config.maxEdges ?? 500)) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 pushing edge...");
+ edges.push(edge);
+ } else {
+ throw new Error(
+ `Edge limit exceeded. ${edges.length} edges found, but the limit is ${config.maxEdges}.
+
+Initialize mermaid with maxEdges set to a higher number to allow more edges.
+You cannot set this config via configuration inside the diagram as it is a secure config.
+You have to call mermaid.initialize.`
+ );
+ }
+};
+const addLink = function(_start, _end, type) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("addLink (abc78)", _start, _end, type);
+ let i, j;
+ for (i = 0; i < _start.length; i++) {
+ for (j = 0; j < _end.length; j++) {
+ addSingleLink(_start[i], _end[j], type);
+ }
+ }
+};
+const updateLinkInterpolate = function(positions, interp) {
+ positions.forEach(function(pos) {
+ if (pos === "default") {
+ edges.defaultInterpolate = interp;
+ } else {
+ edges[pos].interpolate = interp;
+ }
+ });
+};
+const updateLink = function(positions, style) {
+ positions.forEach(function(pos) {
+ if (pos >= edges.length) {
+ throw new Error(
+ `The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${edges.length - 1}. (Help: Ensure that the index is within the range of existing edges.)`
+ );
+ }
+ if (pos === "default") {
+ edges.defaultStyle = style;
+ } else {
+ if (_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.isSubstringInArray("fill", style) === -1) {
+ style.push("fill:none");
+ }
+ edges[pos].style = style;
+ }
+ });
+};
+const addClass = function(ids, style) {
+ ids.split(",").forEach(function(id) {
+ if (classes[id] === void 0) {
+ classes[id] = { id, styles: [], textStyles: [] };
+ }
+ if (style !== void 0 && style !== null) {
+ style.forEach(function(s) {
+ if (s.match("color")) {
+ const newStyle = s.replace("fill", "bgFill").replace("color", "fill");
+ classes[id].textStyles.push(newStyle);
+ }
+ classes[id].styles.push(s);
+ });
+ }
+ });
+};
+const setDirection = function(dir) {
+ direction = dir;
+ if (direction.match(/.*)) {
+ direction = "RL";
+ }
+ if (direction.match(/.*\^/)) {
+ direction = "BT";
+ }
+ if (direction.match(/.*>/)) {
+ direction = "LR";
+ }
+ if (direction.match(/.*v/)) {
+ direction = "TB";
+ }
+ if (direction === "TD") {
+ direction = "TB";
+ }
+};
+const setClass = function(ids, className) {
+ ids.split(",").forEach(function(_id) {
+ let id = _id;
+ if (vertices[id] !== void 0) {
+ vertices[id].classes.push(className);
+ }
+ if (subGraphLookup[id] !== void 0) {
+ subGraphLookup[id].classes.push(className);
+ }
+ });
+};
+const setTooltip = function(ids, tooltip) {
+ ids.split(",").forEach(function(id) {
+ if (tooltip !== void 0) {
+ tooltips[version === "gen-1" ? lookUpDomId(id) : id] = sanitizeText(tooltip);
+ }
+ });
+};
+const setClickFun = function(id, functionName, functionArgs) {
+ let domId = lookUpDomId(id);
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel !== "loose") {
+ return;
+ }
+ if (functionName === void 0) {
+ return;
+ }
+ let argList = [];
+ if (typeof functionArgs === "string") {
+ argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
+ for (let i = 0; i < argList.length; i++) {
+ let item = argList[i].trim();
+ if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') {
+ item = item.substr(1, item.length - 2);
+ }
+ argList[i] = item;
+ }
+ }
+ if (argList.length === 0) {
+ argList.push(id);
+ }
+ if (vertices[id] !== void 0) {
+ vertices[id].haveCallback = true;
+ funs.push(function() {
+ const elem = document.querySelector(`[id="${domId}"]`);
+ if (elem !== null) {
+ elem.addEventListener(
+ "click",
+ function() {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.runFunc(functionName, ...argList);
+ },
+ false
+ );
+ }
+ });
+ }
+};
+const setLink = function(ids, linkStr, target) {
+ ids.split(",").forEach(function(id) {
+ if (vertices[id] !== void 0) {
+ vertices[id].link = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.formatUrl(linkStr, config);
+ vertices[id].linkTarget = target;
+ }
+ });
+ setClass(ids, "clickable");
+};
+const getTooltip = function(id) {
+ if (tooltips.hasOwnProperty(id)) {
+ return tooltips[id];
+ }
+ return void 0;
+};
+const setClickEvent = function(ids, functionName, functionArgs) {
+ ids.split(",").forEach(function(id) {
+ setClickFun(id, functionName, functionArgs);
+ });
+ setClass(ids, "clickable");
+};
+const bindFunctions = function(element) {
+ funs.forEach(function(fun) {
+ fun(element);
+ });
+};
+const getDirection = function() {
+ return direction.trim();
+};
+const getVertices = function() {
+ return vertices;
+};
+const getEdges = function() {
+ return edges;
+};
+const getClasses = function() {
+ return classes;
+};
+const setupToolTips = function(element) {
+ let tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(".mermaidTooltip");
+ if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
+ tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0);
+ }
+ const svg = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(element).select("svg");
+ const nodes = svg.selectAll("g.node");
+ nodes.on("mouseover", function() {
+ const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this);
+ const title = el.attr("title");
+ if (title === null) {
+ return;
+ }
+ const rect = this.getBoundingClientRect();
+ tooltipElem.transition().duration(200).style("opacity", ".9");
+ tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.bottom + "px");
+ tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
"));
+ el.classed("hover", true);
+ }).on("mouseout", function() {
+ tooltipElem.transition().duration(500).style("opacity", 0);
+ const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this);
+ el.classed("hover", false);
+ });
+};
+funs.push(setupToolTips);
+const clear = function(ver = "gen-1") {
+ vertices = {};
+ classes = {};
+ edges = [];
+ funs = [setupToolTips];
+ subGraphs = [];
+ subGraphLookup = {};
+ subCount = 0;
+ tooltips = {};
+ firstGraphFlag = true;
+ version = ver;
+ config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)();
+ (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.v)();
+};
+const setGen = (ver) => {
+ version = ver || "gen-2";
+};
+const defaultStyle = function() {
+ return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
+};
+const addSubGraph = function(_id, list, _title) {
+ let id = _id.text.trim();
+ let title = _title.text;
+ if (_id === _title && _title.text.match(/\s/)) {
+ id = void 0;
+ }
+ function uniq(a) {
+ const prims = { boolean: {}, number: {}, string: {} };
+ const objs = [];
+ let dir2;
+ const nodeList2 = a.filter(function(item) {
+ const type = typeof item;
+ if (item.stmt && item.stmt === "dir") {
+ dir2 = item.value;
+ return false;
+ }
+ if (item.trim() === "") {
+ return false;
+ }
+ if (type in prims) {
+ return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true;
+ } else {
+ return objs.includes(item) ? false : objs.push(item);
+ }
+ });
+ return { nodeList: nodeList2, dir: dir2 };
+ }
+ let nodeList = [];
+ const { nodeList: nl, dir } = uniq(nodeList.concat.apply(nodeList, list));
+ nodeList = nl;
+ if (version === "gen-1") {
+ for (let i = 0; i < nodeList.length; i++) {
+ nodeList[i] = lookUpDomId(nodeList[i]);
+ }
+ }
+ id = id || "subGraph" + subCount;
+ title = title || "";
+ title = sanitizeText(title);
+ subCount = subCount + 1;
+ const subGraph = {
+ id,
+ nodes: nodeList,
+ title: title.trim(),
+ classes: [],
+ dir,
+ labelType: _title.type
+ };
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir);
+ subGraph.nodes = makeUniq(subGraph, subGraphs).nodes;
+ subGraphs.push(subGraph);
+ subGraphLookup[id] = subGraph;
+ return id;
+};
+const getPosForId = function(id) {
+ for (const [i, subGraph] of subGraphs.entries()) {
+ if (subGraph.id === id) {
+ return i;
+ }
+ }
+ return -1;
+};
+let secCount = -1;
+const posCrossRef = [];
+const indexNodes2 = function(id, pos) {
+ const nodes = subGraphs[pos].nodes;
+ secCount = secCount + 1;
+ if (secCount > 2e3) {
+ return;
+ }
+ posCrossRef[secCount] = pos;
+ if (subGraphs[pos].id === id) {
+ return {
+ result: true,
+ count: 0
+ };
+ }
+ let count = 0;
+ let posCount = 1;
+ while (count < nodes.length) {
+ const childPos = getPosForId(nodes[count]);
+ if (childPos >= 0) {
+ const res = indexNodes2(id, childPos);
+ if (res.result) {
+ return {
+ result: true,
+ count: posCount + res.count
+ };
+ } else {
+ posCount = posCount + res.count;
+ }
+ }
+ count = count + 1;
+ }
+ return {
+ result: false,
+ count: posCount
+ };
+};
+const getDepthFirstPos = function(pos) {
+ return posCrossRef[pos];
+};
+const indexNodes = function() {
+ secCount = -1;
+ if (subGraphs.length > 0) {
+ indexNodes2("none", subGraphs.length - 1);
+ }
+};
+const getSubGraphs = function() {
+ return subGraphs;
+};
+const firstGraph = () => {
+ if (firstGraphFlag) {
+ firstGraphFlag = false;
+ return true;
+ }
+ return false;
+};
+const destructStartLink = (_str) => {
+ let str = _str.trim();
+ let type = "arrow_open";
+ switch (str[0]) {
+ case "<":
+ type = "arrow_point";
+ str = str.slice(1);
+ break;
+ case "x":
+ type = "arrow_cross";
+ str = str.slice(1);
+ break;
+ case "o":
+ type = "arrow_circle";
+ str = str.slice(1);
+ break;
+ }
+ let stroke = "normal";
+ if (str.includes("=")) {
+ stroke = "thick";
+ }
+ if (str.includes(".")) {
+ stroke = "dotted";
+ }
+ return { type, stroke };
+};
+const countChar = (char, str) => {
+ const length = str.length;
+ let count = 0;
+ for (let i = 0; i < length; ++i) {
+ if (str[i] === char) {
+ ++count;
+ }
+ }
+ return count;
+};
+const destructEndLink = (_str) => {
+ const str = _str.trim();
+ let line = str.slice(0, -1);
+ let type = "arrow_open";
+ switch (str.slice(-1)) {
+ case "x":
+ type = "arrow_cross";
+ if (str[0] === "x") {
+ type = "double_" + type;
+ line = line.slice(1);
+ }
+ break;
+ case ">":
+ type = "arrow_point";
+ if (str[0] === "<") {
+ type = "double_" + type;
+ line = line.slice(1);
+ }
+ break;
+ case "o":
+ type = "arrow_circle";
+ if (str[0] === "o") {
+ type = "double_" + type;
+ line = line.slice(1);
+ }
+ break;
+ }
+ let stroke = "normal";
+ let length = line.length - 1;
+ if (line[0] === "=") {
+ stroke = "thick";
+ }
+ if (line[0] === "~") {
+ stroke = "invisible";
+ }
+ let dots = countChar(".", line);
+ if (dots) {
+ stroke = "dotted";
+ length = dots;
+ }
+ return { type, stroke, length };
+};
+const destructLink = (_str, _startStr) => {
+ const info = destructEndLink(_str);
+ let startInfo;
+ if (_startStr) {
+ startInfo = destructStartLink(_startStr);
+ if (startInfo.stroke !== info.stroke) {
+ return { type: "INVALID", stroke: "INVALID" };
+ }
+ if (startInfo.type === "arrow_open") {
+ startInfo.type = info.type;
+ } else {
+ if (startInfo.type !== info.type) {
+ return { type: "INVALID", stroke: "INVALID" };
+ }
+ startInfo.type = "double_" + startInfo.type;
+ }
+ if (startInfo.type === "double_arrow") {
+ startInfo.type = "double_arrow_point";
+ }
+ startInfo.length = info.length;
+ return startInfo;
+ }
+ return info;
+};
+const exists = (allSgs, _id) => {
+ let res = false;
+ allSgs.forEach((sg) => {
+ const pos = sg.nodes.indexOf(_id);
+ if (pos >= 0) {
+ res = true;
+ }
+ });
+ return res;
+};
+const makeUniq = (sg, allSubgraphs) => {
+ const res = [];
+ sg.nodes.forEach((_id, pos) => {
+ if (!exists(allSubgraphs, _id)) {
+ res.push(sg.nodes[pos]);
+ }
+ });
+ return { nodes: res };
+};
+const lex = {
+ firstGraph
+};
+const flowDb = {
+ defaultConfig: () => _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.K.flowchart,
+ setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.s,
+ getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.g,
+ getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.a,
+ setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.b,
+ addVertex,
+ lookUpDomId,
+ addLink,
+ updateLinkInterpolate,
+ updateLink,
+ addClass,
+ setDirection,
+ setClass,
+ setTooltip,
+ getTooltip,
+ setClickEvent,
+ setLink,
+ bindFunctions,
+ getDirection,
+ getVertices,
+ getEdges,
+ getClasses,
+ clear,
+ setGen,
+ defaultStyle,
+ addSubGraph,
+ getDepthFirstPos,
+ indexNodes,
+ getSubGraphs,
+ destructLink,
+ lex,
+ exists,
+ makeUniq,
+ setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.q,
+ getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.t
+};
+const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
+ __proto__: null,
+ addClass,
+ addLink,
+ addSingleLink,
+ addSubGraph,
+ addVertex,
+ bindFunctions,
+ clear,
+ default: flowDb,
+ defaultStyle,
+ destructLink,
+ firstGraph,
+ getClasses,
+ getDepthFirstPos,
+ getDirection,
+ getEdges,
+ getSubGraphs,
+ getTooltip,
+ getVertices,
+ indexNodes,
+ lex,
+ lookUpDomId,
+ setClass,
+ setClickEvent,
+ setDirection,
+ setGen,
+ setLink,
+ updateLink,
+ updateLinkInterpolate
+}, Symbol.toStringTag, { value: "Module" }));
+
+
+
+/***/ }),
+
+/***/ 9502:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ diagram: () => (/* binding */ diagram)
+});
+
+// EXTERNAL MODULE: ./node_modules/mermaid/dist/flowDb-4b19a42f.js
+var flowDb_4b19a42f = __webpack_require__(6216);
+// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js
+var graphlib = __webpack_require__(697);
+// EXTERNAL MODULE: ./node_modules/d3/src/index.js + 197 modules
+var src = __webpack_require__(6312);
+// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-f47111a7.js + 8 modules
+var mermaid_f47111a7 = __webpack_require__(6257);
+// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules
+var has = __webpack_require__(8585);
+// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js
+var defaults = __webpack_require__(3068);
+// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js
+var forEach = __webpack_require__(8058);
+// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + 64 modules
+var dagre = __webpack_require__(1176);
+// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/dagre-js/util.js
+var util = __webpack_require__(2933);
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/arrows.js
+
+
+
+
+var arrows = {
+ normal,
+ vee,
+ undirected,
+};
+
+function setArrows(value) {
+ arrows = value;
+}
+
+function normal(parent, id, edge, type) {
+ var marker = parent
+ .append('marker')
+ .attr('id', id)
+ .attr('viewBox', '0 0 10 10')
+ .attr('refX', 9)
+ .attr('refY', 5)
+ .attr('markerUnits', 'strokeWidth')
+ .attr('markerWidth', 8)
+ .attr('markerHeight', 6)
+ .attr('orient', 'auto');
+
+ var path = marker
+ .append('path')
+ .attr('d', 'M 0 0 L 10 5 L 0 10 z')
+ .style('stroke-width', 1)
+ .style('stroke-dasharray', '1,0');
+ util/* applyStyle */.AV(path, edge[type + 'Style']);
+ if (edge[type + 'Class']) {
+ path.attr('class', edge[type + 'Class']);
+ }
+}
+
+function vee(parent, id, edge, type) {
+ var marker = parent
+ .append('marker')
+ .attr('id', id)
+ .attr('viewBox', '0 0 10 10')
+ .attr('refX', 9)
+ .attr('refY', 5)
+ .attr('markerUnits', 'strokeWidth')
+ .attr('markerWidth', 8)
+ .attr('markerHeight', 6)
+ .attr('orient', 'auto');
+
+ var path = marker
+ .append('path')
+ .attr('d', 'M 0 0 L 10 5 L 0 10 L 4 5 z')
+ .style('stroke-width', 1)
+ .style('stroke-dasharray', '1,0');
+ util/* applyStyle */.AV(path, edge[type + 'Style']);
+ if (edge[type + 'Class']) {
+ path.attr('class', edge[type + 'Class']);
+ }
+}
+
+function undirected(parent, id, edge, type) {
+ var marker = parent
+ .append('marker')
+ .attr('id', id)
+ .attr('viewBox', '0 0 10 10')
+ .attr('refX', 9)
+ .attr('refY', 5)
+ .attr('markerUnits', 'strokeWidth')
+ .attr('markerWidth', 8)
+ .attr('markerHeight', 6)
+ .attr('orient', 'auto');
+
+ var path = marker
+ .append('path')
+ .attr('d', 'M 0 5 L 10 5')
+ .style('stroke-width', 1)
+ .style('stroke-dasharray', '1,0');
+ util/* applyStyle */.AV(path, edge[type + 'Style']);
+ if (edge[type + 'Class']) {
+ path.attr('class', edge[type + 'Class']);
+ }
+}
+
+// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/dagre-js/label/add-html-label.js
+var add_html_label = __webpack_require__(646);
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/label/add-svg-label.js
+
+
+
+
+function addSVGLabel(root, node) {
+ var domNode = root;
+
+ domNode.node().appendChild(node.label);
+
+ util/* applyStyle */.AV(domNode, node.labelStyle);
+
+ return domNode;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/label/add-text-label.js
+
+
+
+
+/*
+ * Attaches a text label to the specified root. Handles escape sequences.
+ */
+function addTextLabel(root, node) {
+ var domNode = root.append('text');
+
+ var lines = processEscapeSequences(node.label).split('\n');
+ for (var i = 0; i < lines.length; i++) {
+ domNode
+ .append('tspan')
+ .attr('xml:space', 'preserve')
+ .attr('dy', '1em')
+ .attr('x', '1')
+ .text(lines[i]);
+ }
+
+ util/* applyStyle */.AV(domNode, node.labelStyle);
+
+ return domNode;
+}
+
+function processEscapeSequences(text) {
+ var newText = '';
+ var escaped = false;
+ var ch;
+ for (var i = 0; i < text.length; ++i) {
+ ch = text[i];
+ if (escaped) {
+ switch (ch) {
+ case 'n':
+ newText += '\n';
+ break;
+ default:
+ newText += ch;
+ }
+ escaped = false;
+ } else if (ch === '\\') {
+ escaped = true;
+ } else {
+ newText += ch;
+ }
+ }
+ return newText;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/label/add-label.js
+
+
+
+
+
+
+function addLabel(root, node, location) {
+ var label = node.label;
+ var labelSvg = root.append('g');
+
+ // Allow the label to be a string, a function that returns a DOM element, or
+ // a DOM element itself.
+ if (node.labelType === 'svg') {
+ addSVGLabel(labelSvg, node);
+ } else if (typeof label !== 'string' || node.labelType === 'html') {
+ (0,add_html_label/* addHtmlLabel */.H)(labelSvg, node);
+ } else {
+ addTextLabel(labelSvg, node);
+ }
+
+ var labelBBox = labelSvg.node().getBBox();
+ var y;
+ switch (location) {
+ case 'top':
+ y = -node.height / 2;
+ break;
+ case 'bottom':
+ y = node.height / 2 - labelBBox.height;
+ break;
+ default:
+ y = -labelBBox.height / 2;
+ }
+ labelSvg.attr('transform', 'translate(' + -labelBBox.width / 2 + ',' + y + ')');
+
+ return labelSvg;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/create-clusters.js
+
+
+
+
+
+
+var createClusters = function (selection, g) {
+ var clusters = g.nodes().filter(function (v) {
+ return util/* isSubgraph */.De(g, v);
+ });
+ var svgClusters = selection.selectAll('g.cluster').data(clusters, function (v) {
+ return v;
+ });
+
+ util/* applyTransition */.c$(svgClusters.exit(), g).style('opacity', 0).remove();
+
+ var enterSelection = svgClusters
+ .enter()
+ .append('g')
+ .attr('class', 'cluster')
+ .attr('id', function (v) {
+ var node = g.node(v);
+ return node.id;
+ })
+ .style('opacity', 0)
+ .each(function (v) {
+ var node = g.node(v);
+ var thisGroup = src/* select */.Ltv(this);
+ src/* select */.Ltv(this).append('rect');
+ var labelGroup = thisGroup.append('g').attr('class', 'label');
+ addLabel(labelGroup, node, node.clusterLabelPos);
+ });
+
+ svgClusters = svgClusters.merge(enterSelection);
+
+ svgClusters = util/* applyTransition */.c$(svgClusters, g).style('opacity', 1);
+
+ svgClusters.selectAll('rect').each(function (c) {
+ var node = g.node(c);
+ var domCluster = src/* select */.Ltv(this);
+ util/* applyStyle */.AV(domCluster, node.style);
+ });
+
+ return svgClusters;
+};
+
+function setCreateClusters(value) {
+ createClusters = value;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/create-edge-labels.js
+
+
+
+
+
+
+
+let createEdgeLabels = function (selection, g) {
+ var svgEdgeLabels = selection
+ .selectAll('g.edgeLabel')
+ .data(g.edges(), function (e) {
+ return util/* edgeToId */.gh(e);
+ })
+ .classed('update', true);
+
+ svgEdgeLabels.exit().remove();
+ svgEdgeLabels.enter().append('g').classed('edgeLabel', true).style('opacity', 0);
+
+ svgEdgeLabels = selection.selectAll('g.edgeLabel');
+
+ svgEdgeLabels.each(function (e) {
+ var root = src/* select */.Ltv(this);
+ root.select('.label').remove();
+ var edge = g.edge(e);
+ var label = addLabel(root, g.edge(e), 0).classed('label', true);
+ var bbox = label.node().getBBox();
+
+ if (edge.labelId) {
+ label.attr('id', edge.labelId);
+ }
+ if (!has/* default */.A(edge, 'width')) {
+ edge.width = bbox.width;
+ }
+ if (!has/* default */.A(edge, 'height')) {
+ edge.height = bbox.height;
+ }
+ });
+
+ var exitSelection;
+
+ if (svgEdgeLabels.exit) {
+ exitSelection = svgEdgeLabels.exit();
+ } else {
+ exitSelection = svgEdgeLabels.selectAll(null); // empty selection
+ }
+
+ util/* applyTransition */.c$(exitSelection, g).style('opacity', 0).remove();
+
+ return svgEdgeLabels;
+};
+
+function setCreateEdgeLabels(value) {
+ createEdgeLabels = value;
+}
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js
+var uniqueId = __webpack_require__(5664);
+// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules
+var range = __webpack_require__(1395);
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-node.js
+
+
+function intersectNode(node, point) {
+ return node.intersect(point);
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/create-edge-paths.js
+
+
+
+
+
+
+
+var createEdgePaths = function (selection, g, arrows) {
+ var previousPaths = selection
+ .selectAll('g.edgePath')
+ .data(g.edges(), function (e) {
+ return util/* edgeToId */.gh(e);
+ })
+ .classed('update', true);
+
+ var newPaths = enter(previousPaths, g);
+ exit(previousPaths, g);
+
+ var svgPaths = previousPaths.merge !== undefined ? previousPaths.merge(newPaths) : previousPaths;
+ util/* applyTransition */.c$(svgPaths, g).style('opacity', 1);
+
+ // Save DOM element in the path group, and set ID and class
+ svgPaths.each(function (e) {
+ var domEdge = src/* select */.Ltv(this);
+ var edge = g.edge(e);
+ edge.elem = this;
+
+ if (edge.id) {
+ domEdge.attr('id', edge.id);
+ }
+
+ util/* applyClass */.nh(
+ domEdge,
+ edge['class'],
+ (domEdge.classed('update') ? 'update ' : '') + 'edgePath'
+ );
+ });
+
+ svgPaths.selectAll('path.path').each(function (e) {
+ var edge = g.edge(e);
+ edge.arrowheadId = uniqueId/* default */.A('arrowhead');
+
+ var domEdge = src/* select */.Ltv(this)
+ .attr('marker-end', function () {
+ return 'url(' + makeFragmentRef(location.href, edge.arrowheadId) + ')';
+ })
+ .style('fill', 'none');
+
+ util/* applyTransition */.c$(domEdge, g).attr('d', function (e) {
+ return calcPoints(g, e);
+ });
+
+ util/* applyStyle */.AV(domEdge, edge.style);
+ });
+
+ svgPaths.selectAll('defs *').remove();
+ svgPaths.selectAll('defs').each(function (e) {
+ var edge = g.edge(e);
+ var arrowhead = arrows[edge.arrowhead];
+ arrowhead(src/* select */.Ltv(this), edge.arrowheadId, edge, 'arrowhead');
+ });
+
+ return svgPaths;
+};
+
+function setCreateEdgePaths(value) {
+ createEdgePaths = value;
+}
+
+function makeFragmentRef(url, fragmentId) {
+ var baseUrl = url.split('#')[0];
+ return baseUrl + '#' + fragmentId;
+}
+
+function calcPoints(g, e) {
+ var edge = g.edge(e);
+ var tail = g.node(e.v);
+ var head = g.node(e.w);
+ var points = edge.points.slice(1, edge.points.length - 1);
+ points.unshift(intersectNode(tail, points[0]));
+ points.push(intersectNode(head, points[points.length - 1]));
+
+ return createLine(edge, points);
+}
+
+function createLine(edge, points) {
+ // @ts-expect-error
+ var line = (src/* line */.n8j || src/* svg */.JWy.line)()
+ .x(function (d) {
+ return d.x;
+ })
+ .y(function (d) {
+ return d.y;
+ });
+
+ (line.curve || line.interpolate)(edge.curve);
+
+ return line(points);
+}
+
+function getCoords(elem) {
+ var bbox = elem.getBBox();
+ var matrix = elem.ownerSVGElement
+ .getScreenCTM()
+ .inverse()
+ .multiply(elem.getScreenCTM())
+ .translate(bbox.width / 2, bbox.height / 2);
+ return { x: matrix.e, y: matrix.f };
+}
+
+function enter(svgPaths, g) {
+ var svgPathsEnter = svgPaths.enter().append('g').attr('class', 'edgePath').style('opacity', 0);
+ svgPathsEnter
+ .append('path')
+ .attr('class', 'path')
+ .attr('d', function (e) {
+ var edge = g.edge(e);
+ var sourceElem = g.node(e.v).elem;
+ var points = range/* default */.A(edge.points.length).map(function () {
+ return getCoords(sourceElem);
+ });
+ return createLine(edge, points);
+ });
+ svgPathsEnter.append('defs');
+ return svgPathsEnter;
+}
+
+function exit(svgPaths, g) {
+ var svgPathExit = svgPaths.exit();
+ util/* applyTransition */.c$(svgPathExit, g).style('opacity', 0).remove();
+}
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules
+var pick = __webpack_require__(1942);
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/create-nodes.js
+
+
+
+
+
+
+
+var createNodes = function (selection, g, shapes) {
+ var simpleNodes = g.nodes().filter(function (v) {
+ return !util/* isSubgraph */.De(g, v);
+ });
+ var svgNodes = selection
+ .selectAll('g.node')
+ .data(simpleNodes, function (v) {
+ return v;
+ })
+ .classed('update', true);
+
+ svgNodes.exit().remove();
+
+ svgNodes.enter().append('g').attr('class', 'node').style('opacity', 0);
+
+ svgNodes = selection.selectAll('g.node');
+
+ svgNodes.each(function (v) {
+ var node = g.node(v);
+ var thisGroup = src/* select */.Ltv(this);
+ util/* applyClass */.nh(
+ thisGroup,
+ node['class'],
+ (thisGroup.classed('update') ? 'update ' : '') + 'node'
+ );
+
+ thisGroup.select('g.label').remove();
+ var labelGroup = thisGroup.append('g').attr('class', 'label');
+ var labelDom = addLabel(labelGroup, node);
+ var shape = shapes[node.shape];
+ var bbox = pick/* default */.A(labelDom.node().getBBox(), 'width', 'height');
+
+ node.elem = this;
+
+ if (node.id) {
+ thisGroup.attr('id', node.id);
+ }
+ if (node.labelId) {
+ labelGroup.attr('id', node.labelId);
+ }
+
+ if (has/* default */.A(node, 'width')) {
+ bbox.width = node.width;
+ }
+ if (has/* default */.A(node, 'height')) {
+ bbox.height = node.height;
+ }
+
+ bbox.width += node.paddingLeft + node.paddingRight;
+ bbox.height += node.paddingTop + node.paddingBottom;
+ labelGroup.attr(
+ 'transform',
+ 'translate(' +
+ (node.paddingLeft - node.paddingRight) / 2 +
+ ',' +
+ (node.paddingTop - node.paddingBottom) / 2 +
+ ')'
+ );
+
+ var root = src/* select */.Ltv(this);
+ root.select('.label-container').remove();
+ var shapeSvg = shape(root, bbox, node).classed('label-container', true);
+ util/* applyStyle */.AV(shapeSvg, node.style);
+
+ var shapeBBox = shapeSvg.node().getBBox();
+ node.width = shapeBBox.width;
+ node.height = shapeBBox.height;
+ });
+
+ var exitSelection;
+
+ if (svgNodes.exit) {
+ exitSelection = svgNodes.exit();
+ } else {
+ exitSelection = svgNodes.selectAll(null); // empty selection
+ }
+
+ util/* applyTransition */.c$(exitSelection, g).style('opacity', 0).remove();
+
+ return svgNodes;
+};
+
+function setCreateNodes(value) {
+ createNodes = value;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/position-clusters.js
+
+
+
+
+
+function positionClusters(selection, g) {
+ var created = selection.filter(function () {
+ return !src/* select */.Ltv(this).classed('update');
+ });
+
+ function translate(v) {
+ var node = g.node(v);
+ return 'translate(' + node.x + ',' + node.y + ')';
+ }
+
+ created.attr('transform', translate);
+
+ util/* applyTransition */.c$(selection, g).style('opacity', 1).attr('transform', translate);
+
+ util/* applyTransition */.c$(created.selectAll('rect'), g)
+ .attr('width', function (v) {
+ return g.node(v).width;
+ })
+ .attr('height', function (v) {
+ return g.node(v).height;
+ })
+ .attr('x', function (v) {
+ var node = g.node(v);
+ return -node.width / 2;
+ })
+ .attr('y', function (v) {
+ var node = g.node(v);
+ return -node.height / 2;
+ });
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/position-edge-labels.js
+
+
+
+
+
+
+function positionEdgeLabels(selection, g) {
+ var created = selection.filter(function () {
+ return !src/* select */.Ltv(this).classed('update');
+ });
+
+ function translate(e) {
+ var edge = g.edge(e);
+ return has/* default */.A(edge, 'x') ? 'translate(' + edge.x + ',' + edge.y + ')' : '';
+ }
+
+ created.attr('transform', translate);
+
+ util/* applyTransition */.c$(selection, g).style('opacity', 1).attr('transform', translate);
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/position-nodes.js
+
+
+
+
+
+function positionNodes(selection, g) {
+ var created = selection.filter(function () {
+ return !src/* select */.Ltv(this).classed('update');
+ });
+
+ function translate(v) {
+ var node = g.node(v);
+ return 'translate(' + node.x + ',' + node.y + ')';
+ }
+
+ created.attr('transform', translate);
+
+ util/* applyTransition */.c$(selection, g).style('opacity', 1).attr('transform', translate);
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-ellipse.js
+
+
+function intersectEllipse(node, rx, ry, point) {
+ // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html
+
+ var cx = node.x;
+ var cy = node.y;
+
+ var px = cx - point.x;
+ var py = cy - point.y;
+
+ var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);
+
+ var dx = Math.abs((rx * ry * px) / det);
+ if (point.x < cx) {
+ dx = -dx;
+ }
+ var dy = Math.abs((rx * ry * py) / det);
+ if (point.y < cy) {
+ dy = -dy;
+ }
+
+ return { x: cx + dx, y: cy + dy };
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-circle.js
+
+
+
+
+function intersectCircle(node, rx, point) {
+ return intersectEllipse(node, rx, rx, point);
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-line.js
+
+
+/*
+ * Returns the point at which two lines, p and q, intersect or returns
+ * undefined if they do not intersect.
+ */
+function intersectLine(p1, p2, q1, q2) {
+ // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,
+ // p7 and p473.
+
+ var a1, a2, b1, b2, c1, c2;
+ var r1, r2, r3, r4;
+ var denom, offset, num;
+ var x, y;
+
+ // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +
+ // b1 y + c1 = 0.
+ a1 = p2.y - p1.y;
+ b1 = p1.x - p2.x;
+ c1 = p2.x * p1.y - p1.x * p2.y;
+
+ // Compute r3 and r4.
+ r3 = a1 * q1.x + b1 * q1.y + c1;
+ r4 = a1 * q2.x + b1 * q2.y + c1;
+
+ // Check signs of r3 and r4. If both point 3 and point 4 lie on
+ // same side of line 1, the line segments do not intersect.
+ if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {
+ return /*DONT_INTERSECT*/;
+ }
+
+ // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0
+ a2 = q2.y - q1.y;
+ b2 = q1.x - q2.x;
+ c2 = q2.x * q1.y - q1.x * q2.y;
+
+ // Compute r1 and r2
+ r1 = a2 * p1.x + b2 * p1.y + c2;
+ r2 = a2 * p2.x + b2 * p2.y + c2;
+
+ // Check signs of r1 and r2. If both point 1 and point 2 lie
+ // on same side of second line segment, the line segments do
+ // not intersect.
+ if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {
+ return /*DONT_INTERSECT*/;
+ }
+
+ // Line segments intersect: compute intersection point.
+ denom = a1 * b2 - a2 * b1;
+ if (denom === 0) {
+ return /*COLLINEAR*/;
+ }
+
+ offset = Math.abs(denom / 2);
+
+ // The denom/2 is to get rounding instead of truncating. It
+ // is added or subtracted to the numerator, depending upon the
+ // sign of the numerator.
+ num = b1 * c2 - b2 * c1;
+ x = num < 0 ? (num - offset) / denom : (num + offset) / denom;
+
+ num = a2 * c1 - a1 * c2;
+ y = num < 0 ? (num - offset) / denom : (num + offset) / denom;
+
+ return { x: x, y: y };
+}
+
+function sameSign(r1, r2) {
+ return r1 * r2 > 0;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-polygon.js
+
+
+
+
+/*
+ * Returns the point ({x, y}) at which the point argument intersects with the
+ * node argument assuming that it has the shape specified by polygon.
+ */
+function intersectPolygon(node, polyPoints, point) {
+ var x1 = node.x;
+ var y1 = node.y;
+
+ var intersections = [];
+
+ var minX = Number.POSITIVE_INFINITY;
+ var minY = Number.POSITIVE_INFINITY;
+ polyPoints.forEach(function (entry) {
+ minX = Math.min(minX, entry.x);
+ minY = Math.min(minY, entry.y);
+ });
+
+ var left = x1 - node.width / 2 - minX;
+ var top = y1 - node.height / 2 - minY;
+
+ for (var i = 0; i < polyPoints.length; i++) {
+ var p1 = polyPoints[i];
+ var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];
+ var intersect = intersectLine(
+ node,
+ point,
+ { x: left + p1.x, y: top + p1.y },
+ { x: left + p2.x, y: top + p2.y }
+ );
+ if (intersect) {
+ intersections.push(intersect);
+ }
+ }
+
+ if (!intersections.length) {
+ console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node);
+ return node;
+ }
+
+ if (intersections.length > 1) {
+ // More intersections, find the one nearest to edge end point
+ intersections.sort(function (p, q) {
+ var pdx = p.x - point.x;
+ var pdy = p.y - point.y;
+ var distp = Math.sqrt(pdx * pdx + pdy * pdy);
+
+ var qdx = q.x - point.x;
+ var qdy = q.y - point.y;
+ var distq = Math.sqrt(qdx * qdx + qdy * qdy);
+
+ return distp < distq ? -1 : distp === distq ? 0 : 1;
+ });
+ }
+ return intersections[0];
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-rect.js
+
+
+function intersectRect(node, point) {
+ var x = node.x;
+ var y = node.y;
+
+ // Rectangle intersection algorithm from:
+ // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes
+ var dx = point.x - x;
+ var dy = point.y - y;
+ var w = node.width / 2;
+ var h = node.height / 2;
+
+ var sx, sy;
+ if (Math.abs(dy) * w > Math.abs(dx) * h) {
+ // Intersection is top or bottom of rect.
+ if (dy < 0) {
+ h = -h;
+ }
+ sx = dy === 0 ? 0 : (h * dx) / dy;
+ sy = h;
+ } else {
+ // Intersection is left or right of rect.
+ if (dx < 0) {
+ w = -w;
+ }
+ sx = w;
+ sy = dx === 0 ? 0 : (w * dy) / dx;
+ }
+
+ return { x: x + sx, y: y + sy };
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/shapes.js
+
+
+
+
+
+
+
+var shapes = {
+ rect,
+ ellipse,
+ circle,
+ diamond,
+};
+
+function setShapes(value) {
+ shapes = value;
+}
+
+function rect(parent, bbox, node) {
+ var shapeSvg = parent
+ .insert('rect', ':first-child')
+ .attr('rx', node.rx)
+ .attr('ry', node.ry)
+ .attr('x', -bbox.width / 2)
+ .attr('y', -bbox.height / 2)
+ .attr('width', bbox.width)
+ .attr('height', bbox.height);
+
+ node.intersect = function (point) {
+ return intersectRect(node, point);
+ };
+
+ return shapeSvg;
+}
+
+function ellipse(parent, bbox, node) {
+ var rx = bbox.width / 2;
+ var ry = bbox.height / 2;
+ var shapeSvg = parent
+ .insert('ellipse', ':first-child')
+ .attr('x', -bbox.width / 2)
+ .attr('y', -bbox.height / 2)
+ .attr('rx', rx)
+ .attr('ry', ry);
+
+ node.intersect = function (point) {
+ return intersectEllipse(node, rx, ry, point);
+ };
+
+ return shapeSvg;
+}
+
+function circle(parent, bbox, node) {
+ var r = Math.max(bbox.width, bbox.height) / 2;
+ var shapeSvg = parent
+ .insert('circle', ':first-child')
+ .attr('x', -bbox.width / 2)
+ .attr('y', -bbox.height / 2)
+ .attr('r', r);
+
+ node.intersect = function (point) {
+ return intersectCircle(node, r, point);
+ };
+
+ return shapeSvg;
+}
+
+// Circumscribe an ellipse for the bounding box with a diamond shape. I derived
+// the function to calculate the diamond shape from:
+// http://mathforum.org/kb/message.jspa?messageID=3750236
+function diamond(parent, bbox, node) {
+ var w = (bbox.width * Math.SQRT2) / 2;
+ var h = (bbox.height * Math.SQRT2) / 2;
+ var points = [
+ { x: 0, y: -h },
+ { x: -w, y: 0 },
+ { x: 0, y: h },
+ { x: w, y: 0 },
+ ];
+ var shapeSvg = parent.insert('polygon', ':first-child').attr(
+ 'points',
+ points
+ .map(function (p) {
+ return p.x + ',' + p.y;
+ })
+ .join(' ')
+ );
+
+ node.intersect = function (p) {
+ return intersectPolygon(node, points, p);
+ };
+
+ return shapeSvg;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/render.js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// This design is based on http://bost.ocks.org/mike/chart/.
+function render() {
+ var fn = function (svg, g) {
+ preProcessGraph(g);
+
+ var outputGroup = createOrSelectGroup(svg, 'output');
+ var clustersGroup = createOrSelectGroup(outputGroup, 'clusters');
+ var edgePathsGroup = createOrSelectGroup(outputGroup, 'edgePaths');
+ var edgeLabels = createEdgeLabels(createOrSelectGroup(outputGroup, 'edgeLabels'), g);
+ var nodes = createNodes(createOrSelectGroup(outputGroup, 'nodes'), g, shapes);
+
+ (0,dagre/* layout */.Zp)(g);
+
+ positionNodes(nodes, g);
+ positionEdgeLabels(edgeLabels, g);
+ createEdgePaths(edgePathsGroup, g, arrows);
+
+ var clusters = createClusters(clustersGroup, g);
+ positionClusters(clusters, g);
+
+ postProcessGraph(g);
+ };
+
+ fn.createNodes = function (value) {
+ if (!arguments.length) return createNodes;
+ setCreateNodes(value);
+ return fn;
+ };
+
+ fn.createClusters = function (value) {
+ if (!arguments.length) return createClusters;
+ setCreateClusters(value);
+ return fn;
+ };
+
+ fn.createEdgeLabels = function (value) {
+ if (!arguments.length) return createEdgeLabels;
+ setCreateEdgeLabels(value);
+ return fn;
+ };
+
+ fn.createEdgePaths = function (value) {
+ if (!arguments.length) return createEdgePaths;
+ setCreateEdgePaths(value);
+ return fn;
+ };
+
+ fn.shapes = function (value) {
+ if (!arguments.length) return shapes;
+ setShapes(value);
+ return fn;
+ };
+
+ fn.arrows = function (value) {
+ if (!arguments.length) return arrows;
+ setArrows(value);
+ return fn;
+ };
+
+ return fn;
+}
+
+var NODE_DEFAULT_ATTRS = {
+ paddingLeft: 10,
+ paddingRight: 10,
+ paddingTop: 10,
+ paddingBottom: 10,
+ rx: 0,
+ ry: 0,
+ shape: 'rect',
+};
+
+var EDGE_DEFAULT_ATTRS = {
+ arrowhead: 'normal',
+ curve: src/* curveLinear */.lUB,
+};
+
+function preProcessGraph(g) {
+ g.nodes().forEach(function (v) {
+ var node = g.node(v);
+ if (!has/* default */.A(node, 'label') && !g.children(v).length) {
+ node.label = v;
+ }
+
+ if (has/* default */.A(node, 'paddingX')) {
+ defaults/* default */.A(node, {
+ paddingLeft: node.paddingX,
+ paddingRight: node.paddingX,
+ });
+ }
+
+ if (has/* default */.A(node, 'paddingY')) {
+ defaults/* default */.A(node, {
+ paddingTop: node.paddingY,
+ paddingBottom: node.paddingY,
+ });
+ }
+
+ if (has/* default */.A(node, 'padding')) {
+ defaults/* default */.A(node, {
+ paddingLeft: node.padding,
+ paddingRight: node.padding,
+ paddingTop: node.padding,
+ paddingBottom: node.padding,
+ });
+ }
+
+ defaults/* default */.A(node, NODE_DEFAULT_ATTRS);
+
+ forEach/* default */.A(['paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom'], function (k) {
+ node[k] = Number(node[k]);
+ });
+
+ // Save dimensions for restore during post-processing
+ if (has/* default */.A(node, 'width')) {
+ node._prevWidth = node.width;
+ }
+ if (has/* default */.A(node, 'height')) {
+ node._prevHeight = node.height;
+ }
+ });
+
+ g.edges().forEach(function (e) {
+ var edge = g.edge(e);
+ if (!has/* default */.A(edge, 'label')) {
+ edge.label = '';
+ }
+ defaults/* default */.A(edge, EDGE_DEFAULT_ATTRS);
+ });
+}
+
+function postProcessGraph(g) {
+ forEach/* default */.A(g.nodes(), function (v) {
+ var node = g.node(v);
+
+ // Restore original dimensions
+ if (has/* default */.A(node, '_prevWidth')) {
+ node.width = node._prevWidth;
+ } else {
+ delete node.width;
+ }
+
+ if (has/* default */.A(node, '_prevHeight')) {
+ node.height = node._prevHeight;
+ } else {
+ delete node.height;
+ }
+
+ delete node._prevWidth;
+ delete node._prevHeight;
+ });
+}
+
+function createOrSelectGroup(root, name) {
+ var selection = root.select('g.' + name);
+ if (selection.empty()) {
+ selection = root.append('g').attr('class', name);
+ }
+ return selection;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/index.js
+
+
+
+
+
+
+
+// EXTERNAL MODULE: ./node_modules/mermaid/dist/styles-3ed67cfa.js
+var styles_3ed67cfa = __webpack_require__(8696);
+// EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js
+var dayjs_min = __webpack_require__(4353);
+// EXTERNAL MODULE: ./node_modules/@braintree/sanitize-url/dist/index.js
+var dist = __webpack_require__(6750);
+// EXTERNAL MODULE: ./node_modules/dompurify/dist/purify.es.mjs
+var purify_es = __webpack_require__(9418);
+// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/json.js
+var json = __webpack_require__(4075);
+;// CONCATENATED MODULE: ./node_modules/mermaid/dist/flowDiagram-5540d9b9.js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+function question(parent, bbox, node) {
+ const w = bbox.width;
+ const h = bbox.height;
+ const s = (w + h) * 0.9;
+ const points = [
+ { x: s / 2, y: 0 },
+ { x: s, y: -s / 2 },
+ { x: s / 2, y: -s },
+ { x: 0, y: -s / 2 }
+ ];
+ const shapeSvg = insertPolygonShape(parent, s, s, points);
+ node.intersect = function(point) {
+ return intersectPolygon(node, points, point);
+ };
+ return shapeSvg;
+}
+function hexagon(parent, bbox, node) {
+ const f = 4;
+ const h = bbox.height;
+ const m = h / f;
+ const w = bbox.width + 2 * m;
+ const points = [
+ { x: m, y: 0 },
+ { x: w - m, y: 0 },
+ { x: w, y: -h / 2 },
+ { x: w - m, y: -h },
+ { x: m, y: -h },
+ { x: 0, y: -h / 2 }
+ ];
+ const shapeSvg = insertPolygonShape(parent, w, h, points);
+ node.intersect = function(point) {
+ return intersectPolygon(node, points, point);
+ };
+ return shapeSvg;
+}
+function rect_left_inv_arrow(parent, bbox, node) {
+ const w = bbox.width;
+ const h = bbox.height;
+ const points = [
+ { x: -h / 2, y: 0 },
+ { x: w, y: 0 },
+ { x: w, y: -h },
+ { x: -h / 2, y: -h },
+ { x: 0, y: -h / 2 }
+ ];
+ const shapeSvg = insertPolygonShape(parent, w, h, points);
+ node.intersect = function(point) {
+ return intersectPolygon(node, points, point);
+ };
+ return shapeSvg;
+}
+function lean_right(parent, bbox, node) {
+ const w = bbox.width;
+ const h = bbox.height;
+ const points = [
+ { x: -2 * h / 6, y: 0 },
+ { x: w - h / 6, y: 0 },
+ { x: w + 2 * h / 6, y: -h },
+ { x: h / 6, y: -h }
+ ];
+ const shapeSvg = insertPolygonShape(parent, w, h, points);
+ node.intersect = function(point) {
+ return intersectPolygon(node, points, point);
+ };
+ return shapeSvg;
+}
+function lean_left(parent, bbox, node) {
+ const w = bbox.width;
+ const h = bbox.height;
+ const points = [
+ { x: 2 * h / 6, y: 0 },
+ { x: w + h / 6, y: 0 },
+ { x: w - 2 * h / 6, y: -h },
+ { x: -h / 6, y: -h }
+ ];
+ const shapeSvg = insertPolygonShape(parent, w, h, points);
+ node.intersect = function(point) {
+ return intersectPolygon(node, points, point);
+ };
+ return shapeSvg;
+}
+function trapezoid(parent, bbox, node) {
+ const w = bbox.width;
+ const h = bbox.height;
+ const points = [
+ { x: -2 * h / 6, y: 0 },
+ { x: w + 2 * h / 6, y: 0 },
+ { x: w - h / 6, y: -h },
+ { x: h / 6, y: -h }
+ ];
+ const shapeSvg = insertPolygonShape(parent, w, h, points);
+ node.intersect = function(point) {
+ return intersectPolygon(node, points, point);
+ };
+ return shapeSvg;
+}
+function inv_trapezoid(parent, bbox, node) {
+ const w = bbox.width;
+ const h = bbox.height;
+ const points = [
+ { x: h / 6, y: 0 },
+ { x: w - h / 6, y: 0 },
+ { x: w + 2 * h / 6, y: -h },
+ { x: -2 * h / 6, y: -h }
+ ];
+ const shapeSvg = insertPolygonShape(parent, w, h, points);
+ node.intersect = function(point) {
+ return intersectPolygon(node, points, point);
+ };
+ return shapeSvg;
+}
+function rect_right_inv_arrow(parent, bbox, node) {
+ const w = bbox.width;
+ const h = bbox.height;
+ const points = [
+ { x: 0, y: 0 },
+ { x: w + h / 2, y: 0 },
+ { x: w, y: -h / 2 },
+ { x: w + h / 2, y: -h },
+ { x: 0, y: -h }
+ ];
+ const shapeSvg = insertPolygonShape(parent, w, h, points);
+ node.intersect = function(point) {
+ return intersectPolygon(node, points, point);
+ };
+ return shapeSvg;
+}
+function stadium(parent, bbox, node) {
+ const h = bbox.height;
+ const w = bbox.width + h / 4;
+ const shapeSvg = parent.insert("rect", ":first-child").attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h);
+ node.intersect = function(point) {
+ return intersectRect(node, point);
+ };
+ return shapeSvg;
+}
+function subroutine(parent, bbox, node) {
+ const w = bbox.width;
+ const h = bbox.height;
+ const points = [
+ { x: 0, y: 0 },
+ { x: w, y: 0 },
+ { x: w, y: -h },
+ { x: 0, y: -h },
+ { x: 0, y: 0 },
+ { x: -8, y: 0 },
+ { x: w + 8, y: 0 },
+ { x: w + 8, y: -h },
+ { x: -8, y: -h },
+ { x: -8, y: 0 }
+ ];
+ const shapeSvg = insertPolygonShape(parent, w, h, points);
+ node.intersect = function(point) {
+ return intersectPolygon(node, points, point);
+ };
+ return shapeSvg;
+}
+function cylinder(parent, bbox, node) {
+ const w = bbox.width;
+ const rx = w / 2;
+ const ry = rx / (2.5 + w / 50);
+ const h = bbox.height + ry;
+ const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h;
+ const shapeSvg = parent.attr("label-offset-y", ry).insert("path", ":first-child").attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")");
+ node.intersect = function(point) {
+ const pos = intersectRect(node, point);
+ const x = pos.x - node.x;
+ if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {
+ let y = ry * ry * (1 - x * x / (rx * rx));
+ if (y != 0) {
+ y = Math.sqrt(y);
+ }
+ y = ry - y;
+ if (point.y - node.y > 0) {
+ y = -y;
+ }
+ pos.y += y;
+ }
+ return pos;
+ };
+ return shapeSvg;
+}
+function addToRender(render2) {
+ render2.shapes().question = question;
+ render2.shapes().hexagon = hexagon;
+ render2.shapes().stadium = stadium;
+ render2.shapes().subroutine = subroutine;
+ render2.shapes().cylinder = cylinder;
+ render2.shapes().rect_left_inv_arrow = rect_left_inv_arrow;
+ render2.shapes().lean_right = lean_right;
+ render2.shapes().lean_left = lean_left;
+ render2.shapes().trapezoid = trapezoid;
+ render2.shapes().inv_trapezoid = inv_trapezoid;
+ render2.shapes().rect_right_inv_arrow = rect_right_inv_arrow;
+}
+function addToRenderV2(addShape) {
+ addShape({ question });
+ addShape({ hexagon });
+ addShape({ stadium });
+ addShape({ subroutine });
+ addShape({ cylinder });
+ addShape({ rect_left_inv_arrow });
+ addShape({ lean_right });
+ addShape({ lean_left });
+ addShape({ trapezoid });
+ addShape({ inv_trapezoid });
+ addShape({ rect_right_inv_arrow });
+}
+function insertPolygonShape(parent, w, h, points) {
+ return parent.insert("polygon", ":first-child").attr(
+ "points",
+ points.map(function(d) {
+ return d.x + "," + d.y;
+ }).join(" ")
+ ).attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")");
+}
+const flowChartShapes = {
+ addToRender,
+ addToRenderV2
+};
+const conf = {};
+const setConf = function(cnf) {
+ const keys = Object.keys(cnf);
+ for (const key of keys) {
+ conf[key] = cnf[key];
+ }
+};
+const addVertices = async function(vert, g, svgId, root, _doc, diagObj) {
+ const svg = !root ? (0,src/* select */.Ltv)(`[id="${svgId}"]`) : root.select(`[id="${svgId}"]`);
+ const doc = !_doc ? document : _doc;
+ const keys = Object.keys(vert);
+ for (const id of keys) {
+ const vertex = vert[id];
+ let classStr = "default";
+ if (vertex.classes.length > 0) {
+ classStr = vertex.classes.join(" ");
+ }
+ const styles = (0,mermaid_f47111a7.k)(vertex.styles);
+ let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id;
+ let vertexNode;
+ if ((0,mermaid_f47111a7.m)((0,mermaid_f47111a7.c)().flowchart.htmlLabels)) {
+ const node = {
+ label: await (0,mermaid_f47111a7.r)(
+ vertexText.replace(
+ /fa[blrs]?:fa-[\w-]+/g,
+ // cspell:disable-line
+ (s) => ``
+ ),
+ (0,mermaid_f47111a7.c)()
+ )
+ };
+ vertexNode = (0,add_html_label/* addHtmlLabel */.H)(svg, node).node();
+ vertexNode.parentNode.removeChild(vertexNode);
+ } else {
+ const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text");
+ svgLabel.setAttribute("style", styles.labelStyle.replace("color:", "fill:"));
+ const rows = vertexText.split(mermaid_f47111a7.e.lineBreakRegex);
+ for (const row of rows) {
+ const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
+ tspan.setAttribute("dy", "1em");
+ tspan.setAttribute("x", "1");
+ tspan.textContent = row;
+ svgLabel.appendChild(tspan);
+ }
+ vertexNode = svgLabel;
+ }
+ let radius = 0;
+ let _shape = "";
+ switch (vertex.type) {
+ case "round":
+ radius = 5;
+ _shape = "rect";
+ break;
+ case "square":
+ _shape = "rect";
+ break;
+ case "diamond":
+ _shape = "question";
+ break;
+ case "hexagon":
+ _shape = "hexagon";
+ break;
+ case "odd":
+ _shape = "rect_left_inv_arrow";
+ break;
+ case "lean_right":
+ _shape = "lean_right";
+ break;
+ case "lean_left":
+ _shape = "lean_left";
+ break;
+ case "trapezoid":
+ _shape = "trapezoid";
+ break;
+ case "inv_trapezoid":
+ _shape = "inv_trapezoid";
+ break;
+ case "odd_right":
+ _shape = "rect_left_inv_arrow";
+ break;
+ case "circle":
+ _shape = "circle";
+ break;
+ case "ellipse":
+ _shape = "ellipse";
+ break;
+ case "stadium":
+ _shape = "stadium";
+ break;
+ case "subroutine":
+ _shape = "subroutine";
+ break;
+ case "cylinder":
+ _shape = "cylinder";
+ break;
+ case "group":
+ _shape = "rect";
+ break;
+ default:
+ _shape = "rect";
+ }
+ mermaid_f47111a7.l.warn("Adding node", vertex.id, vertex.domId);
+ g.setNode(diagObj.db.lookUpDomId(vertex.id), {
+ labelType: "svg",
+ labelStyle: styles.labelStyle,
+ shape: _shape,
+ label: vertexNode,
+ rx: radius,
+ ry: radius,
+ class: classStr,
+ style: styles.style,
+ id: diagObj.db.lookUpDomId(vertex.id)
+ });
+ }
+};
+const addEdges = async function(edges, g, diagObj) {
+ let cnt = 0;
+ let defaultStyle;
+ let defaultLabelStyle;
+ if (edges.defaultStyle !== void 0) {
+ const defaultStyles = (0,mermaid_f47111a7.k)(edges.defaultStyle);
+ defaultStyle = defaultStyles.style;
+ defaultLabelStyle = defaultStyles.labelStyle;
+ }
+ for (const edge of edges) {
+ cnt++;
+ const linkId = "L-" + edge.start + "-" + edge.end;
+ const linkNameStart = "LS-" + edge.start;
+ const linkNameEnd = "LE-" + edge.end;
+ const edgeData = {};
+ if (edge.type === "arrow_open") {
+ edgeData.arrowhead = "none";
+ } else {
+ edgeData.arrowhead = "normal";
+ }
+ let style = "";
+ let labelStyle = "";
+ if (edge.style !== void 0) {
+ const styles = (0,mermaid_f47111a7.k)(edge.style);
+ style = styles.style;
+ labelStyle = styles.labelStyle;
+ } else {
+ switch (edge.stroke) {
+ case "normal":
+ style = "fill:none";
+ if (defaultStyle !== void 0) {
+ style = defaultStyle;
+ }
+ if (defaultLabelStyle !== void 0) {
+ labelStyle = defaultLabelStyle;
+ }
+ break;
+ case "dotted":
+ style = "fill:none;stroke-width:2px;stroke-dasharray:3;";
+ break;
+ case "thick":
+ style = " stroke-width: 3.5px;fill:none";
+ break;
+ }
+ }
+ edgeData.style = style;
+ edgeData.labelStyle = labelStyle;
+ if (edge.interpolate !== void 0) {
+ edgeData.curve = (0,mermaid_f47111a7.n)(edge.interpolate, src/* curveLinear */.lUB);
+ } else if (edges.defaultInterpolate !== void 0) {
+ edgeData.curve = (0,mermaid_f47111a7.n)(edges.defaultInterpolate, src/* curveLinear */.lUB);
+ } else {
+ edgeData.curve = (0,mermaid_f47111a7.n)(conf.curve, src/* curveLinear */.lUB);
+ }
+ if (edge.text === void 0) {
+ if (edge.style !== void 0) {
+ edgeData.arrowheadStyle = "fill: #333";
+ }
+ } else {
+ edgeData.arrowheadStyle = "fill: #333";
+ edgeData.labelpos = "c";
+ if ((0,mermaid_f47111a7.m)((0,mermaid_f47111a7.c)().flowchart.htmlLabels)) {
+ edgeData.labelType = "html";
+ edgeData.label = `${await (0,mermaid_f47111a7.r)(
+ edge.text.replace(
+ /fa[blrs]?:fa-[\w-]+/g,
+ // cspell:disable-line
+ (s) => ``
+ ),
+ (0,mermaid_f47111a7.c)()
+ )}`;
+ } else {
+ edgeData.labelType = "text";
+ edgeData.label = edge.text.replace(mermaid_f47111a7.e.lineBreakRegex, "\n");
+ if (edge.style === void 0) {
+ edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none";
+ }
+ edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:");
+ }
+ }
+ edgeData.id = linkId;
+ edgeData.class = linkNameStart + " " + linkNameEnd;
+ edgeData.minlen = edge.length || 1;
+ g.setEdge(diagObj.db.lookUpDomId(edge.start), diagObj.db.lookUpDomId(edge.end), edgeData, cnt);
+ }
+};
+const getClasses = function(text, diagObj) {
+ mermaid_f47111a7.l.info("Extracting classes");
+ return diagObj.db.getClasses();
+};
+const draw = async function(text, id, _version, diagObj) {
+ mermaid_f47111a7.l.info("Drawing flowchart");
+ const { securityLevel, flowchart: conf2 } = (0,mermaid_f47111a7.c)();
+ let sandboxElement;
+ if (securityLevel === "sandbox") {
+ sandboxElement = (0,src/* select */.Ltv)("#i" + id);
+ }
+ const root = securityLevel === "sandbox" ? (0,src/* select */.Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,src/* select */.Ltv)("body");
+ const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
+ let dir = diagObj.db.getDirection();
+ if (dir === void 0) {
+ dir = "TD";
+ }
+ const nodeSpacing = conf2.nodeSpacing || 50;
+ const rankSpacing = conf2.rankSpacing || 50;
+ const g = new graphlib/* Graph */.T({
+ multigraph: true,
+ compound: true
+ }).setGraph({
+ rankdir: dir,
+ nodesep: nodeSpacing,
+ ranksep: rankSpacing,
+ marginx: 8,
+ marginy: 8
+ }).setDefaultEdgeLabel(function() {
+ return {};
+ });
+ let subG;
+ const subGraphs = diagObj.db.getSubGraphs();
+ for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) {
+ subG = subGraphs[i2];
+ diagObj.db.addVertex(subG.id, subG.title, "group", void 0, subG.classes);
+ }
+ const vert = diagObj.db.getVertices();
+ mermaid_f47111a7.l.warn("Get vertices", vert);
+ const edges = diagObj.db.getEdges();
+ let i = 0;
+ for (i = subGraphs.length - 1; i >= 0; i--) {
+ subG = subGraphs[i];
+ (0,src/* selectAll */.Ubm)("cluster").append("text");
+ for (let j = 0; j < subG.nodes.length; j++) {
+ mermaid_f47111a7.l.warn(
+ "Setting subgraph",
+ subG.nodes[j],
+ diagObj.db.lookUpDomId(subG.nodes[j]),
+ diagObj.db.lookUpDomId(subG.id)
+ );
+ g.setParent(diagObj.db.lookUpDomId(subG.nodes[j]), diagObj.db.lookUpDomId(subG.id));
+ }
+ }
+ await addVertices(vert, g, id, root, doc, diagObj);
+ await addEdges(edges, g, diagObj);
+ const render$1 = new render();
+ flowChartShapes.addToRender(render$1);
+ render$1.arrows().none = function normal(parent, id2, edge, type) {
+ const marker = parent.append("marker").attr("id", id2).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto");
+ const path = marker.append("path").attr("d", "M 0 0 L 0 0 L 0 0 z");
+ (0,util/* applyStyle */.AV)(path, edge[type + "Style"]);
+ };
+ render$1.arrows().normal = function normal(parent, id2) {
+ const marker = parent.append("marker").attr("id", id2).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto");
+ marker.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
+ };
+ const svg = root.select(`[id="${id}"]`);
+ const element = root.select("#" + id + " g");
+ render$1(element, g);
+ element.selectAll("g.node").attr("title", function() {
+ return diagObj.db.getTooltip(this.id);
+ });
+ diagObj.db.indexNodes("subGraph" + i);
+ for (i = 0; i < subGraphs.length; i++) {
+ subG = subGraphs[i];
+ if (subG.title !== "undefined") {
+ const clusterRects = doc.querySelectorAll(
+ "#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"] rect'
+ );
+ const clusterEl = doc.querySelectorAll(
+ "#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"]'
+ );
+ const xPos = clusterRects[0].x.baseVal.value;
+ const yPos = clusterRects[0].y.baseVal.value;
+ const _width = clusterRects[0].width.baseVal.value;
+ const cluster = (0,src/* select */.Ltv)(clusterEl[0]);
+ const te = cluster.select(".label");
+ te.attr("transform", `translate(${xPos + _width / 2}, ${yPos + 14})`);
+ te.attr("id", id + "Text");
+ for (let j = 0; j < subG.classes.length; j++) {
+ clusterEl[0].classList.add(subG.classes[j]);
+ }
+ }
+ }
+ if (!conf2.htmlLabels) {
+ const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label');
+ for (const label of labels) {
+ const dim = label.getBBox();
+ const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect");
+ rect.setAttribute("rx", 0);
+ rect.setAttribute("ry", 0);
+ rect.setAttribute("width", dim.width);
+ rect.setAttribute("height", dim.height);
+ label.insertBefore(rect, label.firstChild);
+ }
+ }
+ (0,mermaid_f47111a7.o)(g, svg, conf2.diagramPadding, conf2.useMaxWidth);
+ const keys = Object.keys(vert);
+ keys.forEach(function(key) {
+ const vertex = vert[key];
+ if (vertex.link) {
+ const node = root.select("#" + id + ' [id="' + diagObj.db.lookUpDomId(key) + '"]');
+ if (node) {
+ const link = doc.createElementNS("http://www.w3.org/2000/svg", "a");
+ link.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" "));
+ link.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link);
+ link.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener");
+ if (securityLevel === "sandbox") {
+ link.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top");
+ } else if (vertex.linkTarget) {
+ link.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget);
+ }
+ const linkNode = node.insert(function() {
+ return link;
+ }, ":first-child");
+ const shape = node.select(".label-container");
+ if (shape) {
+ linkNode.append(function() {
+ return shape.node();
+ });
+ }
+ const label = node.select(".label");
+ if (label) {
+ linkNode.append(function() {
+ return label.node();
+ });
+ }
+ }
+ }
+ });
+};
+const flowRenderer = {
+ setConf,
+ addVertices,
+ addEdges,
+ getClasses,
+ draw
+};
+const diagram = {
+ parser: flowDb_4b19a42f.p,
+ db: flowDb_4b19a42f.f,
+ renderer: styles_3ed67cfa.f,
+ styles: styles_3ed67cfa.a,
+ init: (cnf) => {
+ if (!cnf.flowchart) {
+ cnf.flowchart = {};
+ }
+ cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
+ flowRenderer.setConf(cnf.flowchart);
+ flowDb_4b19a42f.f.clear();
+ flowDb_4b19a42f.f.setGen("gen-1");
+ }
+};
+
+
+
+/***/ }),
+
+/***/ 2746:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ r: () => (/* binding */ render)
+/* harmony export */ });
+/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1176);
+/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4075);
+/* harmony import */ var _edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8747);
+/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6257);
+/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697);
+/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3791);
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6312);
+
+
+
+
+
+
+
+let clusterDb = {};
+let descendants = {};
+let parents = {};
+const clear$1 = () => {
+ descendants = {};
+ parents = {};
+ clusterDb = {};
+};
+const isDescendant = (id, ancestorId) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("In isDescendant", ancestorId, " ", id, " = ", descendants[ancestorId].includes(id));
+ if (descendants[ancestorId].includes(id)) {
+ return true;
+ }
+ return false;
+};
+const edgeInCluster = (edge, clusterId) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Descendants of ", clusterId, " is ", descendants[clusterId]);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge is ", edge);
+ if (edge.v === clusterId) {
+ return false;
+ }
+ if (edge.w === clusterId) {
+ return false;
+ }
+ if (!descendants[clusterId]) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Tilt, ", clusterId, ",not in descendants");
+ return false;
+ }
+ return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w);
+};
+const copy = (clusterId, graph, newGraph, rootId) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(
+ "Copying children of ",
+ clusterId,
+ "root",
+ rootId,
+ "data",
+ graph.node(clusterId),
+ rootId
+ );
+ const nodes = graph.children(clusterId) || [];
+ if (clusterId !== rootId) {
+ nodes.push(clusterId);
+ }
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes);
+ nodes.forEach((node) => {
+ if (graph.children(node).length > 0) {
+ copy(node, graph, newGraph, rootId);
+ } else {
+ const data = graph.node(node);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("cp ", node, " to ", rootId, " with parent ", clusterId);
+ newGraph.setNode(node, data);
+ if (rootId !== graph.parent(node)) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Setting parent", node, graph.parent(node));
+ newGraph.setParent(node, graph.parent(node));
+ }
+ if (clusterId !== rootId && node !== clusterId) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Setting parent", node, clusterId);
+ newGraph.setParent(node, clusterId);
+ } else {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(
+ "Not Setting parent for node=",
+ node,
+ "cluster!==rootId",
+ clusterId !== rootId,
+ "node!==clusterId",
+ node !== clusterId
+ );
+ }
+ const edges = graph.edges(node);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Copying Edges", edges);
+ edges.forEach((edge) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge", edge);
+ const data2 = graph.edge(edge.v, edge.w, edge.name);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge data", data2, rootId);
+ try {
+ if (edgeInCluster(edge, rootId)) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Copying as ", edge.v, edge.w, data2, edge.name);
+ newGraph.setEdge(edge.v, edge.w, data2, edge.name);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0]));
+ } else {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(
+ "Skipping copy of edge ",
+ edge.v,
+ "-->",
+ edge.w,
+ " rootId: ",
+ rootId,
+ " clusterId:",
+ clusterId
+ );
+ }
+ } catch (e) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error(e);
+ }
+ });
+ }
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Removing node", node);
+ graph.removeNode(node);
+ });
+};
+const extractDescendants = (id, graph) => {
+ const children = graph.children(id);
+ let res = [...children];
+ for (const child of children) {
+ parents[child] = id;
+ res = [...res, ...extractDescendants(child, graph)];
+ }
+ return res;
+};
+const findNonClusterChild = (id, graph) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching", id);
+ const children = graph.children(id);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching children of id ", id, children);
+ if (children.length < 1) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("This is a valid node", id);
+ return id;
+ }
+ for (const child of children) {
+ const _id = findNonClusterChild(child, graph);
+ if (_id) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Found replacement for", id, " => ", _id);
+ return _id;
+ }
+ }
+};
+const getAnchorId = (id) => {
+ if (!clusterDb[id]) {
+ return id;
+ }
+ if (!clusterDb[id].externalConnections) {
+ return id;
+ }
+ if (clusterDb[id]) {
+ return clusterDb[id].id;
+ }
+ return id;
+};
+const adjustClustersAndEdges = (graph, depth) => {
+ if (!graph || depth > 10) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting out, no graph ");
+ return;
+ } else {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting in, graph ");
+ }
+ graph.nodes().forEach(function(id) {
+ const children = graph.children(id);
+ if (children.length > 0) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(
+ "Cluster identified",
+ id,
+ " Replacement id in edges: ",
+ findNonClusterChild(id, graph)
+ );
+ descendants[id] = extractDescendants(id, graph);
+ clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) };
+ }
+ });
+ graph.nodes().forEach(function(id) {
+ const children = graph.children(id);
+ const edges = graph.edges();
+ if (children.length > 0) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Cluster identified", id, descendants);
+ edges.forEach((edge) => {
+ if (edge.v !== id && edge.w !== id) {
+ const d1 = isDescendant(edge.v, id);
+ const d2 = isDescendant(edge.w, id);
+ if (d1 ^ d2) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge: ", edge, " leaves cluster ", id);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Descendants of XXX ", id, ": ", descendants[id]);
+ clusterDb[id].externalConnections = true;
+ }
+ }
+ });
+ } else {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster ", id, descendants);
+ }
+ });
+ for (let id of Object.keys(clusterDb)) {
+ const nonClusterChild = clusterDb[id].id;
+ const parent = graph.parent(nonClusterChild);
+ if (parent !== id && clusterDb[parent] && !clusterDb[parent].externalConnections) {
+ clusterDb[id].id = parent;
+ }
+ }
+ graph.edges().forEach(function(e) {
+ const edge = graph.edge(e);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e));
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e)));
+ let v = e.v;
+ let w = e.w;
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(
+ "Fix XXX",
+ clusterDb,
+ "ids:",
+ e.v,
+ e.w,
+ "Translating: ",
+ clusterDb[e.v],
+ " --- ",
+ clusterDb[e.w]
+ );
+ if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name);
+ v = getAnchorId(e.v);
+ w = getAnchorId(e.w);
+ graph.removeEdge(e.v, e.w, e.name);
+ const specialId = e.w + "---" + e.v;
+ graph.setNode(specialId, {
+ domId: specialId,
+ id: specialId,
+ labelStyle: "",
+ labelText: edge.label,
+ padding: 0,
+ shape: "labelRect",
+ style: ""
+ });
+ const edge1 = structuredClone(edge);
+ const edge2 = structuredClone(edge);
+ edge1.label = "";
+ edge1.arrowTypeEnd = "none";
+ edge2.label = "";
+ edge1.fromCluster = e.v;
+ edge2.toCluster = e.v;
+ graph.setEdge(v, specialId, edge1, e.name + "-cyclic-special");
+ graph.setEdge(specialId, w, edge2, e.name + "-cyclic-special");
+ } else if (clusterDb[e.v] || clusterDb[e.w]) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name);
+ v = getAnchorId(e.v);
+ w = getAnchorId(e.w);
+ graph.removeEdge(e.v, e.w, e.name);
+ if (v !== e.v) {
+ const parent = graph.parent(v);
+ clusterDb[parent].externalConnections = true;
+ edge.fromCluster = e.v;
+ }
+ if (w !== e.w) {
+ const parent = graph.parent(w);
+ clusterDb[parent].externalConnections = true;
+ edge.toCluster = e.w;
+ }
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fix Replacing with XXX", v, w, e.name);
+ graph.setEdge(v, w, edge, e.name);
+ }
+ });
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Adjusted Graph", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph));
+ extractor(graph, 0);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace(clusterDb);
+};
+const extractor = (graph, depth) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("extractor - ", depth, dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), graph.children("D"));
+ if (depth > 10) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error("Bailing out");
+ return;
+ }
+ let nodes = graph.nodes();
+ let hasChildren = false;
+ for (const node of nodes) {
+ const children = graph.children(node);
+ hasChildren = hasChildren || children.length > 0;
+ }
+ if (!hasChildren) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Done, no node has children", graph.nodes());
+ return;
+ }
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Nodes = ", nodes, depth);
+ for (const node of nodes) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(
+ "Extracting node",
+ node,
+ clusterDb,
+ clusterDb[node] && !clusterDb[node].externalConnections,
+ !graph.parent(node),
+ graph.node(node),
+ graph.children("D"),
+ " Depth ",
+ depth
+ );
+ if (!clusterDb[node]) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster", node, depth);
+ } else if (!clusterDb[node].externalConnections && // !graph.parent(node) &&
+ graph.children(node) && graph.children(node).length > 0) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(
+ "Cluster without external connections, without a parent and with children",
+ node,
+ depth
+ );
+ const graphSettings = graph.graph();
+ let dir = graphSettings.rankdir === "TB" ? "LR" : "TB";
+ if (clusterDb[node] && clusterDb[node].clusterData && clusterDb[node].clusterData.dir) {
+ dir = clusterDb[node].clusterData.dir;
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing dir", clusterDb[node].clusterData.dir, dir);
+ }
+ const clusterGraph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({
+ multigraph: true,
+ compound: true
+ }).setGraph({
+ rankdir: dir,
+ // Todo: set proper spacing
+ nodesep: 50,
+ ranksep: 50,
+ marginx: 8,
+ marginy: 8
+ }).setDefaultEdgeLabel(function() {
+ return {};
+ });
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Old graph before copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph));
+ copy(node, graph, clusterGraph, node);
+ graph.setNode(node, {
+ clusterNode: true,
+ id: node,
+ clusterData: clusterDb[node].clusterData,
+ labelText: clusterDb[node].labelText,
+ graph: clusterGraph
+ });
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New graph after copy node: (", node, ")", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(clusterGraph));
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Old graph after copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph));
+ } else {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(
+ "Cluster ** ",
+ node,
+ " **not meeting the criteria !externalConnections:",
+ !clusterDb[node].externalConnections,
+ " no parent: ",
+ !graph.parent(node),
+ " children ",
+ graph.children(node) && graph.children(node).length > 0,
+ graph.children("D"),
+ depth
+ );
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(clusterDb);
+ }
+ }
+ nodes = graph.nodes();
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New list of nodes", nodes);
+ for (const node of nodes) {
+ const data = graph.node(node);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(" Now next level", node, data);
+ if (data.clusterNode) {
+ extractor(data.graph, depth + 1);
+ }
+ }
+};
+const sorter = (graph, nodes) => {
+ if (nodes.length === 0) {
+ return [];
+ }
+ let result = Object.assign(nodes);
+ nodes.forEach((node) => {
+ const children = graph.children(node);
+ const sorted = sorter(graph, children);
+ result = [...result, ...sorted];
+ });
+ return result;
+};
+const sortNodesByHierarchy = (graph) => sorter(graph, graph.children());
+const rect = (parent, node) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Creating subgraph rect for ", node.id, node);
+ const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)();
+ const shapeSvg = parent.insert("g").attr("class", "cluster" + (node.class ? " " + node.class : "")).attr("id", node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const useHtmlLabels = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels);
+ const label = shapeSvg.insert("g").attr("class", "cluster-label");
+ const text = node.labelType === "markdown" ? (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_5__.a)(label, node.labelText, { style: node.labelStyle, useHtmlLabels }) : label.node().appendChild((0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true));
+ let bbox = text.getBBox();
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ const padding = 0 * node.padding;
+ const halfPadding = padding / 2;
+ const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width;
+ if (node.width <= bbox.width + padding) {
+ node.diff = (bbox.width - node.width) / 2 - node.padding / 2;
+ } else {
+ node.diff = -node.padding / 2;
+ }
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Data ", node, JSON.stringify(node));
+ rect2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - width / 2).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width).attr("height", node.height + padding);
+ const { subGraphTitleTopMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig);
+ if (useHtmlLabels) {
+ label.attr(
+ "transform",
+ // This puts the label on top of the box instead of inside it
+ `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`
+ );
+ } else {
+ label.attr(
+ "transform",
+ // This puts the label on top of the box instead of inside it
+ `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`
+ );
+ }
+ const rectBox = rect2.node().getBBox();
+ node.width = rectBox.width;
+ node.height = rectBox.height;
+ node.intersect = function(point) {
+ return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point);
+ };
+ return shapeSvg;
+};
+const noteGroup = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", "note-cluster").attr("id", node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const padding = 0 * node.padding;
+ const halfPadding = padding / 2;
+ rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", node.width + padding).attr("height", node.height + padding).attr("fill", "none");
+ const rectBox = rect2.node().getBBox();
+ node.width = rectBox.width;
+ node.height = rectBox.height;
+ node.intersect = function(point) {
+ return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point);
+ };
+ return shapeSvg;
+};
+const roundedWithTitle = (parent, node) => {
+ const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)();
+ const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const label = shapeSvg.insert("g").attr("class", "cluster-label");
+ const innerRect = shapeSvg.append("rect");
+ const text = label.node().appendChild((0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true));
+ let bbox = text.getBBox();
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ bbox = text.getBBox();
+ const padding = 0 * node.padding;
+ const halfPadding = padding / 2;
+ const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;
+ if (node.width <= bbox.width + node.padding) {
+ node.diff = (bbox.width + node.padding * 0 - node.width) / 2;
+ } else {
+ node.diff = -node.padding / 2;
+ }
+ rect2.attr("class", "outer").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width + padding).attr("height", node.height + padding);
+ innerRect.attr("class", "inner").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr("width", width + padding).attr("height", node.height + padding - bbox.height - 3);
+ const { subGraphTitleTopMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig);
+ label.attr(
+ "transform",
+ `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 - node.padding / 3 + ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels) ? 5 : 3) + subGraphTitleTopMargin})`
+ );
+ const rectBox = rect2.node().getBBox();
+ node.height = rectBox.height;
+ node.intersect = function(point) {
+ return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point);
+ };
+ return shapeSvg;
+};
+const divider = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const padding = 0 * node.padding;
+ const halfPadding = padding / 2;
+ rect2.attr("class", "divider").attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2).attr("width", node.width + padding).attr("height", node.height + padding);
+ const rectBox = rect2.node().getBBox();
+ node.width = rectBox.width;
+ node.height = rectBox.height;
+ node.diff = -node.padding / 2;
+ node.intersect = function(point) {
+ return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point);
+ };
+ return shapeSvg;
+};
+const shapes = { rect, roundedWithTitle, noteGroup, divider };
+let clusterElems = {};
+const insertCluster = (elem, node) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Inserting cluster");
+ const shape = node.shape || "rect";
+ clusterElems[node.id] = shapes[shape](elem, node);
+};
+const clear = () => {
+ clusterElems = {};
+};
+const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph in recursive render: XXX", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), parentCluster);
+ const dir = graph.graph().rankdir;
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Dir in recursive render - dir:", dir);
+ const elem = _elem.insert("g").attr("class", "root");
+ if (!graph.nodes()) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("No nodes found for", graph);
+ } else {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Recursive render XXX", graph.nodes());
+ }
+ if (graph.edges().length > 0) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Recursive edges", graph.edge(graph.edges()[0]));
+ }
+ const clusters = elem.insert("g").attr("class", "clusters");
+ const edgePaths = elem.insert("g").attr("class", "edgePaths");
+ const edgeLabels = elem.insert("g").attr("class", "edgeLabels");
+ const nodes = elem.insert("g").attr("class", "nodes");
+ await Promise.all(
+ graph.nodes().map(async function(v) {
+ const node = graph.node(v);
+ if (parentCluster !== void 0) {
+ const data = JSON.parse(JSON.stringify(parentCluster.clusterData));
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Setting data for cluster XXX (", v, ") ", data, parentCluster);
+ graph.setNode(parentCluster.id, data);
+ if (!graph.parent(v)) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Setting parent", v, parentCluster.id);
+ graph.setParent(v, parentCluster.id, data);
+ }
+ }
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v)));
+ if (node && node.clusterNode) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster identified", v, node.width, graph.node(v));
+ const o = await recursiveRender(
+ nodes,
+ node.graph,
+ diagramType,
+ id,
+ graph.node(v),
+ siteConfig
+ );
+ const newEl = o.elem;
+ (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.u)(node, newEl);
+ node.diff = o.diff || 0;
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node bounds (abc123)", v, node, node.width, node.x, node.y);
+ (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.s)(newEl, node);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Recursive render complete ", newEl, node);
+ } else {
+ if (graph.children(v).length > 0) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster - the non recursive path XXX", v, node.id, node, graph);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(findNonClusterChild(node.id, graph));
+ clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node };
+ } else {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node - the non recursive path", v, node.id, node);
+ await (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.e)(nodes, graph.node(v), dir);
+ }
+ }
+ })
+ );
+ graph.edges().forEach(function(e) {
+ const edge = graph.edge(e.v, e.w, e.name);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e));
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e)));
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Fix", clusterDb, "ids:", e.v, e.w, "Translating: ", clusterDb[e.v], clusterDb[e.w]);
+ (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.f)(edgeLabels, edge);
+ });
+ graph.edges().forEach(function(e) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e));
+ });
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################");
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("### Layout ###");
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################");
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(graph);
+ (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__/* .layout */ .Zp)(graph);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph after layout:", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph));
+ let diff = 0;
+ const { subGraphTitleTotalMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig);
+ sortNodesByHierarchy(graph).forEach(function(v) {
+ const node = graph.node(v);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Position " + v + ": " + JSON.stringify(graph.node(v)));
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(
+ "Position " + v + ": (" + node.x,
+ "," + node.y,
+ ") width: ",
+ node.width,
+ " height: ",
+ node.height
+ );
+ if (node && node.clusterNode) {
+ node.y += subGraphTitleTotalMargin;
+ (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.p)(node);
+ } else {
+ if (graph.children(v).length > 0) {
+ node.height += subGraphTitleTotalMargin;
+ insertCluster(clusters, node);
+ clusterDb[node.id].node = node;
+ } else {
+ node.y += subGraphTitleTotalMargin / 2;
+ (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.p)(node);
+ }
+ }
+ });
+ graph.edges().forEach(function(e) {
+ const edge = graph.edge(e);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge);
+ edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2);
+ const paths = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.h)(edgePaths, e, edge, clusterDb, diagramType, graph, id);
+ (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.j)(edge, paths);
+ });
+ graph.nodes().forEach(function(v) {
+ const n = graph.node(v);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(v, n.type, n.diff);
+ if (n.type === "group") {
+ diff = n.diff;
+ }
+ });
+ return { elem, diff };
+};
+const render = async (elem, graph, markers, diagramType, id) => {
+ (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.a)(elem, markers, diagramType, id);
+ (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.b)();
+ (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.d)();
+ clear();
+ clear$1();
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph at first:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)));
+ adjustClustersAndEdges(graph);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph after:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)));
+ const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)();
+ await recursiveRender(elem, graph, diagramType, id, void 0, siteConfig);
+};
+
+
+
+/***/ }),
+
+/***/ 8696:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ a: () => (/* binding */ flowStyles),
+/* harmony export */ f: () => (/* binding */ flowRendererV2)
+/* harmony export */ });
+/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(697);
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6312);
+/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6257);
+/* harmony import */ var _index_fc10efb0_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2746);
+/* harmony import */ var dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(646);
+/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5937);
+/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5582);
+
+
+
+
+
+
+const conf = {};
+const setConf = function(cnf) {
+ const keys = Object.keys(cnf);
+ for (const key of keys) {
+ conf[key] = cnf[key];
+ }
+};
+const addVertices = async function(vert, g, svgId, root, doc, diagObj) {
+ const svg = root.select(`[id="${svgId}"]`);
+ const keys = Object.keys(vert);
+ for (const id of keys) {
+ const vertex = vert[id];
+ let classStr = "default";
+ if (vertex.classes.length > 0) {
+ classStr = vertex.classes.join(" ");
+ }
+ classStr = classStr + " flowchart-label";
+ const styles = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.k)(vertex.styles);
+ let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id;
+ let vertexNode;
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("vertex", vertex, vertex.labelType);
+ if (vertex.labelType === "markdown") {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("vertex", vertex, vertex.labelType);
+ } else {
+ if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.htmlLabels)) {
+ const node = {
+ label: vertexText
+ };
+ vertexNode = (0,dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_3__/* .addHtmlLabel */ .H)(svg, node).node();
+ vertexNode.parentNode.removeChild(vertexNode);
+ } else {
+ const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text");
+ svgLabel.setAttribute("style", styles.labelStyle.replace("color:", "fill:"));
+ const rows = vertexText.split(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.e.lineBreakRegex);
+ for (const row of rows) {
+ const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
+ tspan.setAttribute("dy", "1em");
+ tspan.setAttribute("x", "1");
+ tspan.textContent = row;
+ svgLabel.appendChild(tspan);
+ }
+ vertexNode = svgLabel;
+ }
+ }
+ let radius = 0;
+ let _shape = "";
+ switch (vertex.type) {
+ case "round":
+ radius = 5;
+ _shape = "rect";
+ break;
+ case "square":
+ _shape = "rect";
+ break;
+ case "diamond":
+ _shape = "question";
+ break;
+ case "hexagon":
+ _shape = "hexagon";
+ break;
+ case "odd":
+ _shape = "rect_left_inv_arrow";
+ break;
+ case "lean_right":
+ _shape = "lean_right";
+ break;
+ case "lean_left":
+ _shape = "lean_left";
+ break;
+ case "trapezoid":
+ _shape = "trapezoid";
+ break;
+ case "inv_trapezoid":
+ _shape = "inv_trapezoid";
+ break;
+ case "odd_right":
+ _shape = "rect_left_inv_arrow";
+ break;
+ case "circle":
+ _shape = "circle";
+ break;
+ case "ellipse":
+ _shape = "ellipse";
+ break;
+ case "stadium":
+ _shape = "stadium";
+ break;
+ case "subroutine":
+ _shape = "subroutine";
+ break;
+ case "cylinder":
+ _shape = "cylinder";
+ break;
+ case "group":
+ _shape = "rect";
+ break;
+ case "doublecircle":
+ _shape = "doublecircle";
+ break;
+ default:
+ _shape = "rect";
+ }
+ const labelText = await (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.r)(vertexText, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)());
+ g.setNode(vertex.id, {
+ labelStyle: styles.labelStyle,
+ shape: _shape,
+ labelText,
+ labelType: vertex.labelType,
+ rx: radius,
+ ry: radius,
+ class: classStr,
+ style: styles.style,
+ id: vertex.id,
+ link: vertex.link,
+ linkTarget: vertex.linkTarget,
+ tooltip: diagObj.db.getTooltip(vertex.id) || "",
+ domId: diagObj.db.lookUpDomId(vertex.id),
+ haveCallback: vertex.haveCallback,
+ width: vertex.type === "group" ? 500 : void 0,
+ dir: vertex.dir,
+ type: vertex.type,
+ props: vertex.props,
+ padding: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.padding
+ });
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("setNode", {
+ labelStyle: styles.labelStyle,
+ labelType: vertex.labelType,
+ shape: _shape,
+ labelText,
+ rx: radius,
+ ry: radius,
+ class: classStr,
+ style: styles.style,
+ id: vertex.id,
+ domId: diagObj.db.lookUpDomId(vertex.id),
+ width: vertex.type === "group" ? 500 : void 0,
+ type: vertex.type,
+ dir: vertex.dir,
+ props: vertex.props,
+ padding: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.padding
+ });
+ }
+};
+const addEdges = async function(edges, g, diagObj) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 edges = ", edges);
+ let cnt = 0;
+ let linkIdCnt = {};
+ let defaultStyle;
+ let defaultLabelStyle;
+ if (edges.defaultStyle !== void 0) {
+ const defaultStyles = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.k)(edges.defaultStyle);
+ defaultStyle = defaultStyles.style;
+ defaultLabelStyle = defaultStyles.labelStyle;
+ }
+ for (const edge of edges) {
+ cnt++;
+ const linkIdBase = "L-" + edge.start + "-" + edge.end;
+ if (linkIdCnt[linkIdBase] === void 0) {
+ linkIdCnt[linkIdBase] = 0;
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]);
+ } else {
+ linkIdCnt[linkIdBase]++;
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]);
+ }
+ let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase];
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]);
+ const linkNameStart = "LS-" + edge.start;
+ const linkNameEnd = "LE-" + edge.end;
+ const edgeData = { style: "", labelStyle: "" };
+ edgeData.minlen = edge.length || 1;
+ if (edge.type === "arrow_open") {
+ edgeData.arrowhead = "none";
+ } else {
+ edgeData.arrowhead = "normal";
+ }
+ edgeData.arrowTypeStart = "arrow_open";
+ edgeData.arrowTypeEnd = "arrow_open";
+ switch (edge.type) {
+ case "double_arrow_cross":
+ edgeData.arrowTypeStart = "arrow_cross";
+ case "arrow_cross":
+ edgeData.arrowTypeEnd = "arrow_cross";
+ break;
+ case "double_arrow_point":
+ edgeData.arrowTypeStart = "arrow_point";
+ case "arrow_point":
+ edgeData.arrowTypeEnd = "arrow_point";
+ break;
+ case "double_arrow_circle":
+ edgeData.arrowTypeStart = "arrow_circle";
+ case "arrow_circle":
+ edgeData.arrowTypeEnd = "arrow_circle";
+ break;
+ }
+ let style = "";
+ let labelStyle = "";
+ switch (edge.stroke) {
+ case "normal":
+ style = "fill:none;";
+ if (defaultStyle !== void 0) {
+ style = defaultStyle;
+ }
+ if (defaultLabelStyle !== void 0) {
+ labelStyle = defaultLabelStyle;
+ }
+ edgeData.thickness = "normal";
+ edgeData.pattern = "solid";
+ break;
+ case "dotted":
+ edgeData.thickness = "normal";
+ edgeData.pattern = "dotted";
+ edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;";
+ break;
+ case "thick":
+ edgeData.thickness = "thick";
+ edgeData.pattern = "solid";
+ edgeData.style = "stroke-width: 3.5px;fill:none;";
+ break;
+ case "invisible":
+ edgeData.thickness = "invisible";
+ edgeData.pattern = "solid";
+ edgeData.style = "stroke-width: 0;fill:none;";
+ break;
+ }
+ if (edge.style !== void 0) {
+ const styles = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.k)(edge.style);
+ style = styles.style;
+ labelStyle = styles.labelStyle;
+ }
+ edgeData.style = edgeData.style += style;
+ edgeData.labelStyle = edgeData.labelStyle += labelStyle;
+ if (edge.interpolate !== void 0) {
+ edgeData.curve = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.n)(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB);
+ } else if (edges.defaultInterpolate !== void 0) {
+ edgeData.curve = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.n)(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB);
+ } else {
+ edgeData.curve = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.n)(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB);
+ }
+ if (edge.text === void 0) {
+ if (edge.style !== void 0) {
+ edgeData.arrowheadStyle = "fill: #333";
+ }
+ } else {
+ edgeData.arrowheadStyle = "fill: #333";
+ edgeData.labelpos = "c";
+ }
+ edgeData.labelType = edge.labelType;
+ edgeData.label = await (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.r)(edge.text.replace(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.e.lineBreakRegex, "\n"), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)());
+ if (edge.style === void 0) {
+ edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;";
+ }
+ edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:");
+ edgeData.id = linkId;
+ edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd;
+ g.setEdge(edge.start, edge.end, edgeData, cnt);
+ }
+};
+const getClasses = function(text, diagObj) {
+ return diagObj.db.getClasses();
+};
+const draw = async function(text, id, _version, diagObj) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Drawing flowchart");
+ let dir = diagObj.db.getDirection();
+ if (dir === void 0) {
+ dir = "TD";
+ }
+ const { securityLevel, flowchart: conf2 } = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)();
+ const nodeSpacing = conf2.nodeSpacing || 50;
+ const rankSpacing = conf2.rankSpacing || 50;
+ let sandboxElement;
+ if (securityLevel === "sandbox") {
+ sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id);
+ }
+ const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("body");
+ const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
+ const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Graph */ .T({
+ multigraph: true,
+ compound: true
+ }).setGraph({
+ rankdir: dir,
+ nodesep: nodeSpacing,
+ ranksep: rankSpacing,
+ marginx: 0,
+ marginy: 0
+ }).setDefaultEdgeLabel(function() {
+ return {};
+ });
+ let subG;
+ const subGraphs = diagObj.db.getSubGraphs();
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Subgraphs - ", subGraphs);
+ for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) {
+ subG = subGraphs[i2];
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Subgraph - ", subG);
+ diagObj.db.addVertex(
+ subG.id,
+ { text: subG.title, type: subG.labelType },
+ "group",
+ void 0,
+ subG.classes,
+ subG.dir
+ );
+ }
+ const vert = diagObj.db.getVertices();
+ const edges = diagObj.db.getEdges();
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Edges", edges);
+ let i = 0;
+ for (i = subGraphs.length - 1; i >= 0; i--) {
+ subG = subGraphs[i];
+ (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .selectAll */ .Ubm)("cluster").append("text");
+ for (let j = 0; j < subG.nodes.length; j++) {
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Setting up subgraphs", subG.nodes[j], subG.id);
+ g.setParent(subG.nodes[j], subG.id);
+ }
+ }
+ await addVertices(vert, g, id, root, doc, diagObj);
+ await addEdges(edges, g);
+ const svg = root.select(`[id="${id}"]`);
+ const element = root.select("#" + id + " g");
+ await (0,_index_fc10efb0_js__WEBPACK_IMPORTED_MODULE_4__.r)(element, g, ["point", "circle", "cross"], "flowchart", id);
+ _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.u.insertTitle(svg, "flowchartTitleText", conf2.titleTopMargin, diagObj.db.getDiagramTitle());
+ (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.o)(g, svg, conf2.diagramPadding, conf2.useMaxWidth);
+ diagObj.db.indexNodes("subGraph" + i);
+ if (!conf2.htmlLabels) {
+ const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label');
+ for (const label of labels) {
+ const dim = label.getBBox();
+ const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect");
+ rect.setAttribute("rx", 0);
+ rect.setAttribute("ry", 0);
+ rect.setAttribute("width", dim.width);
+ rect.setAttribute("height", dim.height);
+ label.insertBefore(rect, label.firstChild);
+ }
+ }
+ const keys = Object.keys(vert);
+ keys.forEach(function(key) {
+ const vertex = vert[key];
+ if (vertex.link) {
+ const node = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#" + id + ' [id="' + key + '"]');
+ if (node) {
+ const link = doc.createElementNS("http://www.w3.org/2000/svg", "a");
+ link.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" "));
+ link.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link);
+ link.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener");
+ if (securityLevel === "sandbox") {
+ link.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top");
+ } else if (vertex.linkTarget) {
+ link.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget);
+ }
+ const linkNode = node.insert(function() {
+ return link;
+ }, ":first-child");
+ const shape = node.select(".label-container");
+ if (shape) {
+ linkNode.append(function() {
+ return shape.node();
+ });
+ }
+ const label = node.select(".label");
+ if (label) {
+ linkNode.append(function() {
+ return label.node();
+ });
+ }
+ }
+ }
+ });
+};
+const flowRendererV2 = {
+ setConf,
+ addVertices,
+ addEdges,
+ getClasses,
+ draw
+};
+const fade = (color, opacity) => {
+ const channel = khroma__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A;
+ const r = channel(color, "r");
+ const g = channel(color, "g");
+ const b = channel(color, "b");
+ return khroma__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A(r, g, b, opacity);
+};
+const getStyles = (options) => `.label {
+ font-family: ${options.fontFamily};
+ color: ${options.nodeTextColor || options.textColor};
+ }
+ .cluster-label text {
+ fill: ${options.titleColor};
+ }
+ .cluster-label span,p {
+ color: ${options.titleColor};
+ }
+
+ .label text,span,p {
+ fill: ${options.nodeTextColor || options.textColor};
+ color: ${options.nodeTextColor || options.textColor};
+ }
+
+ .node rect,
+ .node circle,
+ .node ellipse,
+ .node polygon,
+ .node path {
+ fill: ${options.mainBkg};
+ stroke: ${options.nodeBorder};
+ stroke-width: 1px;
+ }
+ .flowchart-label text {
+ text-anchor: middle;
+ }
+ // .flowchart-label .text-outer-tspan {
+ // text-anchor: middle;
+ // }
+ // .flowchart-label .text-inner-tspan {
+ // text-anchor: start;
+ // }
+
+ .node .katex path {
+ fill: #000;
+ stroke: #000;
+ stroke-width: 1px;
+ }
+
+ .node .label {
+ text-align: center;
+ }
+ .node.clickable {
+ cursor: pointer;
+ }
+
+ .arrowheadPath {
+ fill: ${options.arrowheadColor};
+ }
+
+ .edgePath .path {
+ stroke: ${options.lineColor};
+ stroke-width: 2.0px;
+ }
+
+ .flowchart-link {
+ stroke: ${options.lineColor};
+ fill: none;
+ }
+
+ .edgeLabel {
+ background-color: ${options.edgeLabelBackground};
+ rect {
+ opacity: 0.5;
+ background-color: ${options.edgeLabelBackground};
+ fill: ${options.edgeLabelBackground};
+ }
+ text-align: center;
+ }
+
+ /* For html labels only */
+ .labelBkg {
+ background-color: ${fade(options.edgeLabelBackground, 0.5)};
+ // background-color:
+ }
+
+ .cluster rect {
+ fill: ${options.clusterBkg};
+ stroke: ${options.clusterBorder};
+ stroke-width: 1px;
+ }
+
+ .cluster text {
+ fill: ${options.titleColor};
+ }
+
+ .cluster span,p {
+ color: ${options.titleColor};
+ }
+ /* .cluster div {
+ color: ${options.titleColor};
+ } */
+
+ div.mermaidTooltip {
+ position: absolute;
+ text-align: center;
+ max-width: 200px;
+ padding: 2px;
+ font-family: ${options.fontFamily};
+ font-size: 12px;
+ background: ${options.tertiaryColor};
+ border: 1px solid ${options.border2};
+ border-radius: 2px;
+ pointer-events: none;
+ z-index: 100;
+ }
+
+ .flowchartTitleText {
+ text-anchor: middle;
+ font-size: 18px;
+ fill: ${options.textColor};
+ }
+`;
+const flowStyles = getStyles;
+
+
+
+/***/ })
+
+};
+;
\ No newline at end of file
diff --git a/assets/js/130.97c3c1fe.js b/assets/js/130.97c3c1fe.js
new file mode 100644
index 00000000..068e62dc
--- /dev/null
+++ b/assets/js/130.97c3c1fe.js
@@ -0,0 +1,18475 @@
+"use strict";
+exports.id = 130;
+exports.ids = [130];
+exports.modules = {
+
+/***/ 2130:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ katex)
+/* harmony export */ });
+/**
+ * Lexing or parsing positional information for error reporting.
+ * This object is immutable.
+ */
+class SourceLocation {
+ // The + prefix indicates that these fields aren't writeable
+ // Lexer holding the input string.
+ // Start offset, zero-based inclusive.
+ // End offset, zero-based exclusive.
+ constructor(lexer, start, end) {
+ this.lexer = void 0;
+ this.start = void 0;
+ this.end = void 0;
+ this.lexer = lexer;
+ this.start = start;
+ this.end = end;
+ }
+ /**
+ * Merges two `SourceLocation`s from location providers, given they are
+ * provided in order of appearance.
+ * - Returns the first one's location if only the first is provided.
+ * - Returns a merged range of the first and the last if both are provided
+ * and their lexers match.
+ * - Otherwise, returns null.
+ */
+
+
+ static range(first, second) {
+ if (!second) {
+ return first && first.loc;
+ } else if (!first || !first.loc || !second.loc || first.loc.lexer !== second.loc.lexer) {
+ return null;
+ } else {
+ return new SourceLocation(first.loc.lexer, first.loc.start, second.loc.end);
+ }
+ }
+
+}
+
+/**
+ * Interface required to break circular dependency between Token, Lexer, and
+ * ParseError.
+ */
+
+/**
+ * The resulting token returned from `lex`.
+ *
+ * It consists of the token text plus some position information.
+ * The position information is essentially a range in an input string,
+ * but instead of referencing the bare input string, we refer to the lexer.
+ * That way it is possible to attach extra metadata to the input string,
+ * like for example a file name or similar.
+ *
+ * The position information is optional, so it is OK to construct synthetic
+ * tokens if appropriate. Not providing available position information may
+ * lead to degraded error reporting, though.
+ */
+class Token {
+ // don't expand the token
+ // used in \noexpand
+ constructor(text, // the text of this token
+ loc) {
+ this.text = void 0;
+ this.loc = void 0;
+ this.noexpand = void 0;
+ this.treatAsRelax = void 0;
+ this.text = text;
+ this.loc = loc;
+ }
+ /**
+ * Given a pair of tokens (this and endToken), compute a `Token` encompassing
+ * the whole input range enclosed by these two.
+ */
+
+
+ range(endToken, // last token of the range, inclusive
+ text // the text of the newly constructed token
+ ) {
+ return new Token(text, SourceLocation.range(this, endToken));
+ }
+
+}
+
+/**
+ * This is the ParseError class, which is the main error thrown by KaTeX
+ * functions when something has gone wrong. This is used to distinguish internal
+ * errors from errors in the expression that the user provided.
+ *
+ * If possible, a caller should provide a Token or ParseNode with information
+ * about where in the source string the problem occurred.
+ */
+class ParseError {
+ // Error start position based on passed-in Token or ParseNode.
+ // Length of affected text based on passed-in Token or ParseNode.
+ // The underlying error message without any context added.
+ constructor(message, // The error message
+ token // An object providing position information
+ ) {
+ this.name = void 0;
+ this.position = void 0;
+ this.length = void 0;
+ this.rawMessage = void 0;
+ var error = "KaTeX parse error: " + message;
+ var start;
+ var end;
+ var loc = token && token.loc;
+
+ if (loc && loc.start <= loc.end) {
+ // If we have the input and a position, make the error a bit fancier
+ // Get the input
+ var input = loc.lexer.input; // Prepend some information
+
+ start = loc.start;
+ end = loc.end;
+
+ if (start === input.length) {
+ error += " at end of input: ";
+ } else {
+ error += " at position " + (start + 1) + ": ";
+ } // Underline token in question using combining underscores
+
+
+ var underlined = input.slice(start, end).replace(/[^]/g, "$&\u0332"); // Extract some context from the input and add it to the error
+
+ var left;
+
+ if (start > 15) {
+ left = "…" + input.slice(start - 15, start);
+ } else {
+ left = input.slice(0, start);
+ }
+
+ var right;
+
+ if (end + 15 < input.length) {
+ right = input.slice(end, end + 15) + "…";
+ } else {
+ right = input.slice(end);
+ }
+
+ error += left + underlined + right;
+ } // Some hackery to make ParseError a prototype of Error
+ // See http://stackoverflow.com/a/8460753
+ // $FlowFixMe
+
+
+ var self = new Error(error);
+ self.name = "ParseError"; // $FlowFixMe
+
+ self.__proto__ = ParseError.prototype;
+ self.position = start;
+
+ if (start != null && end != null) {
+ self.length = end - start;
+ }
+
+ self.rawMessage = message;
+ return self;
+ }
+
+} // $FlowFixMe More hackery
+
+
+ParseError.prototype.__proto__ = Error.prototype;
+
+/**
+ * This file contains a list of utility functions which are useful in other
+ * files.
+ */
+
+/**
+ * Return whether an element is contained in a list
+ */
+var contains = function contains(list, elem) {
+ return list.indexOf(elem) !== -1;
+};
+/**
+ * Provide a default value if a setting is undefined
+ * NOTE: Couldn't use `T` as the output type due to facebook/flow#5022.
+ */
+
+
+var deflt = function deflt(setting, defaultIfUndefined) {
+ return setting === undefined ? defaultIfUndefined : setting;
+}; // hyphenate and escape adapted from Facebook's React under Apache 2 license
+
+
+var uppercase = /([A-Z])/g;
+
+var hyphenate = function hyphenate(str) {
+ return str.replace(uppercase, "-$1").toLowerCase();
+};
+
+var ESCAPE_LOOKUP = {
+ "&": "&",
+ ">": ">",
+ "<": "<",
+ "\"": """,
+ "'": "'"
+};
+var ESCAPE_REGEX = /[&><"']/g;
+/**
+ * Escapes text to prevent scripting attacks.
+ */
+
+function escape(text) {
+ return String(text).replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]);
+}
+/**
+ * Sometimes we want to pull out the innermost element of a group. In most
+ * cases, this will just be the group itself, but when ordgroups and colors have
+ * a single element, we want to pull that out.
+ */
+
+
+var getBaseElem = function getBaseElem(group) {
+ if (group.type === "ordgroup") {
+ if (group.body.length === 1) {
+ return getBaseElem(group.body[0]);
+ } else {
+ return group;
+ }
+ } else if (group.type === "color") {
+ if (group.body.length === 1) {
+ return getBaseElem(group.body[0]);
+ } else {
+ return group;
+ }
+ } else if (group.type === "font") {
+ return getBaseElem(group.body);
+ } else {
+ return group;
+ }
+};
+/**
+ * TeXbook algorithms often reference "character boxes", which are simply groups
+ * with a single character in them. To decide if something is a character box,
+ * we find its innermost group, and see if it is a single character.
+ */
+
+
+var isCharacterBox = function isCharacterBox(group) {
+ var baseElem = getBaseElem(group); // These are all they types of groups which hold single characters
+
+ return baseElem.type === "mathord" || baseElem.type === "textord" || baseElem.type === "atom";
+};
+
+var assert = function assert(value) {
+ if (!value) {
+ throw new Error('Expected non-null, but got ' + String(value));
+ }
+
+ return value;
+};
+/**
+ * Return the protocol of a URL, or "_relative" if the URL does not specify a
+ * protocol (and thus is relative), or `null` if URL has invalid protocol
+ * (so should be outright rejected).
+ */
+
+var protocolFromUrl = function protocolFromUrl(url) {
+ // Check for possible leading protocol.
+ // https://url.spec.whatwg.org/#url-parsing strips leading whitespace
+ // (U+20) or C0 control (U+00-U+1F) characters.
+ // eslint-disable-next-line no-control-regex
+ var protocol = /^[\x00-\x20]*([^\\/#?]*?)(:|*58|*3a|&colon)/i.exec(url);
+
+ if (!protocol) {
+ return "_relative";
+ } // Reject weird colons
+
+
+ if (protocol[2] !== ":") {
+ return null;
+ } // Reject invalid characters in scheme according to
+ // https://datatracker.ietf.org/doc/html/rfc3986#section-3.1
+
+
+ if (!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(protocol[1])) {
+ return null;
+ } // Lowercase the protocol
+
+
+ return protocol[1].toLowerCase();
+};
+var utils = {
+ contains,
+ deflt,
+ escape,
+ hyphenate,
+ getBaseElem,
+ isCharacterBox,
+ protocolFromUrl
+};
+
+/* eslint no-console:0 */
+// TODO: automatically generate documentation
+// TODO: check all properties on Settings exist
+// TODO: check the type of a property on Settings matches
+var SETTINGS_SCHEMA = {
+ displayMode: {
+ type: "boolean",
+ description: "Render math in display mode, which puts the math in " + "display style (so \\int and \\sum are large, for example), and " + "centers the math on the page on its own line.",
+ cli: "-d, --display-mode"
+ },
+ output: {
+ type: {
+ enum: ["htmlAndMathml", "html", "mathml"]
+ },
+ description: "Determines the markup language of the output.",
+ cli: "-F, --format "
+ },
+ leqno: {
+ type: "boolean",
+ description: "Render display math in leqno style (left-justified tags)."
+ },
+ fleqn: {
+ type: "boolean",
+ description: "Render display math flush left."
+ },
+ throwOnError: {
+ type: "boolean",
+ default: true,
+ cli: "-t, --no-throw-on-error",
+ cliDescription: "Render errors (in the color given by --error-color) ins" + "tead of throwing a ParseError exception when encountering an error."
+ },
+ errorColor: {
+ type: "string",
+ default: "#cc0000",
+ cli: "-c, --error-color ",
+ cliDescription: "A color string given in the format 'rgb' or 'rrggbb' " + "(no #). This option determines the color of errors rendered by the " + "-t option.",
+ cliProcessor: color => "#" + color
+ },
+ macros: {
+ type: "object",
+ cli: "-m, --macro ",
+ cliDescription: "Define custom macro of the form '\\foo:expansion' (use " + "multiple -m arguments for multiple macros).",
+ cliDefault: [],
+ cliProcessor: (def, defs) => {
+ defs.push(def);
+ return defs;
+ }
+ },
+ minRuleThickness: {
+ type: "number",
+ description: "Specifies a minimum thickness, in ems, for fraction lines," + " `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, " + "`\\hdashline`, `\\underline`, `\\overline`, and the borders of " + "`\\fbox`, `\\boxed`, and `\\fcolorbox`.",
+ processor: t => Math.max(0, t),
+ cli: "--min-rule-thickness ",
+ cliProcessor: parseFloat
+ },
+ colorIsTextColor: {
+ type: "boolean",
+ description: "Makes \\color behave like LaTeX's 2-argument \\textcolor, " + "instead of LaTeX's one-argument \\color mode change.",
+ cli: "-b, --color-is-text-color"
+ },
+ strict: {
+ type: [{
+ enum: ["warn", "ignore", "error"]
+ }, "boolean", "function"],
+ description: "Turn on strict / LaTeX faithfulness mode, which throws an " + "error if the input uses features that are not supported by LaTeX.",
+ cli: "-S, --strict",
+ cliDefault: false
+ },
+ trust: {
+ type: ["boolean", "function"],
+ description: "Trust the input, enabling all HTML features such as \\url.",
+ cli: "-T, --trust"
+ },
+ maxSize: {
+ type: "number",
+ default: Infinity,
+ description: "If non-zero, all user-specified sizes, e.g. in " + "\\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, " + "elements and spaces can be arbitrarily large",
+ processor: s => Math.max(0, s),
+ cli: "-s, --max-size ",
+ cliProcessor: parseInt
+ },
+ maxExpand: {
+ type: "number",
+ default: 1000,
+ description: "Limit the number of macro expansions to the specified " + "number, to prevent e.g. infinite macro loops. If set to Infinity, " + "the macro expander will try to fully expand as in LaTeX.",
+ processor: n => Math.max(0, n),
+ cli: "-e, --max-expand ",
+ cliProcessor: n => n === "Infinity" ? Infinity : parseInt(n)
+ },
+ globalGroup: {
+ type: "boolean",
+ cli: false
+ }
+};
+
+function getDefaultValue(schema) {
+ if (schema.default) {
+ return schema.default;
+ }
+
+ var type = schema.type;
+ var defaultType = Array.isArray(type) ? type[0] : type;
+
+ if (typeof defaultType !== 'string') {
+ return defaultType.enum[0];
+ }
+
+ switch (defaultType) {
+ case 'boolean':
+ return false;
+
+ case 'string':
+ return '';
+
+ case 'number':
+ return 0;
+
+ case 'object':
+ return {};
+ }
+}
+/**
+ * The main Settings object
+ *
+ * The current options stored are:
+ * - displayMode: Whether the expression should be typeset as inline math
+ * (false, the default), meaning that the math starts in
+ * \textstyle and is placed in an inline-block); or as display
+ * math (true), meaning that the math starts in \displaystyle
+ * and is placed in a block with vertical margin.
+ */
+
+
+class Settings {
+ constructor(options) {
+ this.displayMode = void 0;
+ this.output = void 0;
+ this.leqno = void 0;
+ this.fleqn = void 0;
+ this.throwOnError = void 0;
+ this.errorColor = void 0;
+ this.macros = void 0;
+ this.minRuleThickness = void 0;
+ this.colorIsTextColor = void 0;
+ this.strict = void 0;
+ this.trust = void 0;
+ this.maxSize = void 0;
+ this.maxExpand = void 0;
+ this.globalGroup = void 0;
+ // allow null options
+ options = options || {};
+
+ for (var prop in SETTINGS_SCHEMA) {
+ if (SETTINGS_SCHEMA.hasOwnProperty(prop)) {
+ // $FlowFixMe
+ var schema = SETTINGS_SCHEMA[prop]; // TODO: validate options
+ // $FlowFixMe
+
+ this[prop] = options[prop] !== undefined ? schema.processor ? schema.processor(options[prop]) : options[prop] : getDefaultValue(schema);
+ }
+ }
+ }
+ /**
+ * Report nonstrict (non-LaTeX-compatible) input.
+ * Can safely not be called if `this.strict` is false in JavaScript.
+ */
+
+
+ reportNonstrict(errorCode, errorMsg, token) {
+ var strict = this.strict;
+
+ if (typeof strict === "function") {
+ // Allow return value of strict function to be boolean or string
+ // (or null/undefined, meaning no further processing).
+ strict = strict(errorCode, errorMsg, token);
+ }
+
+ if (!strict || strict === "ignore") {
+ return;
+ } else if (strict === true || strict === "error") {
+ throw new ParseError("LaTeX-incompatible input and strict mode is set to 'error': " + (errorMsg + " [" + errorCode + "]"), token);
+ } else if (strict === "warn") {
+ typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (errorMsg + " [" + errorCode + "]"));
+ } else {
+ // won't happen in type-safe code
+ typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + strict + "': " + errorMsg + " [" + errorCode + "]"));
+ }
+ }
+ /**
+ * Check whether to apply strict (LaTeX-adhering) behavior for unusual
+ * input (like `\\`). Unlike `nonstrict`, will not throw an error;
+ * instead, "error" translates to a return value of `true`, while "ignore"
+ * translates to a return value of `false`. May still print a warning:
+ * "warn" prints a warning and returns `false`.
+ * This is for the second category of `errorCode`s listed in the README.
+ */
+
+
+ useStrictBehavior(errorCode, errorMsg, token) {
+ var strict = this.strict;
+
+ if (typeof strict === "function") {
+ // Allow return value of strict function to be boolean or string
+ // (or null/undefined, meaning no further processing).
+ // But catch any exceptions thrown by function, treating them
+ // like "error".
+ try {
+ strict = strict(errorCode, errorMsg, token);
+ } catch (error) {
+ strict = "error";
+ }
+ }
+
+ if (!strict || strict === "ignore") {
+ return false;
+ } else if (strict === true || strict === "error") {
+ return true;
+ } else if (strict === "warn") {
+ typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (errorMsg + " [" + errorCode + "]"));
+ return false;
+ } else {
+ // won't happen in type-safe code
+ typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + strict + "': " + errorMsg + " [" + errorCode + "]"));
+ return false;
+ }
+ }
+ /**
+ * Check whether to test potentially dangerous input, and return
+ * `true` (trusted) or `false` (untrusted). The sole argument `context`
+ * should be an object with `command` field specifying the relevant LaTeX
+ * command (as a string starting with `\`), and any other arguments, etc.
+ * If `context` has a `url` field, a `protocol` field will automatically
+ * get added by this function (changing the specified object).
+ */
+
+
+ isTrusted(context) {
+ if (context.url && !context.protocol) {
+ var protocol = utils.protocolFromUrl(context.url);
+
+ if (protocol == null) {
+ return false;
+ }
+
+ context.protocol = protocol;
+ }
+
+ var trust = typeof this.trust === "function" ? this.trust(context) : this.trust;
+ return Boolean(trust);
+ }
+
+}
+
+/**
+ * This file contains information and classes for the various kinds of styles
+ * used in TeX. It provides a generic `Style` class, which holds information
+ * about a specific style. It then provides instances of all the different kinds
+ * of styles possible, and provides functions to move between them and get
+ * information about them.
+ */
+
+/**
+ * The main style class. Contains a unique id for the style, a size (which is
+ * the same for cramped and uncramped version of a style), and a cramped flag.
+ */
+class Style {
+ constructor(id, size, cramped) {
+ this.id = void 0;
+ this.size = void 0;
+ this.cramped = void 0;
+ this.id = id;
+ this.size = size;
+ this.cramped = cramped;
+ }
+ /**
+ * Get the style of a superscript given a base in the current style.
+ */
+
+
+ sup() {
+ return styles[sup[this.id]];
+ }
+ /**
+ * Get the style of a subscript given a base in the current style.
+ */
+
+
+ sub() {
+ return styles[sub[this.id]];
+ }
+ /**
+ * Get the style of a fraction numerator given the fraction in the current
+ * style.
+ */
+
+
+ fracNum() {
+ return styles[fracNum[this.id]];
+ }
+ /**
+ * Get the style of a fraction denominator given the fraction in the current
+ * style.
+ */
+
+
+ fracDen() {
+ return styles[fracDen[this.id]];
+ }
+ /**
+ * Get the cramped version of a style (in particular, cramping a cramped style
+ * doesn't change the style).
+ */
+
+
+ cramp() {
+ return styles[cramp[this.id]];
+ }
+ /**
+ * Get a text or display version of this style.
+ */
+
+
+ text() {
+ return styles[text$1[this.id]];
+ }
+ /**
+ * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle)
+ */
+
+
+ isTight() {
+ return this.size >= 2;
+ }
+
+} // Export an interface for type checking, but don't expose the implementation.
+// This way, no more styles can be generated.
+
+
+// IDs of the different styles
+var D = 0;
+var Dc = 1;
+var T = 2;
+var Tc = 3;
+var S = 4;
+var Sc = 5;
+var SS = 6;
+var SSc = 7; // Instances of the different styles
+
+var styles = [new Style(D, 0, false), new Style(Dc, 0, true), new Style(T, 1, false), new Style(Tc, 1, true), new Style(S, 2, false), new Style(Sc, 2, true), new Style(SS, 3, false), new Style(SSc, 3, true)]; // Lookup tables for switching from one style to another
+
+var sup = [S, Sc, S, Sc, SS, SSc, SS, SSc];
+var sub = [Sc, Sc, Sc, Sc, SSc, SSc, SSc, SSc];
+var fracNum = [T, Tc, S, Sc, SS, SSc, SS, SSc];
+var fracDen = [Tc, Tc, Sc, Sc, SSc, SSc, SSc, SSc];
+var cramp = [Dc, Dc, Tc, Tc, Sc, Sc, SSc, SSc];
+var text$1 = [D, Dc, T, Tc, T, Tc, T, Tc]; // We only export some of the styles.
+
+var Style$1 = {
+ DISPLAY: styles[D],
+ TEXT: styles[T],
+ SCRIPT: styles[S],
+ SCRIPTSCRIPT: styles[SS]
+};
+
+/*
+ * This file defines the Unicode scripts and script families that we
+ * support. To add new scripts or families, just add a new entry to the
+ * scriptData array below. Adding scripts to the scriptData array allows
+ * characters from that script to appear in \text{} environments.
+ */
+
+/**
+ * Each script or script family has a name and an array of blocks.
+ * Each block is an array of two numbers which specify the start and
+ * end points (inclusive) of a block of Unicode codepoints.
+ */
+
+/**
+ * Unicode block data for the families of scripts we support in \text{}.
+ * Scripts only need to appear here if they do not have font metrics.
+ */
+var scriptData = [{
+ // Latin characters beyond the Latin-1 characters we have metrics for.
+ // Needed for Czech, Hungarian and Turkish text, for example.
+ name: 'latin',
+ blocks: [[0x0100, 0x024f], // Latin Extended-A and Latin Extended-B
+ [0x0300, 0x036f] // Combining Diacritical marks
+ ]
+}, {
+ // The Cyrillic script used by Russian and related languages.
+ // A Cyrillic subset used to be supported as explicitly defined
+ // symbols in symbols.js
+ name: 'cyrillic',
+ blocks: [[0x0400, 0x04ff]]
+}, {
+ // Armenian
+ name: 'armenian',
+ blocks: [[0x0530, 0x058F]]
+}, {
+ // The Brahmic scripts of South and Southeast Asia
+ // Devanagari (0900–097F)
+ // Bengali (0980–09FF)
+ // Gurmukhi (0A00–0A7F)
+ // Gujarati (0A80–0AFF)
+ // Oriya (0B00–0B7F)
+ // Tamil (0B80–0BFF)
+ // Telugu (0C00–0C7F)
+ // Kannada (0C80–0CFF)
+ // Malayalam (0D00–0D7F)
+ // Sinhala (0D80–0DFF)
+ // Thai (0E00–0E7F)
+ // Lao (0E80–0EFF)
+ // Tibetan (0F00–0FFF)
+ // Myanmar (1000–109F)
+ name: 'brahmic',
+ blocks: [[0x0900, 0x109F]]
+}, {
+ name: 'georgian',
+ blocks: [[0x10A0, 0x10ff]]
+}, {
+ // Chinese and Japanese.
+ // The "k" in cjk is for Korean, but we've separated Korean out
+ name: "cjk",
+ blocks: [[0x3000, 0x30FF], // CJK symbols and punctuation, Hiragana, Katakana
+ [0x4E00, 0x9FAF], // CJK ideograms
+ [0xFF00, 0xFF60] // Fullwidth punctuation
+ // TODO: add halfwidth Katakana and Romanji glyphs
+ ]
+}, {
+ // Korean
+ name: 'hangul',
+ blocks: [[0xAC00, 0xD7AF]]
+}];
+/**
+ * Given a codepoint, return the name of the script or script family
+ * it is from, or null if it is not part of a known block
+ */
+
+function scriptFromCodepoint(codepoint) {
+ for (var i = 0; i < scriptData.length; i++) {
+ var script = scriptData[i];
+
+ for (var _i = 0; _i < script.blocks.length; _i++) {
+ var block = script.blocks[_i];
+
+ if (codepoint >= block[0] && codepoint <= block[1]) {
+ return script.name;
+ }
+ }
+ }
+
+ return null;
+}
+/**
+ * A flattened version of all the supported blocks in a single array.
+ * This is an optimization to make supportedCodepoint() fast.
+ */
+
+var allBlocks = [];
+scriptData.forEach(s => s.blocks.forEach(b => allBlocks.push(...b)));
+/**
+ * Given a codepoint, return true if it falls within one of the
+ * scripts or script families defined above and false otherwise.
+ *
+ * Micro benchmarks shows that this is faster than
+ * /[\u3000-\u30FF\u4E00-\u9FAF\uFF00-\uFF60\uAC00-\uD7AF\u0900-\u109F]/.test()
+ * in Firefox, Chrome and Node.
+ */
+
+function supportedCodepoint(codepoint) {
+ for (var i = 0; i < allBlocks.length; i += 2) {
+ if (codepoint >= allBlocks[i] && codepoint <= allBlocks[i + 1]) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/**
+ * This file provides support to domTree.js and delimiter.js.
+ * It's a storehouse of path geometry for SVG images.
+ */
+// In all paths below, the viewBox-to-em scale is 1000:1.
+var hLinePad = 80; // padding above a sqrt vinculum. Prevents image cropping.
+// The vinculum of a \sqrt can be made thicker by a KaTeX rendering option.
+// Think of variable extraVinculum as two detours in the SVG path.
+// The detour begins at the lower left of the area labeled extraVinculum below.
+// The detour proceeds one extraVinculum distance up and slightly to the right,
+// displacing the radiused corner between surd and vinculum. The radius is
+// traversed as usual, then the detour resumes. It goes right, to the end of
+// the very long vinculum, then down one extraVinculum distance,
+// after which it resumes regular path geometry for the radical.
+
+/* vinculum
+ /
+ /▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒←extraVinculum
+ / █████████████████████←0.04em (40 unit) std vinculum thickness
+ / /
+ / /
+ / /\
+ / / surd
+*/
+
+var sqrtMain = function sqrtMain(extraVinculum, hLinePad) {
+ // sqrtMain path geometry is from glyph U221A in the font KaTeX Main
+ return "M95," + (622 + extraVinculum + hLinePad) + "\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl" + extraVinculum / 2.075 + " -" + extraVinculum + "\nc5.3,-9.3,12,-14,20,-14\nH400000v" + (40 + extraVinculum) + "H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM" + (834 + extraVinculum) + " " + hLinePad + "h400000v" + (40 + extraVinculum) + "h-400000z";
+};
+
+var sqrtSize1 = function sqrtSize1(extraVinculum, hLinePad) {
+ // size1 is from glyph U221A in the font KaTeX_Size1-Regular
+ return "M263," + (601 + extraVinculum + hLinePad) + "c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl" + extraVinculum / 2.084 + " -" + extraVinculum + "\nc4.7,-7.3,11,-11,19,-11\nH40000v" + (40 + extraVinculum) + "H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM" + (1001 + extraVinculum) + " " + hLinePad + "h400000v" + (40 + extraVinculum) + "h-400000z";
+};
+
+var sqrtSize2 = function sqrtSize2(extraVinculum, hLinePad) {
+ // size2 is from glyph U221A in the font KaTeX_Size2-Regular
+ return "M983 " + (10 + extraVinculum + hLinePad) + "\nl" + extraVinculum / 3.13 + " -" + extraVinculum + "\nc4,-6.7,10,-10,18,-10 H400000v" + (40 + extraVinculum) + "\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM" + (1001 + extraVinculum) + " " + hLinePad + "h400000v" + (40 + extraVinculum) + "h-400000z";
+};
+
+var sqrtSize3 = function sqrtSize3(extraVinculum, hLinePad) {
+ // size3 is from glyph U221A in the font KaTeX_Size3-Regular
+ return "M424," + (2398 + extraVinculum + hLinePad) + "\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl" + extraVinculum / 4.223 + " -" + extraVinculum + "c4,-6.7,10,-10,18,-10 H400000\nv" + (40 + extraVinculum) + "H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M" + (1001 + extraVinculum) + " " + hLinePad + "\nh400000v" + (40 + extraVinculum) + "h-400000z";
+};
+
+var sqrtSize4 = function sqrtSize4(extraVinculum, hLinePad) {
+ // size4 is from glyph U221A in the font KaTeX_Size4-Regular
+ return "M473," + (2713 + extraVinculum + hLinePad) + "\nc339.3,-1799.3,509.3,-2700,510,-2702 l" + extraVinculum / 5.298 + " -" + extraVinculum + "\nc3.3,-7.3,9.3,-11,18,-11 H400000v" + (40 + extraVinculum) + "H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM" + (1001 + extraVinculum) + " " + hLinePad + "h400000v" + (40 + extraVinculum) + "H1017.7z";
+};
+
+var phasePath = function phasePath(y) {
+ var x = y / 2; // x coordinate at top of angle
+
+ return "M400000 " + y + " H0 L" + x + " 0 l65 45 L145 " + (y - 80) + " H400000z";
+};
+
+var sqrtTall = function sqrtTall(extraVinculum, hLinePad, viewBoxHeight) {
+ // sqrtTall is from glyph U23B7 in the font KaTeX_Size4-Regular
+ // One path edge has a variable length. It runs vertically from the vinculum
+ // to a point near (14 units) the bottom of the surd. The vinculum
+ // is normally 40 units thick. So the length of the line in question is:
+ var vertSegment = viewBoxHeight - 54 - hLinePad - extraVinculum;
+ return "M702 " + (extraVinculum + hLinePad) + "H400000" + (40 + extraVinculum) + "\nH742v" + vertSegment + "l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 " + hLinePad + "H400000v" + (40 + extraVinculum) + "H742z";
+};
+
+var sqrtPath = function sqrtPath(size, extraVinculum, viewBoxHeight) {
+ extraVinculum = 1000 * extraVinculum; // Convert from document ems to viewBox.
+
+ var path = "";
+
+ switch (size) {
+ case "sqrtMain":
+ path = sqrtMain(extraVinculum, hLinePad);
+ break;
+
+ case "sqrtSize1":
+ path = sqrtSize1(extraVinculum, hLinePad);
+ break;
+
+ case "sqrtSize2":
+ path = sqrtSize2(extraVinculum, hLinePad);
+ break;
+
+ case "sqrtSize3":
+ path = sqrtSize3(extraVinculum, hLinePad);
+ break;
+
+ case "sqrtSize4":
+ path = sqrtSize4(extraVinculum, hLinePad);
+ break;
+
+ case "sqrtTall":
+ path = sqrtTall(extraVinculum, hLinePad, viewBoxHeight);
+ }
+
+ return path;
+};
+var innerPath = function innerPath(name, height) {
+ // The inner part of stretchy tall delimiters
+ switch (name) {
+ case "\u239c":
+ return "M291 0 H417 V" + height + " H291z M291 0 H417 V" + height + " H291z";
+
+ case "\u2223":
+ return "M145 0 H188 V" + height + " H145z M145 0 H188 V" + height + " H145z";
+
+ case "\u2225":
+ return "M145 0 H188 V" + height + " H145z M145 0 H188 V" + height + " H145z" + ("M367 0 H410 V" + height + " H367z M367 0 H410 V" + height + " H367z");
+
+ case "\u239f":
+ return "M457 0 H583 V" + height + " H457z M457 0 H583 V" + height + " H457z";
+
+ case "\u23a2":
+ return "M319 0 H403 V" + height + " H319z M319 0 H403 V" + height + " H319z";
+
+ case "\u23a5":
+ return "M263 0 H347 V" + height + " H263z M263 0 H347 V" + height + " H263z";
+
+ case "\u23aa":
+ return "M384 0 H504 V" + height + " H384z M384 0 H504 V" + height + " H384z";
+
+ case "\u23d0":
+ return "M312 0 H355 V" + height + " H312z M312 0 H355 V" + height + " H312z";
+
+ case "\u2016":
+ return "M257 0 H300 V" + height + " H257z M257 0 H300 V" + height + " H257z" + ("M478 0 H521 V" + height + " H478z M478 0 H521 V" + height + " H478z");
+
+ default:
+ return "";
+ }
+};
+var path = {
+ // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main
+ doubleleftarrow: "M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",
+ // doublerightarrow is from glyph U+21D2 in font KaTeX Main
+ doublerightarrow: "M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",
+ // leftarrow is from glyph U+2190 in font KaTeX Main
+ leftarrow: "M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",
+ // overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular
+ leftbrace: "M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",
+ leftbraceunder: "M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",
+ // overgroup is from the MnSymbol package (public domain)
+ leftgroup: "M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",
+ leftgroupunder: "M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",
+ // Harpoons are from glyph U+21BD in font KaTeX Main
+ leftharpoon: "M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",
+ leftharpoonplus: "M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",
+ leftharpoondown: "M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",
+ leftharpoondownplus: "M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",
+ // hook is from glyph U+21A9 in font KaTeX Main
+ lefthook: "M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",
+ leftlinesegment: "M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",
+ leftmapsto: "M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",
+ // tofrom is from glyph U+21C4 in font KaTeX AMS Regular
+ leftToFrom: "M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",
+ longequal: "M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",
+ midbrace: "M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",
+ midbraceunder: "M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",
+ oiintSize1: "M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",
+ oiintSize2: "M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",
+ oiiintSize1: "M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",
+ oiiintSize2: "M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",
+ rightarrow: "M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",
+ rightbrace: "M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",
+ rightbraceunder: "M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",
+ rightgroup: "M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",
+ rightgroupunder: "M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",
+ rightharpoon: "M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",
+ rightharpoonplus: "M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",
+ rightharpoondown: "M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",
+ rightharpoondownplus: "M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",
+ righthook: "M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",
+ rightlinesegment: "M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",
+ rightToFrom: "M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",
+ // twoheadleftarrow is from glyph U+219E in font KaTeX AMS Regular
+ twoheadleftarrow: "M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",
+ twoheadrightarrow: "M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",
+ // tilde1 is a modified version of a glyph from the MnSymbol package
+ tilde1: "M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",
+ // ditto tilde2, tilde3, & tilde4
+ tilde2: "M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",
+ tilde3: "M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",
+ tilde4: "M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",
+ // vec is from glyph U+20D7 in font KaTeX Main
+ vec: "M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",
+ // widehat1 is a modified version of a glyph from the MnSymbol package
+ widehat1: "M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",
+ // ditto widehat2, widehat3, & widehat4
+ widehat2: "M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",
+ widehat3: "M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",
+ widehat4: "M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",
+ // widecheck paths are all inverted versions of widehat
+ widecheck1: "M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",
+ widecheck2: "M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",
+ widecheck3: "M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",
+ widecheck4: "M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",
+ // The next ten paths support reaction arrows from the mhchem package.
+ // Arrows for \ce{<-->} are offset from xAxis by 0.22ex, per mhchem in LaTeX
+ // baraboveleftarrow is mostly from glyph U+2190 in font KaTeX Main
+ baraboveleftarrow: "M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",
+ // rightarrowabovebar is mostly from glyph U+2192, KaTeX Main
+ rightarrowabovebar: "M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",
+ // The short left harpoon has 0.5em (i.e. 500 units) kern on the left end.
+ // Ref from mhchem.sty: \rlap{\raisebox{-.22ex}{$\kern0.5em
+ baraboveshortleftharpoon: "M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",
+ rightharpoonaboveshortbar: "M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",
+ shortbaraboveleftharpoon: "M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",
+ shortrightharpoonabovebar: "M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"
+};
+var tallDelim = function tallDelim(label, midHeight) {
+ switch (label) {
+ case "lbrack":
+ return "M403 1759 V84 H666 V0 H319 V1759 v" + midHeight + " v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v" + midHeight + " v1759 h84z";
+
+ case "rbrack":
+ return "M347 1759 V0 H0 V84 H263 V1759 v" + midHeight + " v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v" + midHeight + " v1759 h84z";
+
+ case "vert":
+ return "M145 15 v585 v" + midHeight + " v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v" + -midHeight + " v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v" + midHeight + " v585 h43z";
+
+ case "doublevert":
+ return "M145 15 v585 v" + midHeight + " v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v" + -midHeight + " v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v" + midHeight + " v585 h43z\nM367 15 v585 v" + midHeight + " v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v" + -midHeight + " v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v" + midHeight + " v585 h43z";
+
+ case "lfloor":
+ return "M319 602 V0 H403 V602 v" + midHeight + " v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v" + midHeight + " v1715 H319z";
+
+ case "rfloor":
+ return "M319 602 V0 H403 V602 v" + midHeight + " v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v" + midHeight + " v1715 H319z";
+
+ case "lceil":
+ return "M403 1759 V84 H666 V0 H319 V1759 v" + midHeight + " v602 h84z\nM403 1759 V0 H319 V1759 v" + midHeight + " v602 h84z";
+
+ case "rceil":
+ return "M347 1759 V0 H0 V84 H263 V1759 v" + midHeight + " v602 h84z\nM347 1759 V0 h-84 V1759 v" + midHeight + " v602 h84z";
+
+ case "lparen":
+ return "M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0," + (midHeight + 84) + "c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-" + (midHeight + 92) + "c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";
+
+ case "rparen":
+ return "M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0," + (midHeight + 9) + "\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-" + (midHeight + 144) + "c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";
+
+ default:
+ // We should not ever get here.
+ throw new Error("Unknown stretchy delimiter.");
+ }
+};
+
+/**
+ * This node represents a document fragment, which contains elements, but when
+ * placed into the DOM doesn't have any representation itself. It only contains
+ * children and doesn't have any DOM node properties.
+ */
+class DocumentFragment {
+ // HtmlDomNode
+ // Never used; needed for satisfying interface.
+ constructor(children) {
+ this.children = void 0;
+ this.classes = void 0;
+ this.height = void 0;
+ this.depth = void 0;
+ this.maxFontSize = void 0;
+ this.style = void 0;
+ this.children = children;
+ this.classes = [];
+ this.height = 0;
+ this.depth = 0;
+ this.maxFontSize = 0;
+ this.style = {};
+ }
+
+ hasClass(className) {
+ return utils.contains(this.classes, className);
+ }
+ /** Convert the fragment into a node. */
+
+
+ toNode() {
+ var frag = document.createDocumentFragment();
+
+ for (var i = 0; i < this.children.length; i++) {
+ frag.appendChild(this.children[i].toNode());
+ }
+
+ return frag;
+ }
+ /** Convert the fragment into HTML markup. */
+
+
+ toMarkup() {
+ var markup = ""; // Simply concatenate the markup for the children together.
+
+ for (var i = 0; i < this.children.length; i++) {
+ markup += this.children[i].toMarkup();
+ }
+
+ return markup;
+ }
+ /**
+ * Converts the math node into a string, similar to innerText. Applies to
+ * MathDomNode's only.
+ */
+
+
+ toText() {
+ // To avoid this, we would subclass documentFragment separately for
+ // MathML, but polyfills for subclassing is expensive per PR 1469.
+ // $FlowFixMe: Only works for ChildType = MathDomNode.
+ var toText = child => child.toText();
+
+ return this.children.map(toText).join("");
+ }
+
+}
+
+// This file is GENERATED by buildMetrics.sh. DO NOT MODIFY.
+var fontMetricsData = {
+ "AMS-Regular": {
+ "32": [0, 0, 0, 0, 0.25],
+ "65": [0, 0.68889, 0, 0, 0.72222],
+ "66": [0, 0.68889, 0, 0, 0.66667],
+ "67": [0, 0.68889, 0, 0, 0.72222],
+ "68": [0, 0.68889, 0, 0, 0.72222],
+ "69": [0, 0.68889, 0, 0, 0.66667],
+ "70": [0, 0.68889, 0, 0, 0.61111],
+ "71": [0, 0.68889, 0, 0, 0.77778],
+ "72": [0, 0.68889, 0, 0, 0.77778],
+ "73": [0, 0.68889, 0, 0, 0.38889],
+ "74": [0.16667, 0.68889, 0, 0, 0.5],
+ "75": [0, 0.68889, 0, 0, 0.77778],
+ "76": [0, 0.68889, 0, 0, 0.66667],
+ "77": [0, 0.68889, 0, 0, 0.94445],
+ "78": [0, 0.68889, 0, 0, 0.72222],
+ "79": [0.16667, 0.68889, 0, 0, 0.77778],
+ "80": [0, 0.68889, 0, 0, 0.61111],
+ "81": [0.16667, 0.68889, 0, 0, 0.77778],
+ "82": [0, 0.68889, 0, 0, 0.72222],
+ "83": [0, 0.68889, 0, 0, 0.55556],
+ "84": [0, 0.68889, 0, 0, 0.66667],
+ "85": [0, 0.68889, 0, 0, 0.72222],
+ "86": [0, 0.68889, 0, 0, 0.72222],
+ "87": [0, 0.68889, 0, 0, 1.0],
+ "88": [0, 0.68889, 0, 0, 0.72222],
+ "89": [0, 0.68889, 0, 0, 0.72222],
+ "90": [0, 0.68889, 0, 0, 0.66667],
+ "107": [0, 0.68889, 0, 0, 0.55556],
+ "160": [0, 0, 0, 0, 0.25],
+ "165": [0, 0.675, 0.025, 0, 0.75],
+ "174": [0.15559, 0.69224, 0, 0, 0.94666],
+ "240": [0, 0.68889, 0, 0, 0.55556],
+ "295": [0, 0.68889, 0, 0, 0.54028],
+ "710": [0, 0.825, 0, 0, 2.33334],
+ "732": [0, 0.9, 0, 0, 2.33334],
+ "770": [0, 0.825, 0, 0, 2.33334],
+ "771": [0, 0.9, 0, 0, 2.33334],
+ "989": [0.08167, 0.58167, 0, 0, 0.77778],
+ "1008": [0, 0.43056, 0.04028, 0, 0.66667],
+ "8245": [0, 0.54986, 0, 0, 0.275],
+ "8463": [0, 0.68889, 0, 0, 0.54028],
+ "8487": [0, 0.68889, 0, 0, 0.72222],
+ "8498": [0, 0.68889, 0, 0, 0.55556],
+ "8502": [0, 0.68889, 0, 0, 0.66667],
+ "8503": [0, 0.68889, 0, 0, 0.44445],
+ "8504": [0, 0.68889, 0, 0, 0.66667],
+ "8513": [0, 0.68889, 0, 0, 0.63889],
+ "8592": [-0.03598, 0.46402, 0, 0, 0.5],
+ "8594": [-0.03598, 0.46402, 0, 0, 0.5],
+ "8602": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8603": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8606": [0.01354, 0.52239, 0, 0, 1.0],
+ "8608": [0.01354, 0.52239, 0, 0, 1.0],
+ "8610": [0.01354, 0.52239, 0, 0, 1.11111],
+ "8611": [0.01354, 0.52239, 0, 0, 1.11111],
+ "8619": [0, 0.54986, 0, 0, 1.0],
+ "8620": [0, 0.54986, 0, 0, 1.0],
+ "8621": [-0.13313, 0.37788, 0, 0, 1.38889],
+ "8622": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8624": [0, 0.69224, 0, 0, 0.5],
+ "8625": [0, 0.69224, 0, 0, 0.5],
+ "8630": [0, 0.43056, 0, 0, 1.0],
+ "8631": [0, 0.43056, 0, 0, 1.0],
+ "8634": [0.08198, 0.58198, 0, 0, 0.77778],
+ "8635": [0.08198, 0.58198, 0, 0, 0.77778],
+ "8638": [0.19444, 0.69224, 0, 0, 0.41667],
+ "8639": [0.19444, 0.69224, 0, 0, 0.41667],
+ "8642": [0.19444, 0.69224, 0, 0, 0.41667],
+ "8643": [0.19444, 0.69224, 0, 0, 0.41667],
+ "8644": [0.1808, 0.675, 0, 0, 1.0],
+ "8646": [0.1808, 0.675, 0, 0, 1.0],
+ "8647": [0.1808, 0.675, 0, 0, 1.0],
+ "8648": [0.19444, 0.69224, 0, 0, 0.83334],
+ "8649": [0.1808, 0.675, 0, 0, 1.0],
+ "8650": [0.19444, 0.69224, 0, 0, 0.83334],
+ "8651": [0.01354, 0.52239, 0, 0, 1.0],
+ "8652": [0.01354, 0.52239, 0, 0, 1.0],
+ "8653": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8654": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8655": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8666": [0.13667, 0.63667, 0, 0, 1.0],
+ "8667": [0.13667, 0.63667, 0, 0, 1.0],
+ "8669": [-0.13313, 0.37788, 0, 0, 1.0],
+ "8672": [-0.064, 0.437, 0, 0, 1.334],
+ "8674": [-0.064, 0.437, 0, 0, 1.334],
+ "8705": [0, 0.825, 0, 0, 0.5],
+ "8708": [0, 0.68889, 0, 0, 0.55556],
+ "8709": [0.08167, 0.58167, 0, 0, 0.77778],
+ "8717": [0, 0.43056, 0, 0, 0.42917],
+ "8722": [-0.03598, 0.46402, 0, 0, 0.5],
+ "8724": [0.08198, 0.69224, 0, 0, 0.77778],
+ "8726": [0.08167, 0.58167, 0, 0, 0.77778],
+ "8733": [0, 0.69224, 0, 0, 0.77778],
+ "8736": [0, 0.69224, 0, 0, 0.72222],
+ "8737": [0, 0.69224, 0, 0, 0.72222],
+ "8738": [0.03517, 0.52239, 0, 0, 0.72222],
+ "8739": [0.08167, 0.58167, 0, 0, 0.22222],
+ "8740": [0.25142, 0.74111, 0, 0, 0.27778],
+ "8741": [0.08167, 0.58167, 0, 0, 0.38889],
+ "8742": [0.25142, 0.74111, 0, 0, 0.5],
+ "8756": [0, 0.69224, 0, 0, 0.66667],
+ "8757": [0, 0.69224, 0, 0, 0.66667],
+ "8764": [-0.13313, 0.36687, 0, 0, 0.77778],
+ "8765": [-0.13313, 0.37788, 0, 0, 0.77778],
+ "8769": [-0.13313, 0.36687, 0, 0, 0.77778],
+ "8770": [-0.03625, 0.46375, 0, 0, 0.77778],
+ "8774": [0.30274, 0.79383, 0, 0, 0.77778],
+ "8776": [-0.01688, 0.48312, 0, 0, 0.77778],
+ "8778": [0.08167, 0.58167, 0, 0, 0.77778],
+ "8782": [0.06062, 0.54986, 0, 0, 0.77778],
+ "8783": [0.06062, 0.54986, 0, 0, 0.77778],
+ "8785": [0.08198, 0.58198, 0, 0, 0.77778],
+ "8786": [0.08198, 0.58198, 0, 0, 0.77778],
+ "8787": [0.08198, 0.58198, 0, 0, 0.77778],
+ "8790": [0, 0.69224, 0, 0, 0.77778],
+ "8791": [0.22958, 0.72958, 0, 0, 0.77778],
+ "8796": [0.08198, 0.91667, 0, 0, 0.77778],
+ "8806": [0.25583, 0.75583, 0, 0, 0.77778],
+ "8807": [0.25583, 0.75583, 0, 0, 0.77778],
+ "8808": [0.25142, 0.75726, 0, 0, 0.77778],
+ "8809": [0.25142, 0.75726, 0, 0, 0.77778],
+ "8812": [0.25583, 0.75583, 0, 0, 0.5],
+ "8814": [0.20576, 0.70576, 0, 0, 0.77778],
+ "8815": [0.20576, 0.70576, 0, 0, 0.77778],
+ "8816": [0.30274, 0.79383, 0, 0, 0.77778],
+ "8817": [0.30274, 0.79383, 0, 0, 0.77778],
+ "8818": [0.22958, 0.72958, 0, 0, 0.77778],
+ "8819": [0.22958, 0.72958, 0, 0, 0.77778],
+ "8822": [0.1808, 0.675, 0, 0, 0.77778],
+ "8823": [0.1808, 0.675, 0, 0, 0.77778],
+ "8828": [0.13667, 0.63667, 0, 0, 0.77778],
+ "8829": [0.13667, 0.63667, 0, 0, 0.77778],
+ "8830": [0.22958, 0.72958, 0, 0, 0.77778],
+ "8831": [0.22958, 0.72958, 0, 0, 0.77778],
+ "8832": [0.20576, 0.70576, 0, 0, 0.77778],
+ "8833": [0.20576, 0.70576, 0, 0, 0.77778],
+ "8840": [0.30274, 0.79383, 0, 0, 0.77778],
+ "8841": [0.30274, 0.79383, 0, 0, 0.77778],
+ "8842": [0.13597, 0.63597, 0, 0, 0.77778],
+ "8843": [0.13597, 0.63597, 0, 0, 0.77778],
+ "8847": [0.03517, 0.54986, 0, 0, 0.77778],
+ "8848": [0.03517, 0.54986, 0, 0, 0.77778],
+ "8858": [0.08198, 0.58198, 0, 0, 0.77778],
+ "8859": [0.08198, 0.58198, 0, 0, 0.77778],
+ "8861": [0.08198, 0.58198, 0, 0, 0.77778],
+ "8862": [0, 0.675, 0, 0, 0.77778],
+ "8863": [0, 0.675, 0, 0, 0.77778],
+ "8864": [0, 0.675, 0, 0, 0.77778],
+ "8865": [0, 0.675, 0, 0, 0.77778],
+ "8872": [0, 0.69224, 0, 0, 0.61111],
+ "8873": [0, 0.69224, 0, 0, 0.72222],
+ "8874": [0, 0.69224, 0, 0, 0.88889],
+ "8876": [0, 0.68889, 0, 0, 0.61111],
+ "8877": [0, 0.68889, 0, 0, 0.61111],
+ "8878": [0, 0.68889, 0, 0, 0.72222],
+ "8879": [0, 0.68889, 0, 0, 0.72222],
+ "8882": [0.03517, 0.54986, 0, 0, 0.77778],
+ "8883": [0.03517, 0.54986, 0, 0, 0.77778],
+ "8884": [0.13667, 0.63667, 0, 0, 0.77778],
+ "8885": [0.13667, 0.63667, 0, 0, 0.77778],
+ "8888": [0, 0.54986, 0, 0, 1.11111],
+ "8890": [0.19444, 0.43056, 0, 0, 0.55556],
+ "8891": [0.19444, 0.69224, 0, 0, 0.61111],
+ "8892": [0.19444, 0.69224, 0, 0, 0.61111],
+ "8901": [0, 0.54986, 0, 0, 0.27778],
+ "8903": [0.08167, 0.58167, 0, 0, 0.77778],
+ "8905": [0.08167, 0.58167, 0, 0, 0.77778],
+ "8906": [0.08167, 0.58167, 0, 0, 0.77778],
+ "8907": [0, 0.69224, 0, 0, 0.77778],
+ "8908": [0, 0.69224, 0, 0, 0.77778],
+ "8909": [-0.03598, 0.46402, 0, 0, 0.77778],
+ "8910": [0, 0.54986, 0, 0, 0.76042],
+ "8911": [0, 0.54986, 0, 0, 0.76042],
+ "8912": [0.03517, 0.54986, 0, 0, 0.77778],
+ "8913": [0.03517, 0.54986, 0, 0, 0.77778],
+ "8914": [0, 0.54986, 0, 0, 0.66667],
+ "8915": [0, 0.54986, 0, 0, 0.66667],
+ "8916": [0, 0.69224, 0, 0, 0.66667],
+ "8918": [0.0391, 0.5391, 0, 0, 0.77778],
+ "8919": [0.0391, 0.5391, 0, 0, 0.77778],
+ "8920": [0.03517, 0.54986, 0, 0, 1.33334],
+ "8921": [0.03517, 0.54986, 0, 0, 1.33334],
+ "8922": [0.38569, 0.88569, 0, 0, 0.77778],
+ "8923": [0.38569, 0.88569, 0, 0, 0.77778],
+ "8926": [0.13667, 0.63667, 0, 0, 0.77778],
+ "8927": [0.13667, 0.63667, 0, 0, 0.77778],
+ "8928": [0.30274, 0.79383, 0, 0, 0.77778],
+ "8929": [0.30274, 0.79383, 0, 0, 0.77778],
+ "8934": [0.23222, 0.74111, 0, 0, 0.77778],
+ "8935": [0.23222, 0.74111, 0, 0, 0.77778],
+ "8936": [0.23222, 0.74111, 0, 0, 0.77778],
+ "8937": [0.23222, 0.74111, 0, 0, 0.77778],
+ "8938": [0.20576, 0.70576, 0, 0, 0.77778],
+ "8939": [0.20576, 0.70576, 0, 0, 0.77778],
+ "8940": [0.30274, 0.79383, 0, 0, 0.77778],
+ "8941": [0.30274, 0.79383, 0, 0, 0.77778],
+ "8994": [0.19444, 0.69224, 0, 0, 0.77778],
+ "8995": [0.19444, 0.69224, 0, 0, 0.77778],
+ "9416": [0.15559, 0.69224, 0, 0, 0.90222],
+ "9484": [0, 0.69224, 0, 0, 0.5],
+ "9488": [0, 0.69224, 0, 0, 0.5],
+ "9492": [0, 0.37788, 0, 0, 0.5],
+ "9496": [0, 0.37788, 0, 0, 0.5],
+ "9585": [0.19444, 0.68889, 0, 0, 0.88889],
+ "9586": [0.19444, 0.74111, 0, 0, 0.88889],
+ "9632": [0, 0.675, 0, 0, 0.77778],
+ "9633": [0, 0.675, 0, 0, 0.77778],
+ "9650": [0, 0.54986, 0, 0, 0.72222],
+ "9651": [0, 0.54986, 0, 0, 0.72222],
+ "9654": [0.03517, 0.54986, 0, 0, 0.77778],
+ "9660": [0, 0.54986, 0, 0, 0.72222],
+ "9661": [0, 0.54986, 0, 0, 0.72222],
+ "9664": [0.03517, 0.54986, 0, 0, 0.77778],
+ "9674": [0.11111, 0.69224, 0, 0, 0.66667],
+ "9733": [0.19444, 0.69224, 0, 0, 0.94445],
+ "10003": [0, 0.69224, 0, 0, 0.83334],
+ "10016": [0, 0.69224, 0, 0, 0.83334],
+ "10731": [0.11111, 0.69224, 0, 0, 0.66667],
+ "10846": [0.19444, 0.75583, 0, 0, 0.61111],
+ "10877": [0.13667, 0.63667, 0, 0, 0.77778],
+ "10878": [0.13667, 0.63667, 0, 0, 0.77778],
+ "10885": [0.25583, 0.75583, 0, 0, 0.77778],
+ "10886": [0.25583, 0.75583, 0, 0, 0.77778],
+ "10887": [0.13597, 0.63597, 0, 0, 0.77778],
+ "10888": [0.13597, 0.63597, 0, 0, 0.77778],
+ "10889": [0.26167, 0.75726, 0, 0, 0.77778],
+ "10890": [0.26167, 0.75726, 0, 0, 0.77778],
+ "10891": [0.48256, 0.98256, 0, 0, 0.77778],
+ "10892": [0.48256, 0.98256, 0, 0, 0.77778],
+ "10901": [0.13667, 0.63667, 0, 0, 0.77778],
+ "10902": [0.13667, 0.63667, 0, 0, 0.77778],
+ "10933": [0.25142, 0.75726, 0, 0, 0.77778],
+ "10934": [0.25142, 0.75726, 0, 0, 0.77778],
+ "10935": [0.26167, 0.75726, 0, 0, 0.77778],
+ "10936": [0.26167, 0.75726, 0, 0, 0.77778],
+ "10937": [0.26167, 0.75726, 0, 0, 0.77778],
+ "10938": [0.26167, 0.75726, 0, 0, 0.77778],
+ "10949": [0.25583, 0.75583, 0, 0, 0.77778],
+ "10950": [0.25583, 0.75583, 0, 0, 0.77778],
+ "10955": [0.28481, 0.79383, 0, 0, 0.77778],
+ "10956": [0.28481, 0.79383, 0, 0, 0.77778],
+ "57350": [0.08167, 0.58167, 0, 0, 0.22222],
+ "57351": [0.08167, 0.58167, 0, 0, 0.38889],
+ "57352": [0.08167, 0.58167, 0, 0, 0.77778],
+ "57353": [0, 0.43056, 0.04028, 0, 0.66667],
+ "57356": [0.25142, 0.75726, 0, 0, 0.77778],
+ "57357": [0.25142, 0.75726, 0, 0, 0.77778],
+ "57358": [0.41951, 0.91951, 0, 0, 0.77778],
+ "57359": [0.30274, 0.79383, 0, 0, 0.77778],
+ "57360": [0.30274, 0.79383, 0, 0, 0.77778],
+ "57361": [0.41951, 0.91951, 0, 0, 0.77778],
+ "57366": [0.25142, 0.75726, 0, 0, 0.77778],
+ "57367": [0.25142, 0.75726, 0, 0, 0.77778],
+ "57368": [0.25142, 0.75726, 0, 0, 0.77778],
+ "57369": [0.25142, 0.75726, 0, 0, 0.77778],
+ "57370": [0.13597, 0.63597, 0, 0, 0.77778],
+ "57371": [0.13597, 0.63597, 0, 0, 0.77778]
+ },
+ "Caligraphic-Regular": {
+ "32": [0, 0, 0, 0, 0.25],
+ "65": [0, 0.68333, 0, 0.19445, 0.79847],
+ "66": [0, 0.68333, 0.03041, 0.13889, 0.65681],
+ "67": [0, 0.68333, 0.05834, 0.13889, 0.52653],
+ "68": [0, 0.68333, 0.02778, 0.08334, 0.77139],
+ "69": [0, 0.68333, 0.08944, 0.11111, 0.52778],
+ "70": [0, 0.68333, 0.09931, 0.11111, 0.71875],
+ "71": [0.09722, 0.68333, 0.0593, 0.11111, 0.59487],
+ "72": [0, 0.68333, 0.00965, 0.11111, 0.84452],
+ "73": [0, 0.68333, 0.07382, 0, 0.54452],
+ "74": [0.09722, 0.68333, 0.18472, 0.16667, 0.67778],
+ "75": [0, 0.68333, 0.01445, 0.05556, 0.76195],
+ "76": [0, 0.68333, 0, 0.13889, 0.68972],
+ "77": [0, 0.68333, 0, 0.13889, 1.2009],
+ "78": [0, 0.68333, 0.14736, 0.08334, 0.82049],
+ "79": [0, 0.68333, 0.02778, 0.11111, 0.79611],
+ "80": [0, 0.68333, 0.08222, 0.08334, 0.69556],
+ "81": [0.09722, 0.68333, 0, 0.11111, 0.81667],
+ "82": [0, 0.68333, 0, 0.08334, 0.8475],
+ "83": [0, 0.68333, 0.075, 0.13889, 0.60556],
+ "84": [0, 0.68333, 0.25417, 0, 0.54464],
+ "85": [0, 0.68333, 0.09931, 0.08334, 0.62583],
+ "86": [0, 0.68333, 0.08222, 0, 0.61278],
+ "87": [0, 0.68333, 0.08222, 0.08334, 0.98778],
+ "88": [0, 0.68333, 0.14643, 0.13889, 0.7133],
+ "89": [0.09722, 0.68333, 0.08222, 0.08334, 0.66834],
+ "90": [0, 0.68333, 0.07944, 0.13889, 0.72473],
+ "160": [0, 0, 0, 0, 0.25]
+ },
+ "Fraktur-Regular": {
+ "32": [0, 0, 0, 0, 0.25],
+ "33": [0, 0.69141, 0, 0, 0.29574],
+ "34": [0, 0.69141, 0, 0, 0.21471],
+ "38": [0, 0.69141, 0, 0, 0.73786],
+ "39": [0, 0.69141, 0, 0, 0.21201],
+ "40": [0.24982, 0.74947, 0, 0, 0.38865],
+ "41": [0.24982, 0.74947, 0, 0, 0.38865],
+ "42": [0, 0.62119, 0, 0, 0.27764],
+ "43": [0.08319, 0.58283, 0, 0, 0.75623],
+ "44": [0, 0.10803, 0, 0, 0.27764],
+ "45": [0.08319, 0.58283, 0, 0, 0.75623],
+ "46": [0, 0.10803, 0, 0, 0.27764],
+ "47": [0.24982, 0.74947, 0, 0, 0.50181],
+ "48": [0, 0.47534, 0, 0, 0.50181],
+ "49": [0, 0.47534, 0, 0, 0.50181],
+ "50": [0, 0.47534, 0, 0, 0.50181],
+ "51": [0.18906, 0.47534, 0, 0, 0.50181],
+ "52": [0.18906, 0.47534, 0, 0, 0.50181],
+ "53": [0.18906, 0.47534, 0, 0, 0.50181],
+ "54": [0, 0.69141, 0, 0, 0.50181],
+ "55": [0.18906, 0.47534, 0, 0, 0.50181],
+ "56": [0, 0.69141, 0, 0, 0.50181],
+ "57": [0.18906, 0.47534, 0, 0, 0.50181],
+ "58": [0, 0.47534, 0, 0, 0.21606],
+ "59": [0.12604, 0.47534, 0, 0, 0.21606],
+ "61": [-0.13099, 0.36866, 0, 0, 0.75623],
+ "63": [0, 0.69141, 0, 0, 0.36245],
+ "65": [0, 0.69141, 0, 0, 0.7176],
+ "66": [0, 0.69141, 0, 0, 0.88397],
+ "67": [0, 0.69141, 0, 0, 0.61254],
+ "68": [0, 0.69141, 0, 0, 0.83158],
+ "69": [0, 0.69141, 0, 0, 0.66278],
+ "70": [0.12604, 0.69141, 0, 0, 0.61119],
+ "71": [0, 0.69141, 0, 0, 0.78539],
+ "72": [0.06302, 0.69141, 0, 0, 0.7203],
+ "73": [0, 0.69141, 0, 0, 0.55448],
+ "74": [0.12604, 0.69141, 0, 0, 0.55231],
+ "75": [0, 0.69141, 0, 0, 0.66845],
+ "76": [0, 0.69141, 0, 0, 0.66602],
+ "77": [0, 0.69141, 0, 0, 1.04953],
+ "78": [0, 0.69141, 0, 0, 0.83212],
+ "79": [0, 0.69141, 0, 0, 0.82699],
+ "80": [0.18906, 0.69141, 0, 0, 0.82753],
+ "81": [0.03781, 0.69141, 0, 0, 0.82699],
+ "82": [0, 0.69141, 0, 0, 0.82807],
+ "83": [0, 0.69141, 0, 0, 0.82861],
+ "84": [0, 0.69141, 0, 0, 0.66899],
+ "85": [0, 0.69141, 0, 0, 0.64576],
+ "86": [0, 0.69141, 0, 0, 0.83131],
+ "87": [0, 0.69141, 0, 0, 1.04602],
+ "88": [0, 0.69141, 0, 0, 0.71922],
+ "89": [0.18906, 0.69141, 0, 0, 0.83293],
+ "90": [0.12604, 0.69141, 0, 0, 0.60201],
+ "91": [0.24982, 0.74947, 0, 0, 0.27764],
+ "93": [0.24982, 0.74947, 0, 0, 0.27764],
+ "94": [0, 0.69141, 0, 0, 0.49965],
+ "97": [0, 0.47534, 0, 0, 0.50046],
+ "98": [0, 0.69141, 0, 0, 0.51315],
+ "99": [0, 0.47534, 0, 0, 0.38946],
+ "100": [0, 0.62119, 0, 0, 0.49857],
+ "101": [0, 0.47534, 0, 0, 0.40053],
+ "102": [0.18906, 0.69141, 0, 0, 0.32626],
+ "103": [0.18906, 0.47534, 0, 0, 0.5037],
+ "104": [0.18906, 0.69141, 0, 0, 0.52126],
+ "105": [0, 0.69141, 0, 0, 0.27899],
+ "106": [0, 0.69141, 0, 0, 0.28088],
+ "107": [0, 0.69141, 0, 0, 0.38946],
+ "108": [0, 0.69141, 0, 0, 0.27953],
+ "109": [0, 0.47534, 0, 0, 0.76676],
+ "110": [0, 0.47534, 0, 0, 0.52666],
+ "111": [0, 0.47534, 0, 0, 0.48885],
+ "112": [0.18906, 0.52396, 0, 0, 0.50046],
+ "113": [0.18906, 0.47534, 0, 0, 0.48912],
+ "114": [0, 0.47534, 0, 0, 0.38919],
+ "115": [0, 0.47534, 0, 0, 0.44266],
+ "116": [0, 0.62119, 0, 0, 0.33301],
+ "117": [0, 0.47534, 0, 0, 0.5172],
+ "118": [0, 0.52396, 0, 0, 0.5118],
+ "119": [0, 0.52396, 0, 0, 0.77351],
+ "120": [0.18906, 0.47534, 0, 0, 0.38865],
+ "121": [0.18906, 0.47534, 0, 0, 0.49884],
+ "122": [0.18906, 0.47534, 0, 0, 0.39054],
+ "160": [0, 0, 0, 0, 0.25],
+ "8216": [0, 0.69141, 0, 0, 0.21471],
+ "8217": [0, 0.69141, 0, 0, 0.21471],
+ "58112": [0, 0.62119, 0, 0, 0.49749],
+ "58113": [0, 0.62119, 0, 0, 0.4983],
+ "58114": [0.18906, 0.69141, 0, 0, 0.33328],
+ "58115": [0.18906, 0.69141, 0, 0, 0.32923],
+ "58116": [0.18906, 0.47534, 0, 0, 0.50343],
+ "58117": [0, 0.69141, 0, 0, 0.33301],
+ "58118": [0, 0.62119, 0, 0, 0.33409],
+ "58119": [0, 0.47534, 0, 0, 0.50073]
+ },
+ "Main-Bold": {
+ "32": [0, 0, 0, 0, 0.25],
+ "33": [0, 0.69444, 0, 0, 0.35],
+ "34": [0, 0.69444, 0, 0, 0.60278],
+ "35": [0.19444, 0.69444, 0, 0, 0.95833],
+ "36": [0.05556, 0.75, 0, 0, 0.575],
+ "37": [0.05556, 0.75, 0, 0, 0.95833],
+ "38": [0, 0.69444, 0, 0, 0.89444],
+ "39": [0, 0.69444, 0, 0, 0.31944],
+ "40": [0.25, 0.75, 0, 0, 0.44722],
+ "41": [0.25, 0.75, 0, 0, 0.44722],
+ "42": [0, 0.75, 0, 0, 0.575],
+ "43": [0.13333, 0.63333, 0, 0, 0.89444],
+ "44": [0.19444, 0.15556, 0, 0, 0.31944],
+ "45": [0, 0.44444, 0, 0, 0.38333],
+ "46": [0, 0.15556, 0, 0, 0.31944],
+ "47": [0.25, 0.75, 0, 0, 0.575],
+ "48": [0, 0.64444, 0, 0, 0.575],
+ "49": [0, 0.64444, 0, 0, 0.575],
+ "50": [0, 0.64444, 0, 0, 0.575],
+ "51": [0, 0.64444, 0, 0, 0.575],
+ "52": [0, 0.64444, 0, 0, 0.575],
+ "53": [0, 0.64444, 0, 0, 0.575],
+ "54": [0, 0.64444, 0, 0, 0.575],
+ "55": [0, 0.64444, 0, 0, 0.575],
+ "56": [0, 0.64444, 0, 0, 0.575],
+ "57": [0, 0.64444, 0, 0, 0.575],
+ "58": [0, 0.44444, 0, 0, 0.31944],
+ "59": [0.19444, 0.44444, 0, 0, 0.31944],
+ "60": [0.08556, 0.58556, 0, 0, 0.89444],
+ "61": [-0.10889, 0.39111, 0, 0, 0.89444],
+ "62": [0.08556, 0.58556, 0, 0, 0.89444],
+ "63": [0, 0.69444, 0, 0, 0.54305],
+ "64": [0, 0.69444, 0, 0, 0.89444],
+ "65": [0, 0.68611, 0, 0, 0.86944],
+ "66": [0, 0.68611, 0, 0, 0.81805],
+ "67": [0, 0.68611, 0, 0, 0.83055],
+ "68": [0, 0.68611, 0, 0, 0.88194],
+ "69": [0, 0.68611, 0, 0, 0.75555],
+ "70": [0, 0.68611, 0, 0, 0.72361],
+ "71": [0, 0.68611, 0, 0, 0.90416],
+ "72": [0, 0.68611, 0, 0, 0.9],
+ "73": [0, 0.68611, 0, 0, 0.43611],
+ "74": [0, 0.68611, 0, 0, 0.59444],
+ "75": [0, 0.68611, 0, 0, 0.90138],
+ "76": [0, 0.68611, 0, 0, 0.69166],
+ "77": [0, 0.68611, 0, 0, 1.09166],
+ "78": [0, 0.68611, 0, 0, 0.9],
+ "79": [0, 0.68611, 0, 0, 0.86388],
+ "80": [0, 0.68611, 0, 0, 0.78611],
+ "81": [0.19444, 0.68611, 0, 0, 0.86388],
+ "82": [0, 0.68611, 0, 0, 0.8625],
+ "83": [0, 0.68611, 0, 0, 0.63889],
+ "84": [0, 0.68611, 0, 0, 0.8],
+ "85": [0, 0.68611, 0, 0, 0.88472],
+ "86": [0, 0.68611, 0.01597, 0, 0.86944],
+ "87": [0, 0.68611, 0.01597, 0, 1.18888],
+ "88": [0, 0.68611, 0, 0, 0.86944],
+ "89": [0, 0.68611, 0.02875, 0, 0.86944],
+ "90": [0, 0.68611, 0, 0, 0.70277],
+ "91": [0.25, 0.75, 0, 0, 0.31944],
+ "92": [0.25, 0.75, 0, 0, 0.575],
+ "93": [0.25, 0.75, 0, 0, 0.31944],
+ "94": [0, 0.69444, 0, 0, 0.575],
+ "95": [0.31, 0.13444, 0.03194, 0, 0.575],
+ "97": [0, 0.44444, 0, 0, 0.55902],
+ "98": [0, 0.69444, 0, 0, 0.63889],
+ "99": [0, 0.44444, 0, 0, 0.51111],
+ "100": [0, 0.69444, 0, 0, 0.63889],
+ "101": [0, 0.44444, 0, 0, 0.52708],
+ "102": [0, 0.69444, 0.10903, 0, 0.35139],
+ "103": [0.19444, 0.44444, 0.01597, 0, 0.575],
+ "104": [0, 0.69444, 0, 0, 0.63889],
+ "105": [0, 0.69444, 0, 0, 0.31944],
+ "106": [0.19444, 0.69444, 0, 0, 0.35139],
+ "107": [0, 0.69444, 0, 0, 0.60694],
+ "108": [0, 0.69444, 0, 0, 0.31944],
+ "109": [0, 0.44444, 0, 0, 0.95833],
+ "110": [0, 0.44444, 0, 0, 0.63889],
+ "111": [0, 0.44444, 0, 0, 0.575],
+ "112": [0.19444, 0.44444, 0, 0, 0.63889],
+ "113": [0.19444, 0.44444, 0, 0, 0.60694],
+ "114": [0, 0.44444, 0, 0, 0.47361],
+ "115": [0, 0.44444, 0, 0, 0.45361],
+ "116": [0, 0.63492, 0, 0, 0.44722],
+ "117": [0, 0.44444, 0, 0, 0.63889],
+ "118": [0, 0.44444, 0.01597, 0, 0.60694],
+ "119": [0, 0.44444, 0.01597, 0, 0.83055],
+ "120": [0, 0.44444, 0, 0, 0.60694],
+ "121": [0.19444, 0.44444, 0.01597, 0, 0.60694],
+ "122": [0, 0.44444, 0, 0, 0.51111],
+ "123": [0.25, 0.75, 0, 0, 0.575],
+ "124": [0.25, 0.75, 0, 0, 0.31944],
+ "125": [0.25, 0.75, 0, 0, 0.575],
+ "126": [0.35, 0.34444, 0, 0, 0.575],
+ "160": [0, 0, 0, 0, 0.25],
+ "163": [0, 0.69444, 0, 0, 0.86853],
+ "168": [0, 0.69444, 0, 0, 0.575],
+ "172": [0, 0.44444, 0, 0, 0.76666],
+ "176": [0, 0.69444, 0, 0, 0.86944],
+ "177": [0.13333, 0.63333, 0, 0, 0.89444],
+ "184": [0.17014, 0, 0, 0, 0.51111],
+ "198": [0, 0.68611, 0, 0, 1.04166],
+ "215": [0.13333, 0.63333, 0, 0, 0.89444],
+ "216": [0.04861, 0.73472, 0, 0, 0.89444],
+ "223": [0, 0.69444, 0, 0, 0.59722],
+ "230": [0, 0.44444, 0, 0, 0.83055],
+ "247": [0.13333, 0.63333, 0, 0, 0.89444],
+ "248": [0.09722, 0.54167, 0, 0, 0.575],
+ "305": [0, 0.44444, 0, 0, 0.31944],
+ "338": [0, 0.68611, 0, 0, 1.16944],
+ "339": [0, 0.44444, 0, 0, 0.89444],
+ "567": [0.19444, 0.44444, 0, 0, 0.35139],
+ "710": [0, 0.69444, 0, 0, 0.575],
+ "711": [0, 0.63194, 0, 0, 0.575],
+ "713": [0, 0.59611, 0, 0, 0.575],
+ "714": [0, 0.69444, 0, 0, 0.575],
+ "715": [0, 0.69444, 0, 0, 0.575],
+ "728": [0, 0.69444, 0, 0, 0.575],
+ "729": [0, 0.69444, 0, 0, 0.31944],
+ "730": [0, 0.69444, 0, 0, 0.86944],
+ "732": [0, 0.69444, 0, 0, 0.575],
+ "733": [0, 0.69444, 0, 0, 0.575],
+ "915": [0, 0.68611, 0, 0, 0.69166],
+ "916": [0, 0.68611, 0, 0, 0.95833],
+ "920": [0, 0.68611, 0, 0, 0.89444],
+ "923": [0, 0.68611, 0, 0, 0.80555],
+ "926": [0, 0.68611, 0, 0, 0.76666],
+ "928": [0, 0.68611, 0, 0, 0.9],
+ "931": [0, 0.68611, 0, 0, 0.83055],
+ "933": [0, 0.68611, 0, 0, 0.89444],
+ "934": [0, 0.68611, 0, 0, 0.83055],
+ "936": [0, 0.68611, 0, 0, 0.89444],
+ "937": [0, 0.68611, 0, 0, 0.83055],
+ "8211": [0, 0.44444, 0.03194, 0, 0.575],
+ "8212": [0, 0.44444, 0.03194, 0, 1.14999],
+ "8216": [0, 0.69444, 0, 0, 0.31944],
+ "8217": [0, 0.69444, 0, 0, 0.31944],
+ "8220": [0, 0.69444, 0, 0, 0.60278],
+ "8221": [0, 0.69444, 0, 0, 0.60278],
+ "8224": [0.19444, 0.69444, 0, 0, 0.51111],
+ "8225": [0.19444, 0.69444, 0, 0, 0.51111],
+ "8242": [0, 0.55556, 0, 0, 0.34444],
+ "8407": [0, 0.72444, 0.15486, 0, 0.575],
+ "8463": [0, 0.69444, 0, 0, 0.66759],
+ "8465": [0, 0.69444, 0, 0, 0.83055],
+ "8467": [0, 0.69444, 0, 0, 0.47361],
+ "8472": [0.19444, 0.44444, 0, 0, 0.74027],
+ "8476": [0, 0.69444, 0, 0, 0.83055],
+ "8501": [0, 0.69444, 0, 0, 0.70277],
+ "8592": [-0.10889, 0.39111, 0, 0, 1.14999],
+ "8593": [0.19444, 0.69444, 0, 0, 0.575],
+ "8594": [-0.10889, 0.39111, 0, 0, 1.14999],
+ "8595": [0.19444, 0.69444, 0, 0, 0.575],
+ "8596": [-0.10889, 0.39111, 0, 0, 1.14999],
+ "8597": [0.25, 0.75, 0, 0, 0.575],
+ "8598": [0.19444, 0.69444, 0, 0, 1.14999],
+ "8599": [0.19444, 0.69444, 0, 0, 1.14999],
+ "8600": [0.19444, 0.69444, 0, 0, 1.14999],
+ "8601": [0.19444, 0.69444, 0, 0, 1.14999],
+ "8636": [-0.10889, 0.39111, 0, 0, 1.14999],
+ "8637": [-0.10889, 0.39111, 0, 0, 1.14999],
+ "8640": [-0.10889, 0.39111, 0, 0, 1.14999],
+ "8641": [-0.10889, 0.39111, 0, 0, 1.14999],
+ "8656": [-0.10889, 0.39111, 0, 0, 1.14999],
+ "8657": [0.19444, 0.69444, 0, 0, 0.70277],
+ "8658": [-0.10889, 0.39111, 0, 0, 1.14999],
+ "8659": [0.19444, 0.69444, 0, 0, 0.70277],
+ "8660": [-0.10889, 0.39111, 0, 0, 1.14999],
+ "8661": [0.25, 0.75, 0, 0, 0.70277],
+ "8704": [0, 0.69444, 0, 0, 0.63889],
+ "8706": [0, 0.69444, 0.06389, 0, 0.62847],
+ "8707": [0, 0.69444, 0, 0, 0.63889],
+ "8709": [0.05556, 0.75, 0, 0, 0.575],
+ "8711": [0, 0.68611, 0, 0, 0.95833],
+ "8712": [0.08556, 0.58556, 0, 0, 0.76666],
+ "8715": [0.08556, 0.58556, 0, 0, 0.76666],
+ "8722": [0.13333, 0.63333, 0, 0, 0.89444],
+ "8723": [0.13333, 0.63333, 0, 0, 0.89444],
+ "8725": [0.25, 0.75, 0, 0, 0.575],
+ "8726": [0.25, 0.75, 0, 0, 0.575],
+ "8727": [-0.02778, 0.47222, 0, 0, 0.575],
+ "8728": [-0.02639, 0.47361, 0, 0, 0.575],
+ "8729": [-0.02639, 0.47361, 0, 0, 0.575],
+ "8730": [0.18, 0.82, 0, 0, 0.95833],
+ "8733": [0, 0.44444, 0, 0, 0.89444],
+ "8734": [0, 0.44444, 0, 0, 1.14999],
+ "8736": [0, 0.69224, 0, 0, 0.72222],
+ "8739": [0.25, 0.75, 0, 0, 0.31944],
+ "8741": [0.25, 0.75, 0, 0, 0.575],
+ "8743": [0, 0.55556, 0, 0, 0.76666],
+ "8744": [0, 0.55556, 0, 0, 0.76666],
+ "8745": [0, 0.55556, 0, 0, 0.76666],
+ "8746": [0, 0.55556, 0, 0, 0.76666],
+ "8747": [0.19444, 0.69444, 0.12778, 0, 0.56875],
+ "8764": [-0.10889, 0.39111, 0, 0, 0.89444],
+ "8768": [0.19444, 0.69444, 0, 0, 0.31944],
+ "8771": [0.00222, 0.50222, 0, 0, 0.89444],
+ "8773": [0.027, 0.638, 0, 0, 0.894],
+ "8776": [0.02444, 0.52444, 0, 0, 0.89444],
+ "8781": [0.00222, 0.50222, 0, 0, 0.89444],
+ "8801": [0.00222, 0.50222, 0, 0, 0.89444],
+ "8804": [0.19667, 0.69667, 0, 0, 0.89444],
+ "8805": [0.19667, 0.69667, 0, 0, 0.89444],
+ "8810": [0.08556, 0.58556, 0, 0, 1.14999],
+ "8811": [0.08556, 0.58556, 0, 0, 1.14999],
+ "8826": [0.08556, 0.58556, 0, 0, 0.89444],
+ "8827": [0.08556, 0.58556, 0, 0, 0.89444],
+ "8834": [0.08556, 0.58556, 0, 0, 0.89444],
+ "8835": [0.08556, 0.58556, 0, 0, 0.89444],
+ "8838": [0.19667, 0.69667, 0, 0, 0.89444],
+ "8839": [0.19667, 0.69667, 0, 0, 0.89444],
+ "8846": [0, 0.55556, 0, 0, 0.76666],
+ "8849": [0.19667, 0.69667, 0, 0, 0.89444],
+ "8850": [0.19667, 0.69667, 0, 0, 0.89444],
+ "8851": [0, 0.55556, 0, 0, 0.76666],
+ "8852": [0, 0.55556, 0, 0, 0.76666],
+ "8853": [0.13333, 0.63333, 0, 0, 0.89444],
+ "8854": [0.13333, 0.63333, 0, 0, 0.89444],
+ "8855": [0.13333, 0.63333, 0, 0, 0.89444],
+ "8856": [0.13333, 0.63333, 0, 0, 0.89444],
+ "8857": [0.13333, 0.63333, 0, 0, 0.89444],
+ "8866": [0, 0.69444, 0, 0, 0.70277],
+ "8867": [0, 0.69444, 0, 0, 0.70277],
+ "8868": [0, 0.69444, 0, 0, 0.89444],
+ "8869": [0, 0.69444, 0, 0, 0.89444],
+ "8900": [-0.02639, 0.47361, 0, 0, 0.575],
+ "8901": [-0.02639, 0.47361, 0, 0, 0.31944],
+ "8902": [-0.02778, 0.47222, 0, 0, 0.575],
+ "8968": [0.25, 0.75, 0, 0, 0.51111],
+ "8969": [0.25, 0.75, 0, 0, 0.51111],
+ "8970": [0.25, 0.75, 0, 0, 0.51111],
+ "8971": [0.25, 0.75, 0, 0, 0.51111],
+ "8994": [-0.13889, 0.36111, 0, 0, 1.14999],
+ "8995": [-0.13889, 0.36111, 0, 0, 1.14999],
+ "9651": [0.19444, 0.69444, 0, 0, 1.02222],
+ "9657": [-0.02778, 0.47222, 0, 0, 0.575],
+ "9661": [0.19444, 0.69444, 0, 0, 1.02222],
+ "9667": [-0.02778, 0.47222, 0, 0, 0.575],
+ "9711": [0.19444, 0.69444, 0, 0, 1.14999],
+ "9824": [0.12963, 0.69444, 0, 0, 0.89444],
+ "9825": [0.12963, 0.69444, 0, 0, 0.89444],
+ "9826": [0.12963, 0.69444, 0, 0, 0.89444],
+ "9827": [0.12963, 0.69444, 0, 0, 0.89444],
+ "9837": [0, 0.75, 0, 0, 0.44722],
+ "9838": [0.19444, 0.69444, 0, 0, 0.44722],
+ "9839": [0.19444, 0.69444, 0, 0, 0.44722],
+ "10216": [0.25, 0.75, 0, 0, 0.44722],
+ "10217": [0.25, 0.75, 0, 0, 0.44722],
+ "10815": [0, 0.68611, 0, 0, 0.9],
+ "10927": [0.19667, 0.69667, 0, 0, 0.89444],
+ "10928": [0.19667, 0.69667, 0, 0, 0.89444],
+ "57376": [0.19444, 0.69444, 0, 0, 0]
+ },
+ "Main-BoldItalic": {
+ "32": [0, 0, 0, 0, 0.25],
+ "33": [0, 0.69444, 0.11417, 0, 0.38611],
+ "34": [0, 0.69444, 0.07939, 0, 0.62055],
+ "35": [0.19444, 0.69444, 0.06833, 0, 0.94444],
+ "37": [0.05556, 0.75, 0.12861, 0, 0.94444],
+ "38": [0, 0.69444, 0.08528, 0, 0.88555],
+ "39": [0, 0.69444, 0.12945, 0, 0.35555],
+ "40": [0.25, 0.75, 0.15806, 0, 0.47333],
+ "41": [0.25, 0.75, 0.03306, 0, 0.47333],
+ "42": [0, 0.75, 0.14333, 0, 0.59111],
+ "43": [0.10333, 0.60333, 0.03306, 0, 0.88555],
+ "44": [0.19444, 0.14722, 0, 0, 0.35555],
+ "45": [0, 0.44444, 0.02611, 0, 0.41444],
+ "46": [0, 0.14722, 0, 0, 0.35555],
+ "47": [0.25, 0.75, 0.15806, 0, 0.59111],
+ "48": [0, 0.64444, 0.13167, 0, 0.59111],
+ "49": [0, 0.64444, 0.13167, 0, 0.59111],
+ "50": [0, 0.64444, 0.13167, 0, 0.59111],
+ "51": [0, 0.64444, 0.13167, 0, 0.59111],
+ "52": [0.19444, 0.64444, 0.13167, 0, 0.59111],
+ "53": [0, 0.64444, 0.13167, 0, 0.59111],
+ "54": [0, 0.64444, 0.13167, 0, 0.59111],
+ "55": [0.19444, 0.64444, 0.13167, 0, 0.59111],
+ "56": [0, 0.64444, 0.13167, 0, 0.59111],
+ "57": [0, 0.64444, 0.13167, 0, 0.59111],
+ "58": [0, 0.44444, 0.06695, 0, 0.35555],
+ "59": [0.19444, 0.44444, 0.06695, 0, 0.35555],
+ "61": [-0.10889, 0.39111, 0.06833, 0, 0.88555],
+ "63": [0, 0.69444, 0.11472, 0, 0.59111],
+ "64": [0, 0.69444, 0.09208, 0, 0.88555],
+ "65": [0, 0.68611, 0, 0, 0.86555],
+ "66": [0, 0.68611, 0.0992, 0, 0.81666],
+ "67": [0, 0.68611, 0.14208, 0, 0.82666],
+ "68": [0, 0.68611, 0.09062, 0, 0.87555],
+ "69": [0, 0.68611, 0.11431, 0, 0.75666],
+ "70": [0, 0.68611, 0.12903, 0, 0.72722],
+ "71": [0, 0.68611, 0.07347, 0, 0.89527],
+ "72": [0, 0.68611, 0.17208, 0, 0.8961],
+ "73": [0, 0.68611, 0.15681, 0, 0.47166],
+ "74": [0, 0.68611, 0.145, 0, 0.61055],
+ "75": [0, 0.68611, 0.14208, 0, 0.89499],
+ "76": [0, 0.68611, 0, 0, 0.69777],
+ "77": [0, 0.68611, 0.17208, 0, 1.07277],
+ "78": [0, 0.68611, 0.17208, 0, 0.8961],
+ "79": [0, 0.68611, 0.09062, 0, 0.85499],
+ "80": [0, 0.68611, 0.0992, 0, 0.78721],
+ "81": [0.19444, 0.68611, 0.09062, 0, 0.85499],
+ "82": [0, 0.68611, 0.02559, 0, 0.85944],
+ "83": [0, 0.68611, 0.11264, 0, 0.64999],
+ "84": [0, 0.68611, 0.12903, 0, 0.7961],
+ "85": [0, 0.68611, 0.17208, 0, 0.88083],
+ "86": [0, 0.68611, 0.18625, 0, 0.86555],
+ "87": [0, 0.68611, 0.18625, 0, 1.15999],
+ "88": [0, 0.68611, 0.15681, 0, 0.86555],
+ "89": [0, 0.68611, 0.19803, 0, 0.86555],
+ "90": [0, 0.68611, 0.14208, 0, 0.70888],
+ "91": [0.25, 0.75, 0.1875, 0, 0.35611],
+ "93": [0.25, 0.75, 0.09972, 0, 0.35611],
+ "94": [0, 0.69444, 0.06709, 0, 0.59111],
+ "95": [0.31, 0.13444, 0.09811, 0, 0.59111],
+ "97": [0, 0.44444, 0.09426, 0, 0.59111],
+ "98": [0, 0.69444, 0.07861, 0, 0.53222],
+ "99": [0, 0.44444, 0.05222, 0, 0.53222],
+ "100": [0, 0.69444, 0.10861, 0, 0.59111],
+ "101": [0, 0.44444, 0.085, 0, 0.53222],
+ "102": [0.19444, 0.69444, 0.21778, 0, 0.4],
+ "103": [0.19444, 0.44444, 0.105, 0, 0.53222],
+ "104": [0, 0.69444, 0.09426, 0, 0.59111],
+ "105": [0, 0.69326, 0.11387, 0, 0.35555],
+ "106": [0.19444, 0.69326, 0.1672, 0, 0.35555],
+ "107": [0, 0.69444, 0.11111, 0, 0.53222],
+ "108": [0, 0.69444, 0.10861, 0, 0.29666],
+ "109": [0, 0.44444, 0.09426, 0, 0.94444],
+ "110": [0, 0.44444, 0.09426, 0, 0.64999],
+ "111": [0, 0.44444, 0.07861, 0, 0.59111],
+ "112": [0.19444, 0.44444, 0.07861, 0, 0.59111],
+ "113": [0.19444, 0.44444, 0.105, 0, 0.53222],
+ "114": [0, 0.44444, 0.11111, 0, 0.50167],
+ "115": [0, 0.44444, 0.08167, 0, 0.48694],
+ "116": [0, 0.63492, 0.09639, 0, 0.385],
+ "117": [0, 0.44444, 0.09426, 0, 0.62055],
+ "118": [0, 0.44444, 0.11111, 0, 0.53222],
+ "119": [0, 0.44444, 0.11111, 0, 0.76777],
+ "120": [0, 0.44444, 0.12583, 0, 0.56055],
+ "121": [0.19444, 0.44444, 0.105, 0, 0.56166],
+ "122": [0, 0.44444, 0.13889, 0, 0.49055],
+ "126": [0.35, 0.34444, 0.11472, 0, 0.59111],
+ "160": [0, 0, 0, 0, 0.25],
+ "168": [0, 0.69444, 0.11473, 0, 0.59111],
+ "176": [0, 0.69444, 0, 0, 0.94888],
+ "184": [0.17014, 0, 0, 0, 0.53222],
+ "198": [0, 0.68611, 0.11431, 0, 1.02277],
+ "216": [0.04861, 0.73472, 0.09062, 0, 0.88555],
+ "223": [0.19444, 0.69444, 0.09736, 0, 0.665],
+ "230": [0, 0.44444, 0.085, 0, 0.82666],
+ "248": [0.09722, 0.54167, 0.09458, 0, 0.59111],
+ "305": [0, 0.44444, 0.09426, 0, 0.35555],
+ "338": [0, 0.68611, 0.11431, 0, 1.14054],
+ "339": [0, 0.44444, 0.085, 0, 0.82666],
+ "567": [0.19444, 0.44444, 0.04611, 0, 0.385],
+ "710": [0, 0.69444, 0.06709, 0, 0.59111],
+ "711": [0, 0.63194, 0.08271, 0, 0.59111],
+ "713": [0, 0.59444, 0.10444, 0, 0.59111],
+ "714": [0, 0.69444, 0.08528, 0, 0.59111],
+ "715": [0, 0.69444, 0, 0, 0.59111],
+ "728": [0, 0.69444, 0.10333, 0, 0.59111],
+ "729": [0, 0.69444, 0.12945, 0, 0.35555],
+ "730": [0, 0.69444, 0, 0, 0.94888],
+ "732": [0, 0.69444, 0.11472, 0, 0.59111],
+ "733": [0, 0.69444, 0.11472, 0, 0.59111],
+ "915": [0, 0.68611, 0.12903, 0, 0.69777],
+ "916": [0, 0.68611, 0, 0, 0.94444],
+ "920": [0, 0.68611, 0.09062, 0, 0.88555],
+ "923": [0, 0.68611, 0, 0, 0.80666],
+ "926": [0, 0.68611, 0.15092, 0, 0.76777],
+ "928": [0, 0.68611, 0.17208, 0, 0.8961],
+ "931": [0, 0.68611, 0.11431, 0, 0.82666],
+ "933": [0, 0.68611, 0.10778, 0, 0.88555],
+ "934": [0, 0.68611, 0.05632, 0, 0.82666],
+ "936": [0, 0.68611, 0.10778, 0, 0.88555],
+ "937": [0, 0.68611, 0.0992, 0, 0.82666],
+ "8211": [0, 0.44444, 0.09811, 0, 0.59111],
+ "8212": [0, 0.44444, 0.09811, 0, 1.18221],
+ "8216": [0, 0.69444, 0.12945, 0, 0.35555],
+ "8217": [0, 0.69444, 0.12945, 0, 0.35555],
+ "8220": [0, 0.69444, 0.16772, 0, 0.62055],
+ "8221": [0, 0.69444, 0.07939, 0, 0.62055]
+ },
+ "Main-Italic": {
+ "32": [0, 0, 0, 0, 0.25],
+ "33": [0, 0.69444, 0.12417, 0, 0.30667],
+ "34": [0, 0.69444, 0.06961, 0, 0.51444],
+ "35": [0.19444, 0.69444, 0.06616, 0, 0.81777],
+ "37": [0.05556, 0.75, 0.13639, 0, 0.81777],
+ "38": [0, 0.69444, 0.09694, 0, 0.76666],
+ "39": [0, 0.69444, 0.12417, 0, 0.30667],
+ "40": [0.25, 0.75, 0.16194, 0, 0.40889],
+ "41": [0.25, 0.75, 0.03694, 0, 0.40889],
+ "42": [0, 0.75, 0.14917, 0, 0.51111],
+ "43": [0.05667, 0.56167, 0.03694, 0, 0.76666],
+ "44": [0.19444, 0.10556, 0, 0, 0.30667],
+ "45": [0, 0.43056, 0.02826, 0, 0.35778],
+ "46": [0, 0.10556, 0, 0, 0.30667],
+ "47": [0.25, 0.75, 0.16194, 0, 0.51111],
+ "48": [0, 0.64444, 0.13556, 0, 0.51111],
+ "49": [0, 0.64444, 0.13556, 0, 0.51111],
+ "50": [0, 0.64444, 0.13556, 0, 0.51111],
+ "51": [0, 0.64444, 0.13556, 0, 0.51111],
+ "52": [0.19444, 0.64444, 0.13556, 0, 0.51111],
+ "53": [0, 0.64444, 0.13556, 0, 0.51111],
+ "54": [0, 0.64444, 0.13556, 0, 0.51111],
+ "55": [0.19444, 0.64444, 0.13556, 0, 0.51111],
+ "56": [0, 0.64444, 0.13556, 0, 0.51111],
+ "57": [0, 0.64444, 0.13556, 0, 0.51111],
+ "58": [0, 0.43056, 0.0582, 0, 0.30667],
+ "59": [0.19444, 0.43056, 0.0582, 0, 0.30667],
+ "61": [-0.13313, 0.36687, 0.06616, 0, 0.76666],
+ "63": [0, 0.69444, 0.1225, 0, 0.51111],
+ "64": [0, 0.69444, 0.09597, 0, 0.76666],
+ "65": [0, 0.68333, 0, 0, 0.74333],
+ "66": [0, 0.68333, 0.10257, 0, 0.70389],
+ "67": [0, 0.68333, 0.14528, 0, 0.71555],
+ "68": [0, 0.68333, 0.09403, 0, 0.755],
+ "69": [0, 0.68333, 0.12028, 0, 0.67833],
+ "70": [0, 0.68333, 0.13305, 0, 0.65277],
+ "71": [0, 0.68333, 0.08722, 0, 0.77361],
+ "72": [0, 0.68333, 0.16389, 0, 0.74333],
+ "73": [0, 0.68333, 0.15806, 0, 0.38555],
+ "74": [0, 0.68333, 0.14028, 0, 0.525],
+ "75": [0, 0.68333, 0.14528, 0, 0.76888],
+ "76": [0, 0.68333, 0, 0, 0.62722],
+ "77": [0, 0.68333, 0.16389, 0, 0.89666],
+ "78": [0, 0.68333, 0.16389, 0, 0.74333],
+ "79": [0, 0.68333, 0.09403, 0, 0.76666],
+ "80": [0, 0.68333, 0.10257, 0, 0.67833],
+ "81": [0.19444, 0.68333, 0.09403, 0, 0.76666],
+ "82": [0, 0.68333, 0.03868, 0, 0.72944],
+ "83": [0, 0.68333, 0.11972, 0, 0.56222],
+ "84": [0, 0.68333, 0.13305, 0, 0.71555],
+ "85": [0, 0.68333, 0.16389, 0, 0.74333],
+ "86": [0, 0.68333, 0.18361, 0, 0.74333],
+ "87": [0, 0.68333, 0.18361, 0, 0.99888],
+ "88": [0, 0.68333, 0.15806, 0, 0.74333],
+ "89": [0, 0.68333, 0.19383, 0, 0.74333],
+ "90": [0, 0.68333, 0.14528, 0, 0.61333],
+ "91": [0.25, 0.75, 0.1875, 0, 0.30667],
+ "93": [0.25, 0.75, 0.10528, 0, 0.30667],
+ "94": [0, 0.69444, 0.06646, 0, 0.51111],
+ "95": [0.31, 0.12056, 0.09208, 0, 0.51111],
+ "97": [0, 0.43056, 0.07671, 0, 0.51111],
+ "98": [0, 0.69444, 0.06312, 0, 0.46],
+ "99": [0, 0.43056, 0.05653, 0, 0.46],
+ "100": [0, 0.69444, 0.10333, 0, 0.51111],
+ "101": [0, 0.43056, 0.07514, 0, 0.46],
+ "102": [0.19444, 0.69444, 0.21194, 0, 0.30667],
+ "103": [0.19444, 0.43056, 0.08847, 0, 0.46],
+ "104": [0, 0.69444, 0.07671, 0, 0.51111],
+ "105": [0, 0.65536, 0.1019, 0, 0.30667],
+ "106": [0.19444, 0.65536, 0.14467, 0, 0.30667],
+ "107": [0, 0.69444, 0.10764, 0, 0.46],
+ "108": [0, 0.69444, 0.10333, 0, 0.25555],
+ "109": [0, 0.43056, 0.07671, 0, 0.81777],
+ "110": [0, 0.43056, 0.07671, 0, 0.56222],
+ "111": [0, 0.43056, 0.06312, 0, 0.51111],
+ "112": [0.19444, 0.43056, 0.06312, 0, 0.51111],
+ "113": [0.19444, 0.43056, 0.08847, 0, 0.46],
+ "114": [0, 0.43056, 0.10764, 0, 0.42166],
+ "115": [0, 0.43056, 0.08208, 0, 0.40889],
+ "116": [0, 0.61508, 0.09486, 0, 0.33222],
+ "117": [0, 0.43056, 0.07671, 0, 0.53666],
+ "118": [0, 0.43056, 0.10764, 0, 0.46],
+ "119": [0, 0.43056, 0.10764, 0, 0.66444],
+ "120": [0, 0.43056, 0.12042, 0, 0.46389],
+ "121": [0.19444, 0.43056, 0.08847, 0, 0.48555],
+ "122": [0, 0.43056, 0.12292, 0, 0.40889],
+ "126": [0.35, 0.31786, 0.11585, 0, 0.51111],
+ "160": [0, 0, 0, 0, 0.25],
+ "168": [0, 0.66786, 0.10474, 0, 0.51111],
+ "176": [0, 0.69444, 0, 0, 0.83129],
+ "184": [0.17014, 0, 0, 0, 0.46],
+ "198": [0, 0.68333, 0.12028, 0, 0.88277],
+ "216": [0.04861, 0.73194, 0.09403, 0, 0.76666],
+ "223": [0.19444, 0.69444, 0.10514, 0, 0.53666],
+ "230": [0, 0.43056, 0.07514, 0, 0.71555],
+ "248": [0.09722, 0.52778, 0.09194, 0, 0.51111],
+ "338": [0, 0.68333, 0.12028, 0, 0.98499],
+ "339": [0, 0.43056, 0.07514, 0, 0.71555],
+ "710": [0, 0.69444, 0.06646, 0, 0.51111],
+ "711": [0, 0.62847, 0.08295, 0, 0.51111],
+ "713": [0, 0.56167, 0.10333, 0, 0.51111],
+ "714": [0, 0.69444, 0.09694, 0, 0.51111],
+ "715": [0, 0.69444, 0, 0, 0.51111],
+ "728": [0, 0.69444, 0.10806, 0, 0.51111],
+ "729": [0, 0.66786, 0.11752, 0, 0.30667],
+ "730": [0, 0.69444, 0, 0, 0.83129],
+ "732": [0, 0.66786, 0.11585, 0, 0.51111],
+ "733": [0, 0.69444, 0.1225, 0, 0.51111],
+ "915": [0, 0.68333, 0.13305, 0, 0.62722],
+ "916": [0, 0.68333, 0, 0, 0.81777],
+ "920": [0, 0.68333, 0.09403, 0, 0.76666],
+ "923": [0, 0.68333, 0, 0, 0.69222],
+ "926": [0, 0.68333, 0.15294, 0, 0.66444],
+ "928": [0, 0.68333, 0.16389, 0, 0.74333],
+ "931": [0, 0.68333, 0.12028, 0, 0.71555],
+ "933": [0, 0.68333, 0.11111, 0, 0.76666],
+ "934": [0, 0.68333, 0.05986, 0, 0.71555],
+ "936": [0, 0.68333, 0.11111, 0, 0.76666],
+ "937": [0, 0.68333, 0.10257, 0, 0.71555],
+ "8211": [0, 0.43056, 0.09208, 0, 0.51111],
+ "8212": [0, 0.43056, 0.09208, 0, 1.02222],
+ "8216": [0, 0.69444, 0.12417, 0, 0.30667],
+ "8217": [0, 0.69444, 0.12417, 0, 0.30667],
+ "8220": [0, 0.69444, 0.1685, 0, 0.51444],
+ "8221": [0, 0.69444, 0.06961, 0, 0.51444],
+ "8463": [0, 0.68889, 0, 0, 0.54028]
+ },
+ "Main-Regular": {
+ "32": [0, 0, 0, 0, 0.25],
+ "33": [0, 0.69444, 0, 0, 0.27778],
+ "34": [0, 0.69444, 0, 0, 0.5],
+ "35": [0.19444, 0.69444, 0, 0, 0.83334],
+ "36": [0.05556, 0.75, 0, 0, 0.5],
+ "37": [0.05556, 0.75, 0, 0, 0.83334],
+ "38": [0, 0.69444, 0, 0, 0.77778],
+ "39": [0, 0.69444, 0, 0, 0.27778],
+ "40": [0.25, 0.75, 0, 0, 0.38889],
+ "41": [0.25, 0.75, 0, 0, 0.38889],
+ "42": [0, 0.75, 0, 0, 0.5],
+ "43": [0.08333, 0.58333, 0, 0, 0.77778],
+ "44": [0.19444, 0.10556, 0, 0, 0.27778],
+ "45": [0, 0.43056, 0, 0, 0.33333],
+ "46": [0, 0.10556, 0, 0, 0.27778],
+ "47": [0.25, 0.75, 0, 0, 0.5],
+ "48": [0, 0.64444, 0, 0, 0.5],
+ "49": [0, 0.64444, 0, 0, 0.5],
+ "50": [0, 0.64444, 0, 0, 0.5],
+ "51": [0, 0.64444, 0, 0, 0.5],
+ "52": [0, 0.64444, 0, 0, 0.5],
+ "53": [0, 0.64444, 0, 0, 0.5],
+ "54": [0, 0.64444, 0, 0, 0.5],
+ "55": [0, 0.64444, 0, 0, 0.5],
+ "56": [0, 0.64444, 0, 0, 0.5],
+ "57": [0, 0.64444, 0, 0, 0.5],
+ "58": [0, 0.43056, 0, 0, 0.27778],
+ "59": [0.19444, 0.43056, 0, 0, 0.27778],
+ "60": [0.0391, 0.5391, 0, 0, 0.77778],
+ "61": [-0.13313, 0.36687, 0, 0, 0.77778],
+ "62": [0.0391, 0.5391, 0, 0, 0.77778],
+ "63": [0, 0.69444, 0, 0, 0.47222],
+ "64": [0, 0.69444, 0, 0, 0.77778],
+ "65": [0, 0.68333, 0, 0, 0.75],
+ "66": [0, 0.68333, 0, 0, 0.70834],
+ "67": [0, 0.68333, 0, 0, 0.72222],
+ "68": [0, 0.68333, 0, 0, 0.76389],
+ "69": [0, 0.68333, 0, 0, 0.68056],
+ "70": [0, 0.68333, 0, 0, 0.65278],
+ "71": [0, 0.68333, 0, 0, 0.78472],
+ "72": [0, 0.68333, 0, 0, 0.75],
+ "73": [0, 0.68333, 0, 0, 0.36111],
+ "74": [0, 0.68333, 0, 0, 0.51389],
+ "75": [0, 0.68333, 0, 0, 0.77778],
+ "76": [0, 0.68333, 0, 0, 0.625],
+ "77": [0, 0.68333, 0, 0, 0.91667],
+ "78": [0, 0.68333, 0, 0, 0.75],
+ "79": [0, 0.68333, 0, 0, 0.77778],
+ "80": [0, 0.68333, 0, 0, 0.68056],
+ "81": [0.19444, 0.68333, 0, 0, 0.77778],
+ "82": [0, 0.68333, 0, 0, 0.73611],
+ "83": [0, 0.68333, 0, 0, 0.55556],
+ "84": [0, 0.68333, 0, 0, 0.72222],
+ "85": [0, 0.68333, 0, 0, 0.75],
+ "86": [0, 0.68333, 0.01389, 0, 0.75],
+ "87": [0, 0.68333, 0.01389, 0, 1.02778],
+ "88": [0, 0.68333, 0, 0, 0.75],
+ "89": [0, 0.68333, 0.025, 0, 0.75],
+ "90": [0, 0.68333, 0, 0, 0.61111],
+ "91": [0.25, 0.75, 0, 0, 0.27778],
+ "92": [0.25, 0.75, 0, 0, 0.5],
+ "93": [0.25, 0.75, 0, 0, 0.27778],
+ "94": [0, 0.69444, 0, 0, 0.5],
+ "95": [0.31, 0.12056, 0.02778, 0, 0.5],
+ "97": [0, 0.43056, 0, 0, 0.5],
+ "98": [0, 0.69444, 0, 0, 0.55556],
+ "99": [0, 0.43056, 0, 0, 0.44445],
+ "100": [0, 0.69444, 0, 0, 0.55556],
+ "101": [0, 0.43056, 0, 0, 0.44445],
+ "102": [0, 0.69444, 0.07778, 0, 0.30556],
+ "103": [0.19444, 0.43056, 0.01389, 0, 0.5],
+ "104": [0, 0.69444, 0, 0, 0.55556],
+ "105": [0, 0.66786, 0, 0, 0.27778],
+ "106": [0.19444, 0.66786, 0, 0, 0.30556],
+ "107": [0, 0.69444, 0, 0, 0.52778],
+ "108": [0, 0.69444, 0, 0, 0.27778],
+ "109": [0, 0.43056, 0, 0, 0.83334],
+ "110": [0, 0.43056, 0, 0, 0.55556],
+ "111": [0, 0.43056, 0, 0, 0.5],
+ "112": [0.19444, 0.43056, 0, 0, 0.55556],
+ "113": [0.19444, 0.43056, 0, 0, 0.52778],
+ "114": [0, 0.43056, 0, 0, 0.39167],
+ "115": [0, 0.43056, 0, 0, 0.39445],
+ "116": [0, 0.61508, 0, 0, 0.38889],
+ "117": [0, 0.43056, 0, 0, 0.55556],
+ "118": [0, 0.43056, 0.01389, 0, 0.52778],
+ "119": [0, 0.43056, 0.01389, 0, 0.72222],
+ "120": [0, 0.43056, 0, 0, 0.52778],
+ "121": [0.19444, 0.43056, 0.01389, 0, 0.52778],
+ "122": [0, 0.43056, 0, 0, 0.44445],
+ "123": [0.25, 0.75, 0, 0, 0.5],
+ "124": [0.25, 0.75, 0, 0, 0.27778],
+ "125": [0.25, 0.75, 0, 0, 0.5],
+ "126": [0.35, 0.31786, 0, 0, 0.5],
+ "160": [0, 0, 0, 0, 0.25],
+ "163": [0, 0.69444, 0, 0, 0.76909],
+ "167": [0.19444, 0.69444, 0, 0, 0.44445],
+ "168": [0, 0.66786, 0, 0, 0.5],
+ "172": [0, 0.43056, 0, 0, 0.66667],
+ "176": [0, 0.69444, 0, 0, 0.75],
+ "177": [0.08333, 0.58333, 0, 0, 0.77778],
+ "182": [0.19444, 0.69444, 0, 0, 0.61111],
+ "184": [0.17014, 0, 0, 0, 0.44445],
+ "198": [0, 0.68333, 0, 0, 0.90278],
+ "215": [0.08333, 0.58333, 0, 0, 0.77778],
+ "216": [0.04861, 0.73194, 0, 0, 0.77778],
+ "223": [0, 0.69444, 0, 0, 0.5],
+ "230": [0, 0.43056, 0, 0, 0.72222],
+ "247": [0.08333, 0.58333, 0, 0, 0.77778],
+ "248": [0.09722, 0.52778, 0, 0, 0.5],
+ "305": [0, 0.43056, 0, 0, 0.27778],
+ "338": [0, 0.68333, 0, 0, 1.01389],
+ "339": [0, 0.43056, 0, 0, 0.77778],
+ "567": [0.19444, 0.43056, 0, 0, 0.30556],
+ "710": [0, 0.69444, 0, 0, 0.5],
+ "711": [0, 0.62847, 0, 0, 0.5],
+ "713": [0, 0.56778, 0, 0, 0.5],
+ "714": [0, 0.69444, 0, 0, 0.5],
+ "715": [0, 0.69444, 0, 0, 0.5],
+ "728": [0, 0.69444, 0, 0, 0.5],
+ "729": [0, 0.66786, 0, 0, 0.27778],
+ "730": [0, 0.69444, 0, 0, 0.75],
+ "732": [0, 0.66786, 0, 0, 0.5],
+ "733": [0, 0.69444, 0, 0, 0.5],
+ "915": [0, 0.68333, 0, 0, 0.625],
+ "916": [0, 0.68333, 0, 0, 0.83334],
+ "920": [0, 0.68333, 0, 0, 0.77778],
+ "923": [0, 0.68333, 0, 0, 0.69445],
+ "926": [0, 0.68333, 0, 0, 0.66667],
+ "928": [0, 0.68333, 0, 0, 0.75],
+ "931": [0, 0.68333, 0, 0, 0.72222],
+ "933": [0, 0.68333, 0, 0, 0.77778],
+ "934": [0, 0.68333, 0, 0, 0.72222],
+ "936": [0, 0.68333, 0, 0, 0.77778],
+ "937": [0, 0.68333, 0, 0, 0.72222],
+ "8211": [0, 0.43056, 0.02778, 0, 0.5],
+ "8212": [0, 0.43056, 0.02778, 0, 1.0],
+ "8216": [0, 0.69444, 0, 0, 0.27778],
+ "8217": [0, 0.69444, 0, 0, 0.27778],
+ "8220": [0, 0.69444, 0, 0, 0.5],
+ "8221": [0, 0.69444, 0, 0, 0.5],
+ "8224": [0.19444, 0.69444, 0, 0, 0.44445],
+ "8225": [0.19444, 0.69444, 0, 0, 0.44445],
+ "8230": [0, 0.123, 0, 0, 1.172],
+ "8242": [0, 0.55556, 0, 0, 0.275],
+ "8407": [0, 0.71444, 0.15382, 0, 0.5],
+ "8463": [0, 0.68889, 0, 0, 0.54028],
+ "8465": [0, 0.69444, 0, 0, 0.72222],
+ "8467": [0, 0.69444, 0, 0.11111, 0.41667],
+ "8472": [0.19444, 0.43056, 0, 0.11111, 0.63646],
+ "8476": [0, 0.69444, 0, 0, 0.72222],
+ "8501": [0, 0.69444, 0, 0, 0.61111],
+ "8592": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8593": [0.19444, 0.69444, 0, 0, 0.5],
+ "8594": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8595": [0.19444, 0.69444, 0, 0, 0.5],
+ "8596": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8597": [0.25, 0.75, 0, 0, 0.5],
+ "8598": [0.19444, 0.69444, 0, 0, 1.0],
+ "8599": [0.19444, 0.69444, 0, 0, 1.0],
+ "8600": [0.19444, 0.69444, 0, 0, 1.0],
+ "8601": [0.19444, 0.69444, 0, 0, 1.0],
+ "8614": [0.011, 0.511, 0, 0, 1.0],
+ "8617": [0.011, 0.511, 0, 0, 1.126],
+ "8618": [0.011, 0.511, 0, 0, 1.126],
+ "8636": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8637": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8640": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8641": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8652": [0.011, 0.671, 0, 0, 1.0],
+ "8656": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8657": [0.19444, 0.69444, 0, 0, 0.61111],
+ "8658": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8659": [0.19444, 0.69444, 0, 0, 0.61111],
+ "8660": [-0.13313, 0.36687, 0, 0, 1.0],
+ "8661": [0.25, 0.75, 0, 0, 0.61111],
+ "8704": [0, 0.69444, 0, 0, 0.55556],
+ "8706": [0, 0.69444, 0.05556, 0.08334, 0.5309],
+ "8707": [0, 0.69444, 0, 0, 0.55556],
+ "8709": [0.05556, 0.75, 0, 0, 0.5],
+ "8711": [0, 0.68333, 0, 0, 0.83334],
+ "8712": [0.0391, 0.5391, 0, 0, 0.66667],
+ "8715": [0.0391, 0.5391, 0, 0, 0.66667],
+ "8722": [0.08333, 0.58333, 0, 0, 0.77778],
+ "8723": [0.08333, 0.58333, 0, 0, 0.77778],
+ "8725": [0.25, 0.75, 0, 0, 0.5],
+ "8726": [0.25, 0.75, 0, 0, 0.5],
+ "8727": [-0.03472, 0.46528, 0, 0, 0.5],
+ "8728": [-0.05555, 0.44445, 0, 0, 0.5],
+ "8729": [-0.05555, 0.44445, 0, 0, 0.5],
+ "8730": [0.2, 0.8, 0, 0, 0.83334],
+ "8733": [0, 0.43056, 0, 0, 0.77778],
+ "8734": [0, 0.43056, 0, 0, 1.0],
+ "8736": [0, 0.69224, 0, 0, 0.72222],
+ "8739": [0.25, 0.75, 0, 0, 0.27778],
+ "8741": [0.25, 0.75, 0, 0, 0.5],
+ "8743": [0, 0.55556, 0, 0, 0.66667],
+ "8744": [0, 0.55556, 0, 0, 0.66667],
+ "8745": [0, 0.55556, 0, 0, 0.66667],
+ "8746": [0, 0.55556, 0, 0, 0.66667],
+ "8747": [0.19444, 0.69444, 0.11111, 0, 0.41667],
+ "8764": [-0.13313, 0.36687, 0, 0, 0.77778],
+ "8768": [0.19444, 0.69444, 0, 0, 0.27778],
+ "8771": [-0.03625, 0.46375, 0, 0, 0.77778],
+ "8773": [-0.022, 0.589, 0, 0, 0.778],
+ "8776": [-0.01688, 0.48312, 0, 0, 0.77778],
+ "8781": [-0.03625, 0.46375, 0, 0, 0.77778],
+ "8784": [-0.133, 0.673, 0, 0, 0.778],
+ "8801": [-0.03625, 0.46375, 0, 0, 0.77778],
+ "8804": [0.13597, 0.63597, 0, 0, 0.77778],
+ "8805": [0.13597, 0.63597, 0, 0, 0.77778],
+ "8810": [0.0391, 0.5391, 0, 0, 1.0],
+ "8811": [0.0391, 0.5391, 0, 0, 1.0],
+ "8826": [0.0391, 0.5391, 0, 0, 0.77778],
+ "8827": [0.0391, 0.5391, 0, 0, 0.77778],
+ "8834": [0.0391, 0.5391, 0, 0, 0.77778],
+ "8835": [0.0391, 0.5391, 0, 0, 0.77778],
+ "8838": [0.13597, 0.63597, 0, 0, 0.77778],
+ "8839": [0.13597, 0.63597, 0, 0, 0.77778],
+ "8846": [0, 0.55556, 0, 0, 0.66667],
+ "8849": [0.13597, 0.63597, 0, 0, 0.77778],
+ "8850": [0.13597, 0.63597, 0, 0, 0.77778],
+ "8851": [0, 0.55556, 0, 0, 0.66667],
+ "8852": [0, 0.55556, 0, 0, 0.66667],
+ "8853": [0.08333, 0.58333, 0, 0, 0.77778],
+ "8854": [0.08333, 0.58333, 0, 0, 0.77778],
+ "8855": [0.08333, 0.58333, 0, 0, 0.77778],
+ "8856": [0.08333, 0.58333, 0, 0, 0.77778],
+ "8857": [0.08333, 0.58333, 0, 0, 0.77778],
+ "8866": [0, 0.69444, 0, 0, 0.61111],
+ "8867": [0, 0.69444, 0, 0, 0.61111],
+ "8868": [0, 0.69444, 0, 0, 0.77778],
+ "8869": [0, 0.69444, 0, 0, 0.77778],
+ "8872": [0.249, 0.75, 0, 0, 0.867],
+ "8900": [-0.05555, 0.44445, 0, 0, 0.5],
+ "8901": [-0.05555, 0.44445, 0, 0, 0.27778],
+ "8902": [-0.03472, 0.46528, 0, 0, 0.5],
+ "8904": [0.005, 0.505, 0, 0, 0.9],
+ "8942": [0.03, 0.903, 0, 0, 0.278],
+ "8943": [-0.19, 0.313, 0, 0, 1.172],
+ "8945": [-0.1, 0.823, 0, 0, 1.282],
+ "8968": [0.25, 0.75, 0, 0, 0.44445],
+ "8969": [0.25, 0.75, 0, 0, 0.44445],
+ "8970": [0.25, 0.75, 0, 0, 0.44445],
+ "8971": [0.25, 0.75, 0, 0, 0.44445],
+ "8994": [-0.14236, 0.35764, 0, 0, 1.0],
+ "8995": [-0.14236, 0.35764, 0, 0, 1.0],
+ "9136": [0.244, 0.744, 0, 0, 0.412],
+ "9137": [0.244, 0.745, 0, 0, 0.412],
+ "9651": [0.19444, 0.69444, 0, 0, 0.88889],
+ "9657": [-0.03472, 0.46528, 0, 0, 0.5],
+ "9661": [0.19444, 0.69444, 0, 0, 0.88889],
+ "9667": [-0.03472, 0.46528, 0, 0, 0.5],
+ "9711": [0.19444, 0.69444, 0, 0, 1.0],
+ "9824": [0.12963, 0.69444, 0, 0, 0.77778],
+ "9825": [0.12963, 0.69444, 0, 0, 0.77778],
+ "9826": [0.12963, 0.69444, 0, 0, 0.77778],
+ "9827": [0.12963, 0.69444, 0, 0, 0.77778],
+ "9837": [0, 0.75, 0, 0, 0.38889],
+ "9838": [0.19444, 0.69444, 0, 0, 0.38889],
+ "9839": [0.19444, 0.69444, 0, 0, 0.38889],
+ "10216": [0.25, 0.75, 0, 0, 0.38889],
+ "10217": [0.25, 0.75, 0, 0, 0.38889],
+ "10222": [0.244, 0.744, 0, 0, 0.412],
+ "10223": [0.244, 0.745, 0, 0, 0.412],
+ "10229": [0.011, 0.511, 0, 0, 1.609],
+ "10230": [0.011, 0.511, 0, 0, 1.638],
+ "10231": [0.011, 0.511, 0, 0, 1.859],
+ "10232": [0.024, 0.525, 0, 0, 1.609],
+ "10233": [0.024, 0.525, 0, 0, 1.638],
+ "10234": [0.024, 0.525, 0, 0, 1.858],
+ "10236": [0.011, 0.511, 0, 0, 1.638],
+ "10815": [0, 0.68333, 0, 0, 0.75],
+ "10927": [0.13597, 0.63597, 0, 0, 0.77778],
+ "10928": [0.13597, 0.63597, 0, 0, 0.77778],
+ "57376": [0.19444, 0.69444, 0, 0, 0]
+ },
+ "Math-BoldItalic": {
+ "32": [0, 0, 0, 0, 0.25],
+ "48": [0, 0.44444, 0, 0, 0.575],
+ "49": [0, 0.44444, 0, 0, 0.575],
+ "50": [0, 0.44444, 0, 0, 0.575],
+ "51": [0.19444, 0.44444, 0, 0, 0.575],
+ "52": [0.19444, 0.44444, 0, 0, 0.575],
+ "53": [0.19444, 0.44444, 0, 0, 0.575],
+ "54": [0, 0.64444, 0, 0, 0.575],
+ "55": [0.19444, 0.44444, 0, 0, 0.575],
+ "56": [0, 0.64444, 0, 0, 0.575],
+ "57": [0.19444, 0.44444, 0, 0, 0.575],
+ "65": [0, 0.68611, 0, 0, 0.86944],
+ "66": [0, 0.68611, 0.04835, 0, 0.8664],
+ "67": [0, 0.68611, 0.06979, 0, 0.81694],
+ "68": [0, 0.68611, 0.03194, 0, 0.93812],
+ "69": [0, 0.68611, 0.05451, 0, 0.81007],
+ "70": [0, 0.68611, 0.15972, 0, 0.68889],
+ "71": [0, 0.68611, 0, 0, 0.88673],
+ "72": [0, 0.68611, 0.08229, 0, 0.98229],
+ "73": [0, 0.68611, 0.07778, 0, 0.51111],
+ "74": [0, 0.68611, 0.10069, 0, 0.63125],
+ "75": [0, 0.68611, 0.06979, 0, 0.97118],
+ "76": [0, 0.68611, 0, 0, 0.75555],
+ "77": [0, 0.68611, 0.11424, 0, 1.14201],
+ "78": [0, 0.68611, 0.11424, 0, 0.95034],
+ "79": [0, 0.68611, 0.03194, 0, 0.83666],
+ "80": [0, 0.68611, 0.15972, 0, 0.72309],
+ "81": [0.19444, 0.68611, 0, 0, 0.86861],
+ "82": [0, 0.68611, 0.00421, 0, 0.87235],
+ "83": [0, 0.68611, 0.05382, 0, 0.69271],
+ "84": [0, 0.68611, 0.15972, 0, 0.63663],
+ "85": [0, 0.68611, 0.11424, 0, 0.80027],
+ "86": [0, 0.68611, 0.25555, 0, 0.67778],
+ "87": [0, 0.68611, 0.15972, 0, 1.09305],
+ "88": [0, 0.68611, 0.07778, 0, 0.94722],
+ "89": [0, 0.68611, 0.25555, 0, 0.67458],
+ "90": [0, 0.68611, 0.06979, 0, 0.77257],
+ "97": [0, 0.44444, 0, 0, 0.63287],
+ "98": [0, 0.69444, 0, 0, 0.52083],
+ "99": [0, 0.44444, 0, 0, 0.51342],
+ "100": [0, 0.69444, 0, 0, 0.60972],
+ "101": [0, 0.44444, 0, 0, 0.55361],
+ "102": [0.19444, 0.69444, 0.11042, 0, 0.56806],
+ "103": [0.19444, 0.44444, 0.03704, 0, 0.5449],
+ "104": [0, 0.69444, 0, 0, 0.66759],
+ "105": [0, 0.69326, 0, 0, 0.4048],
+ "106": [0.19444, 0.69326, 0.0622, 0, 0.47083],
+ "107": [0, 0.69444, 0.01852, 0, 0.6037],
+ "108": [0, 0.69444, 0.0088, 0, 0.34815],
+ "109": [0, 0.44444, 0, 0, 1.0324],
+ "110": [0, 0.44444, 0, 0, 0.71296],
+ "111": [0, 0.44444, 0, 0, 0.58472],
+ "112": [0.19444, 0.44444, 0, 0, 0.60092],
+ "113": [0.19444, 0.44444, 0.03704, 0, 0.54213],
+ "114": [0, 0.44444, 0.03194, 0, 0.5287],
+ "115": [0, 0.44444, 0, 0, 0.53125],
+ "116": [0, 0.63492, 0, 0, 0.41528],
+ "117": [0, 0.44444, 0, 0, 0.68102],
+ "118": [0, 0.44444, 0.03704, 0, 0.56666],
+ "119": [0, 0.44444, 0.02778, 0, 0.83148],
+ "120": [0, 0.44444, 0, 0, 0.65903],
+ "121": [0.19444, 0.44444, 0.03704, 0, 0.59028],
+ "122": [0, 0.44444, 0.04213, 0, 0.55509],
+ "160": [0, 0, 0, 0, 0.25],
+ "915": [0, 0.68611, 0.15972, 0, 0.65694],
+ "916": [0, 0.68611, 0, 0, 0.95833],
+ "920": [0, 0.68611, 0.03194, 0, 0.86722],
+ "923": [0, 0.68611, 0, 0, 0.80555],
+ "926": [0, 0.68611, 0.07458, 0, 0.84125],
+ "928": [0, 0.68611, 0.08229, 0, 0.98229],
+ "931": [0, 0.68611, 0.05451, 0, 0.88507],
+ "933": [0, 0.68611, 0.15972, 0, 0.67083],
+ "934": [0, 0.68611, 0, 0, 0.76666],
+ "936": [0, 0.68611, 0.11653, 0, 0.71402],
+ "937": [0, 0.68611, 0.04835, 0, 0.8789],
+ "945": [0, 0.44444, 0, 0, 0.76064],
+ "946": [0.19444, 0.69444, 0.03403, 0, 0.65972],
+ "947": [0.19444, 0.44444, 0.06389, 0, 0.59003],
+ "948": [0, 0.69444, 0.03819, 0, 0.52222],
+ "949": [0, 0.44444, 0, 0, 0.52882],
+ "950": [0.19444, 0.69444, 0.06215, 0, 0.50833],
+ "951": [0.19444, 0.44444, 0.03704, 0, 0.6],
+ "952": [0, 0.69444, 0.03194, 0, 0.5618],
+ "953": [0, 0.44444, 0, 0, 0.41204],
+ "954": [0, 0.44444, 0, 0, 0.66759],
+ "955": [0, 0.69444, 0, 0, 0.67083],
+ "956": [0.19444, 0.44444, 0, 0, 0.70787],
+ "957": [0, 0.44444, 0.06898, 0, 0.57685],
+ "958": [0.19444, 0.69444, 0.03021, 0, 0.50833],
+ "959": [0, 0.44444, 0, 0, 0.58472],
+ "960": [0, 0.44444, 0.03704, 0, 0.68241],
+ "961": [0.19444, 0.44444, 0, 0, 0.6118],
+ "962": [0.09722, 0.44444, 0.07917, 0, 0.42361],
+ "963": [0, 0.44444, 0.03704, 0, 0.68588],
+ "964": [0, 0.44444, 0.13472, 0, 0.52083],
+ "965": [0, 0.44444, 0.03704, 0, 0.63055],
+ "966": [0.19444, 0.44444, 0, 0, 0.74722],
+ "967": [0.19444, 0.44444, 0, 0, 0.71805],
+ "968": [0.19444, 0.69444, 0.03704, 0, 0.75833],
+ "969": [0, 0.44444, 0.03704, 0, 0.71782],
+ "977": [0, 0.69444, 0, 0, 0.69155],
+ "981": [0.19444, 0.69444, 0, 0, 0.7125],
+ "982": [0, 0.44444, 0.03194, 0, 0.975],
+ "1009": [0.19444, 0.44444, 0, 0, 0.6118],
+ "1013": [0, 0.44444, 0, 0, 0.48333],
+ "57649": [0, 0.44444, 0, 0, 0.39352],
+ "57911": [0.19444, 0.44444, 0, 0, 0.43889]
+ },
+ "Math-Italic": {
+ "32": [0, 0, 0, 0, 0.25],
+ "48": [0, 0.43056, 0, 0, 0.5],
+ "49": [0, 0.43056, 0, 0, 0.5],
+ "50": [0, 0.43056, 0, 0, 0.5],
+ "51": [0.19444, 0.43056, 0, 0, 0.5],
+ "52": [0.19444, 0.43056, 0, 0, 0.5],
+ "53": [0.19444, 0.43056, 0, 0, 0.5],
+ "54": [0, 0.64444, 0, 0, 0.5],
+ "55": [0.19444, 0.43056, 0, 0, 0.5],
+ "56": [0, 0.64444, 0, 0, 0.5],
+ "57": [0.19444, 0.43056, 0, 0, 0.5],
+ "65": [0, 0.68333, 0, 0.13889, 0.75],
+ "66": [0, 0.68333, 0.05017, 0.08334, 0.75851],
+ "67": [0, 0.68333, 0.07153, 0.08334, 0.71472],
+ "68": [0, 0.68333, 0.02778, 0.05556, 0.82792],
+ "69": [0, 0.68333, 0.05764, 0.08334, 0.7382],
+ "70": [0, 0.68333, 0.13889, 0.08334, 0.64306],
+ "71": [0, 0.68333, 0, 0.08334, 0.78625],
+ "72": [0, 0.68333, 0.08125, 0.05556, 0.83125],
+ "73": [0, 0.68333, 0.07847, 0.11111, 0.43958],
+ "74": [0, 0.68333, 0.09618, 0.16667, 0.55451],
+ "75": [0, 0.68333, 0.07153, 0.05556, 0.84931],
+ "76": [0, 0.68333, 0, 0.02778, 0.68056],
+ "77": [0, 0.68333, 0.10903, 0.08334, 0.97014],
+ "78": [0, 0.68333, 0.10903, 0.08334, 0.80347],
+ "79": [0, 0.68333, 0.02778, 0.08334, 0.76278],
+ "80": [0, 0.68333, 0.13889, 0.08334, 0.64201],
+ "81": [0.19444, 0.68333, 0, 0.08334, 0.79056],
+ "82": [0, 0.68333, 0.00773, 0.08334, 0.75929],
+ "83": [0, 0.68333, 0.05764, 0.08334, 0.6132],
+ "84": [0, 0.68333, 0.13889, 0.08334, 0.58438],
+ "85": [0, 0.68333, 0.10903, 0.02778, 0.68278],
+ "86": [0, 0.68333, 0.22222, 0, 0.58333],
+ "87": [0, 0.68333, 0.13889, 0, 0.94445],
+ "88": [0, 0.68333, 0.07847, 0.08334, 0.82847],
+ "89": [0, 0.68333, 0.22222, 0, 0.58056],
+ "90": [0, 0.68333, 0.07153, 0.08334, 0.68264],
+ "97": [0, 0.43056, 0, 0, 0.52859],
+ "98": [0, 0.69444, 0, 0, 0.42917],
+ "99": [0, 0.43056, 0, 0.05556, 0.43276],
+ "100": [0, 0.69444, 0, 0.16667, 0.52049],
+ "101": [0, 0.43056, 0, 0.05556, 0.46563],
+ "102": [0.19444, 0.69444, 0.10764, 0.16667, 0.48959],
+ "103": [0.19444, 0.43056, 0.03588, 0.02778, 0.47697],
+ "104": [0, 0.69444, 0, 0, 0.57616],
+ "105": [0, 0.65952, 0, 0, 0.34451],
+ "106": [0.19444, 0.65952, 0.05724, 0, 0.41181],
+ "107": [0, 0.69444, 0.03148, 0, 0.5206],
+ "108": [0, 0.69444, 0.01968, 0.08334, 0.29838],
+ "109": [0, 0.43056, 0, 0, 0.87801],
+ "110": [0, 0.43056, 0, 0, 0.60023],
+ "111": [0, 0.43056, 0, 0.05556, 0.48472],
+ "112": [0.19444, 0.43056, 0, 0.08334, 0.50313],
+ "113": [0.19444, 0.43056, 0.03588, 0.08334, 0.44641],
+ "114": [0, 0.43056, 0.02778, 0.05556, 0.45116],
+ "115": [0, 0.43056, 0, 0.05556, 0.46875],
+ "116": [0, 0.61508, 0, 0.08334, 0.36111],
+ "117": [0, 0.43056, 0, 0.02778, 0.57246],
+ "118": [0, 0.43056, 0.03588, 0.02778, 0.48472],
+ "119": [0, 0.43056, 0.02691, 0.08334, 0.71592],
+ "120": [0, 0.43056, 0, 0.02778, 0.57153],
+ "121": [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],
+ "122": [0, 0.43056, 0.04398, 0.05556, 0.46505],
+ "160": [0, 0, 0, 0, 0.25],
+ "915": [0, 0.68333, 0.13889, 0.08334, 0.61528],
+ "916": [0, 0.68333, 0, 0.16667, 0.83334],
+ "920": [0, 0.68333, 0.02778, 0.08334, 0.76278],
+ "923": [0, 0.68333, 0, 0.16667, 0.69445],
+ "926": [0, 0.68333, 0.07569, 0.08334, 0.74236],
+ "928": [0, 0.68333, 0.08125, 0.05556, 0.83125],
+ "931": [0, 0.68333, 0.05764, 0.08334, 0.77986],
+ "933": [0, 0.68333, 0.13889, 0.05556, 0.58333],
+ "934": [0, 0.68333, 0, 0.08334, 0.66667],
+ "936": [0, 0.68333, 0.11, 0.05556, 0.61222],
+ "937": [0, 0.68333, 0.05017, 0.08334, 0.7724],
+ "945": [0, 0.43056, 0.0037, 0.02778, 0.6397],
+ "946": [0.19444, 0.69444, 0.05278, 0.08334, 0.56563],
+ "947": [0.19444, 0.43056, 0.05556, 0, 0.51773],
+ "948": [0, 0.69444, 0.03785, 0.05556, 0.44444],
+ "949": [0, 0.43056, 0, 0.08334, 0.46632],
+ "950": [0.19444, 0.69444, 0.07378, 0.08334, 0.4375],
+ "951": [0.19444, 0.43056, 0.03588, 0.05556, 0.49653],
+ "952": [0, 0.69444, 0.02778, 0.08334, 0.46944],
+ "953": [0, 0.43056, 0, 0.05556, 0.35394],
+ "954": [0, 0.43056, 0, 0, 0.57616],
+ "955": [0, 0.69444, 0, 0, 0.58334],
+ "956": [0.19444, 0.43056, 0, 0.02778, 0.60255],
+ "957": [0, 0.43056, 0.06366, 0.02778, 0.49398],
+ "958": [0.19444, 0.69444, 0.04601, 0.11111, 0.4375],
+ "959": [0, 0.43056, 0, 0.05556, 0.48472],
+ "960": [0, 0.43056, 0.03588, 0, 0.57003],
+ "961": [0.19444, 0.43056, 0, 0.08334, 0.51702],
+ "962": [0.09722, 0.43056, 0.07986, 0.08334, 0.36285],
+ "963": [0, 0.43056, 0.03588, 0, 0.57141],
+ "964": [0, 0.43056, 0.1132, 0.02778, 0.43715],
+ "965": [0, 0.43056, 0.03588, 0.02778, 0.54028],
+ "966": [0.19444, 0.43056, 0, 0.08334, 0.65417],
+ "967": [0.19444, 0.43056, 0, 0.05556, 0.62569],
+ "968": [0.19444, 0.69444, 0.03588, 0.11111, 0.65139],
+ "969": [0, 0.43056, 0.03588, 0, 0.62245],
+ "977": [0, 0.69444, 0, 0.08334, 0.59144],
+ "981": [0.19444, 0.69444, 0, 0.08334, 0.59583],
+ "982": [0, 0.43056, 0.02778, 0, 0.82813],
+ "1009": [0.19444, 0.43056, 0, 0.08334, 0.51702],
+ "1013": [0, 0.43056, 0, 0.05556, 0.4059],
+ "57649": [0, 0.43056, 0, 0.02778, 0.32246],
+ "57911": [0.19444, 0.43056, 0, 0.08334, 0.38403]
+ },
+ "SansSerif-Bold": {
+ "32": [0, 0, 0, 0, 0.25],
+ "33": [0, 0.69444, 0, 0, 0.36667],
+ "34": [0, 0.69444, 0, 0, 0.55834],
+ "35": [0.19444, 0.69444, 0, 0, 0.91667],
+ "36": [0.05556, 0.75, 0, 0, 0.55],
+ "37": [0.05556, 0.75, 0, 0, 1.02912],
+ "38": [0, 0.69444, 0, 0, 0.83056],
+ "39": [0, 0.69444, 0, 0, 0.30556],
+ "40": [0.25, 0.75, 0, 0, 0.42778],
+ "41": [0.25, 0.75, 0, 0, 0.42778],
+ "42": [0, 0.75, 0, 0, 0.55],
+ "43": [0.11667, 0.61667, 0, 0, 0.85556],
+ "44": [0.10556, 0.13056, 0, 0, 0.30556],
+ "45": [0, 0.45833, 0, 0, 0.36667],
+ "46": [0, 0.13056, 0, 0, 0.30556],
+ "47": [0.25, 0.75, 0, 0, 0.55],
+ "48": [0, 0.69444, 0, 0, 0.55],
+ "49": [0, 0.69444, 0, 0, 0.55],
+ "50": [0, 0.69444, 0, 0, 0.55],
+ "51": [0, 0.69444, 0, 0, 0.55],
+ "52": [0, 0.69444, 0, 0, 0.55],
+ "53": [0, 0.69444, 0, 0, 0.55],
+ "54": [0, 0.69444, 0, 0, 0.55],
+ "55": [0, 0.69444, 0, 0, 0.55],
+ "56": [0, 0.69444, 0, 0, 0.55],
+ "57": [0, 0.69444, 0, 0, 0.55],
+ "58": [0, 0.45833, 0, 0, 0.30556],
+ "59": [0.10556, 0.45833, 0, 0, 0.30556],
+ "61": [-0.09375, 0.40625, 0, 0, 0.85556],
+ "63": [0, 0.69444, 0, 0, 0.51945],
+ "64": [0, 0.69444, 0, 0, 0.73334],
+ "65": [0, 0.69444, 0, 0, 0.73334],
+ "66": [0, 0.69444, 0, 0, 0.73334],
+ "67": [0, 0.69444, 0, 0, 0.70278],
+ "68": [0, 0.69444, 0, 0, 0.79445],
+ "69": [0, 0.69444, 0, 0, 0.64167],
+ "70": [0, 0.69444, 0, 0, 0.61111],
+ "71": [0, 0.69444, 0, 0, 0.73334],
+ "72": [0, 0.69444, 0, 0, 0.79445],
+ "73": [0, 0.69444, 0, 0, 0.33056],
+ "74": [0, 0.69444, 0, 0, 0.51945],
+ "75": [0, 0.69444, 0, 0, 0.76389],
+ "76": [0, 0.69444, 0, 0, 0.58056],
+ "77": [0, 0.69444, 0, 0, 0.97778],
+ "78": [0, 0.69444, 0, 0, 0.79445],
+ "79": [0, 0.69444, 0, 0, 0.79445],
+ "80": [0, 0.69444, 0, 0, 0.70278],
+ "81": [0.10556, 0.69444, 0, 0, 0.79445],
+ "82": [0, 0.69444, 0, 0, 0.70278],
+ "83": [0, 0.69444, 0, 0, 0.61111],
+ "84": [0, 0.69444, 0, 0, 0.73334],
+ "85": [0, 0.69444, 0, 0, 0.76389],
+ "86": [0, 0.69444, 0.01528, 0, 0.73334],
+ "87": [0, 0.69444, 0.01528, 0, 1.03889],
+ "88": [0, 0.69444, 0, 0, 0.73334],
+ "89": [0, 0.69444, 0.0275, 0, 0.73334],
+ "90": [0, 0.69444, 0, 0, 0.67223],
+ "91": [0.25, 0.75, 0, 0, 0.34306],
+ "93": [0.25, 0.75, 0, 0, 0.34306],
+ "94": [0, 0.69444, 0, 0, 0.55],
+ "95": [0.35, 0.10833, 0.03056, 0, 0.55],
+ "97": [0, 0.45833, 0, 0, 0.525],
+ "98": [0, 0.69444, 0, 0, 0.56111],
+ "99": [0, 0.45833, 0, 0, 0.48889],
+ "100": [0, 0.69444, 0, 0, 0.56111],
+ "101": [0, 0.45833, 0, 0, 0.51111],
+ "102": [0, 0.69444, 0.07639, 0, 0.33611],
+ "103": [0.19444, 0.45833, 0.01528, 0, 0.55],
+ "104": [0, 0.69444, 0, 0, 0.56111],
+ "105": [0, 0.69444, 0, 0, 0.25556],
+ "106": [0.19444, 0.69444, 0, 0, 0.28611],
+ "107": [0, 0.69444, 0, 0, 0.53056],
+ "108": [0, 0.69444, 0, 0, 0.25556],
+ "109": [0, 0.45833, 0, 0, 0.86667],
+ "110": [0, 0.45833, 0, 0, 0.56111],
+ "111": [0, 0.45833, 0, 0, 0.55],
+ "112": [0.19444, 0.45833, 0, 0, 0.56111],
+ "113": [0.19444, 0.45833, 0, 0, 0.56111],
+ "114": [0, 0.45833, 0.01528, 0, 0.37222],
+ "115": [0, 0.45833, 0, 0, 0.42167],
+ "116": [0, 0.58929, 0, 0, 0.40417],
+ "117": [0, 0.45833, 0, 0, 0.56111],
+ "118": [0, 0.45833, 0.01528, 0, 0.5],
+ "119": [0, 0.45833, 0.01528, 0, 0.74445],
+ "120": [0, 0.45833, 0, 0, 0.5],
+ "121": [0.19444, 0.45833, 0.01528, 0, 0.5],
+ "122": [0, 0.45833, 0, 0, 0.47639],
+ "126": [0.35, 0.34444, 0, 0, 0.55],
+ "160": [0, 0, 0, 0, 0.25],
+ "168": [0, 0.69444, 0, 0, 0.55],
+ "176": [0, 0.69444, 0, 0, 0.73334],
+ "180": [0, 0.69444, 0, 0, 0.55],
+ "184": [0.17014, 0, 0, 0, 0.48889],
+ "305": [0, 0.45833, 0, 0, 0.25556],
+ "567": [0.19444, 0.45833, 0, 0, 0.28611],
+ "710": [0, 0.69444, 0, 0, 0.55],
+ "711": [0, 0.63542, 0, 0, 0.55],
+ "713": [0, 0.63778, 0, 0, 0.55],
+ "728": [0, 0.69444, 0, 0, 0.55],
+ "729": [0, 0.69444, 0, 0, 0.30556],
+ "730": [0, 0.69444, 0, 0, 0.73334],
+ "732": [0, 0.69444, 0, 0, 0.55],
+ "733": [0, 0.69444, 0, 0, 0.55],
+ "915": [0, 0.69444, 0, 0, 0.58056],
+ "916": [0, 0.69444, 0, 0, 0.91667],
+ "920": [0, 0.69444, 0, 0, 0.85556],
+ "923": [0, 0.69444, 0, 0, 0.67223],
+ "926": [0, 0.69444, 0, 0, 0.73334],
+ "928": [0, 0.69444, 0, 0, 0.79445],
+ "931": [0, 0.69444, 0, 0, 0.79445],
+ "933": [0, 0.69444, 0, 0, 0.85556],
+ "934": [0, 0.69444, 0, 0, 0.79445],
+ "936": [0, 0.69444, 0, 0, 0.85556],
+ "937": [0, 0.69444, 0, 0, 0.79445],
+ "8211": [0, 0.45833, 0.03056, 0, 0.55],
+ "8212": [0, 0.45833, 0.03056, 0, 1.10001],
+ "8216": [0, 0.69444, 0, 0, 0.30556],
+ "8217": [0, 0.69444, 0, 0, 0.30556],
+ "8220": [0, 0.69444, 0, 0, 0.55834],
+ "8221": [0, 0.69444, 0, 0, 0.55834]
+ },
+ "SansSerif-Italic": {
+ "32": [0, 0, 0, 0, 0.25],
+ "33": [0, 0.69444, 0.05733, 0, 0.31945],
+ "34": [0, 0.69444, 0.00316, 0, 0.5],
+ "35": [0.19444, 0.69444, 0.05087, 0, 0.83334],
+ "36": [0.05556, 0.75, 0.11156, 0, 0.5],
+ "37": [0.05556, 0.75, 0.03126, 0, 0.83334],
+ "38": [0, 0.69444, 0.03058, 0, 0.75834],
+ "39": [0, 0.69444, 0.07816, 0, 0.27778],
+ "40": [0.25, 0.75, 0.13164, 0, 0.38889],
+ "41": [0.25, 0.75, 0.02536, 0, 0.38889],
+ "42": [0, 0.75, 0.11775, 0, 0.5],
+ "43": [0.08333, 0.58333, 0.02536, 0, 0.77778],
+ "44": [0.125, 0.08333, 0, 0, 0.27778],
+ "45": [0, 0.44444, 0.01946, 0, 0.33333],
+ "46": [0, 0.08333, 0, 0, 0.27778],
+ "47": [0.25, 0.75, 0.13164, 0, 0.5],
+ "48": [0, 0.65556, 0.11156, 0, 0.5],
+ "49": [0, 0.65556, 0.11156, 0, 0.5],
+ "50": [0, 0.65556, 0.11156, 0, 0.5],
+ "51": [0, 0.65556, 0.11156, 0, 0.5],
+ "52": [0, 0.65556, 0.11156, 0, 0.5],
+ "53": [0, 0.65556, 0.11156, 0, 0.5],
+ "54": [0, 0.65556, 0.11156, 0, 0.5],
+ "55": [0, 0.65556, 0.11156, 0, 0.5],
+ "56": [0, 0.65556, 0.11156, 0, 0.5],
+ "57": [0, 0.65556, 0.11156, 0, 0.5],
+ "58": [0, 0.44444, 0.02502, 0, 0.27778],
+ "59": [0.125, 0.44444, 0.02502, 0, 0.27778],
+ "61": [-0.13, 0.37, 0.05087, 0, 0.77778],
+ "63": [0, 0.69444, 0.11809, 0, 0.47222],
+ "64": [0, 0.69444, 0.07555, 0, 0.66667],
+ "65": [0, 0.69444, 0, 0, 0.66667],
+ "66": [0, 0.69444, 0.08293, 0, 0.66667],
+ "67": [0, 0.69444, 0.11983, 0, 0.63889],
+ "68": [0, 0.69444, 0.07555, 0, 0.72223],
+ "69": [0, 0.69444, 0.11983, 0, 0.59722],
+ "70": [0, 0.69444, 0.13372, 0, 0.56945],
+ "71": [0, 0.69444, 0.11983, 0, 0.66667],
+ "72": [0, 0.69444, 0.08094, 0, 0.70834],
+ "73": [0, 0.69444, 0.13372, 0, 0.27778],
+ "74": [0, 0.69444, 0.08094, 0, 0.47222],
+ "75": [0, 0.69444, 0.11983, 0, 0.69445],
+ "76": [0, 0.69444, 0, 0, 0.54167],
+ "77": [0, 0.69444, 0.08094, 0, 0.875],
+ "78": [0, 0.69444, 0.08094, 0, 0.70834],
+ "79": [0, 0.69444, 0.07555, 0, 0.73611],
+ "80": [0, 0.69444, 0.08293, 0, 0.63889],
+ "81": [0.125, 0.69444, 0.07555, 0, 0.73611],
+ "82": [0, 0.69444, 0.08293, 0, 0.64584],
+ "83": [0, 0.69444, 0.09205, 0, 0.55556],
+ "84": [0, 0.69444, 0.13372, 0, 0.68056],
+ "85": [0, 0.69444, 0.08094, 0, 0.6875],
+ "86": [0, 0.69444, 0.1615, 0, 0.66667],
+ "87": [0, 0.69444, 0.1615, 0, 0.94445],
+ "88": [0, 0.69444, 0.13372, 0, 0.66667],
+ "89": [0, 0.69444, 0.17261, 0, 0.66667],
+ "90": [0, 0.69444, 0.11983, 0, 0.61111],
+ "91": [0.25, 0.75, 0.15942, 0, 0.28889],
+ "93": [0.25, 0.75, 0.08719, 0, 0.28889],
+ "94": [0, 0.69444, 0.0799, 0, 0.5],
+ "95": [0.35, 0.09444, 0.08616, 0, 0.5],
+ "97": [0, 0.44444, 0.00981, 0, 0.48056],
+ "98": [0, 0.69444, 0.03057, 0, 0.51667],
+ "99": [0, 0.44444, 0.08336, 0, 0.44445],
+ "100": [0, 0.69444, 0.09483, 0, 0.51667],
+ "101": [0, 0.44444, 0.06778, 0, 0.44445],
+ "102": [0, 0.69444, 0.21705, 0, 0.30556],
+ "103": [0.19444, 0.44444, 0.10836, 0, 0.5],
+ "104": [0, 0.69444, 0.01778, 0, 0.51667],
+ "105": [0, 0.67937, 0.09718, 0, 0.23889],
+ "106": [0.19444, 0.67937, 0.09162, 0, 0.26667],
+ "107": [0, 0.69444, 0.08336, 0, 0.48889],
+ "108": [0, 0.69444, 0.09483, 0, 0.23889],
+ "109": [0, 0.44444, 0.01778, 0, 0.79445],
+ "110": [0, 0.44444, 0.01778, 0, 0.51667],
+ "111": [0, 0.44444, 0.06613, 0, 0.5],
+ "112": [0.19444, 0.44444, 0.0389, 0, 0.51667],
+ "113": [0.19444, 0.44444, 0.04169, 0, 0.51667],
+ "114": [0, 0.44444, 0.10836, 0, 0.34167],
+ "115": [0, 0.44444, 0.0778, 0, 0.38333],
+ "116": [0, 0.57143, 0.07225, 0, 0.36111],
+ "117": [0, 0.44444, 0.04169, 0, 0.51667],
+ "118": [0, 0.44444, 0.10836, 0, 0.46111],
+ "119": [0, 0.44444, 0.10836, 0, 0.68334],
+ "120": [0, 0.44444, 0.09169, 0, 0.46111],
+ "121": [0.19444, 0.44444, 0.10836, 0, 0.46111],
+ "122": [0, 0.44444, 0.08752, 0, 0.43472],
+ "126": [0.35, 0.32659, 0.08826, 0, 0.5],
+ "160": [0, 0, 0, 0, 0.25],
+ "168": [0, 0.67937, 0.06385, 0, 0.5],
+ "176": [0, 0.69444, 0, 0, 0.73752],
+ "184": [0.17014, 0, 0, 0, 0.44445],
+ "305": [0, 0.44444, 0.04169, 0, 0.23889],
+ "567": [0.19444, 0.44444, 0.04169, 0, 0.26667],
+ "710": [0, 0.69444, 0.0799, 0, 0.5],
+ "711": [0, 0.63194, 0.08432, 0, 0.5],
+ "713": [0, 0.60889, 0.08776, 0, 0.5],
+ "714": [0, 0.69444, 0.09205, 0, 0.5],
+ "715": [0, 0.69444, 0, 0, 0.5],
+ "728": [0, 0.69444, 0.09483, 0, 0.5],
+ "729": [0, 0.67937, 0.07774, 0, 0.27778],
+ "730": [0, 0.69444, 0, 0, 0.73752],
+ "732": [0, 0.67659, 0.08826, 0, 0.5],
+ "733": [0, 0.69444, 0.09205, 0, 0.5],
+ "915": [0, 0.69444, 0.13372, 0, 0.54167],
+ "916": [0, 0.69444, 0, 0, 0.83334],
+ "920": [0, 0.69444, 0.07555, 0, 0.77778],
+ "923": [0, 0.69444, 0, 0, 0.61111],
+ "926": [0, 0.69444, 0.12816, 0, 0.66667],
+ "928": [0, 0.69444, 0.08094, 0, 0.70834],
+ "931": [0, 0.69444, 0.11983, 0, 0.72222],
+ "933": [0, 0.69444, 0.09031, 0, 0.77778],
+ "934": [0, 0.69444, 0.04603, 0, 0.72222],
+ "936": [0, 0.69444, 0.09031, 0, 0.77778],
+ "937": [0, 0.69444, 0.08293, 0, 0.72222],
+ "8211": [0, 0.44444, 0.08616, 0, 0.5],
+ "8212": [0, 0.44444, 0.08616, 0, 1.0],
+ "8216": [0, 0.69444, 0.07816, 0, 0.27778],
+ "8217": [0, 0.69444, 0.07816, 0, 0.27778],
+ "8220": [0, 0.69444, 0.14205, 0, 0.5],
+ "8221": [0, 0.69444, 0.00316, 0, 0.5]
+ },
+ "SansSerif-Regular": {
+ "32": [0, 0, 0, 0, 0.25],
+ "33": [0, 0.69444, 0, 0, 0.31945],
+ "34": [0, 0.69444, 0, 0, 0.5],
+ "35": [0.19444, 0.69444, 0, 0, 0.83334],
+ "36": [0.05556, 0.75, 0, 0, 0.5],
+ "37": [0.05556, 0.75, 0, 0, 0.83334],
+ "38": [0, 0.69444, 0, 0, 0.75834],
+ "39": [0, 0.69444, 0, 0, 0.27778],
+ "40": [0.25, 0.75, 0, 0, 0.38889],
+ "41": [0.25, 0.75, 0, 0, 0.38889],
+ "42": [0, 0.75, 0, 0, 0.5],
+ "43": [0.08333, 0.58333, 0, 0, 0.77778],
+ "44": [0.125, 0.08333, 0, 0, 0.27778],
+ "45": [0, 0.44444, 0, 0, 0.33333],
+ "46": [0, 0.08333, 0, 0, 0.27778],
+ "47": [0.25, 0.75, 0, 0, 0.5],
+ "48": [0, 0.65556, 0, 0, 0.5],
+ "49": [0, 0.65556, 0, 0, 0.5],
+ "50": [0, 0.65556, 0, 0, 0.5],
+ "51": [0, 0.65556, 0, 0, 0.5],
+ "52": [0, 0.65556, 0, 0, 0.5],
+ "53": [0, 0.65556, 0, 0, 0.5],
+ "54": [0, 0.65556, 0, 0, 0.5],
+ "55": [0, 0.65556, 0, 0, 0.5],
+ "56": [0, 0.65556, 0, 0, 0.5],
+ "57": [0, 0.65556, 0, 0, 0.5],
+ "58": [0, 0.44444, 0, 0, 0.27778],
+ "59": [0.125, 0.44444, 0, 0, 0.27778],
+ "61": [-0.13, 0.37, 0, 0, 0.77778],
+ "63": [0, 0.69444, 0, 0, 0.47222],
+ "64": [0, 0.69444, 0, 0, 0.66667],
+ "65": [0, 0.69444, 0, 0, 0.66667],
+ "66": [0, 0.69444, 0, 0, 0.66667],
+ "67": [0, 0.69444, 0, 0, 0.63889],
+ "68": [0, 0.69444, 0, 0, 0.72223],
+ "69": [0, 0.69444, 0, 0, 0.59722],
+ "70": [0, 0.69444, 0, 0, 0.56945],
+ "71": [0, 0.69444, 0, 0, 0.66667],
+ "72": [0, 0.69444, 0, 0, 0.70834],
+ "73": [0, 0.69444, 0, 0, 0.27778],
+ "74": [0, 0.69444, 0, 0, 0.47222],
+ "75": [0, 0.69444, 0, 0, 0.69445],
+ "76": [0, 0.69444, 0, 0, 0.54167],
+ "77": [0, 0.69444, 0, 0, 0.875],
+ "78": [0, 0.69444, 0, 0, 0.70834],
+ "79": [0, 0.69444, 0, 0, 0.73611],
+ "80": [0, 0.69444, 0, 0, 0.63889],
+ "81": [0.125, 0.69444, 0, 0, 0.73611],
+ "82": [0, 0.69444, 0, 0, 0.64584],
+ "83": [0, 0.69444, 0, 0, 0.55556],
+ "84": [0, 0.69444, 0, 0, 0.68056],
+ "85": [0, 0.69444, 0, 0, 0.6875],
+ "86": [0, 0.69444, 0.01389, 0, 0.66667],
+ "87": [0, 0.69444, 0.01389, 0, 0.94445],
+ "88": [0, 0.69444, 0, 0, 0.66667],
+ "89": [0, 0.69444, 0.025, 0, 0.66667],
+ "90": [0, 0.69444, 0, 0, 0.61111],
+ "91": [0.25, 0.75, 0, 0, 0.28889],
+ "93": [0.25, 0.75, 0, 0, 0.28889],
+ "94": [0, 0.69444, 0, 0, 0.5],
+ "95": [0.35, 0.09444, 0.02778, 0, 0.5],
+ "97": [0, 0.44444, 0, 0, 0.48056],
+ "98": [0, 0.69444, 0, 0, 0.51667],
+ "99": [0, 0.44444, 0, 0, 0.44445],
+ "100": [0, 0.69444, 0, 0, 0.51667],
+ "101": [0, 0.44444, 0, 0, 0.44445],
+ "102": [0, 0.69444, 0.06944, 0, 0.30556],
+ "103": [0.19444, 0.44444, 0.01389, 0, 0.5],
+ "104": [0, 0.69444, 0, 0, 0.51667],
+ "105": [0, 0.67937, 0, 0, 0.23889],
+ "106": [0.19444, 0.67937, 0, 0, 0.26667],
+ "107": [0, 0.69444, 0, 0, 0.48889],
+ "108": [0, 0.69444, 0, 0, 0.23889],
+ "109": [0, 0.44444, 0, 0, 0.79445],
+ "110": [0, 0.44444, 0, 0, 0.51667],
+ "111": [0, 0.44444, 0, 0, 0.5],
+ "112": [0.19444, 0.44444, 0, 0, 0.51667],
+ "113": [0.19444, 0.44444, 0, 0, 0.51667],
+ "114": [0, 0.44444, 0.01389, 0, 0.34167],
+ "115": [0, 0.44444, 0, 0, 0.38333],
+ "116": [0, 0.57143, 0, 0, 0.36111],
+ "117": [0, 0.44444, 0, 0, 0.51667],
+ "118": [0, 0.44444, 0.01389, 0, 0.46111],
+ "119": [0, 0.44444, 0.01389, 0, 0.68334],
+ "120": [0, 0.44444, 0, 0, 0.46111],
+ "121": [0.19444, 0.44444, 0.01389, 0, 0.46111],
+ "122": [0, 0.44444, 0, 0, 0.43472],
+ "126": [0.35, 0.32659, 0, 0, 0.5],
+ "160": [0, 0, 0, 0, 0.25],
+ "168": [0, 0.67937, 0, 0, 0.5],
+ "176": [0, 0.69444, 0, 0, 0.66667],
+ "184": [0.17014, 0, 0, 0, 0.44445],
+ "305": [0, 0.44444, 0, 0, 0.23889],
+ "567": [0.19444, 0.44444, 0, 0, 0.26667],
+ "710": [0, 0.69444, 0, 0, 0.5],
+ "711": [0, 0.63194, 0, 0, 0.5],
+ "713": [0, 0.60889, 0, 0, 0.5],
+ "714": [0, 0.69444, 0, 0, 0.5],
+ "715": [0, 0.69444, 0, 0, 0.5],
+ "728": [0, 0.69444, 0, 0, 0.5],
+ "729": [0, 0.67937, 0, 0, 0.27778],
+ "730": [0, 0.69444, 0, 0, 0.66667],
+ "732": [0, 0.67659, 0, 0, 0.5],
+ "733": [0, 0.69444, 0, 0, 0.5],
+ "915": [0, 0.69444, 0, 0, 0.54167],
+ "916": [0, 0.69444, 0, 0, 0.83334],
+ "920": [0, 0.69444, 0, 0, 0.77778],
+ "923": [0, 0.69444, 0, 0, 0.61111],
+ "926": [0, 0.69444, 0, 0, 0.66667],
+ "928": [0, 0.69444, 0, 0, 0.70834],
+ "931": [0, 0.69444, 0, 0, 0.72222],
+ "933": [0, 0.69444, 0, 0, 0.77778],
+ "934": [0, 0.69444, 0, 0, 0.72222],
+ "936": [0, 0.69444, 0, 0, 0.77778],
+ "937": [0, 0.69444, 0, 0, 0.72222],
+ "8211": [0, 0.44444, 0.02778, 0, 0.5],
+ "8212": [0, 0.44444, 0.02778, 0, 1.0],
+ "8216": [0, 0.69444, 0, 0, 0.27778],
+ "8217": [0, 0.69444, 0, 0, 0.27778],
+ "8220": [0, 0.69444, 0, 0, 0.5],
+ "8221": [0, 0.69444, 0, 0, 0.5]
+ },
+ "Script-Regular": {
+ "32": [0, 0, 0, 0, 0.25],
+ "65": [0, 0.7, 0.22925, 0, 0.80253],
+ "66": [0, 0.7, 0.04087, 0, 0.90757],
+ "67": [0, 0.7, 0.1689, 0, 0.66619],
+ "68": [0, 0.7, 0.09371, 0, 0.77443],
+ "69": [0, 0.7, 0.18583, 0, 0.56162],
+ "70": [0, 0.7, 0.13634, 0, 0.89544],
+ "71": [0, 0.7, 0.17322, 0, 0.60961],
+ "72": [0, 0.7, 0.29694, 0, 0.96919],
+ "73": [0, 0.7, 0.19189, 0, 0.80907],
+ "74": [0.27778, 0.7, 0.19189, 0, 1.05159],
+ "75": [0, 0.7, 0.31259, 0, 0.91364],
+ "76": [0, 0.7, 0.19189, 0, 0.87373],
+ "77": [0, 0.7, 0.15981, 0, 1.08031],
+ "78": [0, 0.7, 0.3525, 0, 0.9015],
+ "79": [0, 0.7, 0.08078, 0, 0.73787],
+ "80": [0, 0.7, 0.08078, 0, 1.01262],
+ "81": [0, 0.7, 0.03305, 0, 0.88282],
+ "82": [0, 0.7, 0.06259, 0, 0.85],
+ "83": [0, 0.7, 0.19189, 0, 0.86767],
+ "84": [0, 0.7, 0.29087, 0, 0.74697],
+ "85": [0, 0.7, 0.25815, 0, 0.79996],
+ "86": [0, 0.7, 0.27523, 0, 0.62204],
+ "87": [0, 0.7, 0.27523, 0, 0.80532],
+ "88": [0, 0.7, 0.26006, 0, 0.94445],
+ "89": [0, 0.7, 0.2939, 0, 0.70961],
+ "90": [0, 0.7, 0.24037, 0, 0.8212],
+ "160": [0, 0, 0, 0, 0.25]
+ },
+ "Size1-Regular": {
+ "32": [0, 0, 0, 0, 0.25],
+ "40": [0.35001, 0.85, 0, 0, 0.45834],
+ "41": [0.35001, 0.85, 0, 0, 0.45834],
+ "47": [0.35001, 0.85, 0, 0, 0.57778],
+ "91": [0.35001, 0.85, 0, 0, 0.41667],
+ "92": [0.35001, 0.85, 0, 0, 0.57778],
+ "93": [0.35001, 0.85, 0, 0, 0.41667],
+ "123": [0.35001, 0.85, 0, 0, 0.58334],
+ "125": [0.35001, 0.85, 0, 0, 0.58334],
+ "160": [0, 0, 0, 0, 0.25],
+ "710": [0, 0.72222, 0, 0, 0.55556],
+ "732": [0, 0.72222, 0, 0, 0.55556],
+ "770": [0, 0.72222, 0, 0, 0.55556],
+ "771": [0, 0.72222, 0, 0, 0.55556],
+ "8214": [-0.00099, 0.601, 0, 0, 0.77778],
+ "8593": [1e-05, 0.6, 0, 0, 0.66667],
+ "8595": [1e-05, 0.6, 0, 0, 0.66667],
+ "8657": [1e-05, 0.6, 0, 0, 0.77778],
+ "8659": [1e-05, 0.6, 0, 0, 0.77778],
+ "8719": [0.25001, 0.75, 0, 0, 0.94445],
+ "8720": [0.25001, 0.75, 0, 0, 0.94445],
+ "8721": [0.25001, 0.75, 0, 0, 1.05556],
+ "8730": [0.35001, 0.85, 0, 0, 1.0],
+ "8739": [-0.00599, 0.606, 0, 0, 0.33333],
+ "8741": [-0.00599, 0.606, 0, 0, 0.55556],
+ "8747": [0.30612, 0.805, 0.19445, 0, 0.47222],
+ "8748": [0.306, 0.805, 0.19445, 0, 0.47222],
+ "8749": [0.306, 0.805, 0.19445, 0, 0.47222],
+ "8750": [0.30612, 0.805, 0.19445, 0, 0.47222],
+ "8896": [0.25001, 0.75, 0, 0, 0.83334],
+ "8897": [0.25001, 0.75, 0, 0, 0.83334],
+ "8898": [0.25001, 0.75, 0, 0, 0.83334],
+ "8899": [0.25001, 0.75, 0, 0, 0.83334],
+ "8968": [0.35001, 0.85, 0, 0, 0.47222],
+ "8969": [0.35001, 0.85, 0, 0, 0.47222],
+ "8970": [0.35001, 0.85, 0, 0, 0.47222],
+ "8971": [0.35001, 0.85, 0, 0, 0.47222],
+ "9168": [-0.00099, 0.601, 0, 0, 0.66667],
+ "10216": [0.35001, 0.85, 0, 0, 0.47222],
+ "10217": [0.35001, 0.85, 0, 0, 0.47222],
+ "10752": [0.25001, 0.75, 0, 0, 1.11111],
+ "10753": [0.25001, 0.75, 0, 0, 1.11111],
+ "10754": [0.25001, 0.75, 0, 0, 1.11111],
+ "10756": [0.25001, 0.75, 0, 0, 0.83334],
+ "10758": [0.25001, 0.75, 0, 0, 0.83334]
+ },
+ "Size2-Regular": {
+ "32": [0, 0, 0, 0, 0.25],
+ "40": [0.65002, 1.15, 0, 0, 0.59722],
+ "41": [0.65002, 1.15, 0, 0, 0.59722],
+ "47": [0.65002, 1.15, 0, 0, 0.81111],
+ "91": [0.65002, 1.15, 0, 0, 0.47222],
+ "92": [0.65002, 1.15, 0, 0, 0.81111],
+ "93": [0.65002, 1.15, 0, 0, 0.47222],
+ "123": [0.65002, 1.15, 0, 0, 0.66667],
+ "125": [0.65002, 1.15, 0, 0, 0.66667],
+ "160": [0, 0, 0, 0, 0.25],
+ "710": [0, 0.75, 0, 0, 1.0],
+ "732": [0, 0.75, 0, 0, 1.0],
+ "770": [0, 0.75, 0, 0, 1.0],
+ "771": [0, 0.75, 0, 0, 1.0],
+ "8719": [0.55001, 1.05, 0, 0, 1.27778],
+ "8720": [0.55001, 1.05, 0, 0, 1.27778],
+ "8721": [0.55001, 1.05, 0, 0, 1.44445],
+ "8730": [0.65002, 1.15, 0, 0, 1.0],
+ "8747": [0.86225, 1.36, 0.44445, 0, 0.55556],
+ "8748": [0.862, 1.36, 0.44445, 0, 0.55556],
+ "8749": [0.862, 1.36, 0.44445, 0, 0.55556],
+ "8750": [0.86225, 1.36, 0.44445, 0, 0.55556],
+ "8896": [0.55001, 1.05, 0, 0, 1.11111],
+ "8897": [0.55001, 1.05, 0, 0, 1.11111],
+ "8898": [0.55001, 1.05, 0, 0, 1.11111],
+ "8899": [0.55001, 1.05, 0, 0, 1.11111],
+ "8968": [0.65002, 1.15, 0, 0, 0.52778],
+ "8969": [0.65002, 1.15, 0, 0, 0.52778],
+ "8970": [0.65002, 1.15, 0, 0, 0.52778],
+ "8971": [0.65002, 1.15, 0, 0, 0.52778],
+ "10216": [0.65002, 1.15, 0, 0, 0.61111],
+ "10217": [0.65002, 1.15, 0, 0, 0.61111],
+ "10752": [0.55001, 1.05, 0, 0, 1.51112],
+ "10753": [0.55001, 1.05, 0, 0, 1.51112],
+ "10754": [0.55001, 1.05, 0, 0, 1.51112],
+ "10756": [0.55001, 1.05, 0, 0, 1.11111],
+ "10758": [0.55001, 1.05, 0, 0, 1.11111]
+ },
+ "Size3-Regular": {
+ "32": [0, 0, 0, 0, 0.25],
+ "40": [0.95003, 1.45, 0, 0, 0.73611],
+ "41": [0.95003, 1.45, 0, 0, 0.73611],
+ "47": [0.95003, 1.45, 0, 0, 1.04445],
+ "91": [0.95003, 1.45, 0, 0, 0.52778],
+ "92": [0.95003, 1.45, 0, 0, 1.04445],
+ "93": [0.95003, 1.45, 0, 0, 0.52778],
+ "123": [0.95003, 1.45, 0, 0, 0.75],
+ "125": [0.95003, 1.45, 0, 0, 0.75],
+ "160": [0, 0, 0, 0, 0.25],
+ "710": [0, 0.75, 0, 0, 1.44445],
+ "732": [0, 0.75, 0, 0, 1.44445],
+ "770": [0, 0.75, 0, 0, 1.44445],
+ "771": [0, 0.75, 0, 0, 1.44445],
+ "8730": [0.95003, 1.45, 0, 0, 1.0],
+ "8968": [0.95003, 1.45, 0, 0, 0.58334],
+ "8969": [0.95003, 1.45, 0, 0, 0.58334],
+ "8970": [0.95003, 1.45, 0, 0, 0.58334],
+ "8971": [0.95003, 1.45, 0, 0, 0.58334],
+ "10216": [0.95003, 1.45, 0, 0, 0.75],
+ "10217": [0.95003, 1.45, 0, 0, 0.75]
+ },
+ "Size4-Regular": {
+ "32": [0, 0, 0, 0, 0.25],
+ "40": [1.25003, 1.75, 0, 0, 0.79167],
+ "41": [1.25003, 1.75, 0, 0, 0.79167],
+ "47": [1.25003, 1.75, 0, 0, 1.27778],
+ "91": [1.25003, 1.75, 0, 0, 0.58334],
+ "92": [1.25003, 1.75, 0, 0, 1.27778],
+ "93": [1.25003, 1.75, 0, 0, 0.58334],
+ "123": [1.25003, 1.75, 0, 0, 0.80556],
+ "125": [1.25003, 1.75, 0, 0, 0.80556],
+ "160": [0, 0, 0, 0, 0.25],
+ "710": [0, 0.825, 0, 0, 1.8889],
+ "732": [0, 0.825, 0, 0, 1.8889],
+ "770": [0, 0.825, 0, 0, 1.8889],
+ "771": [0, 0.825, 0, 0, 1.8889],
+ "8730": [1.25003, 1.75, 0, 0, 1.0],
+ "8968": [1.25003, 1.75, 0, 0, 0.63889],
+ "8969": [1.25003, 1.75, 0, 0, 0.63889],
+ "8970": [1.25003, 1.75, 0, 0, 0.63889],
+ "8971": [1.25003, 1.75, 0, 0, 0.63889],
+ "9115": [0.64502, 1.155, 0, 0, 0.875],
+ "9116": [1e-05, 0.6, 0, 0, 0.875],
+ "9117": [0.64502, 1.155, 0, 0, 0.875],
+ "9118": [0.64502, 1.155, 0, 0, 0.875],
+ "9119": [1e-05, 0.6, 0, 0, 0.875],
+ "9120": [0.64502, 1.155, 0, 0, 0.875],
+ "9121": [0.64502, 1.155, 0, 0, 0.66667],
+ "9122": [-0.00099, 0.601, 0, 0, 0.66667],
+ "9123": [0.64502, 1.155, 0, 0, 0.66667],
+ "9124": [0.64502, 1.155, 0, 0, 0.66667],
+ "9125": [-0.00099, 0.601, 0, 0, 0.66667],
+ "9126": [0.64502, 1.155, 0, 0, 0.66667],
+ "9127": [1e-05, 0.9, 0, 0, 0.88889],
+ "9128": [0.65002, 1.15, 0, 0, 0.88889],
+ "9129": [0.90001, 0, 0, 0, 0.88889],
+ "9130": [0, 0.3, 0, 0, 0.88889],
+ "9131": [1e-05, 0.9, 0, 0, 0.88889],
+ "9132": [0.65002, 1.15, 0, 0, 0.88889],
+ "9133": [0.90001, 0, 0, 0, 0.88889],
+ "9143": [0.88502, 0.915, 0, 0, 1.05556],
+ "10216": [1.25003, 1.75, 0, 0, 0.80556],
+ "10217": [1.25003, 1.75, 0, 0, 0.80556],
+ "57344": [-0.00499, 0.605, 0, 0, 1.05556],
+ "57345": [-0.00499, 0.605, 0, 0, 1.05556],
+ "57680": [0, 0.12, 0, 0, 0.45],
+ "57681": [0, 0.12, 0, 0, 0.45],
+ "57682": [0, 0.12, 0, 0, 0.45],
+ "57683": [0, 0.12, 0, 0, 0.45]
+ },
+ "Typewriter-Regular": {
+ "32": [0, 0, 0, 0, 0.525],
+ "33": [0, 0.61111, 0, 0, 0.525],
+ "34": [0, 0.61111, 0, 0, 0.525],
+ "35": [0, 0.61111, 0, 0, 0.525],
+ "36": [0.08333, 0.69444, 0, 0, 0.525],
+ "37": [0.08333, 0.69444, 0, 0, 0.525],
+ "38": [0, 0.61111, 0, 0, 0.525],
+ "39": [0, 0.61111, 0, 0, 0.525],
+ "40": [0.08333, 0.69444, 0, 0, 0.525],
+ "41": [0.08333, 0.69444, 0, 0, 0.525],
+ "42": [0, 0.52083, 0, 0, 0.525],
+ "43": [-0.08056, 0.53055, 0, 0, 0.525],
+ "44": [0.13889, 0.125, 0, 0, 0.525],
+ "45": [-0.08056, 0.53055, 0, 0, 0.525],
+ "46": [0, 0.125, 0, 0, 0.525],
+ "47": [0.08333, 0.69444, 0, 0, 0.525],
+ "48": [0, 0.61111, 0, 0, 0.525],
+ "49": [0, 0.61111, 0, 0, 0.525],
+ "50": [0, 0.61111, 0, 0, 0.525],
+ "51": [0, 0.61111, 0, 0, 0.525],
+ "52": [0, 0.61111, 0, 0, 0.525],
+ "53": [0, 0.61111, 0, 0, 0.525],
+ "54": [0, 0.61111, 0, 0, 0.525],
+ "55": [0, 0.61111, 0, 0, 0.525],
+ "56": [0, 0.61111, 0, 0, 0.525],
+ "57": [0, 0.61111, 0, 0, 0.525],
+ "58": [0, 0.43056, 0, 0, 0.525],
+ "59": [0.13889, 0.43056, 0, 0, 0.525],
+ "60": [-0.05556, 0.55556, 0, 0, 0.525],
+ "61": [-0.19549, 0.41562, 0, 0, 0.525],
+ "62": [-0.05556, 0.55556, 0, 0, 0.525],
+ "63": [0, 0.61111, 0, 0, 0.525],
+ "64": [0, 0.61111, 0, 0, 0.525],
+ "65": [0, 0.61111, 0, 0, 0.525],
+ "66": [0, 0.61111, 0, 0, 0.525],
+ "67": [0, 0.61111, 0, 0, 0.525],
+ "68": [0, 0.61111, 0, 0, 0.525],
+ "69": [0, 0.61111, 0, 0, 0.525],
+ "70": [0, 0.61111, 0, 0, 0.525],
+ "71": [0, 0.61111, 0, 0, 0.525],
+ "72": [0, 0.61111, 0, 0, 0.525],
+ "73": [0, 0.61111, 0, 0, 0.525],
+ "74": [0, 0.61111, 0, 0, 0.525],
+ "75": [0, 0.61111, 0, 0, 0.525],
+ "76": [0, 0.61111, 0, 0, 0.525],
+ "77": [0, 0.61111, 0, 0, 0.525],
+ "78": [0, 0.61111, 0, 0, 0.525],
+ "79": [0, 0.61111, 0, 0, 0.525],
+ "80": [0, 0.61111, 0, 0, 0.525],
+ "81": [0.13889, 0.61111, 0, 0, 0.525],
+ "82": [0, 0.61111, 0, 0, 0.525],
+ "83": [0, 0.61111, 0, 0, 0.525],
+ "84": [0, 0.61111, 0, 0, 0.525],
+ "85": [0, 0.61111, 0, 0, 0.525],
+ "86": [0, 0.61111, 0, 0, 0.525],
+ "87": [0, 0.61111, 0, 0, 0.525],
+ "88": [0, 0.61111, 0, 0, 0.525],
+ "89": [0, 0.61111, 0, 0, 0.525],
+ "90": [0, 0.61111, 0, 0, 0.525],
+ "91": [0.08333, 0.69444, 0, 0, 0.525],
+ "92": [0.08333, 0.69444, 0, 0, 0.525],
+ "93": [0.08333, 0.69444, 0, 0, 0.525],
+ "94": [0, 0.61111, 0, 0, 0.525],
+ "95": [0.09514, 0, 0, 0, 0.525],
+ "96": [0, 0.61111, 0, 0, 0.525],
+ "97": [0, 0.43056, 0, 0, 0.525],
+ "98": [0, 0.61111, 0, 0, 0.525],
+ "99": [0, 0.43056, 0, 0, 0.525],
+ "100": [0, 0.61111, 0, 0, 0.525],
+ "101": [0, 0.43056, 0, 0, 0.525],
+ "102": [0, 0.61111, 0, 0, 0.525],
+ "103": [0.22222, 0.43056, 0, 0, 0.525],
+ "104": [0, 0.61111, 0, 0, 0.525],
+ "105": [0, 0.61111, 0, 0, 0.525],
+ "106": [0.22222, 0.61111, 0, 0, 0.525],
+ "107": [0, 0.61111, 0, 0, 0.525],
+ "108": [0, 0.61111, 0, 0, 0.525],
+ "109": [0, 0.43056, 0, 0, 0.525],
+ "110": [0, 0.43056, 0, 0, 0.525],
+ "111": [0, 0.43056, 0, 0, 0.525],
+ "112": [0.22222, 0.43056, 0, 0, 0.525],
+ "113": [0.22222, 0.43056, 0, 0, 0.525],
+ "114": [0, 0.43056, 0, 0, 0.525],
+ "115": [0, 0.43056, 0, 0, 0.525],
+ "116": [0, 0.55358, 0, 0, 0.525],
+ "117": [0, 0.43056, 0, 0, 0.525],
+ "118": [0, 0.43056, 0, 0, 0.525],
+ "119": [0, 0.43056, 0, 0, 0.525],
+ "120": [0, 0.43056, 0, 0, 0.525],
+ "121": [0.22222, 0.43056, 0, 0, 0.525],
+ "122": [0, 0.43056, 0, 0, 0.525],
+ "123": [0.08333, 0.69444, 0, 0, 0.525],
+ "124": [0.08333, 0.69444, 0, 0, 0.525],
+ "125": [0.08333, 0.69444, 0, 0, 0.525],
+ "126": [0, 0.61111, 0, 0, 0.525],
+ "127": [0, 0.61111, 0, 0, 0.525],
+ "160": [0, 0, 0, 0, 0.525],
+ "176": [0, 0.61111, 0, 0, 0.525],
+ "184": [0.19445, 0, 0, 0, 0.525],
+ "305": [0, 0.43056, 0, 0, 0.525],
+ "567": [0.22222, 0.43056, 0, 0, 0.525],
+ "711": [0, 0.56597, 0, 0, 0.525],
+ "713": [0, 0.56555, 0, 0, 0.525],
+ "714": [0, 0.61111, 0, 0, 0.525],
+ "715": [0, 0.61111, 0, 0, 0.525],
+ "728": [0, 0.61111, 0, 0, 0.525],
+ "730": [0, 0.61111, 0, 0, 0.525],
+ "770": [0, 0.61111, 0, 0, 0.525],
+ "771": [0, 0.61111, 0, 0, 0.525],
+ "776": [0, 0.61111, 0, 0, 0.525],
+ "915": [0, 0.61111, 0, 0, 0.525],
+ "916": [0, 0.61111, 0, 0, 0.525],
+ "920": [0, 0.61111, 0, 0, 0.525],
+ "923": [0, 0.61111, 0, 0, 0.525],
+ "926": [0, 0.61111, 0, 0, 0.525],
+ "928": [0, 0.61111, 0, 0, 0.525],
+ "931": [0, 0.61111, 0, 0, 0.525],
+ "933": [0, 0.61111, 0, 0, 0.525],
+ "934": [0, 0.61111, 0, 0, 0.525],
+ "936": [0, 0.61111, 0, 0, 0.525],
+ "937": [0, 0.61111, 0, 0, 0.525],
+ "8216": [0, 0.61111, 0, 0, 0.525],
+ "8217": [0, 0.61111, 0, 0, 0.525],
+ "8242": [0, 0.61111, 0, 0, 0.525],
+ "9251": [0.11111, 0.21944, 0, 0, 0.525]
+ }
+};
+
+/**
+ * This file contains metrics regarding fonts and individual symbols. The sigma
+ * and xi variables, as well as the metricMap map contain data extracted from
+ * TeX, TeX font metrics, and the TTF files. These data are then exposed via the
+ * `metrics` variable and the getCharacterMetrics function.
+ */
+// In TeX, there are actually three sets of dimensions, one for each of
+// textstyle (size index 5 and higher: >=9pt), scriptstyle (size index 3 and 4:
+// 7-8pt), and scriptscriptstyle (size index 1 and 2: 5-6pt). These are
+// provided in the arrays below, in that order.
+//
+// The font metrics are stored in fonts cmsy10, cmsy7, and cmsy5 respectively.
+// This was determined by running the following script:
+//
+// latex -interaction=nonstopmode \
+// '\documentclass{article}\usepackage{amsmath}\begin{document}' \
+// '$a$ \expandafter\show\the\textfont2' \
+// '\expandafter\show\the\scriptfont2' \
+// '\expandafter\show\the\scriptscriptfont2' \
+// '\stop'
+//
+// The metrics themselves were retrieved using the following commands:
+//
+// tftopl cmsy10
+// tftopl cmsy7
+// tftopl cmsy5
+//
+// The output of each of these commands is quite lengthy. The only part we
+// care about is the FONTDIMEN section. Each value is measured in EMs.
+var sigmasAndXis = {
+ slant: [0.250, 0.250, 0.250],
+ // sigma1
+ space: [0.000, 0.000, 0.000],
+ // sigma2
+ stretch: [0.000, 0.000, 0.000],
+ // sigma3
+ shrink: [0.000, 0.000, 0.000],
+ // sigma4
+ xHeight: [0.431, 0.431, 0.431],
+ // sigma5
+ quad: [1.000, 1.171, 1.472],
+ // sigma6
+ extraSpace: [0.000, 0.000, 0.000],
+ // sigma7
+ num1: [0.677, 0.732, 0.925],
+ // sigma8
+ num2: [0.394, 0.384, 0.387],
+ // sigma9
+ num3: [0.444, 0.471, 0.504],
+ // sigma10
+ denom1: [0.686, 0.752, 1.025],
+ // sigma11
+ denom2: [0.345, 0.344, 0.532],
+ // sigma12
+ sup1: [0.413, 0.503, 0.504],
+ // sigma13
+ sup2: [0.363, 0.431, 0.404],
+ // sigma14
+ sup3: [0.289, 0.286, 0.294],
+ // sigma15
+ sub1: [0.150, 0.143, 0.200],
+ // sigma16
+ sub2: [0.247, 0.286, 0.400],
+ // sigma17
+ supDrop: [0.386, 0.353, 0.494],
+ // sigma18
+ subDrop: [0.050, 0.071, 0.100],
+ // sigma19
+ delim1: [2.390, 1.700, 1.980],
+ // sigma20
+ delim2: [1.010, 1.157, 1.420],
+ // sigma21
+ axisHeight: [0.250, 0.250, 0.250],
+ // sigma22
+ // These font metrics are extracted from TeX by using tftopl on cmex10.tfm;
+ // they correspond to the font parameters of the extension fonts (family 3).
+ // See the TeXbook, page 441. In AMSTeX, the extension fonts scale; to
+ // match cmex7, we'd use cmex7.tfm values for script and scriptscript
+ // values.
+ defaultRuleThickness: [0.04, 0.049, 0.049],
+ // xi8; cmex7: 0.049
+ bigOpSpacing1: [0.111, 0.111, 0.111],
+ // xi9
+ bigOpSpacing2: [0.166, 0.166, 0.166],
+ // xi10
+ bigOpSpacing3: [0.2, 0.2, 0.2],
+ // xi11
+ bigOpSpacing4: [0.6, 0.611, 0.611],
+ // xi12; cmex7: 0.611
+ bigOpSpacing5: [0.1, 0.143, 0.143],
+ // xi13; cmex7: 0.143
+ // The \sqrt rule width is taken from the height of the surd character.
+ // Since we use the same font at all sizes, this thickness doesn't scale.
+ sqrtRuleThickness: [0.04, 0.04, 0.04],
+ // This value determines how large a pt is, for metrics which are defined
+ // in terms of pts.
+ // This value is also used in katex.scss; if you change it make sure the
+ // values match.
+ ptPerEm: [10.0, 10.0, 10.0],
+ // The space between adjacent `|` columns in an array definition. From
+ // `\showthe\doublerulesep` in LaTeX. Equals 2.0 / ptPerEm.
+ doubleRuleSep: [0.2, 0.2, 0.2],
+ // The width of separator lines in {array} environments. From
+ // `\showthe\arrayrulewidth` in LaTeX. Equals 0.4 / ptPerEm.
+ arrayRuleWidth: [0.04, 0.04, 0.04],
+ // Two values from LaTeX source2e:
+ fboxsep: [0.3, 0.3, 0.3],
+ // 3 pt / ptPerEm
+ fboxrule: [0.04, 0.04, 0.04] // 0.4 pt / ptPerEm
+
+}; // This map contains a mapping from font name and character code to character
+// should have Latin-1 and Cyrillic characters, but may not depending on the
+// operating system. The metrics do not account for extra height from the
+// accents. In the case of Cyrillic characters which have both ascenders and
+// descenders we prefer approximations with ascenders, primarily to prevent
+// the fraction bar or root line from intersecting the glyph.
+// TODO(kevinb) allow union of multiple glyph metrics for better accuracy.
+
+var extraCharacterMap = {
+ // Latin-1
+ 'Å': 'A',
+ 'Ð': 'D',
+ 'Þ': 'o',
+ 'å': 'a',
+ 'ð': 'd',
+ 'þ': 'o',
+ // Cyrillic
+ 'А': 'A',
+ 'Б': 'B',
+ 'В': 'B',
+ 'Г': 'F',
+ 'Д': 'A',
+ 'Е': 'E',
+ 'Ж': 'K',
+ 'З': '3',
+ 'И': 'N',
+ 'Й': 'N',
+ 'К': 'K',
+ 'Л': 'N',
+ 'М': 'M',
+ 'Н': 'H',
+ 'О': 'O',
+ 'П': 'N',
+ 'Р': 'P',
+ 'С': 'C',
+ 'Т': 'T',
+ 'У': 'y',
+ 'Ф': 'O',
+ 'Х': 'X',
+ 'Ц': 'U',
+ 'Ч': 'h',
+ 'Ш': 'W',
+ 'Щ': 'W',
+ 'Ъ': 'B',
+ 'Ы': 'X',
+ 'Ь': 'B',
+ 'Э': '3',
+ 'Ю': 'X',
+ 'Я': 'R',
+ 'а': 'a',
+ 'б': 'b',
+ 'в': 'a',
+ 'г': 'r',
+ 'д': 'y',
+ 'е': 'e',
+ 'ж': 'm',
+ 'з': 'e',
+ 'и': 'n',
+ 'й': 'n',
+ 'к': 'n',
+ 'л': 'n',
+ 'м': 'm',
+ 'н': 'n',
+ 'о': 'o',
+ 'п': 'n',
+ 'р': 'p',
+ 'с': 'c',
+ 'т': 'o',
+ 'у': 'y',
+ 'ф': 'b',
+ 'х': 'x',
+ 'ц': 'n',
+ 'ч': 'n',
+ 'ш': 'w',
+ 'щ': 'w',
+ 'ъ': 'a',
+ 'ы': 'm',
+ 'ь': 'a',
+ 'э': 'e',
+ 'ю': 'm',
+ 'я': 'r'
+};
+
+/**
+ * This function adds new font metrics to default metricMap
+ * It can also override existing metrics
+ */
+function setFontMetrics(fontName, metrics) {
+ fontMetricsData[fontName] = metrics;
+}
+/**
+ * This function is a convenience function for looking up information in the
+ * metricMap table. It takes a character as a string, and a font.
+ *
+ * Note: the `width` property may be undefined if fontMetricsData.js wasn't
+ * built using `Make extended_metrics`.
+ */
+
+function getCharacterMetrics(character, font, mode) {
+ if (!fontMetricsData[font]) {
+ throw new Error("Font metrics not found for font: " + font + ".");
+ }
+
+ var ch = character.charCodeAt(0);
+ var metrics = fontMetricsData[font][ch];
+
+ if (!metrics && character[0] in extraCharacterMap) {
+ ch = extraCharacterMap[character[0]].charCodeAt(0);
+ metrics = fontMetricsData[font][ch];
+ }
+
+ if (!metrics && mode === 'text') {
+ // We don't typically have font metrics for Asian scripts.
+ // But since we support them in text mode, we need to return
+ // some sort of metrics.
+ // So if the character is in a script we support but we
+ // don't have metrics for it, just use the metrics for
+ // the Latin capital letter M. This is close enough because
+ // we (currently) only care about the height of the glyph
+ // not its width.
+ if (supportedCodepoint(ch)) {
+ metrics = fontMetricsData[font][77]; // 77 is the charcode for 'M'
+ }
+ }
+
+ if (metrics) {
+ return {
+ depth: metrics[0],
+ height: metrics[1],
+ italic: metrics[2],
+ skew: metrics[3],
+ width: metrics[4]
+ };
+ }
+}
+var fontMetricsBySizeIndex = {};
+/**
+ * Get the font metrics for a given size.
+ */
+
+function getGlobalMetrics(size) {
+ var sizeIndex;
+
+ if (size >= 5) {
+ sizeIndex = 0;
+ } else if (size >= 3) {
+ sizeIndex = 1;
+ } else {
+ sizeIndex = 2;
+ }
+
+ if (!fontMetricsBySizeIndex[sizeIndex]) {
+ var metrics = fontMetricsBySizeIndex[sizeIndex] = {
+ cssEmPerMu: sigmasAndXis.quad[sizeIndex] / 18
+ };
+
+ for (var key in sigmasAndXis) {
+ if (sigmasAndXis.hasOwnProperty(key)) {
+ metrics[key] = sigmasAndXis[key][sizeIndex];
+ }
+ }
+ }
+
+ return fontMetricsBySizeIndex[sizeIndex];
+}
+
+/**
+ * This file contains information about the options that the Parser carries
+ * around with it while parsing. Data is held in an `Options` object, and when
+ * recursing, a new `Options` object can be created with the `.with*` and
+ * `.reset` functions.
+ */
+var sizeStyleMap = [// Each element contains [textsize, scriptsize, scriptscriptsize].
+// The size mappings are taken from TeX with \normalsize=10pt.
+[1, 1, 1], // size1: [5, 5, 5] \tiny
+[2, 1, 1], // size2: [6, 5, 5]
+[3, 1, 1], // size3: [7, 5, 5] \scriptsize
+[4, 2, 1], // size4: [8, 6, 5] \footnotesize
+[5, 2, 1], // size5: [9, 6, 5] \small
+[6, 3, 1], // size6: [10, 7, 5] \normalsize
+[7, 4, 2], // size7: [12, 8, 6] \large
+[8, 6, 3], // size8: [14.4, 10, 7] \Large
+[9, 7, 6], // size9: [17.28, 12, 10] \LARGE
+[10, 8, 7], // size10: [20.74, 14.4, 12] \huge
+[11, 10, 9] // size11: [24.88, 20.74, 17.28] \HUGE
+];
+var sizeMultipliers = [// fontMetrics.js:getGlobalMetrics also uses size indexes, so if
+// you change size indexes, change that function.
+0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.2, 1.44, 1.728, 2.074, 2.488];
+
+var sizeAtStyle = function sizeAtStyle(size, style) {
+ return style.size < 2 ? size : sizeStyleMap[size - 1][style.size - 1];
+}; // In these types, "" (empty string) means "no change".
+
+
+/**
+ * This is the main options class. It contains the current style, size, color,
+ * and font.
+ *
+ * Options objects should not be modified. To create a new Options with
+ * different properties, call a `.having*` method.
+ */
+class Options {
+ // A font family applies to a group of fonts (i.e. SansSerif), while a font
+ // represents a specific font (i.e. SansSerif Bold).
+ // See: https://tex.stackexchange.com/questions/22350/difference-between-textrm-and-mathrm
+
+ /**
+ * The base size index.
+ */
+ constructor(data) {
+ this.style = void 0;
+ this.color = void 0;
+ this.size = void 0;
+ this.textSize = void 0;
+ this.phantom = void 0;
+ this.font = void 0;
+ this.fontFamily = void 0;
+ this.fontWeight = void 0;
+ this.fontShape = void 0;
+ this.sizeMultiplier = void 0;
+ this.maxSize = void 0;
+ this.minRuleThickness = void 0;
+ this._fontMetrics = void 0;
+ this.style = data.style;
+ this.color = data.color;
+ this.size = data.size || Options.BASESIZE;
+ this.textSize = data.textSize || this.size;
+ this.phantom = !!data.phantom;
+ this.font = data.font || "";
+ this.fontFamily = data.fontFamily || "";
+ this.fontWeight = data.fontWeight || '';
+ this.fontShape = data.fontShape || '';
+ this.sizeMultiplier = sizeMultipliers[this.size - 1];
+ this.maxSize = data.maxSize;
+ this.minRuleThickness = data.minRuleThickness;
+ this._fontMetrics = undefined;
+ }
+ /**
+ * Returns a new options object with the same properties as "this". Properties
+ * from "extension" will be copied to the new options object.
+ */
+
+
+ extend(extension) {
+ var data = {
+ style: this.style,
+ size: this.size,
+ textSize: this.textSize,
+ color: this.color,
+ phantom: this.phantom,
+ font: this.font,
+ fontFamily: this.fontFamily,
+ fontWeight: this.fontWeight,
+ fontShape: this.fontShape,
+ maxSize: this.maxSize,
+ minRuleThickness: this.minRuleThickness
+ };
+
+ for (var key in extension) {
+ if (extension.hasOwnProperty(key)) {
+ data[key] = extension[key];
+ }
+ }
+
+ return new Options(data);
+ }
+ /**
+ * Return an options object with the given style. If `this.style === style`,
+ * returns `this`.
+ */
+
+
+ havingStyle(style) {
+ if (this.style === style) {
+ return this;
+ } else {
+ return this.extend({
+ style: style,
+ size: sizeAtStyle(this.textSize, style)
+ });
+ }
+ }
+ /**
+ * Return an options object with a cramped version of the current style. If
+ * the current style is cramped, returns `this`.
+ */
+
+
+ havingCrampedStyle() {
+ return this.havingStyle(this.style.cramp());
+ }
+ /**
+ * Return an options object with the given size and in at least `\textstyle`.
+ * Returns `this` if appropriate.
+ */
+
+
+ havingSize(size) {
+ if (this.size === size && this.textSize === size) {
+ return this;
+ } else {
+ return this.extend({
+ style: this.style.text(),
+ size: size,
+ textSize: size,
+ sizeMultiplier: sizeMultipliers[size - 1]
+ });
+ }
+ }
+ /**
+ * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted,
+ * changes to at least `\textstyle`.
+ */
+
+
+ havingBaseStyle(style) {
+ style = style || this.style.text();
+ var wantSize = sizeAtStyle(Options.BASESIZE, style);
+
+ if (this.size === wantSize && this.textSize === Options.BASESIZE && this.style === style) {
+ return this;
+ } else {
+ return this.extend({
+ style: style,
+ size: wantSize
+ });
+ }
+ }
+ /**
+ * Remove the effect of sizing changes such as \Huge.
+ * Keep the effect of the current style, such as \scriptstyle.
+ */
+
+
+ havingBaseSizing() {
+ var size;
+
+ switch (this.style.id) {
+ case 4:
+ case 5:
+ size = 3; // normalsize in scriptstyle
+
+ break;
+
+ case 6:
+ case 7:
+ size = 1; // normalsize in scriptscriptstyle
+
+ break;
+
+ default:
+ size = 6;
+ // normalsize in textstyle or displaystyle
+ }
+
+ return this.extend({
+ style: this.style.text(),
+ size: size
+ });
+ }
+ /**
+ * Create a new options object with the given color.
+ */
+
+
+ withColor(color) {
+ return this.extend({
+ color: color
+ });
+ }
+ /**
+ * Create a new options object with "phantom" set to true.
+ */
+
+
+ withPhantom() {
+ return this.extend({
+ phantom: true
+ });
+ }
+ /**
+ * Creates a new options object with the given math font or old text font.
+ * @type {[type]}
+ */
+
+
+ withFont(font) {
+ return this.extend({
+ font
+ });
+ }
+ /**
+ * Create a new options objects with the given fontFamily.
+ */
+
+
+ withTextFontFamily(fontFamily) {
+ return this.extend({
+ fontFamily,
+ font: ""
+ });
+ }
+ /**
+ * Creates a new options object with the given font weight
+ */
+
+
+ withTextFontWeight(fontWeight) {
+ return this.extend({
+ fontWeight,
+ font: ""
+ });
+ }
+ /**
+ * Creates a new options object with the given font weight
+ */
+
+
+ withTextFontShape(fontShape) {
+ return this.extend({
+ fontShape,
+ font: ""
+ });
+ }
+ /**
+ * Return the CSS sizing classes required to switch from enclosing options
+ * `oldOptions` to `this`. Returns an array of classes.
+ */
+
+
+ sizingClasses(oldOptions) {
+ if (oldOptions.size !== this.size) {
+ return ["sizing", "reset-size" + oldOptions.size, "size" + this.size];
+ } else {
+ return [];
+ }
+ }
+ /**
+ * Return the CSS sizing classes required to switch to the base size. Like
+ * `this.havingSize(BASESIZE).sizingClasses(this)`.
+ */
+
+
+ baseSizingClasses() {
+ if (this.size !== Options.BASESIZE) {
+ return ["sizing", "reset-size" + this.size, "size" + Options.BASESIZE];
+ } else {
+ return [];
+ }
+ }
+ /**
+ * Return the font metrics for this size.
+ */
+
+
+ fontMetrics() {
+ if (!this._fontMetrics) {
+ this._fontMetrics = getGlobalMetrics(this.size);
+ }
+
+ return this._fontMetrics;
+ }
+ /**
+ * Gets the CSS color of the current options object
+ */
+
+
+ getColor() {
+ if (this.phantom) {
+ return "transparent";
+ } else {
+ return this.color;
+ }
+ }
+
+}
+
+Options.BASESIZE = 6;
+
+/**
+ * This file does conversion between units. In particular, it provides
+ * calculateSize to convert other units into ems.
+ */
+// Thus, multiplying a length by this number converts the length from units
+// into pts. Dividing the result by ptPerEm gives the number of ems
+// *assuming* a font size of ptPerEm (normal size, normal style).
+
+var ptPerUnit = {
+ // https://en.wikibooks.org/wiki/LaTeX/Lengths and
+ // https://tex.stackexchange.com/a/8263
+ "pt": 1,
+ // TeX point
+ "mm": 7227 / 2540,
+ // millimeter
+ "cm": 7227 / 254,
+ // centimeter
+ "in": 72.27,
+ // inch
+ "bp": 803 / 800,
+ // big (PostScript) points
+ "pc": 12,
+ // pica
+ "dd": 1238 / 1157,
+ // didot
+ "cc": 14856 / 1157,
+ // cicero (12 didot)
+ "nd": 685 / 642,
+ // new didot
+ "nc": 1370 / 107,
+ // new cicero (12 new didot)
+ "sp": 1 / 65536,
+ // scaled point (TeX's internal smallest unit)
+ // https://tex.stackexchange.com/a/41371
+ "px": 803 / 800 // \pdfpxdimen defaults to 1 bp in pdfTeX and LuaTeX
+
+}; // Dictionary of relative units, for fast validity testing.
+
+var relativeUnit = {
+ "ex": true,
+ "em": true,
+ "mu": true
+};
+
+/**
+ * Determine whether the specified unit (either a string defining the unit
+ * or a "size" parse node containing a unit field) is valid.
+ */
+var validUnit = function validUnit(unit) {
+ if (typeof unit !== "string") {
+ unit = unit.unit;
+ }
+
+ return unit in ptPerUnit || unit in relativeUnit || unit === "ex";
+};
+/*
+ * Convert a "size" parse node (with numeric "number" and string "unit" fields,
+ * as parsed by functions.js argType "size") into a CSS em value for the
+ * current style/scale. `options` gives the current options.
+ */
+
+var calculateSize = function calculateSize(sizeValue, options) {
+ var scale;
+
+ if (sizeValue.unit in ptPerUnit) {
+ // Absolute units
+ scale = ptPerUnit[sizeValue.unit] // Convert unit to pt
+ / options.fontMetrics().ptPerEm // Convert pt to CSS em
+ / options.sizeMultiplier; // Unscale to make absolute units
+ } else if (sizeValue.unit === "mu") {
+ // `mu` units scale with scriptstyle/scriptscriptstyle.
+ scale = options.fontMetrics().cssEmPerMu;
+ } else {
+ // Other relative units always refer to the *textstyle* font
+ // in the current size.
+ var unitOptions;
+
+ if (options.style.isTight()) {
+ // isTight() means current style is script/scriptscript.
+ unitOptions = options.havingStyle(options.style.text());
+ } else {
+ unitOptions = options;
+ } // TODO: In TeX these units are relative to the quad of the current
+ // *text* font, e.g. cmr10. KaTeX instead uses values from the
+ // comparably-sized *Computer Modern symbol* font. At 10pt, these
+ // match. At 7pt and 5pt, they differ: cmr7=1.138894, cmsy7=1.170641;
+ // cmr5=1.361133, cmsy5=1.472241. Consider $\scriptsize a\kern1emb$.
+ // TeX \showlists shows a kern of 1.13889 * fontsize;
+ // KaTeX shows a kern of 1.171 * fontsize.
+
+
+ if (sizeValue.unit === "ex") {
+ scale = unitOptions.fontMetrics().xHeight;
+ } else if (sizeValue.unit === "em") {
+ scale = unitOptions.fontMetrics().quad;
+ } else {
+ throw new ParseError("Invalid unit: '" + sizeValue.unit + "'");
+ }
+
+ if (unitOptions !== options) {
+ scale *= unitOptions.sizeMultiplier / options.sizeMultiplier;
+ }
+ }
+
+ return Math.min(sizeValue.number * scale, options.maxSize);
+};
+/**
+ * Round `n` to 4 decimal places, or to the nearest 1/10,000th em. See
+ * https://github.com/KaTeX/KaTeX/pull/2460.
+ */
+
+var makeEm = function makeEm(n) {
+ return +n.toFixed(4) + "em";
+};
+
+/**
+ * These objects store the data about the DOM nodes we create, as well as some
+ * extra data. They can then be transformed into real DOM nodes with the
+ * `toNode` function or HTML markup using `toMarkup`. They are useful for both
+ * storing extra properties on the nodes, as well as providing a way to easily
+ * work with the DOM.
+ *
+ * Similar functions for working with MathML nodes exist in mathMLTree.js.
+ *
+ * TODO: refactor `span` and `anchor` into common superclass when
+ * target environments support class inheritance
+ */
+
+/**
+ * Create an HTML className based on a list of classes. In addition to joining
+ * with spaces, we also remove empty classes.
+ */
+var createClass = function createClass(classes) {
+ return classes.filter(cls => cls).join(" ");
+};
+
+var initNode = function initNode(classes, options, style) {
+ this.classes = classes || [];
+ this.attributes = {};
+ this.height = 0;
+ this.depth = 0;
+ this.maxFontSize = 0;
+ this.style = style || {};
+
+ if (options) {
+ if (options.style.isTight()) {
+ this.classes.push("mtight");
+ }
+
+ var color = options.getColor();
+
+ if (color) {
+ this.style.color = color;
+ }
+ }
+};
+/**
+ * Convert into an HTML node
+ */
+
+
+var toNode = function toNode(tagName) {
+ var node = document.createElement(tagName); // Apply the class
+
+ node.className = createClass(this.classes); // Apply inline styles
+
+ for (var style in this.style) {
+ if (this.style.hasOwnProperty(style)) {
+ // $FlowFixMe Flow doesn't seem to understand span.style's type.
+ node.style[style] = this.style[style];
+ }
+ } // Apply attributes
+
+
+ for (var attr in this.attributes) {
+ if (this.attributes.hasOwnProperty(attr)) {
+ node.setAttribute(attr, this.attributes[attr]);
+ }
+ } // Append the children, also as HTML nodes
+
+
+ for (var i = 0; i < this.children.length; i++) {
+ node.appendChild(this.children[i].toNode());
+ }
+
+ return node;
+};
+/**
+ * Convert into an HTML markup string
+ */
+
+
+var toMarkup = function toMarkup(tagName) {
+ var markup = "<" + tagName; // Add the class
+
+ if (this.classes.length) {
+ markup += " class=\"" + utils.escape(createClass(this.classes)) + "\"";
+ }
+
+ var styles = ""; // Add the styles, after hyphenation
+
+ for (var style in this.style) {
+ if (this.style.hasOwnProperty(style)) {
+ styles += utils.hyphenate(style) + ":" + this.style[style] + ";";
+ }
+ }
+
+ if (styles) {
+ markup += " style=\"" + utils.escape(styles) + "\"";
+ } // Add the attributes
+
+
+ for (var attr in this.attributes) {
+ if (this.attributes.hasOwnProperty(attr)) {
+ markup += " " + attr + "=\"" + utils.escape(this.attributes[attr]) + "\"";
+ }
+ }
+
+ markup += ">"; // Add the markup of the children, also as markup
+
+ for (var i = 0; i < this.children.length; i++) {
+ markup += this.children[i].toMarkup();
+ }
+
+ markup += "" + tagName + ">";
+ return markup;
+}; // Making the type below exact with all optional fields doesn't work due to
+// - https://github.com/facebook/flow/issues/4582
+// - https://github.com/facebook/flow/issues/5688
+// However, since *all* fields are optional, $Shape<> works as suggested in 5688
+// above.
+// This type does not include all CSS properties. Additional properties should
+// be added as needed.
+
+
+/**
+ * This node represents a span node, with a className, a list of children, and
+ * an inline style. It also contains information about its height, depth, and
+ * maxFontSize.
+ *
+ * Represents two types with different uses: SvgSpan to wrap an SVG and DomSpan
+ * otherwise. This typesafety is important when HTML builders access a span's
+ * children.
+ */
+class Span {
+ constructor(classes, children, options, style) {
+ this.children = void 0;
+ this.attributes = void 0;
+ this.classes = void 0;
+ this.height = void 0;
+ this.depth = void 0;
+ this.width = void 0;
+ this.maxFontSize = void 0;
+ this.style = void 0;
+ initNode.call(this, classes, options, style);
+ this.children = children || [];
+ }
+ /**
+ * Sets an arbitrary attribute on the span. Warning: use this wisely. Not
+ * all browsers support attributes the same, and having too many custom
+ * attributes is probably bad.
+ */
+
+
+ setAttribute(attribute, value) {
+ this.attributes[attribute] = value;
+ }
+
+ hasClass(className) {
+ return utils.contains(this.classes, className);
+ }
+
+ toNode() {
+ return toNode.call(this, "span");
+ }
+
+ toMarkup() {
+ return toMarkup.call(this, "span");
+ }
+
+}
+/**
+ * This node represents an anchor () element with a hyperlink. See `span`
+ * for further details.
+ */
+
+class Anchor {
+ constructor(href, classes, children, options) {
+ this.children = void 0;
+ this.attributes = void 0;
+ this.classes = void 0;
+ this.height = void 0;
+ this.depth = void 0;
+ this.maxFontSize = void 0;
+ this.style = void 0;
+ initNode.call(this, classes, options);
+ this.children = children || [];
+ this.setAttribute('href', href);
+ }
+
+ setAttribute(attribute, value) {
+ this.attributes[attribute] = value;
+ }
+
+ hasClass(className) {
+ return utils.contains(this.classes, className);
+ }
+
+ toNode() {
+ return toNode.call(this, "a");
+ }
+
+ toMarkup() {
+ return toMarkup.call(this, "a");
+ }
+
+}
+/**
+ * This node represents an image embed () element.
+ */
+
+class Img {
+ constructor(src, alt, style) {
+ this.src = void 0;
+ this.alt = void 0;
+ this.classes = void 0;
+ this.height = void 0;
+ this.depth = void 0;
+ this.maxFontSize = void 0;
+ this.style = void 0;
+ this.alt = alt;
+ this.src = src;
+ this.classes = ["mord"];
+ this.style = style;
+ }
+
+ hasClass(className) {
+ return utils.contains(this.classes, className);
+ }
+
+ toNode() {
+ var node = document.createElement("img");
+ node.src = this.src;
+ node.alt = this.alt;
+ node.className = "mord"; // Apply inline styles
+
+ for (var style in this.style) {
+ if (this.style.hasOwnProperty(style)) {
+ // $FlowFixMe
+ node.style[style] = this.style[style];
+ }
+ }
+
+ return node;
+ }
+
+ toMarkup() {
+ var markup = "";
+ return markup;
+ }
+
+}
+var iCombinations = {
+ 'î': '\u0131\u0302',
+ 'ï': '\u0131\u0308',
+ 'í': '\u0131\u0301',
+ // 'ī': '\u0131\u0304', // enable when we add Extended Latin
+ 'ì': '\u0131\u0300'
+};
+/**
+ * A symbol node contains information about a single symbol. It either renders
+ * to a single text node, or a span with a single text node in it, depending on
+ * whether it has CSS classes, styles, or needs italic correction.
+ */
+
+class SymbolNode {
+ constructor(text, height, depth, italic, skew, width, classes, style) {
+ this.text = void 0;
+ this.height = void 0;
+ this.depth = void 0;
+ this.italic = void 0;
+ this.skew = void 0;
+ this.width = void 0;
+ this.maxFontSize = void 0;
+ this.classes = void 0;
+ this.style = void 0;
+ this.text = text;
+ this.height = height || 0;
+ this.depth = depth || 0;
+ this.italic = italic || 0;
+ this.skew = skew || 0;
+ this.width = width || 0;
+ this.classes = classes || [];
+ this.style = style || {};
+ this.maxFontSize = 0; // Mark text from non-Latin scripts with specific classes so that we
+ // can specify which fonts to use. This allows us to render these
+ // characters with a serif font in situations where the browser would
+ // either default to a sans serif or render a placeholder character.
+ // We use CSS class names like cjk_fallback, hangul_fallback and
+ // brahmic_fallback. See ./unicodeScripts.js for the set of possible
+ // script names
+
+ var script = scriptFromCodepoint(this.text.charCodeAt(0));
+
+ if (script) {
+ this.classes.push(script + "_fallback");
+ }
+
+ if (/[îïíì]/.test(this.text)) {
+ // add ī when we add Extended Latin
+ this.text = iCombinations[this.text];
+ }
+ }
+
+ hasClass(className) {
+ return utils.contains(this.classes, className);
+ }
+ /**
+ * Creates a text node or span from a symbol node. Note that a span is only
+ * created if it is needed.
+ */
+
+
+ toNode() {
+ var node = document.createTextNode(this.text);
+ var span = null;
+
+ if (this.italic > 0) {
+ span = document.createElement("span");
+ span.style.marginRight = makeEm(this.italic);
+ }
+
+ if (this.classes.length > 0) {
+ span = span || document.createElement("span");
+ span.className = createClass(this.classes);
+ }
+
+ for (var style in this.style) {
+ if (this.style.hasOwnProperty(style)) {
+ span = span || document.createElement("span"); // $FlowFixMe Flow doesn't seem to understand span.style's type.
+
+ span.style[style] = this.style[style];
+ }
+ }
+
+ if (span) {
+ span.appendChild(node);
+ return span;
+ } else {
+ return node;
+ }
+ }
+ /**
+ * Creates markup for a symbol node.
+ */
+
+
+ toMarkup() {
+ // TODO(alpert): More duplication than I'd like from
+ // span.prototype.toMarkup and symbolNode.prototype.toNode...
+ var needsSpan = false;
+ var markup = " 0) {
+ styles += "margin-right:" + this.italic + "em;";
+ }
+
+ for (var style in this.style) {
+ if (this.style.hasOwnProperty(style)) {
+ styles += utils.hyphenate(style) + ":" + this.style[style] + ";";
+ }
+ }
+
+ if (styles) {
+ needsSpan = true;
+ markup += " style=\"" + utils.escape(styles) + "\"";
+ }
+
+ var escaped = utils.escape(this.text);
+
+ if (needsSpan) {
+ markup += ">";
+ markup += escaped;
+ markup += "";
+ return markup;
+ } else {
+ return escaped;
+ }
+ }
+
+}
+/**
+ * SVG nodes are used to render stretchy wide elements.
+ */
+
+class SvgNode {
+ constructor(children, attributes) {
+ this.children = void 0;
+ this.attributes = void 0;
+ this.children = children || [];
+ this.attributes = attributes || {};
+ }
+
+ toNode() {
+ var svgNS = "http://www.w3.org/2000/svg";
+ var node = document.createElementNS(svgNS, "svg"); // Apply attributes
+
+ for (var attr in this.attributes) {
+ if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
+ node.setAttribute(attr, this.attributes[attr]);
+ }
+ }
+
+ for (var i = 0; i < this.children.length; i++) {
+ node.appendChild(this.children[i].toNode());
+ }
+
+ return node;
+ }
+
+ toMarkup() {
+ var markup = "";
+ return markup;
+ }
+
+}
+class PathNode {
+ constructor(pathName, alternate) {
+ this.pathName = void 0;
+ this.alternate = void 0;
+ this.pathName = pathName;
+ this.alternate = alternate; // Used only for \sqrt, \phase, & tall delims
+ }
+
+ toNode() {
+ var svgNS = "http://www.w3.org/2000/svg";
+ var node = document.createElementNS(svgNS, "path");
+
+ if (this.alternate) {
+ node.setAttribute("d", this.alternate);
+ } else {
+ node.setAttribute("d", path[this.pathName]);
+ }
+
+ return node;
+ }
+
+ toMarkup() {
+ if (this.alternate) {
+ return " ";
+ } else {
+ return " ";
+ }
+ }
+
+}
+class LineNode {
+ constructor(attributes) {
+ this.attributes = void 0;
+ this.attributes = attributes || {};
+ }
+
+ toNode() {
+ var svgNS = "http://www.w3.org/2000/svg";
+ var node = document.createElementNS(svgNS, "line"); // Apply attributes
+
+ for (var attr in this.attributes) {
+ if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
+ node.setAttribute(attr, this.attributes[attr]);
+ }
+ }
+
+ return node;
+ }
+
+ toMarkup() {
+ var markup = " ";
+ return markup;
+ }
+
+}
+function assertSymbolDomNode(group) {
+ if (group instanceof SymbolNode) {
+ return group;
+ } else {
+ throw new Error("Expected symbolNode but got " + String(group) + ".");
+ }
+}
+function assertSpan(group) {
+ if (group instanceof Span) {
+ return group;
+ } else {
+ throw new Error("Expected span but got " + String(group) + ".");
+ }
+}
+
+/**
+ * This file holds a list of all no-argument functions and single-character
+ * symbols (like 'a' or ';').
+ *
+ * For each of the symbols, there are three properties they can have:
+ * - font (required): the font to be used for this symbol. Either "main" (the
+ normal font), or "ams" (the ams fonts).
+ * - group (required): the ParseNode group type the symbol should have (i.e.
+ "textord", "mathord", etc).
+ See https://github.com/KaTeX/KaTeX/wiki/Examining-TeX#group-types
+ * - replace: the character that this symbol or function should be
+ * replaced with (i.e. "\phi" has a replace value of "\u03d5", the phi
+ * character in the main font).
+ *
+ * The outermost map in the table indicates what mode the symbols should be
+ * accepted in (e.g. "math" or "text").
+ */
+// Some of these have a "-token" suffix since these are also used as `ParseNode`
+// types for raw text tokens, and we want to avoid conflicts with higher-level
+// `ParseNode` types. These `ParseNode`s are constructed within `Parser` by
+// looking up the `symbols` map.
+var ATOMS = {
+ "bin": 1,
+ "close": 1,
+ "inner": 1,
+ "open": 1,
+ "punct": 1,
+ "rel": 1
+};
+var NON_ATOMS = {
+ "accent-token": 1,
+ "mathord": 1,
+ "op-token": 1,
+ "spacing": 1,
+ "textord": 1
+};
+var symbols = {
+ "math": {},
+ "text": {}
+};
+/** `acceptUnicodeChar = true` is only applicable if `replace` is set. */
+
+function defineSymbol(mode, font, group, replace, name, acceptUnicodeChar) {
+ symbols[mode][name] = {
+ font,
+ group,
+ replace
+ };
+
+ if (acceptUnicodeChar && replace) {
+ symbols[mode][replace] = symbols[mode][name];
+ }
+} // Some abbreviations for commonly used strings.
+// This helps minify the code, and also spotting typos using jshint.
+// modes:
+
+var math = "math";
+var text = "text"; // fonts:
+
+var main = "main";
+var ams = "ams"; // groups:
+
+var accent = "accent-token";
+var bin = "bin";
+var close = "close";
+var inner = "inner";
+var mathord = "mathord";
+var op = "op-token";
+var open = "open";
+var punct = "punct";
+var rel = "rel";
+var spacing = "spacing";
+var textord = "textord"; // Now comes the symbol table
+// Relation Symbols
+
+defineSymbol(math, main, rel, "\u2261", "\\equiv", true);
+defineSymbol(math, main, rel, "\u227a", "\\prec", true);
+defineSymbol(math, main, rel, "\u227b", "\\succ", true);
+defineSymbol(math, main, rel, "\u223c", "\\sim", true);
+defineSymbol(math, main, rel, "\u22a5", "\\perp");
+defineSymbol(math, main, rel, "\u2aaf", "\\preceq", true);
+defineSymbol(math, main, rel, "\u2ab0", "\\succeq", true);
+defineSymbol(math, main, rel, "\u2243", "\\simeq", true);
+defineSymbol(math, main, rel, "\u2223", "\\mid", true);
+defineSymbol(math, main, rel, "\u226a", "\\ll", true);
+defineSymbol(math, main, rel, "\u226b", "\\gg", true);
+defineSymbol(math, main, rel, "\u224d", "\\asymp", true);
+defineSymbol(math, main, rel, "\u2225", "\\parallel");
+defineSymbol(math, main, rel, "\u22c8", "\\bowtie", true);
+defineSymbol(math, main, rel, "\u2323", "\\smile", true);
+defineSymbol(math, main, rel, "\u2291", "\\sqsubseteq", true);
+defineSymbol(math, main, rel, "\u2292", "\\sqsupseteq", true);
+defineSymbol(math, main, rel, "\u2250", "\\doteq", true);
+defineSymbol(math, main, rel, "\u2322", "\\frown", true);
+defineSymbol(math, main, rel, "\u220b", "\\ni", true);
+defineSymbol(math, main, rel, "\u221d", "\\propto", true);
+defineSymbol(math, main, rel, "\u22a2", "\\vdash", true);
+defineSymbol(math, main, rel, "\u22a3", "\\dashv", true);
+defineSymbol(math, main, rel, "\u220b", "\\owns"); // Punctuation
+
+defineSymbol(math, main, punct, "\u002e", "\\ldotp");
+defineSymbol(math, main, punct, "\u22c5", "\\cdotp"); // Misc Symbols
+
+defineSymbol(math, main, textord, "\u0023", "\\#");
+defineSymbol(text, main, textord, "\u0023", "\\#");
+defineSymbol(math, main, textord, "\u0026", "\\&");
+defineSymbol(text, main, textord, "\u0026", "\\&");
+defineSymbol(math, main, textord, "\u2135", "\\aleph", true);
+defineSymbol(math, main, textord, "\u2200", "\\forall", true);
+defineSymbol(math, main, textord, "\u210f", "\\hbar", true);
+defineSymbol(math, main, textord, "\u2203", "\\exists", true);
+defineSymbol(math, main, textord, "\u2207", "\\nabla", true);
+defineSymbol(math, main, textord, "\u266d", "\\flat", true);
+defineSymbol(math, main, textord, "\u2113", "\\ell", true);
+defineSymbol(math, main, textord, "\u266e", "\\natural", true);
+defineSymbol(math, main, textord, "\u2663", "\\clubsuit", true);
+defineSymbol(math, main, textord, "\u2118", "\\wp", true);
+defineSymbol(math, main, textord, "\u266f", "\\sharp", true);
+defineSymbol(math, main, textord, "\u2662", "\\diamondsuit", true);
+defineSymbol(math, main, textord, "\u211c", "\\Re", true);
+defineSymbol(math, main, textord, "\u2661", "\\heartsuit", true);
+defineSymbol(math, main, textord, "\u2111", "\\Im", true);
+defineSymbol(math, main, textord, "\u2660", "\\spadesuit", true);
+defineSymbol(math, main, textord, "\u00a7", "\\S", true);
+defineSymbol(text, main, textord, "\u00a7", "\\S");
+defineSymbol(math, main, textord, "\u00b6", "\\P", true);
+defineSymbol(text, main, textord, "\u00b6", "\\P"); // Math and Text
+
+defineSymbol(math, main, textord, "\u2020", "\\dag");
+defineSymbol(text, main, textord, "\u2020", "\\dag");
+defineSymbol(text, main, textord, "\u2020", "\\textdagger");
+defineSymbol(math, main, textord, "\u2021", "\\ddag");
+defineSymbol(text, main, textord, "\u2021", "\\ddag");
+defineSymbol(text, main, textord, "\u2021", "\\textdaggerdbl"); // Large Delimiters
+
+defineSymbol(math, main, close, "\u23b1", "\\rmoustache", true);
+defineSymbol(math, main, open, "\u23b0", "\\lmoustache", true);
+defineSymbol(math, main, close, "\u27ef", "\\rgroup", true);
+defineSymbol(math, main, open, "\u27ee", "\\lgroup", true); // Binary Operators
+
+defineSymbol(math, main, bin, "\u2213", "\\mp", true);
+defineSymbol(math, main, bin, "\u2296", "\\ominus", true);
+defineSymbol(math, main, bin, "\u228e", "\\uplus", true);
+defineSymbol(math, main, bin, "\u2293", "\\sqcap", true);
+defineSymbol(math, main, bin, "\u2217", "\\ast");
+defineSymbol(math, main, bin, "\u2294", "\\sqcup", true);
+defineSymbol(math, main, bin, "\u25ef", "\\bigcirc", true);
+defineSymbol(math, main, bin, "\u2219", "\\bullet", true);
+defineSymbol(math, main, bin, "\u2021", "\\ddagger");
+defineSymbol(math, main, bin, "\u2240", "\\wr", true);
+defineSymbol(math, main, bin, "\u2a3f", "\\amalg");
+defineSymbol(math, main, bin, "\u0026", "\\And"); // from amsmath
+// Arrow Symbols
+
+defineSymbol(math, main, rel, "\u27f5", "\\longleftarrow", true);
+defineSymbol(math, main, rel, "\u21d0", "\\Leftarrow", true);
+defineSymbol(math, main, rel, "\u27f8", "\\Longleftarrow", true);
+defineSymbol(math, main, rel, "\u27f6", "\\longrightarrow", true);
+defineSymbol(math, main, rel, "\u21d2", "\\Rightarrow", true);
+defineSymbol(math, main, rel, "\u27f9", "\\Longrightarrow", true);
+defineSymbol(math, main, rel, "\u2194", "\\leftrightarrow", true);
+defineSymbol(math, main, rel, "\u27f7", "\\longleftrightarrow", true);
+defineSymbol(math, main, rel, "\u21d4", "\\Leftrightarrow", true);
+defineSymbol(math, main, rel, "\u27fa", "\\Longleftrightarrow", true);
+defineSymbol(math, main, rel, "\u21a6", "\\mapsto", true);
+defineSymbol(math, main, rel, "\u27fc", "\\longmapsto", true);
+defineSymbol(math, main, rel, "\u2197", "\\nearrow", true);
+defineSymbol(math, main, rel, "\u21a9", "\\hookleftarrow", true);
+defineSymbol(math, main, rel, "\u21aa", "\\hookrightarrow", true);
+defineSymbol(math, main, rel, "\u2198", "\\searrow", true);
+defineSymbol(math, main, rel, "\u21bc", "\\leftharpoonup", true);
+defineSymbol(math, main, rel, "\u21c0", "\\rightharpoonup", true);
+defineSymbol(math, main, rel, "\u2199", "\\swarrow", true);
+defineSymbol(math, main, rel, "\u21bd", "\\leftharpoondown", true);
+defineSymbol(math, main, rel, "\u21c1", "\\rightharpoondown", true);
+defineSymbol(math, main, rel, "\u2196", "\\nwarrow", true);
+defineSymbol(math, main, rel, "\u21cc", "\\rightleftharpoons", true); // AMS Negated Binary Relations
+
+defineSymbol(math, ams, rel, "\u226e", "\\nless", true); // Symbol names preceded by "@" each have a corresponding macro.
+
+defineSymbol(math, ams, rel, "\ue010", "\\@nleqslant");
+defineSymbol(math, ams, rel, "\ue011", "\\@nleqq");
+defineSymbol(math, ams, rel, "\u2a87", "\\lneq", true);
+defineSymbol(math, ams, rel, "\u2268", "\\lneqq", true);
+defineSymbol(math, ams, rel, "\ue00c", "\\@lvertneqq");
+defineSymbol(math, ams, rel, "\u22e6", "\\lnsim", true);
+defineSymbol(math, ams, rel, "\u2a89", "\\lnapprox", true);
+defineSymbol(math, ams, rel, "\u2280", "\\nprec", true); // unicode-math maps \u22e0 to \npreccurlyeq. We'll use the AMS synonym.
+
+defineSymbol(math, ams, rel, "\u22e0", "\\npreceq", true);
+defineSymbol(math, ams, rel, "\u22e8", "\\precnsim", true);
+defineSymbol(math, ams, rel, "\u2ab9", "\\precnapprox", true);
+defineSymbol(math, ams, rel, "\u2241", "\\nsim", true);
+defineSymbol(math, ams, rel, "\ue006", "\\@nshortmid");
+defineSymbol(math, ams, rel, "\u2224", "\\nmid", true);
+defineSymbol(math, ams, rel, "\u22ac", "\\nvdash", true);
+defineSymbol(math, ams, rel, "\u22ad", "\\nvDash", true);
+defineSymbol(math, ams, rel, "\u22ea", "\\ntriangleleft");
+defineSymbol(math, ams, rel, "\u22ec", "\\ntrianglelefteq", true);
+defineSymbol(math, ams, rel, "\u228a", "\\subsetneq", true);
+defineSymbol(math, ams, rel, "\ue01a", "\\@varsubsetneq");
+defineSymbol(math, ams, rel, "\u2acb", "\\subsetneqq", true);
+defineSymbol(math, ams, rel, "\ue017", "\\@varsubsetneqq");
+defineSymbol(math, ams, rel, "\u226f", "\\ngtr", true);
+defineSymbol(math, ams, rel, "\ue00f", "\\@ngeqslant");
+defineSymbol(math, ams, rel, "\ue00e", "\\@ngeqq");
+defineSymbol(math, ams, rel, "\u2a88", "\\gneq", true);
+defineSymbol(math, ams, rel, "\u2269", "\\gneqq", true);
+defineSymbol(math, ams, rel, "\ue00d", "\\@gvertneqq");
+defineSymbol(math, ams, rel, "\u22e7", "\\gnsim", true);
+defineSymbol(math, ams, rel, "\u2a8a", "\\gnapprox", true);
+defineSymbol(math, ams, rel, "\u2281", "\\nsucc", true); // unicode-math maps \u22e1 to \nsucccurlyeq. We'll use the AMS synonym.
+
+defineSymbol(math, ams, rel, "\u22e1", "\\nsucceq", true);
+defineSymbol(math, ams, rel, "\u22e9", "\\succnsim", true);
+defineSymbol(math, ams, rel, "\u2aba", "\\succnapprox", true); // unicode-math maps \u2246 to \simneqq. We'll use the AMS synonym.
+
+defineSymbol(math, ams, rel, "\u2246", "\\ncong", true);
+defineSymbol(math, ams, rel, "\ue007", "\\@nshortparallel");
+defineSymbol(math, ams, rel, "\u2226", "\\nparallel", true);
+defineSymbol(math, ams, rel, "\u22af", "\\nVDash", true);
+defineSymbol(math, ams, rel, "\u22eb", "\\ntriangleright");
+defineSymbol(math, ams, rel, "\u22ed", "\\ntrianglerighteq", true);
+defineSymbol(math, ams, rel, "\ue018", "\\@nsupseteqq");
+defineSymbol(math, ams, rel, "\u228b", "\\supsetneq", true);
+defineSymbol(math, ams, rel, "\ue01b", "\\@varsupsetneq");
+defineSymbol(math, ams, rel, "\u2acc", "\\supsetneqq", true);
+defineSymbol(math, ams, rel, "\ue019", "\\@varsupsetneqq");
+defineSymbol(math, ams, rel, "\u22ae", "\\nVdash", true);
+defineSymbol(math, ams, rel, "\u2ab5", "\\precneqq", true);
+defineSymbol(math, ams, rel, "\u2ab6", "\\succneqq", true);
+defineSymbol(math, ams, rel, "\ue016", "\\@nsubseteqq");
+defineSymbol(math, ams, bin, "\u22b4", "\\unlhd");
+defineSymbol(math, ams, bin, "\u22b5", "\\unrhd"); // AMS Negated Arrows
+
+defineSymbol(math, ams, rel, "\u219a", "\\nleftarrow", true);
+defineSymbol(math, ams, rel, "\u219b", "\\nrightarrow", true);
+defineSymbol(math, ams, rel, "\u21cd", "\\nLeftarrow", true);
+defineSymbol(math, ams, rel, "\u21cf", "\\nRightarrow", true);
+defineSymbol(math, ams, rel, "\u21ae", "\\nleftrightarrow", true);
+defineSymbol(math, ams, rel, "\u21ce", "\\nLeftrightarrow", true); // AMS Misc
+
+defineSymbol(math, ams, rel, "\u25b3", "\\vartriangle");
+defineSymbol(math, ams, textord, "\u210f", "\\hslash");
+defineSymbol(math, ams, textord, "\u25bd", "\\triangledown");
+defineSymbol(math, ams, textord, "\u25ca", "\\lozenge");
+defineSymbol(math, ams, textord, "\u24c8", "\\circledS");
+defineSymbol(math, ams, textord, "\u00ae", "\\circledR");
+defineSymbol(text, ams, textord, "\u00ae", "\\circledR");
+defineSymbol(math, ams, textord, "\u2221", "\\measuredangle", true);
+defineSymbol(math, ams, textord, "\u2204", "\\nexists");
+defineSymbol(math, ams, textord, "\u2127", "\\mho");
+defineSymbol(math, ams, textord, "\u2132", "\\Finv", true);
+defineSymbol(math, ams, textord, "\u2141", "\\Game", true);
+defineSymbol(math, ams, textord, "\u2035", "\\backprime");
+defineSymbol(math, ams, textord, "\u25b2", "\\blacktriangle");
+defineSymbol(math, ams, textord, "\u25bc", "\\blacktriangledown");
+defineSymbol(math, ams, textord, "\u25a0", "\\blacksquare");
+defineSymbol(math, ams, textord, "\u29eb", "\\blacklozenge");
+defineSymbol(math, ams, textord, "\u2605", "\\bigstar");
+defineSymbol(math, ams, textord, "\u2222", "\\sphericalangle", true);
+defineSymbol(math, ams, textord, "\u2201", "\\complement", true); // unicode-math maps U+F0 to \matheth. We map to AMS function \eth
+
+defineSymbol(math, ams, textord, "\u00f0", "\\eth", true);
+defineSymbol(text, main, textord, "\u00f0", "\u00f0");
+defineSymbol(math, ams, textord, "\u2571", "\\diagup");
+defineSymbol(math, ams, textord, "\u2572", "\\diagdown");
+defineSymbol(math, ams, textord, "\u25a1", "\\square");
+defineSymbol(math, ams, textord, "\u25a1", "\\Box");
+defineSymbol(math, ams, textord, "\u25ca", "\\Diamond"); // unicode-math maps U+A5 to \mathyen. We map to AMS function \yen
+
+defineSymbol(math, ams, textord, "\u00a5", "\\yen", true);
+defineSymbol(text, ams, textord, "\u00a5", "\\yen", true);
+defineSymbol(math, ams, textord, "\u2713", "\\checkmark", true);
+defineSymbol(text, ams, textord, "\u2713", "\\checkmark"); // AMS Hebrew
+
+defineSymbol(math, ams, textord, "\u2136", "\\beth", true);
+defineSymbol(math, ams, textord, "\u2138", "\\daleth", true);
+defineSymbol(math, ams, textord, "\u2137", "\\gimel", true); // AMS Greek
+
+defineSymbol(math, ams, textord, "\u03dd", "\\digamma", true);
+defineSymbol(math, ams, textord, "\u03f0", "\\varkappa"); // AMS Delimiters
+
+defineSymbol(math, ams, open, "\u250c", "\\@ulcorner", true);
+defineSymbol(math, ams, close, "\u2510", "\\@urcorner", true);
+defineSymbol(math, ams, open, "\u2514", "\\@llcorner", true);
+defineSymbol(math, ams, close, "\u2518", "\\@lrcorner", true); // AMS Binary Relations
+
+defineSymbol(math, ams, rel, "\u2266", "\\leqq", true);
+defineSymbol(math, ams, rel, "\u2a7d", "\\leqslant", true);
+defineSymbol(math, ams, rel, "\u2a95", "\\eqslantless", true);
+defineSymbol(math, ams, rel, "\u2272", "\\lesssim", true);
+defineSymbol(math, ams, rel, "\u2a85", "\\lessapprox", true);
+defineSymbol(math, ams, rel, "\u224a", "\\approxeq", true);
+defineSymbol(math, ams, bin, "\u22d6", "\\lessdot");
+defineSymbol(math, ams, rel, "\u22d8", "\\lll", true);
+defineSymbol(math, ams, rel, "\u2276", "\\lessgtr", true);
+defineSymbol(math, ams, rel, "\u22da", "\\lesseqgtr", true);
+defineSymbol(math, ams, rel, "\u2a8b", "\\lesseqqgtr", true);
+defineSymbol(math, ams, rel, "\u2251", "\\doteqdot");
+defineSymbol(math, ams, rel, "\u2253", "\\risingdotseq", true);
+defineSymbol(math, ams, rel, "\u2252", "\\fallingdotseq", true);
+defineSymbol(math, ams, rel, "\u223d", "\\backsim", true);
+defineSymbol(math, ams, rel, "\u22cd", "\\backsimeq", true);
+defineSymbol(math, ams, rel, "\u2ac5", "\\subseteqq", true);
+defineSymbol(math, ams, rel, "\u22d0", "\\Subset", true);
+defineSymbol(math, ams, rel, "\u228f", "\\sqsubset", true);
+defineSymbol(math, ams, rel, "\u227c", "\\preccurlyeq", true);
+defineSymbol(math, ams, rel, "\u22de", "\\curlyeqprec", true);
+defineSymbol(math, ams, rel, "\u227e", "\\precsim", true);
+defineSymbol(math, ams, rel, "\u2ab7", "\\precapprox", true);
+defineSymbol(math, ams, rel, "\u22b2", "\\vartriangleleft");
+defineSymbol(math, ams, rel, "\u22b4", "\\trianglelefteq");
+defineSymbol(math, ams, rel, "\u22a8", "\\vDash", true);
+defineSymbol(math, ams, rel, "\u22aa", "\\Vvdash", true);
+defineSymbol(math, ams, rel, "\u2323", "\\smallsmile");
+defineSymbol(math, ams, rel, "\u2322", "\\smallfrown");
+defineSymbol(math, ams, rel, "\u224f", "\\bumpeq", true);
+defineSymbol(math, ams, rel, "\u224e", "\\Bumpeq", true);
+defineSymbol(math, ams, rel, "\u2267", "\\geqq", true);
+defineSymbol(math, ams, rel, "\u2a7e", "\\geqslant", true);
+defineSymbol(math, ams, rel, "\u2a96", "\\eqslantgtr", true);
+defineSymbol(math, ams, rel, "\u2273", "\\gtrsim", true);
+defineSymbol(math, ams, rel, "\u2a86", "\\gtrapprox", true);
+defineSymbol(math, ams, bin, "\u22d7", "\\gtrdot");
+defineSymbol(math, ams, rel, "\u22d9", "\\ggg", true);
+defineSymbol(math, ams, rel, "\u2277", "\\gtrless", true);
+defineSymbol(math, ams, rel, "\u22db", "\\gtreqless", true);
+defineSymbol(math, ams, rel, "\u2a8c", "\\gtreqqless", true);
+defineSymbol(math, ams, rel, "\u2256", "\\eqcirc", true);
+defineSymbol(math, ams, rel, "\u2257", "\\circeq", true);
+defineSymbol(math, ams, rel, "\u225c", "\\triangleq", true);
+defineSymbol(math, ams, rel, "\u223c", "\\thicksim");
+defineSymbol(math, ams, rel, "\u2248", "\\thickapprox");
+defineSymbol(math, ams, rel, "\u2ac6", "\\supseteqq", true);
+defineSymbol(math, ams, rel, "\u22d1", "\\Supset", true);
+defineSymbol(math, ams, rel, "\u2290", "\\sqsupset", true);
+defineSymbol(math, ams, rel, "\u227d", "\\succcurlyeq", true);
+defineSymbol(math, ams, rel, "\u22df", "\\curlyeqsucc", true);
+defineSymbol(math, ams, rel, "\u227f", "\\succsim", true);
+defineSymbol(math, ams, rel, "\u2ab8", "\\succapprox", true);
+defineSymbol(math, ams, rel, "\u22b3", "\\vartriangleright");
+defineSymbol(math, ams, rel, "\u22b5", "\\trianglerighteq");
+defineSymbol(math, ams, rel, "\u22a9", "\\Vdash", true);
+defineSymbol(math, ams, rel, "\u2223", "\\shortmid");
+defineSymbol(math, ams, rel, "\u2225", "\\shortparallel");
+defineSymbol(math, ams, rel, "\u226c", "\\between", true);
+defineSymbol(math, ams, rel, "\u22d4", "\\pitchfork", true);
+defineSymbol(math, ams, rel, "\u221d", "\\varpropto");
+defineSymbol(math, ams, rel, "\u25c0", "\\blacktriangleleft"); // unicode-math says that \therefore is a mathord atom.
+// We kept the amssymb atom type, which is rel.
+
+defineSymbol(math, ams, rel, "\u2234", "\\therefore", true);
+defineSymbol(math, ams, rel, "\u220d", "\\backepsilon");
+defineSymbol(math, ams, rel, "\u25b6", "\\blacktriangleright"); // unicode-math says that \because is a mathord atom.
+// We kept the amssymb atom type, which is rel.
+
+defineSymbol(math, ams, rel, "\u2235", "\\because", true);
+defineSymbol(math, ams, rel, "\u22d8", "\\llless");
+defineSymbol(math, ams, rel, "\u22d9", "\\gggtr");
+defineSymbol(math, ams, bin, "\u22b2", "\\lhd");
+defineSymbol(math, ams, bin, "\u22b3", "\\rhd");
+defineSymbol(math, ams, rel, "\u2242", "\\eqsim", true);
+defineSymbol(math, main, rel, "\u22c8", "\\Join");
+defineSymbol(math, ams, rel, "\u2251", "\\Doteq", true); // AMS Binary Operators
+
+defineSymbol(math, ams, bin, "\u2214", "\\dotplus", true);
+defineSymbol(math, ams, bin, "\u2216", "\\smallsetminus");
+defineSymbol(math, ams, bin, "\u22d2", "\\Cap", true);
+defineSymbol(math, ams, bin, "\u22d3", "\\Cup", true);
+defineSymbol(math, ams, bin, "\u2a5e", "\\doublebarwedge", true);
+defineSymbol(math, ams, bin, "\u229f", "\\boxminus", true);
+defineSymbol(math, ams, bin, "\u229e", "\\boxplus", true);
+defineSymbol(math, ams, bin, "\u22c7", "\\divideontimes", true);
+defineSymbol(math, ams, bin, "\u22c9", "\\ltimes", true);
+defineSymbol(math, ams, bin, "\u22ca", "\\rtimes", true);
+defineSymbol(math, ams, bin, "\u22cb", "\\leftthreetimes", true);
+defineSymbol(math, ams, bin, "\u22cc", "\\rightthreetimes", true);
+defineSymbol(math, ams, bin, "\u22cf", "\\curlywedge", true);
+defineSymbol(math, ams, bin, "\u22ce", "\\curlyvee", true);
+defineSymbol(math, ams, bin, "\u229d", "\\circleddash", true);
+defineSymbol(math, ams, bin, "\u229b", "\\circledast", true);
+defineSymbol(math, ams, bin, "\u22c5", "\\centerdot");
+defineSymbol(math, ams, bin, "\u22ba", "\\intercal", true);
+defineSymbol(math, ams, bin, "\u22d2", "\\doublecap");
+defineSymbol(math, ams, bin, "\u22d3", "\\doublecup");
+defineSymbol(math, ams, bin, "\u22a0", "\\boxtimes", true); // AMS Arrows
+// Note: unicode-math maps \u21e2 to their own function \rightdasharrow.
+// We'll map it to AMS function \dashrightarrow. It produces the same atom.
+
+defineSymbol(math, ams, rel, "\u21e2", "\\dashrightarrow", true); // unicode-math maps \u21e0 to \leftdasharrow. We'll use the AMS synonym.
+
+defineSymbol(math, ams, rel, "\u21e0", "\\dashleftarrow", true);
+defineSymbol(math, ams, rel, "\u21c7", "\\leftleftarrows", true);
+defineSymbol(math, ams, rel, "\u21c6", "\\leftrightarrows", true);
+defineSymbol(math, ams, rel, "\u21da", "\\Lleftarrow", true);
+defineSymbol(math, ams, rel, "\u219e", "\\twoheadleftarrow", true);
+defineSymbol(math, ams, rel, "\u21a2", "\\leftarrowtail", true);
+defineSymbol(math, ams, rel, "\u21ab", "\\looparrowleft", true);
+defineSymbol(math, ams, rel, "\u21cb", "\\leftrightharpoons", true);
+defineSymbol(math, ams, rel, "\u21b6", "\\curvearrowleft", true); // unicode-math maps \u21ba to \acwopencirclearrow. We'll use the AMS synonym.
+
+defineSymbol(math, ams, rel, "\u21ba", "\\circlearrowleft", true);
+defineSymbol(math, ams, rel, "\u21b0", "\\Lsh", true);
+defineSymbol(math, ams, rel, "\u21c8", "\\upuparrows", true);
+defineSymbol(math, ams, rel, "\u21bf", "\\upharpoonleft", true);
+defineSymbol(math, ams, rel, "\u21c3", "\\downharpoonleft", true);
+defineSymbol(math, main, rel, "\u22b6", "\\origof", true); // not in font
+
+defineSymbol(math, main, rel, "\u22b7", "\\imageof", true); // not in font
+
+defineSymbol(math, ams, rel, "\u22b8", "\\multimap", true);
+defineSymbol(math, ams, rel, "\u21ad", "\\leftrightsquigarrow", true);
+defineSymbol(math, ams, rel, "\u21c9", "\\rightrightarrows", true);
+defineSymbol(math, ams, rel, "\u21c4", "\\rightleftarrows", true);
+defineSymbol(math, ams, rel, "\u21a0", "\\twoheadrightarrow", true);
+defineSymbol(math, ams, rel, "\u21a3", "\\rightarrowtail", true);
+defineSymbol(math, ams, rel, "\u21ac", "\\looparrowright", true);
+defineSymbol(math, ams, rel, "\u21b7", "\\curvearrowright", true); // unicode-math maps \u21bb to \cwopencirclearrow. We'll use the AMS synonym.
+
+defineSymbol(math, ams, rel, "\u21bb", "\\circlearrowright", true);
+defineSymbol(math, ams, rel, "\u21b1", "\\Rsh", true);
+defineSymbol(math, ams, rel, "\u21ca", "\\downdownarrows", true);
+defineSymbol(math, ams, rel, "\u21be", "\\upharpoonright", true);
+defineSymbol(math, ams, rel, "\u21c2", "\\downharpoonright", true);
+defineSymbol(math, ams, rel, "\u21dd", "\\rightsquigarrow", true);
+defineSymbol(math, ams, rel, "\u21dd", "\\leadsto");
+defineSymbol(math, ams, rel, "\u21db", "\\Rrightarrow", true);
+defineSymbol(math, ams, rel, "\u21be", "\\restriction");
+defineSymbol(math, main, textord, "\u2018", "`");
+defineSymbol(math, main, textord, "$", "\\$");
+defineSymbol(text, main, textord, "$", "\\$");
+defineSymbol(text, main, textord, "$", "\\textdollar");
+defineSymbol(math, main, textord, "%", "\\%");
+defineSymbol(text, main, textord, "%", "\\%");
+defineSymbol(math, main, textord, "_", "\\_");
+defineSymbol(text, main, textord, "_", "\\_");
+defineSymbol(text, main, textord, "_", "\\textunderscore");
+defineSymbol(math, main, textord, "\u2220", "\\angle", true);
+defineSymbol(math, main, textord, "\u221e", "\\infty", true);
+defineSymbol(math, main, textord, "\u2032", "\\prime");
+defineSymbol(math, main, textord, "\u25b3", "\\triangle");
+defineSymbol(math, main, textord, "\u0393", "\\Gamma", true);
+defineSymbol(math, main, textord, "\u0394", "\\Delta", true);
+defineSymbol(math, main, textord, "\u0398", "\\Theta", true);
+defineSymbol(math, main, textord, "\u039b", "\\Lambda", true);
+defineSymbol(math, main, textord, "\u039e", "\\Xi", true);
+defineSymbol(math, main, textord, "\u03a0", "\\Pi", true);
+defineSymbol(math, main, textord, "\u03a3", "\\Sigma", true);
+defineSymbol(math, main, textord, "\u03a5", "\\Upsilon", true);
+defineSymbol(math, main, textord, "\u03a6", "\\Phi", true);
+defineSymbol(math, main, textord, "\u03a8", "\\Psi", true);
+defineSymbol(math, main, textord, "\u03a9", "\\Omega", true);
+defineSymbol(math, main, textord, "A", "\u0391");
+defineSymbol(math, main, textord, "B", "\u0392");
+defineSymbol(math, main, textord, "E", "\u0395");
+defineSymbol(math, main, textord, "Z", "\u0396");
+defineSymbol(math, main, textord, "H", "\u0397");
+defineSymbol(math, main, textord, "I", "\u0399");
+defineSymbol(math, main, textord, "K", "\u039A");
+defineSymbol(math, main, textord, "M", "\u039C");
+defineSymbol(math, main, textord, "N", "\u039D");
+defineSymbol(math, main, textord, "O", "\u039F");
+defineSymbol(math, main, textord, "P", "\u03A1");
+defineSymbol(math, main, textord, "T", "\u03A4");
+defineSymbol(math, main, textord, "X", "\u03A7");
+defineSymbol(math, main, textord, "\u00ac", "\\neg", true);
+defineSymbol(math, main, textord, "\u00ac", "\\lnot");
+defineSymbol(math, main, textord, "\u22a4", "\\top");
+defineSymbol(math, main, textord, "\u22a5", "\\bot");
+defineSymbol(math, main, textord, "\u2205", "\\emptyset");
+defineSymbol(math, ams, textord, "\u2205", "\\varnothing");
+defineSymbol(math, main, mathord, "\u03b1", "\\alpha", true);
+defineSymbol(math, main, mathord, "\u03b2", "\\beta", true);
+defineSymbol(math, main, mathord, "\u03b3", "\\gamma", true);
+defineSymbol(math, main, mathord, "\u03b4", "\\delta", true);
+defineSymbol(math, main, mathord, "\u03f5", "\\epsilon", true);
+defineSymbol(math, main, mathord, "\u03b6", "\\zeta", true);
+defineSymbol(math, main, mathord, "\u03b7", "\\eta", true);
+defineSymbol(math, main, mathord, "\u03b8", "\\theta", true);
+defineSymbol(math, main, mathord, "\u03b9", "\\iota", true);
+defineSymbol(math, main, mathord, "\u03ba", "\\kappa", true);
+defineSymbol(math, main, mathord, "\u03bb", "\\lambda", true);
+defineSymbol(math, main, mathord, "\u03bc", "\\mu", true);
+defineSymbol(math, main, mathord, "\u03bd", "\\nu", true);
+defineSymbol(math, main, mathord, "\u03be", "\\xi", true);
+defineSymbol(math, main, mathord, "\u03bf", "\\omicron", true);
+defineSymbol(math, main, mathord, "\u03c0", "\\pi", true);
+defineSymbol(math, main, mathord, "\u03c1", "\\rho", true);
+defineSymbol(math, main, mathord, "\u03c3", "\\sigma", true);
+defineSymbol(math, main, mathord, "\u03c4", "\\tau", true);
+defineSymbol(math, main, mathord, "\u03c5", "\\upsilon", true);
+defineSymbol(math, main, mathord, "\u03d5", "\\phi", true);
+defineSymbol(math, main, mathord, "\u03c7", "\\chi", true);
+defineSymbol(math, main, mathord, "\u03c8", "\\psi", true);
+defineSymbol(math, main, mathord, "\u03c9", "\\omega", true);
+defineSymbol(math, main, mathord, "\u03b5", "\\varepsilon", true);
+defineSymbol(math, main, mathord, "\u03d1", "\\vartheta", true);
+defineSymbol(math, main, mathord, "\u03d6", "\\varpi", true);
+defineSymbol(math, main, mathord, "\u03f1", "\\varrho", true);
+defineSymbol(math, main, mathord, "\u03c2", "\\varsigma", true);
+defineSymbol(math, main, mathord, "\u03c6", "\\varphi", true);
+defineSymbol(math, main, bin, "\u2217", "*", true);
+defineSymbol(math, main, bin, "+", "+");
+defineSymbol(math, main, bin, "\u2212", "-", true);
+defineSymbol(math, main, bin, "\u22c5", "\\cdot", true);
+defineSymbol(math, main, bin, "\u2218", "\\circ", true);
+defineSymbol(math, main, bin, "\u00f7", "\\div", true);
+defineSymbol(math, main, bin, "\u00b1", "\\pm", true);
+defineSymbol(math, main, bin, "\u00d7", "\\times", true);
+defineSymbol(math, main, bin, "\u2229", "\\cap", true);
+defineSymbol(math, main, bin, "\u222a", "\\cup", true);
+defineSymbol(math, main, bin, "\u2216", "\\setminus", true);
+defineSymbol(math, main, bin, "\u2227", "\\land");
+defineSymbol(math, main, bin, "\u2228", "\\lor");
+defineSymbol(math, main, bin, "\u2227", "\\wedge", true);
+defineSymbol(math, main, bin, "\u2228", "\\vee", true);
+defineSymbol(math, main, textord, "\u221a", "\\surd");
+defineSymbol(math, main, open, "\u27e8", "\\langle", true);
+defineSymbol(math, main, open, "\u2223", "\\lvert");
+defineSymbol(math, main, open, "\u2225", "\\lVert");
+defineSymbol(math, main, close, "?", "?");
+defineSymbol(math, main, close, "!", "!");
+defineSymbol(math, main, close, "\u27e9", "\\rangle", true);
+defineSymbol(math, main, close, "\u2223", "\\rvert");
+defineSymbol(math, main, close, "\u2225", "\\rVert");
+defineSymbol(math, main, rel, "=", "=");
+defineSymbol(math, main, rel, ":", ":");
+defineSymbol(math, main, rel, "\u2248", "\\approx", true);
+defineSymbol(math, main, rel, "\u2245", "\\cong", true);
+defineSymbol(math, main, rel, "\u2265", "\\ge");
+defineSymbol(math, main, rel, "\u2265", "\\geq", true);
+defineSymbol(math, main, rel, "\u2190", "\\gets");
+defineSymbol(math, main, rel, ">", "\\gt", true);
+defineSymbol(math, main, rel, "\u2208", "\\in", true);
+defineSymbol(math, main, rel, "\ue020", "\\@not");
+defineSymbol(math, main, rel, "\u2282", "\\subset", true);
+defineSymbol(math, main, rel, "\u2283", "\\supset", true);
+defineSymbol(math, main, rel, "\u2286", "\\subseteq", true);
+defineSymbol(math, main, rel, "\u2287", "\\supseteq", true);
+defineSymbol(math, ams, rel, "\u2288", "\\nsubseteq", true);
+defineSymbol(math, ams, rel, "\u2289", "\\nsupseteq", true);
+defineSymbol(math, main, rel, "\u22a8", "\\models");
+defineSymbol(math, main, rel, "\u2190", "\\leftarrow", true);
+defineSymbol(math, main, rel, "\u2264", "\\le");
+defineSymbol(math, main, rel, "\u2264", "\\leq", true);
+defineSymbol(math, main, rel, "<", "\\lt", true);
+defineSymbol(math, main, rel, "\u2192", "\\rightarrow", true);
+defineSymbol(math, main, rel, "\u2192", "\\to");
+defineSymbol(math, ams, rel, "\u2271", "\\ngeq", true);
+defineSymbol(math, ams, rel, "\u2270", "\\nleq", true);
+defineSymbol(math, main, spacing, "\u00a0", "\\ ");
+defineSymbol(math, main, spacing, "\u00a0", "\\space"); // Ref: LaTeX Source 2e: \DeclareRobustCommand{\nobreakspace}{%
+
+defineSymbol(math, main, spacing, "\u00a0", "\\nobreakspace");
+defineSymbol(text, main, spacing, "\u00a0", "\\ ");
+defineSymbol(text, main, spacing, "\u00a0", " ");
+defineSymbol(text, main, spacing, "\u00a0", "\\space");
+defineSymbol(text, main, spacing, "\u00a0", "\\nobreakspace");
+defineSymbol(math, main, spacing, null, "\\nobreak");
+defineSymbol(math, main, spacing, null, "\\allowbreak");
+defineSymbol(math, main, punct, ",", ",");
+defineSymbol(math, main, punct, ";", ";");
+defineSymbol(math, ams, bin, "\u22bc", "\\barwedge", true);
+defineSymbol(math, ams, bin, "\u22bb", "\\veebar", true);
+defineSymbol(math, main, bin, "\u2299", "\\odot", true);
+defineSymbol(math, main, bin, "\u2295", "\\oplus", true);
+defineSymbol(math, main, bin, "\u2297", "\\otimes", true);
+defineSymbol(math, main, textord, "\u2202", "\\partial", true);
+defineSymbol(math, main, bin, "\u2298", "\\oslash", true);
+defineSymbol(math, ams, bin, "\u229a", "\\circledcirc", true);
+defineSymbol(math, ams, bin, "\u22a1", "\\boxdot", true);
+defineSymbol(math, main, bin, "\u25b3", "\\bigtriangleup");
+defineSymbol(math, main, bin, "\u25bd", "\\bigtriangledown");
+defineSymbol(math, main, bin, "\u2020", "\\dagger");
+defineSymbol(math, main, bin, "\u22c4", "\\diamond");
+defineSymbol(math, main, bin, "\u22c6", "\\star");
+defineSymbol(math, main, bin, "\u25c3", "\\triangleleft");
+defineSymbol(math, main, bin, "\u25b9", "\\triangleright");
+defineSymbol(math, main, open, "{", "\\{");
+defineSymbol(text, main, textord, "{", "\\{");
+defineSymbol(text, main, textord, "{", "\\textbraceleft");
+defineSymbol(math, main, close, "}", "\\}");
+defineSymbol(text, main, textord, "}", "\\}");
+defineSymbol(text, main, textord, "}", "\\textbraceright");
+defineSymbol(math, main, open, "{", "\\lbrace");
+defineSymbol(math, main, close, "}", "\\rbrace");
+defineSymbol(math, main, open, "[", "\\lbrack", true);
+defineSymbol(text, main, textord, "[", "\\lbrack", true);
+defineSymbol(math, main, close, "]", "\\rbrack", true);
+defineSymbol(text, main, textord, "]", "\\rbrack", true);
+defineSymbol(math, main, open, "(", "\\lparen", true);
+defineSymbol(math, main, close, ")", "\\rparen", true);
+defineSymbol(text, main, textord, "<", "\\textless", true); // in T1 fontenc
+
+defineSymbol(text, main, textord, ">", "\\textgreater", true); // in T1 fontenc
+
+defineSymbol(math, main, open, "\u230a", "\\lfloor", true);
+defineSymbol(math, main, close, "\u230b", "\\rfloor", true);
+defineSymbol(math, main, open, "\u2308", "\\lceil", true);
+defineSymbol(math, main, close, "\u2309", "\\rceil", true);
+defineSymbol(math, main, textord, "\\", "\\backslash");
+defineSymbol(math, main, textord, "\u2223", "|");
+defineSymbol(math, main, textord, "\u2223", "\\vert");
+defineSymbol(text, main, textord, "|", "\\textbar", true); // in T1 fontenc
+
+defineSymbol(math, main, textord, "\u2225", "\\|");
+defineSymbol(math, main, textord, "\u2225", "\\Vert");
+defineSymbol(text, main, textord, "\u2225", "\\textbardbl");
+defineSymbol(text, main, textord, "~", "\\textasciitilde");
+defineSymbol(text, main, textord, "\\", "\\textbackslash");
+defineSymbol(text, main, textord, "^", "\\textasciicircum");
+defineSymbol(math, main, rel, "\u2191", "\\uparrow", true);
+defineSymbol(math, main, rel, "\u21d1", "\\Uparrow", true);
+defineSymbol(math, main, rel, "\u2193", "\\downarrow", true);
+defineSymbol(math, main, rel, "\u21d3", "\\Downarrow", true);
+defineSymbol(math, main, rel, "\u2195", "\\updownarrow", true);
+defineSymbol(math, main, rel, "\u21d5", "\\Updownarrow", true);
+defineSymbol(math, main, op, "\u2210", "\\coprod");
+defineSymbol(math, main, op, "\u22c1", "\\bigvee");
+defineSymbol(math, main, op, "\u22c0", "\\bigwedge");
+defineSymbol(math, main, op, "\u2a04", "\\biguplus");
+defineSymbol(math, main, op, "\u22c2", "\\bigcap");
+defineSymbol(math, main, op, "\u22c3", "\\bigcup");
+defineSymbol(math, main, op, "\u222b", "\\int");
+defineSymbol(math, main, op, "\u222b", "\\intop");
+defineSymbol(math, main, op, "\u222c", "\\iint");
+defineSymbol(math, main, op, "\u222d", "\\iiint");
+defineSymbol(math, main, op, "\u220f", "\\prod");
+defineSymbol(math, main, op, "\u2211", "\\sum");
+defineSymbol(math, main, op, "\u2a02", "\\bigotimes");
+defineSymbol(math, main, op, "\u2a01", "\\bigoplus");
+defineSymbol(math, main, op, "\u2a00", "\\bigodot");
+defineSymbol(math, main, op, "\u222e", "\\oint");
+defineSymbol(math, main, op, "\u222f", "\\oiint");
+defineSymbol(math, main, op, "\u2230", "\\oiiint");
+defineSymbol(math, main, op, "\u2a06", "\\bigsqcup");
+defineSymbol(math, main, op, "\u222b", "\\smallint");
+defineSymbol(text, main, inner, "\u2026", "\\textellipsis");
+defineSymbol(math, main, inner, "\u2026", "\\mathellipsis");
+defineSymbol(text, main, inner, "\u2026", "\\ldots", true);
+defineSymbol(math, main, inner, "\u2026", "\\ldots", true);
+defineSymbol(math, main, inner, "\u22ef", "\\@cdots", true);
+defineSymbol(math, main, inner, "\u22f1", "\\ddots", true);
+defineSymbol(math, main, textord, "\u22ee", "\\varvdots"); // \vdots is a macro
+
+defineSymbol(math, main, accent, "\u02ca", "\\acute");
+defineSymbol(math, main, accent, "\u02cb", "\\grave");
+defineSymbol(math, main, accent, "\u00a8", "\\ddot");
+defineSymbol(math, main, accent, "\u007e", "\\tilde");
+defineSymbol(math, main, accent, "\u02c9", "\\bar");
+defineSymbol(math, main, accent, "\u02d8", "\\breve");
+defineSymbol(math, main, accent, "\u02c7", "\\check");
+defineSymbol(math, main, accent, "\u005e", "\\hat");
+defineSymbol(math, main, accent, "\u20d7", "\\vec");
+defineSymbol(math, main, accent, "\u02d9", "\\dot");
+defineSymbol(math, main, accent, "\u02da", "\\mathring"); // \imath and \jmath should be invariant to \mathrm, \mathbf, etc., so use PUA
+
+defineSymbol(math, main, mathord, "\ue131", "\\@imath");
+defineSymbol(math, main, mathord, "\ue237", "\\@jmath");
+defineSymbol(math, main, textord, "\u0131", "\u0131");
+defineSymbol(math, main, textord, "\u0237", "\u0237");
+defineSymbol(text, main, textord, "\u0131", "\\i", true);
+defineSymbol(text, main, textord, "\u0237", "\\j", true);
+defineSymbol(text, main, textord, "\u00df", "\\ss", true);
+defineSymbol(text, main, textord, "\u00e6", "\\ae", true);
+defineSymbol(text, main, textord, "\u0153", "\\oe", true);
+defineSymbol(text, main, textord, "\u00f8", "\\o", true);
+defineSymbol(text, main, textord, "\u00c6", "\\AE", true);
+defineSymbol(text, main, textord, "\u0152", "\\OE", true);
+defineSymbol(text, main, textord, "\u00d8", "\\O", true);
+defineSymbol(text, main, accent, "\u02ca", "\\'"); // acute
+
+defineSymbol(text, main, accent, "\u02cb", "\\`"); // grave
+
+defineSymbol(text, main, accent, "\u02c6", "\\^"); // circumflex
+
+defineSymbol(text, main, accent, "\u02dc", "\\~"); // tilde
+
+defineSymbol(text, main, accent, "\u02c9", "\\="); // macron
+
+defineSymbol(text, main, accent, "\u02d8", "\\u"); // breve
+
+defineSymbol(text, main, accent, "\u02d9", "\\."); // dot above
+
+defineSymbol(text, main, accent, "\u00b8", "\\c"); // cedilla
+
+defineSymbol(text, main, accent, "\u02da", "\\r"); // ring above
+
+defineSymbol(text, main, accent, "\u02c7", "\\v"); // caron
+
+defineSymbol(text, main, accent, "\u00a8", '\\"'); // diaresis
+
+defineSymbol(text, main, accent, "\u02dd", "\\H"); // double acute
+
+defineSymbol(text, main, accent, "\u25ef", "\\textcircled"); // \bigcirc glyph
+// These ligatures are detected and created in Parser.js's `formLigatures`.
+
+var ligatures = {
+ "--": true,
+ "---": true,
+ "``": true,
+ "''": true
+};
+defineSymbol(text, main, textord, "\u2013", "--", true);
+defineSymbol(text, main, textord, "\u2013", "\\textendash");
+defineSymbol(text, main, textord, "\u2014", "---", true);
+defineSymbol(text, main, textord, "\u2014", "\\textemdash");
+defineSymbol(text, main, textord, "\u2018", "`", true);
+defineSymbol(text, main, textord, "\u2018", "\\textquoteleft");
+defineSymbol(text, main, textord, "\u2019", "'", true);
+defineSymbol(text, main, textord, "\u2019", "\\textquoteright");
+defineSymbol(text, main, textord, "\u201c", "``", true);
+defineSymbol(text, main, textord, "\u201c", "\\textquotedblleft");
+defineSymbol(text, main, textord, "\u201d", "''", true);
+defineSymbol(text, main, textord, "\u201d", "\\textquotedblright"); // \degree from gensymb package
+
+defineSymbol(math, main, textord, "\u00b0", "\\degree", true);
+defineSymbol(text, main, textord, "\u00b0", "\\degree"); // \textdegree from inputenc package
+
+defineSymbol(text, main, textord, "\u00b0", "\\textdegree", true); // TODO: In LaTeX, \pounds can generate a different character in text and math
+// mode, but among our fonts, only Main-Regular defines this character "163".
+
+defineSymbol(math, main, textord, "\u00a3", "\\pounds");
+defineSymbol(math, main, textord, "\u00a3", "\\mathsterling", true);
+defineSymbol(text, main, textord, "\u00a3", "\\pounds");
+defineSymbol(text, main, textord, "\u00a3", "\\textsterling", true);
+defineSymbol(math, ams, textord, "\u2720", "\\maltese");
+defineSymbol(text, ams, textord, "\u2720", "\\maltese"); // There are lots of symbols which are the same, so we add them in afterwards.
+// All of these are textords in math mode
+
+var mathTextSymbols = "0123456789/@.\"";
+
+for (var i = 0; i < mathTextSymbols.length; i++) {
+ var ch = mathTextSymbols.charAt(i);
+ defineSymbol(math, main, textord, ch, ch);
+} // All of these are textords in text mode
+
+
+var textSymbols = "0123456789!@*()-=+\";:?/.,";
+
+for (var _i = 0; _i < textSymbols.length; _i++) {
+ var _ch = textSymbols.charAt(_i);
+
+ defineSymbol(text, main, textord, _ch, _ch);
+} // All of these are textords in text mode, and mathords in math mode
+
+
+var letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+
+for (var _i2 = 0; _i2 < letters.length; _i2++) {
+ var _ch2 = letters.charAt(_i2);
+
+ defineSymbol(math, main, mathord, _ch2, _ch2);
+ defineSymbol(text, main, textord, _ch2, _ch2);
+} // Blackboard bold and script letters in Unicode range
+
+
+defineSymbol(math, ams, textord, "C", "\u2102"); // blackboard bold
+
+defineSymbol(text, ams, textord, "C", "\u2102");
+defineSymbol(math, ams, textord, "H", "\u210D");
+defineSymbol(text, ams, textord, "H", "\u210D");
+defineSymbol(math, ams, textord, "N", "\u2115");
+defineSymbol(text, ams, textord, "N", "\u2115");
+defineSymbol(math, ams, textord, "P", "\u2119");
+defineSymbol(text, ams, textord, "P", "\u2119");
+defineSymbol(math, ams, textord, "Q", "\u211A");
+defineSymbol(text, ams, textord, "Q", "\u211A");
+defineSymbol(math, ams, textord, "R", "\u211D");
+defineSymbol(text, ams, textord, "R", "\u211D");
+defineSymbol(math, ams, textord, "Z", "\u2124");
+defineSymbol(text, ams, textord, "Z", "\u2124");
+defineSymbol(math, main, mathord, "h", "\u210E"); // italic h, Planck constant
+
+defineSymbol(text, main, mathord, "h", "\u210E"); // The next loop loads wide (surrogate pair) characters.
+// We support some letters in the Unicode range U+1D400 to U+1D7FF,
+// Mathematical Alphanumeric Symbols.
+// Some editors do not deal well with wide characters. So don't write the
+// string into this file. Instead, create the string from the surrogate pair.
+
+var wideChar = "";
+
+for (var _i3 = 0; _i3 < letters.length; _i3++) {
+ var _ch3 = letters.charAt(_i3); // The hex numbers in the next line are a surrogate pair.
+ // 0xD835 is the high surrogate for all letters in the range we support.
+ // 0xDC00 is the low surrogate for bold A.
+
+
+ wideChar = String.fromCharCode(0xD835, 0xDC00 + _i3); // A-Z a-z bold
+
+ defineSymbol(math, main, mathord, _ch3, wideChar);
+ defineSymbol(text, main, textord, _ch3, wideChar);
+ wideChar = String.fromCharCode(0xD835, 0xDC34 + _i3); // A-Z a-z italic
+
+ defineSymbol(math, main, mathord, _ch3, wideChar);
+ defineSymbol(text, main, textord, _ch3, wideChar);
+ wideChar = String.fromCharCode(0xD835, 0xDC68 + _i3); // A-Z a-z bold italic
+
+ defineSymbol(math, main, mathord, _ch3, wideChar);
+ defineSymbol(text, main, textord, _ch3, wideChar);
+ wideChar = String.fromCharCode(0xD835, 0xDD04 + _i3); // A-Z a-z Fraktur
+
+ defineSymbol(math, main, mathord, _ch3, wideChar);
+ defineSymbol(text, main, textord, _ch3, wideChar);
+ wideChar = String.fromCharCode(0xD835, 0xDD6C + _i3); // A-Z a-z bold Fraktur
+
+ defineSymbol(math, main, mathord, _ch3, wideChar);
+ defineSymbol(text, main, textord, _ch3, wideChar);
+ wideChar = String.fromCharCode(0xD835, 0xDDA0 + _i3); // A-Z a-z sans-serif
+
+ defineSymbol(math, main, mathord, _ch3, wideChar);
+ defineSymbol(text, main, textord, _ch3, wideChar);
+ wideChar = String.fromCharCode(0xD835, 0xDDD4 + _i3); // A-Z a-z sans bold
+
+ defineSymbol(math, main, mathord, _ch3, wideChar);
+ defineSymbol(text, main, textord, _ch3, wideChar);
+ wideChar = String.fromCharCode(0xD835, 0xDE08 + _i3); // A-Z a-z sans italic
+
+ defineSymbol(math, main, mathord, _ch3, wideChar);
+ defineSymbol(text, main, textord, _ch3, wideChar);
+ wideChar = String.fromCharCode(0xD835, 0xDE70 + _i3); // A-Z a-z monospace
+
+ defineSymbol(math, main, mathord, _ch3, wideChar);
+ defineSymbol(text, main, textord, _ch3, wideChar);
+
+ if (_i3 < 26) {
+ // KaTeX fonts have only capital letters for blackboard bold and script.
+ // See exception for k below.
+ wideChar = String.fromCharCode(0xD835, 0xDD38 + _i3); // A-Z double struck
+
+ defineSymbol(math, main, mathord, _ch3, wideChar);
+ defineSymbol(text, main, textord, _ch3, wideChar);
+ wideChar = String.fromCharCode(0xD835, 0xDC9C + _i3); // A-Z script
+
+ defineSymbol(math, main, mathord, _ch3, wideChar);
+ defineSymbol(text, main, textord, _ch3, wideChar);
+ } // TODO: Add bold script when it is supported by a KaTeX font.
+
+} // "k" is the only double struck lower case letter in the KaTeX fonts.
+
+
+wideChar = String.fromCharCode(0xD835, 0xDD5C); // k double struck
+
+defineSymbol(math, main, mathord, "k", wideChar);
+defineSymbol(text, main, textord, "k", wideChar); // Next, some wide character numerals
+
+for (var _i4 = 0; _i4 < 10; _i4++) {
+ var _ch4 = _i4.toString();
+
+ wideChar = String.fromCharCode(0xD835, 0xDFCE + _i4); // 0-9 bold
+
+ defineSymbol(math, main, mathord, _ch4, wideChar);
+ defineSymbol(text, main, textord, _ch4, wideChar);
+ wideChar = String.fromCharCode(0xD835, 0xDFE2 + _i4); // 0-9 sans serif
+
+ defineSymbol(math, main, mathord, _ch4, wideChar);
+ defineSymbol(text, main, textord, _ch4, wideChar);
+ wideChar = String.fromCharCode(0xD835, 0xDFEC + _i4); // 0-9 bold sans
+
+ defineSymbol(math, main, mathord, _ch4, wideChar);
+ defineSymbol(text, main, textord, _ch4, wideChar);
+ wideChar = String.fromCharCode(0xD835, 0xDFF6 + _i4); // 0-9 monospace
+
+ defineSymbol(math, main, mathord, _ch4, wideChar);
+ defineSymbol(text, main, textord, _ch4, wideChar);
+} // We add these Latin-1 letters as symbols for backwards-compatibility,
+// but they are not actually in the font, nor are they supported by the
+// Unicode accent mechanism, so they fall back to Times font and look ugly.
+// TODO(edemaine): Fix this.
+
+
+var extraLatin = "\u00d0\u00de\u00fe";
+
+for (var _i5 = 0; _i5 < extraLatin.length; _i5++) {
+ var _ch5 = extraLatin.charAt(_i5);
+
+ defineSymbol(math, main, mathord, _ch5, _ch5);
+ defineSymbol(text, main, textord, _ch5, _ch5);
+}
+
+/**
+ * This file provides support for Unicode range U+1D400 to U+1D7FF,
+ * Mathematical Alphanumeric Symbols.
+ *
+ * Function wideCharacterFont takes a wide character as input and returns
+ * the font information necessary to render it properly.
+ */
+/**
+ * Data below is from https://www.unicode.org/charts/PDF/U1D400.pdf
+ * That document sorts characters into groups by font type, say bold or italic.
+ *
+ * In the arrays below, each subarray consists three elements:
+ * * The CSS class of that group when in math mode.
+ * * The CSS class of that group when in text mode.
+ * * The font name, so that KaTeX can get font metrics.
+ */
+
+var wideLatinLetterData = [["mathbf", "textbf", "Main-Bold"], // A-Z bold upright
+["mathbf", "textbf", "Main-Bold"], // a-z bold upright
+["mathnormal", "textit", "Math-Italic"], // A-Z italic
+["mathnormal", "textit", "Math-Italic"], // a-z italic
+["boldsymbol", "boldsymbol", "Main-BoldItalic"], // A-Z bold italic
+["boldsymbol", "boldsymbol", "Main-BoldItalic"], // a-z bold italic
+// Map fancy A-Z letters to script, not calligraphic.
+// This aligns with unicode-math and math fonts (except Cambria Math).
+["mathscr", "textscr", "Script-Regular"], // A-Z script
+["", "", ""], // a-z script. No font
+["", "", ""], // A-Z bold script. No font
+["", "", ""], // a-z bold script. No font
+["mathfrak", "textfrak", "Fraktur-Regular"], // A-Z Fraktur
+["mathfrak", "textfrak", "Fraktur-Regular"], // a-z Fraktur
+["mathbb", "textbb", "AMS-Regular"], // A-Z double-struck
+["mathbb", "textbb", "AMS-Regular"], // k double-struck
+// Note that we are using a bold font, but font metrics for regular Fraktur.
+["mathboldfrak", "textboldfrak", "Fraktur-Regular"], // A-Z bold Fraktur
+["mathboldfrak", "textboldfrak", "Fraktur-Regular"], // a-z bold Fraktur
+["mathsf", "textsf", "SansSerif-Regular"], // A-Z sans-serif
+["mathsf", "textsf", "SansSerif-Regular"], // a-z sans-serif
+["mathboldsf", "textboldsf", "SansSerif-Bold"], // A-Z bold sans-serif
+["mathboldsf", "textboldsf", "SansSerif-Bold"], // a-z bold sans-serif
+["mathitsf", "textitsf", "SansSerif-Italic"], // A-Z italic sans-serif
+["mathitsf", "textitsf", "SansSerif-Italic"], // a-z italic sans-serif
+["", "", ""], // A-Z bold italic sans. No font
+["", "", ""], // a-z bold italic sans. No font
+["mathtt", "texttt", "Typewriter-Regular"], // A-Z monospace
+["mathtt", "texttt", "Typewriter-Regular"] // a-z monospace
+];
+var wideNumeralData = [["mathbf", "textbf", "Main-Bold"], // 0-9 bold
+["", "", ""], // 0-9 double-struck. No KaTeX font.
+["mathsf", "textsf", "SansSerif-Regular"], // 0-9 sans-serif
+["mathboldsf", "textboldsf", "SansSerif-Bold"], // 0-9 bold sans-serif
+["mathtt", "texttt", "Typewriter-Regular"] // 0-9 monospace
+];
+var wideCharacterFont = function wideCharacterFont(wideChar, mode) {
+ // IE doesn't support codePointAt(). So work with the surrogate pair.
+ var H = wideChar.charCodeAt(0); // high surrogate
+
+ var L = wideChar.charCodeAt(1); // low surrogate
+
+ var codePoint = (H - 0xD800) * 0x400 + (L - 0xDC00) + 0x10000;
+ var j = mode === "math" ? 0 : 1; // column index for CSS class.
+
+ if (0x1D400 <= codePoint && codePoint < 0x1D6A4) {
+ // wideLatinLetterData contains exactly 26 chars on each row.
+ // So we can calculate the relevant row. No traverse necessary.
+ var i = Math.floor((codePoint - 0x1D400) / 26);
+ return [wideLatinLetterData[i][2], wideLatinLetterData[i][j]];
+ } else if (0x1D7CE <= codePoint && codePoint <= 0x1D7FF) {
+ // Numerals, ten per row.
+ var _i = Math.floor((codePoint - 0x1D7CE) / 10);
+
+ return [wideNumeralData[_i][2], wideNumeralData[_i][j]];
+ } else if (codePoint === 0x1D6A5 || codePoint === 0x1D6A6) {
+ // dotless i or j
+ return [wideLatinLetterData[0][2], wideLatinLetterData[0][j]];
+ } else if (0x1D6A6 < codePoint && codePoint < 0x1D7CE) {
+ // Greek letters. Not supported, yet.
+ return ["", ""];
+ } else {
+ // We don't support any wide characters outside 1D400–1D7FF.
+ throw new ParseError("Unsupported character: " + wideChar);
+ }
+};
+
+/* eslint no-console:0 */
+
+/**
+ * Looks up the given symbol in fontMetrics, after applying any symbol
+ * replacements defined in symbol.js
+ */
+var lookupSymbol = function lookupSymbol(value, // TODO(#963): Use a union type for this.
+fontName, mode) {
+ // Replace the value with its replaced value from symbol.js
+ if (symbols[mode][value] && symbols[mode][value].replace) {
+ value = symbols[mode][value].replace;
+ }
+
+ return {
+ value: value,
+ metrics: getCharacterMetrics(value, fontName, mode)
+ };
+};
+/**
+ * Makes a symbolNode after translation via the list of symbols in symbols.js.
+ * Correctly pulls out metrics for the character, and optionally takes a list of
+ * classes to be attached to the node.
+ *
+ * TODO: make argument order closer to makeSpan
+ * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which
+ * should if present come first in `classes`.
+ * TODO(#953): Make `options` mandatory and always pass it in.
+ */
+
+
+var makeSymbol = function makeSymbol(value, fontName, mode, options, classes) {
+ var lookup = lookupSymbol(value, fontName, mode);
+ var metrics = lookup.metrics;
+ value = lookup.value;
+ var symbolNode;
+
+ if (metrics) {
+ var italic = metrics.italic;
+
+ if (mode === "text" || options && options.font === "mathit") {
+ italic = 0;
+ }
+
+ symbolNode = new SymbolNode(value, metrics.height, metrics.depth, italic, metrics.skew, metrics.width, classes);
+ } else {
+ // TODO(emily): Figure out a good way to only print this in development
+ typeof console !== "undefined" && console.warn("No character metrics " + ("for '" + value + "' in style '" + fontName + "' and mode '" + mode + "'"));
+ symbolNode = new SymbolNode(value, 0, 0, 0, 0, 0, classes);
+ }
+
+ if (options) {
+ symbolNode.maxFontSize = options.sizeMultiplier;
+
+ if (options.style.isTight()) {
+ symbolNode.classes.push("mtight");
+ }
+
+ var color = options.getColor();
+
+ if (color) {
+ symbolNode.style.color = color;
+ }
+ }
+
+ return symbolNode;
+};
+/**
+ * Makes a symbol in Main-Regular or AMS-Regular.
+ * Used for rel, bin, open, close, inner, and punct.
+ */
+
+
+var mathsym = function mathsym(value, mode, options, classes) {
+ if (classes === void 0) {
+ classes = [];
+ }
+
+ // Decide what font to render the symbol in by its entry in the symbols
+ // table.
+ // Have a special case for when the value = \ because the \ is used as a
+ // textord in unsupported command errors but cannot be parsed as a regular
+ // text ordinal and is therefore not present as a symbol in the symbols
+ // table for text, as well as a special case for boldsymbol because it
+ // can be used for bold + and -
+ if (options.font === "boldsymbol" && lookupSymbol(value, "Main-Bold", mode).metrics) {
+ return makeSymbol(value, "Main-Bold", mode, options, classes.concat(["mathbf"]));
+ } else if (value === "\\" || symbols[mode][value].font === "main") {
+ return makeSymbol(value, "Main-Regular", mode, options, classes);
+ } else {
+ return makeSymbol(value, "AMS-Regular", mode, options, classes.concat(["amsrm"]));
+ }
+};
+/**
+ * Determines which of the two font names (Main-Bold and Math-BoldItalic) and
+ * corresponding style tags (mathbf or boldsymbol) to use for font "boldsymbol",
+ * depending on the symbol. Use this function instead of fontMap for font
+ * "boldsymbol".
+ */
+
+
+var boldsymbol = function boldsymbol(value, mode, options, classes, type) {
+ if (type !== "textord" && lookupSymbol(value, "Math-BoldItalic", mode).metrics) {
+ return {
+ fontName: "Math-BoldItalic",
+ fontClass: "boldsymbol"
+ };
+ } else {
+ // Some glyphs do not exist in Math-BoldItalic so we need to use
+ // Main-Bold instead.
+ return {
+ fontName: "Main-Bold",
+ fontClass: "mathbf"
+ };
+ }
+};
+/**
+ * Makes either a mathord or textord in the correct font and color.
+ */
+
+
+var makeOrd = function makeOrd(group, options, type) {
+ var mode = group.mode;
+ var text = group.text;
+ var classes = ["mord"]; // Math mode or Old font (i.e. \rm)
+
+ var isFont = mode === "math" || mode === "text" && options.font;
+ var fontOrFamily = isFont ? options.font : options.fontFamily;
+ var wideFontName = "";
+ var wideFontClass = "";
+
+ if (text.charCodeAt(0) === 0xD835) {
+ [wideFontName, wideFontClass] = wideCharacterFont(text, mode);
+ }
+
+ if (wideFontName.length > 0) {
+ // surrogate pairs get special treatment
+ return makeSymbol(text, wideFontName, mode, options, classes.concat(wideFontClass));
+ } else if (fontOrFamily) {
+ var fontName;
+ var fontClasses;
+
+ if (fontOrFamily === "boldsymbol") {
+ var fontData = boldsymbol(text, mode, options, classes, type);
+ fontName = fontData.fontName;
+ fontClasses = [fontData.fontClass];
+ } else if (isFont) {
+ fontName = fontMap[fontOrFamily].fontName;
+ fontClasses = [fontOrFamily];
+ } else {
+ fontName = retrieveTextFontName(fontOrFamily, options.fontWeight, options.fontShape);
+ fontClasses = [fontOrFamily, options.fontWeight, options.fontShape];
+ }
+
+ if (lookupSymbol(text, fontName, mode).metrics) {
+ return makeSymbol(text, fontName, mode, options, classes.concat(fontClasses));
+ } else if (ligatures.hasOwnProperty(text) && fontName.slice(0, 10) === "Typewriter") {
+ // Deconstruct ligatures in monospace fonts (\texttt, \tt).
+ var parts = [];
+
+ for (var i = 0; i < text.length; i++) {
+ parts.push(makeSymbol(text[i], fontName, mode, options, classes.concat(fontClasses)));
+ }
+
+ return makeFragment(parts);
+ }
+ } // Makes a symbol in the default font for mathords and textords.
+
+
+ if (type === "mathord") {
+ return makeSymbol(text, "Math-Italic", mode, options, classes.concat(["mathnormal"]));
+ } else if (type === "textord") {
+ var font = symbols[mode][text] && symbols[mode][text].font;
+
+ if (font === "ams") {
+ var _fontName = retrieveTextFontName("amsrm", options.fontWeight, options.fontShape);
+
+ return makeSymbol(text, _fontName, mode, options, classes.concat("amsrm", options.fontWeight, options.fontShape));
+ } else if (font === "main" || !font) {
+ var _fontName2 = retrieveTextFontName("textrm", options.fontWeight, options.fontShape);
+
+ return makeSymbol(text, _fontName2, mode, options, classes.concat(options.fontWeight, options.fontShape));
+ } else {
+ // fonts added by plugins
+ var _fontName3 = retrieveTextFontName(font, options.fontWeight, options.fontShape); // We add font name as a css class
+
+
+ return makeSymbol(text, _fontName3, mode, options, classes.concat(_fontName3, options.fontWeight, options.fontShape));
+ }
+ } else {
+ throw new Error("unexpected type: " + type + " in makeOrd");
+ }
+};
+/**
+ * Returns true if subsequent symbolNodes have the same classes, skew, maxFont,
+ * and styles.
+ */
+
+
+var canCombine = (prev, next) => {
+ if (createClass(prev.classes) !== createClass(next.classes) || prev.skew !== next.skew || prev.maxFontSize !== next.maxFontSize) {
+ return false;
+ } // If prev and next both are just "mbin"s or "mord"s we don't combine them
+ // so that the proper spacing can be preserved.
+
+
+ if (prev.classes.length === 1) {
+ var cls = prev.classes[0];
+
+ if (cls === "mbin" || cls === "mord") {
+ return false;
+ }
+ }
+
+ for (var style in prev.style) {
+ if (prev.style.hasOwnProperty(style) && prev.style[style] !== next.style[style]) {
+ return false;
+ }
+ }
+
+ for (var _style in next.style) {
+ if (next.style.hasOwnProperty(_style) && prev.style[_style] !== next.style[_style]) {
+ return false;
+ }
+ }
+
+ return true;
+};
+/**
+ * Combine consecutive domTree.symbolNodes into a single symbolNode.
+ * Note: this function mutates the argument.
+ */
+
+
+var tryCombineChars = chars => {
+ for (var i = 0; i < chars.length - 1; i++) {
+ var prev = chars[i];
+ var next = chars[i + 1];
+
+ if (prev instanceof SymbolNode && next instanceof SymbolNode && canCombine(prev, next)) {
+ prev.text += next.text;
+ prev.height = Math.max(prev.height, next.height);
+ prev.depth = Math.max(prev.depth, next.depth); // Use the last character's italic correction since we use
+ // it to add padding to the right of the span created from
+ // the combined characters.
+
+ prev.italic = next.italic;
+ chars.splice(i + 1, 1);
+ i--;
+ }
+ }
+
+ return chars;
+};
+/**
+ * Calculate the height, depth, and maxFontSize of an element based on its
+ * children.
+ */
+
+
+var sizeElementFromChildren = function sizeElementFromChildren(elem) {
+ var height = 0;
+ var depth = 0;
+ var maxFontSize = 0;
+
+ for (var i = 0; i < elem.children.length; i++) {
+ var child = elem.children[i];
+
+ if (child.height > height) {
+ height = child.height;
+ }
+
+ if (child.depth > depth) {
+ depth = child.depth;
+ }
+
+ if (child.maxFontSize > maxFontSize) {
+ maxFontSize = child.maxFontSize;
+ }
+ }
+
+ elem.height = height;
+ elem.depth = depth;
+ elem.maxFontSize = maxFontSize;
+};
+/**
+ * Makes a span with the given list of classes, list of children, and options.
+ *
+ * TODO(#953): Ensure that `options` is always provided (currently some call
+ * sites don't pass it) and make the type below mandatory.
+ * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which
+ * should if present come first in `classes`.
+ */
+
+
+var makeSpan$2 = function makeSpan(classes, children, options, style) {
+ var span = new Span(classes, children, options, style);
+ sizeElementFromChildren(span);
+ return span;
+}; // SVG one is simpler -- doesn't require height, depth, max-font setting.
+// This is also a separate method for typesafety.
+
+
+var makeSvgSpan = (classes, children, options, style) => new Span(classes, children, options, style);
+
+var makeLineSpan = function makeLineSpan(className, options, thickness) {
+ var line = makeSpan$2([className], [], options);
+ line.height = Math.max(thickness || options.fontMetrics().defaultRuleThickness, options.minRuleThickness);
+ line.style.borderBottomWidth = makeEm(line.height);
+ line.maxFontSize = 1.0;
+ return line;
+};
+/**
+ * Makes an anchor with the given href, list of classes, list of children,
+ * and options.
+ */
+
+
+var makeAnchor = function makeAnchor(href, classes, children, options) {
+ var anchor = new Anchor(href, classes, children, options);
+ sizeElementFromChildren(anchor);
+ return anchor;
+};
+/**
+ * Makes a document fragment with the given list of children.
+ */
+
+
+var makeFragment = function makeFragment(children) {
+ var fragment = new DocumentFragment(children);
+ sizeElementFromChildren(fragment);
+ return fragment;
+};
+/**
+ * Wraps group in a span if it's a document fragment, allowing to apply classes
+ * and styles
+ */
+
+
+var wrapFragment = function wrapFragment(group, options) {
+ if (group instanceof DocumentFragment) {
+ return makeSpan$2([], [group], options);
+ }
+
+ return group;
+}; // These are exact object types to catch typos in the names of the optional fields.
+
+
+// Computes the updated `children` list and the overall depth.
+//
+// This helper function for makeVList makes it easier to enforce type safety by
+// allowing early exits (returns) in the logic.
+var getVListChildrenAndDepth = function getVListChildrenAndDepth(params) {
+ if (params.positionType === "individualShift") {
+ var oldChildren = params.children;
+ var children = [oldChildren[0]]; // Add in kerns to the list of params.children to get each element to be
+ // shifted to the correct specified shift
+
+ var _depth = -oldChildren[0].shift - oldChildren[0].elem.depth;
+
+ var currPos = _depth;
+
+ for (var i = 1; i < oldChildren.length; i++) {
+ var diff = -oldChildren[i].shift - currPos - oldChildren[i].elem.depth;
+ var size = diff - (oldChildren[i - 1].elem.height + oldChildren[i - 1].elem.depth);
+ currPos = currPos + diff;
+ children.push({
+ type: "kern",
+ size
+ });
+ children.push(oldChildren[i]);
+ }
+
+ return {
+ children,
+ depth: _depth
+ };
+ }
+
+ var depth;
+
+ if (params.positionType === "top") {
+ // We always start at the bottom, so calculate the bottom by adding up
+ // all the sizes
+ var bottom = params.positionData;
+
+ for (var _i = 0; _i < params.children.length; _i++) {
+ var child = params.children[_i];
+ bottom -= child.type === "kern" ? child.size : child.elem.height + child.elem.depth;
+ }
+
+ depth = bottom;
+ } else if (params.positionType === "bottom") {
+ depth = -params.positionData;
+ } else {
+ var firstChild = params.children[0];
+
+ if (firstChild.type !== "elem") {
+ throw new Error('First child must have type "elem".');
+ }
+
+ if (params.positionType === "shift") {
+ depth = -firstChild.elem.depth - params.positionData;
+ } else if (params.positionType === "firstBaseline") {
+ depth = -firstChild.elem.depth;
+ } else {
+ throw new Error("Invalid positionType " + params.positionType + ".");
+ }
+ }
+
+ return {
+ children: params.children,
+ depth
+ };
+};
+/**
+ * Makes a vertical list by stacking elements and kerns on top of each other.
+ * Allows for many different ways of specifying the positioning method.
+ *
+ * See VListParam documentation above.
+ */
+
+
+var makeVList = function makeVList(params, options) {
+ var {
+ children,
+ depth
+ } = getVListChildrenAndDepth(params); // Create a strut that is taller than any list item. The strut is added to
+ // each item, where it will determine the item's baseline. Since it has
+ // `overflow:hidden`, the strut's top edge will sit on the item's line box's
+ // top edge and the strut's bottom edge will sit on the item's baseline,
+ // with no additional line-height spacing. This allows the item baseline to
+ // be positioned precisely without worrying about font ascent and
+ // line-height.
+
+ var pstrutSize = 0;
+
+ for (var i = 0; i < children.length; i++) {
+ var child = children[i];
+
+ if (child.type === "elem") {
+ var elem = child.elem;
+ pstrutSize = Math.max(pstrutSize, elem.maxFontSize, elem.height);
+ }
+ }
+
+ pstrutSize += 2;
+ var pstrut = makeSpan$2(["pstrut"], []);
+ pstrut.style.height = makeEm(pstrutSize); // Create a new list of actual children at the correct offsets
+
+ var realChildren = [];
+ var minPos = depth;
+ var maxPos = depth;
+ var currPos = depth;
+
+ for (var _i2 = 0; _i2 < children.length; _i2++) {
+ var _child = children[_i2];
+
+ if (_child.type === "kern") {
+ currPos += _child.size;
+ } else {
+ var _elem = _child.elem;
+ var classes = _child.wrapperClasses || [];
+ var style = _child.wrapperStyle || {};
+ var childWrap = makeSpan$2(classes, [pstrut, _elem], undefined, style);
+ childWrap.style.top = makeEm(-pstrutSize - currPos - _elem.depth);
+
+ if (_child.marginLeft) {
+ childWrap.style.marginLeft = _child.marginLeft;
+ }
+
+ if (_child.marginRight) {
+ childWrap.style.marginRight = _child.marginRight;
+ }
+
+ realChildren.push(childWrap);
+ currPos += _elem.height + _elem.depth;
+ }
+
+ minPos = Math.min(minPos, currPos);
+ maxPos = Math.max(maxPos, currPos);
+ } // The vlist contents go in a table-cell with `vertical-align:bottom`.
+ // This cell's bottom edge will determine the containing table's baseline
+ // without overly expanding the containing line-box.
+
+
+ var vlist = makeSpan$2(["vlist"], realChildren);
+ vlist.style.height = makeEm(maxPos); // A second row is used if necessary to represent the vlist's depth.
+
+ var rows;
+
+ if (minPos < 0) {
+ // We will define depth in an empty span with display: table-cell.
+ // It should render with the height that we define. But Chrome, in
+ // contenteditable mode only, treats that span as if it contains some
+ // text content. And that min-height over-rides our desired height.
+ // So we put another empty span inside the depth strut span.
+ var emptySpan = makeSpan$2([], []);
+ var depthStrut = makeSpan$2(["vlist"], [emptySpan]);
+ depthStrut.style.height = makeEm(-minPos); // Safari wants the first row to have inline content; otherwise it
+ // puts the bottom of the *second* row on the baseline.
+
+ var topStrut = makeSpan$2(["vlist-s"], [new SymbolNode("\u200b")]);
+ rows = [makeSpan$2(["vlist-r"], [vlist, topStrut]), makeSpan$2(["vlist-r"], [depthStrut])];
+ } else {
+ rows = [makeSpan$2(["vlist-r"], [vlist])];
+ }
+
+ var vtable = makeSpan$2(["vlist-t"], rows);
+
+ if (rows.length === 2) {
+ vtable.classes.push("vlist-t2");
+ }
+
+ vtable.height = maxPos;
+ vtable.depth = -minPos;
+ return vtable;
+}; // Glue is a concept from TeX which is a flexible space between elements in
+// either a vertical or horizontal list. In KaTeX, at least for now, it's
+// static space between elements in a horizontal layout.
+
+
+var makeGlue = (measurement, options) => {
+ // Make an empty span for the space
+ var rule = makeSpan$2(["mspace"], [], options);
+ var size = calculateSize(measurement, options);
+ rule.style.marginRight = makeEm(size);
+ return rule;
+}; // Takes font options, and returns the appropriate fontLookup name
+
+
+var retrieveTextFontName = function retrieveTextFontName(fontFamily, fontWeight, fontShape) {
+ var baseFontName = "";
+
+ switch (fontFamily) {
+ case "amsrm":
+ baseFontName = "AMS";
+ break;
+
+ case "textrm":
+ baseFontName = "Main";
+ break;
+
+ case "textsf":
+ baseFontName = "SansSerif";
+ break;
+
+ case "texttt":
+ baseFontName = "Typewriter";
+ break;
+
+ default:
+ baseFontName = fontFamily;
+ // use fonts added by a plugin
+ }
+
+ var fontStylesName;
+
+ if (fontWeight === "textbf" && fontShape === "textit") {
+ fontStylesName = "BoldItalic";
+ } else if (fontWeight === "textbf") {
+ fontStylesName = "Bold";
+ } else if (fontWeight === "textit") {
+ fontStylesName = "Italic";
+ } else {
+ fontStylesName = "Regular";
+ }
+
+ return baseFontName + "-" + fontStylesName;
+};
+/**
+ * Maps TeX font commands to objects containing:
+ * - variant: string used for "mathvariant" attribute in buildMathML.js
+ * - fontName: the "style" parameter to fontMetrics.getCharacterMetrics
+ */
+// A map between tex font commands an MathML mathvariant attribute values
+
+
+var fontMap = {
+ // styles
+ "mathbf": {
+ variant: "bold",
+ fontName: "Main-Bold"
+ },
+ "mathrm": {
+ variant: "normal",
+ fontName: "Main-Regular"
+ },
+ "textit": {
+ variant: "italic",
+ fontName: "Main-Italic"
+ },
+ "mathit": {
+ variant: "italic",
+ fontName: "Main-Italic"
+ },
+ "mathnormal": {
+ variant: "italic",
+ fontName: "Math-Italic"
+ },
+ // "boldsymbol" is missing because they require the use of multiple fonts:
+ // Math-BoldItalic and Main-Bold. This is handled by a special case in
+ // makeOrd which ends up calling boldsymbol.
+ // families
+ "mathbb": {
+ variant: "double-struck",
+ fontName: "AMS-Regular"
+ },
+ "mathcal": {
+ variant: "script",
+ fontName: "Caligraphic-Regular"
+ },
+ "mathfrak": {
+ variant: "fraktur",
+ fontName: "Fraktur-Regular"
+ },
+ "mathscr": {
+ variant: "script",
+ fontName: "Script-Regular"
+ },
+ "mathsf": {
+ variant: "sans-serif",
+ fontName: "SansSerif-Regular"
+ },
+ "mathtt": {
+ variant: "monospace",
+ fontName: "Typewriter-Regular"
+ }
+};
+var svgData = {
+ // path, width, height
+ vec: ["vec", 0.471, 0.714],
+ // values from the font glyph
+ oiintSize1: ["oiintSize1", 0.957, 0.499],
+ // oval to overlay the integrand
+ oiintSize2: ["oiintSize2", 1.472, 0.659],
+ oiiintSize1: ["oiiintSize1", 1.304, 0.499],
+ oiiintSize2: ["oiiintSize2", 1.98, 0.659]
+};
+
+var staticSvg = function staticSvg(value, options) {
+ // Create a span with inline SVG for the element.
+ var [pathName, width, height] = svgData[value];
+ var path = new PathNode(pathName);
+ var svgNode = new SvgNode([path], {
+ "width": makeEm(width),
+ "height": makeEm(height),
+ // Override CSS rule `.katex svg { width: 100% }`
+ "style": "width:" + makeEm(width),
+ "viewBox": "0 0 " + 1000 * width + " " + 1000 * height,
+ "preserveAspectRatio": "xMinYMin"
+ });
+ var span = makeSvgSpan(["overlay"], [svgNode], options);
+ span.height = height;
+ span.style.height = makeEm(height);
+ span.style.width = makeEm(width);
+ return span;
+};
+
+var buildCommon = {
+ fontMap,
+ makeSymbol,
+ mathsym,
+ makeSpan: makeSpan$2,
+ makeSvgSpan,
+ makeLineSpan,
+ makeAnchor,
+ makeFragment,
+ wrapFragment,
+ makeVList,
+ makeOrd,
+ makeGlue,
+ staticSvg,
+ svgData,
+ tryCombineChars
+};
+
+/**
+ * Describes spaces between different classes of atoms.
+ */
+var thinspace = {
+ number: 3,
+ unit: "mu"
+};
+var mediumspace = {
+ number: 4,
+ unit: "mu"
+};
+var thickspace = {
+ number: 5,
+ unit: "mu"
+}; // Making the type below exact with all optional fields doesn't work due to
+// - https://github.com/facebook/flow/issues/4582
+// - https://github.com/facebook/flow/issues/5688
+// However, since *all* fields are optional, $Shape<> works as suggested in 5688
+// above.
+
+// Spacing relationships for display and text styles
+var spacings = {
+ mord: {
+ mop: thinspace,
+ mbin: mediumspace,
+ mrel: thickspace,
+ minner: thinspace
+ },
+ mop: {
+ mord: thinspace,
+ mop: thinspace,
+ mrel: thickspace,
+ minner: thinspace
+ },
+ mbin: {
+ mord: mediumspace,
+ mop: mediumspace,
+ mopen: mediumspace,
+ minner: mediumspace
+ },
+ mrel: {
+ mord: thickspace,
+ mop: thickspace,
+ mopen: thickspace,
+ minner: thickspace
+ },
+ mopen: {},
+ mclose: {
+ mop: thinspace,
+ mbin: mediumspace,
+ mrel: thickspace,
+ minner: thinspace
+ },
+ mpunct: {
+ mord: thinspace,
+ mop: thinspace,
+ mrel: thickspace,
+ mopen: thinspace,
+ mclose: thinspace,
+ mpunct: thinspace,
+ minner: thinspace
+ },
+ minner: {
+ mord: thinspace,
+ mop: thinspace,
+ mbin: mediumspace,
+ mrel: thickspace,
+ mopen: thinspace,
+ mpunct: thinspace,
+ minner: thinspace
+ }
+}; // Spacing relationships for script and scriptscript styles
+
+var tightSpacings = {
+ mord: {
+ mop: thinspace
+ },
+ mop: {
+ mord: thinspace,
+ mop: thinspace
+ },
+ mbin: {},
+ mrel: {},
+ mopen: {},
+ mclose: {
+ mop: thinspace
+ },
+ mpunct: {},
+ minner: {
+ mop: thinspace
+ }
+};
+
+/** Context provided to function handlers for error messages. */
+// Note: reverse the order of the return type union will cause a flow error.
+// See https://github.com/facebook/flow/issues/3663.
+// More general version of `HtmlBuilder` for nodes (e.g. \sum, accent types)
+// whose presence impacts super/subscripting. In this case, ParseNode<"supsub">
+// delegates its HTML building to the HtmlBuilder corresponding to these nodes.
+
+/**
+ * Final function spec for use at parse time.
+ * This is almost identical to `FunctionPropSpec`, except it
+ * 1. includes the function handler, and
+ * 2. requires all arguments except argTypes.
+ * It is generated by `defineFunction()` below.
+ */
+
+/**
+ * All registered functions.
+ * `functions.js` just exports this same dictionary again and makes it public.
+ * `Parser.js` requires this dictionary.
+ */
+var _functions = {};
+/**
+ * All HTML builders. Should be only used in the `define*` and the `build*ML`
+ * functions.
+ */
+
+var _htmlGroupBuilders = {};
+/**
+ * All MathML builders. Should be only used in the `define*` and the `build*ML`
+ * functions.
+ */
+
+var _mathmlGroupBuilders = {};
+function defineFunction(_ref) {
+ var {
+ type,
+ names,
+ props,
+ handler,
+ htmlBuilder,
+ mathmlBuilder
+ } = _ref;
+ // Set default values of functions
+ var data = {
+ type,
+ numArgs: props.numArgs,
+ argTypes: props.argTypes,
+ allowedInArgument: !!props.allowedInArgument,
+ allowedInText: !!props.allowedInText,
+ allowedInMath: props.allowedInMath === undefined ? true : props.allowedInMath,
+ numOptionalArgs: props.numOptionalArgs || 0,
+ infix: !!props.infix,
+ primitive: !!props.primitive,
+ handler: handler
+ };
+
+ for (var i = 0; i < names.length; ++i) {
+ _functions[names[i]] = data;
+ }
+
+ if (type) {
+ if (htmlBuilder) {
+ _htmlGroupBuilders[type] = htmlBuilder;
+ }
+
+ if (mathmlBuilder) {
+ _mathmlGroupBuilders[type] = mathmlBuilder;
+ }
+ }
+}
+/**
+ * Use this to register only the HTML and MathML builders for a function (e.g.
+ * if the function's ParseNode is generated in Parser.js rather than via a
+ * stand-alone handler provided to `defineFunction`).
+ */
+
+function defineFunctionBuilders(_ref2) {
+ var {
+ type,
+ htmlBuilder,
+ mathmlBuilder
+ } = _ref2;
+ defineFunction({
+ type,
+ names: [],
+ props: {
+ numArgs: 0
+ },
+
+ handler() {
+ throw new Error('Should never be called.');
+ },
+
+ htmlBuilder,
+ mathmlBuilder
+ });
+}
+var normalizeArgument = function normalizeArgument(arg) {
+ return arg.type === "ordgroup" && arg.body.length === 1 ? arg.body[0] : arg;
+}; // Since the corresponding buildHTML/buildMathML function expects a
+// list of elements, we normalize for different kinds of arguments
+
+var ordargument = function ordargument(arg) {
+ return arg.type === "ordgroup" ? arg.body : [arg];
+};
+
+/**
+ * This file does the main work of building a domTree structure from a parse
+ * tree. The entry point is the `buildHTML` function, which takes a parse tree.
+ * Then, the buildExpression, buildGroup, and various groupBuilders functions
+ * are called, to produce a final HTML tree.
+ */
+var makeSpan$1 = buildCommon.makeSpan; // Binary atoms (first class `mbin`) change into ordinary atoms (`mord`)
+// depending on their surroundings. See TeXbook pg. 442-446, Rules 5 and 6,
+// and the text before Rule 19.
+
+var binLeftCanceller = ["leftmost", "mbin", "mopen", "mrel", "mop", "mpunct"];
+var binRightCanceller = ["rightmost", "mrel", "mclose", "mpunct"];
+var styleMap$1 = {
+ "display": Style$1.DISPLAY,
+ "text": Style$1.TEXT,
+ "script": Style$1.SCRIPT,
+ "scriptscript": Style$1.SCRIPTSCRIPT
+};
+var DomEnum = {
+ mord: "mord",
+ mop: "mop",
+ mbin: "mbin",
+ mrel: "mrel",
+ mopen: "mopen",
+ mclose: "mclose",
+ mpunct: "mpunct",
+ minner: "minner"
+};
+
+/**
+ * Take a list of nodes, build them in order, and return a list of the built
+ * nodes. documentFragments are flattened into their contents, so the
+ * returned list contains no fragments. `isRealGroup` is true if `expression`
+ * is a real group (no atoms will be added on either side), as opposed to
+ * a partial group (e.g. one created by \color). `surrounding` is an array
+ * consisting type of nodes that will be added to the left and right.
+ */
+var buildExpression$1 = function buildExpression(expression, options, isRealGroup, surrounding) {
+ if (surrounding === void 0) {
+ surrounding = [null, null];
+ }
+
+ // Parse expressions into `groups`.
+ var groups = [];
+
+ for (var i = 0; i < expression.length; i++) {
+ var output = buildGroup$1(expression[i], options);
+
+ if (output instanceof DocumentFragment) {
+ var children = output.children;
+ groups.push(...children);
+ } else {
+ groups.push(output);
+ }
+ } // Combine consecutive domTree.symbolNodes into a single symbolNode.
+
+
+ buildCommon.tryCombineChars(groups); // If `expression` is a partial group, let the parent handle spacings
+ // to avoid processing groups multiple times.
+
+ if (!isRealGroup) {
+ return groups;
+ }
+
+ var glueOptions = options;
+
+ if (expression.length === 1) {
+ var node = expression[0];
+
+ if (node.type === "sizing") {
+ glueOptions = options.havingSize(node.size);
+ } else if (node.type === "styling") {
+ glueOptions = options.havingStyle(styleMap$1[node.style]);
+ }
+ } // Dummy spans for determining spacings between surrounding atoms.
+ // If `expression` has no atoms on the left or right, class "leftmost"
+ // or "rightmost", respectively, is used to indicate it.
+
+
+ var dummyPrev = makeSpan$1([surrounding[0] || "leftmost"], [], options);
+ var dummyNext = makeSpan$1([surrounding[1] || "rightmost"], [], options); // TODO: These code assumes that a node's math class is the first element
+ // of its `classes` array. A later cleanup should ensure this, for
+ // instance by changing the signature of `makeSpan`.
+ // Before determining what spaces to insert, perform bin cancellation.
+ // Binary operators change to ordinary symbols in some contexts.
+
+ var isRoot = isRealGroup === "root";
+ traverseNonSpaceNodes(groups, (node, prev) => {
+ var prevType = prev.classes[0];
+ var type = node.classes[0];
+
+ if (prevType === "mbin" && utils.contains(binRightCanceller, type)) {
+ prev.classes[0] = "mord";
+ } else if (type === "mbin" && utils.contains(binLeftCanceller, prevType)) {
+ node.classes[0] = "mord";
+ }
+ }, {
+ node: dummyPrev
+ }, dummyNext, isRoot);
+ traverseNonSpaceNodes(groups, (node, prev) => {
+ var prevType = getTypeOfDomTree(prev);
+ var type = getTypeOfDomTree(node); // 'mtight' indicates that the node is script or scriptscript style.
+
+ var space = prevType && type ? node.hasClass("mtight") ? tightSpacings[prevType][type] : spacings[prevType][type] : null;
+
+ if (space) {
+ // Insert glue (spacing) after the `prev`.
+ return buildCommon.makeGlue(space, glueOptions);
+ }
+ }, {
+ node: dummyPrev
+ }, dummyNext, isRoot);
+ return groups;
+}; // Depth-first traverse non-space `nodes`, calling `callback` with the current and
+// previous node as arguments, optionally returning a node to insert after the
+// previous node. `prev` is an object with the previous node and `insertAfter`
+// function to insert after it. `next` is a node that will be added to the right.
+// Used for bin cancellation and inserting spacings.
+
+var traverseNonSpaceNodes = function traverseNonSpaceNodes(nodes, callback, prev, next, isRoot) {
+ if (next) {
+ // temporarily append the right node, if exists
+ nodes.push(next);
+ }
+
+ var i = 0;
+
+ for (; i < nodes.length; i++) {
+ var node = nodes[i];
+ var partialGroup = checkPartialGroup(node);
+
+ if (partialGroup) {
+ // Recursive DFS
+ // $FlowFixMe: make nodes a $ReadOnlyArray by returning a new array
+ traverseNonSpaceNodes(partialGroup.children, callback, prev, null, isRoot);
+ continue;
+ } // Ignore explicit spaces (e.g., \;, \,) when determining what implicit
+ // spacing should go between atoms of different classes
+
+
+ var nonspace = !node.hasClass("mspace");
+
+ if (nonspace) {
+ var result = callback(node, prev.node);
+
+ if (result) {
+ if (prev.insertAfter) {
+ prev.insertAfter(result);
+ } else {
+ // insert at front
+ nodes.unshift(result);
+ i++;
+ }
+ }
+ }
+
+ if (nonspace) {
+ prev.node = node;
+ } else if (isRoot && node.hasClass("newline")) {
+ prev.node = makeSpan$1(["leftmost"]); // treat like beginning of line
+ }
+
+ prev.insertAfter = (index => n => {
+ nodes.splice(index + 1, 0, n);
+ i++;
+ })(i);
+ }
+
+ if (next) {
+ nodes.pop();
+ }
+}; // Check if given node is a partial group, i.e., does not affect spacing around.
+
+
+var checkPartialGroup = function checkPartialGroup(node) {
+ if (node instanceof DocumentFragment || node instanceof Anchor || node instanceof Span && node.hasClass("enclosing")) {
+ return node;
+ }
+
+ return null;
+}; // Return the outermost node of a domTree.
+
+
+var getOutermostNode = function getOutermostNode(node, side) {
+ var partialGroup = checkPartialGroup(node);
+
+ if (partialGroup) {
+ var children = partialGroup.children;
+
+ if (children.length) {
+ if (side === "right") {
+ return getOutermostNode(children[children.length - 1], "right");
+ } else if (side === "left") {
+ return getOutermostNode(children[0], "left");
+ }
+ }
+ }
+
+ return node;
+}; // Return math atom class (mclass) of a domTree.
+// If `side` is given, it will get the type of the outermost node at given side.
+
+
+var getTypeOfDomTree = function getTypeOfDomTree(node, side) {
+ if (!node) {
+ return null;
+ }
+
+ if (side) {
+ node = getOutermostNode(node, side);
+ } // This makes a lot of assumptions as to where the type of atom
+ // appears. We should do a better job of enforcing this.
+
+
+ return DomEnum[node.classes[0]] || null;
+};
+var makeNullDelimiter = function makeNullDelimiter(options, classes) {
+ var moreClasses = ["nulldelimiter"].concat(options.baseSizingClasses());
+ return makeSpan$1(classes.concat(moreClasses));
+};
+/**
+ * buildGroup is the function that takes a group and calls the correct groupType
+ * function for it. It also handles the interaction of size and style changes
+ * between parents and children.
+ */
+
+var buildGroup$1 = function buildGroup(group, options, baseOptions) {
+ if (!group) {
+ return makeSpan$1();
+ }
+
+ if (_htmlGroupBuilders[group.type]) {
+ // Call the groupBuilders function
+ // $FlowFixMe
+ var groupNode = _htmlGroupBuilders[group.type](group, options); // If the size changed between the parent and the current group, account
+ // for that size difference.
+
+ if (baseOptions && options.size !== baseOptions.size) {
+ groupNode = makeSpan$1(options.sizingClasses(baseOptions), [groupNode], options);
+ var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier;
+ groupNode.height *= multiplier;
+ groupNode.depth *= multiplier;
+ }
+
+ return groupNode;
+ } else {
+ throw new ParseError("Got group of unknown type: '" + group.type + "'");
+ }
+};
+/**
+ * Combine an array of HTML DOM nodes (e.g., the output of `buildExpression`)
+ * into an unbreakable HTML node of class .base, with proper struts to
+ * guarantee correct vertical extent. `buildHTML` calls this repeatedly to
+ * make up the entire expression as a sequence of unbreakable units.
+ */
+
+function buildHTMLUnbreakable(children, options) {
+ // Compute height and depth of this chunk.
+ var body = makeSpan$1(["base"], children, options); // Add strut, which ensures that the top of the HTML element falls at
+ // the height of the expression, and the bottom of the HTML element
+ // falls at the depth of the expression.
+
+ var strut = makeSpan$1(["strut"]);
+ strut.style.height = makeEm(body.height + body.depth);
+
+ if (body.depth) {
+ strut.style.verticalAlign = makeEm(-body.depth);
+ }
+
+ body.children.unshift(strut);
+ return body;
+}
+/**
+ * Take an entire parse tree, and build it into an appropriate set of HTML
+ * nodes.
+ */
+
+
+function buildHTML(tree, options) {
+ // Strip off outer tag wrapper for processing below.
+ var tag = null;
+
+ if (tree.length === 1 && tree[0].type === "tag") {
+ tag = tree[0].tag;
+ tree = tree[0].body;
+ } // Build the expression contained in the tree
+
+
+ var expression = buildExpression$1(tree, options, "root");
+ var eqnNum;
+
+ if (expression.length === 2 && expression[1].hasClass("tag")) {
+ // An environment with automatic equation numbers, e.g. {gather}.
+ eqnNum = expression.pop();
+ }
+
+ var children = []; // Create one base node for each chunk between potential line breaks.
+ // The TeXBook [p.173] says "A formula will be broken only after a
+ // relation symbol like $=$ or $<$ or $\rightarrow$, or after a binary
+ // operation symbol like $+$ or $-$ or $\times$, where the relation or
+ // binary operation is on the ``outer level'' of the formula (i.e., not
+ // enclosed in {...} and not part of an \over construction)."
+
+ var parts = [];
+
+ for (var i = 0; i < expression.length; i++) {
+ parts.push(expression[i]);
+
+ if (expression[i].hasClass("mbin") || expression[i].hasClass("mrel") || expression[i].hasClass("allowbreak")) {
+ // Put any post-operator glue on same line as operator.
+ // Watch for \nobreak along the way, and stop at \newline.
+ var nobreak = false;
+
+ while (i < expression.length - 1 && expression[i + 1].hasClass("mspace") && !expression[i + 1].hasClass("newline")) {
+ i++;
+ parts.push(expression[i]);
+
+ if (expression[i].hasClass("nobreak")) {
+ nobreak = true;
+ }
+ } // Don't allow break if \nobreak among the post-operator glue.
+
+
+ if (!nobreak) {
+ children.push(buildHTMLUnbreakable(parts, options));
+ parts = [];
+ }
+ } else if (expression[i].hasClass("newline")) {
+ // Write the line except the newline
+ parts.pop();
+
+ if (parts.length > 0) {
+ children.push(buildHTMLUnbreakable(parts, options));
+ parts = [];
+ } // Put the newline at the top level
+
+
+ children.push(expression[i]);
+ }
+ }
+
+ if (parts.length > 0) {
+ children.push(buildHTMLUnbreakable(parts, options));
+ } // Now, if there was a tag, build it too and append it as a final child.
+
+
+ var tagChild;
+
+ if (tag) {
+ tagChild = buildHTMLUnbreakable(buildExpression$1(tag, options, true));
+ tagChild.classes = ["tag"];
+ children.push(tagChild);
+ } else if (eqnNum) {
+ children.push(eqnNum);
+ }
+
+ var htmlNode = makeSpan$1(["katex-html"], children);
+ htmlNode.setAttribute("aria-hidden", "true"); // Adjust the strut of the tag to be the maximum height of all children
+ // (the height of the enclosing htmlNode) for proper vertical alignment.
+
+ if (tagChild) {
+ var strut = tagChild.children[0];
+ strut.style.height = makeEm(htmlNode.height + htmlNode.depth);
+
+ if (htmlNode.depth) {
+ strut.style.verticalAlign = makeEm(-htmlNode.depth);
+ }
+ }
+
+ return htmlNode;
+}
+
+/**
+ * These objects store data about MathML nodes. This is the MathML equivalent
+ * of the types in domTree.js. Since MathML handles its own rendering, and
+ * since we're mainly using MathML to improve accessibility, we don't manage
+ * any of the styling state that the plain DOM nodes do.
+ *
+ * The `toNode` and `toMarkup` functions work similarly to how they do in
+ * domTree.js, creating namespaced DOM nodes and HTML text markup respectively.
+ */
+function newDocumentFragment(children) {
+ return new DocumentFragment(children);
+}
+/**
+ * This node represents a general purpose MathML node of any type. The
+ * constructor requires the type of node to create (for example, `"mo"` or
+ * `"mspace"`, corresponding to `` and `` tags).
+ */
+
+class MathNode {
+ constructor(type, children, classes) {
+ this.type = void 0;
+ this.attributes = void 0;
+ this.children = void 0;
+ this.classes = void 0;
+ this.type = type;
+ this.attributes = {};
+ this.children = children || [];
+ this.classes = classes || [];
+ }
+ /**
+ * Sets an attribute on a MathML node. MathML depends on attributes to convey a
+ * semantic content, so this is used heavily.
+ */
+
+
+ setAttribute(name, value) {
+ this.attributes[name] = value;
+ }
+ /**
+ * Gets an attribute on a MathML node.
+ */
+
+
+ getAttribute(name) {
+ return this.attributes[name];
+ }
+ /**
+ * Converts the math node into a MathML-namespaced DOM element.
+ */
+
+
+ toNode() {
+ var node = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type);
+
+ for (var attr in this.attributes) {
+ if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
+ node.setAttribute(attr, this.attributes[attr]);
+ }
+ }
+
+ if (this.classes.length > 0) {
+ node.className = createClass(this.classes);
+ }
+
+ for (var i = 0; i < this.children.length; i++) {
+ node.appendChild(this.children[i].toNode());
+ }
+
+ return node;
+ }
+ /**
+ * Converts the math node into an HTML markup string.
+ */
+
+
+ toMarkup() {
+ var markup = "<" + this.type; // Add the attributes
+
+ for (var attr in this.attributes) {
+ if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
+ markup += " " + attr + "=\"";
+ markup += utils.escape(this.attributes[attr]);
+ markup += "\"";
+ }
+ }
+
+ if (this.classes.length > 0) {
+ markup += " class =\"" + utils.escape(createClass(this.classes)) + "\"";
+ }
+
+ markup += ">";
+
+ for (var i = 0; i < this.children.length; i++) {
+ markup += this.children[i].toMarkup();
+ }
+
+ markup += "" + this.type + ">";
+ return markup;
+ }
+ /**
+ * Converts the math node into a string, similar to innerText, but escaped.
+ */
+
+
+ toText() {
+ return this.children.map(child => child.toText()).join("");
+ }
+
+}
+/**
+ * This node represents a piece of text.
+ */
+
+class TextNode {
+ constructor(text) {
+ this.text = void 0;
+ this.text = text;
+ }
+ /**
+ * Converts the text node into a DOM text node.
+ */
+
+
+ toNode() {
+ return document.createTextNode(this.text);
+ }
+ /**
+ * Converts the text node into escaped HTML markup
+ * (representing the text itself).
+ */
+
+
+ toMarkup() {
+ return utils.escape(this.toText());
+ }
+ /**
+ * Converts the text node into a string
+ * (representing the text itself).
+ */
+
+
+ toText() {
+ return this.text;
+ }
+
+}
+/**
+ * This node represents a space, but may render as or as text,
+ * depending on the width.
+ */
+
+class SpaceNode {
+ /**
+ * Create a Space node with width given in CSS ems.
+ */
+ constructor(width) {
+ this.width = void 0;
+ this.character = void 0;
+ this.width = width; // See https://www.w3.org/TR/2000/WD-MathML2-20000328/chapter6.html
+ // for a table of space-like characters. We use Unicode
+ // representations instead of &LongNames; as it's not clear how to
+ // make the latter via document.createTextNode.
+
+ if (width >= 0.05555 && width <= 0.05556) {
+ this.character = "\u200a"; //  
+ } else if (width >= 0.1666 && width <= 0.1667) {
+ this.character = "\u2009"; //  
+ } else if (width >= 0.2222 && width <= 0.2223) {
+ this.character = "\u2005"; //  
+ } else if (width >= 0.2777 && width <= 0.2778) {
+ this.character = "\u2005\u200a"; //   
+ } else if (width >= -0.05556 && width <= -0.05555) {
+ this.character = "\u200a\u2063"; // ​
+ } else if (width >= -0.1667 && width <= -0.1666) {
+ this.character = "\u2009\u2063"; // ​
+ } else if (width >= -0.2223 && width <= -0.2222) {
+ this.character = "\u205f\u2063"; // ​
+ } else if (width >= -0.2778 && width <= -0.2777) {
+ this.character = "\u2005\u2063"; // ​
+ } else {
+ this.character = null;
+ }
+ }
+ /**
+ * Converts the math node into a MathML-namespaced DOM element.
+ */
+
+
+ toNode() {
+ if (this.character) {
+ return document.createTextNode(this.character);
+ } else {
+ var node = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace");
+ node.setAttribute("width", makeEm(this.width));
+ return node;
+ }
+ }
+ /**
+ * Converts the math node into an HTML markup string.
+ */
+
+
+ toMarkup() {
+ if (this.character) {
+ return "" + this.character + " ";
+ } else {
+ return " ";
+ }
+ }
+ /**
+ * Converts the math node into a string, similar to innerText.
+ */
+
+
+ toText() {
+ if (this.character) {
+ return this.character;
+ } else {
+ return " ";
+ }
+ }
+
+}
+
+var mathMLTree = {
+ MathNode,
+ TextNode,
+ SpaceNode,
+ newDocumentFragment
+};
+
+/**
+ * This file converts a parse tree into a corresponding MathML tree. The main
+ * entry point is the `buildMathML` function, which takes a parse tree from the
+ * parser.
+ */
+
+/**
+ * Takes a symbol and converts it into a MathML text node after performing
+ * optional replacement from symbols.js.
+ */
+var makeText = function makeText(text, mode, options) {
+ if (symbols[mode][text] && symbols[mode][text].replace && text.charCodeAt(0) !== 0xD835 && !(ligatures.hasOwnProperty(text) && options && (options.fontFamily && options.fontFamily.slice(4, 6) === "tt" || options.font && options.font.slice(4, 6) === "tt"))) {
+ text = symbols[mode][text].replace;
+ }
+
+ return new mathMLTree.TextNode(text);
+};
+/**
+ * Wrap the given array of nodes in an node if needed, i.e.,
+ * unless the array has length 1. Always returns a single node.
+ */
+
+var makeRow = function makeRow(body) {
+ if (body.length === 1) {
+ return body[0];
+ } else {
+ return new mathMLTree.MathNode("mrow", body);
+ }
+};
+/**
+ * Returns the math variant as a string or null if none is required.
+ */
+
+var getVariant = function getVariant(group, options) {
+ // Handle \text... font specifiers as best we can.
+ // MathML has a limited list of allowable mathvariant specifiers; see
+ // https://www.w3.org/TR/MathML3/chapter3.html#presm.commatt
+ if (options.fontFamily === "texttt") {
+ return "monospace";
+ } else if (options.fontFamily === "textsf") {
+ if (options.fontShape === "textit" && options.fontWeight === "textbf") {
+ return "sans-serif-bold-italic";
+ } else if (options.fontShape === "textit") {
+ return "sans-serif-italic";
+ } else if (options.fontWeight === "textbf") {
+ return "bold-sans-serif";
+ } else {
+ return "sans-serif";
+ }
+ } else if (options.fontShape === "textit" && options.fontWeight === "textbf") {
+ return "bold-italic";
+ } else if (options.fontShape === "textit") {
+ return "italic";
+ } else if (options.fontWeight === "textbf") {
+ return "bold";
+ }
+
+ var font = options.font;
+
+ if (!font || font === "mathnormal") {
+ return null;
+ }
+
+ var mode = group.mode;
+
+ if (font === "mathit") {
+ return "italic";
+ } else if (font === "boldsymbol") {
+ return group.type === "textord" ? "bold" : "bold-italic";
+ } else if (font === "mathbf") {
+ return "bold";
+ } else if (font === "mathbb") {
+ return "double-struck";
+ } else if (font === "mathfrak") {
+ return "fraktur";
+ } else if (font === "mathscr" || font === "mathcal") {
+ // MathML makes no distinction between script and calligraphic
+ return "script";
+ } else if (font === "mathsf") {
+ return "sans-serif";
+ } else if (font === "mathtt") {
+ return "monospace";
+ }
+
+ var text = group.text;
+
+ if (utils.contains(["\\imath", "\\jmath"], text)) {
+ return null;
+ }
+
+ if (symbols[mode][text] && symbols[mode][text].replace) {
+ text = symbols[mode][text].replace;
+ }
+
+ var fontName = buildCommon.fontMap[font].fontName;
+
+ if (getCharacterMetrics(text, fontName, mode)) {
+ return buildCommon.fontMap[font].variant;
+ }
+
+ return null;
+};
+/**
+ * Takes a list of nodes, builds them, and returns a list of the generated
+ * MathML nodes. Also combine consecutive outputs into a single
+ * tag.
+ */
+
+var buildExpression = function buildExpression(expression, options, isOrdgroup) {
+ if (expression.length === 1) {
+ var group = buildGroup(expression[0], options);
+
+ if (isOrdgroup && group instanceof MathNode && group.type === "mo") {
+ // When TeX writers want to suppress spacing on an operator,
+ // they often put the operator by itself inside braces.
+ group.setAttribute("lspace", "0em");
+ group.setAttribute("rspace", "0em");
+ }
+
+ return [group];
+ }
+
+ var groups = [];
+ var lastGroup;
+
+ for (var i = 0; i < expression.length; i++) {
+ var _group = buildGroup(expression[i], options);
+
+ if (_group instanceof MathNode && lastGroup instanceof MathNode) {
+ // Concatenate adjacent s
+ if (_group.type === 'mtext' && lastGroup.type === 'mtext' && _group.getAttribute('mathvariant') === lastGroup.getAttribute('mathvariant')) {
+ lastGroup.children.push(..._group.children);
+ continue; // Concatenate adjacent s
+ } else if (_group.type === 'mn' && lastGroup.type === 'mn') {
+ lastGroup.children.push(..._group.children);
+ continue; // Concatenate ... followed by .
+ } else if (_group.type === 'mi' && _group.children.length === 1 && lastGroup.type === 'mn') {
+ var child = _group.children[0];
+
+ if (child instanceof TextNode && child.text === '.') {
+ lastGroup.children.push(..._group.children);
+ continue;
+ }
+ } else if (lastGroup.type === 'mi' && lastGroup.children.length === 1) {
+ var lastChild = lastGroup.children[0];
+
+ if (lastChild instanceof TextNode && lastChild.text === '\u0338' && (_group.type === 'mo' || _group.type === 'mi' || _group.type === 'mn')) {
+ var _child = _group.children[0];
+
+ if (_child instanceof TextNode && _child.text.length > 0) {
+ // Overlay with combining character long solidus
+ _child.text = _child.text.slice(0, 1) + "\u0338" + _child.text.slice(1);
+ groups.pop();
+ }
+ }
+ }
+ }
+
+ groups.push(_group);
+ lastGroup = _group;
+ }
+
+ return groups;
+};
+/**
+ * Equivalent to buildExpression, but wraps the elements in an
+ * if there's more than one. Returns a single node instead of an array.
+ */
+
+var buildExpressionRow = function buildExpressionRow(expression, options, isOrdgroup) {
+ return makeRow(buildExpression(expression, options, isOrdgroup));
+};
+/**
+ * Takes a group from the parser and calls the appropriate groupBuilders function
+ * on it to produce a MathML node.
+ */
+
+var buildGroup = function buildGroup(group, options) {
+ if (!group) {
+ return new mathMLTree.MathNode("mrow");
+ }
+
+ if (_mathmlGroupBuilders[group.type]) {
+ // Call the groupBuilders function
+ // $FlowFixMe
+ var result = _mathmlGroupBuilders[group.type](group, options); // $FlowFixMe
+
+ return result;
+ } else {
+ throw new ParseError("Got group of unknown type: '" + group.type + "'");
+ }
+};
+/**
+ * Takes a full parse tree and settings and builds a MathML representation of
+ * it. In particular, we put the elements from building the parse tree into a
+ * tag so we can also include that TeX source as an annotation.
+ *
+ * Note that we actually return a domTree element with a `