UNPKG

497 kBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory();
4 else if(typeof define === 'function' && define.amd)
5 define([], factory);
6 else if(typeof exports === 'object')
7 exports["mermaid"] = factory();
8 else
9 root["mermaid"] = factory();
10})(window, function() {
11return /******/ (function(modules) { // webpackBootstrap
12/******/ // The module cache
13/******/ var installedModules = {};
14/******/
15/******/ // The require function
16/******/ function __webpack_require__(moduleId) {
17/******/
18/******/ // Check if module is in cache
19/******/ if(installedModules[moduleId]) {
20/******/ return installedModules[moduleId].exports;
21/******/ }
22/******/ // Create a new module (and put it into the cache)
23/******/ var module = installedModules[moduleId] = {
24/******/ i: moduleId,
25/******/ l: false,
26/******/ exports: {}
27/******/ };
28/******/
29/******/ // Execute the module function
30/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31/******/
32/******/ // Flag the module as loaded
33/******/ module.l = true;
34/******/
35/******/ // Return the exports of the module
36/******/ return module.exports;
37/******/ }
38/******/
39/******/
40/******/ // expose the modules object (__webpack_modules__)
41/******/ __webpack_require__.m = modules;
42/******/
43/******/ // expose the module cache
44/******/ __webpack_require__.c = installedModules;
45/******/
46/******/ // define getter function for harmony exports
47/******/ __webpack_require__.d = function(exports, name, getter) {
48/******/ if(!__webpack_require__.o(exports, name)) {
49/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50/******/ }
51/******/ };
52/******/
53/******/ // define __esModule on exports
54/******/ __webpack_require__.r = function(exports) {
55/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57/******/ }
58/******/ Object.defineProperty(exports, '__esModule', { value: true });
59/******/ };
60/******/
61/******/ // create a fake namespace object
62/******/ // mode & 1: value is a module id, require it
63/******/ // mode & 2: merge all properties of value into the ns
64/******/ // mode & 4: return value when already ns object
65/******/ // mode & 8|1: behave like require
66/******/ __webpack_require__.t = function(value, mode) {
67/******/ if(mode & 1) value = __webpack_require__(value);
68/******/ if(mode & 8) return value;
69/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70/******/ var ns = Object.create(null);
71/******/ __webpack_require__.r(ns);
72/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74/******/ return ns;
75/******/ };
76/******/
77/******/ // getDefaultExport function for compatibility with non-harmony modules
78/******/ __webpack_require__.n = function(module) {
79/******/ var getter = module && module.__esModule ?
80/******/ function getDefault() { return module['default']; } :
81/******/ function getModuleExports() { return module; };
82/******/ __webpack_require__.d(getter, 'a', getter);
83/******/ return getter;
84/******/ };
85/******/
86/******/ // Object.prototype.hasOwnProperty.call
87/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88/******/
89/******/ // __webpack_public_path__
90/******/ __webpack_require__.p = "";
91/******/
92/******/
93/******/ // Load entry module and return exports
94/******/ return __webpack_require__(__webpack_require__.s = "./src/mermaid.js");
95/******/ })
96/************************************************************************/
97/******/ ({
98
99/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/dark/index.scss":
100/*!*******************************************************************************************************************!*\
101 !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/dark/index.scss ***!
102 \*******************************************************************************************************************/
103/*! no static exports found */
104/***/ (function(module, exports, __webpack_require__) {
105
106exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
107// Module
108exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #BDD5EA;\n stroke: purple;\n stroke-width: 1px; }\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.edgeLabel {\n background-color: #e8e8e8; }\n\n.cluster rect {\n fill: #6D6D65;\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-size: 12px;\n background: #6D6D65;\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: #BDD5EA; }\n\ntext.actor {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: lightgrey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: lightgrey; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: lightgrey; }\n\n#arrowhead {\n fill: lightgrey; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: lightgrey; }\n\n#crosshead path {\n fill: lightgrey !important;\n stroke: lightgrey !important; }\n\n.messageText {\n fill: lightgrey;\n stroke: none; }\n\n.labelBox {\n stroke: #81B1DB;\n fill: #BDD5EA; }\n\n.labelText {\n fill: #323D47;\n stroke: none; }\n\n.loopText {\n fill: lightgrey;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #81B1DB; }\n\n.note {\n stroke: rgba(255, 255, 255, 0.25);\n fill: #fff5ad; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px; }\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.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\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.3;\n shape-rendering: crispEdges; }\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-size: 11px; }\n\n.taskTextOutsideRight {\n fill: #323D47;\n text-anchor: start;\n font-size: 11px; }\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: #BDD5EA;\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\ng.classGroup text {\n fill: purple;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 10px; }\n\ng.classGroup rect {\n fill: #BDD5EA;\n stroke: purple; }\n\ng.classGroup line {\n stroke: purple;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #BDD5EA;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: purple;\n font-size: 10px; }\n\n.relation {\n stroke: purple;\n stroke-width: 1;\n fill: none; }\n\n#compositionStart {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #BDD5EA;\n stroke: purple;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #BDD5EA;\n stroke: purple;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#extensionStart {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey; }\n", ""]);
109
110
111
112/***/ }),
113
114/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/default/index.scss":
115/*!**********************************************************************************************************************!*\
116 !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/default/index.scss ***!
117 \**********************************************************************************************************************/
118/*! no static exports found */
119/***/ (function(module, exports, __webpack_require__) {
120
121exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
122// Module
123exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1px; }\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.edgeLabel {\n background-color: #e8e8e8; }\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-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 {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: grey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n#arrowhead {\n fill: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333 !important;\n stroke: #333 !important; }\n\n.messageText {\n fill: #333;\n stroke: none; }\n\n.labelBox {\n stroke: #CCCCFF;\n fill: #ECECFF; }\n\n.labelText {\n fill: black;\n stroke: none; }\n\n.loopText {\n fill: black;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #CCCCFF; }\n\n.note {\n stroke: #aaaa33;\n fill: #fff5ad; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px; }\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.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\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.3;\n shape-rendering: crispEdges; }\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-size: 11px; }\n\n.taskTextOutsideRight {\n fill: black;\n text-anchor: start;\n font-size: 11px; }\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\ng.classGroup text {\n fill: #9370DB;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 10px; }\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#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", ""]);
124
125
126
127/***/ }),
128
129/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/forest/index.scss":
130/*!*********************************************************************************************************************!*\
131 !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/forest/index.scss ***!
132 \*********************************************************************************************************************/
133/*! no static exports found */
134/***/ (function(module, exports, __webpack_require__) {
135
136exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
137// Module
138exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1px; }\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.edgeLabel {\n background-color: #e8e8e8; }\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-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 {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: grey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n#arrowhead {\n fill: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333 !important;\n stroke: #333 !important; }\n\n.messageText {\n fill: #333;\n stroke: none; }\n\n.labelBox {\n stroke: #326932;\n fill: #cde498; }\n\n.labelText {\n fill: black;\n stroke: none; }\n\n.loopText {\n fill: black;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #326932; }\n\n.note {\n stroke: #6eaa49;\n fill: #fff5ad; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px; }\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.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\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.3;\n shape-rendering: crispEdges; }\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-size: 11px; }\n\n.taskTextOutsideRight {\n fill: black;\n text-anchor: start;\n font-size: 11px; }\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\ng.classGroup text {\n fill: #13540c;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 10px; }\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#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", ""]);
139
140
141
142/***/ }),
143
144/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/neutral/index.scss":
145/*!**********************************************************************************************************************!*\
146 !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/neutral/index.scss ***!
147 \**********************************************************************************************************************/
148/*! no static exports found */
149/***/ (function(module, exports, __webpack_require__) {
150
151exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
152// Module
153exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #eee;\n stroke: #999;\n stroke-width: 1px; }\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.edgeLabel {\n background-color: white; }\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-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 {\n fill: #333;\n stroke: none; }\n\n.actor-line {\n stroke: #666; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n#arrowhead {\n fill: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333 !important;\n stroke: #333 !important; }\n\n.messageText {\n fill: #333;\n stroke: none; }\n\n.labelBox {\n stroke: #999;\n fill: #eee; }\n\n.labelText {\n fill: #333;\n stroke: none; }\n\n.loopText {\n fill: #333;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #999; }\n\n.note {\n stroke: #777700;\n fill: #ffa; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px; }\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.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\n/* Grid and axis */\n.grid .tick {\n stroke: #e6e6e6;\n opacity: 0.3;\n shape-rendering: crispEdges; }\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-size: 11px; }\n\n.taskTextOutsideRight {\n fill: #333;\n text-anchor: start;\n font-size: 11px; }\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\ng.classGroup text {\n fill: #999;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 10px; }\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#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", ""]);
154
155
156
157/***/ }),
158
159/***/ "./node_modules/css-loader/dist/runtime/api.js":
160/*!*****************************************************!*\
161 !*** ./node_modules/css-loader/dist/runtime/api.js ***!
162 \*****************************************************/
163/*! no static exports found */
164/***/ (function(module, exports, __webpack_require__) {
165
166"use strict";
167
168
169/*
170 MIT License http://www.opensource.org/licenses/mit-license.php
171 Author Tobias Koppers @sokra
172*/
173// css base code, injected by the css-loader
174module.exports = function (useSourceMap) {
175 var list = []; // return the list of modules as css string
176
177 list.toString = function toString() {
178 return this.map(function (item) {
179 var content = cssWithMappingToString(item, useSourceMap);
180
181 if (item[2]) {
182 return '@media ' + item[2] + '{' + content + '}';
183 } else {
184 return content;
185 }
186 }).join('');
187 }; // import a list of modules into the list
188
189
190 list.i = function (modules, mediaQuery) {
191 if (typeof modules === 'string') {
192 modules = [[null, modules, '']];
193 }
194
195 var alreadyImportedModules = {};
196
197 for (var i = 0; i < this.length; i++) {
198 var id = this[i][0];
199
200 if (id != null) {
201 alreadyImportedModules[id] = true;
202 }
203 }
204
205 for (i = 0; i < modules.length; i++) {
206 var item = modules[i]; // skip already imported module
207 // this implementation is not 100% perfect for weird media query combinations
208 // when a module is imported multiple times with different media queries.
209 // I hope this will never occur (Hey this way we have smaller bundles)
210
211 if (item[0] == null || !alreadyImportedModules[item[0]]) {
212 if (mediaQuery && !item[2]) {
213 item[2] = mediaQuery;
214 } else if (mediaQuery) {
215 item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
216 }
217
218 list.push(item);
219 }
220 }
221 };
222
223 return list;
224};
225
226function cssWithMappingToString(item, useSourceMap) {
227 var content = item[1] || '';
228 var cssMapping = item[3];
229
230 if (!cssMapping) {
231 return content;
232 }
233
234 if (useSourceMap && typeof btoa === 'function') {
235 var sourceMapping = toComment(cssMapping);
236 var sourceURLs = cssMapping.sources.map(function (source) {
237 return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
238 });
239 return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
240 }
241
242 return [content].join('\n');
243} // Adapted from convert-source-map (MIT)
244
245
246function toComment(sourceMap) {
247 // eslint-disable-next-line no-undef
248 var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
249 var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
250 return '/*# ' + data + ' */';
251}
252
253/***/ }),
254
255/***/ "./node_modules/node-libs-browser/mock/empty.js":
256/*!******************************************************!*\
257 !*** ./node_modules/node-libs-browser/mock/empty.js ***!
258 \******************************************************/
259/*! no static exports found */
260/***/ (function(module, exports) {
261
262
263
264/***/ }),
265
266/***/ "./node_modules/path-browserify/index.js":
267/*!***********************************************!*\
268 !*** ./node_modules/path-browserify/index.js ***!
269 \***********************************************/
270/*! no static exports found */
271/***/ (function(module, exports, __webpack_require__) {
272
273/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
274//
275// Permission is hereby granted, free of charge, to any person obtaining a
276// copy of this software and associated documentation files (the
277// "Software"), to deal in the Software without restriction, including
278// without limitation the rights to use, copy, modify, merge, publish,
279// distribute, sublicense, and/or sell copies of the Software, and to permit
280// persons to whom the Software is furnished to do so, subject to the
281// following conditions:
282//
283// The above copyright notice and this permission notice shall be included
284// in all copies or substantial portions of the Software.
285//
286// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
287// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
288// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
289// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
290// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
291// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
292// USE OR OTHER DEALINGS IN THE SOFTWARE.
293
294// resolves . and .. elements in a path array with directory names there
295// must be no slashes, empty elements, or device names (c:\) in the array
296// (so also no leading and trailing slashes - it does not distinguish
297// relative and absolute paths)
298function normalizeArray(parts, allowAboveRoot) {
299 // if the path tries to go above the root, `up` ends up > 0
300 var up = 0;
301 for (var i = parts.length - 1; i >= 0; i--) {
302 var last = parts[i];
303 if (last === '.') {
304 parts.splice(i, 1);
305 } else if (last === '..') {
306 parts.splice(i, 1);
307 up++;
308 } else if (up) {
309 parts.splice(i, 1);
310 up--;
311 }
312 }
313
314 // if the path is allowed to go above the root, restore leading ..s
315 if (allowAboveRoot) {
316 for (; up--; up) {
317 parts.unshift('..');
318 }
319 }
320
321 return parts;
322}
323
324// Split a filename into [root, dir, basename, ext], unix version
325// 'root' is just a slash, or nothing.
326var splitPathRe =
327 /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
328var splitPath = function(filename) {
329 return splitPathRe.exec(filename).slice(1);
330};
331
332// path.resolve([from ...], to)
333// posix version
334exports.resolve = function() {
335 var resolvedPath = '',
336 resolvedAbsolute = false;
337
338 for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
339 var path = (i >= 0) ? arguments[i] : process.cwd();
340
341 // Skip empty and invalid entries
342 if (typeof path !== 'string') {
343 throw new TypeError('Arguments to path.resolve must be strings');
344 } else if (!path) {
345 continue;
346 }
347
348 resolvedPath = path + '/' + resolvedPath;
349 resolvedAbsolute = path.charAt(0) === '/';
350 }
351
352 // At this point the path should be resolved to a full absolute path, but
353 // handle relative paths to be safe (might happen when process.cwd() fails)
354
355 // Normalize the path
356 resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
357 return !!p;
358 }), !resolvedAbsolute).join('/');
359
360 return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
361};
362
363// path.normalize(path)
364// posix version
365exports.normalize = function(path) {
366 var isAbsolute = exports.isAbsolute(path),
367 trailingSlash = substr(path, -1) === '/';
368
369 // Normalize the path
370 path = normalizeArray(filter(path.split('/'), function(p) {
371 return !!p;
372 }), !isAbsolute).join('/');
373
374 if (!path && !isAbsolute) {
375 path = '.';
376 }
377 if (path && trailingSlash) {
378 path += '/';
379 }
380
381 return (isAbsolute ? '/' : '') + path;
382};
383
384// posix version
385exports.isAbsolute = function(path) {
386 return path.charAt(0) === '/';
387};
388
389// posix version
390exports.join = function() {
391 var paths = Array.prototype.slice.call(arguments, 0);
392 return exports.normalize(filter(paths, function(p, index) {
393 if (typeof p !== 'string') {
394 throw new TypeError('Arguments to path.join must be strings');
395 }
396 return p;
397 }).join('/'));
398};
399
400
401// path.relative(from, to)
402// posix version
403exports.relative = function(from, to) {
404 from = exports.resolve(from).substr(1);
405 to = exports.resolve(to).substr(1);
406
407 function trim(arr) {
408 var start = 0;
409 for (; start < arr.length; start++) {
410 if (arr[start] !== '') break;
411 }
412
413 var end = arr.length - 1;
414 for (; end >= 0; end--) {
415 if (arr[end] !== '') break;
416 }
417
418 if (start > end) return [];
419 return arr.slice(start, end - start + 1);
420 }
421
422 var fromParts = trim(from.split('/'));
423 var toParts = trim(to.split('/'));
424
425 var length = Math.min(fromParts.length, toParts.length);
426 var samePartsLength = length;
427 for (var i = 0; i < length; i++) {
428 if (fromParts[i] !== toParts[i]) {
429 samePartsLength = i;
430 break;
431 }
432 }
433
434 var outputParts = [];
435 for (var i = samePartsLength; i < fromParts.length; i++) {
436 outputParts.push('..');
437 }
438
439 outputParts = outputParts.concat(toParts.slice(samePartsLength));
440
441 return outputParts.join('/');
442};
443
444exports.sep = '/';
445exports.delimiter = ':';
446
447exports.dirname = function(path) {
448 var result = splitPath(path),
449 root = result[0],
450 dir = result[1];
451
452 if (!root && !dir) {
453 // No dirname whatsoever
454 return '.';
455 }
456
457 if (dir) {
458 // It has a dirname, strip trailing slash
459 dir = dir.substr(0, dir.length - 1);
460 }
461
462 return root + dir;
463};
464
465
466exports.basename = function(path, ext) {
467 var f = splitPath(path)[2];
468 // TODO: make this comparison case-insensitive on windows?
469 if (ext && f.substr(-1 * ext.length) === ext) {
470 f = f.substr(0, f.length - ext.length);
471 }
472 return f;
473};
474
475
476exports.extname = function(path) {
477 return splitPath(path)[3];
478};
479
480function filter (xs, f) {
481 if (xs.filter) return xs.filter(f);
482 var res = [];
483 for (var i = 0; i < xs.length; i++) {
484 if (f(xs[i], i, xs)) res.push(xs[i]);
485 }
486 return res;
487}
488
489// String.prototype.substr - negative index don't work in IE8
490var substr = 'ab'.substr(-1) === 'b'
491 ? function (str, start, len) { return str.substr(start, len) }
492 : function (str, start, len) {
493 if (start < 0) start = str.length + start;
494 return str.substr(start, len);
495 }
496;
497
498/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))
499
500/***/ }),
501
502/***/ "./node_modules/process/browser.js":
503/*!*****************************************!*\
504 !*** ./node_modules/process/browser.js ***!
505 \*****************************************/
506/*! no static exports found */
507/***/ (function(module, exports) {
508
509// shim for using process in browser
510var process = module.exports = {};
511
512// cached from whatever global is present so that test runners that stub it
513// don't break things. But we need to wrap it in a try catch in case it is
514// wrapped in strict mode code which doesn't define any globals. It's inside a
515// function because try/catches deoptimize in certain engines.
516
517var cachedSetTimeout;
518var cachedClearTimeout;
519
520function defaultSetTimout() {
521 throw new Error('setTimeout has not been defined');
522}
523function defaultClearTimeout () {
524 throw new Error('clearTimeout has not been defined');
525}
526(function () {
527 try {
528 if (typeof setTimeout === 'function') {
529 cachedSetTimeout = setTimeout;
530 } else {
531 cachedSetTimeout = defaultSetTimout;
532 }
533 } catch (e) {
534 cachedSetTimeout = defaultSetTimout;
535 }
536 try {
537 if (typeof clearTimeout === 'function') {
538 cachedClearTimeout = clearTimeout;
539 } else {
540 cachedClearTimeout = defaultClearTimeout;
541 }
542 } catch (e) {
543 cachedClearTimeout = defaultClearTimeout;
544 }
545} ())
546function runTimeout(fun) {
547 if (cachedSetTimeout === setTimeout) {
548 //normal enviroments in sane situations
549 return setTimeout(fun, 0);
550 }
551 // if setTimeout wasn't available but was latter defined
552 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
553 cachedSetTimeout = setTimeout;
554 return setTimeout(fun, 0);
555 }
556 try {
557 // when when somebody has screwed with setTimeout but no I.E. maddness
558 return cachedSetTimeout(fun, 0);
559 } catch(e){
560 try {
561 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
562 return cachedSetTimeout.call(null, fun, 0);
563 } catch(e){
564 // 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
565 return cachedSetTimeout.call(this, fun, 0);
566 }
567 }
568
569
570}
571function runClearTimeout(marker) {
572 if (cachedClearTimeout === clearTimeout) {
573 //normal enviroments in sane situations
574 return clearTimeout(marker);
575 }
576 // if clearTimeout wasn't available but was latter defined
577 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
578 cachedClearTimeout = clearTimeout;
579 return clearTimeout(marker);
580 }
581 try {
582 // when when somebody has screwed with setTimeout but no I.E. maddness
583 return cachedClearTimeout(marker);
584 } catch (e){
585 try {
586 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
587 return cachedClearTimeout.call(null, marker);
588 } catch (e){
589 // 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.
590 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
591 return cachedClearTimeout.call(this, marker);
592 }
593 }
594
595
596
597}
598var queue = [];
599var draining = false;
600var currentQueue;
601var queueIndex = -1;
602
603function cleanUpNextTick() {
604 if (!draining || !currentQueue) {
605 return;
606 }
607 draining = false;
608 if (currentQueue.length) {
609 queue = currentQueue.concat(queue);
610 } else {
611 queueIndex = -1;
612 }
613 if (queue.length) {
614 drainQueue();
615 }
616}
617
618function drainQueue() {
619 if (draining) {
620 return;
621 }
622 var timeout = runTimeout(cleanUpNextTick);
623 draining = true;
624
625 var len = queue.length;
626 while(len) {
627 currentQueue = queue;
628 queue = [];
629 while (++queueIndex < len) {
630 if (currentQueue) {
631 currentQueue[queueIndex].run();
632 }
633 }
634 queueIndex = -1;
635 len = queue.length;
636 }
637 currentQueue = null;
638 draining = false;
639 runClearTimeout(timeout);
640}
641
642process.nextTick = function (fun) {
643 var args = new Array(arguments.length - 1);
644 if (arguments.length > 1) {
645 for (var i = 1; i < arguments.length; i++) {
646 args[i - 1] = arguments[i];
647 }
648 }
649 queue.push(new Item(fun, args));
650 if (queue.length === 1 && !draining) {
651 runTimeout(drainQueue);
652 }
653};
654
655// v8 likes predictible objects
656function Item(fun, array) {
657 this.fun = fun;
658 this.array = array;
659}
660Item.prototype.run = function () {
661 this.fun.apply(null, this.array);
662};
663process.title = 'browser';
664process.browser = true;
665process.env = {};
666process.argv = [];
667process.version = ''; // empty string to avoid regexp issues
668process.versions = {};
669
670function noop() {}
671
672process.on = noop;
673process.addListener = noop;
674process.once = noop;
675process.off = noop;
676process.removeListener = noop;
677process.removeAllListeners = noop;
678process.emit = noop;
679process.prependListener = noop;
680process.prependOnceListener = noop;
681
682process.listeners = function (name) { return [] }
683
684process.binding = function (name) {
685 throw new Error('process.binding is not supported');
686};
687
688process.cwd = function () { return '/' };
689process.chdir = function (dir) {
690 throw new Error('process.chdir is not supported');
691};
692process.umask = function() { return 0; };
693
694
695/***/ }),
696
697/***/ "./node_modules/webpack/buildin/module.js":
698/*!***********************************!*\
699 !*** (webpack)/buildin/module.js ***!
700 \***********************************/
701/*! no static exports found */
702/***/ (function(module, exports) {
703
704module.exports = function(module) {
705 if (!module.webpackPolyfill) {
706 module.deprecate = function() {};
707 module.paths = [];
708 // module.parent = undefined by default
709 if (!module.children) module.children = [];
710 Object.defineProperty(module, "loaded", {
711 enumerable: true,
712 get: function() {
713 return module.l;
714 }
715 });
716 Object.defineProperty(module, "id", {
717 enumerable: true,
718 get: function() {
719 return module.i;
720 }
721 });
722 module.webpackPolyfill = 1;
723 }
724 return module;
725};
726
727
728/***/ }),
729
730/***/ "./package.json":
731/*!**********************!*\
732 !*** ./package.json ***!
733 \**********************/
734/*! exports provided: name, version, description, main, keywords, scripts, repository, author, license, standard, dependencies, devDependencies, files, yarn-upgrade-all, default */
735/***/ (function(module) {
736
737module.exports = {"name":"mermaid","version":"8.2.3","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":"webpack --progress --colors","postbuild":"documentation build src/mermaidAPI.js --shallow -f md --markdown-toc false -o docs/mermaidAPI.md","build:watch":"yarn build --watch","minify":"minify ./dist/mermaid.js > ./dist/mermaid.min.js","release":"yarn build -p --config webpack.config.prod.babel.js","lint":"standard","e2e":"yarn lint && jest e2e --config e2e/jest.config.js","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"yarn lint && webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src","test:watch":"jest --watch src","jison":"node -r @babel/register node_modules/.bin/gulp jison","prepublishOnly":"yarn build && yarn release && yarn test","prepush":"yarn test"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","d3":"^5.7.0","dagre-d3-renderer":"^0.5.8","dagre-layout":"^0.8.8","documentation":"^12.0.1","graphlibrary":"^2.2.0","gulp-print":"^5.0.2","he":"^1.2.0","lodash":"^4.17.11","minify":"^4.1.1","moment-mini":"^2.22.1","scope-css":"^1.2.1"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.0","@babel/register":"^7.0.0","babel-core":"7.0.0-bridge.0","babel-jest":"^23.6.0","babel-loader":"^8.0.4","coveralls":"^3.0.2","css-loader":"^2.0.1","css-to-string-loader":"^0.1.3","gulp":"^4.0.0","gulp-jison":"^1.2.0","husky":"^1.2.1","identity-obj-proxy":"^3.0.0","jest":"^23.6.0","jest-environment-puppeteer":"^4.2.0","jest-image-snapshot":"^2.8.2","jest-puppeteer":"^4.2.0","jison":"^0.4.18","moment":"^2.23.0","node-sass":"^4.11.0","puppeteer":"^1.17.0","sass-loader":"^7.1.0","standard":"^12.0.1","webpack":"^4.27.1","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"]}};
738
739/***/ }),
740
741/***/ "./src/config.js":
742/*!***********************!*\
743 !*** ./src/config.js ***!
744 \***********************/
745/*! exports provided: setConfig, getConfig */
746/***/ (function(module, __webpack_exports__, __webpack_require__) {
747
748"use strict";
749__webpack_require__.r(__webpack_exports__);
750/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConfig", function() { return setConfig; });
751/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getConfig", function() { return getConfig; });
752let config = {};
753
754const setConf = function (cnf) {
755 // Top level initially mermaid, gflow, sequenceDiagram and gantt
756 const lvl1Keys = Object.keys(cnf);
757
758 for (let i = 0; i < lvl1Keys.length; i++) {
759 if (typeof cnf[lvl1Keys[i]] === 'object' && cnf[lvl1Keys[i]] != null) {
760 const lvl2Keys = Object.keys(cnf[lvl1Keys[i]]);
761
762 for (let j = 0; j < lvl2Keys.length; j++) {
763 // logger.debug('Setting conf ', lvl1Keys[i], '-', lvl2Keys[j])
764 if (typeof config[lvl1Keys[i]] === 'undefined') {
765 config[lvl1Keys[i]] = {};
766 } // logger.debug('Setting config: ' + lvl1Keys[i] + ' ' + lvl2Keys[j] + ' to ' + cnf[lvl1Keys[i]][lvl2Keys[j]])
767
768
769 config[lvl1Keys[i]][lvl2Keys[j]] = cnf[lvl1Keys[i]][lvl2Keys[j]];
770 }
771 } else {
772 config[lvl1Keys[i]] = cnf[lvl1Keys[i]];
773 }
774 }
775};
776
777const setConfig = conf => {
778 setConf(conf);
779};
780const getConfig = () => config;
781
782/***/ }),
783
784/***/ "./src/diagrams/class/classDb.js":
785/*!***************************************!*\
786 !*** ./src/diagrams/class/classDb.js ***!
787 \***************************************/
788/*! exports provided: addClass, clear, getClass, getClasses, getRelations, addRelation, addMember, addMembers, cleanupLabel, lineType, relationType, default */
789/***/ (function(module, __webpack_exports__, __webpack_require__) {
790
791"use strict";
792__webpack_require__.r(__webpack_exports__);
793/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
794/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
795/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClass", function() { return getClass; });
796/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
797/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRelations", function() { return getRelations; });
798/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRelation", function() { return addRelation; });
799/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMember", function() { return addMember; });
800/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMembers", function() { return addMembers; });
801/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanupLabel", function() { return cleanupLabel; });
802/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineType", function() { return lineType; });
803/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "relationType", function() { return relationType; });
804/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
805
806let relations = [];
807let classes = {};
808/**
809 * Function called by parser when a node definition has been found.
810 * @param id
811 * @param text
812 * @param type
813 * @param style
814 */
815
816const addClass = function (id) {
817 if (typeof classes[id] === 'undefined') {
818 classes[id] = {
819 id: id,
820 methods: [],
821 members: []
822 };
823 }
824};
825const clear = function () {
826 relations = [];
827 classes = {};
828};
829const getClass = function (id) {
830 return classes[id];
831};
832const getClasses = function () {
833 return classes;
834};
835const getRelations = function () {
836 return relations;
837};
838const addRelation = function (relation) {
839 _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Adding relation: ' + JSON.stringify(relation));
840 addClass(relation.id1);
841 addClass(relation.id2);
842 relations.push(relation);
843};
844const addMember = function (className, member) {
845 const theClass = classes[className];
846
847 if (typeof member === 'string') {
848 if (member.substr(-1) === ')') {
849 theClass.methods.push(member);
850 } else {
851 theClass.members.push(member);
852 }
853 }
854};
855const addMembers = function (className, MembersArr) {
856 if (Array.isArray(MembersArr)) {
857 MembersArr.forEach(member => addMember(className, member));
858 }
859};
860const cleanupLabel = function (label) {
861 if (label.substring(0, 1) === ':') {
862 return label.substr(2).trim();
863 } else {
864 return label.trim();
865 }
866};
867const lineType = {
868 LINE: 0,
869 DOTTED_LINE: 1
870};
871const relationType = {
872 AGGREGATION: 0,
873 EXTENSION: 1,
874 COMPOSITION: 2,
875 DEPENDENCY: 3
876};
877/* harmony default export */ __webpack_exports__["default"] = ({
878 addClass,
879 clear,
880 getClass,
881 getClasses,
882 getRelations,
883 addRelation,
884 addMember,
885 addMembers,
886 cleanupLabel,
887 lineType,
888 relationType
889});
890
891/***/ }),
892
893/***/ "./src/diagrams/class/classRenderer.js":
894/*!*********************************************!*\
895 !*** ./src/diagrams/class/classRenderer.js ***!
896 \*********************************************/
897/*! exports provided: setConf, draw, default */
898/***/ (function(module, __webpack_exports__, __webpack_require__) {
899
900"use strict";
901__webpack_require__.r(__webpack_exports__);
902/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
903/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
904/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
905/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
906/* harmony import */ var dagre_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre-layout */ "dagre-layout");
907/* harmony import */ var dagre_layout__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre_layout__WEBPACK_IMPORTED_MODULE_1__);
908/* harmony import */ var graphlibrary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlibrary */ "graphlibrary");
909/* harmony import */ var graphlibrary__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlibrary__WEBPACK_IMPORTED_MODULE_2__);
910/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
911/* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./classDb */ "./src/diagrams/class/classDb.js");
912/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.js");
913/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__);
914
915
916
917
918
919
920_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"];
921const idCache = {};
922let classCnt = 0;
923const conf = {
924 dividerMargin: 10,
925 padding: 5,
926 textHeight: 10 // Todo optimize
927
928};
929
930const getGraphId = function (label) {
931 const keys = Object.keys(idCache);
932
933 for (let i = 0; i < keys.length; i++) {
934 if (idCache[keys[i]].label === label) {
935 return keys[i];
936 }
937 }
938
939 return undefined;
940};
941/**
942 * Setup arrow head and define the marker. The result is appended to the svg.
943 */
944
945
946const insertMarkers = function (elem) {
947 elem.append('defs').append('marker').attr('id', 'extensionStart').attr('class', 'extension').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');
948 elem.append('defs').append('marker').attr('id', 'extensionEnd').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
949
950 elem.append('defs').append('marker').attr('id', 'compositionStart').attr('class', 'extension').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');
951 elem.append('defs').append('marker').attr('id', 'compositionEnd').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');
952 elem.append('defs').append('marker').attr('id', 'aggregationStart').attr('class', 'extension').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');
953 elem.append('defs').append('marker').attr('id', 'aggregationEnd').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');
954 elem.append('defs').append('marker').attr('id', 'dependencyStart').attr('class', 'extension').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');
955 elem.append('defs').append('marker').attr('id', 'dependencyEnd').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');
956};
957
958let edgeCount = 0;
959let total = 0;
960
961const drawEdge = function (elem, path, relation) {
962 const getRelationType = function (type) {
963 switch (type) {
964 case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.AGGREGATION:
965 return 'aggregation';
966
967 case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.EXTENSION:
968 return 'extension';
969
970 case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.COMPOSITION:
971 return 'composition';
972
973 case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.DEPENDENCY:
974 return 'dependency';
975 }
976 };
977
978 path.points = path.points.filter(p => !Number.isNaN(p.y)); // The data for our line
979
980 const lineData = path.points; // This is the accessor function we talked about above
981
982 const lineFunction = d3__WEBPACK_IMPORTED_MODULE_0__["line"]().x(function (d) {
983 return d.x;
984 }).y(function (d) {
985 return d.y;
986 }).curve(d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]);
987 const svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'relation');
988 let url = '';
989
990 if (conf.arrowMarkerAbsolute) {
991 url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
992 url = url.replace(/\(/g, '\\(');
993 url = url.replace(/\)/g, '\\)');
994 }
995
996 if (relation.relation.type1 !== 'none') {
997 svgPath.attr('marker-start', 'url(' + url + '#' + getRelationType(relation.relation.type1) + 'Start' + ')');
998 }
999
1000 if (relation.relation.type2 !== 'none') {
1001 svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(relation.relation.type2) + 'End' + ')');
1002 }
1003
1004 let x, y;
1005 const l = path.points.length;
1006
1007 if (l % 2 !== 0 && l > 1) {
1008 const p1 = path.points[Math.floor(l / 2)];
1009 const p2 = path.points[Math.ceil(l / 2)];
1010 x = (p1.x + p2.x) / 2;
1011 y = (p1.y + p2.y) / 2;
1012 } else {
1013 const p = path.points[Math.floor(l / 2)];
1014 x = p.x;
1015 y = p.y;
1016 }
1017
1018 if (typeof relation.title !== 'undefined') {
1019 const g = elem.append('g').attr('class', 'classLabel');
1020 const label = g.append('text').attr('class', 'label').attr('x', x).attr('y', y).attr('fill', 'red').attr('text-anchor', 'middle').text(relation.title);
1021 window.label = label;
1022 const bounds = label.node().getBBox();
1023 g.insert('rect', ':first-child').attr('class', 'box').attr('x', bounds.x - conf.padding / 2).attr('y', bounds.y - conf.padding / 2).attr('width', bounds.width + conf.padding).attr('height', bounds.height + conf.padding);
1024 }
1025
1026 edgeCount++;
1027};
1028
1029const drawClass = function (elem, classDef) {
1030 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Rendering class ' + classDef);
1031
1032 const addTspan = function (textEl, txt, isFirst) {
1033 const tSpan = textEl.append('tspan').attr('x', conf.padding).text(txt);
1034
1035 if (!isFirst) {
1036 tSpan.attr('dy', conf.textHeight);
1037 }
1038 };
1039
1040 const id = 'classId' + classCnt % total;
1041 const classInfo = {
1042 id: id,
1043 label: classDef.id,
1044 width: 0,
1045 height: 0
1046 };
1047 const g = elem.append('g').attr('id', id).attr('class', 'classGroup');
1048 const title = g.append('text').attr('x', conf.padding).attr('y', conf.textHeight + conf.padding).text(classDef.id);
1049 const titleHeight = title.node().getBBox().height;
1050 const membersLine = g.append('line') // text label for the x axis
1051 .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2).attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2);
1052 const members = g.append('text') // text label for the x axis
1053 .attr('x', conf.padding).attr('y', titleHeight + conf.dividerMargin + conf.textHeight).attr('fill', 'white').attr('class', 'classText');
1054 let isFirst = true;
1055 classDef.members.forEach(function (member) {
1056 addTspan(members, member, isFirst);
1057 isFirst = false;
1058 });
1059 const membersBox = members.node().getBBox();
1060 const methodsLine = g.append('line') // text label for the x axis
1061 .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height);
1062 const methods = g.append('text') // text label for the x axis
1063 .attr('x', conf.padding).attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr('fill', 'white').attr('class', 'classText');
1064 isFirst = true;
1065 classDef.methods.forEach(function (method) {
1066 addTspan(methods, method, isFirst);
1067 isFirst = false;
1068 });
1069 const classBox = g.node().getBBox();
1070 g.insert('rect', ':first-child').attr('x', 0).attr('y', 0).attr('width', classBox.width + 2 * conf.padding).attr('height', classBox.height + conf.padding + 0.5 * conf.dividerMargin);
1071 membersLine.attr('x2', classBox.width + 2 * conf.padding);
1072 methodsLine.attr('x2', classBox.width + 2 * conf.padding);
1073 classInfo.width = classBox.width + 2 * conf.padding;
1074 classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;
1075 idCache[id] = classInfo;
1076 classCnt++;
1077 return classInfo;
1078};
1079
1080const setConf = function (cnf) {
1081 const keys = Object.keys(cnf);
1082 keys.forEach(function (key) {
1083 conf[key] = cnf[key];
1084 });
1085};
1086/**
1087 * Draws a flowchart in the tag with id: id based on the graph definition in text.
1088 * @param text
1089 * @param id
1090 */
1091
1092const draw = function (text, id) {
1093 _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy.clear();
1094 _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].parse(text);
1095 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Rendering diagram ' + text); /// / Fetch the default direction, use TD if none was found
1096
1097 const diagram = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id='${id}']`);
1098 insertMarkers(diagram); // Layout graph, Create a new directed graph
1099
1100 const g = new graphlibrary__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({
1101 multigraph: true
1102 }); // Set an object for the graph label
1103
1104 g.setGraph({
1105 isMultiGraph: true
1106 }); // Default to assigning a new object as a label for each new edge.
1107
1108 g.setDefaultEdgeLabel(function () {
1109 return {};
1110 });
1111 const classes = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getClasses();
1112 const keys = Object.keys(classes);
1113 total = keys.length;
1114
1115 for (let i = 0; i < keys.length; i++) {
1116 const classDef = classes[keys[i]];
1117 const node = drawClass(diagram, classDef); // Add nodes to the graph. The first argument is the node id. The second is
1118 // metadata about the node. In this case we're going to add labels to each of
1119 // our nodes.
1120
1121 g.setNode(node.id, node);
1122 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Org height: ' + node.height);
1123 }
1124
1125 const relations = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations();
1126 relations.forEach(function (relation) {
1127 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation));
1128 g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), {
1129 relation: relation
1130 });
1131 });
1132 dagre_layout__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g);
1133 g.nodes().forEach(function (v) {
1134 if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') {
1135 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));
1136 d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#' + v).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )');
1137 }
1138 });
1139 g.edges().forEach(function (e) {
1140 if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') {
1141 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));
1142 drawEdge(diagram, g.edge(e), g.edge(e).relation);
1143 }
1144 });
1145 diagram.attr('height', '100%');
1146 diagram.attr('width', '100%');
1147 diagram.attr('viewBox', '0 0 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20));
1148};
1149/* harmony default export */ __webpack_exports__["default"] = ({
1150 setConf,
1151 draw
1152});
1153
1154/***/ }),
1155
1156/***/ "./src/diagrams/class/parser/classDiagram.js":
1157/*!***************************************************!*\
1158 !*** ./src/diagrams/class/parser/classDiagram.js ***!
1159 \***************************************************/
1160/*! no static exports found */
1161/***/ (function(module, exports, __webpack_require__) {
1162
1163/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
1164
1165/*
1166 Returns a Parser object of the following structure:
1167
1168 Parser: {
1169 yy: {}
1170 }
1171
1172 Parser.prototype: {
1173 yy: {},
1174 trace: function(),
1175 symbols_: {associative list: name ==> number},
1176 terminals_: {associative list: number ==> name},
1177 productions_: [...],
1178 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
1179 table: [...],
1180 defaultActions: {...},
1181 parseError: function(str, hash),
1182 parse: function(input),
1183
1184 lexer: {
1185 EOF: 1,
1186 parseError: function(str, hash),
1187 setInput: function(input),
1188 input: function(),
1189 unput: function(str),
1190 more: function(),
1191 less: function(n),
1192 pastInput: function(),
1193 upcomingInput: function(),
1194 showPosition: function(),
1195 test_match: function(regex_match_array, rule_index),
1196 next: function(),
1197 lex: function(),
1198 begin: function(condition),
1199 popState: function(),
1200 _currentRules: function(),
1201 topState: function(),
1202 pushState: function(condition),
1203
1204 options: {
1205 ranges: boolean (optional: true ==> token location info will include a .range[] member)
1206 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
1207 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)
1208 },
1209
1210 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
1211 rules: [...],
1212 conditions: {associative list: name ==> set},
1213 }
1214 }
1215
1216
1217 token location info (@$, _$, etc.): {
1218 first_line: n,
1219 last_line: n,
1220 first_column: n,
1221 last_column: n,
1222 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
1223 }
1224
1225
1226 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
1227 text: (matched text)
1228 token: (the produced terminal token, if any)
1229 line: (yylineno)
1230 }
1231 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
1232 loc: (yylloc)
1233 expected: (string describing the set of expected tokens)
1234 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
1235 }
1236*/
1237var parser = function () {
1238 var o = function (k, v, o, l) {
1239 for (o = o || {}, l = k.length; l--; o[k[l]] = v);
1240
1241 return o;
1242 },
1243 $V0 = [1, 11],
1244 $V1 = [1, 12],
1245 $V2 = [1, 13],
1246 $V3 = [1, 15],
1247 $V4 = [1, 16],
1248 $V5 = [1, 17],
1249 $V6 = [6, 8],
1250 $V7 = [1, 26],
1251 $V8 = [1, 27],
1252 $V9 = [1, 28],
1253 $Va = [1, 29],
1254 $Vb = [1, 30],
1255 $Vc = [1, 31],
1256 $Vd = [6, 8, 13, 17, 23, 26, 27, 28, 29, 30, 31],
1257 $Ve = [6, 8, 13, 17, 23, 26, 27, 28, 29, 30, 31, 45, 46, 47],
1258 $Vf = [23, 45, 46, 47],
1259 $Vg = [23, 30, 31, 45, 46, 47],
1260 $Vh = [23, 26, 27, 28, 29, 45, 46, 47],
1261 $Vi = [6, 8, 13],
1262 $Vj = [1, 46];
1263
1264 var parser = {
1265 trace: function trace() {},
1266 yy: {},
1267 symbols_: {
1268 "error": 2,
1269 "mermaidDoc": 3,
1270 "graphConfig": 4,
1271 "CLASS_DIAGRAM": 5,
1272 "NEWLINE": 6,
1273 "statements": 7,
1274 "EOF": 8,
1275 "statement": 9,
1276 "className": 10,
1277 "alphaNumToken": 11,
1278 "relationStatement": 12,
1279 "LABEL": 13,
1280 "classStatement": 14,
1281 "methodStatement": 15,
1282 "CLASS": 16,
1283 "STRUCT_START": 17,
1284 "members": 18,
1285 "STRUCT_STOP": 19,
1286 "MEMBER": 20,
1287 "SEPARATOR": 21,
1288 "relation": 22,
1289 "STR": 23,
1290 "relationType": 24,
1291 "lineType": 25,
1292 "AGGREGATION": 26,
1293 "EXTENSION": 27,
1294 "COMPOSITION": 28,
1295 "DEPENDENCY": 29,
1296 "LINE": 30,
1297 "DOTTED_LINE": 31,
1298 "commentToken": 32,
1299 "textToken": 33,
1300 "graphCodeTokens": 34,
1301 "textNoTagsToken": 35,
1302 "TAGSTART": 36,
1303 "TAGEND": 37,
1304 "==": 38,
1305 "--": 39,
1306 "PCT": 40,
1307 "DEFAULT": 41,
1308 "SPACE": 42,
1309 "MINUS": 43,
1310 "keywords": 44,
1311 "UNICODE_TEXT": 45,
1312 "NUM": 46,
1313 "ALPHA": 47,
1314 "$accept": 0,
1315 "$end": 1
1316 },
1317 terminals_: {
1318 2: "error",
1319 5: "CLASS_DIAGRAM",
1320 6: "NEWLINE",
1321 8: "EOF",
1322 13: "LABEL",
1323 16: "CLASS",
1324 17: "STRUCT_START",
1325 19: "STRUCT_STOP",
1326 20: "MEMBER",
1327 21: "SEPARATOR",
1328 23: "STR",
1329 26: "AGGREGATION",
1330 27: "EXTENSION",
1331 28: "COMPOSITION",
1332 29: "DEPENDENCY",
1333 30: "LINE",
1334 31: "DOTTED_LINE",
1335 34: "graphCodeTokens",
1336 36: "TAGSTART",
1337 37: "TAGEND",
1338 38: "==",
1339 39: "--",
1340 40: "PCT",
1341 41: "DEFAULT",
1342 42: "SPACE",
1343 43: "MINUS",
1344 44: "keywords",
1345 45: "UNICODE_TEXT",
1346 46: "NUM",
1347 47: "ALPHA"
1348 },
1349 productions_: [0, [3, 1], [4, 4], [7, 1], [7, 2], [7, 3], [10, 2], [10, 1], [9, 1], [9, 2], [9, 1], [9, 1], [14, 2], [14, 5], [18, 1], [18, 2], [15, 1], [15, 2], [15, 1], [15, 1], [12, 3], [12, 4], [12, 4], [12, 5], [22, 3], [22, 2], [22, 2], [22, 1], [24, 1], [24, 1], [24, 1], [24, 1], [25, 1], [25, 1], [32, 1], [32, 1], [33, 1], [33, 1], [33, 1], [33, 1], [33, 1], [33, 1], [33, 1], [35, 1], [35, 1], [35, 1], [35, 1], [11, 1], [11, 1], [11, 1]],
1350 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
1351 /* action[1] */
1352 , $$
1353 /* vstack */
1354 , _$
1355 /* lstack */
1356 ) {
1357 /* this == yyval */
1358 var $0 = $$.length - 1;
1359
1360 switch (yystate) {
1361 case 6:
1362 this.$ = $$[$0 - 1] + $$[$0];
1363 break;
1364
1365 case 7:
1366 this.$ = $$[$0];
1367 break;
1368
1369 case 8:
1370 yy.addRelation($$[$0]);
1371 break;
1372
1373 case 9:
1374 $$[$0 - 1].title = yy.cleanupLabel($$[$0]);
1375 yy.addRelation($$[$0 - 1]);
1376 break;
1377
1378 case 12:
1379 yy.addClass($$[$0]);
1380 break;
1381
1382 case 13:
1383 /*console.log($$[$0-3],JSON.stringify($$[$0-1]));*/
1384 yy.addClass($$[$0 - 3]);
1385 yy.addMembers($$[$0 - 3], $$[$0 - 1]);
1386 break;
1387
1388 case 14:
1389 this.$ = [$$[$0]];
1390 break;
1391
1392 case 15:
1393 $$[$0].push($$[$0 - 1]);
1394 this.$ = $$[$0];
1395 break;
1396
1397 case 16:
1398 /*console.log('Rel found',$$[$0]);*/
1399 break;
1400
1401 case 17:
1402 yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0]));
1403 break;
1404
1405 case 18:
1406 console.warn('Member', $$[$0]);
1407 break;
1408
1409 case 19:
1410 /*console.log('sep found',$$[$0]);*/
1411 break;
1412
1413 case 20:
1414 this.$ = {
1415 'id1': $$[$0 - 2],
1416 'id2': $$[$0],
1417 relation: $$[$0 - 1],
1418 relationTitle1: 'none',
1419 relationTitle2: 'none'
1420 };
1421 break;
1422
1423 case 21:
1424 this.$ = {
1425 id1: $$[$0 - 3],
1426 id2: $$[$0],
1427 relation: $$[$0 - 1],
1428 relationTitle1: $$[$0 - 2],
1429 relationTitle2: 'none'
1430 };
1431 break;
1432
1433 case 22:
1434 this.$ = {
1435 id1: $$[$0 - 3],
1436 id2: $$[$0],
1437 relation: $$[$0 - 2],
1438 relationTitle1: 'none',
1439 relationTitle2: $$[$0 - 1]
1440 };
1441 break;
1442
1443 case 23:
1444 this.$ = {
1445 id1: $$[$0 - 4],
1446 id2: $$[$0],
1447 relation: $$[$0 - 2],
1448 relationTitle1: $$[$0 - 3],
1449 relationTitle2: $$[$0 - 1]
1450 };
1451 break;
1452
1453 case 24:
1454 this.$ = {
1455 type1: $$[$0 - 2],
1456 type2: $$[$0],
1457 lineType: $$[$0 - 1]
1458 };
1459 break;
1460
1461 case 25:
1462 this.$ = {
1463 type1: 'none',
1464 type2: $$[$0],
1465 lineType: $$[$0 - 1]
1466 };
1467 break;
1468
1469 case 26:
1470 this.$ = {
1471 type1: $$[$0 - 1],
1472 type2: 'none',
1473 lineType: $$[$0]
1474 };
1475 break;
1476
1477 case 27:
1478 this.$ = {
1479 type1: 'none',
1480 type2: 'none',
1481 lineType: $$[$0]
1482 };
1483 break;
1484
1485 case 28:
1486 this.$ = yy.relationType.AGGREGATION;
1487 break;
1488
1489 case 29:
1490 this.$ = yy.relationType.EXTENSION;
1491 break;
1492
1493 case 30:
1494 this.$ = yy.relationType.COMPOSITION;
1495 break;
1496
1497 case 31:
1498 this.$ = yy.relationType.DEPENDENCY;
1499 break;
1500
1501 case 32:
1502 this.$ = yy.lineType.LINE;
1503 break;
1504
1505 case 33:
1506 this.$ = yy.lineType.DOTTED_LINE;
1507 break;
1508 }
1509 },
1510 table: [{
1511 3: 1,
1512 4: 2,
1513 5: [1, 3]
1514 }, {
1515 1: [3]
1516 }, {
1517 1: [2, 1]
1518 }, {
1519 6: [1, 4]
1520 }, {
1521 7: 5,
1522 9: 6,
1523 10: 10,
1524 11: 14,
1525 12: 7,
1526 14: 8,
1527 15: 9,
1528 16: $V0,
1529 20: $V1,
1530 21: $V2,
1531 45: $V3,
1532 46: $V4,
1533 47: $V5
1534 }, {
1535 8: [1, 18]
1536 }, {
1537 6: [1, 19],
1538 8: [2, 3]
1539 }, o($V6, [2, 8], {
1540 13: [1, 20]
1541 }), o($V6, [2, 10]), o($V6, [2, 11]), o($V6, [2, 16], {
1542 22: 21,
1543 24: 24,
1544 25: 25,
1545 13: [1, 23],
1546 23: [1, 22],
1547 26: $V7,
1548 27: $V8,
1549 28: $V9,
1550 29: $Va,
1551 30: $Vb,
1552 31: $Vc
1553 }), {
1554 10: 32,
1555 11: 14,
1556 45: $V3,
1557 46: $V4,
1558 47: $V5
1559 }, o($V6, [2, 18]), o($V6, [2, 19]), o($Vd, [2, 7], {
1560 11: 14,
1561 10: 33,
1562 45: $V3,
1563 46: $V4,
1564 47: $V5
1565 }), o($Ve, [2, 47]), o($Ve, [2, 48]), o($Ve, [2, 49]), {
1566 1: [2, 2]
1567 }, {
1568 7: 34,
1569 8: [2, 4],
1570 9: 6,
1571 10: 10,
1572 11: 14,
1573 12: 7,
1574 14: 8,
1575 15: 9,
1576 16: $V0,
1577 20: $V1,
1578 21: $V2,
1579 45: $V3,
1580 46: $V4,
1581 47: $V5
1582 }, o($V6, [2, 9]), {
1583 10: 35,
1584 11: 14,
1585 23: [1, 36],
1586 45: $V3,
1587 46: $V4,
1588 47: $V5
1589 }, {
1590 22: 37,
1591 24: 24,
1592 25: 25,
1593 26: $V7,
1594 27: $V8,
1595 28: $V9,
1596 29: $Va,
1597 30: $Vb,
1598 31: $Vc
1599 }, o($V6, [2, 17]), {
1600 25: 38,
1601 30: $Vb,
1602 31: $Vc
1603 }, o($Vf, [2, 27], {
1604 24: 39,
1605 26: $V7,
1606 27: $V8,
1607 28: $V9,
1608 29: $Va
1609 }), o($Vg, [2, 28]), o($Vg, [2, 29]), o($Vg, [2, 30]), o($Vg, [2, 31]), o($Vh, [2, 32]), o($Vh, [2, 33]), o($V6, [2, 12], {
1610 17: [1, 40]
1611 }), o($Vd, [2, 6]), {
1612 8: [2, 5]
1613 }, o($Vi, [2, 20]), {
1614 10: 41,
1615 11: 14,
1616 45: $V3,
1617 46: $V4,
1618 47: $V5
1619 }, {
1620 10: 42,
1621 11: 14,
1622 23: [1, 43],
1623 45: $V3,
1624 46: $V4,
1625 47: $V5
1626 }, o($Vf, [2, 26], {
1627 24: 44,
1628 26: $V7,
1629 27: $V8,
1630 28: $V9,
1631 29: $Va
1632 }), o($Vf, [2, 25]), {
1633 18: 45,
1634 20: $Vj
1635 }, o($Vi, [2, 22]), o($Vi, [2, 21]), {
1636 10: 47,
1637 11: 14,
1638 45: $V3,
1639 46: $V4,
1640 47: $V5
1641 }, o($Vf, [2, 24]), {
1642 19: [1, 48]
1643 }, {
1644 18: 49,
1645 19: [2, 14],
1646 20: $Vj
1647 }, o($Vi, [2, 23]), o($V6, [2, 13]), {
1648 19: [2, 15]
1649 }],
1650 defaultActions: {
1651 2: [2, 1],
1652 18: [2, 2],
1653 34: [2, 5],
1654 49: [2, 15]
1655 },
1656 parseError: function parseError(str, hash) {
1657 if (hash.recoverable) {
1658 this.trace(str);
1659 } else {
1660 var error = new Error(str);
1661 error.hash = hash;
1662 throw error;
1663 }
1664 },
1665 parse: function parse(input) {
1666 var self = this,
1667 stack = [0],
1668 tstack = [],
1669 vstack = [null],
1670 lstack = [],
1671 table = this.table,
1672 yytext = '',
1673 yylineno = 0,
1674 yyleng = 0,
1675 recovering = 0,
1676 TERROR = 2,
1677 EOF = 1;
1678 var args = lstack.slice.call(arguments, 1);
1679 var lexer = Object.create(this.lexer);
1680 var sharedState = {
1681 yy: {}
1682 };
1683
1684 for (var k in this.yy) {
1685 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
1686 sharedState.yy[k] = this.yy[k];
1687 }
1688 }
1689
1690 lexer.setInput(input, sharedState.yy);
1691 sharedState.yy.lexer = lexer;
1692 sharedState.yy.parser = this;
1693
1694 if (typeof lexer.yylloc == 'undefined') {
1695 lexer.yylloc = {};
1696 }
1697
1698 var yyloc = lexer.yylloc;
1699 lstack.push(yyloc);
1700 var ranges = lexer.options && lexer.options.ranges;
1701
1702 if (typeof sharedState.yy.parseError === 'function') {
1703 this.parseError = sharedState.yy.parseError;
1704 } else {
1705 this.parseError = Object.getPrototypeOf(this).parseError;
1706 }
1707
1708 function popStack(n) {
1709 stack.length = stack.length - 2 * n;
1710 vstack.length = vstack.length - n;
1711 lstack.length = lstack.length - n;
1712 }
1713
1714 function lex() {
1715 var token;
1716 token = tstack.pop() || lexer.lex() || EOF;
1717
1718 if (typeof token !== 'number') {
1719 if (token instanceof Array) {
1720 tstack = token;
1721 token = tstack.pop();
1722 }
1723
1724 token = self.symbols_[token] || token;
1725 }
1726
1727 return token;
1728 }
1729
1730 var symbol,
1731 preErrorSymbol,
1732 state,
1733 action,
1734 a,
1735 r,
1736 yyval = {},
1737 p,
1738 len,
1739 newState,
1740 expected;
1741
1742 while (true) {
1743 state = stack[stack.length - 1];
1744
1745 if (this.defaultActions[state]) {
1746 action = this.defaultActions[state];
1747 } else {
1748 if (symbol === null || typeof symbol == 'undefined') {
1749 symbol = lex();
1750 }
1751
1752 action = table[state] && table[state][symbol];
1753 }
1754
1755 if (typeof action === 'undefined' || !action.length || !action[0]) {
1756 var errStr = '';
1757 expected = [];
1758
1759 for (p in table[state]) {
1760 if (this.terminals_[p] && p > TERROR) {
1761 expected.push('\'' + this.terminals_[p] + '\'');
1762 }
1763 }
1764
1765 if (lexer.showPosition) {
1766 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
1767 } else {
1768 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
1769 }
1770
1771 this.parseError(errStr, {
1772 text: lexer.match,
1773 token: this.terminals_[symbol] || symbol,
1774 line: lexer.yylineno,
1775 loc: yyloc,
1776 expected: expected
1777 });
1778 }
1779
1780 if (action[0] instanceof Array && action.length > 1) {
1781 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
1782 }
1783
1784 switch (action[0]) {
1785 case 1:
1786 stack.push(symbol);
1787 vstack.push(lexer.yytext);
1788 lstack.push(lexer.yylloc);
1789 stack.push(action[1]);
1790 symbol = null;
1791
1792 if (!preErrorSymbol) {
1793 yyleng = lexer.yyleng;
1794 yytext = lexer.yytext;
1795 yylineno = lexer.yylineno;
1796 yyloc = lexer.yylloc;
1797
1798 if (recovering > 0) {
1799 recovering--;
1800 }
1801 } else {
1802 symbol = preErrorSymbol;
1803 preErrorSymbol = null;
1804 }
1805
1806 break;
1807
1808 case 2:
1809 len = this.productions_[action[1]][1];
1810 yyval.$ = vstack[vstack.length - len];
1811 yyval._$ = {
1812 first_line: lstack[lstack.length - (len || 1)].first_line,
1813 last_line: lstack[lstack.length - 1].last_line,
1814 first_column: lstack[lstack.length - (len || 1)].first_column,
1815 last_column: lstack[lstack.length - 1].last_column
1816 };
1817
1818 if (ranges) {
1819 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
1820 }
1821
1822 r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
1823
1824 if (typeof r !== 'undefined') {
1825 return r;
1826 }
1827
1828 if (len) {
1829 stack = stack.slice(0, -1 * len * 2);
1830 vstack = vstack.slice(0, -1 * len);
1831 lstack = lstack.slice(0, -1 * len);
1832 }
1833
1834 stack.push(this.productions_[action[1]][0]);
1835 vstack.push(yyval.$);
1836 lstack.push(yyval._$);
1837 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
1838 stack.push(newState);
1839 break;
1840
1841 case 3:
1842 return true;
1843 }
1844 }
1845
1846 return true;
1847 }
1848 };
1849 /* generated by jison-lex 0.3.4 */
1850
1851 var lexer = function () {
1852 var lexer = {
1853 EOF: 1,
1854 parseError: function parseError(str, hash) {
1855 if (this.yy.parser) {
1856 this.yy.parser.parseError(str, hash);
1857 } else {
1858 throw new Error(str);
1859 }
1860 },
1861 // resets the lexer, sets new input
1862 setInput: function (input, yy) {
1863 this.yy = yy || this.yy || {};
1864 this._input = input;
1865 this._more = this._backtrack = this.done = false;
1866 this.yylineno = this.yyleng = 0;
1867 this.yytext = this.matched = this.match = '';
1868 this.conditionStack = ['INITIAL'];
1869 this.yylloc = {
1870 first_line: 1,
1871 first_column: 0,
1872 last_line: 1,
1873 last_column: 0
1874 };
1875
1876 if (this.options.ranges) {
1877 this.yylloc.range = [0, 0];
1878 }
1879
1880 this.offset = 0;
1881 return this;
1882 },
1883 // consumes and returns one char from the input
1884 input: function () {
1885 var ch = this._input[0];
1886 this.yytext += ch;
1887 this.yyleng++;
1888 this.offset++;
1889 this.match += ch;
1890 this.matched += ch;
1891 var lines = ch.match(/(?:\r\n?|\n).*/g);
1892
1893 if (lines) {
1894 this.yylineno++;
1895 this.yylloc.last_line++;
1896 } else {
1897 this.yylloc.last_column++;
1898 }
1899
1900 if (this.options.ranges) {
1901 this.yylloc.range[1]++;
1902 }
1903
1904 this._input = this._input.slice(1);
1905 return ch;
1906 },
1907 // unshifts one char (or a string) into the input
1908 unput: function (ch) {
1909 var len = ch.length;
1910 var lines = ch.split(/(?:\r\n?|\n)/g);
1911 this._input = ch + this._input;
1912 this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;
1913
1914 this.offset -= len;
1915 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
1916 this.match = this.match.substr(0, this.match.length - 1);
1917 this.matched = this.matched.substr(0, this.matched.length - 1);
1918
1919 if (lines.length - 1) {
1920 this.yylineno -= lines.length - 1;
1921 }
1922
1923 var r = this.yylloc.range;
1924 this.yylloc = {
1925 first_line: this.yylloc.first_line,
1926 last_line: this.yylineno + 1,
1927 first_column: this.yylloc.first_column,
1928 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
1929 };
1930
1931 if (this.options.ranges) {
1932 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
1933 }
1934
1935 this.yyleng = this.yytext.length;
1936 return this;
1937 },
1938 // When called from action, caches matched text and appends it on next action
1939 more: function () {
1940 this._more = true;
1941 return this;
1942 },
1943 // 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.
1944 reject: function () {
1945 if (this.options.backtrack_lexer) {
1946 this._backtrack = true;
1947 } else {
1948 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(), {
1949 text: "",
1950 token: null,
1951 line: this.yylineno
1952 });
1953 }
1954
1955 return this;
1956 },
1957 // retain first n characters of the match
1958 less: function (n) {
1959 this.unput(this.match.slice(n));
1960 },
1961 // displays already matched input, i.e. for error messages
1962 pastInput: function () {
1963 var past = this.matched.substr(0, this.matched.length - this.match.length);
1964 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
1965 },
1966 // displays upcoming input, i.e. for error messages
1967 upcomingInput: function () {
1968 var next = this.match;
1969
1970 if (next.length < 20) {
1971 next += this._input.substr(0, 20 - next.length);
1972 }
1973
1974 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
1975 },
1976 // displays the character position where the lexing error occurred, i.e. for error messages
1977 showPosition: function () {
1978 var pre = this.pastInput();
1979 var c = new Array(pre.length + 1).join("-");
1980 return pre + this.upcomingInput() + "\n" + c + "^";
1981 },
1982 // test the lexed token: return FALSE when not a match, otherwise return token
1983 test_match: function (match, indexed_rule) {
1984 var token, lines, backup;
1985
1986 if (this.options.backtrack_lexer) {
1987 // save context
1988 backup = {
1989 yylineno: this.yylineno,
1990 yylloc: {
1991 first_line: this.yylloc.first_line,
1992 last_line: this.last_line,
1993 first_column: this.yylloc.first_column,
1994 last_column: this.yylloc.last_column
1995 },
1996 yytext: this.yytext,
1997 match: this.match,
1998 matches: this.matches,
1999 matched: this.matched,
2000 yyleng: this.yyleng,
2001 offset: this.offset,
2002 _more: this._more,
2003 _input: this._input,
2004 yy: this.yy,
2005 conditionStack: this.conditionStack.slice(0),
2006 done: this.done
2007 };
2008
2009 if (this.options.ranges) {
2010 backup.yylloc.range = this.yylloc.range.slice(0);
2011 }
2012 }
2013
2014 lines = match[0].match(/(?:\r\n?|\n).*/g);
2015
2016 if (lines) {
2017 this.yylineno += lines.length;
2018 }
2019
2020 this.yylloc = {
2021 first_line: this.yylloc.last_line,
2022 last_line: this.yylineno + 1,
2023 first_column: this.yylloc.last_column,
2024 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
2025 };
2026 this.yytext += match[0];
2027 this.match += match[0];
2028 this.matches = match;
2029 this.yyleng = this.yytext.length;
2030
2031 if (this.options.ranges) {
2032 this.yylloc.range = [this.offset, this.offset += this.yyleng];
2033 }
2034
2035 this._more = false;
2036 this._backtrack = false;
2037 this._input = this._input.slice(match[0].length);
2038 this.matched += match[0];
2039 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
2040
2041 if (this.done && this._input) {
2042 this.done = false;
2043 }
2044
2045 if (token) {
2046 return token;
2047 } else if (this._backtrack) {
2048 // recover context
2049 for (var k in backup) {
2050 this[k] = backup[k];
2051 }
2052
2053 return false; // rule action called reject() implying the next rule should be tested instead.
2054 }
2055
2056 return false;
2057 },
2058 // return next match in input
2059 next: function () {
2060 if (this.done) {
2061 return this.EOF;
2062 }
2063
2064 if (!this._input) {
2065 this.done = true;
2066 }
2067
2068 var token, match, tempMatch, index;
2069
2070 if (!this._more) {
2071 this.yytext = '';
2072 this.match = '';
2073 }
2074
2075 var rules = this._currentRules();
2076
2077 for (var i = 0; i < rules.length; i++) {
2078 tempMatch = this._input.match(this.rules[rules[i]]);
2079
2080 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
2081 match = tempMatch;
2082 index = i;
2083
2084 if (this.options.backtrack_lexer) {
2085 token = this.test_match(tempMatch, rules[i]);
2086
2087 if (token !== false) {
2088 return token;
2089 } else if (this._backtrack) {
2090 match = false;
2091 continue; // rule action called reject() implying a rule MISmatch.
2092 } else {
2093 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
2094 return false;
2095 }
2096 } else if (!this.options.flex) {
2097 break;
2098 }
2099 }
2100 }
2101
2102 if (match) {
2103 token = this.test_match(match, rules[index]);
2104
2105 if (token !== false) {
2106 return token;
2107 } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
2108
2109
2110 return false;
2111 }
2112
2113 if (this._input === "") {
2114 return this.EOF;
2115 } else {
2116 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
2117 text: "",
2118 token: null,
2119 line: this.yylineno
2120 });
2121 }
2122 },
2123 // return next match that has a token
2124 lex: function lex() {
2125 var r = this.next();
2126
2127 if (r) {
2128 return r;
2129 } else {
2130 return this.lex();
2131 }
2132 },
2133 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
2134 begin: function begin(condition) {
2135 this.conditionStack.push(condition);
2136 },
2137 // pop the previously active lexer condition state off the condition stack
2138 popState: function popState() {
2139 var n = this.conditionStack.length - 1;
2140
2141 if (n > 0) {
2142 return this.conditionStack.pop();
2143 } else {
2144 return this.conditionStack[0];
2145 }
2146 },
2147 // produce the lexer rule set which is active for the currently active lexer condition state
2148 _currentRules: function _currentRules() {
2149 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
2150 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
2151 } else {
2152 return this.conditions["INITIAL"].rules;
2153 }
2154 },
2155 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
2156 topState: function topState(n) {
2157 n = this.conditionStack.length - 1 - Math.abs(n || 0);
2158
2159 if (n >= 0) {
2160 return this.conditionStack[n];
2161 } else {
2162 return "INITIAL";
2163 }
2164 },
2165 // alias for begin(condition)
2166 pushState: function pushState(condition) {
2167 this.begin(condition);
2168 },
2169 // return the number of states currently on the stack
2170 stateStackSize: function stateStackSize() {
2171 return this.conditionStack.length;
2172 },
2173 options: {},
2174 performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
2175 var YYSTATE = YY_START;
2176
2177 switch ($avoiding_name_collisions) {
2178 case 0:
2179 /* do nothing */
2180 break;
2181
2182 case 1:
2183 return 6;
2184 break;
2185
2186 case 2:
2187 /* skip whitespace */
2188 break;
2189
2190 case 3:
2191 return 5;
2192 break;
2193
2194 case 4:
2195 this.begin("struct");
2196 /*console.log('Starting struct');*/
2197
2198 return 17;
2199 break;
2200
2201 case 5:
2202 /*console.log('Ending struct');*/
2203 this.popState();
2204 return 19;
2205 break;
2206
2207 case 6:
2208 /* nothing */
2209 break;
2210
2211 case 7:
2212 /*console.log('lex-member: ' + yy_.yytext);*/
2213 return "MEMBER";
2214 break;
2215
2216 case 8:
2217 return 16;
2218 break;
2219
2220 case 9:
2221 this.begin("string");
2222 break;
2223
2224 case 10:
2225 this.popState();
2226 break;
2227
2228 case 11:
2229 return "STR";
2230 break;
2231
2232 case 12:
2233 return 27;
2234 break;
2235
2236 case 13:
2237 return 27;
2238 break;
2239
2240 case 14:
2241 return 29;
2242 break;
2243
2244 case 15:
2245 return 29;
2246 break;
2247
2248 case 16:
2249 return 28;
2250 break;
2251
2252 case 17:
2253 return 26;
2254 break;
2255
2256 case 18:
2257 return 30;
2258 break;
2259
2260 case 19:
2261 return 31;
2262 break;
2263
2264 case 20:
2265 return 13;
2266 break;
2267
2268 case 21:
2269 return 43;
2270 break;
2271
2272 case 22:
2273 return 'DOT';
2274 break;
2275
2276 case 23:
2277 return 'PLUS';
2278 break;
2279
2280 case 24:
2281 return 40;
2282 break;
2283
2284 case 25:
2285 return 'EQUALS';
2286 break;
2287
2288 case 26:
2289 return 'EQUALS';
2290 break;
2291
2292 case 27:
2293 return 47;
2294 break;
2295
2296 case 28:
2297 return 'PUNCTUATION';
2298 break;
2299
2300 case 29:
2301 return 46;
2302 break;
2303
2304 case 30:
2305 return 45;
2306 break;
2307
2308 case 31:
2309 return 42;
2310 break;
2311
2312 case 32:
2313 return 8;
2314 break;
2315 }
2316 },
2317 rules: [/^(?:%%[^\n]*)/, /^(?:\n+)/, /^(?:\s+)/, /^(?:classDiagram\b)/, /^(?:[\{])/, /^(?:\})/, /^(?:[\n])/, /^(?:[^\{\}\n]*)/, /^(?:class\b)/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:--)/, /^(?:\.\.)/, /^(?::[^#\n;]+)/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:[A-Za-z]+)/, /^(?:[!"#$%&'*+,-.`?\\_\/])/, /^(?:[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)/, /^(?:$)/],
2318 conditions: {
2319 "string": {
2320 "rules": [10, 11],
2321 "inclusive": false
2322 },
2323 "struct": {
2324 "rules": [5, 6, 7],
2325 "inclusive": false
2326 },
2327 "INITIAL": {
2328 "rules": [0, 1, 2, 3, 4, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32],
2329 "inclusive": true
2330 }
2331 }
2332 };
2333 return lexer;
2334 }();
2335
2336 parser.lexer = lexer;
2337
2338 function Parser() {
2339 this.yy = {};
2340 }
2341
2342 Parser.prototype = parser;
2343 parser.Parser = Parser;
2344 return new Parser();
2345}();
2346
2347if (true) {
2348 exports.parser = parser;
2349 exports.Parser = parser.Parser;
2350
2351 exports.parse = function () {
2352 return parser.parse.apply(parser, arguments);
2353 };
2354
2355 exports.main = function commonjsMain(args) {
2356 if (!args[1]) {
2357 console.log('Usage: ' + args[0] + ' FILE');
2358 process.exit(1);
2359 }
2360
2361 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
2362
2363 return exports.parser.parse(source);
2364 };
2365
2366 if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
2367 exports.main(process.argv.slice(1));
2368 }
2369}
2370/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
2371
2372/***/ }),
2373
2374/***/ "./src/diagrams/flowchart/flowDb.js":
2375/*!******************************************!*\
2376 !*** ./src/diagrams/flowchart/flowDb.js ***!
2377 \******************************************/
2378/*! exports provided: addVertex, addLink, updateLinkInterpolate, updateLink, addClass, setDirection, setClass, setLink, getTooltip, setClickEvent, bindFunctions, getDirection, getVertices, getEdges, getClasses, clear, defaultStyle, addSubGraph, getDepthFirstPos, indexNodes, getSubGraphs, default */
2379/***/ (function(module, __webpack_exports__, __webpack_require__) {
2380
2381"use strict";
2382__webpack_require__.r(__webpack_exports__);
2383/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addVertex", function() { return addVertex; });
2384/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addLink", function() { return addLink; });
2385/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateLinkInterpolate", function() { return updateLinkInterpolate; });
2386/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateLink", function() { return updateLink; });
2387/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
2388/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDirection", function() { return setDirection; });
2389/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClass", function() { return setClass; });
2390/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; });
2391/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTooltip", function() { return getTooltip; });
2392/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; });
2393/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; });
2394/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; });
2395/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getVertices", function() { return getVertices; });
2396/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEdges", function() { return getEdges; });
2397/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
2398/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
2399/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultStyle", function() { return defaultStyle; });
2400/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSubGraph", function() { return addSubGraph; });
2401/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDepthFirstPos", function() { return getDepthFirstPos; });
2402/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indexNodes", function() { return indexNodes; });
2403/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSubGraphs", function() { return getSubGraphs; });
2404/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
2405/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
2406/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @braintree/sanitize-url */ "@braintree/sanitize-url");
2407/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__);
2408/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
2409/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
2410/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ "./src/config.js");
2411
2412
2413
2414
2415
2416const config = Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])();
2417let vertices = {};
2418let edges = [];
2419let classes = [];
2420let subGraphs = [];
2421let subGraphLookup = {};
2422let tooltips = {};
2423let subCount = 0;
2424let direction; // Functions to be run after graph rendering
2425
2426let funs = [];
2427
2428const sanitize = text => {
2429 let txt = text;
2430
2431 if (config.securityLevel === 'strict') {
2432 txt = txt.replace(/<br>/g, '#br#');
2433 txt = txt.replace(/<br\S*?\/>/g, '#br#');
2434 txt = txt.replace(/</g, '&lt;').replace(/>/g, '&gt;');
2435 txt = txt.replace(/=/g, '&equals;');
2436 txt = txt.replace(/#br#/g, '<br/>');
2437 }
2438
2439 return txt;
2440};
2441/**
2442 * Function called by parser when a node definition has been found
2443 * @param id
2444 * @param text
2445 * @param type
2446 * @param style
2447 * @param classes
2448 */
2449
2450
2451const addVertex = function (id, text, type, style, classes) {
2452 let txt;
2453
2454 if (typeof id === 'undefined') {
2455 return;
2456 }
2457
2458 if (id.trim().length === 0) {
2459 return;
2460 }
2461
2462 if (typeof vertices[id] === 'undefined') {
2463 vertices[id] = {
2464 id: id,
2465 styles: [],
2466 classes: []
2467 };
2468 }
2469
2470 if (typeof text !== 'undefined') {
2471 txt = sanitize(text.trim()); // strip quotes if string starts and exnds with a quote
2472
2473 if (txt[0] === '"' && txt[txt.length - 1] === '"') {
2474 txt = txt.substring(1, txt.length - 1);
2475 }
2476
2477 vertices[id].text = txt;
2478 }
2479
2480 if (typeof type !== 'undefined') {
2481 vertices[id].type = type;
2482 }
2483
2484 if (typeof style !== 'undefined') {
2485 if (style !== null) {
2486 style.forEach(function (s) {
2487 vertices[id].styles.push(s);
2488 });
2489 }
2490 }
2491
2492 if (typeof classes !== 'undefined') {
2493 if (classes !== null) {
2494 classes.forEach(function (s) {
2495 vertices[id].classes.push(s);
2496 });
2497 }
2498 }
2499};
2500/**
2501 * Function called by parser when a link/edge definition has been found
2502 * @param start
2503 * @param end
2504 * @param type
2505 * @param linktext
2506 */
2507
2508const addLink = function (start, end, type, linktext) {
2509 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].info('Got edge...', start, end);
2510 const edge = {
2511 start: start,
2512 end: end,
2513 type: undefined,
2514 text: ''
2515 };
2516 linktext = type.text;
2517
2518 if (typeof linktext !== 'undefined') {
2519 edge.text = sanitize(linktext.trim()); // strip quotes if string starts and exnds with a quote
2520
2521 if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') {
2522 edge.text = edge.text.substring(1, edge.text.length - 1);
2523 }
2524 }
2525
2526 if (typeof type !== 'undefined') {
2527 edge.type = type.type;
2528 edge.stroke = type.stroke;
2529 }
2530
2531 edges.push(edge);
2532};
2533/**
2534 * Updates a link's line interpolation algorithm
2535 * @param pos
2536 * @param interpolate
2537 */
2538
2539const updateLinkInterpolate = function (positions, interp) {
2540 positions.forEach(function (pos) {
2541 if (pos === 'default') {
2542 edges.defaultInterpolate = interp;
2543 } else {
2544 edges[pos].interpolate = interp;
2545 }
2546 });
2547};
2548/**
2549 * Updates a link with a style
2550 * @param pos
2551 * @param style
2552 */
2553
2554const updateLink = function (positions, style) {
2555 positions.forEach(function (pos) {
2556 if (pos === 'default') {
2557 edges.defaultStyle = style;
2558 } else {
2559 if (_utils__WEBPACK_IMPORTED_MODULE_3__["default"].isSubstringInArray('fill', style) === -1) {
2560 style.push('fill:none');
2561 }
2562
2563 edges[pos].style = style;
2564 }
2565 });
2566};
2567const addClass = function (id, style) {
2568 if (typeof classes[id] === 'undefined') {
2569 classes[id] = {
2570 id: id,
2571 styles: []
2572 };
2573 }
2574
2575 if (typeof style !== 'undefined') {
2576 if (style !== null) {
2577 style.forEach(function (s) {
2578 classes[id].styles.push(s);
2579 });
2580 }
2581 }
2582};
2583/**
2584 * Called by parser when a graph definition is found, stores the direction of the chart.
2585 * @param dir
2586 */
2587
2588const setDirection = function (dir) {
2589 direction = dir;
2590};
2591/**
2592 * Called by parser when a special node is found, e.g. a clickable element.
2593 * @param ids Comma separated list of ids
2594 * @param className Class to add
2595 */
2596
2597const setClass = function (ids, className) {
2598 ids.split(',').forEach(function (id) {
2599 if (typeof vertices[id] !== 'undefined') {
2600 vertices[id].classes.push(className);
2601 }
2602
2603 if (typeof subGraphLookup[id] !== 'undefined') {
2604 subGraphLookup[id].classes.push(className);
2605 }
2606 });
2607};
2608
2609const setTooltip = function (ids, tooltip) {
2610 ids.split(',').forEach(function (id) {
2611 if (typeof tooltip !== 'undefined') {
2612 tooltips[id] = tooltip;
2613 }
2614 });
2615};
2616
2617const setClickFun = function (id, functionName) {
2618 if (config.securityLevel === 'strict') {
2619 return;
2620 }
2621
2622 if (typeof functionName === 'undefined') {
2623 return;
2624 }
2625
2626 if (typeof vertices[id] !== 'undefined') {
2627 funs.push(function (element) {
2628 const elem = document.querySelector(`[id="${id}"]`);
2629
2630 if (elem !== null) {
2631 elem.addEventListener('click', function () {
2632 window[functionName](id);
2633 }, false);
2634 }
2635 });
2636 }
2637};
2638/**
2639 * Called by parser when a link is found. Adds the URL to the vertex data.
2640 * @param ids Comma separated list of ids
2641 * @param linkStr URL to create a link for
2642 * @param tooltip Tooltip for the clickable element
2643 */
2644
2645
2646const setLink = function (ids, linkStr, tooltip) {
2647 ids.split(',').forEach(function (id) {
2648 if (typeof vertices[id] !== 'undefined') {
2649 if (config.securityLevel === 'strict') {
2650 vertices[id].link = Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__["sanitizeUrl"])(linkStr); // .replace(/javascript:.*/g, '')
2651 } else {
2652 vertices[id].link = linkStr;
2653 }
2654 }
2655 });
2656 setTooltip(ids, tooltip);
2657 setClass(ids, 'clickable');
2658};
2659const getTooltip = function (id) {
2660 return tooltips[id];
2661};
2662/**
2663 * Called by parser when a click definition is found. Registers an event handler.
2664 * @param ids Comma separated list of ids
2665 * @param functionName Function to be called on click
2666 * @param tooltip Tooltip for the clickable element
2667 */
2668
2669const setClickEvent = function (ids, functionName, tooltip) {
2670 ids.split(',').forEach(function (id) {
2671 setClickFun(id, functionName);
2672 });
2673 setTooltip(ids, tooltip);
2674 setClass(ids, 'clickable');
2675};
2676const bindFunctions = function (element) {
2677 funs.forEach(function (fun) {
2678 fun(element);
2679 });
2680};
2681const getDirection = function () {
2682 return direction;
2683};
2684/**
2685 * Retrieval function for fetching the found nodes after parsing has completed.
2686 * @returns {{}|*|vertices}
2687 */
2688
2689const getVertices = function () {
2690 return vertices;
2691};
2692/**
2693 * Retrieval function for fetching the found links after parsing has completed.
2694 * @returns {{}|*|edges}
2695 */
2696
2697const getEdges = function () {
2698 return edges;
2699};
2700/**
2701 * Retrieval function for fetching the found class definitions after parsing has completed.
2702 * @returns {{}|*|classes}
2703 */
2704
2705const getClasses = function () {
2706 return classes;
2707};
2708
2709const setupToolTips = function (element) {
2710 let tooltipElem = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('.mermaidTooltip');
2711
2712 if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
2713 tooltipElem = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);
2714 }
2715
2716 const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](element).select('svg');
2717 const nodes = svg.selectAll('g.node');
2718 nodes.on('mouseover', function () {
2719 const el = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
2720 const title = el.attr('title'); // Dont try to draw a tooltip if no data is provided
2721
2722 if (title === null) {
2723 return;
2724 }
2725
2726 const rect = this.getBoundingClientRect();
2727 tooltipElem.transition().duration(200).style('opacity', '.9');
2728 tooltipElem.html(el.attr('title')).style('left', rect.left + (rect.right - rect.left) / 2 + 'px').style('top', rect.top - 14 + document.body.scrollTop + 'px');
2729 el.classed('hover', true);
2730 }).on('mouseout', function () {
2731 tooltipElem.transition().duration(500).style('opacity', 0);
2732 const el = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
2733 el.classed('hover', false);
2734 });
2735};
2736
2737funs.push(setupToolTips);
2738/**
2739 * Clears the internal graph db so that a new graph can be parsed.
2740 */
2741
2742const clear = function () {
2743 vertices = {};
2744 classes = {};
2745 edges = [];
2746 funs = [];
2747 funs.push(setupToolTips);
2748 subGraphs = [];
2749 subGraphLookup = {};
2750 subCount = 0;
2751 tooltips = [];
2752};
2753/**
2754 *
2755 * @returns {string}
2756 */
2757
2758const defaultStyle = function () {
2759 return 'fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;';
2760};
2761/**
2762 * Clears the internal graph db so that a new graph can be parsed.
2763 */
2764
2765const addSubGraph = function (id, list, title) {
2766 function uniq(a) {
2767 const prims = {
2768 'boolean': {},
2769 'number': {},
2770 'string': {}
2771 };
2772 const objs = [];
2773 return a.filter(function (item) {
2774 const type = typeof item;
2775
2776 if (item.trim() === '') {
2777 return false;
2778 }
2779
2780 if (type in prims) {
2781 return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true;
2782 } else {
2783 return objs.indexOf(item) >= 0 ? false : objs.push(item);
2784 }
2785 });
2786 }
2787
2788 let nodeList = [];
2789 nodeList = uniq(nodeList.concat.apply(nodeList, list));
2790 id = id || 'subGraph' + subCount;
2791 title = title || '';
2792 title = sanitize(title);
2793 subCount = subCount + 1;
2794 const subGraph = {
2795 id: id,
2796 nodes: nodeList,
2797 title: title.trim(),
2798 classes: []
2799 };
2800 subGraphs.push(subGraph);
2801 subGraphLookup[id] = subGraph;
2802 return id;
2803};
2804
2805const getPosForId = function (id) {
2806 for (let i = 0; i < subGraphs.length; i++) {
2807 if (subGraphs[i].id === id) {
2808 return i;
2809 }
2810 }
2811
2812 return -1;
2813};
2814
2815let secCount = -1;
2816const posCrossRef = [];
2817
2818const indexNodes2 = function (id, pos) {
2819 const nodes = subGraphs[pos].nodes;
2820 secCount = secCount + 1;
2821
2822 if (secCount > 2000) {
2823 return;
2824 }
2825
2826 posCrossRef[secCount] = pos; // Check if match
2827
2828 if (subGraphs[pos].id === id) {
2829 return {
2830 result: true,
2831 count: 0
2832 };
2833 }
2834
2835 let count = 0;
2836 let posCount = 1;
2837
2838 while (count < nodes.length) {
2839 const childPos = getPosForId(nodes[count]); // Ignore regular nodes (pos will be -1)
2840
2841 if (childPos >= 0) {
2842 const res = indexNodes2(id, childPos);
2843
2844 if (res.result) {
2845 return {
2846 result: true,
2847 count: posCount + res.count
2848 };
2849 } else {
2850 posCount = posCount + res.count;
2851 }
2852 }
2853
2854 count = count + 1;
2855 }
2856
2857 return {
2858 result: false,
2859 count: posCount
2860 };
2861};
2862
2863const getDepthFirstPos = function (pos) {
2864 return posCrossRef[pos];
2865};
2866const indexNodes = function () {
2867 secCount = -1;
2868
2869 if (subGraphs.length > 0) {
2870 indexNodes2('none', subGraphs.length - 1, 0);
2871 }
2872};
2873const getSubGraphs = function () {
2874 return subGraphs;
2875};
2876/* harmony default export */ __webpack_exports__["default"] = ({
2877 addVertex,
2878 addLink,
2879 updateLinkInterpolate,
2880 updateLink,
2881 addClass,
2882 setDirection,
2883 setClass,
2884 getTooltip,
2885 setClickEvent,
2886 setLink,
2887 bindFunctions,
2888 getDirection,
2889 getVertices,
2890 getEdges,
2891 getClasses,
2892 clear,
2893 defaultStyle,
2894 addSubGraph,
2895 getDepthFirstPos,
2896 indexNodes,
2897 getSubGraphs
2898});
2899
2900/***/ }),
2901
2902/***/ "./src/diagrams/flowchart/flowRenderer.js":
2903/*!************************************************!*\
2904 !*** ./src/diagrams/flowchart/flowRenderer.js ***!
2905 \************************************************/
2906/*! exports provided: setConf, addVertices, addEdges, getClasses, draw, default */
2907/***/ (function(module, __webpack_exports__, __webpack_require__) {
2908
2909"use strict";
2910__webpack_require__.r(__webpack_exports__);
2911/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
2912/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addVertices", function() { return addVertices; });
2913/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEdges", function() { return addEdges; });
2914/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
2915/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
2916/* harmony import */ var graphlibrary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlibrary */ "graphlibrary");
2917/* harmony import */ var graphlibrary__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlibrary__WEBPACK_IMPORTED_MODULE_0__);
2918/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3");
2919/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__);
2920/* harmony import */ var _flowDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flowDb */ "./src/diagrams/flowchart/flowDb.js");
2921/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/flow */ "./src/diagrams/flowchart/parser/flow.js");
2922/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_flow__WEBPACK_IMPORTED_MODULE_3__);
2923/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ "./src/config.js");
2924/* harmony import */ var dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dagre-d3-renderer */ "dagre-d3-renderer");
2925/* harmony import */ var dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5__);
2926/* harmony import */ var dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dagre-d3-renderer/lib/label/add-html-label.js */ "dagre-d3-renderer/lib/label/add-html-label.js");
2927/* harmony import */ var dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__);
2928/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
2929/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939const conf = {};
2940const setConf = function (cnf) {
2941 const keys = Object.keys(cnf);
2942
2943 for (let i = 0; i < keys.length; i++) {
2944 conf[keys[i]] = cnf[keys[i]];
2945 }
2946};
2947/**
2948 * Function that adds the vertices found in the graph definition to the graph to be rendered.
2949 * @param vert Object containing the vertices.
2950 * @param g The graph that is to be drawn.
2951 */
2952
2953const addVertices = function (vert, g, svgId) {
2954 const svg = d3__WEBPACK_IMPORTED_MODULE_1__["select"](`[id="${svgId}"]`);
2955 const keys = Object.keys(vert);
2956
2957 const styleFromStyleArr = function (styleStr, arr) {
2958 // Create a compound style definition from the style definitions found for the node in the graph definition
2959 for (let i = 0; i < arr.length; i++) {
2960 if (typeof arr[i] !== 'undefined') {
2961 styleStr = styleStr + arr[i] + ';';
2962 }
2963 }
2964
2965 return styleStr;
2966 }; // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition
2967
2968
2969 keys.forEach(function (id) {
2970 const vertex = vert[id];
2971 /**
2972 * Variable for storing the classes for the vertex
2973 * @type {string}
2974 */
2975
2976 let classStr = '';
2977
2978 if (vertex.classes.length > 0) {
2979 classStr = vertex.classes.join(' ');
2980 }
2981 /**
2982 * Variable for storing the extracted style for the vertex
2983 * @type {string}
2984 */
2985
2986
2987 let style = ''; // Create a compound style definition from the style definitions found for the node in the graph definition
2988
2989 style = styleFromStyleArr(style, vertex.styles); // Use vertex id as text in the box if no text is provided by the graph definition
2990
2991 let vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually
2992
2993 let vertexNode;
2994
2995 if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) {
2996 // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?
2997 const node = {
2998 label: vertexText.replace(/fa[lrsb]?:fa-[\w-]+/g, s => `<i class='${s.replace(':', ' ')}'></i>`)
2999 };
3000 vertexNode = dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default()(svg, node).node();
3001 vertexNode.parentNode.removeChild(vertexNode);
3002 } else {
3003 const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');
3004 const rows = vertexText.split(/<br[/]{0,1}>/);
3005
3006 for (let j = 0; j < rows.length; j++) {
3007 const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');
3008 tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
3009 tspan.setAttribute('dy', '1em');
3010 tspan.setAttribute('x', '1');
3011 tspan.textContent = rows[j];
3012 svgLabel.appendChild(tspan);
3013 }
3014
3015 vertexNode = svgLabel;
3016 } // If the node has a link, we wrap it in a SVG link
3017
3018
3019 if (vertex.link) {
3020 const link = document.createElementNS('http://www.w3.org/2000/svg', 'a');
3021 link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);
3022 link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');
3023 link.appendChild(vertexNode);
3024 vertexNode = link;
3025 }
3026
3027 let radious = 0;
3028 let _shape = ''; // Set the shape based parameters
3029
3030 switch (vertex.type) {
3031 case 'round':
3032 radious = 5;
3033 _shape = 'rect';
3034 break;
3035
3036 case 'square':
3037 _shape = 'rect';
3038 break;
3039
3040 case 'diamond':
3041 _shape = 'question';
3042 break;
3043
3044 case 'odd':
3045 _shape = 'rect_left_inv_arrow';
3046 break;
3047
3048 case 'lean_right':
3049 _shape = 'lean_right';
3050 break;
3051
3052 case 'lean_left':
3053 _shape = 'lean_left';
3054 break;
3055
3056 case 'trapezoid':
3057 _shape = 'trapezoid';
3058 break;
3059
3060 case 'inv_trapezoid':
3061 _shape = 'inv_trapezoid';
3062 break;
3063
3064 case 'odd_right':
3065 _shape = 'rect_left_inv_arrow';
3066 break;
3067
3068 case 'circle':
3069 _shape = 'circle';
3070 break;
3071
3072 case 'ellipse':
3073 _shape = 'ellipse';
3074 break;
3075
3076 case 'group':
3077 _shape = 'rect';
3078 break;
3079
3080 default:
3081 _shape = 'rect';
3082 } // Add the node
3083
3084
3085 g.setNode(vertex.id, {
3086 labelType: 'svg',
3087 shape: _shape,
3088 label: vertexNode,
3089 rx: radious,
3090 ry: radious,
3091 'class': classStr,
3092 style: style,
3093 id: vertex.id
3094 });
3095 });
3096};
3097/**
3098 * Add edges to graph based on parsed graph defninition
3099 * @param {Object} edges The edges to add to the graph
3100 * @param {Object} g The graph object
3101 */
3102
3103const addEdges = function (edges, g) {
3104 let cnt = 0;
3105 let defaultStyle;
3106
3107 if (typeof edges.defaultStyle !== 'undefined') {
3108 defaultStyle = edges.defaultStyle.toString().replace(/,/g, ';');
3109 }
3110
3111 edges.forEach(function (edge) {
3112 cnt++;
3113 const edgeData = {}; // Set link type for rendering
3114
3115 if (edge.type === 'arrow_open') {
3116 edgeData.arrowhead = 'none';
3117 } else {
3118 edgeData.arrowhead = 'normal';
3119 }
3120
3121 let style = '';
3122
3123 if (typeof edge.style !== 'undefined') {
3124 edge.style.forEach(function (s) {
3125 style = style + s + ';';
3126 });
3127 } else {
3128 switch (edge.stroke) {
3129 case 'normal':
3130 style = 'fill:none';
3131
3132 if (typeof defaultStyle !== 'undefined') {
3133 style = defaultStyle;
3134 }
3135
3136 break;
3137
3138 case 'dotted':
3139 style = 'stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;';
3140 break;
3141
3142 case 'thick':
3143 style = 'stroke: #333; stroke-width: 3.5px;fill:none';
3144 break;
3145 }
3146 }
3147
3148 edgeData.style = style;
3149
3150 if (typeof edge.interpolate !== 'undefined') {
3151 edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["interpolateToCurve"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
3152 } else if (typeof edges.defaultInterpolate !== 'undefined') {
3153 edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["interpolateToCurve"])(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
3154 } else {
3155 edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["interpolateToCurve"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
3156 }
3157
3158 if (typeof edge.text === 'undefined') {
3159 if (typeof edge.style !== 'undefined') {
3160 edgeData.arrowheadStyle = 'fill: #333';
3161 }
3162 } else {
3163 edgeData.arrowheadStyle = 'fill: #333';
3164
3165 if (typeof edge.style === 'undefined') {
3166 edgeData.labelpos = 'c';
3167
3168 if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) {
3169 edgeData.labelType = 'html';
3170 edgeData.label = '<span class="edgeLabel">' + edge.text + '</span>';
3171 } else {
3172 edgeData.labelType = 'text';
3173 edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';
3174 edgeData.label = edge.text.replace(/<br>/g, '\n');
3175 }
3176 } else {
3177 edgeData.label = edge.text.replace(/<br>/g, '\n');
3178 }
3179 } // Add the edge to the graph
3180
3181
3182 g.setEdge(edge.start, edge.end, edgeData, cnt);
3183 });
3184};
3185/**
3186 * Returns the all the styles from classDef statements in the graph definition.
3187 * @returns {object} classDef styles
3188 */
3189
3190const getClasses = function (text) {
3191 _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear();
3192 const parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
3193 parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition
3194
3195 parser.parse(text);
3196 return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getClasses();
3197};
3198/**
3199 * Draws a flowchart in the tag with id: id based on the graph definition in text.
3200 * @param text
3201 * @param id
3202 */
3203
3204const draw = function (text, id) {
3205 _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].debug('Drawing flowchart');
3206 _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear();
3207 const parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
3208 parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition
3209
3210 try {
3211 parser.parse(text);
3212 } catch (err) {
3213 _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].debug('Parsing failed');
3214 } // Fetch the default direction, use TD if none was found
3215
3216
3217 let dir = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection();
3218
3219 if (typeof dir === 'undefined') {
3220 dir = 'TD';
3221 } // Create the input mermaid.graph
3222
3223
3224 const g = new graphlibrary__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({
3225 multigraph: true,
3226 compound: true
3227 }).setGraph({
3228 rankdir: dir,
3229 marginx: 20,
3230 marginy: 20
3231 }).setDefaultEdgeLabel(function () {
3232 return {};
3233 });
3234 let subG;
3235 const subGraphs = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getSubGraphs();
3236
3237 for (let i = subGraphs.length - 1; i >= 0; i--) {
3238 subG = subGraphs[i];
3239 _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].addVertex(subG.id, subG.title, 'group', undefined, subG.classes);
3240 } // Fetch the verices/nodes and edges/links from the parsed graph definition
3241
3242
3243 const vert = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getVertices();
3244 const edges = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getEdges();
3245 let i = 0;
3246
3247 for (i = subGraphs.length - 1; i >= 0; i--) {
3248 subG = subGraphs[i];
3249 d3__WEBPACK_IMPORTED_MODULE_1__["selectAll"]('cluster').append('text');
3250
3251 for (let j = 0; j < subG.nodes.length; j++) {
3252 g.setParent(subG.nodes[j], subG.id);
3253 }
3254 }
3255
3256 addVertices(vert, g, id);
3257 addEdges(edges, g); // Create the renderer
3258
3259 const Render = dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.render;
3260 const render = new Render(); // Add custom shape for rhombus type of boc (decision)
3261
3262 render.shapes().question = function (parent, bbox, node) {
3263 const w = bbox.width;
3264 const h = bbox.height;
3265 const s = (w + h) * 0.9;
3266 const points = [{
3267 x: s / 2,
3268 y: 0
3269 }, {
3270 x: s,
3271 y: -s / 2
3272 }, {
3273 x: s / 2,
3274 y: -s
3275 }, {
3276 x: 0,
3277 y: -s / 2
3278 }];
3279 const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
3280 return d.x + ',' + d.y;
3281 }).join(' ')).attr('rx', 5).attr('ry', 5).attr('transform', 'translate(' + -s / 2 + ',' + s * 2 / 4 + ')');
3282
3283 node.intersect = function (point) {
3284 return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
3285 };
3286
3287 return shapeSvg;
3288 }; // Add custom shape for box with inverted arrow on left side
3289
3290
3291 render.shapes().rect_left_inv_arrow = function (parent, bbox, node) {
3292 const w = bbox.width;
3293 const h = bbox.height;
3294 const points = [{
3295 x: -h / 2,
3296 y: 0
3297 }, {
3298 x: w,
3299 y: 0
3300 }, {
3301 x: w,
3302 y: -h
3303 }, {
3304 x: -h / 2,
3305 y: -h
3306 }, {
3307 x: 0,
3308 y: -h / 2
3309 }];
3310 const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
3311 return d.x + ',' + d.y;
3312 }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
3313
3314 node.intersect = function (point) {
3315 return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
3316 };
3317
3318 return shapeSvg;
3319 }; // Add custom shape for box with inverted arrow on left side
3320
3321
3322 render.shapes().lean_right = function (parent, bbox, node) {
3323 const w = bbox.width;
3324 const h = bbox.height;
3325 const points = [{
3326 x: -2 * h / 6,
3327 y: 0
3328 }, {
3329 x: w - h / 6,
3330 y: 0
3331 }, {
3332 x: w + 2 * h / 6,
3333 y: -h
3334 }, {
3335 x: h / 6,
3336 y: -h
3337 }];
3338 const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
3339 return d.x + ',' + d.y;
3340 }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
3341
3342 node.intersect = function (point) {
3343 return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
3344 };
3345
3346 return shapeSvg;
3347 }; // Add custom shape for box with inverted arrow on left side
3348
3349
3350 render.shapes().lean_left = function (parent, bbox, node) {
3351 const w = bbox.width;
3352 const h = bbox.height;
3353 const points = [{
3354 x: 2 * h / 6,
3355 y: 0
3356 }, {
3357 x: w + h / 6,
3358 y: 0
3359 }, {
3360 x: w - 2 * h / 6,
3361 y: -h
3362 }, {
3363 x: -h / 6,
3364 y: -h
3365 }];
3366 const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
3367 return d.x + ',' + d.y;
3368 }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
3369
3370 node.intersect = function (point) {
3371 return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
3372 };
3373
3374 return shapeSvg;
3375 }; // Add custom shape for box with inverted arrow on left side
3376
3377
3378 render.shapes().trapezoid = function (parent, bbox, node) {
3379 const w = bbox.width;
3380 const h = bbox.height;
3381 const points = [{
3382 x: -2 * h / 6,
3383 y: 0
3384 }, {
3385 x: w + 2 * h / 6,
3386 y: 0
3387 }, {
3388 x: w - h / 6,
3389 y: -h
3390 }, {
3391 x: h / 6,
3392 y: -h
3393 }];
3394 const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
3395 return d.x + ',' + d.y;
3396 }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
3397
3398 node.intersect = function (point) {
3399 return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
3400 };
3401
3402 return shapeSvg;
3403 }; // Add custom shape for box with inverted arrow on left side
3404
3405
3406 render.shapes().inv_trapezoid = function (parent, bbox, node) {
3407 const w = bbox.width;
3408 const h = bbox.height;
3409 const points = [{
3410 x: h / 6,
3411 y: 0
3412 }, {
3413 x: w - h / 6,
3414 y: 0
3415 }, {
3416 x: w + 2 * h / 6,
3417 y: -h
3418 }, {
3419 x: -2 * h / 6,
3420 y: -h
3421 }];
3422 const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
3423 return d.x + ',' + d.y;
3424 }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
3425
3426 node.intersect = function (point) {
3427 return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
3428 };
3429
3430 return shapeSvg;
3431 }; // Add custom shape for box with inverted arrow on right side
3432
3433
3434 render.shapes().rect_right_inv_arrow = function (parent, bbox, node) {
3435 const w = bbox.width;
3436 const h = bbox.height;
3437 const points = [{
3438 x: 0,
3439 y: 0
3440 }, {
3441 x: w + h / 2,
3442 y: 0
3443 }, {
3444 x: w,
3445 y: -h / 2
3446 }, {
3447 x: w + h / 2,
3448 y: -h
3449 }, {
3450 x: 0,
3451 y: -h
3452 }];
3453 const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
3454 return d.x + ',' + d.y;
3455 }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
3456
3457 node.intersect = function (point) {
3458 return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
3459 };
3460
3461 return shapeSvg;
3462 }; // Add our custom arrow - an empty arrowhead
3463
3464
3465 render.arrows().none = function normal(parent, id, edge, type) {
3466 const marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto');
3467 const path = marker.append('path').attr('d', 'M 0 0 L 0 0 L 0 0 z');
3468 dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.util.applyStyle(path, edge[type + 'Style']);
3469 }; // Override normal arrowhead defined in d3. Remove style & add class to allow css styling.
3470
3471
3472 render.arrows().normal = function normal(parent, id, edge, type) {
3473 const marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto');
3474 marker.append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z').attr('class', 'arrowheadPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');
3475 }; // Set up an SVG group so that we can translate the final graph.
3476
3477
3478 const svg = d3__WEBPACK_IMPORTED_MODULE_1__["select"](`[id="${id}"]`); // Run the renderer. This is what draws the final graph.
3479
3480 const element = d3__WEBPACK_IMPORTED_MODULE_1__["select"]('#' + id + ' g');
3481 render(element, g);
3482 element.selectAll('g.node').attr('title', function () {
3483 return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getTooltip(this.id);
3484 });
3485 const padding = 8;
3486 const width = g.maxX - g.minX + padding * 2;
3487 const height = g.maxY - g.minY + padding * 2;
3488 svg.attr('width', '100%');
3489 svg.attr('style', `max-width: ${width}px;`);
3490 svg.attr('viewBox', `0 0 ${width} ${height}`);
3491 svg.select('g').attr('transform', `translate(${padding - g.minX}, ${padding - g.minY})`); // Index nodes
3492
3493 _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].indexNodes('subGraph' + i); // reposition labels
3494
3495 for (i = 0; i < subGraphs.length; i++) {
3496 subG = subGraphs[i];
3497
3498 if (subG.title !== 'undefined') {
3499 const clusterRects = document.querySelectorAll('#' + id + ' #' + subG.id + ' rect');
3500 const clusterEl = document.querySelectorAll('#' + id + ' #' + subG.id);
3501 const xPos = clusterRects[0].x.baseVal.value;
3502 const yPos = clusterRects[0].y.baseVal.value;
3503 const width = clusterRects[0].width.baseVal.value;
3504 const cluster = d3__WEBPACK_IMPORTED_MODULE_1__["select"](clusterEl[0]);
3505 const te = cluster.select('.label');
3506 te.attr('transform', `translate(${xPos + width / 2}, ${yPos + 14})`);
3507 te.attr('id', id + 'Text');
3508 }
3509 } // Add label rects for non html labels
3510
3511
3512 if (!Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) {
3513 const labels = document.querySelectorAll('#' + id + ' .edgeLabel .label');
3514
3515 for (let k = 0; k < labels.length; k++) {
3516 const label = labels[k]; // Get dimensions of label
3517
3518 const dim = label.getBBox();
3519 const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
3520 rect.setAttribute('rx', 0);
3521 rect.setAttribute('ry', 0);
3522 rect.setAttribute('width', dim.width);
3523 rect.setAttribute('height', dim.height);
3524 rect.setAttribute('style', 'fill:#e8e8e8;');
3525 label.insertBefore(rect, label.firstChild);
3526 }
3527 }
3528};
3529/* harmony default export */ __webpack_exports__["default"] = ({
3530 setConf,
3531 addVertices,
3532 addEdges,
3533 getClasses,
3534 draw
3535});
3536
3537/***/ }),
3538
3539/***/ "./src/diagrams/flowchart/parser/flow.js":
3540/*!***********************************************!*\
3541 !*** ./src/diagrams/flowchart/parser/flow.js ***!
3542 \***********************************************/
3543/*! no static exports found */
3544/***/ (function(module, exports, __webpack_require__) {
3545
3546/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
3547
3548/*
3549 Returns a Parser object of the following structure:
3550
3551 Parser: {
3552 yy: {}
3553 }
3554
3555 Parser.prototype: {
3556 yy: {},
3557 trace: function(),
3558 symbols_: {associative list: name ==> number},
3559 terminals_: {associative list: number ==> name},
3560 productions_: [...],
3561 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
3562 table: [...],
3563 defaultActions: {...},
3564 parseError: function(str, hash),
3565 parse: function(input),
3566
3567 lexer: {
3568 EOF: 1,
3569 parseError: function(str, hash),
3570 setInput: function(input),
3571 input: function(),
3572 unput: function(str),
3573 more: function(),
3574 less: function(n),
3575 pastInput: function(),
3576 upcomingInput: function(),
3577 showPosition: function(),
3578 test_match: function(regex_match_array, rule_index),
3579 next: function(),
3580 lex: function(),
3581 begin: function(condition),
3582 popState: function(),
3583 _currentRules: function(),
3584 topState: function(),
3585 pushState: function(condition),
3586
3587 options: {
3588 ranges: boolean (optional: true ==> token location info will include a .range[] member)
3589 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
3590 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)
3591 },
3592
3593 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
3594 rules: [...],
3595 conditions: {associative list: name ==> set},
3596 }
3597 }
3598
3599
3600 token location info (@$, _$, etc.): {
3601 first_line: n,
3602 last_line: n,
3603 first_column: n,
3604 last_column: n,
3605 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
3606 }
3607
3608
3609 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
3610 text: (matched text)
3611 token: (the produced terminal token, if any)
3612 line: (yylineno)
3613 }
3614 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
3615 loc: (yylloc)
3616 expected: (string describing the set of expected tokens)
3617 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
3618 }
3619*/
3620var parser = function () {
3621 var o = function (k, v, o, l) {
3622 for (o = o || {}, l = k.length; l--; o[k[l]] = v);
3623
3624 return o;
3625 },
3626 $V0 = [1, 4],
3627 $V1 = [1, 3],
3628 $V2 = [1, 5],
3629 $V3 = [1, 8, 9, 10, 11, 13, 18, 30, 51, 93, 94, 95, 96, 97, 107, 108, 111, 112, 114, 115, 117, 118, 119, 120, 121],
3630 $V4 = [2, 2],
3631 $V5 = [1, 12],
3632 $V6 = [1, 13],
3633 $V7 = [1, 14],
3634 $V8 = [1, 15],
3635 $V9 = [1, 31],
3636 $Va = [1, 33],
3637 $Vb = [1, 22],
3638 $Vc = [1, 34],
3639 $Vd = [1, 24],
3640 $Ve = [1, 25],
3641 $Vf = [1, 26],
3642 $Vg = [1, 27],
3643 $Vh = [1, 28],
3644 $Vi = [1, 38],
3645 $Vj = [1, 40],
3646 $Vk = [1, 35],
3647 $Vl = [1, 39],
3648 $Vm = [1, 45],
3649 $Vn = [1, 44],
3650 $Vo = [1, 36],
3651 $Vp = [1, 37],
3652 $Vq = [1, 41],
3653 $Vr = [1, 42],
3654 $Vs = [1, 43],
3655 $Vt = [1, 8, 9, 10, 11, 13, 18, 30, 35, 51, 93, 94, 95, 96, 97, 107, 108, 111, 112, 114, 115, 117, 118, 119, 120, 121],
3656 $Vu = [1, 53],
3657 $Vv = [1, 52],
3658 $Vw = [1, 54],
3659 $Vx = [8, 9, 11],
3660 $Vy = [8, 9, 11, 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],
3661 $Vz = [1, 111],
3662 $VA = [8, 9, 10, 11, 13, 15, 18, 32, 39, 41, 43, 45, 47, 51, 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, 107, 108, 111, 112, 114, 115, 117, 118, 119, 120, 121],
3663 $VB = [8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 30, 32, 34, 35, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 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, 93, 94, 95, 96, 97, 100, 106, 107, 108, 111, 112, 114, 115, 117, 118, 119, 120, 121],
3664 $VC = [1, 113],
3665 $VD = [1, 114],
3666 $VE = [8, 9, 10, 11, 13, 18, 30, 35, 51, 93, 94, 95, 96, 97, 107, 108, 111, 112, 114, 115, 117, 118, 119, 120, 121],
3667 $VF = [13, 18, 51, 107, 108, 111, 112, 114, 115, 117, 118, 119, 120, 121],
3668 $VG = [1, 138],
3669 $VH = [1, 146],
3670 $VI = [1, 147],
3671 $VJ = [1, 132],
3672 $VK = [1, 131],
3673 $VL = [1, 151],
3674 $VM = [1, 150],
3675 $VN = [1, 148],
3676 $VO = [1, 149],
3677 $VP = [1, 129],
3678 $VQ = [1, 139],
3679 $VR = [1, 134],
3680 $VS = [1, 133],
3681 $VT = [1, 141],
3682 $VU = [1, 142],
3683 $VV = [1, 143],
3684 $VW = [1, 144],
3685 $VX = [1, 145],
3686 $VY = [1, 136],
3687 $VZ = [1, 135],
3688 $V_ = [13, 18, 51, 54, 88, 107, 108, 111, 112, 114, 115, 117, 118, 119, 120, 121],
3689 $V$ = [10, 12, 13, 15, 16, 17, 18, 30, 34, 35, 40, 42, 44, 46, 48, 51, 55, 56, 58, 60, 62, 64, 66, 68, 70, 71, 72, 74, 76, 78, 88, 93, 94, 95, 96, 97, 100, 106, 107, 108, 111, 112, 114, 115, 117, 118, 119, 120, 121],
3690 $V01 = [10, 108],
3691 $V11 = [1, 242],
3692 $V21 = [1, 239],
3693 $V31 = [1, 246],
3694 $V41 = [1, 243],
3695 $V51 = [1, 247],
3696 $V61 = [1, 240],
3697 $V71 = [1, 237],
3698 $V81 = [1, 238],
3699 $V91 = [1, 241],
3700 $Va1 = [1, 244],
3701 $Vb1 = [1, 245],
3702 $Vc1 = [1, 272],
3703 $Vd1 = [8, 9, 11, 108],
3704 $Ve1 = [8, 9, 10, 11, 51, 93, 102, 106, 107, 108, 111, 112, 113, 114, 115];
3705
3706 var parser = {
3707 trace: function trace() {},
3708 yy: {},
3709 symbols_: {
3710 "error": 2,
3711 "mermaidDoc": 3,
3712 "graphConfig": 4,
3713 "document": 5,
3714 "line": 6,
3715 "statement": 7,
3716 "SEMI": 8,
3717 "NEWLINE": 9,
3718 "SPACE": 10,
3719 "EOF": 11,
3720 "GRAPH": 12,
3721 "DIR": 13,
3722 "FirstStmtSeperator": 14,
3723 "TAGEND": 15,
3724 "TAGSTART": 16,
3725 "UP": 17,
3726 "DOWN": 18,
3727 "ending": 19,
3728 "endToken": 20,
3729 "spaceList": 21,
3730 "spaceListNewline": 22,
3731 "verticeStatement": 23,
3732 "separator": 24,
3733 "styleStatement": 25,
3734 "linkStyleStatement": 26,
3735 "classDefStatement": 27,
3736 "classStatement": 28,
3737 "clickStatement": 29,
3738 "subgraph": 30,
3739 "alphaNum": 31,
3740 "SQS": 32,
3741 "text": 33,
3742 "SQE": 34,
3743 "end": 35,
3744 "STR": 36,
3745 "vertex": 37,
3746 "link": 38,
3747 "PS": 39,
3748 "PE": 40,
3749 "(-": 41,
3750 "-)": 42,
3751 "DIAMOND_START": 43,
3752 "DIAMOND_STOP": 44,
3753 "TRAPSTART": 45,
3754 "TRAPEND": 46,
3755 "INVTRAPSTART": 47,
3756 "INVTRAPEND": 48,
3757 "alphaNumStatement": 49,
3758 "alphaNumToken": 50,
3759 "MINUS": 51,
3760 "linkStatement": 52,
3761 "arrowText": 53,
3762 "TESTSTR": 54,
3763 "--": 55,
3764 "ARROW_POINT": 56,
3765 "START_DOUBLE_ARROW_POINT": 57,
3766 "ARROW_CIRCLE": 58,
3767 "START_DOUBLE_ARROW_CIRCLE": 59,
3768 "ARROW_CROSS": 60,
3769 "START_DOUBLE_ARROW_CROSS": 61,
3770 "ARROW_OPEN": 62,
3771 "-.": 63,
3772 "DOTTED_ARROW_POINT": 64,
3773 "START_DOUBLE_DOTTED_ARROW_POINT": 65,
3774 "DOTTED_ARROW_CIRCLE": 66,
3775 "START_DOUBLE_DOTTED_ARROW_CIRCLE": 67,
3776 "DOTTED_ARROW_CROSS": 68,
3777 "START_DOUBLE_DOTTED_ARROW_CROSS": 69,
3778 "DOTTED_ARROW_OPEN": 70,
3779 "==": 71,
3780 "THICK_ARROW_POINT": 72,
3781 "START_DOUBLE_THICK_ARROW_POINT": 73,
3782 "THICK_ARROW_CIRCLE": 74,
3783 "START_DOUBLE_THICK_ARROW_CIRCLE": 75,
3784 "THICK_ARROW_CROSS": 76,
3785 "START_DOUBLE_THICK_ARROW_CROSS": 77,
3786 "THICK_ARROW_OPEN": 78,
3787 "DOUBLE_ARROW_POINT": 79,
3788 "DOUBLE_ARROW_CIRCLE": 80,
3789 "DOUBLE_ARROW_CROSS": 81,
3790 "DOUBLE_DOTTED_ARROW_POINT": 82,
3791 "DOUBLE_DOTTED_ARROW_CIRCLE": 83,
3792 "DOUBLE_DOTTED_ARROW_CROSS": 84,
3793 "DOUBLE_THICK_ARROW_POINT": 85,
3794 "DOUBLE_THICK_ARROW_CIRCLE": 86,
3795 "DOUBLE_THICK_ARROW_CROSS": 87,
3796 "PIPE": 88,
3797 "textToken": 89,
3798 "commentText": 90,
3799 "commentToken": 91,
3800 "keywords": 92,
3801 "STYLE": 93,
3802 "LINKSTYLE": 94,
3803 "CLASSDEF": 95,
3804 "CLASS": 96,
3805 "CLICK": 97,
3806 "textNoTags": 98,
3807 "textNoTagsToken": 99,
3808 "DEFAULT": 100,
3809 "stylesOpt": 101,
3810 "HEX": 102,
3811 "numList": 103,
3812 "INTERPOLATE": 104,
3813 "commentStatement": 105,
3814 "PCT": 106,
3815 "NUM": 107,
3816 "COMMA": 108,
3817 "style": 109,
3818 "styleComponent": 110,
3819 "ALPHA": 111,
3820 "COLON": 112,
3821 "UNIT": 113,
3822 "BRKT": 114,
3823 "DOT": 115,
3824 "graphCodeTokens": 116,
3825 "PUNCTUATION": 117,
3826 "UNICODE_TEXT": 118,
3827 "PLUS": 119,
3828 "EQUALS": 120,
3829 "MULT": 121,
3830 "QUOTE": 122,
3831 "$accept": 0,
3832 "$end": 1
3833 },
3834 terminals_: {
3835 2: "error",
3836 8: "SEMI",
3837 9: "NEWLINE",
3838 10: "SPACE",
3839 11: "EOF",
3840 12: "GRAPH",
3841 13: "DIR",
3842 15: "TAGEND",
3843 16: "TAGSTART",
3844 17: "UP",
3845 18: "DOWN",
3846 30: "subgraph",
3847 32: "SQS",
3848 34: "SQE",
3849 35: "end",
3850 36: "STR",
3851 39: "PS",
3852 40: "PE",
3853 41: "(-",
3854 42: "-)",
3855 43: "DIAMOND_START",
3856 44: "DIAMOND_STOP",
3857 45: "TRAPSTART",
3858 46: "TRAPEND",
3859 47: "INVTRAPSTART",
3860 48: "INVTRAPEND",
3861 51: "MINUS",
3862 54: "TESTSTR",
3863 55: "--",
3864 56: "ARROW_POINT",
3865 57: "START_DOUBLE_ARROW_POINT",
3866 58: "ARROW_CIRCLE",
3867 59: "START_DOUBLE_ARROW_CIRCLE",
3868 60: "ARROW_CROSS",
3869 61: "START_DOUBLE_ARROW_CROSS",
3870 62: "ARROW_OPEN",
3871 63: "-.",
3872 64: "DOTTED_ARROW_POINT",
3873 65: "START_DOUBLE_DOTTED_ARROW_POINT",
3874 66: "DOTTED_ARROW_CIRCLE",
3875 67: "START_DOUBLE_DOTTED_ARROW_CIRCLE",
3876 68: "DOTTED_ARROW_CROSS",
3877 69: "START_DOUBLE_DOTTED_ARROW_CROSS",
3878 70: "DOTTED_ARROW_OPEN",
3879 71: "==",
3880 72: "THICK_ARROW_POINT",
3881 73: "START_DOUBLE_THICK_ARROW_POINT",
3882 74: "THICK_ARROW_CIRCLE",
3883 75: "START_DOUBLE_THICK_ARROW_CIRCLE",
3884 76: "THICK_ARROW_CROSS",
3885 77: "START_DOUBLE_THICK_ARROW_CROSS",
3886 78: "THICK_ARROW_OPEN",
3887 79: "DOUBLE_ARROW_POINT",
3888 80: "DOUBLE_ARROW_CIRCLE",
3889 81: "DOUBLE_ARROW_CROSS",
3890 82: "DOUBLE_DOTTED_ARROW_POINT",
3891 83: "DOUBLE_DOTTED_ARROW_CIRCLE",
3892 84: "DOUBLE_DOTTED_ARROW_CROSS",
3893 85: "DOUBLE_THICK_ARROW_POINT",
3894 86: "DOUBLE_THICK_ARROW_CIRCLE",
3895 87: "DOUBLE_THICK_ARROW_CROSS",
3896 88: "PIPE",
3897 93: "STYLE",
3898 94: "LINKSTYLE",
3899 95: "CLASSDEF",
3900 96: "CLASS",
3901 97: "CLICK",
3902 100: "DEFAULT",
3903 102: "HEX",
3904 104: "INTERPOLATE",
3905 106: "PCT",
3906 107: "NUM",
3907 108: "COMMA",
3908 111: "ALPHA",
3909 112: "COLON",
3910 113: "UNIT",
3911 114: "BRKT",
3912 115: "DOT",
3913 117: "PUNCTUATION",
3914 118: "UNICODE_TEXT",
3915 119: "PLUS",
3916 120: "EQUALS",
3917 121: "MULT",
3918 122: "QUOTE"
3919 },
3920 productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [19, 2], [19, 1], [20, 1], [20, 1], [20, 1], [14, 1], [14, 1], [14, 2], [22, 2], [22, 2], [22, 1], [22, 1], [21, 2], [21, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 6], [7, 4], [24, 1], [24, 1], [24, 1], [23, 3], [23, 1], [37, 4], [37, 5], [37, 6], [37, 7], [37, 4], [37, 5], [37, 4], [37, 5], [37, 4], [37, 5], [37, 4], [37, 5], [37, 4], [37, 5], [37, 4], [37, 5], [37, 4], [37, 5], [37, 4], [37, 5], [37, 1], [37, 2], [31, 1], [31, 2], [49, 1], [49, 1], [49, 1], [49, 1], [38, 2], [38, 3], [38, 3], [38, 1], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [53, 3], [33, 1], [33, 2], [33, 1], [90, 1], [90, 2], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [98, 1], [98, 2], [27, 5], [27, 5], [28, 5], [29, 5], [29, 7], [29, 5], [29, 7], [25, 5], [25, 5], [26, 5], [26, 5], [26, 9], [26, 9], [26, 7], [26, 7], [105, 3], [103, 1], [103, 3], [101, 1], [101, 3], [109, 1], [109, 2], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [91, 1], [91, 1], [89, 1], [89, 1], [89, 1], [89, 1], [89, 1], [89, 1], [89, 1], [99, 1], [99, 1], [99, 1], [99, 1], [50, 1], [50, 1], [50, 1], [50, 1], [50, 1], [50, 1], [50, 1], [50, 1], [50, 1], [50, 1], [50, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1]],
3921 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
3922 /* action[1] */
3923 , $$
3924 /* vstack */
3925 , _$
3926 /* lstack */
3927 ) {
3928 /* this == yyval */
3929 var $0 = $$.length - 1;
3930
3931 switch (yystate) {
3932 case 2:
3933 this.$ = [];
3934 break;
3935
3936 case 3:
3937 if ($$[$0] !== []) {
3938 $$[$0 - 1].push($$[$0]);
3939 }
3940
3941 this.$ = $$[$0 - 1];
3942 break;
3943
3944 case 4:
3945 case 67:
3946 case 69:
3947 case 70:
3948 case 120:
3949 case 122:
3950 case 123:
3951 case 136:
3952 this.$ = $$[$0];
3953 break;
3954
3955 case 11:
3956 yy.setDirection($$[$0 - 1]);
3957 this.$ = $$[$0 - 1];
3958 break;
3959
3960 case 12:
3961 yy.setDirection("LR");
3962 this.$ = $$[$0 - 1];
3963 break;
3964
3965 case 13:
3966 yy.setDirection("RL");
3967 this.$ = $$[$0 - 1];
3968 break;
3969
3970 case 14:
3971 yy.setDirection("BT");
3972 this.$ = $$[$0 - 1];
3973 break;
3974
3975 case 15:
3976 yy.setDirection("TB");
3977 this.$ = $$[$0 - 1];
3978 break;
3979
3980 case 30:
3981 this.$ = $$[$0 - 1];
3982 break;
3983
3984 case 31:
3985 case 32:
3986 case 33:
3987 case 34:
3988 case 35:
3989 this.$ = [];
3990 break;
3991
3992 case 36:
3993 this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]);
3994 break;
3995
3996 case 37:
3997 this.$ = yy.addSubGraph(undefined, $$[$0 - 1], $$[$0 - 3]);
3998 break;
3999
4000 case 38:
4001 this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]);
4002 break;
4003
4004 case 39:
4005 this.$ = yy.addSubGraph(undefined, $$[$0 - 1], undefined);
4006 break;
4007
4008 case 43:
4009 yy.addLink($$[$0 - 2], $$[$0], $$[$0 - 1]);
4010 this.$ = [$$[$0 - 2], $$[$0]];
4011 break;
4012
4013 case 44:
4014 this.$ = [$$[$0]];
4015 break;
4016
4017 case 45:
4018 this.$ = $$[$0 - 3];
4019 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'square');
4020 break;
4021
4022 case 46:
4023 this.$ = $$[$0 - 4];
4024 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'square');
4025 break;
4026
4027 case 47:
4028 this.$ = $$[$0 - 5];
4029 yy.addVertex($$[$0 - 5], $$[$0 - 2], 'circle');
4030 break;
4031
4032 case 48:
4033 this.$ = $$[$0 - 6];
4034 yy.addVertex($$[$0 - 6], $$[$0 - 3], 'circle');
4035 break;
4036
4037 case 49:
4038 this.$ = $$[$0 - 3];
4039 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'ellipse');
4040 break;
4041
4042 case 50:
4043 this.$ = $$[$0 - 4];
4044 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'ellipse');
4045 break;
4046
4047 case 51:
4048 this.$ = $$[$0 - 3];
4049 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'round');
4050 break;
4051
4052 case 52:
4053 this.$ = $$[$0 - 4];
4054 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'round');
4055 break;
4056
4057 case 53:
4058 this.$ = $$[$0 - 3];
4059 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'diamond');
4060 break;
4061
4062 case 54:
4063 this.$ = $$[$0 - 4];
4064 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'diamond');
4065 break;
4066
4067 case 55:
4068 this.$ = $$[$0 - 3];
4069 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'odd');
4070 break;
4071
4072 case 56:
4073 this.$ = $$[$0 - 4];
4074 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'odd');
4075 break;
4076
4077 case 57:
4078 this.$ = $$[$0 - 3];
4079 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'trapezoid');
4080 break;
4081
4082 case 58:
4083 this.$ = $$[$0 - 4];
4084 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'trapezoid');
4085 break;
4086
4087 case 59:
4088 this.$ = $$[$0 - 3];
4089 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'inv_trapezoid');
4090 break;
4091
4092 case 60:
4093 this.$ = $$[$0 - 4];
4094 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'inv_trapezoid');
4095 break;
4096
4097 case 61:
4098 this.$ = $$[$0 - 3];
4099 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'lean_right');
4100 break;
4101
4102 case 62:
4103 this.$ = $$[$0 - 4];
4104 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'lean_right');
4105 break;
4106
4107 case 63:
4108 this.$ = $$[$0 - 3];
4109 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'lean_left');
4110 break;
4111
4112 case 64:
4113 this.$ = $$[$0 - 4];
4114 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'lean_left');
4115 break;
4116
4117 case 65:
4118 this.$ = $$[$0];
4119 yy.addVertex($$[$0]);
4120 break;
4121
4122 case 66:
4123 this.$ = $$[$0 - 1];
4124 yy.addVertex($$[$0 - 1]);
4125 break;
4126
4127 case 68:
4128 case 121:
4129 case 124:
4130 case 137:
4131 this.$ = $$[$0 - 1] + '' + $$[$0];
4132 break;
4133
4134 case 71:
4135 this.$ = 'v';
4136 break;
4137
4138 case 72:
4139 this.$ = '-';
4140 break;
4141
4142 case 73:
4143 $$[$0 - 1].text = $$[$0];
4144 this.$ = $$[$0 - 1];
4145 break;
4146
4147 case 74:
4148 case 75:
4149 $$[$0 - 2].text = $$[$0 - 1];
4150 this.$ = $$[$0 - 2];
4151 break;
4152
4153 case 76:
4154 this.$ = $$[$0];
4155 break;
4156
4157 case 77:
4158 this.$ = {
4159 "type": "arrow",
4160 "stroke": "normal",
4161 "text": $$[$0 - 1]
4162 };
4163 break;
4164
4165 case 78:
4166 this.$ = {
4167 "type": "double_arrow_point",
4168 "stroke": "normal",
4169 "text": $$[$0 - 1]
4170 };
4171 break;
4172
4173 case 79:
4174 this.$ = {
4175 "type": "arrow_circle",
4176 "stroke": "normal",
4177 "text": $$[$0 - 1]
4178 };
4179 break;
4180
4181 case 80:
4182 this.$ = {
4183 "type": "double_arrow_circle",
4184 "stroke": "normal",
4185 "text": $$[$0 - 1]
4186 };
4187 break;
4188
4189 case 81:
4190 this.$ = {
4191 "type": "arrow_cross",
4192 "stroke": "normal",
4193 "text": $$[$0 - 1]
4194 };
4195 break;
4196
4197 case 82:
4198 this.$ = {
4199 "type": "double_arrow_cross",
4200 "stroke": "normal",
4201 "text": $$[$0 - 1]
4202 };
4203 break;
4204
4205 case 83:
4206 this.$ = {
4207 "type": "arrow_open",
4208 "stroke": "normal",
4209 "text": $$[$0 - 1]
4210 };
4211 break;
4212
4213 case 84:
4214 this.$ = {
4215 "type": "arrow",
4216 "stroke": "dotted",
4217 "text": $$[$0 - 1]
4218 };
4219 break;
4220
4221 case 85:
4222 this.$ = {
4223 "type": "double_arrow_point",
4224 "stroke": "dotted",
4225 "text": $$[$0 - 1]
4226 };
4227 break;
4228
4229 case 86:
4230 this.$ = {
4231 "type": "arrow_circle",
4232 "stroke": "dotted",
4233 "text": $$[$0 - 1]
4234 };
4235 break;
4236
4237 case 87:
4238 this.$ = {
4239 "type": "double_arrow_circle",
4240 "stroke": "dotted",
4241 "text": $$[$0 - 1]
4242 };
4243 break;
4244
4245 case 88:
4246 this.$ = {
4247 "type": "arrow_cross",
4248 "stroke": "dotted",
4249 "text": $$[$0 - 1]
4250 };
4251 break;
4252
4253 case 89:
4254 this.$ = {
4255 "type": "double_arrow_cross",
4256 "stroke": "dotted",
4257 "text": $$[$0 - 1]
4258 };
4259 break;
4260
4261 case 90:
4262 this.$ = {
4263 "type": "arrow_open",
4264 "stroke": "dotted",
4265 "text": $$[$0 - 1]
4266 };
4267 break;
4268
4269 case 91:
4270 this.$ = {
4271 "type": "arrow",
4272 "stroke": "thick",
4273 "text": $$[$0 - 1]
4274 };
4275 break;
4276
4277 case 92:
4278 this.$ = {
4279 "type": "double_arrow_point",
4280 "stroke": "thick",
4281 "text": $$[$0 - 1]
4282 };
4283 break;
4284
4285 case 93:
4286 this.$ = {
4287 "type": "arrow_circle",
4288 "stroke": "thick",
4289 "text": $$[$0 - 1]
4290 };
4291 break;
4292
4293 case 94:
4294 this.$ = {
4295 "type": "double_arrow_circle",
4296 "stroke": "thick",
4297 "text": $$[$0 - 1]
4298 };
4299 break;
4300
4301 case 95:
4302 this.$ = {
4303 "type": "arrow_cross",
4304 "stroke": "thick",
4305 "text": $$[$0 - 1]
4306 };
4307 break;
4308
4309 case 96:
4310 this.$ = {
4311 "type": "double_arrow_cross",
4312 "stroke": "thick",
4313 "text": $$[$0 - 1]
4314 };
4315 break;
4316
4317 case 97:
4318 this.$ = {
4319 "type": "arrow_open",
4320 "stroke": "thick",
4321 "text": $$[$0 - 1]
4322 };
4323 break;
4324
4325 case 98:
4326 this.$ = {
4327 "type": "arrow",
4328 "stroke": "normal"
4329 };
4330 break;
4331
4332 case 99:
4333 this.$ = {
4334 "type": "double_arrow_point",
4335 "stroke": "normal"
4336 };
4337 break;
4338
4339 case 100:
4340 this.$ = {
4341 "type": "arrow_circle",
4342 "stroke": "normal"
4343 };
4344 break;
4345
4346 case 101:
4347 this.$ = {
4348 "type": "double_arrow_circle",
4349 "stroke": "normal"
4350 };
4351 break;
4352
4353 case 102:
4354 this.$ = {
4355 "type": "arrow_cross",
4356 "stroke": "normal"
4357 };
4358 break;
4359
4360 case 103:
4361 this.$ = {
4362 "type": "double_arrow_cross",
4363 "stroke": "normal"
4364 };
4365 break;
4366
4367 case 104:
4368 this.$ = {
4369 "type": "arrow_open",
4370 "stroke": "normal"
4371 };
4372 break;
4373
4374 case 105:
4375 this.$ = {
4376 "type": "arrow",
4377 "stroke": "dotted"
4378 };
4379 break;
4380
4381 case 106:
4382 this.$ = {
4383 "type": "double_arrow_point",
4384 "stroke": "dotted"
4385 };
4386 break;
4387
4388 case 107:
4389 this.$ = {
4390 "type": "arrow_circle",
4391 "stroke": "dotted"
4392 };
4393 break;
4394
4395 case 108:
4396 this.$ = {
4397 "type": "double_arrow_circle",
4398 "stroke": "dotted"
4399 };
4400 break;
4401
4402 case 109:
4403 this.$ = {
4404 "type": "arrow_cross",
4405 "stroke": "dotted"
4406 };
4407 break;
4408
4409 case 110:
4410 this.$ = {
4411 "type": "double_arrow_cross",
4412 "stroke": "dotted"
4413 };
4414 break;
4415
4416 case 111:
4417 this.$ = {
4418 "type": "arrow_open",
4419 "stroke": "dotted"
4420 };
4421 break;
4422
4423 case 112:
4424 this.$ = {
4425 "type": "arrow",
4426 "stroke": "thick"
4427 };
4428 break;
4429
4430 case 113:
4431 this.$ = {
4432 "type": "double_arrow_point",
4433 "stroke": "thick"
4434 };
4435 break;
4436
4437 case 114:
4438 this.$ = {
4439 "type": "arrow_circle",
4440 "stroke": "thick"
4441 };
4442 break;
4443
4444 case 115:
4445 this.$ = {
4446 "type": "double_arrow_circle",
4447 "stroke": "thick"
4448 };
4449 break;
4450
4451 case 116:
4452 this.$ = {
4453 "type": "arrow_cross",
4454 "stroke": "thick"
4455 };
4456 break;
4457
4458 case 117:
4459 this.$ = {
4460 "type": "double_arrow_cross",
4461 "stroke": "thick"
4462 };
4463 break;
4464
4465 case 118:
4466 this.$ = {
4467 "type": "arrow_open",
4468 "stroke": "thick"
4469 };
4470 break;
4471
4472 case 119:
4473 this.$ = $$[$0 - 1];
4474 break;
4475
4476 case 138:
4477 case 139:
4478 this.$ = $$[$0 - 4];
4479 yy.addClass($$[$0 - 2], $$[$0]);
4480 break;
4481
4482 case 140:
4483 this.$ = $$[$0 - 4];
4484 yy.setClass($$[$0 - 2], $$[$0]);
4485 break;
4486
4487 case 141:
4488 this.$ = $$[$0 - 4];
4489 yy.setClickEvent($$[$0 - 2], $$[$0], undefined);
4490 break;
4491
4492 case 142:
4493 this.$ = $$[$0 - 6];
4494 yy.setClickEvent($$[$0 - 4], $$[$0 - 2], $$[$0]);
4495 break;
4496
4497 case 143:
4498 this.$ = $$[$0 - 4];
4499 yy.setLink($$[$0 - 2], $$[$0], undefined);
4500 break;
4501
4502 case 144:
4503 this.$ = $$[$0 - 6];
4504 yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
4505 break;
4506
4507 case 145:
4508 this.$ = $$[$0 - 4];
4509 yy.addVertex($$[$0 - 2], undefined, undefined, $$[$0]);
4510 break;
4511
4512 case 146:
4513 case 148:
4514 this.$ = $$[$0 - 4];
4515 yy.updateLink($$[$0 - 2], $$[$0]);
4516 break;
4517
4518 case 147:
4519 this.$ = $$[$0 - 4];
4520 yy.updateLink([$$[$0 - 2]], $$[$0]);
4521 break;
4522
4523 case 149:
4524 this.$ = $$[$0 - 8];
4525 yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]);
4526 yy.updateLink([$$[$0 - 6]], $$[$0]);
4527 break;
4528
4529 case 150:
4530 this.$ = $$[$0 - 8];
4531 yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]);
4532 yy.updateLink($$[$0 - 6], $$[$0]);
4533 break;
4534
4535 case 151:
4536 this.$ = $$[$0 - 6];
4537 yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]);
4538 break;
4539
4540 case 152:
4541 this.$ = $$[$0 - 6];
4542 yy.updateLinkInterpolate($$[$0 - 4], $$[$0]);
4543 break;
4544
4545 case 154:
4546 case 156:
4547 this.$ = [$$[$0]];
4548 break;
4549
4550 case 155:
4551 case 157:
4552 $$[$0 - 2].push($$[$0]);
4553 this.$ = $$[$0 - 2];
4554 break;
4555
4556 case 159:
4557 this.$ = $$[$0 - 1] + $$[$0];
4558 break;
4559 }
4560 },
4561 table: [{
4562 3: 1,
4563 4: 2,
4564 9: $V0,
4565 10: $V1,
4566 12: $V2
4567 }, {
4568 1: [3]
4569 }, o($V3, $V4, {
4570 5: 6
4571 }), {
4572 4: 7,
4573 9: $V0,
4574 10: $V1,
4575 12: $V2
4576 }, {
4577 4: 8,
4578 9: $V0,
4579 10: $V1,
4580 12: $V2
4581 }, {
4582 10: [1, 9]
4583 }, {
4584 1: [2, 1],
4585 6: 10,
4586 7: 11,
4587 8: $V5,
4588 9: $V6,
4589 10: $V7,
4590 11: $V8,
4591 13: $V9,
4592 18: $Va,
4593 23: 16,
4594 25: 17,
4595 26: 18,
4596 27: 19,
4597 28: 20,
4598 29: 21,
4599 30: $Vb,
4600 31: 29,
4601 37: 23,
4602 49: 30,
4603 50: 32,
4604 51: $Vc,
4605 93: $Vd,
4606 94: $Ve,
4607 95: $Vf,
4608 96: $Vg,
4609 97: $Vh,
4610 107: $Vi,
4611 108: $Vj,
4612 111: $Vk,
4613 112: $Vl,
4614 114: $Vm,
4615 115: $Vn,
4616 117: $Vo,
4617 118: $Vp,
4618 119: $Vq,
4619 120: $Vr,
4620 121: $Vs
4621 }, o($V3, [2, 9]), o($V3, [2, 10]), {
4622 13: [1, 46],
4623 15: [1, 47],
4624 16: [1, 48],
4625 17: [1, 49],
4626 18: [1, 50]
4627 }, o($Vt, [2, 3]), o($Vt, [2, 4]), o($Vt, [2, 5]), o($Vt, [2, 6]), o($Vt, [2, 7]), o($Vt, [2, 8]), {
4628 8: $Vu,
4629 9: $Vv,
4630 11: $Vw,
4631 24: 51
4632 }, {
4633 8: $Vu,
4634 9: $Vv,
4635 11: $Vw,
4636 24: 55
4637 }, {
4638 8: $Vu,
4639 9: $Vv,
4640 11: $Vw,
4641 24: 56
4642 }, {
4643 8: $Vu,
4644 9: $Vv,
4645 11: $Vw,
4646 24: 57
4647 }, {
4648 8: $Vu,
4649 9: $Vv,
4650 11: $Vw,
4651 24: 58
4652 }, {
4653 8: $Vu,
4654 9: $Vv,
4655 11: $Vw,
4656 24: 59
4657 }, {
4658 8: $Vu,
4659 9: $Vv,
4660 10: [1, 60],
4661 11: $Vw,
4662 24: 61
4663 }, o($Vx, [2, 44], {
4664 38: 62,
4665 52: 63,
4666 55: [1, 64],
4667 56: [1, 76],
4668 57: [1, 65],
4669 58: [1, 78],
4670 59: [1, 66],
4671 60: [1, 80],
4672 61: [1, 67],
4673 62: [1, 82],
4674 63: [1, 68],
4675 64: [1, 83],
4676 65: [1, 69],
4677 66: [1, 85],
4678 67: [1, 70],
4679 68: [1, 87],
4680 69: [1, 71],
4681 70: [1, 89],
4682 71: [1, 72],
4683 72: [1, 90],
4684 73: [1, 73],
4685 74: [1, 92],
4686 75: [1, 74],
4687 76: [1, 94],
4688 77: [1, 75],
4689 78: [1, 96],
4690 79: [1, 77],
4691 80: [1, 79],
4692 81: [1, 81],
4693 82: [1, 84],
4694 83: [1, 86],
4695 84: [1, 88],
4696 85: [1, 91],
4697 86: [1, 93],
4698 87: [1, 95]
4699 }), {
4700 10: [1, 97]
4701 }, {
4702 10: [1, 98]
4703 }, {
4704 10: [1, 99]
4705 }, {
4706 10: [1, 100]
4707 }, {
4708 10: [1, 101]
4709 }, o($Vy, [2, 65], {
4710 50: 32,
4711 21: 109,
4712 49: 110,
4713 10: $Vz,
4714 13: $V9,
4715 15: [1, 106],
4716 18: $Va,
4717 32: [1, 102],
4718 39: [1, 103],
4719 41: [1, 104],
4720 43: [1, 105],
4721 45: [1, 107],
4722 47: [1, 108],
4723 51: $Vc,
4724 107: $Vi,
4725 108: $Vj,
4726 111: $Vk,
4727 112: $Vl,
4728 114: $Vm,
4729 115: $Vn,
4730 117: $Vo,
4731 118: $Vp,
4732 119: $Vq,
4733 120: $Vr,
4734 121: $Vs
4735 }), o($VA, [2, 67]), o($VA, [2, 69]), o($VA, [2, 70]), o($VA, [2, 71]), o($VA, [2, 72]), o($VB, [2, 184]), o($VB, [2, 185]), o($VB, [2, 186]), o($VB, [2, 187]), o($VB, [2, 188]), o($VB, [2, 189]), o($VB, [2, 190]), o($VB, [2, 191]), o($VB, [2, 192]), o($VB, [2, 193]), o($VB, [2, 194]), {
4736 8: $VC,
4737 9: $VD,
4738 10: $Vz,
4739 14: 112,
4740 21: 115
4741 }, {
4742 8: $VC,
4743 9: $VD,
4744 10: $Vz,
4745 14: 116,
4746 21: 115
4747 }, {
4748 8: $VC,
4749 9: $VD,
4750 10: $Vz,
4751 14: 117,
4752 21: 115
4753 }, {
4754 8: $VC,
4755 9: $VD,
4756 10: $Vz,
4757 14: 118,
4758 21: 115
4759 }, {
4760 8: $VC,
4761 9: $VD,
4762 10: $Vz,
4763 14: 119,
4764 21: 115
4765 }, o($Vt, [2, 30]), o($Vt, [2, 40]), o($Vt, [2, 41]), o($Vt, [2, 42]), o($Vt, [2, 31]), o($Vt, [2, 32]), o($Vt, [2, 33]), o($Vt, [2, 34]), o($Vt, [2, 35]), {
4766 13: $V9,
4767 18: $Va,
4768 31: 120,
4769 36: [1, 121],
4770 49: 30,
4771 50: 32,
4772 51: $Vc,
4773 107: $Vi,
4774 108: $Vj,
4775 111: $Vk,
4776 112: $Vl,
4777 114: $Vm,
4778 115: $Vn,
4779 117: $Vo,
4780 118: $Vp,
4781 119: $Vq,
4782 120: $Vr,
4783 121: $Vs
4784 }, o($VE, $V4, {
4785 5: 122
4786 }), {
4787 13: $V9,
4788 18: $Va,
4789 31: 29,
4790 37: 123,
4791 49: 30,
4792 50: 32,
4793 51: $Vc,
4794 107: $Vi,
4795 108: $Vj,
4796 111: $Vk,
4797 112: $Vl,
4798 114: $Vm,
4799 115: $Vn,
4800 117: $Vo,
4801 118: $Vp,
4802 119: $Vq,
4803 120: $Vr,
4804 121: $Vs
4805 }, o($VF, [2, 76], {
4806 53: 124,
4807 54: [1, 125],
4808 88: [1, 126]
4809 }), {
4810 10: $VG,
4811 12: $VH,
4812 13: $VI,
4813 15: $VJ,
4814 16: $VK,
4815 17: $VL,
4816 18: $VM,
4817 30: $VN,
4818 33: 127,
4819 35: $VO,
4820 36: $VP,
4821 50: 137,
4822 51: $VQ,
4823 55: $VR,
4824 71: $VS,
4825 89: 128,
4826 92: 140,
4827 93: $VT,
4828 94: $VU,
4829 95: $VV,
4830 96: $VW,
4831 97: $VX,
4832 99: 130,
4833 100: $VY,
4834 106: $VZ,
4835 107: $Vi,
4836 108: $Vj,
4837 111: $Vk,
4838 112: $Vl,
4839 114: $Vm,
4840 115: $Vn,
4841 117: $Vo,
4842 118: $Vp,
4843 119: $Vq,
4844 120: $Vr,
4845 121: $Vs
4846 }, {
4847 10: $VG,
4848 12: $VH,
4849 13: $VI,
4850 15: $VJ,
4851 16: $VK,
4852 17: $VL,
4853 18: $VM,
4854 30: $VN,
4855 33: 152,
4856 35: $VO,
4857 36: $VP,
4858 50: 137,
4859 51: $VQ,
4860 55: $VR,
4861 71: $VS,
4862 89: 128,
4863 92: 140,
4864 93: $VT,
4865 94: $VU,
4866 95: $VV,
4867 96: $VW,
4868 97: $VX,
4869 99: 130,
4870 100: $VY,
4871 106: $VZ,
4872 107: $Vi,
4873 108: $Vj,
4874 111: $Vk,
4875 112: $Vl,
4876 114: $Vm,
4877 115: $Vn,
4878 117: $Vo,
4879 118: $Vp,
4880 119: $Vq,
4881 120: $Vr,
4882 121: $Vs
4883 }, {
4884 10: $VG,
4885 12: $VH,
4886 13: $VI,
4887 15: $VJ,
4888 16: $VK,
4889 17: $VL,
4890 18: $VM,
4891 30: $VN,
4892 33: 153,
4893 35: $VO,
4894 36: $VP,
4895 50: 137,
4896 51: $VQ,
4897 55: $VR,
4898 71: $VS,
4899 89: 128,
4900 92: 140,
4901 93: $VT,
4902 94: $VU,
4903 95: $VV,
4904 96: $VW,
4905 97: $VX,
4906 99: 130,
4907 100: $VY,
4908 106: $VZ,
4909 107: $Vi,
4910 108: $Vj,
4911 111: $Vk,
4912 112: $Vl,
4913 114: $Vm,
4914 115: $Vn,
4915 117: $Vo,
4916 118: $Vp,
4917 119: $Vq,
4918 120: $Vr,
4919 121: $Vs
4920 }, {
4921 10: $VG,
4922 12: $VH,
4923 13: $VI,
4924 15: $VJ,
4925 16: $VK,
4926 17: $VL,
4927 18: $VM,
4928 30: $VN,
4929 33: 154,
4930 35: $VO,
4931 36: $VP,
4932 50: 137,
4933 51: $VQ,
4934 55: $VR,
4935 71: $VS,
4936 89: 128,
4937 92: 140,
4938 93: $VT,
4939 94: $VU,
4940 95: $VV,
4941 96: $VW,
4942 97: $VX,
4943 99: 130,
4944 100: $VY,
4945 106: $VZ,
4946 107: $Vi,
4947 108: $Vj,
4948 111: $Vk,
4949 112: $Vl,
4950 114: $Vm,
4951 115: $Vn,
4952 117: $Vo,
4953 118: $Vp,
4954 119: $Vq,
4955 120: $Vr,
4956 121: $Vs
4957 }, {
4958 10: $VG,
4959 12: $VH,
4960 13: $VI,
4961 15: $VJ,
4962 16: $VK,
4963 17: $VL,
4964 18: $VM,
4965 30: $VN,
4966 33: 155,
4967 35: $VO,
4968 36: $VP,
4969 50: 137,
4970 51: $VQ,
4971 55: $VR,
4972 71: $VS,
4973 89: 128,
4974 92: 140,
4975 93: $VT,
4976 94: $VU,
4977 95: $VV,
4978 96: $VW,
4979 97: $VX,
4980 99: 130,
4981 100: $VY,
4982 106: $VZ,
4983 107: $Vi,
4984 108: $Vj,
4985 111: $Vk,
4986 112: $Vl,
4987 114: $Vm,
4988 115: $Vn,
4989 117: $Vo,
4990 118: $Vp,
4991 119: $Vq,
4992 120: $Vr,
4993 121: $Vs
4994 }, {
4995 10: $VG,
4996 12: $VH,
4997 13: $VI,
4998 15: $VJ,
4999 16: $VK,
5000 17: $VL,
5001 18: $VM,
5002 30: $VN,
5003 33: 156,
5004 35: $VO,
5005 36: $VP,
5006 50: 137,
5007 51: $VQ,
5008 55: $VR,
5009 71: $VS,
5010 89: 128,
5011 92: 140,
5012 93: $VT,
5013 94: $VU,
5014 95: $VV,
5015 96: $VW,
5016 97: $VX,
5017 99: 130,
5018 100: $VY,
5019 106: $VZ,
5020 107: $Vi,
5021 108: $Vj,
5022 111: $Vk,
5023 112: $Vl,
5024 114: $Vm,
5025 115: $Vn,
5026 117: $Vo,
5027 118: $Vp,
5028 119: $Vq,
5029 120: $Vr,
5030 121: $Vs
5031 }, {
5032 10: $VG,
5033 12: $VH,
5034 13: $VI,
5035 15: $VJ,
5036 16: $VK,
5037 17: $VL,
5038 18: $VM,
5039 30: $VN,
5040 33: 157,
5041 35: $VO,
5042 36: $VP,
5043 50: 137,
5044 51: $VQ,
5045 55: $VR,
5046 71: $VS,
5047 89: 128,
5048 92: 140,
5049 93: $VT,
5050 94: $VU,
5051 95: $VV,
5052 96: $VW,
5053 97: $VX,
5054 99: 130,
5055 100: $VY,
5056 106: $VZ,
5057 107: $Vi,
5058 108: $Vj,
5059 111: $Vk,
5060 112: $Vl,
5061 114: $Vm,
5062 115: $Vn,
5063 117: $Vo,
5064 118: $Vp,
5065 119: $Vq,
5066 120: $Vr,
5067 121: $Vs
5068 }, {
5069 10: $VG,
5070 12: $VH,
5071 13: $VI,
5072 15: $VJ,
5073 16: $VK,
5074 17: $VL,
5075 18: $VM,
5076 30: $VN,
5077 33: 158,
5078 35: $VO,
5079 36: $VP,
5080 50: 137,
5081 51: $VQ,
5082 55: $VR,
5083 71: $VS,
5084 89: 128,
5085 92: 140,
5086 93: $VT,
5087 94: $VU,
5088 95: $VV,
5089 96: $VW,
5090 97: $VX,
5091 99: 130,
5092 100: $VY,
5093 106: $VZ,
5094 107: $Vi,
5095 108: $Vj,
5096 111: $Vk,
5097 112: $Vl,
5098 114: $Vm,
5099 115: $Vn,
5100 117: $Vo,
5101 118: $Vp,
5102 119: $Vq,
5103 120: $Vr,
5104 121: $Vs
5105 }, {
5106 10: $VG,
5107 12: $VH,
5108 13: $VI,
5109 15: $VJ,
5110 16: $VK,
5111 17: $VL,
5112 18: $VM,
5113 30: $VN,
5114 33: 159,
5115 35: $VO,
5116 36: $VP,
5117 50: 137,
5118 51: $VQ,
5119 55: $VR,
5120 71: $VS,
5121 89: 128,
5122 92: 140,
5123 93: $VT,
5124 94: $VU,
5125 95: $VV,
5126 96: $VW,
5127 97: $VX,
5128 99: 130,
5129 100: $VY,
5130 106: $VZ,
5131 107: $Vi,
5132 108: $Vj,
5133 111: $Vk,
5134 112: $Vl,
5135 114: $Vm,
5136 115: $Vn,
5137 117: $Vo,
5138 118: $Vp,
5139 119: $Vq,
5140 120: $Vr,
5141 121: $Vs
5142 }, {
5143 10: $VG,
5144 12: $VH,
5145 13: $VI,
5146 15: $VJ,
5147 16: $VK,
5148 17: $VL,
5149 18: $VM,
5150 30: $VN,
5151 33: 160,
5152 35: $VO,
5153 36: $VP,
5154 50: 137,
5155 51: $VQ,
5156 55: $VR,
5157 71: $VS,
5158 89: 128,
5159 92: 140,
5160 93: $VT,
5161 94: $VU,
5162 95: $VV,
5163 96: $VW,
5164 97: $VX,
5165 99: 130,
5166 100: $VY,
5167 106: $VZ,
5168 107: $Vi,
5169 108: $Vj,
5170 111: $Vk,
5171 112: $Vl,
5172 114: $Vm,
5173 115: $Vn,
5174 117: $Vo,
5175 118: $Vp,
5176 119: $Vq,
5177 120: $Vr,
5178 121: $Vs
5179 }, {
5180 10: $VG,
5181 12: $VH,
5182 13: $VI,
5183 15: $VJ,
5184 16: $VK,
5185 17: $VL,
5186 18: $VM,
5187 30: $VN,
5188 33: 161,
5189 35: $VO,
5190 36: $VP,
5191 50: 137,
5192 51: $VQ,
5193 55: $VR,
5194 71: $VS,
5195 89: 128,
5196 92: 140,
5197 93: $VT,
5198 94: $VU,
5199 95: $VV,
5200 96: $VW,
5201 97: $VX,
5202 99: 130,
5203 100: $VY,
5204 106: $VZ,
5205 107: $Vi,
5206 108: $Vj,
5207 111: $Vk,
5208 112: $Vl,
5209 114: $Vm,
5210 115: $Vn,
5211 117: $Vo,
5212 118: $Vp,
5213 119: $Vq,
5214 120: $Vr,
5215 121: $Vs
5216 }, {
5217 10: $VG,
5218 12: $VH,
5219 13: $VI,
5220 15: $VJ,
5221 16: $VK,
5222 17: $VL,
5223 18: $VM,
5224 30: $VN,
5225 33: 162,
5226 35: $VO,
5227 36: $VP,
5228 50: 137,
5229 51: $VQ,
5230 55: $VR,
5231 71: $VS,
5232 89: 128,
5233 92: 140,
5234 93: $VT,
5235 94: $VU,
5236 95: $VV,
5237 96: $VW,
5238 97: $VX,
5239 99: 130,
5240 100: $VY,
5241 106: $VZ,
5242 107: $Vi,
5243 108: $Vj,
5244 111: $Vk,
5245 112: $Vl,
5246 114: $Vm,
5247 115: $Vn,
5248 117: $Vo,
5249 118: $Vp,
5250 119: $Vq,
5251 120: $Vr,
5252 121: $Vs
5253 }, o($V_, [2, 98]), o($V_, [2, 99]), o($V_, [2, 100]), o($V_, [2, 101]), o($V_, [2, 102]), o($V_, [2, 103]), o($V_, [2, 104]), o($V_, [2, 105]), o($V_, [2, 106]), o($V_, [2, 107]), o($V_, [2, 108]), o($V_, [2, 109]), o($V_, [2, 110]), o($V_, [2, 111]), o($V_, [2, 112]), o($V_, [2, 113]), o($V_, [2, 114]), o($V_, [2, 115]), o($V_, [2, 116]), o($V_, [2, 117]), o($V_, [2, 118]), {
5254 13: $V9,
5255 18: $Va,
5256 31: 163,
5257 49: 30,
5258 50: 32,
5259 51: $Vc,
5260 102: [1, 164],
5261 107: $Vi,
5262 108: $Vj,
5263 111: $Vk,
5264 112: $Vl,
5265 114: $Vm,
5266 115: $Vn,
5267 117: $Vo,
5268 118: $Vp,
5269 119: $Vq,
5270 120: $Vr,
5271 121: $Vs
5272 }, {
5273 100: [1, 165],
5274 103: 166,
5275 107: [1, 167]
5276 }, {
5277 13: $V9,
5278 18: $Va,
5279 31: 169,
5280 49: 30,
5281 50: 32,
5282 51: $Vc,
5283 100: [1, 168],
5284 107: $Vi,
5285 108: $Vj,
5286 111: $Vk,
5287 112: $Vl,
5288 114: $Vm,
5289 115: $Vn,
5290 117: $Vo,
5291 118: $Vp,
5292 119: $Vq,
5293 120: $Vr,
5294 121: $Vs
5295 }, {
5296 13: $V9,
5297 18: $Va,
5298 31: 170,
5299 49: 30,
5300 50: 32,
5301 51: $Vc,
5302 107: $Vi,
5303 108: $Vj,
5304 111: $Vk,
5305 112: $Vl,
5306 114: $Vm,
5307 115: $Vn,
5308 117: $Vo,
5309 118: $Vp,
5310 119: $Vq,
5311 120: $Vr,
5312 121: $Vs
5313 }, {
5314 13: $V9,
5315 18: $Va,
5316 31: 171,
5317 49: 30,
5318 50: 32,
5319 51: $Vc,
5320 107: $Vi,
5321 108: $Vj,
5322 111: $Vk,
5323 112: $Vl,
5324 114: $Vm,
5325 115: $Vn,
5326 117: $Vo,
5327 118: $Vp,
5328 119: $Vq,
5329 120: $Vr,
5330 121: $Vs
5331 }, {
5332 10: $VG,
5333 12: $VH,
5334 13: $VI,
5335 15: $VJ,
5336 16: $VK,
5337 17: $VL,
5338 18: $VM,
5339 30: $VN,
5340 33: 172,
5341 35: $VO,
5342 36: $VP,
5343 50: 137,
5344 51: $VQ,
5345 55: $VR,
5346 71: $VS,
5347 89: 128,
5348 92: 140,
5349 93: $VT,
5350 94: $VU,
5351 95: $VV,
5352 96: $VW,
5353 97: $VX,
5354 99: 130,
5355 100: $VY,
5356 106: $VZ,
5357 107: $Vi,
5358 108: $Vj,
5359 111: $Vk,
5360 112: $Vl,
5361 114: $Vm,
5362 115: $Vn,
5363 117: $Vo,
5364 118: $Vp,
5365 119: $Vq,
5366 120: $Vr,
5367 121: $Vs
5368 }, {
5369 10: $VG,
5370 12: $VH,
5371 13: $VI,
5372 15: $VJ,
5373 16: $VK,
5374 17: $VL,
5375 18: $VM,
5376 30: $VN,
5377 33: 174,
5378 35: $VO,
5379 36: $VP,
5380 39: [1, 173],
5381 50: 137,
5382 51: $VQ,
5383 55: $VR,
5384 71: $VS,
5385 89: 128,
5386 92: 140,
5387 93: $VT,
5388 94: $VU,
5389 95: $VV,
5390 96: $VW,
5391 97: $VX,
5392 99: 130,
5393 100: $VY,
5394 106: $VZ,
5395 107: $Vi,
5396 108: $Vj,
5397 111: $Vk,
5398 112: $Vl,
5399 114: $Vm,
5400 115: $Vn,
5401 117: $Vo,
5402 118: $Vp,
5403 119: $Vq,
5404 120: $Vr,
5405 121: $Vs
5406 }, {
5407 10: $VG,
5408 12: $VH,
5409 13: $VI,
5410 15: $VJ,
5411 16: $VK,
5412 17: $VL,
5413 18: $VM,
5414 30: $VN,
5415 33: 175,
5416 35: $VO,
5417 36: $VP,
5418 50: 137,
5419 51: $VQ,
5420 55: $VR,
5421 71: $VS,
5422 89: 128,
5423 92: 140,
5424 93: $VT,
5425 94: $VU,
5426 95: $VV,
5427 96: $VW,
5428 97: $VX,
5429 99: 130,
5430 100: $VY,
5431 106: $VZ,
5432 107: $Vi,
5433 108: $Vj,
5434 111: $Vk,
5435 112: $Vl,
5436 114: $Vm,
5437 115: $Vn,
5438 117: $Vo,
5439 118: $Vp,
5440 119: $Vq,
5441 120: $Vr,
5442 121: $Vs
5443 }, {
5444 10: $VG,
5445 12: $VH,
5446 13: $VI,
5447 15: $VJ,
5448 16: $VK,
5449 17: $VL,
5450 18: $VM,
5451 30: $VN,
5452 33: 176,
5453 35: $VO,
5454 36: $VP,
5455 50: 137,
5456 51: $VQ,
5457 55: $VR,
5458 71: $VS,
5459 89: 128,
5460 92: 140,
5461 93: $VT,
5462 94: $VU,
5463 95: $VV,
5464 96: $VW,
5465 97: $VX,
5466 99: 130,
5467 100: $VY,
5468 106: $VZ,
5469 107: $Vi,
5470 108: $Vj,
5471 111: $Vk,
5472 112: $Vl,
5473 114: $Vm,
5474 115: $Vn,
5475 117: $Vo,
5476 118: $Vp,
5477 119: $Vq,
5478 120: $Vr,
5479 121: $Vs
5480 }, {
5481 10: $VG,
5482 12: $VH,
5483 13: $VI,
5484 15: $VJ,
5485 16: $VK,
5486 17: $VL,
5487 18: $VM,
5488 30: $VN,
5489 33: 177,
5490 35: $VO,
5491 36: $VP,
5492 50: 137,
5493 51: $VQ,
5494 55: $VR,
5495 71: $VS,
5496 89: 128,
5497 92: 140,
5498 93: $VT,
5499 94: $VU,
5500 95: $VV,
5501 96: $VW,
5502 97: $VX,
5503 99: 130,
5504 100: $VY,
5505 106: $VZ,
5506 107: $Vi,
5507 108: $Vj,
5508 111: $Vk,
5509 112: $Vl,
5510 114: $Vm,
5511 115: $Vn,
5512 117: $Vo,
5513 118: $Vp,
5514 119: $Vq,
5515 120: $Vr,
5516 121: $Vs
5517 }, {
5518 10: $VG,
5519 12: $VH,
5520 13: $VI,
5521 15: $VJ,
5522 16: $VK,
5523 17: $VL,
5524 18: $VM,
5525 30: $VN,
5526 33: 178,
5527 35: $VO,
5528 36: $VP,
5529 50: 137,
5530 51: $VQ,
5531 55: $VR,
5532 71: $VS,
5533 89: 128,
5534 92: 140,
5535 93: $VT,
5536 94: $VU,
5537 95: $VV,
5538 96: $VW,
5539 97: $VX,
5540 99: 130,
5541 100: $VY,
5542 106: $VZ,
5543 107: $Vi,
5544 108: $Vj,
5545 111: $Vk,
5546 112: $Vl,
5547 114: $Vm,
5548 115: $Vn,
5549 117: $Vo,
5550 118: $Vp,
5551 119: $Vq,
5552 120: $Vr,
5553 121: $Vs
5554 }, {
5555 10: $VG,
5556 12: $VH,
5557 13: $VI,
5558 15: $VJ,
5559 16: $VK,
5560 17: $VL,
5561 18: $VM,
5562 30: $VN,
5563 33: 179,
5564 35: $VO,
5565 36: $VP,
5566 50: 137,
5567 51: $VQ,
5568 55: $VR,
5569 71: $VS,
5570 89: 128,
5571 92: 140,
5572 93: $VT,
5573 94: $VU,
5574 95: $VV,
5575 96: $VW,
5576 97: $VX,
5577 99: 130,
5578 100: $VY,
5579 106: $VZ,
5580 107: $Vi,
5581 108: $Vj,
5582 111: $Vk,
5583 112: $Vl,
5584 114: $Vm,
5585 115: $Vn,
5586 117: $Vo,
5587 118: $Vp,
5588 119: $Vq,
5589 120: $Vr,
5590 121: $Vs
5591 }, o($Vy, [2, 66]), o($VA, [2, 68]), o($Vy, [2, 29], {
5592 21: 180,
5593 10: $Vz
5594 }), o($V3, [2, 11]), o($V3, [2, 21]), o($V3, [2, 22]), {
5595 9: [1, 181]
5596 }, o($V3, [2, 12]), o($V3, [2, 13]), o($V3, [2, 14]), o($V3, [2, 15]), {
5597 8: $Vu,
5598 9: $Vv,
5599 11: $Vw,
5600 13: $V9,
5601 18: $Va,
5602 24: 183,
5603 32: [1, 182],
5604 49: 110,
5605 50: 32,
5606 51: $Vc,
5607 107: $Vi,
5608 108: $Vj,
5609 111: $Vk,
5610 112: $Vl,
5611 114: $Vm,
5612 115: $Vn,
5613 117: $Vo,
5614 118: $Vp,
5615 119: $Vq,
5616 120: $Vr,
5617 121: $Vs
5618 }, {
5619 8: $Vu,
5620 9: $Vv,
5621 11: $Vw,
5622 24: 184
5623 }, {
5624 6: 10,
5625 7: 11,
5626 8: $V5,
5627 9: $V6,
5628 10: $V7,
5629 11: $V8,
5630 13: $V9,
5631 18: $Va,
5632 23: 16,
5633 25: 17,
5634 26: 18,
5635 27: 19,
5636 28: 20,
5637 29: 21,
5638 30: $Vb,
5639 31: 29,
5640 35: [1, 185],
5641 37: 23,
5642 49: 30,
5643 50: 32,
5644 51: $Vc,
5645 93: $Vd,
5646 94: $Ve,
5647 95: $Vf,
5648 96: $Vg,
5649 97: $Vh,
5650 107: $Vi,
5651 108: $Vj,
5652 111: $Vk,
5653 112: $Vl,
5654 114: $Vm,
5655 115: $Vn,
5656 117: $Vo,
5657 118: $Vp,
5658 119: $Vq,
5659 120: $Vr,
5660 121: $Vs
5661 }, o($Vx, [2, 43]), o($VF, [2, 73], {
5662 10: [1, 186]
5663 }), {
5664 10: [1, 187]
5665 }, {
5666 10: $VG,
5667 12: $VH,
5668 13: $VI,
5669 15: $VJ,
5670 16: $VK,
5671 17: $VL,
5672 18: $VM,
5673 30: $VN,
5674 33: 188,
5675 35: $VO,
5676 36: $VP,
5677 50: 137,
5678 51: $VQ,
5679 55: $VR,
5680 71: $VS,
5681 89: 128,
5682 92: 140,
5683 93: $VT,
5684 94: $VU,
5685 95: $VV,
5686 96: $VW,
5687 97: $VX,
5688 99: 130,
5689 100: $VY,
5690 106: $VZ,
5691 107: $Vi,
5692 108: $Vj,
5693 111: $Vk,
5694 112: $Vl,
5695 114: $Vm,
5696 115: $Vn,
5697 117: $Vo,
5698 118: $Vp,
5699 119: $Vq,
5700 120: $Vr,
5701 121: $Vs
5702 }, {
5703 10: $VG,
5704 12: $VH,
5705 13: $VI,
5706 15: $VJ,
5707 16: $VK,
5708 17: $VL,
5709 18: $VM,
5710 30: $VN,
5711 35: $VO,
5712 50: 137,
5713 51: $VQ,
5714 55: $VR,
5715 56: [1, 189],
5716 58: [1, 190],
5717 60: [1, 191],
5718 62: [1, 192],
5719 71: $VS,
5720 89: 193,
5721 92: 140,
5722 93: $VT,
5723 94: $VU,
5724 95: $VV,
5725 96: $VW,
5726 97: $VX,
5727 99: 130,
5728 100: $VY,
5729 106: $VZ,
5730 107: $Vi,
5731 108: $Vj,
5732 111: $Vk,
5733 112: $Vl,
5734 114: $Vm,
5735 115: $Vn,
5736 117: $Vo,
5737 118: $Vp,
5738 119: $Vq,
5739 120: $Vr,
5740 121: $Vs
5741 }, o($V$, [2, 120]), o($V$, [2, 122]), o($V$, [2, 173]), o($V$, [2, 174]), o($V$, [2, 175]), o($V$, [2, 176]), o($V$, [2, 177]), o($V$, [2, 178]), o($V$, [2, 179]), o($V$, [2, 180]), o($V$, [2, 181]), o($V$, [2, 182]), o($V$, [2, 183]), o($V$, [2, 125]), o($V$, [2, 126]), o($V$, [2, 127]), o($V$, [2, 128]), o($V$, [2, 129]), o($V$, [2, 130]), o($V$, [2, 131]), o($V$, [2, 132]), o($V$, [2, 133]), o($V$, [2, 134]), o($V$, [2, 135]), {
5742 10: $VG,
5743 12: $VH,
5744 13: $VI,
5745 15: $VJ,
5746 16: $VK,
5747 17: $VL,
5748 18: $VM,
5749 30: $VN,
5750 35: $VO,
5751 50: 137,
5752 51: $VQ,
5753 55: $VR,
5754 56: [1, 194],
5755 71: $VS,
5756 89: 193,
5757 92: 140,
5758 93: $VT,
5759 94: $VU,
5760 95: $VV,
5761 96: $VW,
5762 97: $VX,
5763 99: 130,
5764 100: $VY,
5765 106: $VZ,
5766 107: $Vi,
5767 108: $Vj,
5768 111: $Vk,
5769 112: $Vl,
5770 114: $Vm,
5771 115: $Vn,
5772 117: $Vo,
5773 118: $Vp,
5774 119: $Vq,
5775 120: $Vr,
5776 121: $Vs
5777 }, {
5778 10: $VG,
5779 12: $VH,
5780 13: $VI,
5781 15: $VJ,
5782 16: $VK,
5783 17: $VL,
5784 18: $VM,
5785 30: $VN,
5786 35: $VO,
5787 50: 137,
5788 51: $VQ,
5789 55: $VR,
5790 58: [1, 195],
5791 71: $VS,
5792 89: 193,
5793 92: 140,
5794 93: $VT,
5795 94: $VU,
5796 95: $VV,
5797 96: $VW,
5798 97: $VX,
5799 99: 130,
5800 100: $VY,
5801 106: $VZ,
5802 107: $Vi,
5803 108: $Vj,
5804 111: $Vk,
5805 112: $Vl,
5806 114: $Vm,
5807 115: $Vn,
5808 117: $Vo,
5809 118: $Vp,
5810 119: $Vq,
5811 120: $Vr,
5812 121: $Vs
5813 }, {
5814 10: $VG,
5815 12: $VH,
5816 13: $VI,
5817 15: $VJ,
5818 16: $VK,
5819 17: $VL,
5820 18: $VM,
5821 30: $VN,
5822 35: $VO,
5823 50: 137,
5824 51: $VQ,
5825 55: $VR,
5826 60: [1, 196],
5827 71: $VS,
5828 89: 193,
5829 92: 140,
5830 93: $VT,
5831 94: $VU,
5832 95: $VV,
5833 96: $VW,
5834 97: $VX,
5835 99: 130,
5836 100: $VY,
5837 106: $VZ,
5838 107: $Vi,
5839 108: $Vj,
5840 111: $Vk,
5841 112: $Vl,
5842 114: $Vm,
5843 115: $Vn,
5844 117: $Vo,
5845 118: $Vp,
5846 119: $Vq,
5847 120: $Vr,
5848 121: $Vs
5849 }, {
5850 10: $VG,
5851 12: $VH,
5852 13: $VI,
5853 15: $VJ,
5854 16: $VK,
5855 17: $VL,
5856 18: $VM,
5857 30: $VN,
5858 35: $VO,
5859 50: 137,
5860 51: $VQ,
5861 55: $VR,
5862 64: [1, 197],
5863 66: [1, 198],
5864 68: [1, 199],
5865 70: [1, 200],
5866 71: $VS,
5867 89: 193,
5868 92: 140,
5869 93: $VT,
5870 94: $VU,
5871 95: $VV,
5872 96: $VW,
5873 97: $VX,
5874 99: 130,
5875 100: $VY,
5876 106: $VZ,
5877 107: $Vi,
5878 108: $Vj,
5879 111: $Vk,
5880 112: $Vl,
5881 114: $Vm,
5882 115: $Vn,
5883 117: $Vo,
5884 118: $Vp,
5885 119: $Vq,
5886 120: $Vr,
5887 121: $Vs
5888 }, {
5889 10: $VG,
5890 12: $VH,
5891 13: $VI,
5892 15: $VJ,
5893 16: $VK,
5894 17: $VL,
5895 18: $VM,
5896 30: $VN,
5897 35: $VO,
5898 50: 137,
5899 51: $VQ,
5900 55: $VR,
5901 64: [1, 201],
5902 71: $VS,
5903 89: 193,
5904 92: 140,
5905 93: $VT,
5906 94: $VU,
5907 95: $VV,
5908 96: $VW,
5909 97: $VX,
5910 99: 130,
5911 100: $VY,
5912 106: $VZ,
5913 107: $Vi,
5914 108: $Vj,
5915 111: $Vk,
5916 112: $Vl,
5917 114: $Vm,
5918 115: $Vn,
5919 117: $Vo,
5920 118: $Vp,
5921 119: $Vq,
5922 120: $Vr,
5923 121: $Vs
5924 }, {
5925 10: $VG,
5926 12: $VH,
5927 13: $VI,
5928 15: $VJ,
5929 16: $VK,
5930 17: $VL,
5931 18: $VM,
5932 30: $VN,
5933 35: $VO,
5934 50: 137,
5935 51: $VQ,
5936 55: $VR,
5937 66: [1, 202],
5938 71: $VS,
5939 89: 193,
5940 92: 140,
5941 93: $VT,
5942 94: $VU,
5943 95: $VV,
5944 96: $VW,
5945 97: $VX,
5946 99: 130,
5947 100: $VY,
5948 106: $VZ,
5949 107: $Vi,
5950 108: $Vj,
5951 111: $Vk,
5952 112: $Vl,
5953 114: $Vm,
5954 115: $Vn,
5955 117: $Vo,
5956 118: $Vp,
5957 119: $Vq,
5958 120: $Vr,
5959 121: $Vs
5960 }, {
5961 10: $VG,
5962 12: $VH,
5963 13: $VI,
5964 15: $VJ,
5965 16: $VK,
5966 17: $VL,
5967 18: $VM,
5968 30: $VN,
5969 35: $VO,
5970 50: 137,
5971 51: $VQ,
5972 55: $VR,
5973 68: [1, 203],
5974 71: $VS,
5975 89: 193,
5976 92: 140,
5977 93: $VT,
5978 94: $VU,
5979 95: $VV,
5980 96: $VW,
5981 97: $VX,
5982 99: 130,
5983 100: $VY,
5984 106: $VZ,
5985 107: $Vi,
5986 108: $Vj,
5987 111: $Vk,
5988 112: $Vl,
5989 114: $Vm,
5990 115: $Vn,
5991 117: $Vo,
5992 118: $Vp,
5993 119: $Vq,
5994 120: $Vr,
5995 121: $Vs
5996 }, {
5997 10: $VG,
5998 12: $VH,
5999 13: $VI,
6000 15: $VJ,
6001 16: $VK,
6002 17: $VL,
6003 18: $VM,
6004 30: $VN,
6005 35: $VO,
6006 50: 137,
6007 51: $VQ,
6008 55: $VR,
6009 71: $VS,
6010 72: [1, 204],
6011 74: [1, 205],
6012 76: [1, 206],
6013 78: [1, 207],
6014 89: 193,
6015 92: 140,
6016 93: $VT,
6017 94: $VU,
6018 95: $VV,
6019 96: $VW,
6020 97: $VX,
6021 99: 130,
6022 100: $VY,
6023 106: $VZ,
6024 107: $Vi,
6025 108: $Vj,
6026 111: $Vk,
6027 112: $Vl,
6028 114: $Vm,
6029 115: $Vn,
6030 117: $Vo,
6031 118: $Vp,
6032 119: $Vq,
6033 120: $Vr,
6034 121: $Vs
6035 }, {
6036 10: $VG,
6037 12: $VH,
6038 13: $VI,
6039 15: $VJ,
6040 16: $VK,
6041 17: $VL,
6042 18: $VM,
6043 30: $VN,
6044 35: $VO,
6045 50: 137,
6046 51: $VQ,
6047 55: $VR,
6048 71: $VS,
6049 72: [1, 208],
6050 89: 193,
6051 92: 140,
6052 93: $VT,
6053 94: $VU,
6054 95: $VV,
6055 96: $VW,
6056 97: $VX,
6057 99: 130,
6058 100: $VY,
6059 106: $VZ,
6060 107: $Vi,
6061 108: $Vj,
6062 111: $Vk,
6063 112: $Vl,
6064 114: $Vm,
6065 115: $Vn,
6066 117: $Vo,
6067 118: $Vp,
6068 119: $Vq,
6069 120: $Vr,
6070 121: $Vs
6071 }, {
6072 10: $VG,
6073 12: $VH,
6074 13: $VI,
6075 15: $VJ,
6076 16: $VK,
6077 17: $VL,
6078 18: $VM,
6079 30: $VN,
6080 35: $VO,
6081 50: 137,
6082 51: $VQ,
6083 55: $VR,
6084 71: $VS,
6085 74: [1, 209],
6086 89: 193,
6087 92: 140,
6088 93: $VT,
6089 94: $VU,
6090 95: $VV,
6091 96: $VW,
6092 97: $VX,
6093 99: 130,
6094 100: $VY,
6095 106: $VZ,
6096 107: $Vi,
6097 108: $Vj,
6098 111: $Vk,
6099 112: $Vl,
6100 114: $Vm,
6101 115: $Vn,
6102 117: $Vo,
6103 118: $Vp,
6104 119: $Vq,
6105 120: $Vr,
6106 121: $Vs
6107 }, {
6108 10: $VG,
6109 12: $VH,
6110 13: $VI,
6111 15: $VJ,
6112 16: $VK,
6113 17: $VL,
6114 18: $VM,
6115 30: $VN,
6116 35: $VO,
6117 50: 137,
6118 51: $VQ,
6119 55: $VR,
6120 71: $VS,
6121 76: [1, 210],
6122 89: 193,
6123 92: 140,
6124 93: $VT,
6125 94: $VU,
6126 95: $VV,
6127 96: $VW,
6128 97: $VX,
6129 99: 130,
6130 100: $VY,
6131 106: $VZ,
6132 107: $Vi,
6133 108: $Vj,
6134 111: $Vk,
6135 112: $Vl,
6136 114: $Vm,
6137 115: $Vn,
6138 117: $Vo,
6139 118: $Vp,
6140 119: $Vq,
6141 120: $Vr,
6142 121: $Vs
6143 }, {
6144 10: [1, 211],
6145 13: $V9,
6146 18: $Va,
6147 49: 110,
6148 50: 32,
6149 51: $Vc,
6150 107: $Vi,
6151 108: $Vj,
6152 111: $Vk,
6153 112: $Vl,
6154 114: $Vm,
6155 115: $Vn,
6156 117: $Vo,
6157 118: $Vp,
6158 119: $Vq,
6159 120: $Vr,
6160 121: $Vs
6161 }, {
6162 10: [1, 212]
6163 }, {
6164 10: [1, 213]
6165 }, {
6166 10: [1, 214],
6167 108: [1, 215]
6168 }, o($V01, [2, 154]), {
6169 10: [1, 216]
6170 }, {
6171 10: [1, 217],
6172 13: $V9,
6173 18: $Va,
6174 49: 110,
6175 50: 32,
6176 51: $Vc,
6177 107: $Vi,
6178 108: $Vj,
6179 111: $Vk,
6180 112: $Vl,
6181 114: $Vm,
6182 115: $Vn,
6183 117: $Vo,
6184 118: $Vp,
6185 119: $Vq,
6186 120: $Vr,
6187 121: $Vs
6188 }, {
6189 10: [1, 218],
6190 13: $V9,
6191 18: $Va,
6192 49: 110,
6193 50: 32,
6194 51: $Vc,
6195 107: $Vi,
6196 108: $Vj,
6197 111: $Vk,
6198 112: $Vl,
6199 114: $Vm,
6200 115: $Vn,
6201 117: $Vo,
6202 118: $Vp,
6203 119: $Vq,
6204 120: $Vr,
6205 121: $Vs
6206 }, {
6207 10: [1, 219],
6208 13: $V9,
6209 18: $Va,
6210 49: 110,
6211 50: 32,
6212 51: $Vc,
6213 107: $Vi,
6214 108: $Vj,
6215 111: $Vk,
6216 112: $Vl,
6217 114: $Vm,
6218 115: $Vn,
6219 117: $Vo,
6220 118: $Vp,
6221 119: $Vq,
6222 120: $Vr,
6223 121: $Vs
6224 }, {
6225 10: $VG,
6226 12: $VH,
6227 13: $VI,
6228 15: $VJ,
6229 16: $VK,
6230 17: $VL,
6231 18: $VM,
6232 30: $VN,
6233 34: [1, 220],
6234 35: $VO,
6235 50: 137,
6236 51: $VQ,
6237 55: $VR,
6238 71: $VS,
6239 89: 193,
6240 92: 140,
6241 93: $VT,
6242 94: $VU,
6243 95: $VV,
6244 96: $VW,
6245 97: $VX,
6246 99: 130,
6247 100: $VY,
6248 106: $VZ,
6249 107: $Vi,
6250 108: $Vj,
6251 111: $Vk,
6252 112: $Vl,
6253 114: $Vm,
6254 115: $Vn,
6255 117: $Vo,
6256 118: $Vp,
6257 119: $Vq,
6258 120: $Vr,
6259 121: $Vs
6260 }, {
6261 10: $VG,
6262 12: $VH,
6263 13: $VI,
6264 15: $VJ,
6265 16: $VK,
6266 17: $VL,
6267 18: $VM,
6268 30: $VN,
6269 33: 221,
6270 35: $VO,
6271 36: $VP,
6272 50: 137,
6273 51: $VQ,
6274 55: $VR,
6275 71: $VS,
6276 89: 128,
6277 92: 140,
6278 93: $VT,
6279 94: $VU,
6280 95: $VV,
6281 96: $VW,
6282 97: $VX,
6283 99: 130,
6284 100: $VY,
6285 106: $VZ,
6286 107: $Vi,
6287 108: $Vj,
6288 111: $Vk,
6289 112: $Vl,
6290 114: $Vm,
6291 115: $Vn,
6292 117: $Vo,
6293 118: $Vp,
6294 119: $Vq,
6295 120: $Vr,
6296 121: $Vs
6297 }, {
6298 10: $VG,
6299 12: $VH,
6300 13: $VI,
6301 15: $VJ,
6302 16: $VK,
6303 17: $VL,
6304 18: $VM,
6305 30: $VN,
6306 35: $VO,
6307 40: [1, 222],
6308 50: 137,
6309 51: $VQ,
6310 55: $VR,
6311 71: $VS,
6312 89: 193,
6313 92: 140,
6314 93: $VT,
6315 94: $VU,
6316 95: $VV,
6317 96: $VW,
6318 97: $VX,
6319 99: 130,
6320 100: $VY,
6321 106: $VZ,
6322 107: $Vi,
6323 108: $Vj,
6324 111: $Vk,
6325 112: $Vl,
6326 114: $Vm,
6327 115: $Vn,
6328 117: $Vo,
6329 118: $Vp,
6330 119: $Vq,
6331 120: $Vr,
6332 121: $Vs
6333 }, {
6334 10: $VG,
6335 12: $VH,
6336 13: $VI,
6337 15: $VJ,
6338 16: $VK,
6339 17: $VL,
6340 18: $VM,
6341 30: $VN,
6342 35: $VO,
6343 42: [1, 223],
6344 50: 137,
6345 51: $VQ,
6346 55: $VR,
6347 71: $VS,
6348 89: 193,
6349 92: 140,
6350 93: $VT,
6351 94: $VU,
6352 95: $VV,
6353 96: $VW,
6354 97: $VX,
6355 99: 130,
6356 100: $VY,
6357 106: $VZ,
6358 107: $Vi,
6359 108: $Vj,
6360 111: $Vk,
6361 112: $Vl,
6362 114: $Vm,
6363 115: $Vn,
6364 117: $Vo,
6365 118: $Vp,
6366 119: $Vq,
6367 120: $Vr,
6368 121: $Vs
6369 }, {
6370 10: $VG,
6371 12: $VH,
6372 13: $VI,
6373 15: $VJ,
6374 16: $VK,
6375 17: $VL,
6376 18: $VM,
6377 30: $VN,
6378 35: $VO,
6379 44: [1, 224],
6380 50: 137,
6381 51: $VQ,
6382 55: $VR,
6383 71: $VS,
6384 89: 193,
6385 92: 140,
6386 93: $VT,
6387 94: $VU,
6388 95: $VV,
6389 96: $VW,
6390 97: $VX,
6391 99: 130,
6392 100: $VY,
6393 106: $VZ,
6394 107: $Vi,
6395 108: $Vj,
6396 111: $Vk,
6397 112: $Vl,
6398 114: $Vm,
6399 115: $Vn,
6400 117: $Vo,
6401 118: $Vp,
6402 119: $Vq,
6403 120: $Vr,
6404 121: $Vs
6405 }, {
6406 10: $VG,
6407 12: $VH,
6408 13: $VI,
6409 15: $VJ,
6410 16: $VK,
6411 17: $VL,
6412 18: $VM,
6413 30: $VN,
6414 34: [1, 225],
6415 35: $VO,
6416 50: 137,
6417 51: $VQ,
6418 55: $VR,
6419 71: $VS,
6420 89: 193,
6421 92: 140,
6422 93: $VT,
6423 94: $VU,
6424 95: $VV,
6425 96: $VW,
6426 97: $VX,
6427 99: 130,
6428 100: $VY,
6429 106: $VZ,
6430 107: $Vi,
6431 108: $Vj,
6432 111: $Vk,
6433 112: $Vl,
6434 114: $Vm,
6435 115: $Vn,
6436 117: $Vo,
6437 118: $Vp,
6438 119: $Vq,
6439 120: $Vr,
6440 121: $Vs
6441 }, {
6442 10: $VG,
6443 12: $VH,
6444 13: $VI,
6445 15: $VJ,
6446 16: $VK,
6447 17: $VL,
6448 18: $VM,
6449 30: $VN,
6450 35: $VO,
6451 46: [1, 226],
6452 48: [1, 227],
6453 50: 137,
6454 51: $VQ,
6455 55: $VR,
6456 71: $VS,
6457 89: 193,
6458 92: 140,
6459 93: $VT,
6460 94: $VU,
6461 95: $VV,
6462 96: $VW,
6463 97: $VX,
6464 99: 130,
6465 100: $VY,
6466 106: $VZ,
6467 107: $Vi,
6468 108: $Vj,
6469 111: $Vk,
6470 112: $Vl,
6471 114: $Vm,
6472 115: $Vn,
6473 117: $Vo,
6474 118: $Vp,
6475 119: $Vq,
6476 120: $Vr,
6477 121: $Vs
6478 }, {
6479 10: $VG,
6480 12: $VH,
6481 13: $VI,
6482 15: $VJ,
6483 16: $VK,
6484 17: $VL,
6485 18: $VM,
6486 30: $VN,
6487 35: $VO,
6488 46: [1, 229],
6489 48: [1, 228],
6490 50: 137,
6491 51: $VQ,
6492 55: $VR,
6493 71: $VS,
6494 89: 193,
6495 92: 140,
6496 93: $VT,
6497 94: $VU,
6498 95: $VV,
6499 96: $VW,
6500 97: $VX,
6501 99: 130,
6502 100: $VY,
6503 106: $VZ,
6504 107: $Vi,
6505 108: $Vj,
6506 111: $Vk,
6507 112: $Vl,
6508 114: $Vm,
6509 115: $Vn,
6510 117: $Vo,
6511 118: $Vp,
6512 119: $Vq,
6513 120: $Vr,
6514 121: $Vs
6515 }, o($Vy, [2, 28]), o($V3, [2, 23]), {
6516 10: $VG,
6517 12: $VH,
6518 13: $VI,
6519 15: $VJ,
6520 16: $VK,
6521 17: $VL,
6522 18: $VM,
6523 30: $VN,
6524 33: 230,
6525 35: $VO,
6526 36: $VP,
6527 50: 137,
6528 51: $VQ,
6529 55: $VR,
6530 71: $VS,
6531 89: 128,
6532 92: 140,
6533 93: $VT,
6534 94: $VU,
6535 95: $VV,
6536 96: $VW,
6537 97: $VX,
6538 99: 130,
6539 100: $VY,
6540 106: $VZ,
6541 107: $Vi,
6542 108: $Vj,
6543 111: $Vk,
6544 112: $Vl,
6545 114: $Vm,
6546 115: $Vn,
6547 117: $Vo,
6548 118: $Vp,
6549 119: $Vq,
6550 120: $Vr,
6551 121: $Vs
6552 }, o($VE, $V4, {
6553 5: 231
6554 }), o($VE, $V4, {
6555 5: 232
6556 }), o($Vt, [2, 39]), o($VF, [2, 75]), o($VF, [2, 74]), {
6557 10: $VG,
6558 12: $VH,
6559 13: $VI,
6560 15: $VJ,
6561 16: $VK,
6562 17: $VL,
6563 18: $VM,
6564 30: $VN,
6565 35: $VO,
6566 50: 137,
6567 51: $VQ,
6568 55: $VR,
6569 71: $VS,
6570 88: [1, 233],
6571 89: 193,
6572 92: 140,
6573 93: $VT,
6574 94: $VU,
6575 95: $VV,
6576 96: $VW,
6577 97: $VX,
6578 99: 130,
6579 100: $VY,
6580 106: $VZ,
6581 107: $Vi,
6582 108: $Vj,
6583 111: $Vk,
6584 112: $Vl,
6585 114: $Vm,
6586 115: $Vn,
6587 117: $Vo,
6588 118: $Vp,
6589 119: $Vq,
6590 120: $Vr,
6591 121: $Vs
6592 }, o($VF, [2, 77]), o($VF, [2, 79]), o($VF, [2, 81]), o($VF, [2, 83]), o($V$, [2, 121]), o($VF, [2, 78]), o($VF, [2, 80]), o($VF, [2, 82]), o($VF, [2, 84]), o($VF, [2, 86]), o($VF, [2, 88]), o($VF, [2, 90]), o($VF, [2, 85]), o($VF, [2, 87]), o($VF, [2, 89]), o($VF, [2, 91]), o($VF, [2, 93]), o($VF, [2, 95]), o($VF, [2, 97]), o($VF, [2, 92]), o($VF, [2, 94]), o($VF, [2, 96]), {
6593 10: $V11,
6594 51: $V21,
6595 93: $V31,
6596 101: 234,
6597 102: $V41,
6598 106: $V51,
6599 107: $V61,
6600 109: 235,
6601 110: 236,
6602 111: $V71,
6603 112: $V81,
6604 113: $V91,
6605 114: $Va1,
6606 115: $Vb1
6607 }, {
6608 10: $V11,
6609 51: $V21,
6610 93: $V31,
6611 101: 248,
6612 102: $V41,
6613 106: $V51,
6614 107: $V61,
6615 109: 235,
6616 110: 236,
6617 111: $V71,
6618 112: $V81,
6619 113: $V91,
6620 114: $Va1,
6621 115: $Vb1
6622 }, {
6623 10: $V11,
6624 51: $V21,
6625 93: $V31,
6626 101: 249,
6627 102: $V41,
6628 104: [1, 250],
6629 106: $V51,
6630 107: $V61,
6631 109: 235,
6632 110: 236,
6633 111: $V71,
6634 112: $V81,
6635 113: $V91,
6636 114: $Va1,
6637 115: $Vb1
6638 }, {
6639 10: $V11,
6640 51: $V21,
6641 93: $V31,
6642 101: 251,
6643 102: $V41,
6644 104: [1, 252],
6645 106: $V51,
6646 107: $V61,
6647 109: 235,
6648 110: 236,
6649 111: $V71,
6650 112: $V81,
6651 113: $V91,
6652 114: $Va1,
6653 115: $Vb1
6654 }, {
6655 107: [1, 253]
6656 }, {
6657 10: $V11,
6658 51: $V21,
6659 93: $V31,
6660 101: 254,
6661 102: $V41,
6662 106: $V51,
6663 107: $V61,
6664 109: 235,
6665 110: 236,
6666 111: $V71,
6667 112: $V81,
6668 113: $V91,
6669 114: $Va1,
6670 115: $Vb1
6671 }, {
6672 10: $V11,
6673 51: $V21,
6674 93: $V31,
6675 101: 255,
6676 102: $V41,
6677 106: $V51,
6678 107: $V61,
6679 109: 235,
6680 110: 236,
6681 111: $V71,
6682 112: $V81,
6683 113: $V91,
6684 114: $Va1,
6685 115: $Vb1
6686 }, {
6687 13: $V9,
6688 18: $Va,
6689 31: 256,
6690 49: 30,
6691 50: 32,
6692 51: $Vc,
6693 107: $Vi,
6694 108: $Vj,
6695 111: $Vk,
6696 112: $Vl,
6697 114: $Vm,
6698 115: $Vn,
6699 117: $Vo,
6700 118: $Vp,
6701 119: $Vq,
6702 120: $Vr,
6703 121: $Vs
6704 }, {
6705 13: $V9,
6706 18: $Va,
6707 31: 257,
6708 36: [1, 258],
6709 49: 30,
6710 50: 32,
6711 51: $Vc,
6712 107: $Vi,
6713 108: $Vj,
6714 111: $Vk,
6715 112: $Vl,
6716 114: $Vm,
6717 115: $Vn,
6718 117: $Vo,
6719 118: $Vp,
6720 119: $Vq,
6721 120: $Vr,
6722 121: $Vs
6723 }, o($Vy, [2, 45], {
6724 21: 259,
6725 10: $Vz
6726 }), {
6727 10: $VG,
6728 12: $VH,
6729 13: $VI,
6730 15: $VJ,
6731 16: $VK,
6732 17: $VL,
6733 18: $VM,
6734 30: $VN,
6735 35: $VO,
6736 40: [1, 260],
6737 50: 137,
6738 51: $VQ,
6739 55: $VR,
6740 71: $VS,
6741 89: 193,
6742 92: 140,
6743 93: $VT,
6744 94: $VU,
6745 95: $VV,
6746 96: $VW,
6747 97: $VX,
6748 99: 130,
6749 100: $VY,
6750 106: $VZ,
6751 107: $Vi,
6752 108: $Vj,
6753 111: $Vk,
6754 112: $Vl,
6755 114: $Vm,
6756 115: $Vn,
6757 117: $Vo,
6758 118: $Vp,
6759 119: $Vq,
6760 120: $Vr,
6761 121: $Vs
6762 }, o($Vy, [2, 51], {
6763 21: 261,
6764 10: $Vz
6765 }), o($Vy, [2, 49], {
6766 21: 262,
6767 10: $Vz
6768 }), o($Vy, [2, 53], {
6769 21: 263,
6770 10: $Vz
6771 }), o($Vy, [2, 55], {
6772 21: 264,
6773 10: $Vz
6774 }), o($Vy, [2, 57], {
6775 21: 265,
6776 10: $Vz
6777 }), o($Vy, [2, 61], {
6778 21: 266,
6779 10: $Vz
6780 }), o($Vy, [2, 59], {
6781 21: 267,
6782 10: $Vz
6783 }), o($Vy, [2, 63], {
6784 21: 268,
6785 10: $Vz
6786 }), {
6787 10: $VG,
6788 12: $VH,
6789 13: $VI,
6790 15: $VJ,
6791 16: $VK,
6792 17: $VL,
6793 18: $VM,
6794 30: $VN,
6795 34: [1, 269],
6796 35: $VO,
6797 50: 137,
6798 51: $VQ,
6799 55: $VR,
6800 71: $VS,
6801 89: 193,
6802 92: 140,
6803 93: $VT,
6804 94: $VU,
6805 95: $VV,
6806 96: $VW,
6807 97: $VX,
6808 99: 130,
6809 100: $VY,
6810 106: $VZ,
6811 107: $Vi,
6812 108: $Vj,
6813 111: $Vk,
6814 112: $Vl,
6815 114: $Vm,
6816 115: $Vn,
6817 117: $Vo,
6818 118: $Vp,
6819 119: $Vq,
6820 120: $Vr,
6821 121: $Vs
6822 }, {
6823 6: 10,
6824 7: 11,
6825 8: $V5,
6826 9: $V6,
6827 10: $V7,
6828 11: $V8,
6829 13: $V9,
6830 18: $Va,
6831 23: 16,
6832 25: 17,
6833 26: 18,
6834 27: 19,
6835 28: 20,
6836 29: 21,
6837 30: $Vb,
6838 31: 29,
6839 35: [1, 270],
6840 37: 23,
6841 49: 30,
6842 50: 32,
6843 51: $Vc,
6844 93: $Vd,
6845 94: $Ve,
6846 95: $Vf,
6847 96: $Vg,
6848 97: $Vh,
6849 107: $Vi,
6850 108: $Vj,
6851 111: $Vk,
6852 112: $Vl,
6853 114: $Vm,
6854 115: $Vn,
6855 117: $Vo,
6856 118: $Vp,
6857 119: $Vq,
6858 120: $Vr,
6859 121: $Vs
6860 }, {
6861 6: 10,
6862 7: 11,
6863 8: $V5,
6864 9: $V6,
6865 10: $V7,
6866 11: $V8,
6867 13: $V9,
6868 18: $Va,
6869 23: 16,
6870 25: 17,
6871 26: 18,
6872 27: 19,
6873 28: 20,
6874 29: 21,
6875 30: $Vb,
6876 31: 29,
6877 35: [1, 271],
6878 37: 23,
6879 49: 30,
6880 50: 32,
6881 51: $Vc,
6882 93: $Vd,
6883 94: $Ve,
6884 95: $Vf,
6885 96: $Vg,
6886 97: $Vh,
6887 107: $Vi,
6888 108: $Vj,
6889 111: $Vk,
6890 112: $Vl,
6891 114: $Vm,
6892 115: $Vn,
6893 117: $Vo,
6894 118: $Vp,
6895 119: $Vq,
6896 120: $Vr,
6897 121: $Vs
6898 }, o([10, 13, 18, 51, 107, 108, 111, 112, 114, 115, 117, 118, 119, 120, 121], [2, 119]), o($Vx, [2, 145], {
6899 108: $Vc1
6900 }), o($Vd1, [2, 156], {
6901 110: 273,
6902 10: $V11,
6903 51: $V21,
6904 93: $V31,
6905 102: $V41,
6906 106: $V51,
6907 107: $V61,
6908 111: $V71,
6909 112: $V81,
6910 113: $V91,
6911 114: $Va1,
6912 115: $Vb1
6913 }), o($Ve1, [2, 158]), o($Ve1, [2, 160]), o($Ve1, [2, 161]), o($Ve1, [2, 162]), o($Ve1, [2, 163]), o($Ve1, [2, 164]), o($Ve1, [2, 165]), o($Ve1, [2, 166]), o($Ve1, [2, 167]), o($Ve1, [2, 168]), o($Ve1, [2, 169]), o($Ve1, [2, 170]), o($Vx, [2, 146], {
6914 108: $Vc1
6915 }), o($Vx, [2, 147], {
6916 108: $Vc1
6917 }), {
6918 10: [1, 274]
6919 }, o($Vx, [2, 148], {
6920 108: $Vc1
6921 }), {
6922 10: [1, 275]
6923 }, o($V01, [2, 155]), o($Vx, [2, 138], {
6924 108: $Vc1
6925 }), o($Vx, [2, 139], {
6926 108: $Vc1
6927 }), o($Vx, [2, 140], {
6928 50: 32,
6929 49: 110,
6930 13: $V9,
6931 18: $Va,
6932 51: $Vc,
6933 107: $Vi,
6934 108: $Vj,
6935 111: $Vk,
6936 112: $Vl,
6937 114: $Vm,
6938 115: $Vn,
6939 117: $Vo,
6940 118: $Vp,
6941 119: $Vq,
6942 120: $Vr,
6943 121: $Vs
6944 }), o($Vx, [2, 141], {
6945 50: 32,
6946 49: 110,
6947 10: [1, 276],
6948 13: $V9,
6949 18: $Va,
6950 51: $Vc,
6951 107: $Vi,
6952 108: $Vj,
6953 111: $Vk,
6954 112: $Vl,
6955 114: $Vm,
6956 115: $Vn,
6957 117: $Vo,
6958 118: $Vp,
6959 119: $Vq,
6960 120: $Vr,
6961 121: $Vs
6962 }), o($Vx, [2, 143], {
6963 10: [1, 277]
6964 }), o($Vy, [2, 46]), {
6965 40: [1, 278]
6966 }, o($Vy, [2, 52]), o($Vy, [2, 50]), o($Vy, [2, 54]), o($Vy, [2, 56]), o($Vy, [2, 58]), o($Vy, [2, 62]), o($Vy, [2, 60]), o($Vy, [2, 64]), {
6967 8: $Vu,
6968 9: $Vv,
6969 11: $Vw,
6970 24: 279
6971 }, o($Vt, [2, 38]), o($Vt, [2, 37]), {
6972 10: $V11,
6973 51: $V21,
6974 93: $V31,
6975 102: $V41,
6976 106: $V51,
6977 107: $V61,
6978 109: 280,
6979 110: 236,
6980 111: $V71,
6981 112: $V81,
6982 113: $V91,
6983 114: $Va1,
6984 115: $Vb1
6985 }, o($Ve1, [2, 159]), {
6986 13: $V9,
6987 18: $Va,
6988 31: 281,
6989 49: 30,
6990 50: 32,
6991 51: $Vc,
6992 107: $Vi,
6993 108: $Vj,
6994 111: $Vk,
6995 112: $Vl,
6996 114: $Vm,
6997 115: $Vn,
6998 117: $Vo,
6999 118: $Vp,
7000 119: $Vq,
7001 120: $Vr,
7002 121: $Vs
7003 }, {
7004 13: $V9,
7005 18: $Va,
7006 31: 282,
7007 49: 30,
7008 50: 32,
7009 51: $Vc,
7010 107: $Vi,
7011 108: $Vj,
7012 111: $Vk,
7013 112: $Vl,
7014 114: $Vm,
7015 115: $Vn,
7016 117: $Vo,
7017 118: $Vp,
7018 119: $Vq,
7019 120: $Vr,
7020 121: $Vs
7021 }, {
7022 36: [1, 283]
7023 }, {
7024 36: [1, 284]
7025 }, o($Vy, [2, 47], {
7026 21: 285,
7027 10: $Vz
7028 }), o($VE, $V4, {
7029 5: 286
7030 }), o($Vd1, [2, 157], {
7031 110: 273,
7032 10: $V11,
7033 51: $V21,
7034 93: $V31,
7035 102: $V41,
7036 106: $V51,
7037 107: $V61,
7038 111: $V71,
7039 112: $V81,
7040 113: $V91,
7041 114: $Va1,
7042 115: $Vb1
7043 }), o($Vx, [2, 151], {
7044 50: 32,
7045 49: 110,
7046 10: [1, 287],
7047 13: $V9,
7048 18: $Va,
7049 51: $Vc,
7050 107: $Vi,
7051 108: $Vj,
7052 111: $Vk,
7053 112: $Vl,
7054 114: $Vm,
7055 115: $Vn,
7056 117: $Vo,
7057 118: $Vp,
7058 119: $Vq,
7059 120: $Vr,
7060 121: $Vs
7061 }), o($Vx, [2, 152], {
7062 50: 32,
7063 49: 110,
7064 10: [1, 288],
7065 13: $V9,
7066 18: $Va,
7067 51: $Vc,
7068 107: $Vi,
7069 108: $Vj,
7070 111: $Vk,
7071 112: $Vl,
7072 114: $Vm,
7073 115: $Vn,
7074 117: $Vo,
7075 118: $Vp,
7076 119: $Vq,
7077 120: $Vr,
7078 121: $Vs
7079 }), o($Vx, [2, 142]), o($Vx, [2, 144]), o($Vy, [2, 48]), {
7080 6: 10,
7081 7: 11,
7082 8: $V5,
7083 9: $V6,
7084 10: $V7,
7085 11: $V8,
7086 13: $V9,
7087 18: $Va,
7088 23: 16,
7089 25: 17,
7090 26: 18,
7091 27: 19,
7092 28: 20,
7093 29: 21,
7094 30: $Vb,
7095 31: 29,
7096 35: [1, 289],
7097 37: 23,
7098 49: 30,
7099 50: 32,
7100 51: $Vc,
7101 93: $Vd,
7102 94: $Ve,
7103 95: $Vf,
7104 96: $Vg,
7105 97: $Vh,
7106 107: $Vi,
7107 108: $Vj,
7108 111: $Vk,
7109 112: $Vl,
7110 114: $Vm,
7111 115: $Vn,
7112 117: $Vo,
7113 118: $Vp,
7114 119: $Vq,
7115 120: $Vr,
7116 121: $Vs
7117 }, {
7118 10: $V11,
7119 51: $V21,
7120 93: $V31,
7121 101: 290,
7122 102: $V41,
7123 106: $V51,
7124 107: $V61,
7125 109: 235,
7126 110: 236,
7127 111: $V71,
7128 112: $V81,
7129 113: $V91,
7130 114: $Va1,
7131 115: $Vb1
7132 }, {
7133 10: $V11,
7134 51: $V21,
7135 93: $V31,
7136 101: 291,
7137 102: $V41,
7138 106: $V51,
7139 107: $V61,
7140 109: 235,
7141 110: 236,
7142 111: $V71,
7143 112: $V81,
7144 113: $V91,
7145 114: $Va1,
7146 115: $Vb1
7147 }, o($Vt, [2, 36]), o($Vx, [2, 149], {
7148 108: $Vc1
7149 }), o($Vx, [2, 150], {
7150 108: $Vc1
7151 })],
7152 defaultActions: {},
7153 parseError: function parseError(str, hash) {
7154 if (hash.recoverable) {
7155 this.trace(str);
7156 } else {
7157 var error = new Error(str);
7158 error.hash = hash;
7159 throw error;
7160 }
7161 },
7162 parse: function parse(input) {
7163 var self = this,
7164 stack = [0],
7165 tstack = [],
7166 vstack = [null],
7167 lstack = [],
7168 table = this.table,
7169 yytext = '',
7170 yylineno = 0,
7171 yyleng = 0,
7172 recovering = 0,
7173 TERROR = 2,
7174 EOF = 1;
7175 var args = lstack.slice.call(arguments, 1);
7176 var lexer = Object.create(this.lexer);
7177 var sharedState = {
7178 yy: {}
7179 };
7180
7181 for (var k in this.yy) {
7182 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
7183 sharedState.yy[k] = this.yy[k];
7184 }
7185 }
7186
7187 lexer.setInput(input, sharedState.yy);
7188 sharedState.yy.lexer = lexer;
7189 sharedState.yy.parser = this;
7190
7191 if (typeof lexer.yylloc == 'undefined') {
7192 lexer.yylloc = {};
7193 }
7194
7195 var yyloc = lexer.yylloc;
7196 lstack.push(yyloc);
7197 var ranges = lexer.options && lexer.options.ranges;
7198
7199 if (typeof sharedState.yy.parseError === 'function') {
7200 this.parseError = sharedState.yy.parseError;
7201 } else {
7202 this.parseError = Object.getPrototypeOf(this).parseError;
7203 }
7204
7205 function popStack(n) {
7206 stack.length = stack.length - 2 * n;
7207 vstack.length = vstack.length - n;
7208 lstack.length = lstack.length - n;
7209 }
7210
7211 function lex() {
7212 var token;
7213 token = tstack.pop() || lexer.lex() || EOF;
7214
7215 if (typeof token !== 'number') {
7216 if (token instanceof Array) {
7217 tstack = token;
7218 token = tstack.pop();
7219 }
7220
7221 token = self.symbols_[token] || token;
7222 }
7223
7224 return token;
7225 }
7226
7227 var symbol,
7228 preErrorSymbol,
7229 state,
7230 action,
7231 a,
7232 r,
7233 yyval = {},
7234 p,
7235 len,
7236 newState,
7237 expected;
7238
7239 while (true) {
7240 state = stack[stack.length - 1];
7241
7242 if (this.defaultActions[state]) {
7243 action = this.defaultActions[state];
7244 } else {
7245 if (symbol === null || typeof symbol == 'undefined') {
7246 symbol = lex();
7247 }
7248
7249 action = table[state] && table[state][symbol];
7250 }
7251
7252 if (typeof action === 'undefined' || !action.length || !action[0]) {
7253 var errStr = '';
7254 expected = [];
7255
7256 for (p in table[state]) {
7257 if (this.terminals_[p] && p > TERROR) {
7258 expected.push('\'' + this.terminals_[p] + '\'');
7259 }
7260 }
7261
7262 if (lexer.showPosition) {
7263 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
7264 } else {
7265 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
7266 }
7267
7268 this.parseError(errStr, {
7269 text: lexer.match,
7270 token: this.terminals_[symbol] || symbol,
7271 line: lexer.yylineno,
7272 loc: yyloc,
7273 expected: expected
7274 });
7275 }
7276
7277 if (action[0] instanceof Array && action.length > 1) {
7278 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
7279 }
7280
7281 switch (action[0]) {
7282 case 1:
7283 stack.push(symbol);
7284 vstack.push(lexer.yytext);
7285 lstack.push(lexer.yylloc);
7286 stack.push(action[1]);
7287 symbol = null;
7288
7289 if (!preErrorSymbol) {
7290 yyleng = lexer.yyleng;
7291 yytext = lexer.yytext;
7292 yylineno = lexer.yylineno;
7293 yyloc = lexer.yylloc;
7294
7295 if (recovering > 0) {
7296 recovering--;
7297 }
7298 } else {
7299 symbol = preErrorSymbol;
7300 preErrorSymbol = null;
7301 }
7302
7303 break;
7304
7305 case 2:
7306 len = this.productions_[action[1]][1];
7307 yyval.$ = vstack[vstack.length - len];
7308 yyval._$ = {
7309 first_line: lstack[lstack.length - (len || 1)].first_line,
7310 last_line: lstack[lstack.length - 1].last_line,
7311 first_column: lstack[lstack.length - (len || 1)].first_column,
7312 last_column: lstack[lstack.length - 1].last_column
7313 };
7314
7315 if (ranges) {
7316 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
7317 }
7318
7319 r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
7320
7321 if (typeof r !== 'undefined') {
7322 return r;
7323 }
7324
7325 if (len) {
7326 stack = stack.slice(0, -1 * len * 2);
7327 vstack = vstack.slice(0, -1 * len);
7328 lstack = lstack.slice(0, -1 * len);
7329 }
7330
7331 stack.push(this.productions_[action[1]][0]);
7332 vstack.push(yyval.$);
7333 lstack.push(yyval._$);
7334 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
7335 stack.push(newState);
7336 break;
7337
7338 case 3:
7339 return true;
7340 }
7341 }
7342
7343 return true;
7344 }
7345 };
7346 /* generated by jison-lex 0.3.4 */
7347
7348 var lexer = function () {
7349 var lexer = {
7350 EOF: 1,
7351 parseError: function parseError(str, hash) {
7352 if (this.yy.parser) {
7353 this.yy.parser.parseError(str, hash);
7354 } else {
7355 throw new Error(str);
7356 }
7357 },
7358 // resets the lexer, sets new input
7359 setInput: function (input, yy) {
7360 this.yy = yy || this.yy || {};
7361 this._input = input;
7362 this._more = this._backtrack = this.done = false;
7363 this.yylineno = this.yyleng = 0;
7364 this.yytext = this.matched = this.match = '';
7365 this.conditionStack = ['INITIAL'];
7366 this.yylloc = {
7367 first_line: 1,
7368 first_column: 0,
7369 last_line: 1,
7370 last_column: 0
7371 };
7372
7373 if (this.options.ranges) {
7374 this.yylloc.range = [0, 0];
7375 }
7376
7377 this.offset = 0;
7378 return this;
7379 },
7380 // consumes and returns one char from the input
7381 input: function () {
7382 var ch = this._input[0];
7383 this.yytext += ch;
7384 this.yyleng++;
7385 this.offset++;
7386 this.match += ch;
7387 this.matched += ch;
7388 var lines = ch.match(/(?:\r\n?|\n).*/g);
7389
7390 if (lines) {
7391 this.yylineno++;
7392 this.yylloc.last_line++;
7393 } else {
7394 this.yylloc.last_column++;
7395 }
7396
7397 if (this.options.ranges) {
7398 this.yylloc.range[1]++;
7399 }
7400
7401 this._input = this._input.slice(1);
7402 return ch;
7403 },
7404 // unshifts one char (or a string) into the input
7405 unput: function (ch) {
7406 var len = ch.length;
7407 var lines = ch.split(/(?:\r\n?|\n)/g);
7408 this._input = ch + this._input;
7409 this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;
7410
7411 this.offset -= len;
7412 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
7413 this.match = this.match.substr(0, this.match.length - 1);
7414 this.matched = this.matched.substr(0, this.matched.length - 1);
7415
7416 if (lines.length - 1) {
7417 this.yylineno -= lines.length - 1;
7418 }
7419
7420 var r = this.yylloc.range;
7421 this.yylloc = {
7422 first_line: this.yylloc.first_line,
7423 last_line: this.yylineno + 1,
7424 first_column: this.yylloc.first_column,
7425 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
7426 };
7427
7428 if (this.options.ranges) {
7429 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
7430 }
7431
7432 this.yyleng = this.yytext.length;
7433 return this;
7434 },
7435 // When called from action, caches matched text and appends it on next action
7436 more: function () {
7437 this._more = true;
7438 return this;
7439 },
7440 // 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.
7441 reject: function () {
7442 if (this.options.backtrack_lexer) {
7443 this._backtrack = true;
7444 } else {
7445 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(), {
7446 text: "",
7447 token: null,
7448 line: this.yylineno
7449 });
7450 }
7451
7452 return this;
7453 },
7454 // retain first n characters of the match
7455 less: function (n) {
7456 this.unput(this.match.slice(n));
7457 },
7458 // displays already matched input, i.e. for error messages
7459 pastInput: function () {
7460 var past = this.matched.substr(0, this.matched.length - this.match.length);
7461 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
7462 },
7463 // displays upcoming input, i.e. for error messages
7464 upcomingInput: function () {
7465 var next = this.match;
7466
7467 if (next.length < 20) {
7468 next += this._input.substr(0, 20 - next.length);
7469 }
7470
7471 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
7472 },
7473 // displays the character position where the lexing error occurred, i.e. for error messages
7474 showPosition: function () {
7475 var pre = this.pastInput();
7476 var c = new Array(pre.length + 1).join("-");
7477 return pre + this.upcomingInput() + "\n" + c + "^";
7478 },
7479 // test the lexed token: return FALSE when not a match, otherwise return token
7480 test_match: function (match, indexed_rule) {
7481 var token, lines, backup;
7482
7483 if (this.options.backtrack_lexer) {
7484 // save context
7485 backup = {
7486 yylineno: this.yylineno,
7487 yylloc: {
7488 first_line: this.yylloc.first_line,
7489 last_line: this.last_line,
7490 first_column: this.yylloc.first_column,
7491 last_column: this.yylloc.last_column
7492 },
7493 yytext: this.yytext,
7494 match: this.match,
7495 matches: this.matches,
7496 matched: this.matched,
7497 yyleng: this.yyleng,
7498 offset: this.offset,
7499 _more: this._more,
7500 _input: this._input,
7501 yy: this.yy,
7502 conditionStack: this.conditionStack.slice(0),
7503 done: this.done
7504 };
7505
7506 if (this.options.ranges) {
7507 backup.yylloc.range = this.yylloc.range.slice(0);
7508 }
7509 }
7510
7511 lines = match[0].match(/(?:\r\n?|\n).*/g);
7512
7513 if (lines) {
7514 this.yylineno += lines.length;
7515 }
7516
7517 this.yylloc = {
7518 first_line: this.yylloc.last_line,
7519 last_line: this.yylineno + 1,
7520 first_column: this.yylloc.last_column,
7521 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
7522 };
7523 this.yytext += match[0];
7524 this.match += match[0];
7525 this.matches = match;
7526 this.yyleng = this.yytext.length;
7527
7528 if (this.options.ranges) {
7529 this.yylloc.range = [this.offset, this.offset += this.yyleng];
7530 }
7531
7532 this._more = false;
7533 this._backtrack = false;
7534 this._input = this._input.slice(match[0].length);
7535 this.matched += match[0];
7536 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
7537
7538 if (this.done && this._input) {
7539 this.done = false;
7540 }
7541
7542 if (token) {
7543 return token;
7544 } else if (this._backtrack) {
7545 // recover context
7546 for (var k in backup) {
7547 this[k] = backup[k];
7548 }
7549
7550 return false; // rule action called reject() implying the next rule should be tested instead.
7551 }
7552
7553 return false;
7554 },
7555 // return next match in input
7556 next: function () {
7557 if (this.done) {
7558 return this.EOF;
7559 }
7560
7561 if (!this._input) {
7562 this.done = true;
7563 }
7564
7565 var token, match, tempMatch, index;
7566
7567 if (!this._more) {
7568 this.yytext = '';
7569 this.match = '';
7570 }
7571
7572 var rules = this._currentRules();
7573
7574 for (var i = 0; i < rules.length; i++) {
7575 tempMatch = this._input.match(this.rules[rules[i]]);
7576
7577 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
7578 match = tempMatch;
7579 index = i;
7580
7581 if (this.options.backtrack_lexer) {
7582 token = this.test_match(tempMatch, rules[i]);
7583
7584 if (token !== false) {
7585 return token;
7586 } else if (this._backtrack) {
7587 match = false;
7588 continue; // rule action called reject() implying a rule MISmatch.
7589 } else {
7590 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
7591 return false;
7592 }
7593 } else if (!this.options.flex) {
7594 break;
7595 }
7596 }
7597 }
7598
7599 if (match) {
7600 token = this.test_match(match, rules[index]);
7601
7602 if (token !== false) {
7603 return token;
7604 } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
7605
7606
7607 return false;
7608 }
7609
7610 if (this._input === "") {
7611 return this.EOF;
7612 } else {
7613 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
7614 text: "",
7615 token: null,
7616 line: this.yylineno
7617 });
7618 }
7619 },
7620 // return next match that has a token
7621 lex: function lex() {
7622 var r = this.next();
7623
7624 if (r) {
7625 return r;
7626 } else {
7627 return this.lex();
7628 }
7629 },
7630 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
7631 begin: function begin(condition) {
7632 this.conditionStack.push(condition);
7633 },
7634 // pop the previously active lexer condition state off the condition stack
7635 popState: function popState() {
7636 var n = this.conditionStack.length - 1;
7637
7638 if (n > 0) {
7639 return this.conditionStack.pop();
7640 } else {
7641 return this.conditionStack[0];
7642 }
7643 },
7644 // produce the lexer rule set which is active for the currently active lexer condition state
7645 _currentRules: function _currentRules() {
7646 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
7647 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
7648 } else {
7649 return this.conditions["INITIAL"].rules;
7650 }
7651 },
7652 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
7653 topState: function topState(n) {
7654 n = this.conditionStack.length - 1 - Math.abs(n || 0);
7655
7656 if (n >= 0) {
7657 return this.conditionStack[n];
7658 } else {
7659 return "INITIAL";
7660 }
7661 },
7662 // alias for begin(condition)
7663 pushState: function pushState(condition) {
7664 this.begin(condition);
7665 },
7666 // return the number of states currently on the stack
7667 stateStackSize: function stateStackSize() {
7668 return this.conditionStack.length;
7669 },
7670 options: {},
7671 performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
7672 var YYSTATE = YY_START;
7673
7674 switch ($avoiding_name_collisions) {
7675 case 0:
7676 /* do nothing */
7677 break;
7678
7679 case 1:
7680 this.begin("string");
7681 break;
7682
7683 case 2:
7684 this.popState();
7685 break;
7686
7687 case 3:
7688 return "STR";
7689 break;
7690
7691 case 4:
7692 return 93;
7693 break;
7694
7695 case 5:
7696 return 100;
7697 break;
7698
7699 case 6:
7700 return 94;
7701 break;
7702
7703 case 7:
7704 return 104;
7705 break;
7706
7707 case 8:
7708 return 95;
7709 break;
7710
7711 case 9:
7712 return 96;
7713 break;
7714
7715 case 10:
7716 return 97;
7717 break;
7718
7719 case 11:
7720 return 12;
7721 break;
7722
7723 case 12:
7724 return 30;
7725 break;
7726
7727 case 13:
7728 return 35;
7729 break;
7730
7731 case 14:
7732 return 13;
7733 break;
7734
7735 case 15:
7736 return 13;
7737 break;
7738
7739 case 16:
7740 return 13;
7741 break;
7742
7743 case 17:
7744 return 13;
7745 break;
7746
7747 case 18:
7748 return 13;
7749 break;
7750
7751 case 19:
7752 return 13;
7753 break;
7754
7755 case 20:
7756 return 107;
7757 break;
7758
7759 case 21:
7760 return 114;
7761 break;
7762
7763 case 22:
7764 return 112;
7765 break;
7766
7767 case 23:
7768 return 8;
7769 break;
7770
7771 case 24:
7772 return 108;
7773 break;
7774
7775 case 25:
7776 return 121;
7777 break;
7778
7779 case 26:
7780 return 60;
7781 break;
7782
7783 case 27:
7784 return 56;
7785 break;
7786
7787 case 28:
7788 return 79;
7789 break;
7790
7791 case 29:
7792 return 81;
7793 break;
7794
7795 case 30:
7796 return 80;
7797 break;
7798
7799 case 31:
7800 return 83;
7801 break;
7802
7803 case 32:
7804 return 85;
7805 break;
7806
7807 case 33:
7808 return 86;
7809 break;
7810
7811 case 34:
7812 return 87;
7813 break;
7814
7815 case 35:
7816 return 84;
7817 break;
7818
7819 case 36:
7820 return 84;
7821 break;
7822
7823 case 37:
7824 return 82;
7825 break;
7826
7827 case 38:
7828 return 82;
7829 break;
7830
7831 case 39:
7832 return 83;
7833 break;
7834
7835 case 40:
7836 return 58;
7837 break;
7838
7839 case 41:
7840 return 62;
7841 break;
7842
7843 case 42:
7844 return 68;
7845 break;
7846
7847 case 43:
7848 return 64;
7849 break;
7850
7851 case 44:
7852 return 66;
7853 break;
7854
7855 case 45:
7856 return 70;
7857 break;
7858
7859 case 46:
7860 return 68;
7861 break;
7862
7863 case 47:
7864 return 64;
7865 break;
7866
7867 case 48:
7868 return 66;
7869 break;
7870
7871 case 49:
7872 return 70;
7873 break;
7874
7875 case 50:
7876 return 76;
7877 break;
7878
7879 case 51:
7880 return 72;
7881 break;
7882
7883 case 52:
7884 return 74;
7885 break;
7886
7887 case 53:
7888 return 78;
7889 break;
7890
7891 case 54:
7892 return 57;
7893 break;
7894
7895 case 55:
7896 return 61;
7897 break;
7898
7899 case 56:
7900 return 59;
7901 break;
7902
7903 case 57:
7904 return 65;
7905 break;
7906
7907 case 58:
7908 return 69;
7909 break;
7910
7911 case 59:
7912 return 67;
7913 break;
7914
7915 case 60:
7916 return 73;
7917 break;
7918
7919 case 61:
7920 return 77;
7921 break;
7922
7923 case 62:
7924 return 75;
7925 break;
7926
7927 case 63:
7928 return 55;
7929 break;
7930
7931 case 64:
7932 return 63;
7933 break;
7934
7935 case 65:
7936 return 71;
7937 break;
7938
7939 case 66:
7940 return 41;
7941 break;
7942
7943 case 67:
7944 return 42;
7945 break;
7946
7947 case 68:
7948 return 51;
7949 break;
7950
7951 case 69:
7952 return 115;
7953 break;
7954
7955 case 70:
7956 return 119;
7957 break;
7958
7959 case 71:
7960 return 106;
7961 break;
7962
7963 case 72:
7964 return 120;
7965 break;
7966
7967 case 73:
7968 return 120;
7969 break;
7970
7971 case 74:
7972 return 16;
7973 break;
7974
7975 case 75:
7976 return 15;
7977 break;
7978
7979 case 76:
7980 return 17;
7981 break;
7982
7983 case 77:
7984 return 18;
7985 break;
7986
7987 case 78:
7988 return 111;
7989 break;
7990
7991 case 79:
7992 return 46;
7993 break;
7994
7995 case 80:
7996 return 45;
7997 break;
7998
7999 case 81:
8000 return 48;
8001 break;
8002
8003 case 82:
8004 return 47;
8005 break;
8006
8007 case 83:
8008 return 117;
8009 break;
8010
8011 case 84:
8012 return 118;
8013 break;
8014
8015 case 85:
8016 return 88;
8017 break;
8018
8019 case 86:
8020 return 39;
8021 break;
8022
8023 case 87:
8024 return 40;
8025 break;
8026
8027 case 88:
8028 return 32;
8029 break;
8030
8031 case 89:
8032 return 34;
8033 break;
8034
8035 case 90:
8036 return 43;
8037 break;
8038
8039 case 91:
8040 return 44;
8041 break;
8042
8043 case 92:
8044 return 122;
8045 break;
8046
8047 case 93:
8048 return 9;
8049 break;
8050
8051 case 94:
8052 return 10;
8053 break;
8054
8055 case 95:
8056 return 11;
8057 break;
8058 }
8059 },
8060 rules: [/^(?:%%[^\n]*)/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:click\b)/, /^(?:graph\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:LR\b)/, /^(?:RL\b)/, /^(?:TB\b)/, /^(?:BT\b)/, /^(?:TD\b)/, /^(?:BR\b)/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*--[x]\s*)/, /^(?:\s*-->\s*)/, /^(?:\s*<-->\s*)/, /^(?:\s*[x]--[x]\s*)/, /^(?:\s*[o]--[o]\s*)/, /^(?:\s*[o]\.-[o]\s*)/, /^(?:\s*<==>\s*)/, /^(?:\s*[o]==[o]\s*)/, /^(?:\s*[x]==[x]\s*)/, /^(?:\s*[x].-[x]\s*)/, /^(?:\s*[x]-\.-[x]\s*)/, /^(?:\s*<\.->\s*)/, /^(?:\s*<-\.->\s*)/, /^(?:\s*[o]-\.-[o]\s*)/, /^(?:\s*--[o]\s*)/, /^(?:\s*---\s*)/, /^(?:\s*-\.-[x]\s*)/, /^(?:\s*-\.->\s*)/, /^(?:\s*-\.-[o]\s*)/, /^(?:\s*-\.-\s*)/, /^(?:\s*.-[x]\s*)/, /^(?:\s*\.->\s*)/, /^(?:\s*\.-[o]\s*)/, /^(?:\s*\.-\s*)/, /^(?:\s*==[x]\s*)/, /^(?:\s*==>\s*)/, /^(?:\s*==[o]\s*)/, /^(?:\s*==[\=]\s*)/, /^(?:\s*<--\s*)/, /^(?:\s*[x]--\s*)/, /^(?:\s*[o]--\s*)/, /^(?:\s*<-\.\s*)/, /^(?:\s*[x]-\.\s*)/, /^(?:\s*[o]-\.\s*)/, /^(?:\s*<==\s*)/, /^(?:\s*[x]==\s*)/, /^(?:\s*[o]==\s*)/, /^(?:\s*--\s*)/, /^(?:\s*-\.\s*)/, /^(?:\s*==\s*)/, /^(?:\(-)/, /^(?:-\))/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?: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-\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])/, /^(?:\|)/, /^(?:\()/, /^(?:\))/, /^(?:\[)/, /^(?:\])/, /^(?:\{)/, /^(?:\})/, /^(?:")/, /^(?:\n+)/, /^(?:\s)/, /^(?:$)/],
8061 conditions: {
8062 "string": {
8063 "rules": [2, 3],
8064 "inclusive": false
8065 },
8066 "INITIAL": {
8067 "rules": [0, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 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],
8068 "inclusive": true
8069 }
8070 }
8071 };
8072 return lexer;
8073 }();
8074
8075 parser.lexer = lexer;
8076
8077 function Parser() {
8078 this.yy = {};
8079 }
8080
8081 Parser.prototype = parser;
8082 parser.Parser = Parser;
8083 return new Parser();
8084}();
8085
8086if (true) {
8087 exports.parser = parser;
8088 exports.Parser = parser.Parser;
8089
8090 exports.parse = function () {
8091 return parser.parse.apply(parser, arguments);
8092 };
8093
8094 exports.main = function commonjsMain(args) {
8095 if (!args[1]) {
8096 console.log('Usage: ' + args[0] + ' FILE');
8097 process.exit(1);
8098 }
8099
8100 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
8101
8102 return exports.parser.parse(source);
8103 };
8104
8105 if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
8106 exports.main(process.argv.slice(1));
8107 }
8108}
8109/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
8110
8111/***/ }),
8112
8113/***/ "./src/diagrams/gantt/ganttDb.js":
8114/*!***************************************!*\
8115 !*** ./src/diagrams/gantt/ganttDb.js ***!
8116 \***************************************/
8117/*! exports provided: clear, setAxisFormat, getAxisFormat, setDateFormat, enableInclusiveEndDates, endDatesAreInclusive, getDateFormat, setExcludes, getExcludes, setTitle, getTitle, addSection, getSections, getTasks, addTask, findTaskById, addTaskOrg, setLink, setClass, setClickEvent, bindFunctions, default */
8118/***/ (function(module, __webpack_exports__, __webpack_require__) {
8119
8120"use strict";
8121__webpack_require__.r(__webpack_exports__);
8122/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
8123/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAxisFormat", function() { return setAxisFormat; });
8124/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAxisFormat", function() { return getAxisFormat; });
8125/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDateFormat", function() { return setDateFormat; });
8126/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableInclusiveEndDates", function() { return enableInclusiveEndDates; });
8127/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endDatesAreInclusive", function() { return endDatesAreInclusive; });
8128/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDateFormat", function() { return getDateFormat; });
8129/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setExcludes", function() { return setExcludes; });
8130/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getExcludes", function() { return getExcludes; });
8131/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; });
8132/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; });
8133/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSection", function() { return addSection; });
8134/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSections", function() { return getSections; });
8135/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTasks", function() { return getTasks; });
8136/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTask", function() { return addTask; });
8137/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findTaskById", function() { return findTaskById; });
8138/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTaskOrg", function() { return addTaskOrg; });
8139/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; });
8140/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClass", function() { return setClass; });
8141/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; });
8142/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; });
8143/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-mini */ "moment-mini");
8144/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);
8145/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @braintree/sanitize-url */ "@braintree/sanitize-url");
8146/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__);
8147/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
8148/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config */ "./src/config.js");
8149
8150
8151
8152
8153const config = Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])();
8154let dateFormat = '';
8155let axisFormat = '';
8156let excludes = [];
8157let title = '';
8158let sections = [];
8159let tasks = [];
8160let currentSection = '';
8161const tags = ['active', 'done', 'crit', 'milestone'];
8162let funs = [];
8163let inclusiveEndDates = false;
8164const clear = function () {
8165 sections = [];
8166 tasks = [];
8167 currentSection = '';
8168 funs = [];
8169 title = '';
8170 taskCnt = 0;
8171 lastTask = undefined;
8172 lastTaskID = undefined;
8173 rawTasks = [];
8174 dateFormat = '';
8175 axisFormat = '';
8176 excludes = [];
8177 inclusiveEndDates = false;
8178};
8179const setAxisFormat = function (txt) {
8180 axisFormat = txt;
8181};
8182const getAxisFormat = function () {
8183 return axisFormat;
8184};
8185const setDateFormat = function (txt) {
8186 dateFormat = txt;
8187};
8188const enableInclusiveEndDates = function () {
8189 inclusiveEndDates = true;
8190};
8191const endDatesAreInclusive = function () {
8192 return inclusiveEndDates;
8193};
8194const getDateFormat = function () {
8195 return dateFormat;
8196};
8197const setExcludes = function (txt) {
8198 excludes = txt.toLowerCase().split(/[\s,]+/);
8199};
8200const getExcludes = function () {
8201 return excludes;
8202};
8203const setTitle = function (txt) {
8204 title = txt;
8205};
8206const getTitle = function () {
8207 return title;
8208};
8209const addSection = function (txt) {
8210 currentSection = txt;
8211 sections.push(txt);
8212};
8213const getSections = function () {
8214 return sections;
8215};
8216const getTasks = function () {
8217 let allItemsPricessed = compileTasks();
8218 const maxDepth = 10;
8219 let iterationCount = 0;
8220
8221 while (!allItemsPricessed && iterationCount < maxDepth) {
8222 allItemsPricessed = compileTasks();
8223 iterationCount++;
8224 }
8225
8226 tasks = rawTasks;
8227 return tasks;
8228};
8229
8230const isInvalidDate = function (date, dateFormat, excludes) {
8231 if (date.isoWeekday() >= 6 && excludes.indexOf('weekends') >= 0) {
8232 return true;
8233 }
8234
8235 if (excludes.indexOf(date.format('dddd').toLowerCase()) >= 0) {
8236 return true;
8237 }
8238
8239 return excludes.indexOf(date.format(dateFormat.trim())) >= 0;
8240};
8241
8242const checkTaskDates = function (task, dateFormat, excludes) {
8243 if (!excludes.length || task.manualEndTime) return;
8244 let startTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.startTime, dateFormat, true);
8245 startTime.add(1, 'd');
8246 let endTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.endTime, dateFormat, true);
8247 let renderEndTime = fixTaskDates(startTime, endTime, dateFormat, excludes);
8248 task.endTime = endTime.toDate();
8249 task.renderEndTime = renderEndTime;
8250};
8251
8252const fixTaskDates = function (startTime, endTime, dateFormat, excludes) {
8253 let invalid = false;
8254 let renderEndTime = null;
8255
8256 while (startTime.date() <= endTime.date()) {
8257 if (!invalid) {
8258 renderEndTime = endTime.toDate();
8259 }
8260
8261 invalid = isInvalidDate(startTime, dateFormat, excludes);
8262
8263 if (invalid) {
8264 endTime.add(1, 'd');
8265 }
8266
8267 startTime.add(1, 'd');
8268 }
8269
8270 return renderEndTime;
8271};
8272
8273const getStartDate = function (prevTime, dateFormat, str) {
8274 str = str.trim(); // Test for after
8275
8276 const re = /^after\s+([\d\w-]+)/;
8277 const afterStatement = re.exec(str.trim());
8278
8279 if (afterStatement !== null) {
8280 const task = findTaskById(afterStatement[1]);
8281
8282 if (typeof task === 'undefined') {
8283 const dt = new Date();
8284 dt.setHours(0, 0, 0, 0);
8285 return dt;
8286 }
8287
8288 return task.endTime;
8289 } // Check for actual date set
8290
8291
8292 let mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);
8293
8294 if (mDate.isValid()) {
8295 return mDate.toDate();
8296 } else {
8297 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Invalid date:' + str);
8298 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('With date format:' + dateFormat.trim());
8299 } // Default date - now
8300
8301
8302 return new Date();
8303};
8304
8305const durationToDate = function (durationStatement, relativeTime) {
8306 if (durationStatement !== null) {
8307 switch (durationStatement[2]) {
8308 case 's':
8309 relativeTime.add(durationStatement[1], 'seconds');
8310 break;
8311
8312 case 'm':
8313 relativeTime.add(durationStatement[1], 'minutes');
8314 break;
8315
8316 case 'h':
8317 relativeTime.add(durationStatement[1], 'hours');
8318 break;
8319
8320 case 'd':
8321 relativeTime.add(durationStatement[1], 'days');
8322 break;
8323
8324 case 'w':
8325 relativeTime.add(durationStatement[1], 'weeks');
8326 break;
8327 }
8328 } // Default date - now
8329
8330
8331 return relativeTime.toDate();
8332};
8333
8334const getEndDate = function (prevTime, dateFormat, str, inclusive) {
8335 inclusive = inclusive || false;
8336 str = str.trim(); // Check for actual date
8337
8338 let mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);
8339
8340 if (mDate.isValid()) {
8341 if (inclusive) {
8342 mDate.add(1, 'd');
8343 }
8344
8345 return mDate.toDate();
8346 }
8347
8348 return durationToDate(/^([\d]+)([wdhms])/.exec(str.trim()), moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(prevTime));
8349};
8350
8351let taskCnt = 0;
8352
8353const parseId = function (idStr) {
8354 if (typeof idStr === 'undefined') {
8355 taskCnt = taskCnt + 1;
8356 return 'task' + taskCnt;
8357 }
8358
8359 return idStr;
8360}; // id, startDate, endDate
8361// id, startDate, length
8362// id, after x, endDate
8363// id, after x, length
8364// startDate, endDate
8365// startDate, length
8366// after x, endDate
8367// after x, length
8368// endDate
8369// length
8370
8371
8372const compileData = function (prevTask, dataStr) {
8373 let ds;
8374
8375 if (dataStr.substr(0, 1) === ':') {
8376 ds = dataStr.substr(1, dataStr.length);
8377 } else {
8378 ds = dataStr;
8379 }
8380
8381 const data = ds.split(',');
8382 const task = {}; // Get tags like active, done, crit and milestone
8383
8384 getTaskTags(data, task, tags);
8385
8386 for (let i = 0; i < data.length; i++) {
8387 data[i] = data[i].trim();
8388 }
8389
8390 let endTimeData = '';
8391
8392 switch (data.length) {
8393 case 1:
8394 task.id = parseId();
8395 task.startTime = prevTask.endTime;
8396 endTimeData = data[0];
8397 break;
8398
8399 case 2:
8400 task.id = parseId();
8401 task.startTime = getStartDate(undefined, dateFormat, data[0]);
8402 endTimeData = data[1];
8403 break;
8404
8405 case 3:
8406 task.id = parseId(data[0]);
8407 task.startTime = getStartDate(undefined, dateFormat, data[1]);
8408 endTimeData = data[2];
8409 break;
8410
8411 default:
8412 }
8413
8414 if (endTimeData) {
8415 task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);
8416 task.manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(endTimeData, 'YYYY-MM-DD', true).isValid();
8417 checkTaskDates(task, dateFormat, excludes);
8418 }
8419
8420 return task;
8421};
8422
8423const parseData = function (prevTaskId, dataStr) {
8424 let ds;
8425
8426 if (dataStr.substr(0, 1) === ':') {
8427 ds = dataStr.substr(1, dataStr.length);
8428 } else {
8429 ds = dataStr;
8430 }
8431
8432 const data = ds.split(',');
8433 const task = {}; // Get tags like active, done, crit and milestone
8434
8435 getTaskTags(data, task, tags);
8436
8437 for (let i = 0; i < data.length; i++) {
8438 data[i] = data[i].trim();
8439 }
8440
8441 switch (data.length) {
8442 case 1:
8443 task.id = parseId();
8444 task.startTime = {
8445 type: 'prevTaskEnd',
8446 id: prevTaskId
8447 };
8448 task.endTime = {
8449 data: data[0]
8450 };
8451 break;
8452
8453 case 2:
8454 task.id = parseId();
8455 task.startTime = {
8456 type: 'getStartDate',
8457 startData: data[0]
8458 };
8459 task.endTime = {
8460 data: data[1]
8461 };
8462 break;
8463
8464 case 3:
8465 task.id = parseId(data[0]);
8466 task.startTime = {
8467 type: 'getStartDate',
8468 startData: data[1]
8469 };
8470 task.endTime = {
8471 data: data[2]
8472 };
8473 break;
8474
8475 default:
8476 }
8477
8478 return task;
8479};
8480
8481let lastTask;
8482let lastTaskID;
8483let rawTasks = [];
8484const taskDb = {};
8485const addTask = function (descr, data) {
8486 const rawTask = {
8487 section: currentSection,
8488 type: currentSection,
8489 processed: false,
8490 manualEndTime: false,
8491 renderEndTime: null,
8492 raw: {
8493 data: data
8494 },
8495 task: descr,
8496 classes: []
8497 };
8498 const taskInfo = parseData(lastTaskID, data);
8499 rawTask.raw.startTime = taskInfo.startTime;
8500 rawTask.raw.endTime = taskInfo.endTime;
8501 rawTask.id = taskInfo.id;
8502 rawTask.prevTaskId = lastTaskID;
8503 rawTask.active = taskInfo.active;
8504 rawTask.done = taskInfo.done;
8505 rawTask.crit = taskInfo.crit;
8506 rawTask.milestone = taskInfo.milestone;
8507 const pos = rawTasks.push(rawTask);
8508 lastTaskID = rawTask.id; // Store cross ref
8509
8510 taskDb[rawTask.id] = pos - 1;
8511};
8512const findTaskById = function (id) {
8513 const pos = taskDb[id];
8514 return rawTasks[pos];
8515};
8516const addTaskOrg = function (descr, data) {
8517 const newTask = {
8518 section: currentSection,
8519 type: currentSection,
8520 description: descr,
8521 task: descr,
8522 classes: []
8523 };
8524 const taskInfo = compileData(lastTask, data);
8525 newTask.startTime = taskInfo.startTime;
8526 newTask.endTime = taskInfo.endTime;
8527 newTask.id = taskInfo.id;
8528 newTask.active = taskInfo.active;
8529 newTask.done = taskInfo.done;
8530 newTask.crit = taskInfo.crit;
8531 newTask.milestone = taskInfo.milestone;
8532 lastTask = newTask;
8533 tasks.push(newTask);
8534};
8535
8536const compileTasks = function () {
8537 const compileTask = function (pos) {
8538 const task = rawTasks[pos];
8539 let startTime = '';
8540
8541 switch (rawTasks[pos].raw.startTime.type) {
8542 case 'prevTaskEnd':
8543 const prevTask = findTaskById(task.prevTaskId);
8544 task.startTime = prevTask.endTime;
8545 break;
8546
8547 case 'getStartDate':
8548 startTime = getStartDate(undefined, dateFormat, rawTasks[pos].raw.startTime.startData);
8549
8550 if (startTime) {
8551 rawTasks[pos].startTime = startTime;
8552 }
8553
8554 break;
8555 }
8556
8557 if (rawTasks[pos].startTime) {
8558 rawTasks[pos].endTime = getEndDate(rawTasks[pos].startTime, dateFormat, rawTasks[pos].raw.endTime.data, inclusiveEndDates);
8559
8560 if (rawTasks[pos].endTime) {
8561 rawTasks[pos].processed = true;
8562 rawTasks[pos].manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(rawTasks[pos].raw.endTime.data, 'YYYY-MM-DD', true).isValid();
8563 checkTaskDates(rawTasks[pos], dateFormat, excludes);
8564 }
8565 }
8566
8567 return rawTasks[pos].processed;
8568 };
8569
8570 let allProcessed = true;
8571
8572 for (let i = 0; i < rawTasks.length; i++) {
8573 compileTask(i);
8574 allProcessed = allProcessed && rawTasks[i].processed;
8575 }
8576
8577 return allProcessed;
8578};
8579/**
8580 * Called by parser when a link is found. Adds the URL to the vertex data.
8581 * @param ids Comma separated list of ids
8582 * @param linkStr URL to create a link for
8583 */
8584
8585
8586const setLink = function (ids, _linkStr) {
8587 let linkStr = _linkStr;
8588
8589 if (config.securityLevel === 'strict') {
8590 linkStr = Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__["sanitizeUrl"])(_linkStr);
8591 }
8592
8593 ids.split(',').forEach(function (id) {
8594 let rawTask = findTaskById(id);
8595
8596 if (typeof rawTask !== 'undefined') {
8597 pushFun(id, () => {
8598 window.open(linkStr, '_self');
8599 });
8600 }
8601 });
8602 setClass(ids, 'clickable');
8603};
8604/**
8605 * Called by parser when a special node is found, e.g. a clickable element.
8606 * @param ids Comma separated list of ids
8607 * @param className Class to add
8608 */
8609
8610const setClass = function (ids, className) {
8611 ids.split(',').forEach(function (id) {
8612 let rawTask = findTaskById(id);
8613
8614 if (typeof rawTask !== 'undefined') {
8615 rawTask.classes.push(className);
8616 }
8617 });
8618};
8619
8620const setClickFun = function (id, functionName, functionArgs) {
8621 if (config.securityLevel === 'strict') {
8622 return;
8623 }
8624
8625 if (typeof functionName === 'undefined') {
8626 return;
8627 }
8628
8629 let argList = [];
8630
8631 if (typeof functionArgs === 'string') {
8632 /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */
8633 argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
8634
8635 for (let i = 0; i < argList.length; i++) {
8636 let item = argList[i].trim();
8637 /* Removes all double quotes at the start and end of an argument */
8638
8639 /* This preserves all starting and ending whitespace inside */
8640
8641 if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') {
8642 item = item.substr(1, item.length - 2);
8643 }
8644
8645 argList[i] = item;
8646 }
8647 }
8648
8649 let rawTask = findTaskById(id);
8650
8651 if (typeof rawTask !== 'undefined') {
8652 pushFun(id, () => {
8653 window[functionName](...argList);
8654 });
8655 }
8656};
8657/**
8658 * The callbackFunction is executed in a click event bound to the task with the specified id or the task's assigned text
8659 * @param id The task's id
8660 * @param callbackFunction A function to be executed when clicked on the task or the task's text
8661 */
8662
8663
8664const pushFun = function (id, callbackFunction) {
8665 funs.push(function (element) {
8666 // const elem = d3.select(element).select(`[id="${id}"]`)
8667 const elem = document.querySelector(`[id="${id}"]`);
8668
8669 if (elem !== null) {
8670 elem.addEventListener('click', function () {
8671 callbackFunction();
8672 });
8673 }
8674 });
8675 funs.push(function (element) {
8676 // const elem = d3.select(element).select(`[id="${id}-text"]`)
8677 const elem = document.querySelector(`[id="${id}-text"]`);
8678
8679 if (elem !== null) {
8680 elem.addEventListener('click', function () {
8681 callbackFunction();
8682 });
8683 }
8684 });
8685};
8686/**
8687 * Called by parser when a click definition is found. Registers an event handler.
8688 * @param ids Comma separated list of ids
8689 * @param functionName Function to be called on click
8690 * @param functionArgs Function args the function should be called with
8691 */
8692
8693
8694const setClickEvent = function (ids, functionName, functionArgs) {
8695 ids.split(',').forEach(function (id) {
8696 setClickFun(id, functionName, functionArgs);
8697 });
8698 setClass(ids, 'clickable');
8699};
8700/**
8701 * Binds all functions previously added to fun (specified through click) to the element
8702 * @param element
8703 */
8704
8705const bindFunctions = function (element) {
8706 funs.forEach(function (fun) {
8707 fun(element);
8708 });
8709};
8710/* harmony default export */ __webpack_exports__["default"] = ({
8711 clear,
8712 setDateFormat,
8713 getDateFormat,
8714 enableInclusiveEndDates,
8715 endDatesAreInclusive,
8716 setAxisFormat,
8717 getAxisFormat,
8718 setTitle,
8719 getTitle,
8720 addSection,
8721 getSections,
8722 getTasks,
8723 addTask,
8724 findTaskById,
8725 addTaskOrg,
8726 setExcludes,
8727 getExcludes,
8728 setClickEvent,
8729 setLink,
8730 bindFunctions,
8731 durationToDate
8732});
8733
8734function getTaskTags(data, task, tags) {
8735 let matchFound = true;
8736
8737 while (matchFound) {
8738 matchFound = false;
8739 tags.forEach(function (t) {
8740 const pattern = '^\\s*' + t + '\\s*$';
8741 const regex = new RegExp(pattern);
8742
8743 if (data[0].match(regex)) {
8744 task[t] = true;
8745 data.shift(1);
8746 matchFound = true;
8747 }
8748 });
8749 }
8750}
8751
8752/***/ }),
8753
8754/***/ "./src/diagrams/gantt/ganttRenderer.js":
8755/*!*********************************************!*\
8756 !*** ./src/diagrams/gantt/ganttRenderer.js ***!
8757 \*********************************************/
8758/*! exports provided: setConf, draw, default */
8759/***/ (function(module, __webpack_exports__, __webpack_require__) {
8760
8761"use strict";
8762__webpack_require__.r(__webpack_exports__);
8763/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
8764/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
8765/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
8766/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
8767/* harmony import */ var _parser_gantt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parser/gantt */ "./src/diagrams/gantt/parser/gantt.js");
8768/* harmony import */ var _parser_gantt__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__);
8769/* harmony import */ var _ganttDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ganttDb */ "./src/diagrams/gantt/ganttDb.js");
8770
8771
8772
8773_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy = _ganttDb__WEBPACK_IMPORTED_MODULE_2__["default"];
8774const conf = {
8775 titleTopMargin: 25,
8776 barHeight: 20,
8777 barGap: 4,
8778 topPadding: 50,
8779 rightPadding: 75,
8780 leftPadding: 75,
8781 gridLineStartPadding: 35,
8782 fontSize: 11,
8783 fontFamily: '"Open-Sans", "sans-serif"'
8784};
8785const setConf = function (cnf) {
8786 const keys = Object.keys(cnf);
8787 keys.forEach(function (key) {
8788 conf[key] = cnf[key];
8789 });
8790};
8791let w;
8792const draw = function (text, id) {
8793 _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.clear();
8794 _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].parse(text);
8795 const elem = document.getElementById(id);
8796 w = elem.parentElement.offsetWidth;
8797
8798 if (typeof w === 'undefined') {
8799 w = 1200;
8800 }
8801
8802 if (typeof conf.useWidth !== 'undefined') {
8803 w = conf.useWidth;
8804 }
8805
8806 const taskArray = _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTasks(); // Set height based on number of tasks
8807
8808 const h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding;
8809 elem.setAttribute('height', '100%'); // Set viewBox
8810
8811 elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
8812 const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`); // Set timescale
8813
8814 const timeScale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleTime"]().domain([d3__WEBPACK_IMPORTED_MODULE_0__["min"](taskArray, function (d) {
8815 return d.startTime;
8816 }), d3__WEBPACK_IMPORTED_MODULE_0__["max"](taskArray, function (d) {
8817 return d.endTime;
8818 })]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]);
8819 let categories = [];
8820
8821 for (let i = 0; i < taskArray.length; i++) {
8822 categories.push(taskArray[i].type);
8823 }
8824
8825 const catsUnfiltered = categories; // for vert labels
8826
8827 categories = checkUnique(categories);
8828 makeGant(taskArray, w, h);
8829
8830 if (typeof conf.useWidth !== 'undefined') {
8831 elem.setAttribute('width', w);
8832 }
8833
8834 svg.append('text').text(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTitle()).attr('x', w / 2).attr('y', conf.titleTopMargin).attr('class', 'titleText');
8835
8836 function makeGant(tasks, pageWidth, pageHeight) {
8837 const barHeight = conf.barHeight;
8838 const gap = barHeight + conf.barGap;
8839 const topPadding = conf.topPadding;
8840 const leftPadding = conf.leftPadding;
8841 const colorScale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]().domain([0, categories.length]).range(['#00B9FA', '#F95002']).interpolate(d3__WEBPACK_IMPORTED_MODULE_0__["interpolateHcl"]);
8842 makeGrid(leftPadding, topPadding, pageWidth, pageHeight);
8843 drawRects(tasks, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight);
8844 vertLabels(gap, topPadding, leftPadding, barHeight, colorScale);
8845 drawToday(leftPadding, topPadding, pageWidth, pageHeight);
8846 }
8847
8848 function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w, h) {
8849 // Draw background rects covering the entire width of the graph, these form the section rows.
8850 svg.append('g').selectAll('rect').data(theArray).enter().append('rect').attr('x', 0).attr('y', function (d, i) {
8851 return i * theGap + theTopPad - 2;
8852 }).attr('width', function () {
8853 return w - conf.rightPadding / 2;
8854 }).attr('height', theGap).attr('class', function (d) {
8855 for (let i = 0; i < categories.length; i++) {
8856 if (d.type === categories[i]) {
8857 return 'section section' + i % conf.numberSectionStyles;
8858 }
8859 }
8860
8861 return 'section section0';
8862 }); // Draw the rects representing the tasks
8863
8864 const rectangles = svg.append('g').selectAll('rect').data(theArray).enter();
8865 rectangles.append('rect').attr('id', function (d) {
8866 return d.id;
8867 }).attr('rx', 3).attr('ry', 3).attr('x', function (d) {
8868 if (d.milestone) {
8869 return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
8870 }
8871
8872 return timeScale(d.startTime) + theSidePad;
8873 }).attr('y', function (d, i) {
8874 return i * theGap + theTopPad;
8875 }).attr('width', function (d) {
8876 if (d.milestone) {
8877 return theBarHeight;
8878 }
8879
8880 return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);
8881 }).attr('height', theBarHeight).attr('transform-origin', function (d, i) {
8882 return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + 'px ' + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + 'px';
8883 }).attr('class', function (d) {
8884 const res = 'task';
8885 let classStr = '';
8886
8887 if (d.classes.length > 0) {
8888 classStr = d.classes.join(' ');
8889 }
8890
8891 let secNum = 0;
8892
8893 for (let i = 0; i < categories.length; i++) {
8894 if (d.type === categories[i]) {
8895 secNum = i % conf.numberSectionStyles;
8896 }
8897 }
8898
8899 let taskClass = '';
8900
8901 if (d.active) {
8902 if (d.crit) {
8903 taskClass += ' activeCrit';
8904 } else {
8905 taskClass = ' active';
8906 }
8907 } else if (d.done) {
8908 if (d.crit) {
8909 taskClass = ' doneCrit';
8910 } else {
8911 taskClass = ' done';
8912 }
8913 } else {
8914 if (d.crit) {
8915 taskClass += ' crit';
8916 }
8917 }
8918
8919 if (taskClass.length === 0) {
8920 taskClass = ' task';
8921 }
8922
8923 if (d.milestone) {
8924 taskClass = ' milestone ' + taskClass;
8925 }
8926
8927 taskClass += secNum;
8928 taskClass += ' ' + classStr;
8929 return res + taskClass;
8930 }); // Append task labels
8931
8932 rectangles.append('text').attr('id', function (d) {
8933 return d.id + '-text';
8934 }).text(function (d) {
8935 return d.task;
8936 }).attr('font-size', conf.fontSize).attr('x', function (d) {
8937 let startX = timeScale(d.startTime);
8938 let endX = timeScale(d.renderEndTime || d.endTime);
8939
8940 if (d.milestone) {
8941 startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
8942 }
8943
8944 if (d.milestone) {
8945 endX = startX + theBarHeight;
8946 }
8947
8948 const textWidth = this.getBBox().width; // Check id text width > width of rectangle
8949
8950 if (textWidth > endX - startX) {
8951 if (endX + textWidth + 1.5 * conf.leftPadding > w) {
8952 return startX + theSidePad - 5;
8953 } else {
8954 return endX + theSidePad + 5;
8955 }
8956 } else {
8957 return (endX - startX) / 2 + startX + theSidePad;
8958 }
8959 }).attr('y', function (d, i) {
8960 return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;
8961 }).attr('text-height', theBarHeight).attr('class', function (d) {
8962 const startX = timeScale(d.startTime);
8963 let endX = timeScale(d.endTime);
8964
8965 if (d.milestone) {
8966 endX = startX + theBarHeight;
8967 }
8968
8969 const textWidth = this.getBBox().width;
8970 let classStr = '';
8971
8972 if (d.classes.length > 0) {
8973 classStr = d.classes.join(' ');
8974 }
8975
8976 let secNum = 0;
8977
8978 for (let i = 0; i < categories.length; i++) {
8979 if (d.type === categories[i]) {
8980 secNum = i % conf.numberSectionStyles;
8981 }
8982 }
8983
8984 let taskType = '';
8985
8986 if (d.active) {
8987 if (d.crit) {
8988 taskType = 'activeCritText' + secNum;
8989 } else {
8990 taskType = 'activeText' + secNum;
8991 }
8992 }
8993
8994 if (d.done) {
8995 if (d.crit) {
8996 taskType = taskType + ' doneCritText' + secNum;
8997 } else {
8998 taskType = taskType + ' doneText' + secNum;
8999 }
9000 } else {
9001 if (d.crit) {
9002 taskType = taskType + ' critText' + secNum;
9003 }
9004 }
9005
9006 if (d.milestone) {
9007 taskType += ' milestoneText';
9008 } // Check id text width > width of rectangle
9009
9010
9011 if (textWidth > endX - startX) {
9012 if (endX + textWidth + 1.5 * conf.leftPadding > w) {
9013 return classStr + ' taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType;
9014 } else {
9015 return classStr + ' taskTextOutsideRight taskTextOutside' + secNum + ' ' + taskType;
9016 }
9017 } else {
9018 return classStr + ' taskText taskText' + secNum + ' ' + taskType;
9019 }
9020 });
9021 }
9022
9023 function makeGrid(theSidePad, theTopPad, w, h) {
9024 let xAxis = d3__WEBPACK_IMPORTED_MODULE_0__["axisBottom"](timeScale).tickSize(-h + theTopPad + conf.gridLineStartPadding).tickFormat(d3__WEBPACK_IMPORTED_MODULE_0__["timeFormat"](_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));
9025 svg.append('g').attr('class', 'grid').attr('transform', 'translate(' + theSidePad + ', ' + (h - 50) + ')').call(xAxis).selectAll('text').style('text-anchor', 'middle').attr('fill', '#000').attr('stroke', 'none').attr('font-size', 10).attr('dy', '1em');
9026 }
9027
9028 function vertLabels(theGap, theTopPad) {
9029 const numOccurances = [];
9030 let prevGap = 0;
9031
9032 for (let i = 0; i < categories.length; i++) {
9033 numOccurances[i] = [categories[i], getCount(categories[i], catsUnfiltered)];
9034 }
9035
9036 svg.append('g') // without doing this, impossible to put grid lines behind text
9037 .selectAll('text').data(numOccurances).enter().append('text').text(function (d) {
9038 return d[0];
9039 }).attr('x', 10).attr('y', function (d, i) {
9040 if (i > 0) {
9041 for (let j = 0; j < i; j++) {
9042 prevGap += numOccurances[i - 1][1];
9043 return d[1] * theGap / 2 + prevGap * theGap + theTopPad;
9044 }
9045 } else {
9046 return d[1] * theGap / 2 + theTopPad;
9047 }
9048 }).attr('class', function (d) {
9049 for (let i = 0; i < categories.length; i++) {
9050 if (d[0] === categories[i]) {
9051 return 'sectionTitle sectionTitle' + i % conf.numberSectionStyles;
9052 }
9053 }
9054
9055 return 'sectionTitle';
9056 });
9057 }
9058
9059 function drawToday(theSidePad, theTopPad, w, h) {
9060 const todayG = svg.append('g').attr('class', 'today');
9061 const today = new Date();
9062 todayG.append('line').attr('x1', timeScale(today) + theSidePad).attr('x2', timeScale(today) + theSidePad).attr('y1', conf.titleTopMargin).attr('y2', h - conf.titleTopMargin).attr('class', 'today');
9063 } // from this stackexchange question: http://stackoverflow.com/questions/1890203/unique-for-arrays-in-javascript
9064
9065
9066 function checkUnique(arr) {
9067 const hash = {};
9068 const result = [];
9069
9070 for (let i = 0, l = arr.length; i < l; ++i) {
9071 if (!hash.hasOwnProperty(arr[i])) {
9072 // it works with objects! in FF, at least
9073 hash[arr[i]] = true;
9074 result.push(arr[i]);
9075 }
9076 }
9077
9078 return result;
9079 } // from this stackexchange question: http://stackoverflow.com/questions/14227981/count-how-many-strings-in-an-array-have-duplicates-in-the-same-array
9080
9081
9082 function getCounts(arr) {
9083 let i = arr.length; // const to loop over
9084
9085 const obj = {}; // obj to store results
9086
9087 while (i) {
9088 obj[arr[--i]] = (obj[arr[i]] || 0) + 1; // count occurrences
9089 }
9090
9091 return obj;
9092 } // get specific from everything
9093
9094
9095 function getCount(word, arr) {
9096 return getCounts(arr)[word] || 0;
9097 }
9098};
9099/* harmony default export */ __webpack_exports__["default"] = ({
9100 setConf,
9101 draw
9102});
9103
9104/***/ }),
9105
9106/***/ "./src/diagrams/gantt/parser/gantt.js":
9107/*!********************************************!*\
9108 !*** ./src/diagrams/gantt/parser/gantt.js ***!
9109 \********************************************/
9110/*! no static exports found */
9111/***/ (function(module, exports, __webpack_require__) {
9112
9113/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
9114
9115/*
9116 Returns a Parser object of the following structure:
9117
9118 Parser: {
9119 yy: {}
9120 }
9121
9122 Parser.prototype: {
9123 yy: {},
9124 trace: function(),
9125 symbols_: {associative list: name ==> number},
9126 terminals_: {associative list: number ==> name},
9127 productions_: [...],
9128 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
9129 table: [...],
9130 defaultActions: {...},
9131 parseError: function(str, hash),
9132 parse: function(input),
9133
9134 lexer: {
9135 EOF: 1,
9136 parseError: function(str, hash),
9137 setInput: function(input),
9138 input: function(),
9139 unput: function(str),
9140 more: function(),
9141 less: function(n),
9142 pastInput: function(),
9143 upcomingInput: function(),
9144 showPosition: function(),
9145 test_match: function(regex_match_array, rule_index),
9146 next: function(),
9147 lex: function(),
9148 begin: function(condition),
9149 popState: function(),
9150 _currentRules: function(),
9151 topState: function(),
9152 pushState: function(condition),
9153
9154 options: {
9155 ranges: boolean (optional: true ==> token location info will include a .range[] member)
9156 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
9157 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)
9158 },
9159
9160 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
9161 rules: [...],
9162 conditions: {associative list: name ==> set},
9163 }
9164 }
9165
9166
9167 token location info (@$, _$, etc.): {
9168 first_line: n,
9169 last_line: n,
9170 first_column: n,
9171 last_column: n,
9172 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
9173 }
9174
9175
9176 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
9177 text: (matched text)
9178 token: (the produced terminal token, if any)
9179 line: (yylineno)
9180 }
9181 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
9182 loc: (yylloc)
9183 expected: (string describing the set of expected tokens)
9184 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
9185 }
9186*/
9187var parser = function () {
9188 var o = function (k, v, o, l) {
9189 for (o = o || {}, l = k.length; l--; o[k[l]] = v);
9190
9191 return o;
9192 },
9193 $V0 = [6, 8, 10, 11, 12, 13, 14, 15, 16, 18, 20],
9194 $V1 = [1, 9],
9195 $V2 = [1, 10],
9196 $V3 = [1, 11],
9197 $V4 = [1, 12],
9198 $V5 = [1, 13],
9199 $V6 = [1, 14],
9200 $V7 = [1, 16],
9201 $V8 = [1, 17];
9202
9203 var parser = {
9204 trace: function trace() {},
9205 yy: {},
9206 symbols_: {
9207 "error": 2,
9208 "start": 3,
9209 "gantt": 4,
9210 "document": 5,
9211 "EOF": 6,
9212 "line": 7,
9213 "SPACE": 8,
9214 "statement": 9,
9215 "NL": 10,
9216 "dateFormat": 11,
9217 "inclusiveEndDates": 12,
9218 "axisFormat": 13,
9219 "excludes": 14,
9220 "title": 15,
9221 "section": 16,
9222 "clickStatement": 17,
9223 "taskTxt": 18,
9224 "taskData": 19,
9225 "click": 20,
9226 "callbackname": 21,
9227 "callbackargs": 22,
9228 "href": 23,
9229 "clickStatementDebug": 24,
9230 "$accept": 0,
9231 "$end": 1
9232 },
9233 terminals_: {
9234 2: "error",
9235 4: "gantt",
9236 6: "EOF",
9237 8: "SPACE",
9238 10: "NL",
9239 11: "dateFormat",
9240 12: "inclusiveEndDates",
9241 13: "axisFormat",
9242 14: "excludes",
9243 15: "title",
9244 16: "section",
9245 18: "taskTxt",
9246 19: "taskData",
9247 20: "click",
9248 21: "callbackname",
9249 22: "callbackargs",
9250 23: "href"
9251 },
9252 productions_: [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, 2], [17, 2], [17, 3], [17, 3], [17, 4], [17, 3], [17, 4], [17, 2], [24, 2], [24, 3], [24, 3], [24, 4], [24, 3], [24, 4], [24, 2]],
9253 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
9254 /* action[1] */
9255 , $$
9256 /* vstack */
9257 , _$
9258 /* lstack */
9259 ) {
9260 /* this == yyval */
9261 var $0 = $$.length - 1;
9262
9263 switch (yystate) {
9264 case 1:
9265 return $$[$0 - 1];
9266 break;
9267
9268 case 2:
9269 this.$ = [];
9270 break;
9271
9272 case 3:
9273 $$[$0 - 1].push($$[$0]);
9274 this.$ = $$[$0 - 1];
9275 break;
9276
9277 case 4:
9278 case 5:
9279 this.$ = $$[$0];
9280 break;
9281
9282 case 6:
9283 case 7:
9284 this.$ = [];
9285 break;
9286
9287 case 8:
9288 yy.setDateFormat($$[$0].substr(11));
9289 this.$ = $$[$0].substr(11);
9290 break;
9291
9292 case 9:
9293 yy.enableInclusiveEndDates();
9294 this.$ = $$[$0].substr(18);
9295 break;
9296
9297 case 10:
9298 yy.setAxisFormat($$[$0].substr(11));
9299 this.$ = $$[$0].substr(11);
9300 break;
9301
9302 case 11:
9303 yy.setExcludes($$[$0].substr(9));
9304 this.$ = $$[$0].substr(9);
9305 break;
9306
9307 case 12:
9308 yy.setTitle($$[$0].substr(6));
9309 this.$ = $$[$0].substr(6);
9310 break;
9311
9312 case 13:
9313 yy.addSection($$[$0].substr(8));
9314 this.$ = $$[$0].substr(8);
9315 break;
9316
9317 case 15:
9318 yy.addTask($$[$0 - 1], $$[$0]);
9319 this.$ = 'task';
9320 break;
9321
9322 case 16:
9323 this.$ = $$[$0 - 1];
9324 yy.setClickEvent($$[$0 - 1], $$[$0], null);
9325 break;
9326
9327 case 17:
9328 this.$ = $$[$0 - 2];
9329 yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
9330 break;
9331
9332 case 18:
9333 this.$ = $$[$0 - 2];
9334 yy.setClickEvent($$[$0 - 2], $$[$0 - 1], null);
9335 yy.setLink($$[$0 - 2], $$[$0]);
9336 break;
9337
9338 case 19:
9339 this.$ = $$[$0 - 3];
9340 yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
9341 yy.setLink($$[$0 - 3], $$[$0]);
9342 break;
9343
9344 case 20:
9345 this.$ = $$[$0 - 2];
9346 yy.setClickEvent($$[$0 - 2], $$[$0], null);
9347 yy.setLink($$[$0 - 2], $$[$0 - 1]);
9348 break;
9349
9350 case 21:
9351 this.$ = $$[$0 - 3];
9352 yy.setClickEvent($$[$0 - 3], $$[$0 - 1], $$[$0]);
9353 yy.setLink($$[$0 - 3], $$[$0 - 2]);
9354 break;
9355
9356 case 22:
9357 this.$ = $$[$0 - 1];
9358 yy.setLink($$[$0 - 1], $$[$0]);
9359 break;
9360
9361 case 23:
9362 case 29:
9363 this.$ = $$[$0 - 1] + ' ' + $$[$0];
9364 break;
9365
9366 case 24:
9367 case 25:
9368 case 27:
9369 this.$ = $$[$0 - 2] + ' ' + $$[$0 - 1] + ' ' + $$[$0];
9370 break;
9371
9372 case 26:
9373 case 28:
9374 this.$ = $$[$0 - 3] + ' ' + $$[$0 - 2] + ' ' + $$[$0 - 1] + ' ' + $$[$0];
9375 break;
9376 }
9377 },
9378 table: [{
9379 3: 1,
9380 4: [1, 2]
9381 }, {
9382 1: [3]
9383 }, o($V0, [2, 2], {
9384 5: 3
9385 }), {
9386 6: [1, 4],
9387 7: 5,
9388 8: [1, 6],
9389 9: 7,
9390 10: [1, 8],
9391 11: $V1,
9392 12: $V2,
9393 13: $V3,
9394 14: $V4,
9395 15: $V5,
9396 16: $V6,
9397 17: 15,
9398 18: $V7,
9399 20: $V8
9400 }, o($V0, [2, 7], {
9401 1: [2, 1]
9402 }), o($V0, [2, 3]), {
9403 9: 18,
9404 11: $V1,
9405 12: $V2,
9406 13: $V3,
9407 14: $V4,
9408 15: $V5,
9409 16: $V6,
9410 17: 15,
9411 18: $V7,
9412 20: $V8
9413 }, 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]), {
9414 19: [1, 19]
9415 }, {
9416 21: [1, 20],
9417 23: [1, 21]
9418 }, o($V0, [2, 4]), o($V0, [2, 15]), o($V0, [2, 16], {
9419 22: [1, 22],
9420 23: [1, 23]
9421 }), o($V0, [2, 22], {
9422 21: [1, 24]
9423 }), o($V0, [2, 17], {
9424 23: [1, 25]
9425 }), o($V0, [2, 18]), o($V0, [2, 20], {
9426 22: [1, 26]
9427 }), o($V0, [2, 19]), o($V0, [2, 21])],
9428 defaultActions: {},
9429 parseError: function parseError(str, hash) {
9430 if (hash.recoverable) {
9431 this.trace(str);
9432 } else {
9433 var error = new Error(str);
9434 error.hash = hash;
9435 throw error;
9436 }
9437 },
9438 parse: function parse(input) {
9439 var self = this,
9440 stack = [0],
9441 tstack = [],
9442 vstack = [null],
9443 lstack = [],
9444 table = this.table,
9445 yytext = '',
9446 yylineno = 0,
9447 yyleng = 0,
9448 recovering = 0,
9449 TERROR = 2,
9450 EOF = 1;
9451 var args = lstack.slice.call(arguments, 1);
9452 var lexer = Object.create(this.lexer);
9453 var sharedState = {
9454 yy: {}
9455 };
9456
9457 for (var k in this.yy) {
9458 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
9459 sharedState.yy[k] = this.yy[k];
9460 }
9461 }
9462
9463 lexer.setInput(input, sharedState.yy);
9464 sharedState.yy.lexer = lexer;
9465 sharedState.yy.parser = this;
9466
9467 if (typeof lexer.yylloc == 'undefined') {
9468 lexer.yylloc = {};
9469 }
9470
9471 var yyloc = lexer.yylloc;
9472 lstack.push(yyloc);
9473 var ranges = lexer.options && lexer.options.ranges;
9474
9475 if (typeof sharedState.yy.parseError === 'function') {
9476 this.parseError = sharedState.yy.parseError;
9477 } else {
9478 this.parseError = Object.getPrototypeOf(this).parseError;
9479 }
9480
9481 function popStack(n) {
9482 stack.length = stack.length - 2 * n;
9483 vstack.length = vstack.length - n;
9484 lstack.length = lstack.length - n;
9485 }
9486
9487 function lex() {
9488 var token;
9489 token = tstack.pop() || lexer.lex() || EOF;
9490
9491 if (typeof token !== 'number') {
9492 if (token instanceof Array) {
9493 tstack = token;
9494 token = tstack.pop();
9495 }
9496
9497 token = self.symbols_[token] || token;
9498 }
9499
9500 return token;
9501 }
9502
9503 var symbol,
9504 preErrorSymbol,
9505 state,
9506 action,
9507 a,
9508 r,
9509 yyval = {},
9510 p,
9511 len,
9512 newState,
9513 expected;
9514
9515 while (true) {
9516 state = stack[stack.length - 1];
9517
9518 if (this.defaultActions[state]) {
9519 action = this.defaultActions[state];
9520 } else {
9521 if (symbol === null || typeof symbol == 'undefined') {
9522 symbol = lex();
9523 }
9524
9525 action = table[state] && table[state][symbol];
9526 }
9527
9528 if (typeof action === 'undefined' || !action.length || !action[0]) {
9529 var errStr = '';
9530 expected = [];
9531
9532 for (p in table[state]) {
9533 if (this.terminals_[p] && p > TERROR) {
9534 expected.push('\'' + this.terminals_[p] + '\'');
9535 }
9536 }
9537
9538 if (lexer.showPosition) {
9539 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
9540 } else {
9541 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
9542 }
9543
9544 this.parseError(errStr, {
9545 text: lexer.match,
9546 token: this.terminals_[symbol] || symbol,
9547 line: lexer.yylineno,
9548 loc: yyloc,
9549 expected: expected
9550 });
9551 }
9552
9553 if (action[0] instanceof Array && action.length > 1) {
9554 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
9555 }
9556
9557 switch (action[0]) {
9558 case 1:
9559 stack.push(symbol);
9560 vstack.push(lexer.yytext);
9561 lstack.push(lexer.yylloc);
9562 stack.push(action[1]);
9563 symbol = null;
9564
9565 if (!preErrorSymbol) {
9566 yyleng = lexer.yyleng;
9567 yytext = lexer.yytext;
9568 yylineno = lexer.yylineno;
9569 yyloc = lexer.yylloc;
9570
9571 if (recovering > 0) {
9572 recovering--;
9573 }
9574 } else {
9575 symbol = preErrorSymbol;
9576 preErrorSymbol = null;
9577 }
9578
9579 break;
9580
9581 case 2:
9582 len = this.productions_[action[1]][1];
9583 yyval.$ = vstack[vstack.length - len];
9584 yyval._$ = {
9585 first_line: lstack[lstack.length - (len || 1)].first_line,
9586 last_line: lstack[lstack.length - 1].last_line,
9587 first_column: lstack[lstack.length - (len || 1)].first_column,
9588 last_column: lstack[lstack.length - 1].last_column
9589 };
9590
9591 if (ranges) {
9592 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
9593 }
9594
9595 r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
9596
9597 if (typeof r !== 'undefined') {
9598 return r;
9599 }
9600
9601 if (len) {
9602 stack = stack.slice(0, -1 * len * 2);
9603 vstack = vstack.slice(0, -1 * len);
9604 lstack = lstack.slice(0, -1 * len);
9605 }
9606
9607 stack.push(this.productions_[action[1]][0]);
9608 vstack.push(yyval.$);
9609 lstack.push(yyval._$);
9610 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
9611 stack.push(newState);
9612 break;
9613
9614 case 3:
9615 return true;
9616 }
9617 }
9618
9619 return true;
9620 }
9621 };
9622 /* generated by jison-lex 0.3.4 */
9623
9624 var lexer = function () {
9625 var lexer = {
9626 EOF: 1,
9627 parseError: function parseError(str, hash) {
9628 if (this.yy.parser) {
9629 this.yy.parser.parseError(str, hash);
9630 } else {
9631 throw new Error(str);
9632 }
9633 },
9634 // resets the lexer, sets new input
9635 setInput: function (input, yy) {
9636 this.yy = yy || this.yy || {};
9637 this._input = input;
9638 this._more = this._backtrack = this.done = false;
9639 this.yylineno = this.yyleng = 0;
9640 this.yytext = this.matched = this.match = '';
9641 this.conditionStack = ['INITIAL'];
9642 this.yylloc = {
9643 first_line: 1,
9644 first_column: 0,
9645 last_line: 1,
9646 last_column: 0
9647 };
9648
9649 if (this.options.ranges) {
9650 this.yylloc.range = [0, 0];
9651 }
9652
9653 this.offset = 0;
9654 return this;
9655 },
9656 // consumes and returns one char from the input
9657 input: function () {
9658 var ch = this._input[0];
9659 this.yytext += ch;
9660 this.yyleng++;
9661 this.offset++;
9662 this.match += ch;
9663 this.matched += ch;
9664 var lines = ch.match(/(?:\r\n?|\n).*/g);
9665
9666 if (lines) {
9667 this.yylineno++;
9668 this.yylloc.last_line++;
9669 } else {
9670 this.yylloc.last_column++;
9671 }
9672
9673 if (this.options.ranges) {
9674 this.yylloc.range[1]++;
9675 }
9676
9677 this._input = this._input.slice(1);
9678 return ch;
9679 },
9680 // unshifts one char (or a string) into the input
9681 unput: function (ch) {
9682 var len = ch.length;
9683 var lines = ch.split(/(?:\r\n?|\n)/g);
9684 this._input = ch + this._input;
9685 this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;
9686
9687 this.offset -= len;
9688 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
9689 this.match = this.match.substr(0, this.match.length - 1);
9690 this.matched = this.matched.substr(0, this.matched.length - 1);
9691
9692 if (lines.length - 1) {
9693 this.yylineno -= lines.length - 1;
9694 }
9695
9696 var r = this.yylloc.range;
9697 this.yylloc = {
9698 first_line: this.yylloc.first_line,
9699 last_line: this.yylineno + 1,
9700 first_column: this.yylloc.first_column,
9701 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
9702 };
9703
9704 if (this.options.ranges) {
9705 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
9706 }
9707
9708 this.yyleng = this.yytext.length;
9709 return this;
9710 },
9711 // When called from action, caches matched text and appends it on next action
9712 more: function () {
9713 this._more = true;
9714 return this;
9715 },
9716 // 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.
9717 reject: function () {
9718 if (this.options.backtrack_lexer) {
9719 this._backtrack = true;
9720 } else {
9721 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(), {
9722 text: "",
9723 token: null,
9724 line: this.yylineno
9725 });
9726 }
9727
9728 return this;
9729 },
9730 // retain first n characters of the match
9731 less: function (n) {
9732 this.unput(this.match.slice(n));
9733 },
9734 // displays already matched input, i.e. for error messages
9735 pastInput: function () {
9736 var past = this.matched.substr(0, this.matched.length - this.match.length);
9737 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
9738 },
9739 // displays upcoming input, i.e. for error messages
9740 upcomingInput: function () {
9741 var next = this.match;
9742
9743 if (next.length < 20) {
9744 next += this._input.substr(0, 20 - next.length);
9745 }
9746
9747 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
9748 },
9749 // displays the character position where the lexing error occurred, i.e. for error messages
9750 showPosition: function () {
9751 var pre = this.pastInput();
9752 var c = new Array(pre.length + 1).join("-");
9753 return pre + this.upcomingInput() + "\n" + c + "^";
9754 },
9755 // test the lexed token: return FALSE when not a match, otherwise return token
9756 test_match: function (match, indexed_rule) {
9757 var token, lines, backup;
9758
9759 if (this.options.backtrack_lexer) {
9760 // save context
9761 backup = {
9762 yylineno: this.yylineno,
9763 yylloc: {
9764 first_line: this.yylloc.first_line,
9765 last_line: this.last_line,
9766 first_column: this.yylloc.first_column,
9767 last_column: this.yylloc.last_column
9768 },
9769 yytext: this.yytext,
9770 match: this.match,
9771 matches: this.matches,
9772 matched: this.matched,
9773 yyleng: this.yyleng,
9774 offset: this.offset,
9775 _more: this._more,
9776 _input: this._input,
9777 yy: this.yy,
9778 conditionStack: this.conditionStack.slice(0),
9779 done: this.done
9780 };
9781
9782 if (this.options.ranges) {
9783 backup.yylloc.range = this.yylloc.range.slice(0);
9784 }
9785 }
9786
9787 lines = match[0].match(/(?:\r\n?|\n).*/g);
9788
9789 if (lines) {
9790 this.yylineno += lines.length;
9791 }
9792
9793 this.yylloc = {
9794 first_line: this.yylloc.last_line,
9795 last_line: this.yylineno + 1,
9796 first_column: this.yylloc.last_column,
9797 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
9798 };
9799 this.yytext += match[0];
9800 this.match += match[0];
9801 this.matches = match;
9802 this.yyleng = this.yytext.length;
9803
9804 if (this.options.ranges) {
9805 this.yylloc.range = [this.offset, this.offset += this.yyleng];
9806 }
9807
9808 this._more = false;
9809 this._backtrack = false;
9810 this._input = this._input.slice(match[0].length);
9811 this.matched += match[0];
9812 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
9813
9814 if (this.done && this._input) {
9815 this.done = false;
9816 }
9817
9818 if (token) {
9819 return token;
9820 } else if (this._backtrack) {
9821 // recover context
9822 for (var k in backup) {
9823 this[k] = backup[k];
9824 }
9825
9826 return false; // rule action called reject() implying the next rule should be tested instead.
9827 }
9828
9829 return false;
9830 },
9831 // return next match in input
9832 next: function () {
9833 if (this.done) {
9834 return this.EOF;
9835 }
9836
9837 if (!this._input) {
9838 this.done = true;
9839 }
9840
9841 var token, match, tempMatch, index;
9842
9843 if (!this._more) {
9844 this.yytext = '';
9845 this.match = '';
9846 }
9847
9848 var rules = this._currentRules();
9849
9850 for (var i = 0; i < rules.length; i++) {
9851 tempMatch = this._input.match(this.rules[rules[i]]);
9852
9853 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
9854 match = tempMatch;
9855 index = i;
9856
9857 if (this.options.backtrack_lexer) {
9858 token = this.test_match(tempMatch, rules[i]);
9859
9860 if (token !== false) {
9861 return token;
9862 } else if (this._backtrack) {
9863 match = false;
9864 continue; // rule action called reject() implying a rule MISmatch.
9865 } else {
9866 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
9867 return false;
9868 }
9869 } else if (!this.options.flex) {
9870 break;
9871 }
9872 }
9873 }
9874
9875 if (match) {
9876 token = this.test_match(match, rules[index]);
9877
9878 if (token !== false) {
9879 return token;
9880 } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
9881
9882
9883 return false;
9884 }
9885
9886 if (this._input === "") {
9887 return this.EOF;
9888 } else {
9889 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
9890 text: "",
9891 token: null,
9892 line: this.yylineno
9893 });
9894 }
9895 },
9896 // return next match that has a token
9897 lex: function lex() {
9898 var r = this.next();
9899
9900 if (r) {
9901 return r;
9902 } else {
9903 return this.lex();
9904 }
9905 },
9906 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
9907 begin: function begin(condition) {
9908 this.conditionStack.push(condition);
9909 },
9910 // pop the previously active lexer condition state off the condition stack
9911 popState: function popState() {
9912 var n = this.conditionStack.length - 1;
9913
9914 if (n > 0) {
9915 return this.conditionStack.pop();
9916 } else {
9917 return this.conditionStack[0];
9918 }
9919 },
9920 // produce the lexer rule set which is active for the currently active lexer condition state
9921 _currentRules: function _currentRules() {
9922 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
9923 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
9924 } else {
9925 return this.conditions["INITIAL"].rules;
9926 }
9927 },
9928 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
9929 topState: function topState(n) {
9930 n = this.conditionStack.length - 1 - Math.abs(n || 0);
9931
9932 if (n >= 0) {
9933 return this.conditionStack[n];
9934 } else {
9935 return "INITIAL";
9936 }
9937 },
9938 // alias for begin(condition)
9939 pushState: function pushState(condition) {
9940 this.begin(condition);
9941 },
9942 // return the number of states currently on the stack
9943 stateStackSize: function stateStackSize() {
9944 return this.conditionStack.length;
9945 },
9946 options: {
9947 "case-insensitive": true
9948 },
9949 performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
9950 var YYSTATE = YY_START;
9951
9952 switch ($avoiding_name_collisions) {
9953 case 0:
9954 return 10;
9955 break;
9956
9957 case 1:
9958 /* skip whitespace */
9959 break;
9960
9961 case 2:
9962 /* skip comments */
9963 break;
9964
9965 case 3:
9966 /* skip comments */
9967 break;
9968
9969 case 4:
9970 this.begin("href");
9971 break;
9972
9973 case 5:
9974 this.popState();
9975 break;
9976
9977 case 6:
9978 return 23;
9979 break;
9980
9981 case 7:
9982 this.begin("callbackname");
9983 break;
9984
9985 case 8:
9986 this.popState();
9987 break;
9988
9989 case 9:
9990 this.popState();
9991 this.begin("callbackargs");
9992 break;
9993
9994 case 10:
9995 return 21;
9996 break;
9997
9998 case 11:
9999 this.popState();
10000 break;
10001
10002 case 12:
10003 return 22;
10004 break;
10005
10006 case 13:
10007 this.begin("click");
10008 break;
10009
10010 case 14:
10011 this.popState();
10012 break;
10013
10014 case 15:
10015 return 20;
10016 break;
10017
10018 case 16:
10019 return 4;
10020 break;
10021
10022 case 17:
10023 return 11;
10024 break;
10025
10026 case 18:
10027 return 12;
10028 break;
10029
10030 case 19:
10031 return 13;
10032 break;
10033
10034 case 20:
10035 return 14;
10036 break;
10037
10038 case 21:
10039 return 'date';
10040 break;
10041
10042 case 22:
10043 return 15;
10044 break;
10045
10046 case 23:
10047 return 16;
10048 break;
10049
10050 case 24:
10051 return 18;
10052 break;
10053
10054 case 25:
10055 return 19;
10056 break;
10057
10058 case 26:
10059 return ':';
10060 break;
10061
10062 case 27:
10063 return 6;
10064 break;
10065
10066 case 28:
10067 return 'INVALID';
10068 break;
10069 }
10070 },
10071 rules: [/^(?:[\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, /^(?:\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],
10072 conditions: {
10073 "callbackargs": {
10074 "rules": [11, 12],
10075 "inclusive": false
10076 },
10077 "callbackname": {
10078 "rules": [8, 9, 10],
10079 "inclusive": false
10080 },
10081 "href": {
10082 "rules": [5, 6],
10083 "inclusive": false
10084 },
10085 "click": {
10086 "rules": [14, 15],
10087 "inclusive": false
10088 },
10089 "INITIAL": {
10090 "rules": [0, 1, 2, 3, 4, 7, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28],
10091 "inclusive": true
10092 }
10093 }
10094 };
10095 return lexer;
10096 }();
10097
10098 parser.lexer = lexer;
10099
10100 function Parser() {
10101 this.yy = {};
10102 }
10103
10104 Parser.prototype = parser;
10105 parser.Parser = Parser;
10106 return new Parser();
10107}();
10108
10109if (true) {
10110 exports.parser = parser;
10111 exports.Parser = parser.Parser;
10112
10113 exports.parse = function () {
10114 return parser.parse.apply(parser, arguments);
10115 };
10116
10117 exports.main = function commonjsMain(args) {
10118 if (!args[1]) {
10119 console.log('Usage: ' + args[0] + ' FILE');
10120 process.exit(1);
10121 }
10122
10123 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
10124
10125 return exports.parser.parse(source);
10126 };
10127
10128 if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
10129 exports.main(process.argv.slice(1));
10130 }
10131}
10132/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
10133
10134/***/ }),
10135
10136/***/ "./src/diagrams/git/gitGraphAst.js":
10137/*!*****************************************!*\
10138 !*** ./src/diagrams/git/gitGraphAst.js ***!
10139 \*****************************************/
10140/*! exports provided: setDirection, setOptions, getOptions, commit, branch, merge, checkout, reset, prettyPrint, clear, getBranchesAsObjArray, getBranches, getCommits, getCommitsArray, getCurrentBranch, getDirection, getHead, default */
10141/***/ (function(module, __webpack_exports__, __webpack_require__) {
10142
10143"use strict";
10144__webpack_require__.r(__webpack_exports__);
10145/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDirection", function() { return setDirection; });
10146/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setOptions", function() { return setOptions; });
10147/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOptions", function() { return getOptions; });
10148/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commit", function() { return commit; });
10149/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "branch", function() { return branch; });
10150/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
10151/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkout", function() { return checkout; });
10152/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; });
10153/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prettyPrint", function() { return prettyPrint; });
10154/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
10155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBranchesAsObjArray", function() { return getBranchesAsObjArray; });
10156/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBranches", function() { return getBranches; });
10157/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCommits", function() { return getCommits; });
10158/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCommitsArray", function() { return getCommitsArray; });
10159/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCurrentBranch", function() { return getCurrentBranch; });
10160/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; });
10161/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHead", function() { return getHead; });
10162/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash");
10163/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
10164/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
10165
10166
10167let commits = {};
10168let head = null;
10169let branches = {
10170 'master': head
10171};
10172let curBranch = 'master';
10173let direction = 'LR';
10174let seq = 0;
10175
10176function getRandomInt(min, max) {
10177 return Math.floor(Math.random() * (max - min)) + min;
10178}
10179
10180function getId() {
10181 const pool = '0123456789abcdef';
10182 let id = '';
10183
10184 for (let i = 0; i < 7; i++) {
10185 id += pool[getRandomInt(0, 16)];
10186 }
10187
10188 return id;
10189}
10190
10191function isfastforwardable(currentCommit, otherCommit) {
10192 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Entering isfastforwardable:', currentCommit.id, otherCommit.id);
10193
10194 while (currentCommit.seq <= otherCommit.seq && currentCommit !== otherCommit) {
10195 // only if other branch has more commits
10196 if (otherCommit.parent == null) break;
10197
10198 if (Array.isArray(otherCommit.parent)) {
10199 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('In merge commit:', otherCommit.parent);
10200 return isfastforwardable(currentCommit, commits[otherCommit.parent[0]]) || isfastforwardable(currentCommit, commits[otherCommit.parent[1]]);
10201 } else {
10202 otherCommit = commits[otherCommit.parent];
10203 }
10204 }
10205
10206 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(currentCommit.id, otherCommit.id);
10207 return currentCommit.id === otherCommit.id;
10208}
10209
10210function isReachableFrom(currentCommit, otherCommit) {
10211 const currentSeq = currentCommit.seq;
10212 const otherSeq = otherCommit.seq;
10213 if (currentSeq > otherSeq) return isfastforwardable(otherCommit, currentCommit);
10214 return false;
10215}
10216
10217const setDirection = function (dir) {
10218 direction = dir;
10219};
10220let options = {};
10221const setOptions = function (rawOptString) {
10222 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('options str', rawOptString);
10223 rawOptString = rawOptString && rawOptString.trim();
10224 rawOptString = rawOptString || '{}';
10225
10226 try {
10227 options = JSON.parse(rawOptString);
10228 } catch (e) {
10229 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].error('error while parsing gitGraph options', e.message);
10230 }
10231};
10232const getOptions = function () {
10233 return options;
10234};
10235const commit = function (msg) {
10236 const commit = {
10237 id: getId(),
10238 message: msg,
10239 seq: seq++,
10240 parent: head == null ? null : head.id
10241 };
10242 head = commit;
10243 commits[commit.id] = commit;
10244 branches[curBranch] = commit.id;
10245 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in pushCommit ' + commit.id);
10246};
10247const branch = function (name) {
10248 branches[name] = head != null ? head.id : null;
10249 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in createBranch');
10250};
10251const merge = function (otherBranch) {
10252 const currentCommit = commits[branches[curBranch]];
10253 const otherCommit = commits[branches[otherBranch]];
10254
10255 if (isReachableFrom(currentCommit, otherCommit)) {
10256 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Already merged');
10257 return;
10258 }
10259
10260 if (isfastforwardable(currentCommit, otherCommit)) {
10261 branches[curBranch] = branches[otherBranch];
10262 head = commits[branches[curBranch]];
10263 } else {
10264 // create merge commit
10265 const commit = {
10266 id: getId(),
10267 message: 'merged branch ' + otherBranch + ' into ' + curBranch,
10268 seq: seq++,
10269 parent: [head == null ? null : head.id, branches[otherBranch]]
10270 };
10271 head = commit;
10272 commits[commit.id] = commit;
10273 branches[curBranch] = commit.id;
10274 }
10275
10276 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(branches);
10277 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in mergeBranch');
10278};
10279const checkout = function (branch) {
10280 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in checkout');
10281 curBranch = branch;
10282 const id = branches[curBranch];
10283 head = commits[id];
10284};
10285const reset = function (commitRef) {
10286 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in reset', commitRef);
10287 const ref = commitRef.split(':')[0];
10288 let parentCount = parseInt(commitRef.split(':')[1]);
10289 let commit = ref === 'HEAD' ? head : commits[branches[ref]];
10290 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(commit, parentCount);
10291
10292 while (parentCount > 0) {
10293 commit = commits[commit.parent];
10294 parentCount--;
10295
10296 if (!commit) {
10297 const err = 'Critical error - unique parent commit not found during reset';
10298 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].error(err);
10299 throw err;
10300 }
10301 }
10302
10303 head = commit;
10304 branches[curBranch] = commit.id;
10305};
10306
10307function upsert(arr, key, newval) {
10308 const index = arr.indexOf(key);
10309
10310 if (index === -1) {
10311 arr.push(newval);
10312 } else {
10313 arr.splice(index, 1, newval);
10314 }
10315}
10316
10317function prettyPrintCommitHistory(commitArr) {
10318 const commit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.maxBy(commitArr, 'seq');
10319
10320 let line = '';
10321 commitArr.forEach(function (c) {
10322 if (c === commit) {
10323 line += '\t*';
10324 } else {
10325 line += '\t|';
10326 }
10327 });
10328 const label = [line, commit.id, commit.seq];
10329
10330 for (let branch in branches) {
10331 if (branches[branch] === commit.id) label.push(branch);
10332 }
10333
10334 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(label.join(' '));
10335
10336 if (Array.isArray(commit.parent)) {
10337 const newCommit = commits[commit.parent[0]];
10338 upsert(commitArr, commit, newCommit);
10339 commitArr.push(commits[commit.parent[1]]);
10340 } else if (commit.parent == null) {
10341 return;
10342 } else {
10343 const nextCommit = commits[commit.parent];
10344 upsert(commitArr, commit, nextCommit);
10345 }
10346
10347 commitArr = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniqBy(commitArr, 'id');
10348 prettyPrintCommitHistory(commitArr);
10349}
10350
10351const prettyPrint = function () {
10352 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(commits);
10353 const node = getCommitsArray()[0];
10354 prettyPrintCommitHistory([node]);
10355};
10356const clear = function () {
10357 commits = {};
10358 head = null;
10359 branches = {
10360 'master': head
10361 };
10362 curBranch = 'master';
10363 seq = 0;
10364};
10365const getBranchesAsObjArray = function () {
10366 const branchArr = [];
10367
10368 for (let branch in branches) {
10369 branchArr.push({
10370 name: branch,
10371 commit: commits[branches[branch]]
10372 });
10373 }
10374
10375 return branchArr;
10376};
10377const getBranches = function () {
10378 return branches;
10379};
10380const getCommits = function () {
10381 return commits;
10382};
10383const getCommitsArray = function () {
10384 const commitArr = Object.keys(commits).map(function (key) {
10385 return commits[key];
10386 });
10387 commitArr.forEach(function (o) {
10388 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(o.id);
10389 });
10390 return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.orderBy(commitArr, ['seq'], ['desc']);
10391};
10392const getCurrentBranch = function () {
10393 return curBranch;
10394};
10395const getDirection = function () {
10396 return direction;
10397};
10398const getHead = function () {
10399 return head;
10400};
10401/* harmony default export */ __webpack_exports__["default"] = ({
10402 setDirection,
10403 setOptions,
10404 getOptions,
10405 commit,
10406 branch,
10407 merge,
10408 checkout,
10409 reset,
10410 prettyPrint,
10411 clear,
10412 getBranchesAsObjArray,
10413 getBranches,
10414 getCommits,
10415 getCommitsArray,
10416 getCurrentBranch,
10417 getDirection,
10418 getHead
10419});
10420
10421/***/ }),
10422
10423/***/ "./src/diagrams/git/gitGraphRenderer.js":
10424/*!**********************************************!*\
10425 !*** ./src/diagrams/git/gitGraphRenderer.js ***!
10426 \**********************************************/
10427/*! exports provided: setConf, draw, default */
10428/***/ (function(module, __webpack_exports__, __webpack_require__) {
10429
10430"use strict";
10431__webpack_require__.r(__webpack_exports__);
10432/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
10433/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
10434/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
10435/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
10436/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash");
10437/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
10438/* harmony import */ var _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gitGraphAst */ "./src/diagrams/git/gitGraphAst.js");
10439/* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/gitGraph */ "./src/diagrams/git/parser/gitGraph.js");
10440/* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_gitGraph__WEBPACK_IMPORTED_MODULE_3__);
10441/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
10442/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
10443
10444
10445
10446
10447
10448
10449let allCommitsDict = {};
10450let branchNum;
10451let config = {
10452 nodeSpacing: 150,
10453 nodeFillColor: 'yellow',
10454 nodeStrokeWidth: 2,
10455 nodeStrokeColor: 'grey',
10456 lineStrokeWidth: 4,
10457 branchOffset: 50,
10458 lineColor: 'grey',
10459 leftMargin: 50,
10460 branchColors: ['#442f74', '#983351', '#609732', '#AA9A39'],
10461 nodeRadius: 10,
10462 nodeLabel: {
10463 width: 75,
10464 height: 100,
10465 x: -25,
10466 y: 0
10467 }
10468};
10469let apiConfig = {};
10470const setConf = function (c) {
10471 apiConfig = c;
10472};
10473
10474function svgCreateDefs(svg) {
10475 svg.append('defs').append('g').attr('id', 'def-commit').append('circle').attr('r', config.nodeRadius).attr('cx', 0).attr('cy', 0);
10476 svg.select('#def-commit').append('foreignObject').attr('width', config.nodeLabel.width).attr('height', config.nodeLabel.height).attr('x', config.nodeLabel.x).attr('y', config.nodeLabel.y).attr('class', 'node-label').attr('requiredFeatures', 'http://www.w3.org/TR/SVG11/feature#Extensibility').append('p').html('');
10477}
10478
10479function svgDrawLine(svg, points, colorIdx, interpolate) {
10480 const curve = Object(_utils__WEBPACK_IMPORTED_MODULE_5__["interpolateToCurve"])(interpolate, d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]);
10481 const color = config.branchColors[colorIdx % config.branchColors.length];
10482 const lineGen = d3__WEBPACK_IMPORTED_MODULE_0__["line"]().x(function (d) {
10483 return Math.round(d.x);
10484 }).y(function (d) {
10485 return Math.round(d.y);
10486 }).curve(curve);
10487 svg.append('svg:path').attr('d', lineGen(points)).style('stroke', color).style('stroke-width', config.lineStrokeWidth).style('fill', 'none');
10488} // Pass in the element and its pre-transform coords
10489
10490
10491function getElementCoords(element, coords) {
10492 coords = coords || element.node().getBBox();
10493 const ctm = element.node().getCTM();
10494 const xn = ctm.e + coords.x * ctm.a;
10495 const yn = ctm.f + coords.y * ctm.d;
10496 return {
10497 left: xn,
10498 top: yn,
10499 width: coords.width,
10500 height: coords.height
10501 };
10502}
10503
10504function svgDrawLineForCommits(svg, fromId, toId, direction, color) {
10505 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('svgDrawLineForCommits: ', fromId, toId);
10506 const fromBbox = getElementCoords(svg.select('#node-' + fromId + ' circle'));
10507 const toBbox = getElementCoords(svg.select('#node-' + toId + ' circle'));
10508
10509 switch (direction) {
10510 case 'LR':
10511 // (toBbox)
10512 // +--------
10513 // + (fromBbox)
10514 if (fromBbox.left - toBbox.left > config.nodeSpacing) {
10515 const lineStart = {
10516 x: fromBbox.left - config.nodeSpacing,
10517 y: toBbox.top + toBbox.height / 2
10518 };
10519 const lineEnd = {
10520 x: toBbox.left + toBbox.width,
10521 y: toBbox.top + toBbox.height / 2
10522 };
10523 svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');
10524 svgDrawLine(svg, [{
10525 x: fromBbox.left,
10526 y: fromBbox.top + fromBbox.height / 2
10527 }, {
10528 x: fromBbox.left - config.nodeSpacing / 2,
10529 y: fromBbox.top + fromBbox.height / 2
10530 }, {
10531 x: fromBbox.left - config.nodeSpacing / 2,
10532 y: lineStart.y
10533 }, lineStart], color);
10534 } else {
10535 svgDrawLine(svg, [{
10536 'x': fromBbox.left,
10537 'y': fromBbox.top + fromBbox.height / 2
10538 }, {
10539 'x': fromBbox.left - config.nodeSpacing / 2,
10540 'y': fromBbox.top + fromBbox.height / 2
10541 }, {
10542 'x': fromBbox.left - config.nodeSpacing / 2,
10543 'y': toBbox.top + toBbox.height / 2
10544 }, {
10545 'x': toBbox.left + toBbox.width,
10546 'y': toBbox.top + toBbox.height / 2
10547 }], color);
10548 }
10549
10550 break;
10551
10552 case 'BT':
10553 // + (fromBbox)
10554 // |
10555 // |
10556 // + (toBbox)
10557 if (toBbox.top - fromBbox.top > config.nodeSpacing) {
10558 const lineStart = {
10559 x: toBbox.left + toBbox.width / 2,
10560 y: fromBbox.top + fromBbox.height + config.nodeSpacing
10561 };
10562 const lineEnd = {
10563 x: toBbox.left + toBbox.width / 2,
10564 y: toBbox.top
10565 };
10566 svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');
10567 svgDrawLine(svg, [{
10568 x: fromBbox.left + fromBbox.width / 2,
10569 y: fromBbox.top + fromBbox.height
10570 }, {
10571 x: fromBbox.left + fromBbox.width / 2,
10572 y: fromBbox.top + fromBbox.height + config.nodeSpacing / 2
10573 }, {
10574 x: toBbox.left + toBbox.width / 2,
10575 y: lineStart.y - config.nodeSpacing / 2
10576 }, lineStart], color);
10577 } else {
10578 svgDrawLine(svg, [{
10579 'x': fromBbox.left + fromBbox.width / 2,
10580 'y': fromBbox.top + fromBbox.height
10581 }, {
10582 'x': fromBbox.left + fromBbox.width / 2,
10583 'y': fromBbox.top + config.nodeSpacing / 2
10584 }, {
10585 'x': toBbox.left + toBbox.width / 2,
10586 'y': toBbox.top - config.nodeSpacing / 2
10587 }, {
10588 'x': toBbox.left + toBbox.width / 2,
10589 'y': toBbox.top
10590 }], color);
10591 }
10592
10593 break;
10594 }
10595}
10596
10597function cloneNode(svg, selector) {
10598 return svg.select(selector).node().cloneNode(true);
10599}
10600
10601function renderCommitHistory(svg, commitid, branches, direction) {
10602 let commit;
10603 const numCommits = Object.keys(allCommitsDict).length;
10604
10605 if (typeof commitid === 'string') {
10606 do {
10607 commit = allCommitsDict[commitid];
10608 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('in renderCommitHistory', commit.id, commit.seq);
10609
10610 if (svg.select('#node-' + commitid).size() > 0) {
10611 return;
10612 }
10613
10614 svg.append(function () {
10615 return cloneNode(svg, '#def-commit');
10616 }).attr('class', 'commit').attr('id', function () {
10617 return 'node-' + commit.id;
10618 }).attr('transform', function () {
10619 switch (direction) {
10620 case 'LR':
10621 return 'translate(' + (commit.seq * config.nodeSpacing + config.leftMargin) + ', ' + branchNum * config.branchOffset + ')';
10622
10623 case 'BT':
10624 return 'translate(' + (branchNum * config.branchOffset + config.leftMargin) + ', ' + (numCommits - commit.seq) * config.nodeSpacing + ')';
10625 }
10626 }).attr('fill', config.nodeFillColor).attr('stroke', config.nodeStrokeColor).attr('stroke-width', config.nodeStrokeWidth);
10627 let branch;
10628
10629 for (let branchName in branches) {
10630 if (branches[branchName].commit === commit) {
10631 branch = branches[branchName];
10632 break;
10633 }
10634 }
10635
10636 if (branch) {
10637 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('found branch ', branch.name);
10638 svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'branch-label').text(branch.name + ', ');
10639 }
10640
10641 svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-id').text(commit.id);
10642
10643 if (commit.message !== '' && direction === 'BT') {
10644 svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-msg').text(', ' + commit.message);
10645 }
10646
10647 commitid = commit.parent;
10648 } while (commitid && allCommitsDict[commitid]);
10649 }
10650
10651 if (Array.isArray(commitid)) {
10652 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('found merge commmit', commitid);
10653 renderCommitHistory(svg, commitid[0], branches, direction);
10654 branchNum++;
10655 renderCommitHistory(svg, commitid[1], branches, direction);
10656 branchNum--;
10657 }
10658}
10659
10660function renderLines(svg, commit, direction, branchColor) {
10661 branchColor = branchColor || 0;
10662
10663 while (commit.seq > 0 && !commit.lineDrawn) {
10664 if (typeof commit.parent === 'string') {
10665 svgDrawLineForCommits(svg, commit.id, commit.parent, direction, branchColor);
10666 commit.lineDrawn = true;
10667 commit = allCommitsDict[commit.parent];
10668 } else if (Array.isArray(commit.parent)) {
10669 svgDrawLineForCommits(svg, commit.id, commit.parent[0], direction, branchColor);
10670 svgDrawLineForCommits(svg, commit.id, commit.parent[1], direction, branchColor + 1);
10671 renderLines(svg, allCommitsDict[commit.parent[1]], direction, branchColor + 1);
10672 commit.lineDrawn = true;
10673 commit = allCommitsDict[commit.parent[0]];
10674 }
10675 }
10676}
10677
10678const draw = function (txt, id, ver) {
10679 try {
10680 const parser = _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
10681 parser.yy = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"];
10682 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('in gitgraph renderer', txt, id, ver); // Parse the graph definition
10683
10684 parser.parse(txt + '\n');
10685 config = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.assign(config, apiConfig, _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getOptions());
10686 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('effective options', config);
10687 const direction = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection();
10688 allCommitsDict = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getCommits();
10689 const branches = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getBranchesAsObjArray();
10690
10691 if (direction === 'BT') {
10692 config.nodeLabel.x = branches.length * config.branchOffset;
10693 config.nodeLabel.width = '100%';
10694 config.nodeLabel.y = -1 * 2 * config.nodeRadius;
10695 }
10696
10697 const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`);
10698 svgCreateDefs(svg);
10699 branchNum = 1;
10700
10701 for (let branch in branches) {
10702 const v = branches[branch];
10703 renderCommitHistory(svg, v.commit.id, branches, direction);
10704 renderLines(svg, v.commit, direction);
10705 branchNum++;
10706 }
10707
10708 svg.attr('height', function () {
10709 if (direction === 'BT') return Object.keys(allCommitsDict).length * config.nodeSpacing;
10710 return (branches.length + 1) * config.branchOffset;
10711 });
10712 } catch (e) {
10713 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].error('Error while rendering gitgraph');
10714 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].error(e.message);
10715 }
10716};
10717/* harmony default export */ __webpack_exports__["default"] = ({
10718 setConf,
10719 draw
10720});
10721
10722/***/ }),
10723
10724/***/ "./src/diagrams/git/parser/gitGraph.js":
10725/*!*********************************************!*\
10726 !*** ./src/diagrams/git/parser/gitGraph.js ***!
10727 \*********************************************/
10728/*! no static exports found */
10729/***/ (function(module, exports, __webpack_require__) {
10730
10731/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
10732
10733/*
10734 Returns a Parser object of the following structure:
10735
10736 Parser: {
10737 yy: {}
10738 }
10739
10740 Parser.prototype: {
10741 yy: {},
10742 trace: function(),
10743 symbols_: {associative list: name ==> number},
10744 terminals_: {associative list: number ==> name},
10745 productions_: [...],
10746 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
10747 table: [...],
10748 defaultActions: {...},
10749 parseError: function(str, hash),
10750 parse: function(input),
10751
10752 lexer: {
10753 EOF: 1,
10754 parseError: function(str, hash),
10755 setInput: function(input),
10756 input: function(),
10757 unput: function(str),
10758 more: function(),
10759 less: function(n),
10760 pastInput: function(),
10761 upcomingInput: function(),
10762 showPosition: function(),
10763 test_match: function(regex_match_array, rule_index),
10764 next: function(),
10765 lex: function(),
10766 begin: function(condition),
10767 popState: function(),
10768 _currentRules: function(),
10769 topState: function(),
10770 pushState: function(condition),
10771
10772 options: {
10773 ranges: boolean (optional: true ==> token location info will include a .range[] member)
10774 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
10775 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)
10776 },
10777
10778 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
10779 rules: [...],
10780 conditions: {associative list: name ==> set},
10781 }
10782 }
10783
10784
10785 token location info (@$, _$, etc.): {
10786 first_line: n,
10787 last_line: n,
10788 first_column: n,
10789 last_column: n,
10790 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
10791 }
10792
10793
10794 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
10795 text: (matched text)
10796 token: (the produced terminal token, if any)
10797 line: (yylineno)
10798 }
10799 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
10800 loc: (yylloc)
10801 expected: (string describing the set of expected tokens)
10802 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
10803 }
10804*/
10805var parser = function () {
10806 var o = function (k, v, o, l) {
10807 for (o = o || {}, l = k.length; l--; o[k[l]] = v);
10808
10809 return o;
10810 },
10811 $V0 = [2, 3],
10812 $V1 = [1, 7],
10813 $V2 = [7, 12, 15, 17, 19, 20, 21],
10814 $V3 = [7, 11, 12, 15, 17, 19, 20, 21],
10815 $V4 = [2, 20],
10816 $V5 = [1, 32];
10817
10818 var parser = {
10819 trace: function trace() {},
10820 yy: {},
10821 symbols_: {
10822 "error": 2,
10823 "start": 3,
10824 "GG": 4,
10825 ":": 5,
10826 "document": 6,
10827 "EOF": 7,
10828 "DIR": 8,
10829 "options": 9,
10830 "body": 10,
10831 "OPT": 11,
10832 "NL": 12,
10833 "line": 13,
10834 "statement": 14,
10835 "COMMIT": 15,
10836 "commit_arg": 16,
10837 "BRANCH": 17,
10838 "ID": 18,
10839 "CHECKOUT": 19,
10840 "MERGE": 20,
10841 "RESET": 21,
10842 "reset_arg": 22,
10843 "STR": 23,
10844 "HEAD": 24,
10845 "reset_parents": 25,
10846 "CARET": 26,
10847 "$accept": 0,
10848 "$end": 1
10849 },
10850 terminals_: {
10851 2: "error",
10852 4: "GG",
10853 5: ":",
10854 7: "EOF",
10855 8: "DIR",
10856 11: "OPT",
10857 12: "NL",
10858 15: "COMMIT",
10859 17: "BRANCH",
10860 18: "ID",
10861 19: "CHECKOUT",
10862 20: "MERGE",
10863 21: "RESET",
10864 23: "STR",
10865 24: "HEAD",
10866 26: "CARET"
10867 },
10868 productions_: [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]],
10869 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
10870 /* action[1] */
10871 , $$
10872 /* vstack */
10873 , _$
10874 /* lstack */
10875 ) {
10876 /* this == yyval */
10877 var $0 = $$.length - 1;
10878
10879 switch (yystate) {
10880 case 1:
10881 return $$[$0 - 1];
10882 break;
10883
10884 case 2:
10885 yy.setDirection($$[$0 - 3]);
10886 return $$[$0 - 1];
10887 break;
10888
10889 case 4:
10890 yy.setOptions($$[$0 - 1]);
10891 this.$ = $$[$0];
10892 break;
10893
10894 case 5:
10895 $$[$0 - 1] += $$[$0];
10896 this.$ = $$[$0 - 1];
10897 break;
10898
10899 case 7:
10900 this.$ = [];
10901 break;
10902
10903 case 8:
10904 $$[$0 - 1].push($$[$0]);
10905 this.$ = $$[$0 - 1];
10906 break;
10907
10908 case 9:
10909 this.$ = $$[$0 - 1];
10910 break;
10911
10912 case 11:
10913 yy.commit($$[$0]);
10914 break;
10915
10916 case 12:
10917 yy.branch($$[$0]);
10918 break;
10919
10920 case 13:
10921 yy.checkout($$[$0]);
10922 break;
10923
10924 case 14:
10925 yy.merge($$[$0]);
10926 break;
10927
10928 case 15:
10929 yy.reset($$[$0]);
10930 break;
10931
10932 case 16:
10933 this.$ = "";
10934 break;
10935
10936 case 17:
10937 this.$ = $$[$0];
10938 break;
10939
10940 case 18:
10941 this.$ = $$[$0 - 1] + ":" + $$[$0];
10942 break;
10943
10944 case 19:
10945 this.$ = $$[$0 - 1] + ":" + yy.count;
10946 yy.count = 0;
10947 break;
10948
10949 case 20:
10950 yy.count = 0;
10951 break;
10952
10953 case 21:
10954 yy.count += 1;
10955 break;
10956 }
10957 },
10958 table: [{
10959 3: 1,
10960 4: [1, 2]
10961 }, {
10962 1: [3]
10963 }, {
10964 5: [1, 3],
10965 8: [1, 4]
10966 }, {
10967 6: 5,
10968 7: $V0,
10969 9: 6,
10970 12: $V1
10971 }, {
10972 5: [1, 8]
10973 }, {
10974 7: [1, 9]
10975 }, o($V2, [2, 7], {
10976 10: 10,
10977 11: [1, 11]
10978 }), o($V3, [2, 6]), {
10979 6: 12,
10980 7: $V0,
10981 9: 6,
10982 12: $V1
10983 }, {
10984 1: [2, 1]
10985 }, {
10986 7: [2, 4],
10987 12: [1, 15],
10988 13: 13,
10989 14: 14,
10990 15: [1, 16],
10991 17: [1, 17],
10992 19: [1, 18],
10993 20: [1, 19],
10994 21: [1, 20]
10995 }, o($V3, [2, 5]), {
10996 7: [1, 21]
10997 }, o($V2, [2, 8]), {
10998 12: [1, 22]
10999 }, o($V2, [2, 10]), {
11000 12: [2, 16],
11001 16: 23,
11002 23: [1, 24]
11003 }, {
11004 18: [1, 25]
11005 }, {
11006 18: [1, 26]
11007 }, {
11008 18: [1, 27]
11009 }, {
11010 18: [1, 30],
11011 22: 28,
11012 24: [1, 29]
11013 }, {
11014 1: [2, 2]
11015 }, o($V2, [2, 9]), {
11016 12: [2, 11]
11017 }, {
11018 12: [2, 17]
11019 }, {
11020 12: [2, 12]
11021 }, {
11022 12: [2, 13]
11023 }, {
11024 12: [2, 14]
11025 }, {
11026 12: [2, 15]
11027 }, {
11028 12: $V4,
11029 25: 31,
11030 26: $V5
11031 }, {
11032 12: $V4,
11033 25: 33,
11034 26: $V5
11035 }, {
11036 12: [2, 18]
11037 }, {
11038 12: $V4,
11039 25: 34,
11040 26: $V5
11041 }, {
11042 12: [2, 19]
11043 }, {
11044 12: [2, 21]
11045 }],
11046 defaultActions: {
11047 9: [2, 1],
11048 21: [2, 2],
11049 23: [2, 11],
11050 24: [2, 17],
11051 25: [2, 12],
11052 26: [2, 13],
11053 27: [2, 14],
11054 28: [2, 15],
11055 31: [2, 18],
11056 33: [2, 19],
11057 34: [2, 21]
11058 },
11059 parseError: function parseError(str, hash) {
11060 if (hash.recoverable) {
11061 this.trace(str);
11062 } else {
11063 var error = new Error(str);
11064 error.hash = hash;
11065 throw error;
11066 }
11067 },
11068 parse: function parse(input) {
11069 var self = this,
11070 stack = [0],
11071 tstack = [],
11072 vstack = [null],
11073 lstack = [],
11074 table = this.table,
11075 yytext = '',
11076 yylineno = 0,
11077 yyleng = 0,
11078 recovering = 0,
11079 TERROR = 2,
11080 EOF = 1;
11081 var args = lstack.slice.call(arguments, 1);
11082 var lexer = Object.create(this.lexer);
11083 var sharedState = {
11084 yy: {}
11085 };
11086
11087 for (var k in this.yy) {
11088 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
11089 sharedState.yy[k] = this.yy[k];
11090 }
11091 }
11092
11093 lexer.setInput(input, sharedState.yy);
11094 sharedState.yy.lexer = lexer;
11095 sharedState.yy.parser = this;
11096
11097 if (typeof lexer.yylloc == 'undefined') {
11098 lexer.yylloc = {};
11099 }
11100
11101 var yyloc = lexer.yylloc;
11102 lstack.push(yyloc);
11103 var ranges = lexer.options && lexer.options.ranges;
11104
11105 if (typeof sharedState.yy.parseError === 'function') {
11106 this.parseError = sharedState.yy.parseError;
11107 } else {
11108 this.parseError = Object.getPrototypeOf(this).parseError;
11109 }
11110
11111 function popStack(n) {
11112 stack.length = stack.length - 2 * n;
11113 vstack.length = vstack.length - n;
11114 lstack.length = lstack.length - n;
11115 }
11116
11117 function lex() {
11118 var token;
11119 token = tstack.pop() || lexer.lex() || EOF;
11120
11121 if (typeof token !== 'number') {
11122 if (token instanceof Array) {
11123 tstack = token;
11124 token = tstack.pop();
11125 }
11126
11127 token = self.symbols_[token] || token;
11128 }
11129
11130 return token;
11131 }
11132
11133 var symbol,
11134 preErrorSymbol,
11135 state,
11136 action,
11137 a,
11138 r,
11139 yyval = {},
11140 p,
11141 len,
11142 newState,
11143 expected;
11144
11145 while (true) {
11146 state = stack[stack.length - 1];
11147
11148 if (this.defaultActions[state]) {
11149 action = this.defaultActions[state];
11150 } else {
11151 if (symbol === null || typeof symbol == 'undefined') {
11152 symbol = lex();
11153 }
11154
11155 action = table[state] && table[state][symbol];
11156 }
11157
11158 if (typeof action === 'undefined' || !action.length || !action[0]) {
11159 var errStr = '';
11160 expected = [];
11161
11162 for (p in table[state]) {
11163 if (this.terminals_[p] && p > TERROR) {
11164 expected.push('\'' + this.terminals_[p] + '\'');
11165 }
11166 }
11167
11168 if (lexer.showPosition) {
11169 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
11170 } else {
11171 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
11172 }
11173
11174 this.parseError(errStr, {
11175 text: lexer.match,
11176 token: this.terminals_[symbol] || symbol,
11177 line: lexer.yylineno,
11178 loc: yyloc,
11179 expected: expected
11180 });
11181 }
11182
11183 if (action[0] instanceof Array && action.length > 1) {
11184 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
11185 }
11186
11187 switch (action[0]) {
11188 case 1:
11189 stack.push(symbol);
11190 vstack.push(lexer.yytext);
11191 lstack.push(lexer.yylloc);
11192 stack.push(action[1]);
11193 symbol = null;
11194
11195 if (!preErrorSymbol) {
11196 yyleng = lexer.yyleng;
11197 yytext = lexer.yytext;
11198 yylineno = lexer.yylineno;
11199 yyloc = lexer.yylloc;
11200
11201 if (recovering > 0) {
11202 recovering--;
11203 }
11204 } else {
11205 symbol = preErrorSymbol;
11206 preErrorSymbol = null;
11207 }
11208
11209 break;
11210
11211 case 2:
11212 len = this.productions_[action[1]][1];
11213 yyval.$ = vstack[vstack.length - len];
11214 yyval._$ = {
11215 first_line: lstack[lstack.length - (len || 1)].first_line,
11216 last_line: lstack[lstack.length - 1].last_line,
11217 first_column: lstack[lstack.length - (len || 1)].first_column,
11218 last_column: lstack[lstack.length - 1].last_column
11219 };
11220
11221 if (ranges) {
11222 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
11223 }
11224
11225 r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
11226
11227 if (typeof r !== 'undefined') {
11228 return r;
11229 }
11230
11231 if (len) {
11232 stack = stack.slice(0, -1 * len * 2);
11233 vstack = vstack.slice(0, -1 * len);
11234 lstack = lstack.slice(0, -1 * len);
11235 }
11236
11237 stack.push(this.productions_[action[1]][0]);
11238 vstack.push(yyval.$);
11239 lstack.push(yyval._$);
11240 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
11241 stack.push(newState);
11242 break;
11243
11244 case 3:
11245 return true;
11246 }
11247 }
11248
11249 return true;
11250 }
11251 };
11252 /* generated by jison-lex 0.3.4 */
11253
11254 var lexer = function () {
11255 var lexer = {
11256 EOF: 1,
11257 parseError: function parseError(str, hash) {
11258 if (this.yy.parser) {
11259 this.yy.parser.parseError(str, hash);
11260 } else {
11261 throw new Error(str);
11262 }
11263 },
11264 // resets the lexer, sets new input
11265 setInput: function (input, yy) {
11266 this.yy = yy || this.yy || {};
11267 this._input = input;
11268 this._more = this._backtrack = this.done = false;
11269 this.yylineno = this.yyleng = 0;
11270 this.yytext = this.matched = this.match = '';
11271 this.conditionStack = ['INITIAL'];
11272 this.yylloc = {
11273 first_line: 1,
11274 first_column: 0,
11275 last_line: 1,
11276 last_column: 0
11277 };
11278
11279 if (this.options.ranges) {
11280 this.yylloc.range = [0, 0];
11281 }
11282
11283 this.offset = 0;
11284 return this;
11285 },
11286 // consumes and returns one char from the input
11287 input: function () {
11288 var ch = this._input[0];
11289 this.yytext += ch;
11290 this.yyleng++;
11291 this.offset++;
11292 this.match += ch;
11293 this.matched += ch;
11294 var lines = ch.match(/(?:\r\n?|\n).*/g);
11295
11296 if (lines) {
11297 this.yylineno++;
11298 this.yylloc.last_line++;
11299 } else {
11300 this.yylloc.last_column++;
11301 }
11302
11303 if (this.options.ranges) {
11304 this.yylloc.range[1]++;
11305 }
11306
11307 this._input = this._input.slice(1);
11308 return ch;
11309 },
11310 // unshifts one char (or a string) into the input
11311 unput: function (ch) {
11312 var len = ch.length;
11313 var lines = ch.split(/(?:\r\n?|\n)/g);
11314 this._input = ch + this._input;
11315 this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;
11316
11317 this.offset -= len;
11318 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
11319 this.match = this.match.substr(0, this.match.length - 1);
11320 this.matched = this.matched.substr(0, this.matched.length - 1);
11321
11322 if (lines.length - 1) {
11323 this.yylineno -= lines.length - 1;
11324 }
11325
11326 var r = this.yylloc.range;
11327 this.yylloc = {
11328 first_line: this.yylloc.first_line,
11329 last_line: this.yylineno + 1,
11330 first_column: this.yylloc.first_column,
11331 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
11332 };
11333
11334 if (this.options.ranges) {
11335 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
11336 }
11337
11338 this.yyleng = this.yytext.length;
11339 return this;
11340 },
11341 // When called from action, caches matched text and appends it on next action
11342 more: function () {
11343 this._more = true;
11344 return this;
11345 },
11346 // 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.
11347 reject: function () {
11348 if (this.options.backtrack_lexer) {
11349 this._backtrack = true;
11350 } else {
11351 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(), {
11352 text: "",
11353 token: null,
11354 line: this.yylineno
11355 });
11356 }
11357
11358 return this;
11359 },
11360 // retain first n characters of the match
11361 less: function (n) {
11362 this.unput(this.match.slice(n));
11363 },
11364 // displays already matched input, i.e. for error messages
11365 pastInput: function () {
11366 var past = this.matched.substr(0, this.matched.length - this.match.length);
11367 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
11368 },
11369 // displays upcoming input, i.e. for error messages
11370 upcomingInput: function () {
11371 var next = this.match;
11372
11373 if (next.length < 20) {
11374 next += this._input.substr(0, 20 - next.length);
11375 }
11376
11377 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
11378 },
11379 // displays the character position where the lexing error occurred, i.e. for error messages
11380 showPosition: function () {
11381 var pre = this.pastInput();
11382 var c = new Array(pre.length + 1).join("-");
11383 return pre + this.upcomingInput() + "\n" + c + "^";
11384 },
11385 // test the lexed token: return FALSE when not a match, otherwise return token
11386 test_match: function (match, indexed_rule) {
11387 var token, lines, backup;
11388
11389 if (this.options.backtrack_lexer) {
11390 // save context
11391 backup = {
11392 yylineno: this.yylineno,
11393 yylloc: {
11394 first_line: this.yylloc.first_line,
11395 last_line: this.last_line,
11396 first_column: this.yylloc.first_column,
11397 last_column: this.yylloc.last_column
11398 },
11399 yytext: this.yytext,
11400 match: this.match,
11401 matches: this.matches,
11402 matched: this.matched,
11403 yyleng: this.yyleng,
11404 offset: this.offset,
11405 _more: this._more,
11406 _input: this._input,
11407 yy: this.yy,
11408 conditionStack: this.conditionStack.slice(0),
11409 done: this.done
11410 };
11411
11412 if (this.options.ranges) {
11413 backup.yylloc.range = this.yylloc.range.slice(0);
11414 }
11415 }
11416
11417 lines = match[0].match(/(?:\r\n?|\n).*/g);
11418
11419 if (lines) {
11420 this.yylineno += lines.length;
11421 }
11422
11423 this.yylloc = {
11424 first_line: this.yylloc.last_line,
11425 last_line: this.yylineno + 1,
11426 first_column: this.yylloc.last_column,
11427 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
11428 };
11429 this.yytext += match[0];
11430 this.match += match[0];
11431 this.matches = match;
11432 this.yyleng = this.yytext.length;
11433
11434 if (this.options.ranges) {
11435 this.yylloc.range = [this.offset, this.offset += this.yyleng];
11436 }
11437
11438 this._more = false;
11439 this._backtrack = false;
11440 this._input = this._input.slice(match[0].length);
11441 this.matched += match[0];
11442 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
11443
11444 if (this.done && this._input) {
11445 this.done = false;
11446 }
11447
11448 if (token) {
11449 return token;
11450 } else if (this._backtrack) {
11451 // recover context
11452 for (var k in backup) {
11453 this[k] = backup[k];
11454 }
11455
11456 return false; // rule action called reject() implying the next rule should be tested instead.
11457 }
11458
11459 return false;
11460 },
11461 // return next match in input
11462 next: function () {
11463 if (this.done) {
11464 return this.EOF;
11465 }
11466
11467 if (!this._input) {
11468 this.done = true;
11469 }
11470
11471 var token, match, tempMatch, index;
11472
11473 if (!this._more) {
11474 this.yytext = '';
11475 this.match = '';
11476 }
11477
11478 var rules = this._currentRules();
11479
11480 for (var i = 0; i < rules.length; i++) {
11481 tempMatch = this._input.match(this.rules[rules[i]]);
11482
11483 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
11484 match = tempMatch;
11485 index = i;
11486
11487 if (this.options.backtrack_lexer) {
11488 token = this.test_match(tempMatch, rules[i]);
11489
11490 if (token !== false) {
11491 return token;
11492 } else if (this._backtrack) {
11493 match = false;
11494 continue; // rule action called reject() implying a rule MISmatch.
11495 } else {
11496 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
11497 return false;
11498 }
11499 } else if (!this.options.flex) {
11500 break;
11501 }
11502 }
11503 }
11504
11505 if (match) {
11506 token = this.test_match(match, rules[index]);
11507
11508 if (token !== false) {
11509 return token;
11510 } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
11511
11512
11513 return false;
11514 }
11515
11516 if (this._input === "") {
11517 return this.EOF;
11518 } else {
11519 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
11520 text: "",
11521 token: null,
11522 line: this.yylineno
11523 });
11524 }
11525 },
11526 // return next match that has a token
11527 lex: function lex() {
11528 var r = this.next();
11529
11530 if (r) {
11531 return r;
11532 } else {
11533 return this.lex();
11534 }
11535 },
11536 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
11537 begin: function begin(condition) {
11538 this.conditionStack.push(condition);
11539 },
11540 // pop the previously active lexer condition state off the condition stack
11541 popState: function popState() {
11542 var n = this.conditionStack.length - 1;
11543
11544 if (n > 0) {
11545 return this.conditionStack.pop();
11546 } else {
11547 return this.conditionStack[0];
11548 }
11549 },
11550 // produce the lexer rule set which is active for the currently active lexer condition state
11551 _currentRules: function _currentRules() {
11552 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
11553 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
11554 } else {
11555 return this.conditions["INITIAL"].rules;
11556 }
11557 },
11558 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
11559 topState: function topState(n) {
11560 n = this.conditionStack.length - 1 - Math.abs(n || 0);
11561
11562 if (n >= 0) {
11563 return this.conditionStack[n];
11564 } else {
11565 return "INITIAL";
11566 }
11567 },
11568 // alias for begin(condition)
11569 pushState: function pushState(condition) {
11570 this.begin(condition);
11571 },
11572 // return the number of states currently on the stack
11573 stateStackSize: function stateStackSize() {
11574 return this.conditionStack.length;
11575 },
11576 options: {
11577 "case-insensitive": true
11578 },
11579 performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
11580 var YYSTATE = YY_START;
11581
11582 switch ($avoiding_name_collisions) {
11583 case 0:
11584 return 12;
11585 break;
11586
11587 case 1:
11588 /* skip all whitespace */
11589 break;
11590
11591 case 2:
11592 /* skip comments */
11593 break;
11594
11595 case 3:
11596 /* skip comments */
11597 break;
11598
11599 case 4:
11600 return 4;
11601 break;
11602
11603 case 5:
11604 return 15;
11605 break;
11606
11607 case 6:
11608 return 17;
11609 break;
11610
11611 case 7:
11612 return 20;
11613 break;
11614
11615 case 8:
11616 return 21;
11617 break;
11618
11619 case 9:
11620 return 19;
11621 break;
11622
11623 case 10:
11624 return 8;
11625 break;
11626
11627 case 11:
11628 return 8;
11629 break;
11630
11631 case 12:
11632 return 5;
11633 break;
11634
11635 case 13:
11636 return 26;
11637 break;
11638
11639 case 14:
11640 this.begin("options");
11641 break;
11642
11643 case 15:
11644 this.popState();
11645 break;
11646
11647 case 16:
11648 return 11;
11649 break;
11650
11651 case 17:
11652 this.begin("string");
11653 break;
11654
11655 case 18:
11656 this.popState();
11657 break;
11658
11659 case 19:
11660 return 23;
11661 break;
11662
11663 case 20:
11664 return 18;
11665 break;
11666
11667 case 21:
11668 return 7;
11669 break;
11670 }
11671 },
11672 rules: [/^(?:(\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_]+)/i, /^(?:$)/i],
11673 conditions: {
11674 "options": {
11675 "rules": [15, 16],
11676 "inclusive": false
11677 },
11678 "string": {
11679 "rules": [18, 19],
11680 "inclusive": false
11681 },
11682 "INITIAL": {
11683 "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 20, 21],
11684 "inclusive": true
11685 }
11686 }
11687 };
11688 return lexer;
11689 }();
11690
11691 parser.lexer = lexer;
11692
11693 function Parser() {
11694 this.yy = {};
11695 }
11696
11697 Parser.prototype = parser;
11698 parser.Parser = Parser;
11699 return new Parser();
11700}();
11701
11702if (true) {
11703 exports.parser = parser;
11704 exports.Parser = parser.Parser;
11705
11706 exports.parse = function () {
11707 return parser.parse.apply(parser, arguments);
11708 };
11709
11710 exports.main = function commonjsMain(args) {
11711 if (!args[1]) {
11712 console.log('Usage: ' + args[0] + ' FILE');
11713 process.exit(1);
11714 }
11715
11716 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
11717
11718 return exports.parser.parse(source);
11719 };
11720
11721 if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
11722 exports.main(process.argv.slice(1));
11723 }
11724}
11725/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
11726
11727/***/ }),
11728
11729/***/ "./src/diagrams/info/infoDb.js":
11730/*!*************************************!*\
11731 !*** ./src/diagrams/info/infoDb.js ***!
11732 \*************************************/
11733/*! exports provided: setMessage, getMessage, setInfo, getInfo, default */
11734/***/ (function(module, __webpack_exports__, __webpack_require__) {
11735
11736"use strict";
11737__webpack_require__.r(__webpack_exports__);
11738/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setMessage", function() { return setMessage; });
11739/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMessage", function() { return getMessage; });
11740/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setInfo", function() { return setInfo; });
11741/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInfo", function() { return getInfo; });
11742/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
11743/**
11744 * Created by knut on 15-01-14.
11745 */
11746
11747var message = '';
11748var info = false;
11749const setMessage = txt => {
11750 _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Setting message to: ' + txt);
11751 message = txt;
11752};
11753const getMessage = () => {
11754 return message;
11755};
11756const setInfo = inf => {
11757 info = inf;
11758};
11759const getInfo = () => {
11760 return info;
11761}; // export const parseError = (err, hash) => {
11762// global.mermaidAPI.parseError(err, hash)
11763// }
11764
11765/* harmony default export */ __webpack_exports__["default"] = ({
11766 setMessage,
11767 getMessage,
11768 setInfo,
11769 getInfo // parseError
11770
11771});
11772
11773/***/ }),
11774
11775/***/ "./src/diagrams/info/infoRenderer.js":
11776/*!*******************************************!*\
11777 !*** ./src/diagrams/info/infoRenderer.js ***!
11778 \*******************************************/
11779/*! exports provided: setConf, draw, default */
11780/***/ (function(module, __webpack_exports__, __webpack_require__) {
11781
11782"use strict";
11783__webpack_require__.r(__webpack_exports__);
11784/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
11785/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
11786/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
11787/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
11788/* harmony import */ var _infoDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./infoDb */ "./src/diagrams/info/infoDb.js");
11789/* harmony import */ var _parser_info_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/info.js */ "./src/diagrams/info/parser/info.js");
11790/* harmony import */ var _parser_info_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_info_js__WEBPACK_IMPORTED_MODULE_2__);
11791/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
11792/**
11793 * Created by knut on 14-12-11.
11794 */
11795
11796
11797
11798
11799const conf = {};
11800const setConf = function (cnf) {
11801 const keys = Object.keys(cnf);
11802 keys.forEach(function (key) {
11803 conf[key] = cnf[key];
11804 });
11805};
11806/**
11807 * Draws a an info picture in the tag with id: id based on the graph definition in text.
11808 * @param text
11809 * @param id
11810 */
11811
11812const draw = (txt, id, ver) => {
11813 try {
11814 const parser = _parser_info_js__WEBPACK_IMPORTED_MODULE_2___default.a.parser;
11815 parser.yy = _infoDb__WEBPACK_IMPORTED_MODULE_1__["default"];
11816 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Renering info diagram\n' + txt); // Parse the graph definition
11817
11818 parser.parse(txt);
11819 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Parsed info diagram'); // Fetch the default direction, use TD if none was found
11820
11821 const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#' + id);
11822 const g = svg.append('g');
11823 g.append('text') // text label for the x axis
11824 .attr('x', 100).attr('y', 40).attr('class', 'version').attr('font-size', '32px').style('text-anchor', 'middle').text('v ' + ver);
11825 svg.attr('height', 100);
11826 svg.attr('width', 400); // svg.attr('viewBox', '0 0 300 150');
11827 } catch (e) {
11828 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error('Error while rendering info diagram');
11829 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error(e.message);
11830 }
11831};
11832/* harmony default export */ __webpack_exports__["default"] = ({
11833 setConf,
11834 draw
11835});
11836
11837/***/ }),
11838
11839/***/ "./src/diagrams/info/parser/info.js":
11840/*!******************************************!*\
11841 !*** ./src/diagrams/info/parser/info.js ***!
11842 \******************************************/
11843/*! no static exports found */
11844/***/ (function(module, exports, __webpack_require__) {
11845
11846/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
11847
11848/*
11849 Returns a Parser object of the following structure:
11850
11851 Parser: {
11852 yy: {}
11853 }
11854
11855 Parser.prototype: {
11856 yy: {},
11857 trace: function(),
11858 symbols_: {associative list: name ==> number},
11859 terminals_: {associative list: number ==> name},
11860 productions_: [...],
11861 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
11862 table: [...],
11863 defaultActions: {...},
11864 parseError: function(str, hash),
11865 parse: function(input),
11866
11867 lexer: {
11868 EOF: 1,
11869 parseError: function(str, hash),
11870 setInput: function(input),
11871 input: function(),
11872 unput: function(str),
11873 more: function(),
11874 less: function(n),
11875 pastInput: function(),
11876 upcomingInput: function(),
11877 showPosition: function(),
11878 test_match: function(regex_match_array, rule_index),
11879 next: function(),
11880 lex: function(),
11881 begin: function(condition),
11882 popState: function(),
11883 _currentRules: function(),
11884 topState: function(),
11885 pushState: function(condition),
11886
11887 options: {
11888 ranges: boolean (optional: true ==> token location info will include a .range[] member)
11889 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
11890 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)
11891 },
11892
11893 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
11894 rules: [...],
11895 conditions: {associative list: name ==> set},
11896 }
11897 }
11898
11899
11900 token location info (@$, _$, etc.): {
11901 first_line: n,
11902 last_line: n,
11903 first_column: n,
11904 last_column: n,
11905 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
11906 }
11907
11908
11909 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
11910 text: (matched text)
11911 token: (the produced terminal token, if any)
11912 line: (yylineno)
11913 }
11914 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
11915 loc: (yylloc)
11916 expected: (string describing the set of expected tokens)
11917 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
11918 }
11919*/
11920var parser = function () {
11921 var o = function (k, v, o, l) {
11922 for (o = o || {}, l = k.length; l--; o[k[l]] = v);
11923
11924 return o;
11925 },
11926 $V0 = [6, 9, 10];
11927
11928 var parser = {
11929 trace: function trace() {},
11930 yy: {},
11931 symbols_: {
11932 "error": 2,
11933 "start": 3,
11934 "info": 4,
11935 "document": 5,
11936 "EOF": 6,
11937 "line": 7,
11938 "statement": 8,
11939 "NL": 9,
11940 "showInfo": 10,
11941 "$accept": 0,
11942 "$end": 1
11943 },
11944 terminals_: {
11945 2: "error",
11946 4: "info",
11947 6: "EOF",
11948 9: "NL",
11949 10: "showInfo"
11950 },
11951 productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1]],
11952 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
11953 /* action[1] */
11954 , $$
11955 /* vstack */
11956 , _$
11957 /* lstack */
11958 ) {
11959 /* this == yyval */
11960 var $0 = $$.length - 1;
11961
11962 switch (yystate) {
11963 case 1:
11964 return yy;
11965 break;
11966
11967 case 4:
11968 break;
11969
11970 case 6:
11971 yy.setInfo(true);
11972 break;
11973 }
11974 },
11975 table: [{
11976 3: 1,
11977 4: [1, 2]
11978 }, {
11979 1: [3]
11980 }, o($V0, [2, 2], {
11981 5: 3
11982 }), {
11983 6: [1, 4],
11984 7: 5,
11985 8: 6,
11986 9: [1, 7],
11987 10: [1, 8]
11988 }, {
11989 1: [2, 1]
11990 }, o($V0, [2, 3]), o($V0, [2, 4]), o($V0, [2, 5]), o($V0, [2, 6])],
11991 defaultActions: {
11992 4: [2, 1]
11993 },
11994 parseError: function parseError(str, hash) {
11995 if (hash.recoverable) {
11996 this.trace(str);
11997 } else {
11998 var error = new Error(str);
11999 error.hash = hash;
12000 throw error;
12001 }
12002 },
12003 parse: function parse(input) {
12004 var self = this,
12005 stack = [0],
12006 tstack = [],
12007 vstack = [null],
12008 lstack = [],
12009 table = this.table,
12010 yytext = '',
12011 yylineno = 0,
12012 yyleng = 0,
12013 recovering = 0,
12014 TERROR = 2,
12015 EOF = 1;
12016 var args = lstack.slice.call(arguments, 1);
12017 var lexer = Object.create(this.lexer);
12018 var sharedState = {
12019 yy: {}
12020 };
12021
12022 for (var k in this.yy) {
12023 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
12024 sharedState.yy[k] = this.yy[k];
12025 }
12026 }
12027
12028 lexer.setInput(input, sharedState.yy);
12029 sharedState.yy.lexer = lexer;
12030 sharedState.yy.parser = this;
12031
12032 if (typeof lexer.yylloc == 'undefined') {
12033 lexer.yylloc = {};
12034 }
12035
12036 var yyloc = lexer.yylloc;
12037 lstack.push(yyloc);
12038 var ranges = lexer.options && lexer.options.ranges;
12039
12040 if (typeof sharedState.yy.parseError === 'function') {
12041 this.parseError = sharedState.yy.parseError;
12042 } else {
12043 this.parseError = Object.getPrototypeOf(this).parseError;
12044 }
12045
12046 function popStack(n) {
12047 stack.length = stack.length - 2 * n;
12048 vstack.length = vstack.length - n;
12049 lstack.length = lstack.length - n;
12050 }
12051
12052 function lex() {
12053 var token;
12054 token = tstack.pop() || lexer.lex() || EOF;
12055
12056 if (typeof token !== 'number') {
12057 if (token instanceof Array) {
12058 tstack = token;
12059 token = tstack.pop();
12060 }
12061
12062 token = self.symbols_[token] || token;
12063 }
12064
12065 return token;
12066 }
12067
12068 var symbol,
12069 preErrorSymbol,
12070 state,
12071 action,
12072 a,
12073 r,
12074 yyval = {},
12075 p,
12076 len,
12077 newState,
12078 expected;
12079
12080 while (true) {
12081 state = stack[stack.length - 1];
12082
12083 if (this.defaultActions[state]) {
12084 action = this.defaultActions[state];
12085 } else {
12086 if (symbol === null || typeof symbol == 'undefined') {
12087 symbol = lex();
12088 }
12089
12090 action = table[state] && table[state][symbol];
12091 }
12092
12093 if (typeof action === 'undefined' || !action.length || !action[0]) {
12094 var errStr = '';
12095 expected = [];
12096
12097 for (p in table[state]) {
12098 if (this.terminals_[p] && p > TERROR) {
12099 expected.push('\'' + this.terminals_[p] + '\'');
12100 }
12101 }
12102
12103 if (lexer.showPosition) {
12104 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
12105 } else {
12106 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
12107 }
12108
12109 this.parseError(errStr, {
12110 text: lexer.match,
12111 token: this.terminals_[symbol] || symbol,
12112 line: lexer.yylineno,
12113 loc: yyloc,
12114 expected: expected
12115 });
12116 }
12117
12118 if (action[0] instanceof Array && action.length > 1) {
12119 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
12120 }
12121
12122 switch (action[0]) {
12123 case 1:
12124 stack.push(symbol);
12125 vstack.push(lexer.yytext);
12126 lstack.push(lexer.yylloc);
12127 stack.push(action[1]);
12128 symbol = null;
12129
12130 if (!preErrorSymbol) {
12131 yyleng = lexer.yyleng;
12132 yytext = lexer.yytext;
12133 yylineno = lexer.yylineno;
12134 yyloc = lexer.yylloc;
12135
12136 if (recovering > 0) {
12137 recovering--;
12138 }
12139 } else {
12140 symbol = preErrorSymbol;
12141 preErrorSymbol = null;
12142 }
12143
12144 break;
12145
12146 case 2:
12147 len = this.productions_[action[1]][1];
12148 yyval.$ = vstack[vstack.length - len];
12149 yyval._$ = {
12150 first_line: lstack[lstack.length - (len || 1)].first_line,
12151 last_line: lstack[lstack.length - 1].last_line,
12152 first_column: lstack[lstack.length - (len || 1)].first_column,
12153 last_column: lstack[lstack.length - 1].last_column
12154 };
12155
12156 if (ranges) {
12157 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
12158 }
12159
12160 r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
12161
12162 if (typeof r !== 'undefined') {
12163 return r;
12164 }
12165
12166 if (len) {
12167 stack = stack.slice(0, -1 * len * 2);
12168 vstack = vstack.slice(0, -1 * len);
12169 lstack = lstack.slice(0, -1 * len);
12170 }
12171
12172 stack.push(this.productions_[action[1]][0]);
12173 vstack.push(yyval.$);
12174 lstack.push(yyval._$);
12175 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
12176 stack.push(newState);
12177 break;
12178
12179 case 3:
12180 return true;
12181 }
12182 }
12183
12184 return true;
12185 }
12186 };
12187 /* generated by jison-lex 0.3.4 */
12188
12189 var lexer = function () {
12190 var lexer = {
12191 EOF: 1,
12192 parseError: function parseError(str, hash) {
12193 if (this.yy.parser) {
12194 this.yy.parser.parseError(str, hash);
12195 } else {
12196 throw new Error(str);
12197 }
12198 },
12199 // resets the lexer, sets new input
12200 setInput: function (input, yy) {
12201 this.yy = yy || this.yy || {};
12202 this._input = input;
12203 this._more = this._backtrack = this.done = false;
12204 this.yylineno = this.yyleng = 0;
12205 this.yytext = this.matched = this.match = '';
12206 this.conditionStack = ['INITIAL'];
12207 this.yylloc = {
12208 first_line: 1,
12209 first_column: 0,
12210 last_line: 1,
12211 last_column: 0
12212 };
12213
12214 if (this.options.ranges) {
12215 this.yylloc.range = [0, 0];
12216 }
12217
12218 this.offset = 0;
12219 return this;
12220 },
12221 // consumes and returns one char from the input
12222 input: function () {
12223 var ch = this._input[0];
12224 this.yytext += ch;
12225 this.yyleng++;
12226 this.offset++;
12227 this.match += ch;
12228 this.matched += ch;
12229 var lines = ch.match(/(?:\r\n?|\n).*/g);
12230
12231 if (lines) {
12232 this.yylineno++;
12233 this.yylloc.last_line++;
12234 } else {
12235 this.yylloc.last_column++;
12236 }
12237
12238 if (this.options.ranges) {
12239 this.yylloc.range[1]++;
12240 }
12241
12242 this._input = this._input.slice(1);
12243 return ch;
12244 },
12245 // unshifts one char (or a string) into the input
12246 unput: function (ch) {
12247 var len = ch.length;
12248 var lines = ch.split(/(?:\r\n?|\n)/g);
12249 this._input = ch + this._input;
12250 this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;
12251
12252 this.offset -= len;
12253 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
12254 this.match = this.match.substr(0, this.match.length - 1);
12255 this.matched = this.matched.substr(0, this.matched.length - 1);
12256
12257 if (lines.length - 1) {
12258 this.yylineno -= lines.length - 1;
12259 }
12260
12261 var r = this.yylloc.range;
12262 this.yylloc = {
12263 first_line: this.yylloc.first_line,
12264 last_line: this.yylineno + 1,
12265 first_column: this.yylloc.first_column,
12266 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
12267 };
12268
12269 if (this.options.ranges) {
12270 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
12271 }
12272
12273 this.yyleng = this.yytext.length;
12274 return this;
12275 },
12276 // When called from action, caches matched text and appends it on next action
12277 more: function () {
12278 this._more = true;
12279 return this;
12280 },
12281 // 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.
12282 reject: function () {
12283 if (this.options.backtrack_lexer) {
12284 this._backtrack = true;
12285 } else {
12286 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(), {
12287 text: "",
12288 token: null,
12289 line: this.yylineno
12290 });
12291 }
12292
12293 return this;
12294 },
12295 // retain first n characters of the match
12296 less: function (n) {
12297 this.unput(this.match.slice(n));
12298 },
12299 // displays already matched input, i.e. for error messages
12300 pastInput: function () {
12301 var past = this.matched.substr(0, this.matched.length - this.match.length);
12302 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
12303 },
12304 // displays upcoming input, i.e. for error messages
12305 upcomingInput: function () {
12306 var next = this.match;
12307
12308 if (next.length < 20) {
12309 next += this._input.substr(0, 20 - next.length);
12310 }
12311
12312 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
12313 },
12314 // displays the character position where the lexing error occurred, i.e. for error messages
12315 showPosition: function () {
12316 var pre = this.pastInput();
12317 var c = new Array(pre.length + 1).join("-");
12318 return pre + this.upcomingInput() + "\n" + c + "^";
12319 },
12320 // test the lexed token: return FALSE when not a match, otherwise return token
12321 test_match: function (match, indexed_rule) {
12322 var token, lines, backup;
12323
12324 if (this.options.backtrack_lexer) {
12325 // save context
12326 backup = {
12327 yylineno: this.yylineno,
12328 yylloc: {
12329 first_line: this.yylloc.first_line,
12330 last_line: this.last_line,
12331 first_column: this.yylloc.first_column,
12332 last_column: this.yylloc.last_column
12333 },
12334 yytext: this.yytext,
12335 match: this.match,
12336 matches: this.matches,
12337 matched: this.matched,
12338 yyleng: this.yyleng,
12339 offset: this.offset,
12340 _more: this._more,
12341 _input: this._input,
12342 yy: this.yy,
12343 conditionStack: this.conditionStack.slice(0),
12344 done: this.done
12345 };
12346
12347 if (this.options.ranges) {
12348 backup.yylloc.range = this.yylloc.range.slice(0);
12349 }
12350 }
12351
12352 lines = match[0].match(/(?:\r\n?|\n).*/g);
12353
12354 if (lines) {
12355 this.yylineno += lines.length;
12356 }
12357
12358 this.yylloc = {
12359 first_line: this.yylloc.last_line,
12360 last_line: this.yylineno + 1,
12361 first_column: this.yylloc.last_column,
12362 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
12363 };
12364 this.yytext += match[0];
12365 this.match += match[0];
12366 this.matches = match;
12367 this.yyleng = this.yytext.length;
12368
12369 if (this.options.ranges) {
12370 this.yylloc.range = [this.offset, this.offset += this.yyleng];
12371 }
12372
12373 this._more = false;
12374 this._backtrack = false;
12375 this._input = this._input.slice(match[0].length);
12376 this.matched += match[0];
12377 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
12378
12379 if (this.done && this._input) {
12380 this.done = false;
12381 }
12382
12383 if (token) {
12384 return token;
12385 } else if (this._backtrack) {
12386 // recover context
12387 for (var k in backup) {
12388 this[k] = backup[k];
12389 }
12390
12391 return false; // rule action called reject() implying the next rule should be tested instead.
12392 }
12393
12394 return false;
12395 },
12396 // return next match in input
12397 next: function () {
12398 if (this.done) {
12399 return this.EOF;
12400 }
12401
12402 if (!this._input) {
12403 this.done = true;
12404 }
12405
12406 var token, match, tempMatch, index;
12407
12408 if (!this._more) {
12409 this.yytext = '';
12410 this.match = '';
12411 }
12412
12413 var rules = this._currentRules();
12414
12415 for (var i = 0; i < rules.length; i++) {
12416 tempMatch = this._input.match(this.rules[rules[i]]);
12417
12418 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
12419 match = tempMatch;
12420 index = i;
12421
12422 if (this.options.backtrack_lexer) {
12423 token = this.test_match(tempMatch, rules[i]);
12424
12425 if (token !== false) {
12426 return token;
12427 } else if (this._backtrack) {
12428 match = false;
12429 continue; // rule action called reject() implying a rule MISmatch.
12430 } else {
12431 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
12432 return false;
12433 }
12434 } else if (!this.options.flex) {
12435 break;
12436 }
12437 }
12438 }
12439
12440 if (match) {
12441 token = this.test_match(match, rules[index]);
12442
12443 if (token !== false) {
12444 return token;
12445 } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
12446
12447
12448 return false;
12449 }
12450
12451 if (this._input === "") {
12452 return this.EOF;
12453 } else {
12454 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
12455 text: "",
12456 token: null,
12457 line: this.yylineno
12458 });
12459 }
12460 },
12461 // return next match that has a token
12462 lex: function lex() {
12463 var r = this.next();
12464
12465 if (r) {
12466 return r;
12467 } else {
12468 return this.lex();
12469 }
12470 },
12471 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
12472 begin: function begin(condition) {
12473 this.conditionStack.push(condition);
12474 },
12475 // pop the previously active lexer condition state off the condition stack
12476 popState: function popState() {
12477 var n = this.conditionStack.length - 1;
12478
12479 if (n > 0) {
12480 return this.conditionStack.pop();
12481 } else {
12482 return this.conditionStack[0];
12483 }
12484 },
12485 // produce the lexer rule set which is active for the currently active lexer condition state
12486 _currentRules: function _currentRules() {
12487 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
12488 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
12489 } else {
12490 return this.conditions["INITIAL"].rules;
12491 }
12492 },
12493 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
12494 topState: function topState(n) {
12495 n = this.conditionStack.length - 1 - Math.abs(n || 0);
12496
12497 if (n >= 0) {
12498 return this.conditionStack[n];
12499 } else {
12500 return "INITIAL";
12501 }
12502 },
12503 // alias for begin(condition)
12504 pushState: function pushState(condition) {
12505 this.begin(condition);
12506 },
12507 // return the number of states currently on the stack
12508 stateStackSize: function stateStackSize() {
12509 return this.conditionStack.length;
12510 },
12511 options: {
12512 "case-insensitive": true
12513 },
12514 performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
12515 // Pre-lexer code can go here
12516 var YYSTATE = YY_START;
12517
12518 switch ($avoiding_name_collisions) {
12519 case 0:
12520 return 4;
12521 break;
12522
12523 case 1:
12524 return 9;
12525 break;
12526
12527 case 2:
12528 return 'space';
12529 break;
12530
12531 case 3:
12532 return 10;
12533 break;
12534
12535 case 4:
12536 return 6;
12537 break;
12538
12539 case 5:
12540 return 'TXT';
12541 break;
12542 }
12543 },
12544 rules: [/^(?:info\b)/i, /^(?:[\s\n\r]+)/i, /^(?:[\s]+)/i, /^(?:showInfo\b)/i, /^(?:$)/i, /^(?:.)/i],
12545 conditions: {
12546 "INITIAL": {
12547 "rules": [0, 1, 2, 3, 4, 5],
12548 "inclusive": true
12549 }
12550 }
12551 };
12552 return lexer;
12553 }();
12554
12555 parser.lexer = lexer;
12556
12557 function Parser() {
12558 this.yy = {};
12559 }
12560
12561 Parser.prototype = parser;
12562 parser.Parser = Parser;
12563 return new Parser();
12564}();
12565
12566if (true) {
12567 exports.parser = parser;
12568 exports.Parser = parser.Parser;
12569
12570 exports.parse = function () {
12571 return parser.parse.apply(parser, arguments);
12572 };
12573
12574 exports.main = function commonjsMain(args) {
12575 if (!args[1]) {
12576 console.log('Usage: ' + args[0] + ' FILE');
12577 process.exit(1);
12578 }
12579
12580 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
12581
12582 return exports.parser.parse(source);
12583 };
12584
12585 if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
12586 exports.main(process.argv.slice(1));
12587 }
12588}
12589/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
12590
12591/***/ }),
12592
12593/***/ "./src/diagrams/sequence/parser/sequenceDiagram.js":
12594/*!*********************************************************!*\
12595 !*** ./src/diagrams/sequence/parser/sequenceDiagram.js ***!
12596 \*********************************************************/
12597/*! no static exports found */
12598/***/ (function(module, exports, __webpack_require__) {
12599
12600/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
12601
12602/*
12603 Returns a Parser object of the following structure:
12604
12605 Parser: {
12606 yy: {}
12607 }
12608
12609 Parser.prototype: {
12610 yy: {},
12611 trace: function(),
12612 symbols_: {associative list: name ==> number},
12613 terminals_: {associative list: number ==> name},
12614 productions_: [...],
12615 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
12616 table: [...],
12617 defaultActions: {...},
12618 parseError: function(str, hash),
12619 parse: function(input),
12620
12621 lexer: {
12622 EOF: 1,
12623 parseError: function(str, hash),
12624 setInput: function(input),
12625 input: function(),
12626 unput: function(str),
12627 more: function(),
12628 less: function(n),
12629 pastInput: function(),
12630 upcomingInput: function(),
12631 showPosition: function(),
12632 test_match: function(regex_match_array, rule_index),
12633 next: function(),
12634 lex: function(),
12635 begin: function(condition),
12636 popState: function(),
12637 _currentRules: function(),
12638 topState: function(),
12639 pushState: function(condition),
12640
12641 options: {
12642 ranges: boolean (optional: true ==> token location info will include a .range[] member)
12643 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
12644 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)
12645 },
12646
12647 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
12648 rules: [...],
12649 conditions: {associative list: name ==> set},
12650 }
12651 }
12652
12653
12654 token location info (@$, _$, etc.): {
12655 first_line: n,
12656 last_line: n,
12657 first_column: n,
12658 last_column: n,
12659 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
12660 }
12661
12662
12663 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
12664 text: (matched text)
12665 token: (the produced terminal token, if any)
12666 line: (yylineno)
12667 }
12668 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
12669 loc: (yylloc)
12670 expected: (string describing the set of expected tokens)
12671 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
12672 }
12673*/
12674var sequenceDiagram = function () {
12675 var o = function (k, v, o, l) {
12676 for (o = o || {}, l = k.length; l--; o[k[l]] = v);
12677
12678 return o;
12679 },
12680 $V0 = [1, 2],
12681 $V1 = [1, 3],
12682 $V2 = [1, 4],
12683 $V3 = [2, 4],
12684 $V4 = [1, 9],
12685 $V5 = [1, 11],
12686 $V6 = [1, 12],
12687 $V7 = [1, 14],
12688 $V8 = [1, 15],
12689 $V9 = [1, 17],
12690 $Va = [1, 18],
12691 $Vb = [1, 19],
12692 $Vc = [1, 20],
12693 $Vd = [1, 21],
12694 $Ve = [1, 23],
12695 $Vf = [1, 24],
12696 $Vg = [1, 4, 5, 10, 15, 16, 18, 20, 21, 22, 23, 25, 27, 28, 29, 40],
12697 $Vh = [1, 32],
12698 $Vi = [4, 5, 10, 15, 16, 18, 20, 21, 22, 23, 25, 29, 40],
12699 $Vj = [4, 5, 10, 15, 16, 18, 20, 21, 22, 23, 25, 28, 29, 40],
12700 $Vk = [4, 5, 10, 15, 16, 18, 20, 21, 22, 23, 25, 27, 29, 40],
12701 $Vl = [38, 39, 40];
12702
12703 var parser = {
12704 trace: function trace() {},
12705 yy: {},
12706 symbols_: {
12707 "error": 2,
12708 "start": 3,
12709 "SPACE": 4,
12710 "NL": 5,
12711 "SD": 6,
12712 "document": 7,
12713 "line": 8,
12714 "statement": 9,
12715 "participant": 10,
12716 "actor": 11,
12717 "AS": 12,
12718 "restOfLine": 13,
12719 "signal": 14,
12720 "activate": 15,
12721 "deactivate": 16,
12722 "note_statement": 17,
12723 "title": 18,
12724 "text2": 19,
12725 "loop": 20,
12726 "end": 21,
12727 "opt": 22,
12728 "alt": 23,
12729 "else_sections": 24,
12730 "par": 25,
12731 "par_sections": 26,
12732 "and": 27,
12733 "else": 28,
12734 "note": 29,
12735 "placement": 30,
12736 "over": 31,
12737 "actor_pair": 32,
12738 "spaceList": 33,
12739 ",": 34,
12740 "left_of": 35,
12741 "right_of": 36,
12742 "signaltype": 37,
12743 "+": 38,
12744 "-": 39,
12745 "ACTOR": 40,
12746 "SOLID_OPEN_ARROW": 41,
12747 "DOTTED_OPEN_ARROW": 42,
12748 "SOLID_ARROW": 43,
12749 "DOTTED_ARROW": 44,
12750 "SOLID_CROSS": 45,
12751 "DOTTED_CROSS": 46,
12752 "TXT": 47,
12753 "$accept": 0,
12754 "$end": 1
12755 },
12756 terminals_: {
12757 2: "error",
12758 4: "SPACE",
12759 5: "NL",
12760 6: "SD",
12761 10: "participant",
12762 12: "AS",
12763 13: "restOfLine",
12764 15: "activate",
12765 16: "deactivate",
12766 18: "title",
12767 20: "loop",
12768 21: "end",
12769 22: "opt",
12770 23: "alt",
12771 25: "par",
12772 27: "and",
12773 28: "else",
12774 29: "note",
12775 31: "over",
12776 34: ",",
12777 35: "left_of",
12778 36: "right_of",
12779 38: "+",
12780 39: "-",
12781 40: "ACTOR",
12782 41: "SOLID_OPEN_ARROW",
12783 42: "DOTTED_OPEN_ARROW",
12784 43: "SOLID_ARROW",
12785 44: "DOTTED_ARROW",
12786 45: "SOLID_CROSS",
12787 46: "DOTTED_CROSS",
12788 47: "TXT"
12789 },
12790 productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 5], [9, 3], [9, 2], [9, 3], [9, 3], [9, 2], [9, 3], [9, 4], [9, 4], [9, 4], [9, 4], [26, 1], [26, 4], [24, 1], [24, 4], [17, 4], [17, 4], [33, 2], [33, 1], [32, 3], [32, 1], [30, 1], [30, 1], [14, 5], [14, 5], [14, 4], [11, 1], [37, 1], [37, 1], [37, 1], [37, 1], [37, 1], [37, 1], [19, 1]],
12791 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
12792 /* action[1] */
12793 , $$
12794 /* vstack */
12795 , _$
12796 /* lstack */
12797 ) {
12798 /* this == yyval */
12799 var $0 = $$.length - 1;
12800
12801 switch (yystate) {
12802 case 3:
12803 yy.apply($$[$0]);
12804 return $$[$0];
12805 break;
12806
12807 case 4:
12808 this.$ = [];
12809 break;
12810
12811 case 5:
12812 $$[$0 - 1].push($$[$0]);
12813 this.$ = $$[$0 - 1];
12814 break;
12815
12816 case 6:
12817 case 7:
12818 this.$ = $$[$0];
12819 break;
12820
12821 case 8:
12822 this.$ = [];
12823 break;
12824
12825 case 9:
12826 $$[$0 - 3].description = $$[$0 - 1];
12827 this.$ = $$[$0 - 3];
12828 break;
12829
12830 case 10:
12831 this.$ = $$[$0 - 1];
12832 break;
12833
12834 case 12:
12835 this.$ = {
12836 type: 'activeStart',
12837 signalType: yy.LINETYPE.ACTIVE_START,
12838 actor: $$[$0 - 1]
12839 };
12840 break;
12841
12842 case 13:
12843 this.$ = {
12844 type: 'activeEnd',
12845 signalType: yy.LINETYPE.ACTIVE_END,
12846 actor: $$[$0 - 1]
12847 };
12848 break;
12849
12850 case 15:
12851 this.$ = [{
12852 type: 'setTitle',
12853 text: $$[$0 - 1]
12854 }];
12855 break;
12856
12857 case 16:
12858 $$[$0 - 1].unshift({
12859 type: 'loopStart',
12860 loopText: $$[$0 - 2],
12861 signalType: yy.LINETYPE.LOOP_START
12862 });
12863 $$[$0 - 1].push({
12864 type: 'loopEnd',
12865 loopText: $$[$0 - 2],
12866 signalType: yy.LINETYPE.LOOP_END
12867 });
12868 this.$ = $$[$0 - 1];
12869 break;
12870
12871 case 17:
12872 $$[$0 - 1].unshift({
12873 type: 'optStart',
12874 optText: $$[$0 - 2],
12875 signalType: yy.LINETYPE.OPT_START
12876 });
12877 $$[$0 - 1].push({
12878 type: 'optEnd',
12879 optText: $$[$0 - 2],
12880 signalType: yy.LINETYPE.OPT_END
12881 });
12882 this.$ = $$[$0 - 1];
12883 break;
12884
12885 case 18:
12886 // Alt start
12887 $$[$0 - 1].unshift({
12888 type: 'altStart',
12889 altText: $$[$0 - 2],
12890 signalType: yy.LINETYPE.ALT_START
12891 }); // Content in alt is already in $$[$0-1]
12892 // End
12893
12894 $$[$0 - 1].push({
12895 type: 'altEnd',
12896 signalType: yy.LINETYPE.ALT_END
12897 });
12898 this.$ = $$[$0 - 1];
12899 break;
12900
12901 case 19:
12902 // Parallel start
12903 $$[$0 - 1].unshift({
12904 type: 'parStart',
12905 parText: $$[$0 - 2],
12906 signalType: yy.LINETYPE.PAR_START
12907 }); // Content in par is already in $$[$0-1]
12908 // End
12909
12910 $$[$0 - 1].push({
12911 type: 'parEnd',
12912 signalType: yy.LINETYPE.PAR_END
12913 });
12914 this.$ = $$[$0 - 1];
12915 break;
12916
12917 case 21:
12918 this.$ = $$[$0 - 3].concat([{
12919 type: 'and',
12920 parText: $$[$0 - 1],
12921 signalType: yy.LINETYPE.PAR_AND
12922 }, $$[$0]]);
12923 break;
12924
12925 case 23:
12926 this.$ = $$[$0 - 3].concat([{
12927 type: 'else',
12928 altText: $$[$0 - 1],
12929 signalType: yy.LINETYPE.ALT_ELSE
12930 }, $$[$0]]);
12931 break;
12932
12933 case 24:
12934 this.$ = [$$[$0 - 1], {
12935 type: 'addNote',
12936 placement: $$[$0 - 2],
12937 actor: $$[$0 - 1].actor,
12938 text: $$[$0]
12939 }];
12940 break;
12941
12942 case 25:
12943 // Coerce actor_pair into a [to, from, ...] array
12944 $$[$0 - 2] = [].concat($$[$0 - 1], $$[$0 - 1]).slice(0, 2);
12945 $$[$0 - 2][0] = $$[$0 - 2][0].actor;
12946 $$[$0 - 2][1] = $$[$0 - 2][1].actor;
12947 this.$ = [$$[$0 - 1], {
12948 type: 'addNote',
12949 placement: yy.PLACEMENT.OVER,
12950 actor: $$[$0 - 2].slice(0, 2),
12951 text: $$[$0]
12952 }];
12953 break;
12954
12955 case 28:
12956 this.$ = [$$[$0 - 2], $$[$0]];
12957 break;
12958
12959 case 29:
12960 this.$ = $$[$0];
12961 break;
12962
12963 case 30:
12964 this.$ = yy.PLACEMENT.LEFTOF;
12965 break;
12966
12967 case 31:
12968 this.$ = yy.PLACEMENT.RIGHTOF;
12969 break;
12970
12971 case 32:
12972 this.$ = [$$[$0 - 4], $$[$0 - 1], {
12973 type: 'addMessage',
12974 from: $$[$0 - 4].actor,
12975 to: $$[$0 - 1].actor,
12976 signalType: $$[$0 - 3],
12977 msg: $$[$0]
12978 }, {
12979 type: 'activeStart',
12980 signalType: yy.LINETYPE.ACTIVE_START,
12981 actor: $$[$0 - 1]
12982 }];
12983 break;
12984
12985 case 33:
12986 this.$ = [$$[$0 - 4], $$[$0 - 1], {
12987 type: 'addMessage',
12988 from: $$[$0 - 4].actor,
12989 to: $$[$0 - 1].actor,
12990 signalType: $$[$0 - 3],
12991 msg: $$[$0]
12992 }, {
12993 type: 'activeEnd',
12994 signalType: yy.LINETYPE.ACTIVE_END,
12995 actor: $$[$0 - 4]
12996 }];
12997 break;
12998
12999 case 34:
13000 this.$ = [$$[$0 - 3], $$[$0 - 1], {
13001 type: 'addMessage',
13002 from: $$[$0 - 3].actor,
13003 to: $$[$0 - 1].actor,
13004 signalType: $$[$0 - 2],
13005 msg: $$[$0]
13006 }];
13007 break;
13008
13009 case 35:
13010 this.$ = {
13011 type: 'addActor',
13012 actor: $$[$0]
13013 };
13014 break;
13015
13016 case 36:
13017 this.$ = yy.LINETYPE.SOLID_OPEN;
13018 break;
13019
13020 case 37:
13021 this.$ = yy.LINETYPE.DOTTED_OPEN;
13022 break;
13023
13024 case 38:
13025 this.$ = yy.LINETYPE.SOLID;
13026 break;
13027
13028 case 39:
13029 this.$ = yy.LINETYPE.DOTTED;
13030 break;
13031
13032 case 40:
13033 this.$ = yy.LINETYPE.SOLID_CROSS;
13034 break;
13035
13036 case 41:
13037 this.$ = yy.LINETYPE.DOTTED_CROSS;
13038 break;
13039
13040 case 42:
13041 this.$ = $$[$0].substring(1).trim().replace(/\\n/gm, "\n");
13042 break;
13043 }
13044 },
13045 table: [{
13046 3: 1,
13047 4: $V0,
13048 5: $V1,
13049 6: $V2
13050 }, {
13051 1: [3]
13052 }, {
13053 3: 5,
13054 4: $V0,
13055 5: $V1,
13056 6: $V2
13057 }, {
13058 3: 6,
13059 4: $V0,
13060 5: $V1,
13061 6: $V2
13062 }, o([1, 4, 5, 10, 15, 16, 18, 20, 22, 23, 25, 29, 40], $V3, {
13063 7: 7
13064 }), {
13065 1: [2, 1]
13066 }, {
13067 1: [2, 2]
13068 }, {
13069 1: [2, 3],
13070 4: $V4,
13071 5: $V5,
13072 8: 8,
13073 9: 10,
13074 10: $V6,
13075 11: 22,
13076 14: 13,
13077 15: $V7,
13078 16: $V8,
13079 17: 16,
13080 18: $V9,
13081 20: $Va,
13082 22: $Vb,
13083 23: $Vc,
13084 25: $Vd,
13085 29: $Ve,
13086 40: $Vf
13087 }, o($Vg, [2, 5]), {
13088 9: 25,
13089 10: $V6,
13090 11: 22,
13091 14: 13,
13092 15: $V7,
13093 16: $V8,
13094 17: 16,
13095 18: $V9,
13096 20: $Va,
13097 22: $Vb,
13098 23: $Vc,
13099 25: $Vd,
13100 29: $Ve,
13101 40: $Vf
13102 }, o($Vg, [2, 7]), o($Vg, [2, 8]), {
13103 11: 26,
13104 40: $Vf
13105 }, {
13106 5: [1, 27]
13107 }, {
13108 11: 28,
13109 40: $Vf
13110 }, {
13111 11: 29,
13112 40: $Vf
13113 }, {
13114 5: [1, 30]
13115 }, {
13116 19: 31,
13117 47: $Vh
13118 }, {
13119 13: [1, 33]
13120 }, {
13121 13: [1, 34]
13122 }, {
13123 13: [1, 35]
13124 }, {
13125 13: [1, 36]
13126 }, {
13127 37: 37,
13128 41: [1, 38],
13129 42: [1, 39],
13130 43: [1, 40],
13131 44: [1, 41],
13132 45: [1, 42],
13133 46: [1, 43]
13134 }, {
13135 30: 44,
13136 31: [1, 45],
13137 35: [1, 46],
13138 36: [1, 47]
13139 }, o([5, 12, 34, 41, 42, 43, 44, 45, 46, 47], [2, 35]), o($Vg, [2, 6]), {
13140 5: [1, 49],
13141 12: [1, 48]
13142 }, o($Vg, [2, 11]), {
13143 5: [1, 50]
13144 }, {
13145 5: [1, 51]
13146 }, o($Vg, [2, 14]), {
13147 5: [1, 52]
13148 }, {
13149 5: [2, 42]
13150 }, o($Vi, $V3, {
13151 7: 53
13152 }), o($Vi, $V3, {
13153 7: 54
13154 }), o($Vj, $V3, {
13155 24: 55,
13156 7: 56
13157 }), o($Vk, $V3, {
13158 26: 57,
13159 7: 58
13160 }), {
13161 11: 61,
13162 38: [1, 59],
13163 39: [1, 60],
13164 40: $Vf
13165 }, o($Vl, [2, 36]), o($Vl, [2, 37]), o($Vl, [2, 38]), o($Vl, [2, 39]), o($Vl, [2, 40]), o($Vl, [2, 41]), {
13166 11: 62,
13167 40: $Vf
13168 }, {
13169 11: 64,
13170 32: 63,
13171 40: $Vf
13172 }, {
13173 40: [2, 30]
13174 }, {
13175 40: [2, 31]
13176 }, {
13177 13: [1, 65]
13178 }, o($Vg, [2, 10]), o($Vg, [2, 12]), o($Vg, [2, 13]), o($Vg, [2, 15]), {
13179 4: $V4,
13180 5: $V5,
13181 8: 8,
13182 9: 10,
13183 10: $V6,
13184 11: 22,
13185 14: 13,
13186 15: $V7,
13187 16: $V8,
13188 17: 16,
13189 18: $V9,
13190 20: $Va,
13191 21: [1, 66],
13192 22: $Vb,
13193 23: $Vc,
13194 25: $Vd,
13195 29: $Ve,
13196 40: $Vf
13197 }, {
13198 4: $V4,
13199 5: $V5,
13200 8: 8,
13201 9: 10,
13202 10: $V6,
13203 11: 22,
13204 14: 13,
13205 15: $V7,
13206 16: $V8,
13207 17: 16,
13208 18: $V9,
13209 20: $Va,
13210 21: [1, 67],
13211 22: $Vb,
13212 23: $Vc,
13213 25: $Vd,
13214 29: $Ve,
13215 40: $Vf
13216 }, {
13217 21: [1, 68]
13218 }, {
13219 4: $V4,
13220 5: $V5,
13221 8: 8,
13222 9: 10,
13223 10: $V6,
13224 11: 22,
13225 14: 13,
13226 15: $V7,
13227 16: $V8,
13228 17: 16,
13229 18: $V9,
13230 20: $Va,
13231 21: [2, 22],
13232 22: $Vb,
13233 23: $Vc,
13234 25: $Vd,
13235 28: [1, 69],
13236 29: $Ve,
13237 40: $Vf
13238 }, {
13239 21: [1, 70]
13240 }, {
13241 4: $V4,
13242 5: $V5,
13243 8: 8,
13244 9: 10,
13245 10: $V6,
13246 11: 22,
13247 14: 13,
13248 15: $V7,
13249 16: $V8,
13250 17: 16,
13251 18: $V9,
13252 20: $Va,
13253 21: [2, 20],
13254 22: $Vb,
13255 23: $Vc,
13256 25: $Vd,
13257 27: [1, 71],
13258 29: $Ve,
13259 40: $Vf
13260 }, {
13261 11: 72,
13262 40: $Vf
13263 }, {
13264 11: 73,
13265 40: $Vf
13266 }, {
13267 19: 74,
13268 47: $Vh
13269 }, {
13270 19: 75,
13271 47: $Vh
13272 }, {
13273 19: 76,
13274 47: $Vh
13275 }, {
13276 34: [1, 77],
13277 47: [2, 29]
13278 }, {
13279 5: [1, 78]
13280 }, o($Vg, [2, 16]), o($Vg, [2, 17]), o($Vg, [2, 18]), {
13281 13: [1, 79]
13282 }, o($Vg, [2, 19]), {
13283 13: [1, 80]
13284 }, {
13285 19: 81,
13286 47: $Vh
13287 }, {
13288 19: 82,
13289 47: $Vh
13290 }, {
13291 5: [2, 34]
13292 }, {
13293 5: [2, 24]
13294 }, {
13295 5: [2, 25]
13296 }, {
13297 11: 83,
13298 40: $Vf
13299 }, o($Vg, [2, 9]), o($Vj, $V3, {
13300 7: 56,
13301 24: 84
13302 }), o($Vk, $V3, {
13303 7: 58,
13304 26: 85
13305 }), {
13306 5: [2, 32]
13307 }, {
13308 5: [2, 33]
13309 }, {
13310 47: [2, 28]
13311 }, {
13312 21: [2, 23]
13313 }, {
13314 21: [2, 21]
13315 }],
13316 defaultActions: {
13317 5: [2, 1],
13318 6: [2, 2],
13319 32: [2, 42],
13320 46: [2, 30],
13321 47: [2, 31],
13322 74: [2, 34],
13323 75: [2, 24],
13324 76: [2, 25],
13325 81: [2, 32],
13326 82: [2, 33],
13327 83: [2, 28],
13328 84: [2, 23],
13329 85: [2, 21]
13330 },
13331 parseError: function parseError(str, hash) {
13332 if (hash.recoverable) {
13333 this.trace(str);
13334 } else {
13335 var error = new Error(str);
13336 error.hash = hash;
13337 throw error;
13338 }
13339 },
13340 parse: function parse(input) {
13341 var self = this,
13342 stack = [0],
13343 tstack = [],
13344 vstack = [null],
13345 lstack = [],
13346 table = this.table,
13347 yytext = '',
13348 yylineno = 0,
13349 yyleng = 0,
13350 recovering = 0,
13351 TERROR = 2,
13352 EOF = 1;
13353 var args = lstack.slice.call(arguments, 1);
13354 var lexer = Object.create(this.lexer);
13355 var sharedState = {
13356 yy: {}
13357 };
13358
13359 for (var k in this.yy) {
13360 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
13361 sharedState.yy[k] = this.yy[k];
13362 }
13363 }
13364
13365 lexer.setInput(input, sharedState.yy);
13366 sharedState.yy.lexer = lexer;
13367 sharedState.yy.parser = this;
13368
13369 if (typeof lexer.yylloc == 'undefined') {
13370 lexer.yylloc = {};
13371 }
13372
13373 var yyloc = lexer.yylloc;
13374 lstack.push(yyloc);
13375 var ranges = lexer.options && lexer.options.ranges;
13376
13377 if (typeof sharedState.yy.parseError === 'function') {
13378 this.parseError = sharedState.yy.parseError;
13379 } else {
13380 this.parseError = Object.getPrototypeOf(this).parseError;
13381 }
13382
13383 function popStack(n) {
13384 stack.length = stack.length - 2 * n;
13385 vstack.length = vstack.length - n;
13386 lstack.length = lstack.length - n;
13387 }
13388
13389 _token_stack: var lex = function () {
13390 var token;
13391 token = lexer.lex() || EOF;
13392
13393 if (typeof token !== 'number') {
13394 token = self.symbols_[token] || token;
13395 }
13396
13397 return token;
13398 };
13399
13400 var symbol,
13401 preErrorSymbol,
13402 state,
13403 action,
13404 a,
13405 r,
13406 yyval = {},
13407 p,
13408 len,
13409 newState,
13410 expected;
13411
13412 while (true) {
13413 state = stack[stack.length - 1];
13414
13415 if (this.defaultActions[state]) {
13416 action = this.defaultActions[state];
13417 } else {
13418 if (symbol === null || typeof symbol == 'undefined') {
13419 symbol = lex();
13420 }
13421
13422 action = table[state] && table[state][symbol];
13423 }
13424
13425 if (typeof action === 'undefined' || !action.length || !action[0]) {
13426 var errStr = '';
13427 expected = [];
13428
13429 for (p in table[state]) {
13430 if (this.terminals_[p] && p > TERROR) {
13431 expected.push('\'' + this.terminals_[p] + '\'');
13432 }
13433 }
13434
13435 if (lexer.showPosition) {
13436 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
13437 } else {
13438 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
13439 }
13440
13441 this.parseError(errStr, {
13442 text: lexer.match,
13443 token: this.terminals_[symbol] || symbol,
13444 line: lexer.yylineno,
13445 loc: yyloc,
13446 expected: expected
13447 });
13448 }
13449
13450 if (action[0] instanceof Array && action.length > 1) {
13451 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
13452 }
13453
13454 switch (action[0]) {
13455 case 1:
13456 stack.push(symbol);
13457 vstack.push(lexer.yytext);
13458 lstack.push(lexer.yylloc);
13459 stack.push(action[1]);
13460 symbol = null;
13461
13462 if (!preErrorSymbol) {
13463 yyleng = lexer.yyleng;
13464 yytext = lexer.yytext;
13465 yylineno = lexer.yylineno;
13466 yyloc = lexer.yylloc;
13467
13468 if (recovering > 0) {
13469 recovering--;
13470 }
13471 } else {
13472 symbol = preErrorSymbol;
13473 preErrorSymbol = null;
13474 }
13475
13476 break;
13477
13478 case 2:
13479 len = this.productions_[action[1]][1];
13480 yyval.$ = vstack[vstack.length - len];
13481 yyval._$ = {
13482 first_line: lstack[lstack.length - (len || 1)].first_line,
13483 last_line: lstack[lstack.length - 1].last_line,
13484 first_column: lstack[lstack.length - (len || 1)].first_column,
13485 last_column: lstack[lstack.length - 1].last_column
13486 };
13487
13488 if (ranges) {
13489 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
13490 }
13491
13492 r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
13493
13494 if (typeof r !== 'undefined') {
13495 return r;
13496 }
13497
13498 if (len) {
13499 stack = stack.slice(0, -1 * len * 2);
13500 vstack = vstack.slice(0, -1 * len);
13501 lstack = lstack.slice(0, -1 * len);
13502 }
13503
13504 stack.push(this.productions_[action[1]][0]);
13505 vstack.push(yyval.$);
13506 lstack.push(yyval._$);
13507 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
13508 stack.push(newState);
13509 break;
13510
13511 case 3:
13512 return true;
13513 }
13514 }
13515
13516 return true;
13517 }
13518 };
13519 /* generated by jison-lex 0.3.4 */
13520
13521 var lexer = function () {
13522 var lexer = {
13523 EOF: 1,
13524 parseError: function parseError(str, hash) {
13525 if (this.yy.parser) {
13526 this.yy.parser.parseError(str, hash);
13527 } else {
13528 throw new Error(str);
13529 }
13530 },
13531 // resets the lexer, sets new input
13532 setInput: function (input, yy) {
13533 this.yy = yy || this.yy || {};
13534 this._input = input;
13535 this._more = this._backtrack = this.done = false;
13536 this.yylineno = this.yyleng = 0;
13537 this.yytext = this.matched = this.match = '';
13538 this.conditionStack = ['INITIAL'];
13539 this.yylloc = {
13540 first_line: 1,
13541 first_column: 0,
13542 last_line: 1,
13543 last_column: 0
13544 };
13545
13546 if (this.options.ranges) {
13547 this.yylloc.range = [0, 0];
13548 }
13549
13550 this.offset = 0;
13551 return this;
13552 },
13553 // consumes and returns one char from the input
13554 input: function () {
13555 var ch = this._input[0];
13556 this.yytext += ch;
13557 this.yyleng++;
13558 this.offset++;
13559 this.match += ch;
13560 this.matched += ch;
13561 var lines = ch.match(/(?:\r\n?|\n).*/g);
13562
13563 if (lines) {
13564 this.yylineno++;
13565 this.yylloc.last_line++;
13566 } else {
13567 this.yylloc.last_column++;
13568 }
13569
13570 if (this.options.ranges) {
13571 this.yylloc.range[1]++;
13572 }
13573
13574 this._input = this._input.slice(1);
13575 return ch;
13576 },
13577 // unshifts one char (or a string) into the input
13578 unput: function (ch) {
13579 var len = ch.length;
13580 var lines = ch.split(/(?:\r\n?|\n)/g);
13581 this._input = ch + this._input;
13582 this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;
13583
13584 this.offset -= len;
13585 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
13586 this.match = this.match.substr(0, this.match.length - 1);
13587 this.matched = this.matched.substr(0, this.matched.length - 1);
13588
13589 if (lines.length - 1) {
13590 this.yylineno -= lines.length - 1;
13591 }
13592
13593 var r = this.yylloc.range;
13594 this.yylloc = {
13595 first_line: this.yylloc.first_line,
13596 last_line: this.yylineno + 1,
13597 first_column: this.yylloc.first_column,
13598 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
13599 };
13600
13601 if (this.options.ranges) {
13602 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
13603 }
13604
13605 this.yyleng = this.yytext.length;
13606 return this;
13607 },
13608 // When called from action, caches matched text and appends it on next action
13609 more: function () {
13610 this._more = true;
13611 return this;
13612 },
13613 // 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.
13614 reject: function () {
13615 if (this.options.backtrack_lexer) {
13616 this._backtrack = true;
13617 } else {
13618 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(), {
13619 text: "",
13620 token: null,
13621 line: this.yylineno
13622 });
13623 }
13624
13625 return this;
13626 },
13627 // retain first n characters of the match
13628 less: function (n) {
13629 this.unput(this.match.slice(n));
13630 },
13631 // displays already matched input, i.e. for error messages
13632 pastInput: function () {
13633 var past = this.matched.substr(0, this.matched.length - this.match.length);
13634 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
13635 },
13636 // displays upcoming input, i.e. for error messages
13637 upcomingInput: function () {
13638 var next = this.match;
13639
13640 if (next.length < 20) {
13641 next += this._input.substr(0, 20 - next.length);
13642 }
13643
13644 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
13645 },
13646 // displays the character position where the lexing error occurred, i.e. for error messages
13647 showPosition: function () {
13648 var pre = this.pastInput();
13649 var c = new Array(pre.length + 1).join("-");
13650 return pre + this.upcomingInput() + "\n" + c + "^";
13651 },
13652 // test the lexed token: return FALSE when not a match, otherwise return token
13653 test_match: function (match, indexed_rule) {
13654 var token, lines, backup;
13655
13656 if (this.options.backtrack_lexer) {
13657 // save context
13658 backup = {
13659 yylineno: this.yylineno,
13660 yylloc: {
13661 first_line: this.yylloc.first_line,
13662 last_line: this.last_line,
13663 first_column: this.yylloc.first_column,
13664 last_column: this.yylloc.last_column
13665 },
13666 yytext: this.yytext,
13667 match: this.match,
13668 matches: this.matches,
13669 matched: this.matched,
13670 yyleng: this.yyleng,
13671 offset: this.offset,
13672 _more: this._more,
13673 _input: this._input,
13674 yy: this.yy,
13675 conditionStack: this.conditionStack.slice(0),
13676 done: this.done
13677 };
13678
13679 if (this.options.ranges) {
13680 backup.yylloc.range = this.yylloc.range.slice(0);
13681 }
13682 }
13683
13684 lines = match[0].match(/(?:\r\n?|\n).*/g);
13685
13686 if (lines) {
13687 this.yylineno += lines.length;
13688 }
13689
13690 this.yylloc = {
13691 first_line: this.yylloc.last_line,
13692 last_line: this.yylineno + 1,
13693 first_column: this.yylloc.last_column,
13694 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
13695 };
13696 this.yytext += match[0];
13697 this.match += match[0];
13698 this.matches = match;
13699 this.yyleng = this.yytext.length;
13700
13701 if (this.options.ranges) {
13702 this.yylloc.range = [this.offset, this.offset += this.yyleng];
13703 }
13704
13705 this._more = false;
13706 this._backtrack = false;
13707 this._input = this._input.slice(match[0].length);
13708 this.matched += match[0];
13709 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
13710
13711 if (this.done && this._input) {
13712 this.done = false;
13713 }
13714
13715 if (token) {
13716 return token;
13717 } else if (this._backtrack) {
13718 // recover context
13719 for (var k in backup) {
13720 this[k] = backup[k];
13721 }
13722
13723 return false; // rule action called reject() implying the next rule should be tested instead.
13724 }
13725
13726 return false;
13727 },
13728 // return next match in input
13729 next: function () {
13730 if (this.done) {
13731 return this.EOF;
13732 }
13733
13734 if (!this._input) {
13735 this.done = true;
13736 }
13737
13738 var token, match, tempMatch, index;
13739
13740 if (!this._more) {
13741 this.yytext = '';
13742 this.match = '';
13743 }
13744
13745 var rules = this._currentRules();
13746
13747 for (var i = 0; i < rules.length; i++) {
13748 tempMatch = this._input.match(this.rules[rules[i]]);
13749
13750 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
13751 match = tempMatch;
13752 index = i;
13753
13754 if (this.options.backtrack_lexer) {
13755 token = this.test_match(tempMatch, rules[i]);
13756
13757 if (token !== false) {
13758 return token;
13759 } else if (this._backtrack) {
13760 match = false;
13761 continue; // rule action called reject() implying a rule MISmatch.
13762 } else {
13763 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
13764 return false;
13765 }
13766 } else if (!this.options.flex) {
13767 break;
13768 }
13769 }
13770 }
13771
13772 if (match) {
13773 token = this.test_match(match, rules[index]);
13774
13775 if (token !== false) {
13776 return token;
13777 } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
13778
13779
13780 return false;
13781 }
13782
13783 if (this._input === "") {
13784 return this.EOF;
13785 } else {
13786 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
13787 text: "",
13788 token: null,
13789 line: this.yylineno
13790 });
13791 }
13792 },
13793 // return next match that has a token
13794 lex: function lex() {
13795 var r = this.next();
13796
13797 if (r) {
13798 return r;
13799 } else {
13800 return this.lex();
13801 }
13802 },
13803 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
13804 begin: function begin(condition) {
13805 this.conditionStack.push(condition);
13806 },
13807 // pop the previously active lexer condition state off the condition stack
13808 popState: function popState() {
13809 var n = this.conditionStack.length - 1;
13810
13811 if (n > 0) {
13812 return this.conditionStack.pop();
13813 } else {
13814 return this.conditionStack[0];
13815 }
13816 },
13817 // produce the lexer rule set which is active for the currently active lexer condition state
13818 _currentRules: function _currentRules() {
13819 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
13820 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
13821 } else {
13822 return this.conditions["INITIAL"].rules;
13823 }
13824 },
13825 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
13826 topState: function topState(n) {
13827 n = this.conditionStack.length - 1 - Math.abs(n || 0);
13828
13829 if (n >= 0) {
13830 return this.conditionStack[n];
13831 } else {
13832 return "INITIAL";
13833 }
13834 },
13835 // alias for begin(condition)
13836 pushState: function pushState(condition) {
13837 this.begin(condition);
13838 },
13839 // return the number of states currently on the stack
13840 stateStackSize: function stateStackSize() {
13841 return this.conditionStack.length;
13842 },
13843 options: {
13844 "case-insensitive": true
13845 },
13846 performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
13847 var YYSTATE = YY_START;
13848
13849 switch ($avoiding_name_collisions) {
13850 case 0:
13851 return 5;
13852 break;
13853
13854 case 1:
13855 /* skip all whitespace */
13856 break;
13857
13858 case 2:
13859 /* skip same-line whitespace */
13860 break;
13861
13862 case 3:
13863 /* skip comments */
13864 break;
13865
13866 case 4:
13867 /* skip comments */
13868 break;
13869
13870 case 5:
13871 this.begin('ID');
13872 return 10;
13873 break;
13874
13875 case 6:
13876 yy_.yytext = yy_.yytext.trim();
13877 this.begin('ALIAS');
13878 return 40;
13879 break;
13880
13881 case 7:
13882 this.popState();
13883 this.popState();
13884 this.begin('LINE');
13885 return 12;
13886 break;
13887
13888 case 8:
13889 this.popState();
13890 this.popState();
13891 return 5;
13892 break;
13893
13894 case 9:
13895 this.begin('LINE');
13896 return 20;
13897 break;
13898
13899 case 10:
13900 this.begin('LINE');
13901 return 22;
13902 break;
13903
13904 case 11:
13905 this.begin('LINE');
13906 return 23;
13907 break;
13908
13909 case 12:
13910 this.begin('LINE');
13911 return 28;
13912 break;
13913
13914 case 13:
13915 this.begin('LINE');
13916 return 25;
13917 break;
13918
13919 case 14:
13920 this.begin('LINE');
13921 return 27;
13922 break;
13923
13924 case 15:
13925 this.popState();
13926 return 13;
13927 break;
13928
13929 case 16:
13930 return 21;
13931 break;
13932
13933 case 17:
13934 return 35;
13935 break;
13936
13937 case 18:
13938 return 36;
13939 break;
13940
13941 case 19:
13942 return 31;
13943 break;
13944
13945 case 20:
13946 return 29;
13947 break;
13948
13949 case 21:
13950 this.begin('ID');
13951 return 15;
13952 break;
13953
13954 case 22:
13955 this.begin('ID');
13956 return 16;
13957 break;
13958
13959 case 23:
13960 return 18;
13961 break;
13962
13963 case 24:
13964 return 6;
13965 break;
13966
13967 case 25:
13968 return 34;
13969 break;
13970
13971 case 26:
13972 return 5;
13973 break;
13974
13975 case 27:
13976 yy_.yytext = yy_.yytext.trim();
13977 return 40;
13978 break;
13979
13980 case 28:
13981 return 43;
13982 break;
13983
13984 case 29:
13985 return 44;
13986 break;
13987
13988 case 30:
13989 return 41;
13990 break;
13991
13992 case 31:
13993 return 42;
13994 break;
13995
13996 case 32:
13997 return 45;
13998 break;
13999
14000 case 33:
14001 return 46;
14002 break;
14003
14004 case 34:
14005 return 47;
14006 break;
14007
14008 case 35:
14009 return 38;
14010 break;
14011
14012 case 36:
14013 return 39;
14014 break;
14015
14016 case 37:
14017 return 5;
14018 break;
14019
14020 case 38:
14021 return 'INVALID';
14022 break;
14023 }
14024 },
14025 rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:participant\b)/i, /^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:and\b)/i, /^(?:[^#\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, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?::[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],
14026 conditions: {
14027 "LINE": {
14028 "rules": [2, 3, 15],
14029 "inclusive": false
14030 },
14031 "ALIAS": {
14032 "rules": [2, 3, 7, 8],
14033 "inclusive": false
14034 },
14035 "ID": {
14036 "rules": [2, 3, 6],
14037 "inclusive": false
14038 },
14039 "INITIAL": {
14040 "rules": [0, 1, 3, 4, 5, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38],
14041 "inclusive": true
14042 }
14043 }
14044 };
14045 return lexer;
14046 }();
14047
14048 parser.lexer = lexer;
14049
14050 function Parser() {
14051 this.yy = {};
14052 }
14053
14054 Parser.prototype = parser;
14055 parser.Parser = Parser;
14056 return new Parser();
14057}();
14058
14059if (true) {
14060 exports.parser = sequenceDiagram;
14061 exports.Parser = sequenceDiagram.Parser;
14062
14063 exports.parse = function () {
14064 return sequenceDiagram.parse.apply(sequenceDiagram, arguments);
14065 };
14066
14067 exports.main = function commonjsMain(args) {
14068 if (!args[1]) {
14069 console.log('Usage: ' + args[0] + ' FILE');
14070 process.exit(1);
14071 }
14072
14073 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
14074
14075 return exports.parser.parse(source);
14076 };
14077
14078 if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
14079 exports.main(process.argv.slice(1));
14080 }
14081}
14082/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
14083
14084/***/ }),
14085
14086/***/ "./src/diagrams/sequence/sequenceDb.js":
14087/*!*********************************************!*\
14088 !*** ./src/diagrams/sequence/sequenceDb.js ***!
14089 \*********************************************/
14090/*! exports provided: addActor, addMessage, addSignal, getMessages, getActors, getActor, getActorKeys, getTitle, clear, LINETYPE, ARROWTYPE, PLACEMENT, addNote, setTitle, apply, default */
14091/***/ (function(module, __webpack_exports__, __webpack_require__) {
14092
14093"use strict";
14094__webpack_require__.r(__webpack_exports__);
14095/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addActor", function() { return addActor; });
14096/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMessage", function() { return addMessage; });
14097/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSignal", function() { return addSignal; });
14098/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMessages", function() { return getMessages; });
14099/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActors", function() { return getActors; });
14100/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActor", function() { return getActor; });
14101/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActorKeys", function() { return getActorKeys; });
14102/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; });
14103/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
14104/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LINETYPE", function() { return LINETYPE; });
14105/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARROWTYPE", function() { return ARROWTYPE; });
14106/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLACEMENT", function() { return PLACEMENT; });
14107/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addNote", function() { return addNote; });
14108/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; });
14109/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apply", function() { return apply; });
14110/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
14111
14112let actors = {};
14113let messages = [];
14114const notes = [];
14115let title = '';
14116const addActor = function (id, name, description) {
14117 // Don't allow description nulling
14118 const old = actors[id];
14119 if (old && name === old.name && description == null) return; // Don't allow null descriptions, either
14120
14121 if (description == null) description = name;
14122 actors[id] = {
14123 name: name,
14124 description: description
14125 };
14126};
14127const addMessage = function (idFrom, idTo, message, answer) {
14128 messages.push({
14129 from: idFrom,
14130 to: idTo,
14131 message: message,
14132 answer: answer
14133 });
14134};
14135const addSignal = function (idFrom, idTo, message, messageType) {
14136 _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Adding message from=' + idFrom + ' to=' + idTo + ' message=' + message + ' type=' + messageType);
14137 messages.push({
14138 from: idFrom,
14139 to: idTo,
14140 message: message,
14141 type: messageType
14142 });
14143};
14144const getMessages = function () {
14145 return messages;
14146};
14147const getActors = function () {
14148 return actors;
14149};
14150const getActor = function (id) {
14151 return actors[id];
14152};
14153const getActorKeys = function () {
14154 return Object.keys(actors);
14155};
14156const getTitle = function () {
14157 return title;
14158};
14159const clear = function () {
14160 actors = {};
14161 messages = [];
14162};
14163const LINETYPE = {
14164 SOLID: 0,
14165 DOTTED: 1,
14166 NOTE: 2,
14167 SOLID_CROSS: 3,
14168 DOTTED_CROSS: 4,
14169 SOLID_OPEN: 5,
14170 DOTTED_OPEN: 6,
14171 LOOP_START: 10,
14172 LOOP_END: 11,
14173 ALT_START: 12,
14174 ALT_ELSE: 13,
14175 ALT_END: 14,
14176 OPT_START: 15,
14177 OPT_END: 16,
14178 ACTIVE_START: 17,
14179 ACTIVE_END: 18,
14180 PAR_START: 19,
14181 PAR_AND: 20,
14182 PAR_END: 21
14183};
14184const ARROWTYPE = {
14185 FILLED: 0,
14186 OPEN: 1
14187};
14188const PLACEMENT = {
14189 LEFTOF: 0,
14190 RIGHTOF: 1,
14191 OVER: 2
14192};
14193const addNote = function (actor, placement, message) {
14194 const note = {
14195 actor: actor,
14196 placement: placement,
14197 message: message // Coerce actor into a [to, from, ...] array
14198
14199 };
14200 const actors = [].concat(actor, actor);
14201 notes.push(note);
14202 messages.push({
14203 from: actors[0],
14204 to: actors[1],
14205 message: message,
14206 type: LINETYPE.NOTE,
14207 placement: placement
14208 });
14209};
14210const setTitle = function (titleText) {
14211 title = titleText;
14212};
14213const apply = function (param) {
14214 if (param instanceof Array) {
14215 param.forEach(function (item) {
14216 apply(item);
14217 });
14218 } else {
14219 switch (param.type) {
14220 case 'addActor':
14221 addActor(param.actor, param.actor, param.description);
14222 break;
14223
14224 case 'activeStart':
14225 addSignal(param.actor, undefined, undefined, param.signalType);
14226 break;
14227
14228 case 'activeEnd':
14229 addSignal(param.actor, undefined, undefined, param.signalType);
14230 break;
14231
14232 case 'addNote':
14233 addNote(param.actor, param.placement, param.text);
14234 break;
14235
14236 case 'addMessage':
14237 addSignal(param.from, param.to, param.msg, param.signalType);
14238 break;
14239
14240 case 'loopStart':
14241 addSignal(undefined, undefined, param.loopText, param.signalType);
14242 break;
14243
14244 case 'loopEnd':
14245 addSignal(undefined, undefined, undefined, param.signalType);
14246 break;
14247
14248 case 'optStart':
14249 addSignal(undefined, undefined, param.optText, param.signalType);
14250 break;
14251
14252 case 'optEnd':
14253 addSignal(undefined, undefined, undefined, param.signalType);
14254 break;
14255
14256 case 'altStart':
14257 addSignal(undefined, undefined, param.altText, param.signalType);
14258 break;
14259
14260 case 'else':
14261 addSignal(undefined, undefined, param.altText, param.signalType);
14262 break;
14263
14264 case 'altEnd':
14265 addSignal(undefined, undefined, undefined, param.signalType);
14266 break;
14267
14268 case 'setTitle':
14269 setTitle(param.text);
14270 break;
14271
14272 case 'parStart':
14273 addSignal(undefined, undefined, param.parText, param.signalType);
14274 break;
14275
14276 case 'and':
14277 addSignal(undefined, undefined, param.parText, param.signalType);
14278 break;
14279
14280 case 'parEnd':
14281 addSignal(undefined, undefined, undefined, param.signalType);
14282 break;
14283 }
14284 }
14285};
14286/* harmony default export */ __webpack_exports__["default"] = ({
14287 addActor,
14288 addMessage,
14289 addSignal,
14290 getMessages,
14291 getActors,
14292 getActor,
14293 getActorKeys,
14294 getTitle,
14295 clear,
14296 LINETYPE,
14297 ARROWTYPE,
14298 PLACEMENT,
14299 addNote,
14300 setTitle,
14301 apply
14302});
14303
14304/***/ }),
14305
14306/***/ "./src/diagrams/sequence/sequenceRenderer.js":
14307/*!***************************************************!*\
14308 !*** ./src/diagrams/sequence/sequenceRenderer.js ***!
14309 \***************************************************/
14310/*! exports provided: bounds, drawActors, setConf, draw, default */
14311/***/ (function(module, __webpack_exports__, __webpack_require__) {
14312
14313"use strict";
14314__webpack_require__.r(__webpack_exports__);
14315/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounds", function() { return bounds; });
14316/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActors", function() { return drawActors; });
14317/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
14318/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
14319/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
14320/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
14321/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./svgDraw */ "./src/diagrams/sequence/svgDraw.js");
14322/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
14323/* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/sequenceDiagram */ "./src/diagrams/sequence/parser/sequenceDiagram.js");
14324/* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__);
14325/* harmony import */ var _sequenceDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sequenceDb */ "./src/diagrams/sequence/sequenceDb.js");
14326
14327
14328
14329
14330
14331_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy = _sequenceDb__WEBPACK_IMPORTED_MODULE_4__["default"];
14332const conf = {
14333 diagramMarginX: 50,
14334 diagramMarginY: 30,
14335 // Margin between actors
14336 actorMargin: 50,
14337 // Width of actor boxes
14338 width: 150,
14339 // Height of actor boxes
14340 height: 65,
14341 actorFontSize: 14,
14342 actorFontFamily: '"Open-Sans", "sans-serif"',
14343 // Margin around loop boxes
14344 boxMargin: 10,
14345 boxTextMargin: 5,
14346 noteMargin: 10,
14347 // Space between messages
14348 messageMargin: 35,
14349 // mirror actors under diagram
14350 mirrorActors: false,
14351 // Depending on css styling this might need adjustment
14352 // Prolongs the edge of the diagram downwards
14353 bottomMarginAdj: 1,
14354 // width of activation box
14355 activationWidth: 10,
14356 // text placement as: tspan | fo | old only text as before
14357 textPlacement: 'tspan',
14358 showSequenceNumbers: false
14359};
14360const bounds = {
14361 data: {
14362 startx: undefined,
14363 stopx: undefined,
14364 starty: undefined,
14365 stopy: undefined
14366 },
14367 verticalPos: 0,
14368 sequenceItems: [],
14369 activations: [],
14370 init: function () {
14371 this.sequenceItems = [];
14372 this.activations = [];
14373 this.data = {
14374 startx: undefined,
14375 stopx: undefined,
14376 starty: undefined,
14377 stopy: undefined
14378 };
14379 this.verticalPos = 0;
14380 },
14381 updateVal: function (obj, key, val, fun) {
14382 if (typeof obj[key] === 'undefined') {
14383 obj[key] = val;
14384 } else {
14385 obj[key] = fun(val, obj[key]);
14386 }
14387 },
14388 updateBounds: function (startx, starty, stopx, stopy) {
14389 const _self = this;
14390
14391 let cnt = 0;
14392
14393 function updateFn(type) {
14394 return function updateItemBounds(item) {
14395 cnt++; // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems
14396
14397 const n = _self.sequenceItems.length - cnt + 1;
14398
14399 _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);
14400
14401 _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);
14402
14403 _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);
14404
14405 _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);
14406
14407 if (!(type === 'activation')) {
14408 _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);
14409
14410 _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);
14411
14412 _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);
14413
14414 _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);
14415 }
14416 };
14417 }
14418
14419 this.sequenceItems.forEach(updateFn());
14420 this.activations.forEach(updateFn('activation'));
14421 },
14422 insert: function (startx, starty, stopx, stopy) {
14423 const _startx = Math.min(startx, stopx);
14424
14425 const _stopx = Math.max(startx, stopx);
14426
14427 const _starty = Math.min(starty, stopy);
14428
14429 const _stopy = Math.max(starty, stopy);
14430
14431 this.updateVal(bounds.data, 'startx', _startx, Math.min);
14432 this.updateVal(bounds.data, 'starty', _starty, Math.min);
14433 this.updateVal(bounds.data, 'stopx', _stopx, Math.max);
14434 this.updateVal(bounds.data, 'stopy', _stopy, Math.max);
14435 this.updateBounds(_startx, _starty, _stopx, _stopy);
14436 },
14437 newActivation: function (message, diagram) {
14438 const actorRect = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors()[message.from.actor];
14439 const stackedSize = actorActivations(message.from.actor).length;
14440 const x = actorRect.x + conf.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;
14441 this.activations.push({
14442 startx: x,
14443 starty: this.verticalPos + 2,
14444 stopx: x + conf.activationWidth,
14445 stopy: undefined,
14446 actor: message.from.actor,
14447 anchored: _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].anchorElement(diagram)
14448 });
14449 },
14450 endActivation: function (message) {
14451 // find most recent activation for given actor
14452 const lastActorActivationIdx = this.activations.map(function (activation) {
14453 return activation.actor;
14454 }).lastIndexOf(message.from.actor);
14455 const activation = this.activations.splice(lastActorActivationIdx, 1)[0];
14456 return activation;
14457 },
14458 newLoop: function (title) {
14459 this.sequenceItems.push({
14460 startx: undefined,
14461 starty: this.verticalPos,
14462 stopx: undefined,
14463 stopy: undefined,
14464 title: title
14465 });
14466 },
14467 endLoop: function () {
14468 const loop = this.sequenceItems.pop();
14469 return loop;
14470 },
14471 addSectionToLoop: function (message) {
14472 const loop = this.sequenceItems.pop();
14473 loop.sections = loop.sections || [];
14474 loop.sectionTitles = loop.sectionTitles || [];
14475 loop.sections.push(bounds.getVerticalPos());
14476 loop.sectionTitles.push(message);
14477 this.sequenceItems.push(loop);
14478 },
14479 bumpVerticalPos: function (bump) {
14480 this.verticalPos = this.verticalPos + bump;
14481 this.data.stopy = this.verticalPos;
14482 },
14483 getVerticalPos: function () {
14484 return this.verticalPos;
14485 },
14486 getBounds: function () {
14487 return this.data;
14488 }
14489};
14490
14491const _drawLongText = (text, x, y, g, width) => {
14492 let textHeight = 0;
14493 const lines = text.split(/<br\/?>/ig);
14494
14495 for (const line of lines) {
14496 const textObj = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getTextObj();
14497 textObj.x = x;
14498 textObj.y = y + textHeight;
14499 textObj.textMargin = conf.noteMargin;
14500 textObj.dy = '1em';
14501 textObj.text = line;
14502 textObj.class = 'noteText';
14503 const textElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawText(g, textObj, width);
14504 textHeight += (textElem._groups || textElem)[0][0].getBBox().height;
14505 }
14506
14507 return textHeight;
14508};
14509/**
14510 * Draws an actor in the diagram with the attaced line
14511 * @param center - The center of the the actor
14512 * @param pos The position if the actor in the liost of actors
14513 * @param description The text in the box
14514 */
14515
14516
14517const drawNote = function (elem, startx, verticalPos, msg, forceWidth) {
14518 const rect = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getNoteRect();
14519 rect.x = startx;
14520 rect.y = verticalPos;
14521 rect.width = forceWidth || conf.width;
14522 rect.class = 'note';
14523 let g = elem.append('g');
14524 const rectElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawRect(g, rect);
14525
14526 const textHeight = _drawLongText(msg.message, startx - 4, verticalPos + 24, g, rect.width - conf.noteMargin);
14527
14528 bounds.insert(startx, verticalPos, startx + rect.width, verticalPos + 2 * conf.noteMargin + textHeight);
14529 rectElem.attr('height', textHeight + 2 * conf.noteMargin);
14530 bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);
14531};
14532/**
14533 * Draws a message
14534 * @param elem
14535 * @param startx
14536 * @param stopx
14537 * @param verticalPos
14538 * @param txtCenter
14539 * @param msg
14540 */
14541
14542
14543const drawMessage = function (elem, startx, stopx, verticalPos, msg, sequenceIndex) {
14544 const g = elem.append('g');
14545 const txtCenter = startx + (stopx - startx) / 2;
14546 const textElem = g.append('text') // text label for the x axis
14547 .attr('x', txtCenter).attr('y', verticalPos - 7).style('text-anchor', 'middle').attr('class', 'messageText').text(msg.message);
14548 let textWidth = (textElem._groups || textElem)[0][0].getBBox().width;
14549 let line;
14550
14551 if (startx === stopx) {
14552 if (conf.rightAngles) {
14553 line = g.append('path').attr('d', `M ${startx},${verticalPos} H ${startx + conf.width / 2} V ${verticalPos + 25} H ${startx}`);
14554 } else {
14555 line = g.append('path').attr('d', 'M ' + startx + ',' + verticalPos + ' C ' + (startx + 60) + ',' + (verticalPos - 10) + ' ' + (startx + 60) + ',' + (verticalPos + 30) + ' ' + startx + ',' + (verticalPos + 20));
14556 }
14557
14558 bounds.bumpVerticalPos(30);
14559 const dx = Math.max(textWidth / 2, 100);
14560 bounds.insert(startx - dx, bounds.getVerticalPos() - 10, stopx + dx, bounds.getVerticalPos());
14561 } else {
14562 line = g.append('line');
14563 line.attr('x1', startx);
14564 line.attr('y1', verticalPos);
14565 line.attr('x2', stopx);
14566 line.attr('y2', verticalPos);
14567 bounds.insert(startx, bounds.getVerticalPos() - 10, stopx, bounds.getVerticalPos());
14568 } // Make an SVG Container
14569 // Draw the line
14570
14571
14572 if (msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN) {
14573 line.style('stroke-dasharray', '3, 3');
14574 line.attr('class', 'messageLine1');
14575 } else {
14576 line.attr('class', 'messageLine0');
14577 }
14578
14579 let url = '';
14580
14581 if (conf.arrowMarkerAbsolute) {
14582 url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
14583 url = url.replace(/\(/g, '\\(');
14584 url = url.replace(/\)/g, '\\)');
14585 }
14586
14587 line.attr('stroke-width', 2);
14588 line.attr('stroke', 'black');
14589 line.style('fill', 'none'); // remove any fill colour
14590
14591 if (msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED) {
14592 line.attr('marker-end', 'url(' + url + '#arrowhead)');
14593 }
14594
14595 if (msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS) {
14596 line.attr('marker-end', 'url(' + url + '#crosshead)');
14597 } // add node number
14598
14599
14600 if (conf.showSequenceNumbers) {
14601 line.attr('marker-start', 'url(' + url + '#sequencenumber)');
14602 g.append('text').attr('x', startx).attr('y', verticalPos + 4).attr('font-family', 'sans-serif').attr('font-size', '12px').attr('text-anchor', 'middle').attr('textLength', '16px').attr('class', 'sequenceNumber').text(sequenceIndex);
14603 }
14604};
14605
14606const drawActors = function (diagram, actors, actorKeys, verticalPos) {
14607 // Draw the actors
14608 for (let i = 0; i < actorKeys.length; i++) {
14609 const key = actorKeys[i]; // Add some rendering data to the object
14610
14611 actors[key].x = i * conf.actorMargin + i * conf.width;
14612 actors[key].y = verticalPos;
14613 actors[key].width = conf.diagramMarginX;
14614 actors[key].height = conf.diagramMarginY; // Draw the box with the attached line
14615
14616 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActor(diagram, actors[key].x, verticalPos, actors[key].description, conf);
14617 bounds.insert(actors[key].x, verticalPos, actors[key].x + conf.width, conf.height);
14618 } // Add a margin between the actor boxes and the first arrow
14619
14620
14621 bounds.bumpVerticalPos(conf.height);
14622};
14623const setConf = function (cnf) {
14624 const keys = Object.keys(cnf);
14625 keys.forEach(function (key) {
14626 conf[key] = cnf[key];
14627 });
14628};
14629
14630const actorActivations = function (actor) {
14631 return bounds.activations.filter(function (activation) {
14632 return activation.actor === actor;
14633 });
14634};
14635
14636const actorFlowVerticaBounds = function (actor) {
14637 // handle multiple stacked activations for same actor
14638 const actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors();
14639 const activations = actorActivations(actor);
14640 const left = activations.reduce(function (acc, activation) {
14641 return Math.min(acc, activation.startx);
14642 }, actors[actor].x + conf.width / 2);
14643 const right = activations.reduce(function (acc, activation) {
14644 return Math.max(acc, activation.stopx);
14645 }, actors[actor].x + conf.width / 2);
14646 return [left, right];
14647};
14648/**
14649 * Draws a flowchart in the tag with id: id based on the graph definition in text.
14650 * @param text
14651 * @param id
14652 */
14653
14654
14655const draw = function (text, id) {
14656 _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.clear();
14657 _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].parse(text + '\n');
14658 bounds.init();
14659 const diagram = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`);
14660 let startx;
14661 let stopx;
14662 let forceWidth; // Fetch data from the parsing
14663
14664 const actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors();
14665 const actorKeys = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActorKeys();
14666 const messages = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getMessages();
14667 const title = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getTitle();
14668 drawActors(diagram, actors, actorKeys, 0); // The arrow head definition is attached to the svg once
14669
14670 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowHead(diagram);
14671 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowCrossHead(diagram);
14672 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertSequenceNumber(diagram);
14673
14674 function activeEnd(msg, verticalPos) {
14675 const activationData = bounds.endActivation(msg);
14676
14677 if (activationData.starty + 18 > verticalPos) {
14678 activationData.starty = verticalPos - 6;
14679 verticalPos += 12;
14680 }
14681
14682 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActivation(diagram, activationData, verticalPos, conf, actorActivations(msg.from.actor).length);
14683 bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);
14684 } // const lastMsg
14685 // Draw the messages/signals
14686
14687
14688 let sequenceIndex = 1;
14689 messages.forEach(function (msg) {
14690 let loopData;
14691
14692 switch (msg.type) {
14693 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.NOTE:
14694 bounds.bumpVerticalPos(conf.boxMargin);
14695 startx = actors[msg.from].x;
14696 stopx = actors[msg.to].x;
14697
14698 if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.RIGHTOF) {
14699 drawNote(diagram, startx + (conf.width + conf.actorMargin) / 2, bounds.getVerticalPos(), msg);
14700 } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.LEFTOF) {
14701 drawNote(diagram, startx - (conf.width + conf.actorMargin) / 2, bounds.getVerticalPos(), msg);
14702 } else if (msg.to === msg.from) {
14703 // Single-actor over
14704 drawNote(diagram, startx, bounds.getVerticalPos(), msg);
14705 } else {
14706 // Multi-actor over
14707 forceWidth = Math.abs(startx - stopx) + conf.actorMargin;
14708 drawNote(diagram, (startx + stopx + conf.width - forceWidth) / 2, bounds.getVerticalPos(), msg, forceWidth);
14709 }
14710
14711 break;
14712
14713 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_START:
14714 bounds.newActivation(msg, diagram);
14715 break;
14716
14717 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_END:
14718 activeEnd(msg, bounds.getVerticalPos());
14719 break;
14720
14721 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_START:
14722 bounds.bumpVerticalPos(conf.boxMargin);
14723 bounds.newLoop(msg.message);
14724 bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
14725 break;
14726
14727 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_END:
14728 loopData = bounds.endLoop();
14729 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'loop', conf);
14730 bounds.bumpVerticalPos(conf.boxMargin);
14731 break;
14732
14733 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_START:
14734 bounds.bumpVerticalPos(conf.boxMargin);
14735 bounds.newLoop(msg.message);
14736 bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
14737 break;
14738
14739 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_END:
14740 loopData = bounds.endLoop();
14741 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'opt', conf);
14742 bounds.bumpVerticalPos(conf.boxMargin);
14743 break;
14744
14745 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_START:
14746 bounds.bumpVerticalPos(conf.boxMargin);
14747 bounds.newLoop(msg.message);
14748 bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
14749 break;
14750
14751 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_ELSE:
14752 bounds.bumpVerticalPos(conf.boxMargin);
14753 loopData = bounds.addSectionToLoop(msg.message);
14754 bounds.bumpVerticalPos(conf.boxMargin);
14755 break;
14756
14757 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_END:
14758 loopData = bounds.endLoop();
14759 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'alt', conf);
14760 bounds.bumpVerticalPos(conf.boxMargin);
14761 break;
14762
14763 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_START:
14764 bounds.bumpVerticalPos(conf.boxMargin);
14765 bounds.newLoop(msg.message);
14766 bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
14767 break;
14768
14769 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_AND:
14770 bounds.bumpVerticalPos(conf.boxMargin);
14771 loopData = bounds.addSectionToLoop(msg.message);
14772 bounds.bumpVerticalPos(conf.boxMargin);
14773 break;
14774
14775 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_END:
14776 loopData = bounds.endLoop();
14777 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'par', conf);
14778 bounds.bumpVerticalPos(conf.boxMargin);
14779 break;
14780
14781 default:
14782 try {
14783 // lastMsg = msg
14784 bounds.bumpVerticalPos(conf.messageMargin);
14785 const fromBounds = actorFlowVerticaBounds(msg.from);
14786 const toBounds = actorFlowVerticaBounds(msg.to);
14787 const fromIdx = fromBounds[0] <= toBounds[0] ? 1 : 0;
14788 const toIdx = fromBounds[0] < toBounds[0] ? 0 : 1;
14789 startx = fromBounds[fromIdx];
14790 stopx = toBounds[toIdx];
14791 const verticalPos = bounds.getVerticalPos();
14792 drawMessage(diagram, startx, stopx, verticalPos, msg, sequenceIndex);
14793 const allBounds = fromBounds.concat(toBounds);
14794 bounds.insert(Math.min.apply(null, allBounds), verticalPos, Math.max.apply(null, allBounds), verticalPos);
14795 } catch (e) {
14796 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].error('error while drawing message', e);
14797 }
14798
14799 } // Increment sequence counter if msg.type is a line (and not another event like activation or note, etc)
14800
14801
14802 if ([_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS].includes(msg.type)) {
14803 sequenceIndex++;
14804 }
14805 });
14806
14807 if (conf.mirrorActors) {
14808 // Draw actors below diagram
14809 bounds.bumpVerticalPos(conf.boxMargin * 2);
14810 drawActors(diagram, actors, actorKeys, bounds.getVerticalPos());
14811 }
14812
14813 const box = bounds.getBounds(); // Adjust line height of actor lines now that the height of the diagram is known
14814
14815 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('For line height fix Querying: #' + id + ' .actor-line');
14816 const actorLines = d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('#' + id + ' .actor-line');
14817 actorLines.attr('y2', box.stopy);
14818 let height = box.stopy - box.starty + 2 * conf.diagramMarginY;
14819
14820 if (conf.mirrorActors) {
14821 height = height - conf.boxMargin + conf.bottomMarginAdj;
14822 }
14823
14824 const width = box.stopx - box.startx + 2 * conf.diagramMarginX;
14825
14826 if (title) {
14827 diagram.append('text').text(title).attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr('y', -25);
14828 }
14829
14830 if (conf.useMaxWidth) {
14831 diagram.attr('height', '100%');
14832 diagram.attr('width', '100%');
14833 diagram.attr('style', 'max-width:' + width + 'px;');
14834 } else {
14835 diagram.attr('height', height);
14836 diagram.attr('width', width);
14837 }
14838
14839 const extraVertForTitle = title ? 40 : 0;
14840 diagram.attr('viewBox', box.startx - conf.diagramMarginX + ' -' + (conf.diagramMarginY + extraVertForTitle) + ' ' + width + ' ' + (height + extraVertForTitle));
14841};
14842/* harmony default export */ __webpack_exports__["default"] = ({
14843 bounds,
14844 drawActors,
14845 setConf,
14846 draw
14847});
14848
14849/***/ }),
14850
14851/***/ "./src/diagrams/sequence/svgDraw.js":
14852/*!******************************************!*\
14853 !*** ./src/diagrams/sequence/svgDraw.js ***!
14854 \******************************************/
14855/*! exports provided: drawRect, drawText, drawLabel, drawActor, anchorElement, drawActivation, drawLoop, insertArrowHead, insertSequenceNumber, insertArrowCrossHead, getTextObj, getNoteRect, default */
14856/***/ (function(module, __webpack_exports__, __webpack_require__) {
14857
14858"use strict";
14859__webpack_require__.r(__webpack_exports__);
14860/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawRect", function() { return drawRect; });
14861/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawText", function() { return drawText; });
14862/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLabel", function() { return drawLabel; });
14863/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActor", function() { return drawActor; });
14864/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "anchorElement", function() { return anchorElement; });
14865/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActivation", function() { return drawActivation; });
14866/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLoop", function() { return drawLoop; });
14867/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowHead", function() { return insertArrowHead; });
14868/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertSequenceNumber", function() { return insertSequenceNumber; });
14869/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowCrossHead", function() { return insertArrowCrossHead; });
14870/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTextObj", function() { return getTextObj; });
14871/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNoteRect", function() { return getNoteRect; });
14872const drawRect = function (elem, rectData) {
14873 const rectElem = elem.append('rect');
14874 rectElem.attr('x', rectData.x);
14875 rectElem.attr('y', rectData.y);
14876 rectElem.attr('fill', rectData.fill);
14877 rectElem.attr('stroke', rectData.stroke);
14878 rectElem.attr('width', rectData.width);
14879 rectElem.attr('height', rectData.height);
14880 rectElem.attr('rx', rectData.rx);
14881 rectElem.attr('ry', rectData.ry);
14882
14883 if (typeof rectData.class !== 'undefined') {
14884 rectElem.attr('class', rectData.class);
14885 }
14886
14887 return rectElem;
14888};
14889const drawText = function (elem, textData, width) {
14890 // Remove and ignore br:s
14891 const nText = textData.text.replace(/<br\/?>/ig, ' ');
14892 const textElem = elem.append('text');
14893 textElem.attr('x', textData.x);
14894 textElem.attr('y', textData.y);
14895 textElem.style('text-anchor', textData.anchor);
14896 textElem.attr('fill', textData.fill);
14897
14898 if (typeof textData.class !== 'undefined') {
14899 textElem.attr('class', textData.class);
14900 }
14901
14902 const span = textElem.append('tspan');
14903 span.attr('x', textData.x + textData.textMargin * 2);
14904 span.attr('fill', textData.fill);
14905 span.text(nText);
14906 return textElem;
14907};
14908const drawLabel = function (elem, txtObject) {
14909 function genPoints(x, y, width, height, cut) {
14910 return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height);
14911 }
14912
14913 const polygon = elem.append('polygon');
14914 polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));
14915 polygon.attr('class', 'labelBox');
14916 txtObject.y = txtObject.y + txtObject.labelMargin;
14917 txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
14918 drawText(elem, txtObject);
14919};
14920let actorCnt = -1;
14921/**
14922 * Draws an actor in the diagram with the attaced line
14923 * @param center - The center of the the actor
14924 * @param pos The position if the actor in the liost of actors
14925 * @param description The text in the box
14926 */
14927
14928const drawActor = function (elem, left, verticalPos, description, conf) {
14929 const center = left + conf.width / 2;
14930 const g = elem.append('g');
14931
14932 if (verticalPos === 0) {
14933 actorCnt++;
14934 g.append('line').attr('id', 'actor' + actorCnt).attr('x1', center).attr('y1', 5).attr('x2', center).attr('y2', 2000).attr('class', 'actor-line').attr('stroke-width', '0.5px').attr('stroke', '#999');
14935 }
14936
14937 const rect = getNoteRect();
14938 rect.x = left;
14939 rect.y = verticalPos;
14940 rect.fill = '#eaeaea';
14941 rect.width = conf.width;
14942 rect.height = conf.height;
14943 rect.class = 'actor';
14944 rect.rx = 3;
14945 rect.ry = 3;
14946 drawRect(g, rect);
14947
14948 _drawTextCandidateFunc(conf)(description, g, rect.x, rect.y, rect.width, rect.height, {
14949 'class': 'actor'
14950 }, conf);
14951};
14952const anchorElement = function (elem) {
14953 return elem.append('g');
14954};
14955/**
14956 * Draws an actor in the diagram with the attaced line
14957 * @param elem - element to append activation rect
14958 * @param bounds - activation box bounds
14959 * @param verticalPos - precise y cooridnate of bottom activation box edge
14960 */
14961
14962const drawActivation = function (elem, bounds, verticalPos, conf, actorActivations) {
14963 const rect = getNoteRect();
14964 const g = bounds.anchored;
14965 rect.x = bounds.startx;
14966 rect.y = bounds.starty;
14967 rect.class = 'activation' + actorActivations % 3; // Will evaluate to 0, 1 or 2
14968
14969 rect.width = bounds.stopx - bounds.startx;
14970 rect.height = verticalPos - bounds.starty;
14971 drawRect(g, rect);
14972};
14973/**
14974 * Draws an actor in the diagram with the attaced line
14975 * @param center - The center of the the actor
14976 * @param pos The position if the actor in the list of actors
14977 * @param description The text in the box
14978 */
14979
14980const drawLoop = function (elem, bounds, labelText, conf) {
14981 const g = elem.append('g');
14982
14983 const drawLoopLine = function (startx, starty, stopx, stopy) {
14984 return g.append('line').attr('x1', startx).attr('y1', starty).attr('x2', stopx).attr('y2', stopy).attr('class', 'loopLine');
14985 };
14986
14987 drawLoopLine(bounds.startx, bounds.starty, bounds.stopx, bounds.starty);
14988 drawLoopLine(bounds.stopx, bounds.starty, bounds.stopx, bounds.stopy);
14989 drawLoopLine(bounds.startx, bounds.stopy, bounds.stopx, bounds.stopy);
14990 drawLoopLine(bounds.startx, bounds.starty, bounds.startx, bounds.stopy);
14991
14992 if (typeof bounds.sections !== 'undefined') {
14993 bounds.sections.forEach(function (item) {
14994 drawLoopLine(bounds.startx, item, bounds.stopx, item).style('stroke-dasharray', '3, 3');
14995 });
14996 }
14997
14998 let txt = getTextObj();
14999 txt.text = labelText;
15000 txt.x = bounds.startx;
15001 txt.y = bounds.starty;
15002 txt.labelMargin = 1.5 * 10; // This is the small box that says "loop"
15003
15004 txt.class = 'labelText'; // Its size & position are fixed.
15005
15006 drawLabel(g, txt);
15007 txt = getTextObj();
15008 txt.text = '[ ' + bounds.title + ' ]';
15009 txt.x = bounds.startx + (bounds.stopx - bounds.startx) / 2;
15010 txt.y = bounds.starty + 1.5 * conf.boxMargin;
15011 txt.anchor = 'middle';
15012 txt.class = 'loopText';
15013 drawText(g, txt);
15014
15015 if (typeof bounds.sectionTitles !== 'undefined') {
15016 bounds.sectionTitles.forEach(function (item, idx) {
15017 if (item !== '') {
15018 txt.text = '[ ' + item + ' ]';
15019 txt.y = bounds.sections[idx] + 1.5 * conf.boxMargin;
15020 drawText(g, txt);
15021 }
15022 });
15023 }
15024};
15025/**
15026 * Setup arrow head and define the marker. The result is appended to the svg.
15027 */
15028
15029const insertArrowHead = function (elem) {
15030 elem.append('defs').append('marker').attr('id', 'arrowhead').attr('refX', 5).attr('refY', 2).attr('markerWidth', 6).attr('markerHeight', 4).attr('orient', 'auto').append('path').attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead
15031};
15032/**
15033 * Setup node number. The result is appended to the svg.
15034 */
15035
15036const insertSequenceNumber = function (elem) {
15037 elem.append('defs').append('marker').attr('id', 'sequencenumber').attr('refX', 15).attr('refY', 15).attr('markerWidth', 60).attr('markerHeight', 40).attr('orient', 'auto').append('circle').attr('cx', 15).attr('cy', 15).attr('r', 6); // .style("fill", '#f00');
15038};
15039/**
15040 * Setup arrow head and define the marker. The result is appended to the svg.
15041 */
15042
15043const insertArrowCrossHead = function (elem) {
15044 const defs = elem.append('defs');
15045 const marker = defs.append('marker').attr('id', 'crosshead').attr('markerWidth', 15).attr('markerHeight', 8).attr('orient', 'auto').attr('refX', 16).attr('refY', 4); // The arrow
15046
15047 marker.append('path').attr('fill', 'black').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 9,2 V 6 L16,4 Z'); // The cross
15048
15049 marker.append('path').attr('fill', 'none').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7'); // this is actual shape for arrowhead
15050};
15051const getTextObj = function () {
15052 const txt = {
15053 x: 0,
15054 y: 0,
15055 'fill': undefined,
15056 'text-anchor': 'start',
15057 style: '#666',
15058 width: 100,
15059 height: 100,
15060 textMargin: 0,
15061 rx: 0,
15062 ry: 0
15063 };
15064 return txt;
15065};
15066const getNoteRect = function () {
15067 const rect = {
15068 x: 0,
15069 y: 0,
15070 fill: '#EDF2AE',
15071 stroke: '#666',
15072 width: 100,
15073 anchor: 'start',
15074 height: 100,
15075 rx: 0,
15076 ry: 0
15077 };
15078 return rect;
15079};
15080
15081const _drawTextCandidateFunc = function () {
15082 function byText(content, g, x, y, width, height, textAttrs) {
15083 const text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('text-anchor', 'middle').text(content);
15084
15085 _setTextAttrs(text, textAttrs);
15086 }
15087
15088 function byTspan(content, g, x, y, width, height, textAttrs, conf) {
15089 const {
15090 actorFontSize,
15091 actorFontFamily
15092 } = conf;
15093 const lines = content.split(/<br\/?>/ig);
15094
15095 for (let i = 0; i < lines.length; i++) {
15096 const dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2;
15097 const text = g.append('text').attr('x', x + width / 2).attr('y', y).style('text-anchor', 'middle').style('font-size', actorFontSize).style('font-family', actorFontFamily);
15098 text.append('tspan').attr('x', x + width / 2).attr('dy', dy).text(lines[i]);
15099 text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central');
15100
15101 _setTextAttrs(text, textAttrs);
15102 }
15103 }
15104
15105 function byFo(content, g, x, y, width, height, textAttrs, conf) {
15106 const s = g.append('switch');
15107 const f = s.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height);
15108 const text = f.append('div').style('display', 'table').style('height', '100%').style('width', '100%');
15109 text.append('div').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle').text(content);
15110 byTspan(content, s, x, y, width, height, textAttrs, conf);
15111
15112 _setTextAttrs(text, textAttrs);
15113 }
15114
15115 function _setTextAttrs(toText, fromTextAttrsDict) {
15116 for (const key in fromTextAttrsDict) {
15117 if (fromTextAttrsDict.hasOwnProperty(key)) {
15118 toText.attr(key, fromTextAttrsDict[key]);
15119 }
15120 }
15121 }
15122
15123 return function (conf) {
15124 return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;
15125 };
15126}();
15127
15128/* harmony default export */ __webpack_exports__["default"] = ({
15129 drawRect,
15130 drawText,
15131 drawLabel,
15132 drawActor,
15133 anchorElement,
15134 drawActivation,
15135 drawLoop,
15136 insertArrowHead,
15137 insertSequenceNumber,
15138 insertArrowCrossHead,
15139 getTextObj,
15140 getNoteRect
15141});
15142
15143/***/ }),
15144
15145/***/ "./src/logger.js":
15146/*!***********************!*\
15147 !*** ./src/logger.js ***!
15148 \***********************/
15149/*! exports provided: LEVELS, logger, setLogLevel */
15150/***/ (function(module, __webpack_exports__, __webpack_require__) {
15151
15152"use strict";
15153__webpack_require__.r(__webpack_exports__);
15154/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LEVELS", function() { return LEVELS; });
15155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logger", function() { return logger; });
15156/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLogLevel", function() { return setLogLevel; });
15157/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-mini */ "moment-mini");
15158/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);
15159
15160const LEVELS = {
15161 debug: 1,
15162 info: 2,
15163 warn: 3,
15164 error: 4,
15165 fatal: 5
15166};
15167const logger = {
15168 debug: () => {},
15169 info: () => {},
15170 warn: () => {},
15171 error: () => {},
15172 fatal: () => {}
15173};
15174const setLogLevel = function (level) {
15175 logger.debug = () => {};
15176
15177 logger.info = () => {};
15178
15179 logger.warn = () => {};
15180
15181 logger.error = () => {};
15182
15183 logger.fatal = () => {};
15184
15185 if (level <= LEVELS.fatal) {
15186 logger.fatal = console.log.bind(console, '\x1b[35m', format('FATAL'));
15187 }
15188
15189 if (level <= LEVELS.error) {
15190 logger.error = console.log.bind(console, '\x1b[31m', format('ERROR'));
15191 }
15192
15193 if (level <= LEVELS.warn) {
15194 logger.warn = console.log.bind(console, `\x1b[33m`, format('WARN'));
15195 }
15196
15197 if (level <= LEVELS.info) {
15198 logger.info = console.log.bind(console, '\x1b[34m', format('INFO'));
15199 }
15200
15201 if (level <= LEVELS.debug) {
15202 logger.debug = console.log.bind(console, '\x1b[32m', format('DEBUG'));
15203 }
15204};
15205
15206const format = level => {
15207 const time = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()().format('HH:mm:ss.SSS');
15208 return `${time} : ${level} : `;
15209};
15210
15211/***/ }),
15212
15213/***/ "./src/mermaid.js":
15214/*!************************!*\
15215 !*** ./src/mermaid.js ***!
15216 \************************/
15217/*! exports provided: default */
15218/***/ (function(module, __webpack_exports__, __webpack_require__) {
15219
15220"use strict";
15221__webpack_require__.r(__webpack_exports__);
15222/* harmony import */ var he__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! he */ "he");
15223/* harmony import */ var he__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(he__WEBPACK_IMPORTED_MODULE_0__);
15224/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mermaidAPI */ "./src/mermaidAPI.js");
15225/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./logger */ "./src/logger.js");
15226/**
15227 * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid functionality and to render
15228 * the diagrams to svg code.
15229 */
15230
15231
15232
15233/**
15234 * ## init
15235 * Function that goes through the document to find the chart definitions in there and render them.
15236 *
15237 * The function tags the processed attributes with the attribute data-processed and ignores found elements with the
15238 * attribute already set. This way the init function can be triggered several times.
15239 *
15240 * Optionally, `init` can accept in the second argument one of the following:
15241 * - a DOM Node
15242 * - an array of DOM nodes (as would come from a jQuery selector)
15243 * - a W3C selector, a la `.mermaid`
15244 *
15245 * ```mermaid
15246 * graph LR;
15247 * a(Find elements)-->b{Processed}
15248 * b-->|Yes|c(Leave element)
15249 * b-->|No |d(Transform)
15250 * ```
15251 * Renders the mermaid diagrams
15252 * @param nodes a css selector or an array of nodes
15253 */
15254
15255const init = function () {
15256 const conf = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].getConfig();
15257 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Starting rendering diagrams');
15258 let nodes;
15259
15260 if (arguments.length >= 2) {
15261 /*! sequence config was passed as #1 */
15262 if (typeof arguments[0] !== 'undefined') {
15263 mermaid.sequenceConfig = arguments[0];
15264 }
15265
15266 nodes = arguments[1];
15267 } else {
15268 nodes = arguments[0];
15269 } // if last argument is a function this is the callback function
15270
15271
15272 let callback;
15273
15274 if (typeof arguments[arguments.length - 1] === 'function') {
15275 callback = arguments[arguments.length - 1];
15276 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Callback function found');
15277 } else {
15278 if (typeof conf.mermaid !== 'undefined') {
15279 if (typeof conf.mermaid.callback === 'function') {
15280 callback = conf.mermaid.callback;
15281 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Callback function found');
15282 } else {
15283 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('No Callback function found');
15284 }
15285 }
15286 }
15287
15288 nodes = nodes === undefined ? document.querySelectorAll('.mermaid') : typeof nodes === 'string' ? document.querySelectorAll(nodes) : nodes instanceof window.Node ? [nodes] : nodes; // Last case - sequence config was passed pick next
15289
15290 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Start On Load before: ' + mermaid.startOnLoad);
15291
15292 if (typeof mermaid.startOnLoad !== 'undefined') {
15293 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Start On Load inner: ' + mermaid.startOnLoad);
15294 _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize({
15295 startOnLoad: mermaid.startOnLoad
15296 });
15297 }
15298
15299 if (typeof mermaid.ganttConfig !== 'undefined') {
15300 _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize({
15301 gantt: mermaid.ganttConfig
15302 });
15303 }
15304
15305 let txt;
15306
15307 for (let i = 0; i < nodes.length; i++) {
15308 const element = nodes[i];
15309 /*! Check if previously processed */
15310
15311 if (!element.getAttribute('data-processed')) {
15312 element.setAttribute('data-processed', true);
15313 } else {
15314 continue;
15315 }
15316
15317 const id = `mermaid-${Date.now()}`; // Fetch the graph definition including tags
15318
15319 txt = element.innerHTML; // transforms the html to pure text
15320
15321 txt = he__WEBPACK_IMPORTED_MODULE_0___default.a.decode(txt).trim().replace(/<br>/ig, '<br/>');
15322 _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].render(id, txt, (svgCode, bindFunctions) => {
15323 element.innerHTML = svgCode;
15324
15325 if (typeof callback !== 'undefined') {
15326 callback(id);
15327 }
15328
15329 bindFunctions(element);
15330 }, element);
15331 }
15332};
15333
15334const initialize = function (config) {
15335 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Initializing mermaid ');
15336
15337 if (typeof config.mermaid !== 'undefined') {
15338 if (typeof config.mermaid.startOnLoad !== 'undefined') {
15339 mermaid.startOnLoad = config.mermaid.startOnLoad;
15340 }
15341
15342 if (typeof config.mermaid.htmlLabels !== 'undefined') {
15343 mermaid.htmlLabels = config.mermaid.htmlLabels;
15344 }
15345 }
15346
15347 _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize(config);
15348};
15349/**
15350 * ##contentLoaded
15351 * Callback function that is called when page is loaded. This functions fetches configuration for mermaid rendering and
15352 * calls init for rendering the mermaid diagrams on the page.
15353 */
15354
15355
15356const contentLoaded = function () {
15357 let config;
15358
15359 if (mermaid.startOnLoad) {
15360 // No config found, do check API config
15361 config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].getConfig();
15362
15363 if (config.startOnLoad) {
15364 mermaid.init();
15365 }
15366 } else {
15367 if (typeof mermaid.startOnLoad === 'undefined') {
15368 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('In start, no config');
15369 config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].getConfig();
15370
15371 if (config.startOnLoad) {
15372 mermaid.init();
15373 }
15374 }
15375 }
15376};
15377
15378if (typeof document !== 'undefined') {
15379 /*!
15380 * Wait for document loaded before starting the execution
15381 */
15382 window.addEventListener('load', function () {
15383 contentLoaded();
15384 }, false);
15385}
15386
15387const mermaid = {
15388 startOnLoad: true,
15389 htmlLabels: true,
15390 mermaidAPI: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"],
15391 parse: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].parse,
15392 render: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].render,
15393 init,
15394 initialize,
15395 contentLoaded
15396};
15397/* harmony default export */ __webpack_exports__["default"] = (mermaid);
15398
15399/***/ }),
15400
15401/***/ "./src/mermaidAPI.js":
15402/*!***************************!*\
15403 !*** ./src/mermaidAPI.js ***!
15404 \***************************/
15405/*! exports provided: encodeEntities, decodeEntities, default */
15406/***/ (function(module, __webpack_exports__, __webpack_require__) {
15407
15408"use strict";
15409__webpack_require__.r(__webpack_exports__);
15410/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeEntities", function() { return encodeEntities; });
15411/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decodeEntities", function() { return decodeEntities; });
15412/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
15413/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
15414/* harmony import */ var scope_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! scope-css */ "scope-css");
15415/* harmony import */ var scope_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(scope_css__WEBPACK_IMPORTED_MODULE_1__);
15416/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../package.json */ "./package.json");
15417var _package_json__WEBPACK_IMPORTED_MODULE_2___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../package.json */ "./package.json", 1);
15418/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config */ "./src/config.js");
15419/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./logger */ "./src/logger.js");
15420/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./src/utils.js");
15421/* harmony import */ var _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./diagrams/flowchart/flowRenderer */ "./src/diagrams/flowchart/flowRenderer.js");
15422/* harmony import */ var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./diagrams/flowchart/parser/flow */ "./src/diagrams/flowchart/parser/flow.js");
15423/* harmony import */ var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7__);
15424/* harmony import */ var _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./diagrams/flowchart/flowDb */ "./src/diagrams/flowchart/flowDb.js");
15425/* harmony import */ var _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./diagrams/sequence/sequenceRenderer */ "./src/diagrams/sequence/sequenceRenderer.js");
15426/* harmony import */ var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diagrams/sequence/parser/sequenceDiagram */ "./src/diagrams/sequence/parser/sequenceDiagram.js");
15427/* harmony import */ var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10__);
15428/* harmony import */ var _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diagrams/sequence/sequenceDb */ "./src/diagrams/sequence/sequenceDb.js");
15429/* harmony import */ var _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diagrams/gantt/ganttRenderer */ "./src/diagrams/gantt/ganttRenderer.js");
15430/* harmony import */ var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diagrams/gantt/parser/gantt */ "./src/diagrams/gantt/parser/gantt.js");
15431/* harmony import */ var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13__);
15432/* harmony import */ var _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diagrams/gantt/ganttDb */ "./src/diagrams/gantt/ganttDb.js");
15433/* harmony import */ var _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diagrams/class/classRenderer */ "./src/diagrams/class/classRenderer.js");
15434/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diagrams/class/parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.js");
15435/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16__);
15436/* harmony import */ var _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diagrams/class/classDb */ "./src/diagrams/class/classDb.js");
15437/* harmony import */ var _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diagrams/git/gitGraphRenderer */ "./src/diagrams/git/gitGraphRenderer.js");
15438/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./diagrams/git/parser/gitGraph */ "./src/diagrams/git/parser/gitGraph.js");
15439/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_19__);
15440/* harmony import */ var _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./diagrams/git/gitGraphAst */ "./src/diagrams/git/gitGraphAst.js");
15441/* harmony import */ var _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./diagrams/info/infoRenderer */ "./src/diagrams/info/infoRenderer.js");
15442/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./diagrams/info/parser/info */ "./src/diagrams/info/parser/info.js");
15443/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_22__);
15444/* harmony import */ var _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./diagrams/info/infoDb */ "./src/diagrams/info/infoDb.js");
15445/**
15446 * This is the api to be used when handling the integration with the web page instead of using the default integration
15447 * (mermaid.js).
15448 *
15449 * The core of this api is the **render** function that given a graph definitionas text renders the graph/diagram and
15450 * returns a svg element for the graph. It is is then up to the user of the API to make use of the svg, either insert it
15451 * somewhere in the page or something completely different.
15452 * @name mermaidAPI
15453*/
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478const themes = {};
15479
15480for (const themeName of ['default', 'forest', 'dark', 'neutral']) {
15481 themes[themeName] = __webpack_require__("./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$")(`./${themeName}/index.scss`);
15482}
15483/**
15484 * These are the default options which can be overridden with the initialization call as in the example below:
15485 * ```
15486 * mermaid.initialize({
15487 * flowchart:{
15488 * htmlLabels: false
15489 * }
15490 * });
15491 * ```
15492 * @name Configuration
15493 */
15494
15495
15496const config = {
15497 /** theme , the CSS style sheet
15498 *
15499 * **theme** - Choose one of the built-in themes: default, forest, dark or neutral. To disable any pre-defined mermaid theme, use "null".
15500 * **themeCSS** - Use your own CSS. This overrides **theme**.
15501 *```
15502 * "theme": "forest",
15503 * "themeCSS": ".node rect { fill: red; }"
15504 *```
15505 */
15506 theme: 'default',
15507 themeCSS: undefined,
15508
15509 /**
15510 * This option decides the amount of logging to be used.
15511 * * debug: 1
15512 * * info: 2
15513 * * warn: 3
15514 * * error: 4
15515 * * fatal: (**default**) 5
15516 */
15517 logLevel: 5,
15518
15519 /**
15520 * Sets the level of trust to be used on the parsed diagrams.
15521 * * **true**: (**default**) tags in text are encoded, click functionality is disabeled
15522 * * **false**: tags in text are allowed, click functionality is enabled
15523 */
15524 securityLevel: 'strict',
15525
15526 /**
15527 * This options controls whether or mermaid starts when the page loads
15528 * **Default value true**.
15529 */
15530 startOnLoad: true,
15531
15532 /**
15533 * This options controls whether or arrow markers in html code will be absolute paths or
15534 * an anchor, #. This matters if you are using base tag settings.
15535 * **Default value false**.
15536 */
15537 arrowMarkerAbsolute: false,
15538
15539 /**
15540 * The object containing configurations specific for flowcharts
15541 */
15542 flowchart: {
15543 /**
15544 * Flag for setting whether or not a html tag should be used for rendering labels
15545 * on the edges.
15546 * **Default value true**.
15547 */
15548 htmlLabels: true,
15549
15550 /**
15551 * **Default value linear**.
15552 */
15553 curve: 'linear'
15554 },
15555
15556 /**
15557 * The object containing configurations specific for sequence diagrams
15558 */
15559 sequence: {
15560 /**
15561 * margin to the right and left of the sequence diagram
15562 * **Default value 50**.
15563 */
15564 diagramMarginX: 50,
15565
15566 /**
15567 * margin to the over and under the sequence diagram.
15568 * **Default value 10**.
15569 */
15570 diagramMarginY: 10,
15571
15572 /**
15573 * Margin between actors.
15574 * **Default value 50**.
15575 */
15576 actorMargin: 50,
15577
15578 /**
15579 * Width of actor boxes
15580 * **Default value 150**.
15581 */
15582 width: 150,
15583
15584 /**
15585 * Height of actor boxes
15586 * **Default value 65**.
15587 */
15588 height: 65,
15589
15590 /**
15591 * Margin around loop boxes
15592 * **Default value 10**.
15593 */
15594 boxMargin: 10,
15595
15596 /**
15597 * margin around the text in loop/alt/opt boxes
15598 * **Default value 5**.
15599 */
15600 boxTextMargin: 5,
15601
15602 /**
15603 * margin around notes.
15604 * **Default value 10**.
15605 */
15606 noteMargin: 10,
15607
15608 /**
15609 * Space between messages.
15610 * **Default value 35**.
15611 */
15612 messageMargin: 35,
15613
15614 /**
15615 * mirror actors under diagram.
15616 * **Default value true**.
15617 */
15618 mirrorActors: true,
15619
15620 /**
15621 * Depending on css styling this might need adjustment.
15622 * Prolongs the edge of the diagram downwards.
15623 * **Default value 1**.
15624 */
15625 bottomMarginAdj: 1,
15626
15627 /**
15628 * when this flag is set the height and width is set to 100% and is then scaling with the
15629 * available space if not the absolute space required is used.
15630 * **Default value true**.
15631 */
15632 useMaxWidth: true,
15633
15634 /**
15635 * This will display arrows that start and begin at the same node as right angles, rather than a curve
15636 * **Default value false**.
15637 */
15638 rightAngles: false,
15639
15640 /**
15641 * This will show the node numbers
15642 * **Default value false**.
15643 */
15644 showSequenceNumbers: false
15645 },
15646
15647 /**
15648 * The object containing configurations specific for gantt diagrams*
15649 */
15650 gantt: {
15651 /**
15652 * Margin top for the text over the gantt diagram
15653 * **Default value 25**.
15654 */
15655 titleTopMargin: 25,
15656
15657 /**
15658 * The height of the bars in the graph
15659 * **Default value 20**.
15660 */
15661 barHeight: 20,
15662
15663 /**
15664 * The margin between the different activities in the gantt diagram.
15665 * **Default value 4**.
15666 */
15667 barGap: 4,
15668
15669 /**
15670 * Margin between title and gantt diagram and between axis and gantt diagram.
15671 * **Default value 50**.
15672 */
15673 topPadding: 50,
15674
15675 /**
15676 * The space allocated for the section name to the left of the activities.
15677 * **Default value 75**.
15678 */
15679 leftPadding: 75,
15680
15681 /**
15682 * Vertical starting position of the grid lines.
15683 * **Default value 35**.
15684 */
15685 gridLineStartPadding: 35,
15686
15687 /**
15688 * Font size ...
15689 * **Default value 11**.
15690 */
15691 fontSize: 11,
15692
15693 /**
15694 * font family ...
15695 * **Default value '"Open-Sans", "sans-serif"'**.
15696 */
15697 fontFamily: '"Open-Sans", "sans-serif"',
15698
15699 /**
15700 * The number of alternating section styles.
15701 * **Default value 4**.
15702 */
15703 numberSectionStyles: 4,
15704
15705 /**
15706 * Datetime format of the axis, this might need adjustment to match your locale and preferences
15707 * **Default value '%Y-%m-%d'**.
15708 */
15709 axisFormat: '%Y-%m-%d'
15710 },
15711 class: {},
15712 git: {}
15713};
15714Object(_logger__WEBPACK_IMPORTED_MODULE_4__["setLogLevel"])(config.logLevel);
15715Object(_config__WEBPACK_IMPORTED_MODULE_3__["setConfig"])(config);
15716
15717function parse(text) {
15718 const graphType = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].detectType(text);
15719 let parser;
15720 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Type ' + graphType);
15721
15722 switch (graphType) {
15723 case 'git':
15724 parser = _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_19___default.a;
15725 parser.parser.yy = _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_20__["default"];
15726 break;
15727
15728 case 'flowchart':
15729 parser = _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default.a;
15730 parser.parser.yy = _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"];
15731 break;
15732
15733 case 'sequence':
15734 parser = _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10___default.a;
15735 parser.parser.yy = _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_11__["default"];
15736 break;
15737
15738 case 'gantt':
15739 parser = _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13___default.a;
15740 parser.parser.yy = _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__["default"];
15741 break;
15742
15743 case 'class':
15744 parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16___default.a;
15745 parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_17__["default"];
15746 break;
15747
15748 case 'info':
15749 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('info info info');
15750 parser = _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_22___default.a;
15751 parser.parser.yy = _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_23__["default"];
15752 break;
15753 }
15754
15755 parser.parser.yy.parseError = (str, hash) => {
15756 const error = {
15757 str,
15758 hash
15759 };
15760 throw error;
15761 };
15762
15763 parser.parse(text);
15764}
15765
15766const encodeEntities = function (text) {
15767 let txt = text;
15768 txt = txt.replace(/style.*:\S*#.*;/g, function (s) {
15769 const innerTxt = s.substring(0, s.length - 1);
15770 return innerTxt;
15771 });
15772 txt = txt.replace(/classDef.*:\S*#.*;/g, function (s) {
15773 const innerTxt = s.substring(0, s.length - 1);
15774 return innerTxt;
15775 });
15776 txt = txt.replace(/#\w+;/g, function (s) {
15777 const innerTxt = s.substring(1, s.length - 1);
15778 const isInt = /^\+?\d+$/.test(innerTxt);
15779
15780 if (isInt) {
15781 return 'fl°°' + innerTxt + '¶ß';
15782 } else {
15783 return 'fl°' + innerTxt + '¶ß';
15784 }
15785 });
15786 return txt;
15787};
15788const decodeEntities = function (text) {
15789 let txt = text;
15790 txt = txt.replace(/fl°°/g, function () {
15791 return '&#';
15792 });
15793 txt = txt.replace(/fl°/g, function () {
15794 return '&';
15795 });
15796 txt = txt.replace(/¶ß/g, function () {
15797 return ';';
15798 });
15799 return txt;
15800};
15801/**
15802 * Function that renders an svg with a graph from a chart definition. Usage example below.
15803 *
15804 * ```js
15805 * mermaidAPI.initialize({
15806 * startOnLoad:true
15807 * });
15808 * $(function(){
15809 * const graphDefinition = 'graph TB\na-->b';
15810 * const cb = function(svgGraph){
15811 * console.log(svgGraph);
15812 * };
15813 * mermaidAPI.render('id1',graphDefinition,cb);
15814 * });
15815 *```
15816 * @param id the id of the element to be rendered
15817 * @param txt the graph definition
15818 * @param cb callback which is called after rendering is finished with the svg code as inparam.
15819 * @param container selector to element in which a div with the graph temporarily will be inserted. In one is
15820 * provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is
15821 * completed.
15822 */
15823
15824const render = function (id, txt, cb, container) {
15825 if (typeof container !== 'undefined') {
15826 container.innerHTML = '';
15827 d3__WEBPACK_IMPORTED_MODULE_0__["select"](container).append('div').attr('id', 'd' + id).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');
15828 } else {
15829 const element = document.querySelector('#' + 'd' + id);
15830
15831 if (element) {
15832 element.innerHTML = '';
15833 }
15834
15835 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');
15836 }
15837
15838 window.txt = txt;
15839 txt = encodeEntities(txt);
15840 const element = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node();
15841 const graphType = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].detectType(txt); // insert inline style into svg
15842
15843 const svg = element.firstChild;
15844 const firstChild = svg.firstChild; // pre-defined theme
15845
15846 let style = themes[config.theme];
15847
15848 if (style === undefined) {
15849 style = '';
15850 } // user provided theme CSS
15851
15852
15853 if (config.themeCSS !== undefined) {
15854 style += `\n${config.themeCSS}`;
15855 } // classDef
15856
15857
15858 if (graphType === 'flowchart') {
15859 const classes = _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].getClasses(txt);
15860
15861 for (const className in classes) {
15862 style += `\n.${className} > * { ${classes[className].styles.join(' !important; ')} !important; }`;
15863 }
15864 }
15865
15866 const style1 = document.createElement('style');
15867 style1.innerHTML = scope_css__WEBPACK_IMPORTED_MODULE_1___default()(style, `#${id}`);
15868 svg.insertBefore(style1, firstChild);
15869 const style2 = document.createElement('style');
15870 const cs = window.getComputedStyle(svg);
15871 style2.innerHTML = `#${id} {
15872 color: ${cs.color};
15873 font: ${cs.font};
15874 }`;
15875 svg.insertBefore(style2, firstChild);
15876
15877 switch (graphType) {
15878 case 'git':
15879 config.flowchart.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
15880 _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_18__["default"].setConf(config.git);
15881 _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_18__["default"].draw(txt, id, false);
15882 break;
15883
15884 case 'flowchart':
15885 config.flowchart.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
15886 _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].setConf(config.flowchart);
15887 _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].draw(txt, id, false);
15888 break;
15889
15890 case 'sequence':
15891 config.sequence.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
15892
15893 if (config.sequenceDiagram) {
15894 // backwards compatibility
15895 _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(Object.assign(config.sequence, config.sequenceDiagram));
15896 console.error('`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.');
15897 } else {
15898 _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(config.sequence);
15899 }
15900
15901 _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].draw(txt, id);
15902 break;
15903
15904 case 'gantt':
15905 config.gantt.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
15906 _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__["default"].setConf(config.gantt);
15907 _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__["default"].draw(txt, id);
15908 break;
15909
15910 case 'class':
15911 config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
15912 _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__["default"].setConf(config.class);
15913 _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__["default"].draw(txt, id);
15914 break;
15915
15916 case 'info':
15917 config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
15918 _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_21__["default"].setConf(config.class);
15919 _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_21__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
15920 break;
15921 }
15922
15923 d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`).selectAll('foreignobject > *').attr('xmlns', 'http://www.w3.org/1999/xhtml');
15924 let url = '';
15925
15926 if (config.arrowMarkerAbsolute) {
15927 url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
15928 url = url.replace(/\(/g, '\\(');
15929 url = url.replace(/\)/g, '\\)');
15930 } // Fix for when the base tag is used
15931
15932
15933 let svgCode = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node().innerHTML.replace(/url\(#arrowhead/g, 'url(' + url + '#arrowhead', 'g');
15934 svgCode = decodeEntities(svgCode);
15935
15936 if (typeof cb !== 'undefined') {
15937 cb(svgCode, _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"].bindFunctions);
15938 cb(svgCode, _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__["default"].bindFunctions);
15939 } else {
15940 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].warn('CB = undefined!');
15941 }
15942
15943 const node = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node();
15944
15945 if (node !== null && typeof node.remove === 'function') {
15946 d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node().remove();
15947 }
15948
15949 return svgCode;
15950};
15951
15952const setConf = function (cnf) {
15953 // Top level initially mermaid, gflow, sequenceDiagram and gantt
15954 const lvl1Keys = Object.keys(cnf);
15955
15956 for (let i = 0; i < lvl1Keys.length; i++) {
15957 if (typeof cnf[lvl1Keys[i]] === 'object' && cnf[lvl1Keys[i]] != null) {
15958 const lvl2Keys = Object.keys(cnf[lvl1Keys[i]]);
15959
15960 for (let j = 0; j < lvl2Keys.length; j++) {
15961 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Setting conf ', lvl1Keys[i], '-', lvl2Keys[j]);
15962
15963 if (typeof config[lvl1Keys[i]] === 'undefined') {
15964 config[lvl1Keys[i]] = {};
15965 }
15966
15967 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Setting config: ' + lvl1Keys[i] + ' ' + lvl2Keys[j] + ' to ' + cnf[lvl1Keys[i]][lvl2Keys[j]]);
15968 config[lvl1Keys[i]][lvl2Keys[j]] = cnf[lvl1Keys[i]][lvl2Keys[j]];
15969 }
15970 } else {
15971 config[lvl1Keys[i]] = cnf[lvl1Keys[i]];
15972 }
15973 }
15974};
15975
15976function initialize(options) {
15977 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Initializing mermaidAPI ', _package_json__WEBPACK_IMPORTED_MODULE_2__.version); // Update default config with options supplied at initialization
15978
15979 if (typeof options === 'object') {
15980 setConf(options);
15981 }
15982
15983 Object(_config__WEBPACK_IMPORTED_MODULE_3__["setConfig"])(config);
15984 Object(_logger__WEBPACK_IMPORTED_MODULE_4__["setLogLevel"])(config.logLevel);
15985} // function getConfig () {
15986// console.warn('get config')
15987// return config
15988// }
15989
15990
15991const mermaidAPI = {
15992 render,
15993 parse,
15994 initialize,
15995 getConfig: _config__WEBPACK_IMPORTED_MODULE_3__["getConfig"]
15996};
15997/* harmony default export */ __webpack_exports__["default"] = (mermaidAPI);
15998
15999/***/ }),
16000
16001/***/ "./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$":
16002/*!***********************************************!*\
16003 !*** ./src/themes sync ^\.\/.*\/index\.scss$ ***!
16004 \***********************************************/
16005/*! no static exports found */
16006/***/ (function(module, exports, __webpack_require__) {
16007
16008var map = {
16009 "./dark/index.scss": "./src/themes/dark/index.scss",
16010 "./default/index.scss": "./src/themes/default/index.scss",
16011 "./forest/index.scss": "./src/themes/forest/index.scss",
16012 "./neutral/index.scss": "./src/themes/neutral/index.scss"
16013};
16014
16015
16016function webpackContext(req) {
16017 var id = webpackContextResolve(req);
16018 return __webpack_require__(id);
16019}
16020function webpackContextResolve(req) {
16021 var id = map[req];
16022 if(!(id + 1)) { // check for number or string
16023 var e = new Error("Cannot find module '" + req + "'");
16024 e.code = 'MODULE_NOT_FOUND';
16025 throw e;
16026 }
16027 return id;
16028}
16029webpackContext.keys = function webpackContextKeys() {
16030 return Object.keys(map);
16031};
16032webpackContext.resolve = webpackContextResolve;
16033module.exports = webpackContext;
16034webpackContext.id = "./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$";
16035
16036/***/ }),
16037
16038/***/ "./src/themes/dark/index.scss":
16039/*!************************************!*\
16040 !*** ./src/themes/dark/index.scss ***!
16041 \************************************/
16042/*! no static exports found */
16043/***/ (function(module, exports, __webpack_require__) {
16044
16045// css-to-string-loader: transforms styles from css-loader to a string output
16046
16047// Get the styles
16048var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/dark/index.scss");
16049
16050if (typeof styles === 'string') {
16051 // Return an existing string
16052 module.exports = styles;
16053} else {
16054 // Call the custom toString method from css-loader module
16055 module.exports = styles.toString();
16056}
16057
16058/***/ }),
16059
16060/***/ "./src/themes/default/index.scss":
16061/*!***************************************!*\
16062 !*** ./src/themes/default/index.scss ***!
16063 \***************************************/
16064/*! no static exports found */
16065/***/ (function(module, exports, __webpack_require__) {
16066
16067// css-to-string-loader: transforms styles from css-loader to a string output
16068
16069// Get the styles
16070var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/default/index.scss");
16071
16072if (typeof styles === 'string') {
16073 // Return an existing string
16074 module.exports = styles;
16075} else {
16076 // Call the custom toString method from css-loader module
16077 module.exports = styles.toString();
16078}
16079
16080/***/ }),
16081
16082/***/ "./src/themes/forest/index.scss":
16083/*!**************************************!*\
16084 !*** ./src/themes/forest/index.scss ***!
16085 \**************************************/
16086/*! no static exports found */
16087/***/ (function(module, exports, __webpack_require__) {
16088
16089// css-to-string-loader: transforms styles from css-loader to a string output
16090
16091// Get the styles
16092var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/forest/index.scss");
16093
16094if (typeof styles === 'string') {
16095 // Return an existing string
16096 module.exports = styles;
16097} else {
16098 // Call the custom toString method from css-loader module
16099 module.exports = styles.toString();
16100}
16101
16102/***/ }),
16103
16104/***/ "./src/themes/neutral/index.scss":
16105/*!***************************************!*\
16106 !*** ./src/themes/neutral/index.scss ***!
16107 \***************************************/
16108/*! no static exports found */
16109/***/ (function(module, exports, __webpack_require__) {
16110
16111// css-to-string-loader: transforms styles from css-loader to a string output
16112
16113// Get the styles
16114var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/neutral/index.scss");
16115
16116if (typeof styles === 'string') {
16117 // Return an existing string
16118 module.exports = styles;
16119} else {
16120 // Call the custom toString method from css-loader module
16121 module.exports = styles.toString();
16122}
16123
16124/***/ }),
16125
16126/***/ "./src/utils.js":
16127/*!**********************!*\
16128 !*** ./src/utils.js ***!
16129 \**********************/
16130/*! exports provided: detectType, isSubstringInArray, interpolateToCurve, default */
16131/***/ (function(module, __webpack_exports__, __webpack_require__) {
16132
16133"use strict";
16134__webpack_require__.r(__webpack_exports__);
16135/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectType", function() { return detectType; });
16136/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSubstringInArray", function() { return isSubstringInArray; });
16137/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateToCurve", function() { return interpolateToCurve; });
16138/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
16139/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
16140/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ "./src/logger.js");
16141
16142
16143/**
16144 * @function detectType
16145 * Detects the type of the graph text.
16146 * ```mermaid
16147 * graph LR
16148 * a-->b
16149 * b-->c
16150 * c-->d
16151 * d-->e
16152 * e-->f
16153 * f-->g
16154 * g-->h
16155 * ```
16156 *
16157 * @param {string} text The text defining the graph
16158 * @returns {string} A graph definition key
16159 */
16160
16161const detectType = function (text) {
16162 text = text.replace(/^\s*%%.*\n/g, '\n');
16163 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Detecting diagram type based on the text ' + text);
16164
16165 if (text.match(/^\s*sequenceDiagram/)) {
16166 return 'sequence';
16167 }
16168
16169 if (text.match(/^\s*gantt/)) {
16170 return 'gantt';
16171 }
16172
16173 if (text.match(/^\s*classDiagram/)) {
16174 return 'class';
16175 }
16176
16177 if (text.match(/^\s*gitGraph/)) {
16178 return 'git';
16179 }
16180
16181 if (text.match(/^\s*info/)) {
16182 return 'info';
16183 }
16184
16185 return 'flowchart';
16186};
16187/**
16188 * @function isSubstringInArray
16189 * Detects whether a substring in present in a given array
16190 * @param {string} str The substring to detect
16191 * @param {array} arr The array to search
16192 * @returns {number} the array index containing the substring or -1 if not present
16193 **/
16194
16195const isSubstringInArray = function (str, arr) {
16196 for (let i = 0; i < arr.length; i++) {
16197 if (arr[i].match(str)) return i;
16198 }
16199
16200 return -1;
16201};
16202const interpolateToCurve = (interpolate, defaultCurve) => {
16203 if (!interpolate) {
16204 return defaultCurve;
16205 }
16206
16207 const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`;
16208 return d3__WEBPACK_IMPORTED_MODULE_0__[curveName] || defaultCurve;
16209};
16210/* harmony default export */ __webpack_exports__["default"] = ({
16211 detectType,
16212 isSubstringInArray,
16213 interpolateToCurve
16214});
16215
16216/***/ }),
16217
16218/***/ "@braintree/sanitize-url":
16219/*!******************************************!*\
16220 !*** external "@braintree/sanitize-url" ***!
16221 \******************************************/
16222/*! no static exports found */
16223/***/ (function(module, exports) {
16224
16225module.exports = require("@braintree/sanitize-url");
16226
16227/***/ }),
16228
16229/***/ "d3":
16230/*!*********************!*\
16231 !*** external "d3" ***!
16232 \*********************/
16233/*! no static exports found */
16234/***/ (function(module, exports) {
16235
16236module.exports = require("d3");
16237
16238/***/ }),
16239
16240/***/ "dagre-d3-renderer":
16241/*!************************************!*\
16242 !*** external "dagre-d3-renderer" ***!
16243 \************************************/
16244/*! no static exports found */
16245/***/ (function(module, exports) {
16246
16247module.exports = require("dagre-d3-renderer");
16248
16249/***/ }),
16250
16251/***/ "dagre-d3-renderer/lib/label/add-html-label.js":
16252/*!****************************************************************!*\
16253 !*** external "dagre-d3-renderer/lib/label/add-html-label.js" ***!
16254 \****************************************************************/
16255/*! no static exports found */
16256/***/ (function(module, exports) {
16257
16258module.exports = require("dagre-d3-renderer/lib/label/add-html-label.js");
16259
16260/***/ }),
16261
16262/***/ "dagre-layout":
16263/*!*******************************!*\
16264 !*** external "dagre-layout" ***!
16265 \*******************************/
16266/*! no static exports found */
16267/***/ (function(module, exports) {
16268
16269module.exports = require("dagre-layout");
16270
16271/***/ }),
16272
16273/***/ "graphlibrary":
16274/*!*******************************!*\
16275 !*** external "graphlibrary" ***!
16276 \*******************************/
16277/*! no static exports found */
16278/***/ (function(module, exports) {
16279
16280module.exports = require("graphlibrary");
16281
16282/***/ }),
16283
16284/***/ "he":
16285/*!*********************!*\
16286 !*** external "he" ***!
16287 \*********************/
16288/*! no static exports found */
16289/***/ (function(module, exports) {
16290
16291module.exports = require("he");
16292
16293/***/ }),
16294
16295/***/ "lodash":
16296/*!*************************!*\
16297 !*** external "lodash" ***!
16298 \*************************/
16299/*! no static exports found */
16300/***/ (function(module, exports) {
16301
16302module.exports = require("lodash");
16303
16304/***/ }),
16305
16306/***/ "moment-mini":
16307/*!******************************!*\
16308 !*** external "moment-mini" ***!
16309 \******************************/
16310/*! no static exports found */
16311/***/ (function(module, exports) {
16312
16313module.exports = require("moment-mini");
16314
16315/***/ }),
16316
16317/***/ "scope-css":
16318/*!****************************!*\
16319 !*** external "scope-css" ***!
16320 \****************************/
16321/*! no static exports found */
16322/***/ (function(module, exports) {
16323
16324module.exports = require("scope-css");
16325
16326/***/ })
16327
16328/******/ })["default"];
16329});
16330//# sourceMappingURL=mermaid.core.js.map
\No newline at end of file