@fibery/custom-app-text-editor 1.2.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/LICENSE +214 -0
- package/README.md +33 -0
- package/lib/abnfDiagram-VRR7QNED-BgjOQqEh.js +89 -0
- package/lib/arc-Dp0rqagO.js +82 -0
- package/lib/architecture-TIHT7OUA-DDwCCw0y.js +3 -0
- package/lib/architectureDiagram-ZJ3FMSHR-BucIluTN.js +4129 -0
- package/lib/array-CApNbSU9.js +6 -0
- package/lib/blockDiagram-677ZJIJ3-CWYuHThP.js +3157 -0
- package/lib/c4Diagram-LMCZKHZV-Cr3_W-xe.js +2982 -0
- package/lib/channel-Bb7a6w5c.js +5 -0
- package/lib/chunk-2Q5K7J3B-CINvUK-A.js +15 -0
- package/lib/chunk-32BRIVSS-b-BvyGz0.js +61 -0
- package/lib/chunk-52WLFC77-Cf8zEoqs.js +593 -0
- package/lib/chunk-5VM5RSS4-Dnx15xMv.js +5 -0
- package/lib/chunk-7BUUIJ7U-B018BbRy.js +82 -0
- package/lib/chunk-C7G6YPKG-CmOuVFlJ.js +67 -0
- package/lib/chunk-EX3LRPZG-LynZw14I.js +2042 -0
- package/lib/chunk-HOUHSVGY-Br7ZSMKe.js +275 -0
- package/lib/chunk-ICXQ74PX-VqT5WUTt.js +1330 -0
- package/lib/chunk-JWPE2WC7-Ch0jmUXM.js +8 -0
- package/lib/chunk-KEIR6QF5-RwFi50en.js +21456 -0
- package/lib/chunk-MOJQB5TN-rQ4AfTd9.js +490 -0
- package/lib/chunk-OGEWGWER-BvF6eV9Q.js +32 -0
- package/lib/chunk-PUDLZKDR-BW7SZvCB.js +4135 -0
- package/lib/chunk-Q4XR5HBZ-CRgGP3ez.js +1635 -0
- package/lib/chunk-RYQCIY6F-CHlASUpG.js +241 -0
- package/lib/chunk-V7JOEXUC-OY39ml6X.js +3357 -0
- package/lib/chunk-VR4S4FIN-Bk7IFdYB.js +26 -0
- package/lib/chunk-WYO6CB5R-MV-yOaop.js +3769 -0
- package/lib/chunk-XXDRQBXY-Djd1ChwJ.js +9 -0
- package/lib/chunk-Y2CYZVJY-QdJ4V9rh.js +12 -0
- package/lib/chunk-ZGVPDNZ5-l81xl1BI.js +3738 -0
- package/lib/classDiagram-OUVF2IWQ--wRzSvLt.js +30 -0
- package/lib/classDiagram-v2-EOCWNBFH-ChMCdPO-.js +30 -0
- package/lib/cose-bilkent-JH36ORCC-CyVZn5M3.js +2254 -0
- package/lib/custom-app-text-editor.css +2 -0
- package/lib/custom-app-text-editor.js +81102 -0
- package/lib/cynefin-VYW2F7L2-CMgnLl46.js +3 -0
- package/lib/cynefinDiagram-TSTJHNR4-988Y73wV.js +355 -0
- package/lib/cytoscape.esm-DMXbtFI-.js +18145 -0
- package/lib/dagre-Dmarb1s8.js +1699 -0
- package/lib/dagre-VKFMJZFB-Bf-pz2Lx.js +328 -0
- package/lib/defaultLocale-A87O3snN.js +198 -0
- package/lib/diagram-FQU43EPY-BT8WeVzc.js +432 -0
- package/lib/diagram-G47NLZAW-vZ2XG37l.js +527 -0
- package/lib/diagram-NH7WQ7WH-CH0IfHB0.js +134 -0
- package/lib/diagram-OA4YK3LP-BgwQcJfp.js +300 -0
- package/lib/diagram-WEI45ONY-Cd3sVPil.js +214 -0
- package/lib/dist-PGS6ynRO.js +59 -0
- package/lib/ebnfDiagram-CCIWWBDH-CwBFb2Fm.js +100 -0
- package/lib/erDiagram-Q63AITRT-BshRACvj.js +1727 -0
- package/lib/eventmodeling-45OFAUF4-BDhzj03B.js +3 -0
- package/lib/flowDiagram-23GEKE2U-C3zDgFvZ.js +16 -0
- package/lib/ganttDiagram-NO4QXBWP-BD5PiE8x.js +3073 -0
- package/lib/gitGraph-TEB2WS4Q-DJA_hE4G.js +3 -0
- package/lib/gitGraphDiagram-IHSO6WYX-BAhccBh3.js +733 -0
- package/lib/graphlib-DglfpsVp.js +1267 -0
- package/lib/index.browser-Dv9K8IAp.js +26 -0
- package/lib/info-DKCQHKI2-BD_vOCz6.js +3 -0
- package/lib/infoDiagram-FWYZ7A6U-CGZnf03G.js +20 -0
- package/lib/init-sjaVZO3f.js +13 -0
- package/lib/ishikawaDiagram-FXEZZL3T-PFfVM0NO.js +719 -0
- package/lib/journeyDiagram-5HDEW3XC-CRGz7dcx.js +884 -0
- package/lib/kanban-definition-HUTT4EX6-BBH4Yn5e.js +974 -0
- package/lib/line-CJQicKfr.js +34 -0
- package/lib/linear-B9Cv96-J.js +288 -0
- package/lib/map-C7KALUOH.js +241 -0
- package/lib/mermaid-parser.core-BupC9XGF.js +638 -0
- package/lib/mermaid-renderer-Cp0xusfR.js +2425 -0
- package/lib/mindmap-definition-LN4V7U3C-CWL1sg0K.js +978 -0
- package/lib/ordinal-CNQzPcrr.js +65 -0
- package/lib/packet-7NZHBO7P-CgBlALV1.js +3 -0
- package/lib/path-DVvH25eQ.js +84 -0
- package/lib/pegDiagram-2B236MQR-BKv8dTtv.js +94 -0
- package/lib/pie-RZYD4A2V-CryPC-P_.js +3 -0
- package/lib/pieDiagram-ENE6RG2P-CXeFg_cL.js +203 -0
- package/lib/quadrantDiagram-ABIIQ3AL-v_u3aC8Y.js +2001 -0
- package/lib/radar-I7S5WNFK-DgzJDRy3.js +3 -0
- package/lib/railroad-3IZDKUUU-DFp3mbpB.js +3 -0
- package/lib/railroad-abnf-AHOZXSZD-BRjidKH0.js +3 -0
- package/lib/railroad-ebnf-EBAXGLYW-PgrDWact.js +3 -0
- package/lib/railroad-peg-LSFZ7HO6-CMKir81Y.js +3 -0
- package/lib/railroadDiagram-RFXS5EU6-mEC9tVS-.js +76 -0
- package/lib/requirementDiagram-TGXJPOKE-BAEzI7V4.js +2223 -0
- package/lib/rolldown-runtime-DArdT4gl.js +23 -0
- package/lib/rough.esm-B2w_aYoc.js +1361 -0
- package/lib/sankeyDiagram-HTMAVEWB-Dbu-sl2E.js +972 -0
- package/lib/sequenceDiagram-DBY2YBRQ-DCuWmWHX.js +4156 -0
- package/lib/sizeCapture-X5ZJPWSS-BEIM84He.js +46 -0
- package/lib/src-DQbL46sB.js +2139 -0
- package/lib/src-DuuHKEe6.js +704 -0
- package/lib/stateDiagram-2N3HPSRC-fs9QmDMR.js +220 -0
- package/lib/stateDiagram-v2-6OUMAXLB-wWxYbttN.js +30 -0
- package/lib/swimlanes-5IMT3BWC-QaXUd9db.js +5069 -0
- package/lib/swimlanesDiagram-G3AALYLV-BtGToCzH.js +30 -0
- package/lib/timeline-definition-FHXFAJF6-CAsyJrsw.js +1069 -0
- package/lib/treeView-QDETBFTQ-DVp4aTZQ.js +3 -0
- package/lib/treemap-6X3UGDF4-BbBnHMHJ.js +3 -0
- package/lib/types.d.ts +44 -0
- package/lib/v4-CZv9Hsqq.js +33 -0
- package/lib/vennDiagram-L72KCM5P-C87u0gjr.js +1880 -0
- package/lib/wardley-OPB4EBWU-B-RXhnoN.js +3 -0
- package/lib/wardleyDiagram-EHGQE667-BxviBDl_.js +645 -0
- package/lib/xychartDiagram-FW5EYKEG-BQQhanuH.js +2098 -0
- package/package.json +29 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { t as e } from "./init-sjaVZO3f.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/internmap@2.0.3/node_modules/internmap/src/index.js
|
|
3
|
+
var t = class extends Map {
|
|
4
|
+
constructor(e, t = a) {
|
|
5
|
+
if (super(), Object.defineProperties(this, {
|
|
6
|
+
_intern: { value: /* @__PURE__ */ new Map() },
|
|
7
|
+
_key: { value: t }
|
|
8
|
+
}), e != null) for (let [t, n] of e) this.set(t, n);
|
|
9
|
+
}
|
|
10
|
+
get(e) {
|
|
11
|
+
return super.get(n(this, e));
|
|
12
|
+
}
|
|
13
|
+
has(e) {
|
|
14
|
+
return super.has(n(this, e));
|
|
15
|
+
}
|
|
16
|
+
set(e, t) {
|
|
17
|
+
return super.set(r(this, e), t);
|
|
18
|
+
}
|
|
19
|
+
delete(e) {
|
|
20
|
+
return super.delete(i(this, e));
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
function n({ _intern: e, _key: t }, n) {
|
|
24
|
+
let r = t(n);
|
|
25
|
+
return e.has(r) ? e.get(r) : n;
|
|
26
|
+
}
|
|
27
|
+
function r({ _intern: e, _key: t }, n) {
|
|
28
|
+
let r = t(n);
|
|
29
|
+
return e.has(r) ? e.get(r) : (e.set(r, n), n);
|
|
30
|
+
}
|
|
31
|
+
function i({ _intern: e, _key: t }, n) {
|
|
32
|
+
let r = t(n);
|
|
33
|
+
return e.has(r) && (n = e.get(r), e.delete(r)), n;
|
|
34
|
+
}
|
|
35
|
+
function a(e) {
|
|
36
|
+
return typeof e == "object" && e ? e.valueOf() : e;
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/ordinal.js
|
|
40
|
+
var o = Symbol("implicit");
|
|
41
|
+
function s() {
|
|
42
|
+
var n = new t(), r = [], i = [], a = o;
|
|
43
|
+
function c(e) {
|
|
44
|
+
let t = n.get(e);
|
|
45
|
+
if (t === void 0) {
|
|
46
|
+
if (a !== o) return a;
|
|
47
|
+
n.set(e, t = r.push(e) - 1);
|
|
48
|
+
}
|
|
49
|
+
return i[t % i.length];
|
|
50
|
+
}
|
|
51
|
+
return c.domain = function(e) {
|
|
52
|
+
if (!arguments.length) return r.slice();
|
|
53
|
+
r = [], n = new t();
|
|
54
|
+
for (let t of e) n.has(t) || n.set(t, r.push(t) - 1);
|
|
55
|
+
return c;
|
|
56
|
+
}, c.range = function(e) {
|
|
57
|
+
return arguments.length ? (i = Array.from(e), c) : i.slice();
|
|
58
|
+
}, c.unknown = function(e) {
|
|
59
|
+
return arguments.length ? (a = e, c) : a;
|
|
60
|
+
}, c.copy = function() {
|
|
61
|
+
return s(r, i).unknown(a);
|
|
62
|
+
}, e.apply(c, arguments), c;
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { s as t };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/d3-path@3.1.0/node_modules/d3-path/src/path.js
|
|
2
|
+
var e = Math.PI, t = 2 * e, n = 1e-6, r = t - n;
|
|
3
|
+
function i(e) {
|
|
4
|
+
this._ += e[0];
|
|
5
|
+
for (let t = 1, n = e.length; t < n; ++t) this._ += arguments[t] + e[t];
|
|
6
|
+
}
|
|
7
|
+
function a(e) {
|
|
8
|
+
let t = Math.floor(e);
|
|
9
|
+
if (!(t >= 0)) throw Error(`invalid digits: ${e}`);
|
|
10
|
+
if (t > 15) return i;
|
|
11
|
+
let n = 10 ** t;
|
|
12
|
+
return function(e) {
|
|
13
|
+
this._ += e[0];
|
|
14
|
+
for (let t = 1, r = e.length; t < r; ++t) this._ += Math.round(arguments[t] * n) / n + e[t];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
var o = class {
|
|
18
|
+
constructor(e) {
|
|
19
|
+
this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "", this._append = e == null ? i : a(e);
|
|
20
|
+
}
|
|
21
|
+
moveTo(e, t) {
|
|
22
|
+
this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}`;
|
|
23
|
+
}
|
|
24
|
+
closePath() {
|
|
25
|
+
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
|
|
26
|
+
}
|
|
27
|
+
lineTo(e, t) {
|
|
28
|
+
this._append`L${this._x1 = +e},${this._y1 = +t}`;
|
|
29
|
+
}
|
|
30
|
+
quadraticCurveTo(e, t, n, r) {
|
|
31
|
+
this._append`Q${+e},${+t},${this._x1 = +n},${this._y1 = +r}`;
|
|
32
|
+
}
|
|
33
|
+
bezierCurveTo(e, t, n, r, i, a) {
|
|
34
|
+
this._append`C${+e},${+t},${+n},${+r},${this._x1 = +i},${this._y1 = +a}`;
|
|
35
|
+
}
|
|
36
|
+
arcTo(t, r, i, a, o) {
|
|
37
|
+
if (t = +t, r = +r, i = +i, a = +a, o = +o, o < 0) throw Error(`negative radius: ${o}`);
|
|
38
|
+
let s = this._x1, c = this._y1, l = i - t, u = a - r, d = s - t, f = c - r, p = d * d + f * f;
|
|
39
|
+
if (this._x1 === null) this._append`M${this._x1 = t},${this._y1 = r}`;
|
|
40
|
+
else if (p > n) {
|
|
41
|
+
if (!(Math.abs(f * l - u * d) > n) || !o) this._append`L${this._x1 = t},${this._y1 = r}`;
|
|
42
|
+
else {
|
|
43
|
+
let m = i - s, h = a - c, g = l * l + u * u, _ = m * m + h * h, v = Math.sqrt(g), y = Math.sqrt(p), b = o * Math.tan((e - Math.acos((g + p - _) / (2 * v * y))) / 2), x = b / y, S = b / v;
|
|
44
|
+
Math.abs(x - 1) > n && this._append`L${t + x * d},${r + x * f}`, this._append`A${o},${o},0,0,${+(f * m > d * h)},${this._x1 = t + S * l},${this._y1 = r + S * u}`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
arc(i, a, o, s, c, l) {
|
|
49
|
+
if (i = +i, a = +a, o = +o, l = !!l, o < 0) throw Error(`negative radius: ${o}`);
|
|
50
|
+
let u = o * Math.cos(s), d = o * Math.sin(s), f = i + u, p = a + d, m = 1 ^ l, h = l ? s - c : c - s;
|
|
51
|
+
this._x1 === null ? this._append`M${f},${p}` : (Math.abs(this._x1 - f) > n || Math.abs(this._y1 - p) > n) && this._append`L${f},${p}`, o && (h < 0 && (h = h % t + t), h > r ? this._append`A${o},${o},0,1,${m},${i - u},${a - d}A${o},${o},0,1,${m},${this._x1 = f},${this._y1 = p}` : h > n && this._append`A${o},${o},0,${+(h >= e)},${m},${this._x1 = i + o * Math.cos(c)},${this._y1 = a + o * Math.sin(c)}`);
|
|
52
|
+
}
|
|
53
|
+
rect(e, t, n, r) {
|
|
54
|
+
this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}h${n = +n}v${+r}h${-n}Z`;
|
|
55
|
+
}
|
|
56
|
+
toString() {
|
|
57
|
+
return this._;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
o.prototype;
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/constant.js
|
|
63
|
+
function s(e) {
|
|
64
|
+
return function() {
|
|
65
|
+
return e;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/path.js
|
|
70
|
+
function c(e) {
|
|
71
|
+
let t = 3;
|
|
72
|
+
return e.digits = function(n) {
|
|
73
|
+
if (!arguments.length) return t;
|
|
74
|
+
if (n == null) t = null;
|
|
75
|
+
else {
|
|
76
|
+
let e = Math.floor(n);
|
|
77
|
+
if (!(e >= 0)) throw RangeError(`invalid digits: ${n}`);
|
|
78
|
+
t = e;
|
|
79
|
+
}
|
|
80
|
+
return e;
|
|
81
|
+
}, () => new o(t);
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { s as n, c as t };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { t as e, u as t } from "./mermaid-parser.core-BupC9XGF.js";
|
|
2
|
+
import { n } from "./chunk-Y2CYZVJY-QdJ4V9rh.js";
|
|
3
|
+
import { m as r } from "./src-DQbL46sB.js";
|
|
4
|
+
import "./chunk-WYO6CB5R-MV-yOaop.js";
|
|
5
|
+
import { n as i, r as a, t as o } from "./chunk-MOJQB5TN-rQ4AfTd9.js";
|
|
6
|
+
import { t as s } from "./chunk-JWPE2WC7-Ch0jmUXM.js";
|
|
7
|
+
import "./mermaid-renderer-Cp0xusfR.js";
|
|
8
|
+
//#region ../../node_modules/.pnpm/mermaid@11.16.0/node_modules/mermaid/dist/chunks/mermaid.core/pegDiagram-2B236MQR.mjs
|
|
9
|
+
var c = t().RailroadPeg.parser.LangiumParser, l = /* @__PURE__ */ n((e) => {
|
|
10
|
+
let t = e.alternatives.map(u);
|
|
11
|
+
return t.length === 1 ? t[0] : {
|
|
12
|
+
type: "choice",
|
|
13
|
+
alternatives: t
|
|
14
|
+
};
|
|
15
|
+
}, "transformOrderedChoice"), u = /* @__PURE__ */ n((e) => {
|
|
16
|
+
let t = e.elements.map(d);
|
|
17
|
+
return t.length === 1 ? t[0] : {
|
|
18
|
+
type: "sequence",
|
|
19
|
+
elements: t
|
|
20
|
+
};
|
|
21
|
+
}, "transformSequence"), d = /* @__PURE__ */ n((e) => {
|
|
22
|
+
let t = p(e.suffix);
|
|
23
|
+
return e.operator ? {
|
|
24
|
+
type: "special",
|
|
25
|
+
text: e.operator === "&" ? `&${f(t)}` : `!${f(t)}`
|
|
26
|
+
} : t;
|
|
27
|
+
}, "transformPrefix"), f = /* @__PURE__ */ n((e) => {
|
|
28
|
+
switch (e.type) {
|
|
29
|
+
case "terminal": return `"${e.value}"`;
|
|
30
|
+
case "nonterminal": return e.name;
|
|
31
|
+
case "special": return e.text;
|
|
32
|
+
default: return "(...)";
|
|
33
|
+
}
|
|
34
|
+
}, "nodeToLabel"), p = /* @__PURE__ */ n((e) => {
|
|
35
|
+
let t = m(e.primary);
|
|
36
|
+
if (!e.operator) return t;
|
|
37
|
+
switch (e.operator) {
|
|
38
|
+
case "?": return {
|
|
39
|
+
type: "optional",
|
|
40
|
+
element: t
|
|
41
|
+
};
|
|
42
|
+
case "*": return {
|
|
43
|
+
type: "repetition",
|
|
44
|
+
element: t,
|
|
45
|
+
min: 0,
|
|
46
|
+
max: Infinity
|
|
47
|
+
};
|
|
48
|
+
case "+": return {
|
|
49
|
+
type: "repetition",
|
|
50
|
+
element: t,
|
|
51
|
+
min: 1,
|
|
52
|
+
max: Infinity
|
|
53
|
+
};
|
|
54
|
+
default: throw Error(`Unsupported PEG suffix operator: ${e.operator}`);
|
|
55
|
+
}
|
|
56
|
+
}, "transformSuffix"), m = /* @__PURE__ */ n((e) => {
|
|
57
|
+
switch (e.$type) {
|
|
58
|
+
case "PegLiteral": return {
|
|
59
|
+
type: "terminal",
|
|
60
|
+
value: e.value
|
|
61
|
+
};
|
|
62
|
+
case "PegIdentifier": return {
|
|
63
|
+
type: "nonterminal",
|
|
64
|
+
name: e.name
|
|
65
|
+
};
|
|
66
|
+
case "PegGroup": return l(e.element);
|
|
67
|
+
case "PegAny": return {
|
|
68
|
+
type: "special",
|
|
69
|
+
text: e.dot
|
|
70
|
+
};
|
|
71
|
+
default: throw Error(`Unsupported PEG primary node: ${e.$type}`);
|
|
72
|
+
}
|
|
73
|
+
}, "transformPrimary"), h = /* @__PURE__ */ n((e) => ({
|
|
74
|
+
name: e.name,
|
|
75
|
+
definition: l(e.definition)
|
|
76
|
+
}), "transformRule"), g = /* @__PURE__ */ n((e) => {
|
|
77
|
+
s(e, o), e.title && o.setTitle(e.title), e.rules.map((e) => o.addRule(h(e)));
|
|
78
|
+
}, "populateDb"), _ = {
|
|
79
|
+
parser: {
|
|
80
|
+
parse: /* @__PURE__ */ n((t) => {
|
|
81
|
+
o.clear(), r.debug("[PEG Parser] Starting Langium parse");
|
|
82
|
+
let n = c.parse(t);
|
|
83
|
+
if (n.lexerErrors.length > 0 || n.parserErrors.length > 0) throw new e(n);
|
|
84
|
+
let i = n.value;
|
|
85
|
+
r.debug("[PEG Parser] Parsed rules:", i.rules.length), g(i), r.debug("[PEG Parser] Parse complete");
|
|
86
|
+
}, "parse"),
|
|
87
|
+
parser: { yy: o }
|
|
88
|
+
},
|
|
89
|
+
db: o,
|
|
90
|
+
renderer: a,
|
|
91
|
+
styles: i
|
|
92
|
+
};
|
|
93
|
+
//#endregion
|
|
94
|
+
export { _ as diagram };
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { n as e } from "./mermaid-parser.core-BupC9XGF.js";
|
|
2
|
+
import { n as t } from "./chunk-Y2CYZVJY-QdJ4V9rh.js";
|
|
3
|
+
import { m as n } from "./src-DQbL46sB.js";
|
|
4
|
+
import { H as r, K as i, U as a, a as o, c as s, f as c, v as l, w as u, x as d, y as f } from "./chunk-WYO6CB5R-MV-yOaop.js";
|
|
5
|
+
import { t as p } from "./ordinal-CNQzPcrr.js";
|
|
6
|
+
import { n as m } from "./path-DVvH25eQ.js";
|
|
7
|
+
import { m as h } from "./dist-PGS6ynRO.js";
|
|
8
|
+
import { t as g } from "./arc-Dp0rqagO.js";
|
|
9
|
+
import { t as _ } from "./array-CApNbSU9.js";
|
|
10
|
+
import { i as v, p as y } from "./chunk-ICXQ74PX-VqT5WUTt.js";
|
|
11
|
+
import { t as b } from "./chunk-JWPE2WC7-Ch0jmUXM.js";
|
|
12
|
+
import { a as x } from "./mermaid-renderer-Cp0xusfR.js";
|
|
13
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/descending.js
|
|
14
|
+
function S(e, t) {
|
|
15
|
+
return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/identity.js
|
|
19
|
+
function C(e) {
|
|
20
|
+
return e;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/pie.js
|
|
24
|
+
function w() {
|
|
25
|
+
var e = C, t = S, n = null, r = m(0), i = m(h), a = m(0);
|
|
26
|
+
function o(o) {
|
|
27
|
+
var s, c = (o = _(o)).length, l, u, d = 0, f = Array(c), p = Array(c), m = +r.apply(this, arguments), g = Math.min(h, Math.max(-h, i.apply(this, arguments) - m)), v, y = Math.min(Math.abs(g) / c, a.apply(this, arguments)), b = y * (g < 0 ? -1 : 1), x;
|
|
28
|
+
for (s = 0; s < c; ++s) (x = p[f[s] = s] = +e(o[s], s, o)) > 0 && (d += x);
|
|
29
|
+
for (t == null ? n != null && f.sort(function(e, t) {
|
|
30
|
+
return n(o[e], o[t]);
|
|
31
|
+
}) : f.sort(function(e, n) {
|
|
32
|
+
return t(p[e], p[n]);
|
|
33
|
+
}), s = 0, u = d ? (g - c * b) / d : 0; s < c; ++s, m = v) l = f[s], x = p[l], v = m + (x > 0 ? x * u : 0) + b, p[l] = {
|
|
34
|
+
data: o[l],
|
|
35
|
+
index: s,
|
|
36
|
+
value: x,
|
|
37
|
+
startAngle: m,
|
|
38
|
+
endAngle: v,
|
|
39
|
+
padAngle: y
|
|
40
|
+
};
|
|
41
|
+
return p;
|
|
42
|
+
}
|
|
43
|
+
return o.value = function(t) {
|
|
44
|
+
return arguments.length ? (e = typeof t == "function" ? t : m(+t), o) : e;
|
|
45
|
+
}, o.sortValues = function(e) {
|
|
46
|
+
return arguments.length ? (t = e, n = null, o) : t;
|
|
47
|
+
}, o.sort = function(e) {
|
|
48
|
+
return arguments.length ? (n = e, t = null, o) : n;
|
|
49
|
+
}, o.startAngle = function(e) {
|
|
50
|
+
return arguments.length ? (r = typeof e == "function" ? e : m(+e), o) : r;
|
|
51
|
+
}, o.endAngle = function(e) {
|
|
52
|
+
return arguments.length ? (i = typeof e == "function" ? e : m(+e), o) : i;
|
|
53
|
+
}, o.padAngle = function(e) {
|
|
54
|
+
return arguments.length ? (a = typeof e == "function" ? e : m(+e), o) : a;
|
|
55
|
+
}, o;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region ../../node_modules/.pnpm/mermaid@11.16.0/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ENE6RG2P.mjs
|
|
59
|
+
var T = c.pie, E = {
|
|
60
|
+
sections: /* @__PURE__ */ new Map(),
|
|
61
|
+
showData: !1,
|
|
62
|
+
config: T
|
|
63
|
+
}, D = E.sections, O = E.showData, k = structuredClone(T), A = {
|
|
64
|
+
getConfig: /* @__PURE__ */ t(() => structuredClone(k), "getConfig"),
|
|
65
|
+
clear: /* @__PURE__ */ t(() => {
|
|
66
|
+
D = /* @__PURE__ */ new Map(), O = E.showData, o();
|
|
67
|
+
}, "clear"),
|
|
68
|
+
setDiagramTitle: i,
|
|
69
|
+
getDiagramTitle: u,
|
|
70
|
+
setAccTitle: a,
|
|
71
|
+
getAccTitle: f,
|
|
72
|
+
setAccDescription: r,
|
|
73
|
+
getAccDescription: l,
|
|
74
|
+
addSection: /* @__PURE__ */ t(({ label: e, value: t }) => {
|
|
75
|
+
if (t < 0) throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);
|
|
76
|
+
D.has(e) || (D.set(e, t), n.debug(`added new section: ${e}, with value: ${t}`));
|
|
77
|
+
}, "addSection"),
|
|
78
|
+
getSections: /* @__PURE__ */ t(() => D, "getSections"),
|
|
79
|
+
setShowData: /* @__PURE__ */ t((e) => {
|
|
80
|
+
O = e;
|
|
81
|
+
}, "setShowData"),
|
|
82
|
+
getShowData: /* @__PURE__ */ t(() => O, "getShowData")
|
|
83
|
+
}, j = /* @__PURE__ */ t((e, t) => {
|
|
84
|
+
b(e, t), t.setShowData(e.showData), e.sections.map(t.addSection);
|
|
85
|
+
}, "populateDb"), M = { parse: /* @__PURE__ */ t(async (t) => {
|
|
86
|
+
let r = await e("pie", t);
|
|
87
|
+
n.debug(r), j(r, A);
|
|
88
|
+
}, "parse") }, N = /* @__PURE__ */ t((e) => `
|
|
89
|
+
.pieCircle{
|
|
90
|
+
stroke: ${e.pieStrokeColor};
|
|
91
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
92
|
+
opacity : ${e.pieOpacity};
|
|
93
|
+
}
|
|
94
|
+
.pieCircle.highlighted{
|
|
95
|
+
scale: 1.05;
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
.pieCircle.highlightedOnHover:hover{
|
|
99
|
+
transition-duration: 250ms;
|
|
100
|
+
scale: 1.05;
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
.pieOuterCircle{
|
|
104
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
105
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
106
|
+
fill: none;
|
|
107
|
+
}
|
|
108
|
+
.pieTitleText {
|
|
109
|
+
text-anchor: middle;
|
|
110
|
+
font-size: ${e.pieTitleTextSize};
|
|
111
|
+
fill: ${e.pieTitleTextColor};
|
|
112
|
+
font-family: ${e.fontFamily};
|
|
113
|
+
}
|
|
114
|
+
.slice {
|
|
115
|
+
font-family: ${e.fontFamily};
|
|
116
|
+
fill: ${e.pieSectionTextColor};
|
|
117
|
+
font-size:${e.pieSectionTextSize};
|
|
118
|
+
// fill: white;
|
|
119
|
+
}
|
|
120
|
+
.legend text {
|
|
121
|
+
fill: ${e.pieLegendTextColor};
|
|
122
|
+
font-family: ${e.fontFamily};
|
|
123
|
+
font-size: ${e.pieLegendTextSize};
|
|
124
|
+
}
|
|
125
|
+
`, "getStyles"), P = /* @__PURE__ */ t((e) => {
|
|
126
|
+
let t = [...e.values()].reduce((e, t) => e + t, 0), n = [...e.entries()].map(([e, t]) => ({
|
|
127
|
+
label: e,
|
|
128
|
+
value: t
|
|
129
|
+
})).filter((e) => e.value / t * 100 >= 1);
|
|
130
|
+
return w().value((e) => e.value).sort(null)(n);
|
|
131
|
+
}, "createPieArcs"), F = {
|
|
132
|
+
parser: M,
|
|
133
|
+
db: A,
|
|
134
|
+
renderer: { draw: /* @__PURE__ */ t((e, t, r, i) => {
|
|
135
|
+
n.debug("rendering pie chart\n" + e);
|
|
136
|
+
let a = i.db, o = d(), c = v(a.getConfig(), o.pie), l = x(t), u = l.append("g");
|
|
137
|
+
u.attr("transform", "translate(225,225)");
|
|
138
|
+
let { themeVariables: f } = o, [m] = y(f.pieOuterStrokeWidth);
|
|
139
|
+
m ??= 2;
|
|
140
|
+
let h = c.legendPosition, _ = c.textPosition, b = c.donutHole > 0 && c.donutHole <= .9 ? c.donutHole : 0, S = g().innerRadius(b * 185).outerRadius(185), C = g().innerRadius(185 * _).outerRadius(185 * _), w = u.append("g");
|
|
141
|
+
w.append("circle").attr("cx", 0).attr("cy", 0).attr("r", 185 + m / 2).attr("class", "pieOuterCircle");
|
|
142
|
+
let T = a.getSections(), E = P(T), D = [
|
|
143
|
+
f.pie1,
|
|
144
|
+
f.pie2,
|
|
145
|
+
f.pie3,
|
|
146
|
+
f.pie4,
|
|
147
|
+
f.pie5,
|
|
148
|
+
f.pie6,
|
|
149
|
+
f.pie7,
|
|
150
|
+
f.pie8,
|
|
151
|
+
f.pie9,
|
|
152
|
+
f.pie10,
|
|
153
|
+
f.pie11,
|
|
154
|
+
f.pie12
|
|
155
|
+
], O = 0;
|
|
156
|
+
T.forEach((e) => {
|
|
157
|
+
O += e;
|
|
158
|
+
});
|
|
159
|
+
let k = E.filter((e) => (e.data.value / O * 100).toFixed(0) !== "0"), A = p(D).domain([...T.keys()]);
|
|
160
|
+
w.selectAll("mySlices").data(k).enter().append("path").attr("d", S).attr("fill", (e) => A(e.data.label)).attr("class", (e) => {
|
|
161
|
+
let t = "pieCircle";
|
|
162
|
+
return c.highlightSlice === "hover" ? t += " highlightedOnHover" : c.highlightSlice === e.data.label && (t += " highlighted"), t;
|
|
163
|
+
}), w.selectAll("mySlices").data(k).enter().append("text").text((e) => (e.data.value / O * 100).toFixed(0) + "%").attr("transform", (e) => "translate(" + C.centroid(e) + ")").style("text-anchor", "middle").attr("class", "slice");
|
|
164
|
+
let j = u.append("text").text(a.getDiagramTitle()).attr("x", 0).attr("y", -200).attr("class", "pieTitleText"), M = [...T.entries()].map(([e, t]) => ({
|
|
165
|
+
label: e,
|
|
166
|
+
value: t
|
|
167
|
+
})), N = u.selectAll(".legend").data(M).enter().append("g").attr("class", "legend");
|
|
168
|
+
N.append("rect").attr("width", 18).attr("height", 18).style("fill", (e) => A(e.label)).style("stroke", (e) => A(e.label)), N.append("text").attr("x", 22).attr("y", 14).text((e) => a.getShowData() ? `${e.label} [${e.value}]` : e.label);
|
|
169
|
+
let F = Math.max(...N.selectAll("text").nodes().map((e) => e?.getBoundingClientRect().width ?? 0)), I = 450, L = 490, R = M.length * 22;
|
|
170
|
+
switch (h) {
|
|
171
|
+
case "center":
|
|
172
|
+
N.attr("transform", (e, t) => {
|
|
173
|
+
let n = 22 * M.length / 2, r = -F / 2 - 22, i = t * 22 - n;
|
|
174
|
+
return "translate(" + r + "," + i + ")";
|
|
175
|
+
});
|
|
176
|
+
break;
|
|
177
|
+
case "top":
|
|
178
|
+
I += R, N.attr("transform", (e, t) => `translate(${-F / 2 - 22}, ${t * 22 - 185})`), w.attr("transform", () => `translate(0, ${R + 22})`);
|
|
179
|
+
break;
|
|
180
|
+
case "bottom":
|
|
181
|
+
I += R, N.attr("transform", (e, t) => {
|
|
182
|
+
let n = -F / 2 - 22, r = t * 22 - -207;
|
|
183
|
+
return "translate(" + n + "," + r + ")";
|
|
184
|
+
});
|
|
185
|
+
break;
|
|
186
|
+
case "left":
|
|
187
|
+
L += 22 + F, N.attr("transform", (e, t) => {
|
|
188
|
+
let n = 22 * M.length / 2;
|
|
189
|
+
return "translate(-207," + (t * 22 - n) + ")";
|
|
190
|
+
}), w.attr("transform", () => `translate(${F + 18 + 4}, 0)`);
|
|
191
|
+
break;
|
|
192
|
+
default: L += 22 + F, N.attr("transform", (e, t) => {
|
|
193
|
+
let n = 22 * M.length / 2;
|
|
194
|
+
return "translate(216," + (t * 22 - n) + ")";
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
let z = j.node()?.getBoundingClientRect().width ?? 0, B = 225 - z / 2, V = 225 + z / 2, H = Math.min(0, B), U = Math.max(L, V) - H;
|
|
198
|
+
l.attr("viewBox", `${H} 0 ${U} ${I}`), s(l, I, U, c.useMaxWidth);
|
|
199
|
+
}, "draw") },
|
|
200
|
+
styles: N
|
|
201
|
+
};
|
|
202
|
+
//#endregion
|
|
203
|
+
export { F as diagram };
|