@readme/markdown 7.7.0 → 7.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/CodeTabs/index.tsx +13 -13
- package/dist/486.node.js +31818 -0
- package/dist/lib/ast-processor.d.ts +1 -1
- package/dist/main.js +558 -32548
- package/dist/main.node.js +554 -32336
- package/dist/processor/transform/index.d.ts +2 -1
- package/dist/processor/transform/mermaid.d.ts +3 -0
- package/package.json +5 -2
- package/dist/10.js +0 -22718
- package/dist/11.js +0 -1440
- package/dist/120.js +0 -19
- package/dist/134.js +0 -19
- package/dist/150.js +0 -1888
- package/dist/17.js +0 -1373
- package/dist/246.js +0 -1929
- package/dist/351.js +0 -2400
- package/dist/366.js +0 -1181
- package/dist/403.js +0 -2192
- package/dist/429.js +0 -11130
- package/dist/485.js +0 -514
- package/dist/488.js +0 -55
- package/dist/489.js +0 -18472
- package/dist/510.js +0 -246
- package/dist/52.js +0 -808
- package/dist/551.js +0 -2722
- package/dist/617.js +0 -19
- package/dist/687.js +0 -3671
- package/dist/745.js +0 -7504
- package/dist/775.js +0 -1900
- package/dist/786.js +0 -31378
- package/dist/788.js +0 -1021
- package/dist/81.js +0 -382
- package/dist/849.js +0 -2586
- package/dist/863.js +0 -19
- package/dist/867.js +0 -1414
- package/dist/871.js +0 -1533
- package/dist/881.js +0 -1276
- package/dist/885.js +0 -48
- package/dist/896.js +0 -1613
- package/dist/906.js +0 -1815
- package/dist/91.js +0 -19
- package/dist/940.js +0 -3359
- package/dist/952.js +0 -243
- package/dist/995.js +0 -5734
package/dist/17.js
DELETED
|
@@ -1,1373 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
(self["webpackChunk_readme_markdown"] = self["webpackChunk_readme_markdown"] || []).push([[17],{
|
|
3
|
-
|
|
4
|
-
/***/ 242:
|
|
5
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6
|
-
|
|
7
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8
|
-
/* harmony export */ CP: () => (/* binding */ drawEmbeddedImage),
|
|
9
|
-
/* harmony export */ HT: () => (/* binding */ getTextObj),
|
|
10
|
-
/* harmony export */ PB: () => (/* binding */ getNoteRect),
|
|
11
|
-
/* harmony export */ aC: () => (/* binding */ drawImage),
|
|
12
|
-
/* harmony export */ lC: () => (/* binding */ drawBackgroundRect),
|
|
13
|
-
/* harmony export */ m: () => (/* binding */ drawText),
|
|
14
|
-
/* harmony export */ tk: () => (/* binding */ drawRect)
|
|
15
|
-
/* harmony export */ });
|
|
16
|
-
/* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6322);
|
|
17
|
-
/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6750);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// src/diagrams/common/svgDrawCommon.ts
|
|
21
|
-
|
|
22
|
-
var drawRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, rectData) => {
|
|
23
|
-
const rectElement = element.append("rect");
|
|
24
|
-
rectElement.attr("x", rectData.x);
|
|
25
|
-
rectElement.attr("y", rectData.y);
|
|
26
|
-
rectElement.attr("fill", rectData.fill);
|
|
27
|
-
rectElement.attr("stroke", rectData.stroke);
|
|
28
|
-
rectElement.attr("width", rectData.width);
|
|
29
|
-
rectElement.attr("height", rectData.height);
|
|
30
|
-
if (rectData.name) {
|
|
31
|
-
rectElement.attr("name", rectData.name);
|
|
32
|
-
}
|
|
33
|
-
if (rectData.rx) {
|
|
34
|
-
rectElement.attr("rx", rectData.rx);
|
|
35
|
-
}
|
|
36
|
-
if (rectData.ry) {
|
|
37
|
-
rectElement.attr("ry", rectData.ry);
|
|
38
|
-
}
|
|
39
|
-
if (rectData.attrs !== void 0) {
|
|
40
|
-
for (const attrKey in rectData.attrs) {
|
|
41
|
-
rectElement.attr(attrKey, rectData.attrs[attrKey]);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (rectData.class) {
|
|
45
|
-
rectElement.attr("class", rectData.class);
|
|
46
|
-
}
|
|
47
|
-
return rectElement;
|
|
48
|
-
}, "drawRect");
|
|
49
|
-
var drawBackgroundRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, bounds) => {
|
|
50
|
-
const rectData = {
|
|
51
|
-
x: bounds.startx,
|
|
52
|
-
y: bounds.starty,
|
|
53
|
-
width: bounds.stopx - bounds.startx,
|
|
54
|
-
height: bounds.stopy - bounds.starty,
|
|
55
|
-
fill: bounds.fill,
|
|
56
|
-
stroke: bounds.stroke,
|
|
57
|
-
class: "rect"
|
|
58
|
-
};
|
|
59
|
-
const rectElement = drawRect(element, rectData);
|
|
60
|
-
rectElement.lower();
|
|
61
|
-
}, "drawBackgroundRect");
|
|
62
|
-
var drawText = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, textData) => {
|
|
63
|
-
const nText = textData.text.replace(_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .lineBreakRegex */ .H1, " ");
|
|
64
|
-
const textElem = element.append("text");
|
|
65
|
-
textElem.attr("x", textData.x);
|
|
66
|
-
textElem.attr("y", textData.y);
|
|
67
|
-
textElem.attr("class", "legend");
|
|
68
|
-
textElem.style("text-anchor", textData.anchor);
|
|
69
|
-
if (textData.class) {
|
|
70
|
-
textElem.attr("class", textData.class);
|
|
71
|
-
}
|
|
72
|
-
const tspan = textElem.append("tspan");
|
|
73
|
-
tspan.attr("x", textData.x + textData.textMargin * 2);
|
|
74
|
-
tspan.text(nText);
|
|
75
|
-
return textElem;
|
|
76
|
-
}, "drawText");
|
|
77
|
-
var drawImage = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((elem, x, y, link) => {
|
|
78
|
-
const imageElement = elem.append("image");
|
|
79
|
-
imageElement.attr("x", x);
|
|
80
|
-
imageElement.attr("y", y);
|
|
81
|
-
const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .J)(link);
|
|
82
|
-
imageElement.attr("xlink:href", sanitizedLink);
|
|
83
|
-
}, "drawImage");
|
|
84
|
-
var drawEmbeddedImage = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, x, y, link) => {
|
|
85
|
-
const imageElement = element.append("use");
|
|
86
|
-
imageElement.attr("x", x);
|
|
87
|
-
imageElement.attr("y", y);
|
|
88
|
-
const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .J)(link);
|
|
89
|
-
imageElement.attr("xlink:href", `#${sanitizedLink}`);
|
|
90
|
-
}, "drawEmbeddedImage");
|
|
91
|
-
var getNoteRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(() => {
|
|
92
|
-
const noteRectData = {
|
|
93
|
-
x: 0,
|
|
94
|
-
y: 0,
|
|
95
|
-
width: 100,
|
|
96
|
-
height: 100,
|
|
97
|
-
fill: "#EDF2AE",
|
|
98
|
-
stroke: "#666",
|
|
99
|
-
anchor: "start",
|
|
100
|
-
rx: 0,
|
|
101
|
-
ry: 0
|
|
102
|
-
};
|
|
103
|
-
return noteRectData;
|
|
104
|
-
}, "getNoteRect");
|
|
105
|
-
var getTextObj = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(() => {
|
|
106
|
-
const testObject = {
|
|
107
|
-
x: 0,
|
|
108
|
-
y: 0,
|
|
109
|
-
width: 100,
|
|
110
|
-
height: 100,
|
|
111
|
-
"text-anchor": "start",
|
|
112
|
-
style: "#666",
|
|
113
|
-
textMargin: 0,
|
|
114
|
-
rx: 0,
|
|
115
|
-
ry: 0,
|
|
116
|
-
tspan: true
|
|
117
|
-
};
|
|
118
|
-
return testObject;
|
|
119
|
-
}, "getTextObj");
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
/***/ }),
|
|
125
|
-
|
|
126
|
-
/***/ 2017:
|
|
127
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
128
|
-
|
|
129
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
130
|
-
/* harmony export */ diagram: () => (/* binding */ diagram)
|
|
131
|
-
/* harmony export */ });
|
|
132
|
-
/* harmony import */ var _chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(242);
|
|
133
|
-
/* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6322);
|
|
134
|
-
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8066);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
// src/diagrams/user-journey/parser/journey.jison
|
|
139
|
-
var parser = function() {
|
|
140
|
-
var o = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(k, v, o2, l) {
|
|
141
|
-
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
|
|
142
|
-
return o2;
|
|
143
|
-
}, "o"), $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 18], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 14];
|
|
144
|
-
var parser2 = {
|
|
145
|
-
trace: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function trace() {
|
|
146
|
-
}, "trace"),
|
|
147
|
-
yy: {},
|
|
148
|
-
symbols_: { "error": 2, "start": 3, "journey": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "taskName": 18, "taskData": 19, "$accept": 0, "$end": 1 },
|
|
149
|
-
terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" },
|
|
150
|
-
productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]],
|
|
151
|
-
performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
|
152
|
-
var $0 = $$.length - 1;
|
|
153
|
-
switch (yystate) {
|
|
154
|
-
case 1:
|
|
155
|
-
return $$[$0 - 1];
|
|
156
|
-
break;
|
|
157
|
-
case 2:
|
|
158
|
-
this.$ = [];
|
|
159
|
-
break;
|
|
160
|
-
case 3:
|
|
161
|
-
$$[$0 - 1].push($$[$0]);
|
|
162
|
-
this.$ = $$[$0 - 1];
|
|
163
|
-
break;
|
|
164
|
-
case 4:
|
|
165
|
-
case 5:
|
|
166
|
-
this.$ = $$[$0];
|
|
167
|
-
break;
|
|
168
|
-
case 6:
|
|
169
|
-
case 7:
|
|
170
|
-
this.$ = [];
|
|
171
|
-
break;
|
|
172
|
-
case 8:
|
|
173
|
-
yy.setDiagramTitle($$[$0].substr(6));
|
|
174
|
-
this.$ = $$[$0].substr(6);
|
|
175
|
-
break;
|
|
176
|
-
case 9:
|
|
177
|
-
this.$ = $$[$0].trim();
|
|
178
|
-
yy.setAccTitle(this.$);
|
|
179
|
-
break;
|
|
180
|
-
case 10:
|
|
181
|
-
case 11:
|
|
182
|
-
this.$ = $$[$0].trim();
|
|
183
|
-
yy.setAccDescription(this.$);
|
|
184
|
-
break;
|
|
185
|
-
case 12:
|
|
186
|
-
yy.addSection($$[$0].substr(8));
|
|
187
|
-
this.$ = $$[$0].substr(8);
|
|
188
|
-
break;
|
|
189
|
-
case 13:
|
|
190
|
-
yy.addTask($$[$0 - 1], $$[$0]);
|
|
191
|
-
this.$ = "task";
|
|
192
|
-
break;
|
|
193
|
-
}
|
|
194
|
-
}, "anonymous"),
|
|
195
|
-
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 15, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, o($V0, [2, 11]), o($V0, [2, 12]), { 19: [1, 18] }, o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 13])],
|
|
196
|
-
defaultActions: {},
|
|
197
|
-
parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function parseError(str, hash) {
|
|
198
|
-
if (hash.recoverable) {
|
|
199
|
-
this.trace(str);
|
|
200
|
-
} else {
|
|
201
|
-
var error = new Error(str);
|
|
202
|
-
error.hash = hash;
|
|
203
|
-
throw error;
|
|
204
|
-
}
|
|
205
|
-
}, "parseError"),
|
|
206
|
-
parse: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function parse(input) {
|
|
207
|
-
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
|
208
|
-
var args = lstack.slice.call(arguments, 1);
|
|
209
|
-
var lexer2 = Object.create(this.lexer);
|
|
210
|
-
var sharedState = { yy: {} };
|
|
211
|
-
for (var k in this.yy) {
|
|
212
|
-
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
|
213
|
-
sharedState.yy[k] = this.yy[k];
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
lexer2.setInput(input, sharedState.yy);
|
|
217
|
-
sharedState.yy.lexer = lexer2;
|
|
218
|
-
sharedState.yy.parser = this;
|
|
219
|
-
if (typeof lexer2.yylloc == "undefined") {
|
|
220
|
-
lexer2.yylloc = {};
|
|
221
|
-
}
|
|
222
|
-
var yyloc = lexer2.yylloc;
|
|
223
|
-
lstack.push(yyloc);
|
|
224
|
-
var ranges = lexer2.options && lexer2.options.ranges;
|
|
225
|
-
if (typeof sharedState.yy.parseError === "function") {
|
|
226
|
-
this.parseError = sharedState.yy.parseError;
|
|
227
|
-
} else {
|
|
228
|
-
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
229
|
-
}
|
|
230
|
-
function popStack(n) {
|
|
231
|
-
stack.length = stack.length - 2 * n;
|
|
232
|
-
vstack.length = vstack.length - n;
|
|
233
|
-
lstack.length = lstack.length - n;
|
|
234
|
-
}
|
|
235
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(popStack, "popStack");
|
|
236
|
-
function lex() {
|
|
237
|
-
var token;
|
|
238
|
-
token = tstack.pop() || lexer2.lex() || EOF;
|
|
239
|
-
if (typeof token !== "number") {
|
|
240
|
-
if (token instanceof Array) {
|
|
241
|
-
tstack = token;
|
|
242
|
-
token = tstack.pop();
|
|
243
|
-
}
|
|
244
|
-
token = self.symbols_[token] || token;
|
|
245
|
-
}
|
|
246
|
-
return token;
|
|
247
|
-
}
|
|
248
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(lex, "lex");
|
|
249
|
-
var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
|
250
|
-
while (true) {
|
|
251
|
-
state = stack[stack.length - 1];
|
|
252
|
-
if (this.defaultActions[state]) {
|
|
253
|
-
action = this.defaultActions[state];
|
|
254
|
-
} else {
|
|
255
|
-
if (symbol === null || typeof symbol == "undefined") {
|
|
256
|
-
symbol = lex();
|
|
257
|
-
}
|
|
258
|
-
action = table[state] && table[state][symbol];
|
|
259
|
-
}
|
|
260
|
-
if (typeof action === "undefined" || !action.length || !action[0]) {
|
|
261
|
-
var errStr = "";
|
|
262
|
-
expected = [];
|
|
263
|
-
for (p in table[state]) {
|
|
264
|
-
if (this.terminals_[p] && p > TERROR) {
|
|
265
|
-
expected.push("'" + this.terminals_[p] + "'");
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
if (lexer2.showPosition) {
|
|
269
|
-
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
|
270
|
-
} else {
|
|
271
|
-
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
|
272
|
-
}
|
|
273
|
-
this.parseError(errStr, {
|
|
274
|
-
text: lexer2.match,
|
|
275
|
-
token: this.terminals_[symbol] || symbol,
|
|
276
|
-
line: lexer2.yylineno,
|
|
277
|
-
loc: yyloc,
|
|
278
|
-
expected
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
if (action[0] instanceof Array && action.length > 1) {
|
|
282
|
-
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
|
283
|
-
}
|
|
284
|
-
switch (action[0]) {
|
|
285
|
-
case 1:
|
|
286
|
-
stack.push(symbol);
|
|
287
|
-
vstack.push(lexer2.yytext);
|
|
288
|
-
lstack.push(lexer2.yylloc);
|
|
289
|
-
stack.push(action[1]);
|
|
290
|
-
symbol = null;
|
|
291
|
-
if (!preErrorSymbol) {
|
|
292
|
-
yyleng = lexer2.yyleng;
|
|
293
|
-
yytext = lexer2.yytext;
|
|
294
|
-
yylineno = lexer2.yylineno;
|
|
295
|
-
yyloc = lexer2.yylloc;
|
|
296
|
-
if (recovering > 0) {
|
|
297
|
-
recovering--;
|
|
298
|
-
}
|
|
299
|
-
} else {
|
|
300
|
-
symbol = preErrorSymbol;
|
|
301
|
-
preErrorSymbol = null;
|
|
302
|
-
}
|
|
303
|
-
break;
|
|
304
|
-
case 2:
|
|
305
|
-
len = this.productions_[action[1]][1];
|
|
306
|
-
yyval.$ = vstack[vstack.length - len];
|
|
307
|
-
yyval._$ = {
|
|
308
|
-
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
309
|
-
last_line: lstack[lstack.length - 1].last_line,
|
|
310
|
-
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
311
|
-
last_column: lstack[lstack.length - 1].last_column
|
|
312
|
-
};
|
|
313
|
-
if (ranges) {
|
|
314
|
-
yyval._$.range = [
|
|
315
|
-
lstack[lstack.length - (len || 1)].range[0],
|
|
316
|
-
lstack[lstack.length - 1].range[1]
|
|
317
|
-
];
|
|
318
|
-
}
|
|
319
|
-
r = this.performAction.apply(yyval, [
|
|
320
|
-
yytext,
|
|
321
|
-
yyleng,
|
|
322
|
-
yylineno,
|
|
323
|
-
sharedState.yy,
|
|
324
|
-
action[1],
|
|
325
|
-
vstack,
|
|
326
|
-
lstack
|
|
327
|
-
].concat(args));
|
|
328
|
-
if (typeof r !== "undefined") {
|
|
329
|
-
return r;
|
|
330
|
-
}
|
|
331
|
-
if (len) {
|
|
332
|
-
stack = stack.slice(0, -1 * len * 2);
|
|
333
|
-
vstack = vstack.slice(0, -1 * len);
|
|
334
|
-
lstack = lstack.slice(0, -1 * len);
|
|
335
|
-
}
|
|
336
|
-
stack.push(this.productions_[action[1]][0]);
|
|
337
|
-
vstack.push(yyval.$);
|
|
338
|
-
lstack.push(yyval._$);
|
|
339
|
-
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
340
|
-
stack.push(newState);
|
|
341
|
-
break;
|
|
342
|
-
case 3:
|
|
343
|
-
return true;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
return true;
|
|
347
|
-
}, "parse")
|
|
348
|
-
};
|
|
349
|
-
var lexer = /* @__PURE__ */ function() {
|
|
350
|
-
var lexer2 = {
|
|
351
|
-
EOF: 1,
|
|
352
|
-
parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function parseError(str, hash) {
|
|
353
|
-
if (this.yy.parser) {
|
|
354
|
-
this.yy.parser.parseError(str, hash);
|
|
355
|
-
} else {
|
|
356
|
-
throw new Error(str);
|
|
357
|
-
}
|
|
358
|
-
}, "parseError"),
|
|
359
|
-
// resets the lexer, sets new input
|
|
360
|
-
setInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(input, yy) {
|
|
361
|
-
this.yy = yy || this.yy || {};
|
|
362
|
-
this._input = input;
|
|
363
|
-
this._more = this._backtrack = this.done = false;
|
|
364
|
-
this.yylineno = this.yyleng = 0;
|
|
365
|
-
this.yytext = this.matched = this.match = "";
|
|
366
|
-
this.conditionStack = ["INITIAL"];
|
|
367
|
-
this.yylloc = {
|
|
368
|
-
first_line: 1,
|
|
369
|
-
first_column: 0,
|
|
370
|
-
last_line: 1,
|
|
371
|
-
last_column: 0
|
|
372
|
-
};
|
|
373
|
-
if (this.options.ranges) {
|
|
374
|
-
this.yylloc.range = [0, 0];
|
|
375
|
-
}
|
|
376
|
-
this.offset = 0;
|
|
377
|
-
return this;
|
|
378
|
-
}, "setInput"),
|
|
379
|
-
// consumes and returns one char from the input
|
|
380
|
-
input: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
381
|
-
var ch = this._input[0];
|
|
382
|
-
this.yytext += ch;
|
|
383
|
-
this.yyleng++;
|
|
384
|
-
this.offset++;
|
|
385
|
-
this.match += ch;
|
|
386
|
-
this.matched += ch;
|
|
387
|
-
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
|
388
|
-
if (lines) {
|
|
389
|
-
this.yylineno++;
|
|
390
|
-
this.yylloc.last_line++;
|
|
391
|
-
} else {
|
|
392
|
-
this.yylloc.last_column++;
|
|
393
|
-
}
|
|
394
|
-
if (this.options.ranges) {
|
|
395
|
-
this.yylloc.range[1]++;
|
|
396
|
-
}
|
|
397
|
-
this._input = this._input.slice(1);
|
|
398
|
-
return ch;
|
|
399
|
-
}, "input"),
|
|
400
|
-
// unshifts one char (or a string) into the input
|
|
401
|
-
unput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(ch) {
|
|
402
|
-
var len = ch.length;
|
|
403
|
-
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
404
|
-
this._input = ch + this._input;
|
|
405
|
-
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
406
|
-
this.offset -= len;
|
|
407
|
-
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
408
|
-
this.match = this.match.substr(0, this.match.length - 1);
|
|
409
|
-
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
410
|
-
if (lines.length - 1) {
|
|
411
|
-
this.yylineno -= lines.length - 1;
|
|
412
|
-
}
|
|
413
|
-
var r = this.yylloc.range;
|
|
414
|
-
this.yylloc = {
|
|
415
|
-
first_line: this.yylloc.first_line,
|
|
416
|
-
last_line: this.yylineno + 1,
|
|
417
|
-
first_column: this.yylloc.first_column,
|
|
418
|
-
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
|
|
419
|
-
};
|
|
420
|
-
if (this.options.ranges) {
|
|
421
|
-
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
422
|
-
}
|
|
423
|
-
this.yyleng = this.yytext.length;
|
|
424
|
-
return this;
|
|
425
|
-
}, "unput"),
|
|
426
|
-
// When called from action, caches matched text and appends it on next action
|
|
427
|
-
more: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
428
|
-
this._more = true;
|
|
429
|
-
return this;
|
|
430
|
-
}, "more"),
|
|
431
|
-
// 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.
|
|
432
|
-
reject: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
433
|
-
if (this.options.backtrack_lexer) {
|
|
434
|
-
this._backtrack = true;
|
|
435
|
-
} else {
|
|
436
|
-
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(), {
|
|
437
|
-
text: "",
|
|
438
|
-
token: null,
|
|
439
|
-
line: this.yylineno
|
|
440
|
-
});
|
|
441
|
-
}
|
|
442
|
-
return this;
|
|
443
|
-
}, "reject"),
|
|
444
|
-
// retain first n characters of the match
|
|
445
|
-
less: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(n) {
|
|
446
|
-
this.unput(this.match.slice(n));
|
|
447
|
-
}, "less"),
|
|
448
|
-
// displays already matched input, i.e. for error messages
|
|
449
|
-
pastInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
450
|
-
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
451
|
-
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
|
452
|
-
}, "pastInput"),
|
|
453
|
-
// displays upcoming input, i.e. for error messages
|
|
454
|
-
upcomingInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
455
|
-
var next = this.match;
|
|
456
|
-
if (next.length < 20) {
|
|
457
|
-
next += this._input.substr(0, 20 - next.length);
|
|
458
|
-
}
|
|
459
|
-
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
460
|
-
}, "upcomingInput"),
|
|
461
|
-
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
462
|
-
showPosition: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
463
|
-
var pre = this.pastInput();
|
|
464
|
-
var c = new Array(pre.length + 1).join("-");
|
|
465
|
-
return pre + this.upcomingInput() + "\n" + c + "^";
|
|
466
|
-
}, "showPosition"),
|
|
467
|
-
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
468
|
-
test_match: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(match, indexed_rule) {
|
|
469
|
-
var token, lines, backup;
|
|
470
|
-
if (this.options.backtrack_lexer) {
|
|
471
|
-
backup = {
|
|
472
|
-
yylineno: this.yylineno,
|
|
473
|
-
yylloc: {
|
|
474
|
-
first_line: this.yylloc.first_line,
|
|
475
|
-
last_line: this.last_line,
|
|
476
|
-
first_column: this.yylloc.first_column,
|
|
477
|
-
last_column: this.yylloc.last_column
|
|
478
|
-
},
|
|
479
|
-
yytext: this.yytext,
|
|
480
|
-
match: this.match,
|
|
481
|
-
matches: this.matches,
|
|
482
|
-
matched: this.matched,
|
|
483
|
-
yyleng: this.yyleng,
|
|
484
|
-
offset: this.offset,
|
|
485
|
-
_more: this._more,
|
|
486
|
-
_input: this._input,
|
|
487
|
-
yy: this.yy,
|
|
488
|
-
conditionStack: this.conditionStack.slice(0),
|
|
489
|
-
done: this.done
|
|
490
|
-
};
|
|
491
|
-
if (this.options.ranges) {
|
|
492
|
-
backup.yylloc.range = this.yylloc.range.slice(0);
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
496
|
-
if (lines) {
|
|
497
|
-
this.yylineno += lines.length;
|
|
498
|
-
}
|
|
499
|
-
this.yylloc = {
|
|
500
|
-
first_line: this.yylloc.last_line,
|
|
501
|
-
last_line: this.yylineno + 1,
|
|
502
|
-
first_column: this.yylloc.last_column,
|
|
503
|
-
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
|
504
|
-
};
|
|
505
|
-
this.yytext += match[0];
|
|
506
|
-
this.match += match[0];
|
|
507
|
-
this.matches = match;
|
|
508
|
-
this.yyleng = this.yytext.length;
|
|
509
|
-
if (this.options.ranges) {
|
|
510
|
-
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
511
|
-
}
|
|
512
|
-
this._more = false;
|
|
513
|
-
this._backtrack = false;
|
|
514
|
-
this._input = this._input.slice(match[0].length);
|
|
515
|
-
this.matched += match[0];
|
|
516
|
-
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
517
|
-
if (this.done && this._input) {
|
|
518
|
-
this.done = false;
|
|
519
|
-
}
|
|
520
|
-
if (token) {
|
|
521
|
-
return token;
|
|
522
|
-
} else if (this._backtrack) {
|
|
523
|
-
for (var k in backup) {
|
|
524
|
-
this[k] = backup[k];
|
|
525
|
-
}
|
|
526
|
-
return false;
|
|
527
|
-
}
|
|
528
|
-
return false;
|
|
529
|
-
}, "test_match"),
|
|
530
|
-
// return next match in input
|
|
531
|
-
next: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
532
|
-
if (this.done) {
|
|
533
|
-
return this.EOF;
|
|
534
|
-
}
|
|
535
|
-
if (!this._input) {
|
|
536
|
-
this.done = true;
|
|
537
|
-
}
|
|
538
|
-
var token, match, tempMatch, index;
|
|
539
|
-
if (!this._more) {
|
|
540
|
-
this.yytext = "";
|
|
541
|
-
this.match = "";
|
|
542
|
-
}
|
|
543
|
-
var rules = this._currentRules();
|
|
544
|
-
for (var i = 0; i < rules.length; i++) {
|
|
545
|
-
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
546
|
-
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
547
|
-
match = tempMatch;
|
|
548
|
-
index = i;
|
|
549
|
-
if (this.options.backtrack_lexer) {
|
|
550
|
-
token = this.test_match(tempMatch, rules[i]);
|
|
551
|
-
if (token !== false) {
|
|
552
|
-
return token;
|
|
553
|
-
} else if (this._backtrack) {
|
|
554
|
-
match = false;
|
|
555
|
-
continue;
|
|
556
|
-
} else {
|
|
557
|
-
return false;
|
|
558
|
-
}
|
|
559
|
-
} else if (!this.options.flex) {
|
|
560
|
-
break;
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
if (match) {
|
|
565
|
-
token = this.test_match(match, rules[index]);
|
|
566
|
-
if (token !== false) {
|
|
567
|
-
return token;
|
|
568
|
-
}
|
|
569
|
-
return false;
|
|
570
|
-
}
|
|
571
|
-
if (this._input === "") {
|
|
572
|
-
return this.EOF;
|
|
573
|
-
} else {
|
|
574
|
-
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
575
|
-
text: "",
|
|
576
|
-
token: null,
|
|
577
|
-
line: this.yylineno
|
|
578
|
-
});
|
|
579
|
-
}
|
|
580
|
-
}, "next"),
|
|
581
|
-
// return next match that has a token
|
|
582
|
-
lex: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function lex() {
|
|
583
|
-
var r = this.next();
|
|
584
|
-
if (r) {
|
|
585
|
-
return r;
|
|
586
|
-
} else {
|
|
587
|
-
return this.lex();
|
|
588
|
-
}
|
|
589
|
-
}, "lex"),
|
|
590
|
-
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
591
|
-
begin: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function begin(condition) {
|
|
592
|
-
this.conditionStack.push(condition);
|
|
593
|
-
}, "begin"),
|
|
594
|
-
// pop the previously active lexer condition state off the condition stack
|
|
595
|
-
popState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function popState() {
|
|
596
|
-
var n = this.conditionStack.length - 1;
|
|
597
|
-
if (n > 0) {
|
|
598
|
-
return this.conditionStack.pop();
|
|
599
|
-
} else {
|
|
600
|
-
return this.conditionStack[0];
|
|
601
|
-
}
|
|
602
|
-
}, "popState"),
|
|
603
|
-
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
604
|
-
_currentRules: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function _currentRules() {
|
|
605
|
-
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
|
606
|
-
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
607
|
-
} else {
|
|
608
|
-
return this.conditions["INITIAL"].rules;
|
|
609
|
-
}
|
|
610
|
-
}, "_currentRules"),
|
|
611
|
-
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
612
|
-
topState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function topState(n) {
|
|
613
|
-
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
614
|
-
if (n >= 0) {
|
|
615
|
-
return this.conditionStack[n];
|
|
616
|
-
} else {
|
|
617
|
-
return "INITIAL";
|
|
618
|
-
}
|
|
619
|
-
}, "topState"),
|
|
620
|
-
// alias for begin(condition)
|
|
621
|
-
pushState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function pushState(condition) {
|
|
622
|
-
this.begin(condition);
|
|
623
|
-
}, "pushState"),
|
|
624
|
-
// return the number of states currently on the stack
|
|
625
|
-
stateStackSize: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function stateStackSize() {
|
|
626
|
-
return this.conditionStack.length;
|
|
627
|
-
}, "stateStackSize"),
|
|
628
|
-
options: { "case-insensitive": true },
|
|
629
|
-
performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
|
630
|
-
var YYSTATE = YY_START;
|
|
631
|
-
switch ($avoiding_name_collisions) {
|
|
632
|
-
case 0:
|
|
633
|
-
break;
|
|
634
|
-
case 1:
|
|
635
|
-
break;
|
|
636
|
-
case 2:
|
|
637
|
-
return 10;
|
|
638
|
-
break;
|
|
639
|
-
case 3:
|
|
640
|
-
break;
|
|
641
|
-
case 4:
|
|
642
|
-
break;
|
|
643
|
-
case 5:
|
|
644
|
-
return 4;
|
|
645
|
-
break;
|
|
646
|
-
case 6:
|
|
647
|
-
return 11;
|
|
648
|
-
break;
|
|
649
|
-
case 7:
|
|
650
|
-
this.begin("acc_title");
|
|
651
|
-
return 12;
|
|
652
|
-
break;
|
|
653
|
-
case 8:
|
|
654
|
-
this.popState();
|
|
655
|
-
return "acc_title_value";
|
|
656
|
-
break;
|
|
657
|
-
case 9:
|
|
658
|
-
this.begin("acc_descr");
|
|
659
|
-
return 14;
|
|
660
|
-
break;
|
|
661
|
-
case 10:
|
|
662
|
-
this.popState();
|
|
663
|
-
return "acc_descr_value";
|
|
664
|
-
break;
|
|
665
|
-
case 11:
|
|
666
|
-
this.begin("acc_descr_multiline");
|
|
667
|
-
break;
|
|
668
|
-
case 12:
|
|
669
|
-
this.popState();
|
|
670
|
-
break;
|
|
671
|
-
case 13:
|
|
672
|
-
return "acc_descr_multiline_value";
|
|
673
|
-
break;
|
|
674
|
-
case 14:
|
|
675
|
-
return 17;
|
|
676
|
-
break;
|
|
677
|
-
case 15:
|
|
678
|
-
return 18;
|
|
679
|
-
break;
|
|
680
|
-
case 16:
|
|
681
|
-
return 19;
|
|
682
|
-
break;
|
|
683
|
-
case 17:
|
|
684
|
-
return ":";
|
|
685
|
-
break;
|
|
686
|
-
case 18:
|
|
687
|
-
return 6;
|
|
688
|
-
break;
|
|
689
|
-
case 19:
|
|
690
|
-
return "INVALID";
|
|
691
|
-
break;
|
|
692
|
-
}
|
|
693
|
-
}, "anonymous"),
|
|
694
|
-
rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
|
|
695
|
-
conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], "inclusive": true } }
|
|
696
|
-
};
|
|
697
|
-
return lexer2;
|
|
698
|
-
}();
|
|
699
|
-
parser2.lexer = lexer;
|
|
700
|
-
function Parser() {
|
|
701
|
-
this.yy = {};
|
|
702
|
-
}
|
|
703
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(Parser, "Parser");
|
|
704
|
-
Parser.prototype = parser2;
|
|
705
|
-
parser2.Parser = Parser;
|
|
706
|
-
return new Parser();
|
|
707
|
-
}();
|
|
708
|
-
parser.parser = parser;
|
|
709
|
-
var journey_default = parser;
|
|
710
|
-
|
|
711
|
-
// src/diagrams/user-journey/journeyDb.js
|
|
712
|
-
var currentSection = "";
|
|
713
|
-
var sections = [];
|
|
714
|
-
var tasks = [];
|
|
715
|
-
var rawTasks = [];
|
|
716
|
-
var clear2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
717
|
-
sections.length = 0;
|
|
718
|
-
tasks.length = 0;
|
|
719
|
-
currentSection = "";
|
|
720
|
-
rawTasks.length = 0;
|
|
721
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .clear */ .IU)();
|
|
722
|
-
}, "clear");
|
|
723
|
-
var addSection = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(txt) {
|
|
724
|
-
currentSection = txt;
|
|
725
|
-
sections.push(txt);
|
|
726
|
-
}, "addSection");
|
|
727
|
-
var getSections = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
728
|
-
return sections;
|
|
729
|
-
}, "getSections");
|
|
730
|
-
var getTasks = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
731
|
-
let allItemsProcessed = compileTasks();
|
|
732
|
-
const maxDepth = 100;
|
|
733
|
-
let iterationCount = 0;
|
|
734
|
-
while (!allItemsProcessed && iterationCount < maxDepth) {
|
|
735
|
-
allItemsProcessed = compileTasks();
|
|
736
|
-
iterationCount++;
|
|
737
|
-
}
|
|
738
|
-
tasks.push(...rawTasks);
|
|
739
|
-
return tasks;
|
|
740
|
-
}, "getTasks");
|
|
741
|
-
var updateActors = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
742
|
-
const tempActors = [];
|
|
743
|
-
tasks.forEach((task) => {
|
|
744
|
-
if (task.people) {
|
|
745
|
-
tempActors.push(...task.people);
|
|
746
|
-
}
|
|
747
|
-
});
|
|
748
|
-
const unique = new Set(tempActors);
|
|
749
|
-
return [...unique].sort();
|
|
750
|
-
}, "updateActors");
|
|
751
|
-
var addTask = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(descr, taskData) {
|
|
752
|
-
const pieces = taskData.substr(1).split(":");
|
|
753
|
-
let score = 0;
|
|
754
|
-
let peeps = [];
|
|
755
|
-
if (pieces.length === 1) {
|
|
756
|
-
score = Number(pieces[0]);
|
|
757
|
-
peeps = [];
|
|
758
|
-
} else {
|
|
759
|
-
score = Number(pieces[0]);
|
|
760
|
-
peeps = pieces[1].split(",");
|
|
761
|
-
}
|
|
762
|
-
const peopleList = peeps.map((s) => s.trim());
|
|
763
|
-
const rawTask = {
|
|
764
|
-
section: currentSection,
|
|
765
|
-
type: currentSection,
|
|
766
|
-
people: peopleList,
|
|
767
|
-
task: descr,
|
|
768
|
-
score
|
|
769
|
-
};
|
|
770
|
-
rawTasks.push(rawTask);
|
|
771
|
-
}, "addTask");
|
|
772
|
-
var addTaskOrg = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(descr) {
|
|
773
|
-
const newTask = {
|
|
774
|
-
section: currentSection,
|
|
775
|
-
type: currentSection,
|
|
776
|
-
description: descr,
|
|
777
|
-
task: descr,
|
|
778
|
-
classes: []
|
|
779
|
-
};
|
|
780
|
-
tasks.push(newTask);
|
|
781
|
-
}, "addTaskOrg");
|
|
782
|
-
var compileTasks = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
783
|
-
const compileTask = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(pos) {
|
|
784
|
-
return rawTasks[pos].processed;
|
|
785
|
-
}, "compileTask");
|
|
786
|
-
let allProcessed = true;
|
|
787
|
-
for (const [i, rawTask] of rawTasks.entries()) {
|
|
788
|
-
compileTask(i);
|
|
789
|
-
allProcessed = allProcessed && rawTask.processed;
|
|
790
|
-
}
|
|
791
|
-
return allProcessed;
|
|
792
|
-
}, "compileTasks");
|
|
793
|
-
var getActors = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
794
|
-
return updateActors();
|
|
795
|
-
}, "getActors");
|
|
796
|
-
var journeyDb_default = {
|
|
797
|
-
getConfig: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(() => (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().journey, "getConfig"),
|
|
798
|
-
clear: clear2,
|
|
799
|
-
setDiagramTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .setDiagramTitle */ .ke,
|
|
800
|
-
getDiagramTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getDiagramTitle */ .ab,
|
|
801
|
-
setAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .setAccTitle */ .SV,
|
|
802
|
-
getAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getAccTitle */ .iN,
|
|
803
|
-
setAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .setAccDescription */ .EI,
|
|
804
|
-
getAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getAccDescription */ .m7,
|
|
805
|
-
addSection,
|
|
806
|
-
getSections,
|
|
807
|
-
getTasks,
|
|
808
|
-
addTask,
|
|
809
|
-
addTaskOrg,
|
|
810
|
-
getActors
|
|
811
|
-
};
|
|
812
|
-
|
|
813
|
-
// src/diagrams/user-journey/styles.js
|
|
814
|
-
var getStyles = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)((options) => `.label {
|
|
815
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
816
|
-
font-family: var(--mermaid-font-family);
|
|
817
|
-
color: ${options.textColor};
|
|
818
|
-
}
|
|
819
|
-
.mouth {
|
|
820
|
-
stroke: #666;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
line {
|
|
824
|
-
stroke: ${options.textColor}
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
.legend {
|
|
828
|
-
fill: ${options.textColor};
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
.label text {
|
|
832
|
-
fill: #333;
|
|
833
|
-
}
|
|
834
|
-
.label {
|
|
835
|
-
color: ${options.textColor}
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
.face {
|
|
839
|
-
${options.faceColor ? `fill: ${options.faceColor}` : "fill: #FFF8DC"};
|
|
840
|
-
stroke: #999;
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
.node rect,
|
|
844
|
-
.node circle,
|
|
845
|
-
.node ellipse,
|
|
846
|
-
.node polygon,
|
|
847
|
-
.node path {
|
|
848
|
-
fill: ${options.mainBkg};
|
|
849
|
-
stroke: ${options.nodeBorder};
|
|
850
|
-
stroke-width: 1px;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
.node .label {
|
|
854
|
-
text-align: center;
|
|
855
|
-
}
|
|
856
|
-
.node.clickable {
|
|
857
|
-
cursor: pointer;
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
.arrowheadPath {
|
|
861
|
-
fill: ${options.arrowheadColor};
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
.edgePath .path {
|
|
865
|
-
stroke: ${options.lineColor};
|
|
866
|
-
stroke-width: 1.5px;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
.flowchart-link {
|
|
870
|
-
stroke: ${options.lineColor};
|
|
871
|
-
fill: none;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
.edgeLabel {
|
|
875
|
-
background-color: ${options.edgeLabelBackground};
|
|
876
|
-
rect {
|
|
877
|
-
opacity: 0.5;
|
|
878
|
-
}
|
|
879
|
-
text-align: center;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
.cluster rect {
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
.cluster text {
|
|
886
|
-
fill: ${options.titleColor};
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
div.mermaidTooltip {
|
|
890
|
-
position: absolute;
|
|
891
|
-
text-align: center;
|
|
892
|
-
max-width: 200px;
|
|
893
|
-
padding: 2px;
|
|
894
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
895
|
-
font-family: var(--mermaid-font-family);
|
|
896
|
-
font-size: 12px;
|
|
897
|
-
background: ${options.tertiaryColor};
|
|
898
|
-
border: 1px solid ${options.border2};
|
|
899
|
-
border-radius: 2px;
|
|
900
|
-
pointer-events: none;
|
|
901
|
-
z-index: 100;
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
.task-type-0, .section-type-0 {
|
|
905
|
-
${options.fillType0 ? `fill: ${options.fillType0}` : ""};
|
|
906
|
-
}
|
|
907
|
-
.task-type-1, .section-type-1 {
|
|
908
|
-
${options.fillType0 ? `fill: ${options.fillType1}` : ""};
|
|
909
|
-
}
|
|
910
|
-
.task-type-2, .section-type-2 {
|
|
911
|
-
${options.fillType0 ? `fill: ${options.fillType2}` : ""};
|
|
912
|
-
}
|
|
913
|
-
.task-type-3, .section-type-3 {
|
|
914
|
-
${options.fillType0 ? `fill: ${options.fillType3}` : ""};
|
|
915
|
-
}
|
|
916
|
-
.task-type-4, .section-type-4 {
|
|
917
|
-
${options.fillType0 ? `fill: ${options.fillType4}` : ""};
|
|
918
|
-
}
|
|
919
|
-
.task-type-5, .section-type-5 {
|
|
920
|
-
${options.fillType0 ? `fill: ${options.fillType5}` : ""};
|
|
921
|
-
}
|
|
922
|
-
.task-type-6, .section-type-6 {
|
|
923
|
-
${options.fillType0 ? `fill: ${options.fillType6}` : ""};
|
|
924
|
-
}
|
|
925
|
-
.task-type-7, .section-type-7 {
|
|
926
|
-
${options.fillType0 ? `fill: ${options.fillType7}` : ""};
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
.actor-0 {
|
|
930
|
-
${options.actor0 ? `fill: ${options.actor0}` : ""};
|
|
931
|
-
}
|
|
932
|
-
.actor-1 {
|
|
933
|
-
${options.actor1 ? `fill: ${options.actor1}` : ""};
|
|
934
|
-
}
|
|
935
|
-
.actor-2 {
|
|
936
|
-
${options.actor2 ? `fill: ${options.actor2}` : ""};
|
|
937
|
-
}
|
|
938
|
-
.actor-3 {
|
|
939
|
-
${options.actor3 ? `fill: ${options.actor3}` : ""};
|
|
940
|
-
}
|
|
941
|
-
.actor-4 {
|
|
942
|
-
${options.actor4 ? `fill: ${options.actor4}` : ""};
|
|
943
|
-
}
|
|
944
|
-
.actor-5 {
|
|
945
|
-
${options.actor5 ? `fill: ${options.actor5}` : ""};
|
|
946
|
-
}
|
|
947
|
-
`, "getStyles");
|
|
948
|
-
var styles_default = getStyles;
|
|
949
|
-
|
|
950
|
-
// src/diagrams/user-journey/journeyRenderer.ts
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
// src/diagrams/user-journey/svgDraw.js
|
|
954
|
-
|
|
955
|
-
var drawRect2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(elem, rectData) {
|
|
956
|
-
return (0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .drawRect */ .tk)(elem, rectData);
|
|
957
|
-
}, "drawRect");
|
|
958
|
-
var drawFace = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(element, faceData) {
|
|
959
|
-
const radius = 15;
|
|
960
|
-
const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible");
|
|
961
|
-
const face = element.append("g");
|
|
962
|
-
face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
|
|
963
|
-
face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
|
|
964
|
-
function smile(face2) {
|
|
965
|
-
const arc = (0,d3__WEBPACK_IMPORTED_MODULE_2__/* .arc */ .JLW)().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
|
|
966
|
-
face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")");
|
|
967
|
-
}
|
|
968
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(smile, "smile");
|
|
969
|
-
function sad(face2) {
|
|
970
|
-
const arc = (0,d3__WEBPACK_IMPORTED_MODULE_2__/* .arc */ .JLW)().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
|
|
971
|
-
face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")");
|
|
972
|
-
}
|
|
973
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(sad, "sad");
|
|
974
|
-
function ambivalent(face2) {
|
|
975
|
-
face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
|
|
976
|
-
}
|
|
977
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(ambivalent, "ambivalent");
|
|
978
|
-
if (faceData.score > 3) {
|
|
979
|
-
smile(face);
|
|
980
|
-
} else if (faceData.score < 3) {
|
|
981
|
-
sad(face);
|
|
982
|
-
} else {
|
|
983
|
-
ambivalent(face);
|
|
984
|
-
}
|
|
985
|
-
return circleElement;
|
|
986
|
-
}, "drawFace");
|
|
987
|
-
var drawCircle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(element, circleData) {
|
|
988
|
-
const circleElement = element.append("circle");
|
|
989
|
-
circleElement.attr("cx", circleData.cx);
|
|
990
|
-
circleElement.attr("cy", circleData.cy);
|
|
991
|
-
circleElement.attr("class", "actor-" + circleData.pos);
|
|
992
|
-
circleElement.attr("fill", circleData.fill);
|
|
993
|
-
circleElement.attr("stroke", circleData.stroke);
|
|
994
|
-
circleElement.attr("r", circleData.r);
|
|
995
|
-
if (circleElement.class !== void 0) {
|
|
996
|
-
circleElement.attr("class", circleElement.class);
|
|
997
|
-
}
|
|
998
|
-
if (circleData.title !== void 0) {
|
|
999
|
-
circleElement.append("title").text(circleData.title);
|
|
1000
|
-
}
|
|
1001
|
-
return circleElement;
|
|
1002
|
-
}, "drawCircle");
|
|
1003
|
-
var drawText2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(elem, textData) {
|
|
1004
|
-
return (0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .drawText */ .m)(elem, textData);
|
|
1005
|
-
}, "drawText");
|
|
1006
|
-
var drawLabel = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(elem, txtObject) {
|
|
1007
|
-
function genPoints(x, y, width, height, cut) {
|
|
1008
|
-
return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height);
|
|
1009
|
-
}
|
|
1010
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(genPoints, "genPoints");
|
|
1011
|
-
const polygon = elem.append("polygon");
|
|
1012
|
-
polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7));
|
|
1013
|
-
polygon.attr("class", "labelBox");
|
|
1014
|
-
txtObject.y = txtObject.y + txtObject.labelMargin;
|
|
1015
|
-
txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
|
|
1016
|
-
drawText2(elem, txtObject);
|
|
1017
|
-
}, "drawLabel");
|
|
1018
|
-
var drawSection = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(elem, section, conf2) {
|
|
1019
|
-
const g = elem.append("g");
|
|
1020
|
-
const rect = (0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getNoteRect */ .PB)();
|
|
1021
|
-
rect.x = section.x;
|
|
1022
|
-
rect.y = section.y;
|
|
1023
|
-
rect.fill = section.fill;
|
|
1024
|
-
rect.width = conf2.width * section.taskCount + // width of the tasks
|
|
1025
|
-
conf2.diagramMarginX * (section.taskCount - 1);
|
|
1026
|
-
rect.height = conf2.height;
|
|
1027
|
-
rect.class = "journey-section section-type-" + section.num;
|
|
1028
|
-
rect.rx = 3;
|
|
1029
|
-
rect.ry = 3;
|
|
1030
|
-
drawRect2(g, rect);
|
|
1031
|
-
_drawTextCandidateFunc(conf2)(
|
|
1032
|
-
section.text,
|
|
1033
|
-
g,
|
|
1034
|
-
rect.x,
|
|
1035
|
-
rect.y,
|
|
1036
|
-
rect.width,
|
|
1037
|
-
rect.height,
|
|
1038
|
-
{ class: "journey-section section-type-" + section.num },
|
|
1039
|
-
conf2,
|
|
1040
|
-
section.colour
|
|
1041
|
-
);
|
|
1042
|
-
}, "drawSection");
|
|
1043
|
-
var taskCount = -1;
|
|
1044
|
-
var drawTask = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(elem, task, conf2) {
|
|
1045
|
-
const center = task.x + conf2.width / 2;
|
|
1046
|
-
const g = elem.append("g");
|
|
1047
|
-
taskCount++;
|
|
1048
|
-
const maxHeight = 300 + 5 * 30;
|
|
1049
|
-
g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666");
|
|
1050
|
-
drawFace(g, {
|
|
1051
|
-
cx: center,
|
|
1052
|
-
cy: 300 + (5 - task.score) * 30,
|
|
1053
|
-
score: task.score
|
|
1054
|
-
});
|
|
1055
|
-
const rect = (0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getNoteRect */ .PB)();
|
|
1056
|
-
rect.x = task.x;
|
|
1057
|
-
rect.y = task.y;
|
|
1058
|
-
rect.fill = task.fill;
|
|
1059
|
-
rect.width = conf2.width;
|
|
1060
|
-
rect.height = conf2.height;
|
|
1061
|
-
rect.class = "task task-type-" + task.num;
|
|
1062
|
-
rect.rx = 3;
|
|
1063
|
-
rect.ry = 3;
|
|
1064
|
-
drawRect2(g, rect);
|
|
1065
|
-
let xPos = task.x + 14;
|
|
1066
|
-
task.people.forEach((person) => {
|
|
1067
|
-
const colour = task.actors[person].color;
|
|
1068
|
-
const circle = {
|
|
1069
|
-
cx: xPos,
|
|
1070
|
-
cy: task.y,
|
|
1071
|
-
r: 7,
|
|
1072
|
-
fill: colour,
|
|
1073
|
-
stroke: "#000",
|
|
1074
|
-
title: person,
|
|
1075
|
-
pos: task.actors[person].position
|
|
1076
|
-
};
|
|
1077
|
-
drawCircle(g, circle);
|
|
1078
|
-
xPos += 10;
|
|
1079
|
-
});
|
|
1080
|
-
_drawTextCandidateFunc(conf2)(
|
|
1081
|
-
task.task,
|
|
1082
|
-
g,
|
|
1083
|
-
rect.x,
|
|
1084
|
-
rect.y,
|
|
1085
|
-
rect.width,
|
|
1086
|
-
rect.height,
|
|
1087
|
-
{ class: "task" },
|
|
1088
|
-
conf2,
|
|
1089
|
-
task.colour
|
|
1090
|
-
);
|
|
1091
|
-
}, "drawTask");
|
|
1092
|
-
var drawBackgroundRect2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(elem, bounds2) {
|
|
1093
|
-
(0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .drawBackgroundRect */ .lC)(elem, bounds2);
|
|
1094
|
-
}, "drawBackgroundRect");
|
|
1095
|
-
var _drawTextCandidateFunc = /* @__PURE__ */ function() {
|
|
1096
|
-
function byText(content, g, x, y, width, height, textAttrs, colour) {
|
|
1097
|
-
const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content);
|
|
1098
|
-
_setTextAttrs(text, textAttrs);
|
|
1099
|
-
}
|
|
1100
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(byText, "byText");
|
|
1101
|
-
function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) {
|
|
1102
|
-
const { taskFontSize, taskFontFamily } = conf2;
|
|
1103
|
-
const lines = content.split(/<br\s*\/?>/gi);
|
|
1104
|
-
for (let i = 0; i < lines.length; i++) {
|
|
1105
|
-
const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;
|
|
1106
|
-
const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily);
|
|
1107
|
-
text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]);
|
|
1108
|
-
text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
|
|
1109
|
-
_setTextAttrs(text, textAttrs);
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(byTspan, "byTspan");
|
|
1113
|
-
function byFo(content, g, x, y, width, height, textAttrs, conf2) {
|
|
1114
|
-
const body = g.append("switch");
|
|
1115
|
-
const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed");
|
|
1116
|
-
const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1117
|
-
text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
|
|
1118
|
-
byTspan(content, body, x, y, width, height, textAttrs, conf2);
|
|
1119
|
-
_setTextAttrs(text, textAttrs);
|
|
1120
|
-
}
|
|
1121
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(byFo, "byFo");
|
|
1122
|
-
function _setTextAttrs(toText, fromTextAttrsDict) {
|
|
1123
|
-
for (const key in fromTextAttrsDict) {
|
|
1124
|
-
if (key in fromTextAttrsDict) {
|
|
1125
|
-
toText.attr(key, fromTextAttrsDict[key]);
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
}
|
|
1129
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(_setTextAttrs, "_setTextAttrs");
|
|
1130
|
-
return function(conf2) {
|
|
1131
|
-
return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
|
|
1132
|
-
};
|
|
1133
|
-
}();
|
|
1134
|
-
var initGraphics = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(graphics) {
|
|
1135
|
-
graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
|
|
1136
|
-
}, "initGraphics");
|
|
1137
|
-
var svgDraw_default = {
|
|
1138
|
-
drawRect: drawRect2,
|
|
1139
|
-
drawCircle,
|
|
1140
|
-
drawSection,
|
|
1141
|
-
drawText: drawText2,
|
|
1142
|
-
drawLabel,
|
|
1143
|
-
drawTask,
|
|
1144
|
-
drawBackgroundRect: drawBackgroundRect2,
|
|
1145
|
-
initGraphics
|
|
1146
|
-
};
|
|
1147
|
-
|
|
1148
|
-
// src/diagrams/user-journey/journeyRenderer.ts
|
|
1149
|
-
var setConf = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(cnf) {
|
|
1150
|
-
const keys = Object.keys(cnf);
|
|
1151
|
-
keys.forEach(function(key) {
|
|
1152
|
-
conf[key] = cnf[key];
|
|
1153
|
-
});
|
|
1154
|
-
}, "setConf");
|
|
1155
|
-
var actors = {};
|
|
1156
|
-
function drawActorLegend(diagram2) {
|
|
1157
|
-
const conf2 = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().journey;
|
|
1158
|
-
let yPos = 60;
|
|
1159
|
-
Object.keys(actors).forEach((person) => {
|
|
1160
|
-
const colour = actors[person].color;
|
|
1161
|
-
const circleData = {
|
|
1162
|
-
cx: 20,
|
|
1163
|
-
cy: yPos,
|
|
1164
|
-
r: 7,
|
|
1165
|
-
fill: colour,
|
|
1166
|
-
stroke: "#000",
|
|
1167
|
-
pos: actors[person].position
|
|
1168
|
-
};
|
|
1169
|
-
svgDraw_default.drawCircle(diagram2, circleData);
|
|
1170
|
-
const labelData = {
|
|
1171
|
-
x: 40,
|
|
1172
|
-
y: yPos + 7,
|
|
1173
|
-
fill: "#666",
|
|
1174
|
-
text: person,
|
|
1175
|
-
textMargin: conf2.boxTextMargin | 5
|
|
1176
|
-
};
|
|
1177
|
-
svgDraw_default.drawText(diagram2, labelData);
|
|
1178
|
-
yPos += 20;
|
|
1179
|
-
});
|
|
1180
|
-
}
|
|
1181
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(drawActorLegend, "drawActorLegend");
|
|
1182
|
-
var conf = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().journey;
|
|
1183
|
-
var LEFT_MARGIN = conf.leftMargin;
|
|
1184
|
-
var draw = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(text, id, version, diagObj) {
|
|
1185
|
-
const conf2 = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().journey;
|
|
1186
|
-
const securityLevel = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().securityLevel;
|
|
1187
|
-
let sandboxElement;
|
|
1188
|
-
if (securityLevel === "sandbox") {
|
|
1189
|
-
sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_2__/* .select */ .Ltv)("#i" + id);
|
|
1190
|
-
}
|
|
1191
|
-
const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_2__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_2__/* .select */ .Ltv)("body");
|
|
1192
|
-
bounds.init();
|
|
1193
|
-
const diagram2 = root.select("#" + id);
|
|
1194
|
-
svgDraw_default.initGraphics(diagram2);
|
|
1195
|
-
const tasks2 = diagObj.db.getTasks();
|
|
1196
|
-
const title = diagObj.db.getDiagramTitle();
|
|
1197
|
-
const actorNames = diagObj.db.getActors();
|
|
1198
|
-
for (const member in actors) {
|
|
1199
|
-
delete actors[member];
|
|
1200
|
-
}
|
|
1201
|
-
let actorPos = 0;
|
|
1202
|
-
actorNames.forEach((actorName) => {
|
|
1203
|
-
actors[actorName] = {
|
|
1204
|
-
color: conf2.actorColours[actorPos % conf2.actorColours.length],
|
|
1205
|
-
position: actorPos
|
|
1206
|
-
};
|
|
1207
|
-
actorPos++;
|
|
1208
|
-
});
|
|
1209
|
-
drawActorLegend(diagram2);
|
|
1210
|
-
bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);
|
|
1211
|
-
drawTasks(diagram2, tasks2, 0);
|
|
1212
|
-
const box = bounds.getBounds();
|
|
1213
|
-
if (title) {
|
|
1214
|
-
diagram2.append("text").text(title).attr("x", LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
|
|
1215
|
-
}
|
|
1216
|
-
const height = box.stopy - box.starty + 2 * conf2.diagramMarginY;
|
|
1217
|
-
const width = LEFT_MARGIN + box.stopx + 2 * conf2.diagramMarginX;
|
|
1218
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .configureSvgSize */ .a$)(diagram2, height, width, conf2.useMaxWidth);
|
|
1219
|
-
diagram2.append("line").attr("x1", LEFT_MARGIN).attr("y1", conf2.height * 4).attr("x2", width - LEFT_MARGIN - 4).attr("y2", conf2.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
|
|
1220
|
-
const extraVertForTitle = title ? 70 : 0;
|
|
1221
|
-
diagram2.attr("viewBox", `${box.startx} -25 ${width} ${height + extraVertForTitle}`);
|
|
1222
|
-
diagram2.attr("preserveAspectRatio", "xMinYMin meet");
|
|
1223
|
-
diagram2.attr("height", height + extraVertForTitle + 25);
|
|
1224
|
-
}, "draw");
|
|
1225
|
-
var bounds = {
|
|
1226
|
-
data: {
|
|
1227
|
-
startx: void 0,
|
|
1228
|
-
stopx: void 0,
|
|
1229
|
-
starty: void 0,
|
|
1230
|
-
stopy: void 0
|
|
1231
|
-
},
|
|
1232
|
-
verticalPos: 0,
|
|
1233
|
-
sequenceItems: [],
|
|
1234
|
-
init: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
1235
|
-
this.sequenceItems = [];
|
|
1236
|
-
this.data = {
|
|
1237
|
-
startx: void 0,
|
|
1238
|
-
stopx: void 0,
|
|
1239
|
-
starty: void 0,
|
|
1240
|
-
stopy: void 0
|
|
1241
|
-
};
|
|
1242
|
-
this.verticalPos = 0;
|
|
1243
|
-
}, "init"),
|
|
1244
|
-
updateVal: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(obj, key, val, fun) {
|
|
1245
|
-
if (obj[key] === void 0) {
|
|
1246
|
-
obj[key] = val;
|
|
1247
|
-
} else {
|
|
1248
|
-
obj[key] = fun(val, obj[key]);
|
|
1249
|
-
}
|
|
1250
|
-
}, "updateVal"),
|
|
1251
|
-
updateBounds: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(startx, starty, stopx, stopy) {
|
|
1252
|
-
const conf2 = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().journey;
|
|
1253
|
-
const _self = this;
|
|
1254
|
-
let cnt = 0;
|
|
1255
|
-
function updateFn(type) {
|
|
1256
|
-
return /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function updateItemBounds(item) {
|
|
1257
|
-
cnt++;
|
|
1258
|
-
const n = _self.sequenceItems.length - cnt + 1;
|
|
1259
|
-
_self.updateVal(item, "starty", starty - n * conf2.boxMargin, Math.min);
|
|
1260
|
-
_self.updateVal(item, "stopy", stopy + n * conf2.boxMargin, Math.max);
|
|
1261
|
-
_self.updateVal(bounds.data, "startx", startx - n * conf2.boxMargin, Math.min);
|
|
1262
|
-
_self.updateVal(bounds.data, "stopx", stopx + n * conf2.boxMargin, Math.max);
|
|
1263
|
-
if (!(type === "activation")) {
|
|
1264
|
-
_self.updateVal(item, "startx", startx - n * conf2.boxMargin, Math.min);
|
|
1265
|
-
_self.updateVal(item, "stopx", stopx + n * conf2.boxMargin, Math.max);
|
|
1266
|
-
_self.updateVal(bounds.data, "starty", starty - n * conf2.boxMargin, Math.min);
|
|
1267
|
-
_self.updateVal(bounds.data, "stopy", stopy + n * conf2.boxMargin, Math.max);
|
|
1268
|
-
}
|
|
1269
|
-
}, "updateItemBounds");
|
|
1270
|
-
}
|
|
1271
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(updateFn, "updateFn");
|
|
1272
|
-
this.sequenceItems.forEach(updateFn());
|
|
1273
|
-
}, "updateBounds"),
|
|
1274
|
-
insert: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(startx, starty, stopx, stopy) {
|
|
1275
|
-
const _startx = Math.min(startx, stopx);
|
|
1276
|
-
const _stopx = Math.max(startx, stopx);
|
|
1277
|
-
const _starty = Math.min(starty, stopy);
|
|
1278
|
-
const _stopy = Math.max(starty, stopy);
|
|
1279
|
-
this.updateVal(bounds.data, "startx", _startx, Math.min);
|
|
1280
|
-
this.updateVal(bounds.data, "starty", _starty, Math.min);
|
|
1281
|
-
this.updateVal(bounds.data, "stopx", _stopx, Math.max);
|
|
1282
|
-
this.updateVal(bounds.data, "stopy", _stopy, Math.max);
|
|
1283
|
-
this.updateBounds(_startx, _starty, _stopx, _stopy);
|
|
1284
|
-
}, "insert"),
|
|
1285
|
-
bumpVerticalPos: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(bump) {
|
|
1286
|
-
this.verticalPos = this.verticalPos + bump;
|
|
1287
|
-
this.data.stopy = this.verticalPos;
|
|
1288
|
-
}, "bumpVerticalPos"),
|
|
1289
|
-
getVerticalPos: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
1290
|
-
return this.verticalPos;
|
|
1291
|
-
}, "getVerticalPos"),
|
|
1292
|
-
getBounds: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
|
|
1293
|
-
return this.data;
|
|
1294
|
-
}, "getBounds")
|
|
1295
|
-
};
|
|
1296
|
-
var fills = conf.sectionFills;
|
|
1297
|
-
var textColours = conf.sectionColours;
|
|
1298
|
-
var drawTasks = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(diagram2, tasks2, verticalPos) {
|
|
1299
|
-
const conf2 = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().journey;
|
|
1300
|
-
let lastSection = "";
|
|
1301
|
-
const sectionVHeight = conf2.height * 2 + conf2.diagramMarginY;
|
|
1302
|
-
const taskPos = verticalPos + sectionVHeight;
|
|
1303
|
-
let sectionNumber = 0;
|
|
1304
|
-
let fill = "#CCC";
|
|
1305
|
-
let colour = "black";
|
|
1306
|
-
let num = 0;
|
|
1307
|
-
for (const [i, task] of tasks2.entries()) {
|
|
1308
|
-
if (lastSection !== task.section) {
|
|
1309
|
-
fill = fills[sectionNumber % fills.length];
|
|
1310
|
-
num = sectionNumber % fills.length;
|
|
1311
|
-
colour = textColours[sectionNumber % textColours.length];
|
|
1312
|
-
let taskInSectionCount = 0;
|
|
1313
|
-
const currentSection2 = task.section;
|
|
1314
|
-
for (let taskIndex = i; taskIndex < tasks2.length; taskIndex++) {
|
|
1315
|
-
if (tasks2[taskIndex].section == currentSection2) {
|
|
1316
|
-
taskInSectionCount = taskInSectionCount + 1;
|
|
1317
|
-
} else {
|
|
1318
|
-
break;
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
const section = {
|
|
1322
|
-
x: i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN,
|
|
1323
|
-
y: 50,
|
|
1324
|
-
text: task.section,
|
|
1325
|
-
fill,
|
|
1326
|
-
num,
|
|
1327
|
-
colour,
|
|
1328
|
-
taskCount: taskInSectionCount
|
|
1329
|
-
};
|
|
1330
|
-
svgDraw_default.drawSection(diagram2, section, conf2);
|
|
1331
|
-
lastSection = task.section;
|
|
1332
|
-
sectionNumber++;
|
|
1333
|
-
}
|
|
1334
|
-
const taskActors = task.people.reduce((acc, actorName) => {
|
|
1335
|
-
if (actors[actorName]) {
|
|
1336
|
-
acc[actorName] = actors[actorName];
|
|
1337
|
-
}
|
|
1338
|
-
return acc;
|
|
1339
|
-
}, {});
|
|
1340
|
-
task.x = i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN;
|
|
1341
|
-
task.y = taskPos;
|
|
1342
|
-
task.width = conf2.diagramMarginX;
|
|
1343
|
-
task.height = conf2.diagramMarginY;
|
|
1344
|
-
task.colour = colour;
|
|
1345
|
-
task.fill = fill;
|
|
1346
|
-
task.num = num;
|
|
1347
|
-
task.actors = taskActors;
|
|
1348
|
-
svgDraw_default.drawTask(diagram2, task, conf2);
|
|
1349
|
-
bounds.insert(task.x, task.y, task.x + task.width + conf2.taskMargin, 300 + 5 * 30);
|
|
1350
|
-
}
|
|
1351
|
-
}, "drawTasks");
|
|
1352
|
-
var journeyRenderer_default = {
|
|
1353
|
-
setConf,
|
|
1354
|
-
draw
|
|
1355
|
-
};
|
|
1356
|
-
|
|
1357
|
-
// src/diagrams/user-journey/journeyDiagram.ts
|
|
1358
|
-
var diagram = {
|
|
1359
|
-
parser: journey_default,
|
|
1360
|
-
db: journeyDb_default,
|
|
1361
|
-
renderer: journeyRenderer_default,
|
|
1362
|
-
styles: styles_default,
|
|
1363
|
-
init: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)((cnf) => {
|
|
1364
|
-
journeyRenderer_default.setConf(cnf.journey);
|
|
1365
|
-
journeyDb_default.clear();
|
|
1366
|
-
}, "init")
|
|
1367
|
-
};
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
/***/ })
|
|
1372
|
-
|
|
1373
|
-
}]);
|