@kong-ui-public/documentation 1.5.10 → 1.5.11
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/dist/_baseUniq-BM5nBlUE-Bqq-876b.js +477 -0
- package/dist/{arc-B-ukyQgl-BIkl0oly.js → arc-Da5qnJCa-D1fJq9Ga.js} +14 -14
- package/dist/architecture-YZFGNWBL-CvR_VbsD-i8qH434J.js +6 -0
- package/dist/architectureDiagram-Q4EWVU46-DqiP7Rm1-CBe5jt7q.js +4694 -0
- package/dist/blockDiagram-DXYQGD6D-Dqw9F2Am-BLtGZalg.js +2304 -0
- package/dist/{c4Diagram-AAMF2YG6-CKwlop6T-biDHxtgF.js → c4Diagram-AHTNJAMY-D1CqyEQ6-B0R-a6pf.js} +740 -743
- package/dist/{channel-Da4OyhNU-CjtA-gzv.js → channel-C0HsK-iS-D8tJdRzv.js} +1 -1
- package/dist/{chunk-ANTBXLJU-CgMY7K4E-BDFVHt4k.js → chunk-4BX2VUAB-CkAjNgA_-Bs9A5Kfv.js} +1 -1
- package/dist/{chunk-JBRWN2VN-DGZEDqQT-C_bgxQXb.js → chunk-4TB4RGXK-BahB65Eg-ChDwOMia.js} +483 -393
- package/dist/{chunk-WVR4S24B-CqqZpXpd-DYcapnmX.js → chunk-55IACEB6-FAGpaDxG-BTfPS-CU.js} +1 -1
- package/dist/{chunk-NRVI72HA-Bk2QoSU4-C8BLG4Nn.js → chunk-EDXVE4YY-JJVh1SXw-B-sKHFur.js} +1 -1
- package/dist/{chunk-GLLZNHP4-BfObQGbx-D2i6EGF4.js → chunk-FMBD7UC4-CAMVhC3j-oHcHavNU.js} +1 -1
- package/dist/{chunk-LXBSTHXV-DDrUAnPm-BhQORC-M.js → chunk-OYMX7WX6-CUYLPicN-BOih3xeZ.js} +219 -206
- package/dist/{chunk-FHKO5MBM--0hzbho5-CD7UphLJ.js → chunk-QZHKN3VN-DludCzyb-DYJGn0Nm.js} +1 -1
- package/dist/chunk-YZCP3GAM-D78rBxvk-E0y6EYmh.js +68 -0
- package/dist/{classDiagram-3BZAVTQC-BieGHK_n-DKk2Tasm.js → classDiagram-6PBFFD2Q-DImmr9bN-Ipdf4BlS.js} +2 -2
- package/dist/{classDiagram-v2-QTMF73CY-BieGHK_n-DKk2Tasm.js → classDiagram-v2-HSJHXN6E-DImmr9bN-Ipdf4BlS.js} +2 -2
- package/dist/{clone-BQ4BCIVX-BtVSQfya.js → clone-CxV-_MWN-BTBOrYIK.js} +1 -1
- package/dist/cose-bilkent-S5V4N54A-B5XQcR33-C16znhn9.js +2608 -0
- package/dist/{cytoscape.esm-CjI2IsL8-DYIumutE.js → cytoscape.esm-BjnMFxuP-CWlRmT1g.js} +16 -13
- package/dist/{dagre-2BBEFEWP-sc2upYy7-rNXSQFNY.js → dagre-KV5264BT-PBiSm4y3-BP7huLbw.js} +19 -20
- package/dist/diagram-5BDNPKRD-Um_ME5I2-DLUwrd96.js +123 -0
- package/dist/diagram-G4DWMVQ6-BsTsajjz-Uehh1WWi.js +530 -0
- package/dist/{diagram-RP2FKANI-DabtWDGU-FmJgjY_V.js → diagram-MMDJMWI5-C5oqUzF8-gcpf6PNh.js} +67 -67
- package/dist/{diagram-GUPCWM2R-RSzJRmP4-5_ml5U5U.js → diagram-TYMM5635-CQxFzu44-Dx5KCUXW.js} +23 -23
- package/dist/documentation.es.js +1 -1
- package/dist/documentation.umd.js +1748 -1228
- package/dist/erDiagram-SMLLAGMA-23hRKyIy-B-dChHLQ.js +898 -0
- package/dist/flowDiagram-DWJPFMVM-BeSa8cQn-B2__M71K.js +1635 -0
- package/dist/ganttDiagram-T4ZO3ILL-ZC4a8MdR-tE42RGcp.js +2700 -0
- package/dist/gitGraph-7Q5UKJZL-DlY-5kQ6-CLY7BmsA.js +6 -0
- package/dist/gitGraphDiagram-UUTBAWPF-DXVZeOtJ-CWWgOrKv.js +828 -0
- package/dist/graph-WBvyJJXo-BBnBDARn.js +738 -0
- package/dist/{index-DeBlJN4f.js → index-Bh-wTBlD.js} +16761 -15853
- package/dist/info-OMHHGYJF-RTXqsfQC-DrfqfklB.js +6 -0
- package/dist/infoDiagram-42DDH7IO-BZdpI3Rt-l8iFfMFP.js +24 -0
- package/dist/ishikawaDiagram-UXIWVN3A-DvYKV3c4-BPgCxTOl.js +622 -0
- package/dist/journeyDiagram-VCZTEJTY-C2ry_hWi-DI5GD7uG.js +834 -0
- package/dist/{kanban-definition-KOZQBZVT-BcgyR947-u-ThSWpr.js → kanban-definition-6JOO6SKY-CY_QsIlW-OqXNCY1p.js} +163 -158
- package/dist/{katex-C0Lgw_Sx-CbX2I1cQ.js → katex-CX_HYDAq-_-dpIk5k.js} +3261 -3333
- package/dist/layout-DzPx9mR5-CHbk03j2.js +1438 -0
- package/dist/{linear-Bkwca0xU-DC0DlB3Q.js → linear-h6L3lVRp-DOzK9CUG.js} +1 -1
- package/dist/mermaid-parser.core-DtLRLmJt-Bs8fzU82.js +18375 -0
- package/dist/min-hEQogXjh-DyJPZJjb.js +38 -0
- package/dist/mindmap-definition-QFDTVHPH-DtiyxxYL-DUl1WEb7.js +836 -0
- package/dist/packet-4T2RLAQJ-Di7zpGDk-UtQRvAVW.js +6 -0
- package/dist/pie-ZZUOXDRM-CXos-t2G-BFyC-RaB.js +6 -0
- package/dist/pieDiagram-DEJITSTG-D7gBkRMg-BBSz-kJB.js +164 -0
- package/dist/{quadrantDiagram-YPSRARAO-BQtyf3HP-D7rZGp1l.js → quadrantDiagram-34T5L4WZ-Cfwapd1Q-CS_lKY3k.js} +16 -16
- package/dist/radar-PYXPWWZC-D0dHj_5J-DO49D32P.js +6 -0
- package/dist/{requirementDiagram-EGVEC5DT-CnnVFZwh-D9sZFwwg.js → requirementDiagram-MS252O5E-Bimzbn3B-B-e5vK9F.js} +199 -167
- package/dist/{sankeyDiagram-HRAUVNP4-DnGkLEvt-DIAbJDNn.js → sankeyDiagram-XADWPNL6-B8rOSxDr-uYyl_iJz.js} +13 -13
- package/dist/sequenceDiagram-FGHM5R23-z1blPVFc-DxkfwOOg.js +2893 -0
- package/dist/stateDiagram-FHFEXIEX-Dvj2dUvd-CEjEPSzp.js +263 -0
- package/dist/{stateDiagram-v2-EYPG3UTE-CkraIkNs-DLA1w3a5.js → stateDiagram-v2-QKLJ7IA2-CEq8bJSN-BmK4dbQp.js} +2 -2
- package/dist/timeline-definition-GMOUNBTQ-CFbR3HDt-Dajv0gse.js +1066 -0
- package/dist/treeView-SZITEDCU-ZiyDRNdY-FcohlUhB.js +6 -0
- package/dist/treemap-W4RFUUIX-D-tfszYV-CkdYg79W.js +6 -0
- package/dist/vennDiagram-DHZGUBPP-DDPnvwIl-DLef8GZ-.js +1564 -0
- package/dist/wardley-RL74JXVD-CzW2PcVh-Bl64UM-9.js +6 -0
- package/dist/wardleyDiagram-NUSXRM2D-G2F05w5q-Dgb8afBt.js +603 -0
- package/dist/{xychartDiagram-FDP5SA34-C0od7xbm-JkA2XwsO.js → xychartDiagram-5P7HB3ND-DcvqnhIW-CQekuj1q.js} +286 -284
- package/package.json +2 -2
- package/dist/_basePickBy-By9oZA6R-C9Q3wZgc.js +0 -151
- package/dist/_baseUniq-aulxCrZg-DpgqVftQ.js +0 -614
- package/dist/architecture-U656AL7Q-D7FlR8mQ-CcoM0xmP.js +0 -6
- package/dist/architectureDiagram-KFL7JDKH-D2wQyXF3-DUIfKyBT.js +0 -4665
- package/dist/blockDiagram-ZYB65J3Q-BVrJ6Sru-CTSsbOHf.js +0 -2265
- package/dist/chunk-OMD6QJNC-Dw01cgI4-BX05x0MM.js +0 -64
- package/dist/diagram-4IRLE6MV-DhfS8dHC-BHYGYZis.js +0 -533
- package/dist/erDiagram-HZWUO2LU-DRB4Mbtv-CgU99FCL.js +0 -840
- package/dist/flowDiagram-THRYKUMA-Cca2217c-CyDxFUag.js +0 -1627
- package/dist/ganttDiagram-WV7ZQ7D5-T3W_JgZV-PlELdFB9.js +0 -2504
- package/dist/gitGraph-F6HP7TQM-CF97nS_M-Cds3-fO4.js +0 -6
- package/dist/gitGraphDiagram-OJR772UL-DxvQcvVZ-DsH5Tcqa.js +0 -712
- package/dist/graph-DM4yJZhA-Bbo6I0vd.js +0 -247
- package/dist/info-NVLQJR56-BIkzHNxa-PHtGLaWD.js +0 -6
- package/dist/infoDiagram-6WOFNB3A-rRqd7shu-DmCUCKD0.js +0 -24
- package/dist/journeyDiagram-FFXJYRFH-C9rjRycy-44BCKp7p.js +0 -834
- package/dist/layout-CDChcvw3-C4cdx174.js +0 -1321
- package/dist/mermaid-parser.core-DRkTy7co-D3k_lOFL.js +0 -12890
- package/dist/mindmap-definition-LNHGMQRG-Dzyqm5dG-BSHIrtY4.js +0 -3231
- package/dist/packet-BFZMPI3H-D2ECyuNX-BrLUxNwr.js +0 -6
- package/dist/pie-7BOR55EZ-DZrUX33b-DTRam8Zi.js +0 -6
- package/dist/pieDiagram-DBDJKBY4-Pbq0hYNc-BY63OUmy.js +0 -161
- package/dist/radar-NHE76QYJ-DRHdhW6w-DS2_BWvC.js +0 -6
- package/dist/sequenceDiagram-WFGC7UMF-ChsW9bN4-D52efQBS.js +0 -2283
- package/dist/stateDiagram-UUKSUZ4H-Cbf4sKeS-CW-kRLpc.js +0 -263
- package/dist/timeline-definition-3HZDQTIS-zCLLmQCc-B-r1pMne.js +0 -799
- package/dist/treemap-KMMF4GRG-BWdglwua-CKei-6bJ.js +0 -6
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { _ as a, l as s, aU as o, ab as i } from "./index-Bh-wTBlD.js";
|
|
2
|
+
import { M as d } from "./mermaid-parser.core-DtLRLmJt-Bs8fzU82.js";
|
|
3
|
+
var g = {
|
|
4
|
+
parse: /* @__PURE__ */ a(async (e) => {
|
|
5
|
+
const r = await d("info", e);
|
|
6
|
+
s.debug(r);
|
|
7
|
+
}, "parse")
|
|
8
|
+
}, p = {
|
|
9
|
+
version: "11.14.0"
|
|
10
|
+
}, m = /* @__PURE__ */ a(() => p.version, "getVersion"), c = {
|
|
11
|
+
getVersion: m
|
|
12
|
+
}, l = /* @__PURE__ */ a((e, r, n) => {
|
|
13
|
+
s.debug(`rendering info diagram
|
|
14
|
+
` + e);
|
|
15
|
+
const t = o(r);
|
|
16
|
+
i(t, 100, 400, !0), t.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${n}`);
|
|
17
|
+
}, "draw"), v = { draw: l }, b = {
|
|
18
|
+
parser: g,
|
|
19
|
+
db: c,
|
|
20
|
+
renderer: v
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
b as diagram
|
|
24
|
+
};
|
|
@@ -0,0 +1,622 @@
|
|
|
1
|
+
import { _ as h, g as ht, aV as ct, aU as ut, bB as yt, av as dt, ah as pt, ao as et, a9 as gt, aa as ft, a8 as kt, a7 as mt, ap as wt, ab as xt } from "./index-Bh-wTBlD.js";
|
|
2
|
+
var V = function() {
|
|
3
|
+
var e = /* @__PURE__ */ h(function(_, t, s, y) {
|
|
4
|
+
for (s = s || {}, y = _.length; y--; s[_[y]] = t) ;
|
|
5
|
+
return s;
|
|
6
|
+
}, "o"), c = [1, 4], n = [1, 14], a = [1, 12], r = [1, 13], u = [6, 7, 8], d = [1, 20], o = [1, 18], g = [1, 19], p = [6, 7, 11], x = [1, 6, 13, 14], m = [1, 23], b = [1, 24], w = [1, 6, 7, 11, 13, 14], D = {
|
|
7
|
+
trace: /* @__PURE__ */ h(function() {
|
|
8
|
+
}, "trace"),
|
|
9
|
+
yy: {},
|
|
10
|
+
symbols_: { error: 2, start: 3, ishikawa: 4, spaceLines: 5, SPACELINE: 6, NL: 7, ISHIKAWA: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, TEXT: 14, $accept: 0, $end: 1 },
|
|
11
|
+
terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "ISHIKAWA", 11: "EOF", 13: "SPACELIST", 14: "TEXT" },
|
|
12
|
+
productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 1], [12, 1], [12, 1]],
|
|
13
|
+
performAction: /* @__PURE__ */ h(function(_, t, s, y, l, i, f) {
|
|
14
|
+
var v = i.length - 1;
|
|
15
|
+
switch (l) {
|
|
16
|
+
case 6:
|
|
17
|
+
case 7:
|
|
18
|
+
return y;
|
|
19
|
+
case 15:
|
|
20
|
+
y.addNode(i[v - 1].length, i[v].trim());
|
|
21
|
+
break;
|
|
22
|
+
case 16:
|
|
23
|
+
y.addNode(0, i[v].trim());
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
}, "anonymous"),
|
|
27
|
+
table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: c }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: c }, { 6: n, 7: [1, 10], 9: 9, 12: 11, 13: a, 14: r }, e(u, [2, 3]), { 1: [2, 2] }, e(u, [2, 4]), e(u, [2, 5]), { 1: [2, 6], 6: n, 12: 15, 13: a, 14: r }, { 6: n, 9: 16, 12: 11, 13: a, 14: r }, { 6: d, 7: o, 10: 17, 11: g }, e(p, [2, 18], { 14: [1, 21] }), e(p, [2, 16]), e(p, [2, 17]), { 6: d, 7: o, 10: 22, 11: g }, { 1: [2, 7], 6: n, 12: 15, 13: a, 14: r }, e(x, [2, 14], { 7: m, 11: b }), e(w, [2, 8]), e(w, [2, 9]), e(w, [2, 10]), e(p, [2, 15]), e(x, [2, 13], { 7: m, 11: b }), e(w, [2, 11]), e(w, [2, 12])],
|
|
28
|
+
defaultActions: { 2: [2, 1], 6: [2, 2] },
|
|
29
|
+
parseError: /* @__PURE__ */ h(function(_, t) {
|
|
30
|
+
if (t.recoverable)
|
|
31
|
+
this.trace(_);
|
|
32
|
+
else {
|
|
33
|
+
var s = new Error(_);
|
|
34
|
+
throw s.hash = t, s;
|
|
35
|
+
}
|
|
36
|
+
}, "parseError"),
|
|
37
|
+
parse: /* @__PURE__ */ h(function(_) {
|
|
38
|
+
var t = this, s = [0], y = [], l = [null], i = [], f = this.table, v = "", S = 0, T = 0, $ = 2, L = 1, I = i.slice.call(arguments, 1), k = Object.create(this.lexer), N = { yy: {} };
|
|
39
|
+
for (var G in this.yy)
|
|
40
|
+
Object.prototype.hasOwnProperty.call(this.yy, G) && (N.yy[G] = this.yy[G]);
|
|
41
|
+
k.setInput(_, N.yy), N.yy.lexer = k, N.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
|
|
42
|
+
var C = k.yylloc;
|
|
43
|
+
i.push(C);
|
|
44
|
+
var O = k.options && k.options.ranges;
|
|
45
|
+
typeof N.yy.parseError == "function" ? this.parseError = N.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
46
|
+
function z(M) {
|
|
47
|
+
s.length = s.length - 2 * M, l.length = l.length - M, i.length = i.length - M;
|
|
48
|
+
}
|
|
49
|
+
h(z, "popStack");
|
|
50
|
+
function F() {
|
|
51
|
+
var M;
|
|
52
|
+
return M = y.pop() || k.lex() || L, typeof M != "number" && (M instanceof Array && (y = M, M = y.pop()), M = t.symbols_[M] || M), M;
|
|
53
|
+
}
|
|
54
|
+
h(F, "lex");
|
|
55
|
+
for (var E, P, B, X, U = {}, q, R, tt, J; ; ) {
|
|
56
|
+
if (P = s[s.length - 1], this.defaultActions[P] ? B = this.defaultActions[P] : ((E === null || typeof E > "u") && (E = F()), B = f[P] && f[P][E]), typeof B > "u" || !B.length || !B[0]) {
|
|
57
|
+
var H = "";
|
|
58
|
+
J = [];
|
|
59
|
+
for (q in f[P])
|
|
60
|
+
this.terminals_[q] && q > $ && J.push("'" + this.terminals_[q] + "'");
|
|
61
|
+
k.showPosition ? H = "Parse error on line " + (S + 1) + `:
|
|
62
|
+
` + k.showPosition() + `
|
|
63
|
+
Expecting ` + J.join(", ") + ", got '" + (this.terminals_[E] || E) + "'" : H = "Parse error on line " + (S + 1) + ": Unexpected " + (E == L ? "end of input" : "'" + (this.terminals_[E] || E) + "'"), this.parseError(H, {
|
|
64
|
+
text: k.match,
|
|
65
|
+
token: this.terminals_[E] || E,
|
|
66
|
+
line: k.yylineno,
|
|
67
|
+
loc: C,
|
|
68
|
+
expected: J
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (B[0] instanceof Array && B.length > 1)
|
|
72
|
+
throw new Error("Parse Error: multiple actions possible at state: " + P + ", token: " + E);
|
|
73
|
+
switch (B[0]) {
|
|
74
|
+
case 1:
|
|
75
|
+
s.push(E), l.push(k.yytext), i.push(k.yylloc), s.push(B[1]), E = null, T = k.yyleng, v = k.yytext, S = k.yylineno, C = k.yylloc;
|
|
76
|
+
break;
|
|
77
|
+
case 2:
|
|
78
|
+
if (R = this.productions_[B[1]][1], U.$ = l[l.length - R], U._$ = {
|
|
79
|
+
first_line: i[i.length - (R || 1)].first_line,
|
|
80
|
+
last_line: i[i.length - 1].last_line,
|
|
81
|
+
first_column: i[i.length - (R || 1)].first_column,
|
|
82
|
+
last_column: i[i.length - 1].last_column
|
|
83
|
+
}, O && (U._$.range = [
|
|
84
|
+
i[i.length - (R || 1)].range[0],
|
|
85
|
+
i[i.length - 1].range[1]
|
|
86
|
+
]), X = this.performAction.apply(U, [
|
|
87
|
+
v,
|
|
88
|
+
T,
|
|
89
|
+
S,
|
|
90
|
+
N.yy,
|
|
91
|
+
B[1],
|
|
92
|
+
l,
|
|
93
|
+
i
|
|
94
|
+
].concat(I)), typeof X < "u")
|
|
95
|
+
return X;
|
|
96
|
+
R && (s = s.slice(0, -1 * R * 2), l = l.slice(0, -1 * R), i = i.slice(0, -1 * R)), s.push(this.productions_[B[1]][0]), l.push(U.$), i.push(U._$), tt = f[s[s.length - 2]][s[s.length - 1]], s.push(tt);
|
|
97
|
+
break;
|
|
98
|
+
case 3:
|
|
99
|
+
return !0;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return !0;
|
|
103
|
+
}, "parse")
|
|
104
|
+
}, j = /* @__PURE__ */ function() {
|
|
105
|
+
var _ = {
|
|
106
|
+
EOF: 1,
|
|
107
|
+
parseError: /* @__PURE__ */ h(function(t, s) {
|
|
108
|
+
if (this.yy.parser)
|
|
109
|
+
this.yy.parser.parseError(t, s);
|
|
110
|
+
else
|
|
111
|
+
throw new Error(t);
|
|
112
|
+
}, "parseError"),
|
|
113
|
+
// resets the lexer, sets new input
|
|
114
|
+
setInput: /* @__PURE__ */ h(function(t, s) {
|
|
115
|
+
return this.yy = s || this.yy || {}, this._input = t, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
116
|
+
first_line: 1,
|
|
117
|
+
first_column: 0,
|
|
118
|
+
last_line: 1,
|
|
119
|
+
last_column: 0
|
|
120
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
121
|
+
}, "setInput"),
|
|
122
|
+
// consumes and returns one char from the input
|
|
123
|
+
input: /* @__PURE__ */ h(function() {
|
|
124
|
+
var t = this._input[0];
|
|
125
|
+
this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t;
|
|
126
|
+
var s = t.match(/(?:\r\n?|\n).*/g);
|
|
127
|
+
return s ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t;
|
|
128
|
+
}, "input"),
|
|
129
|
+
// unshifts one char (or a string) into the input
|
|
130
|
+
unput: /* @__PURE__ */ h(function(t) {
|
|
131
|
+
var s = t.length, y = t.split(/(?:\r\n?|\n)/g);
|
|
132
|
+
this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - s), this.offset -= s;
|
|
133
|
+
var l = this.match.split(/(?:\r\n?|\n)/g);
|
|
134
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), y.length - 1 && (this.yylineno -= y.length - 1);
|
|
135
|
+
var i = this.yylloc.range;
|
|
136
|
+
return this.yylloc = {
|
|
137
|
+
first_line: this.yylloc.first_line,
|
|
138
|
+
last_line: this.yylineno + 1,
|
|
139
|
+
first_column: this.yylloc.first_column,
|
|
140
|
+
last_column: y ? (y.length === l.length ? this.yylloc.first_column : 0) + l[l.length - y.length].length - y[0].length : this.yylloc.first_column - s
|
|
141
|
+
}, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - s]), this.yyleng = this.yytext.length, this;
|
|
142
|
+
}, "unput"),
|
|
143
|
+
// When called from action, caches matched text and appends it on next action
|
|
144
|
+
more: /* @__PURE__ */ h(function() {
|
|
145
|
+
return this._more = !0, this;
|
|
146
|
+
}, "more"),
|
|
147
|
+
// 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.
|
|
148
|
+
reject: /* @__PURE__ */ h(function() {
|
|
149
|
+
if (this.options.backtrack_lexer)
|
|
150
|
+
this._backtrack = !0;
|
|
151
|
+
else
|
|
152
|
+
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).
|
|
153
|
+
` + this.showPosition(), {
|
|
154
|
+
text: "",
|
|
155
|
+
token: null,
|
|
156
|
+
line: this.yylineno
|
|
157
|
+
});
|
|
158
|
+
return this;
|
|
159
|
+
}, "reject"),
|
|
160
|
+
// retain first n characters of the match
|
|
161
|
+
less: /* @__PURE__ */ h(function(t) {
|
|
162
|
+
this.unput(this.match.slice(t));
|
|
163
|
+
}, "less"),
|
|
164
|
+
// displays already matched input, i.e. for error messages
|
|
165
|
+
pastInput: /* @__PURE__ */ h(function() {
|
|
166
|
+
var t = this.matched.substr(0, this.matched.length - this.match.length);
|
|
167
|
+
return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
|
|
168
|
+
}, "pastInput"),
|
|
169
|
+
// displays upcoming input, i.e. for error messages
|
|
170
|
+
upcomingInput: /* @__PURE__ */ h(function() {
|
|
171
|
+
var t = this.match;
|
|
172
|
+
return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
173
|
+
}, "upcomingInput"),
|
|
174
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
175
|
+
showPosition: /* @__PURE__ */ h(function() {
|
|
176
|
+
var t = this.pastInput(), s = new Array(t.length + 1).join("-");
|
|
177
|
+
return t + this.upcomingInput() + `
|
|
178
|
+
` + s + "^";
|
|
179
|
+
}, "showPosition"),
|
|
180
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
181
|
+
test_match: /* @__PURE__ */ h(function(t, s) {
|
|
182
|
+
var y, l, i;
|
|
183
|
+
if (this.options.backtrack_lexer && (i = {
|
|
184
|
+
yylineno: this.yylineno,
|
|
185
|
+
yylloc: {
|
|
186
|
+
first_line: this.yylloc.first_line,
|
|
187
|
+
last_line: this.last_line,
|
|
188
|
+
first_column: this.yylloc.first_column,
|
|
189
|
+
last_column: this.yylloc.last_column
|
|
190
|
+
},
|
|
191
|
+
yytext: this.yytext,
|
|
192
|
+
match: this.match,
|
|
193
|
+
matches: this.matches,
|
|
194
|
+
matched: this.matched,
|
|
195
|
+
yyleng: this.yyleng,
|
|
196
|
+
offset: this.offset,
|
|
197
|
+
_more: this._more,
|
|
198
|
+
_input: this._input,
|
|
199
|
+
yy: this.yy,
|
|
200
|
+
conditionStack: this.conditionStack.slice(0),
|
|
201
|
+
done: this.done
|
|
202
|
+
}, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), l = t[0].match(/(?:\r\n?|\n).*/g), l && (this.yylineno += l.length), this.yylloc = {
|
|
203
|
+
first_line: this.yylloc.last_line,
|
|
204
|
+
last_line: this.yylineno + 1,
|
|
205
|
+
first_column: this.yylloc.last_column,
|
|
206
|
+
last_column: l ? l[l.length - 1].length - l[l.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length
|
|
207
|
+
}, this.yytext += t[0], this.match += t[0], this.matches = t, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(t[0].length), this.matched += t[0], y = this.performAction.call(this, this.yy, this, s, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), y)
|
|
208
|
+
return y;
|
|
209
|
+
if (this._backtrack) {
|
|
210
|
+
for (var f in i)
|
|
211
|
+
this[f] = i[f];
|
|
212
|
+
return !1;
|
|
213
|
+
}
|
|
214
|
+
return !1;
|
|
215
|
+
}, "test_match"),
|
|
216
|
+
// return next match in input
|
|
217
|
+
next: /* @__PURE__ */ h(function() {
|
|
218
|
+
if (this.done)
|
|
219
|
+
return this.EOF;
|
|
220
|
+
this._input || (this.done = !0);
|
|
221
|
+
var t, s, y, l;
|
|
222
|
+
this._more || (this.yytext = "", this.match = "");
|
|
223
|
+
for (var i = this._currentRules(), f = 0; f < i.length; f++)
|
|
224
|
+
if (y = this._input.match(this.rules[i[f]]), y && (!s || y[0].length > s[0].length)) {
|
|
225
|
+
if (s = y, l = f, this.options.backtrack_lexer) {
|
|
226
|
+
if (t = this.test_match(y, i[f]), t !== !1)
|
|
227
|
+
return t;
|
|
228
|
+
if (this._backtrack) {
|
|
229
|
+
s = !1;
|
|
230
|
+
continue;
|
|
231
|
+
} else
|
|
232
|
+
return !1;
|
|
233
|
+
} else if (!this.options.flex)
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
return s ? (t = this.test_match(s, i[l]), t !== !1 ? t : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
237
|
+
` + this.showPosition(), {
|
|
238
|
+
text: "",
|
|
239
|
+
token: null,
|
|
240
|
+
line: this.yylineno
|
|
241
|
+
});
|
|
242
|
+
}, "next"),
|
|
243
|
+
// return next match that has a token
|
|
244
|
+
lex: /* @__PURE__ */ h(function() {
|
|
245
|
+
var t = this.next();
|
|
246
|
+
return t || this.lex();
|
|
247
|
+
}, "lex"),
|
|
248
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
249
|
+
begin: /* @__PURE__ */ h(function(t) {
|
|
250
|
+
this.conditionStack.push(t);
|
|
251
|
+
}, "begin"),
|
|
252
|
+
// pop the previously active lexer condition state off the condition stack
|
|
253
|
+
popState: /* @__PURE__ */ h(function() {
|
|
254
|
+
var t = this.conditionStack.length - 1;
|
|
255
|
+
return t > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
256
|
+
}, "popState"),
|
|
257
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
258
|
+
_currentRules: /* @__PURE__ */ h(function() {
|
|
259
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
260
|
+
}, "_currentRules"),
|
|
261
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
262
|
+
topState: /* @__PURE__ */ h(function(t) {
|
|
263
|
+
return t = this.conditionStack.length - 1 - Math.abs(t || 0), t >= 0 ? this.conditionStack[t] : "INITIAL";
|
|
264
|
+
}, "topState"),
|
|
265
|
+
// alias for begin(condition)
|
|
266
|
+
pushState: /* @__PURE__ */ h(function(t) {
|
|
267
|
+
this.begin(t);
|
|
268
|
+
}, "pushState"),
|
|
269
|
+
// return the number of states currently on the stack
|
|
270
|
+
stateStackSize: /* @__PURE__ */ h(function() {
|
|
271
|
+
return this.conditionStack.length;
|
|
272
|
+
}, "stateStackSize"),
|
|
273
|
+
options: { "case-insensitive": !0 },
|
|
274
|
+
performAction: /* @__PURE__ */ h(function(t, s, y, l) {
|
|
275
|
+
switch (y) {
|
|
276
|
+
case 0:
|
|
277
|
+
return 6;
|
|
278
|
+
case 1:
|
|
279
|
+
return 8;
|
|
280
|
+
case 2:
|
|
281
|
+
return 8;
|
|
282
|
+
case 3:
|
|
283
|
+
return 6;
|
|
284
|
+
case 4:
|
|
285
|
+
return 7;
|
|
286
|
+
case 5:
|
|
287
|
+
return 13;
|
|
288
|
+
case 6:
|
|
289
|
+
return 14;
|
|
290
|
+
case 7:
|
|
291
|
+
return 11;
|
|
292
|
+
}
|
|
293
|
+
}, "anonymous"),
|
|
294
|
+
rules: [/^(?:\s*%%.*)/i, /^(?:ishikawa-beta\b)/i, /^(?:ishikawa\b)/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:[^\n]+)/i, /^(?:$)/i],
|
|
295
|
+
conditions: { INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7], inclusive: !0 } }
|
|
296
|
+
};
|
|
297
|
+
return _;
|
|
298
|
+
}();
|
|
299
|
+
D.lexer = j;
|
|
300
|
+
function A() {
|
|
301
|
+
this.yy = {};
|
|
302
|
+
}
|
|
303
|
+
return h(A, "Parser"), A.prototype = D, D.Parser = A, new A();
|
|
304
|
+
}();
|
|
305
|
+
V.parser = V;
|
|
306
|
+
var _t = V, Q, bt = (Q = class {
|
|
307
|
+
constructor() {
|
|
308
|
+
this.stack = [], this.clear = this.clear.bind(this), this.addNode = this.addNode.bind(this), this.getRoot = this.getRoot.bind(this);
|
|
309
|
+
}
|
|
310
|
+
clear() {
|
|
311
|
+
this.root = void 0, this.stack = [], this.baseLevel = void 0, dt();
|
|
312
|
+
}
|
|
313
|
+
getRoot() {
|
|
314
|
+
return this.root;
|
|
315
|
+
}
|
|
316
|
+
addNode(e, c) {
|
|
317
|
+
const n = pt.sanitizeText(c, ht());
|
|
318
|
+
if (!this.root) {
|
|
319
|
+
this.root = { text: n, children: [] }, this.stack = [{ level: 0, node: this.root }], et(n);
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
this.baseLevel ?? (this.baseLevel = e);
|
|
323
|
+
let a = e - this.baseLevel + 1;
|
|
324
|
+
for (a <= 0 && (a = 1); this.stack.length > 1 && this.stack[this.stack.length - 1].level >= a; )
|
|
325
|
+
this.stack.pop();
|
|
326
|
+
const r = this.stack[this.stack.length - 1].node, u = { text: n, children: [] };
|
|
327
|
+
r.children.push(u), this.stack.push({ level: a, node: u });
|
|
328
|
+
}
|
|
329
|
+
getAccTitle() {
|
|
330
|
+
return gt();
|
|
331
|
+
}
|
|
332
|
+
setAccTitle(e) {
|
|
333
|
+
ft(e);
|
|
334
|
+
}
|
|
335
|
+
getAccDescription() {
|
|
336
|
+
return kt();
|
|
337
|
+
}
|
|
338
|
+
setAccDescription(e) {
|
|
339
|
+
mt(e);
|
|
340
|
+
}
|
|
341
|
+
getDiagramTitle() {
|
|
342
|
+
return wt();
|
|
343
|
+
}
|
|
344
|
+
setDiagramTitle(e) {
|
|
345
|
+
et(e);
|
|
346
|
+
}
|
|
347
|
+
}, h(Q, "IshikawaDB"), Q), vt = 14, W = 250, St = 30, $t = 60, It = 5, lt = 82 * Math.PI / 180, it = Math.cos(lt), st = Math.sin(lt), nt = /* @__PURE__ */ h((e, c, n) => {
|
|
348
|
+
const a = e.node().getBBox(), r = a.width + c * 2, u = a.height + c * 2;
|
|
349
|
+
xt(e, u, r, n), e.attr("viewBox", `${a.x - c} ${a.y - c} ${r} ${u}`);
|
|
350
|
+
}, "applyPaddedViewBox"), Et = /* @__PURE__ */ h((e, c, n, a) => {
|
|
351
|
+
var r, u;
|
|
352
|
+
const d = a.db.getRoot();
|
|
353
|
+
if (!d)
|
|
354
|
+
return;
|
|
355
|
+
const o = ht(), { look: g, handDrawnSeed: p, themeVariables: x } = o, m = ct(o.fontSize)[0] ?? vt, b = g === "handDrawn", w = d.children ?? [], D = ((r = o.ishikawa) == null ? void 0 : r.diagramPadding) ?? 20, j = ((u = o.ishikawa) == null ? void 0 : u.useMaxWidth) ?? !1, A = ut(c), _ = A.append("g").attr("class", "ishikawa"), t = b ? yt.svg(A.node()) : void 0, s = t ? {
|
|
356
|
+
roughSvg: t,
|
|
357
|
+
seed: p ?? 0,
|
|
358
|
+
lineColor: (x == null ? void 0 : x.lineColor) ?? "#333",
|
|
359
|
+
fillColor: (x == null ? void 0 : x.mainBkg) ?? "#fff"
|
|
360
|
+
} : void 0, y = `ishikawa-arrow-${c}`;
|
|
361
|
+
b || _.append("defs").append("marker").attr("id", y).attr("viewBox", "0 0 10 10").attr("refX", 0).attr("refY", 5).attr("markerWidth", 6).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 Z").attr("class", "ishikawa-arrow");
|
|
362
|
+
let l = 0, i = W;
|
|
363
|
+
const f = b ? void 0 : Z(_, l, i, l, i, "ishikawa-spine");
|
|
364
|
+
if (Ct(_, l, i, d.text, m, s), !w.length) {
|
|
365
|
+
b && Z(_, l, i, l, i, "ishikawa-spine", s), nt(A, D, j);
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
l -= 20;
|
|
369
|
+
const v = w.filter((C, O) => O % 2 === 0), S = w.filter((C, O) => O % 2 === 1), T = at(v), $ = at(S), L = T.total + $.total;
|
|
370
|
+
let I = W, k = W;
|
|
371
|
+
if (L > 0) {
|
|
372
|
+
const C = W * 2, O = W * 0.3;
|
|
373
|
+
I = Math.max(O, C * (T.total / L)), k = Math.max(O, C * ($.total / L));
|
|
374
|
+
}
|
|
375
|
+
const N = m * 2;
|
|
376
|
+
I = Math.max(I, T.max * N), k = Math.max(k, $.max * N), i = Math.max(I, W), f && f.attr("y1", i).attr("y2", i), _.select(".ishikawa-head-group").attr("transform", `translate(0,${i})`);
|
|
377
|
+
const G = Math.ceil(w.length / 2);
|
|
378
|
+
for (let C = 0; C < G; C++) {
|
|
379
|
+
const O = _.append("g").attr("class", "ishikawa-pair");
|
|
380
|
+
for (const [z, F, E] of [
|
|
381
|
+
[w[C * 2], -1, I],
|
|
382
|
+
[w[C * 2 + 1], 1, k]
|
|
383
|
+
])
|
|
384
|
+
z && Mt(O, z, l, i, F, E, m, s);
|
|
385
|
+
l = O.selectAll("text").nodes().reduce((z, F) => Math.min(z, F.getBBox().x), 1 / 0);
|
|
386
|
+
}
|
|
387
|
+
if (b)
|
|
388
|
+
Z(_, l, i, 0, i, "ishikawa-spine", s);
|
|
389
|
+
else {
|
|
390
|
+
f.attr("x1", l);
|
|
391
|
+
const C = `url(#${y})`;
|
|
392
|
+
_.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start", C);
|
|
393
|
+
}
|
|
394
|
+
nt(A, D, j);
|
|
395
|
+
}, "draw"), at = /* @__PURE__ */ h((e) => {
|
|
396
|
+
const c = /* @__PURE__ */ h((n) => n.children.reduce((a, r) => a + 1 + c(r), 0), "countDescendants");
|
|
397
|
+
return e.reduce(
|
|
398
|
+
(n, a) => {
|
|
399
|
+
const r = c(a);
|
|
400
|
+
return n.total += r, n.max = Math.max(n.max, r), n;
|
|
401
|
+
},
|
|
402
|
+
{ total: 0, max: 0 }
|
|
403
|
+
);
|
|
404
|
+
}, "sideStats"), Ct = /* @__PURE__ */ h((e, c, n, a, r, u) => {
|
|
405
|
+
const d = Math.max(6, Math.floor(110 / (r * 0.6))), o = e.append("g").attr("class", "ishikawa-head-group").attr("transform", `translate(${c},${n})`), g = K(
|
|
406
|
+
o,
|
|
407
|
+
ot(a, d),
|
|
408
|
+
0,
|
|
409
|
+
0,
|
|
410
|
+
"ishikawa-head-label",
|
|
411
|
+
"start",
|
|
412
|
+
r
|
|
413
|
+
), p = g.node().getBBox(), x = Math.max(60, p.width + 6), m = Math.max(40, p.height * 2 + 40), b = `M 0 ${-m / 2} L 0 ${m / 2} Q ${x * 2.4} 0 0 ${-m / 2} Z`;
|
|
414
|
+
if (u) {
|
|
415
|
+
const w = u.roughSvg.path(b, {
|
|
416
|
+
roughness: 1.5,
|
|
417
|
+
seed: u.seed,
|
|
418
|
+
fill: u.fillColor,
|
|
419
|
+
fillStyle: "hachure",
|
|
420
|
+
fillWeight: 2.5,
|
|
421
|
+
hachureGap: 5,
|
|
422
|
+
stroke: u.lineColor,
|
|
423
|
+
strokeWidth: 2
|
|
424
|
+
});
|
|
425
|
+
o.insert(() => w, ":first-child").attr("class", "ishikawa-head");
|
|
426
|
+
} else
|
|
427
|
+
o.insert("path", ":first-child").attr("class", "ishikawa-head").attr("d", b);
|
|
428
|
+
g.attr("transform", `translate(${(x - p.width) / 2 - p.x + 3},${-p.y - p.height / 2})`);
|
|
429
|
+
}, "drawHead"), Lt = /* @__PURE__ */ h((e, c) => {
|
|
430
|
+
const n = [], a = [], r = /* @__PURE__ */ h((u, d, o) => {
|
|
431
|
+
const g = c === -1 ? [...u].reverse() : u;
|
|
432
|
+
for (const p of g) {
|
|
433
|
+
const x = n.length, m = p.children ?? [];
|
|
434
|
+
n.push({
|
|
435
|
+
depth: o,
|
|
436
|
+
text: ot(p.text, 15),
|
|
437
|
+
parentIndex: d,
|
|
438
|
+
childCount: m.length
|
|
439
|
+
}), o % 2 === 0 ? (a.push(x), m.length && r(m, x, o + 1)) : (m.length && r(m, x, o + 1), a.push(x));
|
|
440
|
+
}
|
|
441
|
+
}, "walk");
|
|
442
|
+
return r(e, -1, 2), { entries: n, yOrder: a };
|
|
443
|
+
}, "flattenTree"), Tt = /* @__PURE__ */ h((e, c, n, a, r, u, d) => {
|
|
444
|
+
const o = e.append("g").attr("class", "ishikawa-label-group"), g = K(
|
|
445
|
+
o,
|
|
446
|
+
c,
|
|
447
|
+
n,
|
|
448
|
+
a + 11 * r,
|
|
449
|
+
"ishikawa-label cause",
|
|
450
|
+
"middle",
|
|
451
|
+
u
|
|
452
|
+
).node().getBBox();
|
|
453
|
+
if (d) {
|
|
454
|
+
const p = d.roughSvg.rectangle(
|
|
455
|
+
g.x - 20,
|
|
456
|
+
g.y - 2,
|
|
457
|
+
g.width + 40,
|
|
458
|
+
g.height + 4,
|
|
459
|
+
{
|
|
460
|
+
roughness: 1.5,
|
|
461
|
+
seed: d.seed,
|
|
462
|
+
fill: d.fillColor,
|
|
463
|
+
fillStyle: "hachure",
|
|
464
|
+
fillWeight: 2.5,
|
|
465
|
+
hachureGap: 5,
|
|
466
|
+
stroke: d.lineColor,
|
|
467
|
+
strokeWidth: 2
|
|
468
|
+
}
|
|
469
|
+
);
|
|
470
|
+
o.insert(() => p, ":first-child").attr("class", "ishikawa-label-box");
|
|
471
|
+
} else
|
|
472
|
+
o.insert("rect", ":first-child").attr("class", "ishikawa-label-box").attr("x", g.x - 20).attr("y", g.y - 2).attr("width", g.width + 40).attr("height", g.height + 4);
|
|
473
|
+
}, "drawCauseLabel"), Y = /* @__PURE__ */ h((e, c, n, a, r, u) => {
|
|
474
|
+
const d = Math.sqrt(a * a + r * r);
|
|
475
|
+
if (d === 0)
|
|
476
|
+
return;
|
|
477
|
+
const o = a / d, g = r / d, p = 6, x = -g * p, m = o * p, b = c, w = n, D = `M ${b} ${w} L ${b - o * p * 2 + x} ${w - g * p * 2 + m} L ${b - o * p * 2 - x} ${w - g * p * 2 - m} Z`, j = u.roughSvg.path(D, {
|
|
478
|
+
roughness: 1,
|
|
479
|
+
seed: u.seed,
|
|
480
|
+
fill: u.lineColor,
|
|
481
|
+
fillStyle: "solid",
|
|
482
|
+
stroke: u.lineColor,
|
|
483
|
+
strokeWidth: 1
|
|
484
|
+
});
|
|
485
|
+
e.append(() => j);
|
|
486
|
+
}, "drawArrowMarker"), Mt = /* @__PURE__ */ h((e, c, n, a, r, u, d, o) => {
|
|
487
|
+
const g = c.children ?? [], p = u * (g.length ? 1 : 0.2), x = -it * p, m = st * p * r, b = n + x, w = a + m;
|
|
488
|
+
if (Z(e, n, a, b, w, "ishikawa-branch", o), o && Y(e, n, a, n - b, a - w, o), Tt(e, c.text, b, w, r, d, o), !g.length)
|
|
489
|
+
return;
|
|
490
|
+
const { entries: D, yOrder: j } = Lt(g, r), A = D.length, _ = new Array(A);
|
|
491
|
+
for (const [i, f] of j.entries())
|
|
492
|
+
_[f] = a + m * ((i + 1) / (A + 1));
|
|
493
|
+
const t = /* @__PURE__ */ new Map();
|
|
494
|
+
t.set(-1, {
|
|
495
|
+
x0: n,
|
|
496
|
+
y0: a,
|
|
497
|
+
x1: b,
|
|
498
|
+
y1: w,
|
|
499
|
+
childCount: g.length,
|
|
500
|
+
childrenDrawn: 0
|
|
501
|
+
});
|
|
502
|
+
const s = -it, y = st * r, l = r < 0 ? "ishikawa-label up" : "ishikawa-label down";
|
|
503
|
+
for (const [i, f] of D.entries()) {
|
|
504
|
+
const v = _[i], S = t.get(f.parentIndex), T = e.append("g").attr("class", "ishikawa-sub-group");
|
|
505
|
+
let $ = 0, L = 0, I = 0;
|
|
506
|
+
if (f.depth % 2 === 0) {
|
|
507
|
+
const k = S.y1 - S.y0;
|
|
508
|
+
$ = rt(S.x0, S.x1, k ? (v - S.y0) / k : 0.5), L = v, I = $ - (f.childCount > 0 ? $t + f.childCount * It : St), Z(T, $, v, I, v, "ishikawa-sub-branch", o), o && Y(T, $, v, 1, 0, o), K(T, f.text, I, v, "ishikawa-label align", "end", d);
|
|
509
|
+
} else {
|
|
510
|
+
const k = S.childrenDrawn++;
|
|
511
|
+
$ = rt(S.x0, S.x1, (S.childCount - k) / (S.childCount + 1)), L = S.y0, I = $ + s * ((v - L) / y), Z(T, $, L, I, v, "ishikawa-sub-branch", o), o && Y(T, $, L, $ - I, L - v, o), K(T, f.text, I, v, l, "end", d);
|
|
512
|
+
}
|
|
513
|
+
f.childCount > 0 && t.set(i, {
|
|
514
|
+
x0: $,
|
|
515
|
+
y0: L,
|
|
516
|
+
x1: I,
|
|
517
|
+
y1: v,
|
|
518
|
+
childCount: f.childCount,
|
|
519
|
+
childrenDrawn: 0
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
}, "drawBranch"), At = /* @__PURE__ */ h((e) => e.split(/<br\s*\/?>|\n/), "splitLines"), ot = /* @__PURE__ */ h((e, c) => {
|
|
523
|
+
if (e.length <= c)
|
|
524
|
+
return e;
|
|
525
|
+
const n = [];
|
|
526
|
+
for (const a of e.split(/\s+/)) {
|
|
527
|
+
const r = n.length - 1;
|
|
528
|
+
r >= 0 && n[r].length + 1 + a.length <= c ? n[r] += " " + a : n.push(a);
|
|
529
|
+
}
|
|
530
|
+
return n.join(`
|
|
531
|
+
`);
|
|
532
|
+
}, "wrapText"), K = /* @__PURE__ */ h((e, c, n, a, r, u, d) => {
|
|
533
|
+
const o = At(c), g = d * 1.05, p = e.append("text").attr("class", r).attr("text-anchor", u).attr("x", n).attr("y", a - (o.length - 1) * g / 2);
|
|
534
|
+
for (const [x, m] of o.entries())
|
|
535
|
+
p.append("tspan").attr("x", n).attr("dy", x === 0 ? 0 : g).text(m);
|
|
536
|
+
return p;
|
|
537
|
+
}, "drawMultilineText"), rt = /* @__PURE__ */ h((e, c, n) => e + (c - e) * n, "lerp"), Z = /* @__PURE__ */ h((e, c, n, a, r, u, d) => {
|
|
538
|
+
if (d) {
|
|
539
|
+
const o = d.roughSvg.line(c, n, a, r, {
|
|
540
|
+
roughness: 1.5,
|
|
541
|
+
seed: d.seed,
|
|
542
|
+
stroke: d.lineColor,
|
|
543
|
+
strokeWidth: 2
|
|
544
|
+
});
|
|
545
|
+
e.append(() => o).attr("class", u);
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
return e.append("line").attr("class", u).attr("x1", c).attr("y1", n).attr("x2", a).attr("y2", r);
|
|
549
|
+
}, "drawLine"), Bt = { draw: Et }, Dt = /* @__PURE__ */ h((e) => `
|
|
550
|
+
.ishikawa .ishikawa-spine,
|
|
551
|
+
.ishikawa .ishikawa-branch,
|
|
552
|
+
.ishikawa .ishikawa-sub-branch {
|
|
553
|
+
stroke: ${e.lineColor};
|
|
554
|
+
stroke-width: 2;
|
|
555
|
+
fill: none;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.ishikawa .ishikawa-sub-branch {
|
|
559
|
+
stroke-width: 1;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.ishikawa .ishikawa-arrow {
|
|
563
|
+
fill: ${e.lineColor};
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.ishikawa .ishikawa-head {
|
|
567
|
+
fill: ${e.mainBkg};
|
|
568
|
+
stroke: ${e.lineColor};
|
|
569
|
+
stroke-width: 2;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.ishikawa .ishikawa-label-box {
|
|
573
|
+
fill: ${e.mainBkg};
|
|
574
|
+
stroke: ${e.lineColor};
|
|
575
|
+
stroke-width: 2;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.ishikawa text {
|
|
579
|
+
font-family: ${e.fontFamily};
|
|
580
|
+
font-size: ${e.fontSize};
|
|
581
|
+
fill: ${e.textColor};
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.ishikawa .ishikawa-head-label {
|
|
585
|
+
font-weight: 600;
|
|
586
|
+
text-anchor: middle;
|
|
587
|
+
dominant-baseline: middle;
|
|
588
|
+
font-size: 14px;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.ishikawa .ishikawa-label {
|
|
592
|
+
text-anchor: end;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.ishikawa .ishikawa-label.cause {
|
|
596
|
+
text-anchor: middle;
|
|
597
|
+
dominant-baseline: middle;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.ishikawa .ishikawa-label.align {
|
|
601
|
+
text-anchor: end;
|
|
602
|
+
dominant-baseline: middle;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.ishikawa .ishikawa-label.up {
|
|
606
|
+
dominant-baseline: baseline;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.ishikawa .ishikawa-label.down {
|
|
610
|
+
dominant-baseline: hanging;
|
|
611
|
+
}
|
|
612
|
+
`, "getStyles"), Ot = Dt, Rt = {
|
|
613
|
+
parser: _t,
|
|
614
|
+
get db() {
|
|
615
|
+
return new bt();
|
|
616
|
+
},
|
|
617
|
+
renderer: Bt,
|
|
618
|
+
styles: Ot
|
|
619
|
+
};
|
|
620
|
+
export {
|
|
621
|
+
Rt as diagram
|
|
622
|
+
};
|