@kong-ui-public/documentation 0.3.42 → 0.4.0
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/Tableau10-GLA_9iAD-BMurskAd.js +9 -0
- package/dist/arc-BSRpyMf3-C5dasNo_.js +86 -0
- package/dist/array-CqVTtuYm-fKLgkG2b.js +6 -0
- package/dist/astro-mwoSwJnq-CNh-xuM0.js +27 -0
- package/dist/blockDiagram-6b2b5046-D02VCbQO-CPmGy0xX.js +1224 -0
- package/dist/c-eDnjw9rh-eDnjw9rh.js +87 -0
- package/dist/c4Diagram-b947cdbb-gYcL5VzP-DIDY83e1.js +1578 -0
- package/dist/channel-DHTQ8Ynn-7OPGex2S.js +5 -0
- package/dist/classDiagram-35230388-JdSKLSZv-D2crBRy-.js +217 -0
- package/dist/classDiagram-v2-412acd34-DFFRHXE_-B6aCxlD1.js +200 -0
- package/dist/clone-p6h9XXNm-3JQ-HRC6.js +8 -0
- package/dist/coffee-CRlSxcc3-CY091_1T.js +108 -0
- package/dist/cpp-DizfY48B-CA38N4Mn.js +208 -0
- package/dist/createText-423428c9-LivTKT7b-BXNfjcdp.js +2964 -0
- package/dist/csharp-uGDiXTZn-uGDiXTZn.js +762 -0
- package/dist/css-CAzixsid-CEpuX1HY.js +511 -0
- package/dist/csv-D4BoHddH-D4BoHddH.js +7 -0
- package/dist/diff-Bo5iyMQ2-Bo5iyMQ2.js +7 -0
- package/dist/docker-B10O2enb-B10O2enb.js +7 -0
- package/dist/documentation.es.js +5 -3130
- package/dist/documentation.umd.js +10152 -50
- package/dist/edges-d417c7a0-C1ggiwWz-Aj0OUf7e.js +1082 -0
- package/dist/erDiagram-0ea73325-mz0Z_-DA-Dr01LsTB.js +924 -0
- package/dist/flowDb-d35e309a-CPyxEMIt-lofeyUuw.js +1126 -0
- package/dist/flowDiagram-d949d7c1-DqCa0HNN-BK5wNO9Z.js +782 -0
- package/dist/flowDiagram-v2-49332944-UMosz1sZ-BG39AuNP.js +17 -0
- package/dist/flowchart-elk-definition-27cc417a-D2UKpS6N-r2p34307.js +48387 -0
- package/dist/ganttDiagram-5c869e3b-CVBHw4pG-CaG9QXQM.js +2490 -0
- package/dist/git-commit-CWf81VOF-DtOZSoIU.js +9 -0
- package/dist/git-rebase-sR-yVH_J-D5M2oE9O.js +9 -0
- package/dist/gitGraphDiagram-b9d81de9-BGm3fU0n-CbCpf-4j.js +1262 -0
- package/dist/go-BCCWZWY1-BCCWZWY1.js +7 -0
- package/dist/graph-4FyIWFHN-774TpNLL.js +870 -0
- package/dist/graphql-CT32SSoq-1pBWfpcR.js +18 -0
- package/dist/haml-8RvrfhLO-Bbc4xoLP.js +19 -0
- package/dist/handlebars-Cr5ro0bH-CLcCNLtV.js +15 -0
- package/dist/haskell-BfFu8DD8-BmkPJdLL.js +565 -0
- package/dist/html-BZB5lEhh-B74zAnWx.js +84 -0
- package/dist/html-derivative-0y7sV5Qc-D8-muTWn.js +9 -0
- package/dist/index-8fae9850-_CN7MNjP-Cq-s0PmS.js +373 -0
- package/dist/index-B-5DuDrq.js +29996 -0
- package/dist/infoDiagram-db7b18fc-V446j9uR-GSa8bniv.js +319 -0
- package/dist/ini-BsUFIxsI-BsUFIxsI.js +7 -0
- package/dist/init-DjUOC4st-C8Nwz6AJ.js +16 -0
- package/dist/java-Bk2JzfKB-Bk2JzfKB.js +74 -0
- package/dist/javascript-DqVBMyXe-DqVBMyXe.js +705 -0
- package/dist/journeyDiagram-d5636530-CFiu7dnV-DJMu6A22.js +803 -0
- package/dist/json-B12k4-6m-B12k4-6m.js +31 -0
- package/dist/json5-CvqQZK9I-CvqQZK9I.js +23 -0
- package/dist/jsonc-v2qGKRJY-v2qGKRJY.js +31 -0
- package/dist/jsonl-izxnMeZX-izxnMeZX.js +31 -0
- package/dist/jsx-aDp7j9_Z-aDp7j9_Z.js +705 -0
- package/dist/kotlin-NOMOielb-NOMOielb.js +7 -0
- package/dist/latex-Bw_ghldO-BlUAi6pB.js +339 -0
- package/dist/layout-2-aEcfuw-BqqWy5wB.js +1524 -0
- package/dist/less-CW2GmQHL-CW2GmQHL.js +165 -0
- package/dist/line-nVq5kEiy-DtZd3PHZ.js +34 -0
- package/dist/linear-Bz4oRFvQ-C869GXbm.js +447 -0
- package/dist/liquid-DJ2rh7oT-FwZwa67Y.js +28 -0
- package/dist/lua-5TZ-G8Be-CogscVHC.js +9 -0
- package/dist/make-whncTQWE-whncTQWE.js +7 -0
- package/dist/markdown-DYKdIx5--DYKdIx5-.js +135 -0
- package/dist/material-theme-lighter-BRE1Bis3-BRE1Bis3.js +769 -0
- package/dist/material-theme-palenight-Dhz61Tee-Dhz61Tee.js +769 -0
- package/dist/mdc-D0DPLwil-BfE3hy8_.js +88 -0
- package/dist/mdx-CKDMxEaL-CKDMxEaL.js +7 -0
- package/dist/mermaid-BxNM-z-u-BxNM-z-u.js +7 -0
- package/dist/mindmap-definition-377f8f1f-C2vFYDMs-B71SGbvx.js +19078 -0
- package/dist/nginx-C082G13W-vryM9k1W.js +9 -0
- package/dist/objective-c-BVtzkNiv-BVtzkNiv.js +115 -0
- package/dist/onig-BonMD2gC-BonMD2gC.js +4 -0
- package/dist/ordinal-MUacOSdK-B1MUT0BL.js +65 -0
- package/dist/pascal-CrvtytWS-CrvtytWS.js +7 -0
- package/dist/path-Crsf9Nsj-SiSjwXsf.js +91 -0
- package/dist/perl-D29UPKP6-Dez6-HRy.js +17 -0
- package/dist/php-D7Tl-iS7-BtPFrDEt.js +789 -0
- package/dist/pieDiagram-b0208e96-DhA_SoTh-CfDd9YdA.js +501 -0
- package/dist/plsql-8SPzZKaa-8SPzZKaa.js +7 -0
- package/dist/postcss-Cz2vjx_4-Cz2vjx_4.js +7 -0
- package/dist/powershell-B0buHCuS-B0buHCuS.js +7 -0
- package/dist/proto-6YaU_lta-6YaU_lta.js +7 -0
- package/dist/pug-DbFO7359-duYD8LVa.js +21 -0
- package/dist/python-BQXev0_W-BQXev0_W.js +524 -0
- package/dist/quadrantDiagram-0332be45-C8q96Ohm-DMblaqnx.js +903 -0
- package/dist/r-DU7Q70f1-DU7Q70f1.js +7 -0
- package/dist/reg-DoGLEyFr-DoGLEyFr.js +7 -0
- package/dist/requirementDiagram-bf7890df-D30zCZjB-B_JBC9RM.js +767 -0
- package/dist/rst-Bm1i8IkK-C9EaDq6g.js +26 -0
- package/dist/ruby-CZZKXaz8-BxaDEkRP.js +102 -0
- package/dist/rust-CIl6NRUt-CIl6NRUt.js +7 -0
- package/dist/sankeyDiagram-0acdec17-B4vNjMaS-Bauvtonp.js +816 -0
- package/dist/sass-LqXmC1Fh-LqXmC1Fh.js +8 -0
- package/dist/scss-DjxgF7f7-DGTzny6p.js +98 -0
- package/dist/sequenceDiagram-c18d009d-BniqGSPK-DuYYUmiZ.js +2201 -0
- package/dist/shellscript-CUUTQKn5-CUUTQKn5.js +7 -0
- package/dist/shellsession-BIPXtZci-D6avbCwN.js +9 -0
- package/dist/splunk-C0K00wNV-C0K00wNV.js +7 -0
- package/dist/sql-DkzN59UV-DkzN59UV.js +27 -0
- package/dist/ssh-config-BbWAW6SY-BbWAW6SY.js +7 -0
- package/dist/stateDiagram-43596fc0-F0V9suMd-L2Ywe-J_.js +266 -0
- package/dist/stateDiagram-v2-2ead4f9c-DUgJH8tF-BVo1q2i1.js +184 -0
- package/dist/style.css +1 -1
- package/dist/styles-6860f46c-Dflmq0ac-BRNSwis6.js +1089 -0
- package/dist/styles-7383a064-Dg7mXkpq-C4bItohl.js +430 -0
- package/dist/styles-b2c874b6-HpcOhE4Y-Bj0upXzO.js +960 -0
- package/dist/stylus-CAHdVuhm-CAHdVuhm.js +21 -0
- package/dist/svelte-DAxjO8Sh-D0e501jC.js +29 -0
- package/dist/svgDrawCommon-0ee1b4e9-CNkCfzsJ-Bz_doYLk.js +64 -0
- package/dist/swift-x2DVyVjN-Bz5PC9YM.js +550 -0
- package/dist/timeline-definition-d977decf-Cl38e_0g-D_Dlqa-R.js +794 -0
- package/dist/toml-Dbtbfmwk-Dbtbfmwk.js +75 -0
- package/dist/tsx-BmwsDeeh-BmwsDeeh.js +705 -0
- package/dist/twig-B_Gr-ODl-Cl9Q0GWo.js +58 -0
- package/dist/types/components/DocumentationContent.vue.d.ts +8 -1
- package/dist/types/components/DocumentationContent.vue.d.ts.map +1 -1
- package/dist/types/components/DocumentationDisplay.vue.d.ts +5 -1
- package/dist/types/components/DocumentationDisplay.vue.d.ts.map +1 -1
- package/dist/types/components/ProductDocumentModal.vue.d.ts +1 -1
- package/dist/types/components/ProductDocumentModal.vue.d.ts.map +1 -1
- package/dist/types/composables/useI18n.d.ts +4 -0
- package/dist/types/composables/useI18n.d.ts.map +1 -1
- package/dist/typescript-AEg-ehu7-AEg-ehu7.js +672 -0
- package/dist/v-BuvBsUKm-BuvBsUKm.js +7 -0
- package/dist/vb-cqjo5dul-cqjo5dul.js +7 -0
- package/dist/viml-h3ATW6He-h3ATW6He.js +7 -0
- package/dist/vue-Dz-azHaT-B9qBHMZi.js +71 -0
- package/dist/vue-html-DIGKAAs4-BeHSIJcx.js +11 -0
- package/dist/wasm-xOGcJ9Ts-xOGcJ9Ts.js +7 -0
- package/dist/wgsl-hGLOfCya-hGLOfCya.js +7 -0
- package/dist/xml-CfRpfi_B-BH3JRQfc.js +9 -0
- package/dist/xsl-BAqhSCYL-BTKPZRNQ.js +9 -0
- package/dist/xychartDiagram-e50adddc-JdLmRUgg-HmDalTeo.js +1282 -0
- package/dist/yaml-PGla5xPP-HJurM_FJ.js +206 -0
- package/package.json +13 -13
- package/dist/prism-bash.min-DDo5CyRs-DihCfXgx.js +0 -7
- package/dist/prism-css.min-BrrzZC7b-BrrzZC7b.js +0 -7
- package/dist/prism-docker.min-DnIEokC3-D0v8IWN_.js +0 -22
- package/dist/prism-go.min-C7UmK6TW-C7UmK6TW.js +0 -1
- package/dist/prism-http.min-CsU3-jB8-CQ8PCDXl.js +0 -23
- package/dist/prism-javascript.min-CEqHqgbm-CEqHqgbm.js +0 -8
- package/dist/prism-jq.min-Q555vXZm-Q555vXZm.js +0 -8
- package/dist/prism-json.min-B1GJqK1k-B1GJqK1k.js +0 -1
- package/dist/prism-log.min-SDopTpKN-SDopTpKN.js +0 -1
- package/dist/prism-lua.min-DwRnUVfS-DwRnUVfS.js +0 -1
- package/dist/prism-makefile.min-DyutknhE-DyutknhE.js +0 -1
- package/dist/prism-markdown.min-B7US-xc7-DB9aF_ZA.js +0 -63
- package/dist/prism-python.min-BIfpAh5K-BIfpAh5K.js +0 -1
- package/dist/prism-regex.min-f8DNqi8X-f8DNqi8X.js +0 -4
- package/dist/prism-rest.min-B6veHRJF-B6veHRJF.js +0 -1
- package/dist/prism-rust.min-Cb-Mi-h0-Cb-Mi-h0.js +0 -9
- package/dist/prism-scss.min-B0csyGJo-B0csyGJo.js +0 -1
- package/dist/prism-sql.min-BHXzX-c_-BHXzX-c_.js +0 -1
- package/dist/prism-typescript.min-oSVeWCAd-oSVeWCAd.js +0 -5
- package/dist/prism-xml-doc.min-yj0YzRGe-KgTQx-dc.js +0 -7
- package/dist/prism-yaml.min-CTetcdKA-C1YzP_OY.js +0 -28
|
@@ -0,0 +1,816 @@
|
|
|
1
|
+
import { c as st, g as _t, s as mt, a as xt, b as kt, x as vt, v as bt, z as At, j as Et, u as wt, h as K, t as Lt } from "./index-B-5DuDrq.js";
|
|
2
|
+
import { h as St } from "./ordinal-MUacOSdK-B1MUT0BL.js";
|
|
3
|
+
import { r as Mt } from "./Tableau10-GLA_9iAD-BMurskAd.js";
|
|
4
|
+
function ot(t, e) {
|
|
5
|
+
let r;
|
|
6
|
+
if (e === void 0)
|
|
7
|
+
for (const c of t)
|
|
8
|
+
c != null && (r < c || r === void 0 && c >= c) && (r = c);
|
|
9
|
+
else {
|
|
10
|
+
let c = -1;
|
|
11
|
+
for (let a of t)
|
|
12
|
+
(a = e(a, ++c, t)) != null && (r < a || r === void 0 && a >= a) && (r = a);
|
|
13
|
+
}
|
|
14
|
+
return r;
|
|
15
|
+
}
|
|
16
|
+
function yt(t, e) {
|
|
17
|
+
let r;
|
|
18
|
+
if (e === void 0)
|
|
19
|
+
for (const c of t)
|
|
20
|
+
c != null && (r > c || r === void 0 && c >= c) && (r = c);
|
|
21
|
+
else {
|
|
22
|
+
let c = -1;
|
|
23
|
+
for (let a of t)
|
|
24
|
+
(a = e(a, ++c, t)) != null && (r > a || r === void 0 && a >= a) && (r = a);
|
|
25
|
+
}
|
|
26
|
+
return r;
|
|
27
|
+
}
|
|
28
|
+
function H(t, e) {
|
|
29
|
+
let r = 0;
|
|
30
|
+
if (e === void 0)
|
|
31
|
+
for (let c of t)
|
|
32
|
+
(c = +c) && (r += c);
|
|
33
|
+
else {
|
|
34
|
+
let c = -1;
|
|
35
|
+
for (let a of t)
|
|
36
|
+
(a = +e(a, ++c, t)) && (r += a);
|
|
37
|
+
}
|
|
38
|
+
return r;
|
|
39
|
+
}
|
|
40
|
+
function It(t) {
|
|
41
|
+
return t.target.depth;
|
|
42
|
+
}
|
|
43
|
+
function Dt(t) {
|
|
44
|
+
return t.depth;
|
|
45
|
+
}
|
|
46
|
+
function Ct(t, e) {
|
|
47
|
+
return e - 1 - t.height;
|
|
48
|
+
}
|
|
49
|
+
function gt(t, e) {
|
|
50
|
+
return t.sourceLinks.length ? t.depth : e - 1;
|
|
51
|
+
}
|
|
52
|
+
function Pt(t) {
|
|
53
|
+
return t.targetLinks.length ? t.depth : t.sourceLinks.length ? yt(t.sourceLinks, It) - 1 : 0;
|
|
54
|
+
}
|
|
55
|
+
function Q(t) {
|
|
56
|
+
return function() {
|
|
57
|
+
return t;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function ct(t, e) {
|
|
61
|
+
return R(t.source, e.source) || t.index - e.index;
|
|
62
|
+
}
|
|
63
|
+
function at(t, e) {
|
|
64
|
+
return R(t.target, e.target) || t.index - e.index;
|
|
65
|
+
}
|
|
66
|
+
function R(t, e) {
|
|
67
|
+
return t.y0 - e.y0;
|
|
68
|
+
}
|
|
69
|
+
function J(t) {
|
|
70
|
+
return t.value;
|
|
71
|
+
}
|
|
72
|
+
function Nt(t) {
|
|
73
|
+
return t.index;
|
|
74
|
+
}
|
|
75
|
+
function Ot(t) {
|
|
76
|
+
return t.nodes;
|
|
77
|
+
}
|
|
78
|
+
function Tt(t) {
|
|
79
|
+
return t.links;
|
|
80
|
+
}
|
|
81
|
+
function lt(t, e) {
|
|
82
|
+
const r = t.get(e);
|
|
83
|
+
if (!r)
|
|
84
|
+
throw new Error("missing: " + e);
|
|
85
|
+
return r;
|
|
86
|
+
}
|
|
87
|
+
function ht({ nodes: t }) {
|
|
88
|
+
for (const e of t) {
|
|
89
|
+
let r = e.y0, c = r;
|
|
90
|
+
for (const a of e.sourceLinks)
|
|
91
|
+
a.y0 = r + a.width / 2, r += a.width;
|
|
92
|
+
for (const a of e.targetLinks)
|
|
93
|
+
a.y1 = c + a.width / 2, c += a.width;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function $t() {
|
|
97
|
+
let t = 0, e = 0, r = 1, c = 1, a = 24, x = 8, p, _ = Nt, i = gt, o, f, m = Ot, y = Tt, v = 6;
|
|
98
|
+
function k() {
|
|
99
|
+
const n = { nodes: m.apply(null, arguments), links: y.apply(null, arguments) };
|
|
100
|
+
return D(n), S(n), M(n), O(n), C(n), ht(n), n;
|
|
101
|
+
}
|
|
102
|
+
k.update = function(n) {
|
|
103
|
+
return ht(n), n;
|
|
104
|
+
}, k.nodeId = function(n) {
|
|
105
|
+
return arguments.length ? (_ = typeof n == "function" ? n : Q(n), k) : _;
|
|
106
|
+
}, k.nodeAlign = function(n) {
|
|
107
|
+
return arguments.length ? (i = typeof n == "function" ? n : Q(n), k) : i;
|
|
108
|
+
}, k.nodeSort = function(n) {
|
|
109
|
+
return arguments.length ? (o = n, k) : o;
|
|
110
|
+
}, k.nodeWidth = function(n) {
|
|
111
|
+
return arguments.length ? (a = +n, k) : a;
|
|
112
|
+
}, k.nodePadding = function(n) {
|
|
113
|
+
return arguments.length ? (x = p = +n, k) : x;
|
|
114
|
+
}, k.nodes = function(n) {
|
|
115
|
+
return arguments.length ? (m = typeof n == "function" ? n : Q(n), k) : m;
|
|
116
|
+
}, k.links = function(n) {
|
|
117
|
+
return arguments.length ? (y = typeof n == "function" ? n : Q(n), k) : y;
|
|
118
|
+
}, k.linkSort = function(n) {
|
|
119
|
+
return arguments.length ? (f = n, k) : f;
|
|
120
|
+
}, k.size = function(n) {
|
|
121
|
+
return arguments.length ? (t = e = 0, r = +n[0], c = +n[1], k) : [r - t, c - e];
|
|
122
|
+
}, k.extent = function(n) {
|
|
123
|
+
return arguments.length ? (t = +n[0][0], r = +n[1][0], e = +n[0][1], c = +n[1][1], k) : [[t, e], [r, c]];
|
|
124
|
+
}, k.iterations = function(n) {
|
|
125
|
+
return arguments.length ? (v = +n, k) : v;
|
|
126
|
+
};
|
|
127
|
+
function D({ nodes: n, links: l }) {
|
|
128
|
+
for (const [u, s] of n.entries())
|
|
129
|
+
s.index = u, s.sourceLinks = [], s.targetLinks = [];
|
|
130
|
+
const h = new Map(n.map((u, s) => [_(u, s, n), u]));
|
|
131
|
+
for (const [u, s] of l.entries()) {
|
|
132
|
+
s.index = u;
|
|
133
|
+
let { source: g, target: A } = s;
|
|
134
|
+
typeof g != "object" && (g = s.source = lt(h, g)), typeof A != "object" && (A = s.target = lt(h, A)), g.sourceLinks.push(s), A.targetLinks.push(s);
|
|
135
|
+
}
|
|
136
|
+
if (f != null)
|
|
137
|
+
for (const { sourceLinks: u, targetLinks: s } of n)
|
|
138
|
+
u.sort(f), s.sort(f);
|
|
139
|
+
}
|
|
140
|
+
function S({ nodes: n }) {
|
|
141
|
+
for (const l of n)
|
|
142
|
+
l.value = l.fixedValue === void 0 ? Math.max(H(l.sourceLinks, J), H(l.targetLinks, J)) : l.fixedValue;
|
|
143
|
+
}
|
|
144
|
+
function M({ nodes: n }) {
|
|
145
|
+
const l = n.length;
|
|
146
|
+
let h = new Set(n), u = /* @__PURE__ */ new Set(), s = 0;
|
|
147
|
+
for (; h.size; ) {
|
|
148
|
+
for (const g of h) {
|
|
149
|
+
g.depth = s;
|
|
150
|
+
for (const { target: A } of g.sourceLinks)
|
|
151
|
+
u.add(A);
|
|
152
|
+
}
|
|
153
|
+
if (++s > l)
|
|
154
|
+
throw new Error("circular link");
|
|
155
|
+
h = u, u = /* @__PURE__ */ new Set();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function O({ nodes: n }) {
|
|
159
|
+
const l = n.length;
|
|
160
|
+
let h = new Set(n), u = /* @__PURE__ */ new Set(), s = 0;
|
|
161
|
+
for (; h.size; ) {
|
|
162
|
+
for (const g of h) {
|
|
163
|
+
g.height = s;
|
|
164
|
+
for (const { source: A } of g.targetLinks)
|
|
165
|
+
u.add(A);
|
|
166
|
+
}
|
|
167
|
+
if (++s > l)
|
|
168
|
+
throw new Error("circular link");
|
|
169
|
+
h = u, u = /* @__PURE__ */ new Set();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function I({ nodes: n }) {
|
|
173
|
+
const l = ot(n, (s) => s.depth) + 1, h = (r - t - a) / (l - 1), u = new Array(l);
|
|
174
|
+
for (const s of n) {
|
|
175
|
+
const g = Math.max(0, Math.min(l - 1, Math.floor(i.call(null, s, l))));
|
|
176
|
+
s.layer = g, s.x0 = t + g * h, s.x1 = s.x0 + a, u[g] ? u[g].push(s) : u[g] = [s];
|
|
177
|
+
}
|
|
178
|
+
if (o)
|
|
179
|
+
for (const s of u)
|
|
180
|
+
s.sort(o);
|
|
181
|
+
return u;
|
|
182
|
+
}
|
|
183
|
+
function b(n) {
|
|
184
|
+
const l = yt(n, (h) => (c - e - (h.length - 1) * p) / H(h, J));
|
|
185
|
+
for (const h of n) {
|
|
186
|
+
let u = e;
|
|
187
|
+
for (const s of h) {
|
|
188
|
+
s.y0 = u, s.y1 = u + s.value * l, u = s.y1 + p;
|
|
189
|
+
for (const g of s.sourceLinks)
|
|
190
|
+
g.width = g.value * l;
|
|
191
|
+
}
|
|
192
|
+
u = (c - u + p) / (h.length + 1);
|
|
193
|
+
for (let s = 0; s < h.length; ++s) {
|
|
194
|
+
const g = h[s];
|
|
195
|
+
g.y0 += u * (s + 1), g.y1 += u * (s + 1);
|
|
196
|
+
}
|
|
197
|
+
L(h);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
function C(n) {
|
|
201
|
+
const l = I(n);
|
|
202
|
+
p = Math.min(x, (c - e) / (ot(l, (h) => h.length) - 1)), b(l);
|
|
203
|
+
for (let h = 0; h < v; ++h) {
|
|
204
|
+
const u = Math.pow(0.99, h), s = Math.max(1 - u, (h + 1) / v);
|
|
205
|
+
P(l, u, s), T(l, u, s);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
function T(n, l, h) {
|
|
209
|
+
for (let u = 1, s = n.length; u < s; ++u) {
|
|
210
|
+
const g = n[u];
|
|
211
|
+
for (const A of g) {
|
|
212
|
+
let W = 0, j = 0;
|
|
213
|
+
for (const { source: X, value: Z } of A.targetLinks) {
|
|
214
|
+
let q = Z * (A.layer - X.layer);
|
|
215
|
+
W += U(X, A) * q, j += q;
|
|
216
|
+
}
|
|
217
|
+
if (!(j > 0))
|
|
218
|
+
continue;
|
|
219
|
+
let G = (W / j - A.y0) * l;
|
|
220
|
+
A.y0 += G, A.y1 += G, N(A);
|
|
221
|
+
}
|
|
222
|
+
o === void 0 && g.sort(R), d(g, h);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function P(n, l, h) {
|
|
226
|
+
for (let u = n.length, s = u - 2; s >= 0; --s) {
|
|
227
|
+
const g = n[s];
|
|
228
|
+
for (const A of g) {
|
|
229
|
+
let W = 0, j = 0;
|
|
230
|
+
for (const { target: X, value: Z } of A.sourceLinks) {
|
|
231
|
+
let q = Z * (X.layer - A.layer);
|
|
232
|
+
W += $(A, X) * q, j += q;
|
|
233
|
+
}
|
|
234
|
+
if (!(j > 0))
|
|
235
|
+
continue;
|
|
236
|
+
let G = (W / j - A.y0) * l;
|
|
237
|
+
A.y0 += G, A.y1 += G, N(A);
|
|
238
|
+
}
|
|
239
|
+
o === void 0 && g.sort(R), d(g, h);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
function d(n, l) {
|
|
243
|
+
const h = n.length >> 1, u = n[h];
|
|
244
|
+
E(n, u.y0 - p, h - 1, l), w(n, u.y1 + p, h + 1, l), E(n, c, n.length - 1, l), w(n, e, 0, l);
|
|
245
|
+
}
|
|
246
|
+
function w(n, l, h, u) {
|
|
247
|
+
for (; h < n.length; ++h) {
|
|
248
|
+
const s = n[h], g = (l - s.y0) * u;
|
|
249
|
+
g > 1e-6 && (s.y0 += g, s.y1 += g), l = s.y1 + p;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
function E(n, l, h, u) {
|
|
253
|
+
for (; h >= 0; --h) {
|
|
254
|
+
const s = n[h], g = (s.y1 - l) * u;
|
|
255
|
+
g > 1e-6 && (s.y0 -= g, s.y1 -= g), l = s.y0 - p;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
function N({ sourceLinks: n, targetLinks: l }) {
|
|
259
|
+
if (f === void 0) {
|
|
260
|
+
for (const { source: { sourceLinks: h } } of l)
|
|
261
|
+
h.sort(at);
|
|
262
|
+
for (const { target: { targetLinks: h } } of n)
|
|
263
|
+
h.sort(ct);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
function L(n) {
|
|
267
|
+
if (f === void 0)
|
|
268
|
+
for (const { sourceLinks: l, targetLinks: h } of n)
|
|
269
|
+
l.sort(at), h.sort(ct);
|
|
270
|
+
}
|
|
271
|
+
function U(n, l) {
|
|
272
|
+
let h = n.y0 - (n.sourceLinks.length - 1) * p / 2;
|
|
273
|
+
for (const { target: u, width: s } of n.sourceLinks) {
|
|
274
|
+
if (u === l)
|
|
275
|
+
break;
|
|
276
|
+
h += s + p;
|
|
277
|
+
}
|
|
278
|
+
for (const { source: u, width: s } of l.targetLinks) {
|
|
279
|
+
if (u === n)
|
|
280
|
+
break;
|
|
281
|
+
h -= s;
|
|
282
|
+
}
|
|
283
|
+
return h;
|
|
284
|
+
}
|
|
285
|
+
function $(n, l) {
|
|
286
|
+
let h = l.y0 - (l.targetLinks.length - 1) * p / 2;
|
|
287
|
+
for (const { source: u, width: s } of l.targetLinks) {
|
|
288
|
+
if (u === n)
|
|
289
|
+
break;
|
|
290
|
+
h += s + p;
|
|
291
|
+
}
|
|
292
|
+
for (const { target: u, width: s } of n.sourceLinks) {
|
|
293
|
+
if (u === l)
|
|
294
|
+
break;
|
|
295
|
+
h -= s;
|
|
296
|
+
}
|
|
297
|
+
return h;
|
|
298
|
+
}
|
|
299
|
+
return k;
|
|
300
|
+
}
|
|
301
|
+
var tt = Math.PI, nt = 2 * tt, z = 1e-6, jt = nt - z;
|
|
302
|
+
function et() {
|
|
303
|
+
this._x0 = this._y0 = // start of current subpath
|
|
304
|
+
this._x1 = this._y1 = null, this._ = "";
|
|
305
|
+
}
|
|
306
|
+
function dt() {
|
|
307
|
+
return new et();
|
|
308
|
+
}
|
|
309
|
+
et.prototype = dt.prototype = {
|
|
310
|
+
constructor: et,
|
|
311
|
+
moveTo: function(t, e) {
|
|
312
|
+
this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e);
|
|
313
|
+
},
|
|
314
|
+
closePath: function() {
|
|
315
|
+
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
|
|
316
|
+
},
|
|
317
|
+
lineTo: function(t, e) {
|
|
318
|
+
this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +e);
|
|
319
|
+
},
|
|
320
|
+
quadraticCurveTo: function(t, e, r, c) {
|
|
321
|
+
this._ += "Q" + +t + "," + +e + "," + (this._x1 = +r) + "," + (this._y1 = +c);
|
|
322
|
+
},
|
|
323
|
+
bezierCurveTo: function(t, e, r, c, a, x) {
|
|
324
|
+
this._ += "C" + +t + "," + +e + "," + +r + "," + +c + "," + (this._x1 = +a) + "," + (this._y1 = +x);
|
|
325
|
+
},
|
|
326
|
+
arcTo: function(t, e, r, c, a) {
|
|
327
|
+
t = +t, e = +e, r = +r, c = +c, a = +a;
|
|
328
|
+
var x = this._x1, p = this._y1, _ = r - t, i = c - e, o = x - t, f = p - e, m = o * o + f * f;
|
|
329
|
+
if (a < 0)
|
|
330
|
+
throw new Error("negative radius: " + a);
|
|
331
|
+
if (this._x1 === null)
|
|
332
|
+
this._ += "M" + (this._x1 = t) + "," + (this._y1 = e);
|
|
333
|
+
else if (m > z)
|
|
334
|
+
if (!(Math.abs(f * _ - i * o) > z) || !a)
|
|
335
|
+
this._ += "L" + (this._x1 = t) + "," + (this._y1 = e);
|
|
336
|
+
else {
|
|
337
|
+
var y = r - x, v = c - p, k = _ * _ + i * i, D = y * y + v * v, S = Math.sqrt(k), M = Math.sqrt(m), O = a * Math.tan((tt - Math.acos((k + m - D) / (2 * S * M))) / 2), I = O / M, b = O / S;
|
|
338
|
+
Math.abs(I - 1) > z && (this._ += "L" + (t + I * o) + "," + (e + I * f)), this._ += "A" + a + "," + a + ",0,0," + +(f * y > o * v) + "," + (this._x1 = t + b * _) + "," + (this._y1 = e + b * i);
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
arc: function(t, e, r, c, a, x) {
|
|
342
|
+
t = +t, e = +e, r = +r, x = !!x;
|
|
343
|
+
var p = r * Math.cos(c), _ = r * Math.sin(c), i = t + p, o = e + _, f = 1 ^ x, m = x ? c - a : a - c;
|
|
344
|
+
if (r < 0)
|
|
345
|
+
throw new Error("negative radius: " + r);
|
|
346
|
+
this._x1 === null ? this._ += "M" + i + "," + o : (Math.abs(this._x1 - i) > z || Math.abs(this._y1 - o) > z) && (this._ += "L" + i + "," + o), r && (m < 0 && (m = m % nt + nt), m > jt ? this._ += "A" + r + "," + r + ",0,1," + f + "," + (t - p) + "," + (e - _) + "A" + r + "," + r + ",0,1," + f + "," + (this._x1 = i) + "," + (this._y1 = o) : m > z && (this._ += "A" + r + "," + r + ",0," + +(m >= tt) + "," + f + "," + (this._x1 = t + r * Math.cos(a)) + "," + (this._y1 = e + r * Math.sin(a))));
|
|
347
|
+
},
|
|
348
|
+
rect: function(t, e, r, c) {
|
|
349
|
+
this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e) + "h" + +r + "v" + +c + "h" + -r + "Z";
|
|
350
|
+
},
|
|
351
|
+
toString: function() {
|
|
352
|
+
return this._;
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
function ut(t) {
|
|
356
|
+
return function() {
|
|
357
|
+
return t;
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
function zt(t) {
|
|
361
|
+
return t[0];
|
|
362
|
+
}
|
|
363
|
+
function Ft(t) {
|
|
364
|
+
return t[1];
|
|
365
|
+
}
|
|
366
|
+
var Ut = Array.prototype.slice;
|
|
367
|
+
function Wt(t) {
|
|
368
|
+
return t.source;
|
|
369
|
+
}
|
|
370
|
+
function Gt(t) {
|
|
371
|
+
return t.target;
|
|
372
|
+
}
|
|
373
|
+
function Xt(t) {
|
|
374
|
+
var e = Wt, r = Gt, c = zt, a = Ft, x = null;
|
|
375
|
+
function p() {
|
|
376
|
+
var _, i = Ut.call(arguments), o = e.apply(this, i), f = r.apply(this, i);
|
|
377
|
+
if (x || (x = _ = dt()), t(x, +c.apply(this, (i[0] = o, i)), +a.apply(this, i), +c.apply(this, (i[0] = f, i)), +a.apply(this, i)), _)
|
|
378
|
+
return x = null, _ + "" || null;
|
|
379
|
+
}
|
|
380
|
+
return p.source = function(_) {
|
|
381
|
+
return arguments.length ? (e = _, p) : e;
|
|
382
|
+
}, p.target = function(_) {
|
|
383
|
+
return arguments.length ? (r = _, p) : r;
|
|
384
|
+
}, p.x = function(_) {
|
|
385
|
+
return arguments.length ? (c = typeof _ == "function" ? _ : ut(+_), p) : c;
|
|
386
|
+
}, p.y = function(_) {
|
|
387
|
+
return arguments.length ? (a = typeof _ == "function" ? _ : ut(+_), p) : a;
|
|
388
|
+
}, p.context = function(_) {
|
|
389
|
+
return arguments.length ? (x = _ ?? null, p) : x;
|
|
390
|
+
}, p;
|
|
391
|
+
}
|
|
392
|
+
function qt(t, e, r, c, a) {
|
|
393
|
+
t.moveTo(e, r), t.bezierCurveTo(e = (e + c) / 2, r, e, a, c, a);
|
|
394
|
+
}
|
|
395
|
+
function Kt() {
|
|
396
|
+
return Xt(qt);
|
|
397
|
+
}
|
|
398
|
+
function Qt(t) {
|
|
399
|
+
return [t.source.x1, t.y0];
|
|
400
|
+
}
|
|
401
|
+
function Rt(t) {
|
|
402
|
+
return [t.target.x0, t.y1];
|
|
403
|
+
}
|
|
404
|
+
function Vt() {
|
|
405
|
+
return Kt().source(Qt).target(Rt);
|
|
406
|
+
}
|
|
407
|
+
var it = function() {
|
|
408
|
+
var t = function(_, i, o, f) {
|
|
409
|
+
for (o = o || {}, f = _.length; f--; o[_[f]] = i)
|
|
410
|
+
;
|
|
411
|
+
return o;
|
|
412
|
+
}, e = [1, 9], r = [1, 10], c = [1, 5, 10, 12], a = {
|
|
413
|
+
trace: function() {
|
|
414
|
+
},
|
|
415
|
+
yy: {},
|
|
416
|
+
symbols_: { error: 2, start: 3, SANKEY: 4, NEWLINE: 5, csv: 6, opt_eof: 7, record: 8, csv_tail: 9, EOF: 10, "field[source]": 11, COMMA: 12, "field[target]": 13, "field[value]": 14, field: 15, escaped: 16, non_escaped: 17, DQUOTE: 18, ESCAPED_TEXT: 19, NON_ESCAPED_TEXT: 20, $accept: 0, $end: 1 },
|
|
417
|
+
terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" },
|
|
418
|
+
productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],
|
|
419
|
+
performAction: function(_, i, o, f, m, y, v) {
|
|
420
|
+
var k = y.length - 1;
|
|
421
|
+
switch (m) {
|
|
422
|
+
case 7:
|
|
423
|
+
const D = f.findOrCreateNode(y[k - 4].trim().replaceAll('""', '"')), S = f.findOrCreateNode(y[k - 2].trim().replaceAll('""', '"')), M = parseFloat(y[k].trim());
|
|
424
|
+
f.addLink(D, S, M);
|
|
425
|
+
break;
|
|
426
|
+
case 8:
|
|
427
|
+
case 9:
|
|
428
|
+
case 11:
|
|
429
|
+
this.$ = y[k];
|
|
430
|
+
break;
|
|
431
|
+
case 10:
|
|
432
|
+
this.$ = y[k - 1];
|
|
433
|
+
break;
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: e, 20: r }, { 1: [2, 6], 7: 11, 10: [1, 12] }, t(r, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, t(c, [2, 8]), t(c, [2, 9]), { 19: [1, 16] }, t(c, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, t(r, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: e, 20: r }, { 15: 18, 16: 7, 17: 8, 18: e, 20: r }, { 18: [1, 19] }, t(r, [2, 3]), { 12: [1, 20] }, t(c, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: e, 20: r }, t([1, 5, 10], [2, 7])],
|
|
437
|
+
defaultActions: { 11: [2, 1], 12: [2, 5] },
|
|
438
|
+
parseError: function(_, i) {
|
|
439
|
+
if (i.recoverable)
|
|
440
|
+
this.trace(_);
|
|
441
|
+
else {
|
|
442
|
+
var o = new Error(_);
|
|
443
|
+
throw o.hash = i, o;
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
parse: function(_) {
|
|
447
|
+
var i = this, o = [0], f = [], m = [null], y = [], v = this.table, k = "", D = 0, S = 0, M = 2, O = 1, I = y.slice.call(arguments, 1), b = Object.create(this.lexer), C = { yy: {} };
|
|
448
|
+
for (var T in this.yy)
|
|
449
|
+
Object.prototype.hasOwnProperty.call(this.yy, T) && (C.yy[T] = this.yy[T]);
|
|
450
|
+
b.setInput(_, C.yy), C.yy.lexer = b, C.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
|
|
451
|
+
var P = b.yylloc;
|
|
452
|
+
y.push(P);
|
|
453
|
+
var d = b.options && b.options.ranges;
|
|
454
|
+
typeof C.yy.parseError == "function" ? this.parseError = C.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
455
|
+
function w() {
|
|
456
|
+
var g;
|
|
457
|
+
return g = f.pop() || b.lex() || O, typeof g != "number" && (g instanceof Array && (f = g, g = f.pop()), g = i.symbols_[g] || g), g;
|
|
458
|
+
}
|
|
459
|
+
for (var E, N, L, U, $ = {}, n, l, h, u; ; ) {
|
|
460
|
+
if (N = o[o.length - 1], this.defaultActions[N] ? L = this.defaultActions[N] : ((E === null || typeof E > "u") && (E = w()), L = v[N] && v[N][E]), typeof L > "u" || !L.length || !L[0]) {
|
|
461
|
+
var s = "";
|
|
462
|
+
u = [];
|
|
463
|
+
for (n in v[N])
|
|
464
|
+
this.terminals_[n] && n > M && u.push("'" + this.terminals_[n] + "'");
|
|
465
|
+
b.showPosition ? s = "Parse error on line " + (D + 1) + `:
|
|
466
|
+
` + b.showPosition() + `
|
|
467
|
+
Expecting ` + u.join(", ") + ", got '" + (this.terminals_[E] || E) + "'" : s = "Parse error on line " + (D + 1) + ": Unexpected " + (E == O ? "end of input" : "'" + (this.terminals_[E] || E) + "'"), this.parseError(s, {
|
|
468
|
+
text: b.match,
|
|
469
|
+
token: this.terminals_[E] || E,
|
|
470
|
+
line: b.yylineno,
|
|
471
|
+
loc: P,
|
|
472
|
+
expected: u
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
if (L[0] instanceof Array && L.length > 1)
|
|
476
|
+
throw new Error("Parse Error: multiple actions possible at state: " + N + ", token: " + E);
|
|
477
|
+
switch (L[0]) {
|
|
478
|
+
case 1:
|
|
479
|
+
o.push(E), m.push(b.yytext), y.push(b.yylloc), o.push(L[1]), E = null, S = b.yyleng, k = b.yytext, D = b.yylineno, P = b.yylloc;
|
|
480
|
+
break;
|
|
481
|
+
case 2:
|
|
482
|
+
if (l = this.productions_[L[1]][1], $.$ = m[m.length - l], $._$ = {
|
|
483
|
+
first_line: y[y.length - (l || 1)].first_line,
|
|
484
|
+
last_line: y[y.length - 1].last_line,
|
|
485
|
+
first_column: y[y.length - (l || 1)].first_column,
|
|
486
|
+
last_column: y[y.length - 1].last_column
|
|
487
|
+
}, d && ($._$.range = [
|
|
488
|
+
y[y.length - (l || 1)].range[0],
|
|
489
|
+
y[y.length - 1].range[1]
|
|
490
|
+
]), U = this.performAction.apply($, [
|
|
491
|
+
k,
|
|
492
|
+
S,
|
|
493
|
+
D,
|
|
494
|
+
C.yy,
|
|
495
|
+
L[1],
|
|
496
|
+
m,
|
|
497
|
+
y
|
|
498
|
+
].concat(I)), typeof U < "u")
|
|
499
|
+
return U;
|
|
500
|
+
l && (o = o.slice(0, -1 * l * 2), m = m.slice(0, -1 * l), y = y.slice(0, -1 * l)), o.push(this.productions_[L[1]][0]), m.push($.$), y.push($._$), h = v[o[o.length - 2]][o[o.length - 1]], o.push(h);
|
|
501
|
+
break;
|
|
502
|
+
case 3:
|
|
503
|
+
return !0;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
return !0;
|
|
507
|
+
}
|
|
508
|
+
}, x = /* @__PURE__ */ function() {
|
|
509
|
+
var _ = {
|
|
510
|
+
EOF: 1,
|
|
511
|
+
parseError: function(i, o) {
|
|
512
|
+
if (this.yy.parser)
|
|
513
|
+
this.yy.parser.parseError(i, o);
|
|
514
|
+
else
|
|
515
|
+
throw new Error(i);
|
|
516
|
+
},
|
|
517
|
+
// resets the lexer, sets new input
|
|
518
|
+
setInput: function(i, o) {
|
|
519
|
+
return this.yy = o || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
520
|
+
first_line: 1,
|
|
521
|
+
first_column: 0,
|
|
522
|
+
last_line: 1,
|
|
523
|
+
last_column: 0
|
|
524
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
525
|
+
},
|
|
526
|
+
// consumes and returns one char from the input
|
|
527
|
+
input: function() {
|
|
528
|
+
var i = this._input[0];
|
|
529
|
+
this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
|
|
530
|
+
var o = i.match(/(?:\r\n?|\n).*/g);
|
|
531
|
+
return o ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
|
|
532
|
+
},
|
|
533
|
+
// unshifts one char (or a string) into the input
|
|
534
|
+
unput: function(i) {
|
|
535
|
+
var o = i.length, f = i.split(/(?:\r\n?|\n)/g);
|
|
536
|
+
this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - o), this.offset -= o;
|
|
537
|
+
var m = this.match.split(/(?:\r\n?|\n)/g);
|
|
538
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), f.length - 1 && (this.yylineno -= f.length - 1);
|
|
539
|
+
var y = this.yylloc.range;
|
|
540
|
+
return this.yylloc = {
|
|
541
|
+
first_line: this.yylloc.first_line,
|
|
542
|
+
last_line: this.yylineno + 1,
|
|
543
|
+
first_column: this.yylloc.first_column,
|
|
544
|
+
last_column: f ? (f.length === m.length ? this.yylloc.first_column : 0) + m[m.length - f.length].length - f[0].length : this.yylloc.first_column - o
|
|
545
|
+
}, this.options.ranges && (this.yylloc.range = [y[0], y[0] + this.yyleng - o]), this.yyleng = this.yytext.length, this;
|
|
546
|
+
},
|
|
547
|
+
// When called from action, caches matched text and appends it on next action
|
|
548
|
+
more: function() {
|
|
549
|
+
return this._more = !0, this;
|
|
550
|
+
},
|
|
551
|
+
// 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.
|
|
552
|
+
reject: function() {
|
|
553
|
+
if (this.options.backtrack_lexer)
|
|
554
|
+
this._backtrack = !0;
|
|
555
|
+
else
|
|
556
|
+
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).
|
|
557
|
+
` + this.showPosition(), {
|
|
558
|
+
text: "",
|
|
559
|
+
token: null,
|
|
560
|
+
line: this.yylineno
|
|
561
|
+
});
|
|
562
|
+
return this;
|
|
563
|
+
},
|
|
564
|
+
// retain first n characters of the match
|
|
565
|
+
less: function(i) {
|
|
566
|
+
this.unput(this.match.slice(i));
|
|
567
|
+
},
|
|
568
|
+
// displays already matched input, i.e. for error messages
|
|
569
|
+
pastInput: function() {
|
|
570
|
+
var i = this.matched.substr(0, this.matched.length - this.match.length);
|
|
571
|
+
return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
|
|
572
|
+
},
|
|
573
|
+
// displays upcoming input, i.e. for error messages
|
|
574
|
+
upcomingInput: function() {
|
|
575
|
+
var i = this.match;
|
|
576
|
+
return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
577
|
+
},
|
|
578
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
579
|
+
showPosition: function() {
|
|
580
|
+
var i = this.pastInput(), o = new Array(i.length + 1).join("-");
|
|
581
|
+
return i + this.upcomingInput() + `
|
|
582
|
+
` + o + "^";
|
|
583
|
+
},
|
|
584
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
585
|
+
test_match: function(i, o) {
|
|
586
|
+
var f, m, y;
|
|
587
|
+
if (this.options.backtrack_lexer && (y = {
|
|
588
|
+
yylineno: this.yylineno,
|
|
589
|
+
yylloc: {
|
|
590
|
+
first_line: this.yylloc.first_line,
|
|
591
|
+
last_line: this.last_line,
|
|
592
|
+
first_column: this.yylloc.first_column,
|
|
593
|
+
last_column: this.yylloc.last_column
|
|
594
|
+
},
|
|
595
|
+
yytext: this.yytext,
|
|
596
|
+
match: this.match,
|
|
597
|
+
matches: this.matches,
|
|
598
|
+
matched: this.matched,
|
|
599
|
+
yyleng: this.yyleng,
|
|
600
|
+
offset: this.offset,
|
|
601
|
+
_more: this._more,
|
|
602
|
+
_input: this._input,
|
|
603
|
+
yy: this.yy,
|
|
604
|
+
conditionStack: this.conditionStack.slice(0),
|
|
605
|
+
done: this.done
|
|
606
|
+
}, this.options.ranges && (y.yylloc.range = this.yylloc.range.slice(0))), m = i[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.length), this.yylloc = {
|
|
607
|
+
first_line: this.yylloc.last_line,
|
|
608
|
+
last_line: this.yylineno + 1,
|
|
609
|
+
first_column: this.yylloc.last_column,
|
|
610
|
+
last_column: m ? m[m.length - 1].length - m[m.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
|
|
611
|
+
}, this.yytext += i[0], this.match += i[0], this.matches = i, 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(i[0].length), this.matched += i[0], f = this.performAction.call(this, this.yy, this, o, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), f)
|
|
612
|
+
return f;
|
|
613
|
+
if (this._backtrack) {
|
|
614
|
+
for (var v in y)
|
|
615
|
+
this[v] = y[v];
|
|
616
|
+
return !1;
|
|
617
|
+
}
|
|
618
|
+
return !1;
|
|
619
|
+
},
|
|
620
|
+
// return next match in input
|
|
621
|
+
next: function() {
|
|
622
|
+
if (this.done)
|
|
623
|
+
return this.EOF;
|
|
624
|
+
this._input || (this.done = !0);
|
|
625
|
+
var i, o, f, m;
|
|
626
|
+
this._more || (this.yytext = "", this.match = "");
|
|
627
|
+
for (var y = this._currentRules(), v = 0; v < y.length; v++)
|
|
628
|
+
if (f = this._input.match(this.rules[y[v]]), f && (!o || f[0].length > o[0].length)) {
|
|
629
|
+
if (o = f, m = v, this.options.backtrack_lexer) {
|
|
630
|
+
if (i = this.test_match(f, y[v]), i !== !1)
|
|
631
|
+
return i;
|
|
632
|
+
if (this._backtrack) {
|
|
633
|
+
o = !1;
|
|
634
|
+
continue;
|
|
635
|
+
} else
|
|
636
|
+
return !1;
|
|
637
|
+
} else if (!this.options.flex)
|
|
638
|
+
break;
|
|
639
|
+
}
|
|
640
|
+
return o ? (i = this.test_match(o, y[m]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
641
|
+
` + this.showPosition(), {
|
|
642
|
+
text: "",
|
|
643
|
+
token: null,
|
|
644
|
+
line: this.yylineno
|
|
645
|
+
});
|
|
646
|
+
},
|
|
647
|
+
// return next match that has a token
|
|
648
|
+
lex: function() {
|
|
649
|
+
var i = this.next();
|
|
650
|
+
return i || this.lex();
|
|
651
|
+
},
|
|
652
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
653
|
+
begin: function(i) {
|
|
654
|
+
this.conditionStack.push(i);
|
|
655
|
+
},
|
|
656
|
+
// pop the previously active lexer condition state off the condition stack
|
|
657
|
+
popState: function() {
|
|
658
|
+
var i = this.conditionStack.length - 1;
|
|
659
|
+
return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
660
|
+
},
|
|
661
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
662
|
+
_currentRules: function() {
|
|
663
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
664
|
+
},
|
|
665
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
666
|
+
topState: function(i) {
|
|
667
|
+
return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
|
|
668
|
+
},
|
|
669
|
+
// alias for begin(condition)
|
|
670
|
+
pushState: function(i) {
|
|
671
|
+
this.begin(i);
|
|
672
|
+
},
|
|
673
|
+
// return the number of states currently on the stack
|
|
674
|
+
stateStackSize: function() {
|
|
675
|
+
return this.conditionStack.length;
|
|
676
|
+
},
|
|
677
|
+
options: { easy_keword_rules: !0 },
|
|
678
|
+
performAction: function(i, o, f, m) {
|
|
679
|
+
switch (f) {
|
|
680
|
+
case 0:
|
|
681
|
+
return this.pushState("csv"), 4;
|
|
682
|
+
case 1:
|
|
683
|
+
return 10;
|
|
684
|
+
case 2:
|
|
685
|
+
return 5;
|
|
686
|
+
case 3:
|
|
687
|
+
return 12;
|
|
688
|
+
case 4:
|
|
689
|
+
return this.pushState("escaped_text"), 18;
|
|
690
|
+
case 5:
|
|
691
|
+
return 20;
|
|
692
|
+
case 6:
|
|
693
|
+
return this.popState("escaped_text"), 18;
|
|
694
|
+
case 7:
|
|
695
|
+
return 19;
|
|
696
|
+
}
|
|
697
|
+
},
|
|
698
|
+
rules: [/^(?:sankey-beta\b)/, /^(?:$)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:(\u002C))/, /^(?:(\u0022))/, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/, /^(?:(\u0022)(?!(\u0022)))/, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/],
|
|
699
|
+
conditions: { csv: { rules: [1, 2, 3, 4, 5, 6, 7], inclusive: !1 }, escaped_text: { rules: [6, 7], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7], inclusive: !0 } }
|
|
700
|
+
};
|
|
701
|
+
return _;
|
|
702
|
+
}();
|
|
703
|
+
a.lexer = x;
|
|
704
|
+
function p() {
|
|
705
|
+
this.yy = {};
|
|
706
|
+
}
|
|
707
|
+
return p.prototype = a, a.Parser = p, new p();
|
|
708
|
+
}();
|
|
709
|
+
it.parser = it;
|
|
710
|
+
const V = it;
|
|
711
|
+
let Y = [], B = [], F = {};
|
|
712
|
+
const Yt = () => {
|
|
713
|
+
Y = [], B = [], F = {}, At();
|
|
714
|
+
};
|
|
715
|
+
class Bt {
|
|
716
|
+
constructor(e, r, c = 0) {
|
|
717
|
+
this.source = e, this.target = r, this.value = c;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
const Zt = (t, e, r) => {
|
|
721
|
+
Y.push(new Bt(t, e, r));
|
|
722
|
+
};
|
|
723
|
+
class Ht {
|
|
724
|
+
constructor(e) {
|
|
725
|
+
this.ID = e;
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
const Jt = (t) => (t = Et.sanitizeText(t, st()), F[t] || (F[t] = new Ht(t), B.push(F[t])), F[t]), tn = () => B, nn = () => Y, en = () => ({
|
|
729
|
+
nodes: B.map((t) => ({ id: t.ID })),
|
|
730
|
+
links: Y.map((t) => ({
|
|
731
|
+
source: t.source.ID,
|
|
732
|
+
target: t.target.ID,
|
|
733
|
+
value: t.value
|
|
734
|
+
}))
|
|
735
|
+
}), rn = {
|
|
736
|
+
nodesMap: F,
|
|
737
|
+
getConfig: () => st().sankey,
|
|
738
|
+
getNodes: tn,
|
|
739
|
+
getLinks: nn,
|
|
740
|
+
getGraph: en,
|
|
741
|
+
addLink: Zt,
|
|
742
|
+
findOrCreateNode: Jt,
|
|
743
|
+
getAccTitle: _t,
|
|
744
|
+
setAccTitle: mt,
|
|
745
|
+
getAccDescription: xt,
|
|
746
|
+
setAccDescription: kt,
|
|
747
|
+
getDiagramTitle: vt,
|
|
748
|
+
setDiagramTitle: bt,
|
|
749
|
+
clear: Yt
|
|
750
|
+
}, pt = class rt {
|
|
751
|
+
static next(e) {
|
|
752
|
+
return new rt(e + ++rt.count);
|
|
753
|
+
}
|
|
754
|
+
constructor(e) {
|
|
755
|
+
this.id = e, this.href = `#${e}`;
|
|
756
|
+
}
|
|
757
|
+
toString() {
|
|
758
|
+
return "url(" + this.href + ")";
|
|
759
|
+
}
|
|
760
|
+
};
|
|
761
|
+
pt.count = 0;
|
|
762
|
+
let ft = pt;
|
|
763
|
+
const sn = {
|
|
764
|
+
left: Dt,
|
|
765
|
+
right: Ct,
|
|
766
|
+
center: Pt,
|
|
767
|
+
justify: gt
|
|
768
|
+
}, on = function(t, e, r, c) {
|
|
769
|
+
const { securityLevel: a, sankey: x } = st(), p = wt.sankey;
|
|
770
|
+
let _;
|
|
771
|
+
a === "sandbox" && (_ = K("#i" + e));
|
|
772
|
+
const i = a === "sandbox" ? K(_.nodes()[0].contentDocument.body) : K("body"), o = a === "sandbox" ? i.select(`[id="${e}"]`) : K(`[id="${e}"]`), f = (x == null ? void 0 : x.width) ?? p.width, m = (x == null ? void 0 : x.height) ?? p.width, y = (x == null ? void 0 : x.useMaxWidth) ?? p.useMaxWidth, v = (x == null ? void 0 : x.nodeAlignment) ?? p.nodeAlignment, k = (x == null ? void 0 : x.prefix) ?? p.prefix, D = (x == null ? void 0 : x.suffix) ?? p.suffix, S = (x == null ? void 0 : x.showValues) ?? p.showValues, M = c.db.getGraph(), O = sn[v];
|
|
773
|
+
$t().nodeId((d) => d.id).nodeWidth(10).nodePadding(10 + (S ? 15 : 0)).nodeAlign(O).extent([
|
|
774
|
+
[0, 0],
|
|
775
|
+
[f, m]
|
|
776
|
+
])(M);
|
|
777
|
+
const I = St(Mt);
|
|
778
|
+
o.append("g").attr("class", "nodes").selectAll(".node").data(M.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = ft.next("node-")).id).attr("transform", function(d) {
|
|
779
|
+
return "translate(" + d.x0 + "," + d.y0 + ")";
|
|
780
|
+
}).attr("x", (d) => d.x0).attr("y", (d) => d.y0).append("rect").attr("height", (d) => d.y1 - d.y0).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => I(d.id));
|
|
781
|
+
const b = ({ id: d, value: w }) => S ? `${d}
|
|
782
|
+
${k}${Math.round(w * 100) / 100}${D}` : d;
|
|
783
|
+
o.append("g").attr("class", "node-labels").attr("font-family", "sans-serif").attr("font-size", 14).selectAll("text").data(M.nodes).join("text").attr("x", (d) => d.x0 < f / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${S ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < f / 2 ? "start" : "end").text(b);
|
|
784
|
+
const C = o.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(M.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), T = (x == null ? void 0 : x.linkColor) || "gradient";
|
|
785
|
+
if (T === "gradient") {
|
|
786
|
+
const d = C.append("linearGradient").attr("id", (w) => (w.uid = ft.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (w) => w.source.x1).attr("x2", (w) => w.target.x0);
|
|
787
|
+
d.append("stop").attr("offset", "0%").attr("stop-color", (w) => I(w.source.id)), d.append("stop").attr("offset", "100%").attr("stop-color", (w) => I(w.target.id));
|
|
788
|
+
}
|
|
789
|
+
let P;
|
|
790
|
+
switch (T) {
|
|
791
|
+
case "gradient":
|
|
792
|
+
P = (d) => d.uid;
|
|
793
|
+
break;
|
|
794
|
+
case "source":
|
|
795
|
+
P = (d) => I(d.source.id);
|
|
796
|
+
break;
|
|
797
|
+
case "target":
|
|
798
|
+
P = (d) => I(d.target.id);
|
|
799
|
+
break;
|
|
800
|
+
default:
|
|
801
|
+
P = T;
|
|
802
|
+
}
|
|
803
|
+
C.append("path").attr("d", Vt()).attr("stroke", P).attr("stroke-width", (d) => Math.max(1, d.width)), Lt(void 0, o, 0, y);
|
|
804
|
+
}, cn = {
|
|
805
|
+
draw: on
|
|
806
|
+
}, an = (t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, `
|
|
807
|
+
`).trim(), ln = V.parse.bind(V);
|
|
808
|
+
V.parse = (t) => ln(an(t));
|
|
809
|
+
const yn = {
|
|
810
|
+
parser: V,
|
|
811
|
+
db: rn,
|
|
812
|
+
renderer: cn
|
|
813
|
+
};
|
|
814
|
+
export {
|
|
815
|
+
yn as diagram
|
|
816
|
+
};
|