} */
- 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/mermaid/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__(18464);
-;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-aebacdfe.js
-
-
-
-function preprocessMarkdown(markdown) {
- const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n");
- const withoutExtraSpaces = (0,esm/* dedent */.Z)(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_934d9bea.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground);
- if (useHtmlLabels) {
- const htmlText = markdownToHTML(text);
- const node = {
- isNode,
- label: (0,mermaid_934d9bea.J)(htmlText).replace(
- /fa[blrs]?:fa-[\w-]+/g,
- (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;
- }
-};
-
-
-
-/***/ }),
-
-/***/ 69138:
-/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
-"use strict";
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ diagram: () => (/* binding */ diagram)
-/* harmony export */ });
-/* harmony import */ var _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(85322);
-/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64218);
-/* harmony import */ var _createText_aebacdfe_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(69583);
-/* harmony import */ var cytoscape_dist_cytoscape_umd_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71377);
-/* harmony import */ var cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14607);
-/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(91619);
-/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(12281);
-/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(7201);
-/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27484);
-/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17967);
-/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20683);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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, 13], $V2 = [1, 12], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 20], $V6 = [1, 19], $V7 = [6, 7, 8], $V8 = [1, 26], $V9 = [1, 24], $Va = [1, 25], $Vb = [6, 7, 11], $Vc = [1, 6, 13, 15, 16, 19, 22], $Vd = [1, 33], $Ve = [1, 34], $Vf = [1, 6, 7, 11, 13, 15, 16, 19, 22];
- var parser2 = {
- trace: function trace() {
- },
- yy: {},
- symbols_: { "error": 2, "start": 3, "mindMap": 4, "spaceLines": 5, "SPACELINE": 6, "NL": 7, "MINDMAP": 8, "document": 9, "stop": 10, "EOF": 11, "statement": 12, "SPACELIST": 13, "node": 14, "ICON": 15, "CLASS": 16, "nodeWithId": 17, "nodeWithoutId": 18, "NODE_DSTART": 19, "NODE_DESCR": 20, "NODE_DEND": 21, "NODE_ID": 22, "$accept": 0, "$end": 1 },
- terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
- productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
- performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
- var $0 = $$.length - 1;
- switch (yystate) {
- case 6:
- case 7:
- return yy;
- case 8:
- yy.getLogger().trace("Stop NL ");
- break;
- case 9:
- yy.getLogger().trace("Stop EOF ");
- break;
- case 11:
- yy.getLogger().trace("Stop NL2 ");
- break;
- case 12:
- yy.getLogger().trace("Stop EOF2 ");
- break;
- case 15:
- yy.getLogger().info("Node: ", $$[$0].id);
- yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type);
- break;
- case 16:
- yy.getLogger().trace("Icon: ", $$[$0]);
- yy.decorateNode({ icon: $$[$0] });
- break;
- case 17:
- case 21:
- yy.decorateNode({ class: $$[$0] });
- break;
- case 18:
- yy.getLogger().trace("SPACELIST");
- break;
- case 19:
- yy.getLogger().trace("Node: ", $$[$0].id);
- yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type);
- break;
- case 20:
- yy.decorateNode({ icon: $$[$0] });
- break;
- case 25:
- yy.getLogger().trace("node found ..", $$[$0 - 2]);
- this.$ = { id: $$[$0 - 1], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) };
- break;
- case 26:
- this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT };
- break;
- case 27:
- yy.getLogger().trace("node found ..", $$[$0 - 3]);
- this.$ = { id: $$[$0 - 3], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) };
- break;
- }
- },
- table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: $V0 }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: $V0 }, { 6: $V1, 7: [1, 10], 9: 9, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($V7, [2, 3]), { 1: [2, 2] }, o($V7, [2, 4]), o($V7, [2, 5]), { 1: [2, 6], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V1, 9: 22, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V8, 7: $V9, 10: 23, 11: $Va }, o($Vb, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: $V5, 22: $V6 }), o($Vb, [2, 18]), o($Vb, [2, 19]), o($Vb, [2, 20]), o($Vb, [2, 21]), o($Vb, [2, 23]), o($Vb, [2, 24]), o($Vb, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: $V8, 7: $V9, 10: 32, 11: $Va }, { 1: [2, 7], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($Vc, [2, 14], { 7: $Vd, 11: $Ve }), o($Vf, [2, 8]), o($Vf, [2, 9]), o($Vf, [2, 10]), o($Vb, [2, 15]), o($Vb, [2, 16]), o($Vb, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, o($Vc, [2, 13], { 7: $Vd, 11: $Ve }), o($Vf, [2, 11]), o($Vf, [2, 12]), { 21: [1, 37] }, o($Vb, [2, 25]), o($Vb, [2, 27])],
- defaultActions: { 2: [2, 1], 6: [2, 2] },
- parseError: function parseError2(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 lex() {
- 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 = lex();
- }
- 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 parseError2(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 lex() {
- 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: { "case-insensitive": true },
- performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
- switch ($avoiding_name_collisions) {
- case 0:
- yy.getLogger().trace("Found comment", yy_.yytext);
- return 6;
- case 1:
- return 8;
- case 2:
- this.begin("CLASS");
- break;
- case 3:
- this.popState();
- return 16;
- case 4:
- this.popState();
- break;
- case 5:
- yy.getLogger().trace("Begin icon");
- this.begin("ICON");
- break;
- case 6:
- yy.getLogger().trace("SPACELINE");
- return 6;
- case 7:
- return 7;
- case 8:
- return 15;
- case 9:
- yy.getLogger().trace("end icon");
- this.popState();
- break;
- case 10:
- yy.getLogger().trace("Exploding node");
- this.begin("NODE");
- return 19;
- case 11:
- yy.getLogger().trace("Cloud");
- this.begin("NODE");
- return 19;
- case 12:
- yy.getLogger().trace("Explosion Bang");
- this.begin("NODE");
- return 19;
- case 13:
- yy.getLogger().trace("Cloud Bang");
- this.begin("NODE");
- return 19;
- case 14:
- this.begin("NODE");
- return 19;
- case 15:
- this.begin("NODE");
- return 19;
- case 16:
- this.begin("NODE");
- return 19;
- case 17:
- this.begin("NODE");
- return 19;
- case 18:
- return 13;
- case 19:
- return 22;
- case 20:
- return 11;
- case 21:
- this.begin("NSTR2");
- break;
- case 22:
- return "NODE_DESCR";
- case 23:
- this.popState();
- break;
- case 24:
- yy.getLogger().trace("Starting NSTR");
- this.begin("NSTR");
- break;
- case 25:
- yy.getLogger().trace("description:", yy_.yytext);
- return "NODE_DESCR";
- case 26:
- this.popState();
- break;
- case 27:
- this.popState();
- yy.getLogger().trace("node end ))");
- return "NODE_DEND";
- case 28:
- this.popState();
- yy.getLogger().trace("node end )");
- return "NODE_DEND";
- case 29:
- this.popState();
- yy.getLogger().trace("node end ...", yy_.yytext);
- return "NODE_DEND";
- case 30:
- this.popState();
- yy.getLogger().trace("node end ((");
- return "NODE_DEND";
- case 31:
- this.popState();
- yy.getLogger().trace("node end (-");
- return "NODE_DEND";
- case 32:
- this.popState();
- yy.getLogger().trace("node end (-");
- return "NODE_DEND";
- case 33:
- this.popState();
- yy.getLogger().trace("node end ((");
- return "NODE_DEND";
- case 34:
- this.popState();
- yy.getLogger().trace("node end ((");
- return "NODE_DEND";
- case 35:
- yy.getLogger().trace("Long description:", yy_.yytext);
- return 20;
- case 36:
- yy.getLogger().trace("Long description:", yy_.yytext);
- return 20;
- }
- },
- rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
- conditions: { "CLASS": { "rules": [3, 4], "inclusive": false }, "ICON": { "rules": [8, 9], "inclusive": false }, "NSTR2": { "rules": [22, 23], "inclusive": false }, "NSTR": { "rules": [25, 26], "inclusive": false }, "NODE": { "rules": [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "inclusive": true } }
- };
- return lexer2;
- }();
- parser2.lexer = lexer;
- function Parser() {
- this.yy = {};
- }
- Parser.prototype = parser2;
- parser2.Parser = Parser;
- return new Parser();
-}();
-parser.parser = parser;
-const mindmapParser = parser;
-const sanitizeText = (text) => (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.d)(text, (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.c)());
-let nodes = [];
-let cnt = 0;
-let elements = {};
-const clear = () => {
- nodes = [];
- cnt = 0;
- elements = {};
-};
-const getParent = function(level) {
- for (let i = nodes.length - 1; i >= 0; i--) {
- if (nodes[i].level < level) {
- return nodes[i];
- }
- }
- return null;
-};
-const getMindmap = () => {
- return nodes.length > 0 ? nodes[0] : null;
-};
-const addNode = (level, id, descr, type) => {
- _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.l.info("addNode", level, id, descr, type);
- const conf = (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.c)();
- const node = {
- id: cnt++,
- nodeId: sanitizeText(id),
- level,
- descr: sanitizeText(descr),
- type,
- children: [],
- width: (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.c)().mindmap.maxNodeWidth
- };
- switch (node.type) {
- case nodeType.ROUNDED_RECT:
- node.padding = 2 * conf.mindmap.padding;
- break;
- case nodeType.RECT:
- node.padding = 2 * conf.mindmap.padding;
- break;
- case nodeType.HEXAGON:
- node.padding = 2 * conf.mindmap.padding;
- break;
- default:
- node.padding = conf.mindmap.padding;
- }
- const parent = getParent(level);
- if (parent) {
- parent.children.push(node);
- nodes.push(node);
- } else {
- if (nodes.length === 0) {
- nodes.push(node);
- } else {
- let error = new Error(
- 'There can be only one root. No parent could be found for ("' + node.descr + '")'
- );
- error.hash = {
- text: "branch " + name,
- token: "branch " + name,
- line: "1",
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
- expected: ['"checkout ' + name + '"']
- };
- throw error;
- }
- }
-};
-const nodeType = {
- DEFAULT: 0,
- NO_BORDER: 0,
- ROUNDED_RECT: 1,
- RECT: 2,
- CIRCLE: 3,
- CLOUD: 4,
- BANG: 5,
- HEXAGON: 6
-};
-const getType = (startStr, endStr) => {
- _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("In get type", startStr, endStr);
- switch (startStr) {
- case "[":
- return nodeType.RECT;
- case "(":
- return endStr === ")" ? nodeType.ROUNDED_RECT : nodeType.CLOUD;
- case "((":
- return nodeType.CIRCLE;
- case ")":
- return nodeType.CLOUD;
- case "))":
- return nodeType.BANG;
- case "{{":
- return nodeType.HEXAGON;
- default:
- return nodeType.DEFAULT;
- }
-};
-const setElementForId = (id, element) => {
- elements[id] = element;
-};
-const decorateNode = (decoration) => {
- const node = nodes[nodes.length - 1];
- if (decoration && decoration.icon) {
- node.icon = sanitizeText(decoration.icon);
- }
- if (decoration && decoration.class) {
- node.class = sanitizeText(decoration.class);
- }
-};
-const type2Str = (type) => {
- switch (type) {
- case nodeType.DEFAULT:
- return "no-border";
- case nodeType.RECT:
- return "rect";
- case nodeType.ROUNDED_RECT:
- return "rounded-rect";
- case nodeType.CIRCLE:
- return "circle";
- case nodeType.CLOUD:
- return "cloud";
- case nodeType.BANG:
- return "bang";
- case nodeType.HEXAGON:
- return "hexgon";
- default:
- return "no-border";
- }
-};
-let parseError;
-const setErrorHandler = (handler) => {
- parseError = handler;
-};
-const getLogger = () => _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.l;
-const getNodeById = (id) => nodes[id];
-const getElementById = (id) => elements[id];
-const mindmapDb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- addNode,
- clear,
- decorateNode,
- getElementById,
- getLogger,
- getMindmap,
- getNodeById,
- getType,
- nodeType,
- get parseError() {
- return parseError;
- },
- sanitizeText,
- setElementForId,
- setErrorHandler,
- type2Str
-}, Symbol.toStringTag, { value: "Module" }));
-const MAX_SECTIONS = 12;
-const defaultBkg = function(elem, node, section) {
- const rd = 5;
- elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr(
- "d",
- `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z`
- );
- elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height);
-};
-const rectBkg = function(elem, node) {
- elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("height", node.height).attr("width", node.width);
-};
-const cloudBkg = function(elem, node) {
- const w = node.width;
- const h = node.height;
- const r1 = 0.15 * w;
- const r2 = 0.25 * w;
- const r3 = 0.35 * w;
- const r4 = 0.2 * w;
- elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr(
- "d",
- `M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1}
- a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1}
- a${r2},${r2} 1 0,1 ${w * 0.35},${1 * w * 0.2}
-
- a${r1},${r1} 1 0,1 ${w * 0.15},${1 * h * 0.35}
- a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${1 * h * 0.65}
-
- a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15}
- a${r3},${r3} 1 0,1 ${-1 * w * 0.5},${0}
- a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15}
-
- a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35}
- a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65}
-
- H0 V0 Z`
- );
-};
-const bangBkg = function(elem, node) {
- const w = node.width;
- const h = node.height;
- const r = 0.15 * w;
- elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr(
- "d",
- `M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1}
- a${r},${r} 1 0,0 ${w * 0.25},${0}
- a${r},${r} 1 0,0 ${w * 0.25},${0}
- a${r},${r} 1 0,0 ${w * 0.25},${1 * h * 0.1}
-
- a${r},${r} 1 0,0 ${w * 0.15},${1 * h * 0.33}
- a${r * 0.8},${r * 0.8} 1 0,0 ${0},${1 * h * 0.34}
- a${r},${r} 1 0,0 ${-1 * w * 0.15},${1 * h * 0.33}
-
- a${r},${r} 1 0,0 ${-1 * w * 0.25},${h * 0.15}
- a${r},${r} 1 0,0 ${-1 * w * 0.25},${0}
- a${r},${r} 1 0,0 ${-1 * w * 0.25},${0}
- a${r},${r} 1 0,0 ${-1 * w * 0.25},${-1 * h * 0.15}
-
- a${r},${r} 1 0,0 ${-1 * w * 0.1},${-1 * h * 0.33}
- a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34}
- a${r},${r} 1 0,0 ${w * 0.1},${-1 * h * 0.33}
-
- H0 V0 Z`
- );
-};
-const circleBkg = function(elem, node) {
- elem.append("circle").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("r", node.width / 2);
-};
-function insertPolygonShape(parent, w, h, points, node) {
- return parent.insert("polygon", ":first-child").attr(
- "points",
- points.map(function(d) {
- return d.x + "," + d.y;
- }).join(" ")
- ).attr("transform", "translate(" + (node.width - w) / 2 + ", " + h + ")");
-}
-const hexagonBkg = function(elem, node) {
- const h = node.height;
- const f = 4;
- const m = h / f;
- const w = node.width - node.padding + 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 }
- ];
- insertPolygonShape(elem, w, h, points, node);
-};
-const roundedRectBkg = function(elem, node) {
- elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("height", node.height).attr("rx", node.padding).attr("ry", node.padding).attr("width", node.width);
-};
-const drawNode = function(elem, node, fullSection, conf) {
- const htmlLabels = conf.htmlLabels;
- const section = fullSection % (MAX_SECTIONS - 1);
- const nodeElem = elem.append("g");
- node.section = section;
- let sectionClass = "section-" + section;
- if (section < 0) {
- sectionClass += " section-root";
- }
- nodeElem.attr("class", (node.class ? node.class + " " : "") + "mindmap-node " + sectionClass);
- const bkgElem = nodeElem.append("g");
- const textElem = nodeElem.append("g");
- const description = node.descr.replace(/(
)/g, "\n");
- (0,_createText_aebacdfe_js__WEBPACK_IMPORTED_MODULE_7__.a)(textElem, description, {
- useHtmlLabels: htmlLabels,
- width: node.width,
- classes: "mindmap-node-label"
- });
- if (!htmlLabels) {
- textElem.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle");
- }
- const bbox = textElem.node().getBBox();
- const fontSize = conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize;
- node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding;
- node.width = bbox.width + 2 * node.padding;
- if (node.icon) {
- if (node.type === nodeType.CIRCLE) {
- node.height += 50;
- node.width += 50;
- const icon = nodeElem.append("foreignObject").attr("height", "50px").attr("width", node.width).attr("style", "text-align: center;");
- icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon);
- textElem.attr(
- "transform",
- "translate(" + node.width / 2 + ", " + (node.height / 2 - 1.5 * node.padding) + ")"
- );
- } else {
- node.width += 50;
- const orgHeight = node.height;
- node.height = Math.max(orgHeight, 60);
- const heightDiff = Math.abs(node.height - orgHeight);
- const icon = nodeElem.append("foreignObject").attr("width", "60px").attr("height", node.height).attr("style", "text-align: center;margin-top:" + heightDiff / 2 + "px;");
- icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon);
- textElem.attr(
- "transform",
- "translate(" + (25 + node.width / 2) + ", " + (heightDiff / 2 + node.padding / 2) + ")"
- );
- }
- } else {
- if (!htmlLabels) {
- const dx = node.width / 2;
- const dy = node.padding / 2;
- textElem.attr("transform", "translate(" + dx + ", " + dy + ")");
- } else {
- const dx = (node.width - bbox.width) / 2;
- const dy = (node.height - bbox.height) / 2;
- textElem.attr("transform", "translate(" + dx + ", " + dy + ")");
- }
- }
- switch (node.type) {
- case nodeType.DEFAULT:
- defaultBkg(bkgElem, node, section);
- break;
- case nodeType.ROUNDED_RECT:
- roundedRectBkg(bkgElem, node);
- break;
- case nodeType.RECT:
- rectBkg(bkgElem, node);
- break;
- case nodeType.CIRCLE:
- bkgElem.attr("transform", "translate(" + node.width / 2 + ", " + +node.height / 2 + ")");
- circleBkg(bkgElem, node);
- break;
- case nodeType.CLOUD:
- cloudBkg(bkgElem, node);
- break;
- case nodeType.BANG:
- bangBkg(bkgElem, node);
- break;
- case nodeType.HEXAGON:
- hexagonBkg(bkgElem, node);
- break;
- }
- setElementForId(node.id, nodeElem);
- return node.height;
-};
-const drawEdge = function drawEdge2(edgesElem, mindmap, parent, depth, fullSection) {
- const section = fullSection % (MAX_SECTIONS - 1);
- const sx = parent.x + parent.width / 2;
- const sy = parent.y + parent.height / 2;
- const ex = mindmap.x + mindmap.width / 2;
- const ey = mindmap.y + mindmap.height / 2;
- const mx = ex > sx ? sx + Math.abs(sx - ex) / 2 : sx - Math.abs(sx - ex) / 2;
- const my = ey > sy ? sy + Math.abs(sy - ey) / 2 : sy - Math.abs(sy - ey) / 2;
- const qx = ex > sx ? Math.abs(sx - mx) / 2 + sx : -Math.abs(sx - mx) / 2 + sx;
- const qy = ey > sy ? Math.abs(sy - my) / 2 + sy : -Math.abs(sy - my) / 2 + sy;
- edgesElem.append("path").attr(
- "d",
- parent.direction === "TB" || parent.direction === "BT" ? `M${sx},${sy} Q${sx},${qy} ${mx},${my} T${ex},${ey}` : `M${sx},${sy} Q${qx},${sy} ${mx},${my} T${ex},${ey}`
- ).attr("class", "edge section-edge-" + section + " edge-depth-" + depth);
-};
-const positionNode = function(node) {
- const nodeElem = getElementById(node.id);
- const x = node.x || 0;
- const y = node.y || 0;
- nodeElem.attr("transform", "translate(" + x + "," + y + ")");
-};
-const svgDraw = { drawNode, positionNode, drawEdge };
-cytoscape_dist_cytoscape_umd_js__WEBPACK_IMPORTED_MODULE_1__.use(cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2__);
-function drawNodes(svg, mindmap, section, conf) {
- svgDraw.drawNode(svg, mindmap, section, conf);
- if (mindmap.children) {
- mindmap.children.forEach((child, index) => {
- drawNodes(svg, child, section < 0 ? index : section, conf);
- });
- }
-}
-function drawEdges(edgesEl, cy) {
- cy.edges().map((edge, id) => {
- const data = edge.data();
- if (edge[0]._private.bodyBounds) {
- const bounds = edge[0]._private.rscratch;
- _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.l.trace("Edge: ", id, data);
- edgesEl.insert("path").attr(
- "d",
- `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} `
- ).attr("class", "edge section-edge-" + data.section + " edge-depth-" + data.depth);
- }
- });
-}
-function addNodes(mindmap, cy, conf, level) {
- cy.add({
- group: "nodes",
- data: {
- id: mindmap.id,
- labelText: mindmap.descr,
- height: mindmap.height,
- width: mindmap.width,
- level,
- nodeId: mindmap.id,
- padding: mindmap.padding,
- type: mindmap.type
- },
- position: {
- x: mindmap.x,
- y: mindmap.y
- }
- });
- if (mindmap.children) {
- mindmap.children.forEach((child) => {
- addNodes(child, cy, conf, level + 1);
- cy.add({
- group: "edges",
- data: {
- id: `${mindmap.id}_${child.id}`,
- source: mindmap.id,
- target: child.id,
- depth: level,
- section: child.section
- }
- });
- });
- }
-}
-function layoutMindmap(node, conf) {
- return new Promise((resolve) => {
- const renderEl = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body").append("div").attr("id", "cy").attr("style", "display:none");
- const cy = cytoscape_dist_cytoscape_umd_js__WEBPACK_IMPORTED_MODULE_1__({
- container: document.getElementById("cy"),
- // container to render in
- style: [
- {
- selector: "edge",
- style: {
- "curve-style": "bezier"
- }
- }
- ]
- });
- renderEl.remove();
- addNodes(node, cy, conf, 0);
- cy.nodes().forEach(function(n) {
- n.layoutDimensions = () => {
- const data = n.data();
- return { w: data.width, h: data.height };
- };
- });
- cy.layout({
- name: "cose-bilkent",
- quality: "proof",
- // headless: true,
- styleEnabled: false,
- animate: false
- }).run();
- cy.ready((e) => {
- _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Ready", e);
- resolve(cy);
- });
- });
-}
-function positionNodes(cy) {
- cy.nodes().map((node, id) => {
- const data = node.data();
- data.x = node.position().x;
- data.y = node.position().y;
- svgDraw.positionNode(data);
- const el = getElementById(data.nodeId);
- _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Id:", id, "Position: (", node.position().x, ", ", node.position().y, ")", data);
- el.attr(
- "transform",
- `translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})`
- );
- el.attr("attr", `apa-${id})`);
- });
-}
-const draw = async (text, id, version, diagObj) => {
- const conf = (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.c)();
- conf.htmlLabels = false;
- _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Rendering mindmap diagram\n" + text, diagObj.parser);
- const securityLevel = (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.c)().securityLevel;
- let sandboxElement;
- if (securityLevel === "sandbox") {
- sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("#i" + id);
- }
- const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body");
- const svg = root.select("#" + id);
- svg.append("g");
- const mm = diagObj.db.getMindmap();
- const edgesElem = svg.append("g");
- edgesElem.attr("class", "mindmap-edges");
- const nodesElem = svg.append("g");
- nodesElem.attr("class", "mindmap-nodes");
- drawNodes(nodesElem, mm, -1, conf);
- const cy = await layoutMindmap(mm, conf);
- drawEdges(edgesElem, cy);
- positionNodes(cy);
- (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_6__.o)(void 0, svg, conf.mindmap.padding, conf.mindmap.useMaxWidth);
-};
-const mindmapRenderer = {
- draw
-};
-const genSections = (options) => {
- let sections = "";
- for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
- options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i];
- if ((0,khroma__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)(options["lineColor" + i])) {
- options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)(options["lineColor" + i], 20);
- } else {
- options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)(options["lineColor" + i], 20);
- }
- }
- for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
- const sw = "" + (17 - 3 * i);
- sections += `
- .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path {
- fill: ${options["cScale" + i]};
- }
- .section-${i - 1} text {
- fill: ${options["cScaleLabel" + i]};
- }
- .node-icon-${i - 1} {
- font-size: 40px;
- color: ${options["cScaleLabel" + i]};
- }
- .section-edge-${i - 1}{
- stroke: ${options["cScale" + i]};
- }
- .edge-depth-${i - 1}{
- stroke-width: ${sw};
- }
- .section-${i - 1} line {
- stroke: ${options["cScaleInv" + i]} ;
- stroke-width: 3;
- }
-
- .disabled, .disabled circle, .disabled text {
- fill: lightgray;
- }
- .disabled text {
- fill: #efefef;
- }
- `;
- }
- return sections;
-};
-const getStyles = (options) => `
- .edge {
- stroke-width: 3;
- }
- ${genSections(options)}
- .section-root rect, .section-root path, .section-root circle, .section-root polygon {
- fill: ${options.git0};
- }
- .section-root text {
- fill: ${options.gitBranchLabel0};
- }
- .icon-container {
- height:100%;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .edge {
- fill: none;
- }
- .mindmap-node-label {
- dy: 1em;
- alignment-baseline: middle;
- text-anchor: middle;
- dominant-baseline: middle;
- text-align: center;
- }
-`;
-const mindmapStyles = getStyles;
-const diagram = {
- db: mindmapDb,
- renderer: mindmapRenderer,
- parser: mindmapParser,
- styles: mindmapStyles
-};
-
-
-
-/***/ })
-
-};
-;
\ No newline at end of file
diff --git a/build/assets/js/14eb3368.a9a43217.js b/build/assets/js/14eb3368.a9a43217.js
deleted file mode 100644
index b95dc93e..00000000
--- a/build/assets/js/14eb3368.a9a43217.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[9817],{1310:(e,t,s)=>{s.d(t,{Z:()=>p});s(67294);var n=s(36905),i=s(35281),a=s(52802),r=s(48596),c=s(33692),l=s(95999),o=s(44996),d=s(85893);function m(e){return(0,d.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,d.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const u={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function h(){const e=(0,o.Z)("/");return(0,d.jsx)("li",{className:"breadcrumbs__item",children:(0,d.jsx)(c.Z,{"aria-label":(0,l.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,d.jsx)(m,{className:u.breadcrumbHomeIcon})})})}const b={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function x(e){let{children:t,href:s,isLast:n}=e;const i="breadcrumbs__link";return n?(0,d.jsx)("span",{className:i,itemProp:"name",children:t}):s?(0,d.jsx)(c.Z,{className:i,href:s,itemProp:"item",children:(0,d.jsx)("span",{itemProp:"name",children:t})}):(0,d.jsx)("span",{className:i,children:t})}function v(e){let{children:t,active:s,index:i,addMicrodata:a}=e;return(0,d.jsxs)("li",{...a&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,n.Z)("breadcrumbs__item",{"breadcrumbs__item--active":s}),children:[t,(0,d.jsx)("meta",{itemProp:"position",content:String(i+1)})]})}function p(){const e=(0,a.s1)(),t=(0,r.Ns)();return e?(0,d.jsx)("nav",{className:(0,n.Z)(i.k.docs.docBreadcrumbs,b.breadcrumbsContainer),"aria-label":(0,l.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,d.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,d.jsx)(h,{}),e.map(((t,s)=>{const n=s===e.length-1,i="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,d.jsx)(v,{active:n,index:s,addMicrodata:!!i,children:(0,d.jsx)(x,{href:i,isLast:n,children:t.label})},s)}))]})}):null}},34228:(e,t,s)=>{s.r(t),s.d(t,{default:()=>I});s(67294);var n=s(10833),i=s(52802),a=s(44996),r=s(36905),c=s(33692),l=s(13919),o=s(95999),d=s(92503);const m={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=s(85893);function h(e){let{href:t,children:s}=e;return(0,u.jsx)(c.Z,{href:t,className:(0,r.Z)("card padding--lg",m.cardContainer),children:s})}function b(e){let{href:t,icon:s,title:n,description:i}=e;return(0,u.jsxs)(h,{href:t,children:[(0,u.jsxs)(d.Z,{as:"h2",className:(0,r.Z)("text--truncate",m.cardTitle),title:n,children:[s," ",n]}),i&&(0,u.jsx)("p",{className:(0,r.Z)("text--truncate",m.cardDescription),title:i,children:i})]})}function x(e){let{item:t}=e;const s=(0,i.LM)(t);return s?(0,u.jsx)(b,{href:s,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:t.description??(0,o.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function v(e){let{item:t}=e;const s=(0,l.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",n=(0,i.xz)(t.docId??void 0);return(0,u.jsx)(b,{href:t.href,icon:s,title:t.label,description:t.description??n?.description})}function p(e){let{item:t}=e;switch(t.type){case"link":return(0,u.jsx)(v,{item:t});case"category":return(0,u.jsx)(x,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function g(e){let{className:t}=e;const s=(0,i.jA)();return(0,u.jsx)(j,{items:s.items,className:t})}function j(e){const{items:t,className:s}=e;if(!t)return(0,u.jsx)(g,{...e});const n=(0,i.MN)(t);return(0,u.jsx)("section",{className:(0,r.Z)("row",s),children:n.map(((e,t)=>(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(p,{item:e})},t)))})}var f=s(4966),N=s(23120),Z=s(44364),L=s(1310);const _={generatedIndexPage:"generatedIndexPage_vN6x",list:"list_eTzJ",title:"title_kItE"};function k(e){let{categoryGeneratedIndex:t}=e;return(0,u.jsx)(n.d,{title:t.title,description:t.description,keywords:t.keywords,image:(0,a.Z)(t.image)})}function T(e){let{categoryGeneratedIndex:t}=e;const s=(0,i.jA)();return(0,u.jsxs)("div",{className:_.generatedIndexPage,children:[(0,u.jsx)(N.Z,{}),(0,u.jsx)(L.Z,{}),(0,u.jsx)(Z.Z,{}),(0,u.jsxs)("header",{children:[(0,u.jsx)(d.Z,{as:"h1",className:_.title,children:t.title}),t.description&&(0,u.jsx)("p",{children:t.description})]}),(0,u.jsx)("article",{className:"margin-top--lg",children:(0,u.jsx)(j,{items:s.items,className:_.list})}),(0,u.jsx)("footer",{className:"margin-top--lg",children:(0,u.jsx)(f.Z,{previous:t.navigation.previous,next:t.navigation.next})})]})}function I(e){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(k,{...e}),(0,u.jsx)(T,{...e})]})}},4966:(e,t,s)=>{s.d(t,{Z:()=>l});s(67294);var n=s(95999),i=s(36905),a=s(33692),r=s(85893);function c(e){const{permalink:t,title:s,subLabel:n,isNext:c}=e;return(0,r.jsxs)(a.Z,{className:(0,i.Z)("pagination-nav__link",c?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[n&&(0,r.jsx)("div",{className:"pagination-nav__sublabel",children:n}),(0,r.jsx)("div",{className:"pagination-nav__label",children:s})]})}function l(e){const{previous:t,next:s}=e;return(0,r.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,n.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,r.jsx)(c,{...t,subLabel:(0,r.jsx)(n.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),s&&(0,r.jsx)(c,{...s,subLabel:(0,r.jsx)(n.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},44364:(e,t,s)=>{s.d(t,{Z:()=>l});s(67294);var n=s(36905),i=s(95999),a=s(35281),r=s(74477),c=s(85893);function l(e){let{className:t}=e;const s=(0,r.E)();return s.badge?(0,c.jsx)("span",{className:(0,n.Z)(t,a.k.docs.docVersionBadge,"badge badge--secondary"),children:(0,c.jsx)(i.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:s.label},children:"Version: {versionLabel}"})}):null}},23120:(e,t,s)=>{s.d(t,{Z:()=>v});s(67294);var n=s(36905),i=s(52263),a=s(33692),r=s(95999),c=s(80143),l=s(35281),o=s(60373),d=s(74477),m=s(85893);const u={unreleased:function(e){let{siteTitle:t,versionMetadata:s}=e;return(0,m.jsx)(r.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,m.jsx)("b",{children:s.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:t,versionMetadata:s}=e;return(0,m.jsx)(r.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,m.jsx)("b",{children:s.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function h(e){const t=u[e.versionMetadata.banner];return(0,m.jsx)(t,{...e})}function b(e){let{versionLabel:t,to:s,onClick:n}=e;return(0,m.jsx)(r.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,m.jsx)("b",{children:(0,m.jsx)(a.Z,{to:s,onClick:n,children:(0,m.jsx)(r.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function x(e){let{className:t,versionMetadata:s}=e;const{siteConfig:{title:a}}=(0,i.Z)(),{pluginId:r}=(0,c.gA)({failfast:!0}),{savePreferredVersionName:d}=(0,o.J)(r),{latestDocSuggestion:u,latestVersionSuggestion:x}=(0,c.Jo)(r),v=u??(p=x).docs.find((e=>e.id===p.mainDocId));var p;return(0,m.jsxs)("div",{className:(0,n.Z)(t,l.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,m.jsx)("div",{children:(0,m.jsx)(h,{siteTitle:a,versionMetadata:s})}),(0,m.jsx)("div",{className:"margin-top--md",children:(0,m.jsx)(b,{versionLabel:x.label,to:v.path,onClick:()=>d(x.name)})})]})}function v(e){let{className:t}=e;const s=(0,d.E)();return s.banner?(0,m.jsx)(x,{className:t,versionMetadata:s}):null}}}]);
\ No newline at end of file
diff --git a/build/assets/js/14eb3368.f17d6ce4.js b/build/assets/js/14eb3368.f17d6ce4.js
new file mode 100644
index 00000000..191a86c9
--- /dev/null
+++ b/build/assets/js/14eb3368.f17d6ce4.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[9817],{1310:(e,t,s)=>{s.d(t,{Z:()=>p});s(67294);var n=s(36905),i=s(35281),a=s(52802),r=s(48596),c=s(33692),l=s(95999),o=s(44996),d=s(85893);function m(e){return(0,d.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,d.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const u={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function h(){const e=(0,o.Z)("/");return(0,d.jsx)("li",{className:"breadcrumbs__item",children:(0,d.jsx)(c.Z,{"aria-label":(0,l.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,d.jsx)(m,{className:u.breadcrumbHomeIcon})})})}const b={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function x(e){let{children:t,href:s,isLast:n}=e;const i="breadcrumbs__link";return n?(0,d.jsx)("span",{className:i,itemProp:"name",children:t}):s?(0,d.jsx)(c.Z,{className:i,href:s,itemProp:"item",children:(0,d.jsx)("span",{itemProp:"name",children:t})}):(0,d.jsx)("span",{className:i,children:t})}function v(e){let{children:t,active:s,index:i,addMicrodata:a}=e;return(0,d.jsxs)("li",{...a&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,n.Z)("breadcrumbs__item",{"breadcrumbs__item--active":s}),children:[t,(0,d.jsx)("meta",{itemProp:"position",content:String(i+1)})]})}function p(){const e=(0,a.s1)(),t=(0,r.Ns)();return e?(0,d.jsx)("nav",{className:(0,n.Z)(i.k.docs.docBreadcrumbs,b.breadcrumbsContainer),"aria-label":(0,l.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,d.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,d.jsx)(h,{}),e.map(((t,s)=>{const n=s===e.length-1,i="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,d.jsx)(v,{active:n,index:s,addMicrodata:!!i,children:(0,d.jsx)(x,{href:i,isLast:n,children:t.label})},s)}))]})}):null}},34228:(e,t,s)=>{s.r(t),s.d(t,{default:()=>I});s(67294);var n=s(10833),i=s(52802),a=s(44996),r=s(36905),c=s(33692),l=s(13919),o=s(95999),d=s(86641);const m={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=s(85893);function h(e){let{href:t,children:s}=e;return(0,u.jsx)(c.Z,{href:t,className:(0,r.Z)("card padding--lg",m.cardContainer),children:s})}function b(e){let{href:t,icon:s,title:n,description:i}=e;return(0,u.jsxs)(h,{href:t,children:[(0,u.jsxs)(d.Z,{as:"h2",className:(0,r.Z)("text--truncate",m.cardTitle),title:n,children:[s," ",n]}),i&&(0,u.jsx)("p",{className:(0,r.Z)("text--truncate",m.cardDescription),title:i,children:i})]})}function x(e){let{item:t}=e;const s=(0,i.LM)(t);return s?(0,u.jsx)(b,{href:s,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:t.description??(0,o.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function v(e){let{item:t}=e;const s=(0,l.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",n=(0,i.xz)(t.docId??void 0);return(0,u.jsx)(b,{href:t.href,icon:s,title:t.label,description:t.description??n?.description})}function p(e){let{item:t}=e;switch(t.type){case"link":return(0,u.jsx)(v,{item:t});case"category":return(0,u.jsx)(x,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function g(e){let{className:t}=e;const s=(0,i.jA)();return(0,u.jsx)(j,{items:s.items,className:t})}function j(e){const{items:t,className:s}=e;if(!t)return(0,u.jsx)(g,{...e});const n=(0,i.MN)(t);return(0,u.jsx)("section",{className:(0,r.Z)("row",s),children:n.map(((e,t)=>(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(p,{item:e})},t)))})}var f=s(4966),N=s(23120),Z=s(44364),L=s(1310);const _={generatedIndexPage:"generatedIndexPage_vN6x",list:"list_eTzJ",title:"title_kItE"};function k(e){let{categoryGeneratedIndex:t}=e;return(0,u.jsx)(n.d,{title:t.title,description:t.description,keywords:t.keywords,image:(0,a.Z)(t.image)})}function T(e){let{categoryGeneratedIndex:t}=e;const s=(0,i.jA)();return(0,u.jsxs)("div",{className:_.generatedIndexPage,children:[(0,u.jsx)(N.Z,{}),(0,u.jsx)(L.Z,{}),(0,u.jsx)(Z.Z,{}),(0,u.jsxs)("header",{children:[(0,u.jsx)(d.Z,{as:"h1",className:_.title,children:t.title}),t.description&&(0,u.jsx)("p",{children:t.description})]}),(0,u.jsx)("article",{className:"margin-top--lg",children:(0,u.jsx)(j,{items:s.items,className:_.list})}),(0,u.jsx)("footer",{className:"margin-top--lg",children:(0,u.jsx)(f.Z,{previous:t.navigation.previous,next:t.navigation.next})})]})}function I(e){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(k,{...e}),(0,u.jsx)(T,{...e})]})}},4966:(e,t,s)=>{s.d(t,{Z:()=>l});s(67294);var n=s(95999),i=s(36905),a=s(33692),r=s(85893);function c(e){const{permalink:t,title:s,subLabel:n,isNext:c}=e;return(0,r.jsxs)(a.Z,{className:(0,i.Z)("pagination-nav__link",c?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[n&&(0,r.jsx)("div",{className:"pagination-nav__sublabel",children:n}),(0,r.jsx)("div",{className:"pagination-nav__label",children:s})]})}function l(e){const{previous:t,next:s}=e;return(0,r.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,n.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,r.jsx)(c,{...t,subLabel:(0,r.jsx)(n.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),s&&(0,r.jsx)(c,{...s,subLabel:(0,r.jsx)(n.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},44364:(e,t,s)=>{s.d(t,{Z:()=>l});s(67294);var n=s(36905),i=s(95999),a=s(35281),r=s(74477),c=s(85893);function l(e){let{className:t}=e;const s=(0,r.E)();return s.badge?(0,c.jsx)("span",{className:(0,n.Z)(t,a.k.docs.docVersionBadge,"badge badge--secondary"),children:(0,c.jsx)(i.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:s.label},children:"Version: {versionLabel}"})}):null}},23120:(e,t,s)=>{s.d(t,{Z:()=>v});s(67294);var n=s(36905),i=s(52263),a=s(33692),r=s(95999),c=s(80143),l=s(35281),o=s(60373),d=s(74477),m=s(85893);const u={unreleased:function(e){let{siteTitle:t,versionMetadata:s}=e;return(0,m.jsx)(r.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,m.jsx)("b",{children:s.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:t,versionMetadata:s}=e;return(0,m.jsx)(r.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,m.jsx)("b",{children:s.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function h(e){const t=u[e.versionMetadata.banner];return(0,m.jsx)(t,{...e})}function b(e){let{versionLabel:t,to:s,onClick:n}=e;return(0,m.jsx)(r.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,m.jsx)("b",{children:(0,m.jsx)(a.Z,{to:s,onClick:n,children:(0,m.jsx)(r.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function x(e){let{className:t,versionMetadata:s}=e;const{siteConfig:{title:a}}=(0,i.Z)(),{pluginId:r}=(0,c.gA)({failfast:!0}),{savePreferredVersionName:d}=(0,o.J)(r),{latestDocSuggestion:u,latestVersionSuggestion:x}=(0,c.Jo)(r),v=u??(p=x).docs.find((e=>e.id===p.mainDocId));var p;return(0,m.jsxs)("div",{className:(0,n.Z)(t,l.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,m.jsx)("div",{children:(0,m.jsx)(h,{siteTitle:a,versionMetadata:s})}),(0,m.jsx)("div",{className:"margin-top--md",children:(0,m.jsx)(b,{versionLabel:x.label,to:v.path,onClick:()=>d(x.name)})})]})}function v(e){let{className:t}=e;const s=(0,d.E)();return s.banner?(0,m.jsx)(x,{className:t,versionMetadata:s}):null}}}]);
\ No newline at end of file
diff --git a/build/assets/js/1504.2d784d43.js b/build/assets/js/1504.2d784d43.js
deleted file mode 100644
index 07514a99..00000000
--- a/build/assets/js/1504.2d784d43.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[1504],{41504:(t,e,s)=>{s.d(e,{D:()=>l,S:()=>c,a:()=>h,b:()=>a,c:()=>o,d:()=>B,p:()=>r,s:()=>P});var i=s(85322),n=function(){var t=function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},e=[1,2],s=[1,3],i=[1,4],n=[2,4],r=[1,9],o=[1,11],a=[1,15],c=[1,16],l=[1,17],h=[1,18],u=[1,30],d=[1,19],p=[1,20],y=[1,21],f=[1,22],m=[1,23],g=[1,25],S=[1,26],_=[1,27],k=[1,28],T=[1,29],b=[1,32],E=[1,33],x=[1,34],C=[1,35],$=[1,31],v=[1,4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],D=[1,4,5,13,14,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],A=[4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],L={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,cssClassStatement:11,idStatement:12,DESCR:13,"--\x3e":14,HIDE_EMPTY:15,scale:16,WIDTH:17,COMPOSIT_STATE:18,STRUCT_START:19,STRUCT_STOP:20,STATE_DESCR:21,AS:22,ID:23,FORK:24,JOIN:25,CHOICE:26,CONCURRENT:27,note:28,notePosition:29,NOTE_TEXT:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,classDef:37,CLASSDEF_ID:38,CLASSDEF_STYLEOPTS:39,DEFAULT:40,class:41,CLASSENTITY_IDS:42,STYLECLASS:43,direction_tb:44,direction_bt:45,direction_rl:46,direction_lr:47,eol:48,";":49,EDGE_STATE:50,STYLE_SEPARATOR:51,left_of:52,right_of:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",13:"DESCR",14:"--\x3e",15:"HIDE_EMPTY",16:"scale",17:"WIDTH",18:"COMPOSIT_STATE",19:"STRUCT_START",20:"STRUCT_STOP",21:"STATE_DESCR",22:"AS",23:"ID",24:"FORK",25:"JOIN",26:"CHOICE",27:"CONCURRENT",28:"note",30:"NOTE_TEXT",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"classDef",38:"CLASSDEF_ID",39:"CLASSDEF_STYLEOPTS",40:"DEFAULT",41:"class",42:"CLASSENTITY_IDS",43:"STYLECLASS",44:"direction_tb",45:"direction_bt",46:"direction_rl",47:"direction_lr",49:";",50:"EDGE_STATE",51:"STYLE_SEPARATOR",52:"left_of",53:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[31,1],[31,1],[31,1],[31,1],[48,1],[48,1],[12,1],[12,1],[12,3],[12,3],[29,1],[29,1]],performAction:function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 11:this.$=r[a];break;case 8:this.$="nl";break;case 12:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 13:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 14:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 18:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 19:var c=r[a],l=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");c=h[0],l=[l,h[1]]}this.$={stmt:"state",id:c,type:"default",description:l};break;case 20:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 21:this.$={stmt:"state",id:r[a],type:"fork"};break;case 22:this.$={stmt:"state",id:r[a],type:"join"};break;case 23:this.$={stmt:"state",id:r[a],type:"choice"};break;case 24:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 25:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 28:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 31:case 32:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 33:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 34:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 35:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 36:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 37:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 40:case 41:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 42:case 43:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}},table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,15,16,18,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:r,5:o,8:8,9:10,10:12,11:13,12:14,15:a,16:c,18:l,21:h,23:u,24:d,25:p,26:y,27:f,28:m,31:24,32:g,34:S,36:_,37:k,41:T,44:b,45:E,46:x,47:C,50:$},t(v,[2,5]),{9:36,10:12,11:13,12:14,15:a,16:c,18:l,21:h,23:u,24:d,25:p,26:y,27:f,28:m,31:24,32:g,34:S,36:_,37:k,41:T,44:b,45:E,46:x,47:C,50:$},t(v,[2,7]),t(v,[2,8]),t(v,[2,9]),t(v,[2,10]),t(v,[2,11],{13:[1,37],14:[1,38]}),t(v,[2,15]),{17:[1,39]},t(v,[2,17],{19:[1,40]}),{22:[1,41]},t(v,[2,21]),t(v,[2,22]),t(v,[2,23]),t(v,[2,24]),{29:42,30:[1,43],52:[1,44],53:[1,45]},t(v,[2,27]),{33:[1,46]},{35:[1,47]},t(v,[2,30]),{38:[1,48],40:[1,49]},{42:[1,50]},t(D,[2,40],{51:[1,51]}),t(D,[2,41],{51:[1,52]}),t(v,[2,34]),t(v,[2,35]),t(v,[2,36]),t(v,[2,37]),t(v,[2,6]),t(v,[2,12]),{12:53,23:u,50:$},t(v,[2,16]),t(A,n,{7:54}),{23:[1,55]},{23:[1,56]},{22:[1,57]},{23:[2,44]},{23:[2,45]},t(v,[2,28]),t(v,[2,29]),{39:[1,58]},{39:[1,59]},{43:[1,60]},{23:[1,61]},{23:[1,62]},t(v,[2,13],{13:[1,63]}),{4:r,5:o,8:8,9:10,10:12,11:13,12:14,15:a,16:c,18:l,20:[1,64],21:h,23:u,24:d,25:p,26:y,27:f,28:m,31:24,32:g,34:S,36:_,37:k,41:T,44:b,45:E,46:x,47:C,50:$},t(v,[2,19],{19:[1,65]}),{30:[1,66]},{23:[1,67]},t(v,[2,31]),t(v,[2,32]),t(v,[2,33]),t(D,[2,42]),t(D,[2,43]),t(v,[2,14]),t(v,[2,18]),t(A,n,{7:68}),t(v,[2,25]),t(v,[2,26]),{4:r,5:o,8:8,9:10,10:12,11:13,12:14,15:a,16:c,18:l,20:[1,69],21:h,23:u,24:d,25:p,26:y,27:f,28:m,31:24,32:g,34:S,36:_,37:k,41:T,44:b,45:E,46:x,47:C,50:$},t(v,[2,20])],defaultActions:{5:[2,1],6:[2,2],44:[2,44],45:[2,45]},parseError:function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},parse:function(t){var e=this,s=[0],i=[],n=[null],r=[],o=this.table,a="",c=0,l=0,h=r.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);u.setInput(t,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var y=u.yylloc;r.push(y);var f=u.options&&u.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,g,S,_,k,T,b,E,x,C={};;){if(g=s[s.length-1],this.defaultActions[g]?S=this.defaultActions[g]:(null==m&&(x=void 0,"number"!=typeof(x=i.pop()||u.lex()||1)&&(x instanceof Array&&(x=(i=x).pop()),x=e.symbols_[x]||x),m=x),S=o[g]&&o[g][m]),void 0===S||!S.length||!S[0]){var $="";for(k in E=[],o[g])this.terminals_[k]&&k>2&&E.push("'"+this.terminals_[k]+"'");$=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError($,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:y,expected:E})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+m);switch(S[0]){case 1:s.push(m),n.push(u.yytext),r.push(u.yylloc),s.push(S[1]),m=null,l=u.yyleng,a=u.yytext,c=u.yylineno,y=u.yylloc;break;case 2:if(T=this.productions_[S[1]][1],C.$=n[n.length-T],C._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},f&&(C._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(_=this.performAction.apply(C,[a,l,c,d.yy,S[1],n,r].concat(h))))return _;T&&(s=s.slice(0,-1*T*2),n=n.slice(0,-1*T),r=r.slice(0,-1*T)),s.push(this.productions_[S[1]][0]),n.push(C.$),r.push(C._$),b=o[s[s.length-2]][s[s.length-1]],s.push(b);break;case 3:return!0}}return!0}},I={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,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},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={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},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,s,i){switch(s){case 0:return 40;case 1:case 39:return 44;case 2:case 40:return 45;case 3:case 41:return 46;case 4:case 42:return 47;case 5:case 6:case 8:case 9:case 10:case 11:case 51:case 53:case 59:break;case 7:case 74:return 5;case 12:case 29:return this.pushState("SCALE"),16;case 13:case 30:return 17;case 14:case 20:case 31:case 46:case 49:this.popState();break;case 15:return this.begin("acc_title"),32;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),34;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),37;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),38;case 25:return this.popState(),39;case 26:return this.pushState("CLASS"),41;case 27:return this.popState(),this.pushState("CLASS_STYLE"),42;case 28:return this.popState(),43;case 32:this.pushState("STATE");break;case 33:case 36:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 34:case 37:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 35:case 38:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),26;case 43:this.pushState("STATE_STRING");break;case 44:return this.pushState("STATE_ID"),"AS";case 45:case 61:return this.popState(),"ID";case 47:return"STATE_DESCR";case 48:return 18;case 50:return this.popState(),this.pushState("struct"),19;case 52:return this.popState(),20;case 54:return this.begin("NOTE"),28;case 55:return this.popState(),this.pushState("NOTE_ID"),52;case 56:return this.popState(),this.pushState("NOTE_ID"),53;case 57:this.popState(),this.pushState("FLOATING_NOTE");break;case 58:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 60:return"NOTE_TEXT";case 62:return this.popState(),this.pushState("NOTE_TEXT"),23;case 63:return this.popState(),e.yytext=e.yytext.substr(2).trim(),30;case 64:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),30;case 65:case 66:return 6;case 67:return 15;case 68:return 50;case 69:return 23;case 70:return e.yytext=e.yytext.trim(),13;case 71:return 14;case 72:return 27;case 73:return 51;case 75:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,32,39,40,41,42,51,52,53,54,68,69,70,71,72],inclusive:!1},FLOATING_NOTE_ID:{rules:[61],inclusive:!1},FLOATING_NOTE:{rules:[58,59,60],inclusive:!1},NOTE_TEXT:{rules:[63,64],inclusive:!1},NOTE_ID:{rules:[62],inclusive:!1},NOTE:{rules:[55,56,57],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,30,31],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[45],inclusive:!1},STATE_STRING:{rules:[46,47],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,33,34,35,36,37,38,43,44,48,49,50],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,50,54,65,66,67,68,69,70,71,73,74,75],inclusive:!0}}};function O(){this.yy={}}return L.lexer=I,O.prototype=L,L.Parser=O,new O}();n.parser=n;const r=n,o="TB",a="state",c="relation",l="default",h="divider",u="[*]",d="start",p=u,y="color",f="fill";let m="LR",g=[],S={};let _={root:{relations:[],states:{},documents:{}}},k=_.root,T=0,b=0;const E=t=>JSON.parse(JSON.stringify(t)),x=(t,e,s)=>{if(e.stmt===c)x(t,e.state1,!0),x(t,e.state2,!1);else if(e.stmt===a&&("[*]"===e.id?(e.id=s?t.id+"_start":t.id+"_end",e.start=s):e.id=e.id.trim()),e.doc){const t=[];let s,n=[];for(s=0;s0&&n.length>0){const s={stmt:a,id:(0,i.G)(),type:"divider",doc:E(n)};t.push(E(s)),e.doc=t}e.doc.forEach((t=>x(e,t,!0)))}},C=function(t,e=l,s=null,n=null,r=null,o=null,a=null,c=null){const h=null==t?void 0:t.trim();if(void 0===k.states[h]?(i.l.info("Adding state ",h,n),k.states[h]={id:h,descriptions:[],type:e,doc:s,note:r,classes:[],styles:[],textStyles:[]}):(k.states[h].doc||(k.states[h].doc=s),k.states[h].type||(k.states[h].type=e)),n&&(i.l.info("Setting state description",h,n),"string"==typeof n&&I(h,n.trim()),"object"==typeof n&&n.forEach((t=>I(h,t.trim())))),r&&(k.states[h].note=r,k.states[h].note.text=i.e.sanitizeText(k.states[h].note.text,(0,i.c)())),o){i.l.info("Setting state classes",h,o);("string"==typeof o?[o]:o).forEach((t=>N(h,t.trim())))}if(a){i.l.info("Setting state styles",h,a);("string"==typeof a?[a]:a).forEach((t=>R(h,t.trim())))}if(c){i.l.info("Setting state styles",h,a);("string"==typeof c?[c]:c).forEach((t=>w(h,t.trim())))}},$=function(t){_={root:{relations:[],states:{},documents:{}}},k=_.root,T=0,S={},t||(0,i.t)()},v=function(t){return k.states[t]};function D(t=""){let e=t;return t===u&&(T++,e=`${d}${T}`),e}function A(t="",e=l){return t===u?d:e}const L=function(t,e,s){if("object"==typeof t)!function(t,e,s){let n=D(t.id.trim()),r=A(t.id.trim(),t.type),o=D(e.id.trim()),a=A(e.id.trim(),e.type);C(n,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),C(o,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),k.relations.push({id1:n,id2:o,relationTitle:i.e.sanitizeText(s,(0,i.c)())})}(t,e,s);else{const n=D(t.trim()),r=A(t),o=function(t=""){let e=t;return t===p&&(T++,e=`end${T}`),e}(e.trim()),a=function(t="",e=l){return t===p?"end":e}(e);C(n,r),C(o,a),k.relations.push({id1:n,id2:o,title:i.e.sanitizeText(s,(0,i.c)())})}},I=function(t,e){const s=k.states[t],n=e.startsWith(":")?e.replace(":","").trim():e;s.descriptions.push(i.e.sanitizeText(n,(0,i.c)()))},O=function(t,e=""){void 0===S[t]&&(S[t]={id:t,styles:[],textStyles:[]});const s=S[t];null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(t.match(y)){const t=e.replace(f,"bgFill").replace(y,f);s.textStyles.push(t)}s.styles.push(e)}))},N=function(t,e){t.split(",").forEach((function(t){let s=v(t);if(void 0===s){const e=t.trim();C(e),s=v(e)}s.classes.push(e)}))},R=function(t,e){const s=v(t);void 0!==s&&s.textStyles.push(e)},w=function(t,e){const s=v(t);void 0!==s&&s.textStyles.push(e)},B={getConfig:()=>(0,i.c)().state,addState:C,clear:$,getState:v,getStates:function(){return k.states},getRelations:function(){return k.relations},getClasses:function(){return S},getDirection:()=>m,addRelation:L,getDividerId:()=>(b++,"divider-id-"+b),setDirection:t=>{m=t},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){i.l.info("Documents = ",_)},getRootDoc:()=>g,setRootDoc:t=>{i.l.info("Setting root doc",t),g=t},getRootDocV2:()=>(x({id:"root"},{id:"root",doc:g},!0),{id:"root",doc:g}),extract:t=>{let e;e=t.doc?t.doc:t,i.l.info(e),$(!0),i.l.info("Extract",e),e.forEach((t=>{switch(t.stmt){case a:C(t.id.trim(),t.type,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles);break;case c:L(t.state1,t.state2,t.description);break;case"classDef":O(t.id.trim(),t.classes);break;case"applyClass":N(t.id.trim(),t.styleClass)}}))},trimColon:t=>t&&":"===t[0]?t.substr(1).trim():t.trim(),getAccTitle:i.g,setAccTitle:i.s,getAccDescription:i.a,setAccDescription:i.b,addStyleClass:O,setCssClass:N,addDescription:I,setDiagramTitle:i.q,getDiagramTitle:i.r},P=t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`}}]);
\ No newline at end of file
diff --git a/build/assets/js/16.7ea68316.js b/build/assets/js/16.7ea68316.js
deleted file mode 100644
index 375a549a..00000000
--- a/build/assets/js/16.7ea68316.js
+++ /dev/null
@@ -1,2106 +0,0 @@
-exports.id = 16;
-exports.ids = [16];
-exports.modules = {
-
-/***/ 28734:
-/***/ (function(module) {
-
-!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";return function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),a=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return r.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return r.ordinal(t.week(),"W");case"w":case"ww":return s.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return s.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return s.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return n.bind(this)(a)}}}));
-
-/***/ }),
-
-/***/ 10285:
-/***/ (function(module) {
-
-!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(e){var t=h("months"),n=(h("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=h("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f-1)return new Date(("X"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date("")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""))}else i.call(this,e)}}}));
-
-/***/ }),
-
-/***/ 59542:
-/***/ (function(module) {
-
-!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";var e="day";return function(t,i,s){var a=function(t){return t.add(4-t.isoWeekday(),e)},d=i.prototype;d.isoWeekYear=function(){return a(this).year()},d.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var i,d,n,o,r=a(this),u=(i=this.isoWeekYear(),d=this.$u,n=(d?s.utc:s)().year(i).startOf("year"),o=4-n.isoWeekday(),n.isoWeekday()>4&&(o+=7),n.add(o,e));return r.diff(u,"week")+1},d.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var n=d.startOf;d.startOf=function(e,t){var i=this.$utils(),s=!!i.u(t)||t;return"isoweek"===i.p(e)?s?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):n.bind(this)(e,t)}}}));
-
-/***/ }),
-
-/***/ 88016:
-/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
-"use strict";
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ diagram: () => (/* binding */ diagram)
-/* harmony export */ });
-/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17967);
-/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27484);
-/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59542);
-/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10285);
-/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28734);
-/* harmony import */ var _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(85322);
-/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(64218);
-/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(20683);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-var parser = function() {
- var o = function(k, v, o2, l) {
- for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
- ;
- return o2;
- }, $V0 = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 35, 37], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 29], $V6 = [1, 30], $V7 = [1, 31], $V8 = [1, 9], $V9 = [1, 10], $Va = [1, 11], $Vb = [1, 12], $Vc = [1, 13], $Vd = [1, 14], $Ve = [1, 15], $Vf = [1, 16], $Vg = [1, 18], $Vh = [1, 19], $Vi = [1, 20], $Vj = [1, 21], $Vk = [1, 22], $Vl = [1, 24], $Vm = [1, 32];
- var parser2 = {
- trace: function trace() {
- },
- yy: {},
- symbols_: { "error": 2, "start": 3, "gantt": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NL": 10, "weekday": 11, "weekday_monday": 12, "weekday_tuesday": 13, "weekday_wednesday": 14, "weekday_thursday": 15, "weekday_friday": 16, "weekday_saturday": 17, "weekday_sunday": 18, "dateFormat": 19, "inclusiveEndDates": 20, "topAxis": 21, "axisFormat": 22, "tickInterval": 23, "excludes": 24, "includes": 25, "todayMarker": 26, "title": 27, "acc_title": 28, "acc_title_value": 29, "acc_descr": 30, "acc_descr_value": 31, "acc_descr_multiline_value": 32, "section": 33, "clickStatement": 34, "taskTxt": 35, "taskData": 36, "click": 37, "callbackname": 38, "callbackargs": 39, "href": 40, "clickStatementDebug": 41, "$accept": 0, "$end": 1 },
- terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 19: "dateFormat", 20: "inclusiveEndDates", 21: "topAxis", 22: "axisFormat", 23: "tickInterval", 24: "excludes", 25: "includes", 26: "todayMarker", 27: "title", 28: "acc_title", 29: "acc_title_value", 30: "acc_descr", 31: "acc_descr_value", 32: "acc_descr_multiline_value", 33: "section", 35: "taskTxt", 36: "taskData", 37: "click", 38: "callbackname", 39: "callbackargs", 40: "href" },
- productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [34, 2], [34, 3], [34, 3], [34, 4], [34, 3], [34, 4], [34, 2], [41, 2], [41, 3], [41, 3], [41, 4], [41, 3], [41, 4], [41, 2]],
- performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
- var $0 = $$.length - 1;
- switch (yystate) {
- case 1:
- return $$[$0 - 1];
- case 2:
- this.$ = [];
- break;
- case 3:
- $$[$0 - 1].push($$[$0]);
- this.$ = $$[$0 - 1];
- break;
- case 4:
- case 5:
- this.$ = $$[$0];
- break;
- case 6:
- case 7:
- this.$ = [];
- break;
- case 8:
- yy.setWeekday("monday");
- break;
- case 9:
- yy.setWeekday("tuesday");
- break;
- case 10:
- yy.setWeekday("wednesday");
- break;
- case 11:
- yy.setWeekday("thursday");
- break;
- case 12:
- yy.setWeekday("friday");
- break;
- case 13:
- yy.setWeekday("saturday");
- break;
- case 14:
- yy.setWeekday("sunday");
- break;
- case 15:
- yy.setDateFormat($$[$0].substr(11));
- this.$ = $$[$0].substr(11);
- break;
- case 16:
- yy.enableInclusiveEndDates();
- this.$ = $$[$0].substr(18);
- break;
- case 17:
- yy.TopAxis();
- this.$ = $$[$0].substr(8);
- break;
- case 18:
- yy.setAxisFormat($$[$0].substr(11));
- this.$ = $$[$0].substr(11);
- break;
- case 19:
- yy.setTickInterval($$[$0].substr(13));
- this.$ = $$[$0].substr(13);
- break;
- case 20:
- yy.setExcludes($$[$0].substr(9));
- this.$ = $$[$0].substr(9);
- break;
- case 21:
- yy.setIncludes($$[$0].substr(9));
- this.$ = $$[$0].substr(9);
- break;
- case 22:
- yy.setTodayMarker($$[$0].substr(12));
- this.$ = $$[$0].substr(12);
- break;
- case 24:
- yy.setDiagramTitle($$[$0].substr(6));
- this.$ = $$[$0].substr(6);
- break;
- case 25:
- this.$ = $$[$0].trim();
- yy.setAccTitle(this.$);
- break;
- case 26:
- case 27:
- this.$ = $$[$0].trim();
- yy.setAccDescription(this.$);
- break;
- case 28:
- yy.addSection($$[$0].substr(8));
- this.$ = $$[$0].substr(8);
- break;
- case 30:
- yy.addTask($$[$0 - 1], $$[$0]);
- this.$ = "task";
- break;
- case 31:
- this.$ = $$[$0 - 1];
- yy.setClickEvent($$[$0 - 1], $$[$0], null);
- break;
- case 32:
- this.$ = $$[$0 - 2];
- yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
- break;
- case 33:
- this.$ = $$[$0 - 2];
- yy.setClickEvent($$[$0 - 2], $$[$0 - 1], null);
- yy.setLink($$[$0 - 2], $$[$0]);
- break;
- case 34:
- this.$ = $$[$0 - 3];
- yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
- yy.setLink($$[$0 - 3], $$[$0]);
- break;
- case 35:
- this.$ = $$[$0 - 2];
- yy.setClickEvent($$[$0 - 2], $$[$0], null);
- yy.setLink($$[$0 - 2], $$[$0 - 1]);
- break;
- case 36:
- this.$ = $$[$0 - 3];
- yy.setClickEvent($$[$0 - 3], $$[$0 - 1], $$[$0]);
- yy.setLink($$[$0 - 3], $$[$0 - 2]);
- break;
- case 37:
- this.$ = $$[$0 - 1];
- yy.setLink($$[$0 - 1], $$[$0]);
- break;
- case 38:
- case 44:
- this.$ = $$[$0 - 1] + " " + $$[$0];
- break;
- case 39:
- case 40:
- case 42:
- this.$ = $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0];
- break;
- case 41:
- case 43:
- this.$ = $$[$0 - 3] + " " + $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0];
- break;
- }
- },
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 33, 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), o($V0, [2, 18]), o($V0, [2, 19]), o($V0, [2, 20]), o($V0, [2, 21]), o($V0, [2, 22]), o($V0, [2, 23]), o($V0, [2, 24]), { 29: [1, 34] }, { 31: [1, 35] }, o($V0, [2, 27]), o($V0, [2, 28]), o($V0, [2, 29]), { 36: [1, 36] }, o($V0, [2, 8]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), { 38: [1, 37], 40: [1, 38] }, o($V0, [2, 4]), o($V0, [2, 25]), o($V0, [2, 26]), o($V0, [2, 30]), o($V0, [2, 31], { 39: [1, 39], 40: [1, 40] }), o($V0, [2, 37], { 38: [1, 41] }), o($V0, [2, 32], { 40: [1, 42] }), o($V0, [2, 33]), o($V0, [2, 35], { 39: [1, 43] }), o($V0, [2, 34]), o($V0, [2, 36])],
- 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 lex() {
- 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 = lex();
- }
- 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 lex() {
- 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: { "case-insensitive": true },
- performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
- switch ($avoiding_name_collisions) {
- case 0:
- this.begin("open_directive");
- return "open_directive";
- case 1:
- this.begin("acc_title");
- return 28;
- case 2:
- this.popState();
- return "acc_title_value";
- case 3:
- this.begin("acc_descr");
- return 30;
- case 4:
- this.popState();
- return "acc_descr_value";
- case 5:
- this.begin("acc_descr_multiline");
- break;
- case 6:
- this.popState();
- break;
- case 7:
- return "acc_descr_multiline_value";
- case 8:
- break;
- case 9:
- break;
- case 10:
- break;
- case 11:
- return 10;
- case 12:
- break;
- case 13:
- break;
- case 14:
- break;
- case 15:
- this.begin("href");
- break;
- case 16:
- this.popState();
- break;
- case 17:
- return 40;
- case 18:
- this.begin("callbackname");
- break;
- case 19:
- this.popState();
- break;
- case 20:
- this.popState();
- this.begin("callbackargs");
- break;
- case 21:
- return 38;
- case 22:
- this.popState();
- break;
- case 23:
- return 39;
- case 24:
- this.begin("click");
- break;
- case 25:
- this.popState();
- break;
- case 26:
- return 37;
- case 27:
- return 4;
- case 28:
- return 19;
- case 29:
- return 20;
- case 30:
- return 21;
- case 31:
- return 22;
- case 32:
- return 23;
- case 33:
- return 25;
- case 34:
- return 24;
- case 35:
- return 26;
- case 36:
- return 12;
- case 37:
- return 13;
- case 38:
- return 14;
- case 39:
- return 15;
- case 40:
- return 16;
- case 41:
- return 17;
- case 42:
- return 18;
- case 43:
- return "date";
- case 44:
- return 27;
- case 45:
- return "accDescription";
- case 46:
- return 33;
- case 47:
- return 35;
- case 48:
- return 36;
- case 49:
- return ":";
- case 50:
- return 6;
- case 51:
- return "INVALID";
- }
- },
- rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
- conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "callbackargs": { "rules": [22, 23], "inclusive": false }, "callbackname": { "rules": [19, 20, 21], "inclusive": false }, "href": { "rules": [16, 17], "inclusive": false }, "click": { "rules": [25, 26], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 18, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "inclusive": true } }
- };
- return lexer2;
- }();
- parser2.lexer = lexer;
- function Parser() {
- this.yy = {};
- }
- Parser.prototype = parser2;
- parser2.Parser = Parser;
- return new Parser();
-}();
-parser.parser = parser;
-const ganttParser = parser;
-dayjs__WEBPACK_IMPORTED_MODULE_1__.extend(dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_2__);
-dayjs__WEBPACK_IMPORTED_MODULE_1__.extend(dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_3__);
-dayjs__WEBPACK_IMPORTED_MODULE_1__.extend(dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_4__);
-let dateFormat = "";
-let axisFormat = "";
-let tickInterval = void 0;
-let todayMarker = "";
-let includes = [];
-let excludes = [];
-let links = {};
-let sections = [];
-let tasks = [];
-let currentSection = "";
-let displayMode = "";
-const tags = ["active", "done", "crit", "milestone"];
-let funs = [];
-let inclusiveEndDates = false;
-let topAxis = false;
-let weekday = "sunday";
-let lastOrder = 0;
-const clear = function() {
- sections = [];
- tasks = [];
- currentSection = "";
- funs = [];
- taskCnt = 0;
- lastTask = void 0;
- lastTaskID = void 0;
- rawTasks = [];
- dateFormat = "";
- axisFormat = "";
- displayMode = "";
- tickInterval = void 0;
- todayMarker = "";
- includes = [];
- excludes = [];
- inclusiveEndDates = false;
- topAxis = false;
- lastOrder = 0;
- links = {};
- (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.t)();
- weekday = "sunday";
-};
-const setAxisFormat = function(txt) {
- axisFormat = txt;
-};
-const getAxisFormat = function() {
- return axisFormat;
-};
-const setTickInterval = function(txt) {
- tickInterval = txt;
-};
-const getTickInterval = function() {
- return tickInterval;
-};
-const setTodayMarker = function(txt) {
- todayMarker = txt;
-};
-const getTodayMarker = function() {
- return todayMarker;
-};
-const setDateFormat = function(txt) {
- dateFormat = txt;
-};
-const enableInclusiveEndDates = function() {
- inclusiveEndDates = true;
-};
-const endDatesAreInclusive = function() {
- return inclusiveEndDates;
-};
-const enableTopAxis = function() {
- topAxis = true;
-};
-const topAxisEnabled = function() {
- return topAxis;
-};
-const setDisplayMode = function(txt) {
- displayMode = txt;
-};
-const getDisplayMode = function() {
- return displayMode;
-};
-const getDateFormat = function() {
- return dateFormat;
-};
-const setIncludes = function(txt) {
- includes = txt.toLowerCase().split(/[\s,]+/);
-};
-const getIncludes = function() {
- return includes;
-};
-const setExcludes = function(txt) {
- excludes = txt.toLowerCase().split(/[\s,]+/);
-};
-const getExcludes = function() {
- return excludes;
-};
-const getLinks = function() {
- return links;
-};
-const addSection = function(txt) {
- currentSection = txt;
- sections.push(txt);
-};
-const getSections = function() {
- return sections;
-};
-const getTasks = function() {
- let allItemsProcessed = compileTasks();
- const maxDepth = 10;
- let iterationCount = 0;
- while (!allItemsProcessed && iterationCount < maxDepth) {
- allItemsProcessed = compileTasks();
- iterationCount++;
- }
- tasks = rawTasks;
- return tasks;
-};
-const isInvalidDate = function(date, dateFormat2, excludes2, includes2) {
- if (includes2.includes(date.format(dateFormat2.trim()))) {
- return false;
- }
- if (date.isoWeekday() >= 6 && excludes2.includes("weekends")) {
- return true;
- }
- if (excludes2.includes(date.format("dddd").toLowerCase())) {
- return true;
- }
- return excludes2.includes(date.format(dateFormat2.trim()));
-};
-const setWeekday = function(txt) {
- weekday = txt;
-};
-const getWeekday = function() {
- return weekday;
-};
-const checkTaskDates = function(task, dateFormat2, excludes2, includes2) {
- if (!excludes2.length || task.manualEndTime) {
- return;
- }
- let startTime;
- if (task.startTime instanceof Date) {
- startTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(task.startTime);
- } else {
- startTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(task.startTime, dateFormat2, true);
- }
- startTime = startTime.add(1, "d");
- let originalEndTime;
- if (task.endTime instanceof Date) {
- originalEndTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(task.endTime);
- } else {
- originalEndTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(task.endTime, dateFormat2, true);
- }
- const [fixedEndTime, renderEndTime] = fixTaskDates(
- startTime,
- originalEndTime,
- dateFormat2,
- excludes2,
- includes2
- );
- task.endTime = fixedEndTime.toDate();
- task.renderEndTime = renderEndTime;
-};
-const fixTaskDates = function(startTime, endTime, dateFormat2, excludes2, includes2) {
- let invalid = false;
- let renderEndTime = null;
- while (startTime <= endTime) {
- if (!invalid) {
- renderEndTime = endTime.toDate();
- }
- invalid = isInvalidDate(startTime, dateFormat2, excludes2, includes2);
- if (invalid) {
- endTime = endTime.add(1, "d");
- }
- startTime = startTime.add(1, "d");
- }
- return [endTime, renderEndTime];
-};
-const getStartDate = function(prevTime, dateFormat2, str) {
- str = str.trim();
- const re = /^after\s+([\d\w- ]+)/;
- const afterStatement = re.exec(str.trim());
- if (afterStatement !== null) {
- let latestEndingTask = null;
- afterStatement[1].split(" ").forEach(function(id) {
- let task = findTaskById(id);
- if (task !== void 0) {
- if (!latestEndingTask) {
- latestEndingTask = task;
- } else {
- if (task.endTime > latestEndingTask.endTime) {
- latestEndingTask = task;
- }
- }
- }
- });
- if (!latestEndingTask) {
- const dt = /* @__PURE__ */ new Date();
- dt.setHours(0, 0, 0, 0);
- return dt;
- } else {
- return latestEndingTask.endTime;
- }
- }
- let mDate = dayjs__WEBPACK_IMPORTED_MODULE_1__(str, dateFormat2.trim(), true);
- if (mDate.isValid()) {
- return mDate.toDate();
- } else {
- _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.l.debug("Invalid date:" + str);
- _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.l.debug("With date format:" + dateFormat2.trim());
- const d = new Date(str);
- if (d === void 0 || isNaN(d.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously
- // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.
- // This can cause virtually infinite loops while rendering, so for the
- // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as
- // invalid.
- d.getFullYear() < -1e4 || d.getFullYear() > 1e4) {
- throw new Error("Invalid date:" + str);
- }
- return d;
- }
-};
-const parseDuration = function(str) {
- const statement = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(str.trim());
- if (statement !== null) {
- return [Number.parseFloat(statement[1]), statement[2]];
- }
- return [NaN, "ms"];
-};
-const getEndDate = function(prevTime, dateFormat2, str, inclusive = false) {
- str = str.trim();
- let mDate = dayjs__WEBPACK_IMPORTED_MODULE_1__(str, dateFormat2.trim(), true);
- if (mDate.isValid()) {
- if (inclusive) {
- mDate = mDate.add(1, "d");
- }
- return mDate.toDate();
- }
- let endTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(prevTime);
- const [durationValue, durationUnit] = parseDuration(str);
- if (!Number.isNaN(durationValue)) {
- const newEndTime = endTime.add(durationValue, durationUnit);
- if (newEndTime.isValid()) {
- endTime = newEndTime;
- }
- }
- return endTime.toDate();
-};
-let taskCnt = 0;
-const parseId = function(idStr) {
- if (idStr === void 0) {
- taskCnt = taskCnt + 1;
- return "task" + taskCnt;
- }
- return idStr;
-};
-const compileData = function(prevTask, dataStr) {
- let ds;
- if (dataStr.substr(0, 1) === ":") {
- ds = dataStr.substr(1, dataStr.length);
- } else {
- ds = dataStr;
- }
- const data = ds.split(",");
- const task = {};
- getTaskTags(data, task, tags);
- for (let i = 0; i < data.length; i++) {
- data[i] = data[i].trim();
- }
- let endTimeData = "";
- switch (data.length) {
- case 1:
- task.id = parseId();
- task.startTime = prevTask.endTime;
- endTimeData = data[0];
- break;
- case 2:
- task.id = parseId();
- task.startTime = getStartDate(void 0, dateFormat, data[0]);
- endTimeData = data[1];
- break;
- case 3:
- task.id = parseId(data[0]);
- task.startTime = getStartDate(void 0, dateFormat, data[1]);
- endTimeData = data[2];
- break;
- }
- if (endTimeData) {
- task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);
- task.manualEndTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(endTimeData, "YYYY-MM-DD", true).isValid();
- checkTaskDates(task, dateFormat, excludes, includes);
- }
- return task;
-};
-const parseData = function(prevTaskId, dataStr) {
- let ds;
- if (dataStr.substr(0, 1) === ":") {
- ds = dataStr.substr(1, dataStr.length);
- } else {
- ds = dataStr;
- }
- const data = ds.split(",");
- const task = {};
- getTaskTags(data, task, tags);
- for (let i = 0; i < data.length; i++) {
- data[i] = data[i].trim();
- }
- switch (data.length) {
- case 1:
- task.id = parseId();
- task.startTime = {
- type: "prevTaskEnd",
- id: prevTaskId
- };
- task.endTime = {
- data: data[0]
- };
- break;
- case 2:
- task.id = parseId();
- task.startTime = {
- type: "getStartDate",
- startData: data[0]
- };
- task.endTime = {
- data: data[1]
- };
- break;
- case 3:
- task.id = parseId(data[0]);
- task.startTime = {
- type: "getStartDate",
- startData: data[1]
- };
- task.endTime = {
- data: data[2]
- };
- break;
- }
- return task;
-};
-let lastTask;
-let lastTaskID;
-let rawTasks = [];
-const taskDb = {};
-const addTask = function(descr, data) {
- const rawTask = {
- section: currentSection,
- type: currentSection,
- processed: false,
- manualEndTime: false,
- renderEndTime: null,
- raw: { data },
- task: descr,
- classes: []
- };
- const taskInfo = parseData(lastTaskID, data);
- rawTask.raw.startTime = taskInfo.startTime;
- rawTask.raw.endTime = taskInfo.endTime;
- rawTask.id = taskInfo.id;
- rawTask.prevTaskId = lastTaskID;
- rawTask.active = taskInfo.active;
- rawTask.done = taskInfo.done;
- rawTask.crit = taskInfo.crit;
- rawTask.milestone = taskInfo.milestone;
- rawTask.order = lastOrder;
- lastOrder++;
- const pos = rawTasks.push(rawTask);
- lastTaskID = rawTask.id;
- taskDb[rawTask.id] = pos - 1;
-};
-const findTaskById = function(id) {
- const pos = taskDb[id];
- return rawTasks[pos];
-};
-const addTaskOrg = function(descr, data) {
- const newTask = {
- section: currentSection,
- type: currentSection,
- description: descr,
- task: descr,
- classes: []
- };
- const taskInfo = compileData(lastTask, data);
- newTask.startTime = taskInfo.startTime;
- newTask.endTime = taskInfo.endTime;
- newTask.id = taskInfo.id;
- newTask.active = taskInfo.active;
- newTask.done = taskInfo.done;
- newTask.crit = taskInfo.crit;
- newTask.milestone = taskInfo.milestone;
- lastTask = newTask;
- tasks.push(newTask);
-};
-const compileTasks = function() {
- const compileTask = function(pos) {
- const task = rawTasks[pos];
- let startTime = "";
- switch (rawTasks[pos].raw.startTime.type) {
- case "prevTaskEnd": {
- const prevTask = findTaskById(task.prevTaskId);
- task.startTime = prevTask.endTime;
- break;
- }
- case "getStartDate":
- startTime = getStartDate(void 0, dateFormat, rawTasks[pos].raw.startTime.startData);
- if (startTime) {
- rawTasks[pos].startTime = startTime;
- }
- break;
- }
- if (rawTasks[pos].startTime) {
- rawTasks[pos].endTime = getEndDate(
- rawTasks[pos].startTime,
- dateFormat,
- rawTasks[pos].raw.endTime.data,
- inclusiveEndDates
- );
- if (rawTasks[pos].endTime) {
- rawTasks[pos].processed = true;
- rawTasks[pos].manualEndTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(
- rawTasks[pos].raw.endTime.data,
- "YYYY-MM-DD",
- true
- ).isValid();
- checkTaskDates(rawTasks[pos], dateFormat, excludes, includes);
- }
- }
- return rawTasks[pos].processed;
- };
- let allProcessed = true;
- for (const [i, rawTask] of rawTasks.entries()) {
- compileTask(i);
- allProcessed = allProcessed && rawTask.processed;
- }
- return allProcessed;
-};
-const setLink = function(ids, _linkStr) {
- let linkStr = _linkStr;
- if ((0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel !== "loose") {
- linkStr = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Nm)(_linkStr);
- }
- ids.split(",").forEach(function(id) {
- let rawTask = findTaskById(id);
- if (rawTask !== void 0) {
- pushFun(id, () => {
- window.open(linkStr, "_self");
- });
- links[id] = linkStr;
- }
- });
- setClass(ids, "clickable");
-};
-const setClass = function(ids, className) {
- ids.split(",").forEach(function(id) {
- let rawTask = findTaskById(id);
- if (rawTask !== void 0) {
- rawTask.classes.push(className);
- }
- });
-};
-const setClickFun = function(id, functionName, functionArgs) {
- if ((0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.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);
- }
- let rawTask = findTaskById(id);
- if (rawTask !== void 0) {
- pushFun(id, () => {
- _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.u.runFunc(functionName, ...argList);
- });
- }
-};
-const pushFun = function(id, callbackFunction) {
- funs.push(
- function() {
- const elem = document.querySelector(`[id="${id}"]`);
- if (elem !== null) {
- elem.addEventListener("click", function() {
- callbackFunction();
- });
- }
- },
- function() {
- const elem = document.querySelector(`[id="${id}-text"]`);
- if (elem !== null) {
- elem.addEventListener("click", function() {
- callbackFunction();
- });
- }
- }
- );
-};
-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 ganttDb = {
- getConfig: () => (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.c)().gantt,
- clear,
- setDateFormat,
- getDateFormat,
- enableInclusiveEndDates,
- endDatesAreInclusive,
- enableTopAxis,
- topAxisEnabled,
- setAxisFormat,
- getAxisFormat,
- setTickInterval,
- getTickInterval,
- setTodayMarker,
- getTodayMarker,
- setAccTitle: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.s,
- getAccTitle: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.g,
- setDiagramTitle: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.q,
- getDiagramTitle: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.r,
- setDisplayMode,
- getDisplayMode,
- setAccDescription: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.b,
- getAccDescription: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.a,
- addSection,
- getSections,
- getTasks,
- addTask,
- findTaskById,
- addTaskOrg,
- setIncludes,
- getIncludes,
- setExcludes,
- getExcludes,
- setClickEvent,
- setLink,
- getLinks,
- bindFunctions,
- parseDuration,
- isInvalidDate,
- setWeekday,
- getWeekday
-};
-function getTaskTags(data, task, tags2) {
- let matchFound = true;
- while (matchFound) {
- matchFound = false;
- tags2.forEach(function(t) {
- const pattern = "^\\s*" + t + "\\s*$";
- const regex = new RegExp(pattern);
- if (data[0].match(regex)) {
- task[t] = true;
- data.shift(1);
- matchFound = true;
- }
- });
- }
-}
-const setConf = function() {
- _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.l.debug("Something is calling, setConf, remove the call");
-};
-const mapWeekdayToTimeFunction = {
- monday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMonday */ .Ox9,
- tuesday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeTuesday */ .YDX,
- wednesday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeWednesday */ .EFj,
- thursday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeThursday */ .Igq,
- friday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeFriday */ .y2j,
- saturday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeSaturday */ .LqH,
- sunday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeSunday */ .Zyz
-};
-const getMaxIntersections = (tasks2, orderOffset) => {
- let timeline = [...tasks2].map(() => -Infinity);
- let sorted = [...tasks2].sort((a, b) => a.startTime - b.startTime || a.order - b.order);
- let maxIntersections = 0;
- for (const element of sorted) {
- for (let j = 0; j < timeline.length; j++) {
- if (element.startTime >= timeline[j]) {
- timeline[j] = element.endTime;
- element.order = j + orderOffset;
- if (j > maxIntersections) {
- maxIntersections = j;
- }
- break;
- }
- }
- }
- return maxIntersections;
-};
-let w;
-const draw = function(text, id, version, diagObj) {
- const conf = (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.c)().gantt;
- const securityLevel = (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel;
- let sandboxElement;
- if (securityLevel === "sandbox") {
- sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .select */ .Ys)("#i" + id);
- }
- const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .select */ .Ys)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .select */ .Ys)("body");
- const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
- const elem = doc.getElementById(id);
- w = elem.parentElement.offsetWidth;
- if (w === void 0) {
- w = 1200;
- }
- if (conf.useWidth !== void 0) {
- w = conf.useWidth;
- }
- const taskArray = diagObj.db.getTasks();
- let categories = [];
- for (const element of taskArray) {
- categories.push(element.type);
- }
- categories = checkUnique(categories);
- const categoryHeights = {};
- let h = 2 * conf.topPadding;
- if (diagObj.db.getDisplayMode() === "compact" || conf.displayMode === "compact") {
- const categoryElements = {};
- for (const element of taskArray) {
- if (categoryElements[element.section] === void 0) {
- categoryElements[element.section] = [element];
- } else {
- categoryElements[element.section].push(element);
- }
- }
- let intersections = 0;
- for (const category of Object.keys(categoryElements)) {
- const categoryHeight = getMaxIntersections(categoryElements[category], intersections) + 1;
- intersections += categoryHeight;
- h += categoryHeight * (conf.barHeight + conf.barGap);
- categoryHeights[category] = categoryHeight;
- }
- } else {
- h += taskArray.length * (conf.barHeight + conf.barGap);
- for (const category of categories) {
- categoryHeights[category] = taskArray.filter((task) => task.type === category).length;
- }
- }
- elem.setAttribute("viewBox", "0 0 " + w + " " + h);
- const svg = root.select(`[id="${id}"]`);
- const timeScale = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .scaleTime */ .Xf)().domain([
- (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .min */ .VV$)(taskArray, function(d) {
- return d.startTime;
- }),
- (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .max */ .Fp7)(taskArray, function(d) {
- return d.endTime;
- })
- ]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]);
- function taskCompare(a, b) {
- const taskA = a.startTime;
- const taskB = b.startTime;
- let result = 0;
- if (taskA > taskB) {
- result = 1;
- } else if (taskA < taskB) {
- result = -1;
- }
- return result;
- }
- taskArray.sort(taskCompare);
- makeGant(taskArray, w, h);
- (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.i)(svg, h, w, conf.useMaxWidth);
- svg.append("text").text(diagObj.db.getDiagramTitle()).attr("x", w / 2).attr("y", conf.titleTopMargin).attr("class", "titleText");
- function makeGant(tasks2, pageWidth, pageHeight) {
- const barHeight = conf.barHeight;
- const gap = barHeight + conf.barGap;
- const topPadding = conf.topPadding;
- const leftPadding = conf.leftPadding;
- const colorScale = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .scaleLinear */ .BYU)().domain([0, categories.length]).range(["#00B9FA", "#F95002"]).interpolate(d3__WEBPACK_IMPORTED_MODULE_5__/* .interpolateHcl */ .JHv);
- drawExcludeDays(
- gap,
- topPadding,
- leftPadding,
- pageWidth,
- pageHeight,
- tasks2,
- diagObj.db.getExcludes(),
- diagObj.db.getIncludes()
- );
- makeGrid(leftPadding, topPadding, pageWidth, pageHeight);
- drawRects(tasks2, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth);
- vertLabels(gap, topPadding);
- drawToday(leftPadding, topPadding, pageWidth, pageHeight);
- }
- function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w2) {
- const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))];
- const uniqueTasks = uniqueTaskOrderIds.map((id2) => theArray.find((item) => item.order === id2));
- svg.append("g").selectAll("rect").data(uniqueTasks).enter().append("rect").attr("x", 0).attr("y", function(d, i) {
- i = d.order;
- return i * theGap + theTopPad - 2;
- }).attr("width", function() {
- return w2 - conf.rightPadding / 2;
- }).attr("height", theGap).attr("class", function(d) {
- for (const [i, category] of categories.entries()) {
- if (d.type === category) {
- return "section section" + i % conf.numberSectionStyles;
- }
- }
- return "section section0";
- });
- const rectangles = svg.append("g").selectAll("rect").data(theArray).enter();
- const links2 = diagObj.db.getLinks();
- rectangles.append("rect").attr("id", function(d) {
- return d.id;
- }).attr("rx", 3).attr("ry", 3).attr("x", function(d) {
- if (d.milestone) {
- return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
- }
- return timeScale(d.startTime) + theSidePad;
- }).attr("y", function(d, i) {
- i = d.order;
- return i * theGap + theTopPad;
- }).attr("width", function(d) {
- if (d.milestone) {
- return theBarHeight;
- }
- return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);
- }).attr("height", theBarHeight).attr("transform-origin", function(d, i) {
- i = d.order;
- return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + "px " + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + "px";
- }).attr("class", function(d) {
- const res = "task";
- let classStr = "";
- if (d.classes.length > 0) {
- classStr = d.classes.join(" ");
- }
- let secNum = 0;
- for (const [i, category] of categories.entries()) {
- if (d.type === category) {
- secNum = i % conf.numberSectionStyles;
- }
- }
- let taskClass = "";
- if (d.active) {
- if (d.crit) {
- taskClass += " activeCrit";
- } else {
- taskClass = " active";
- }
- } else if (d.done) {
- if (d.crit) {
- taskClass = " doneCrit";
- } else {
- taskClass = " done";
- }
- } else {
- if (d.crit) {
- taskClass += " crit";
- }
- }
- if (taskClass.length === 0) {
- taskClass = " task";
- }
- if (d.milestone) {
- taskClass = " milestone " + taskClass;
- }
- taskClass += secNum;
- taskClass += " " + classStr;
- return res + taskClass;
- });
- rectangles.append("text").attr("id", function(d) {
- return d.id + "-text";
- }).text(function(d) {
- return d.task;
- }).attr("font-size", conf.fontSize).attr("x", function(d) {
- let startX = timeScale(d.startTime);
- let endX = timeScale(d.renderEndTime || d.endTime);
- if (d.milestone) {
- startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
- }
- if (d.milestone) {
- endX = startX + theBarHeight;
- }
- const textWidth = this.getBBox().width;
- if (textWidth > endX - startX) {
- if (endX + textWidth + 1.5 * conf.leftPadding > w2) {
- return startX + theSidePad - 5;
- } else {
- return endX + theSidePad + 5;
- }
- } else {
- return (endX - startX) / 2 + startX + theSidePad;
- }
- }).attr("y", function(d, i) {
- i = d.order;
- return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;
- }).attr("text-height", theBarHeight).attr("class", function(d) {
- const startX = timeScale(d.startTime);
- let endX = timeScale(d.endTime);
- if (d.milestone) {
- endX = startX + theBarHeight;
- }
- const textWidth = this.getBBox().width;
- let classStr = "";
- if (d.classes.length > 0) {
- classStr = d.classes.join(" ");
- }
- let secNum = 0;
- for (const [i, category] of categories.entries()) {
- if (d.type === category) {
- secNum = i % conf.numberSectionStyles;
- }
- }
- let taskType = "";
- if (d.active) {
- if (d.crit) {
- taskType = "activeCritText" + secNum;
- } else {
- taskType = "activeText" + secNum;
- }
- }
- if (d.done) {
- if (d.crit) {
- taskType = taskType + " doneCritText" + secNum;
- } else {
- taskType = taskType + " doneText" + secNum;
- }
- } else {
- if (d.crit) {
- taskType = taskType + " critText" + secNum;
- }
- }
- if (d.milestone) {
- taskType += " milestoneText";
- }
- if (textWidth > endX - startX) {
- if (endX + textWidth + 1.5 * conf.leftPadding > w2) {
- return classStr + " taskTextOutsideLeft taskTextOutside" + secNum + " " + taskType;
- } else {
- return classStr + " taskTextOutsideRight taskTextOutside" + secNum + " " + taskType + " width-" + textWidth;
- }
- } else {
- return classStr + " taskText taskText" + secNum + " " + taskType + " width-" + textWidth;
- }
- });
- const securityLevel2 = (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel;
- if (securityLevel2 === "sandbox") {
- let sandboxElement2;
- sandboxElement2 = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .select */ .Ys)("#i" + id);
- const doc2 = sandboxElement2.nodes()[0].contentDocument;
- rectangles.filter(function(d) {
- return links2[d.id] !== void 0;
- }).each(function(o) {
- var taskRect = doc2.querySelector("#" + o.id);
- var taskText = doc2.querySelector("#" + o.id + "-text");
- const oldParent = taskRect.parentNode;
- var Link = doc2.createElement("a");
- Link.setAttribute("xlink:href", links2[o.id]);
- Link.setAttribute("target", "_top");
- oldParent.appendChild(Link);
- Link.appendChild(taskRect);
- Link.appendChild(taskText);
- });
- }
- }
- function drawExcludeDays(theGap, theTopPad, theSidePad, w2, h2, tasks2, excludes2, includes2) {
- if (excludes2.length === 0 && includes2.length === 0) {
- return;
- }
- let minTime;
- let maxTime;
- for (const { startTime, endTime } of tasks2) {
- if (minTime === void 0 || startTime < minTime) {
- minTime = startTime;
- }
- if (maxTime === void 0 || endTime > maxTime) {
- maxTime = endTime;
- }
- }
- if (!minTime || !maxTime) {
- return;
- }
- if (dayjs__WEBPACK_IMPORTED_MODULE_1__(maxTime).diff(dayjs__WEBPACK_IMPORTED_MODULE_1__(minTime), "year") > 5) {
- _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.l.warn(
- "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days."
- );
- return;
- }
- const dateFormat2 = diagObj.db.getDateFormat();
- const excludeRanges = [];
- let range = null;
- let d = dayjs__WEBPACK_IMPORTED_MODULE_1__(minTime);
- while (d.valueOf() <= maxTime) {
- if (diagObj.db.isInvalidDate(d, dateFormat2, excludes2, includes2)) {
- if (!range) {
- range = {
- start: d,
- end: d
- };
- } else {
- range.end = d;
- }
- } else {
- if (range) {
- excludeRanges.push(range);
- range = null;
- }
- }
- d = d.add(1, "d");
- }
- const rectangles = svg.append("g").selectAll("rect").data(excludeRanges).enter();
- rectangles.append("rect").attr("id", function(d2) {
- return "exclude-" + d2.start.format("YYYY-MM-DD");
- }).attr("x", function(d2) {
- return timeScale(d2.start) + theSidePad;
- }).attr("y", conf.gridLineStartPadding).attr("width", function(d2) {
- const renderEnd = d2.end.add(1, "day");
- return timeScale(renderEnd) - timeScale(d2.start);
- }).attr("height", h2 - theTopPad - conf.gridLineStartPadding).attr("transform-origin", function(d2, i) {
- return (timeScale(d2.start) + theSidePad + 0.5 * (timeScale(d2.end) - timeScale(d2.start))).toString() + "px " + (i * theGap + 0.5 * h2).toString() + "px";
- }).attr("class", "exclude-range");
- }
- function makeGrid(theSidePad, theTopPad, w2, h2) {
- let bottomXAxis = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .axisBottom */ .LLu)(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat((0,d3__WEBPACK_IMPORTED_MODULE_5__/* .timeFormat */ .i$Z)(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d"));
- const reTickInterval = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/;
- const resultTickInterval = reTickInterval.exec(
- diagObj.db.getTickInterval() || conf.tickInterval
- );
- if (resultTickInterval !== null) {
- const every = resultTickInterval[1];
- const interval = resultTickInterval[2];
- const weekday2 = diagObj.db.getWeekday() || conf.weekday;
- switch (interval) {
- case "millisecond":
- bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMillisecond */ .U8T.every(every));
- break;
- case "second":
- bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeSecond */ .S1K.every(every));
- break;
- case "minute":
- bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMinute */ .Z_i.every(every));
- break;
- case "hour":
- bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeHour */ .WQD.every(every));
- break;
- case "day":
- bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeDay */ .rr1.every(every));
- break;
- case "week":
- bottomXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every));
- break;
- case "month":
- bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMonth */ .F0B.every(every));
- break;
- }
- }
- svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + (h2 - 50) + ")").call(bottomXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em");
- if (diagObj.db.topAxisEnabled() || conf.topAxis) {
- let topXAxis = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .axisTop */ .F5q)(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat((0,d3__WEBPACK_IMPORTED_MODULE_5__/* .timeFormat */ .i$Z)(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d"));
- if (resultTickInterval !== null) {
- const every = resultTickInterval[1];
- const interval = resultTickInterval[2];
- const weekday2 = diagObj.db.getWeekday() || conf.weekday;
- switch (interval) {
- case "millisecond":
- topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMillisecond */ .U8T.every(every));
- break;
- case "second":
- topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeSecond */ .S1K.every(every));
- break;
- case "minute":
- topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMinute */ .Z_i.every(every));
- break;
- case "hour":
- topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeHour */ .WQD.every(every));
- break;
- case "day":
- topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeDay */ .rr1.every(every));
- break;
- case "week":
- topXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every));
- break;
- case "month":
- topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMonth */ .F0B.every(every));
- break;
- }
- }
- svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + theTopPad + ")").call(topXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
- }
- }
- function vertLabels(theGap, theTopPad) {
- let prevGap = 0;
- const numOccurances = Object.keys(categoryHeights).map((d) => [d, categoryHeights[d]]);
- svg.append("g").selectAll("text").data(numOccurances).enter().append(function(d) {
- const rows = d[0].split(_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_7__.e.lineBreakRegex);
- const dy = -(rows.length - 1) / 2;
- const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text");
- svgLabel.setAttribute("dy", dy + "em");
- for (const [j, row] of rows.entries()) {
- const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan");
- tspan.setAttribute("alignment-baseline", "central");
- tspan.setAttribute("x", "10");
- if (j > 0) {
- tspan.setAttribute("dy", "1em");
- }
- tspan.textContent = row;
- svgLabel.appendChild(tspan);
- }
- return svgLabel;
- }).attr("x", 10).attr("y", function(d, i) {
- if (i > 0) {
- for (let j = 0; j < i; j++) {
- prevGap += numOccurances[i - 1][1];
- return d[1] * theGap / 2 + prevGap * theGap + theTopPad;
- }
- } else {
- return d[1] * theGap / 2 + theTopPad;
- }
- }).attr("font-size", conf.sectionFontSize).attr("class", function(d) {
- for (const [i, category] of categories.entries()) {
- if (d[0] === category) {
- return "sectionTitle sectionTitle" + i % conf.numberSectionStyles;
- }
- }
- return "sectionTitle";
- });
- }
- function drawToday(theSidePad, theTopPad, w2, h2) {
- const todayMarker2 = diagObj.db.getTodayMarker();
- if (todayMarker2 === "off") {
- return;
- }
- const todayG = svg.append("g").attr("class", "today");
- const today = /* @__PURE__ */ new Date();
- const todayLine = todayG.append("line");
- todayLine.attr("x1", timeScale(today) + theSidePad).attr("x2", timeScale(today) + theSidePad).attr("y1", conf.titleTopMargin).attr("y2", h2 - conf.titleTopMargin).attr("class", "today");
- if (todayMarker2 !== "") {
- todayLine.attr("style", todayMarker2.replace(/,/g, ";"));
- }
- }
- function checkUnique(arr) {
- const hash = {};
- const result = [];
- for (let i = 0, l = arr.length; i < l; ++i) {
- if (!Object.prototype.hasOwnProperty.call(hash, arr[i])) {
- hash[arr[i]] = true;
- result.push(arr[i]);
- }
- }
- return result;
- }
-};
-const ganttRenderer = {
- setConf,
- draw
-};
-const getStyles = (options) => `
- .mermaid-main-font {
- font-family: "trebuchet ms", verdana, arial, sans-serif;
- font-family: var(--mermaid-font-family);
- }
- .exclude-range {
- fill: ${options.excludeBkgColor};
- }
-
- .section {
- stroke: none;
- opacity: 0.2;
- }
-
- .section0 {
- fill: ${options.sectionBkgColor};
- }
-
- .section2 {
- fill: ${options.sectionBkgColor2};
- }
-
- .section1,
- .section3 {
- fill: ${options.altSectionBkgColor};
- opacity: 0.2;
- }
-
- .sectionTitle0 {
- fill: ${options.titleColor};
- }
-
- .sectionTitle1 {
- fill: ${options.titleColor};
- }
-
- .sectionTitle2 {
- fill: ${options.titleColor};
- }
-
- .sectionTitle3 {
- fill: ${options.titleColor};
- }
-
- .sectionTitle {
- text-anchor: start;
- // font-size: ${options.ganttFontSize};
- // text-height: 14px;
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
- font-family: var(--mermaid-font-family);
-
- }
-
-
- /* Grid and axis */
-
- .grid .tick {
- stroke: ${options.gridColor};
- opacity: 0.8;
- shape-rendering: crispEdges;
- text {
- font-family: ${options.fontFamily};
- fill: ${options.textColor};
- }
- }
-
- .grid path {
- stroke-width: 0;
- }
-
-
- /* Today line */
-
- .today {
- fill: none;
- stroke: ${options.todayLineColor};
- stroke-width: 2px;
- }
-
-
- /* Task styling */
-
- /* Default task */
-
- .task {
- stroke-width: 2;
- }
-
- .taskText {
- text-anchor: middle;
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
- font-family: var(--mermaid-font-family);
- }
-
- // .taskText:not([font-size]) {
- // font-size: ${options.ganttFontSize};
- // }
-
- .taskTextOutsideRight {
- fill: ${options.taskTextDarkColor};
- text-anchor: start;
- // font-size: ${options.ganttFontSize};
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
- font-family: var(--mermaid-font-family);
-
- }
-
- .taskTextOutsideLeft {
- fill: ${options.taskTextDarkColor};
- text-anchor: end;
- // font-size: ${options.ganttFontSize};
- }
-
- /* Special case clickable */
- .task.clickable {
- cursor: pointer;
- }
- .taskText.clickable {
- cursor: pointer;
- fill: ${options.taskTextClickableColor} !important;
- font-weight: bold;
- }
-
- .taskTextOutsideLeft.clickable {
- cursor: pointer;
- fill: ${options.taskTextClickableColor} !important;
- font-weight: bold;
- }
-
- .taskTextOutsideRight.clickable {
- cursor: pointer;
- fill: ${options.taskTextClickableColor} !important;
- font-weight: bold;
- }
-
- /* Specific task settings for the sections*/
-
- .taskText0,
- .taskText1,
- .taskText2,
- .taskText3 {
- fill: ${options.taskTextColor};
- }
-
- .task0,
- .task1,
- .task2,
- .task3 {
- fill: ${options.taskBkgColor};
- stroke: ${options.taskBorderColor};
- }
-
- .taskTextOutside0,
- .taskTextOutside2
- {
- fill: ${options.taskTextOutsideColor};
- }
-
- .taskTextOutside1,
- .taskTextOutside3 {
- fill: ${options.taskTextOutsideColor};
- }
-
-
- /* Active task */
-
- .active0,
- .active1,
- .active2,
- .active3 {
- fill: ${options.activeTaskBkgColor};
- stroke: ${options.activeTaskBorderColor};
- }
-
- .activeText0,
- .activeText1,
- .activeText2,
- .activeText3 {
- fill: ${options.taskTextDarkColor} !important;
- }
-
-
- /* Completed task */
-
- .done0,
- .done1,
- .done2,
- .done3 {
- stroke: ${options.doneTaskBorderColor};
- fill: ${options.doneTaskBkgColor};
- stroke-width: 2;
- }
-
- .doneText0,
- .doneText1,
- .doneText2,
- .doneText3 {
- fill: ${options.taskTextDarkColor} !important;
- }
-
-
- /* Tasks on the critical line */
-
- .crit0,
- .crit1,
- .crit2,
- .crit3 {
- stroke: ${options.critBorderColor};
- fill: ${options.critBkgColor};
- stroke-width: 2;
- }
-
- .activeCrit0,
- .activeCrit1,
- .activeCrit2,
- .activeCrit3 {
- stroke: ${options.critBorderColor};
- fill: ${options.activeTaskBkgColor};
- stroke-width: 2;
- }
-
- .doneCrit0,
- .doneCrit1,
- .doneCrit2,
- .doneCrit3 {
- stroke: ${options.critBorderColor};
- fill: ${options.doneTaskBkgColor};
- stroke-width: 2;
- cursor: pointer;
- shape-rendering: crispEdges;
- }
-
- .milestone {
- transform: rotate(45deg) scale(0.8,0.8);
- }
-
- .milestoneText {
- font-style: italic;
- }
- .doneCritText0,
- .doneCritText1,
- .doneCritText2,
- .doneCritText3 {
- fill: ${options.taskTextDarkColor} !important;
- }
-
- .activeCritText0,
- .activeCritText1,
- .activeCritText2,
- .activeCritText3 {
- fill: ${options.taskTextDarkColor} !important;
- }
-
- .titleText {
- text-anchor: middle;
- font-size: 18px;
- fill: ${options.textColor} ;
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
- font-family: var(--mermaid-font-family);
- }
-`;
-const ganttStyles = getStyles;
-const diagram = {
- parser: ganttParser,
- db: ganttDb,
- renderer: ganttRenderer,
- styles: ganttStyles
-};
-
-
-
-/***/ })
-
-};
-;
\ No newline at end of file
diff --git a/build/assets/js/168.bb49794d.js b/build/assets/js/168.bb49794d.js
new file mode 100644
index 00000000..f78705b4
--- /dev/null
+++ b/build/assets/js/168.bb49794d.js
@@ -0,0 +1,25898 @@
+"use strict";
+exports.id = 168;
+exports.ids = [168];
+exports.modules = {
+
+/***/ 41644:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ bK: () => (/* reexport */ layout)
+});
+
+// UNUSED EXPORTS: acyclic, normalize, rank
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js
+var forEach = __webpack_require__(70870);
+// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js
+var uniqueId = __webpack_require__(66749);
+// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules
+var has = __webpack_require__(17452);
+// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js
+var constant = __webpack_require__(62002);
+// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js
+var flatten = __webpack_require__(27961);
+// EXTERNAL MODULE: ./node_modules/lodash-es/map.js
+var map = __webpack_require__(43836);
+// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules
+var range = __webpack_require__(74379);
+// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js
+var graphlib = __webpack_require__(45625);
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js
+/*
+ * Simple doubly linked list implementation derived from Cormen, et al.,
+ * "Introduction to Algorithms".
+ */
+
+
+
+class List {
+ constructor() {
+ var sentinel = {};
+ sentinel._next = sentinel._prev = sentinel;
+ this._sentinel = sentinel;
+ }
+ dequeue() {
+ var sentinel = this._sentinel;
+ var entry = sentinel._prev;
+ if (entry !== sentinel) {
+ unlink(entry);
+ return entry;
+ }
+ }
+ enqueue(entry) {
+ var sentinel = this._sentinel;
+ if (entry._prev && entry._next) {
+ unlink(entry);
+ }
+ entry._next = sentinel._next;
+ sentinel._next._prev = entry;
+ sentinel._next = entry;
+ entry._prev = sentinel;
+ }
+ toString() {
+ var strs = [];
+ var sentinel = this._sentinel;
+ var curr = sentinel._prev;
+ while (curr !== sentinel) {
+ strs.push(JSON.stringify(curr, filterOutLinks));
+ curr = curr._prev;
+ }
+ return '[' + strs.join(', ') + ']';
+ }
+}
+
+function unlink(entry) {
+ entry._prev._next = entry._next;
+ entry._next._prev = entry._prev;
+ delete entry._next;
+ delete entry._prev;
+}
+
+function filterOutLinks(k, v) {
+ if (k !== '_next' && k !== '_prev') {
+ return v;
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js
+
+
+
+
+/*
+ * A greedy heuristic for finding a feedback arc set for a graph. A feedback
+ * arc set is a set of edges that can be removed to make a graph acyclic.
+ * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and
+ * effective heuristic for the feedback arc set problem." This implementation
+ * adjusts that from the paper to allow for weighted edges.
+ */
+
+
+var DEFAULT_WEIGHT_FN = constant/* default */.Z(1);
+
+function greedyFAS(g, weightFn) {
+ if (g.nodeCount() <= 1) {
+ return [];
+ }
+ var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN);
+ var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx);
+
+ // Expand multi-edges
+ return flatten/* default */.Z(
+ map/* default */.Z(results, function (e) {
+ return g.outEdges(e.v, e.w);
+ })
+ );
+}
+
+function doGreedyFAS(g, buckets, zeroIdx) {
+ var results = [];
+ var sources = buckets[buckets.length - 1];
+ var sinks = buckets[0];
+
+ var entry;
+ while (g.nodeCount()) {
+ while ((entry = sinks.dequeue())) {
+ removeNode(g, buckets, zeroIdx, entry);
+ }
+ while ((entry = sources.dequeue())) {
+ removeNode(g, buckets, zeroIdx, entry);
+ }
+ if (g.nodeCount()) {
+ for (var i = buckets.length - 2; i > 0; --i) {
+ entry = buckets[i].dequeue();
+ if (entry) {
+ results = results.concat(removeNode(g, buckets, zeroIdx, entry, true));
+ break;
+ }
+ }
+ }
+ }
+
+ return results;
+}
+
+function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) {
+ var results = collectPredecessors ? [] : undefined;
+
+ forEach/* default */.Z(g.inEdges(entry.v), function (edge) {
+ var weight = g.edge(edge);
+ var uEntry = g.node(edge.v);
+
+ if (collectPredecessors) {
+ results.push({ v: edge.v, w: edge.w });
+ }
+
+ uEntry.out -= weight;
+ assignBucket(buckets, zeroIdx, uEntry);
+ });
+
+ forEach/* default */.Z(g.outEdges(entry.v), function (edge) {
+ var weight = g.edge(edge);
+ var w = edge.w;
+ var wEntry = g.node(w);
+ wEntry['in'] -= weight;
+ assignBucket(buckets, zeroIdx, wEntry);
+ });
+
+ g.removeNode(entry.v);
+
+ return results;
+}
+
+function buildState(g, weightFn) {
+ var fasGraph = new graphlib/* Graph */.k();
+ var maxIn = 0;
+ var maxOut = 0;
+
+ forEach/* default */.Z(g.nodes(), function (v) {
+ fasGraph.setNode(v, { v: v, in: 0, out: 0 });
+ });
+
+ // Aggregate weights on nodes, but also sum the weights across multi-edges
+ // into a single edge for the fasGraph.
+ forEach/* default */.Z(g.edges(), function (e) {
+ var prevWeight = fasGraph.edge(e.v, e.w) || 0;
+ var weight = weightFn(e);
+ var edgeWeight = prevWeight + weight;
+ fasGraph.setEdge(e.v, e.w, edgeWeight);
+ maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight));
+ maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight));
+ });
+
+ var buckets = range/* default */.Z(maxOut + maxIn + 3).map(function () {
+ return new List();
+ });
+ var zeroIdx = maxIn + 1;
+
+ forEach/* default */.Z(fasGraph.nodes(), function (v) {
+ assignBucket(buckets, zeroIdx, fasGraph.node(v));
+ });
+
+ return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx };
+}
+
+function assignBucket(buckets, zeroIdx, entry) {
+ if (!entry.out) {
+ buckets[0].enqueue(entry);
+ } else if (!entry['in']) {
+ buckets[buckets.length - 1].enqueue(entry);
+ } else {
+ buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry);
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js
+
+
+
+
+
+function run(g) {
+ var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g);
+ forEach/* default */.Z(fas, function (e) {
+ var label = g.edge(e);
+ g.removeEdge(e);
+ label.forwardName = e.name;
+ label.reversed = true;
+ g.setEdge(e.w, e.v, label, uniqueId/* default */.Z('rev'));
+ });
+
+ function weightFn(g) {
+ return function (e) {
+ return g.edge(e).weight;
+ };
+ }
+}
+
+function dfsFAS(g) {
+ var fas = [];
+ var stack = {};
+ var visited = {};
+
+ function dfs(v) {
+ if (has/* default */.Z(visited, v)) {
+ return;
+ }
+ visited[v] = true;
+ stack[v] = true;
+ forEach/* default */.Z(g.outEdges(v), function (e) {
+ if (has/* default */.Z(stack, e.w)) {
+ fas.push(e);
+ } else {
+ dfs(e.w);
+ }
+ });
+ delete stack[v];
+ }
+
+ forEach/* default */.Z(g.nodes(), dfs);
+ return fas;
+}
+
+function undo(g) {
+ forEach/* default */.Z(g.edges(), function (e) {
+ var label = g.edge(e);
+ if (label.reversed) {
+ g.removeEdge(e);
+
+ var forwardName = label.forwardName;
+ delete label.reversed;
+ delete label.forwardName;
+ g.setEdge(e.w, e.v, label, forwardName);
+ }
+ });
+}
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules
+var merge = __webpack_require__(59236);
+// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules
+var pick = __webpack_require__(61666);
+// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js
+var defaults = __webpack_require__(3688);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js
+var isSymbol = __webpack_require__(72714);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js
+
+
+/**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !(0,isSymbol/* default */.Z)(current))
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+}
+
+/* harmony default export */ const _baseExtremum = (baseExtremum);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js
+/**
+ * The base implementation of `_.gt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+function baseGt(value, other) {
+ return value > other;
+}
+
+/* harmony default export */ const _baseGt = (baseGt);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js
+var identity = __webpack_require__(69203);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js
+
+
+
+
+/**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+function max(array) {
+ return (array && array.length)
+ ? _baseExtremum(array, identity/* default */.Z, _baseGt)
+ : undefined;
+}
+
+/* harmony default export */ const lodash_es_max = (max);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js
+/**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+}
+
+/* harmony default export */ const lodash_es_last = (last);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js
+var _baseAssignValue = __webpack_require__(74752);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js
+var _baseForOwn = __webpack_require__(2693);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules
+var _baseIteratee = __webpack_require__(74765);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js
+
+
+
+
+/**
+ * Creates an object with the same keys as `object` and values generated
+ * by running each own enumerable string keyed property of `object` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapKeys
+ * @example
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * _.mapValues(users, function(o) { return o.age; });
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ */
+function mapValues(object, iteratee) {
+ var result = {};
+ iteratee = (0,_baseIteratee/* default */.Z)(iteratee, 3);
+
+ (0,_baseForOwn/* default */.Z)(object, function(value, key, object) {
+ (0,_baseAssignValue/* default */.Z)(result, key, iteratee(value, key, object));
+ });
+ return result;
+}
+
+/* harmony default export */ const lodash_es_mapValues = (mapValues);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js
+var isUndefined = __webpack_require__(49360);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js
+/**
+ * The base implementation of `_.lt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+function baseLt(value, other) {
+ return value < other;
+}
+
+/* harmony default export */ const _baseLt = (baseLt);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js
+
+
+
+
+/**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+function min(array) {
+ return (array && array.length)
+ ? _baseExtremum(array, identity/* default */.Z, _baseLt)
+ : undefined;
+}
+
+/* harmony default export */ const lodash_es_min = (min);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js
+var _root = __webpack_require__(66092);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js
+
+
+/**
+ * Gets the timestamp of the number of milliseconds that have elapsed since
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Date
+ * @returns {number} Returns the timestamp.
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => Logs the number of milliseconds it took for the deferred invocation.
+ */
+var now = function() {
+ return _root/* default */.Z.Date.now();
+};
+
+/* harmony default export */ const lodash_es_now = (now);
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js
+
+
+
+
+
+/*
+ * Adds a dummy node to the graph and return v.
+ */
+function addDummyNode(g, type, attrs, name) {
+ var v;
+ do {
+ v = uniqueId/* default */.Z(name);
+ } while (g.hasNode(v));
+
+ attrs.dummy = type;
+ g.setNode(v, attrs);
+ return v;
+}
+
+/*
+ * Returns a new graph with only simple edges. Handles aggregation of data
+ * associated with multi-edges.
+ */
+function simplify(g) {
+ var simplified = new graphlib/* Graph */.k().setGraph(g.graph());
+ forEach/* default */.Z(g.nodes(), function (v) {
+ simplified.setNode(v, g.node(v));
+ });
+ forEach/* default */.Z(g.edges(), function (e) {
+ var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 };
+ var label = g.edge(e);
+ simplified.setEdge(e.v, e.w, {
+ weight: simpleLabel.weight + label.weight,
+ minlen: Math.max(simpleLabel.minlen, label.minlen),
+ });
+ });
+ return simplified;
+}
+
+function asNonCompoundGraph(g) {
+ var simplified = new graphlib/* Graph */.k({ multigraph: g.isMultigraph() }).setGraph(g.graph());
+ forEach/* default */.Z(g.nodes(), function (v) {
+ if (!g.children(v).length) {
+ simplified.setNode(v, g.node(v));
+ }
+ });
+ forEach/* default */.Z(g.edges(), function (e) {
+ simplified.setEdge(e, g.edge(e));
+ });
+ return simplified;
+}
+
+function successorWeights(g) {
+ var weightMap = _.map(g.nodes(), function (v) {
+ var sucs = {};
+ _.forEach(g.outEdges(v), function (e) {
+ sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight;
+ });
+ return sucs;
+ });
+ return _.zipObject(g.nodes(), weightMap);
+}
+
+function predecessorWeights(g) {
+ var weightMap = _.map(g.nodes(), function (v) {
+ var preds = {};
+ _.forEach(g.inEdges(v), function (e) {
+ preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight;
+ });
+ return preds;
+ });
+ return _.zipObject(g.nodes(), weightMap);
+}
+
+/*
+ * Finds where a line starting at point ({x, y}) would intersect a rectangle
+ * ({x, y, width, height}) if it were pointing at the rectangle's center.
+ */
+function intersectRect(rect, point) {
+ var x = rect.x;
+ var y = rect.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 = rect.width / 2;
+ var h = rect.height / 2;
+
+ if (!dx && !dy) {
+ throw new Error('Not possible to find intersection inside of the rectangle');
+ }
+
+ 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 = (h * dx) / dy;
+ sy = h;
+ } else {
+ // Intersection is left or right of rect.
+ if (dx < 0) {
+ w = -w;
+ }
+ sx = w;
+ sy = (w * dy) / dx;
+ }
+
+ return { x: x + sx, y: y + sy };
+}
+
+/*
+ * Given a DAG with each node assigned "rank" and "order" properties, this
+ * function will produce a matrix with the ids of each node.
+ */
+function buildLayerMatrix(g) {
+ var layering = map/* default */.Z(range/* default */.Z(util_maxRank(g) + 1), function () {
+ return [];
+ });
+ forEach/* default */.Z(g.nodes(), function (v) {
+ var node = g.node(v);
+ var rank = node.rank;
+ if (!isUndefined/* default */.Z(rank)) {
+ layering[rank][node.order] = v;
+ }
+ });
+ return layering;
+}
+
+/*
+ * Adjusts the ranks for all nodes in the graph such that all nodes v have
+ * rank(v) >= 0 and at least one node w has rank(w) = 0.
+ */
+function normalizeRanks(g) {
+ var min = lodash_es_min(
+ map/* default */.Z(g.nodes(), function (v) {
+ return g.node(v).rank;
+ })
+ );
+ forEach/* default */.Z(g.nodes(), function (v) {
+ var node = g.node(v);
+ if (has/* default */.Z(node, 'rank')) {
+ node.rank -= min;
+ }
+ });
+}
+
+function removeEmptyRanks(g) {
+ // Ranks may not start at 0, so we need to offset them
+ var offset = lodash_es_min(
+ map/* default */.Z(g.nodes(), function (v) {
+ return g.node(v).rank;
+ })
+ );
+
+ var layers = [];
+ forEach/* default */.Z(g.nodes(), function (v) {
+ var rank = g.node(v).rank - offset;
+ if (!layers[rank]) {
+ layers[rank] = [];
+ }
+ layers[rank].push(v);
+ });
+
+ var delta = 0;
+ var nodeRankFactor = g.graph().nodeRankFactor;
+ forEach/* default */.Z(layers, function (vs, i) {
+ if (isUndefined/* default */.Z(vs) && i % nodeRankFactor !== 0) {
+ --delta;
+ } else if (delta) {
+ forEach/* default */.Z(vs, function (v) {
+ g.node(v).rank += delta;
+ });
+ }
+ });
+}
+
+function addBorderNode(g, prefix, rank, order) {
+ var node = {
+ width: 0,
+ height: 0,
+ };
+ if (arguments.length >= 4) {
+ node.rank = rank;
+ node.order = order;
+ }
+ return addDummyNode(g, 'border', node, prefix);
+}
+
+function util_maxRank(g) {
+ return lodash_es_max(
+ map/* default */.Z(g.nodes(), function (v) {
+ var rank = g.node(v).rank;
+ if (!isUndefined/* default */.Z(rank)) {
+ return rank;
+ }
+ })
+ );
+}
+
+/*
+ * Partition a collection into two groups: `lhs` and `rhs`. If the supplied
+ * function returns true for an entry it goes into `lhs`. Otherwise it goes
+ * into `rhs.
+ */
+function partition(collection, fn) {
+ var result = { lhs: [], rhs: [] };
+ forEach/* default */.Z(collection, function (value) {
+ if (fn(value)) {
+ result.lhs.push(value);
+ } else {
+ result.rhs.push(value);
+ }
+ });
+ return result;
+}
+
+/*
+ * Returns a new function that wraps `fn` with a timer. The wrapper logs the
+ * time it takes to execute the function.
+ */
+function util_time(name, fn) {
+ var start = lodash_es_now();
+ try {
+ return fn();
+ } finally {
+ console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms');
+ }
+}
+
+function notime(name, fn) {
+ return fn();
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js
+
+
+
+
+
+function addBorderSegments(g) {
+ function dfs(v) {
+ var children = g.children(v);
+ var node = g.node(v);
+ if (children.length) {
+ forEach/* default */.Z(children, dfs);
+ }
+
+ if (has/* default */.Z(node, 'minRank')) {
+ node.borderLeft = [];
+ node.borderRight = [];
+ for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) {
+ add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank);
+ add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank);
+ }
+ }
+ }
+
+ forEach/* default */.Z(g.children(), dfs);
+}
+
+function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) {
+ var label = { width: 0, height: 0, rank: rank, borderType: prop };
+ var prev = sgNode[prop][rank - 1];
+ var curr = addDummyNode(g, 'border', label, prefix);
+ sgNode[prop][rank] = curr;
+ g.setParent(curr, sg);
+ if (prev) {
+ g.setEdge(prev, curr, { weight: 1 });
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js
+
+
+
+
+function adjust(g) {
+ var rankDir = g.graph().rankdir.toLowerCase();
+ if (rankDir === 'lr' || rankDir === 'rl') {
+ swapWidthHeight(g);
+ }
+}
+
+function coordinate_system_undo(g) {
+ var rankDir = g.graph().rankdir.toLowerCase();
+ if (rankDir === 'bt' || rankDir === 'rl') {
+ reverseY(g);
+ }
+
+ if (rankDir === 'lr' || rankDir === 'rl') {
+ swapXY(g);
+ swapWidthHeight(g);
+ }
+}
+
+function swapWidthHeight(g) {
+ forEach/* default */.Z(g.nodes(), function (v) {
+ swapWidthHeightOne(g.node(v));
+ });
+ forEach/* default */.Z(g.edges(), function (e) {
+ swapWidthHeightOne(g.edge(e));
+ });
+}
+
+function swapWidthHeightOne(attrs) {
+ var w = attrs.width;
+ attrs.width = attrs.height;
+ attrs.height = w;
+}
+
+function reverseY(g) {
+ forEach/* default */.Z(g.nodes(), function (v) {
+ reverseYOne(g.node(v));
+ });
+
+ forEach/* default */.Z(g.edges(), function (e) {
+ var edge = g.edge(e);
+ forEach/* default */.Z(edge.points, reverseYOne);
+ if (has/* default */.Z(edge, 'y')) {
+ reverseYOne(edge);
+ }
+ });
+}
+
+function reverseYOne(attrs) {
+ attrs.y = -attrs.y;
+}
+
+function swapXY(g) {
+ forEach/* default */.Z(g.nodes(), function (v) {
+ swapXYOne(g.node(v));
+ });
+
+ forEach/* default */.Z(g.edges(), function (e) {
+ var edge = g.edge(e);
+ forEach/* default */.Z(edge.points, swapXYOne);
+ if (has/* default */.Z(edge, 'x')) {
+ swapXYOne(edge);
+ }
+ });
+}
+
+function swapXYOne(attrs) {
+ var x = attrs.x;
+ attrs.x = attrs.y;
+ attrs.y = x;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js
+
+
+
+
+
+/*
+ * Breaks any long edges in the graph into short segments that span 1 layer
+ * each. This operation is undoable with the denormalize function.
+ *
+ * Pre-conditions:
+ *
+ * 1. The input graph is a DAG.
+ * 2. Each node in the graph has a "rank" property.
+ *
+ * Post-condition:
+ *
+ * 1. All edges in the graph have a length of 1.
+ * 2. Dummy nodes are added where edges have been split into segments.
+ * 3. The graph is augmented with a "dummyChains" attribute which contains
+ * the first dummy in each chain of dummy nodes produced.
+ */
+function normalize_run(g) {
+ g.graph().dummyChains = [];
+ forEach/* default */.Z(g.edges(), function (edge) {
+ normalizeEdge(g, edge);
+ });
+}
+
+function normalizeEdge(g, e) {
+ var v = e.v;
+ var vRank = g.node(v).rank;
+ var w = e.w;
+ var wRank = g.node(w).rank;
+ var name = e.name;
+ var edgeLabel = g.edge(e);
+ var labelRank = edgeLabel.labelRank;
+
+ if (wRank === vRank + 1) return;
+
+ g.removeEdge(e);
+
+ var dummy, attrs, i;
+ for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) {
+ edgeLabel.points = [];
+ attrs = {
+ width: 0,
+ height: 0,
+ edgeLabel: edgeLabel,
+ edgeObj: e,
+ rank: vRank,
+ };
+ dummy = addDummyNode(g, 'edge', attrs, '_d');
+ if (vRank === labelRank) {
+ attrs.width = edgeLabel.width;
+ attrs.height = edgeLabel.height;
+ // @ts-expect-error
+ attrs.dummy = 'edge-label';
+ // @ts-expect-error
+ attrs.labelpos = edgeLabel.labelpos;
+ }
+ g.setEdge(v, dummy, { weight: edgeLabel.weight }, name);
+ if (i === 0) {
+ g.graph().dummyChains.push(dummy);
+ }
+ v = dummy;
+ }
+
+ g.setEdge(v, w, { weight: edgeLabel.weight }, name);
+}
+
+function normalize_undo(g) {
+ forEach/* default */.Z(g.graph().dummyChains, function (v) {
+ var node = g.node(v);
+ var origLabel = node.edgeLabel;
+ var w;
+ g.setEdge(node.edgeObj, origLabel);
+ while (node.dummy) {
+ w = g.successors(v)[0];
+ g.removeNode(v);
+ origLabel.points.push({ x: node.x, y: node.y });
+ if (node.dummy === 'edge-label') {
+ origLabel.x = node.x;
+ origLabel.y = node.y;
+ origLabel.width = node.width;
+ origLabel.height = node.height;
+ }
+ v = w;
+ node = g.node(v);
+ }
+ });
+}
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js
+
+
+
+
+/**
+ * This method is like `_.min` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.minBy(objects, function(o) { return o.n; });
+ * // => { 'n': 1 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.minBy(objects, 'n');
+ * // => { 'n': 1 }
+ */
+function minBy(array, iteratee) {
+ return (array && array.length)
+ ? _baseExtremum(array, (0,_baseIteratee/* default */.Z)(iteratee, 2), _baseLt)
+ : undefined;
+}
+
+/* harmony default export */ const lodash_es_minBy = (minBy);
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js
+
+
+
+
+/*
+ * Initializes ranks for the input graph using the longest path algorithm. This
+ * algorithm scales well and is fast in practice, it yields rather poor
+ * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom
+ * ranks wide and leaving edges longer than necessary. However, due to its
+ * speed, this algorithm is good for getting an initial ranking that can be fed
+ * into other algorithms.
+ *
+ * This algorithm does not normalize layers because it will be used by other
+ * algorithms in most cases. If using this algorithm directly, be sure to
+ * run normalize at the end.
+ *
+ * Pre-conditions:
+ *
+ * 1. Input graph is a DAG.
+ * 2. Input graph node labels can be assigned properties.
+ *
+ * Post-conditions:
+ *
+ * 1. Each node will be assign an (unnormalized) "rank" property.
+ */
+function longestPath(g) {
+ var visited = {};
+
+ function dfs(v) {
+ var label = g.node(v);
+ if (has/* default */.Z(visited, v)) {
+ return label.rank;
+ }
+ visited[v] = true;
+
+ var rank = lodash_es_min(
+ map/* default */.Z(g.outEdges(v), function (e) {
+ return dfs(e.w) - g.edge(e).minlen;
+ })
+ );
+
+ if (
+ rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3
+ rank === undefined || // return value of _.map([]) for Lodash 4
+ rank === null
+ ) {
+ // return value of _.map([null])
+ rank = 0;
+ }
+
+ return (label.rank = rank);
+ }
+
+ forEach/* default */.Z(g.sources(), dfs);
+}
+
+/*
+ * Returns the amount of slack for the given edge. The slack is defined as the
+ * difference between the length of the edge and its minimum length.
+ */
+function slack(g, e) {
+ return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js
+
+
+
+
+
+
+/*
+ * Constructs a spanning tree with tight edges and adjusted the input node's
+ * ranks to achieve this. A tight edge is one that is has a length that matches
+ * its "minlen" attribute.
+ *
+ * The basic structure for this function is derived from Gansner, et al., "A
+ * Technique for Drawing Directed Graphs."
+ *
+ * Pre-conditions:
+ *
+ * 1. Graph must be a DAG.
+ * 2. Graph must be connected.
+ * 3. Graph must have at least one node.
+ * 5. Graph nodes must have been previously assigned a "rank" property that
+ * respects the "minlen" property of incident edges.
+ * 6. Graph edges must have a "minlen" property.
+ *
+ * Post-conditions:
+ *
+ * - Graph nodes will have their rank adjusted to ensure that all edges are
+ * tight.
+ *
+ * Returns a tree (undirected graph) that is constructed using only "tight"
+ * edges.
+ */
+function feasibleTree(g) {
+ var t = new graphlib/* Graph */.k({ directed: false });
+
+ // Choose arbitrary node from which to start our tree
+ var start = g.nodes()[0];
+ var size = g.nodeCount();
+ t.setNode(start, {});
+
+ var edge, delta;
+ while (tightTree(t, g) < size) {
+ edge = findMinSlackEdge(t, g);
+ delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge);
+ shiftRanks(t, g, delta);
+ }
+
+ return t;
+}
+
+/*
+ * Finds a maximal tree of tight edges and returns the number of nodes in the
+ * tree.
+ */
+function tightTree(t, g) {
+ function dfs(v) {
+ forEach/* default */.Z(g.nodeEdges(v), function (e) {
+ var edgeV = e.v,
+ w = v === edgeV ? e.w : edgeV;
+ if (!t.hasNode(w) && !slack(g, e)) {
+ t.setNode(w, {});
+ t.setEdge(v, w, {});
+ dfs(w);
+ }
+ });
+ }
+
+ forEach/* default */.Z(t.nodes(), dfs);
+ return t.nodeCount();
+}
+
+/*
+ * Finds the edge with the smallest slack that is incident on tree and returns
+ * it.
+ */
+function findMinSlackEdge(t, g) {
+ return lodash_es_minBy(g.edges(), function (e) {
+ if (t.hasNode(e.v) !== t.hasNode(e.w)) {
+ return slack(g, e);
+ }
+ });
+}
+
+function shiftRanks(t, g, delta) {
+ forEach/* default */.Z(t.nodes(), function (v) {
+ g.node(v).rank += delta;
+ });
+}
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js
+var isArrayLike = __webpack_require__(50585);
+// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js
+var keys = __webpack_require__(17179);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js
+
+
+
+
+/**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} findIndexFunc The function to find the collection index.
+ * @returns {Function} Returns the new find function.
+ */
+function createFind(findIndexFunc) {
+ return function(collection, predicate, fromIndex) {
+ var iterable = Object(collection);
+ if (!(0,isArrayLike/* default */.Z)(collection)) {
+ var iteratee = (0,_baseIteratee/* default */.Z)(predicate, 3);
+ collection = (0,keys/* default */.Z)(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+ }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+ };
+}
+
+/* harmony default export */ const _createFind = (createFind);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js
+var _baseFindIndex = __webpack_require__(21692);
+// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules
+var toFinite = __webpack_require__(94099);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js
+
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+function toInteger(value) {
+ var result = (0,toFinite/* default */.Z)(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+}
+
+/* harmony default export */ const lodash_es_toInteger = (toInteger);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js
+
+
+
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return (0,_baseFindIndex/* default */.Z)(array, (0,_baseIteratee/* default */.Z)(predicate, 3), index);
+}
+
+/* harmony default export */ const lodash_es_findIndex = (findIndex);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js
+
+
+
+/**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+var find = _createFind(lodash_es_findIndex);
+
+/* harmony default export */ const lodash_es_find = (find);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules
+var filter = __webpack_require__(13445);
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js
+
+
+
+
+
+var DEFAULT_WEIGHT_FUNC = constant/* default */.Z(1);
+
+function dijkstra_dijkstra(g, source, weightFn, edgeFn) {
+ return runDijkstra(
+ g,
+ String(source),
+ weightFn || DEFAULT_WEIGHT_FUNC,
+ edgeFn ||
+ function (v) {
+ return g.outEdges(v);
+ }
+ );
+}
+
+function runDijkstra(g, source, weightFn, edgeFn) {
+ var results = {};
+ var pq = new PriorityQueue();
+ var v, vEntry;
+
+ var updateNeighbors = function (edge) {
+ var w = edge.v !== v ? edge.v : edge.w;
+ var wEntry = results[w];
+ var weight = weightFn(edge);
+ var distance = vEntry.distance + weight;
+
+ if (weight < 0) {
+ throw new Error(
+ 'dijkstra does not allow negative edge weights. ' +
+ 'Bad edge: ' +
+ edge +
+ ' Weight: ' +
+ weight
+ );
+ }
+
+ if (distance < wEntry.distance) {
+ wEntry.distance = distance;
+ wEntry.predecessor = v;
+ pq.decrease(w, distance);
+ }
+ };
+
+ g.nodes().forEach(function (v) {
+ var distance = v === source ? 0 : Number.POSITIVE_INFINITY;
+ results[v] = { distance: distance };
+ pq.add(v, distance);
+ });
+
+ while (pq.size() > 0) {
+ v = pq.removeMin();
+ vEntry = results[v];
+ if (vEntry.distance === Number.POSITIVE_INFINITY) {
+ break;
+ }
+
+ edgeFn(v).forEach(updateNeighbors);
+ }
+
+ return results;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js
+
+
+
+
+
+function dijkstraAll(g, weightFunc, edgeFunc) {
+ return _.transform(
+ g.nodes(),
+ function (acc, v) {
+ acc[v] = dijkstra(g, v, weightFunc, edgeFunc);
+ },
+ {}
+ );
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js
+
+
+
+
+var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.Z(1);
+
+function floydWarshall(g, weightFn, edgeFn) {
+ return runFloydWarshall(
+ g,
+ weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC,
+ edgeFn ||
+ function (v) {
+ return g.outEdges(v);
+ }
+ );
+}
+
+function runFloydWarshall(g, weightFn, edgeFn) {
+ var results = {};
+ var nodes = g.nodes();
+
+ nodes.forEach(function (v) {
+ results[v] = {};
+ results[v][v] = { distance: 0 };
+ nodes.forEach(function (w) {
+ if (v !== w) {
+ results[v][w] = { distance: Number.POSITIVE_INFINITY };
+ }
+ });
+ edgeFn(v).forEach(function (edge) {
+ var w = edge.v === v ? edge.w : edge.v;
+ var d = weightFn(edge);
+ results[v][w] = { distance: d, predecessor: v };
+ });
+ });
+
+ nodes.forEach(function (k) {
+ var rowK = results[k];
+ nodes.forEach(function (i) {
+ var rowI = results[i];
+ nodes.forEach(function (j) {
+ var ik = rowI[k];
+ var kj = rowK[j];
+ var ij = rowI[j];
+ var altDistance = ik.distance + kj.distance;
+ if (altDistance < ij.distance) {
+ ij.distance = altDistance;
+ ij.predecessor = kj.predecessor;
+ }
+ });
+ });
+ });
+
+ return results;
+}
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules
+var _baseKeys = __webpack_require__(39473);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules
+var _getTag = __webpack_require__(83970);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules
+var _baseGetTag = __webpack_require__(93589);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
+var isArray = __webpack_require__(27771);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js
+var isObjectLike = __webpack_require__(18533);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js
+
+
+
+
+/** `Object#toString` result references. */
+var stringTag = '[object String]';
+
+/**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+function isString(value) {
+ return typeof value == 'string' ||
+ (!(0,isArray/* default */.Z)(value) && (0,isObjectLike/* default */.Z)(value) && (0,_baseGetTag/* default */.Z)(value) == stringTag);
+}
+
+/* harmony default export */ const lodash_es_isString = (isString);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js
+var _baseProperty = __webpack_require__(54193);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js
+
+
+/**
+ * Gets the size of an ASCII `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+var asciiSize = (0,_baseProperty/* default */.Z)('length');
+
+/* harmony default export */ const _asciiSize = (asciiSize);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsVarRange = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsZWJ = '\\u200d';
+
+/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
+var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
+
+/**
+ * Checks if `string` contains Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a symbol is found, else `false`.
+ */
+function hasUnicode(string) {
+ return reHasUnicode.test(string);
+}
+
+/* harmony default export */ const _hasUnicode = (hasUnicode);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js
+/** Used to compose unicode character classes. */
+var _unicodeSize_rsAstralRange = '\\ud800-\\udfff',
+ _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f',
+ _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange,
+ _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsAstral = '[' + _unicodeSize_rsAstralRange + ']',
+ rsCombo = '[' + _unicodeSize_rsComboRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ _unicodeSize_rsZWJ = '\\u200d';
+
+/** Used to compose unicode regexes. */
+var reOptMod = rsModifier + '?',
+ rsOptVar = '[' + _unicodeSize_rsVarRange + ']?',
+ rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+/**
+ * Gets the size of a Unicode `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+function unicodeSize(string) {
+ var result = reUnicode.lastIndex = 0;
+ while (reUnicode.test(string)) {
+ ++result;
+ }
+ return result;
+}
+
+/* harmony default export */ const _unicodeSize = (unicodeSize);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js
+
+
+
+
+/**
+ * Gets the number of symbols in `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the string size.
+ */
+function stringSize(string) {
+ return _hasUnicode(string)
+ ? _unicodeSize(string)
+ : _asciiSize(string);
+}
+
+/* harmony default export */ const _stringSize = (stringSize);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js
+
+
+
+
+
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ if ((0,isArrayLike/* default */.Z)(collection)) {
+ return lodash_es_isString(collection) ? _stringSize(collection) : collection.length;
+ }
+ var tag = (0,_getTag/* default */.Z)(collection);
+ if (tag == mapTag || tag == setTag) {
+ return collection.size;
+ }
+ return (0,_baseKeys/* default */.Z)(collection).length;
+}
+
+/* harmony default export */ const lodash_es_size = (size);
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js
+
+
+
+
+topsort_topsort.CycleException = topsort_CycleException;
+
+function topsort_topsort(g) {
+ var visited = {};
+ var stack = {};
+ var results = [];
+
+ function visit(node) {
+ if (has/* default */.Z(stack, node)) {
+ throw new topsort_CycleException();
+ }
+
+ if (!has/* default */.Z(visited, node)) {
+ stack[node] = true;
+ visited[node] = true;
+ forEach/* default */.Z(g.predecessors(node), visit);
+ delete stack[node];
+ results.push(node);
+ }
+ }
+
+ forEach/* default */.Z(g.sinks(), visit);
+
+ if (lodash_es_size(visited) !== g.nodeCount()) {
+ throw new topsort_CycleException();
+ }
+
+ return results;
+}
+
+function topsort_CycleException() {}
+topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js
+
+
+
+
+function isAcyclic(g) {
+ try {
+ topsort(g);
+ } catch (e) {
+ if (e instanceof CycleException) {
+ return false;
+ }
+ throw e;
+ }
+ return true;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js
+
+
+
+
+/*
+ * A helper that preforms a pre- or post-order traversal on the input graph
+ * and returns the nodes in the order they were visited. If the graph is
+ * undirected then this algorithm will navigate using neighbors. If the graph
+ * is directed then this algorithm will navigate using successors.
+ *
+ * Order must be one of "pre" or "post".
+ */
+function dfs(g, vs, order) {
+ if (!isArray/* default */.Z(vs)) {
+ vs = [vs];
+ }
+
+ var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g);
+
+ var acc = [];
+ var visited = {};
+ forEach/* default */.Z(vs, function (v) {
+ if (!g.hasNode(v)) {
+ throw new Error('Graph does not have node: ' + v);
+ }
+
+ doDfs(g, v, order === 'post', visited, navigation, acc);
+ });
+ return acc;
+}
+
+function doDfs(g, v, postorder, visited, navigation, acc) {
+ if (!has/* default */.Z(visited, v)) {
+ visited[v] = true;
+
+ if (!postorder) {
+ acc.push(v);
+ }
+ forEach/* default */.Z(navigation(v), function (w) {
+ doDfs(g, w, postorder, visited, navigation, acc);
+ });
+ if (postorder) {
+ acc.push(v);
+ }
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js
+
+
+
+
+function postorder(g, vs) {
+ return dfs(g, vs, 'post');
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js
+
+
+
+
+function preorder(g, vs) {
+ return dfs(g, vs, 'pre');
+}
+
+// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules
+var graph = __webpack_require__(52544);
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js
+
+
+
+
+
+
+function prim(g, weightFunc) {
+ var result = new Graph();
+ var parents = {};
+ var pq = new PriorityQueue();
+ var v;
+
+ function updateNeighbors(edge) {
+ var w = edge.v === v ? edge.w : edge.v;
+ var pri = pq.priority(w);
+ if (pri !== undefined) {
+ var edgeWeight = weightFunc(edge);
+ if (edgeWeight < pri) {
+ parents[w] = v;
+ pq.decrease(w, edgeWeight);
+ }
+ }
+ }
+
+ if (g.nodeCount() === 0) {
+ return result;
+ }
+
+ _.each(g.nodes(), function (v) {
+ pq.add(v, Number.POSITIVE_INFINITY);
+ result.setNode(v);
+ });
+
+ // Start from an arbitrary node
+ pq.decrease(g.nodes()[0], 0);
+
+ var init = false;
+ while (pq.size() > 0) {
+ v = pq.removeMin();
+ if (_.has(parents, v)) {
+ result.setEdge(v, parents[v]);
+ } else if (init) {
+ throw new Error('Input graph is not connected: ' + g);
+ } else {
+ init = true;
+ }
+
+ g.nodeEdges(v).forEach(updateNeighbors);
+ }
+
+ return result;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js
+
+
+
+
+
+
+
+
+// Expose some internals for testing purposes
+networkSimplex.initLowLimValues = initLowLimValues;
+networkSimplex.initCutValues = initCutValues;
+networkSimplex.calcCutValue = calcCutValue;
+networkSimplex.leaveEdge = leaveEdge;
+networkSimplex.enterEdge = enterEdge;
+networkSimplex.exchangeEdges = exchangeEdges;
+
+/*
+ * The network simplex algorithm assigns ranks to each node in the input graph
+ * and iteratively improves the ranking to reduce the length of edges.
+ *
+ * Preconditions:
+ *
+ * 1. The input graph must be a DAG.
+ * 2. All nodes in the graph must have an object value.
+ * 3. All edges in the graph must have "minlen" and "weight" attributes.
+ *
+ * Postconditions:
+ *
+ * 1. All nodes in the graph will have an assigned "rank" attribute that has
+ * been optimized by the network simplex algorithm. Ranks start at 0.
+ *
+ *
+ * A rough sketch of the algorithm is as follows:
+ *
+ * 1. Assign initial ranks to each node. We use the longest path algorithm,
+ * which assigns ranks to the lowest position possible. In general this
+ * leads to very wide bottom ranks and unnecessarily long edges.
+ * 2. Construct a feasible tight tree. A tight tree is one such that all
+ * edges in the tree have no slack (difference between length of edge
+ * and minlen for the edge). This by itself greatly improves the assigned
+ * rankings by shorting edges.
+ * 3. Iteratively find edges that have negative cut values. Generally a
+ * negative cut value indicates that the edge could be removed and a new
+ * tree edge could be added to produce a more compact graph.
+ *
+ * Much of the algorithms here are derived from Gansner, et al., "A Technique
+ * for Drawing Directed Graphs." The structure of the file roughly follows the
+ * structure of the overall algorithm.
+ */
+function networkSimplex(g) {
+ g = simplify(g);
+ longestPath(g);
+ var t = feasibleTree(g);
+ initLowLimValues(t);
+ initCutValues(t, g);
+
+ var e, f;
+ while ((e = leaveEdge(t))) {
+ f = enterEdge(t, g, e);
+ exchangeEdges(t, g, e, f);
+ }
+}
+
+/*
+ * Initializes cut values for all edges in the tree.
+ */
+function initCutValues(t, g) {
+ var vs = postorder(t, t.nodes());
+ vs = vs.slice(0, vs.length - 1);
+ forEach/* default */.Z(vs, function (v) {
+ assignCutValue(t, g, v);
+ });
+}
+
+function assignCutValue(t, g, child) {
+ var childLab = t.node(child);
+ var parent = childLab.parent;
+ t.edge(child, parent).cutvalue = calcCutValue(t, g, child);
+}
+
+/*
+ * Given the tight tree, its graph, and a child in the graph calculate and
+ * return the cut value for the edge between the child and its parent.
+ */
+function calcCutValue(t, g, child) {
+ var childLab = t.node(child);
+ var parent = childLab.parent;
+ // True if the child is on the tail end of the edge in the directed graph
+ var childIsTail = true;
+ // The graph's view of the tree edge we're inspecting
+ var graphEdge = g.edge(child, parent);
+ // The accumulated cut value for the edge between this node and its parent
+ var cutValue = 0;
+
+ if (!graphEdge) {
+ childIsTail = false;
+ graphEdge = g.edge(parent, child);
+ }
+
+ cutValue = graphEdge.weight;
+
+ forEach/* default */.Z(g.nodeEdges(child), function (e) {
+ var isOutEdge = e.v === child,
+ other = isOutEdge ? e.w : e.v;
+
+ if (other !== parent) {
+ var pointsToHead = isOutEdge === childIsTail,
+ otherWeight = g.edge(e).weight;
+
+ cutValue += pointsToHead ? otherWeight : -otherWeight;
+ if (isTreeEdge(t, child, other)) {
+ var otherCutValue = t.edge(child, other).cutvalue;
+ cutValue += pointsToHead ? -otherCutValue : otherCutValue;
+ }
+ }
+ });
+
+ return cutValue;
+}
+
+function initLowLimValues(tree, root) {
+ if (arguments.length < 2) {
+ root = tree.nodes()[0];
+ }
+ dfsAssignLowLim(tree, {}, 1, root);
+}
+
+function dfsAssignLowLim(tree, visited, nextLim, v, parent) {
+ var low = nextLim;
+ var label = tree.node(v);
+
+ visited[v] = true;
+ forEach/* default */.Z(tree.neighbors(v), function (w) {
+ if (!has/* default */.Z(visited, w)) {
+ nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v);
+ }
+ });
+
+ label.low = low;
+ label.lim = nextLim++;
+ if (parent) {
+ label.parent = parent;
+ } else {
+ // TODO should be able to remove this when we incrementally update low lim
+ delete label.parent;
+ }
+
+ return nextLim;
+}
+
+function leaveEdge(tree) {
+ return lodash_es_find(tree.edges(), function (e) {
+ return tree.edge(e).cutvalue < 0;
+ });
+}
+
+function enterEdge(t, g, edge) {
+ var v = edge.v;
+ var w = edge.w;
+
+ // For the rest of this function we assume that v is the tail and w is the
+ // head, so if we don't have this edge in the graph we should flip it to
+ // match the correct orientation.
+ if (!g.hasEdge(v, w)) {
+ v = edge.w;
+ w = edge.v;
+ }
+
+ var vLabel = t.node(v);
+ var wLabel = t.node(w);
+ var tailLabel = vLabel;
+ var flip = false;
+
+ // If the root is in the tail of the edge then we need to flip the logic that
+ // checks for the head and tail nodes in the candidates function below.
+ if (vLabel.lim > wLabel.lim) {
+ tailLabel = wLabel;
+ flip = true;
+ }
+
+ var candidates = filter/* default */.Z(g.edges(), function (edge) {
+ return (
+ flip === isDescendant(t, t.node(edge.v), tailLabel) &&
+ flip !== isDescendant(t, t.node(edge.w), tailLabel)
+ );
+ });
+
+ return lodash_es_minBy(candidates, function (edge) {
+ return slack(g, edge);
+ });
+}
+
+function exchangeEdges(t, g, e, f) {
+ var v = e.v;
+ var w = e.w;
+ t.removeEdge(v, w);
+ t.setEdge(f.v, f.w, {});
+ initLowLimValues(t);
+ initCutValues(t, g);
+ updateRanks(t, g);
+}
+
+function updateRanks(t, g) {
+ var root = lodash_es_find(t.nodes(), function (v) {
+ return !g.node(v).parent;
+ });
+ var vs = preorder(t, root);
+ vs = vs.slice(1);
+ forEach/* default */.Z(vs, function (v) {
+ var parent = t.node(v).parent,
+ edge = g.edge(v, parent),
+ flipped = false;
+
+ if (!edge) {
+ edge = g.edge(parent, v);
+ flipped = true;
+ }
+
+ g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen);
+ });
+}
+
+/*
+ * Returns true if the edge is in the tree.
+ */
+function isTreeEdge(tree, u, v) {
+ return tree.hasEdge(u, v);
+}
+
+/*
+ * Returns true if the specified node is descendant of the root node per the
+ * assigned low and lim attributes in the tree.
+ */
+function isDescendant(tree, vLabel, rootLabel) {
+ return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js
+
+
+
+
+
+
+/*
+ * Assigns a rank to each node in the input graph that respects the "minlen"
+ * constraint specified on edges between nodes.
+ *
+ * This basic structure is derived from Gansner, et al., "A Technique for
+ * Drawing Directed Graphs."
+ *
+ * Pre-conditions:
+ *
+ * 1. Graph must be a connected DAG
+ * 2. Graph nodes must be objects
+ * 3. Graph edges must have "weight" and "minlen" attributes
+ *
+ * Post-conditions:
+ *
+ * 1. Graph nodes will have a "rank" attribute based on the results of the
+ * algorithm. Ranks can start at any index (including negative), we'll
+ * fix them up later.
+ */
+function rank(g) {
+ switch (g.graph().ranker) {
+ case 'network-simplex':
+ networkSimplexRanker(g);
+ break;
+ case 'tight-tree':
+ tightTreeRanker(g);
+ break;
+ case 'longest-path':
+ longestPathRanker(g);
+ break;
+ default:
+ networkSimplexRanker(g);
+ }
+}
+
+// A fast and simple ranker, but results are far from optimal.
+var longestPathRanker = longestPath;
+
+function tightTreeRanker(g) {
+ longestPath(g);
+ feasibleTree(g);
+}
+
+function networkSimplexRanker(g) {
+ networkSimplex(g);
+}
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules
+var values = __webpack_require__(34148);
+// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules
+var reduce = __webpack_require__(92344);
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js
+
+
+
+
+
+/*
+ * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs,
+ * adds appropriate edges to ensure that all cluster nodes are placed between
+ * these boundries, and ensures that the graph is connected.
+ *
+ * In addition we ensure, through the use of the minlen property, that nodes
+ * and subgraph border nodes to not end up on the same rank.
+ *
+ * Preconditions:
+ *
+ * 1. Input graph is a DAG
+ * 2. Nodes in the input graph has a minlen attribute
+ *
+ * Postconditions:
+ *
+ * 1. Input graph is connected.
+ * 2. Dummy nodes are added for the tops and bottoms of subgraphs.
+ * 3. The minlen attribute for nodes is adjusted to ensure nodes do not
+ * get placed on the same rank as subgraph border nodes.
+ *
+ * The nesting graph idea comes from Sander, "Layout of Compound Directed
+ * Graphs."
+ */
+function nesting_graph_run(g) {
+ var root = addDummyNode(g, 'root', {}, '_root');
+ var depths = treeDepths(g);
+ var height = lodash_es_max(values/* default */.Z(depths)) - 1; // Note: depths is an Object not an array
+ var nodeSep = 2 * height + 1;
+
+ g.graph().nestingRoot = root;
+
+ // Multiply minlen by nodeSep to align nodes on non-border ranks.
+ forEach/* default */.Z(g.edges(), function (e) {
+ g.edge(e).minlen *= nodeSep;
+ });
+
+ // Calculate a weight that is sufficient to keep subgraphs vertically compact
+ var weight = sumWeights(g) + 1;
+
+ // Create border nodes and link them up
+ forEach/* default */.Z(g.children(), function (child) {
+ nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child);
+ });
+
+ // Save the multiplier for node layers for later removal of empty border
+ // layers.
+ g.graph().nodeRankFactor = nodeSep;
+}
+
+function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) {
+ var children = g.children(v);
+ if (!children.length) {
+ if (v !== root) {
+ g.setEdge(root, v, { weight: 0, minlen: nodeSep });
+ }
+ return;
+ }
+
+ var top = addBorderNode(g, '_bt');
+ var bottom = addBorderNode(g, '_bb');
+ var label = g.node(v);
+
+ g.setParent(top, v);
+ label.borderTop = top;
+ g.setParent(bottom, v);
+ label.borderBottom = bottom;
+
+ forEach/* default */.Z(children, function (child) {
+ nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child);
+
+ var childNode = g.node(child);
+ var childTop = childNode.borderTop ? childNode.borderTop : child;
+ var childBottom = childNode.borderBottom ? childNode.borderBottom : child;
+ var thisWeight = childNode.borderTop ? weight : 2 * weight;
+ var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1;
+
+ g.setEdge(top, childTop, {
+ weight: thisWeight,
+ minlen: minlen,
+ nestingEdge: true,
+ });
+
+ g.setEdge(childBottom, bottom, {
+ weight: thisWeight,
+ minlen: minlen,
+ nestingEdge: true,
+ });
+ });
+
+ if (!g.parent(v)) {
+ g.setEdge(root, top, { weight: 0, minlen: height + depths[v] });
+ }
+}
+
+function treeDepths(g) {
+ var depths = {};
+ function dfs(v, depth) {
+ var children = g.children(v);
+ if (children && children.length) {
+ forEach/* default */.Z(children, function (child) {
+ dfs(child, depth + 1);
+ });
+ }
+ depths[v] = depth;
+ }
+ forEach/* default */.Z(g.children(), function (v) {
+ dfs(v, 1);
+ });
+ return depths;
+}
+
+function sumWeights(g) {
+ return reduce/* default */.Z(
+ g.edges(),
+ function (acc, e) {
+ return acc + g.edge(e).weight;
+ },
+ 0
+ );
+}
+
+function cleanup(g) {
+ var graphLabel = g.graph();
+ g.removeNode(graphLabel.nestingRoot);
+ delete graphLabel.nestingRoot;
+ forEach/* default */.Z(g.edges(), function (e) {
+ var edge = g.edge(e);
+ if (edge.nestingEdge) {
+ g.removeEdge(e);
+ }
+ });
+}
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules
+var _baseClone = __webpack_require__(48451);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js
+
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * This method is like `_.clone` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.clone
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var deep = _.cloneDeep(objects);
+ * console.log(deep[0] === objects[0]);
+ * // => false
+ */
+function cloneDeep(value) {
+ return (0,_baseClone/* default */.Z)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
+}
+
+/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep);
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js
+
+
+
+
+function addSubgraphConstraints(g, cg, vs) {
+ var prev = {},
+ rootPrev;
+
+ forEach/* default */.Z(vs, function (v) {
+ var child = g.parent(v),
+ parent,
+ prevChild;
+ while (child) {
+ parent = g.parent(child);
+ if (parent) {
+ prevChild = prev[parent];
+ prev[parent] = child;
+ } else {
+ prevChild = rootPrev;
+ rootPrev = child;
+ }
+ if (prevChild && prevChild !== child) {
+ cg.setEdge(prevChild, child);
+ return;
+ }
+ child = parent;
+ }
+ });
+
+ /*
+ function dfs(v) {
+ var children = v ? g.children(v) : g.children();
+ if (children.length) {
+ var min = Number.POSITIVE_INFINITY,
+ subgraphs = [];
+ _.each(children, function(child) {
+ var childMin = dfs(child);
+ if (g.children(child).length) {
+ subgraphs.push({ v: child, order: childMin });
+ }
+ min = Math.min(min, childMin);
+ });
+ _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) {
+ cg.setEdge(prev.v, curr.v);
+ return curr;
+ });
+ return min;
+ }
+ return g.node(v).order;
+ }
+ dfs(undefined);
+ */
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js
+
+
+
+
+
+/*
+ * Constructs a graph that can be used to sort a layer of nodes. The graph will
+ * contain all base and subgraph nodes from the request layer in their original
+ * hierarchy and any edges that are incident on these nodes and are of the type
+ * requested by the "relationship" parameter.
+ *
+ * Nodes from the requested rank that do not have parents are assigned a root
+ * node in the output graph, which is set in the root graph attribute. This
+ * makes it easy to walk the hierarchy of movable nodes during ordering.
+ *
+ * Pre-conditions:
+ *
+ * 1. Input graph is a DAG
+ * 2. Base nodes in the input graph have a rank attribute
+ * 3. Subgraph nodes in the input graph has minRank and maxRank attributes
+ * 4. Edges have an assigned weight
+ *
+ * Post-conditions:
+ *
+ * 1. Output graph has all nodes in the movable rank with preserved
+ * hierarchy.
+ * 2. Root nodes in the movable layer are made children of the node
+ * indicated by the root attribute of the graph.
+ * 3. Non-movable nodes incident on movable nodes, selected by the
+ * relationship parameter, are included in the graph (without hierarchy).
+ * 4. Edges incident on movable nodes, selected by the relationship
+ * parameter, are added to the output graph.
+ * 5. The weights for copied edges are aggregated as need, since the output
+ * graph is not a multi-graph.
+ */
+function buildLayerGraph(g, rank, relationship) {
+ var root = createRootNode(g),
+ result = new graphlib/* Graph */.k({ compound: true })
+ .setGraph({ root: root })
+ .setDefaultNodeLabel(function (v) {
+ return g.node(v);
+ });
+
+ forEach/* default */.Z(g.nodes(), function (v) {
+ var node = g.node(v),
+ parent = g.parent(v);
+
+ if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) {
+ result.setNode(v);
+ result.setParent(v, parent || root);
+
+ // This assumes we have only short edges!
+ forEach/* default */.Z(g[relationship](v), function (e) {
+ var u = e.v === v ? e.w : e.v,
+ edge = result.edge(u, v),
+ weight = !isUndefined/* default */.Z(edge) ? edge.weight : 0;
+ result.setEdge(u, v, { weight: g.edge(e).weight + weight });
+ });
+
+ if (has/* default */.Z(node, 'minRank')) {
+ result.setNode(v, {
+ borderLeft: node.borderLeft[rank],
+ borderRight: node.borderRight[rank],
+ });
+ }
+ }
+ });
+
+ return result;
+}
+
+function createRootNode(g) {
+ var v;
+ while (g.hasNode((v = uniqueId/* default */.Z('_root'))));
+ return v;
+}
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js
+var _assignValue = __webpack_require__(72954);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js
+/**
+ * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
+ *
+ * @private
+ * @param {Array} props The property identifiers.
+ * @param {Array} values The property values.
+ * @param {Function} assignFunc The function to assign values.
+ * @returns {Object} Returns the new object.
+ */
+function baseZipObject(props, values, assignFunc) {
+ var index = -1,
+ length = props.length,
+ valsLength = values.length,
+ result = {};
+
+ while (++index < length) {
+ var value = index < valsLength ? values[index] : undefined;
+ assignFunc(result, props[index], value);
+ }
+ return result;
+}
+
+/* harmony default export */ const _baseZipObject = (baseZipObject);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js
+
+
+
+/**
+ * This method is like `_.fromPairs` except that it accepts two arrays,
+ * one of property identifiers and one of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.4.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObject(['a', 'b'], [1, 2]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+function zipObject(props, values) {
+ return _baseZipObject(props || [], values || [], _assignValue/* default */.Z);
+}
+
+/* harmony default export */ const lodash_es_zipObject = (zipObject);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules
+var _baseFlatten = __webpack_require__(10626);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js
+var _arrayMap = __webpack_require__(74073);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js
+var _baseGet = __webpack_require__(13317);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js
+var _baseMap = __webpack_require__(21018);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js
+/**
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
+ * sort order of `array` and replaces criteria objects with their corresponding
+ * values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+}
+
+/* harmony default export */ const _baseSortBy = (baseSortBy);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js
+var _baseUnary = __webpack_require__(21162);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js
+
+
+/**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = (0,isSymbol/* default */.Z)(value);
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = (0,isSymbol/* default */.Z)(other);
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+}
+
+/* harmony default export */ const _compareAscending = (compareAscending);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js
+
+
+/**
+ * Used by `_.orderBy` to compare multiple properties of a value to another
+ * and stable sort them.
+ *
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
+ * specify an order of "desc" for descending or "asc" for ascending sort order
+ * of corresponding values.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
+ * @returns {number} Returns the sort order indicator for `object`.
+ */
+function compareMultiple(object, other, orders) {
+ var index = -1,
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
+
+ while (++index < length) {
+ var result = _compareAscending(objCriteria[index], othCriteria[index]);
+ if (result) {
+ if (index >= ordersLength) {
+ return result;
+ }
+ var order = orders[index];
+ return result * (order == 'desc' ? -1 : 1);
+ }
+ }
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
+ // that causes it, under certain circumstances, to provide the same value for
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
+ // for more details.
+ //
+ // This also ensures a stable sort in V8 and other engines.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
+ return object.index - other.index;
+}
+
+/* harmony default export */ const _compareMultiple = (compareMultiple);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js
+
+
+
+
+
+
+
+
+
+
+/**
+ * The base implementation of `_.orderBy` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {string[]} orders The sort orders of `iteratees`.
+ * @returns {Array} Returns the new sorted array.
+ */
+function baseOrderBy(collection, iteratees, orders) {
+ if (iteratees.length) {
+ iteratees = (0,_arrayMap/* default */.Z)(iteratees, function(iteratee) {
+ if ((0,isArray/* default */.Z)(iteratee)) {
+ return function(value) {
+ return (0,_baseGet/* default */.Z)(value, iteratee.length === 1 ? iteratee[0] : iteratee);
+ }
+ }
+ return iteratee;
+ });
+ } else {
+ iteratees = [identity/* default */.Z];
+ }
+
+ var index = -1;
+ iteratees = (0,_arrayMap/* default */.Z)(iteratees, (0,_baseUnary/* default */.Z)(_baseIteratee/* default */.Z));
+
+ var result = (0,_baseMap/* default */.Z)(collection, function(value, key, collection) {
+ var criteria = (0,_arrayMap/* default */.Z)(iteratees, function(iteratee) {
+ return iteratee(value);
+ });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return _baseSortBy(result, function(object, other) {
+ return _compareMultiple(object, other, orders);
+ });
+}
+
+/* harmony default export */ const _baseOrderBy = (baseOrderBy);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js
+var _baseRest = __webpack_require__(69581);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js
+var _isIterateeCall = __webpack_require__(50439);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js
+
+
+
+
+
+/**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 30 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
+ */
+var sortBy = (0,_baseRest/* default */.Z)(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var length = iteratees.length;
+ if (length > 1 && (0,_isIterateeCall/* default */.Z)(collection, iteratees[0], iteratees[1])) {
+ iteratees = [];
+ } else if (length > 2 && (0,_isIterateeCall/* default */.Z)(iteratees[0], iteratees[1], iteratees[2])) {
+ iteratees = [iteratees[0]];
+ }
+ return _baseOrderBy(collection, (0,_baseFlatten/* default */.Z)(iteratees, 1), []);
+});
+
+/* harmony default export */ const lodash_es_sortBy = (sortBy);
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js
+
+
+
+
+/*
+ * A function that takes a layering (an array of layers, each with an array of
+ * ordererd nodes) and a graph and returns a weighted crossing count.
+ *
+ * Pre-conditions:
+ *
+ * 1. Input graph must be simple (not a multigraph), directed, and include
+ * only simple edges.
+ * 2. Edges in the input graph must have assigned weights.
+ *
+ * Post-conditions:
+ *
+ * 1. The graph and layering matrix are left unchanged.
+ *
+ * This algorithm is derived from Barth, et al., "Bilayer Cross Counting."
+ */
+function crossCount(g, layering) {
+ var cc = 0;
+ for (var i = 1; i < layering.length; ++i) {
+ cc += twoLayerCrossCount(g, layering[i - 1], layering[i]);
+ }
+ return cc;
+}
+
+function twoLayerCrossCount(g, northLayer, southLayer) {
+ // Sort all of the edges between the north and south layers by their position
+ // in the north layer and then the south. Map these edges to the position of
+ // their head in the south layer.
+ var southPos = lodash_es_zipObject(
+ southLayer,
+ map/* default */.Z(southLayer, function (v, i) {
+ return i;
+ })
+ );
+ var southEntries = flatten/* default */.Z(
+ map/* default */.Z(northLayer, function (v) {
+ return lodash_es_sortBy(
+ map/* default */.Z(g.outEdges(v), function (e) {
+ return { pos: southPos[e.w], weight: g.edge(e).weight };
+ }),
+ 'pos'
+ );
+ })
+ );
+
+ // Build the accumulator tree
+ var firstIndex = 1;
+ while (firstIndex < southLayer.length) firstIndex <<= 1;
+ var treeSize = 2 * firstIndex - 1;
+ firstIndex -= 1;
+ var tree = map/* default */.Z(new Array(treeSize), function () {
+ return 0;
+ });
+
+ // Calculate the weighted crossings
+ var cc = 0;
+ forEach/* default */.Z(
+ // @ts-expect-error
+ southEntries.forEach(function (entry) {
+ var index = entry.pos + firstIndex;
+ tree[index] += entry.weight;
+ var weightSum = 0;
+ // @ts-expect-error
+ while (index > 0) {
+ // @ts-expect-error
+ if (index % 2) {
+ weightSum += tree[index + 1];
+ }
+ // @ts-expect-error
+ index = (index - 1) >> 1;
+ tree[index] += entry.weight;
+ }
+ cc += entry.weight * weightSum;
+ })
+ );
+
+ return cc;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js
+
+
+
+
+/*
+ * Assigns an initial order value for each node by performing a DFS search
+ * starting from nodes in the first rank. Nodes are assigned an order in their
+ * rank as they are first visited.
+ *
+ * This approach comes from Gansner, et al., "A Technique for Drawing Directed
+ * Graphs."
+ *
+ * Returns a layering matrix with an array per layer and each layer sorted by
+ * the order of its nodes.
+ */
+function initOrder(g) {
+ var visited = {};
+ var simpleNodes = filter/* default */.Z(g.nodes(), function (v) {
+ return !g.children(v).length;
+ });
+ var maxRank = lodash_es_max(
+ map/* default */.Z(simpleNodes, function (v) {
+ return g.node(v).rank;
+ })
+ );
+ var layers = map/* default */.Z(range/* default */.Z(maxRank + 1), function () {
+ return [];
+ });
+
+ function dfs(v) {
+ if (has/* default */.Z(visited, v)) return;
+ visited[v] = true;
+ var node = g.node(v);
+ layers[node.rank].push(v);
+ forEach/* default */.Z(g.successors(v), dfs);
+ }
+
+ var orderedVs = lodash_es_sortBy(simpleNodes, function (v) {
+ return g.node(v).rank;
+ });
+ forEach/* default */.Z(orderedVs, dfs);
+
+ return layers;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js
+
+
+
+
+function barycenter(g, movable) {
+ return map/* default */.Z(movable, function (v) {
+ var inV = g.inEdges(v);
+ if (!inV.length) {
+ return { v: v };
+ } else {
+ var result = reduce/* default */.Z(
+ inV,
+ function (acc, e) {
+ var edge = g.edge(e),
+ nodeU = g.node(e.v);
+ return {
+ sum: acc.sum + edge.weight * nodeU.order,
+ weight: acc.weight + edge.weight,
+ };
+ },
+ { sum: 0, weight: 0 }
+ );
+
+ return {
+ v: v,
+ barycenter: result.sum / result.weight,
+ weight: result.weight,
+ };
+ }
+ });
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js
+
+
+
+
+/*
+ * Given a list of entries of the form {v, barycenter, weight} and a
+ * constraint graph this function will resolve any conflicts between the
+ * constraint graph and the barycenters for the entries. If the barycenters for
+ * an entry would violate a constraint in the constraint graph then we coalesce
+ * the nodes in the conflict into a new node that respects the contraint and
+ * aggregates barycenter and weight information.
+ *
+ * This implementation is based on the description in Forster, "A Fast and
+ * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it
+ * differs in some specific details.
+ *
+ * Pre-conditions:
+ *
+ * 1. Each entry has the form {v, barycenter, weight}, or if the node has
+ * no barycenter, then {v}.
+ *
+ * Returns:
+ *
+ * A new list of entries of the form {vs, i, barycenter, weight}. The list
+ * `vs` may either be a singleton or it may be an aggregation of nodes
+ * ordered such that they do not violate constraints from the constraint
+ * graph. The property `i` is the lowest original index of any of the
+ * elements in `vs`.
+ */
+function resolveConflicts(entries, cg) {
+ var mappedEntries = {};
+ forEach/* default */.Z(entries, function (entry, i) {
+ var tmp = (mappedEntries[entry.v] = {
+ indegree: 0,
+ in: [],
+ out: [],
+ vs: [entry.v],
+ i: i,
+ });
+ if (!isUndefined/* default */.Z(entry.barycenter)) {
+ // @ts-expect-error
+ tmp.barycenter = entry.barycenter;
+ // @ts-expect-error
+ tmp.weight = entry.weight;
+ }
+ });
+
+ forEach/* default */.Z(cg.edges(), function (e) {
+ var entryV = mappedEntries[e.v];
+ var entryW = mappedEntries[e.w];
+ if (!isUndefined/* default */.Z(entryV) && !isUndefined/* default */.Z(entryW)) {
+ entryW.indegree++;
+ entryV.out.push(mappedEntries[e.w]);
+ }
+ });
+
+ var sourceSet = filter/* default */.Z(mappedEntries, function (entry) {
+ // @ts-expect-error
+ return !entry.indegree;
+ });
+
+ return doResolveConflicts(sourceSet);
+}
+
+function doResolveConflicts(sourceSet) {
+ var entries = [];
+
+ function handleIn(vEntry) {
+ return function (uEntry) {
+ if (uEntry.merged) {
+ return;
+ }
+ if (
+ isUndefined/* default */.Z(uEntry.barycenter) ||
+ isUndefined/* default */.Z(vEntry.barycenter) ||
+ uEntry.barycenter >= vEntry.barycenter
+ ) {
+ mergeEntries(vEntry, uEntry);
+ }
+ };
+ }
+
+ function handleOut(vEntry) {
+ return function (wEntry) {
+ wEntry['in'].push(vEntry);
+ if (--wEntry.indegree === 0) {
+ sourceSet.push(wEntry);
+ }
+ };
+ }
+
+ while (sourceSet.length) {
+ var entry = sourceSet.pop();
+ entries.push(entry);
+ forEach/* default */.Z(entry['in'].reverse(), handleIn(entry));
+ forEach/* default */.Z(entry.out, handleOut(entry));
+ }
+
+ return map/* default */.Z(
+ filter/* default */.Z(entries, function (entry) {
+ return !entry.merged;
+ }),
+ function (entry) {
+ return pick/* default */.Z(entry, ['vs', 'i', 'barycenter', 'weight']);
+ }
+ );
+}
+
+function mergeEntries(target, source) {
+ var sum = 0;
+ var weight = 0;
+
+ if (target.weight) {
+ sum += target.barycenter * target.weight;
+ weight += target.weight;
+ }
+
+ if (source.weight) {
+ sum += source.barycenter * source.weight;
+ weight += source.weight;
+ }
+
+ target.vs = source.vs.concat(target.vs);
+ target.barycenter = sum / weight;
+ target.weight = weight;
+ target.i = Math.min(source.i, target.i);
+ source.merged = true;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js
+
+
+
+
+
+function sort(entries, biasRight) {
+ var parts = partition(entries, function (entry) {
+ return has/* default */.Z(entry, 'barycenter');
+ });
+ var sortable = parts.lhs,
+ unsortable = lodash_es_sortBy(parts.rhs, function (entry) {
+ return -entry.i;
+ }),
+ vs = [],
+ sum = 0,
+ weight = 0,
+ vsIndex = 0;
+
+ sortable.sort(compareWithBias(!!biasRight));
+
+ vsIndex = consumeUnsortable(vs, unsortable, vsIndex);
+
+ forEach/* default */.Z(sortable, function (entry) {
+ vsIndex += entry.vs.length;
+ vs.push(entry.vs);
+ sum += entry.barycenter * entry.weight;
+ weight += entry.weight;
+ vsIndex = consumeUnsortable(vs, unsortable, vsIndex);
+ });
+
+ var result = { vs: flatten/* default */.Z(vs) };
+ if (weight) {
+ result.barycenter = sum / weight;
+ result.weight = weight;
+ }
+ return result;
+}
+
+function consumeUnsortable(vs, unsortable, index) {
+ var last;
+ while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) {
+ unsortable.pop();
+ vs.push(last.vs);
+ index++;
+ }
+ return index;
+}
+
+function compareWithBias(bias) {
+ return function (entryV, entryW) {
+ if (entryV.barycenter < entryW.barycenter) {
+ return -1;
+ } else if (entryV.barycenter > entryW.barycenter) {
+ return 1;
+ }
+
+ return !bias ? entryV.i - entryW.i : entryW.i - entryV.i;
+ };
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js
+
+
+
+
+
+
+
+function sortSubgraph(g, v, cg, biasRight) {
+ var movable = g.children(v);
+ var node = g.node(v);
+ var bl = node ? node.borderLeft : undefined;
+ var br = node ? node.borderRight : undefined;
+ var subgraphs = {};
+
+ if (bl) {
+ movable = filter/* default */.Z(movable, function (w) {
+ return w !== bl && w !== br;
+ });
+ }
+
+ var barycenters = barycenter(g, movable);
+ forEach/* default */.Z(barycenters, function (entry) {
+ if (g.children(entry.v).length) {
+ var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight);
+ subgraphs[entry.v] = subgraphResult;
+ if (has/* default */.Z(subgraphResult, 'barycenter')) {
+ mergeBarycenters(entry, subgraphResult);
+ }
+ }
+ });
+
+ var entries = resolveConflicts(barycenters, cg);
+ expandSubgraphs(entries, subgraphs);
+
+ var result = sort(entries, biasRight);
+
+ if (bl) {
+ result.vs = flatten/* default */.Z([bl, result.vs, br]);
+ if (g.predecessors(bl).length) {
+ var blPred = g.node(g.predecessors(bl)[0]),
+ brPred = g.node(g.predecessors(br)[0]);
+ if (!has/* default */.Z(result, 'barycenter')) {
+ result.barycenter = 0;
+ result.weight = 0;
+ }
+ result.barycenter =
+ (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2);
+ result.weight += 2;
+ }
+ }
+
+ return result;
+}
+
+function expandSubgraphs(entries, subgraphs) {
+ forEach/* default */.Z(entries, function (entry) {
+ entry.vs = flatten/* default */.Z(
+ entry.vs.map(function (v) {
+ if (subgraphs[v]) {
+ return subgraphs[v].vs;
+ }
+ return v;
+ })
+ );
+ });
+}
+
+function mergeBarycenters(target, other) {
+ if (!isUndefined/* default */.Z(target.barycenter)) {
+ target.barycenter =
+ (target.barycenter * target.weight + other.barycenter * other.weight) /
+ (target.weight + other.weight);
+ target.weight += other.weight;
+ } else {
+ target.barycenter = other.barycenter;
+ target.weight = other.weight;
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js
+
+
+
+
+
+
+
+
+
+
+
+/*
+ * Applies heuristics to minimize edge crossings in the graph and sets the best
+ * order solution as an order attribute on each node.
+ *
+ * Pre-conditions:
+ *
+ * 1. Graph must be DAG
+ * 2. Graph nodes must be objects with a "rank" attribute
+ * 3. Graph edges must have the "weight" attribute
+ *
+ * Post-conditions:
+ *
+ * 1. Graph nodes will have an "order" attribute based on the results of the
+ * algorithm.
+ */
+function order(g) {
+ var maxRank = util_maxRank(g),
+ downLayerGraphs = buildLayerGraphs(g, range/* default */.Z(1, maxRank + 1), 'inEdges'),
+ upLayerGraphs = buildLayerGraphs(g, range/* default */.Z(maxRank - 1, -1, -1), 'outEdges');
+
+ var layering = initOrder(g);
+ assignOrder(g, layering);
+
+ var bestCC = Number.POSITIVE_INFINITY,
+ best;
+
+ for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) {
+ sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2);
+
+ layering = buildLayerMatrix(g);
+ var cc = crossCount(g, layering);
+ if (cc < bestCC) {
+ lastBest = 0;
+ best = lodash_es_cloneDeep(layering);
+ bestCC = cc;
+ }
+ }
+
+ assignOrder(g, best);
+}
+
+function buildLayerGraphs(g, ranks, relationship) {
+ return map/* default */.Z(ranks, function (rank) {
+ return buildLayerGraph(g, rank, relationship);
+ });
+}
+
+function sweepLayerGraphs(layerGraphs, biasRight) {
+ var cg = new graphlib/* Graph */.k();
+ forEach/* default */.Z(layerGraphs, function (lg) {
+ var root = lg.graph().root;
+ var sorted = sortSubgraph(lg, root, cg, biasRight);
+ forEach/* default */.Z(sorted.vs, function (v, i) {
+ lg.node(v).order = i;
+ });
+ addSubgraphConstraints(lg, cg, sorted.vs);
+ });
+}
+
+function assignOrder(g, layering) {
+ forEach/* default */.Z(layering, function (layer) {
+ forEach/* default */.Z(layer, function (v, i) {
+ g.node(v).order = i;
+ });
+ });
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js
+
+
+
+
+function parentDummyChains(g) {
+ var postorderNums = parent_dummy_chains_postorder(g);
+
+ forEach/* default */.Z(g.graph().dummyChains, function (v) {
+ var node = g.node(v);
+ var edgeObj = node.edgeObj;
+ var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w);
+ var path = pathData.path;
+ var lca = pathData.lca;
+ var pathIdx = 0;
+ var pathV = path[pathIdx];
+ var ascending = true;
+
+ while (v !== edgeObj.w) {
+ node = g.node(v);
+
+ if (ascending) {
+ while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) {
+ pathIdx++;
+ }
+
+ if (pathV === lca) {
+ ascending = false;
+ }
+ }
+
+ if (!ascending) {
+ while (
+ pathIdx < path.length - 1 &&
+ g.node((pathV = path[pathIdx + 1])).minRank <= node.rank
+ ) {
+ pathIdx++;
+ }
+ pathV = path[pathIdx];
+ }
+
+ g.setParent(v, pathV);
+ v = g.successors(v)[0];
+ }
+ });
+}
+
+// Find a path from v to w through the lowest common ancestor (LCA). Return the
+// full path and the LCA.
+function findPath(g, postorderNums, v, w) {
+ var vPath = [];
+ var wPath = [];
+ var low = Math.min(postorderNums[v].low, postorderNums[w].low);
+ var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim);
+ var parent;
+ var lca;
+
+ // Traverse up from v to find the LCA
+ parent = v;
+ do {
+ parent = g.parent(parent);
+ vPath.push(parent);
+ } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim));
+ lca = parent;
+
+ // Traverse from w to LCA
+ parent = w;
+ while ((parent = g.parent(parent)) !== lca) {
+ wPath.push(parent);
+ }
+
+ return { path: vPath.concat(wPath.reverse()), lca: lca };
+}
+
+function parent_dummy_chains_postorder(g) {
+ var result = {};
+ var lim = 0;
+
+ function dfs(v) {
+ var low = lim;
+ forEach/* default */.Z(g.children(v), dfs);
+ result[v] = { low: low, lim: lim++ };
+ }
+ forEach/* default */.Z(g.children(), dfs);
+
+ return result;
+}
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js
+var _castFunction = __webpack_require__(68882);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js
+
+
+
+/**
+ * Iterates over own enumerable string keyed properties of an object and
+ * invokes `iteratee` for each property. The iteratee is invoked with three
+ * arguments: (value, key, object). Iteratee functions may exit iteration
+ * early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwnRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+function forOwn(object, iteratee) {
+ return object && (0,_baseForOwn/* default */.Z)(object, (0,_castFunction/* default */.Z)(iteratee));
+}
+
+/* harmony default export */ const lodash_es_forOwn = (forOwn);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules
+var _baseFor = __webpack_require__(61395);
+// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules
+var keysIn = __webpack_require__(32957);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js
+
+
+
+
+/**
+ * Iterates over own and inherited enumerable string keyed properties of an
+ * object and invokes `iteratee` for each property. The iteratee is invoked
+ * with three arguments: (value, key, object). Iteratee functions may exit
+ * iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forInRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forIn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
+ */
+function forIn(object, iteratee) {
+ return object == null
+ ? object
+ : (0,_baseFor/* default */.Z)(object, (0,_castFunction/* default */.Z)(iteratee), keysIn/* default */.Z);
+}
+
+/* harmony default export */ const lodash_es_forIn = (forIn);
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js
+
+
+
+
+/*
+ * This module provides coordinate assignment based on Brandes and Köpf, "Fast
+ * and Simple Horizontal Coordinate Assignment."
+ */
+
+
+
+/*
+ * Marks all edges in the graph with a type-1 conflict with the "type1Conflict"
+ * property. A type-1 conflict is one where a non-inner segment crosses an
+ * inner segment. An inner segment is an edge with both incident nodes marked
+ * with the "dummy" property.
+ *
+ * This algorithm scans layer by layer, starting with the second, for type-1
+ * conflicts between the current layer and the previous layer. For each layer
+ * it scans the nodes from left to right until it reaches one that is incident
+ * on an inner segment. It then scans predecessors to determine if they have
+ * edges that cross that inner segment. At the end a final scan is done for all
+ * nodes on the current rank to see if they cross the last visited inner
+ * segment.
+ *
+ * This algorithm (safely) assumes that a dummy node will only be incident on a
+ * single node in the layers being scanned.
+ */
+function findType1Conflicts(g, layering) {
+ var conflicts = {};
+
+ function visitLayer(prevLayer, layer) {
+ var // last visited node in the previous layer that is incident on an inner
+ // segment.
+ k0 = 0,
+ // Tracks the last node in this layer scanned for crossings with a type-1
+ // segment.
+ scanPos = 0,
+ prevLayerLength = prevLayer.length,
+ lastNode = lodash_es_last(layer);
+
+ forEach/* default */.Z(layer, function (v, i) {
+ var w = findOtherInnerSegmentNode(g, v),
+ k1 = w ? g.node(w).order : prevLayerLength;
+
+ if (w || v === lastNode) {
+ forEach/* default */.Z(layer.slice(scanPos, i + 1), function (scanNode) {
+ forEach/* default */.Z(g.predecessors(scanNode), function (u) {
+ var uLabel = g.node(u),
+ uPos = uLabel.order;
+ if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) {
+ addConflict(conflicts, u, scanNode);
+ }
+ });
+ });
+ // @ts-expect-error
+ scanPos = i + 1;
+ k0 = k1;
+ }
+ });
+
+ return layer;
+ }
+
+ reduce/* default */.Z(layering, visitLayer);
+ return conflicts;
+}
+
+function findType2Conflicts(g, layering) {
+ var conflicts = {};
+
+ function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) {
+ var v;
+ forEach/* default */.Z(range/* default */.Z(southPos, southEnd), function (i) {
+ v = south[i];
+ if (g.node(v).dummy) {
+ forEach/* default */.Z(g.predecessors(v), function (u) {
+ var uNode = g.node(u);
+ if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) {
+ addConflict(conflicts, u, v);
+ }
+ });
+ }
+ });
+ }
+
+ function visitLayer(north, south) {
+ var prevNorthPos = -1,
+ nextNorthPos,
+ southPos = 0;
+
+ forEach/* default */.Z(south, function (v, southLookahead) {
+ if (g.node(v).dummy === 'border') {
+ var predecessors = g.predecessors(v);
+ if (predecessors.length) {
+ nextNorthPos = g.node(predecessors[0]).order;
+ scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos);
+ // @ts-expect-error
+ southPos = southLookahead;
+ prevNorthPos = nextNorthPos;
+ }
+ }
+ scan(south, southPos, south.length, nextNorthPos, north.length);
+ });
+
+ return south;
+ }
+
+ reduce/* default */.Z(layering, visitLayer);
+ return conflicts;
+}
+
+function findOtherInnerSegmentNode(g, v) {
+ if (g.node(v).dummy) {
+ return lodash_es_find(g.predecessors(v), function (u) {
+ return g.node(u).dummy;
+ });
+ }
+}
+
+function addConflict(conflicts, v, w) {
+ if (v > w) {
+ var tmp = v;
+ v = w;
+ w = tmp;
+ }
+
+ var conflictsV = conflicts[v];
+ if (!conflictsV) {
+ conflicts[v] = conflictsV = {};
+ }
+ conflictsV[w] = true;
+}
+
+function hasConflict(conflicts, v, w) {
+ if (v > w) {
+ var tmp = v;
+ v = w;
+ w = tmp;
+ }
+ return has/* default */.Z(conflicts[v], w);
+}
+
+/*
+ * Try to align nodes into vertical "blocks" where possible. This algorithm
+ * attempts to align a node with one of its median neighbors. If the edge
+ * connecting a neighbor is a type-1 conflict then we ignore that possibility.
+ * If a previous node has already formed a block with a node after the node
+ * we're trying to form a block with, we also ignore that possibility - our
+ * blocks would be split in that scenario.
+ */
+function verticalAlignment(g, layering, conflicts, neighborFn) {
+ var root = {},
+ align = {},
+ pos = {};
+
+ // We cache the position here based on the layering because the graph and
+ // layering may be out of sync. The layering matrix is manipulated to
+ // generate different extreme alignments.
+ forEach/* default */.Z(layering, function (layer) {
+ forEach/* default */.Z(layer, function (v, order) {
+ root[v] = v;
+ align[v] = v;
+ pos[v] = order;
+ });
+ });
+
+ forEach/* default */.Z(layering, function (layer) {
+ var prevIdx = -1;
+ forEach/* default */.Z(layer, function (v) {
+ var ws = neighborFn(v);
+ if (ws.length) {
+ ws = lodash_es_sortBy(ws, function (w) {
+ return pos[w];
+ });
+ var mp = (ws.length - 1) / 2;
+ for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) {
+ var w = ws[i];
+ if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) {
+ align[w] = v;
+ align[v] = root[v] = root[w];
+ prevIdx = pos[w];
+ }
+ }
+ }
+ });
+ });
+
+ return { root: root, align: align };
+}
+
+function horizontalCompaction(g, layering, root, align, reverseSep) {
+ // This portion of the algorithm differs from BK due to a number of problems.
+ // Instead of their algorithm we construct a new block graph and do two
+ // sweeps. The first sweep places blocks with the smallest possible
+ // coordinates. The second sweep removes unused space by moving blocks to the
+ // greatest coordinates without violating separation.
+ var xs = {},
+ blockG = buildBlockGraph(g, layering, root, reverseSep),
+ borderType = reverseSep ? 'borderLeft' : 'borderRight';
+
+ function iterate(setXsFunc, nextNodesFunc) {
+ var stack = blockG.nodes();
+ var elem = stack.pop();
+ var visited = {};
+ while (elem) {
+ if (visited[elem]) {
+ setXsFunc(elem);
+ } else {
+ visited[elem] = true;
+ stack.push(elem);
+ stack = stack.concat(nextNodesFunc(elem));
+ }
+
+ elem = stack.pop();
+ }
+ }
+
+ // First pass, assign smallest coordinates
+ function pass1(elem) {
+ xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) {
+ return Math.max(acc, xs[e.v] + blockG.edge(e));
+ }, 0);
+ }
+
+ // Second pass, assign greatest coordinates
+ function pass2(elem) {
+ var min = blockG.outEdges(elem).reduce(function (acc, e) {
+ return Math.min(acc, xs[e.w] - blockG.edge(e));
+ }, Number.POSITIVE_INFINITY);
+
+ var node = g.node(elem);
+ if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) {
+ xs[elem] = Math.max(xs[elem], min);
+ }
+ }
+
+ iterate(pass1, blockG.predecessors.bind(blockG));
+ iterate(pass2, blockG.successors.bind(blockG));
+
+ // Assign x coordinates to all nodes
+ forEach/* default */.Z(align, function (v) {
+ xs[v] = xs[root[v]];
+ });
+
+ return xs;
+}
+
+function buildBlockGraph(g, layering, root, reverseSep) {
+ var blockGraph = new graphlib/* Graph */.k(),
+ graphLabel = g.graph(),
+ sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep);
+
+ forEach/* default */.Z(layering, function (layer) {
+ var u;
+ forEach/* default */.Z(layer, function (v) {
+ var vRoot = root[v];
+ blockGraph.setNode(vRoot);
+ if (u) {
+ var uRoot = root[u],
+ prevMax = blockGraph.edge(uRoot, vRoot);
+ blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0));
+ }
+ u = v;
+ });
+ });
+
+ return blockGraph;
+}
+
+/*
+ * Returns the alignment that has the smallest width of the given alignments.
+ */
+function findSmallestWidthAlignment(g, xss) {
+ return lodash_es_minBy(values/* default */.Z(xss), function (xs) {
+ var max = Number.NEGATIVE_INFINITY;
+ var min = Number.POSITIVE_INFINITY;
+
+ lodash_es_forIn(xs, function (x, v) {
+ var halfWidth = width(g, v) / 2;
+
+ max = Math.max(x + halfWidth, max);
+ min = Math.min(x - halfWidth, min);
+ });
+
+ return max - min;
+ });
+}
+
+/*
+ * Align the coordinates of each of the layout alignments such that
+ * left-biased alignments have their minimum coordinate at the same point as
+ * the minimum coordinate of the smallest width alignment and right-biased
+ * alignments have their maximum coordinate at the same point as the maximum
+ * coordinate of the smallest width alignment.
+ */
+function alignCoordinates(xss, alignTo) {
+ var alignToVals = values/* default */.Z(alignTo),
+ alignToMin = lodash_es_min(alignToVals),
+ alignToMax = lodash_es_max(alignToVals);
+
+ forEach/* default */.Z(['u', 'd'], function (vert) {
+ forEach/* default */.Z(['l', 'r'], function (horiz) {
+ var alignment = vert + horiz,
+ xs = xss[alignment],
+ delta;
+ if (xs === alignTo) return;
+
+ var xsVals = values/* default */.Z(xs);
+ delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals);
+
+ if (delta) {
+ xss[alignment] = lodash_es_mapValues(xs, function (x) {
+ return x + delta;
+ });
+ }
+ });
+ });
+}
+
+function balance(xss, align) {
+ return lodash_es_mapValues(xss.ul, function (ignore, v) {
+ if (align) {
+ return xss[align.toLowerCase()][v];
+ } else {
+ var xs = lodash_es_sortBy(map/* default */.Z(xss, v));
+ return (xs[1] + xs[2]) / 2;
+ }
+ });
+}
+
+function positionX(g) {
+ var layering = buildLayerMatrix(g);
+ var conflicts = merge/* default */.Z(findType1Conflicts(g, layering), findType2Conflicts(g, layering));
+
+ var xss = {};
+ var adjustedLayering;
+ forEach/* default */.Z(['u', 'd'], function (vert) {
+ adjustedLayering = vert === 'u' ? layering : values/* default */.Z(layering).reverse();
+ forEach/* default */.Z(['l', 'r'], function (horiz) {
+ if (horiz === 'r') {
+ adjustedLayering = map/* default */.Z(adjustedLayering, function (inner) {
+ return values/* default */.Z(inner).reverse();
+ });
+ }
+
+ var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g);
+ var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn);
+ var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r');
+ if (horiz === 'r') {
+ xs = lodash_es_mapValues(xs, function (x) {
+ return -x;
+ });
+ }
+ xss[vert + horiz] = xs;
+ });
+ });
+
+ var smallestWidth = findSmallestWidthAlignment(g, xss);
+ alignCoordinates(xss, smallestWidth);
+ return balance(xss, g.graph().align);
+}
+
+function sep(nodeSep, edgeSep, reverseSep) {
+ return function (g, v, w) {
+ var vLabel = g.node(v);
+ var wLabel = g.node(w);
+ var sum = 0;
+ var delta;
+
+ sum += vLabel.width / 2;
+ if (has/* default */.Z(vLabel, 'labelpos')) {
+ switch (vLabel.labelpos.toLowerCase()) {
+ case 'l':
+ delta = -vLabel.width / 2;
+ break;
+ case 'r':
+ delta = vLabel.width / 2;
+ break;
+ }
+ }
+ if (delta) {
+ sum += reverseSep ? delta : -delta;
+ }
+ delta = 0;
+
+ sum += (vLabel.dummy ? edgeSep : nodeSep) / 2;
+ sum += (wLabel.dummy ? edgeSep : nodeSep) / 2;
+
+ sum += wLabel.width / 2;
+ if (has/* default */.Z(wLabel, 'labelpos')) {
+ switch (wLabel.labelpos.toLowerCase()) {
+ case 'l':
+ delta = wLabel.width / 2;
+ break;
+ case 'r':
+ delta = -wLabel.width / 2;
+ break;
+ }
+ }
+ if (delta) {
+ sum += reverseSep ? delta : -delta;
+ }
+ delta = 0;
+
+ return sum;
+ };
+}
+
+function width(g, v) {
+ return g.node(v).width;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js
+
+
+
+
+
+
+function position(g) {
+ g = asNonCompoundGraph(g);
+
+ positionY(g);
+ lodash_es_forOwn(positionX(g), function (x, v) {
+ g.node(v).x = x;
+ });
+}
+
+function positionY(g) {
+ var layering = buildLayerMatrix(g);
+ var rankSep = g.graph().ranksep;
+ var prevY = 0;
+ forEach/* default */.Z(layering, function (layer) {
+ var maxHeight = lodash_es_max(
+ map/* default */.Z(layer, function (v) {
+ return g.node(v).height;
+ })
+ );
+ forEach/* default */.Z(layer, function (v) {
+ g.node(v).y = prevY + maxHeight / 2;
+ });
+ prevY += maxHeight + rankSep;
+ });
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+function layout(g, opts) {
+ var time = opts && opts.debugTiming ? util_time : notime;
+ time('layout', function () {
+ var layoutGraph = time(' buildLayoutGraph', function () {
+ return buildLayoutGraph(g);
+ });
+ time(' runLayout', function () {
+ runLayout(layoutGraph, time);
+ });
+ time(' updateInputGraph', function () {
+ updateInputGraph(g, layoutGraph);
+ });
+ });
+}
+
+function runLayout(g, time) {
+ time(' makeSpaceForEdgeLabels', function () {
+ makeSpaceForEdgeLabels(g);
+ });
+ time(' removeSelfEdges', function () {
+ removeSelfEdges(g);
+ });
+ time(' acyclic', function () {
+ run(g);
+ });
+ time(' nestingGraph.run', function () {
+ nesting_graph_run(g);
+ });
+ time(' rank', function () {
+ rank(asNonCompoundGraph(g));
+ });
+ time(' injectEdgeLabelProxies', function () {
+ injectEdgeLabelProxies(g);
+ });
+ time(' removeEmptyRanks', function () {
+ removeEmptyRanks(g);
+ });
+ time(' nestingGraph.cleanup', function () {
+ cleanup(g);
+ });
+ time(' normalizeRanks', function () {
+ normalizeRanks(g);
+ });
+ time(' assignRankMinMax', function () {
+ assignRankMinMax(g);
+ });
+ time(' removeEdgeLabelProxies', function () {
+ removeEdgeLabelProxies(g);
+ });
+ time(' normalize.run', function () {
+ normalize_run(g);
+ });
+ time(' parentDummyChains', function () {
+ parentDummyChains(g);
+ });
+ time(' addBorderSegments', function () {
+ addBorderSegments(g);
+ });
+ time(' order', function () {
+ order(g);
+ });
+ time(' insertSelfEdges', function () {
+ insertSelfEdges(g);
+ });
+ time(' adjustCoordinateSystem', function () {
+ adjust(g);
+ });
+ time(' position', function () {
+ position(g);
+ });
+ time(' positionSelfEdges', function () {
+ positionSelfEdges(g);
+ });
+ time(' removeBorderNodes', function () {
+ removeBorderNodes(g);
+ });
+ time(' normalize.undo', function () {
+ normalize_undo(g);
+ });
+ time(' fixupEdgeLabelCoords', function () {
+ fixupEdgeLabelCoords(g);
+ });
+ time(' undoCoordinateSystem', function () {
+ coordinate_system_undo(g);
+ });
+ time(' translateGraph', function () {
+ translateGraph(g);
+ });
+ time(' assignNodeIntersects', function () {
+ assignNodeIntersects(g);
+ });
+ time(' reversePoints', function () {
+ reversePointsForReversedEdges(g);
+ });
+ time(' acyclic.undo', function () {
+ undo(g);
+ });
+}
+
+/*
+ * Copies final layout information from the layout graph back to the input
+ * graph. This process only copies whitelisted attributes from the layout graph
+ * to the input graph, so it serves as a good place to determine what
+ * attributes can influence layout.
+ */
+function updateInputGraph(inputGraph, layoutGraph) {
+ forEach/* default */.Z(inputGraph.nodes(), function (v) {
+ var inputLabel = inputGraph.node(v);
+ var layoutLabel = layoutGraph.node(v);
+
+ if (inputLabel) {
+ inputLabel.x = layoutLabel.x;
+ inputLabel.y = layoutLabel.y;
+
+ if (layoutGraph.children(v).length) {
+ inputLabel.width = layoutLabel.width;
+ inputLabel.height = layoutLabel.height;
+ }
+ }
+ });
+
+ forEach/* default */.Z(inputGraph.edges(), function (e) {
+ var inputLabel = inputGraph.edge(e);
+ var layoutLabel = layoutGraph.edge(e);
+
+ inputLabel.points = layoutLabel.points;
+ if (has/* default */.Z(layoutLabel, 'x')) {
+ inputLabel.x = layoutLabel.x;
+ inputLabel.y = layoutLabel.y;
+ }
+ });
+
+ inputGraph.graph().width = layoutGraph.graph().width;
+ inputGraph.graph().height = layoutGraph.graph().height;
+}
+
+var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy'];
+var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' };
+var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align'];
+var nodeNumAttrs = ['width', 'height'];
+var nodeDefaults = { width: 0, height: 0 };
+var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset'];
+var edgeDefaults = {
+ minlen: 1,
+ weight: 1,
+ width: 0,
+ height: 0,
+ labeloffset: 10,
+ labelpos: 'r',
+};
+var edgeAttrs = ['labelpos'];
+
+/*
+ * Constructs a new graph from the input graph, which can be used for layout.
+ * This process copies only whitelisted attributes from the input graph to the
+ * layout graph. Thus this function serves as a good place to determine what
+ * attributes can influence layout.
+ */
+function buildLayoutGraph(inputGraph) {
+ var g = new graphlib/* Graph */.k({ multigraph: true, compound: true });
+ var graph = canonicalize(inputGraph.graph());
+
+ g.setGraph(
+ merge/* default */.Z({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.Z(graph, graphAttrs))
+ );
+
+ forEach/* default */.Z(inputGraph.nodes(), function (v) {
+ var node = canonicalize(inputGraph.node(v));
+ g.setNode(v, defaults/* default */.Z(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults));
+ g.setParent(v, inputGraph.parent(v));
+ });
+
+ forEach/* default */.Z(inputGraph.edges(), function (e) {
+ var edge = canonicalize(inputGraph.edge(e));
+ g.setEdge(
+ e,
+ merge/* default */.Z({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.Z(edge, edgeAttrs))
+ );
+ });
+
+ return g;
+}
+
+/*
+ * This idea comes from the Gansner paper: to account for edge labels in our
+ * layout we split each rank in half by doubling minlen and halving ranksep.
+ * Then we can place labels at these mid-points between nodes.
+ *
+ * We also add some minimal padding to the width to push the label for the edge
+ * away from the edge itself a bit.
+ */
+function makeSpaceForEdgeLabels(g) {
+ var graph = g.graph();
+ graph.ranksep /= 2;
+ forEach/* default */.Z(g.edges(), function (e) {
+ var edge = g.edge(e);
+ edge.minlen *= 2;
+ if (edge.labelpos.toLowerCase() !== 'c') {
+ if (graph.rankdir === 'TB' || graph.rankdir === 'BT') {
+ edge.width += edge.labeloffset;
+ } else {
+ edge.height += edge.labeloffset;
+ }
+ }
+ });
+}
+
+/*
+ * Creates temporary dummy nodes that capture the rank in which each edge's
+ * label is going to, if it has one of non-zero width and height. We do this
+ * so that we can safely remove empty ranks while preserving balance for the
+ * label's position.
+ */
+function injectEdgeLabelProxies(g) {
+ forEach/* default */.Z(g.edges(), function (e) {
+ var edge = g.edge(e);
+ if (edge.width && edge.height) {
+ var v = g.node(e.v);
+ var w = g.node(e.w);
+ var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e };
+ addDummyNode(g, 'edge-proxy', label, '_ep');
+ }
+ });
+}
+
+function assignRankMinMax(g) {
+ var maxRank = 0;
+ forEach/* default */.Z(g.nodes(), function (v) {
+ var node = g.node(v);
+ if (node.borderTop) {
+ node.minRank = g.node(node.borderTop).rank;
+ node.maxRank = g.node(node.borderBottom).rank;
+ // @ts-expect-error
+ maxRank = lodash_es_max(maxRank, node.maxRank);
+ }
+ });
+ g.graph().maxRank = maxRank;
+}
+
+function removeEdgeLabelProxies(g) {
+ forEach/* default */.Z(g.nodes(), function (v) {
+ var node = g.node(v);
+ if (node.dummy === 'edge-proxy') {
+ g.edge(node.e).labelRank = node.rank;
+ g.removeNode(v);
+ }
+ });
+}
+
+function translateGraph(g) {
+ var minX = Number.POSITIVE_INFINITY;
+ var maxX = 0;
+ var minY = Number.POSITIVE_INFINITY;
+ var maxY = 0;
+ var graphLabel = g.graph();
+ var marginX = graphLabel.marginx || 0;
+ var marginY = graphLabel.marginy || 0;
+
+ function getExtremes(attrs) {
+ var x = attrs.x;
+ var y = attrs.y;
+ var w = attrs.width;
+ var h = attrs.height;
+ minX = Math.min(minX, x - w / 2);
+ maxX = Math.max(maxX, x + w / 2);
+ minY = Math.min(minY, y - h / 2);
+ maxY = Math.max(maxY, y + h / 2);
+ }
+
+ forEach/* default */.Z(g.nodes(), function (v) {
+ getExtremes(g.node(v));
+ });
+ forEach/* default */.Z(g.edges(), function (e) {
+ var edge = g.edge(e);
+ if (has/* default */.Z(edge, 'x')) {
+ getExtremes(edge);
+ }
+ });
+
+ minX -= marginX;
+ minY -= marginY;
+
+ forEach/* default */.Z(g.nodes(), function (v) {
+ var node = g.node(v);
+ node.x -= minX;
+ node.y -= minY;
+ });
+
+ forEach/* default */.Z(g.edges(), function (e) {
+ var edge = g.edge(e);
+ forEach/* default */.Z(edge.points, function (p) {
+ p.x -= minX;
+ p.y -= minY;
+ });
+ if (has/* default */.Z(edge, 'x')) {
+ edge.x -= minX;
+ }
+ if (has/* default */.Z(edge, 'y')) {
+ edge.y -= minY;
+ }
+ });
+
+ graphLabel.width = maxX - minX + marginX;
+ graphLabel.height = maxY - minY + marginY;
+}
+
+function assignNodeIntersects(g) {
+ forEach/* default */.Z(g.edges(), function (e) {
+ var edge = g.edge(e);
+ var nodeV = g.node(e.v);
+ var nodeW = g.node(e.w);
+ var p1, p2;
+ if (!edge.points) {
+ edge.points = [];
+ p1 = nodeW;
+ p2 = nodeV;
+ } else {
+ p1 = edge.points[0];
+ p2 = edge.points[edge.points.length - 1];
+ }
+ edge.points.unshift(intersectRect(nodeV, p1));
+ edge.points.push(intersectRect(nodeW, p2));
+ });
+}
+
+function fixupEdgeLabelCoords(g) {
+ forEach/* default */.Z(g.edges(), function (e) {
+ var edge = g.edge(e);
+ if (has/* default */.Z(edge, 'x')) {
+ if (edge.labelpos === 'l' || edge.labelpos === 'r') {
+ edge.width -= edge.labeloffset;
+ }
+ switch (edge.labelpos) {
+ case 'l':
+ edge.x -= edge.width / 2 + edge.labeloffset;
+ break;
+ case 'r':
+ edge.x += edge.width / 2 + edge.labeloffset;
+ break;
+ }
+ }
+ });
+}
+
+function reversePointsForReversedEdges(g) {
+ forEach/* default */.Z(g.edges(), function (e) {
+ var edge = g.edge(e);
+ if (edge.reversed) {
+ edge.points.reverse();
+ }
+ });
+}
+
+function removeBorderNodes(g) {
+ forEach/* default */.Z(g.nodes(), function (v) {
+ if (g.children(v).length) {
+ var node = g.node(v);
+ var t = g.node(node.borderTop);
+ var b = g.node(node.borderBottom);
+ var l = g.node(lodash_es_last(node.borderLeft));
+ var r = g.node(lodash_es_last(node.borderRight));
+
+ node.width = Math.abs(r.x - l.x);
+ node.height = Math.abs(b.y - t.y);
+ node.x = l.x + node.width / 2;
+ node.y = t.y + node.height / 2;
+ }
+ });
+
+ forEach/* default */.Z(g.nodes(), function (v) {
+ if (g.node(v).dummy === 'border') {
+ g.removeNode(v);
+ }
+ });
+}
+
+function removeSelfEdges(g) {
+ forEach/* default */.Z(g.edges(), function (e) {
+ if (e.v === e.w) {
+ var node = g.node(e.v);
+ if (!node.selfEdges) {
+ node.selfEdges = [];
+ }
+ node.selfEdges.push({ e: e, label: g.edge(e) });
+ g.removeEdge(e);
+ }
+ });
+}
+
+function insertSelfEdges(g) {
+ var layers = buildLayerMatrix(g);
+ forEach/* default */.Z(layers, function (layer) {
+ var orderShift = 0;
+ forEach/* default */.Z(layer, function (v, i) {
+ var node = g.node(v);
+ node.order = i + orderShift;
+ forEach/* default */.Z(node.selfEdges, function (selfEdge) {
+ addDummyNode(
+ g,
+ 'selfedge',
+ {
+ width: selfEdge.label.width,
+ height: selfEdge.label.height,
+ rank: node.rank,
+ order: i + ++orderShift,
+ e: selfEdge.e,
+ label: selfEdge.label,
+ },
+ '_se'
+ );
+ });
+ delete node.selfEdges;
+ });
+ });
+}
+
+function positionSelfEdges(g) {
+ forEach/* default */.Z(g.nodes(), function (v) {
+ var node = g.node(v);
+ if (node.dummy === 'selfedge') {
+ var selfNode = g.node(node.e.v);
+ var x = selfNode.x + selfNode.width / 2;
+ var y = selfNode.y;
+ var dx = node.x - x;
+ var dy = selfNode.height / 2;
+ g.setEdge(node.e, node.label);
+ g.removeNode(v);
+ node.label.points = [
+ { x: x + (2 * dx) / 3, y: y - dy },
+ { x: x + (5 * dx) / 6, y: y - dy },
+ { x: x + dx, y: y },
+ { x: x + (5 * dx) / 6, y: y + dy },
+ { x: x + (2 * dx) / 3, y: y + dy },
+ ];
+ node.label.x = node.x;
+ node.label.y = node.y;
+ }
+ });
+}
+
+function selectNumberAttrs(obj, attrs) {
+ return lodash_es_mapValues(pick/* default */.Z(obj, attrs), Number);
+}
+
+function canonicalize(attrs) {
+ var newAttrs = {};
+ forEach/* default */.Z(attrs, function (v, k) {
+ newAttrs[k.toLowerCase()] = v;
+ });
+ return newAttrs;
+}
+
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js
+
+
+
+
+
+
+
+
+/***/ }),
+
+/***/ 52544:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ k: () => (/* binding */ Graph)
+});
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules
+var has = __webpack_require__(17452);
+// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js
+var constant = __webpack_require__(62002);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js
+var isFunction = __webpack_require__(73234);
+// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js
+var keys = __webpack_require__(17179);
+// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules
+var filter = __webpack_require__(13445);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js
+var isEmpty = __webpack_require__(79697);
+// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js
+var forEach = __webpack_require__(70870);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js
+var isUndefined = __webpack_require__(49360);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules
+var _baseFlatten = __webpack_require__(10626);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js
+var _baseRest = __webpack_require__(69581);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules
+var _SetCache = __webpack_require__(63001);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js
+var _baseFindIndex = __webpack_require__(21692);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js
+/**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+function baseIsNaN(value) {
+ return value !== value;
+}
+
+/* harmony default export */ const _baseIsNaN = (baseIsNaN);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js
+/**
+ * A specialized version of `_.indexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function strictIndexOf(array, value, fromIndex) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+/* harmony default export */ const _strictIndexOf = (strictIndexOf);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js
+
+
+
+
+/**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseIndexOf(array, value, fromIndex) {
+ return value === value
+ ? _strictIndexOf(array, value, fromIndex)
+ : (0,_baseFindIndex/* default */.Z)(array, _baseIsNaN, fromIndex);
+}
+
+/* harmony default export */ const _baseIndexOf = (baseIndexOf);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js
+
+
+/**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+function arrayIncludes(array, value) {
+ var length = array == null ? 0 : array.length;
+ return !!length && _baseIndexOf(array, value, 0) > -1;
+}
+
+/* harmony default export */ const _arrayIncludes = (arrayIncludes);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js
+/**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+function arrayIncludesWith(array, value, comparator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js
+var _cacheHas = __webpack_require__(59548);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js
+var _Set = __webpack_require__(93203);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js
+/**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+function noop() {
+ // No operation performed.
+}
+
+/* harmony default export */ const lodash_es_noop = (noop);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js
+var _setToArray = __webpack_require__(6545);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js
+
+
+
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * Creates a set object of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+var createSet = !(_Set/* default */.Z && (1 / (0,_setToArray/* default */.Z)(new _Set/* default */.Z([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) {
+ return new _Set/* default */.Z(values);
+};
+
+/* harmony default export */ const _createSet = (createSet);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js
+
+
+
+
+
+
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/**
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = _arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
+
+ if (comparator) {
+ isCommon = false;
+ includes = _arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : _createSet(array);
+ if (set) {
+ return (0,_setToArray/* default */.Z)(set);
+ }
+ isCommon = false;
+ includes = _cacheHas/* default */.Z;
+ seen = new _SetCache/* default */.Z;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+}
+
+/* harmony default export */ const _baseUniq = (baseUniq);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js
+var isArrayLikeObject = __webpack_require__(836);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js
+
+
+
+
+
+/**
+ * Creates an array of unique values, in order, from all given arrays using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([2], [1, 2]);
+ * // => [2, 1]
+ */
+var union = (0,_baseRest/* default */.Z)(function(arrays) {
+ return _baseUniq((0,_baseFlatten/* default */.Z)(arrays, 1, isArrayLikeObject/* default */.Z, true));
+});
+
+/* harmony default export */ const lodash_es_union = (union);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules
+var values = __webpack_require__(34148);
+// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules
+var reduce = __webpack_require__(92344);
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js
+
+
+var DEFAULT_EDGE_NAME = '\x00';
+var GRAPH_NODE = '\x00';
+var EDGE_KEY_DELIM = '\x01';
+
+// Implementation notes:
+//
+// * Node id query functions should return string ids for the nodes
+// * Edge id query functions should return an "edgeObj", edge object, that is
+// composed of enough information to uniquely identify an edge: {v, w, name}.
+// * Internally we use an "edgeId", a stringified form of the edgeObj, to
+// reference edges. This is because we need a performant way to look these
+// edges up and, object properties, which have string keys, are the closest
+// we're going to get to a performant hashtable in JavaScript.
+
+// Implementation notes:
+//
+// * Node id query functions should return string ids for the nodes
+// * Edge id query functions should return an "edgeObj", edge object, that is
+// composed of enough information to uniquely identify an edge: {v, w, name}.
+// * Internally we use an "edgeId", a stringified form of the edgeObj, to
+// reference edges. This is because we need a performant way to look these
+// edges up and, object properties, which have string keys, are the closest
+// we're going to get to a performant hashtable in JavaScript.
+class Graph {
+ constructor(opts = {}) {
+ this._isDirected = has/* default */.Z(opts, 'directed') ? opts.directed : true;
+ this._isMultigraph = has/* default */.Z(opts, 'multigraph') ? opts.multigraph : false;
+ this._isCompound = has/* default */.Z(opts, 'compound') ? opts.compound : false;
+
+ // Label for the graph itself
+ this._label = undefined;
+
+ // Defaults to be set when creating a new node
+ this._defaultNodeLabelFn = constant/* default */.Z(undefined);
+
+ // Defaults to be set when creating a new edge
+ this._defaultEdgeLabelFn = constant/* default */.Z(undefined);
+
+ // v -> label
+ this._nodes = {};
+
+ if (this._isCompound) {
+ // v -> parent
+ this._parent = {};
+
+ // v -> children
+ this._children = {};
+ this._children[GRAPH_NODE] = {};
+ }
+
+ // v -> edgeObj
+ this._in = {};
+
+ // u -> v -> Number
+ this._preds = {};
+
+ // v -> edgeObj
+ this._out = {};
+
+ // v -> w -> Number
+ this._sucs = {};
+
+ // e -> edgeObj
+ this._edgeObjs = {};
+
+ // e -> label
+ this._edgeLabels = {};
+ }
+ /* === Graph functions ========= */
+ isDirected() {
+ return this._isDirected;
+ }
+ isMultigraph() {
+ return this._isMultigraph;
+ }
+ isCompound() {
+ return this._isCompound;
+ }
+ setGraph(label) {
+ this._label = label;
+ return this;
+ }
+ graph() {
+ return this._label;
+ }
+ /* === Node functions ========== */
+ setDefaultNodeLabel(newDefault) {
+ if (!isFunction/* default */.Z(newDefault)) {
+ newDefault = constant/* default */.Z(newDefault);
+ }
+ this._defaultNodeLabelFn = newDefault;
+ return this;
+ }
+ nodeCount() {
+ return this._nodeCount;
+ }
+ nodes() {
+ return keys/* default */.Z(this._nodes);
+ }
+ sources() {
+ var self = this;
+ return filter/* default */.Z(this.nodes(), function (v) {
+ return isEmpty/* default */.Z(self._in[v]);
+ });
+ }
+ sinks() {
+ var self = this;
+ return filter/* default */.Z(this.nodes(), function (v) {
+ return isEmpty/* default */.Z(self._out[v]);
+ });
+ }
+ setNodes(vs, value) {
+ var args = arguments;
+ var self = this;
+ forEach/* default */.Z(vs, function (v) {
+ if (args.length > 1) {
+ self.setNode(v, value);
+ } else {
+ self.setNode(v);
+ }
+ });
+ return this;
+ }
+ setNode(v, value) {
+ if (has/* default */.Z(this._nodes, v)) {
+ if (arguments.length > 1) {
+ this._nodes[v] = value;
+ }
+ return this;
+ }
+
+ // @ts-expect-error
+ this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v);
+ if (this._isCompound) {
+ this._parent[v] = GRAPH_NODE;
+ this._children[v] = {};
+ this._children[GRAPH_NODE][v] = true;
+ }
+ this._in[v] = {};
+ this._preds[v] = {};
+ this._out[v] = {};
+ this._sucs[v] = {};
+ ++this._nodeCount;
+ return this;
+ }
+ node(v) {
+ return this._nodes[v];
+ }
+ hasNode(v) {
+ return has/* default */.Z(this._nodes, v);
+ }
+ removeNode(v) {
+ var self = this;
+ if (has/* default */.Z(this._nodes, v)) {
+ var removeEdge = function (e) {
+ self.removeEdge(self._edgeObjs[e]);
+ };
+ delete this._nodes[v];
+ if (this._isCompound) {
+ this._removeFromParentsChildList(v);
+ delete this._parent[v];
+ forEach/* default */.Z(this.children(v), function (child) {
+ self.setParent(child);
+ });
+ delete this._children[v];
+ }
+ forEach/* default */.Z(keys/* default */.Z(this._in[v]), removeEdge);
+ delete this._in[v];
+ delete this._preds[v];
+ forEach/* default */.Z(keys/* default */.Z(this._out[v]), removeEdge);
+ delete this._out[v];
+ delete this._sucs[v];
+ --this._nodeCount;
+ }
+ return this;
+ }
+ setParent(v, parent) {
+ if (!this._isCompound) {
+ throw new Error('Cannot set parent in a non-compound graph');
+ }
+
+ if (isUndefined/* default */.Z(parent)) {
+ parent = GRAPH_NODE;
+ } else {
+ // Coerce parent to string
+ parent += '';
+ for (var ancestor = parent; !isUndefined/* default */.Z(ancestor); ancestor = this.parent(ancestor)) {
+ if (ancestor === v) {
+ throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle');
+ }
+ }
+
+ this.setNode(parent);
+ }
+
+ this.setNode(v);
+ this._removeFromParentsChildList(v);
+ this._parent[v] = parent;
+ this._children[parent][v] = true;
+ return this;
+ }
+ _removeFromParentsChildList(v) {
+ delete this._children[this._parent[v]][v];
+ }
+ parent(v) {
+ if (this._isCompound) {
+ var parent = this._parent[v];
+ if (parent !== GRAPH_NODE) {
+ return parent;
+ }
+ }
+ }
+ children(v) {
+ if (isUndefined/* default */.Z(v)) {
+ v = GRAPH_NODE;
+ }
+
+ if (this._isCompound) {
+ var children = this._children[v];
+ if (children) {
+ return keys/* default */.Z(children);
+ }
+ } else if (v === GRAPH_NODE) {
+ return this.nodes();
+ } else if (this.hasNode(v)) {
+ return [];
+ }
+ }
+ predecessors(v) {
+ var predsV = this._preds[v];
+ if (predsV) {
+ return keys/* default */.Z(predsV);
+ }
+ }
+ successors(v) {
+ var sucsV = this._sucs[v];
+ if (sucsV) {
+ return keys/* default */.Z(sucsV);
+ }
+ }
+ neighbors(v) {
+ var preds = this.predecessors(v);
+ if (preds) {
+ return lodash_es_union(preds, this.successors(v));
+ }
+ }
+ isLeaf(v) {
+ var neighbors;
+ if (this.isDirected()) {
+ neighbors = this.successors(v);
+ } else {
+ neighbors = this.neighbors(v);
+ }
+ return neighbors.length === 0;
+ }
+ filterNodes(filter) {
+ // @ts-expect-error
+ var copy = new this.constructor({
+ directed: this._isDirected,
+ multigraph: this._isMultigraph,
+ compound: this._isCompound,
+ });
+
+ copy.setGraph(this.graph());
+
+ var self = this;
+ forEach/* default */.Z(this._nodes, function (value, v) {
+ if (filter(v)) {
+ copy.setNode(v, value);
+ }
+ });
+
+ forEach/* default */.Z(this._edgeObjs, function (e) {
+ // @ts-expect-error
+ if (copy.hasNode(e.v) && copy.hasNode(e.w)) {
+ copy.setEdge(e, self.edge(e));
+ }
+ });
+
+ var parents = {};
+ function findParent(v) {
+ var parent = self.parent(v);
+ if (parent === undefined || copy.hasNode(parent)) {
+ parents[v] = parent;
+ return parent;
+ } else if (parent in parents) {
+ return parents[parent];
+ } else {
+ return findParent(parent);
+ }
+ }
+
+ if (this._isCompound) {
+ forEach/* default */.Z(copy.nodes(), function (v) {
+ copy.setParent(v, findParent(v));
+ });
+ }
+
+ return copy;
+ }
+ /* === Edge functions ========== */
+ setDefaultEdgeLabel(newDefault) {
+ if (!isFunction/* default */.Z(newDefault)) {
+ newDefault = constant/* default */.Z(newDefault);
+ }
+ this._defaultEdgeLabelFn = newDefault;
+ return this;
+ }
+ edgeCount() {
+ return this._edgeCount;
+ }
+ edges() {
+ return values/* default */.Z(this._edgeObjs);
+ }
+ setPath(vs, value) {
+ var self = this;
+ var args = arguments;
+ reduce/* default */.Z(vs, function (v, w) {
+ if (args.length > 1) {
+ self.setEdge(v, w, value);
+ } else {
+ self.setEdge(v, w);
+ }
+ return w;
+ });
+ return this;
+ }
+ /*
+ * setEdge(v, w, [value, [name]])
+ * setEdge({ v, w, [name] }, [value])
+ */
+ setEdge() {
+ var v, w, name, value;
+ var valueSpecified = false;
+ var arg0 = arguments[0];
+
+ if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) {
+ v = arg0.v;
+ w = arg0.w;
+ name = arg0.name;
+ if (arguments.length === 2) {
+ value = arguments[1];
+ valueSpecified = true;
+ }
+ } else {
+ v = arg0;
+ w = arguments[1];
+ name = arguments[3];
+ if (arguments.length > 2) {
+ value = arguments[2];
+ valueSpecified = true;
+ }
+ }
+
+ v = '' + v;
+ w = '' + w;
+ if (!isUndefined/* default */.Z(name)) {
+ name = '' + name;
+ }
+
+ var e = edgeArgsToId(this._isDirected, v, w, name);
+ if (has/* default */.Z(this._edgeLabels, e)) {
+ if (valueSpecified) {
+ this._edgeLabels[e] = value;
+ }
+ return this;
+ }
+
+ if (!isUndefined/* default */.Z(name) && !this._isMultigraph) {
+ throw new Error('Cannot set a named edge when isMultigraph = false');
+ }
+
+ // It didn't exist, so we need to create it.
+ // First ensure the nodes exist.
+ this.setNode(v);
+ this.setNode(w);
+
+ // @ts-expect-error
+ this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name);
+
+ var edgeObj = edgeArgsToObj(this._isDirected, v, w, name);
+ // Ensure we add undirected edges in a consistent way.
+ v = edgeObj.v;
+ w = edgeObj.w;
+
+ Object.freeze(edgeObj);
+ this._edgeObjs[e] = edgeObj;
+ incrementOrInitEntry(this._preds[w], v);
+ incrementOrInitEntry(this._sucs[v], w);
+ this._in[w][e] = edgeObj;
+ this._out[v][e] = edgeObj;
+ this._edgeCount++;
+ return this;
+ }
+ edge(v, w, name) {
+ var e =
+ arguments.length === 1
+ ? edgeObjToId(this._isDirected, arguments[0])
+ : edgeArgsToId(this._isDirected, v, w, name);
+ return this._edgeLabels[e];
+ }
+ hasEdge(v, w, name) {
+ var e =
+ arguments.length === 1
+ ? edgeObjToId(this._isDirected, arguments[0])
+ : edgeArgsToId(this._isDirected, v, w, name);
+ return has/* default */.Z(this._edgeLabels, e);
+ }
+ removeEdge(v, w, name) {
+ var e =
+ arguments.length === 1
+ ? edgeObjToId(this._isDirected, arguments[0])
+ : edgeArgsToId(this._isDirected, v, w, name);
+ var edge = this._edgeObjs[e];
+ if (edge) {
+ v = edge.v;
+ w = edge.w;
+ delete this._edgeLabels[e];
+ delete this._edgeObjs[e];
+ decrementOrRemoveEntry(this._preds[w], v);
+ decrementOrRemoveEntry(this._sucs[v], w);
+ delete this._in[w][e];
+ delete this._out[v][e];
+ this._edgeCount--;
+ }
+ return this;
+ }
+ inEdges(v, u) {
+ var inV = this._in[v];
+ if (inV) {
+ var edges = values/* default */.Z(inV);
+ if (!u) {
+ return edges;
+ }
+ return filter/* default */.Z(edges, function (edge) {
+ return edge.v === u;
+ });
+ }
+ }
+ outEdges(v, w) {
+ var outV = this._out[v];
+ if (outV) {
+ var edges = values/* default */.Z(outV);
+ if (!w) {
+ return edges;
+ }
+ return filter/* default */.Z(edges, function (edge) {
+ return edge.w === w;
+ });
+ }
+ }
+ nodeEdges(v, w) {
+ var inEdges = this.inEdges(v, w);
+ if (inEdges) {
+ return inEdges.concat(this.outEdges(v, w));
+ }
+ }
+}
+
+/* Number of nodes in the graph. Should only be changed by the implementation. */
+Graph.prototype._nodeCount = 0;
+
+/* Number of edges in the graph. Should only be changed by the implementation. */
+Graph.prototype._edgeCount = 0;
+
+function incrementOrInitEntry(map, k) {
+ if (map[k]) {
+ map[k]++;
+ } else {
+ map[k] = 1;
+ }
+}
+
+function decrementOrRemoveEntry(map, k) {
+ if (!--map[k]) {
+ delete map[k];
+ }
+}
+
+function edgeArgsToId(isDirected, v_, w_, name) {
+ var v = '' + v_;
+ var w = '' + w_;
+ if (!isDirected && v > w) {
+ var tmp = v;
+ v = w;
+ w = tmp;
+ }
+ return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.Z(name) ? DEFAULT_EDGE_NAME : name);
+}
+
+function edgeArgsToObj(isDirected, v_, w_, name) {
+ var v = '' + v_;
+ var w = '' + w_;
+ if (!isDirected && v > w) {
+ var tmp = v;
+ v = w;
+ w = tmp;
+ }
+ var edgeObj = { v: v, w: w };
+ if (name) {
+ edgeObj.name = name;
+ }
+ return edgeObj;
+}
+
+function edgeObjToId(isDirected, edgeObj) {
+ return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name);
+}
+
+
+/***/ }),
+
+/***/ 45625:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ k: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.k)
+/* harmony export */ });
+/* unused harmony export version */
+/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52544);
+// Includes only the "core" of graphlib
+
+
+
+const version = '2.1.9-pre';
+
+
+
+
+/***/ }),
+
+/***/ 39354:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ c: () => (/* binding */ write)
+});
+
+// UNUSED EXPORTS: read
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js
+var isUndefined = __webpack_require__(49360);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules
+var _baseClone = __webpack_require__(48451);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/clone.js
+
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+function clone(value) {
+ return (0,_baseClone/* default */.Z)(value, CLONE_SYMBOLS_FLAG);
+}
+
+/* harmony default export */ const lodash_es_clone = (clone);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/map.js
+var map = __webpack_require__(43836);
+// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules
+var graph = __webpack_require__(52544);
+;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/json.js
+
+
+
+
+
+function write(g) {
+ var json = {
+ options: {
+ directed: g.isDirected(),
+ multigraph: g.isMultigraph(),
+ compound: g.isCompound(),
+ },
+ nodes: writeNodes(g),
+ edges: writeEdges(g),
+ };
+ if (!isUndefined/* default */.Z(g.graph())) {
+ json.value = lodash_es_clone(g.graph());
+ }
+ return json;
+}
+
+function writeNodes(g) {
+ return map/* default */.Z(g.nodes(), function (v) {
+ var nodeValue = g.node(v);
+ var parent = g.parent(v);
+ var node = { v: v };
+ if (!isUndefined/* default */.Z(nodeValue)) {
+ node.value = nodeValue;
+ }
+ if (!isUndefined/* default */.Z(parent)) {
+ node.parent = parent;
+ }
+ return node;
+ });
+}
+
+function writeEdges(g) {
+ return map/* default */.Z(g.edges(), function (e) {
+ var edgeValue = g.edge(e);
+ var edge = { v: e.v, w: e.w };
+ if (!isUndefined/* default */.Z(e.name)) {
+ edge.name = e.name;
+ }
+ if (!isUndefined/* default */.Z(edgeValue)) {
+ edge.value = edgeValue;
+ }
+ return edge;
+ });
+}
+
+function read(json) {
+ var g = new Graph(json.options).setGraph(json.value);
+ _.each(json.nodes, function (entry) {
+ g.setNode(entry.v, entry.value);
+ if (entry.parent) {
+ g.setParent(entry.v, entry.parent);
+ }
+ });
+ _.each(json.edges, function (entry) {
+ g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);
+ });
+ return g;
+}
+
+
+/***/ }),
+
+/***/ 63001:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ _SetCache)
+});
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules
+var _MapCache = __webpack_require__(37834);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+}
+
+/* harmony default export */ const _setCacheAdd = (setCacheAdd);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js
+/**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+function setCacheHas(value) {
+ return this.__data__.has(value);
+}
+
+/* harmony default export */ const _setCacheHas = (setCacheHas);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js
+
+
+
+
+/**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+function SetCache(values) {
+ var index = -1,
+ length = values == null ? 0 : values.length;
+
+ this.__data__ = new _MapCache/* default */.Z;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+}
+
+// Add methods to `SetCache`.
+SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd;
+SetCache.prototype.has = _setCacheHas;
+
+/* harmony default export */ const _SetCache = (SetCache);
+
+
+/***/ }),
+
+/***/ 76579:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach);
+
+
+/***/ }),
+
+/***/ 68774:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter);
+
+
+/***/ }),
+
+/***/ 74073:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap);
+
+
+/***/ }),
+
+/***/ 58694:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush);
+
+
+/***/ }),
+
+/***/ 48451:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ _baseClone)
+});
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules
+var _Stack = __webpack_require__(31667);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js
+var _arrayEach = __webpack_require__(76579);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js
+var _assignValue = __webpack_require__(72954);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js
+var _copyObject = __webpack_require__(31899);
+// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js
+var keys = __webpack_require__(17179);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js
+
+
+
+/**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssign(object, source) {
+ return object && (0,_copyObject/* default */.Z)(source, (0,keys/* default */.Z)(source), object);
+}
+
+/* harmony default export */ const _baseAssign = (baseAssign);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules
+var keysIn = __webpack_require__(32957);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js
+
+
+
+/**
+ * The base implementation of `_.assignIn` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssignIn(object, source) {
+ return object && (0,_copyObject/* default */.Z)(source, (0,keysIn/* default */.Z)(source), object);
+}
+
+/* harmony default export */ const _baseAssignIn = (baseAssignIn);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js
+var _cloneBuffer = __webpack_require__(91050);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js
+var _copyArray = __webpack_require__(87215);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js
+var _getSymbols = __webpack_require__(95695);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js
+
+
+
+/**
+ * Copies own symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+function copySymbols(source, object) {
+ return (0,_copyObject/* default */.Z)(source, (0,_getSymbols/* default */.Z)(source), object);
+}
+
+/* harmony default export */ const _copySymbols = (copySymbols);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js
+var _arrayPush = __webpack_require__(58694);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js
+var _getPrototype = __webpack_require__(12513);
+// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js
+var stubArray = __webpack_require__(60532);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js
+
+
+
+
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetSymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Creates an array of the own and inherited enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.Z : function(object) {
+ var result = [];
+ while (object) {
+ (0,_arrayPush/* default */.Z)(result, (0,_getSymbols/* default */.Z)(object));
+ object = (0,_getPrototype/* default */.Z)(object);
+ }
+ return result;
+};
+
+/* harmony default export */ const _getSymbolsIn = (getSymbolsIn);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js
+
+
+
+/**
+ * Copies own and inherited symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+function copySymbolsIn(source, object) {
+ return (0,_copyObject/* default */.Z)(source, _getSymbolsIn(source), object);
+}
+
+/* harmony default export */ const _copySymbolsIn = (copySymbolsIn);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js
+var _getAllKeys = __webpack_require__(1808);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js
+var _baseGetAllKeys = __webpack_require__(63327);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js
+
+
+
+
+/**
+ * Creates an array of own and inherited enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeysIn(object) {
+ return (0,_baseGetAllKeys/* default */.Z)(object, keysIn/* default */.Z, _getSymbolsIn);
+}
+
+/* harmony default export */ const _getAllKeysIn = (getAllKeysIn);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules
+var _getTag = __webpack_require__(83970);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+function initCloneArray(array) {
+ var length = array.length,
+ result = new array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+}
+
+/* harmony default export */ const _initCloneArray = (initCloneArray);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js
+var _cloneArrayBuffer = __webpack_require__(41884);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js
+
+
+/**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.Z)(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+}
+
+/* harmony default export */ const _cloneDataView = (cloneDataView);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js
+/** Used to match `RegExp` flags from their coerced string values. */
+var reFlags = /\w*$/;
+
+/**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+}
+
+/* harmony default export */ const _cloneRegExp = (cloneRegExp);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js
+var _Symbol = __webpack_require__(17685);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js
+
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = _Symbol/* default */.Z ? _Symbol/* default */.Z.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+/**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+}
+
+/* harmony default export */ const _cloneSymbol = (cloneSymbol);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js
+var _cloneTypedArray = __webpack_require__(12701);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js
+
+
+
+
+
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+/**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+function initCloneByTag(object, tag, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return (0,_cloneArrayBuffer/* default */.Z)(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case dataViewTag:
+ return _cloneDataView(object, isDeep);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return (0,_cloneTypedArray/* default */.Z)(object, isDeep);
+
+ case mapTag:
+ return new Ctor;
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return _cloneRegExp(object);
+
+ case setTag:
+ return new Ctor;
+
+ case symbolTag:
+ return _cloneSymbol(object);
+ }
+}
+
+/* harmony default export */ const _initCloneByTag = (initCloneByTag);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules
+var _initCloneObject = __webpack_require__(73658);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
+var isArray = __webpack_require__(27771);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules
+var isBuffer = __webpack_require__(77008);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js
+var isObjectLike = __webpack_require__(18533);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js
+
+
+
+/** `Object#toString` result references. */
+var _baseIsMap_mapTag = '[object Map]';
+
+/**
+ * The base implementation of `_.isMap` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ */
+function baseIsMap(value) {
+ return (0,isObjectLike/* default */.Z)(value) && (0,_getTag/* default */.Z)(value) == _baseIsMap_mapTag;
+}
+
+/* harmony default export */ const _baseIsMap = (baseIsMap);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js
+var _baseUnary = __webpack_require__(21162);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js
+var _nodeUtil = __webpack_require__(98351);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js
+
+
+
+
+/* Node.js helper references. */
+var nodeIsMap = _nodeUtil/* default */.Z && _nodeUtil/* default */.Z.isMap;
+
+/**
+ * Checks if `value` is classified as a `Map` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ * @example
+ *
+ * _.isMap(new Map);
+ * // => true
+ *
+ * _.isMap(new WeakMap);
+ * // => false
+ */
+var isMap = nodeIsMap ? (0,_baseUnary/* default */.Z)(nodeIsMap) : _baseIsMap;
+
+/* harmony default export */ const lodash_es_isMap = (isMap);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js
+var isObject = __webpack_require__(77226);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js
+
+
+
+/** `Object#toString` result references. */
+var _baseIsSet_setTag = '[object Set]';
+
+/**
+ * The base implementation of `_.isSet` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ */
+function baseIsSet(value) {
+ return (0,isObjectLike/* default */.Z)(value) && (0,_getTag/* default */.Z)(value) == _baseIsSet_setTag;
+}
+
+/* harmony default export */ const _baseIsSet = (baseIsSet);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js
+
+
+
+
+/* Node.js helper references. */
+var nodeIsSet = _nodeUtil/* default */.Z && _nodeUtil/* default */.Z.isSet;
+
+/**
+ * Checks if `value` is classified as a `Set` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ * @example
+ *
+ * _.isSet(new Set);
+ * // => true
+ *
+ * _.isSet(new WeakSet);
+ * // => false
+ */
+var isSet = nodeIsSet ? (0,_baseUnary/* default */.Z)(nodeIsSet) : _baseIsSet;
+
+/* harmony default export */ const lodash_es_isSet = (isSet);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ _baseClone_boolTag = '[object Boolean]',
+ _baseClone_dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ _baseClone_mapTag = '[object Map]',
+ _baseClone_numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ _baseClone_regexpTag = '[object RegExp]',
+ _baseClone_setTag = '[object Set]',
+ _baseClone_stringTag = '[object String]',
+ _baseClone_symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]';
+
+var _baseClone_arrayBufferTag = '[object ArrayBuffer]',
+ _baseClone_dataViewTag = '[object DataView]',
+ _baseClone_float32Tag = '[object Float32Array]',
+ _baseClone_float64Tag = '[object Float64Array]',
+ _baseClone_int8Tag = '[object Int8Array]',
+ _baseClone_int16Tag = '[object Int16Array]',
+ _baseClone_int32Tag = '[object Int32Array]',
+ _baseClone_uint8Tag = '[object Uint8Array]',
+ _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]',
+ _baseClone_uint16Tag = '[object Uint16Array]',
+ _baseClone_uint32Tag = '[object Uint32Array]';
+
+/** Used to identify `toStringTag` values supported by `_.clone`. */
+var cloneableTags = {};
+cloneableTags[argsTag] = cloneableTags[arrayTag] =
+cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] =
+cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] =
+cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] =
+cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] =
+cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] =
+cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] =
+cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] =
+cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] =
+cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] =
+cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true;
+cloneableTags[errorTag] = cloneableTags[funcTag] =
+cloneableTags[weakMapTag] = false;
+
+/**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Deep clone
+ * 2 - Flatten inherited properties
+ * 4 - Clone symbols
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+function baseClone(value, bitmask, customizer, key, object, stack) {
+ var result,
+ isDeep = bitmask & CLONE_DEEP_FLAG,
+ isFlat = bitmask & CLONE_FLAT_FLAG,
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
+
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!(0,isObject/* default */.Z)(value)) {
+ return value;
+ }
+ var isArr = (0,isArray/* default */.Z)(value);
+ if (isArr) {
+ result = _initCloneArray(value);
+ if (!isDeep) {
+ return (0,_copyArray/* default */.Z)(value, result);
+ }
+ } else {
+ var tag = (0,_getTag/* default */.Z)(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if ((0,isBuffer/* default */.Z)(value)) {
+ return (0,_cloneBuffer/* default */.Z)(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.Z)(value);
+ if (!isDeep) {
+ return isFlat
+ ? _copySymbolsIn(value, _baseAssignIn(result, value))
+ : _copySymbols(value, _baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = _initCloneByTag(value, tag, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new _Stack/* default */.Z);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ if (lodash_es_isSet(value)) {
+ value.forEach(function(subValue) {
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
+ });
+ } else if (lodash_es_isMap(value)) {
+ value.forEach(function(subValue, key) {
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ }
+
+ var keysFunc = isFull
+ ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.Z)
+ : (isFlat ? keysIn/* default */.Z : keys/* default */.Z);
+
+ var props = isArr ? undefined : keysFunc(value);
+ (0,_arrayEach/* default */.Z)(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ (0,_assignValue/* default */.Z)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ return result;
+}
+
+/* harmony default export */ const _baseClone = (baseClone);
+
+
+/***/ }),
+
+/***/ 49811:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ _baseEach)
+});
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js
+var _baseForOwn = __webpack_require__(2693);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js
+var isArrayLike = __webpack_require__(50585);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js
+
+
+/**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!(0,isArrayLike/* default */.Z)(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+}
+
+/* harmony default export */ const _createBaseEach = (createBaseEach);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js
+
+
+
+/**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+var baseEach = _createBaseEach(_baseForOwn/* default */.Z);
+
+/* harmony default export */ const _baseEach = (baseEach);
+
+
+/***/ }),
+
+/***/ 21692:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex);
+
+
+/***/ }),
+
+/***/ 10626:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ _baseFlatten)
+});
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js
+var _arrayPush = __webpack_require__(58694);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js
+var _Symbol = __webpack_require__(17685);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules
+var isArguments = __webpack_require__(29169);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
+var isArray = __webpack_require__(27771);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js
+
+
+
+
+/** Built-in value references. */
+var spreadableSymbol = _Symbol/* default */.Z ? _Symbol/* default */.Z.isConcatSpreadable : undefined;
+
+/**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+function isFlattenable(value) {
+ return (0,isArray/* default */.Z)(value) || (0,isArguments/* default */.Z)(value) ||
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
+}
+
+/* harmony default export */ const _isFlattenable = (isFlattenable);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js
+
+
+
+/**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = _isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ (0,_arrayPush/* default */.Z)(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+}
+
+/* harmony default export */ const _baseFlatten = (baseFlatten);
+
+
+/***/ }),
+
+/***/ 2693:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61395);
+/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17179);
+
+
+
+/**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+function baseForOwn(object, iteratee) {
+ return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z);
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn);
+
+
+/***/ }),
+
+/***/ 13317:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22823);
+/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62281);
+
+
+
+/**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+function baseGet(object, path) {
+ path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(path, object);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet);
+
+
+/***/ }),
+
+/***/ 63327:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58694);
+/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27771);
+
+
+
+/**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(result, symbolsFunc(object));
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys);
+
+
+/***/ }),
+
+/***/ 74765:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ _baseIteratee)
+});
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules
+var _Stack = __webpack_require__(31667);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules
+var _SetCache = __webpack_require__(63001);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js
+/**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+function arraySome(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/* harmony default export */ const _arraySome = (arraySome);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js
+var _cacheHas = __webpack_require__(59548);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js
+
+
+
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Check that cyclic values are equal.
+ var arrStacked = stack.get(array);
+ var othStacked = stack.get(other);
+ if (arrStacked && othStacked) {
+ return arrStacked == other && othStacked == array;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.Z : undefined;
+
+ stack.set(array, other);
+ stack.set(other, array);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!_arraySome(other, function(othValue, othIndex) {
+ if (!(0,_cacheHas/* default */.Z)(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+}
+
+/* harmony default export */ const _equalArrays = (equalArrays);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js
+var _Symbol = __webpack_require__(17685);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js
+var _Uint8Array = __webpack_require__(84073);
+// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js
+var eq = __webpack_require__(79651);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js
+/**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+}
+
+/* harmony default export */ const _mapToArray = (mapToArray);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js
+var _setToArray = __webpack_require__(6545);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js
+
+
+
+
+
+
+
+/** Used to compose bitmasks for value comparisons. */
+var _equalByTag_COMPARE_PARTIAL_FLAG = 1,
+ _equalByTag_COMPARE_UNORDERED_FLAG = 2;
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]';
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = _Symbol/* default */.Z ? _Symbol/* default */.Z.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new _Uint8Array/* default */.Z(object), new _Uint8Array/* default */.Z(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return (0,eq/* default */.Z)(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ case mapTag:
+ var convert = _mapToArray;
+
+ case setTag:
+ var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG;
+ convert || (convert = _setToArray/* default */.Z);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ stack.set(object, other);
+ var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+ stack['delete'](object);
+ return result;
+
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+}
+
+/* harmony default export */ const _equalByTag = (equalByTag);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js
+var _getAllKeys = __webpack_require__(1808);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js
+
+
+/** Used to compose bitmasks for value comparisons. */
+var _equalObjects_COMPARE_PARTIAL_FLAG = 1;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG,
+ objProps = (0,_getAllKeys/* default */.Z)(object),
+ objLength = objProps.length,
+ othProps = (0,_getAllKeys/* default */.Z)(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Check that cyclic values are equal.
+ var objStacked = stack.get(object);
+ var othStacked = stack.get(other);
+ if (objStacked && othStacked) {
+ return objStacked == other && othStacked == object;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+}
+
+/* harmony default export */ const _equalObjects = (equalObjects);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules
+var _getTag = __webpack_require__(83970);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
+var isArray = __webpack_require__(27771);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules
+var isBuffer = __webpack_require__(77008);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules
+var isTypedArray = __webpack_require__(18843);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js
+
+
+
+
+
+
+
+
+
+/** Used to compose bitmasks for value comparisons. */
+var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ objectTag = '[object Object]';
+
+/** Used for built-in method references. */
+var _baseIsEqualDeep_objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty;
+
+/**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = (0,isArray/* default */.Z)(object),
+ othIsArr = (0,isArray/* default */.Z)(other),
+ objTag = objIsArr ? arrayTag : (0,_getTag/* default */.Z)(object),
+ othTag = othIsArr ? arrayTag : (0,_getTag/* default */.Z)(other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
+
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && (0,isBuffer/* default */.Z)(object)) {
+ if (!(0,isBuffer/* default */.Z)(other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new _Stack/* default */.Z);
+ return (objIsArr || (0,isTypedArray/* default */.Z)(object))
+ ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ }
+ if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new _Stack/* default */.Z);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new _Stack/* default */.Z);
+ return _equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+}
+
+/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js
+var isObjectLike = __webpack_require__(18533);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js
+
+
+
+/**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!(0,isObjectLike/* default */.Z)(value) && !(0,isObjectLike/* default */.Z)(other))) {
+ return value !== value && other !== other;
+ }
+ return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+}
+
+/* harmony default export */ const _baseIsEqual = (baseIsEqual);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js
+
+
+
+/** Used to compose bitmasks for value comparisons. */
+var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1,
+ _baseIsMatch_COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new _Stack/* default */.Z;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+/* harmony default export */ const _baseIsMatch = (baseIsMatch);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js
+var isObject = __webpack_require__(77226);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js
+
+
+/**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+function isStrictComparable(value) {
+ return value === value && !(0,isObject/* default */.Z)(value);
+}
+
+/* harmony default export */ const _isStrictComparable = (isStrictComparable);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js
+var keys = __webpack_require__(17179);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js
+
+
+
+/**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+function getMatchData(object) {
+ var result = (0,keys/* default */.Z)(object),
+ length = result.length;
+
+ while (length--) {
+ var key = result[length],
+ value = object[key];
+
+ result[length] = [key, value, _isStrictComparable(value)];
+ }
+ return result;
+}
+
+/* harmony default export */ const _getMatchData = (getMatchData);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js
+/**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+}
+
+/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js
+
+
+
+
+/**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseMatches(source) {
+ var matchData = _getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return _matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || _baseIsMatch(object, source, matchData);
+ };
+}
+
+/* harmony default export */ const _baseMatches = (baseMatches);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js
+var _baseGet = __webpack_require__(13317);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js
+
+
+/**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+function get(object, path, defaultValue) {
+ var result = object == null ? undefined : (0,_baseGet/* default */.Z)(object, path);
+ return result === undefined ? defaultValue : result;
+}
+
+/* harmony default export */ const lodash_es_get = (get);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules
+var hasIn = __webpack_require__(75487);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js
+var _isKey = __webpack_require__(99365);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js
+var _toKey = __webpack_require__(62281);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js
+
+
+
+
+
+
+
+
+/** Used to compose bitmasks for value comparisons. */
+var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1,
+ _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseMatchesProperty(path, srcValue) {
+ if ((0,_isKey/* default */.Z)(path) && _isStrictComparable(srcValue)) {
+ return _matchesStrictComparable((0,_toKey/* default */.Z)(path), srcValue);
+ }
+ return function(object) {
+ var objValue = lodash_es_get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? (0,hasIn/* default */.Z)(object, path)
+ : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG);
+ };
+}
+
+/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js
+var identity = __webpack_require__(69203);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js
+var _baseProperty = __webpack_require__(54193);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js
+
+
+/**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+function basePropertyDeep(path) {
+ return function(object) {
+ return (0,_baseGet/* default */.Z)(object, path);
+ };
+}
+
+/* harmony default export */ const _basePropertyDeep = (basePropertyDeep);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js
+
+
+
+
+
+/**
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+function property(path) {
+ return (0,_isKey/* default */.Z)(path) ? (0,_baseProperty/* default */.Z)((0,_toKey/* default */.Z)(path)) : _basePropertyDeep(path);
+}
+
+/* harmony default export */ const lodash_es_property = (property);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js
+
+
+
+
+
+
+/**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity/* default */.Z;
+ }
+ if (typeof value == 'object') {
+ return (0,isArray/* default */.Z)(value)
+ ? _baseMatchesProperty(value[0], value[1])
+ : _baseMatches(value);
+ }
+ return lodash_es_property(value);
+}
+
+/* harmony default export */ const _baseIteratee = (baseIteratee);
+
+
+/***/ }),
+
+/***/ 21018:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49811);
+/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50585);
+
+
+
+/**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function baseMap(collection, iteratee) {
+ var index = -1,
+ result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(collection) ? Array(collection.length) : [];
+
+ (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap);
+
+
+/***/ }),
+
+/***/ 54193:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty);
+
+
+/***/ }),
+
+/***/ 59548:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/**
+ * Checks if a `cache` value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function cacheHas(cache, key) {
+ return cache.has(key);
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas);
+
+
+/***/ }),
+
+/***/ 68882:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69203);
+
+
+/**
+ * Casts `value` to `identity` if it's not a function.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Function} Returns cast function.
+ */
+function castFunction(value) {
+ return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z;
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction);
+
+
+/***/ }),
+
+/***/ 22823:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ _castPath)
+});
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
+var isArray = __webpack_require__(27771);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js
+var _isKey = __webpack_require__(99365);
+// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js
+var memoize = __webpack_require__(42454);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js
+
+
+/** Used as the maximum memoize cache size. */
+var MAX_MEMOIZE_SIZE = 500;
+
+/**
+ * A specialized version of `_.memoize` which clears the memoized function's
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+ *
+ * @private
+ * @param {Function} func The function to have its output memoized.
+ * @returns {Function} Returns the new memoized function.
+ */
+function memoizeCapped(func) {
+ var result = (0,memoize/* default */.Z)(func, function(key) {
+ if (cache.size === MAX_MEMOIZE_SIZE) {
+ cache.clear();
+ }
+ return key;
+ });
+
+ var cache = result.cache;
+ return result;
+}
+
+/* harmony default export */ const _memoizeCapped = (memoizeCapped);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js
+
+
+/** Used to match property names within property paths. */
+var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+/** Used to match backslashes in property paths. */
+var reEscapeChar = /\\(\\)?/g;
+
+/**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+var stringToPath = _memoizeCapped(function(string) {
+ var result = [];
+ if (string.charCodeAt(0) === 46 /* . */) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, subString) {
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+});
+
+/* harmony default export */ const _stringToPath = (stringToPath);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules
+var lodash_es_toString = __webpack_require__(50751);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js
+
+
+
+
+
+/**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {Array} Returns the cast property path array.
+ */
+function castPath(value, object) {
+ if ((0,isArray/* default */.Z)(value)) {
+ return value;
+ }
+ return (0,_isKey/* default */.Z)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.Z)(value));
+}
+
+/* harmony default export */ const _castPath = (castPath);
+
+
+/***/ }),
+
+/***/ 1808:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63327);
+/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95695);
+/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17179);
+
+
+
+
+/**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeys(object) {
+ return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z);
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys);
+
+
+/***/ }),
+
+/***/ 95695:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68774);
+/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60532);
+
+
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetSymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Creates an array of the own enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z : function(object) {
+ if (object == null) {
+ return [];
+ }
+ object = Object(object);
+ return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(nativeGetSymbols(object), function(symbol) {
+ return propertyIsEnumerable.call(object, symbol);
+ });
+};
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols);
+
+
+/***/ }),
+
+/***/ 16174:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22823);
+/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29169);
+/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27771);
+/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56009);
+/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1656);
+/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62281);
+
+
+
+
+
+
+
+/**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+function hasPath(object, path, hasFunc) {
+ path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(path, object);
+
+ var index = -1,
+ length = path.length,
+ result = false;
+
+ while (++index < length) {
+ var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
+ }
+ if (result || ++index != length) {
+ return result;
+ }
+ length = object == null ? 0 : object.length;
+ return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(key, length) &&
+ ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(object));
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath);
+
+
+/***/ }),
+
+/***/ 99365:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27771);
+/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72714);
+
+
+
+/** Used to match property names within property paths. */
+var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/;
+
+/**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+function isKey(value, object) {
+ if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey);
+
+
+/***/ }),
+
+/***/ 6545:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray);
+
+
+/***/ }),
+
+/***/ 62281:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72714);
+
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+function toKey(value) {
+ if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey);
+
+
+/***/ }),
+
+/***/ 3688:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69581);
+/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(79651);
+/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50439);
+/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(32957);
+
+
+
+
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(function(object, sources) {
+ object = Object(object);
+
+ var index = -1;
+ var length = sources.length;
+ var guard = length > 2 ? sources[2] : undefined;
+
+ if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(sources[0], sources[1], guard)) {
+ length = 1;
+ }
+
+ while (++index < length) {
+ var source = sources[index];
+ var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(source);
+ var propsIndex = -1;
+ var propsLength = props.length;
+
+ while (++propsIndex < propsLength) {
+ var key = props[propsIndex];
+ var value = object[key];
+
+ if (value === undefined ||
+ ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ object[key] = source[key];
+ }
+ }
+ }
+
+ return object;
+});
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults);
+
+
+/***/ }),
+
+/***/ 13445:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ lodash_es_filter)
+});
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js
+var _arrayFilter = __webpack_require__(68774);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules
+var _baseEach = __webpack_require__(49811);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js
+
+
+/**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+function baseFilter(collection, predicate) {
+ var result = [];
+ (0,_baseEach/* default */.Z)(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+}
+
+/* harmony default export */ const _baseFilter = (baseFilter);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules
+var _baseIteratee = __webpack_require__(74765);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
+var isArray = __webpack_require__(27771);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js
+
+
+
+
+
+/**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ *
+ * // Combining several predicates using `_.overEvery` or `_.overSome`.
+ * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
+ * // => objects for ['fred', 'barney']
+ */
+function filter(collection, predicate) {
+ var func = (0,isArray/* default */.Z)(collection) ? _arrayFilter/* default */.Z : _baseFilter;
+ return func(collection, (0,_baseIteratee/* default */.Z)(predicate, 3));
+}
+
+/* harmony default export */ const lodash_es_filter = (filter);
+
+
+/***/ }),
+
+/***/ 27961:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10626);
+
+
+/**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(array, 1) : [];
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten);
+
+
+/***/ }),
+
+/***/ 70870:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76579);
+/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49811);
+/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68882);
+/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27771);
+
+
+
+
+
+/**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+function forEach(collection, iteratee) {
+ var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z;
+ return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(iteratee));
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach);
+
+
+/***/ }),
+
+/***/ 17452:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ lodash_es_has)
+});
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var _baseHas_hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+function baseHas(object, key) {
+ return object != null && _baseHas_hasOwnProperty.call(object, key);
+}
+
+/* harmony default export */ const _baseHas = (baseHas);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js
+var _hasPath = __webpack_require__(16174);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js
+
+
+
+/**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+function has(object, path) {
+ return object != null && (0,_hasPath/* default */.Z)(object, path, _baseHas);
+}
+
+/* harmony default export */ const lodash_es_has = (has);
+
+
+/***/ }),
+
+/***/ 75487:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ lodash_es_hasIn)
+});
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js
+/**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+function baseHasIn(object, key) {
+ return object != null && key in Object(object);
+}
+
+/* harmony default export */ const _baseHasIn = (baseHasIn);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js
+var _hasPath = __webpack_require__(16174);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js
+
+
+
+/**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+function hasIn(object, path) {
+ return object != null && (0,_hasPath/* default */.Z)(object, path, _baseHasIn);
+}
+
+/* harmony default export */ const lodash_es_hasIn = (hasIn);
+
+
+/***/ }),
+
+/***/ 72714:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93589);
+/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18533);
+
+
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(value) == symbolTag);
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol);
+
+
+/***/ }),
+
+/***/ 49360:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+function isUndefined(value) {
+ return value === undefined;
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined);
+
+
+/***/ }),
+
+/***/ 17179:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87668);
+/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39473);
+/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50585);
+
+
+
+
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+function keys(object) {
+ return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(object);
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys);
+
+
+/***/ }),
+
+/***/ 43836:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74073);
+/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74765);
+/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21018);
+/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27771);
+
+
+
+
+
+/**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+function map(collection, iteratee) {
+ var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z;
+ return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(iteratee, 3));
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map);
+
+
+/***/ }),
+
+/***/ 61666:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ lodash_es_pick)
+});
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js
+var _baseGet = __webpack_require__(13317);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js
+var _assignValue = __webpack_require__(72954);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules
+var _castPath = __webpack_require__(22823);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js
+var _isIndex = __webpack_require__(56009);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js
+var isObject = __webpack_require__(77226);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js
+var _toKey = __webpack_require__(62281);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js
+
+
+
+
+
+
+/**
+ * The base implementation of `_.set`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+function baseSet(object, path, value, customizer) {
+ if (!(0,isObject/* default */.Z)(object)) {
+ return object;
+ }
+ path = (0,_castPath/* default */.Z)(path, object);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = (0,_toKey/* default */.Z)(path[index]),
+ newValue = value;
+
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
+ return object;
+ }
+
+ if (index != lastIndex) {
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
+ if (newValue === undefined) {
+ newValue = (0,isObject/* default */.Z)(objValue)
+ ? objValue
+ : ((0,_isIndex/* default */.Z)(path[index + 1]) ? [] : {});
+ }
+ }
+ (0,_assignValue/* default */.Z)(nested, key, newValue);
+ nested = nested[key];
+ }
+ return object;
+}
+
+/* harmony default export */ const _baseSet = (baseSet);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js
+
+
+
+
+/**
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @param {Function} predicate The function invoked per property.
+ * @returns {Object} Returns the new object.
+ */
+function basePickBy(object, paths, predicate) {
+ var index = -1,
+ length = paths.length,
+ result = {};
+
+ while (++index < length) {
+ var path = paths[index],
+ value = (0,_baseGet/* default */.Z)(object, path);
+
+ if (predicate(value, path)) {
+ _baseSet(result, (0,_castPath/* default */.Z)(path, object), value);
+ }
+ }
+ return result;
+}
+
+/* harmony default export */ const _basePickBy = (basePickBy);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules
+var hasIn = __webpack_require__(75487);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js
+
+
+
+/**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
+ */
+function basePick(object, paths) {
+ return _basePickBy(object, paths, function(value, path) {
+ return (0,hasIn/* default */.Z)(object, path);
+ });
+}
+
+/* harmony default export */ const _basePick = (basePick);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js
+var flatten = __webpack_require__(27961);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules
+var _overRest = __webpack_require__(81211);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules
+var _setToString = __webpack_require__(27227);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js
+
+
+
+
+/**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+function flatRest(func) {
+ return (0,_setToString/* default */.Z)((0,_overRest/* default */.Z)(func, undefined, flatten/* default */.Z), func + '');
+}
+
+/* harmony default export */ const _flatRest = (flatRest);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js
+
+
+
+/**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+var pick = _flatRest(function(object, paths) {
+ return object == null ? {} : _basePick(object, paths);
+});
+
+/* harmony default export */ const lodash_es_pick = (pick);
+
+
+/***/ }),
+
+/***/ 74379:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ lodash_es_range)
+});
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil,
+ nativeMax = Math.max;
+
+/**
+ * The base implementation of `_.range` and `_.rangeRight` which doesn't
+ * coerce arguments.
+ *
+ * @private
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} step The value to increment or decrement by.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the range of numbers.
+ */
+function baseRange(start, end, step, fromRight) {
+ var index = -1,
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
+ result = Array(length);
+
+ while (length--) {
+ result[fromRight ? length : ++index] = start;
+ start += step;
+ }
+ return result;
+}
+
+/* harmony default export */ const _baseRange = (baseRange);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js
+var _isIterateeCall = __webpack_require__(50439);
+// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules
+var toFinite = __webpack_require__(94099);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js
+
+
+
+
+/**
+ * Creates a `_.range` or `_.rangeRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new range function.
+ */
+function createRange(fromRight) {
+ return function(start, end, step) {
+ if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.Z)(start, end, step)) {
+ end = step = undefined;
+ }
+ // Ensure the sign of `-0` is preserved.
+ start = (0,toFinite/* default */.Z)(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = (0,toFinite/* default */.Z)(end);
+ }
+ step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.Z)(step);
+ return _baseRange(start, end, step, fromRight);
+ };
+}
+
+/* harmony default export */ const _createRange = (createRange);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js
+
+
+/**
+ * Creates an array of numbers (positive and/or negative) progressing from
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
+ * it's set to `start` with `start` then set to `0`.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.rangeRight
+ * @example
+ *
+ * _.range(4);
+ * // => [0, 1, 2, 3]
+ *
+ * _.range(-4);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 5);
+ * // => [1, 2, 3, 4]
+ *
+ * _.range(0, 20, 5);
+ * // => [0, 5, 10, 15]
+ *
+ * _.range(0, -4, -1);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.range(0);
+ * // => []
+ */
+var range = _createRange();
+
+/* harmony default export */ const lodash_es_range = (range);
+
+
+/***/ }),
+
+/***/ 92344:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ lodash_es_reduce)
+});
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js
+/**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+}
+
+/* harmony default export */ const _arrayReduce = (arrayReduce);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules
+var _baseEach = __webpack_require__(49811);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules
+var _baseIteratee = __webpack_require__(74765);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js
+/**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+}
+
+/* harmony default export */ const _baseReduce = (baseReduce);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
+var isArray = __webpack_require__(27771);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js
+
+
+
+
+
+
+/**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+function reduce(collection, iteratee, accumulator) {
+ var func = (0,isArray/* default */.Z)(collection) ? _arrayReduce : _baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, (0,_baseIteratee/* default */.Z)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.Z);
+}
+
+/* harmony default export */ const lodash_es_reduce = (reduce);
+
+
+/***/ }),
+
+/***/ 60532:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+function stubArray() {
+ return [];
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray);
+
+
+/***/ }),
+
+/***/ 94099:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ lodash_es_toFinite)
+});
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js
+/** Used to match a single whitespace character. */
+var reWhitespace = /\s/;
+
+/**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
+ * character of `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the index of the last non-whitespace character.
+ */
+function trimmedEndIndex(string) {
+ var index = string.length;
+
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
+ return index;
+}
+
+/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js
+
+
+/** Used to match leading whitespace. */
+var reTrimStart = /^\s+/;
+
+/**
+ * The base implementation of `_.trim`.
+ *
+ * @private
+ * @param {string} string The string to trim.
+ * @returns {string} Returns the trimmed string.
+ */
+function baseTrim(string) {
+ return string
+ ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '')
+ : string;
+}
+
+/* harmony default export */ const _baseTrim = (baseTrim);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js
+var isObject = __webpack_require__(77226);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js
+var isSymbol = __webpack_require__(72714);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js
+
+
+
+
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
+
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
+
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseInt = parseInt;
+
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if ((0,isSymbol/* default */.Z)(value)) {
+ return NAN;
+ }
+ if ((0,isObject/* default */.Z)(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = (0,isObject/* default */.Z)(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = _baseTrim(value);
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+}
+
+/* harmony default export */ const lodash_es_toNumber = (toNumber);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js
+
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308;
+
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = lodash_es_toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
+/* harmony default export */ const lodash_es_toFinite = (toFinite);
+
+
+/***/ }),
+
+/***/ 50751:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ lodash_es_toString)
+});
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js
+var _Symbol = __webpack_require__(17685);
+// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js
+var _arrayMap = __webpack_require__(74073);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js
+var isArray = __webpack_require__(27771);
+// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js
+var isSymbol = __webpack_require__(72714);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js
+
+
+
+
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = _Symbol/* default */.Z ? _Symbol/* default */.Z.prototype : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+/**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if ((0,isArray/* default */.Z)(value)) {
+ // Recursively convert values (susceptible to call stack limits).
+ return (0,_arrayMap/* default */.Z)(value, baseToString) + '';
+ }
+ if ((0,isSymbol/* default */.Z)(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+/* harmony default export */ const _baseToString = (baseToString);
+
+;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js
+
+
+/**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString_toString(value) {
+ return value == null ? '' : _baseToString(value);
+}
+
+/* harmony default export */ const lodash_es_toString = (toString_toString);
+
+
+/***/ }),
+
+/***/ 66749:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50751);
+
+
+/** Used to generate unique IDs. */
+var idCounter = 0;
+
+/**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+function uniqueId(prefix) {
+ var id = ++idCounter;
+ return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(prefix) + id;
+}
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId);
+
+
+/***/ }),
+
+/***/ 34148:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ Z: () => (/* binding */ lodash_es_values)
+});
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js
+var _arrayMap = __webpack_require__(74073);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js
+
+
+/**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+function baseValues(object, props) {
+ return (0,_arrayMap/* default */.Z)(props, function(key) {
+ return object[key];
+ });
+}
+
+/* harmony default export */ const _baseValues = (baseValues);
+
+// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js
+var keys = __webpack_require__(17179);
+;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js
+
+
+
+/**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+function values(object) {
+ return object == null ? [] : _baseValues(object, (0,keys/* default */.Z)(object));
+}
+
+/* harmony default export */ const lodash_es_values = (values);
+
+
+/***/ }),
+
+/***/ 64168:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ diagram: () => (/* binding */ diagram)
+/* harmony export */ });
+/* harmony import */ var _styles_9dd40fb9_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(42924);
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64218);
+/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45625);
+/* harmony import */ var _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76365);
+/* harmony import */ var _index_0980fb80_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(74852);
+/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27484);
+/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17967);
+/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22424);
+/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41644);
+/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(39354);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+const sanitizeText = (txt) => _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.e.sanitizeText(txt, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)());
+let conf = {
+ dividerMargin: 10,
+ padding: 5,
+ textHeight: 10,
+ curve: void 0
+};
+const addNamespaces = function(namespaces, g, _id, diagObj) {
+ const keys = Object.keys(namespaces);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info("keys:", keys);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info(namespaces);
+ keys.forEach(function(id) {
+ var _a, _b;
+ const vertex = namespaces[id];
+ const shape = "rect";
+ const node = {
+ shape,
+ id: vertex.id,
+ domId: vertex.domId,
+ labelText: sanitizeText(vertex.id),
+ labelStyle: "",
+ style: "fill: none; stroke: black",
+ // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
+ padding: ((_a = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart) == null ? void 0 : _a.padding) ?? ((_b = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().class) == null ? void 0 : _b.padding)
+ };
+ g.setNode(vertex.id, node);
+ addClasses(vertex.classes, g, _id, diagObj, vertex.id);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info("setNode", node);
+ });
+};
+const addClasses = function(classes, g, _id, diagObj, parent) {
+ const keys = Object.keys(classes);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info("keys:", keys);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info(classes);
+ keys.filter((id) => classes[id].parent == parent).forEach(function(id) {
+ var _a, _b;
+ const vertex = classes[id];
+ const cssClassStr = vertex.cssClasses.join(" ");
+ const styles2 = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.k)(vertex.styles);
+ const vertexText = vertex.label ?? vertex.id;
+ const radius = 0;
+ const shape = "class_box";
+ const node = {
+ labelStyle: styles2.labelStyle,
+ shape,
+ labelText: sanitizeText(vertexText),
+ classData: vertex,
+ rx: radius,
+ ry: radius,
+ class: cssClassStr,
+ style: styles2.style,
+ id: vertex.id,
+ domId: vertex.domId,
+ tooltip: diagObj.db.getTooltip(vertex.id, parent) || "",
+ haveCallback: vertex.haveCallback,
+ link: vertex.link,
+ width: vertex.type === "group" ? 500 : void 0,
+ type: vertex.type,
+ // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
+ padding: ((_a = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart) == null ? void 0 : _a.padding) ?? ((_b = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().class) == null ? void 0 : _b.padding)
+ };
+ g.setNode(vertex.id, node);
+ if (parent) {
+ g.setParent(vertex.id, parent);
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info("setNode", node);
+ });
+};
+const addNotes = function(notes, g, startEdgeId, classes) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info(notes);
+ notes.forEach(function(note, i) {
+ var _a, _b;
+ const vertex = note;
+ const cssNoteStr = "";
+ const styles2 = { labelStyle: "", style: "" };
+ const vertexText = vertex.text;
+ const radius = 0;
+ const shape = "note";
+ const node = {
+ labelStyle: styles2.labelStyle,
+ shape,
+ labelText: sanitizeText(vertexText),
+ noteData: vertex,
+ rx: radius,
+ ry: radius,
+ class: cssNoteStr,
+ style: styles2.style,
+ id: vertex.id,
+ domId: vertex.id,
+ tooltip: "",
+ type: "note",
+ // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
+ padding: ((_a = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart) == null ? void 0 : _a.padding) ?? ((_b = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().class) == null ? void 0 : _b.padding)
+ };
+ g.setNode(vertex.id, node);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info("setNode", node);
+ if (!vertex.class || !(vertex.class in classes)) {
+ return;
+ }
+ const edgeId = startEdgeId + i;
+ const edgeData = {
+ id: `edgeNote${edgeId}`,
+ //Set relationship style and line type
+ classes: "relation",
+ pattern: "dotted",
+ // Set link type for rendering
+ arrowhead: "none",
+ //Set edge extra labels
+ startLabelRight: "",
+ endLabelLeft: "",
+ //Set relation arrow types
+ arrowTypeStart: "none",
+ arrowTypeEnd: "none",
+ style: "fill:none",
+ labelStyle: "",
+ curve: (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.n)(conf.curve, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .c_6)
+ };
+ g.setEdge(vertex.id, vertex.class, edgeData, edgeId);
+ });
+};
+const addRelations = function(relations, g) {
+ const conf2 = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart;
+ let cnt = 0;
+ relations.forEach(function(edge) {
+ var _a;
+ cnt++;
+ const edgeData = {
+ //Set relationship style and line type
+ classes: "relation",
+ pattern: edge.relation.lineType == 1 ? "dashed" : "solid",
+ id: `id_${edge.id1}_${edge.id2}_${cnt}`,
+ // Set link type for rendering
+ arrowhead: edge.type === "arrow_open" ? "none" : "normal",
+ //Set edge extra labels
+ startLabelRight: edge.relationTitle1 === "none" ? "" : edge.relationTitle1,
+ endLabelLeft: edge.relationTitle2 === "none" ? "" : edge.relationTitle2,
+ //Set relation arrow types
+ arrowTypeStart: getArrowMarker(edge.relation.type1),
+ arrowTypeEnd: getArrowMarker(edge.relation.type2),
+ style: "fill:none",
+ labelStyle: "",
+ curve: (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.n)(conf2 == null ? void 0 : conf2.curve, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .c_6)
+ };
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info(edgeData, edge);
+ if (edge.style !== void 0) {
+ const styles2 = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.k)(edge.style);
+ edgeData.style = styles2.style;
+ edgeData.labelStyle = styles2.labelStyle;
+ }
+ edge.text = edge.title;
+ if (edge.text === void 0) {
+ if (edge.style !== void 0) {
+ edgeData.arrowheadStyle = "fill: #333";
+ }
+ } else {
+ edgeData.arrowheadStyle = "fill: #333";
+ edgeData.labelpos = "c";
+ if (((_a = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart) == null ? void 0 : _a.htmlLabels) ?? (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().htmlLabels) {
+ edgeData.labelType = "html";
+ edgeData.label = '' + edge.text + "";
+ } else {
+ edgeData.labelType = "text";
+ edgeData.label = edge.text.replace(_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.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:");
+ }
+ }
+ g.setEdge(edge.id1, edge.id2, edgeData, cnt);
+ });
+};
+const setConf = function(cnf) {
+ conf = {
+ ...conf,
+ ...cnf
+ };
+};
+const draw = async function(text, id, _version, diagObj) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info("Drawing class - ", id);
+ const conf2 = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart ?? (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().class;
+ const securityLevel = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel;
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info("config:", conf2);
+ const nodeSpacing = (conf2 == null ? void 0 : conf2.nodeSpacing) ?? 50;
+ const rankSpacing = (conf2 == null ? void 0 : conf2.rankSpacing) ?? 50;
+ const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Graph */ .k({
+ multigraph: true,
+ compound: true
+ }).setGraph({
+ rankdir: diagObj.db.getDirection(),
+ nodesep: nodeSpacing,
+ ranksep: rankSpacing,
+ marginx: 8,
+ marginy: 8
+ }).setDefaultEdgeLabel(function() {
+ return {};
+ });
+ const namespaces = diagObj.db.getNamespaces();
+ const classes = diagObj.db.getClasses();
+ const relations = diagObj.db.getRelations();
+ const notes = diagObj.db.getNotes();
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info(relations);
+ addNamespaces(namespaces, g, id, diagObj);
+ addClasses(classes, g, id, diagObj);
+ addRelations(relations, g);
+ addNotes(notes, g, relations.length + 1, classes);
+ let sandboxElement;
+ if (securityLevel === "sandbox") {
+ sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("#i" + id);
+ }
+ const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body");
+ const svg = root.select(`[id="${id}"]`);
+ const element = root.select("#" + id + " g");
+ await (0,_index_0980fb80_js__WEBPACK_IMPORTED_MODULE_8__.r)(
+ element,
+ g,
+ ["aggregation", "extension", "composition", "dependency", "lollipop"],
+ "classDiagram",
+ id
+ );
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.u.insertTitle(svg, "classTitleText", (conf2 == null ? void 0 : conf2.titleTopMargin) ?? 5, diagObj.db.getDiagramTitle());
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.o)(g, svg, conf2 == null ? void 0 : conf2.diagramPadding, conf2 == null ? void 0 : conf2.useMaxWidth);
+ if (!(conf2 == null ? void 0 : conf2.htmlLabels)) {
+ const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
+ 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);
+ }
+ }
+};
+function getArrowMarker(type) {
+ let marker;
+ switch (type) {
+ case 0:
+ marker = "aggregation";
+ break;
+ case 1:
+ marker = "extension";
+ break;
+ case 2:
+ marker = "composition";
+ break;
+ case 3:
+ marker = "dependency";
+ break;
+ case 4:
+ marker = "lollipop";
+ break;
+ default:
+ marker = "none";
+ }
+ return marker;
+}
+const renderer = {
+ setConf,
+ draw
+};
+const diagram = {
+ parser: _styles_9dd40fb9_js__WEBPACK_IMPORTED_MODULE_9__.p,
+ db: _styles_9dd40fb9_js__WEBPACK_IMPORTED_MODULE_9__.d,
+ renderer,
+ styles: _styles_9dd40fb9_js__WEBPACK_IMPORTED_MODULE_9__.s,
+ init: (cnf) => {
+ if (!cnf.class) {
+ cnf.class = {};
+ }
+ cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
+ _styles_9dd40fb9_js__WEBPACK_IMPORTED_MODULE_9__.d.clear();
+ }
+};
+
+
+
+/***/ }),
+
+/***/ 33183:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ a: () => (/* binding */ createText),
+ c: () => (/* binding */ computeDimensionOfText)
+});
+
+// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js
+var constructs_namespaceObject = {};
+__webpack_require__.r(constructs_namespaceObject);
+__webpack_require__.d(constructs_namespaceObject, {
+ attentionMarkers: () => (attentionMarkers),
+ contentInitial: () => (contentInitial),
+ disable: () => (disable),
+ document: () => (constructs_document),
+ flow: () => (constructs_flow),
+ flowInitial: () => (flowInitial),
+ insideSpan: () => (insideSpan),
+ string: () => (constructs_string),
+ text: () => (constructs_text)
+});
+
+// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-04fb0060.js + 8 modules
+var mermaid_04fb0060 = __webpack_require__(76365);
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js
+/**
+ * @typedef {import('mdast').Root|import('mdast').Content} Node
+ *
+ * @typedef Options
+ * Configuration (optional).
+ * @property {boolean | null | undefined} [includeImageAlt=true]
+ * Whether to use `alt` for `image`s.
+ * @property {boolean | null | undefined} [includeHtml=true]
+ * Whether to use `value` of HTML.
+ */
+
+/** @type {Options} */
+const emptyOptions = {}
+
+/**
+ * Get the text content of a node or list of nodes.
+ *
+ * Prefers the node’s plain-text fields, otherwise serializes its children,
+ * and if the given value is an array, serialize the nodes in it.
+ *
+ * @param {unknown} value
+ * Thing to serialize, typically `Node`.
+ * @param {Options | null | undefined} [options]
+ * Configuration (optional).
+ * @returns {string}
+ * Serialized `value`.
+ */
+function lib_toString(value, options) {
+ const settings = options || emptyOptions
+ const includeImageAlt =
+ typeof settings.includeImageAlt === 'boolean'
+ ? settings.includeImageAlt
+ : true
+ const includeHtml =
+ typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true
+
+ return one(value, includeImageAlt, includeHtml)
+}
+
+/**
+ * One node or several nodes.
+ *
+ * @param {unknown} value
+ * Thing to serialize.
+ * @param {boolean} includeImageAlt
+ * Include image `alt`s.
+ * @param {boolean} includeHtml
+ * Include HTML.
+ * @returns {string}
+ * Serialized node.
+ */
+function one(value, includeImageAlt, includeHtml) {
+ if (node(value)) {
+ if ('value' in value) {
+ return value.type === 'html' && !includeHtml ? '' : value.value
+ }
+
+ if (includeImageAlt && 'alt' in value && value.alt) {
+ return value.alt
+ }
+
+ if ('children' in value) {
+ return lib_all(value.children, includeImageAlt, includeHtml)
+ }
+ }
+
+ if (Array.isArray(value)) {
+ return lib_all(value, includeImageAlt, includeHtml)
+ }
+
+ return ''
+}
+
+/**
+ * Serialize a list of nodes.
+ *
+ * @param {Array} values
+ * Thing to serialize.
+ * @param {boolean} includeImageAlt
+ * Include image `alt`s.
+ * @param {boolean} includeHtml
+ * Include HTML.
+ * @returns {string}
+ * Serialized nodes.
+ */
+function lib_all(values, includeImageAlt, includeHtml) {
+ /** @type {Array} */
+ const result = []
+ let index = -1
+
+ while (++index < values.length) {
+ result[index] = one(values[index], includeImageAlt, includeHtml)
+ }
+
+ return result.join('')
+}
+
+/**
+ * Check if `value` looks like a node.
+ *
+ * @param {unknown} value
+ * Thing.
+ * @returns {value is Node}
+ * Whether `value` is a node.
+ */
+function node(value) {
+ return Boolean(value && typeof value === 'object')
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js
+/**
+ * Like `Array#splice`, but smarter for giant arrays.
+ *
+ * `Array#splice` takes all items to be inserted as individual argument which
+ * causes a stack overflow in V8 when trying to insert 100k items for instance.
+ *
+ * Otherwise, this does not return the removed items, and takes `items` as an
+ * array instead of rest parameters.
+ *
+ * @template {unknown} T
+ * Item type.
+ * @param {Array} list
+ * List to operate on.
+ * @param {number} start
+ * Index to remove/insert at (can be negative).
+ * @param {number} remove
+ * Number of items to remove.
+ * @param {Array} items
+ * Items to inject into `list`.
+ * @returns {void}
+ * Nothing.
+ */
+function splice(list, start, remove, items) {
+ const end = list.length
+ let chunkStart = 0
+ /** @type {Array} */
+ let parameters
+
+ // Make start between zero and `end` (included).
+ if (start < 0) {
+ start = -start > end ? 0 : end + start
+ } else {
+ start = start > end ? end : start
+ }
+ remove = remove > 0 ? remove : 0
+
+ // No need to chunk the items if there’s only a couple (10k) items.
+ if (items.length < 10000) {
+ parameters = Array.from(items)
+ parameters.unshift(start, remove)
+ // @ts-expect-error Hush, it’s fine.
+ list.splice(...parameters)
+ } else {
+ // Delete `remove` items starting from `start`
+ if (remove) list.splice(start, remove)
+
+ // Insert the items in chunks to not cause stack overflows.
+ while (chunkStart < items.length) {
+ parameters = items.slice(chunkStart, chunkStart + 10000)
+ parameters.unshift(start, 0)
+ // @ts-expect-error Hush, it’s fine.
+ list.splice(...parameters)
+ chunkStart += 10000
+ start += 10000
+ }
+ }
+}
+
+/**
+ * Append `items` (an array) at the end of `list` (another array).
+ * When `list` was empty, returns `items` instead.
+ *
+ * This prevents a potentially expensive operation when `list` is empty,
+ * and adds items in batches to prevent V8 from hanging.
+ *
+ * @template {unknown} T
+ * Item type.
+ * @param {Array} list
+ * List to operate on.
+ * @param {Array} items
+ * Items to add to `list`.
+ * @returns {Array}
+ * Either `list` or `items`.
+ */
+function push(list, items) {
+ if (list.length > 0) {
+ splice(list, list.length, 0, items)
+ return list
+ }
+ return items
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js
+/**
+ * @typedef {import('micromark-util-types').Extension} Extension
+ * @typedef {import('micromark-util-types').Handles} Handles
+ * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension
+ * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension
+ */
+
+
+
+const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty
+
+/**
+ * Combine multiple syntax extensions into one.
+ *
+ * @param {Array} extensions
+ * List of syntax extensions.
+ * @returns {NormalizedExtension}
+ * A single combined extension.
+ */
+function combineExtensions(extensions) {
+ /** @type {NormalizedExtension} */
+ const all = {}
+ let index = -1
+
+ while (++index < extensions.length) {
+ syntaxExtension(all, extensions[index])
+ }
+
+ return all
+}
+
+/**
+ * Merge `extension` into `all`.
+ *
+ * @param {NormalizedExtension} all
+ * Extension to merge into.
+ * @param {Extension} extension
+ * Extension to merge.
+ * @returns {void}
+ */
+function syntaxExtension(all, extension) {
+ /** @type {keyof Extension} */
+ let hook
+
+ for (hook in extension) {
+ const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined
+ /** @type {Record} */
+ const left = maybe || (all[hook] = {})
+ /** @type {Record | undefined} */
+ const right = extension[hook]
+ /** @type {string} */
+ let code
+
+ if (right) {
+ for (code in right) {
+ if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = []
+ const value = right[code]
+ constructs(
+ // @ts-expect-error Looks like a list.
+ left[code],
+ Array.isArray(value) ? value : value ? [value] : []
+ )
+ }
+ }
+ }
+}
+
+/**
+ * Merge `list` into `existing` (both lists of constructs).
+ * Mutates `existing`.
+ *
+ * @param {Array} existing
+ * @param {Array} list
+ * @returns {void}
+ */
+function constructs(existing, list) {
+ let index = -1
+ /** @type {Array} */
+ const before = []
+
+ while (++index < list.length) {
+ // @ts-expect-error Looks like an object.
+ ;(list[index].add === 'after' ? existing : before).push(list[index])
+ }
+
+ splice(existing, 0, 0, before)
+}
+
+/**
+ * Combine multiple HTML extensions into one.
+ *
+ * @param {Array} htmlExtensions
+ * List of HTML extensions.
+ * @returns {HtmlExtension}
+ * A single combined HTML extension.
+ */
+function combineHtmlExtensions(htmlExtensions) {
+ /** @type {HtmlExtension} */
+ const handlers = {}
+ let index = -1
+
+ while (++index < htmlExtensions.length) {
+ htmlExtension(handlers, htmlExtensions[index])
+ }
+
+ return handlers
+}
+
+/**
+ * Merge `extension` into `all`.
+ *
+ * @param {HtmlExtension} all
+ * Extension to merge into.
+ * @param {HtmlExtension} extension
+ * Extension to merge.
+ * @returns {void}
+ */
+function htmlExtension(all, extension) {
+ /** @type {keyof HtmlExtension} */
+ let hook
+
+ for (hook in extension) {
+ const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined
+ const left = maybe || (all[hook] = {})
+ const right = extension[hook]
+ /** @type {keyof Handles} */
+ let type
+
+ if (right) {
+ for (type in right) {
+ // @ts-expect-error assume document vs regular handler are managed correctly.
+ left[type] = right[type]
+ }
+ }
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/micromark-util-character/lib/unicode-punctuation-regex.js
+// This module is generated by `script/`.
+//
+// CommonMark handles attention (emphasis, strong) markers based on what comes
+// before or after them.
+// One such difference is if those characters are Unicode punctuation.
+// This script is generated from the Unicode data.
+
+/**
+ * Regular expression that matches a unicode punctuation character.
+ */
+const unicodePunctuationRegex =
+ /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/
+
+;// CONCATENATED MODULE: ./node_modules/micromark-util-character/index.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ */
+
+
+
+/**
+ * Check whether the character code represents an ASCII alpha (`a` through `z`,
+ * case insensitive).
+ *
+ * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha.
+ *
+ * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`)
+ * to U+005A (`Z`).
+ *
+ * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`)
+ * to U+007A (`z`).
+ *
+ * @param code
+ * Code.
+ * @returns
+ * Whether it matches.
+ */
+const asciiAlpha = regexCheck(/[A-Za-z]/)
+
+/**
+ * Check whether the character code represents an ASCII alphanumeric (`a`
+ * through `z`, case insensitive, or `0` through `9`).
+ *
+ * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha
+ * (see `asciiAlpha`).
+ *
+ * @param code
+ * Code.
+ * @returns
+ * Whether it matches.
+ */
+const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/)
+
+/**
+ * Check whether the character code represents an ASCII atext.
+ *
+ * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in
+ * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`),
+ * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F
+ * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E
+ * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE
+ * (`{`) to U+007E TILDE (`~`).
+ *
+ * See:
+ * **\[RFC5322]**:
+ * [Internet Message Format](https://tools.ietf.org/html/rfc5322).
+ * P. Resnick.
+ * IETF.
+ *
+ * @param code
+ * Code.
+ * @returns
+ * Whether it matches.
+ */
+const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/)
+
+/**
+ * Check whether a character code is an ASCII control character.
+ *
+ * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)
+ * to U+001F (US), or U+007F (DEL).
+ *
+ * @param {Code} code
+ * Code.
+ * @returns {boolean}
+ * Whether it matches.
+ */
+function asciiControl(code) {
+ return (
+ // Special whitespace codes (which have negative values), C0 and Control
+ // character DEL
+ code !== null && (code < 32 || code === 127)
+ )
+}
+
+/**
+ * Check whether the character code represents an ASCII digit (`0` through `9`).
+ *
+ * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to
+ * U+0039 (`9`).
+ *
+ * @param code
+ * Code.
+ * @returns
+ * Whether it matches.
+ */
+const asciiDigit = regexCheck(/\d/)
+
+/**
+ * Check whether the character code represents an ASCII hex digit (`a` through
+ * `f`, case insensitive, or `0` through `9`).
+ *
+ * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex
+ * digit, or an ASCII lower hex digit.
+ *
+ * An **ASCII upper hex digit** is a character in the inclusive range U+0041
+ * (`A`) to U+0046 (`F`).
+ *
+ * An **ASCII lower hex digit** is a character in the inclusive range U+0061
+ * (`a`) to U+0066 (`f`).
+ *
+ * @param code
+ * Code.
+ * @returns
+ * Whether it matches.
+ */
+const asciiHexDigit = regexCheck(/[\dA-Fa-f]/)
+
+/**
+ * Check whether the character code represents ASCII punctuation.
+ *
+ * An **ASCII punctuation** is a character in the inclusive ranges U+0021
+ * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT
+ * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT
+ * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`).
+ *
+ * @param code
+ * Code.
+ * @returns
+ * Whether it matches.
+ */
+const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/)
+
+/**
+ * Check whether a character code is a markdown line ending.
+ *
+ * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN
+ * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).
+ *
+ * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE
+ * RETURN (CR) are replaced by these virtual characters depending on whether
+ * they occurred together.
+ *
+ * @param {Code} code
+ * Code.
+ * @returns {boolean}
+ * Whether it matches.
+ */
+function markdownLineEnding(code) {
+ return code !== null && code < -2
+}
+
+/**
+ * Check whether a character code is a markdown line ending (see
+ * `markdownLineEnding`) or markdown space (see `markdownSpace`).
+ *
+ * @param {Code} code
+ * Code.
+ * @returns {boolean}
+ * Whether it matches.
+ */
+function markdownLineEndingOrSpace(code) {
+ return code !== null && (code < 0 || code === 32)
+}
+
+/**
+ * Check whether a character code is a markdown space.
+ *
+ * A **markdown space** is the concrete character U+0020 SPACE (SP) and the
+ * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).
+ *
+ * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is
+ * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL
+ * SPACE (VS) characters, depending on the column at which the tab occurred.
+ *
+ * @param {Code} code
+ * Code.
+ * @returns {boolean}
+ * Whether it matches.
+ */
+function markdownSpace(code) {
+ return code === -2 || code === -1 || code === 32
+}
+
+// Size note: removing ASCII from the regex and using `asciiPunctuation` here
+// In fact adds to the bundle size.
+/**
+ * Check whether the character code represents Unicode punctuation.
+ *
+ * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation,
+ * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf`
+ * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po`
+ * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII
+ * punctuation (see `asciiPunctuation`).
+ *
+ * See:
+ * **\[UNICODE]**:
+ * [The Unicode Standard](https://www.unicode.org/versions/).
+ * Unicode Consortium.
+ *
+ * @param code
+ * Code.
+ * @returns
+ * Whether it matches.
+ */
+const unicodePunctuation = regexCheck(unicodePunctuationRegex)
+
+/**
+ * Check whether the character code represents Unicode whitespace.
+ *
+ * Note that this does handle micromark specific markdown whitespace characters.
+ * See `markdownLineEndingOrSpace` to check that.
+ *
+ * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator,
+ * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF),
+ * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**).
+ *
+ * See:
+ * **\[UNICODE]**:
+ * [The Unicode Standard](https://www.unicode.org/versions/).
+ * Unicode Consortium.
+ *
+ * @param code
+ * Code.
+ * @returns
+ * Whether it matches.
+ */
+const unicodeWhitespace = regexCheck(/\s/)
+
+/**
+ * Create a code check from a regex.
+ *
+ * @param {RegExp} regex
+ * @returns {(code: Code) => boolean}
+ */
+function regexCheck(regex) {
+ return check
+
+ /**
+ * Check whether a code matches the bound regex.
+ *
+ * @param {Code} code
+ * Character code.
+ * @returns {boolean}
+ * Whether the character code matches the bound regex.
+ */
+ function check(code) {
+ return code !== null && regex.test(String.fromCharCode(code))
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/micromark-factory-space/index.js
+/**
+ * @typedef {import('micromark-util-types').Effects} Effects
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenType} TokenType
+ */
+
+
+
+// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`.
+
+/**
+ * Parse spaces and tabs.
+ *
+ * There is no `nok` parameter:
+ *
+ * * 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 `markdownSpace(code)` right
+ * before using `factorySpace`
+ *
+ * ###### Examples
+ *
+ * Where `␉` represents a tab (plus how much it expands) and `␠` represents a
+ * single space.
+ *
+ * ```markdown
+ * ␉
+ * ␠␠␠␠
+ * ␉␠
+ * ```
+ *
+ * @param {Effects} effects
+ * Context.
+ * @param {State} ok
+ * State switched to when successful.
+ * @param {TokenType} type
+ * Type (`' \t'`).
+ * @param {number | undefined} [max=Infinity]
+ * Max (exclusive).
+ * @returns
+ * Start state.
+ */
+function factorySpace(effects, ok, type, max) {
+ const limit = max ? max - 1 : Number.POSITIVE_INFINITY
+ let size = 0
+ return start
+
+ /** @type {State} */
+ function start(code) {
+ if (markdownSpace(code)) {
+ effects.enter(type)
+ return prefix(code)
+ }
+ return ok(code)
+ }
+
+ /** @type {State} */
+ function prefix(code) {
+ if (markdownSpace(code) && size++ < limit) {
+ effects.consume(code)
+ return prefix
+ }
+ effects.exit(type)
+ return ok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js
+/**
+ * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
+ * @typedef {import('micromark-util-types').Initializer} Initializer
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ */
+
+
+
+/** @type {InitialConstruct} */
+const content = {
+ tokenize: initializeContent
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Initializer}
+ */
+function initializeContent(effects) {
+ const contentStart = effects.attempt(
+ this.parser.constructs.contentInitial,
+ afterContentStartConstruct,
+ paragraphInitial
+ )
+ /** @type {Token} */
+ let previous
+ return contentStart
+
+ /** @type {State} */
+ function afterContentStartConstruct(code) {
+ if (code === null) {
+ effects.consume(code)
+ return
+ }
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return factorySpace(effects, contentStart, 'linePrefix')
+ }
+
+ /** @type {State} */
+ function paragraphInitial(code) {
+ effects.enter('paragraph')
+ return lineStart(code)
+ }
+
+ /** @type {State} */
+ function lineStart(code) {
+ const token = effects.enter('chunkText', {
+ contentType: 'text',
+ previous
+ })
+ if (previous) {
+ previous.next = token
+ }
+ previous = token
+ return data(code)
+ }
+
+ /** @type {State} */
+ function data(code) {
+ if (code === null) {
+ effects.exit('chunkText')
+ effects.exit('paragraph')
+ effects.consume(code)
+ return
+ }
+ if (markdownLineEnding(code)) {
+ effects.consume(code)
+ effects.exit('chunkText')
+ return lineStart
+ }
+
+ // Data.
+ effects.consume(code)
+ return data
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').ContainerState} ContainerState
+ * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
+ * @typedef {import('micromark-util-types').Initializer} Initializer
+ * @typedef {import('micromark-util-types').Point} Point
+ * @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
+ */
+
+/**
+ * @typedef {[Construct, ContainerState]} StackItem
+ */
+
+
+
+
+/** @type {InitialConstruct} */
+const document_document = {
+ tokenize: initializeDocument
+}
+
+/** @type {Construct} */
+const containerConstruct = {
+ tokenize: tokenizeContainer
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Initializer}
+ */
+function initializeDocument(effects) {
+ const self = this
+ /** @type {Array} */
+ const stack = []
+ let continued = 0
+ /** @type {TokenizeContext | undefined} */
+ let childFlow
+ /** @type {Token | undefined} */
+ let childToken
+ /** @type {number} */
+ let lineStartOffset
+ return start
+
+ /** @type {State} */
+ function start(code) {
+ // First we iterate through the open blocks, starting with the root
+ // document, and descending through last children down to the last open
+ // block.
+ // Each block imposes a condition that the line must satisfy if the block is
+ // to remain open.
+ // For example, a block quote requires a `>` character.
+ // A paragraph requires a non-blank line.
+ // In this phase we may match all or just some of the open blocks.
+ // But we cannot close unmatched blocks yet, because we may have a lazy
+ // continuation line.
+ if (continued < stack.length) {
+ const item = stack[continued]
+ self.containerState = item[1]
+ return effects.attempt(
+ item[0].continuation,
+ documentContinue,
+ checkNewContainers
+ )(code)
+ }
+
+ // Done.
+ return checkNewContainers(code)
+ }
+
+ /** @type {State} */
+ function documentContinue(code) {
+ continued++
+
+ // Note: this field is called `_closeFlow` but it also closes containers.
+ // Perhaps a good idea to rename it but it’s already used in the wild by
+ // extensions.
+ if (self.containerState._closeFlow) {
+ self.containerState._closeFlow = undefined
+ if (childFlow) {
+ closeFlow()
+ }
+
+ // Note: this algorithm for moving events around is similar to the
+ // algorithm when dealing with lazy lines in `writeToChild`.
+ const indexBeforeExits = self.events.length
+ let indexBeforeFlow = indexBeforeExits
+ /** @type {Point | undefined} */
+ let point
+
+ // Find the flow chunk.
+ while (indexBeforeFlow--) {
+ if (
+ self.events[indexBeforeFlow][0] === 'exit' &&
+ self.events[indexBeforeFlow][1].type === 'chunkFlow'
+ ) {
+ point = self.events[indexBeforeFlow][1].end
+ break
+ }
+ }
+ exitContainers(continued)
+
+ // Fix positions.
+ let index = indexBeforeExits
+ while (index < self.events.length) {
+ self.events[index][1].end = Object.assign({}, point)
+ index++
+ }
+
+ // Inject the exits earlier (they’re still also at the end).
+ splice(
+ self.events,
+ indexBeforeFlow + 1,
+ 0,
+ self.events.slice(indexBeforeExits)
+ )
+
+ // Discard the duplicate exits.
+ self.events.length = index
+ return checkNewContainers(code)
+ }
+ return start(code)
+ }
+
+ /** @type {State} */
+ function checkNewContainers(code) {
+ // Next, after consuming the continuation markers for existing blocks, we
+ // look for new block starts (e.g. `>` for a block quote).
+ // If we encounter a new block start, we close any blocks unmatched in
+ // step 1 before creating the new block as a child of the last matched
+ // block.
+ if (continued === stack.length) {
+ // No need to `check` whether there’s a container, of `exitContainers`
+ // would be moot.
+ // We can instead immediately `attempt` to parse one.
+ if (!childFlow) {
+ return documentContinued(code)
+ }
+
+ // If we have concrete content, such as block HTML or fenced code,
+ // we can’t have containers “pierce” into them, so we can immediately
+ // start.
+ if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {
+ return flowStart(code)
+ }
+
+ // If we do have flow, it could still be a blank line,
+ // but we’d be interrupting it w/ a new container if there’s a current
+ // construct.
+ // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer
+ // needed in micromark-extension-gfm-table@1.0.6).
+ self.interrupt = Boolean(
+ childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack
+ )
+ }
+
+ // Check if there is a new container.
+ self.containerState = {}
+ return effects.check(
+ containerConstruct,
+ thereIsANewContainer,
+ thereIsNoNewContainer
+ )(code)
+ }
+
+ /** @type {State} */
+ function thereIsANewContainer(code) {
+ if (childFlow) closeFlow()
+ exitContainers(continued)
+ return documentContinued(code)
+ }
+
+ /** @type {State} */
+ function thereIsNoNewContainer(code) {
+ self.parser.lazy[self.now().line] = continued !== stack.length
+ lineStartOffset = self.now().offset
+ return flowStart(code)
+ }
+
+ /** @type {State} */
+ function documentContinued(code) {
+ // Try new containers.
+ self.containerState = {}
+ return effects.attempt(
+ containerConstruct,
+ containerContinue,
+ flowStart
+ )(code)
+ }
+
+ /** @type {State} */
+ function containerContinue(code) {
+ continued++
+ stack.push([self.currentConstruct, self.containerState])
+ // Try another.
+ return documentContinued(code)
+ }
+
+ /** @type {State} */
+ function flowStart(code) {
+ if (code === null) {
+ if (childFlow) closeFlow()
+ exitContainers(0)
+ effects.consume(code)
+ return
+ }
+ childFlow = childFlow || self.parser.flow(self.now())
+ effects.enter('chunkFlow', {
+ contentType: 'flow',
+ previous: childToken,
+ _tokenizer: childFlow
+ })
+ return flowContinue(code)
+ }
+
+ /** @type {State} */
+ function flowContinue(code) {
+ if (code === null) {
+ writeToChild(effects.exit('chunkFlow'), true)
+ exitContainers(0)
+ effects.consume(code)
+ return
+ }
+ if (markdownLineEnding(code)) {
+ effects.consume(code)
+ writeToChild(effects.exit('chunkFlow'))
+ // Get ready for the next line.
+ continued = 0
+ self.interrupt = undefined
+ return start
+ }
+ effects.consume(code)
+ return flowContinue
+ }
+
+ /**
+ * @param {Token} token
+ * @param {boolean | undefined} [eof]
+ * @returns {void}
+ */
+ function writeToChild(token, eof) {
+ const stream = self.sliceStream(token)
+ if (eof) stream.push(null)
+ token.previous = childToken
+ if (childToken) childToken.next = token
+ childToken = token
+ childFlow.defineSkip(token.start)
+ childFlow.write(stream)
+
+ // Alright, so we just added a lazy line:
+ //
+ // ```markdown
+ // > a
+ // b.
+ //
+ // Or:
+ //
+ // > ~~~c
+ // d
+ //
+ // Or:
+ //
+ // > | e |
+ // f
+ // ```
+ //
+ // The construct in the second example (fenced code) does not accept lazy
+ // lines, so it marked itself as done at the end of its first line, and
+ // then the content construct parses `d`.
+ // Most constructs in markdown match on the first line: if the first line
+ // forms a construct, a non-lazy line can’t “unmake” it.
+ //
+ // The construct in the third example is potentially a GFM table, and
+ // those are *weird*.
+ // It *could* be a table, from the first line, if the following line
+ // matches a condition.
+ // In this case, that second line is lazy, which “unmakes” the first line
+ // and turns the whole into one content block.
+ //
+ // We’ve now parsed the non-lazy and the lazy line, and can figure out
+ // whether the lazy line started a new flow block.
+ // If it did, we exit the current containers between the two flow blocks.
+ if (self.parser.lazy[token.start.line]) {
+ let index = childFlow.events.length
+ while (index--) {
+ if (
+ // The token starts before the line ending…
+ childFlow.events[index][1].start.offset < lineStartOffset &&
+ // …and either is not ended yet…
+ (!childFlow.events[index][1].end ||
+ // …or ends after it.
+ childFlow.events[index][1].end.offset > lineStartOffset)
+ ) {
+ // Exit: there’s still something open, which means it’s a lazy line
+ // part of something.
+ return
+ }
+ }
+
+ // Note: this algorithm for moving events around is similar to the
+ // algorithm when closing flow in `documentContinue`.
+ const indexBeforeExits = self.events.length
+ let indexBeforeFlow = indexBeforeExits
+ /** @type {boolean | undefined} */
+ let seen
+ /** @type {Point | undefined} */
+ let point
+
+ // Find the previous chunk (the one before the lazy line).
+ while (indexBeforeFlow--) {
+ if (
+ self.events[indexBeforeFlow][0] === 'exit' &&
+ self.events[indexBeforeFlow][1].type === 'chunkFlow'
+ ) {
+ if (seen) {
+ point = self.events[indexBeforeFlow][1].end
+ break
+ }
+ seen = true
+ }
+ }
+ exitContainers(continued)
+
+ // Fix positions.
+ index = indexBeforeExits
+ while (index < self.events.length) {
+ self.events[index][1].end = Object.assign({}, point)
+ index++
+ }
+
+ // Inject the exits earlier (they’re still also at the end).
+ splice(
+ self.events,
+ indexBeforeFlow + 1,
+ 0,
+ self.events.slice(indexBeforeExits)
+ )
+
+ // Discard the duplicate exits.
+ self.events.length = index
+ }
+ }
+
+ /**
+ * @param {number} size
+ * @returns {void}
+ */
+ function exitContainers(size) {
+ let index = stack.length
+
+ // Exit open containers.
+ while (index-- > size) {
+ const entry = stack[index]
+ self.containerState = entry[1]
+ entry[0].exit.call(self, effects)
+ }
+ stack.length = size
+ }
+ function closeFlow() {
+ childFlow.write([null])
+ childToken = undefined
+ childFlow = undefined
+ self.containerState._closeFlow = undefined
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeContainer(effects, ok, nok) {
+ // Always populated by defaults.
+
+ return factorySpace(
+ effects,
+ effects.attempt(this.parser.constructs.document, ok, nok),
+ 'linePrefix',
+ this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4
+ )
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.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 blankLine = {
+ tokenize: tokenizeBlankLine,
+ partial: true
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeBlankLine(effects, ok, nok) {
+ return start
+
+ /**
+ * Start of blank line.
+ *
+ * > 👉 **Note**: `␠` represents a space character.
+ *
+ * ```markdown
+ * > | ␠␠␊
+ * ^
+ * > | ␊
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ return markdownSpace(code)
+ ? factorySpace(effects, after, 'linePrefix')(code)
+ : after(code)
+ }
+
+ /**
+ * At eof/eol, after optional whitespace.
+ *
+ * > 👉 **Note**: `␠` represents a space character.
+ *
+ * ```markdown
+ * > | ␠␠␊
+ * ^
+ * > | ␊
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function after(code) {
+ return code === null || markdownLineEnding(code) ? ok(code) : nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-subtokenize/index.js
+/**
+ * @typedef {import('micromark-util-types').Chunk} Chunk
+ * @typedef {import('micromark-util-types').Event} Event
+ * @typedef {import('micromark-util-types').Token} Token
+ */
+
+
+/**
+ * Tokenize subcontent.
+ *
+ * @param {Array} events
+ * List of events.
+ * @returns {boolean}
+ * Whether subtokens were found.
+ */
+function subtokenize(events) {
+ /** @type {Record} */
+ const jumps = {}
+ let index = -1
+ /** @type {Event} */
+ let event
+ /** @type {number | undefined} */
+ let lineIndex
+ /** @type {number} */
+ let otherIndex
+ /** @type {Event} */
+ let otherEvent
+ /** @type {Array} */
+ let parameters
+ /** @type {Array} */
+ let subevents
+ /** @type {boolean | undefined} */
+ let more
+ while (++index < events.length) {
+ while (index in jumps) {
+ index = jumps[index]
+ }
+ event = events[index]
+
+ // Add a hook for the GFM tasklist extension, which needs to know if text
+ // is in the first content of a list item.
+ if (
+ index &&
+ event[1].type === 'chunkFlow' &&
+ events[index - 1][1].type === 'listItemPrefix'
+ ) {
+ subevents = event[1]._tokenizer.events
+ otherIndex = 0
+ if (
+ otherIndex < subevents.length &&
+ subevents[otherIndex][1].type === 'lineEndingBlank'
+ ) {
+ otherIndex += 2
+ }
+ if (
+ otherIndex < subevents.length &&
+ subevents[otherIndex][1].type === 'content'
+ ) {
+ while (++otherIndex < subevents.length) {
+ if (subevents[otherIndex][1].type === 'content') {
+ break
+ }
+ if (subevents[otherIndex][1].type === 'chunkText') {
+ subevents[otherIndex][1]._isInFirstContentOfListItem = true
+ otherIndex++
+ }
+ }
+ }
+ }
+
+ // Enter.
+ if (event[0] === 'enter') {
+ if (event[1].contentType) {
+ Object.assign(jumps, subcontent(events, index))
+ index = jumps[index]
+ more = true
+ }
+ }
+ // Exit.
+ else if (event[1]._container) {
+ otherIndex = index
+ lineIndex = undefined
+ while (otherIndex--) {
+ otherEvent = events[otherIndex]
+ if (
+ otherEvent[1].type === 'lineEnding' ||
+ otherEvent[1].type === 'lineEndingBlank'
+ ) {
+ if (otherEvent[0] === 'enter') {
+ if (lineIndex) {
+ events[lineIndex][1].type = 'lineEndingBlank'
+ }
+ otherEvent[1].type = 'lineEnding'
+ lineIndex = otherIndex
+ }
+ } else {
+ break
+ }
+ }
+ if (lineIndex) {
+ // Fix position.
+ event[1].end = Object.assign({}, events[lineIndex][1].start)
+
+ // Switch container exit w/ line endings.
+ parameters = events.slice(lineIndex, index)
+ parameters.unshift(event)
+ splice(events, lineIndex, index - lineIndex + 1, parameters)
+ }
+ }
+ }
+ return !more
+}
+
+/**
+ * Tokenize embedded tokens.
+ *
+ * @param {Array} events
+ * @param {number} eventIndex
+ * @returns {Record}
+ */
+function subcontent(events, eventIndex) {
+ const token = events[eventIndex][1]
+ const context = events[eventIndex][2]
+ let startPosition = eventIndex - 1
+ /** @type {Array} */
+ const startPositions = []
+ const tokenizer =
+ token._tokenizer || context.parser[token.contentType](token.start)
+ const childEvents = tokenizer.events
+ /** @type {Array<[number, number]>} */
+ const jumps = []
+ /** @type {Record} */
+ const gaps = {}
+ /** @type {Array} */
+ let stream
+ /** @type {Token | undefined} */
+ let previous
+ let index = -1
+ /** @type {Token | undefined} */
+ let current = token
+ let adjust = 0
+ let start = 0
+ const breaks = [start]
+
+ // Loop forward through the linked tokens to pass them in order to the
+ // subtokenizer.
+ while (current) {
+ // Find the position of the event for this token.
+ while (events[++startPosition][1] !== current) {
+ // Empty.
+ }
+ startPositions.push(startPosition)
+ if (!current._tokenizer) {
+ stream = context.sliceStream(current)
+ if (!current.next) {
+ stream.push(null)
+ }
+ if (previous) {
+ tokenizer.defineSkip(current.start)
+ }
+ if (current._isInFirstContentOfListItem) {
+ tokenizer._gfmTasklistFirstContentOfListItem = true
+ }
+ tokenizer.write(stream)
+ if (current._isInFirstContentOfListItem) {
+ tokenizer._gfmTasklistFirstContentOfListItem = undefined
+ }
+ }
+
+ // Unravel the next token.
+ previous = current
+ current = current.next
+ }
+
+ // Now, loop back through all events (and linked tokens), to figure out which
+ // parts belong where.
+ current = token
+ while (++index < childEvents.length) {
+ if (
+ // Find a void token that includes a break.
+ childEvents[index][0] === 'exit' &&
+ childEvents[index - 1][0] === 'enter' &&
+ childEvents[index][1].type === childEvents[index - 1][1].type &&
+ childEvents[index][1].start.line !== childEvents[index][1].end.line
+ ) {
+ start = index + 1
+ breaks.push(start)
+ // Help GC.
+ current._tokenizer = undefined
+ current.previous = undefined
+ current = current.next
+ }
+ }
+
+ // Help GC.
+ tokenizer.events = []
+
+ // If there’s one more token (which is the cases for lines that end in an
+ // EOF), that’s perfect: the last point we found starts it.
+ // If there isn’t then make sure any remaining content is added to it.
+ if (current) {
+ // Help GC.
+ current._tokenizer = undefined
+ current.previous = undefined
+ } else {
+ breaks.pop()
+ }
+
+ // Now splice the events from the subtokenizer into the current events,
+ // moving back to front so that splice indices aren’t affected.
+ index = breaks.length
+ while (index--) {
+ const slice = childEvents.slice(breaks[index], breaks[index + 1])
+ const start = startPositions.pop()
+ jumps.unshift([start, start + slice.length - 1])
+ splice(events, start, 2, slice)
+ }
+ index = -1
+ while (++index < jumps.length) {
+ gaps[adjust + jumps[index][0]] = adjust + jumps[index][1]
+ adjust += jumps[index][1] - jumps[index][0] - 1
+ }
+ return gaps
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.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
+ */
+
+
+
+
+/**
+ * No name because it must not be turned off.
+ * @type {Construct}
+ */
+const content_content = {
+ tokenize: tokenizeContent,
+ resolve: resolveContent
+}
+
+/** @type {Construct} */
+const continuationConstruct = {
+ tokenize: tokenizeContinuation,
+ partial: true
+}
+
+/**
+ * Content is transparent: it’s parsed right now. That way, definitions are also
+ * parsed right now: before text in paragraphs (specifically, media) are parsed.
+ *
+ * @type {Resolver}
+ */
+function resolveContent(events) {
+ subtokenize(events)
+ return events
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeContent(effects, ok) {
+ /** @type {Token | undefined} */
+ let previous
+ return chunkStart
+
+ /**
+ * Before a content chunk.
+ *
+ * ```markdown
+ * > | abc
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function chunkStart(code) {
+ effects.enter('content')
+ previous = effects.enter('chunkContent', {
+ contentType: 'content'
+ })
+ return chunkInside(code)
+ }
+
+ /**
+ * In a content chunk.
+ *
+ * ```markdown
+ * > | abc
+ * ^^^
+ * ```
+ *
+ * @type {State}
+ */
+ function chunkInside(code) {
+ if (code === null) {
+ return contentEnd(code)
+ }
+
+ // To do: in `markdown-rs`, each line is parsed on its own, and everything
+ // is stitched together resolving.
+ if (markdownLineEnding(code)) {
+ return effects.check(
+ continuationConstruct,
+ contentContinue,
+ contentEnd
+ )(code)
+ }
+
+ // Data.
+ effects.consume(code)
+ return chunkInside
+ }
+
+ /**
+ *
+ *
+ * @type {State}
+ */
+ function contentEnd(code) {
+ effects.exit('chunkContent')
+ effects.exit('content')
+ return ok(code)
+ }
+
+ /**
+ *
+ *
+ * @type {State}
+ */
+ function contentContinue(code) {
+ effects.consume(code)
+ effects.exit('chunkContent')
+ previous.next = effects.enter('chunkContent', {
+ contentType: 'content',
+ previous
+ })
+ previous = previous.next
+ return chunkInside
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeContinuation(effects, ok, nok) {
+ const self = this
+ return startLookahead
+
+ /**
+ *
+ *
+ * @type {State}
+ */
+ function startLookahead(code) {
+ effects.exit('chunkContent')
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return factorySpace(effects, prefixed, 'linePrefix')
+ }
+
+ /**
+ *
+ *
+ * @type {State}
+ */
+ function prefixed(code) {
+ if (code === null || markdownLineEnding(code)) {
+ return nok(code)
+ }
+
+ // Always populated by defaults.
+
+ const tail = self.events[self.events.length - 1]
+ if (
+ !self.parser.constructs.disable.null.includes('codeIndented') &&
+ tail &&
+ tail[1].type === 'linePrefix' &&
+ tail[2].sliceSerialize(tail[1], true).length >= 4
+ ) {
+ return ok(code)
+ }
+ return effects.interrupt(self.parser.constructs.flow, nok, ok)(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js
+/**
+ * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
+ * @typedef {import('micromark-util-types').Initializer} Initializer
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ */
+
+
+
+
+/** @type {InitialConstruct} */
+const flow = {
+ tokenize: initializeFlow
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Initializer}
+ */
+function initializeFlow(effects) {
+ const self = this
+ const initial = effects.attempt(
+ // Try to parse a blank line.
+ blankLine,
+ atBlankEnding,
+ // Try to parse initial flow (essentially, only code).
+ effects.attempt(
+ this.parser.constructs.flowInitial,
+ afterConstruct,
+ factorySpace(
+ effects,
+ effects.attempt(
+ this.parser.constructs.flow,
+ afterConstruct,
+ effects.attempt(content_content, afterConstruct)
+ ),
+ 'linePrefix'
+ )
+ )
+ )
+ return initial
+
+ /** @type {State} */
+ function atBlankEnding(code) {
+ if (code === null) {
+ effects.consume(code)
+ return
+ }
+ effects.enter('lineEndingBlank')
+ effects.consume(code)
+ effects.exit('lineEndingBlank')
+ self.currentConstruct = undefined
+ return initial
+ }
+
+ /** @type {State} */
+ function afterConstruct(code) {
+ if (code === null) {
+ effects.consume(code)
+ return
+ }
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ self.currentConstruct = undefined
+ return initial
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
+ * @typedef {import('micromark-util-types').Initializer} Initializer
+ * @typedef {import('micromark-util-types').Resolver} Resolver
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ */
+
+const resolver = {
+ resolveAll: createResolver()
+}
+const string = initializeFactory('string')
+const text_text = initializeFactory('text')
+
+/**
+ * @param {'string' | 'text'} field
+ * @returns {InitialConstruct}
+ */
+function initializeFactory(field) {
+ return {
+ tokenize: initializeText,
+ resolveAll: createResolver(
+ field === 'text' ? resolveAllLineSuffixes : undefined
+ )
+ }
+
+ /**
+ * @this {TokenizeContext}
+ * @type {Initializer}
+ */
+ function initializeText(effects) {
+ const self = this
+ const constructs = this.parser.constructs[field]
+ const text = effects.attempt(constructs, start, notText)
+ return start
+
+ /** @type {State} */
+ function start(code) {
+ return atBreak(code) ? text(code) : notText(code)
+ }
+
+ /** @type {State} */
+ function notText(code) {
+ if (code === null) {
+ effects.consume(code)
+ return
+ }
+ effects.enter('data')
+ effects.consume(code)
+ return data
+ }
+
+ /** @type {State} */
+ function data(code) {
+ if (atBreak(code)) {
+ effects.exit('data')
+ return text(code)
+ }
+
+ // Data.
+ effects.consume(code)
+ return data
+ }
+
+ /**
+ * @param {Code} code
+ * @returns {boolean}
+ */
+ function atBreak(code) {
+ if (code === null) {
+ return true
+ }
+ const list = constructs[code]
+ let index = -1
+ if (list) {
+ // Always populated by defaults.
+
+ while (++index < list.length) {
+ const item = list[index]
+ if (!item.previous || item.previous.call(self, self.previous)) {
+ return true
+ }
+ }
+ }
+ return false
+ }
+ }
+}
+
+/**
+ * @param {Resolver | undefined} [extraResolver]
+ * @returns {Resolver}
+ */
+function createResolver(extraResolver) {
+ return resolveAllText
+
+ /** @type {Resolver} */
+ function resolveAllText(events, context) {
+ let index = -1
+ /** @type {number | undefined} */
+ let enter
+
+ // A rather boring computation (to merge adjacent `data` events) which
+ // improves mm performance by 29%.
+ while (++index <= events.length) {
+ if (enter === undefined) {
+ if (events[index] && events[index][1].type === 'data') {
+ enter = index
+ index++
+ }
+ } else if (!events[index] || events[index][1].type !== 'data') {
+ // Don’t do anything if there is one data token.
+ if (index !== enter + 2) {
+ events[enter][1].end = events[index - 1][1].end
+ events.splice(enter + 2, index - enter - 2)
+ index = enter + 2
+ }
+ enter = undefined
+ }
+ }
+ return extraResolver ? extraResolver(events, context) : events
+ }
+}
+
+/**
+ * A rather ugly set of instructions which again looks at chunks in the input
+ * stream.
+ * The reason to do this here is that it is *much* faster to parse in reverse.
+ * And that we can’t hook into `null` to split the line suffix before an EOF.
+ * To do: figure out if we can make this into a clean utility, or even in core.
+ * As it will be useful for GFMs literal autolink extension (and maybe even
+ * tables?)
+ *
+ * @type {Resolver}
+ */
+function resolveAllLineSuffixes(events, context) {
+ let eventIndex = 0 // Skip first.
+
+ while (++eventIndex <= events.length) {
+ if (
+ (eventIndex === events.length ||
+ events[eventIndex][1].type === 'lineEnding') &&
+ events[eventIndex - 1][1].type === 'data'
+ ) {
+ const data = events[eventIndex - 1][1]
+ const chunks = context.sliceStream(data)
+ let index = chunks.length
+ let bufferIndex = -1
+ let size = 0
+ /** @type {boolean | undefined} */
+ let tabs
+ while (index--) {
+ const chunk = chunks[index]
+ if (typeof chunk === 'string') {
+ bufferIndex = chunk.length
+ while (chunk.charCodeAt(bufferIndex - 1) === 32) {
+ size++
+ bufferIndex--
+ }
+ if (bufferIndex) break
+ bufferIndex = -1
+ }
+ // Number
+ else if (chunk === -2) {
+ tabs = true
+ size++
+ } else if (chunk === -1) {
+ // Empty
+ } else {
+ // Replacement character, exit.
+ index++
+ break
+ }
+ }
+ if (size) {
+ const token = {
+ type:
+ eventIndex === events.length || tabs || size < 2
+ ? 'lineSuffix'
+ : 'hardBreakTrailing',
+ start: {
+ line: data.end.line,
+ column: data.end.column - size,
+ offset: data.end.offset - size,
+ _index: data.start._index + index,
+ _bufferIndex: index
+ ? bufferIndex
+ : data.start._bufferIndex + bufferIndex
+ },
+ end: Object.assign({}, data.end)
+ }
+ data.end = Object.assign({}, token.start)
+ if (data.start.offset === data.end.offset) {
+ Object.assign(data, token)
+ } else {
+ events.splice(
+ eventIndex,
+ 0,
+ ['enter', token, context],
+ ['exit', token, context]
+ )
+ eventIndex += 2
+ }
+ }
+ eventIndex++
+ }
+ }
+ return events
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js
+/**
+ * @typedef {import('micromark-util-types').Event} Event
+ * @typedef {import('micromark-util-types').Resolver} Resolver
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ */
+
+/**
+ * Call all `resolveAll`s.
+ *
+ * @param {Array<{resolveAll?: Resolver | undefined}>} constructs
+ * List of constructs, optionally with `resolveAll`s.
+ * @param {Array} events
+ * List of events.
+ * @param {TokenizeContext} context
+ * Context used by `tokenize`.
+ * @returns {Array}
+ * Changed events.
+ */
+function resolveAll(constructs, events, context) {
+ /** @type {Array} */
+ const called = []
+ let index = -1
+
+ while (++index < constructs.length) {
+ const resolve = constructs[index].resolveAll
+
+ if (resolve && !called.includes(resolve)) {
+ events = resolve(events, context)
+ called.push(resolve)
+ }
+ }
+
+ return events
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js
+/**
+ * @typedef {import('micromark-util-types').Chunk} Chunk
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord
+ * @typedef {import('micromark-util-types').Effects} Effects
+ * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
+ * @typedef {import('micromark-util-types').ParseContext} ParseContext
+ * @typedef {import('micromark-util-types').Point} Point
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').TokenType} TokenType
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ */
+
+/**
+ * @callback Restore
+ * @returns {void}
+ *
+ * @typedef Info
+ * @property {Restore} restore
+ * @property {number} from
+ *
+ * @callback ReturnHandle
+ * Handle a successful run.
+ * @param {Construct} construct
+ * @param {Info} info
+ * @returns {void}
+ */
+
+
+
+
+/**
+ * Create a tokenizer.
+ * Tokenizers deal with one type of data (e.g., containers, flow, text).
+ * The parser is the object dealing with it all.
+ * `initialize` works like other constructs, except that only its `tokenize`
+ * function is used, in which case it doesn’t receive an `ok` or `nok`.
+ * `from` can be given to set the point before the first character, although
+ * when further lines are indented, they must be set with `defineSkip`.
+ *
+ * @param {ParseContext} parser
+ * @param {InitialConstruct} initialize
+ * @param {Omit | undefined} [from]
+ * @returns {TokenizeContext}
+ */
+function createTokenizer(parser, initialize, from) {
+ /** @type {Point} */
+ let point = Object.assign(
+ from
+ ? Object.assign({}, from)
+ : {
+ line: 1,
+ column: 1,
+ offset: 0
+ },
+ {
+ _index: 0,
+ _bufferIndex: -1
+ }
+ )
+ /** @type {Record} */
+ const columnStart = {}
+ /** @type {Array} */
+ const resolveAllConstructs = []
+ /** @type {Array} */
+ let chunks = []
+ /** @type {Array} */
+ let stack = []
+ /** @type {boolean | undefined} */
+ let consumed = true
+
+ /**
+ * Tools used for tokenizing.
+ *
+ * @type {Effects}
+ */
+ const effects = {
+ consume,
+ enter,
+ exit,
+ attempt: constructFactory(onsuccessfulconstruct),
+ check: constructFactory(onsuccessfulcheck),
+ interrupt: constructFactory(onsuccessfulcheck, {
+ interrupt: true
+ })
+ }
+
+ /**
+ * State and tools for resolving and serializing.
+ *
+ * @type {TokenizeContext}
+ */
+ const context = {
+ previous: null,
+ code: null,
+ containerState: {},
+ events: [],
+ parser,
+ sliceStream,
+ sliceSerialize,
+ now,
+ defineSkip,
+ write
+ }
+
+ /**
+ * The state function.
+ *
+ * @type {State | void}
+ */
+ let state = initialize.tokenize.call(context, effects)
+
+ /**
+ * Track which character we expect to be consumed, to catch bugs.
+ *
+ * @type {Code}
+ */
+ let expectedCode
+ if (initialize.resolveAll) {
+ resolveAllConstructs.push(initialize)
+ }
+ return context
+
+ /** @type {TokenizeContext['write']} */
+ function write(slice) {
+ chunks = push(chunks, slice)
+ main()
+
+ // Exit if we’re not done, resolve might change stuff.
+ if (chunks[chunks.length - 1] !== null) {
+ return []
+ }
+ addResult(initialize, 0)
+
+ // Otherwise, resolve, and exit.
+ context.events = resolveAll(resolveAllConstructs, context.events, context)
+ return context.events
+ }
+
+ //
+ // Tools.
+ //
+
+ /** @type {TokenizeContext['sliceSerialize']} */
+ function sliceSerialize(token, expandTabs) {
+ return serializeChunks(sliceStream(token), expandTabs)
+ }
+
+ /** @type {TokenizeContext['sliceStream']} */
+ function sliceStream(token) {
+ return sliceChunks(chunks, token)
+ }
+
+ /** @type {TokenizeContext['now']} */
+ function now() {
+ // This is a hot path, so we clone manually instead of `Object.assign({}, point)`
+ const {line, column, offset, _index, _bufferIndex} = point
+ return {
+ line,
+ column,
+ offset,
+ _index,
+ _bufferIndex
+ }
+ }
+
+ /** @type {TokenizeContext['defineSkip']} */
+ function defineSkip(value) {
+ columnStart[value.line] = value.column
+ accountForPotentialSkip()
+ }
+
+ //
+ // State management.
+ //
+
+ /**
+ * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by
+ * `consume`).
+ * Here is where we walk through the chunks, which either include strings of
+ * several characters, or numerical character codes.
+ * The reason to do this in a loop instead of a call is so the stack can
+ * drain.
+ *
+ * @returns {void}
+ */
+ function main() {
+ /** @type {number} */
+ let chunkIndex
+ while (point._index < chunks.length) {
+ const chunk = chunks[point._index]
+
+ // If we’re in a buffer chunk, loop through it.
+ if (typeof chunk === 'string') {
+ chunkIndex = point._index
+ if (point._bufferIndex < 0) {
+ point._bufferIndex = 0
+ }
+ while (
+ point._index === chunkIndex &&
+ point._bufferIndex < chunk.length
+ ) {
+ go(chunk.charCodeAt(point._bufferIndex))
+ }
+ } else {
+ go(chunk)
+ }
+ }
+ }
+
+ /**
+ * Deal with one code.
+ *
+ * @param {Code} code
+ * @returns {void}
+ */
+ function go(code) {
+ consumed = undefined
+ expectedCode = code
+ state = state(code)
+ }
+
+ /** @type {Effects['consume']} */
+ function consume(code) {
+ if (markdownLineEnding(code)) {
+ point.line++
+ point.column = 1
+ point.offset += code === -3 ? 2 : 1
+ accountForPotentialSkip()
+ } else if (code !== -1) {
+ point.column++
+ point.offset++
+ }
+
+ // Not in a string chunk.
+ if (point._bufferIndex < 0) {
+ point._index++
+ } else {
+ point._bufferIndex++
+
+ // At end of string chunk.
+ // @ts-expect-error Points w/ non-negative `_bufferIndex` reference
+ // strings.
+ if (point._bufferIndex === chunks[point._index].length) {
+ point._bufferIndex = -1
+ point._index++
+ }
+ }
+
+ // Expose the previous character.
+ context.previous = code
+
+ // Mark as consumed.
+ consumed = true
+ }
+
+ /** @type {Effects['enter']} */
+ function enter(type, fields) {
+ /** @type {Token} */
+ // @ts-expect-error Patch instead of assign required fields to help GC.
+ const token = fields || {}
+ token.type = type
+ token.start = now()
+ context.events.push(['enter', token, context])
+ stack.push(token)
+ return token
+ }
+
+ /** @type {Effects['exit']} */
+ function exit(type) {
+ const token = stack.pop()
+ token.end = now()
+ context.events.push(['exit', token, context])
+ return token
+ }
+
+ /**
+ * Use results.
+ *
+ * @type {ReturnHandle}
+ */
+ function onsuccessfulconstruct(construct, info) {
+ addResult(construct, info.from)
+ }
+
+ /**
+ * Discard results.
+ *
+ * @type {ReturnHandle}
+ */
+ function onsuccessfulcheck(_, info) {
+ info.restore()
+ }
+
+ /**
+ * Factory to attempt/check/interrupt.
+ *
+ * @param {ReturnHandle} onreturn
+ * @param {{interrupt?: boolean | undefined} | undefined} [fields]
+ */
+ function constructFactory(onreturn, fields) {
+ return hook
+
+ /**
+ * Handle either an object mapping codes to constructs, a list of
+ * constructs, or a single construct.
+ *
+ * @param {Array | Construct | ConstructRecord} constructs
+ * @param {State} returnState
+ * @param {State | undefined} [bogusState]
+ * @returns {State}
+ */
+ function hook(constructs, returnState, bogusState) {
+ /** @type {Array} */
+ let listOfConstructs
+ /** @type {number} */
+ let constructIndex
+ /** @type {Construct} */
+ let currentConstruct
+ /** @type {Info} */
+ let info
+ return Array.isArray(constructs) /* c8 ignore next 1 */
+ ? handleListOfConstructs(constructs)
+ : 'tokenize' in constructs
+ ? // @ts-expect-error Looks like a construct.
+ handleListOfConstructs([constructs])
+ : handleMapOfConstructs(constructs)
+
+ /**
+ * Handle a list of construct.
+ *
+ * @param {ConstructRecord} map
+ * @returns {State}
+ */
+ function handleMapOfConstructs(map) {
+ return start
+
+ /** @type {State} */
+ function start(code) {
+ const def = code !== null && map[code]
+ const all = code !== null && map.null
+ const list = [
+ // To do: add more extension tests.
+ /* c8 ignore next 2 */
+ ...(Array.isArray(def) ? def : def ? [def] : []),
+ ...(Array.isArray(all) ? all : all ? [all] : [])
+ ]
+ return handleListOfConstructs(list)(code)
+ }
+ }
+
+ /**
+ * Handle a list of construct.
+ *
+ * @param {Array} list
+ * @returns {State}
+ */
+ function handleListOfConstructs(list) {
+ listOfConstructs = list
+ constructIndex = 0
+ if (list.length === 0) {
+ return bogusState
+ }
+ return handleConstruct(list[constructIndex])
+ }
+
+ /**
+ * Handle a single construct.
+ *
+ * @param {Construct} construct
+ * @returns {State}
+ */
+ function handleConstruct(construct) {
+ return start
+
+ /** @type {State} */
+ function start(code) {
+ // To do: not needed to store if there is no bogus state, probably?
+ // Currently doesn’t work because `inspect` in document does a check
+ // w/o a bogus, which doesn’t make sense. But it does seem to help perf
+ // by not storing.
+ info = store()
+ currentConstruct = construct
+ if (!construct.partial) {
+ context.currentConstruct = construct
+ }
+
+ // Always populated by defaults.
+
+ if (
+ construct.name &&
+ context.parser.constructs.disable.null.includes(construct.name)
+ ) {
+ return nok(code)
+ }
+ return construct.tokenize.call(
+ // If we do have fields, create an object w/ `context` as its
+ // prototype.
+ // This allows a “live binding”, which is needed for `interrupt`.
+ fields ? Object.assign(Object.create(context), fields) : context,
+ effects,
+ ok,
+ nok
+ )(code)
+ }
+ }
+
+ /** @type {State} */
+ function ok(code) {
+ consumed = true
+ onreturn(currentConstruct, info)
+ return returnState
+ }
+
+ /** @type {State} */
+ function nok(code) {
+ consumed = true
+ info.restore()
+ if (++constructIndex < listOfConstructs.length) {
+ return handleConstruct(listOfConstructs[constructIndex])
+ }
+ return bogusState
+ }
+ }
+ }
+
+ /**
+ * @param {Construct} construct
+ * @param {number} from
+ * @returns {void}
+ */
+ function addResult(construct, from) {
+ if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {
+ resolveAllConstructs.push(construct)
+ }
+ if (construct.resolve) {
+ splice(
+ context.events,
+ from,
+ context.events.length - from,
+ construct.resolve(context.events.slice(from), context)
+ )
+ }
+ if (construct.resolveTo) {
+ context.events = construct.resolveTo(context.events, context)
+ }
+ }
+
+ /**
+ * Store state.
+ *
+ * @returns {Info}
+ */
+ function store() {
+ const startPoint = now()
+ const startPrevious = context.previous
+ const startCurrentConstruct = context.currentConstruct
+ const startEventsIndex = context.events.length
+ const startStack = Array.from(stack)
+ return {
+ restore,
+ from: startEventsIndex
+ }
+
+ /**
+ * Restore state.
+ *
+ * @returns {void}
+ */
+ function restore() {
+ point = startPoint
+ context.previous = startPrevious
+ context.currentConstruct = startCurrentConstruct
+ context.events.length = startEventsIndex
+ stack = startStack
+ accountForPotentialSkip()
+ }
+ }
+
+ /**
+ * Move the current point a bit forward in the line when it’s on a column
+ * skip.
+ *
+ * @returns {void}
+ */
+ function accountForPotentialSkip() {
+ if (point.line in columnStart && point.column < 2) {
+ point.column = columnStart[point.line]
+ point.offset += columnStart[point.line] - 1
+ }
+ }
+}
+
+/**
+ * Get the chunks from a slice of chunks in the range of a token.
+ *
+ * @param {Array} chunks
+ * @param {Pick} token
+ * @returns {Array}
+ */
+function sliceChunks(chunks, token) {
+ const startIndex = token.start._index
+ const startBufferIndex = token.start._bufferIndex
+ const endIndex = token.end._index
+ const endBufferIndex = token.end._bufferIndex
+ /** @type {Array} */
+ let view
+ if (startIndex === endIndex) {
+ // @ts-expect-error `_bufferIndex` is used on string chunks.
+ view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]
+ } else {
+ view = chunks.slice(startIndex, endIndex)
+ if (startBufferIndex > -1) {
+ const head = view[0]
+ if (typeof head === 'string') {
+ view[0] = head.slice(startBufferIndex)
+ } else {
+ view.shift()
+ }
+ }
+ if (endBufferIndex > 0) {
+ // @ts-expect-error `_bufferIndex` is used on string chunks.
+ view.push(chunks[endIndex].slice(0, endBufferIndex))
+ }
+ }
+ return view
+}
+
+/**
+ * Get the string value of a slice of chunks.
+ *
+ * @param {Array} chunks
+ * @param {boolean | undefined} [expandTabs=false]
+ * @returns {string}
+ */
+function serializeChunks(chunks, expandTabs) {
+ let index = -1
+ /** @type {Array} */
+ const result = []
+ /** @type {boolean | undefined} */
+ let atTab
+ while (++index < chunks.length) {
+ const chunk = chunks[index]
+ /** @type {string} */
+ let value
+ if (typeof chunk === 'string') {
+ value = chunk
+ } else
+ switch (chunk) {
+ case -5: {
+ value = '\r'
+ break
+ }
+ case -4: {
+ value = '\n'
+ break
+ }
+ case -3: {
+ value = '\r' + '\n'
+ break
+ }
+ case -2: {
+ value = expandTabs ? ' ' : '\t'
+ break
+ }
+ case -1: {
+ if (!expandTabs && atTab) continue
+ value = ' '
+ break
+ }
+ default: {
+ // Currently only replacement character.
+ value = String.fromCharCode(chunk)
+ }
+ }
+ atTab = chunk === -2
+ result.push(value)
+ }
+ return result.join('')
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.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 thematicBreak = {
+ name: 'thematicBreak',
+ tokenize: tokenizeThematicBreak
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeThematicBreak(effects, ok, nok) {
+ let size = 0
+ /** @type {NonNullable} */
+ 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/mermaid/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__(18464);
+;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-a48a4c90.js
+
+
+
+function preprocessMarkdown(markdown) {
+ const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n");
+ const withoutExtraSpaces = (0,esm/* dedent */.Z)(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_04fb0060.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground);
+ if (useHtmlLabels) {
+ const htmlText = markdownToHTML(text);
+ const node = {
+ isNode,
+ label: (0,mermaid_04fb0060.J)(htmlText).replace(
+ /fa[blrs]?:fa-[\w-]+/g,
+ (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;
+ }
+};
+
+
+
+/***/ }),
+
+/***/ 52494:
+/***/ ((__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 */ insertEdge),
+/* harmony export */ h: () => (/* binding */ positionEdgeLabel),
+/* harmony export */ i: () => (/* binding */ intersectRect$1),
+/* harmony export */ j: () => (/* binding */ getLineFunctionsWithOffset),
+/* harmony export */ k: () => (/* binding */ addEdgeMarkers),
+/* harmony export */ l: () => (/* binding */ labelHelper),
+/* harmony export */ p: () => (/* binding */ positionNode),
+/* harmony export */ s: () => (/* binding */ setNodeElem),
+/* harmony export */ u: () => (/* binding */ updateNodeBounds)
+/* harmony export */ });
+/* harmony import */ var _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76365);
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64218);
+/* harmony import */ var _createText_a48a4c90_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33183);
+
+
+
+const insertMarkers = (elem, markerArray, type, id) => {
+ markerArray.forEach((markerName) => {
+ markers[markerName](elem, type, id);
+ });
+};
+const extension = (elem, type, id) => {
+ _mermaid_04fb0060_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 */ .Ys)(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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ vertexText = vertexText.replace(/\\n|\n/g, "
");
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("vertexText" + vertexText);
+ const node = {
+ isNode,
+ label: (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.J)(vertexText).replace(
+ /fa[blrs]?:fa-[\w-]+/g,
+ (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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_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_a48a4c90_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.J)(labelText), (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)()), {
+ useHtmlLabels,
+ width: node.width || (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth,
+ classes: "markdown-node-label"
+ });
+ } else {
+ text = textNode.appendChild(
+ createLabel$1(
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.J)(labelText), (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)()),
+ node.labelStyle,
+ false,
+ isNode
+ )
+ );
+ }
+ let bbox = text.getBBox();
+ const halfPadding = node.padding / 2;
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_04fb0060_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_04fb0060_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_04fb0060_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 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_04fb0060_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_04fb0060_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 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 = bbox.width + node.padding;
+ const totalHeight = bbox.height + node.padding;
+ rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).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_04fb0060_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_04fb0060_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_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border");
+ addBorder(totalWidth);
+ } else {
+ skipBorder(totalWidth);
+ }
+ if (borders.includes("r")) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border");
+ addBorder(totalHeight);
+ } else {
+ skipBorder(totalHeight);
+ }
+ if (borders.includes("b")) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border");
+ addBorder(totalWidth);
+ } else {
+ skipBorder(totalWidth);
+ }
+ if (borders.includes("l")) {
+ _mermaid_04fb0060_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_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(text);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ _mermaid_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = descr.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(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 */ .Ys)(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 */ .Ys)(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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main");
+ updateNodeBounds(node, circle2);
+ node.intersect = function(point2) {
+ _mermaid_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main");
+ updateNodeBounds(node, outerCircle);
+ node.intersect = function(point2) {
+ _mermaid_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = interfaceLabel.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(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_04fb0060_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 */ .Ys)(classTitleLabel).attr("class", "classTitle");
+ let classTitleBBox = classTitleLabel.getBBox();
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = classTitleLabel.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(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_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = lbl.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(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_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = lbl.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(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 */ .Ys)(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 */ .Ys)(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 */ .Ys)(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 */ .Ys)(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,
+ question,
+ rect,
+ labelRect,
+ rectWithTitle,
+ choice,
+ circle,
+ doublecircle,
+ stadium,
+ hexagon,
+ 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_04fb0060_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);
+ }
+ 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_04fb0060_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 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_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels);
+ const labelElement = edge.labelType === "markdown" ? (0,_createText_a48a4c90_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, {
+ style: edge.labelStyle,
+ useHtmlLabels,
+ addSvgBackground: true
+ }) : createLabel$1(edge.label, edge.labelStyle);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc82", edge, edge.labelType);
+ 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 */ .Ys)(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_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Moving label abc78 ", edge.id, edge.label, edgeLabels[edge.id]);
+ let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;
+ if (edge.label) {
+ const el = edgeLabels[edge.id];
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info(
+ "Moving label " + edge.label + " from (",
+ x,
+ ",",
+ y,
+ ") to (",
+ pos.x,
+ ",",
+ pos.y,
+ ") abc78"
+ );
+ if (paths.updatedPath) {
+ x = pos.x;
+ y = pos.y;
+ }
+ }
+ el.attr("transform", "translate(" + x + ", " + y + ")");
+ }
+ if (edge.startLabelLeft) {
+ const el = terminalLabels[edge.id].startLeft;
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = _mermaid_04fb0060_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_04fb0060_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_04fb0060_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_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`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, boundryNode) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("abc88 cutPathAtIntersect", _points, boundryNode);
+ let points = [];
+ let lastPointOutside = _points[0];
+ let isInside = false;
+ _points.forEach((point2) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc88 checking point", point2, boundryNode);
+ if (!outsideNode(boundryNode, point2) && !isInside) {
+ const inter = intersection(boundryNode, lastPointOutside, point2);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("abc88 inside", point2, lastPointOutside, inter);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("abc88 intersection", inter);
+ 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);
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("abc88 no intersect", inter, points);
+ }
+ isInside = true;
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("abc88 outside", point2, lastPointOutside);
+ lastPointOutside = point2;
+ if (!isInside) {
+ points.push(point2);
+ }
+ }
+ });
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("abc88 returning points", points);
+ return points;
+};
+const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) {
+ let points = edge.points;
+ let pointsHasChanged = false;
+ const tail = graph.node(e.v);
+ var head = graph.node(e.w);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc88 InsertEdge: ", edge);
+ if (head.intersect && tail.intersect) {
+ points = points.slice(1, edge.points.length - 1);
+ points.unshift(tail.intersect(points[0]));
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info(
+ "Last point",
+ points[points.length - 1],
+ head,
+ head.intersect(points[points.length - 1])
+ );
+ points.push(head.intersect(points[points.length - 1]));
+ }
+ if (edge.toCluster) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("to cluster abc88", clusterDb[edge.toCluster]);
+ points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);
+ pointsHasChanged = true;
+ }
+ if (edge.fromCluster) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("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 */ .$0Z;
+ if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) {
+ curve = edge.curve;
+ }
+ const { x, y } = getLineFunctionsWithOffset(edge);
+ const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .jvg)().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_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_04fb0060_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, "\\)");
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("arrowTypeStart", edge.arrowTypeStart);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("arrowTypeEnd", edge.arrowTypeEnd);
+ addEdgeMarkers(svgPath, edge, url, id, diagramType);
+ let paths = {};
+ if (pointsHasChanged) {
+ paths.updatedPath = points;
+ }
+ paths.originalPath = edge.points;
+ return paths;
+};
+
+
+
+/***/ }),
+
+/***/ 74852:
+/***/ ((__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__(41644);
+/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39354);
+/* harmony import */ var _edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(52494);
+/* harmony import */ var _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76365);
+/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45625);
+/* harmony import */ var _createText_a48a4c90_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(33183);
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(64218);
+
+
+
+
+
+
+
+let clusterDb = {};
+let descendants = {};
+let parents = {};
+const clear$1 = () => {
+ descendants = {};
+ parents = {};
+ clusterDb = {};
+};
+const isDescendant = (id, ancenstorId) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("In isDecendant", ancenstorId, " ", id, " = ", descendants[ancenstorId].includes(id));
+ if (descendants[ancenstorId].includes(id)) {
+ return true;
+ }
+ return false;
+};
+const edgeInCluster = (edge, clusterId) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Decendants of ", clusterId, " is ", descendants[clusterId]);
+ _mermaid_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Tilt, ", clusterId, ",not in decendants");
+ 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_04fb0060_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_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("cp ", node, " to ", rootId, " with parent ", clusterId);
+ newGraph.setNode(node, data);
+ if (rootId !== graph.parent(node)) {
+ _mermaid_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Setting parent", node, clusterId);
+ newGraph.setParent(node, clusterId);
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId);
+ _mermaid_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Copying Edges", edges);
+ edges.forEach((edge) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge", edge);
+ const data2 = graph.edge(edge.v, edge.w, edge.name);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge data", data2, rootId);
+ try {
+ if (edgeInCluster(edge, rootId)) {
+ _mermaid_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0]));
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info(
+ "Skipping copy of edge ",
+ edge.v,
+ "-->",
+ edge.w,
+ " rootId: ",
+ rootId,
+ " clusterId:",
+ clusterId
+ );
+ }
+ } catch (e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.error(e);
+ }
+ });
+ }
+ _mermaid_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching", id);
+ const children = graph.children(id);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching children of id ", id, children);
+ if (children.length < 1) {
+ _mermaid_04fb0060_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_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting out, no graph ");
+ return;
+ } else {
+ _mermaid_04fb0060_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_04fb0060_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_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge: ", edge, " leaves cluster ", id);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Decendants of XXX ", id, ": ", descendants[id]);
+ clusterDb[id].externalConnections = true;
+ }
+ }
+ });
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster ", id, descendants);
+ }
+ });
+ graph.edges().forEach(function(e) {
+ const edge = graph.edge(e);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e));
+ _mermaid_04fb0060_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_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name);
+ _mermaid_04fb0060_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_04fb0060_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) {
+ edge.fromCluster = e.v;
+ }
+ if (w !== e.w) {
+ edge.toCluster = e.w;
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fix Replacing with XXX", v, w, e.name);
+ graph.setEdge(v, w, edge, e.name);
+ }
+ });
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Adjusted Graph", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph));
+ extractor(graph, 0);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace(clusterDb);
+};
+const extractor = (graph, depth) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("extractor - ", depth, dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph), graph.children("D"));
+ if (depth > 10) {
+ _mermaid_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Done, no node has children", graph.nodes());
+ return;
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Nodes = ", nodes, depth);
+ for (const node of nodes) {
+ _mermaid_04fb0060_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_04fb0060_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_04fb0060_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_04fb0060_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 */ .k({
+ multigraph: true,
+ compound: true
+ }).setGraph({
+ rankdir: dir,
+ // Todo: set proper spacing
+ nodesep: 50,
+ ranksep: 50,
+ marginx: 8,
+ marginy: 8
+ }).setDefaultEdgeLabel(function() {
+ return {};
+ });
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Old graph before copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph));
+ copy(node, graph, clusterGraph, node);
+ graph.setNode(node, {
+ clusterNode: true,
+ id: node,
+ clusterData: clusterDb[node].clusterData,
+ labelText: clusterDb[node].labelText,
+ graph: clusterGraph
+ });
+ _mermaid_04fb0060_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 */ .c(clusterGraph));
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Old graph after copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph));
+ } else {
+ _mermaid_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(clusterDb);
+ }
+ }
+ nodes = graph.nodes();
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New list of nodes", nodes);
+ for (const node of nodes) {
+ const data = graph.node(node);
+ _mermaid_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Creating subgraph rect for ", node.id, node);
+ 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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)().flowchart.htmlLabels);
+ const label = shapeSvg.insert("g").attr("class", "cluster-label");
+ const text = node.labelType === "markdown" ? (0,_createText_a48a4c90_js__WEBPACK_IMPORTED_MODULE_5__.a)(label, node.labelText, { style: node.labelStyle, useHtmlLabels }) : label.node().appendChild((0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true));
+ let bbox = text.getBBox();
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)().flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ys)(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_04fb0060_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);
+ if (useHtmlLabels) {
+ label.attr(
+ "transform",
+ // This puts the labal on top of the box instead of inside it
+ "translate(" + (node.x - bbox.width / 2) + ", " + (node.y - node.height / 2) + ")"
+ );
+ } else {
+ label.attr(
+ "transform",
+ // This puts the labal on top of the box instead of inside it
+ "translate(" + node.x + ", " + (node.y - node.height / 2) + ")"
+ );
+ }
+ const rectBox = rect2.node().getBBox();
+ node.width = rectBox.width;
+ node.height = rectBox.height;
+ node.intersect = function(point) {
+ return (0,_edges_5ec2587c_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_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point);
+ };
+ return shapeSvg;
+};
+const roundedWithTitle = (parent, node) => {
+ 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_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true));
+ let bbox = text.getBBox();
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)().flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ys)(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);
+ label.attr(
+ "transform",
+ "translate(" + (node.x - bbox.width / 2) + ", " + (node.y - node.height / 2 - node.padding / 3 + ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)().flowchart.htmlLabels) ? 5 : 3)) + ")"
+ );
+ const rectBox = rect2.node().getBBox();
+ node.height = rectBox.height;
+ node.intersect = function(point) {
+ return (0,_edges_5ec2587c_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_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point);
+ };
+ return shapeSvg;
+};
+const shapes = { rect, roundedWithTitle, noteGroup, divider };
+let clusterElems = {};
+const insertCluster = (elem, node) => {
+ _mermaid_04fb0060_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) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph in recursive render: XXX", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph), parentCluster);
+ const dir = graph.graph().rankdir;
+ _mermaid_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("No nodes found for", graph);
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Recursive render XXX", graph.nodes());
+ }
+ if (graph.edges().length > 0) {
+ _mermaid_04fb0060_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_04fb0060_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Setting parent", v, parentCluster.id);
+ graph.setParent(v, parentCluster.id, data);
+ }
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v)));
+ if (node && node.clusterNode) {
+ _mermaid_04fb0060_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));
+ const newEl = o.elem;
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.u)(node, newEl);
+ node.diff = o.diff || 0;
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node bounds (abc123)", v, node, node.width, node.x, node.y);
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.s)(newEl, node);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Recursive render complete ", newEl, node);
+ } else {
+ if (graph.children(v).length > 0) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster - the non recursive path XXX", v, node.id, node, graph);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info(findNonClusterChild(node.id, graph));
+ clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node };
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node - the non recursive path", v, node.id, node);
+ await (0,_edges_5ec2587c_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_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e));
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e)));
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Fix", clusterDb, "ids:", e.v, e.w, "Translateing: ", clusterDb[e.v], clusterDb[e.w]);
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.f)(edgeLabels, edge);
+ });
+ graph.edges().forEach(function(e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e));
+ });
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################");
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("### Layout ###");
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################");
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info(graph);
+ (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__/* .layout */ .bK)(graph);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph after layout:", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph));
+ let diff = 0;
+ sortNodesByHierarchy(graph).forEach(function(v) {
+ const node = graph.node(v);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Position " + v + ": " + JSON.stringify(graph.node(v)));
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info(
+ "Position " + v + ": (" + node.x,
+ "," + node.y,
+ ") width: ",
+ node.width,
+ " height: ",
+ node.height
+ );
+ if (node && node.clusterNode) {
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.p)(node);
+ } else {
+ if (graph.children(v).length > 0) {
+ insertCluster(clusters, node);
+ clusterDb[node.id].node = node;
+ } else {
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.p)(node);
+ }
+ }
+ });
+ graph.edges().forEach(function(e) {
+ const edge = graph.edge(e);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge);
+ const paths = (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.g)(edgePaths, e, edge, clusterDb, diagramtype, graph, id);
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.h)(edge, paths);
+ });
+ graph.nodes().forEach(function(v) {
+ const n = graph.node(v);
+ _mermaid_04fb0060_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_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.a)(elem, markers, diagramtype, id);
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.b)();
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.d)();
+ clear();
+ clear$1();
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph at first:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph)));
+ adjustClustersAndEdges(graph);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph after:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph)));
+ await recursiveRender(elem, graph, diagramtype, id);
+};
+
+
+
+/***/ }),
+
+/***/ 42924:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ d: () => (/* binding */ db),
+/* harmony export */ p: () => (/* binding */ parser$1),
+/* harmony export */ s: () => (/* binding */ styles)
+/* harmony export */ });
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64218);
+/* harmony import */ var _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76365);
+
+
+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, 17], $V1 = [1, 18], $V2 = [1, 19], $V3 = [1, 39], $V4 = [1, 40], $V5 = [1, 25], $V6 = [1, 23], $V7 = [1, 24], $V8 = [1, 31], $V9 = [1, 32], $Va = [1, 33], $Vb = [1, 34], $Vc = [1, 35], $Vd = [1, 36], $Ve = [1, 26], $Vf = [1, 27], $Vg = [1, 28], $Vh = [1, 29], $Vi = [1, 43], $Vj = [1, 30], $Vk = [1, 42], $Vl = [1, 44], $Vm = [1, 41], $Vn = [1, 45], $Vo = [1, 9], $Vp = [1, 8, 9], $Vq = [1, 56], $Vr = [1, 57], $Vs = [1, 58], $Vt = [1, 59], $Vu = [1, 60], $Vv = [1, 61], $Vw = [1, 62], $Vx = [1, 8, 9, 39], $Vy = [1, 74], $Vz = [1, 8, 9, 12, 13, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], $VA = [1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 46, 59, 60, 61, 62, 63, 64, 65, 70, 72, 74, 80, 95, 97, 98], $VB = [13, 74, 80, 95, 97, 98], $VC = [13, 64, 65, 74, 80, 95, 97, 98], $VD = [13, 59, 60, 61, 62, 63, 74, 80, 95, 97, 98], $VE = [1, 93], $VF = [1, 110], $VG = [1, 108], $VH = [1, 102], $VI = [1, 103], $VJ = [1, 104], $VK = [1, 105], $VL = [1, 106], $VM = [1, 107], $VN = [1, 109], $VO = [1, 8, 9, 37, 39, 42], $VP = [1, 8, 9, 21], $VQ = [1, 8, 9, 78], $VR = [1, 8, 9, 21, 73, 74, 78, 80, 81, 82, 83, 84, 85];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "statements": 5, "graphConfig": 6, "CLASS_DIAGRAM": 7, "NEWLINE": 8, "EOF": 9, "statement": 10, "classLabel": 11, "SQS": 12, "STR": 13, "SQE": 14, "namespaceName": 15, "alphaNumToken": 16, "className": 17, "classLiteralName": 18, "GENERICTYPE": 19, "relationStatement": 20, "LABEL": 21, "namespaceStatement": 22, "classStatement": 23, "memberStatement": 24, "annotationStatement": 25, "clickStatement": 26, "styleStatement": 27, "cssClassStatement": 28, "noteStatement": 29, "direction": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "namespaceIdentifier": 36, "STRUCT_START": 37, "classStatements": 38, "STRUCT_STOP": 39, "NAMESPACE": 40, "classIdentifier": 41, "STYLE_SEPARATOR": 42, "members": 43, "CLASS": 44, "ANNOTATION_START": 45, "ANNOTATION_END": 46, "MEMBER": 47, "SEPARATOR": 48, "relation": 49, "NOTE_FOR": 50, "noteText": 51, "NOTE": 52, "direction_tb": 53, "direction_bt": 54, "direction_rl": 55, "direction_lr": 56, "relationType": 57, "lineType": 58, "AGGREGATION": 59, "EXTENSION": 60, "COMPOSITION": 61, "DEPENDENCY": 62, "LOLLIPOP": 63, "LINE": 64, "DOTTED_LINE": 65, "CALLBACK": 66, "LINK": 67, "LINK_TARGET": 68, "CLICK": 69, "CALLBACK_NAME": 70, "CALLBACK_ARGS": 71, "HREF": 72, "STYLE": 73, "ALPHA": 74, "stylesOpt": 75, "CSSCLASS": 76, "style": 77, "COMMA": 78, "styleComponent": 79, "NUM": 80, "COLON": 81, "UNIT": 82, "SPACE": 83, "BRKT": 84, "PCT": 85, "commentToken": 86, "textToken": 87, "graphCodeTokens": 88, "textNoTagsToken": 89, "TAGSTART": 90, "TAGEND": 91, "==": 92, "--": 93, "DEFAULT": 94, "MINUS": 95, "keywords": 96, "UNICODE_TEXT": 97, "BQUOTE_STR": 98, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 19: "GENERICTYPE", 21: "LABEL", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 37: "STRUCT_START", 39: "STRUCT_STOP", 40: "NAMESPACE", 42: "STYLE_SEPARATOR", 44: "CLASS", 45: "ANNOTATION_START", 46: "ANNOTATION_END", 47: "MEMBER", 48: "SEPARATOR", 50: "NOTE_FOR", 52: "NOTE", 53: "direction_tb", 54: "direction_bt", 55: "direction_rl", 56: "direction_lr", 59: "AGGREGATION", 60: "EXTENSION", 61: "COMPOSITION", 62: "DEPENDENCY", 63: "LOLLIPOP", 64: "LINE", 65: "DOTTED_LINE", 66: "CALLBACK", 67: "LINK", 68: "LINK_TARGET", 69: "CLICK", 70: "CALLBACK_NAME", 71: "CALLBACK_ARGS", 72: "HREF", 73: "STYLE", 74: "ALPHA", 76: "CSSCLASS", 78: "COMMA", 80: "NUM", 81: "COLON", 82: "UNIT", 83: "SPACE", 84: "BRKT", 85: "PCT", 88: "graphCodeTokens", 90: "TAGSTART", 91: "TAGEND", 92: "==", 93: "--", 94: "DEFAULT", 95: "MINUS", 96: "keywords", 97: "UNICODE_TEXT", 98: "BQUOTE_STR" },
+ productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 2], [17, 1], [17, 1], [17, 2], [17, 2], [17, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [22, 4], [22, 5], [36, 2], [38, 1], [38, 2], [38, 3], [23, 1], [23, 3], [23, 4], [23, 6], [41, 2], [41, 3], [25, 4], [43, 1], [43, 2], [24, 1], [24, 2], [24, 1], [24, 1], [20, 3], [20, 4], [20, 4], [20, 5], [29, 3], [29, 2], [30, 1], [30, 1], [30, 1], [30, 1], [49, 3], [49, 2], [49, 2], [49, 1], [57, 1], [57, 1], [57, 1], [57, 1], [57, 1], [58, 1], [58, 1], [26, 3], [26, 4], [26, 3], [26, 4], [26, 4], [26, 5], [26, 3], [26, 4], [26, 4], [26, 5], [26, 4], [26, 5], [26, 5], [26, 6], [27, 3], [28, 3], [75, 1], [75, 3], [77, 1], [77, 2], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [86, 1], [86, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [89, 1], [89, 1], [89, 1], [89, 1], [16, 1], [16, 1], [16, 1], [16, 1], [18, 1], [51, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 8:
+ this.$ = $$[$0 - 1];
+ break;
+ case 9:
+ case 11:
+ case 12:
+ this.$ = $$[$0];
+ break;
+ case 10:
+ case 13:
+ this.$ = $$[$0 - 1] + $$[$0];
+ break;
+ case 14:
+ case 15:
+ this.$ = $$[$0 - 1] + "~" + $$[$0] + "~";
+ break;
+ case 16:
+ yy.addRelation($$[$0]);
+ break;
+ case 17:
+ $$[$0 - 1].title = yy.cleanupLabel($$[$0]);
+ yy.addRelation($$[$0 - 1]);
+ break;
+ case 27:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 28:
+ case 29:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 30:
+ yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1]);
+ break;
+ case 31:
+ yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1]);
+ break;
+ case 32:
+ this.$ = $$[$0];
+ yy.addNamespace($$[$0]);
+ break;
+ case 33:
+ this.$ = [$$[$0]];
+ break;
+ case 34:
+ this.$ = [$$[$0 - 1]];
+ break;
+ case 35:
+ $$[$0].unshift($$[$0 - 2]);
+ this.$ = $$[$0];
+ break;
+ case 37:
+ yy.setCssClass($$[$0 - 2], $$[$0]);
+ break;
+ case 38:
+ yy.addMembers($$[$0 - 3], $$[$0 - 1]);
+ break;
+ case 39:
+ yy.setCssClass($$[$0 - 5], $$[$0 - 3]);
+ yy.addMembers($$[$0 - 5], $$[$0 - 1]);
+ break;
+ case 40:
+ this.$ = $$[$0];
+ yy.addClass($$[$0]);
+ break;
+ case 41:
+ this.$ = $$[$0 - 1];
+ yy.addClass($$[$0 - 1]);
+ yy.setClassLabel($$[$0 - 1], $$[$0]);
+ break;
+ case 42:
+ yy.addAnnotation($$[$0], $$[$0 - 2]);
+ break;
+ case 43:
+ this.$ = [$$[$0]];
+ break;
+ case 44:
+ $$[$0].push($$[$0 - 1]);
+ this.$ = $$[$0];
+ break;
+ case 45:
+ break;
+ case 46:
+ yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0]));
+ break;
+ case 47:
+ break;
+ case 48:
+ break;
+ case 49:
+ this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" };
+ break;
+ case 50:
+ this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" };
+ break;
+ case 51:
+ this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] };
+ break;
+ case 52:
+ this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] };
+ break;
+ case 53:
+ yy.addNote($$[$0], $$[$0 - 1]);
+ break;
+ case 54:
+ yy.addNote($$[$0]);
+ break;
+ case 55:
+ yy.setDirection("TB");
+ break;
+ case 56:
+ yy.setDirection("BT");
+ break;
+ case 57:
+ yy.setDirection("RL");
+ break;
+ case 58:
+ yy.setDirection("LR");
+ break;
+ case 59:
+ this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] };
+ break;
+ case 60:
+ this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] };
+ break;
+ case 61:
+ this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] };
+ break;
+ case 62:
+ this.$ = { type1: "none", type2: "none", lineType: $$[$0] };
+ break;
+ case 63:
+ this.$ = yy.relationType.AGGREGATION;
+ break;
+ case 64:
+ this.$ = yy.relationType.EXTENSION;
+ break;
+ case 65:
+ this.$ = yy.relationType.COMPOSITION;
+ break;
+ case 66:
+ this.$ = yy.relationType.DEPENDENCY;
+ break;
+ case 67:
+ this.$ = yy.relationType.LOLLIPOP;
+ break;
+ case 68:
+ this.$ = yy.lineType.LINE;
+ break;
+ case 69:
+ this.$ = yy.lineType.DOTTED_LINE;
+ break;
+ case 70:
+ case 76:
+ this.$ = $$[$0 - 2];
+ yy.setClickEvent($$[$0 - 1], $$[$0]);
+ break;
+ case 71:
+ case 77:
+ this.$ = $$[$0 - 3];
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1]);
+ yy.setTooltip($$[$0 - 2], $$[$0]);
+ break;
+ case 72:
+ this.$ = $$[$0 - 2];
+ yy.setLink($$[$0 - 1], $$[$0]);
+ break;
+ case 73:
+ this.$ = $$[$0 - 3];
+ yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]);
+ break;
+ case 74:
+ this.$ = $$[$0 - 3];
+ yy.setLink($$[$0 - 2], $$[$0 - 1]);
+ yy.setTooltip($$[$0 - 2], $$[$0]);
+ break;
+ case 75:
+ this.$ = $$[$0 - 4];
+ yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
+ yy.setTooltip($$[$0 - 3], $$[$0 - 1]);
+ break;
+ case 78:
+ this.$ = $$[$0 - 3];
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
+ break;
+ case 79:
+ this.$ = $$[$0 - 4];
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
+ yy.setTooltip($$[$0 - 3], $$[$0]);
+ break;
+ case 80:
+ this.$ = $$[$0 - 3];
+ yy.setLink($$[$0 - 2], $$[$0]);
+ break;
+ case 81:
+ this.$ = $$[$0 - 4];
+ yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]);
+ break;
+ case 82:
+ this.$ = $$[$0 - 4];
+ yy.setLink($$[$0 - 3], $$[$0 - 1]);
+ yy.setTooltip($$[$0 - 3], $$[$0]);
+ break;
+ case 83:
+ this.$ = $$[$0 - 5];
+ yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
+ yy.setTooltip($$[$0 - 4], $$[$0 - 1]);
+ break;
+ case 84:
+ this.$ = $$[$0 - 2];
+ yy.setCssStyle($$[$0 - 1], $$[$0]);
+ break;
+ case 85:
+ yy.setCssClass($$[$0 - 1], $$[$0]);
+ break;
+ case 86:
+ this.$ = [$$[$0]];
+ break;
+ case 87:
+ $$[$0 - 2].push($$[$0]);
+ this.$ = $$[$0 - 2];
+ break;
+ case 89:
+ this.$ = $$[$0 - 1] + $$[$0];
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($Vo, [2, 5], { 8: [1, 46] }), { 8: [1, 47] }, o($Vp, [2, 16], { 21: [1, 48] }), o($Vp, [2, 18]), o($Vp, [2, 19]), o($Vp, [2, 20]), o($Vp, [2, 21]), o($Vp, [2, 22]), o($Vp, [2, 23]), o($Vp, [2, 24]), o($Vp, [2, 25]), o($Vp, [2, 26]), { 32: [1, 49] }, { 34: [1, 50] }, o($Vp, [2, 29]), o($Vp, [2, 45], { 49: 51, 57: 54, 58: 55, 13: [1, 52], 21: [1, 53], 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }), { 37: [1, 63] }, o($Vx, [2, 36], { 37: [1, 65], 42: [1, 64] }), o($Vp, [2, 47]), o($Vp, [2, 48]), { 16: 66, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 67, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 68, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 69, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 74: [1, 70] }, { 13: [1, 71] }, { 16: 37, 17: 72, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: $Vy, 51: 73 }, o($Vp, [2, 55]), o($Vp, [2, 56]), o($Vp, [2, 57]), o($Vp, [2, 58]), o($Vz, [2, 11], { 16: 37, 18: 38, 17: 75, 19: [1, 76], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), o($Vz, [2, 12], { 19: [1, 77] }), { 15: 78, 16: 79, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 80, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VA, [2, 112]), o($VA, [2, 113]), o($VA, [2, 114]), o($VA, [2, 115]), o([1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], [2, 116]), o($Vo, [2, 6], { 10: 5, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 17: 20, 36: 21, 41: 22, 16: 37, 18: 38, 5: 81, 31: $V0, 33: $V1, 35: $V2, 40: $V3, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), { 5: 82, 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 17]), o($Vp, [2, 27]), o($Vp, [2, 28]), { 13: [1, 84], 16: 37, 17: 83, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 49: 85, 57: 54, 58: 55, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }, o($Vp, [2, 46]), { 58: 86, 64: $Vv, 65: $Vw }, o($VB, [2, 62], { 57: 87, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VC, [2, 63]), o($VC, [2, 64]), o($VC, [2, 65]), o($VC, [2, 66]), o($VC, [2, 67]), o($VD, [2, 68]), o($VD, [2, 69]), { 8: [1, 89], 23: 90, 38: 88, 41: 22, 44: $V4 }, { 16: 91, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 43: 92, 47: $VE }, { 46: [1, 94] }, { 13: [1, 95] }, { 13: [1, 96] }, { 70: [1, 97], 72: [1, 98] }, { 21: $VF, 73: $VG, 74: $VH, 75: 99, 77: 100, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, { 74: [1, 111] }, { 13: $Vy, 51: 112 }, o($Vp, [2, 54]), o($Vp, [2, 117]), o($Vz, [2, 13]), o($Vz, [2, 14]), o($Vz, [2, 15]), { 37: [2, 32] }, { 15: 113, 16: 79, 37: [2, 9], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, o($VO, [2, 40], { 11: 114, 12: [1, 115] }), o($Vo, [2, 7]), { 9: [1, 116] }, o($VP, [2, 49]), { 16: 37, 17: 117, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: [1, 119], 16: 37, 17: 118, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 61], { 57: 120, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VB, [2, 60]), { 39: [1, 121] }, { 23: 90, 38: 122, 41: 22, 44: $V4 }, { 8: [1, 123], 39: [2, 33] }, o($Vx, [2, 37], { 37: [1, 124] }), { 39: [1, 125] }, { 39: [2, 43], 43: 126, 47: $VE }, { 16: 37, 17: 127, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 70], { 13: [1, 128] }), o($Vp, [2, 72], { 13: [1, 130], 68: [1, 129] }), o($Vp, [2, 76], { 13: [1, 131], 71: [1, 132] }), { 13: [1, 133] }, o($Vp, [2, 84], { 78: [1, 134] }), o($VQ, [2, 86], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VR, [2, 88]), o($VR, [2, 90]), o($VR, [2, 91]), o($VR, [2, 92]), o($VR, [2, 93]), o($VR, [2, 94]), o($VR, [2, 95]), o($VR, [2, 96]), o($VR, [2, 97]), o($VR, [2, 98]), o($Vp, [2, 85]), o($Vp, [2, 53]), { 37: [2, 10] }, o($VO, [2, 41]), { 13: [1, 136] }, { 1: [2, 4] }, o($VP, [2, 51]), o($VP, [2, 50]), { 16: 37, 17: 137, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 59]), o($Vp, [2, 30]), { 39: [1, 138] }, { 23: 90, 38: 139, 39: [2, 34], 41: 22, 44: $V4 }, { 43: 140, 47: $VE }, o($Vx, [2, 38]), { 39: [2, 44] }, o($Vp, [2, 42]), o($Vp, [2, 71]), o($Vp, [2, 73]), o($Vp, [2, 74], { 68: [1, 141] }), o($Vp, [2, 77]), o($Vp, [2, 78], { 13: [1, 142] }), o($Vp, [2, 80], { 13: [1, 144], 68: [1, 143] }), { 21: $VF, 73: $VG, 74: $VH, 77: 145, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, o($VR, [2, 89]), { 14: [1, 146] }, o($VP, [2, 52]), o($Vp, [2, 31]), { 39: [2, 35] }, { 39: [1, 147] }, o($Vp, [2, 75]), o($Vp, [2, 79]), o($Vp, [2, 81]), o($Vp, [2, 82], { 68: [1, 148] }), o($VQ, [2, 87], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VO, [2, 8]), o($Vx, [2, 39]), o($Vp, [2, 83])],
+ defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 78: [2, 32], 113: [2, 10], 116: [2, 4], 126: [2, 44], 139: [2, 35] },
+ 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 lex() {
+ 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 = lex();
+ }
+ 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 lex() {
+ 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:
+ return 53;
+ case 1:
+ return 54;
+ case 2:
+ return 55;
+ case 3:
+ return 56;
+ case 4:
+ break;
+ case 5:
+ break;
+ case 6:
+ this.begin("acc_title");
+ return 31;
+ case 7:
+ this.popState();
+ return "acc_title_value";
+ case 8:
+ this.begin("acc_descr");
+ return 33;
+ case 9:
+ this.popState();
+ return "acc_descr_value";
+ case 10:
+ this.begin("acc_descr_multiline");
+ break;
+ case 11:
+ this.popState();
+ break;
+ case 12:
+ return "acc_descr_multiline_value";
+ case 13:
+ return 8;
+ case 14:
+ break;
+ case 15:
+ return 7;
+ case 16:
+ return 7;
+ case 17:
+ return "EDGE_STATE";
+ case 18:
+ this.begin("callback_name");
+ break;
+ case 19:
+ this.popState();
+ break;
+ case 20:
+ this.popState();
+ this.begin("callback_args");
+ break;
+ case 21:
+ return 70;
+ case 22:
+ this.popState();
+ break;
+ case 23:
+ return 71;
+ case 24:
+ this.popState();
+ break;
+ case 25:
+ return "STR";
+ case 26:
+ this.begin("string");
+ break;
+ case 27:
+ return 73;
+ case 28:
+ this.begin("namespace");
+ return 40;
+ case 29:
+ this.popState();
+ return 8;
+ case 30:
+ break;
+ case 31:
+ this.begin("namespace-body");
+ return 37;
+ case 32:
+ this.popState();
+ return 39;
+ case 33:
+ return "EOF_IN_STRUCT";
+ case 34:
+ return 8;
+ case 35:
+ break;
+ case 36:
+ return "EDGE_STATE";
+ case 37:
+ this.begin("class");
+ return 44;
+ case 38:
+ this.popState();
+ return 8;
+ case 39:
+ break;
+ case 40:
+ this.popState();
+ this.popState();
+ return 39;
+ case 41:
+ this.begin("class-body");
+ return 37;
+ case 42:
+ this.popState();
+ return 39;
+ case 43:
+ return "EOF_IN_STRUCT";
+ case 44:
+ return "EDGE_STATE";
+ case 45:
+ return "OPEN_IN_STRUCT";
+ case 46:
+ break;
+ case 47:
+ return "MEMBER";
+ case 48:
+ return 76;
+ case 49:
+ return 66;
+ case 50:
+ return 67;
+ case 51:
+ return 69;
+ case 52:
+ return 50;
+ case 53:
+ return 52;
+ case 54:
+ return 45;
+ case 55:
+ return 46;
+ case 56:
+ return 72;
+ case 57:
+ this.popState();
+ break;
+ case 58:
+ return "GENERICTYPE";
+ case 59:
+ this.begin("generic");
+ break;
+ case 60:
+ this.popState();
+ break;
+ case 61:
+ return "BQUOTE_STR";
+ case 62:
+ this.begin("bqstring");
+ break;
+ case 63:
+ return 68;
+ case 64:
+ return 68;
+ case 65:
+ return 68;
+ case 66:
+ return 68;
+ case 67:
+ return 60;
+ case 68:
+ return 60;
+ case 69:
+ return 62;
+ case 70:
+ return 62;
+ case 71:
+ return 61;
+ case 72:
+ return 59;
+ case 73:
+ return 63;
+ case 74:
+ return 64;
+ case 75:
+ return 65;
+ case 76:
+ return 21;
+ case 77:
+ return 42;
+ case 78:
+ return 95;
+ case 79:
+ return "DOT";
+ case 80:
+ return "PLUS";
+ case 81:
+ return 81;
+ case 82:
+ return 78;
+ case 83:
+ return 84;
+ case 84:
+ return 84;
+ case 85:
+ return 85;
+ case 86:
+ return "EQUALS";
+ case 87:
+ return "EQUALS";
+ case 88:
+ return 74;
+ case 89:
+ return 12;
+ case 90:
+ return 14;
+ case 91:
+ return "PUNCTUATION";
+ case 92:
+ return 80;
+ case 93:
+ return 97;
+ case 94:
+ return 83;
+ case 95:
+ return 83;
+ case 96:
+ return 9;
+ }
+ },
+ rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:style\b)/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?::)/, /^(?:,)/, /^(?:#)/, /^(?:#)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-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])/, /^(?:\s)/, /^(?:\s)/, /^(?:$)/],
+ conditions: { "namespace-body": { "rules": [26, 32, 33, 34, 35, 36, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "namespace": { "rules": [26, 28, 29, 30, 31, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class-body": { "rules": [26, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class": { "rules": [26, 38, 39, 40, 41, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr": { "rules": [9, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_title": { "rules": [7, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_args": { "rules": [22, 23, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_name": { "rules": [19, 20, 21, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "href": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "struct": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "generic": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "bqstring": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "string": { "rules": [24, 25, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 28, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96], "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 visibilityValues = ["#", "+", "~", "-", ""];
+class ClassMember {
+ constructor(input, memberType) {
+ this.memberType = memberType;
+ this.visibility = "";
+ this.classifier = "";
+ const sanitizedInput = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.d)(input, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ this.parseMember(sanitizedInput);
+ }
+ getDisplayDetails() {
+ let displayText = this.visibility + (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.v)(this.id);
+ if (this.memberType === "method") {
+ displayText += `(${(0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.v)(this.parameters.trim())})`;
+ if (this.returnType) {
+ displayText += " : " + (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.v)(this.returnType);
+ }
+ }
+ displayText = displayText.trim();
+ const cssStyle = this.parseClassifier();
+ return {
+ displayText,
+ cssStyle
+ };
+ }
+ parseMember(input) {
+ let potentialClassifier = "";
+ if (this.memberType === "method") {
+ const methodRegEx = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/;
+ const match = input.match(methodRegEx);
+ if (match) {
+ const detectedVisibility = match[1] ? match[1].trim() : "";
+ if (visibilityValues.includes(detectedVisibility)) {
+ this.visibility = detectedVisibility;
+ }
+ this.id = match[2].trim();
+ this.parameters = match[3] ? match[3].trim() : "";
+ potentialClassifier = match[4] ? match[4].trim() : "";
+ this.returnType = match[5] ? match[5].trim() : "";
+ if (potentialClassifier === "") {
+ const lastChar = this.returnType.substring(this.returnType.length - 1);
+ if (lastChar.match(/[$*]/)) {
+ potentialClassifier = lastChar;
+ this.returnType = this.returnType.substring(0, this.returnType.length - 1);
+ }
+ }
+ }
+ } else {
+ const length = input.length;
+ const firstChar = input.substring(0, 1);
+ const lastChar = input.substring(length - 1);
+ if (visibilityValues.includes(firstChar)) {
+ this.visibility = firstChar;
+ }
+ if (lastChar.match(/[$*]/)) {
+ potentialClassifier = lastChar;
+ }
+ this.id = input.substring(
+ this.visibility === "" ? 0 : 1,
+ potentialClassifier === "" ? length : length - 1
+ );
+ }
+ this.classifier = potentialClassifier;
+ }
+ parseClassifier() {
+ switch (this.classifier) {
+ case "*":
+ return "font-style:italic;";
+ case "$":
+ return "text-decoration:underline;";
+ default:
+ return "";
+ }
+ }
+}
+const MERMAID_DOM_ID_PREFIX = "classId-";
+let relations = [];
+let classes = {};
+let notes = [];
+let classCounter = 0;
+let namespaces = {};
+let namespaceCounter = 0;
+let functions = [];
+const sanitizeText = (txt) => _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(txt, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+const splitClassNameAndType = function(_id) {
+ const id = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ let genericType = "";
+ let className = id;
+ if (id.indexOf("~") > 0) {
+ const split = id.split("~");
+ className = sanitizeText(split[0]);
+ genericType = sanitizeText(split[1]);
+ }
+ return { className, type: genericType };
+};
+const setClassLabel = function(_id, label) {
+ const id = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ if (label) {
+ label = sanitizeText(label);
+ }
+ const { className } = splitClassNameAndType(id);
+ classes[className].label = label;
+};
+const addClass = function(_id) {
+ const id = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ const { className, type } = splitClassNameAndType(id);
+ if (Object.hasOwn(classes, className)) {
+ return;
+ }
+ const name = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(className, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ classes[name] = {
+ id: name,
+ type,
+ label: name,
+ cssClasses: [],
+ methods: [],
+ members: [],
+ annotations: [],
+ styles: [],
+ domId: MERMAID_DOM_ID_PREFIX + name + "-" + classCounter
+ };
+ classCounter++;
+};
+const lookUpDomId = function(_id) {
+ const id = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ if (id in classes) {
+ return classes[id].domId;
+ }
+ throw new Error("Class not found: " + id);
+};
+const clear = function() {
+ relations = [];
+ classes = {};
+ notes = [];
+ functions = [];
+ functions.push(setupToolTips);
+ namespaces = {};
+ namespaceCounter = 0;
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.t)();
+};
+const getClass = function(id) {
+ return classes[id];
+};
+const getClasses = function() {
+ return classes;
+};
+const getRelations = function() {
+ return relations;
+};
+const getNotes = function() {
+ return notes;
+};
+const addRelation = function(relation) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Adding relation: " + JSON.stringify(relation));
+ addClass(relation.id1);
+ addClass(relation.id2);
+ relation.id1 = splitClassNameAndType(relation.id1).className;
+ relation.id2 = splitClassNameAndType(relation.id2).className;
+ relation.relationTitle1 = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(relation.relationTitle1.trim(), (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ relation.relationTitle2 = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(relation.relationTitle2.trim(), (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ relations.push(relation);
+};
+const addAnnotation = function(className, annotation) {
+ const validatedClassName = splitClassNameAndType(className).className;
+ classes[validatedClassName].annotations.push(annotation);
+};
+const addMember = function(className, member) {
+ addClass(className);
+ const validatedClassName = splitClassNameAndType(className).className;
+ const theClass = classes[validatedClassName];
+ if (typeof member === "string") {
+ const memberString = member.trim();
+ if (memberString.startsWith("<<") && memberString.endsWith(">>")) {
+ theClass.annotations.push(sanitizeText(memberString.substring(2, memberString.length - 2)));
+ } else if (memberString.indexOf(")") > 0) {
+ theClass.methods.push(new ClassMember(memberString, "method"));
+ } else if (memberString) {
+ theClass.members.push(new ClassMember(memberString, "attribute"));
+ }
+ }
+};
+const addMembers = function(className, members) {
+ if (Array.isArray(members)) {
+ members.reverse();
+ members.forEach((member) => addMember(className, member));
+ }
+};
+const addNote = function(text, className) {
+ const note = {
+ id: `note${notes.length}`,
+ class: className,
+ text
+ };
+ notes.push(note);
+};
+const cleanupLabel = function(label) {
+ if (label.startsWith(":")) {
+ label = label.substring(1);
+ }
+ return sanitizeText(label.trim());
+};
+const setCssClass = function(ids, className) {
+ ids.split(",").forEach(function(_id) {
+ let id = _id;
+ if (_id[0].match(/\d/)) {
+ id = MERMAID_DOM_ID_PREFIX + id;
+ }
+ if (classes[id] !== void 0) {
+ classes[id].cssClasses.push(className);
+ }
+ });
+};
+const setTooltip = function(ids, tooltip) {
+ ids.split(",").forEach(function(id) {
+ if (tooltip !== void 0) {
+ classes[id].tooltip = sanitizeText(tooltip);
+ }
+ });
+};
+const getTooltip = function(id, namespace) {
+ if (namespace) {
+ return namespaces[namespace].classes[id].tooltip;
+ }
+ return classes[id].tooltip;
+};
+const setLink = function(ids, linkStr, target) {
+ const config = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)();
+ ids.split(",").forEach(function(_id) {
+ let id = _id;
+ if (_id[0].match(/\d/)) {
+ id = MERMAID_DOM_ID_PREFIX + id;
+ }
+ if (classes[id] !== void 0) {
+ classes[id].link = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.u.formatUrl(linkStr, config);
+ if (config.securityLevel === "sandbox") {
+ classes[id].linkTarget = "_top";
+ } else if (typeof target === "string") {
+ classes[id].linkTarget = sanitizeText(target);
+ } else {
+ classes[id].linkTarget = "_blank";
+ }
+ }
+ });
+ setCssClass(ids, "clickable");
+};
+const setClickEvent = function(ids, functionName, functionArgs) {
+ ids.split(",").forEach(function(id) {
+ setClickFunc(id, functionName, functionArgs);
+ classes[id].haveCallback = true;
+ });
+ setCssClass(ids, "clickable");
+};
+const setClickFunc = function(_domId, functionName, functionArgs) {
+ const domId = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_domId, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ const config = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)();
+ if (config.securityLevel !== "loose") {
+ return;
+ }
+ if (functionName === void 0) {
+ return;
+ }
+ const id = domId;
+ if (classes[id] !== void 0) {
+ const elemId = lookUpDomId(id);
+ 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(elemId);
+ }
+ functions.push(function() {
+ const elem = document.querySelector(`[id="${elemId}"]`);
+ if (elem !== null) {
+ elem.addEventListener(
+ "click",
+ function() {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.u.runFunc(functionName, ...argList);
+ },
+ false
+ );
+ }
+ });
+ }
+};
+const bindFunctions = function(element) {
+ functions.forEach(function(fun) {
+ fun(element);
+ });
+};
+const lineType = {
+ LINE: 0,
+ DOTTED_LINE: 1
+};
+const relationType = {
+ AGGREGATION: 0,
+ EXTENSION: 1,
+ COMPOSITION: 2,
+ DEPENDENCY: 3,
+ LOLLIPOP: 4
+};
+const setupToolTips = function(element) {
+ let tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(".mermaidTooltip");
+ if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
+ tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0);
+ }
+ const svg = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(element).select("svg");
+ const nodes = svg.selectAll("g.node");
+ nodes.on("mouseover", function() {
+ const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(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.top - 14 + document.body.scrollTop + "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 */ .Ys)(this);
+ el.classed("hover", false);
+ });
+};
+functions.push(setupToolTips);
+let direction = "TB";
+const getDirection = () => direction;
+const setDirection = (dir) => {
+ direction = dir;
+};
+const addNamespace = function(id) {
+ if (namespaces[id] !== void 0) {
+ return;
+ }
+ namespaces[id] = {
+ id,
+ classes: {},
+ children: {},
+ domId: MERMAID_DOM_ID_PREFIX + id + "-" + namespaceCounter
+ };
+ namespaceCounter++;
+};
+const getNamespace = function(name) {
+ return namespaces[name];
+};
+const getNamespaces = function() {
+ return namespaces;
+};
+const addClassesToNamespace = function(id, classNames) {
+ if (namespaces[id] === void 0) {
+ return;
+ }
+ for (const name of classNames) {
+ const { className } = splitClassNameAndType(name);
+ classes[className].parent = id;
+ namespaces[id].classes[className] = classes[className];
+ }
+};
+const setCssStyle = function(id, styles2) {
+ const thisClass = classes[id];
+ if (!styles2 || !thisClass) {
+ return;
+ }
+ for (const s of styles2) {
+ if (s.includes(",")) {
+ thisClass.styles.push(...s.split(","));
+ } else {
+ thisClass.styles.push(s);
+ }
+ }
+};
+const db = {
+ setAccTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.s,
+ getAccTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.g,
+ getAccDescription: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.a,
+ setAccDescription: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.b,
+ getConfig: () => (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().class,
+ addClass,
+ bindFunctions,
+ clear,
+ getClass,
+ getClasses,
+ getNotes,
+ addAnnotation,
+ addNote,
+ getRelations,
+ addRelation,
+ getDirection,
+ setDirection,
+ addMember,
+ addMembers,
+ cleanupLabel,
+ lineType,
+ relationType,
+ setClickEvent,
+ setCssClass,
+ setLink,
+ getTooltip,
+ setTooltip,
+ lookUpDomId,
+ setDiagramTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.q,
+ getDiagramTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.r,
+ setClassLabel,
+ addNamespace,
+ addClassesToNamespace,
+ getNamespace,
+ getNamespaces,
+ setCssStyle
+};
+const getStyles = (options) => `g.classGroup text {
+ fill: ${options.nodeBorder || options.classText};
+ stroke: none;
+ font-family: ${options.fontFamily};
+ font-size: 10px;
+
+ .title {
+ font-weight: bolder;
+ }
+
+}
+
+.nodeLabel, .edgeLabel {
+ color: ${options.classText};
+}
+.edgeLabel .label rect {
+ fill: ${options.mainBkg};
+}
+.label text {
+ fill: ${options.classText};
+}
+.edgeLabel .label span {
+ background: ${options.mainBkg};
+}
+
+.classTitle {
+ font-weight: bolder;
+}
+.node rect,
+ .node circle,
+ .node ellipse,
+ .node polygon,
+ .node path {
+ fill: ${options.mainBkg};
+ stroke: ${options.nodeBorder};
+ stroke-width: 1px;
+ }
+
+
+.divider {
+ stroke: ${options.nodeBorder};
+ stroke-width: 1;
+}
+
+g.clickable {
+ cursor: pointer;
+}
+
+g.classGroup rect {
+ fill: ${options.mainBkg};
+ stroke: ${options.nodeBorder};
+}
+
+g.classGroup line {
+ stroke: ${options.nodeBorder};
+ stroke-width: 1;
+}
+
+.classLabel .box {
+ stroke: none;
+ stroke-width: 0;
+ fill: ${options.mainBkg};
+ opacity: 0.5;
+}
+
+.classLabel .label {
+ fill: ${options.nodeBorder};
+ font-size: 10px;
+}
+
+.relation {
+ stroke: ${options.lineColor};
+ stroke-width: 1;
+ fill: none;
+}
+
+.dashed-line{
+ stroke-dasharray: 3;
+}
+
+.dotted-line{
+ stroke-dasharray: 1 2;
+}
+
+#compositionStart, .composition {
+ fill: ${options.lineColor} !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#compositionEnd, .composition {
+ fill: ${options.lineColor} !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#dependencyStart, .dependency {
+ fill: ${options.lineColor} !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#dependencyStart, .dependency {
+ fill: ${options.lineColor} !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#extensionStart, .extension {
+ fill: transparent !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#extensionEnd, .extension {
+ fill: transparent !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#aggregationStart, .aggregation {
+ fill: transparent !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#aggregationEnd, .aggregation {
+ fill: transparent !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#lollipopStart, .lollipop {
+ fill: ${options.mainBkg} !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#lollipopEnd, .lollipop {
+ fill: ${options.mainBkg} !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+.edgeTerminals {
+ font-size: 11px;
+ line-height: initial;
+}
+
+.classTitleText {
+ text-anchor: middle;
+ font-size: 18px;
+ fill: ${options.textColor};
+}
+`;
+const styles = getStyles;
+
+
+
+/***/ })
+
+};
+;
\ No newline at end of file
diff --git a/build/assets/js/1763.bb25d410.js b/build/assets/js/1763.bb25d410.js
deleted file mode 100644
index 105e2dae..00000000
--- a/build/assets/js/1763.bb25d410.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[1763],{43349:(e,t,n)=>{n.d(t,{a:()=>l});var r=n(96225);function l(e,t){var n=e.append("foreignObject").attr("width","100000"),l=n.append("xhtml:div");l.attr("xmlns","http://www.w3.org/1999/xhtml");var o=t.label;switch(typeof o){case"function":l.insert(o);break;case"object":l.insert((function(){return o}));break;default:l.html(o)}r.bg(l,t.labelStyle),l.style("display","inline-block"),l.style("white-space","nowrap");var a=l.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}},96225:(e,t,n)=>{n.d(t,{$p:()=>d,O1:()=>a,WR:()=>p,bF:()=>o,bg:()=>c});var r=n(37514),l=n(73234);function o(e,t){return!!e.children(t).length}function a(e){return i(e.v)+":"+i(e.w)+":"+i(e.name)}var s=/:/g;function i(e){return e?String(e).replace(s,"\\:"):""}function c(e,t){t&&e.attr("style",t)}function d(e,t,n){t&&e.attr("class",t).attr("class",n+" "+e.attr("class"))}function p(e,t){var n=t.graph();if(r.Z(n)){var o=n.transition;if(l.Z(o))return o(e)}return e}},1763:(e,t,n)=>{n.d(t,{diagram:()=>i});var r=n(88955),l=(n(45625),n(64218));n(85322),n(17452),n(3688),n(70870),n(41644),n(96225);n(43349);n(66749),n(74379);n(61666);l.c_6;var o=n(21358);n(27484),n(17967),n(27856),n(39354);const a={},s=function(e){const t=Object.keys(e);for(const n of t)a[n]=e[n]},i={parser:r.p,db:r.f,renderer:o.f,styles:o.a,init:e=>{e.flowchart||(e.flowchart={}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,s(e.flowchart),r.f.clear(),r.f.setGen("gen-1")}}},21358:(e,t,n)=>{n.d(t,{a:()=>h,f:()=>u});var r=n(45625),l=n(64218),o=n(85322),a=n(87936),s=n(43349),i=n(61691),c=n(71610);const d=(e,t)=>i.Z.lang.round(c.Z.parse(e)[t]);var p=n(51117);const b={},f=function(e,t,n,r,l,a){const i=r.select(`[id="${n}"]`);Object.keys(e).forEach((function(n){const r=e[n];let c="default";r.classes.length>0&&(c=r.classes.join(" ")),c+=" flowchart-label";const d=(0,o.k)(r.styles);let p,b=void 0!==r.text?r.text:r.id;if(o.l.info("vertex",r,r.labelType),"markdown"===r.labelType)o.l.info("vertex",r,r.labelType);else if((0,o.m)((0,o.c)().flowchart.htmlLabels)){const e={label:b.replace(/fa[blrs]?:fa-[\w-]+/g,(e=>``))};p=(0,s.a)(i,e).node(),p.parentNode.removeChild(p)}else{const e=l.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("style",d.labelStyle.replace("color:","fill:"));const t=b.split(o.e.lineBreakRegex);for(const n of t){const t=l.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","1"),t.textContent=n,e.appendChild(t)}p=e}let f=0,w="";switch(r.type){case"round":f=5,w="rect";break;case"square":case"group":default:w="rect";break;case"diamond":w="question";break;case"hexagon":w="hexagon";break;case"odd":case"odd_right":w="rect_left_inv_arrow";break;case"lean_right":w="lean_right";break;case"lean_left":w="lean_left";break;case"trapezoid":w="trapezoid";break;case"inv_trapezoid":w="inv_trapezoid";break;case"circle":w="circle";break;case"ellipse":w="ellipse";break;case"stadium":w="stadium";break;case"subroutine":w="subroutine";break;case"cylinder":w="cylinder";break;case"doublecircle":w="doublecircle"}t.setNode(r.id,{labelStyle:d.labelStyle,shape:w,labelText:b,labelType:r.labelType,rx:f,ry:f,class:c,style:d.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:a.db.getTooltip(r.id)||"",domId:a.db.lookUpDomId(r.id),haveCallback:r.haveCallback,width:"group"===r.type?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:(0,o.c)().flowchart.padding}),o.l.info("setNode",{labelStyle:d.labelStyle,labelType:r.labelType,shape:w,labelText:b,rx:f,ry:f,class:c,style:d.style,id:r.id,domId:a.db.lookUpDomId(r.id),width:"group"===r.type?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:(0,o.c)().flowchart.padding})}))},w=function(e,t,n){o.l.info("abc78 edges = ",e);let r,a,s=0,i={};if(void 0!==e.defaultStyle){const t=(0,o.k)(e.defaultStyle);r=t.style,a=t.labelStyle}e.forEach((function(n){s++;const c="L-"+n.start+"-"+n.end;void 0===i[c]?(i[c]=0,o.l.info("abc78 new entry",c,i[c])):(i[c]++,o.l.info("abc78 new entry",c,i[c]));let d=c+"-"+i[c];o.l.info("abc78 new link id to be used is",c,d,i[c]);const p="LS-"+n.start,f="LE-"+n.end,w={style:"",labelStyle:""};switch(w.minlen=n.length||1,"arrow_open"===n.type?w.arrowhead="none":w.arrowhead="normal",w.arrowTypeStart="arrow_open",w.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":w.arrowTypeStart="arrow_cross";case"arrow_cross":w.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":w.arrowTypeStart="arrow_point";case"arrow_point":w.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":w.arrowTypeStart="arrow_circle";case"arrow_circle":w.arrowTypeEnd="arrow_circle"}let u="",h="";switch(n.stroke){case"normal":u="fill:none;",void 0!==r&&(u=r),void 0!==a&&(h=a),w.thickness="normal",w.pattern="solid";break;case"dotted":w.thickness="normal",w.pattern="dotted",w.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":w.thickness="thick",w.pattern="solid",w.style="stroke-width: 3.5px;fill:none;";break;case"invisible":w.thickness="invisible",w.pattern="solid",w.style="stroke-width: 0;fill:none;"}if(void 0!==n.style){const e=(0,o.k)(n.style);u=e.style,h=e.labelStyle}w.style=w.style+=u,w.labelStyle=w.labelStyle+=h,void 0!==n.interpolate?w.curve=(0,o.n)(n.interpolate,l.c_6):void 0!==e.defaultInterpolate?w.curve=(0,o.n)(e.defaultInterpolate,l.c_6):w.curve=(0,o.n)(b.curve,l.c_6),void 0===n.text?void 0!==n.style&&(w.arrowheadStyle="fill: #333"):(w.arrowheadStyle="fill: #333",w.labelpos="c"),w.labelType=n.labelType,w.label=n.text.replace(o.e.lineBreakRegex,"\n"),void 0===n.style&&(w.style=w.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),w.labelStyle=w.labelStyle.replace("color:","fill:"),w.id=d,w.classes="flowchart-link "+p+" "+f,t.setEdge(n.start,n.end,w,s)}))},u={setConf:function(e){const t=Object.keys(e);for(const n of t)b[n]=e[n]},addVertices:f,addEdges:w,getClasses:function(e,t){return t.db.getClasses()},draw:async function(e,t,n,s){o.l.info("Drawing flowchart");let i=s.db.getDirection();void 0===i&&(i="TD");const{securityLevel:c,flowchart:d}=(0,o.c)(),p=d.nodeSpacing||50,b=d.rankSpacing||50;let u;"sandbox"===c&&(u=(0,l.Ys)("#i"+t));const h="sandbox"===c?(0,l.Ys)(u.nodes()[0].contentDocument.body):(0,l.Ys)("body"),g="sandbox"===c?u.nodes()[0].contentDocument:document,y=new r.k({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:p,ranksep:b,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return{}}));let k;const x=s.db.getSubGraphs();o.l.info("Subgraphs - ",x);for(let r=x.length-1;r>=0;r--)k=x[r],o.l.info("Subgraph - ",k),s.db.addVertex(k.id,{text:k.title,type:k.labelType},"group",void 0,k.classes,k.dir);const v=s.db.getVertices(),m=s.db.getEdges();o.l.info("Edges",m);let S=0;for(S=x.length-1;S>=0;S--){k=x[S],(0,l.td_)("cluster").append("text");for(let e=0;e`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${((e,t)=>{const n=d,r=n(e,"r"),l=n(e,"g"),o=n(e,"b");return p.Z(r,l,o,t)})(e.edgeLabelBackground,.5)};\n // background-color: \n }\n\n .cluster rect {\n fill: ${e.clusterBkg};\n stroke: ${e.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n`}}]);
\ No newline at end of file
diff --git a/build/assets/js/177.0cf72559.js b/build/assets/js/177.0cf72559.js
new file mode 100644
index 00000000..409d12c1
--- /dev/null
+++ b/build/assets/js/177.0cf72559.js
@@ -0,0 +1,3439 @@
+"use strict";
+exports.id = 177;
+exports.ids = [177];
+exports.modules = {
+
+/***/ 93177:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ diagram: () => (/* binding */ diagram)
+/* harmony export */ });
+/* harmony import */ var _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76365);
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64218);
+/* harmony import */ var _svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(72015);
+/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17967);
+/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27484);
+/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22424);
+
+
+
+
+
+
+
+
+
+
+
+
+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, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 13], $V7 = [1, 14], $V8 = [1, 16], $V9 = [1, 17], $Va = [1, 18], $Vb = [1, 24], $Vc = [1, 25], $Vd = [1, 26], $Ve = [1, 27], $Vf = [1, 28], $Vg = [1, 29], $Vh = [1, 30], $Vi = [1, 31], $Vj = [1, 32], $Vk = [1, 33], $Vl = [1, 34], $Vm = [1, 35], $Vn = [1, 36], $Vo = [1, 37], $Vp = [1, 38], $Vq = [1, 39], $Vr = [1, 41], $Vs = [1, 42], $Vt = [1, 43], $Vu = [1, 44], $Vv = [1, 45], $Vw = [1, 46], $Vx = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $Vy = [4, 5, 16, 50, 52, 53], $Vz = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VA = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VB = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 48, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VC = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VD = [68, 69, 70], $VE = [1, 120];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "SPACE": 4, "NEWLINE": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "box_section": 10, "box_line": 11, "participant_statement": 12, "create": 13, "box": 14, "restOfLine": 15, "end": 16, "signal": 17, "autonumber": 18, "NUM": 19, "off": 20, "activate": 21, "actor": 22, "deactivate": 23, "note_statement": 24, "links_statement": 25, "link_statement": 26, "properties_statement": 27, "details_statement": 28, "title": 29, "legacy_title": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "loop": 36, "rect": 37, "opt": 38, "alt": 39, "else_sections": 40, "par": 41, "par_sections": 42, "par_over": 43, "critical": 44, "option_sections": 45, "break": 46, "option": 47, "and": 48, "else": 49, "participant": 50, "AS": 51, "participant_actor": 52, "destroy": 53, "note": 54, "placement": 55, "text2": 56, "over": 57, "actor_pair": 58, "links": 59, "link": 60, "properties": 61, "details": 62, "spaceList": 63, ",": 64, "left_of": 65, "right_of": 66, "signaltype": 67, "+": 68, "-": 69, "ACTOR": 70, "SOLID_OPEN_ARROW": 71, "DOTTED_OPEN_ARROW": 72, "SOLID_ARROW": 73, "DOTTED_ARROW": 74, "SOLID_CROSS": 75, "DOTTED_CROSS": 76, "SOLID_POINT": 77, "DOTTED_POINT": 78, "TXT": 79, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 13: "create", 14: "box", 15: "restOfLine", 16: "end", 18: "autonumber", 19: "NUM", 20: "off", 21: "activate", 23: "deactivate", 29: "title", 30: "legacy_title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "loop", 37: "rect", 38: "opt", 39: "alt", 41: "par", 43: "par_over", 44: "critical", 46: "break", 47: "option", 48: "and", 49: "else", 50: "participant", 51: "AS", 52: "participant_actor", 53: "destroy", 54: "note", 57: "over", 59: "links", 60: "link", 61: "properties", 62: "details", 64: ",", 65: "left_of", 66: "right_of", 68: "+", 69: "-", 70: "ACTOR", 71: "SOLID_OPEN_ARROW", 72: "DOTTED_OPEN_ARROW", 73: "SOLID_ARROW", 74: "DOTTED_ARROW", 75: "SOLID_CROSS", 76: "DOTTED_CROSS", 77: "SOLID_POINT", 78: "DOTTED_POINT", 79: "TXT" },
+ productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 1], [9, 1], [9, 2], [9, 4], [9, 2], [9, 4], [9, 3], [9, 3], [9, 2], [9, 3], [9, 3], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [63, 2], [63, 1], [58, 3], [58, 1], [55, 1], [55, 1], [17, 5], [17, 5], [17, 4], [22, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [56, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 3:
+ yy.apply($$[$0]);
+ return $$[$0];
+ case 4:
+ case 9:
+ this.$ = [];
+ break;
+ case 5:
+ case 10:
+ $$[$0 - 1].push($$[$0]);
+ this.$ = $$[$0 - 1];
+ break;
+ case 6:
+ case 7:
+ case 11:
+ case 12:
+ this.$ = $$[$0];
+ break;
+ case 8:
+ case 13:
+ this.$ = [];
+ break;
+ case 15:
+ $$[$0].type = "createParticipant";
+ this.$ = $$[$0];
+ break;
+ case 16:
+ $$[$0 - 1].unshift({ type: "boxStart", boxData: yy.parseBoxData($$[$0 - 2]) });
+ $$[$0 - 1].push({ type: "boxEnd", boxText: $$[$0 - 2] });
+ this.$ = $$[$0 - 1];
+ break;
+ case 18:
+ this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 2]), sequenceIndexStep: Number($$[$0 - 1]), sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER };
+ break;
+ case 19:
+ this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 1]), sequenceIndexStep: 1, sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER };
+ break;
+ case 20:
+ this.$ = { type: "sequenceIndex", sequenceVisible: false, signalType: yy.LINETYPE.AUTONUMBER };
+ break;
+ case 21:
+ this.$ = { type: "sequenceIndex", sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER };
+ break;
+ case 22:
+ this.$ = { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] };
+ break;
+ case 23:
+ this.$ = { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 1] };
+ break;
+ case 29:
+ yy.setDiagramTitle($$[$0].substring(6));
+ this.$ = $$[$0].substring(6);
+ break;
+ case 30:
+ yy.setDiagramTitle($$[$0].substring(7));
+ this.$ = $$[$0].substring(7);
+ break;
+ case 31:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 32:
+ case 33:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 34:
+ $$[$0 - 1].unshift({ type: "loopStart", loopText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.LOOP_START });
+ $$[$0 - 1].push({ type: "loopEnd", loopText: $$[$0 - 2], signalType: yy.LINETYPE.LOOP_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 35:
+ $$[$0 - 1].unshift({ type: "rectStart", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_START });
+ $$[$0 - 1].push({ type: "rectEnd", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 36:
+ $$[$0 - 1].unshift({ type: "optStart", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_START });
+ $$[$0 - 1].push({ type: "optEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 37:
+ $$[$0 - 1].unshift({ type: "altStart", altText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.ALT_START });
+ $$[$0 - 1].push({ type: "altEnd", signalType: yy.LINETYPE.ALT_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 38:
+ $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_START });
+ $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 39:
+ $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_OVER_START });
+ $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 40:
+ $$[$0 - 1].unshift({ type: "criticalStart", criticalText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.CRITICAL_START });
+ $$[$0 - 1].push({ type: "criticalEnd", signalType: yy.LINETYPE.CRITICAL_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 41:
+ $$[$0 - 1].unshift({ type: "breakStart", breakText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_START });
+ $$[$0 - 1].push({ type: "breakEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 43:
+ this.$ = $$[$0 - 3].concat([{ type: "option", optionText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.CRITICAL_OPTION }, $$[$0]]);
+ break;
+ case 45:
+ this.$ = $$[$0 - 3].concat([{ type: "and", parText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.PAR_AND }, $$[$0]]);
+ break;
+ case 47:
+ this.$ = $$[$0 - 3].concat([{ type: "else", altText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.ALT_ELSE }, $$[$0]]);
+ break;
+ case 48:
+ $$[$0 - 3].draw = "participant";
+ $$[$0 - 3].type = "addParticipant";
+ $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]);
+ this.$ = $$[$0 - 3];
+ break;
+ case 49:
+ $$[$0 - 1].draw = "participant";
+ $$[$0 - 1].type = "addParticipant";
+ this.$ = $$[$0 - 1];
+ break;
+ case 50:
+ $$[$0 - 3].draw = "actor";
+ $$[$0 - 3].type = "addParticipant";
+ $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]);
+ this.$ = $$[$0 - 3];
+ break;
+ case 51:
+ $$[$0 - 1].draw = "actor";
+ $$[$0 - 1].type = "addParticipant";
+ this.$ = $$[$0 - 1];
+ break;
+ case 52:
+ $$[$0 - 1].type = "destroyParticipant";
+ this.$ = $$[$0 - 1];
+ break;
+ case 53:
+ this.$ = [$$[$0 - 1], { type: "addNote", placement: $$[$0 - 2], actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 54:
+ $$[$0 - 2] = [].concat($$[$0 - 1], $$[$0 - 1]).slice(0, 2);
+ $$[$0 - 2][0] = $$[$0 - 2][0].actor;
+ $$[$0 - 2][1] = $$[$0 - 2][1].actor;
+ this.$ = [$$[$0 - 1], { type: "addNote", placement: yy.PLACEMENT.OVER, actor: $$[$0 - 2].slice(0, 2), text: $$[$0] }];
+ break;
+ case 55:
+ this.$ = [$$[$0 - 1], { type: "addLinks", actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 56:
+ this.$ = [$$[$0 - 1], { type: "addALink", actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 57:
+ this.$ = [$$[$0 - 1], { type: "addProperties", actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 58:
+ this.$ = [$$[$0 - 1], { type: "addDetails", actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 61:
+ this.$ = [$$[$0 - 2], $$[$0]];
+ break;
+ case 62:
+ this.$ = $$[$0];
+ break;
+ case 63:
+ this.$ = yy.PLACEMENT.LEFTOF;
+ break;
+ case 64:
+ this.$ = yy.PLACEMENT.RIGHTOF;
+ break;
+ case 65:
+ this.$ = [
+ $$[$0 - 4],
+ $$[$0 - 1],
+ { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0], activate: true },
+ { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] }
+ ];
+ break;
+ case 66:
+ this.$ = [
+ $$[$0 - 4],
+ $$[$0 - 1],
+ { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0] },
+ { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 4] }
+ ];
+ break;
+ case 67:
+ this.$ = [$$[$0 - 3], $$[$0 - 1], { type: "addMessage", from: $$[$0 - 3].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 2], msg: $$[$0] }];
+ break;
+ case 68:
+ this.$ = { type: "addParticipant", actor: $$[$0] };
+ break;
+ case 69:
+ this.$ = yy.LINETYPE.SOLID_OPEN;
+ break;
+ case 70:
+ this.$ = yy.LINETYPE.DOTTED_OPEN;
+ break;
+ case 71:
+ this.$ = yy.LINETYPE.SOLID;
+ break;
+ case 72:
+ this.$ = yy.LINETYPE.DOTTED;
+ break;
+ case 73:
+ this.$ = yy.LINETYPE.SOLID_CROSS;
+ break;
+ case 74:
+ this.$ = yy.LINETYPE.DOTTED_CROSS;
+ break;
+ case 75:
+ this.$ = yy.LINETYPE.SOLID_POINT;
+ break;
+ case 76:
+ this.$ = yy.LINETYPE.DOTTED_POINT;
+ break;
+ case 77:
+ this.$ = yy.parseMessage($$[$0].trim().substring(1));
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 5]), { 9: 47, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 7]), o($Vx, [2, 8]), o($Vx, [2, 14]), { 12: 48, 50: $Vo, 52: $Vp, 53: $Vq }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: $Vw }, { 22: 55, 70: $Vw }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, o($Vx, [2, 29]), o($Vx, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, o($Vx, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: $Vw }, { 22: 72, 70: $Vw }, { 22: 73, 70: $Vw }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82] }, { 55: 83, 57: [1, 84], 65: [1, 85], 66: [1, 86] }, { 22: 87, 70: $Vw }, { 22: 88, 70: $Vw }, { 22: 89, 70: $Vw }, { 22: 90, 70: $Vw }, o([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79], [2, 68]), o($Vx, [2, 6]), o($Vx, [2, 15]), o($Vy, [2, 9], { 10: 91 }), o($Vx, [2, 17]), { 5: [1, 93], 19: [1, 92] }, { 5: [1, 94] }, o($Vx, [2, 21]), { 5: [1, 95] }, { 5: [1, 96] }, o($Vx, [2, 24]), o($Vx, [2, 25]), o($Vx, [2, 26]), o($Vx, [2, 27]), o($Vx, [2, 28]), o($Vx, [2, 31]), o($Vx, [2, 32]), o($Vz, $V3, { 7: 97 }), o($Vz, $V3, { 7: 98 }), o($Vz, $V3, { 7: 99 }), o($VA, $V3, { 40: 100, 7: 101 }), o($VB, $V3, { 42: 102, 7: 103 }), o($VB, $V3, { 7: 103, 42: 104 }), o($VC, $V3, { 45: 105, 7: 106 }), o($Vz, $V3, { 7: 107 }), { 5: [1, 109], 51: [1, 108] }, { 5: [1, 111], 51: [1, 110] }, { 5: [1, 112] }, { 22: 115, 68: [1, 113], 69: [1, 114], 70: $Vw }, o($VD, [2, 69]), o($VD, [2, 70]), o($VD, [2, 71]), o($VD, [2, 72]), o($VD, [2, 73]), o($VD, [2, 74]), o($VD, [2, 75]), o($VD, [2, 76]), { 22: 116, 70: $Vw }, { 22: 118, 58: 117, 70: $Vw }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 119, 79: $VE }, { 56: 121, 79: $VE }, { 56: 122, 79: $VE }, { 56: 123, 79: $VE }, { 4: [1, 126], 5: [1, 128], 11: 125, 12: 127, 16: [1, 124], 50: $Vo, 52: $Vp, 53: $Vq }, { 5: [1, 129] }, o($Vx, [2, 19]), o($Vx, [2, 20]), o($Vx, [2, 22]), o($Vx, [2, 23]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 130], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 131], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 132], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 133] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 46], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 49: [1, 134], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 135] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 44], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 48: [1, 136], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 137] }, { 16: [1, 138] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 42], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 47: [1, 139], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 140], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 15: [1, 141] }, o($Vx, [2, 49]), { 15: [1, 142] }, o($Vx, [2, 51]), o($Vx, [2, 52]), { 22: 143, 70: $Vw }, { 22: 144, 70: $Vw }, { 56: 145, 79: $VE }, { 56: 146, 79: $VE }, { 56: 147, 79: $VE }, { 64: [1, 148], 79: [2, 62] }, { 5: [2, 55] }, { 5: [2, 77] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, o($Vx, [2, 16]), o($Vy, [2, 10]), { 12: 149, 50: $Vo, 52: $Vp, 53: $Vq }, o($Vy, [2, 12]), o($Vy, [2, 13]), o($Vx, [2, 18]), o($Vx, [2, 34]), o($Vx, [2, 35]), o($Vx, [2, 36]), o($Vx, [2, 37]), { 15: [1, 150] }, o($Vx, [2, 38]), { 15: [1, 151] }, o($Vx, [2, 39]), o($Vx, [2, 40]), { 15: [1, 152] }, o($Vx, [2, 41]), { 5: [1, 153] }, { 5: [1, 154] }, { 56: 155, 79: $VE }, { 56: 156, 79: $VE }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 157, 70: $Vw }, o($Vy, [2, 11]), o($VA, $V3, { 7: 101, 40: 158 }), o($VB, $V3, { 7: 103, 42: 159 }), o($VC, $V3, { 7: 106, 45: 160 }), o($Vx, [2, 48]), o($Vx, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 79: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }],
+ defaultActions: { 5: [2, 1], 6: [2, 2], 85: [2, 63], 86: [2, 64], 119: [2, 55], 120: [2, 77], 121: [2, 56], 122: [2, 57], 123: [2, 58], 145: [2, 67], 146: [2, 53], 147: [2, 54], 155: [2, 65], 156: [2, 66], 157: [2, 61], 158: [2, 47], 159: [2, 45], 160: [2, 43] },
+ 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 lex() {
+ 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, state2, action, r, yyval = {}, p, len, newState, expected;
+ while (true) {
+ state2 = stack[stack.length - 1];
+ if (this.defaultActions[state2]) {
+ action = this.defaultActions[state2];
+ } else {
+ if (symbol === null || typeof symbol == "undefined") {
+ symbol = lex();
+ }
+ action = table[state2] && table[state2][symbol];
+ }
+ if (typeof action === "undefined" || !action.length || !action[0]) {
+ var errStr = "";
+ expected = [];
+ for (p in table[state2]) {
+ 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: " + state2 + ", 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 lex() {
+ 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: { "case-insensitive": true },
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
+ switch ($avoiding_name_collisions) {
+ case 0:
+ return 5;
+ case 1:
+ break;
+ case 2:
+ break;
+ case 3:
+ break;
+ case 4:
+ break;
+ case 5:
+ break;
+ case 6:
+ return 19;
+ case 7:
+ this.begin("LINE");
+ return 14;
+ case 8:
+ this.begin("ID");
+ return 50;
+ case 9:
+ this.begin("ID");
+ return 52;
+ case 10:
+ return 13;
+ case 11:
+ this.begin("ID");
+ return 53;
+ case 12:
+ yy_.yytext = yy_.yytext.trim();
+ this.begin("ALIAS");
+ return 70;
+ case 13:
+ this.popState();
+ this.popState();
+ this.begin("LINE");
+ return 51;
+ case 14:
+ this.popState();
+ this.popState();
+ return 5;
+ case 15:
+ this.begin("LINE");
+ return 36;
+ case 16:
+ this.begin("LINE");
+ return 37;
+ case 17:
+ this.begin("LINE");
+ return 38;
+ case 18:
+ this.begin("LINE");
+ return 39;
+ case 19:
+ this.begin("LINE");
+ return 49;
+ case 20:
+ this.begin("LINE");
+ return 41;
+ case 21:
+ this.begin("LINE");
+ return 43;
+ case 22:
+ this.begin("LINE");
+ return 48;
+ case 23:
+ this.begin("LINE");
+ return 44;
+ case 24:
+ this.begin("LINE");
+ return 47;
+ case 25:
+ this.begin("LINE");
+ return 46;
+ case 26:
+ this.popState();
+ return 15;
+ case 27:
+ return 16;
+ case 28:
+ return 65;
+ case 29:
+ return 66;
+ case 30:
+ return 59;
+ case 31:
+ return 60;
+ case 32:
+ return 61;
+ case 33:
+ return 62;
+ case 34:
+ return 57;
+ case 35:
+ return 54;
+ case 36:
+ this.begin("ID");
+ return 21;
+ case 37:
+ this.begin("ID");
+ return 23;
+ case 38:
+ return 29;
+ case 39:
+ return 30;
+ case 40:
+ this.begin("acc_title");
+ return 31;
+ case 41:
+ this.popState();
+ return "acc_title_value";
+ case 42:
+ this.begin("acc_descr");
+ return 33;
+ case 43:
+ this.popState();
+ return "acc_descr_value";
+ case 44:
+ this.begin("acc_descr_multiline");
+ break;
+ case 45:
+ this.popState();
+ break;
+ case 46:
+ return "acc_descr_multiline_value";
+ case 47:
+ return 6;
+ case 48:
+ return 18;
+ case 49:
+ return 20;
+ case 50:
+ return 64;
+ case 51:
+ return 5;
+ case 52:
+ yy_.yytext = yy_.yytext.trim();
+ return 70;
+ case 53:
+ return 73;
+ case 54:
+ return 74;
+ case 55:
+ return 71;
+ case 56:
+ return 72;
+ case 57:
+ return 75;
+ case 58:
+ return 76;
+ case 59:
+ return 77;
+ case 60:
+ return 78;
+ case 61:
+ return 79;
+ case 62:
+ return 68;
+ case 63:
+ return 69;
+ case 64:
+ return 5;
+ case 65:
+ return "INVALID";
+ }
+ },
+ rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:create\b)/i, /^(?:destroy\b)/i, /^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:rect\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:par_over\b)/i, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],
+ conditions: { "acc_descr_multiline": { "rules": [45, 46], "inclusive": false }, "acc_descr": { "rules": [43], "inclusive": false }, "acc_title": { "rules": [41], "inclusive": false }, "ID": { "rules": [2, 3, 12], "inclusive": false }, "ALIAS": { "rules": [2, 3, 13, 14], "inclusive": false }, "LINE": { "rules": [2, 3, 26], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "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;
+class ImperativeState {
+ /**
+ * @param init - Function that creates the default state.
+ */
+ constructor(init) {
+ this.init = init;
+ this.records = this.init();
+ }
+ reset() {
+ this.records = this.init();
+ }
+}
+const state = new ImperativeState(() => ({
+ prevActor: void 0,
+ actors: {},
+ createdActors: {},
+ destroyedActors: {},
+ boxes: [],
+ messages: [],
+ notes: [],
+ sequenceNumbersEnabled: false,
+ wrapEnabled: void 0,
+ currentBox: void 0,
+ lastCreated: void 0,
+ lastDestroyed: void 0
+}));
+const addBox = function(data) {
+ state.records.boxes.push({
+ name: data.text,
+ wrap: data.wrap === void 0 && autoWrap() || !!data.wrap,
+ fill: data.color,
+ actorKeys: []
+ });
+ state.records.currentBox = state.records.boxes.slice(-1)[0];
+};
+const addActor = function(id, name, description, type) {
+ let assignedBox = state.records.currentBox;
+ const old = state.records.actors[id];
+ if (old) {
+ if (state.records.currentBox && old.box && state.records.currentBox !== old.box) {
+ throw new Error(
+ "A same participant should only be defined in one Box: " + old.name + " can't be in '" + old.box.name + "' and in '" + state.records.currentBox.name + "' at the same time."
+ );
+ }
+ assignedBox = old.box ? old.box : state.records.currentBox;
+ old.box = assignedBox;
+ if (old && name === old.name && description == null) {
+ return;
+ }
+ }
+ if (description == null || description.text == null) {
+ description = { text: name, wrap: null, type };
+ }
+ if (type == null || description.text == null) {
+ description = { text: name, wrap: null, type };
+ }
+ state.records.actors[id] = {
+ box: assignedBox,
+ name,
+ description: description.text,
+ wrap: description.wrap === void 0 && autoWrap() || !!description.wrap,
+ prevActor: state.records.prevActor,
+ links: {},
+ properties: {},
+ actorCnt: null,
+ rectData: null,
+ type: type || "participant"
+ };
+ if (state.records.prevActor && state.records.actors[state.records.prevActor]) {
+ state.records.actors[state.records.prevActor].nextActor = id;
+ }
+ if (state.records.currentBox) {
+ state.records.currentBox.actorKeys.push(id);
+ }
+ state.records.prevActor = id;
+};
+const activationCount = (part) => {
+ let i;
+ let count = 0;
+ for (i = 0; i < state.records.messages.length; i++) {
+ if (state.records.messages[i].type === LINETYPE.ACTIVE_START && state.records.messages[i].from.actor === part) {
+ count++;
+ }
+ if (state.records.messages[i].type === LINETYPE.ACTIVE_END && state.records.messages[i].from.actor === part) {
+ count--;
+ }
+ }
+ return count;
+};
+const addMessage = function(idFrom, idTo, message, answer) {
+ state.records.messages.push({
+ from: idFrom,
+ to: idTo,
+ message: message.text,
+ wrap: message.wrap === void 0 && autoWrap() || !!message.wrap,
+ answer
+ });
+};
+const addSignal = function(idFrom, idTo, message = { text: void 0, wrap: void 0 }, messageType, activate = false) {
+ if (messageType === LINETYPE.ACTIVE_END) {
+ const cnt = activationCount(idFrom.actor);
+ if (cnt < 1) {
+ let error = new Error("Trying to inactivate an inactive participant (" + idFrom.actor + ")");
+ error.hash = {
+ text: "->>-",
+ token: "->>-",
+ line: "1",
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
+ expected: ["'ACTIVE_PARTICIPANT'"]
+ };
+ throw error;
+ }
+ }
+ state.records.messages.push({
+ from: idFrom,
+ to: idTo,
+ message: message.text,
+ wrap: message.wrap === void 0 && autoWrap() || !!message.wrap,
+ type: messageType,
+ activate
+ });
+ return true;
+};
+const hasAtLeastOneBox = function() {
+ return state.records.boxes.length > 0;
+};
+const hasAtLeastOneBoxWithTitle = function() {
+ return state.records.boxes.some((b) => b.name);
+};
+const getMessages = function() {
+ return state.records.messages;
+};
+const getBoxes = function() {
+ return state.records.boxes;
+};
+const getActors = function() {
+ return state.records.actors;
+};
+const getCreatedActors = function() {
+ return state.records.createdActors;
+};
+const getDestroyedActors = function() {
+ return state.records.destroyedActors;
+};
+const getActor = function(id) {
+ return state.records.actors[id];
+};
+const getActorKeys = function() {
+ return Object.keys(state.records.actors);
+};
+const enableSequenceNumbers = function() {
+ state.records.sequenceNumbersEnabled = true;
+};
+const disableSequenceNumbers = function() {
+ state.records.sequenceNumbersEnabled = false;
+};
+const showSequenceNumbers = () => state.records.sequenceNumbersEnabled;
+const setWrap = function(wrapSetting) {
+ state.records.wrapEnabled = wrapSetting;
+};
+const autoWrap = () => {
+ if (state.records.wrapEnabled !== void 0) {
+ return state.records.wrapEnabled;
+ }
+ return (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)().sequence.wrap;
+};
+const clear = function() {
+ state.reset();
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.t)();
+};
+const parseMessage = function(str) {
+ const _str = str.trim();
+ const message = {
+ text: _str.replace(/^:?(?:no)?wrap:/, "").trim(),
+ wrap: _str.match(/^:?wrap:/) !== null ? true : _str.match(/^:?nowrap:/) !== null ? false : void 0
+ };
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("parseMessage:", message);
+ return message;
+};
+const parseBoxData = function(str) {
+ const match = str.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);
+ let color = match != null && match[1] ? match[1].trim() : "transparent";
+ let title = match != null && match[2] ? match[2].trim() : void 0;
+ if (window && window.CSS) {
+ if (!window.CSS.supports("color", color)) {
+ color = "transparent";
+ title = str.trim();
+ }
+ } else {
+ const style = new Option().style;
+ style.color = color;
+ if (style.color !== color) {
+ color = "transparent";
+ title = str.trim();
+ }
+ }
+ return {
+ color,
+ text: title !== void 0 ? (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.d)(title.replace(/^:?(?:no)?wrap:/, ""), (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)()) : void 0,
+ wrap: title !== void 0 ? title.match(/^:?wrap:/) !== null ? true : title.match(/^:?nowrap:/) !== null ? false : void 0 : void 0
+ };
+};
+const LINETYPE = {
+ SOLID: 0,
+ DOTTED: 1,
+ NOTE: 2,
+ SOLID_CROSS: 3,
+ DOTTED_CROSS: 4,
+ SOLID_OPEN: 5,
+ DOTTED_OPEN: 6,
+ LOOP_START: 10,
+ LOOP_END: 11,
+ ALT_START: 12,
+ ALT_ELSE: 13,
+ ALT_END: 14,
+ OPT_START: 15,
+ OPT_END: 16,
+ ACTIVE_START: 17,
+ ACTIVE_END: 18,
+ PAR_START: 19,
+ PAR_AND: 20,
+ PAR_END: 21,
+ RECT_START: 22,
+ RECT_END: 23,
+ SOLID_POINT: 24,
+ DOTTED_POINT: 25,
+ AUTONUMBER: 26,
+ CRITICAL_START: 27,
+ CRITICAL_OPTION: 28,
+ CRITICAL_END: 29,
+ BREAK_START: 30,
+ BREAK_END: 31,
+ PAR_OVER_START: 32
+};
+const ARROWTYPE = {
+ FILLED: 0,
+ OPEN: 1
+};
+const PLACEMENT = {
+ LEFTOF: 0,
+ RIGHTOF: 1,
+ OVER: 2
+};
+const addNote = function(actor, placement, message) {
+ const note = {
+ actor,
+ placement,
+ message: message.text,
+ wrap: message.wrap === void 0 && autoWrap() || !!message.wrap
+ };
+ const actors = [].concat(actor, actor);
+ state.records.notes.push(note);
+ state.records.messages.push({
+ from: actors[0],
+ to: actors[1],
+ message: message.text,
+ wrap: message.wrap === void 0 && autoWrap() || !!message.wrap,
+ type: LINETYPE.NOTE,
+ placement
+ });
+};
+const addLinks = function(actorId, text) {
+ const actor = getActor(actorId);
+ try {
+ let sanitizedText = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.text, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)());
+ sanitizedText = sanitizedText.replace(/&/g, "&");
+ sanitizedText = sanitizedText.replace(/=/g, "=");
+ const links = JSON.parse(sanitizedText);
+ insertLinks(actor, links);
+ } catch (e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor link text", e);
+ }
+};
+const addALink = function(actorId, text) {
+ const actor = getActor(actorId);
+ try {
+ const links = {};
+ let sanitizedText = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.text, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)());
+ var sep = sanitizedText.indexOf("@");
+ sanitizedText = sanitizedText.replace(/&/g, "&");
+ sanitizedText = sanitizedText.replace(/=/g, "=");
+ var label = sanitizedText.slice(0, sep - 1).trim();
+ var link = sanitizedText.slice(sep + 1).trim();
+ links[label] = link;
+ insertLinks(actor, links);
+ } catch (e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor link text", e);
+ }
+};
+function insertLinks(actor, links) {
+ if (actor.links == null) {
+ actor.links = links;
+ } else {
+ for (let key in links) {
+ actor.links[key] = links[key];
+ }
+ }
+}
+const addProperties = function(actorId, text) {
+ const actor = getActor(actorId);
+ try {
+ let sanitizedText = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.text, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)());
+ const properties = JSON.parse(sanitizedText);
+ insertProperties(actor, properties);
+ } catch (e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor properties text", e);
+ }
+};
+function insertProperties(actor, properties) {
+ if (actor.properties == null) {
+ actor.properties = properties;
+ } else {
+ for (let key in properties) {
+ actor.properties[key] = properties[key];
+ }
+ }
+}
+function boxEnd() {
+ state.records.currentBox = void 0;
+}
+const addDetails = function(actorId, text) {
+ const actor = getActor(actorId);
+ const elem = document.getElementById(text.text);
+ try {
+ const text2 = elem.innerHTML;
+ const details = JSON.parse(text2);
+ if (details["properties"]) {
+ insertProperties(actor, details["properties"]);
+ }
+ if (details["links"]) {
+ insertLinks(actor, details["links"]);
+ }
+ } catch (e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor details text", e);
+ }
+};
+const getActorProperty = function(actor, key) {
+ if (actor !== void 0 && actor.properties !== void 0) {
+ return actor.properties[key];
+ }
+ return void 0;
+};
+const apply = function(param) {
+ if (Array.isArray(param)) {
+ param.forEach(function(item) {
+ apply(item);
+ });
+ } else {
+ switch (param.type) {
+ case "sequenceIndex":
+ state.records.messages.push({
+ from: void 0,
+ to: void 0,
+ message: {
+ start: param.sequenceIndex,
+ step: param.sequenceIndexStep,
+ visible: param.sequenceVisible
+ },
+ wrap: false,
+ type: param.signalType
+ });
+ break;
+ case "addParticipant":
+ addActor(param.actor, param.actor, param.description, param.draw);
+ break;
+ case "createParticipant":
+ if (state.records.actors[param.actor]) {
+ throw new Error(
+ "It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior"
+ );
+ }
+ state.records.lastCreated = param.actor;
+ addActor(param.actor, param.actor, param.description, param.draw);
+ state.records.createdActors[param.actor] = state.records.messages.length;
+ break;
+ case "destroyParticipant":
+ state.records.lastDestroyed = param.actor;
+ state.records.destroyedActors[param.actor] = state.records.messages.length;
+ break;
+ case "activeStart":
+ addSignal(param.actor, void 0, void 0, param.signalType);
+ break;
+ case "activeEnd":
+ addSignal(param.actor, void 0, void 0, param.signalType);
+ break;
+ case "addNote":
+ addNote(param.actor, param.placement, param.text);
+ break;
+ case "addLinks":
+ addLinks(param.actor, param.text);
+ break;
+ case "addALink":
+ addALink(param.actor, param.text);
+ break;
+ case "addProperties":
+ addProperties(param.actor, param.text);
+ break;
+ case "addDetails":
+ addDetails(param.actor, param.text);
+ break;
+ case "addMessage":
+ if (state.records.lastCreated) {
+ if (param.to !== state.records.lastCreated) {
+ throw new Error(
+ "The created participant " + state.records.lastCreated + " does not have an associated creating message after its declaration. Please check the sequence diagram."
+ );
+ } else {
+ state.records.lastCreated = void 0;
+ }
+ } else if (state.records.lastDestroyed) {
+ if (param.to !== state.records.lastDestroyed && param.from !== state.records.lastDestroyed) {
+ throw new Error(
+ "The destroyed participant " + state.records.lastDestroyed + " does not have an associated destroying message after its declaration. Please check the sequence diagram."
+ );
+ } else {
+ state.records.lastDestroyed = void 0;
+ }
+ }
+ addSignal(param.from, param.to, param.msg, param.signalType, param.activate);
+ break;
+ case "boxStart":
+ addBox(param.boxData);
+ break;
+ case "boxEnd":
+ boxEnd();
+ break;
+ case "loopStart":
+ addSignal(void 0, void 0, param.loopText, param.signalType);
+ break;
+ case "loopEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ case "rectStart":
+ addSignal(void 0, void 0, param.color, param.signalType);
+ break;
+ case "rectEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ case "optStart":
+ addSignal(void 0, void 0, param.optText, param.signalType);
+ break;
+ case "optEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ case "altStart":
+ addSignal(void 0, void 0, param.altText, param.signalType);
+ break;
+ case "else":
+ addSignal(void 0, void 0, param.altText, param.signalType);
+ break;
+ case "altEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ case "setAccTitle":
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.s)(param.text);
+ break;
+ case "parStart":
+ addSignal(void 0, void 0, param.parText, param.signalType);
+ break;
+ case "and":
+ addSignal(void 0, void 0, param.parText, param.signalType);
+ break;
+ case "parEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ case "criticalStart":
+ addSignal(void 0, void 0, param.criticalText, param.signalType);
+ break;
+ case "option":
+ addSignal(void 0, void 0, param.optionText, param.signalType);
+ break;
+ case "criticalEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ case "breakStart":
+ addSignal(void 0, void 0, param.breakText, param.signalType);
+ break;
+ case "breakEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ }
+ }
+};
+const db = {
+ addActor,
+ addMessage,
+ addSignal,
+ addLinks,
+ addDetails,
+ addProperties,
+ autoWrap,
+ setWrap,
+ enableSequenceNumbers,
+ disableSequenceNumbers,
+ showSequenceNumbers,
+ getMessages,
+ getActors,
+ getCreatedActors,
+ getDestroyedActors,
+ getActor,
+ getActorKeys,
+ getActorProperty,
+ getAccTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.g,
+ getBoxes,
+ getDiagramTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.r,
+ setDiagramTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.q,
+ getConfig: () => (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)().sequence,
+ clear,
+ parseMessage,
+ parseBoxData,
+ LINETYPE,
+ ARROWTYPE,
+ PLACEMENT,
+ addNote,
+ setAccTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.s,
+ apply,
+ setAccDescription: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.b,
+ getAccDescription: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.a,
+ hasAtLeastOneBox,
+ hasAtLeastOneBoxWithTitle
+};
+const getStyles = (options) => `.actor {
+ stroke: ${options.actorBorder};
+ fill: ${options.actorBkg};
+ }
+
+ text.actor > tspan {
+ fill: ${options.actorTextColor};
+ stroke: none;
+ }
+
+ .actor-line {
+ stroke: ${options.actorLineColor};
+ }
+
+ .messageLine0 {
+ stroke-width: 1.5;
+ stroke-dasharray: none;
+ stroke: ${options.signalColor};
+ }
+
+ .messageLine1 {
+ stroke-width: 1.5;
+ stroke-dasharray: 2, 2;
+ stroke: ${options.signalColor};
+ }
+
+ #arrowhead path {
+ fill: ${options.signalColor};
+ stroke: ${options.signalColor};
+ }
+
+ .sequenceNumber {
+ fill: ${options.sequenceNumberColor};
+ }
+
+ #sequencenumber {
+ fill: ${options.signalColor};
+ }
+
+ #crosshead path {
+ fill: ${options.signalColor};
+ stroke: ${options.signalColor};
+ }
+
+ .messageText {
+ fill: ${options.signalTextColor};
+ stroke: none;
+ }
+
+ .labelBox {
+ stroke: ${options.labelBoxBorderColor};
+ fill: ${options.labelBoxBkgColor};
+ }
+
+ .labelText, .labelText > tspan {
+ fill: ${options.labelTextColor};
+ stroke: none;
+ }
+
+ .loopText, .loopText > tspan {
+ fill: ${options.loopTextColor};
+ stroke: none;
+ }
+
+ .loopLine {
+ stroke-width: 2px;
+ stroke-dasharray: 2, 2;
+ stroke: ${options.labelBoxBorderColor};
+ fill: ${options.labelBoxBorderColor};
+ }
+
+ .note {
+ //stroke: #decc93;
+ stroke: ${options.noteBorderColor};
+ fill: ${options.noteBkgColor};
+ }
+
+ .noteText, .noteText > tspan {
+ fill: ${options.noteTextColor};
+ stroke: none;
+ }
+
+ .activation0 {
+ fill: ${options.activationBkgColor};
+ stroke: ${options.activationBorderColor};
+ }
+
+ .activation1 {
+ fill: ${options.activationBkgColor};
+ stroke: ${options.activationBorderColor};
+ }
+
+ .activation2 {
+ fill: ${options.activationBkgColor};
+ stroke: ${options.activationBorderColor};
+ }
+
+ .actorPopupMenu {
+ position: absolute;
+ }
+
+ .actorPopupMenuPanel {
+ position: absolute;
+ fill: ${options.actorBkg};
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
+}
+ .actor-man line {
+ stroke: ${options.actorBorder};
+ fill: ${options.actorBkg};
+ }
+ .actor-man circle, line {
+ stroke: ${options.actorBorder};
+ fill: ${options.actorBkg};
+ stroke-width: 2px;
+ }
+`;
+const styles = getStyles;
+const ACTOR_TYPE_WIDTH = 18 * 2;
+const drawRect = function(elem, rectData) {
+ return (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.d)(elem, rectData);
+};
+const addPopupInteraction = (id, actorCnt2) => {
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.F)(() => {
+ const arr = document.querySelectorAll(id);
+ if (arr.length === 0) {
+ return;
+ }
+ arr[0].addEventListener("mouseover", function() {
+ popupMenuUpFunc("actor" + actorCnt2 + "_popup");
+ });
+ arr[0].addEventListener("mouseout", function() {
+ popupMenuDownFunc("actor" + actorCnt2 + "_popup");
+ });
+ });
+};
+const drawPopup = function(elem, actor, minMenuWidth, textAttrs, forceMenus) {
+ if (actor.links === void 0 || actor.links === null || Object.keys(actor.links).length === 0) {
+ return { height: 0, width: 0 };
+ }
+ const links = actor.links;
+ const actorCnt2 = actor.actorCnt;
+ const rectData = actor.rectData;
+ var displayValue = "none";
+ if (forceMenus) {
+ displayValue = "block !important";
+ }
+ const g = elem.append("g");
+ g.attr("id", "actor" + actorCnt2 + "_popup");
+ g.attr("class", "actorPopupMenu");
+ g.attr("display", displayValue);
+ addPopupInteraction("#actor" + actorCnt2 + "_popup", actorCnt2);
+ var actorClass = "";
+ if (rectData.class !== void 0) {
+ actorClass = " " + rectData.class;
+ }
+ let menuWidth = rectData.width > minMenuWidth ? rectData.width : minMenuWidth;
+ const rectElem = g.append("rect");
+ rectElem.attr("class", "actorPopupMenuPanel" + actorClass);
+ rectElem.attr("x", rectData.x);
+ rectElem.attr("y", rectData.height);
+ rectElem.attr("fill", rectData.fill);
+ rectElem.attr("stroke", rectData.stroke);
+ rectElem.attr("width", menuWidth);
+ rectElem.attr("height", rectData.height);
+ rectElem.attr("rx", rectData.rx);
+ rectElem.attr("ry", rectData.ry);
+ if (links != null) {
+ var linkY = 20;
+ for (let key in links) {
+ var linkElem = g.append("a");
+ var sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .Nm)(links[key]);
+ linkElem.attr("xlink:href", sanitizedLink);
+ linkElem.attr("target", "_blank");
+ _drawMenuItemTextCandidateFunc(textAttrs)(
+ key,
+ linkElem,
+ rectData.x + 10,
+ rectData.height + linkY,
+ menuWidth,
+ 20,
+ { class: "actor" },
+ textAttrs
+ );
+ linkY += 30;
+ }
+ }
+ rectElem.attr("height", linkY);
+ return { height: rectData.height + linkY, width: menuWidth };
+};
+const popupMenu = function(popid) {
+ return "var pu = document.getElementById('" + popid + "'); if (pu != null) { pu.style.display = 'block'; }";
+};
+const popdownMenu = function(popid) {
+ return "var pu = document.getElementById('" + popid + "'); if (pu != null) { pu.style.display = 'none'; }";
+};
+const popupMenuUpFunc = function(popupId) {
+ var pu = document.getElementById(popupId);
+ if (pu != null) {
+ pu.style.display = "block";
+ }
+};
+const popupMenuDownFunc = function(popupId) {
+ var pu = document.getElementById(popupId);
+ if (pu != null) {
+ pu.style.display = "none";
+ }
+};
+const drawText = function(elem, textData) {
+ let prevTextHeight = 0;
+ let textHeight = 0;
+ const lines = textData.text.split(_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex);
+ const [_textFontSize, _textFontSizePx] = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.C)(textData.fontSize);
+ let textElems = [];
+ let dy = 0;
+ let yfunc = () => textData.y;
+ if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) {
+ switch (textData.valign) {
+ case "top":
+ case "start":
+ yfunc = () => Math.round(textData.y + textData.textMargin);
+ break;
+ case "middle":
+ case "center":
+ yfunc = () => Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2);
+ break;
+ case "bottom":
+ case "end":
+ yfunc = () => Math.round(
+ textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin
+ );
+ break;
+ }
+ }
+ if (textData.anchor !== void 0 && textData.textMargin !== void 0 && textData.width !== void 0) {
+ switch (textData.anchor) {
+ case "left":
+ case "start":
+ textData.x = Math.round(textData.x + textData.textMargin);
+ textData.anchor = "start";
+ textData.dominantBaseline = "middle";
+ textData.alignmentBaseline = "middle";
+ break;
+ case "middle":
+ case "center":
+ textData.x = Math.round(textData.x + textData.width / 2);
+ textData.anchor = "middle";
+ textData.dominantBaseline = "middle";
+ textData.alignmentBaseline = "middle";
+ break;
+ case "right":
+ case "end":
+ textData.x = Math.round(textData.x + textData.width - textData.textMargin);
+ textData.anchor = "end";
+ textData.dominantBaseline = "middle";
+ textData.alignmentBaseline = "middle";
+ break;
+ }
+ }
+ for (let [i, line] of lines.entries()) {
+ if (textData.textMargin !== void 0 && textData.textMargin === 0 && _textFontSize !== void 0) {
+ dy = i * _textFontSize;
+ }
+ const textElem = elem.append("text");
+ textElem.attr("x", textData.x);
+ textElem.attr("y", yfunc());
+ if (textData.anchor !== void 0) {
+ textElem.attr("text-anchor", textData.anchor).attr("dominant-baseline", textData.dominantBaseline).attr("alignment-baseline", textData.alignmentBaseline);
+ }
+ if (textData.fontFamily !== void 0) {
+ textElem.style("font-family", textData.fontFamily);
+ }
+ if (_textFontSizePx !== void 0) {
+ textElem.style("font-size", _textFontSizePx);
+ }
+ if (textData.fontWeight !== void 0) {
+ textElem.style("font-weight", textData.fontWeight);
+ }
+ if (textData.fill !== void 0) {
+ textElem.attr("fill", textData.fill);
+ }
+ if (textData.class !== void 0) {
+ textElem.attr("class", textData.class);
+ }
+ if (textData.dy !== void 0) {
+ textElem.attr("dy", textData.dy);
+ } else if (dy !== 0) {
+ textElem.attr("dy", dy);
+ }
+ const text = line || _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.Z;
+ if (textData.tspan) {
+ const span = textElem.append("tspan");
+ span.attr("x", textData.x);
+ if (textData.fill !== void 0) {
+ span.attr("fill", textData.fill);
+ }
+ span.text(text);
+ } else {
+ textElem.text(text);
+ }
+ if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) {
+ textHeight += (textElem._groups || textElem)[0][0].getBBox().height;
+ prevTextHeight = textHeight;
+ }
+ textElems.push(textElem);
+ }
+ return textElems;
+};
+const drawLabel = function(elem, txtObject) {
+ function genPoints(x, y, width, height, cut) {
+ return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height);
+ }
+ const polygon = elem.append("polygon");
+ polygon.attr("points", genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7));
+ polygon.attr("class", "labelBox");
+ txtObject.y = txtObject.y + txtObject.height / 2;
+ drawText(elem, txtObject);
+ return polygon;
+};
+let actorCnt = -1;
+const fixLifeLineHeights = (diagram2, actors, actorKeys, conf2) => {
+ if (!diagram2.select) {
+ return;
+ }
+ actorKeys.forEach((actorKey) => {
+ const actor = actors[actorKey];
+ const actorDOM = diagram2.select("#actor" + actor.actorCnt);
+ if (!conf2.mirrorActors && actor.stopy) {
+ actorDOM.attr("y2", actor.stopy + actor.height / 2);
+ } else if (conf2.mirrorActors) {
+ actorDOM.attr("y2", actor.stopy);
+ }
+ });
+};
+const drawActorTypeParticipant = function(elem, actor, conf2, isFooter) {
+ const actorY = isFooter ? actor.stopy : actor.starty;
+ const center = actor.x + actor.width / 2;
+ const centerY = actorY + 5;
+ const boxpluslineGroup = elem.append("g").lower();
+ var g = boxpluslineGroup;
+ if (!isFooter) {
+ actorCnt++;
+ g.append("line").attr("id", "actor" + actorCnt).attr("x1", center).attr("y1", centerY).attr("x2", center).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999");
+ g = boxpluslineGroup.append("g");
+ actor.actorCnt = actorCnt;
+ if (actor.links != null) {
+ g.attr("id", "root-" + actorCnt);
+ addPopupInteraction("#root-" + actorCnt, actorCnt);
+ }
+ }
+ const rect = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.g)();
+ var cssclass = "actor";
+ if (actor.properties != null && actor.properties["class"]) {
+ cssclass = actor.properties["class"];
+ } else {
+ rect.fill = "#eaeaea";
+ }
+ rect.x = actor.x;
+ rect.y = actorY;
+ rect.width = actor.width;
+ rect.height = actor.height;
+ rect.class = cssclass;
+ rect.rx = 3;
+ rect.ry = 3;
+ const rectElem = drawRect(g, rect);
+ actor.rectData = rect;
+ if (actor.properties != null && actor.properties["icon"]) {
+ const iconSrc = actor.properties["icon"].trim();
+ if (iconSrc.charAt(0) === "@") {
+ (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.b)(g, rect.x + rect.width - 20, rect.y + 10, iconSrc.substr(1));
+ } else {
+ (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.c)(g, rect.x + rect.width - 20, rect.y + 10, iconSrc);
+ }
+ }
+ _drawTextCandidateFunc(conf2)(
+ actor.description,
+ g,
+ rect.x,
+ rect.y,
+ rect.width,
+ rect.height,
+ { class: "actor" },
+ conf2
+ );
+ let height = actor.height;
+ if (rectElem.node) {
+ const bounds2 = rectElem.node().getBBox();
+ actor.height = bounds2.height;
+ height = bounds2.height;
+ }
+ return height;
+};
+const drawActorTypeActor = function(elem, actor, conf2, isFooter) {
+ const actorY = isFooter ? actor.stopy : actor.starty;
+ const center = actor.x + actor.width / 2;
+ const centerY = actorY + 80;
+ elem.lower();
+ if (!isFooter) {
+ actorCnt++;
+ elem.append("line").attr("id", "actor" + actorCnt).attr("x1", center).attr("y1", centerY).attr("x2", center).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999");
+ actor.actorCnt = actorCnt;
+ }
+ const actElem = elem.append("g");
+ actElem.attr("class", "actor-man");
+ const rect = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.g)();
+ rect.x = actor.x;
+ rect.y = actorY;
+ rect.fill = "#eaeaea";
+ rect.width = actor.width;
+ rect.height = actor.height;
+ rect.class = "actor";
+ rect.rx = 3;
+ rect.ry = 3;
+ actElem.append("line").attr("id", "actor-man-torso" + actorCnt).attr("x1", center).attr("y1", actorY + 25).attr("x2", center).attr("y2", actorY + 45);
+ actElem.append("line").attr("id", "actor-man-arms" + actorCnt).attr("x1", center - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 33).attr("x2", center + ACTOR_TYPE_WIDTH / 2).attr("y2", actorY + 33);
+ actElem.append("line").attr("x1", center - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 60).attr("x2", center).attr("y2", actorY + 45);
+ actElem.append("line").attr("x1", center).attr("y1", actorY + 45).attr("x2", center + ACTOR_TYPE_WIDTH / 2 - 2).attr("y2", actorY + 60);
+ const circle = actElem.append("circle");
+ circle.attr("cx", actor.x + actor.width / 2);
+ circle.attr("cy", actorY + 10);
+ circle.attr("r", 15);
+ circle.attr("width", actor.width);
+ circle.attr("height", actor.height);
+ const bounds2 = actElem.node().getBBox();
+ actor.height = bounds2.height;
+ _drawTextCandidateFunc(conf2)(
+ actor.description,
+ actElem,
+ rect.x,
+ rect.y + 35,
+ rect.width,
+ rect.height,
+ { class: "actor" },
+ conf2
+ );
+ return actor.height;
+};
+const drawActor = function(elem, actor, conf2, isFooter) {
+ switch (actor.type) {
+ case "actor":
+ return drawActorTypeActor(elem, actor, conf2, isFooter);
+ case "participant":
+ return drawActorTypeParticipant(elem, actor, conf2, isFooter);
+ }
+};
+const drawBox = function(elem, box, conf2) {
+ const boxplustextGroup = elem.append("g");
+ const g = boxplustextGroup;
+ drawBackgroundRect(g, box);
+ if (box.name) {
+ _drawTextCandidateFunc(conf2)(
+ box.name,
+ g,
+ box.x,
+ box.y + (box.textMaxHeight || 0) / 2,
+ box.width,
+ 0,
+ { class: "text" },
+ conf2
+ );
+ }
+ g.lower();
+};
+const anchorElement = function(elem) {
+ return elem.append("g");
+};
+const drawActivation = function(elem, bounds2, verticalPos, conf2, actorActivations2) {
+ const rect = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.g)();
+ const g = bounds2.anchored;
+ rect.x = bounds2.startx;
+ rect.y = bounds2.starty;
+ rect.class = "activation" + actorActivations2 % 3;
+ rect.width = bounds2.stopx - bounds2.startx;
+ rect.height = verticalPos - bounds2.starty;
+ drawRect(g, rect);
+};
+const drawLoop = function(elem, loopModel, labelText, conf2) {
+ const {
+ boxMargin,
+ boxTextMargin,
+ labelBoxHeight,
+ labelBoxWidth,
+ messageFontFamily: fontFamily,
+ messageFontSize: fontSize,
+ messageFontWeight: fontWeight
+ } = conf2;
+ const g = elem.append("g");
+ const drawLoopLine = function(startx, starty, stopx, stopy) {
+ return g.append("line").attr("x1", startx).attr("y1", starty).attr("x2", stopx).attr("y2", stopy).attr("class", "loopLine");
+ };
+ drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty);
+ drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy);
+ drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy);
+ drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy);
+ if (loopModel.sections !== void 0) {
+ loopModel.sections.forEach(function(item) {
+ drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style(
+ "stroke-dasharray",
+ "3, 3"
+ );
+ });
+ }
+ let txt = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.e)();
+ txt.text = labelText;
+ txt.x = loopModel.startx;
+ txt.y = loopModel.starty;
+ txt.fontFamily = fontFamily;
+ txt.fontSize = fontSize;
+ txt.fontWeight = fontWeight;
+ txt.anchor = "middle";
+ txt.valign = "middle";
+ txt.tspan = false;
+ txt.width = labelBoxWidth || 50;
+ txt.height = labelBoxHeight || 20;
+ txt.textMargin = boxTextMargin;
+ txt.class = "labelText";
+ drawLabel(g, txt);
+ txt = getTextObj();
+ txt.text = loopModel.title;
+ txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2;
+ txt.y = loopModel.starty + boxMargin + boxTextMargin;
+ txt.anchor = "middle";
+ txt.valign = "middle";
+ txt.textMargin = boxTextMargin;
+ txt.class = "loopText";
+ txt.fontFamily = fontFamily;
+ txt.fontSize = fontSize;
+ txt.fontWeight = fontWeight;
+ txt.wrap = true;
+ let textElem = drawText(g, txt);
+ if (loopModel.sectionTitles !== void 0) {
+ loopModel.sectionTitles.forEach(function(item, idx) {
+ if (item.message) {
+ txt.text = item.message;
+ txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2;
+ txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin;
+ txt.class = "loopText";
+ txt.anchor = "middle";
+ txt.valign = "middle";
+ txt.tspan = false;
+ txt.fontFamily = fontFamily;
+ txt.fontSize = fontSize;
+ txt.fontWeight = fontWeight;
+ txt.wrap = loopModel.wrap;
+ textElem = drawText(g, txt);
+ let sectionHeight = Math.round(
+ textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr)
+ );
+ loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin);
+ }
+ });
+ }
+ loopModel.height = Math.round(loopModel.stopy - loopModel.starty);
+ return g;
+};
+const drawBackgroundRect = function(elem, bounds2) {
+ (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.a)(elem, bounds2);
+};
+const insertDatabaseIcon = function(elem) {
+ elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
+ "d",
+ "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
+ );
+};
+const insertComputerIcon = function(elem) {
+ elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
+ "d",
+ "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
+ );
+};
+const insertClockIcon = function(elem) {
+ elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
+ "d",
+ "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
+ );
+};
+const insertArrowHead = function(elem) {
+ elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 7.9).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");
+};
+const insertArrowFilledHead = function(elem) {
+ elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 15.5).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 insertSequenceNumber = function(elem) {
+ elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
+};
+const insertArrowCrossHead = function(elem) {
+ const defs = elem.append("defs");
+ const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5);
+ marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7");
+};
+const getTextObj = function() {
+ return {
+ x: 0,
+ y: 0,
+ fill: void 0,
+ anchor: void 0,
+ style: "#666",
+ width: void 0,
+ height: void 0,
+ textMargin: 0,
+ rx: 0,
+ ry: 0,
+ tspan: true,
+ valign: void 0
+ };
+};
+const getNoteRect = function() {
+ return {
+ x: 0,
+ y: 0,
+ fill: "#EDF2AE",
+ stroke: "#666",
+ width: 100,
+ anchor: "start",
+ height: 100,
+ rx: 0,
+ ry: 0
+ };
+};
+const _drawTextCandidateFunc = function() {
+ function byText(content, g, x, y, width, height, textAttrs) {
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content);
+ _setTextAttrs(text, textAttrs);
+ }
+ function byTspan(content, g, x, y, width, height, textAttrs, conf2) {
+ const { actorFontSize, actorFontFamily, actorFontWeight } = conf2;
+ const [_actorFontSize, _actorFontSizePx] = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.C)(actorFontSize);
+ const lines = content.split(_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex);
+ for (let i = 0; i < lines.length; i++) {
+ const dy = i * _actorFontSize - _actorFontSize * (lines.length - 1) / 2;
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").style("font-size", _actorFontSizePx).style("font-weight", actorFontWeight).style("font-family", actorFontFamily);
+ text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]);
+ text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
+ _setTextAttrs(text, textAttrs);
+ }
+ }
+ function byFo(content, g, x, y, width, height, textAttrs, conf2) {
+ const s = g.append("switch");
+ const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height);
+ const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
+ text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
+ byTspan(content, s, x, y, width, height, textAttrs, conf2);
+ _setTextAttrs(text, textAttrs);
+ }
+ function _setTextAttrs(toText, fromTextAttrsDict) {
+ for (const key in fromTextAttrsDict) {
+ if (fromTextAttrsDict.hasOwnProperty(key)) {
+ toText.attr(key, fromTextAttrsDict[key]);
+ }
+ }
+ }
+ return function(conf2) {
+ return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
+ };
+}();
+const _drawMenuItemTextCandidateFunc = function() {
+ function byText(content, g, x, y, width, height, textAttrs) {
+ const text = g.append("text").attr("x", x).attr("y", y).style("text-anchor", "start").text(content);
+ _setTextAttrs(text, textAttrs);
+ }
+ function byTspan(content, g, x, y, width, height, textAttrs, conf2) {
+ const { actorFontSize, actorFontFamily, actorFontWeight } = conf2;
+ const lines = content.split(_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex);
+ for (let i = 0; i < lines.length; i++) {
+ const dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2;
+ const text = g.append("text").attr("x", x).attr("y", y).style("text-anchor", "start").style("font-size", actorFontSize).style("font-weight", actorFontWeight).style("font-family", actorFontFamily);
+ text.append("tspan").attr("x", x).attr("dy", dy).text(lines[i]);
+ text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
+ _setTextAttrs(text, textAttrs);
+ }
+ }
+ function byFo(content, g, x, y, width, height, textAttrs, conf2) {
+ const s = g.append("switch");
+ const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height);
+ const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
+ text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
+ byTspan(content, s, x, y, width, height, textAttrs, conf2);
+ _setTextAttrs(text, textAttrs);
+ }
+ function _setTextAttrs(toText, fromTextAttrsDict) {
+ for (const key in fromTextAttrsDict) {
+ if (fromTextAttrsDict.hasOwnProperty(key)) {
+ toText.attr(key, fromTextAttrsDict[key]);
+ }
+ }
+ }
+ return function(conf2) {
+ return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
+ };
+}();
+const svgDraw = {
+ drawRect,
+ drawText,
+ drawLabel,
+ drawActor,
+ drawBox,
+ drawPopup,
+ anchorElement,
+ drawActivation,
+ drawLoop,
+ drawBackgroundRect,
+ insertArrowHead,
+ insertArrowFilledHead,
+ insertSequenceNumber,
+ insertArrowCrossHead,
+ insertDatabaseIcon,
+ insertComputerIcon,
+ insertClockIcon,
+ getTextObj,
+ getNoteRect,
+ popupMenu,
+ popdownMenu,
+ fixLifeLineHeights,
+ sanitizeUrl: _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .Nm
+};
+let conf = {};
+const bounds = {
+ data: {
+ startx: void 0,
+ stopx: void 0,
+ starty: void 0,
+ stopy: void 0
+ },
+ verticalPos: 0,
+ sequenceItems: [],
+ activations: [],
+ models: {
+ getHeight: function() {
+ return Math.max.apply(
+ null,
+ this.actors.length === 0 ? [0] : this.actors.map((actor) => actor.height || 0)
+ ) + (this.loops.length === 0 ? 0 : this.loops.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.messages.length === 0 ? 0 : this.messages.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.notes.length === 0 ? 0 : this.notes.map((it) => it.height || 0).reduce((acc, h) => acc + h));
+ },
+ clear: function() {
+ this.actors = [];
+ this.boxes = [];
+ this.loops = [];
+ this.messages = [];
+ this.notes = [];
+ },
+ addBox: function(boxModel) {
+ this.boxes.push(boxModel);
+ },
+ addActor: function(actorModel) {
+ this.actors.push(actorModel);
+ },
+ addLoop: function(loopModel) {
+ this.loops.push(loopModel);
+ },
+ addMessage: function(msgModel) {
+ this.messages.push(msgModel);
+ },
+ addNote: function(noteModel) {
+ this.notes.push(noteModel);
+ },
+ lastActor: function() {
+ return this.actors[this.actors.length - 1];
+ },
+ lastLoop: function() {
+ return this.loops[this.loops.length - 1];
+ },
+ lastMessage: function() {
+ return this.messages[this.messages.length - 1];
+ },
+ lastNote: function() {
+ return this.notes[this.notes.length - 1];
+ },
+ actors: [],
+ boxes: [],
+ loops: [],
+ messages: [],
+ notes: []
+ },
+ init: function() {
+ this.sequenceItems = [];
+ this.activations = [];
+ this.models.clear();
+ this.data = {
+ startx: void 0,
+ stopx: void 0,
+ starty: void 0,
+ stopy: void 0
+ };
+ this.verticalPos = 0;
+ setConf((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)());
+ },
+ updateVal: function(obj, key, val, fun) {
+ if (obj[key] === void 0) {
+ obj[key] = val;
+ } else {
+ obj[key] = fun(val, obj[key]);
+ }
+ },
+ updateBounds: function(startx, starty, stopx, stopy) {
+ const _self = this;
+ let cnt = 0;
+ function updateFn(type) {
+ return function updateItemBounds(item) {
+ cnt++;
+ const n = _self.sequenceItems.length - cnt + 1;
+ _self.updateVal(item, "starty", starty - n * conf.boxMargin, Math.min);
+ _self.updateVal(item, "stopy", stopy + n * conf.boxMargin, Math.max);
+ _self.updateVal(bounds.data, "startx", startx - n * conf.boxMargin, Math.min);
+ _self.updateVal(bounds.data, "stopx", stopx + n * conf.boxMargin, Math.max);
+ if (!(type === "activation")) {
+ _self.updateVal(item, "startx", startx - n * conf.boxMargin, Math.min);
+ _self.updateVal(item, "stopx", stopx + n * conf.boxMargin, Math.max);
+ _self.updateVal(bounds.data, "starty", starty - n * conf.boxMargin, Math.min);
+ _self.updateVal(bounds.data, "stopy", stopy + n * conf.boxMargin, Math.max);
+ }
+ };
+ }
+ this.sequenceItems.forEach(updateFn());
+ this.activations.forEach(updateFn("activation"));
+ },
+ insert: function(startx, starty, stopx, stopy) {
+ const _startx = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(startx, stopx);
+ const _stopx = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(startx, stopx);
+ const _starty = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(starty, stopy);
+ const _stopy = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(starty, stopy);
+ this.updateVal(bounds.data, "startx", _startx, Math.min);
+ this.updateVal(bounds.data, "starty", _starty, Math.min);
+ this.updateVal(bounds.data, "stopx", _stopx, Math.max);
+ this.updateVal(bounds.data, "stopy", _stopy, Math.max);
+ this.updateBounds(_startx, _starty, _stopx, _stopy);
+ },
+ newActivation: function(message, diagram2, actors) {
+ const actorRect = actors[message.from.actor];
+ const stackedSize = actorActivations(message.from.actor).length || 0;
+ const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;
+ this.activations.push({
+ startx: x,
+ starty: this.verticalPos + 2,
+ stopx: x + conf.activationWidth,
+ stopy: void 0,
+ actor: message.from.actor,
+ anchored: svgDraw.anchorElement(diagram2)
+ });
+ },
+ endActivation: function(message) {
+ const lastActorActivationIdx = this.activations.map(function(activation) {
+ return activation.actor;
+ }).lastIndexOf(message.from.actor);
+ return this.activations.splice(lastActorActivationIdx, 1)[0];
+ },
+ createLoop: function(title = { message: void 0, wrap: false, width: void 0 }, fill) {
+ return {
+ startx: void 0,
+ starty: this.verticalPos,
+ stopx: void 0,
+ stopy: void 0,
+ title: title.message,
+ wrap: title.wrap,
+ width: title.width,
+ height: 0,
+ fill
+ };
+ },
+ newLoop: function(title = { message: void 0, wrap: false, width: void 0 }, fill) {
+ this.sequenceItems.push(this.createLoop(title, fill));
+ },
+ endLoop: function() {
+ return this.sequenceItems.pop();
+ },
+ isLoopOverlap: function() {
+ return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : false;
+ },
+ addSectionToLoop: function(message) {
+ const loop = this.sequenceItems.pop();
+ loop.sections = loop.sections || [];
+ loop.sectionTitles = loop.sectionTitles || [];
+ loop.sections.push({ y: bounds.getVerticalPos(), height: 0 });
+ loop.sectionTitles.push(message);
+ this.sequenceItems.push(loop);
+ },
+ saveVerticalPos: function() {
+ if (this.isLoopOverlap()) {
+ this.savedVerticalPos = this.verticalPos;
+ }
+ },
+ resetVerticalPos: function() {
+ if (this.isLoopOverlap()) {
+ this.verticalPos = this.savedVerticalPos;
+ }
+ },
+ bumpVerticalPos: function(bump) {
+ this.verticalPos = this.verticalPos + bump;
+ this.data.stopy = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(this.data.stopy, this.verticalPos);
+ },
+ getVerticalPos: function() {
+ return this.verticalPos;
+ },
+ getBounds: function() {
+ return { bounds: this.data, models: this.models };
+ }
+};
+const drawNote = function(elem, noteModel) {
+ bounds.bumpVerticalPos(conf.boxMargin);
+ noteModel.height = conf.boxMargin;
+ noteModel.starty = bounds.getVerticalPos();
+ const rect = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.g)();
+ rect.x = noteModel.startx;
+ rect.y = noteModel.starty;
+ rect.width = noteModel.width || conf.width;
+ rect.class = "note";
+ const g = elem.append("g");
+ const rectElem = svgDraw.drawRect(g, rect);
+ const textObj = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.e)();
+ textObj.x = noteModel.startx;
+ textObj.y = noteModel.starty;
+ textObj.width = rect.width;
+ textObj.dy = "1em";
+ textObj.text = noteModel.message;
+ textObj.class = "noteText";
+ textObj.fontFamily = conf.noteFontFamily;
+ textObj.fontSize = conf.noteFontSize;
+ textObj.fontWeight = conf.noteFontWeight;
+ textObj.anchor = conf.noteAlign;
+ textObj.textMargin = conf.noteMargin;
+ textObj.valign = "center";
+ const textElem = drawText(g, textObj);
+ const textHeight = Math.round(
+ textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr)
+ );
+ rectElem.attr("height", textHeight + 2 * conf.noteMargin);
+ noteModel.height += textHeight + 2 * conf.noteMargin;
+ bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);
+ noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin;
+ noteModel.stopx = noteModel.startx + rect.width;
+ bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy);
+ bounds.models.addNote(noteModel);
+};
+const messageFont = (cnf) => {
+ return {
+ fontFamily: cnf.messageFontFamily,
+ fontSize: cnf.messageFontSize,
+ fontWeight: cnf.messageFontWeight
+ };
+};
+const noteFont = (cnf) => {
+ return {
+ fontFamily: cnf.noteFontFamily,
+ fontSize: cnf.noteFontSize,
+ fontWeight: cnf.noteFontWeight
+ };
+};
+const actorFont = (cnf) => {
+ return {
+ fontFamily: cnf.actorFontFamily,
+ fontSize: cnf.actorFontSize,
+ fontWeight: cnf.actorFontWeight
+ };
+};
+function boundMessage(_diagram, msgModel) {
+ bounds.bumpVerticalPos(10);
+ const { startx, stopx, message } = msgModel;
+ const lines = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.splitBreaks(message).length;
+ const textDims = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(message, messageFont(conf));
+ const lineHeight = textDims.height / lines;
+ msgModel.height += lineHeight;
+ bounds.bumpVerticalPos(lineHeight);
+ let lineStartY;
+ let totalOffset = textDims.height - 10;
+ const textWidth = textDims.width;
+ if (startx === stopx) {
+ lineStartY = bounds.getVerticalPos() + totalOffset;
+ if (!conf.rightAngles) {
+ totalOffset += conf.boxMargin;
+ lineStartY = bounds.getVerticalPos() + totalOffset;
+ }
+ totalOffset += 30;
+ const dx = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(textWidth / 2, conf.width / 2);
+ bounds.insert(
+ startx - dx,
+ bounds.getVerticalPos() - 10 + totalOffset,
+ stopx + dx,
+ bounds.getVerticalPos() + 30 + totalOffset
+ );
+ } else {
+ totalOffset += conf.boxMargin;
+ lineStartY = bounds.getVerticalPos() + totalOffset;
+ bounds.insert(startx, lineStartY - 10, stopx, lineStartY);
+ }
+ bounds.bumpVerticalPos(totalOffset);
+ msgModel.height += totalOffset;
+ msgModel.stopy = msgModel.starty + msgModel.height;
+ bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy);
+ return lineStartY;
+}
+const drawMessage = function(diagram2, msgModel, lineStartY, diagObj) {
+ const { startx, stopx, starty, message, type, sequenceIndex, sequenceVisible } = msgModel;
+ const textDims = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(message, messageFont(conf));
+ const textObj = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.e)();
+ textObj.x = startx;
+ textObj.y = starty + 10;
+ textObj.width = stopx - startx;
+ textObj.class = "messageText";
+ textObj.dy = "1em";
+ textObj.text = message;
+ textObj.fontFamily = conf.messageFontFamily;
+ textObj.fontSize = conf.messageFontSize;
+ textObj.fontWeight = conf.messageFontWeight;
+ textObj.anchor = conf.messageAlign;
+ textObj.valign = "center";
+ textObj.textMargin = conf.wrapPadding;
+ textObj.tspan = false;
+ drawText(diagram2, textObj);
+ const textWidth = textDims.width;
+ let line;
+ if (startx === stopx) {
+ if (conf.rightAngles) {
+ line = diagram2.append("path").attr(
+ "d",
+ `M ${startx},${lineStartY} H ${startx + _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width / 2, textWidth / 2)} V ${lineStartY + 25} H ${startx}`
+ );
+ } else {
+ line = diagram2.append("path").attr(
+ "d",
+ "M " + startx + "," + lineStartY + " C " + (startx + 60) + "," + (lineStartY - 10) + " " + (startx + 60) + "," + (lineStartY + 30) + " " + startx + "," + (lineStartY + 20)
+ );
+ }
+ } else {
+ line = diagram2.append("line");
+ line.attr("x1", startx);
+ line.attr("y1", lineStartY);
+ line.attr("x2", stopx);
+ line.attr("y2", lineStartY);
+ }
+ if (type === diagObj.db.LINETYPE.DOTTED || type === diagObj.db.LINETYPE.DOTTED_CROSS || type === diagObj.db.LINETYPE.DOTTED_POINT || type === diagObj.db.LINETYPE.DOTTED_OPEN) {
+ line.style("stroke-dasharray", "3, 3");
+ line.attr("class", "messageLine1");
+ } else {
+ line.attr("class", "messageLine0");
+ }
+ let url = "";
+ if (conf.arrowMarkerAbsolute) {
+ url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
+ url = url.replace(/\(/g, "\\(");
+ url = url.replace(/\)/g, "\\)");
+ }
+ line.attr("stroke-width", 2);
+ line.attr("stroke", "none");
+ line.style("fill", "none");
+ if (type === diagObj.db.LINETYPE.SOLID || type === diagObj.db.LINETYPE.DOTTED) {
+ line.attr("marker-end", "url(" + url + "#arrowhead)");
+ }
+ if (type === diagObj.db.LINETYPE.SOLID_POINT || type === diagObj.db.LINETYPE.DOTTED_POINT) {
+ line.attr("marker-end", "url(" + url + "#filled-head)");
+ }
+ if (type === diagObj.db.LINETYPE.SOLID_CROSS || type === diagObj.db.LINETYPE.DOTTED_CROSS) {
+ line.attr("marker-end", "url(" + url + "#crosshead)");
+ }
+ if (sequenceVisible || conf.showSequenceNumbers) {
+ line.attr("marker-start", "url(" + url + "#sequencenumber)");
+ diagram2.append("text").attr("x", startx).attr("y", lineStartY + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(sequenceIndex);
+ }
+};
+const addActorRenderingData = function(diagram2, actors, createdActors, actorKeys, verticalPos, messages, isFooter) {
+ let prevWidth = 0;
+ let prevMargin = 0;
+ let prevBox = void 0;
+ let maxHeight = 0;
+ for (const actorKey of actorKeys) {
+ const actor = actors[actorKey];
+ const box = actor.box;
+ if (prevBox && prevBox != box) {
+ if (!isFooter) {
+ bounds.models.addBox(prevBox);
+ }
+ prevMargin += conf.boxMargin + prevBox.margin;
+ }
+ if (box && box != prevBox) {
+ if (!isFooter) {
+ box.x = prevWidth + prevMargin;
+ box.y = verticalPos;
+ }
+ prevMargin += box.margin;
+ }
+ actor.width = actor.width || conf.width;
+ actor.height = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actor.height || conf.height, conf.height);
+ actor.margin = actor.margin || conf.actorMargin;
+ maxHeight = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, actor.height);
+ if (createdActors[actor.name]) {
+ prevMargin += actor.width / 2;
+ }
+ actor.x = prevWidth + prevMargin;
+ actor.starty = bounds.getVerticalPos();
+ bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height);
+ prevWidth += actor.width + prevMargin;
+ if (actor.box) {
+ actor.box.width = prevWidth + box.margin - actor.box.x;
+ }
+ prevMargin = actor.margin;
+ prevBox = actor.box;
+ bounds.models.addActor(actor);
+ }
+ if (prevBox && !isFooter) {
+ bounds.models.addBox(prevBox);
+ }
+ bounds.bumpVerticalPos(maxHeight);
+};
+const drawActors = function(diagram2, actors, actorKeys, isFooter) {
+ if (!isFooter) {
+ for (const actorKey of actorKeys) {
+ const actor = actors[actorKey];
+ svgDraw.drawActor(diagram2, actor, conf, false);
+ }
+ } else {
+ let maxHeight = 0;
+ bounds.bumpVerticalPos(conf.boxMargin * 2);
+ for (const actorKey of actorKeys) {
+ const actor = actors[actorKey];
+ if (!actor.stopy) {
+ actor.stopy = bounds.getVerticalPos();
+ }
+ const height = svgDraw.drawActor(diagram2, actor, conf, true);
+ maxHeight = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, height);
+ }
+ bounds.bumpVerticalPos(maxHeight + conf.boxMargin);
+ }
+};
+const drawActorsPopup = function(diagram2, actors, actorKeys, doc) {
+ let maxHeight = 0;
+ let maxWidth = 0;
+ for (const actorKey of actorKeys) {
+ const actor = actors[actorKey];
+ const minMenuWidth = getRequiredPopupWidth(actor);
+ const menuDimensions = svgDraw.drawPopup(
+ diagram2,
+ actor,
+ minMenuWidth,
+ conf,
+ conf.forceMenus,
+ doc
+ );
+ if (menuDimensions.height > maxHeight) {
+ maxHeight = menuDimensions.height;
+ }
+ if (menuDimensions.width + actor.x > maxWidth) {
+ maxWidth = menuDimensions.width + actor.x;
+ }
+ }
+ return { maxHeight, maxWidth };
+};
+const setConf = function(cnf) {
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.f)(conf, cnf);
+ if (cnf.fontFamily) {
+ conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily;
+ }
+ if (cnf.fontSize) {
+ conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize;
+ }
+ if (cnf.fontWeight) {
+ conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight;
+ }
+};
+const actorActivations = function(actor) {
+ return bounds.activations.filter(function(activation) {
+ return activation.actor === actor;
+ });
+};
+const activationBounds = function(actor, actors) {
+ const actorObj = actors[actor];
+ const activations = actorActivations(actor);
+ const left = activations.reduce(function(acc, activation) {
+ return _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(acc, activation.startx);
+ }, actorObj.x + actorObj.width / 2 - 1);
+ const right = activations.reduce(function(acc, activation) {
+ return _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(acc, activation.stopx);
+ }, actorObj.x + actorObj.width / 2 + 1);
+ return [left, right];
+};
+function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) {
+ bounds.bumpVerticalPos(preMargin);
+ let heightAdjust = postMargin;
+ if (msg.id && msg.message && loopWidths[msg.id]) {
+ const loopWidth = loopWidths[msg.id].width;
+ const textConf = messageFont(conf);
+ msg.message = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(`[${msg.message}]`, loopWidth - 2 * conf.wrapPadding, textConf);
+ msg.width = loopWidth;
+ msg.wrap = true;
+ const textDims = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(msg.message, textConf);
+ const totalOffset = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(textDims.height, conf.labelBoxHeight);
+ heightAdjust = postMargin + totalOffset;
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`${totalOffset} - ${msg.message}`);
+ }
+ addLoopFn(msg);
+ bounds.bumpVerticalPos(heightAdjust);
+}
+function adjustCreatedDestroyedData(msg, msgModel, lineStartY, index, actors, createdActors, destroyedActors) {
+ function receiverAdjustment(actor, adjustment) {
+ if (actor.x < actors[msg.from].x) {
+ bounds.insert(
+ msgModel.stopx - adjustment,
+ msgModel.starty,
+ msgModel.startx,
+ msgModel.stopy + actor.height / 2 + conf.noteMargin
+ );
+ msgModel.stopx = msgModel.stopx + adjustment;
+ } else {
+ bounds.insert(
+ msgModel.startx,
+ msgModel.starty,
+ msgModel.stopx + adjustment,
+ msgModel.stopy + actor.height / 2 + conf.noteMargin
+ );
+ msgModel.stopx = msgModel.stopx - adjustment;
+ }
+ }
+ function senderAdjustment(actor, adjustment) {
+ if (actor.x < actors[msg.to].x) {
+ bounds.insert(
+ msgModel.startx - adjustment,
+ msgModel.starty,
+ msgModel.stopx,
+ msgModel.stopy + actor.height / 2 + conf.noteMargin
+ );
+ msgModel.startx = msgModel.startx + adjustment;
+ } else {
+ bounds.insert(
+ msgModel.stopx,
+ msgModel.starty,
+ msgModel.startx + adjustment,
+ msgModel.stopy + actor.height / 2 + conf.noteMargin
+ );
+ msgModel.startx = msgModel.startx - adjustment;
+ }
+ }
+ if (createdActors[msg.to] == index) {
+ const actor = actors[msg.to];
+ const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3;
+ receiverAdjustment(actor, adjustment);
+ actor.starty = lineStartY - actor.height / 2;
+ bounds.bumpVerticalPos(actor.height / 2);
+ } else if (destroyedActors[msg.from] == index) {
+ const actor = actors[msg.from];
+ if (conf.mirrorActors) {
+ const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 : actor.width / 2;
+ senderAdjustment(actor, adjustment);
+ }
+ actor.stopy = lineStartY - actor.height / 2;
+ bounds.bumpVerticalPos(actor.height / 2);
+ } else if (destroyedActors[msg.to] == index) {
+ const actor = actors[msg.to];
+ if (conf.mirrorActors) {
+ const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3;
+ receiverAdjustment(actor, adjustment);
+ }
+ actor.stopy = lineStartY - actor.height / 2;
+ bounds.bumpVerticalPos(actor.height / 2);
+ }
+}
+const draw = function(_text, id, _version, diagObj) {
+ const { securityLevel, sequence } = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)();
+ conf = sequence;
+ let sandboxElement;
+ if (securityLevel === "sandbox") {
+ sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("#i" + id);
+ }
+ const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body");
+ const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
+ bounds.init();
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(diagObj.db);
+ const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(`[id="${id}"]`);
+ const actors = diagObj.db.getActors();
+ const createdActors = diagObj.db.getCreatedActors();
+ const destroyedActors = diagObj.db.getDestroyedActors();
+ const boxes = diagObj.db.getBoxes();
+ let actorKeys = diagObj.db.getActorKeys();
+ const messages = diagObj.db.getMessages();
+ const title = diagObj.db.getDiagramTitle();
+ const hasBoxes = diagObj.db.hasAtLeastOneBox();
+ const hasBoxTitles = diagObj.db.hasAtLeastOneBoxWithTitle();
+ const maxMessageWidthPerActor = getMaxMessageWidthPerActor(actors, messages, diagObj);
+ conf.height = calculateActorMargins(actors, maxMessageWidthPerActor, boxes);
+ svgDraw.insertComputerIcon(diagram2);
+ svgDraw.insertDatabaseIcon(diagram2);
+ svgDraw.insertClockIcon(diagram2);
+ if (hasBoxes) {
+ bounds.bumpVerticalPos(conf.boxMargin);
+ if (hasBoxTitles) {
+ bounds.bumpVerticalPos(boxes[0].textMaxHeight);
+ }
+ }
+ if (conf.hideUnusedParticipants === true) {
+ const newActors = /* @__PURE__ */ new Set();
+ messages.forEach((message) => {
+ newActors.add(message.from);
+ newActors.add(message.to);
+ });
+ actorKeys = actorKeys.filter((actorKey) => newActors.has(actorKey));
+ }
+ addActorRenderingData(diagram2, actors, createdActors, actorKeys, 0, messages, false);
+ const loopWidths = calculateLoopBounds(messages, actors, maxMessageWidthPerActor, diagObj);
+ svgDraw.insertArrowHead(diagram2);
+ svgDraw.insertArrowCrossHead(diagram2);
+ svgDraw.insertArrowFilledHead(diagram2);
+ svgDraw.insertSequenceNumber(diagram2);
+ function activeEnd(msg, verticalPos) {
+ const activationData = bounds.endActivation(msg);
+ if (activationData.starty + 18 > verticalPos) {
+ activationData.starty = verticalPos - 6;
+ verticalPos += 12;
+ }
+ svgDraw.drawActivation(
+ diagram2,
+ activationData,
+ verticalPos,
+ conf,
+ actorActivations(msg.from.actor).length
+ );
+ bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);
+ }
+ let sequenceIndex = 1;
+ let sequenceIndexStep = 1;
+ const messagesToDraw = [];
+ const backgrounds = [];
+ messages.forEach(function(msg, index) {
+ let loopModel, noteModel, msgModel;
+ switch (msg.type) {
+ case diagObj.db.LINETYPE.NOTE:
+ bounds.resetVerticalPos();
+ noteModel = msg.noteModel;
+ drawNote(diagram2, noteModel);
+ break;
+ case diagObj.db.LINETYPE.ACTIVE_START:
+ bounds.newActivation(msg, diagram2, actors);
+ break;
+ case diagObj.db.LINETYPE.ACTIVE_END:
+ activeEnd(msg, bounds.getVerticalPos());
+ break;
+ case diagObj.db.LINETYPE.LOOP_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin + conf.boxTextMargin,
+ (message) => bounds.newLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.LOOP_END:
+ loopModel = bounds.endLoop();
+ svgDraw.drawLoop(diagram2, loopModel, "loop", conf);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ bounds.models.addLoop(loopModel);
+ break;
+ case diagObj.db.LINETYPE.RECT_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin,
+ (message) => bounds.newLoop(void 0, message.message)
+ );
+ break;
+ case diagObj.db.LINETYPE.RECT_END:
+ loopModel = bounds.endLoop();
+ backgrounds.push(loopModel);
+ bounds.models.addLoop(loopModel);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ break;
+ case diagObj.db.LINETYPE.OPT_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin + conf.boxTextMargin,
+ (message) => bounds.newLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.OPT_END:
+ loopModel = bounds.endLoop();
+ svgDraw.drawLoop(diagram2, loopModel, "opt", conf);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ bounds.models.addLoop(loopModel);
+ break;
+ case diagObj.db.LINETYPE.ALT_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin + conf.boxTextMargin,
+ (message) => bounds.newLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.ALT_ELSE:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin + conf.boxTextMargin,
+ conf.boxMargin,
+ (message) => bounds.addSectionToLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.ALT_END:
+ loopModel = bounds.endLoop();
+ svgDraw.drawLoop(diagram2, loopModel, "alt", conf);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ bounds.models.addLoop(loopModel);
+ break;
+ case diagObj.db.LINETYPE.PAR_START:
+ case diagObj.db.LINETYPE.PAR_OVER_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin + conf.boxTextMargin,
+ (message) => bounds.newLoop(message)
+ );
+ bounds.saveVerticalPos();
+ break;
+ case diagObj.db.LINETYPE.PAR_AND:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin + conf.boxTextMargin,
+ conf.boxMargin,
+ (message) => bounds.addSectionToLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.PAR_END:
+ loopModel = bounds.endLoop();
+ svgDraw.drawLoop(diagram2, loopModel, "par", conf);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ bounds.models.addLoop(loopModel);
+ break;
+ case diagObj.db.LINETYPE.AUTONUMBER:
+ sequenceIndex = msg.message.start || sequenceIndex;
+ sequenceIndexStep = msg.message.step || sequenceIndexStep;
+ if (msg.message.visible) {
+ diagObj.db.enableSequenceNumbers();
+ } else {
+ diagObj.db.disableSequenceNumbers();
+ }
+ break;
+ case diagObj.db.LINETYPE.CRITICAL_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin + conf.boxTextMargin,
+ (message) => bounds.newLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.CRITICAL_OPTION:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin + conf.boxTextMargin,
+ conf.boxMargin,
+ (message) => bounds.addSectionToLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.CRITICAL_END:
+ loopModel = bounds.endLoop();
+ svgDraw.drawLoop(diagram2, loopModel, "critical", conf);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ bounds.models.addLoop(loopModel);
+ break;
+ case diagObj.db.LINETYPE.BREAK_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin + conf.boxTextMargin,
+ (message) => bounds.newLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.BREAK_END:
+ loopModel = bounds.endLoop();
+ svgDraw.drawLoop(diagram2, loopModel, "break", conf);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ bounds.models.addLoop(loopModel);
+ break;
+ default:
+ try {
+ msgModel = msg.msgModel;
+ msgModel.starty = bounds.getVerticalPos();
+ msgModel.sequenceIndex = sequenceIndex;
+ msgModel.sequenceVisible = diagObj.db.showSequenceNumbers();
+ const lineStartY = boundMessage(diagram2, msgModel);
+ adjustCreatedDestroyedData(
+ msg,
+ msgModel,
+ lineStartY,
+ index,
+ actors,
+ createdActors,
+ destroyedActors
+ );
+ messagesToDraw.push({ messageModel: msgModel, lineStartY });
+ bounds.models.addMessage(msgModel);
+ } catch (e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while drawing message", e);
+ }
+ }
+ if ([
+ diagObj.db.LINETYPE.SOLID_OPEN,
+ diagObj.db.LINETYPE.DOTTED_OPEN,
+ diagObj.db.LINETYPE.SOLID,
+ diagObj.db.LINETYPE.DOTTED,
+ diagObj.db.LINETYPE.SOLID_CROSS,
+ diagObj.db.LINETYPE.DOTTED_CROSS,
+ diagObj.db.LINETYPE.SOLID_POINT,
+ diagObj.db.LINETYPE.DOTTED_POINT
+ ].includes(msg.type)) {
+ sequenceIndex = sequenceIndex + sequenceIndexStep;
+ }
+ });
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("createdActors", createdActors);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("destroyedActors", destroyedActors);
+ drawActors(diagram2, actors, actorKeys, false);
+ messagesToDraw.forEach((e) => drawMessage(diagram2, e.messageModel, e.lineStartY, diagObj));
+ if (conf.mirrorActors) {
+ drawActors(diagram2, actors, actorKeys, true);
+ }
+ backgrounds.forEach((e) => svgDraw.drawBackgroundRect(diagram2, e));
+ fixLifeLineHeights(diagram2, actors, actorKeys, conf);
+ bounds.models.boxes.forEach(function(box2) {
+ box2.height = bounds.getVerticalPos() - box2.y;
+ bounds.insert(box2.x, box2.y, box2.x + box2.width, box2.height);
+ box2.startx = box2.x;
+ box2.starty = box2.y;
+ box2.stopx = box2.startx + box2.width;
+ box2.stopy = box2.starty + box2.height;
+ box2.stroke = "rgb(0,0,0, 0.5)";
+ svgDraw.drawBox(diagram2, box2, conf);
+ });
+ if (hasBoxes) {
+ bounds.bumpVerticalPos(conf.boxMargin);
+ }
+ const requiredBoxSize = drawActorsPopup(diagram2, actors, actorKeys, doc);
+ const { bounds: box } = bounds.getBounds();
+ let boxHeight = box.stopy - box.starty;
+ if (boxHeight < requiredBoxSize.maxHeight) {
+ boxHeight = requiredBoxSize.maxHeight;
+ }
+ let height = boxHeight + 2 * conf.diagramMarginY;
+ if (conf.mirrorActors) {
+ height = height - conf.boxMargin + conf.bottomMarginAdj;
+ }
+ let boxWidth = box.stopx - box.startx;
+ if (boxWidth < requiredBoxSize.maxWidth) {
+ boxWidth = requiredBoxSize.maxWidth;
+ }
+ const width = boxWidth + 2 * conf.diagramMarginX;
+ if (title) {
+ diagram2.append("text").text(title).attr("x", (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr("y", -25);
+ }
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.i)(diagram2, height, width, conf.useMaxWidth);
+ const extraVertForTitle = title ? 40 : 0;
+ diagram2.attr(
+ "viewBox",
+ box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle)
+ );
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`models:`, bounds.models);
+};
+function getMaxMessageWidthPerActor(actors, messages, diagObj) {
+ const maxMessageWidthPerActor = {};
+ messages.forEach(function(msg) {
+ if (actors[msg.to] && actors[msg.from]) {
+ const actor = actors[msg.to];
+ if (msg.placement === diagObj.db.PLACEMENT.LEFTOF && !actor.prevActor) {
+ return;
+ }
+ if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF && !actor.nextActor) {
+ return;
+ }
+ const isNote = msg.placement !== void 0;
+ const isMessage = !isNote;
+ const textFont = isNote ? noteFont(conf) : messageFont(conf);
+ const wrappedMessage = msg.wrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont) : msg.message;
+ const messageDimensions = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(wrappedMessage, textFont);
+ const messageWidth = messageDimensions.width + 2 * conf.wrapPadding;
+ if (isMessage && msg.from === actor.nextActor) {
+ maxMessageWidthPerActor[msg.to] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[msg.to] || 0,
+ messageWidth
+ );
+ } else if (isMessage && msg.from === actor.prevActor) {
+ maxMessageWidthPerActor[msg.from] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[msg.from] || 0,
+ messageWidth
+ );
+ } else if (isMessage && msg.from === msg.to) {
+ maxMessageWidthPerActor[msg.from] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[msg.from] || 0,
+ messageWidth / 2
+ );
+ maxMessageWidthPerActor[msg.to] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[msg.to] || 0,
+ messageWidth / 2
+ );
+ } else if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) {
+ maxMessageWidthPerActor[msg.from] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[msg.from] || 0,
+ messageWidth
+ );
+ } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) {
+ maxMessageWidthPerActor[actor.prevActor] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[actor.prevActor] || 0,
+ messageWidth
+ );
+ } else if (msg.placement === diagObj.db.PLACEMENT.OVER) {
+ if (actor.prevActor) {
+ maxMessageWidthPerActor[actor.prevActor] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[actor.prevActor] || 0,
+ messageWidth / 2
+ );
+ }
+ if (actor.nextActor) {
+ maxMessageWidthPerActor[msg.from] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[msg.from] || 0,
+ messageWidth / 2
+ );
+ }
+ }
+ }
+ });
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("maxMessageWidthPerActor:", maxMessageWidthPerActor);
+ return maxMessageWidthPerActor;
+}
+const getRequiredPopupWidth = function(actor) {
+ let requiredPopupWidth = 0;
+ const textFont = actorFont(conf);
+ for (const key in actor.links) {
+ const labelDimensions = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(key, textFont);
+ const labelWidth = labelDimensions.width + 2 * conf.wrapPadding + 2 * conf.boxMargin;
+ if (requiredPopupWidth < labelWidth) {
+ requiredPopupWidth = labelWidth;
+ }
+ }
+ return requiredPopupWidth;
+};
+function calculateActorMargins(actors, actorToMessageWidth, boxes) {
+ let maxHeight = 0;
+ Object.keys(actors).forEach((prop) => {
+ const actor = actors[prop];
+ if (actor.wrap) {
+ actor.description = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(
+ actor.description,
+ conf.width - 2 * conf.wrapPadding,
+ actorFont(conf)
+ );
+ }
+ const actDims = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(actor.description, actorFont(conf));
+ actor.width = actor.wrap ? conf.width : _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, actDims.width + 2 * conf.wrapPadding);
+ actor.height = actor.wrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actDims.height, conf.height) : conf.height;
+ maxHeight = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, actor.height);
+ });
+ for (const actorKey in actorToMessageWidth) {
+ const actor = actors[actorKey];
+ if (!actor) {
+ continue;
+ }
+ const nextActor = actors[actor.nextActor];
+ if (!nextActor) {
+ const messageWidth2 = actorToMessageWidth[actorKey];
+ const actorWidth2 = messageWidth2 + conf.actorMargin - actor.width / 2;
+ actor.margin = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actorWidth2, conf.actorMargin);
+ continue;
+ }
+ const messageWidth = actorToMessageWidth[actorKey];
+ const actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2;
+ actor.margin = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actorWidth, conf.actorMargin);
+ }
+ let maxBoxHeight = 0;
+ boxes.forEach((box) => {
+ const textFont = messageFont(conf);
+ let totalWidth = box.actorKeys.reduce((total, aKey) => {
+ return total += actors[aKey].width + (actors[aKey].margin || 0);
+ }, 0);
+ totalWidth -= 2 * conf.boxTextMargin;
+ if (box.wrap) {
+ box.name = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(box.name, totalWidth - 2 * conf.wrapPadding, textFont);
+ }
+ const boxMsgDimensions = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(box.name, textFont);
+ maxBoxHeight = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(boxMsgDimensions.height, maxBoxHeight);
+ const minWidth = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(totalWidth, boxMsgDimensions.width + 2 * conf.wrapPadding);
+ box.margin = conf.boxTextMargin;
+ if (totalWidth < minWidth) {
+ const missing = (minWidth - totalWidth) / 2;
+ box.margin += missing;
+ }
+ });
+ boxes.forEach((box) => box.textMaxHeight = maxBoxHeight);
+ return _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, conf.height);
+}
+const buildNoteModel = function(msg, actors, diagObj) {
+ const startx = actors[msg.from].x;
+ const stopx = actors[msg.to].x;
+ const shouldWrap = msg.wrap && msg.message;
+ let textDimensions = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(
+ shouldWrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message,
+ noteFont(conf)
+ );
+ const noteModel = {
+ width: shouldWrap ? conf.width : _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin),
+ height: 0,
+ startx: actors[msg.from].x,
+ stopx: 0,
+ starty: 0,
+ stopy: 0,
+ message: msg.message
+ };
+ if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) {
+ noteModel.width = shouldWrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, textDimensions.width) : _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ actors[msg.from].width / 2 + actors[msg.to].width / 2,
+ textDimensions.width + 2 * conf.noteMargin
+ );
+ noteModel.startx = startx + (actors[msg.from].width + conf.actorMargin) / 2;
+ } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) {
+ noteModel.width = shouldWrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin) : _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ actors[msg.from].width / 2 + actors[msg.to].width / 2,
+ textDimensions.width + 2 * conf.noteMargin
+ );
+ noteModel.startx = startx - noteModel.width + (actors[msg.from].width - conf.actorMargin) / 2;
+ } else if (msg.to === msg.from) {
+ textDimensions = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(
+ shouldWrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(
+ msg.message,
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, actors[msg.from].width),
+ noteFont(conf)
+ ) : msg.message,
+ noteFont(conf)
+ );
+ noteModel.width = shouldWrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, actors[msg.from].width) : _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ actors[msg.from].width,
+ conf.width,
+ textDimensions.width + 2 * conf.noteMargin
+ );
+ noteModel.startx = startx + (actors[msg.from].width - noteModel.width) / 2;
+ } else {
+ noteModel.width = Math.abs(startx + actors[msg.from].width / 2 - (stopx + actors[msg.to].width / 2)) + conf.actorMargin;
+ noteModel.startx = startx < stopx ? startx + actors[msg.from].width / 2 - conf.actorMargin / 2 : stopx + actors[msg.to].width / 2 - conf.actorMargin / 2;
+ }
+ if (shouldWrap) {
+ noteModel.message = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(
+ msg.message,
+ noteModel.width - 2 * conf.wrapPadding,
+ noteFont(conf)
+ );
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(
+ `NM:[${noteModel.startx},${noteModel.stopx},${noteModel.starty},${noteModel.stopy}:${noteModel.width},${noteModel.height}=${msg.message}]`
+ );
+ return noteModel;
+};
+const buildMessageModel = function(msg, actors, diagObj) {
+ if (![
+ diagObj.db.LINETYPE.SOLID_OPEN,
+ diagObj.db.LINETYPE.DOTTED_OPEN,
+ diagObj.db.LINETYPE.SOLID,
+ diagObj.db.LINETYPE.DOTTED,
+ diagObj.db.LINETYPE.SOLID_CROSS,
+ diagObj.db.LINETYPE.DOTTED_CROSS,
+ diagObj.db.LINETYPE.SOLID_POINT,
+ diagObj.db.LINETYPE.DOTTED_POINT
+ ].includes(msg.type)) {
+ return {};
+ }
+ const [fromLeft, fromRight] = activationBounds(msg.from, actors);
+ const [toLeft, toRight] = activationBounds(msg.to, actors);
+ const isArrowToRight = fromLeft <= toLeft;
+ const startx = isArrowToRight ? fromRight : fromLeft;
+ let stopx = isArrowToRight ? toLeft : toRight;
+ const isArrowToActivation = Math.abs(toLeft - toRight) > 2;
+ const adjustValue = (value) => {
+ return isArrowToRight ? -value : value;
+ };
+ if (msg.from === msg.to) {
+ stopx = startx;
+ } else {
+ if (msg.activate && !isArrowToActivation) {
+ stopx += adjustValue(conf.activationWidth / 2 - 1);
+ }
+ if (![diagObj.db.LINETYPE.SOLID_OPEN, diagObj.db.LINETYPE.DOTTED_OPEN].includes(msg.type)) {
+ stopx += adjustValue(3);
+ }
+ }
+ const allBounds = [fromLeft, fromRight, toLeft, toRight];
+ const boundedWidth = Math.abs(startx - stopx);
+ if (msg.wrap && msg.message) {
+ msg.message = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(
+ msg.message,
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(boundedWidth + 2 * conf.wrapPadding, conf.width),
+ messageFont(conf)
+ );
+ }
+ const msgDims = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(msg.message, messageFont(conf));
+ return {
+ width: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding,
+ boundedWidth + 2 * conf.wrapPadding,
+ conf.width
+ ),
+ height: 0,
+ startx,
+ stopx,
+ starty: 0,
+ stopy: 0,
+ message: msg.message,
+ type: msg.type,
+ wrap: msg.wrap,
+ fromBounds: Math.min.apply(null, allBounds),
+ toBounds: Math.max.apply(null, allBounds)
+ };
+};
+const calculateLoopBounds = function(messages, actors, _maxWidthPerActor, diagObj) {
+ const loops = {};
+ const stack = [];
+ let current, noteModel, msgModel;
+ messages.forEach(function(msg) {
+ msg.id = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.random({ length: 10 });
+ switch (msg.type) {
+ case diagObj.db.LINETYPE.LOOP_START:
+ case diagObj.db.LINETYPE.ALT_START:
+ case diagObj.db.LINETYPE.OPT_START:
+ case diagObj.db.LINETYPE.PAR_START:
+ case diagObj.db.LINETYPE.PAR_OVER_START:
+ case diagObj.db.LINETYPE.CRITICAL_START:
+ case diagObj.db.LINETYPE.BREAK_START:
+ stack.push({
+ id: msg.id,
+ msg: msg.message,
+ from: Number.MAX_SAFE_INTEGER,
+ to: Number.MIN_SAFE_INTEGER,
+ width: 0
+ });
+ break;
+ case diagObj.db.LINETYPE.ALT_ELSE:
+ case diagObj.db.LINETYPE.PAR_AND:
+ case diagObj.db.LINETYPE.CRITICAL_OPTION:
+ if (msg.message) {
+ current = stack.pop();
+ loops[current.id] = current;
+ loops[msg.id] = current;
+ stack.push(current);
+ }
+ break;
+ case diagObj.db.LINETYPE.LOOP_END:
+ case diagObj.db.LINETYPE.ALT_END:
+ case diagObj.db.LINETYPE.OPT_END:
+ case diagObj.db.LINETYPE.PAR_END:
+ case diagObj.db.LINETYPE.CRITICAL_END:
+ case diagObj.db.LINETYPE.BREAK_END:
+ current = stack.pop();
+ loops[current.id] = current;
+ break;
+ case diagObj.db.LINETYPE.ACTIVE_START:
+ {
+ const actorRect = actors[msg.from ? msg.from.actor : msg.to.actor];
+ const stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length;
+ const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;
+ const toAdd = {
+ startx: x,
+ stopx: x + conf.activationWidth,
+ actor: msg.from.actor,
+ enabled: true
+ };
+ bounds.activations.push(toAdd);
+ }
+ break;
+ case diagObj.db.LINETYPE.ACTIVE_END:
+ {
+ const lastActorActivationIdx = bounds.activations.map((a) => a.actor).lastIndexOf(msg.from.actor);
+ delete bounds.activations.splice(lastActorActivationIdx, 1)[0];
+ }
+ break;
+ }
+ const isNote = msg.placement !== void 0;
+ if (isNote) {
+ noteModel = buildNoteModel(msg, actors, diagObj);
+ msg.noteModel = noteModel;
+ stack.forEach((stk) => {
+ current = stk;
+ current.from = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(current.from, noteModel.startx);
+ current.to = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.to, noteModel.startx + noteModel.width);
+ current.width = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth;
+ });
+ } else {
+ msgModel = buildMessageModel(msg, actors, diagObj);
+ msg.msgModel = msgModel;
+ if (msgModel.startx && msgModel.stopx && stack.length > 0) {
+ stack.forEach((stk) => {
+ current = stk;
+ if (msgModel.startx === msgModel.stopx) {
+ const from = actors[msg.from];
+ const to = actors[msg.to];
+ current.from = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(
+ from.x - msgModel.width / 2,
+ from.x - from.width / 2,
+ current.from
+ );
+ current.to = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ to.x + msgModel.width / 2,
+ to.x + from.width / 2,
+ current.to
+ );
+ current.width = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.width, Math.abs(current.to - current.from)) - conf.labelBoxWidth;
+ } else {
+ current.from = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(msgModel.startx, current.from);
+ current.to = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(msgModel.stopx, current.to);
+ current.width = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.width, msgModel.width) - conf.labelBoxWidth;
+ }
+ });
+ }
+ }
+ });
+ bounds.activations = [];
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Loop type widths:", loops);
+ return loops;
+};
+const renderer = {
+ bounds,
+ drawActors,
+ drawActorsPopup,
+ setConf,
+ draw
+};
+const diagram = {
+ parser: parser$1,
+ db,
+ renderer,
+ styles,
+ init: ({ wrap }) => {
+ db.setWrap(wrap);
+ }
+};
+
+
+
+/***/ }),
+
+/***/ 72015:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ a: () => (/* binding */ drawBackgroundRect),
+/* harmony export */ b: () => (/* binding */ drawEmbeddedImage),
+/* harmony export */ c: () => (/* binding */ drawImage),
+/* harmony export */ d: () => (/* binding */ drawRect),
+/* harmony export */ e: () => (/* binding */ getTextObj),
+/* harmony export */ f: () => (/* binding */ drawText),
+/* harmony export */ g: () => (/* binding */ getNoteRect)
+/* harmony export */ });
+/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17967);
+/* harmony import */ var _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76365);
+
+
+const drawRect = (element, rectData) => {
+ const rectElement = element.append("rect");
+ rectElement.attr("x", rectData.x);
+ rectElement.attr("y", rectData.y);
+ rectElement.attr("fill", rectData.fill);
+ rectElement.attr("stroke", rectData.stroke);
+ rectElement.attr("width", rectData.width);
+ rectElement.attr("height", rectData.height);
+ rectData.rx !== void 0 && rectElement.attr("rx", rectData.rx);
+ rectData.ry !== void 0 && rectElement.attr("ry", rectData.ry);
+ if (rectData.attrs !== void 0) {
+ for (const attrKey in rectData.attrs) {
+ rectElement.attr(attrKey, rectData.attrs[attrKey]);
+ }
+ }
+ rectData.class !== void 0 && rectElement.attr("class", rectData.class);
+ return rectElement;
+};
+const drawBackgroundRect = (element, bounds) => {
+ const rectData = {
+ x: bounds.startx,
+ y: bounds.starty,
+ width: bounds.stopx - bounds.startx,
+ height: bounds.stopy - bounds.starty,
+ fill: bounds.fill,
+ stroke: bounds.stroke,
+ class: "rect"
+ };
+ const rectElement = drawRect(element, rectData);
+ rectElement.lower();
+};
+const drawText = (element, textData) => {
+ const nText = textData.text.replace(_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.H, " ");
+ const textElem = element.append("text");
+ textElem.attr("x", textData.x);
+ textElem.attr("y", textData.y);
+ textElem.attr("class", "legend");
+ textElem.style("text-anchor", textData.anchor);
+ textData.class !== void 0 && textElem.attr("class", textData.class);
+ const tspan = textElem.append("tspan");
+ tspan.attr("x", textData.x + textData.textMargin * 2);
+ tspan.text(nText);
+ return textElem;
+};
+const drawImage = (elem, x, y, link) => {
+ const imageElement = elem.append("image");
+ imageElement.attr("x", x);
+ imageElement.attr("y", y);
+ const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Nm)(link);
+ imageElement.attr("xlink:href", sanitizedLink);
+};
+const drawEmbeddedImage = (element, x, y, link) => {
+ const imageElement = element.append("use");
+ imageElement.attr("x", x);
+ imageElement.attr("y", y);
+ const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Nm)(link);
+ imageElement.attr("xlink:href", `#${sanitizedLink}`);
+};
+const getNoteRect = () => {
+ const noteRectData = {
+ x: 0,
+ y: 0,
+ width: 100,
+ height: 100,
+ fill: "#EDF2AE",
+ stroke: "#666",
+ anchor: "start",
+ rx: 0,
+ ry: 0
+ };
+ return noteRectData;
+};
+const getTextObj = () => {
+ const testObject = {
+ x: 0,
+ y: 0,
+ width: 100,
+ height: 100,
+ "text-anchor": "start",
+ style: "#666",
+ textMargin: 0,
+ rx: 0,
+ ry: 0,
+ tspan: true
+ };
+ return testObject;
+};
+
+
+
+/***/ })
+
+};
+;
\ No newline at end of file
diff --git a/build/assets/js/1772.1670cec0.js b/build/assets/js/1772.1670cec0.js
new file mode 100644
index 00000000..6c14d456
--- /dev/null
+++ b/build/assets/js/1772.1670cec0.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[1772],{5658:(e,t,n)=>{n.d(t,{Z:()=>a});n(67294);var i=n(36905),o=n(95999),s=n(86641),r=n(85893);function a(e){let{className:t}=e;return(0,r.jsx)("main",{className:(0,i.Z)("container margin-vert--xl",t),children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,r.jsx)(s.Z,{as:"h1",className:"hero__title",children:(0,r.jsx)(o.Z,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},51772:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});n(67294);var i=n(95999),o=n(10833),s=n(80647),r=n(5658),a=n(85893);function d(){const e=(0,i.I)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.d,{title:e}),(0,a.jsx)(s.Z,{children:(0,a.jsx)(r.Z,{})})]})}}}]);
\ No newline at end of file
diff --git a/build/assets/js/1772.dd2552f7.js b/build/assets/js/1772.dd2552f7.js
deleted file mode 100644
index 03b073bf..00000000
--- a/build/assets/js/1772.dd2552f7.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[1772],{5658:(e,t,n)=>{n.d(t,{Z:()=>a});n(67294);var i=n(36905),o=n(95999),s=n(92503),r=n(85893);function a(e){let{className:t}=e;return(0,r.jsx)("main",{className:(0,i.Z)("container margin-vert--xl",t),children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,r.jsx)(s.Z,{as:"h1",className:"hero__title",children:(0,r.jsx)(o.Z,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},51772:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});n(67294);var i=n(95999),o=n(10833),s=n(80647),r=n(5658),a=n(85893);function d(){const e=(0,i.I)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.d,{title:e}),(0,a.jsx)(s.Z,{children:(0,a.jsx)(r.Z,{})})]})}}}]);
\ No newline at end of file
diff --git a/build/assets/js/17896441.0d0ddda7.js b/build/assets/js/17896441.0d0ddda7.js
deleted file mode 100644
index 12fb1485..00000000
--- a/build/assets/js/17896441.0d0ddda7.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[7918],{45127:(e,r,t)=>{t.d(r,{Z:()=>a});t(67294);var s=t(57983);const n={bln:"bln_ckWC",bleft:"bleft_lBjk",gityo:"gityo_f5mA",bright:"bright_RGpM",thought:"thought_gn5Z",smile:"smile_ibE5",weary:"weary_f8GU",anger:"anger_rz37",sorry:"sorry_kSJN",search:"search_uoYu"};var l=t(85893);const a={...s.Z,MessageBubble:function(e){let{children:r,speaker:t,align:s,id:a}=e,i="left"===s?[n.bln,n.bleft].join(" "):[n.bln,n.bright].join(" ");return(0,l.jsx)("div",{className:i,"data-speaker":t,id:a,children:r})}}}}]);
\ No newline at end of file
diff --git a/build/assets/js/17896441.6c0b3b39.js b/build/assets/js/17896441.6c0b3b39.js
new file mode 100644
index 00000000..769092f9
--- /dev/null
+++ b/build/assets/js/17896441.6c0b3b39.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[7918],{65326:(n,e,i)=>{i.d(e,{Z:()=>I});i(67294);var t=i(94697),a=i(86010),s=i(95999),o=i(35281),r=i(9423),c=i(48944),l=i(85893);function d(n){let{type:e,className:i,children:t}=n;return(0,l.jsx)("div",{className:(0,a.Z)(o.k.common.admonition,o.k.common.admonitionType(e),r.Z.admonition,i),children:t})}function h(n){let{icon:e,id:i,title:t}=n;const s=t.match?(t.match(/^#+/)||[""])[0].length:0,o=s>0?t.replace(/^#+/,"").trim():t,d=(0,a.Z)("anchor","title",c.Z.anchorWithStickyNavbar);return(0,l.jsxs)("div",{className:r.Z.admonitionHeading,children:[(0,l.jsx)("span",{className:r.Z.admonitionIcon,children:e}),3==s?(0,l.jsx)("h3",{id:i,className:d,children:o}):4==s?(0,l.jsx)("h4",{id:i,className:d,children:o}):5==s?(0,l.jsx)("h5",{id:i,className:d,children:o}):6==s?(0,l.jsx)("h6",{id:i,className:d,children:o}):(0,l.jsx)(l.Fragment,{children:o})]})}function m(n){let{children:e}=n;return e?(0,l.jsx)("div",{className:r.Z.admonitionContent,children:e}):null}function u(n){const{type:e,icon:i,title:t,children:a,className:s,id:o}=n;return(0,l.jsxs)(d,{type:e,className:s,children:[(0,l.jsx)(h,{title:t,icon:i,id:o}),(0,l.jsx)(m,{children:a})]})}var f=i(54931);const j={icon:(0,l.jsx)(f.Z,{}),title:(0,l.jsx)(s.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function x(n){return(0,l.jsx)(u,{...j,...n,className:(0,a.Z)("alert alert--secondary",n.className),children:n.children})}var g=i(21764);const Z={icon:(0,l.jsx)(g.Z,{}),title:(0,l.jsx)(s.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function p(n){return(0,l.jsx)(u,{...Z,...n,className:(0,a.Z)("alert alert--success",n.className),children:n.children})}var N=i(39658);const b={icon:(0,l.jsx)(N.Z,{}),title:(0,l.jsx)(s.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function y(n){return(0,l.jsx)(u,{...b,...n,className:(0,a.Z)("alert alert--info",n.className),children:n.children})}var v=i(16712);const k={icon:(0,l.jsx)(v.Z,{}),title:(0,l.jsx)(s.Z,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};var w=i(3264);const _={icon:(0,l.jsx)(w.Z,{}),title:(0,l.jsx)(s.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const T={icon:(0,l.jsx)(v.Z,{}),title:(0,l.jsx)(s.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const C={...{note:x,tip:p,info:y,warning:function(n){return(0,l.jsx)(u,{...k,...n,className:(0,a.Z)("alert alert--warning",n.className),children:n.children})},danger:function(n){return(0,l.jsx)(u,{..._,...n,className:(0,a.Z)("alert alert--danger",n.className),children:n.children})}},...{secondary:n=>(0,l.jsx)(x,{title:"secondary",...n}),important:n=>(0,l.jsx)(y,{title:"important",...n}),success:n=>(0,l.jsx)(p,{title:"success",...n}),caution:function(n){return(0,l.jsx)(u,{...T,...n,className:(0,a.Z)("alert alert--warning",n.className),children:n.children})}}};function I(n){const e=(0,t.X)(n),i=(a=e.type,C[a]||(console.warn(`No admonition component found for admonition type "${a}". Using Info as fallback.`),C.info));var a;return(0,l.jsx)(i,{...e})}},45127:(n,e,i)=>{i.d(e,{Z:()=>o});i(67294);var t=i(57983);const a={bln:"bln_ckWC",bleft:"bleft_lBjk",gityo:"gityo_f5mA",bright:"bright_RGpM",thought:"thought_gn5Z",smile:"smile_ibE5",weary:"weary_f8GU",anger:"anger_rz37",sorry:"sorry_kSJN",search:"search_uoYu"};var s=i(85893);const o={...t.Z,MessageBubble:function(n){let{children:e,speaker:i,align:t,id:o}=n,r="left"===t?[a.bln,a.bleft].join(" "):[a.bln,a.bright].join(" ");return(0,s.jsx)("div",{className:r,"data-speaker":i,id:o,children:e})}}}}]);
\ No newline at end of file
diff --git a/build/assets/js/183.03839426.js b/build/assets/js/183.03839426.js
deleted file mode 100644
index 2029d2a0..00000000
--- a/build/assets/js/183.03839426.js
+++ /dev/null
@@ -1,1320 +0,0 @@
-"use strict";
-exports.id = 183;
-exports.ids = [183];
-exports.modules = {
-
-/***/ 52183:
-/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ diagram: () => (/* binding */ diagram)
-/* harmony export */ });
-/* harmony import */ var _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(85322);
-/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64218);
-/* harmony import */ var _svgDrawCommon_ad5ef572_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43317);
-/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27484);
-/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17967);
-/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20683);
-
-
-
-
-
-
-
-
-
-
-
-
-var parser = function() {
- var o = function(k, v, o2, l) {
- for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
- ;
- return o2;
- }, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 18], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 14];
- var parser2 = {
- trace: function trace() {
- },
- yy: {},
- symbols_: { "error": 2, "start": 3, "journey": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "taskName": 18, "taskData": 19, "$accept": 0, "$end": 1 },
- terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" },
- productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]],
- performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
- var $0 = $$.length - 1;
- switch (yystate) {
- case 1:
- return $$[$0 - 1];
- case 2:
- this.$ = [];
- break;
- case 3:
- $$[$0 - 1].push($$[$0]);
- this.$ = $$[$0 - 1];
- break;
- case 4:
- case 5:
- this.$ = $$[$0];
- break;
- case 6:
- case 7:
- this.$ = [];
- break;
- case 8:
- yy.setDiagramTitle($$[$0].substr(6));
- this.$ = $$[$0].substr(6);
- break;
- case 9:
- this.$ = $$[$0].trim();
- yy.setAccTitle(this.$);
- break;
- case 10:
- case 11:
- this.$ = $$[$0].trim();
- yy.setAccDescription(this.$);
- break;
- case 12:
- yy.addSection($$[$0].substr(8));
- this.$ = $$[$0].substr(8);
- break;
- case 13:
- yy.addTask($$[$0 - 1], $$[$0]);
- this.$ = "task";
- break;
- }
- },
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 15, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, o($V0, [2, 11]), o($V0, [2, 12]), { 19: [1, 18] }, o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 13])],
- 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 lex() {
- 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 = lex();
- }
- 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 lex() {
- 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: { "case-insensitive": true },
- performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
- switch ($avoiding_name_collisions) {
- case 0:
- break;
- case 1:
- break;
- case 2:
- return 10;
- case 3:
- break;
- case 4:
- break;
- case 5:
- return 4;
- case 6:
- return 11;
- case 7:
- this.begin("acc_title");
- return 12;
- case 8:
- this.popState();
- return "acc_title_value";
- case 9:
- this.begin("acc_descr");
- return 14;
- case 10:
- this.popState();
- return "acc_descr_value";
- case 11:
- this.begin("acc_descr_multiline");
- break;
- case 12:
- this.popState();
- break;
- case 13:
- return "acc_descr_multiline_value";
- case 14:
- return 17;
- case 15:
- return 18;
- case 16:
- return 19;
- case 17:
- return ":";
- case 18:
- return 6;
- case 19:
- return "INVALID";
- }
- },
- rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
- conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], "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;
-let currentSection = "";
-const sections = [];
-const tasks = [];
-const rawTasks = [];
-const clear = function() {
- sections.length = 0;
- tasks.length = 0;
- currentSection = "";
- rawTasks.length = 0;
- (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.t)();
-};
-const addSection = function(txt) {
- currentSection = txt;
- sections.push(txt);
-};
-const getSections = function() {
- return sections;
-};
-const getTasks = function() {
- let allItemsProcessed = compileTasks();
- const maxDepth = 100;
- let iterationCount = 0;
- while (!allItemsProcessed && iterationCount < maxDepth) {
- allItemsProcessed = compileTasks();
- iterationCount++;
- }
- tasks.push(...rawTasks);
- return tasks;
-};
-const updateActors = function() {
- const tempActors = [];
- tasks.forEach((task) => {
- if (task.people) {
- tempActors.push(...task.people);
- }
- });
- const unique = new Set(tempActors);
- return [...unique].sort();
-};
-const addTask = function(descr, taskData) {
- const pieces = taskData.substr(1).split(":");
- let score = 0;
- let peeps = [];
- if (pieces.length === 1) {
- score = Number(pieces[0]);
- peeps = [];
- } else {
- score = Number(pieces[0]);
- peeps = pieces[1].split(",");
- }
- const peopleList = peeps.map((s) => s.trim());
- const rawTask = {
- section: currentSection,
- type: currentSection,
- people: peopleList,
- task: descr,
- score
- };
- rawTasks.push(rawTask);
-};
-const addTaskOrg = function(descr) {
- const newTask = {
- section: currentSection,
- type: currentSection,
- description: descr,
- task: descr,
- classes: []
- };
- tasks.push(newTask);
-};
-const compileTasks = function() {
- const compileTask = function(pos) {
- return rawTasks[pos].processed;
- };
- let allProcessed = true;
- for (const [i, rawTask] of rawTasks.entries()) {
- compileTask(i);
- allProcessed = allProcessed && rawTask.processed;
- }
- return allProcessed;
-};
-const getActors = function() {
- return updateActors();
-};
-const db = {
- getConfig: () => (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey,
- clear,
- setDiagramTitle: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.q,
- getDiagramTitle: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.r,
- setAccTitle: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.s,
- getAccTitle: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.g,
- setAccDescription: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.b,
- getAccDescription: _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.a,
- addSection,
- getSections,
- getTasks,
- addTask,
- addTaskOrg,
- getActors
-};
-const getStyles = (options) => `.label {
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
- font-family: var(--mermaid-font-family);
- color: ${options.textColor};
- }
- .mouth {
- stroke: #666;
- }
-
- line {
- stroke: ${options.textColor}
- }
-
- .legend {
- fill: ${options.textColor};
- }
-
- .label text {
- fill: #333;
- }
- .label {
- color: ${options.textColor}
- }
-
- .face {
- ${options.faceColor ? `fill: ${options.faceColor}` : "fill: #FFF8DC"};
- stroke: #999;
- }
-
- .node rect,
- .node circle,
- .node ellipse,
- .node polygon,
- .node path {
- fill: ${options.mainBkg};
- stroke: ${options.nodeBorder};
- stroke-width: 1px;
- }
-
- .node .label {
- text-align: center;
- }
- .node.clickable {
- cursor: pointer;
- }
-
- .arrowheadPath {
- fill: ${options.arrowheadColor};
- }
-
- .edgePath .path {
- stroke: ${options.lineColor};
- stroke-width: 1.5px;
- }
-
- .flowchart-link {
- stroke: ${options.lineColor};
- fill: none;
- }
-
- .edgeLabel {
- background-color: ${options.edgeLabelBackground};
- rect {
- opacity: 0.5;
- }
- text-align: center;
- }
-
- .cluster rect {
- }
-
- .cluster text {
- fill: ${options.titleColor};
- }
-
- div.mermaidTooltip {
- position: absolute;
- text-align: center;
- max-width: 200px;
- padding: 2px;
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
- font-family: var(--mermaid-font-family);
- font-size: 12px;
- background: ${options.tertiaryColor};
- border: 1px solid ${options.border2};
- border-radius: 2px;
- pointer-events: none;
- z-index: 100;
- }
-
- .task-type-0, .section-type-0 {
- ${options.fillType0 ? `fill: ${options.fillType0}` : ""};
- }
- .task-type-1, .section-type-1 {
- ${options.fillType0 ? `fill: ${options.fillType1}` : ""};
- }
- .task-type-2, .section-type-2 {
- ${options.fillType0 ? `fill: ${options.fillType2}` : ""};
- }
- .task-type-3, .section-type-3 {
- ${options.fillType0 ? `fill: ${options.fillType3}` : ""};
- }
- .task-type-4, .section-type-4 {
- ${options.fillType0 ? `fill: ${options.fillType4}` : ""};
- }
- .task-type-5, .section-type-5 {
- ${options.fillType0 ? `fill: ${options.fillType5}` : ""};
- }
- .task-type-6, .section-type-6 {
- ${options.fillType0 ? `fill: ${options.fillType6}` : ""};
- }
- .task-type-7, .section-type-7 {
- ${options.fillType0 ? `fill: ${options.fillType7}` : ""};
- }
-
- .actor-0 {
- ${options.actor0 ? `fill: ${options.actor0}` : ""};
- }
- .actor-1 {
- ${options.actor1 ? `fill: ${options.actor1}` : ""};
- }
- .actor-2 {
- ${options.actor2 ? `fill: ${options.actor2}` : ""};
- }
- .actor-3 {
- ${options.actor3 ? `fill: ${options.actor3}` : ""};
- }
- .actor-4 {
- ${options.actor4 ? `fill: ${options.actor4}` : ""};
- }
- .actor-5 {
- ${options.actor5 ? `fill: ${options.actor5}` : ""};
- }
-`;
-const styles = getStyles;
-const drawRect = function(elem, rectData) {
- return (0,_svgDrawCommon_ad5ef572_js__WEBPACK_IMPORTED_MODULE_5__.d)(elem, rectData);
-};
-const drawFace = function(element, faceData) {
- const radius = 15;
- const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible");
- const face = element.append("g");
- face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
- face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
- function smile(face2) {
- const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .Nb1)().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
- face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")");
- }
- function sad(face2) {
- const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .Nb1)().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
- face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")");
- }
- function ambivalent(face2) {
- face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
- }
- if (faceData.score > 3) {
- smile(face);
- } else if (faceData.score < 3) {
- sad(face);
- } else {
- ambivalent(face);
- }
- return circleElement;
-};
-const drawCircle = function(element, circleData) {
- const circleElement = element.append("circle");
- circleElement.attr("cx", circleData.cx);
- circleElement.attr("cy", circleData.cy);
- circleElement.attr("class", "actor-" + circleData.pos);
- circleElement.attr("fill", circleData.fill);
- circleElement.attr("stroke", circleData.stroke);
- circleElement.attr("r", circleData.r);
- if (circleElement.class !== void 0) {
- circleElement.attr("class", circleElement.class);
- }
- if (circleData.title !== void 0) {
- circleElement.append("title").text(circleData.title);
- }
- return circleElement;
-};
-const drawText = function(elem, textData) {
- return (0,_svgDrawCommon_ad5ef572_js__WEBPACK_IMPORTED_MODULE_5__.f)(elem, textData);
-};
-const drawLabel = function(elem, txtObject) {
- function genPoints(x, y, width, height, cut) {
- return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height);
- }
- const polygon = elem.append("polygon");
- polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7));
- polygon.attr("class", "labelBox");
- txtObject.y = txtObject.y + txtObject.labelMargin;
- txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
- drawText(elem, txtObject);
-};
-const drawSection = function(elem, section, conf2) {
- const g = elem.append("g");
- const rect = (0,_svgDrawCommon_ad5ef572_js__WEBPACK_IMPORTED_MODULE_5__.g)();
- rect.x = section.x;
- rect.y = section.y;
- rect.fill = section.fill;
- rect.width = conf2.width * section.taskCount + // width of the tasks
- conf2.diagramMarginX * (section.taskCount - 1);
- rect.height = conf2.height;
- rect.class = "journey-section section-type-" + section.num;
- rect.rx = 3;
- rect.ry = 3;
- drawRect(g, rect);
- _drawTextCandidateFunc(conf2)(
- section.text,
- g,
- rect.x,
- rect.y,
- rect.width,
- rect.height,
- { class: "journey-section section-type-" + section.num },
- conf2,
- section.colour
- );
-};
-let taskCount = -1;
-const drawTask = function(elem, task, conf2) {
- const center = task.x + conf2.width / 2;
- const g = elem.append("g");
- taskCount++;
- const maxHeight = 300 + 5 * 30;
- g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666");
- drawFace(g, {
- cx: center,
- cy: 300 + (5 - task.score) * 30,
- score: task.score
- });
- const rect = (0,_svgDrawCommon_ad5ef572_js__WEBPACK_IMPORTED_MODULE_5__.g)();
- rect.x = task.x;
- rect.y = task.y;
- rect.fill = task.fill;
- rect.width = conf2.width;
- rect.height = conf2.height;
- rect.class = "task task-type-" + task.num;
- rect.rx = 3;
- rect.ry = 3;
- drawRect(g, rect);
- let xPos = task.x + 14;
- task.people.forEach((person) => {
- const colour = task.actors[person].color;
- const circle = {
- cx: xPos,
- cy: task.y,
- r: 7,
- fill: colour,
- stroke: "#000",
- title: person,
- pos: task.actors[person].position
- };
- drawCircle(g, circle);
- xPos += 10;
- });
- _drawTextCandidateFunc(conf2)(
- task.task,
- g,
- rect.x,
- rect.y,
- rect.width,
- rect.height,
- { class: "task" },
- conf2,
- task.colour
- );
-};
-const drawBackgroundRect = function(elem, bounds2) {
- (0,_svgDrawCommon_ad5ef572_js__WEBPACK_IMPORTED_MODULE_5__.a)(elem, bounds2);
-};
-const _drawTextCandidateFunc = function() {
- function byText(content, g, x, y, width, height, textAttrs, colour) {
- const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content);
- _setTextAttrs(text, textAttrs);
- }
- function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) {
- const { taskFontSize, taskFontFamily } = conf2;
- const lines = content.split(/
/gi);
- for (let i = 0; i < lines.length; i++) {
- const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;
- const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily);
- text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]);
- text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
- _setTextAttrs(text, textAttrs);
- }
- }
- function byFo(content, g, x, y, width, height, textAttrs, conf2) {
- const body = g.append("switch");
- const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed");
- const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
- text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
- byTspan(content, body, x, y, width, height, textAttrs, conf2);
- _setTextAttrs(text, textAttrs);
- }
- function _setTextAttrs(toText, fromTextAttrsDict) {
- for (const key in fromTextAttrsDict) {
- if (key in fromTextAttrsDict) {
- toText.attr(key, fromTextAttrsDict[key]);
- }
- }
- }
- return function(conf2) {
- return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
- };
-}();
-const initGraphics = function(graphics) {
- graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
-};
-const svgDraw = {
- drawRect,
- drawCircle,
- drawSection,
- drawText,
- drawLabel,
- drawTask,
- drawBackgroundRect,
- initGraphics
-};
-const setConf = function(cnf) {
- const keys = Object.keys(cnf);
- keys.forEach(function(key) {
- conf[key] = cnf[key];
- });
-};
-const actors = {};
-function drawActorLegend(diagram2) {
- const conf2 = (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey;
- let yPos = 60;
- Object.keys(actors).forEach((person) => {
- const colour = actors[person].color;
- const circleData = {
- cx: 20,
- cy: yPos,
- r: 7,
- fill: colour,
- stroke: "#000",
- pos: actors[person].position
- };
- svgDraw.drawCircle(diagram2, circleData);
- const labelData = {
- x: 40,
- y: yPos + 7,
- fill: "#666",
- text: person,
- textMargin: conf2.boxTextMargin | 5
- };
- svgDraw.drawText(diagram2, labelData);
- yPos += 20;
- });
-}
-const conf = (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey;
-const LEFT_MARGIN = conf.leftMargin;
-const draw = function(text, id, version, diagObj) {
- const conf2 = (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey;
- const securityLevel = (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.c)().securityLevel;
- let sandboxElement;
- if (securityLevel === "sandbox") {
- sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("#i" + id);
- }
- const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body");
- bounds.init();
- const diagram2 = root.select("#" + id);
- svgDraw.initGraphics(diagram2);
- const tasks2 = diagObj.db.getTasks();
- const title = diagObj.db.getDiagramTitle();
- const actorNames = diagObj.db.getActors();
- for (const member in actors) {
- delete actors[member];
- }
- let actorPos = 0;
- actorNames.forEach((actorName) => {
- actors[actorName] = {
- color: conf2.actorColours[actorPos % conf2.actorColours.length],
- position: actorPos
- };
- actorPos++;
- });
- drawActorLegend(diagram2);
- bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);
- drawTasks(diagram2, tasks2, 0);
- const box = bounds.getBounds();
- if (title) {
- diagram2.append("text").text(title).attr("x", LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
- }
- const height = box.stopy - box.starty + 2 * conf2.diagramMarginY;
- const width = LEFT_MARGIN + box.stopx + 2 * conf2.diagramMarginX;
- (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.i)(diagram2, height, width, conf2.useMaxWidth);
- diagram2.append("line").attr("x1", LEFT_MARGIN).attr("y1", conf2.height * 4).attr("x2", width - LEFT_MARGIN - 4).attr("y2", conf2.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
- const extraVertForTitle = title ? 70 : 0;
- diagram2.attr("viewBox", `${box.startx} -25 ${width} ${height + extraVertForTitle}`);
- diagram2.attr("preserveAspectRatio", "xMinYMin meet");
- diagram2.attr("height", height + extraVertForTitle + 25);
-};
-const bounds = {
- data: {
- startx: void 0,
- stopx: void 0,
- starty: void 0,
- stopy: void 0
- },
- verticalPos: 0,
- sequenceItems: [],
- init: function() {
- this.sequenceItems = [];
- this.data = {
- startx: void 0,
- stopx: void 0,
- starty: void 0,
- stopy: void 0
- };
- this.verticalPos = 0;
- },
- updateVal: function(obj, key, val, fun) {
- if (obj[key] === void 0) {
- obj[key] = val;
- } else {
- obj[key] = fun(val, obj[key]);
- }
- },
- updateBounds: function(startx, starty, stopx, stopy) {
- const conf2 = (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey;
- const _self = this;
- let cnt = 0;
- function updateFn(type) {
- return function updateItemBounds(item) {
- cnt++;
- const n = _self.sequenceItems.length - cnt + 1;
- _self.updateVal(item, "starty", starty - n * conf2.boxMargin, Math.min);
- _self.updateVal(item, "stopy", stopy + n * conf2.boxMargin, Math.max);
- _self.updateVal(bounds.data, "startx", startx - n * conf2.boxMargin, Math.min);
- _self.updateVal(bounds.data, "stopx", stopx + n * conf2.boxMargin, Math.max);
- if (!(type === "activation")) {
- _self.updateVal(item, "startx", startx - n * conf2.boxMargin, Math.min);
- _self.updateVal(item, "stopx", stopx + n * conf2.boxMargin, Math.max);
- _self.updateVal(bounds.data, "starty", starty - n * conf2.boxMargin, Math.min);
- _self.updateVal(bounds.data, "stopy", stopy + n * conf2.boxMargin, Math.max);
- }
- };
- }
- this.sequenceItems.forEach(updateFn());
- },
- insert: function(startx, starty, stopx, stopy) {
- const _startx = Math.min(startx, stopx);
- const _stopx = Math.max(startx, stopx);
- const _starty = Math.min(starty, stopy);
- const _stopy = Math.max(starty, stopy);
- this.updateVal(bounds.data, "startx", _startx, Math.min);
- this.updateVal(bounds.data, "starty", _starty, Math.min);
- this.updateVal(bounds.data, "stopx", _stopx, Math.max);
- this.updateVal(bounds.data, "stopy", _stopy, Math.max);
- this.updateBounds(_startx, _starty, _stopx, _stopy);
- },
- bumpVerticalPos: function(bump) {
- this.verticalPos = this.verticalPos + bump;
- this.data.stopy = this.verticalPos;
- },
- getVerticalPos: function() {
- return this.verticalPos;
- },
- getBounds: function() {
- return this.data;
- }
-};
-const fills = conf.sectionFills;
-const textColours = conf.sectionColours;
-const drawTasks = function(diagram2, tasks2, verticalPos) {
- const conf2 = (0,_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey;
- let lastSection = "";
- const sectionVHeight = conf2.height * 2 + conf2.diagramMarginY;
- const taskPos = verticalPos + sectionVHeight;
- let sectionNumber = 0;
- let fill = "#CCC";
- let colour = "black";
- let num = 0;
- for (const [i, task] of tasks2.entries()) {
- if (lastSection !== task.section) {
- fill = fills[sectionNumber % fills.length];
- num = sectionNumber % fills.length;
- colour = textColours[sectionNumber % textColours.length];
- let taskInSectionCount = 0;
- const currentSection2 = task.section;
- for (let taskIndex = i; taskIndex < tasks2.length; taskIndex++) {
- if (tasks2[taskIndex].section == currentSection2) {
- taskInSectionCount = taskInSectionCount + 1;
- } else {
- break;
- }
- }
- const section = {
- x: i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN,
- y: 50,
- text: task.section,
- fill,
- num,
- colour,
- taskCount: taskInSectionCount
- };
- svgDraw.drawSection(diagram2, section, conf2);
- lastSection = task.section;
- sectionNumber++;
- }
- const taskActors = task.people.reduce((acc, actorName) => {
- if (actors[actorName]) {
- acc[actorName] = actors[actorName];
- }
- return acc;
- }, {});
- task.x = i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN;
- task.y = taskPos;
- task.width = conf2.diagramMarginX;
- task.height = conf2.diagramMarginY;
- task.colour = colour;
- task.fill = fill;
- task.num = num;
- task.actors = taskActors;
- svgDraw.drawTask(diagram2, task, conf2);
- bounds.insert(task.x, task.y, task.x + task.width + conf2.taskMargin, 300 + 5 * 30);
- }
-};
-const renderer = {
- setConf,
- draw
-};
-const diagram = {
- parser: parser$1,
- db,
- renderer,
- styles,
- init: (cnf) => {
- renderer.setConf(cnf.journey);
- db.clear();
- }
-};
-
-
-
-/***/ }),
-
-/***/ 43317:
-/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ a: () => (/* binding */ drawBackgroundRect),
-/* harmony export */ b: () => (/* binding */ drawEmbeddedImage),
-/* harmony export */ c: () => (/* binding */ drawImage),
-/* harmony export */ d: () => (/* binding */ drawRect),
-/* harmony export */ e: () => (/* binding */ getTextObj),
-/* harmony export */ f: () => (/* binding */ drawText),
-/* harmony export */ g: () => (/* binding */ getNoteRect)
-/* harmony export */ });
-/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17967);
-/* harmony import */ var _mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85322);
-
-
-const drawRect = (element, rectData) => {
- const rectElement = element.append("rect");
- rectElement.attr("x", rectData.x);
- rectElement.attr("y", rectData.y);
- rectElement.attr("fill", rectData.fill);
- rectElement.attr("stroke", rectData.stroke);
- rectElement.attr("width", rectData.width);
- rectElement.attr("height", rectData.height);
- rectData.rx !== void 0 && rectElement.attr("rx", rectData.rx);
- rectData.ry !== void 0 && rectElement.attr("ry", rectData.ry);
- if (rectData.attrs !== void 0) {
- for (const attrKey in rectData.attrs) {
- rectElement.attr(attrKey, rectData.attrs[attrKey]);
- }
- }
- rectData.class !== void 0 && rectElement.attr("class", rectData.class);
- return rectElement;
-};
-const drawBackgroundRect = (element, bounds) => {
- const rectData = {
- x: bounds.startx,
- y: bounds.starty,
- width: bounds.stopx - bounds.startx,
- height: bounds.stopy - bounds.starty,
- fill: bounds.fill,
- stroke: bounds.stroke,
- class: "rect"
- };
- const rectElement = drawRect(element, rectData);
- rectElement.lower();
-};
-const drawText = (element, textData) => {
- const nText = textData.text.replace(_mermaid_934d9bea_js__WEBPACK_IMPORTED_MODULE_1__.H, " ");
- const textElem = element.append("text");
- textElem.attr("x", textData.x);
- textElem.attr("y", textData.y);
- textElem.attr("class", "legend");
- textElem.style("text-anchor", textData.anchor);
- textData.class !== void 0 && textElem.attr("class", textData.class);
- const tspan = textElem.append("tspan");
- tspan.attr("x", textData.x + textData.textMargin * 2);
- tspan.text(nText);
- return textElem;
-};
-const drawImage = (elem, x, y, link) => {
- const imageElement = elem.append("image");
- imageElement.attr("x", x);
- imageElement.attr("y", y);
- const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Nm)(link);
- imageElement.attr("xlink:href", sanitizedLink);
-};
-const drawEmbeddedImage = (element, x, y, link) => {
- const imageElement = element.append("use");
- imageElement.attr("x", x);
- imageElement.attr("y", y);
- const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Nm)(link);
- imageElement.attr("xlink:href", `#${sanitizedLink}`);
-};
-const getNoteRect = () => {
- const noteRectData = {
- x: 0,
- y: 0,
- width: 100,
- height: 100,
- fill: "#EDF2AE",
- stroke: "#666",
- anchor: "start",
- rx: 0,
- ry: 0
- };
- return noteRectData;
-};
-const getTextObj = () => {
- const testObject = {
- x: 0,
- y: 0,
- width: 100,
- height: 100,
- "text-anchor": "start",
- style: "#666",
- textMargin: 0,
- rx: 0,
- ry: 0,
- tspan: true
- };
- return testObject;
-};
-
-
-
-/***/ })
-
-};
-;
\ No newline at end of file
diff --git a/build/assets/js/194.4b35c995.js b/build/assets/js/194.4b35c995.js
new file mode 100644
index 00000000..85af0d55
--- /dev/null
+++ b/build/assets/js/194.4b35c995.js
@@ -0,0 +1 @@
+(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[194],{17295:(n,t,e)=>{n.exports=function(){function n(t,e,i){function r(a,o){if(!e[a]){if(!t[a]){if(c)return c(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var s=e[a]={exports:{}};t[a][0].call(s.exports,(function(n){return r(t[a][1][n]||n)}),s,s.exports,n,t,e,i)}return e[a].exports}for(var c=void 0,a=0;a0&&void 0!==arguments[0]?arguments[0]:{},i=e.defaultLayoutOptions,c=void 0===i?{}:i,o=e.algorithms,u=void 0===o?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:o,s=e.workerFactory,h=e.workerUrl;if(r(this,n),this.defaultLayoutOptions=c,this.initialized=!1,void 0===h&&void 0===s)throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var f=s;void 0!==h&&void 0===s&&(f=function(n){return new Worker(n)});var l=f(h);if("function"!=typeof l.postMessage)throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new a(l),this.worker.postMessage({cmd:"register",algorithms:u}).then((function(n){return t.initialized=!0})).catch(console.err)}return i(n,[{key:"layout",value:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=t.layoutOptions,i=void 0===e?this.defaultLayoutOptions:e,r=t.logging,c=void 0!==r&&r,a=t.measureExecutionTime,o=void 0!==a&&a;return n?this.worker.postMessage({cmd:"layout",graph:n,layoutOptions:i,options:{logging:c,measureExecutionTime:o}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker.terminate()}}]),n}();e.default=c;var a=function(){function n(t){var e=this;if(r(this,n),void 0===t)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=t,this.worker.onmessage=function(n){setTimeout((function(){e.receive(e,n)}),0)}}return i(n,[{key:"postMessage",value:function(n){var t=this.id||0;this.id=t+1,n.id=t;var e=this;return new Promise((function(i,r){e.resolvers[t]=function(n,t){n?(e.convertGwtStyleError(n),r(n)):i(t)},e.worker.postMessage(n)}))}},{key:"receive",value:function(n,t){var e=t.data,i=n.resolvers[e.id];i&&(delete n.resolvers[e.id],e.error?i(e.error):i(null,e.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(n){if(n){var t=n.__java$exception;t&&(t.cause&&t.cause.backingJsObject&&(n.cause=t.cause.backingJsObject,this.convertGwtStyleError(n.cause)),delete n.__java$exception)}}}]),n}()},{}],2:[function(n,t,i){(function(n){(function(){"use strict";var e;function r(){}function c(){}function a(){}function o(){}function u(){}function s(){}function h(){}function f(){}function l(){}function b(){}function w(){}function d(){}function g(){}function p(){}function m(){}function v(){}function k(){}function y(){}function M(){}function T(){}function j(){}function E(){}function S(){}function P(){}function C(){}function I(){}function O(){}function A(){}function L(){}function N(){}function $(){}function D(){}function x(){}function R(){}function K(){}function F(){}function _(){}function B(){}function H(){}function U(){}function G(){}function q(){}function X(){}function z(){}function V(){}function W(){}function Q(){}function J(){}function Y(){}function Z(){}function nn(){}function tn(){}function en(){}function rn(){}function cn(){}function an(){}function on(){}function un(){}function sn(){}function hn(){}function fn(){}function ln(){}function bn(){}function wn(){}function dn(){}function gn(){}function pn(){}function mn(){}function vn(){}function kn(){}function yn(){}function Mn(){}function Tn(){}function jn(){}function En(){}function Sn(){}function Pn(){}function Cn(){}function In(){}function On(){}function An(){}function Ln(){}function Nn(){}function $n(){}function Dn(){}function xn(){}function Rn(){}function Kn(){}function Fn(){}function _n(){}function Bn(){}function Hn(){}function Un(){}function Gn(){}function qn(){}function Xn(){}function zn(){}function Vn(){}function Wn(){}function Qn(){}function Jn(){}function Yn(){}function Zn(){}function nt(){}function tt(){}function et(){}function it(){}function rt(){}function ct(){}function at(){}function ot(){}function ut(){}function st(){}function ht(){}function ft(){}function lt(){}function bt(){}function wt(){}function dt(){}function gt(){}function pt(){}function mt(){}function vt(){}function kt(){}function yt(){}function Mt(){}function Tt(){}function jt(){}function Et(){}function St(){}function Pt(){}function Ct(){}function It(){}function Ot(){}function At(){}function Lt(){}function Nt(){}function $t(){}function Dt(){}function xt(){}function Rt(){}function Kt(){}function Ft(){}function _t(){}function Bt(){}function Ht(){}function Ut(){}function Gt(){}function qt(){}function Xt(){}function zt(){}function Vt(){}function Wt(){}function Qt(){}function Jt(){}function Yt(){}function Zt(){}function ne(){}function te(){}function ee(){}function ie(){}function re(){}function ce(){}function ae(){}function oe(){}function ue(){}function se(){}function he(){}function fe(){}function le(){}function be(){}function we(){}function de(){}function ge(){}function pe(){}function me(){}function ve(){}function ke(){}function ye(){}function Me(){}function Te(){}function je(){}function Ee(){}function Se(){}function Pe(){}function Ce(){}function Ie(){}function Oe(){}function Ae(){}function Le(){}function Ne(){}function $e(){}function De(){}function xe(){}function Re(){}function Ke(){}function Fe(){}function _e(){}function Be(){}function He(){}function Ue(){}function Ge(){}function qe(){}function Xe(){}function ze(){}function Ve(){}function We(){}function Qe(){}function Je(){}function Ye(){}function Ze(){}function ni(){}function ti(){}function ei(){}function ii(){}function ri(){}function ci(){}function ai(){}function oi(){}function ui(){}function si(){}function hi(){}function fi(){}function li(){}function bi(){}function wi(){}function di(){}function gi(){}function pi(){}function mi(){}function vi(){}function ki(){}function yi(){}function Mi(){}function Ti(){}function ji(){}function Ei(){}function Si(){}function Pi(){}function Ci(){}function Ii(){}function Oi(){}function Ai(){}function Li(){}function Ni(){}function $i(){}function Di(){}function xi(){}function Ri(){}function Ki(){}function Fi(){}function _i(){}function Bi(){}function Hi(){}function Ui(){}function Gi(){}function qi(){}function Xi(){}function zi(){}function Vi(){}function Wi(){}function Qi(){}function Ji(){}function Yi(){}function Zi(){}function nr(){}function tr(){}function er(){}function ir(){}function rr(){}function cr(){}function ar(){}function or(){}function ur(){}function sr(){}function hr(){}function fr(){}function lr(){}function br(){}function wr(){}function dr(){}function gr(){}function pr(){}function mr(){}function vr(){}function kr(){}function yr(){}function Mr(){}function Tr(){}function jr(){}function Er(){}function Sr(){}function Pr(){}function Cr(){}function Ir(){}function Or(){}function Ar(){}function Lr(){}function Nr(){}function $r(){}function Dr(){}function xr(){}function Rr(){}function Kr(){}function Fr(){}function _r(){}function Br(){}function Hr(){}function Ur(){}function Gr(){}function qr(){}function Xr(){}function zr(){}function Vr(){}function Wr(){}function Qr(){}function Jr(){}function Yr(){}function Zr(){}function nc(){}function tc(){}function ec(){}function ic(){}function rc(){}function cc(){}function ac(){}function oc(){}function uc(){}function sc(){}function hc(){}function fc(){}function lc(){}function bc(){}function wc(){}function dc(){}function gc(){}function pc(){}function mc(){}function vc(){}function kc(){}function yc(){}function Mc(){}function Tc(){}function jc(){}function Ec(){}function Sc(){}function Pc(){}function Cc(){}function Ic(){}function Oc(){}function Ac(){}function Lc(){}function Nc(){}function $c(){}function Dc(){}function xc(){}function Rc(){}function Kc(){}function Fc(){}function _c(){}function Bc(){}function Hc(){}function Uc(){}function Gc(){}function qc(){}function Xc(){}function zc(){}function Vc(){}function Wc(){}function Qc(){}function Jc(){}function Yc(){}function Zc(){}function na(){}function ta(){}function ea(){}function ia(){}function ra(){}function ca(){}function aa(){}function oa(){}function ua(){}function sa(){}function ha(){}function fa(){}function la(){}function ba(){}function wa(){}function da(){}function ga(){}function pa(){}function ma(){}function va(){}function ka(){}function ya(){}function Ma(){}function Ta(){}function ja(){}function Ea(){}function Sa(){}function Pa(){}function Ca(){}function Ia(){}function Oa(){}function Aa(){}function La(){}function Na(){}function $a(){}function Da(){}function xa(){}function Ra(){}function Ka(){}function Fa(){}function _a(){}function Ba(){}function Ha(){}function Ua(){}function Ga(){}function qa(){}function Xa(){}function za(){}function Va(){}function Wa(){}function Qa(){}function Ja(){}function Ya(){}function Za(){}function no(){}function to(){}function eo(){}function io(){}function ro(){}function co(){}function ao(){}function oo(){}function uo(){}function so(){}function ho(){}function fo(){}function lo(){}function bo(){}function wo(){}function go(){}function po(){}function mo(){}function vo(){}function ko(){}function yo(){}function Mo(){}function To(){}function jo(){}function Eo(){}function So(){}function Po(){}function Co(){}function Io(){}function Oo(){}function Ao(){}function Lo(){}function No(){}function $o(){}function Do(){}function xo(){}function Ro(){}function Ko(){}function Fo(){}function _o(){}function Bo(){}function Ho(){}function Uo(){}function Go(){}function qo(){}function Xo(){}function zo(){}function Vo(){}function Wo(){}function Qo(){}function Jo(){}function Yo(){}function Zo(){}function nu(){}function tu(){}function eu(){}function iu(){}function ru(){}function cu(){}function au(){}function ou(){}function uu(){}function su(){}function hu(){}function fu(){}function lu(){}function bu(){}function wu(){}function du(){}function gu(){}function pu(){}function mu(){}function vu(){}function ku(){}function yu(){}function Mu(){}function Tu(){}function ju(){}function Eu(){}function Su(){}function Pu(){}function Cu(){}function Iu(){}function Ou(){}function Au(){}function Lu(){}function Nu(){}function $u(){}function Du(){}function xu(){}function Ru(){}function Ku(){}function Fu(){}function _u(){}function Bu(){}function Hu(){}function Uu(){}function Gu(){}function qu(){}function Xu(){}function zu(){}function Vu(){}function Wu(){}function Qu(){}function Ju(){}function Yu(){}function Zu(){}function ns(){}function ts(){}function es(){}function is(){}function rs(){}function cs(){}function as(){}function os(){}function us(){}function ss(){}function hs(){}function fs(){}function ls(){}function bs(){}function ws(){}function ds(){}function gs(){}function ps(){}function ms(){}function vs(){}function ks(){}function ys(){}function Ms(){}function Ts(){}function js(){}function Es(){}function Ss(){}function Ps(){}function Cs(){}function Is(){}function Os(){}function As(){}function Ls(){}function Ns(){}function $s(){}function Ds(){}function xs(){}function Rs(){}function Ks(){}function Fs(){}function _s(){}function Bs(){}function Hs(){}function Us(){}function Gs(){}function qs(){}function Xs(){}function zs(){}function Vs(){}function Ws(){}function Qs(){}function Js(){}function Ys(){}function Zs(){}function nh(){}function th(){}function eh(){}function ih(){}function rh(){}function ch(){}function ah(){}function oh(){}function uh(){}function sh(){}function hh(){}function fh(){}function lh(){}function bh(){}function wh(){}function dh(){}function gh(){}function ph(){}function mh(){}function vh(){}function kh(){}function yh(){}function Mh(){}function Th(){}function jh(){}function Eh(){}function Sh(){}function Ph(){}function Ch(){}function Ih(){}function Oh(){}function Ah(){}function Lh(){}function Nh(){}function $h(){}function Dh(){}function xh(){}function Rh(){}function Kh(){}function Fh(){}function _h(){}function Bh(){}function Hh(){}function Uh(){}function Gh(){}function qh(){}function Xh(){}function zh(){}function Vh(){}function Wh(){}function Qh(){}function Jh(){}function Yh(){}function Zh(){}function nf(){}function tf(){}function ef(){}function rf(){}function cf(){}function af(){}function of(){}function uf(){}function sf(){}function hf(){}function ff(){}function lf(){}function bf(){}function wf(){}function df(){}function gf(){}function pf(){}function mf(){}function vf(){}function kf(){}function yf(){}function Mf(){}function Tf(){}function jf(){}function Ef(){}function Sf(){}function Pf(){}function Cf(){}function If(){}function Of(){}function Af(){}function Lf(){}function Nf(){}function $f(){}function Df(){}function xf(){}function Rf(n){}function Kf(n){}function Ff(){gy()}function _f(){VS()}function Bf(){MEn()}function Hf(){pbn()}function Uf(){ryn()}function Gf(){oOn()}function qf(){cGn()}function Xf(){yjn()}function zf(){Bjn()}function Vf(){WS()}function Wf(){HB()}function Qf(){QS()}function Jf(){Pun()}function Yf(){F7()}function Zf(){Ean()}function nl(){Y0()}function tl(){Pan()}function el(){Unn()}function il(){Q0()}function rl(){Cln()}function cl(){Ian()}function al(){Can()}function ol(){c6()}function ul(){Oan()}function sl(){jIn()}function hl(){YS()}function fl(){VYn()}function ll(){jYn()}function bl(){Aan()}function wl(){Iun()}function dl(){Z0()}function gl(){Pjn()}function pl(){t2()}function ml(){gUn()}function vl(){eDn()}function kl(){tcn()}function yl(){Kdn()}function Ml(){QGn()}function Tl(){e3()}function jl(){ncn()}function El(){EHn()}function Sl(){jOn()}function Pl(){IHn()}function Cl(){S_n()}function Il(){fIn()}function Ol(){uBn()}function Al(){jMn()}function Ll(){oB()}function Nl(){Stn()}function $l(){lIn()}function Dl(){XYn()}function xl(){Iln()}function Rl(){Wmn()}function Kl(){Oun()}function Fl(){tXn()}function _l(){vGn()}function Bl(n){tJ(n)}function Hl(n){this.a=n}function Ul(n){this.a=n}function Gl(n){this.a=n}function ql(n){this.a=n}function Xl(n){this.a=n}function zl(n){this.a=n}function Vl(n){this.a=n}function Wl(n){this.a=n}function Ql(n){this.a=n}function Jl(n){this.a=n}function Yl(n){this.a=n}function Zl(n){this.a=n}function nb(n){this.a=n}function tb(n){this.a=n}function eb(n){this.a=n}function ib(n){this.a=n}function rb(n){this.a=n}function cb(n){this.a=n}function ab(n){this.a=n}function ob(n){this.a=n}function ub(n){this.a=n}function sb(n){this.a=n}function hb(n){this.b=n}function fb(n){this.c=n}function lb(n){this.a=n}function bb(n){this.a=n}function wb(n){this.a=n}function db(n){this.a=n}function gb(n){this.a=n}function pb(n){this.a=n}function mb(n){this.a=n}function vb(n){this.a=n}function kb(n){this.a=n}function yb(n){this.a=n}function Mb(n){this.a=n}function Tb(n){this.a=n}function jb(n){this.a=n}function Eb(n){this.a=n}function Sb(n){this.a=n}function Pb(n){this.a=n}function Cb(n){this.a=n}function Ib(){this.a=[]}function Ob(n,t){n.a=t}function Ab(n,t){n.a=t}function Lb(n,t){n.b=t}function Nb(n,t){n.b=t}function $b(n,t){n.b=t}function Db(n,t){n.j=t}function xb(n,t){n.g=t}function Rb(n,t){n.i=t}function Kb(n,t){n.c=t}function Fb(n,t){n.c=t}function _b(n,t){n.d=t}function Bb(n,t){n.d=t}function Hb(n,t){n.k=t}function Ub(n,t){n.c=t}function Gb(n,t){n.c=t}function qb(n,t){n.a=t}function Xb(n,t){n.a=t}function zb(n,t){n.f=t}function Vb(n,t){n.a=t}function Wb(n,t){n.b=t}function Qb(n,t){n.d=t}function Jb(n,t){n.i=t}function Yb(n,t){n.o=t}function Zb(n,t){n.r=t}function nw(n,t){n.a=t}function tw(n,t){n.b=t}function ew(n,t){n.e=t}function iw(n,t){n.f=t}function rw(n,t){n.g=t}function cw(n,t){n.e=t}function aw(n,t){n.f=t}function ow(n,t){n.f=t}function uw(n,t){n.a=t}function sw(n,t){n.b=t}function hw(n,t){n.n=t}function fw(n,t){n.a=t}function lw(n,t){n.c=t}function bw(n,t){n.c=t}function ww(n,t){n.c=t}function dw(n,t){n.a=t}function gw(n,t){n.a=t}function pw(n,t){n.d=t}function mw(n,t){n.d=t}function vw(n,t){n.e=t}function kw(n,t){n.e=t}function yw(n,t){n.g=t}function Mw(n,t){n.f=t}function Tw(n,t){n.j=t}function jw(n,t){n.a=t}function Ew(n,t){n.a=t}function Sw(n,t){n.b=t}function Pw(n){n.b=n.a}function Cw(n){n.c=n.d.d}function Iw(n){this.a=n}function Ow(n){this.a=n}function Aw(n){this.a=n}function Lw(n){this.a=n}function Nw(n){this.a=n}function $w(n){this.a=n}function Dw(n){this.a=n}function xw(n){this.a=n}function Rw(n){this.a=n}function Kw(n){this.a=n}function Fw(n){this.a=n}function _w(n){this.a=n}function Bw(n){this.a=n}function Hw(n){this.a=n}function Uw(n){this.b=n}function Gw(n){this.b=n}function qw(n){this.b=n}function Xw(n){this.a=n}function zw(n){this.a=n}function Vw(n){this.c=n}function Ww(n){this.c=n}function Qw(n){this.c=n}function Jw(n){this.d=n}function Yw(n){this.a=n}function Zw(n){this.a=n}function nd(n){this.a=n}function td(n){this.a=n}function ed(n){this.a=n}function id(n){this.a=n}function rd(n){this.a=n}function cd(n){this.a=n}function ad(n){this.a=n}function od(n){this.a=n}function ud(n){this.a=n}function sd(n){this.a=n}function hd(n){this.a=n}function fd(n){this.a=n}function ld(n){this.a=n}function bd(n){this.a=n}function wd(n){this.a=n}function dd(n){this.a=n}function gd(n){this.a=n}function pd(n){this.a=n}function md(n){this.a=n}function vd(n){this.a=n}function kd(n){this.a=n}function yd(n){this.a=n}function Md(n){this.a=n}function Td(n){this.a=n}function jd(n){this.a=n}function Ed(n){this.a=n}function Sd(n){this.a=n}function Pd(n){this.a=n}function Cd(n){this.a=n}function Id(n){this.a=n}function Od(n){this.a=n}function Ad(n){this.a=n}function Ld(n){this.a=n}function Nd(n){this.a=n}function $d(n){this.a=n}function Dd(n){this.a=n}function xd(n){this.a=n}function Rd(n){this.a=n}function Kd(n){this.a=n}function Fd(n){this.a=n}function _d(n){this.a=n}function Bd(n){this.a=n}function Hd(n){this.a=n}function Ud(n){this.a=n}function Gd(n){this.a=n}function qd(n){this.a=n}function Xd(n){this.e=n}function zd(n){this.a=n}function Vd(n){this.a=n}function Wd(n){this.a=n}function Qd(n){this.a=n}function Jd(n){this.a=n}function Yd(n){this.a=n}function Zd(n){this.a=n}function ng(n){this.a=n}function tg(n){this.a=n}function eg(n){this.a=n}function ig(n){this.a=n}function rg(n){this.a=n}function cg(n){this.a=n}function ag(n){this.a=n}function og(n){this.a=n}function ug(n){this.a=n}function sg(n){this.a=n}function hg(n){this.a=n}function fg(n){this.a=n}function lg(n){this.a=n}function bg(n){this.a=n}function wg(n){this.a=n}function dg(n){this.a=n}function gg(n){this.a=n}function pg(n){this.a=n}function mg(n){this.a=n}function vg(n){this.a=n}function kg(n){this.a=n}function yg(n){this.a=n}function Mg(n){this.a=n}function Tg(n){this.a=n}function jg(n){this.a=n}function Eg(n){this.a=n}function Sg(n){this.a=n}function Pg(n){this.a=n}function Cg(n){this.a=n}function Ig(n){this.a=n}function Og(n){this.a=n}function Ag(n){this.a=n}function Lg(n){this.a=n}function Ng(n){this.a=n}function $g(n){this.a=n}function Dg(n){this.a=n}function xg(n){this.a=n}function Rg(n){this.a=n}function Kg(n){this.a=n}function Fg(n){this.a=n}function _g(n){this.a=n}function Bg(n){this.a=n}function Hg(n){this.a=n}function Ug(n){this.a=n}function Gg(n){this.a=n}function qg(n){this.a=n}function Xg(n){this.a=n}function zg(n){this.c=n}function Vg(n){this.b=n}function Wg(n){this.a=n}function Qg(n){this.a=n}function Jg(n){this.a=n}function Yg(n){this.a=n}function Zg(n){this.a=n}function np(n){this.a=n}function tp(n){this.a=n}function ep(n){this.a=n}function ip(n){this.a=n}function rp(n){this.a=n}function cp(n){this.a=n}function ap(n){this.a=n}function op(n){this.a=n}function up(n){this.a=n}function sp(n){this.a=n}function hp(n){this.a=n}function fp(n){this.a=n}function lp(n){this.a=n}function bp(n){this.a=n}function wp(n){this.a=n}function dp(n){this.a=n}function gp(n){this.a=n}function pp(n){this.a=n}function mp(n){this.a=n}function vp(n){this.a=n}function kp(n){this.a=n}function yp(n){this.a=n}function Mp(n){this.a=n}function Tp(n){this.a=n}function jp(n){this.a=n}function Ep(n){this.a=n}function Sp(n){this.a=n}function Pp(n){this.a=n}function Cp(n){this.a=n}function Ip(n){this.a=n}function Op(n){this.a=n}function Ap(n){this.a=n}function Lp(n){this.a=n}function Np(n){this.a=n}function $p(n){this.a=n}function Dp(n){this.a=n}function xp(n){this.a=n}function Rp(n){this.a=n}function Kp(n){this.a=n}function Fp(n){this.a=n}function _p(n){this.a=n}function Bp(n){this.a=n}function Hp(n){this.a=n}function Up(n){this.a=n}function Gp(n){this.a=n}function qp(n){this.a=n}function Xp(n){this.a=n}function zp(n){this.a=n}function Vp(n){this.a=n}function Wp(n){this.a=n}function Qp(n){this.a=n}function Jp(n){this.f=n}function Yp(n){this.a=n}function Zp(n){this.a=n}function nm(n){this.a=n}function tm(n){this.a=n}function em(n){this.a=n}function im(n){this.a=n}function rm(n){this.a=n}function cm(n){this.a=n}function am(n){this.a=n}function om(n){this.a=n}function um(n){this.a=n}function sm(n){this.a=n}function hm(n){this.a=n}function fm(n){this.a=n}function lm(n){this.a=n}function bm(n){this.a=n}function wm(n){this.a=n}function dm(n){this.a=n}function gm(n){this.a=n}function pm(n){this.a=n}function mm(n){this.a=n}function vm(n){this.a=n}function km(n){this.a=n}function ym(n){this.a=n}function Mm(n){this.a=n}function Tm(n){this.a=n}function jm(n){this.a=n}function Em(n){this.a=n}function Sm(n){this.a=n}function Pm(n){this.a=n}function Cm(n){this.b=n}function Im(n){this.a=n}function Om(n){this.a=n}function Am(n){this.a=n}function Lm(n){this.a=n}function Nm(n){this.a=n}function $m(n){this.a=n}function Dm(n){this.a=n}function xm(n){this.b=n}function Rm(n){this.a=n}function Km(n){this.a=n}function Fm(n){this.a=n}function _m(n){this.a=n}function Bm(n){this.c=n}function Hm(n){this.e=n}function Um(n){this.a=n}function Gm(n){this.a=n}function qm(n){this.a=n}function Xm(n){this.d=n}function zm(n){this.a=n}function Vm(n){this.a=n}function Wm(n){this.a=n}function Qm(n){this.e=n}function Jm(){this.a=0}function Ym(){$V(this)}function Zm(){IN(this)}function nv(){XQ(this)}function tv(){Rf(this)}function ev(){this.c=nBt}function iv(n,t){n.b+=t}function rv(n,t){t.Wb(n)}function cv(n){return n.a}function av(n){return n.a}function ov(n){return n.a}function uv(n){return n.a}function sv(n){return n.a}function hv(n){return n.e}function fv(){return null}function lv(){return null}function bv(){mj(),xJn()}function wv(n){n.b.Of(n.e)}function dv(n){n.b=new rT}function gv(n,t){n.b=t-n.b}function pv(n,t){n.a=t-n.a}function mv(n,t){n.push(t)}function vv(n,t){n.sort(t)}function kv(n,t){t.jd(n.a)}function yv(n,t){NLn(t,n)}function Mv(n,t,e){n.Yd(e,t)}function Tv(n,t){n.e=t,t.b=n}function jv(n){sB(),this.a=n}function Ev(n){sB(),this.a=n}function Sv(n){sB(),this.a=n}function Pv(n){ZW(),this.a=n}function Cv(n){EZ(),_at.le(n)}function Iv(){Iv=E,new Ym}function Ov(){vx.call(this)}function Av(){vx.call(this)}function Lv(){Ov.call(this)}function Nv(){Ov.call(this)}function $v(){Ov.call(this)}function Dv(){Ov.call(this)}function xv(){Ov.call(this)}function Rv(){Ov.call(this)}function Kv(){Ov.call(this)}function Fv(){Ov.call(this)}function _v(){Ov.call(this)}function Bv(){Ov.call(this)}function Hv(){Ov.call(this)}function Uv(){this.a=this}function Gv(){this.Bb|=256}function qv(){this.b=new hL}function Xv(n,t){n.length=t}function zv(n,t){kD(n.a,t)}function Vv(n,t){LOn(n.c,t)}function Wv(n,t){FV(n.b,t)}function Qv(n,t){bMn(n.a,t)}function Jv(n,t){Vdn(n.a,t)}function Yv(n,t){Msn(n.e,t)}function Zv(n){C$n(n.c,n.b)}function nk(n,t){n.kc().Nb(t)}function tk(n){this.a=Agn(n)}function ek(){this.a=new Ym}function ik(){this.a=new Ym}function rk(){this.a=new hS}function ck(){this.a=new Zm}function ak(){this.a=new Zm}function ok(){this.a=new Zm}function uk(){this.a=new kn}function sk(){this.a=new g7}function hk(){this.a=new lt}function fk(){this.a=new V0}function lk(){this.a=new NF}function bk(){this.a=new Zm}function wk(){this.a=new Zm}function dk(){this.a=new Zm}function gk(){this.a=new Zm}function pk(){this.d=new Zm}function mk(){this.a=new i4}function vk(){this.a=new ek}function kk(){this.a=new Ym}function yk(){this.b=new Ym}function Mk(){this.b=new Zm}function Tk(){this.e=new Zm}function jk(){this.a=new sl}function Ek(){this.d=new Zm}function Sk(){BZ.call(this)}function Pk(){BZ.call(this)}function Ck(){Zm.call(this)}function Ik(){Lv.call(this)}function Ok(){ck.call(this)}function Ak(){HF.call(this)}function Lk(){gk.call(this)}function Nk(){tv.call(this)}function $k(){Nk.call(this)}function Dk(){tv.call(this)}function xk(){Dk.call(this)}function Rk(){oy.call(this)}function Kk(){oy.call(this)}function Fk(){oy.call(this)}function _k(){hy.call(this)}function Bk(){ts.call(this)}function Hk(){ts.call(this)}function Uk(){lS.call(this)}function Gk(){wy.call(this)}function qk(){wy.call(this)}function Xk(){Ym.call(this)}function zk(){Ym.call(this)}function Vk(){Ym.call(this)}function Wk(){Kan.call(this)}function Qk(){ek.call(this)}function Jk(){Gv.call(this)}function Yk(){$D.call(this)}function Zk(){Ym.call(this)}function ny(){$D.call(this)}function ty(){Ym.call(this)}function ey(){Ym.call(this)}function iy(){ps.call(this)}function ry(){iy.call(this)}function cy(){ps.call(this)}function ay(){$f.call(this)}function oy(){this.a=new ek}function uy(){this.a=new Ym}function sy(){this.a=new Zm}function hy(){this.a=new Ym}function fy(){this.a=new lS}function ly(){this.j=new Zm}function by(){this.a=new zj}function wy(){this.a=new gs}function dy(){this.a=new Do}function gy(){gy=E,wat=new c}function py(){py=E,Mat=new ky}function my(){my=E,Tat=new vy}function vy(){ib.call(this,"")}function ky(){ib.call(this,"")}function yy(n){Arn.call(this,n)}function My(n){Arn.call(this,n)}function Ty(n){Ql.call(this,n)}function jy(n){HE.call(this,n)}function Ey(n){HE.call(this,n)}function Sy(n){jy.call(this,n)}function Py(n){jy.call(this,n)}function Cy(n){jy.call(this,n)}function Iy(n){c8.call(this,n)}function Oy(n){c8.call(this,n)}function Ay(n){K_.call(this,n)}function Ly(n){XE.call(this,n)}function Ny(n){WE.call(this,n)}function $y(n){WE.call(this,n)}function Dy(n){WE.call(this,n)}function xy(n){cOn.call(this,n)}function Ry(n){xy.call(this,n)}function Ky(n){Uz.call(this,n)}function Fy(n){Ky.call(this,n)}function _y(){Cb.call(this,{})}function By(){By=E,Vat=new T}function Hy(){Hy=E,Iat=new X$}function Uy(){Uy=E,Dat=new r}function Gy(){Gy=E,Fat=new p}function qy(){qy=E,Hat=new k}function Xy(n){UD(),this.a=n}function zy(n){Cun(),this.a=n}function Vy(n){rz(),this.f=n}function Wy(n){rz(),this.f=n}function Qy(n){aB(),this.a=n}function Jy(n){n.b=null,n.c=0}function Yy(n,t){n.e=t,yFn(n,t)}function Zy(n,t){n.a=t,WAn(n)}function nM(n,t,e){n.a[t.g]=e}function tM(n,t,e){nSn(e,n,t)}function eM(n,t){F_(t.i,n.n)}function iM(n,t){yln(n).Cd(t)}function rM(n,t){n.a.ec().Mc(t)}function cM(n,t){return n.g-t.g}function aM(n,t){return n*n/t}function oM(n){return tJ(n),n}function uM(n){return tJ(n),n}function sM(n){return tJ(n),n}function hM(n){return new Pb(n)}function fM(n){return new QW(n)}function lM(n){return tJ(n),n}function bM(n){return tJ(n),n}function wM(n){Ky.call(this,n)}function dM(n){Ky.call(this,n)}function gM(n){Ky.call(this,n)}function pM(n){Uz.call(this,n)}function mM(n){Ky.call(this,n)}function vM(n){Ky.call(this,n)}function kM(n){Ky.call(this,n)}function yM(n){Ky.call(this,n)}function MM(n){Ky.call(this,n)}function TM(n){Ky.call(this,n)}function jM(n){Ky.call(this,n)}function EM(n){Ky.call(this,n)}function SM(n){Ky.call(this,n)}function PM(n){Ky.call(this,n)}function CM(n){Ky.call(this,n)}function IM(n){tJ(n),this.a=n}function OM(n){return hln(n),n}function AM(n){zV(n,n.length)}function LM(n){return n.b==n.c}function NM(n){return!!n&&n.b}function $M(n){return!!n&&n.k}function DM(n){return!!n&&n.j}function xM(n,t,e){n.c.Ef(t,e)}function RM(n,t){n.be(t),t.ae(n)}function KM(n){sB(),this.a=WW(n)}function FM(){this.a=mK(WW(TZn))}function _M(){throw hv(new Kv)}function BM(){throw hv(new Kv)}function HM(){throw hv(new Kv)}function UM(){throw hv(new Kv)}function GM(){throw hv(new Kv)}function qM(){throw hv(new Kv)}function XM(){XM=E,EZ()}function zM(){$w.call(this,"")}function VM(){$w.call(this,"")}function WM(){$w.call(this,"")}function QM(){$w.call(this,"")}function JM(n){dM.call(this,n)}function YM(n){dM.call(this,n)}function ZM(n){vM.call(this,n)}function nT(n){qw.call(this,n)}function tT(n){nT.call(this,n)}function eT(n){gx.call(this,n)}function iT(n){Qx.call(this,n,0)}function rT(){L2.call(this,12,3)}function cT(n,t){return B0(n,t)}function aT(n,t){return Ltn(n,t)}function oT(n,t){return n.a-t.a}function uT(n,t){return n.a-t.a}function sT(n,t){return n.a-t.a}function hT(n,t){return t in n.a}function fT(n){return n.a?n.b:0}function lT(n){return n.a?n.b:0}function bT(n,t,e){t.Cd(n.a[e])}function wT(n,t,e){t.Pe(n.a[e])}function dT(n,t){n.b=new eN(t)}function gT(n,t){return n.b=t,n}function pT(n,t){return n.c=t,n}function mT(n,t){return n.f=t,n}function vT(n,t){return n.g=t,n}function kT(n,t){return n.a=t,n}function yT(n,t){return n.f=t,n}function MT(n,t){return n.k=t,n}function TT(n,t){return n.a=t,n}function jT(n,t){return n.e=t,n}function ET(n,t){return n.e=t,n}function ST(n,t){return n.f=t,n}function PT(n,t){n.b=!0,n.d=t}function CT(n,t){return n.b-t.b}function IT(n,t){return n.g-t.g}function OT(n,t){return n?0:t-1}function AT(n,t){return n?0:t-1}function LT(n,t){return n?t-1:0}function NT(n,t){return n.s-t.s}function $T(n,t){return t.rg(n)}function DT(n,t){return n.b=t,n}function xT(n,t){return n.a=t,n}function RT(n,t){return n.c=t,n}function KT(n,t){return n.d=t,n}function FT(n,t){return n.e=t,n}function _T(n,t){return n.f=t,n}function BT(n,t){return n.a=t,n}function HT(n,t){return n.b=t,n}function UT(n,t){return n.c=t,n}function GT(n,t){return n.c=t,n}function qT(n,t){return n.b=t,n}function XT(n,t){return n.d=t,n}function zT(n,t){return n.e=t,n}function VT(n,t){return n.f=t,n}function WT(n,t){return n.g=t,n}function QT(n,t){return n.a=t,n}function JT(n,t){return n.i=t,n}function YT(n,t){return n.j=t,n}function ZT(n,t){jIn(),o2(t,n)}function nj(n,t,e){az(n.a,t,e)}function tj(n){Y_.call(this,n)}function ej(n){dpn.call(this,n)}function ij(n){TY.call(this,n)}function rj(n){TY.call(this,n)}function cj(n){Drn.call(this,n)}function aj(n){HY.call(this,n)}function oj(n){HY.call(this,n)}function uj(){S$.call(this,"")}function sj(){this.a=0,this.b=0}function hj(){this.b=0,this.a=0}function fj(n,t){n.b=0,Ccn(n,t)}function lj(n,t){return n.k=t,n}function bj(n,t){return n.j=t,n}function wj(n,t){n.c=t,n.b=!0}function dj(){dj=E,rut=ePn()}function gj(){gj=E,xKt=AEn()}function pj(){pj=E,RKt=VPn()}function mj(){mj=E,NFt=aan()}function vj(){vj=E,y_t=LEn()}function kj(){kj=E,xBt=NEn()}function yj(){yj=E,RBt=qAn()}function Mj(n){return n.e&&n.e()}function Tj(n){return n.l|n.m<<22}function jj(n,t){return n.c._b(t)}function Ej(n,t){return Uwn(n.b,t)}function Sj(n){return n?n.d:null}function Pj(n){return n?n.g:null}function Cj(n){return n?n.i:null}function Ij(n){return vK(n),n.o}function Oj(n,t){return n.a+=t,n}function Aj(n,t){return n.a+=t,n}function Lj(n,t){return n.a+=t,n}function Nj(n,t){return n.a+=t,n}function $j(n,t){for(;n.Bd(t););}function Dj(n){this.a=new sS(n)}function xj(){throw hv(new Kv)}function Rj(){throw hv(new Kv)}function Kj(){throw hv(new Kv)}function Fj(){throw hv(new Kv)}function _j(){throw hv(new Kv)}function Bj(){throw hv(new Kv)}function Hj(n){this.a=new Hz(n)}function Uj(){this.a=new mKn(iIt)}function Gj(){this.b=new mKn(ZSt)}function qj(){this.a=new mKn(dOt)}function Xj(){this.b=new mKn(VAt)}function zj(){this.b=new mKn(VAt)}function Vj(n){this.a=0,this.b=n}function Wj(n){CQn(),uYn(this,n)}function Qj(n){return GQ(n),n.a}function Jj(n){return n.b!=n.d.c}function Yj(n,t){return n.d[t.p]}function Zj(n,t){return vFn(n,t)}function nE(n,t,e){n.splice(t,e)}function tE(n,t){for(;n.Re(t););}function eE(n){n.c?P_n(n):C_n(n)}function iE(){throw hv(new Kv)}function rE(){throw hv(new Kv)}function cE(){throw hv(new Kv)}function aE(){throw hv(new Kv)}function oE(){throw hv(new Kv)}function uE(){throw hv(new Kv)}function sE(){throw hv(new Kv)}function hE(){throw hv(new Kv)}function fE(){throw hv(new Kv)}function lE(){throw hv(new Kv)}function bE(){throw hv(new Bv)}function wE(){throw hv(new Bv)}function dE(n){this.a=new gE(n)}function gE(n){Zan(this,n,fOn())}function pE(n){return!n||FQ(n)}function mE(n){return-1!=dHt[n]}function vE(){0!=Uat&&(Uat=0),qat=-1}function kE(){null==hZn&&(hZn=[])}function yE(n,t){RD.call(this,n,t)}function ME(n,t){yE.call(this,n,t)}function TE(n,t){this.a=n,this.b=t}function jE(n,t){this.a=n,this.b=t}function EE(n,t){this.a=n,this.b=t}function SE(n,t){this.a=n,this.b=t}function PE(n,t){this.a=n,this.b=t}function CE(n,t){this.a=n,this.b=t}function IE(n,t){this.a=n,this.b=t}function OE(n,t){this.e=n,this.d=t}function AE(n,t){this.b=n,this.c=t}function LE(n,t){this.b=n,this.a=t}function NE(n,t){this.b=n,this.a=t}function $E(n,t){this.b=n,this.a=t}function DE(n,t){this.b=n,this.a=t}function xE(n,t){this.a=n,this.b=t}function RE(n,t){this.a=n,this.b=t}function KE(n,t){this.a=n,this.f=t}function FE(n,t){this.g=n,this.i=t}function _E(n,t){this.f=n,this.g=t}function BE(n,t){this.b=n,this.c=t}function HE(n){FD(n.dc()),this.c=n}function UE(n,t){this.a=n,this.b=t}function GE(n,t){this.a=n,this.b=t}function qE(n){this.a=uG(WW(n),15)}function XE(n){this.a=uG(WW(n),15)}function zE(n){this.a=uG(WW(n),85)}function VE(n){this.b=uG(WW(n),85)}function WE(n){this.b=uG(WW(n),51)}function QE(){this.q=new e.Date}function JE(n,t){this.a=n,this.b=t}function YE(n,t){return PV(n.b,t)}function ZE(n,t){return n.b.Hc(t)}function nS(n,t){return n.b.Ic(t)}function tS(n,t){return n.b.Qc(t)}function eS(n,t){return n.b.Hc(t)}function iS(n,t){return n.c.uc(t)}function rS(n,t){return udn(n.c,t)}function cS(n,t){return n.a._b(t)}function aS(n,t){return n>t&&t0}function $P(n,t){return dwn(n,t)<0}function DP(n,t){return RX(n.a,t)}function xP(n,t){U0.call(this,n,t)}function RP(n){nQ(),K_.call(this,n)}function KP(n,t){zX(n,n.length,t)}function FP(n,t){dW(n,n.length,t)}function _P(n,t){return n.a.get(t)}function BP(n,t){return PV(n.e,t)}function HP(n){return tJ(n),!1}function UP(n){this.a=uG(WW(n),229)}function GP(n){h3.call(this,n,21)}function qP(n,t){_E.call(this,n,t)}function XP(n,t){_E.call(this,n,t)}function zP(n,t){this.b=n,this.a=t}function VP(n,t){this.d=n,this.e=t}function WP(n,t){this.a=n,this.b=t}function QP(n,t){this.a=n,this.b=t}function JP(n,t){this.a=n,this.b=t}function YP(n,t){this.a=n,this.b=t}function ZP(n,t){this.a=n,this.b=t}function nC(n,t){this.b=n,this.a=t}function tC(n,t){this.b=n,this.a=t}function eC(n,t){_E.call(this,n,t)}function iC(n,t){_E.call(this,n,t)}function rC(n,t){_E.call(this,n,t)}function cC(n,t){_E.call(this,n,t)}function aC(n,t){_E.call(this,n,t)}function oC(n,t){_E.call(this,n,t)}function uC(n,t){_E.call(this,n,t)}function sC(n,t){this.b=n,this.a=t}function hC(n,t){_E.call(this,n,t)}function fC(n,t){this.b=n,this.a=t}function lC(n,t){_E.call(this,n,t)}function bC(n,t){this.b=n,this.a=t}function wC(n,t){_E.call(this,n,t)}function dC(n,t){_E.call(this,n,t)}function gC(n,t){_E.call(this,n,t)}function pC(n,t,e){n.splice(t,0,e)}function mC(n,t,e){n.Mb(e)&&t.Cd(e)}function vC(n,t,e){t.Pe(n.a.Ye(e))}function kC(n,t,e){t.Dd(n.a.Ze(e))}function yC(n,t,e){t.Cd(n.a.Kb(e))}function MC(n,t){return $x(n.c,t)}function TC(n,t){return $x(n.e,t)}function jC(n,t){_E.call(this,n,t)}function EC(n,t){_E.call(this,n,t)}function SC(n,t){_E.call(this,n,t)}function PC(n,t){_E.call(this,n,t)}function CC(n,t){_E.call(this,n,t)}function IC(n,t){_E.call(this,n,t)}function OC(n,t){this.a=n,this.b=t}function AC(n,t){this.a=n,this.b=t}function LC(n,t){this.a=n,this.b=t}function NC(n,t){this.a=n,this.b=t}function $C(n,t){this.a=n,this.b=t}function DC(n,t){this.a=n,this.b=t}function xC(n,t){this.b=n,this.a=t}function RC(n,t){this.b=n,this.a=t}function KC(n,t){this.b=n,this.a=t}function FC(n,t){this.c=n,this.d=t}function _C(n,t){this.e=n,this.d=t}function BC(n,t){this.a=n,this.b=t}function HC(n,t){this.a=n,this.b=t}function UC(n,t){this.a=n,this.b=t}function GC(n,t){this.b=n,this.a=t}function qC(n,t){this.b=t,this.c=n}function XC(n,t){_E.call(this,n,t)}function zC(n,t){_E.call(this,n,t)}function VC(n,t){_E.call(this,n,t)}function WC(n,t){_E.call(this,n,t)}function QC(n,t){_E.call(this,n,t)}function JC(n,t){_E.call(this,n,t)}function YC(n,t){_E.call(this,n,t)}function ZC(n,t){_E.call(this,n,t)}function nI(n,t){_E.call(this,n,t)}function tI(n,t){_E.call(this,n,t)}function eI(n,t){_E.call(this,n,t)}function iI(n,t){_E.call(this,n,t)}function rI(n,t){_E.call(this,n,t)}function cI(n,t){_E.call(this,n,t)}function aI(n,t){_E.call(this,n,t)}function oI(n,t){_E.call(this,n,t)}function uI(n,t){_E.call(this,n,t)}function sI(n,t){_E.call(this,n,t)}function hI(n,t){_E.call(this,n,t)}function fI(n,t){_E.call(this,n,t)}function lI(n,t){_E.call(this,n,t)}function bI(n,t){_E.call(this,n,t)}function wI(n,t){_E.call(this,n,t)}function dI(n,t){_E.call(this,n,t)}function gI(n,t){_E.call(this,n,t)}function pI(n,t){_E.call(this,n,t)}function mI(n,t){_E.call(this,n,t)}function vI(n,t){_E.call(this,n,t)}function kI(n,t){_E.call(this,n,t)}function yI(n,t){_E.call(this,n,t)}function MI(n,t){_E.call(this,n,t)}function TI(n,t){_E.call(this,n,t)}function jI(n,t){_E.call(this,n,t)}function EI(n,t){this.b=n,this.a=t}function SI(n,t){_E.call(this,n,t)}function PI(n,t){this.a=n,this.b=t}function CI(n,t){this.a=n,this.b=t}function II(n,t){this.a=n,this.b=t}function OI(n,t){_E.call(this,n,t)}function AI(n,t){_E.call(this,n,t)}function LI(n,t){this.a=n,this.b=t}function NI(n,t){return PU(),t!=n}function $I(n){return MK(n.a),n.b}function DI(n){return K$n(n,n.c),n}function xI(){return dj(),new rut}function RI(){UB(),this.a=new xF}function KI(){oFn(),this.a=new ek}function FI(){e2(),this.b=new ek}function _I(n,t){this.b=n,this.d=t}function BI(n,t){this.a=n,this.b=t}function HI(n,t){this.a=n,this.b=t}function UI(n,t){this.a=n,this.b=t}function GI(n,t){this.b=n,this.a=t}function qI(n,t){_E.call(this,n,t)}function XI(n,t){_E.call(this,n,t)}function zI(n,t){_E.call(this,n,t)}function VI(n,t){_E.call(this,n,t)}function WI(n,t){_E.call(this,n,t)}function QI(n,t){_E.call(this,n,t)}function JI(n,t){_E.call(this,n,t)}function YI(n,t){_E.call(this,n,t)}function ZI(n,t){_E.call(this,n,t)}function nO(n,t){_E.call(this,n,t)}function tO(n,t){_E.call(this,n,t)}function eO(n,t){_E.call(this,n,t)}function iO(n,t){_E.call(this,n,t)}function rO(n,t){_E.call(this,n,t)}function cO(n,t){_E.call(this,n,t)}function aO(n,t){_E.call(this,n,t)}function oO(n,t){_E.call(this,n,t)}function uO(n,t){_E.call(this,n,t)}function sO(n,t){_E.call(this,n,t)}function hO(n,t){_E.call(this,n,t)}function fO(n,t){_E.call(this,n,t)}function lO(n,t){_E.call(this,n,t)}function bO(n,t){_E.call(this,n,t)}function wO(n,t){_E.call(this,n,t)}function dO(n,t){this.b=n,this.a=t}function gO(n,t){this.b=n,this.a=t}function pO(n,t){this.b=n,this.a=t}function mO(n,t){this.b=n,this.a=t}function vO(n,t){this.a=n,this.b=t}function kO(n,t){this.a=n,this.b=t}function yO(n,t){this.a=n,this.b=t}function MO(n,t){this.a=n,this.b=t}function TO(n,t){_E.call(this,n,t)}function jO(n,t){_E.call(this,n,t)}function EO(n,t){_E.call(this,n,t)}function SO(n,t){_E.call(this,n,t)}function PO(n,t){_E.call(this,n,t)}function CO(n,t){_E.call(this,n,t)}function IO(n,t){_E.call(this,n,t)}function OO(n,t){_E.call(this,n,t)}function AO(n,t){_E.call(this,n,t)}function LO(n,t){_E.call(this,n,t)}function NO(n,t){_E.call(this,n,t)}function $O(n,t){_E.call(this,n,t)}function DO(n,t){_E.call(this,n,t)}function xO(n,t){_E.call(this,n,t)}function RO(n,t){_E.call(this,n,t)}function KO(n,t){_E.call(this,n,t)}function FO(n,t){_E.call(this,n,t)}function _O(n,t){_E.call(this,n,t)}function BO(n,t){_E.call(this,n,t)}function HO(n,t){_E.call(this,n,t)}function UO(n,t){this.a=n,this.b=t}function GO(n,t){this.a=n,this.b=t}function qO(n,t){this.a=n,this.b=t}function XO(n,t){this.a=n,this.b=t}function zO(n,t){this.a=n,this.b=t}function VO(n,t){this.a=n,this.b=t}function WO(n,t){this.a=n,this.b=t}function QO(n,t){this.a=n,this.b=t}function JO(n,t){this.a=n,this.b=t}function YO(n,t){this.a=n,this.b=t}function ZO(n,t){this.a=n,this.b=t}function nA(n,t){this.a=n,this.b=t}function tA(n,t){this.a=n,this.b=t}function eA(n,t){this.b=n,this.a=t}function iA(n,t){this.b=n,this.a=t}function rA(n,t){this.b=n,this.a=t}function cA(n,t){this.b=n,this.a=t}function aA(n,t){this.a=n,this.b=t}function oA(n,t){this.a=n,this.b=t}function uA(n,t){_E.call(this,n,t)}function sA(n,t){this.a=n,this.b=t}function hA(n,t){this.a=n,this.b=t}function fA(n,t){_E.call(this,n,t)}function lA(n,t){this.f=n,this.c=t}function bA(n,t){return $x(n.g,t)}function wA(n,t){return $x(t.b,n)}function dA(n,t){return ymn(n.a,t)}function gA(n,t){return-n.b.af(t)}function pA(n,t){n&&vJ(AFt,n,t)}function mA(n,t){n.i=null,lon(n,t)}function vA(n,t,e){MSn(t,jAn(n,e))}function kA(n,t,e){MSn(t,jAn(n,e))}function yA(n,t){BRn(n.a,uG(t,58))}function MA(n,t){aen(n.a,uG(t,12))}function TA(n,t){this.a=n,this.b=t}function jA(n,t){this.a=n,this.b=t}function EA(n,t){this.a=n,this.b=t}function SA(n,t){this.a=n,this.b=t}function PA(n,t){this.a=n,this.b=t}function CA(n,t){this.d=n,this.b=t}function IA(n,t){this.e=n,this.a=t}function OA(n,t){this.b=n,this.c=t}function AA(n,t){this.i=n,this.g=t}function LA(n,t){this.d=n,this.e=t}function NA(n,t){Iin(new DD(n),t)}function $A(n){return kmn(n.c,n.b)}function DA(n){return n?n.md():null}function xA(n){return null==n?null:n}function RA(n){return typeof n===pZn}function KA(n){return typeof n===dZn}function FA(n){return typeof n===gZn}function _A(n,t){return 0==dwn(n,t)}function BA(n,t){return dwn(n,t)>=0}function HA(n,t){return 0!=dwn(n,t)}function UA(n,t){return Zun(n.Kc(),t)}function GA(n,t){return n.Rd().Xb(t)}function qA(n){return bpn(n),n.d.gc()}function XA(n){return Fq(null==n),n}function zA(n,t){return n.a+=""+t,n}function VA(n,t){return n.a+=""+t,n}function WA(n,t){return n.a+=""+t,n}function QA(n,t){return n.a+=""+t,n}function JA(n,t){return n.a+=""+t,n}function YA(n,t){return n.a+=""+t,n}function ZA(n){return""+(tJ(n),n)}function nL(n){$V(this),xun(this,n)}function tL(){J0(),ez.call(this)}function eL(n,t){Bz.call(this,n,t)}function iL(n,t){Bz.call(this,n,t)}function rL(n,t){Bz.call(this,n,t)}function cL(n,t){s8(n,t,n.c.b,n.c)}function aL(n,t){s8(n,t,n.a,n.a.a)}function oL(n){return u3(n,0),null}function uL(){this.b=0,this.a=!1}function sL(){this.b=0,this.a=!1}function hL(){this.b=new sS(orn(12))}function fL(){fL=E,fht=Abn(Nkn())}function lL(){lL=E,_wt=Abn(bKn())}function bL(){bL=E,bPt=Abn(usn())}function wL(){wL=E,Iv(),Bat=new Ym}function dL(n){return n.a=0,n.b=0,n}function gL(n,t){return n.a=t.g+1,n}function pL(n,t){w_.call(this,n,t)}function mL(n,t){uF.call(this,n,t)}function vL(n,t){AA.call(this,n,t)}function kL(n,t){zx.call(this,n,t)}function yL(n,t){Zsn.call(this,n,t)}function ML(n,t){TP(),vJ(_Ft,n,t)}function TL(n,t){n.q.setTime(W4(t))}function jL(n){e.clearTimeout(n)}function EL(n){return WW(n),new iN(n)}function SL(n,t){return xA(n)===xA(t)}function PL(n,t){return n.a.a.a.cc(t)}function CL(n,t){return r1(n.a,0,t)}function IL(n){return jW(uG(n,74))}function OL(n){return t0((tJ(n),n))}function AL(n){return t0((tJ(n),n))}function LL(n){return p$(n.l,n.m,n.h)}function NL(n,t){return d$(n.a,t.a)}function $L(n,t){return rW(n.a,t.a)}function DL(n,t){return ugn(n.a,t.a)}function xL(n,t){return n.indexOf(t)}function RL(n,t){return 2==n.j[t.p]}function KL(n,t){return n==t?0:n?1:-1}function FL(n){return n<10?"0"+n:""+n}function _L(n){return typeof n===gZn}function BL(n){return n==Flt||n==Hlt}function HL(n){return n==Flt||n==_lt}function UL(n,t){return d$(n.g,t.g)}function GL(n){return Ten(n.b.b,n,0)}function qL(){lX.call(this,0,0,0,0)}function XL(){td.call(this,new u8)}function zL(n,t){Ntn(n,0,n.length,t)}function VL(n,t){return kD(n.a,t),t}function WL(n,t){return GB(),t.a+=n}function QL(n,t){return GB(),t.a+=n}function JL(n,t){return GB(),t.c+=n}function YL(n,t){return kD(n.c,t),n}function ZL(n,t){return gsn(n.a,t),n}function nN(n){this.a=xI(),this.b=n}function tN(n){this.a=xI(),this.b=n}function eN(n){this.a=n.a,this.b=n.b}function iN(n){this.a=n,Ff.call(this)}function rN(n){this.a=n,Ff.call(this)}function cN(){gY.call(this,0,0,0,0)}function aN(n){return gsn(new wJ,n)}function oN(n){return xJ(uG(n,123))}function uN(n){return n.vh()&&n.wh()}function sN(n){return n!=uRt&&n!=sRt}function hN(n){return n==JDt||n==YDt}function fN(n){return n==nxt||n==QDt}function lN(n){return n==wjt||n==bjt}function bN(n,t){return d$(n.g,t.g)}function wN(n,t){return new Zsn(t,n)}function dN(n,t){return new Zsn(t,n)}function gN(n){return nG(n.b.Kc(),n.a)}function pN(n,t){sbn(n,t),Ocn(n,n.D)}function mN(n,t,e){Scn(n,t),pcn(n,e)}function vN(n,t,e){kcn(n,t),vcn(n,e)}function kN(n,t,e){ycn(n,t),Mcn(n,e)}function yN(n,t,e){mcn(n,t),jcn(n,e)}function MN(n,t,e){Tcn(n,t),Ecn(n,e)}function TN(n,t,e){AK.call(this,n,t,e)}function jN(n){lA.call(this,n,!0)}function EN(){qP.call(this,"Tail",3)}function SN(){qP.call(this,"Head",1)}function PN(n){cHn(),Bun.call(this,n)}function CN(n){lX.call(this,n,n,n,n)}function IN(n){n.c=Inn(dat,EZn,1,0,5,1)}function ON(n){return n.b&&sXn(n),n.a}function AN(n){return n.b&&sXn(n),n.c}function LN(n,t){Nut||(n.b=t)}function NN(n,t){return n[n.length]=t}function $N(n,t){return n[n.length]=t}function DN(n,t){return Ern(t,h0(n))}function xN(n,t){return Ern(t,h0(n))}function RN(n,t){return kan(UW(n.d),t)}function KN(n,t){return kan(UW(n.g),t)}function FN(n,t){return kan(UW(n.j),t)}function _N(n,t){uF.call(this,n.b,t)}function BN(n,t){ttn(z5(n.a),v2(t))}function HN(n,t){ttn(Aen(n.a),k2(t))}function UN(n,t,e){kN(e,e.i+n,e.j+t)}function GN(n,t,e){uQ(n.c[t.g],t.g,e)}function qN(n,t,e){uG(n.c,71).Gi(t,e)}function XN(n,t,e){return uQ(n,t,e),e}function zN(n){Prn(n.Sf(),new Od(n))}function VN(n){return null!=n?Hon(n):0}function WN(n){return null==n?0:Hon(n)}function QN(n){QYn(),Qm.call(this,n)}function JN(n){this.a=n,WU.call(this,n)}function YN(){YN=E,e.Math.log(2)}function ZN(){ZN=E,kP(),rBt=WKt}function n$(){n$=E,vSt=new rpn(kxt)}function t$(){t$=E,new e$,new Zm}function e$(){new Ym,new Ym,new Ym}function i$(){throw hv(new TM(hat))}function r$(){throw hv(new TM(hat))}function c$(){throw hv(new TM(fat))}function a$(){throw hv(new TM(fat))}function o$(n){this.a=n,VE.call(this,n)}function u$(n){this.a=n,VE.call(this,n)}function s$(n,t){ZW(),this.a=n,this.b=t}function h$(n,t){WW(t),uY(n).Jc(new b)}function f$(n,t){UX(n.c,n.c.length,t)}function l$(n){return n.at?1:0}function g$(n,t){return dwn(n,t)>0?n:t}function p$(n,t,e){return{l:n,m:t,h:e}}function m$(n,t){null!=n.a&&MA(t,n.a)}function v$(n){c2(n,null),u2(n,null)}function k$(n,t,e){return vJ(n.g,e,t)}function y$(n,t,e){return avn(t,e,n.c)}function M$(n,t,e){return vJ(n.k,e,t)}function T$(n,t,e){return gWn(n,t,e),e}function j$(n,t){return n2(),t.n.b+=n}function E$(n){HZ.call(this),this.b=n}function S$(n){LF.call(this),this.a=n}function P$(){qP.call(this,"Range",2)}function C$(n){this.b=n,this.a=new Zm}function I$(n){this.b=new tt,this.a=n}function O$(n){n.a=new R,n.c=new R}function A$(n){n.a=new Ym,n.d=new Ym}function L$(n){s2(n,null),h2(n,null)}function N$(n,t){return kWn(n.a,t,null)}function $$(n,t){return vJ(n.a,t.a,t)}function D$(n){return new MO(n.a,n.b)}function x$(n){return new MO(n.c,n.d)}function R$(n){return new MO(n.c,n.d)}function K$(n,t){return rVn(n.c,n.b,t)}function F$(n,t){return null!=n&&Eyn(n,t)}function _$(n,t){return-1!=Yhn(n.Kc(),t)}function B$(n){return n.Ob()?n.Pb():null}function H$(n){this.b=(hZ(),new Vw(n))}function U$(n){this.a=n,Ym.call(this)}function G$(){zx.call(this,null,null)}function q$(){Vx.call(this,null,null)}function X$(){_E.call(this,"INSTANCE",0)}function z$(){FEn(),this.a=new mKn(Llt)}function V$(n){return mvn(n,0,n.length)}function W$(n,t){return new ex(n.Kc(),t)}function Q$(n,t){return null!=n.a.Bc(t)}function J$(n,t){Czn(n),n.Gc(uG(t,15))}function Y$(n,t,e){n.c.bd(t,uG(e,136))}function Z$(n,t,e){n.c.Ui(t,uG(e,136))}function nD(n,t){n.c&&(cq(t),B1(t))}function tD(n,t){n.q.setHours(t),Iqn(n,t)}function eD(n,t){KR(t,n.a.a.a,n.a.a.b)}function iD(n,t,e,i){uQ(n.a[t.g],e.g,i)}function rD(n,t,e){return n.a[t.g][e.g]}function cD(n,t){return n.e[t.c.p][t.p]}function aD(n,t){return n.c[t.c.p][t.p]}function oD(n,t){return n.a[t.c.p][t.p]}function uD(n,t){return n.j[t.p]=oRn(t)}function sD(n,t){return null!=n.a.Bc(t)}function hD(n,t){return uM(pK(t.a))<=n}function fD(n,t){return uM(pK(t.a))>=n}function lD(n,t){return r7(n.f,t.Pg())}function bD(n,t){return n.a*t.a+n.b*t.b}function wD(n,t){return n.a0?t/(n*n):100*t}function jR(n,t){return n>0?t*t/n:t*t*100}function ER(n,t){return uG(ain(n.a,t),34)}function SR(n,t){return jIn(),UNn(n,t.e,t)}function PR(n,t,e){return ZS(),e.Mg(n,t)}function CR(n){return tcn(),n.e.a+n.f.a/2}function IR(n,t,e){return tcn(),e.e.a-n*t}function OR(n){return tcn(),n.e.b+n.f.b/2}function AR(n,t,e){return tcn(),e.e.b-n*t}function LR(n){n.d=new bR(n),n.e=new Ym}function NR(){this.a=new K1,this.b=new K1}function $R(n){this.c=n,this.a=1,this.b=1}function DR(n){aYn(),dv(this),this.Ff(n)}function xR(n,t,e){Stn(),n.pf(t)&&e.Cd(n)}function RR(n,t,e){return kD(t,xpn(n,e))}function KR(n,t,e){return n.a+=t,n.b+=e,n}function FR(n,t,e){return n.a*=t,n.b*=e,n}function _R(n,t){return n.a=t.a,n.b=t.b,n}function BR(n){return n.a=-n.a,n.b=-n.b,n}function HR(n,t,e){return n.a-=t,n.b-=e,n}function UR(n){lS.call(this),dan(this,n)}function GR(){_E.call(this,"GROW_TREE",0)}function qR(){_E.call(this,"POLYOMINO",0)}function XR(n,t,e){ltn.call(this,n,t,e,2)}function zR(n,t,e){$dn(z5(n.a),t,v2(e))}function VR(n,t){jP(),zx.call(this,n,t)}function WR(n,t){EP(),Vx.call(this,n,t)}function QR(n,t){EP(),WR.call(this,n,t)}function JR(n,t){EP(),Vx.call(this,n,t)}function YR(n,t){return n.c.Fc(uG(t,136))}function ZR(n,t,e){$dn(Aen(n.a),t,k2(e))}function nK(n){this.c=n,ycn(n,0),Mcn(n,0)}function tK(n,t){ZN(),OX.call(this,n,t)}function eK(n,t){ZN(),tK.call(this,n,t)}function iK(n,t){ZN(),tK.call(this,n,t)}function rK(n,t){ZN(),OX.call(this,n,t)}function cK(n,t){ZN(),iK.call(this,n,t)}function aK(n,t){ZN(),rK.call(this,n,t)}function oK(n,t){ZN(),OX.call(this,n,t)}function uK(n,t,e){return t.zl(n.e,n.c,e)}function sK(n,t,e){return t.Al(n.e,n.c,e)}function hK(n,t,e){return JXn(Len(n,t),e)}function fK(n,t){return mwn(n.e,uG(t,54))}function lK(n){return null==n?null:AQn(n)}function bK(n){return null==n?null:mOn(n)}function wK(n){return null==n?null:cpn(n)}function dK(n){return null==n?null:cpn(n)}function gK(n){return Fq(null==n||KA(n)),n}function pK(n){return Fq(null==n||FA(n)),n}function mK(n){return Fq(null==n||RA(n)),n}function vK(n){null==n.o&&axn(n)}function kK(n){if(!n)throw hv(new Dv)}function yK(n){if(!n)throw hv(new Nv)}function MK(n){if(!n)throw hv(new Bv)}function TK(n){if(!n)throw hv(new xv)}function jK(n){if(!n)throw hv(new Fv)}function EK(){EK=E,KFt=new Gk,new qk}function SK(){SK=E,zCt=new Cm("root")}function PK(){Kan.call(this),this.Bb|=P0n}function CK(n,t){this.d=n,Cw(this),this.b=t}function IK(n,t){Fnn.call(this,n),this.a=t}function OK(n,t){Fnn.call(this,n),this.a=t}function AK(n,t,e){A7.call(this,n,t,e,null)}function LK(n,t,e){A7.call(this,n,t,e,null)}function NK(n,t){this.c=n,OE.call(this,n,t)}function $K(n,t){this.a=n,NK.call(this,n,t)}function DK(n){this.q=new e.Date(W4(n))}function xK(n){return n>8?0:n+1}function RK(n,t){Nut||kD(n.a,t)}function KK(n,t){return WS(),jsn(t.d.i,n)}function FK(n,t){return Pun(),new oHn(t,n)}function _K(n,t,e){return n.Ne(t,e)<=0?e:t}function BK(n,t,e){return n.Ne(t,e)<=0?t:e}function HK(n,t){return uG(ain(n.b,t),143)}function UK(n,t){return uG(ain(n.c,t),233)}function GK(n){return uG(zq(n.a,n.b),293)}function qK(n){return new MO(n.c,n.d+n.a)}function XK(n){return tJ(n),n?1231:1237}function zK(n){return n2(),lN(uG(n,203))}function VK(){VK=E,lht=ggn((Qmn(),JRt))}function WK(n,t){t.a?W$n(n,t):sD(n.a,t.b)}function QK(n,t,e){++n.j,n.tj(),Ann(n,t,e)}function JK(n,t,e){++n.j,n.qj(t,n.Zi(t,e))}function YK(n,t,e){n.fd(t).Rb(e)}function ZK(n,t,e){return e=DUn(n,t,6,e)}function nF(n,t,e){return e=DUn(n,t,3,e)}function tF(n,t,e){return e=DUn(n,t,9,e)}function eF(n,t){return ZZ(t,W2n),n.f=t,n}function iF(n,t){return(t&vZn)%n.d.length}function rF(n,t,e){return fXn(n.c,n.b,t,e)}function cF(n,t){this.c=n,Drn.call(this,t)}function aF(n,t){this.a=n,xm.call(this,t)}function oF(n,t){this.a=n,xm.call(this,t)}function uF(n,t){Cm.call(this,n),this.a=t}function sF(n,t){Bm.call(this,n),this.a=t}function hF(n,t){Bm.call(this,n),this.a=t}function fF(n){smn.call(this,0,0),this.f=n}function lF(n,t,e){return n.a+=mvn(t,0,e),n}function bF(n){return!n.a&&(n.a=new M),n.a}function wF(n,t){var e;return e=n.e,n.e=t,e}function dF(n,t){var e;return e=t,!!n.Fe(e)}function gF(n,t){return qx(),n==t?0:n?1:-1}function pF(n,t){n.a.bd(n.b,t),++n.b,n.c=-1}function mF(n){n.b?mF(n.b):n.f.c.zc(n.e,n.d)}function vF(n){$V(n.e),n.d.b=n.d,n.d.a=n.d}function kF(n,t,e){vS(),Ob(n,t.Ve(n.a,e))}function yF(n,t,e){return UV(n,uG(t,22),e)}function MF(n,t){return aT(new Array(t),n)}function TF(n){return pz(Dz(n,32))^pz(n)}function jF(n){return String.fromCharCode(n)}function EF(n){return null==n?null:n.message}function SF(n,t,e){return n.apply(t,e)}function PF(n,t){n[U0n].call(n,t)}function CF(n,t){n[U0n].call(n,t)}function IF(n,t){return WS(),!jsn(t.d.i,n)}function OF(n,t,e,i){lX.call(this,n,t,e,i)}function AF(){HF.call(this),this.a=new sj}function LF(){this.n=new sj,this.o=new sj}function NF(){this.b=new sj,this.c=new Zm}function $F(){this.a=new Zm,this.b=new Zm}function DF(){this.a=new lt,this.b=new qv}function xF(){this.b=new u8,this.a=new u8}function RF(){this.b=new ek,this.a=new ek}function KF(){this.b=new Ym,this.a=new Ym}function FF(){this.b=new Gj,this.a=new Ma}function _F(){this.a=new hl,this.b=new oc}function BF(){this.a=new Zm,this.d=new Zm}function HF(){this.n=new Dk,this.i=new cN}function UF(n){this.a=(man(n,g1n),new R7(n))}function GF(n){this.a=(man(n,g1n),new R7(n))}function qF(n){return n<100?null:new cj(n)}function XF(n,t){return n.n.a=(tJ(t),t+10)}function zF(n,t){return n.n.a=(tJ(t),t+10)}function VF(n,t){return t==n||sSn(mRn(t),n)}function WF(n,t){return null==vJ(n.a,t,"")}function QF(n,t){return t.qi(n.a)}function JF(n,t){return n.a+=t.a,n.b+=t.b,n}function YF(n,t){return n.a-=t.a,n.b-=t.b,n}function ZF(n){return Xv(n.j.c,0),n.a=-1,n}function n_(n,t,e){return e=DUn(n,t,11,e)}function t_(n,t,e){null!=e&&Xan(t,gTn(n,e))}function e_(n,t,e){null!=e&&zan(t,gTn(n,e))}function i_(n,t,e,i){fV.call(this,n,t,e,i)}function r_(n,t,e,i){fV.call(this,n,t,e,i)}function c_(n,t,e,i){r_.call(this,n,t,e,i)}function a_(n,t,e,i){wV.call(this,n,t,e,i)}function o_(n,t,e,i){wV.call(this,n,t,e,i)}function u_(n,t,e,i){wV.call(this,n,t,e,i)}function s_(n,t,e,i){o_.call(this,n,t,e,i)}function h_(n,t,e,i){o_.call(this,n,t,e,i)}function f_(n,t,e,i){u_.call(this,n,t,e,i)}function l_(n,t,e,i){h_.call(this,n,t,e,i)}function b_(n,t,e,i){kV.call(this,n,t,e,i)}function w_(n,t){dM.call(this,Hit+n+Vet+t)}function d_(n,t){return n.jk().wi().ri(n,t)}function g_(n,t){return n.jk().wi().ti(n,t)}function p_(n,t){return tJ(n),xA(n)===xA(t)}function m_(n,t){return tJ(n),xA(n)===xA(t)}function v_(n,t){return n.b.Bd(new QP(n,t))}function k_(n,t){return n.b.Bd(new JP(n,t))}function y_(n,t){return n.b.Bd(new YP(n,t))}function M_(n,t){return n.e=uG(n.d.Kb(t),159)}function T_(n,t,e){return n.lastIndexOf(t,e)}function j_(n,t,e){return ugn(n[t.a],n[e.a])}function E_(n,t){return kfn(t,(jYn(),Oyt),n)}function S_(n,t){return d$(t.a.d.p,n.a.d.p)}function P_(n,t){return d$(n.a.d.p,t.a.d.p)}function C_(n,t){return ugn(n.c-n.s,t.c-t.s)}function I_(n,t){return ugn(n.b.e.a,t.b.e.a)}function O_(n,t){return ugn(n.c.e.a,t.c.e.a)}function A_(n){return n.c?Ten(n.c.a,n,0):-1}function L_(n){return n==rRt||n==aRt||n==cRt}function N_(n,t){this.c=n,QV.call(this,n,t)}function $_(n,t,e){this.a=n,Qx.call(this,t,e)}function D_(n){this.c=n,rL.call(this,YZn,0)}function x_(n,t,e){this.c=t,this.b=e,this.a=n}function R_(n){PU(),this.d=n,this.a=new ND}function K_(n){sB(),this.a=(hZ(),new nT(n))}function F_(n,t){hN(n.f)?JDn(n,t):wCn(n,t)}function __(n,t){sG.call(this,n,n.length,t)}function B_(n,t){Nut||t&&(n.d=t)}function H_(n,t){return F$(t,15)&&G_n(n.c,t)}function U_(n,t,e){return uG(n.c,71).Wk(t,e)}function G_(n,t,e){return uG(n.c,71).Xk(t,e)}function q_(n,t,e){return uK(n,uG(t,343),e)}function X_(n,t,e){return sK(n,uG(t,343),e)}function z_(n,t,e){return yPn(n,uG(t,343),e)}function V_(n,t,e){return FCn(n,uG(t,343),e)}function W_(n,t){return null==t?null:Xwn(n.b,t)}function Q_(n){return FA(n)?(tJ(n),n):n.ue()}function J_(n){return!isNaN(n)&&!isFinite(n)}function Y_(n){O$(this),BY(this),Qon(this,n)}function Z_(n){IN(this),dG(this.c,0,n.Pc())}function nB(n,t,e){this.a=n,this.b=t,this.c=e}function tB(n,t,e){this.a=n,this.b=t,this.c=e}function eB(n,t,e){this.d=n,this.b=e,this.a=t}function iB(n){this.a=n,bS(),Bsn(Date.now())}function rB(n){LQ(n.a),Lnn(n.c,n.b),n.b=null}function cB(){cB=E,out=new K,uut=new F}function aB(){aB=E,DFt=Inn(dat,EZn,1,0,5,1)}function oB(){oB=E,X_t=Inn(dat,EZn,1,0,5,1)}function uB(){uB=E,z_t=Inn(dat,EZn,1,0,5,1)}function sB(){sB=E,new jv((hZ(),hZ(),zot))}function hB(n){return Rtn(),Fcn((xtn(),Mut),n)}function fB(n){return ybn(),Fcn((bnn(),xut),n)}function lB(n){return _kn(),Fcn((k8(),Jut),n)}function bB(n){return Xin(),Fcn((y8(),tst),n)}function wB(n){return W_n(),Fcn((uhn(),kst),n)}function dB(n){return Yrn(),Fcn((fnn(),Cst),n)}function gB(n){return Ktn(),Fcn((hnn(),Dst),n)}function pB(n){return Yen(),Fcn((lnn(),Bst),n)}function mB(n){return JYn(),Fcn((fL(),fht),n)}function vB(n){return ehn(),Fcn((_tn(),vht),n)}function kB(n){return vyn(),Fcn((Htn(),Eht),n)}function yB(n){return myn(),Fcn((Btn(),Rht),n)}function MB(n){return BS(),Fcn((r6(),_ht),n)}function TB(n){return zin(),Fcn((M8(),vft),n)}function jB(n){return Jen(),Fcn((wnn(),vlt),n)}function EB(n){return uIn(),Fcn(($in(),Ilt),n)}function SB(n){return Xhn(),Fcn((Gtn(),Glt),n)}function PB(n){return Uvn(),Fcn((Utn(),ibt),n)}function CB(n,t){if(!n)throw hv(new vM(t))}function IB(n){if(!n)throw hv(new kM(PZn))}function OB(n,t){if(n!=t)throw hv(new Fv)}function AB(n,t,e){this.a=n,this.b=t,this.c=e}function LB(n,t,e){this.a=n,this.b=t,this.c=e}function NB(n,t,e){this.a=n,this.b=t,this.c=e}function $B(n,t,e){this.b=n,this.a=t,this.c=e}function DB(n,t,e){this.b=n,this.c=t,this.a=e}function xB(n,t,e){this.a=n,this.b=t,this.c=e}function RB(n,t,e){this.e=t,this.b=n,this.d=e}function KB(n,t,e){this.b=n,this.a=t,this.c=e}function FB(n,t,e){return vS(),n.a.Yd(t,e),t}function _B(n){var t;return(t=new yn).e=n,t}function BB(n){var t;return(t=new pk).b=n,t}function HB(){HB=E,Nbt=new $e,$bt=new De}function UB(){UB=E,Jwt=new ui,Qwt=new si}function GB(){GB=E,rdt=new mr,cdt=new vr}function qB(n){return gon(),Fcn((X7(),Cdt),n)}function XB(n){return zYn(),Fcn((lL(),_wt),n)}function zB(n){return Ghn(),Fcn((Xtn(),Wwt),n)}function VB(n){return qhn(),Fcn((qtn(),ldt),n)}function WB(n){return gPn(),Fcn((Din(),vdt),n)}function QB(n){return h_n(),Fcn((osn(),Kdt),n)}function JB(n){return vAn(),Fcn((ecn(),zdt),n)}function YB(n){return H7(),Fcn((S8(),Jdt),n)}function ZB(n){return jan(),Fcn((U7(),egt),n)}function nH(n){return ran(),Fcn((G7(),ogt),n)}function tH(n){return kvn(),Fcn((xin(),wgt),n)}function eH(n){return Vin(),Fcn((E8(),mgt),n)}function iH(n){return RIn(),Fcn((ccn(),Jgt),n)}function rH(n){return r_n(),Fcn((Efn(),spt),n)}function cH(n){return ihn(),Fcn((V7(),wpt),n)}function aH(n){return Zen(),Fcn((z7(),vpt),n)}function oH(n){return Y6(),Fcn((L8(),Tpt),n)}function uH(n){return ESn(),Fcn((rcn(),Ugt),n)}function sH(n){return Pfn(),Fcn((q7(),Tgt),n)}function hH(n){return tOn(),Fcn((icn(),Agt),n)}function fH(n){return Wtn(),Fcn((j8(),Dgt),n)}function lH(n){return Gpn(),Fcn((Kin(),$mt),n)}function bH(n){return MKn(),Fcn((chn(),ojt),n)}function wH(n){return Cwn(),Fcn((W7(),ljt),n)}function dH(n){return Yyn(),Fcn((ztn(),mjt),n)}function gH(n){return pyn(),Fcn((Rin(),Ejt),n)}function pH(n){return THn(),Fcn((Sfn(),Rjt),n)}function mH(n){return yvn(),Fcn((Vtn(),Ujt),n)}function vH(n){return nin(),Fcn((P8(),zjt),n)}function kH(n){return can(),Fcn((Y7(),Yjt),n)}function yH(n){return isn(),Fcn((Q7(),iEt),n)}function MH(n){return Sln(),Fcn((J7(),uEt),n)}function TH(n){return kbn(),Fcn((nnn(),bEt),n)}function jH(n){return ian(),Fcn((Z7(),mEt),n)}function EH(n){return zhn(),Fcn((tnn(),TEt),n)}function SH(n){return ean(),Fcn((snn(),GEt),n)}function PH(n){return Z6(),Fcn((C8(),nSt),n)}function CH(n){return b0(),Fcn((I8(),bSt),n)}function IH(n){return w0(),Fcn((O8(),pSt),n)}function OH(n){return _7(),Fcn((A8(),RSt),n)}function AH(n){return l0(),Fcn((N8(),XSt),n)}function LH(n){return Cjn(),Fcn((sen(),YSt),n)}function NH(n){return OHn(),Fcn((bL(),bPt),n)}function $H(n){return Pln(),Fcn((enn(),mPt),n)}function DH(n){return mbn(),Fcn((uen(),KCt),n)}function xH(n){return i3(),Fcn((D8(),HCt),n)}function RH(n){return pon(),Fcn((x8(),JCt),n)}function KH(n){return zPn(),Fcn((Fin(),rIt),n)}function FH(n){return vbn(),Fcn((inn(),bIt),n)}function _H(n){return Ptn(),Fcn(($8(),uIt),n)}function BH(n){return dTn(),Fcn((oen(),tOt),n)}function HH(n){return esn(),Fcn((rnn(),aOt),n)}function UH(n){return Jmn(),Fcn((cnn(),fOt),n)}function GH(n){return Zyn(),Fcn((ann(),gOt),n)}function qH(n){return Bgn(),Fcn((onn(),LOt),n)}function XH(n){return a9(),Fcn((R8(),jAt),n)}function zH(n){return Aun(),Fcn((T8(),Lbt),n)}function VH(n){return zIn(),Fcn((acn(),mbt),n)}function WH(n){return den(),Fcn((unn(),IAt),n)}function QH(n){return rhn(),Fcn((K8(),NAt),n)}function JH(n){return _Rn(),Fcn((_in(),BAt),n)}function YH(n){return nP(),Fcn(($6(),WAt),n)}function ZH(n){return Rdn(),Fcn((gnn(),XAt),n)}function nU(n){return tP(),Fcn((D6(),YAt),n)}function tU(n){return B7(),Fcn((F8(),eLt),n)}function eU(n){return pOn(),Fcn((Bin(),sLt),n)}function iU(n){return eP(),Fcn((x6(),XLt),n)}function rU(n){return Vhn(),Fcn((_8(),QLt),n)}function cU(n){return Rkn(),Fcn((Uin(),bNt),n)}function aU(n){return lAn(),Fcn((csn(),TNt),n)}function oU(n){return nMn(),Fcn((ocn(),DNt),n)}function uU(n){return ZSn(),Fcn((ucn(),t$t),n)}function sU(n){return xdn(),Fcn((Hin(),ext),n)}function hU(n){return Zrn(),Fcn((pnn(),oxt),n)}function fU(n){return _gn(),Fcn((hen(),bxt),n)}function lU(n){return RCn(),Fcn((scn(),yxt),n)}function bU(n){return Own(),Fcn((dnn(),Nxt),n)}function wU(n){return Ajn(),Fcn((fen(),Fxt),n)}function dU(n){return VDn(),Fcn((ohn(),Qxt),n)}function gU(n){return Vkn(),Fcn((Gin(),iRt),n)}function pU(n){return $Pn(),Fcn((hcn(),fRt),n)}function mU(n){return eNn(),Fcn((fcn(),vRt),n)}function vU(n){return KQn(),Fcn((qin(),HRt),n)}function kU(n){return Qmn(),Fcn((len(),ZRt),n)}function yU(n){return oUn(),Fcn((ahn(),hKt),n)}function MU(n){return Iwn(),Fcn((mnn(),dKt),n)}function TU(n,t){return tJ(n),n+(tJ(t),t)}function jU(n){return CU(),Fcn((B8(),vKt),n)}function EU(n){return qpn(),Fcn((ben(),EKt),n)}function SU(n){return Eln(),Fcn((wen(),LKt),n)}function PU(){PU=E,KQn(),zEt=_Rt,VEt=kRt}function CU(){CU=E,gKt=new Pq,pKt=new gV}function IU(n){return!n.e&&(n.e=new Zm),n.e}function OU(n,t){this.c=n,this.a=t,this.b=t-n}function AU(n,t,e){this.a=n,this.b=t,this.c=e}function LU(n,t,e){this.a=n,this.b=t,this.c=e}function NU(n,t,e){this.a=n,this.b=t,this.c=e}function $U(n,t,e){this.a=n,this.b=t,this.c=e}function DU(n,t,e){this.a=n,this.b=t,this.c=e}function xU(n,t,e){this.a=n,this.b=t,this.c=e}function RU(n,t,e){this.e=n,this.a=t,this.c=e}function KU(n,t,e){ZN(),_1.call(this,n,t,e)}function FU(n,t,e){ZN(),CQ.call(this,n,t,e)}function _U(n,t,e){ZN(),CQ.call(this,n,t,e)}function BU(n,t,e){ZN(),CQ.call(this,n,t,e)}function HU(n,t,e){ZN(),FU.call(this,n,t,e)}function UU(n,t,e){ZN(),FU.call(this,n,t,e)}function GU(n,t,e){ZN(),UU.call(this,n,t,e)}function qU(n,t,e){ZN(),_U.call(this,n,t,e)}function XU(n,t,e){ZN(),BU.call(this,n,t,e)}function zU(n){lX.call(this,n.d,n.c,n.a,n.b)}function VU(n){lX.call(this,n.d,n.c,n.a,n.b)}function WU(n){this.d=n,Cw(this),this.b=Ez(n.d)}function QU(n){return rDn(),Fcn((asn(),SFt),n)}function JU(n,t){return WW(n),WW(t),new jE(n,t)}function YU(n,t){return WW(n),WW(t),new WG(n,t)}function ZU(n,t){return WW(n),WW(t),new QG(n,t)}function nG(n,t){return WW(n),WW(t),new DE(n,t)}function tG(n){return MK(0!=n.b),Lrn(n,n.a.a)}function eG(n){return MK(0!=n.b),Lrn(n,n.c.b)}function iG(n){return!n.c&&(n.c=new Ks),n.c}function rG(n){var t;return cin(t=new Zm,n),t}function cG(n){var t;return cin(t=new ek,n),t}function aG(n){var t;return Fon(t=new rk,n),t}function oG(n){var t;return Fon(t=new lS,n),t}function uG(n,t){return Fq(null==n||Eyn(n,t)),n}function sG(n,t,e){_z.call(this,t,e),this.a=n}function hG(n,t){this.c=n,this.b=t,this.a=!1}function fG(){this.a=";,;",this.b="",this.c=""}function lG(n,t,e){this.b=n,eL.call(this,t,e)}function bG(n,t,e){this.c=n,VP.call(this,t,e)}function wG(n,t,e){FC.call(this,n,t),this.b=e}function dG(n,t,e){b$n(e,0,n,t,e.length,!1)}function gG(n,t,e,i,r){n.b=t,n.c=e,n.d=i,n.a=r}function pG(n,t,e,i,r){n.d=t,n.c=e,n.a=i,n.b=r}function mG(n,t){t&&(n.b=t,n.a=(GQ(t),t.a))}function vG(n,t){if(!n)throw hv(new vM(t))}function kG(n,t){if(!n)throw hv(new kM(t))}function yG(n,t){if(!n)throw hv(new gM(t))}function MG(n,t){return YS(),d$(n.d.p,t.d.p)}function TG(n,t){return tcn(),ugn(n.e.b,t.e.b)}function jG(n,t){return tcn(),ugn(n.e.a,t.e.a)}function EG(n,t){return d$(wq(n.d),wq(t.d))}function SG(n,t){return t&&$Q(n,t.d)?t:null}function PG(n,t){return t==(KQn(),_Rt)?n.c:n.d}function CG(n){return Esn(LV(_L(n)?Gsn(n):n))}function IG(n){return new MO(n.c+n.b,n.d+n.a)}function OG(n){return null!=n&&!mpn(n,n_t,t_t)}function AG(n,t){return(ldn(n)<<4|ldn(t))&D1n}function LG(n,t,e,i,r){n.c=t,n.d=e,n.b=i,n.a=r}function NG(n){var t,e;t=n.b,e=n.c,n.b=e,n.c=t}function $G(n){var t,e;e=n.d,t=n.a,n.d=t,n.a=e}function DG(n,t){var e;return e=n.c,Jan(n,t),e}function xG(n,t){return n.g=t<0?-1:t,n}function RG(n,t){return Brn(n),n.a*=t,n.b*=t,n}function KG(n,t,e){Orn.call(this,t,e),this.d=n}function FG(n,t,e){LA.call(this,n,t),this.c=e}function _G(n,t,e){LA.call(this,n,t),this.c=e}function BG(n){uB(),ps.call(this),this.ci(n)}function HG(){N7(),OQ.call(this,(MP(),l_t))}function UG(n){return QYn(),new IX(0,n)}function GG(){GG=E,hZ(),CBt=new Xw(bct)}function qG(){qG=E,new Gyn((my(),Tat),(py(),Mat))}function XG(){XG=E,bot=Inn(dot,zZn,17,256,0,1)}function zG(){this.b=uM(pK(Jkn((cGn(),Bft))))}function VG(n){this.b=n,this.a=Mz(this.b.a).Od()}function WG(n,t){this.b=n,this.a=t,Ff.call(this)}function QG(n,t){this.a=n,this.b=t,Ff.call(this)}function JG(n,t,e){this.a=n,vL.call(this,t,e)}function YG(n,t,e){this.a=n,vL.call(this,t,e)}function ZG(n,t,e){nrn(n,t,new QW(e))}function nq(n,t,e){var i;return i=n[t],n[t]=e,i}function tq(n){return Ltn(n.slice(),n)}function eq(n){var t;return t=n.n,n.a.b+t.d+t.a}function iq(n){var t;return t=n.n,n.e.b+t.d+t.a}function rq(n){var t;return t=n.n,n.e.a+t.b+t.c}function cq(n){n.a.b=n.b,n.b.a=n.a,n.a=n.b=null}function aq(n,t){return s8(n,t,n.c.b,n.c),!0}function oq(n){return n.a?n.a:sY(n)}function uq(n){return lZ(),bIn(n)==R0(gIn(n))}function sq(n){return lZ(),gIn(n)==R0(bIn(n))}function hq(n,t){return CEn(n,new FC(t.a,t.b))}function fq(n,t){return TJ(),IMn(n,t),new bJ(n,t)}function lq(n,t){return n.c=t)throw hv(new Ik)}function Wz(n,t){return cdn(n,(tJ(t),new ud(t)))}function Qz(n,t){return cdn(n,(tJ(t),new sd(t)))}function Jz(n,t,e){return BYn(n,uG(t,12),uG(e,12))}function Yz(n){return Lun(),0!=uG(n,12).g.c.length}function Zz(n){return Lun(),0!=uG(n,12).e.c.length}function nV(n,t){return Pun(),ugn(t.a.o.a,n.a.o.a)}function tV(n,t){0!=(t.Bb&Qtt)&&!n.a.o&&(n.a.o=t)}function eV(n,t){t.Ug("General 'Rotator",1),lQn(n)}function iV(n,t,e){t.qf(e,uM(pK(cQ(n.b,e)))*n.a)}function rV(n,t,e){return l_n(),qun(n,t)&&qun(n,e)}function cV(n){return eNn(),!n.Hc(wRt)&&!n.Hc(gRt)}function aV(n){return n.e?T7(n.e):null}function oV(n){return _L(n)?""+n:K_n(n)}function uV(n){var t;for(t=n;t.f;)t=t.f;return t}function sV(n,t,e){return uQ(t,0,nX(t[0],e[0])),t}function hV(n,t,e,i){var r;(r=n.i).i=t,r.a=e,r.b=i}function fV(n,t,e,i){MD.call(this,n,t,e),this.b=i}function lV(n,t,e,i,r){btn.call(this,n,t,e,i,r,-1)}function bV(n,t,e,i,r){wtn.call(this,n,t,e,i,r,-1)}function wV(n,t,e,i){FG.call(this,n,t,e),this.b=i}function dV(n){lA.call(this,n,!1),this.a=!1}function gV(){BO.call(this,"LOOKAHEAD_LAYOUT",1)}function pV(n){this.b=n,Zx.call(this,n),qD(this)}function mV(n){this.b=n,tR.call(this,n),XD(this)}function vV(n,t,e){this.a=n,i_.call(this,t,e,5,6)}function kV(n,t,e,i){this.b=n,MD.call(this,t,e,i)}function yV(n,t){this.b=n,fb.call(this,n.b),this.a=t}function MV(n){this.a=Fyn(n.a),this.b=new Z_(n.b)}function TV(n,t){ZW(),UE.call(this,n,Dwn(new IM(t)))}function jV(n,t){return QYn(),new PQ(n,t,0)}function EV(n,t){return QYn(),new PQ(6,n,t)}function SV(n,t){for(tJ(t);n.Ob();)t.Cd(n.Pb())}function PV(n,t){return RA(t)?AZ(n,t):!!FX(n.f,t)}function CV(n,t){return t.Vh()?mwn(n.b,uG(t,54)):t}function IV(n,t){return m_(n.substr(0,t.length),t)}function OV(n){return new Fz(new YD(n.a.length,n.a))}function AV(n){return new MO(n.c+n.b/2,n.d+n.a/2)}function LV(n){return p$(~n.l&f0n,~n.m&f0n,~n.h&l0n)}function NV(n){return typeof n===wZn||typeof n===mZn}function $V(n){n.f=new nN(n),n.i=new tN(n),++n.g}function DV(n){if(!n)throw hv(new Bv);return n.d}function xV(n){var t;return MK(null!=(t=Rfn(n))),t}function RV(n){var t;return MK(null!=(t=sgn(n))),t}function KV(n,t){var e;return e7(t,e=n.a.gc()),e-t}function FV(n,t){return null==n.a.zc(t,n)}function _V(n,t){return null==n.a.zc(t,(qx(),tot))}function BV(n){return new fX(null,oW(n,n.length))}function HV(n,t,e){return HXn(n,uG(t,42),uG(e,176))}function UV(n,t,e){return Mon(n.a,t),nq(n.b,t.g,e)}function GV(n,t,e){Vz(e,n.a.c.length),Y8(n.a,e,t)}function qV(n,t,e,i){ubn(t,e,n.length),XV(n,t,e,i)}function XV(n,t,e,i){var r;for(r=t;r0?e.Math.log(n/t):-100}function rW(n,t){return dwn(n,t)<0?-1:dwn(n,t)>0?1:0}function cW(n,t){J$(n,F$(t,160)?t:uG(t,2036).Rl())}function aW(n,t){if(null==n)throw hv(new MM(t))}function oW(n,t){return $rn(t,n.length),new Sq(n,t)}function uW(n,t){return!!t&&Qon(n,t)}function sW(){return Hy(),Uhn(cT(Lat,1),p1n,549,0,[Iat])}function hW(n){return 0==n.e?n:new VV(-n.e,n.d,n.a)}function fW(n,t){return ugn(n.c.c+n.c.b,t.c.c+t.c.b)}function lW(n,t){s8(n.d,t,n.b.b,n.b),++n.a,n.c=null}function bW(n,t){return n.c?bW(n.c,t):kD(n.b,t),n}function wW(n,t,e){var i;return i=uin(n,t),W5(n,t,e),i}function dW(n,t,e){var i;for(i=0;i=n.g}function uQ(n,t,e){return yK(null==e||aGn(n,e)),n[t]=e}function sQ(n,t){return s3(t,n.length+1),n.substr(t)}function hQ(n,t){for(tJ(t);n.c=n?new mS:ton(n-1)}function HQ(n){return!n.a&&n.c?n.c.b:n.a}function UQ(n){return F$(n,616)?n:new e0(n)}function GQ(n){n.c?GQ(n.c):(vgn(n),n.d=!0)}function qQ(n){n.c?n.c.$e():(n.d=!0,uKn(n))}function XQ(n){n.b=!1,n.c=!1,n.d=!1,n.a=!1}function zQ(n){return n.c.i.c==n.d.i.c}function VQ(n,t){var e;(e=n.Ih(t))>=0?n.ki(e):zLn(n,t)}function WQ(n,t){n.c<0||n.b.b0;)n=n<<1|(n<0?1:0);return n}function CJ(n,t){var e;return e=new bQ(n),mv(t.c,e),e}function IJ(n,t){n.u.Hc((eNn(),wRt))&&vNn(n,t),knn(n,t)}function OJ(n,t){return xA(n)===xA(t)||null!=n&&udn(n,t)}function AJ(n,t){return RX(n.a,t)?n.b[uG(t,22).g]:null}function LJ(){return BS(),Uhn(cT(oft,1),p1n,488,0,[Kht])}function NJ(){return nP(),Uhn(cT(JAt,1),p1n,489,0,[zAt])}function $J(){return tP(),Uhn(cT(tLt,1),p1n,558,0,[QAt])}function DJ(){return eP(),Uhn(cT(WLt,1),p1n,539,0,[GLt])}function xJ(n){return!n.n&&(n.n=new fV(lFt,n,1,7)),n.n}function RJ(n){return!n.c&&(n.c=new fV(wFt,n,9,9)),n.c}function KJ(n){return!n.c&&(n.c=new f_(cFt,n,5,8)),n.c}function FJ(n){return!n.b&&(n.b=new f_(cFt,n,4,7)),n.b}function _J(n){return n.j.c.length=0,oY(n.c),ZF(n.a),n}function BJ(n){return n.e==wct&&kw(n,akn(n.g,n.b)),n.e}function HJ(n){return n.f==wct&&Mw(n,tEn(n.g,n.b)),n.f}function UJ(n,t,e,i){return Dsn(n,t,e,!1),pdn(n,i),n}function GJ(n,t){this.b=n,QV.call(this,n,t),qD(this)}function qJ(n,t){this.b=n,N_.call(this,n,t),XD(this)}function XJ(n){this.d=n,this.a=this.d.b,this.b=this.d.c}function zJ(n,t){this.b=n,this.c=t,this.a=new fS(this.b)}function VJ(n,t){return s3(t,n.length),n.charCodeAt(t)}function WJ(n,t){jgn(n,uM($cn(t,"x")),uM($cn(t,"y")))}function QJ(n,t){jgn(n,uM($cn(t,"x")),uM($cn(t,"y")))}function JJ(n,t){return vgn(n),new fX(n,new ien(t,n.a))}function YJ(n,t){return vgn(n),new fX(n,new f7(t,n.a))}function ZJ(n,t){return vgn(n),new IK(n,new s7(t,n.a))}function nY(n,t){return vgn(n),new OK(n,new h7(t,n.a))}function tY(n,t){return new MZ(uG(WW(n),50),uG(WW(t),50))}function eY(n,t){return ugn(n.d.c+n.d.b/2,t.d.c+t.d.b/2)}function iY(n,t,e){e.a?Mcn(n,t.b-n.f/2):ycn(n,t.a-n.g/2)}function rY(n,t){return ugn(n.g.c+n.g.b/2,t.g.c+t.g.b/2)}function cY(n,t){return qS(),ugn((tJ(n),n),(tJ(t),t))}function aY(n){return null!=n&&ZE(UFt,n.toLowerCase())}function oY(n){var t;for(t=n.Kc();t.Ob();)t.Pb(),t.Qb()}function uY(n){var t;return!(t=n.b)&&(n.b=t=new Yl(n)),t}function sY(n){return con(n)||null}function hY(n,t){var e,i;return(e=n/t)>(i=t0(e))&&++i,i}function fY(n,t,e){var i;(i=uG(n.d.Kb(e),159))&&i.Nb(t)}function lY(n,t,e){KXn(n.a,e),jhn(e),EDn(n.b,e),Tzn(t,e)}function bY(n,t,e,i){this.a=n,this.c=t,this.b=e,this.d=i}function wY(n,t,e,i){this.c=n,this.b=t,this.a=e,this.d=i}function dY(n,t,e,i){this.c=n,this.b=t,this.d=e,this.a=i}function gY(n,t,e,i){this.c=n,this.d=t,this.b=e,this.a=i}function pY(n,t,e,i){this.a=n,this.d=t,this.c=e,this.b=i}function mY(n,t,e,i){this.a=n,this.e=t,this.d=e,this.c=i}function vY(n,t,e,i){this.a=n,this.c=t,this.d=e,this.b=i}function kY(n,t,e){this.a=L1n,this.d=n,this.b=t,this.c=e}function yY(n,t,e,i){_E.call(this,n,t),this.a=e,this.b=i}function MY(n,t){this.d=(tJ(n),n),this.a=16449,this.c=t}function TY(n){this.a=new Zm,this.e=Inn(YHt,zZn,53,n,0,2)}function jY(n){n.Ug("No crossing minimization",1),n.Vg()}function EY(){Ky.call(this,"There is no more element.")}function SY(n,t,e,i){this.a=n,this.b=t,this.c=e,this.d=i}function PY(n,t,e,i){this.a=n,this.b=t,this.c=e,this.d=i}function CY(n,t,e,i){this.e=n,this.a=t,this.c=e,this.d=i}function IY(n,t,e,i){this.a=n,this.c=t,this.d=e,this.b=i}function OY(n,t,e,i){ZN(),l7.call(this,t,e,i),this.a=n}function AY(n,t,e,i){ZN(),l7.call(this,t,e,i),this.a=n}function LY(n,t,e){var i;return i=eJn(n),t.ti(e,i)}function NY(n){var t;return Urn(t=new ev,n),t}function $Y(n){var t;return MIn(t=new ev,n),t}function DY(n,t){return Qun(t,cQ(n.f,t)),null}function xY(n){return!n.b&&(n.b=new fV(aFt,n,12,3)),n.b}function RY(n){return Fq(null==n||NV(n)&&!(n.Tm===j)),n}function KY(n){return n.n&&(n.e!==E1n&&n.je(),n.j=null),n}function FY(n){if(bpn(n.d),n.d.d!=n.c)throw hv(new Fv)}function _Y(n){return MK(n.b0&&XEn(this)}function UY(n,t){this.a=n,CK.call(this,n,uG(n.d,15).fd(t))}function GY(n,t){return ugn(EX(n)*jX(n),EX(t)*jX(t))}function qY(n,t){return ugn(EX(n)*jX(n),EX(t)*jX(t))}function XY(n){return BNn(n)&&oM(gK(zDn(n,(jYn(),hMt))))}function zY(n,t){return UNn(n,uG(oIn(t,(jYn(),UMt)),17),t)}function VY(n,t){return uG(oIn(n,(GYn(),Vpt)),15).Fc(t),t}function WY(n,t){return n.b=t.b,n.c=t.c,n.d=t.d,n.a=t.a,n}function QY(n,t,e,i){this.b=n,this.c=i,rL.call(this,t,e)}function JY(n,t,e){n.i=0,n.e=0,t!=e&&tln(n,t,e)}function YY(n,t,e){n.i=0,n.e=0,t!=e&&eln(n,t,e)}function ZY(n,t,e){return JS(),opn(uG(cQ(n.e,t),529),e)}function nZ(n){return n.f||(n.f=new OE(n,n.c))}function tZ(n,t){return Hwn(n.j,t.s,t.c)+Hwn(t.e,n.s,n.c)}function eZ(n,t){n.e&&!n.e.a&&(iv(n.e,t),eZ(n.e,t))}function iZ(n,t){n.d&&!n.d.a&&(iv(n.d,t),iZ(n.d,t))}function rZ(n,t){return-ugn(EX(n)*jX(n),EX(t)*jX(t))}function cZ(n){return uG(n.ld(),149).Pg()+":"+cpn(n.md())}function aZ(){HIn(this,new Fl),this.wb=(tQ(),M_t),vj()}function oZ(n){this.b=new Zm,Ohn(this.b,this.b),this.a=n}function uZ(n,t){new lS,this.a=new Uk,this.b=n,this.c=t}function sZ(){sZ=E,Jot=new N,Yot=new N,Zot=new $}function hZ(){hZ=E,zot=new C,Vot=new O,Wot=new A}function fZ(){fZ=E,Gut=new dn,Xut=new tz,qut=new gn}function lZ(){lZ=E,aft=new Zm,cft=new Ym,rft=new Zm}function bZ(n,t){if(null==n)throw hv(new MM(t));return n}function wZ(n){return!n.a&&(n.a=new fV(bFt,n,10,11)),n.a}function dZ(n){return!n.q&&(n.q=new fV(p_t,n,11,10)),n.q}function gZ(n){return!n.s&&(n.s=new fV(o_t,n,21,17)),n.s}function pZ(n){return WW(n),KMn(new Fz(ix(n.a.Kc(),new h)))}function mZ(n,t){return Tbn(n),Tbn(t),cM(uG(n,22),uG(t,22))}function vZ(n,t,e){nrn(n,t,new Pb(Q_(e)))}function kZ(n,t,e,i,r,c){wtn.call(this,n,t,e,i,r,c?-2:-1)}function yZ(n,t,e,i){LA.call(this,t,e),this.b=n,this.a=i}function MZ(n,t){Sy.call(this,new Hz(n)),this.a=n,this.b=t}function TZ(n){this.b=n,this.c=n,n.e=null,n.c=null,this.a=1}function jZ(n){var t;GB(),(t=uG(n.g,10)).n.a=n.d.c+t.d.b}function EZ(){var n,t;EZ=E,t=!ovn(),n=new v,_at=t?new m:n}function SZ(n){return hZ(),F$(n,59)?new eT(n):new gx(n)}function PZ(n){return F$(n,16)?new oX(uG(n,16)):cG(n.Kc())}function CZ(n){return new WD(n,n.e.Rd().gc()*n.c.Rd().gc())}function IZ(n){return new QD(n,n.e.Rd().gc()*n.c.Rd().gc())}function OZ(n){return n&&n.hashCode?n.hashCode():xx(n)}function AZ(n,t){return null==t?!!FX(n.f,null):_X(n.i,t)}function LZ(n,t){var e;return(e=Q$(n.a,t))&&(t.d=null),e}function NZ(n,t,e){return!!n.f&&n.f.ef(t,e)}function $Z(n,t,e,i){uQ(n.c[t.g],e.g,i),uQ(n.c[e.g],t.g,i)}function DZ(n,t,e,i){uQ(n.c[t.g],t.g,e),uQ(n.b[t.g],t.g,i)}function xZ(n,t,e){return uM(pK(e.a))<=n&&uM(pK(e.b))>=t}function RZ(n,t){this.g=n,this.d=Uhn(cT(pbt,1),e6n,10,0,[t])}function KZ(n){this.c=n,this.b=new Hj(uG(WW(new pn),50))}function FZ(n){this.c=n,this.b=new Hj(uG(WW(new jt),50))}function _Z(n){this.b=n,this.a=new Hj(uG(WW(new nt),50))}function BZ(){this.b=new ek,this.d=new lS,this.e=new Ok}function HZ(){this.c=new sj,this.d=new sj,this.e=new sj}function UZ(){this.a=new Uk,this.b=(man(3,g1n),new R7(3))}function GZ(n,t){this.e=n,this.a=dat,this.b=$Bn(t),this.c=t}function qZ(n){this.c=n.c,this.d=n.d,this.b=n.b,this.a=n.a}function XZ(n,t,e,i,r,c){this.a=n,Ran.call(this,t,e,i,r,c)}function zZ(n,t,e,i,r,c){this.a=n,Ran.call(this,t,e,i,r,c)}function VZ(n,t,e,i,r,c,a){return new i8(n.e,t,e,i,r,c,a)}function WZ(n,t,e){return e>=0&&m_(n.substr(e,t.length),t)}function QZ(n,t){return F$(t,149)&&m_(n.b,uG(t,149).Pg())}function JZ(n,t){return n.a?t.Gh().Kc():uG(t.Gh(),71).Ii()}function YZ(n,t){var e;return w8(e=n.b.Qc(t),n.b.gc()),e}function ZZ(n,t){if(null==n)throw hv(new MM(t));return n}function n1(n){return n.u||(y9(n),n.u=new aF(n,n)),n.u}function t1(n){this.a=(hZ(),F$(n,59)?new eT(n):new gx(n))}function e1(n){return uG(Lsn(n,16),29)||n.ii()}function i1(n,t){var e;return e=Ij(n.Rm),null==t?e:e+": "+t}function r1(n,t,e){return Knn(t,e,n.length),n.substr(t,e-t)}function c1(n,t){HF.call(this),Qrn(this),this.a=n,this.c=t}function a1(n){n&&i1(n,n.ie()),String.fromCharCode(10)}function o1(n){XM(),e.setTimeout((function(){throw n}),0)}function u1(){return _kn(),Uhn(cT(nst,1),p1n,436,0,[Wut,Vut])}function s1(){return Xin(),Uhn(cT(mst,1),p1n,435,0,[Yut,Zut])}function h1(){return zin(),Uhn(cT(mlt,1),p1n,432,0,[gft,pft])}function f1(){return Aun(),Uhn(cT(Dbt,1),p1n,517,0,[Obt,Ibt])}function l1(){return Wtn(),Uhn(cT(Hgt,1),p1n,487,0,[Ngt,Lgt])}function b1(){return Vin(),Uhn(cT(Mgt,1),p1n,428,0,[dgt,ggt])}function w1(){return H7(),Uhn(cT(tgt,1),p1n,431,0,[Vdt,Wdt])}function d1(){return nin(),Uhn(cT(Jjt,1),p1n,430,0,[Gjt,qjt])}function g1(){return Z6(),Uhn(cT(cSt,1),p1n,531,0,[YEt,JEt])}function p1(){return b0(),Uhn(cT(gSt,1),p1n,523,0,[fSt,hSt])}function m1(){return w0(),Uhn(cT(xSt,1),p1n,522,0,[wSt,dSt])}function v1(){return _7(),Uhn(cT(qSt,1),p1n,528,0,[DSt,$St])}function k1(){return Y6(),Uhn(cT(Nmt,1),p1n,429,0,[kpt,ypt])}function y1(){return a9(),Uhn(cT(CAt,1),p1n,490,0,[yAt,MAt])}function M1(){return rhn(),Uhn(cT($At,1),p1n,491,0,[OAt,AAt])}function T1(){return i3(),Uhn(cT(QCt,1),p1n,433,0,[_Ct,FCt])}function j1(){return Ptn(),Uhn(cT(lIt,1),p1n,434,0,[cIt,aIt])}function E1(){return l0(),Uhn(cT(JSt,1),p1n,464,0,[USt,GSt])}function S1(){return pon(),Uhn(cT(iIt,1),p1n,500,0,[VCt,WCt])}function P1(){return B7(),Uhn(cT(uLt,1),p1n,438,0,[nLt,ZAt])}function C1(){return Vhn(),Uhn(cT(JLt,1),p1n,437,0,[VLt,zLt])}function I1(){return CU(),Uhn(cT(jKt,1),p1n,347,0,[gKt,pKt])}function O1(n,t,e,i){return e>=0?n.Uh(t,e,i):n.Ch(null,e,i)}function A1(n){return 0==n.b.b?n.a.sf():tG(n.b)}function L1(n){if(5!=n.p)throw hv(new xv);return pz(n.f)}function N1(n){if(5!=n.p)throw hv(new xv);return pz(n.k)}function $1(n){return xA(n.a)===xA((Oun(),Q_t))&&eVn(n),n.a}function D1(n,t){n.b=t,n.c>0&&n.b>0&&(n.g=mX(n.c,n.b,n.a))}function x1(n,t){n.c=t,n.c>0&&n.b>0&&(n.g=mX(n.c,n.b,n.a))}function R1(n,t){nw(this,new MO(n.a,n.b)),tw(this,oG(t))}function K1(){Py.call(this,new sS(orn(12))),FD(!0),this.a=2}function F1(n,t,e){QYn(),Qm.call(this,n),this.b=t,this.a=e}function _1(n,t,e){ZN(),Hm.call(this,t),this.a=n,this.b=e}function B1(n){var t;t=n.c.d.b,n.b=t,n.a=n.c.d,t.a=n.c.d.b=n}function H1(n){return 0==n.b?null:(MK(0!=n.b),Lrn(n,n.a.a))}function U1(n,t){return null==t?DA(FX(n.f,null)):_P(n.i,t)}function G1(n,t,e,i,r){return new AOn(n,(Rtn(),vut),t,e,i,r)}function q1(n,t){return V5(t),Jcn(n,Inn(YHt,W1n,28,t,15,1),t)}function X1(n,t){return bZ(n,"set1"),bZ(t,"set2"),new GE(n,t)}function z1(n,t){var e=Rat[n.charCodeAt(0)];return null==e?n:e}function V1(n,t){var e;return pWn(n,t,e=new B),e.d}function W1(n,t,e,i){var r;r=new AF,t.a[e.g]=r,UV(n.b,i,r)}function Q1(n,t){return JF(BR(Lcn(n.f,t)),n.f.d)}function J1(n){Lan(n.a),zN(n.a),Apn(new Ad(n.a))}function Y1(n,t){iBn(n,!0),Prn(n.e.Rf(),new DB(n,!0,t))}function Z1(n,t){return lZ(),n==R0(bIn(t))||n==R0(gIn(t))}function n0(n,t){return tcn(),uG(oIn(t,(QGn(),ACt)),17).a==n}function t0(n){return 0|Math.max(Math.min(n,vZn),-2147483648)}function e0(n){this.a=uG(WW(n),277),this.b=(hZ(),new mx(n))}function i0(n,t,e){this.i=new Zm,this.b=n,this.g=t,this.a=e}function r0(n,t,e){this.a=new Zm,this.e=n,this.f=t,this.c=e}function c0(n,t,e){this.c=new Zm,this.e=n,this.f=t,this.b=e}function a0(n){HF.call(this),Qrn(this),this.a=n,this.c=!0}function o0(n){function t(){}return t.prototype=n||{},new t}function u0(n){if(n.Ae())return null;var t=n.n;return sZn[t]}function s0(n){return n.Db>>16!=3?null:uG(n.Cb,27)}function h0(n){return n.Db>>16!=9?null:uG(n.Cb,27)}function f0(n){return n.Db>>16!=6?null:uG(n.Cb,74)}function l0(){l0=E,USt=new XI(z2n,0),GSt=new XI(V2n,1)}function b0(){b0=E,fSt=new OI(V2n,0),hSt=new OI(z2n,1)}function w0(){w0=E,wSt=new AI(c3n,0),dSt=new AI("UP",1)}function d0(){d0=E,Aat=Abn((Hy(),Uhn(cT(Lat,1),p1n,549,0,[Iat])))}function g0(n){var t;return Dfn(t=new Dj(orn(n.length)),n),t}function p0(n,t){return n.b+=t.b,n.c+=t.c,n.d+=t.d,n.a+=t.a,n}function m0(n,t){return!!Chn(n,t)&&(lan(n),!0)}function v0(n,t){if(null==t)throw hv(new Rv);return Tvn(n,t)}function k0(n,t){var e;e=n.q.getHours(),n.q.setDate(t),Iqn(n,e)}function y0(n,t,e){var i;(i=n.Ih(t))>=0?n.bi(i,e):lRn(n,t,e)}function M0(n,t){var e;return(e=n.Ih(t))>=0?n.Wh(e):$Nn(n,t)}function T0(n,t){var e;for(WW(t),e=n.a;e;e=e.c)t.Yd(e.g,e.i)}function j0(n,t,e){var i;i=Ufn(n,t,e),n.b=new Don(i.c.length)}function E0(n,t,e){W0(),n&&vJ(LFt,n,t),n&&vJ(AFt,n,e)}function S0(n,t){return UB(),qx(),uG(t.a,17).a0}function O0(n){var t;return t=n.d,t=n.bj(n.f),ttn(n,t),t.Ob()}function A0(n,t){var e;return zCn(e=new aX(t),n),new Z_(e)}function L0(n){if(0!=n.p)throw hv(new xv);return HA(n.f,0)}function N0(n){if(0!=n.p)throw hv(new xv);return HA(n.k,0)}function $0(n){return n.Db>>16!=7?null:uG(n.Cb,241)}function D0(n){return n.Db>>16!=6?null:uG(n.Cb,241)}function x0(n){return n.Db>>16!=7?null:uG(n.Cb,167)}function R0(n){return n.Db>>16!=11?null:uG(n.Cb,27)}function K0(n){return n.Db>>16!=17?null:uG(n.Cb,29)}function F0(n){return n.Db>>16!=3?null:uG(n.Cb,155)}function _0(n){return vgn(n),JJ(n,new Md(new ek))}function B0(n,t){var e=n.a=n.a||[];return e[t]||(e[t]=n.ve(t))}function H0(n,t){var e;e=n.q.getHours(),n.q.setMonth(t),Iqn(n,e)}function U0(n,t){LD(this),this.f=t,this.g=n,KY(this),this.je()}function G0(n,t){this.a=n,this.c=D$(this.a),this.b=new qZ(t)}function q0(n,t,e){this.a=t,this.c=n,this.b=(WW(e),new Z_(e))}function X0(n,t,e){this.a=t,this.c=n,this.b=(WW(e),new Z_(e))}function z0(n){this.a=n,this.b=Inn(WEt,zZn,2043,n.e.length,0,2)}function V0(){this.a=new XL,this.e=new ek,this.g=0,this.i=0}function W0(){W0=E,LFt=new Ym,AFt=new Ym,pA(iut,new fs)}function Q0(){Q0=E,jEt=wz(new wJ,(uIn(),Plt),(zYn(),Owt))}function J0(){J0=E,EEt=wz(new wJ,(uIn(),Plt),(zYn(),Owt))}function Y0(){Y0=E,PEt=wz(new wJ,(uIn(),Plt),(zYn(),Owt))}function Z0(){Z0=E,tSt=Aq(new wJ,(uIn(),Plt),(zYn(),ewt))}function n2(){n2=E,aSt=Aq(new wJ,(uIn(),Plt),(zYn(),ewt))}function t2(){t2=E,sSt=Aq(new wJ,(uIn(),Plt),(zYn(),ewt))}function e2(){e2=E,mSt=Aq(new wJ,(uIn(),Plt),(zYn(),ewt))}function i2(n,t,e,i,r,c){return new Ken(n.e,t,n.Lj(),e,i,r,c)}function r2(n,t,e){return null==t?VAn(n.f,null,e):kgn(n.i,t,e)}function c2(n,t){n.c&&men(n.c.g,n),n.c=t,n.c&&kD(n.c.g,n)}function a2(n,t){n.c&&men(n.c.a,n),n.c=t,n.c&&kD(n.c.a,n)}function o2(n,t){n.i&&men(n.i.j,n),n.i=t,n.i&&kD(n.i.j,n)}function u2(n,t){n.d&&men(n.d.e,n),n.d=t,n.d&&kD(n.d.e,n)}function s2(n,t){n.a&&men(n.a.k,n),n.a=t,n.a&&kD(n.a.k,n)}function h2(n,t){n.b&&men(n.b.f,n),n.b=t,n.b&&kD(n.b.f,n)}function f2(n,t){dQ(n,n.b,n.c),uG(n.b.b,68),t&&uG(t.b,68).b}function l2(n,t){return ugn(uG(n.c,65).c.e.b,uG(t.c,65).c.e.b)}function b2(n,t){return ugn(uG(n.c,65).c.e.a,uG(t.c,65).c.e.a)}function w2(n){return Mbn(),qx(),0!=uG(n.a,86).d.e}function d2(n,t){F$(n.Cb,184)&&(uG(n.Cb,184).tb=null),qon(n,t)}function g2(n,t){F$(n.Cb,90)&&yLn(y9(uG(n.Cb,90)),4),qon(n,t)}function p2(n,t){Pgn(n,t),F$(n.Cb,90)&&yLn(y9(uG(n.Cb,90)),2)}function m2(n,t){null!=t.c&&pQ(n,new QW(t.c))}function v2(n){var t;return vj(),Urn(t=new ev,n),t}function k2(n){var t;return vj(),Urn(t=new ev,n),t}function y2(n){for(var t;;)if(t=n.Pb(),!n.Ob())return t}function M2(n,t,e){return kD(n.a,(TJ(),IMn(t,e),new FE(t,e))),n}function T2(n,t){return PP(),ein(t)?new Cq(t,n):new OA(t,n)}function j2(n){return cHn(),dwn(n,0)>=0?Rmn(n):hW(Rmn(Men(n)))}function E2(n){var t;return t=uG(tq(n.b),9),new nB(n.a,t,n.c)}function S2(n,t){var e;return(e=uG(Xwn(nZ(n.a),t),16))?e.gc():0}function P2(n,t,e){var i;hdn(t,e,n.c.length),i=e-t,nE(n.c,t,i)}function C2(n,t,e){hdn(t,e,n.gc()),this.c=n,this.a=t,this.b=e-t}function I2(n){this.c=new lS,this.b=n.b,this.d=n.c,this.a=n.a}function O2(n){this.a=e.Math.cos(n),this.b=e.Math.sin(n)}function A2(n,t,e,i){this.c=n,this.d=i,s2(this,t),h2(this,e)}function L2(n,t){Ey.call(this,new sS(orn(n))),man(t,XZn),this.a=t}function N2(n,t,e){return new AOn(n,(Rtn(),mut),null,!1,t,e)}function $2(n,t,e){return new AOn(n,(Rtn(),kut),t,e,null,!1)}function D2(){return ybn(),Uhn(cT(Rut,1),p1n,108,0,[Cut,Iut,Out])}function x2(){return Yen(),Uhn(cT(hht,1),p1n,471,0,[Fst,Kst,Rst])}function R2(){return Ktn(),Uhn(cT(xst,1),p1n,470,0,[Ast,Ost,Lst])}function K2(){return Yrn(),Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])}function F2(){return Jen(),Uhn(cT(Clt,1),p1n,391,0,[glt,dlt,plt])}function _2(){return gon(),Uhn(cT(Rdt,1),p1n,372,0,[Sdt,Edt,jdt])}function B2(){return jan(),Uhn(cT(agt,1),p1n,322,0,[Zdt,Ydt,ngt])}function H2(){return ran(),Uhn(cT(bgt,1),p1n,351,0,[igt,cgt,rgt])}function U2(){return Pfn(),Uhn(cT(Ogt,1),p1n,459,0,[kgt,vgt,ygt])}function G2(){return ihn(),Uhn(cT(mpt,1),p1n,298,0,[fpt,lpt,hpt])}function q2(){return Zen(),Uhn(cT(Mpt,1),p1n,311,0,[gpt,ppt,dpt])}function X2(){return Cwn(),Uhn(cT(pjt,1),p1n,390,0,[ujt,sjt,hjt])}function z2(){return can(),Uhn(cT(eEt,1),p1n,462,0,[Qjt,Vjt,Wjt])}function V2(){return isn(),Uhn(cT(oEt,1),p1n,387,0,[Zjt,nEt,tEt])}function W2(){return Sln(),Uhn(cT(lEt,1),p1n,349,0,[aEt,rEt,cEt])}function Q2(){return kbn(),Uhn(cT(pEt,1),p1n,350,0,[sEt,hEt,fEt])}function J2(){return ian(),Uhn(cT(MEt,1),p1n,352,0,[gEt,wEt,dEt])}function Y2(){return zhn(),Uhn(cT(xEt,1),p1n,388,0,[kEt,yEt,vEt])}function Z2(){return ean(),Uhn(cT(qEt,1),p1n,463,0,[_Et,BEt,HEt])}function n3(n){return Gfn(Uhn(cT(PNt,1),zZn,8,0,[n.i.n,n.n,n.a]))}function t3(){return Pln(),Uhn(cT(RCt,1),p1n,392,0,[gPt,dPt,wPt])}function e3(){e3=E,UCt=wz(new wJ,(Cjn(),WSt),(OHn(),ePt))}function i3(){i3=E,_Ct=new JI("DFS",0),FCt=new JI("BFS",1)}function r3(n,t,e){var i;(i=new ia).b=t,i.a=e,++t.b,kD(n.d,i)}function c3(n,t,e){var i;JF(i=new eN(e.d),n),jgn(t,i.a,i.b)}function a3(n,t){pD(n,pz(E3($z(t,24),W0n)),pz(E3(t,W0n)))}function o3(n,t){if(n<0||n>t)throw hv(new dM(h2n+n+f2n+t))}function u3(n,t){if(n<0||n>=t)throw hv(new dM(h2n+n+f2n+t))}function s3(n,t){if(n<0||n>=t)throw hv(new JM(h2n+n+f2n+t))}function h3(n,t){this.b=(tJ(n),n),this.a=0==(t&j0n)?64|t|VZn:t}function f3(n){return vgn(n),sZ(),sZ(),krn(n,Yot)}function l3(n,t,e){var i;return(i=uXn(n,t,!1)).b<=t&&i.a<=e}function b3(){return den(),Uhn(cT(LAt,1),p1n,439,0,[EAt,PAt,SAt])}function w3(){return Bgn(),Uhn(cT(kAt,1),p1n,394,0,[IOt,OOt,COt])}function d3(){return Jmn(),Uhn(cT(dOt,1),p1n,445,0,[oOt,uOt,sOt])}function g3(){return Zyn(),Uhn(cT(AOt,1),p1n,455,0,[lOt,wOt,bOt])}function p3(){return vbn(),Uhn(cT(nOt,1),p1n,393,0,[sIt,hIt,fIt])}function m3(){return esn(),Uhn(cT(hOt,1),p1n,299,0,[iOt,rOt,eOt])}function v3(){return Zrn(),Uhn(cT(lxt,1),p1n,278,0,[ixt,rxt,cxt])}function k3(){return Iwn(),Uhn(cT(mKt,1),p1n,280,0,[lKt,fKt,bKt])}function y3(){return Own(),Uhn(cT(Kxt,1),p1n,346,0,[Oxt,Ixt,Axt])}function M3(){return Rdn(),Uhn(cT(VAt,1),p1n,444,0,[HAt,UAt,GAt])}function T3(n){return WW(n),F$(n,16)?new Z_(uG(n,16)):rG(n.Kc())}function j3(n,t){return n&&n.equals?n.equals(t):xA(n)===xA(t)}function E3(n,t){return Esn(Oz(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function S3(n,t){return Esn(Az(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function P3(n,t){return Esn(Lz(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function C3(n,t){var e;return kK(!!(e=(tJ(n),n).g)),tJ(t),e(t)}function I3(n,t){var e,i;return i=KV(n,t),e=n.a.fd(i),new BE(n,e)}function O3(n){return n.Db>>16!=6?null:uG(J$n(n),241)}function A3(n){if(2!=n.p)throw hv(new xv);return pz(n.f)&D1n}function L3(n){if(2!=n.p)throw hv(new xv);return pz(n.k)&D1n}function N3(n){return MK(n.ai?1:0}function Y3(n,t){var e;return e=jen(t),uG(cQ(n.c,e),17).a}function Z3(n,t,e){var i;i=n.d[t.p],n.d[t.p]=n.d[e.p],n.d[e.p]=i}function n4(n,t,e){var i;n.n&&t&&e&&(i=new Yu,kD(n.e,i))}function t4(n,t){if(FV(n.a,t),t.d)throw hv(new Ky(p2n));t.d=n}function e4(n,t){this.a=new Zm,this.d=new Zm,this.f=n,this.c=t}function i4(){this.c=new z$,this.a=new p7,this.b=new yk,XS()}function r4(){Whn(),this.b=new Ym,this.a=new Ym,this.c=new Zm}function c4(n,t,e){this.d=n,this.j=t,this.e=e,this.o=-1,this.p=3}function a4(n,t,e){this.d=n,this.k=t,this.f=e,this.o=-1,this.p=5}function o4(n,t,e,i,r,c){Bcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function u4(n,t,e,i,r,c){Hcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function s4(n,t,e,i,r,c){E9.call(this,n,t,e,i,r),c&&(this.o=-2)}function h4(n,t,e,i,r,c){qcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function f4(n,t,e,i,r,c){S9.call(this,n,t,e,i,r),c&&(this.o=-2)}function l4(n,t,e,i,r,c){Ucn.call(this,n,t,e,i,r),c&&(this.o=-2)}function b4(n,t,e,i,r,c){Gcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function w4(n,t,e,i,r,c){P9.call(this,n,t,e,i,r),c&&(this.o=-2)}function d4(n,t,e,i){Hm.call(this,e),this.b=n,this.c=t,this.d=i}function g4(n,t){this.f=n,this.a=(N7(),MBt),this.c=MBt,this.b=t}function p4(n,t){this.g=n,this.d=(N7(),TBt),this.a=TBt,this.b=t}function m4(n,t){!n.c&&(n.c=new wsn(n,0)),BXn(n.c,(uVn(),nHt),t)}function v4(n,t){return lxn(n,t,F$(t,102)&&0!=(uG(t,19).Bb&P0n))}function k4(n,t){return rW(Bsn(n.q.getTime()),Bsn(t.q.getTime()))}function y4(n){return Dq(n.e.Rd().gc()*n.c.Rd().gc(),16,new zl(n))}function M4(n){return!(!n.u||0==z5(n.u.a).i||n.n&&yMn(n.n))}function T4(n){return!(!n.a||0==Aen(n.a.a).i||n.b&&MMn(n.b))}function j4(n,t){return 0==t?!!n.o&&0!=n.o.f:Wkn(n,t)}function E4(n,t,e){var i;return!!(i=uG(n.Zb().xc(t),16))&&i.Hc(e)}function S4(n,t,e){var i;return!!(i=uG(n.Zb().xc(t),16))&&i.Mc(e)}function P4(n,t){var e;return e=1-t,n.a[e]=Ton(n.a[e],e),Ton(n,t)}function C4(n,t){var e;return e=E3(n,L0n),S3(Nz(t,32),e)}function I4(n,t,e){WW(n),mjn(new q0(new Z_(n),t,e))}function O4(n,t,e){WW(n),vjn(new X0(new Z_(n),t,e))}function A4(n,t,e,i,r,c){return Dsn(n,t,e,c),gdn(n,i),vdn(n,r),n}function L4(n,t,e,i){return n.a+=""+r1(null==t?IZn:cpn(t),e,i),n}function N4(n,t){this.a=n,Jw.call(this,n),o3(t,n.gc()),this.b=t}function $4(n){this.a=Inn(dat,EZn,1,pfn(e.Math.max(8,n))<<1,5,1)}function D4(n){return uG(Ekn(n,Inn(pbt,e6n,10,n.c.length,0,1)),199)}function x4(n){return uG(Ekn(n,Inn(obt,t6n,18,n.c.length,0,1)),482)}function R4(n){return n.a?0==n.e.length?n.a.a:n.a.a+""+n.e:n.c}function K4(n){for(;n.d>0&&0==n.a[--n.d];);0==n.a[n.d++]&&(n.e=0)}function F4(n){return MK(n.b.b!=n.d.a),n.c=n.b=n.b.b,--n.a,n.c.c}function _4(n,t,e){n.a=t,n.c=e,n.b.a.$b(),BY(n.d),Xv(n.e.a.c,0)}function B4(n,t){var e;n.e=new dy,f$(e=GFn(t),n.c),T_n(n,e,0)}function H4(n,t,e,i){var r;(r=new gu).a=t,r.b=e,r.c=i,aq(n.a,r)}function U4(n,t,e,i){var r;(r=new gu).a=t,r.b=e,r.c=i,aq(n.b,r)}function G4(n,t,e){if(n<0||te)throw hv(new dM(QOn(n,t,e)))}function q4(n,t){if(n<0||n>=t)throw hv(new dM(TLn(n,t)));return n}function X4(n){if(!("stack"in n))try{throw n}catch(t){}return n}function z4(n){return JS(),F$(n.g,10)?uG(n.g,10):null}function V4(n){return!uY(n).dc()&&(h$(n,new w),!0)}function W4(n){var t;return _L(n)?-0==(t=n)?0:t:Gen(n)}function Q4(n,t){return!!F$(t,44)&&sTn(n.a,uG(t,44))}function J4(n,t){return!!F$(t,44)&&sTn(n.a,uG(t,44))}function Y4(n,t){return!!F$(t,44)&&sTn(n.a,uG(t,44))}function Z4(n){var t;return GQ(n),t=new D,tE(n.a,new vd(t)),t}function n6(){var n,t;return n=new ev,kD(gBt,t=n),t}function t6(n){var t;return GQ(n),t=new x,tE(n.a,new kd(t)),t}function e6(n,t){return n.a<=n.b&&(t.Dd(n.a++),!0)}function i6(n){dun.call(this,n,(Rtn(),put),null,!1,null,!1)}function r6(){r6=E,_ht=Abn((BS(),Uhn(cT(oft,1),p1n,488,0,[Kht])))}function c6(){c6=E,$Et=MJ(xwn(1),xwn(4)),NEt=MJ(xwn(1),xwn(2))}function a6(n,t){return new LU(t,HR(D$(t.e),n,n),(qx(),!0))}function o6(n){return new R7((man(n,v1n),arn(Lgn(Lgn(5,n),n/10|0))))}function u6(n){return Dq(n.e.Rd().gc()*n.c.Rd().gc(),273,new Xl(n))}function s6(n){return uG(Ekn(n,Inn(Abt,i6n,12,n.c.length,0,1)),2042)}function h6(n){return n2(),!(v9(n)||!v9(n)&&n.c.i.c==n.d.i.c)}function f6(n,t){return ncn(),uG(oIn(t,(QGn(),kCt)),17).a>=n.gc()}function l6(n,t){_Jn(t,n),NG(n.d),NG(uG(oIn(n,(jYn(),SMt)),214))}function b6(n,t){BJn(t,n),$G(n.d),$G(uG(oIn(n,(jYn(),SMt)),214))}function w6(n,t,e){n.d&&men(n.d.e,n),n.d=t,n.d&&GX(n.d.e,e,n)}function d6(n,t,e){return e.f.c.length>0?HV(n.a,t,e):HV(n.b,t,e)}function g6(n,t,e){var i;i=bkn();try{return SF(n,t,e)}finally{m8(i)}}function p6(n,t){var e,i;return i=null,(e=v0(n,t))&&(i=e.pe()),i}function m6(n,t){var e,i;return i=null,(e=v0(n,t))&&(i=e.se()),i}function v6(n,t){var e,i;return i=null,(e=uin(n,t))&&(i=e.se()),i}function k6(n,t){var e,i;return i=null,(e=v0(n,t))&&(i=uAn(e)),i}function y6(n,t,e){var i;return i=jvn(e),yHn(n.g,i,t),yHn(n.i,t,e),t}function M6(n,t,e){this.d=new qg(this),this.e=n,this.i=t,this.f=e}function T6(n,t,e,i){this.e=null,this.c=n,this.d=t,this.a=e,this.b=i}function j6(n,t,e,i){A$(this),this.c=n,this.e=t,this.f=e,this.b=i}function E6(n,t,e,i){this.d=n,this.n=t,this.g=e,this.o=i,this.p=-1}function S6(n,t,e,i){return F$(e,59)?new Yx(n,t,e,i):new qz(n,t,e,i)}function P6(n){return F$(n,16)?uG(n,16).dc():!n.Kc().Ob()}function C6(n){if(n.e.g!=n.b)throw hv(new Fv);return!!n.c&&n.d>0}function I6(n){return MK(n.b!=n.d.c),n.c=n.b,n.b=n.b.a,++n.a,n.c.c}function O6(n,t){tJ(t),uQ(n.a,n.c,t),n.c=n.c+1&n.a.length-1,JTn(n)}function A6(n,t){tJ(t),n.b=n.b-1&n.a.length-1,uQ(n.a,n.b,t),JTn(n)}function L6(n){var t;t=n.Gh(),this.a=F$(t,71)?uG(t,71).Ii():t.Kc()}function N6(n){return new h3(Vrn(uG(n.a.md(),16).gc(),n.a.ld()),16)}function $6(){$6=E,WAt=Abn((nP(),Uhn(cT(JAt,1),p1n,489,0,[zAt])))}function D6(){D6=E,YAt=Abn((tP(),Uhn(cT(tLt,1),p1n,558,0,[QAt])))}function x6(){x6=E,XLt=Abn((eP(),Uhn(cT(WLt,1),p1n,539,0,[GLt])))}function R6(){return Uvn(),Uhn(cT(abt,1),p1n,389,0,[tbt,Zlt,Ylt,nbt])}function K6(){return Rtn(),Uhn(cT(Tut,1),p1n,303,0,[put,mut,vut,kut])}function F6(){return vyn(),Uhn(cT(Sht,1),p1n,332,0,[yht,kht,Mht,Tht])}function _6(){return myn(),Uhn(cT(Fht,1),p1n,406,0,[Nht,Lht,$ht,Dht])}function B6(){return ehn(),Uhn(cT(jht,1),p1n,417,0,[pht,wht,dht,ght])}function H6(){return Xhn(),Uhn(cT(ebt,1),p1n,416,0,[Flt,Hlt,_lt,Blt])}function U6(){return qhn(),Uhn(cT(mdt,1),p1n,421,0,[odt,udt,sdt,hdt])}function G6(){return Ghn(),Uhn(cT(adt,1),p1n,371,0,[zwt,qwt,Xwt,Gwt])}function q6(){return Yyn(),Uhn(cT(jjt,1),p1n,203,0,[djt,gjt,wjt,bjt])}function X6(){return yvn(),Uhn(cT(Xjt,1),p1n,284,0,[Fjt,Kjt,_jt,Bjt])}function z6(n){return n.j==(KQn(),KRt)&&$x(_$n(n),kRt)}function V6(n,t){var e;c2(e=t.a,t.c.d),u2(e,t.d.d),Xun(e.a,n.n)}function W6(n,t){var e;return!(e=uG(ain(n.b,t),67))&&(e=new lS),e}function Q6(n){return JS(),F$(n.g,154)?uG(n.g,154):null}function J6(n){n.a=null,n.e=null,Xv(n.b.c,0),Xv(n.f.c,0),n.c=null}function Y6(){Y6=E,kpt=new sI(G2n,0),ypt=new sI("TOP_LEFT",1)}function Z6(){Z6=E,YEt=new SI("UPPER",0),JEt=new SI("LOWER",1)}function n5(n,t){return bD(new MO(t.e.a+t.f.a/2,t.e.b+t.f.b/2),n)}function t5(n,t){return uG(yx(Wz(uG(Y9(n.k,t),15).Oc(),Fdt)),113)}function e5(n,t){return uG(yx(Qz(uG(Y9(n.k,t),15).Oc(),Fdt)),113)}function i5(){return Cjn(),Uhn(cT(ZSt,1),p1n,405,0,[zSt,VSt,WSt,QSt])}function r5(){return mbn(),Uhn(cT(BCt,1),p1n,353,0,[xCt,$Ct,DCt,NCt])}function c5(){return dTn(),Uhn(cT(cOt,1),p1n,354,0,[ZIt,JIt,YIt,QIt])}function a5(){return Qmn(),Uhn(cT(sKt,1),p1n,386,0,[QRt,JRt,WRt,VRt])}function o5(){return Ajn(),Uhn(cT(Wxt,1),p1n,290,0,[Rxt,$xt,Dxt,xxt])}function u5(){return _gn(),Uhn(cT(kxt,1),p1n,223,0,[fxt,sxt,uxt,hxt])}function s5(){return qpn(),Uhn(cT(SKt,1),p1n,320,0,[TKt,kKt,MKt,yKt])}function h5(){return Eln(),Uhn(cT(DKt,1),p1n,415,0,[CKt,IKt,PKt,OKt])}function f5(n){return W0(),PV(LFt,n)?uG(cQ(LFt,n),341).Qg():null}function l5(n,t,e){return t<0?$Nn(n,e):uG(e,69).wk().Bk(n,n.hi(),t)}function b5(n,t,e){var i;return i=jvn(e),yHn(n.j,i,t),vJ(n.k,t,e),t}function w5(n,t,e){var i;return i=jvn(e),yHn(n.d,i,t),vJ(n.e,t,e),t}function d5(n){var t;return gj(),t=new es,n&&ARn(t,n),t}function g5(n){var t;return t=n.aj(n.i),n.i>0&&qGn(n.g,0,t,0,n.i),t}function p5(n,t){var e;for(e=n.j.c.length;e>24}function y5(n){if(1!=n.p)throw hv(new xv);return pz(n.k)<<24>>24}function M5(n){if(7!=n.p)throw hv(new xv);return pz(n.k)<<16>>16}function T5(n){if(7!=n.p)throw hv(new xv);return pz(n.f)<<16>>16}function j5(n,t){return 0==t.e||0==n.e?_ot:(b_n(),yKn(n,t))}function E5(n,t){return xA(t)===xA(n)?"(this Map)":null==t?IZn:cpn(t)}function S5(n,t,e){return Rz(pK(DA(FX(n.f,t))),pK(DA(FX(n.f,e))))}function P5(n,t,e){var i;i=uG(cQ(n.g,e),60),kD(n.a.c,new WO(t,i))}function C5(n,t,e){n.i=0,n.e=0,t!=e&&(eln(n,t,e),tln(n,t,e))}function I5(n,t,e,i,r){kD(t,uLn(r,Bxn(r,e,i))),LIn(n,r,t)}function O5(n,t,e,i,r){this.i=n,this.a=t,this.e=e,this.j=i,this.f=r}function A5(n,t){HZ.call(this),this.a=n,this.b=t,kD(this.a.b,this)}function L5(n){this.b=new Ym,this.c=new Ym,this.d=new Ym,this.a=n}function N5(n,t){var e;return e=new QM,n.Gd(e),e.a+="..",t.Hd(e),e.a}function $5(n,t){var e;for(e=t;e;)KR(n,e.i,e.j),e=R0(e);return n}function D5(n,t,e){var i;return i=jvn(e),vJ(n.b,i,t),vJ(n.c,t,e),t}function x5(n){var t;for(t=0;n.Ob();)n.Pb(),t=Lgn(t,1);return arn(t)}function R5(n,t){var e;return PP(),uOn(e=uG(n,69).vk(),t),e.xl(t)}function K5(n,t,e){if(e){var i=e.oe();n.a[t]=i(e)}else delete n.a[t]}function F5(n,t){var e;e=n.q.getHours(),n.q.setFullYear(t+V1n),Iqn(n,e)}function _5(n,t){return uG(null==t?DA(FX(n.f,null)):_P(n.i,t),288)}function B5(n,t){return n==(zIn(),dbt)&&t==dbt?4:n==dbt||t==dbt?8:32}function H5(n,t,e){return aqn(n,t,e,F$(t,102)&&0!=(uG(t,19).Bb&P0n))}function U5(n,t,e){return Dqn(n,t,e,F$(t,102)&&0!=(uG(t,19).Bb&P0n))}function G5(n,t,e){return Cxn(n,t,e,F$(t,102)&&0!=(uG(t,19).Bb&P0n))}function q5(n){n.b!=n.c&&(n.a=Inn(dat,EZn,1,8,5,1),n.b=0,n.c=0)}function X5(n){return MK(n.a=0&&n.a[e]===t[e];e--);return e<0}function g8(n){var t;return n?new aX(n):(Fon(t=new XL,n),t)}function p8(n,t){var e,i;i=!1;do{i|=e=Tfn(n,t)}while(e);return i}function m8(n){n&&Cin((Gy(),Fat)),--Uat,n&&-1!=qat&&(jL(qat),qat=-1)}function v8(n){aCn(),pD(this,pz(E3($z(n,24),W0n)),pz(E3(n,W0n)))}function k8(){k8=E,Jut=Abn((_kn(),Uhn(cT(nst,1),p1n,436,0,[Wut,Vut])))}function y8(){y8=E,tst=Abn((Xin(),Uhn(cT(mst,1),p1n,435,0,[Yut,Zut])))}function M8(){M8=E,vft=Abn((zin(),Uhn(cT(mlt,1),p1n,432,0,[gft,pft])))}function T8(){T8=E,Lbt=Abn((Aun(),Uhn(cT(Dbt,1),p1n,517,0,[Obt,Ibt])))}function j8(){j8=E,Dgt=Abn((Wtn(),Uhn(cT(Hgt,1),p1n,487,0,[Ngt,Lgt])))}function E8(){E8=E,mgt=Abn((Vin(),Uhn(cT(Mgt,1),p1n,428,0,[dgt,ggt])))}function S8(){S8=E,Jdt=Abn((H7(),Uhn(cT(tgt,1),p1n,431,0,[Vdt,Wdt])))}function P8(){P8=E,zjt=Abn((nin(),Uhn(cT(Jjt,1),p1n,430,0,[Gjt,qjt])))}function C8(){C8=E,nSt=Abn((Z6(),Uhn(cT(cSt,1),p1n,531,0,[YEt,JEt])))}function I8(){I8=E,bSt=Abn((b0(),Uhn(cT(gSt,1),p1n,523,0,[fSt,hSt])))}function O8(){O8=E,pSt=Abn((w0(),Uhn(cT(xSt,1),p1n,522,0,[wSt,dSt])))}function A8(){A8=E,RSt=Abn((_7(),Uhn(cT(qSt,1),p1n,528,0,[DSt,$St])))}function L8(){L8=E,Tpt=Abn((Y6(),Uhn(cT(Nmt,1),p1n,429,0,[kpt,ypt])))}function N8(){N8=E,XSt=Abn((l0(),Uhn(cT(JSt,1),p1n,464,0,[USt,GSt])))}function $8(){$8=E,uIt=Abn((Ptn(),Uhn(cT(lIt,1),p1n,434,0,[cIt,aIt])))}function D8(){D8=E,HCt=Abn((i3(),Uhn(cT(QCt,1),p1n,433,0,[_Ct,FCt])))}function x8(){x8=E,JCt=Abn((pon(),Uhn(cT(iIt,1),p1n,500,0,[VCt,WCt])))}function R8(){R8=E,jAt=Abn((a9(),Uhn(cT(CAt,1),p1n,490,0,[yAt,MAt])))}function K8(){K8=E,NAt=Abn((rhn(),Uhn(cT($At,1),p1n,491,0,[OAt,AAt])))}function F8(){F8=E,eLt=Abn((B7(),Uhn(cT(uLt,1),p1n,438,0,[nLt,ZAt])))}function _8(){_8=E,QLt=Abn((Vhn(),Uhn(cT(JLt,1),p1n,437,0,[VLt,zLt])))}function B8(){B8=E,vKt=Abn((CU(),Uhn(cT(jKt,1),p1n,347,0,[gKt,pKt])))}function H8(){return xdn(),Uhn(cT(axt,1),p1n,88,0,[ZDt,YDt,JDt,QDt,nxt])}function U8(){return KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])}function G8(n,t,e){return uG(null==t?VAn(n.f,null,e):kgn(n.i,t,e),288)}function q8(n){return(n.k==(zIn(),dbt)||n.k==lbt)&&vR(n,(GYn(),$pt))}function X8(n){return n.c&&n.d?z3(n.c)+"->"+z3(n.d):"e_"+xx(n)}function z8(n,t){var e,i;for(tJ(t),i=n.Kc();i.Ob();)e=i.Pb(),t.Cd(e)}function V8(n,t){var e;vZ(e=new _y,"x",t.a),vZ(e,"y",t.b),pQ(n,e)}function W8(n,t){var e;vZ(e=new _y,"x",t.a),vZ(e,"y",t.b),pQ(n,e)}function Q8(n,t){var e;for(e=t;e;)KR(n,-e.i,-e.j),e=R0(e);return n}function J8(n,t){var e,i;for(e=t,i=0;e>0;)i+=n.a[e],e-=e&-e;return i}function Y8(n,t,e){var i;return u3(t,n.c.length),i=n.c[t],n.c[t]=e,i}function Z8(n,t,e){n.a.c.length=0,sVn(n,t,e),0==n.a.c.length||mUn(n,t)}function n9(n){n.i=0,FP(n.b,null),FP(n.c,null),n.a=null,n.e=null,++n.g}function t9(){t9=E,Nut=!0,Aut=!1,Lut=!1,Dut=!1,$ut=!1}function e9(n){t9(),Nut||(this.c=n,this.e=!0,this.a=new Zm)}function i9(n,t){this.c=0,this.b=t,iL.call(this,n,17493),this.a=this.c}function r9(n){NYn(),dv(this),this.a=new lS,Lln(this,n),aq(this.a,n)}function c9(){IN(this),this.b=new MO(M0n,M0n),this.a=new MO(T0n,T0n)}function a9(){a9=E,yAt=new oO(x6n,0),MAt=new oO("TARGET_WIDTH",1)}function o9(n,t){return(vgn(n),Qj(new fX(n,new ien(t,n.a)))).Bd(Kut)}function u9(){return uIn(),Uhn(cT(Llt,1),p1n,367,0,[Tlt,jlt,Elt,Slt,Plt])}function s9(){return gPn(),Uhn(cT(Pdt,1),p1n,375,0,[wdt,gdt,pdt,ddt,bdt])}function h9(){return kvn(),Uhn(cT(pgt,1),p1n,348,0,[sgt,ugt,fgt,lgt,hgt])}function f9(){return pyn(),Uhn(cT(xjt,1),p1n,323,0,[Tjt,kjt,yjt,vjt,Mjt])}function l9(){return Gpn(),Uhn(cT(ajt,1),p1n,171,0,[Lmt,Cmt,Imt,Omt,Amt])}function b9(){return zPn(),Uhn(cT(oIt,1),p1n,368,0,[tIt,YCt,eIt,ZCt,nIt])}function w9(){return _Rn(),Uhn(cT(qAt,1),p1n,373,0,[xAt,DAt,KAt,RAt,FAt])}function d9(){return pOn(),Uhn(cT(qLt,1),p1n,324,0,[iLt,rLt,oLt,cLt,aLt])}function g9(){return Rkn(),Uhn(cT(MNt,1),p1n,170,0,[hNt,sNt,oNt,fNt,uNt])}function p9(){return Vkn(),Uhn(cT(hRt,1),p1n,256,0,[Zxt,tRt,Jxt,Yxt,nRt])}function m9(n){return XM(),function(){return g6(n,this,arguments)}}function v9(n){return!(!n.c||!n.d||!n.c.i||n.c.i!=n.d.i)}function k9(n,t){return!!F$(t,143)&&m_(n.c,uG(t,143).c)}function y9(n){return n.t||(n.t=new $m(n),$dn(new Qy(n),0,n.t)),n.t}function M9(n){this.b=n,DD.call(this,n),this.a=uG(Lsn(this.b.a,4),129)}function T9(n){this.b=n,nR.call(this,n),this.a=uG(Lsn(this.b.a,4),129)}function j9(n,t,e,i,r){b7.call(this,t,i,r),Kf(this),this.c=n,this.b=e}function E9(n,t,e,i,r){c4.call(this,t,i,r),Kf(this),this.c=n,this.a=e}function S9(n,t,e,i,r){a4.call(this,t,i,r),Kf(this),this.c=n,this.a=e}function P9(n,t,e,i,r){b7.call(this,t,i,r),Kf(this),this.c=n,this.a=e}function C9(n,t){return uG(ain(n.d,t),23)||uG(ain(n.e,t),23)}function I9(n,t){var e,i;return e=t.ld(),!!(i=n.Fe(e))&&OJ(i.e,t.md())}function O9(n,t){var e;return new FE(e=t.ld(),n.e.pc(e,uG(t.md(),16)))}function A9(n,t){var e;return null==(e=n.a.get(t))?Inn(dat,EZn,1,0,5,1):e}function L9(n){var t;return t=n.length,m_(S0n.substr(S0n.length-t,t),n)}function N9(n){if(hDn(n))return n.c=n.a,n.a.Pb();throw hv(new Bv)}function $9(n,t){return 0==t||0==n.e?n:t>0?MFn(n,t):rvn(n,-t)}function D9(n,t){return 0==t||0==n.e?n:t>0?rvn(n,t):MFn(n,-t)}function x9(n){xP.call(this,null==n?IZn:cpn(n),F$(n,82)?uG(n,82):null)}function R9(n){var t;return n.c||F$(t=n.r,90)&&(n.c=uG(t,29)),n.c}function K9(n){var t;return zsn(t=new UZ,n),kfn(t,(jYn(),bMt),null),t}function F9(n){var t,e;return t=n.c.i,e=n.d.i,t.k==(zIn(),lbt)&&e.k==lbt}function _9(n){return p$(n&f0n,n>>22&f0n,n<0?l0n:0)}function B9(n){var t,e,i;for(e=0,i=(t=n).length;e=0?n.Lh(i,e,!0):YNn(n,t,e)}function G9(n,t,e){return ugn(bD($kn(n),D$(t.b)),bD($kn(n),D$(e.b)))}function q9(n,t,e){return ugn(bD($kn(n),D$(t.e)),bD($kn(n),D$(e.e)))}function X9(n,t){return e.Math.min(atn(t.a,n.d.d.c),atn(t.b,n.d.d.c))}function z9(n,t){n._i(n.i+1),yD(n,n.i,n.Zi(n.i,t)),n.Mi(n.i++,t),n.Ni()}function V9(n){var t,e;++n.j,t=n.g,e=n.i,n.g=null,n.i=0,n.Oi(e,t),n.Ni()}function W9(n,t,e){var i;xun(i=new U$(n.a),n.a.a),VAn(i.f,t,e),n.a.a=i}function Q9(n,t,e,i){var r;for(r=0;r<$st;r++)qX(n.a[r][t.g],e,i[t.g])}function J9(n,t,e,i){var r;for(r=0;rt)throw hv(new dM(iLn(n,t,"index")));return n}function i7(n,t){var e;return u3(t,n.c.length),e=n.c[t],nE(n.c,t,1),e}function r7(n,t){var e,i;return tJ(n),e=n,tJ(t),e==(i=t)?0:et.p?-1:0}function E7(n){var t;return n.a||F$(t=n.r,156)&&(n.a=uG(t,156)),n.a}function S7(n,t,e){return++n.e,--n.f,uG(n.d[t].gd(e),136).md()}function P7(n){var t;return t=n.ld(),JU(uG(n.md(),16).Nc(),new Wl(t))}function C7(n,t){return!!PV(n.a,t)&&(u7(n.a,t),!0)}function I7(n,t,e){return q4(t,n.e.Rd().gc()),q4(e,n.c.Rd().gc()),n.a[t][e]}function O7(n,t,e){this.a=n,this.b=t,this.c=e,kD(n.t,this),kD(t.i,this)}function A7(n,t,e,i){this.f=n,this.e=t,this.d=e,this.b=i,this.c=i?i.d:null}function L7(){this.b=new lS,this.a=new lS,this.b=new lS,this.a=new lS}function N7(){var n,t;N7=E,vj(),t=new Gv,MBt=t,n=new Wk,TBt=n}function $7(n){return vgn(n),new IK(n,new lG(n,n.a.e,4|n.a.d))}function D7(n){var t;for(GQ(n),t=0;n.a.Bd(new hn);)t=Lgn(t,1);return t}function x7(n,t){return tJ(t),n.c=0,"Initial capacity must not be negative")}function K7(){K7=E,jNt=new Cm("org.eclipse.elk.labels.labelManager")}function F7(){F7=E,Uwt=new uF("separateLayerConnections",(Ghn(),zwt))}function _7(){_7=E,DSt=new qI("REGULAR",0),$St=new qI("CRITICAL",1)}function B7(){B7=E,nLt=new lO("FIXED",0),ZAt=new lO("CENTER_NODE",1)}function H7(){H7=E,Vdt=new WC("QUADRATIC",0),Wdt=new WC("SCANLINE",1)}function U7(){U7=E,egt=Abn((jan(),Uhn(cT(agt,1),p1n,322,0,[Zdt,Ydt,ngt])))}function G7(){G7=E,ogt=Abn((ran(),Uhn(cT(bgt,1),p1n,351,0,[igt,cgt,rgt])))}function q7(){q7=E,Tgt=Abn((Pfn(),Uhn(cT(Ogt,1),p1n,459,0,[kgt,vgt,ygt])))}function X7(){X7=E,Cdt=Abn((gon(),Uhn(cT(Rdt,1),p1n,372,0,[Sdt,Edt,jdt])))}function z7(){z7=E,vpt=Abn((Zen(),Uhn(cT(Mpt,1),p1n,311,0,[gpt,ppt,dpt])))}function V7(){V7=E,wpt=Abn((ihn(),Uhn(cT(mpt,1),p1n,298,0,[fpt,lpt,hpt])))}function W7(){W7=E,ljt=Abn((Cwn(),Uhn(cT(pjt,1),p1n,390,0,[ujt,sjt,hjt])))}function Q7(){Q7=E,iEt=Abn((isn(),Uhn(cT(oEt,1),p1n,387,0,[Zjt,nEt,tEt])))}function J7(){J7=E,uEt=Abn((Sln(),Uhn(cT(lEt,1),p1n,349,0,[aEt,rEt,cEt])))}function Y7(){Y7=E,Yjt=Abn((can(),Uhn(cT(eEt,1),p1n,462,0,[Qjt,Vjt,Wjt])))}function Z7(){Z7=E,mEt=Abn((ian(),Uhn(cT(MEt,1),p1n,352,0,[gEt,wEt,dEt])))}function nnn(){nnn=E,bEt=Abn((kbn(),Uhn(cT(pEt,1),p1n,350,0,[sEt,hEt,fEt])))}function tnn(){tnn=E,TEt=Abn((zhn(),Uhn(cT(xEt,1),p1n,388,0,[kEt,yEt,vEt])))}function enn(){enn=E,mPt=Abn((Pln(),Uhn(cT(RCt,1),p1n,392,0,[gPt,dPt,wPt])))}function inn(){inn=E,bIt=Abn((vbn(),Uhn(cT(nOt,1),p1n,393,0,[sIt,hIt,fIt])))}function rnn(){rnn=E,aOt=Abn((esn(),Uhn(cT(hOt,1),p1n,299,0,[iOt,rOt,eOt])))}function cnn(){cnn=E,fOt=Abn((Jmn(),Uhn(cT(dOt,1),p1n,445,0,[oOt,uOt,sOt])))}function ann(){ann=E,gOt=Abn((Zyn(),Uhn(cT(AOt,1),p1n,455,0,[lOt,wOt,bOt])))}function onn(){onn=E,LOt=Abn((Bgn(),Uhn(cT(kAt,1),p1n,394,0,[IOt,OOt,COt])))}function unn(){unn=E,IAt=Abn((den(),Uhn(cT(LAt,1),p1n,439,0,[EAt,PAt,SAt])))}function snn(){snn=E,GEt=Abn((ean(),Uhn(cT(qEt,1),p1n,463,0,[_Et,BEt,HEt])))}function hnn(){hnn=E,Dst=Abn((Ktn(),Uhn(cT(xst,1),p1n,470,0,[Ast,Ost,Lst])))}function fnn(){fnn=E,Cst=Abn((Yrn(),Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])))}function lnn(){lnn=E,Bst=Abn((Yen(),Uhn(cT(hht,1),p1n,471,0,[Fst,Kst,Rst])))}function bnn(){bnn=E,xut=Abn((ybn(),Uhn(cT(Rut,1),p1n,108,0,[Cut,Iut,Out])))}function wnn(){wnn=E,vlt=Abn((Jen(),Uhn(cT(Clt,1),p1n,391,0,[glt,dlt,plt])))}function dnn(){dnn=E,Nxt=Abn((Own(),Uhn(cT(Kxt,1),p1n,346,0,[Oxt,Ixt,Axt])))}function gnn(){gnn=E,XAt=Abn((Rdn(),Uhn(cT(VAt,1),p1n,444,0,[HAt,UAt,GAt])))}function pnn(){pnn=E,oxt=Abn((Zrn(),Uhn(cT(lxt,1),p1n,278,0,[ixt,rxt,cxt])))}function mnn(){mnn=E,dKt=Abn((Iwn(),Uhn(cT(mKt,1),p1n,280,0,[lKt,fKt,bKt])))}function vnn(n,t){return!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),ymn(n.o,t)}function knn(n,t){var e;n.C&&((e=uG(AJ(n.b,t),127).n).d=n.C.d,e.a=n.C.a)}function ynn(n){var t,e,i,r;r=n.d,t=n.a,e=n.b,i=n.c,n.d=e,n.a=i,n.b=r,n.c=t}function Mnn(n){return!n.g&&(n.g=new ds),!n.g.b&&(n.g.b=new Om(n)),n.g.b}function Tnn(n){return!n.g&&(n.g=new ds),!n.g.c&&(n.g.c=new Nm(n)),n.g.c}function jnn(n){return!n.g&&(n.g=new ds),!n.g.d&&(n.g.d=new Am(n)),n.g.d}function Enn(n){return!n.g&&(n.g=new ds),!n.g.a&&(n.g.a=new Lm(n)),n.g.a}function Snn(n,t,e,i){return e&&(i=e.Rh(t,emn(e.Dh(),n.c.uk()),null,i)),i}function Pnn(n,t,e,i){return e&&(i=e.Th(t,emn(e.Dh(),n.c.uk()),null,i)),i}function Cnn(n,t,e,i){var r;return KGn(r=Inn(YHt,W1n,28,t+1,15,1),n,t,e,i),r}function Inn(n,t,e,i,r,c){var a;return a=PTn(r,i),10!=r&&Uhn(cT(n,c),t,e,r,a),a}function Onn(n,t,e){var i,r;for(r=new Zsn(t,n),i=0;ie||t=0?n.Lh(e,!0,!0):YNn(n,t,!0)}function ktn(n,t,e){var i;return i=Ufn(n,t,e),n.b=new Don(i.c.length),ZFn(n,i)}function ytn(n){if(n.b<=0)throw hv(new Bv);return--n.b,n.a-=n.c.c,xwn(n.a)}function Mtn(n){var t;if(!n.a)throw hv(new EY);return t=n.a,n.a=R0(n.a),t}function Ttn(n){for(;!n.a;)if(!y_(n.c,new yd(n)))return!1;return!0}function jtn(n){return WW(n),F$(n,204)?uG(n,204):new sb(n)}function Etn(n){Stn(),uG(n.of((XYn(),bDt)),181).Fc((eNn(),dRt)),n.qf(lDt,null)}function Stn(){Stn=E,tNt=new hu,iNt=new fu,eNt=Rln((XYn(),lDt),tNt,q$t,iNt)}function Ptn(){Ptn=E,cIt=new nO("LEAF_NUMBER",0),aIt=new nO("NODE_SIZE",1)}function Ctn(n){n.a=Inn(YHt,W1n,28,n.b+1,15,1),n.c=Inn(YHt,W1n,28,n.b,15,1),n.d=0}function Itn(n,t){n.a.Ne(t.d,n.b)>0&&(kD(n.c,new wG(t.c,t.d,n.d)),n.b=t.d)}function Otn(n,t){if(null==n.g||t>=n.i)throw hv(new pL(t,n.i));return n.g[t]}function Atn(n,t,e){if(gln(n,e),null!=e&&!n.fk(e))throw hv(new Nv);return e}function Ltn(n,t){return 10!=Min(t)&&Uhn(Tbn(t),t.Sm,t.__elementTypeId$,Min(t),n),n}function Ntn(n,t,e,i){sZ(),i=i||Jot,rLn(n.slice(t,e),n,t,e,-t,i)}function $tn(n,t,e,i,r){return t<0?YNn(n,e,i):uG(e,69).wk().yk(n,n.hi(),t,i,r)}function Dtn(n,t){return ugn(uM(pK(oIn(n,(GYn(),bmt)))),uM(pK(oIn(t,bmt))))}function xtn(){xtn=E,Mut=Abn((Rtn(),Uhn(cT(Tut,1),p1n,303,0,[put,mut,vut,kut])))}function Rtn(){Rtn=E,put=new qP("All",0),mut=new SN,vut=new P$,kut=new EN}function Ktn(){Ktn=E,Ast=new aC(z2n,0),Ost=new aC(G2n,1),Lst=new aC(V2n,2)}function Ftn(){Ftn=E,tXn(),sHt=M0n,uHt=T0n,fHt=new Rw(M0n),hHt=new Rw(T0n)}function _tn(){_tn=E,vht=Abn((ehn(),Uhn(cT(jht,1),p1n,417,0,[pht,wht,dht,ght])))}function Btn(){Btn=E,Rht=Abn((myn(),Uhn(cT(Fht,1),p1n,406,0,[Nht,Lht,$ht,Dht])))}function Htn(){Htn=E,Eht=Abn((vyn(),Uhn(cT(Sht,1),p1n,332,0,[yht,kht,Mht,Tht])))}function Utn(){Utn=E,ibt=Abn((Uvn(),Uhn(cT(abt,1),p1n,389,0,[tbt,Zlt,Ylt,nbt])))}function Gtn(){Gtn=E,Glt=Abn((Xhn(),Uhn(cT(ebt,1),p1n,416,0,[Flt,Hlt,_lt,Blt])))}function qtn(){qtn=E,ldt=Abn((qhn(),Uhn(cT(mdt,1),p1n,421,0,[odt,udt,sdt,hdt])))}function Xtn(){Xtn=E,Wwt=Abn((Ghn(),Uhn(cT(adt,1),p1n,371,0,[zwt,qwt,Xwt,Gwt])))}function ztn(){ztn=E,mjt=Abn((Yyn(),Uhn(cT(jjt,1),p1n,203,0,[djt,gjt,wjt,bjt])))}function Vtn(){Vtn=E,Ujt=Abn((yvn(),Uhn(cT(Xjt,1),p1n,284,0,[Fjt,Kjt,_jt,Bjt])))}function Wtn(){Wtn=E,Ngt=new iI(q4n,0),Lgt=new iI("IMPROVE_STRAIGHTNESS",1)}function Qtn(n,t){var e,i;return i=t/n.c.Rd().gc()|0,e=t%n.c.Rd().gc(),I7(n,i,e)}function Jtn(n){var t;if(n.nl())for(t=n.i-1;t>=0;--t)zrn(n,t);return g5(n)}function Ytn(n){var t,e;if(!n.b)return null;for(e=n.b;t=e.a[0];)e=t;return e}function Ztn(n){var t,e;if(!n.b)return null;for(e=n.b;t=e.a[1];)e=t;return e}function nen(n){return F$(n,180)?""+uG(n,180).a:null==n?null:cpn(n)}function ten(n){return F$(n,180)?""+uG(n,180).a:null==n?null:cpn(n)}function een(n,t){if(t.a)throw hv(new Ky(p2n));FV(n.a,t),t.a=n,!n.j&&(n.j=t)}function ien(n,t){rL.call(this,t.zd(),-16449&t.yd()),tJ(n),this.a=n,this.c=t}function ren(n,t){return new LU(t,KR(D$(t.e),t.f.a+n,t.f.b+n),(qx(),!1))}function cen(n,t){return PU(),kD(n,new WO(t,xwn(t.e.c.length+t.g.c.length)))}function aen(n,t){return PU(),kD(n,new WO(t,xwn(t.e.c.length+t.g.c.length)))}function oen(){oen=E,tOt=Abn((dTn(),Uhn(cT(cOt,1),p1n,354,0,[ZIt,JIt,YIt,QIt])))}function uen(){uen=E,KCt=Abn((mbn(),Uhn(cT(BCt,1),p1n,353,0,[xCt,$Ct,DCt,NCt])))}function sen(){sen=E,YSt=Abn((Cjn(),Uhn(cT(ZSt,1),p1n,405,0,[zSt,VSt,WSt,QSt])))}function hen(){hen=E,bxt=Abn((_gn(),Uhn(cT(kxt,1),p1n,223,0,[fxt,sxt,uxt,hxt])))}function fen(){fen=E,Fxt=Abn((Ajn(),Uhn(cT(Wxt,1),p1n,290,0,[Rxt,$xt,Dxt,xxt])))}function len(){len=E,ZRt=Abn((Qmn(),Uhn(cT(sKt,1),p1n,386,0,[QRt,JRt,WRt,VRt])))}function ben(){ben=E,EKt=Abn((qpn(),Uhn(cT(SKt,1),p1n,320,0,[TKt,kKt,MKt,yKt])))}function wen(){wen=E,LKt=Abn((Eln(),Uhn(cT(DKt,1),p1n,415,0,[CKt,IKt,PKt,OKt])))}function den(){den=E,EAt=new uO(g7n,0),PAt=new uO(k9n,1),SAt=new uO(q4n,2)}function gen(n,t,e,i,r){return tJ(n),tJ(t),tJ(e),tJ(i),tJ(r),new WV(n,t,i)}function pen(n,t){var e;return(e=uG(u7(n.e,t),400))?(cq(e),e.e):null}function men(n,t){var e;return-1!=(e=Ten(n,t,0))&&(i7(n,e),!0)}function ven(n,t,e){var i;return GQ(n),(i=new un).a=t,n.a.Nb(new nC(i,e)),i.a}function ken(n){var t;return GQ(n),t=Inn(eUt,I0n,28,0,15,1),tE(n.a,new md(t)),t}function yen(n){var t;if(!oon(n))throw hv(new Bv);return n.e=1,t=n.d,n.d=null,t}function Men(n){var t;return _L(n)&&(t=0-n,!isNaN(t))?t:Esn(gfn(n))}function Ten(n,t,e){for(;e=0?Dyn(n,e,!0,!0):YNn(n,t,!0)}function Ven(n){var t;return null==(t=Kcn(Lsn(n,32)))&&($vn(n),t=Kcn(Lsn(n,32))),t}function Wen(n){var t;return n.Oh()||(t=iQ(n.Dh())-n.ji(),n.$h().Mk(t)),n.zh()}function Qen(n,t){Iht=new et,xht=t,uG((Cht=n).b,68),Rnn(Cht,Iht,null),Szn(Cht)}function Jen(){Jen=E,glt=new dC("XY",0),dlt=new dC("X",1),plt=new dC("Y",2)}function Yen(){Yen=E,Fst=new oC("TOP",0),Kst=new oC(G2n,1),Rst=new oC(Q2n,2)}function Zen(){Zen=E,gpt=new uI(q4n,0),ppt=new uI("TOP",1),dpt=new uI(Q2n,2)}function nin(){nin=E,Gjt=new pI("INPUT_ORDER",0),qjt=new pI("PORT_DEGREE",1)}function tin(){tin=E,Jat=p$(f0n,f0n,524287),Yat=p$(0,0,b0n),Zat=_9(1),_9(2),not=_9(0)}function ein(n){var t;return n.d!=n.r&&(t=bEn(n),n.e=!!t&&t.lk()==srt,n.d=t),n.e}function iin(n,t,e){var i;return i=n.g[t],yD(n,t,n.Zi(t,e)),n.Ri(t,e,i),n.Ni(),i}function rin(n,t){var e;return(e=n.dd(t))>=0&&(n.gd(e),!0)}function cin(n,t){var e;for(WW(n),WW(t),e=!1;t.Ob();)e|=n.Fc(t.Pb());return e}function ain(n,t){var e;return(e=uG(cQ(n.e,t),400))?(nD(n,e),e.e):null}function oin(n){var t,e;return t=n/60|0,0==(e=n%60)?""+t:t+":"+e}function uin(n,t){var e=n.a[t],i=(Cfn(),Wat)[typeof e];return i?i(e):Vbn(typeof e)}function sin(n,t){return vgn(n),new fX(n,new D_(new f7(t,n.a)))}function hin(n){var t;return null!=(t=0==n.b.c.length?null:zq(n.b,0))&&Con(n,0),t}function fin(n,t){var e,i,r;r=t.c.i,i=(e=uG(cQ(n.f,r),60)).d.c-e.e.c,fun(t.a,i,0)}function lin(n,t){var e;for(++n.d,++n.c[t],e=t+1;e=0;)++t[0]}function din(n,t){ycn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function gin(n,t){Mcn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function pin(n,t){kcn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function min(n,t){vcn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function vin(n,t,e){return bD(new MO(e.e.a+e.f.a/2,e.e.b+e.f.b/2),n)==(tJ(t),t)}function kin(n,t){return F$(t,102)&&0!=(uG(t,19).Bb&P0n)?new yL(t,n):new Zsn(t,n)}function yin(n,t){return F$(t,102)&&0!=(uG(t,19).Bb&P0n)?new yL(t,n):new Zsn(t,n)}function Min(n){return null==n.__elementTypeCategory$?10:n.__elementTypeCategory$}function Tin(n,t){return t==(cB(),cB(),uut)?n.toLocaleLowerCase():n.toLowerCase()}function jin(n){if(!n.e)throw hv(new Bv);return n.c=n.a=n.e,n.e=n.e.e,--n.d,n.a.f}function Ein(n){if(!n.c)throw hv(new Bv);return n.e=n.a=n.c,n.c=n.c.c,++n.d,n.a.f}function Sin(n){var t;for(++n.a,t=n.c.a.length;n.an.a[i]&&(i=e);return i}function Lin(n){var t;return!!(t=uG(oIn(n,(GYn(),Spt)),313))&&t.a==n}function Nin(n){var t;return!!(t=uG(oIn(n,(GYn(),Spt)),313))&&t.i==n}function $in(){$in=E,Ilt=Abn((uIn(),Uhn(cT(Llt,1),p1n,367,0,[Tlt,jlt,Elt,Slt,Plt])))}function Din(){Din=E,vdt=Abn((gPn(),Uhn(cT(Pdt,1),p1n,375,0,[wdt,gdt,pdt,ddt,bdt])))}function xin(){xin=E,wgt=Abn((kvn(),Uhn(cT(pgt,1),p1n,348,0,[sgt,ugt,fgt,lgt,hgt])))}function Rin(){Rin=E,Ejt=Abn((pyn(),Uhn(cT(xjt,1),p1n,323,0,[Tjt,kjt,yjt,vjt,Mjt])))}function Kin(){Kin=E,$mt=Abn((Gpn(),Uhn(cT(ajt,1),p1n,171,0,[Lmt,Cmt,Imt,Omt,Amt])))}function Fin(){Fin=E,rIt=Abn((zPn(),Uhn(cT(oIt,1),p1n,368,0,[tIt,YCt,eIt,ZCt,nIt])))}function _in(){_in=E,BAt=Abn((_Rn(),Uhn(cT(qAt,1),p1n,373,0,[xAt,DAt,KAt,RAt,FAt])))}function Bin(){Bin=E,sLt=Abn((pOn(),Uhn(cT(qLt,1),p1n,324,0,[iLt,rLt,oLt,cLt,aLt])))}function Hin(){Hin=E,ext=Abn((xdn(),Uhn(cT(axt,1),p1n,88,0,[ZDt,YDt,JDt,QDt,nxt])))}function Uin(){Uin=E,bNt=Abn((Rkn(),Uhn(cT(MNt,1),p1n,170,0,[hNt,sNt,oNt,fNt,uNt])))}function Gin(){Gin=E,iRt=Abn((Vkn(),Uhn(cT(hRt,1),p1n,256,0,[Zxt,tRt,Jxt,Yxt,nRt])))}function qin(){qin=E,HRt=Abn((KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])))}function Xin(){Xin=E,Yut=new iC("BY_SIZE",0),Zut=new iC("BY_SIZE_AND_SHAPE",1)}function zin(){zin=E,gft=new wC("EADES",0),pft=new wC("FRUCHTERMAN_REINGOLD",1)}function Vin(){Vin=E,dgt=new nI("READING_DIRECTION",0),ggt=new nI("ROTATION",1)}function Win(){Win=E,zlt=new Pt,Vlt=new At,qlt=new Lt,Xlt=new Ot,Wlt=new Nt}function Qin(n){this.b=new Zm,this.a=new Zm,this.c=new Zm,this.d=new Zm,this.e=n}function Jin(n){this.g=n,this.f=new Zm,this.a=e.Math.min(this.g.c.c,this.g.d.c)}function Yin(n,t,e){HF.call(this),Qrn(this),this.a=n,this.c=e,this.b=t.d,this.f=t.e}function Zin(n,t,e){var i;for(i=new Ww(e);i.a=0&&t0?t-1:t,lj(bj(xcn(xG(new fy,e),n.n),n.j),n.k)}function rrn(n){var t;t=new Yk,ttn((!n.q&&(n.q=new fV(p_t,n,11,10)),n.q),t)}function crn(n){return(0!=(2&n.i)?"interface ":0!=(1&n.i)?"":"class ")+(vK(n),n.o)}function arn(n){return dwn(n,vZn)>0?vZn:dwn(n,j1n)<0?j1n:pz(n)}function orn(n){return n<3?(man(n,b1n),n+1):n=-.01&&n.a<=Z2n&&(n.a=0),n.b>=-.01&&n.b<=Z2n&&(n.b=0),n}function Trn(n){var t,e;for(l_n(),e=G9n,t=0;te&&(e=n[t]);return e}function jrn(n,t){var e;if(!(e=EKn(n.Dh(),t)))throw hv(new vM(Gtt+t+ztt));return e}function Ern(n,t){var e;for(e=n;R0(e);)if((e=R0(e))==t)return!0;return!1}function Srn(n,t){var e,i,r;for(i=t.a.ld(),e=uG(t.a.md(),16).gc(),r=0;rn||n>t)throw hv(new YM("fromIndex: 0, toIndex: "+n+Q0n+t))}function Drn(n){if(n<0)throw hv(new vM("Illegal Capacity: "+n));this.g=this.aj(n)}function xrn(n,t){return YN(),oan(T1n),e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)}function Rrn(n,t){var e,i,r,c;for(r=0,c=(i=n.d).length;r0&&(n.a/=t,n.b/=t),n}function Hrn(n){var t;return n.w?n.w:((t=O3(n))&&!t.Vh()&&(n.w=t),t)}function Urn(n,t){var e,i;i=n.a,e=kdn(n,t,null),i!=t&&!n.e&&(e=PWn(n,t,e)),e&&e.oj()}function Grn(n,t,e){var i,r;i=t;do{r=uM(n.p[i.p])+e,n.p[i.p]=r,i=n.a[i.p]}while(i!=t)}function qrn(n,t,e){var i=function(){return n.apply(i,arguments)};return t.apply(i,e),i}function Xrn(n){var t;return null==n?null:NCn(t=uG(n,195),t.length)}function zrn(n,t){if(null==n.g||t>=n.i)throw hv(new pL(t,n.i));return n.Wi(t,n.g[t])}function Vrn(n,t){var e,i;for(hZ(),i=new Zm,e=0;e=14&&t<=16)),n}function Fcn(n,t){var e;return tJ(t),vG(!!(e=n[":"+t]),"Enum constant undefined: "+t),e}function _cn(n,t,e,i,r,c){var a;return Rcn(e,a=VW(n,t)),a.i=r?8:0,a.f=i,a.e=r,a.g=c,a}function Bcn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=1,this.c=n,this.a=e}function Hcn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=2,this.c=n,this.a=e}function Ucn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=6,this.c=n,this.a=e}function Gcn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=7,this.c=n,this.a=e}function qcn(n,t,e,i,r){this.d=t,this.j=i,this.e=r,this.o=-1,this.p=4,this.c=n,this.a=e}function Xcn(n,t){var e,i,r,c;for(r=0,c=(i=t).length;r=0))throw hv(new vM("tolerance ("+n+") must be >= 0"));return n}function uan(n,t){var e;return F$(t,44)?n.c.Mc(t):(e=ymn(n,t),Svn(n,t),e)}function san(n,t,e){return Kbn(n,t),qon(n,e),Pcn(n,0),Ccn(n,1),mdn(n,!0),ddn(n,!0),n}function han(n,t){var e;if(e=n.gc(),t<0||t>e)throw hv(new w_(t,e));return new N_(n,t)}function fan(n,t){n.b=e.Math.max(n.b,t.d),n.e+=t.r+(0==n.a.c.length?0:n.c),kD(n.a,t)}function lan(n){TK(n.c>=0),Rvn(n.d,n.c)<0&&(n.a=n.a-1&n.d.a.length-1,n.b=n.d.c),n.c=-1}function ban(n){var t;for(t=n.c.Cc().Kc();t.Ob();)uG(t.Pb(),16).$b();n.c.$b(),n.d=0}function wan(n){var t,e,i,r;for(i=0,r=(e=n.a).length;i=0}function Ban(n,t){n.r>0&&n.c0&&0!=n.g&&Ban(n.i,t/n.r*n.i.d))}function Han(n,t){var e;e=n.c,n.c=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,1,e,n.c))}function Uan(n,t){var e;e=n.c,n.c=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,4,e,n.c))}function Gan(n,t){var e;e=n.k,n.k=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,2,e,n.k))}function qan(n,t){var e;e=n.D,n.D=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,2,e,n.D))}function Xan(n,t){var e;e=n.f,n.f=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,8,e,n.f))}function zan(n,t){var e;e=n.i,n.i=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,7,e,n.i))}function Van(n,t){var e;e=n.a,n.a=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,8,e,n.a))}function Wan(n,t){var e;e=n.b,n.b=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,0,e,n.b))}function Qan(n,t){var e;e=n.b,n.b=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,0,e,n.b))}function Jan(n,t){var e;e=n.c,n.c=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,1,e,n.c))}function Yan(n,t){var e;e=n.d,n.d=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,1,e,n.d))}function Zan(n,t,e){var i;n.b=t,n.a=e,i=512==(512&n.a)?new ay:new $f,n.c=qFn(i,n.b,n.a)}function non(n,t){return EFn(n.e,t)?(PP(),ein(t)?new Cq(t,n):new OA(t,n)):new PA(t,n)}function ton(n){return 0>n?new mS:new OK(null,new i9(n+1,n))}function eon(n,t){var e;return hZ(),e=new sS(1),RA(n)?r2(e,n,t):VAn(e.f,n,t),new Vw(e)}function ion(n,t){var e,i;return e=n.c,(i=t.e[n.p])>0?uG(zq(e.a,i-1),10):null}function ron(n,t){var e,i;return(e=n.o+n.p)<(i=t.o+t.p)?-1:e==i?0:1}function con(n){var t;return F$(t=oIn(n,(GYn(),rmt)),167)?Qpn(uG(t,167)):null}function aon(n){var t;return(n=e.Math.max(n,2))>(t=pfn(n))?(t<<=1)>0?t:d1n:t}function oon(n){switch(_D(3!=n.e),n.e){case 2:return!1;case 0:return!0}return a7(n)}function uon(n,t){var e;return!!F$(t,8)&&(e=uG(t,8),n.a==e.a&&n.b==e.b)}function son(n,t){var e;e=new et,uG(t.b,68),uG(t.b,68),uG(t.b,68),Prn(t.a,new $U(n,e,t))}function hon(n,t){var e,i;for(i=t.vc().Kc();i.Ob();)rSn(n,(e=uG(i.Pb(),44)).ld(),e.md())}function fon(n,t){var e;e=n.d,n.d=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,11,e,n.d))}function lon(n,t){var e;e=n.j,n.j=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,13,e,n.j))}function bon(n,t){var e;e=n.b,n.b=t,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,1,21,e,n.b))}function won(n,t){0==(t9(),Nut?null:t.c).length&&RK(t,new G),r2(n.a,Nut?null:t.c,t)}function don(n,t){t.Ug("Hierarchical port constraint processing",1),ayn(n),yYn(n),t.Vg()}function gon(){gon=E,Sdt=new VC("START",0),Edt=new VC("MIDDLE",1),jdt=new VC("END",2)}function pon(){pon=E,VCt=new YI("P1_NODE_PLACEMENT",0),WCt=new YI("P2_EDGE_ROUTING",1)}function mon(){mon=E,Wft=new Cm(E4n),Qft=new Cm(S4n),Vft=new Cm(P4n),zft=new Cm(C4n)}function von(n){var t;return OB(n.f.g,n.d),MK(n.b),n.c=n.a,t=uG(n.a.Pb(),44),n.b=Phn(n),t}function kon(n){return null==n.b?(EP(),EP(),eBt):n.ul()?n.tl():n.sl()}function yon(n,t){var e;return!((e=null==t?-1:Ten(n.b,t,0))<0||(Con(n,e),0))}function Mon(n,t){var e;return tJ(t),e=t.g,!n.b[e]&&(uQ(n.b,e,t),++n.c,!0)}function Ton(n,t){var e,i;return e=1-t,i=n.a[e],n.a[e]=i.a[t],i.a[t]=n,n.b=!0,i.b=!1,i}function jon(n,t){var e,i;for(i=t.Kc();i.Ob();)e=uG(i.Pb(),272),n.b=!0,FV(n.e,e),e.b=n}function Eon(n,t){var e,i;return e=uG(oIn(n,(jYn(),rTt)),8),i=uG(oIn(t,rTt),8),ugn(e.b,i.b)}function Son(n,t,e){var i,r;return r=t>>5,i=31&t,E3(Dz(n.n[e][r],pz(Nz(i,1))),3)}function Pon(n,t,e){var i,r,c;for(c=n.a.length-1,r=n.b,i=0;i0?1:0:(!n.c&&(n.c=j2(Bsn(n.f))),n.c).e}function tun(n,t){t?null==n.B&&(n.B=n.D,n.D=null):null!=n.B&&(n.D=n.B,n.B=null)}function eun(n,t){return Xhn(),n==Flt&&t==Hlt||n==Hlt&&t==Flt||n==Blt&&t==_lt||n==_lt&&t==Blt}function iun(n,t){return Xhn(),n==Flt&&t==_lt||n==Flt&&t==Blt||n==Hlt&&t==Blt||n==Hlt&&t==_lt}function run(n,t){return YN(),oan(Z2n),e.Math.abs(0-t)<=Z2n||0==t||isNaN(0)&&isNaN(t)?0:n/t}function cun(n,t){return uM(pK(yx(cdn(YJ(new fX(null,new h3(n.c.b,16)),new _g(n)),t))))}function aun(n,t){return uM(pK(yx(cdn(YJ(new fX(null,new h3(n.c.b,16)),new Fg(n)),t))))}function oun(){return r_n(),Uhn(cT(bpt,1),p1n,259,0,[Zgt,tpt,ept,ipt,rpt,cpt,opt,Ygt,npt,apt])}function uun(){return THn(),Uhn(cT(Hjt,1),p1n,243,0,[$jt,Ijt,Ljt,Ojt,Ajt,Sjt,Njt,Djt,Pjt,Cjt])}function sun(n,t){t.Ug("General Compactor",1),Bpn(uG(zDn(n,(jOn(),LIt)),393)).Cg(n)}function hun(n,t){var e,i;return e=uG(zDn(n,(jOn(),FIt)),17),i=uG(zDn(t,FIt),17),d$(e.a,i.a)}function fun(n,t,e){var i,r;for(r=Fkn(n,0);r.b!=r.d.c;)(i=uG(I6(r),8)).a+=t,i.b+=e;return n}function lun(n,t,e){var i;for(i=n.b[e&n.f];i;i=i.b)if(e==i.a&&xQ(t,i.g))return i;return null}function bun(n,t,e){var i;for(i=n.c[e&n.f];i;i=i.d)if(e==i.f&&xQ(t,i.i))return i;return null}function wun(n,t,e){var i,r,c;for(i=0,r=0;r>>31;0!=i&&(n[e]=i)}function dun(n,t,e,i,r,c){var a;this.c=n,tTn(n,a=new Zm,t,n.b,e,i,r,c),this.a=new N4(a,0)}function gun(){this.c=new Vj(0),this.b=new Vj(F9n),this.d=new Vj(K9n),this.a=new Vj(_3n)}function pun(n,t,e,i,r,c,a){_E.call(this,n,t),this.d=e,this.e=i,this.c=r,this.b=c,this.a=n7(a)}function mun(n,t,e,i,r,c,a,o,u,s,h,f,l){return eLn(n,t,e,i,r,c,a,o,u,s,h,f,l),Sgn(n,!1),n}function vun(n){return n.b.c.i.k==(zIn(),lbt)?uG(oIn(n.b.c.i,(GYn(),rmt)),12):n.b.c}function kun(n){return n.b.d.i.k==(zIn(),lbt)?uG(oIn(n.b.d.i,(GYn(),rmt)),12):n.b.d}function yun(n){var t;return _A((t=t6(n)).a,0)?(gS(),gS(),fut):(gS(),new dR(t.b))}function Mun(n){var t;return _A((t=Z4(n)).a,0)?(dS(),dS(),hut):(dS(),new wR(t.b))}function Tun(n){var t;return _A((t=Z4(n)).a,0)?(dS(),dS(),hut):(dS(),new wR(t.c))}function jun(n){switch(n.g){case 2:return KQn(),_Rt;case 4:return KQn(),kRt;default:return n}}function Eun(n){switch(n.g){case 1:return KQn(),KRt;case 3:return KQn(),yRt;default:return n}}function Sun(n){switch(n.g){case 0:return new Wo;case 1:return new Qo;default:return null}}function Pun(){Pun=E,Hwt=new uF("edgelabelcenterednessanalysis.includelabel",(qx(),tot))}function Cun(){Cun=E,FEt=Lvn(gL(Aq(Aq(new wJ,(uIn(),Elt),(zYn(),kwt)),Slt,hwt),Plt),vwt)}function Iun(){Iun=E,XEt=Lvn(gL(Aq(Aq(new wJ,(uIn(),Elt),(zYn(),kwt)),Slt,hwt),Plt),vwt)}function Oun(){Oun=E,V_t=new Qk,Q_t=Uhn(cT(o_t,1),krt,179,0,[]),W_t=Uhn(cT(p_t,1),yrt,62,0,[])}function Aun(){Aun=E,Obt=new PC("TO_INTERNAL_LTR",0),Ibt=new PC("TO_INPUT_DIRECTION",1)}function Lun(){Lun=E,Tbt=new Bt,ybt=new Ht,Mbt=new Ut,kbt=new Gt,jbt=new qt,Ebt=new Xt}function Nun(n,t){t.Ug(g6n,1),Apn(FS(new Ad((zS(),new mY(n,!1,!1,new Ft))))),t.Vg()}function $un(n,t,e){e.Ug("DFS Treeifying phase",1),qmn(n,t),qKn(n,t),n.a=null,n.b=null,e.Vg()}function Dun(n,t){return qx(),RA(n)?r7(n,mK(t)):FA(n)?Rz(n,pK(t)):KA(n)?xz(n,gK(t)):n.Fd(t)}function xun(n,t){var e,i;for(tJ(t),i=t.vc().Kc();i.Ob();)e=uG(i.Pb(),44),n.zc(e.ld(),e.md())}function Run(n,t,e){var i;for(i=e.Kc();i.Ob();)if(!H5(n,t,i.Pb()))return!1;return!0}function Kun(n,t,e,i,r){var c;return e&&(c=emn(t.Dh(),n.c),r=e.Rh(t,-1-(-1==c?i:c),null,r)),r}function Fun(n,t,e,i,r){var c;return e&&(c=emn(t.Dh(),n.c),r=e.Th(t,-1-(-1==c?i:c),null,r)),r}function _un(n){var t;if(-2==n.b){if(0==n.e)t=-1;else for(t=0;0==n.a[t];t++);n.b=t}return n.b}function Bun(n){if(tJ(n),0==n.length)throw hv(new ZM("Zero length BigInteger"));XHn(this,n)}function Hun(n){this.i=n.gc(),this.i>0&&(this.g=this.aj(this.i+(this.i/8|0)+1),n.Qc(this.g))}function Uun(n,t,e){this.g=n,this.d=t,this.e=e,this.a=new Zm,RLn(this),hZ(),f$(this.a,null)}function Gun(n,t){t.q=n,n.d=e.Math.max(n.d,t.r),n.b+=t.d+(0==n.a.c.length?0:n.c),kD(n.a,t)}function qun(n,t){var e,i,r,c;return r=n.c,e=n.c+n.b,c=n.d,i=n.d+n.a,t.a>r&&t.ac&&t.b(r=n.a.length)?e=r:s3(t,e+1),n.a=r1(n.a,0,t)+""+i+sQ(n.a,e)}function msn(n,t){n.a=Lgn(n.a,1),n.c=e.Math.min(n.c,t),n.b=e.Math.max(n.b,t),n.d=Lgn(n.d,t)}function vsn(n,t){return t1||n.Ob())return++n.a,n.g=0,t=n.i,n.Ob(),t;throw hv(new Bv)}function Fsn(n){switch(n.a.g){case 1:return new KI;case 3:return new zTn;default:return new ml}}function _sn(n,t){switch(t){case 1:return!!n.n&&0!=n.n.i;case 2:return null!=n.k}return j4(n,t)}function Bsn(n){return p0n>22),r=n.h+t.h+(i>>22),p$(e&f0n,i&f0n,r&l0n)}function Thn(n,t){var e,i,r;return e=n.l-t.l,i=n.m-t.m+(e>>22),r=n.h-t.h+(i>>22),p$(e&f0n,i&f0n,r&l0n)}function jhn(n){var t,e;for(BQn(n),e=new Ww(n.d);e.a(i=n.gc()))throw hv(new w_(t,i));return n.Si()&&(e=A0(n,e)),n.Ei(t,e)}function wfn(n,t,e,i,r){var c,a;for(a=e;a<=r;a++)for(c=t;c<=i;c++)eTn(n,c,a)||HBn(n,c,a,!0,!1)}function dfn(n){var t,e,i;for(l_n(),e=Inn(PNt,zZn,8,2,0,1),i=0,t=0;t<2;t++)i+=.5,e[t]=WMn(i,n);return e}function gfn(n){var t,e;return p$(t=1+~n.l&f0n,e=~n.m+(0==t?1:0)&f0n,~n.h+(0==t&&0==e?1:0)&l0n)}function pfn(n){var t;if(n<0)return j1n;if(0==n)return 0;for(t=d1n;0==(t&n);t>>=1);return t}function mfn(n,t,e){return!(n>=128)&&HA(n<64?E3(Nz(1,n),e):E3(Nz(1,n-64),t),0)}function vfn(n,t,e){return null==e?(!n.q&&(n.q=new Ym),u7(n.q,t)):(!n.q&&(n.q=new Ym),vJ(n.q,t,e)),n}function kfn(n,t,e){return null==e?(!n.q&&(n.q=new Ym),u7(n.q,t)):(!n.q&&(n.q=new Ym),vJ(n.q,t,e)),n}function yfn(n){var t,e;return zsn(e=new d7,n),kfn(e,(mon(),Wft),n),kqn(n,e,t=new Ym),zWn(n,e,t),e}function Mfn(n){var t,e;return t=n.t-n.k[n.o.p]*n.d+n.j[n.o.p]>n.f,e=n.u+n.e[n.o.p]*n.d>n.f*n.s*n.d,t||e}function Tfn(n,t){var e,i,r;for(e=!1,i=n.a[t].length,r=0;r=0,"Negative initial capacity"),vG(t>=0,"Non-positive load factor"),$V(this)}function $fn(n,t,e,i,r){var c,a;if(a=n.length,c=e.length,t<0||i<0||r<0||t+r>a||i+r>c)throw hv(new Lv)}function Dfn(n,t){var e,i,r,c,a;for(hZ(),a=!1,r=0,c=(i=t).length;r1||t>=0&&n.b<3)}function Yfn(n){var t,e,i;t=1+~n.l&f0n,e=~n.m+(0==t?1:0)&f0n,i=~n.h+(0==t&&0==e?1:0)&l0n,n.l=t,n.m=e,n.h=i}function Zfn(n){var t,e,i;for(hZ(),i=1,e=n.Kc();e.Ob();)i=31*i+(null!=(t=e.Pb())?Hon(t):0),i|=0;return i}function nln(n,t,e,i,r){var c;return c=gDn(n,t),e&&Yfn(c),r&&(n=hTn(n,t),Qat=i?gfn(n):p$(n.l,n.m,n.h)),c}function tln(n,t,e){n.g=mAn(n,t,(KQn(),kRt),n.b),n.d=mAn(n,e,kRt,n.b),0!=n.g.c&&0!=n.d.c&&AIn(n)}function eln(n,t,e){n.g=mAn(n,t,(KQn(),_Rt),n.j),n.d=mAn(n,e,_Rt,n.j),0!=n.g.c&&0!=n.d.c&&AIn(n)}function iln(n,t){switch(t){case 7:return!!n.e&&0!=n.e.i;case 8:return!!n.d&&0!=n.d.i}return Kpn(n,t)}function rln(n,t){switch(t.g){case 0:F$(n.b,641)||(n.b=new lsn);break;case 1:F$(n.b,642)||(n.b=new zG)}}function cln(n){if(0===n.g)return new eu;throw hv(new vM(lnt+(null!=n.f?n.f:""+n.g)))}function aln(n){if(0===n.g)return new nu;throw hv(new vM(lnt+(null!=n.f?n.f:""+n.g)))}function oln(n,t,e){return!Qj(JJ(new fX(null,new h3(n.c,16)),new hd(new GO(t,e)))).Bd((vS(),Kut))}function uln(n,t){return bD($kn(uG(oIn(t,(QGn(),cCt)),88)),new MO(n.c.e.a-n.b.e.a,n.c.e.b-n.b.e.b))<=0}function sln(n,t){for(;null!=n.g||n.c?null==n.g||0!=n.i&&uG(n.g[n.i-1],51).Ob():O0(n);)yA(t,Wxn(n))}function hln(n){var t;for(t=new Ww(n.a.b);t.ai?1:0}function yln(n){return kD(n.c,(Whn(),ZLt)),xrn(n.a,uM(pK(Jkn((lmn(),WTt)))))?new zu:new zp(n)}function Mln(n){for(;!n.d||!n.d.Ob();){if(!n.b||LM(n.b))return null;n.d=uG(xV(n.b),51)}return n.d}function Tln(n){switch(n.g){case 1:return K9n;default:case 2:return 0;case 3:return _3n;case 4:return F9n}}function jln(){var n;return QYn(),VHt||(n=eR(kJn("M",!0)),n=CX(kJn("M",!1),n),VHt=n)}function Eln(){Eln=E,CKt=new uA("ELK",0),IKt=new uA("JSON",1),PKt=new uA("DOT",2),OKt=new uA("SVG",3)}function Sln(){Sln=E,aEt=new kI("STACKED",0),rEt=new kI("REVERSE_STACKED",1),cEt=new kI("SEQUENCED",2)}function Pln(){Pln=E,gPt=new WI(q4n,0),dPt=new WI("MIDDLE_TO_MIDDLE",1),wPt=new WI("AVOID_OVERLAP",2)}function Cln(){Cln=E,tdt=new ji,edt=new Ei,ndt=new Mi,Zwt=new Si,tJ(new Ti),Ywt=new L}function Iln(){Iln=E,Pxt=new CN(15),Sxt=new _N((XYn(),W$t),Pxt),Cxt=mDt,Mxt=a$t,Txt=_$t,Ext=U$t,jxt=H$t}function Oln(n,t){var e,i,r,c,a;for(r=0,c=(i=t).length;r=n.b.c.length||(_ln(n,2*t+1),(e=2*t+2)0&&(t.Cd(e),e.i&&Zdn(e))}function Hln(n,t,e){var i;for(i=e-1;i>=0&&n[i]===t[i];i--);return i<0?0:$P(E3(n[i],L0n),E3(t[i],L0n))?-1:1}function Uln(n,t,e){var i,r;this.g=n,this.c=t,this.a=this,this.d=this,r=aon(e),i=Inn($at,l1n,227,r,0,1),this.b=i}function Gln(n,t,e,i,r){var c,a;for(a=e;a<=r;a++)for(c=t;c<=i;c++)if(eTn(n,c,a))return!0;return!1}function qln(n,t){var e;for(e=n.Zb().Cc().Kc();e.Ob();)if(uG(e.Pb(),16).Hc(t))return!0;return!1}function Xln(n,t,e){var i,r,c,a;for(tJ(e),a=!1,c=n.fd(t),r=e.Kc();r.Ob();)i=r.Pb(),c.Rb(i),a=!0;return a}function zln(n,t){var e,i;return i=uG(Lsn(n.a,4),129),e=Inn(xFt,Uit,424,t,0,1),null!=i&&qGn(i,0,e,0,i.length),e}function Vln(n,t){var e;return e=new Z_n(0!=(256&n.f),n.i,n.a,n.d,0!=(16&n.f),n.j,n.g,t),null!=n.e||(e.c=n),e}function Wln(n,t){var e;return n===t||!!F$(t,85)&&(e=uG(t,85),OOn(Mz(n),e.vc()))}function Qln(n,t,e){var i,r;for(r=e.Kc();r.Ob();)if(i=uG(r.Pb(),44),n.Be(t,i.md()))return!0;return!1}function Jln(n,t,e){return n.d[t.p][e.p]||(Kyn(n,t,e),n.d[t.p][e.p]=!0,n.d[e.p][t.p]=!0),n.a[t.p][e.p]}function Yln(n,t){return!(!n||n==t||!vR(t,(GYn(),zpt)))&&uG(oIn(t,(GYn(),zpt)),10)!=n}function Zln(n){switch(n.i){case 2:return!0;case 1:return!1;case-1:++n.c;default:return n.$l()}}function nbn(n){switch(n.i){case-2:return!0;case-1:return!1;case 1:--n.c;default:return n._l()}}function tbn(n){U0.call(this,"The given string does not match the expected format for individual spacings.",n)}function ebn(n,t){var e;t.Ug("Min Size Preprocessing",1),e=xAn(n),Myn(n,(lBn(),EOt),e.a),Myn(n,MOt,e.b),t.Vg()}function ibn(n){var t,e,i;for(t=0,i=Inn(PNt,zZn,8,n.b,0,1),e=Fkn(n,0);e.b!=e.d.c;)i[t++]=uG(I6(e),8);return i}function rbn(n,t,e){var i,r;for(i=new lS,r=Fkn(e,0);r.b!=r.d.c;)aq(i,new eN(uG(I6(r),8)));Xln(n,t,i)}function cbn(n,t){var e;return e=Lgn(n,t),$P(P3(n,t),0)|BA(P3(n,e),0)?e:Lgn(YZn,P3(Dz(e,63),1))}function abn(n,t){var e,i;return(e=uG(n.d.Bc(t),16))?((i=n.e.hc()).Gc(e),n.e.d-=e.gc(),e.$b(),i):null}function obn(n){var t;if((t=n.a.c.length)>0)return Vz(t-1,n.a.c.length),i7(n.a,t-1);throw hv(new _v)}function ubn(n,t,e){if(n>t)throw hv(new vM(o2n+n+u2n+t));if(n<0||t>e)throw hv(new YM(o2n+n+s2n+t+Q0n+e))}function sbn(n,t){null==n.D&&null!=n.B&&(n.D=n.B,n.B=null),qan(n,null==t?null:(tJ(t),t)),n.C&&n.hl(null)}function hbn(n,t){var e;e=null!=Jkn((lmn(),WTt))&&null!=t.Sg()?uM(pK(t.Sg()))/uM(pK(Jkn(WTt))):1,vJ(n.b,t,e)}function fbn(n,t){var e,i;if(0!=(i=n.c[t]))for(n.c[t]=0,n.d-=i,e=t+1;eR9n?n-i>R9n:i-n>R9n)}function Qbn(n,t){var e;for(e=0;er&&(USn(t.q,r),i=e!=t.q.d)),i}function Zbn(n,t){var i,r,c,a,o;return a=t.i,o=t.j,r=a-(i=n.f).i,c=o-i.j,e.Math.sqrt(r*r+c*c)}function nwn(n,t){var e;return(e=Kvn(n))||(!ZKt&&(ZKt=new Ps),ZXn(),ttn((e=new Xm(sxn(t))).El(),n)),e}function twn(n,t){var e,i;return(e=uG(n.c.Bc(t),16))?((i=n.hc()).Gc(e),n.d-=e.gc(),e.$b(),n.mc(i)):n.jc()}function ewn(n,t){var e,i;for(i=0!=uRn(n.d,1),e=!0;e;)e=!1,e=t.c.mg(t.e,i),e|=PKn(n,t,i,!1),i=!i;Gon(n)}function iwn(n,t,e,i){var r,c;n.a=t,c=i?0:1,n.f=(r=new _On(n.c,n.a,e,c),new eBn(e,n.a,r,n.e,n.b,n.c==(ean(),BEt)))}function rwn(n){var t;return MK(n.a!=n.b),t=n.d.a[n.a],jK(n.b==n.d.c&&null!=t),n.c=n.a,n.a=n.a+1&n.d.a.length-1,t}function cwn(n){var t;if(0!=n.c)return n.c;for(t=0;t=n.c.b:n.a<=n.c.b))throw hv(new Bv);return t=n.a,n.a+=n.c.c,++n.b,xwn(t)}function own(n){var t;return zsn(t=new S$(n.a),n),kfn(t,(GYn(),rmt),n),t.o.a=n.g,t.o.b=n.f,t.n.a=n.i,t.n.b=n.j,t}function uwn(n){return(KQn(),LRt).Hc(n.j)?uM(pK(oIn(n,(GYn(),Mmt)))):Gfn(Uhn(cT(PNt,1),zZn,8,0,[n.i.n,n.n,n.a])).b}function swn(n){var t;return t=aN(KEt),uG(oIn(n,(GYn(),Hpt)),21).Hc((r_n(),rpt))&&Aq(t,(uIn(),Elt),(zYn(),Cwt)),t}function hwn(n){var t,e;for(e=new ek,t=new Ww(n);t.a=0?t:-t;i>0;)i%2==0?(e*=e,i=i/2|0):(r*=e,i-=1);return t<0?1/r:r}function pwn(n,t){var e,i,r;for(r=1,e=n,i=t>=0?t:-t;i>0;)i%2==0?(e*=e,i=i/2|0):(r*=e,i-=1);return t<0?1/r:r}function mwn(n,t){var e,i,r,c;return(c=fLn((i=t,(r=n?Kvn(n):null)&&r.Gl(),i)))==t&&(e=Kvn(n))&&e.Gl(),c}function vwn(n,t,e){var i,r;return r=n.f,n.f=t,0!=(4&n.Db)&&0==(1&n.Db)&&(i=new lV(n,1,0,r,t),e?e.nj(i):e=i),e}function kwn(n,t,e){var i,r;return r=n.b,n.b=t,0!=(4&n.Db)&&0==(1&n.Db)&&(i=new lV(n,1,3,r,t),e?e.nj(i):e=i),e}function ywn(n,t,e){var i,r;return r=n.a,n.a=t,0!=(4&n.Db)&&0==(1&n.Db)&&(i=new lV(n,1,1,r,t),e?e.nj(i):e=i),e}function Mwn(n){var t,e,i,r;if(null!=n)for(e=0;e=i||t-129&&n<128?(XG(),!(e=bot[t=n+128])&&(e=bot[t]=new Iw(n)),e):new Iw(n)}function Rwn(n){var t,e;return n>-129&&n<128?(eX(),!(e=Mot[t=n+128])&&(e=Mot[t]=new Aw(n)),e):new Aw(n)}function Kwn(n,t){n.a.c.length>0&&Lln(uG(zq(n.a,n.a.c.length-1),579),t)||kD(n.a,new r9(t))}function Fwn(n){var t,e;GB(),t=n.d.c-n.e.c,Prn((e=uG(n.g,154)).b,new Pg(t)),Prn(e.c,new Cg(t)),z8(e.i,new Ig(t))}function _wn(n){var t;return(t=new WM).a+="VerticalSegment ",QA(t,n.e),t.a+=" ",JA(t,KD(new FM,new Ww(n.k))),t.a}function Bwn(n,t){var e,i;for(e=0,i=Dgn(n,t).Kc();i.Ob();)e+=null!=oIn(uG(i.Pb(),12),(GYn(),lmt))?1:0;return e}function Hwn(n,t,e){var i,r,c;for(i=0,c=Fkn(n,0);c.b!=c.d.c&&!((r=uM(pK(I6(c))))>e);)r>=t&&++i;return i}function Uwn(n,t){WW(n);try{return n._b(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return!1;throw hv(e)}}function Gwn(n,t){WW(n);try{return n.Hc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return!1;throw hv(e)}}function qwn(n,t){WW(n);try{return n.Mc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return!1;throw hv(e)}}function Xwn(n,t){WW(n);try{return n.xc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return null;throw hv(e)}}function zwn(n,t){WW(n);try{return n.Bc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return null;throw hv(e)}}function Vwn(n,t){switch(t.g){case 2:case 1:return Dgn(n,t);case 3:case 4:return Spn(Dgn(n,t))}return hZ(),hZ(),zot}function Wwn(n){var t;return 0!=(64&n.Db)?vxn(n):((t=new fx(vxn(n))).a+=" (name: ",VA(t,n.zb),t.a+=")",t.a)}function Qwn(n){var t;return(t=uG(ain(n.c.c,""),233))||(t=new I2(UT(HT(new du,""),"Other")),Akn(n.c.c,"",t)),t}function Jwn(n,t,e){var i,r;return r=n.sb,n.sb=t,0!=(4&n.Db)&&0==(1&n.Db)&&(i=new lV(n,1,4,r,t),e?e.nj(i):e=i),e}function Ywn(n,t,e){var i,r;return r=n.r,n.r=t,0!=(4&n.Db)&&0==(1&n.Db)&&(i=new lV(n,1,8,r,n.r),e?e.nj(i):e=i),e}function Zwn(n,t,e){var i;return i=new Ken(n.e,4,13,t.c||(YYn(),N_t),null,Hyn(n,t),!1),e?e.nj(i):e=i,e}function ndn(n,t,e){var i;return i=new Ken(n.e,3,13,null,t.c||(YYn(),N_t),Hyn(n,t),!1),e?e.nj(i):e=i,e}function tdn(n,t){var e,i;return!(i=(e=uG(t,691)).el())&&e.fl(i=F$(t,90)?new CA(n,uG(t,29)):new g4(n,uG(t,156))),i}function edn(n,t,e){var i;n._i(n.i+1),i=n.Zi(t,e),t!=n.i&&qGn(n.g,t,n.g,t+1,n.i-t),uQ(n.g,t,i),++n.i,n.Mi(t,e),n.Ni()}function idn(n,t){var e;return t.a&&(e=t.a.a.length,n.a?JA(n.a,n.b):n.a=new lx(n.d),L4(n.a,t.a,t.d.length,e)),n}function rdn(n,t){var e;n.c=t,n.a=Jpn(t),n.a<54&&(n.f=(e=t.d>1?C4(t.a[0],t.a[1]):C4(t.a[0],0),W4(t.e>0?e:Men(e))))}function cdn(n,t){var e;return e=new un,n.a.Bd(e)?(UD(),new Xy(tJ(ven(n,e.a,t)))):(GQ(n),UD(),UD(),sut)}function adn(n,t){var e;0!=n.c.length&&(zL(e=uG(Ekn(n,Inn(pbt,e6n,10,n.c.length,0,1)),199),new Oe),WNn(e,t))}function odn(n,t){var e;0!=n.c.length&&(zL(e=uG(Ekn(n,Inn(pbt,e6n,10,n.c.length,0,1)),199),new Ae),WNn(e,t))}function udn(n,t){return RA(n)?m_(n,t):FA(n)?p_(n,t):KA(n)?(tJ(n),xA(n)===xA(t)):Cz(n)?n.Fb(t):xX(n)?SL(n,t):j3(n,t)}function sdn(n,t,e){if(t<0)zLn(n,e);else{if(!e.rk())throw hv(new vM(Gtt+e.xe()+qtt));uG(e,69).wk().Ek(n,n.hi(),t)}}function hdn(n,t,e){if(n<0||t>e)throw hv(new dM(o2n+n+s2n+t+", size: "+e));if(n>t)throw hv(new vM(o2n+n+u2n+t))}function fdn(n){var t;return 0!=(64&n.Db)?vxn(n):((t=new fx(vxn(n))).a+=" (source: ",VA(t,n.d),t.a+=")",t.a)}function ldn(n){return n>=65&&n<=70?n-65+10:n>=97&&n<=102?n-97+10:n>=48&&n<=57?n-48:0}function bdn(n){var t,e,i,r;for(JYn(),i=0,r=(e=Nkn()).length;i=0?Rmn(n):hW(Rmn(Men(n))))}function Sdn(n,t,e,i,r,c){this.e=new Zm,this.f=(can(),Qjt),kD(this.e,n),this.d=t,this.a=e,this.b=i,this.f=r,this.c=c}function Pdn(n,t,i){n.n=Jq(nUt,[zZn,E0n],[376,28],14,[i,t0(e.Math.ceil(t/32))],2),n.o=t,n.p=i,n.j=t-1>>1,n.k=i-1>>1}function Cdn(n){return n=((n=((n-=n>>1&1431655765)>>2&858993459)+(858993459&n))>>4)+n&252645135,n+=n>>8,63&(n+=n>>16)}function Idn(n,t){var e,i;for(i=new DD(n);i.e!=i.i.gc();)if(e=uG(Zkn(i),142),xA(t)===xA(e))return!0;return!1}function Odn(n,t,e){var i,r;return(r=jxn(n.b,t))&&(i=uG(JXn(Len(n,r),""),29))?hxn(n,i,t,e):null}function Adn(n,t,e){var i,r;return(r=jxn(n.b,t))&&(i=uG(JXn(Len(n,r),""),29))?fxn(n,i,t,e):null}function Ldn(n,t){var e;if(null==(e=dcn(n.i,t)))throw hv(new SM("Node did not exist in input."));return Qun(t,e),null}function Ndn(n,t){var e;if(F$(e=EKn(n,t),331))return uG(e,35);throw hv(new vM(Gtt+t+"' is not a valid attribute"))}function $dn(n,t,e){var i;if(t>(i=n.gc()))throw hv(new w_(t,i));if(n.Si()&&n.Hc(e))throw hv(new vM(Xet));n.Gi(t,e)}function Ddn(n,t){t.Ug("Sort end labels",1),kS(JJ(sin(new fX(null,new h3(n.b,16)),new we),new de),new ge),t.Vg()}function xdn(){xdn=E,ZDt=new PO(Y2n,0),YDt=new PO(V2n,1),JDt=new PO(z2n,2),QDt=new PO(c3n,3),nxt=new PO("UP",4)}function Rdn(){Rdn=E,HAt=new fO("P1_STRUCTURE",0),UAt=new fO("P2_PROCESSING_ORDER",1),GAt=new fO("P3_EXECUTION",2)}function Kdn(){Kdn=E,qCt=Lvn(Lvn(gP(Lvn(Lvn(gP(Aq(new wJ,(Cjn(),VSt),(OHn(),fPt)),WSt),oPt),sPt),QSt),iPt),hPt)}function Fdn(n){switch(uG(oIn(n,(GYn(),Xpt)),311).g){case 1:kfn(n,Xpt,(Zen(),dpt));break;case 2:kfn(n,Xpt,(Zen(),ppt))}}function _dn(n){switch(n){case 0:return new Fk;case 1:return new Rk;case 2:return new Kk;default:throw hv(new Dv)}}function Bdn(n){switch(n.g){case 2:return YDt;case 1:return JDt;case 4:return QDt;case 3:return nxt;default:return ZDt}}function Hdn(n,t){switch(n.b.g){case 0:case 1:return t;case 2:case 3:return new gY(t.d,0,t.a,t.b);default:return null}}function Udn(n){switch(n.g){case 1:return _Rt;case 2:return yRt;case 3:return kRt;case 4:return KRt;default:return FRt}}function Gdn(n){switch(n.g){case 1:return KRt;case 2:return _Rt;case 3:return yRt;case 4:return kRt;default:return FRt}}function qdn(n){switch(n.g){case 1:return kRt;case 2:return KRt;case 3:return _Rt;case 4:return yRt;default:return FRt}}function Xdn(n,t,e,i){switch(t){case 1:return!n.n&&(n.n=new fV(lFt,n,1,7)),n.n;case 2:return n.k}return ajn(n,t,e,i)}function zdn(n,t,e){var i,r;return n.Pj()?(r=n.Qj(),i=HNn(n,t,e),n.Jj(n.Ij(7,xwn(e),i,t,r)),i):HNn(n,t,e)}function Vdn(n,t){var e,i,r;null==n.d?(++n.e,--n.f):(r=t.ld(),S7(n,i=((e=t.Bi())&vZn)%n.d.length,Txn(n,i,e,r)))}function Wdn(n,t){var e;e=0!=(n.Bb&w1n),t?n.Bb|=w1n:n.Bb&=-1025,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new j9(n,1,10,e,t))}function Qdn(n,t){var e;e=0!=(n.Bb&j0n),t?n.Bb|=j0n:n.Bb&=-4097,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new j9(n,1,12,e,t))}function Jdn(n,t){var e;e=0!=(n.Bb&hrt),t?n.Bb|=hrt:n.Bb&=-8193,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new j9(n,1,15,e,t))}function Ydn(n,t){var e;e=0!=(n.Bb&frt),t?n.Bb|=frt:n.Bb&=-2049,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new j9(n,1,11,e,t))}function Zdn(n){var t;n.g&&(CFn((t=n.c.kg()?n.f:n.a).a,n.o,!0),CFn(t.a,n.o,!1),kfn(n.o,(jYn(),JMt),($Pn(),rRt)))}function ngn(n){var t;if(!n.a)throw hv(new kM("Cannot offset an unassigned cut."));t=n.c-n.b,n.b+=t,iZ(n,t),eZ(n,t)}function tgn(n,t){var e;if(null==(e=cQ(n.k,t)))throw hv(new SM("Port did not exist in input."));return Qun(t,e),null}function egn(n){var t,e;for(e=bxn(Hrn(n)).Kc();e.Ob();)if(qUn(n,t=mK(e.Pb())))return h8((yP(),r_t),t);return null}function ign(n){var t,e;for(e=n.p.a.ec().Kc();e.Ob();)if((t=uG(e.Pb(),218)).f&&n.b[t.c]<-1e-10)return t;return null}function rgn(n){var t,e;for(e=jQ(new WM,91),t=!0;n.Ob();)t||(e.a+=TZn),t=!1,QA(e,n.Pb());return(e.a+="]",e).a}function cgn(n){var t,e,i;for(t=new Zm,i=new Ww(n.b);i.at?1:n==t?0==n?ugn(1/n,1/t):0:isNaN(n)?isNaN(t)?0:1:-1}function sgn(n){var t;return null==(t=n.a[n.c-1&n.a.length-1])?null:(n.c=n.c-1&n.a.length-1,uQ(n.a,n.c,null),t)}function hgn(n){var t,e,i;for(i=0,e=n.length,t=0;t=1?YDt:QDt:t}function mgn(n){switch(uG(oIn(n,(jYn(),Vyt)),223).g){case 1:return new ic;case 3:return new uc;default:return new ec}}function vgn(n){if(n.c)vgn(n.c);else if(n.d)throw hv(new kM("Stream already terminated, can't be modified or used"))}function kgn(n,t,e){var i;return i=n.a.get(t),n.a.set(t,void 0===e?null:e),void 0===i?(++n.c,++n.b.g):++n.d,i}function ygn(n,t,e){var i,r;for(r=n.a.ec().Kc();r.Ob();)if(i=uG(r.Pb(),10),yhn(e,uG(zq(t,i.p),16)))return i;return null}function Mgn(n,t,e){var i;return i=0,t&&(fN(n.a)?i+=t.f.a/2:i+=t.f.b/2),e&&(fN(n.a)?i+=e.f.a/2:i+=e.f.b/2),i}function Tgn(n,t,e){var i;!(i=e)&&(i=xG(new fy,0)),i.Ug(K4n,2),zyn(n.b,t,i.eh(1)),Xzn(n,t,i.eh(1)),hJn(t,i.eh(1)),i.Vg()}function jgn(n,t,e){var i;return gj(),Scn(i=new ns,t),pcn(i,e),n&&ttn((!n.a&&(n.a=new MD(eFt,n,5)),n.a),i),i}function Egn(n){var t;return 0!=(64&n.Db)?vxn(n):((t=new fx(vxn(n))).a+=" (identifier: ",VA(t,n.k),t.a+=")",t.a)}function Sgn(n,t){var e;e=0!=(n.Bb&Qtt),t?n.Bb|=Qtt:n.Bb&=-32769,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new j9(n,1,18,e,t))}function Pgn(n,t){var e;e=0!=(n.Bb&Qtt),t?n.Bb|=Qtt:n.Bb&=-32769,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new j9(n,1,18,e,t))}function Cgn(n,t){var e;e=0!=(n.Bb&VZn),t?n.Bb|=VZn:n.Bb&=-16385,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new j9(n,1,16,e,t))}function Ign(n,t){var e;e=0!=(n.Bb&P0n),t?n.Bb|=P0n:n.Bb&=-65537,0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new j9(n,1,20,e,t))}function Ogn(n){var t;return t=Inn(JHt,N1n,28,2,15,1),n-=P0n,t[0]=(n>>10)+C0n&D1n,t[1]=56320+(1023&n)&D1n,mvn(t,0,t.length)}function Agn(n){var t;return(t=YIn(n))>34028234663852886e22?M0n:t<-34028234663852886e22?T0n:t}function Lgn(n,t){var e;return _L(n)&&_L(t)&&p0n<(e=n+t)&&e"+V3(t.c):"e_"+Hon(t),n.b&&n.c?V3(n.b)+"->"+V3(n.c):"e_"+Hon(n))}function Kgn(n,t){return m_(t.b&&t.c?V3(t.b)+"->"+V3(t.c):"e_"+Hon(t),n.b&&n.c?V3(n.b)+"->"+V3(n.c):"e_"+Hon(n))}function Fgn(n,t){return YN(),oan(T1n),e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:nt?1:KL(isNaN(n),isNaN(t))}function _gn(){_gn=E,fxt=new IO(Y2n,0),sxt=new IO("POLYLINE",1),uxt=new IO("ORTHOGONAL",2),hxt=new IO("SPLINES",3)}function Bgn(){Bgn=E,IOt=new aO("ASPECT_RATIO_DRIVEN",0),OOt=new aO("MAX_SCALE_DRIVEN",1),COt=new aO("AREA_DRIVEN",2)}function Hgn(n,t,e){try{Vfn(n,t,e)}catch(i){throw F$(i=Ehn(i),606)?hv(new x9(i)):hv(i)}return t}function Ugn(n){var t,e;for(t=0,e=n.length;tt&&i.Ne(n[c-1],n[c])>0;--c)a=n[c],uQ(n,c,n[c-1]),uQ(n,c-1,a)}function Zgn(n,t){var e,i,r,c,a;if(e=t.f,Akn(n.c.d,e,t),null!=t.g)for(c=0,a=(r=t.g).length;ct){F4(e);break}}lW(e,t)}function tpn(n,t){var i,r;r=uM(pK(Omn(z4(t),(jYn(),dTt)))),TEn(t,i=e.Math.max(0,r/2-.5),1),kD(n,new xC(t,i))}function epn(n,t,e){e.Ug("Straight Line Edge Routing",1),e.dh(t,l7n),DXn(n,uG(zDn(t,(SK(),zCt)),27)),e.dh(t,w7n)}function ipn(n,t){0==n.n.c.length&&kD(n.n,new c0(n.s,n.t,n.i)),kD(n.b,t),zMn(uG(zq(n.n,n.n.c.length-1),209),t),nqn(n,t)}function rpn(n){var t;this.a=new nB(t=uG(n.e&&n.e(),9),uG(MF(t,t.length),9),0),this.b=Inn(dat,EZn,1,this.a.a.length,5,1)}function cpn(n){return Array.isArray(n)&&n.Tm===j?Ij(Tbn(n))+"@"+(Hon(n)>>>0).toString(16):n.toString()}function apn(n,t){return n.h==b0n&&0==n.m&&0==n.l?(t&&(Qat=p$(0,0,0)),LL((tin(),Zat))):(t&&(Qat=p$(n.l,n.m,n.h)),p$(0,0,0))}function opn(n,t){switch(t.g){case 2:return n.b;case 1:return n.c;case 4:return n.d;case 3:return n.a;default:return!1}}function upn(n,t){switch(t.g){case 2:return n.b;case 1:return n.c;case 4:return n.d;case 3:return n.a;default:return!1}}function spn(n,t,e,i){switch(t){case 3:return n.f;case 4:return n.g;case 5:return n.i;case 6:return n.j}return Xdn(n,t,e,i)}function hpn(n,t){if(t==n.d)return n.e;if(t==n.e)return n.d;throw hv(new vM("Node "+t+" not part of edge "+n))}function fpn(n,t){var e;if(F$(e=EKn(n.Dh(),t),102))return uG(e,19);throw hv(new vM(Gtt+t+"' is not a valid reference"))}function lpn(n,t,e,i){if(t<0)lRn(n,e,i);else{if(!e.rk())throw hv(new vM(Gtt+e.xe()+qtt));uG(e,69).wk().Ck(n,n.hi(),t,i)}}function bpn(n){var t;if(n.b){if(bpn(n.b),n.b.d!=n.c)throw hv(new Fv)}else n.d.dc()&&(t=uG(n.f.c.xc(n.e),16))&&(n.d=t)}function wpn(n){var t,e;for(VK(),t=n.o.b,e=uG(uG(Y9(n.r,(KQn(),KRt)),21),87).Kc();e.Ob();)uG(e.Pb(),117).e.b+=t}function dpn(n){var t,e,i;for(this.a=new XL,i=new Ww(n);i.a=r)return t.c+e;return t.c+t.b.gc()}function ppn(n,t){var e,i,r,c;for(EK(),r=t,Ntn(i=Jtn(n),0,i.length,r),e=0;e0&&(i+=r,++e);return e>1&&(i+=n.d*(e-1)),i}function Mpn(n){var t,e,i;return i=gCn(n),!pE(n.c)&&(nrn(i,"knownLayouters",e=new Ib),t=new jm(e),z8(n.c,t)),i}function Tpn(n){var t,e,i;for((i=new zM).a+="[",t=0,e=n.gc();t0&&(s3(t-1,n.length),58==n.charCodeAt(t-1))&&!mpn(n,n_t,t_t)}function Cpn(n,t){var e;return xA(n)===xA(t)||!!F$(t,92)&&(e=uG(t,92),n.e==e.e&&n.d==e.d&&d8(n,e.a))}function Ipn(n){switch(KQn(),n.g){case 4:return yRt;case 1:return kRt;case 3:return KRt;case 2:return _Rt;default:return FRt}}function Opn(n){var t,e;if(n.b)return n.b;for(e=Nut?null:n.d;e;){if(t=Nut?null:e.b)return t;e=Nut?null:e.d}return pS(),Eut}function Apn(n){var t,e;for(e=uM(pK(n.a.of((XYn(),LDt)))),t=new Ww(n.a.Sf());t.a>5),15,1))[e]=1<3;)r*=10,--c;n=(n+(r>>1))/r|0}return i.i=n,!0}function emn(n,t){var e,i,r;if(null==n.i&&eqn(n),e=n.i,-1!=(i=t.Lj()))for(r=e.length;i=0;--i)for(t=e[i],r=0;r>1,this.k=t-1>>1}function hmn(n){Stn(),uG(n.of((XYn(),q$t)),181).Hc((oUn(),oKt))&&(uG(n.of(bDt),181).Fc((eNn(),pRt)),uG(n.of(q$t),181).Mc(oKt))}function fmn(n){var t,e;t=n.d==(vAn(),Bdt),e=dPn(n),kfn(n.a,(jYn(),byt),t&&!e||!t&&e?(nMn(),LNt):(nMn(),ANt))}function lmn(){lmn=E,ZS(),jYn(),WTt=ETt,QTt=n7(Uhn(cT(lNt,1),m9n,149,0,[wTt,dTt,pTt,mTt,yTt,MTt,TTt,jTt,PTt,ITt,gTt,vTt,STt]))}function bmn(n,t){var e;return(e=uG(l8(n,ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15)).Qc(Nq(e.gc()))}function wmn(n,t){var e,i;if((i=new od(n.a.ad(t,!0))).a.gc()<=1)throw hv(new Rv);return(e=i.a.ec().Kc()).Pb(),uG(e.Pb(),39)}function dmn(n,t,e){var i;return i=uM(n.p[t.i.p])+uM(n.d[t.i.p])+t.n.b+t.a.b,uM(n.p[e.i.p])+uM(n.d[e.i.p])+e.n.b+e.a.b-i}function gmn(n,t){return n.i>0&&(t.lengthn.i&&uQ(t,n.i,null),t}function pmn(n){var t;return 0!=(64&n.Db)?Wwn(n):((t=new fx(Wwn(n))).a+=" (instanceClassName: ",VA(t,n.D),t.a+=")",t.a)}function mmn(n){var t,e,i,r;for(r=0,e=0,i=n.length;e0&&(n._j(),-1!=Txn(n,((e=null==t?0:Hon(t))&vZn)%n.d.length,e,t))}function Mmn(n,t){var i,r;n.a=Lgn(n.a,1),n.c=e.Math.min(n.c,t),n.b=e.Math.max(n.b,t),n.d+=t,i=t-n.f,r=n.e+i,n.f=r-n.e-i,n.e=r}function Tmn(n,t){switch(t){case 3:return void vcn(n,0);case 4:return void kcn(n,0);case 5:return void ycn(n,0);case 6:return void Mcn(n,0)}Awn(n,t)}function jmn(n,t){switch(t.g){case 1:return YU(n.j,(Lun(),ybt));case 2:return YU(n.j,(Lun(),Tbt));default:return hZ(),hZ(),zot}}function Emn(n){var t;switch(ZW(),(t=n.Pc()).length){case 0:return jat;case 1:return new Uq(WW(t[0]));default:return new t1(Ugn(t))}}function Smn(n,t){n.Xj();try{n.d.bd(n.e++,t),n.f=n.d.j,n.g=-1}catch(e){throw F$(e=Ehn(e),77)?hv(new Fv):hv(e)}}function Pmn(){Pmn=E,lBt=new Is,cBt=new Os,aBt=new As,oBt=new Ls,uBt=new Ns,sBt=new $s,hBt=new Ds,fBt=new xs,bBt=new Rs}function Cmn(n,t){var e,i;return wL(),i=null,t==(e=bF((qy(),qy(),Hat)))&&(i=uG(U1(Bat,n),624)),i||(i=new JW(n),t==e&&r2(Bat,n,i)),i}function Imn(n){return Yyn(),(n.q?n.q:(hZ(),hZ(),Vot))._b((jYn(),LMt))?uG(oIn(n,LMt),203):uG(oIn(HQ(n),NMt),203)}function Omn(n,t){var e,i;return i=null,vR(n,(jYn(),kTt))&&(e=uG(oIn(n,kTt),96)).pf(t)&&(i=e.of(t)),null==i&&(i=oIn(HQ(n),t)),i}function Amn(n,t){var e,i,r;return!!F$(t,44)&&(i=(e=uG(t,44)).ld(),xQ(r=Xwn(n.Rc(),i),e.md())&&(null!=r||n.Rc()._b(i)))}function Lmn(n,t){var e,i;return n.f>0&&(n._j(),e=ZNn(n,((i=null==t?0:Hon(t))&vZn)%n.d.length,i,t))?e.md():null}function Nmn(n,t,e){var i,r,c;return n.Pj()?(i=n.i,c=n.Qj(),edn(n,i,t),r=n.Ij(3,null,t,i,c),e?e.nj(r):e=r):edn(n,n.i,t),e}function $mn(n,t,e){var i,r;return i=new Ken(n.e,4,10,F$(r=t.c,90)?uG(r,29):(YYn(),x_t),null,Hyn(n,t),!1),e?e.nj(i):e=i,e}function Dmn(n,t,e){var i,r;return i=new Ken(n.e,3,10,null,F$(r=t.c,90)?uG(r,29):(YYn(),x_t),Hyn(n,t),!1),e?e.nj(i):e=i,e}function xmn(n){var t;return VK(),t=new eN(uG(n.e.of((XYn(),U$t)),8)),n.B.Hc((oUn(),eKt))&&(t.a<=0&&(t.a=20),t.b<=0&&(t.b=20)),t}function Rmn(n){var t,e;return cHn(),e=pz(n),0!=(t=pz(Dz(n,32)))?new x3(e,t):e>10||e<0?new Z5(1,e):Rot[e]}function Kmn(n,t){var e;return _L(n)&&_L(t)&&p0n<(e=n%t)&&e=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function nvn(n,t,e){var i,r,c;for(r=null,c=n.b;c;){if(i=n.a.Ne(t,c.d),e&&0==i)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function tvn(n,t,e,i){var r,c,a;return r=!1,nWn(n.f,e,i)&&(hkn(n.f,n.a[t][e],n.a[t][i]),a=(c=n.a[t])[i],c[i]=c[e],c[e]=a,r=!0),r}function evn(n,t,e){var i,r,c;for(r=uG(cQ(n.b,e),183),i=0,c=new Ww(t.j);c.a>5,t&=31,r=n.d+e+(0==t?0:1),kCn(i=Inn(YHt,W1n,28,r,15,1),n.a,e,t),K4(c=new VV(n.e,r,i)),c}function cvn(n,t){var e;for(e=new Fz(ix(Xgn(n).a.Kc(),new h));hDn(e);)if(uG(N9(e),18).d.i.c==t)return!1;return!0}function avn(n,t,i){var r,c,a,o,u;return o=n.k,u=t.k,c=pK(Omn(n,r=i[o.g][u.g])),a=pK(Omn(t,r)),e.Math.max((tJ(c),c),(tJ(a),a))}function ovn(){return Error.stackTraceLimit>0?(e.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function uvn(n,t){return YN(),YN(),oan(T1n),(e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:nt?1:KL(isNaN(n),isNaN(t)))>0}function svn(n,t){return YN(),YN(),oan(T1n),(e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:nt?1:KL(isNaN(n),isNaN(t)))<0}function hvn(n,t){return YN(),YN(),oan(T1n),(e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:nt?1:KL(isNaN(n),isNaN(t)))<=0}function fvn(n,t){for(var e=0;!t[e]||""==t[e];)e++;for(var i=t[e++];e0&&this.b>0&&(this.g=mX(this.c,this.b,this.a))}function Tvn(n,t){var e,i=n.a;t=String(t),i.hasOwnProperty(t)&&(e=i[t]);var r=(Cfn(),Wat)[typeof e];return r?r(e):Vbn(typeof e)}function jvn(n){if(!(Iet in n.a))throw hv(new SM("Every element must have an id."));return fNn(v0(n,Iet))}function Evn(n){var t,e;for(e=WOn(n),t=null;2==n.c;)EYn(n),t||(QYn(),QYn(),kzn(t=new QN(2),e),e=t),e.Jm(WOn(n));return e}function Svn(n,t){var e,i;return n._j(),(e=ZNn(n,((i=null==t?0:Hon(t))&vZn)%n.d.length,i,t))?(uan(n,e),e.md()):null}function Pvn(n,t){return n.e>t.e?1:n.et.d?n.e:n.d=48&&n<48+e.Math.min(10,10)?n-48:n>=97&&n<97?n-97+10:n>=65&&n<65?n-65+10:-1}function Ivn(n,t){if(t.c==n)return t.d;if(t.d==n)return t.c;throw hv(new vM("Input edge is not connected to the input port."))}function Ovn(n){if(Bvn(Fnt,n))return qx(),eot;if(Bvn(_nt,n))return qx(),tot;throw hv(new vM("Expecting true or false"))}function Avn(n){switch(typeof n){case pZn:return pln(n);case gZn:return OL(n);case dZn:return XK(n);default:return null==n?0:xx(n)}}function Lvn(n,t){if(n.a<0)throw hv(new kM("Did not call before(...) or after(...) before calling add(...)."));return hR(n,n.a,t),n}function Nvn(n){return W0(),F$(n,162)?uG(cQ(AFt,iut),294).Rg(n):PV(AFt,Tbn(n))?uG(cQ(AFt,Tbn(n)),294).Rg(n):null}function $vn(n){var t;return 0==(32&n.Db)&&0!=(t=iQ(uG(Lsn(n,16),29)||n.ii())-iQ(n.ii()))&&Dvn(n,32,Inn(dat,EZn,1,t,5,1)),n}function Dvn(n,t,e){var i;0!=(n.Db&t)?null==e?H$n(n,t):-1==(i=jTn(n,t))?n.Eb=e:uQ(Kcn(n.Eb),i,e):null!=e&&lFn(n,t,e)}function xvn(n,t,e,i){var r;0!=t.c.length&&(r=gRn(e,i),kS(krn(new fX(null,new h3(WLn(t),1)),new ba),new pY(n,e,r,i)))}function Rvn(n,t){var e,i,r;return i=n.a.length-1,e=t-n.b&i,r=n.c-t&i,jK(e<(n.c-n.b&i)),e>=r?(Pbn(n,t),-1):(Sbn(n,t),1)}function Kvn(n){var t,e,i;if(!(i=n.Jh()))for(t=0,e=n.Ph();e;e=e.Ph()){if(++t>O0n)return e.Qh();if((i=e.Jh())||e==n)break}return i}function Fvn(n,t){var e;return xA(t)===xA(n)||!!F$(t,21)&&(e=uG(t,21)).gc()==n.gc()&&n.Ic(e)}function _vn(n,t){return n.et.e?1:n.ft.f?1:Hon(n)-Hon(t)}function Bvn(n,t){return tJ(n),null!=t&&(!!m_(n,t)||n.length==t.length&&m_(n.toLowerCase(),t.toLowerCase()))}function Hvn(n){var t,e;return dwn(n,-129)>0&&dwn(n,128)<0?(tX(),t=pz(n)+128,!(e=got[t])&&(e=got[t]=new Ow(n)),e):new Ow(n)}function Uvn(){Uvn=E,tbt=new EC(q4n,0),Zlt=new EC("INSIDE_PORT_SIDE_GROUPS",1),Ylt=new EC("GROUP_MODEL_ORDER",2),nbt=new EC(X4n,3)}function Gvn(n){var t;return n.b||wj(n,!(t=QF(n.e,n.a))||!m_(_nt,Lmn((!t.b&&(t.b=new XR((YYn(),H_t),wBt,t)),t.b),"qualified"))),n.c}function qvn(n,t){var e,i;for(s3(t,n.length),e=n.charCodeAt(t),i=t+1;i2e3&&(Gat=n,qat=e.setTimeout(vE,10)),0==Uat++&&(Pin((Gy(),Fat)),!0)}function wkn(n,t,e){var i;(Aut?(Opn(n),1):Lut||Dut?(pS(),1):$ut&&(pS(),0))&&((i=new iB(t)).b=e,qIn(n,i))}function dkn(n,t){var e;e=!n.A.Hc((Qmn(),JRt))||n.q==($Pn(),cRt),n.u.Hc((eNn(),wRt))?e?QQn(n,t):TQn(n,t):n.u.Hc(gRt)&&(e?YWn(n,t):MJn(n,t))}function gkn(n){var t;xA(zDn(n,(XYn(),E$t)))===xA((Own(),Oxt))&&(R0(n)?(t=uG(zDn(R0(n),E$t),346),Myn(n,E$t,t)):Myn(n,E$t,Axt))}function pkn(n){var t,e;return!!vR(n.d.i,(jYn(),UMt))&&(t=uG(oIn(n.c.i,UMt),17),e=uG(oIn(n.d.i,UMt),17),d$(t.a,e.a)>0)}function mkn(n,t,i){return new gY(e.Math.min(n.a,t.a)-i/2,e.Math.min(n.b,t.b)-i/2,e.Math.abs(n.a-t.a)+i,e.Math.abs(n.b-t.b)+i)}function vkn(n){var t;this.d=new Zm,this.j=new sj,this.g=new sj,t=n.g.b,this.f=uG(oIn(HQ(t),(jYn(),Byt)),88),this.e=uM(pK(eyn(t,yTt)))}function kkn(n){this.d=new Zm,this.e=new u8,this.c=Inn(YHt,W1n,28,(KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length,15,1),this.b=n}function ykn(n,t,e){var i;switch(i=e[n.g][t],n.g){case 1:case 3:return new MO(0,i);case 2:case 4:return new MO(i,0);default:return null}}function Mkn(n,t,e){var i;i=uG(A1(t.f),205);try{i.rf(n,e),WQ(t.f,i)}catch(r){throw F$(r=Ehn(r),103),hv(r)}}function Tkn(n,t,e){var i,r,c,a;return i=null,(c=DVn(aan(),t))&&(r=null,null!=(a=vVn(c,e))&&(r=n.qf(c,a)),i=r),i}function jkn(n,t,e,i){var r;if(t>=(r=n.length))return r;for(t=t>0?t:0;ti&&uQ(t,i,null),t}function Skn(n,t){var e,i;for(i=n.a.length,t.lengthi&&uQ(t,i,null),t}function Pkn(n,t){var e,i;++n.j,null!=t&&e$n(t,e=F$(i=n.a.Cb,99)?uG(i,99).th():null)?Dvn(n.a,4,e):Dvn(n.a,4,uG(t,129))}function Ckn(n){var t;if(null==n)return null;if(null==(t=Exn(yXn(n,!0))))throw hv(new PM("Invalid hexBinary value: '"+n+"'"));return t}function Ikn(n,t,e){var i;t.a.length>0&&(kD(n.b,new hG(t.a,e)),0<(i=t.a.length)?t.a=r1(t.a,0,0):0>i&&(t.a+=V$(Inn(JHt,N1n,28,-i,15,1))))}function Okn(n,t,e){var i;if(!e[t.d])for(e[t.d]=!0,i=new Ww(Ebn(t));i.a=n.b>>1)for(i=n.c,e=n.b;e>t;--e)i=i.b;else for(i=n.a.a,e=0;e=0?n.Wh(r):$Nn(n,i):e<0?$Nn(n,i):uG(i,69).wk().Bk(n,n.hi(),e)}function Qkn(n){var t,e;for(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),t=(e=n.o).c.Kc();t.e!=t.i.gc();)uG(t.Yj(),44).md();return Tnn(e)}function Jkn(n){var t;if(F$(n.a,4)){if(null==(t=Nvn(n.a)))throw hv(new kM(Bnt+n.b+"'. "+Rnt+(vK($Ft),$Ft.k)+Knt));return t}return n.a}function Ykn(n,t){var e,i;if(n.j.length!=t.j.length)return!1;for(e=0,i=n.j.length;e=64&&t<128&&(r=S3(r,Nz(1,t-64)));return r}function eyn(n,t){var e,i;return i=null,vR(n,(XYn(),ODt))&&(e=uG(oIn(n,ODt),96)).pf(t)&&(i=e.of(t)),null==i&&HQ(n)&&(i=oIn(HQ(n),t)),i}function iyn(n,t){var e;return e=uG(oIn(n,(jYn(),bMt)),75),_$(t,cbt)?e?BY(e):(e=new Uk,kfn(n,bMt,e)):e&&kfn(n,bMt,null),e}function ryn(){ryn=E,XYn(),ift=SDt,Jht=M$t,Xht=c$t,Yht=W$t,MEn(),tft=cst,nft=ist,eft=ost,Zht=est,pbn(),Vht=Hht,zht=Bht,Wht=Ght,Qht=qht}function cyn(n){switch(qS(),this.c=new Zm,this.d=n,n.g){case 0:case 2:this.a=kJ(Qlt),this.b=M0n;break;case 3:case 1:this.a=Qlt,this.b=T0n}}function ayn(n){var t;L_(uG(oIn(n,(jYn(),JMt)),101))&&(c$n((u3(0,(t=n.b).c.length),uG(t.c[0],30))),c$n(uG(zq(t,t.c.length-1),30)))}function oyn(n,t){t.Ug("Self-Loop post-processing",1),kS(JJ(JJ(sin(new fX(null,new h3(n.b,16)),new Di),new xi),new Ri),new Ki),t.Vg()}function uyn(n,t,e){var i;if(n.c)ycn(n.c,n.c.i+t),Mcn(n.c,n.c.j+e);else for(i=new Ww(n.b);i.a=0&&(e.d=n.t);break;case 3:n.t>=0&&(e.a=n.t)}n.C&&(e.b=n.C.b,e.c=n.C.c)}function pyn(){pyn=E,Tjt=new wI(k9n,0),kjt=new wI(D6n,1),yjt=new wI("LINEAR_SEGMENTS",2),vjt=new wI("BRANDES_KOEPF",3),Mjt=new wI(v9n,4)}function myn(){myn=E,Nht=new lC(o3n,0),Lht=new lC(u3n,1),$ht=new lC(s3n,2),Dht=new lC(h3n,3),Nht.a=!1,Lht.a=!0,$ht.a=!1,Dht.a=!0}function vyn(){vyn=E,yht=new hC(o3n,0),kht=new hC(u3n,1),Mht=new hC(s3n,2),Tht=new hC(h3n,3),yht.a=!1,kht.a=!0,Mht.a=!1,Tht.a=!0}function kyn(n,t,e,i){var r;return e>=0?n.Sh(t,e,i):(n.Ph()&&(i=(r=n.Fh())>=0?n.Ah(i):n.Ph().Th(n,-1-r,null,i)),n.Ch(t,e,i))}function yyn(n,t){switch(t){case 7:return!n.e&&(n.e=new f_(aFt,n,7,4)),void Czn(n.e);case 8:return!n.d&&(n.d=new f_(aFt,n,8,5)),void Czn(n.d)}Tmn(n,t)}function Myn(n,t,e){return null==e?(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),Svn(n.o,t)):(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),rSn(n.o,t,e)),n}function Tyn(n,t){var e,i,r,c;for(hZ(),e=n,c=t,F$(n,21)&&!F$(t,21)&&(e=t,c=n),r=e.Kc();r.Ob();)if(i=r.Pb(),c.Hc(i))return!1;return!0}function jyn(n,t,e,i){if(t.ae.b)return!0}return!1}function Eyn(n,t){return RA(n)?!!bZn[t]:n.Sm?!!n.Sm[t]:FA(n)?!!lZn[t]:!!KA(n)&&!!fZn[t]}function Syn(n){var t;t=n.a;do{(t=uG(N9(new Fz(ix(qgn(t).a.Kc(),new h))),18).c.i).k==(zIn(),wbt)&&n.b.Fc(t)}while(t.k==(zIn(),wbt));n.b=Spn(n.b)}function Pyn(n,t){var i,r,c;for(c=n,r=new Fz(ix(qgn(t).a.Kc(),new h));hDn(r);)(i=uG(N9(r),18)).c.i.c&&(c=e.Math.max(c,i.c.i.c.p));return c}function Cyn(n,t){var e,i,r;for(r=0,i=uG(uG(Y9(n.r,t),21),87).Kc();i.Ob();)r+=(e=uG(i.Pb(),117)).d.d+e.b.Mf().b+e.d.a,i.Ob()&&(r+=n.w);return r}function Iyn(n,t){var e,i,r;for(r=0,i=uG(uG(Y9(n.r,t),21),87).Kc();i.Ob();)r+=(e=uG(i.Pb(),117)).d.b+e.b.Mf().a+e.d.c,i.Ob()&&(r+=n.w);return r}function Oyn(n){var t,e,i;if(e=0,0==(i=GFn(n)).c.length)return 1;for(t=new Ww(i);t.a=0?n.Lh(a,e,!0):YNn(n,c,e):uG(c,69).wk().yk(n,n.hi(),r,e,i)}function xyn(n,t,e,i){var r;(r=bdn(t.pf((XYn(),K$t))?uG(t.of(K$t),21):n.j))!=(JYn(),sht)&&(e&&!vvn(r)||LOn(Sxn(n,r,i),t))}function Ryn(n){switch(n.g){case 1:return ehn(),pht;case 3:return ehn(),wht;case 2:return ehn(),ght;case 4:return ehn(),dht;default:return null}}function Kyn(n,t,e){if(n.e)switch(n.b){case 1:JY(n.c,t,e);break;case 0:YY(n.c,t,e)}else C5(n.c,t,e);n.a[t.p][e.p]=n.c.i,n.a[e.p][t.p]=n.c.e}function Fyn(n){var t,e;if(null==n)return null;for(e=Inn(pbt,zZn,199,n.length,0,2),t=0;t=0)return i;if(n.ol())for(e=0;e=(r=n.gc()))throw hv(new w_(t,r));if(n.Si()&&(i=n.dd(e))>=0&&i!=t)throw hv(new vM(Xet));return n.Xi(t,e)}function Gyn(n,t){if(this.a=uG(WW(n),253),this.b=uG(WW(t),253),n.Ed(t)>0||n==(py(),Mat)||t==(my(),Tat))throw hv(new vM("Invalid range: "+N5(n,t)))}function qyn(n){var t,e;for(this.b=new Zm,this.c=n,this.a=!1,e=new Ww(n.a);e.a0),(t&-t)==t)return t0(t*uRn(n,31)*4.656612873077393e-10);do{i=(e=uRn(n,31))%t}while(e-i+(t-1)<0);return t0(i)}function rMn(n,t,e){switch(e.g){case 1:n.a=t.a/2,n.b=0;break;case 2:n.a=t.a,n.b=t.b/2;break;case 3:n.a=t.a/2,n.b=t.b;break;case 4:n.a=0,n.b=t.b/2}}function cMn(n,t,e,i){var r,c;for(r=t;r1&&(r=Xyn(n,t)),r}function sMn(n){var t;return new MO(t=uM(pK(zDn(n,(XYn(),BDt))))*e.Math.sqrt((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a).i),t/uM(pK(zDn(n,_Dt))))}function hMn(n){var t;return n.f&&n.f.Vh()&&(t=uG(n.f,54),n.f=uG(mwn(n,t),84),n.f!=t&&0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,9,8,t,n.f))),n.f}function fMn(n){var t;return n.i&&n.i.Vh()&&(t=uG(n.i,54),n.i=uG(mwn(n,t),84),n.i!=t&&0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,9,7,t,n.i))),n.i}function lMn(n){var t;return n.b&&0!=(64&n.b.Db)&&(t=n.b,n.b=uG(mwn(n,t),19),n.b!=t&&0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,9,21,t,n.b))),n.b}function bMn(n,t){var e,i,r;null==n.d?(++n.e,++n.f):(i=t.Bi(),eKn(n,n.f+1),r=(i&vZn)%n.d.length,!(e=n.d[r])&&(e=n.d[r]=n.dk()),e.Fc(t),++n.f)}function wMn(n,t,e){var i;return!t.tk()&&(-2!=t.Ik()?null==(i=t.ik())?null==e:udn(i,e):t.qk()==n.e.Dh()&&null==e)}function dMn(){var n;man(16,b1n),n=aon(16),this.b=Inn(Cat,l1n,302,n,0,1),this.c=Inn(Cat,l1n,302,n,0,1),this.a=null,this.e=null,this.i=0,this.f=n-1,this.g=0}function gMn(n){LF.call(this),this.k=(zIn(),dbt),this.j=(man(6,g1n),new R7(6)),this.b=(man(2,g1n),new R7(2)),this.d=new $k,this.f=new xk,this.a=n}function pMn(n){var t,e;n.c.length<=1||(iAn(n,uG((t=w_n(n,(KQn(),KRt))).a,17).a,uG(t.b,17).a),iAn(n,uG((e=w_n(n,_Rt)).a,17).a,uG(e.b,17).a))}function mMn(n,t,e){var i,r;for(i=(r=n.a.b).c.length;i102?-1:n<=57?n-48:n<65?-1:n<=70?n-65+10:n<97?-1:n-97+10}function IMn(n,t){if(null==n)throw hv(new MM("null key in entry: null="+t));if(null==t)throw hv(new MM("null value in entry: "+n+"=null"))}function OMn(n,t){for(var e,i;n.Ob();){if(!t.Ob())return!1;if(e=n.Pb(),i=t.Pb(),!(xA(e)===xA(i)||null!=e&&udn(e,i)))return!1}return!t.Ob()}function AMn(n,t){var i;return i=Uhn(cT(eUt,1),I0n,28,15,[Nbn(n.a[0],t),Nbn(n.a[1],t),Nbn(n.a[2],t)]),n.d&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function LMn(n,t){var i;return i=Uhn(cT(eUt,1),I0n,28,15,[$bn(n.a[0],t),$bn(n.a[1],t),$bn(n.a[2],t)]),n.d&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function NMn(n,t,e){L_(uG(oIn(t,(jYn(),JMt)),101))||(Z8(n,t,yOn(t,e)),Z8(n,t,yOn(t,(KQn(),KRt))),Z8(n,t,yOn(t,yRt)),hZ(),f$(t.j,new Gg(n)))}function $Mn(n){var t,e;for(n.c||oVn(n),e=new Uk,N3(t=new Ww(n.a));t.a0&&(s3(0,t.length),43==t.charCodeAt(0))?(s3(1,t.length+1),t.substr(1)):t)}function nTn(n){var t;return null==n?null:new PN((t=yXn(n,!0)).length>0&&(s3(0,t.length),43==t.charCodeAt(0))?(s3(1,t.length+1),t.substr(1)):t)}function tTn(n,t,e,i,r,c,a,o){var u,s;i&&((u=i.a[0])&&tTn(n,t,e,u,r,c,a,o),ljn(n,e,i.d,r,c,a,o)&&t.Fc(i),(s=i.a[1])&&tTn(n,t,e,s,r,c,a,o))}function eTn(n,t,e){try{return _A(Son(n,t,e),1)}catch(i){throw F$(i=Ehn(i),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(i)}}function iTn(n,t,e){try{return _A(Son(n,t,e),0)}catch(i){throw F$(i=Ehn(i),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(i)}}function rTn(n,t,e){try{return _A(Son(n,t,e),2)}catch(i){throw F$(i=Ehn(i),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(i)}}function cTn(n,t){if(-1==n.g)throw hv(new xv);n.Xj();try{n.d.hd(n.g,t),n.f=n.d.j}catch(e){throw F$(e=Ehn(e),77)?hv(new Fv):hv(e)}}function aTn(n){var t,e,i;for(e=new Ww(n.b);e.ac&&uQ(t,c,null),t}function uTn(n,t){var e,i;if(i=n.gc(),null==t){for(e=0;e0&&(u+=r),s[h]=a,a+=o*(u+i)}function TTn(n){var t,e,i;for(i=n.f,n.n=Inn(eUt,I0n,28,i,15,1),n.d=Inn(eUt,I0n,28,i,15,1),t=0;t0?n.c:0),++c;n.b=r,n.d=a}function ATn(n,t){var i;return i=Uhn(cT(eUt,1),I0n,28,15,[eMn(n,(Yrn(),jst),t),eMn(n,Est,t),eMn(n,Sst,t)]),n.f&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function LTn(n,t,e){try{HBn(n,t+n.j,e+n.k,!1,!0)}catch(i){throw F$(i=Ehn(i),77)?hv(new dM(i.g+g3n+t+TZn+e+").")):hv(i)}}function NTn(n,t,e){try{HBn(n,t+n.j,e+n.k,!0,!1)}catch(i){throw F$(i=Ehn(i),77)?hv(new dM(i.g+g3n+t+TZn+e+").")):hv(i)}}function $Tn(n){var t;vR(n,(jYn(),PMt))&&((t=uG(oIn(n,PMt),21)).Hc((VDn(),Bxt))?(t.Mc(Bxt),t.Fc(Uxt)):t.Hc(Uxt)&&(t.Mc(Uxt),t.Fc(Bxt)))}function DTn(n){var t;vR(n,(jYn(),PMt))&&((t=uG(oIn(n,PMt),21)).Hc((VDn(),Vxt))?(t.Mc(Vxt),t.Fc(Xxt)):t.Hc(Xxt)&&(t.Mc(Xxt),t.Fc(Vxt)))}function xTn(n,t,e,i){var r,c,a;return null==n.a&&nOn(n,t),a=t.b.j.c.length,c=e.d.p,(r=i.d.p-1)<0&&(r=a-1),c<=r?n.a[r]-n.a[c]:n.a[a-1]-n.a[c]+n.a[r]}function RTn(n){var t,e;if(!n.b)for(n.b=o6(uG(n.f,27).kh().i),e=new DD(uG(n.f,27).kh());e.e!=e.i.gc();)t=uG(Zkn(e),135),kD(n.b,new Wy(t));return n.b}function KTn(n){var t,e;if(!n.e)for(n.e=o6(RJ(uG(n.f,27)).i),e=new DD(RJ(uG(n.f,27)));e.e!=e.i.gc();)t=uG(Zkn(e),123),kD(n.e,new Jp(t));return n.e}function FTn(n){var t,e;if(!n.a)for(n.a=o6(wZ(uG(n.f,27)).i),e=new DD(wZ(uG(n.f,27)));e.e!=e.i.gc();)t=uG(Zkn(e),27),kD(n.a,new Wx(n,t));return n.a}function _Tn(n){var t;if(!n.C&&(null!=n.D||null!=n.B))if(t=KWn(n))n.hl(t);else try{n.hl(null)}catch(e){if(!F$(e=Ehn(e),63))throw hv(e)}return n.C}function BTn(n){switch(n.q.g){case 5:QEn(n,(KQn(),yRt)),QEn(n,KRt);break;case 4:TVn(n,(KQn(),yRt)),TVn(n,KRt);break;default:PAn(n,(KQn(),yRt)),PAn(n,KRt)}}function HTn(n){switch(n.q.g){case 5:JEn(n,(KQn(),kRt)),JEn(n,_Rt);break;case 4:jVn(n,(KQn(),kRt)),jVn(n,_Rt);break;default:CAn(n,(KQn(),kRt)),CAn(n,_Rt)}}function UTn(n,t){var i,r,c;for(c=new sj,r=n.Kc();r.Ob();)tHn(i=uG(r.Pb(),36),c.a,0),c.a+=i.f.a+t,c.b=e.Math.max(c.b,i.f.b);return c.b>0&&(c.b+=t),c}function GTn(n,t){var i,r,c;for(c=new sj,r=n.Kc();r.Ob();)tHn(i=uG(r.Pb(),36),0,c.b),c.b+=i.f.b+t,c.a=e.Math.max(c.a,i.f.a);return c.a>0&&(c.a+=t),c}function qTn(n){var t,i,r;for(r=vZn,i=new Ww(n.a);i.a>16==6?n.Cb.Th(n,5,fFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||n.ii(),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function WTn(n){EZ();var t=n.e;if(t&&t.stack){var e=t.stack,i=t+"\n";return e.substring(0,i.length)==i&&(e=e.substring(i.length)),e.split("\n")}return[]}function QTn(n){var t;return Tan(),(t=wot)[n>>>28]|t[n>>24&15]<<4|t[n>>20&15]<<8|t[n>>16&15]<<12|t[n>>12&15]<<16|t[n>>8&15]<<20|t[n>>4&15]<<24|t[15&n]<<28}function JTn(n){var t,i,r;n.b==n.c&&(r=n.a.length,i=pfn(e.Math.max(8,r))<<1,0!=n.b?(Pon(n,t=MF(n.a,i),r),n.a=t,n.b=0):Xv(n.a,i),n.c=r)}function YTn(n,t){var e;return(e=n.b).pf((XYn(),uDt))?e.ag()==(KQn(),_Rt)?-e.Mf().a-uM(pK(e.of(uDt))):t+uM(pK(e.of(uDt))):e.ag()==(KQn(),_Rt)?-e.Mf().a:t}function ZTn(n){var t;return 0!=n.b.c.length&&uG(zq(n.b,0),72).a?uG(zq(n.b,0),72).a:null!=(t=sY(n))?t:""+(n.c?Ten(n.c.a,n,0):-1)}function njn(n){var t;return 0!=n.f.c.length&&uG(zq(n.f,0),72).a?uG(zq(n.f,0),72).a:null!=(t=sY(n))?t:""+(n.i?Ten(n.i.j,n,0):-1)}function tjn(n,t){var e,i;if(t<0||t>=n.gc())return null;for(e=t;e0?n.c:0),c=e.Math.max(c,t.d),++r;n.e=a,n.b=c}function rjn(n){var t,e;if(!n.b)for(n.b=o6(uG(n.f,123).kh().i),e=new DD(uG(n.f,123).kh());e.e!=e.i.gc();)t=uG(Zkn(e),135),kD(n.b,new Wy(t));return n.b}function cjn(n,t){var e,i,r;if(t.dc())return EK(),EK(),KFt;for(e=new cF(n,t.gc()),r=new DD(n);r.e!=r.i.gc();)i=Zkn(r),t.Hc(i)&&ttn(e,i);return e}function ajn(n,t,e,i){return 0==t?i?(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),n.o):(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),Tnn(n.o)):Dyn(n,t,e,i)}function ojn(n){var t,e;if(n.rb)for(t=0,e=n.rb.i;t>22))>>22)<0||(n.l=e&f0n,n.m=i&f0n,n.h=r&l0n,0)))}function ljn(n,t,e,i,r,c,a){var o,u;return!(t.Te()&&(u=n.a.Ne(e,i),u<0||!r&&0==u)||t.Ue()&&(o=n.a.Ne(e,c),o>0||!a&&0==o))}function bjn(n,t){if(Cln(),0!=n.j.g-t.j.g)return 0;switch(n.j.g){case 2:return Wgn(t,edt)-Wgn(n,edt);case 4:return Wgn(n,tdt)-Wgn(t,tdt)}return 0}function wjn(n){switch(n.g){case 0:return jgt;case 1:return Egt;case 2:return Sgt;case 3:return Pgt;case 4:return Cgt;case 5:return Igt;default:return null}}function djn(n,t,e){var i,r;return Kbn(r=new ny,t),qon(r,e),ttn((!n.c&&(n.c=new fV(m_t,n,12,10)),n.c),r),Pcn(i=r,0),Ccn(i,1),mdn(i,!0),ddn(i,!0),i}function gjn(n,t){var e,i;if(t>=n.i)throw hv(new pL(t,n.i));return++n.j,e=n.g[t],(i=n.i-t-1)>0&&qGn(n.g,t+1,n.g,t,i),uQ(n.g,--n.i,null),n.Qi(t,e),n.Ni(),e}function pjn(n,t){var e;return n.Db>>16==17?n.Cb.Th(n,21,h_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||n.ii(),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function mjn(n){var t,e,i;for(hZ(),f$(n.c,n.a),i=new Ww(n.c);i.ae.a.c.length))throw hv(new vM("index must be >= 0 and <= layer node count"));n.c&&men(n.c.a,n),n.c=e,e&&GX(e.a,t,n)}function Djn(n,t){var e,i,r;for(i=new Fz(ix(Ggn(n).a.Kc(),new h));hDn(i);)return e=uG(N9(i),18),new Ul(WW((r=uG(t.Kb(e),10)).n.b+r.o.b/2));return gy(),gy(),wat}function xjn(n,t){this.c=new Ym,this.a=n,this.b=t,this.d=uG(oIn(n,(GYn(),kmt)),312),xA(oIn(n,(jYn(),CMt)))===xA((Wtn(),Lgt))?this.e=new Pk:this.e=new Sk}function Rjn(n,t){var e,i;return i=null,n.pf((XYn(),ODt))&&(e=uG(n.of(ODt),96)).pf(t)&&(i=e.of(t)),null==i&&n.Tf()&&(i=n.Tf().of(t)),null==i&&(i=Jkn(t)),i}function Kjn(n,t){var e,i;e=n.fd(t);try{return i=e.Pb(),e.Qb(),i}catch(r){throw F$(r=Ehn(r),112)?hv(new dM("Can't remove element "+t)):hv(r)}}function Fjn(n,t){var e,i,r;if(0==(e=Wqn(n,t,r=new Lfn((i=new QE).q.getFullYear()-V1n,i.q.getMonth(),i.q.getDate())))||e0?t:0),++i;return new MO(r,c)}function zjn(n,t){var e;return n.Db>>16==6?n.Cb.Th(n,6,aFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),BKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Vjn(n,t){var e;return n.Db>>16==7?n.Cb.Th(n,1,iFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),UKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Wjn(n,t){var e;return n.Db>>16==9?n.Cb.Th(n,9,bFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),qKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Qjn(n,t){var e;return n.Db>>16==5?n.Cb.Th(n,9,w_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),O_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Jjn(n,t){var e;return n.Db>>16==7?n.Cb.Th(n,6,fFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),F_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Yjn(n,t){var e;return n.Db>>16==3?n.Cb.Th(n,0,uFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),T_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Zjn(){this.a=new ss,this.g=new dMn,this.j=new dMn,this.b=new Ym,this.d=new dMn,this.i=new dMn,this.k=new Ym,this.c=new Ym,this.e=new Ym,this.f=new Ym}function nEn(n,t,e){var i,r,c;for(e<0&&(e=0),c=n.i,r=e;rO0n)return eEn(n,i);if(i==n)return!0}}return!1}function iEn(n){switch(Gx(),n.q.g){case 5:uNn(n,(KQn(),yRt)),uNn(n,KRt);break;case 4:Kxn(n,(KQn(),yRt)),Kxn(n,KRt);break;default:$Qn(n,(KQn(),yRt)),$Qn(n,KRt)}}function rEn(n){switch(Gx(),n.q.g){case 5:k$n(n,(KQn(),kRt)),k$n(n,_Rt);break;case 4:fyn(n,(KQn(),kRt)),fyn(n,_Rt);break;default:DQn(n,(KQn(),kRt)),DQn(n,_Rt)}}function cEn(n){var t,e;(t=uG(oIn(n,(cGn(),Dft)),17))?(e=t.a,kfn(n,(mon(),Qft),0==e?new Upn:new v8(e))):kfn(n,(mon(),Qft),new v8(1))}function aEn(n,t){var e;switch(e=n.i,t.g){case 1:return-(n.n.b+n.o.b);case 2:return n.n.a-e.o.a;case 3:return n.n.b-e.o.b;case 4:return-(n.n.a+n.o.a)}return 0}function oEn(n,t){switch(n.g){case 0:return t==(Gpn(),Imt)?qwt:Xwt;case 1:return t==(Gpn(),Imt)?qwt:Gwt;case 2:return t==(Gpn(),Imt)?Gwt:Xwt;default:return Gwt}}function uEn(n,t){var i,r,c;for(men(n.a,t),n.e-=t.r+(0==n.a.c.length?0:n.c),c=b7n,r=new Ww(n.a);r.a>16==3?n.Cb.Th(n,12,bFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),_Kt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function hEn(n,t){var e;return n.Db>>16==11?n.Cb.Th(n,10,bFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),GKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function fEn(n,t){var e;return n.Db>>16==10?n.Cb.Th(n,11,h_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),R_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function lEn(n,t){var e;return n.Db>>16==10?n.Cb.Th(n,12,p_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),__t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function bEn(n){var t;return 0==(1&n.Bb)&&n.r&&n.r.Vh()&&(t=uG(n.r,54),n.r=uG(mwn(n,t),142),n.r!=t&&0!=(4&n.Db)&&0==(1&n.Db)&&Msn(n,new lV(n,9,8,t,n.r))),n.r}function wEn(n,t,i){var r;return r=Uhn(cT(eUt,1),I0n,28,15,[BCn(n,(Yrn(),jst),t,i),BCn(n,Est,t,i),BCn(n,Sst,t,i)]),n.f&&(r[0]=e.Math.max(r[0],r[2]),r[2]=r[0]),r}function dEn(n,t){var e,i,r;if(0!=(r=lyn(n,t)).c.length)for(f$(r,new ti),e=r.c.length,i=0;i>19)!=(o=t.h>>19)?o-a:(i=n.h)!=(c=t.h)?i-c:(e=n.m)!=(r=t.m)?e-r:n.l-t.l}function MEn(){MEn=E,W_n(),ost=new mL($2n,ust=dst),Xin(),cst=new mL(D2n,ast=Zut),_kn(),ist=new mL(x2n,rst=Wut),est=new mL(R2n,(qx(),!0))}function TEn(n,t,e){var i,r;i=t*e,F$(n.g,154)?(r=Q6(n)).f.d?r.f.a||(n.d.a+=i+Z2n):(n.d.d-=i+Z2n,n.d.a+=i+Z2n):F$(n.g,10)&&(n.d.d-=i,n.d.a+=2*i)}function jEn(n,t,i){var r,c,a,o,u;for(c=n[i.g],u=new Ww(t.d);u.a0?n.b:0),++i;t.b=r,t.e=c}function SEn(n){var t,e,i;if(i=n.b,aS(n.i,i.length)){for(e=2*i.length,n.b=Inn(Cat,l1n,302,e,0,1),n.c=Inn(Cat,l1n,302,e,0,1),n.f=e-1,n.i=0,t=n.a;t;t=t.c)HLn(n,t,t);++n.g}}function PEn(n,t,e,i){var r,c,a,o;for(r=0;ro&&(u=o/r),(c=e.Math.abs(n.b))>a&&(s=a/c),vD(n,e.Math.min(u,s)),n}function AEn(){var n,t;tXn();try{if(t=uG(ASn((MP(),l_t),aet),2113))return t}catch(e){if(!F$(e=Ehn(e),103))throw hv(e);n=e,AW((t$(),n))}return new rs}function LEn(){var n,t;tXn();try{if(t=uG(ASn((MP(),l_t),Drt),2040))return t}catch(e){if(!F$(e=Ehn(e),103))throw hv(e);n=e,AW((t$(),n))}return new _s}function NEn(){var n,t;Ftn();try{if(t=uG(ASn((MP(),l_t),lct),2122))return t}catch(e){if(!F$(e=Ehn(e),103))throw hv(e);n=e,AW((t$(),n))}return new Nh}function $En(n,t,e){var i,r;return r=n.e,n.e=t,0!=(4&n.Db)&&0==(1&n.Db)&&(i=new lV(n,1,4,r,t),e?e.nj(i):e=i),r!=t&&(e=PWn(n,t?bRn(n,t):n.a,e)),e}function DEn(){QE.call(this),this.e=-1,this.a=!1,this.p=j1n,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=j1n}function xEn(n,t){var e,i,r;if(i=n.b.d.d,n.a||(i+=n.b.d.a),r=t.b.d.d,t.a||(r+=t.b.d.a),0==(e=ugn(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function REn(n,t){var e,i,r;if(i=n.b.b.d,n.a||(i+=n.b.b.a),r=t.b.b.d,t.a||(r+=t.b.b.a),0==(e=ugn(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function KEn(n,t){var e,i,r;if(i=n.b.g.d,n.a||(i+=n.b.g.a),r=t.b.g.d,t.a||(r+=t.b.g.a),0==(e=ugn(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function FEn(){FEn=E,klt=wz(Aq(Aq(Aq(new wJ,(uIn(),Slt),(zYn(),owt)),Slt,fwt),Plt,mwt),Plt,Wbt),Mlt=Aq(Aq(new wJ,Slt,Fbt),Slt,Qbt),ylt=wz(new wJ,Plt,Ybt)}function _En(n){var t,e,i,r,c;for(t=uG(oIn(n,(GYn(),$pt)),85),c=n.n,i=t.Cc().Kc();i.Ob();)(r=(e=uG(i.Pb(),314)).i).c+=c.a,r.d+=c.b,e.c?P_n(e):C_n(e);kfn(n,$pt,null)}function BEn(n,t,e){var i,r;switch(i=(r=n.b).d,t.g){case 1:return-i.d-e;case 2:return r.o.a+i.c+e;case 3:return r.o.b+i.a+e;case 4:return-i.b-e;default:return-1}}function HEn(n,t,e){var i;for(e.Ug("Interactive node placement",1),n.a=uG(oIn(t,(GYn(),kmt)),312),i=new Ww(t.b);i.a0&&(r=ZNn(n,(c&vZn)%n.d.length,c,t))?r.nd(e):(i=n.ck(c,t,e),n.c.Fc(i),null)}function cSn(n,t){var e,i,r,c;switch(tdn(n,t).Kl()){case 3:case 2:for(r=0,c=(e=hXn(t)).i;r=0;r--)if(m_(n[r].d,t)||m_(n[r].d,i)){n.length>=r+1&&n.splice(0,r+1);break}return n}function bSn(n,t){var i;return _L(n)&&_L(t)&&p0n<(i=n/t)&&i