diff --git a/cypress/integration/rendering/flowchart.spec.js b/cypress/integration/rendering/flowchart.spec.js
index 22f51fcca..0bae442e1 100644
--- a/cypress/integration/rendering/flowchart.spec.js
+++ b/cypress/integration/rendering/flowchart.spec.js
@@ -685,4 +685,13 @@ describe('Flowchart', () => {
{ flowchart: { diagramPadding: 0 } }
);
});
+
+ it('34: testing the label width in percy', () => {
+ imgSnapshotTest(
+ `graph TD
+ A[Christmas]
+ `,
+ { }
+ );
+ });
});
diff --git a/dist/mermaid.core.js b/dist/mermaid.core.js
index e01be46ce..7974fb658 100644
--- a/dist/mermaid.core.js
+++ b/dist/mermaid.core.js
@@ -96,162 +96,6 @@ return /******/ (function(modules) { // webpackBootstrap
/************************************************************************/
/******/ ({
-/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/dark/index.scss":
-/*!*****************************************************************************************************************!*\
- !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/dark/index.scss ***!
- \*****************************************************************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
-// Module
-exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n/* state colors */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon,\n.node path {\n fill: #1f2020;\n stroke: #81B1DB;\n stroke-width: 1px; }\n\n.node .label {\n text-align: center; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: lightgrey; }\n\n.edgePath .path {\n stroke: lightgrey;\n stroke-width: 1.5px; }\n\n.flowchart-link {\n stroke: lightgrey;\n fill: none; }\n\n.edgeLabel {\n background-color: #e8e8e8;\n text-align: center; }\n .edgeLabel rect {\n opacity: 0.5; }\n\n.cluster rect {\n fill: #474949;\n stroke: rgba(255, 255, 255, 0.25);\n stroke-width: 1px; }\n\n.cluster text {\n fill: #F9FFFE; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: #474949;\n border: 1px solid rgba(255, 255, 255, 0.25);\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #81B1DB;\n fill: #1f2020; }\n\ntext.actor > tspan {\n fill: lightgrey;\n stroke: none; }\n\n.actor-line {\n stroke: lightgrey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: lightgrey; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: lightgrey; }\n\n#arrowhead path {\n fill: lightgrey;\n stroke: lightgrey; }\n\n.sequenceNumber {\n fill: black; }\n\n#sequencenumber {\n fill: lightgrey; }\n\n#crosshead path {\n fill: lightgrey;\n stroke: lightgrey; }\n\n.messageText {\n fill: lightgrey;\n stroke: lightgrey; }\n\n.labelBox {\n stroke: #81B1DB;\n fill: #1f2020; }\n\n.labelText, .labelText > tspan {\n fill: lightgrey;\n stroke: none; }\n\n.loopText, .loopText > tspan {\n fill: lightgrey;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: #81B1DB;\n fill: #81B1DB; }\n\n.note {\n stroke: rgba(255, 255, 255, 0.25);\n fill: #fff5ad; }\n\n.noteText, .noteText > tspan {\n fill: #1f2020;\n stroke: none; }\n\n.activation0 {\n fill: #474949;\n stroke: #81B1DB; }\n\n.activation1 {\n fill: #474949;\n stroke: #81B1DB; }\n\n.activation2 {\n fill: #474949;\n stroke: #81B1DB; }\n\n/** Section styling */\n.mermaid-main-font {\n font-family: \"trebuchet ms\", verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: rgba(255, 255, 255, 0.3); }\n\n.section2 {\n fill: #EAE8B9; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #F9FFFE; }\n\n.sectionTitle1 {\n fill: #F9FFFE; }\n\n.sectionTitle2 {\n fill: #F9FFFE; }\n\n.sectionTitle3 {\n fill: #F9FFFE; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.8;\n shape-rendering: crispEdges; }\n .grid .tick text {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: #DB5757;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskText:not([font-size]) {\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: #323D47;\n text-anchor: start;\n font-size: 11px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskTextOutsideLeft {\n fill: #323D47;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: #323D47; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #1f2020;\n stroke: rgba(255, 255, 255, 0.5); }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: lightgrey; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: lightgrey; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #81B1DB;\n stroke: rgba(255, 255, 255, 0.5); }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: #323D47 !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: grey;\n fill: lightgrey;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: #323D47 !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #E83737;\n fill: #E83737;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #E83737;\n fill: #81B1DB;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #E83737;\n fill: lightgrey;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: #323D47 !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: #323D47 !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: #323D47;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.classGroup text {\n fill: #81B1DB;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 10px; }\n g.classGroup text .title {\n font-weight: bolder; }\n\ng.clickable {\n cursor: pointer; }\n\ng.classGroup rect {\n fill: #1f2020;\n stroke: #81B1DB; }\n\ng.classGroup line {\n stroke: #81B1DB;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #1f2020;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: #81B1DB;\n font-size: 10px; }\n\n.relation {\n stroke: #81B1DB;\n stroke-width: 1;\n fill: none; }\n\n.dashed-line {\n stroke-dasharray: 3; }\n\n#compositionStart {\n fill: #81B1DB;\n stroke: #81B1DB;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: #81B1DB;\n stroke: #81B1DB;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #1f2020;\n stroke: #81B1DB;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #1f2020;\n stroke: #81B1DB;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: #81B1DB;\n stroke: #81B1DB;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: #81B1DB;\n stroke: #81B1DB;\n stroke-width: 1; }\n\n#extensionStart {\n fill: #81B1DB;\n stroke: #81B1DB;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: #81B1DB;\n stroke: #81B1DB;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: #323D47;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.slice {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #81B1DB;\n stroke: none;\n font-size: 10px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #81B1DB;\n stroke: none;\n font-size: 10px; }\n\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: black; }\n\ng.stateGroup rect {\n fill: #1f2020;\n stroke: #81B1DB; }\n\ng.stateGroup line {\n stroke: #81B1DB;\n stroke-width: 1; }\n\n.transition {\n stroke: #81B1DB;\n stroke-width: 1;\n fill: none; }\n\n.stateGroup .composit {\n fill: white;\n border-bottom: 1px; }\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px; }\n\n.state-note {\n stroke: rgba(255, 255, 255, 0.25);\n fill: #fff5ad; }\n .state-note text {\n fill: black;\n stroke: none;\n font-size: 10px; }\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #1f2020;\n opacity: 0.5; }\n\n.stateLabel text {\n fill: black;\n font-size: 10px;\n font-weight: bold;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.node circle.state-start {\n fill: black;\n stroke: black; }\n\n.node circle.state-end {\n fill: black;\n stroke: white;\n stroke-width: 1.5; }\n\n#statediagram-barbEnd {\n fill: #81B1DB; }\n\n.statediagram-cluster rect {\n fill: #1f2020;\n stroke: #81B1DB;\n stroke-width: 1px; }\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px; }\n\n.statediagram-state .divider {\n stroke: #81B1DB; }\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px; }\n\n.statediagram-cluster.statediagram-cluster .inner {\n fill: white; }\n\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: #e0e0e0; }\n\n.statediagram-cluster .inner {\n rx: 0;\n ry: 0; }\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: #efefef; }\n\n.note-edge {\n stroke-dasharray: 5; }\n\n.statediagram-note rect {\n fill: #fff5ad;\n stroke: rgba(255, 255, 255, 0.25);\n stroke-width: 1px;\n rx: 0;\n ry: 0; }\n\n:root {\n --mermaid-font-family: '\"trebuchet ms\", verdana, arial';\n --mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive; }\n\n/* Classes common for multiple diagrams */\n.error-icon {\n fill: #a44141; }\n\n.error-text {\n fill: #ddd;\n stroke: #ddd; }\n\n.edge-thickness-normal {\n stroke-width: 2px; }\n\n.edge-thickness-thick {\n stroke-width: 3.5px; }\n\n.edge-pattern-solid {\n stroke-dasharray: 0; }\n\n.edge-pattern-dashed {\n stroke-dasharray: 3; }\n\n.edge-pattern-dotted {\n stroke-dasharray: 2; }\n\n.marker {\n fill: lightgrey; }\n\n.marker.cross {\n stroke: lightgrey; }\n", ""]);
-
-
-
-/***/ }),
-
-/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/default/index.scss":
-/*!********************************************************************************************************************!*\
- !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/default/index.scss ***!
- \********************************************************************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
-// Module
-exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n/* state colors */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon,\n.node path {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1px; }\n\n.node .label {\n text-align: center; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: #333333; }\n\n.edgePath .path {\n stroke: #333333;\n stroke-width: 1.5px; }\n\n.flowchart-link {\n stroke: #333333;\n fill: none; }\n\n.edgeLabel {\n background-color: #e8e8e8;\n text-align: center; }\n .edgeLabel rect {\n opacity: 0.5; }\n\n.cluster rect {\n fill: #ffffde;\n stroke: #aaaa33;\n stroke-width: 1px; }\n\n.cluster text {\n fill: #333; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: #ffffde;\n border: 1px solid #aaaa33;\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #CCCCFF;\n fill: #ECECFF; }\n\ntext.actor > tspan {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: grey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: #333; }\n\n#arrowhead path {\n fill: #333;\n stroke: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333;\n stroke: #333; }\n\n.messageText {\n fill: #333;\n stroke: #333; }\n\n.labelBox {\n stroke: #CCCCFF;\n fill: #ECECFF; }\n\n.labelText, .labelText > tspan {\n fill: black;\n stroke: none; }\n\n.loopText, .loopText > tspan {\n fill: black;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: #CCCCFF;\n fill: #CCCCFF; }\n\n.note {\n stroke: #aaaa33;\n fill: #fff5ad; }\n\n.noteText, .noteText > tspan {\n fill: black;\n stroke: none; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.mermaid-main-font {\n font-family: \"trebuchet ms\", verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: rgba(102, 102, 255, 0.49); }\n\n.section2 {\n fill: #fff400; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #333; }\n\n.sectionTitle1 {\n fill: #333; }\n\n.sectionTitle2 {\n fill: #333; }\n\n.sectionTitle3 {\n fill: #333; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.8;\n shape-rendering: crispEdges; }\n .grid .tick text {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: red;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskText:not([font-size]) {\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: black;\n text-anchor: start;\n font-size: 11px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskTextOutsideLeft {\n fill: black;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: white; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #8a90dd;\n stroke: #534fbc; }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: black; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: black; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #bfc7ff;\n stroke: #534fbc; }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: black !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: grey;\n fill: lightgrey;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: black !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #ff8888;\n fill: red;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #ff8888;\n fill: #bfc7ff;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #ff8888;\n fill: lightgrey;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: black !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: black !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: black;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.classGroup text {\n fill: #9370DB;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 10px; }\n g.classGroup text .title {\n font-weight: bolder; }\n\ng.clickable {\n cursor: pointer; }\n\ng.classGroup rect {\n fill: #ECECFF;\n stroke: #9370DB; }\n\ng.classGroup line {\n stroke: #9370DB;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #ECECFF;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: #9370DB;\n font-size: 10px; }\n\n.relation {\n stroke: #9370DB;\n stroke-width: 1;\n fill: none; }\n\n.dashed-line {\n stroke-dasharray: 3; }\n\n#compositionStart {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#extensionStart {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: black;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.slice {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #9370DB;\n stroke: none;\n font-size: 10px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #9370DB;\n stroke: none;\n font-size: 10px; }\n\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: black; }\n\ng.stateGroup rect {\n fill: #ECECFF;\n stroke: #9370DB; }\n\ng.stateGroup line {\n stroke: #9370DB;\n stroke-width: 1; }\n\n.transition {\n stroke: #9370DB;\n stroke-width: 1;\n fill: none; }\n\n.stateGroup .composit {\n fill: white;\n border-bottom: 1px; }\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px; }\n\n.state-note {\n stroke: #aaaa33;\n fill: #fff5ad; }\n .state-note text {\n fill: black;\n stroke: none;\n font-size: 10px; }\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #ECECFF;\n opacity: 0.5; }\n\n.stateLabel text {\n fill: black;\n font-size: 10px;\n font-weight: bold;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.node circle.state-start {\n fill: black;\n stroke: black; }\n\n.node circle.state-end {\n fill: black;\n stroke: white;\n stroke-width: 1.5; }\n\n#statediagram-barbEnd {\n fill: #9370DB; }\n\n.statediagram-cluster rect {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1px; }\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px; }\n\n.statediagram-state .divider {\n stroke: #9370DB; }\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px; }\n\n.statediagram-cluster.statediagram-cluster .inner {\n fill: white; }\n\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: #e0e0e0; }\n\n.statediagram-cluster .inner {\n rx: 0;\n ry: 0; }\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: #efefef; }\n\n.note-edge {\n stroke-dasharray: 5; }\n\n.statediagram-note rect {\n fill: #fff5ad;\n stroke: #aaaa33;\n stroke-width: 1px;\n rx: 0;\n ry: 0; }\n\n:root {\n --mermaid-font-family: '\"trebuchet ms\", verdana, arial';\n --mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive; }\n\n/* Classes common for multiple diagrams */\n.error-icon {\n fill: #552222; }\n\n.error-text {\n fill: #552222;\n stroke: #552222; }\n\n.edge-thickness-normal {\n stroke-width: 2px; }\n\n.edge-thickness-thick {\n stroke-width: 3.5px; }\n\n.edge-pattern-solid {\n stroke-dasharray: 0; }\n\n.edge-pattern-dashed {\n stroke-dasharray: 3; }\n\n.edge-pattern-dotted {\n stroke-dasharray: 2; }\n\n.marker {\n fill: #333333; }\n\n.marker.cross {\n stroke: #333333; }\n", ""]);
-
-
-
-/***/ }),
-
-/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/forest/index.scss":
-/*!*******************************************************************************************************************!*\
- !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/forest/index.scss ***!
- \*******************************************************************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
-// Module
-exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n/* state colors */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon,\n.node path {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1px; }\n\n.node .label {\n text-align: center; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: green; }\n\n.edgePath .path {\n stroke: green;\n stroke-width: 1.5px; }\n\n.flowchart-link {\n stroke: green;\n fill: none; }\n\n.edgeLabel {\n background-color: #e8e8e8;\n text-align: center; }\n .edgeLabel rect {\n opacity: 0.5; }\n\n.cluster rect {\n fill: #cdffb2;\n stroke: #6eaa49;\n stroke-width: 1px; }\n\n.cluster text {\n fill: #333; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: #cdffb2;\n border: 1px solid #6eaa49;\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #13540c;\n fill: #cde498; }\n\ntext.actor > tspan {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: grey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: #333; }\n\n#arrowhead path {\n fill: #333;\n stroke: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333;\n stroke: #333; }\n\n.messageText {\n fill: #333;\n stroke: #333; }\n\n.labelBox {\n stroke: #326932;\n fill: #cde498; }\n\n.labelText, .labelText > tspan {\n fill: black;\n stroke: none; }\n\n.loopText, .loopText > tspan {\n fill: black;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: #326932;\n fill: #326932; }\n\n.note {\n stroke: #6eaa49;\n fill: #fff5ad; }\n\n.noteText, .noteText > tspan {\n fill: black;\n stroke: none; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.mermaid-main-font {\n font-family: \"trebuchet ms\", verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: #6eaa49; }\n\n.section2 {\n fill: #6eaa49; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #333; }\n\n.sectionTitle1 {\n fill: #333; }\n\n.sectionTitle2 {\n fill: #333; }\n\n.sectionTitle3 {\n fill: #333; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.8;\n shape-rendering: crispEdges; }\n .grid .tick text {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: red;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskText:not([font-size]) {\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: black;\n text-anchor: start;\n font-size: 11px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskTextOutsideLeft {\n fill: black;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: white; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #487e3a;\n stroke: #13540c; }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: black; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: black; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #cde498;\n stroke: #13540c; }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: black !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: grey;\n fill: lightgrey;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: black !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #ff8888;\n fill: red;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #ff8888;\n fill: #cde498;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #ff8888;\n fill: lightgrey;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: black !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: black !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: black;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.classGroup text {\n fill: #13540c;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 10px; }\n g.classGroup text .title {\n font-weight: bolder; }\n\ng.clickable {\n cursor: pointer; }\n\ng.classGroup rect {\n fill: #cde498;\n stroke: #13540c; }\n\ng.classGroup line {\n stroke: #13540c;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #cde498;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: #13540c;\n font-size: 10px; }\n\n.relation {\n stroke: #13540c;\n stroke-width: 1;\n fill: none; }\n\n.dashed-line {\n stroke-dasharray: 3; }\n\n#compositionStart {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#extensionStart {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: black;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.slice {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #13540c;\n stroke: none;\n font-size: 10px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #13540c;\n stroke: none;\n font-size: 10px; }\n\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: black; }\n\ng.stateGroup rect {\n fill: #cde498;\n stroke: #13540c; }\n\ng.stateGroup line {\n stroke: #13540c;\n stroke-width: 1; }\n\n.transition {\n stroke: #13540c;\n stroke-width: 1;\n fill: none; }\n\n.stateGroup .composit {\n fill: white;\n border-bottom: 1px; }\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px; }\n\n.state-note {\n stroke: #6eaa49;\n fill: #fff5ad; }\n .state-note text {\n fill: black;\n stroke: none;\n font-size: 10px; }\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #cde498;\n opacity: 0.5; }\n\n.stateLabel text {\n fill: black;\n font-size: 10px;\n font-weight: bold;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.node circle.state-start {\n fill: black;\n stroke: black; }\n\n.node circle.state-end {\n fill: black;\n stroke: white;\n stroke-width: 1.5; }\n\n#statediagram-barbEnd {\n fill: #13540c; }\n\n.statediagram-cluster rect {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1px; }\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px; }\n\n.statediagram-state .divider {\n stroke: #13540c; }\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px; }\n\n.statediagram-cluster.statediagram-cluster .inner {\n fill: white; }\n\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: #e0e0e0; }\n\n.statediagram-cluster .inner {\n rx: 0;\n ry: 0; }\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: #efefef; }\n\n.note-edge {\n stroke-dasharray: 5; }\n\n.statediagram-note rect {\n fill: #fff5ad;\n stroke: #6eaa49;\n stroke-width: 1px;\n rx: 0;\n ry: 0; }\n\n:root {\n --mermaid-font-family: '\"trebuchet ms\", verdana, arial';\n --mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive; }\n\n/* Classes common for multiple diagrams */\n.error-icon {\n fill: #552222; }\n\n.error-text {\n fill: #552222;\n stroke: #552222; }\n\n.edge-thickness-normal {\n stroke-width: 2px; }\n\n.edge-thickness-thick {\n stroke-width: 3.5px; }\n\n.edge-pattern-solid {\n stroke-dasharray: 0; }\n\n.edge-pattern-dashed {\n stroke-dasharray: 3; }\n\n.edge-pattern-dotted {\n stroke-dasharray: 2; }\n\n.marker {\n fill: green; }\n\n.marker.cross {\n stroke: green; }\n", ""]);
-
-
-
-/***/ }),
-
-/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/neutral/index.scss":
-/*!********************************************************************************************************************!*\
- !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/neutral/index.scss ***!
- \********************************************************************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
-// Module
-exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n/* state colors */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon,\n.node path {\n fill: #eee;\n stroke: #999;\n stroke-width: 1px; }\n\n.node .label {\n text-align: center; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: #333333; }\n\n.edgePath .path {\n stroke: #666;\n stroke-width: 1.5px; }\n\n.flowchart-link {\n stroke: #666;\n fill: none; }\n\n.edgeLabel {\n background-color: white;\n text-align: center; }\n .edgeLabel rect {\n opacity: 0.5; }\n\n.cluster rect {\n fill: #eaf2fb;\n stroke: #26a;\n stroke-width: 1px; }\n\n.cluster text {\n fill: #333; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: #eaf2fb;\n border: 1px solid #26a;\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #999;\n fill: #eee; }\n\ntext.actor > tspan {\n fill: #333;\n stroke: none; }\n\n.actor-line {\n stroke: #666; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: #333; }\n\n#arrowhead path {\n fill: #333;\n stroke: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333;\n stroke: #333; }\n\n.messageText {\n fill: #333;\n stroke: #333; }\n\n.labelBox {\n stroke: #999;\n fill: #eee; }\n\n.labelText, .labelText > tspan {\n fill: #333;\n stroke: none; }\n\n.loopText, .loopText > tspan {\n fill: #333;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: #999;\n fill: #999; }\n\n.note {\n stroke: #777700;\n fill: #ffa; }\n\n.noteText, .noteText > tspan {\n fill: #333;\n stroke: none; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.mermaid-main-font {\n font-family: \"trebuchet ms\", verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: #80b3e6; }\n\n.section2 {\n fill: #80b3e6; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #333; }\n\n.sectionTitle1 {\n fill: #333; }\n\n.sectionTitle2 {\n fill: #333; }\n\n.sectionTitle3 {\n fill: #333; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n/* Grid and axis */\n.grid .tick {\n stroke: #e6e6e6;\n opacity: 0.8;\n shape-rendering: crispEdges; }\n .grid .tick text {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: #d42;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskText:not([font-size]) {\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: #333;\n text-anchor: start;\n font-size: 11px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskTextOutsideLeft {\n fill: #333;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: white; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #26a;\n stroke: #1a4d80; }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: #333; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: #333; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #eee;\n stroke: #1a4d80; }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: #333 !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: #666;\n fill: #bbb;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: #333 !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #b1361b;\n fill: #d42;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #b1361b;\n fill: #eee;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #b1361b;\n fill: #bbb;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: #333 !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: #333 !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: #333;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.classGroup text {\n fill: #999;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 10px; }\n g.classGroup text .title {\n font-weight: bolder; }\n\ng.clickable {\n cursor: pointer; }\n\ng.classGroup rect {\n fill: #eee;\n stroke: #999; }\n\ng.classGroup line {\n stroke: #999;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #eee;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: #999;\n font-size: 10px; }\n\n.relation {\n stroke: #999;\n stroke-width: 1;\n fill: none; }\n\n.dashed-line {\n stroke-dasharray: 3; }\n\n#compositionStart {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #eee;\n stroke: #999;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #eee;\n stroke: #999;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#extensionStart {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: #333;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.slice {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #999;\n stroke: none;\n font-size: 10px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #999;\n stroke: none;\n font-size: 10px; }\n\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: black; }\n\ng.stateGroup rect {\n fill: #eee;\n stroke: #999; }\n\ng.stateGroup line {\n stroke: #999;\n stroke-width: 1; }\n\n.transition {\n stroke: #999;\n stroke-width: 1;\n fill: none; }\n\n.stateGroup .composit {\n fill: white;\n border-bottom: 1px; }\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px; }\n\n.state-note {\n stroke: #777700;\n fill: #ffa; }\n .state-note text {\n fill: black;\n stroke: none;\n font-size: 10px; }\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #eee;\n opacity: 0.5; }\n\n.stateLabel text {\n fill: black;\n font-size: 10px;\n font-weight: bold;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.node circle.state-start {\n fill: black;\n stroke: black; }\n\n.node circle.state-end {\n fill: black;\n stroke: white;\n stroke-width: 1.5; }\n\n#statediagram-barbEnd {\n fill: #999; }\n\n.statediagram-cluster rect {\n fill: #eee;\n stroke: #999;\n stroke-width: 1px; }\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px; }\n\n.statediagram-state .divider {\n stroke: #999; }\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px; }\n\n.statediagram-cluster.statediagram-cluster .inner {\n fill: white; }\n\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: #e0e0e0; }\n\n.statediagram-cluster .inner {\n rx: 0;\n ry: 0; }\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: #efefef; }\n\n.note-edge {\n stroke-dasharray: 5; }\n\n.statediagram-note rect {\n fill: #ffa;\n stroke: #777700;\n stroke-width: 1px;\n rx: 0;\n ry: 0; }\n\n:root {\n --mermaid-font-family: '\"trebuchet ms\", verdana, arial';\n --mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive; }\n\n/* Classes common for multiple diagrams */\n.error-icon {\n fill: #552222; }\n\n.error-text {\n fill: #552222;\n stroke: #552222; }\n\n.edge-thickness-normal {\n stroke-width: 2px; }\n\n.edge-thickness-thick {\n stroke-width: 3.5px; }\n\n.edge-pattern-solid {\n stroke-dasharray: 0; }\n\n.edge-pattern-dashed {\n stroke-dasharray: 3; }\n\n.edge-pattern-dotted {\n stroke-dasharray: 2; }\n\n.marker {\n fill: #666; }\n\n.marker.cross {\n stroke: #666; }\n", ""]);
-
-
-
-/***/ }),
-
-/***/ "./node_modules/css-loader/dist/runtime/api.js":
-/*!*****************************************************!*\
- !*** ./node_modules/css-loader/dist/runtime/api.js ***!
- \*****************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-/*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
-*/
-// css base code, injected by the css-loader
-module.exports = function (useSourceMap) {
- var list = []; // return the list of modules as css string
-
- list.toString = function toString() {
- return this.map(function (item) {
- var content = cssWithMappingToString(item, useSourceMap);
-
- if (item[2]) {
- return '@media ' + item[2] + '{' + content + '}';
- } else {
- return content;
- }
- }).join('');
- }; // import a list of modules into the list
-
-
- list.i = function (modules, mediaQuery) {
- if (typeof modules === 'string') {
- modules = [[null, modules, '']];
- }
-
- var alreadyImportedModules = {};
-
- for (var i = 0; i < this.length; i++) {
- var id = this[i][0];
-
- if (id != null) {
- alreadyImportedModules[id] = true;
- }
- }
-
- for (i = 0; i < modules.length; i++) {
- var item = modules[i]; // skip already imported module
- // this implementation is not 100% perfect for weird media query combinations
- // when a module is imported multiple times with different media queries.
- // I hope this will never occur (Hey this way we have smaller bundles)
-
- if (item[0] == null || !alreadyImportedModules[item[0]]) {
- if (mediaQuery && !item[2]) {
- item[2] = mediaQuery;
- } else if (mediaQuery) {
- item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
- }
-
- list.push(item);
- }
- }
- };
-
- return list;
-};
-
-function cssWithMappingToString(item, useSourceMap) {
- var content = item[1] || '';
- var cssMapping = item[3];
-
- if (!cssMapping) {
- return content;
- }
-
- if (useSourceMap && typeof btoa === 'function') {
- var sourceMapping = toComment(cssMapping);
- var sourceURLs = cssMapping.sources.map(function (source) {
- return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
- });
- return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
- }
-
- return [content].join('\n');
-} // Adapted from convert-source-map (MIT)
-
-
-function toComment(sourceMap) {
- // eslint-disable-next-line no-undef
- var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
- var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
- return '/*# ' + data + ' */';
-}
-
-/***/ }),
-
/***/ "./node_modules/node-libs-browser/mock/empty.js":
/*!******************************************************!*\
!*** ./node_modules/node-libs-browser/mock/empty.js ***!
@@ -809,10 +653,10 @@ module.exports = function(module) {
/*!**********************!*\
!*** ./package.json ***!
\**********************/
-/*! exports provided: name, version, description, main, keywords, scripts, repository, author, license, standard, dependencies, devDependencies, files, yarn-upgrade-all, sideEffects, default */
+/*! exports provided: name, version, description, main, keywords, scripts, repository, author, license, standard, dependencies, devDependencies, files, yarn-upgrade-all, sideEffects, husky, default */
/***/ (function(module) {
-module.exports = JSON.parse("{\"name\":\"mermaid\",\"version\":\"8.6.2\",\"description\":\"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.\",\"main\":\"dist/mermaid.core.js\",\"keywords\":[\"diagram\",\"markdown\",\"flowchart\",\"sequence diagram\",\"gantt\",\"class diagram\",\"git graph\"],\"scripts\":{\"build:development\":\"webpack --progress --colors\",\"build:production\":\"yarn build:development -p --config webpack.config.prod.babel.js\",\"build\":\"yarn build:development && yarn build:production\",\"postbuild\":\"documentation build src/mermaidAPI.js src/config.js --shallow -f md --markdown-toc false -o docs/Setup.md\",\"build:watch\":\"yarn build --watch\",\"minify\":\"minify ./dist/mermaid.js > ./dist/mermaid.min.js\",\"release\":\"yarn build\",\"lint\":\"eslint src\",\"e2e:depr\":\"yarn lint && jest e2e --config e2e/jest.config.js\",\"cypress\":\"percy exec -- cypress run\",\"e2e\":\"start-server-and-test dev http://localhost:9000/ cypress\",\"e2e-upd\":\"yarn lint && jest e2e -u --config e2e/jest.config.js\",\"dev\":\"webpack-dev-server --config webpack.config.e2e.js\",\"test\":\"yarn lint && jest src/.*\",\"test:watch\":\"jest --watch src\",\"prepublishOnly\":\"yarn build && yarn test && yarn e2e\",\"prepush\":\"yarn test\",\"prepare\":\"yarn build\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/knsv/mermaid\"},\"author\":\"Knut Sveidqvist\",\"license\":\"MIT\",\"standard\":{\"ignore\":[\"**/parser/*.js\",\"dist/**/*.js\",\"cypress/**/*.js\"],\"globals\":[\"page\"]},\"dependencies\":{\"@braintree/sanitize-url\":\"^3.1.0\",\"crypto-random-string\":\"^3.0.1\",\"d3\":\"^5.7.0\",\"dagre\":\"^0.8.4\",\"dagre-d3\":\"^0.6.4\",\"entity-decode\":\"^2.0.2\",\"graphlib\":\"^2.1.7\",\"he\":\"^1.2.0\",\"minify\":\"^4.1.1\",\"moment-mini\":\"^2.22.1\",\"scope-css\":\"^1.2.1\"},\"devDependencies\":{\"@babel/core\":\"^7.2.2\",\"@babel/preset-env\":\"^7.8.4\",\"@babel/register\":\"^7.0.0\",\"@percy/cypress\":\"*\",\"babel-core\":\"7.0.0-bridge.0\",\"babel-jest\":\"^24.9.0\",\"babel-loader\":\"^8.0.4\",\"coveralls\":\"^3.0.2\",\"css-loader\":\"^2.0.1\",\"css-to-string-loader\":\"^0.1.3\",\"cypress\":\"4.0.1\",\"documentation\":\"^12.0.1\",\"eslint\":\"^6.3.0\",\"eslint-config-prettier\":\"^6.3.0\",\"eslint-plugin-prettier\":\"^3.1.0\",\"husky\":\"^1.2.1\",\"identity-obj-proxy\":\"^3.0.0\",\"jest\":\"^24.9.0\",\"jison\":\"^0.4.18\",\"moment\":\"^2.23.0\",\"node-sass\":\"^4.12.0\",\"prettier\":\"^1.18.2\",\"puppeteer\":\"^1.17.0\",\"sass-loader\":\"^7.1.0\",\"start-server-and-test\":\"^1.10.6\",\"terser-webpack-plugin\":\"^2.2.2\",\"webpack\":\"^4.41.2\",\"webpack-bundle-analyzer\":\"^3.7.0\",\"webpack-cli\":\"^3.1.2\",\"webpack-dev-server\":\"^3.4.1\",\"webpack-node-externals\":\"^1.7.2\",\"yarn-upgrade-all\":\"^0.5.0\"},\"files\":[\"dist\"],\"yarn-upgrade-all\":{\"ignore\":[\"babel-core\"]},\"sideEffects\":[\"**/*.css\",\"**/*.scss\"]}");
+module.exports = JSON.parse("{\"name\":\"mermaid\",\"version\":\"8.6.2\",\"description\":\"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.\",\"main\":\"dist/mermaid.core.js\",\"keywords\":[\"diagram\",\"markdown\",\"flowchart\",\"sequence diagram\",\"gantt\",\"class diagram\",\"git graph\"],\"scripts\":{\"build:development\":\"webpack --progress --colors\",\"build:production\":\"yarn build:development -p --config webpack.config.prod.babel.js\",\"build\":\"yarn build:development && yarn build:production\",\"postbuild\":\"documentation build src/mermaidAPI.js src/config.js --shallow -f md --markdown-toc false -o docs/Setup.md\",\"build:watch\":\"yarn build --watch\",\"minify\":\"minify ./dist/mermaid.js > ./dist/mermaid.min.js\",\"release\":\"yarn build\",\"lint\":\"eslint src\",\"e2e:depr\":\"yarn lint && jest e2e --config e2e/jest.config.js\",\"cypress\":\"percy exec -- cypress run\",\"e2e\":\"start-server-and-test dev http://localhost:9000/ cypress\",\"e2e-upd\":\"yarn lint && jest e2e -u --config e2e/jest.config.js\",\"dev\":\"webpack-dev-server --config webpack.config.e2e.js\",\"test\":\"yarn lint && jest src/.*\",\"test:watch\":\"jest --watch src\",\"prepublishOnly\":\"yarn build && yarn test && yarn e2e\",\"prepare\":\"yarn build\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/knsv/mermaid\"},\"author\":\"Knut Sveidqvist\",\"license\":\"MIT\",\"standard\":{\"ignore\":[\"**/parser/*.js\",\"dist/**/*.js\",\"cypress/**/*.js\"],\"globals\":[\"page\"]},\"dependencies\":{\"@braintree/sanitize-url\":\"^3.1.0\",\"d3\":\"^5.7.0\",\"dagre\":\"^0.8.4\",\"dagre-d3\":\"^0.6.4\",\"entity-decode\":\"^2.0.2\",\"graphlib\":\"^2.1.7\",\"he\":\"^1.2.0\",\"khroma\":\"^1.1.0\",\"minify\":\"^4.1.1\",\"moment-mini\":\"^2.22.1\",\"stylis\":\"^3.5.2\"},\"devDependencies\":{\"@babel/core\":\"^7.2.2\",\"@babel/preset-env\":\"^7.8.4\",\"@babel/register\":\"^7.0.0\",\"@percy/cypress\":\"*\",\"babel-core\":\"7.0.0-bridge.0\",\"babel-jest\":\"^24.9.0\",\"babel-loader\":\"^8.0.4\",\"coveralls\":\"^3.0.2\",\"css-loader\":\"^2.0.1\",\"css-to-string-loader\":\"^0.1.3\",\"cypress\":\"4.0.1\",\"documentation\":\"^12.0.1\",\"eslint\":\"^6.3.0\",\"eslint-config-prettier\":\"^6.3.0\",\"eslint-plugin-prettier\":\"^3.1.0\",\"husky\":\"^1.2.1\",\"identity-obj-proxy\":\"^3.0.0\",\"jest\":\"^24.9.0\",\"jison\":\"^0.4.18\",\"moment\":\"^2.23.0\",\"node-sass\":\"^4.12.0\",\"prettier\":\"^1.18.2\",\"puppeteer\":\"^1.17.0\",\"sass-loader\":\"^7.1.0\",\"start-server-and-test\":\"^1.10.6\",\"terser-webpack-plugin\":\"^2.2.2\",\"webpack\":\"^4.41.2\",\"webpack-bundle-analyzer\":\"^3.7.0\",\"webpack-cli\":\"^3.1.2\",\"webpack-dev-server\":\"^3.4.1\",\"webpack-node-externals\":\"^1.7.2\",\"yarn-upgrade-all\":\"^0.5.0\"},\"files\":[\"dist\"],\"yarn-upgrade-all\":{\"ignore\":[\"babel-core\"]},\"sideEffects\":[\"**/*.css\",\"**/*.scss\"],\"husky\":{\"hooks\":{\"pre-push\":\"yarn test\"}}}");
/***/ }),
@@ -834,8 +678,22 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; });
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./src/utils.js");
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ "./src/logger.js");
+/* harmony import */ var _themes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./themes */ "./src/themes/index.js");
+ // import { unflatten } from 'flat';
+// import flatten from 'flat';
+// import themeVariables from './theme-default';
+// import themeForestVariables from './theme-forest';
+// import themeNeutralVariables from './theme-neutral';
+
+var handleThemeVariables = function handleThemeVariables(value) {
+ return _themes__WEBPACK_IMPORTED_MODULE_2__["default"][value] ? _themes__WEBPACK_IMPORTED_MODULE_2__["default"][value].getThemeVariables() : _themes__WEBPACK_IMPORTED_MODULE_2__["default"].default.getThemeVariables();
+};
+
+var manipulators = {
+ themeVariables: handleThemeVariables
+};
/**
* **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more[[click here](8.6.0_docs.md)].**
*
@@ -887,6 +745,7 @@ var config = {
*
*/
theme: 'default',
+ themeVariables: _themes__WEBPACK_IMPORTED_MODULE_2__["default"]['default'].getThemeVariables(),
themeCSS: undefined,
/* **maxTextSize** - The maximum allowed size of the users text diamgram */
@@ -919,11 +778,12 @@ var config = {
/**
*| Parameter | Description |Type | Required | Values|
*| --- | --- | --- | --- | --- |
- *| securitylevel | Level of trust for parsed diagram|String | Required | Strict, Loose |
+ *| securitylevel | Level of trust for parsed diagram|String | Required | Strict, Loose, antiscript |
*
***Notes:
*- **strict**: (**default**) tags in text are encoded, click functionality is disabeled
*- **loose**: tags in text are allowed, click functionality is enabled
+ *- **antiscript**: html tags in text are allowed, (only script element is removed), click functionality is enabled
*/
securityLevel: 'strict',
@@ -960,6 +820,16 @@ var config = {
* The object containing configurations specific for flowcharts
*/
flowchart: {
+ /**
+ *| Parameter | Description |Type | Required | Values|
+ *| --- | --- | --- | --- | --- |
+ *| diagramPadding | amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |
+ *
+ ***Notes:**The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels
+ ***Default value: 8**.
+ */
+ diagramPadding: 8,
+
/**
*| Parameter | Description |Type | Required | Values|
*| --- | --- | --- | --- | --- |
@@ -1659,12 +1529,26 @@ var config = {
*| --- | --- | --- | --- | --- |
*| fontSize| Font Size in pixels| Integer | | Any Positive Value |
*
- ***Notes:**Font size (expressed as an integer representing a number of pixels)
+ ***Notes:**Font size (expressed as an integer representing a number of pixels)
***Default value: 12 **
*/
- fontSize: 12
+ fontSize: 12,
+
+ /**
+ *| Parameter | Description |Type | Required | Values|
+ *| --- | --- | --- | --- | --- |
+ *| useMaxWidth | See Notes | Boolean | Required | true, false |
+ *
+ ***Notes:**
+ *When this flag is set to true, the diagram width is locked to 100% and
+ *scaled based on available space. If set to false, the diagram reserves its
+ *absolute width.
+ ***Default value: true**.
+ */
+ useMaxWidth: true
}
-};
+}; // debugger;
+
config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
config.git.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
var defaultConfig = Object.freeze(config);
@@ -1672,26 +1556,28 @@ var siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(
var currentConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, defaultConfig);
/**
*## setSiteConfig
-
*| Function | Description | Type | Values |
*| --------- | ------------------- | ------- | ------------------ |
*| setSiteConfig|Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array|
-
***Notes:**
*Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset
*the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig
*to the defaultConfig
*Note: currentConfig is set in this function
-
**Default value: At default, will mirror Global Config**
* @param conf - the base currentConfig to use as siteConfig
* @returns {*} - the siteConfig
*/
var setSiteConfig = function setSiteConfig(conf) {
+ Object.keys(conf).forEach(function (key) {
+ var manipulator = manipulators[key];
+ conf[key] = manipulator ? manipulator(conf[key]) : conf[key];
+ });
Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(currentConfig, conf, {
clobber: true
- });
+ }); // Set theme variables if user has set the theme option
+
Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(siteConfig, conf);
return getSiteConfig();
};
@@ -1700,7 +1586,6 @@ var setSiteConfig = function setSiteConfig(conf) {
*| Function | Description | Type | Values |
*| --------- | ------------------- | ------- | ------------------ |
*| setSiteConfig|Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig|
-
***Notes**:
*Returns **any** values in siteConfig.
* @returns {*}
@@ -1714,8 +1599,6 @@ var getSiteConfig = function getSiteConfig() {
*| Function | Description | Type | Values |
*| --------- | ------------------- | ------- | ------------------ |
*| setSiteConfig|Sets the siteConfig to desired values | Put Request| Any Values, except ones in secure array|
-
-
***Notes**:
*Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure keys. Any
*values found in conf with key found in siteConfig.secure will be replaced with the corresponding
@@ -1726,6 +1609,10 @@ var getSiteConfig = function getSiteConfig() {
var setConfig = function setConfig(conf) {
sanitize(conf);
+ Object.keys(conf).forEach(function (key) {
+ var manipulator = manipulators[key];
+ conf[key] = manipulator ? manipulator(conf[key]) : conf[key];
+ });
Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(currentConfig, conf);
return getConfig();
};
@@ -1734,7 +1621,6 @@ var setConfig = function setConfig(conf) {
*| Function | Description | Type | Return Values |
*| --------- | ------------------- | ------- | ------------------ |
*| getConfig |Obtains the currentConfig | Get Request | Any Values from currentConfig|
-
***Notes**:
*Returns **any** the currentConfig
* @returns {*} - the currentConfig
@@ -1748,7 +1634,6 @@ var getConfig = function getConfig() {
*| Function | Description | Type | Values |
*| --------- | ------------------- | ------- | ------------------ |
*| sanitize |Sets the siteConfig to desired values. | Put Request |None|
-
*Ensures options parameter does not attempt to override siteConfig secure keys
*Note: modifies options in-place
* @param options - the potential setConfig parameter
@@ -1766,7 +1651,6 @@ var sanitize = function sanitize(options) {
};
/**
*## reset
-
*| Function | Description | Type | Required | Values |
*| --------- | ------------------- | ------- | -------- | ------------------ |
*| reset|Resets currentConfig to conf| Put Request | Required | None|
@@ -2240,7 +2124,7 @@ var intersection = function intersection(node, outsidePoint, insidePoint) {
};
if (outsidePoint.x === edges.x1 || outsidePoint.x === edges.x2 || outsidePoint.y === edges.y1 || outsidePoint.y === edges.y2) {
- // logger.warn('calc equals on edge');
+ _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('calc equals on edge');
return outsidePoint;
}
@@ -2309,9 +2193,20 @@ var insertEdge = function insertEdge(elem, e, edge, clusterDb, diagramType, grap
if (!outsideNode(node, point) && !isInside) {
_logger__WEBPACK_IMPORTED_MODULE_0__["logger"].trace('inside', edge.toCluster, point, lastPointOutside); // First point inside the rect
- var insterection = intersection(node, lastPointOutside, point);
- _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].trace('intersect', insterection);
- points.push(insterection);
+ var inter = intersection(node, lastPointOutside, point);
+ var pointPresent = false;
+ points.forEach(function (p) {
+ pointPresent = pointPresent || p.x === inter.x && p.y === inter.y;
+ }); // if (!pointPresent) {
+
+ if (!points.find(function (e) {
+ return e.x === inter.x && e.y === inter.y;
+ })) {
+ points.push(inter);
+ } else {
+ _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('no intersect', inter, points);
+ }
+
isInside = true;
} else {
if (!isInside) points.push(point);
@@ -2415,43 +2310,76 @@ var insertEdge = function insertEdge(elem, e, edge, clusterDb, diagramType, grap
url = url.replace(/\)/g, '\\)');
}
- _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].info('arrowType', edge.arrowType);
+ _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].info('arrowTypeStart', edge.arrowTypeStart);
+ _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].info('arrowTypeEnd', edge.arrowTypeEnd);
- switch (edge.arrowType) {
+ switch (edge.arrowTypeStart) {
case 'arrow_cross':
- svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-crossEnd' + ')');
+ svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-crossStart' + ')');
break;
- case 'double_arrow_cross':
+ case 'arrow_point':
+ svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-pointStart' + ')');
+ break;
+
+ case 'arrow_barb':
+ svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-barbStart' + ')');
+ break;
+
+ case 'arrow_circle':
+ svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-circleStart' + ')');
+ break;
+
+ case 'aggregation':
+ svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-aggregationStart' + ')');
+ break;
+
+ case 'extension':
+ svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-extensionStart' + ')');
+ break;
+
+ case 'composition':
+ svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-compositionStart' + ')');
+ break;
+
+ case 'dependency':
+ svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-dependencyStart' + ')');
+ break;
+
+ default:
+ }
+
+ switch (edge.arrowTypeEnd) {
+ case 'arrow_cross':
svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-crossEnd' + ')');
- svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-crossStart' + ')');
break;
case 'arrow_point':
svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-pointEnd' + ')');
break;
- case 'double_arrow_point':
- svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-pointEnd' + ')');
- svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-pointStart' + ')');
- break;
-
case 'arrow_barb':
svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-barbEnd' + ')');
break;
- case 'double_arrow_barb':
- svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-barnEnd' + ')');
- svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-barbStart' + ')');
- break;
-
case 'arrow_circle':
svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-circleEnd' + ')');
break;
- case 'double_arrow_circle':
- svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-circleEnd' + ')');
- svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-circleStart' + ')');
+ case 'aggregation':
+ svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-aggregationEnd' + ')');
+ break;
+
+ case 'extension':
+ svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-extensionEnd' + ')');
+ break;
+
+ case 'composition':
+ svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-compositionEnd' + ')');
+ break;
+
+ case 'dependency':
+ svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-dependencyEnd' + ')');
break;
default:
@@ -2504,13 +2432,13 @@ var recursiveRender = function recursiveRender(_elem, graph, diagramtype, parent
if (!graph.nodes()) {
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace('No nodes found for', graph);
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('No nodes found for', graph);
} else {
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace('Recursive render', graph.nodes());
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('Recursive render', graph.nodes());
}
if (graph.edges().length > 0) {
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace('Recursive edges', graph.edge(graph.edges()[0]));
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('Recursive edges', graph.edge(graph.edges()[0]));
}
var clusters = elem.insert('g').attr('class', 'clusters'); // eslint-disable-line
@@ -2526,16 +2454,16 @@ var recursiveRender = function recursiveRender(_elem, graph, diagramtype, parent
if (typeof parentCluster !== 'undefined') {
var data = JSON.parse(JSON.stringify(parentCluster.clusterData)); // data.clusterPositioning = true;
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace('Setting data for cluster', data);
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('Setting data for cluster', data);
graph.setNode(parentCluster.id, data);
graph.setParent(v, parentCluster.id, data);
}
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace('(Insert) Node ' + v + ': ' + JSON.stringify(graph.node(v)));
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('(Insert) Node ' + v + ': ' + JSON.stringify(graph.node(v)));
if (node && node.clusterNode) {
// const children = graph.children(v);
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace('Cluster identified', v, node, graph.node(v));
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('Cluster identified', v, node, graph.node(v));
var newEl = recursiveRender(nodes, node.graph, diagramtype, graph.node(v));
Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, newEl);
Object(_nodes__WEBPACK_IMPORTED_MODULE_5__["setNodeElem"])(newEl, node);
@@ -2544,14 +2472,14 @@ var recursiveRender = function recursiveRender(_elem, graph, diagramtype, parent
if (graph.children(v).length > 0) {
// This is a cluster but not to be rendered recusively
// Render as before
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace('Cluster - the non recursive path', v, node.id, node, graph);
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace(Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["findNonClusterChild"])(node.id, graph));
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('Cluster - the non recursive path', v, node.id, node, graph);
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info(Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["findNonClusterChild"])(node.id, graph));
_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"][node.id] = {
id: Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["findNonClusterChild"])(node.id, graph),
node: node
}; // insertCluster(clusters, graph.node(v));
} else {
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace('Node - the non recursive path', v, node.id, node);
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('Node - the non recursive path', v, node.id, node);
Object(_nodes__WEBPACK_IMPORTED_MODULE_5__["insertNode"])(nodes, graph.node(v), dir);
}
}
@@ -2562,10 +2490,10 @@ var recursiveRender = function recursiveRender(_elem, graph, diagramtype, parent
graph.edges().forEach(function (e) {
var edge = graph.edge(e.v, e.w, e.name);
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace('Edge ' + e.v + ' -> ' + e.w + ': ', e, ' ', JSON.stringify(graph.edge(e))); // Check if link is either from or to a cluster
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('Edge ' + e.v + ' -> ' + e.w + ': ', e, ' ', JSON.stringify(graph.edge(e))); // Check if link is either from or to a cluster
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace('Fix', _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"], 'ids:', e.v, e.w, 'Translateing: ', _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"][e.v], _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"][e.w]);
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('Fix', _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"], 'ids:', e.v, e.w, 'Translateing: ', _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"][e.v], _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"][e.w]);
Object(_edges__WEBPACK_IMPORTED_MODULE_7__["insertEdgeLabel"])(edgeLabels, edge);
});
graph.edges().forEach(function (e) {
@@ -2576,11 +2504,11 @@ var recursiveRender = function recursiveRender(_elem, graph, diagramtype, parent
_logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('#############################################');
_logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info(graph);
dagre__WEBPACK_IMPORTED_MODULE_0___default.a.layout(graph);
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace('Graph after layout:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); // Move the nodes to the correct place
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('Graph after layout:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); // Move the nodes to the correct place
graph.nodes().forEach(function (v) {
var node = graph.node(v);
- _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].trace('Position ' + v + ': ' + JSON.stringify(graph.node(v)));
+ _logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('Position ' + v + ': ' + JSON.stringify(graph.node(v)));
_logger__WEBPACK_IMPORTED_MODULE_8__["logger"].info('Position ' + v + ': (' + node.x, ',' + node.y, ') width: ', node.width, ' height: ', node.height);
if (node && node.clusterNode) {
@@ -2838,10 +2766,17 @@ function intersectPolygon(node, polyPoints, point) {
var intersections = [];
var minX = Number.POSITIVE_INFINITY;
var minY = Number.POSITIVE_INFINITY;
- polyPoints.forEach(function (entry) {
- minX = Math.min(minX, entry.x);
- minY = Math.min(minY, entry.y);
- });
+
+ 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;
@@ -2956,22 +2891,22 @@ var insertMarkers = function insertMarkers(elem, markerArray, type, id) {
var extension = function extension(elem, type, id) {
_logger__WEBPACK_IMPORTED_MODULE_0__["logger"].trace('Making markers for ', id);
elem.append('defs').append('marker').attr('id', type + '-extensionStart').attr('class', 'marker extension ' + type).attr('refX', 0).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', type + '-extensionEnd ' + type).attr('class', 'marker extension ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead
+ elem.append('defs').append('marker').attr('id', type + '-extensionEnd').attr('class', 'marker extension ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead
};
var composition = function composition(elem, type) {
- elem.append('defs').append('marker').attr('id', type + '-compositionStart').attr('class', 'marker extension ' + type).attr('refX', 0).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', type + '-compositionEnd').attr('class', 'marker extension ' + type).attr('refX', 19).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');
+ elem.append('defs').append('marker').attr('id', type + '-compositionStart').attr('class', 'marker composition ' + type).attr('refX', 0).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', type + '-compositionEnd').attr('class', 'marker composition ' + type).attr('refX', 19).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');
};
var aggregation = function aggregation(elem, type) {
- elem.append('defs').append('marker').attr('id', type + '-aggregationStart').attr('class', 'marker extension ' + type).attr('refX', 0).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', type + '-aggregationEnd').attr('class', 'marker ' + type).attr('refX', 19).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');
+ elem.append('defs').append('marker').attr('id', type + '-aggregationStart').attr('class', 'marker aggregation ' + type).attr('refX', 0).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', type + '-aggregationEnd').attr('class', 'marker aggregation ' + type).attr('refX', 19).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');
};
var dependency = function dependency(elem, type) {
- elem.append('defs').append('marker').attr('id', type + '-dependencyStart').attr('class', 'marker extension ' + type).attr('refX', 0).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', type + '-dependencyEnd').attr('class', 'marker ' + type).attr('refX', 19).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');
+ elem.append('defs').append('marker').attr('id', type + '-dependencyStart').attr('class', 'marker dependency ' + type).attr('refX', 0).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', type + '-dependencyEnd').attr('class', 'marker dependency ' + type).attr('refX', 19).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');
};
var point = function point(elem, type) {
@@ -3388,16 +3323,15 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setNodeElem", function() { return setNodeElem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionNode", function() { return positionNode; });
-/* harmony import */ var _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intersect/index.js */ "./src/dagre-wrapper/intersect/index.js");
-/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3");
-/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__);
-/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../logger */ "./src/logger.js");
-/* harmony import */ var _shapes_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shapes/util */ "./src/dagre-wrapper/shapes/util.js");
-/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config */ "./src/config.js");
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../logger */ "./src/logger.js");
+/* harmony import */ var _shapes_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shapes/util */ "./src/dagre-wrapper/shapes/util.js");
+/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config */ "./src/config.js");
+/* harmony import */ var _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./intersect/index.js */ "./src/dagre-wrapper/intersect/index.js");
/* harmony import */ var _createLabel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./createLabel */ "./src/dagre-wrapper/createLabel.js");
/* harmony import */ var _shapes_note__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./shapes/note */ "./src/dagre-wrapper/shapes/note.js");
-
// eslint-disable-line
@@ -3405,8 +3339,9 @@ __webpack_require__.r(__webpack_exports__);
+
var question = function question(parent, node) {
- var _labelHelper = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["labelHelper"])(parent, node, undefined, true),
+ var _labelHelper = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true),
shapeSvg = _labelHelper.shapeSvg,
bbox = _labelHelper.bbox;
@@ -3426,20 +3361,20 @@ var question = function question(parent, node) {
x: 0,
y: -s / 2
}];
- _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].info('Question main (Circle)');
- var questionElem = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["insertPolygonShape"])(shapeSvg, s, s, points);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, questionElem);
+ _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].info('Question main (Circle)');
+ var questionElem = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, s, s, points);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, questionElem);
node.intersect = function (point) {
- _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].warn('Intersect called');
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].polygon(node, points, point);
+ _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].warn('Intersect called');
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point);
};
return shapeSvg;
};
var hexagon = function hexagon(parent, node) {
- var _labelHelper2 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["labelHelper"])(parent, node, undefined, true),
+ var _labelHelper2 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true),
shapeSvg = _labelHelper2.shapeSvg,
bbox = _labelHelper2.bbox;
@@ -3466,18 +3401,18 @@ var hexagon = function hexagon(parent, node) {
x: 0,
y: -h / 2
}];
- var hex = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["insertPolygonShape"])(shapeSvg, w, h, points);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, hex);
+ var hex = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, hex);
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].polygon(node, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, point);
};
return shapeSvg;
};
var rect_left_inv_arrow = function rect_left_inv_arrow(parent, node) {
- var _labelHelper3 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["labelHelper"])(parent, node, undefined, true),
+ var _labelHelper3 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true),
shapeSvg = _labelHelper3.shapeSvg,
bbox = _labelHelper3.bbox;
@@ -3499,18 +3434,18 @@ var rect_left_inv_arrow = function rect_left_inv_arrow(parent, node) {
x: 0,
y: -h / 2
}];
- var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["insertPolygonShape"])(shapeSvg, w, h, points);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, el);
+ var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el);
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].polygon(node, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, point);
};
return shapeSvg;
};
var lean_right = function lean_right(parent, node) {
- var _labelHelper4 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["labelHelper"])(parent, node, undefined, true),
+ var _labelHelper4 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true),
shapeSvg = _labelHelper4.shapeSvg,
bbox = _labelHelper4.bbox;
@@ -3529,18 +3464,18 @@ var lean_right = function lean_right(parent, node) {
x: h / 6,
y: -h
}];
- var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["insertPolygonShape"])(shapeSvg, w, h, points);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, el);
+ var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el);
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].polygon(node, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, point);
};
return shapeSvg;
};
var lean_left = function lean_left(parent, node) {
- var _labelHelper5 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["labelHelper"])(parent, node, undefined, true),
+ var _labelHelper5 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true),
shapeSvg = _labelHelper5.shapeSvg,
bbox = _labelHelper5.bbox;
@@ -3559,18 +3494,18 @@ var lean_left = function lean_left(parent, node) {
x: -h / 6,
y: -h
}];
- var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["insertPolygonShape"])(shapeSvg, w, h, points);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, el);
+ var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el);
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].polygon(node, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, point);
};
return shapeSvg;
};
var trapezoid = function trapezoid(parent, node) {
- var _labelHelper6 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["labelHelper"])(parent, node, undefined, true),
+ var _labelHelper6 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true),
shapeSvg = _labelHelper6.shapeSvg,
bbox = _labelHelper6.bbox;
@@ -3589,18 +3524,18 @@ var trapezoid = function trapezoid(parent, node) {
x: h / 6,
y: -h
}];
- var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["insertPolygonShape"])(shapeSvg, w, h, points);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, el);
+ var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el);
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].polygon(node, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, point);
};
return shapeSvg;
};
var inv_trapezoid = function inv_trapezoid(parent, node) {
- var _labelHelper7 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["labelHelper"])(parent, node, undefined, true),
+ var _labelHelper7 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true),
shapeSvg = _labelHelper7.shapeSvg,
bbox = _labelHelper7.bbox;
@@ -3619,18 +3554,18 @@ var inv_trapezoid = function inv_trapezoid(parent, node) {
x: -2 * h / 6,
y: -h
}];
- var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["insertPolygonShape"])(shapeSvg, w, h, points);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, el);
+ var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el);
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].polygon(node, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, point);
};
return shapeSvg;
};
var rect_right_inv_arrow = function rect_right_inv_arrow(parent, node) {
- var _labelHelper8 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["labelHelper"])(parent, node, undefined, true),
+ var _labelHelper8 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true),
shapeSvg = _labelHelper8.shapeSvg,
bbox = _labelHelper8.bbox;
@@ -3652,18 +3587,18 @@ var rect_right_inv_arrow = function rect_right_inv_arrow(parent, node) {
x: 0,
y: -h
}];
- var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["insertPolygonShape"])(shapeSvg, w, h, points);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, el);
+ var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el);
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].polygon(node, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, point);
};
return shapeSvg;
};
var cylinder = function cylinder(parent, node) {
- var _labelHelper9 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["labelHelper"])(parent, node, undefined, true),
+ var _labelHelper9 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true),
shapeSvg = _labelHelper9.shapeSvg,
bbox = _labelHelper9.bbox;
@@ -3673,10 +3608,10 @@ var cylinder = function cylinder(parent, node) {
var h = bbox.height + ry + node.padding;
var 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;
var el = shapeSvg.attr('label-offset-y', ry).insert('path', ':first-child').attr('d', shape).attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')');
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, el);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el);
node.intersect = function (point) {
- var pos = _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].rect(node, point);
+ var pos = _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point);
var 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)) {
@@ -3696,19 +3631,19 @@ var cylinder = function cylinder(parent, node) {
};
var rect = function rect(parent, node) {
- var _labelHelper10 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["labelHelper"])(parent, node, 'node ' + node.classes, true),
+ var _labelHelper10 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, 'node ' + node.classes, true),
shapeSvg = _labelHelper10.shapeSvg,
bbox = _labelHelper10.bbox,
halfPadding = _labelHelper10.halfPadding;
- _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].trace('Classes = ', node.classes); // add the rect
+ _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].trace('Classes = ', node.classes); // add the rect
var rect = shapeSvg.insert('rect', ':first-child');
rect.attr('class', 'basic label-container').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);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, rect);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, rect);
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].rect(node, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point);
};
return shapeSvg;
@@ -3732,27 +3667,27 @@ var rectWithTitle = function rectWithTitle(parent, node) {
var innerLine = shapeSvg.insert('line');
var label = shapeSvg.insert('g').attr('class', 'label');
var text2 = node.labelText.flat();
- _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].info('Label text', text2[0]);
+ _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].info('Label text', text2[0]);
var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(text2[0], node.labelStyle, true, true));
var bbox;
- if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) {
+ if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) {
var div = text.children[0];
- var dv = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])(text);
+ var dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(text);
bbox = div.getBoundingClientRect();
dv.attr('width', bbox.width);
dv.attr('height', bbox.height);
}
- _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].info('Text 2', text2);
+ _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].info('Text 2', text2);
var textRows = text2.slice(1, text2.length);
var titleBox = text.getBBox();
var descr = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(textRows.join('
'), node.labelStyle, true, true));
- if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) {
+ if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) {
var _div = descr.children[0];
- var _dv = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])(descr);
+ var _dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(descr);
bbox = _div.getBoundingClientRect();
@@ -3764,9 +3699,9 @@ var rectWithTitle = function rectWithTitle(parent, node) {
var halfPadding = node.padding / 2;
- Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])(descr).attr('transform', 'translate( ' + ( // (titleBox.width - bbox.width) / 2 +
+ Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(descr).attr('transform', 'translate( ' + ( // (titleBox.width - bbox.width) / 2 +
bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ', ' + (titleBox.height + halfPadding + 5) + ')');
- Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])(text).attr('transform', 'translate( ' + ( // (titleBox.width - bbox.width) / 2 +
+ Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(text).attr('transform', 'translate( ' + ( // (titleBox.width - bbox.width) / 2 +
bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ', ' + 0 + ')'); // Get the size of the label
// Bounding box for title and text
@@ -3775,17 +3710,17 @@ var rectWithTitle = function rectWithTitle(parent, node) {
label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')');
rect.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);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, rect);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, rect);
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].rect(node, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point);
};
return shapeSvg;
};
var stadium = function stadium(parent, node) {
- var _labelHelper11 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["labelHelper"])(parent, node, undefined, true),
+ var _labelHelper11 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true),
shapeSvg = _labelHelper11.shapeSvg,
bbox = _labelHelper11.bbox;
@@ -3793,17 +3728,17 @@ var stadium = function stadium(parent, node) {
var w = bbox.width + h / 4 + node.padding; // add the rect
var rect = shapeSvg.insert('rect', ':first-child').attr('rx', h / 2).attr('ry', h / 2).attr('x', -w / 2).attr('y', -h / 2).attr('width', w).attr('height', h);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, rect);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, rect);
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].rect(node, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point);
};
return shapeSvg;
};
var circle = function circle(parent, node) {
- var _labelHelper12 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["labelHelper"])(parent, node, undefined, true),
+ var _labelHelper12 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true),
shapeSvg = _labelHelper12.shapeSvg,
bbox = _labelHelper12.bbox,
halfPadding = _labelHelper12.halfPadding;
@@ -3811,19 +3746,19 @@ var circle = function circle(parent, node) {
var circle = shapeSvg.insert('circle', ':first-child'); // center the circle around its coordinate
circle.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);
- _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].info('Circle main');
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, circle);
+ _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].info('Circle main');
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, circle);
node.intersect = function (point) {
- _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].info('Circle intersect', node, bbox.width / 2 + halfPadding, point);
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].circle(node, bbox.width / 2 + halfPadding, point);
+ _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].info('Circle intersect', node, bbox.width / 2 + halfPadding, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].circle(node, bbox.width / 2 + halfPadding, point);
};
return shapeSvg;
};
var subroutine = function subroutine(parent, node) {
- var _labelHelper13 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["labelHelper"])(parent, node, undefined, true),
+ var _labelHelper13 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true),
shapeSvg = _labelHelper13.shapeSvg,
bbox = _labelHelper13.bbox;
@@ -3860,11 +3795,11 @@ var subroutine = function subroutine(parent, node) {
x: -8,
y: 0
}];
- var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["insertPolygonShape"])(shapeSvg, w, h, points);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, el);
+ var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el);
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].polygon(node, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, point);
};
return shapeSvg;
@@ -3875,10 +3810,10 @@ var start = function start(parent, node) {
var circle = shapeSvg.insert('circle', ':first-child'); // center the circle around its coordinate
circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, circle);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, circle);
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].circle(node, 7, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].circle(node, 7, point);
};
return shapeSvg;
@@ -3895,12 +3830,12 @@ var forkJoin = function forkJoin(parent, node, dir) {
}
var shape = shapeSvg.append('rect').style('stroke', 'black').style('fill', 'black').attr('x', -1 * width / 2).attr('y', -1 * height / 2).attr('width', width).attr('height', height).attr('class', 'fork-join');
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, shape);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, shape);
node.height = node.height + node.padding / 2;
node.width = node.width + node.padding / 2;
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].rect(node, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point);
};
return shapeSvg;
@@ -3912,10 +3847,167 @@ var end = function end(parent, node) {
var circle = shapeSvg.insert('circle', ':first-child');
circle.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);
- Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, circle);
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, circle);
node.intersect = function (point) {
- return _intersect_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].circle(node, 7, point);
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].circle(node, 7, point);
+ };
+
+ return shapeSvg;
+};
+
+var class_box = function class_box(parent, node) {
+ var halfPadding = node.padding / 2;
+ var rowPadding = 4;
+ var lineHeight = 8;
+ var classes;
+
+ if (!node.classes) {
+ classes = 'node default';
+ } else {
+ classes = 'node ' + node.classes;
+ } // Add outer g element
+
+
+ var shapeSvg = parent.insert('g').attr('class', classes).attr('id', node.id); // Create the title label and insert it after the rect
+
+ var rect = shapeSvg.insert('rect', ':first-child');
+ var topLine = shapeSvg.insert('line');
+ var bottomLine = shapeSvg.insert('line');
+ var maxWidth = 0;
+ var maxHeight = rowPadding;
+ var labelContainer = shapeSvg.insert('g').attr('class', 'label');
+ var verticalPos = 0;
+ var hasInterface = node.classData.annotations && node.classData.annotations[0]; // 1. Create the labels
+
+ var interfaceLabel = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(node.classData.annotations[0], node.labelStyle, true, true));
+ var interfaceBBox = interfaceLabel.getBBox();
+
+ if (node.classData.annotations[0]) {
+ maxHeight += interfaceBBox.height + rowPadding;
+ maxWidth += interfaceBBox.width;
+ }
+
+ var classTitleLabel = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(node.labelText, node.labelStyle, true, true));
+ var classTitleBBox = classTitleLabel.getBBox();
+ maxHeight += classTitleBBox.height + rowPadding;
+
+ if (classTitleBBox.width > maxWidth) {
+ maxWidth = classTitleBBox.width;
+ }
+
+ var classAttributes = [];
+ node.classData.members.forEach(function (str) {
+ var lbl = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(str, node.labelStyle, true, true));
+ var bbox = lbl.getBBox();
+
+ if (bbox.width > maxWidth) {
+ maxWidth = bbox.width;
+ }
+
+ maxHeight += bbox.height + rowPadding;
+ classAttributes.push(lbl);
+ });
+ var classMethods = [];
+ node.classData.methods.forEach(function (str) {
+ var lbl = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(str, node.labelStyle, true, true));
+ var bbox = lbl.getBBox();
+
+ if (bbox.width > maxWidth) {
+ maxWidth = bbox.width;
+ }
+
+ maxHeight += bbox.height + rowPadding;
+ classMethods.push(lbl);
+ });
+ maxHeight += lineHeight; // 2. Position the labels
+ // position the interface label
+
+ if (hasInterface) {
+ Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(interfaceLabel).attr('transform', 'translate( ' + -(maxWidth + node.padding - interfaceBBox.width / 2) / 2 + ', ' + -1 * maxHeight / 2 + ')');
+ verticalPos = interfaceBBox.height + rowPadding;
+ } // Positin the class title label
+
+
+ var diffX = (maxWidth - classTitleBBox.width) / 2;
+ Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(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(function (lbl) {
+ Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(lbl).attr('transform', 'translate( ' + -maxWidth / 2 + ', ' + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ')');
+ verticalPos += classTitleBBox.height + rowPadding;
+ });
+ 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(function (lbl) {
+ Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(lbl).attr('transform', 'translate( ' + -maxWidth / 2 + ', ' + (-1 * maxHeight / 2 + verticalPos) + ')');
+ verticalPos += classTitleBBox.height + rowPadding;
+ }); //
+
+ var bbox;
+
+ if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) {
+ var div = interfaceLabel.children[0];
+ var dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(interfaceLabel);
+ bbox = div.getBoundingClientRect();
+ dv.attr('width', bbox.width);
+ dv.attr('height', bbox.height);
+ } // bbox = labelContainer.getBBox();
+ // logger.info('Text 2', text2);
+ // const textRows = text2.slice(1, text2.length);
+ // let titleBox = text.getBBox();
+ // const descr = label
+ // .node()
+ // .appendChild(createLabel(textRows.join('
'), node.labelStyle, true, true));
+ // if (getConfig().flowchart.htmlLabels) {
+ // const div = descr.children[0];
+ // const dv = select(descr);
+ // bbox = div.getBoundingClientRect();
+ // dv.attr('width', bbox.width);
+ // dv.attr('height', bbox.height);
+ // }
+ // // bbox = label.getBBox();
+ // // logger.info(descr);
+ // select(descr).attr(
+ // 'transform',
+ // 'translate( ' +
+ // // (titleBox.width - bbox.width) / 2 +
+ // (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) +
+ // ', ' +
+ // (titleBox.height + halfPadding + 5) +
+ // ')'
+ // );
+ // select(text).attr(
+ // 'transform',
+ // 'translate( ' +
+ // // (titleBox.width - bbox.width) / 2 +
+ // (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) +
+ // ', ' +
+ // 0 +
+ // ')'
+ // );
+ // // Get the size of the label
+ // // Bounding box for title and text
+ // bbox = label.node().getBBox();
+ // // Center the label
+ // label.attr(
+ // 'transform',
+ // 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'
+ // );
+
+
+ rect.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); // 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);
+
+ Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, rect);
+
+ node.intersect = function (point) {
+ return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point);
};
return shapeSvg;
@@ -3940,7 +4032,8 @@ var shapes = {
note: _shapes_note__WEBPACK_IMPORTED_MODULE_6__["default"],
subroutine: subroutine,
fork: forkJoin,
- join: forkJoin
+ join: forkJoin,
+ class_box: class_box
};
var nodeElems = {};
var insertNode = function insertNode(elem, node, dir) {
@@ -3954,7 +4047,7 @@ var clear = function clear() {
};
var positionNode = function positionNode(node) {
var el = nodeElems[node.id];
- _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].trace('Transforming node', node, 'translate(' + (node.x - node.width / 2 - 5) + ', ' + (node.y - node.height / 2 - 5) + ')');
+ _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].trace('Transforming node', node, 'translate(' + (node.x - node.width / 2 - 5) + ', ' + (node.y - node.height / 2 - 5) + ')');
var padding = 8;
if (node.clusterNode) {
@@ -4395,6 +4488,505 @@ funs.push(setupToolTips);
/***/ }),
+/***/ "./src/diagrams/class/classRenderer-v2.js":
+/*!************************************************!*\
+ !*** ./src/diagrams/class/classRenderer-v2.js ***!
+ \************************************************/
+/*! exports provided: addClasses, addRelations, setConf, drawOld, draw, default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClasses", function() { return addClasses; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRelations", function() { return addRelations; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawOld", function() { return drawOld; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre */ "dagre");
+/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlib */ "graphlib");
+/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__);
+/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
+/* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./classDb */ "./src/diagrams/class/classDb.js");
+/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.jison");
+/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__);
+/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./svgDraw */ "./src/diagrams/class/svgDraw.js");
+/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../config */ "./src/config.js");
+/* harmony import */ var _dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../dagre-wrapper/index.js */ "./src/dagre-wrapper/index.js");
+/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
+/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js");
+
+
+
+
+
+
+
+
+ // import addHtmlLabel from 'dagre-d3/lib/label/add-html-label.js';
+
+
+
+
+_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"];
+var idCache = {};
+var padding = 20;
+var conf = {
+ dividerMargin: 10,
+ padding: 5,
+ textHeight: 10
+};
+/**
+ * Function that adds the vertices found during parsing to the graph to be rendered.
+ * @param vert Object containing the vertices.
+ * @param g The graph that is to be drawn.
+ */
+
+var addClasses = function addClasses(classes, g) {
+ // const svg = select(`[id="${svgId}"]`);
+ var keys = Object.keys(classes);
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('keys:', keys);
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info(classes); // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition
+
+ keys.forEach(function (id) {
+ var vertex = classes[id];
+ /**
+ * Variable for storing the classes for the vertex
+ * @type {string}
+ */
+
+ var classStr = 'default'; // if (vertex.classes.length > 0) {
+ // classStr = vertex.classes.join(' ');
+ // }
+
+ var styles = {
+ labelStyle: ''
+ }; //getStylesFromArray(vertex.styles);
+ // Use vertex id as text in the box if no text is provided by the graph definition
+
+ var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually
+ // let vertexNode;
+ // if (getConfig().flowchart.htmlLabels) {
+ // const node = {
+ // label: vertexText.replace(
+ // /fa[lrsb]?:fa-[\w-]+/g,
+ // s => ``
+ // )
+ // };
+ // vertexNode = addHtmlLabel(svg, node).node();
+ // vertexNode.parentNode.removeChild(vertexNode);
+ // } else {
+ // const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');
+ // svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));
+ // const rows = vertexText.split(common.lineBreakRegex);
+ // for (let j = 0; j < rows.length; j++) {
+ // 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', '1');
+ // tspan.textContent = rows[j];
+ // svgLabel.appendChild(tspan);
+ // }
+ // vertexNode = svgLabel;
+ // }
+
+ var radious = 0;
+ var _shape = ''; // Set the shape based parameters
+
+ switch (vertex.type) {
+ case 'class':
+ _shape = 'class_box';
+ break;
+
+ default:
+ _shape = 'class_box';
+ } // Add the node
+
+
+ g.setNode(vertex.id, {
+ labelStyle: styles.labelStyle,
+ shape: _shape,
+ labelText: vertexText,
+ classData: vertex,
+ rx: radious,
+ ry: radious,
+ class: classStr,
+ style: styles.style,
+ id: vertex.id,
+ width: vertex.type === 'group' ? 500 : undefined,
+ type: vertex.type,
+ padding: Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().flowchart.padding
+ });
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('setNode', {
+ labelStyle: styles.labelStyle,
+ shape: _shape,
+ labelText: vertexText,
+ rx: radious,
+ ry: radious,
+ class: classStr,
+ style: styles.style,
+ id: vertex.id,
+ width: vertex.type === 'group' ? 500 : undefined,
+ type: vertex.type,
+ padding: Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().flowchart.padding
+ });
+ });
+};
+/**
+ * Add edges to graph based on parsed graph defninition
+ * @param {Object} edges The edges to add to the graph
+ * @param {Object} g The graph object
+ */
+
+var addRelations = function addRelations(relations, g) {
+ var cnt = 0;
+ var defaultStyle;
+ var defaultLabelStyle; // if (typeof relations.defaultStyle !== 'undefined') {
+ // const defaultStyles = getStylesFromArray(relations.defaultStyle);
+ // defaultStyle = defaultStyles.style;
+ // defaultLabelStyle = defaultStyles.labelStyle;
+ // }
+
+ relations.forEach(function (edge) {
+ cnt++;
+ var edgeData = {}; //Set relationship style and line type
+
+ edgeData.classes = 'relation';
+ edgeData.pattern = edge.relation.lineType == 1 ? 'dashed' : 'solid';
+ edgeData.id = 'id' + cnt; // Set link type for rendering
+
+ if (edge.type === 'arrow_open') {
+ edgeData.arrowhead = 'none';
+ } else {
+ edgeData.arrowhead = 'normal';
+ }
+
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info(edgeData, edge); //Set relation arrow types
+
+ edgeData.arrowTypeStart = getArrowMarker(edge.relation.type1);
+ edgeData.arrowTypeEnd = getArrowMarker(edge.relation.type2);
+ var style = '';
+ var labelStyle = '';
+
+ if (typeof edge.style !== 'undefined') {
+ var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(edge.style);
+ style = styles.style;
+ labelStyle = styles.labelStyle;
+ } else {
+ style = 'fill:none';
+
+ if (typeof defaultStyle !== 'undefined') {
+ style = defaultStyle;
+ }
+
+ if (typeof defaultLabelStyle !== 'undefined') {
+ labelStyle = defaultLabelStyle;
+ }
+ }
+
+ edgeData.style = style;
+ edgeData.labelStyle = labelStyle;
+
+ if (typeof edge.interpolate !== 'undefined') {
+ edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_0__["curveLinear"]);
+ } else if (typeof relations.defaultInterpolate !== 'undefined') {
+ edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(relations.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_0__["curveLinear"]);
+ } else {
+ edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_0__["curveLinear"]);
+ }
+
+ edge.text = edge.title;
+
+ if (typeof edge.text === 'undefined') {
+ if (typeof edge.style !== 'undefined') {
+ edgeData.arrowheadStyle = 'fill: #333';
+ }
+ } else {
+ edgeData.arrowheadStyle = 'fill: #333';
+ edgeData.labelpos = 'c';
+
+ if (Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().flowchart.htmlLabels && false) {
+ // eslint-disable-line
+ edgeData.labelType = 'html';
+ edgeData.label = '' + edge.text + '';
+ } else {
+ edgeData.labelType = 'text';
+ edgeData.label = edge.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_10__["default"].lineBreakRegex, '\n');
+
+ if (typeof edge.style === 'undefined') {
+ edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';
+ }
+
+ edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');
+ }
+ } // Add the edge to the graph
+
+
+ g.setEdge(edge.id1, edge.id2, edgeData, cnt);
+ });
+}; // Todo optimize
+
+var getGraphId = function getGraphId(label) {
+ var keys = Object.keys(idCache);
+
+ for (var i = 0; i < keys.length; i++) {
+ if (idCache[keys[i]].label === label) {
+ return keys[i];
+ }
+ }
+
+ return undefined;
+};
+
+var setConf = function setConf(cnf) {
+ var keys = Object.keys(cnf);
+ keys.forEach(function (key) {
+ conf[key] = cnf[key];
+ });
+};
+/**
+ * Draws a flowchart in the tag with id: id based on the graph definition in text.
+ * @param text
+ * @param id
+ */
+
+var drawOld = function drawOld(text, id) {
+ idCache = {};
+ _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy.clear();
+ _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].parse(text);
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found
+
+ var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id='".concat(id, "']")); // insertMarkers(diagram);
+ // Layout graph, Create a new directed graph
+
+ var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({
+ multigraph: true
+ }); // Set an object for the graph label
+
+ g.setGraph({
+ isMultiGraph: true
+ }); // Default to assigning a new object as a label for each new edge.
+
+ g.setDefaultEdgeLabel(function () {
+ return {};
+ });
+ var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getClasses();
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('classes:');
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info(classes);
+ var keys = Object.keys(classes);
+
+ for (var i = 0; i < keys.length; i++) {
+ var classDef = classes[keys[i]];
+ var node = _svgDraw__WEBPACK_IMPORTED_MODULE_6__["default"].drawClass(diagram, classDef, conf);
+ idCache[node.id] = node; // Add nodes to the graph. The first argument is the node id. The second is
+ // metadata about the node. In this case we're going to add labels to each of
+ // our nodes.
+
+ g.setNode(node.id, node);
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Org height: ' + node.height);
+ }
+
+ var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations();
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('relations:', relations);
+ relations.forEach(function (relation) {
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation));
+ g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), {
+ relation: relation
+ }, relation.title || 'DEFAULT');
+ });
+ dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g);
+ g.nodes().forEach(function (v) {
+ if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') {
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));
+ Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + Object(_classDb__WEBPACK_IMPORTED_MODULE_4__["lookUpDomId"])(v)).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )');
+ }
+ });
+ g.edges().forEach(function (e) {
+ if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') {
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));
+ _svgDraw__WEBPACK_IMPORTED_MODULE_6__["default"].drawEdge(diagram, g.edge(e), g.edge(e).relation, conf);
+ }
+ });
+ var svgBounds = diagram.node().getBBox();
+ var width = svgBounds.width + padding * 2;
+ var height = svgBounds.height + padding * 2;
+
+ if (conf.useMaxWidth) {
+ diagram.attr('width', '100%');
+ diagram.attr('style', "max-width: ".concat(width, "px;"));
+ } else {
+ diagram.attr('height', height);
+ diagram.attr('width', width);
+ } // Ensure the viewBox includes the whole svgBounds area with extra space for padding
+
+
+ var vBox = "".concat(svgBounds.x - padding, " ").concat(svgBounds.y - padding, " ").concat(width, " ").concat(height);
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug("viewBox ".concat(vBox));
+ diagram.attr('viewBox', vBox);
+};
+var draw = function draw(text, id) {
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Drawing class');
+ _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].clear(); // const parser = classDb.parser;
+ // parser.yy = classDb;
+ // Parse the graph definition
+ // try {
+
+ _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].parse(text); // } catch (err) {
+ // logger.debug('Parsing failed');
+ // }
+ // Fetch the default direction, use TD if none was found
+
+ var dir = 'TD';
+ var conf = Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().flowchart;
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('config:', conf);
+ var nodeSpacing = conf.nodeSpacing || 50;
+ var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph
+
+ var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({
+ multigraph: true,
+ compound: true
+ }).setGraph({
+ rankdir: dir,
+ nodesep: nodeSpacing,
+ ranksep: rankSpacing,
+ marginx: 8,
+ marginy: 8
+ }).setDefaultEdgeLabel(function () {
+ return {};
+ }); // let subG;
+ // const subGraphs = flowDb.getSubGraphs();
+ // logger.info('Subgraphs - ', subGraphs);
+ // for (let i = subGraphs.length - 1; i >= 0; i--) {
+ // subG = subGraphs[i];
+ // logger.info('Subgraph - ', subG);
+ // flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes);
+ // }
+ // Fetch the verices/nodes and edges/links from the parsed graph definition
+
+ var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getClasses();
+ var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations();
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info(relations); // let i = 0;
+ // for (i = subGraphs.length - 1; i >= 0; i--) {
+ // subG = subGraphs[i];
+ // selectAll('cluster').append('text');
+ // for (let j = 0; j < subG.nodes.length; j++) {
+ // g.setParent(subG.nodes[j], subG.id);
+ // }
+ // }
+
+ addClasses(classes, g, id);
+ addRelations(relations, g); // Add custom shapes
+ // flowChartShapes.addToRenderV2(addShape);
+ // Set up an SVG group so that we can translate the final graph.
+
+ var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id=\"".concat(id, "\"]")); // Run the renderer. This is what draws the final graph.
+
+ var element = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + id + ' g');
+ Object(_dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_8__["render"])(element, g, ['aggregation', 'extension', 'composition', 'dependency'], 'classDiagram', id); // element.selectAll('g.node').attr('title', function() {
+ // return flowDb.getTooltip(this.id);
+ // });
+
+ var padding = 8;
+ var svgBounds = svg.node().getBBox();
+ var width = svgBounds.width + padding * 2;
+ var height = svgBounds.height + padding * 2;
+ _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug("new ViewBox 0 0 ".concat(width, " ").concat(height), "translate(".concat(padding - g._label.marginx, ", ").concat(padding - g._label.marginy, ")"));
+
+ if (conf.useMaxWidth) {
+ svg.attr('width', '100%');
+ svg.attr('style', "max-width: ".concat(width, "px;"));
+ } else {
+ svg.attr('height', height);
+ svg.attr('width', width);
+ }
+
+ svg.attr('viewBox', "0 0 ".concat(width, " ").concat(height));
+ svg.select('g').attr('transform', "translate(".concat(padding - g._label.marginx, ", ").concat(padding - svgBounds.y, ")")); // Index nodes
+ // flowDb.indexNodes('subGraph' + i);
+ // Add label rects for non html labels
+
+ if (!conf.htmlLabels) {
+ var labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label');
+
+ for (var k = 0; k < labels.length; k++) {
+ var label = labels[k]; // Get dimensions of label
+
+ var dim = label.getBBox();
+ var rect = document.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);
+ rect.setAttribute('style', 'fill:#e8e8e8;');
+ label.insertBefore(rect, label.firstChild);
+ }
+ } // If node has a link, wrap it in an anchor SVG object.
+ // const keys = Object.keys(classes);
+ // keys.forEach(function(key) {
+ // const vertex = classes[key];
+ // if (vertex.link) {
+ // const node = select('#' + id + ' [id="' + key + '"]');
+ // if (node) {
+ // const link = document.createElementNS('http://www.w3.org/2000/svg', 'a');
+ // link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));
+ // link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);
+ // link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');
+ // const linkNode = node.insert(function() {
+ // return link;
+ // }, ':first-child');
+ // const shape = node.select('.label-container');
+ // if (shape) {
+ // linkNode.append(function() {
+ // return shape.node();
+ // });
+ // }
+ // const label = node.select('.label');
+ // if (label) {
+ // linkNode.append(function() {
+ // return label.node();
+ // });
+ // }
+ // }
+ // }
+ // });
+
+};
+/* harmony default export */ __webpack_exports__["default"] = ({
+ setConf: setConf,
+ draw: draw
+});
+
+function getArrowMarker(type) {
+ var marker;
+
+ switch (type) {
+ case 0:
+ marker = 'aggregation';
+ break;
+
+ case 1:
+ marker = 'extension';
+ break;
+
+ case 2:
+ marker = 'composition';
+ break;
+
+ case 3:
+ marker = 'dependency';
+ break;
+
+ default:
+ marker = 'none';
+ }
+
+ return marker;
+}
+
+/***/ }),
+
/***/ "./src/diagrams/class/classRenderer.js":
/*!*********************************************!*\
!*** ./src/diagrams/class/classRenderer.js ***!
@@ -5232,86 +5824,88 @@ case 2:/* skip whitespace */
break;
case 3:return 5;
break;
-case 4: this.begin("struct"); /*console.log('Starting struct');*/return 20;
+case 4:return 5;
break;
-case 5:return "EOF_IN_STRUCT";
+case 5: this.begin("struct"); /*console.log('Starting struct');*/return 20;
break;
-case 6:return "OPEN_IN_STRUCT";
+case 6:return "EOF_IN_STRUCT";
break;
-case 7: /*console.log('Ending struct');*/this.popState(); return 22;
+case 7:return "OPEN_IN_STRUCT";
break;
-case 8:/* nothing */
+case 8: /*console.log('Ending struct');*/this.popState(); return 22;
break;
-case 9: /*console.log('lex-member: ' + yy_.yytext);*/ return "MEMBER";
+case 9:/* nothing */
break;
-case 10:return 19;
+case 10: /*console.log('lex-member: ' + yy_.yytext);*/ return "MEMBER";
break;
-case 11:return 37;
+case 11:return 19;
break;
-case 12:return 38;
+case 12:return 37;
break;
-case 13:return 23;
+case 13:return 38;
break;
-case 14:return 24;
+case 14:return 23;
break;
-case 15:this.begin("generic");
+case 15:return 24;
break;
-case 16:this.popState();
+case 16:this.begin("generic");
break;
-case 17:return "GENERICTYPE";
+case 17:this.popState();
break;
-case 18:this.begin("string");
+case 18:return "GENERICTYPE";
break;
-case 19:this.popState();
+case 19:this.begin("string");
break;
-case 20:return "STR";
+case 20:this.popState();
break;
-case 21:return 32;
+case 21:return "STR";
break;
case 22:return 32;
break;
-case 23:return 34;
+case 23:return 32;
break;
case 24:return 34;
break;
-case 25:return 33;
+case 25:return 34;
break;
-case 26:return 31;
+case 26:return 33;
break;
-case 27:return 35;
+case 27:return 31;
break;
-case 28:return 36;
+case 28:return 35;
break;
-case 29:return 14;
+case 29:return 36;
break;
-case 30:return 50;
+case 30:return 14;
break;
-case 31:return 'DOT';
+case 31:return 50;
break;
-case 32:return 'PLUS';
+case 32:return 'DOT';
break;
-case 33:return 47;
+case 33:return 'PLUS';
break;
-case 34:return 'EQUALS';
+case 34:return 47;
break;
case 35:return 'EQUALS';
break;
-case 36:return 54;
+case 36:return 'EQUALS';
break;
-case 37:return 'PUNCTUATION';
+case 37:return 54;
break;
-case 38:return 53;
+case 38:return 'PUNCTUATION';
break;
-case 39:return 52;
+case 39:return 53;
break;
-case 40:return 49;
+case 40:return 52;
break;
-case 41:return 8;
+case 41:return 49;
+break;
+case 42:return 8;
break;
}
},
-rules: [/^(?:%%[^\n]*\n*)/,/^(?:\n+)/,/^(?:\s+)/,/^(?:classDiagram\b)/,/^(?:[\{])/,/^(?:$)/,/^(?:[\{])/,/^(?:\})/,/^(?:[\n])/,/^(?:[^\{\}\n]*)/,/^(?:class\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::[^\n;]+)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\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)/,/^(?:$)/],
-conditions: {"string":{"rules":[19,20],"inclusive":false},"generic":{"rules":[16,17],"inclusive":false},"struct":{"rules":[5,6,7,8,9],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,10,11,12,13,14,15,18,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"inclusive":true}}
+rules: [/^(?:%%[^\n]*\n*)/,/^(?:\n+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[\{])/,/^(?:$)/,/^(?:[\{])/,/^(?:\})/,/^(?:[\n])/,/^(?:[^\{\}\n]*)/,/^(?:class\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::[^\n;]+)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\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)/,/^(?:$)/],
+conditions: {"string":{"rules":[20,21],"inclusive":false},"generic":{"rules":[17,18],"inclusive":false},"struct":{"rules":[6,7,8,9,10],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,5,11,12,13,14,15,16,19,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"inclusive":true}}
});
return lexer;
})();
@@ -5344,6 +5938,23 @@ if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
/***/ }),
+/***/ "./src/diagrams/class/styles.js":
+/*!**************************************!*\
+ !*** ./src/diagrams/class/styles.js ***!
+ \**************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var getStyles = function getStyles(options) {
+ return "g.classGroup text {\n fill: ".concat(options.nodeBorder, ";\n fill: ").concat(options.classText, ";\n stroke: none;\n font-family: ").concat(options.fontFamily, ";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(options.nodeBorder, ";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(options.nodeBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n}\n\ng.classGroup line {\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(options.nodeBkg, ";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(options.nodeBorder, ";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(options.nodeBkg, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(options.nodeBkg, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n");
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (getStyles);
+
+/***/ }),
+
/***/ "./src/diagrams/class/svgDraw.js":
/*!***************************************!*\
!*** ./src/diagrams/class/svgDraw.js ***!
@@ -5693,12 +6304,13 @@ var parseClassifier = function parseClassifier(classifier) {
/*!***************************************!*\
!*** ./src/diagrams/common/common.js ***!
\***************************************/
-/*! exports provided: getRows, sanitizeText, lineBreakRegex, hasBreaks, splitBreaks, default */
+/*! exports provided: getRows, removeScript, sanitizeText, lineBreakRegex, hasBreaks, splitBreaks, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRows", function() { return getRows; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeScript", function() { return removeScript; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitizeText", function() { return sanitizeText; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineBreakRegex", function() { return lineBreakRegex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasBreaks", function() { return hasBreaks; });
@@ -5709,17 +6321,48 @@ var getRows = function getRows(s) {
str = str.replace(/\\n/g, '#br#');
return str.split('#br#');
};
+var removeScript = function removeScript(txt) {
+ var rs = '';
+ var idx = 0;
+
+ while (idx >= 0) {
+ idx = txt.indexOf('');
+
+ if (idx >= 0) {
+ idx += 9;
+ txt = txt.substr(idx);
+ }
+ } else {
+ rs += txt;
+ idx = -1;
+ break;
+ }
+ }
+
+ return rs;
+};
var sanitizeText = function sanitizeText(text, config) {
var txt = text;
var htmlLabels = true;
if (config.flowchart && (config.flowchart.htmlLabels === false || config.flowchart.htmlLabels === 'false')) htmlLabels = false;
- if (config.securityLevel !== 'loose' && htmlLabels) {
- // eslint-disable-line
- txt = breakToPlaceholder(txt);
- txt = txt.replace(//g, '>');
- txt = txt.replace(/=/g, '=');
- txt = placeholderToBreak(txt);
+ if (htmlLabels) {
+ var level = config.securityLevel;
+
+ if (level == 'antiscript') {
+ txt = removeScript(txt);
+ } else if (level !== 'loose') {
+ // eslint-disable-line
+ txt = breakToPlaceholder(txt);
+ txt = txt.replace(//g, '>');
+ txt = txt.replace(/=/g, '=');
+ txt = placeholderToBreak(txt);
+ }
}
return txt;
@@ -5745,7 +6388,8 @@ var placeholderToBreak = function placeholderToBreak(s) {
sanitizeText: sanitizeText,
hasBreaks: hasBreaks,
splitBreaks: splitBreaks,
- lineBreakRegex: lineBreakRegex
+ lineBreakRegex: lineBreakRegex,
+ removeScript: removeScript
});
/***/ }),
@@ -5955,7 +6599,7 @@ var drawEntities = function drawEntities(svgNode, entities, graph) {
// which then determines the size of the rectangle
var textId = 'entity-' + id;
- var textNode = groupNode.append('text').attr('id', textId).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'middle').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().fontFamily + '; font-size: ' + conf.fontSize + 'px').text(id); // Calculate the width and height of the entity
+ var textNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', textId).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'middle').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().fontFamily + '; font-size: ' + conf.fontSize + 'px').text(id); // Calculate the width and height of the entity
var textBBox = textNode.node().getBBox();
var entityWidth = Math.max(conf.minEntityWidth, textBBox.width + conf.entityPadding * 2);
@@ -5963,7 +6607,7 @@ var drawEntities = function drawEntities(svgNode, entities, graph) {
textNode.attr('transform', 'translate(' + entityWidth / 2 + ',' + entityHeight / 2 + ')'); // Draw the rectangle - insert it before the text so that the text is not obscured
- var rectNode = groupNode.insert('rect', '#' + textId).attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', 0).attr('y', 0).attr('width', entityWidth).attr('height', entityHeight);
+ var rectNode = groupNode.insert('rect', '#' + textId).attr('class', 'er entityBox').attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', 0).attr('y', 0).attr('width', entityWidth).attr('height', entityHeight);
var rectBBox = rectNode.node().getBBox(); // Add the entity to the graph
graph.setNode(id, {
@@ -6027,7 +6671,7 @@ var drawRelationshipFromLayout = function drawRelationshipFromLayout(svg, rel, g
return d.y;
}).curve(d3__WEBPACK_IMPORTED_MODULE_1__["curveBasis"]); // Insert the line at the right place
- var svgPath = svg.insert('path', '#' + insert).attr('d', lineFunction(edge.points)).attr('stroke', conf.stroke).attr('fill', 'none'); // ...and with dashes if necessary
+ var svgPath = svg.insert('path', '#' + insert).attr('class', 'er relationshipLine').attr('d', lineFunction(edge.points)).attr('stroke', conf.stroke).attr('fill', 'none'); // ...and with dashes if necessary
if (rel.relSpec.relType === _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Identification.NON_IDENTIFYING) {
svgPath.attr('stroke-dasharray', '8,8');
@@ -6087,11 +6731,11 @@ var drawRelationshipFromLayout = function drawRelationshipFromLayout(svg, rel, g
var labelPoint = svgPath.node().getPointAtLength(len * 0.5); // Append a text node containing the label
var labelId = 'rel' + relCnt;
- var labelNode = svg.append('text').attr('id', labelId).attr('x', labelPoint.x).attr('y', labelPoint.y).attr('text-anchor', 'middle').attr('dominant-baseline', 'middle').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().fontFamily + '; font-size: ' + conf.fontSize + 'px').text(rel.roleA); // Figure out how big the opaque 'container' rectangle needs to be
+ var labelNode = svg.append('text').attr('class', 'er relationshipLabel').attr('id', labelId).attr('x', labelPoint.x).attr('y', labelPoint.y).attr('text-anchor', 'middle').attr('dominant-baseline', 'middle').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().fontFamily + '; font-size: ' + conf.fontSize + 'px').text(rel.roleA); // Figure out how big the opaque 'container' rectangle needs to be
var labelBBox = labelNode.node().getBBox(); // Insert the opaque rectangle before the text label
- svg.insert('rect', '#' + labelId).attr('x', labelPoint.x - labelBBox.width / 2).attr('y', labelPoint.y - labelBBox.height / 2).attr('width', labelBBox.width).attr('height', labelBBox.height).attr('fill', 'white').attr('fill-opacity', '85%');
+ svg.insert('rect', '#' + labelId).attr('class', 'er relationshipLabelBox').attr('x', labelPoint.x - labelBBox.width / 2).attr('y', labelPoint.y - labelBBox.height / 2).attr('width', labelBBox.width).attr('height', labelBBox.height).attr('fill', 'white').attr('fill-opacity', '85%');
return;
};
/**
@@ -6169,9 +6813,15 @@ var draw = function draw(text, id) {
var svgBounds = svg.node().getBBox();
var width = svgBounds.width + padding * 2;
var height = svgBounds.height + padding * 2;
- svg.attr('height', height);
- svg.attr('width', '100%');
- svg.attr('style', "max-width: ".concat(width, "px;"));
+
+ if (conf.useMaxWidth) {
+ svg.attr('width', '100%');
+ svg.attr('style', "max-width: ".concat(width, "px;"));
+ } else {
+ svg.attr('height', height);
+ svg.attr('width', width);
+ }
+
svg.attr('viewBox', "".concat(svgBounds.x - padding, " ").concat(svgBounds.y - padding, " ").concat(width, " ").concat(height));
}; // draw
@@ -6872,6 +7522,23 @@ if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
/***/ }),
+/***/ "./src/diagrams/er/styles.js":
+/*!***********************************!*\
+ !*** ./src/diagrams/er/styles.js ***!
+ \***********************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var getStyles = function getStyles(options) {
+ return "\n .entityBox {\n fill: ".concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n }\n\n .relationshipLabelBox {\n fill: ").concat(options.edgeLabelBackground, ";\n fillopactity: 0;\n background-color: ").concat(options.edgeLabelBackground, ";\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ").concat(options.lineColor, ";\n }\n");
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (getStyles);
+
+/***/ }),
+
/***/ "./src/diagrams/flowchart/flowChartShapes.js":
/*!***************************************************!*\
!*** ./src/diagrams/flowchart/flowChartShapes.js ***!
@@ -8376,10 +9043,41 @@ var addEdges = function addEdges(edges, g) {
edgeData.arrowhead = 'none';
} else {
edgeData.arrowhead = 'normal';
- }
+ } // Check of arrow types, placed here in order not to break old rendering
+
+
+ edgeData.arrowTypeStart = 'arrow_open';
+ edgeData.arrowTypeEnd = 'arrow_open';
+ /* eslint-disable no-fallthrough */
+
+ switch (edge.type) {
+ case 'double_arrow_cross':
+ edgeData.arrowTypeStart = 'arrow_cross';
+
+ case 'arrow_cross':
+ edgeData.arrowTypeEnd = 'arrow_cross';
+ break;
+
+ case 'double_arrow_point':
+ edgeData.arrowTypeStart = 'arrow_point';
+
+ case 'arrow_point':
+ edgeData.arrowTypeEnd = 'arrow_point';
+ break;
+
+ case 'double_arrow_circle':
+ edgeData.arrowTypeStart = 'arrow_circle';
+
+ case 'arrow_circle':
+ edgeData.arrowTypeEnd = 'arrow_circle';
+ break;
+ } // logger.info('apa', edgeData, edge);
+ // edgeData.arrowTypeStart = edge.arrowTypeStart;
+ // edgeData.arrowTypeStart = edge.arrowTypeStart;
+ // edgeData.arrowType = edgeData.arrowTypeEnd;
+ // logger.info('apa', edgeData, edge);
+
- _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].info(edgeData, edge);
- edgeData.arrowType = edge.type;
var style = '';
var labelStyle = '';
@@ -8555,7 +9253,7 @@ var draw = function draw(text, id) {
element.selectAll('g.node').attr('title', function () {
return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getTooltip(this.id);
});
- var padding = 8;
+ var padding = conf.diagramPadding;
var svgBounds = svg.node().getBBox();
var width = svgBounds.width + padding * 2;
var height = svgBounds.height + padding * 2;
@@ -9057,7 +9755,7 @@ var draw = function draw(text, id) {
element.selectAll('g.node').attr('title', function () {
return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getTooltip(this.id);
});
- var padding = 8;
+ var padding = conf.diagramPadding;
var svgBounds = svg.node().getBBox();
var width = svgBounds.width + padding * 2;
var height = svgBounds.height + padding * 2;
@@ -10171,6 +10869,23 @@ if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
/***/ }),
+/***/ "./src/diagrams/flowchart/styles.js":
+/*!******************************************!*\
+ !*** ./src/diagrams/flowchart/styles.js ***!
+ \******************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var getStyles = function getStyles(options) {
+ return ".label {\n font-family: ".concat(options.fontFamily, ";\n color: ").concat(options.textColor, ";\n }\n\n .label text {\n fill: ").concat(options.textColor, ";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(options.arrowheadColor, ";\n }\n\n .edgePath .path {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(options.lineColor, ";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(options.edgeLabelBackground, ";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(options.secondBkg, ";\n stroke: ").concat(options.clusterBorder, ";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(options.titleColor, ";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(options.fontFamily, ";\n font-size: 12px;\n background: ").concat(options.secondBkg, ";\n border: 1px solid ").concat(options.border2, ";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n");
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (getStyles);
+
+/***/ }),
+
/***/ "./src/diagrams/gantt/ganttDb.js":
/*!***************************************!*\
!*** ./src/diagrams/gantt/ganttDb.js ***!
@@ -12004,6 +12719,23 @@ if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
/***/ }),
+/***/ "./src/diagrams/gantt/styles.js":
+/*!**************************************!*\
+ !*** ./src/diagrams/gantt/styles.js ***!
+ \**************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var getStyles = function getStyles(options) {
+ return "\n .mermaid-main-font {\n font-family: \"trebuchet ms\", verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ".concat(options.sectionBkgColor, ";\n }\n\n .section2 {\n fill: ").concat(options.sectionBkgColor2, ";\n }\n\n .section1,\n .section3 {\n fill: ").concat(options.altSectionBkgColor, ";\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ").concat(options.titleColor, ";\n }\n\n .sectionTitle1 {\n fill: ").concat(options.titleColor, ";\n }\n\n .sectionTitle2 {\n fill: ").concat(options.titleColor, ";\n }\n\n .sectionTitle3 {\n fill: ").concat(options.titleColor, ";\n }\n\n .sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ").concat(options.gridColor, ";\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ").concat(options.fontFamily, ";\n fill: ").concat(options.textColor, ";\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ").concat(options.todayLineColor, ";\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n\n .taskText:not([font-size]) {\n font-size: 11px;\n }\n\n .taskTextOutsideRight {\n fill: ").concat(options.taskTextDarkColor, ";\n text-anchor: start;\n font-size: 11px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ").concat(options.taskTextDarkColor, ";\n text-anchor: end;\n font-size: 11px;\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ").concat(options.taskTextClickableColor, " !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ").concat(options.taskTextClickableColor, " !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ").concat(options.taskTextClickableColor, " !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ").concat(options.taskTextColor, ";\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ").concat(options.taskBkgColor, ";\n stroke: ").concat(options.taskBorderColor, ";\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ").concat(options.taskTextOutsideColor, ";\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ").concat(options.taskTextOutsideColor, ";\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ").concat(options.activeTaskBkgColor, ";\n stroke: ").concat(options.activeTaskBorderColor, ";\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ").concat(options.taskTextDarkColor, " !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ").concat(options.doneTaskBorderColor, ";\n fill: ").concat(options.doneTaskBkgColor, ";\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ").concat(options.taskTextDarkColor, " !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ").concat(options.critBorderColor, ";\n fill: ").concat(options.critBkgColor, ";\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ").concat(options.critBorderColor, ";\n fill: ").concat(options.activeTaskBkgColor, ";\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ").concat(options.critBorderColor, ";\n fill: ").concat(options.doneTaskBkgColor, ";\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ").concat(options.taskTextDarkColor, " !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ").concat(options.taskTextDarkColor, " !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(options.taskTextDarkColor, " ;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n");
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (getStyles);
+
+/***/ }),
+
/***/ "./src/diagrams/git/gitGraphAst.js":
/*!*****************************************!*\
!*** ./src/diagrams/git/gitGraphAst.js ***!
@@ -12031,6 +12763,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHead", function() { return getHead; });
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
+/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
+
var commits = {};
var head = null;
@@ -12041,20 +12775,10 @@ var curBranch = 'master';
var direction = 'LR';
var seq = 0;
-function makeid(length) {
- var result = '';
- var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
- var charactersLength = characters.length;
-
- for (var i = 0; i < length; i++) {
- result += characters.charAt(Math.floor(Math.random() * charactersLength));
- }
-
- return result;
-}
-
function getId() {
- return makeid(7);
+ return Object(_utils__WEBPACK_IMPORTED_MODULE_1__["random"])({
+ length: 7
+ });
}
function isfastforwardable(currentCommit, otherCommit) {
@@ -13316,6 +14040,23 @@ if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
/***/ }),
+/***/ "./src/diagrams/git/styles.js":
+/*!************************************!*\
+ !*** ./src/diagrams/git/styles.js ***!
+ \************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var getStyles = function getStyles() {
+ return "\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n";
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (getStyles);
+
+/***/ }),
+
/***/ "./src/diagrams/info/infoDb.js":
/*!*************************************!*\
!*** ./src/diagrams/info/infoDb.js ***!
@@ -14059,6 +14800,23 @@ if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
/***/ }),
+/***/ "./src/diagrams/info/styles.js":
+/*!*************************************!*\
+ !*** ./src/diagrams/info/styles.js ***!
+ \*************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var getStyles = function getStyles() {
+ return "";
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (getStyles);
+
+/***/ }),
+
/***/ "./src/diagrams/pie/parser/pie.jison":
/*!*******************************************!*\
!*** ./src/diagrams/pie/parser/pie.jison ***!
@@ -14890,6 +15648,23 @@ var draw = function draw(txt, id) {
/***/ }),
+/***/ "./src/diagrams/pie/styles.js":
+/*!************************************!*\
+ !*** ./src/diagrams/pie/styles.js ***!
+ \************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var getStyles = function getStyles(options) {
+ return ".pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: ".concat(options.taskTextDarkColor, ";\n font-family: ").concat(options.fontFamily, ";\n }\n .slice {\n font-family: ").concat(options.fontFamily, ";\n fill: ").concat(options.textColor, ";\n // fill: white;\n }\n .legend text {\n fill: ").concat(options.taskTextDarkColor, ";\n font-family: ").concat(options.fontFamily, ";\n font-size: 17px;\n }\n");
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (getStyles);
+
+/***/ }),
+
/***/ "./src/diagrams/sequence/parser/sequenceDiagram.jison":
/*!************************************************************!*\
!*** ./src/diagrams/sequence/parser/sequenceDiagram.jison ***!
@@ -17075,6 +17850,23 @@ var calculateLoopBounds = function calculateLoopBounds(messages, actors) {
/***/ }),
+/***/ "./src/diagrams/sequence/styles.js":
+/*!*****************************************!*\
+ !*** ./src/diagrams/sequence/styles.js ***!
+ \*****************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var getStyles = function getStyles(options) {
+ return ".actor {\n stroke: ".concat(options.actorBorder, ";\n fill: ").concat(options.actorBkg, ";\n }\n\n text.actor > tspan {\n fill: ").concat(options.actorTextColor, ";\n stroke: none;\n }\n\n .actor-line {\n stroke: ").concat(options.actorLineColor, ";\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ").concat(options.signalColor, ";\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ").concat(options.signalColor, ";\n }\n\n #arrowhead path {\n fill: ").concat(options.signalColor, ";\n stroke: ").concat(options.signalColor, ";\n }\n\n .sequenceNumber {\n fill: ").concat(options.sequenceNumberColor, ";\n }\n\n #sequencenumber {\n fill: ").concat(options.signalColor, ";\n }\n\n #crosshead path {\n fill: ").concat(options.signalColor, ";\n stroke: ").concat(options.signalColor, ";\n }\n\n .messageText {\n fill: ").concat(options.signalTextColor, ";\n stroke: ").concat(options.signalTextColor, ";\n }\n\n .labelBox {\n stroke: ").concat(options.labelBoxBorderColor, ";\n fill: ").concat(options.labelBoxBkgColor, ";\n }\n\n .labelText, .labelText > tspan {\n fill: ").concat(options.labelTextColor, ";\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ").concat(options.loopTextColor, ";\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ").concat(options.labelBoxBorderColor, ";\n fill: ").concat(options.labelBoxBorderColor, ";\n }\n\n .note {\n //stroke: #decc93;\n stroke: ").concat(options.noteBorderColor, ";\n fill: ").concat(options.noteBkgColor, ";\n }\n\n .noteText, .noteText > tspan {\n fill: ").concat(options.noteTextColor, ";\n stroke: none;\n }\n\n .activation0 {\n fill: ").concat(options.activationBkgColor, ";\n stroke: ").concat(options.activationBorderColor, ";\n }\n\n .activation1 {\n fill: ").concat(options.activationBkgColor, ";\n stroke: ").concat(options.activationBorderColor, ";\n }\n\n .activation2 {\n fill: ").concat(options.activationBkgColor, ";\n stroke: ").concat(options.activationBorderColor, ";\n }\n");
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (getStyles);
+
+/***/ }),
+
/***/ "./src/diagrams/sequence/svgDraw.js":
/*!******************************************!*\
!*** ./src/diagrams/sequence/svgDraw.js ***!
@@ -19309,7 +20101,7 @@ var setupDoc = function setupDoc(g, parent, doc, altFlag) {
var edgeData = {
id: 'edge' + cnt,
arrowhead: 'normal',
- arrowType: 'arrow_barb',
+ arrowTypeEnd: 'arrow_barb',
style: 'fill:none',
labelStyle: '',
label: item.description,
@@ -19732,6 +20524,23 @@ var renderDoc = function renderDoc(doc, diagram, parentId, altBkg) {
/***/ }),
+/***/ "./src/diagrams/state/styles.js":
+/*!**************************************!*\
+ !*** ./src/diagrams/state/styles.js ***!
+ \**************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var getStyles = function getStyles(options) {
+ return "g.stateGroup text {\n fill: ".concat(options.nodeBorder, ";\n stroke: none;\n font-size: 10px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n}\ng.stateGroup text {\n fill: ").concat(options.textColor, ";\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ").concat(options.labelColor, ";\n}\n\ng.stateGroup rect {\n fill: ").concat(options.nodeBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n}\n\ng.stateGroup line {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n}\n\n.transition {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ").concat(options.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: ").concat(options.noteBorderColor, ";\n fill: ").concat(options.noteBkgColor, ";\n\n text {\n fill: black;\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(options.nodeBkg, ";\n opacity: 0.5;\n}\n\n.stateLabel text {\n fill: ").concat(options.labelColor, ";\n font-size: 10px;\n font-weight: bold;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n}\n\n.node circle.state-start {\n fill: black;\n stroke: black;\n}\n.node circle.state-end {\n fill: black;\n stroke: white;\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ").concat(options.lineColor, ";\n}\n\n.statediagram-cluster rect {\n fill: ").concat(options.nodeBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ").concat(options.textColor, ";\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ").concat(options.nodeBorder, ";\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ").concat(options.background, ";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: #e0e0e0;\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: ").concat(options.altBackground ? options.altBackground : '#efefef', ";\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ").concat(options.noteBkgColor, ";\n stroke: ").concat(options.noteBorderColor, ";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ").concat(options.noteBkgColor, ";\n stroke: ").concat(options.noteBorderColor, ";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note .nodeLabel {\n color: ").concat(options.noteTextColor, ";\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ").concat(options.lineColor, ";\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n}\n");
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (getStyles);
+
+/***/ }),
+
/***/ "./src/diagrams/user-journey/journeyDb.js":
/*!************************************************!*\
!*** ./src/diagrams/user-journey/journeyDb.js ***!
@@ -20106,19 +20915,22 @@ var drawTasks = function drawTasks(diagram, tasks, verticalPos) {
var taskPos = verticalPos + sectionVHeight;
var sectionNumber = 0;
var fill = '#CCC';
- var colour = 'black'; // Draw the tasks
+ var colour = 'black';
+ var num = 0; // Draw the tasks
for (var i = 0; i < tasks.length; i++) {
var task = tasks[i];
if (lastSection !== task.section) {
fill = fills[sectionNumber % fills.length];
+ num = sectionNumber % fills.length;
colour = textColours[sectionNumber % textColours.length];
var section = {
x: i * conf.taskMargin + i * conf.width + LEFT_MARGIN,
y: 50,
text: task.section,
fill: fill,
+ num: num,
colour: colour
};
_svgDraw__WEBPACK_IMPORTED_MODULE_3__["default"].drawSection(diagram, section, conf);
@@ -20141,6 +20953,7 @@ var drawTasks = function drawTasks(diagram, tasks, verticalPos) {
task.height = conf.diagramMarginY;
task.colour = colour;
task.fill = fill;
+ task.num = num;
task.actors = taskActors; // Draw the box with the attached line
_svgDraw__WEBPACK_IMPORTED_MODULE_3__["default"].drawTask(diagram, task, conf);
@@ -20811,6 +21624,23 @@ if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
/***/ }),
+/***/ "./src/diagrams/user-journey/styles.js":
+/*!*********************************************!*\
+ !*** ./src/diagrams/user-journey/styles.js ***!
+ \*********************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var getStyles = function getStyles(options) {
+ return ".label {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n color: ".concat(options.textColor, ";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(options.textColor, "\n }\n\n .legend {\n fill: ").concat(options.textColor, ";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(options.textColor, "\n }\n\n .face {\n fill: #FFF8DC;\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(options.arrowheadColor, ";\n }\n\n .edgePath .path {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(options.lineColor, ";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(options.edgeLabelBackground, ";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(options.secondBkg, ";\n stroke: ").concat(options.clusterBorder, ";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(options.titleColor, ";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(options.secondBkg, ";\n border: 1px solid ").concat(options.border2, ";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType0) : '', ";\n }\n .task-type-1, .section-type-1 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType1) : '', ";\n }\n .task-type-2, .section-type-2 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType2) : '', ";\n }\n .task-type-3, .section-type-3 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType3) : '', ";\n }\n .task-type-4, .section-type-4 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType4) : '', ";\n }\n .task-type-5, .section-type-5 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType5) : '', ";\n }\n .task-type-6, .section-type-6 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType6) : '', ";\n }\n .task-type-7, .section-type-7 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType7) : '', ";\n }\n");
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (getStyles);
+
+/***/ }),
+
/***/ "./src/diagrams/user-journey/svgDraw.js":
/*!**********************************************!*\
!*** ./src/diagrams/user-journey/svgDraw.js ***!
@@ -20852,7 +21682,7 @@ var drawRect = function drawRect(elem, rectData) {
};
var drawFace = function drawFace(element, faceData) {
var radius = 15;
- var circleElement = element.append('circle').attr('cx', faceData.cx).attr('cy', faceData.cy).attr('fill', '#FFF8DC').attr('stroke', '#999').attr('r', radius).attr('stroke-width', 2).attr('overflow', 'visible');
+ var 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');
var face = element.append('g'); //left eye
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'); //right eye
@@ -20862,17 +21692,17 @@ var drawFace = function drawFace(element, faceData) {
function smile(face) {
var arc = Object(d3__WEBPACK_IMPORTED_MODULE_0__["arc"])().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); //mouth
- face.append('path').attr('d', arc).attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 2) + ')');
+ face.append('path').attr('class', 'mouth').attr('d', arc).attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 2) + ')');
}
function sad(face) {
var arc = Object(d3__WEBPACK_IMPORTED_MODULE_0__["arc"])().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); //mouth
- face.append('path').attr('d', arc).attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 7) + ')');
+ face.append('path').attr('class', 'mouth').attr('d', arc).attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 7) + ')');
}
function ambivalent(face) {
- face.append('line').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', 'task-line').attr('stroke-width', '1px').attr('stroke', '#666');
+ face.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) {
@@ -20909,7 +21739,7 @@ var drawText = function drawText(elem, textData) {
var textElem = elem.append('text');
textElem.attr('x', textData.x);
textElem.attr('y', textData.y);
- textElem.attr('fill', textData.fill);
+ textElem.attr('class', 'legend');
textElem.style('text-anchor', textData.anchor);
if (typeof textData.class !== 'undefined') {
@@ -20941,13 +21771,13 @@ var drawSection = function drawSection(elem, section, conf) {
rect.fill = section.fill;
rect.width = conf.width;
rect.height = conf.height;
- rect.class = 'journey-section';
+ rect.class = 'journey-section section-type-' + section.num;
rect.rx = 3;
rect.ry = 3;
drawRect(g, rect);
_drawTextCandidateFunc(conf)(section.text, g, rect.x, rect.y, rect.width, rect.height, {
- class: 'journey-section'
+ class: 'journey-section section-type-' + section.num
}, conf, section.colour);
};
var taskCount = -1;
@@ -20975,7 +21805,7 @@ var drawTask = function drawTask(elem, task, conf) {
rect.fill = task.fill;
rect.width = conf.width;
rect.height = conf.height;
- rect.class = 'task';
+ rect.class = 'task task-type-' + task.num;
rect.rx = 3;
rect.ry = 3;
drawRect(g, rect);
@@ -21062,11 +21892,12 @@ var _drawTextCandidateFunc = function () {
}
}
- function byFo(content, g, x, y, width, height, textAttrs, conf, colour) {
+ function byFo(content, g, x, y, width, height, textAttrs, conf) {
var body = g.append('switch');
var f = body.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height).attr('position', 'fixed');
var text = f.append('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').style('color', colour).text(content);
+ text.append('div').attr('class', 'label').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle') // .style('color', colour)
+ .text(content);
byTspan(content, body, x, y, width, height, textAttrs, conf);
_setTextAttrs(text, textAttrs);
@@ -21410,7 +22241,7 @@ var initialize = function initialize(config) {
}
}
- _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize(config);
+ _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize(config); // mermaidAPI.reset();
};
/**
* ##contentLoaded
@@ -21475,10 +22306,10 @@ var mermaid = {
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeEntities", function() { return encodeEntities; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decodeEntities", function() { return decodeEntities; });
-/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
-/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var scope_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! scope-css */ "scope-css");
-/* harmony import */ var scope_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(scope_css__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stylis */ "stylis");
+/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(stylis__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3");
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../package.json */ "./package.json");
var _package_json__WEBPACK_IMPORTED_MODULE_2___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../package.json */ "./package.json", 1);
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config */ "./src/config.js");
@@ -21498,35 +22329,38 @@ var _package_json__WEBPACK_IMPORTED_MODULE_2___namespace = /*#__PURE__*/__webpac
/* harmony import */ var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diagrams/gantt/ganttDb */ "./src/diagrams/gantt/ganttDb.js");
/* harmony import */ var _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diagrams/class/classRenderer */ "./src/diagrams/class/classRenderer.js");
-/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diagrams/class/parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.jison");
-/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17__);
-/* harmony import */ var _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diagrams/class/classDb */ "./src/diagrams/class/classDb.js");
-/* harmony import */ var _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./diagrams/state/stateRenderer */ "./src/diagrams/state/stateRenderer.js");
-/* harmony import */ var _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./diagrams/state/stateRenderer-v2 */ "./src/diagrams/state/stateRenderer-v2.js");
-/* harmony import */ var _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./diagrams/state/parser/stateDiagram */ "./src/diagrams/state/parser/stateDiagram.jison");
-/* harmony import */ var _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21__);
-/* harmony import */ var _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./diagrams/state/stateDb */ "./src/diagrams/state/stateDb.js");
-/* harmony import */ var _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./diagrams/git/gitGraphRenderer */ "./src/diagrams/git/gitGraphRenderer.js");
-/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./diagrams/git/parser/gitGraph */ "./src/diagrams/git/parser/gitGraph.jison");
-/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_24__);
-/* harmony import */ var _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./diagrams/git/gitGraphAst */ "./src/diagrams/git/gitGraphAst.js");
-/* harmony import */ var _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./diagrams/info/infoRenderer */ "./src/diagrams/info/infoRenderer.js");
-/* harmony import */ var _errorRenderer__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./errorRenderer */ "./src/errorRenderer.js");
-/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./diagrams/info/parser/info */ "./src/diagrams/info/parser/info.jison");
-/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_28__);
-/* harmony import */ var _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./diagrams/info/infoDb */ "./src/diagrams/info/infoDb.js");
-/* harmony import */ var _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./diagrams/pie/pieRenderer */ "./src/diagrams/pie/pieRenderer.js");
-/* harmony import */ var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./diagrams/pie/parser/pie */ "./src/diagrams/pie/parser/pie.jison");
-/* harmony import */ var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(_diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_31__);
-/* harmony import */ var _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./diagrams/pie/pieDb */ "./src/diagrams/pie/pieDb.js");
-/* harmony import */ var _diagrams_er_erDb__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./diagrams/er/erDb */ "./src/diagrams/er/erDb.js");
-/* harmony import */ var _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./diagrams/er/parser/erDiagram */ "./src/diagrams/er/parser/erDiagram.jison");
-/* harmony import */ var _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(_diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_34__);
-/* harmony import */ var _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./diagrams/er/erRenderer */ "./src/diagrams/er/erRenderer.js");
-/* harmony import */ var _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./diagrams/user-journey/parser/journey */ "./src/diagrams/user-journey/parser/journey.jison");
-/* harmony import */ var _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(_diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_36__);
-/* harmony import */ var _diagrams_user_journey_journeyDb__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./diagrams/user-journey/journeyDb */ "./src/diagrams/user-journey/journeyDb.js");
-/* harmony import */ var _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./diagrams/user-journey/journeyRenderer */ "./src/diagrams/user-journey/journeyRenderer.js");
+/* harmony import */ var _diagrams_class_classRenderer_v2__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diagrams/class/classRenderer-v2 */ "./src/diagrams/class/classRenderer-v2.js");
+/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diagrams/class/parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.jison");
+/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_18__);
+/* harmony import */ var _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./diagrams/class/classDb */ "./src/diagrams/class/classDb.js");
+/* harmony import */ var _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./diagrams/state/stateRenderer */ "./src/diagrams/state/stateRenderer.js");
+/* harmony import */ var _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./diagrams/state/stateRenderer-v2 */ "./src/diagrams/state/stateRenderer-v2.js");
+/* harmony import */ var _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./diagrams/state/parser/stateDiagram */ "./src/diagrams/state/parser/stateDiagram.jison");
+/* harmony import */ var _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_22__);
+/* harmony import */ var _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./diagrams/state/stateDb */ "./src/diagrams/state/stateDb.js");
+/* harmony import */ var _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./diagrams/git/gitGraphRenderer */ "./src/diagrams/git/gitGraphRenderer.js");
+/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./diagrams/git/parser/gitGraph */ "./src/diagrams/git/parser/gitGraph.jison");
+/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_25__);
+/* harmony import */ var _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./diagrams/git/gitGraphAst */ "./src/diagrams/git/gitGraphAst.js");
+/* harmony import */ var _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./diagrams/info/infoRenderer */ "./src/diagrams/info/infoRenderer.js");
+/* harmony import */ var _errorRenderer__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./errorRenderer */ "./src/errorRenderer.js");
+/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./diagrams/info/parser/info */ "./src/diagrams/info/parser/info.jison");
+/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(_diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_29__);
+/* harmony import */ var _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./diagrams/info/infoDb */ "./src/diagrams/info/infoDb.js");
+/* harmony import */ var _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./diagrams/pie/pieRenderer */ "./src/diagrams/pie/pieRenderer.js");
+/* harmony import */ var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./diagrams/pie/parser/pie */ "./src/diagrams/pie/parser/pie.jison");
+/* harmony import */ var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(_diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_32__);
+/* harmony import */ var _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./diagrams/pie/pieDb */ "./src/diagrams/pie/pieDb.js");
+/* harmony import */ var _diagrams_er_erDb__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./diagrams/er/erDb */ "./src/diagrams/er/erDb.js");
+/* harmony import */ var _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./diagrams/er/parser/erDiagram */ "./src/diagrams/er/parser/erDiagram.jison");
+/* harmony import */ var _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(_diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_35__);
+/* harmony import */ var _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./diagrams/er/erRenderer */ "./src/diagrams/er/erRenderer.js");
+/* harmony import */ var _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./diagrams/user-journey/parser/journey */ "./src/diagrams/user-journey/parser/journey.jison");
+/* harmony import */ var _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(_diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_37__);
+/* harmony import */ var _diagrams_user_journey_journeyDb__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./diagrams/user-journey/journeyDb */ "./src/diagrams/user-journey/journeyDb.js");
+/* harmony import */ var _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./diagrams/user-journey/journeyRenderer */ "./src/diagrams/user-journey/journeyRenderer.js");
+/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./styles */ "./src/styles.js");
+/* harmony import */ var _themes__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./themes */ "./src/themes/index.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/**
@@ -21581,12 +22415,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
-var themes = {};
-for (var _i = 0, _arr = ['default', 'forest', 'dark', 'neutral']; _i < _arr.length; _i++) {
- var themeName = _arr[_i];
- themes[themeName] = __webpack_require__("./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$")("./".concat(themeName, "/index.scss"));
-}
+
+
function parse(text) {
var graphInit = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].detectInit(text);
@@ -21602,8 +22433,8 @@ function parse(text) {
switch (graphType) {
case 'git':
- parser = _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_24___default.a;
- parser.parser.yy = _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_25__["default"];
+ parser = _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_25___default.a;
+ parser.parser.yy = _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_26__["default"];
break;
case 'flowchart':
@@ -21629,42 +22460,47 @@ function parse(text) {
break;
case 'class':
- parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17___default.a;
- parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_18__["default"];
+ parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_18___default.a;
+ parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_19__["default"];
+ break;
+
+ case 'classDiagram':
+ parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_18___default.a;
+ parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_19__["default"];
break;
case 'state':
- parser = _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21___default.a;
- parser.parser.yy = _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_22__["default"];
+ parser = _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_22___default.a;
+ parser.parser.yy = _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_23__["default"];
break;
case 'stateDiagram':
- parser = _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21___default.a;
- parser.parser.yy = _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_22__["default"];
+ parser = _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_22___default.a;
+ parser.parser.yy = _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_23__["default"];
break;
case 'info':
_logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('info info info');
- parser = _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_28___default.a;
- parser.parser.yy = _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_29__["default"];
+ parser = _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_29___default.a;
+ parser.parser.yy = _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_30__["default"];
break;
case 'pie':
_logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('pie');
- parser = _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_31___default.a;
- parser.parser.yy = _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_32__["default"];
+ parser = _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_32___default.a;
+ parser.parser.yy = _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_33__["default"];
break;
case 'er':
_logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('er');
- parser = _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_34___default.a;
- parser.parser.yy = _diagrams_er_erDb__WEBPACK_IMPORTED_MODULE_33__["default"];
+ parser = _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_35___default.a;
+ parser.parser.yy = _diagrams_er_erDb__WEBPACK_IMPORTED_MODULE_34__["default"];
break;
case 'journey':
_logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Journey');
- parser = _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_36___default.a;
- parser.parser.yy = _diagrams_user_journey_journeyDb__WEBPACK_IMPORTED_MODULE_37__["default"];
+ parser = _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_37___default.a;
+ parser.parser.yy = _diagrams_user_journey_journeyDb__WEBPACK_IMPORTED_MODULE_38__["default"];
break;
}
@@ -21741,24 +22577,26 @@ var decodeEntities = function decodeEntities(text) {
*/
var render = function render(id, _txt, cb, container) {
- var cnf = Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])(); // Check the maximum allowed text size
-
var txt = _txt;
+ var graphInit = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].detectInit(txt);
+
+ if (graphInit) {
+ reinitialize(graphInit);
+ } else {
+ _config__WEBPACK_IMPORTED_MODULE_3__["default"].reset();
+ var siteConfig = Object(_config__WEBPACK_IMPORTED_MODULE_3__["getSiteConfig"])();
+ updateRendererConfigs(siteConfig);
+ }
+
+ var cnf = Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])(); // Check the maximum allowed text size
if (_txt.length > cnf.maxTextSize) {
txt = 'graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa';
}
- var graphInit = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].detectInit(txt);
-
- if (graphInit) {
- reinitialize(graphInit);
- Object(_utils__WEBPACK_IMPORTED_MODULE_5__["assignWithDepth"])(cnf, Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])());
- }
-
if (typeof container !== 'undefined') {
container.innerHTML = '';
- Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(container).append('div').attr('id', 'd' + id).attr('style', 'font-family: ' + cnf.fontFamily).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');
+ Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])(container).append('div').attr('id', 'd' + id).attr('style', 'font-family: ' + cnf.fontFamily).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');
} else {
var existingSvg = document.getElementById(id);
@@ -21772,65 +22610,66 @@ var render = function render(id, _txt, cb, container) {
_element.remove();
}
- Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('body').append('div').attr('id', 'd' + id).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');
+ Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('body').append('div').attr('id', 'd' + id).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');
}
window.txt = txt;
txt = encodeEntities(txt);
- var element = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#d' + id).node();
+ var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#d' + id).node();
var graphType = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].detectType(txt); // insert inline style into svg
var svg = element.firstChild;
- var firstChild = svg.firstChild; // pre-defined theme
-
- var style = themes[cnf.theme];
-
- if (style === undefined) {
- style = '';
- } // user provided theme CSS
-
+ var firstChild = svg.firstChild;
+ var userStyles = ''; // user provided theme CSS
if (cnf.themeCSS !== undefined) {
- style += "\n".concat(cnf.themeCSS);
+ userStyles += "\n".concat(cnf.themeCSS);
} // user provided theme CSS
if (cnf.fontFamily !== undefined) {
- style += "\n:root { --mermaid-font-family: ".concat(cnf.fontFamily, "}");
+ userStyles += "\n:root { --mermaid-font-family: ".concat(cnf.fontFamily, "}");
} // user provided theme CSS
if (cnf.altFontFamily !== undefined) {
- style += "\n:root { --mermaid-alt-font-family: ".concat(cnf.altFontFamily, "}");
+ userStyles += "\n:root { --mermaid-alt-font-family: ".concat(cnf.altFontFamily, "}");
} // classDef
- if (graphType === 'flowchart' || graphType === 'flowchart-v2') {
+ if (graphType === 'flowchart' || graphType === 'flowchart-v2' || graphType === 'graph') {
var classes = _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].getClasses(txt);
for (var className in classes) {
- style += "\n.".concat(className, " > * { ").concat(classes[className].styles.join(' !important; '), " !important; }");
+ userStyles += "\n.".concat(className, " > * { ").concat(classes[className].styles.join(' !important; '), " !important; }");
if (classes[className].textStyles) {
- style += "\n.".concat(className, " tspan { ").concat(classes[className].textStyles.join(' !important; '), " !important; }");
+ userStyles += "\n.".concat(className, " tspan { ").concat(classes[className].textStyles.join(' !important; '), " !important; }");
}
}
}
+ var stylis = new stylis__WEBPACK_IMPORTED_MODULE_0___default.a();
+ var rules = stylis("#".concat(id), Object(_styles__WEBPACK_IMPORTED_MODULE_40__["default"])(graphType, userStyles, cnf.themeVariables));
var style1 = document.createElement('style');
- style1.innerHTML = scope_css__WEBPACK_IMPORTED_MODULE_1___default()(style, "#".concat(id));
- svg.insertBefore(style1, firstChild);
- var style2 = document.createElement('style');
- var cs = window.getComputedStyle(svg);
- style2.innerHTML = "#".concat(id, " {\n color: ").concat(cs.color, ";\n font: ").concat(cs.font, ";\n }");
- svg.insertBefore(style2, firstChild);
+ style1.innerHTML = rules;
+ svg.insertBefore(style1, firstChild); // Verify that the generated svgs are ok before removing this
+ // const style2 = document.createElement('style');
+ // const cs = window.getComputedStyle(svg);
+ // style2.innerHTML = `#d${id} * {
+ // color: ${cs.color};
+ // // font: ${cs.font};
+ // // font-family: Arial;
+ // // font-size: 24px;
+ // }`;
+ // svg.insertBefore(style2, firstChild);
try {
switch (graphType) {
case 'git':
cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
- _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_23__["default"].setConf(cnf.git);
- _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_23__["default"].draw(txt, id, false);
+ _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_24__["default"].setConf(cnf.git);
+ _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_24__["default"].draw(txt, id, false);
break;
case 'flowchart':
@@ -21871,47 +22710,53 @@ var render = function render(id, _txt, cb, container) {
_diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_16__["default"].draw(txt, id);
break;
+ case 'classDiagram':
+ cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
+ _diagrams_class_classRenderer_v2__WEBPACK_IMPORTED_MODULE_17__["default"].setConf(cnf.class);
+ _diagrams_class_classRenderer_v2__WEBPACK_IMPORTED_MODULE_17__["default"].draw(txt, id);
+ break;
+
case 'state':
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
- _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_19__["default"].setConf(cnf.state);
- _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_19__["default"].draw(txt, id);
+ _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_20__["default"].setConf(cnf.state);
+ _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_20__["default"].draw(txt, id);
break;
case 'stateDiagram':
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
- _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_20__["default"].setConf(cnf.state);
- _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_20__["default"].draw(txt, id);
+ _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_21__["default"].setConf(cnf.state);
+ _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_21__["default"].draw(txt, id);
break;
case 'info':
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
- _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_26__["default"].setConf(cnf.class);
- _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_26__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
+ _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_27__["default"].setConf(cnf.class);
+ _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_27__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
break;
case 'pie':
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
- _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_30__["default"].setConf(cnf.class);
- _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_30__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
+ _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_31__["default"].setConf(cnf.class);
+ _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_31__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
break;
case 'er':
- _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_35__["default"].setConf(cnf.er);
- _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_35__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
+ _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_36__["default"].setConf(cnf.er);
+ _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_36__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
break;
case 'journey':
- _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__["default"].setConf(cnf.journey);
- _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
+ _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_39__["default"].setConf(cnf.journey);
+ _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_39__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
break;
}
} catch (e) {
// errorRenderer.setConf(cnf.class);
- _errorRenderer__WEBPACK_IMPORTED_MODULE_27__["default"].draw(id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
+ _errorRenderer__WEBPACK_IMPORTED_MODULE_28__["default"].draw(id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
throw e;
}
- Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id=\"".concat(id, "\"]")).selectAll('foreignobject > *').attr('xmlns', 'http://www.w3.org/1999/xhtml'); // if (cnf.arrowMarkerAbsolute) {
+ Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id=\"".concat(id, "\"]")).selectAll('foreignobject > *').attr('xmlns', 'http://www.w3.org/1999/xhtml'); // if (cnf.arrowMarkerAbsolute) {
// url =
// window.location.protocol +
// '//' +
@@ -21923,7 +22768,7 @@ var render = function render(id, _txt, cb, container) {
// }
// Fix for when the base tag is used
- var svgCode = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#d' + id).node().innerHTML;
+ var svgCode = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#d' + id).node().innerHTML;
_logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('cnf.arrowMarkerAbsolute', cnf.arrowMarkerAbsolute);
if (!cnf.arrowMarkerAbsolute || cnf.arrowMarkerAbsolute === 'false') {
@@ -21944,7 +22789,7 @@ var render = function render(id, _txt, cb, container) {
break;
case 'class':
- cb(svgCode, _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_18__["default"].bindFunctions);
+ cb(svgCode, _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_19__["default"].bindFunctions);
break;
default:
@@ -21954,10 +22799,10 @@ var render = function render(id, _txt, cb, container) {
_logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('CB = undefined!');
}
- var node = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#d' + id).node();
+ var node = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#d' + id).node();
if (node !== null && typeof node.remove === 'function') {
- Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#d' + id).node().remove();
+ Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#d' + id).node().remove();
}
return svgCode;
@@ -22043,7 +22888,7 @@ var handleDirective = function handleDirective(directive, type) {
};
function updateRendererConfigs(conf) {
- _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_23__["default"].setConf(conf.git);
+ _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_24__["default"].setConf(conf.git);
_diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].setConf(conf.flowchart);
_diagrams_flowchart_flowRenderer_v2__WEBPACK_IMPORTED_MODULE_7__["default"].setConf(conf.flowchart);
@@ -22054,17 +22899,22 @@ function updateRendererConfigs(conf) {
_diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_10__["default"].setConf(conf.sequence);
_diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_13__["default"].setConf(conf.gantt);
_diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_16__["default"].setConf(conf.class);
- _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_19__["default"].setConf(conf.state);
- _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_20__["default"].setConf(conf.state);
- _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_26__["default"].setConf(conf.class);
- _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_30__["default"].setConf(conf.class);
- _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_35__["default"].setConf(conf.er);
- _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__["default"].setConf(conf.journey);
- _errorRenderer__WEBPACK_IMPORTED_MODULE_27__["default"].setConf(conf.class);
+ _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_20__["default"].setConf(conf.state);
+ _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_21__["default"].setConf(conf.state);
+ _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_27__["default"].setConf(conf.class);
+ _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_31__["default"].setConf(conf.class);
+ _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_36__["default"].setConf(conf.er);
+ _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_39__["default"].setConf(conf.journey);
+ _errorRenderer__WEBPACK_IMPORTED_MODULE_28__["default"].setConf(conf.class);
}
function reinitialize(options) {
- console.log("mermaidAPI.reinitialize: v".concat(_package_json__WEBPACK_IMPORTED_MODULE_2__.version), options); // Set default options
+ // console.warn(`mermaidAPI.reinitialize: v${pkg.version}`, options);
+ if (options.theme && _themes__WEBPACK_IMPORTED_MODULE_41__["default"][options.theme]) {
+ // Todo merge with user options
+ options.themeVariables = options.theme;
+ } // Set default options
+
var config = _typeof(options) === 'object' ? Object(_config__WEBPACK_IMPORTED_MODULE_3__["setConfig"])(options) : Object(_config__WEBPACK_IMPORTED_MODULE_3__["getSiteConfig"])();
updateRendererConfigs(config);
@@ -22073,8 +22923,15 @@ function reinitialize(options) {
}
function initialize(options) {
- // console.log(`mermaidAPI.initialize: v${pkg.version}`);
+ // console.log(`mermaidAPI.initialize: v${pkg.version} ${options}`);
// Set default options
+ if (options && options.theme && _themes__WEBPACK_IMPORTED_MODULE_41__["default"][options.theme]) {
+ // Todo merge with user options
+ options.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_41__["default"][options.theme].getThemeVariables(options.themeVariables);
+ } else {
+ if (options) options.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_41__["default"].default.getThemeVariables();
+ }
+
var config = _typeof(options) === 'object' ? Object(_config__WEBPACK_IMPORTED_MODULE_3__["setSiteConfig"])(options) : Object(_config__WEBPACK_IMPORTED_MODULE_3__["getSiteConfig"])();
updateRendererConfigs(config);
Object(_logger__WEBPACK_IMPORTED_MODULE_4__["setLogLevel"])(config.logLevel);
@@ -22120,7 +22977,19 @@ _config__WEBPACK_IMPORTED_MODULE_3__["default"].reset(Object(_config__WEBPACK_IM
* startOnLoad:true,
* arrowMarkerAbsolute:false,
*
+ * er:{
+ * diagramPadding:20,
+ * layoutDirection:'TB',
+ * minEntityWidth:100,
+ * minEntityHeight:75,
+ * entityPadding:15,
+ * stroke:'gray',
+ * fill:'honeydew',
+ * fontSize:12,
+ * useMaxWidth:true,
+ * },
* flowchart:{
+ * diagramPadding:8,
* htmlLabels:true,
* curve:'linear',
* },
@@ -22161,127 +23030,1079 @@ _config__WEBPACK_IMPORTED_MODULE_3__["default"].reset(Object(_config__WEBPACK_IM
/***/ }),
-/***/ "./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$":
-/*!***********************************************!*\
- !*** ./src/themes sync ^\.\/.*\/index\.scss$ ***!
- \***********************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+/***/ "./src/styles.js":
+/*!***********************!*\
+ !*** ./src/styles.js ***!
+ \***********************/
+/*! exports provided: calcThemeVariables, default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-var map = {
- "./dark/index.scss": "./src/themes/dark/index.scss",
- "./default/index.scss": "./src/themes/default/index.scss",
- "./forest/index.scss": "./src/themes/forest/index.scss",
- "./neutral/index.scss": "./src/themes/neutral/index.scss"
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calcThemeVariables", function() { return calcThemeVariables; });
+/* harmony import */ var _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./diagrams/class/styles */ "./src/diagrams/class/styles.js");
+/* harmony import */ var _diagrams_er_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./diagrams/er/styles */ "./src/diagrams/er/styles.js");
+/* harmony import */ var _diagrams_flowchart_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./diagrams/flowchart/styles */ "./src/diagrams/flowchart/styles.js");
+/* harmony import */ var _diagrams_gantt_styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./diagrams/gantt/styles */ "./src/diagrams/gantt/styles.js");
+/* harmony import */ var _diagrams_git_styles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./diagrams/git/styles */ "./src/diagrams/git/styles.js");
+/* harmony import */ var _diagrams_info_styles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./diagrams/info/styles */ "./src/diagrams/info/styles.js");
+/* harmony import */ var _diagrams_pie_styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./diagrams/pie/styles */ "./src/diagrams/pie/styles.js");
+/* harmony import */ var _diagrams_sequence_styles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./diagrams/sequence/styles */ "./src/diagrams/sequence/styles.js");
+/* harmony import */ var _diagrams_state_styles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./diagrams/state/styles */ "./src/diagrams/state/styles.js");
+/* harmony import */ var _diagrams_user_journey_styles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./diagrams/user-journey/styles */ "./src/diagrams/user-journey/styles.js");
+
+
+
+
+
+
+
+
+
+
+var themes = {
+ flowchart: _diagrams_flowchart_styles__WEBPACK_IMPORTED_MODULE_2__["default"],
+ 'flowchart-v2': _diagrams_flowchart_styles__WEBPACK_IMPORTED_MODULE_2__["default"],
+ sequence: _diagrams_sequence_styles__WEBPACK_IMPORTED_MODULE_7__["default"],
+ gantt: _diagrams_gantt_styles__WEBPACK_IMPORTED_MODULE_3__["default"],
+ classDiagram: _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__["default"],
+ 'classDiagram-v2': _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__["default"],
+ stateDiagram: _diagrams_state_styles__WEBPACK_IMPORTED_MODULE_8__["default"],
+ state: _diagrams_state_styles__WEBPACK_IMPORTED_MODULE_8__["default"],
+ git: _diagrams_git_styles__WEBPACK_IMPORTED_MODULE_4__["default"],
+ info: _diagrams_info_styles__WEBPACK_IMPORTED_MODULE_5__["default"],
+ pie: _diagrams_pie_styles__WEBPACK_IMPORTED_MODULE_6__["default"],
+ er: _diagrams_er_styles__WEBPACK_IMPORTED_MODULE_1__["default"],
+ journey: _diagrams_user_journey_styles__WEBPACK_IMPORTED_MODULE_9__["default"]
+};
+var calcThemeVariables = function calcThemeVariables(theme, userOverRides) {
+ return theme.calcColors(userOverRides);
};
-
-function webpackContext(req) {
- var id = webpackContextResolve(req);
- return __webpack_require__(id);
-}
-function webpackContextResolve(req) {
- if(!__webpack_require__.o(map, req)) {
- var e = new Error("Cannot find module '" + req + "'");
- e.code = 'MODULE_NOT_FOUND';
- throw e;
- }
- return map[req];
-}
-webpackContext.keys = function webpackContextKeys() {
- return Object.keys(map);
+var getStyles = function getStyles(type, userStyles, options) {
+ return " {\n font-family: ".concat(options.fontFamily, ";\n font-size: ").concat(options.fontSize, ";\n fill: ").concat(options.textColor, "\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ").concat(options.errorBkgColor, ";\n }\n .error-text {\n fill: ").concat(options.errorTextColor, ";\n stroke: ").concat(options.errorTextColor, ";\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ").concat(options.lineColor, ";\n }\n .marker.cross {\n stroke: ").concat(options.lineColor, ";\n }\n\n svg {\n font-family: ").concat(options.fontFamily, ";\n font-size: ").concat(options.fontSize, ";\n }\n\n ").concat(themes[type](options), "\n\n ").concat(userStyles, "\n\n ").concat(type, " { fill: apa;}\n");
};
-webpackContext.resolve = webpackContextResolve;
-module.exports = webpackContext;
-webpackContext.id = "./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$";
+
+/* harmony default export */ __webpack_exports__["default"] = (getStyles);
/***/ }),
-/***/ "./src/themes/dark/index.scss":
+/***/ "./src/themes/index.js":
+/*!*****************************!*\
+ !*** ./src/themes/index.js ***!
+ \*****************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _theme_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./theme-base */ "./src/themes/theme-base.js");
+/* harmony import */ var _theme_dark__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-dark */ "./src/themes/theme-dark.js");
+/* harmony import */ var _theme_default__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./theme-default */ "./src/themes/theme-default.js");
+/* harmony import */ var _theme_forest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./theme-forest */ "./src/themes/theme-forest.js");
+/* harmony import */ var _theme_neutral__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./theme-neutral */ "./src/themes/theme-neutral.js");
+
+
+
+
+
+/* harmony default export */ __webpack_exports__["default"] = ({
+ base: {
+ getThemeVariables: _theme_base__WEBPACK_IMPORTED_MODULE_0__["getThemeVariables"]
+ },
+ dark: {
+ getThemeVariables: _theme_dark__WEBPACK_IMPORTED_MODULE_1__["getThemeVariables"]
+ },
+ default: {
+ getThemeVariables: _theme_default__WEBPACK_IMPORTED_MODULE_2__["getThemeVariables"]
+ },
+ forest: {
+ getThemeVariables: _theme_forest__WEBPACK_IMPORTED_MODULE_3__["getThemeVariables"]
+ },
+ neutral: {
+ getThemeVariables: _theme_neutral__WEBPACK_IMPORTED_MODULE_4__["getThemeVariables"]
+ }
+});
+
+/***/ }),
+
+/***/ "./src/themes/theme-base.js":
+/*!**********************************!*\
+ !*** ./src/themes/theme-base.js ***!
+ \**********************************/
+/*! exports provided: getThemeVariables */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeVariables", function() { return getThemeVariables; });
+/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma");
+/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);
+function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
+
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
+
+
+
+var Theme =
+/*#__PURE__*/
+function () {
+ function Theme() {
+ _classCallCheck(this, Theme);
+
+ /* Base variables */
+ this.primaryColor = '#039fbe';
+ this.secondaryColor = '#b20238';
+ this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])('#e8d21d', 30);
+ this.relationColor = '#000';
+ this.primaryColor = '#fa255e';
+ this.secondaryColor = '#c39ea0';
+ this.tertiaryColor = '#f8e5e5';
+ this.primaryColor = '#ECECFF';
+ this.secondaryColor = '#ffffde';
+ this.tertiaryColor = '#ffffde';
+ this.background = 'white';
+ this.lineColor = '#333333';
+ this.border1 = '#9370DB';
+ this.arrowheadColor = '#333333';
+ this.fontFamily = '"trebuchet ms", verdana, arial';
+ this.fontSize = '16px';
+ this.labelBackground = '#e8e8e8';
+ this.textColor = '#333';
+ this.noteBkgColor = '#fff5ad';
+ this.noteBorderColor = '#aaaa33';
+ this.updateColors();
+ }
+
+ _createClass(Theme, [{
+ key: "updateColors",
+ value: function updateColors() {
+ this.secondBkg = this.tertiaryColor;
+ /* Flowchart variables */
+
+ this.nodeBkg = this.primaryColor;
+ this.mainBkg = this.primaryColor;
+ this.nodeBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.primaryColor, 23); // border 1
+
+ this.clusterBkg = this.tertiaryColor;
+ this.clusterBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.tertiaryColor, 10);
+ this.defaultLinkColor = this.lineColor;
+ this.titleColor = this.textColor;
+ this.edgeLabelBackground = this.labelBackground;
+ /* Sequence Diagram variables */
+ // this.actorBorder = lighten(this.border1, 0.5);
+
+ this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.border1, 23);
+ this.actorBkg = this.mainBkg;
+ this.actorTextColor = 'black';
+ this.actorLineColor = 'grey';
+ this.labelBoxBkgColor = this.actorBkg;
+ this.signalColor = this.textColor;
+ this.signalTextColor = this.textColor;
+ this.labelBoxBorderColor = this.actorBorder;
+ this.labelTextColor = this.actorTextColor;
+ this.loopTextColor = this.actorTextColor;
+ this.noteBorderColor = this.border2;
+ this.noteTextColor = this.actorTextColor;
+ this.activationBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.secondaryColor, 10);
+ this.activationBkgColor = this.secondaryColor;
+ this.sequenceNumberColor = 'white';
+ /* Gantt chart variables */
+
+ this.taskTextColor = this.taskTextLightColor;
+ this.taskTextOutsideColor = this.taskTextDarkColor;
+ this.sectionBkgColor = this.tertiaryColor;
+ this.altSectionBkgColor = 'white';
+ this.sectionBkgColor = this.secondaryColor;
+ this.sectionBkgColor2 = this.tertiaryColor;
+ this.altSectionBkgColor = 'white';
+ this.sectionBkgColor2 = this.primaryColor;
+ this.taskBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.primaryColor, 23);
+ this.taskBkgColor = this.primaryColor;
+ this.taskTextLightColor = 'white';
+ this.taskTextColor = 'calculated';
+ this.taskTextDarkColor = 'black';
+ this.taskTextOutsideColor = 'calculated';
+ this.taskTextClickableColor = '#003163';
+ this.activeTaskBorderColor = this.primaryColor;
+ this.activeTaskBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.primaryColor, 23);
+ this.gridColor = 'lightgrey';
+ this.doneTaskBkgColor = 'lightgrey';
+ this.doneTaskBorderColor = 'grey';
+ this.critBorderColor = '#ff8888';
+ this.critBkgColor = 'red';
+ this.todayLineColor = 'red';
+ /* state colors */
+
+ this.labelColor = 'black';
+ this.errorBkgColor = '#552222';
+ this.errorTextColor = '#552222';
+ /* state colors */
+
+ /* class */
+
+ this.classText = this.textColor;
+ /* user-journey */
+
+ this.fillType0 = this.primaryColor;
+ this.fillType1 = this.secondaryColor;
+ this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: 64
+ });
+ this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: 64
+ });
+ this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: -64
+ });
+ this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: -64
+ });
+ this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: 128
+ });
+ this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: 128
+ });
+ }
+ }, {
+ key: "calculate",
+ value: function calculate(overrides) {
+ var _this = this;
+
+ if (_typeof(overrides) !== 'object') {
+ // Calculate colors form base colors
+ this.updateColors();
+ return;
+ }
+
+ var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors
+
+ keys.forEach(function (k) {
+ _this[k] = overrides[k];
+ }); // Calculate colors form base colors
+
+ this.updateColors(); // Copy values from overrides again in case of an override of derived value
+
+ keys.forEach(function (k) {
+ _this[k] = overrides[k];
+ });
+ }
+ }]);
+
+ return Theme;
+}();
+
+var getThemeVariables = function getThemeVariables(userOverrides) {
+ var theme = new Theme();
+ theme.calculate(userOverrides);
+ return theme;
+};
+
+/***/ }),
+
+/***/ "./src/themes/theme-dark.js":
+/*!**********************************!*\
+ !*** ./src/themes/theme-dark.js ***!
+ \**********************************/
+/*! exports provided: getThemeVariables */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeVariables", function() { return getThemeVariables; });
+/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma");
+/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);
+function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
+
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
+
+
+
+var Theme =
+/*#__PURE__*/
+function () {
+ function Theme() {
+ _classCallCheck(this, Theme);
+
+ this.background = '#333';
+ this.primaryColor = '#1f2020';
+ this.secondaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.primaryColor, 16);
+ this.mainBkg = '#1f2020';
+ this.secondBkg = 'calculated';
+ this.mainContrastColor = 'lightgrey';
+ this.darkTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])('#323D47'), 10);
+ this.lineColor = 'calculated';
+ this.border1 = '#81B1DB';
+ this.border2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["rgba"])(255, 255, 255, 0.25);
+ this.arrowheadColor = 'calculated';
+ this.fontFamily = '"trebuchet ms", verdana, arial';
+ this.fontSize = '16px';
+ this.labelBackground = '#181818';
+ this.textColor = '#ccc';
+ /* Flowchart variables */
+
+ this.nodeBkg = 'calculated';
+ this.nodeBorder = 'calculated';
+ this.clusterBkg = 'calculated';
+ this.clusterBorder = 'calculated';
+ this.defaultLinkColor = 'calculated';
+ this.titleColor = '#F9FFFE';
+ this.edgeLabelBackground = 'calculated';
+ /* Sequence Diagram variables */
+
+ this.actorBorder = 'calculated';
+ this.actorBkg = 'calculated';
+ this.actorTextColor = 'calculated';
+ this.actorLineColor = 'calculated';
+ this.signalColor = 'calculated';
+ this.signalTextColor = 'calculated';
+ this.labelBoxBkgColor = 'calculated';
+ this.labelBoxBorderColor = 'calculated';
+ this.labelTextColor = 'calculated';
+ this.loopTextColor = 'calculated';
+ this.noteBorderColor = 'calculated';
+ this.noteBkgColor = '#fff5ad';
+ this.noteTextColor = 'calculated';
+ this.activationBorderColor = 'calculated';
+ this.activationBkgColor = 'calculated';
+ this.sequenceNumberColor = 'black';
+ /* Gantt chart variables */
+
+ this.sectionBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])('#EAE8D9', 30);
+ this.altSectionBkgColor = 'calculated';
+ this.sectionBkgColor2 = '#EAE8D9';
+ this.taskBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["rgba"])(255, 255, 255, 70);
+ this.taskBkgColor = 'calculated';
+ this.taskTextColor = 'calculated';
+ this.taskTextLightColor = 'calculated';
+ this.taskTextOutsideColor = 'calculated';
+ this.taskTextClickableColor = '#003163';
+ this.activeTaskBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["rgba"])(255, 255, 255, 50);
+ this.activeTaskBkgColor = '#81B1DB';
+ this.gridColor = 'calculated';
+ this.doneTaskBkgColor = 'calculated';
+ this.doneTaskBorderColor = 'grey';
+ this.critBorderColor = '#E83737';
+ this.critBkgColor = '#E83737';
+ this.taskTextDarkColor = 'calculated';
+ this.todayLineColor = '#DB5757';
+ /* state colors */
+
+ this.labelColor = 'calculated';
+ this.errorBkgColor = '#a44141';
+ this.errorTextColor = '#ddd';
+ }
+
+ _createClass(Theme, [{
+ key: "updateColors",
+ value: function updateColors() {
+ this.secondBkg = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.mainBkg, 16);
+ this.lineColor = this.mainContrastColor;
+ this.arrowheadColor = this.mainContrastColor;
+ /* Flowchart variables */
+
+ this.nodeBkg = this.mainBkg;
+ this.nodeBorder = this.border1;
+ this.clusterBkg = this.secondBkg;
+ this.clusterBorder = this.border2;
+ this.defaultLinkColor = this.lineColor;
+ this.edgeLabelBackground = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.labelBackground, 25);
+ /* Sequence Diagram variables */
+
+ this.actorBorder = this.border1;
+ this.actorBkg = this.mainBkg;
+ this.actorTextColor = this.mainContrastColor;
+ this.actorLineColor = this.mainContrastColor;
+ this.signalColor = this.mainContrastColor;
+ this.signalTextColor = this.mainContrastColor;
+ this.labelBoxBkgColor = this.actorBkg;
+ this.labelBoxBorderColor = this.actorBorder;
+ this.labelTextColor = this.mainContrastColor;
+ this.loopTextColor = this.mainContrastColor;
+ this.noteBorderColor = this.border2;
+ this.noteTextColor = this.mainBkg;
+ this.activationBorderColor = this.border1;
+ this.activationBkgColor = this.secondBkg;
+ /* Gantt chart variables */
+
+ this.altSectionBkgColor = this.background;
+ this.taskBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.mainBkg, 23);
+ this.taskTextColor = this.darkTextColor;
+ this.taskTextLightColor = this.mainContrastColor;
+ this.taskTextOutsideColor = this.taskTextLightColor;
+ this.gridColor = this.mainContrastColor;
+ this.doneTaskBkgColor = this.mainContrastColor;
+ this.taskTextDarkColor = this.darkTextColor;
+ /* state colors */
+
+ this.labelColor = this.textColor;
+ this.altBackground = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.background, 20);
+ this.fillType0 = this.primaryColor;
+ this.fillType1 = this.secondaryColor;
+ this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: 64
+ });
+ this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: 64
+ });
+ this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: -64
+ });
+ this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: -64
+ });
+ this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: 128
+ });
+ this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: 128
+ });
+ /* class */
+
+ this.classText = this.nodeBorder;
+ }
+ }, {
+ key: "calculate",
+ value: function calculate(overrides) {
+ var _this = this;
+
+ if (_typeof(overrides) !== 'object') {
+ // Calculate colors form base colors
+ this.updateColors();
+ return;
+ }
+
+ var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors
+
+ keys.forEach(function (k) {
+ _this[k] = overrides[k];
+ }); // Calculate colors form base colors
+
+ this.updateColors(); // Copy values from overrides again in case of an override of derived value
+
+ keys.forEach(function (k) {
+ _this[k] = overrides[k];
+ });
+ }
+ }]);
+
+ return Theme;
+}();
+
+var getThemeVariables = function getThemeVariables(userOverrides) {
+ var theme = new Theme();
+ theme.calculate(userOverrides);
+ return theme;
+};
+
+/***/ }),
+
+/***/ "./src/themes/theme-default.js":
+/*!*************************************!*\
+ !*** ./src/themes/theme-default.js ***!
+ \*************************************/
+/*! exports provided: getThemeVariables */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeVariables", function() { return getThemeVariables; });
+/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma");
+/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);
+function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
+
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
+
+
+
+var Theme =
+/*#__PURE__*/
+function () {
+ function Theme() {
+ _classCallCheck(this, Theme);
+
+ /* Base variables */
+ this.primaryColor = '#ECECFF';
+ this.secondaryColor = '#ffffde';
+ this.background = 'white';
+ this.mainBkg = '#ECECFF';
+ this.secondBkg = '#ffffde';
+ this.lineColor = '#333333';
+ this.border1 = '#9370DB';
+ this.border2 = '#aaaa33';
+ this.arrowheadColor = '#333333';
+ this.fontFamily = '"trebuchet ms", verdana, arial';
+ this.fontSize = '16px';
+ this.labelBackground = '#e8e8e8';
+ this.textColor = '#333';
+ /* Flowchart variables */
+
+ this.nodeBkg = 'calculated';
+ this.nodeBorder = 'calculated';
+ this.clusterBkg = 'calculated';
+ this.clusterBorder = 'calculated';
+ this.defaultLinkColor = 'calculated';
+ this.titleColor = 'calculated';
+ this.edgeLabelBackground = 'calculated';
+ /* Sequence Diagram variables */
+
+ this.actorBorder = 'calculated';
+ this.actorBkg = 'calculated';
+ this.actorTextColor = 'black';
+ this.actorLineColor = 'grey';
+ this.signalColor = 'calculated';
+ this.signalTextColor = 'calculated';
+ this.labelBoxBkgColor = 'calculated';
+ this.labelBoxBorderColor = 'calculated';
+ this.labelTextColor = 'calculated';
+ this.loopTextColor = 'calculated';
+ this.noteBorderColor = 'calculated';
+ this.noteBkgColor = '#fff5ad';
+ this.noteTextColor = 'calculated';
+ this.activationBorderColor = '#666';
+ this.activationBkgColor = '#f4f4f4';
+ this.sequenceNumberColor = 'white';
+ /* Gantt chart variables */
+
+ this.sectionBkgColor = 'calculated';
+ this.altSectionBkgColor = 'calculated';
+ this.sectionBkgColor2 = 'calculated';
+ this.taskBorderColor = 'calculated';
+ this.taskBkgColor = 'calculated';
+ this.taskTextLightColor = 'calculated';
+ this.taskTextColor = this.taskTextLightColor;
+ this.taskTextDarkColor = 'calculated';
+ this.taskTextOutsideColor = this.taskTextDarkColor;
+ this.taskTextClickableColor = 'calculated';
+ this.activeTaskBorderColor = 'calculated';
+ this.activeTaskBkgColor = 'calculated';
+ this.gridColor = 'calculated';
+ this.doneTaskBkgColor = 'calculated';
+ this.doneTaskBorderColor = 'calculated';
+ this.critBorderColor = 'calculated';
+ this.critBkgColor = 'calculated';
+ this.todayLineColor = 'calculated';
+ this.sectionBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["rgba"])(102, 102, 255, 0.49);
+ this.altSectionBkgColor = 'white';
+ this.sectionBkgColor2 = '#fff400';
+ this.taskBorderColor = '#534fbc';
+ this.taskBkgColor = '#8a90dd';
+ this.taskTextLightColor = 'white';
+ this.taskTextColor = 'calculated';
+ this.taskTextDarkColor = 'black';
+ this.taskTextOutsideColor = 'calculated';
+ this.taskTextClickableColor = '#003163';
+ this.activeTaskBorderColor = '#534fbc';
+ this.activeTaskBkgColor = '#bfc7ff';
+ this.gridColor = 'lightgrey';
+ this.doneTaskBkgColor = 'lightgrey';
+ this.doneTaskBorderColor = 'grey';
+ this.critBorderColor = '#ff8888';
+ this.critBkgColor = 'red';
+ this.todayLineColor = 'red';
+ /* state colors */
+
+ this.labelColor = 'black';
+ this.errorBkgColor = '#552222';
+ this.errorTextColor = '#552222';
+ this.updateColors();
+ }
+
+ _createClass(Theme, [{
+ key: "updateColors",
+ value: function updateColors() {
+ /* Flowchart variables */
+ this.nodeBkg = this.mainBkg;
+ this.nodeBorder = this.border1; // border 1
+
+ this.clusterBkg = this.secondBkg;
+ this.clusterBorder = this.border2;
+ this.defaultLinkColor = this.lineColor;
+ this.titleColor = this.textColor;
+ this.edgeLabelBackground = this.labelBackground;
+ /* Sequence Diagram variables */
+ // this.actorBorder = lighten(this.border1, 0.5);
+
+ this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.border1, 23);
+ this.actorBkg = this.mainBkg;
+ this.labelBoxBkgColor = this.actorBkg;
+ this.signalColor = this.textColor;
+ this.signalTextColor = this.textColor;
+ this.labelBoxBorderColor = this.actorBorder;
+ this.labelTextColor = this.actorTextColor;
+ this.loopTextColor = this.actorTextColor;
+ this.noteBorderColor = this.border2;
+ this.noteTextColor = this.actorTextColor;
+ /* Gantt chart variables */
+
+ this.taskTextColor = this.taskTextLightColor;
+ this.taskTextOutsideColor = this.taskTextDarkColor;
+ /* state colors */
+
+ /* class */
+
+ this.classText = this.nodeBorder;
+ /* journey */
+
+ this.fillType0 = this.primaryColor;
+ this.fillType1 = this.secondaryColor;
+ this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: 64
+ });
+ this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: 64
+ });
+ this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: -64
+ });
+ this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: -64
+ });
+ this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: 128
+ });
+ this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: 128
+ });
+ }
+ }, {
+ key: "calculate",
+ value: function calculate(overrides) {
+ var _this = this;
+
+ if (_typeof(overrides) !== 'object') {
+ // Calculate colors form base colors
+ this.updateColors();
+ return;
+ }
+
+ var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors
+
+ keys.forEach(function (k) {
+ _this[k] = overrides[k];
+ }); // Calculate colors form base colors
+
+ this.updateColors(); // Copy values from overrides again in case of an override of derived value
+
+ keys.forEach(function (k) {
+ _this[k] = overrides[k];
+ });
+ }
+ }]);
+
+ return Theme;
+}();
+
+var getThemeVariables = function getThemeVariables(userOverrides) {
+ var theme = new Theme();
+ theme.calculate(userOverrides);
+ return theme;
+};
+
+/***/ }),
+
+/***/ "./src/themes/theme-forest.js":
/*!************************************!*\
- !*** ./src/themes/dark/index.scss ***!
+ !*** ./src/themes/theme-forest.js ***!
\************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+/*! exports provided: getThemeVariables */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-// css-to-string-loader: transforms styles from css-loader to a string output
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeVariables", function() { return getThemeVariables; });
+/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma");
+/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);
+function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
-// Get the styles
-var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/dark/index.scss");
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-if (typeof styles === 'string') {
- // Return an existing string
- module.exports = styles;
-} else {
- // Call the custom toString method from css-loader module
- module.exports = styles.toString();
-}
+function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
+
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
+
+
+
+var Theme =
+/*#__PURE__*/
+function () {
+ function Theme() {
+ _classCallCheck(this, Theme);
+
+ /* Base vales */
+ this.primaryColor = '#cde498';
+ this.secondaryColor = '#cdffb2';
+ this.background = 'white';
+ this.mainBkg = '#cde498';
+ this.secondBkg = '#cdffb2';
+ this.lineColor = 'green';
+ this.border1 = '#13540c';
+ this.border2 = '#6eaa49';
+ this.arrowheadColor = 'green';
+ this.fontFamily = '"trebuchet ms", verdana, arial';
+ this.fontSize = '16px';
+ /* Flowchart variables */
+
+ this.nodeBkg = 'calculated';
+ this.nodeBorder = 'calculated';
+ this.clusterBkg = 'calculated';
+ this.clusterBorder = 'calculated';
+ this.defaultLinkColor = 'calculated';
+ this.titleColor = '#333';
+ this.edgeLabelBackground = '#e8e8e8';
+ /* Sequence Diagram variables */
+
+ this.actorBorder = 'calculated';
+ this.actorBkg = 'calculated';
+ this.actorTextColor = 'black';
+ this.actorLineColor = 'grey';
+ this.signalColor = '#333';
+ this.signalTextColor = '#333';
+ this.labelBoxBkgColor = 'calculated';
+ this.labelBoxBorderColor = '#326932';
+ this.labelTextColor = 'calculated';
+ this.loopTextColor = 'calculated';
+ this.noteBorderColor = 'calculated';
+ this.noteBkgColor = '#fff5ad';
+ this.noteTextColor = 'calculated';
+ this.activationBorderColor = '#666';
+ this.activationBkgColor = '#f4f4f4';
+ this.sequenceNumberColor = 'white';
+ /* Gantt chart variables */
+
+ this.sectionBkgColor = '#6eaa49';
+ this.altSectionBkgColor = 'white';
+ this.sectionBkgColor2 = '#6eaa49';
+ this.taskBorderColor = 'calculated';
+ this.taskBkgColor = '#487e3a';
+ this.taskTextLightColor = 'white';
+ this.taskTextColor = 'calculated';
+ this.taskTextDarkColor = 'black';
+ this.taskTextOutsideColor = 'calculated';
+ this.taskTextClickableColor = '#003163';
+ this.activeTaskBorderColor = 'calculated';
+ this.activeTaskBkgColor = 'calculated';
+ this.gridColor = 'lightgrey';
+ this.doneTaskBkgColor = 'lightgrey';
+ this.doneTaskBorderColor = 'grey';
+ this.critBorderColor = '#ff8888';
+ this.critBkgColor = 'red';
+ this.todayLineColor = 'red';
+ /* state colors */
+
+ this.labelColor = 'black';
+ this.errorBkgColor = '#552222';
+ this.errorTextColor = '#552222';
+ }
+
+ _createClass(Theme, [{
+ key: "updateColors",
+ value: function updateColors() {
+ /* Flowchart variables */
+ this.nodeBkg = this.mainBkg;
+ this.nodeBorder = this.border1;
+ this.clusterBkg = this.secondBkg;
+ this.clusterBorder = this.border2;
+ this.defaultLinkColor = this.lineColor;
+ /* Sequence Diagram variables */
+
+ this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.mainBkg, 20);
+ this.actorBkg = this.mainBkg;
+ this.labelBoxBkgColor = this.actorBkg;
+ this.labelTextColor = this.actorTextColor;
+ this.loopTextColor = this.actorTextColor;
+ this.noteBorderColor = this.border2;
+ this.noteTextColor = this.actorTextColor;
+ /* Gantt chart variables */
+
+ this.taskBorderColor = this.border1;
+ this.taskTextColor = this.taskTextLightColor;
+ this.taskTextOutsideColor = this.taskTextDarkColor;
+ this.activeTaskBorderColor = this.taskBorderColor;
+ this.activeTaskBkgColor = this.mainBkg;
+ /* state colors */
+
+ /* class */
+
+ this.classText = this.nodeBorder;
+ /* journey */
+
+ this.fillType0 = this.primaryColor;
+ this.fillType1 = this.secondaryColor;
+ this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: 64
+ });
+ this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: 64
+ });
+ this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: -64
+ });
+ this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: -64
+ });
+ this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: 128
+ });
+ this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: 128
+ });
+ }
+ }, {
+ key: "calculate",
+ value: function calculate(overrides) {
+ var _this = this;
+
+ if (_typeof(overrides) !== 'object') {
+ // Calculate colors form base colors
+ this.updateColors();
+ return;
+ }
+
+ var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors
+
+ keys.forEach(function (k) {
+ _this[k] = overrides[k];
+ }); // Calculate colors form base colors
+
+ this.updateColors(); // Copy values from overrides again in case of an override of derived value
+
+ keys.forEach(function (k) {
+ _this[k] = overrides[k];
+ });
+ }
+ }]);
+
+ return Theme;
+}();
+
+var getThemeVariables = function getThemeVariables(userOverrides) {
+ var theme = new Theme();
+ theme.calculate(userOverrides);
+ return theme;
+};
/***/ }),
-/***/ "./src/themes/default/index.scss":
-/*!***************************************!*\
- !*** ./src/themes/default/index.scss ***!
- \***************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+/***/ "./src/themes/theme-neutral.js":
+/*!*************************************!*\
+ !*** ./src/themes/theme-neutral.js ***!
+ \*************************************/
+/*! exports provided: getThemeVariables */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-// css-to-string-loader: transforms styles from css-loader to a string output
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeVariables", function() { return getThemeVariables; });
+/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma");
+/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);
+function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
-// Get the styles
-var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/default/index.scss");
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-if (typeof styles === 'string') {
- // Return an existing string
- module.exports = styles;
-} else {
- // Call the custom toString method from css-loader module
- module.exports = styles.toString();
-}
+function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-/***/ }),
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
-/***/ "./src/themes/forest/index.scss":
-/*!**************************************!*\
- !*** ./src/themes/forest/index.scss ***!
- \**************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ // const Color = require ( 'khroma/dist/color' ).default
+// Color.format.hex.stringify(Color.parse('hsl(210, 66.6666666667%, 95%)')); // => "#EAF2FB"
-// css-to-string-loader: transforms styles from css-loader to a string output
+var Theme =
+/*#__PURE__*/
+function () {
+ function Theme() {
+ _classCallCheck(this, Theme);
-// Get the styles
-var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/forest/index.scss");
+ this.primaryColor = '#eee';
+ this.contrast = '#26a';
+ this.secondaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.contrast, 55);
+ this.background = 'white';
+ this.mainBkg = '#eee';
+ this.secondBkg = 'calculated';
+ this.lineColor = '#666';
+ this.border1 = '#999';
+ this.border2 = 'calculated';
+ this.note = '#ffa';
+ this.text = '#333';
+ this.critical = '#d42';
+ this.done = '#bbb';
+ this.arrowheadColor = '#333333';
+ this.fontFamily = '"trebuchet ms", verdana, arial';
+ this.fontSize = '16px';
+ /* Flowchart variables */
-if (typeof styles === 'string') {
- // Return an existing string
- module.exports = styles;
-} else {
- // Call the custom toString method from css-loader module
- module.exports = styles.toString();
-}
+ this.nodeBkg = 'calculated';
+ this.nodeBorder = 'calculated';
+ this.clusterBkg = 'calculated';
+ this.clusterBorder = 'calculated';
+ this.defaultLinkColor = 'calculated';
+ this.titleColor = 'calculated';
+ this.edgeLabelBackground = 'white';
+ /* Sequence Diagram variables */
-/***/ }),
+ this.actorBorder = 'calculated';
+ this.actorBkg = 'calculated';
+ this.actorTextColor = 'calculated';
+ this.actorLineColor = 'calculated';
+ this.signalColor = 'calculated';
+ this.signalTextColor = 'calculated';
+ this.labelBoxBkgColor = 'calculated';
+ this.labelBoxBorderColor = 'calculated';
+ this.labelTextColor = 'calculated';
+ this.loopTextColor = 'calculated';
+ this.noteBorderColor = 'calculated';
+ this.noteBkgColor = 'calculated';
+ this.noteTextColor = 'calculated';
+ this.activationBorderColor = '#666';
+ this.activationBkgColor = '#f4f4f4';
+ this.sequenceNumberColor = 'white';
+ /* Gantt chart variables */
-/***/ "./src/themes/neutral/index.scss":
-/*!***************************************!*\
- !*** ./src/themes/neutral/index.scss ***!
- \***************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ this.sectionBkgColor = 'calculated';
+ this.altSectionBkgColor = 'white';
+ this.sectionBkgColor2 = 'calculated';
+ this.taskBorderColor = 'calculated';
+ this.taskBkgColor = 'calculated';
+ this.taskTextLightColor = 'white';
+ this.taskTextColor = 'calculated';
+ this.taskTextDarkColor = 'calculated';
+ this.taskTextOutsideColor = 'calculated';
+ this.taskTextClickableColor = '#003163';
+ this.activeTaskBorderColor = 'calculated';
+ this.activeTaskBkgColor = 'calculated';
+ this.gridColor = 'calculated';
+ this.doneTaskBkgColor = 'calculated';
+ this.doneTaskBorderColor = 'calculated';
+ this.critBkgColor = 'calculated';
+ this.critBorderColor = 'calculated';
+ this.todayLineColor = 'calculated';
+ /* state colors */
-// css-to-string-loader: transforms styles from css-loader to a string output
+ this.labelColor = 'black';
+ this.errorBkgColor = '#552222';
+ this.errorTextColor = '#552222';
+ }
-// Get the styles
-var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/neutral/index.scss");
+ _createClass(Theme, [{
+ key: "updateColors",
+ value: function updateColors() {
+ this.secondBkg = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.contrast, 55);
+ this.border2 = this.contrast;
+ /* Flowchart variables */
-if (typeof styles === 'string') {
- // Return an existing string
- module.exports = styles;
-} else {
- // Call the custom toString method from css-loader module
- module.exports = styles.toString();
-}
+ this.nodeBkg = this.mainBkg;
+ this.nodeBorder = this.border1;
+ this.clusterBkg = this.secondBkg;
+ this.clusterBorder = this.border2;
+ this.defaultLinkColor = this.lineColor;
+ this.titleColor = this.text;
+ /* Sequence Diagram variables */
+
+ this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.border1, 23);
+ this.actorBkg = this.mainBkg;
+ this.actorTextColor = this.text;
+ this.actorLineColor = this.lineColor;
+ this.signalColor = this.text;
+ this.signalTextColor = this.text;
+ this.labelBoxBkgColor = this.actorBkg;
+ this.labelBoxBorderColor = this.actorBorder;
+ this.labelTextColor = this.text;
+ this.loopTextColor = this.text;
+ this.noteBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.note, 60);
+ this.noteBkgColor = this.note;
+ this.noteTextColor = this.actorTextColor;
+ /* Gantt chart variables */
+
+ this.sectionBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.contrast, 30);
+ this.sectionBkgColor2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.contrast, 30);
+ this.taskBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.contrast, 10);
+ this.taskBkgColor = this.contrast;
+ this.taskTextColor = this.taskTextLightColor;
+ this.taskTextDarkColor = this.text;
+ this.taskTextOutsideColor = this.taskTextDarkColor;
+ this.activeTaskBorderColor = this.taskBorderColor;
+ this.activeTaskBkgColor = this.mainBkg;
+ this.gridColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.border1, 30);
+ this.doneTaskBkgColor = this.done;
+ this.doneTaskBorderColor = this.lineColor;
+ this.critBkgColor = this.critical;
+ this.critBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.critBkgColor, 10);
+ this.todayLineColor = this.critBkgColor;
+ /* state colors */
+
+ /* class */
+
+ this.classText = this.nodeBorder;
+ /* journey */
+
+ this.fillType0 = this.primaryColor;
+ this.fillType1 = this.secondaryColor;
+ this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: 64
+ });
+ this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: 64
+ });
+ this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: -64
+ });
+ this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: -64
+ });
+ this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, {
+ h: 128
+ });
+ this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, {
+ h: 128
+ });
+ }
+ }, {
+ key: "calculate",
+ value: function calculate(overrides) {
+ var _this = this;
+
+ if (_typeof(overrides) !== 'object') {
+ // Calculate colors form base colors
+ this.updateColors();
+ return;
+ }
+
+ var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors
+
+ keys.forEach(function (k) {
+ _this[k] = overrides[k];
+ }); // Calculate colors form base colors
+
+ this.updateColors(); // Copy values from overrides again in case of an override of derived value
+
+ keys.forEach(function (k) {
+ _this[k] = overrides[k];
+ });
+ }
+ }]);
+
+ return Theme;
+}();
+
+var getThemeVariables = function getThemeVariables(userOverrides) {
+ var theme = new Theme();
+ theme.calculate(userOverrides);
+ console.info('Theme', userOverrides, theme);
+ return theme;
+};
/***/ }),
@@ -22317,8 +24138,6 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @braintree/sanitize-url */ "@braintree/sanitize-url");
/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _diagrams_common_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./diagrams/common/common */ "./src/diagrams/common/common.js");
-/* harmony import */ var crypto_random_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! crypto-random-string */ "crypto-random-string");
-/* harmony import */ var crypto_random_string__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(crypto_random_string__WEBPACK_IMPORTED_MODULE_4__);
var _this = undefined;
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
@@ -22334,8 +24153,8 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
-
- // Effectively an enum of the supported curve types, accessible by name
+ // import cryptoRandomString from 'crypto-random-string';
+// Effectively an enum of the supported curve types, accessible by name
var d3CurveTypes = {
curveBasis: d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"],
@@ -22510,6 +24329,10 @@ var detectType = function detectType(text) {
return 'gantt';
}
+ if (text.match(/^\s*classDiagram-v2/)) {
+ return 'classDiagram';
+ }
+
if (text.match(/^\s*classDiagram/)) {
return 'class';
}
@@ -22754,8 +24577,21 @@ var generateId = function generateId() {
cnt++;
return 'id-' + Math.random().toString(36).substr(2, 12) + '-' + cnt;
};
+
+function makeid(length) {
+ var result = '';
+ var characters = '0123456789abcdef';
+ var charactersLength = characters.length;
+
+ for (var i = 0; i < length; i++) {
+ result += characters.charAt(Math.floor(Math.random() * charactersLength));
+ }
+
+ return result;
+}
+
var random = function random(options) {
- return crypto_random_string__WEBPACK_IMPORTED_MODULE_4___default()(options);
+ return makeid(options.length);
};
/**
* @function assignWithDepth
@@ -23119,17 +24955,6 @@ module.exports = require("@braintree/sanitize-url");
/***/ }),
-/***/ "crypto-random-string":
-/*!***************************************!*\
- !*** external "crypto-random-string" ***!
- \***************************************/
-/*! no static exports found */
-/***/ (function(module, exports) {
-
-module.exports = require("crypto-random-string");
-
-/***/ }),
-
/***/ "d3":
/*!*********************!*\
!*** external "d3" ***!
@@ -23196,6 +25021,17 @@ module.exports = require("graphlib");
/***/ }),
+/***/ "khroma":
+/*!*************************!*\
+ !*** external "khroma" ***!
+ \*************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+module.exports = require("khroma");
+
+/***/ }),
+
/***/ "moment-mini":
/*!******************************!*\
!*** external "moment-mini" ***!
@@ -23207,14 +25043,14 @@ module.exports = require("moment-mini");
/***/ }),
-/***/ "scope-css":
-/*!****************************!*\
- !*** external "scope-css" ***!
- \****************************/
+/***/ "stylis":
+/*!*************************!*\
+ !*** external "stylis" ***!
+ \*************************/
/*! no static exports found */
/***/ (function(module, exports) {
-module.exports = require("scope-css");
+module.exports = require("stylis");
/***/ })
diff --git a/dist/mermaid.core.js.map b/dist/mermaid.core.js.map
index d0ddd1005..6f85ff1be 100644
--- a/dist/mermaid.core.js.map
+++ b/dist/mermaid.core.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack://mermaid/webpack/universalModuleDefinition","webpack://mermaid/webpack/bootstrap","webpack://mermaid/./src/themes/dark/index.scss","webpack://mermaid/./src/themes/default/index.scss","webpack://mermaid/./src/themes/forest/index.scss","webpack://mermaid/./src/themes/neutral/index.scss","webpack://mermaid/./node_modules/css-loader/dist/runtime/api.js","webpack://mermaid/./node_modules/path-browserify/index.js","webpack://mermaid/./node_modules/process/browser.js","webpack://mermaid/(webpack)/buildin/module.js","webpack://mermaid/./src/config.js","webpack://mermaid/./src/dagre-wrapper/clusters.js","webpack://mermaid/./src/dagre-wrapper/createLabel.js","webpack://mermaid/./src/dagre-wrapper/edges.js","webpack://mermaid/./src/dagre-wrapper/index.js","webpack://mermaid/./src/dagre-wrapper/intersect/index.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-circle.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-ellipse.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-line.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-node.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-polygon.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-rect.js","webpack://mermaid/./src/dagre-wrapper/markers.js","webpack://mermaid/./src/dagre-wrapper/mermaid-graphlib.js","webpack://mermaid/./src/dagre-wrapper/nodes.js","webpack://mermaid/./src/dagre-wrapper/shapes/note.js","webpack://mermaid/./src/dagre-wrapper/shapes/util.js","webpack://mermaid/./src/diagrams/class/classDb.js","webpack://mermaid/./src/diagrams/class/classRenderer.js","webpack://mermaid/./src/diagrams/class/parser/classDiagram.jison","webpack://mermaid/./src/diagrams/class/svgDraw.js","webpack://mermaid/./src/diagrams/common/common.js","webpack://mermaid/./src/diagrams/er/erDb.js","webpack://mermaid/./src/diagrams/er/erMarkers.js","webpack://mermaid/./src/diagrams/er/erRenderer.js","webpack://mermaid/./src/diagrams/er/parser/erDiagram.jison","webpack://mermaid/./src/diagrams/flowchart/flowChartShapes.js","webpack://mermaid/./src/diagrams/flowchart/flowDb.js","webpack://mermaid/./src/diagrams/flowchart/flowRenderer-v2.js","webpack://mermaid/./src/diagrams/flowchart/flowRenderer.js","webpack://mermaid/./src/diagrams/flowchart/parser/flow.jison","webpack://mermaid/./src/diagrams/gantt/ganttDb.js","webpack://mermaid/./src/diagrams/gantt/ganttRenderer.js","webpack://mermaid/./src/diagrams/gantt/parser/gantt.jison","webpack://mermaid/./src/diagrams/git/gitGraphAst.js","webpack://mermaid/./src/diagrams/git/gitGraphRenderer.js","webpack://mermaid/./src/diagrams/git/parser/gitGraph.jison","webpack://mermaid/./src/diagrams/info/infoDb.js","webpack://mermaid/./src/diagrams/info/infoRenderer.js","webpack://mermaid/./src/diagrams/info/parser/info.jison","webpack://mermaid/./src/diagrams/pie/parser/pie.jison","webpack://mermaid/./src/diagrams/pie/pieDb.js","webpack://mermaid/./src/diagrams/pie/pieRenderer.js","webpack://mermaid/./src/diagrams/sequence/parser/sequenceDiagram.jison","webpack://mermaid/./src/diagrams/sequence/sequenceDb.js","webpack://mermaid/./src/diagrams/sequence/sequenceRenderer.js","webpack://mermaid/./src/diagrams/sequence/svgDraw.js","webpack://mermaid/./src/diagrams/state/id-cache.js","webpack://mermaid/./src/diagrams/state/parser/stateDiagram.jison","webpack://mermaid/./src/diagrams/state/shapes.js","webpack://mermaid/./src/diagrams/state/stateDb.js","webpack://mermaid/./src/diagrams/state/stateRenderer-v2.js","webpack://mermaid/./src/diagrams/state/stateRenderer.js","webpack://mermaid/./src/diagrams/user-journey/journeyDb.js","webpack://mermaid/./src/diagrams/user-journey/journeyRenderer.js","webpack://mermaid/./src/diagrams/user-journey/parser/journey.jison","webpack://mermaid/./src/diagrams/user-journey/svgDraw.js","webpack://mermaid/./src/errorRenderer.js","webpack://mermaid/./src/logger.js","webpack://mermaid/./src/mermaid.js","webpack://mermaid/./src/mermaidAPI.js","webpack://mermaid/./src/themes sync ^\\.\\/.*\\/index\\.scss$","webpack://mermaid/./src/themes/dark/index.scss?55a3","webpack://mermaid/./src/themes/default/index.scss?1e22","webpack://mermaid/./src/themes/forest/index.scss?c8cd","webpack://mermaid/./src/themes/neutral/index.scss?96e0","webpack://mermaid/./src/utils.js","webpack://mermaid/external \"@braintree/sanitize-url\"","webpack://mermaid/external \"crypto-random-string\"","webpack://mermaid/external \"d3\"","webpack://mermaid/external \"dagre\"","webpack://mermaid/external \"dagre-d3\"","webpack://mermaid/external \"dagre-d3/lib/label/add-html-label.js\"","webpack://mermaid/external \"entity-decode/browser\"","webpack://mermaid/external \"graphlib\"","webpack://mermaid/external \"moment-mini\"","webpack://mermaid/external \"scope-css\""],"names":["config","theme","themeCSS","undefined","maxTextSize","fontFamily","logLevel","securityLevel","startOnLoad","arrowMarkerAbsolute","secure","flowchart","htmlLabels","nodeSpacing","rankSpacing","curve","padding","sequence","activationWidth","diagramMarginX","diagramMarginY","actorMargin","width","height","boxMargin","boxTextMargin","noteMargin","messageMargin","messageAlign","mirrorActors","bottomMarginAdj","useMaxWidth","rightAngles","showSequenceNumbers","actorFontSize","actorFontFamily","actorFontWeight","noteFontSize","noteFontFamily","noteFontWeight","noteAlign","messageFontSize","messageFontFamily","messageFontWeight","wrap","wrapPadding","labelBoxWidth","labelBoxHeight","messageFont","fontSize","fontWeight","noteFont","actorFont","gantt","titleTopMargin","barHeight","barGap","topPadding","leftPadding","gridLineStartPadding","numberSectionStyles","axisFormat","journey","class","git","state","dividerMargin","sizeUnit","textHeight","titleShift","forkWidth","forkHeight","miniPadding","fontSizeFactor","labelHeight","edgeLengthFactor","compositTitleSize","radius","er","diagramPadding","layoutDirection","minEntityWidth","minEntityHeight","entityPadding","stroke","fill","defaultConfig","Object","freeze","siteConfig","assignWithDepth","currentConfig","setSiteConfig","conf","clobber","getSiteConfig","setConfig","sanitize","getConfig","options","keys","forEach","key","logger","warn","reset","configApi","rect","parent","node","log","trace","id","shapeSvg","insert","attr","label","text","appendChild","createLabel","labelText","labelStyle","bbox","getBBox","div","children","dv","select","getBoundingClientRect","halfPadding","JSON","stringify","rx","ry","x","y","rectBox","intersect","point","intersectRect","noteGroup","roundedWithTitle","classes","innerRect","append","divider","shapes","clusterElems","insertCluster","elem","shape","getClusterTitleWidth","removeChild","clear","positionCluster","info","el","applyStyle","dom","styleFn","addHtmlLabel","fo","document","createElementNS","labelClass","isNode","html","style","_vertexText","isTitle","vertexText","replace","s","vertexNode","svgLabel","setAttribute","rows","split","Array","isArray","j","length","tspan","setAttributeNS","textContent","trim","edgeLabels","insertEdgeLabel","edge","labelElement","edgeLabel","positionEdgeLabel","points","pos","utils","calcLabelPosition","outsideNode","dx","Math","abs","dy","w","h","intersection","outsidePoint","insidePoint","r","edges","x1","x2","y1","y2","Q","R","q","res","insertEdge","e","clusterDb","diagramType","graph","pointsHasChanged","tail","v","head","slice","unshift","push","toCluster","lastPointOutside","isInside","insterection","fromCluster","updatedPoints","i","lineData","filter","p","Number","isNaN","lineFunction","line","d","curveBasis","strokeClasses","thickness","pattern","svgPath","url","window","location","protocol","host","pathname","search","arrowType","recursiveRender","_elem","diagramtype","parentCluster","graphlib","json","write","dir","rankdir","nodes","clusters","edgePaths","data","parse","clusterData","setNode","setParent","clusterNode","newEl","updateNodeBounds","setNodeElem","findNonClusterChild","insertNode","name","dagre","layout","positionNode","updatedPath","render","markers","insertMarkers","clearNodes","clearEdges","clearClusters","clearGraphlib","adjustClustersAndEdges","circle","ellipse","polygon","intersectCircle","intersectEllipse","cx","cy","px","py","det","sqrt","intersectLine","p1","p2","q1","q2","a1","a2","b1","b2","c1","c2","r1","r2","r3","r4","denom","offset","num","sameSign","module","exports","intersectNode","console","intersectPolygon","polyPoints","intersections","minX","POSITIVE_INFINITY","minY","entry","min","left","top","sort","pdx","pdy","distp","qdx","qdy","distq","sx","sy","markerArray","type","markerName","extension","composition","aggregation","dependency","cross","barb","decendants","parents","isDecendant","ancenstorId","debug","indexOf","edgeInCluster","clusterId","copy","newGraph","rootId","setEdge","error","removeNode","extractDecendants","concat","validate","_id","getAnchorId","externalConnections","depth","d1","d2","extractor","removeEdge","hasChildren","graphSettings","clusterGraph","Graph","multigraph","compound","setGraph","nodesep","ranksep","marginx","marginy","setDefaultEdgeLabel","question","labelHelper","questionElem","insertPolygonShape","hexagon","f","m","hex","rect_left_inv_arrow","lean_right","lean_left","trapezoid","inv_trapezoid","rect_right_inv_arrow","cylinder","rectWithTitle","innerLine","text2","flat","textRows","titleBox","descr","join","stadium","subroutine","start","forkJoin","end","innerCircle","note","fork","nodeElems","_classes","element","map","MERMAID_DOM_ID_PREFIX","relations","classCounter","funs","splitClassNameAndType","genericType","className","addClass","classId","cssClasses","methods","members","annotations","domId","lookUpDomId","classKeys","setupToolTips","getClass","getClasses","getRelations","addRelation","relation","id1","id2","addAnnotation","annotation","validatedClassName","addMember","member","theClass","memberString","startsWith","endsWith","substring","addMembers","reverse","cleanupLabel","substr","setCssClass","ids","match","setLink","linkStr","tooltip","link","formatUrl","common","sanitizeText","setClickEvent","functionName","setClickFunc","elemId","querySelector","addEventListener","runFunc","bindFunctions","fun","lineType","LINE","DOTTED_LINE","relationType","AGGREGATION","EXTENSION","COMPOSITION","DEPENDENCY","tooltipElem","_groups","svg","selectAll","on","title","transition","duration","scrollX","right","scrollY","body","scrollTop","classed","parser","yy","classDb","idCache","getGraphId","setConf","cnf","draw","diagram","g","isMultiGraph","classDef","svgDraw","drawClass","drawEdge","svgBounds","vBox","edgeCount","path","getRelationType","type1","type2","l","labelPosition","p1_card_x","p1_card_y","p2_card_x","p2_card_y","cardinality_1_point","calcCardinalityPosition","cardinality_2_point","bounds","relationTitle1","relationTitle2","cssClassStr","classInfo","isFirst","titleText2","classTitleString","classTitle","titleHeight","membersLine","addTspan","membersBox","methodsLine","method","classBox","rectWidth","childNodes","parseMember","fieldRegEx","methodRegEx","fieldMatch","methodMatch","buildFieldDisplay","buildMethodDisplay","buildLegacyDisplay","parsedText","displayText","visibility","fieldType","parseGenericTypes","fieldName","err","cssStyle","methodName","parameters","classifier","returnType","parseClassifier","memberText","methodStart","methodEnd","firstChar","textEl","txt","tSpan","cleanedText","getRows","str","breakToPlaceholder","placeholderToBreak","lineBreakRegex","hasBreaks","test","splitBreaks","entities","relationships","Cardinality","ZERO_OR_ONE","ZERO_OR_MORE","ONE_OR_MORE","ONLY_ONE","Identification","NON_IDENTIFYING","IDENTIFYING","addEntity","getEntities","addRelationship","entA","rolA","entB","rSpec","rel","entityA","roleA","entityB","relSpec","getRelationships","setTitle","getTitle","ERMarkers","ONLY_ONE_START","ONLY_ONE_END","ZERO_OR_ONE_START","ZERO_OR_ONE_END","ONE_OR_MORE_START","ONE_OR_MORE_END","ZERO_OR_MORE_START","ZERO_OR_MORE_END","marker","drawEntities","svgNode","firstOne","groupNode","textId","textNode","textBBox","entityWidth","max","entityHeight","rectNode","rectBBox","adjustEntities","getEdgeName","addRelationships","relationship","relCnt","drawRelationshipFromLayout","relType","erDb","cardA","erMarkers","cardB","len","getTotalLength","labelPoint","getPointAtLength","labelId","labelNode","labelBBox","erParser","directed","edgesep","firstEntity","dagreD3","addToRender","addToRenderV2","addShape","vertices","subGraphs","subGraphLookup","tooltips","subCount","firstGraphFlag","direction","addVertex","styles","addSingleLink","_start","_end","linktext","addLink","updateLinkInterpolate","positions","interp","defaultInterpolate","interpolate","updateLink","defaultStyle","isSubstringInArray","textStyles","newStyle1","newStyle2","setDirection","setClass","setTooltip","setClickFun","getTooltip","getDirection","getVertices","getEdges","addSubGraph","list","_title","uniq","a","prims","boolean","number","string","objs","item","hasOwnProperty","nodeList","apply","subGraph","getPosForId","secCount","posCrossRef","indexNodes2","result","count","posCount","childPos","getDepthFirstPos","indexNodes","getSubGraphs","firstGraph","destructStartLink","_str","destructEndLink","destructLink","_startStr","startInfo","lex","addVertices","vert","svgId","vertex","classStr","getStylesFromArray","parentNode","radious","_shape","addEdges","cnt","defaultLabelStyle","defaultStyles","linkId","linkNameStart","linkNameEnd","edgeData","arrowhead","interpolateToCurve","curveLinear","arrowheadStyle","labelpos","labelType","flowDb","flow","subG","_label","labels","querySelectorAll","k","dim","insertBefore","firstChild","linkNode","Render","flowChartShapes","arrows","none","normal","util","clusterRects","clusterEl","xPos","baseVal","value","yPos","cluster","te","classList","add","dateFormat","todayMarker","excludes","sections","tasks","currentSection","tags","inclusiveEndDates","lastOrder","taskCnt","lastTask","lastTaskID","rawTasks","setAxisFormat","getAxisFormat","setTodayMarker","getTodayMarker","setDateFormat","enableInclusiveEndDates","endDatesAreInclusive","getDateFormat","setExcludes","toLowerCase","getExcludes","addSection","getSections","getTasks","allItemsPricessed","compileTasks","maxDepth","iterationCount","isInvalidDate","date","isoWeekday","format","checkTaskDates","task","manualEndTime","startTime","moment","endTime","renderEndTime","fixTaskDates","toDate","invalid","getStartDate","prevTime","re","afterStatement","exec","latestEndingTask","findTaskById","dt","Date","setHours","mDate","isValid","durationToDate","durationStatement","relativeTime","getEndDate","inclusive","parseId","idStr","compileData","prevTask","dataStr","ds","getTaskTags","endTimeData","parseData","prevTaskId","startData","taskDb","addTask","rawTask","section","processed","raw","taskInfo","active","done","crit","milestone","order","addTaskOrg","newTask","description","compileTask","allProcessed","_linkStr","sanitizeUrl","pushFun","open","functionArgs","argList","charAt","callbackFunction","matchFound","t","regex","RegExp","shift","ganttDb","rightPadding","getElementById","parentElement","offsetWidth","useWidth","taskArray","timeScale","scaleTime","domain","rangeRound","categories","catsUnfiltered","checkUnique","taskCompare","b","taskA","taskB","makeGant","pageWidth","pageHeight","gap","colorScale","scaleLinear","range","interpolateHcl","makeGrid","drawRects","vertLabels","drawToday","theArray","theGap","theTopPad","theSidePad","theBarHeight","theColorScale","enter","rectangles","toString","secNum","taskClass","startX","endX","textWidth","taskType","xAxis","axisBottom","tickSize","tickFormat","timeFormat","call","numOccurances","prevGap","getCount","todayG","today","todayLine","arr","hash","getCounts","obj","word","commits","branches","master","curBranch","seq","makeid","characters","charactersLength","floor","random","getId","isfastforwardable","currentCommit","otherCommit","isReachableFrom","currentSeq","otherSeq","uniqBy","fn","recordMap","create","reduce","out","setOptions","rawOptString","message","getOptions","commit","msg","branch","merge","otherBranch","checkout","commitRef","ref","parentCount","parseInt","upsert","newval","index","splice","prettyPrintCommitHistory","commitArr","c","newCommit","nextCommit","prettyPrint","getCommitsArray","getBranchesAsObjArray","branchArr","getBranches","getCommits","o","getCurrentBranch","getHead","allCommitsDict","branchNum","nodeFillColor","nodeStrokeWidth","nodeStrokeColor","lineStrokeWidth","branchOffset","lineColor","leftMargin","branchColors","nodeRadius","nodeLabel","apiConfig","svgCreateDefs","svgDrawLine","colorIdx","color","lineGen","round","getElementCoords","coords","ctm","getCTM","xn","yn","svgDrawLineForCommits","fromId","toId","fromBbox","toBbox","lineStart","lineEnd","cloneNode","selector","renderCommitHistory","commitid","numCommits","size","branchName","renderLines","branchColor","lineDrawn","ver","gitGraphParser","db","assign","setMessage","getMessage","setInfo","inf","getInfo","infoParser","cleanupValue","pieParser","pieData","margin","legendRectSize","legendSpacing","sum","scaleOrdinal","schemeSet2","pie","d3pie","dataReady","entries","arcGenerator","arc","innerRadius","outerRadius","toFixed","centroid","legend","horz","prevActor","actors","messages","notes","titleWrapped","sequenceNumbersEnabled","wrapEnabled","parseDirective","statement","context","mermaidAPI","addActor","old","autoWrap","nextActor","activationCount","part","LINETYPE","ACTIVE_START","from","actor","ACTIVE_END","addMessage","idFrom","idTo","answer","to","addSignal","messageType","Error","token","loc","first_line","last_line","first_column","last_column","expected","getMessages","getActors","getActor","getActorKeys","getTitleWrapped","enableSequenceNumbers","setWrap","wrapSetting","parseMessage","SOLID","DOTTED","NOTE","SOLID_CROSS","DOTTED_CROSS","SOLID_OPEN","DOTTED_OPEN","LOOP_START","LOOP_END","ALT_START","ALT_ELSE","ALT_END","OPT_START","OPT_END","PAR_START","PAR_AND","PAR_END","RECT_START","RECT_END","ARROWTYPE","FILLED","OPEN","PLACEMENT","LEFTOF","RIGHTOF","OVER","addNote","placement","titleWrap","param","signalType","loopText","optText","altText","parText","sequenceDb","startx","stopx","starty","stopy","verticalPos","sequenceItems","activations","models","getHeight","loops","it","acc","actorModel","addLoop","loopModel","msgModel","noteModel","lastActor","lastLoop","lastMessage","lastNote","init","updateVal","val","updateBounds","_self","updateFn","updateItemBounds","n","_startx","_stopx","_starty","_stopy","newActivation","actorRect","stackedSize","actorActivations","anchored","anchorElement","endActivation","lastActorActivationIdx","activation","lastIndexOf","createLoop","newLoop","endLoop","pop","addSectionToLoop","loop","sectionTitles","getVerticalPos","bumpVerticalPos","bump","getBounds","drawNote","getNoteRect","rectElem","drawRect","textObj","getTextObj","anchor","textMargin","valign","textElem","drawText","curr","drawMessage","sequenceIndex","lines","textDims","calculateTextDimensions","lineHeight","totalOffset","lineStarty","fromBounds","toBounds","drawActors","actorKeys","prevWidth","prevMargin","drawActor","activationBounds","actorObj","adjustLoopHeightForWrap","loopWidths","preMargin","postMargin","addLoopFn","heightAdjust","loopWidth","textConf","wrapLabel","maxMessageWidthPerActor","getMaxMessageWidthPerActor","calculateActorMargins","calculateLoopBounds","insertArrowHead","insertArrowCrossHead","insertSequenceNumber","activeEnd","activationData","drawActivation","drawLoop","drawBackgroundRect","includes","box","actorLines","extraVertForTitle","isNote","isMessage","textFont","wrappedMessage","messageDimensions","messageWidth","actorToMessageWidth","maxHeight","prop","actDims","actorKey","actorWidth","buildNoteModel","shouldWrap","textDimensions","buildMessageModel","process","fromIdx","toIdx","allBounds","boundedWidth","msgDims","stack","current","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","toAdd","enabled","stk","rectData","textData","prevTextHeight","textElems","yfunc","dominantBaseline","alignmentBaseline","span","drawLabel","txtObject","genPoints","cut","actorCnt","center","_drawTextCandidateFunc","drawLoopLine","idx","sectionHeight","lower","defs","byText","content","textAttrs","_setTextAttrs","byTspan","byFo","toText","fromTextAttrsDict","textPlacement","set","get","drawStartState","drawDivider","drawSimpleState","stateDef","drawDescrState","descriptions","isSecond","descrLine","descrBox","addTitleAndBox","altBkg","pad","dblPad","orgBox","orgWidth","orgX","titleWidth","graphBox","doc","lineY","drawEndState","drawForkJoinState","parentId","tmp","nText","_drawLongText","_text","tHeight","textBounds","drawState","stateInfo","stateBox","stateDb","titleRows","maxWidth","boundstmp","boxHeight","heightAdj","clone","rootDoc","setRootDoc","getRootDoc","docTranslator","first","stmt","state1","state2","currentDoc","newNode","generateId","docNode","getRootDocV2","extract","_doc","addState","newDoc","states","documents","root","currentDocument","startCnt","endCnt","addDescription","des","getState","getStates","logDocuments","_id1","_id2","_descr","theState","dividerCnt","getDividerId","trimColon","nodeDb","setupNode","altFlag","nodeData","noteData","groupData","position","setupDoc","startId","endId","transformationLog","renderDoc","getLabelWidth","edgeFreeDoc","ranker","nodeSep","sub","boxBounds","noteDef","nodeCount","svgElem","dividers","pWidth","pShift","getAttribute","allItemsProcessed","updateActors","tempActors","people","unique","Set","taskData","pieces","score","peeps","peopleList","journeyDb","taskMargin","taskFontSize","taskFontFamily","actorColours","sectionFills","sectionColours","drawActorLegend","person","colour","circleData","drawCircle","labelData","LEFT_MARGIN","initGraphics","actorNames","actorPos","actorName","drawTasks","fills","textColours","lastSection","sectionVHeight","taskPos","sectionNumber","drawSection","taskActors","drawTask","drawFace","faceData","circleElement","face","smile","d3arc","startAngle","PI","endAngle","sad","ambivalent","labelMargin","taskCount","graphics","LEVELS","fatal","setLogLevel","level","bind","time","arguments","mermaid","sequenceConfig","callback","Node","initialize","ganttConfig","now","innerHTML","decode","detectInit","svgCode","parseError","contentLoaded","themes","themeName","require","graphInit","reinitialize","graphType","detectType","gitGraphAst","flowParser","sequenceParser","ganttParser","classParser","stateParser","infoDb","pieDb","journeyParser","encodeEntities","innerTxt","isInt","decodeEntities","_txt","cb","container","existingSvg","remove","altFontFamily","flowRenderer","style1","createElement","scope","style2","cs","getComputedStyle","font","gitGraphRenderer","flowRendererV2","sequenceDiagram","sequenceRenderer","ganttRenderer","classRenderer","stateRenderer","stateRendererV2","infoRenderer","pkg","version","pieRenderer","erRenderer","journeyRenderer","errorRenderer","currentDirective","args","handleDirective","directive","updateRendererConfigs","globalReset","d3CurveTypes","curveBasisClosed","curveBasisOpen","curveLinearClosed","curveMonotoneX","curveMonotoneY","curveNatural","curveStep","curveStepAfter","curveStepBefore","directiveWithoutOpen","anyComment","inits","detectDirective","results","commentWithoutDirectives","source","lastIndex","memoize","resolver","cache","defaultCurve","curveName","toUpperCase","arrPaths","fnName","params","distance","pow","traverseEdge","prevPoint","totalDistance","remainingDistance","vectorDistance","distanceRatio","isRelationTypePresent","initialPosition","distanceToCardinalityPoint","angle","atan2","cardinalityPosition","sin","cos","cryptoRandomString","dst","src","drawSimpleText","joinWith","words","completedLines","nextLine","wordLength","calculateTextWidth","nextLineLength","breakString","hyphenatedStrings","remainingWord","Boolean","currentWord","isLastWord","hyphenCharacter","currentLine","character","lineWidth","currentCharacter","isLastLine","hyphenatedNextLine","calculateTextHeight","fontFamilies","dims","cheight","bBox"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;AClFA,2BAA2B,mBAAO,CAAC,2GAAsD;AACzF;AACA,cA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ACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,MAAM;AAChB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,8BAA8B;AAClE;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;;AAEA;AACA,UAAU,UAAU;AACpB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,sBAAsB;AACrD;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7SA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA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AAU,EAAE,uBAAuB,wEAAwE,UAAU;AAC3nD,iBAAiB,oCAAoC;AACrD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kCAAkC;AAC/D;AACA;AACA;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,+EAA+E,qBAAqB,WAAW,wBAAwB,EAAE,gQAAgQ;AACzY,aAAa,UAAU,kCAAkC,YAAY,kCAAkC,WAAW,sCAAsC,YAAY;AACpK,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0DAAI,eAAe,mBAAO,CAAC,qDAAM;AAC1D;AACA;AACA,IAAI,KAA6B,IAAI,4CAAY;AACjD;AACA;AACA,C;;;;;;;;;;;;;AC7wBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA,IAAIU,SAAS,GAAG,CAAhB;AACO,IAAMH,QAAQ,GAAG,SAAXA,QAAW,CAASlX,IAAT,EAAesX,IAAf,EAAqB5E,QAArB,E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;;;;;;AC3VA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA,eAAe,kCAAkC;AACjD,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,qSAAqS;AAChT,aAAa,wKAAwK;AACrL;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;;AAEA,iC;AACA,iC;AACA;AACA,uEAAuE;;AAEvE;AACA;AACA,iBAAiB,oCAAoC;AACrD;AACA;;AAEA,kBAAkB;AAClB,kEAAkE;;AAElE;AACA;AACA,qC;AACA;AACA;AACA,sC;AACA;AACA;AACA,qC;AACA;AACA;AACA,kC;AACA;AACA;AACA,4C;AACA;AACA;AACA,wC;AACA;AACA;AACA,mC;AACA;AACA;AACA,iB;AACA;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,cAAc,IAAI,GAAG,uBAAuB,EAAE,QAAQ,eAAe,qCAAqC,4BAA4B,YAAY,EAAE,0BAA0B,uDAAuD,UAAU,EAAE,kCAAkC,8BAA8B,0BAA0B,EAAE,SAAS;AACnX,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,k8CAAk8C;AAC78C,aAAa,40BAA40B;AACz1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,8CAA8C,WAAW,qD;AACrG;AACA;AACA,8CAA8C,gDAAgD,WAAW,yD;AACzG;AACA;AACA,iCAAiC,aAAa;AAC9C;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA,gCAAgC;AAChC;AACA;AACA,kCAAkC,qDAAqD;AACvF;AACA;AACA,oBAAoB;AACpB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA,uBAAuB;AACvB;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,4CAA4C,WAAW;AACvD;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA;AACA;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;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bE,MAAI,EAAJA;AAFa,CAAf,E;;;;;;;;;;;AC9dA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA,eAAe,kCAAkC;AACjD,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,gWAAgW;AAC3W,aAAa,gPAAgP;AAC7P;AACA;AACA;;AAEA;AACA;AACA;AACA,iB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,oCAAoC;AACpC;AACA;AACA,iCAAiC;AACjC;AACA;AACA,qCAAqC;AACrC;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,gCAAgC;AAChC;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,2CAA2C;AAC7D;AACA;AACA,kBAAkB,+CAA+C;AACjE;AACA;AACA,kBAAkB,yCAAyC;AAC3D;AACA;AACA,kBAAkB,6CAA6C;AAC/D;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,cAAc,IAAI,GAAG,sGAAsG,cAAc,QAAQ,gBAAgB,0EAA0E,0IAA0I,UAAU,EAAE,oBAAoB,0CAA0C,oBAAoB,gBAAgB,UAAU,gBAAgB,UAAU,8BAA8B,UAAU;AAC5kB,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iSAAiS,yDAAyD,2BAA2B,6BAA6B,qDAAqD,2BAA2B,kBAAkB,kBAAkB;AACtgB,aAAa,gBAAgB,kCAAkC,iBAAiB,mCAAmC,SAAS,gCAAgC,UAAU,kCAAkC,YAAY;AACpN,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0DAAI,eAAe,mBAAO,CAAC,qDAAM;AAC1D;AACA;AACA,IAAI,KAA6B,IAAI,4CAAY;AACjD;AACA;AACA,C;;;;;;;;;;;;;ACvtBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAIkb,OAAO,GAAG,EAAd;AACA,IAAIltB,IAAI,GAAG,IAAX;AACA,IAAImtB,QAAQ,GAAG;AAAEC,QAAM,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O,CAACs6B,QAAQ,CAAC9vB,MAAT,GAAkB,CAAnB,IAAwBrL,MAAM,CAAC++B,YAAtC;AACD,KAHD;AAID,GAhCD,CAgCE,OAAOtxB,CAAP,EAAU;AACVlH,kDAAM,CAACuQ,KAAP,CAAa,gCAAb;AACAvQ,kDAAM,CAACuQ,KAAP,CAAarJ,CAAC,CAACkvB,OAAf;AACD;AACF,CArCM;AAuCQ;AACb7c,SAAO,EAAPA,OADa;AAEbE,MAAI,EAAJA;AAFa,CAAf,E;;;;;;;;;;;ACjVA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA,eAAe,kCAAkC;AACjD,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,uSAAuS;AAClT,aAAa,0JAA0J;AACvK;AACA;AACA;;AAEA;AACA;AACA;AACA,iB;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,yBAAyB;AACzB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,QAAQ,cAAc,gBAAgB,gBAAgB,sBAAsB,EAAE,QAAQ,EAAE,gFAAgF,eAAe,SAAS,eAAe,UAAU,gBAAgB,0BAA0B,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,0BAA0B,EAAE,QAAQ,eAAe,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,UAAU,EAAE,oBAAoB,EAAE,UAAU,EAAE,UAAU;AAC1lB,iBAAiB,2GAA2G;AAC5H;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,aAAa,WAAW,kCAAkC,WAAW,kCAAkC,YAAY;AACnH,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0DAAI,eAAe,mBAAO,CAAC,qDAAM;AAC1D;AACA;AACA,IAAI,KAA6B,IAAI,4CAAY;AACjD;AACA;AACA,C;;;;;;;;;;;;;ACvrBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AAGA;AAEA,IAAI2c,OAAO,GAAG,EAAd;AACA,IAAIhzB,IAAI,GAAG,KAAX;A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;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,mHAAmH;AAC9H,aAAa,gDAAgD;AAC7D;AACA;AACA;;AAEA;AACA;AACA;AACA,W;AACA;AACA;;AAEA;AACA;AACA,kB;AACA;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,cAAc,IAAI,GAAG,iCAAiC,EAAE,QAAQ;AAC7F,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,aAAa,WAAW;AACxB,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0DAAI,eAAe,mBAAO,CAAC,qDAAM;AAC1D;AACA;AACA,IAAI,KAA6B,IAAI,4CAAY;AACjD;AACA;AACA,C;;;;;;;;;;;;AC7mBA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA,eAAe,kCAAkC;AACjD,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,mIAAmI;AAC9I,aAAa,gEAAgE;AAC7E;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kD;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,cAAc,IAAI,GAAG,0CAA0C,EAAE,QAAQ,yCAAyC,UAAU;AACzJ,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,qGAAqG;AACrG,aAAa,UAAU,gCAAgC,YAAY;AACnE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0DAAI,eAAe,mBAAO,CAAC,qDAAM;AAC1D;AACA;AACA,IAAI,KAA6B,IAAI,4CAAY;AACjD;AACA;AACA,C;;;;;;;;;;;;;ACznBA;AAAA;AAAA;;;AAGA;AAEA,IAAIgR,QAAQ,GAAG,EAAf;AACA,IAAIhS,KAAK,GAAG,EAAZ;;AAEA,IAAMqT,UAAU,GAAG,SAAbA,UAAa,CAASrrB,EAAT,EAAaupB,KAAb,EAAoB;AACrC,MAAI,OAAOS,QAAQ,CAAChqB,EAAD,CA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D;AACF,CAtIM;AAwIQ;AACb7c,SAAO,EAAPA,OADa;AAEbE,MAAI,EAAJA;AAFa,CAAf,E;;;;;;;;;;;AC/JA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA,eAAe,kCAAkC;AACjD,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,wyBAAwyB;AACnzB,aAAa,ifAAif;AAC9f;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,c;AAClB;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,W;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,SAAS,+BAA+B;AACxC;AACA;;AAEA,oBAAoB,0FAA0F;AAC9G,iBAAiB,qEAAqE;AACtF;AACA;AACA;;AAEA,oBAAoB,wFAAwF;AAC5G,iBAAiB,oFAAoF;AACrG;AACA;AACA;;AAEA,oBAAoB,uFAAuF;AAC3G,iBAAiB,mFAAmF;AACpG;AACA;AACA;;AAEA;AACA,oBAAoB,uFAAuF;AAC3G;AACA;AACA,iBAAiB,gDAAgD;AACjE;AACA;AACA;;AAEA;AACA,oBAAoB,uFAAuF;AAC3G;AACA;AACA,iBAAiB,gDAAg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AE,UAAU,EAAE,UAAU,gBAAgB,aAAa,EAAE,UAAU,EAAE,UAAU,0DAA0D,wJAAwJ,EAAE,wJAAwJ,EAAE,wJAAwJ,EAAE,UAAU,EAAE,kKAAkK,EAAE,UAAU,EAAE,kKAAkK,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,oBAAoB,EAAE,SAAS,EAAE,SAAS,0DAA0D,UAAU,gBAAgB,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,wCAAwC,YAAY,aAAa,YAAY,GAAG,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;AACpsF,iBAAiB,yKAAyK;AAC1L;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA,qCAAqC,W;AACrC;AACA,qCAAqC,W;AACrC;AACA,wBAAwB,6BAA6B,W;AACrD;AACA,wBAAwB,iBAAiB,W;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,W;AAC1B;AACA,wCAAwC,qBAAqB,W;AAC7D;AACA,yBAAyB,iBAAiB,oBAAoB,W;AAC9D;AACA,yBAAyB,iBAAiB,U;AAC1C;AACA,4BAA4B,W;AAC5B;AACA,4BAA4B,W;AAC5B;AACA,4BAA4B,W;AAC5B;AACA,4BAA4B,W;AAC5B;AACA,4BAA4B,W;AAC5B;AACA,4BAA4B,W;AAC5B;AACA,4BAA4B,W;AAC5B;AACA,yBAAyB,W;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,W;AAC1B;AACA,0BAA0B,W;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,W;AACxC;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A;;;AAGA,2EAA2E;AAC3E,gBAAgB;;AAEhB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;;;AAGhB;AACA;;AAEA,kFAAkF;AAClF,iBAAiB;;AAEjB;AACA;;AAEA,gBAAgB;;AAEhB;AACA;;AAEA,gBAAgB;;AAEhB;AACA;;AAEA,gBAAgB;;AAEhB;AACA;;AAEA,4GAA4G;AAC5G,gBAAgB,2CAA2C;;AAE3D;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,SAAS,sBAAsB,EAAE,MAAM,EAAE,sBAAsB,EAAE,sBAAsB,8CAA8C,IAAI,GAAG,QAAQ,EAAE,QAAQ,EAAE,yGAAyG,eAAe,iFAAiF,wCAAwC,oBAAoB,iBAAiB,UAAU,eAAe,UAAU,GAAG,UAAU,4CAA4C,oCAAoC,yDAAyD,oBAAoB,0BAA0B,KAAK,GAAG,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,eAAe,UAAU,GAAG,2GAA2G,eAAe,UAAU,GAAG,UAAU,EAAE,UAAU,wCAAwC,KAAK,+BAA+B,2GAA2G;AAC/kC,iBAAiB,oCAAoC;AACrD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,yCAAyC,a;AACzE;AACA;AACA;AACA;AACA;AACA,gC;AACA;AACA,uBAAuB,yCAAyC,0CAA0C;AAC1G;AACA,wBAAwB,yCAAyC,yCAAyC;AAC1G;AACA,wBAAwB,yCAAyC,yCAAyC;AAC1G;AACA,wBAAwB,yCAAyC,yCAAyC;AAC1G;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA,wBAAwB,uCAAuC;AAC/D;AACA;AACA;AACA,wDAAwD;AACxD;AACA,oDAAoD;AACpD;AACA;AACA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,uKAAuK;AAClL,aAAa,oGAAoG;AACjH;AACA;AACA;;AAEA;AACA;AACA;AACA,iB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,gCAAgC;AAChC;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,cAAc,IAAI,GAAG,sDAAsD,cAAc,QAAQ,gBAAgB,0BAA0B,sDAAsD,UAAU;AACxO,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,sGAAsG,2BAA2B,kBAAkB,kBAAkB;AACrK,aAAa,WAAW;AACxB,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0DAAI,eAAe,mBAAO,CAAC,qDA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;;;;;;;;;ACAA,iE;;;;;;;;;;;ACAA,kD;;;;;;;;;;;ACAA,qC;;;;;;;;;;;ACAA,wC;;;;;;;;;;;ACAA,sC","file":"mermaid.core.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"mermaid\"] = factory();\n\telse\n\t\troot[\"mermaid\"] = factory();\n})(typeof self !== \"undefined\" ? self : this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/mermaid.js\");\n","exports = module.exports = require(\"../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"/* Flowchart variables */\\n/* Sequence Diagram variables */\\n/* Gantt chart variables */\\n/* state colors */\\n.label {\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family);\\n color: #333; }\\n\\n.label text {\\n fill: #333; }\\n\\n.node rect,\\n.node circle,\\n.node ellipse,\\n.node polygon,\\n.node path {\\n fill: #1f2020;\\n stroke: #81B1DB;\\n stroke-width: 1px; }\\n\\n.node .label {\\n text-align: center; }\\n\\n.node.clickable {\\n cursor: pointer; }\\n\\n.arrowheadPath {\\n fill: lightgrey; }\\n\\n.edgePath .path {\\n stroke: lightgrey;\\n stroke-width: 1.5px; }\\n\\n.flowchart-link {\\n stroke: lightgrey;\\n fill: none; }\\n\\n.edgeLabel {\\n background-color: #e8e8e8;\\n text-align: center; }\\n .edgeLabel rect {\\n opacity: 0.5; }\\n\\n.cluster rect {\\n fill: #474949;\\n stroke: rgba(255, 255, 255, 0.25);\\n stroke-width: 1px; }\\n\\n.cluster text {\\n fill: #F9FFFE; }\\n\\ndiv.mermaidTooltip {\\n position: absolute;\\n text-align: center;\\n max-width: 200px;\\n padding: 2px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family);\\n font-size: 12px;\\n background: #474949;\\n border: 1px solid rgba(255, 255, 255, 0.25);\\n border-radius: 2px;\\n pointer-events: none;\\n z-index: 100; }\\n\\n.actor {\\n stroke: #81B1DB;\\n fill: #1f2020; }\\n\\ntext.actor > tspan {\\n fill: lightgrey;\\n stroke: none; }\\n\\n.actor-line {\\n stroke: lightgrey; }\\n\\n.messageLine0 {\\n stroke-width: 1.5;\\n stroke-dasharray: none;\\n stroke: lightgrey; }\\n\\n.messageLine1 {\\n stroke-width: 1.5;\\n stroke-dasharray: 2, 2;\\n stroke: lightgrey; }\\n\\n#arrowhead path {\\n fill: lightgrey;\\n stroke: lightgrey; }\\n\\n.sequenceNumber {\\n fill: black; }\\n\\n#sequencenumber {\\n fill: lightgrey; }\\n\\n#crosshead path {\\n fill: lightgrey;\\n stroke: lightgrey; }\\n\\n.messageText {\\n fill: lightgrey;\\n stroke: lightgrey; }\\n\\n.labelBox {\\n stroke: #81B1DB;\\n fill: #1f2020; }\\n\\n.labelText, .labelText > tspan {\\n fill: lightgrey;\\n stroke: none; }\\n\\n.loopText, .loopText > tspan {\\n fill: lightgrey;\\n stroke: none; }\\n\\n.loopLine {\\n stroke-width: 2px;\\n stroke-dasharray: 2, 2;\\n stroke: #81B1DB;\\n fill: #81B1DB; }\\n\\n.note {\\n stroke: rgba(255, 255, 255, 0.25);\\n fill: #fff5ad; }\\n\\n.noteText, .noteText > tspan {\\n fill: #1f2020;\\n stroke: none; }\\n\\n.activation0 {\\n fill: #474949;\\n stroke: #81B1DB; }\\n\\n.activation1 {\\n fill: #474949;\\n stroke: #81B1DB; }\\n\\n.activation2 {\\n fill: #474949;\\n stroke: #81B1DB; }\\n\\n/** Section styling */\\n.mermaid-main-font {\\n font-family: \\\"trebuchet ms\\\", verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.section {\\n stroke: none;\\n opacity: 0.2; }\\n\\n.section0 {\\n fill: rgba(255, 255, 255, 0.3); }\\n\\n.section2 {\\n fill: #EAE8B9; }\\n\\n.section1,\\n.section3 {\\n fill: white;\\n opacity: 0.2; }\\n\\n.sectionTitle0 {\\n fill: #F9FFFE; }\\n\\n.sectionTitle1 {\\n fill: #F9FFFE; }\\n\\n.sectionTitle2 {\\n fill: #F9FFFE; }\\n\\n.sectionTitle3 {\\n fill: #F9FFFE; }\\n\\n.sectionTitle {\\n text-anchor: start;\\n font-size: 11px;\\n text-height: 14px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n/* Grid and axis */\\n.grid .tick {\\n stroke: lightgrey;\\n opacity: 0.8;\\n shape-rendering: crispEdges; }\\n .grid .tick text {\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.grid path {\\n stroke-width: 0; }\\n\\n/* Today line */\\n.today {\\n fill: none;\\n stroke: #DB5757;\\n stroke-width: 2px; }\\n\\n/* Task styling */\\n/* Default task */\\n.task {\\n stroke-width: 2; }\\n\\n.taskText {\\n text-anchor: middle;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.taskText:not([font-size]) {\\n font-size: 11px; }\\n\\n.taskTextOutsideRight {\\n fill: #323D47;\\n text-anchor: start;\\n font-size: 11px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.taskTextOutsideLeft {\\n fill: #323D47;\\n text-anchor: end;\\n font-size: 11px; }\\n\\n/* Special case clickable */\\n.task.clickable {\\n cursor: pointer; }\\n\\n.taskText.clickable {\\n cursor: pointer;\\n fill: #003163 !important;\\n font-weight: bold; }\\n\\n.taskTextOutsideLeft.clickable {\\n cursor: pointer;\\n fill: #003163 !important;\\n font-weight: bold; }\\n\\n.taskTextOutsideRight.clickable {\\n cursor: pointer;\\n fill: #003163 !important;\\n font-weight: bold; }\\n\\n/* Specific task settings for the sections*/\\n.taskText0,\\n.taskText1,\\n.taskText2,\\n.taskText3 {\\n fill: #323D47; }\\n\\n.task0,\\n.task1,\\n.task2,\\n.task3 {\\n fill: #1f2020;\\n stroke: rgba(255, 255, 255, 0.5); }\\n\\n.taskTextOutside0,\\n.taskTextOutside2 {\\n fill: lightgrey; }\\n\\n.taskTextOutside1,\\n.taskTextOutside3 {\\n fill: lightgrey; }\\n\\n/* Active task */\\n.active0,\\n.active1,\\n.active2,\\n.active3 {\\n fill: #81B1DB;\\n stroke: rgba(255, 255, 255, 0.5); }\\n\\n.activeText0,\\n.activeText1,\\n.activeText2,\\n.activeText3 {\\n fill: #323D47 !important; }\\n\\n/* Completed task */\\n.done0,\\n.done1,\\n.done2,\\n.done3 {\\n stroke: grey;\\n fill: lightgrey;\\n stroke-width: 2; }\\n\\n.doneText0,\\n.doneText1,\\n.doneText2,\\n.doneText3 {\\n fill: #323D47 !important; }\\n\\n/* Tasks on the critical line */\\n.crit0,\\n.crit1,\\n.crit2,\\n.crit3 {\\n stroke: #E83737;\\n fill: #E83737;\\n stroke-width: 2; }\\n\\n.activeCrit0,\\n.activeCrit1,\\n.activeCrit2,\\n.activeCrit3 {\\n stroke: #E83737;\\n fill: #81B1DB;\\n stroke-width: 2; }\\n\\n.doneCrit0,\\n.doneCrit1,\\n.doneCrit2,\\n.doneCrit3 {\\n stroke: #E83737;\\n fill: lightgrey;\\n stroke-width: 2;\\n cursor: pointer;\\n shape-rendering: crispEdges; }\\n\\n.milestone {\\n transform: rotate(45deg) scale(0.8, 0.8); }\\n\\n.milestoneText {\\n font-style: italic; }\\n\\n.doneCritText0,\\n.doneCritText1,\\n.doneCritText2,\\n.doneCritText3 {\\n fill: #323D47 !important; }\\n\\n.activeCritText0,\\n.activeCritText1,\\n.activeCritText2,\\n.activeCritText3 {\\n fill: #323D47 !important; }\\n\\n.titleText {\\n text-anchor: middle;\\n font-size: 18px;\\n fill: #323D47;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\ng.classGroup text {\\n fill: #81B1DB;\\n stroke: none;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family);\\n font-size: 10px; }\\n g.classGroup text .title {\\n font-weight: bolder; }\\n\\ng.clickable {\\n cursor: pointer; }\\n\\ng.classGroup rect {\\n fill: #1f2020;\\n stroke: #81B1DB; }\\n\\ng.classGroup line {\\n stroke: #81B1DB;\\n stroke-width: 1; }\\n\\n.classLabel .box {\\n stroke: none;\\n stroke-width: 0;\\n fill: #1f2020;\\n opacity: 0.5; }\\n\\n.classLabel .label {\\n fill: #81B1DB;\\n font-size: 10px; }\\n\\n.relation {\\n stroke: #81B1DB;\\n stroke-width: 1;\\n fill: none; }\\n\\n.dashed-line {\\n stroke-dasharray: 3; }\\n\\n#compositionStart {\\n fill: #81B1DB;\\n stroke: #81B1DB;\\n stroke-width: 1; }\\n\\n#compositionEnd {\\n fill: #81B1DB;\\n stroke: #81B1DB;\\n stroke-width: 1; }\\n\\n#aggregationStart {\\n fill: #1f2020;\\n stroke: #81B1DB;\\n stroke-width: 1; }\\n\\n#aggregationEnd {\\n fill: #1f2020;\\n stroke: #81B1DB;\\n stroke-width: 1; }\\n\\n#dependencyStart {\\n fill: #81B1DB;\\n stroke: #81B1DB;\\n stroke-width: 1; }\\n\\n#dependencyEnd {\\n fill: #81B1DB;\\n stroke: #81B1DB;\\n stroke-width: 1; }\\n\\n#extensionStart {\\n fill: #81B1DB;\\n stroke: #81B1DB;\\n stroke-width: 1; }\\n\\n#extensionEnd {\\n fill: #81B1DB;\\n stroke: #81B1DB;\\n stroke-width: 1; }\\n\\n.commit-id,\\n.commit-msg,\\n.branch-label {\\n fill: lightgrey;\\n color: lightgrey;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.pieTitleText {\\n text-anchor: middle;\\n font-size: 25px;\\n fill: #323D47;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.slice {\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\ng.stateGroup text {\\n fill: #81B1DB;\\n stroke: none;\\n font-size: 10px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\ng.stateGroup text {\\n fill: #81B1DB;\\n stroke: none;\\n font-size: 10px; }\\n\\ng.stateGroup .state-title {\\n font-weight: bolder;\\n fill: black; }\\n\\ng.stateGroup rect {\\n fill: #1f2020;\\n stroke: #81B1DB; }\\n\\ng.stateGroup line {\\n stroke: #81B1DB;\\n stroke-width: 1; }\\n\\n.transition {\\n stroke: #81B1DB;\\n stroke-width: 1;\\n fill: none; }\\n\\n.stateGroup .composit {\\n fill: white;\\n border-bottom: 1px; }\\n\\n.stateGroup .alt-composit {\\n fill: #e0e0e0;\\n border-bottom: 1px; }\\n\\n.state-note {\\n stroke: rgba(255, 255, 255, 0.25);\\n fill: #fff5ad; }\\n .state-note text {\\n fill: black;\\n stroke: none;\\n font-size: 10px; }\\n\\n.stateLabel .box {\\n stroke: none;\\n stroke-width: 0;\\n fill: #1f2020;\\n opacity: 0.5; }\\n\\n.stateLabel text {\\n fill: black;\\n font-size: 10px;\\n font-weight: bold;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.node circle.state-start {\\n fill: black;\\n stroke: black; }\\n\\n.node circle.state-end {\\n fill: black;\\n stroke: white;\\n stroke-width: 1.5; }\\n\\n#statediagram-barbEnd {\\n fill: #81B1DB; }\\n\\n.statediagram-cluster rect {\\n fill: #1f2020;\\n stroke: #81B1DB;\\n stroke-width: 1px; }\\n\\n.statediagram-cluster rect.outer {\\n rx: 5px;\\n ry: 5px; }\\n\\n.statediagram-state .divider {\\n stroke: #81B1DB; }\\n\\n.statediagram-state .title-state {\\n rx: 5px;\\n ry: 5px; }\\n\\n.statediagram-cluster.statediagram-cluster .inner {\\n fill: white; }\\n\\n.statediagram-cluster.statediagram-cluster-alt .inner {\\n fill: #e0e0e0; }\\n\\n.statediagram-cluster .inner {\\n rx: 0;\\n ry: 0; }\\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: #efefef; }\\n\\n.note-edge {\\n stroke-dasharray: 5; }\\n\\n.statediagram-note rect {\\n fill: #fff5ad;\\n stroke: rgba(255, 255, 255, 0.25);\\n stroke-width: 1px;\\n rx: 0;\\n ry: 0; }\\n\\n:root {\\n --mermaid-font-family: '\\\"trebuchet ms\\\", verdana, arial';\\n --mermaid-font-family: \\\"Comic Sans MS\\\", \\\"Comic Sans\\\", cursive; }\\n\\n/* Classes common for multiple diagrams */\\n.error-icon {\\n fill: #a44141; }\\n\\n.error-text {\\n fill: #ddd;\\n stroke: #ddd; }\\n\\n.edge-thickness-normal {\\n stroke-width: 2px; }\\n\\n.edge-thickness-thick {\\n stroke-width: 3.5px; }\\n\\n.edge-pattern-solid {\\n stroke-dasharray: 0; }\\n\\n.edge-pattern-dashed {\\n stroke-dasharray: 3; }\\n\\n.edge-pattern-dotted {\\n stroke-dasharray: 2; }\\n\\n.marker {\\n fill: lightgrey; }\\n\\n.marker.cross {\\n stroke: lightgrey; }\\n\", \"\"]);\n\n","exports = module.exports = require(\"../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"/* Flowchart variables */\\n/* Sequence Diagram variables */\\n/* Gantt chart variables */\\n/* state colors */\\n.label {\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family);\\n color: #333; }\\n\\n.label text {\\n fill: #333; }\\n\\n.node rect,\\n.node circle,\\n.node ellipse,\\n.node polygon,\\n.node path {\\n fill: #ECECFF;\\n stroke: #9370DB;\\n stroke-width: 1px; }\\n\\n.node .label {\\n text-align: center; }\\n\\n.node.clickable {\\n cursor: pointer; }\\n\\n.arrowheadPath {\\n fill: #333333; }\\n\\n.edgePath .path {\\n stroke: #333333;\\n stroke-width: 1.5px; }\\n\\n.flowchart-link {\\n stroke: #333333;\\n fill: none; }\\n\\n.edgeLabel {\\n background-color: #e8e8e8;\\n text-align: center; }\\n .edgeLabel rect {\\n opacity: 0.5; }\\n\\n.cluster rect {\\n fill: #ffffde;\\n stroke: #aaaa33;\\n stroke-width: 1px; }\\n\\n.cluster text {\\n fill: #333; }\\n\\ndiv.mermaidTooltip {\\n position: absolute;\\n text-align: center;\\n max-width: 200px;\\n padding: 2px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family);\\n font-size: 12px;\\n background: #ffffde;\\n border: 1px solid #aaaa33;\\n border-radius: 2px;\\n pointer-events: none;\\n z-index: 100; }\\n\\n.actor {\\n stroke: #CCCCFF;\\n fill: #ECECFF; }\\n\\ntext.actor > tspan {\\n fill: black;\\n stroke: none; }\\n\\n.actor-line {\\n stroke: grey; }\\n\\n.messageLine0 {\\n stroke-width: 1.5;\\n stroke-dasharray: none;\\n stroke: #333; }\\n\\n.messageLine1 {\\n stroke-width: 1.5;\\n stroke-dasharray: 2, 2;\\n stroke: #333; }\\n\\n#arrowhead path {\\n fill: #333;\\n stroke: #333; }\\n\\n.sequenceNumber {\\n fill: white; }\\n\\n#sequencenumber {\\n fill: #333; }\\n\\n#crosshead path {\\n fill: #333;\\n stroke: #333; }\\n\\n.messageText {\\n fill: #333;\\n stroke: #333; }\\n\\n.labelBox {\\n stroke: #CCCCFF;\\n fill: #ECECFF; }\\n\\n.labelText, .labelText > tspan {\\n fill: black;\\n stroke: none; }\\n\\n.loopText, .loopText > tspan {\\n fill: black;\\n stroke: none; }\\n\\n.loopLine {\\n stroke-width: 2px;\\n stroke-dasharray: 2, 2;\\n stroke: #CCCCFF;\\n fill: #CCCCFF; }\\n\\n.note {\\n stroke: #aaaa33;\\n fill: #fff5ad; }\\n\\n.noteText, .noteText > tspan {\\n fill: black;\\n stroke: none; }\\n\\n.activation0 {\\n fill: #f4f4f4;\\n stroke: #666; }\\n\\n.activation1 {\\n fill: #f4f4f4;\\n stroke: #666; }\\n\\n.activation2 {\\n fill: #f4f4f4;\\n stroke: #666; }\\n\\n/** Section styling */\\n.mermaid-main-font {\\n font-family: \\\"trebuchet ms\\\", verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.section {\\n stroke: none;\\n opacity: 0.2; }\\n\\n.section0 {\\n fill: rgba(102, 102, 255, 0.49); }\\n\\n.section2 {\\n fill: #fff400; }\\n\\n.section1,\\n.section3 {\\n fill: white;\\n opacity: 0.2; }\\n\\n.sectionTitle0 {\\n fill: #333; }\\n\\n.sectionTitle1 {\\n fill: #333; }\\n\\n.sectionTitle2 {\\n fill: #333; }\\n\\n.sectionTitle3 {\\n fill: #333; }\\n\\n.sectionTitle {\\n text-anchor: start;\\n font-size: 11px;\\n text-height: 14px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n/* Grid and axis */\\n.grid .tick {\\n stroke: lightgrey;\\n opacity: 0.8;\\n shape-rendering: crispEdges; }\\n .grid .tick text {\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.grid path {\\n stroke-width: 0; }\\n\\n/* Today line */\\n.today {\\n fill: none;\\n stroke: red;\\n stroke-width: 2px; }\\n\\n/* Task styling */\\n/* Default task */\\n.task {\\n stroke-width: 2; }\\n\\n.taskText {\\n text-anchor: middle;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.taskText:not([font-size]) {\\n font-size: 11px; }\\n\\n.taskTextOutsideRight {\\n fill: black;\\n text-anchor: start;\\n font-size: 11px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.taskTextOutsideLeft {\\n fill: black;\\n text-anchor: end;\\n font-size: 11px; }\\n\\n/* Special case clickable */\\n.task.clickable {\\n cursor: pointer; }\\n\\n.taskText.clickable {\\n cursor: pointer;\\n fill: #003163 !important;\\n font-weight: bold; }\\n\\n.taskTextOutsideLeft.clickable {\\n cursor: pointer;\\n fill: #003163 !important;\\n font-weight: bold; }\\n\\n.taskTextOutsideRight.clickable {\\n cursor: pointer;\\n fill: #003163 !important;\\n font-weight: bold; }\\n\\n/* Specific task settings for the sections*/\\n.taskText0,\\n.taskText1,\\n.taskText2,\\n.taskText3 {\\n fill: white; }\\n\\n.task0,\\n.task1,\\n.task2,\\n.task3 {\\n fill: #8a90dd;\\n stroke: #534fbc; }\\n\\n.taskTextOutside0,\\n.taskTextOutside2 {\\n fill: black; }\\n\\n.taskTextOutside1,\\n.taskTextOutside3 {\\n fill: black; }\\n\\n/* Active task */\\n.active0,\\n.active1,\\n.active2,\\n.active3 {\\n fill: #bfc7ff;\\n stroke: #534fbc; }\\n\\n.activeText0,\\n.activeText1,\\n.activeText2,\\n.activeText3 {\\n fill: black !important; }\\n\\n/* Completed task */\\n.done0,\\n.done1,\\n.done2,\\n.done3 {\\n stroke: grey;\\n fill: lightgrey;\\n stroke-width: 2; }\\n\\n.doneText0,\\n.doneText1,\\n.doneText2,\\n.doneText3 {\\n fill: black !important; }\\n\\n/* Tasks on the critical line */\\n.crit0,\\n.crit1,\\n.crit2,\\n.crit3 {\\n stroke: #ff8888;\\n fill: red;\\n stroke-width: 2; }\\n\\n.activeCrit0,\\n.activeCrit1,\\n.activeCrit2,\\n.activeCrit3 {\\n stroke: #ff8888;\\n fill: #bfc7ff;\\n stroke-width: 2; }\\n\\n.doneCrit0,\\n.doneCrit1,\\n.doneCrit2,\\n.doneCrit3 {\\n stroke: #ff8888;\\n fill: lightgrey;\\n stroke-width: 2;\\n cursor: pointer;\\n shape-rendering: crispEdges; }\\n\\n.milestone {\\n transform: rotate(45deg) scale(0.8, 0.8); }\\n\\n.milestoneText {\\n font-style: italic; }\\n\\n.doneCritText0,\\n.doneCritText1,\\n.doneCritText2,\\n.doneCritText3 {\\n fill: black !important; }\\n\\n.activeCritText0,\\n.activeCritText1,\\n.activeCritText2,\\n.activeCritText3 {\\n fill: black !important; }\\n\\n.titleText {\\n text-anchor: middle;\\n font-size: 18px;\\n fill: black;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\ng.classGroup text {\\n fill: #9370DB;\\n stroke: none;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family);\\n font-size: 10px; }\\n g.classGroup text .title {\\n font-weight: bolder; }\\n\\ng.clickable {\\n cursor: pointer; }\\n\\ng.classGroup rect {\\n fill: #ECECFF;\\n stroke: #9370DB; }\\n\\ng.classGroup line {\\n stroke: #9370DB;\\n stroke-width: 1; }\\n\\n.classLabel .box {\\n stroke: none;\\n stroke-width: 0;\\n fill: #ECECFF;\\n opacity: 0.5; }\\n\\n.classLabel .label {\\n fill: #9370DB;\\n font-size: 10px; }\\n\\n.relation {\\n stroke: #9370DB;\\n stroke-width: 1;\\n fill: none; }\\n\\n.dashed-line {\\n stroke-dasharray: 3; }\\n\\n#compositionStart {\\n fill: #9370DB;\\n stroke: #9370DB;\\n stroke-width: 1; }\\n\\n#compositionEnd {\\n fill: #9370DB;\\n stroke: #9370DB;\\n stroke-width: 1; }\\n\\n#aggregationStart {\\n fill: #ECECFF;\\n stroke: #9370DB;\\n stroke-width: 1; }\\n\\n#aggregationEnd {\\n fill: #ECECFF;\\n stroke: #9370DB;\\n stroke-width: 1; }\\n\\n#dependencyStart {\\n fill: #9370DB;\\n stroke: #9370DB;\\n stroke-width: 1; }\\n\\n#dependencyEnd {\\n fill: #9370DB;\\n stroke: #9370DB;\\n stroke-width: 1; }\\n\\n#extensionStart {\\n fill: #9370DB;\\n stroke: #9370DB;\\n stroke-width: 1; }\\n\\n#extensionEnd {\\n fill: #9370DB;\\n stroke: #9370DB;\\n stroke-width: 1; }\\n\\n.commit-id,\\n.commit-msg,\\n.branch-label {\\n fill: lightgrey;\\n color: lightgrey;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.pieTitleText {\\n text-anchor: middle;\\n font-size: 25px;\\n fill: black;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.slice {\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\ng.stateGroup text {\\n fill: #9370DB;\\n stroke: none;\\n font-size: 10px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\ng.stateGroup text {\\n fill: #9370DB;\\n stroke: none;\\n font-size: 10px; }\\n\\ng.stateGroup .state-title {\\n font-weight: bolder;\\n fill: black; }\\n\\ng.stateGroup rect {\\n fill: #ECECFF;\\n stroke: #9370DB; }\\n\\ng.stateGroup line {\\n stroke: #9370DB;\\n stroke-width: 1; }\\n\\n.transition {\\n stroke: #9370DB;\\n stroke-width: 1;\\n fill: none; }\\n\\n.stateGroup .composit {\\n fill: white;\\n border-bottom: 1px; }\\n\\n.stateGroup .alt-composit {\\n fill: #e0e0e0;\\n border-bottom: 1px; }\\n\\n.state-note {\\n stroke: #aaaa33;\\n fill: #fff5ad; }\\n .state-note text {\\n fill: black;\\n stroke: none;\\n font-size: 10px; }\\n\\n.stateLabel .box {\\n stroke: none;\\n stroke-width: 0;\\n fill: #ECECFF;\\n opacity: 0.5; }\\n\\n.stateLabel text {\\n fill: black;\\n font-size: 10px;\\n font-weight: bold;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.node circle.state-start {\\n fill: black;\\n stroke: black; }\\n\\n.node circle.state-end {\\n fill: black;\\n stroke: white;\\n stroke-width: 1.5; }\\n\\n#statediagram-barbEnd {\\n fill: #9370DB; }\\n\\n.statediagram-cluster rect {\\n fill: #ECECFF;\\n stroke: #9370DB;\\n stroke-width: 1px; }\\n\\n.statediagram-cluster rect.outer {\\n rx: 5px;\\n ry: 5px; }\\n\\n.statediagram-state .divider {\\n stroke: #9370DB; }\\n\\n.statediagram-state .title-state {\\n rx: 5px;\\n ry: 5px; }\\n\\n.statediagram-cluster.statediagram-cluster .inner {\\n fill: white; }\\n\\n.statediagram-cluster.statediagram-cluster-alt .inner {\\n fill: #e0e0e0; }\\n\\n.statediagram-cluster .inner {\\n rx: 0;\\n ry: 0; }\\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: #efefef; }\\n\\n.note-edge {\\n stroke-dasharray: 5; }\\n\\n.statediagram-note rect {\\n fill: #fff5ad;\\n stroke: #aaaa33;\\n stroke-width: 1px;\\n rx: 0;\\n ry: 0; }\\n\\n:root {\\n --mermaid-font-family: '\\\"trebuchet ms\\\", verdana, arial';\\n --mermaid-font-family: \\\"Comic Sans MS\\\", \\\"Comic Sans\\\", cursive; }\\n\\n/* Classes common for multiple diagrams */\\n.error-icon {\\n fill: #552222; }\\n\\n.error-text {\\n fill: #552222;\\n stroke: #552222; }\\n\\n.edge-thickness-normal {\\n stroke-width: 2px; }\\n\\n.edge-thickness-thick {\\n stroke-width: 3.5px; }\\n\\n.edge-pattern-solid {\\n stroke-dasharray: 0; }\\n\\n.edge-pattern-dashed {\\n stroke-dasharray: 3; }\\n\\n.edge-pattern-dotted {\\n stroke-dasharray: 2; }\\n\\n.marker {\\n fill: #333333; }\\n\\n.marker.cross {\\n stroke: #333333; }\\n\", \"\"]);\n\n","exports = module.exports = require(\"../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"/* Flowchart variables */\\n/* Sequence Diagram variables */\\n/* Gantt chart variables */\\n/* state colors */\\n.label {\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family);\\n color: #333; }\\n\\n.label text {\\n fill: #333; }\\n\\n.node rect,\\n.node circle,\\n.node ellipse,\\n.node polygon,\\n.node path {\\n fill: #cde498;\\n stroke: #13540c;\\n stroke-width: 1px; }\\n\\n.node .label {\\n text-align: center; }\\n\\n.node.clickable {\\n cursor: pointer; }\\n\\n.arrowheadPath {\\n fill: green; }\\n\\n.edgePath .path {\\n stroke: green;\\n stroke-width: 1.5px; }\\n\\n.flowchart-link {\\n stroke: green;\\n fill: none; }\\n\\n.edgeLabel {\\n background-color: #e8e8e8;\\n text-align: center; }\\n .edgeLabel rect {\\n opacity: 0.5; }\\n\\n.cluster rect {\\n fill: #cdffb2;\\n stroke: #6eaa49;\\n stroke-width: 1px; }\\n\\n.cluster text {\\n fill: #333; }\\n\\ndiv.mermaidTooltip {\\n position: absolute;\\n text-align: center;\\n max-width: 200px;\\n padding: 2px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family);\\n font-size: 12px;\\n background: #cdffb2;\\n border: 1px solid #6eaa49;\\n border-radius: 2px;\\n pointer-events: none;\\n z-index: 100; }\\n\\n.actor {\\n stroke: #13540c;\\n fill: #cde498; }\\n\\ntext.actor > tspan {\\n fill: black;\\n stroke: none; }\\n\\n.actor-line {\\n stroke: grey; }\\n\\n.messageLine0 {\\n stroke-width: 1.5;\\n stroke-dasharray: none;\\n stroke: #333; }\\n\\n.messageLine1 {\\n stroke-width: 1.5;\\n stroke-dasharray: 2, 2;\\n stroke: #333; }\\n\\n#arrowhead path {\\n fill: #333;\\n stroke: #333; }\\n\\n.sequenceNumber {\\n fill: white; }\\n\\n#sequencenumber {\\n fill: #333; }\\n\\n#crosshead path {\\n fill: #333;\\n stroke: #333; }\\n\\n.messageText {\\n fill: #333;\\n stroke: #333; }\\n\\n.labelBox {\\n stroke: #326932;\\n fill: #cde498; }\\n\\n.labelText, .labelText > tspan {\\n fill: black;\\n stroke: none; }\\n\\n.loopText, .loopText > tspan {\\n fill: black;\\n stroke: none; }\\n\\n.loopLine {\\n stroke-width: 2px;\\n stroke-dasharray: 2, 2;\\n stroke: #326932;\\n fill: #326932; }\\n\\n.note {\\n stroke: #6eaa49;\\n fill: #fff5ad; }\\n\\n.noteText, .noteText > tspan {\\n fill: black;\\n stroke: none; }\\n\\n.activation0 {\\n fill: #f4f4f4;\\n stroke: #666; }\\n\\n.activation1 {\\n fill: #f4f4f4;\\n stroke: #666; }\\n\\n.activation2 {\\n fill: #f4f4f4;\\n stroke: #666; }\\n\\n/** Section styling */\\n.mermaid-main-font {\\n font-family: \\\"trebuchet ms\\\", verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.section {\\n stroke: none;\\n opacity: 0.2; }\\n\\n.section0 {\\n fill: #6eaa49; }\\n\\n.section2 {\\n fill: #6eaa49; }\\n\\n.section1,\\n.section3 {\\n fill: white;\\n opacity: 0.2; }\\n\\n.sectionTitle0 {\\n fill: #333; }\\n\\n.sectionTitle1 {\\n fill: #333; }\\n\\n.sectionTitle2 {\\n fill: #333; }\\n\\n.sectionTitle3 {\\n fill: #333; }\\n\\n.sectionTitle {\\n text-anchor: start;\\n font-size: 11px;\\n text-height: 14px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n/* Grid and axis */\\n.grid .tick {\\n stroke: lightgrey;\\n opacity: 0.8;\\n shape-rendering: crispEdges; }\\n .grid .tick text {\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.grid path {\\n stroke-width: 0; }\\n\\n/* Today line */\\n.today {\\n fill: none;\\n stroke: red;\\n stroke-width: 2px; }\\n\\n/* Task styling */\\n/* Default task */\\n.task {\\n stroke-width: 2; }\\n\\n.taskText {\\n text-anchor: middle;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.taskText:not([font-size]) {\\n font-size: 11px; }\\n\\n.taskTextOutsideRight {\\n fill: black;\\n text-anchor: start;\\n font-size: 11px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.taskTextOutsideLeft {\\n fill: black;\\n text-anchor: end;\\n font-size: 11px; }\\n\\n/* Special case clickable */\\n.task.clickable {\\n cursor: pointer; }\\n\\n.taskText.clickable {\\n cursor: pointer;\\n fill: #003163 !important;\\n font-weight: bold; }\\n\\n.taskTextOutsideLeft.clickable {\\n cursor: pointer;\\n fill: #003163 !important;\\n font-weight: bold; }\\n\\n.taskTextOutsideRight.clickable {\\n cursor: pointer;\\n fill: #003163 !important;\\n font-weight: bold; }\\n\\n/* Specific task settings for the sections*/\\n.taskText0,\\n.taskText1,\\n.taskText2,\\n.taskText3 {\\n fill: white; }\\n\\n.task0,\\n.task1,\\n.task2,\\n.task3 {\\n fill: #487e3a;\\n stroke: #13540c; }\\n\\n.taskTextOutside0,\\n.taskTextOutside2 {\\n fill: black; }\\n\\n.taskTextOutside1,\\n.taskTextOutside3 {\\n fill: black; }\\n\\n/* Active task */\\n.active0,\\n.active1,\\n.active2,\\n.active3 {\\n fill: #cde498;\\n stroke: #13540c; }\\n\\n.activeText0,\\n.activeText1,\\n.activeText2,\\n.activeText3 {\\n fill: black !important; }\\n\\n/* Completed task */\\n.done0,\\n.done1,\\n.done2,\\n.done3 {\\n stroke: grey;\\n fill: lightgrey;\\n stroke-width: 2; }\\n\\n.doneText0,\\n.doneText1,\\n.doneText2,\\n.doneText3 {\\n fill: black !important; }\\n\\n/* Tasks on the critical line */\\n.crit0,\\n.crit1,\\n.crit2,\\n.crit3 {\\n stroke: #ff8888;\\n fill: red;\\n stroke-width: 2; }\\n\\n.activeCrit0,\\n.activeCrit1,\\n.activeCrit2,\\n.activeCrit3 {\\n stroke: #ff8888;\\n fill: #cde498;\\n stroke-width: 2; }\\n\\n.doneCrit0,\\n.doneCrit1,\\n.doneCrit2,\\n.doneCrit3 {\\n stroke: #ff8888;\\n fill: lightgrey;\\n stroke-width: 2;\\n cursor: pointer;\\n shape-rendering: crispEdges; }\\n\\n.milestone {\\n transform: rotate(45deg) scale(0.8, 0.8); }\\n\\n.milestoneText {\\n font-style: italic; }\\n\\n.doneCritText0,\\n.doneCritText1,\\n.doneCritText2,\\n.doneCritText3 {\\n fill: black !important; }\\n\\n.activeCritText0,\\n.activeCritText1,\\n.activeCritText2,\\n.activeCritText3 {\\n fill: black !important; }\\n\\n.titleText {\\n text-anchor: middle;\\n font-size: 18px;\\n fill: black;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\ng.classGroup text {\\n fill: #13540c;\\n stroke: none;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family);\\n font-size: 10px; }\\n g.classGroup text .title {\\n font-weight: bolder; }\\n\\ng.clickable {\\n cursor: pointer; }\\n\\ng.classGroup rect {\\n fill: #cde498;\\n stroke: #13540c; }\\n\\ng.classGroup line {\\n stroke: #13540c;\\n stroke-width: 1; }\\n\\n.classLabel .box {\\n stroke: none;\\n stroke-width: 0;\\n fill: #cde498;\\n opacity: 0.5; }\\n\\n.classLabel .label {\\n fill: #13540c;\\n font-size: 10px; }\\n\\n.relation {\\n stroke: #13540c;\\n stroke-width: 1;\\n fill: none; }\\n\\n.dashed-line {\\n stroke-dasharray: 3; }\\n\\n#compositionStart {\\n fill: #13540c;\\n stroke: #13540c;\\n stroke-width: 1; }\\n\\n#compositionEnd {\\n fill: #13540c;\\n stroke: #13540c;\\n stroke-width: 1; }\\n\\n#aggregationStart {\\n fill: #cde498;\\n stroke: #13540c;\\n stroke-width: 1; }\\n\\n#aggregationEnd {\\n fill: #cde498;\\n stroke: #13540c;\\n stroke-width: 1; }\\n\\n#dependencyStart {\\n fill: #13540c;\\n stroke: #13540c;\\n stroke-width: 1; }\\n\\n#dependencyEnd {\\n fill: #13540c;\\n stroke: #13540c;\\n stroke-width: 1; }\\n\\n#extensionStart {\\n fill: #13540c;\\n stroke: #13540c;\\n stroke-width: 1; }\\n\\n#extensionEnd {\\n fill: #13540c;\\n stroke: #13540c;\\n stroke-width: 1; }\\n\\n.commit-id,\\n.commit-msg,\\n.branch-label {\\n fill: lightgrey;\\n color: lightgrey;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.pieTitleText {\\n text-anchor: middle;\\n font-size: 25px;\\n fill: black;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.slice {\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\ng.stateGroup text {\\n fill: #13540c;\\n stroke: none;\\n font-size: 10px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\ng.stateGroup text {\\n fill: #13540c;\\n stroke: none;\\n font-size: 10px; }\\n\\ng.stateGroup .state-title {\\n font-weight: bolder;\\n fill: black; }\\n\\ng.stateGroup rect {\\n fill: #cde498;\\n stroke: #13540c; }\\n\\ng.stateGroup line {\\n stroke: #13540c;\\n stroke-width: 1; }\\n\\n.transition {\\n stroke: #13540c;\\n stroke-width: 1;\\n fill: none; }\\n\\n.stateGroup .composit {\\n fill: white;\\n border-bottom: 1px; }\\n\\n.stateGroup .alt-composit {\\n fill: #e0e0e0;\\n border-bottom: 1px; }\\n\\n.state-note {\\n stroke: #6eaa49;\\n fill: #fff5ad; }\\n .state-note text {\\n fill: black;\\n stroke: none;\\n font-size: 10px; }\\n\\n.stateLabel .box {\\n stroke: none;\\n stroke-width: 0;\\n fill: #cde498;\\n opacity: 0.5; }\\n\\n.stateLabel text {\\n fill: black;\\n font-size: 10px;\\n font-weight: bold;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.node circle.state-start {\\n fill: black;\\n stroke: black; }\\n\\n.node circle.state-end {\\n fill: black;\\n stroke: white;\\n stroke-width: 1.5; }\\n\\n#statediagram-barbEnd {\\n fill: #13540c; }\\n\\n.statediagram-cluster rect {\\n fill: #cde498;\\n stroke: #13540c;\\n stroke-width: 1px; }\\n\\n.statediagram-cluster rect.outer {\\n rx: 5px;\\n ry: 5px; }\\n\\n.statediagram-state .divider {\\n stroke: #13540c; }\\n\\n.statediagram-state .title-state {\\n rx: 5px;\\n ry: 5px; }\\n\\n.statediagram-cluster.statediagram-cluster .inner {\\n fill: white; }\\n\\n.statediagram-cluster.statediagram-cluster-alt .inner {\\n fill: #e0e0e0; }\\n\\n.statediagram-cluster .inner {\\n rx: 0;\\n ry: 0; }\\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: #efefef; }\\n\\n.note-edge {\\n stroke-dasharray: 5; }\\n\\n.statediagram-note rect {\\n fill: #fff5ad;\\n stroke: #6eaa49;\\n stroke-width: 1px;\\n rx: 0;\\n ry: 0; }\\n\\n:root {\\n --mermaid-font-family: '\\\"trebuchet ms\\\", verdana, arial';\\n --mermaid-font-family: \\\"Comic Sans MS\\\", \\\"Comic Sans\\\", cursive; }\\n\\n/* Classes common for multiple diagrams */\\n.error-icon {\\n fill: #552222; }\\n\\n.error-text {\\n fill: #552222;\\n stroke: #552222; }\\n\\n.edge-thickness-normal {\\n stroke-width: 2px; }\\n\\n.edge-thickness-thick {\\n stroke-width: 3.5px; }\\n\\n.edge-pattern-solid {\\n stroke-dasharray: 0; }\\n\\n.edge-pattern-dashed {\\n stroke-dasharray: 3; }\\n\\n.edge-pattern-dotted {\\n stroke-dasharray: 2; }\\n\\n.marker {\\n fill: green; }\\n\\n.marker.cross {\\n stroke: green; }\\n\", \"\"]);\n\n","exports = module.exports = require(\"../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"/* Flowchart variables */\\n/* Sequence Diagram variables */\\n/* Gantt chart variables */\\n/* state colors */\\n.label {\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family);\\n color: #333; }\\n\\n.label text {\\n fill: #333; }\\n\\n.node rect,\\n.node circle,\\n.node ellipse,\\n.node polygon,\\n.node path {\\n fill: #eee;\\n stroke: #999;\\n stroke-width: 1px; }\\n\\n.node .label {\\n text-align: center; }\\n\\n.node.clickable {\\n cursor: pointer; }\\n\\n.arrowheadPath {\\n fill: #333333; }\\n\\n.edgePath .path {\\n stroke: #666;\\n stroke-width: 1.5px; }\\n\\n.flowchart-link {\\n stroke: #666;\\n fill: none; }\\n\\n.edgeLabel {\\n background-color: white;\\n text-align: center; }\\n .edgeLabel rect {\\n opacity: 0.5; }\\n\\n.cluster rect {\\n fill: #eaf2fb;\\n stroke: #26a;\\n stroke-width: 1px; }\\n\\n.cluster text {\\n fill: #333; }\\n\\ndiv.mermaidTooltip {\\n position: absolute;\\n text-align: center;\\n max-width: 200px;\\n padding: 2px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family);\\n font-size: 12px;\\n background: #eaf2fb;\\n border: 1px solid #26a;\\n border-radius: 2px;\\n pointer-events: none;\\n z-index: 100; }\\n\\n.actor {\\n stroke: #999;\\n fill: #eee; }\\n\\ntext.actor > tspan {\\n fill: #333;\\n stroke: none; }\\n\\n.actor-line {\\n stroke: #666; }\\n\\n.messageLine0 {\\n stroke-width: 1.5;\\n stroke-dasharray: none;\\n stroke: #333; }\\n\\n.messageLine1 {\\n stroke-width: 1.5;\\n stroke-dasharray: 2, 2;\\n stroke: #333; }\\n\\n#arrowhead path {\\n fill: #333;\\n stroke: #333; }\\n\\n.sequenceNumber {\\n fill: white; }\\n\\n#sequencenumber {\\n fill: #333; }\\n\\n#crosshead path {\\n fill: #333;\\n stroke: #333; }\\n\\n.messageText {\\n fill: #333;\\n stroke: #333; }\\n\\n.labelBox {\\n stroke: #999;\\n fill: #eee; }\\n\\n.labelText, .labelText > tspan {\\n fill: #333;\\n stroke: none; }\\n\\n.loopText, .loopText > tspan {\\n fill: #333;\\n stroke: none; }\\n\\n.loopLine {\\n stroke-width: 2px;\\n stroke-dasharray: 2, 2;\\n stroke: #999;\\n fill: #999; }\\n\\n.note {\\n stroke: #777700;\\n fill: #ffa; }\\n\\n.noteText, .noteText > tspan {\\n fill: #333;\\n stroke: none; }\\n\\n.activation0 {\\n fill: #f4f4f4;\\n stroke: #666; }\\n\\n.activation1 {\\n fill: #f4f4f4;\\n stroke: #666; }\\n\\n.activation2 {\\n fill: #f4f4f4;\\n stroke: #666; }\\n\\n/** Section styling */\\n.mermaid-main-font {\\n font-family: \\\"trebuchet ms\\\", verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.section {\\n stroke: none;\\n opacity: 0.2; }\\n\\n.section0 {\\n fill: #80b3e6; }\\n\\n.section2 {\\n fill: #80b3e6; }\\n\\n.section1,\\n.section3 {\\n fill: white;\\n opacity: 0.2; }\\n\\n.sectionTitle0 {\\n fill: #333; }\\n\\n.sectionTitle1 {\\n fill: #333; }\\n\\n.sectionTitle2 {\\n fill: #333; }\\n\\n.sectionTitle3 {\\n fill: #333; }\\n\\n.sectionTitle {\\n text-anchor: start;\\n font-size: 11px;\\n text-height: 14px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n/* Grid and axis */\\n.grid .tick {\\n stroke: #e6e6e6;\\n opacity: 0.8;\\n shape-rendering: crispEdges; }\\n .grid .tick text {\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.grid path {\\n stroke-width: 0; }\\n\\n/* Today line */\\n.today {\\n fill: none;\\n stroke: #d42;\\n stroke-width: 2px; }\\n\\n/* Task styling */\\n/* Default task */\\n.task {\\n stroke-width: 2; }\\n\\n.taskText {\\n text-anchor: middle;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.taskText:not([font-size]) {\\n font-size: 11px; }\\n\\n.taskTextOutsideRight {\\n fill: #333;\\n text-anchor: start;\\n font-size: 11px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.taskTextOutsideLeft {\\n fill: #333;\\n text-anchor: end;\\n font-size: 11px; }\\n\\n/* Special case clickable */\\n.task.clickable {\\n cursor: pointer; }\\n\\n.taskText.clickable {\\n cursor: pointer;\\n fill: #003163 !important;\\n font-weight: bold; }\\n\\n.taskTextOutsideLeft.clickable {\\n cursor: pointer;\\n fill: #003163 !important;\\n font-weight: bold; }\\n\\n.taskTextOutsideRight.clickable {\\n cursor: pointer;\\n fill: #003163 !important;\\n font-weight: bold; }\\n\\n/* Specific task settings for the sections*/\\n.taskText0,\\n.taskText1,\\n.taskText2,\\n.taskText3 {\\n fill: white; }\\n\\n.task0,\\n.task1,\\n.task2,\\n.task3 {\\n fill: #26a;\\n stroke: #1a4d80; }\\n\\n.taskTextOutside0,\\n.taskTextOutside2 {\\n fill: #333; }\\n\\n.taskTextOutside1,\\n.taskTextOutside3 {\\n fill: #333; }\\n\\n/* Active task */\\n.active0,\\n.active1,\\n.active2,\\n.active3 {\\n fill: #eee;\\n stroke: #1a4d80; }\\n\\n.activeText0,\\n.activeText1,\\n.activeText2,\\n.activeText3 {\\n fill: #333 !important; }\\n\\n/* Completed task */\\n.done0,\\n.done1,\\n.done2,\\n.done3 {\\n stroke: #666;\\n fill: #bbb;\\n stroke-width: 2; }\\n\\n.doneText0,\\n.doneText1,\\n.doneText2,\\n.doneText3 {\\n fill: #333 !important; }\\n\\n/* Tasks on the critical line */\\n.crit0,\\n.crit1,\\n.crit2,\\n.crit3 {\\n stroke: #b1361b;\\n fill: #d42;\\n stroke-width: 2; }\\n\\n.activeCrit0,\\n.activeCrit1,\\n.activeCrit2,\\n.activeCrit3 {\\n stroke: #b1361b;\\n fill: #eee;\\n stroke-width: 2; }\\n\\n.doneCrit0,\\n.doneCrit1,\\n.doneCrit2,\\n.doneCrit3 {\\n stroke: #b1361b;\\n fill: #bbb;\\n stroke-width: 2;\\n cursor: pointer;\\n shape-rendering: crispEdges; }\\n\\n.milestone {\\n transform: rotate(45deg) scale(0.8, 0.8); }\\n\\n.milestoneText {\\n font-style: italic; }\\n\\n.doneCritText0,\\n.doneCritText1,\\n.doneCritText2,\\n.doneCritText3 {\\n fill: #333 !important; }\\n\\n.activeCritText0,\\n.activeCritText1,\\n.activeCritText2,\\n.activeCritText3 {\\n fill: #333 !important; }\\n\\n.titleText {\\n text-anchor: middle;\\n font-size: 18px;\\n fill: #333;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\ng.classGroup text {\\n fill: #999;\\n stroke: none;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family);\\n font-size: 10px; }\\n g.classGroup text .title {\\n font-weight: bolder; }\\n\\ng.clickable {\\n cursor: pointer; }\\n\\ng.classGroup rect {\\n fill: #eee;\\n stroke: #999; }\\n\\ng.classGroup line {\\n stroke: #999;\\n stroke-width: 1; }\\n\\n.classLabel .box {\\n stroke: none;\\n stroke-width: 0;\\n fill: #eee;\\n opacity: 0.5; }\\n\\n.classLabel .label {\\n fill: #999;\\n font-size: 10px; }\\n\\n.relation {\\n stroke: #999;\\n stroke-width: 1;\\n fill: none; }\\n\\n.dashed-line {\\n stroke-dasharray: 3; }\\n\\n#compositionStart {\\n fill: #999;\\n stroke: #999;\\n stroke-width: 1; }\\n\\n#compositionEnd {\\n fill: #999;\\n stroke: #999;\\n stroke-width: 1; }\\n\\n#aggregationStart {\\n fill: #eee;\\n stroke: #999;\\n stroke-width: 1; }\\n\\n#aggregationEnd {\\n fill: #eee;\\n stroke: #999;\\n stroke-width: 1; }\\n\\n#dependencyStart {\\n fill: #999;\\n stroke: #999;\\n stroke-width: 1; }\\n\\n#dependencyEnd {\\n fill: #999;\\n stroke: #999;\\n stroke-width: 1; }\\n\\n#extensionStart {\\n fill: #999;\\n stroke: #999;\\n stroke-width: 1; }\\n\\n#extensionEnd {\\n fill: #999;\\n stroke: #999;\\n stroke-width: 1; }\\n\\n.commit-id,\\n.commit-msg,\\n.branch-label {\\n fill: lightgrey;\\n color: lightgrey;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.pieTitleText {\\n text-anchor: middle;\\n font-size: 25px;\\n fill: #333;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.slice {\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\ng.stateGroup text {\\n fill: #999;\\n stroke: none;\\n font-size: 10px;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\ng.stateGroup text {\\n fill: #999;\\n stroke: none;\\n font-size: 10px; }\\n\\ng.stateGroup .state-title {\\n font-weight: bolder;\\n fill: black; }\\n\\ng.stateGroup rect {\\n fill: #eee;\\n stroke: #999; }\\n\\ng.stateGroup line {\\n stroke: #999;\\n stroke-width: 1; }\\n\\n.transition {\\n stroke: #999;\\n stroke-width: 1;\\n fill: none; }\\n\\n.stateGroup .composit {\\n fill: white;\\n border-bottom: 1px; }\\n\\n.stateGroup .alt-composit {\\n fill: #e0e0e0;\\n border-bottom: 1px; }\\n\\n.state-note {\\n stroke: #777700;\\n fill: #ffa; }\\n .state-note text {\\n fill: black;\\n stroke: none;\\n font-size: 10px; }\\n\\n.stateLabel .box {\\n stroke: none;\\n stroke-width: 0;\\n fill: #eee;\\n opacity: 0.5; }\\n\\n.stateLabel text {\\n fill: black;\\n font-size: 10px;\\n font-weight: bold;\\n font-family: 'trebuchet ms', verdana, arial;\\n font-family: var(--mermaid-font-family); }\\n\\n.node circle.state-start {\\n fill: black;\\n stroke: black; }\\n\\n.node circle.state-end {\\n fill: black;\\n stroke: white;\\n stroke-width: 1.5; }\\n\\n#statediagram-barbEnd {\\n fill: #999; }\\n\\n.statediagram-cluster rect {\\n fill: #eee;\\n stroke: #999;\\n stroke-width: 1px; }\\n\\n.statediagram-cluster rect.outer {\\n rx: 5px;\\n ry: 5px; }\\n\\n.statediagram-state .divider {\\n stroke: #999; }\\n\\n.statediagram-state .title-state {\\n rx: 5px;\\n ry: 5px; }\\n\\n.statediagram-cluster.statediagram-cluster .inner {\\n fill: white; }\\n\\n.statediagram-cluster.statediagram-cluster-alt .inner {\\n fill: #e0e0e0; }\\n\\n.statediagram-cluster .inner {\\n rx: 0;\\n ry: 0; }\\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: #efefef; }\\n\\n.note-edge {\\n stroke-dasharray: 5; }\\n\\n.statediagram-note rect {\\n fill: #ffa;\\n stroke: #777700;\\n stroke-width: 1px;\\n rx: 0;\\n ry: 0; }\\n\\n:root {\\n --mermaid-font-family: '\\\"trebuchet ms\\\", verdana, arial';\\n --mermaid-font-family: \\\"Comic Sans MS\\\", \\\"Comic Sans\\\", cursive; }\\n\\n/* Classes common for multiple diagrams */\\n.error-icon {\\n fill: #552222; }\\n\\n.error-text {\\n fill: #552222;\\n stroke: #552222; }\\n\\n.edge-thickness-normal {\\n stroke-width: 2px; }\\n\\n.edge-thickness-thick {\\n stroke-width: 3.5px; }\\n\\n.edge-pattern-solid {\\n stroke-dasharray: 0; }\\n\\n.edge-pattern-dashed {\\n stroke-dasharray: 3; }\\n\\n.edge-pattern-dotted {\\n stroke-dasharray: 2; }\\n\\n.marker {\\n fill: #666; }\\n\\n.marker.cross {\\n stroke: #666; }\\n\", \"\"]);\n\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return '@media ' + item[2] + '{' + content + '}';\n } else {\n return content;\n }\n }).join('');\n }; // import a list of modules into the list\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n for (var i = 0; i < this.length; i++) {\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n\n for (i = 0; i < modules.length; i++) {\n var item = modules[i]; // skip already imported module\n // this implementation is not 100% perfect for weird media query combinations\n // when a module is imported multiple times with different media queries.\n // I hope this will never occur (Hey this way we have smaller bundles)\n\n if (item[0] == null || !alreadyImportedModules[item[0]]) {\n if (mediaQuery && !item[2]) {\n item[2] = mediaQuery;\n } else if (mediaQuery) {\n item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';\n }\n\n list.push(item);\n }\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || '';\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n return '/*# ' + data + ' */';\n}","// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,\n// backported and transplited with Babel, with backwards-compat fixes\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function (path) {\n if (typeof path !== 'string') path = path + '';\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) {\n // return '//';\n // Backwards-compat fix:\n return '/';\n }\n return path.slice(0, end);\n};\n\nfunction basename(path) {\n if (typeof path !== 'string') path = path + '';\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n}\n\n// Uses a mixed approach for backwards-compatibility, as ext behavior changed\n// in new Node.js versions, so only basename() above is backported here\nexports.basename = function (path, ext) {\n var f = basename(path);\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\nexports.extname = function (path) {\n if (typeof path !== 'string') path = path + '';\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","import { assignWithDepth } from './utils';\nimport { logger } from './logger';\n\n/**\n * **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more[[click here](8.6.0_docs.md)].**\n *\n * ## **What follows are config instructions for older versions**\n * These are the default options which can be overridden with the initialization call like so:\n * **Example 1:**\n *
\n * mermaid.initialize({\n * flowchart:{\n * htmlLabels: false\n * }\n * });\n *\n *\n * **Example 2:**\n *
\n * <script>\n * var config = {\n * startOnLoad:true,\n * flowchart:{\n * useMaxWidth:true,\n * htmlLabels:true,\n * curve:'cardinal',\n * },\n *\n * securityLevel:'loose',\n * };\n * mermaid.initialize(config);\n * </script>\n *\n * A summary of all options and their defaults is found [here](#mermaidapi-configuration-defaults). A description of each option follows below.\n *\n * @name Configuration\n */\nconst config = {\n /** theme , the CSS style sheet\n *\n * theme , the CSS style sheet\n *\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| Theme |Built in Themes| String | Optional | Values include, default, forest, dark, neutral, null|\n *\n ***Notes:**To disable any pre-defined mermaid theme, use \"null\".\n *
\n * \"theme\": \"forest\",\n * \"themeCSS\": \".node rect { fill: red; }\"\n *\n */\n theme: 'default',\n themeCSS: undefined,\n /* **maxTextSize** - The maximum allowed size of the users text diamgram */\n maxTextSize: 50000,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *|fontFamily | specifies the font to be used in the rendered diagrams| String | Required | Verdana, Arial, Trebuchet MS,|\n *\n ***notes: Default value is \\\\\"trebuchet ms\\\\\".\n */\n fontFamily: '\"trebuchet ms\", verdana, arial;',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| logLevel |This option decides the amount of logging to be used.| String | Required | 1, 2, 3, 4, 5 |\n *\n *\n ***Notes:**\n *- debug: 1.\n *- info: 2.\n *- warn: 3.\n *- error: 4.\n *- fatal: 5(default).\n */\n logLevel: 5,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| securitylevel | Level of trust for parsed diagram|String | Required | Strict, Loose |\n *\n ***Notes:\n *- **strict**: (**default**) tags in text are encoded, click functionality is disabeled\n *- **loose**: tags in text are allowed, click functionality is enabled\n */\n securityLevel: 'strict',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| startOnLoad| Dictates whether mermaind starts on Page load | Boolean | Required | True, False |\n *\n ***Notes:**\n ***Default value: true**\n */\n startOnLoad: true,\n\n /**\n *| Parameter | Description |Type | Required |Values|\n *| --- | --- | --- | --- | --- |\n *| arrowMarkerAbsolute | Controls whether or arrow markers in html code are absolute paths or anchors | Boolean | Required | True, False |\n *\n *\n *## Notes**: This matters if you are using base tag settings.\n ***Default value: false**.\n */\n arrowMarkerAbsolute: false,\n\n /**\n * This option controls which currentConfig keys are considered _secure_ and can only be changed via\n * call to mermaidAPI.initialize. Calls to mermaidAPI.reinitialize cannot make changes to\n * the `secure` keys in the current currentConfig. This prevents malicious graph directives from\n * overriding a site's default security.\n */\n secure: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'],\n\n /**\n * The object containing configurations specific for flowcharts\n */\n flowchart: {\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| htmlLabels | Flag for setting whether or not a html tag should be used for rendering labels on the edges. | Boolean| Required | True, False|\n *\n ***Notes: Default value: true**.\n */\n htmlLabels: true,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| nodeSpacing | Defines the spacing between nodes on the same level | Integer| Required | Any positive Numbers |\n *\n ***Notes:\n *Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, and the vertical spacing for LR as well as RL graphs.**\n ***Default value 50**.\n */\n nodeSpacing: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| rankSpacing | Defines the spacing between nodes on different levels | Integer | Required| Any Positive Numbers |\n *\n ***Notes: pertains to vertical spacing for TB (top to bottom) or BT (bottom to top), and the horizontal spacing for LR as well as RL graphs.\n ***Default value 50**.\n */\n rankSpacing: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| curve | Defines how mermaid renders curves for flowcharts. | String | Required | Basis, Linear, Cardinal|\n *\n ***Notes:\n *Default Vaue: Linear**\n */\n curve: 'linear',\n // Only used in new experimental rendering\n // repreesents the padding between the labels and the shape\n padding: 15\n },\n\n /**\n * The object containing configurations specific for sequence diagrams\n */\n sequence: {\n /**\n * widt of the activation rect\n * **Default value 10**.\n */\n activationWidth: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramMarginX | margin to the right and left of the sequence diagram | Integer | Required | Any Positive Values |\n *\n ***Notes:**\n ***Default value 50**.\n */\n diagramMarginX: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramMarginY | Margin to the over and under the sequence diagram | Integer | Required | Any Positive Values|\n *\n ***Notes:**\n ***Default value 10**.\n */\n diagramMarginY: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| actorMargin | Margin between actors. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 50**.\n */\n actorMargin: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| width | Width of actor boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 150**.\n */\n width: 150,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| height | Height of actor boxes | Integer | Required | Any Positive Value|\n *\n ***Notes:**\n ***Default value 65**..\n */\n height: 65,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n *\n ***Default value 10**.\n */\n boxMargin: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| boxTextMargin| margin around the text in loop/alt/opt boxes | Integer | Required| Any Positive Value|\n *\n ***Notes:**\n *\n ***Default value 5**.\n */\n boxTextMargin: 5,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteMargin | margin around notes. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n *\n ***Default value 10**.\n */\n noteMargin: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageMargin | Space between messages. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n *\n *Space between messages.\n ***Default value 35**.\n */\n messageMargin: 35,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageAlign | Multiline message alignment | Integer | Required | left, center, right |\n *\n ***Notes:**center **default**\n */\n messageAlign: 'center',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| mirrorActors | mirror actors under diagram. | Boolean| Required | True, False |\n *\n ***Notes:**\n *\n ***Default value true**.\n */\n mirrorActors: true,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| bottomMarginAdj | Prolongs the edge of the diagram downwards. | Integer | Required | Any Positive Value |\n *\n ***Notes:**Depending on css styling this might need adjustment.\n ***Default value 1**.\n */\n bottomMarginAdj: 1,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See Notes | Boolean | Required | True, False |\n *\n ***Notes:**\n *when this flag is set to true, the height and width is set to 100% and is then scaling with the\n *available space. If set to false, the absolute space required is used.\n ***Default value: True**.\n */\n useMaxWidth: true,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| rightAngles | display curve arrows as right angles| Boolean | Required | True, False |\n *\n ***Notes:**\n *\n *This will display arrows that start and begin at the same node as right angles, rather than a curve\n ***Default value false**.\n */\n rightAngles: false,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| showSequenceNumbers | This will show the node numbers | Boolean | Required | True, False |\n *\n ***Notes:**\n ***Default value false**.\n */\n showSequenceNumbers: false,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| actorFontSize| This sets the font size of the actor's description | Integer | Require | Any Positive Value |\n *\n ***Notes:**\n ***Default value 14**..\n */\n actorFontSize: 14,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| actorFontFamily |This sets the font family of the actor's description | 3 | 4 | Open-Sans, Sans-Serif |\n *\n ***Notes:**\n ***Default value \"Open-Sans\", \"sans-serif\"**.\n */\n actorFontFamily: '\"Open-Sans\", \"sans-serif\"',\n /**\n * This sets the font weight of the actor's description\n * **Default value 400.\n */\n actorFontWeight: 400,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteFontSize |This sets the font size of actor-attached notes. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 14**..\n */\n noteFontSize: 14,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteFontFamily| This sets the font family of actor-attached notes. | String | Required | trebuchet ms, verdana, arial |\n *\n ***Notes:**\n ***Default value: trebuchet ms **.\n */\n noteFontFamily: '\"trebuchet ms\", verdana, arial',\n /**\n * This sets the font weight of the note's description\n * **Default value 400.\n */\n noteFontWeight: 400,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteAlign | This sets the text alignment of actor-attached notes. | string | required | left, center, right|\n *\n ***Notes:**\n ***Default value center**.\n */\n noteAlign: 'center',\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageFontSize | This sets the font size of actor messages. | Integer | Required | Any Positive Number |\n *\n ***Notes:**\n ***Default value 16**.\n */\n messageFontSize: 16,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageFontFamily | This sets the font family of actor messages. | String| Required | trebuchet ms\", verdana, aria |\n *\n ***Notes:**\n ***Default value:\"trebuchet ms**.\n */\n messageFontFamily: '\"trebuchet ms\", verdana, arial',\n /**\n * This sets the font weight of the message's description\n * **Default value 400.\n */\n messageFontWeight: 400,\n /**\n * This sets the auto-wrap state for the diagram\n * **Default value false.\n */\n wrap: false,\n /**\n * This sets the auto-wrap padding for the diagram (sides only)\n * **Default value 10.\n */\n wrapPadding: 10,\n /**\n * This sets the width of the loop-box (loop, alt, opt, par)\n * **Default value 50.\n */\n labelBoxWidth: 50,\n /**\n * This sets the height of the loop-box (loop, alt, opt, par)\n * **Default value 20.\n */\n labelBoxHeight: 20,\n messageFont: function() {\n return {\n fontFamily: this.messageFontFamily,\n fontSize: this.messageFontSize,\n fontWeight: this.messageFontWeight\n };\n },\n noteFont: function() {\n return {\n fontFamily: this.noteFontFamily,\n fontSize: this.noteFontSize,\n fontWeight: this.noteFontWeight\n };\n },\n actorFont: function() {\n return {\n fontFamily: this.actorFontFamily,\n fontSize: this.actorFontSize,\n fontWeight: this.actorFontWeight\n };\n }\n },\n\n /**\n * The object containing configurations specific for gantt diagrams*\n */\n gantt: {\n /**\n *### titleTopMargin\n *\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| titleTopMargin | Margin top for the text over the gantt diagram | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 25**.\n */\n titleTopMargin: 25,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| barHeight | The height of the bars in the graph | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 20**.\n */\n barHeight: 20,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| barGap | The margin between the different activities in the gantt diagram. | Integer | Optional |Any Positive Value |\n *\n ***Notes:**\n ***Default value 4**.\n */\n barGap: 4,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| topPadding | Margin between title and gantt diagram and between axis and gantt diagram. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 50**.\n */\n topPadding: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| leftPadding | The space allocated for the section name to the left of the activities. | Integer| Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 75**.\n */\n leftPadding: 75,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| gridLineStartPadding | Vertical starting position of the grid lines. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 35**.\n */\n gridLineStartPadding: 35,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| fontSize | Font size| Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 11**.\n */\n fontSize: 11,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| fontFamily | font Family | string | required |\"Open-Sans\", \"sans-serif\" |\n *\n ***Notes:**\n *\n ***Default value '\"Open-Sans\", \"sans-serif\"'**.\n */\n fontFamily: '\"Open-Sans\", \"sans-serif\"',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| numberSectionStyles | The number of alternating section styles | Integer | 4 | Any Positive Value |\n *\n ***Notes:**\n ***Default value 4**.\n */\n numberSectionStyles: 4,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| axisFormat | Datetime format of the axis. | 3 | Required | Date in yy-mm-dd |\n *\n ***Notes:**\n *\n * This might need adjustment to match your locale and preferences\n ***Default value '%Y-%m-%d'**.\n */\n axisFormat: '%Y-%m-%d'\n },\n /**\n * The object containing configurations specific for sequence diagrams\n */\n journey: {\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramMarginX | margin to the right and left of the sequence diagram | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 50**.\n */\n diagramMarginX: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramMarginY | margin to the over and under the sequence diagram. | Integer | Required | Any Positive Value|\n *\n ***Notes:**\n ***Default value 10**..\n */\n diagramMarginY: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| actorMargin | Margin between actors. | Integer | Required | Any Positive Value|\n *\n ***Notes:**\n ***Default value 50**.\n */\n actorMargin: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| width | Width of actor boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 150**.\n */\n width: 150,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| height | Height of actor boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 65**.\n */\n height: 65,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 10**.\n */\n boxMargin: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| boxTextMargin | margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n */\n boxTextMargin: 5,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteMargin | margin around notes. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 10**.\n */\n noteMargin: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageMargin |Space between messages. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n *\n *Space between messages.\n ***Default value 35**.\n */\n messageMargin: 35,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageAlign |Multiline message alignment | 3 | 4 | left, center, right |\n *\n ***Notes:**default:center**\n */\n messageAlign: 'center',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| bottomMarginAdj | Prolongs the edge of the diagram downwards. | Integer | 4 | Any Positive Value |\n *\n ***Notes:**Depending on css styling this might need adjustment.\n ***Default value 1**.\n */\n bottomMarginAdj: 1,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See notes | Boolean | 4 | True, False |\n *\n ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the\n *available space if not the absolute space required is used.\n *\n ***Default value true**.\n */\n useMaxWidth: true,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| rightAngles | Curved Arrows become Right Angles, | 3 | 4 | True, False |\n *\n ***Notes:**This will display arrows that start and begin at the same node as right angles, rather than a curves\n ***Default value false**.\n */\n rightAngles: false\n },\n class: {\n arrowMarkerAbsolute: false\n },\n git: {\n arrowMarkerAbsolute: false\n },\n state: {\n dividerMargin: 10,\n sizeUnit: 5,\n padding: 8,\n textHeight: 10,\n titleShift: -15,\n noteMargin: 10,\n forkWidth: 70,\n forkHeight: 7,\n // Used\n miniPadding: 2,\n // Font size factor, this is used to guess the width of the edges labels before rendering by dagre\n // layout. This might need updating if/when switching font\n fontSizeFactor: 5.02,\n fontSize: 24,\n labelHeight: 16,\n edgeLengthFactor: '20',\n compositTitleSize: 35,\n radius: 5\n },\n\n /**\n * The object containing configurations specific for entity relationship diagrams\n */\n er: {\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramPadding | amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |\n *\n ***Notes:**The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels\n ***Default value: 20**.\n */\n diagramPadding: 20,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| layoutDirection | Directional bias for layout of entities. | String | Required | \"TB\", \"BT\",\"LR\",\"RL\" |\n *\n ***Notes:**\n *'TB' for Top-Bottom, 'BT'for Bottom-Top, 'LR' for Left-Right, or 'RL' for Right to Left.\n * T = top, B = bottom, L = left, and R = right.\n ***Default value: TB **.\n */\n layoutDirection: 'TB',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| minEntityWidth | The mimimum width of an entity box, | Integer | Required| Any Positive Value |\n *\n ***Notes:**expressed in pixels\n ***Default value: 100**.\n */\n minEntityWidth: 100,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| minEntityHeight| The minimum height of an entity box, | Integer | 4 | Any Positive Value |\n *\n ***Notes:**expressed in pixels\n ***Default value: 75 **\n */\n minEntityHeight: 75,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| entityPadding|minimum internal padding betweentext in box and box borders| Integer | 4 | Any Positive Value |\n *\n ***Notes:**The minimum internal padding betweentext in an entity box and the enclosing box borders, expressed in pixels.\n ***Default value: 15 **\n */\n entityPadding: 15,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| stroke | Stroke color of box edges and lines | String | 4 | Any recognized color |\n ***Default value: gray **\n */\n stroke: 'gray',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| fill | Fill color of entity boxes | String | 4 | Any recognized color |\n *\n ***Notes:**\n ***Default value:'honeydew'**\n */\n fill: 'honeydew',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| fontSize| Font Size in pixels| Integer | | Any Positive Value |\n *\n ***Notes:**Font size (expressed as an integer representing a number of pixels)\n ***Default value: 12 **\n */\n fontSize: 12\n }\n};\nconfig.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;\nconfig.git.arrowMarkerAbsolute = config.arrowMarkerAbsolute;\nexport const defaultConfig = Object.freeze(config);\n\nconst siteConfig = assignWithDepth({}, defaultConfig);\nconst currentConfig = assignWithDepth({}, defaultConfig);\n\n/**\n *## setSiteConfig\n \n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array|\n \n ***Notes:**\n *Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset\n *the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig\n *to the defaultConfig\n *Note: currentConfig is set in this function\n \n **Default value: At default, will mirror Global Config**\n * @param conf - the base currentConfig to use as siteConfig\n * @returns {*} - the siteConfig\n */\nexport const setSiteConfig = conf => {\n assignWithDepth(currentConfig, conf, { clobber: true });\n assignWithDepth(siteConfig, conf);\n return getSiteConfig();\n};\n/**\n *## getSiteConfig\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig|\n \n ***Notes**:\n *Returns **any** values in siteConfig.\n * @returns {*}\n */\nexport const getSiteConfig = () => {\n return assignWithDepth({}, siteConfig);\n};\n/**\n *## setConfig\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Sets the siteConfig to desired values | Put Request| Any Values, except ones in secure array|\n \n \n ***Notes**:\n *Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure keys. Any\n *values found in conf with key found in siteConfig.secure will be replaced with the corresponding\n *siteConfig value.\n * @param conf - the potential currentConfig\n * @returns {*} - the currentConfig merged with the sanitized conf\n */\nexport const setConfig = conf => {\n sanitize(conf);\n assignWithDepth(currentConfig, conf);\n return getConfig();\n};\n/**\n * ## getConfig\n *| Function | Description | Type | Return Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| getConfig |Obtains the currentConfig | Get Request | Any Values from currentConfig|\n \n ***Notes**:\n *Returns **any** the currentConfig\n * @returns {*} - the currentConfig\n */\nexport const getConfig = () => {\n return assignWithDepth({}, currentConfig);\n};\n/**\n *## sanitize\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| sanitize |Sets the siteConfig to desired values. | Put Request |None|\n \n *Ensures options parameter does not attempt to override siteConfig secure keys\n *Note: modifies options in-place\n * @param options - the potential setConfig parameter\n */\nexport const sanitize = options => {\n Object.keys(siteConfig.secure).forEach(key => {\n if (typeof options[siteConfig.secure[key]] !== 'undefined') {\n // DO NOT attempt to print options[siteConfig.secure[key]] within `${}` as a malicious script\n // can exploit the logger's attempt to stringify the value and execute arbitrary code\n logger.warn(\n `Denied attempt to modify a secure key ${siteConfig.secure[key]}`,\n options[siteConfig.secure[key]]\n );\n delete options[siteConfig.secure[key]];\n }\n });\n};\n/**\n *## reset\n \n *| Function | Description | Type | Required | Values |\n *| --------- | ------------------- | ------- | -------- | ------------------ |\n *| reset|Resets currentConfig to conf| Put Request | Required | None|\n *\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| conf| base set of values, which currentConfig coul be **reset** to.| Dictionary | Required | Any Values, with respect to the secure Array|\n *\n **Notes :\n (default: current siteConfig ) (optional, default `getSiteConfig()`)\n * @param conf - the base currentConfig to reset to (default: current siteConfig )\n */\nexport const reset = (conf = getSiteConfig()) => {\n Object.keys(siteConfig).forEach(key => delete siteConfig[key]);\n Object.keys(currentConfig).forEach(key => delete currentConfig[key]);\n assignWithDepth(siteConfig, conf, { clobber: true });\n assignWithDepth(currentConfig, conf, { clobber: true });\n};\n\nconst configApi = Object.freeze({\n sanitize,\n setSiteConfig,\n getSiteConfig,\n setConfig,\n getConfig,\n reset,\n defaultConfig\n});\nexport default configApi;\n","import intersectRect from './intersect/intersect-rect';\nimport { logger as log } from '../logger'; // eslint-disable-line\nimport createLabel from './createLabel';\nimport { select } from 'd3';\nimport { getConfig } from '../config';\n\nconst rect = (parent, node) => {\n log.trace('Creating subgraph rect for ', node.id, node);\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'cluster')\n .attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n\n const text = label\n .node()\n .appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (getConfig().flowchart.htmlLabels) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n log.trace('Data ', node, JSON.stringify(node));\n // center the rect around its coordinate\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding);\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' +\n (node.x - bbox.width / 2) +\n ', ' +\n (node.y - node.height / 2 - node.padding / 3 + 3) +\n ')'\n );\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function(point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\n/**\n * Non visiable cluster where the note is group with its\n */\nconst noteGroup = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'note-cluster')\n .attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding)\n .attr('fill', 'none');\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function(point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\nconst roundedWithTitle = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', node.classes)\n .attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n const innerRect = shapeSvg.append('rect');\n\n const text = label\n .node()\n .appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n if (getConfig().flowchart.htmlLabels) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n bbox = text.getBBox();\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('class', 'outer')\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding);\n innerRect\n .attr('class', 'inner')\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding - bbox.height - 3);\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' +\n (node.x - bbox.width / 2) +\n ', ' +\n (node.y - node.height / 2 - node.padding / 3 + (getConfig().flowchart.htmlLabels ? 5 : 3)) +\n ')'\n );\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function(point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst divider = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', node.classes)\n .attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('class', 'divider')\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding);\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function(point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst shapes = { rect, roundedWithTitle, noteGroup, divider };\n\nlet clusterElems = {};\n\nexport const insertCluster = (elem, node) => {\n log.trace('Inserting cluster');\n const shape = node.shape || 'rect';\n clusterElems[node.id] = shapes[shape](elem, node);\n};\nexport const getClusterTitleWidth = (elem, node) => {\n const label = createLabel(node.labelText, node.labelStyle, undefined, true);\n elem.node().appendChild(label);\n const width = label.getBBox().width;\n elem.node().removeChild(label);\n return width;\n};\n\nexport const clear = () => {\n clusterElems = {};\n};\n\nexport const positionCluster = node => {\n log.info('Position cluster');\n const el = clusterElems[node.id];\n\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n};\n","import { select } from 'd3';\nimport { logger } from '../logger'; // eslint-disable-line\n// let vertexNode;\n// if (getConfig().flowchart.htmlLabels) {\n// // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n// const node = {\n// label: vertexText.replace(/fa[lrsb]?:fa-[\\w-]+/g, s => ``)\n// };\n// vertexNode = addHtmlLabel(svg, node).node();\n// vertexNode.parentNode.removeChild(vertexNode);\n// } else {\n// const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n// svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n\n// const rows = vertexText.split(common.lineBreakRegex);\n\n// for (let j = 0; j < rows.length; j++) {\n// const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n// tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n// tspan.setAttribute('dy', '1em');\n// tspan.setAttribute('x', '1');\n// tspan.textContent = rows[j];\n// svgLabel.appendChild(tspan);\n// }\n// vertexNode = svgLabel;\n// }\nimport { getConfig } from '../config';\n\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr('style', styleFn);\n }\n}\n\nfunction addHtmlLabel(node) {\n // var fo = root.append('foreignObject').attr('width', '100000');\n\n // var div = fo.append('xhtml:div');\n // div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n\n // var label = node.label;\n // switch (typeof label) {\n // case 'function':\n // div.insert(label);\n // break;\n // case 'object':\n // // Currently we assume this is a DOM object.\n // div.insert(function() {\n // return label;\n // });\n // break;\n // default:\n // div.html(label);\n // }\n\n // applyStyle(div, node.labelStyle);\n // div.style('display', 'inline-block');\n // // Fix for firefox\n // div.style('white-space', 'nowrap');\n\n // var client = div.node().getBoundingClientRect();\n // fo.attr('width', client.width).attr('height', client.height);\n const fo = select(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject'));\n const div = fo.append('xhtml:div');\n\n const label = node.label;\n const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n div.html('' + label + '');\n\n applyStyle(div, node.labelStyle);\n div.style('display', 'inline-block');\n // Fix for firefox\n div.style('white-space', 'nowrap');\n div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n return fo.node();\n}\n\nconst createLabel = (_vertexText, style, isTitle, isNode) => {\n let vertexText = _vertexText || '';\n if (getConfig().flowchart.htmlLabels) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n vertexText = vertexText.replace(/\\\\n|\\n/g, '
\n *\n * <script>\n * var config = {\n * theme:'default',\n * logLevel:'fatal',\n * securityLevel:'strict',\n * startOnLoad:true,\n * arrowMarkerAbsolute:false,\n *\n * flowchart:{\n * htmlLabels:true,\n * curve:'linear',\n * },\n * sequence:{\n * diagramMarginX:50,\n * diagramMarginY:10,\n * actorMargin:50,\n * width:150,\n * height:65,\n * boxMargin:10,\n * boxTextMargin:5,\n * noteMargin:10,\n * messageMargin:35,\n * messageAlign:'center',\n * mirrorActors:true,\n * bottomMarginAdj:1,\n * useMaxWidth:true,\n * rightAngles:false,\n * showSequenceNumbers:false,\n * },\n * gantt:{\n * titleTopMargin:25,\n * barHeight:20,\n * barGap:4,\n * topPadding:50,\n * leftPadding:75,\n * gridLineStartPadding:35,\n * fontSize:11,\n * fontFamily:'\"Open-Sans\", \"sans-serif\"',\n * numberSectionStyles:4,\n * axisFormat:'%Y-%m-%d',\n * }\n * };\n * mermaid.initialize(config);\n * </script>\n *\n */\n","var map = {\n\t\"./dark/index.scss\": \"./src/themes/dark/index.scss\",\n\t\"./default/index.scss\": \"./src/themes/default/index.scss\",\n\t\"./forest/index.scss\": \"./src/themes/forest/index.scss\",\n\t\"./neutral/index.scss\": \"./src/themes/neutral/index.scss\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./src/themes sync recursive ^\\\\.\\\\/.*\\\\/index\\\\.scss$\";","// css-to-string-loader: transforms styles from css-loader to a string output\n\n// Get the styles\nvar styles = require(\"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./index.scss\");\n\nif (typeof styles === 'string') {\n // Return an existing string\n module.exports = styles;\n} else {\n // Call the custom toString method from css-loader module\n module.exports = styles.toString();\n}","// css-to-string-loader: transforms styles from css-loader to a string output\n\n// Get the styles\nvar styles = require(\"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./index.scss\");\n\nif (typeof styles === 'string') {\n // Return an existing string\n module.exports = styles;\n} else {\n // Call the custom toString method from css-loader module\n module.exports = styles.toString();\n}","// css-to-string-loader: transforms styles from css-loader to a string output\n\n// Get the styles\nvar styles = require(\"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./index.scss\");\n\nif (typeof styles === 'string') {\n // Return an existing string\n module.exports = styles;\n} else {\n // Call the custom toString method from css-loader module\n module.exports = styles.toString();\n}","// css-to-string-loader: transforms styles from css-loader to a string output\n\n// Get the styles\nvar styles = require(\"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./index.scss\");\n\nif (typeof styles === 'string') {\n // Return an existing string\n module.exports = styles;\n} else {\n // Call the custom toString method from css-loader module\n module.exports = styles.toString();\n}","import {\n curveBasis,\n curveBasisClosed,\n curveBasisOpen,\n curveLinear,\n curveLinearClosed,\n curveMonotoneX,\n curveMonotoneY,\n curveNatural,\n curveStep,\n curveStepAfter,\n curveStepBefore,\n select\n} from 'd3';\nimport { logger } from './logger';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\nimport common from './diagrams/common/common';\nimport cryptoRandomString from 'crypto-random-string';\n\n// Effectively an enum of the supported curve types, accessible by name\nconst d3CurveTypes = {\n curveBasis: curveBasis,\n curveBasisClosed: curveBasisClosed,\n curveBasisOpen: curveBasisOpen,\n curveLinear: curveLinear,\n curveLinearClosed: curveLinearClosed,\n curveMonotoneX: curveMonotoneX,\n curveMonotoneY: curveMonotoneY,\n curveNatural: curveNatural,\n curveStep: curveStep,\n curveStepAfter: curveStepAfter,\n curveStepBefore: curveStepBefore\n};\nconst directive = /[%]{2}[{]\\s*(?:(?:(\\w+)\\s*:|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi;\nconst directiveWithoutOpen = /\\s*(?:(?:(\\w+)(?=:):|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi;\nconst anyComment = /\\s*%%.*\\n/gm;\n\n/**\n * @function detectInit\n * Detects the init config object from the text\n * ```mermaid\n * %%{init: {\"theme\": \"debug\", \"logLevel\": 1 }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n * or\n * ```mermaid\n * %%{initialize: {\"theme\": \"dark\", logLevel: \"debug\" }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @returns {object} the json object representing the init passed to mermaid.initialize()\n */\nexport const detectInit = function(text) {\n let inits = detectDirective(text, /(?:init\\b)|(?:initialize\\b)/);\n let results = {};\n if (Array.isArray(inits)) {\n let args = inits.map(init => init.args);\n results = assignWithDepth(results, [...args]);\n } else {\n results = inits.args;\n }\n if (results) {\n let type = detectType(text);\n ['config'].forEach(prop => {\n if (typeof results[prop] !== 'undefined') {\n if (type === 'flowchart-v2') {\n type = 'flowchart';\n }\n results[type] = results[prop];\n delete results[prop];\n }\n });\n }\n return results;\n};\n\n/**\n * @function detectDirective\n * Detects the directive from the text. Text can be single line or multiline. If type is null or omitted\n * the first directive encountered in text will be returned\n * ```mermaid\n * graph LR\n * %%{somedirective}%%\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @param {string|RegExp} type The directive to return (default: null)\n * @returns {object | Array} An object or Array representing the directive(s): { type: string, args: object|null } matched by the input type\n * if a single directive was found, that directive object will be returned.\n */\nexport const detectDirective = function(text, type = null) {\n try {\n const commentWithoutDirectives = new RegExp(\n `[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*\\n`,\n 'ig'\n );\n text = text\n .trim()\n .replace(commentWithoutDirectives, '')\n .replace(/'/gm, '\"');\n logger.debug(\n `Detecting diagram directive${type !== null ? ' type:' + type : ''} based on the text:${text}`\n );\n let match,\n result = [];\n while ((match = directive.exec(text)) !== null) {\n // This is necessary to avoid infinite loops with zero-width matches\n if (match.index === directive.lastIndex) {\n directive.lastIndex++;\n }\n if (\n (match && !type) ||\n (type && match[1] && match[1].match(type)) ||\n (type && match[2] && match[2].match(type))\n ) {\n let type = match[1] ? match[1] : match[2];\n let args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null;\n result.push({ type, args });\n }\n }\n if (result.length === 0) {\n result.push({ type: text, args: null });\n }\n\n return result.length === 1 ? result[0] : result;\n } catch (error) {\n logger.error(\n `ERROR: ${error.message} - Unable to parse directive${\n type !== null ? ' type:' + type : ''\n } based on the text:${text}`\n );\n return { type: null, args: null };\n }\n};\n\n/**\n * @function detectType\n * Detects the type of the graph text. Takes into consideration the possible existence of an %%init\n * directive\n * ```mermaid\n * %%{initialize: {\"startOnLoad\": true, logLevel: \"fatal\" }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @returns {string} A graph definition key\n */\nexport const detectType = function(text) {\n text = text.replace(directive, '').replace(anyComment, '\\n');\n logger.debug('Detecting diagram type based on the text ' + text);\n if (text.match(/^\\s*sequenceDiagram/)) {\n return 'sequence';\n }\n\n if (text.match(/^\\s*gantt/)) {\n return 'gantt';\n }\n\n if (text.match(/^\\s*classDiagram/)) {\n return 'class';\n }\n if (text.match(/^\\s*stateDiagram-v2/)) {\n return 'stateDiagram';\n }\n\n if (text.match(/^\\s*stateDiagram/)) {\n return 'state';\n }\n\n if (text.match(/^\\s*gitGraph/)) {\n return 'git';\n }\n if (text.match(/^\\s*flowchart/)) {\n return 'flowchart-v2';\n }\n\n if (text.match(/^\\s*info/)) {\n return 'info';\n }\n if (text.match(/^\\s*pie/)) {\n return 'pie';\n }\n\n if (text.match(/^\\s*erDiagram/)) {\n return 'er';\n }\n\n if (text.match(/^\\s*journey/)) {\n return 'journey';\n }\n\n return 'flowchart';\n};\n\nconst memoize = (fn, resolver) => {\n let cache = {};\n return (...args) => {\n let n = resolver ? resolver.apply(this, args) : args[0];\n if (n in cache) {\n return cache[n];\n } else {\n let result = fn(...args);\n cache[n] = result;\n return result;\n }\n };\n};\n\n/**\n * @function isSubstringInArray\n * Detects whether a substring in present in a given array\n * @param {string} str The substring to detect\n * @param {array} arr The array to search\n * @returns {number} the array index containing the substring or -1 if not present\n **/\nexport const isSubstringInArray = function(str, arr) {\n for (let i = 0; i < arr.length; i++) {\n if (arr[i].match(str)) return i;\n }\n return -1;\n};\n\nexport const interpolateToCurve = (interpolate, defaultCurve) => {\n if (!interpolate) {\n return defaultCurve;\n }\n const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`;\n return d3CurveTypes[curveName] || defaultCurve;\n};\n\nexport const formatUrl = (linkStr, config) => {\n let url = linkStr.trim();\n\n if (url) {\n if (config.securityLevel !== 'loose') {\n return sanitizeUrl(url);\n }\n\n return url;\n }\n};\n\nexport const runFunc = (functionName, ...params) => {\n const arrPaths = functionName.split('.');\n\n const len = arrPaths.length - 1;\n const fnName = arrPaths[len];\n\n let obj = window;\n for (let i = 0; i < len; i++) {\n obj = obj[arrPaths[i]];\n if (!obj) return;\n }\n\n obj[fnName](...params);\n};\n\nconst distance = (p1, p2) =>\n p1 && p2 ? Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)) : 0;\n\nconst traverseEdge = points => {\n let prevPoint;\n let totalDistance = 0;\n\n points.forEach(point => {\n totalDistance += distance(point, prevPoint);\n prevPoint = point;\n });\n\n // Traverse half of total distance along points\n let remainingDistance = totalDistance / 2;\n let center = undefined;\n prevPoint = undefined;\n points.forEach(point => {\n if (prevPoint && !center) {\n const vectorDistance = distance(point, prevPoint);\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n const distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) center = prevPoint;\n if (distanceRatio >= 1) center = { x: point.x, y: point.y };\n if (distanceRatio > 0 && distanceRatio < 1) {\n center = {\n x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y\n };\n }\n }\n }\n prevPoint = point;\n });\n return center;\n};\n\nconst calcLabelPosition = points => {\n return traverseEdge(points);\n};\n\nconst calcCardinalityPosition = (isRelationTypePresent, points, initialPosition) => {\n let prevPoint;\n let totalDistance = 0; // eslint-disable-line\n if (points[0] !== initialPosition) {\n points = points.reverse();\n }\n points.forEach(point => {\n totalDistance += distance(point, prevPoint);\n prevPoint = point;\n });\n\n // Traverse only 25 total distance along points to find cardinality point\n const distanceToCardinalityPoint = 25;\n\n let remainingDistance = distanceToCardinalityPoint;\n let center;\n prevPoint = undefined;\n points.forEach(point => {\n if (prevPoint && !center) {\n const vectorDistance = distance(point, prevPoint);\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n const distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) center = prevPoint;\n if (distanceRatio >= 1) center = { x: point.x, y: point.y };\n if (distanceRatio > 0 && distanceRatio < 1) {\n center = {\n x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y\n };\n }\n }\n }\n prevPoint = point;\n });\n // if relation is present (Arrows will be added), change cardinality point off-set distance (d)\n let d = isRelationTypePresent ? 10 : 5;\n //Calculate Angle for x and y axis\n let angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);\n let cardinalityPosition = { x: 0, y: 0 };\n //Calculation cardinality position using angle, center point on the line/curve but pendicular and with offset-distance\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;\n return cardinalityPosition;\n};\n\nexport const getStylesFromArray = arr => {\n let style = '';\n let labelStyle = '';\n\n for (let i = 0; i < arr.length; i++) {\n if (typeof arr[i] !== 'undefined') {\n // add text properties to label style definition\n if (arr[i].startsWith('color:') || arr[i].startsWith('text-align:')) {\n labelStyle = labelStyle + arr[i] + ';';\n } else {\n style = style + arr[i] + ';';\n }\n }\n }\n\n return { style: style, labelStyle: labelStyle };\n};\n\nlet cnt = 0;\nexport const generateId = () => {\n cnt++;\n return (\n 'id-' +\n Math.random()\n .toString(36)\n .substr(2, 12) +\n '-' +\n cnt\n );\n};\n\nexport const random = options => {\n return cryptoRandomString(options);\n};\n\n/**\n * @function assignWithDepth\n * Extends the functionality of {@link ObjectConstructor.assign} with the ability to merge arbitrary-depth objects\n * For each key in src with path `k` (recursively) performs an Object.assign(dst[`k`], src[`k`]) with\n * a slight change from the typical handling of undefined for dst[`k`]: instead of raising an error,\n * dst[`k`] is auto-initialized to {} and effectively merged with src[`k`]\n *
\n * Additionally, dissimilar types will not clobber unless the config.clobber parameter === true. Example:\n * ```\n * let config_0 = { foo: { bar: 'bar' }, bar: 'foo' };\n * let config_1 = { foo: 'foo', bar: 'bar' };\n * let result = assignWithDepth(config_0, config_1);\n * console.log(result);\n * //-> result: { foo: { bar: 'bar' }, bar: 'bar' }\n * ```\n *
\n * Traditional Object.assign would have clobbered foo in config_0 with foo in config_1.\n *
\n * If src is a destructured array of objects and dst is not an array, assignWithDepth will apply each element of src to dst\n * in order.\n * @param dst:any - the destination of the merge\n * @param src:any - the source object(s) to merge into destination\n * @param config:{ depth: number, clobber: boolean } - depth: depth to traverse within src and dst for merging -\n * clobber: should dissimilar types clobber (default: { depth: 2, clobber: false })\n * @returns {*}\n */\nexport const assignWithDepth = function(dst, src, config) {\n const { depth, clobber } = Object.assign({ depth: 2, clobber: false }, config);\n if (Array.isArray(src) && !Array.isArray(dst)) {\n src.forEach(s => assignWithDepth(dst, s, config));\n return dst;\n } else if (Array.isArray(src) && Array.isArray(dst)) {\n src.forEach(s => {\n if (dst.indexOf(s) === -1) {\n dst.push(s);\n }\n });\n return dst;\n }\n if (typeof dst === 'undefined' || depth <= 0) {\n if (dst !== undefined && dst !== null && typeof dst === 'object' && typeof src === 'object') {\n return Object.assign(dst, src);\n } else {\n return src;\n }\n }\n if (typeof src !== 'undefined' && typeof dst === 'object' && typeof src === 'object') {\n Object.keys(src).forEach(key => {\n if (\n typeof src[key] === 'object' &&\n (dst[key] === undefined || typeof dst[key] === 'object')\n ) {\n if (dst[key] === undefined) {\n dst[key] = Array.isArray(src[key]) ? [] : {};\n }\n dst[key] = assignWithDepth(dst[key], src[key], { depth: depth - 1, clobber });\n } else if (clobber || (typeof dst[key] !== 'object' && typeof src[key] !== 'object')) {\n dst[key] = src[key];\n }\n });\n }\n return dst;\n};\n\nexport const getTextObj = function() {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n anchor: 'start',\n style: '#666',\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0,\n valign: undefined\n };\n};\n\nexport const drawSimpleText = function(elem, textData) {\n // Remove and ignore br:s\n const nText = textData.text.replace(common.lineBreakRegex, ' ');\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.style('text-anchor', textData.anchor);\n textElem.style('font-family', textData.fontFamily);\n textElem.style('font-size', textData.fontSize);\n textElem.style('font-weight', textData.fontWeight);\n textElem.attr('fill', textData.fill);\n if (typeof textData.class !== 'undefined') {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.attr('fill', textData.fill);\n span.text(nText);\n\n return textElem;\n};\n\nexport const wrapLabel = memoize(\n (label, maxWidth, config) => {\n if (!label) {\n return label;\n }\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', joinWith: '
' },\n config\n );\n if (common.lineBreakRegex.test(label)) {\n return label;\n }\n const words = label.split(' ');\n const completedLines = [];\n let nextLine = '';\n words.forEach((word, index) => {\n const wordLength = calculateTextWidth(`${word} `, config);\n const nextLineLength = calculateTextWidth(nextLine, config);\n if (wordLength > maxWidth) {\n const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, '-', config);\n completedLines.push(nextLine, ...hyphenatedStrings);\n nextLine = remainingWord;\n } else if (nextLineLength + wordLength >= maxWidth) {\n completedLines.push(nextLine);\n nextLine = word;\n } else {\n nextLine = [nextLine, word].filter(Boolean).join(' ');\n }\n const currentWord = index + 1;\n const isLastWord = currentWord === words.length;\n if (isLastWord) {\n completedLines.push(nextLine);\n }\n });\n return completedLines.filter(line => line !== '').join(config.joinWith);\n },\n (label, maxWidth, config) =>\n `${label}-${maxWidth}-${config.fontSize}-${config.fontWeight}-${config.fontFamily}-${config.joinWith}`\n);\n\nconst breakString = memoize(\n (word, maxWidth, hyphenCharacter = '-', config) => {\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', margin: 0 },\n config\n );\n const characters = word.split('');\n const lines = [];\n let currentLine = '';\n characters.forEach((character, index) => {\n const nextLine = `${currentLine}${character}`;\n const lineWidth = calculateTextWidth(nextLine, config);\n if (lineWidth >= maxWidth) {\n const currentCharacter = index + 1;\n const isLastLine = characters.length === currentCharacter;\n const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`;\n lines.push(isLastLine ? nextLine : hyphenatedNextLine);\n currentLine = '';\n } else {\n currentLine = nextLine;\n }\n });\n return { hyphenatedStrings: lines, remainingWord: currentLine };\n },\n (word, maxWidth, hyphenCharacter = '-', config) =>\n `${word}-${maxWidth}-${hyphenCharacter}-${config.fontSize}-${config.fontWeight}-${config.fontFamily}`\n);\n\n/**\n * This calculates the text's height, taking into account the wrap breaks and\n * both the statically configured height, width, and the length of the text (in pixels).\n *\n * If the wrapped text text has greater height, we extend the height, so it's\n * value won't overflow.\n *\n * @return - The height for the given text\n * @param text the text to measure\n * @param config - the config for fontSize, fontFamily, and fontWeight all impacting the resulting size\n */\nexport const calculateTextHeight = function(text, config) {\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', margin: 15 },\n config\n );\n return calculateTextDimensions(text, config).height;\n};\n\n/**\n * This calculates the width of the given text, font size and family.\n *\n * @return - The width for the given text\n * @param text - The text to calculate the width of\n * @param config - the config for fontSize, fontFamily, and fontWeight all impacting the resulting size\n */\nexport const calculateTextWidth = function(text, config) {\n config = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: 'Arial' }, config);\n return calculateTextDimensions(text, config).width;\n};\n\n/**\n * This calculates the dimensions of the given text, font size, font family, font weight, and margins.\n *\n * @return - The width for the given text\n * @param text - The text to calculate the width of\n * @param config - the config for fontSize, fontFamily, fontWeight, and margin all impacting the resulting size\n */\nexport const calculateTextDimensions = memoize(\n function(text, config) {\n config = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: 'Arial' }, config);\n const { fontSize, fontFamily, fontWeight } = config;\n if (!text) {\n return { width: 0, height: 0 };\n }\n\n // We can't really know if the user supplied font family will render on the user agent;\n // thus, we'll take the max width between the user supplied font family, and a default\n // of sans-serif.\n const fontFamilies = ['sans-serif', fontFamily];\n const lines = text.split(common.lineBreakRegex);\n let dims = [];\n\n const body = select('body');\n // We don't want to leak DOM elements - if a removal operation isn't available\n // for any reason, do not continue.\n if (!body.remove) {\n return { width: 0, height: 0, lineHeight: 0 };\n }\n\n const g = body.append('svg');\n\n for (let fontFamily of fontFamilies) {\n let cheight = 0;\n let dim = { width: 0, height: 0, lineHeight: 0 };\n for (let line of lines) {\n const textObj = getTextObj();\n textObj.text = line;\n const textElem = drawSimpleText(g, textObj)\n .style('font-size', fontSize)\n .style('font-weight', fontWeight)\n .style('font-family', fontFamily);\n\n let bBox = (textElem._groups || textElem)[0][0].getBBox();\n dim.width = Math.round(Math.max(dim.width, bBox.width));\n cheight = Math.round(bBox.height);\n dim.height += cheight;\n dim.lineHeight = Math.round(Math.max(dim.lineHeight, cheight));\n }\n dims.push(dim);\n }\n\n g.remove();\n\n let index =\n isNaN(dims[1].height) ||\n isNaN(dims[1].width) ||\n isNaN(dims[1].lineHeight) ||\n (dims[0].height > dims[1].height &&\n dims[0].width > dims[1].width &&\n dims[0].lineHeight > dims[1].lineHeight)\n ? 0\n : 1;\n return dims[index];\n },\n (text, config) => `${text}-${config.fontSize}-${config.fontWeight}-${config.fontFamily}`\n);\n\nexport default {\n assignWithDepth,\n wrapLabel,\n calculateTextHeight,\n calculateTextWidth,\n calculateTextDimensions,\n detectInit,\n detectDirective,\n detectType,\n isSubstringInArray,\n interpolateToCurve,\n calcLabelPosition,\n calcCardinalityPosition,\n formatUrl,\n getStylesFromArray,\n generateId,\n random,\n memoize,\n runFunc\n};\n","module.exports = require(\"@braintree/sanitize-url\");","module.exports = require(\"crypto-random-string\");","module.exports = require(\"d3\");","module.exports = require(\"dagre\");","module.exports = require(\"dagre-d3\");","module.exports = require(\"dagre-d3/lib/label/add-html-label.js\");","module.exports = require(\"entity-decode/browser\");","module.exports = require(\"graphlib\");","module.exports = require(\"moment-mini\");","module.exports = require(\"scope-css\");"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack://mermaid/webpack/universalModuleDefinition","webpack://mermaid/webpack/bootstrap","webpack://mermaid/./node_modules/path-browserify/index.js","webpack://mermaid/./node_modules/process/browser.js","webpack://mermaid/(webpack)/buildin/module.js","webpack://mermaid/./src/config.js","webpack://mermaid/./src/dagre-wrapper/clusters.js","webpack://mermaid/./src/dagre-wrapper/createLabel.js","webpack://mermaid/./src/dagre-wrapper/edges.js","webpack://mermaid/./src/dagre-wrapper/index.js","webpack://mermaid/./src/dagre-wrapper/intersect/index.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-circle.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-ellipse.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-line.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-node.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-polygon.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-rect.js","webpack://mermaid/./src/dagre-wrapper/markers.js","webpack://mermaid/./src/dagre-wrapper/mermaid-graphlib.js","webpack://mermaid/./src/dagre-wrapper/nodes.js","webpack://mermaid/./src/dagre-wrapper/shapes/note.js","webpack://mermaid/./src/dagre-wrapper/shapes/util.js","webpack://mermaid/./src/diagrams/class/classDb.js","webpack://mermaid/./src/diagrams/class/classRenderer-v2.js","webpack://mermaid/./src/diagrams/class/classRenderer.js","webpack://mermaid/./src/diagrams/class/parser/classDiagram.jison","webpack://mermaid/./src/diagrams/class/styles.js","webpack://mermaid/./src/diagrams/class/svgDraw.js","webpack://mermaid/./src/diagrams/common/common.js","webpack://mermaid/./src/diagrams/er/erDb.js","webpack://mermaid/./src/diagrams/er/erMarkers.js","webpack://mermaid/./src/diagrams/er/erRenderer.js","webpack://mermaid/./src/diagrams/er/parser/erDiagram.jison","webpack://mermaid/./src/diagrams/er/styles.js","webpack://mermaid/./src/diagrams/flowchart/flowChartShapes.js","webpack://mermaid/./src/diagrams/flowchart/flowDb.js","webpack://mermaid/./src/diagrams/flowchart/flowRenderer-v2.js","webpack://mermaid/./src/diagrams/flowchart/flowRenderer.js","webpack://mermaid/./src/diagrams/flowchart/parser/flow.jison","webpack://mermaid/./src/diagrams/flowchart/styles.js","webpack://mermaid/./src/diagrams/gantt/ganttDb.js","webpack://mermaid/./src/diagrams/gantt/ganttRenderer.js","webpack://mermaid/./src/diagrams/gantt/parser/gantt.jison","webpack://mermaid/./src/diagrams/gantt/styles.js","webpack://mermaid/./src/diagrams/git/gitGraphAst.js","webpack://mermaid/./src/diagrams/git/gitGraphRenderer.js","webpack://mermaid/./src/diagrams/git/parser/gitGraph.jison","webpack://mermaid/./src/diagrams/git/styles.js","webpack://mermaid/./src/diagrams/info/infoDb.js","webpack://mermaid/./src/diagrams/info/infoRenderer.js","webpack://mermaid/./src/diagrams/info/parser/info.jison","webpack://mermaid/./src/diagrams/info/styles.js","webpack://mermaid/./src/diagrams/pie/parser/pie.jison","webpack://mermaid/./src/diagrams/pie/pieDb.js","webpack://mermaid/./src/diagrams/pie/pieRenderer.js","webpack://mermaid/./src/diagrams/pie/styles.js","webpack://mermaid/./src/diagrams/sequence/parser/sequenceDiagram.jison","webpack://mermaid/./src/diagrams/sequence/sequenceDb.js","webpack://mermaid/./src/diagrams/sequence/sequenceRenderer.js","webpack://mermaid/./src/diagrams/sequence/styles.js","webpack://mermaid/./src/diagrams/sequence/svgDraw.js","webpack://mermaid/./src/diagrams/state/id-cache.js","webpack://mermaid/./src/diagrams/state/parser/stateDiagram.jison","webpack://mermaid/./src/diagrams/state/shapes.js","webpack://mermaid/./src/diagrams/state/stateDb.js","webpack://mermaid/./src/diagrams/state/stateRenderer-v2.js","webpack://mermaid/./src/diagrams/state/stateRenderer.js","webpack://mermaid/./src/diagrams/state/styles.js","webpack://mermaid/./src/diagrams/user-journey/journeyDb.js","webpack://mermaid/./src/diagrams/user-journey/journeyRenderer.js","webpack://mermaid/./src/diagrams/user-journey/parser/journey.jison","webpack://mermaid/./src/diagrams/user-journey/styles.js","webpack://mermaid/./src/diagrams/user-journey/svgDraw.js","webpack://mermaid/./src/errorRenderer.js","webpack://mermaid/./src/logger.js","webpack://mermaid/./src/mermaid.js","webpack://mermaid/./src/mermaidAPI.js","webpack://mermaid/./src/styles.js","webpack://mermaid/./src/themes/index.js","webpack://mermaid/./src/themes/theme-base.js","webpack://mermaid/./src/themes/theme-dark.js","webpack://mermaid/./src/themes/theme-default.js","webpack://mermaid/./src/themes/theme-forest.js","webpack://mermaid/./src/themes/theme-neutral.js","webpack://mermaid/./src/utils.js","webpack://mermaid/external \"@braintree/sanitize-url\"","webpack://mermaid/external \"d3\"","webpack://mermaid/external \"dagre\"","webpack://mermaid/external \"dagre-d3\"","webpack://mermaid/external \"dagre-d3/lib/label/add-html-label.js\"","webpack://mermaid/external \"entity-decode/browser\"","webpack://mermaid/external \"graphlib\"","webpack://mermaid/external \"khroma\"","webpack://mermaid/external \"moment-mini\"","webpack://mermaid/external \"stylis\""],"names":["handleThemeVariables","value","theme","getThemeVariables","default","manipulators","themeVariables","config","themeCSS","undefined","maxTextSize","fontFamily","logLevel","securityLevel","startOnLoad","arrowMarkerAbsolute","secure","flowchart","diagramPadding","htmlLabels","nodeSpacing","rankSpacing","curve","padding","sequence","activationWidth","diagramMarginX","diagramMarginY","actorMargin","width","height","boxMargin","boxTextMargin","noteMargin","messageMargin","messageAlign","mirrorActors","bottomMarginAdj","useMaxWidth","rightAngles","showSequenceNumbers","actorFontSize","actorFontFamily","actorFontWeight","noteFontSize","noteFontFamily","noteFontWeight","noteAlign","messageFontSize","messageFontFamily","messageFontWeight","wrap","wrapPadding","labelBoxWidth","labelBoxHeight","messageFont","fontSize","fontWeight","noteFont","actorFont","gantt","titleTopMargin","barHeight","barGap","topPadding","leftPadding","gridLineStartPadding","numberSectionStyles","axisFormat","journey","class","git","state","dividerMargin","sizeUnit","textHeight","titleShift","forkWidth","forkHeight","miniPadding","fontSizeFactor","labelHeight","edgeLengthFactor","compositTitleSize","radius","er","layoutDirection","minEntityWidth","minEntityHeight","entityPadding","stroke","fill","defaultConfig","Object","freeze","siteConfig","assignWithDepth","currentConfig","setSiteConfig","conf","keys","forEach","key","manipulator","clobber","getSiteConfig","setConfig","sanitize","getConfig","options","logger","warn","reset","configApi","rect","parent","node","log","trace","id","shapeSvg","insert","attr","label","text","appendChild","createLabel","labelText","labelStyle","bbox","getBBox","div","children","dv","select","getBoundingClientRect","halfPadding","JSON","stringify","rx","ry","x","y","rectBox","intersect","point","intersectRect","noteGroup","roundedWithTitle","classes","innerRect","append","divider","shapes","clusterElems","insertCluster","elem","shape","getClusterTitleWidth","removeChild","clear","positionCluster","info","el","applyStyle","dom","styleFn","addHtmlLabel","fo","document","createElementNS","labelClass","isNode","html","style","_vertexText","isTitle","vertexText","replace","s","vertexNode","svgLabel","setAttribute","rows","split","Array","isArray","j","length","tspan","setAttributeNS","textContent","trim","edgeLabels","insertEdgeLabel","edge","labelElement","edgeLabel","positionEdgeLabel","points","pos","utils","calcLabelPosition","outsideNode","dx","Math","abs","dy","w","h","intersection","outsidePoint","insidePoint","r","edges","x1","x2","y1","y2","Q","R","q","res","insertEdge","e","clusterDb","diagramType","graph","pointsHasChanged","tail","v","head","slice","unshift","push","toCluster","lastPointOutside","isInside","inter","pointPresent","p","find","fromCluster","updatedPoints","i","insterection","lineData","filter","Number","isNaN","lineFunction","line","d","curveBasis","strokeClasses","thickness","pattern","svgPath","url","window","location","protocol","host","pathname","search","arrowTypeStart","arrowTypeEnd","recursiveRender","_elem","diagramtype","parentCluster","graphlib","json","write","dir","rankdir","nodes","clusters","edgePaths","data","parse","clusterData","setNode","setParent","clusterNode","newEl","updateNodeBounds","setNodeElem","findNonClusterChild","insertNode","name","dagre","layout","positionNode","updatedPath","render","markers","insertMarkers","clearNodes","clearEdges","clearClusters","clearGraphlib","adjustClustersAndEdges","circle","ellipse","polygon","intersectCircle","intersectEllipse","cx","cy","px","py","det","sqrt","intersectLine","p1","p2","q1","q2","a1","a2","b1","b2","c1","c2","r1","r2","r3","r4","denom","offset","num","sameSign","module","exports","intersectNode","console","intersectPolygon","polyPoints","intersections","minX","POSITIVE_INFINITY","minY","entry","min","left","top","sort","pdx","pdy","distp","qdx","qdy","distq","sx","sy","markerArray","type","markerName","extension","composition","aggregation","dependency","cross","barb","decendants","parents","isDecendant","ancenstorId","debug","indexOf","edgeInCluster","clusterId","copy","newGraph","rootId","setEdge","error","removeNode","extractDecendants","concat","validate","_id","getAnchorId","externalConnections","depth","d1","d2","extractor","removeEdge","hasChildren","graphSettings","clusterGraph","Graph","multigraph","compound","setGraph","nodesep","ranksep","marginx","marginy","setDefaultEdgeLabel","question","labelHelper","questionElem","insertPolygonShape","hexagon","f","m","hex","rect_left_inv_arrow","lean_right","lean_left","trapezoid","inv_trapezoid","rect_right_inv_arrow","cylinder","rectWithTitle","innerLine","text2","flat","textRows","titleBox","descr","join","stadium","subroutine","start","forkJoin","end","innerCircle","class_box","rowPadding","lineHeight","topLine","bottomLine","maxWidth","maxHeight","labelContainer","verticalPos","hasInterface","classData","annotations","interfaceLabel","interfaceBBox","classTitleLabel","classTitleBBox","classAttributes","members","str","lbl","classMethods","methods","diffX","note","fork","nodeElems","_classes","element","map","MERMAID_DOM_ID_PREFIX","relations","classCounter","funs","splitClassNameAndType","genericType","className","addClass","classId","cssClasses","domId","lookUpDomId","classKeys","setupToolTips","getClass","getClasses","getRelations","addRelation","relation","id1","id2","addAnnotation","annotation","validatedClassName","addMember","member","theClass","memberString","startsWith","endsWith","substring","addMembers","reverse","cleanupLabel","substr","setCssClass","ids","match","setLink","linkStr","tooltip","link","formatUrl","common","sanitizeText","setClickEvent","functionName","setClickFunc","elemId","querySelector","addEventListener","runFunc","bindFunctions","fun","lineType","LINE","DOTTED_LINE","relationType","AGGREGATION","EXTENSION","COMPOSITION","DEPENDENCY","tooltipElem","_groups","svg","selectAll","on","title","transition","duration","scrollX","right","scrollY","body","scrollTop","classed","parser","yy","classDb","idCache","addClasses","g","vertex","classStr","styles","radious","_shape","addRelations","cnt","defaultStyle","defaultLabelStyle","edgeData","arrowhead","getArrowMarker","type1","type2","getStylesFromArray","interpolate","interpolateToCurve","curveLinear","defaultInterpolate","arrowheadStyle","labelpos","labelType","lineBreakRegex","getGraphId","setConf","cnf","drawOld","diagram","isMultiGraph","classDef","svgDraw","drawClass","drawEdge","svgBounds","vBox","draw","_label","labels","querySelectorAll","k","dim","insertBefore","firstChild","marker","getStyles","nodeBorder","classText","mainBkg","nodeBkg","lineColor","edgeCount","path","getRelationType","l","labelPosition","p1_card_x","p1_card_y","p2_card_x","p2_card_y","cardinality_1_point","calcCardinalityPosition","cardinality_2_point","bounds","relationTitle1","relationTitle2","cssClassStr","classInfo","isFirst","titleText2","classTitleString","classTitle","titleHeight","membersLine","addTspan","membersBox","methodsLine","method","classBox","rectWidth","childNodes","parseMember","fieldRegEx","methodRegEx","fieldMatch","methodMatch","buildFieldDisplay","buildMethodDisplay","buildLegacyDisplay","parsedText","displayText","visibility","fieldType","parseGenericTypes","fieldName","err","cssStyle","methodName","parameters","classifier","returnType","parseClassifier","memberText","methodStart","methodEnd","firstChar","textEl","txt","tSpan","cleanedText","getRows","breakToPlaceholder","removeScript","rs","idx","level","placeholderToBreak","hasBreaks","test","splitBreaks","entities","relationships","Cardinality","ZERO_OR_ONE","ZERO_OR_MORE","ONE_OR_MORE","ONLY_ONE","Identification","NON_IDENTIFYING","IDENTIFYING","addEntity","getEntities","addRelationship","entA","rolA","entB","rSpec","rel","entityA","roleA","entityB","relSpec","getRelationships","setTitle","getTitle","ERMarkers","ONLY_ONE_START","ONLY_ONE_END","ZERO_OR_ONE_START","ZERO_OR_ONE_END","ONE_OR_MORE_START","ONE_OR_MORE_END","ZERO_OR_MORE_START","ZERO_OR_MORE_END","drawEntities","svgNode","firstOne","groupNode","textId","textNode","textBBox","entityWidth","max","entityHeight","rectNode","rectBBox","adjustEntities","getEdgeName","addRelationships","relationship","relCnt","drawRelationshipFromLayout","relType","erDb","cardA","erMarkers","cardB","len","getTotalLength","labelPoint","getPointAtLength","labelId","labelNode","labelBBox","erParser","directed","edgesep","firstEntity","edgeLabelBackground","dagreD3","addToRender","addToRenderV2","addShape","vertices","subGraphs","subGraphLookup","tooltips","subCount","firstGraphFlag","direction","addVertex","addSingleLink","_start","_end","linktext","addLink","updateLinkInterpolate","positions","interp","updateLink","isSubstringInArray","textStyles","newStyle1","newStyle2","setDirection","setClass","setTooltip","setClickFun","getTooltip","getDirection","getVertices","getEdges","addSubGraph","list","_title","uniq","a","prims","boolean","number","string","objs","item","hasOwnProperty","nodeList","apply","subGraph","getPosForId","secCount","posCrossRef","indexNodes2","result","count","posCount","childPos","getDepthFirstPos","indexNodes","getSubGraphs","firstGraph","destructStartLink","_str","destructEndLink","destructLink","_startStr","startInfo","lex","addVertices","vert","svgId","parentNode","addEdges","defaultStyles","linkId","linkNameStart","linkNameEnd","flowDb","flow","subG","linkNode","Render","flowChartShapes","arrows","none","normal","util","clusterRects","clusterEl","xPos","baseVal","yPos","cluster","te","classList","add","textColor","arrowheadColor","secondBkg","clusterBorder","titleColor","border2","dateFormat","todayMarker","excludes","sections","tasks","currentSection","tags","inclusiveEndDates","lastOrder","taskCnt","lastTask","lastTaskID","rawTasks","setAxisFormat","getAxisFormat","setTodayMarker","getTodayMarker","setDateFormat","enableInclusiveEndDates","endDatesAreInclusive","getDateFormat","setExcludes","toLowerCase","getExcludes","addSection","getSections","getTasks","allItemsPricessed","compileTasks","maxDepth","iterationCount","isInvalidDate","date","isoWeekday","format","checkTaskDates","task","manualEndTime","startTime","moment","endTime","renderEndTime","fixTaskDates","toDate","invalid","getStartDate","prevTime","re","afterStatement","exec","latestEndingTask","findTaskById","dt","Date","setHours","mDate","isValid","durationToDate","durationStatement","relativeTime","getEndDate","inclusive","parseId","idStr","compileData","prevTask","dataStr","ds","getTaskTags","endTimeData","parseData","prevTaskId","startData","taskDb","addTask","rawTask","section","processed","raw","taskInfo","active","done","crit","milestone","order","addTaskOrg","newTask","description","compileTask","allProcessed","_linkStr","sanitizeUrl","pushFun","open","functionArgs","argList","charAt","callbackFunction","matchFound","t","regex","RegExp","shift","ganttDb","rightPadding","getElementById","parentElement","offsetWidth","useWidth","taskArray","timeScale","scaleTime","domain","rangeRound","categories","catsUnfiltered","checkUnique","taskCompare","b","taskA","taskB","makeGant","pageWidth","pageHeight","gap","colorScale","scaleLinear","range","interpolateHcl","makeGrid","drawRects","vertLabels","drawToday","theArray","theGap","theTopPad","theSidePad","theBarHeight","theColorScale","enter","rectangles","toString","secNum","taskClass","startX","endX","textWidth","taskType","xAxis","axisBottom","tickSize","tickFormat","timeFormat","call","numOccurances","prevGap","getCount","todayG","today","todayLine","arr","hash","getCounts","obj","word","sectionBkgColor","sectionBkgColor2","altSectionBkgColor","gridColor","todayLineColor","taskTextDarkColor","taskTextClickableColor","taskTextColor","taskBkgColor","taskBorderColor","taskTextOutsideColor","activeTaskBkgColor","activeTaskBorderColor","doneTaskBorderColor","doneTaskBkgColor","critBorderColor","critBkgColor","commits","branches","master","curBranch","seq","getId","random","isfastforwardable","currentCommit","otherCommit","isReachableFrom","currentSeq","otherSeq","uniqBy","fn","recordMap","create","reduce","out","setOptions","rawOptString","message","getOptions","commit","msg","branch","merge","otherBranch","checkout","commitRef","ref","parentCount","parseInt","upsert","newval","index","splice","prettyPrintCommitHistory","commitArr","c","newCommit","nextCommit","prettyPrint","getCommitsArray","getBranchesAsObjArray","branchArr","getBranches","getCommits","o","getCurrentBranch","getHead","allCommitsDict","branchNum","nodeFillColor","nodeStrokeWidth","nodeStrokeColor","lineStrokeWidth","branchOffset","leftMargin","branchColors","nodeRadius","nodeLabel","apiConfig","svgCreateDefs","svgDrawLine","colorIdx","color","lineGen","round","getElementCoords","coords","ctm","getCTM","xn","yn","svgDrawLineForCommits","fromId","toId","fromBbox","toBbox","lineStart","lineEnd","cloneNode","selector","renderCommitHistory","commitid","numCommits","size","branchName","renderLines","branchColor","lineDrawn","ver","gitGraphParser","db","assign","setMessage","getMessage","setInfo","inf","getInfo","infoParser","cleanupValue","pieParser","pieData","margin","legendRectSize","legendSpacing","sum","scaleOrdinal","schemeSet2","pie","d3pie","dataReady","entries","arcGenerator","arc","innerRadius","outerRadius","toFixed","centroid","legend","horz","prevActor","actors","messages","notes","titleWrapped","sequenceNumbersEnabled","wrapEnabled","parseDirective","statement","context","mermaidAPI","addActor","old","autoWrap","nextActor","activationCount","part","LINETYPE","ACTIVE_START","from","actor","ACTIVE_END","addMessage","idFrom","idTo","answer","to","addSignal","messageType","Error","token","loc","first_line","last_line","first_column","last_column","expected","getMessages","getActors","getActor","getActorKeys","getTitleWrapped","enableSequenceNumbers","setWrap","wrapSetting","parseMessage","SOLID","DOTTED","NOTE","SOLID_CROSS","DOTTED_CROSS","SOLID_OPEN","DOTTED_OPEN","LOOP_START","LOOP_END","ALT_START","ALT_ELSE","ALT_END","OPT_START","OPT_END","PAR_START","PAR_AND","PAR_END","RECT_START","RECT_END","ARROWTYPE","FILLED","OPEN","PLACEMENT","LEFTOF","RIGHTOF","OVER","addNote","placement","titleWrap","param","signalType","loopText","optText","altText","parText","sequenceDb","startx","stopx","starty","stopy","sequenceItems","activations","models","getHeight","loops","it","acc","actorModel","addLoop","loopModel","msgModel","noteModel","lastActor","lastLoop","lastMessage","lastNote","init","updateVal","val","updateBounds","_self","updateFn","updateItemBounds","n","_startx","_stopx","_starty","_stopy","newActivation","actorRect","stackedSize","actorActivations","anchored","anchorElement","endActivation","lastActorActivationIdx","activation","lastIndexOf","createLoop","newLoop","endLoop","pop","addSectionToLoop","loop","sectionTitles","getVerticalPos","bumpVerticalPos","bump","getBounds","drawNote","getNoteRect","rectElem","drawRect","textObj","getTextObj","anchor","textMargin","valign","textElem","drawText","curr","drawMessage","sequenceIndex","lines","textDims","calculateTextDimensions","totalOffset","lineStarty","fromBounds","toBounds","drawActors","actorKeys","prevWidth","prevMargin","drawActor","activationBounds","actorObj","adjustLoopHeightForWrap","loopWidths","preMargin","postMargin","addLoopFn","heightAdjust","loopWidth","textConf","wrapLabel","maxMessageWidthPerActor","getMaxMessageWidthPerActor","calculateActorMargins","calculateLoopBounds","insertArrowHead","insertArrowCrossHead","insertSequenceNumber","activeEnd","activationData","drawActivation","drawLoop","drawBackgroundRect","includes","box","actorLines","extraVertForTitle","isNote","isMessage","textFont","wrappedMessage","messageDimensions","messageWidth","actorToMessageWidth","prop","actDims","actorKey","actorWidth","buildNoteModel","shouldWrap","textDimensions","buildMessageModel","process","fromIdx","toIdx","allBounds","boundedWidth","msgDims","stack","current","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","toAdd","enabled","stk","actorBorder","actorBkg","actorTextColor","actorLineColor","signalColor","sequenceNumberColor","signalTextColor","labelBoxBorderColor","labelBoxBkgColor","labelTextColor","loopTextColor","noteBorderColor","noteBkgColor","noteTextColor","activationBkgColor","activationBorderColor","rectData","textData","prevTextHeight","textElems","yfunc","dominantBaseline","alignmentBaseline","span","drawLabel","txtObject","genPoints","cut","actorCnt","center","_drawTextCandidateFunc","drawLoopLine","sectionHeight","lower","defs","byText","content","textAttrs","_setTextAttrs","byTspan","byFo","toText","fromTextAttrsDict","textPlacement","set","get","drawStartState","drawDivider","drawSimpleState","stateDef","drawDescrState","descriptions","isSecond","descrLine","descrBox","addTitleAndBox","altBkg","pad","dblPad","orgBox","orgWidth","orgX","titleWidth","graphBox","doc","lineY","drawEndState","drawForkJoinState","parentId","tmp","nText","_drawLongText","_text","tHeight","textBounds","drawState","stateInfo","stateBox","stateDb","titleRows","boundstmp","boxHeight","heightAdj","clone","rootDoc","setRootDoc","getRootDoc","docTranslator","first","stmt","state1","state2","currentDoc","newNode","generateId","docNode","getRootDocV2","extract","_doc","addState","newDoc","states","documents","root","currentDocument","startCnt","endCnt","addDescription","des","getState","getStates","logDocuments","_id1","_id2","_descr","theState","dividerCnt","getDividerId","trimColon","nodeDb","setupNode","altFlag","nodeData","noteData","groupData","position","arrowType","setupDoc","startId","endId","transformationLog","renderDoc","getLabelWidth","edgeFreeDoc","ranker","nodeSep","sub","boxBounds","noteDef","nodeCount","svgElem","dividers","pWidth","pShift","getAttribute","labelColor","background","altBackground","allItemsProcessed","updateActors","tempActors","people","unique","Set","taskData","pieces","score","peeps","peopleList","journeyDb","taskMargin","taskFontSize","taskFontFamily","actorColours","sectionFills","sectionColours","drawActorLegend","person","colour","circleData","drawCircle","labelData","LEFT_MARGIN","initGraphics","actorNames","actorPos","actorName","drawTasks","fills","textColours","lastSection","sectionVHeight","taskPos","sectionNumber","drawSection","taskActors","drawTask","fillType0","fillType1","fillType2","fillType3","fillType4","fillType5","fillType6","fillType7","drawFace","faceData","circleElement","face","smile","d3arc","startAngle","PI","endAngle","sad","ambivalent","labelMargin","taskCount","graphics","LEVELS","fatal","setLogLevel","bind","time","arguments","mermaid","sequenceConfig","callback","Node","initialize","ganttConfig","now","innerHTML","decode","detectInit","svgCode","parseError","contentLoaded","graphInit","reinitialize","graphType","detectType","gitGraphAst","flowParser","sequenceParser","ganttParser","classParser","stateParser","infoDb","pieDb","journeyParser","encodeEntities","innerTxt","isInt","decodeEntities","_txt","cb","container","updateRendererConfigs","existingSvg","remove","userStyles","altFontFamily","flowRenderer","stylis","Stylis","rules","style1","createElement","gitGraphRenderer","flowRendererV2","sequenceDiagram","sequenceRenderer","ganttRenderer","classRenderer","classRendererV2","stateRenderer","stateRendererV2","infoRenderer","pkg","version","pieRenderer","erRenderer","journeyRenderer","errorRenderer","currentDirective","args","handleDirective","directive","globalReset","themes","classDiagram","stateDiagram","calcThemeVariables","userOverRides","calcColors","errorBkgColor","errorTextColor","base","baseThemeVariables","dark","darkThemeVariables","defaultThemeVariables","forest","forestThemeVariables","neutral","neutralThemeVariables","Theme","primaryColor","secondaryColor","tertiaryColor","lighten","relationColor","border1","labelBackground","updateColors","darken","clusterBkg","defaultLinkColor","taskTextLightColor","adjust","overrides","userOverrides","calculate","mainContrastColor","darkTextColor","invert","rgba","contrast","critical","d3CurveTypes","curveBasisClosed","curveBasisOpen","curveLinearClosed","curveMonotoneX","curveMonotoneY","curveNatural","curveStep","curveStepAfter","curveStepBefore","directiveWithoutOpen","anyComment","inits","detectDirective","results","commentWithoutDirectives","source","lastIndex","memoize","resolver","cache","defaultCurve","curveName","toUpperCase","arrPaths","fnName","params","distance","pow","traverseEdge","prevPoint","totalDistance","remainingDistance","vectorDistance","distanceRatio","isRelationTypePresent","initialPosition","distanceToCardinalityPoint","angle","atan2","cardinalityPosition","sin","cos","makeid","characters","charactersLength","floor","dst","src","drawSimpleText","joinWith","words","completedLines","nextLine","wordLength","calculateTextWidth","nextLineLength","breakString","hyphenatedStrings","remainingWord","Boolean","currentWord","isLastWord","hyphenCharacter","currentLine","character","lineWidth","currentCharacter","isLastLine","hyphenatedNextLine","calculateTextHeight","fontFamilies","dims","cheight","bBox"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;;;;;;;;AClFA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,MAAM;AAChB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,8BAA8B;AAClE;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;;AAEA;AACA,UAAU,UAAU;AACpB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,sBAAsB;AACrD;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7SA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;ACvLtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACrBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;CAGA;AACA;AAEA;AACA;AACA;;AAEA,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAuB,CAAAC,KAAK,EAAI;AACpC,SAAOC,+CAAK,CAACD,KAAD,CAAL,GAAeC,+CAAK,CAACD,KAAD,CAAL,CAAaE,iBAAb,EAAf,GAAkDD,+CAAK,CAACE,OAAN,CAAcD,iBAAd,EAAzD;AACD,CAFD;;AAIA,IAAME,YAAY,GAAG;AACnBC,gBAAc,EAAEN;AADG,CAArB;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAMO,MAAM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,cAAiEC,MAAjE,CAAV;AACAgF,gDAAM,CAACmQ,KAAP,mBAAwB+M,IAAxB;AACAP,SAAO,CAAC/b,IAAR,CAAa,SAAb,EAAwBsc,IAAxB;AACD,CA9FM;AAgGQ;AACbV,SAAO,EAAPA,OADa;AAEbW,MAAI,EAAJA;AAFa,CAAf,E;;;;;;;;;;;ACtPA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA,eAAe,kCAAkC;AACjD,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,4yBAA4yB;AACvzB,aAAa,2dAA2d;AACxe;AACA;AACA;;AAEA;AACA;AACA;AACA,wB;AACA;AACA;AACA,e;AACA;AACA;AACA,qC;AACA;AACA;AACA,4B;AACA;AACA;AACA,wB;AACA;AACA;AACA,2CAA2C,0B;AAC3C;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB;AACzE;AACA;AACA,mC;AACA;AACA;AACA,mB;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA,WAAW,8F;AACX;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW,6F;AACX;AACA;AACA,WAAW,8F;AACX;AACA;AACA,SAAS,+C;AACT;AACA;AACA,SAAS,6C;AACT;AACA;AACA,SAAS,6C;AACT;AACA;AACA,SAAS,2C;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,CAAC;AACD,SAAS,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,8GAA8G,EAAE,SAAS,EAAE,iBAAiB,eAAe,UAAU,wEAAwE,gFAAgF,GAAG,iCAAiC,8BAA8B,2BAA2B,EAAE,iCAAiC,EAAE,iCAAiC,cAAc,2CAA2C,6CAA6C,QAAQ,EAAE,uHAAuH,gBAAgB,2CAA2C,EAAE,4DAA4D,gBAAgB,oBAAoB,eAAe,kCAAkC,oGAAoG,UAAU,GAAG,UAAU,EAAE,UAAU,EAAE,UAAU,2BAA2B,iCAAiC,GAAG,QAAQ,gBAAgB,iCAAiC,EAAE,2CAA2C,eAAe,kCAAkC,iBAAiB,aAAa,EAAE,iCAAiC,eAAe,UAAU,gBAAgB,UAAU,4CAA4C,iCAAiC,gBAAgB,UAAU,EAAE,uBAAuB,wEAAwE,UAAU;AAC3nD,iBAAiB,oCAAoC;AACrD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kCAAkC;AAC/D;AACA;AACA;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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A;AACA,sC;AACA;AACA;AACA,qC;AACA;AACA;AACA,kC;AACA;AACA;AACA,4C;AACA;AACA;AACA,wC;AACA;AACA;AACA,mC;AACA;AACA;AACA,iB;AACA;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,cAAc,IAAI,GAAG,uBAAuB,EAAE,QAAQ,eAAe,qCAAqC,4BAA4B,YAAY,EAAE,0BAA0B,uDAAuD,UAAU,EAAE,kCAAkC,8BAA8B,0BAA0B,EAAE,SAAS;AACnX,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,2FAA2F,cAAc,uCAAuC,aAAa;AAC7J,aAAa,WAAW;AACxB,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0DAAI,eAAe,mBAAO,CAAC,qDAAM;AAC1D;AACA;AACA,IAAI,KAA6B,IAAI,4CAAY;AACjD;AACA;AACA,C;;;;;;;;;;;;;ACtqBA;AAAA,IAAMS,SAAS,GAAG,SAAZA,SAAY,CAAA7d,OAAO;AAAA,+CAGbA,OAAO,CAACge,OAHK,4BAIXhe,OAAO,CAAC8d,UAJG,4DAQb9d,OAAO,CAAC4mB,mBARK,4DAUD5mB,OAAO,CAAC4mB,mBAVP,4GAiBT5mB,OAAO,CAACke,SAjBC;AAAA,CAAzB;;AAqBeL,wEA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A;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,k8CAAk8C;AAC78C,aAAa,40BAA40B;AACz1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,8CAA8C,WAAW,qD;AACrG;AACA;AACA,8CAA8C,gDAAgD,WAAW,yD;AACzG;AACA;AACA,iCAAiC,aAAa;AAC9C;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA,gCAAgC;AAChC;AACA;AACA,kCAAkC,qDAAqD;AACvF;AACA;AACA,oBAAoB;AACpB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA,uBAAuB;AACvB;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,4CAA4C,WAAW;AACvD;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kB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AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA;AACA;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,icAAic,25KAA25K,UAAU;AACt2L,aAAa,UAAU,6BAA6B,QAAQ,0DAA0D,WAAW,gCAAgC,YAAY;AAC7K,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;A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B,CAAH,CAAJ,CAAH,GAAgB,CAAC8uB,GAAG,CAACH,GAAG,CAAC3uB,CAAD,CAAJ,CAAH,IAAe,CAAhB,IAAqB,CAArC,CADQ,CACgC;AACzC;;AACD,WAAO8uB,GAAP;AACD,GAnboC,CAqbrC;;;AACA,WAASP,QAAT,CAAkBQ,IAAlB,EAAwBJ,GAAxB,EAA6B;AAC3B,WAAOE,SAAS,CAACF,GAAD,CAAT,CAAeI,IAAf,KAAwB,CAA/B;AACD;AACF,CAzbM;AA2bQ;AACb7a,SAAO,EAAPA,OADa;AAEbW,MAAI,EAAJA;AAFa,CAAf,E;;;;;;;;;;;AC9dA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA,eAAe,kCAAkC;AACjD,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,gWAAgW;AAC3W,aAAa,gPAAgP;AAC7P;AACA;AACA;;AAEA;AACA;AACA;AACA,iB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,oCAAoC;AACpC;AACA;AACA,iCAAiC;AACjC;AACA;AACA,qCAAqC;AACrC;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,gCAAgC;AAChC;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,2CAA2C;AAC7D;AACA;AACA,kBAAkB,+CAA+C;AACjE;AACA;AACA,kBAAkB,yCAAyC;AAC3D;AACA;AACA,kBAAkB,6CAA6C;AAC/D;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,cAAc,IAAI,GAAG,sGAAsG,cAAc,QAAQ,gBAAgB,0EAA0E,0IAA0I,UAAU,EAAE,oBAAoB,0CAA0C,oBAAoB,gBAAgB,UAAU,gBAAgB,UAAU,8BAA8B,UAAU;AAC5kB,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iSAAiS,yDAAyD,2BAA2B,6BAA6B,qDAAqD,2BAA2B,kBAAkB,kBAAkB;AACtgB,aAAa,gBAAgB,kCAAkC,iBAAiB,mCAAmC,SAAS,gCAAgC,UAAU,kCAAkC,YAAY;AACpN,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAA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AAlB,EAAwB,OAAOvoB,MAAM,CAACO,IAAP,CAAYo8B,cAAZ,EAA4B52B,MAA5B,GAAqCrL,MAAM,CAACa,WAAnD;AACxB,aAAO,CAACk+B,QAAQ,CAAC1zB,MAAT,GAAkB,CAAnB,IAAwBrL,MAAM,CAACuiC,YAAtC;AACD,KAHD;AAID,GAhCD,CAgCE,OAAO90B,CAAP,EAAU;AACVlH,kDAAM,CAAC2Q,KAAP,CAAa,gCAAb;AACA3Q,kDAAM,CAAC2Q,KAAP,CAAazJ,CAAC,CAAC0yB,OAAf;AACD;AACF,CArCM;AAuCQ;AACbpd,SAAO,EAAPA,OADa;AAEbW,MAAI,EAAJA;AAFa,CAAf,E;;;;;;;;;;;ACjVA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA,eAAe,kCAAkC;AACjD,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,uSAAuS;AAClT,aAAa,0JAA0J;AACvK;AACA;AACA;;AAEA;AACA;AACA;AACA,iB;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,yBAAyB;AACzB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,QAAQ,cAAc,gBAAgB,gBAAgB,sBAAsB,EAAE,QAAQ,EAAE,gFAAgF,eAAe,SAAS,eAAe,UAAU,gBAAgB,0BAA0B,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,0BAA0B,EAAE,QAAQ,eAAe,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,UAAU,EAAE,oBAAoB,EAAE,UAAU,EAAE,UAAU;AAC1lB,iBAAiB,2GAA2G;AAC5H;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,aAAa,WAAW,kCAAkC,WAAW,kCAAkC,YAAY;AACnH,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0DAAI,eAAe,mBAAO,CAAC,qDAAM;AAC1D;AACA;AACA,IAAI,KAA6B,IAAI,4CAAY;AACjD;AACA;AACA,C;;;;;;;;;;;;;ACv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AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,mHAAmH;AAC9H,aAAa,gDAAgD;AAC7D;AACA;AACA;;AAEA;AACA;AACA;AACA,W;AACA;AACA;;AAEA;AACA;AACA,kB;AACA;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,cAAc,IAAI,GAAG,iCAAiC,EAAE,QAAQ;AAC7F,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,aAAa,WAAW;AACxB,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0DAAI,eAAe,mBAAO,CAAC,qDAAM;AAC1D;AACA;AACA,IAAI,KAA6B,IAAI,4CAAY;AACjD;AACA;AACA,C;;;;;;;;;;;;;AC7mBA;AAAA,IAAMS,SAAS,GAAG,SAAZA,SAAY;AAAA;AAAA,CAAlB;;AAEeA,wEAAf,E;;;;;;;;;;;ACFA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA,eAAe,kCAAkC;AACjD,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,mIAAmI;AAC9I,aAAa,gEAAgE;AAC7E;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kD;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,cAAc,IAAI,GAAG,0CAA0C,EAAE,QAAQ,yCAAyC,UAAU;AACzJ,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,qGAAqG;AACrG,aAAa,UAAU,gCAAgC,YAAY;AACnE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0DAAI,eAAe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BAAwyB;AACnzB,aAAa,ifAAif;AAC9f;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,c;AAClB;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,W;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,SAAS,+BAA+B;AACxC;AACA;;AAEA,oBAAoB,0FAA0F;AAC9G,iBAAiB,qEAAqE;AACtF;AACA;AACA;;AAEA,oBAAoB,wFAAwF;AAC5G,iBAAiB,oFAAoF;AACrG;AACA;AACA;;AAEA,oBAAoB,uFAAuF;AAC3G,iBAAiB,mFAAmF;AACpG;AACA;AACA;;AAEA;AACA,oBAAoB,uFAAuF;AAC3G;AACA;AACA,iBAAiB,gDAAgD;AACjE;AACA;AACA;;AAEA;AACA,oBAAoB,uFAAuF;AAC3G;AACA;AACA,iBAAiB,gDAAgD;AACjE;AACA;AACA;AACA,4BAA4B,gFAAgF,W;AAC5G;AACA;AACA,4BAA4B,kFAAkF,W;AAC9G;AACA;;AAEA,uBAAuB,sEAAsE;AAC7F;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,qFAAqF;AAC5G;AACA;AACA,6B;AACA;AACA;AACA,iB;AACA;AACA;AACA,8B;AACA;AACA;AACA,+B;AACA;AACA;AACA,8BAA8B,4FAA4F;AAC1H,gBAAgB;AAChB;AACA;AACA;AACA,8BAA8B,4FAA4F;AAC1H,eAAe;AACf;AACA;AACA;AACA,8BAA8B,4FAA4F;AAC1H;AACA;AACA,QAAQ;AACR;AACA;AACA,iC;AACA;AACA;AACA,kC;AACA;AACA;AACA,4B;AACA;AACA;AACA,6B;AACA;AACA;AACA,kC;AACA;AACA;AACA,mC;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qB;AACvB;AACA;AACA,6C;AACA;AACA;AACA,2CAA2C,4C;AAC3C;AACA;AACA,qB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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA,qCAAqC,W;AACrC;AACA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AAG,UAAU,EAAE,UAAU,wCAAwC,KAAK,+BAA+B,2GAA2G;AAC/kC,iBAAiB,oCAAoC;AACrD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AAC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,UAAM,CAACne,MAAP,CAAc0uB,IAAI,CAACttB,CAAnB,EAAsBstB,IAAI,CAACrtB,CAA3B,EAA8BqtB,IAAI,CAACttB,CAAL,GAASstB,IAAI,CAACt0B,KAAd,GAAsBsE,IAAI,CAACq4C,UAAzD,EAAqE,MAAM,IAAI,EAA/E,EA1CqC,CA0C+C;AACrF;AACF,CAvDM;AAyDQ;AACbl7B,SAAO,EAAPA,OADa;AAEbW,MAAI,EAAJA;AAFa,CAAf,E;;;;;;;;;;;AC3RA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA,eAAe,kCAAkC;AACjD,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,uKAAuK;AAClL,aAAa,oGAAoG;AACjH;AACA;AACA;;AAEA;AACA;AACA;AACA,iB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,gCAAgC;AAChC;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,cAAc,IAAI,GAAG,sDAAsD,cAAc,QAAQ,gBAAgB,0BAA0B,sDAAsD,UAAU;AACxO,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;A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Eb2rC,WAAS,EAATA,SAFa;AAGbmb,qBAAmB,EAAnBA,mBAHa;AAIbf,oBAAkB,EAAlBA,kBAJa;AAKbxb,yBAAuB,EAAvBA,uBALa;AAMbiS,YAAU,EAAVA,UANa;AAOb6G,iBAAe,EAAfA,eAPa;AAQbtG,YAAU,EAAVA,UARa;AASbh0B,oBAAkB,EAAlBA,kBATa;AAUbjM,oBAAkB,EAAlBA,kBAVa;AAWbpW,mBAAiB,EAAjBA,iBAXa;AAYbgZ,yBAAuB,EAAvBA,uBAZa;AAabpG,WAAS,EAATA,SAba;AAcbsD,oBAAkB,EAAlBA,kBAda;AAeb03B,YAAU,EAAVA,UAfa;AAgBb3a,QAAM,EAANA,MAhBa;AAiBb+pB,SAAO,EAAPA,OAjBa;AAkBb3pC,SAAO,EAAPA;AAlBa,CAAf,E;;;;;;;;;;;ACzrBA,oD;;;;;;;;;;;ACAA,+B;;;;;;;;;;;ACAA,kC;;;;;;;;;;;ACAA,qC;;;;;;;;;;;ACAA,iE;;;;;;;;;;;ACAA,kD;;;;;;;;;;;ACAA,qC;;;;;;;;;;;ACAA,mC;;;;;;;;;;;ACAA,wC;;;;;;;;;;;ACAA,mC","file":"mermaid.core.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"mermaid\"] = factory();\n\telse\n\t\troot[\"mermaid\"] = factory();\n})(typeof self !== \"undefined\" ? self : this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/mermaid.js\");\n","// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,\n// backported and transplited with Babel, with backwards-compat fixes\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function (path) {\n if (typeof path !== 'string') path = path + '';\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) {\n // return '//';\n // Backwards-compat fix:\n return '/';\n }\n return path.slice(0, end);\n};\n\nfunction basename(path) {\n if (typeof path !== 'string') path = path + '';\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n}\n\n// Uses a mixed approach for backwards-compatibility, as ext behavior changed\n// in new Node.js versions, so only basename() above is backported here\nexports.basename = function (path, ext) {\n var f = basename(path);\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\nexports.extname = function (path) {\n if (typeof path !== 'string') path = path + '';\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","import { assignWithDepth } from './utils';\nimport { logger } from './logger';\nimport theme from './themes';\n\n// import { unflatten } from 'flat';\n// import flatten from 'flat';\n\n// import themeVariables from './theme-default';\n// import themeForestVariables from './theme-forest';\n// import themeNeutralVariables from './theme-neutral';\n\nconst handleThemeVariables = value => {\n return theme[value] ? theme[value].getThemeVariables() : theme.default.getThemeVariables();\n};\n\nconst manipulators = {\n themeVariables: handleThemeVariables\n};\n\n/**\n * **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more[[click here](8.6.0_docs.md)].**\n *\n * ## **What follows are config instructions for older versions**\n * These are the default options which can be overridden with the initialization call like so:\n * **Example 1:**\n *
\n * mermaid.initialize({\n * flowchart:{\n * htmlLabels: false\n * }\n * });\n *\n *\n * **Example 2:**\n *
\n * <script>\n * var config = {\n * startOnLoad:true,\n * flowchart:{\n * useMaxWidth:true,\n * htmlLabels:true,\n * curve:'cardinal',\n * },\n *\n * securityLevel:'loose',\n * };\n * mermaid.initialize(config);\n * </script>\n *\n * A summary of all options and their defaults is found [here](#mermaidapi-configuration-defaults). A description of each option follows below.\n *\n * @name Configuration\n */\nconst config = {\n /** theme , the CSS style sheet\n *\n * theme , the CSS style sheet\n *\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| Theme |Built in Themes| String | Optional | Values include, default, forest, dark, neutral, null|\n *\n ***Notes:**To disable any pre-defined mermaid theme, use \"null\".\n *
\n * \"theme\": \"forest\",\n * \"themeCSS\": \".node rect { fill: red; }\"\n *\n */\n theme: 'default',\n themeVariables: theme['default'].getThemeVariables(),\n themeCSS: undefined,\n /* **maxTextSize** - The maximum allowed size of the users text diamgram */\n maxTextSize: 50000,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *|fontFamily | specifies the font to be used in the rendered diagrams| String | Required | Verdana, Arial, Trebuchet MS,|\n *\n ***notes: Default value is \\\\\"trebuchet ms\\\\\".\n */\n fontFamily: '\"trebuchet ms\", verdana, arial;',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| logLevel |This option decides the amount of logging to be used.| String | Required | 1, 2, 3, 4, 5 |\n *\n *\n ***Notes:**\n *- debug: 1.\n *- info: 2.\n *- warn: 3.\n *- error: 4.\n *- fatal: 5(default).\n */\n logLevel: 5,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| securitylevel | Level of trust for parsed diagram|String | Required | Strict, Loose, antiscript |\n *\n ***Notes:\n *- **strict**: (**default**) tags in text are encoded, click functionality is disabeled\n *- **loose**: tags in text are allowed, click functionality is enabled\n *- **antiscript**: html tags in text are allowed, (only script element is removed), click functionality is enabled\n */\n securityLevel: 'strict',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| startOnLoad| Dictates whether mermaind starts on Page load | Boolean | Required | True, False |\n *\n ***Notes:**\n ***Default value: true**\n */\n startOnLoad: true,\n\n /**\n *| Parameter | Description |Type | Required |Values|\n *| --- | --- | --- | --- | --- |\n *| arrowMarkerAbsolute | Controls whether or arrow markers in html code are absolute paths or anchors | Boolean | Required | True, False |\n *\n *\n *## Notes**: This matters if you are using base tag settings.\n ***Default value: false**.\n */\n arrowMarkerAbsolute: false,\n\n /**\n * This option controls which currentConfig keys are considered _secure_ and can only be changed via\n * call to mermaidAPI.initialize. Calls to mermaidAPI.reinitialize cannot make changes to\n * the `secure` keys in the current currentConfig. This prevents malicious graph directives from\n * overriding a site's default security.\n */\n secure: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'],\n\n /**\n * The object containing configurations specific for flowcharts\n */\n flowchart: {\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramPadding | amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |\n *\n ***Notes:**The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels\n ***Default value: 8**.\n */\n diagramPadding: 8,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| htmlLabels | Flag for setting whether or not a html tag should be used for rendering labels on the edges. | Boolean| Required | True, False|\n *\n ***Notes: Default value: true**.\n */\n htmlLabels: true,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| nodeSpacing | Defines the spacing between nodes on the same level | Integer| Required | Any positive Numbers |\n *\n ***Notes:\n *Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, and the vertical spacing for LR as well as RL graphs.**\n ***Default value 50**.\n */\n nodeSpacing: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| rankSpacing | Defines the spacing between nodes on different levels | Integer | Required| Any Positive Numbers |\n *\n ***Notes: pertains to vertical spacing for TB (top to bottom) or BT (bottom to top), and the horizontal spacing for LR as well as RL graphs.\n ***Default value 50**.\n */\n rankSpacing: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| curve | Defines how mermaid renders curves for flowcharts. | String | Required | Basis, Linear, Cardinal|\n *\n ***Notes:\n *Default Vaue: Linear**\n */\n curve: 'linear',\n // Only used in new experimental rendering\n // repreesents the padding between the labels and the shape\n padding: 15\n },\n\n /**\n * The object containing configurations specific for sequence diagrams\n */\n sequence: {\n /**\n * widt of the activation rect\n * **Default value 10**.\n */\n activationWidth: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramMarginX | margin to the right and left of the sequence diagram | Integer | Required | Any Positive Values |\n *\n ***Notes:**\n ***Default value 50**.\n */\n diagramMarginX: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramMarginY | Margin to the over and under the sequence diagram | Integer | Required | Any Positive Values|\n *\n ***Notes:**\n ***Default value 10**.\n */\n diagramMarginY: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| actorMargin | Margin between actors. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 50**.\n */\n actorMargin: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| width | Width of actor boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 150**.\n */\n width: 150,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| height | Height of actor boxes | Integer | Required | Any Positive Value|\n *\n ***Notes:**\n ***Default value 65**..\n */\n height: 65,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n *\n ***Default value 10**.\n */\n boxMargin: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| boxTextMargin| margin around the text in loop/alt/opt boxes | Integer | Required| Any Positive Value|\n *\n ***Notes:**\n *\n ***Default value 5**.\n */\n boxTextMargin: 5,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteMargin | margin around notes. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n *\n ***Default value 10**.\n */\n noteMargin: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageMargin | Space between messages. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n *\n *Space between messages.\n ***Default value 35**.\n */\n messageMargin: 35,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageAlign | Multiline message alignment | Integer | Required | left, center, right |\n *\n ***Notes:**center **default**\n */\n messageAlign: 'center',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| mirrorActors | mirror actors under diagram. | Boolean| Required | True, False |\n *\n ***Notes:**\n *\n ***Default value true**.\n */\n mirrorActors: true,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| bottomMarginAdj | Prolongs the edge of the diagram downwards. | Integer | Required | Any Positive Value |\n *\n ***Notes:**Depending on css styling this might need adjustment.\n ***Default value 1**.\n */\n bottomMarginAdj: 1,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See Notes | Boolean | Required | True, False |\n *\n ***Notes:**\n *when this flag is set to true, the height and width is set to 100% and is then scaling with the\n *available space. If set to false, the absolute space required is used.\n ***Default value: True**.\n */\n useMaxWidth: true,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| rightAngles | display curve arrows as right angles| Boolean | Required | True, False |\n *\n ***Notes:**\n *\n *This will display arrows that start and begin at the same node as right angles, rather than a curve\n ***Default value false**.\n */\n rightAngles: false,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| showSequenceNumbers | This will show the node numbers | Boolean | Required | True, False |\n *\n ***Notes:**\n ***Default value false**.\n */\n showSequenceNumbers: false,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| actorFontSize| This sets the font size of the actor's description | Integer | Require | Any Positive Value |\n *\n ***Notes:**\n ***Default value 14**..\n */\n actorFontSize: 14,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| actorFontFamily |This sets the font family of the actor's description | 3 | 4 | Open-Sans, Sans-Serif |\n *\n ***Notes:**\n ***Default value \"Open-Sans\", \"sans-serif\"**.\n */\n actorFontFamily: '\"Open-Sans\", \"sans-serif\"',\n /**\n * This sets the font weight of the actor's description\n * **Default value 400.\n */\n actorFontWeight: 400,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteFontSize |This sets the font size of actor-attached notes. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 14**..\n */\n noteFontSize: 14,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteFontFamily| This sets the font family of actor-attached notes. | String | Required | trebuchet ms, verdana, arial |\n *\n ***Notes:**\n ***Default value: trebuchet ms **.\n */\n noteFontFamily: '\"trebuchet ms\", verdana, arial',\n /**\n * This sets the font weight of the note's description\n * **Default value 400.\n */\n noteFontWeight: 400,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteAlign | This sets the text alignment of actor-attached notes. | string | required | left, center, right|\n *\n ***Notes:**\n ***Default value center**.\n */\n noteAlign: 'center',\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageFontSize | This sets the font size of actor messages. | Integer | Required | Any Positive Number |\n *\n ***Notes:**\n ***Default value 16**.\n */\n messageFontSize: 16,\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageFontFamily | This sets the font family of actor messages. | String| Required | trebuchet ms\", verdana, aria |\n *\n ***Notes:**\n ***Default value:\"trebuchet ms**.\n */\n messageFontFamily: '\"trebuchet ms\", verdana, arial',\n /**\n * This sets the font weight of the message's description\n * **Default value 400.\n */\n messageFontWeight: 400,\n /**\n * This sets the auto-wrap state for the diagram\n * **Default value false.\n */\n wrap: false,\n /**\n * This sets the auto-wrap padding for the diagram (sides only)\n * **Default value 10.\n */\n wrapPadding: 10,\n /**\n * This sets the width of the loop-box (loop, alt, opt, par)\n * **Default value 50.\n */\n labelBoxWidth: 50,\n /**\n * This sets the height of the loop-box (loop, alt, opt, par)\n * **Default value 20.\n */\n labelBoxHeight: 20,\n messageFont: function() {\n return {\n fontFamily: this.messageFontFamily,\n fontSize: this.messageFontSize,\n fontWeight: this.messageFontWeight\n };\n },\n noteFont: function() {\n return {\n fontFamily: this.noteFontFamily,\n fontSize: this.noteFontSize,\n fontWeight: this.noteFontWeight\n };\n },\n actorFont: function() {\n return {\n fontFamily: this.actorFontFamily,\n fontSize: this.actorFontSize,\n fontWeight: this.actorFontWeight\n };\n }\n },\n\n /**\n * The object containing configurations specific for gantt diagrams*\n */\n gantt: {\n /**\n *### titleTopMargin\n *\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| titleTopMargin | Margin top for the text over the gantt diagram | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 25**.\n */\n titleTopMargin: 25,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| barHeight | The height of the bars in the graph | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 20**.\n */\n barHeight: 20,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| barGap | The margin between the different activities in the gantt diagram. | Integer | Optional |Any Positive Value |\n *\n ***Notes:**\n ***Default value 4**.\n */\n barGap: 4,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| topPadding | Margin between title and gantt diagram and between axis and gantt diagram. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 50**.\n */\n topPadding: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| leftPadding | The space allocated for the section name to the left of the activities. | Integer| Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 75**.\n */\n leftPadding: 75,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| gridLineStartPadding | Vertical starting position of the grid lines. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 35**.\n */\n gridLineStartPadding: 35,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| fontSize | Font size| Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 11**.\n */\n fontSize: 11,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| fontFamily | font Family | string | required |\"Open-Sans\", \"sans-serif\" |\n *\n ***Notes:**\n *\n ***Default value '\"Open-Sans\", \"sans-serif\"'**.\n */\n fontFamily: '\"Open-Sans\", \"sans-serif\"',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| numberSectionStyles | The number of alternating section styles | Integer | 4 | Any Positive Value |\n *\n ***Notes:**\n ***Default value 4**.\n */\n numberSectionStyles: 4,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| axisFormat | Datetime format of the axis. | 3 | Required | Date in yy-mm-dd |\n *\n ***Notes:**\n *\n * This might need adjustment to match your locale and preferences\n ***Default value '%Y-%m-%d'**.\n */\n axisFormat: '%Y-%m-%d'\n },\n /**\n * The object containing configurations specific for sequence diagrams\n */\n journey: {\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramMarginX | margin to the right and left of the sequence diagram | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 50**.\n */\n diagramMarginX: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramMarginY | margin to the over and under the sequence diagram. | Integer | Required | Any Positive Value|\n *\n ***Notes:**\n ***Default value 10**..\n */\n diagramMarginY: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| actorMargin | Margin between actors. | Integer | Required | Any Positive Value|\n *\n ***Notes:**\n ***Default value 50**.\n */\n actorMargin: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| width | Width of actor boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 150**.\n */\n width: 150,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| height | Height of actor boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 65**.\n */\n height: 65,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 10**.\n */\n boxMargin: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| boxTextMargin | margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n */\n boxTextMargin: 5,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteMargin | margin around notes. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 10**.\n */\n noteMargin: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageMargin |Space between messages. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n *\n *Space between messages.\n ***Default value 35**.\n */\n messageMargin: 35,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageAlign |Multiline message alignment | 3 | 4 | left, center, right |\n *\n ***Notes:**default:center**\n */\n messageAlign: 'center',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| bottomMarginAdj | Prolongs the edge of the diagram downwards. | Integer | 4 | Any Positive Value |\n *\n ***Notes:**Depending on css styling this might need adjustment.\n ***Default value 1**.\n */\n bottomMarginAdj: 1,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See notes | Boolean | 4 | True, False |\n *\n ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the\n *available space if not the absolute space required is used.\n *\n ***Default value true**.\n */\n useMaxWidth: true,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| rightAngles | Curved Arrows become Right Angles, | 3 | 4 | True, False |\n *\n ***Notes:**This will display arrows that start and begin at the same node as right angles, rather than a curves\n ***Default value false**.\n */\n rightAngles: false\n },\n class: {\n arrowMarkerAbsolute: false\n },\n git: {\n arrowMarkerAbsolute: false\n },\n state: {\n dividerMargin: 10,\n sizeUnit: 5,\n padding: 8,\n textHeight: 10,\n titleShift: -15,\n noteMargin: 10,\n forkWidth: 70,\n forkHeight: 7,\n // Used\n miniPadding: 2,\n // Font size factor, this is used to guess the width of the edges labels before rendering by dagre\n // layout. This might need updating if/when switching font\n fontSizeFactor: 5.02,\n fontSize: 24,\n labelHeight: 16,\n edgeLengthFactor: '20',\n compositTitleSize: 35,\n radius: 5\n },\n\n /**\n * The object containing configurations specific for entity relationship diagrams\n */\n er: {\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramPadding | amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |\n *\n ***Notes:**The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels\n ***Default value: 20**.\n */\n diagramPadding: 20,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| layoutDirection | Directional bias for layout of entities. | String | Required | \"TB\", \"BT\",\"LR\",\"RL\" |\n *\n ***Notes:**\n *'TB' for Top-Bottom, 'BT'for Bottom-Top, 'LR' for Left-Right, or 'RL' for Right to Left.\n * T = top, B = bottom, L = left, and R = right.\n ***Default value: TB **.\n */\n layoutDirection: 'TB',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| minEntityWidth | The mimimum width of an entity box, | Integer | Required| Any Positive Value |\n *\n ***Notes:**expressed in pixels\n ***Default value: 100**.\n */\n minEntityWidth: 100,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| minEntityHeight| The minimum height of an entity box, | Integer | 4 | Any Positive Value |\n *\n ***Notes:**expressed in pixels\n ***Default value: 75 **\n */\n minEntityHeight: 75,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| entityPadding|minimum internal padding betweentext in box and box borders| Integer | 4 | Any Positive Value |\n *\n ***Notes:**The minimum internal padding betweentext in an entity box and the enclosing box borders, expressed in pixels.\n ***Default value: 15 **\n */\n entityPadding: 15,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| stroke | Stroke color of box edges and lines | String | 4 | Any recognized color |\n ***Default value: gray **\n */\n stroke: 'gray',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| fill | Fill color of entity boxes | String | 4 | Any recognized color |\n *\n ***Notes:**\n ***Default value:'honeydew'**\n */\n fill: 'honeydew',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| fontSize| Font Size in pixels| Integer | | Any Positive Value |\n *\n ***Notes:**Font size (expressed as an integer representing a number of pixels)\n ***Default value: 12 **\n */\n fontSize: 12,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See Notes | Boolean | Required | true, false |\n *\n ***Notes:**\n *When this flag is set to true, the diagram width is locked to 100% and\n *scaled based on available space. If set to false, the diagram reserves its\n *absolute width.\n ***Default value: true**.\n */\n useMaxWidth: true\n }\n};\n\n// debugger;\nconfig.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;\nconfig.git.arrowMarkerAbsolute = config.arrowMarkerAbsolute;\nexport const defaultConfig = Object.freeze(config);\n\nconst siteConfig = assignWithDepth({}, defaultConfig);\nconst currentConfig = assignWithDepth({}, defaultConfig);\n\n/**\n *## setSiteConfig\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array|\n ***Notes:**\n *Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset\n *the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig\n *to the defaultConfig\n *Note: currentConfig is set in this function\n **Default value: At default, will mirror Global Config**\n * @param conf - the base currentConfig to use as siteConfig\n * @returns {*} - the siteConfig\n */\nexport const setSiteConfig = conf => {\n Object.keys(conf).forEach(key => {\n const manipulator = manipulators[key];\n conf[key] = manipulator ? manipulator(conf[key]) : conf[key];\n });\n\n assignWithDepth(currentConfig, conf, { clobber: true });\n // Set theme variables if user has set the theme option\n assignWithDepth(siteConfig, conf);\n\n return getSiteConfig();\n};\n/**\n *## getSiteConfig\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig|\n ***Notes**:\n *Returns **any** values in siteConfig.\n * @returns {*}\n */\nexport const getSiteConfig = () => {\n return assignWithDepth({}, siteConfig);\n};\n/**\n *## setConfig\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Sets the siteConfig to desired values | Put Request| Any Values, except ones in secure array|\n ***Notes**:\n *Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure keys. Any\n *values found in conf with key found in siteConfig.secure will be replaced with the corresponding\n *siteConfig value.\n * @param conf - the potential currentConfig\n * @returns {*} - the currentConfig merged with the sanitized conf\n */\nexport const setConfig = conf => {\n sanitize(conf);\n Object.keys(conf).forEach(key => {\n const manipulator = manipulators[key];\n conf[key] = manipulator ? manipulator(conf[key]) : conf[key];\n });\n\n assignWithDepth(currentConfig, conf);\n return getConfig();\n};\n/**\n * ## getConfig\n *| Function | Description | Type | Return Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| getConfig |Obtains the currentConfig | Get Request | Any Values from currentConfig|\n ***Notes**:\n *Returns **any** the currentConfig\n * @returns {*} - the currentConfig\n */\nexport const getConfig = () => {\n return assignWithDepth({}, currentConfig);\n};\n/**\n *## sanitize\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| sanitize |Sets the siteConfig to desired values. | Put Request |None|\n *Ensures options parameter does not attempt to override siteConfig secure keys\n *Note: modifies options in-place\n * @param options - the potential setConfig parameter\n */\nexport const sanitize = options => {\n Object.keys(siteConfig.secure).forEach(key => {\n if (typeof options[siteConfig.secure[key]] !== 'undefined') {\n // DO NOT attempt to print options[siteConfig.secure[key]] within `${}` as a malicious script\n // can exploit the logger's attempt to stringify the value and execute arbitrary code\n logger.warn(\n `Denied attempt to modify a secure key ${siteConfig.secure[key]}`,\n options[siteConfig.secure[key]]\n );\n delete options[siteConfig.secure[key]];\n }\n });\n};\n/**\n *## reset\n *| Function | Description | Type | Required | Values |\n *| --------- | ------------------- | ------- | -------- | ------------------ |\n *| reset|Resets currentConfig to conf| Put Request | Required | None|\n *\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| conf| base set of values, which currentConfig coul be **reset** to.| Dictionary | Required | Any Values, with respect to the secure Array|\n *\n **Notes :\n (default: current siteConfig ) (optional, default `getSiteConfig()`)\n * @param conf - the base currentConfig to reset to (default: current siteConfig )\n */\nexport const reset = (conf = getSiteConfig()) => {\n Object.keys(siteConfig).forEach(key => delete siteConfig[key]);\n Object.keys(currentConfig).forEach(key => delete currentConfig[key]);\n assignWithDepth(siteConfig, conf, { clobber: true });\n assignWithDepth(currentConfig, conf, { clobber: true });\n};\n\nconst configApi = Object.freeze({\n sanitize,\n setSiteConfig,\n getSiteConfig,\n setConfig,\n getConfig,\n reset,\n defaultConfig\n});\nexport default configApi;\n","import intersectRect from './intersect/intersect-rect';\nimport { logger as log } from '../logger'; // eslint-disable-line\nimport createLabel from './createLabel';\nimport { select } from 'd3';\nimport { getConfig } from '../config';\n\nconst rect = (parent, node) => {\n log.trace('Creating subgraph rect for ', node.id, node);\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'cluster')\n .attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n\n const text = label\n .node()\n .appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (getConfig().flowchart.htmlLabels) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n log.trace('Data ', node, JSON.stringify(node));\n // center the rect around its coordinate\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding);\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' +\n (node.x - bbox.width / 2) +\n ', ' +\n (node.y - node.height / 2 - node.padding / 3 + 3) +\n ')'\n );\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function(point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\n/**\n * Non visiable cluster where the note is group with its\n */\nconst noteGroup = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'note-cluster')\n .attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding)\n .attr('fill', 'none');\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function(point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\nconst roundedWithTitle = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', node.classes)\n .attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n const innerRect = shapeSvg.append('rect');\n\n const text = label\n .node()\n .appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n if (getConfig().flowchart.htmlLabels) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n bbox = text.getBBox();\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('class', 'outer')\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding);\n innerRect\n .attr('class', 'inner')\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding - bbox.height - 3);\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' +\n (node.x - bbox.width / 2) +\n ', ' +\n (node.y - node.height / 2 - node.padding / 3 + (getConfig().flowchart.htmlLabels ? 5 : 3)) +\n ')'\n );\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function(point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst divider = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', node.classes)\n .attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('class', 'divider')\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding);\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function(point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst shapes = { rect, roundedWithTitle, noteGroup, divider };\n\nlet clusterElems = {};\n\nexport const insertCluster = (elem, node) => {\n log.trace('Inserting cluster');\n const shape = node.shape || 'rect';\n clusterElems[node.id] = shapes[shape](elem, node);\n};\nexport const getClusterTitleWidth = (elem, node) => {\n const label = createLabel(node.labelText, node.labelStyle, undefined, true);\n elem.node().appendChild(label);\n const width = label.getBBox().width;\n elem.node().removeChild(label);\n return width;\n};\n\nexport const clear = () => {\n clusterElems = {};\n};\n\nexport const positionCluster = node => {\n log.info('Position cluster');\n const el = clusterElems[node.id];\n\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n};\n","import { select } from 'd3';\nimport { logger } from '../logger'; // eslint-disable-line\n// let vertexNode;\n// if (getConfig().flowchart.htmlLabels) {\n// // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n// const node = {\n// label: vertexText.replace(/fa[lrsb]?:fa-[\\w-]+/g, s => ``)\n// };\n// vertexNode = addHtmlLabel(svg, node).node();\n// vertexNode.parentNode.removeChild(vertexNode);\n// } else {\n// const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n// svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n\n// const rows = vertexText.split(common.lineBreakRegex);\n\n// for (let j = 0; j < rows.length; j++) {\n// const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n// tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n// tspan.setAttribute('dy', '1em');\n// tspan.setAttribute('x', '1');\n// tspan.textContent = rows[j];\n// svgLabel.appendChild(tspan);\n// }\n// vertexNode = svgLabel;\n// }\nimport { getConfig } from '../config';\n\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr('style', styleFn);\n }\n}\n\nfunction addHtmlLabel(node) {\n // var fo = root.append('foreignObject').attr('width', '100000');\n\n // var div = fo.append('xhtml:div');\n // div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n\n // var label = node.label;\n // switch (typeof label) {\n // case 'function':\n // div.insert(label);\n // break;\n // case 'object':\n // // Currently we assume this is a DOM object.\n // div.insert(function() {\n // return label;\n // });\n // break;\n // default:\n // div.html(label);\n // }\n\n // applyStyle(div, node.labelStyle);\n // div.style('display', 'inline-block');\n // // Fix for firefox\n // div.style('white-space', 'nowrap');\n\n // var client = div.node().getBoundingClientRect();\n // fo.attr('width', client.width).attr('height', client.height);\n const fo = select(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject'));\n const div = fo.append('xhtml:div');\n\n const label = node.label;\n const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n div.html('' + label + '');\n\n applyStyle(div, node.labelStyle);\n div.style('display', 'inline-block');\n // Fix for firefox\n div.style('white-space', 'nowrap');\n div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n return fo.node();\n}\n\nconst createLabel = (_vertexText, style, isTitle, isNode) => {\n let vertexText = _vertexText || '';\n if (getConfig().flowchart.htmlLabels) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n vertexText = vertexText.replace(/\\\\n|\\n/g, '
\n *\n * <script>\n * var config = {\n * theme:'default',\n * logLevel:'fatal',\n * securityLevel:'strict',\n * startOnLoad:true,\n * arrowMarkerAbsolute:false,\n *\n * er:{\n * diagramPadding:20,\n * layoutDirection:'TB',\n * minEntityWidth:100,\n * minEntityHeight:75,\n * entityPadding:15,\n * stroke:'gray',\n * fill:'honeydew',\n * fontSize:12,\n * useMaxWidth:true,\n * },\n * flowchart:{\n * diagramPadding:8,\n * htmlLabels:true,\n * curve:'linear',\n * },\n * sequence:{\n * diagramMarginX:50,\n * diagramMarginY:10,\n * actorMargin:50,\n * width:150,\n * height:65,\n * boxMargin:10,\n * boxTextMargin:5,\n * noteMargin:10,\n * messageMargin:35,\n * messageAlign:'center',\n * mirrorActors:true,\n * bottomMarginAdj:1,\n * useMaxWidth:true,\n * rightAngles:false,\n * showSequenceNumbers:false,\n * },\n * gantt:{\n * titleTopMargin:25,\n * barHeight:20,\n * barGap:4,\n * topPadding:50,\n * leftPadding:75,\n * gridLineStartPadding:35,\n * fontSize:11,\n * fontFamily:'\"Open-Sans\", \"sans-serif\"',\n * numberSectionStyles:4,\n * axisFormat:'%Y-%m-%d',\n * }\n * };\n * mermaid.initialize(config);\n * </script>\n *\n */\n","import classDiagram from './diagrams/class/styles';\nimport er from './diagrams/er/styles';\nimport flowchart from './diagrams/flowchart/styles';\nimport gantt from './diagrams/gantt/styles';\nimport git from './diagrams/git/styles';\nimport info from './diagrams/info/styles';\nimport pie from './diagrams/pie/styles';\nimport sequence from './diagrams/sequence/styles';\nimport stateDiagram from './diagrams/state/styles';\nimport journey from './diagrams/user-journey/styles';\n\nconst themes = {\n flowchart,\n 'flowchart-v2': flowchart,\n sequence,\n gantt,\n classDiagram,\n 'classDiagram-v2': classDiagram,\n stateDiagram,\n state: stateDiagram,\n git,\n info,\n pie,\n er,\n journey\n};\n\nexport const calcThemeVariables = (theme, userOverRides) => theme.calcColors(userOverRides);\n\nconst getStyles = (type, userStyles, options) => {\n return ` {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n fill: ${options.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ${options.errorBkgColor};\n }\n .error-text {\n fill: ${options.errorTextColor};\n stroke: ${options.errorTextColor};\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ${options.lineColor};\n }\n .marker.cross {\n stroke: ${options.lineColor};\n }\n\n svg {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n }\n\n ${themes[type](options)}\n\n ${userStyles}\n\n ${type} { fill: apa;}\n`;\n};\n\nexport default getStyles;\n","import { getThemeVariables as baseThemeVariables } from './theme-base';\nimport { getThemeVariables as darkThemeVariables } from './theme-dark';\nimport { getThemeVariables as defaultThemeVariables } from './theme-default';\nimport { getThemeVariables as forestThemeVariables } from './theme-forest';\nimport { getThemeVariables as neutralThemeVariables } from './theme-neutral';\n\nexport default {\n base: {\n getThemeVariables: baseThemeVariables\n },\n dark: {\n getThemeVariables: darkThemeVariables\n },\n default: {\n getThemeVariables: defaultThemeVariables\n },\n forest: {\n getThemeVariables: forestThemeVariables\n },\n neutral: {\n getThemeVariables: neutralThemeVariables\n }\n};\n","import { darken, lighten, adjust } from 'khroma';\n\nclass Theme {\n constructor() {\n /* Base variables */\n this.primaryColor = '#039fbe';\n this.secondaryColor = '#b20238';\n this.tertiaryColor = lighten('#e8d21d', 30);\n this.relationColor = '#000';\n this.primaryColor = '#fa255e';\n this.secondaryColor = '#c39ea0';\n this.tertiaryColor = '#f8e5e5';\n\n this.primaryColor = '#ECECFF';\n this.secondaryColor = '#ffffde';\n this.tertiaryColor = '#ffffde';\n\n this.background = 'white';\n this.lineColor = '#333333';\n this.border1 = '#9370DB';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial';\n this.fontSize = '16px';\n this.labelBackground = '#e8e8e8';\n this.textColor = '#333';\n this.noteBkgColor = '#fff5ad';\n this.noteBorderColor = '#aaaa33';\n this.updateColors();\n }\n updateColors() {\n this.secondBkg = this.tertiaryColor;\n\n /* Flowchart variables */\n\n this.nodeBkg = this.primaryColor;\n this.mainBkg = this.primaryColor;\n this.nodeBorder = darken(this.primaryColor, 23); // border 1\n this.clusterBkg = this.tertiaryColor;\n this.clusterBorder = darken(this.tertiaryColor, 10);\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.textColor;\n this.edgeLabelBackground = this.labelBackground;\n\n /* Sequence Diagram variables */\n\n // this.actorBorder = lighten(this.border1, 0.5);\n this.actorBorder = lighten(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.actorTextColor = 'black';\n this.actorLineColor = 'grey';\n this.labelBoxBkgColor = this.actorBkg;\n this.signalColor = this.textColor;\n this.signalTextColor = this.textColor;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n this.activationBorderColor = darken(this.secondaryColor, 10);\n this.activationBkgColor = this.secondaryColor;\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.sectionBkgColor = this.tertiaryColor;\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor = this.secondaryColor;\n this.sectionBkgColor2 = this.tertiaryColor;\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = this.primaryColor;\n this.taskBorderColor = lighten(this.primaryColor, 23);\n this.taskBkgColor = this.primaryColor;\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = this.primaryColor;\n this.activeTaskBkgColor = lighten(this.primaryColor, 23);\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n\n /* state colors */\n this.labelColor = 'black';\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n\n /* state colors */\n\n /* class */\n this.classText = this.textColor;\n\n /* user-journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = userOverrides => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n","import { invert, lighten, darken, rgba, adjust } from 'khroma';\n\nclass Theme {\n constructor() {\n this.background = '#333';\n this.primaryColor = '#1f2020';\n this.secondaryColor = lighten(this.primaryColor, 16);\n this.mainBkg = '#1f2020';\n this.secondBkg = 'calculated';\n this.mainContrastColor = 'lightgrey';\n this.darkTextColor = lighten(invert('#323D47'), 10);\n this.lineColor = 'calculated';\n this.border1 = '#81B1DB';\n this.border2 = rgba(255, 255, 255, 0.25);\n this.arrowheadColor = 'calculated';\n this.fontFamily = '\"trebuchet ms\", verdana, arial';\n this.fontSize = '16px';\n this.labelBackground = '#181818';\n this.textColor = '#ccc';\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = '#F9FFFE';\n this.edgeLabelBackground = 'calculated';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'calculated';\n this.actorLineColor = 'calculated';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = 'calculated';\n this.activationBkgColor = 'calculated';\n this.sequenceNumberColor = 'black';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = darken('#EAE8D9', 30);\n this.altSectionBkgColor = 'calculated';\n this.sectionBkgColor2 = '#EAE8D9';\n this.taskBorderColor = rgba(255, 255, 255, 70);\n this.taskBkgColor = 'calculated';\n this.taskTextColor = 'calculated';\n this.taskTextLightColor = 'calculated';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = rgba(255, 255, 255, 50);\n this.activeTaskBkgColor = '#81B1DB';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#E83737';\n this.critBkgColor = '#E83737';\n this.taskTextDarkColor = 'calculated';\n this.todayLineColor = '#DB5757';\n\n /* state colors */\n this.labelColor = 'calculated';\n\n this.errorBkgColor = '#a44141';\n this.errorTextColor = '#ddd';\n }\n updateColors() {\n this.secondBkg = lighten(this.mainBkg, 16);\n this.lineColor = this.mainContrastColor;\n this.arrowheadColor = this.mainContrastColor;\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.edgeLabelBackground = lighten(this.labelBackground, 25);\n\n /* Sequence Diagram variables */\n\n this.actorBorder = this.border1;\n this.actorBkg = this.mainBkg;\n this.actorTextColor = this.mainContrastColor;\n this.actorLineColor = this.mainContrastColor;\n this.signalColor = this.mainContrastColor;\n this.signalTextColor = this.mainContrastColor;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.mainContrastColor;\n this.loopTextColor = this.mainContrastColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.mainBkg;\n this.activationBorderColor = this.border1;\n this.activationBkgColor = this.secondBkg;\n\n /* Gantt chart variables */\n\n this.altSectionBkgColor = this.background;\n this.taskBkgColor = lighten(this.mainBkg, 23);\n this.taskTextColor = this.darkTextColor;\n this.taskTextLightColor = this.mainContrastColor;\n this.taskTextOutsideColor = this.taskTextLightColor;\n this.gridColor = this.mainContrastColor;\n this.doneTaskBkgColor = this.mainContrastColor;\n this.taskTextDarkColor = this.darkTextColor;\n\n /* state colors */\n this.labelColor = this.textColor;\n this.altBackground = lighten(this.background, 20);\n\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n /* class */\n this.classText = this.nodeBorder;\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = userOverrides => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n","import { lighten, rgba, adjust } from 'khroma';\n\nclass Theme {\n constructor() {\n /* Base variables */\n this.primaryColor = '#ECECFF';\n this.secondaryColor = '#ffffde';\n this.background = 'white';\n this.mainBkg = '#ECECFF';\n this.secondBkg = '#ffffde';\n this.lineColor = '#333333';\n this.border1 = '#9370DB';\n this.border2 = '#aaaa33';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial';\n this.fontSize = '16px';\n this.labelBackground = '#e8e8e8';\n this.textColor = '#333';\n\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = 'calculated';\n this.edgeLabelBackground = 'calculated';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'black';\n this.actorLineColor = 'grey';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = 'calculated';\n this.altSectionBkgColor = 'calculated';\n this.sectionBkgColor2 = 'calculated';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = 'calculated';\n this.taskTextLightColor = 'calculated';\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextDarkColor = 'calculated';\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.taskTextClickableColor = 'calculated';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'calculated';\n this.critBorderColor = 'calculated';\n this.critBkgColor = 'calculated';\n this.todayLineColor = 'calculated';\n\n this.sectionBkgColor = rgba(102, 102, 255, 0.49);\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = '#fff400';\n this.taskBorderColor = '#534fbc';\n this.taskBkgColor = '#8a90dd';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = '#534fbc';\n this.activeTaskBkgColor = '#bfc7ff';\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n\n /* state colors */\n this.labelColor = 'black';\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n this.updateColors();\n }\n updateColors() {\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1; // border 1\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.textColor;\n this.edgeLabelBackground = this.labelBackground;\n\n /* Sequence Diagram variables */\n\n // this.actorBorder = lighten(this.border1, 0.5);\n this.actorBorder = lighten(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.labelBoxBkgColor = this.actorBkg;\n this.signalColor = this.textColor;\n this.signalTextColor = this.textColor;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n\n /* Gantt chart variables */\n\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n\n /* state colors */\n /* class */\n this.classText = this.nodeBorder;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = userOverrides => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n","import { darken, adjust } from 'khroma';\nclass Theme {\n constructor() {\n /* Base vales */\n this.primaryColor = '#cde498';\n this.secondaryColor = '#cdffb2';\n this.background = 'white';\n this.mainBkg = '#cde498';\n this.secondBkg = '#cdffb2';\n this.lineColor = 'green';\n this.border1 = '#13540c';\n this.border2 = '#6eaa49';\n this.arrowheadColor = 'green';\n this.fontFamily = '\"trebuchet ms\", verdana, arial';\n this.fontSize = '16px';\n\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = '#333';\n this.edgeLabelBackground = '#e8e8e8';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'black';\n this.actorLineColor = 'grey';\n this.signalColor = '#333';\n this.signalTextColor = '#333';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = '#326932';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = '#6eaa49';\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = '#6eaa49';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = '#487e3a';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n\n /* state colors */\n this.labelColor = 'black';\n\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n }\n updateColors() {\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n\n /* Sequence Diagram variables */\n\n this.actorBorder = darken(this.mainBkg, 20);\n this.actorBkg = this.mainBkg;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n\n /* Gantt chart variables */\n\n this.taskBorderColor = this.border1;\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.activeTaskBorderColor = this.taskBorderColor;\n this.activeTaskBkgColor = this.mainBkg;\n\n /* state colors */\n /* class */\n this.classText = this.nodeBorder;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = userOverrides => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n","import { darken, lighten, adjust } from 'khroma';\n\n// const Color = require ( 'khroma/dist/color' ).default\n// Color.format.hex.stringify(Color.parse('hsl(210, 66.6666666667%, 95%)')); // => \"#EAF2FB\"\n\nclass Theme {\n constructor() {\n this.primaryColor = '#eee';\n this.contrast = '#26a';\n this.secondaryColor = lighten(this.contrast, 55);\n this.background = 'white';\n this.mainBkg = '#eee';\n this.secondBkg = 'calculated';\n this.lineColor = '#666';\n this.border1 = '#999';\n this.border2 = 'calculated';\n this.note = '#ffa';\n this.text = '#333';\n this.critical = '#d42';\n this.done = '#bbb';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial';\n this.fontSize = '16px';\n\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = 'calculated';\n this.edgeLabelBackground = 'white';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'calculated';\n this.actorLineColor = 'calculated';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = 'calculated';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = 'calculated';\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = 'calculated';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = 'calculated';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'calculated';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'calculated';\n this.critBkgColor = 'calculated';\n this.critBorderColor = 'calculated';\n this.todayLineColor = 'calculated';\n\n /* state colors */\n this.labelColor = 'black';\n\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n }\n updateColors() {\n this.secondBkg = lighten(this.contrast, 55);\n this.border2 = this.contrast;\n\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.text;\n\n /* Sequence Diagram variables */\n\n this.actorBorder = lighten(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.actorTextColor = this.text;\n this.actorLineColor = this.lineColor;\n this.signalColor = this.text;\n this.signalTextColor = this.text;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.text;\n this.loopTextColor = this.text;\n this.noteBorderColor = darken(this.note, 60);\n this.noteBkgColor = this.note;\n this.noteTextColor = this.actorTextColor;\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = lighten(this.contrast, 30);\n this.sectionBkgColor2 = lighten(this.contrast, 30);\n\n this.taskBorderColor = darken(this.contrast, 10);\n\n this.taskBkgColor = this.contrast;\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextDarkColor = this.text;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.activeTaskBorderColor = this.taskBorderColor;\n this.activeTaskBkgColor = this.mainBkg;\n this.gridColor = lighten(this.border1, 30);\n\n this.doneTaskBkgColor = this.done;\n this.doneTaskBorderColor = this.lineColor;\n this.critBkgColor = this.critical;\n this.critBorderColor = darken(this.critBkgColor, 10);\n\n this.todayLineColor = this.critBkgColor;\n\n /* state colors */\n /* class */\n this.classText = this.nodeBorder;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = userOverrides => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n console.info('Theme', userOverrides, theme);\n return theme;\n};\n","import {\n curveBasis,\n curveBasisClosed,\n curveBasisOpen,\n curveLinear,\n curveLinearClosed,\n curveMonotoneX,\n curveMonotoneY,\n curveNatural,\n curveStep,\n curveStepAfter,\n curveStepBefore,\n select\n} from 'd3';\nimport { logger } from './logger';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\nimport common from './diagrams/common/common';\n// import cryptoRandomString from 'crypto-random-string';\n\n// Effectively an enum of the supported curve types, accessible by name\nconst d3CurveTypes = {\n curveBasis: curveBasis,\n curveBasisClosed: curveBasisClosed,\n curveBasisOpen: curveBasisOpen,\n curveLinear: curveLinear,\n curveLinearClosed: curveLinearClosed,\n curveMonotoneX: curveMonotoneX,\n curveMonotoneY: curveMonotoneY,\n curveNatural: curveNatural,\n curveStep: curveStep,\n curveStepAfter: curveStepAfter,\n curveStepBefore: curveStepBefore\n};\nconst directive = /[%]{2}[{]\\s*(?:(?:(\\w+)\\s*:|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi;\nconst directiveWithoutOpen = /\\s*(?:(?:(\\w+)(?=:):|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi;\nconst anyComment = /\\s*%%.*\\n/gm;\n\n/**\n * @function detectInit\n * Detects the init config object from the text\n * ```mermaid\n * %%{init: {\"theme\": \"debug\", \"logLevel\": 1 }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n * or\n * ```mermaid\n * %%{initialize: {\"theme\": \"dark\", logLevel: \"debug\" }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @returns {object} the json object representing the init passed to mermaid.initialize()\n */\nexport const detectInit = function(text) {\n let inits = detectDirective(text, /(?:init\\b)|(?:initialize\\b)/);\n let results = {};\n if (Array.isArray(inits)) {\n let args = inits.map(init => init.args);\n results = assignWithDepth(results, [...args]);\n } else {\n results = inits.args;\n }\n if (results) {\n let type = detectType(text);\n ['config'].forEach(prop => {\n if (typeof results[prop] !== 'undefined') {\n if (type === 'flowchart-v2') {\n type = 'flowchart';\n }\n results[type] = results[prop];\n delete results[prop];\n }\n });\n }\n return results;\n};\n\n/**\n * @function detectDirective\n * Detects the directive from the text. Text can be single line or multiline. If type is null or omitted\n * the first directive encountered in text will be returned\n * ```mermaid\n * graph LR\n * %%{somedirective}%%\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @param {string|RegExp} type The directive to return (default: null)\n * @returns {object | Array} An object or Array representing the directive(s): { type: string, args: object|null } matched by the input type\n * if a single directive was found, that directive object will be returned.\n */\nexport const detectDirective = function(text, type = null) {\n try {\n const commentWithoutDirectives = new RegExp(\n `[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*\\n`,\n 'ig'\n );\n text = text\n .trim()\n .replace(commentWithoutDirectives, '')\n .replace(/'/gm, '\"');\n logger.debug(\n `Detecting diagram directive${type !== null ? ' type:' + type : ''} based on the text:${text}`\n );\n let match,\n result = [];\n while ((match = directive.exec(text)) !== null) {\n // This is necessary to avoid infinite loops with zero-width matches\n if (match.index === directive.lastIndex) {\n directive.lastIndex++;\n }\n if (\n (match && !type) ||\n (type && match[1] && match[1].match(type)) ||\n (type && match[2] && match[2].match(type))\n ) {\n let type = match[1] ? match[1] : match[2];\n let args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null;\n result.push({ type, args });\n }\n }\n if (result.length === 0) {\n result.push({ type: text, args: null });\n }\n\n return result.length === 1 ? result[0] : result;\n } catch (error) {\n logger.error(\n `ERROR: ${error.message} - Unable to parse directive${\n type !== null ? ' type:' + type : ''\n } based on the text:${text}`\n );\n return { type: null, args: null };\n }\n};\n\n/**\n * @function detectType\n * Detects the type of the graph text. Takes into consideration the possible existence of an %%init\n * directive\n * ```mermaid\n * %%{initialize: {\"startOnLoad\": true, logLevel: \"fatal\" }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @returns {string} A graph definition key\n */\nexport const detectType = function(text) {\n text = text.replace(directive, '').replace(anyComment, '\\n');\n logger.debug('Detecting diagram type based on the text ' + text);\n if (text.match(/^\\s*sequenceDiagram/)) {\n return 'sequence';\n }\n\n if (text.match(/^\\s*gantt/)) {\n return 'gantt';\n }\n if (text.match(/^\\s*classDiagram-v2/)) {\n return 'classDiagram';\n }\n if (text.match(/^\\s*classDiagram/)) {\n return 'class';\n }\n\n if (text.match(/^\\s*stateDiagram-v2/)) {\n return 'stateDiagram';\n }\n\n if (text.match(/^\\s*stateDiagram/)) {\n return 'state';\n }\n\n if (text.match(/^\\s*gitGraph/)) {\n return 'git';\n }\n if (text.match(/^\\s*flowchart/)) {\n return 'flowchart-v2';\n }\n\n if (text.match(/^\\s*info/)) {\n return 'info';\n }\n if (text.match(/^\\s*pie/)) {\n return 'pie';\n }\n\n if (text.match(/^\\s*erDiagram/)) {\n return 'er';\n }\n\n if (text.match(/^\\s*journey/)) {\n return 'journey';\n }\n\n return 'flowchart';\n};\n\nconst memoize = (fn, resolver) => {\n let cache = {};\n return (...args) => {\n let n = resolver ? resolver.apply(this, args) : args[0];\n if (n in cache) {\n return cache[n];\n } else {\n let result = fn(...args);\n cache[n] = result;\n return result;\n }\n };\n};\n\n/**\n * @function isSubstringInArray\n * Detects whether a substring in present in a given array\n * @param {string} str The substring to detect\n * @param {array} arr The array to search\n * @returns {number} the array index containing the substring or -1 if not present\n **/\nexport const isSubstringInArray = function(str, arr) {\n for (let i = 0; i < arr.length; i++) {\n if (arr[i].match(str)) return i;\n }\n return -1;\n};\n\nexport const interpolateToCurve = (interpolate, defaultCurve) => {\n if (!interpolate) {\n return defaultCurve;\n }\n const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`;\n return d3CurveTypes[curveName] || defaultCurve;\n};\n\nexport const formatUrl = (linkStr, config) => {\n let url = linkStr.trim();\n\n if (url) {\n if (config.securityLevel !== 'loose') {\n return sanitizeUrl(url);\n }\n\n return url;\n }\n};\n\nexport const runFunc = (functionName, ...params) => {\n const arrPaths = functionName.split('.');\n\n const len = arrPaths.length - 1;\n const fnName = arrPaths[len];\n\n let obj = window;\n for (let i = 0; i < len; i++) {\n obj = obj[arrPaths[i]];\n if (!obj) return;\n }\n\n obj[fnName](...params);\n};\n\nconst distance = (p1, p2) =>\n p1 && p2 ? Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)) : 0;\n\nconst traverseEdge = points => {\n let prevPoint;\n let totalDistance = 0;\n\n points.forEach(point => {\n totalDistance += distance(point, prevPoint);\n prevPoint = point;\n });\n\n // Traverse half of total distance along points\n let remainingDistance = totalDistance / 2;\n let center = undefined;\n prevPoint = undefined;\n points.forEach(point => {\n if (prevPoint && !center) {\n const vectorDistance = distance(point, prevPoint);\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n const distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) center = prevPoint;\n if (distanceRatio >= 1) center = { x: point.x, y: point.y };\n if (distanceRatio > 0 && distanceRatio < 1) {\n center = {\n x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y\n };\n }\n }\n }\n prevPoint = point;\n });\n return center;\n};\n\nconst calcLabelPosition = points => {\n return traverseEdge(points);\n};\n\nconst calcCardinalityPosition = (isRelationTypePresent, points, initialPosition) => {\n let prevPoint;\n let totalDistance = 0; // eslint-disable-line\n if (points[0] !== initialPosition) {\n points = points.reverse();\n }\n points.forEach(point => {\n totalDistance += distance(point, prevPoint);\n prevPoint = point;\n });\n\n // Traverse only 25 total distance along points to find cardinality point\n const distanceToCardinalityPoint = 25;\n\n let remainingDistance = distanceToCardinalityPoint;\n let center;\n prevPoint = undefined;\n points.forEach(point => {\n if (prevPoint && !center) {\n const vectorDistance = distance(point, prevPoint);\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n const distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) center = prevPoint;\n if (distanceRatio >= 1) center = { x: point.x, y: point.y };\n if (distanceRatio > 0 && distanceRatio < 1) {\n center = {\n x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y\n };\n }\n }\n }\n prevPoint = point;\n });\n // if relation is present (Arrows will be added), change cardinality point off-set distance (d)\n let d = isRelationTypePresent ? 10 : 5;\n //Calculate Angle for x and y axis\n let angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);\n let cardinalityPosition = { x: 0, y: 0 };\n //Calculation cardinality position using angle, center point on the line/curve but pendicular and with offset-distance\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;\n return cardinalityPosition;\n};\n\nexport const getStylesFromArray = arr => {\n let style = '';\n let labelStyle = '';\n\n for (let i = 0; i < arr.length; i++) {\n if (typeof arr[i] !== 'undefined') {\n // add text properties to label style definition\n if (arr[i].startsWith('color:') || arr[i].startsWith('text-align:')) {\n labelStyle = labelStyle + arr[i] + ';';\n } else {\n style = style + arr[i] + ';';\n }\n }\n }\n\n return { style: style, labelStyle: labelStyle };\n};\n\nlet cnt = 0;\nexport const generateId = () => {\n cnt++;\n return (\n 'id-' +\n Math.random()\n .toString(36)\n .substr(2, 12) +\n '-' +\n cnt\n );\n};\n\nfunction makeid(length) {\n var result = '';\n var characters = '0123456789abcdef';\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n}\n\nexport const random = options => {\n return makeid(options.length);\n};\n\n/**\n * @function assignWithDepth\n * Extends the functionality of {@link ObjectConstructor.assign} with the ability to merge arbitrary-depth objects\n * For each key in src with path `k` (recursively) performs an Object.assign(dst[`k`], src[`k`]) with\n * a slight change from the typical handling of undefined for dst[`k`]: instead of raising an error,\n * dst[`k`] is auto-initialized to {} and effectively merged with src[`k`]\n *
\n * Additionally, dissimilar types will not clobber unless the config.clobber parameter === true. Example:\n * ```\n * let config_0 = { foo: { bar: 'bar' }, bar: 'foo' };\n * let config_1 = { foo: 'foo', bar: 'bar' };\n * let result = assignWithDepth(config_0, config_1);\n * console.log(result);\n * //-> result: { foo: { bar: 'bar' }, bar: 'bar' }\n * ```\n *
\n * Traditional Object.assign would have clobbered foo in config_0 with foo in config_1.\n *
\n * If src is a destructured array of objects and dst is not an array, assignWithDepth will apply each element of src to dst\n * in order.\n * @param dst:any - the destination of the merge\n * @param src:any - the source object(s) to merge into destination\n * @param config:{ depth: number, clobber: boolean } - depth: depth to traverse within src and dst for merging -\n * clobber: should dissimilar types clobber (default: { depth: 2, clobber: false })\n * @returns {*}\n */\nexport const assignWithDepth = function(dst, src, config) {\n const { depth, clobber } = Object.assign({ depth: 2, clobber: false }, config);\n if (Array.isArray(src) && !Array.isArray(dst)) {\n src.forEach(s => assignWithDepth(dst, s, config));\n return dst;\n } else if (Array.isArray(src) && Array.isArray(dst)) {\n src.forEach(s => {\n if (dst.indexOf(s) === -1) {\n dst.push(s);\n }\n });\n return dst;\n }\n if (typeof dst === 'undefined' || depth <= 0) {\n if (dst !== undefined && dst !== null && typeof dst === 'object' && typeof src === 'object') {\n return Object.assign(dst, src);\n } else {\n return src;\n }\n }\n if (typeof src !== 'undefined' && typeof dst === 'object' && typeof src === 'object') {\n Object.keys(src).forEach(key => {\n if (\n typeof src[key] === 'object' &&\n (dst[key] === undefined || typeof dst[key] === 'object')\n ) {\n if (dst[key] === undefined) {\n dst[key] = Array.isArray(src[key]) ? [] : {};\n }\n dst[key] = assignWithDepth(dst[key], src[key], { depth: depth - 1, clobber });\n } else if (clobber || (typeof dst[key] !== 'object' && typeof src[key] !== 'object')) {\n dst[key] = src[key];\n }\n });\n }\n return dst;\n};\n\nexport const getTextObj = function() {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n anchor: 'start',\n style: '#666',\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0,\n valign: undefined\n };\n};\n\nexport const drawSimpleText = function(elem, textData) {\n // Remove and ignore br:s\n const nText = textData.text.replace(common.lineBreakRegex, ' ');\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.style('text-anchor', textData.anchor);\n textElem.style('font-family', textData.fontFamily);\n textElem.style('font-size', textData.fontSize);\n textElem.style('font-weight', textData.fontWeight);\n textElem.attr('fill', textData.fill);\n if (typeof textData.class !== 'undefined') {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.attr('fill', textData.fill);\n span.text(nText);\n\n return textElem;\n};\n\nexport const wrapLabel = memoize(\n (label, maxWidth, config) => {\n if (!label) {\n return label;\n }\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', joinWith: ' \n * Additionally, dissimilar types will not clobber unless the config.clobber parameter === true. Example:\n * ```\n * let config_0 = { foo: { bar: 'bar' }, bar: 'foo' };\n * let config_1 = { foo: 'foo', bar: 'bar' };\n * let result = assignWithDepth(config_0, config_1);\n * console.log(result);\n * //-> result: { foo: { bar: 'bar' }, bar: 'bar' }\n * ```\n * \n * Traditional Object.assign would have clobbered foo in config_0 with foo in config_1.\n * \n * If src is a destructured array of objects and dst is not an array, assignWithDepth will apply each element of src to dst\n * in order.\n * @param dst:any - the destination of the merge\n * @param src:any - the source object(s) to merge into destination\n * @param config:{ depth: number, clobber: boolean } - depth: depth to traverse within src and dst for merging -\n * clobber: should dissimilar types clobber (default: { depth: 2, clobber: false })\n * @returns {*}\n */\nexport const assignWithDepth = function(dst, src, config) {\n const { depth, clobber } = Object.assign({ depth: 2, clobber: false }, config);\n if (Array.isArray(src) && !Array.isArray(dst)) {\n src.forEach(s => assignWithDepth(dst, s, config));\n return dst;\n } else if (Array.isArray(src) && Array.isArray(dst)) {\n src.forEach(s => {\n if (dst.indexOf(s) === -1) {\n dst.push(s);\n }\n });\n return dst;\n }\n if (typeof dst === 'undefined' || depth <= 0) {\n if (dst !== undefined && dst !== null && typeof dst === 'object' && typeof src === 'object') {\n return Object.assign(dst, src);\n } else {\n return src;\n }\n }\n if (typeof src !== 'undefined' && typeof dst === 'object' && typeof src === 'object') {\n Object.keys(src).forEach(key => {\n if (\n typeof src[key] === 'object' &&\n (dst[key] === undefined || typeof dst[key] === 'object')\n ) {\n if (dst[key] === undefined) {\n dst[key] = Array.isArray(src[key]) ? [] : {};\n }\n dst[key] = assignWithDepth(dst[key], src[key], { depth: depth - 1, clobber });\n } else if (clobber || (typeof dst[key] !== 'object' && typeof src[key] !== 'object')) {\n dst[key] = src[key];\n }\n });\n }\n return dst;\n};\n\nexport const getTextObj = function() {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n anchor: 'start',\n style: '#666',\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0,\n valign: undefined\n };\n};\n\nexport const drawSimpleText = function(elem, textData) {\n // Remove and ignore br:s\n const nText = textData.text.replace(common.lineBreakRegex, ' ');\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.style('text-anchor', textData.anchor);\n textElem.style('font-family', textData.fontFamily);\n textElem.style('font-size', textData.fontSize);\n textElem.style('font-weight', textData.fontWeight);\n textElem.attr('fill', textData.fill);\n if (typeof textData.class !== 'undefined') {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.attr('fill', textData.fill);\n span.text(nText);\n\n return textElem;\n};\n\nexport const wrapLabel = memoize(\n (label, maxWidth, config) => {\n if (!label) {\n return label;\n }\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', joinWith: ' >1)+l+t+k+A.slice(S);break;default:t=A+l+t+k}return s(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=Ws(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(qs(e)/3))),i=Math.pow(10,-r),a=ec[8+r/3];return function(t){return n(i*t)+a}}}};function rc(t){return Vs=nc(t),Xs=Vs.format,Ks=Vs.formatPrefix,Vs}rc({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var ic=function(t){return Math.max(0,-qs(Math.abs(t)))},ac=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(qs(e)/3)))-qs(Math.abs(t)))},oc=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,qs(e)-qs(t))+1},sc=function(){return new cc};function cc(){this.reset()}cc.prototype={constructor:cc,reset:function(){this.s=this.t=0},add:function(t){fc(uc,t,this.t),fc(this,uc.s,this.s),this.s?this.t+=uc.t:this.s=uc.t},valueOf:function(){return this.s}};var uc=new cc;function fc(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var hc=Math.PI,lc=hc/2,dc=hc/4,pc=2*hc,yc=180/hc,gc=hc/180,bc=Math.abs,mc=Math.atan,vc=Math.atan2,_c=Math.cos,wc=Math.ceil,xc=Math.exp,kc=(Math.floor,Math.log),Ec=Math.pow,Sc=Math.sin,Ac=Math.sign||function(t){return t>0?1:t<0?-1:0},Mc=Math.sqrt,Tc=Math.tan;function Oc(t){return t>1?0:t<-1?hc:Math.acos(t)}function Cc(t){return t>1?lc:t<-1?-lc:Math.asin(t)}function Nc(t){return(t=Sc(t/2))*t}function Dc(){}function Ic(t,e){t&&Rc.hasOwnProperty(t.type)&&Rc[t.type](t,e)}var Bc={Feature:function(t,e){Ic(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,a=_c(e=(e*=gc)/2+dc),o=Sc(e),s=Yc*o,c=Uc*a+s*_c(i),u=s*r*Sc(i);Hc.add(vc(u,c)),zc=t,Uc=a,Yc=o}var Zc=function(t){return Wc.reset(),qc(t,$c),2*Wc};function Jc(t){return[vc(t[1],t[0]),Cc(t[2])]}function Qc(t){var e=t[0],n=t[1],r=_c(n);return[r*_c(e),r*Sc(e),Sc(n)]}function tu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function eu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function nu(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function ru(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function iu(t){var e=Mc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var au,ou,su,cu,uu,fu,hu,lu,du,pu,yu=sc(),gu={point:bu,lineStart:vu,lineEnd:_u,polygonStart:function(){gu.point=wu,gu.lineStart=xu,gu.lineEnd=ku,yu.reset(),$c.polygonStart()},polygonEnd:function(){$c.polygonEnd(),gu.point=bu,gu.lineStart=vu,gu.lineEnd=_u,Hc<0?(au=-(su=180),ou=-(cu=90)):yu>1e-6?cu=90:yu<-1e-6&&(ou=-90),pu[0]=au,pu[1]=su},sphere:function(){au=-(su=180),ou=-(cu=90)}};function bu(t,e){du.push(pu=[au=t,su=t]),e >>1;u[y]
' },\n config\n );\n if (common.lineBreakRegex.test(label)) {\n return label;\n }\n const words = label.split(' ');\n const completedLines = [];\n let nextLine = '';\n words.forEach((word, index) => {\n const wordLength = calculateTextWidth(`${word} `, config);\n const nextLineLength = calculateTextWidth(nextLine, config);\n if (wordLength > maxWidth) {\n const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, '-', config);\n completedLines.push(nextLine, ...hyphenatedStrings);\n nextLine = remainingWord;\n } else if (nextLineLength + wordLength >= maxWidth) {\n completedLines.push(nextLine);\n nextLine = word;\n } else {\n nextLine = [nextLine, word].filter(Boolean).join(' ');\n }\n const currentWord = index + 1;\n const isLastWord = currentWord === words.length;\n if (isLastWord) {\n completedLines.push(nextLine);\n }\n });\n return completedLines.filter(line => line !== '').join(config.joinWith);\n },\n (label, maxWidth, config) =>\n `${label}-${maxWidth}-${config.fontSize}-${config.fontWeight}-${config.fontFamily}-${config.joinWith}`\n);\n\nconst breakString = memoize(\n (word, maxWidth, hyphenCharacter = '-', config) => {\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', margin: 0 },\n config\n );\n const characters = word.split('');\n const lines = [];\n let currentLine = '';\n characters.forEach((character, index) => {\n const nextLine = `${currentLine}${character}`;\n const lineWidth = calculateTextWidth(nextLine, config);\n if (lineWidth >= maxWidth) {\n const currentCharacter = index + 1;\n const isLastLine = characters.length === currentCharacter;\n const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`;\n lines.push(isLastLine ? nextLine : hyphenatedNextLine);\n currentLine = '';\n } else {\n currentLine = nextLine;\n }\n });\n return { hyphenatedStrings: lines, remainingWord: currentLine };\n },\n (word, maxWidth, hyphenCharacter = '-', config) =>\n `${word}-${maxWidth}-${hyphenCharacter}-${config.fontSize}-${config.fontWeight}-${config.fontFamily}`\n);\n\n/**\n * This calculates the text's height, taking into account the wrap breaks and\n * both the statically configured height, width, and the length of the text (in pixels).\n *\n * If the wrapped text text has greater height, we extend the height, so it's\n * value won't overflow.\n *\n * @return - The height for the given text\n * @param text the text to measure\n * @param config - the config for fontSize, fontFamily, and fontWeight all impacting the resulting size\n */\nexport const calculateTextHeight = function(text, config) {\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', margin: 15 },\n config\n );\n return calculateTextDimensions(text, config).height;\n};\n\n/**\n * This calculates the width of the given text, font size and family.\n *\n * @return - The width for the given text\n * @param text - The text to calculate the width of\n * @param config - the config for fontSize, fontFamily, and fontWeight all impacting the resulting size\n */\nexport const calculateTextWidth = function(text, config) {\n config = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: 'Arial' }, config);\n return calculateTextDimensions(text, config).width;\n};\n\n/**\n * This calculates the dimensions of the given text, font size, font family, font weight, and margins.\n *\n * @return - The width for the given text\n * @param text - The text to calculate the width of\n * @param config - the config for fontSize, fontFamily, fontWeight, and margin all impacting the resulting size\n */\nexport const calculateTextDimensions = memoize(\n function(text, config) {\n config = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: 'Arial' }, config);\n const { fontSize, fontFamily, fontWeight } = config;\n if (!text) {\n return { width: 0, height: 0 };\n }\n\n // We can't really know if the user supplied font family will render on the user agent;\n // thus, we'll take the max width between the user supplied font family, and a default\n // of sans-serif.\n const fontFamilies = ['sans-serif', fontFamily];\n const lines = text.split(common.lineBreakRegex);\n let dims = [];\n\n const body = select('body');\n // We don't want to leak DOM elements - if a removal operation isn't available\n // for any reason, do not continue.\n if (!body.remove) {\n return { width: 0, height: 0, lineHeight: 0 };\n }\n\n const g = body.append('svg');\n\n for (let fontFamily of fontFamilies) {\n let cheight = 0;\n let dim = { width: 0, height: 0, lineHeight: 0 };\n for (let line of lines) {\n const textObj = getTextObj();\n textObj.text = line;\n const textElem = drawSimpleText(g, textObj)\n .style('font-size', fontSize)\n .style('font-weight', fontWeight)\n .style('font-family', fontFamily);\n\n let bBox = (textElem._groups || textElem)[0][0].getBBox();\n dim.width = Math.round(Math.max(dim.width, bBox.width));\n cheight = Math.round(bBox.height);\n dim.height += cheight;\n dim.lineHeight = Math.round(Math.max(dim.lineHeight, cheight));\n }\n dims.push(dim);\n }\n\n g.remove();\n\n let index =\n isNaN(dims[1].height) ||\n isNaN(dims[1].width) ||\n isNaN(dims[1].lineHeight) ||\n (dims[0].height > dims[1].height &&\n dims[0].width > dims[1].width &&\n dims[0].lineHeight > dims[1].lineHeight)\n ? 0\n : 1;\n return dims[index];\n },\n (text, config) => `${text}-${config.fontSize}-${config.fontWeight}-${config.fontFamily}`\n);\n\nexport default {\n assignWithDepth,\n wrapLabel,\n calculateTextHeight,\n calculateTextWidth,\n calculateTextDimensions,\n detectInit,\n detectDirective,\n detectType,\n isSubstringInArray,\n interpolateToCurve,\n calcLabelPosition,\n calcCardinalityPosition,\n formatUrl,\n getStylesFromArray,\n generateId,\n random,\n memoize,\n runFunc\n};\n","module.exports = require(\"@braintree/sanitize-url\");","module.exports = require(\"d3\");","module.exports = require(\"dagre\");","module.exports = require(\"dagre-d3\");","module.exports = require(\"dagre-d3/lib/label/add-html-label.js\");","module.exports = require(\"entity-decode/browser\");","module.exports = require(\"graphlib\");","module.exports = require(\"khroma\");","module.exports = require(\"moment-mini\");","module.exports = require(\"stylis\");"],"sourceRoot":""}
\ No newline at end of file
diff --git a/dist/mermaid.js b/dist/mermaid.js
index f3a1e6373..50e9cf7d4 100644
--- a/dist/mermaid.js
+++ b/dist/mermaid.js
@@ -147,10006 +147,6 @@ module.exports = {
};
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1.js":
-/*!******************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1.js ***!
- \******************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var asn1 = exports;
-
-asn1.bignum = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
-
-asn1.define = __webpack_require__(/*! ./asn1/api */ "./node_modules/asn1.js/lib/asn1/api.js").define;
-asn1.base = __webpack_require__(/*! ./asn1/base */ "./node_modules/asn1.js/lib/asn1/base/index.js");
-asn1.constants = __webpack_require__(/*! ./asn1/constants */ "./node_modules/asn1.js/lib/asn1/constants/index.js");
-asn1.decoders = __webpack_require__(/*! ./asn1/decoders */ "./node_modules/asn1.js/lib/asn1/decoders/index.js");
-asn1.encoders = __webpack_require__(/*! ./asn1/encoders */ "./node_modules/asn1.js/lib/asn1/encoders/index.js");
-
-
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1/api.js":
-/*!**********************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1/api.js ***!
- \**********************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var asn1 = __webpack_require__(/*! ../asn1 */ "./node_modules/asn1.js/lib/asn1.js");
-var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
-
-var api = exports;
-
-api.define = function define(name, body) {
- return new Entity(name, body);
-};
-
-function Entity(name, body) {
- this.name = name;
- this.body = body;
-
- this.decoders = {};
- this.encoders = {};
-};
-
-Entity.prototype._createNamed = function createNamed(base) {
- var named;
- try {
- named = __webpack_require__(/*! vm */ "./node_modules/vm-browserify/index.js").runInThisContext(
- '(function ' + this.name + '(entity) {\n' +
- ' this._initNamed(entity);\n' +
- '})'
- );
- } catch (e) {
- named = function (entity) {
- this._initNamed(entity);
- };
- }
- inherits(named, base);
- named.prototype._initNamed = function initnamed(entity) {
- base.call(this, entity);
- };
-
- return new named(this);
-};
-
-Entity.prototype._getDecoder = function _getDecoder(enc) {
- enc = enc || 'der';
- // Lazily create decoder
- if (!this.decoders.hasOwnProperty(enc))
- this.decoders[enc] = this._createNamed(asn1.decoders[enc]);
- return this.decoders[enc];
-};
-
-Entity.prototype.decode = function decode(data, enc, options) {
- return this._getDecoder(enc).decode(data, options);
-};
-
-Entity.prototype._getEncoder = function _getEncoder(enc) {
- enc = enc || 'der';
- // Lazily create encoder
- if (!this.encoders.hasOwnProperty(enc))
- this.encoders[enc] = this._createNamed(asn1.encoders[enc]);
- return this.encoders[enc];
-};
-
-Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) {
- return this._getEncoder(enc).encode(data, reporter);
-};
-
-
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1/base/buffer.js":
-/*!******************************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1/base/buffer.js ***!
- \******************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
-var Reporter = __webpack_require__(/*! ../base */ "./node_modules/asn1.js/lib/asn1/base/index.js").Reporter;
-var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js").Buffer;
-
-function DecoderBuffer(base, options) {
- Reporter.call(this, options);
- if (!Buffer.isBuffer(base)) {
- this.error('Input not Buffer');
- return;
- }
-
- this.base = base;
- this.offset = 0;
- this.length = base.length;
-}
-inherits(DecoderBuffer, Reporter);
-exports.DecoderBuffer = DecoderBuffer;
-
-DecoderBuffer.prototype.save = function save() {
- return { offset: this.offset, reporter: Reporter.prototype.save.call(this) };
-};
-
-DecoderBuffer.prototype.restore = function restore(save) {
- // Return skipped data
- var res = new DecoderBuffer(this.base);
- res.offset = save.offset;
- res.length = this.offset;
-
- this.offset = save.offset;
- Reporter.prototype.restore.call(this, save.reporter);
-
- return res;
-};
-
-DecoderBuffer.prototype.isEmpty = function isEmpty() {
- return this.offset === this.length;
-};
-
-DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {
- if (this.offset + 1 <= this.length)
- return this.base.readUInt8(this.offset++, true);
- else
- return this.error(fail || 'DecoderBuffer overrun');
-}
-
-DecoderBuffer.prototype.skip = function skip(bytes, fail) {
- if (!(this.offset + bytes <= this.length))
- return this.error(fail || 'DecoderBuffer overrun');
-
- var res = new DecoderBuffer(this.base);
-
- // Share reporter state
- res._reporterState = this._reporterState;
-
- res.offset = this.offset;
- res.length = this.offset + bytes;
- this.offset += bytes;
- return res;
-}
-
-DecoderBuffer.prototype.raw = function raw(save) {
- return this.base.slice(save ? save.offset : this.offset, this.length);
-}
-
-function EncoderBuffer(value, reporter) {
- if (Array.isArray(value)) {
- this.length = 0;
- this.value = value.map(function(item) {
- if (!(item instanceof EncoderBuffer))
- item = new EncoderBuffer(item, reporter);
- this.length += item.length;
- return item;
- }, this);
- } else if (typeof value === 'number') {
- if (!(0 <= value && value <= 0xff))
- return reporter.error('non-byte EncoderBuffer value');
- this.value = value;
- this.length = 1;
- } else if (typeof value === 'string') {
- this.value = value;
- this.length = Buffer.byteLength(value);
- } else if (Buffer.isBuffer(value)) {
- this.value = value;
- this.length = value.length;
- } else {
- return reporter.error('Unsupported type: ' + typeof value);
- }
-}
-exports.EncoderBuffer = EncoderBuffer;
-
-EncoderBuffer.prototype.join = function join(out, offset) {
- if (!out)
- out = new Buffer(this.length);
- if (!offset)
- offset = 0;
-
- if (this.length === 0)
- return out;
-
- if (Array.isArray(this.value)) {
- this.value.forEach(function(item) {
- item.join(out, offset);
- offset += item.length;
- });
- } else {
- if (typeof this.value === 'number')
- out[offset] = this.value;
- else if (typeof this.value === 'string')
- out.write(this.value, offset);
- else if (Buffer.isBuffer(this.value))
- this.value.copy(out, offset);
- offset += this.length;
- }
-
- return out;
-};
-
-
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1/base/index.js":
-/*!*****************************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1/base/index.js ***!
- \*****************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var base = exports;
-
-base.Reporter = __webpack_require__(/*! ./reporter */ "./node_modules/asn1.js/lib/asn1/base/reporter.js").Reporter;
-base.DecoderBuffer = __webpack_require__(/*! ./buffer */ "./node_modules/asn1.js/lib/asn1/base/buffer.js").DecoderBuffer;
-base.EncoderBuffer = __webpack_require__(/*! ./buffer */ "./node_modules/asn1.js/lib/asn1/base/buffer.js").EncoderBuffer;
-base.Node = __webpack_require__(/*! ./node */ "./node_modules/asn1.js/lib/asn1/base/node.js");
-
-
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1/base/node.js":
-/*!****************************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1/base/node.js ***!
- \****************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var Reporter = __webpack_require__(/*! ../base */ "./node_modules/asn1.js/lib/asn1/base/index.js").Reporter;
-var EncoderBuffer = __webpack_require__(/*! ../base */ "./node_modules/asn1.js/lib/asn1/base/index.js").EncoderBuffer;
-var DecoderBuffer = __webpack_require__(/*! ../base */ "./node_modules/asn1.js/lib/asn1/base/index.js").DecoderBuffer;
-var assert = __webpack_require__(/*! minimalistic-assert */ "./node_modules/minimalistic-assert/index.js");
-
-// Supported tags
-var tags = [
- 'seq', 'seqof', 'set', 'setof', 'objid', 'bool',
- 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',
- 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',
- 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'
-];
-
-// Public methods list
-var methods = [
- 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',
- 'any', 'contains'
-].concat(tags);
-
-// Overrided methods list
-var overrided = [
- '_peekTag', '_decodeTag', '_use',
- '_decodeStr', '_decodeObjid', '_decodeTime',
- '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',
-
- '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',
- '_encodeNull', '_encodeInt', '_encodeBool'
-];
-
-function Node(enc, parent) {
- var state = {};
- this._baseState = state;
-
- state.enc = enc;
-
- state.parent = parent || null;
- state.children = null;
-
- // State
- state.tag = null;
- state.args = null;
- state.reverseArgs = null;
- state.choice = null;
- state.optional = false;
- state.any = false;
- state.obj = false;
- state.use = null;
- state.useDecoder = null;
- state.key = null;
- state['default'] = null;
- state.explicit = null;
- state.implicit = null;
- state.contains = null;
-
- // Should create new instance on each method
- if (!state.parent) {
- state.children = [];
- this._wrap();
- }
-}
-module.exports = Node;
-
-var stateProps = [
- 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',
- 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',
- 'implicit', 'contains'
-];
-
-Node.prototype.clone = function clone() {
- var state = this._baseState;
- var cstate = {};
- stateProps.forEach(function(prop) {
- cstate[prop] = state[prop];
- });
- var res = new this.constructor(cstate.parent);
- res._baseState = cstate;
- return res;
-};
-
-Node.prototype._wrap = function wrap() {
- var state = this._baseState;
- methods.forEach(function(method) {
- this[method] = function _wrappedMethod() {
- var clone = new this.constructor(this);
- state.children.push(clone);
- return clone[method].apply(clone, arguments);
- };
- }, this);
-};
-
-Node.prototype._init = function init(body) {
- var state = this._baseState;
-
- assert(state.parent === null);
- body.call(this);
-
- // Filter children
- state.children = state.children.filter(function(child) {
- return child._baseState.parent === this;
- }, this);
- assert.equal(state.children.length, 1, 'Root node can have only one child');
-};
-
-Node.prototype._useArgs = function useArgs(args) {
- var state = this._baseState;
-
- // Filter children and args
- var children = args.filter(function(arg) {
- return arg instanceof this.constructor;
- }, this);
- args = args.filter(function(arg) {
- return !(arg instanceof this.constructor);
- }, this);
-
- if (children.length !== 0) {
- assert(state.children === null);
- state.children = children;
-
- // Replace parent to maintain backward link
- children.forEach(function(child) {
- child._baseState.parent = this;
- }, this);
- }
- if (args.length !== 0) {
- assert(state.args === null);
- state.args = args;
- state.reverseArgs = args.map(function(arg) {
- if (typeof arg !== 'object' || arg.constructor !== Object)
- return arg;
-
- var res = {};
- Object.keys(arg).forEach(function(key) {
- if (key == (key | 0))
- key |= 0;
- var value = arg[key];
- res[value] = key;
- });
- return res;
- });
- }
-};
-
-//
-// Overrided methods
-//
-
-overrided.forEach(function(method) {
- Node.prototype[method] = function _overrided() {
- var state = this._baseState;
- throw new Error(method + ' not implemented for encoding: ' + state.enc);
- };
-});
-
-//
-// Public methods
-//
-
-tags.forEach(function(tag) {
- Node.prototype[tag] = function _tagMethod() {
- var state = this._baseState;
- var args = Array.prototype.slice.call(arguments);
-
- assert(state.tag === null);
- state.tag = tag;
-
- this._useArgs(args);
-
- return this;
- };
-});
-
-Node.prototype.use = function use(item) {
- assert(item);
- var state = this._baseState;
-
- assert(state.use === null);
- state.use = item;
-
- return this;
-};
-
-Node.prototype.optional = function optional() {
- var state = this._baseState;
-
- state.optional = true;
-
- return this;
-};
-
-Node.prototype.def = function def(val) {
- var state = this._baseState;
-
- assert(state['default'] === null);
- state['default'] = val;
- state.optional = true;
-
- return this;
-};
-
-Node.prototype.explicit = function explicit(num) {
- var state = this._baseState;
-
- assert(state.explicit === null && state.implicit === null);
- state.explicit = num;
-
- return this;
-};
-
-Node.prototype.implicit = function implicit(num) {
- var state = this._baseState;
-
- assert(state.explicit === null && state.implicit === null);
- state.implicit = num;
-
- return this;
-};
-
-Node.prototype.obj = function obj() {
- var state = this._baseState;
- var args = Array.prototype.slice.call(arguments);
-
- state.obj = true;
-
- if (args.length !== 0)
- this._useArgs(args);
-
- return this;
-};
-
-Node.prototype.key = function key(newKey) {
- var state = this._baseState;
-
- assert(state.key === null);
- state.key = newKey;
-
- return this;
-};
-
-Node.prototype.any = function any() {
- var state = this._baseState;
-
- state.any = true;
-
- return this;
-};
-
-Node.prototype.choice = function choice(obj) {
- var state = this._baseState;
-
- assert(state.choice === null);
- state.choice = obj;
- this._useArgs(Object.keys(obj).map(function(key) {
- return obj[key];
- }));
-
- return this;
-};
-
-Node.prototype.contains = function contains(item) {
- var state = this._baseState;
-
- assert(state.use === null);
- state.contains = item;
-
- return this;
-};
-
-//
-// Decoding
-//
-
-Node.prototype._decode = function decode(input, options) {
- var state = this._baseState;
-
- // Decode root node
- if (state.parent === null)
- return input.wrapResult(state.children[0]._decode(input, options));
-
- var result = state['default'];
- var present = true;
-
- var prevKey = null;
- if (state.key !== null)
- prevKey = input.enterKey(state.key);
-
- // Check if tag is there
- if (state.optional) {
- var tag = null;
- if (state.explicit !== null)
- tag = state.explicit;
- else if (state.implicit !== null)
- tag = state.implicit;
- else if (state.tag !== null)
- tag = state.tag;
-
- if (tag === null && !state.any) {
- // Trial and Error
- var save = input.save();
- try {
- if (state.choice === null)
- this._decodeGeneric(state.tag, input, options);
- else
- this._decodeChoice(input, options);
- present = true;
- } catch (e) {
- present = false;
- }
- input.restore(save);
- } else {
- present = this._peekTag(input, tag, state.any);
-
- if (input.isError(present))
- return present;
- }
- }
-
- // Push object on stack
- var prevObj;
- if (state.obj && present)
- prevObj = input.enterObject();
-
- if (present) {
- // Unwrap explicit values
- if (state.explicit !== null) {
- var explicit = this._decodeTag(input, state.explicit);
- if (input.isError(explicit))
- return explicit;
- input = explicit;
- }
-
- var start = input.offset;
-
- // Unwrap implicit and normal values
- if (state.use === null && state.choice === null) {
- if (state.any)
- var save = input.save();
- var body = this._decodeTag(
- input,
- state.implicit !== null ? state.implicit : state.tag,
- state.any
- );
- if (input.isError(body))
- return body;
-
- if (state.any)
- result = input.raw(save);
- else
- input = body;
- }
-
- if (options && options.track && state.tag !== null)
- options.track(input.path(), start, input.length, 'tagged');
-
- if (options && options.track && state.tag !== null)
- options.track(input.path(), input.offset, input.length, 'content');
-
- // Select proper method for tag
- if (state.any)
- result = result;
- else if (state.choice === null)
- result = this._decodeGeneric(state.tag, input, options);
- else
- result = this._decodeChoice(input, options);
-
- if (input.isError(result))
- return result;
-
- // Decode children
- if (!state.any && state.choice === null && state.children !== null) {
- state.children.forEach(function decodeChildren(child) {
- // NOTE: We are ignoring errors here, to let parser continue with other
- // parts of encoded data
- child._decode(input, options);
- });
- }
-
- // Decode contained/encoded by schema, only in bit or octet strings
- if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {
- var data = new DecoderBuffer(result);
- result = this._getUse(state.contains, input._reporterState.obj)
- ._decode(data, options);
- }
- }
-
- // Pop object
- if (state.obj && present)
- result = input.leaveObject(prevObj);
-
- // Set key
- if (state.key !== null && (result !== null || present === true))
- input.leaveKey(prevKey, state.key, result);
- else if (prevKey !== null)
- input.exitKey(prevKey);
-
- return result;
-};
-
-Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {
- var state = this._baseState;
-
- if (tag === 'seq' || tag === 'set')
- return null;
- if (tag === 'seqof' || tag === 'setof')
- return this._decodeList(input, tag, state.args[0], options);
- else if (/str$/.test(tag))
- return this._decodeStr(input, tag, options);
- else if (tag === 'objid' && state.args)
- return this._decodeObjid(input, state.args[0], state.args[1], options);
- else if (tag === 'objid')
- return this._decodeObjid(input, null, null, options);
- else if (tag === 'gentime' || tag === 'utctime')
- return this._decodeTime(input, tag, options);
- else if (tag === 'null_')
- return this._decodeNull(input, options);
- else if (tag === 'bool')
- return this._decodeBool(input, options);
- else if (tag === 'objDesc')
- return this._decodeStr(input, tag, options);
- else if (tag === 'int' || tag === 'enum')
- return this._decodeInt(input, state.args && state.args[0], options);
-
- if (state.use !== null) {
- return this._getUse(state.use, input._reporterState.obj)
- ._decode(input, options);
- } else {
- return input.error('unknown tag: ' + tag);
- }
-};
-
-Node.prototype._getUse = function _getUse(entity, obj) {
-
- var state = this._baseState;
- // Create altered use decoder if implicit is set
- state.useDecoder = this._use(entity, obj);
- assert(state.useDecoder._baseState.parent === null);
- state.useDecoder = state.useDecoder._baseState.children[0];
- if (state.implicit !== state.useDecoder._baseState.implicit) {
- state.useDecoder = state.useDecoder.clone();
- state.useDecoder._baseState.implicit = state.implicit;
- }
- return state.useDecoder;
-};
-
-Node.prototype._decodeChoice = function decodeChoice(input, options) {
- var state = this._baseState;
- var result = null;
- var match = false;
-
- Object.keys(state.choice).some(function(key) {
- var save = input.save();
- var node = state.choice[key];
- try {
- var value = node._decode(input, options);
- if (input.isError(value))
- return false;
-
- result = { type: key, value: value };
- match = true;
- } catch (e) {
- input.restore(save);
- return false;
- }
- return true;
- }, this);
-
- if (!match)
- return input.error('Choice not matched');
-
- return result;
-};
-
-//
-// Encoding
-//
-
-Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) {
- return new EncoderBuffer(data, this.reporter);
-};
-
-Node.prototype._encode = function encode(data, reporter, parent) {
- var state = this._baseState;
- if (state['default'] !== null && state['default'] === data)
- return;
-
- var result = this._encodeValue(data, reporter, parent);
- if (result === undefined)
- return;
-
- if (this._skipDefault(result, reporter, parent))
- return;
-
- return result;
-};
-
-Node.prototype._encodeValue = function encode(data, reporter, parent) {
- var state = this._baseState;
-
- // Decode root node
- if (state.parent === null)
- return state.children[0]._encode(data, reporter || new Reporter());
-
- var result = null;
-
- // Set reporter to share it with a child class
- this.reporter = reporter;
-
- // Check if data is there
- if (state.optional && data === undefined) {
- if (state['default'] !== null)
- data = state['default']
- else
- return;
- }
-
- // Encode children first
- var content = null;
- var primitive = false;
- if (state.any) {
- // Anything that was given is translated to buffer
- result = this._createEncoderBuffer(data);
- } else if (state.choice) {
- result = this._encodeChoice(data, reporter);
- } else if (state.contains) {
- content = this._getUse(state.contains, parent)._encode(data, reporter);
- primitive = true;
- } else if (state.children) {
- content = state.children.map(function(child) {
- if (child._baseState.tag === 'null_')
- return child._encode(null, reporter, data);
-
- if (child._baseState.key === null)
- return reporter.error('Child should have a key');
- var prevKey = reporter.enterKey(child._baseState.key);
-
- if (typeof data !== 'object')
- return reporter.error('Child expected, but input is not object');
-
- var res = child._encode(data[child._baseState.key], reporter, data);
- reporter.leaveKey(prevKey);
-
- return res;
- }, this).filter(function(child) {
- return child;
- });
- content = this._createEncoderBuffer(content);
- } else {
- if (state.tag === 'seqof' || state.tag === 'setof') {
- // TODO(indutny): this should be thrown on DSL level
- if (!(state.args && state.args.length === 1))
- return reporter.error('Too many args for : ' + state.tag);
-
- if (!Array.isArray(data))
- return reporter.error('seqof/setof, but data is not Array');
-
- var child = this.clone();
- child._baseState.implicit = null;
- content = this._createEncoderBuffer(data.map(function(item) {
- var state = this._baseState;
-
- return this._getUse(state.args[0], data)._encode(item, reporter);
- }, child));
- } else if (state.use !== null) {
- result = this._getUse(state.use, parent)._encode(data, reporter);
- } else {
- content = this._encodePrimitive(state.tag, data);
- primitive = true;
- }
- }
-
- // Encode data itself
- var result;
- if (!state.any && state.choice === null) {
- var tag = state.implicit !== null ? state.implicit : state.tag;
- var cls = state.implicit === null ? 'universal' : 'context';
-
- if (tag === null) {
- if (state.use === null)
- reporter.error('Tag could be omitted only for .use()');
- } else {
- if (state.use === null)
- result = this._encodeComposite(tag, primitive, cls, content);
- }
- }
-
- // Wrap in explicit
- if (state.explicit !== null)
- result = this._encodeComposite(state.explicit, false, 'context', result);
-
- return result;
-};
-
-Node.prototype._encodeChoice = function encodeChoice(data, reporter) {
- var state = this._baseState;
-
- var node = state.choice[data.type];
- if (!node) {
- assert(
- false,
- data.type + ' not found in ' +
- JSON.stringify(Object.keys(state.choice)));
- }
- return node._encode(data.value, reporter);
-};
-
-Node.prototype._encodePrimitive = function encodePrimitive(tag, data) {
- var state = this._baseState;
-
- if (/str$/.test(tag))
- return this._encodeStr(data, tag);
- else if (tag === 'objid' && state.args)
- return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);
- else if (tag === 'objid')
- return this._encodeObjid(data, null, null);
- else if (tag === 'gentime' || tag === 'utctime')
- return this._encodeTime(data, tag);
- else if (tag === 'null_')
- return this._encodeNull();
- else if (tag === 'int' || tag === 'enum')
- return this._encodeInt(data, state.args && state.reverseArgs[0]);
- else if (tag === 'bool')
- return this._encodeBool(data);
- else if (tag === 'objDesc')
- return this._encodeStr(data, tag);
- else
- throw new Error('Unsupported tag: ' + tag);
-};
-
-Node.prototype._isNumstr = function isNumstr(str) {
- return /^[0-9 ]*$/.test(str);
-};
-
-Node.prototype._isPrintstr = function isPrintstr(str) {
- return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str);
-};
-
-
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1/base/reporter.js":
-/*!********************************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1/base/reporter.js ***!
- \********************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
-
-function Reporter(options) {
- this._reporterState = {
- obj: null,
- path: [],
- options: options || {},
- errors: []
- };
-}
-exports.Reporter = Reporter;
-
-Reporter.prototype.isError = function isError(obj) {
- return obj instanceof ReporterError;
-};
-
-Reporter.prototype.save = function save() {
- var state = this._reporterState;
-
- return { obj: state.obj, pathLen: state.path.length };
-};
-
-Reporter.prototype.restore = function restore(data) {
- var state = this._reporterState;
-
- state.obj = data.obj;
- state.path = state.path.slice(0, data.pathLen);
-};
-
-Reporter.prototype.enterKey = function enterKey(key) {
- return this._reporterState.path.push(key);
-};
-
-Reporter.prototype.exitKey = function exitKey(index) {
- var state = this._reporterState;
-
- state.path = state.path.slice(0, index - 1);
-};
-
-Reporter.prototype.leaveKey = function leaveKey(index, key, value) {
- var state = this._reporterState;
-
- this.exitKey(index);
- if (state.obj !== null)
- state.obj[key] = value;
-};
-
-Reporter.prototype.path = function path() {
- return this._reporterState.path.join('/');
-};
-
-Reporter.prototype.enterObject = function enterObject() {
- var state = this._reporterState;
-
- var prev = state.obj;
- state.obj = {};
- return prev;
-};
-
-Reporter.prototype.leaveObject = function leaveObject(prev) {
- var state = this._reporterState;
-
- var now = state.obj;
- state.obj = prev;
- return now;
-};
-
-Reporter.prototype.error = function error(msg) {
- var err;
- var state = this._reporterState;
-
- var inherited = msg instanceof ReporterError;
- if (inherited) {
- err = msg;
- } else {
- err = new ReporterError(state.path.map(function(elem) {
- return '[' + JSON.stringify(elem) + ']';
- }).join(''), msg.message || msg, msg.stack);
- }
-
- if (!state.options.partial)
- throw err;
-
- if (!inherited)
- state.errors.push(err);
-
- return err;
-};
-
-Reporter.prototype.wrapResult = function wrapResult(result) {
- var state = this._reporterState;
- if (!state.options.partial)
- return result;
-
- return {
- result: this.isError(result) ? null : result,
- errors: state.errors
- };
-};
-
-function ReporterError(path, msg) {
- this.path = path;
- this.rethrow(msg);
-};
-inherits(ReporterError, Error);
-
-ReporterError.prototype.rethrow = function rethrow(msg) {
- this.message = msg + ' at: ' + (this.path || '(shallow)');
- if (Error.captureStackTrace)
- Error.captureStackTrace(this, ReporterError);
-
- if (!this.stack) {
- try {
- // IE only adds stack when thrown
- throw new Error(this.message);
- } catch (e) {
- this.stack = e.stack;
- }
- }
- return this;
-};
-
-
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1/constants/der.js":
-/*!********************************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1/constants/der.js ***!
- \********************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var constants = __webpack_require__(/*! ../constants */ "./node_modules/asn1.js/lib/asn1/constants/index.js");
-
-exports.tagClass = {
- 0: 'universal',
- 1: 'application',
- 2: 'context',
- 3: 'private'
-};
-exports.tagClassByName = constants._reverse(exports.tagClass);
-
-exports.tag = {
- 0x00: 'end',
- 0x01: 'bool',
- 0x02: 'int',
- 0x03: 'bitstr',
- 0x04: 'octstr',
- 0x05: 'null_',
- 0x06: 'objid',
- 0x07: 'objDesc',
- 0x08: 'external',
- 0x09: 'real',
- 0x0a: 'enum',
- 0x0b: 'embed',
- 0x0c: 'utf8str',
- 0x0d: 'relativeOid',
- 0x10: 'seq',
- 0x11: 'set',
- 0x12: 'numstr',
- 0x13: 'printstr',
- 0x14: 't61str',
- 0x15: 'videostr',
- 0x16: 'ia5str',
- 0x17: 'utctime',
- 0x18: 'gentime',
- 0x19: 'graphstr',
- 0x1a: 'iso646str',
- 0x1b: 'genstr',
- 0x1c: 'unistr',
- 0x1d: 'charstr',
- 0x1e: 'bmpstr'
-};
-exports.tagByName = constants._reverse(exports.tag);
-
-
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1/constants/index.js":
-/*!**********************************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1/constants/index.js ***!
- \**********************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var constants = exports;
-
-// Helper
-constants._reverse = function reverse(map) {
- var res = {};
-
- Object.keys(map).forEach(function(key) {
- // Convert key to integer if it is stringified
- if ((key | 0) == key)
- key = key | 0;
-
- var value = map[key];
- res[value] = key;
- });
-
- return res;
-};
-
-constants.der = __webpack_require__(/*! ./der */ "./node_modules/asn1.js/lib/asn1/constants/der.js");
-
-
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1/decoders/der.js":
-/*!*******************************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1/decoders/der.js ***!
- \*******************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
-
-var asn1 = __webpack_require__(/*! ../../asn1 */ "./node_modules/asn1.js/lib/asn1.js");
-var base = asn1.base;
-var bignum = asn1.bignum;
-
-// Import DER constants
-var der = asn1.constants.der;
-
-function DERDecoder(entity) {
- this.enc = 'der';
- this.name = entity.name;
- this.entity = entity;
-
- // Construct base tree
- this.tree = new DERNode();
- this.tree._init(entity.body);
-};
-module.exports = DERDecoder;
-
-DERDecoder.prototype.decode = function decode(data, options) {
- if (!(data instanceof base.DecoderBuffer))
- data = new base.DecoderBuffer(data, options);
-
- return this.tree._decode(data, options);
-};
-
-// Tree methods
-
-function DERNode(parent) {
- base.Node.call(this, 'der', parent);
-}
-inherits(DERNode, base.Node);
-
-DERNode.prototype._peekTag = function peekTag(buffer, tag, any) {
- if (buffer.isEmpty())
- return false;
-
- var state = buffer.save();
- var decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"');
- if (buffer.isError(decodedTag))
- return decodedTag;
-
- buffer.restore(state);
-
- return decodedTag.tag === tag || decodedTag.tagStr === tag ||
- (decodedTag.tagStr + 'of') === tag || any;
-};
-
-DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) {
- var decodedTag = derDecodeTag(buffer,
- 'Failed to decode tag of "' + tag + '"');
- if (buffer.isError(decodedTag))
- return decodedTag;
-
- var len = derDecodeLen(buffer,
- decodedTag.primitive,
- 'Failed to get length of "' + tag + '"');
-
- // Failure
- if (buffer.isError(len))
- return len;
-
- if (!any &&
- decodedTag.tag !== tag &&
- decodedTag.tagStr !== tag &&
- decodedTag.tagStr + 'of' !== tag) {
- return buffer.error('Failed to match tag: "' + tag + '"');
- }
-
- if (decodedTag.primitive || len !== null)
- return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
-
- // Indefinite length... find END tag
- var state = buffer.save();
- var res = this._skipUntilEnd(
- buffer,
- 'Failed to skip indefinite length body: "' + this.tag + '"');
- if (buffer.isError(res))
- return res;
-
- len = buffer.offset - state.offset;
- buffer.restore(state);
- return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
-};
-
-DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {
- while (true) {
- var tag = derDecodeTag(buffer, fail);
- if (buffer.isError(tag))
- return tag;
- var len = derDecodeLen(buffer, tag.primitive, fail);
- if (buffer.isError(len))
- return len;
-
- var res;
- if (tag.primitive || len !== null)
- res = buffer.skip(len)
- else
- res = this._skipUntilEnd(buffer, fail);
-
- // Failure
- if (buffer.isError(res))
- return res;
-
- if (tag.tagStr === 'end')
- break;
- }
-};
-
-DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,
- options) {
- var result = [];
- while (!buffer.isEmpty()) {
- var possibleEnd = this._peekTag(buffer, 'end');
- if (buffer.isError(possibleEnd))
- return possibleEnd;
-
- var res = decoder.decode(buffer, 'der', options);
- if (buffer.isError(res) && possibleEnd)
- break;
- result.push(res);
- }
- return result;
-};
-
-DERNode.prototype._decodeStr = function decodeStr(buffer, tag) {
- if (tag === 'bitstr') {
- var unused = buffer.readUInt8();
- if (buffer.isError(unused))
- return unused;
- return { unused: unused, data: buffer.raw() };
- } else if (tag === 'bmpstr') {
- var raw = buffer.raw();
- if (raw.length % 2 === 1)
- return buffer.error('Decoding of string type: bmpstr length mismatch');
-
- var str = '';
- for (var i = 0; i < raw.length / 2; i++) {
- str += String.fromCharCode(raw.readUInt16BE(i * 2));
- }
- return str;
- } else if (tag === 'numstr') {
- var numstr = buffer.raw().toString('ascii');
- if (!this._isNumstr(numstr)) {
- return buffer.error('Decoding of string type: ' +
- 'numstr unsupported characters');
- }
- return numstr;
- } else if (tag === 'octstr') {
- return buffer.raw();
- } else if (tag === 'objDesc') {
- return buffer.raw();
- } else if (tag === 'printstr') {
- var printstr = buffer.raw().toString('ascii');
- if (!this._isPrintstr(printstr)) {
- return buffer.error('Decoding of string type: ' +
- 'printstr unsupported characters');
- }
- return printstr;
- } else if (/str$/.test(tag)) {
- return buffer.raw().toString();
- } else {
- return buffer.error('Decoding of string type: ' + tag + ' unsupported');
- }
-};
-
-DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) {
- var result;
- var identifiers = [];
- var ident = 0;
- while (!buffer.isEmpty()) {
- var subident = buffer.readUInt8();
- ident <<= 7;
- ident |= subident & 0x7f;
- if ((subident & 0x80) === 0) {
- identifiers.push(ident);
- ident = 0;
- }
- }
- if (subident & 0x80)
- identifiers.push(ident);
-
- var first = (identifiers[0] / 40) | 0;
- var second = identifiers[0] % 40;
-
- if (relative)
- result = identifiers;
- else
- result = [first, second].concat(identifiers.slice(1));
-
- if (values) {
- var tmp = values[result.join(' ')];
- if (tmp === undefined)
- tmp = values[result.join('.')];
- if (tmp !== undefined)
- result = tmp;
- }
-
- return result;
-};
-
-DERNode.prototype._decodeTime = function decodeTime(buffer, tag) {
- var str = buffer.raw().toString();
- if (tag === 'gentime') {
- var year = str.slice(0, 4) | 0;
- var mon = str.slice(4, 6) | 0;
- var day = str.slice(6, 8) | 0;
- var hour = str.slice(8, 10) | 0;
- var min = str.slice(10, 12) | 0;
- var sec = str.slice(12, 14) | 0;
- } else if (tag === 'utctime') {
- var year = str.slice(0, 2) | 0;
- var mon = str.slice(2, 4) | 0;
- var day = str.slice(4, 6) | 0;
- var hour = str.slice(6, 8) | 0;
- var min = str.slice(8, 10) | 0;
- var sec = str.slice(10, 12) | 0;
- if (year < 70)
- year = 2000 + year;
- else
- year = 1900 + year;
- } else {
- return buffer.error('Decoding ' + tag + ' time is not supported yet');
- }
-
- return Date.UTC(year, mon - 1, day, hour, min, sec, 0);
-};
-
-DERNode.prototype._decodeNull = function decodeNull(buffer) {
- return null;
-};
-
-DERNode.prototype._decodeBool = function decodeBool(buffer) {
- var res = buffer.readUInt8();
- if (buffer.isError(res))
- return res;
- else
- return res !== 0;
-};
-
-DERNode.prototype._decodeInt = function decodeInt(buffer, values) {
- // Bigint, return as it is (assume big endian)
- var raw = buffer.raw();
- var res = new bignum(raw);
-
- if (values)
- res = values[res.toString(10)] || res;
-
- return res;
-};
-
-DERNode.prototype._use = function use(entity, obj) {
- if (typeof entity === 'function')
- entity = entity(obj);
- return entity._getDecoder('der').tree;
-};
-
-// Utility methods
-
-function derDecodeTag(buf, fail) {
- var tag = buf.readUInt8(fail);
- if (buf.isError(tag))
- return tag;
-
- var cls = der.tagClass[tag >> 6];
- var primitive = (tag & 0x20) === 0;
-
- // Multi-octet tag - load
- if ((tag & 0x1f) === 0x1f) {
- var oct = tag;
- tag = 0;
- while ((oct & 0x80) === 0x80) {
- oct = buf.readUInt8(fail);
- if (buf.isError(oct))
- return oct;
-
- tag <<= 7;
- tag |= oct & 0x7f;
- }
- } else {
- tag &= 0x1f;
- }
- var tagStr = der.tag[tag];
-
- return {
- cls: cls,
- primitive: primitive,
- tag: tag,
- tagStr: tagStr
- };
-}
-
-function derDecodeLen(buf, primitive, fail) {
- var len = buf.readUInt8(fail);
- if (buf.isError(len))
- return len;
-
- // Indefinite form
- if (!primitive && len === 0x80)
- return null;
-
- // Definite form
- if ((len & 0x80) === 0) {
- // Short form
- return len;
- }
-
- // Long form
- var num = len & 0x7f;
- if (num > 4)
- return buf.error('length octect is too long');
-
- len = 0;
- for (var i = 0; i < num; i++) {
- len <<= 8;
- var j = buf.readUInt8(fail);
- if (buf.isError(j))
- return j;
- len |= j;
- }
-
- return len;
-}
-
-
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1/decoders/index.js":
-/*!*********************************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1/decoders/index.js ***!
- \*********************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var decoders = exports;
-
-decoders.der = __webpack_require__(/*! ./der */ "./node_modules/asn1.js/lib/asn1/decoders/der.js");
-decoders.pem = __webpack_require__(/*! ./pem */ "./node_modules/asn1.js/lib/asn1/decoders/pem.js");
-
-
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1/decoders/pem.js":
-/*!*******************************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1/decoders/pem.js ***!
- \*******************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
-var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js").Buffer;
-
-var DERDecoder = __webpack_require__(/*! ./der */ "./node_modules/asn1.js/lib/asn1/decoders/der.js");
-
-function PEMDecoder(entity) {
- DERDecoder.call(this, entity);
- this.enc = 'pem';
-};
-inherits(PEMDecoder, DERDecoder);
-module.exports = PEMDecoder;
-
-PEMDecoder.prototype.decode = function decode(data, options) {
- var lines = data.toString().split(/[\r\n]+/g);
-
- var label = options.label.toUpperCase();
-
- var re = /^-----(BEGIN|END) ([^-]+)-----$/;
- var start = -1;
- var end = -1;
- for (var i = 0; i < lines.length; i++) {
- var match = lines[i].match(re);
- if (match === null)
- continue;
-
- if (match[2] !== label)
- continue;
-
- if (start === -1) {
- if (match[1] !== 'BEGIN')
- break;
- start = i;
- } else {
- if (match[1] !== 'END')
- break;
- end = i;
- break;
- }
- }
- if (start === -1 || end === -1)
- throw new Error('PEM section not found for: ' + label);
-
- var base64 = lines.slice(start + 1, end).join('');
- // Remove excessive symbols
- base64.replace(/[^a-z0-9\+\/=]+/gi, '');
-
- var input = new Buffer(base64, 'base64');
- return DERDecoder.prototype.decode.call(this, input, options);
-};
-
-
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1/encoders/der.js":
-/*!*******************************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1/encoders/der.js ***!
- \*******************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
-var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js").Buffer;
-
-var asn1 = __webpack_require__(/*! ../../asn1 */ "./node_modules/asn1.js/lib/asn1.js");
-var base = asn1.base;
-
-// Import DER constants
-var der = asn1.constants.der;
-
-function DEREncoder(entity) {
- this.enc = 'der';
- this.name = entity.name;
- this.entity = entity;
-
- // Construct base tree
- this.tree = new DERNode();
- this.tree._init(entity.body);
-};
-module.exports = DEREncoder;
-
-DEREncoder.prototype.encode = function encode(data, reporter) {
- return this.tree._encode(data, reporter).join();
-};
-
-// Tree methods
-
-function DERNode(parent) {
- base.Node.call(this, 'der', parent);
-}
-inherits(DERNode, base.Node);
-
-DERNode.prototype._encodeComposite = function encodeComposite(tag,
- primitive,
- cls,
- content) {
- var encodedTag = encodeTag(tag, primitive, cls, this.reporter);
-
- // Short form
- if (content.length < 0x80) {
- var header = new Buffer(2);
- header[0] = encodedTag;
- header[1] = content.length;
- return this._createEncoderBuffer([ header, content ]);
- }
-
- // Long form
- // Count octets required to store length
- var lenOctets = 1;
- for (var i = content.length; i >= 0x100; i >>= 8)
- lenOctets++;
-
- var header = new Buffer(1 + 1 + lenOctets);
- header[0] = encodedTag;
- header[1] = 0x80 | lenOctets;
-
- for (var i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)
- header[i] = j & 0xff;
-
- return this._createEncoderBuffer([ header, content ]);
-};
-
-DERNode.prototype._encodeStr = function encodeStr(str, tag) {
- if (tag === 'bitstr') {
- return this._createEncoderBuffer([ str.unused | 0, str.data ]);
- } else if (tag === 'bmpstr') {
- var buf = new Buffer(str.length * 2);
- for (var i = 0; i < str.length; i++) {
- buf.writeUInt16BE(str.charCodeAt(i), i * 2);
- }
- return this._createEncoderBuffer(buf);
- } else if (tag === 'numstr') {
- if (!this._isNumstr(str)) {
- return this.reporter.error('Encoding of string type: numstr supports ' +
- 'only digits and space');
- }
- return this._createEncoderBuffer(str);
- } else if (tag === 'printstr') {
- if (!this._isPrintstr(str)) {
- return this.reporter.error('Encoding of string type: printstr supports ' +
- 'only latin upper and lower case letters, ' +
- 'digits, space, apostrophe, left and rigth ' +
- 'parenthesis, plus sign, comma, hyphen, ' +
- 'dot, slash, colon, equal sign, ' +
- 'question mark');
- }
- return this._createEncoderBuffer(str);
- } else if (/str$/.test(tag)) {
- return this._createEncoderBuffer(str);
- } else if (tag === 'objDesc') {
- return this._createEncoderBuffer(str);
- } else {
- return this.reporter.error('Encoding of string type: ' + tag +
- ' unsupported');
- }
-};
-
-DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) {
- if (typeof id === 'string') {
- if (!values)
- return this.reporter.error('string objid given, but no values map found');
- if (!values.hasOwnProperty(id))
- return this.reporter.error('objid not found in values map');
- id = values[id].split(/[\s\.]+/g);
- for (var i = 0; i < id.length; i++)
- id[i] |= 0;
- } else if (Array.isArray(id)) {
- id = id.slice();
- for (var i = 0; i < id.length; i++)
- id[i] |= 0;
- }
-
- if (!Array.isArray(id)) {
- return this.reporter.error('objid() should be either array or string, ' +
- 'got: ' + JSON.stringify(id));
- }
-
- if (!relative) {
- if (id[1] >= 40)
- return this.reporter.error('Second objid identifier OOB');
- id.splice(0, 2, id[0] * 40 + id[1]);
- }
-
- // Count number of octets
- var size = 0;
- for (var i = 0; i < id.length; i++) {
- var ident = id[i];
- for (size++; ident >= 0x80; ident >>= 7)
- size++;
- }
-
- var objid = new Buffer(size);
- var offset = objid.length - 1;
- for (var i = id.length - 1; i >= 0; i--) {
- var ident = id[i];
- objid[offset--] = ident & 0x7f;
- while ((ident >>= 7) > 0)
- objid[offset--] = 0x80 | (ident & 0x7f);
- }
-
- return this._createEncoderBuffer(objid);
-};
-
-function two(num) {
- if (num < 10)
- return '0' + num;
- else
- return num;
-}
-
-DERNode.prototype._encodeTime = function encodeTime(time, tag) {
- var str;
- var date = new Date(time);
-
- if (tag === 'gentime') {
- str = [
- two(date.getFullYear()),
- two(date.getUTCMonth() + 1),
- two(date.getUTCDate()),
- two(date.getUTCHours()),
- two(date.getUTCMinutes()),
- two(date.getUTCSeconds()),
- 'Z'
- ].join('');
- } else if (tag === 'utctime') {
- str = [
- two(date.getFullYear() % 100),
- two(date.getUTCMonth() + 1),
- two(date.getUTCDate()),
- two(date.getUTCHours()),
- two(date.getUTCMinutes()),
- two(date.getUTCSeconds()),
- 'Z'
- ].join('');
- } else {
- this.reporter.error('Encoding ' + tag + ' time is not supported yet');
- }
-
- return this._encodeStr(str, 'octstr');
-};
-
-DERNode.prototype._encodeNull = function encodeNull() {
- return this._createEncoderBuffer('');
-};
-
-DERNode.prototype._encodeInt = function encodeInt(num, values) {
- if (typeof num === 'string') {
- if (!values)
- return this.reporter.error('String int or enum given, but no values map');
- if (!values.hasOwnProperty(num)) {
- return this.reporter.error('Values map doesn\'t contain: ' +
- JSON.stringify(num));
- }
- num = values[num];
- }
-
- // Bignum, assume big endian
- if (typeof num !== 'number' && !Buffer.isBuffer(num)) {
- var numArray = num.toArray();
- if (!num.sign && numArray[0] & 0x80) {
- numArray.unshift(0);
- }
- num = new Buffer(numArray);
- }
-
- if (Buffer.isBuffer(num)) {
- var size = num.length;
- if (num.length === 0)
- size++;
-
- var out = new Buffer(size);
- num.copy(out);
- if (num.length === 0)
- out[0] = 0
- return this._createEncoderBuffer(out);
- }
-
- if (num < 0x80)
- return this._createEncoderBuffer(num);
-
- if (num < 0x100)
- return this._createEncoderBuffer([0, num]);
-
- var size = 1;
- for (var i = num; i >= 0x100; i >>= 8)
- size++;
-
- var out = new Array(size);
- for (var i = out.length - 1; i >= 0; i--) {
- out[i] = num & 0xff;
- num >>= 8;
- }
- if(out[0] & 0x80) {
- out.unshift(0);
- }
-
- return this._createEncoderBuffer(new Buffer(out));
-};
-
-DERNode.prototype._encodeBool = function encodeBool(value) {
- return this._createEncoderBuffer(value ? 0xff : 0);
-};
-
-DERNode.prototype._use = function use(entity, obj) {
- if (typeof entity === 'function')
- entity = entity(obj);
- return entity._getEncoder('der').tree;
-};
-
-DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) {
- var state = this._baseState;
- var i;
- if (state['default'] === null)
- return false;
-
- var data = dataBuffer.join();
- if (state.defaultBuffer === undefined)
- state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join();
-
- if (data.length !== state.defaultBuffer.length)
- return false;
-
- for (i=0; i < data.length; i++)
- if (data[i] !== state.defaultBuffer[i])
- return false;
-
- return true;
-};
-
-// Utility methods
-
-function encodeTag(tag, primitive, cls, reporter) {
- var res;
-
- if (tag === 'seqof')
- tag = 'seq';
- else if (tag === 'setof')
- tag = 'set';
-
- if (der.tagByName.hasOwnProperty(tag))
- res = der.tagByName[tag];
- else if (typeof tag === 'number' && (tag | 0) === tag)
- res = tag;
- else
- return reporter.error('Unknown tag: ' + tag);
-
- if (res >= 0x1f)
- return reporter.error('Multi-octet tag encoding unsupported');
-
- if (!primitive)
- res |= 0x20;
-
- res |= (der.tagClassByName[cls || 'universal'] << 6);
-
- return res;
-}
-
-
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1/encoders/index.js":
-/*!*********************************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1/encoders/index.js ***!
- \*********************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var encoders = exports;
-
-encoders.der = __webpack_require__(/*! ./der */ "./node_modules/asn1.js/lib/asn1/encoders/der.js");
-encoders.pem = __webpack_require__(/*! ./pem */ "./node_modules/asn1.js/lib/asn1/encoders/pem.js");
-
-
-/***/ }),
-
-/***/ "./node_modules/asn1.js/lib/asn1/encoders/pem.js":
-/*!*******************************************************!*\
- !*** ./node_modules/asn1.js/lib/asn1/encoders/pem.js ***!
- \*******************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
-
-var DEREncoder = __webpack_require__(/*! ./der */ "./node_modules/asn1.js/lib/asn1/encoders/der.js");
-
-function PEMEncoder(entity) {
- DEREncoder.call(this, entity);
- this.enc = 'pem';
-};
-inherits(PEMEncoder, DEREncoder);
-module.exports = PEMEncoder;
-
-PEMEncoder.prototype.encode = function encode(data, options) {
- var buf = DEREncoder.prototype.encode.call(this, data);
-
- var p = buf.toString('base64');
- var out = [ '-----BEGIN ' + options.label + '-----' ];
- for (var i = 0; i < p.length; i += 64)
- out.push(p.slice(i, i + 64));
- out.push('-----END ' + options.label + '-----');
- return out.join('\n');
-};
-
-
-/***/ }),
-
-/***/ "./node_modules/base64-js/index.js":
-/*!*****************************************!*\
- !*** ./node_modules/base64-js/index.js ***!
- \*****************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.byteLength = byteLength
-exports.toByteArray = toByteArray
-exports.fromByteArray = fromByteArray
-
-var lookup = []
-var revLookup = []
-var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
-
-var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
-for (var i = 0, len = code.length; i < len; ++i) {
- lookup[i] = code[i]
- revLookup[code.charCodeAt(i)] = i
-}
-
-// Support decoding URL-safe base64 strings, as Node.js does.
-// See: https://en.wikipedia.org/wiki/Base64#URL_applications
-revLookup['-'.charCodeAt(0)] = 62
-revLookup['_'.charCodeAt(0)] = 63
-
-function getLens (b64) {
- var len = b64.length
-
- if (len % 4 > 0) {
- throw new Error('Invalid string. Length must be a multiple of 4')
- }
-
- // Trim off extra bytes after placeholder bytes are found
- // See: https://github.com/beatgammit/base64-js/issues/42
- var validLen = b64.indexOf('=')
- if (validLen === -1) validLen = len
-
- var placeHoldersLen = validLen === len
- ? 0
- : 4 - (validLen % 4)
-
- return [validLen, placeHoldersLen]
-}
-
-// base64 is 4/3 + up to two characters of the original data
-function byteLength (b64) {
- var lens = getLens(b64)
- var validLen = lens[0]
- var placeHoldersLen = lens[1]
- return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
-}
-
-function _byteLength (b64, validLen, placeHoldersLen) {
- return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
-}
-
-function toByteArray (b64) {
- var tmp
- var lens = getLens(b64)
- var validLen = lens[0]
- var placeHoldersLen = lens[1]
-
- var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
-
- var curByte = 0
-
- // if there are placeholders, only get up to the last complete 4 chars
- var len = placeHoldersLen > 0
- ? validLen - 4
- : validLen
-
- var i
- for (i = 0; i < len; i += 4) {
- tmp =
- (revLookup[b64.charCodeAt(i)] << 18) |
- (revLookup[b64.charCodeAt(i + 1)] << 12) |
- (revLookup[b64.charCodeAt(i + 2)] << 6) |
- revLookup[b64.charCodeAt(i + 3)]
- arr[curByte++] = (tmp >> 16) & 0xFF
- arr[curByte++] = (tmp >> 8) & 0xFF
- arr[curByte++] = tmp & 0xFF
- }
-
- if (placeHoldersLen === 2) {
- tmp =
- (revLookup[b64.charCodeAt(i)] << 2) |
- (revLookup[b64.charCodeAt(i + 1)] >> 4)
- arr[curByte++] = tmp & 0xFF
- }
-
- if (placeHoldersLen === 1) {
- tmp =
- (revLookup[b64.charCodeAt(i)] << 10) |
- (revLookup[b64.charCodeAt(i + 1)] << 4) |
- (revLookup[b64.charCodeAt(i + 2)] >> 2)
- arr[curByte++] = (tmp >> 8) & 0xFF
- arr[curByte++] = tmp & 0xFF
- }
-
- return arr
-}
-
-function tripletToBase64 (num) {
- return lookup[num >> 18 & 0x3F] +
- lookup[num >> 12 & 0x3F] +
- lookup[num >> 6 & 0x3F] +
- lookup[num & 0x3F]
-}
-
-function encodeChunk (uint8, start, end) {
- var tmp
- var output = []
- for (var i = start; i < end; i += 3) {
- tmp =
- ((uint8[i] << 16) & 0xFF0000) +
- ((uint8[i + 1] << 8) & 0xFF00) +
- (uint8[i + 2] & 0xFF)
- output.push(tripletToBase64(tmp))
- }
- return output.join('')
-}
-
-function fromByteArray (uint8) {
- var tmp
- var len = uint8.length
- var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
- var parts = []
- var maxChunkLength = 16383 // must be multiple of 3
-
- // go through the array every three bytes, we'll deal with trailing stuff later
- for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
- parts.push(encodeChunk(
- uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
- ))
- }
-
- // pad the end with zeros, but make sure to not forget the extra bytes
- if (extraBytes === 1) {
- tmp = uint8[len - 1]
- parts.push(
- lookup[tmp >> 2] +
- lookup[(tmp << 4) & 0x3F] +
- '=='
- )
- } else if (extraBytes === 2) {
- tmp = (uint8[len - 2] << 8) + uint8[len - 1]
- parts.push(
- lookup[tmp >> 10] +
- lookup[(tmp >> 4) & 0x3F] +
- lookup[(tmp << 2) & 0x3F] +
- '='
- )
- }
-
- return parts.join('')
-}
-
-
-/***/ }),
-
-/***/ "./node_modules/bn.js/lib/bn.js":
-/*!**************************************!*\
- !*** ./node_modules/bn.js/lib/bn.js ***!
- \**************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-/* WEBPACK VAR INJECTION */(function(module) {(function (module, exports) {
- 'use strict';
-
- // Utils
- function assert (val, msg) {
- if (!val) throw new Error(msg || 'Assertion failed');
- }
-
- // Could use `inherits` module, but don't want to move from single file
- // architecture yet.
- function inherits (ctor, superCtor) {
- ctor.super_ = superCtor;
- var TempCtor = function () {};
- TempCtor.prototype = superCtor.prototype;
- ctor.prototype = new TempCtor();
- ctor.prototype.constructor = ctor;
- }
-
- // BN
-
- function BN (number, base, endian) {
- if (BN.isBN(number)) {
- return number;
- }
-
- this.negative = 0;
- this.words = null;
- this.length = 0;
-
- // Reduction context
- this.red = null;
-
- if (number !== null) {
- if (base === 'le' || base === 'be') {
- endian = base;
- base = 10;
- }
-
- this._init(number || 0, base || 10, endian || 'be');
- }
- }
- if (typeof module === 'object') {
- module.exports = BN;
- } else {
- exports.BN = BN;
- }
-
- BN.BN = BN;
- BN.wordSize = 26;
-
- var Buffer;
- try {
- Buffer = __webpack_require__(/*! buffer */ 2).Buffer;
- } catch (e) {
- }
-
- BN.isBN = function isBN (num) {
- if (num instanceof BN) {
- return true;
- }
-
- return num !== null && typeof num === 'object' &&
- num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);
- };
-
- BN.max = function max (left, right) {
- if (left.cmp(right) > 0) return left;
- return right;
- };
-
- BN.min = function min (left, right) {
- if (left.cmp(right) < 0) return left;
- return right;
- };
-
- BN.prototype._init = function init (number, base, endian) {
- if (typeof number === 'number') {
- return this._initNumber(number, base, endian);
- }
-
- if (typeof number === 'object') {
- return this._initArray(number, base, endian);
- }
-
- if (base === 'hex') {
- base = 16;
- }
- assert(base === (base | 0) && base >= 2 && base <= 36);
-
- number = number.toString().replace(/\s+/g, '');
- var start = 0;
- if (number[0] === '-') {
- start++;
- }
-
- if (base === 16) {
- this._parseHex(number, start);
- } else {
- this._parseBase(number, base, start);
- }
-
- if (number[0] === '-') {
- this.negative = 1;
- }
-
- this.strip();
-
- if (endian !== 'le') return;
-
- this._initArray(this.toArray(), base, endian);
- };
-
- BN.prototype._initNumber = function _initNumber (number, base, endian) {
- if (number < 0) {
- this.negative = 1;
- number = -number;
- }
- if (number < 0x4000000) {
- this.words = [ number & 0x3ffffff ];
- this.length = 1;
- } else if (number < 0x10000000000000) {
- this.words = [
- number & 0x3ffffff,
- (number / 0x4000000) & 0x3ffffff
- ];
- this.length = 2;
- } else {
- assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)
- this.words = [
- number & 0x3ffffff,
- (number / 0x4000000) & 0x3ffffff,
- 1
- ];
- this.length = 3;
- }
-
- if (endian !== 'le') return;
-
- // Reverse the bytes
- this._initArray(this.toArray(), base, endian);
- };
-
- BN.prototype._initArray = function _initArray (number, base, endian) {
- // Perhaps a Uint8Array
- assert(typeof number.length === 'number');
- if (number.length <= 0) {
- this.words = [ 0 ];
- this.length = 1;
- return this;
- }
-
- this.length = Math.ceil(number.length / 3);
- this.words = new Array(this.length);
- for (var i = 0; i < this.length; i++) {
- this.words[i] = 0;
- }
-
- var j, w;
- var off = 0;
- if (endian === 'be') {
- for (i = number.length - 1, j = 0; i >= 0; i -= 3) {
- w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);
- this.words[j] |= (w << off) & 0x3ffffff;
- this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
- off += 24;
- if (off >= 26) {
- off -= 26;
- j++;
- }
- }
- } else if (endian === 'le') {
- for (i = 0, j = 0; i < number.length; i += 3) {
- w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);
- this.words[j] |= (w << off) & 0x3ffffff;
- this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
- off += 24;
- if (off >= 26) {
- off -= 26;
- j++;
- }
- }
- }
- return this.strip();
- };
-
- function parseHex (str, start, end) {
- var r = 0;
- var len = Math.min(str.length, end);
- for (var i = start; i < len; i++) {
- var c = str.charCodeAt(i) - 48;
-
- r <<= 4;
-
- // 'a' - 'f'
- if (c >= 49 && c <= 54) {
- r |= c - 49 + 0xa;
-
- // 'A' - 'F'
- } else if (c >= 17 && c <= 22) {
- r |= c - 17 + 0xa;
-
- // '0' - '9'
- } else {
- r |= c & 0xf;
- }
- }
- return r;
- }
-
- BN.prototype._parseHex = function _parseHex (number, start) {
- // Create possibly bigger array to ensure that it fits the number
- this.length = Math.ceil((number.length - start) / 6);
- this.words = new Array(this.length);
- for (var i = 0; i < this.length; i++) {
- this.words[i] = 0;
- }
-
- var j, w;
- // Scan 24-bit chunks and add them to the number
- var off = 0;
- for (i = number.length - 6, j = 0; i >= start; i -= 6) {
- w = parseHex(number, i, i + 6);
- this.words[j] |= (w << off) & 0x3ffffff;
- // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb
- this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
- off += 24;
- if (off >= 26) {
- off -= 26;
- j++;
- }
- }
- if (i + 6 !== start) {
- w = parseHex(number, start, i + 6);
- this.words[j] |= (w << off) & 0x3ffffff;
- this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
- }
- this.strip();
- };
-
- function parseBase (str, start, end, mul) {
- var r = 0;
- var len = Math.min(str.length, end);
- for (var i = start; i < len; i++) {
- var c = str.charCodeAt(i) - 48;
-
- r *= mul;
-
- // 'a'
- if (c >= 49) {
- r += c - 49 + 0xa;
-
- // 'A'
- } else if (c >= 17) {
- r += c - 17 + 0xa;
-
- // '0' - '9'
- } else {
- r += c;
- }
- }
- return r;
- }
-
- BN.prototype._parseBase = function _parseBase (number, base, start) {
- // Initialize as zero
- this.words = [ 0 ];
- this.length = 1;
-
- // Find length of limb in base
- for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {
- limbLen++;
- }
- limbLen--;
- limbPow = (limbPow / base) | 0;
-
- var total = number.length - start;
- var mod = total % limbLen;
- var end = Math.min(total, total - mod) + start;
-
- var word = 0;
- for (var i = start; i < end; i += limbLen) {
- word = parseBase(number, i, i + limbLen, base);
-
- this.imuln(limbPow);
- if (this.words[0] + word < 0x4000000) {
- this.words[0] += word;
- } else {
- this._iaddn(word);
- }
- }
-
- if (mod !== 0) {
- var pow = 1;
- word = parseBase(number, i, number.length, base);
-
- for (i = 0; i < mod; i++) {
- pow *= base;
- }
-
- this.imuln(pow);
- if (this.words[0] + word < 0x4000000) {
- this.words[0] += word;
- } else {
- this._iaddn(word);
- }
- }
- };
-
- BN.prototype.copy = function copy (dest) {
- dest.words = new Array(this.length);
- for (var i = 0; i < this.length; i++) {
- dest.words[i] = this.words[i];
- }
- dest.length = this.length;
- dest.negative = this.negative;
- dest.red = this.red;
- };
-
- BN.prototype.clone = function clone () {
- var r = new BN(null);
- this.copy(r);
- return r;
- };
-
- BN.prototype._expand = function _expand (size) {
- while (this.length < size) {
- this.words[this.length++] = 0;
- }
- return this;
- };
-
- // Remove leading `0` from `this`
- BN.prototype.strip = function strip () {
- while (this.length > 1 && this.words[this.length - 1] === 0) {
- this.length--;
- }
- return this._normSign();
- };
-
- BN.prototype._normSign = function _normSign () {
- // -0 = 0
- if (this.length === 1 && this.words[0] === 0) {
- this.negative = 0;
- }
- return this;
- };
-
- BN.prototype.inspect = function inspect () {
- return (this.red ? '
/gi;\n\nexport const hasBreaks = text => {\n return /
/gi.test(text);\n};\n\nexport const splitBreaks = text => {\n return text.split(/
/gi);\n};\n\nconst breakToPlaceholder = s => {\n return s.replace(lineBreakRegex, '#br#');\n};\n\nconst placeholderToBreak = s => {\n return s.replace(/#br#/g, '
');\n};\n\nexport default {\n getRows,\n sanitizeText,\n hasBreaks,\n splitBreaks,\n lineBreakRegex,\n removeScript\n};\n","/**\n *\n */\nimport { logger } from '../../logger';\n\nlet entities = {};\nlet relationships = [];\nlet title = '';\n\nconst Cardinality = {\n ZERO_OR_ONE: 'ZERO_OR_ONE',\n ZERO_OR_MORE: 'ZERO_OR_MORE',\n ONE_OR_MORE: 'ONE_OR_MORE',\n ONLY_ONE: 'ONLY_ONE'\n};\n\nconst Identification = {\n NON_IDENTIFYING: 'NON_IDENTIFYING',\n IDENTIFYING: 'IDENTIFYING'\n};\n\nconst addEntity = function(name) {\n if (typeof entities[name] === 'undefined') {\n entities[name] = name;\n logger.debug('Added new entity :', name);\n }\n};\n\nconst getEntities = () => entities;\n\n/**\n * Add a relationship\n * @param entA The first entity in the relationship\n * @param rolA The role played by the first entity in relation to the second\n * @param entB The second entity in the relationship\n * @param rSpec The details of the relationship between the two entities\n */\nconst addRelationship = function(entA, rolA, entB, rSpec) {\n let rel = {\n entityA: entA,\n roleA: rolA,\n entityB: entB,\n relSpec: rSpec\n };\n\n relationships.push(rel);\n logger.debug('Added new relationship :', rel);\n};\n\nconst getRelationships = () => relationships;\n\n// Keep this - TODO: revisit...allow the diagram to have a title\nconst setTitle = function(txt) {\n title = txt;\n};\n\nconst getTitle = function() {\n return title;\n};\n\nconst clear = function() {\n entities = {};\n relationships = [];\n title = '';\n};\n\nexport default {\n Cardinality,\n Identification,\n addEntity,\n getEntities,\n addRelationship,\n getRelationships,\n clear,\n setTitle,\n getTitle\n};\n","const ERMarkers = {\n ONLY_ONE_START: 'ONLY_ONE_START',\n ONLY_ONE_END: 'ONLY_ONE_END',\n ZERO_OR_ONE_START: 'ZERO_OR_ONE_START',\n ZERO_OR_ONE_END: 'ZERO_OR_ONE_END',\n ONE_OR_MORE_START: 'ONE_OR_MORE_START',\n ONE_OR_MORE_END: 'ONE_OR_MORE_END',\n ZERO_OR_MORE_START: 'ZERO_OR_MORE_START',\n ZERO_OR_MORE_END: 'ZERO_OR_MORE_END'\n};\n\n/**\n * Put the markers into the svg DOM for later use with edge paths\n */\nconst insertMarkers = function(elem, conf) {\n let marker;\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONLY_ONE_START)\n .attr('refX', 0)\n .attr('refY', 9)\n .attr('markerWidth', 18)\n .attr('markerHeight', 18)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M9,0 L9,18 M15,0 L15,18');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONLY_ONE_END)\n .attr('refX', 18)\n .attr('refY', 9)\n .attr('markerWidth', 18)\n .attr('markerHeight', 18)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M3,0 L3,18 M9,0 L9,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_ONE_START)\n .attr('refX', 0)\n .attr('refY', 9)\n .attr('markerWidth', 30)\n .attr('markerHeight', 18)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 21)\n .attr('cy', 9)\n .attr('r', 6);\n marker\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M9,0 L9,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_ONE_END)\n .attr('refX', 30)\n .attr('refY', 9)\n .attr('markerWidth', 30)\n .attr('markerHeight', 18)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 9)\n .attr('cy', 9)\n .attr('r', 6);\n marker\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M21,0 L21,18');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONE_OR_MORE_START)\n .attr('refX', 18)\n .attr('refY', 18)\n .attr('markerWidth', 45)\n .attr('markerHeight', 36)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONE_OR_MORE_END)\n .attr('refX', 27)\n .attr('refY', 18)\n .attr('markerWidth', 45)\n .attr('markerHeight', 36)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_MORE_START)\n .attr('refX', 18)\n .attr('refY', 18)\n .attr('markerWidth', 57)\n .attr('markerHeight', 36)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 48)\n .attr('cy', 18)\n .attr('r', 6);\n marker\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M0,18 Q18,0 36,18 Q18,36 0,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_MORE_END)\n .attr('refX', 39)\n .attr('refY', 18)\n .attr('markerWidth', 57)\n .attr('markerHeight', 36)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 9)\n .attr('cy', 18)\n .attr('r', 6);\n marker\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M21,18 Q39,0 57,18 Q39,36 21,18');\n\n return;\n};\n\nexport default {\n ERMarkers,\n insertMarkers\n};\n","import graphlib from 'graphlib';\nimport { line, curveBasis, select } from 'd3';\nimport erDb from './erDb';\nimport erParser from './parser/erDiagram';\nimport dagre from 'dagre';\nimport { getConfig } from '../../config';\nimport { logger } from '../../logger';\nimport erMarkers from './erMarkers';\n\nconst conf = {};\n\n/**\n * Allows the top-level API module to inject config specific to this renderer,\n * storing it in the local conf object. Note that generic config still needs to be\n * retrieved using getConfig() imported from the config module\n */\nexport const setConf = function(cnf) {\n const keys = Object.keys(cnf);\n for (let i = 0; i < keys.length; i++) {\n conf[keys[i]] = cnf[keys[i]];\n }\n};\n\n/**\n * Use D3 to construct the svg elements for the entities\n * @param svgNode the svg node that contains the diagram\n * @param entities The entities to be drawn\n * @param graph The graph that contains the vertex and edge definitions post-layout\n * @return The first entity that was inserted\n */\nconst drawEntities = function(svgNode, entities, graph) {\n const keys = Object.keys(entities);\n let firstOne;\n\n keys.forEach(function(id) {\n // Create a group for each entity\n const groupNode = svgNode.append('g').attr('id', id);\n\n firstOne = firstOne === undefined ? id : firstOne;\n\n // Label the entity - this is done first so that we can get the bounding box\n // which then determines the size of the rectangle\n const textId = 'entity-' + id;\n const textNode = groupNode\n .append('text')\n .attr('class', 'er entityLabel')\n .attr('id', textId)\n .attr('x', 0)\n .attr('y', 0)\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle')\n .attr(\n 'style',\n 'font-family: ' + getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'\n )\n .text(id);\n\n // Calculate the width and height of the entity\n const textBBox = textNode.node().getBBox();\n const entityWidth = Math.max(conf.minEntityWidth, textBBox.width + conf.entityPadding * 2);\n const entityHeight = Math.max(conf.minEntityHeight, textBBox.height + conf.entityPadding * 2);\n\n // Make sure the text gets centred relative to the entity box\n textNode.attr('transform', 'translate(' + entityWidth / 2 + ',' + entityHeight / 2 + ')');\n\n // Draw the rectangle - insert it before the text so that the text is not obscured\n const rectNode = groupNode\n .insert('rect', '#' + textId)\n .attr('class', 'er entityBox')\n .attr('fill', conf.fill)\n .attr('fill-opacity', '100%')\n .attr('stroke', conf.stroke)\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', entityWidth)\n .attr('height', entityHeight);\n\n const rectBBox = rectNode.node().getBBox();\n\n // Add the entity to the graph\n graph.setNode(id, {\n width: rectBBox.width,\n height: rectBBox.height,\n shape: 'rect',\n id: id\n });\n });\n return firstOne;\n}; // drawEntities\n\nconst adjustEntities = function(svgNode, graph) {\n graph.nodes().forEach(function(v) {\n if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') {\n svgNode\n .select('#' + v)\n .attr(\n 'transform',\n 'translate(' +\n (graph.node(v).x - graph.node(v).width / 2) +\n ',' +\n (graph.node(v).y - graph.node(v).height / 2) +\n ' )'\n );\n }\n });\n return;\n};\n\nconst getEdgeName = function(rel) {\n return (rel.entityA + rel.roleA + rel.entityB).replace(/\\s/g, '');\n};\n\n/**\n * Add each relationship to the graph\n * @param relationships the relationships to be added\n * @param g the graph\n * @return {Array} The array of relationships\n */\nconst addRelationships = function(relationships, g) {\n relationships.forEach(function(r) {\n g.setEdge(r.entityA, r.entityB, { relationship: r }, getEdgeName(r));\n });\n return relationships;\n}; // addRelationships\n\nlet relCnt = 0;\n/**\n * Draw a relationship using edge information from the graph\n * @param svg the svg node\n * @param rel the relationship to draw in the svg\n * @param g the graph containing the edge information\n * @param insert the insertion point in the svg DOM (because relationships have markers that need to sit 'behind' opaque entity boxes)\n */\nconst drawRelationshipFromLayout = function(svg, rel, g, insert) {\n relCnt++;\n\n // Find the edge relating to this relationship\n const edge = g.edge(rel.entityA, rel.entityB, getEdgeName(rel));\n\n // Get a function that will generate the line path\n const lineFunction = line()\n .x(function(d) {\n return d.x;\n })\n .y(function(d) {\n return d.y;\n })\n .curve(curveBasis);\n\n // Insert the line at the right place\n const svgPath = svg\n .insert('path', '#' + insert)\n .attr('class', 'er relationshipLine')\n .attr('d', lineFunction(edge.points))\n .attr('stroke', conf.stroke)\n .attr('fill', 'none');\n\n // ...and with dashes if necessary\n if (rel.relSpec.relType === erDb.Identification.NON_IDENTIFYING) {\n svgPath.attr('stroke-dasharray', '8,8');\n }\n\n // TODO: Understand this better\n let url = '';\n if (conf.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n // Decide which start and end markers it needs. It may be possible to be more concise here\n // by reversing a start marker to make an end marker...but this will do for now\n\n // Note that the 'A' entity's marker is at the end of the relationship and the 'B' entity's marker is at the start\n switch (rel.relSpec.cardA) {\n case erDb.Cardinality.ZERO_OR_ONE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_ONE_END + ')');\n break;\n case erDb.Cardinality.ZERO_OR_MORE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_MORE_END + ')');\n break;\n case erDb.Cardinality.ONE_OR_MORE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ONE_OR_MORE_END + ')');\n break;\n case erDb.Cardinality.ONLY_ONE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ONLY_ONE_END + ')');\n break;\n }\n\n switch (rel.relSpec.cardB) {\n case erDb.Cardinality.ZERO_OR_ONE:\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_ONE_START + ')'\n );\n break;\n case erDb.Cardinality.ZERO_OR_MORE:\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_MORE_START + ')'\n );\n break;\n case erDb.Cardinality.ONE_OR_MORE:\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + erMarkers.ERMarkers.ONE_OR_MORE_START + ')'\n );\n break;\n case erDb.Cardinality.ONLY_ONE:\n svgPath.attr('marker-start', 'url(' + url + '#' + erMarkers.ERMarkers.ONLY_ONE_START + ')');\n break;\n }\n\n // Now label the relationship\n\n // Find the half-way point\n const len = svgPath.node().getTotalLength();\n const labelPoint = svgPath.node().getPointAtLength(len * 0.5);\n\n // Append a text node containing the label\n const labelId = 'rel' + relCnt;\n\n const labelNode = svg\n .append('text')\n .attr('class', 'er relationshipLabel')\n .attr('id', labelId)\n .attr('x', labelPoint.x)\n .attr('y', labelPoint.y)\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr(\n 'style',\n 'font-family: ' + getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'\n )\n .text(rel.roleA);\n\n // Figure out how big the opaque 'container' rectangle needs to be\n const labelBBox = labelNode.node().getBBox();\n\n // Insert the opaque rectangle before the text label\n svg\n .insert('rect', '#' + labelId)\n .attr('class', 'er relationshipLabelBox')\n .attr('x', labelPoint.x - labelBBox.width / 2)\n .attr('y', labelPoint.y - labelBBox.height / 2)\n .attr('width', labelBBox.width)\n .attr('height', labelBBox.height)\n .attr('fill', 'white')\n .attr('fill-opacity', '85%');\n\n return;\n};\n\n/**\n * Draw en E-R diagram in the tag with id: id based on the text definition of the diagram\n * @param text the text of the diagram\n * @param id the unique id of the DOM node that contains the diagram\n */\nexport const draw = function(text, id) {\n logger.info('Drawing ER diagram');\n erDb.clear();\n const parser = erParser.parser;\n parser.yy = erDb;\n\n // Parse the text to populate erDb\n try {\n parser.parse(text);\n } catch (err) {\n logger.debug('Parsing failed');\n }\n\n // Get a reference to the svg node that contains the text\n const svg = select(`[id='${id}']`);\n\n // Add cardinality marker definitions to the svg\n erMarkers.insertMarkers(svg, conf);\n\n // Now we have to construct the diagram in a specific way:\n // ---\n // 1. Create all the entities in the svg node at 0,0, but with the correct dimensions (allowing for text content)\n // 2. Make sure they are all added to the graph\n // 3. Add all the edges (relationships) to the graph aswell\n // 4. Let dagre do its magic to layout the graph. This assigns:\n // - the centre co-ordinates for each node, bearing in mind the dimensions and edge relationships\n // - the path co-ordinates for each edge\n // But it has no impact on the svg child nodes - the diagram remains with every entity rooted at 0,0\n // 5. Now assign a transform to each entity in the svg node so that it gets drawn in the correct place, as determined by\n // its centre point, which is obtained from the graph, and it's width and height\n // 6. And finally, create all the edges in the svg node using information from the graph\n // ---\n\n // Create the graph\n let g;\n\n // TODO: Explore directed vs undirected graphs, and how the layout is affected\n // An E-R diagram could be said to be undirected, but there is merit in setting\n // the direction from parent to child in a one-to-many as this influences graphlib to\n // put the parent above the child (does it?), which is intuitive. Most relationships\n // in ER diagrams are one-to-many.\n g = new graphlib.Graph({\n multigraph: true,\n directed: true,\n compound: false\n })\n .setGraph({\n rankdir: conf.layoutDirection,\n marginx: 20,\n marginy: 20,\n nodesep: 100,\n edgesep: 100,\n ranksep: 100\n })\n .setDefaultEdgeLabel(function() {\n return {};\n });\n\n // Draw the entities (at 0,0), returning the first svg node that got\n // inserted - this represents the insertion point for relationship paths\n const firstEntity = drawEntities(svg, erDb.getEntities(), g);\n\n // TODO: externalise the addition of entities to the graph - it's a bit 'buried' in the above\n\n // Add all the relationships to the graph\n const relationships = addRelationships(erDb.getRelationships(), g);\n\n dagre.layout(g); // Node and edge positions will be updated\n\n // Adjust the positions of the entities so that they adhere to the layout\n adjustEntities(svg, g);\n\n // Draw the relationships\n relationships.forEach(function(rel) {\n drawRelationshipFromLayout(svg, rel, g, firstEntity);\n });\n\n const padding = conf.diagramPadding;\n\n const svgBounds = svg.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n\n if (conf.useMaxWidth) {\n svg.attr('width', '100%');\n svg.attr('style', `max-width: ${width}px;`);\n } else {\n svg.attr('height', height);\n svg.attr('width', width);\n }\n\n svg.attr('viewBox', `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`);\n}; // draw\n\nexport default {\n setConf,\n draw\n};\n","/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,12],$V1=[1,7],$V2=[1,10],$V3=[1,11],$V4=[1,12],$V5=[1,13],$V6=[12,19,20],$V7=[15,16,17,18];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"ER_DIAGRAM\":4,\"document\":5,\"EOF\":6,\"statement\":7,\"entityName\":8,\"relSpec\":9,\":\":10,\"role\":11,\"ALPHANUM\":12,\"cardinality\":13,\"relType\":14,\"ZERO_OR_ONE\":15,\"ZERO_OR_MORE\":16,\"ONE_OR_MORE\":17,\"ONLY_ONE\":18,\"NON_IDENTIFYING\":19,\"IDENTIFYING\":20,\"WORD\":21,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"ER_DIAGRAM\",6:\"EOF\",10:\":\",12:\"ALPHANUM\",15:\"ZERO_OR_ONE\",16:\"ZERO_OR_MORE\",17:\"ONE_OR_MORE\",18:\"ONLY_ONE\",19:\"NON_IDENTIFYING\",20:\"IDENTIFYING\",21:\"WORD\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,5],[8,1],[9,3],[13,1],[13,1],[13,1],[13,1],[14,1],[14,1],[11,1],[11,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n /*console.log('finished parsing');*/ \nbreak;\ncase 4:\n\n yy.addEntity($$[$0-4]); \n yy.addEntity($$[$0-2]); \n yy.addRelationship($$[$0-4], $$[$0], $$[$0-2], $$[$0-3]);\n /*console.log($$[$0-4] + $$[$0-3] + $$[$0-2] + ':' + $$[$0]);*/\n \nbreak;\ncase 5:\n this.$ = $$[$0]; /*console.log('Entity: ' + $$[$0]);*/ \nbreak;\ncase 6:\n\n this.$ = { cardA: $$[$0], relType: $$[$0-1], cardB: $$[$0-2] };\n /*console.log('relSpec: ' + $$[$0] + $$[$0-1] + $$[$0-2]);*/\n \nbreak;\ncase 7:\n this.$ = yy.Cardinality.ZERO_OR_ONE; \nbreak;\ncase 8:\n this.$ = yy.Cardinality.ZERO_OR_MORE; \nbreak;\ncase 9:\n this.$ = yy.Cardinality.ONE_OR_MORE; \nbreak;\ncase 10:\n this.$ = yy.Cardinality.ONLY_ONE; \nbreak;\ncase 11:\n this.$ = yy.Identification.NON_IDENTIFYING; \nbreak;\ncase 12:\n this.$ = yy.Identification.IDENTIFYING; \nbreak;\ncase 13:\n this.$ = $$[$0].replace(/\"/g, ''); \nbreak;\ncase 14:\n this.$ = $$[$0]; \nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:6,12:$V1},{1:[2,1]},o($V0,[2,3]),{9:8,13:9,15:$V2,16:$V3,17:$V4,18:$V5},o([10,15,16,17,18],[2,5]),{8:14,12:$V1},{14:15,19:[1,16],20:[1,17]},o($V6,[2,7]),o($V6,[2,8]),o($V6,[2,9]),o($V6,[2,10]),{10:[1,18]},{13:19,15:$V2,16:$V3,17:$V4,18:$V5},o($V7,[2,11]),o($V7,[2,12]),{11:20,12:[1,22],21:[1,21]},{12:[2,6]},o($V0,[2,4]),o($V0,[2,13]),o($V0,[2,14])],\ndefaultActions: {4:[2,1],19:[2,6]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// 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.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n 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(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* skip whitespace */\nbreak;\ncase 1:return 'SPACE';\nbreak;\ncase 2:return 21;\nbreak;\ncase 3:return 4;\nbreak;\ncase 4:return 15;\nbreak;\ncase 5:return 16;\nbreak;\ncase 6:return 17;\nbreak;\ncase 7:return 18;\nbreak;\ncase 8:return 15;\nbreak;\ncase 9:return 16;\nbreak;\ncase 10:return 17;\nbreak;\ncase 11:return 19;\nbreak;\ncase 12:return 20;\nbreak;\ncase 13:return 19;\nbreak;\ncase 14:return 19;\nbreak;\ncase 15:return 12;\nbreak;\ncase 16:return yy_.yytext[0];\nbreak;\ncase 17:return 6;\nbreak;\n}\n},\nrules: [/^(?:\\s+)/i,/^(?:[\\s]+)/i,/^(?:\"[^\"]*\")/i,/^(?:erDiagram\\b)/i,/^(?:\\|o\\b)/i,/^(?:\\}o\\b)/i,/^(?:\\}\\|)/i,/^(?:\\|\\|)/i,/^(?:o\\|)/i,/^(?:o\\{)/i,/^(?:\\|\\{)/i,/^(?:\\.\\.)/i,/^(?:--)/i,/^(?:\\.-)/i,/^(?:-\\.)/i,/^(?:[A-Za-z][A-Za-z0-9\\-]*)/i,/^(?:.)/i,/^(?:$)/i],\nconditions: {\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof require !== 'undefined' && typeof exports !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n if (!args[1]) {\n console.log('Usage: '+args[0]+' FILE');\n process.exit(1);\n }\n var source = require('fs').readFileSync(require('path').normalize(args[1]), \"utf8\");\n return exports.parser.parse(source);\n};\nif (typeof module !== 'undefined' && require.main === module) {\n exports.main(process.argv.slice(1));\n}\n}","const getStyles = options =>\n `\n .entityBox {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${options.edgeLabelBackground};\n fillopactity: 0;\n background-color: ${options.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${options.lineColor};\n }\n`;\n\nexport default getStyles;\n","import dagreD3 from 'dagre-d3';\n\nfunction question(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const s = (w + h) * 0.9;\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 }\n ];\n const shapeSvg = insertPolygonShape(parent, s, s, points);\n node.intersect = function(point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\nfunction hexagon(parent, bbox, node) {\n const f = 4;\n const h = bbox.height;\n const m = h / f;\n const w = bbox.width + 2 * m;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\nfunction rect_left_inv_arrow(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: -h / 2, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: -h / 2, y: -h },\n { x: 0, y: -h / 2 }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\nfunction lean_right(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: h / 6, y: -h }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\nfunction lean_left(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: (2 * h) / 6, y: 0 },\n { x: w + h / 6, y: 0 },\n { x: w - (2 * h) / 6, y: -h },\n { x: -h / 6, y: -h }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\nfunction trapezoid(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w + (2 * h) / 6, y: 0 },\n { x: w - h / 6, y: -h },\n { x: h / 6, y: -h }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\nfunction inv_trapezoid(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: (-2 * h) / 6, y: -h }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\nfunction rect_right_inv_arrow(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: 0, y: 0 },\n { x: w + h / 2, y: 0 },\n { x: w, y: -h / 2 },\n { x: w + h / 2, y: -h },\n { x: 0, y: -h }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\nfunction stadium(parent, bbox, node) {\n const h = bbox.height;\n const w = bbox.width + h / 4;\n\n const shapeSvg = parent\n .insert('rect', ':first-child')\n .attr('rx', h / 2)\n .attr('ry', h / 2)\n .attr('x', -w / 2)\n .attr('y', -h / 2)\n .attr('width', w)\n .attr('height', h);\n\n node.intersect = function(point) {\n return dagreD3.intersect.rect(node, point);\n };\n return shapeSvg;\n}\n\nfunction subroutine(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 }\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function(point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\nfunction cylinder(parent, bbox, node) {\n const w = bbox.width;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = bbox.height + ry;\n\n const shape =\n 'M 0,' +\n ry +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n -w +\n ' 0 l 0,' +\n h +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 l 0,' +\n -h;\n\n const shapeSvg = parent\n .attr('label-offset-y', ry)\n .insert('path', ':first-child')\n .attr('d', shape)\n .attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')');\n\n node.intersect = function(point) {\n const pos = dagreD3.intersect.rect(node, point);\n const x = pos.x - node.x;\n\n if (\n rx != 0 &&\n (Math.abs(x) < node.width / 2 ||\n (Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry))\n ) {\n // ellipsis equation: x*x / a*a + y*y / b*b = 1\n // solve for y to get adjustion value for pos.y\n let y = ry * ry * (1 - (x * x) / (rx * rx));\n if (y != 0) y = Math.sqrt(y);\n y = ry - y;\n if (point.y - node.y > 0) y = -y;\n\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n}\n\nexport function addToRender(render) {\n render.shapes().question = question;\n render.shapes().hexagon = hexagon;\n render.shapes().stadium = stadium;\n render.shapes().subroutine = subroutine;\n render.shapes().cylinder = cylinder;\n\n // Add custom shape for box with inverted arrow on left side\n render.shapes().rect_left_inv_arrow = rect_left_inv_arrow;\n\n // Add custom shape for box with inverted arrow on left side\n render.shapes().lean_right = lean_right;\n\n // Add custom shape for box with inverted arrow on left side\n render.shapes().lean_left = lean_left;\n\n // Add custom shape for box with inverted arrow on left side\n render.shapes().trapezoid = trapezoid;\n\n // Add custom shape for box with inverted arrow on left side\n render.shapes().inv_trapezoid = inv_trapezoid;\n\n // Add custom shape for box with inverted arrow on right side\n render.shapes().rect_right_inv_arrow = rect_right_inv_arrow;\n}\n\nexport function addToRenderV2(addShape) {\n addShape({ question });\n addShape({ hexagon });\n addShape({ stadium });\n addShape({ subroutine });\n addShape({ cylinder });\n\n // Add custom shape for box with inverted arrow on left side\n addShape({ rect_left_inv_arrow });\n\n // Add custom shape for box with inverted arrow on left side\n addShape({ lean_right });\n\n // Add custom shape for box with inverted arrow on left side\n addShape({ lean_left });\n\n // Add custom shape for box with inverted arrow on left side\n addShape({ trapezoid });\n\n // Add custom shape for box with inverted arrow on left side\n addShape({ inv_trapezoid });\n\n // Add custom shape for box with inverted arrow on right side\n addShape({ rect_right_inv_arrow });\n}\n\nfunction insertPolygonShape(parent, w, h, points) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function(d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n\nexport default {\n addToRender,\n addToRenderV2\n};\n","import { select } from 'd3';\nimport { logger } from '../../logger'; // eslint-disable-line\nimport utils from '../../utils';\nimport { getConfig } from '../../config';\nimport common from '../common/common';\n\n// const MERMAID_DOM_ID_PREFIX = 'mermaid-dom-id-';\nconst MERMAID_DOM_ID_PREFIX = '';\n\nconst config = getConfig();\nlet vertices = {};\nlet edges = [];\nlet classes = [];\nlet subGraphs = [];\nlet subGraphLookup = {};\nlet tooltips = {};\nlet subCount = 0;\nlet firstGraphFlag = true;\nlet direction;\n// Functions to be run after graph rendering\nlet funs = [];\n\n/**\n * Function called by parser when a node definition has been found\n * @param id\n * @param text\n * @param type\n * @param style\n * @param classes\n */\nexport const addVertex = function(_id, text, type, style, classes) {\n let txt;\n let id = _id;\n if (typeof id === 'undefined') {\n return;\n }\n if (id.trim().length === 0) {\n return;\n }\n\n if (id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n\n if (typeof vertices[id] === 'undefined') {\n vertices[id] = { id: id, styles: [], classes: [] };\n }\n if (typeof text !== 'undefined') {\n txt = common.sanitizeText(text.trim(), config);\n\n // strip quotes if string starts and ends with a quote\n if (txt[0] === '\"' && txt[txt.length - 1] === '\"') {\n txt = txt.substring(1, txt.length - 1);\n }\n\n vertices[id].text = txt;\n } else {\n if (typeof vertices[id].text === 'undefined') {\n vertices[id].text = _id;\n }\n }\n if (typeof type !== 'undefined') {\n vertices[id].type = type;\n }\n if (typeof style !== 'undefined') {\n if (style !== null) {\n style.forEach(function(s) {\n vertices[id].styles.push(s);\n });\n }\n }\n if (typeof classes !== 'undefined') {\n if (classes !== null) {\n classes.forEach(function(s) {\n vertices[id].classes.push(s);\n });\n }\n }\n};\n\n/**\n * Function called by parser when a link/edge definition has been found\n * @param start\n * @param end\n * @param type\n * @param linktext\n */\nexport const addSingleLink = function(_start, _end, type, linktext) {\n let start = _start;\n let end = _end;\n if (start[0].match(/\\d/)) start = MERMAID_DOM_ID_PREFIX + start;\n if (end[0].match(/\\d/)) end = MERMAID_DOM_ID_PREFIX + end;\n // logger.info('Got edge...', start, end);\n\n const edge = { start: start, end: end, type: undefined, text: '' };\n linktext = type.text;\n\n if (typeof linktext !== 'undefined') {\n edge.text = common.sanitizeText(linktext.trim(), config);\n\n // strip quotes if string starts and exnds with a quote\n if (edge.text[0] === '\"' && edge.text[edge.text.length - 1] === '\"') {\n edge.text = edge.text.substring(1, edge.text.length - 1);\n }\n }\n\n if (typeof type !== 'undefined') {\n edge.type = type.type;\n edge.stroke = type.stroke;\n }\n edges.push(edge);\n};\nexport const addLink = function(_start, _end, type, linktext) {\n let i, j;\n for (i = 0; i < _start.length; i++) {\n for (j = 0; j < _end.length; j++) {\n addSingleLink(_start[i], _end[j], type, linktext);\n }\n }\n};\n\n/**\n * Updates a link's line interpolation algorithm\n * @param pos\n * @param interpolate\n */\nexport const updateLinkInterpolate = function(positions, interp) {\n positions.forEach(function(pos) {\n if (pos === 'default') {\n edges.defaultInterpolate = interp;\n } else {\n edges[pos].interpolate = interp;\n }\n });\n};\n\n/**\n * Updates a link with a style\n * @param pos\n * @param style\n */\nexport const updateLink = function(positions, style) {\n positions.forEach(function(pos) {\n if (pos === 'default') {\n edges.defaultStyle = style;\n } else {\n if (utils.isSubstringInArray('fill', style) === -1) {\n style.push('fill:none');\n }\n edges[pos].style = style;\n }\n });\n};\n\nexport const addClass = function(id, style) {\n if (typeof classes[id] === 'undefined') {\n classes[id] = { id: id, styles: [], textStyles: [] };\n }\n\n if (typeof style !== 'undefined') {\n if (style !== null) {\n style.forEach(function(s) {\n if (s.match('color')) {\n const newStyle1 = s.replace('fill', 'bgFill');\n const newStyle2 = newStyle1.replace('color', 'fill');\n classes[id].textStyles.push(newStyle2);\n }\n classes[id].styles.push(s);\n });\n }\n }\n};\n\n/**\n * Called by parser when a graph definition is found, stores the direction of the chart.\n * @param dir\n */\nexport const setDirection = function(dir) {\n direction = dir;\n if (direction.match(/.*)) {\n direction = 'RL';\n }\n if (direction.match(/.*\\^/)) {\n direction = 'BT';\n }\n if (direction.match(/.*>/)) {\n direction = 'LR';\n }\n if (direction.match(/.*v/)) {\n direction = 'TB';\n }\n};\n\n/**\n * Called by parser when a special node is found, e.g. a clickable element.\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\nexport const setClass = function(ids, className) {\n ids.split(',').forEach(function(_id) {\n let id = _id;\n if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n if (typeof vertices[id] !== 'undefined') {\n vertices[id].classes.push(className);\n }\n\n if (typeof subGraphLookup[id] !== 'undefined') {\n subGraphLookup[id].classes.push(className);\n }\n });\n};\n\nconst setTooltip = function(ids, tooltip) {\n ids.split(',').forEach(function(id) {\n if (typeof tooltip !== 'undefined') {\n tooltips[id] = common.sanitizeText(tooltip, config);\n }\n });\n};\n\nconst setClickFun = function(_id, functionName) {\n let id = _id;\n if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n if (getConfig().securityLevel !== 'loose') {\n return;\n }\n if (typeof functionName === 'undefined') {\n return;\n }\n if (typeof vertices[id] !== 'undefined') {\n funs.push(function() {\n const elem = document.querySelector(`[id=\"${id}\"]`);\n if (elem !== null) {\n elem.addEventListener(\n 'click',\n function() {\n utils.runFunc(functionName, id);\n },\n false\n );\n }\n });\n }\n};\n\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n * @param ids Comma separated list of ids\n * @param linkStr URL to create a link for\n * @param tooltip Tooltip for the clickable element\n */\nexport const setLink = function(ids, linkStr, tooltip) {\n ids.split(',').forEach(function(_id) {\n let id = _id;\n if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n if (typeof vertices[id] !== 'undefined') {\n vertices[id].link = utils.formatUrl(linkStr, config);\n }\n });\n setTooltip(ids, tooltip);\n setClass(ids, 'clickable');\n};\nexport const getTooltip = function(id) {\n return tooltips[id];\n};\n\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param tooltip Tooltip for the clickable element\n */\nexport const setClickEvent = function(ids, functionName, tooltip) {\n ids.split(',').forEach(function(id) {\n setClickFun(id, functionName);\n });\n setTooltip(ids, tooltip);\n setClass(ids, 'clickable');\n};\n\nexport const bindFunctions = function(element) {\n funs.forEach(function(fun) {\n fun(element);\n });\n};\nexport const getDirection = function() {\n return direction.trim();\n};\n/**\n * Retrieval function for fetching the found nodes after parsing has completed.\n * @returns {{}|*|vertices}\n */\nexport const getVertices = function() {\n return vertices;\n};\n\n/**\n * Retrieval function for fetching the found links after parsing has completed.\n * @returns {{}|*|edges}\n */\nexport const getEdges = function() {\n return edges;\n};\n\n/**\n * Retrieval function for fetching the found class definitions after parsing has completed.\n * @returns {{}|*|classes}\n */\nexport const getClasses = function() {\n return classes;\n};\n\nconst setupToolTips = function(element) {\n let tooltipElem = select('.mermaidTooltip');\n if ((tooltipElem._groups || tooltipElem)[0][0] === null) {\n tooltipElem = select('body')\n .append('div')\n .attr('class', 'mermaidTooltip')\n .style('opacity', 0);\n }\n\n const svg = select(element).select('svg');\n\n const nodes = svg.selectAll('g.node');\n nodes\n .on('mouseover', function() {\n const el = select(this);\n const title = el.attr('title');\n\n // Dont try to draw a tooltip if no data is provided\n if (title === null) {\n return;\n }\n const rect = this.getBoundingClientRect();\n\n tooltipElem\n .transition()\n .duration(200)\n .style('opacity', '.9');\n tooltipElem\n .html(el.attr('title'))\n .style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px')\n .style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px');\n el.classed('hover', true);\n })\n .on('mouseout', function() {\n tooltipElem\n .transition()\n .duration(500)\n .style('opacity', 0);\n const el = select(this);\n el.classed('hover', false);\n });\n};\nfuns.push(setupToolTips);\n\n/**\n * Clears the internal graph db so that a new graph can be parsed.\n */\nexport const clear = function() {\n vertices = {};\n classes = {};\n edges = [];\n funs = [];\n funs.push(setupToolTips);\n subGraphs = [];\n subGraphLookup = {};\n subCount = 0;\n tooltips = [];\n firstGraphFlag = true;\n};\n/**\n *\n * @returns {string}\n */\nexport const defaultStyle = function() {\n return 'fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;';\n};\n\n/**\n * Clears the internal graph db so that a new graph can be parsed.\n */\nexport const addSubGraph = function(_id, list, _title) {\n let id = _id.trim();\n let title = _title;\n if (_id === _title && _title.match(/\\s/)) {\n id = undefined;\n }\n function uniq(a) {\n const prims = { boolean: {}, number: {}, string: {} };\n const objs = [];\n\n return a.filter(function(item) {\n const type = typeof item;\n if (item.trim() === '') {\n return false;\n }\n if (type in prims) {\n return prims[type].hasOwnProperty(item) ? false : (prims[type][item] = true); // eslint-disable-line\n } else {\n return objs.indexOf(item) >= 0 ? false : objs.push(item);\n }\n });\n }\n\n let nodeList = [];\n\n nodeList = uniq(nodeList.concat.apply(nodeList, list));\n for (let i = 0; i < nodeList.length; i++) {\n if (nodeList[i][0].match(/\\d/)) nodeList[i] = MERMAID_DOM_ID_PREFIX + nodeList[i];\n }\n\n id = id || 'subGraph' + subCount;\n if (id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n title = title || '';\n title = common.sanitizeText(title, config);\n subCount = subCount + 1;\n const subGraph = { id: id, nodes: nodeList, title: title.trim(), classes: [] };\n subGraphs.push(subGraph);\n subGraphLookup[id] = subGraph;\n return id;\n};\n\nconst getPosForId = function(id) {\n for (let i = 0; i < subGraphs.length; i++) {\n if (subGraphs[i].id === id) {\n return i;\n }\n }\n return -1;\n};\nlet secCount = -1;\nconst posCrossRef = [];\nconst indexNodes2 = function(id, pos) {\n const nodes = subGraphs[pos].nodes;\n secCount = secCount + 1;\n if (secCount > 2000) {\n return;\n }\n posCrossRef[secCount] = pos;\n // Check if match\n if (subGraphs[pos].id === id) {\n return {\n result: true,\n count: 0\n };\n }\n\n let count = 0;\n let posCount = 1;\n while (count < nodes.length) {\n const childPos = getPosForId(nodes[count]);\n // Ignore regular nodes (pos will be -1)\n if (childPos >= 0) {\n const res = indexNodes2(id, childPos);\n if (res.result) {\n return {\n result: true,\n count: posCount + res.count\n };\n } else {\n posCount = posCount + res.count;\n }\n }\n count = count + 1;\n }\n\n return {\n result: false,\n count: posCount\n };\n};\n\nexport const getDepthFirstPos = function(pos) {\n return posCrossRef[pos];\n};\nexport const indexNodes = function() {\n secCount = -1;\n if (subGraphs.length > 0) {\n indexNodes2('none', subGraphs.length - 1, 0);\n }\n};\n\nexport const getSubGraphs = function() {\n return subGraphs;\n};\n\nexport const firstGraph = () => {\n if (firstGraphFlag) {\n firstGraphFlag = false;\n return true;\n }\n return false;\n};\n\nconst destructStartLink = _str => {\n const str = _str.trim();\n\n switch (str) {\n case '<--':\n return { type: 'arrow_point', stroke: 'normal' };\n case 'x--':\n return { type: 'arrow_cross', stroke: 'normal' };\n case 'o--':\n return { type: 'arrow_circle', stroke: 'normal' };\n case '<-.':\n return { type: 'arrow_point', stroke: 'dotted' };\n case 'x-.':\n return { type: 'arrow_cross', stroke: 'dotted' };\n case 'o-.':\n return { type: 'arrow_circle', stroke: 'dotted' };\n case '<==':\n return { type: 'arrow_point', stroke: 'thick' };\n case 'x==':\n return { type: 'arrow_cross', stroke: 'thick' };\n case 'o==':\n return { type: 'arrow_circle', stroke: 'thick' };\n case '--':\n return { type: 'arrow_open', stroke: 'normal' };\n case '==':\n return { type: 'arrow_open', stroke: 'thick' };\n case '-.':\n return { type: 'arrow_open', stroke: 'dotted' };\n }\n};\n\nconst destructEndLink = _str => {\n const str = _str.trim();\n\n switch (str) {\n case '--x':\n return { type: 'arrow_cross', stroke: 'normal' };\n case '-->':\n return { type: 'arrow_point', stroke: 'normal' };\n case '<-->':\n return { type: 'double_arrow_point', stroke: 'normal' };\n case 'x--x':\n return { type: 'double_arrow_cross', stroke: 'normal' };\n case 'o--o':\n return { type: 'double_arrow_circle', stroke: 'normal' };\n case 'o.-o':\n return { type: 'double_arrow_circle', stroke: 'dotted' };\n case '<==>':\n return { type: 'double_arrow_point', stroke: 'thick' };\n case 'o==o':\n return { type: 'double_arrow_circle', stroke: 'thick' };\n case 'x==x':\n return { type: 'double_arrow_cross', stroke: 'thick' };\n case 'x.-x':\n return { type: 'double_arrow_cross', stroke: 'dotted' };\n case 'x-.-x':\n return { type: 'double_arrow_cross', stroke: 'dotted' };\n case '<.->':\n return { type: 'double_arrow_point', stroke: 'dotted' };\n case '<-.->':\n return { type: 'double_arrow_point', stroke: 'dotted' };\n case 'o-.-o':\n return { type: 'double_arrow_circle', stroke: 'dotted' };\n case '--o':\n return { type: 'arrow_circle', stroke: 'normal' };\n case '---':\n return { type: 'arrow_open', stroke: 'normal' };\n case '-.-x':\n return { type: 'arrow_cross', stroke: 'dotted' };\n case '-.->':\n return { type: 'arrow_point', stroke: 'dotted' };\n case '-.-o':\n return { type: 'arrow_circle', stroke: 'dotted' };\n case '-.-':\n return { type: 'arrow_open', stroke: 'dotted' };\n case '.-x':\n return { type: 'arrow_cross', stroke: 'dotted' };\n case '.->':\n return { type: 'arrow_point', stroke: 'dotted' };\n case '.-o':\n return { type: 'arrow_circle', stroke: 'dotted' };\n case '.-':\n return { type: 'arrow_open', stroke: 'dotted' };\n case '==x':\n return { type: 'arrow_cross', stroke: 'thick' };\n case '==>':\n return { type: 'arrow_point', stroke: 'thick' };\n case '==o':\n return { type: 'arrow_circle', stroke: 'thick' };\n case '===':\n return { type: 'arrow_open', stroke: 'thick' };\n }\n};\n\nconst destructLink = (_str, _startStr) => {\n const info = destructEndLink(_str);\n let startInfo;\n if (_startStr) {\n startInfo = destructStartLink(_startStr);\n\n if (startInfo.stroke !== info.stroke) {\n return { type: 'INVALID', stroke: 'INVALID' };\n }\n\n if (startInfo.type === 'arrow_open') {\n // -- xyz --> - take arrow type form ending\n startInfo.type = info.type;\n } else {\n // x-- xyz --> - not supported\n if (startInfo.type !== info.type) return { type: 'INVALID', stroke: 'INVALID' };\n\n startInfo.type = 'double_' + startInfo.type;\n }\n\n if (startInfo.type === 'double_arrow') {\n startInfo.type = 'double_arrow_point';\n }\n\n return startInfo;\n }\n\n return info;\n};\n\nexport default {\n addVertex,\n addLink,\n updateLinkInterpolate,\n updateLink,\n addClass,\n setDirection,\n setClass,\n getTooltip,\n setClickEvent,\n setLink,\n bindFunctions,\n getDirection,\n getVertices,\n getEdges,\n getClasses,\n clear,\n defaultStyle,\n addSubGraph,\n getDepthFirstPos,\n indexNodes,\n getSubGraphs,\n destructLink,\n lex: {\n firstGraph\n }\n};\n","import graphlib from 'graphlib';\nimport { select, curveLinear, selectAll } from 'd3';\n\nimport flowDb from './flowDb';\nimport flow from './parser/flow';\nimport { getConfig } from '../../config';\n\nimport { render } from '../../dagre-wrapper/index.js';\nimport addHtmlLabel from 'dagre-d3/lib/label/add-html-label.js';\nimport { logger } from '../../logger';\nimport common from '../common/common';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils';\n\nconst conf = {};\nexport const setConf = function(cnf) {\n const keys = Object.keys(cnf);\n for (let i = 0; i < keys.length; i++) {\n conf[keys[i]] = cnf[keys[i]];\n }\n};\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n * @param vert Object containing the vertices.\n * @param g The graph that is to be drawn.\n */\nexport const addVertices = function(vert, g, svgId) {\n const svg = select(`[id=\"${svgId}\"]`);\n const keys = Object.keys(vert);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n keys.forEach(function(id) {\n const vertex = vert[id];\n\n /**\n * Variable for storing the classes for the vertex\n * @type {string}\n */\n let classStr = 'default';\n if (vertex.classes.length > 0) {\n classStr = vertex.classes.join(' ');\n }\n\n const styles = getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n let vertexText = vertex.text !== undefined ? vertex.text : vertex.id;\n\n // We create a SVG label, either by delegating to addHtmlLabel or manually\n let vertexNode;\n if (getConfig().flowchart.htmlLabels) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n const node = {\n label: vertexText.replace(\n /fa[lrsb]?:fa-[\\w-]+/g,\n s => ``\n )\n };\n vertexNode = addHtmlLabel(svg, node).node();\n vertexNode.parentNode.removeChild(vertexNode);\n } else {\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n\n const rows = vertexText.split(common.lineBreakRegex);\n\n for (let j = 0; j < rows.length; j++) {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '1');\n tspan.textContent = rows[j];\n svgLabel.appendChild(tspan);\n }\n vertexNode = svgLabel;\n }\n\n let radious = 0;\n let _shape = '';\n // Set the shape based parameters\n switch (vertex.type) {\n case 'round':\n radious = 5;\n _shape = 'rect';\n break;\n case 'square':\n _shape = 'rect';\n break;\n case 'diamond':\n _shape = 'question';\n break;\n case 'hexagon':\n _shape = 'hexagon';\n break;\n case 'odd':\n _shape = 'rect_left_inv_arrow';\n break;\n case 'lean_right':\n _shape = 'lean_right';\n break;\n case 'lean_left':\n _shape = 'lean_left';\n break;\n case 'trapezoid':\n _shape = 'trapezoid';\n break;\n case 'inv_trapezoid':\n _shape = 'inv_trapezoid';\n break;\n case 'odd_right':\n _shape = 'rect_left_inv_arrow';\n break;\n case 'circle':\n _shape = 'circle';\n break;\n case 'ellipse':\n _shape = 'ellipse';\n break;\n case 'stadium':\n _shape = 'stadium';\n break;\n case 'subroutine':\n _shape = 'subroutine';\n break;\n case 'cylinder':\n _shape = 'cylinder';\n break;\n case 'group':\n _shape = 'rect';\n break;\n default:\n _shape = 'rect';\n }\n // Add the node\n g.setNode(vertex.id, {\n labelStyle: styles.labelStyle,\n shape: _shape,\n labelText: vertexText,\n rx: radious,\n ry: radious,\n class: classStr,\n style: styles.style,\n id: vertex.id,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n padding: getConfig().flowchart.padding\n });\n\n logger.info('setNode', {\n labelStyle: styles.labelStyle,\n shape: _shape,\n labelText: vertexText,\n rx: radious,\n ry: radious,\n class: classStr,\n style: styles.style,\n id: vertex.id,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n padding: getConfig().flowchart.padding\n });\n });\n};\n\n/**\n * Add edges to graph based on parsed graph defninition\n * @param {Object} edges The edges to add to the graph\n * @param {Object} g The graph object\n */\nexport const addEdges = function(edges, g) {\n let cnt = 0;\n\n let defaultStyle;\n let defaultLabelStyle;\n\n if (typeof edges.defaultStyle !== 'undefined') {\n const defaultStyles = getStylesFromArray(edges.defaultStyle);\n defaultStyle = defaultStyles.style;\n defaultLabelStyle = defaultStyles.labelStyle;\n }\n\n edges.forEach(function(edge) {\n cnt++;\n\n // Identify Link\n var linkId = 'L-' + edge.start + '-' + edge.end;\n var linkNameStart = 'LS-' + edge.start;\n var linkNameEnd = 'LE-' + edge.end;\n\n const edgeData = {};\n //edgeData.id = 'id' + cnt;\n\n // Set link type for rendering\n if (edge.type === 'arrow_open') {\n edgeData.arrowhead = 'none';\n } else {\n edgeData.arrowhead = 'normal';\n }\n\n // Check of arrow types, placed here in order not to break old rendering\n edgeData.arrowTypeStart = 'arrow_open';\n edgeData.arrowTypeEnd = 'arrow_open';\n\n /* eslint-disable no-fallthrough */\n switch (edge.type) {\n case 'double_arrow_cross':\n edgeData.arrowTypeStart = 'arrow_cross';\n case 'arrow_cross':\n edgeData.arrowTypeEnd = 'arrow_cross';\n break;\n case 'double_arrow_point':\n edgeData.arrowTypeStart = 'arrow_point';\n case 'arrow_point':\n edgeData.arrowTypeEnd = 'arrow_point';\n break;\n case 'double_arrow_circle':\n edgeData.arrowTypeStart = 'arrow_circle';\n case 'arrow_circle':\n edgeData.arrowTypeEnd = 'arrow_circle';\n break;\n }\n\n // logger.info('apa', edgeData, edge);\n // edgeData.arrowTypeStart = edge.arrowTypeStart;\n // edgeData.arrowTypeStart = edge.arrowTypeStart;\n // edgeData.arrowType = edgeData.arrowTypeEnd;\n // logger.info('apa', edgeData, edge);\n\n let style = '';\n let labelStyle = '';\n\n if (typeof edge.style !== 'undefined') {\n const styles = getStylesFromArray(edge.style);\n style = styles.style;\n labelStyle = styles.labelStyle;\n } else {\n switch (edge.stroke) {\n case 'normal':\n style = 'fill:none';\n if (typeof defaultStyle !== 'undefined') {\n style = defaultStyle;\n }\n if (typeof defaultLabelStyle !== 'undefined') {\n labelStyle = defaultLabelStyle;\n }\n edgeData.thickness = 'normal';\n edgeData.pattern = 'solid';\n break;\n case 'dotted':\n edgeData.thickness = 'normal';\n edgeData.pattern = 'dotted';\n break;\n case 'thick':\n edgeData.thickness = 'thick';\n edgeData.pattern = 'solid';\n break;\n }\n }\n\n edgeData.style = style;\n edgeData.labelStyle = labelStyle;\n\n if (typeof edge.interpolate !== 'undefined') {\n edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear);\n } else if (typeof edges.defaultInterpolate !== 'undefined') {\n edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear);\n } else {\n edgeData.curve = interpolateToCurve(conf.curve, curveLinear);\n }\n\n if (typeof edge.text === 'undefined') {\n if (typeof edge.style !== 'undefined') {\n edgeData.arrowheadStyle = 'fill: #333';\n }\n } else {\n edgeData.arrowheadStyle = 'fill: #333';\n edgeData.labelpos = 'c';\n\n if (getConfig().flowchart.htmlLabels && false) { // eslint-disable-line\n edgeData.labelType = 'html';\n edgeData.label = `${edge.text}`;\n } else {\n edgeData.labelType = 'text';\n edgeData.label = edge.text.replace(common.lineBreakRegex, '\\n');\n\n if (typeof edge.style === 'undefined') {\n edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';\n }\n\n edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');\n }\n }\n\n edgeData.id = linkId;\n edgeData.classes = 'flowchart-link ' + linkNameStart + ' ' + linkNameEnd;\n\n // Add the edge to the graph\n g.setEdge(edge.start, edge.end, edgeData, cnt);\n });\n};\n\n/**\n * Returns the all the styles from classDef statements in the graph definition.\n * @returns {object} classDef styles\n */\nexport const getClasses = function(text) {\n logger.info('Extracting classes');\n flowDb.clear();\n const parser = flow.parser;\n parser.yy = flowDb;\n\n try {\n // Parse the graph definition\n parser.parse(text);\n } catch (e) {\n return;\n }\n\n return flowDb.getClasses();\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\nexport const draw = function(text, id) {\n logger.info('Drawing flowchart');\n flowDb.clear();\n const parser = flow.parser;\n parser.yy = flowDb;\n\n // Parse the graph definition\n // try {\n parser.parse(text);\n // } catch (err) {\n // logger.debug('Parsing failed');\n // }\n\n // Fetch the default direction, use TD if none was found\n let dir = flowDb.getDirection();\n if (typeof dir === 'undefined') {\n dir = 'TD';\n }\n\n const conf = getConfig().flowchart;\n const nodeSpacing = conf.nodeSpacing || 50;\n const rankSpacing = conf.rankSpacing || 50;\n\n // Create the input mermaid.graph\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true\n })\n .setGraph({\n rankdir: dir,\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8\n })\n .setDefaultEdgeLabel(function() {\n return {};\n });\n\n let subG;\n const subGraphs = flowDb.getSubGraphs();\n logger.info('Subgraphs - ', subGraphs);\n for (let i = subGraphs.length - 1; i >= 0; i--) {\n subG = subGraphs[i];\n logger.info('Subgraph - ', subG);\n flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes);\n }\n\n // Fetch the verices/nodes and edges/links from the parsed graph definition\n const vert = flowDb.getVertices();\n\n const edges = flowDb.getEdges();\n\n logger.info(edges);\n let i = 0;\n for (i = subGraphs.length - 1; i >= 0; i--) {\n subG = subGraphs[i];\n\n selectAll('cluster').append('text');\n\n for (let j = 0; j < subG.nodes.length; j++) {\n g.setParent(subG.nodes[j], subG.id);\n }\n }\n addVertices(vert, g, id);\n addEdges(edges, g);\n\n // Add custom shapes\n // flowChartShapes.addToRenderV2(addShape);\n\n // Set up an SVG group so that we can translate the final graph.\n const svg = select(`[id=\"${id}\"]`);\n\n // Run the renderer. This is what draws the final graph.\n const element = select('#' + id + ' g');\n render(element, g, ['point', 'circle', 'cross'], 'flowchart', id);\n // dagre.layout(g);\n\n element.selectAll('g.node').attr('title', function() {\n return flowDb.getTooltip(this.id);\n });\n\n const padding = conf.diagramPadding;\n const svgBounds = svg.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n logger.debug(\n `new ViewBox 0 0 ${width} ${height}`,\n `translate(${padding - g._label.marginx}, ${padding - g._label.marginy})`\n );\n\n if (conf.useMaxWidth) {\n svg.attr('width', '100%');\n svg.attr('style', `max-width: ${width}px;`);\n } else {\n svg.attr('height', height);\n svg.attr('width', width);\n }\n\n svg.attr('viewBox', `0 0 ${width} ${height}`);\n svg\n .select('g')\n .attr('transform', `translate(${padding - g._label.marginx}, ${padding - svgBounds.y})`);\n\n // Index nodes\n flowDb.indexNodes('subGraph' + i);\n\n // // reposition labels\n // for (i = 0; i < subGraphs.length; i++) {\n // subG = subGraphs[i];\n\n // if (subG.title !== 'undefined') {\n // const clusterRects = document.querySelectorAll('#' + id + ' [id=\"' + subG.id + '\"] rect');\n // const clusterEl = document.querySelectorAll('#' + id + ' [id=\"' + subG.id + '\"]');\n\n // const xPos = clusterRects[0].x.baseVal.value;\n // const yPos = clusterRects[0].y.baseVal.value;\n // const width = clusterRects[0].width.baseVal.value;\n // const cluster = d3.select(clusterEl[0]);\n // const te = cluster.select('.label');\n // te.attr('transform', `translate(${xPos + width / 2}, ${yPos + 14})`);\n // te.attr('id', id + 'Text');\n\n // for (let j = 0; j < subG.classes.length; j++) {\n // clusterEl[0].classList.add(subG.classes[j]);\n // }\n // }\n // }\n\n // Add label rects for non html labels\n if (!conf.htmlLabels) {\n const labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n for (let k = 0; k < labels.length; k++) {\n const label = labels[k];\n\n // Get dimensions of label\n const dim = label.getBBox();\n\n const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height);\n rect.setAttribute('style', 'fill:#e8e8e8;');\n\n label.insertBefore(rect, label.firstChild);\n }\n }\n\n // If node has a link, wrap it in an anchor SVG object.\n const keys = Object.keys(vert);\n keys.forEach(function(key) {\n const vertex = vert[key];\n\n if (vertex.link) {\n const node = select('#' + id + ' [id=\"' + key + '\"]');\n if (node) {\n const link = document.createElementNS('http://www.w3.org/2000/svg', 'a');\n link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));\n link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);\n link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n\n const linkNode = node.insert(function() {\n return link;\n }, ':first-child');\n\n const shape = node.select('.label-container');\n if (shape) {\n linkNode.append(function() {\n return shape.node();\n });\n }\n\n const label = node.select('.label');\n if (label) {\n linkNode.append(function() {\n return label.node();\n });\n }\n }\n }\n });\n};\n\nexport default {\n setConf,\n addVertices,\n addEdges,\n getClasses,\n draw\n};\n","import graphlib from 'graphlib';\nimport { select, curveLinear, selectAll } from 'd3';\n\nimport flowDb from './flowDb';\nimport flow from './parser/flow';\nimport { getConfig } from '../../config';\n\nimport dagreD3 from 'dagre-d3';\nimport addHtmlLabel from 'dagre-d3/lib/label/add-html-label.js';\nimport { logger } from '../../logger';\nimport common from '../common/common';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils';\nimport flowChartShapes from './flowChartShapes';\n\nconst conf = {};\nexport const setConf = function(cnf) {\n const keys = Object.keys(cnf);\n for (let i = 0; i < keys.length; i++) {\n conf[keys[i]] = cnf[keys[i]];\n }\n};\n\n/**\n * Function that adds the vertices found in the graph definition to the graph to be rendered.\n * @param vert Object containing the vertices.\n * @param g The graph that is to be drawn.\n */\nexport const addVertices = function(vert, g, svgId) {\n const svg = select(`[id=\"${svgId}\"]`);\n const keys = Object.keys(vert);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n keys.forEach(function(id) {\n const vertex = vert[id];\n\n /**\n * Variable for storing the classes for the vertex\n * @type {string}\n */\n let classStr = 'default';\n if (vertex.classes.length > 0) {\n classStr = vertex.classes.join(' ');\n }\n\n const styles = getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n let vertexText = vertex.text !== undefined ? vertex.text : vertex.id;\n\n // We create a SVG label, either by delegating to addHtmlLabel or manually\n let vertexNode;\n if (getConfig().flowchart.htmlLabels) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n const node = {\n label: vertexText.replace(\n /fa[lrsb]?:fa-[\\w-]+/g,\n s => ``\n )\n };\n vertexNode = addHtmlLabel(svg, node).node();\n vertexNode.parentNode.removeChild(vertexNode);\n } else {\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n\n const rows = vertexText.split(common.lineBreakRegex);\n\n for (let j = 0; j < rows.length; j++) {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '1');\n tspan.textContent = rows[j];\n svgLabel.appendChild(tspan);\n }\n vertexNode = svgLabel;\n }\n\n let radious = 0;\n let _shape = '';\n // Set the shape based parameters\n switch (vertex.type) {\n case 'round':\n radious = 5;\n _shape = 'rect';\n break;\n case 'square':\n _shape = 'rect';\n break;\n case 'diamond':\n _shape = 'question';\n break;\n case 'hexagon':\n _shape = 'hexagon';\n break;\n case 'odd':\n _shape = 'rect_left_inv_arrow';\n break;\n case 'lean_right':\n _shape = 'lean_right';\n break;\n case 'lean_left':\n _shape = 'lean_left';\n break;\n case 'trapezoid':\n _shape = 'trapezoid';\n break;\n case 'inv_trapezoid':\n _shape = 'inv_trapezoid';\n break;\n case 'odd_right':\n _shape = 'rect_left_inv_arrow';\n break;\n case 'circle':\n _shape = 'circle';\n break;\n case 'ellipse':\n _shape = 'ellipse';\n break;\n case 'stadium':\n _shape = 'stadium';\n break;\n case 'subroutine':\n _shape = 'subroutine';\n break;\n case 'cylinder':\n _shape = 'cylinder';\n break;\n case 'group':\n _shape = 'rect';\n break;\n default:\n _shape = 'rect';\n }\n // Add the node\n g.setNode(vertex.id, {\n labelType: 'svg',\n labelStyle: styles.labelStyle,\n shape: _shape,\n label: vertexNode,\n rx: radious,\n ry: radious,\n class: classStr,\n style: styles.style,\n id: vertex.id\n });\n });\n};\n\n/**\n * Add edges to graph based on parsed graph defninition\n * @param {Object} edges The edges to add to the graph\n * @param {Object} g The graph object\n */\nexport const addEdges = function(edges, g) {\n let cnt = 0;\n\n let defaultStyle;\n let defaultLabelStyle;\n\n if (typeof edges.defaultStyle !== 'undefined') {\n const defaultStyles = getStylesFromArray(edges.defaultStyle);\n defaultStyle = defaultStyles.style;\n defaultLabelStyle = defaultStyles.labelStyle;\n }\n\n edges.forEach(function(edge) {\n cnt++;\n\n // Identify Link\n var linkId = 'L-' + edge.start + '-' + edge.end;\n var linkNameStart = 'LS-' + edge.start;\n var linkNameEnd = 'LE-' + edge.end;\n\n const edgeData = {};\n\n // Set link type for rendering\n if (edge.type === 'arrow_open') {\n edgeData.arrowhead = 'none';\n } else {\n edgeData.arrowhead = 'normal';\n }\n\n let style = '';\n let labelStyle = '';\n\n if (typeof edge.style !== 'undefined') {\n const styles = getStylesFromArray(edge.style);\n style = styles.style;\n labelStyle = styles.labelStyle;\n } else {\n switch (edge.stroke) {\n case 'normal':\n style = 'fill:none';\n if (typeof defaultStyle !== 'undefined') {\n style = defaultStyle;\n }\n if (typeof defaultLabelStyle !== 'undefined') {\n labelStyle = defaultLabelStyle;\n }\n break;\n case 'dotted':\n style = 'fill:none;stroke-width:2px;stroke-dasharray:3;';\n break;\n case 'thick':\n style = ' stroke-width: 3.5px;fill:none';\n break;\n }\n }\n\n edgeData.style = style;\n edgeData.labelStyle = labelStyle;\n\n if (typeof edge.interpolate !== 'undefined') {\n edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear);\n } else if (typeof edges.defaultInterpolate !== 'undefined') {\n edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear);\n } else {\n edgeData.curve = interpolateToCurve(conf.curve, curveLinear);\n }\n\n if (typeof edge.text === 'undefined') {\n if (typeof edge.style !== 'undefined') {\n edgeData.arrowheadStyle = 'fill: #333';\n }\n } else {\n edgeData.arrowheadStyle = 'fill: #333';\n edgeData.labelpos = 'c';\n\n if (getConfig().flowchart.htmlLabels) {\n edgeData.labelType = 'html';\n edgeData.label = `${edge.text}`;\n } else {\n edgeData.labelType = 'text';\n edgeData.label = edge.text.replace(common.lineBreakRegex, '\\n');\n\n if (typeof edge.style === 'undefined') {\n edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';\n }\n\n edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');\n }\n }\n\n edgeData.id = linkId;\n edgeData.class = linkNameStart + ' ' + linkNameEnd;\n\n // Add the edge to the graph\n g.setEdge(edge.start, edge.end, edgeData, cnt);\n });\n};\n\n/**\n * Returns the all the styles from classDef statements in the graph definition.\n * @returns {object} classDef styles\n */\nexport const getClasses = function(text) {\n logger.info('Extracting classes');\n flowDb.clear();\n try {\n const parser = flow.parser;\n parser.yy = flowDb;\n\n // Parse the graph definition\n parser.parse(text);\n return flowDb.getClasses();\n } catch (e) {\n return;\n }\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\nexport const draw = function(text, id) {\n logger.info('Drawing flowchart');\n flowDb.clear();\n const parser = flow.parser;\n parser.yy = flowDb;\n\n // Parse the graph definition\n // try {\n parser.parse(text);\n // } catch (err) {\n // logger.debug('Parsing failed');\n // }\n\n // Fetch the default direction, use TD if none was found\n let dir = flowDb.getDirection();\n if (typeof dir === 'undefined') {\n dir = 'TD';\n }\n\n const conf = getConfig().flowchart;\n const nodeSpacing = conf.nodeSpacing || 50;\n const rankSpacing = conf.rankSpacing || 50;\n\n // Create the input mermaid.graph\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true\n })\n .setGraph({\n rankdir: dir,\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8\n })\n .setDefaultEdgeLabel(function() {\n return {};\n });\n\n let subG;\n const subGraphs = flowDb.getSubGraphs();\n for (let i = subGraphs.length - 1; i >= 0; i--) {\n subG = subGraphs[i];\n flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes);\n }\n\n // Fetch the verices/nodes and edges/links from the parsed graph definition\n const vert = flowDb.getVertices();\n\n const edges = flowDb.getEdges();\n\n let i = 0;\n for (i = subGraphs.length - 1; i >= 0; i--) {\n subG = subGraphs[i];\n\n selectAll('cluster').append('text');\n\n for (let j = 0; j < subG.nodes.length; j++) {\n g.setParent(subG.nodes[j], subG.id);\n }\n }\n addVertices(vert, g, id);\n addEdges(edges, g);\n\n // Create the renderer\n const Render = dagreD3.render;\n const render = new Render();\n\n // Add custom shapes\n flowChartShapes.addToRender(render);\n\n // Add our custom arrow - an empty arrowhead\n render.arrows().none = function normal(parent, id, edge, type) {\n const marker = parent\n .append('marker')\n .attr('id', id)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 9)\n .attr('refY', 5)\n .attr('markerUnits', 'strokeWidth')\n .attr('markerWidth', 8)\n .attr('markerHeight', 6)\n .attr('orient', 'auto');\n\n const path = marker.append('path').attr('d', 'M 0 0 L 0 0 L 0 0 z');\n dagreD3.util.applyStyle(path, edge[type + 'Style']);\n };\n\n // Override normal arrowhead defined in d3. Remove style & add class to allow css styling.\n render.arrows().normal = function normal(parent, id) {\n const marker = parent\n .append('marker')\n .attr('id', id)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 9)\n .attr('refY', 5)\n .attr('markerUnits', 'strokeWidth')\n .attr('markerWidth', 8)\n .attr('markerHeight', 6)\n .attr('orient', 'auto');\n\n marker\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z')\n .attr('class', 'arrowheadPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n };\n\n // Set up an SVG group so that we can translate the final graph.\n const svg = select(`[id=\"${id}\"]`);\n\n // Run the renderer. This is what draws the final graph.\n const element = select('#' + id + ' g');\n render(element, g);\n\n element.selectAll('g.node').attr('title', function() {\n return flowDb.getTooltip(this.id);\n });\n\n const padding = conf.diagramPadding;\n const svgBounds = svg.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n\n if (conf.useMaxWidth) {\n svg.attr('width', '100%');\n svg.attr('style', `max-width: ${width}px;`);\n } else {\n svg.attr('height', height);\n svg.attr('width', width);\n }\n\n // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;\n logger.debug(`viewBox ${vBox}`);\n svg.attr('viewBox', vBox);\n\n // Index nodes\n flowDb.indexNodes('subGraph' + i);\n\n // reposition labels\n for (i = 0; i < subGraphs.length; i++) {\n subG = subGraphs[i];\n\n if (subG.title !== 'undefined') {\n const clusterRects = document.querySelectorAll('#' + id + ' [id=\"' + subG.id + '\"] rect');\n const clusterEl = document.querySelectorAll('#' + id + ' [id=\"' + subG.id + '\"]');\n\n const xPos = clusterRects[0].x.baseVal.value;\n const yPos = clusterRects[0].y.baseVal.value;\n const width = clusterRects[0].width.baseVal.value;\n const cluster = select(clusterEl[0]);\n const te = cluster.select('.label');\n te.attr('transform', `translate(${xPos + width / 2}, ${yPos + 14})`);\n te.attr('id', id + 'Text');\n\n for (let j = 0; j < subG.classes.length; j++) {\n clusterEl[0].classList.add(subG.classes[j]);\n }\n }\n }\n\n // Add label rects for non html labels\n if (!conf.htmlLabels || true) { // eslint-disable-line\n const labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n for (let k = 0; k < labels.length; k++) {\n const label = labels[k];\n\n // Get dimensions of label\n const dim = label.getBBox();\n\n const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height);\n rect.setAttribute('style', 'fill:#e8e8e8;');\n\n label.insertBefore(rect, label.firstChild);\n }\n }\n\n // If node has a link, wrap it in an anchor SVG object.\n const keys = Object.keys(vert);\n keys.forEach(function(key) {\n const vertex = vert[key];\n\n if (vertex.link) {\n const node = select('#' + id + ' [id=\"' + key + '\"]');\n if (node) {\n const link = document.createElementNS('http://www.w3.org/2000/svg', 'a');\n link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));\n link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);\n link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n\n const linkNode = node.insert(function() {\n return link;\n }, ':first-child');\n\n const shape = node.select('.label-container');\n if (shape) {\n linkNode.append(function() {\n return shape.node();\n });\n }\n\n const label = node.select('.label');\n if (label) {\n linkNode.append(function() {\n return label.node();\n });\n }\n }\n }\n });\n};\n\nexport default {\n setConf,\n addVertices,\n addEdges,\n getClasses,\n draw\n};\n","/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,3],$V2=[1,5],$V3=[1,8,9,10,11,26,34,63,64,65,66,67,68,78,79,82,83,84,86,87,93,94,95,96,97,98],$V4=[2,2],$V5=[1,12],$V6=[1,13],$V7=[1,14],$V8=[1,15],$V9=[1,22],$Va=[1,46],$Vb=[1,24],$Vc=[1,25],$Vd=[1,26],$Ve=[1,27],$Vf=[1,28],$Vg=[1,40],$Vh=[1,35],$Vi=[1,37],$Vj=[1,32],$Vk=[1,36],$Vl=[1,39],$Vm=[1,43],$Vn=[1,44],$Vo=[1,45],$Vp=[1,34],$Vq=[1,38],$Vr=[1,41],$Vs=[1,42],$Vt=[1,33],$Vu=[1,51],$Vv=[1,8,9,10,11,26,30,34,63,64,65,66,67,68,78,79,82,83,84,86,87,93,94,95,96,97,98],$Vw=[1,55],$Vx=[1,54],$Vy=[1,56],$Vz=[8,9,11,57,58],$VA=[8,9,10,11,57,58],$VB=[8,9,10,11,35,57,58],$VC=[8,9,10,11,28,34,35,37,39,41,43,45,47,49,50,52,57,58,68,78,79,82,83,84,86,87,93,94,95,96,97,98],$VD=[8,9,11,34,57,58,68,78,79,82,83,84,86,87,93,94,95,96,97,98],$VE=[34,68,78,79,82,83,84,86,87,93,94,95,96,97,98],$VF=[1,101],$VG=[1,122],$VH=[1,123],$VI=[1,124],$VJ=[1,125],$VK=[1,105],$VL=[1,96],$VM=[1,97],$VN=[1,93],$VO=[1,117],$VP=[1,118],$VQ=[1,119],$VR=[1,120],$VS=[1,121],$VT=[1,126],$VU=[1,127],$VV=[1,99],$VW=[1,107],$VX=[1,110],$VY=[1,108],$VZ=[1,109],$V_=[1,102],$V$=[1,115],$V01=[1,114],$V11=[1,98],$V21=[1,95],$V31=[1,104],$V41=[1,106],$V51=[1,111],$V61=[1,112],$V71=[1,113],$V81=[1,116],$V91=[8,9,10,11,26,30,34,63,64,65,66,67,68,78,79,82,83,84,86,87,93,94,95,96,97,98],$Va1=[1,130],$Vb1=[1,134],$Vc1=[1,136],$Vd1=[1,137],$Ve1=[8,9,10,11,12,13,26,28,29,30,34,38,40,42,44,46,48,49,51,53,57,58,59,63,64,65,66,67,68,69,72,78,79,82,83,84,86,87,88,89,93,94,95,96,97,98],$Vf1=[8,9,10,11,13,34,68,78,79,82,83,84,86,87,93,94,95,96,97,98],$Vg1=[10,79],$Vh1=[1,204],$Vi1=[1,208],$Vj1=[1,205],$Vk1=[1,202],$Vl1=[1,199],$Vm1=[1,200],$Vn1=[1,201],$Vo1=[1,203],$Vp1=[1,206],$Vq1=[1,207],$Vr1=[1,209],$Vs1=[8,9,11],$Vt1=[1,225],$Vu1=[8,9,11,79],$Vv1=[8,9,10,11,63,75,78,79,82,83,84,85,86,87,88];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"mermaidDoc\":3,\"graphConfig\":4,\"document\":5,\"line\":6,\"statement\":7,\"SEMI\":8,\"NEWLINE\":9,\"SPACE\":10,\"EOF\":11,\"GRAPH\":12,\"DIR\":13,\"FirstStmtSeperator\":14,\"ending\":15,\"endToken\":16,\"spaceList\":17,\"spaceListNewline\":18,\"verticeStatement\":19,\"separator\":20,\"styleStatement\":21,\"linkStyleStatement\":22,\"classDefStatement\":23,\"classStatement\":24,\"clickStatement\":25,\"subgraph\":26,\"text\":27,\"SQS\":28,\"SQE\":29,\"end\":30,\"link\":31,\"node\":32,\"vertex\":33,\"AMP\":34,\"STYLE_SEPARATOR\":35,\"idString\":36,\"PS\":37,\"PE\":38,\"(-\":39,\"-)\":40,\"STADIUMSTART\":41,\"STADIUMEND\":42,\"SUBROUTINESTART\":43,\"SUBROUTINEEND\":44,\"CYLINDERSTART\":45,\"CYLINDEREND\":46,\"DIAMOND_START\":47,\"DIAMOND_STOP\":48,\"TAGEND\":49,\"TRAPSTART\":50,\"TRAPEND\":51,\"INVTRAPSTART\":52,\"INVTRAPEND\":53,\"linkStatement\":54,\"arrowText\":55,\"TESTSTR\":56,\"START_LINK\":57,\"LINK\":58,\"PIPE\":59,\"textToken\":60,\"STR\":61,\"keywords\":62,\"STYLE\":63,\"LINKSTYLE\":64,\"CLASSDEF\":65,\"CLASS\":66,\"CLICK\":67,\"DOWN\":68,\"UP\":69,\"textNoTags\":70,\"textNoTagsToken\":71,\"DEFAULT\":72,\"stylesOpt\":73,\"alphaNum\":74,\"HEX\":75,\"numList\":76,\"INTERPOLATE\":77,\"NUM\":78,\"COMMA\":79,\"style\":80,\"styleComponent\":81,\"ALPHA\":82,\"COLON\":83,\"MINUS\":84,\"UNIT\":85,\"BRKT\":86,\"DOT\":87,\"PCT\":88,\"TAGSTART\":89,\"alphaNumToken\":90,\"idStringToken\":91,\"alphaNumStatement\":92,\"PUNCTUATION\":93,\"UNICODE_TEXT\":94,\"PLUS\":95,\"EQUALS\":96,\"MULT\":97,\"UNDERSCORE\":98,\"graphCodeTokens\":99,\"ARROW_CROSS\":100,\"ARROW_POINT\":101,\"ARROW_CIRCLE\":102,\"ARROW_OPEN\":103,\"QUOTE\":104,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",8:\"SEMI\",9:\"NEWLINE\",10:\"SPACE\",11:\"EOF\",12:\"GRAPH\",13:\"DIR\",26:\"subgraph\",28:\"SQS\",29:\"SQE\",30:\"end\",34:\"AMP\",35:\"STYLE_SEPARATOR\",37:\"PS\",38:\"PE\",39:\"(-\",40:\"-)\",41:\"STADIUMSTART\",42:\"STADIUMEND\",43:\"SUBROUTINESTART\",44:\"SUBROUTINEEND\",45:\"CYLINDERSTART\",46:\"CYLINDEREND\",47:\"DIAMOND_START\",48:\"DIAMOND_STOP\",49:\"TAGEND\",50:\"TRAPSTART\",51:\"TRAPEND\",52:\"INVTRAPSTART\",53:\"INVTRAPEND\",56:\"TESTSTR\",57:\"START_LINK\",58:\"LINK\",59:\"PIPE\",61:\"STR\",63:\"STYLE\",64:\"LINKSTYLE\",65:\"CLASSDEF\",66:\"CLASS\",67:\"CLICK\",68:\"DOWN\",69:\"UP\",72:\"DEFAULT\",75:\"HEX\",77:\"INTERPOLATE\",78:\"NUM\",79:\"COMMA\",82:\"ALPHA\",83:\"COLON\",84:\"MINUS\",85:\"UNIT\",86:\"BRKT\",87:\"DOT\",88:\"PCT\",89:\"TAGSTART\",93:\"PUNCTUATION\",94:\"UNICODE_TEXT\",95:\"PLUS\",96:\"EQUALS\",97:\"MULT\",98:\"UNDERSCORE\",100:\"ARROW_CROSS\",101:\"ARROW_POINT\",102:\"ARROW_CIRCLE\",103:\"ARROW_OPEN\",104:\"QUOTE\"},\nproductions_: [0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,3],[15,2],[15,1],[16,1],[16,1],[16,1],[14,1],[14,1],[14,2],[18,2],[18,2],[18,1],[18,1],[17,2],[17,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[20,1],[20,1],[20,1],[19,3],[19,4],[19,2],[19,1],[32,1],[32,5],[32,3],[33,4],[33,6],[33,4],[33,4],[33,4],[33,4],[33,4],[33,4],[33,6],[33,4],[33,4],[33,4],[33,4],[33,4],[33,1],[31,2],[31,3],[31,3],[31,1],[31,3],[54,1],[55,3],[27,1],[27,2],[27,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[70,1],[70,2],[23,5],[23,5],[24,5],[25,5],[25,7],[25,5],[25,7],[21,5],[21,5],[22,5],[22,5],[22,9],[22,9],[22,7],[22,7],[76,1],[76,3],[73,1],[73,3],[80,1],[80,2],[81,1],[81,1],[81,1],[81,1],[81,1],[81,1],[81,1],[81,1],[81,1],[81,1],[81,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[71,1],[71,1],[71,1],[71,1],[36,1],[36,2],[74,1],[74,2],[92,1],[92,1],[92,1],[92,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 2:\n this.$ = [];\nbreak;\ncase 3:\n\n\t if($$[$0] !== []){\n\t $$[$0-1].push($$[$0]);\n\t }\n\t this.$=$$[$0-1];\nbreak;\ncase 4: case 67: case 69: case 81: case 127: case 129: case 130:\nthis.$=$$[$0];\nbreak;\ncase 11:\n yy.setDirection($$[$0-1]);this.$ = $$[$0-1];\nbreak;\ncase 26:\n /* console.warn('finat vs', $$[$0-1].nodes); */ this.$=$$[$0-1].nodes\nbreak;\ncase 27: case 28: case 29: case 30: case 31:\nthis.$=[];\nbreak;\ncase 32:\nthis.$=yy.addSubGraph($$[$0-6],$$[$0-1],$$[$0-4]);\nbreak;\ncase 33:\nthis.$=yy.addSubGraph($$[$0-3],$$[$0-1],$$[$0-3]);\nbreak;\ncase 34:\nthis.$=yy.addSubGraph(undefined,$$[$0-1],undefined);\nbreak;\ncase 38:\n /* console.warn('vs',$$[$0-2].stmt,$$[$0]); */ yy.addLink($$[$0-2].stmt,$$[$0],$$[$0-1]); this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0-2].nodes) } \nbreak;\ncase 39:\n /* console.warn('vs',$$[$0-3].stmt,$$[$0-1]); */ yy.addLink($$[$0-3].stmt,$$[$0-1],$$[$0-2]); this.$ = { stmt: $$[$0-1], nodes: $$[$0-1].concat($$[$0-3].nodes) } \nbreak;\ncase 40:\n/*console.warn('noda', $$[$0-1]);*/ this.$ = {stmt: $$[$0-1], nodes:$$[$0-1] }\nbreak;\ncase 41:\n /*console.warn('noda', $$[$0]);*/ this.$ = {stmt: $$[$0], nodes:$$[$0] }\nbreak;\ncase 42:\n /* console.warn('nod', $$[$0]); */ this.$ = [$$[$0]];\nbreak;\ncase 43:\n this.$ = $$[$0-4].concat($$[$0]); /* console.warn('pip', $$[$0-4][0], $$[$0], this.$); */ \nbreak;\ncase 44:\nthis.$ = [$$[$0-2]];yy.setClass($$[$0-2],$$[$0])\nbreak;\ncase 45:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'square');\nbreak;\ncase 46:\nthis.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'circle');\nbreak;\ncase 47:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'ellipse');\nbreak;\ncase 48:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'stadium');\nbreak;\ncase 49:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'subroutine');\nbreak;\ncase 50:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'cylinder');\nbreak;\ncase 51:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'round');\nbreak;\ncase 52:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'diamond');\nbreak;\ncase 53:\nthis.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'hexagon');\nbreak;\ncase 54:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'odd');\nbreak;\ncase 55:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'trapezoid');\nbreak;\ncase 56:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'inv_trapezoid');\nbreak;\ncase 57:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_right');\nbreak;\ncase 58:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_left');\nbreak;\ncase 59:\n /*console.warn('h: ', $$[$0]);*/this.$ = $$[$0];yy.addVertex($$[$0]);\nbreak;\ncase 60:\n$$[$0-1].text = $$[$0];this.$ = $$[$0-1];\nbreak;\ncase 61: case 62:\n$$[$0-2].text = $$[$0-1];this.$ = $$[$0-2];\nbreak;\ncase 63:\nthis.$ = $$[$0];\nbreak;\ncase 64:\nvar inf = yy.destructLink($$[$0], $$[$0-2]); this.$ = {\"type\":inf.type,\"stroke\":inf.stroke,\"text\":$$[$0-1]};\nbreak;\ncase 65:\nvar inf = yy.destructLink($$[$0]);this.$ = {\"type\":inf.type,\"stroke\":inf.stroke};\nbreak;\ncase 66:\nthis.$ = $$[$0-1];\nbreak;\ncase 68: case 82: case 128:\nthis.$=$$[$0-1]+''+$$[$0];\nbreak;\ncase 83: case 84:\nthis.$ = $$[$0-4];yy.addClass($$[$0-2],$$[$0]);\nbreak;\ncase 85:\nthis.$ = $$[$0-4];yy.setClass($$[$0-2], $$[$0]);\nbreak;\ncase 86:\nthis.$ = $$[$0-4];yy.setClickEvent($$[$0-2], $$[$0], undefined);\nbreak;\ncase 87:\nthis.$ = $$[$0-6];yy.setClickEvent($$[$0-4], $$[$0-2], $$[$0]) ;\nbreak;\ncase 88:\nthis.$ = $$[$0-4];yy.setLink($$[$0-2], $$[$0], undefined);\nbreak;\ncase 89:\nthis.$ = $$[$0-6];yy.setLink($$[$0-4], $$[$0-2], $$[$0] );\nbreak;\ncase 90:\nthis.$ = $$[$0-4];yy.addVertex($$[$0-2],undefined,undefined,$$[$0]);\nbreak;\ncase 91: case 93:\nthis.$ = $$[$0-4];yy.updateLink($$[$0-2],$$[$0]);\nbreak;\ncase 92:\nthis.$ = $$[$0-4];yy.updateLink([$$[$0-2]],$$[$0]);\nbreak;\ncase 94:\nthis.$ = $$[$0-8];yy.updateLinkInterpolate([$$[$0-6]],$$[$0-2]);yy.updateLink([$$[$0-6]],$$[$0]);\nbreak;\ncase 95:\nthis.$ = $$[$0-8];yy.updateLinkInterpolate($$[$0-6],$$[$0-2]);yy.updateLink($$[$0-6],$$[$0]);\nbreak;\ncase 96:\nthis.$ = $$[$0-6];yy.updateLinkInterpolate([$$[$0-4]],$$[$0]);\nbreak;\ncase 97:\nthis.$ = $$[$0-6];yy.updateLinkInterpolate($$[$0-4],$$[$0]);\nbreak;\ncase 98: case 100:\nthis.$ = [$$[$0]]\nbreak;\ncase 99: case 101:\n$$[$0-2].push($$[$0]);this.$ = $$[$0-2];\nbreak;\ncase 103:\nthis.$ = $$[$0-1] + $$[$0];\nbreak;\ncase 125:\nthis.$=$$[$0]\nbreak;\ncase 126:\nthis.$=$$[$0-1]+''+$$[$0]\nbreak;\ncase 131:\nthis.$='v';\nbreak;\ncase 132:\nthis.$='-';\nbreak;\n}\n},\ntable: [{3:1,4:2,9:$V0,10:$V1,12:$V2},{1:[3]},o($V3,$V4,{5:6}),{4:7,9:$V0,10:$V1,12:$V2},{4:8,9:$V0,10:$V1,12:$V2},{13:[1,9]},{1:[2,1],6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,19:16,21:17,22:18,23:19,24:20,25:21,26:$V9,32:23,33:29,34:$Va,36:30,63:$Vb,64:$Vc,65:$Vd,66:$Ve,67:$Vf,68:$Vg,78:$Vh,79:$Vi,82:$Vj,83:$Vk,84:$Vl,86:$Vm,87:$Vn,91:31,93:$Vo,94:$Vp,95:$Vq,96:$Vr,97:$Vs,98:$Vt},o($V3,[2,9]),o($V3,[2,10]),{8:[1,48],9:[1,49],10:$Vu,14:47,17:50},o($Vv,[2,3]),o($Vv,[2,4]),o($Vv,[2,5]),o($Vv,[2,6]),o($Vv,[2,7]),o($Vv,[2,8]),{8:$Vw,9:$Vx,11:$Vy,20:52,31:53,54:57,57:[1,58],58:[1,59]},{8:$Vw,9:$Vx,11:$Vy,20:60},{8:$Vw,9:$Vx,11:$Vy,20:61},{8:$Vw,9:$Vx,11:$Vy,20:62},{8:$Vw,9:$Vx,11:$Vy,20:63},{8:$Vw,9:$Vx,11:$Vy,20:64},{8:$Vw,9:$Vx,10:[1,65],11:$Vy,20:66},o($Vz,[2,41],{17:67,10:$Vu}),{10:[1,68]},{10:[1,69]},{10:[1,70]},{10:[1,71]},{10:[1,72]},o($VA,[2,42],{35:[1,73]}),o($VB,[2,59],{91:84,28:[1,74],34:$Va,37:[1,75],39:[1,76],41:[1,77],43:[1,78],45:[1,79],47:[1,80],49:[1,81],50:[1,82],52:[1,83],68:$Vg,78:$Vh,79:$Vi,82:$Vj,83:$Vk,84:$Vl,86:$Vm,87:$Vn,93:$Vo,94:$Vp,95:$Vq,96:$Vr,97:$Vs,98:$Vt}),o($VC,[2,125]),o($VC,[2,146]),o($VC,[2,147]),o($VC,[2,148]),o($VC,[2,149]),o($VC,[2,150]),o($VC,[2,151]),o($VC,[2,152]),o($VC,[2,153]),o($VC,[2,154]),o($VC,[2,155]),o($VC,[2,156]),o($VC,[2,157]),o($VC,[2,158]),o($VC,[2,159]),o($VC,[2,160]),o($V3,[2,11]),o($V3,[2,17]),o($V3,[2,18]),{9:[1,85]},o($VD,[2,25],{17:86,10:$Vu}),o($Vv,[2,26]),{32:87,33:29,34:$Va,36:30,68:$Vg,78:$Vh,79:$Vi,82:$Vj,83:$Vk,84:$Vl,86:$Vm,87:$Vn,91:31,93:$Vo,94:$Vp,95:$Vq,96:$Vr,97:$Vs,98:$Vt},o($Vv,[2,35]),o($Vv,[2,36]),o($Vv,[2,37]),o($VE,[2,63],{55:88,56:[1,89],59:[1,90]}),{10:$VF,12:$VG,13:$VH,26:$VI,27:91,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},o([34,56,59,68,78,79,82,83,84,86,87,93,94,95,96,97,98],[2,65]),o($Vv,[2,27]),o($Vv,[2,28]),o($Vv,[2,29]),o($Vv,[2,30]),o($Vv,[2,31]),{10:$VF,12:$VG,13:$VH,26:$VI,27:128,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},o($V91,$V4,{5:129}),o($Vz,[2,40],{34:$Va1}),{13:$Vb1,34:$VK,68:$Vc1,74:131,75:[1,132],78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,90:135,92:133,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{72:[1,138],76:139,78:[1,140]},{13:$Vb1,34:$VK,68:$Vc1,72:[1,141],74:142,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,90:135,92:133,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{13:$Vb1,34:$VK,68:$Vc1,74:143,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,90:135,92:133,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{13:$Vb1,34:$VK,68:$Vc1,74:144,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,90:135,92:133,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{34:$Va,36:145,68:$Vg,78:$Vh,79:$Vi,82:$Vj,83:$Vk,84:$Vl,86:$Vm,87:$Vn,91:31,93:$Vo,94:$Vp,95:$Vq,96:$Vr,97:$Vs,98:$Vt},{10:$VF,12:$VG,13:$VH,26:$VI,27:146,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:148,30:$VJ,34:$VK,37:[1,147],49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:149,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:150,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:151,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:152,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:153,30:$VJ,34:$VK,47:[1,154],49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:155,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:156,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:157,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},o($VC,[2,126]),o($V3,[2,19]),o($VD,[2,24]),o($Vz,[2,38],{17:158,10:$Vu}),o($VE,[2,60],{10:[1,159]}),{10:[1,160]},{10:$VF,12:$VG,13:$VH,26:$VI,27:161,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,49:$VL,57:$VM,58:[1,162],60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},o($Ve1,[2,67]),o($Ve1,[2,69]),o($Ve1,[2,115]),o($Ve1,[2,116]),o($Ve1,[2,117]),o($Ve1,[2,118]),o($Ve1,[2,119]),o($Ve1,[2,120]),o($Ve1,[2,121]),o($Ve1,[2,122]),o($Ve1,[2,123]),o($Ve1,[2,124]),o($Ve1,[2,133]),o($Ve1,[2,134]),o($Ve1,[2,135]),o($Ve1,[2,136]),o($Ve1,[2,137]),o($Ve1,[2,138]),o($Ve1,[2,139]),o($Ve1,[2,140]),o($Ve1,[2,141]),o($Ve1,[2,142]),o($Ve1,[2,143]),o($Ve1,[2,144]),o($Ve1,[2,145]),o($Ve1,[2,70]),o($Ve1,[2,71]),o($Ve1,[2,72]),o($Ve1,[2,73]),o($Ve1,[2,74]),o($Ve1,[2,75]),o($Ve1,[2,76]),o($Ve1,[2,77]),o($Ve1,[2,78]),o($Ve1,[2,79]),o($Ve1,[2,80]),{8:$Vw,9:$Vx,10:$VF,11:$Vy,12:$VG,13:$VH,20:165,26:$VI,28:[1,164],30:$VJ,34:$VK,49:$VL,57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,19:16,21:17,22:18,23:19,24:20,25:21,26:$V9,30:[1,166],32:23,33:29,34:$Va,36:30,63:$Vb,64:$Vc,65:$Vd,66:$Ve,67:$Vf,68:$Vg,78:$Vh,79:$Vi,82:$Vj,83:$Vk,84:$Vl,86:$Vm,87:$Vn,91:31,93:$Vo,94:$Vp,95:$Vq,96:$Vr,97:$Vs,98:$Vt},{10:$Vu,17:167},{10:[1,168],13:$Vb1,34:$VK,68:$Vc1,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,90:135,92:169,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:[1,170]},o($Vf1,[2,127]),o($Vf1,[2,129]),o($Vf1,[2,130]),o($Vf1,[2,131]),o($Vf1,[2,132]),{10:[1,171]},{10:[1,172],79:[1,173]},o($Vg1,[2,98]),{10:[1,174]},{10:[1,175],13:$Vb1,34:$VK,68:$Vc1,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,90:135,92:169,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:[1,176],13:$Vb1,34:$VK,68:$Vc1,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,90:135,92:169,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:[1,177],13:$Vb1,34:$VK,68:$Vc1,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,90:135,92:169,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},o($VA,[2,44],{91:84,34:$Va,68:$Vg,78:$Vh,79:$Vi,82:$Vj,83:$Vk,84:$Vl,86:$Vm,87:$Vn,93:$Vo,94:$Vp,95:$Vq,96:$Vr,97:$Vs,98:$Vt}),{10:$VF,12:$VG,13:$VH,26:$VI,29:[1,178],30:$VJ,34:$VK,49:$VL,57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:179,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,38:[1,180],49:$VL,57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,40:[1,181],49:$VL,57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,42:[1,182],49:$VL,57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,44:[1,183],49:$VL,57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,46:[1,184],49:$VL,57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,48:[1,185],49:$VL,57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:186,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,29:[1,187],30:$VJ,34:$VK,49:$VL,57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,49:$VL,51:[1,188],53:[1,189],57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,49:$VL,51:[1,191],53:[1,190],57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},o($Vz,[2,39],{34:$Va1}),o($VE,[2,62]),o($VE,[2,61]),{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,49:$VL,57:$VM,59:[1,192],60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},o($VE,[2,64]),o($Ve1,[2,68]),{10:$VF,12:$VG,13:$VH,26:$VI,27:193,30:$VJ,34:$VK,49:$VL,57:$VM,60:92,61:$VN,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},o($V91,$V4,{5:194}),o($Vv,[2,34]),{33:195,34:$Va,36:30,68:$Vg,78:$Vh,79:$Vi,82:$Vj,83:$Vk,84:$Vl,86:$Vm,87:$Vn,91:31,93:$Vo,94:$Vp,95:$Vq,96:$Vr,97:$Vs,98:$Vt},{10:$Vh1,63:$Vi1,73:196,75:$Vj1,78:$Vk1,80:197,81:198,82:$Vl1,83:$Vm1,84:$Vn1,85:$Vo1,86:$Vp1,87:$Vq1,88:$Vr1},o($Vf1,[2,128]),{10:$Vh1,63:$Vi1,73:210,75:$Vj1,78:$Vk1,80:197,81:198,82:$Vl1,83:$Vm1,84:$Vn1,85:$Vo1,86:$Vp1,87:$Vq1,88:$Vr1},{10:$Vh1,63:$Vi1,73:211,75:$Vj1,77:[1,212],78:$Vk1,80:197,81:198,82:$Vl1,83:$Vm1,84:$Vn1,85:$Vo1,86:$Vp1,87:$Vq1,88:$Vr1},{10:$Vh1,63:$Vi1,73:213,75:$Vj1,77:[1,214],78:$Vk1,80:197,81:198,82:$Vl1,83:$Vm1,84:$Vn1,85:$Vo1,86:$Vp1,87:$Vq1,88:$Vr1},{78:[1,215]},{10:$Vh1,63:$Vi1,73:216,75:$Vj1,78:$Vk1,80:197,81:198,82:$Vl1,83:$Vm1,84:$Vn1,85:$Vo1,86:$Vp1,87:$Vq1,88:$Vr1},{10:$Vh1,63:$Vi1,73:217,75:$Vj1,78:$Vk1,80:197,81:198,82:$Vl1,83:$Vm1,84:$Vn1,85:$Vo1,86:$Vp1,87:$Vq1,88:$Vr1},{13:$Vb1,34:$VK,68:$Vc1,74:218,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,90:135,92:133,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{13:$Vb1,34:$VK,61:[1,220],68:$Vc1,74:219,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,90:135,92:133,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},o($VB,[2,45]),{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,38:[1,221],49:$VL,57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},o($VB,[2,51]),o($VB,[2,47]),o($VB,[2,48]),o($VB,[2,49]),o($VB,[2,50]),o($VB,[2,52]),{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,48:[1,222],49:$VL,57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},o($VB,[2,54]),o($VB,[2,55]),o($VB,[2,57]),o($VB,[2,56]),o($VB,[2,58]),o([10,34,68,78,79,82,83,84,86,87,93,94,95,96,97,98],[2,66]),{10:$VF,12:$VG,13:$VH,26:$VI,29:[1,223],30:$VJ,34:$VK,49:$VL,57:$VM,60:163,62:103,63:$VO,64:$VP,65:$VQ,66:$VR,67:$VS,68:$VT,69:$VU,71:94,72:$VV,78:$VW,79:$VX,82:$VY,83:$VZ,84:$V_,86:$V$,87:$V01,88:$V11,89:$V21,90:100,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,19:16,21:17,22:18,23:19,24:20,25:21,26:$V9,30:[1,224],32:23,33:29,34:$Va,36:30,63:$Vb,64:$Vc,65:$Vd,66:$Ve,67:$Vf,68:$Vg,78:$Vh,79:$Vi,82:$Vj,83:$Vk,84:$Vl,86:$Vm,87:$Vn,91:31,93:$Vo,94:$Vp,95:$Vq,96:$Vr,97:$Vs,98:$Vt},o($VA,[2,43]),o($Vs1,[2,90],{79:$Vt1}),o($Vu1,[2,100],{81:226,10:$Vh1,63:$Vi1,75:$Vj1,78:$Vk1,82:$Vl1,83:$Vm1,84:$Vn1,85:$Vo1,86:$Vp1,87:$Vq1,88:$Vr1}),o($Vv1,[2,102]),o($Vv1,[2,104]),o($Vv1,[2,105]),o($Vv1,[2,106]),o($Vv1,[2,107]),o($Vv1,[2,108]),o($Vv1,[2,109]),o($Vv1,[2,110]),o($Vv1,[2,111]),o($Vv1,[2,112]),o($Vv1,[2,113]),o($Vv1,[2,114]),o($Vs1,[2,91],{79:$Vt1}),o($Vs1,[2,92],{79:$Vt1}),{10:[1,227]},o($Vs1,[2,93],{79:$Vt1}),{10:[1,228]},o($Vg1,[2,99]),o($Vs1,[2,83],{79:$Vt1}),o($Vs1,[2,84],{79:$Vt1}),o($Vs1,[2,85],{90:135,92:169,13:$Vb1,34:$VK,68:$Vc1,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81}),o($Vs1,[2,86],{90:135,92:169,10:[1,229],13:$Vb1,34:$VK,68:$Vc1,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81}),o($Vs1,[2,88],{10:[1,230]}),{38:[1,231]},{48:[1,232]},{8:$Vw,9:$Vx,11:$Vy,20:233},o($Vv,[2,33]),{10:$Vh1,63:$Vi1,75:$Vj1,78:$Vk1,80:234,81:198,82:$Vl1,83:$Vm1,84:$Vn1,85:$Vo1,86:$Vp1,87:$Vq1,88:$Vr1},o($Vv1,[2,103]),{13:$Vb1,34:$VK,68:$Vc1,74:235,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,90:135,92:133,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{13:$Vb1,34:$VK,68:$Vc1,74:236,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,90:135,92:133,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81},{61:[1,237]},{61:[1,238]},o($VB,[2,46]),o($VB,[2,53]),o($V91,$V4,{5:239}),o($Vu1,[2,101],{81:226,10:$Vh1,63:$Vi1,75:$Vj1,78:$Vk1,82:$Vl1,83:$Vm1,84:$Vn1,85:$Vo1,86:$Vp1,87:$Vq1,88:$Vr1}),o($Vs1,[2,96],{90:135,92:169,10:[1,240],13:$Vb1,34:$VK,68:$Vc1,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81}),o($Vs1,[2,97],{90:135,92:169,10:[1,241],13:$Vb1,34:$VK,68:$Vc1,78:$VW,79:$VX,82:$VY,83:$VZ,84:$Vd1,86:$V$,87:$V01,93:$V31,94:$V41,95:$V51,96:$V61,97:$V71,98:$V81}),o($Vs1,[2,87]),o($Vs1,[2,89]),{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,19:16,21:17,22:18,23:19,24:20,25:21,26:$V9,30:[1,242],32:23,33:29,34:$Va,36:30,63:$Vb,64:$Vc,65:$Vd,66:$Ve,67:$Vf,68:$Vg,78:$Vh,79:$Vi,82:$Vj,83:$Vk,84:$Vl,86:$Vm,87:$Vn,91:31,93:$Vo,94:$Vp,95:$Vq,96:$Vr,97:$Vs,98:$Vt},{10:$Vh1,63:$Vi1,73:243,75:$Vj1,78:$Vk1,80:197,81:198,82:$Vl1,83:$Vm1,84:$Vn1,85:$Vo1,86:$Vp1,87:$Vq1,88:$Vr1},{10:$Vh1,63:$Vi1,73:244,75:$Vj1,78:$Vk1,80:197,81:198,82:$Vl1,83:$Vm1,84:$Vn1,85:$Vo1,86:$Vp1,87:$Vq1,88:$Vr1},o($Vv,[2,32]),o($Vs1,[2,94],{79:$Vt1}),o($Vs1,[2,95],{79:$Vt1})],\ndefaultActions: {},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// 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.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n 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(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* do nothing */\nbreak;\ncase 1:this.begin(\"string\");\nbreak;\ncase 2:this.popState();\nbreak;\ncase 3:return \"STR\";\nbreak;\ncase 4:return 63;\nbreak;\ncase 5:return 72;\nbreak;\ncase 6:return 64;\nbreak;\ncase 7:return 77;\nbreak;\ncase 8:return 65;\nbreak;\ncase 9:return 66;\nbreak;\ncase 10:return 67;\nbreak;\ncase 11:if(yy.lex.firstGraph()){this.begin(\"dir\");} return 12;\nbreak;\ncase 12:if(yy.lex.firstGraph()){this.begin(\"dir\");} return 12;\nbreak;\ncase 13:return 26;\nbreak;\ncase 14:return 30;\nbreak;\ncase 15: this.popState(); return 13; \nbreak;\ncase 16: this.popState(); return 13; \nbreak;\ncase 17: this.popState(); return 13; \nbreak;\ncase 18: this.popState(); return 13; \nbreak;\ncase 19: this.popState(); return 13; \nbreak;\ncase 20: this.popState(); return 13; \nbreak;\ncase 21: this.popState(); return 13; \nbreak;\ncase 22: this.popState(); return 13; \nbreak;\ncase 23: this.popState(); return 13; \nbreak;\ncase 24: this.popState(); return 13; \nbreak;\ncase 25: return 78;\nbreak;\ncase 26:return 86;\nbreak;\ncase 27:return 35;\nbreak;\ncase 28:return 83;\nbreak;\ncase 29:return 34;\nbreak;\ncase 30:return 8;\nbreak;\ncase 31:return 79;\nbreak;\ncase 32:return 97;\nbreak;\ncase 33:return 58;\nbreak;\ncase 34:return 58;\nbreak;\ncase 35:return 58;\nbreak;\ncase 36:return 58;\nbreak;\ncase 37:return 58;\nbreak;\ncase 38:return 58;\nbreak;\ncase 39:return 58;\nbreak;\ncase 40:return 58;\nbreak;\ncase 41:return 58;\nbreak;\ncase 42:return 58;\nbreak;\ncase 43:return 58;\nbreak;\ncase 44:return 58;\nbreak;\ncase 45:return 58;\nbreak;\ncase 46:return 58;\nbreak;\ncase 47:return 58;\nbreak;\ncase 48:return 58;\nbreak;\ncase 49:return 58;\nbreak;\ncase 50:return 58;\nbreak;\ncase 51:return 58;\nbreak;\ncase 52:return 58;\nbreak;\ncase 53:return 58;\nbreak;\ncase 54:return 58;\nbreak;\ncase 55:return 58;\nbreak;\ncase 56:return 58;\nbreak;\ncase 57:return 58;\nbreak;\ncase 58:return 58;\nbreak;\ncase 59:return 58;\nbreak;\ncase 60:return 58;\nbreak;\ncase 61:return 57;\nbreak;\ncase 62:return 57;\nbreak;\ncase 63:return 57;\nbreak;\ncase 64:return 57;\nbreak;\ncase 65:return 57;\nbreak;\ncase 66:return 57;\nbreak;\ncase 67:return 57;\nbreak;\ncase 68:return 57;\nbreak;\ncase 69:return 57;\nbreak;\ncase 70:return 57;\nbreak;\ncase 71:return 57;\nbreak;\ncase 72:return 57;\nbreak;\ncase 73:return 39;\nbreak;\ncase 74:return 40;\nbreak;\ncase 75:return 41;\nbreak;\ncase 76:return 42;\nbreak;\ncase 77:return 43;\nbreak;\ncase 78:return 44;\nbreak;\ncase 79:return 45;\nbreak;\ncase 80:return 46;\nbreak;\ncase 81:return 84;\nbreak;\ncase 82:return 87;\nbreak;\ncase 83:return 98;\nbreak;\ncase 84:return 95;\nbreak;\ncase 85:return 88;\nbreak;\ncase 86:return 96;\nbreak;\ncase 87:return 96;\nbreak;\ncase 88:return 89;\nbreak;\ncase 89:return 49;\nbreak;\ncase 90:return 69;\nbreak;\ncase 91:return 'SEP';\nbreak;\ncase 92:return 68;\nbreak;\ncase 93:return 82;\nbreak;\ncase 94:return 51;\nbreak;\ncase 95:return 50;\nbreak;\ncase 96:return 53;\nbreak;\ncase 97:return 52;\nbreak;\ncase 98:return 93;\nbreak;\ncase 99:return 94;\nbreak;\ncase 100:return 59;\nbreak;\ncase 101:return 37;\nbreak;\ncase 102:return 38;\nbreak;\ncase 103:return 28;\nbreak;\ncase 104:return 29;\nbreak;\ncase 105:return 47\nbreak;\ncase 106:return 48\nbreak;\ncase 107:return 104;\nbreak;\ncase 108:return 9;\nbreak;\ncase 109:return 10;\nbreak;\ncase 110:return 11;\nbreak;\n}\n},\nrules: [/^(?:%%[^\\n]*\\n*)/,/^(?:[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:style\\b)/,/^(?:default\\b)/,/^(?:linkStyle\\b)/,/^(?:interpolate\\b)/,/^(?:classDef\\b)/,/^(?:class\\b)/,/^(?:click\\b)/,/^(?:graph\\b)/,/^(?:flowchart\\b)/,/^(?:subgraph\\b)/,/^(?:end\\b\\s*)/,/^(?:\\s*LR\\b)/,/^(?:\\s*RL\\b)/,/^(?:\\s*TB\\b)/,/^(?:\\s*BT\\b)/,/^(?:\\s*TD\\b)/,/^(?:\\s*BR\\b)/,/^(?:\\s*<)/,/^(?:\\s*>)/,/^(?:\\s*\\^)/,/^(?:\\s*v\\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\\*)/,/^(?:\\s*--[x]\\s*)/,/^(?:\\s*-->\\s*)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^(?:v\\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\\\\])/,/^(?:\\[\\/)/,/^(?:\\/\\])/,/^(?:\\[\\\\)/,/^(?:[!\"#$%&'*+,-.`?\\\\_/])/,/^(?:[\\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-\\u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0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/,/^(?:\\|)/,/^(?:\\()/,/^(?:\\))/,/^(?:\\[)/,/^(?:\\])/,/^(?:\\{)/,/^(?:\\})/,/^(?:\")/,/^(?:(\\r|\\n|\\r\\n)+)/,/^(?:\\s)/,/^(?:$)/],\nconditions: {\"vertex\":{\"rules\":[],\"inclusive\":false},\"dir\":{\"rules\":[15,16,17,18,19,20,21,22,23,24],\"inclusive\":false},\"string\":{\"rules\":[2,3],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,4,5,6,7,8,9,10,11,12,13,14,25,26,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,52,53,54,55,56,57,58,59,60,61,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,97,98,99,100,101,102,103,104,105,106,107,108,109,110],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof require !== 'undefined' && typeof exports !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n if (!args[1]) {\n console.log('Usage: '+args[0]+' FILE');\n process.exit(1);\n }\n var source = require('fs').readFileSync(require('path').normalize(args[1]), \"utf8\");\n return exports.parser.parse(source);\n};\nif (typeof module !== 'undefined' && require.main === module) {\n exports.main(process.argv.slice(1));\n}\n}","const getStyles = options =>\n `.label {\n font-family: ${options.fontFamily};\n color: ${options.textColor};\n }\n\n .label text {\n fill: ${options.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ${options.secondBkg};\n stroke: ${options.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${options.fontFamily};\n font-size: 12px;\n background: ${options.secondBkg};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n`;\n\nexport default getStyles;\n","import moment from 'moment-mini';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\nimport { logger } from '../../logger';\nimport { getConfig } from '../../config';\nimport utils from '../../utils';\n\nlet dateFormat = '';\nlet axisFormat = '';\nlet todayMarker = '';\nlet excludes = [];\nlet title = '';\nlet sections = [];\nlet tasks = [];\nlet currentSection = '';\nconst tags = ['active', 'done', 'crit', 'milestone'];\nlet funs = [];\nlet inclusiveEndDates = false;\n\n// The serial order of the task in the script\nlet lastOrder = 0;\n\nexport const clear = function() {\n sections = [];\n tasks = [];\n currentSection = '';\n funs = [];\n title = '';\n taskCnt = 0;\n lastTask = undefined;\n lastTaskID = undefined;\n rawTasks = [];\n dateFormat = '';\n axisFormat = '';\n todayMarker = '';\n excludes = [];\n inclusiveEndDates = false;\n lastOrder = 0;\n};\n\nexport const setAxisFormat = function(txt) {\n axisFormat = txt;\n};\n\nexport const getAxisFormat = function() {\n return axisFormat;\n};\n\nexport const setTodayMarker = function(txt) {\n todayMarker = txt;\n};\n\nexport const getTodayMarker = function() {\n return todayMarker;\n};\n\nexport const setDateFormat = function(txt) {\n dateFormat = txt;\n};\n\nexport const enableInclusiveEndDates = function() {\n inclusiveEndDates = true;\n};\n\nexport const endDatesAreInclusive = function() {\n return inclusiveEndDates;\n};\n\nexport const getDateFormat = function() {\n return dateFormat;\n};\n\nexport const setExcludes = function(txt) {\n excludes = txt.toLowerCase().split(/[\\s,]+/);\n};\n\nexport const getExcludes = function() {\n return excludes;\n};\n\nexport const setTitle = function(txt) {\n title = txt;\n};\n\nexport const getTitle = function() {\n return title;\n};\n\nexport const addSection = function(txt) {\n currentSection = txt;\n sections.push(txt);\n};\n\nexport const getSections = function() {\n return sections;\n};\n\nexport const getTasks = function() {\n let allItemsPricessed = compileTasks();\n const maxDepth = 10;\n let iterationCount = 0;\n while (!allItemsPricessed && iterationCount < maxDepth) {\n allItemsPricessed = compileTasks();\n iterationCount++;\n }\n\n tasks = rawTasks;\n\n return tasks;\n};\n\nconst isInvalidDate = function(date, dateFormat, excludes) {\n if (date.isoWeekday() >= 6 && excludes.indexOf('weekends') >= 0) {\n return true;\n }\n if (excludes.indexOf(date.format('dddd').toLowerCase()) >= 0) {\n return true;\n }\n return excludes.indexOf(date.format(dateFormat.trim())) >= 0;\n};\n\nconst checkTaskDates = function(task, dateFormat, excludes) {\n if (!excludes.length || task.manualEndTime) return;\n let startTime = moment(task.startTime, dateFormat, true);\n startTime.add(1, 'd');\n let endTime = moment(task.endTime, dateFormat, true);\n let renderEndTime = fixTaskDates(startTime, endTime, dateFormat, excludes);\n task.endTime = endTime.toDate();\n task.renderEndTime = renderEndTime;\n};\n\nconst fixTaskDates = function(startTime, endTime, dateFormat, excludes) {\n let invalid = false;\n let renderEndTime = null;\n while (startTime <= endTime) {\n if (!invalid) {\n renderEndTime = endTime.toDate();\n }\n invalid = isInvalidDate(startTime, dateFormat, excludes);\n if (invalid) {\n endTime.add(1, 'd');\n }\n startTime.add(1, 'd');\n }\n return renderEndTime;\n};\n\nconst getStartDate = function(prevTime, dateFormat, str) {\n str = str.trim();\n\n // Test for after\n const re = /^after\\s+([\\d\\w- ]+)/;\n const afterStatement = re.exec(str.trim());\n\n if (afterStatement !== null) {\n // check all after ids and take the latest\n let latestEndingTask = null;\n afterStatement[1].split(' ').forEach(function(id) {\n let task = findTaskById(id);\n if (typeof task !== 'undefined') {\n if (!latestEndingTask) {\n latestEndingTask = task;\n } else {\n if (task.endTime > latestEndingTask.endTime) {\n latestEndingTask = task;\n }\n }\n }\n });\n\n if (!latestEndingTask) {\n const dt = new Date();\n dt.setHours(0, 0, 0, 0);\n return dt;\n } else {\n return latestEndingTask.endTime;\n }\n }\n\n // Check for actual date set\n let mDate = moment(str, dateFormat.trim(), true);\n if (mDate.isValid()) {\n return mDate.toDate();\n } else {\n logger.debug('Invalid date:' + str);\n logger.debug('With date format:' + dateFormat.trim());\n }\n\n // Default date - now\n return new Date();\n};\n\nconst durationToDate = function(durationStatement, relativeTime) {\n if (durationStatement !== null) {\n switch (durationStatement[2]) {\n case 's':\n relativeTime.add(durationStatement[1], 'seconds');\n break;\n case 'm':\n relativeTime.add(durationStatement[1], 'minutes');\n break;\n case 'h':\n relativeTime.add(durationStatement[1], 'hours');\n break;\n case 'd':\n relativeTime.add(durationStatement[1], 'days');\n break;\n case 'w':\n relativeTime.add(durationStatement[1], 'weeks');\n break;\n }\n }\n // Default date - now\n return relativeTime.toDate();\n};\n\nconst getEndDate = function(prevTime, dateFormat, str, inclusive) {\n inclusive = inclusive || false;\n str = str.trim();\n\n // Check for actual date\n let mDate = moment(str, dateFormat.trim(), true);\n if (mDate.isValid()) {\n if (inclusive) {\n mDate.add(1, 'd');\n }\n return mDate.toDate();\n }\n\n return durationToDate(/^([\\d]+)([wdhms])/.exec(str.trim()), moment(prevTime));\n};\n\nlet taskCnt = 0;\nconst parseId = function(idStr) {\n if (typeof idStr === 'undefined') {\n taskCnt = taskCnt + 1;\n return 'task' + taskCnt;\n }\n return idStr;\n};\n// id, startDate, endDate\n// id, startDate, length\n// id, after x, endDate\n// id, after x, length\n// startDate, endDate\n// startDate, length\n// after x, endDate\n// after x, length\n// endDate\n// length\n\nconst compileData = function(prevTask, dataStr) {\n let ds;\n\n if (dataStr.substr(0, 1) === ':') {\n ds = dataStr.substr(1, dataStr.length);\n } else {\n ds = dataStr;\n }\n\n const data = ds.split(',');\n\n const task = {};\n\n // Get tags like active, done, crit and milestone\n getTaskTags(data, task, tags);\n\n for (let i = 0; i < data.length; i++) {\n data[i] = data[i].trim();\n }\n\n let endTimeData = '';\n switch (data.length) {\n case 1:\n task.id = parseId();\n task.startTime = prevTask.endTime;\n endTimeData = data[0];\n break;\n case 2:\n task.id = parseId();\n task.startTime = getStartDate(undefined, dateFormat, data[0]);\n endTimeData = data[1];\n break;\n case 3:\n task.id = parseId(data[0]);\n task.startTime = getStartDate(undefined, dateFormat, data[1]);\n endTimeData = data[2];\n break;\n default:\n }\n\n if (endTimeData) {\n task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);\n task.manualEndTime = moment(endTimeData, 'YYYY-MM-DD', true).isValid();\n checkTaskDates(task, dateFormat, excludes);\n }\n\n return task;\n};\n\nconst parseData = function(prevTaskId, dataStr) {\n let ds;\n if (dataStr.substr(0, 1) === ':') {\n ds = dataStr.substr(1, dataStr.length);\n } else {\n ds = dataStr;\n }\n\n const data = ds.split(',');\n\n const task = {};\n\n // Get tags like active, done, crit and milestone\n getTaskTags(data, task, tags);\n\n for (let i = 0; i < data.length; i++) {\n data[i] = data[i].trim();\n }\n\n switch (data.length) {\n case 1:\n task.id = parseId();\n task.startTime = {\n type: 'prevTaskEnd',\n id: prevTaskId\n };\n task.endTime = {\n data: data[0]\n };\n break;\n case 2:\n task.id = parseId();\n task.startTime = {\n type: 'getStartDate',\n startData: data[0]\n };\n task.endTime = {\n data: data[1]\n };\n break;\n case 3:\n task.id = parseId(data[0]);\n task.startTime = {\n type: 'getStartDate',\n startData: data[1]\n };\n task.endTime = {\n data: data[2]\n };\n break;\n default:\n }\n\n return task;\n};\n\nlet lastTask;\nlet lastTaskID;\nlet rawTasks = [];\nconst taskDb = {};\nexport const addTask = function(descr, data) {\n const rawTask = {\n section: currentSection,\n type: currentSection,\n processed: false,\n manualEndTime: false,\n renderEndTime: null,\n raw: { data: data },\n task: descr,\n classes: []\n };\n const taskInfo = parseData(lastTaskID, data);\n rawTask.raw.startTime = taskInfo.startTime;\n rawTask.raw.endTime = taskInfo.endTime;\n rawTask.id = taskInfo.id;\n rawTask.prevTaskId = lastTaskID;\n rawTask.active = taskInfo.active;\n rawTask.done = taskInfo.done;\n rawTask.crit = taskInfo.crit;\n rawTask.milestone = taskInfo.milestone;\n rawTask.order = lastOrder;\n\n lastOrder++;\n\n const pos = rawTasks.push(rawTask);\n\n lastTaskID = rawTask.id;\n // Store cross ref\n taskDb[rawTask.id] = pos - 1;\n};\n\nexport const findTaskById = function(id) {\n const pos = taskDb[id];\n return rawTasks[pos];\n};\n\nexport const addTaskOrg = function(descr, data) {\n const newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: []\n };\n const taskInfo = compileData(lastTask, data);\n newTask.startTime = taskInfo.startTime;\n newTask.endTime = taskInfo.endTime;\n newTask.id = taskInfo.id;\n newTask.active = taskInfo.active;\n newTask.done = taskInfo.done;\n newTask.crit = taskInfo.crit;\n newTask.milestone = taskInfo.milestone;\n lastTask = newTask;\n tasks.push(newTask);\n};\n\nconst compileTasks = function() {\n const compileTask = function(pos) {\n const task = rawTasks[pos];\n let startTime = '';\n switch (rawTasks[pos].raw.startTime.type) {\n case 'prevTaskEnd': {\n const prevTask = findTaskById(task.prevTaskId);\n task.startTime = prevTask.endTime;\n break;\n }\n case 'getStartDate':\n startTime = getStartDate(undefined, dateFormat, rawTasks[pos].raw.startTime.startData);\n if (startTime) {\n rawTasks[pos].startTime = startTime;\n }\n break;\n }\n\n if (rawTasks[pos].startTime) {\n rawTasks[pos].endTime = getEndDate(\n rawTasks[pos].startTime,\n dateFormat,\n rawTasks[pos].raw.endTime.data,\n inclusiveEndDates\n );\n if (rawTasks[pos].endTime) {\n rawTasks[pos].processed = true;\n rawTasks[pos].manualEndTime = moment(\n rawTasks[pos].raw.endTime.data,\n 'YYYY-MM-DD',\n true\n ).isValid();\n checkTaskDates(rawTasks[pos], dateFormat, excludes);\n }\n }\n\n return rawTasks[pos].processed;\n };\n\n let allProcessed = true;\n for (let i = 0; i < rawTasks.length; i++) {\n compileTask(i);\n\n allProcessed = allProcessed && rawTasks[i].processed;\n }\n return allProcessed;\n};\n\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n * @param ids Comma separated list of ids\n * @param linkStr URL to create a link for\n */\nexport const setLink = function(ids, _linkStr) {\n let linkStr = _linkStr;\n if (getConfig().securityLevel !== 'loose') {\n linkStr = sanitizeUrl(_linkStr);\n }\n ids.split(',').forEach(function(id) {\n let rawTask = findTaskById(id);\n if (typeof rawTask !== 'undefined') {\n pushFun(id, () => {\n window.open(linkStr, '_self');\n });\n }\n });\n setClass(ids, 'clickable');\n};\n\n/**\n * Called by parser when a special node is found, e.g. a clickable element.\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\nexport const setClass = function(ids, className) {\n ids.split(',').forEach(function(id) {\n let rawTask = findTaskById(id);\n if (typeof rawTask !== 'undefined') {\n rawTask.classes.push(className);\n }\n });\n};\n\nconst setClickFun = function(id, functionName, functionArgs) {\n if (getConfig().securityLevel !== 'loose') {\n return;\n }\n if (typeof functionName === 'undefined') {\n return;\n }\n\n let argList = [];\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n for (let i = 0; i < argList.length; i++) {\n let item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n /* This preserves all starting and ending whitespace inside */\n if (item.charAt(0) === '\"' && item.charAt(item.length - 1) === '\"') {\n item = item.substr(1, item.length - 2);\n }\n argList[i] = item;\n }\n }\n\n /* if no arguments passed into callback, default to passing in id */\n if (argList.length === 0) {\n argList.push(id);\n }\n\n let rawTask = findTaskById(id);\n if (typeof rawTask !== 'undefined') {\n pushFun(id, () => {\n utils.runFunc(functionName, ...argList);\n });\n }\n};\n\n/**\n * The callbackFunction is executed in a click event bound to the task with the specified id or the task's assigned text\n * @param id The task's id\n * @param callbackFunction A function to be executed when clicked on the task or the task's text\n */\nconst pushFun = function(id, callbackFunction) {\n funs.push(function() {\n // const elem = d3.select(element).select(`[id=\"${id}\"]`)\n const elem = document.querySelector(`[id=\"${id}\"]`);\n if (elem !== null) {\n elem.addEventListener('click', function() {\n callbackFunction();\n });\n }\n });\n funs.push(function() {\n // const elem = d3.select(element).select(`[id=\"${id}-text\"]`)\n const elem = document.querySelector(`[id=\"${id}-text\"]`);\n if (elem !== null) {\n elem.addEventListener('click', function() {\n callbackFunction();\n });\n }\n });\n};\n\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param functionArgs Function args the function should be called with\n */\nexport const setClickEvent = function(ids, functionName, functionArgs) {\n ids.split(',').forEach(function(id) {\n setClickFun(id, functionName, functionArgs);\n });\n setClass(ids, 'clickable');\n};\n\n/**\n * Binds all functions previously added to fun (specified through click) to the element\n * @param element\n */\nexport const bindFunctions = function(element) {\n funs.forEach(function(fun) {\n fun(element);\n });\n};\n\nexport default {\n clear,\n setDateFormat,\n getDateFormat,\n enableInclusiveEndDates,\n endDatesAreInclusive,\n setAxisFormat,\n getAxisFormat,\n setTodayMarker,\n getTodayMarker,\n setTitle,\n getTitle,\n addSection,\n getSections,\n getTasks,\n addTask,\n findTaskById,\n addTaskOrg,\n setExcludes,\n getExcludes,\n setClickEvent,\n setLink,\n bindFunctions,\n durationToDate\n};\n\nfunction getTaskTags(data, task, tags) {\n let matchFound = true;\n while (matchFound) {\n matchFound = false;\n tags.forEach(function(t) {\n const pattern = '^\\\\s*' + t + '\\\\s*$';\n const regex = new RegExp(pattern);\n if (data[0].match(regex)) {\n task[t] = true;\n data.shift(1);\n matchFound = true;\n }\n });\n }\n}\n","import {\n select,\n scaleTime,\n min,\n max,\n scaleLinear,\n interpolateHcl,\n axisBottom,\n timeFormat\n} from 'd3';\nimport { parser } from './parser/gantt';\nimport common from '../common/common';\nimport ganttDb from './ganttDb';\n\nparser.yy = ganttDb;\n\nconst conf = {\n titleTopMargin: 25,\n barHeight: 20,\n barGap: 4,\n topPadding: 50,\n rightPadding: 75,\n leftPadding: 75,\n gridLineStartPadding: 35,\n fontSize: 11,\n fontFamily: '\"Open-Sans\", \"sans-serif\"'\n};\nexport const setConf = function(cnf) {\n const keys = Object.keys(cnf);\n\n keys.forEach(function(key) {\n conf[key] = cnf[key];\n });\n};\nlet w;\nexport const draw = function(text, id) {\n parser.yy.clear();\n parser.parse(text);\n\n const elem = document.getElementById(id);\n w = elem.parentElement.offsetWidth;\n\n if (typeof w === 'undefined') {\n w = 1200;\n }\n\n if (typeof conf.useWidth !== 'undefined') {\n w = conf.useWidth;\n }\n\n const taskArray = parser.yy.getTasks();\n\n // Set height based on number of tasks\n const h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding;\n\n elem.setAttribute('height', '100%');\n // Set viewBox\n elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);\n const svg = select(`[id=\"${id}\"]`);\n\n // Set timescale\n const timeScale = scaleTime()\n .domain([\n min(taskArray, function(d) {\n return d.startTime;\n }),\n max(taskArray, function(d) {\n return d.endTime;\n })\n ])\n .rangeRound([0, w - conf.leftPadding - conf.rightPadding]);\n\n let categories = [];\n\n for (let i = 0; i < taskArray.length; i++) {\n categories.push(taskArray[i].type);\n }\n\n const catsUnfiltered = categories; // for vert labels\n\n categories = checkUnique(categories);\n\n function taskCompare(a, b) {\n const taskA = a.startTime;\n const taskB = b.startTime;\n let result = 0;\n if (taskA > taskB) {\n result = 1;\n } else if (taskA < taskB) {\n result = -1;\n }\n return result;\n }\n\n // Sort the task array using the above taskCompare() so that\n // tasks are created based on their order of startTime\n taskArray.sort(taskCompare);\n\n makeGant(taskArray, w, h);\n if (typeof conf.useWidth !== 'undefined') {\n elem.setAttribute('width', w);\n }\n\n svg\n .append('text')\n .text(parser.yy.getTitle())\n .attr('x', w / 2)\n .attr('y', conf.titleTopMargin)\n .attr('class', 'titleText');\n\n function makeGant(tasks, pageWidth, pageHeight) {\n const barHeight = conf.barHeight;\n const gap = barHeight + conf.barGap;\n const topPadding = conf.topPadding;\n const leftPadding = conf.leftPadding;\n\n const colorScale = scaleLinear()\n .domain([0, categories.length])\n .range(['#00B9FA', '#F95002'])\n .interpolate(interpolateHcl);\n\n makeGrid(leftPadding, topPadding, pageWidth, pageHeight);\n drawRects(tasks, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight);\n vertLabels(gap, topPadding, leftPadding, barHeight, colorScale);\n drawToday(leftPadding, topPadding, pageWidth, pageHeight);\n }\n\n function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w) {\n // Draw background rects covering the entire width of the graph, these form the section rows.\n svg\n .append('g')\n .selectAll('rect')\n .data(theArray)\n .enter()\n .append('rect')\n .attr('x', 0)\n .attr('y', function(d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + theTopPad - 2;\n })\n .attr('width', function() {\n return w - conf.rightPadding / 2;\n })\n .attr('height', theGap)\n .attr('class', function(d) {\n for (let i = 0; i < categories.length; i++) {\n if (d.type === categories[i]) {\n return 'section section' + (i % conf.numberSectionStyles);\n }\n }\n return 'section section0';\n });\n\n // Draw the rects representing the tasks\n const rectangles = svg\n .append('g')\n .selectAll('rect')\n .data(theArray)\n .enter();\n\n rectangles\n .append('rect')\n .attr('id', function(d) {\n return d.id;\n })\n .attr('rx', 3)\n .attr('ry', 3)\n .attr('x', function(d) {\n if (d.milestone) {\n return (\n timeScale(d.startTime) +\n theSidePad +\n 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) -\n 0.5 * theBarHeight\n );\n }\n return timeScale(d.startTime) + theSidePad;\n })\n .attr('y', function(d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + theTopPad;\n })\n .attr('width', function(d) {\n if (d.milestone) {\n return theBarHeight;\n }\n return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);\n })\n .attr('height', theBarHeight)\n .attr('transform-origin', function(d, i) {\n return (\n (\n timeScale(d.startTime) +\n theSidePad +\n 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))\n ).toString() +\n 'px ' +\n (i * theGap + theTopPad + 0.5 * theBarHeight).toString() +\n 'px'\n );\n })\n .attr('class', function(d) {\n const res = 'task';\n\n let classStr = '';\n if (d.classes.length > 0) {\n classStr = d.classes.join(' ');\n }\n\n let secNum = 0;\n for (let i = 0; i < categories.length; i++) {\n if (d.type === categories[i]) {\n secNum = i % conf.numberSectionStyles;\n }\n }\n\n let taskClass = '';\n if (d.active) {\n if (d.crit) {\n taskClass += ' activeCrit';\n } else {\n taskClass = ' active';\n }\n } else if (d.done) {\n if (d.crit) {\n taskClass = ' doneCrit';\n } else {\n taskClass = ' done';\n }\n } else {\n if (d.crit) {\n taskClass += ' crit';\n }\n }\n\n if (taskClass.length === 0) {\n taskClass = ' task';\n }\n\n if (d.milestone) {\n taskClass = ' milestone ' + taskClass;\n }\n\n taskClass += secNum;\n\n taskClass += ' ' + classStr;\n\n return res + taskClass;\n });\n\n // Append task labels\n rectangles\n .append('text')\n .attr('id', function(d) {\n return d.id + '-text';\n })\n .text(function(d) {\n return d.task;\n })\n .attr('font-size', conf.fontSize)\n .attr('x', function(d) {\n let startX = timeScale(d.startTime);\n let endX = timeScale(d.renderEndTime || d.endTime);\n if (d.milestone) {\n startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;\n }\n if (d.milestone) {\n endX = startX + theBarHeight;\n }\n const textWidth = this.getBBox().width;\n\n // Check id text width > width of rectangle\n if (textWidth > endX - startX) {\n if (endX + textWidth + 1.5 * conf.leftPadding > w) {\n return startX + theSidePad - 5;\n } else {\n return endX + theSidePad + 5;\n }\n } else {\n return (endX - startX) / 2 + startX + theSidePad;\n }\n })\n .attr('y', function(d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;\n })\n .attr('text-height', theBarHeight)\n .attr('class', function(d) {\n const startX = timeScale(d.startTime);\n let endX = timeScale(d.endTime);\n if (d.milestone) {\n endX = startX + theBarHeight;\n }\n const textWidth = this.getBBox().width;\n\n let classStr = '';\n if (d.classes.length > 0) {\n classStr = d.classes.join(' ');\n }\n\n let secNum = 0;\n console.log(conf);\n for (let i = 0; i < categories.length; i++) {\n if (d.type === categories[i]) {\n secNum = i % conf.numberSectionStyles;\n }\n }\n\n let taskType = '';\n if (d.active) {\n if (d.crit) {\n taskType = 'activeCritText' + secNum;\n } else {\n taskType = 'activeText' + secNum;\n }\n }\n\n if (d.done) {\n if (d.crit) {\n taskType = taskType + ' doneCritText' + secNum;\n } else {\n taskType = taskType + ' doneText' + secNum;\n }\n } else {\n if (d.crit) {\n taskType = taskType + ' critText' + secNum;\n }\n }\n\n if (d.milestone) {\n taskType += ' milestoneText';\n }\n\n // Check id text width > width of rectangle\n if (textWidth > endX - startX) {\n if (endX + textWidth + 1.5 * conf.leftPadding > w) {\n return classStr + ' taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType;\n } else {\n return (\n classStr +\n ' taskTextOutsideRight taskTextOutside' +\n secNum +\n ' ' +\n taskType +\n ' width-' +\n textWidth\n );\n }\n } else {\n return classStr + ' taskText taskText' + secNum + ' ' + taskType + ' width-' + textWidth;\n }\n });\n }\n\n function makeGrid(theSidePad, theTopPad, w, h) {\n let xAxis = axisBottom(timeScale)\n .tickSize(-h + theTopPad + conf.gridLineStartPadding)\n .tickFormat(timeFormat(parser.yy.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));\n\n svg\n .append('g')\n .attr('class', 'grid')\n .attr('transform', 'translate(' + theSidePad + ', ' + (h - 50) + ')')\n .call(xAxis)\n .selectAll('text')\n .style('text-anchor', 'middle')\n .attr('fill', '#000')\n .attr('stroke', 'none')\n .attr('font-size', 10)\n .attr('dy', '1em');\n }\n\n function vertLabels(theGap, theTopPad) {\n const numOccurances = [];\n let prevGap = 0;\n\n for (let i = 0; i < categories.length; i++) {\n numOccurances[i] = [categories[i], getCount(categories[i], catsUnfiltered)];\n }\n\n svg\n .append('g') // without doing this, impossible to put grid lines behind text\n .selectAll('text')\n .data(numOccurances)\n .enter()\n .append(function(d) {\n const rows = d[0].split(common.lineBreakRegex);\n const dy = -(rows.length - 1) / 2;\n\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('dy', dy + 'em');\n\n for (let j = 0; j < rows.length; j++) {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttribute('alignment-baseline', 'central');\n tspan.setAttribute('x', '10');\n if (j > 0) tspan.setAttribute('dy', '1em');\n tspan.textContent = rows[j];\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n })\n .attr('x', 10)\n .attr('y', function(d, i) {\n if (i > 0) {\n for (let j = 0; j < i; j++) {\n prevGap += numOccurances[i - 1][1];\n return (d[1] * theGap) / 2 + prevGap * theGap + theTopPad;\n }\n } else {\n return (d[1] * theGap) / 2 + theTopPad;\n }\n })\n .attr('class', function(d) {\n for (let i = 0; i < categories.length; i++) {\n if (d[0] === categories[i]) {\n return 'sectionTitle sectionTitle' + (i % conf.numberSectionStyles);\n }\n }\n return 'sectionTitle';\n });\n }\n\n function drawToday(theSidePad, theTopPad, w, h) {\n const todayMarker = ganttDb.getTodayMarker();\n if (todayMarker === 'off') {\n return;\n }\n\n const todayG = svg.append('g').attr('class', 'today');\n const today = new Date();\n const todayLine = todayG.append('line');\n\n todayLine\n .attr('x1', timeScale(today) + theSidePad)\n .attr('x2', timeScale(today) + theSidePad)\n .attr('y1', conf.titleTopMargin)\n .attr('y2', h - conf.titleTopMargin)\n .attr('class', 'today');\n\n if (todayMarker !== '') {\n todayLine.attr('style', todayMarker.replace(/,/g, ';'));\n }\n }\n\n // from this stackexchange question: http://stackoverflow.com/questions/1890203/unique-for-arrays-in-javascript\n function checkUnique(arr) {\n const hash = {};\n const result = [];\n for (let i = 0, l = arr.length; i < l; ++i) {\n if (!hash.hasOwnProperty(arr[i])) { // eslint-disable-line\n // it works with objects! in FF, at least\n hash[arr[i]] = true;\n result.push(arr[i]);\n }\n }\n return result;\n }\n\n // from this stackexchange question: http://stackoverflow.com/questions/14227981/count-how-many-strings-in-an-array-have-duplicates-in-the-same-array\n function getCounts(arr) {\n let i = arr.length; // const to loop over\n const obj = {}; // obj to store results\n while (i) {\n obj[arr[--i]] = (obj[arr[i]] || 0) + 1; // count occurrences\n }\n return obj;\n }\n\n // get specific from everything\n function getCount(word, arr) {\n return getCounts(arr)[word] || 0;\n }\n};\n\nexport default {\n setConf,\n draw\n};\n","/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,11,12,13,14,15,16,17,19,21],$V1=[1,9],$V2=[1,10],$V3=[1,11],$V4=[1,12],$V5=[1,13],$V6=[1,14],$V7=[1,15],$V8=[1,17],$V9=[1,18];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"gantt\":4,\"document\":5,\"EOF\":6,\"line\":7,\"SPACE\":8,\"statement\":9,\"NL\":10,\"dateFormat\":11,\"inclusiveEndDates\":12,\"axisFormat\":13,\"excludes\":14,\"todayMarker\":15,\"title\":16,\"section\":17,\"clickStatement\":18,\"taskTxt\":19,\"taskData\":20,\"click\":21,\"callbackname\":22,\"callbackargs\":23,\"href\":24,\"clickStatementDebug\":25,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"gantt\",6:\"EOF\",8:\"SPACE\",10:\"NL\",11:\"dateFormat\",12:\"inclusiveEndDates\",13:\"axisFormat\",14:\"excludes\",15:\"todayMarker\",16:\"title\",17:\"section\",19:\"taskTxt\",20:\"taskData\",21:\"click\",22:\"callbackname\",23:\"callbackargs\",24:\"href\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[18,2],[18,3],[18,3],[18,4],[18,3],[18,4],[18,2],[25,2],[25,3],[25,3],[25,4],[25,3],[25,4],[25,2]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return $$[$0-1]; \nbreak;\ncase 2:\n this.$ = [] \nbreak;\ncase 3:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 4: case 5:\n this.$ = $$[$0] \nbreak;\ncase 6: case 7:\n this.$=[];\nbreak;\ncase 8:\nyy.setDateFormat($$[$0].substr(11));this.$=$$[$0].substr(11);\nbreak;\ncase 9:\nyy.enableInclusiveEndDates();this.$=$$[$0].substr(18);\nbreak;\ncase 10:\nyy.setAxisFormat($$[$0].substr(11));this.$=$$[$0].substr(11);\nbreak;\ncase 11:\nyy.setExcludes($$[$0].substr(9));this.$=$$[$0].substr(9);\nbreak;\ncase 12:\nyy.setTodayMarker($$[$0].substr(12));this.$=$$[$0].substr(12);\nbreak;\ncase 13:\nyy.setTitle($$[$0].substr(6));this.$=$$[$0].substr(6);\nbreak;\ncase 14:\nyy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);\nbreak;\ncase 16:\nyy.addTask($$[$0-1],$$[$0]);this.$='task';\nbreak;\ncase 17:\nthis.$ = $$[$0-1];yy.setClickEvent($$[$0-1], $$[$0], null);\nbreak;\ncase 18:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 19:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], null);yy.setLink($$[$0-2],$$[$0]);\nbreak;\ncase 20:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setLink($$[$0-3],$$[$0]);\nbreak;\ncase 21:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0], null);yy.setLink($$[$0-2],$$[$0-1]);\nbreak;\ncase 22:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-1], $$[$0]);yy.setLink($$[$0-3],$$[$0-2]);\nbreak;\ncase 23:\nthis.$ = $$[$0-1];yy.setLink($$[$0-1], $$[$0]);\nbreak;\ncase 24: case 30:\nthis.$=$$[$0-1] + ' ' + $$[$0];\nbreak;\ncase 25: case 26: case 28:\nthis.$=$$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];\nbreak;\ncase 27: case 29:\nthis.$=$$[$0-3] + ' ' + $$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];\nbreak;\n}\n},\ntable: [{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,13:$V3,14:$V4,15:$V5,16:$V6,17:$V7,18:16,19:$V8,21:$V9},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:19,11:$V1,12:$V2,13:$V3,14:$V4,15:$V5,16:$V6,17:$V7,18:16,19:$V8,21:$V9},o($V0,[2,5]),o($V0,[2,6]),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]),o($V0,[2,15]),{20:[1,20]},{22:[1,21],24:[1,22]},o($V0,[2,4]),o($V0,[2,16]),o($V0,[2,17],{23:[1,23],24:[1,24]}),o($V0,[2,23],{22:[1,25]}),o($V0,[2,18],{24:[1,26]}),o($V0,[2,19]),o($V0,[2,21],{23:[1,27]}),o($V0,[2,20]),o($V0,[2,22])],\ndefaultActions: {},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// 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.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n 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(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 10;\nbreak;\ncase 1:/* skip whitespace */\nbreak;\ncase 2:/* skip comments */\nbreak;\ncase 3:/* skip comments */\nbreak;\ncase 4:this.begin(\"href\");\nbreak;\ncase 5:this.popState();\nbreak;\ncase 6:return 24;\nbreak;\ncase 7:this.begin(\"callbackname\");\nbreak;\ncase 8:this.popState();\nbreak;\ncase 9:this.popState(); this.begin(\"callbackargs\");\nbreak;\ncase 10:return 22;\nbreak;\ncase 11:this.popState();\nbreak;\ncase 12:return 23;\nbreak;\ncase 13:this.begin(\"click\");\nbreak;\ncase 14:this.popState();\nbreak;\ncase 15:return 21;\nbreak;\ncase 16:return 4;\nbreak;\ncase 17:return 11;\nbreak;\ncase 18:return 12;\nbreak;\ncase 19:return 13;\nbreak;\ncase 20:return 14;\nbreak;\ncase 21:return 15;\nbreak;\ncase 22:return 'date';\nbreak;\ncase 23:return 16;\nbreak;\ncase 24:return 17;\nbreak;\ncase 25:return 19;\nbreak;\ncase 26:return 20;\nbreak;\ncase 27:return ':';\nbreak;\ncase 28:return 6;\nbreak;\ncase 29:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:[\\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,/^(?:axisFormat\\s[^#\\n;]+)/i,/^(?:excludes\\s[^#\\n;]+)/i,/^(?:todayMarker\\s[^\\n;]+)/i,/^(?:\\d\\d\\d\\d-\\d\\d-\\d\\d\\b)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:section\\s[^#:\\n;]+)/i,/^(?:[^#:\\n;]+)/i,/^(?::[^#\\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"callbackargs\":{\"rules\":[11,12],\"inclusive\":false},\"callbackname\":{\"rules\":[8,9,10],\"inclusive\":false},\"href\":{\"rules\":[5,6],\"inclusive\":false},\"click\":{\"rules\":[14,15],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,7,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof require !== 'undefined' && typeof exports !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n if (!args[1]) {\n console.log('Usage: '+args[0]+' FILE');\n process.exit(1);\n }\n var source = require('fs').readFileSync(require('path').normalize(args[1]), \"utf8\");\n return exports.parser.parse(source);\n};\nif (typeof module !== 'undefined' && require.main === module) {\n exports.main(process.argv.slice(1));\n}\n}","const getStyles = options =>\n `\n .mermaid-main-font {\n font-family: \"trebuchet ms\", verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${options.sectionBkgColor};\n }\n\n .section2 {\n fill: ${options.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${options.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${options.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ${options.fontFamily};\n fill: ${options.textColor};\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${options.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n\n .taskText:not([font-size]) {\n font-size: 11px;\n }\n\n .taskTextOutsideRight {\n fill: ${options.taskTextDarkColor};\n text-anchor: start;\n font-size: 11px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ${options.taskTextDarkColor};\n text-anchor: end;\n font-size: 11px;\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ${options.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${options.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${options.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${options.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${options.taskBkgColor};\n stroke: ${options.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${options.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${options.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${options.activeTaskBkgColor};\n stroke: ${options.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${options.doneTaskBorderColor};\n fill: ${options.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${options.critBorderColor};\n fill: ${options.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${options.critBorderColor};\n fill: ${options.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${options.critBorderColor};\n fill: ${options.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.taskTextDarkColor} ;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n`;\n\nexport default getStyles;\n","import { logger } from '../../logger';\nimport { random } from '../../utils';\nlet commits = {};\nlet head = null;\nlet branches = { master: head };\nlet curBranch = 'master';\nlet direction = 'LR';\nlet seq = 0;\n\nfunction getId() {\n return random({ length: 7 });\n}\n\nfunction isfastforwardable(currentCommit, otherCommit) {\n logger.debug('Entering isfastforwardable:', currentCommit.id, otherCommit.id);\n while (currentCommit.seq <= otherCommit.seq && currentCommit !== otherCommit) {\n // only if other branch has more commits\n if (otherCommit.parent == null) break;\n if (Array.isArray(otherCommit.parent)) {\n logger.debug('In merge commit:', otherCommit.parent);\n return (\n isfastforwardable(currentCommit, commits[otherCommit.parent[0]]) ||\n isfastforwardable(currentCommit, commits[otherCommit.parent[1]])\n );\n } else {\n otherCommit = commits[otherCommit.parent];\n }\n }\n logger.debug(currentCommit.id, otherCommit.id);\n return currentCommit.id === otherCommit.id;\n}\n\nfunction isReachableFrom(currentCommit, otherCommit) {\n const currentSeq = currentCommit.seq;\n const otherSeq = otherCommit.seq;\n if (currentSeq > otherSeq) return isfastforwardable(otherCommit, currentCommit);\n return false;\n}\n\nfunction uniqBy(list, fn) {\n const recordMap = Object.create(null);\n return list.reduce((out, item) => {\n const key = fn(item);\n if (!recordMap[key]) {\n recordMap[key] = true;\n out.push(item);\n }\n return out;\n }, []);\n}\n\nexport const setDirection = function(dir) {\n direction = dir;\n};\nlet options = {};\nexport const setOptions = function(rawOptString) {\n logger.debug('options str', rawOptString);\n rawOptString = rawOptString && rawOptString.trim();\n rawOptString = rawOptString || '{}';\n try {\n options = JSON.parse(rawOptString);\n } catch (e) {\n logger.error('error while parsing gitGraph options', e.message);\n }\n};\n\nexport const getOptions = function() {\n return options;\n};\n\nexport const commit = function(msg) {\n const commit = {\n id: getId(),\n message: msg,\n seq: seq++,\n parent: head == null ? null : head.id\n };\n head = commit;\n commits[commit.id] = commit;\n branches[curBranch] = commit.id;\n logger.debug('in pushCommit ' + commit.id);\n};\n\nexport const branch = function(name) {\n branches[name] = head != null ? head.id : null;\n logger.debug('in createBranch');\n};\n\nexport const merge = function(otherBranch) {\n const currentCommit = commits[branches[curBranch]];\n const otherCommit = commits[branches[otherBranch]];\n if (isReachableFrom(currentCommit, otherCommit)) {\n logger.debug('Already merged');\n return;\n }\n if (isfastforwardable(currentCommit, otherCommit)) {\n branches[curBranch] = branches[otherBranch];\n head = commits[branches[curBranch]];\n } else {\n // create merge commit\n const commit = {\n id: getId(),\n message: 'merged branch ' + otherBranch + ' into ' + curBranch,\n seq: seq++,\n parent: [head == null ? null : head.id, branches[otherBranch]]\n };\n head = commit;\n commits[commit.id] = commit;\n branches[curBranch] = commit.id;\n }\n logger.debug(branches);\n logger.debug('in mergeBranch');\n};\n\nexport const checkout = function(branch) {\n logger.debug('in checkout');\n curBranch = branch;\n const id = branches[curBranch];\n head = commits[id];\n};\n\nexport const reset = function(commitRef) {\n logger.debug('in reset', commitRef);\n const ref = commitRef.split(':')[0];\n let parentCount = parseInt(commitRef.split(':')[1]);\n let commit = ref === 'HEAD' ? head : commits[branches[ref]];\n logger.debug(commit, parentCount);\n while (parentCount > 0) {\n commit = commits[commit.parent];\n parentCount--;\n if (!commit) {\n const err = 'Critical error - unique parent commit not found during reset';\n logger.error(err);\n throw err;\n }\n }\n head = commit;\n branches[curBranch] = commit.id;\n};\n\nfunction upsert(arr, key, newval) {\n const index = arr.indexOf(key);\n if (index === -1) {\n arr.push(newval);\n } else {\n arr.splice(index, 1, newval);\n }\n}\n\nfunction prettyPrintCommitHistory(commitArr) {\n const commit = commitArr.reduce((out, commit) => {\n if (out.seq > commit.seq) return out;\n return commit;\n }, commitArr[0]);\n let line = '';\n commitArr.forEach(function(c) {\n if (c === commit) {\n line += '\\t*';\n } else {\n line += '\\t|';\n }\n });\n const label = [line, commit.id, commit.seq];\n for (let branch in branches) {\n if (branches[branch] === commit.id) label.push(branch);\n }\n logger.debug(label.join(' '));\n if (Array.isArray(commit.parent)) {\n const newCommit = commits[commit.parent[0]];\n upsert(commitArr, commit, newCommit);\n commitArr.push(commits[commit.parent[1]]);\n } else if (commit.parent == null) {\n return;\n } else {\n const nextCommit = commits[commit.parent];\n upsert(commitArr, commit, nextCommit);\n }\n commitArr = uniqBy(commitArr, c => c.id);\n prettyPrintCommitHistory(commitArr);\n}\n\nexport const prettyPrint = function() {\n logger.debug(commits);\n const node = getCommitsArray()[0];\n prettyPrintCommitHistory([node]);\n};\n\nexport const clear = function() {\n commits = {};\n head = null;\n branches = { master: head };\n curBranch = 'master';\n seq = 0;\n};\n\nexport const getBranchesAsObjArray = function() {\n const branchArr = [];\n for (let branch in branches) {\n branchArr.push({ name: branch, commit: commits[branches[branch]] });\n }\n return branchArr;\n};\n\nexport const getBranches = function() {\n return branches;\n};\nexport const getCommits = function() {\n return commits;\n};\nexport const getCommitsArray = function() {\n const commitArr = Object.keys(commits).map(function(key) {\n return commits[key];\n });\n commitArr.forEach(function(o) {\n logger.debug(o.id);\n });\n commitArr.sort((a, b) => b.seq - a.seq);\n return commitArr;\n};\nexport const getCurrentBranch = function() {\n return curBranch;\n};\nexport const getDirection = function() {\n return direction;\n};\nexport const getHead = function() {\n return head;\n};\n\nexport default {\n setDirection,\n setOptions,\n getOptions,\n commit,\n branch,\n merge,\n checkout,\n reset,\n prettyPrint,\n clear,\n getBranchesAsObjArray,\n getBranches,\n getCommits,\n getCommitsArray,\n getCurrentBranch,\n getDirection,\n getHead\n};\n","import { curveBasis, line, select } from 'd3';\n\nimport db from './gitGraphAst';\nimport gitGraphParser from './parser/gitGraph';\nimport { logger } from '../../logger';\nimport { interpolateToCurve } from '../../utils';\n\nlet allCommitsDict = {};\nlet branchNum;\nlet config = {\n nodeSpacing: 150,\n nodeFillColor: 'yellow',\n nodeStrokeWidth: 2,\n nodeStrokeColor: 'grey',\n lineStrokeWidth: 4,\n branchOffset: 50,\n lineColor: 'grey',\n leftMargin: 50,\n branchColors: ['#442f74', '#983351', '#609732', '#AA9A39'],\n nodeRadius: 10,\n nodeLabel: {\n width: 75,\n height: 100,\n x: -25,\n y: 0\n }\n};\nlet apiConfig = {};\nexport const setConf = function(c) {\n apiConfig = c;\n};\n\nfunction svgCreateDefs(svg) {\n svg\n .append('defs')\n .append('g')\n .attr('id', 'def-commit')\n .append('circle')\n .attr('r', config.nodeRadius)\n .attr('cx', 0)\n .attr('cy', 0);\n svg\n .select('#def-commit')\n .append('foreignObject')\n .attr('width', config.nodeLabel.width)\n .attr('height', config.nodeLabel.height)\n .attr('x', config.nodeLabel.x)\n .attr('y', config.nodeLabel.y)\n .attr('class', 'node-label')\n .attr('requiredFeatures', 'http://www.w3.org/TR/SVG11/feature#Extensibility')\n .append('p')\n .html('');\n}\n\nfunction svgDrawLine(svg, points, colorIdx, interpolate) {\n const curve = interpolateToCurve(interpolate, curveBasis);\n const color = config.branchColors[colorIdx % config.branchColors.length];\n const lineGen = line()\n .x(function(d) {\n return Math.round(d.x);\n })\n .y(function(d) {\n return Math.round(d.y);\n })\n .curve(curve);\n\n svg\n .append('svg:path')\n .attr('d', lineGen(points))\n .style('stroke', color)\n .style('stroke-width', config.lineStrokeWidth)\n .style('fill', 'none');\n}\n\n// Pass in the element and its pre-transform coords\nfunction getElementCoords(element, coords) {\n coords = coords || element.node().getBBox();\n const ctm = element.node().getCTM();\n const xn = ctm.e + coords.x * ctm.a;\n const yn = ctm.f + coords.y * ctm.d;\n return {\n left: xn,\n top: yn,\n width: coords.width,\n height: coords.height\n };\n}\n\nfunction svgDrawLineForCommits(svg, fromId, toId, direction, color) {\n logger.debug('svgDrawLineForCommits: ', fromId, toId);\n const fromBbox = getElementCoords(svg.select('#node-' + fromId + ' circle'));\n const toBbox = getElementCoords(svg.select('#node-' + toId + ' circle'));\n switch (direction) {\n case 'LR':\n // (toBbox)\n // +--------\n // + (fromBbox)\n if (fromBbox.left - toBbox.left > config.nodeSpacing) {\n const lineStart = {\n x: fromBbox.left - config.nodeSpacing,\n y: toBbox.top + toBbox.height / 2\n };\n const lineEnd = { x: toBbox.left + toBbox.width, y: toBbox.top + toBbox.height / 2 };\n svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');\n svgDrawLine(\n svg,\n [\n { x: fromBbox.left, y: fromBbox.top + fromBbox.height / 2 },\n { x: fromBbox.left - config.nodeSpacing / 2, y: fromBbox.top + fromBbox.height / 2 },\n { x: fromBbox.left - config.nodeSpacing / 2, y: lineStart.y },\n lineStart\n ],\n color\n );\n } else {\n svgDrawLine(\n svg,\n [\n {\n x: fromBbox.left,\n y: fromBbox.top + fromBbox.height / 2\n },\n {\n x: fromBbox.left - config.nodeSpacing / 2,\n y: fromBbox.top + fromBbox.height / 2\n },\n {\n x: fromBbox.left - config.nodeSpacing / 2,\n y: toBbox.top + toBbox.height / 2\n },\n {\n x: toBbox.left + toBbox.width,\n y: toBbox.top + toBbox.height / 2\n }\n ],\n color\n );\n }\n break;\n case 'BT':\n // + (fromBbox)\n // |\n // |\n // + (toBbox)\n if (toBbox.top - fromBbox.top > config.nodeSpacing) {\n const lineStart = {\n x: toBbox.left + toBbox.width / 2,\n y: fromBbox.top + fromBbox.height + config.nodeSpacing\n };\n const lineEnd = { x: toBbox.left + toBbox.width / 2, y: toBbox.top };\n svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');\n svgDrawLine(\n svg,\n [\n { x: fromBbox.left + fromBbox.width / 2, y: fromBbox.top + fromBbox.height },\n {\n x: fromBbox.left + fromBbox.width / 2,\n y: fromBbox.top + fromBbox.height + config.nodeSpacing / 2\n },\n { x: toBbox.left + toBbox.width / 2, y: lineStart.y - config.nodeSpacing / 2 },\n lineStart\n ],\n color\n );\n } else {\n svgDrawLine(\n svg,\n [\n {\n x: fromBbox.left + fromBbox.width / 2,\n y: fromBbox.top + fromBbox.height\n },\n {\n x: fromBbox.left + fromBbox.width / 2,\n y: fromBbox.top + config.nodeSpacing / 2\n },\n {\n x: toBbox.left + toBbox.width / 2,\n y: toBbox.top - config.nodeSpacing / 2\n },\n {\n x: toBbox.left + toBbox.width / 2,\n y: toBbox.top\n }\n ],\n color\n );\n }\n break;\n }\n}\n\nfunction cloneNode(svg, selector) {\n return svg\n .select(selector)\n .node()\n .cloneNode(true);\n}\n\nfunction renderCommitHistory(svg, commitid, branches, direction) {\n let commit;\n const numCommits = Object.keys(allCommitsDict).length;\n if (typeof commitid === 'string') {\n do {\n commit = allCommitsDict[commitid];\n logger.debug('in renderCommitHistory', commit.id, commit.seq);\n if (svg.select('#node-' + commitid).size() > 0) {\n return;\n }\n svg\n .append(function() {\n return cloneNode(svg, '#def-commit');\n })\n .attr('class', 'commit')\n .attr('id', function() {\n return 'node-' + commit.id;\n })\n .attr('transform', function() {\n switch (direction) {\n case 'LR':\n return (\n 'translate(' +\n (commit.seq * config.nodeSpacing + config.leftMargin) +\n ', ' +\n branchNum * config.branchOffset +\n ')'\n );\n case 'BT':\n return (\n 'translate(' +\n (branchNum * config.branchOffset + config.leftMargin) +\n ', ' +\n (numCommits - commit.seq) * config.nodeSpacing +\n ')'\n );\n }\n })\n .attr('fill', config.nodeFillColor)\n .attr('stroke', config.nodeStrokeColor)\n .attr('stroke-width', config.nodeStrokeWidth);\n\n let branch;\n for (let branchName in branches) {\n if (branches[branchName].commit === commit) {\n branch = branches[branchName];\n break;\n }\n }\n if (branch) {\n logger.debug('found branch ', branch.name);\n svg\n .select('#node-' + commit.id + ' p')\n .append('xhtml:span')\n .attr('class', 'branch-label')\n .text(branch.name + ', ');\n }\n svg\n .select('#node-' + commit.id + ' p')\n .append('xhtml:span')\n .attr('class', 'commit-id')\n .text(commit.id);\n if (commit.message !== '' && direction === 'BT') {\n svg\n .select('#node-' + commit.id + ' p')\n .append('xhtml:span')\n .attr('class', 'commit-msg')\n .text(', ' + commit.message);\n }\n commitid = commit.parent;\n } while (commitid && allCommitsDict[commitid]);\n }\n\n if (Array.isArray(commitid)) {\n logger.debug('found merge commmit', commitid);\n renderCommitHistory(svg, commitid[0], branches, direction);\n branchNum++;\n renderCommitHistory(svg, commitid[1], branches, direction);\n branchNum--;\n }\n}\n\nfunction renderLines(svg, commit, direction, branchColor) {\n branchColor = branchColor || 0;\n while (commit.seq > 0 && !commit.lineDrawn) {\n if (typeof commit.parent === 'string') {\n svgDrawLineForCommits(svg, commit.id, commit.parent, direction, branchColor);\n commit.lineDrawn = true;\n commit = allCommitsDict[commit.parent];\n } else if (Array.isArray(commit.parent)) {\n svgDrawLineForCommits(svg, commit.id, commit.parent[0], direction, branchColor);\n svgDrawLineForCommits(svg, commit.id, commit.parent[1], direction, branchColor + 1);\n renderLines(svg, allCommitsDict[commit.parent[1]], direction, branchColor + 1);\n commit.lineDrawn = true;\n commit = allCommitsDict[commit.parent[0]];\n }\n }\n}\n\nexport const draw = function(txt, id, ver) {\n try {\n const parser = gitGraphParser.parser;\n parser.yy = db;\n parser.yy.clear();\n\n logger.debug('in gitgraph renderer', txt + '\\n', 'id:', id, ver);\n // Parse the graph definition\n parser.parse(txt + '\\n');\n\n config = Object.assign(config, apiConfig, db.getOptions());\n logger.debug('effective options', config);\n const direction = db.getDirection();\n allCommitsDict = db.getCommits();\n const branches = db.getBranchesAsObjArray();\n if (direction === 'BT') {\n config.nodeLabel.x = branches.length * config.branchOffset;\n config.nodeLabel.width = '100%';\n config.nodeLabel.y = -1 * 2 * config.nodeRadius;\n }\n const svg = select(`[id=\"${id}\"]`);\n svgCreateDefs(svg);\n branchNum = 1;\n for (let branch in branches) {\n const v = branches[branch];\n renderCommitHistory(svg, v.commit.id, branches, direction);\n renderLines(svg, v.commit, direction);\n branchNum++;\n }\n svg.attr('height', function() {\n if (direction === 'BT') return Object.keys(allCommitsDict).length * config.nodeSpacing;\n return (branches.length + 1) * config.branchOffset;\n });\n } catch (e) {\n logger.error('Error while rendering gitgraph');\n logger.error(e.message);\n }\n};\n\nexport default {\n setConf,\n draw\n};\n","/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[2,3],$V1=[1,7],$V2=[7,12,15,17,19,20,21],$V3=[7,11,12,15,17,19,20,21],$V4=[2,20],$V5=[1,32];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"GG\":4,\":\":5,\"document\":6,\"EOF\":7,\"DIR\":8,\"options\":9,\"body\":10,\"OPT\":11,\"NL\":12,\"line\":13,\"statement\":14,\"COMMIT\":15,\"commit_arg\":16,\"BRANCH\":17,\"ID\":18,\"CHECKOUT\":19,\"MERGE\":20,\"RESET\":21,\"reset_arg\":22,\"STR\":23,\"HEAD\":24,\"reset_parents\":25,\"CARET\":26,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"GG\",5:\":\",7:\"EOF\",8:\"DIR\",11:\"OPT\",12:\"NL\",15:\"COMMIT\",17:\"BRANCH\",18:\"ID\",19:\"CHECKOUT\",20:\"MERGE\",21:\"RESET\",23:\"STR\",24:\"HEAD\",26:\"CARET\"},\nproductions_: [0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return $$[$0-1]; \nbreak;\ncase 2:\nyy.setDirection($$[$0-3]); return $$[$0-1];\nbreak;\ncase 4:\n yy.setOptions($$[$0-1]); this.$ = $$[$0]\nbreak;\ncase 5:\n$$[$0-1] +=$$[$0]; this.$=$$[$0-1]\nbreak;\ncase 7:\nthis.$ = []\nbreak;\ncase 8:\n$$[$0-1].push($$[$0]); this.$=$$[$0-1];\nbreak;\ncase 9:\nthis.$ =$$[$0-1]\nbreak;\ncase 11:\nyy.commit($$[$0])\nbreak;\ncase 12:\nyy.branch($$[$0])\nbreak;\ncase 13:\nyy.checkout($$[$0])\nbreak;\ncase 14:\nyy.merge($$[$0])\nbreak;\ncase 15:\nyy.reset($$[$0])\nbreak;\ncase 16:\nthis.$ = \"\"\nbreak;\ncase 17:\nthis.$=$$[$0]\nbreak;\ncase 18:\nthis.$ = $$[$0-1]+ \":\" + $$[$0] \nbreak;\ncase 19:\nthis.$ = $$[$0-1]+ \":\" + yy.count; yy.count = 0\nbreak;\ncase 20:\nyy.count = 0\nbreak;\ncase 21:\n yy.count += 1 \nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:$V0,9:6,12:$V1},{5:[1,8]},{7:[1,9]},o($V2,[2,7],{10:10,11:[1,11]}),o($V3,[2,6]),{6:12,7:$V0,9:6,12:$V1},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},o($V3,[2,5]),{7:[1,21]},o($V2,[2,8]),{12:[1,22]},o($V2,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},o($V2,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:$V4,25:31,26:$V5},{12:$V4,25:33,26:$V5},{12:[2,18]},{12:$V4,25:34,26:$V5},{12:[2,19]},{12:[2,21]}],\ndefaultActions: {9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// 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.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n 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(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 12;\nbreak;\ncase 1:/* skip all whitespace */\nbreak;\ncase 2:/* skip comments */\nbreak;\ncase 3:/* skip comments */\nbreak;\ncase 4:return 4;\nbreak;\ncase 5:return 15;\nbreak;\ncase 6:return 17;\nbreak;\ncase 7:return 20;\nbreak;\ncase 8:return 21;\nbreak;\ncase 9:return 19;\nbreak;\ncase 10:return 8;\nbreak;\ncase 11:return 8;\nbreak;\ncase 12:return 5;\nbreak;\ncase 13:return 26\nbreak;\ncase 14:this.begin(\"options\");\nbreak;\ncase 15:this.popState();\nbreak;\ncase 16:return 11;\nbreak;\ncase 17:this.begin(\"string\");\nbreak;\ncase 18:this.popState();\nbreak;\ncase 19:return 23;\nbreak;\ncase 20:return 18;\nbreak;\ncase 21:return 7;\nbreak;\n}\n},\nrules: [/^(?:(\\r?\\n)+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:gitGraph\\b)/i,/^(?:commit\\b)/i,/^(?:branch\\b)/i,/^(?:merge\\b)/i,/^(?:reset\\b)/i,/^(?:checkout\\b)/i,/^(?:LR\\b)/i,/^(?:BT\\b)/i,/^(?::)/i,/^(?:\\^)/i,/^(?:options\\r?\\n)/i,/^(?:end\\r?\\n)/i,/^(?:[^\\n]+\\r?\\n)/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[a-zA-Z][-_\\.a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],\nconditions: {\"options\":{\"rules\":[15,16],\"inclusive\":false},\"string\":{\"rules\":[18,19],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof require !== 'undefined' && typeof exports !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n if (!args[1]) {\n console.log('Usage: '+args[0]+' FILE');\n process.exit(1);\n }\n var source = require('fs').readFileSync(require('path').normalize(args[1]), \"utf8\");\n return exports.parser.parse(source);\n};\nif (typeof module !== 'undefined' && require.main === module) {\n exports.main(process.argv.slice(1));\n}\n}","const getStyles = () =>\n `\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n`;\n\nexport default getStyles;\n","/**\n * Created by knut on 15-01-14.\n */\nimport { logger } from '../../logger';\n\nvar message = '';\nvar info = false;\n\nexport const setMessage = txt => {\n logger.debug('Setting message to: ' + txt);\n message = txt;\n};\n\nexport const getMessage = () => {\n return message;\n};\n\nexport const setInfo = inf => {\n info = inf;\n};\n\nexport const getInfo = () => {\n return info;\n};\n\n// export const parseError = (err, hash) => {\n// global.mermaidAPI.parseError(err, hash)\n// }\n\nexport default {\n setMessage,\n getMessage,\n setInfo,\n getInfo\n // parseError\n};\n","/**\n * Created by knut on 14-12-11.\n */\nimport { select } from 'd3';\nimport db from './infoDb';\nimport infoParser from './parser/info';\nimport { logger } from '../../logger';\n\nconst conf = {};\nexport const setConf = function(cnf) {\n const keys = Object.keys(cnf);\n\n keys.forEach(function(key) {\n conf[key] = cnf[key];\n });\n};\n\n/**\n * Draws a an info picture in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\nexport const draw = (txt, id, ver) => {\n try {\n const parser = infoParser.parser;\n parser.yy = db;\n logger.debug('Renering info diagram\\n' + txt);\n // Parse the graph definition\n parser.parse(txt);\n logger.debug('Parsed info diagram');\n // Fetch the default direction, use TD if none was found\n const svg = select('#' + id);\n\n const g = svg.append('g');\n\n g.append('text') // text label for the x axis\n .attr('x', 100)\n .attr('y', 40)\n .attr('class', 'version')\n .attr('font-size', '32px')\n .style('text-anchor', 'middle')\n .text('v ' + ver);\n\n svg.attr('height', 100);\n svg.attr('width', 400);\n // svg.attr('viewBox', '0 0 300 150');\n } catch (e) {\n logger.error('Error while rendering info diagram');\n logger.error(e.message);\n }\n};\n\nexport default {\n setConf,\n draw\n};\n","/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,9,10];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"info\":4,\"document\":5,\"EOF\":6,\"line\":7,\"statement\":8,\"NL\":9,\"showInfo\":10,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"info\",6:\"EOF\",9:\"NL\",10:\"showInfo\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return yy; \nbreak;\ncase 4:\n \nbreak;\ncase 6:\n yy.setInfo(true); \nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},o($V0,[2,3]),o($V0,[2,4]),o($V0,[2,5]),o($V0,[2,6])],\ndefaultActions: {4:[2,1]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// 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.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n 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(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\n\t// Pre-lexer code can go here\n\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 4 ;\nbreak;\ncase 1:return 9 ;\nbreak;\ncase 2:return 'space';\nbreak;\ncase 3:return 10;\nbreak;\ncase 4:return 6 ;\nbreak;\ncase 5:return 'TXT' ;\nbreak;\n}\n},\nrules: [/^(?:info\\b)/i,/^(?:[\\s\\n\\r]+)/i,/^(?:[\\s]+)/i,/^(?:showInfo\\b)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"INITIAL\":{\"rules\":[0,1,2,3,4,5],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof require !== 'undefined' && typeof exports !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n if (!args[1]) {\n console.log('Usage: '+args[0]+' FILE');\n process.exit(1);\n }\n var source = require('fs').readFileSync(require('path').normalize(args[1]), \"utf8\");\n return exports.parser.parse(source);\n};\nif (typeof module !== 'undefined' && require.main === module) {\n exports.main(process.argv.slice(1));\n}\n}","const getStyles = () => ``;\n\nexport default getStyles;\n","/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,9,10,12];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"pie\":4,\"document\":5,\"EOF\":6,\"line\":7,\"statement\":8,\"NL\":9,\"STR\":10,\"VALUE\":11,\"title\":12,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"pie\",6:\"EOF\",9:\"NL\",10:\"STR\",11:\"VALUE\",12:\"title\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,2],[8,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 4:\n \nbreak;\ncase 6:\n\n\t\t/*console.log('str:'+$$[$0-1]+' value: '+$$[$0])*/\n\t\tyy.addSection($$[$0-1],yy.cleanupValue($$[$0])); \nbreak;\ncase 7:\nyy.setTitle($$[$0].substr(6));this.$=$$[$0].substr(6);\nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],12:[1,9]},{1:[2,1]},o($V0,[2,3]),o($V0,[2,4]),o($V0,[2,5]),{11:[1,10]},o($V0,[2,7]),o($V0,[2,6])],\ndefaultActions: {4:[2,1]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// 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.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n 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(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\n\t// Pre-lexer code can go here\n\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* do nothing */\nbreak;\ncase 1:/* skip whitespace */\nbreak;\ncase 2:return 4 ;\nbreak;\ncase 3:return 9 ;\nbreak;\ncase 4:return 'space';\nbreak;\ncase 5:return 12;\nbreak;\ncase 6:/*console.log('begin str');*/this.begin(\"string\");\nbreak;\ncase 7:/*console.log('pop-state');*/this.popState();\nbreak;\ncase 8:/*console.log('ending string')*/return \"STR\";\nbreak;\ncase 9:return \"VALUE\";\nbreak;\ncase 10:return 6 ;\nbreak;\n}\n},\nrules: [/^(?:%%[^\\n]*)/i,/^(?:\\s+)/i,/^(?:pie\\b)/i,/^(?:[\\s\\n\\r]+)/i,/^(?:[\\s]+)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?::[\\s]*[\\d]+(?:\\.[\\d]+)?)/i,/^(?:$)/i],\nconditions: {\"string\":{\"rules\":[7,8],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,9,10],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof require !== 'undefined' && typeof exports !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n if (!args[1]) {\n console.log('Usage: '+args[0]+' FILE');\n process.exit(1);\n }\n var source = require('fs').readFileSync(require('path').normalize(args[1]), \"utf8\");\n return exports.parser.parse(source);\n};\nif (typeof module !== 'undefined' && require.main === module) {\n exports.main(process.argv.slice(1));\n}\n}","/**\n *\n */\nimport { logger } from '../../logger';\n\nlet sections = {};\nlet title = '';\n\nconst addSection = function(id, value) {\n if (typeof sections[id] === 'undefined') {\n sections[id] = value;\n logger.debug('Added new section :', id);\n }\n};\nconst getSections = () => sections;\n\nconst setTitle = function(txt) {\n title = txt;\n};\n\nconst getTitle = function() {\n return title;\n};\nconst cleanupValue = function(value) {\n if (value.substring(0, 1) === ':') {\n value = value.substring(1).trim();\n return Number(value.trim());\n } else {\n return Number(value.trim());\n }\n};\n\nconst clear = function() {\n sections = {};\n title = '';\n};\n// export const parseError = (err, hash) => {\n// global.mermaidAPI.parseError(err, hash)\n// }\n\nexport default {\n addSection,\n getSections,\n cleanupValue,\n clear,\n setTitle,\n getTitle\n // parseError\n};\n","/**\n * Created by AshishJ on 11-09-2019.\n */\nimport { select, scaleOrdinal, schemeSet2, pie as d3pie, entries, arc } from 'd3';\nimport pieData from './pieDb';\nimport pieParser from './parser/pie';\nimport { logger } from '../../logger';\n\nconst conf = {};\nexport const setConf = function(cnf) {\n const keys = Object.keys(cnf);\n\n keys.forEach(function(key) {\n conf[key] = cnf[key];\n });\n};\n\n/**\n * Draws a Pie Chart with the data given in text.\n * @param text\n * @param id\n */\nlet w;\nexport const draw = (txt, id) => {\n try {\n const parser = pieParser.parser;\n parser.yy = pieData;\n logger.debug('Rendering info diagram\\n' + txt);\n // Parse the Pie Chart definition\n parser.yy.clear();\n parser.parse(txt);\n logger.debug('Parsed info diagram');\n const elem = document.getElementById(id);\n w = elem.parentElement.offsetWidth;\n\n if (typeof w === 'undefined') {\n w = 1200;\n }\n\n if (typeof conf.useWidth !== 'undefined') {\n w = conf.useWidth;\n }\n const h = 450;\n elem.setAttribute('height', '100%');\n // Set viewBox\n elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);\n\n // Fetch the default direction, use TD if none was found\n\n var width = w; // 450\n var height = 450;\n var margin = 40;\n var legendRectSize = 18;\n var legendSpacing = 4;\n\n var radius = Math.min(width, height) / 2 - margin;\n\n var svg = select('#' + id)\n .append('svg')\n .attr('width', width)\n .attr('height', height)\n .append('g')\n .attr('transform', 'translate(' + width / 2 + ',' + height / 2 + ')');\n\n var data = pieData.getSections();\n var sum = 0;\n Object.keys(data).forEach(function(key) {\n sum += data[key];\n });\n logger.info(data);\n\n // set the color scale\n var color = scaleOrdinal()\n .domain(data)\n .range(schemeSet2);\n\n // Compute the position of each group on the pie:\n var pie = d3pie().value(function(d) {\n return d.value;\n });\n var dataReady = pie(entries(data));\n\n // shape helper to build arcs:\n var arcGenerator = arc()\n .innerRadius(0)\n .outerRadius(radius);\n\n // Build the pie chart: Basically, each part of the pie is a path that we build using the arc function.\n svg\n .selectAll('mySlices')\n .data(dataReady)\n .enter()\n .append('path')\n .attr('d', arcGenerator)\n .attr('fill', function(d) {\n return color(d.data.key);\n })\n .attr('stroke', 'black')\n .style('stroke-width', '2px')\n .style('opacity', 0.7);\n\n // Now add the Percentage. Use the centroid method to get the best coordinates\n svg\n .selectAll('mySlices')\n .data(dataReady)\n .enter()\n .append('text')\n .text(function(d) {\n return ((d.data.value / sum) * 100).toFixed(0) + '%';\n })\n .attr('transform', function(d) {\n return 'translate(' + arcGenerator.centroid(d) + ')';\n })\n .style('text-anchor', 'middle')\n .attr('class', 'slice')\n .style('font-size', 17);\n\n svg\n .append('text')\n .text(parser.yy.getTitle())\n .attr('x', 0)\n .attr('y', -(h - 50) / 2)\n .attr('class', 'pieTitleText');\n\n //Add the slegend/annotations for each section\n var legend = svg\n .selectAll('.legend')\n .data(color.domain())\n .enter()\n .append('g')\n .attr('class', 'legend')\n .attr('transform', function(d, i) {\n var height = legendRectSize + legendSpacing;\n var offset = (height * color.domain().length) / 2;\n var horz = 12 * legendRectSize;\n var vert = i * height - offset;\n return 'translate(' + horz + ',' + vert + ')';\n });\n\n legend\n .append('rect')\n .attr('width', legendRectSize)\n .attr('height', legendRectSize)\n .style('fill', color)\n .style('stroke', color);\n\n legend\n .append('text')\n .attr('x', legendRectSize + legendSpacing)\n .attr('y', legendRectSize - legendSpacing)\n .text(function(d) {\n return d;\n });\n } catch (e) {\n logger.error('Error while rendering info diagram');\n logger.error(e.message);\n }\n};\n\nexport default {\n setConf,\n draw\n};\n","const getStyles = options =>\n `.pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: ${options.taskTextDarkColor};\n font-family: ${options.fontFamily};\n }\n .slice {\n font-family: ${options.fontFamily};\n fill: ${options.textColor};\n // fill: white;\n }\n .legend text {\n fill: ${options.taskTextDarkColor};\n font-family: ${options.fontFamily};\n font-size: 17px;\n }\n`;\n\nexport default getStyles;\n","/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,5],$V3=[1,7],$V4=[2,5],$V5=[1,15],$V6=[1,17],$V7=[1,18],$V8=[1,20],$V9=[1,21],$Va=[1,22],$Vb=[1,24],$Vc=[1,25],$Vd=[1,26],$Ve=[1,27],$Vf=[1,28],$Vg=[1,29],$Vh=[1,32],$Vi=[1,33],$Vj=[1,36],$Vk=[1,4,5,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,56],$Vl=[1,44],$Vm=[4,5,16,21,22,23,25,27,28,29,30,31,33,37,48,56],$Vn=[4,5,16,21,22,23,25,27,28,29,30,31,33,36,37,48,56],$Vo=[4,5,16,21,22,23,25,27,28,29,30,31,33,35,37,48,56],$Vp=[46,47,48],$Vq=[1,4,5,7,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,56];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"SPACE\":4,\"NL\":5,\"directive\":6,\"SD\":7,\"document\":8,\"line\":9,\"statement\":10,\"openDirective\":11,\"typeDirective\":12,\"closeDirective\":13,\":\":14,\"argDirective\":15,\"participant\":16,\"actor\":17,\"AS\":18,\"restOfLine\":19,\"signal\":20,\"autonumber\":21,\"activate\":22,\"deactivate\":23,\"note_statement\":24,\"title\":25,\"text2\":26,\"loop\":27,\"end\":28,\"rect\":29,\"opt\":30,\"alt\":31,\"else_sections\":32,\"par\":33,\"par_sections\":34,\"and\":35,\"else\":36,\"note\":37,\"placement\":38,\"over\":39,\"actor_pair\":40,\"spaceList\":41,\",\":42,\"left_of\":43,\"right_of\":44,\"signaltype\":45,\"+\":46,\"-\":47,\"ACTOR\":48,\"SOLID_OPEN_ARROW\":49,\"DOTTED_OPEN_ARROW\":50,\"SOLID_ARROW\":51,\"DOTTED_ARROW\":52,\"SOLID_CROSS\":53,\"DOTTED_CROSS\":54,\"TXT\":55,\"open_directive\":56,\"type_directive\":57,\"arg_directive\":58,\"close_directive\":59,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"SPACE\",5:\"NL\",7:\"SD\",14:\":\",16:\"participant\",18:\"AS\",19:\"restOfLine\",21:\"autonumber\",22:\"activate\",23:\"deactivate\",25:\"title\",27:\"loop\",28:\"end\",29:\"rect\",30:\"opt\",31:\"alt\",33:\"par\",35:\"and\",36:\"else\",37:\"note\",39:\"over\",42:\",\",43:\"left_of\",44:\"right_of\",46:\"+\",47:\"-\",48:\"ACTOR\",49:\"SOLID_OPEN_ARROW\",50:\"DOTTED_OPEN_ARROW\",51:\"SOLID_ARROW\",52:\"DOTTED_ARROW\",53:\"SOLID_CROSS\",54:\"DOTTED_CROSS\",55:\"TXT\",56:\"open_directive\",57:\"type_directive\",58:\"arg_directive\",59:\"close_directive\"},\nproductions_: [0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,2],[10,1],[10,3],[10,3],[10,2],[10,3],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[34,1],[34,4],[32,1],[32,4],[24,4],[24,4],[41,2],[41,1],[40,3],[40,1],[38,1],[38,1],[20,5],[20,5],[20,4],[17,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[26,1],[11,1],[12,1],[15,1],[13,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 4:\n yy.apply($$[$0]);return $$[$0]; \nbreak;\ncase 5:\n this.$ = [] \nbreak;\ncase 6:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 7: case 8:\n this.$ = $$[$0] \nbreak;\ncase 9:\n this.$=[]; \nbreak;\ncase 12:\n$$[$0-3].description=yy.parseMessage($$[$0-1]); this.$=$$[$0-3];\nbreak;\ncase 13:\nthis.$=$$[$0-1];\nbreak;\ncase 15:\nyy.enableSequenceNumbers()\nbreak;\ncase 16:\nthis.$={type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]};\nbreak;\ncase 17:\nthis.$={type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-1]};\nbreak;\ncase 19:\nthis.$=[{type:'setTitle', text:$$[$0-1]}]\nbreak;\ncase 20:\n\n\t\t$$[$0-1].unshift({type: 'loopStart', loopText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.LOOP_START});\n\t\t$$[$0-1].push({type: 'loopEnd', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 21:\n\n\t\t$$[$0-1].unshift({type: 'rectStart', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_START });\n\t\t$$[$0-1].push({type: 'rectEnd', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_END });\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 22:\n\n\t\t$$[$0-1].unshift({type: 'optStart', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_START});\n\t\t$$[$0-1].push({type: 'optEnd', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 23:\n\n\t\t// Alt start\n\t\t$$[$0-1].unshift({type: 'altStart', altText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.ALT_START});\n\t\t// Content in alt is already in $$[$0-1]\n\t\t// End\n\t\t$$[$0-1].push({type: 'altEnd', signalType: yy.LINETYPE.ALT_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 24:\n\n\t\t// Parallel start\n\t\t$$[$0-1].unshift({type: 'parStart', parText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.PAR_START});\n\t\t// Content in par is already in $$[$0-1]\n\t\t// End\n\t\t$$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 27:\n this.$ = $$[$0-3].concat([{type: 'and', parText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.PAR_AND}, $$[$0]]); \nbreak;\ncase 29:\n this.$ = $$[$0-3].concat([{type: 'else', altText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.ALT_ELSE}, $$[$0]]); \nbreak;\ncase 30:\n\n\t\tthis.$ = [$$[$0-1], {type:'addNote', placement:$$[$0-2], actor:$$[$0-1].actor, text:$$[$0]}];\nbreak;\ncase 31:\n\n\t\t// Coerce actor_pair into a [to, from, ...] array\n\t\t$$[$0-2] = [].concat($$[$0-1], $$[$0-1]).slice(0, 2);\n\t\t$$[$0-2][0] = $$[$0-2][0].actor;\n\t\t$$[$0-2][1] = $$[$0-2][1].actor;\n\t\tthis.$ = [$$[$0-1], {type:'addNote', placement:yy.PLACEMENT.OVER, actor:$$[$0-2].slice(0, 2), text:$$[$0]}];\nbreak;\ncase 34:\n this.$ = [$$[$0-2], $$[$0]]; \nbreak;\ncase 35:\n this.$ = $$[$0]; \nbreak;\ncase 36:\n this.$ = yy.PLACEMENT.LEFTOF; \nbreak;\ncase 37:\n this.$ = yy.PLACEMENT.RIGHTOF; \nbreak;\ncase 38:\n this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]},\n\t {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]}\n\t ]\nbreak;\ncase 39:\n this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]},\n\t {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-4]}\n\t ]\nbreak;\ncase 40:\n this.$ = [$$[$0-3],$$[$0-1],{type: 'addMessage', from:$$[$0-3].actor, to:$$[$0-1].actor, signalType:$$[$0-2], msg:$$[$0]}]\nbreak;\ncase 41:\nthis.$={type: 'addActor', actor:$$[$0]}\nbreak;\ncase 42:\n this.$ = yy.LINETYPE.SOLID_OPEN; \nbreak;\ncase 43:\n this.$ = yy.LINETYPE.DOTTED_OPEN; \nbreak;\ncase 44:\n this.$ = yy.LINETYPE.SOLID; \nbreak;\ncase 45:\n this.$ = yy.LINETYPE.DOTTED; \nbreak;\ncase 46:\n this.$ = yy.LINETYPE.SOLID_CROSS; \nbreak;\ncase 47:\n this.$ = yy.LINETYPE.DOTTED_CROSS; \nbreak;\ncase 48:\nthis.$ = yy.parseMessage($$[$0].trim().substring(1)) \nbreak;\ncase 49:\n yy.parseDirective('%%{', 'open_directive'); \nbreak;\ncase 50:\n yy.parseDirective($$[$0], 'type_directive'); \nbreak;\ncase 51:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"'); yy.parseDirective($$[$0], 'arg_directive'); \nbreak;\ncase 52:\n yy.parseDirective('}%%', 'close_directive', 'sequence'); \nbreak;\n}\n},\ntable: [{3:1,4:$V0,5:$V1,6:4,7:$V2,11:6,56:$V3},{1:[3]},{3:8,4:$V0,5:$V1,6:4,7:$V2,11:6,56:$V3},{3:9,4:$V0,5:$V1,6:4,7:$V2,11:6,56:$V3},{3:10,4:$V0,5:$V1,6:4,7:$V2,11:6,56:$V3},o([1,4,5,16,21,22,23,25,27,29,30,31,33,37,48,56],$V4,{8:11}),{12:12,57:[1,13]},{57:[2,49]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,56:$V3},{13:34,14:[1,35],59:$Vj},o([14,59],[2,50]),o($Vk,[2,6]),{6:30,10:37,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,56:$V3},o($Vk,[2,8]),o($Vk,[2,9]),{17:38,48:$Vi},{5:[1,39]},o($Vk,[2,15]),{17:40,48:$Vi},{17:41,48:$Vi},{5:[1,42]},{26:43,55:$Vl},{19:[1,45]},{19:[1,46]},{19:[1,47]},{19:[1,48]},{19:[1,49]},o($Vk,[2,25]),{45:50,49:[1,51],50:[1,52],51:[1,53],52:[1,54],53:[1,55],54:[1,56]},{38:57,39:[1,58],43:[1,59],44:[1,60]},o([5,18,42,49,50,51,52,53,54,55],[2,41]),{5:[1,61]},{15:62,58:[1,63]},{5:[2,52]},o($Vk,[2,7]),{5:[1,65],18:[1,64]},o($Vk,[2,14]),{5:[1,66]},{5:[1,67]},o($Vk,[2,18]),{5:[1,68]},{5:[2,48]},o($Vm,$V4,{8:69}),o($Vm,$V4,{8:70}),o($Vm,$V4,{8:71}),o($Vn,$V4,{32:72,8:73}),o($Vo,$V4,{34:74,8:75}),{17:78,46:[1,76],47:[1,77],48:$Vi},o($Vp,[2,42]),o($Vp,[2,43]),o($Vp,[2,44]),o($Vp,[2,45]),o($Vp,[2,46]),o($Vp,[2,47]),{17:79,48:$Vi},{17:81,40:80,48:$Vi},{48:[2,36]},{48:[2,37]},o($Vq,[2,10]),{13:82,59:$Vj},{59:[2,51]},{19:[1,83]},o($Vk,[2,13]),o($Vk,[2,16]),o($Vk,[2,17]),o($Vk,[2,19]),{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[1,84],29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,56:$V3},{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[1,85],29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,56:$V3},{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[1,86],29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,56:$V3},{28:[1,87]},{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[2,28],29:$Vd,30:$Ve,31:$Vf,33:$Vg,36:[1,88],37:$Vh,48:$Vi,56:$V3},{28:[1,89]},{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[2,26],29:$Vd,30:$Ve,31:$Vf,33:$Vg,35:[1,90],37:$Vh,48:$Vi,56:$V3},{17:91,48:$Vi},{17:92,48:$Vi},{26:93,55:$Vl},{26:94,55:$Vl},{26:95,55:$Vl},{42:[1,96],55:[2,35]},{5:[1,97]},{5:[1,98]},o($Vk,[2,20]),o($Vk,[2,21]),o($Vk,[2,22]),o($Vk,[2,23]),{19:[1,99]},o($Vk,[2,24]),{19:[1,100]},{26:101,55:$Vl},{26:102,55:$Vl},{5:[2,40]},{5:[2,30]},{5:[2,31]},{17:103,48:$Vi},o($Vq,[2,11]),o($Vk,[2,12]),o($Vn,$V4,{8:73,32:104}),o($Vo,$V4,{8:75,34:105}),{5:[2,38]},{5:[2,39]},{55:[2,34]},{28:[2,29]},{28:[2,27]}],\ndefaultActions: {7:[2,49],8:[2,1],9:[2,2],10:[2,3],36:[2,52],44:[2,48],59:[2,36],60:[2,37],63:[2,51],93:[2,40],94:[2,30],95:[2,31],101:[2,38],102:[2,39],103:[2,34],104:[2,29],105:[2,27]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// 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.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n 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(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin('OPEN_DIRECTIVE'); return 56; \nbreak;\ncase 1: this.begin('TYPE_DIRECTIVE'); return 57; \nbreak;\ncase 2: this.popState(); this.begin('ARG_DIRECTIVE'); return 14; \nbreak;\ncase 3: this.popState(); this.popState(); return 59; \nbreak;\ncase 4:return 58;\nbreak;\ncase 5:return 5;\nbreak;\ncase 6:/* skip all whitespace */\nbreak;\ncase 7:/* skip same-line whitespace */\nbreak;\ncase 8:/* skip comments */\nbreak;\ncase 9:/* skip comments */\nbreak;\ncase 10:/* skip comments */\nbreak;\ncase 11: this.begin('ID'); return 16; \nbreak;\ncase 12: yy_.yytext = yy_.yytext.trim(); this.begin('ALIAS'); return 48; \nbreak;\ncase 13: this.popState(); this.popState(); this.begin('LINE'); return 18; \nbreak;\ncase 14: this.popState(); this.popState(); return 5; \nbreak;\ncase 15: this.begin('LINE'); return 27; \nbreak;\ncase 16: this.begin('LINE'); return 29; \nbreak;\ncase 17: this.begin('LINE'); return 30; \nbreak;\ncase 18: this.begin('LINE'); return 31; \nbreak;\ncase 19: this.begin('LINE'); return 36; \nbreak;\ncase 20: this.begin('LINE'); return 33; \nbreak;\ncase 21: this.begin('LINE'); return 35; \nbreak;\ncase 22: this.popState(); return 19; \nbreak;\ncase 23:return 28;\nbreak;\ncase 24:return 43;\nbreak;\ncase 25:return 44;\nbreak;\ncase 26:return 39;\nbreak;\ncase 27:return 37;\nbreak;\ncase 28: this.begin('ID'); return 22; \nbreak;\ncase 29: this.begin('ID'); return 23; \nbreak;\ncase 30:return 25;\nbreak;\ncase 31:return 7;\nbreak;\ncase 32:return 21;\nbreak;\ncase 33:return 42;\nbreak;\ncase 34:return 5;\nbreak;\ncase 35: yy_.yytext = yy_.yytext.trim(); return 48; \nbreak;\ncase 36:return 51;\nbreak;\ncase 37:return 52;\nbreak;\ncase 38:return 49;\nbreak;\ncase 39:return 50;\nbreak;\ncase 40:return 53;\nbreak;\ncase 41:return 54;\nbreak;\ncase 42:return 55;\nbreak;\ncase 43:return 46;\nbreak;\ncase 44:return 47;\nbreak;\ncase 45:return 5;\nbreak;\ncase 46:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:%%\\{)/i,/^(?:((?:(?!\\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\\}%%)/i,/^(?:((?:(?!\\}%%).|\\n)*))/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:((?!\\n)\\s)+)/i,/^(?:#[^\\n]*)/i,/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:participant\\b)/i,/^(?:[^\\->:\\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,/^(?:and\\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\\n;]*)/i,/^(?:end\\b)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:over\\b)/i,/^(?:note\\b)/i,/^(?:activate\\b)/i,/^(?:deactivate\\b)/i,/^(?:title\\b)/i,/^(?:sequenceDiagram\\b)/i,/^(?:autonumber\\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\\+\\->:\\n,;]+)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::(?:(?:no)?wrap)?[^#\\n;]+)/i,/^(?:\\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"LINE\":{\"rules\":[7,8,22],\"inclusive\":false},\"ARG_DIRECTIVE\":{\"rules\":[3,4,8],\"inclusive\":false},\"TYPE_DIRECTIVE\":{\"rules\":[2,3,8],\"inclusive\":false},\"OPEN_DIRECTIVE\":{\"rules\":[1,8],\"inclusive\":false},\"ALIAS\":{\"rules\":[7,8,13,14],\"inclusive\":false},\"ID\":{\"rules\":[7,8,12],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,5,6,8,9,10,11,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof require !== 'undefined' && typeof exports !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n if (!args[1]) {\n console.log('Usage: '+args[0]+' FILE');\n process.exit(1);\n }\n var source = require('fs').readFileSync(require('path').normalize(args[1]), \"utf8\");\n return exports.parser.parse(source);\n};\nif (typeof module !== 'undefined' && require.main === module) {\n exports.main(process.argv.slice(1));\n}\n}","import mermaidAPI from '../../mermaidAPI';\nimport configApi from '../../config';\nimport common from '../common/common';\nimport { logger } from '../../logger';\n\nlet prevActor = undefined;\nlet actors = {};\nlet messages = [];\nconst notes = [];\nlet title = '';\nlet titleWrapped = false;\nlet sequenceNumbersEnabled = false;\nlet wrapEnabled = false;\n\nexport const parseDirective = function(statement, context, type) {\n mermaidAPI.parseDirective(statement, context, type);\n};\n\nexport const addActor = function(id, name, description) {\n // Don't allow description nulling\n const old = actors[id];\n if (old && name === old.name && description == null) return;\n\n // Don't allow null descriptions, either\n if (description == null || description.text == null) {\n description = { text: name, wrap: null };\n }\n\n actors[id] = {\n name: name,\n description: description.text,\n wrap: (description.wrap === undefined && autoWrap()) || !!description.wrap,\n prevActor: prevActor\n };\n if (prevActor && actors[prevActor]) {\n actors[prevActor].nextActor = id;\n }\n\n prevActor = id;\n};\n\nconst activationCount = part => {\n let i;\n let count = 0;\n for (i = 0; i < messages.length; i++) {\n // console.warn(i, messages[i]);\n if (messages[i].type === LINETYPE.ACTIVE_START) {\n if (messages[i].from.actor === part) {\n count++;\n }\n }\n if (messages[i].type === LINETYPE.ACTIVE_END) {\n if (messages[i].from.actor === part) {\n count--;\n }\n }\n }\n return count;\n};\n\nexport const addMessage = function(idFrom, idTo, message, answer) {\n messages.push({\n from: idFrom,\n to: idTo,\n message: message.text,\n wrap: (message.wrap === undefined && autoWrap()) || !!message.wrap,\n answer: answer\n });\n};\n\nexport const addSignal = function(\n idFrom,\n idTo,\n message = { text: undefined, wrap: undefined },\n messageType\n) {\n if (messageType === LINETYPE.ACTIVE_END) {\n const cnt = activationCount(idFrom.actor);\n if (cnt < 1) {\n // Bail out as there is an activation signal from an inactive participant\n let error = new Error('Trying to inactivate an inactive participant (' + idFrom.actor + ')');\n error.hash = {\n text: '->>-',\n token: '->>-',\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: [\"'ACTIVE_PARTICIPANT'\"]\n };\n throw error;\n }\n }\n messages.push({\n from: idFrom,\n to: idTo,\n message: message.text,\n wrap: (message.wrap === undefined && autoWrap()) || !!message.wrap,\n type: messageType\n });\n return true;\n};\n\nexport const getMessages = function() {\n return messages;\n};\n\nexport const getActors = function() {\n return actors;\n};\nexport const getActor = function(id) {\n return actors[id];\n};\nexport const getActorKeys = function() {\n return Object.keys(actors);\n};\nexport const getTitle = function() {\n return title;\n};\nexport const getTitleWrapped = function() {\n return titleWrapped;\n};\nexport const enableSequenceNumbers = function() {\n sequenceNumbersEnabled = true;\n};\nexport const showSequenceNumbers = () => sequenceNumbersEnabled;\n\nexport const setWrap = function(wrapSetting) {\n wrapEnabled = wrapSetting;\n};\n\nexport const autoWrap = () => wrapEnabled;\n\nexport const clear = function() {\n actors = {};\n messages = [];\n};\n\nexport const parseMessage = function(str) {\n const _str = str.trim();\n const message = {\n text: _str.replace(/^[:]?(?:no)?wrap:/, '').trim(),\n wrap:\n _str.match(/^[:]?(?:no)?wrap:/) === null\n ? common.hasBreaks(_str) || autoWrap()\n : _str.match(/^[:]?wrap:/) !== null\n ? true\n : _str.match(/^[:]?nowrap:/) !== null\n ? false\n : autoWrap()\n };\n logger.debug('parseMessage:', message);\n return message;\n};\n\nexport const LINETYPE = {\n SOLID: 0,\n DOTTED: 1,\n NOTE: 2,\n SOLID_CROSS: 3,\n DOTTED_CROSS: 4,\n SOLID_OPEN: 5,\n DOTTED_OPEN: 6,\n LOOP_START: 10,\n LOOP_END: 11,\n ALT_START: 12,\n ALT_ELSE: 13,\n ALT_END: 14,\n OPT_START: 15,\n OPT_END: 16,\n ACTIVE_START: 17,\n ACTIVE_END: 18,\n PAR_START: 19,\n PAR_AND: 20,\n PAR_END: 21,\n RECT_START: 22,\n RECT_END: 23\n};\n\nexport const ARROWTYPE = {\n FILLED: 0,\n OPEN: 1\n};\n\nexport const PLACEMENT = {\n LEFTOF: 0,\n RIGHTOF: 1,\n OVER: 2\n};\n\nexport const addNote = function(actor, placement, message) {\n const note = {\n actor: actor,\n placement: placement,\n message: message.text,\n wrap: (message.wrap === undefined && autoWrap()) || !!message.wrap\n };\n\n // Coerce actor into a [to, from, ...] array\n const actors = [].concat(actor, actor);\n\n notes.push(note);\n messages.push({\n from: actors[0],\n to: actors[1],\n message: message.text,\n wrap: (message.wrap === undefined && autoWrap()) || !!message.wrap,\n type: LINETYPE.NOTE,\n placement: placement\n });\n};\n\nexport const setTitle = function(titleWrap) {\n title = titleWrap.text;\n titleWrapped = (titleWrap.wrap === undefined && autoWrap()) || !!titleWrap.wrap;\n};\n\nexport const apply = function(param) {\n if (param instanceof Array) {\n param.forEach(function(item) {\n apply(item);\n });\n } else {\n switch (param.type) {\n case 'addActor':\n addActor(param.actor, param.actor, param.description);\n break;\n case 'activeStart':\n addSignal(param.actor, undefined, undefined, param.signalType);\n break;\n case 'activeEnd':\n addSignal(param.actor, undefined, undefined, param.signalType);\n break;\n case 'addNote':\n addNote(param.actor, param.placement, param.text);\n break;\n case 'addMessage':\n addSignal(param.from, param.to, param.msg, param.signalType);\n break;\n case 'loopStart':\n addSignal(undefined, undefined, param.loopText, param.signalType);\n break;\n case 'loopEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'rectStart':\n addSignal(undefined, undefined, param.color, param.signalType);\n break;\n case 'rectEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'optStart':\n addSignal(undefined, undefined, param.optText, param.signalType);\n break;\n case 'optEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'altStart':\n addSignal(undefined, undefined, param.altText, param.signalType);\n break;\n case 'else':\n addSignal(undefined, undefined, param.altText, param.signalType);\n break;\n case 'altEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'setTitle':\n setTitle(param.text);\n break;\n case 'parStart':\n addSignal(undefined, undefined, param.parText, param.signalType);\n break;\n case 'and':\n addSignal(undefined, undefined, param.parText, param.signalType);\n break;\n case 'parEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n }\n }\n};\n\nexport default {\n addActor,\n addMessage,\n addSignal,\n autoWrap,\n setWrap,\n enableSequenceNumbers,\n showSequenceNumbers,\n getMessages,\n getActors,\n getActor,\n getActorKeys,\n getTitle,\n parseDirective,\n getConfig: () => configApi.getConfig().sequence,\n getTitleWrapped,\n clear,\n parseMessage,\n LINETYPE,\n ARROWTYPE,\n PLACEMENT,\n addNote,\n setTitle,\n apply\n};\n","import { select, selectAll } from 'd3';\nimport svgDraw, { drawText } from './svgDraw';\nimport { logger } from '../../logger';\nimport { parser } from './parser/sequenceDiagram';\nimport common from '../common/common';\nimport sequenceDb from './sequenceDb';\nimport utils, { assignWithDepth } from '../../utils';\n\nparser.yy = sequenceDb;\n\nconst conf = {};\n\nexport const bounds = {\n data: {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined\n },\n verticalPos: 0,\n sequenceItems: [],\n activations: [],\n models: {\n getHeight: function() {\n return (\n Math.max.apply(\n null,\n this.actors.length === 0 ? [0] : this.actors.map(actor => actor.height || 0)\n ) +\n (this.loops.length === 0\n ? 0\n : this.loops.map(it => it.height || 0).reduce((acc, h) => acc + h)) +\n (this.messages.length === 0\n ? 0\n : this.messages.map(it => it.height || 0).reduce((acc, h) => acc + h)) +\n (this.notes.length === 0\n ? 0\n : this.notes.map(it => it.height || 0).reduce((acc, h) => acc + h))\n );\n },\n clear: function() {\n this.actors = [];\n this.loops = [];\n this.messages = [];\n this.notes = [];\n },\n addActor: function(actorModel) {\n this.actors.push(actorModel);\n },\n addLoop: function(loopModel) {\n this.loops.push(loopModel);\n },\n addMessage: function(msgModel) {\n this.messages.push(msgModel);\n },\n addNote: function(noteModel) {\n this.notes.push(noteModel);\n },\n lastActor: function() {\n return this.actors[this.actors.length - 1];\n },\n lastLoop: function() {\n return this.loops[this.loops.length - 1];\n },\n lastMessage: function() {\n return this.messages[this.messages.length - 1];\n },\n lastNote: function() {\n return this.notes[this.notes.length - 1];\n },\n actors: [],\n loops: [],\n messages: [],\n notes: []\n },\n init: function() {\n this.sequenceItems = [];\n this.activations = [];\n this.models.clear();\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined\n };\n this.verticalPos = 0;\n setConf(parser.yy.getConfig());\n },\n updateVal: function(obj, key, val, fun) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n },\n updateBounds: function(startx, starty, stopx, stopy) {\n const _self = this;\n let cnt = 0;\n function updateFn(type) {\n return function updateItemBounds(item) {\n cnt++;\n // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems\n const n = _self.sequenceItems.length - cnt + 1;\n\n _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n if (!(type === 'activation')) {\n _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);\n }\n };\n }\n\n this.sequenceItems.forEach(updateFn());\n this.activations.forEach(updateFn('activation'));\n },\n insert: function(startx, starty, stopx, stopy) {\n const _startx = Math.min(startx, stopx);\n const _stopx = Math.max(startx, stopx);\n const _starty = Math.min(starty, stopy);\n const _stopy = Math.max(starty, stopy);\n\n this.updateVal(bounds.data, 'startx', _startx, Math.min);\n this.updateVal(bounds.data, 'starty', _starty, Math.min);\n this.updateVal(bounds.data, 'stopx', _stopx, Math.max);\n this.updateVal(bounds.data, 'stopy', _stopy, Math.max);\n\n this.updateBounds(_startx, _starty, _stopx, _stopy);\n },\n newActivation: function(message, diagram, actors) {\n const actorRect = actors[message.from.actor];\n const stackedSize = actorActivations(message.from.actor).length || 0;\n const x = actorRect.x + actorRect.width / 2 + ((stackedSize - 1) * conf.activationWidth) / 2;\n this.activations.push({\n startx: x,\n starty: this.verticalPos + 2,\n stopx: x + conf.activationWidth,\n stopy: undefined,\n actor: message.from.actor,\n anchored: svgDraw.anchorElement(diagram)\n });\n },\n endActivation: function(message) {\n // find most recent activation for given actor\n const lastActorActivationIdx = this.activations\n .map(function(activation) {\n return activation.actor;\n })\n .lastIndexOf(message.from.actor);\n return this.activations.splice(lastActorActivationIdx, 1)[0];\n },\n createLoop: function(title = { message: undefined, wrap: false, width: undefined }, fill) {\n return {\n startx: undefined,\n starty: this.verticalPos,\n stopx: undefined,\n stopy: undefined,\n title: title.message,\n wrap: title.wrap,\n width: title.width,\n height: 0,\n fill: fill\n };\n },\n newLoop: function(title = { message: undefined, wrap: false, width: undefined }, fill) {\n this.sequenceItems.push(this.createLoop(title, fill));\n },\n endLoop: function() {\n return this.sequenceItems.pop();\n },\n addSectionToLoop: function(message) {\n const loop = this.sequenceItems.pop();\n loop.sections = loop.sections || [];\n loop.sectionTitles = loop.sectionTitles || [];\n loop.sections.push({ y: bounds.getVerticalPos(), height: 0 });\n loop.sectionTitles.push(message);\n this.sequenceItems.push(loop);\n },\n bumpVerticalPos: function(bump) {\n this.verticalPos = this.verticalPos + bump;\n this.data.stopy = this.verticalPos;\n },\n getVerticalPos: function() {\n return this.verticalPos;\n },\n getBounds: function() {\n return { bounds: this.data, models: this.models };\n }\n};\n\n/**\n * Draws an note in the diagram with the attached line\n * @param elem - The diagram to draw to.\n * @param noteModel:{x: number, y: number, message: string, width: number} - startx: x axis start position, verticalPos: y axis position, messsage: the message to be shown, width: Set this with a custom width to override the default configured width.\n */\nconst drawNote = function(elem, noteModel) {\n bounds.bumpVerticalPos(conf.boxMargin);\n noteModel.height = conf.boxMargin;\n noteModel.starty = bounds.getVerticalPos();\n const rect = svgDraw.getNoteRect();\n rect.x = noteModel.startx;\n rect.y = noteModel.starty;\n rect.width = noteModel.width || conf.width;\n rect.class = 'note';\n\n let g = elem.append('g');\n const rectElem = svgDraw.drawRect(g, rect);\n const textObj = svgDraw.getTextObj();\n textObj.x = noteModel.startx;\n textObj.y = noteModel.starty;\n textObj.width = rect.width;\n textObj.dy = '1em';\n textObj.text = noteModel.message;\n textObj.class = 'noteText';\n textObj.fontFamily = conf.noteFontFamily;\n textObj.fontSize = conf.noteFontSize;\n textObj.fontWeight = conf.noteFontWeight;\n textObj.anchor = conf.noteAlign;\n textObj.textMargin = conf.noteMargin;\n textObj.valign = conf.noteAlign;\n textObj.wrap = true;\n\n let textElem = drawText(g, textObj);\n\n let textHeight = Math.round(\n textElem.map(te => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr)\n );\n\n rectElem.attr('height', textHeight + 2 * conf.noteMargin);\n noteModel.height += textHeight + 2 * conf.noteMargin;\n bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);\n noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin;\n noteModel.stopx = noteModel.startx + rect.width;\n bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy);\n bounds.models.addNote(noteModel);\n};\n\n/**\n * Draws a message\n * @param g - the parent of the message element\n * @param msgModel - the model containing fields describing a message\n */\nconst drawMessage = function(g, msgModel) {\n bounds.bumpVerticalPos(10);\n const { startx, stopx, starty, message, type, sequenceIndex, wrap } = msgModel;\n const lines = common.splitBreaks(message).length;\n let textDims = utils.calculateTextDimensions(message, conf.messageFont());\n const lineHeight = textDims.height / lines;\n msgModel.height += lineHeight;\n\n bounds.bumpVerticalPos(lineHeight);\n const textObj = svgDraw.getTextObj();\n textObj.x = startx;\n textObj.y = starty + 10;\n textObj.width = stopx - startx;\n textObj.class = 'messageText';\n textObj.dy = '1em';\n textObj.text = message;\n textObj.fontFamily = conf.messageFontFamily;\n textObj.fontSize = conf.messageFontSize;\n textObj.fontWeight = conf.messageFontWeight;\n textObj.anchor = conf.messageAlign;\n textObj.valign = conf.messageAlign;\n textObj.textMargin = conf.wrapPadding;\n textObj.tspan = false;\n textObj.wrap = wrap;\n\n drawText(g, textObj);\n\n let totalOffset = textDims.height - 10;\n\n let textWidth = textDims.width;\n\n let line, lineStarty;\n if (startx === stopx) {\n lineStarty = bounds.getVerticalPos() + totalOffset;\n if (conf.rightAngles) {\n line = g\n .append('path')\n .attr(\n 'd',\n `M ${startx},${lineStarty} H ${startx +\n Math.max(conf.width / 2, textWidth / 2)} V ${lineStarty + 25} H ${startx}`\n );\n } else {\n totalOffset += conf.boxMargin;\n\n lineStarty = bounds.getVerticalPos() + totalOffset;\n line = g\n .append('path')\n .attr(\n 'd',\n 'M ' +\n startx +\n ',' +\n lineStarty +\n ' C ' +\n (startx + 60) +\n ',' +\n (lineStarty - 10) +\n ' ' +\n (startx + 60) +\n ',' +\n (lineStarty + 30) +\n ' ' +\n startx +\n ',' +\n (lineStarty + 20)\n );\n }\n\n totalOffset += 30;\n const dx = Math.max(textWidth / 2, conf.width / 2);\n bounds.insert(\n startx - dx,\n bounds.getVerticalPos() - 10 + totalOffset,\n stopx + dx,\n bounds.getVerticalPos() + 30 + totalOffset\n );\n } else {\n totalOffset += conf.boxMargin;\n lineStarty = bounds.getVerticalPos() + totalOffset;\n line = g.append('line');\n line.attr('x1', startx);\n line.attr('y1', lineStarty);\n line.attr('x2', stopx);\n line.attr('y2', lineStarty);\n bounds.insert(startx, lineStarty - 10, stopx, lineStarty);\n }\n // Make an SVG Container\n // Draw the line\n if (\n type === parser.yy.LINETYPE.DOTTED ||\n type === parser.yy.LINETYPE.DOTTED_CROSS ||\n type === parser.yy.LINETYPE.DOTTED_OPEN\n ) {\n line.style('stroke-dasharray', '3, 3');\n line.attr('class', 'messageLine1');\n } else {\n line.attr('class', 'messageLine0');\n }\n\n let url = '';\n if (conf.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n line.attr('stroke-width', 2);\n line.attr('stroke', 'none'); // handled by theme/css anyway\n line.style('fill', 'none'); // remove any fill colour\n if (type === parser.yy.LINETYPE.SOLID || type === parser.yy.LINETYPE.DOTTED) {\n line.attr('marker-end', 'url(' + url + '#arrowhead)');\n }\n\n if (type === parser.yy.LINETYPE.SOLID_CROSS || type === parser.yy.LINETYPE.DOTTED_CROSS) {\n line.attr('marker-end', 'url(' + url + '#crosshead)');\n }\n\n // add node number\n if (sequenceDb.showSequenceNumbers() || conf.showSequenceNumbers) {\n line.attr('marker-start', 'url(' + url + '#sequencenumber)');\n g.append('text')\n .attr('x', startx)\n .attr('y', lineStarty + 4)\n .attr('font-family', 'sans-serif')\n .attr('font-size', '12px')\n .attr('text-anchor', 'middle')\n .attr('textLength', '16px')\n .attr('class', 'sequenceNumber')\n .text(sequenceIndex);\n }\n bounds.bumpVerticalPos(totalOffset);\n msgModel.height += totalOffset;\n msgModel.stopy = msgModel.starty + msgModel.height;\n bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy);\n};\n\nexport const drawActors = function(diagram, actors, actorKeys, verticalPos) {\n // Draw the actors\n let prevWidth = 0;\n let prevMargin = 0;\n\n for (let i = 0; i < actorKeys.length; i++) {\n const actor = actors[actorKeys[i]];\n\n // Add some rendering data to the object\n actor.width = actor.width || conf.width;\n actor.height = Math.max(actor.height || conf.height, conf.height);\n actor.margin = actor.margin || conf.actorMargin;\n\n actor.x = prevWidth + prevMargin;\n actor.y = verticalPos;\n\n // Draw the box with the attached line\n svgDraw.drawActor(diagram, actor, conf);\n bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height);\n\n prevWidth += actor.width;\n prevMargin += actor.margin;\n bounds.models.addActor(actor);\n }\n\n // Add a margin between the actor boxes and the first arrow\n bounds.bumpVerticalPos(conf.height);\n};\n\nexport const setConf = function(cnf) {\n assignWithDepth(conf, cnf);\n\n if (cnf.fontFamily) {\n conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily;\n }\n if (cnf.fontSize) {\n conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize;\n }\n if (cnf.fontWeight) {\n conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight;\n }\n};\n\nconst actorActivations = function(actor) {\n return bounds.activations.filter(function(activation) {\n return activation.actor === actor;\n });\n};\n\nconst activationBounds = function(actor, actors) {\n // handle multiple stacked activations for same actor\n const actorObj = actors[actor];\n const activations = actorActivations(actor);\n\n const left = activations.reduce(function(acc, activation) {\n return Math.min(acc, activation.startx);\n }, actorObj.x + actorObj.width / 2);\n const right = activations.reduce(function(acc, activation) {\n return Math.max(acc, activation.stopx);\n }, actorObj.x + actorObj.width / 2);\n return [left, right];\n};\n\nfunction adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) {\n bounds.bumpVerticalPos(preMargin);\n let heightAdjust = postMargin;\n if (msg.id && msg.message && loopWidths[msg.id]) {\n let loopWidth = loopWidths[msg.id].width;\n let textConf = conf.messageFont();\n msg.message = utils.wrapLabel(`[${msg.message}]`, loopWidth - 2 * conf.wrapPadding, textConf);\n msg.width = loopWidth;\n msg.wrap = true;\n\n // const lines = common.splitBreaks(msg.message).length;\n const textDims = utils.calculateTextDimensions(msg.message, textConf);\n const totalOffset = Math.max(textDims.height, conf.labelBoxHeight);\n heightAdjust = postMargin + totalOffset;\n logger.debug(`${totalOffset} - ${msg.message}`);\n }\n addLoopFn(msg);\n bounds.bumpVerticalPos(heightAdjust);\n}\n\n/**\n * Draws a sequenceDiagram in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\nexport const draw = function(text, id) {\n parser.yy.clear();\n parser.yy.setWrap(conf.wrap);\n parser.parse(text + '\\n');\n bounds.init();\n logger.debug(`C:${JSON.stringify(conf, null, 2)}`);\n\n const diagram = select(`[id=\"${id}\"]`);\n\n // Fetch data from the parsing\n const actors = parser.yy.getActors();\n const actorKeys = parser.yy.getActorKeys();\n const messages = parser.yy.getMessages();\n const title = parser.yy.getTitle();\n\n const maxMessageWidthPerActor = getMaxMessageWidthPerActor(actors, messages);\n conf.height = calculateActorMargins(actors, maxMessageWidthPerActor);\n\n drawActors(diagram, actors, actorKeys, 0);\n const loopWidths = calculateLoopBounds(messages, actors, maxMessageWidthPerActor);\n\n // The arrow head definition is attached to the svg once\n svgDraw.insertArrowHead(diagram);\n svgDraw.insertArrowCrossHead(diagram);\n svgDraw.insertSequenceNumber(diagram);\n\n function activeEnd(msg, verticalPos) {\n const activationData = bounds.endActivation(msg);\n if (activationData.starty + 18 > verticalPos) {\n activationData.starty = verticalPos - 6;\n verticalPos += 12;\n }\n svgDraw.drawActivation(\n diagram,\n activationData,\n verticalPos,\n conf,\n actorActivations(msg.from.actor).length\n );\n\n bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);\n }\n\n // Draw the messages/signals\n let sequenceIndex = 1;\n messages.forEach(function(msg) {\n let loopModel, noteModel, msgModel;\n\n switch (msg.type) {\n case parser.yy.LINETYPE.NOTE:\n noteModel = msg.noteModel;\n drawNote(diagram, noteModel);\n break;\n case parser.yy.LINETYPE.ACTIVE_START:\n bounds.newActivation(msg, diagram, actors);\n break;\n case parser.yy.LINETYPE.ACTIVE_END:\n activeEnd(msg, bounds.getVerticalPos());\n break;\n case parser.yy.LINETYPE.LOOP_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n message => bounds.newLoop(message)\n );\n break;\n case parser.yy.LINETYPE.LOOP_END:\n loopModel = bounds.endLoop();\n svgDraw.drawLoop(diagram, loopModel, 'loop', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case parser.yy.LINETYPE.RECT_START:\n adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin, message =>\n bounds.newLoop(undefined, message.message)\n );\n break;\n case parser.yy.LINETYPE.RECT_END:\n loopModel = bounds.endLoop();\n svgDraw.drawBackgroundRect(diagram, loopModel);\n bounds.models.addLoop(loopModel);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n break;\n case parser.yy.LINETYPE.OPT_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n message => bounds.newLoop(message)\n );\n break;\n case parser.yy.LINETYPE.OPT_END:\n loopModel = bounds.endLoop();\n svgDraw.drawLoop(diagram, loopModel, 'opt', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case parser.yy.LINETYPE.ALT_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n message => bounds.newLoop(message)\n );\n break;\n case parser.yy.LINETYPE.ALT_ELSE:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin + conf.boxTextMargin,\n conf.boxMargin,\n message => bounds.addSectionToLoop(message)\n );\n break;\n case parser.yy.LINETYPE.ALT_END:\n loopModel = bounds.endLoop();\n svgDraw.drawLoop(diagram, loopModel, 'alt', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case parser.yy.LINETYPE.PAR_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n message => bounds.newLoop(message)\n );\n break;\n case parser.yy.LINETYPE.PAR_AND:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin + conf.boxTextMargin,\n conf.boxMargin,\n message => bounds.addSectionToLoop(message)\n );\n break;\n case parser.yy.LINETYPE.PAR_END:\n loopModel = bounds.endLoop();\n svgDraw.drawLoop(diagram, loopModel, 'par', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n default:\n try {\n // lastMsg = msg\n msgModel = msg.msgModel;\n msgModel.starty = bounds.getVerticalPos();\n msgModel.sequenceIndex = sequenceIndex;\n drawMessage(diagram, msgModel);\n bounds.models.addMessage(msgModel);\n } catch (e) {\n logger.error('error while drawing message', e);\n }\n }\n // Increment sequence counter if msg.type is a line (and not another event like activation or note, etc)\n if (\n [\n parser.yy.LINETYPE.SOLID_OPEN,\n parser.yy.LINETYPE.DOTTED_OPEN,\n parser.yy.LINETYPE.SOLID,\n parser.yy.LINETYPE.DOTTED,\n parser.yy.LINETYPE.SOLID_CROSS,\n parser.yy.LINETYPE.DOTTED_CROSS\n ].includes(msg.type)\n ) {\n sequenceIndex++;\n }\n });\n\n if (conf.mirrorActors) {\n // Draw actors below diagram\n bounds.bumpVerticalPos(conf.boxMargin * 2);\n drawActors(diagram, actors, actorKeys, bounds.getVerticalPos());\n }\n\n const { bounds: box } = bounds.getBounds();\n\n // Adjust line height of actor lines now that the height of the diagram is known\n logger.debug('For line height fix Querying: #' + id + ' .actor-line');\n const actorLines = selectAll('#' + id + ' .actor-line');\n actorLines.attr('y2', box.stopy);\n\n let height = box.stopy - box.starty + 2 * conf.diagramMarginY;\n if (conf.mirrorActors) {\n height = height - conf.boxMargin + conf.bottomMarginAdj;\n }\n\n const width = box.stopx - box.startx + 2 * conf.diagramMarginX;\n\n if (title) {\n diagram\n .append('text')\n .text(title)\n .attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX)\n .attr('y', -25);\n }\n\n if (conf.useMaxWidth) {\n diagram.attr('height', '100%');\n diagram.attr('width', '100%');\n diagram.attr('style', 'max-width:' + width + 'px;');\n // diagram.attr('style', 'max-width:100%;');\n } else {\n diagram.attr('height', height);\n diagram.attr('width', width);\n }\n const extraVertForTitle = title ? 40 : 0;\n diagram.attr(\n 'viewBox',\n box.startx -\n conf.diagramMarginX +\n ' -' +\n (conf.diagramMarginY + extraVertForTitle) +\n ' ' +\n width +\n ' ' +\n (height + extraVertForTitle)\n );\n logger.debug(`models:`, bounds.models);\n};\n\n/**\n * Retrieves the max message width of each actor, supports signals (messages, loops)\n * and notes.\n *\n * It will enumerate each given message, and will determine its text width, in relation\n * to the actor it originates from, and destined to.\n *\n * @param actors - The actors map\n * @param messages - A list of message objects to iterate\n */\nconst getMaxMessageWidthPerActor = function(actors, messages) {\n const maxMessageWidthPerActor = {};\n\n messages.forEach(function(msg) {\n if (actors[msg.to] && actors[msg.from]) {\n const actor = actors[msg.to];\n\n // If this is the first actor, and the message is left of it, no need to calculate the margin\n if (msg.placement === parser.yy.PLACEMENT.LEFTOF && !actor.prevActor) {\n return;\n }\n\n // If this is the last actor, and the message is right of it, no need to calculate the margin\n if (msg.placement === parser.yy.PLACEMENT.RIGHTOF && !actor.nextActor) {\n return;\n }\n\n const isNote = msg.placement !== undefined;\n const isMessage = !isNote;\n\n const textFont = isNote ? conf.noteFont() : conf.messageFont();\n let wrappedMessage = msg.wrap\n ? utils.wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont)\n : msg.message;\n const messageDimensions = utils.calculateTextDimensions(wrappedMessage, textFont);\n const messageWidth = messageDimensions.width + 2 * conf.wrapPadding;\n\n /*\n * The following scenarios should be supported:\n *\n * - There's a message (non-note) between fromActor and toActor\n * - If fromActor is on the right and toActor is on the left, we should\n * define the toActor's margin\n * - If fromActor is on the left and toActor is on the right, we should\n * define the fromActor's margin\n * - There's a note, in which case fromActor == toActor\n * - If the note is to the left of the actor, we should define the previous actor\n * margin\n * - If the note is on the actor, we should define both the previous and next actor\n * margins, each being the half of the note size\n * - If the note is on the right of the actor, we should define the current actor\n * margin\n */\n if (isMessage && msg.from === actor.nextActor) {\n maxMessageWidthPerActor[msg.to] = Math.max(\n maxMessageWidthPerActor[msg.to] || 0,\n messageWidth\n );\n } else if (isMessage && msg.from === actor.prevActor) {\n maxMessageWidthPerActor[msg.from] = Math.max(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth\n );\n } else if (isMessage && msg.from === msg.to) {\n maxMessageWidthPerActor[msg.from] = Math.max(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth / 2\n );\n\n maxMessageWidthPerActor[msg.to] = Math.max(\n maxMessageWidthPerActor[msg.to] || 0,\n messageWidth / 2\n );\n } else if (msg.placement === parser.yy.PLACEMENT.RIGHTOF) {\n maxMessageWidthPerActor[msg.from] = Math.max(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth\n );\n } else if (msg.placement === parser.yy.PLACEMENT.LEFTOF) {\n maxMessageWidthPerActor[actor.prevActor] = Math.max(\n maxMessageWidthPerActor[actor.prevActor] || 0,\n messageWidth\n );\n } else if (msg.placement === parser.yy.PLACEMENT.OVER) {\n if (actor.prevActor) {\n maxMessageWidthPerActor[actor.prevActor] = Math.max(\n maxMessageWidthPerActor[actor.prevActor] || 0,\n messageWidth / 2\n );\n }\n\n if (actor.nextActor) {\n maxMessageWidthPerActor[msg.from] = Math.max(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth / 2\n );\n }\n }\n }\n });\n\n logger.debug('maxMessageWidthPerActor:', maxMessageWidthPerActor);\n return maxMessageWidthPerActor;\n};\n\n/**\n * This will calculate the optimal margin for each given actor, for a given\n * actor->messageWidth map.\n *\n * An actor's margin is determined by the width of the actor, the width of the\n * largest message that originates from it, and the configured conf.actorMargin.\n *\n * @param actors - The actors map to calculate margins for\n * @param actorToMessageWidth - A map of actor key -> max message width it holds\n */\nconst calculateActorMargins = function(actors, actorToMessageWidth) {\n let maxHeight = 0;\n Object.keys(actors).forEach(prop => {\n const actor = actors[prop];\n if (actor.wrap) {\n actor.description = utils.wrapLabel(\n actor.description,\n conf.width - 2 * conf.wrapPadding,\n conf.actorFont()\n );\n }\n const actDims = utils.calculateTextDimensions(actor.description, conf.actorFont());\n actor.width = actor.wrap\n ? conf.width\n : Math.max(conf.width, actDims.width + 2 * conf.wrapPadding);\n\n actor.height = actor.wrap ? Math.max(actDims.height, conf.height) : conf.height;\n maxHeight = Math.max(maxHeight, actor.height);\n });\n\n for (let actorKey in actorToMessageWidth) {\n const actor = actors[actorKey];\n\n if (!actor) {\n continue;\n }\n\n const nextActor = actors[actor.nextActor];\n\n // No need to space out an actor that doesn't have a next link\n if (!nextActor) {\n continue;\n }\n\n const messageWidth = actorToMessageWidth[actorKey];\n const actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2;\n\n actor.margin = Math.max(actorWidth, conf.actorMargin);\n }\n\n return Math.max(maxHeight, conf.height);\n};\n\nconst buildNoteModel = function(msg, actors) {\n let startx = actors[msg.from].x;\n let stopx = actors[msg.to].x;\n let shouldWrap = msg.wrap && msg.message;\n\n let textDimensions = utils.calculateTextDimensions(\n shouldWrap ? utils.wrapLabel(msg.message, conf.width, conf.noteFont()) : msg.message,\n conf.noteFont()\n );\n let noteModel = {\n width: shouldWrap\n ? conf.width\n : Math.max(conf.width, textDimensions.width + 2 * conf.noteMargin),\n height: 0,\n startx: actors[msg.from].x,\n stopx: 0,\n starty: 0,\n stopy: 0,\n message: msg.message\n };\n if (msg.placement === parser.yy.PLACEMENT.RIGHTOF) {\n noteModel.width = shouldWrap\n ? Math.max(conf.width, textDimensions.width)\n : Math.max(\n actors[msg.from].width / 2 + actors[msg.to].width / 2,\n textDimensions.width + 2 * conf.noteMargin\n );\n noteModel.startx = startx + (actors[msg.from].width + conf.actorMargin) / 2;\n } else if (msg.placement === parser.yy.PLACEMENT.LEFTOF) {\n noteModel.width = shouldWrap\n ? Math.max(conf.width, textDimensions.width + 2 * conf.noteMargin)\n : Math.max(\n actors[msg.from].width / 2 + actors[msg.to].width / 2,\n textDimensions.width + 2 * conf.noteMargin\n );\n noteModel.startx = startx - noteModel.width + (actors[msg.from].width - conf.actorMargin) / 2;\n } else if (msg.to === msg.from) {\n textDimensions = utils.calculateTextDimensions(\n shouldWrap\n ? utils.wrapLabel(\n msg.message,\n Math.max(conf.width, actors[msg.from].width),\n conf.noteFont()\n )\n : msg.message,\n conf.noteFont()\n );\n noteModel.width = shouldWrap\n ? Math.max(conf.width, actors[msg.from].width)\n : Math.max(actors[msg.from].width, conf.width, textDimensions.width + 2 * conf.noteMargin);\n noteModel.startx = startx + (actors[msg.from].width - noteModel.width) / 2;\n } else {\n noteModel.width =\n Math.abs(startx + actors[msg.from].width / 2 - (stopx + actors[msg.to].width / 2)) +\n conf.actorMargin;\n noteModel.startx =\n startx < stopx\n ? startx + actors[msg.from].width / 2 - conf.actorMargin / 2\n : stopx + actors[msg.to].width / 2 - conf.actorMargin / 2;\n }\n if (shouldWrap) {\n noteModel.message = utils.wrapLabel(\n msg.message,\n noteModel.width - 2 * conf.wrapPadding,\n conf.noteFont()\n );\n }\n logger.debug(\n `NM:[${noteModel.startx},${noteModel.stopx},${noteModel.starty},${noteModel.stopy}:${noteModel.width},${noteModel.height}=${msg.message}]`\n );\n return noteModel;\n};\n\nconst buildMessageModel = function(msg, actors) {\n let process = false;\n if (\n [\n parser.yy.LINETYPE.SOLID_OPEN,\n parser.yy.LINETYPE.DOTTED_OPEN,\n parser.yy.LINETYPE.SOLID,\n parser.yy.LINETYPE.DOTTED,\n parser.yy.LINETYPE.SOLID_CROSS,\n parser.yy.LINETYPE.DOTTED_CROSS\n ].includes(msg.type)\n ) {\n process = true;\n }\n if (!process) {\n return {};\n }\n const fromBounds = activationBounds(msg.from, actors);\n const toBounds = activationBounds(msg.to, actors);\n const fromIdx = fromBounds[0] <= toBounds[0] ? 1 : 0;\n const toIdx = fromBounds[0] < toBounds[0] ? 0 : 1;\n const allBounds = fromBounds.concat(toBounds);\n const boundedWidth = Math.abs(toBounds[toIdx] - fromBounds[fromIdx]);\n const msgDims = utils.calculateTextDimensions(msg.message, conf.messageFont());\n if (msg.wrap && msg.message) {\n msg.message = utils.wrapLabel(\n msg.message,\n Math.max(boundedWidth + 2 * conf.wrapPadding, conf.width),\n conf.messageFont()\n );\n }\n return {\n width: Math.max(\n msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding,\n boundedWidth + 2 * conf.wrapPadding,\n conf.width\n ),\n height: 0,\n startx: fromBounds[fromIdx],\n stopx: toBounds[toIdx],\n starty: 0,\n stopy: 0,\n message: msg.message,\n type: msg.type,\n wrap: msg.wrap,\n fromBounds: Math.min.apply(null, allBounds),\n toBounds: Math.max.apply(null, allBounds)\n };\n};\n\nconst calculateLoopBounds = function(messages, actors) {\n const loops = {};\n const stack = [];\n let current, noteModel, msgModel;\n\n messages.forEach(function(msg) {\n msg.id = utils.random({ length: 10 });\n switch (msg.type) {\n case parser.yy.LINETYPE.LOOP_START:\n case parser.yy.LINETYPE.ALT_START:\n case parser.yy.LINETYPE.OPT_START:\n case parser.yy.LINETYPE.PAR_START:\n stack.push({\n id: msg.id,\n msg: msg.message,\n from: Number.MAX_SAFE_INTEGER,\n to: Number.MIN_SAFE_INTEGER,\n width: 0\n });\n break;\n case parser.yy.LINETYPE.ALT_ELSE:\n case parser.yy.LINETYPE.PAR_AND:\n if (msg.message) {\n current = stack.pop();\n loops[current.id] = current;\n loops[msg.id] = current;\n stack.push(current);\n }\n break;\n case parser.yy.LINETYPE.LOOP_END:\n case parser.yy.LINETYPE.ALT_END:\n case parser.yy.LINETYPE.OPT_END:\n case parser.yy.LINETYPE.PAR_END:\n current = stack.pop();\n loops[current.id] = current;\n break;\n case parser.yy.LINETYPE.ACTIVE_START:\n {\n const actorRect = actors[msg.from ? msg.from.actor : msg.to.actor];\n const stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length;\n const x =\n actorRect.x + actorRect.width / 2 + ((stackedSize - 1) * conf.activationWidth) / 2;\n const toAdd = {\n startx: x,\n stopx: x + conf.activationWidth,\n actor: msg.from.actor,\n enabled: true\n };\n bounds.activations.push(toAdd);\n }\n break;\n case parser.yy.LINETYPE.ACTIVE_END:\n {\n const lastActorActivationIdx = bounds.activations\n .map(a => a.actor)\n .lastIndexOf(msg.from.actor);\n delete bounds.activations.splice(lastActorActivationIdx, 1)[0];\n }\n break;\n }\n const isNote = msg.placement !== undefined;\n if (isNote) {\n noteModel = buildNoteModel(msg, actors);\n msg.noteModel = noteModel;\n stack.forEach(stk => {\n current = stk;\n current.from = Math.min(current.from, noteModel.startx);\n current.to = Math.max(current.to, noteModel.startx + noteModel.width);\n current.width =\n Math.max(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth;\n });\n } else {\n msgModel = buildMessageModel(msg, actors);\n msg.msgModel = msgModel;\n if (msgModel.startx && msgModel.stopx && stack.length > 0) {\n stack.forEach(stk => {\n current = stk;\n if (msgModel.startx === msgModel.stopx) {\n let from = actors[msg.from];\n let to = actors[msg.to];\n current.from = Math.min(\n from.x - msgModel.width / 2,\n from.x - from.width / 2,\n current.from\n );\n current.to = Math.max(to.x + msgModel.width / 2, to.x + from.width / 2, current.to);\n current.width =\n Math.max(current.width, Math.abs(current.to - current.from)) - conf.labelBoxWidth;\n } else {\n current.from = Math.min(msgModel.startx, current.from);\n current.to = Math.max(msgModel.stopx, current.to);\n current.width = Math.max(current.width, msgModel.width) - conf.labelBoxWidth;\n }\n });\n }\n }\n });\n bounds.activations = [];\n logger.debug('Loop type widths:', loops);\n return loops;\n};\n\nexport default {\n bounds,\n drawActors,\n setConf,\n draw\n};\n","const getStyles = options =>\n `.actor {\n stroke: ${options.actorBorder};\n fill: ${options.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${options.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${options.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${options.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${options.signalColor};\n }\n\n #arrowhead path {\n fill: ${options.signalColor};\n stroke: ${options.signalColor};\n }\n\n .sequenceNumber {\n fill: ${options.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${options.signalColor};\n }\n\n #crosshead path {\n fill: ${options.signalColor};\n stroke: ${options.signalColor};\n }\n\n .messageText {\n fill: ${options.signalTextColor};\n stroke: ${options.signalTextColor};\n }\n\n .labelBox {\n stroke: ${options.labelBoxBorderColor};\n fill: ${options.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${options.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${options.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${options.labelBoxBorderColor};\n fill: ${options.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${options.noteBorderColor};\n fill: ${options.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${options.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${options.activationBkgColor};\n stroke: ${options.activationBorderColor};\n }\n\n .activation1 {\n fill: ${options.activationBkgColor};\n stroke: ${options.activationBorderColor};\n }\n\n .activation2 {\n fill: ${options.activationBkgColor};\n stroke: ${options.activationBorderColor};\n }\n`;\n\nexport default getStyles;\n","import common from '../common/common';\n\nexport const drawRect = function(elem, rectData) {\n const rectElem = elem.append('rect');\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.y);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', rectData.width);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n\n if (typeof rectData.class !== 'undefined') {\n rectElem.attr('class', rectData.class);\n }\n\n return rectElem;\n};\n\nexport const drawText = function(elem, textData) {\n let prevTextHeight = 0,\n textHeight = 0;\n const lines = textData.wrap\n ? textData.text.split(common.lineBreakRegex)\n : [textData.text.replace(common.lineBreakRegex, ' ')];\n\n let textElems = [];\n let dy = 0;\n let yfunc = () => textData.y;\n if (\n typeof textData.valign !== 'undefined' &&\n typeof textData.textMargin !== 'undefined' &&\n textData.textMargin > 0\n ) {\n switch (textData.valign) {\n case 'top':\n case 'start':\n yfunc = () => Math.round(textData.y + textData.textMargin);\n break;\n case 'middle':\n case 'center':\n yfunc = () =>\n Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2);\n break;\n case 'bottom':\n case 'end':\n yfunc = () =>\n Math.round(\n textData.y +\n (prevTextHeight + textHeight + 2 * textData.textMargin) -\n textData.textMargin\n );\n break;\n }\n }\n if (\n typeof textData.anchor !== 'undefined' &&\n typeof textData.textMargin !== 'undefined' &&\n typeof textData.width !== 'undefined'\n ) {\n switch (textData.anchor) {\n case 'left':\n case 'start':\n textData.x = Math.round(textData.x + textData.textMargin);\n textData.anchor = 'start';\n textData.dominantBaseline = 'text-after-edge';\n textData.alignmentBaseline = 'middle';\n break;\n case 'middle':\n case 'center':\n textData.x = Math.round(textData.x + textData.width / 2);\n textData.anchor = 'middle';\n textData.dominantBaseline = 'middle';\n textData.alignmentBaseline = 'middle';\n break;\n case 'right':\n case 'end':\n textData.x = Math.round(textData.x + textData.width - textData.textMargin);\n textData.anchor = 'end';\n textData.dominantBaseline = 'text-before-edge';\n textData.alignmentBaseline = 'middle';\n break;\n }\n }\n for (let i = 0; i < lines.length; i++) {\n let line = lines[i];\n if (\n typeof textData.textMargin !== 'undefined' &&\n textData.textMargin === 0 &&\n typeof textData.fontSize !== 'undefined'\n ) {\n dy = i * textData.fontSize;\n }\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', yfunc());\n if (typeof textData.anchor !== 'undefined') {\n textElem\n .attr('text-anchor', textData.anchor)\n .attr('dominant-baseline', textData.dominantBaseline)\n .attr('alignment-baseline', textData.alignmentBaseline);\n }\n if (typeof textData.fontFamily !== 'undefined') {\n textElem.style('font-family', textData.fontFamily);\n }\n if (typeof textData.fontSize !== 'undefined') {\n textElem.style('font-size', textData.fontSize);\n }\n if (typeof textData.fontWeight !== 'undefined') {\n textElem.style('font-weight', textData.fontWeight);\n }\n if (typeof textData.fill !== 'undefined') {\n textElem.attr('fill', textData.fill);\n }\n if (typeof textData.class !== 'undefined') {\n textElem.attr('class', textData.class);\n }\n if (typeof textData.dy !== 'undefined') {\n textElem.attr('dy', textData.dy);\n } else if (dy !== 0) {\n textElem.attr('dy', dy);\n }\n\n if (textData.tspan) {\n const span = textElem.append('tspan');\n span.attr('x', textData.x);\n if (typeof textData.fill !== 'undefined') {\n span.attr('fill', textData.fill);\n }\n span.text(line);\n } else {\n textElem.text(line);\n }\n if (\n typeof textData.valign !== 'undefined' &&\n typeof textData.textMargin !== 'undefined' &&\n textData.textMargin > 0\n ) {\n textHeight += (textElem._groups || textElem)[0][0].getBBox().height;\n prevTextHeight = textHeight;\n }\n\n textElems.push(textElem);\n }\n\n return textElems;\n};\n\nexport const drawLabel = function(elem, txtObject) {\n function genPoints(x, y, width, height, cut) {\n return (\n x +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n (y + height - cut) +\n ' ' +\n (x + width - cut * 1.2) +\n ',' +\n (y + height) +\n ' ' +\n x +\n ',' +\n (y + height)\n );\n }\n const polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7));\n polygon.attr('class', 'labelBox');\n\n txtObject.y = txtObject.y + txtObject.height / 2;\n\n drawText(elem, txtObject);\n return polygon;\n};\n\nlet actorCnt = -1;\n/**\n * Draws an actor in the diagram with the attached line\n * @param elem - The diagram we'll draw to.\n * @param actor - The actor to draw.\n * @param conf - drawText implementation discriminator object\n */\nexport const drawActor = function(elem, actor, conf) {\n const center = actor.x + actor.width / 2;\n\n const g = elem.append('g');\n if (actor.y === 0) {\n actorCnt++;\n g.append('line')\n .attr('id', 'actor' + actorCnt)\n .attr('x1', center)\n .attr('y1', 5)\n .attr('x2', center)\n .attr('y2', 2000)\n .attr('class', 'actor-line')\n .attr('stroke-width', '0.5px')\n .attr('stroke', '#999');\n }\n\n const rect = getNoteRect();\n rect.x = actor.x;\n rect.y = actor.y;\n rect.fill = '#eaeaea';\n rect.width = actor.width;\n rect.height = actor.height;\n rect.class = 'actor';\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n _drawTextCandidateFunc(conf)(\n actor.description,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'actor' },\n conf\n );\n};\n\nexport const anchorElement = function(elem) {\n return elem.append('g');\n};\n/**\n * Draws an activation in the diagram\n * @param elem - element to append activation rect.\n * @param bounds - activation box bounds.\n * @param verticalPos - precise y cooridnate of bottom activation box edge.\n * @param conf - sequence diagram config object.\n * @param actorActivations - number of activations on the actor.\n */\nexport const drawActivation = function(elem, bounds, verticalPos, conf, actorActivations) {\n const rect = getNoteRect();\n const g = bounds.anchored;\n rect.x = bounds.startx;\n rect.y = bounds.starty;\n rect.class = 'activation' + (actorActivations % 3); // Will evaluate to 0, 1 or 2\n rect.width = bounds.stopx - bounds.startx;\n rect.height = verticalPos - bounds.starty;\n drawRect(g, rect);\n};\n\n/**\n * Draws a loop in the diagram\n * @param elem - elemenet to append the loop to.\n * @param loopModel - loopModel of the given loop.\n * @param labelText - Text within the loop.\n * @param conf - diagrom configuration\n */\nexport const drawLoop = function(elem, loopModel, labelText, conf) {\n const {\n boxMargin,\n boxTextMargin,\n labelBoxHeight,\n labelBoxWidth,\n messageFontFamily: fontFamily,\n messageFontSize: fontSize,\n messageFontWeight: fontWeight\n } = conf;\n const g = elem.append('g');\n const drawLoopLine = function(startx, starty, stopx, stopy) {\n return g\n .append('line')\n .attr('x1', startx)\n .attr('y1', starty)\n .attr('x2', stopx)\n .attr('y2', stopy)\n .attr('class', 'loopLine');\n };\n drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty);\n drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy);\n drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy);\n drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy);\n if (typeof loopModel.sections !== 'undefined') {\n loopModel.sections.forEach(function(item) {\n drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style(\n 'stroke-dasharray',\n '3, 3'\n );\n });\n }\n\n let txt = getTextObj();\n txt.text = labelText;\n txt.x = loopModel.startx;\n txt.y = loopModel.starty;\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.tspan = false;\n txt.width = labelBoxWidth || 50;\n txt.height = labelBoxHeight || 20;\n txt.textMargin = boxTextMargin;\n txt.class = 'labelText';\n\n drawLabel(g, txt);\n txt = getTextObj();\n txt.text = loopModel.title;\n txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2;\n txt.y = loopModel.starty + boxMargin + boxTextMargin;\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.textMargin = boxTextMargin;\n txt.class = 'loopText';\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.wrap = true;\n\n let textElem = drawText(g, txt);\n\n if (typeof loopModel.sectionTitles !== 'undefined') {\n loopModel.sectionTitles.forEach(function(item, idx) {\n if (item.message) {\n txt.text = item.message;\n txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2;\n txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin;\n txt.class = 'loopText';\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.tspan = false;\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.wrap = loopModel.wrap;\n textElem = drawText(g, txt);\n let sectionHeight = Math.round(\n textElem\n .map(te => (te._groups || te)[0][0].getBBox().height)\n .reduce((acc, curr) => acc + curr)\n );\n loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin);\n }\n });\n }\n\n loopModel.height = Math.round(loopModel.stopy - loopModel.starty);\n return g;\n};\n\n/**\n * Draws a background rectangle\n * @param elem diagram (reference for bounds)\n * @param bounds shape of the rectangle\n */\nexport const drawBackgroundRect = function(elem, bounds) {\n const rectElem = drawRect(elem, {\n x: bounds.startx,\n y: bounds.starty,\n width: bounds.stopx - bounds.startx,\n height: bounds.stopy - bounds.starty,\n fill: bounds.fill,\n class: 'rect'\n });\n rectElem.lower();\n};\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\nexport const insertArrowHead = function(elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 5)\n .attr('refY', 2)\n .attr('markerWidth', 6)\n .attr('markerHeight', 4)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead\n};\n/**\n * Setup node number. The result is appended to the svg.\n */\nexport const insertSequenceNumber = function(elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'sequencenumber')\n .attr('refX', 15)\n .attr('refY', 15)\n .attr('markerWidth', 60)\n .attr('markerHeight', 40)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', 15)\n .attr('cy', 15)\n .attr('r', 6);\n // .style(\"fill\", '#f00');\n};\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\nexport const insertArrowCrossHead = function(elem) {\n const defs = elem.append('defs');\n const marker = defs\n .append('marker')\n .attr('id', 'crosshead')\n .attr('markerWidth', 15)\n .attr('markerHeight', 8)\n .attr('orient', 'auto')\n .attr('refX', 16)\n .attr('refY', 4);\n\n // The arrow\n marker\n .append('path')\n .attr('fill', 'black')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1px')\n .attr('d', 'M 9,2 V 6 L16,4 Z');\n\n // The cross\n marker\n .append('path')\n .attr('fill', 'none')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1px')\n .attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7');\n // this is actual shape for arrowhead\n};\n\nexport const getTextObj = function() {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n anchor: undefined,\n style: '#666',\n width: undefined,\n height: undefined,\n textMargin: 0,\n rx: 0,\n ry: 0,\n tspan: true,\n valign: undefined\n };\n};\n\nexport const getNoteRect = function() {\n return {\n x: 0,\n y: 0,\n fill: '#EDF2AE',\n stroke: '#666',\n width: 100,\n anchor: 'start',\n height: 100,\n rx: 0,\n ry: 0\n };\n};\n\nconst _drawTextCandidateFunc = (function() {\n function byText(content, g, x, y, width, height, textAttrs) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n const { actorFontSize, actorFontFamily, actorFontWeight } = conf;\n\n const lines = content.split(common.lineBreakRegex);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * actorFontSize - (actorFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .style('text-anchor', 'middle')\n .style('font-size', actorFontSize)\n .style('font-weight', actorFontWeight)\n .style('font-family', actorFontFamily);\n text\n .append('tspan')\n .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const s = g.append('switch');\n const f = s\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n\n const text = f\n .append('div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) { // eslint-disable-line\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function(conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nexport default {\n drawRect,\n drawText,\n drawLabel,\n drawActor,\n anchorElement,\n drawActivation,\n drawLoop,\n drawBackgroundRect,\n insertArrowHead,\n insertSequenceNumber,\n insertArrowCrossHead,\n getTextObj,\n getNoteRect\n};\n","const idCache = {};\n\nexport const set = (key, val) => {\n idCache[key] = val;\n};\n\nexport const get = k => idCache[k];\nexport const keys = () => Object.keys(idCache);\nexport const size = () => keys().length;\n\nexport default {\n get,\n set,\n keys,\n size\n};\n","/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$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,15],$V9=[1,16],$Va=[1,21],$Vb=[1,17],$Vc=[1,18],$Vd=[1,19],$Ve=[1,20],$Vf=[1,22],$Vg=[1,4,5,13,14,16,18,19,21,22,23,24,25,28],$Vh=[1,4,5,11,12,13,14,16,18,19,21,22,23,24,25,28],$Vi=[4,5,13,14,16,18,19,21,22,23,24,25,28];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"SPACE\":4,\"NL\":5,\"SD\":6,\"document\":7,\"line\":8,\"statement\":9,\"idStatement\":10,\"DESCR\":11,\"-->\":12,\"HIDE_EMPTY\":13,\"scale\":14,\"WIDTH\":15,\"COMPOSIT_STATE\":16,\"STRUCT_START\":17,\"STRUCT_STOP\":18,\"STATE_DESCR\":19,\"AS\":20,\"ID\":21,\"FORK\":22,\"JOIN\":23,\"CONCURRENT\":24,\"note\":25,\"notePosition\":26,\"NOTE_TEXT\":27,\"EDGE_STATE\":28,\"left_of\":29,\"right_of\":30,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"SPACE\",5:\"NL\",6:\"SD\",11:\"DESCR\",12:\"-->\",13:\"HIDE_EMPTY\",14:\"scale\",15:\"WIDTH\",16:\"COMPOSIT_STATE\",17:\"STRUCT_START\",18:\"STRUCT_STOP\",19:\"STATE_DESCR\",20:\"AS\",21:\"ID\",22:\"FORK\",23:\"JOIN\",24:\"CONCURRENT\",25:\"note\",27:\"NOTE_TEXT\",28:\"EDGE_STATE\",29:\"left_of\",30:\"right_of\"},\nproductions_: [0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,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,4],[9,4],[10,1],[10,1],[26,1],[26,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 3:\n /*console.warn('Root document', $$[$0]);*/ yy.setRootDoc($$[$0]);return $$[$0]; \nbreak;\ncase 4:\n this.$ = [] \nbreak;\ncase 5:\n\n if($$[$0]!='nl'){\n $$[$0-1].push($$[$0]);this.$ = $$[$0-1]\n }\n // console.warn('Got document',$$[$0-1], $$[$0]);\n \nbreak;\ncase 6: case 7:\n this.$ = $$[$0] \nbreak;\ncase 8:\n this.$='nl';\nbreak;\ncase 9:\n /*console.warn('got id and descr', $$[$0]);*/this.$={ stmt: 'state', id: $$[$0], type: 'default', description: ''};\nbreak;\ncase 10:\n /*console.warn('got id and descr', $$[$0-1], $$[$0].trim());*/this.$={ stmt: 'state', id: $$[$0-1], type: 'default', description: yy.trimColon($$[$0])};\nbreak;\ncase 11:\n\n /*console.warn('got id', $$[$0-2]);yy.addRelation($$[$0-2], $$[$0]);*/\n this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-2], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0] ,type: 'default', description: ''}};\n \nbreak;\ncase 12:\n\n /*yy.addRelation($$[$0-3], $$[$0-1], $$[$0].substr(1).trim());*/\n this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-3], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0-1] ,type: 'default', description: ''}, description: $$[$0].substr(1).trim()};\n \nbreak;\ncase 16:\n\n\n /* console.warn('Adding document for state without id ', $$[$0-3]);*/\n this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: '', doc: $$[$0-1] }\n \nbreak;\ncase 17:\n\n var id=$$[$0];\n var description = $$[$0-2].trim();\n if($$[$0].match(':')){\n var parts = $$[$0].split(':');\n id=parts[0];\n description = [description, parts[1]];\n }\n this.$={stmt: 'state', id: id, type: 'default', description: description};\n\n \nbreak;\ncase 18:\n\n //console.warn('Adding document for state with id ', $$[$0-3], $$[$0-2]); yy.addDocument($$[$0-3]);\n this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: $$[$0-5], doc: $$[$0-1] }\n \nbreak;\ncase 19:\n\n this.$={ stmt: 'state', id: $$[$0], type: 'fork' }\n \nbreak;\ncase 20:\n\n this.$={ stmt: 'state', id: $$[$0], type: 'join' }\n \nbreak;\ncase 21:\n\n this.$={ stmt: 'state', id: yy.getDividerId(), type: 'divider' }\n \nbreak;\ncase 22:\n\n /*console.warn('got NOTE, position: ', $$[$0-2].trim(), 'id = ', $$[$0-1].trim(), 'note: ', $$[$0]);*/\n this.$={ stmt: 'state', id: $$[$0-1].trim(), note:{position: $$[$0-2].trim(), text: $$[$0].trim()}};\n \nbreak;\ncase 24: case 25:\nthis.$=$$[$0];\nbreak;\n}\n},\ntable: [{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,16,19,21,22,23,24,25,28],$V3,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:$V4,5:$V5,8:8,9:10,10:12,13:$V6,14:$V7,16:$V8,19:$V9,21:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,28:$Vf},o($Vg,[2,5]),{9:23,10:12,13:$V6,14:$V7,16:$V8,19:$V9,21:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,28:$Vf},o($Vg,[2,7]),o($Vg,[2,8]),o($Vg,[2,9],{11:[1,24],12:[1,25]}),o($Vg,[2,13]),{15:[1,26]},o($Vg,[2,15],{17:[1,27]}),{20:[1,28]},o($Vg,[2,19]),o($Vg,[2,20]),o($Vg,[2,21]),{26:29,27:[1,30],29:[1,31],30:[1,32]},o($Vh,[2,24]),o($Vh,[2,25]),o($Vg,[2,6]),o($Vg,[2,10]),{10:33,21:$Va,28:$Vf},o($Vg,[2,14]),o($Vi,$V3,{7:34}),{21:[1,35]},{21:[1,36]},{20:[1,37]},{21:[2,26]},{21:[2,27]},o($Vg,[2,11],{11:[1,38]}),{4:$V4,5:$V5,8:8,9:10,10:12,13:$V6,14:$V7,16:$V8,18:[1,39],19:$V9,21:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,28:$Vf},o($Vg,[2,17],{17:[1,40]}),{27:[1,41]},{21:[1,42]},o($Vg,[2,12]),o($Vg,[2,16]),o($Vi,$V3,{7:43}),o($Vg,[2,22]),o($Vg,[2,23]),{4:$V4,5:$V5,8:8,9:10,10:12,13:$V6,14:$V7,16:$V8,18:[1,44],19:$V9,21:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,28:$Vf},o($Vg,[2,18])],\ndefaultActions: {5:[2,1],6:[2,2],31:[2,26],32:[2,27]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// 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.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n 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(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 5;\nbreak;\ncase 1:/* skip all whitespace */\nbreak;\ncase 2:/* skip same-line whitespace */\nbreak;\ncase 3:/* skip comments */\nbreak;\ncase 4:/* skip comments */\nbreak;\ncase 5: this.pushState('SCALE'); /* console.log('Got scale', yy_.yytext);*/ return 14; \nbreak;\ncase 6:return 15;\nbreak;\ncase 7:this.popState();\nbreak;\ncase 8: this.pushState('STATE'); \nbreak;\ncase 9:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim(); /*console.warn('Fork Fork: ',yy_.yytext);*/return 22;\nbreak;\ncase 10:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 23;\nbreak;\ncase 11:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Fork: ',yy_.yytext);*/return 22;\nbreak;\ncase 12:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 23;\nbreak;\ncase 13:this.begin(\"STATE_STRING\");\nbreak;\ncase 14:this.popState();this.pushState('STATE_ID');return \"AS\";\nbreak;\ncase 15:this.popState();/* console.log('STATE_ID', yy_.yytext);*/return \"ID\";\nbreak;\ncase 16:this.popState();\nbreak;\ncase 17: /*console.log('Long description:', yy_.yytext);*/return \"STATE_DESCR\";\nbreak;\ncase 18:/*console.log('COMPOSIT_STATE', yy_.yytext);*/return 16;\nbreak;\ncase 19:this.popState();\nbreak;\ncase 20:this.popState();this.pushState('struct'); /*console.log('begin struct', yy_.yytext);*/return 17;\nbreak;\ncase 21: /*console.log('Ending struct');*/ this.popState(); return 18;\nbreak;\ncase 22:/* nothing */\nbreak;\ncase 23: this.begin('NOTE'); return 25; \nbreak;\ncase 24: this.popState();this.pushState('NOTE_ID');return 29;\nbreak;\ncase 25: this.popState();this.pushState('NOTE_ID');return 30;\nbreak;\ncase 26: this.popState();this.pushState('FLOATING_NOTE');\nbreak;\ncase 27:this.popState();this.pushState('FLOATING_NOTE_ID');return \"AS\";\nbreak;\ncase 28:/**/\nbreak;\ncase 29: /*console.log('Floating note text: ', yy_.yytext);*/return \"NOTE_TEXT\";\nbreak;\ncase 30:this.popState();/*console.log('Floating note ID', yy_.yytext);*/return \"ID\";\nbreak;\ncase 31: this.popState();this.pushState('NOTE_TEXT');/*console.log('Got ID for note', yy_.yytext);*/return 21;\nbreak;\ncase 32: this.popState();/*console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.substr(2).trim();return 27;\nbreak;\ncase 33: this.popState();/*console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.slice(0,-8).trim();return 27;\nbreak;\ncase 34: /*console.log('Got state diagram', yy_.yytext,'#');*/return 6; \nbreak;\ncase 35: /*console.log('Got state diagram', yy_.yytext,'#');*/return 6; \nbreak;\ncase 36: /*console.log('HIDE_EMPTY', yy_.yytext,'#');*/return 13; \nbreak;\ncase 37: /*console.log('EDGE_STATE=',yy_.yytext);*/ return 28;\nbreak;\ncase 38: /*console.log('=>ID=',yy_.yytext);*/ return 21;\nbreak;\ncase 39: yy_.yytext = yy_.yytext.trim(); /*console.log('Descr = ', yy_.yytext);*/ return 11; \nbreak;\ncase 40:return 12;\nbreak;\ncase 41:return 24;\nbreak;\ncase 42:return 5;\nbreak;\ncase 43:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:((?!\\n)\\s)+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:scale\\s+)/i,/^(?:\\d+)/i,/^(?:\\s+width\\b)/i,/^(?:state\\s+)/i,/^(?:.*<
');\n text = text.replace(/\\n/g, '
');\n const lines = text.split(common.lineBreakRegex);\n\n let tHeight = 1.25 * getConfig().state.noteMargin;\n for (const line of lines) {\n const txt = line.trim();\n\n if (txt.length > 0) {\n const span = textElem.append('tspan');\n span.text(txt);\n if (tHeight === 0) {\n const textBounds = span.node().getBBox();\n tHeight += textBounds.height;\n }\n // console.warn('textBounds', textBounds);\n textHeight += tHeight;\n span.attr('x', x + getConfig().state.noteMargin);\n span.attr('y', y + textHeight + 1.25 * getConfig().state.noteMargin);\n }\n }\n return { textWidth: textElem.node().getBBox().width, textHeight };\n};\n\n/**\n * Draws a note to the diagram\n * @param text - The text of the given note.\n * @param g - The element the note is attached to.\n */\n\nexport const drawNote = (text, g) => {\n g.attr('class', 'state-note');\n const note = g\n .append('rect')\n .attr('x', 0)\n .attr('y', getConfig().state.padding);\n const rectElem = g.append('g');\n\n const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem);\n note.attr('height', textHeight + 2 * getConfig().state.noteMargin);\n note.attr('width', textWidth + getConfig().state.noteMargin * 2);\n\n return note;\n};\n\n/**\n * Starting point for drawing a state. The function finds out the specifics\n * about the state and renders with approprtiate function.\n * @param {*} elem\n * @param {*} stateDef\n */\n\nexport const drawState = function(elem, stateDef) {\n const id = stateDef.id;\n const stateInfo = {\n id: id,\n label: stateDef.id,\n width: 0,\n height: 0\n };\n\n const g = elem\n .append('g')\n .attr('id', id)\n .attr('class', 'stateGroup');\n\n if (stateDef.type === 'start') drawStartState(g);\n if (stateDef.type === 'end') drawEndState(g);\n if (stateDef.type === 'fork' || stateDef.type === 'join') drawForkJoinState(g, stateDef);\n if (stateDef.type === 'note') drawNote(stateDef.note.text, g);\n if (stateDef.type === 'divider') drawDivider(g);\n if (stateDef.type === 'default' && stateDef.descriptions.length === 0)\n drawSimpleState(g, stateDef);\n if (stateDef.type === 'default' && stateDef.descriptions.length > 0) drawDescrState(g, stateDef);\n\n const stateBox = g.node().getBBox();\n stateInfo.width = stateBox.width + 2 * getConfig().state.padding;\n stateInfo.height = stateBox.height + 2 * getConfig().state.padding;\n\n idCache.set(id, stateInfo);\n // stateCnt++;\n return stateInfo;\n};\n\nlet edgeCount = 0;\nexport const drawEdge = function(elem, path, relation) {\n const getRelationType = function(type) {\n switch (type) {\n case stateDb.relationType.AGGREGATION:\n return 'aggregation';\n case stateDb.relationType.EXTENSION:\n return 'extension';\n case stateDb.relationType.COMPOSITION:\n return 'composition';\n case stateDb.relationType.DEPENDENCY:\n return 'dependency';\n }\n };\n\n path.points = path.points.filter(p => !Number.isNaN(p.y));\n\n // The data for our line\n const lineData = path.points;\n\n // This is the accessor function we talked about above\n const lineFunction = line()\n .x(function(d) {\n return d.x;\n })\n .y(function(d) {\n return d.y;\n })\n .curve(curveBasis);\n\n const svgPath = elem\n .append('path')\n .attr('d', lineFunction(lineData))\n .attr('id', 'edge' + edgeCount)\n .attr('class', 'transition');\n let url = '';\n if (getConfig().state.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n svgPath.attr(\n 'marker-end',\n 'url(' + url + '#' + getRelationType(stateDb.relationType.DEPENDENCY) + 'End' + ')'\n );\n\n if (typeof relation.title !== 'undefined') {\n const label = elem.append('g').attr('class', 'stateLabel');\n\n const { x, y } = utils.calcLabelPosition(path.points);\n\n const rows = common.getRows(relation.title);\n\n // console.warn(rows);\n\n let titleHeight = 0;\n const titleRows = [];\n let maxWidth = 0;\n let minX = 0;\n\n for (let i = 0; i <= rows.length; i++) {\n const title = label\n .append('text')\n .attr('text-anchor', 'middle')\n .text(rows[i])\n .attr('x', x)\n .attr('y', y + titleHeight);\n\n const boundstmp = title.node().getBBox();\n maxWidth = Math.max(maxWidth, boundstmp.width);\n minX = Math.min(minX, boundstmp.x);\n\n logger.info(boundstmp.x, x, y + titleHeight);\n\n if (titleHeight === 0) {\n const titleBox = title.node().getBBox();\n titleHeight = titleBox.height;\n logger.info('Title height', titleHeight, y);\n }\n titleRows.push(title);\n }\n\n let boxHeight = titleHeight * rows.length;\n if (rows.length > 1) {\n const heightAdj = (rows.length - 1) * titleHeight * 0.5;\n\n titleRows.forEach((title, i) => title.attr('y', y + i * titleHeight - heightAdj));\n boxHeight = titleHeight * rows.length;\n }\n\n const bounds = label.node().getBBox();\n\n label\n .insert('rect', ':first-child')\n .attr('class', 'box')\n .attr('x', x - maxWidth / 2 - getConfig().state.padding / 2)\n .attr('y', y - boxHeight / 2 - getConfig().state.padding / 2 - 3.5)\n .attr('width', maxWidth + getConfig().state.padding)\n .attr('height', boxHeight + getConfig().state.padding);\n\n logger.info(bounds);\n\n //label.attr('transform', '0 -' + (bounds.y / 2));\n\n // Debug points\n // path.points.forEach(point => {\n // g.append('circle')\n // .style('stroke', 'red')\n // .style('fill', 'red')\n // .attr('r', 1)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n // g.append('circle')\n // .style('stroke', 'blue')\n // .style('fill', 'blue')\n // .attr('r', 1)\n // .attr('cx', x)\n // .attr('cy', y);\n }\n\n edgeCount++;\n};\n","import { logger } from '../../logger';\nimport { generateId } from '../../utils';\n\nconst clone = o => JSON.parse(JSON.stringify(o));\n\nlet rootDoc = [];\nconst setRootDoc = o => {\n logger.info('Setting root doc', o);\n // rootDoc = { id: 'root', doc: o };\n rootDoc = o;\n};\n\nconst getRootDoc = () => rootDoc;\n\nconst docTranslator = (parent, node, first) => {\n if (node.stmt === 'relation') {\n docTranslator(parent, node.state1, true);\n docTranslator(parent, node.state2, false);\n } else {\n if (node.stmt === 'state') {\n if (node.id === '[*]') {\n node.id = first ? parent.id + '_start' : parent.id + '_end';\n node.start = first;\n }\n }\n\n if (node.doc) {\n const doc = [];\n // Check for concurrency\n let i = 0;\n let currentDoc = [];\n for (i = 0; i < node.doc.length; i++) {\n if (node.doc[i].type === 'divider') {\n // debugger;\n const newNode = clone(node.doc[i]);\n newNode.doc = clone(currentDoc);\n doc.push(newNode);\n currentDoc = [];\n } else {\n currentDoc.push(node.doc[i]);\n }\n }\n\n // If any divider was encountered\n if (doc.length > 0 && currentDoc.length > 0) {\n const newNode = {\n stmt: 'state',\n id: generateId(),\n type: 'divider',\n doc: clone(currentDoc)\n };\n doc.push(clone(newNode));\n node.doc = doc;\n }\n\n node.doc.forEach(docNode => docTranslator(node, docNode, true));\n }\n }\n};\nconst getRootDocV2 = () => {\n docTranslator({ id: 'root' }, { id: 'root', doc: rootDoc }, true);\n return { id: 'root', doc: rootDoc };\n};\n\nconst extract = _doc => {\n // const res = { states: [], relations: [] };\n let doc;\n if (_doc.doc) {\n doc = _doc.doc;\n } else {\n doc = _doc;\n }\n // let doc = root.doc;\n // if (!doc) {\n // doc = root;\n // }\n logger.info(doc);\n clear();\n\n logger.info('Extract', doc);\n\n doc.forEach(item => {\n if (item.stmt === 'state') {\n addState(item.id, item.type, item.doc, item.description, item.note);\n }\n if (item.stmt === 'relation') {\n addRelation(item.state1.id, item.state2.id, item.description);\n }\n });\n};\n\nconst newDoc = () => {\n return {\n relations: [],\n states: {},\n documents: {}\n };\n};\n\nlet documents = {\n root: newDoc()\n};\n\nlet currentDocument = documents.root;\n\nlet startCnt = 0;\nlet endCnt = 0; // eslint-disable-line\n// let stateCnt = 0;\n\n/**\n * Function called by parser when a node definition has been found.\n * @param id\n * @param text\n * @param type\n * @param style\n */\nexport const addState = function(id, type, doc, descr, note) {\n if (typeof currentDocument.states[id] === 'undefined') {\n currentDocument.states[id] = {\n id: id,\n descriptions: [],\n type,\n doc,\n note\n };\n } else {\n if (!currentDocument.states[id].doc) {\n currentDocument.states[id].doc = doc;\n }\n if (!currentDocument.states[id].type) {\n currentDocument.states[id].type = type;\n }\n }\n if (descr) {\n logger.info('Adding state ', id, descr);\n if (typeof descr === 'string') addDescription(id, descr.trim());\n\n if (typeof descr === 'object') {\n descr.forEach(des => addDescription(id, des.trim()));\n }\n }\n\n if (note) currentDocument.states[id].note = note;\n};\n\nexport const clear = function() {\n documents = {\n root: newDoc()\n };\n currentDocument = documents.root;\n\n currentDocument = documents.root;\n\n startCnt = 0;\n endCnt = 0; // eslint-disable-line\n classes = [];\n};\n\nexport const getState = function(id) {\n return currentDocument.states[id];\n};\n\nexport const getStates = function() {\n return currentDocument.states;\n};\nexport const logDocuments = function() {\n logger.info('Documents = ', documents);\n};\nexport const getRelations = function() {\n return currentDocument.relations;\n};\n\nexport const addRelation = function(_id1, _id2, title) {\n let id1 = _id1;\n let id2 = _id2;\n let type1 = 'default';\n let type2 = 'default';\n if (_id1 === '[*]') {\n startCnt++;\n id1 = 'start' + startCnt;\n type1 = 'start';\n }\n if (_id2 === '[*]') {\n endCnt++;\n id2 = 'end' + startCnt;\n type2 = 'end';\n }\n addState(id1, type1);\n addState(id2, type2);\n currentDocument.relations.push({ id1, id2, title });\n};\n\nconst addDescription = function(id, _descr) {\n const theState = currentDocument.states[id];\n let descr = _descr;\n if (descr[0] === ':') {\n descr = descr.substr(1).trim();\n }\n\n theState.descriptions.push(descr);\n};\n\nexport const cleanupLabel = function(label) {\n if (label.substring(0, 1) === ':') {\n return label.substr(2).trim();\n } else {\n return label.trim();\n }\n};\n\nexport const lineType = {\n LINE: 0,\n DOTTED_LINE: 1\n};\n\nlet dividerCnt = 0;\nconst getDividerId = () => {\n dividerCnt++;\n return 'divider-id-' + dividerCnt;\n};\n\nlet classes = [];\n\nconst getClasses = () => classes;\n\nconst getDirection = () => 'TB';\n\nexport const relationType = {\n AGGREGATION: 0,\n EXTENSION: 1,\n COMPOSITION: 2,\n DEPENDENCY: 3\n};\n\nconst trimColon = str => (str && str[0] === ':' ? str.substr(1).trim() : str.trim());\n\nexport default {\n addState,\n clear,\n getState,\n getStates,\n getRelations,\n getClasses,\n getDirection,\n addRelation,\n getDividerId,\n // addDescription,\n cleanupLabel,\n lineType,\n relationType,\n logDocuments,\n getRootDoc,\n setRootDoc,\n getRootDocV2,\n extract,\n trimColon\n};\n","import graphlib from 'graphlib';\nimport { select } from 'd3';\nimport stateDb from './stateDb';\nimport state from './parser/stateDiagram';\nimport { getConfig } from '../../config';\n\nimport { render } from '../../dagre-wrapper/index.js';\nimport { logger } from '../../logger';\n\nconst conf = {};\nexport const setConf = function(cnf) {\n const keys = Object.keys(cnf);\n for (let i = 0; i < keys.length; i++) {\n conf[keys[i]] = cnf[keys[i]];\n }\n};\n\nlet nodeDb = {};\n\n/**\n * Returns the all the styles from classDef statements in the graph definition.\n * @returns {object} classDef styles\n */\nexport const getClasses = function(text) {\n logger.trace('Extracting classes');\n stateDb.clear();\n const parser = state.parser;\n parser.yy = stateDb;\n\n // Parse the graph definition\n parser.parse(text);\n return stateDb.getClasses();\n};\n\nconst setupNode = (g, parent, node, altFlag) => {\n // Add the node\n if (node.id !== 'root') {\n let shape = 'rect';\n if (node.start === true) {\n shape = 'start';\n }\n if (node.start === false) {\n shape = 'end';\n }\n if (node.type !== 'default') {\n shape = node.type;\n }\n\n if (!nodeDb[node.id]) {\n nodeDb[node.id] = {\n id: node.id,\n shape,\n description: node.id,\n classes: 'statediagram-state'\n };\n }\n\n // Build of the array of description strings accordinging\n if (node.description) {\n if (Array.isArray(nodeDb[node.id].description)) {\n // There already is an array of strings,add to it\n nodeDb[node.id].shape = 'rectWithTitle';\n nodeDb[node.id].description.push(node.description);\n } else {\n if (nodeDb[node.id].description.length > 0) {\n // if there is a description already transformit to an array\n nodeDb[node.id].shape = 'rectWithTitle';\n if (nodeDb[node.id].description === node.id) {\n // If the previous description was the is, remove it\n nodeDb[node.id].description = [node.description];\n } else {\n nodeDb[node.id].description = [nodeDb[node.id].description, node.description];\n }\n } else {\n nodeDb[node.id].shape = 'rect';\n nodeDb[node.id].description = node.description;\n }\n }\n }\n\n // Save data for description and group so that for instance a statement without description overwrites\n // one with description\n\n // group\n if (!nodeDb[node.id].type && node.doc) {\n logger.info('Setting cluser for ', node.id);\n nodeDb[node.id].type = 'group';\n nodeDb[node.id].shape = node.type === 'divider' ? 'divider' : 'roundedWithTitle';\n nodeDb[node.id].classes =\n nodeDb[node.id].classes +\n ' ' +\n (altFlag ? 'statediagram-cluster statediagram-cluster-alt' : 'statediagram-cluster');\n }\n\n const nodeData = {\n labelStyle: '',\n shape: nodeDb[node.id].shape,\n labelText: nodeDb[node.id].description,\n classes: nodeDb[node.id].classes, //classStr,\n style: '', //styles.style,\n id: node.id,\n type: nodeDb[node.id].type,\n padding: 15 //getConfig().flowchart.padding\n };\n\n if (node.note) {\n // Todo: set random id\n const noteData = {\n labelStyle: '',\n shape: 'note',\n labelText: node.note.text,\n classes: 'statediagram-note', //classStr,\n style: '', //styles.style,\n id: node.id + '----note',\n type: nodeDb[node.id].type,\n padding: 15 //getConfig().flowchart.padding\n };\n const groupData = {\n labelStyle: '',\n shape: 'noteGroup',\n labelText: node.note.text,\n classes: nodeDb[node.id].classes, //classStr,\n style: '', //styles.style,\n id: node.id + '----parent',\n type: 'group',\n padding: 0 //getConfig().flowchart.padding\n };\n g.setNode(node.id + '----parent', groupData);\n\n g.setNode(noteData.id, noteData);\n g.setNode(node.id, nodeData);\n\n g.setParent(node.id, node.id + '----parent');\n g.setParent(noteData.id, node.id + '----parent');\n\n let from = node.id;\n let to = noteData.id;\n\n if (node.note.position === 'left of') {\n from = noteData.id;\n to = node.id;\n }\n g.setEdge(from, to, {\n arrowhead: 'none',\n arrowType: '',\n style: 'fill:none',\n labelStyle: '',\n classes: 'transition note-edge',\n arrowheadStyle: 'fill: #333',\n labelpos: 'c',\n labelType: 'text',\n thickness: 'normal'\n });\n } else {\n g.setNode(node.id, nodeData);\n }\n }\n\n if (parent) {\n if (parent.id !== 'root') {\n logger.info('Setting node ', node.id, ' to be child of its parent ', parent.id);\n g.setParent(node.id, parent.id);\n }\n }\n if (node.doc) {\n logger.info('Adding nodes children ');\n setupDoc(g, node, node.doc, !altFlag);\n }\n};\nlet cnt = 0;\nconst setupDoc = (g, parent, doc, altFlag) => {\n logger.trace('items', doc);\n doc.forEach(item => {\n if (item.stmt === 'state' || item.stmt === 'default') {\n setupNode(g, parent, item, altFlag);\n } else if (item.stmt === 'relation') {\n setupNode(g, parent, item.state1, altFlag);\n setupNode(g, parent, item.state2, altFlag);\n const edgeData = {\n id: 'edge' + cnt,\n arrowhead: 'normal',\n arrowTypeEnd: 'arrow_barb',\n style: 'fill:none',\n labelStyle: '',\n label: item.description,\n arrowheadStyle: 'fill: #333',\n labelpos: 'c',\n labelType: 'text',\n thickness: 'normal',\n classes: 'transition'\n };\n let startId = item.state1.id;\n let endId = item.state2.id;\n\n g.setEdge(startId, endId, edgeData, cnt);\n cnt++;\n }\n });\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\nexport const draw = function(text, id) {\n logger.info('Drawing state diagram (v2)', id);\n stateDb.clear();\n nodeDb = {};\n const parser = state.parser;\n parser.yy = stateDb;\n\n // Parse the graph definition\n try {\n parser.parse(text);\n } catch (err) {\n logger.debug('Parsing failed');\n }\n\n // Fetch the default direction, use TD if none was found\n let dir = stateDb.getDirection();\n if (typeof dir === 'undefined') {\n dir = 'LR';\n }\n\n const conf = getConfig().state;\n const nodeSpacing = conf.nodeSpacing || 50;\n const rankSpacing = conf.rankSpacing || 50;\n\n // Create the input mermaid.graph\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true\n })\n .setGraph({\n rankdir: 'TB',\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8\n })\n .setDefaultEdgeLabel(function() {\n return {};\n });\n\n logger.info(stateDb.getRootDocV2());\n stateDb.extract(stateDb.getRootDocV2());\n logger.info(stateDb.getRootDocV2());\n setupNode(g, undefined, stateDb.getRootDocV2(), true);\n\n // Set up an SVG group so that we can translate the final graph.\n const svg = select(`[id=\"${id}\"]`);\n\n // Run the renderer. This is what draws the final graph.\n const element = select('#' + id + ' g');\n render(element, g, ['barb'], 'statediagram', id);\n\n const padding = 8;\n // const svgBounds = svg.node().getBBox();\n // const width = svgBounds.width + padding * 2;\n // const height = svgBounds.height + padding * 2;\n // logger.debug(\n // `new ViewBox 0 0 ${width} ${height}`,\n // `translate(${padding + g._label.marginx}, ${padding + g._label.marginy})`\n // );\n\n // if (conf.useMaxWidth) {\n // svg.attr('width', '100%');\n // svg.attr('style', `max-width: ${width}px;`);\n // } else {\n // svg.attr('height', height);\n // svg.attr('width', width);\n // }\n\n // svg.attr('viewBox', `0 0 ${width} ${height}`);\n // svg\n // .select('g')\n // .attr('transform', `translate(${padding - g._label.marginx}, ${padding - svgBounds.y})`);\n\n const bounds = svg.node().getBBox();\n\n const width = bounds.width + padding * 2;\n const height = bounds.height + padding * 2;\n\n // diagram.attr('height', '100%');\n // diagram.attr('style', `width: ${bounds.width * 3 + conf.padding * 2};`);\n // diagram.attr('height', height);\n\n // Zoom in a bit\n svg.attr('width', width * 1.75);\n svg.attr('class', 'statediagram');\n // diagram.attr('height', bounds.height * 3 + conf.padding * 2);\n // svg.attr(\n // 'viewBox',\n // `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + ' ' + height\n // );\n\n const svgBounds = svg.node().getBBox();\n\n if (conf.useMaxWidth) {\n svg.attr('width', '100%');\n svg.attr('style', `max-width: ${width}px;`);\n } else {\n svg.attr('height', height);\n svg.attr('width', width);\n }\n\n // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;\n logger.debug(`viewBox ${vBox}`);\n svg.attr('viewBox', vBox);\n\n // Add label rects for non html labels\n if (!conf.htmlLabels) {\n const labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n for (let k = 0; k < labels.length; k++) {\n const label = labels[k];\n\n // Get dimensions of label\n const dim = label.getBBox();\n\n const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height);\n rect.setAttribute('style', 'fill:#e8e8e8;');\n\n label.insertBefore(rect, label.firstChild);\n }\n }\n};\n\nexport default {\n setConf,\n getClasses,\n draw\n};\n","import { select } from 'd3';\nimport dagre from 'dagre';\nimport graphlib from 'graphlib';\nimport { logger } from '../../logger';\nimport stateDb from './stateDb';\nimport common from '../common/common';\nimport { parser } from './parser/stateDiagram';\n// import idCache from './id-cache';\nimport { drawState, addTitleAndBox, drawEdge } from './shapes';\nimport { getConfig } from '../../config';\n\nparser.yy = stateDb;\n\n// TODO Move conf object to main conf in mermaidAPI\nlet conf;\n\nconst transformationLog = {};\n\nexport const setConf = function() {};\n\n// Todo optimize\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\nconst insertMarkers = function(elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\nexport const draw = function(text, id) {\n conf = getConfig().state;\n parser.yy.clear();\n parser.parse(text);\n logger.debug('Rendering diagram ' + text);\n\n // Fetch the default direction, use TD if none was found\n const diagram = select(`[id='${id}']`);\n insertMarkers(diagram);\n\n // Layout graph, Create a new directed graph\n const graph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n // acyclicer: 'greedy',\n rankdir: 'RL'\n // ranksep: '20'\n });\n\n // Default to assigning a new object as a label for each new edge.\n graph.setDefaultEdgeLabel(function() {\n return {};\n });\n\n const rootDoc = stateDb.getRootDoc();\n renderDoc(rootDoc, diagram, undefined, false);\n\n const padding = conf.padding;\n const bounds = diagram.node().getBBox();\n\n const width = bounds.width + padding * 2;\n const height = bounds.height + padding * 2;\n\n if (conf.useMaxWidth) {\n diagram.attr('width', '100%');\n diagram.attr('style', `max-width: ${width * 1.75}px;`);\n } else {\n // Zoom in a bit\n diagram.attr('width', width * 1.75);\n }\n // diagram.attr('height', bounds.height * 3 + conf.padding * 2);\n diagram.attr(\n 'viewBox',\n `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + ' ' + height\n );\n};\nconst getLabelWidth = text => {\n return text ? text.length * conf.fontSizeFactor : 1;\n};\n\nconst renderDoc = (doc, diagram, parentId, altBkg) => {\n // // Layout graph, Create a new directed graph\n const graph = new graphlib.Graph({\n compound: true,\n multigraph: true\n });\n\n let i;\n let edgeFreeDoc = true;\n for (i = 0; i < doc.length; i++) {\n if (doc[i].stmt === 'relation') {\n edgeFreeDoc = false;\n break;\n }\n }\n\n // Set an object for the graph label\n if (parentId)\n graph.setGraph({\n rankdir: 'LR',\n multigraph: true,\n compound: true,\n // acyclicer: 'greedy',\n ranker: 'tight-tree',\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n isMultiGraph: true\n // ranksep: 5,\n // nodesep: 1\n });\n else {\n graph.setGraph({\n rankdir: 'TB',\n multigraph: true,\n compound: true,\n // isCompound: true,\n // acyclicer: 'greedy',\n // ranker: 'longest-path'\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n ranker: 'tight-tree',\n // ranker: 'network-simplex'\n isMultiGraph: true\n });\n }\n\n // Default to assigning a new object as a label for each new edge.\n graph.setDefaultEdgeLabel(function() {\n return {};\n });\n\n stateDb.extract(doc);\n const states = stateDb.getStates();\n const relations = stateDb.getRelations();\n\n const keys = Object.keys(states);\n\n let first = true;\n\n for (let i = 0; i < keys.length; i++) {\n const stateDef = states[keys[i]];\n\n if (parentId) {\n stateDef.parentId = parentId;\n }\n\n let node;\n if (stateDef.doc) {\n let sub = diagram\n .append('g')\n .attr('id', stateDef.id)\n .attr('class', 'stateGroup');\n node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg);\n\n if (first) {\n // first = false;\n sub = addTitleAndBox(sub, stateDef, altBkg);\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height + conf.padding / 2;\n transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n } else {\n // sub = addIdAndBox(sub, stateDef);\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height;\n // transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n }\n } else {\n node = drawState(diagram, stateDef, graph);\n }\n\n if (stateDef.note) {\n // Draw note note\n const noteDef = {\n descriptions: [],\n id: stateDef.id + '-note',\n note: stateDef.note,\n type: 'note'\n };\n const note = drawState(diagram, noteDef, graph);\n\n // graph.setNode(node.id, node);\n if (stateDef.note.position === 'left of') {\n graph.setNode(node.id + '-note', note);\n graph.setNode(node.id, node);\n } else {\n graph.setNode(node.id, node);\n graph.setNode(node.id + '-note', note);\n }\n // graph.setNode(node.id);\n graph.setParent(node.id, node.id + '-group');\n graph.setParent(node.id + '-note', node.id + '-group');\n } else {\n // Add nodes to the graph. The first argument is the node id. The second is\n // metadata about the node. In this case we're going to add labels to each of\n // our nodes.\n graph.setNode(node.id, node);\n }\n }\n\n logger.debug('Count=', graph.nodeCount(), graph);\n let cnt = 0;\n relations.forEach(function(relation) {\n cnt++;\n logger.debug('Setting edge', relation);\n graph.setEdge(\n relation.id1,\n relation.id2,\n {\n relation: relation,\n width: getLabelWidth(relation.title),\n height: conf.labelHeight * common.getRows(relation.title).length,\n labelpos: 'c'\n },\n 'id' + cnt\n );\n });\n\n dagre.layout(graph);\n\n logger.debug('Graph after layout', graph.nodes());\n const svgElem = diagram.node();\n\n graph.nodes().forEach(function(v) {\n if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') {\n logger.warn('Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n select('#' + svgElem.id + ' #' + v).attr(\n 'transform',\n 'translate(' +\n (graph.node(v).x - graph.node(v).width / 2) +\n ',' +\n (graph.node(v).y +\n (transformationLog[v] ? transformationLog[v].y : 0) -\n graph.node(v).height / 2) +\n ' )'\n );\n select('#' + svgElem.id + ' #' + v).attr(\n 'data-x-shift',\n graph.node(v).x - graph.node(v).width / 2\n );\n const dividers = document.querySelectorAll('#' + svgElem.id + ' #' + v + ' .divider');\n dividers.forEach(divider => {\n const parent = divider.parentElement;\n let pWidth = 0;\n let pShift = 0;\n if (parent) {\n if (parent.parentElement) pWidth = parent.parentElement.getBBox().width;\n pShift = parseInt(parent.getAttribute('data-x-shift'), 10);\n if (Number.isNaN(pShift)) {\n pShift = 0;\n }\n }\n divider.setAttribute('x1', 0 - pShift + 8);\n divider.setAttribute('x2', pWidth - pShift - 8);\n });\n } else {\n logger.debug('No Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n }\n });\n\n let stateBox = svgElem.getBBox();\n\n graph.edges().forEach(function(e) {\n if (typeof e !== 'undefined' && typeof graph.edge(e) !== 'undefined') {\n logger.debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n drawEdge(diagram, graph.edge(e), graph.edge(e).relation);\n }\n });\n\n stateBox = svgElem.getBBox();\n\n const stateInfo = {\n id: parentId ? parentId : 'root',\n label: parentId ? parentId : 'root',\n width: 0,\n height: 0\n };\n\n stateInfo.width = stateBox.width + 2 * conf.padding;\n stateInfo.height = stateBox.height + 2 * conf.padding;\n\n logger.debug('Doc rendered', stateInfo, graph);\n return stateInfo;\n};\n\nexport default {\n setConf,\n draw\n};\n","const getStyles = options =>\n `g.stateGroup text {\n fill: ${options.nodeBorder};\n stroke: none;\n font-size: 10px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n}\ng.stateGroup text {\n fill: ${options.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${options.labelColor};\n}\n\ng.stateGroup rect {\n fill: ${options.nodeBkg};\n stroke: ${options.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${options.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${options.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${options.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: ${options.noteBorderColor};\n fill: ${options.noteBkgColor};\n\n text {\n fill: black;\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${options.nodeBkg};\n opacity: 0.5;\n}\n\n.stateLabel text {\n fill: ${options.labelColor};\n font-size: 10px;\n font-weight: bold;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n}\n\n.node circle.state-start {\n fill: black;\n stroke: black;\n}\n.node circle.state-end {\n fill: black;\n stroke: white;\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${options.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${options.nodeBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${options.textColor};\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${options.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${options.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: #e0e0e0;\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: ${options.altBackground ? options.altBackground : '#efefef'};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${options.noteBkgColor};\n stroke: ${options.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${options.noteBkgColor};\n stroke: ${options.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note .nodeLabel {\n color: ${options.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${options.lineColor};\n stroke: ${options.lineColor};\n stroke-width: 1;\n}\n`;\n\nexport default getStyles;\n","let title = '';\nlet currentSection = '';\n\nconst sections = [];\nconst tasks = [];\nconst rawTasks = [];\n\nexport const clear = function() {\n sections.length = 0;\n tasks.length = 0;\n currentSection = '';\n title = '';\n rawTasks.length = 0;\n};\n\nexport const setTitle = function(txt) {\n title = txt;\n};\n\nexport const getTitle = function() {\n return title;\n};\n\nexport const addSection = function(txt) {\n currentSection = txt;\n sections.push(txt);\n};\n\nexport const getSections = function() {\n return sections;\n};\n\nexport const getTasks = function() {\n let allItemsProcessed = compileTasks();\n const maxDepth = 100;\n let iterationCount = 0;\n while (!allItemsProcessed && iterationCount < maxDepth) {\n allItemsProcessed = compileTasks();\n iterationCount++;\n }\n\n tasks.push(...rawTasks);\n\n return tasks;\n};\n\nconst updateActors = function() {\n const tempActors = [];\n tasks.forEach(task => {\n if (task.people) {\n tempActors.push(...task.people);\n }\n });\n\n const unique = new Set(tempActors);\n return [...unique].sort();\n};\n\nexport const addTask = function(descr, taskData) {\n const pieces = taskData.substr(1).split(':');\n\n let score = 0;\n let peeps = [];\n if (pieces.length === 1) {\n score = Number(pieces[0]);\n peeps = [];\n } else {\n score = Number(pieces[0]);\n peeps = pieces[1].split(',');\n }\n const peopleList = peeps.map(s => s.trim());\n\n const rawTask = {\n section: currentSection,\n type: currentSection,\n people: peopleList,\n task: descr,\n score\n };\n\n rawTasks.push(rawTask);\n};\n\nexport const addTaskOrg = function(descr) {\n const newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: []\n };\n tasks.push(newTask);\n};\n\nconst compileTasks = function() {\n const compileTask = function(pos) {\n return rawTasks[pos].processed;\n };\n\n let allProcessed = true;\n for (let i = 0; i < rawTasks.length; i++) {\n compileTask(i);\n\n allProcessed = allProcessed && rawTasks[i].processed;\n }\n return allProcessed;\n};\n\nconst getActors = function() {\n return updateActors();\n};\n\nexport default {\n clear,\n setTitle,\n getTitle,\n addSection,\n getSections,\n getTasks,\n addTask,\n addTaskOrg,\n getActors\n};\n","import { select } from 'd3';\nimport { parser } from './parser/journey';\nimport journeyDb from './journeyDb';\nimport svgDraw from './svgDraw';\n\nparser.yy = journeyDb;\n\nconst conf = {\n leftMargin: 150,\n diagramMarginX: 50,\n diagramMarginY: 20,\n // Margin between tasks\n taskMargin: 50,\n // Width of task boxes\n width: 150,\n // Height of task boxes\n height: 50,\n taskFontSize: 14,\n taskFontFamily: '\"Open-Sans\", \"sans-serif\"',\n // Margin around loop boxes\n boxMargin: 10,\n boxTextMargin: 5,\n noteMargin: 10,\n // Space between messages\n messageMargin: 35,\n // Multiline message alignment\n messageAlign: 'center',\n // Depending on css styling this might need adjustment\n // Projects the edge of the diagram downwards\n bottomMarginAdj: 1,\n\n // width of activation box\n activationWidth: 10,\n\n // text placement as: tspan | fo | old only text as before\n textPlacement: 'fo',\n\n actorColours: ['#8FBC8F', '#7CFC00', '#00FFFF', '#20B2AA', '#B0E0E6', '#FFFFE0'],\n\n sectionFills: ['#191970', '#8B008B', '#4B0082', '#2F4F4F', '#800000', '#8B4513', '#00008B'],\n sectionColours: ['#fff']\n};\n\nexport const setConf = function(cnf) {\n const keys = Object.keys(cnf);\n\n keys.forEach(function(key) {\n conf[key] = cnf[key];\n });\n};\n\nconst actors = {};\n\nfunction drawActorLegend(diagram) {\n // Draw the actors\n let yPos = 60;\n Object.keys(actors).forEach(person => {\n const colour = actors[person];\n\n const circleData = {\n cx: 20,\n cy: yPos,\n r: 7,\n fill: colour,\n stroke: '#000'\n };\n svgDraw.drawCircle(diagram, circleData);\n\n const labelData = {\n x: 40,\n y: yPos + 7,\n fill: '#666',\n text: person\n };\n svgDraw.drawText(diagram, labelData);\n\n yPos += 20;\n });\n}\n\nconst LEFT_MARGIN = conf.leftMargin;\nexport const draw = function(text, id) {\n parser.yy.clear();\n parser.parse(text + '\\n');\n\n bounds.init();\n const diagram = select('#' + id);\n diagram.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n\n svgDraw.initGraphics(diagram);\n\n const tasks = parser.yy.getTasks();\n const title = parser.yy.getTitle();\n\n const actorNames = parser.yy.getActors();\n for (let member in actors) delete actors[member];\n let actorPos = 0;\n actorNames.forEach(actorName => {\n actors[actorName] = conf.actorColours[actorPos % conf.actorColours.length];\n actorPos++;\n });\n\n drawActorLegend(diagram);\n bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);\n\n drawTasks(diagram, tasks, 0);\n\n const box = bounds.getBounds();\n if (title) {\n diagram\n .append('text')\n .text(title)\n .attr('x', LEFT_MARGIN)\n .attr('font-size', '4ex')\n .attr('font-weight', 'bold')\n .attr('y', 25);\n }\n const height = box.stopy - box.starty + 2 * conf.diagramMarginY;\n const width = LEFT_MARGIN + box.stopx + 2 * conf.diagramMarginX;\n if (conf.useMaxWidth) {\n diagram.attr('height', '100%');\n diagram.attr('width', '100%');\n diagram.attr('style', 'max-width:' + width + 'px;');\n } else {\n diagram.attr('height', height);\n diagram.attr('width', width);\n }\n\n // Draw activity line\n diagram\n .append('line')\n .attr('x1', LEFT_MARGIN)\n .attr('y1', conf.height * 4) // One section head + one task + margins\n .attr('x2', width - LEFT_MARGIN - 4) // Subtract stroke width so arrow point is retained\n .attr('y2', conf.height * 4)\n .attr('stroke-width', 4)\n .attr('stroke', 'black')\n .attr('marker-end', 'url(#arrowhead)');\n\n const extraVertForTitle = title ? 70 : 0;\n diagram.attr('viewBox', `${box.startx} -25 ${width} ${height + extraVertForTitle}`);\n diagram.attr('preserveAspectRatio', 'xMinYMin meet');\n};\n\nexport const bounds = {\n data: {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined\n },\n verticalPos: 0,\n\n sequenceItems: [],\n init: function() {\n this.sequenceItems = [];\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined\n };\n this.verticalPos = 0;\n },\n updateVal: function(obj, key, val, fun) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n },\n updateBounds: function(startx, starty, stopx, stopy) {\n const _self = this;\n let cnt = 0;\n function updateFn(type) {\n return function updateItemBounds(item) {\n cnt++;\n // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems\n const n = _self.sequenceItems.length - cnt + 1;\n\n _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n if (!(type === 'activation')) {\n _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);\n }\n };\n }\n\n this.sequenceItems.forEach(updateFn());\n },\n insert: function(startx, starty, stopx, stopy) {\n const _startx = Math.min(startx, stopx);\n const _stopx = Math.max(startx, stopx);\n const _starty = Math.min(starty, stopy);\n const _stopy = Math.max(starty, stopy);\n\n this.updateVal(bounds.data, 'startx', _startx, Math.min);\n this.updateVal(bounds.data, 'starty', _starty, Math.min);\n this.updateVal(bounds.data, 'stopx', _stopx, Math.max);\n this.updateVal(bounds.data, 'stopy', _stopy, Math.max);\n\n this.updateBounds(_startx, _starty, _stopx, _stopy);\n },\n bumpVerticalPos: function(bump) {\n this.verticalPos = this.verticalPos + bump;\n this.data.stopy = this.verticalPos;\n },\n getVerticalPos: function() {\n return this.verticalPos;\n },\n getBounds: function() {\n return this.data;\n }\n};\n\nconst fills = conf.sectionFills;\nconst textColours = conf.sectionColours;\n\nexport const drawTasks = function(diagram, tasks, verticalPos) {\n let lastSection = '';\n const sectionVHeight = conf.height * 2 + conf.diagramMarginY;\n const taskPos = verticalPos + sectionVHeight;\n\n let sectionNumber = 0;\n let fill = '#CCC';\n let colour = 'black';\n let num = 0;\n\n // Draw the tasks\n for (let i = 0; i < tasks.length; i++) {\n let task = tasks[i];\n if (lastSection !== task.section) {\n fill = fills[sectionNumber % fills.length];\n num = sectionNumber % fills.length;\n colour = textColours[sectionNumber % textColours.length];\n\n const section = {\n x: i * conf.taskMargin + i * conf.width + LEFT_MARGIN,\n y: 50,\n text: task.section,\n fill,\n num,\n colour\n };\n\n svgDraw.drawSection(diagram, section, conf);\n lastSection = task.section;\n sectionNumber++;\n }\n\n // Collect the actors involved in the task\n const taskActors = task.people.reduce((acc, actorName) => {\n if (actors[actorName]) {\n acc[actorName] = actors[actorName];\n }\n\n return acc;\n }, {});\n\n // Add some rendering data to the object\n task.x = i * conf.taskMargin + i * conf.width + LEFT_MARGIN;\n task.y = taskPos;\n task.width = conf.diagramMarginX;\n task.height = conf.diagramMarginY;\n task.colour = colour;\n task.fill = fill;\n task.num = num;\n task.actors = taskActors;\n\n // Draw the box with the attached line\n svgDraw.drawTask(diagram, task, conf);\n bounds.insert(task.x, task.y, task.x + task.width + conf.taskMargin, 300 + 5 * 30); // stopy is the length of the descenders.\n }\n};\n\nexport default {\n setConf,\n draw\n};\n","/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,11,12,13],$V1=[1,9],$V2=[1,10],$V3=[1,11];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"journey\":4,\"document\":5,\"EOF\":6,\"line\":7,\"SPACE\":8,\"statement\":9,\"NL\":10,\"title\":11,\"section\":12,\"taskName\":13,\"taskData\":14,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"journey\",6:\"EOF\",8:\"SPACE\",10:\"NL\",11:\"title\",12:\"section\",13:\"taskName\",14:\"taskData\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,2]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return $$[$0-1]; \nbreak;\ncase 2:\n this.$ = [] \nbreak;\ncase 3:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 4: case 5:\n this.$ = $$[$0] \nbreak;\ncase 6: case 7:\n this.$=[];\nbreak;\ncase 8:\nyy.setTitle($$[$0].substr(6));this.$=$$[$0].substr(6);\nbreak;\ncase 9:\nyy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);\nbreak;\ncase 10:\nyy.addTask($$[$0-1], $$[$0]);this.$='task';\nbreak;\n}\n},\ntable: [{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,13:$V3},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:12,11:$V1,12:$V2,13:$V3},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,8]),o($V0,[2,9]),{14:[1,13]},o($V0,[2,4]),o($V0,[2,10])],\ndefaultActions: {},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// 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.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n 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(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 10;\nbreak;\ncase 1:/* skip whitespace */\nbreak;\ncase 2:/* skip comments */\nbreak;\ncase 3:/* skip comments */\nbreak;\ncase 4:return 4;\nbreak;\ncase 5:return 11;\nbreak;\ncase 6:return 12;\nbreak;\ncase 7:return 13;\nbreak;\ncase 8:return 14;\nbreak;\ncase 9:return ':';\nbreak;\ncase 10:return 6;\nbreak;\ncase 11:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:journey\\b)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:section\\s[^#:\\n;]+)/i,/^(?:[^#:\\n;]+)/i,/^(?::[^#\\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,9,10,11],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof require !== 'undefined' && typeof exports !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n if (!args[1]) {\n console.log('Usage: '+args[0]+' FILE');\n process.exit(1);\n }\n var source = require('fs').readFileSync(require('path').normalize(args[1]), \"utf8\");\n return exports.parser.parse(source);\n};\nif (typeof module !== 'undefined' && require.main === module) {\n exports.main(process.argv.slice(1));\n}\n}","const getStyles = options =>\n `.label {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n color: ${options.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${options.textColor}\n }\n\n .legend {\n fill: ${options.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${options.textColor}\n }\n\n .face {\n fill: #FFF8DC;\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ${options.secondBkg};\n stroke: ${options.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${options.secondBkg};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${options.fillType0 ? `fill: ${options.fillType0}` : ''};\n }\n .task-type-1, .section-type-1 {\n ${options.fillType0 ? `fill: ${options.fillType1}` : ''};\n }\n .task-type-2, .section-type-2 {\n ${options.fillType0 ? `fill: ${options.fillType2}` : ''};\n }\n .task-type-3, .section-type-3 {\n ${options.fillType0 ? `fill: ${options.fillType3}` : ''};\n }\n .task-type-4, .section-type-4 {\n ${options.fillType0 ? `fill: ${options.fillType4}` : ''};\n }\n .task-type-5, .section-type-5 {\n ${options.fillType0 ? `fill: ${options.fillType5}` : ''};\n }\n .task-type-6, .section-type-6 {\n ${options.fillType0 ? `fill: ${options.fillType6}` : ''};\n }\n .task-type-7, .section-type-7 {\n ${options.fillType0 ? `fill: ${options.fillType7}` : ''};\n }\n`;\n\nexport default getStyles;\n","import { arc as d3arc } from 'd3';\n\nexport const drawRect = function(elem, rectData) {\n const rectElem = elem.append('rect');\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.y);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', rectData.width);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n\n if (typeof rectData.class !== 'undefined') {\n rectElem.attr('class', rectData.class);\n }\n\n return rectElem;\n};\n\nexport const drawFace = function(element, faceData) {\n const radius = 15;\n const circleElement = element\n .append('circle')\n .attr('cx', faceData.cx)\n .attr('cy', faceData.cy)\n .attr('class', 'face')\n .attr('r', radius)\n .attr('stroke-width', 2)\n .attr('overflow', 'visible');\n\n const face = element.append('g');\n\n //left eye\n face\n .append('circle')\n .attr('cx', faceData.cx - radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n //right eye\n face\n .append('circle')\n .attr('cx', faceData.cx + radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n function smile(face) {\n const arc = d3arc()\n .startAngle(Math.PI / 2)\n .endAngle(3 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 2) + ')');\n }\n\n function sad(face) {\n const arc = d3arc()\n .startAngle((3 * Math.PI) / 2)\n .endAngle(5 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 7) + ')');\n }\n\n function ambivalent(face) {\n face\n .append('line')\n .attr('class', 'mouth')\n .attr('stroke', 2)\n .attr('x1', faceData.cx - 5)\n .attr('y1', faceData.cy + 7)\n .attr('x2', faceData.cx + 5)\n .attr('y2', faceData.cy + 7)\n .attr('class', 'mouth')\n .attr('stroke-width', '1px')\n .attr('stroke', '#666');\n }\n\n if (faceData.score > 3) {\n smile(face);\n } else if (faceData.score < 3) {\n sad(face);\n } else {\n ambivalent(face);\n }\n\n return circleElement;\n};\n\nexport const drawCircle = function(element, circleData) {\n const circleElement = element.append('circle');\n circleElement.attr('cx', circleData.cx);\n circleElement.attr('cy', circleData.cy);\n circleElement.attr('fill', circleData.fill);\n circleElement.attr('stroke', circleData.stroke);\n circleElement.attr('r', circleData.r);\n\n if (typeof circleElement.class !== 'undefined') {\n circleElement.attr('class', circleElement.class);\n }\n\n if (typeof circleData.title !== 'undefined') {\n circleElement.append('title').text(circleData.title);\n }\n\n return circleElement;\n};\n\nexport const drawText = function(elem, textData) {\n // Remove and ignore br:s\n const nText = textData.text.replace(/
/gi, ' ');\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.attr('class', 'legend');\n\n textElem.style('text-anchor', textData.anchor);\n\n if (typeof textData.class !== 'undefined') {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.text(nText);\n\n return textElem;\n};\n\nexport const drawLabel = function(elem, txtObject) {\n function genPoints(x, y, width, height, cut) {\n return (\n x +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n (y + height - cut) +\n ' ' +\n (x + width - cut * 1.2) +\n ',' +\n (y + height) +\n ' ' +\n x +\n ',' +\n (y + height)\n );\n }\n const polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));\n polygon.attr('class', 'labelBox');\n\n txtObject.y = txtObject.y + txtObject.labelMargin;\n txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;\n drawText(elem, txtObject);\n};\n\nexport const drawSection = function(elem, section, conf) {\n const g = elem.append('g');\n\n const rect = getNoteRect();\n rect.x = section.x;\n rect.y = section.y;\n rect.fill = section.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect.class = 'journey-section section-type-' + section.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n _drawTextCandidateFunc(conf)(\n section.text,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'journey-section section-type-' + section.num },\n conf,\n section.colour\n );\n};\n\nlet taskCount = -1;\n/**\n * Draws an actor in the diagram with the attaced line\n * @param elem The HTML element\n * @param task The task to render\n * @param conf The global configuration\n */\nexport const drawTask = function(elem, task, conf) {\n const center = task.x + conf.width / 2;\n const g = elem.append('g');\n taskCount++;\n const maxHeight = 300 + 5 * 30;\n g.append('line')\n .attr('id', 'task' + taskCount)\n .attr('x1', center)\n .attr('y1', task.y)\n .attr('x2', center)\n .attr('y2', maxHeight)\n .attr('class', 'task-line')\n .attr('stroke-width', '1px')\n .attr('stroke-dasharray', '4 2')\n .attr('stroke', '#666');\n\n drawFace(g, {\n cx: center,\n cy: 300 + (5 - task.score) * 30,\n score: task.score\n });\n\n const rect = getNoteRect();\n rect.x = task.x;\n rect.y = task.y;\n rect.fill = task.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect.class = 'task task-type-' + task.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n let xPos = task.x + 14;\n task.people.forEach(person => {\n const colour = task.actors[person];\n\n const circle = {\n cx: xPos,\n cy: task.y,\n r: 7,\n fill: colour,\n stroke: '#000',\n title: person\n };\n\n drawCircle(g, circle);\n xPos += 10;\n });\n\n _drawTextCandidateFunc(conf)(\n task.task,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'task' },\n conf,\n task.colour\n );\n};\n\n/**\n * Draws a background rectangle\n * @param elem The html element\n * @param bounds The bounds of the drawing\n */\nexport const drawBackgroundRect = function(elem, bounds) {\n const rectElem = drawRect(elem, {\n x: bounds.startx,\n y: bounds.starty,\n width: bounds.stopx - bounds.startx,\n height: bounds.stopy - bounds.starty,\n fill: bounds.fill,\n class: 'rect'\n });\n rectElem.lower();\n};\n\nexport const getTextObj = function() {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n 'text-anchor': 'start',\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0\n };\n};\n\nexport const getNoteRect = function() {\n return {\n x: 0,\n y: 0,\n width: 100,\n anchor: 'start',\n height: 100,\n rx: 0,\n ry: 0\n };\n};\n\nconst _drawTextCandidateFunc = (function() {\n function byText(content, g, x, y, width, height, textAttrs, colour) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('font-color', colour)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) {\n const { taskFontSize, taskFontFamily } = conf;\n\n const lines = content.split(/
/gi);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * taskFontSize - (taskFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .attr('fill', colour)\n .style('text-anchor', 'middle')\n .style('font-size', taskFontSize)\n .style('font-family', taskFontFamily);\n text\n .append('tspan')\n .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const body = g.append('switch');\n const f = body\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('position', 'fixed');\n\n const text = f\n .append('div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .attr('class', 'label')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n // .style('color', colour)\n .text(content);\n\n byTspan(content, body, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (key in fromTextAttrsDict) {\n // eslint-disable-line\n // noinspection JSUnfilteredForInLoop\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function(conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nconst initGraphics = function(graphics) {\n graphics\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 5)\n .attr('refY', 2)\n .attr('markerWidth', 6)\n .attr('markerHeight', 4)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead\n};\n\nexport default {\n drawRect,\n drawCircle,\n drawSection,\n drawText,\n drawLabel,\n drawTask,\n drawBackgroundRect,\n getTextObj,\n getNoteRect,\n initGraphics\n};\n","/**\n * Created by knut on 14-12-11.\n */\nimport { select } from 'd3';\nimport { logger } from './logger';\n\nconst conf = {};\nexport const setConf = function(cnf) {\n const keys = Object.keys(cnf);\n\n keys.forEach(function(key) {\n conf[key] = cnf[key];\n });\n};\n\n/**\n * Draws a an info picture in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\nexport const draw = (id, ver) => {\n try {\n logger.debug('Renering svg for syntax error\\n');\n\n const svg = select('#' + id);\n\n const g = svg.append('g');\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z'\n );\n\n g.append('text') // text label for the x axis\n .attr('class', 'error-text')\n .attr('x', 1240)\n .attr('y', 250)\n .attr('font-size', '150px')\n .style('text-anchor', 'middle')\n .text('Syntax error in graph');\n g.append('text') // text label for the x axis\n .attr('class', 'error-text')\n .attr('x', 1050)\n .attr('y', 400)\n .attr('font-size', '100px')\n .style('text-anchor', 'middle')\n .text('mermaid version ' + ver);\n\n svg.attr('height', 100);\n svg.attr('width', 400);\n svg.attr('viewBox', '768 0 512 512');\n } catch (e) {\n logger.error('Error while rendering info diagram');\n logger.error(e.message);\n }\n};\n\nexport default {\n setConf,\n draw\n};\n","import moment from 'moment-mini';\n//\nexport const LEVELS = {\n debug: 1,\n info: 2,\n warn: 3,\n error: 4,\n fatal: 5\n};\n\nexport const logger = {\n debug: () => {},\n info: () => {},\n warn: () => {},\n error: () => {},\n fatal: () => {}\n};\n\nexport const setLogLevel = function(level = 'fatal') {\n if (isNaN(level)) {\n level = level.toLowerCase();\n if (LEVELS[level] !== undefined) {\n level = LEVELS[level];\n }\n }\n logger.trace = () => {};\n logger.debug = () => {};\n logger.info = () => {};\n logger.warn = () => {};\n logger.error = () => {};\n logger.fatal = () => {};\n if (level <= LEVELS.fatal) {\n logger.fatal = console.error\n ? console.error.bind(console, format('FATAL'), 'color: orange')\n : console.log.bind(console, '\\x1b[35m', format('FATAL'));\n }\n if (level <= LEVELS.error) {\n logger.error = console.error\n ? console.error.bind(console, format('ERROR'), 'color: orange')\n : console.log.bind(console, '\\x1b[31m', format('ERROR'));\n }\n if (level <= LEVELS.warn) {\n logger.warn = console.warn\n ? console.warn.bind(console, format('WARN'), 'color: orange')\n : console.log.bind(console, `\\x1b[33m`, format('WARN'));\n }\n if (level <= LEVELS.info) {\n logger.info = console.info\n ? // ? console.info.bind(console, '\\x1b[34m', format('INFO'), 'color: blue')\n console.info.bind(console, format('INFO'), 'color: lightblue')\n : console.log.bind(console, '\\x1b[34m', format('INFO'));\n }\n if (level <= LEVELS.debug) {\n logger.debug = console.debug\n ? console.debug.bind(console, format('DEBUG'), 'color: lightgreen')\n : console.log.bind(console, '\\x1b[32m', format('DEBUG'));\n }\n};\n\nconst format = level => {\n const time = moment().format('ss.SSS');\n return `%c${time} : ${level} : `;\n};\n","/**\n * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid functionality and to render\n * the diagrams to svg code.\n */\n// import { decode } from 'he';\nimport decode from 'entity-decode/browser';\nimport mermaidAPI from './mermaidAPI';\nimport { logger } from './logger';\nimport utils from './utils';\n\n/**\n * ## init\n * Function that goes through the document to find the chart definitions in there and render them.\n *\n * The function tags the processed attributes with the attribute data-processed and ignores found elements with the\n * attribute already set. This way the init function can be triggered several times.\n *\n * Optionally, `init` can accept in the second argument one of the following:\n * - a DOM Node\n * - an array of DOM nodes (as would come from a jQuery selector)\n * - a W3C selector, a la `.mermaid`\n *\n * ```mermaid\n * graph LR;\n * a(Find elements)-->b{Processed}\n * b-->|Yes|c(Leave element)\n * b-->|No |d(Transform)\n * ```\n * Renders the mermaid diagrams\n * @param nodes a css selector or an array of nodes\n */\nconst init = function() {\n const conf = mermaidAPI.getConfig();\n // console.log('Starting rendering diagrams (init) - mermaid.init');\n let nodes;\n if (arguments.length >= 2) {\n /*! sequence config was passed as #1 */\n if (typeof arguments[0] !== 'undefined') {\n mermaid.sequenceConfig = arguments[0];\n }\n\n nodes = arguments[1];\n } else {\n nodes = arguments[0];\n }\n\n // if last argument is a function this is the callback function\n let callback;\n if (typeof arguments[arguments.length - 1] === 'function') {\n callback = arguments[arguments.length - 1];\n logger.debug('Callback function found');\n } else {\n if (typeof conf.mermaid !== 'undefined') {\n if (typeof conf.mermaid.callback === 'function') {\n callback = conf.mermaid.callback;\n logger.debug('Callback function found');\n } else {\n logger.debug('No Callback function found');\n }\n }\n }\n nodes =\n nodes === undefined\n ? document.querySelectorAll('.mermaid')\n : typeof nodes === 'string'\n ? document.querySelectorAll(nodes)\n : nodes instanceof window.Node\n ? [nodes]\n : nodes; // Last case - sequence config was passed pick next\n\n logger.debug('Start On Load before: ' + mermaid.startOnLoad);\n if (typeof mermaid.startOnLoad !== 'undefined') {\n logger.debug('Start On Load inner: ' + mermaid.startOnLoad);\n mermaidAPI.initialize({ startOnLoad: mermaid.startOnLoad });\n }\n\n if (typeof mermaid.ganttConfig !== 'undefined') {\n mermaidAPI.initialize({ gantt: mermaid.ganttConfig });\n }\n\n let txt;\n\n for (let i = 0; i < nodes.length; i++) {\n const element = nodes[i];\n\n /*! Check if previously processed */\n if (!element.getAttribute('data-processed')) {\n element.setAttribute('data-processed', true);\n } else {\n continue;\n }\n\n const id = `mermaid-${Date.now()}`;\n\n // Fetch the graph definition including tags\n txt = element.innerHTML;\n\n // transforms the html to pure text\n txt = decode(txt)\n .trim()\n .replace(/
/gi, '
');\n\n const init = utils.detectInit(txt);\n if (init) {\n logger.debug('Detected early reinit: ', init);\n }\n\n try {\n mermaidAPI.render(\n id,\n txt,\n (svgCode, bindFunctions) => {\n element.innerHTML = svgCode;\n if (typeof callback !== 'undefined') {\n callback(id);\n }\n if (bindFunctions) bindFunctions(element);\n },\n element\n );\n } catch (e) {\n logger.warn('Syntax Error rendering');\n logger.warn(e);\n if (this.parseError) {\n this.parseError(e);\n }\n }\n }\n};\n\nconst initialize = function(config) {\n mermaidAPI.reset();\n if (typeof config.mermaid !== 'undefined') {\n if (typeof config.mermaid.startOnLoad !== 'undefined') {\n mermaid.startOnLoad = config.mermaid.startOnLoad;\n }\n if (typeof config.mermaid.htmlLabels !== 'undefined') {\n mermaid.htmlLabels = config.mermaid.htmlLabels;\n }\n }\n mermaidAPI.initialize(config);\n // mermaidAPI.reset();\n};\n\n/**\n * ##contentLoaded\n * Callback function that is called when page is loaded. This functions fetches configuration for mermaid rendering and\n * calls init for rendering the mermaid diagrams on the page.\n */\nconst contentLoaded = function() {\n let config;\n\n if (mermaid.startOnLoad) {\n // No config found, do check API config\n config = mermaidAPI.getConfig();\n if (config.startOnLoad) {\n mermaid.init();\n }\n } else {\n if (typeof mermaid.startOnLoad === 'undefined') {\n logger.debug('In start, no config');\n config = mermaidAPI.getConfig();\n if (config.startOnLoad) {\n mermaid.init();\n }\n }\n }\n};\n\nif (typeof document !== 'undefined') {\n /*!\n * Wait for document loaded before starting the execution\n */\n window.addEventListener(\n 'load',\n function() {\n contentLoaded();\n },\n false\n );\n}\n\nconst mermaid = {\n startOnLoad: true,\n htmlLabels: true,\n\n mermaidAPI,\n parse: mermaidAPI.parse,\n render: mermaidAPI.render,\n\n init,\n initialize,\n\n contentLoaded\n};\n\nexport default mermaid;\n","/**\n * This is the api to be used when optionally handling the integration with the web page, instead of using the default integration provided by mermaid.js.\n *\n * The core of this api is the [**render**](Setup.md?id=render) function which, given a graph\n * definition as text, renders the graph/diagram and returns an svg element for the graph.\n *\n * It is is then up to the user of the API to make use of the svg, either insert it somewhere in the page or do something completely different.\n *\n * In addition to the render function, a number of behavioral configuration options are available.\n *\n * @name mermaidAPI\n */\nimport Stylis from 'stylis';\nimport { select } from 'd3';\nimport pkg from '../package.json';\nimport { setConfig, getConfig, setSiteConfig, getSiteConfig } from './config';\nimport { logger, setLogLevel } from './logger';\nimport utils, { assignWithDepth } from './utils';\nimport flowRenderer from './diagrams/flowchart/flowRenderer';\nimport flowRendererV2 from './diagrams/flowchart/flowRenderer-v2';\nimport flowParser from './diagrams/flowchart/parser/flow';\nimport flowDb from './diagrams/flowchart/flowDb';\nimport sequenceRenderer from './diagrams/sequence/sequenceRenderer';\nimport sequenceParser from './diagrams/sequence/parser/sequenceDiagram';\nimport sequenceDb from './diagrams/sequence/sequenceDb';\nimport ganttRenderer from './diagrams/gantt/ganttRenderer';\nimport ganttParser from './diagrams/gantt/parser/gantt';\nimport ganttDb from './diagrams/gantt/ganttDb';\nimport classRenderer from './diagrams/class/classRenderer';\nimport classRendererV2 from './diagrams/class/classRenderer-v2';\nimport classParser from './diagrams/class/parser/classDiagram';\nimport classDb from './diagrams/class/classDb';\nimport stateRenderer from './diagrams/state/stateRenderer';\nimport stateRendererV2 from './diagrams/state/stateRenderer-v2';\nimport stateParser from './diagrams/state/parser/stateDiagram';\nimport stateDb from './diagrams/state/stateDb';\nimport gitGraphRenderer from './diagrams/git/gitGraphRenderer';\nimport gitGraphParser from './diagrams/git/parser/gitGraph';\nimport gitGraphAst from './diagrams/git/gitGraphAst';\nimport infoRenderer from './diagrams/info/infoRenderer';\nimport errorRenderer from './errorRenderer';\nimport infoParser from './diagrams/info/parser/info';\nimport infoDb from './diagrams/info/infoDb';\nimport pieRenderer from './diagrams/pie/pieRenderer';\nimport pieParser from './diagrams/pie/parser/pie';\nimport pieDb from './diagrams/pie/pieDb';\nimport erDb from './diagrams/er/erDb';\nimport erParser from './diagrams/er/parser/erDiagram';\nimport erRenderer from './diagrams/er/erRenderer';\nimport journeyParser from './diagrams/user-journey/parser/journey';\nimport journeyDb from './diagrams/user-journey/journeyDb';\nimport journeyRenderer from './diagrams/user-journey/journeyRenderer';\nimport configApi from './config';\nimport getStyles from './styles';\nimport theme from './themes';\n\nfunction parse(text) {\n const graphInit = utils.detectInit(text);\n if (graphInit) {\n reinitialize(graphInit);\n logger.debug('reinit ', graphInit);\n }\n const graphType = utils.detectType(text);\n let parser;\n\n logger.debug('Type ' + graphType);\n switch (graphType) {\n case 'git':\n parser = gitGraphParser;\n parser.parser.yy = gitGraphAst;\n break;\n case 'flowchart':\n flowDb.clear();\n parser = flowParser;\n parser.parser.yy = flowDb;\n break;\n case 'flowchart-v2':\n flowDb.clear();\n parser = flowParser;\n parser.parser.yy = flowDb;\n break;\n case 'sequence':\n parser = sequenceParser;\n parser.parser.yy = sequenceDb;\n break;\n case 'gantt':\n parser = ganttParser;\n parser.parser.yy = ganttDb;\n break;\n case 'class':\n parser = classParser;\n parser.parser.yy = classDb;\n break;\n case 'classDiagram':\n parser = classParser;\n parser.parser.yy = classDb;\n break;\n case 'state':\n parser = stateParser;\n parser.parser.yy = stateDb;\n break;\n case 'stateDiagram':\n parser = stateParser;\n parser.parser.yy = stateDb;\n break;\n case 'info':\n logger.debug('info info info');\n parser = infoParser;\n parser.parser.yy = infoDb;\n break;\n case 'pie':\n logger.debug('pie');\n parser = pieParser;\n parser.parser.yy = pieDb;\n break;\n case 'er':\n logger.debug('er');\n parser = erParser;\n parser.parser.yy = erDb;\n break;\n case 'journey':\n logger.debug('Journey');\n parser = journeyParser;\n parser.parser.yy = journeyDb;\n break;\n }\n parser.parser.yy.graphType = graphType;\n parser.parser.yy.parseError = (str, hash) => {\n const error = { str, hash };\n throw error;\n };\n\n parser.parse(text);\n return parser;\n}\n\nexport const encodeEntities = function(text) {\n let txt = text;\n\n txt = txt.replace(/style.*:\\S*#.*;/g, function(s) {\n const innerTxt = s.substring(0, s.length - 1);\n return innerTxt;\n });\n txt = txt.replace(/classDef.*:\\S*#.*;/g, function(s) {\n const innerTxt = s.substring(0, s.length - 1);\n return innerTxt;\n });\n\n txt = txt.replace(/#\\w+;/g, function(s) {\n const innerTxt = s.substring(1, s.length - 1);\n\n const isInt = /^\\+?\\d+$/.test(innerTxt);\n if (isInt) {\n return 'fl°°' + innerTxt + '¶ß';\n } else {\n return 'fl°' + innerTxt + '¶ß';\n }\n });\n\n return txt;\n};\n\nexport const decodeEntities = function(text) {\n let txt = text;\n\n txt = txt.replace(/fl°°/g, function() {\n return '';\n });\n txt = txt.replace(/fl°/g, function() {\n return '&';\n });\n txt = txt.replace(/¶ß/g, function() {\n return ';';\n });\n\n return txt;\n};\n/**\n * Function that renders an svg with a graph from a chart definition. Usage example below.\n *\n * ```js\n * mermaidAPI.initialize({\n * startOnLoad:true\n * });\n * $(function(){\n * const graphDefinition = 'graph TB\\na-->b';\n * const cb = function(svgGraph){\n * console.log(svgGraph);\n * };\n * mermaidAPI.render('id1',graphDefinition,cb);\n * });\n *```\n * @param id the id of the element to be rendered\n * @param _txt the graph definition\n * @param cb callback which is called after rendering is finished with the svg code as inparam.\n * @param container selector to element in which a div with the graph temporarily will be inserted. In one is\n * provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is\n * completed.\n */\nconst render = function(id, _txt, cb, container) {\n let txt = _txt;\n const graphInit = utils.detectInit(txt);\n if (graphInit) {\n reinitialize(graphInit);\n } else {\n configApi.reset();\n const siteConfig = getSiteConfig();\n updateRendererConfigs(siteConfig);\n }\n\n const cnf = getConfig();\n // Check the maximum allowed text size\n if (_txt.length > cnf.maxTextSize) {\n txt = 'graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa';\n }\n\n if (typeof container !== 'undefined') {\n container.innerHTML = '';\n\n select(container)\n .append('div')\n .attr('id', 'd' + id)\n .attr('style', 'font-family: ' + cnf.fontFamily)\n .append('svg')\n .attr('id', id)\n .attr('width', '100%')\n .attr('xmlns', 'http://www.w3.org/2000/svg')\n .append('g');\n } else {\n const existingSvg = document.getElementById(id);\n if (existingSvg) {\n existingSvg.remove();\n }\n const element = document.querySelector('#' + 'd' + id);\n if (element) {\n element.remove();\n }\n\n select('body')\n .append('div')\n .attr('id', 'd' + id)\n .append('svg')\n .attr('id', id)\n .attr('width', '100%')\n .attr('xmlns', 'http://www.w3.org/2000/svg')\n .append('g');\n }\n\n window.txt = txt;\n txt = encodeEntities(txt);\n\n const element = select('#d' + id).node();\n const graphType = utils.detectType(txt);\n\n // insert inline style into svg\n const svg = element.firstChild;\n const firstChild = svg.firstChild;\n\n let userStyles = '';\n // user provided theme CSS\n if (cnf.themeCSS !== undefined) {\n userStyles += `\\n${cnf.themeCSS}`;\n }\n // user provided theme CSS\n if (cnf.fontFamily !== undefined) {\n userStyles += `\\n:root { --mermaid-font-family: ${cnf.fontFamily}}`;\n }\n // user provided theme CSS\n if (cnf.altFontFamily !== undefined) {\n userStyles += `\\n:root { --mermaid-alt-font-family: ${cnf.altFontFamily}}`;\n }\n\n // classDef\n if (graphType === 'flowchart' || graphType === 'flowchart-v2' || graphType === 'graph') {\n const classes = flowRenderer.getClasses(txt);\n for (const className in classes) {\n userStyles += `\\n.${className} > * { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n if (classes[className].textStyles) {\n userStyles += `\\n.${className} tspan { ${classes[className].textStyles.join(\n ' !important; '\n )} !important; }`;\n }\n }\n }\n const stylis = new Stylis();\n const rules = stylis(`#${id}`, getStyles(graphType, userStyles, cnf.themeVariables));\n\n const style1 = document.createElement('style');\n style1.innerHTML = rules;\n svg.insertBefore(style1, firstChild);\n\n // Verify that the generated svgs are ok before removing this\n\n // const style2 = document.createElement('style');\n // const cs = window.getComputedStyle(svg);\n // style2.innerHTML = `#d${id} * {\n // color: ${cs.color};\n // // font: ${cs.font};\n // // font-family: Arial;\n // // font-size: 24px;\n // }`;\n // svg.insertBefore(style2, firstChild);\n\n try {\n switch (graphType) {\n case 'git':\n cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n gitGraphRenderer.setConf(cnf.git);\n gitGraphRenderer.draw(txt, id, false);\n break;\n case 'flowchart':\n cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n flowRenderer.setConf(cnf.flowchart);\n flowRenderer.draw(txt, id, false);\n break;\n case 'flowchart-v2':\n cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n flowRendererV2.setConf(cnf.flowchart);\n flowRendererV2.draw(txt, id, false);\n break;\n case 'sequence':\n cnf.sequence.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n if (cnf.sequenceDiagram) {\n // backwards compatibility\n sequenceRenderer.setConf(Object.assign(cnf.sequence, cnf.sequenceDiagram));\n console.error(\n '`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.'\n );\n } else {\n sequenceRenderer.setConf(cnf.sequence);\n }\n sequenceRenderer.draw(txt, id);\n break;\n case 'gantt':\n cnf.gantt.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n ganttRenderer.setConf(cnf.gantt);\n ganttRenderer.draw(txt, id);\n break;\n case 'class':\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n classRenderer.setConf(cnf.class);\n classRenderer.draw(txt, id);\n break;\n case 'classDiagram':\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n classRendererV2.setConf(cnf.class);\n classRendererV2.draw(txt, id);\n break;\n case 'state':\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n stateRenderer.setConf(cnf.state);\n stateRenderer.draw(txt, id);\n break;\n case 'stateDiagram':\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n stateRendererV2.setConf(cnf.state);\n stateRendererV2.draw(txt, id);\n break;\n case 'info':\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n infoRenderer.setConf(cnf.class);\n infoRenderer.draw(txt, id, pkg.version);\n break;\n case 'pie':\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n pieRenderer.setConf(cnf.class);\n pieRenderer.draw(txt, id, pkg.version);\n break;\n case 'er':\n erRenderer.setConf(cnf.er);\n erRenderer.draw(txt, id, pkg.version);\n break;\n case 'journey':\n journeyRenderer.setConf(cnf.journey);\n journeyRenderer.draw(txt, id, pkg.version);\n break;\n }\n } catch (e) {\n // errorRenderer.setConf(cnf.class);\n errorRenderer.draw(id, pkg.version);\n throw e;\n }\n\n select(`[id=\"${id}\"]`)\n .selectAll('foreignobject > *')\n .attr('xmlns', 'http://www.w3.org/1999/xhtml');\n\n // if (cnf.arrowMarkerAbsolute) {\n // url =\n // window.location.protocol +\n // '//' +\n // window.location.host +\n // window.location.pathname +\n // window.location.search;\n // url = url.replace(/\\(/g, '\\\\(');\n // url = url.replace(/\\)/g, '\\\\)');\n // }\n\n // Fix for when the base tag is used\n let svgCode = select('#d' + id).node().innerHTML;\n logger.debug('cnf.arrowMarkerAbsolute', cnf.arrowMarkerAbsolute);\n if (!cnf.arrowMarkerAbsolute || cnf.arrowMarkerAbsolute === 'false') {\n svgCode = svgCode.replace(/marker-end=\"url\\(.*?#/g, 'marker-end=\"url(#', 'g');\n }\n\n svgCode = decodeEntities(svgCode);\n\n if (typeof cb !== 'undefined') {\n switch (graphType) {\n case 'flowchart':\n case 'flowchart-v2':\n cb(svgCode, flowDb.bindFunctions);\n break;\n case 'gantt':\n cb(svgCode, ganttDb.bindFunctions);\n break;\n case 'class':\n cb(svgCode, classDb.bindFunctions);\n break;\n default:\n cb(svgCode);\n }\n } else {\n logger.debug('CB = undefined!');\n }\n\n const node = select('#d' + id).node();\n if (node !== null && typeof node.remove === 'function') {\n select('#d' + id)\n .node()\n .remove();\n }\n\n return svgCode;\n};\n\nlet currentDirective = {};\n\nconst parseDirective = function(statement, context, type) {\n try {\n if (statement !== undefined) {\n statement = statement.trim();\n switch (context) {\n case 'open_directive':\n currentDirective = {};\n break;\n case 'type_directive':\n currentDirective.type = statement.toLowerCase();\n break;\n case 'arg_directive':\n currentDirective.args = JSON.parse(statement);\n break;\n case 'close_directive':\n handleDirective(currentDirective, type);\n currentDirective = null;\n break;\n }\n }\n } catch (error) {\n logger.error(\n `Error while rendering sequenceDiagram directive: ${statement} jison context: ${context}`\n );\n logger.error(error.message);\n }\n};\n\nconst handleDirective = function(directive, type) {\n logger.debug(`Directive type=${directive.type} with args:`, directive.args);\n switch (directive.type) {\n case 'init':\n case 'initialize': {\n ['config'].forEach(prop => {\n if (typeof directive.args[prop] !== 'undefined') {\n if (type === 'flowchart-v2') {\n type = 'flowchart';\n }\n directive.args[type] = directive.args[prop];\n delete directive.args[prop];\n }\n });\n\n reinitialize(directive.args);\n break;\n }\n case 'wrap':\n case 'nowrap':\n directive.args = { config: { wrap: directive.type === 'wrap' } };\n ['config'].forEach(prop => {\n if (typeof directive.args[prop] !== 'undefined') {\n if (type === 'flowchart-v2') {\n type = 'flowchart';\n }\n directive.args[type] = directive.args[prop];\n delete directive.args[prop];\n }\n });\n reinitialize(directive.args);\n break;\n default:\n logger.warn(\n `Unhandled directive: source: '%%{${directive.type}: ${JSON.stringify(\n directive.args ? directive.args : {}\n )}}%%`,\n directive\n );\n break;\n }\n};\n\nfunction updateRendererConfigs(conf) {\n gitGraphRenderer.setConf(conf.git);\n flowRenderer.setConf(conf.flowchart);\n flowRendererV2.setConf(conf.flowchart);\n if (typeof conf['sequenceDiagram'] !== 'undefined') {\n sequenceRenderer.setConf(assignWithDepth(conf.sequence, conf['sequenceDiagram']));\n }\n sequenceRenderer.setConf(conf.sequence);\n ganttRenderer.setConf(conf.gantt);\n classRenderer.setConf(conf.class);\n stateRenderer.setConf(conf.state);\n stateRendererV2.setConf(conf.state);\n infoRenderer.setConf(conf.class);\n pieRenderer.setConf(conf.class);\n erRenderer.setConf(conf.er);\n journeyRenderer.setConf(conf.journey);\n errorRenderer.setConf(conf.class);\n}\n\nfunction reinitialize(options) {\n // console.warn(`mermaidAPI.reinitialize: v${pkg.version}`, options);\n if (options.theme && theme[options.theme]) {\n // Todo merge with user options\n options.themeVariables = options.theme;\n }\n\n // Set default options\n const config = typeof options === 'object' ? setConfig(options) : getSiteConfig();\n updateRendererConfigs(config);\n setLogLevel(config.logLevel);\n logger.debug('mermaidAPI.reinitialize: ', config);\n}\n\nfunction initialize(options) {\n // console.log(`mermaidAPI.initialize: v${pkg.version} ${options}`);\n // Set default options\n\n if (options && options.theme && theme[options.theme]) {\n // Todo merge with user options\n options.themeVariables = theme[options.theme].getThemeVariables(options.themeVariables);\n } else {\n if (options) options.themeVariables = theme.default.getThemeVariables();\n }\n\n const config = typeof options === 'object' ? setSiteConfig(options) : getSiteConfig();\n\n updateRendererConfigs(config);\n setLogLevel(config.logLevel);\n logger.debug('mermaidAPI.initialize: ', config);\n}\n\n// function getConfig () {\n// console.warn('get config')\n// return config\n// }\nconst mermaidAPI = Object.freeze({\n render,\n parse,\n parseDirective,\n initialize,\n reinitialize,\n getConfig,\n getSiteConfig,\n reset: () => {\n // console.warn('reset');\n configApi.reset();\n const siteConfig = getSiteConfig();\n updateRendererConfigs(siteConfig);\n },\n globalReset: () => {\n configApi.reset(configApi.defaultConfig);\n updateRendererConfigs(getConfig());\n },\n defaultConfig: configApi.defaultConfig\n});\n\nsetLogLevel(getConfig().logLevel);\nconfigApi.reset(getConfig());\n\nexport default mermaidAPI;\n/**\n * ## mermaidAPI configuration defaults\n * \n *\n * <script>\n * var config = {\n * theme:'default',\n * logLevel:'fatal',\n * securityLevel:'strict',\n * startOnLoad:true,\n * arrowMarkerAbsolute:false,\n *\n * er:{\n * diagramPadding:20,\n * layoutDirection:'TB',\n * minEntityWidth:100,\n * minEntityHeight:75,\n * entityPadding:15,\n * stroke:'gray',\n * fill:'honeydew',\n * fontSize:12,\n * useMaxWidth:true,\n * },\n * flowchart:{\n * diagramPadding:8,\n * htmlLabels:true,\n * curve:'linear',\n * },\n * sequence:{\n * diagramMarginX:50,\n * diagramMarginY:10,\n * actorMargin:50,\n * width:150,\n * height:65,\n * boxMargin:10,\n * boxTextMargin:5,\n * noteMargin:10,\n * messageMargin:35,\n * messageAlign:'center',\n * mirrorActors:true,\n * bottomMarginAdj:1,\n * useMaxWidth:true,\n * rightAngles:false,\n * showSequenceNumbers:false,\n * },\n * gantt:{\n * titleTopMargin:25,\n * barHeight:20,\n * barGap:4,\n * topPadding:50,\n * leftPadding:75,\n * gridLineStartPadding:35,\n * fontSize:11,\n * fontFamily:'\"Open-Sans\", \"sans-serif\"',\n * numberSectionStyles:4,\n * axisFormat:'%Y-%m-%d',\n * }\n * };\n * mermaid.initialize(config);\n * </script>\n *
\n */\n","import classDiagram from './diagrams/class/styles';\nimport er from './diagrams/er/styles';\nimport flowchart from './diagrams/flowchart/styles';\nimport gantt from './diagrams/gantt/styles';\nimport git from './diagrams/git/styles';\nimport info from './diagrams/info/styles';\nimport pie from './diagrams/pie/styles';\nimport sequence from './diagrams/sequence/styles';\nimport stateDiagram from './diagrams/state/styles';\nimport journey from './diagrams/user-journey/styles';\n\nconst themes = {\n flowchart,\n 'flowchart-v2': flowchart,\n sequence,\n gantt,\n classDiagram,\n 'classDiagram-v2': classDiagram,\n stateDiagram,\n state: stateDiagram,\n git,\n info,\n pie,\n er,\n journey\n};\n\nexport const calcThemeVariables = (theme, userOverRides) => theme.calcColors(userOverRides);\n\nconst getStyles = (type, userStyles, options) => {\n return ` {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n fill: ${options.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ${options.errorBkgColor};\n }\n .error-text {\n fill: ${options.errorTextColor};\n stroke: ${options.errorTextColor};\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ${options.lineColor};\n }\n .marker.cross {\n stroke: ${options.lineColor};\n }\n\n svg {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n }\n\n ${themes[type](options)}\n\n ${userStyles}\n\n ${type} { fill: apa;}\n`;\n};\n\nexport default getStyles;\n","import { getThemeVariables as baseThemeVariables } from './theme-base';\nimport { getThemeVariables as darkThemeVariables } from './theme-dark';\nimport { getThemeVariables as defaultThemeVariables } from './theme-default';\nimport { getThemeVariables as forestThemeVariables } from './theme-forest';\nimport { getThemeVariables as neutralThemeVariables } from './theme-neutral';\n\nexport default {\n base: {\n getThemeVariables: baseThemeVariables\n },\n dark: {\n getThemeVariables: darkThemeVariables\n },\n default: {\n getThemeVariables: defaultThemeVariables\n },\n forest: {\n getThemeVariables: forestThemeVariables\n },\n neutral: {\n getThemeVariables: neutralThemeVariables\n }\n};\n","import { darken, lighten, adjust } from 'khroma';\n\nclass Theme {\n constructor() {\n /* Base variables */\n this.primaryColor = '#039fbe';\n this.secondaryColor = '#b20238';\n this.tertiaryColor = lighten('#e8d21d', 30);\n this.relationColor = '#000';\n this.primaryColor = '#fa255e';\n this.secondaryColor = '#c39ea0';\n this.tertiaryColor = '#f8e5e5';\n\n this.primaryColor = '#ECECFF';\n this.secondaryColor = '#ffffde';\n this.tertiaryColor = '#ffffde';\n\n this.background = 'white';\n this.lineColor = '#333333';\n this.border1 = '#9370DB';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial';\n this.fontSize = '16px';\n this.labelBackground = '#e8e8e8';\n this.textColor = '#333';\n this.noteBkgColor = '#fff5ad';\n this.noteBorderColor = '#aaaa33';\n this.updateColors();\n }\n updateColors() {\n this.secondBkg = this.tertiaryColor;\n\n /* Flowchart variables */\n\n this.nodeBkg = this.primaryColor;\n this.mainBkg = this.primaryColor;\n this.nodeBorder = darken(this.primaryColor, 23); // border 1\n this.clusterBkg = this.tertiaryColor;\n this.clusterBorder = darken(this.tertiaryColor, 10);\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.textColor;\n this.edgeLabelBackground = this.labelBackground;\n\n /* Sequence Diagram variables */\n\n // this.actorBorder = lighten(this.border1, 0.5);\n this.actorBorder = lighten(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.actorTextColor = 'black';\n this.actorLineColor = 'grey';\n this.labelBoxBkgColor = this.actorBkg;\n this.signalColor = this.textColor;\n this.signalTextColor = this.textColor;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n this.activationBorderColor = darken(this.secondaryColor, 10);\n this.activationBkgColor = this.secondaryColor;\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.sectionBkgColor = this.tertiaryColor;\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor = this.secondaryColor;\n this.sectionBkgColor2 = this.tertiaryColor;\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = this.primaryColor;\n this.taskBorderColor = lighten(this.primaryColor, 23);\n this.taskBkgColor = this.primaryColor;\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = this.primaryColor;\n this.activeTaskBkgColor = lighten(this.primaryColor, 23);\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n\n /* state colors */\n this.labelColor = 'black';\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n\n /* state colors */\n\n /* class */\n this.classText = this.textColor;\n\n /* user-journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = userOverrides => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n","import { invert, lighten, darken, rgba, adjust } from 'khroma';\n\nclass Theme {\n constructor() {\n this.background = '#333';\n this.primaryColor = '#1f2020';\n this.secondaryColor = lighten(this.primaryColor, 16);\n this.mainBkg = '#1f2020';\n this.secondBkg = 'calculated';\n this.mainContrastColor = 'lightgrey';\n this.darkTextColor = lighten(invert('#323D47'), 10);\n this.lineColor = 'calculated';\n this.border1 = '#81B1DB';\n this.border2 = rgba(255, 255, 255, 0.25);\n this.arrowheadColor = 'calculated';\n this.fontFamily = '\"trebuchet ms\", verdana, arial';\n this.fontSize = '16px';\n this.labelBackground = '#181818';\n this.textColor = '#ccc';\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = '#F9FFFE';\n this.edgeLabelBackground = 'calculated';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'calculated';\n this.actorLineColor = 'calculated';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = 'calculated';\n this.activationBkgColor = 'calculated';\n this.sequenceNumberColor = 'black';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = darken('#EAE8D9', 30);\n this.altSectionBkgColor = 'calculated';\n this.sectionBkgColor2 = '#EAE8D9';\n this.taskBorderColor = rgba(255, 255, 255, 70);\n this.taskBkgColor = 'calculated';\n this.taskTextColor = 'calculated';\n this.taskTextLightColor = 'calculated';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = rgba(255, 255, 255, 50);\n this.activeTaskBkgColor = '#81B1DB';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#E83737';\n this.critBkgColor = '#E83737';\n this.taskTextDarkColor = 'calculated';\n this.todayLineColor = '#DB5757';\n\n /* state colors */\n this.labelColor = 'calculated';\n\n this.errorBkgColor = '#a44141';\n this.errorTextColor = '#ddd';\n }\n updateColors() {\n this.secondBkg = lighten(this.mainBkg, 16);\n this.lineColor = this.mainContrastColor;\n this.arrowheadColor = this.mainContrastColor;\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.edgeLabelBackground = lighten(this.labelBackground, 25);\n\n /* Sequence Diagram variables */\n\n this.actorBorder = this.border1;\n this.actorBkg = this.mainBkg;\n this.actorTextColor = this.mainContrastColor;\n this.actorLineColor = this.mainContrastColor;\n this.signalColor = this.mainContrastColor;\n this.signalTextColor = this.mainContrastColor;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.mainContrastColor;\n this.loopTextColor = this.mainContrastColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.mainBkg;\n this.activationBorderColor = this.border1;\n this.activationBkgColor = this.secondBkg;\n\n /* Gantt chart variables */\n\n this.altSectionBkgColor = this.background;\n this.taskBkgColor = lighten(this.mainBkg, 23);\n this.taskTextColor = this.darkTextColor;\n this.taskTextLightColor = this.mainContrastColor;\n this.taskTextOutsideColor = this.taskTextLightColor;\n this.gridColor = this.mainContrastColor;\n this.doneTaskBkgColor = this.mainContrastColor;\n this.taskTextDarkColor = this.darkTextColor;\n\n /* state colors */\n this.labelColor = this.textColor;\n this.altBackground = lighten(this.background, 20);\n\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n /* class */\n this.classText = this.nodeBorder;\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = userOverrides => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n","import { lighten, rgba, adjust } from 'khroma';\n\nclass Theme {\n constructor() {\n /* Base variables */\n this.primaryColor = '#ECECFF';\n this.secondaryColor = '#ffffde';\n this.background = 'white';\n this.mainBkg = '#ECECFF';\n this.secondBkg = '#ffffde';\n this.lineColor = '#333333';\n this.border1 = '#9370DB';\n this.border2 = '#aaaa33';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial';\n this.fontSize = '16px';\n this.labelBackground = '#e8e8e8';\n this.textColor = '#333';\n\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = 'calculated';\n this.edgeLabelBackground = 'calculated';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'black';\n this.actorLineColor = 'grey';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = 'calculated';\n this.altSectionBkgColor = 'calculated';\n this.sectionBkgColor2 = 'calculated';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = 'calculated';\n this.taskTextLightColor = 'calculated';\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextDarkColor = 'calculated';\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.taskTextClickableColor = 'calculated';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'calculated';\n this.critBorderColor = 'calculated';\n this.critBkgColor = 'calculated';\n this.todayLineColor = 'calculated';\n\n this.sectionBkgColor = rgba(102, 102, 255, 0.49);\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = '#fff400';\n this.taskBorderColor = '#534fbc';\n this.taskBkgColor = '#8a90dd';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = '#534fbc';\n this.activeTaskBkgColor = '#bfc7ff';\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n\n /* state colors */\n this.labelColor = 'black';\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n this.updateColors();\n }\n updateColors() {\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1; // border 1\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.textColor;\n this.edgeLabelBackground = this.labelBackground;\n\n /* Sequence Diagram variables */\n\n // this.actorBorder = lighten(this.border1, 0.5);\n this.actorBorder = lighten(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.labelBoxBkgColor = this.actorBkg;\n this.signalColor = this.textColor;\n this.signalTextColor = this.textColor;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n\n /* Gantt chart variables */\n\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n\n /* state colors */\n /* class */\n this.classText = this.nodeBorder;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = userOverrides => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n","import { darken, adjust } from 'khroma';\nclass Theme {\n constructor() {\n /* Base vales */\n this.primaryColor = '#cde498';\n this.secondaryColor = '#cdffb2';\n this.background = 'white';\n this.mainBkg = '#cde498';\n this.secondBkg = '#cdffb2';\n this.lineColor = 'green';\n this.border1 = '#13540c';\n this.border2 = '#6eaa49';\n this.arrowheadColor = 'green';\n this.fontFamily = '\"trebuchet ms\", verdana, arial';\n this.fontSize = '16px';\n\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = '#333';\n this.edgeLabelBackground = '#e8e8e8';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'black';\n this.actorLineColor = 'grey';\n this.signalColor = '#333';\n this.signalTextColor = '#333';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = '#326932';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = '#6eaa49';\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = '#6eaa49';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = '#487e3a';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n\n /* state colors */\n this.labelColor = 'black';\n\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n }\n updateColors() {\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n\n /* Sequence Diagram variables */\n\n this.actorBorder = darken(this.mainBkg, 20);\n this.actorBkg = this.mainBkg;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n\n /* Gantt chart variables */\n\n this.taskBorderColor = this.border1;\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.activeTaskBorderColor = this.taskBorderColor;\n this.activeTaskBkgColor = this.mainBkg;\n\n /* state colors */\n /* class */\n this.classText = this.nodeBorder;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = userOverrides => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n","import { darken, lighten, adjust } from 'khroma';\n\n// const Color = require ( 'khroma/dist/color' ).default\n// Color.format.hex.stringify(Color.parse('hsl(210, 66.6666666667%, 95%)')); // => \"#EAF2FB\"\n\nclass Theme {\n constructor() {\n this.primaryColor = '#eee';\n this.contrast = '#26a';\n this.secondaryColor = lighten(this.contrast, 55);\n this.background = 'white';\n this.mainBkg = '#eee';\n this.secondBkg = 'calculated';\n this.lineColor = '#666';\n this.border1 = '#999';\n this.border2 = 'calculated';\n this.note = '#ffa';\n this.text = '#333';\n this.critical = '#d42';\n this.done = '#bbb';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial';\n this.fontSize = '16px';\n\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = 'calculated';\n this.edgeLabelBackground = 'white';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'calculated';\n this.actorLineColor = 'calculated';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = 'calculated';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = 'calculated';\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = 'calculated';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = 'calculated';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'calculated';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'calculated';\n this.critBkgColor = 'calculated';\n this.critBorderColor = 'calculated';\n this.todayLineColor = 'calculated';\n\n /* state colors */\n this.labelColor = 'black';\n\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n }\n updateColors() {\n this.secondBkg = lighten(this.contrast, 55);\n this.border2 = this.contrast;\n\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.text;\n\n /* Sequence Diagram variables */\n\n this.actorBorder = lighten(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.actorTextColor = this.text;\n this.actorLineColor = this.lineColor;\n this.signalColor = this.text;\n this.signalTextColor = this.text;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.text;\n this.loopTextColor = this.text;\n this.noteBorderColor = darken(this.note, 60);\n this.noteBkgColor = this.note;\n this.noteTextColor = this.actorTextColor;\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = lighten(this.contrast, 30);\n this.sectionBkgColor2 = lighten(this.contrast, 30);\n\n this.taskBorderColor = darken(this.contrast, 10);\n\n this.taskBkgColor = this.contrast;\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextDarkColor = this.text;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.activeTaskBorderColor = this.taskBorderColor;\n this.activeTaskBkgColor = this.mainBkg;\n this.gridColor = lighten(this.border1, 30);\n\n this.doneTaskBkgColor = this.done;\n this.doneTaskBorderColor = this.lineColor;\n this.critBkgColor = this.critical;\n this.critBorderColor = darken(this.critBkgColor, 10);\n\n this.todayLineColor = this.critBkgColor;\n\n /* state colors */\n /* class */\n this.classText = this.nodeBorder;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach(k => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = userOverrides => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n console.info('Theme', userOverrides, theme);\n return theme;\n};\n","import {\n curveBasis,\n curveBasisClosed,\n curveBasisOpen,\n curveLinear,\n curveLinearClosed,\n curveMonotoneX,\n curveMonotoneY,\n curveNatural,\n curveStep,\n curveStepAfter,\n curveStepBefore,\n select\n} from 'd3';\nimport { logger } from './logger';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\nimport common from './diagrams/common/common';\n// import cryptoRandomString from 'crypto-random-string';\n\n// Effectively an enum of the supported curve types, accessible by name\nconst d3CurveTypes = {\n curveBasis: curveBasis,\n curveBasisClosed: curveBasisClosed,\n curveBasisOpen: curveBasisOpen,\n curveLinear: curveLinear,\n curveLinearClosed: curveLinearClosed,\n curveMonotoneX: curveMonotoneX,\n curveMonotoneY: curveMonotoneY,\n curveNatural: curveNatural,\n curveStep: curveStep,\n curveStepAfter: curveStepAfter,\n curveStepBefore: curveStepBefore\n};\nconst directive = /[%]{2}[{]\\s*(?:(?:(\\w+)\\s*:|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi;\nconst directiveWithoutOpen = /\\s*(?:(?:(\\w+)(?=:):|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi;\nconst anyComment = /\\s*%%.*\\n/gm;\n\n/**\n * @function detectInit\n * Detects the init config object from the text\n * ```mermaid\n * %%{init: {\"theme\": \"debug\", \"logLevel\": 1 }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n * or\n * ```mermaid\n * %%{initialize: {\"theme\": \"dark\", logLevel: \"debug\" }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @returns {object} the json object representing the init passed to mermaid.initialize()\n */\nexport const detectInit = function(text) {\n let inits = detectDirective(text, /(?:init\\b)|(?:initialize\\b)/);\n let results = {};\n if (Array.isArray(inits)) {\n let args = inits.map(init => init.args);\n results = assignWithDepth(results, [...args]);\n } else {\n results = inits.args;\n }\n if (results) {\n let type = detectType(text);\n ['config'].forEach(prop => {\n if (typeof results[prop] !== 'undefined') {\n if (type === 'flowchart-v2') {\n type = 'flowchart';\n }\n results[type] = results[prop];\n delete results[prop];\n }\n });\n }\n return results;\n};\n\n/**\n * @function detectDirective\n * Detects the directive from the text. Text can be single line or multiline. If type is null or omitted\n * the first directive encountered in text will be returned\n * ```mermaid\n * graph LR\n * %%{somedirective}%%\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @param {string|RegExp} type The directive to return (default: null)\n * @returns {object | Array} An object or Array representing the directive(s): { type: string, args: object|null } matched by the input type\n * if a single directive was found, that directive object will be returned.\n */\nexport const detectDirective = function(text, type = null) {\n try {\n const commentWithoutDirectives = new RegExp(\n `[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*\\n`,\n 'ig'\n );\n text = text\n .trim()\n .replace(commentWithoutDirectives, '')\n .replace(/'/gm, '\"');\n logger.debug(\n `Detecting diagram directive${type !== null ? ' type:' + type : ''} based on the text:${text}`\n );\n let match,\n result = [];\n while ((match = directive.exec(text)) !== null) {\n // This is necessary to avoid infinite loops with zero-width matches\n if (match.index === directive.lastIndex) {\n directive.lastIndex++;\n }\n if (\n (match && !type) ||\n (type && match[1] && match[1].match(type)) ||\n (type && match[2] && match[2].match(type))\n ) {\n let type = match[1] ? match[1] : match[2];\n let args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null;\n result.push({ type, args });\n }\n }\n if (result.length === 0) {\n result.push({ type: text, args: null });\n }\n\n return result.length === 1 ? result[0] : result;\n } catch (error) {\n logger.error(\n `ERROR: ${error.message} - Unable to parse directive${\n type !== null ? ' type:' + type : ''\n } based on the text:${text}`\n );\n return { type: null, args: null };\n }\n};\n\n/**\n * @function detectType\n * Detects the type of the graph text. Takes into consideration the possible existence of an %%init\n * directive\n * ```mermaid\n * %%{initialize: {\"startOnLoad\": true, logLevel: \"fatal\" }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @returns {string} A graph definition key\n */\nexport const detectType = function(text) {\n text = text.replace(directive, '').replace(anyComment, '\\n');\n logger.debug('Detecting diagram type based on the text ' + text);\n if (text.match(/^\\s*sequenceDiagram/)) {\n return 'sequence';\n }\n\n if (text.match(/^\\s*gantt/)) {\n return 'gantt';\n }\n if (text.match(/^\\s*classDiagram-v2/)) {\n return 'classDiagram';\n }\n if (text.match(/^\\s*classDiagram/)) {\n return 'class';\n }\n\n if (text.match(/^\\s*stateDiagram-v2/)) {\n return 'stateDiagram';\n }\n\n if (text.match(/^\\s*stateDiagram/)) {\n return 'state';\n }\n\n if (text.match(/^\\s*gitGraph/)) {\n return 'git';\n }\n if (text.match(/^\\s*flowchart/)) {\n return 'flowchart-v2';\n }\n\n if (text.match(/^\\s*info/)) {\n return 'info';\n }\n if (text.match(/^\\s*pie/)) {\n return 'pie';\n }\n\n if (text.match(/^\\s*erDiagram/)) {\n return 'er';\n }\n\n if (text.match(/^\\s*journey/)) {\n return 'journey';\n }\n\n return 'flowchart';\n};\n\nconst memoize = (fn, resolver) => {\n let cache = {};\n return (...args) => {\n let n = resolver ? resolver.apply(this, args) : args[0];\n if (n in cache) {\n return cache[n];\n } else {\n let result = fn(...args);\n cache[n] = result;\n return result;\n }\n };\n};\n\n/**\n * @function isSubstringInArray\n * Detects whether a substring in present in a given array\n * @param {string} str The substring to detect\n * @param {array} arr The array to search\n * @returns {number} the array index containing the substring or -1 if not present\n **/\nexport const isSubstringInArray = function(str, arr) {\n for (let i = 0; i < arr.length; i++) {\n if (arr[i].match(str)) return i;\n }\n return -1;\n};\n\nexport const interpolateToCurve = (interpolate, defaultCurve) => {\n if (!interpolate) {\n return defaultCurve;\n }\n const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`;\n return d3CurveTypes[curveName] || defaultCurve;\n};\n\nexport const formatUrl = (linkStr, config) => {\n let url = linkStr.trim();\n\n if (url) {\n if (config.securityLevel !== 'loose') {\n return sanitizeUrl(url);\n }\n\n return url;\n }\n};\n\nexport const runFunc = (functionName, ...params) => {\n const arrPaths = functionName.split('.');\n\n const len = arrPaths.length - 1;\n const fnName = arrPaths[len];\n\n let obj = window;\n for (let i = 0; i < len; i++) {\n obj = obj[arrPaths[i]];\n if (!obj) return;\n }\n\n obj[fnName](...params);\n};\n\nconst distance = (p1, p2) =>\n p1 && p2 ? Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)) : 0;\n\nconst traverseEdge = points => {\n let prevPoint;\n let totalDistance = 0;\n\n points.forEach(point => {\n totalDistance += distance(point, prevPoint);\n prevPoint = point;\n });\n\n // Traverse half of total distance along points\n let remainingDistance = totalDistance / 2;\n let center = undefined;\n prevPoint = undefined;\n points.forEach(point => {\n if (prevPoint && !center) {\n const vectorDistance = distance(point, prevPoint);\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n const distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) center = prevPoint;\n if (distanceRatio >= 1) center = { x: point.x, y: point.y };\n if (distanceRatio > 0 && distanceRatio < 1) {\n center = {\n x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y\n };\n }\n }\n }\n prevPoint = point;\n });\n return center;\n};\n\nconst calcLabelPosition = points => {\n return traverseEdge(points);\n};\n\nconst calcCardinalityPosition = (isRelationTypePresent, points, initialPosition) => {\n let prevPoint;\n let totalDistance = 0; // eslint-disable-line\n if (points[0] !== initialPosition) {\n points = points.reverse();\n }\n points.forEach(point => {\n totalDistance += distance(point, prevPoint);\n prevPoint = point;\n });\n\n // Traverse only 25 total distance along points to find cardinality point\n const distanceToCardinalityPoint = 25;\n\n let remainingDistance = distanceToCardinalityPoint;\n let center;\n prevPoint = undefined;\n points.forEach(point => {\n if (prevPoint && !center) {\n const vectorDistance = distance(point, prevPoint);\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n const distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) center = prevPoint;\n if (distanceRatio >= 1) center = { x: point.x, y: point.y };\n if (distanceRatio > 0 && distanceRatio < 1) {\n center = {\n x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y\n };\n }\n }\n }\n prevPoint = point;\n });\n // if relation is present (Arrows will be added), change cardinality point off-set distance (d)\n let d = isRelationTypePresent ? 10 : 5;\n //Calculate Angle for x and y axis\n let angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);\n let cardinalityPosition = { x: 0, y: 0 };\n //Calculation cardinality position using angle, center point on the line/curve but pendicular and with offset-distance\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;\n return cardinalityPosition;\n};\n\nexport const getStylesFromArray = arr => {\n let style = '';\n let labelStyle = '';\n\n for (let i = 0; i < arr.length; i++) {\n if (typeof arr[i] !== 'undefined') {\n // add text properties to label style definition\n if (arr[i].startsWith('color:') || arr[i].startsWith('text-align:')) {\n labelStyle = labelStyle + arr[i] + ';';\n } else {\n style = style + arr[i] + ';';\n }\n }\n }\n\n return { style: style, labelStyle: labelStyle };\n};\n\nlet cnt = 0;\nexport const generateId = () => {\n cnt++;\n return (\n 'id-' +\n Math.random()\n .toString(36)\n .substr(2, 12) +\n '-' +\n cnt\n );\n};\n\nfunction makeid(length) {\n var result = '';\n var characters = '0123456789abcdef';\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n}\n\nexport const random = options => {\n return makeid(options.length);\n};\n\n/**\n * @function assignWithDepth\n * Extends the functionality of {@link ObjectConstructor.assign} with the ability to merge arbitrary-depth objects\n * For each key in src with path `k` (recursively) performs an Object.assign(dst[`k`], src[`k`]) with\n * a slight change from the typical handling of undefined for dst[`k`]: instead of raising an error,\n * dst[`k`] is auto-initialized to {} and effectively merged with src[`k`]\n *
' },\n config\n );\n if (common.lineBreakRegex.test(label)) {\n return label;\n }\n const words = label.split(' ');\n const completedLines = [];\n let nextLine = '';\n words.forEach((word, index) => {\n const wordLength = calculateTextWidth(`${word} `, config);\n const nextLineLength = calculateTextWidth(nextLine, config);\n if (wordLength > maxWidth) {\n const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, '-', config);\n completedLines.push(nextLine, ...hyphenatedStrings);\n nextLine = remainingWord;\n } else if (nextLineLength + wordLength >= maxWidth) {\n completedLines.push(nextLine);\n nextLine = word;\n } else {\n nextLine = [nextLine, word].filter(Boolean).join(' ');\n }\n const currentWord = index + 1;\n const isLastWord = currentWord === words.length;\n if (isLastWord) {\n completedLines.push(nextLine);\n }\n });\n return completedLines.filter(line => line !== '').join(config.joinWith);\n },\n (label, maxWidth, config) =>\n `${label}-${maxWidth}-${config.fontSize}-${config.fontWeight}-${config.fontFamily}-${config.joinWith}`\n);\n\nconst breakString = memoize(\n (word, maxWidth, hyphenCharacter = '-', config) => {\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', margin: 0 },\n config\n );\n const characters = word.split('');\n const lines = [];\n let currentLine = '';\n characters.forEach((character, index) => {\n const nextLine = `${currentLine}${character}`;\n const lineWidth = calculateTextWidth(nextLine, config);\n if (lineWidth >= maxWidth) {\n const currentCharacter = index + 1;\n const isLastLine = characters.length === currentCharacter;\n const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`;\n lines.push(isLastLine ? nextLine : hyphenatedNextLine);\n currentLine = '';\n } else {\n currentLine = nextLine;\n }\n });\n return { hyphenatedStrings: lines, remainingWord: currentLine };\n },\n (word, maxWidth, hyphenCharacter = '-', config) =>\n `${word}-${maxWidth}-${hyphenCharacter}-${config.fontSize}-${config.fontWeight}-${config.fontFamily}`\n);\n\n/**\n * This calculates the text's height, taking into account the wrap breaks and\n * both the statically configured height, width, and the length of the text (in pixels).\n *\n * If the wrapped text text has greater height, we extend the height, so it's\n * value won't overflow.\n *\n * @return - The height for the given text\n * @param text the text to measure\n * @param config - the config for fontSize, fontFamily, and fontWeight all impacting the resulting size\n */\nexport const calculateTextHeight = function(text, config) {\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', margin: 15 },\n config\n );\n return calculateTextDimensions(text, config).height;\n};\n\n/**\n * This calculates the width of the given text, font size and family.\n *\n * @return - The width for the given text\n * @param text - The text to calculate the width of\n * @param config - the config for fontSize, fontFamily, and fontWeight all impacting the resulting size\n */\nexport const calculateTextWidth = function(text, config) {\n config = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: 'Arial' }, config);\n return calculateTextDimensions(text, config).width;\n};\n\n/**\n * This calculates the dimensions of the given text, font size, font family, font weight, and margins.\n *\n * @return - The width for the given text\n * @param text - The text to calculate the width of\n * @param config - the config for fontSize, fontFamily, fontWeight, and margin all impacting the resulting size\n */\nexport const calculateTextDimensions = memoize(\n function(text, config) {\n config = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: 'Arial' }, config);\n const { fontSize, fontFamily, fontWeight } = config;\n if (!text) {\n return { width: 0, height: 0 };\n }\n\n // We can't really know if the user supplied font family will render on the user agent;\n // thus, we'll take the max width between the user supplied font family, and a default\n // of sans-serif.\n const fontFamilies = ['sans-serif', fontFamily];\n const lines = text.split(common.lineBreakRegex);\n let dims = [];\n\n const body = select('body');\n // We don't want to leak DOM elements - if a removal operation isn't available\n // for any reason, do not continue.\n if (!body.remove) {\n return { width: 0, height: 0, lineHeight: 0 };\n }\n\n const g = body.append('svg');\n\n for (let fontFamily of fontFamilies) {\n let cheight = 0;\n let dim = { width: 0, height: 0, lineHeight: 0 };\n for (let line of lines) {\n const textObj = getTextObj();\n textObj.text = line;\n const textElem = drawSimpleText(g, textObj)\n .style('font-size', fontSize)\n .style('font-weight', fontWeight)\n .style('font-family', fontFamily);\n\n let bBox = (textElem._groups || textElem)[0][0].getBBox();\n dim.width = Math.round(Math.max(dim.width, bBox.width));\n cheight = Math.round(bBox.height);\n dim.height += cheight;\n dim.lineHeight = Math.round(Math.max(dim.lineHeight, cheight));\n }\n dims.push(dim);\n }\n\n g.remove();\n\n let index =\n isNaN(dims[1].height) ||\n isNaN(dims[1].width) ||\n isNaN(dims[1].lineHeight) ||\n (dims[0].height > dims[1].height &&\n dims[0].width > dims[1].width &&\n dims[0].lineHeight > dims[1].lineHeight)\n ? 0\n : 1;\n return dims[index];\n },\n (text, config) => `${text}-${config.fontSize}-${config.fontWeight}-${config.fontFamily}`\n);\n\nexport default {\n assignWithDepth,\n wrapLabel,\n calculateTextHeight,\n calculateTextWidth,\n calculateTextDimensions,\n detectInit,\n detectDirective,\n detectType,\n isSubstringInArray,\n interpolateToCurve,\n calcLabelPosition,\n calcCardinalityPosition,\n formatUrl,\n getStylesFromArray,\n generateId,\n random,\n memoize,\n runFunc\n};\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/dist/mermaid.min.js b/dist/mermaid.min.js
index bed5f3a2d..34a661d43 100644
--- a/dist/mermaid.min.js
+++ b/dist/mermaid.min.js
@@ -1,11 +1,4 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=510)}([function(t,e,n){"use strict";n.r(e);var r=function(t,e){return tcu&&(cu=e)),u?t0?r=M(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=M(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function sy(){var t=iy(Zp,Zp);return t.copy=function(){return ny(t,sy())},jp.apply(t,arguments),oy(t)}function cy(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Yp.call(e,Xp),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return cy(t).unknown(e)},t=arguments.length?Yp.call(t,Xp):[0,1],oy(n)}var uy=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o0){for(;lc)break;y.push(h)}}else y=A(l,d,Math.min(d-l,p)).map(n);return r?y.reverse():y},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Xs(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=w[i in $g?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(v.x=x(n,v),v.X=x(r,v),v.c=x(e,v),_.x=x(n,_),_.X=x(r,_),_.c=x(e,_),{format:function(t){var e=x(t+="",v);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}})}var Ug,Yg,qg,Hg,Wg,$g={"-":"",_:" ",0:"0"},Gg=/^\s*\d+/,Vg=/^%/,Xg=/[\\^$*+?|[\]().{}]/g;function Kg(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(ah&&T.push("'"+this.terminals_[S]+"'");C=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==l?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:b,expected:T})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,w?(_=w,w=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,b=p.yylloc,f>0&&f--);break;case 2:if(A=this.productions_[k[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},m&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[s,u,c,y.yy,k[1],i,a].concat(d))))return E;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[k[1]][0]),i.push(O.$),a.push(O._$),M=o[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},O={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,n=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 r=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[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 n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===n)for(i=0,a=0;i1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"