@smarter.sh/ui-chat 0.8.0 → 0.9.1
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/README.md +328 -107
- package/dist/embed/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/embed/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/embed/mermaid/abnfDiagram-VCTEODGH-CGtrctwA.js +89 -0
- package/dist/embed/mermaid/arc-DlzgcAgU.js +82 -0
- package/dist/embed/mermaid/architecture-7GRP2DOG-D66ObL4C.js +3 -0
- package/dist/embed/mermaid/architectureDiagram-5GKGNRK7-CgMNWdVn.js +4148 -0
- package/dist/embed/mermaid/array-CApNbSU9.js +6 -0
- package/dist/embed/mermaid/blockDiagram-I7D4REHJ-Q2YOF2Nl.js +1922 -0
- package/dist/embed/mermaid/c4Diagram-7LVT6UL2-DI7_cX7n.js +3010 -0
- package/dist/embed/mermaid/channel-CxRe6Ync.js +5 -0
- package/dist/embed/mermaid/chunk-2E4U76K2-DPc-jkQd.js +348 -0
- package/dist/embed/mermaid/chunk-2Q5K7J3B-C1pX24ft.js +15 -0
- package/dist/embed/mermaid/chunk-4HAMMTFA-DY_JmJA2.js +4188 -0
- package/dist/embed/mermaid/chunk-5VM5RSS4-BFskf6Qk.js +5 -0
- package/dist/embed/mermaid/chunk-75Z2AOVW-BugNeXEB.js +1330 -0
- package/dist/embed/mermaid/chunk-CLGD4ZFX-BOKCMNQY.js +14 -0
- package/dist/embed/mermaid/chunk-DU6HZSFF-C09wkxIu.js +3897 -0
- package/dist/embed/mermaid/chunk-F27PBJKO-C69L38at.js +61 -0
- package/dist/embed/mermaid/chunk-FOHPRMQF-CLLDWcGe.js +21458 -0
- package/dist/embed/mermaid/chunk-GMAD6QVW-NxqJJwNT.js +1863 -0
- package/dist/embed/mermaid/chunk-GVQU2GXP-D4WoQcNg.js +37 -0
- package/dist/embed/mermaid/chunk-IMKFNOWR-DE94S7XC.js +2042 -0
- package/dist/embed/mermaid/chunk-JWPE2WC7-BGVSGRTC.js +8 -0
- package/dist/embed/mermaid/chunk-L3NEJ4N5-CqdtyK-9.js +245 -0
- package/dist/embed/mermaid/chunk-LNGE3PJU-DqC_0r8u.js +1521 -0
- package/dist/embed/mermaid/chunk-OSK3NFVY-B1KjtHOy.js +672 -0
- package/dist/embed/mermaid/chunk-P2QGCYS3-CP_jp-eQ.js +67 -0
- package/dist/embed/mermaid/chunk-POPQ4Y6H-CSwFrYKY.js +26 -0
- package/dist/embed/mermaid/chunk-PWAF6VOD-qhXJD1mO.js +275 -0
- package/dist/embed/mermaid/chunk-SHT3W25Y-a5ik03bR.js +4183 -0
- package/dist/embed/mermaid/chunk-SVP7TREG-67QXjHHx.js +490 -0
- package/dist/embed/mermaid/chunk-TICWLB2K-DHg0COuy.js +3357 -0
- package/dist/embed/mermaid/chunk-TLUHSLCS-BwEhuf5d.js +59 -0
- package/dist/embed/mermaid/chunk-XXDRQBXY-BJjzBm4h.js +9 -0
- package/dist/embed/mermaid/chunk-Y2CYZVJY-BAad7w_K.js +12 -0
- package/dist/embed/mermaid/classDiagram-ZZMXUADV-BlIPVBOk.js +30 -0
- package/dist/embed/mermaid/classDiagram-v2-VYDZK3BY-BavoJkSK.js +30 -0
- package/dist/embed/mermaid/cose-bilkent-JH36ORCC-Cx3-7Rca.js +2248 -0
- package/dist/embed/mermaid/cynefin-OW5HDTMX-Cfa1-YuM.js +3 -0
- package/dist/embed/mermaid/cynefinDiagram-5FMLGOSQ-CsV1I6A_.js +355 -0
- package/dist/embed/mermaid/cytoscape.esm-CLcfvFJ6.js +18145 -0
- package/dist/embed/mermaid/dagre-COnXXJRS.js +1934 -0
- package/dist/embed/mermaid/dagre-GXQ25YYZ-BzZWpDkI.js +425 -0
- package/dist/embed/mermaid/defaultLocale-CQ4Nl88y.js +198 -0
- package/dist/embed/mermaid/diagram-S7CK7UJ4-CShsH_ul.js +301 -0
- package/dist/embed/mermaid/diagram-UQ7AKVKN-Bb0mFpt2.js +214 -0
- package/dist/embed/mermaid/diagram-VSXAHHWV-DUq5PKM1.js +432 -0
- package/dist/embed/mermaid/diagram-VX7I27RA-Co2uyrw2.js +527 -0
- package/dist/embed/mermaid/diagram-Z3DM3KII-CTdPPkZs.js +134 -0
- package/dist/embed/mermaid/dist-CjR2JtV-.js +59 -0
- package/dist/embed/mermaid/ebnfDiagram-PWID7BFC-CAQNT7Vt.js +100 -0
- package/dist/embed/mermaid/erDiagram-RLTQ6QDP-DluYOFtk.js +1966 -0
- package/dist/embed/mermaid/eventmodeling-NTZA5JFV-DFSPvGS4.js +3 -0
- package/dist/embed/mermaid/flowDiagram-HODETNUW-BKXSV8xL.js +17 -0
- package/dist/embed/mermaid/ganttDiagram-EL5Y4UJY-D2BBzcpY.js +3072 -0
- package/dist/embed/mermaid/gitGraph-4MIJSDKK-BTHPY7Tg.js +3 -0
- package/dist/embed/mermaid/gitGraphDiagram-WWUBYQGX-BzZ3sE3s.js +733 -0
- package/dist/embed/mermaid/graphlib-D8JS7ydf.js +1267 -0
- package/dist/embed/mermaid/info-A6RAGUB7-4Mm0OyB8.js +3 -0
- package/dist/embed/mermaid/infoDiagram-27XIBGKW-DcbKIVvy.js +20 -0
- package/dist/embed/mermaid/init-CFNf60QB.js +13 -0
- package/dist/embed/mermaid/ishikawaDiagram-5VMMS53U-B6q3rvke.js +719 -0
- package/dist/embed/mermaid/journeyDiagram-3NMN7TZE-CDDY2Xma.js +884 -0
- package/dist/embed/mermaid/kanban-definition-UXKFOSKX-w7v22sq3.js +976 -0
- package/dist/embed/mermaid/katex-BqirFtOb.js +21977 -0
- package/dist/embed/mermaid/line-DoUHpRzu.js +34 -0
- package/dist/embed/mermaid/linear-CLS335Sc.js +287 -0
- package/dist/embed/mermaid/mermaid-parser.core-BoI6HFCg.js +638 -0
- package/dist/embed/mermaid/mermaid.js +1092 -0
- package/dist/embed/mermaid/mindmap-definition-YA3MSWOX-1bs_tKMD.js +1006 -0
- package/dist/embed/mermaid/ordinal-Da0rnhxr.js +65 -0
- package/dist/embed/mermaid/packet-AYTQ26CC-BAodtDR3.js +3 -0
- package/dist/embed/mermaid/path-hN9ktzbr.js +84 -0
- package/dist/embed/mermaid/pegDiagram-XKGWAZYB-DsrQs7Qo.js +94 -0
- package/dist/embed/mermaid/pie-WAS4IAKB-Yw-9-2EN.js +3 -0
- package/dist/embed/mermaid/pieDiagram-E7YTZNPT-BvkRs6Xl.js +203 -0
- package/dist/embed/mermaid/quadrantDiagram-AXDQQJYC-DDSDkbcq.js +2001 -0
- package/dist/embed/mermaid/radar-RG4KPBEZ-BtjjaEPe.js +3 -0
- package/dist/embed/mermaid/railroad-74A4TZTK-Du7TjeaO.js +3 -0
- package/dist/embed/mermaid/railroad-abnf-HS5TGJTU-D3flpty6.js +3 -0
- package/dist/embed/mermaid/railroad-ebnf-LZEXJU2U-DWpeYHWC.js +3 -0
- package/dist/embed/mermaid/railroad-peg-WCYAUIDC-DKiyz9fh.js +3 -0
- package/dist/embed/mermaid/railroadDiagram-O6MQD6OU-T__Cw3ez.js +76 -0
- package/dist/embed/mermaid/requirementDiagram-BXWQKSXE-ADir8pgL.js +2224 -0
- package/dist/embed/mermaid/rough.esm-XhrPyaQA.js +1361 -0
- package/dist/embed/mermaid/sankeyDiagram-P5KCCOFB-YTgoqhmd.js +972 -0
- package/dist/embed/mermaid/sequenceDiagram-WJ2MYXX4-Dpn6ph0n.js +4156 -0
- package/dist/embed/mermaid/sizeCapture-INFHLROL-C2wlw8KF.js +46 -0
- package/dist/embed/mermaid/src-CH4XuqUv.js +2147 -0
- package/dist/embed/mermaid/stateDiagram-D77RDMKH-V_8TbftV.js +220 -0
- package/dist/embed/mermaid/stateDiagram-v2-MP3YSRHH-us7SNDcU.js +30 -0
- package/dist/embed/mermaid/swimlanes-42K2YHIH-wzihXC1V.js +4979 -0
- package/dist/embed/mermaid/swimlanesDiagram-VR7AAH4N-BML-4Vp0.js +31 -0
- package/dist/embed/mermaid/timeline-definition-24CTP7MA-C3BzP6RA.js +1069 -0
- package/dist/embed/mermaid/treeView-Q6P3EWNA-Ba1dLcIR.js +3 -0
- package/dist/embed/mermaid/treemap-WGGIJYW6-D9G3ZsOW.js +3 -0
- package/dist/embed/mermaid/vennDiagram-4TSXK5OY-Cq1JumSe.js +1880 -0
- package/dist/embed/mermaid/wardley-WFR3VGLG-gAtip5-G.js +3 -0
- package/dist/embed/mermaid/wardleyDiagram-VM6X3IG4-HtzestuU.js +645 -0
- package/dist/embed/mermaid/xychartDiagram-S5SC5T6Z-BE-W0B_D.js +2210 -0
- package/dist/embed.js +903 -0
- package/dist/embed.js.map +1 -0
- package/dist/smarter-chat-library.es.js +1592 -1583
- package/dist/smarter-chat-library.es.js.map +1 -1
- package/dist/smarter-chat-library.umd.js +43 -43
- package/dist/smarter-chat-library.umd.js.map +1 -1
- package/dist/types/src/components/SmarterChat/Component.d.ts +1 -1
- package/dist/types/src/contract.gen.d.ts +41 -26
- package/dist/types/src/embed/EmbedApp.d.ts +10 -0
- package/dist/types/src/embed/assets.d.ts +7 -0
- package/dist/types/src/embed/autoMount.d.ts +18 -0
- package/dist/types/src/embed/css.d.ts +15 -0
- package/dist/types/src/embed/element.d.ts +19 -0
- package/dist/types/src/embed/index.d.ts +17 -0
- package/dist/types/src/embed/mermaid.d.ts +2 -0
- package/dist/types/src/embed/mermaidImport.d.ts +1 -0
- package/dist/types/src/embed/options.d.ts +69 -0
- package/dist/types/src/lib/cookie.d.ts +4 -3
- package/dist/types/src/lib/mermaidImport.d.ts +8 -0
- package/dist/types/src/types.d.ts +7 -0
- package/dist/ui-chat.css +1 -1
- package/package.json +10 -4
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import { m as e, p as t } from "./src-CH4XuqUv.js";
|
|
2
|
+
import { n } from "./chunk-Y2CYZVJY-BAad7w_K.js";
|
|
3
|
+
import { D as r, H as i, K as a, U as o, a as s, b as c, c as l, f as u, v as d, w as f, y as p } from "./chunk-DU6HZSFF-C09wkxIu.js";
|
|
4
|
+
import { t as m } from "./ordinal-Da0rnhxr.js";
|
|
5
|
+
import { t as h } from "./defaultLocale-CQ4Nl88y.js";
|
|
6
|
+
import { i as g } from "./chunk-75Z2AOVW-BugNeXEB.js";
|
|
7
|
+
import { t as _ } from "./chunk-CLGD4ZFX-BOKCMNQY.js";
|
|
8
|
+
import { i as v, n as y } from "./chunk-P2QGCYS3-CP_jp-eQ.js";
|
|
9
|
+
import { n as b } from "./mermaid-parser.core-BoI6HFCg.js";
|
|
10
|
+
import { t as x } from "./chunk-JWPE2WC7-BGVSGRTC.js";
|
|
11
|
+
import { t as S } from "./chunk-POPQ4Y6H-CSwFrYKY.js";
|
|
12
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/count.js
|
|
13
|
+
function C(e) {
|
|
14
|
+
var t = 0, n = e.children, r = n && n.length;
|
|
15
|
+
if (!r) t = 1;
|
|
16
|
+
else for (; --r >= 0;) t += n[r].value;
|
|
17
|
+
e.value = t;
|
|
18
|
+
}
|
|
19
|
+
function w() {
|
|
20
|
+
return this.eachAfter(C);
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/each.js
|
|
24
|
+
function T(e, t) {
|
|
25
|
+
let n = -1;
|
|
26
|
+
for (let r of this) e.call(t, r, ++n, this);
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js
|
|
31
|
+
function E(e, t) {
|
|
32
|
+
for (var n = this, r = [n], i, a, o = -1; n = r.pop();) if (e.call(t, n, ++o, this), i = n.children) for (a = i.length - 1; a >= 0; --a) r.push(i[a]);
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js
|
|
37
|
+
function D(e, t) {
|
|
38
|
+
for (var n = this, r = [n], i = [], a, o, s, c = -1; n = r.pop();) if (i.push(n), a = n.children) for (o = 0, s = a.length; o < s; ++o) r.push(a[o]);
|
|
39
|
+
for (; n = i.pop();) e.call(t, n, ++c, this);
|
|
40
|
+
return this;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/find.js
|
|
44
|
+
function O(e, t) {
|
|
45
|
+
let n = -1;
|
|
46
|
+
for (let r of this) if (e.call(t, r, ++n, this)) return r;
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/sum.js
|
|
50
|
+
function k(e) {
|
|
51
|
+
return this.eachAfter(function(t) {
|
|
52
|
+
for (var n = +e(t.data) || 0, r = t.children, i = r && r.length; --i >= 0;) n += r[i].value;
|
|
53
|
+
t.value = n;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/sort.js
|
|
58
|
+
function A(e) {
|
|
59
|
+
return this.eachBefore(function(t) {
|
|
60
|
+
t.children && t.children.sort(e);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/path.js
|
|
65
|
+
function j(e) {
|
|
66
|
+
for (var t = this, n = M(t, e), r = [t]; t !== n;) t = t.parent, r.push(t);
|
|
67
|
+
for (var i = r.length; e !== n;) r.splice(i, 0, e), e = e.parent;
|
|
68
|
+
return r;
|
|
69
|
+
}
|
|
70
|
+
function M(e, t) {
|
|
71
|
+
if (e === t) return e;
|
|
72
|
+
var n = e.ancestors(), r = t.ancestors(), i = null;
|
|
73
|
+
for (e = n.pop(), t = r.pop(); e === t;) i = e, e = n.pop(), t = r.pop();
|
|
74
|
+
return i;
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/ancestors.js
|
|
78
|
+
function N() {
|
|
79
|
+
for (var e = this, t = [e]; e = e.parent;) t.push(e);
|
|
80
|
+
return t;
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/descendants.js
|
|
84
|
+
function P() {
|
|
85
|
+
return Array.from(this);
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/leaves.js
|
|
89
|
+
function F() {
|
|
90
|
+
var e = [];
|
|
91
|
+
return this.eachBefore(function(t) {
|
|
92
|
+
t.children || e.push(t);
|
|
93
|
+
}), e;
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/links.js
|
|
97
|
+
function I() {
|
|
98
|
+
var e = this, t = [];
|
|
99
|
+
return e.each(function(n) {
|
|
100
|
+
n !== e && t.push({
|
|
101
|
+
source: n.parent,
|
|
102
|
+
target: n
|
|
103
|
+
});
|
|
104
|
+
}), t;
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/iterator.js
|
|
108
|
+
function* L() {
|
|
109
|
+
var e = this, t, n = [e], r, i, a;
|
|
110
|
+
do
|
|
111
|
+
for (t = n.reverse(), n = []; e = t.pop();) if (yield e, r = e.children) for (i = 0, a = r.length; i < a; ++i) n.push(r[i]);
|
|
112
|
+
while (n.length);
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region ../../node_modules/d3-hierarchy/src/hierarchy/index.js
|
|
116
|
+
function R(e, t) {
|
|
117
|
+
e instanceof Map ? (e = [void 0, e], t === void 0 && (t = V)) : t === void 0 && (t = B);
|
|
118
|
+
for (var n = new W(e), r, i = [n], a, o, s, c; r = i.pop();) if ((o = t(r.data)) && (c = (o = Array.from(o)).length)) for (r.children = o, s = c - 1; s >= 0; --s) i.push(a = o[s] = new W(o[s])), a.parent = r, a.depth = r.depth + 1;
|
|
119
|
+
return n.eachBefore(U);
|
|
120
|
+
}
|
|
121
|
+
function z() {
|
|
122
|
+
return R(this).eachBefore(H);
|
|
123
|
+
}
|
|
124
|
+
function B(e) {
|
|
125
|
+
return e.children;
|
|
126
|
+
}
|
|
127
|
+
function V(e) {
|
|
128
|
+
return Array.isArray(e) ? e[1] : null;
|
|
129
|
+
}
|
|
130
|
+
function H(e) {
|
|
131
|
+
e.data.value !== void 0 && (e.value = e.data.value), e.data = e.data.data;
|
|
132
|
+
}
|
|
133
|
+
function U(e) {
|
|
134
|
+
var t = 0;
|
|
135
|
+
do
|
|
136
|
+
e.height = t;
|
|
137
|
+
while ((e = e.parent) && e.height < ++t);
|
|
138
|
+
}
|
|
139
|
+
function W(e) {
|
|
140
|
+
this.data = e, this.depth = this.height = 0, this.parent = null;
|
|
141
|
+
}
|
|
142
|
+
W.prototype = R.prototype = {
|
|
143
|
+
constructor: W,
|
|
144
|
+
count: w,
|
|
145
|
+
each: T,
|
|
146
|
+
eachAfter: D,
|
|
147
|
+
eachBefore: E,
|
|
148
|
+
find: O,
|
|
149
|
+
sum: k,
|
|
150
|
+
sort: A,
|
|
151
|
+
path: j,
|
|
152
|
+
ancestors: N,
|
|
153
|
+
descendants: P,
|
|
154
|
+
leaves: F,
|
|
155
|
+
links: I,
|
|
156
|
+
copy: z,
|
|
157
|
+
[Symbol.iterator]: L
|
|
158
|
+
};
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region ../../node_modules/d3-hierarchy/src/accessors.js
|
|
161
|
+
function G(e) {
|
|
162
|
+
if (typeof e != "function") throw Error();
|
|
163
|
+
return e;
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region ../../node_modules/d3-hierarchy/src/constant.js
|
|
167
|
+
function K() {
|
|
168
|
+
return 0;
|
|
169
|
+
}
|
|
170
|
+
function q(e) {
|
|
171
|
+
return function() {
|
|
172
|
+
return e;
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region ../../node_modules/d3-hierarchy/src/treemap/round.js
|
|
177
|
+
function J(e) {
|
|
178
|
+
e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region ../../node_modules/d3-hierarchy/src/treemap/dice.js
|
|
182
|
+
function ee(e, t, n, r, i) {
|
|
183
|
+
for (var a = e.children, o, s = -1, c = a.length, l = e.value && (r - t) / e.value; ++s < c;) o = a[s], o.y0 = n, o.y1 = i, o.x0 = t, o.x1 = t += o.value * l;
|
|
184
|
+
}
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region ../../node_modules/d3-hierarchy/src/treemap/slice.js
|
|
187
|
+
function te(e, t, n, r, i) {
|
|
188
|
+
for (var a = e.children, o, s = -1, c = a.length, l = e.value && (i - n) / e.value; ++s < c;) o = a[s], o.x0 = t, o.x1 = r, o.y0 = n, o.y1 = n += o.value * l;
|
|
189
|
+
}
|
|
190
|
+
//#endregion
|
|
191
|
+
//#region ../../node_modules/d3-hierarchy/src/treemap/squarify.js
|
|
192
|
+
var ne = (1 + Math.sqrt(5)) / 2;
|
|
193
|
+
function re(e, t, n, r, i, a) {
|
|
194
|
+
for (var o = [], s = t.children, c, l, u = 0, d = 0, f = s.length, p, m, h = t.value, g, _, v, y, b, x, S; u < f;) {
|
|
195
|
+
p = i - n, m = a - r;
|
|
196
|
+
do
|
|
197
|
+
g = s[d++].value;
|
|
198
|
+
while (!g && d < f);
|
|
199
|
+
for (_ = v = g, x = Math.max(m / p, p / m) / (h * e), S = g * g * x, b = Math.max(v / S, S / _); d < f; ++d) {
|
|
200
|
+
if (g += l = s[d].value, l < _ && (_ = l), l > v && (v = l), S = g * g * x, y = Math.max(v / S, S / _), y > b) {
|
|
201
|
+
g -= l;
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
b = y;
|
|
205
|
+
}
|
|
206
|
+
o.push(c = {
|
|
207
|
+
value: g,
|
|
208
|
+
dice: p < m,
|
|
209
|
+
children: s.slice(u, d)
|
|
210
|
+
}), c.dice ? ee(c, n, r, i, h ? r += m * g / h : a) : te(c, n, r, h ? n += p * g / h : i, a), h -= g, u = d;
|
|
211
|
+
}
|
|
212
|
+
return o;
|
|
213
|
+
}
|
|
214
|
+
var ie = (function e(t) {
|
|
215
|
+
function n(e, n, r, i, a) {
|
|
216
|
+
re(t, e, n, r, i, a);
|
|
217
|
+
}
|
|
218
|
+
return n.ratio = function(t) {
|
|
219
|
+
return e((t = +t) > 1 ? t : 1);
|
|
220
|
+
}, n;
|
|
221
|
+
})(ne);
|
|
222
|
+
//#endregion
|
|
223
|
+
//#region ../../node_modules/d3-hierarchy/src/treemap/index.js
|
|
224
|
+
function ae() {
|
|
225
|
+
var e = ie, t = !1, n = 1, r = 1, i = [0], a = K, o = K, s = K, c = K, l = K;
|
|
226
|
+
function u(e) {
|
|
227
|
+
return e.x0 = e.y0 = 0, e.x1 = n, e.y1 = r, e.eachBefore(d), i = [0], t && e.eachBefore(J), e;
|
|
228
|
+
}
|
|
229
|
+
function d(t) {
|
|
230
|
+
var n = i[t.depth], r = t.x0 + n, u = t.y0 + n, d = t.x1 - n, f = t.y1 - n;
|
|
231
|
+
d < r && (r = d = (r + d) / 2), f < u && (u = f = (u + f) / 2), t.x0 = r, t.y0 = u, t.x1 = d, t.y1 = f, t.children && (n = i[t.depth + 1] = a(t) / 2, r += l(t) - n, u += o(t) - n, d -= s(t) - n, f -= c(t) - n, d < r && (r = d = (r + d) / 2), f < u && (u = f = (u + f) / 2), e(t, r, u, d, f));
|
|
232
|
+
}
|
|
233
|
+
return u.round = function(e) {
|
|
234
|
+
return arguments.length ? (t = !!e, u) : t;
|
|
235
|
+
}, u.size = function(e) {
|
|
236
|
+
return arguments.length ? (n = +e[0], r = +e[1], u) : [n, r];
|
|
237
|
+
}, u.tile = function(t) {
|
|
238
|
+
return arguments.length ? (e = G(t), u) : e;
|
|
239
|
+
}, u.padding = function(e) {
|
|
240
|
+
return arguments.length ? u.paddingInner(e).paddingOuter(e) : u.paddingInner();
|
|
241
|
+
}, u.paddingInner = function(e) {
|
|
242
|
+
return arguments.length ? (a = typeof e == "function" ? e : q(+e), u) : a;
|
|
243
|
+
}, u.paddingOuter = function(e) {
|
|
244
|
+
return arguments.length ? u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e) : u.paddingTop();
|
|
245
|
+
}, u.paddingTop = function(e) {
|
|
246
|
+
return arguments.length ? (o = typeof e == "function" ? e : q(+e), u) : o;
|
|
247
|
+
}, u.paddingRight = function(e) {
|
|
248
|
+
return arguments.length ? (s = typeof e == "function" ? e : q(+e), u) : s;
|
|
249
|
+
}, u.paddingBottom = function(e) {
|
|
250
|
+
return arguments.length ? (c = typeof e == "function" ? e : q(+e), u) : c;
|
|
251
|
+
}, u.paddingLeft = function(e) {
|
|
252
|
+
return arguments.length ? (l = typeof e == "function" ? e : q(+e), u) : l;
|
|
253
|
+
}, u;
|
|
254
|
+
}
|
|
255
|
+
//#endregion
|
|
256
|
+
//#region ../../node_modules/mermaid/dist/chunks/mermaid.core/diagram-VX7I27RA.mjs
|
|
257
|
+
var Y = class {
|
|
258
|
+
constructor() {
|
|
259
|
+
this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = o, this.getAccTitle = p, this.setDiagramTitle = a, this.getDiagramTitle = f, this.getAccDescription = d, this.setAccDescription = i;
|
|
260
|
+
}
|
|
261
|
+
static {
|
|
262
|
+
n(this, "TreeMapDB");
|
|
263
|
+
}
|
|
264
|
+
getNodes() {
|
|
265
|
+
return this.nodes;
|
|
266
|
+
}
|
|
267
|
+
getConfig() {
|
|
268
|
+
let e = u, t = c();
|
|
269
|
+
return g({
|
|
270
|
+
...e.treemap,
|
|
271
|
+
...t.treemap ?? {}
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
addNode(e, t) {
|
|
275
|
+
this.nodes.push(e), this.levels.set(e, t), t === 0 && (this.outerNodes.push(e), this.root ??= e);
|
|
276
|
+
}
|
|
277
|
+
getRoot() {
|
|
278
|
+
return {
|
|
279
|
+
name: "",
|
|
280
|
+
children: this.outerNodes
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
addClass(e, t) {
|
|
284
|
+
let n = this.classes.get(e) ?? {
|
|
285
|
+
id: e,
|
|
286
|
+
styles: [],
|
|
287
|
+
textStyles: []
|
|
288
|
+
}, r = t.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
|
|
289
|
+
r && r.forEach((e) => {
|
|
290
|
+
y(e) && (n?.textStyles ? n.textStyles.push(e) : n.textStyles = [e]), n?.styles ? n.styles.push(e) : n.styles = [e];
|
|
291
|
+
}), this.classes.set(e, n);
|
|
292
|
+
}
|
|
293
|
+
getClasses() {
|
|
294
|
+
return this.classes;
|
|
295
|
+
}
|
|
296
|
+
getStylesForClass(e) {
|
|
297
|
+
return this.classes.get(e)?.styles ?? [];
|
|
298
|
+
}
|
|
299
|
+
clear() {
|
|
300
|
+
s(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
function X(e) {
|
|
304
|
+
if (!e.length) return [];
|
|
305
|
+
let t = [], n = [];
|
|
306
|
+
return e.forEach((e) => {
|
|
307
|
+
let r = {
|
|
308
|
+
name: e.name,
|
|
309
|
+
children: e.type === "Leaf" ? void 0 : []
|
|
310
|
+
};
|
|
311
|
+
for (r.classSelector = e?.classSelector, e?.cssCompiledStyles && (r.cssCompiledStyles = e.cssCompiledStyles), e.type === "Leaf" && e.value !== void 0 && (r.value = e.value); n.length > 0 && n[n.length - 1].level >= e.level;) n.pop();
|
|
312
|
+
if (n.length === 0) t.push(r);
|
|
313
|
+
else {
|
|
314
|
+
let e = n[n.length - 1].node;
|
|
315
|
+
e.children ? e.children.push(r) : e.children = [r];
|
|
316
|
+
}
|
|
317
|
+
e.type !== "Leaf" && n.push({
|
|
318
|
+
node: r,
|
|
319
|
+
level: e.level
|
|
320
|
+
});
|
|
321
|
+
}), t;
|
|
322
|
+
}
|
|
323
|
+
n(X, "buildHierarchy");
|
|
324
|
+
var oe = /* @__PURE__ */ n((e, t) => {
|
|
325
|
+
x(e, t);
|
|
326
|
+
let r = [];
|
|
327
|
+
for (let n of e.TreemapRows ?? []) n.$type === "ClassDefStatement" && t.addClass(n.className ?? "", n.styleText ?? "");
|
|
328
|
+
for (let n of e.TreemapRows ?? []) {
|
|
329
|
+
let e = n.item;
|
|
330
|
+
if (!e) continue;
|
|
331
|
+
let i = n.indent ? parseInt(n.indent) : 0, a = se(e), o = e.classSelector ? t.getStylesForClass(e.classSelector) : [], s = o.length > 0 ? o : void 0, c = {
|
|
332
|
+
level: i,
|
|
333
|
+
name: a,
|
|
334
|
+
type: e.$type,
|
|
335
|
+
value: e.value,
|
|
336
|
+
classSelector: e.classSelector,
|
|
337
|
+
cssCompiledStyles: s
|
|
338
|
+
};
|
|
339
|
+
r.push(c);
|
|
340
|
+
}
|
|
341
|
+
let i = X(r), a = /* @__PURE__ */ n((e, n) => {
|
|
342
|
+
for (let r of e) t.addNode(r, n), r.children && r.children.length > 0 && a(r.children, n + 1);
|
|
343
|
+
}, "addNodesRecursively");
|
|
344
|
+
a(i, 0);
|
|
345
|
+
}, "populate"), se = /* @__PURE__ */ n((e) => e.name ? String(e.name) : "", "getItemName"), Z = {
|
|
346
|
+
parser: { yy: void 0 },
|
|
347
|
+
parse: /* @__PURE__ */ n(async (t) => {
|
|
348
|
+
try {
|
|
349
|
+
let n = await b("treemap", t);
|
|
350
|
+
e.debug("Treemap AST:", n);
|
|
351
|
+
let r = Z.parser?.yy;
|
|
352
|
+
if (!(r instanceof Y)) throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
|
|
353
|
+
oe(n, r);
|
|
354
|
+
} catch (t) {
|
|
355
|
+
throw e.error("Error parsing treemap:", t), t;
|
|
356
|
+
}
|
|
357
|
+
}, "parse")
|
|
358
|
+
}, ce = 10, Q = 10, $ = 25, le = {
|
|
359
|
+
draw: /* @__PURE__ */ n((r, i, a, o) => {
|
|
360
|
+
let s = o.db, u = s.getConfig(), d = u.padding ?? ce, f = s.getDiagramTitle(), p = s.getRoot(), { themeVariables: g } = c();
|
|
361
|
+
if (!p) return;
|
|
362
|
+
let y = f ? 30 : 0, b = _(i), x = u.nodeWidth ? u.nodeWidth * Q : 960, C = u.nodeHeight ? u.nodeHeight * Q : 500, w = x, T = C + y;
|
|
363
|
+
b.attr("viewBox", `0 0 ${w} ${T}`), l(b, T, w, u.useMaxWidth);
|
|
364
|
+
let E;
|
|
365
|
+
try {
|
|
366
|
+
let e = u.valueFormat || ",";
|
|
367
|
+
if (e === "$0,0") E = /* @__PURE__ */ n((e) => "$" + h(",")(e), "valueFormat");
|
|
368
|
+
else if (e.startsWith("$") && e.includes(",")) {
|
|
369
|
+
let t = /\.\d+/.exec(e), r = t ? t[0] : "";
|
|
370
|
+
E = /* @__PURE__ */ n((e) => "$" + h("," + r)(e), "valueFormat");
|
|
371
|
+
} else if (e.startsWith("$")) {
|
|
372
|
+
let t = e.substring(1);
|
|
373
|
+
E = /* @__PURE__ */ n((e) => "$" + h(t || "")(e), "valueFormat");
|
|
374
|
+
} else E = h(e);
|
|
375
|
+
} catch (t) {
|
|
376
|
+
e.error("Error creating format function:", t), E = h(",");
|
|
377
|
+
}
|
|
378
|
+
let D = m().range([
|
|
379
|
+
"transparent",
|
|
380
|
+
g.cScale0,
|
|
381
|
+
g.cScale1,
|
|
382
|
+
g.cScale2,
|
|
383
|
+
g.cScale3,
|
|
384
|
+
g.cScale4,
|
|
385
|
+
g.cScale5,
|
|
386
|
+
g.cScale6,
|
|
387
|
+
g.cScale7,
|
|
388
|
+
g.cScale8,
|
|
389
|
+
g.cScale9,
|
|
390
|
+
g.cScale10,
|
|
391
|
+
g.cScale11
|
|
392
|
+
]), O = m().range([
|
|
393
|
+
"transparent",
|
|
394
|
+
g.cScalePeer0,
|
|
395
|
+
g.cScalePeer1,
|
|
396
|
+
g.cScalePeer2,
|
|
397
|
+
g.cScalePeer3,
|
|
398
|
+
g.cScalePeer4,
|
|
399
|
+
g.cScalePeer5,
|
|
400
|
+
g.cScalePeer6,
|
|
401
|
+
g.cScalePeer7,
|
|
402
|
+
g.cScalePeer8,
|
|
403
|
+
g.cScalePeer9,
|
|
404
|
+
g.cScalePeer10,
|
|
405
|
+
g.cScalePeer11
|
|
406
|
+
]), k = m().range([
|
|
407
|
+
g.cScaleLabel0,
|
|
408
|
+
g.cScaleLabel1,
|
|
409
|
+
g.cScaleLabel2,
|
|
410
|
+
g.cScaleLabel3,
|
|
411
|
+
g.cScaleLabel4,
|
|
412
|
+
g.cScaleLabel5,
|
|
413
|
+
g.cScaleLabel6,
|
|
414
|
+
g.cScaleLabel7,
|
|
415
|
+
g.cScaleLabel8,
|
|
416
|
+
g.cScaleLabel9,
|
|
417
|
+
g.cScaleLabel10,
|
|
418
|
+
g.cScaleLabel11
|
|
419
|
+
]);
|
|
420
|
+
f && b.append("text").attr("x", w / 2).attr("y", y / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(f);
|
|
421
|
+
let A = b.append("g").attr("transform", `translate(0, ${y})`).attr("class", "treemapContainer"), j = R(p).sum((e) => e.value ?? 0).sort((e, t) => (t.value ?? 0) - (e.value ?? 0)), M = ae().size([x, C]).paddingTop((e) => e.children && e.children.length > 0 ? $ + Q : 0).paddingInner(d).paddingLeft((e) => e.children && e.children.length > 0 ? Q : 0).paddingRight((e) => e.children && e.children.length > 0 ? Q : 0).paddingBottom((e) => e.children && e.children.length > 0 ? Q : 0).round(!0)(j), N = M.descendants().filter((e) => e.children && e.children.length > 0), P = A.selectAll(".treemapSection").data(N).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
422
|
+
P.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", $).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", .6).attr("stroke-width", .6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), P.append("clipPath").attr("id", (e, t) => `clip-section-${i}-${t}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", $), P.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, t) => `treemapSection section${t}`).attr("fill", (e) => D(e.data.name)).attr("fill-opacity", .6).attr("stroke", (e) => O(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", .4).attr("style", (e) => {
|
|
423
|
+
if (e.depth === 0) return "display: none;";
|
|
424
|
+
let t = v({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
425
|
+
return t.nodeStyles + ";" + t.borderStyles.join(";");
|
|
426
|
+
}), P.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", $ / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("clip-path", (e, t) => `url(#clip-section-${i}-${t})`).attr("style", (e) => e.depth === 0 ? "display: none;" : "dominant-baseline: middle; font-size: 12px; fill:" + k(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" + v({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).each(function(e) {
|
|
427
|
+
if (e.depth === 0) return;
|
|
428
|
+
let n = t(this), r = e.data.name;
|
|
429
|
+
n.text(r);
|
|
430
|
+
let i = e.x1 - e.x0, a;
|
|
431
|
+
a = u.showValues !== !1 && e.value ? i - 10 - 30 - 10 - 6 : i - 6 - 6;
|
|
432
|
+
let o = Math.max(15, a), s = n.node();
|
|
433
|
+
if (s.getComputedTextLength() > o) {
|
|
434
|
+
let e = r;
|
|
435
|
+
for (; e.length > 0;) {
|
|
436
|
+
if (e = r.substring(0, e.length - 1), e.length === 0) {
|
|
437
|
+
n.text("..."), s.getComputedTextLength() > o && n.text("");
|
|
438
|
+
break;
|
|
439
|
+
}
|
|
440
|
+
if (n.text(e + "..."), s.getComputedTextLength() <= o) break;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}), u.showValues !== !1 && P.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", $ / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? E(e.value) : "").attr("font-style", "italic").attr("style", (e) => e.depth === 0 ? "display: none;" : "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + k(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" + v({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:"));
|
|
444
|
+
let F = M.leaves(), I = F.length > 20, L = I ? 16 : 38, z = I ? 14 : 28, B = I ? 4 : 8, V = I ? 4 : 6, H = I ? 2 : 4, U = I ? 8 : 10, W = I ? 1 : 2, G = A.selectAll(".treemapLeafGroup").data(F).enter().append("g").attr("class", (e, t) => `treemapNode treemapLeafGroup leaf${t}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
445
|
+
G.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? D(e.parent.data.name) : D(e.data.name)).attr("style", (e) => v({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", .3).attr("stroke", (e) => e.parent ? D(e.parent.data.name) : D(e.data.name)).attr("stroke-width", 3), G.append("clipPath").attr("id", (e, t) => `clip-${i}-${t}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), G.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => `text-anchor: middle; dominant-baseline: middle; font-size: ${L}px;fill:` + k(e.data.name) + ";" + v({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).attr("clip-path", (e, t) => `url(#clip-${i}-${t})`).text((e) => e.data.name).each(function(e) {
|
|
446
|
+
let n = t(this), r = e.x1 - e.x0, i = e.y1 - e.y0, a = n.node(), o = r - 2 * H, s = i - 2 * H;
|
|
447
|
+
if (o < U || s < U) {
|
|
448
|
+
n.style("display", "none");
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
let c = parseInt(n.style("font-size"), 10), l = .6;
|
|
452
|
+
for (; a.getComputedTextLength() > o && c > B;) c--, n.style("font-size", `${c}px`);
|
|
453
|
+
let u = Math.max(V, Math.min(z, Math.round(c * l))), d = c + W + u;
|
|
454
|
+
for (; d > s && c > B && (c--, u = Math.max(V, Math.min(z, Math.round(c * l))), !(u < V && c === B));) n.style("font-size", `${c}px`), d = c + W + u;
|
|
455
|
+
n.style("font-size", `${c}px`), I ? (c < B || s < B) && n.style("display", "none") : (a.getComputedTextLength() > o || c < B || s < c) && n.style("display", "none");
|
|
456
|
+
}), u.showValues !== !1 && G.append("text").attr("class", "treemapValue").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", function(e) {
|
|
457
|
+
return (e.y1 - e.y0) / 2;
|
|
458
|
+
}).attr("style", (e) => `text-anchor: middle; dominant-baseline: hanging; font-size: ${z}px;fill:` + k(e.data.name) + ";" + v({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).attr("clip-path", (e, t) => `url(#clip-${i}-${t})`).text((e) => e.value ? E(e.value) : "").each(function(e) {
|
|
459
|
+
let n = t(this), r = this.parentNode;
|
|
460
|
+
if (!r) {
|
|
461
|
+
n.style("display", "none");
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
let i = t(r).select(".treemapLabel");
|
|
465
|
+
if (i.empty() || i.style("display") === "none") {
|
|
466
|
+
n.style("display", "none");
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
let a = parseFloat(i.style("font-size")), o = Math.max(V, Math.min(z, Math.round(a * .6)));
|
|
470
|
+
n.style("font-size", `${o}px`);
|
|
471
|
+
let s = (e.y1 - e.y0) / 2 + a / 2 + W;
|
|
472
|
+
n.attr("y", s);
|
|
473
|
+
let c = e.x1 - e.x0, l = e.y1 - e.y0 - 4, u = c - 2 * H;
|
|
474
|
+
n.node().getComputedTextLength() > u || s + o > l || o < V ? n.style("display", "none") : n.style("display", null);
|
|
475
|
+
});
|
|
476
|
+
let K = u.diagramPadding ?? 8;
|
|
477
|
+
S(b, K, "flowchart", u?.useMaxWidth || !1);
|
|
478
|
+
}, "draw"),
|
|
479
|
+
getClasses: /* @__PURE__ */ n(function(e, t) {
|
|
480
|
+
return t.db.getClasses();
|
|
481
|
+
}, "getClasses")
|
|
482
|
+
}, ue = {
|
|
483
|
+
sectionStrokeColor: "black",
|
|
484
|
+
sectionStrokeWidth: "1",
|
|
485
|
+
sectionFillColor: "#efefef",
|
|
486
|
+
leafStrokeColor: "black",
|
|
487
|
+
leafStrokeWidth: "1",
|
|
488
|
+
leafFillColor: "#efefef",
|
|
489
|
+
labelFontSize: "12px",
|
|
490
|
+
valueFontSize: "10px",
|
|
491
|
+
titleFontSize: "14px"
|
|
492
|
+
}, de = {
|
|
493
|
+
parser: Z,
|
|
494
|
+
get db() {
|
|
495
|
+
return new Y();
|
|
496
|
+
},
|
|
497
|
+
renderer: le,
|
|
498
|
+
styles: /* @__PURE__ */ n(({ treemap: e } = {}) => {
|
|
499
|
+
let t = r(), n = c(), i = g(t, n.themeVariables), a = g(ue, e), o = a.titleColor ?? i.titleColor, s = a.labelColor ?? i.textColor, l = a.valueColor ?? i.textColor;
|
|
500
|
+
return `
|
|
501
|
+
.treemapNode.section {
|
|
502
|
+
stroke: ${a.sectionStrokeColor};
|
|
503
|
+
stroke-width: ${a.sectionStrokeWidth};
|
|
504
|
+
fill: ${a.sectionFillColor};
|
|
505
|
+
}
|
|
506
|
+
.treemapNode.leaf {
|
|
507
|
+
stroke: ${a.leafStrokeColor};
|
|
508
|
+
stroke-width: ${a.leafStrokeWidth};
|
|
509
|
+
fill: ${a.leafFillColor};
|
|
510
|
+
}
|
|
511
|
+
.treemapLabel {
|
|
512
|
+
fill: ${s};
|
|
513
|
+
font-size: ${a.labelFontSize};
|
|
514
|
+
}
|
|
515
|
+
.treemapValue {
|
|
516
|
+
fill: ${l};
|
|
517
|
+
font-size: ${a.valueFontSize};
|
|
518
|
+
}
|
|
519
|
+
.treemapTitle {
|
|
520
|
+
fill: ${o};
|
|
521
|
+
font-size: ${a.titleFontSize};
|
|
522
|
+
}
|
|
523
|
+
`;
|
|
524
|
+
}, "getStyles")
|
|
525
|
+
};
|
|
526
|
+
//#endregion
|
|
527
|
+
export { de as diagram };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { m as e } from "./src-CH4XuqUv.js";
|
|
2
|
+
import { n as t } from "./chunk-Y2CYZVJY-BAad7w_K.js";
|
|
3
|
+
import { H as n, K as r, U as i, a, b as o, c as s, f as c, v as l, w as u, y as d } from "./chunk-DU6HZSFF-C09wkxIu.js";
|
|
4
|
+
import { i as f } from "./chunk-75Z2AOVW-BugNeXEB.js";
|
|
5
|
+
import { t as p } from "./chunk-CLGD4ZFX-BOKCMNQY.js";
|
|
6
|
+
import { n as m } from "./mermaid-parser.core-BoI6HFCg.js";
|
|
7
|
+
import { t as h } from "./chunk-JWPE2WC7-BGVSGRTC.js";
|
|
8
|
+
//#region ../../node_modules/mermaid/dist/chunks/mermaid.core/diagram-Z3DM3KII.mjs
|
|
9
|
+
var g = c.packet, _ = class {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.packet = [], this.setAccTitle = i, this.getAccTitle = d, this.setDiagramTitle = r, this.getDiagramTitle = u, this.getAccDescription = l, this.setAccDescription = n;
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
t(this, "PacketDB");
|
|
15
|
+
}
|
|
16
|
+
getConfig() {
|
|
17
|
+
let e = f({
|
|
18
|
+
...g,
|
|
19
|
+
...o().packet
|
|
20
|
+
});
|
|
21
|
+
return e.showBits && (e.paddingY += 10), e;
|
|
22
|
+
}
|
|
23
|
+
getPacket() {
|
|
24
|
+
return this.packet;
|
|
25
|
+
}
|
|
26
|
+
pushWord(e) {
|
|
27
|
+
e.length > 0 && this.packet.push(e);
|
|
28
|
+
}
|
|
29
|
+
clear() {
|
|
30
|
+
a(), this.packet = [];
|
|
31
|
+
}
|
|
32
|
+
}, v = 1e4, y = /* @__PURE__ */ t((t, n) => {
|
|
33
|
+
h(t, n);
|
|
34
|
+
let r = -1, i = [], a = 1, { bitsPerRow: o } = n.getConfig();
|
|
35
|
+
for (let { start: s, end: c, bits: l, label: u } of t.blocks) {
|
|
36
|
+
if (s !== void 0 && c !== void 0 && c < s) throw Error(`Packet block ${s} - ${c} is invalid. End must be greater than start.`);
|
|
37
|
+
if (s ??= r + 1, s !== r + 1) throw Error(`Packet block ${s} - ${c ?? s} is not contiguous. It should start from ${r + 1}.`);
|
|
38
|
+
if (l === 0) throw Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);
|
|
39
|
+
for (c ??= s + (l ?? 1) - 1, l ??= c - s + 1, r = c, e.debug(`Packet block ${s} - ${r} with label ${u}`); i.length <= o + 1 && n.getPacket().length < v;) {
|
|
40
|
+
let [e, t] = b({
|
|
41
|
+
start: s,
|
|
42
|
+
end: c,
|
|
43
|
+
bits: l,
|
|
44
|
+
label: u
|
|
45
|
+
}, a, o);
|
|
46
|
+
if (i.push(e), e.end + 1 === a * o && (n.pushWord(i), i = [], a++), !t) break;
|
|
47
|
+
({start: s, end: c, bits: l, label: u} = t);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
n.pushWord(i);
|
|
51
|
+
}, "populate"), b = /* @__PURE__ */ t((e, t, n) => {
|
|
52
|
+
if (e.start === void 0) throw Error("start should have been set during first phase");
|
|
53
|
+
if (e.end === void 0) throw Error("end should have been set during first phase");
|
|
54
|
+
if (e.start > e.end) throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);
|
|
55
|
+
if (e.end + 1 <= t * n) return [e, void 0];
|
|
56
|
+
let r = t * n - 1, i = t * n;
|
|
57
|
+
return [{
|
|
58
|
+
start: e.start,
|
|
59
|
+
end: r,
|
|
60
|
+
label: e.label,
|
|
61
|
+
bits: r - e.start
|
|
62
|
+
}, {
|
|
63
|
+
start: i,
|
|
64
|
+
end: e.end,
|
|
65
|
+
label: e.label,
|
|
66
|
+
bits: e.end - i
|
|
67
|
+
}];
|
|
68
|
+
}, "getNextFittingBlock"), x = {
|
|
69
|
+
parser: { yy: void 0 },
|
|
70
|
+
parse: /* @__PURE__ */ t(async (t) => {
|
|
71
|
+
let n = await m("packet", t), r = x.parser?.yy;
|
|
72
|
+
if (!(r instanceof _)) throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
|
|
73
|
+
e.debug(n), y(n, r);
|
|
74
|
+
}, "parse")
|
|
75
|
+
}, S = /* @__PURE__ */ t((e, t, n, r) => {
|
|
76
|
+
let i = r.db, a = i.getConfig(), { rowHeight: o, paddingY: c, bitWidth: l, bitsPerRow: u } = a, d = i.getPacket(), f = i.getDiagramTitle(), m = o + c, h = m * (d.length + 1) - (f ? 0 : o), g = l * u + 2, _ = p(t);
|
|
77
|
+
_.attr("viewBox", `0 0 ${g} ${h}`), s(_, h, g, a.useMaxWidth);
|
|
78
|
+
for (let [e, t] of d.entries()) C(_, t, e, a);
|
|
79
|
+
_.append("text").text(f).attr("x", g / 2).attr("y", h - m / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
|
|
80
|
+
}, "draw"), C = /* @__PURE__ */ t((e, t, n, { rowHeight: r, paddingX: i, paddingY: a, bitWidth: o, bitsPerRow: s, showBits: c }) => {
|
|
81
|
+
let l = e.append("g"), u = n * (r + a) + a;
|
|
82
|
+
for (let e of t) {
|
|
83
|
+
let t = e.start % s * o + 1, n = (e.end - e.start + 1) * o - i;
|
|
84
|
+
if (l.append("rect").attr("x", t).attr("y", u).attr("width", n).attr("height", r).attr("class", "packetBlock"), l.append("text").attr("x", t + n / 2).attr("y", u + r / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(e.label), !c) continue;
|
|
85
|
+
let a = e.end === e.start, d = u - 2;
|
|
86
|
+
l.append("text").attr("x", t + (a ? n / 2 : 0)).attr("y", d).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", a ? "middle" : "start").text(e.start), a || l.append("text").attr("x", t + n).attr("y", d).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(e.end);
|
|
87
|
+
}
|
|
88
|
+
}, "drawWord"), w = { draw: S }, T = {
|
|
89
|
+
byteFontSize: "10px",
|
|
90
|
+
startByteColor: "black",
|
|
91
|
+
endByteColor: "black",
|
|
92
|
+
labelColor: "black",
|
|
93
|
+
labelFontSize: "12px",
|
|
94
|
+
titleColor: "black",
|
|
95
|
+
titleFontSize: "14px",
|
|
96
|
+
blockStrokeColor: "black",
|
|
97
|
+
blockStrokeWidth: "1",
|
|
98
|
+
blockFillColor: "#efefef"
|
|
99
|
+
}, E = {
|
|
100
|
+
parser: x,
|
|
101
|
+
get db() {
|
|
102
|
+
return new _();
|
|
103
|
+
},
|
|
104
|
+
renderer: w,
|
|
105
|
+
styles: /* @__PURE__ */ t(({ packet: e } = {}) => {
|
|
106
|
+
let t = f(T, e);
|
|
107
|
+
return `
|
|
108
|
+
.packetByte {
|
|
109
|
+
font-size: ${t.byteFontSize};
|
|
110
|
+
}
|
|
111
|
+
.packetByte.start {
|
|
112
|
+
fill: ${t.startByteColor};
|
|
113
|
+
}
|
|
114
|
+
.packetByte.end {
|
|
115
|
+
fill: ${t.endByteColor};
|
|
116
|
+
}
|
|
117
|
+
.packetLabel {
|
|
118
|
+
fill: ${t.labelColor};
|
|
119
|
+
font-size: ${t.labelFontSize};
|
|
120
|
+
}
|
|
121
|
+
.packetTitle {
|
|
122
|
+
fill: ${t.titleColor};
|
|
123
|
+
font-size: ${t.titleFontSize};
|
|
124
|
+
}
|
|
125
|
+
.packetBlock {
|
|
126
|
+
stroke: ${t.blockStrokeColor};
|
|
127
|
+
stroke-width: ${t.blockStrokeWidth};
|
|
128
|
+
fill: ${t.blockFillColor};
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
131
|
+
}, "styles")
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
export { E as diagram };
|