@antdv-next/x 1.0.2-beta.2 → 1.0.2-beta.4
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/actions/Actions.js +1 -1
- package/dist/attachments/index.js +1 -1
- package/dist/conversations/index.js +1 -1
- package/dist/file-card/FileCard.js +1 -1
- package/dist/file-card/List.js +1 -1
- package/dist/index.umd.js +25 -25
- package/dist/locale/useLocale.js +1 -1
- package/dist/mermaid/Mermaid.js +1 -1
- package/dist/package.js +1 -1
- package/dist/prompts/Prompts.js +1 -1
- package/dist/sender/Sender.js +1 -1
- package/dist/sender/SenderHeader.js +1 -1
- package/dist/sender/SenderSwitch.js +1 -1
- package/dist/sources/Sources.js +1 -1
- package/dist/suggestion/Suggestion.js +1 -1
- package/dist/theme/genStyleUtils.js +1 -1
- package/dist/think/Think.js +1 -1
- package/dist/thought-chain/Item.js +1 -1
- package/dist/thought-chain/Node.js +1 -1
- package/dist/thought-chain/ThoughtChain.js +1 -1
- package/dist/welcome/index.js +1 -1
- package/dist/x-provider/hooks/use-x-provider-context.js +1 -1
- package/es/{Serializer-y_SfSPKv.js → Serializer-D1JYN1kI.js} +4 -4
- package/es/{_basePickBy-DPqob0cQ.js → _basePickBy-DFHEGO2M.js} +23 -23
- package/es/{_baseUniq-AMhRdOMz.js → _baseUniq-BlS7rXTs.js} +83 -83
- package/es/antdv-next-x.esm.js +44833 -7290
- package/es/{arc-caEkbRYF.js → arc-BuXEd18J.js} +3 -3
- package/es/architecture-PBZL5I3N-D7tS55xM.js +3 -0
- package/es/{architectureDiagram-2XIMDMQ5-ZOgJV9Kg.js → architectureDiagram-2XIMDMQ5-CmfsCwJk.js} +85 -85
- package/es/{blockDiagram-WCTKOSBZ-8iZwAKBK.js → blockDiagram-WCTKOSBZ-lJAan65A.js} +530 -530
- package/es/{c4Diagram-IC4MRINW-DrH9eRMR.js → c4Diagram-IC4MRINW-B1c2x_1Q.js} +170 -170
- package/es/channel-DFgF_2F7.js +5 -0
- package/es/{chunk-4BX2VUAB-DUVpjbJi.js → chunk-4BX2VUAB-J2N81Fpp.js} +2 -2
- package/es/{chunk-55IACEB6-RlJ-J3tE.js → chunk-55IACEB6-DGtfGRgi.js} +2 -2
- package/es/{chunk-7E7YKBS2-ChLFamzc.js → chunk-7E7YKBS2-CL2d4WAf.js} +2 -2
- package/es/{chunk-7R4GIKGN-B9vamSzt.js → chunk-7R4GIKGN-QT6IorJ_.js} +3 -3
- package/es/{chunk-C72U2L5F-BV-rXau1.js → chunk-C72U2L5F-OHTVpS-m.js} +2 -2
- package/es/{chunk-EGIJ26TM-GvsuORRL.js → chunk-EGIJ26TM-DyMPGYrB.js} +2 -2
- package/es/{chunk-FMBD7UC4-D6ZlqqMC.js → chunk-FMBD7UC4-DCcRjunY.js} +2 -2
- package/es/{chunk-GEFDOKGD-DM6dsEsk.js → chunk-GEFDOKGD-BWpC-zoH.js} +278 -278
- package/es/chunk-GLR3WWYH-DiXcKb5Y.js +41 -0
- package/es/{chunk-HHEYEP7N-FVfYw94p.js → chunk-HHEYEP7N-Cxc7E4dX.js} +3 -3
- package/es/{chunk-JSJVCQXG-Wr9uPcCh.js → chunk-JSJVCQXG-D8_heHOp.js} +4 -4
- package/es/{chunk-KX2RTZJC-BGffjoxB.js → chunk-KX2RTZJC-D5cc4rj6.js} +3 -3
- package/es/{chunk-KYZI473N-Bit5smNE.js → chunk-KYZI473N-BHJ3T5Zv.js} +573 -573
- package/es/{chunk-L3YUKLVL-DBuHDpQ2.js → chunk-L3YUKLVL-7oGaUOdc.js} +2 -2
- package/es/{chunk-MX3YWQON-Cbj2WwUZ.js → chunk-MX3YWQON-BxE-Aq9c.js} +2 -2
- package/es/{chunk-NQ4KR5QH-FPQ-IHJN.js → chunk-NQ4KR5QH-EYQBXkqP.js} +120 -120
- package/es/{chunk-O4XLMI2P-BCDk0ZIW.js → chunk-O4XLMI2P-qjOoGpnx.js} +238 -238
- package/es/{chunk-OZEHJAEY-BZ24IOgQ.js → chunk-OZEHJAEY-D82nx27s.js} +2 -2
- package/es/{chunk-PQ6SQG4A-DpwBx6Hx.js → chunk-PQ6SQG4A-D3jtNCWN.js} +3 -3
- package/es/{chunk-PU5JKC2W-BNpJuXxn.js → chunk-PU5JKC2W-DdP8BS-S.js} +76 -76
- package/es/{chunk-QZHKN3VN-NEMwPryC.js → chunk-QZHKN3VN-CW3cFN-h.js} +2 -2
- package/es/{chunk-R5LLSJPH-g44vgerl.js → chunk-R5LLSJPH-CreI2kO9.js} +2 -2
- package/es/{chunk-WL4C6EOR-B6l-Yy2t.js → chunk-WL4C6EOR-BDbxJyGk.js} +120 -120
- package/es/{chunk-XIRO2GV7-CaFInIOW.js → chunk-XIRO2GV7-S5KkbVnN.js} +2 -2
- package/es/{chunk-XPW4576I-Cp1j6iTN.js → chunk-XPW4576I-B0KVSHwE.js} +2 -2
- package/es/{chunk-XZSTWKYB-CGk7ipHd.js → chunk-XZSTWKYB-CucN1XvM.js} +93 -93
- package/es/{chunk-YBOYWFTD-dOTBpTYs.js → chunk-YBOYWFTD-CvaddD9G.js} +8 -8
- package/es/classDiagram-VBA2DB6C-Co3LMmg8.js +29 -0
- package/es/classDiagram-v2-RAHNMMFH-BZscgdF2.js +29 -0
- package/es/clone-r3YukIBB.js +8 -0
- package/es/{cose-bilkent-S5V4N54A-DlmXyn6m.js → cose-bilkent-S5V4N54A-B5OQuIhl.js} +3 -3
- package/es/{cytoscape.esm-BY3wHcbp.js → cytoscape.esm-i2CZcWd-.js} +1 -1
- package/es/{dagre-B1qTL793.js → dagre-5aGJFKmT.js} +57 -57
- package/es/dagre-KLK3FWXG-BI5QQMXo.js +294 -0
- package/es/{defaultLocale-BaPFSbai.js → defaultLocale-bckJcYh1.js} +12 -12
- package/es/{diagram-E7M64L7V-Dnd8N74o.js → diagram-E7M64L7V-Dz62Vz_a.js} +83 -83
- package/es/{diagram-IFDJBPK2-Dan7RsGr.js → diagram-IFDJBPK2-9fjvFkSc.js} +31 -31
- package/es/{diagram-P4PSJMXO-DwKJpttH.js → diagram-P4PSJMXO-BlX6jFjZ.js} +32 -32
- package/es/{dist-DltyvPj3.js → dist-BX_roQzC.js} +1 -1
- package/es/{erDiagram-INFDFZHY-CGO6k23w.js → erDiagram-INFDFZHY-BcRXu8Cp.js} +128 -128
- package/es/{flowDiagram-PKNHOUZH-DFN1GsRx.js → flowDiagram-PKNHOUZH-UeyfgU8z.js} +156 -156
- package/es/{ganttDiagram-A5KZAMGK-Cf5NxH1w.js → ganttDiagram-A5KZAMGK-txCzqgQ5.js} +625 -622
- package/es/gitGraph-HDMCJU4V-CxsS0Qr1.js +3 -0
- package/es/{gitGraphDiagram-K3NZZRJ6-BgE6aSZO.js → gitGraphDiagram-K3NZZRJ6-DghWYaFU.js} +176 -176
- package/es/{graphlib-DFxSohCv.js → graphlib-dRkI1OCL.js} +4 -4
- package/es/{html-C2-_98S6.js → html-B6UxjOv0.js} +1 -1
- package/es/html-Hb1oe8XT.js +2 -0
- package/es/info-3K5VOQVL-COqdvM99.js +3 -0
- package/es/{infoDiagram-LFFYTUFH-WcApcdl5.js → infoDiagram-LFFYTUFH-CA-vlAvP.js} +5 -5
- package/es/{init-PAs0hR-b.js → init-B75p2clj.js} +1 -1
- package/es/{isArrayLikeObject-BEG9p74d.js → isArrayLikeObject-jl2bjkAJ.js} +80 -80
- package/es/{isEmpty-B1YrVV8B.js → isEmpty-CmA-HYrg.js} +3 -3
- package/es/{ishikawaDiagram-PHBUUO56-DwK7J31a.js → ishikawaDiagram-PHBUUO56-DjdpS9Lb.js} +67 -67
- package/es/{journeyDiagram-4ABVD52K-CWuA57by.js → journeyDiagram-4ABVD52K-CIJfC1fp.js} +6 -6
- package/es/{kanban-definition-K7BYSVSG-DBt3gYRQ.js → kanban-definition-K7BYSVSG-CC2vwGck.js} +11 -11
- package/es/{katex-OR8z_f6I.js → katex-DCMiIo1z.js} +1 -1
- package/es/{line-zOBKZCP5.js → line-Cu9NTacD.js} +4 -4
- package/es/{linear-DttXWw4q.js → linear-C0rAYYmp.js} +23 -23
- package/es/{math-DPzKeDKn.js → math-CoDOuve-.js} +1 -1
- package/es/{mermaid-parser.core-CWNEdmZ_.js → mermaid-parser.core-7Wn2L29P.js} +16 -16
- package/es/{mermaid.core-DPBXXViR.js → mermaid.core-Bvy_Q6Hu.js} +208 -208
- package/es/{mindmap-definition-YRQLILUH-Bq2xqboX.js → mindmap-definition-YRQLILUH-BzTYDYmK.js} +16 -16
- package/es/{ordinal-D8PKtxfM.js → ordinal-F3U6aXtP.js} +3 -3
- package/es/packet-RMMSAZCW-2PTjWKLd.js +3 -0
- package/es/{path-DZ-6AyWK.js → path-Dm3C8WEs.js} +3 -3
- package/es/pie-UPGHQEXC-Du8-k-EA.js +3 -0
- package/es/{pieDiagram-SKSYHLDU-D4iMzwzH.js → pieDiagram-SKSYHLDU-COvqE_C6.js} +32 -32
- package/es/{quadrantDiagram-337W2JSQ-DSbXC0z6.js → quadrantDiagram-337W2JSQ-Dgv8ccjt.js} +4 -4
- package/es/radar-KQ55EAFF-jJOhyjxC.js +3 -0
- package/es/{requirementDiagram-Z7DCOOCP-D7eLn3fs.js → requirementDiagram-Z7DCOOCP-B2NyhxO-.js} +59 -59
- package/es/{rough.esm-C_hJ3ICT.js → rough.esm-BhGP2Udb.js} +1 -1
- package/es/{sankeyDiagram-WA2Y5GQK-DN5ZPgWU.js → sankeyDiagram-WA2Y5GQK-BfnH_gpl.js} +18 -18
- package/es/{sequenceDiagram-2WXFIKYE-CRFEBP8-.js → sequenceDiagram-2WXFIKYE-DXssVQOF.js} +390 -390
- package/es/{src-BH16DVv0.js → src-CUQ6oOYk.js} +86 -86
- package/es/{stateDiagram-RAJIS63D-CfO23QJX.js → stateDiagram-RAJIS63D-DvDLfupV.js} +68 -68
- package/es/stateDiagram-v2-FVOUBMTO-DIXyaX9W.js +27 -0
- package/es/{timeline-definition-YZTLITO2-DmpPrD-3.js → timeline-definition-YZTLITO2-ErcRjbZf.js} +4 -4
- package/es/treemap-KZPCXAKY-CvZAIYVa.js +3 -0
- package/es/{vennDiagram-LZ73GAT5-B80Xr4jV.js → vennDiagram-LZ73GAT5-CDTZUtc8.js} +107 -107
- package/es/{vue-DTiWrQBM.js → vue-2aJw7p5p.js} +2 -2
- package/es/{vue-html-BG3Xflut.js → vue-html-DEjI8X9t.js} +1 -1
- package/es/{xychartDiagram-JWTSCODW-DvQyPDr4.js → xychartDiagram-JWTSCODW-Y21jBOTg.js} +103 -103
- package/package.json +1 -1
- package/es/architecture-PBZL5I3N-CBmkTWjb.js +0 -3
- package/es/channel-DIQFjdG3.js +0 -5
- package/es/chunk-GLR3WWYH-CqFdLic9.js +0 -41
- package/es/classDiagram-VBA2DB6C-B3yBiQy3.js +0 -29
- package/es/classDiagram-v2-RAHNMMFH-jbFYm_Xj.js +0 -29
- package/es/clone-DXVS0uSx.js +0 -8
- package/es/dagre-KLK3FWXG-CEhXRLVR.js +0 -294
- package/es/gitGraph-HDMCJU4V-CrEEHSZS.js +0 -3
- package/es/html-JbFqcNgP.js +0 -2
- package/es/info-3K5VOQVL-Dg3DCp4F.js +0 -3
- package/es/packet-RMMSAZCW-Dk7mKMJ4.js +0 -3
- package/es/pie-UPGHQEXC-CnM5YLNO.js +0 -3
- package/es/radar-KQ55EAFF-BwfADDx8.js +0 -3
- package/es/stateDiagram-v2-FVOUBMTO-BGWbXepL.js +0 -27
- package/es/treemap-KZPCXAKY-BWfn7JxQ.js +0 -3
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { D as l, L as u, a as d, b as f, c as p, nt as m, s as h, w as g, y as _ } from "./chunk-7R4GIKGN-
|
|
6
|
-
import { t as v } from "./channel-
|
|
7
|
-
import { t as y } from "./line-
|
|
8
|
-
import { n as b } from "./chunk-PU5JKC2W-
|
|
9
|
-
import { t as x } from "./chunk-FMBD7UC4-
|
|
10
|
-
import { n as S, t as C } from "./chunk-MX3YWQON-
|
|
11
|
-
import { n as w, t as T } from "./chunk-YBOYWFTD-
|
|
12
|
-
//#region ../../node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-WCTKOSBZ.mjs
|
|
1
|
+
import { g as e, h as t, p as n } from "./src-CUQ6oOYk.js";
|
|
2
|
+
import { T as r, c as i, h as a, i as o } from "./chunk-GEFDOKGD-BWpC-zoH.js";
|
|
3
|
+
import { t as s } from "./clone-r3YukIBB.js";
|
|
4
|
+
import { t as c } from "./graphlib-dRkI1OCL.js";
|
|
5
|
+
import { D as l, L as u, a as d, b as f, c as p, nt as m, s as h, w as g, y as _ } from "./chunk-7R4GIKGN-QT6IorJ_.js";
|
|
6
|
+
import { t as v } from "./channel-DFgF_2F7.js";
|
|
7
|
+
import { t as y } from "./line-Cu9NTacD.js";
|
|
8
|
+
import { n as b } from "./chunk-PU5JKC2W-DdP8BS-S.js";
|
|
9
|
+
import { t as x } from "./chunk-FMBD7UC4-DCcRjunY.js";
|
|
10
|
+
import { n as S, t as C } from "./chunk-MX3YWQON-BxE-Aq9c.js";
|
|
11
|
+
import { n as w, t as T } from "./chunk-YBOYWFTD-CvaddD9G.js";
|
|
12
|
+
//#region ../../node_modules/.pnpm/mermaid@11.13.0/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-WCTKOSBZ.mjs
|
|
13
13
|
var E = (function() {
|
|
14
|
-
var e = /* @__PURE__ */
|
|
14
|
+
var e = /* @__PURE__ */ t(function(e, t, n, r) {
|
|
15
15
|
for (n ||= {}, r = e.length; r--; n[e[r]] = t);
|
|
16
16
|
return n;
|
|
17
|
-
}, "o"),
|
|
17
|
+
}, "o"), n = [1, 15], r = [1, 7], i = [1, 13], a = [1, 14], o = [1, 19], s = [1, 16], c = [1, 17], l = [1, 18], u = [8, 30], d = [
|
|
18
18
|
8,
|
|
19
19
|
10,
|
|
20
20
|
21,
|
|
@@ -53,7 +53,7 @@ var E = (function() {
|
|
|
53
53
|
43,
|
|
54
54
|
46
|
|
55
55
|
], g = [1, 49], _ = {
|
|
56
|
-
trace: /* @__PURE__ */
|
|
56
|
+
trace: /* @__PURE__ */ t(function() {}, "trace"),
|
|
57
57
|
yy: {},
|
|
58
58
|
symbols_: {
|
|
59
59
|
error: 2,
|
|
@@ -180,7 +180,7 @@ var E = (function() {
|
|
|
180
180
|
[24, 3],
|
|
181
181
|
[25, 3]
|
|
182
182
|
],
|
|
183
|
-
performAction: /* @__PURE__ */
|
|
183
|
+
performAction: /* @__PURE__ */ t(function(e, t, n, r, i, a, o) {
|
|
184
184
|
var s = a.length - 1;
|
|
185
185
|
switch (i) {
|
|
186
186
|
case 4:
|
|
@@ -363,21 +363,21 @@ var E = (function() {
|
|
|
363
363
|
},
|
|
364
364
|
{ 1: [3] },
|
|
365
365
|
{
|
|
366
|
-
10:
|
|
366
|
+
10: n,
|
|
367
367
|
11: 3,
|
|
368
368
|
13: 4,
|
|
369
369
|
19: 5,
|
|
370
370
|
20: 6,
|
|
371
|
-
21:
|
|
371
|
+
21: r,
|
|
372
372
|
22: 8,
|
|
373
373
|
23: 9,
|
|
374
374
|
24: 10,
|
|
375
375
|
25: 11,
|
|
376
376
|
26: 12,
|
|
377
|
-
28:
|
|
378
|
-
29:
|
|
379
|
-
31:
|
|
380
|
-
39:
|
|
377
|
+
28: i,
|
|
378
|
+
29: a,
|
|
379
|
+
31: o,
|
|
380
|
+
39: s,
|
|
381
381
|
43: c,
|
|
382
382
|
46: l
|
|
383
383
|
},
|
|
@@ -392,12 +392,12 @@ var E = (function() {
|
|
|
392
392
|
25: 11,
|
|
393
393
|
26: 12,
|
|
394
394
|
11: 21,
|
|
395
|
-
10:
|
|
396
|
-
21:
|
|
397
|
-
28:
|
|
398
|
-
29:
|
|
399
|
-
31:
|
|
400
|
-
39:
|
|
395
|
+
10: n,
|
|
396
|
+
21: r,
|
|
397
|
+
28: i,
|
|
398
|
+
29: a,
|
|
399
|
+
31: o,
|
|
400
|
+
39: s,
|
|
401
401
|
43: c,
|
|
402
402
|
46: l
|
|
403
403
|
}),
|
|
@@ -417,24 +417,24 @@ var E = (function() {
|
|
|
417
417
|
{
|
|
418
418
|
19: 26,
|
|
419
419
|
26: 12,
|
|
420
|
-
31:
|
|
420
|
+
31: o
|
|
421
421
|
},
|
|
422
422
|
{
|
|
423
|
-
10:
|
|
423
|
+
10: n,
|
|
424
424
|
11: 27,
|
|
425
425
|
13: 4,
|
|
426
426
|
19: 5,
|
|
427
427
|
20: 6,
|
|
428
|
-
21:
|
|
428
|
+
21: r,
|
|
429
429
|
22: 8,
|
|
430
430
|
23: 9,
|
|
431
431
|
24: 10,
|
|
432
432
|
25: 11,
|
|
433
433
|
26: 12,
|
|
434
|
-
28:
|
|
435
|
-
29:
|
|
436
|
-
31:
|
|
437
|
-
39:
|
|
434
|
+
28: i,
|
|
435
|
+
29: a,
|
|
436
|
+
31: o,
|
|
437
|
+
39: s,
|
|
438
438
|
43: c,
|
|
439
439
|
46: l
|
|
440
440
|
},
|
|
@@ -453,13 +453,13 @@ var E = (function() {
|
|
|
453
453
|
e(u, [2, 13]),
|
|
454
454
|
{
|
|
455
455
|
26: 35,
|
|
456
|
-
31:
|
|
456
|
+
31: o
|
|
457
457
|
},
|
|
458
458
|
{ 31: [2, 14] },
|
|
459
459
|
{ 17: [1, 36] },
|
|
460
460
|
e(m, [2, 24]),
|
|
461
461
|
{
|
|
462
|
-
10:
|
|
462
|
+
10: n,
|
|
463
463
|
11: 37,
|
|
464
464
|
13: 4,
|
|
465
465
|
14: 22,
|
|
@@ -467,16 +467,16 @@ var E = (function() {
|
|
|
467
467
|
16: p,
|
|
468
468
|
19: 5,
|
|
469
469
|
20: 6,
|
|
470
|
-
21:
|
|
470
|
+
21: r,
|
|
471
471
|
22: 8,
|
|
472
472
|
23: 9,
|
|
473
473
|
24: 10,
|
|
474
474
|
25: 11,
|
|
475
475
|
26: 12,
|
|
476
|
-
28:
|
|
477
|
-
29:
|
|
478
|
-
31:
|
|
479
|
-
39:
|
|
476
|
+
28: i,
|
|
477
|
+
29: a,
|
|
478
|
+
31: o,
|
|
479
|
+
39: s,
|
|
480
480
|
43: c,
|
|
481
481
|
46: l
|
|
482
482
|
},
|
|
@@ -520,34 +520,34 @@ var E = (function() {
|
|
|
520
520
|
50: [2, 15],
|
|
521
521
|
52: [2, 32]
|
|
522
522
|
},
|
|
523
|
-
parseError: /* @__PURE__ */
|
|
523
|
+
parseError: /* @__PURE__ */ t(function(e, t) {
|
|
524
524
|
if (t.recoverable) this.trace(e);
|
|
525
525
|
else {
|
|
526
526
|
var n = Error(e);
|
|
527
527
|
throw n.hash = t, n;
|
|
528
528
|
}
|
|
529
529
|
}, "parseError"),
|
|
530
|
-
parse: /* @__PURE__ */
|
|
531
|
-
var
|
|
530
|
+
parse: /* @__PURE__ */ t(function(e) {
|
|
531
|
+
var n = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
|
|
532
532
|
for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
|
|
533
533
|
h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
|
|
534
534
|
var v = h.yylloc;
|
|
535
|
-
|
|
535
|
+
o.push(v);
|
|
536
536
|
var y = h.options && h.options.ranges;
|
|
537
537
|
typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
538
538
|
function b(e) {
|
|
539
|
-
|
|
539
|
+
r.length -= 2 * e, a.length -= e, o.length -= e;
|
|
540
540
|
}
|
|
541
|
-
|
|
541
|
+
t(b, "popStack");
|
|
542
542
|
function x() {
|
|
543
|
-
var e =
|
|
544
|
-
return typeof e != "number" && (e instanceof Array && (
|
|
543
|
+
var e = i.pop() || h.lex() || p;
|
|
544
|
+
return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
|
|
545
545
|
}
|
|
546
|
-
|
|
546
|
+
t(x, "lex");
|
|
547
547
|
for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
|
|
548
|
-
if (w =
|
|
548
|
+
if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
|
|
549
549
|
var M = "";
|
|
550
|
-
for (O in j = [],
|
|
550
|
+
for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
|
|
551
551
|
M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
|
|
552
552
|
text: h.match,
|
|
553
553
|
token: this.terminals_[S] || S,
|
|
@@ -559,24 +559,24 @@ var E = (function() {
|
|
|
559
559
|
if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
|
|
560
560
|
switch (T[0]) {
|
|
561
561
|
case 1:
|
|
562
|
-
|
|
562
|
+
r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
|
|
563
563
|
break;
|
|
564
564
|
case 2:
|
|
565
|
-
if (k = this.productions_[T[1]][1], D.$ =
|
|
566
|
-
first_line:
|
|
567
|
-
last_line:
|
|
568
|
-
first_column:
|
|
569
|
-
last_column:
|
|
570
|
-
}, y && (D._$.range = [
|
|
565
|
+
if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
|
|
566
|
+
first_line: o[o.length - (k || 1)].first_line,
|
|
567
|
+
last_line: o[o.length - 1].last_line,
|
|
568
|
+
first_column: o[o.length - (k || 1)].first_column,
|
|
569
|
+
last_column: o[o.length - 1].last_column
|
|
570
|
+
}, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
|
|
571
571
|
c,
|
|
572
572
|
u,
|
|
573
573
|
l,
|
|
574
574
|
g.yy,
|
|
575
575
|
T[1],
|
|
576
|
-
|
|
577
|
-
|
|
576
|
+
a,
|
|
577
|
+
o
|
|
578
578
|
].concat(m)), E !== void 0) return E;
|
|
579
|
-
k && (
|
|
579
|
+
k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
|
|
580
580
|
break;
|
|
581
581
|
case 3: return !0;
|
|
582
582
|
}
|
|
@@ -587,11 +587,11 @@ var E = (function() {
|
|
|
587
587
|
_.lexer = /* @__PURE__ */ (function() {
|
|
588
588
|
return {
|
|
589
589
|
EOF: 1,
|
|
590
|
-
parseError: /* @__PURE__ */
|
|
590
|
+
parseError: /* @__PURE__ */ t(function(e, t) {
|
|
591
591
|
if (this.yy.parser) this.yy.parser.parseError(e, t);
|
|
592
592
|
else throw Error(e);
|
|
593
593
|
}, "parseError"),
|
|
594
|
-
setInput: /* @__PURE__ */
|
|
594
|
+
setInput: /* @__PURE__ */ t(function(e, t) {
|
|
595
595
|
return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
596
596
|
first_line: 1,
|
|
597
597
|
first_column: 0,
|
|
@@ -599,11 +599,11 @@ var E = (function() {
|
|
|
599
599
|
last_column: 0
|
|
600
600
|
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
601
601
|
}, "setInput"),
|
|
602
|
-
input: /* @__PURE__ */
|
|
602
|
+
input: /* @__PURE__ */ t(function() {
|
|
603
603
|
var e = this._input[0];
|
|
604
604
|
return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
|
|
605
605
|
}, "input"),
|
|
606
|
-
unput: /* @__PURE__ */
|
|
606
|
+
unput: /* @__PURE__ */ t(function(e) {
|
|
607
607
|
var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
|
|
608
608
|
this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
|
|
609
609
|
var r = this.match.split(/(?:\r\n?|\n)/g);
|
|
@@ -616,10 +616,10 @@ var E = (function() {
|
|
|
616
616
|
last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
|
|
617
617
|
}, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
|
|
618
618
|
}, "unput"),
|
|
619
|
-
more: /* @__PURE__ */
|
|
619
|
+
more: /* @__PURE__ */ t(function() {
|
|
620
620
|
return this._more = !0, this;
|
|
621
621
|
}, "more"),
|
|
622
|
-
reject: /* @__PURE__ */
|
|
622
|
+
reject: /* @__PURE__ */ t(function() {
|
|
623
623
|
if (this.options.backtrack_lexer) this._backtrack = !0;
|
|
624
624
|
else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
|
|
625
625
|
text: "",
|
|
@@ -628,22 +628,22 @@ var E = (function() {
|
|
|
628
628
|
});
|
|
629
629
|
return this;
|
|
630
630
|
}, "reject"),
|
|
631
|
-
less: /* @__PURE__ */
|
|
631
|
+
less: /* @__PURE__ */ t(function(e) {
|
|
632
632
|
this.unput(this.match.slice(e));
|
|
633
633
|
}, "less"),
|
|
634
|
-
pastInput: /* @__PURE__ */
|
|
634
|
+
pastInput: /* @__PURE__ */ t(function() {
|
|
635
635
|
var e = this.matched.substr(0, this.matched.length - this.match.length);
|
|
636
636
|
return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
|
|
637
637
|
}, "pastInput"),
|
|
638
|
-
upcomingInput: /* @__PURE__ */
|
|
638
|
+
upcomingInput: /* @__PURE__ */ t(function() {
|
|
639
639
|
var e = this.match;
|
|
640
640
|
return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
641
641
|
}, "upcomingInput"),
|
|
642
|
-
showPosition: /* @__PURE__ */
|
|
642
|
+
showPosition: /* @__PURE__ */ t(function() {
|
|
643
643
|
var e = this.pastInput(), t = Array(e.length + 1).join("-");
|
|
644
644
|
return e + this.upcomingInput() + "\n" + t + "^";
|
|
645
645
|
}, "showPosition"),
|
|
646
|
-
test_match: /* @__PURE__ */
|
|
646
|
+
test_match: /* @__PURE__ */ t(function(e, t) {
|
|
647
647
|
var n, r, i;
|
|
648
648
|
if (this.options.backtrack_lexer && (i = {
|
|
649
649
|
yylineno: this.yylineno,
|
|
@@ -676,7 +676,7 @@ var E = (function() {
|
|
|
676
676
|
}
|
|
677
677
|
return !1;
|
|
678
678
|
}, "test_match"),
|
|
679
|
-
next: /* @__PURE__ */
|
|
679
|
+
next: /* @__PURE__ */ t(function() {
|
|
680
680
|
if (this.done) return this.EOF;
|
|
681
681
|
this._input || (this.done = !0);
|
|
682
682
|
var e, t, n, r;
|
|
@@ -696,29 +696,29 @@ var E = (function() {
|
|
|
696
696
|
line: this.yylineno
|
|
697
697
|
});
|
|
698
698
|
}, "next"),
|
|
699
|
-
lex: /* @__PURE__ */
|
|
699
|
+
lex: /* @__PURE__ */ t(function() {
|
|
700
700
|
return this.next() || this.lex();
|
|
701
701
|
}, "lex"),
|
|
702
|
-
begin: /* @__PURE__ */
|
|
702
|
+
begin: /* @__PURE__ */ t(function(e) {
|
|
703
703
|
this.conditionStack.push(e);
|
|
704
704
|
}, "begin"),
|
|
705
|
-
popState: /* @__PURE__ */
|
|
705
|
+
popState: /* @__PURE__ */ t(function() {
|
|
706
706
|
return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
707
707
|
}, "popState"),
|
|
708
|
-
_currentRules: /* @__PURE__ */
|
|
708
|
+
_currentRules: /* @__PURE__ */ t(function() {
|
|
709
709
|
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
710
710
|
}, "_currentRules"),
|
|
711
|
-
topState: /* @__PURE__ */
|
|
711
|
+
topState: /* @__PURE__ */ t(function(e) {
|
|
712
712
|
return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
|
|
713
713
|
}, "topState"),
|
|
714
|
-
pushState: /* @__PURE__ */
|
|
714
|
+
pushState: /* @__PURE__ */ t(function(e) {
|
|
715
715
|
this.begin(e);
|
|
716
716
|
}, "pushState"),
|
|
717
|
-
stateStackSize: /* @__PURE__ */
|
|
717
|
+
stateStackSize: /* @__PURE__ */ t(function() {
|
|
718
718
|
return this.conditionStack.length;
|
|
719
719
|
}, "stateStackSize"),
|
|
720
720
|
options: {},
|
|
721
|
-
performAction: /* @__PURE__ */
|
|
721
|
+
performAction: /* @__PURE__ */ t(function(e, t, n, r) {
|
|
722
722
|
switch (n) {
|
|
723
723
|
case 0: return e.getLogger().debug("Found block-beta"), 10;
|
|
724
724
|
case 1: return e.getLogger().debug("Found id-block"), 29;
|
|
@@ -1142,10 +1142,10 @@ var E = (function() {
|
|
|
1142
1142
|
function v() {
|
|
1143
1143
|
this.yy = {};
|
|
1144
1144
|
}
|
|
1145
|
-
return
|
|
1145
|
+
return t(v, "Parser"), v.prototype = _, _.Parser = v, new v();
|
|
1146
1146
|
})();
|
|
1147
1147
|
E.parser = E;
|
|
1148
|
-
var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(), j = "color", M = "fill", ee = "bgFill", te = ",", ne = f(), N = /* @__PURE__ */ new Map(), re = /* @__PURE__ */
|
|
1148
|
+
var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(), j = "color", M = "fill", ee = "bgFill", te = ",", ne = f(), N = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ t((e) => h.sanitizeText(e, ne), "sanitizeText"), ie = /* @__PURE__ */ t(function(e, t = "") {
|
|
1149
1149
|
let n = N.get(e);
|
|
1150
1150
|
n || (n = {
|
|
1151
1151
|
id: e,
|
|
@@ -1159,10 +1159,10 @@ var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(),
|
|
|
1159
1159
|
}
|
|
1160
1160
|
n.styles.push(t);
|
|
1161
1161
|
});
|
|
1162
|
-
}, "addStyleClass"), ae = /* @__PURE__ */
|
|
1162
|
+
}, "addStyleClass"), ae = /* @__PURE__ */ t(function(e, t = "") {
|
|
1163
1163
|
let n = O.get(e);
|
|
1164
1164
|
t != null && (n.styles = t.split(te));
|
|
1165
|
-
}, "addStyle2Node"), oe = /* @__PURE__ */
|
|
1165
|
+
}, "addStyle2Node"), oe = /* @__PURE__ */ t(function(e, t) {
|
|
1166
1166
|
e.split(",").forEach(function(e) {
|
|
1167
1167
|
let n = O.get(e);
|
|
1168
1168
|
if (n === void 0) {
|
|
@@ -1175,55 +1175,55 @@ var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(),
|
|
|
1175
1175
|
}
|
|
1176
1176
|
n.classes ||= [], n.classes.push(t);
|
|
1177
1177
|
});
|
|
1178
|
-
}, "setCssClass"), se = /* @__PURE__ */
|
|
1179
|
-
let
|
|
1180
|
-
for (let
|
|
1181
|
-
if (typeof a == "number" && a > 0 &&
|
|
1182
|
-
ie(
|
|
1178
|
+
}, "setCssClass"), se = /* @__PURE__ */ t((t, n) => {
|
|
1179
|
+
let r = t.flat(), i = [], a = r.find((e) => e?.type === "column-setting")?.columns ?? -1;
|
|
1180
|
+
for (let t of r) {
|
|
1181
|
+
if (typeof a == "number" && a > 0 && t.type !== "column-setting" && typeof t.widthInColumns == "number" && t.widthInColumns > a && e.warn(`Block ${t.id} width ${t.widthInColumns} exceeds configured column width ${a}`), t.label &&= re(t.label), t.type === "classDef") {
|
|
1182
|
+
ie(t.id, t.css);
|
|
1183
1183
|
continue;
|
|
1184
1184
|
}
|
|
1185
|
-
if (
|
|
1186
|
-
oe(
|
|
1185
|
+
if (t.type === "applyClass") {
|
|
1186
|
+
oe(t.id, t?.styleClass ?? "");
|
|
1187
1187
|
continue;
|
|
1188
1188
|
}
|
|
1189
|
-
if (
|
|
1190
|
-
|
|
1189
|
+
if (t.type === "applyStyles") {
|
|
1190
|
+
t?.stylesStr && ae(t.id, t?.stylesStr);
|
|
1191
1191
|
continue;
|
|
1192
1192
|
}
|
|
1193
|
-
if (
|
|
1194
|
-
else if (
|
|
1195
|
-
let
|
|
1196
|
-
A.set(
|
|
1193
|
+
if (t.type === "column-setting") n.columns = t.columns ?? -1;
|
|
1194
|
+
else if (t.type === "edge") {
|
|
1195
|
+
let e = (A.get(t.id) ?? 0) + 1;
|
|
1196
|
+
A.set(t.id, e), t.id = e + "-" + t.id, k.push(t);
|
|
1197
1197
|
} else {
|
|
1198
|
-
|
|
1199
|
-
let
|
|
1200
|
-
if (
|
|
1201
|
-
let
|
|
1202
|
-
for (let n = 0; n <
|
|
1203
|
-
let
|
|
1204
|
-
|
|
1198
|
+
t.label || (t.type === "composite" ? t.label = "" : t.label = t.id);
|
|
1199
|
+
let e = O.get(t.id);
|
|
1200
|
+
if (e === void 0 ? O.set(t.id, t) : (t.type !== "na" && (e.type = t.type), t.label !== t.id && (e.label = t.label)), t.children && se(t.children, t), t.type === "space") {
|
|
1201
|
+
let e = t.width ?? 1;
|
|
1202
|
+
for (let n = 0; n < e; n++) {
|
|
1203
|
+
let e = s(t);
|
|
1204
|
+
e.id = e.id + "-" + n, O.set(e.id, e), i.push(e);
|
|
1205
1205
|
}
|
|
1206
|
-
} else
|
|
1206
|
+
} else e === void 0 && i.push(t);
|
|
1207
1207
|
}
|
|
1208
1208
|
}
|
|
1209
|
-
|
|
1209
|
+
n.children = i;
|
|
1210
1210
|
}, "populateBlockDatabase"), P = [], F = {
|
|
1211
1211
|
id: "root",
|
|
1212
1212
|
type: "composite",
|
|
1213
1213
|
children: [],
|
|
1214
1214
|
columns: -1
|
|
1215
|
-
}, ce = /* @__PURE__ */
|
|
1216
|
-
|
|
1215
|
+
}, ce = /* @__PURE__ */ t(() => {
|
|
1216
|
+
e.debug("Clear called"), d(), F = {
|
|
1217
1217
|
id: "root",
|
|
1218
1218
|
type: "composite",
|
|
1219
1219
|
children: [],
|
|
1220
1220
|
columns: -1
|
|
1221
1221
|
}, O = /* @__PURE__ */ new Map([["root", F]]), P = [], N = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map();
|
|
1222
1222
|
}, "clear");
|
|
1223
|
-
function le(
|
|
1224
|
-
switch (
|
|
1223
|
+
function le(t) {
|
|
1224
|
+
switch (e.debug("typeStr2Type", t), t) {
|
|
1225
1225
|
case "[]": return "square";
|
|
1226
|
-
case "()": return
|
|
1226
|
+
case "()": return e.debug("we have a round"), "round";
|
|
1227
1227
|
case "(())": return "circle";
|
|
1228
1228
|
case ">]": return "rect_left_inv_arrow";
|
|
1229
1229
|
case "{}": return "diamond";
|
|
@@ -1240,14 +1240,14 @@ function le(e) {
|
|
|
1240
1240
|
default: return "na";
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
|
-
|
|
1244
|
-
function ue(
|
|
1245
|
-
switch (
|
|
1243
|
+
t(le, "typeStr2Type");
|
|
1244
|
+
function ue(t) {
|
|
1245
|
+
switch (e.debug("typeStr2Type", t), t) {
|
|
1246
1246
|
case "==": return "thick";
|
|
1247
1247
|
default: return "normal";
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
|
-
|
|
1250
|
+
t(ue, "edgeTypeStr2Type");
|
|
1251
1251
|
function de(e) {
|
|
1252
1252
|
switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
|
|
1253
1253
|
case "x": return "arrow_cross";
|
|
@@ -1256,36 +1256,36 @@ function de(e) {
|
|
|
1256
1256
|
default: return "";
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
|
-
|
|
1259
|
+
t(de, "edgeStrToEdgeData");
|
|
1260
1260
|
var fe = 0, pe = {
|
|
1261
|
-
getConfig: /* @__PURE__ */
|
|
1261
|
+
getConfig: /* @__PURE__ */ t(() => _().block, "getConfig"),
|
|
1262
1262
|
typeStr2Type: le,
|
|
1263
1263
|
edgeTypeStr2Type: ue,
|
|
1264
1264
|
edgeStrToEdgeData: de,
|
|
1265
|
-
getLogger: /* @__PURE__ */
|
|
1266
|
-
getBlocksFlat: /* @__PURE__ */
|
|
1267
|
-
getBlocks: /* @__PURE__ */
|
|
1268
|
-
getEdges: /* @__PURE__ */
|
|
1269
|
-
setHierarchy: /* @__PURE__ */
|
|
1265
|
+
getLogger: /* @__PURE__ */ t(() => e, "getLogger"),
|
|
1266
|
+
getBlocksFlat: /* @__PURE__ */ t(() => [...O.values()], "getBlocksFlat"),
|
|
1267
|
+
getBlocks: /* @__PURE__ */ t(() => P || [], "getBlocks"),
|
|
1268
|
+
getEdges: /* @__PURE__ */ t(() => k, "getEdges"),
|
|
1269
|
+
setHierarchy: /* @__PURE__ */ t((e) => {
|
|
1270
1270
|
F.children = e, se(e, F), P = F.children;
|
|
1271
1271
|
}, "setHierarchy"),
|
|
1272
|
-
getBlock: /* @__PURE__ */
|
|
1273
|
-
setBlock: /* @__PURE__ */
|
|
1272
|
+
getBlock: /* @__PURE__ */ t((e) => O.get(e), "getBlock"),
|
|
1273
|
+
setBlock: /* @__PURE__ */ t((e) => {
|
|
1274
1274
|
O.set(e.id, e);
|
|
1275
1275
|
}, "setBlock"),
|
|
1276
|
-
getColumns: /* @__PURE__ */
|
|
1276
|
+
getColumns: /* @__PURE__ */ t((e) => {
|
|
1277
1277
|
let t = O.get(e);
|
|
1278
1278
|
return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
|
|
1279
1279
|
}, "getColumns"),
|
|
1280
|
-
getClasses: /* @__PURE__ */
|
|
1280
|
+
getClasses: /* @__PURE__ */ t(function() {
|
|
1281
1281
|
return N;
|
|
1282
1282
|
}, "getClasses"),
|
|
1283
1283
|
clear: ce,
|
|
1284
|
-
generateId: /* @__PURE__ */
|
|
1285
|
-
}, I = /* @__PURE__ */
|
|
1284
|
+
generateId: /* @__PURE__ */ t(() => (fe++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + fe), "generateId")
|
|
1285
|
+
}, I = /* @__PURE__ */ t((e, t) => {
|
|
1286
1286
|
let n = v;
|
|
1287
1287
|
return m(n(e, "r"), n(e, "g"), n(e, "b"), t);
|
|
1288
|
-
}, "fade"), me = /* @__PURE__ */
|
|
1288
|
+
}, "fade"), me = /* @__PURE__ */ t((e) => `.label {
|
|
1289
1289
|
font-family: ${e.fontFamily};
|
|
1290
1290
|
color: ${e.nodeTextColor || e.textColor};
|
|
1291
1291
|
}
|
|
@@ -1408,36 +1408,36 @@ var fe = 0, pe = {
|
|
|
1408
1408
|
fill: ${e.textColor};
|
|
1409
1409
|
}
|
|
1410
1410
|
${x()}
|
|
1411
|
-
`, "getStyles"), he = /* @__PURE__ */
|
|
1411
|
+
`, "getStyles"), he = /* @__PURE__ */ t((e, t, n, r) => {
|
|
1412
1412
|
t.forEach((t) => {
|
|
1413
1413
|
ge[t](e, n, r);
|
|
1414
1414
|
});
|
|
1415
1415
|
}, "insertMarkers"), ge = {
|
|
1416
|
-
extension: /* @__PURE__ */
|
|
1417
|
-
|
|
1416
|
+
extension: /* @__PURE__ */ t((t, n, r) => {
|
|
1417
|
+
e.trace("Making markers for ", r), t.append("defs").append("marker").attr("id", r + "_" + n + "-extensionStart").attr("class", "marker extension " + n).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), t.append("defs").append("marker").attr("id", r + "_" + n + "-extensionEnd").attr("class", "marker extension " + n).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
1418
1418
|
}, "extension"),
|
|
1419
|
-
composition: /* @__PURE__ */
|
|
1419
|
+
composition: /* @__PURE__ */ t((e, t, n) => {
|
|
1420
1420
|
e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
1421
1421
|
}, "composition"),
|
|
1422
|
-
aggregation: /* @__PURE__ */
|
|
1422
|
+
aggregation: /* @__PURE__ */ t((e, t, n) => {
|
|
1423
1423
|
e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
1424
1424
|
}, "aggregation"),
|
|
1425
|
-
dependency: /* @__PURE__ */
|
|
1425
|
+
dependency: /* @__PURE__ */ t((e, t, n) => {
|
|
1426
1426
|
e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
1427
1427
|
}, "dependency"),
|
|
1428
|
-
lollipop: /* @__PURE__ */
|
|
1428
|
+
lollipop: /* @__PURE__ */ t((e, t, n) => {
|
|
1429
1429
|
e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
1430
1430
|
}, "lollipop"),
|
|
1431
|
-
point: /* @__PURE__ */
|
|
1431
|
+
point: /* @__PURE__ */ t((e, t, n) => {
|
|
1432
1432
|
e.append("marker").attr("id", n + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
1433
1433
|
}, "point"),
|
|
1434
|
-
circle: /* @__PURE__ */
|
|
1434
|
+
circle: /* @__PURE__ */ t((e, t, n) => {
|
|
1435
1435
|
e.append("marker").attr("id", n + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
1436
1436
|
}, "circle"),
|
|
1437
|
-
cross: /* @__PURE__ */
|
|
1437
|
+
cross: /* @__PURE__ */ t((e, t, n) => {
|
|
1438
1438
|
e.append("marker").attr("id", n + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
1439
1439
|
}, "cross"),
|
|
1440
|
-
barb: /* @__PURE__ */
|
|
1440
|
+
barb: /* @__PURE__ */ t((e, t, n) => {
|
|
1441
1441
|
e.append("defs").append("marker").attr("id", n + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
1442
1442
|
}, "barb")
|
|
1443
1443
|
}, _e = he, L = f()?.block?.padding ?? 8;
|
|
@@ -1455,110 +1455,110 @@ function R(e, t) {
|
|
|
1455
1455
|
py: Math.floor(t / e)
|
|
1456
1456
|
};
|
|
1457
1457
|
}
|
|
1458
|
-
|
|
1459
|
-
var ve = /* @__PURE__ */
|
|
1460
|
-
let
|
|
1461
|
-
for (let
|
|
1462
|
-
let { width:
|
|
1458
|
+
t(R, "calculateBlockPosition");
|
|
1459
|
+
var ve = /* @__PURE__ */ t((t) => {
|
|
1460
|
+
let n = 0, r = 0;
|
|
1461
|
+
for (let i of t.children) {
|
|
1462
|
+
let { width: t, height: a, x: o, y: s } = i.size ?? {
|
|
1463
1463
|
width: 0,
|
|
1464
1464
|
height: 0,
|
|
1465
1465
|
x: 0,
|
|
1466
1466
|
y: 0
|
|
1467
1467
|
};
|
|
1468
|
-
|
|
1468
|
+
e.debug("getMaxChildSize abc95 child:", i.id, "width:", t, "height:", a, "x:", o, "y:", s, i.type), i.type !== "space" && (t > n && (n = t / (i.widthInColumns ?? 1)), a > r && (r = a));
|
|
1469
1469
|
}
|
|
1470
1470
|
return {
|
|
1471
|
-
width:
|
|
1472
|
-
height:
|
|
1471
|
+
width: n,
|
|
1472
|
+
height: r
|
|
1473
1473
|
};
|
|
1474
1474
|
}, "getMaxChildSize");
|
|
1475
|
-
function z(
|
|
1476
|
-
|
|
1477
|
-
width:
|
|
1478
|
-
height:
|
|
1475
|
+
function z(t, n, r = 0, i = 0) {
|
|
1476
|
+
e.debug("setBlockSizes abc95 (start)", t.id, t?.size?.x, "block width =", t?.size, "siblingWidth", r), t?.size?.width || (t.size = {
|
|
1477
|
+
width: r,
|
|
1478
|
+
height: i,
|
|
1479
1479
|
x: 0,
|
|
1480
1480
|
y: 0
|
|
1481
1481
|
});
|
|
1482
|
-
let
|
|
1483
|
-
if (
|
|
1484
|
-
for (let
|
|
1485
|
-
let s = ve(
|
|
1486
|
-
|
|
1487
|
-
for (let
|
|
1488
|
-
for (let
|
|
1489
|
-
let c =
|
|
1490
|
-
for (let
|
|
1491
|
-
let u =
|
|
1482
|
+
let a = 0, o = 0;
|
|
1483
|
+
if (t.children?.length > 0) {
|
|
1484
|
+
for (let e of t.children) z(e, n);
|
|
1485
|
+
let s = ve(t);
|
|
1486
|
+
a = s.width, o = s.height, e.debug("setBlockSizes abc95 maxWidth of", t.id, ":s children is ", a, o);
|
|
1487
|
+
for (let n of t.children) n.size && (e.debug(`abc95 Setting size of children of ${t.id} id=${n.id} ${a} ${o} ${JSON.stringify(n.size)}`), n.size.width = a * (n.widthInColumns ?? 1) + L * ((n.widthInColumns ?? 1) - 1), n.size.height = o, n.size.x = 0, n.size.y = 0, e.debug(`abc95 updating size of ${t.id} children child:${n.id} maxWidth:${a} maxHeight:${o}`));
|
|
1488
|
+
for (let e of t.children) z(e, n, a, o);
|
|
1489
|
+
let c = t.columns ?? -1, l = 0;
|
|
1490
|
+
for (let e of t.children) l += e.widthInColumns ?? 1;
|
|
1491
|
+
let u = t.children.length;
|
|
1492
1492
|
c > 0 && c < l && (u = c);
|
|
1493
|
-
let d = Math.ceil(l / u), f = u * (
|
|
1494
|
-
if (f <
|
|
1495
|
-
|
|
1496
|
-
let
|
|
1497
|
-
|
|
1498
|
-
for (let
|
|
1493
|
+
let d = Math.ceil(l / u), f = u * (a + L) + L, p = d * (o + L) + L;
|
|
1494
|
+
if (f < r) {
|
|
1495
|
+
e.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${i} width ${f}`), f = r, p = i;
|
|
1496
|
+
let n = (r - u * L - L) / u, s = (i - d * L - L) / d;
|
|
1497
|
+
e.debug("Size indata abc88", t.id, "childWidth", n, "maxWidth", a), e.debug("Size indata abc88", t.id, "childHeight", s, "maxHeight", o), e.debug("Size indata abc88 xSize", u, "padding", L);
|
|
1498
|
+
for (let e of t.children) e.size && (e.size.width = n, e.size.height = s, e.size.x = 0, e.size.y = 0);
|
|
1499
1499
|
}
|
|
1500
|
-
if (
|
|
1501
|
-
f =
|
|
1502
|
-
let
|
|
1503
|
-
if (
|
|
1504
|
-
let
|
|
1505
|
-
|
|
1506
|
-
for (let
|
|
1500
|
+
if (e.debug(`abc95 (finale calc) ${t.id} xSize ${u} ySize ${d} columns ${c}${t.children.length} width=${Math.max(f, t.size?.width || 0)}`), f < (t?.size?.width || 0)) {
|
|
1501
|
+
f = t?.size?.width || 0;
|
|
1502
|
+
let n = c > 0 ? Math.min(t.children.length, c) : t.children.length;
|
|
1503
|
+
if (n > 0) {
|
|
1504
|
+
let r = (f - n * L - L) / n;
|
|
1505
|
+
e.debug("abc95 (growing to fit) width", t.id, f, t.size?.width, r);
|
|
1506
|
+
for (let e of t.children) e.size && (e.size.width = r);
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
|
-
|
|
1509
|
+
t.size = {
|
|
1510
1510
|
width: f,
|
|
1511
1511
|
height: p,
|
|
1512
1512
|
x: 0,
|
|
1513
1513
|
y: 0
|
|
1514
1514
|
};
|
|
1515
1515
|
}
|
|
1516
|
-
|
|
1516
|
+
e.debug("setBlockSizes abc94 (done)", t.id, t?.size?.x, t?.size?.width, t?.size?.y, t?.size?.height);
|
|
1517
1517
|
}
|
|
1518
|
-
|
|
1519
|
-
function ye(
|
|
1520
|
-
|
|
1521
|
-
let
|
|
1522
|
-
if (
|
|
1523
|
-
let
|
|
1524
|
-
|
|
1525
|
-
let
|
|
1526
|
-
{
|
|
1527
|
-
let
|
|
1528
|
-
for (let
|
|
1529
|
-
if (!
|
|
1530
|
-
let { py:
|
|
1531
|
-
|
|
1532
|
-
let
|
|
1533
|
-
|
|
1518
|
+
t(z, "setBlockSizes");
|
|
1519
|
+
function ye(t, n) {
|
|
1520
|
+
e.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);
|
|
1521
|
+
let r = t.columns ?? -1;
|
|
1522
|
+
if (e.debug("layoutBlocks columns abc95", t.id, "=>", r, t), t.children && t.children.length > 0) {
|
|
1523
|
+
let i = t?.children[0]?.size?.width ?? 0, a = t.children.length * i + (t.children.length - 1) * L;
|
|
1524
|
+
e.debug("widthOfChildren 88", a, "posX");
|
|
1525
|
+
let o = /* @__PURE__ */ new Map();
|
|
1526
|
+
{
|
|
1527
|
+
let e = 0;
|
|
1528
|
+
for (let n of t.children) {
|
|
1529
|
+
if (!n.size) continue;
|
|
1530
|
+
let { py: t } = R(r, e), i = o.get(t) ?? 0;
|
|
1531
|
+
n.size.height > i && o.set(t, n.size.height);
|
|
1532
|
+
let a = n?.widthInColumns ?? 1;
|
|
1533
|
+
r > 0 && (a = Math.min(a, r - e % r)), e += a;
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
1536
|
let s = /* @__PURE__ */ new Map();
|
|
1537
1537
|
{
|
|
1538
|
-
let e = 0, t = [...
|
|
1539
|
-
for (let n of t) s.set(n, e), e += (
|
|
1538
|
+
let e = 0, t = [...o.keys()].sort((e, t) => e - t);
|
|
1539
|
+
for (let n of t) s.set(n, e), e += (o.get(n) ?? 0) + L;
|
|
1540
1540
|
}
|
|
1541
1541
|
let c = 0;
|
|
1542
|
-
|
|
1543
|
-
let l =
|
|
1544
|
-
for (let
|
|
1545
|
-
let
|
|
1546
|
-
if (!
|
|
1547
|
-
let { width: d, height: f } =
|
|
1548
|
-
if (m != u && (u = m, l =
|
|
1549
|
-
let
|
|
1550
|
-
|
|
1551
|
-
let
|
|
1552
|
-
|
|
1542
|
+
e.debug("abc91 block?.size?.x", t.id, t?.size?.x);
|
|
1543
|
+
let l = t?.size?.x ? t?.size?.x + (-t?.size?.width / 2 || 0) : -L, u = 0;
|
|
1544
|
+
for (let i of t.children) {
|
|
1545
|
+
let a = t;
|
|
1546
|
+
if (!i.size) continue;
|
|
1547
|
+
let { width: d, height: f } = i.size, { px: p, py: m } = R(r, c);
|
|
1548
|
+
if (m != u && (u = m, l = t?.size?.x ? t?.size?.x + (-t?.size?.width / 2 || 0) : -L, e.debug("New row in layout for block", t.id, " and child ", i.id, u)), e.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${c} (px, py) ${p},${m} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${d}${L}`), a.size) {
|
|
1549
|
+
let t = d / 2;
|
|
1550
|
+
i.size.x = l + L + t, e.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${l} new startingPosX${i.size.x} ${t} padding=${L} width=${d} halfWidth=${t} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${d * (i?.widthInColumns ?? 1) / 2}`), l = i.size.x + t;
|
|
1551
|
+
let n = s.get(m) ?? 0, r = o.get(m) ?? f;
|
|
1552
|
+
i.size.y = a.size.y - a.size.height / 2 + n + r / 2 + L, e.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${l}${L}${t}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${d * (i?.widthInColumns ?? 1) / 2}`);
|
|
1553
1553
|
}
|
|
1554
|
-
|
|
1555
|
-
let h =
|
|
1556
|
-
|
|
1554
|
+
i.children && ye(i, n);
|
|
1555
|
+
let h = i?.widthInColumns ?? 1;
|
|
1556
|
+
r > 0 && (h = Math.min(h, r - c % r)), c += h, e.debug("abc88 columnsPos", i, c);
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
|
-
|
|
1559
|
+
e.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);
|
|
1560
1560
|
}
|
|
1561
|
-
|
|
1561
|
+
t(ye, "layoutBlocks");
|
|
1562
1562
|
function be(e, { minX: t, minY: n, maxX: r, maxY: i } = {
|
|
1563
1563
|
minX: 0,
|
|
1564
1564
|
minY: 0,
|
|
@@ -1582,21 +1582,21 @@ function be(e, { minX: t, minY: n, maxX: r, maxY: i } = {
|
|
|
1582
1582
|
maxY: i
|
|
1583
1583
|
};
|
|
1584
1584
|
}
|
|
1585
|
-
|
|
1586
|
-
function xe(
|
|
1587
|
-
let
|
|
1588
|
-
if (!
|
|
1589
|
-
z(
|
|
1590
|
-
let { minX:
|
|
1585
|
+
t(be, "findBounds");
|
|
1586
|
+
function xe(t) {
|
|
1587
|
+
let n = t.getBlock("root");
|
|
1588
|
+
if (!n) return;
|
|
1589
|
+
z(n, t, 0, 0), ye(n, t), e.debug("getBlocks", JSON.stringify(n, null, 2));
|
|
1590
|
+
let { minX: r, minY: i, maxX: a, maxY: o } = be(n), s = o - i;
|
|
1591
1591
|
return {
|
|
1592
|
-
x:
|
|
1593
|
-
y:
|
|
1594
|
-
width:
|
|
1592
|
+
x: r,
|
|
1593
|
+
y: i,
|
|
1594
|
+
width: a - r,
|
|
1595
1595
|
height: s
|
|
1596
1596
|
};
|
|
1597
1597
|
}
|
|
1598
|
-
|
|
1599
|
-
var B = /* @__PURE__ */
|
|
1598
|
+
t(xe, "layout");
|
|
1599
|
+
var B = /* @__PURE__ */ t(async (e, t, n, r = !1, i = !1) => {
|
|
1600
1600
|
let a = t || "";
|
|
1601
1601
|
typeof a == "object" && (a = a[0]);
|
|
1602
1602
|
let o = f(), s = g(o);
|
|
@@ -1608,7 +1608,7 @@ var B = /* @__PURE__ */ s(async (e, t, n, r = !1, i = !1) => {
|
|
|
1608
1608
|
isNode: i,
|
|
1609
1609
|
width: Infinity
|
|
1610
1610
|
}, o);
|
|
1611
|
-
}, "createLabel"), Se = /* @__PURE__ */
|
|
1611
|
+
}, "createLabel"), Se = /* @__PURE__ */ t((e, t, n, r, i) => {
|
|
1612
1612
|
t.arrowTypeStart && we(e, "start", t.arrowTypeStart, n, r, i), t.arrowTypeEnd && we(e, "end", t.arrowTypeEnd, n, r, i);
|
|
1613
1613
|
}, "addEdgeMarkers"), Ce = {
|
|
1614
1614
|
arrow_cross: "cross",
|
|
@@ -1620,172 +1620,172 @@ var B = /* @__PURE__ */ s(async (e, t, n, r = !1, i = !1) => {
|
|
|
1620
1620
|
composition: "composition",
|
|
1621
1621
|
dependency: "dependency",
|
|
1622
1622
|
lollipop: "lollipop"
|
|
1623
|
-
}, we = /* @__PURE__ */
|
|
1624
|
-
let s = Ce[
|
|
1623
|
+
}, we = /* @__PURE__ */ t((t, n, r, i, a, o) => {
|
|
1624
|
+
let s = Ce[r];
|
|
1625
1625
|
if (!s) {
|
|
1626
|
-
|
|
1626
|
+
e.warn(`Unknown arrow type: ${r}`);
|
|
1627
1627
|
return;
|
|
1628
1628
|
}
|
|
1629
|
-
let c =
|
|
1630
|
-
|
|
1631
|
-
}, "addEdgeMarker"), V = {}, H = {}, Te = /* @__PURE__ */
|
|
1632
|
-
let
|
|
1629
|
+
let c = n === "start" ? "Start" : "End";
|
|
1630
|
+
t.attr(`marker-${n}`, `url(${i}#${a}_${o}-${s}${c})`);
|
|
1631
|
+
}, "addEdgeMarker"), V = {}, H = {}, Te = /* @__PURE__ */ t(async (e, t) => {
|
|
1632
|
+
let r = f(), i = g(r), a = e.insert("g").attr("class", "edgeLabel"), o = a.insert("g").attr("class", "label"), s = t.labelType === "markdown", c = await b(e, t.label, {
|
|
1633
1633
|
style: t.labelStyle,
|
|
1634
|
-
useHtmlLabels:
|
|
1635
|
-
addSvgBackground:
|
|
1634
|
+
useHtmlLabels: i,
|
|
1635
|
+
addSvgBackground: s,
|
|
1636
1636
|
isNode: !1,
|
|
1637
|
-
markdown:
|
|
1638
|
-
width:
|
|
1639
|
-
},
|
|
1640
|
-
|
|
1641
|
-
let l =
|
|
1642
|
-
if (
|
|
1643
|
-
let e =
|
|
1637
|
+
markdown: s,
|
|
1638
|
+
width: s ? void 0 : Infinity
|
|
1639
|
+
}, r);
|
|
1640
|
+
o.node().appendChild(c);
|
|
1641
|
+
let l = c.getBBox(), u = l;
|
|
1642
|
+
if (i) {
|
|
1643
|
+
let e = c.children[0], t = n(c);
|
|
1644
1644
|
l = e.getBoundingClientRect(), u = l, t.attr("width", l.width), t.attr("height", l.height);
|
|
1645
1645
|
} else {
|
|
1646
|
-
let e = c
|
|
1646
|
+
let e = n(c).select("text").node();
|
|
1647
1647
|
e && typeof e.getBBox == "function" && (u = e.getBBox());
|
|
1648
1648
|
}
|
|
1649
|
-
|
|
1649
|
+
o.attr("transform", C(u, i)), V[t.id] = a, t.width = l.width, t.height = l.height;
|
|
1650
1650
|
let d;
|
|
1651
1651
|
if (t.startLabelLeft) {
|
|
1652
|
-
let
|
|
1653
|
-
d =
|
|
1654
|
-
let
|
|
1655
|
-
if (
|
|
1656
|
-
let e =
|
|
1657
|
-
|
|
1652
|
+
let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await B(a, t.startLabelLeft, t.labelStyle);
|
|
1653
|
+
d = o;
|
|
1654
|
+
let s = o.getBBox();
|
|
1655
|
+
if (i) {
|
|
1656
|
+
let e = o.children[0], t = n(o);
|
|
1657
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
1658
1658
|
}
|
|
1659
|
-
|
|
1659
|
+
a.attr("transform", C(s, i)), H[t.id] || (H[t.id] = {}), H[t.id].startLeft = r, U(d, t.startLabelLeft);
|
|
1660
1660
|
}
|
|
1661
1661
|
if (t.startLabelRight) {
|
|
1662
|
-
let
|
|
1663
|
-
d =
|
|
1664
|
-
let
|
|
1665
|
-
if (
|
|
1666
|
-
let e =
|
|
1667
|
-
|
|
1662
|
+
let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await B(r, t.startLabelRight, t.labelStyle);
|
|
1663
|
+
d = o, a.node().appendChild(o);
|
|
1664
|
+
let s = o.getBBox();
|
|
1665
|
+
if (i) {
|
|
1666
|
+
let e = o.children[0], t = n(o);
|
|
1667
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
1668
1668
|
}
|
|
1669
|
-
|
|
1669
|
+
a.attr("transform", C(s, i)), H[t.id] || (H[t.id] = {}), H[t.id].startRight = r, U(d, t.startLabelRight);
|
|
1670
1670
|
}
|
|
1671
1671
|
if (t.endLabelLeft) {
|
|
1672
|
-
let
|
|
1673
|
-
d =
|
|
1674
|
-
let
|
|
1675
|
-
if (
|
|
1676
|
-
let e =
|
|
1677
|
-
|
|
1672
|
+
let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await B(a, t.endLabelLeft, t.labelStyle);
|
|
1673
|
+
d = o;
|
|
1674
|
+
let s = o.getBBox();
|
|
1675
|
+
if (i) {
|
|
1676
|
+
let e = o.children[0], t = n(o);
|
|
1677
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
1678
1678
|
}
|
|
1679
|
-
|
|
1679
|
+
a.attr("transform", C(s, i)), r.node().appendChild(o), H[t.id] || (H[t.id] = {}), H[t.id].endLeft = r, U(d, t.endLabelLeft);
|
|
1680
1680
|
}
|
|
1681
1681
|
if (t.endLabelRight) {
|
|
1682
|
-
let
|
|
1683
|
-
d =
|
|
1684
|
-
let
|
|
1685
|
-
if (
|
|
1686
|
-
let e =
|
|
1687
|
-
|
|
1682
|
+
let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await B(a, t.endLabelRight, t.labelStyle);
|
|
1683
|
+
d = o;
|
|
1684
|
+
let s = o.getBBox();
|
|
1685
|
+
if (i) {
|
|
1686
|
+
let e = o.children[0], t = n(o);
|
|
1687
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
1688
1688
|
}
|
|
1689
|
-
|
|
1689
|
+
a.attr("transform", C(s, i)), r.node().appendChild(o), H[t.id] || (H[t.id] = {}), H[t.id].endRight = r, U(d, t.endLabelRight);
|
|
1690
1690
|
}
|
|
1691
|
-
return
|
|
1691
|
+
return c;
|
|
1692
1692
|
}, "insertEdgeLabel");
|
|
1693
1693
|
function U(e, t) {
|
|
1694
1694
|
g(f()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
|
|
1695
1695
|
}
|
|
1696
|
-
|
|
1697
|
-
var Ee = /* @__PURE__ */
|
|
1698
|
-
|
|
1699
|
-
let r =
|
|
1700
|
-
if (
|
|
1701
|
-
let
|
|
1696
|
+
t(U, "setTerminalWidth");
|
|
1697
|
+
var Ee = /* @__PURE__ */ t((t, n) => {
|
|
1698
|
+
e.debug("Moving label abc88 ", t.id, t.label, V[t.id], n);
|
|
1699
|
+
let r = n.updatedPath ? n.updatedPath : n.originalPath, { subGraphTitleTotalMargin: i } = w(f());
|
|
1700
|
+
if (t.label) {
|
|
1701
|
+
let o = V[t.id], s = t.x, c = t.y;
|
|
1702
1702
|
if (r) {
|
|
1703
|
-
let i =
|
|
1704
|
-
|
|
1703
|
+
let i = a.calcLabelPosition(r);
|
|
1704
|
+
e.debug("Moving label " + t.label + " from (", s, ",", c, ") to (", i.x, ",", i.y, ") abc88"), n.updatedPath && (s = i.x, c = i.y);
|
|
1705
1705
|
}
|
|
1706
|
-
|
|
1706
|
+
o.attr("transform", `translate(${s}, ${c + i / 2})`);
|
|
1707
1707
|
}
|
|
1708
|
-
if (
|
|
1709
|
-
let
|
|
1708
|
+
if (t.startLabelLeft) {
|
|
1709
|
+
let e = H[t.id].startLeft, n = t.x, i = t.y;
|
|
1710
1710
|
if (r) {
|
|
1711
|
-
let
|
|
1712
|
-
|
|
1711
|
+
let e = a.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_left", r);
|
|
1712
|
+
n = e.x, i = e.y;
|
|
1713
1713
|
}
|
|
1714
|
-
|
|
1714
|
+
e.attr("transform", `translate(${n}, ${i})`);
|
|
1715
1715
|
}
|
|
1716
|
-
if (
|
|
1717
|
-
let
|
|
1716
|
+
if (t.startLabelRight) {
|
|
1717
|
+
let e = H[t.id].startRight, n = t.x, i = t.y;
|
|
1718
1718
|
if (r) {
|
|
1719
|
-
let
|
|
1720
|
-
|
|
1719
|
+
let e = a.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_right", r);
|
|
1720
|
+
n = e.x, i = e.y;
|
|
1721
1721
|
}
|
|
1722
|
-
|
|
1722
|
+
e.attr("transform", `translate(${n}, ${i})`);
|
|
1723
1723
|
}
|
|
1724
|
-
if (
|
|
1725
|
-
let
|
|
1724
|
+
if (t.endLabelLeft) {
|
|
1725
|
+
let e = H[t.id].endLeft, n = t.x, i = t.y;
|
|
1726
1726
|
if (r) {
|
|
1727
|
-
let
|
|
1728
|
-
|
|
1727
|
+
let e = a.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_left", r);
|
|
1728
|
+
n = e.x, i = e.y;
|
|
1729
1729
|
}
|
|
1730
|
-
|
|
1730
|
+
e.attr("transform", `translate(${n}, ${i})`);
|
|
1731
1731
|
}
|
|
1732
|
-
if (
|
|
1733
|
-
let
|
|
1732
|
+
if (t.endLabelRight) {
|
|
1733
|
+
let e = H[t.id].endRight, n = t.x, i = t.y;
|
|
1734
1734
|
if (r) {
|
|
1735
|
-
let
|
|
1736
|
-
|
|
1735
|
+
let e = a.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_right", r);
|
|
1736
|
+
n = e.x, i = e.y;
|
|
1737
1737
|
}
|
|
1738
|
-
|
|
1738
|
+
e.attr("transform", `translate(${n}, ${i})`);
|
|
1739
1739
|
}
|
|
1740
|
-
}, "positionEdgeLabel"), De = /* @__PURE__ */
|
|
1740
|
+
}, "positionEdgeLabel"), De = /* @__PURE__ */ t((e, t) => {
|
|
1741
1741
|
let n = e.x, r = e.y, i = Math.abs(t.x - n), a = Math.abs(t.y - r), o = e.width / 2, s = e.height / 2;
|
|
1742
1742
|
return i >= o || a >= s;
|
|
1743
|
-
}, "outsideNode"), Oe = /* @__PURE__ */
|
|
1744
|
-
|
|
1745
|
-
outsidePoint: ${JSON.stringify(
|
|
1746
|
-
insidePoint : ${JSON.stringify(
|
|
1747
|
-
node : x:${
|
|
1748
|
-
let
|
|
1749
|
-
if (Math.abs(
|
|
1750
|
-
let
|
|
1751
|
-
c = d *
|
|
1752
|
-
let
|
|
1753
|
-
x:
|
|
1754
|
-
y:
|
|
1743
|
+
}, "outsideNode"), Oe = /* @__PURE__ */ t((t, n, r) => {
|
|
1744
|
+
e.debug(`intersection calc abc89:
|
|
1745
|
+
outsidePoint: ${JSON.stringify(n)}
|
|
1746
|
+
insidePoint : ${JSON.stringify(r)}
|
|
1747
|
+
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);
|
|
1748
|
+
let i = t.x, a = t.y, o = Math.abs(i - r.x), s = t.width / 2, c = r.x < n.x ? s - o : s + o, l = t.height / 2, u = Math.abs(n.y - r.y), d = Math.abs(n.x - r.x);
|
|
1749
|
+
if (Math.abs(a - n.y) * s > Math.abs(i - n.x) * l) {
|
|
1750
|
+
let t = r.y < n.y ? n.y - l - a : a - l - n.y;
|
|
1751
|
+
c = d * t / u;
|
|
1752
|
+
let i = {
|
|
1753
|
+
x: r.x < n.x ? r.x + c : r.x - d + c,
|
|
1754
|
+
y: r.y < n.y ? r.y + u - t : r.y - u + t
|
|
1755
1755
|
};
|
|
1756
|
-
return c === 0 && (
|
|
1756
|
+
return c === 0 && (i.x = n.x, i.y = n.y), d === 0 && (i.x = n.x), u === 0 && (i.y = n.y), e.debug(`abc89 topp/bott calc, Q ${u}, q ${t}, R ${d}, r ${c}`, i), i;
|
|
1757
1757
|
} else {
|
|
1758
|
-
c =
|
|
1759
|
-
let
|
|
1760
|
-
return
|
|
1761
|
-
_x:
|
|
1762
|
-
_y:
|
|
1763
|
-
}), c === 0 && (
|
|
1764
|
-
x:
|
|
1765
|
-
y:
|
|
1758
|
+
c = r.x < n.x ? n.x - s - i : i - s - n.x;
|
|
1759
|
+
let t = u * c / d, a = r.x < n.x ? r.x + d - c : r.x - d + c, o = r.y < n.y ? r.y + t : r.y - t;
|
|
1760
|
+
return e.debug(`sides calc abc89, Q ${u}, q ${t}, R ${d}, r ${c}`, {
|
|
1761
|
+
_x: a,
|
|
1762
|
+
_y: o
|
|
1763
|
+
}), c === 0 && (a = n.x, o = n.y), d === 0 && (a = n.x), u === 0 && (o = n.y), {
|
|
1764
|
+
x: a,
|
|
1765
|
+
y: o
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
|
-
}, "intersection"), ke = /* @__PURE__ */
|
|
1769
|
-
|
|
1770
|
-
let
|
|
1771
|
-
return
|
|
1772
|
-
if (!De(
|
|
1773
|
-
let
|
|
1774
|
-
|
|
1775
|
-
o ||= e.x ===
|
|
1776
|
-
}),
|
|
1777
|
-
} else
|
|
1778
|
-
}),
|
|
1779
|
-
}, "cutPathAtIntersect"), Ae = /* @__PURE__ */
|
|
1780
|
-
let u =
|
|
1781
|
-
|
|
1768
|
+
}, "intersection"), ke = /* @__PURE__ */ t((t, n) => {
|
|
1769
|
+
e.debug("abc88 cutPathAtIntersect", t, n);
|
|
1770
|
+
let r = [], i = t[0], a = !1;
|
|
1771
|
+
return t.forEach((e) => {
|
|
1772
|
+
if (!De(n, e) && !a) {
|
|
1773
|
+
let t = Oe(n, i, e), o = !1;
|
|
1774
|
+
r.forEach((e) => {
|
|
1775
|
+
o ||= e.x === t.x && e.y === t.y;
|
|
1776
|
+
}), r.some((e) => e.x === t.x && e.y === t.y) || r.push(t), a = !0;
|
|
1777
|
+
} else i = e, a || r.push(e);
|
|
1778
|
+
}), r;
|
|
1779
|
+
}, "cutPathAtIntersect"), Ae = /* @__PURE__ */ t(function(t, n, i, a, o, s, c) {
|
|
1780
|
+
let u = i.points;
|
|
1781
|
+
e.debug("abc88 InsertEdge: edge=", i, "e=", n);
|
|
1782
1782
|
let d = !1, p = s.node(n.v);
|
|
1783
1783
|
var m = s.node(n.w);
|
|
1784
|
-
m?.intersect && p?.intersect && (u = u.slice(1,
|
|
1785
|
-
let h = u.filter((e) => !Number.isNaN(e.y)), g =
|
|
1786
|
-
|
|
1787
|
-
let { x: _, y: v } = S(
|
|
1788
|
-
switch (
|
|
1784
|
+
m?.intersect && p?.intersect && (u = u.slice(1, i.points.length - 1), u.unshift(p.intersect(u[0])), u.push(m.intersect(u[u.length - 1]))), i.toCluster && (e.debug("to cluster abc88", a[i.toCluster]), u = ke(i.points, a[i.toCluster].node), d = !0), i.fromCluster && (e.debug("from cluster abc88", a[i.fromCluster]), u = ke(u.reverse(), a[i.fromCluster].node).reverse(), d = !0);
|
|
1785
|
+
let h = u.filter((e) => !Number.isNaN(e.y)), g = r;
|
|
1786
|
+
i.curve && (o === "graph" || o === "flowchart") && (g = i.curve);
|
|
1787
|
+
let { x: _, y: v } = S(i), b = y().x(_).y(v).curve(g), x;
|
|
1788
|
+
switch (i.thickness) {
|
|
1789
1789
|
case "normal":
|
|
1790
1790
|
x = "edge-thickness-normal";
|
|
1791
1791
|
break;
|
|
@@ -1797,7 +1797,7 @@ var Ee = /* @__PURE__ */ s((e, t) => {
|
|
|
1797
1797
|
break;
|
|
1798
1798
|
default: x = "";
|
|
1799
1799
|
}
|
|
1800
|
-
switch (
|
|
1800
|
+
switch (i.pattern) {
|
|
1801
1801
|
case "solid":
|
|
1802
1802
|
x += " edge-pattern-solid";
|
|
1803
1803
|
break;
|
|
@@ -1808,11 +1808,11 @@ var Ee = /* @__PURE__ */ s((e, t) => {
|
|
|
1808
1808
|
x += " edge-pattern-dashed";
|
|
1809
1809
|
break;
|
|
1810
1810
|
}
|
|
1811
|
-
let C = t.append("path").attr("d", b(h)).attr("id",
|
|
1812
|
-
(f().flowchart.arrowMarkerAbsolute || f().state.arrowMarkerAbsolute) && (w = l(!0)), Se(C,
|
|
1811
|
+
let C = t.append("path").attr("d", b(h)).attr("id", i.id).attr("class", " " + x + (i.classes ? " " + i.classes : "")).attr("style", i.style), w = "";
|
|
1812
|
+
(f().flowchart.arrowMarkerAbsolute || f().state.arrowMarkerAbsolute) && (w = l(!0)), Se(C, i, w, c, o);
|
|
1813
1813
|
let T = {};
|
|
1814
|
-
return d && (T.updatedPath = u), T.originalPath =
|
|
1815
|
-
}, "insertEdge"), je = /* @__PURE__ */
|
|
1814
|
+
return d && (T.updatedPath = u), T.originalPath = i.points, T;
|
|
1815
|
+
}, "insertEdge"), je = /* @__PURE__ */ t((e) => {
|
|
1816
1816
|
let t = /* @__PURE__ */ new Set();
|
|
1817
1817
|
for (let n of e) switch (n) {
|
|
1818
1818
|
case "x":
|
|
@@ -1826,7 +1826,7 @@ var Ee = /* @__PURE__ */ s((e, t) => {
|
|
|
1826
1826
|
break;
|
|
1827
1827
|
}
|
|
1828
1828
|
return t;
|
|
1829
|
-
}, "expandAndDeduplicateDirections"), Me = /* @__PURE__ */
|
|
1829
|
+
}, "expandAndDeduplicateDirections"), Me = /* @__PURE__ */ t((e, t, n) => {
|
|
1830
1830
|
let r = je(e), i = t.height + 2 * n.padding, a = i / 2, o = t.width + 2 * a + n.padding, s = n.padding / 2;
|
|
1831
1831
|
return r.has("right") && r.has("left") && r.has("up") && r.has("down") ? [
|
|
1832
1832
|
{
|
|
@@ -2235,7 +2235,7 @@ var Ee = /* @__PURE__ */ s((e, t) => {
|
|
|
2235
2235
|
function Ne(e, t) {
|
|
2236
2236
|
return e.intersect(t);
|
|
2237
2237
|
}
|
|
2238
|
-
|
|
2238
|
+
t(Ne, "intersectNode");
|
|
2239
2239
|
var Pe = Ne;
|
|
2240
2240
|
function Fe(e, t, n, r) {
|
|
2241
2241
|
var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
|
|
@@ -2246,12 +2246,12 @@ function Fe(e, t, n, r) {
|
|
|
2246
2246
|
y: a + u
|
|
2247
2247
|
};
|
|
2248
2248
|
}
|
|
2249
|
-
|
|
2249
|
+
t(Fe, "intersectEllipse");
|
|
2250
2250
|
var Ie = Fe;
|
|
2251
2251
|
function Le(e, t, n) {
|
|
2252
2252
|
return Ie(e, t, t, n);
|
|
2253
2253
|
}
|
|
2254
|
-
|
|
2254
|
+
t(Le, "intersectCircle");
|
|
2255
2255
|
var Re = Le;
|
|
2256
2256
|
function ze(e, t, n, r) {
|
|
2257
2257
|
var i = t.y - e.y, a, o = e.x - t.x, s, c = t.x * e.y - e.x * t.y, l, u, d, f = i * n.x + o * n.y + c, p = i * r.x + o * r.y + c, m, h, g, _, v;
|
|
@@ -2260,11 +2260,11 @@ function ze(e, t, n, r) {
|
|
|
2260
2260
|
y: v
|
|
2261
2261
|
};
|
|
2262
2262
|
}
|
|
2263
|
-
|
|
2263
|
+
t(ze, "intersectLine");
|
|
2264
2264
|
function W(e, t) {
|
|
2265
2265
|
return e * t > 0;
|
|
2266
2266
|
}
|
|
2267
|
-
|
|
2267
|
+
t(W, "sameSign");
|
|
2268
2268
|
var Be = ze, Ve = He;
|
|
2269
2269
|
function He(e, t, n) {
|
|
2270
2270
|
var r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
|
|
@@ -2286,42 +2286,42 @@ function He(e, t, n) {
|
|
|
2286
2286
|
return a < c ? -1 : a === c ? 0 : 1;
|
|
2287
2287
|
}), a[0]) : e;
|
|
2288
2288
|
}
|
|
2289
|
-
|
|
2289
|
+
t(He, "intersectPolygon");
|
|
2290
2290
|
var G = {
|
|
2291
2291
|
node: Pe,
|
|
2292
2292
|
circle: Re,
|
|
2293
2293
|
ellipse: Ie,
|
|
2294
2294
|
polygon: Ve,
|
|
2295
|
-
rect: /* @__PURE__ */
|
|
2295
|
+
rect: /* @__PURE__ */ t((e, t) => {
|
|
2296
2296
|
var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2, c, l;
|
|
2297
2297
|
return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = a === 0 ? 0 : s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = i === 0 ? 0 : o * a / i), {
|
|
2298
2298
|
x: n + c,
|
|
2299
2299
|
y: r + l
|
|
2300
2300
|
};
|
|
2301
2301
|
}, "intersectRect")
|
|
2302
|
-
}, K = /* @__PURE__ */
|
|
2303
|
-
let a = f(),
|
|
2304
|
-
|
|
2305
|
-
let l = e.insert("g").attr("class",
|
|
2302
|
+
}, K = /* @__PURE__ */ t(async (e, t, r, i) => {
|
|
2303
|
+
let a = f(), s, c = t.useHtmlLabels || g(a);
|
|
2304
|
+
s = r || "node default";
|
|
2305
|
+
let l = e.insert("g").attr("class", s).attr("id", t.domId || t.id), d = l.insert("g").attr("class", "label").attr("style", t.labelStyle), p;
|
|
2306
2306
|
p = t.labelText === void 0 ? "" : typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
2307
2307
|
let m;
|
|
2308
|
-
m = t.labelType === "markdown" ? b(d, u(
|
|
2309
|
-
useHtmlLabels:
|
|
2308
|
+
m = t.labelType === "markdown" ? b(d, u(o(p), a), {
|
|
2309
|
+
useHtmlLabels: c,
|
|
2310
2310
|
width: t.width || a.flowchart.wrappingWidth,
|
|
2311
2311
|
classes: "markdown-node-label"
|
|
2312
|
-
}, a) : await B(d, u(
|
|
2312
|
+
}, a) : await B(d, u(o(p), a), t.labelStyle, !1, i);
|
|
2313
2313
|
let h = m.getBBox(), _ = t.padding / 2;
|
|
2314
2314
|
if (g(a)) {
|
|
2315
|
-
let e = m.children[0], t =
|
|
2315
|
+
let e = m.children[0], t = n(m);
|
|
2316
2316
|
await T(e, p), h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
|
|
2317
2317
|
}
|
|
2318
|
-
return
|
|
2318
|
+
return c ? d.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")") : d.attr("transform", "translate(0, " + -h.height / 2 + ")"), t.centerLabel && d.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), d.insert("rect", ":first-child"), {
|
|
2319
2319
|
shapeSvg: l,
|
|
2320
2320
|
bbox: h,
|
|
2321
2321
|
halfPadding: _,
|
|
2322
2322
|
label: d
|
|
2323
2323
|
};
|
|
2324
|
-
}, "labelHelper"), q = /* @__PURE__ */
|
|
2324
|
+
}, "labelHelper"), q = /* @__PURE__ */ t((e, t) => {
|
|
2325
2325
|
let n = t.node().getBBox();
|
|
2326
2326
|
e.width = n.width, e.height = n.height;
|
|
2327
2327
|
}, "updateNodeBounds");
|
|
@@ -2330,40 +2330,40 @@ function J(e, t, n, r) {
|
|
|
2330
2330
|
return e.x + "," + e.y;
|
|
2331
2331
|
}).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
|
|
2332
2332
|
}
|
|
2333
|
-
|
|
2334
|
-
var Ue = /* @__PURE__ */
|
|
2335
|
-
|
|
2336
|
-
let { shapeSvg:
|
|
2337
|
-
|
|
2338
|
-
let
|
|
2339
|
-
return
|
|
2340
|
-
return G.rect(
|
|
2341
|
-
},
|
|
2342
|
-
}, "note"), We = /* @__PURE__ */
|
|
2343
|
-
let { shapeSvg:
|
|
2333
|
+
t(J, "insertPolygonShape");
|
|
2334
|
+
var Ue = /* @__PURE__ */ t(async (t, n) => {
|
|
2335
|
+
n.useHtmlLabels || g(f()) || (n.centerLabel = !0);
|
|
2336
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await K(t, n, "node " + n.classes, !0);
|
|
2337
|
+
e.info("Classes = ", n.classes);
|
|
2338
|
+
let o = r.insert("rect", ":first-child");
|
|
2339
|
+
return o.attr("rx", n.rx).attr("ry", n.ry).attr("x", -i.width / 2 - a).attr("y", -i.height / 2 - a).attr("width", i.width + n.padding).attr("height", i.height + n.padding), q(n, o), n.intersect = function(e) {
|
|
2340
|
+
return G.rect(n, e);
|
|
2341
|
+
}, r;
|
|
2342
|
+
}, "note"), We = /* @__PURE__ */ t((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ t((e, t) => `${t || "node default"}${We(e.classes)} ${We(e.class)}`, "getClassesFromNode"), Ge = /* @__PURE__ */ t(async (t, n) => {
|
|
2343
|
+
let { shapeSvg: r, bbox: i } = await K(t, n, Y(n, void 0), !0), a = i.width + n.padding + (i.height + n.padding), o = [
|
|
2344
2344
|
{
|
|
2345
|
-
x:
|
|
2345
|
+
x: a / 2,
|
|
2346
2346
|
y: 0
|
|
2347
2347
|
},
|
|
2348
2348
|
{
|
|
2349
|
-
x:
|
|
2350
|
-
y: -
|
|
2349
|
+
x: a,
|
|
2350
|
+
y: -a / 2
|
|
2351
2351
|
},
|
|
2352
2352
|
{
|
|
2353
|
-
x:
|
|
2354
|
-
y: -
|
|
2353
|
+
x: a / 2,
|
|
2354
|
+
y: -a
|
|
2355
2355
|
},
|
|
2356
2356
|
{
|
|
2357
2357
|
x: 0,
|
|
2358
|
-
y: -
|
|
2358
|
+
y: -a / 2
|
|
2359
2359
|
}
|
|
2360
2360
|
];
|
|
2361
|
-
|
|
2362
|
-
let s = J(
|
|
2363
|
-
return s.attr("style",
|
|
2364
|
-
return
|
|
2365
|
-
},
|
|
2366
|
-
}, "question"), Ke = /* @__PURE__ */
|
|
2361
|
+
e.info("Question main (Circle)");
|
|
2362
|
+
let s = J(r, a, a, o);
|
|
2363
|
+
return s.attr("style", n.style), q(n, s), n.intersect = function(t) {
|
|
2364
|
+
return e.warn("Intersect called"), G.polygon(n, o, t);
|
|
2365
|
+
}, r;
|
|
2366
|
+
}, "question"), Ke = /* @__PURE__ */ t((e, t) => {
|
|
2367
2367
|
let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
2368
2368
|
return n.insert("polygon", ":first-child").attr("points", [
|
|
2369
2369
|
{
|
|
@@ -2387,7 +2387,7 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
|
|
|
2387
2387
|
}).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(e) {
|
|
2388
2388
|
return G.circle(t, 14, e);
|
|
2389
2389
|
}, n;
|
|
2390
|
-
}, "choice"), qe = /* @__PURE__ */
|
|
2390
|
+
}, "choice"), qe = /* @__PURE__ */ t(async (e, t) => {
|
|
2391
2391
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.height + t.padding, a = i / 4, o = r.width + 2 * a + t.padding, s = [
|
|
2392
2392
|
{
|
|
2393
2393
|
x: a,
|
|
@@ -2417,12 +2417,12 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
|
|
|
2417
2417
|
return c.attr("style", t.style), q(t, c), t.intersect = function(e) {
|
|
2418
2418
|
return G.polygon(t, s, e);
|
|
2419
2419
|
}, n;
|
|
2420
|
-
}, "hexagon"), Je = /* @__PURE__ */
|
|
2420
|
+
}, "hexagon"), Je = /* @__PURE__ */ t(async (e, t) => {
|
|
2421
2421
|
let { shapeSvg: n, bbox: r } = await K(e, t, void 0, !0), i = r.height + 2 * t.padding, a = i / 2, o = r.width + 2 * a + t.padding, s = Me(t.directions, r, t), c = J(n, o, i, s);
|
|
2422
2422
|
return c.attr("style", t.style), q(t, c), t.intersect = function(e) {
|
|
2423
2423
|
return G.polygon(t, s, e);
|
|
2424
2424
|
}, n;
|
|
2425
|
-
}, "block_arrow"), Ye = /* @__PURE__ */
|
|
2425
|
+
}, "block_arrow"), Ye = /* @__PURE__ */ t(async (e, t) => {
|
|
2426
2426
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2427
2427
|
{
|
|
2428
2428
|
x: -a / 2,
|
|
@@ -2448,7 +2448,7 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
|
|
|
2448
2448
|
return J(n, i, a, o).attr("style", t.style), t.width = i + a, t.height = a, t.intersect = function(e) {
|
|
2449
2449
|
return G.polygon(t, o, e);
|
|
2450
2450
|
}, n;
|
|
2451
|
-
}, "rect_left_inv_arrow"), Xe = /* @__PURE__ */
|
|
2451
|
+
}, "rect_left_inv_arrow"), Xe = /* @__PURE__ */ t(async (e, t) => {
|
|
2452
2452
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2453
2453
|
{
|
|
2454
2454
|
x: -2 * a / 6,
|
|
@@ -2470,7 +2470,7 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
|
|
|
2470
2470
|
return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
|
|
2471
2471
|
return G.polygon(t, o, e);
|
|
2472
2472
|
}, n;
|
|
2473
|
-
}, "lean_right"), Ze = /* @__PURE__ */
|
|
2473
|
+
}, "lean_right"), Ze = /* @__PURE__ */ t(async (e, t) => {
|
|
2474
2474
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2475
2475
|
{
|
|
2476
2476
|
x: 2 * a / 6,
|
|
@@ -2492,7 +2492,7 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
|
|
|
2492
2492
|
return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
|
|
2493
2493
|
return G.polygon(t, o, e);
|
|
2494
2494
|
}, n;
|
|
2495
|
-
}, "lean_left"), Qe = /* @__PURE__ */
|
|
2495
|
+
}, "lean_left"), Qe = /* @__PURE__ */ t(async (e, t) => {
|
|
2496
2496
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2497
2497
|
{
|
|
2498
2498
|
x: -2 * a / 6,
|
|
@@ -2514,7 +2514,7 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
|
|
|
2514
2514
|
return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
|
|
2515
2515
|
return G.polygon(t, o, e);
|
|
2516
2516
|
}, n;
|
|
2517
|
-
}, "trapezoid"), $e = /* @__PURE__ */
|
|
2517
|
+
}, "trapezoid"), $e = /* @__PURE__ */ t(async (e, t) => {
|
|
2518
2518
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2519
2519
|
{
|
|
2520
2520
|
x: a / 6,
|
|
@@ -2536,7 +2536,7 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
|
|
|
2536
2536
|
return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
|
|
2537
2537
|
return G.polygon(t, o, e);
|
|
2538
2538
|
}, n;
|
|
2539
|
-
}, "inv_trapezoid"), et = /* @__PURE__ */
|
|
2539
|
+
}, "inv_trapezoid"), et = /* @__PURE__ */ t(async (e, t) => {
|
|
2540
2540
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2541
2541
|
{
|
|
2542
2542
|
x: 0,
|
|
@@ -2562,7 +2562,7 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
|
|
|
2562
2562
|
return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
|
|
2563
2563
|
return G.polygon(t, o, e);
|
|
2564
2564
|
}, n;
|
|
2565
|
-
}, "rect_right_inv_arrow"), tt = /* @__PURE__ */
|
|
2565
|
+
}, "rect_right_inv_arrow"), tt = /* @__PURE__ */ t(async (e, t) => {
|
|
2566
2566
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = i / 2, o = a / (2.5 + i / 50), s = r.height + o + t.padding, c = "M 0," + o + " a " + a + "," + o + " 0,0,0 " + i + " 0 a " + a + "," + o + " 0,0,0 " + -i + " 0 l 0," + s + " a " + a + "," + o + " 0,0,0 " + i + " 0 l 0," + -s;
|
|
2567
2567
|
return q(t, n.attr("label-offset-y", o).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -i / 2 + "," + -(s / 2 + o) + ")")), t.intersect = function(e) {
|
|
2568
2568
|
let n = G.rect(t, e), r = n.x - t.x;
|
|
@@ -2572,90 +2572,90 @@ var Ue = /* @__PURE__ */ s(async (e, t) => {
|
|
|
2572
2572
|
}
|
|
2573
2573
|
return n;
|
|
2574
2574
|
}, n;
|
|
2575
|
-
}, "cylinder"), nt = /* @__PURE__ */
|
|
2576
|
-
let { shapeSvg:
|
|
2577
|
-
if (
|
|
2578
|
-
let
|
|
2579
|
-
|
|
2580
|
-
|
|
2575
|
+
}, "cylinder"), nt = /* @__PURE__ */ t(async (t, n) => {
|
|
2576
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await K(t, n, "node " + n.classes + " " + n.class, !0), o = r.insert("rect", ":first-child"), s = n.positioned ? n.width : i.width + n.padding, c = n.positioned ? n.height : i.height + n.padding, l = n.positioned ? -s / 2 : -i.width / 2 - a, u = n.positioned ? -c / 2 : -i.height / 2 - a;
|
|
2577
|
+
if (o.attr("class", "basic label-container").attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), n.props) {
|
|
2578
|
+
let t = new Set(Object.keys(n.props));
|
|
2579
|
+
n.props.borders && (X(o, n.props.borders, s, c), t.delete("borders")), t.forEach((t) => {
|
|
2580
|
+
e.warn(`Unknown node property ${t}`);
|
|
2581
2581
|
});
|
|
2582
2582
|
}
|
|
2583
|
-
return q(
|
|
2584
|
-
return G.rect(
|
|
2585
|
-
},
|
|
2586
|
-
}, "rect"), rt = /* @__PURE__ */
|
|
2587
|
-
let { shapeSvg:
|
|
2588
|
-
if (
|
|
2589
|
-
let
|
|
2590
|
-
|
|
2591
|
-
|
|
2583
|
+
return q(n, o), n.intersect = function(e) {
|
|
2584
|
+
return G.rect(n, e);
|
|
2585
|
+
}, r;
|
|
2586
|
+
}, "rect"), rt = /* @__PURE__ */ t(async (t, n) => {
|
|
2587
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await K(t, n, "node " + n.classes, !0), o = r.insert("rect", ":first-child"), s = n.positioned ? n.width : i.width + n.padding, c = n.positioned ? n.height : i.height + n.padding, l = n.positioned ? -s / 2 : -i.width / 2 - a, u = n.positioned ? -c / 2 : -i.height / 2 - a;
|
|
2588
|
+
if (o.attr("class", "basic cluster composite label-container").attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), n.props) {
|
|
2589
|
+
let t = new Set(Object.keys(n.props));
|
|
2590
|
+
n.props.borders && (X(o, n.props.borders, s, c), t.delete("borders")), t.forEach((t) => {
|
|
2591
|
+
e.warn(`Unknown node property ${t}`);
|
|
2592
2592
|
});
|
|
2593
2593
|
}
|
|
2594
|
-
return q(
|
|
2595
|
-
return G.rect(
|
|
2596
|
-
},
|
|
2597
|
-
}, "composite"), it = /* @__PURE__ */
|
|
2598
|
-
let { shapeSvg:
|
|
2599
|
-
|
|
2600
|
-
let
|
|
2601
|
-
if (
|
|
2602
|
-
let
|
|
2603
|
-
|
|
2604
|
-
|
|
2594
|
+
return q(n, o), n.intersect = function(e) {
|
|
2595
|
+
return G.rect(n, e);
|
|
2596
|
+
}, r;
|
|
2597
|
+
}, "composite"), it = /* @__PURE__ */ t(async (t, n) => {
|
|
2598
|
+
let { shapeSvg: r } = await K(t, n, "label", !0);
|
|
2599
|
+
e.trace("Classes = ", n.class);
|
|
2600
|
+
let i = r.insert("rect", ":first-child");
|
|
2601
|
+
if (i.attr("width", 0).attr("height", 0), r.attr("class", "label edgeLabel"), n.props) {
|
|
2602
|
+
let t = new Set(Object.keys(n.props));
|
|
2603
|
+
n.props.borders && (X(i, n.props.borders, 0, 0), t.delete("borders")), t.forEach((t) => {
|
|
2604
|
+
e.warn(`Unknown node property ${t}`);
|
|
2605
2605
|
});
|
|
2606
2606
|
}
|
|
2607
|
-
return q(
|
|
2608
|
-
return G.rect(
|
|
2609
|
-
},
|
|
2607
|
+
return q(n, i), n.intersect = function(e) {
|
|
2608
|
+
return G.rect(n, e);
|
|
2609
|
+
}, r;
|
|
2610
2610
|
}, "labelRect");
|
|
2611
|
-
function X(
|
|
2612
|
-
let
|
|
2613
|
-
|
|
2614
|
-
}, "addBorder"), c = /* @__PURE__ */
|
|
2615
|
-
|
|
2611
|
+
function X(n, r, i, a) {
|
|
2612
|
+
let o = [], s = /* @__PURE__ */ t((e) => {
|
|
2613
|
+
o.push(e, 0);
|
|
2614
|
+
}, "addBorder"), c = /* @__PURE__ */ t((e) => {
|
|
2615
|
+
o.push(0, e);
|
|
2616
2616
|
}, "skipBorder");
|
|
2617
|
-
|
|
2617
|
+
r.includes("t") ? (e.debug("add top border"), s(i)) : c(i), r.includes("r") ? (e.debug("add right border"), s(a)) : c(a), r.includes("b") ? (e.debug("add bottom border"), s(i)) : c(i), r.includes("l") ? (e.debug("add left border"), s(a)) : c(a), n.attr("stroke-dasharray", o.join(" "));
|
|
2618
2618
|
}
|
|
2619
|
-
|
|
2620
|
-
var at = /* @__PURE__ */
|
|
2621
|
-
let
|
|
2622
|
-
|
|
2623
|
-
let
|
|
2624
|
-
u = typeof l == "object" ? l[0] : l,
|
|
2625
|
-
let d = await B(
|
|
2619
|
+
t(X, "applyNodePropertyBorders");
|
|
2620
|
+
var at = /* @__PURE__ */ t(async (t, r) => {
|
|
2621
|
+
let i;
|
|
2622
|
+
i = r.classes ? "node " + r.classes : "node default";
|
|
2623
|
+
let a = t.insert("g").attr("class", i).attr("id", r.domId || r.id), o = a.insert("rect", ":first-child"), s = a.insert("line"), c = a.insert("g").attr("class", "label"), l = r.labelText.flat ? r.labelText.flat() : r.labelText, u = "";
|
|
2624
|
+
u = typeof l == "object" ? l[0] : l, e.info("Label text abc79", u, l, typeof l == "object");
|
|
2625
|
+
let d = await B(c, u, r.labelStyle, !0, !0), p = {
|
|
2626
2626
|
width: 0,
|
|
2627
2627
|
height: 0
|
|
2628
2628
|
};
|
|
2629
2629
|
if (g(f())) {
|
|
2630
|
-
let e = d.children[0], t =
|
|
2630
|
+
let e = d.children[0], t = n(d);
|
|
2631
2631
|
p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
|
|
2632
2632
|
}
|
|
2633
|
-
|
|
2634
|
-
let m = l.slice(1, l.length), h = d.getBBox(), _ = await B(
|
|
2633
|
+
e.info("Text 2", l);
|
|
2634
|
+
let m = l.slice(1, l.length), h = d.getBBox(), _ = await B(c, m.join ? m.join("<br/>") : m, r.labelStyle, !0, !0);
|
|
2635
2635
|
if (g(f())) {
|
|
2636
|
-
let e = _.children[0], t =
|
|
2636
|
+
let e = _.children[0], t = n(_);
|
|
2637
2637
|
p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
|
|
2638
2638
|
}
|
|
2639
|
-
let v =
|
|
2640
|
-
return
|
|
2641
|
-
return G.rect(
|
|
2642
|
-
},
|
|
2643
|
-
}, "rectWithTitle"), ot = /* @__PURE__ */
|
|
2639
|
+
let v = r.padding / 2;
|
|
2640
|
+
return n(_).attr("transform", "translate( " + (p.width > h.width ? 0 : (h.width - p.width) / 2) + ", " + (h.height + v + 5) + ")"), n(d).attr("transform", "translate( " + (p.width < h.width ? 0 : -(h.width - p.width) / 2) + ", 0)"), p = c.node().getBBox(), c.attr("transform", "translate(" + -p.width / 2 + ", " + (-p.height / 2 - v + 3) + ")"), o.attr("class", "outer title-state").attr("x", -p.width / 2 - v).attr("y", -p.height / 2 - v).attr("width", p.width + r.padding).attr("height", p.height + r.padding), s.attr("class", "divider").attr("x1", -p.width / 2 - v).attr("x2", p.width / 2 + v).attr("y1", -p.height / 2 - v + h.height + v).attr("y2", -p.height / 2 - v + h.height + v), q(r, o), r.intersect = function(e) {
|
|
2641
|
+
return G.rect(r, e);
|
|
2642
|
+
}, a;
|
|
2643
|
+
}, "rectWithTitle"), ot = /* @__PURE__ */ t(async (e, t) => {
|
|
2644
2644
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.height + t.padding, a = r.width + i / 4 + t.padding;
|
|
2645
2645
|
return q(t, n.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -a / 2).attr("y", -i / 2).attr("width", a).attr("height", i)), t.intersect = function(e) {
|
|
2646
2646
|
return G.rect(t, e);
|
|
2647
2647
|
}, n;
|
|
2648
|
-
}, "stadium"), st = /* @__PURE__ */
|
|
2649
|
-
let { shapeSvg:
|
|
2650
|
-
return
|
|
2651
|
-
return
|
|
2652
|
-
},
|
|
2653
|
-
}, "circle"), ct = /* @__PURE__ */
|
|
2654
|
-
let { shapeSvg:
|
|
2655
|
-
return
|
|
2656
|
-
return
|
|
2657
|
-
},
|
|
2658
|
-
}, "doublecircle"), lt = /* @__PURE__ */
|
|
2648
|
+
}, "stadium"), st = /* @__PURE__ */ t(async (t, n) => {
|
|
2649
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await K(t, n, Y(n, void 0), !0), o = r.insert("circle", ":first-child");
|
|
2650
|
+
return o.attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("r", i.width / 2 + a).attr("width", i.width + n.padding).attr("height", i.height + n.padding), e.info("Circle main"), q(n, o), n.intersect = function(t) {
|
|
2651
|
+
return e.info("Circle intersect", n, i.width / 2 + a, t), G.circle(n, i.width / 2 + a, t);
|
|
2652
|
+
}, r;
|
|
2653
|
+
}, "circle"), ct = /* @__PURE__ */ t(async (t, n) => {
|
|
2654
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await K(t, n, Y(n, void 0), !0), o = r.insert("g", ":first-child"), s = o.insert("circle"), c = o.insert("circle");
|
|
2655
|
+
return o.attr("class", n.class), s.attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("r", i.width / 2 + a + 5).attr("width", i.width + n.padding + 10).attr("height", i.height + n.padding + 10), c.attr("style", n.style).attr("rx", n.rx).attr("ry", n.ry).attr("r", i.width / 2 + a).attr("width", i.width + n.padding).attr("height", i.height + n.padding), e.info("DoubleCircle main"), q(n, s), n.intersect = function(t) {
|
|
2656
|
+
return e.info("DoubleCircle intersect", n, i.width / 2 + a + 5, t), G.circle(n, i.width / 2 + a + 5, t);
|
|
2657
|
+
}, r;
|
|
2658
|
+
}, "doublecircle"), lt = /* @__PURE__ */ t(async (e, t) => {
|
|
2659
2659
|
let { shapeSvg: n, bbox: r } = await K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2660
2660
|
{
|
|
2661
2661
|
x: 0,
|
|
@@ -2701,12 +2701,12 @@ var at = /* @__PURE__ */ s(async (e, t) => {
|
|
|
2701
2701
|
return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
|
|
2702
2702
|
return G.polygon(t, o, e);
|
|
2703
2703
|
}, n;
|
|
2704
|
-
}, "subroutine"), ut = /* @__PURE__ */
|
|
2704
|
+
}, "subroutine"), ut = /* @__PURE__ */ t((e, t) => {
|
|
2705
2705
|
let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child");
|
|
2706
2706
|
return r.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), q(t, r), t.intersect = function(e) {
|
|
2707
2707
|
return G.circle(t, 7, e);
|
|
2708
2708
|
}, n;
|
|
2709
|
-
}, "start"), dt = /* @__PURE__ */
|
|
2709
|
+
}, "start"), dt = /* @__PURE__ */ t((e, t, n) => {
|
|
2710
2710
|
let r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 70, a = 10;
|
|
2711
2711
|
return n === "LR" && (i = 10, a = 70), q(t, r.append("rect").attr("x", -1 * i / 2).attr("y", -1 * a / 2).attr("width", i).attr("height", a).attr("class", "fork-join")), t.height += t.padding / 2, t.width += t.padding / 2, t.intersect = function(e) {
|
|
2712
2712
|
return G.rect(t, e);
|
|
@@ -2732,7 +2732,7 @@ var at = /* @__PURE__ */ s(async (e, t) => {
|
|
|
2732
2732
|
rect_right_inv_arrow: et,
|
|
2733
2733
|
cylinder: tt,
|
|
2734
2734
|
start: ut,
|
|
2735
|
-
end: /* @__PURE__ */
|
|
2735
|
+
end: /* @__PURE__ */ t((e, t) => {
|
|
2736
2736
|
let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child"), i = n.insert("circle", ":first-child");
|
|
2737
2737
|
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), r.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), q(t, i), t.intersect = function(e) {
|
|
2738
2738
|
return G.circle(t, 7, e);
|
|
@@ -2742,81 +2742,81 @@ var at = /* @__PURE__ */ s(async (e, t) => {
|
|
|
2742
2742
|
subroutine: lt,
|
|
2743
2743
|
fork: dt,
|
|
2744
2744
|
join: dt,
|
|
2745
|
-
class_box: /* @__PURE__ */
|
|
2746
|
-
let
|
|
2747
|
-
|
|
2748
|
-
let
|
|
2745
|
+
class_box: /* @__PURE__ */ t(async (e, t) => {
|
|
2746
|
+
let r = t.padding / 2, i;
|
|
2747
|
+
i = t.classes ? "node " + t.classes : "node default";
|
|
2748
|
+
let a = e.insert("g").attr("class", i).attr("id", t.domId || t.id), o = a.insert("rect", ":first-child"), s = a.insert("line"), c = a.insert("line"), l = 0, u = 4, d = a.insert("g").attr("class", "label"), p = 0, m = t.classData.annotations?.[0], h = await B(d, t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", t.labelStyle, !0, !0), _ = h.getBBox();
|
|
2749
2749
|
if (g(f())) {
|
|
2750
|
-
let e = h.children[0], t =
|
|
2750
|
+
let e = h.children[0], t = n(h);
|
|
2751
2751
|
_ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
|
|
2752
2752
|
}
|
|
2753
2753
|
t.classData.annotations[0] && (u += _.height + 4, l += _.width);
|
|
2754
2754
|
let v = t.classData.label;
|
|
2755
2755
|
t.classData.type !== void 0 && t.classData.type !== "" && (g(f()) ? v += "<" + t.classData.type + ">" : v += "<" + t.classData.type + ">");
|
|
2756
2756
|
let y = await B(d, v, t.labelStyle, !0, !0);
|
|
2757
|
-
|
|
2757
|
+
n(y).attr("class", "classTitle");
|
|
2758
2758
|
let b = y.getBBox();
|
|
2759
2759
|
if (g(f())) {
|
|
2760
|
-
let e = y.children[0], t =
|
|
2760
|
+
let e = y.children[0], t = n(y);
|
|
2761
2761
|
b = e.getBoundingClientRect(), t.attr("width", b.width), t.attr("height", b.height);
|
|
2762
2762
|
}
|
|
2763
2763
|
u += b.height + 4, b.width > l && (l = b.width);
|
|
2764
2764
|
let x = [];
|
|
2765
2765
|
t.classData.members.forEach(async (e) => {
|
|
2766
|
-
let
|
|
2767
|
-
g(f()) && (
|
|
2768
|
-
let
|
|
2766
|
+
let r = e.getDisplayDetails(), i = r.displayText;
|
|
2767
|
+
g(f()) && (i = i.replace(/</g, "<").replace(/>/g, ">"));
|
|
2768
|
+
let a = await B(d, i, r.cssStyle ? r.cssStyle : t.labelStyle, !0, !0), o = a.getBBox();
|
|
2769
2769
|
if (g(f())) {
|
|
2770
|
-
let e =
|
|
2771
|
-
|
|
2770
|
+
let e = a.children[0], t = n(a);
|
|
2771
|
+
o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
|
|
2772
2772
|
}
|
|
2773
|
-
|
|
2773
|
+
o.width > l && (l = o.width), u += o.height + 4, x.push(a);
|
|
2774
2774
|
}), u += 8;
|
|
2775
2775
|
let S = [];
|
|
2776
2776
|
if (t.classData.methods.forEach(async (e) => {
|
|
2777
|
-
let
|
|
2778
|
-
g(f()) && (
|
|
2779
|
-
let
|
|
2777
|
+
let r = e.getDisplayDetails(), i = r.displayText;
|
|
2778
|
+
g(f()) && (i = i.replace(/</g, "<").replace(/>/g, ">"));
|
|
2779
|
+
let a = await B(d, i, r.cssStyle ? r.cssStyle : t.labelStyle, !0, !0), o = a.getBBox();
|
|
2780
2780
|
if (g(f())) {
|
|
2781
|
-
let e =
|
|
2782
|
-
|
|
2781
|
+
let e = a.children[0], t = n(a);
|
|
2782
|
+
o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
|
|
2783
2783
|
}
|
|
2784
|
-
|
|
2784
|
+
o.width > l && (l = o.width), u += o.height + 4, S.push(a);
|
|
2785
2785
|
}), u += 8, m) {
|
|
2786
2786
|
let e = (l - _.width) / 2;
|
|
2787
|
-
|
|
2787
|
+
n(h).attr("transform", "translate( " + (-1 * l / 2 + e) + ", " + -1 * u / 2 + ")"), p = _.height + 4;
|
|
2788
2788
|
}
|
|
2789
2789
|
let C = (l - b.width) / 2;
|
|
2790
|
-
return
|
|
2791
|
-
|
|
2790
|
+
return n(y).attr("transform", "translate( " + (-1 * l / 2 + C) + ", " + (-1 * u / 2 + p) + ")"), p += b.height + 4, s.attr("class", "divider").attr("x1", -l / 2 - r).attr("x2", l / 2 + r).attr("y1", -u / 2 - r + 8 + p).attr("y2", -u / 2 - r + 8 + p), p += 8, x.forEach((e) => {
|
|
2791
|
+
n(e).attr("transform", "translate( " + -l / 2 + ", " + (-1 * u / 2 + p + 8 / 2) + ")");
|
|
2792
2792
|
let t = e?.getBBox();
|
|
2793
2793
|
p += (t?.height ?? 0) + 4;
|
|
2794
|
-
}), p += 8,
|
|
2795
|
-
|
|
2794
|
+
}), p += 8, c.attr("class", "divider").attr("x1", -l / 2 - r).attr("x2", l / 2 + r).attr("y1", -u / 2 - r + 8 + p).attr("y2", -u / 2 - r + 8 + p), p += 8, S.forEach((e) => {
|
|
2795
|
+
n(e).attr("transform", "translate( " + -l / 2 + ", " + (-1 * u / 2 + p) + ")");
|
|
2796
2796
|
let t = e?.getBBox();
|
|
2797
2797
|
p += (t?.height ?? 0) + 4;
|
|
2798
|
-
}),
|
|
2798
|
+
}), o.attr("style", t.style).attr("class", "outer title-state").attr("x", -l / 2 - r).attr("y", -(u / 2) - r).attr("width", l + t.padding).attr("height", u + t.padding), q(t, o), t.intersect = function(e) {
|
|
2799
2799
|
return G.rect(t, e);
|
|
2800
|
-
},
|
|
2800
|
+
}, a;
|
|
2801
2801
|
}, "class_box")
|
|
2802
|
-
}, Z = {}, pt = /* @__PURE__ */
|
|
2802
|
+
}, Z = {}, pt = /* @__PURE__ */ t(async (e, t, n) => {
|
|
2803
2803
|
let r, i;
|
|
2804
2804
|
if (t.link) {
|
|
2805
2805
|
let a;
|
|
2806
2806
|
f().securityLevel === "sandbox" ? a = "_top" : t.linkTarget && (a = t.linkTarget || "_blank"), r = e.insert("svg:a").attr("xlink:href", t.link).attr("target", a), i = await ft[t.shape](r, t, n);
|
|
2807
2807
|
} else i = await ft[t.shape](e, t, n), r = i;
|
|
2808
2808
|
return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), Z[t.id] = r, t.haveCallback && Z[t.id].attr("class", Z[t.id].attr("class") + " clickable"), r;
|
|
2809
|
-
}, "insertNode"), mt = /* @__PURE__ */
|
|
2810
|
-
let
|
|
2811
|
-
|
|
2812
|
-
let
|
|
2813
|
-
return
|
|
2809
|
+
}, "insertNode"), mt = /* @__PURE__ */ t((t) => {
|
|
2810
|
+
let n = Z[t.id];
|
|
2811
|
+
e.trace("Transforming node", t.diff, t, "translate(" + (t.x - t.width / 2 - 5) + ", " + t.width / 2 + ")");
|
|
2812
|
+
let r = t.diff || 0;
|
|
2813
|
+
return t.clusterNode ? n.attr("transform", "translate(" + (t.x + r - t.width / 2) + ", " + (t.y - t.height / 2 - 8) + ")") : n.attr("transform", "translate(" + t.x + ", " + t.y + ")"), r;
|
|
2814
2814
|
}, "positionNode");
|
|
2815
|
-
function Q(e,
|
|
2816
|
-
let
|
|
2817
|
-
(
|
|
2815
|
+
function Q(e, t, n = !1) {
|
|
2816
|
+
let r = e, a = "default";
|
|
2817
|
+
(r?.classes?.length || 0) > 0 && (a = (r?.classes ?? []).join(" ")), a += " flowchart-label";
|
|
2818
2818
|
let o = 0, s = "", c;
|
|
2819
|
-
switch (
|
|
2819
|
+
switch (r.type) {
|
|
2820
2820
|
case "round":
|
|
2821
2821
|
o = 5, s = "rect";
|
|
2822
2822
|
break;
|
|
@@ -2876,7 +2876,7 @@ function Q(e, n, r = !1) {
|
|
|
2876
2876
|
break;
|
|
2877
2877
|
default: s = "rect";
|
|
2878
2878
|
}
|
|
2879
|
-
let l =
|
|
2879
|
+
let l = i(r?.styles ?? []), u = r.label, d = r.size ?? {
|
|
2880
2880
|
width: 0,
|
|
2881
2881
|
height: 0,
|
|
2882
2882
|
x: 0,
|
|
@@ -2890,19 +2890,19 @@ function Q(e, n, r = !1) {
|
|
|
2890
2890
|
ry: o,
|
|
2891
2891
|
class: a,
|
|
2892
2892
|
style: l.style,
|
|
2893
|
-
id:
|
|
2894
|
-
directions:
|
|
2893
|
+
id: r.id,
|
|
2894
|
+
directions: r.directions,
|
|
2895
2895
|
width: d.width,
|
|
2896
2896
|
height: d.height,
|
|
2897
2897
|
x: d.x,
|
|
2898
2898
|
y: d.y,
|
|
2899
|
-
positioned:
|
|
2899
|
+
positioned: n,
|
|
2900
2900
|
intersect: void 0,
|
|
2901
|
-
type:
|
|
2901
|
+
type: r.type,
|
|
2902
2902
|
padding: c ?? _()?.block?.padding ?? 0
|
|
2903
2903
|
};
|
|
2904
2904
|
}
|
|
2905
|
-
|
|
2905
|
+
t(Q, "getNodeFromBlock");
|
|
2906
2906
|
async function ht(e, t, n) {
|
|
2907
2907
|
let r = Q(t, n, !1);
|
|
2908
2908
|
if (r.type === "group") return;
|
|
@@ -2915,45 +2915,45 @@ async function ht(e, t, n) {
|
|
|
2915
2915
|
node: i
|
|
2916
2916
|
}, n.setBlock(o), i.remove();
|
|
2917
2917
|
}
|
|
2918
|
-
|
|
2918
|
+
t(ht, "calculateBlockSize");
|
|
2919
2919
|
async function gt(e, t, n) {
|
|
2920
2920
|
let r = Q(t, n, !0);
|
|
2921
2921
|
n.getBlock(r.id).type !== "space" && (await pt(e, r, { config: _() }), t.intersect = r?.intersect, mt(r));
|
|
2922
2922
|
}
|
|
2923
|
-
|
|
2923
|
+
t(gt, "insertBlockPositioned");
|
|
2924
2924
|
async function $(e, t, n, r) {
|
|
2925
2925
|
for (let i of t) await r(e, i, n), i.children && await $(e, i.children, n, r);
|
|
2926
2926
|
}
|
|
2927
|
-
|
|
2927
|
+
t($, "performOperations");
|
|
2928
2928
|
async function _t(e, t, n) {
|
|
2929
2929
|
await $(e, t, n, ht);
|
|
2930
2930
|
}
|
|
2931
|
-
|
|
2931
|
+
t(_t, "calculateBlockSizes");
|
|
2932
2932
|
async function vt(e, t, n) {
|
|
2933
2933
|
await $(e, t, n, gt);
|
|
2934
2934
|
}
|
|
2935
|
-
|
|
2935
|
+
t(vt, "insertBlocks");
|
|
2936
2936
|
async function yt(e, t, n, r, i) {
|
|
2937
|
-
let
|
|
2937
|
+
let a = new c({
|
|
2938
2938
|
multigraph: !0,
|
|
2939
2939
|
compound: !0
|
|
2940
2940
|
});
|
|
2941
|
-
|
|
2941
|
+
a.setGraph({
|
|
2942
2942
|
rankdir: "TB",
|
|
2943
2943
|
nodesep: 10,
|
|
2944
2944
|
ranksep: 10,
|
|
2945
2945
|
marginx: 8,
|
|
2946
2946
|
marginy: 8
|
|
2947
2947
|
});
|
|
2948
|
-
for (let e of n) e.size &&
|
|
2948
|
+
for (let e of n) e.size && a.setNode(e.id, {
|
|
2949
2949
|
width: e.size.width,
|
|
2950
2950
|
height: e.size.height,
|
|
2951
2951
|
intersect: e.intersect
|
|
2952
2952
|
});
|
|
2953
2953
|
for (let n of t) if (n.start && n.end) {
|
|
2954
|
-
let t = r.getBlock(n.start),
|
|
2955
|
-
if (t?.size &&
|
|
2956
|
-
let r = t.size, s =
|
|
2954
|
+
let t = r.getBlock(n.start), o = r.getBlock(n.end);
|
|
2955
|
+
if (t?.size && o?.size) {
|
|
2956
|
+
let r = t.size, s = o.size, c = [
|
|
2957
2957
|
{
|
|
2958
2958
|
x: r.x,
|
|
2959
2959
|
y: r.y
|
|
@@ -2977,7 +2977,7 @@ async function yt(e, t, n, r, i) {
|
|
|
2977
2977
|
arrowTypeStart: n.arrowTypeStart,
|
|
2978
2978
|
points: c,
|
|
2979
2979
|
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
2980
|
-
}, void 0, "block",
|
|
2980
|
+
}, void 0, "block", a, i), n.label && (await Te(e, {
|
|
2981
2981
|
...n,
|
|
2982
2982
|
label: n.label,
|
|
2983
2983
|
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
@@ -2993,29 +2993,29 @@ async function yt(e, t, n, r, i) {
|
|
|
2993
2993
|
}
|
|
2994
2994
|
}
|
|
2995
2995
|
}
|
|
2996
|
-
|
|
2996
|
+
t(yt, "insertEdges");
|
|
2997
2997
|
var bt = {
|
|
2998
2998
|
parser: D,
|
|
2999
2999
|
db: pe,
|
|
3000
3000
|
renderer: {
|
|
3001
|
-
draw: /* @__PURE__ */
|
|
3002
|
-
let { securityLevel:
|
|
3003
|
-
|
|
3004
|
-
let u =
|
|
3001
|
+
draw: /* @__PURE__ */ t(async function(t, r, i, a) {
|
|
3002
|
+
let { securityLevel: o, block: s } = _(), c = a.db, l;
|
|
3003
|
+
o === "sandbox" && (l = n("#i" + r));
|
|
3004
|
+
let u = n(o === "sandbox" ? l.nodes()[0].contentDocument.body : "body"), d = o === "sandbox" ? u.select(`[id="${r}"]`) : n(`[id="${r}"]`);
|
|
3005
3005
|
_e(d, [
|
|
3006
3006
|
"point",
|
|
3007
3007
|
"circle",
|
|
3008
3008
|
"cross"
|
|
3009
|
-
],
|
|
3010
|
-
let f =
|
|
3011
|
-
await _t(g, f,
|
|
3012
|
-
let v = xe(
|
|
3013
|
-
if (await vt(g, f,
|
|
3014
|
-
let
|
|
3015
|
-
p(d,
|
|
3009
|
+
], a.type, r);
|
|
3010
|
+
let f = c.getBlocks(), m = c.getBlocksFlat(), h = c.getEdges(), g = d.insert("g").attr("class", "block");
|
|
3011
|
+
await _t(g, f, c);
|
|
3012
|
+
let v = xe(c);
|
|
3013
|
+
if (await vt(g, f, c), await yt(g, h, m, c, r), v) {
|
|
3014
|
+
let t = v, n = Math.max(1, Math.round(.125 * (t.width / t.height))), r = t.height + n + 10, i = t.width + 10, { useMaxWidth: a } = s;
|
|
3015
|
+
p(d, r, i, !!a), e.debug("Here Bounds", v, t), d.attr("viewBox", `${t.x - 5} ${t.y - 5} ${t.width + 10} ${t.height + 10}`);
|
|
3016
3016
|
}
|
|
3017
3017
|
}, "draw"),
|
|
3018
|
-
getClasses: /* @__PURE__ */
|
|
3018
|
+
getClasses: /* @__PURE__ */ t(function(e, t) {
|
|
3019
3019
|
return t.db.getClasses();
|
|
3020
3020
|
}, "getClasses")
|
|
3021
3021
|
},
|