@pi-outpost/embed 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +63 -0
- package/dist/abnfDiagram-VRR7QNED-BPTALLb_.cjs +1 -0
- package/dist/abnfDiagram-VRR7QNED-DlAvVtuC.js +89 -0
- package/dist/arc-BBnpgwVQ.js +80 -0
- package/dist/arc-DcUn9_NX.cjs +1 -0
- package/dist/architecture-TIHT7OUA-D-35jO9Y.cjs +1 -0
- package/dist/architecture-TIHT7OUA-DDyMqjR1.js +3 -0
- package/dist/architectureDiagram-ZJ3FMSHR-Bh5-VPPg.cjs +36 -0
- package/dist/architectureDiagram-ZJ3FMSHR-D7UsY5ua.js +4120 -0
- package/dist/array-CApNbSU9.js +6 -0
- package/dist/array-DZSRzHA_.cjs +1 -0
- package/dist/bash-BLBHkRa_.js +169 -0
- package/dist/bash-DHJu-DNv.cjs +1 -0
- package/dist/blockDiagram-677ZJIJ3-BrXgigdO.cjs +132 -0
- package/dist/blockDiagram-677ZJIJ3-s-fanRPN.js +3160 -0
- package/dist/c-4QgYfi8K.cjs +1 -0
- package/dist/c-Cw4FsAeJ.js +176 -0
- package/dist/c4Diagram-LMCZKHZV-BbZFAi_K.js +2962 -0
- package/dist/c4Diagram-LMCZKHZV-DFBVQ9Uo.cjs +10 -0
- package/dist/channel-DV0ST12Z.js +5 -0
- package/dist/channel-DkMGzfUR.cjs +1 -0
- package/dist/chunk-2Q5K7J3B-B8v9mTdK.cjs +1 -0
- package/dist/chunk-2Q5K7J3B-DqJF2oYF.js +15 -0
- package/dist/chunk-32BRIVSS-Byu3FrKX.js +61 -0
- package/dist/chunk-32BRIVSS-oWSJWk-u.cjs +1 -0
- package/dist/chunk-52WLFC77-C9zQbcGs.js +590 -0
- package/dist/chunk-52WLFC77-D9PTsiCj.cjs +10 -0
- package/dist/chunk-5VM5RSS4-BMfgdMFU.js +5 -0
- package/dist/chunk-5VM5RSS4-CwDmQ9T_.cjs +15 -0
- package/dist/chunk-7BUUIJ7U-BFUeQBoS.js +82 -0
- package/dist/chunk-7BUUIJ7U-MzS1pW_S.cjs +1 -0
- package/dist/chunk-C7G6YPKG-CDjkH_UW.cjs +1 -0
- package/dist/chunk-C7G6YPKG-GTlyrFFt.js +67 -0
- package/dist/chunk-EX3LRPZG-BBldDxGh.js +2046 -0
- package/dist/chunk-EX3LRPZG-u-BKCEWO.cjs +231 -0
- package/dist/chunk-FWX5IMBZ-h3GfgkP2.js +57 -0
- package/dist/chunk-FWX5IMBZ-nqBth1J9.cjs +1 -0
- package/dist/chunk-HOUHSVGY-CgfXy94u.cjs +1 -0
- package/dist/chunk-HOUHSVGY-CtRCnz1G.js +277 -0
- package/dist/chunk-ICXQ74PX-BmEfYj-r.cjs +2 -0
- package/dist/chunk-ICXQ74PX-CC59NQmW.js +1366 -0
- package/dist/chunk-JWPE2WC7-B_J6qwQL.js +8 -0
- package/dist/chunk-JWPE2WC7-Cs1kjq8S.cjs +1 -0
- package/dist/chunk-KEIR6QF5-BVnxrdHo.js +21388 -0
- package/dist/chunk-KEIR6QF5-Cy_QBNG6.cjs +161 -0
- package/dist/chunk-MOJQB5TN-D6YxvkUY.js +490 -0
- package/dist/chunk-MOJQB5TN-H2vwz-oQ.cjs +88 -0
- package/dist/chunk-OGEWGWER-BGdqgMza.js +32 -0
- package/dist/chunk-OGEWGWER-BP4o8A-v.cjs +1 -0
- package/dist/chunk-PUDLZKDR-C8jMDFq6.js +4142 -0
- package/dist/chunk-PUDLZKDR-DtzwSdxX.cjs +156 -0
- package/dist/chunk-Q4XR5HBZ-Bk18cMuk.js +1628 -0
- package/dist/chunk-Q4XR5HBZ-COrrWZzi.cjs +70 -0
- package/dist/chunk-RYQCIY6F-27FDzaaE.cjs +1 -0
- package/dist/chunk-RYQCIY6F-C-YC3QS_.js +239 -0
- package/dist/chunk-V7JOEXUC-BROsdKzY.js +3357 -0
- package/dist/chunk-V7JOEXUC-Cfrm5GQn.cjs +206 -0
- package/dist/chunk-VAUOI2AC-05FwamOA.js +10 -0
- package/dist/chunk-VAUOI2AC-CBXi4Di2.cjs +1 -0
- package/dist/chunk-VR4S4FIN-CSU_1xTZ.cjs +1 -0
- package/dist/chunk-VR4S4FIN-Ci491c8N.js +26 -0
- package/dist/chunk-WYO6CB5R-BTvDzbWd.cjs +127 -0
- package/dist/chunk-WYO6CB5R-Y9HJHB3Q.js +3739 -0
- package/dist/chunk-XXDRQBXY-DsVp5qjg.js +9 -0
- package/dist/chunk-XXDRQBXY-gWcN0uCZ.cjs +1 -0
- package/dist/chunk-Y2CYZVJY-CnmLqFtv.cjs +1 -0
- package/dist/chunk-Y2CYZVJY-CwsV_8W4.js +12 -0
- package/dist/chunk-ZGVPDNZ5-CDTkXY1G.js +3736 -0
- package/dist/chunk-ZGVPDNZ5-COEQX4AZ.cjs +62 -0
- package/dist/chunk-ZIRB5QZD-BU6XQUGC.cjs +32 -0
- package/dist/chunk-ZIRB5QZD-Cj-y77rH.js +1146 -0
- package/dist/classDiagram-OUVF2IWQ-Avsu6OKn.cjs +1 -0
- package/dist/classDiagram-OUVF2IWQ-eC72Wwol.js +30 -0
- package/dist/classDiagram-v2-EOCWNBFH-Avsu6OKn.cjs +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-DsRoQgCt.js +30 -0
- package/dist/core-2nR1zkKb.cjs +3 -0
- package/dist/core-BO2hTFeF.js +845 -0
- package/dist/cose-bilkent-JH36ORCC-AyWV1dUo.cjs +1 -0
- package/dist/cose-bilkent-JH36ORCC-BFo5zomD.js +2251 -0
- package/dist/cpp-BUtp-HE2.cjs +1 -0
- package/dist/cpp-CeyO6lBG.js +225 -0
- package/dist/csharp-BJu4kEpt.cjs +1 -0
- package/dist/csharp-Ck6Fet_o.js +260 -0
- package/dist/css-ClSGJRju.js +140 -0
- package/dist/css-DeFr0lev.cjs +1 -0
- package/dist/cynefin-VYW2F7L2-DHhUPDgc.cjs +1 -0
- package/dist/cynefin-VYW2F7L2-DwiVqvhg.js +3 -0
- package/dist/cynefinDiagram-TSTJHNR4-BRUl09PN.js +349 -0
- package/dist/cynefinDiagram-TSTJHNR4-rKPqxFde.cjs +62 -0
- package/dist/cytoscape.esm-ByjvpCPI.cjs +321 -0
- package/dist/cytoscape.esm-asYnbYTy.js +18148 -0
- package/dist/dagre-BBlCxSvR.cjs +1 -0
- package/dist/dagre-BpqwxFKp.js +1701 -0
- package/dist/dagre-VKFMJZFB-BsfMZfPu.cjs +4 -0
- package/dist/dagre-VKFMJZFB-ChTkS14y.js +328 -0
- package/dist/defaultLocale-u9yUoUmE.cjs +1 -0
- package/dist/defaultLocale-up9-vqhM.js +201 -0
- package/dist/diagram-FQU43EPY-BnAYoLDy.js +432 -0
- package/dist/diagram-FQU43EPY-CdbwLZpm.cjs +3 -0
- package/dist/diagram-G47NLZAW-C1ZiELQG.js +525 -0
- package/dist/diagram-G47NLZAW-CtWKuxkf.cjs +24 -0
- package/dist/diagram-NH7WQ7WH-Be0KXo6w.js +134 -0
- package/dist/diagram-NH7WQ7WH-CG6VWVza.cjs +24 -0
- package/dist/diagram-OA4YK3LP-B7avlqjG.js +300 -0
- package/dist/diagram-OA4YK3LP-Drq_GA6o.cjs +30 -0
- package/dist/diagram-WEI45ONY-CoPX6-sx.js +214 -0
- package/dist/diagram-WEI45ONY-SJmgVL59.cjs +41 -0
- package/dist/dist-D6LMt8nW.js +59 -0
- package/dist/dist-DNGlMOWd.cjs +1 -0
- package/dist/dockerfile-O4rAswfG.js +34 -0
- package/dist/dockerfile-YBgAWga3.cjs +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-B-T4_JnX.js +100 -0
- package/dist/ebnfDiagram-CCIWWBDH-BY7L3HVQ.cjs +1 -0
- package/dist/erDiagram-Q63AITRT-DPgZpeaH.js +1727 -0
- package/dist/erDiagram-Q63AITRT-w4C1PxYd.cjs +85 -0
- package/dist/eventmodeling-45OFAUF4-COTtdYDJ.js +3 -0
- package/dist/eventmodeling-45OFAUF4-CPEyr9kU.cjs +1 -0
- package/dist/flowDiagram-23GEKE2U-CQxPdUX4.cjs +1 -0
- package/dist/flowDiagram-23GEKE2U-ClCSBl2p.js +17 -0
- package/dist/ganttDiagram-NO4QXBWP-BcBp028S.cjs +292 -0
- package/dist/ganttDiagram-NO4QXBWP-Cf12fLfa.js +3083 -0
- package/dist/gitGraph-TEB2WS4Q-C3qBT0GM.js +3 -0
- package/dist/gitGraph-TEB2WS4Q-a8KsoPmR.cjs +1 -0
- package/dist/gitGraphDiagram-IHSO6WYX-13ahKewT.js +729 -0
- package/dist/gitGraphDiagram-IHSO6WYX-BTtNkGkN.cjs +106 -0
- package/dist/go-D-pz-dmd.cjs +1 -0
- package/dist/go-rg7jg1mu.js +140 -0
- package/dist/graphlib-B0GbLif1.js +1267 -0
- package/dist/graphlib-CkkG5MuS.cjs +1 -0
- package/dist/info-DKCQHKI2-BEYhR6ip.cjs +1 -0
- package/dist/info-DKCQHKI2-BPF6-pOb.js +3 -0
- package/dist/infoDiagram-FWYZ7A6U-20rh0VNL.cjs +2 -0
- package/dist/infoDiagram-FWYZ7A6U-DcV-eSsb.js +20 -0
- package/dist/ini-C1q3_1-Q.js +88 -0
- package/dist/ini-nVcUEghj.cjs +1 -0
- package/dist/init-07zIhv_j.cjs +1 -0
- package/dist/init-CirqLVcp.js +15 -0
- package/dist/ishikawaDiagram-FXEZZL3T-BTaBCHIG.js +719 -0
- package/dist/ishikawaDiagram-FXEZZL3T-BUq5kcFI.cjs +70 -0
- package/dist/java-CUN_usaq.cjs +1 -0
- package/dist/java-HguKEfA2.js +169 -0
- package/dist/javascript-C8NCH8DE.js +436 -0
- package/dist/javascript-UZXSyUuu.cjs +1 -0
- package/dist/journeyDiagram-5HDEW3XC-Cl9Z4b58.js +884 -0
- package/dist/journeyDiagram-5HDEW3XC-XQa-rhY_.cjs +139 -0
- package/dist/json-Cp01TR_B.js +36 -0
- package/dist/json-usH_MUzR.cjs +1 -0
- package/dist/kanban-definition-HUTT4EX6-CtWnZ0nS.js +975 -0
- package/dist/kanban-definition-HUTT4EX6-DVHXUPOt.cjs +89 -0
- package/dist/line-Ca8dE_lT.cjs +1 -0
- package/dist/line-O2xx2vVQ.js +34 -0
- package/dist/linear-CVhyaVzf.js +289 -0
- package/dist/linear-Cl2-QuPP.cjs +1 -0
- package/dist/map-CwPlMWPw.cjs +1 -0
- package/dist/map-DU12fF3s.js +241 -0
- package/dist/markdown-CzgRofaE.js +181 -0
- package/dist/markdown-qeo95R0i.cjs +1 -0
- package/dist/mermaid-parser.core-B8DQcCaz.js +638 -0
- package/dist/mermaid-parser.core-Cgsz0CdK.cjs +6 -0
- package/dist/mermaid.core-BR-iKb2Q.js +1064 -0
- package/dist/mermaid.core-DQrbAA--.cjs +10 -0
- package/dist/mindmap-definition-LN4V7U3C-C0I9iWmq.cjs +96 -0
- package/dist/mindmap-definition-LN4V7U3C-lkSmRsIC.js +1008 -0
- package/dist/mount.d.ts +31 -0
- package/dist/ordinal-CCTD6_le.js +65 -0
- package/dist/ordinal-CUPR-p0T.cjs +1 -0
- package/dist/packet-7NZHBO7P-DqvBYJTR.js +3 -0
- package/dist/packet-7NZHBO7P-Dz0O2bgq.cjs +1 -0
- package/dist/path-Kklx0M1v.cjs +1 -0
- package/dist/path-mKa7UESy.js +85 -0
- package/dist/pegDiagram-2B236MQR-BgRCQTZd.js +94 -0
- package/dist/pegDiagram-2B236MQR-hlmRl_PA.cjs +1 -0
- package/dist/php-C9FOMGEA.js +294 -0
- package/dist/php-j6EhDZDE.cjs +2 -0
- package/dist/pi-outpost-embed.cjs +305 -0
- package/dist/pi-outpost-embed.js +40942 -0
- package/dist/pie-RZYD4A2V-Hi9UdoE3.cjs +1 -0
- package/dist/pie-RZYD4A2V-qnruo9sH.js +3 -0
- package/dist/pieDiagram-ENE6RG2P-BVi7ck2I.js +205 -0
- package/dist/pieDiagram-ENE6RG2P-Buuvrs-h.cjs +39 -0
- package/dist/plaintext-BYYAHR3Z.js +10 -0
- package/dist/plaintext-DmnjizxG.cjs +1 -0
- package/dist/python-BYJzTRkK.cjs +1 -0
- package/dist/python-DKAazMIE.js +238 -0
- package/dist/quadrantDiagram-ABIIQ3AL-DeU97c2B.js +2001 -0
- package/dist/quadrantDiagram-ABIIQ3AL-LCbC0LEt.cjs +7 -0
- package/dist/radar-I7S5WNFK-Dqdssa34.cjs +1 -0
- package/dist/radar-I7S5WNFK-np_pJCO-.js +3 -0
- package/dist/railroad-3IZDKUUU-NILjDQft.cjs +1 -0
- package/dist/railroad-3IZDKUUU-sjKBeXxB.js +3 -0
- package/dist/railroad-abnf-AHOZXSZD-BojH9sxV.cjs +1 -0
- package/dist/railroad-abnf-AHOZXSZD-x5cC_e_R.js +3 -0
- package/dist/railroad-ebnf-EBAXGLYW-2mlWpz38.js +3 -0
- package/dist/railroad-ebnf-EBAXGLYW-BKCSut1M.cjs +1 -0
- package/dist/railroad-peg-LSFZ7HO6-CsH-gnsp.cjs +1 -0
- package/dist/railroad-peg-LSFZ7HO6-D5vguo03.js +3 -0
- package/dist/railroadDiagram-RFXS5EU6-CMTDNjsw.cjs +1 -0
- package/dist/railroadDiagram-RFXS5EU6-DNSNpLmQ.js +76 -0
- package/dist/requirementDiagram-TGXJPOKE-CdspXMgv.js +2223 -0
- package/dist/requirementDiagram-TGXJPOKE-irImpO8w.cjs +84 -0
- package/dist/rolldown-runtime-Dqa2HsxW.js +20 -0
- package/dist/rolldown-runtime-mLOUI7ql.cjs +1 -0
- package/dist/rough.esm-C5XyeDCN.js +1352 -0
- package/dist/rough.esm-r0QOSzHM.cjs +1 -0
- package/dist/ruby-BAUeZQKZ.js +262 -0
- package/dist/ruby-ClR4zp-1.cjs +1 -0
- package/dist/rust-DiTjMjP5.js +169 -0
- package/dist/rust-ghVvEWhm.cjs +1 -0
- package/dist/sankeyDiagram-HTMAVEWB-B0ZJBVpN.cjs +40 -0
- package/dist/sankeyDiagram-HTMAVEWB-BQcvUCMA.js +970 -0
- package/dist/scss-CKxh5HRg.cjs +1 -0
- package/dist/scss-CckAvQOx.js +150 -0
- package/dist/sequenceDiagram-DBY2YBRQ-BQFP2DGs.js +4168 -0
- package/dist/sequenceDiagram-DBY2YBRQ-C5WukkcA.cjs +162 -0
- package/dist/sizeCapture-X5ZJPWSS-DKbHZNyz.js +46 -0
- package/dist/sizeCapture-X5ZJPWSS-bJ2ZX4Du.cjs +1 -0
- package/dist/sql-B-Rnc2C3.js +118 -0
- package/dist/sql-B7syKcd8.cjs +1 -0
- package/dist/src-CR--T_NF.cjs +1 -0
- package/dist/src-DJ4x3y2O.js +2142 -0
- package/dist/stateDiagram-2N3HPSRC-4aBQt5dk.js +220 -0
- package/dist/stateDiagram-2N3HPSRC-YbRd67eD.cjs +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-D-c6D5za.js +30 -0
- package/dist/stateDiagram-v2-6OUMAXLB-ciXN_270.cjs +1 -0
- package/dist/swimlanes-5IMT3BWC-C8zkS7yx.cjs +1 -0
- package/dist/swimlanes-5IMT3BWC-aKH3Xgob.js +5066 -0
- package/dist/swimlanesDiagram-G3AALYLV-BcgsG1in.js +31 -0
- package/dist/swimlanesDiagram-G3AALYLV-CBjVJdH0.cjs +8 -0
- package/dist/timeline-definition-FHXFAJF6-DS-X0FCl.cjs +120 -0
- package/dist/timeline-definition-FHXFAJF6-Lnag6wiw.js +1069 -0
- package/dist/treeView-QDETBFTQ-Cpg_YeQ4.cjs +1 -0
- package/dist/treeView-QDETBFTQ-DdpEhzZX.js +3 -0
- package/dist/treemap-6X3UGDF4-BeCuRpkA.js +3 -0
- package/dist/treemap-6X3UGDF4-CFAmnKaf.cjs +1 -0
- package/dist/typescript-clWeqIBY.cjs +1 -0
- package/dist/typescript-mdYq8uqf.js +521 -0
- package/dist/vennDiagram-L72KCM5P-CF7lC7jn.js +1880 -0
- package/dist/vennDiagram-L72KCM5P-DYZP8jT_.cjs +34 -0
- package/dist/wardley-OPB4EBWU-B0jnKd8x.cjs +1 -0
- package/dist/wardley-OPB4EBWU-DlIk2K0J.js +3 -0
- package/dist/wardleyDiagram-EHGQE667-CbtWlMOa.js +645 -0
- package/dist/wardleyDiagram-EHGQE667-Dxewrpeh.cjs +78 -0
- package/dist/xml-BamqaQOf.cjs +1 -0
- package/dist/xml-DVYfB8uY.js +166 -0
- package/dist/xychartDiagram-FW5EYKEG-BAnVfMdN.cjs +7 -0
- package/dist/xychartDiagram-FW5EYKEG-DmdGPSi6.js +2102 -0
- package/dist/yaml-_1BORZTQ.js +144 -0
- package/dist/yaml-bAgWofBg.cjs +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,3160 @@
|
|
|
1
|
+
import { n as e } from "./chunk-Y2CYZVJY-CwsV_8W4.js";
|
|
2
|
+
import { m as t, p as n } from "./src-DJ4x3y2O.js";
|
|
3
|
+
import { O as r, T as i, a, b as o, c as s, it as c, s as l, x as u, z as d } from "./chunk-WYO6CB5R-Y9HJHB3Q.js";
|
|
4
|
+
import { t as f } from "./channel-DV0ST12Z.js";
|
|
5
|
+
import { A as p, B as m, C as h, D as g, E as _, F as v, G as y, H as b, I as x, L as S, M as C, N as w, O as T, P as E, R as D, T as O, U as k, V as A, W as j, a as M, b as ee, et as te, g as N, j as ne, k as re, l as ie, v as ae, w as oe, z as se } from "./chunk-ICXQ74PX-CC59NQmW.js";
|
|
6
|
+
import { t as ce } from "./line-O2xx2vVQ.js";
|
|
7
|
+
import "./chunk-HOUHSVGY-CtRCnz1G.js";
|
|
8
|
+
import { n as P } from "./chunk-Q4XR5HBZ-Bk18cMuk.js";
|
|
9
|
+
import { t as le } from "./chunk-5VM5RSS4-BMfgdMFU.js";
|
|
10
|
+
import { n as ue, t as F } from "./chunk-7BUUIJ7U-BFUeQBoS.js";
|
|
11
|
+
import { n as de, t as fe } from "./chunk-OGEWGWER-BGdqgMza.js";
|
|
12
|
+
import { t as pe } from "./graphlib-B0GbLif1.js";
|
|
13
|
+
//#region ../node_modules/es-toolkit/dist/compat/predicate/isArray.mjs
|
|
14
|
+
function me(e) {
|
|
15
|
+
return Array.isArray(e);
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ../node_modules/es-toolkit/dist/compat/object/clone.mjs
|
|
19
|
+
function he(e) {
|
|
20
|
+
if (ee(e)) return e;
|
|
21
|
+
let t = y(e);
|
|
22
|
+
if (!ge(e)) return {};
|
|
23
|
+
if (me(e)) {
|
|
24
|
+
let t = Array.from(e);
|
|
25
|
+
return e.length > 0 && typeof e[0] == "string" && Object.hasOwn(e, "index") && (t.index = e.index, t.input = e.input), t;
|
|
26
|
+
}
|
|
27
|
+
if (ae(e)) {
|
|
28
|
+
let t = e, n = t.constructor;
|
|
29
|
+
return new n(t.buffer, t.byteOffset, t.length);
|
|
30
|
+
}
|
|
31
|
+
if (t === "[object ArrayBuffer]") return new ArrayBuffer(e.byteLength);
|
|
32
|
+
if (t === "[object DataView]") {
|
|
33
|
+
let t = e, n = t.buffer, r = t.byteOffset, i = t.byteLength, a = new ArrayBuffer(i), o = new Uint8Array(n, r, i);
|
|
34
|
+
return new Uint8Array(a).set(o), new DataView(a);
|
|
35
|
+
}
|
|
36
|
+
if (t === "[object Boolean]" || t === "[object Number]" || t === "[object String]") {
|
|
37
|
+
let n = e.constructor, r = new n(e.valueOf());
|
|
38
|
+
return t === "[object String]" ? ye(r, e) : _e(r, e), r;
|
|
39
|
+
}
|
|
40
|
+
if (t === "[object Date]") return new Date(Number(e));
|
|
41
|
+
if (t === "[object RegExp]") {
|
|
42
|
+
let t = e, n = new RegExp(t.source, t.flags);
|
|
43
|
+
return n.lastIndex = t.lastIndex, n;
|
|
44
|
+
}
|
|
45
|
+
if (t === "[object Symbol]") return Object(Symbol.prototype.valueOf.call(e));
|
|
46
|
+
if (t === "[object Map]") {
|
|
47
|
+
let t = e, n = /* @__PURE__ */ new Map();
|
|
48
|
+
return t.forEach((e, t) => {
|
|
49
|
+
n.set(t, e);
|
|
50
|
+
}), n;
|
|
51
|
+
}
|
|
52
|
+
if (t === "[object Set]") {
|
|
53
|
+
let t = e, n = /* @__PURE__ */ new Set();
|
|
54
|
+
return t.forEach((e) => {
|
|
55
|
+
n.add(e);
|
|
56
|
+
}), n;
|
|
57
|
+
}
|
|
58
|
+
if (t === "[object Arguments]") {
|
|
59
|
+
let t = e, n = {};
|
|
60
|
+
return _e(n, t), n.length = t.length, n[Symbol.iterator] = t[Symbol.iterator], n;
|
|
61
|
+
}
|
|
62
|
+
let n = {};
|
|
63
|
+
return be(n, e), _e(n, e), ve(n, e), n;
|
|
64
|
+
}
|
|
65
|
+
function ge(e) {
|
|
66
|
+
switch (y(e)) {
|
|
67
|
+
case h:
|
|
68
|
+
case O:
|
|
69
|
+
case oe:
|
|
70
|
+
case g:
|
|
71
|
+
case _:
|
|
72
|
+
case T:
|
|
73
|
+
case re:
|
|
74
|
+
case p:
|
|
75
|
+
case w:
|
|
76
|
+
case ne:
|
|
77
|
+
case C:
|
|
78
|
+
case E:
|
|
79
|
+
case v:
|
|
80
|
+
case x:
|
|
81
|
+
case S:
|
|
82
|
+
case D:
|
|
83
|
+
case se:
|
|
84
|
+
case m:
|
|
85
|
+
case k:
|
|
86
|
+
case j:
|
|
87
|
+
case A:
|
|
88
|
+
case b: return !0;
|
|
89
|
+
default: return !1;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function _e(e, t) {
|
|
93
|
+
for (let n in t) Object.hasOwn(t, n) && (e[n] = t[n]);
|
|
94
|
+
}
|
|
95
|
+
function ve(e, t) {
|
|
96
|
+
let n = Object.getOwnPropertySymbols(t);
|
|
97
|
+
for (let r = 0; r < n.length; r++) {
|
|
98
|
+
let i = n[r];
|
|
99
|
+
Object.prototype.propertyIsEnumerable.call(t, i) && (e[i] = t[i]);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function ye(e, t) {
|
|
103
|
+
let n = t.valueOf().length;
|
|
104
|
+
for (let r in t) Object.hasOwn(t, r) && (Number.isNaN(Number(r)) || Number(r) >= n) && (e[r] = t[r]);
|
|
105
|
+
}
|
|
106
|
+
function be(e, t) {
|
|
107
|
+
let n = Object.getPrototypeOf(t);
|
|
108
|
+
n !== null && typeof t.constructor == "function" && Object.setPrototypeOf(e, n);
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region ../node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-677ZJIJ3.mjs
|
|
112
|
+
var xe = (function() {
|
|
113
|
+
var t = /* @__PURE__ */ e(function(e, t, n, r) {
|
|
114
|
+
for (n ||= {}, r = e.length; r--; n[e[r]] = t);
|
|
115
|
+
return n;
|
|
116
|
+
}, "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 = [
|
|
117
|
+
8,
|
|
118
|
+
10,
|
|
119
|
+
21,
|
|
120
|
+
28,
|
|
121
|
+
29,
|
|
122
|
+
30,
|
|
123
|
+
31,
|
|
124
|
+
39,
|
|
125
|
+
43,
|
|
126
|
+
46
|
|
127
|
+
], f = [1, 23], p = [1, 24], m = [
|
|
128
|
+
8,
|
|
129
|
+
10,
|
|
130
|
+
15,
|
|
131
|
+
16,
|
|
132
|
+
21,
|
|
133
|
+
28,
|
|
134
|
+
29,
|
|
135
|
+
30,
|
|
136
|
+
31,
|
|
137
|
+
39,
|
|
138
|
+
43,
|
|
139
|
+
46
|
|
140
|
+
], h = [
|
|
141
|
+
8,
|
|
142
|
+
10,
|
|
143
|
+
15,
|
|
144
|
+
16,
|
|
145
|
+
21,
|
|
146
|
+
27,
|
|
147
|
+
28,
|
|
148
|
+
29,
|
|
149
|
+
30,
|
|
150
|
+
31,
|
|
151
|
+
39,
|
|
152
|
+
43,
|
|
153
|
+
46
|
|
154
|
+
], g = [1, 49], _ = {
|
|
155
|
+
trace: /* @__PURE__ */ e(function() {}, "trace"),
|
|
156
|
+
yy: {},
|
|
157
|
+
symbols_: {
|
|
158
|
+
error: 2,
|
|
159
|
+
spaceLines: 3,
|
|
160
|
+
SPACELINE: 4,
|
|
161
|
+
NL: 5,
|
|
162
|
+
separator: 6,
|
|
163
|
+
SPACE: 7,
|
|
164
|
+
EOF: 8,
|
|
165
|
+
start: 9,
|
|
166
|
+
BLOCK_DIAGRAM_KEY: 10,
|
|
167
|
+
document: 11,
|
|
168
|
+
stop: 12,
|
|
169
|
+
statement: 13,
|
|
170
|
+
link: 14,
|
|
171
|
+
LINK: 15,
|
|
172
|
+
START_LINK: 16,
|
|
173
|
+
LINK_LABEL: 17,
|
|
174
|
+
STR: 18,
|
|
175
|
+
nodeStatement: 19,
|
|
176
|
+
columnsStatement: 20,
|
|
177
|
+
SPACE_BLOCK: 21,
|
|
178
|
+
blockStatement: 22,
|
|
179
|
+
classDefStatement: 23,
|
|
180
|
+
cssClassStatement: 24,
|
|
181
|
+
styleStatement: 25,
|
|
182
|
+
node: 26,
|
|
183
|
+
SIZE: 27,
|
|
184
|
+
COLUMNS: 28,
|
|
185
|
+
"id-block": 29,
|
|
186
|
+
end: 30,
|
|
187
|
+
NODE_ID: 31,
|
|
188
|
+
nodeShapeNLabel: 32,
|
|
189
|
+
dirList: 33,
|
|
190
|
+
DIR: 34,
|
|
191
|
+
NODE_DSTART: 35,
|
|
192
|
+
NODE_DEND: 36,
|
|
193
|
+
BLOCK_ARROW_START: 37,
|
|
194
|
+
BLOCK_ARROW_END: 38,
|
|
195
|
+
classDef: 39,
|
|
196
|
+
CLASSDEF_ID: 40,
|
|
197
|
+
CLASSDEF_STYLEOPTS: 41,
|
|
198
|
+
DEFAULT: 42,
|
|
199
|
+
class: 43,
|
|
200
|
+
CLASSENTITY_IDS: 44,
|
|
201
|
+
STYLECLASS: 45,
|
|
202
|
+
style: 46,
|
|
203
|
+
STYLE_ENTITY_IDS: 47,
|
|
204
|
+
STYLE_DEFINITION_DATA: 48,
|
|
205
|
+
$accept: 0,
|
|
206
|
+
$end: 1
|
|
207
|
+
},
|
|
208
|
+
terminals_: {
|
|
209
|
+
2: "error",
|
|
210
|
+
4: "SPACELINE",
|
|
211
|
+
5: "NL",
|
|
212
|
+
7: "SPACE",
|
|
213
|
+
8: "EOF",
|
|
214
|
+
10: "BLOCK_DIAGRAM_KEY",
|
|
215
|
+
15: "LINK",
|
|
216
|
+
16: "START_LINK",
|
|
217
|
+
17: "LINK_LABEL",
|
|
218
|
+
18: "STR",
|
|
219
|
+
21: "SPACE_BLOCK",
|
|
220
|
+
27: "SIZE",
|
|
221
|
+
28: "COLUMNS",
|
|
222
|
+
29: "id-block",
|
|
223
|
+
30: "end",
|
|
224
|
+
31: "NODE_ID",
|
|
225
|
+
34: "DIR",
|
|
226
|
+
35: "NODE_DSTART",
|
|
227
|
+
36: "NODE_DEND",
|
|
228
|
+
37: "BLOCK_ARROW_START",
|
|
229
|
+
38: "BLOCK_ARROW_END",
|
|
230
|
+
39: "classDef",
|
|
231
|
+
40: "CLASSDEF_ID",
|
|
232
|
+
41: "CLASSDEF_STYLEOPTS",
|
|
233
|
+
42: "DEFAULT",
|
|
234
|
+
43: "class",
|
|
235
|
+
44: "CLASSENTITY_IDS",
|
|
236
|
+
45: "STYLECLASS",
|
|
237
|
+
46: "style",
|
|
238
|
+
47: "STYLE_ENTITY_IDS",
|
|
239
|
+
48: "STYLE_DEFINITION_DATA"
|
|
240
|
+
},
|
|
241
|
+
productions_: [
|
|
242
|
+
0,
|
|
243
|
+
[3, 1],
|
|
244
|
+
[3, 2],
|
|
245
|
+
[3, 2],
|
|
246
|
+
[6, 1],
|
|
247
|
+
[6, 1],
|
|
248
|
+
[6, 1],
|
|
249
|
+
[9, 3],
|
|
250
|
+
[12, 1],
|
|
251
|
+
[12, 1],
|
|
252
|
+
[12, 2],
|
|
253
|
+
[12, 2],
|
|
254
|
+
[11, 1],
|
|
255
|
+
[11, 2],
|
|
256
|
+
[14, 1],
|
|
257
|
+
[14, 4],
|
|
258
|
+
[13, 1],
|
|
259
|
+
[13, 1],
|
|
260
|
+
[13, 1],
|
|
261
|
+
[13, 1],
|
|
262
|
+
[13, 1],
|
|
263
|
+
[13, 1],
|
|
264
|
+
[13, 1],
|
|
265
|
+
[19, 3],
|
|
266
|
+
[19, 2],
|
|
267
|
+
[19, 1],
|
|
268
|
+
[20, 1],
|
|
269
|
+
[22, 4],
|
|
270
|
+
[22, 3],
|
|
271
|
+
[26, 1],
|
|
272
|
+
[26, 2],
|
|
273
|
+
[33, 1],
|
|
274
|
+
[33, 2],
|
|
275
|
+
[32, 3],
|
|
276
|
+
[32, 4],
|
|
277
|
+
[23, 3],
|
|
278
|
+
[23, 3],
|
|
279
|
+
[24, 3],
|
|
280
|
+
[25, 3]
|
|
281
|
+
],
|
|
282
|
+
performAction: /* @__PURE__ */ e(function(e, t, n, r, i, a, o) {
|
|
283
|
+
var s = a.length - 1;
|
|
284
|
+
switch (i) {
|
|
285
|
+
case 4:
|
|
286
|
+
r.getLogger().debug("Rule: separator (NL) ");
|
|
287
|
+
break;
|
|
288
|
+
case 5:
|
|
289
|
+
r.getLogger().debug("Rule: separator (Space) ");
|
|
290
|
+
break;
|
|
291
|
+
case 6:
|
|
292
|
+
r.getLogger().debug("Rule: separator (EOF) ");
|
|
293
|
+
break;
|
|
294
|
+
case 7:
|
|
295
|
+
r.getLogger().debug("Rule: hierarchy: ", a[s - 1]), r.setHierarchy(a[s - 1]);
|
|
296
|
+
break;
|
|
297
|
+
case 8:
|
|
298
|
+
r.getLogger().debug("Stop NL ");
|
|
299
|
+
break;
|
|
300
|
+
case 9:
|
|
301
|
+
r.getLogger().debug("Stop EOF ");
|
|
302
|
+
break;
|
|
303
|
+
case 10:
|
|
304
|
+
r.getLogger().debug("Stop NL2 ");
|
|
305
|
+
break;
|
|
306
|
+
case 11:
|
|
307
|
+
r.getLogger().debug("Stop EOF2 ");
|
|
308
|
+
break;
|
|
309
|
+
case 12:
|
|
310
|
+
r.getLogger().debug("Rule: statement: ", a[s]), typeof a[s].length == "number" ? this.$ = a[s] : this.$ = [a[s]];
|
|
311
|
+
break;
|
|
312
|
+
case 13:
|
|
313
|
+
r.getLogger().debug("Rule: statement #2: ", a[s - 1]), this.$ = [a[s - 1]].concat(a[s]);
|
|
314
|
+
break;
|
|
315
|
+
case 14:
|
|
316
|
+
r.getLogger().debug("Rule: link: ", a[s], e), this.$ = {
|
|
317
|
+
edgeTypeStr: a[s],
|
|
318
|
+
label: ""
|
|
319
|
+
};
|
|
320
|
+
break;
|
|
321
|
+
case 15:
|
|
322
|
+
r.getLogger().debug("Rule: LABEL link: ", a[s - 3], a[s - 1], a[s]), this.$ = {
|
|
323
|
+
edgeTypeStr: a[s],
|
|
324
|
+
label: a[s - 1]
|
|
325
|
+
};
|
|
326
|
+
break;
|
|
327
|
+
case 18:
|
|
328
|
+
let t = parseInt(a[s]), n = r.generateId();
|
|
329
|
+
this.$ = {
|
|
330
|
+
id: n,
|
|
331
|
+
type: "space",
|
|
332
|
+
label: "",
|
|
333
|
+
width: t,
|
|
334
|
+
children: []
|
|
335
|
+
};
|
|
336
|
+
break;
|
|
337
|
+
case 23:
|
|
338
|
+
r.getLogger().debug("Rule: (nodeStatement link node) ", a[s - 2], a[s - 1], a[s], " typestr: ", a[s - 1].edgeTypeStr);
|
|
339
|
+
let i = r.edgeStrToEdgeData(a[s - 1].edgeTypeStr), o = r.edgeStrToEdgeStartData(a[s - 1].edgeTypeStr), c = r.edgeStrToThickness(a[s - 1].edgeTypeStr), l = r.edgeStrToPattern(a[s - 1].edgeTypeStr);
|
|
340
|
+
this.$ = [
|
|
341
|
+
{
|
|
342
|
+
id: a[s - 2].id,
|
|
343
|
+
label: a[s - 2].label,
|
|
344
|
+
type: a[s - 2].type,
|
|
345
|
+
directions: a[s - 2].directions
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
id: a[s - 2].id + "-" + a[s].id,
|
|
349
|
+
start: a[s - 2].id,
|
|
350
|
+
end: a[s].id,
|
|
351
|
+
label: a[s - 1].label,
|
|
352
|
+
type: "edge",
|
|
353
|
+
thickness: c,
|
|
354
|
+
pattern: l,
|
|
355
|
+
directions: a[s].directions,
|
|
356
|
+
arrowTypeEnd: i,
|
|
357
|
+
arrowTypeStart: o
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
id: a[s].id,
|
|
361
|
+
label: a[s].label,
|
|
362
|
+
type: r.typeStr2Type(a[s].typeStr),
|
|
363
|
+
directions: a[s].directions
|
|
364
|
+
}
|
|
365
|
+
];
|
|
366
|
+
break;
|
|
367
|
+
case 24:
|
|
368
|
+
r.getLogger().debug("Rule: nodeStatement (abc88 node size) ", a[s - 1], a[s]), this.$ = {
|
|
369
|
+
id: a[s - 1].id,
|
|
370
|
+
label: a[s - 1].label,
|
|
371
|
+
type: r.typeStr2Type(a[s - 1].typeStr),
|
|
372
|
+
directions: a[s - 1].directions,
|
|
373
|
+
widthInColumns: parseInt(a[s], 10)
|
|
374
|
+
};
|
|
375
|
+
break;
|
|
376
|
+
case 25:
|
|
377
|
+
r.getLogger().debug("Rule: nodeStatement (node) ", a[s]), this.$ = {
|
|
378
|
+
id: a[s].id,
|
|
379
|
+
label: a[s].label,
|
|
380
|
+
type: r.typeStr2Type(a[s].typeStr),
|
|
381
|
+
directions: a[s].directions,
|
|
382
|
+
widthInColumns: 1
|
|
383
|
+
};
|
|
384
|
+
break;
|
|
385
|
+
case 26:
|
|
386
|
+
r.getLogger().debug("APA123", this ? this : "na"), r.getLogger().debug("COLUMNS: ", a[s]), this.$ = {
|
|
387
|
+
type: "column-setting",
|
|
388
|
+
columns: a[s] === "auto" ? -1 : parseInt(a[s])
|
|
389
|
+
};
|
|
390
|
+
break;
|
|
391
|
+
case 27:
|
|
392
|
+
r.getLogger().debug("Rule: id-block statement : ", a[s - 2], a[s - 1]), r.generateId(), this.$ = {
|
|
393
|
+
...a[s - 2],
|
|
394
|
+
type: "composite",
|
|
395
|
+
children: a[s - 1]
|
|
396
|
+
};
|
|
397
|
+
break;
|
|
398
|
+
case 28:
|
|
399
|
+
r.getLogger().debug("Rule: blockStatement : ", a[s - 2], a[s - 1], a[s]);
|
|
400
|
+
let u = r.generateId();
|
|
401
|
+
this.$ = {
|
|
402
|
+
id: u,
|
|
403
|
+
type: "composite",
|
|
404
|
+
label: "",
|
|
405
|
+
children: a[s - 1]
|
|
406
|
+
};
|
|
407
|
+
break;
|
|
408
|
+
case 29:
|
|
409
|
+
r.getLogger().debug("Rule: node (NODE_ID separator): ", a[s]), this.$ = { id: a[s] };
|
|
410
|
+
break;
|
|
411
|
+
case 30:
|
|
412
|
+
r.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", a[s - 1], a[s]), this.$ = {
|
|
413
|
+
id: a[s - 1],
|
|
414
|
+
label: a[s].label,
|
|
415
|
+
typeStr: a[s].typeStr,
|
|
416
|
+
directions: a[s].directions
|
|
417
|
+
};
|
|
418
|
+
break;
|
|
419
|
+
case 31:
|
|
420
|
+
r.getLogger().debug("Rule: dirList: ", a[s]), this.$ = [a[s]];
|
|
421
|
+
break;
|
|
422
|
+
case 32:
|
|
423
|
+
r.getLogger().debug("Rule: dirList: ", a[s - 1], a[s]), this.$ = [a[s - 1]].concat(a[s]);
|
|
424
|
+
break;
|
|
425
|
+
case 33:
|
|
426
|
+
r.getLogger().debug("Rule: nodeShapeNLabel: ", a[s - 2], a[s - 1], a[s]), this.$ = {
|
|
427
|
+
typeStr: a[s - 2] + a[s],
|
|
428
|
+
label: a[s - 1]
|
|
429
|
+
};
|
|
430
|
+
break;
|
|
431
|
+
case 34:
|
|
432
|
+
r.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", a[s - 3], a[s - 2], " #3:", a[s - 1], a[s]), this.$ = {
|
|
433
|
+
typeStr: a[s - 3] + a[s],
|
|
434
|
+
label: a[s - 2],
|
|
435
|
+
directions: a[s - 1]
|
|
436
|
+
};
|
|
437
|
+
break;
|
|
438
|
+
case 35:
|
|
439
|
+
case 36:
|
|
440
|
+
this.$ = {
|
|
441
|
+
type: "classDef",
|
|
442
|
+
id: a[s - 1].trim(),
|
|
443
|
+
css: a[s].trim()
|
|
444
|
+
};
|
|
445
|
+
break;
|
|
446
|
+
case 37:
|
|
447
|
+
this.$ = {
|
|
448
|
+
type: "applyClass",
|
|
449
|
+
id: a[s - 1].trim(),
|
|
450
|
+
styleClass: a[s].trim()
|
|
451
|
+
};
|
|
452
|
+
break;
|
|
453
|
+
case 38:
|
|
454
|
+
this.$ = {
|
|
455
|
+
type: "applyStyles",
|
|
456
|
+
id: a[s - 1].trim(),
|
|
457
|
+
stylesStr: a[s].trim()
|
|
458
|
+
};
|
|
459
|
+
break;
|
|
460
|
+
}
|
|
461
|
+
}, "anonymous"),
|
|
462
|
+
table: [
|
|
463
|
+
{
|
|
464
|
+
9: 1,
|
|
465
|
+
10: [1, 2]
|
|
466
|
+
},
|
|
467
|
+
{ 1: [3] },
|
|
468
|
+
{
|
|
469
|
+
10: n,
|
|
470
|
+
11: 3,
|
|
471
|
+
13: 4,
|
|
472
|
+
19: 5,
|
|
473
|
+
20: 6,
|
|
474
|
+
21: r,
|
|
475
|
+
22: 8,
|
|
476
|
+
23: 9,
|
|
477
|
+
24: 10,
|
|
478
|
+
25: 11,
|
|
479
|
+
26: 12,
|
|
480
|
+
28: i,
|
|
481
|
+
29: a,
|
|
482
|
+
31: o,
|
|
483
|
+
39: s,
|
|
484
|
+
43: c,
|
|
485
|
+
46: l
|
|
486
|
+
},
|
|
487
|
+
{ 8: [1, 20] },
|
|
488
|
+
t(u, [2, 12], {
|
|
489
|
+
13: 4,
|
|
490
|
+
19: 5,
|
|
491
|
+
20: 6,
|
|
492
|
+
22: 8,
|
|
493
|
+
23: 9,
|
|
494
|
+
24: 10,
|
|
495
|
+
25: 11,
|
|
496
|
+
26: 12,
|
|
497
|
+
11: 21,
|
|
498
|
+
10: n,
|
|
499
|
+
21: r,
|
|
500
|
+
28: i,
|
|
501
|
+
29: a,
|
|
502
|
+
31: o,
|
|
503
|
+
39: s,
|
|
504
|
+
43: c,
|
|
505
|
+
46: l
|
|
506
|
+
}),
|
|
507
|
+
t(d, [2, 16], {
|
|
508
|
+
14: 22,
|
|
509
|
+
15: f,
|
|
510
|
+
16: p
|
|
511
|
+
}),
|
|
512
|
+
t(d, [2, 17]),
|
|
513
|
+
t(d, [2, 18]),
|
|
514
|
+
t(d, [2, 19]),
|
|
515
|
+
t(d, [2, 20]),
|
|
516
|
+
t(d, [2, 21]),
|
|
517
|
+
t(d, [2, 22]),
|
|
518
|
+
t(m, [2, 25], { 27: [1, 25] }),
|
|
519
|
+
t(d, [2, 26]),
|
|
520
|
+
{
|
|
521
|
+
19: 26,
|
|
522
|
+
26: 12,
|
|
523
|
+
31: o
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
10: n,
|
|
527
|
+
11: 27,
|
|
528
|
+
13: 4,
|
|
529
|
+
19: 5,
|
|
530
|
+
20: 6,
|
|
531
|
+
21: r,
|
|
532
|
+
22: 8,
|
|
533
|
+
23: 9,
|
|
534
|
+
24: 10,
|
|
535
|
+
25: 11,
|
|
536
|
+
26: 12,
|
|
537
|
+
28: i,
|
|
538
|
+
29: a,
|
|
539
|
+
31: o,
|
|
540
|
+
39: s,
|
|
541
|
+
43: c,
|
|
542
|
+
46: l
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
40: [1, 28],
|
|
546
|
+
42: [1, 29]
|
|
547
|
+
},
|
|
548
|
+
{ 44: [1, 30] },
|
|
549
|
+
{ 47: [1, 31] },
|
|
550
|
+
t(h, [2, 29], {
|
|
551
|
+
32: 32,
|
|
552
|
+
35: [1, 33],
|
|
553
|
+
37: [1, 34]
|
|
554
|
+
}),
|
|
555
|
+
{ 1: [2, 7] },
|
|
556
|
+
t(u, [2, 13]),
|
|
557
|
+
{
|
|
558
|
+
26: 35,
|
|
559
|
+
31: o
|
|
560
|
+
},
|
|
561
|
+
{ 31: [2, 14] },
|
|
562
|
+
{ 17: [1, 36] },
|
|
563
|
+
t(m, [2, 24]),
|
|
564
|
+
{
|
|
565
|
+
10: n,
|
|
566
|
+
11: 37,
|
|
567
|
+
13: 4,
|
|
568
|
+
14: 22,
|
|
569
|
+
15: f,
|
|
570
|
+
16: p,
|
|
571
|
+
19: 5,
|
|
572
|
+
20: 6,
|
|
573
|
+
21: r,
|
|
574
|
+
22: 8,
|
|
575
|
+
23: 9,
|
|
576
|
+
24: 10,
|
|
577
|
+
25: 11,
|
|
578
|
+
26: 12,
|
|
579
|
+
28: i,
|
|
580
|
+
29: a,
|
|
581
|
+
31: o,
|
|
582
|
+
39: s,
|
|
583
|
+
43: c,
|
|
584
|
+
46: l
|
|
585
|
+
},
|
|
586
|
+
{ 30: [1, 38] },
|
|
587
|
+
{ 41: [1, 39] },
|
|
588
|
+
{ 41: [1, 40] },
|
|
589
|
+
{ 45: [1, 41] },
|
|
590
|
+
{ 48: [1, 42] },
|
|
591
|
+
t(h, [2, 30]),
|
|
592
|
+
{ 18: [1, 43] },
|
|
593
|
+
{ 18: [1, 44] },
|
|
594
|
+
t(m, [2, 23]),
|
|
595
|
+
{ 18: [1, 45] },
|
|
596
|
+
{ 30: [1, 46] },
|
|
597
|
+
t(d, [2, 28]),
|
|
598
|
+
t(d, [2, 35]),
|
|
599
|
+
t(d, [2, 36]),
|
|
600
|
+
t(d, [2, 37]),
|
|
601
|
+
t(d, [2, 38]),
|
|
602
|
+
{ 36: [1, 47] },
|
|
603
|
+
{
|
|
604
|
+
33: 48,
|
|
605
|
+
34: g
|
|
606
|
+
},
|
|
607
|
+
{ 15: [1, 50] },
|
|
608
|
+
t(d, [2, 27]),
|
|
609
|
+
t(h, [2, 33]),
|
|
610
|
+
{ 38: [1, 51] },
|
|
611
|
+
{
|
|
612
|
+
33: 52,
|
|
613
|
+
34: g,
|
|
614
|
+
38: [2, 31]
|
|
615
|
+
},
|
|
616
|
+
{ 31: [2, 15] },
|
|
617
|
+
t(h, [2, 34]),
|
|
618
|
+
{ 38: [2, 32] }
|
|
619
|
+
],
|
|
620
|
+
defaultActions: {
|
|
621
|
+
20: [2, 7],
|
|
622
|
+
23: [2, 14],
|
|
623
|
+
50: [2, 15],
|
|
624
|
+
52: [2, 32]
|
|
625
|
+
},
|
|
626
|
+
parseError: /* @__PURE__ */ e(function(e, t) {
|
|
627
|
+
if (t.recoverable) this.trace(e);
|
|
628
|
+
else {
|
|
629
|
+
var n = Error(e);
|
|
630
|
+
throw n.hash = t, n;
|
|
631
|
+
}
|
|
632
|
+
}, "parseError"),
|
|
633
|
+
parse: /* @__PURE__ */ e(function(t) {
|
|
634
|
+
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: {} };
|
|
635
|
+
for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
|
|
636
|
+
h.setInput(t, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
|
|
637
|
+
var v = h.yylloc;
|
|
638
|
+
o.push(v);
|
|
639
|
+
var y = h.options && h.options.ranges;
|
|
640
|
+
typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
641
|
+
function b(e) {
|
|
642
|
+
r.length -= 2 * e, a.length -= e, o.length -= e;
|
|
643
|
+
}
|
|
644
|
+
e(b, "popStack");
|
|
645
|
+
function x() {
|
|
646
|
+
var e = i.pop() || h.lex() || p;
|
|
647
|
+
return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
|
|
648
|
+
}
|
|
649
|
+
e(x, "lex");
|
|
650
|
+
for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
|
|
651
|
+
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]) {
|
|
652
|
+
var M = "";
|
|
653
|
+
for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
|
|
654
|
+
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, {
|
|
655
|
+
text: h.match,
|
|
656
|
+
token: this.terminals_[S] || S,
|
|
657
|
+
line: h.yylineno,
|
|
658
|
+
loc: v,
|
|
659
|
+
expected: j
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
|
|
663
|
+
switch (T[0]) {
|
|
664
|
+
case 1:
|
|
665
|
+
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--);
|
|
666
|
+
break;
|
|
667
|
+
case 2:
|
|
668
|
+
if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
|
|
669
|
+
first_line: o[o.length - (k || 1)].first_line,
|
|
670
|
+
last_line: o[o.length - 1].last_line,
|
|
671
|
+
first_column: o[o.length - (k || 1)].first_column,
|
|
672
|
+
last_column: o[o.length - 1].last_column
|
|
673
|
+
}, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
|
|
674
|
+
c,
|
|
675
|
+
u,
|
|
676
|
+
l,
|
|
677
|
+
g.yy,
|
|
678
|
+
T[1],
|
|
679
|
+
a,
|
|
680
|
+
o
|
|
681
|
+
].concat(m)), E !== void 0) return E;
|
|
682
|
+
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);
|
|
683
|
+
break;
|
|
684
|
+
case 3: return !0;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
return !0;
|
|
688
|
+
}, "parse")
|
|
689
|
+
};
|
|
690
|
+
_.lexer = /* @__PURE__ */ (function() {
|
|
691
|
+
return {
|
|
692
|
+
EOF: 1,
|
|
693
|
+
parseError: /* @__PURE__ */ e(function(e, t) {
|
|
694
|
+
if (this.yy.parser) this.yy.parser.parseError(e, t);
|
|
695
|
+
else throw Error(e);
|
|
696
|
+
}, "parseError"),
|
|
697
|
+
setInput: /* @__PURE__ */ e(function(e, t) {
|
|
698
|
+
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 = {
|
|
699
|
+
first_line: 1,
|
|
700
|
+
first_column: 0,
|
|
701
|
+
last_line: 1,
|
|
702
|
+
last_column: 0
|
|
703
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
704
|
+
}, "setInput"),
|
|
705
|
+
input: /* @__PURE__ */ e(function() {
|
|
706
|
+
var e = this._input[0];
|
|
707
|
+
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;
|
|
708
|
+
}, "input"),
|
|
709
|
+
unput: /* @__PURE__ */ e(function(e) {
|
|
710
|
+
var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
|
|
711
|
+
this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
|
|
712
|
+
var r = this.match.split(/(?:\r\n?|\n)/g);
|
|
713
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
|
|
714
|
+
var i = this.yylloc.range;
|
|
715
|
+
return this.yylloc = {
|
|
716
|
+
first_line: this.yylloc.first_line,
|
|
717
|
+
last_line: this.yylineno + 1,
|
|
718
|
+
first_column: this.yylloc.first_column,
|
|
719
|
+
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
|
|
720
|
+
}, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
|
|
721
|
+
}, "unput"),
|
|
722
|
+
more: /* @__PURE__ */ e(function() {
|
|
723
|
+
return this._more = !0, this;
|
|
724
|
+
}, "more"),
|
|
725
|
+
reject: /* @__PURE__ */ e(function() {
|
|
726
|
+
if (this.options.backtrack_lexer) this._backtrack = !0;
|
|
727
|
+
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(), {
|
|
728
|
+
text: "",
|
|
729
|
+
token: null,
|
|
730
|
+
line: this.yylineno
|
|
731
|
+
});
|
|
732
|
+
return this;
|
|
733
|
+
}, "reject"),
|
|
734
|
+
less: /* @__PURE__ */ e(function(e) {
|
|
735
|
+
this.unput(this.match.slice(e));
|
|
736
|
+
}, "less"),
|
|
737
|
+
pastInput: /* @__PURE__ */ e(function() {
|
|
738
|
+
var e = this.matched.substr(0, this.matched.length - this.match.length);
|
|
739
|
+
return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
|
|
740
|
+
}, "pastInput"),
|
|
741
|
+
upcomingInput: /* @__PURE__ */ e(function() {
|
|
742
|
+
var e = this.match;
|
|
743
|
+
return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
744
|
+
}, "upcomingInput"),
|
|
745
|
+
showPosition: /* @__PURE__ */ e(function() {
|
|
746
|
+
var e = this.pastInput(), t = Array(e.length + 1).join("-");
|
|
747
|
+
return e + this.upcomingInput() + "\n" + t + "^";
|
|
748
|
+
}, "showPosition"),
|
|
749
|
+
test_match: /* @__PURE__ */ e(function(e, t) {
|
|
750
|
+
var n, r, i;
|
|
751
|
+
if (this.options.backtrack_lexer && (i = {
|
|
752
|
+
yylineno: this.yylineno,
|
|
753
|
+
yylloc: {
|
|
754
|
+
first_line: this.yylloc.first_line,
|
|
755
|
+
last_line: this.last_line,
|
|
756
|
+
first_column: this.yylloc.first_column,
|
|
757
|
+
last_column: this.yylloc.last_column
|
|
758
|
+
},
|
|
759
|
+
yytext: this.yytext,
|
|
760
|
+
match: this.match,
|
|
761
|
+
matches: this.matches,
|
|
762
|
+
matched: this.matched,
|
|
763
|
+
yyleng: this.yyleng,
|
|
764
|
+
offset: this.offset,
|
|
765
|
+
_more: this._more,
|
|
766
|
+
_input: this._input,
|
|
767
|
+
yy: this.yy,
|
|
768
|
+
conditionStack: this.conditionStack.slice(0),
|
|
769
|
+
done: this.done
|
|
770
|
+
}, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
|
|
771
|
+
first_line: this.yylloc.last_line,
|
|
772
|
+
last_line: this.yylineno + 1,
|
|
773
|
+
first_column: this.yylloc.last_column,
|
|
774
|
+
last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
|
|
775
|
+
}, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
|
|
776
|
+
if (this._backtrack) {
|
|
777
|
+
for (var a in i) this[a] = i[a];
|
|
778
|
+
return !1;
|
|
779
|
+
}
|
|
780
|
+
return !1;
|
|
781
|
+
}, "test_match"),
|
|
782
|
+
next: /* @__PURE__ */ e(function() {
|
|
783
|
+
if (this.done) return this.EOF;
|
|
784
|
+
this._input || (this.done = !0);
|
|
785
|
+
var e, t, n, r;
|
|
786
|
+
this._more || (this.yytext = "", this.match = "");
|
|
787
|
+
for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
|
|
788
|
+
if (t = n, r = a, this.options.backtrack_lexer) {
|
|
789
|
+
if (e = this.test_match(n, i[a]), e !== !1) return e;
|
|
790
|
+
if (this._backtrack) {
|
|
791
|
+
t = !1;
|
|
792
|
+
continue;
|
|
793
|
+
} else return !1;
|
|
794
|
+
} else if (!this.options.flex) break;
|
|
795
|
+
}
|
|
796
|
+
return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
797
|
+
text: "",
|
|
798
|
+
token: null,
|
|
799
|
+
line: this.yylineno
|
|
800
|
+
});
|
|
801
|
+
}, "next"),
|
|
802
|
+
lex: /* @__PURE__ */ e(function() {
|
|
803
|
+
return this.next() || this.lex();
|
|
804
|
+
}, "lex"),
|
|
805
|
+
begin: /* @__PURE__ */ e(function(e) {
|
|
806
|
+
this.conditionStack.push(e);
|
|
807
|
+
}, "begin"),
|
|
808
|
+
popState: /* @__PURE__ */ e(function() {
|
|
809
|
+
return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
810
|
+
}, "popState"),
|
|
811
|
+
_currentRules: /* @__PURE__ */ e(function() {
|
|
812
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
813
|
+
}, "_currentRules"),
|
|
814
|
+
topState: /* @__PURE__ */ e(function(e) {
|
|
815
|
+
return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
|
|
816
|
+
}, "topState"),
|
|
817
|
+
pushState: /* @__PURE__ */ e(function(e) {
|
|
818
|
+
this.begin(e);
|
|
819
|
+
}, "pushState"),
|
|
820
|
+
stateStackSize: /* @__PURE__ */ e(function() {
|
|
821
|
+
return this.conditionStack.length;
|
|
822
|
+
}, "stateStackSize"),
|
|
823
|
+
options: {},
|
|
824
|
+
performAction: /* @__PURE__ */ e(function(e, t, n, r) {
|
|
825
|
+
switch (n) {
|
|
826
|
+
case 0: return e.getLogger().debug("Found block-beta"), 10;
|
|
827
|
+
case 1: return e.getLogger().debug("Found id-block"), 29;
|
|
828
|
+
case 2: return e.getLogger().debug("Found block"), 10;
|
|
829
|
+
case 3:
|
|
830
|
+
e.getLogger().debug(".", t.yytext);
|
|
831
|
+
break;
|
|
832
|
+
case 4:
|
|
833
|
+
e.getLogger().debug("_", t.yytext);
|
|
834
|
+
break;
|
|
835
|
+
case 5: return 5;
|
|
836
|
+
case 6: return t.yytext = -1, 28;
|
|
837
|
+
case 7: return t.yytext = t.yytext.replace(/columns\s+/, ""), e.getLogger().debug("COLUMNS (LEX)", t.yytext), 28;
|
|
838
|
+
case 8:
|
|
839
|
+
this.pushState("md_string");
|
|
840
|
+
break;
|
|
841
|
+
case 9: return "MD_STR";
|
|
842
|
+
case 10:
|
|
843
|
+
this.popState();
|
|
844
|
+
break;
|
|
845
|
+
case 11:
|
|
846
|
+
this.pushState("string");
|
|
847
|
+
break;
|
|
848
|
+
case 12:
|
|
849
|
+
e.getLogger().debug("LEX: POPPING STR:", t.yytext), this.popState();
|
|
850
|
+
break;
|
|
851
|
+
case 13: return e.getLogger().debug("LEX: STR end:", t.yytext), "STR";
|
|
852
|
+
case 14: return t.yytext = t.yytext.replace(/space\:/, ""), e.getLogger().debug("SPACE NUM (LEX)", t.yytext), 21;
|
|
853
|
+
case 15: return t.yytext = "1", e.getLogger().debug("COLUMNS (LEX)", t.yytext), 21;
|
|
854
|
+
case 16: return 42;
|
|
855
|
+
case 17: return "LINKSTYLE";
|
|
856
|
+
case 18: return "INTERPOLATE";
|
|
857
|
+
case 19: return this.pushState("CLASSDEF"), 39;
|
|
858
|
+
case 20: return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
|
|
859
|
+
case 21: return this.popState(), this.pushState("CLASSDEFID"), 40;
|
|
860
|
+
case 22: return this.popState(), 41;
|
|
861
|
+
case 23: return this.pushState("CLASS"), 43;
|
|
862
|
+
case 24: return this.popState(), this.pushState("CLASS_STYLE"), 44;
|
|
863
|
+
case 25: return this.popState(), 45;
|
|
864
|
+
case 26: return this.pushState("STYLE_STMNT"), 46;
|
|
865
|
+
case 27: return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
|
|
866
|
+
case 28: return this.popState(), 48;
|
|
867
|
+
case 29: return this.pushState("acc_title"), "acc_title";
|
|
868
|
+
case 30: return this.popState(), "acc_title_value";
|
|
869
|
+
case 31: return this.pushState("acc_descr"), "acc_descr";
|
|
870
|
+
case 32: return this.popState(), "acc_descr_value";
|
|
871
|
+
case 33:
|
|
872
|
+
this.pushState("acc_descr_multiline");
|
|
873
|
+
break;
|
|
874
|
+
case 34:
|
|
875
|
+
this.popState();
|
|
876
|
+
break;
|
|
877
|
+
case 35: return "acc_descr_multiline_value";
|
|
878
|
+
case 36: return 30;
|
|
879
|
+
case 37: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
880
|
+
case 38: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
881
|
+
case 39: return this.popState(), e.getLogger().debug("Lex: ))"), "NODE_DEND";
|
|
882
|
+
case 40: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
883
|
+
case 41: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
884
|
+
case 42: return this.popState(), e.getLogger().debug("Lex: (-"), "NODE_DEND";
|
|
885
|
+
case 43: return this.popState(), e.getLogger().debug("Lex: -)"), "NODE_DEND";
|
|
886
|
+
case 44: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
887
|
+
case 45: return this.popState(), e.getLogger().debug("Lex: ]]"), "NODE_DEND";
|
|
888
|
+
case 46: return this.popState(), e.getLogger().debug("Lex: ("), "NODE_DEND";
|
|
889
|
+
case 47: return this.popState(), e.getLogger().debug("Lex: ])"), "NODE_DEND";
|
|
890
|
+
case 48: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
891
|
+
case 49: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
892
|
+
case 50: return this.popState(), e.getLogger().debug("Lex: )]"), "NODE_DEND";
|
|
893
|
+
case 51: return this.popState(), e.getLogger().debug("Lex: )"), "NODE_DEND";
|
|
894
|
+
case 52: return this.popState(), e.getLogger().debug("Lex: ]>"), "NODE_DEND";
|
|
895
|
+
case 53: return this.popState(), e.getLogger().debug("Lex: ]"), "NODE_DEND";
|
|
896
|
+
case 54: return e.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
|
|
897
|
+
case 55: return e.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
|
|
898
|
+
case 56: return e.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
|
|
899
|
+
case 57: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
900
|
+
case 58: return e.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
|
|
901
|
+
case 59: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
902
|
+
case 60: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
903
|
+
case 61: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
904
|
+
case 62: return e.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
|
|
905
|
+
case 63: return e.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
|
|
906
|
+
case 64: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
907
|
+
case 65: return this.pushState("NODE"), 35;
|
|
908
|
+
case 66: return this.pushState("NODE"), 35;
|
|
909
|
+
case 67: return this.pushState("NODE"), 35;
|
|
910
|
+
case 68: return this.pushState("NODE"), 35;
|
|
911
|
+
case 69: return this.pushState("NODE"), 35;
|
|
912
|
+
case 70: return this.pushState("NODE"), 35;
|
|
913
|
+
case 71: return this.pushState("NODE"), 35;
|
|
914
|
+
case 72: return e.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
|
|
915
|
+
case 73: return this.pushState("BLOCK_ARROW"), e.getLogger().debug("LEX ARR START"), 37;
|
|
916
|
+
case 74: return e.getLogger().debug("Lex: NODE_ID", t.yytext), 31;
|
|
917
|
+
case 75: return e.getLogger().debug("Lex: EOF", t.yytext), 8;
|
|
918
|
+
case 76:
|
|
919
|
+
this.pushState("md_string");
|
|
920
|
+
break;
|
|
921
|
+
case 77:
|
|
922
|
+
this.pushState("md_string");
|
|
923
|
+
break;
|
|
924
|
+
case 78: return "NODE_DESCR";
|
|
925
|
+
case 79:
|
|
926
|
+
this.popState();
|
|
927
|
+
break;
|
|
928
|
+
case 80:
|
|
929
|
+
e.getLogger().debug("Lex: Starting string"), this.pushState("string");
|
|
930
|
+
break;
|
|
931
|
+
case 81:
|
|
932
|
+
e.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
|
|
933
|
+
break;
|
|
934
|
+
case 82: return e.getLogger().debug("LEX: NODE_DESCR:", t.yytext), "NODE_DESCR";
|
|
935
|
+
case 83:
|
|
936
|
+
e.getLogger().debug("LEX POPPING"), this.popState();
|
|
937
|
+
break;
|
|
938
|
+
case 84:
|
|
939
|
+
e.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
|
|
940
|
+
break;
|
|
941
|
+
case 85: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (right): dir:", t.yytext), "DIR";
|
|
942
|
+
case 86: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (left):", t.yytext), "DIR";
|
|
943
|
+
case 87: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (x):", t.yytext), "DIR";
|
|
944
|
+
case 88: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (y):", t.yytext), "DIR";
|
|
945
|
+
case 89: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (up):", t.yytext), "DIR";
|
|
946
|
+
case 90: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (down):", t.yytext), "DIR";
|
|
947
|
+
case 91: return t.yytext = "]>", e.getLogger().debug("Lex (ARROW_DIR end):", t.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
|
|
948
|
+
case 92: return e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
|
|
949
|
+
case 93: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
|
|
950
|
+
case 94: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
|
|
951
|
+
case 95: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
|
|
952
|
+
case 96: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
|
|
953
|
+
case 97: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
|
|
954
|
+
case 98: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
|
|
955
|
+
case 99:
|
|
956
|
+
this.pushState("md_string");
|
|
957
|
+
break;
|
|
958
|
+
case 100: return e.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
|
|
959
|
+
case 101: return this.popState(), e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
|
|
960
|
+
case 102: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
|
|
961
|
+
case 103: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
|
|
962
|
+
case 104: return e.getLogger().debug("Lex: COLON", t.yytext), t.yytext = t.yytext.slice(1), 27;
|
|
963
|
+
}
|
|
964
|
+
}, "anonymous"),
|
|
965
|
+
rules: [
|
|
966
|
+
/^(?:block-beta\b)/,
|
|
967
|
+
/^(?:block:)/,
|
|
968
|
+
/^(?:block\b)/,
|
|
969
|
+
/^(?:[\s]+)/,
|
|
970
|
+
/^(?:[\n]+)/,
|
|
971
|
+
/^(?:((\u000D\u000A)|(\u000A)))/,
|
|
972
|
+
/^(?:columns\s+auto\b)/,
|
|
973
|
+
/^(?:columns\s+[\d]+)/,
|
|
974
|
+
/^(?:["][`])/,
|
|
975
|
+
/^(?:[^`"]+)/,
|
|
976
|
+
/^(?:[`]["])/,
|
|
977
|
+
/^(?:["])/,
|
|
978
|
+
/^(?:["])/,
|
|
979
|
+
/^(?:[^"]*)/,
|
|
980
|
+
/^(?:space[:]\d+)/,
|
|
981
|
+
/^(?:space\b)/,
|
|
982
|
+
/^(?:default\b)/,
|
|
983
|
+
/^(?:linkStyle\b)/,
|
|
984
|
+
/^(?:interpolate\b)/,
|
|
985
|
+
/^(?:classDef\s+)/,
|
|
986
|
+
/^(?:DEFAULT\s+)/,
|
|
987
|
+
/^(?:\w+\s+)/,
|
|
988
|
+
/^(?:[^\n]*)/,
|
|
989
|
+
/^(?:class\s+)/,
|
|
990
|
+
/^(?:(\w+)+((,\s*\w+)*))/,
|
|
991
|
+
/^(?:[^\n]*)/,
|
|
992
|
+
/^(?:style\s+)/,
|
|
993
|
+
/^(?:(\w+)+((,\s*\w+)*))/,
|
|
994
|
+
/^(?:[^\n]*)/,
|
|
995
|
+
/^(?:accTitle\s*:\s*)/,
|
|
996
|
+
/^(?:(?!\n||)*[^\n]*)/,
|
|
997
|
+
/^(?:accDescr\s*:\s*)/,
|
|
998
|
+
/^(?:(?!\n||)*[^\n]*)/,
|
|
999
|
+
/^(?:accDescr\s*\{\s*)/,
|
|
1000
|
+
/^(?:[\}])/,
|
|
1001
|
+
/^(?:[^\}]*)/,
|
|
1002
|
+
/^(?:end\b\s*)/,
|
|
1003
|
+
/^(?:\(\(\()/,
|
|
1004
|
+
/^(?:\)\)\))/,
|
|
1005
|
+
/^(?:[\)]\))/,
|
|
1006
|
+
/^(?:\}\})/,
|
|
1007
|
+
/^(?:\})/,
|
|
1008
|
+
/^(?:\(-)/,
|
|
1009
|
+
/^(?:-\))/,
|
|
1010
|
+
/^(?:\(\()/,
|
|
1011
|
+
/^(?:\]\])/,
|
|
1012
|
+
/^(?:\()/,
|
|
1013
|
+
/^(?:\]\))/,
|
|
1014
|
+
/^(?:\\\])/,
|
|
1015
|
+
/^(?:\/\])/,
|
|
1016
|
+
/^(?:\)\])/,
|
|
1017
|
+
/^(?:[\)])/,
|
|
1018
|
+
/^(?:\]>)/,
|
|
1019
|
+
/^(?:[\]])/,
|
|
1020
|
+
/^(?:-\))/,
|
|
1021
|
+
/^(?:\(-)/,
|
|
1022
|
+
/^(?:\)\))/,
|
|
1023
|
+
/^(?:\))/,
|
|
1024
|
+
/^(?:\(\(\()/,
|
|
1025
|
+
/^(?:\(\()/,
|
|
1026
|
+
/^(?:\{\{)/,
|
|
1027
|
+
/^(?:\{)/,
|
|
1028
|
+
/^(?:>)/,
|
|
1029
|
+
/^(?:\(\[)/,
|
|
1030
|
+
/^(?:\()/,
|
|
1031
|
+
/^(?:\[\[)/,
|
|
1032
|
+
/^(?:\[\|)/,
|
|
1033
|
+
/^(?:\[\()/,
|
|
1034
|
+
/^(?:\)\)\))/,
|
|
1035
|
+
/^(?:\[\\)/,
|
|
1036
|
+
/^(?:\[\/)/,
|
|
1037
|
+
/^(?:\[\\)/,
|
|
1038
|
+
/^(?:\[)/,
|
|
1039
|
+
/^(?:<\[)/,
|
|
1040
|
+
/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,
|
|
1041
|
+
/^(?:$)/,
|
|
1042
|
+
/^(?:["][`])/,
|
|
1043
|
+
/^(?:["][`])/,
|
|
1044
|
+
/^(?:[^`"]+)/,
|
|
1045
|
+
/^(?:[`]["])/,
|
|
1046
|
+
/^(?:["])/,
|
|
1047
|
+
/^(?:["])/,
|
|
1048
|
+
/^(?:[^"]+)/,
|
|
1049
|
+
/^(?:["])/,
|
|
1050
|
+
/^(?:\]>\s*\()/,
|
|
1051
|
+
/^(?:,?\s*right\s*)/,
|
|
1052
|
+
/^(?:,?\s*left\s*)/,
|
|
1053
|
+
/^(?:,?\s*x\s*)/,
|
|
1054
|
+
/^(?:,?\s*y\s*)/,
|
|
1055
|
+
/^(?:,?\s*up\s*)/,
|
|
1056
|
+
/^(?:,?\s*down\s*)/,
|
|
1057
|
+
/^(?:\)\s*)/,
|
|
1058
|
+
/^(?:\s*[xo<]?--+[-xo>]\s*)/,
|
|
1059
|
+
/^(?:\s*[xo<]?==+[=xo>]\s*)/,
|
|
1060
|
+
/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
|
|
1061
|
+
/^(?:\s*~~[\~]+\s*)/,
|
|
1062
|
+
/^(?:\s*[xo<]?--\s*)/,
|
|
1063
|
+
/^(?:\s*[xo<]?==\s*)/,
|
|
1064
|
+
/^(?:\s*[xo<]?-\.\s*)/,
|
|
1065
|
+
/^(?:["][`])/,
|
|
1066
|
+
/^(?:["])/,
|
|
1067
|
+
/^(?:\s*[xo<]?--+[-xo>]\s*)/,
|
|
1068
|
+
/^(?:\s*[xo<]?==+[=xo>]\s*)/,
|
|
1069
|
+
/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
|
|
1070
|
+
/^(?::\d+)/
|
|
1071
|
+
],
|
|
1072
|
+
conditions: {
|
|
1073
|
+
STYLE_DEFINITION: {
|
|
1074
|
+
rules: [28],
|
|
1075
|
+
inclusive: !1
|
|
1076
|
+
},
|
|
1077
|
+
STYLE_STMNT: {
|
|
1078
|
+
rules: [27],
|
|
1079
|
+
inclusive: !1
|
|
1080
|
+
},
|
|
1081
|
+
CLASSDEFID: {
|
|
1082
|
+
rules: [22],
|
|
1083
|
+
inclusive: !1
|
|
1084
|
+
},
|
|
1085
|
+
CLASSDEF: {
|
|
1086
|
+
rules: [20, 21],
|
|
1087
|
+
inclusive: !1
|
|
1088
|
+
},
|
|
1089
|
+
CLASS_STYLE: {
|
|
1090
|
+
rules: [25],
|
|
1091
|
+
inclusive: !1
|
|
1092
|
+
},
|
|
1093
|
+
CLASS: {
|
|
1094
|
+
rules: [24],
|
|
1095
|
+
inclusive: !1
|
|
1096
|
+
},
|
|
1097
|
+
LLABEL: {
|
|
1098
|
+
rules: [
|
|
1099
|
+
99,
|
|
1100
|
+
100,
|
|
1101
|
+
101,
|
|
1102
|
+
102,
|
|
1103
|
+
103
|
|
1104
|
+
],
|
|
1105
|
+
inclusive: !1
|
|
1106
|
+
},
|
|
1107
|
+
ARROW_DIR: {
|
|
1108
|
+
rules: [
|
|
1109
|
+
85,
|
|
1110
|
+
86,
|
|
1111
|
+
87,
|
|
1112
|
+
88,
|
|
1113
|
+
89,
|
|
1114
|
+
90,
|
|
1115
|
+
91
|
|
1116
|
+
],
|
|
1117
|
+
inclusive: !1
|
|
1118
|
+
},
|
|
1119
|
+
BLOCK_ARROW: {
|
|
1120
|
+
rules: [
|
|
1121
|
+
76,
|
|
1122
|
+
81,
|
|
1123
|
+
84
|
|
1124
|
+
],
|
|
1125
|
+
inclusive: !1
|
|
1126
|
+
},
|
|
1127
|
+
NODE: {
|
|
1128
|
+
rules: [
|
|
1129
|
+
37,
|
|
1130
|
+
38,
|
|
1131
|
+
39,
|
|
1132
|
+
40,
|
|
1133
|
+
41,
|
|
1134
|
+
42,
|
|
1135
|
+
43,
|
|
1136
|
+
44,
|
|
1137
|
+
45,
|
|
1138
|
+
46,
|
|
1139
|
+
47,
|
|
1140
|
+
48,
|
|
1141
|
+
49,
|
|
1142
|
+
50,
|
|
1143
|
+
51,
|
|
1144
|
+
52,
|
|
1145
|
+
53,
|
|
1146
|
+
77,
|
|
1147
|
+
80
|
|
1148
|
+
],
|
|
1149
|
+
inclusive: !1
|
|
1150
|
+
},
|
|
1151
|
+
md_string: {
|
|
1152
|
+
rules: [
|
|
1153
|
+
9,
|
|
1154
|
+
10,
|
|
1155
|
+
78,
|
|
1156
|
+
79
|
|
1157
|
+
],
|
|
1158
|
+
inclusive: !1
|
|
1159
|
+
},
|
|
1160
|
+
space: {
|
|
1161
|
+
rules: [],
|
|
1162
|
+
inclusive: !1
|
|
1163
|
+
},
|
|
1164
|
+
string: {
|
|
1165
|
+
rules: [
|
|
1166
|
+
12,
|
|
1167
|
+
13,
|
|
1168
|
+
82,
|
|
1169
|
+
83
|
|
1170
|
+
],
|
|
1171
|
+
inclusive: !1
|
|
1172
|
+
},
|
|
1173
|
+
acc_descr_multiline: {
|
|
1174
|
+
rules: [34, 35],
|
|
1175
|
+
inclusive: !1
|
|
1176
|
+
},
|
|
1177
|
+
acc_descr: {
|
|
1178
|
+
rules: [32],
|
|
1179
|
+
inclusive: !1
|
|
1180
|
+
},
|
|
1181
|
+
acc_title: {
|
|
1182
|
+
rules: [30],
|
|
1183
|
+
inclusive: !1
|
|
1184
|
+
},
|
|
1185
|
+
INITIAL: {
|
|
1186
|
+
rules: [
|
|
1187
|
+
0,
|
|
1188
|
+
1,
|
|
1189
|
+
2,
|
|
1190
|
+
3,
|
|
1191
|
+
4,
|
|
1192
|
+
5,
|
|
1193
|
+
6,
|
|
1194
|
+
7,
|
|
1195
|
+
8,
|
|
1196
|
+
11,
|
|
1197
|
+
14,
|
|
1198
|
+
15,
|
|
1199
|
+
16,
|
|
1200
|
+
17,
|
|
1201
|
+
18,
|
|
1202
|
+
19,
|
|
1203
|
+
23,
|
|
1204
|
+
26,
|
|
1205
|
+
29,
|
|
1206
|
+
31,
|
|
1207
|
+
33,
|
|
1208
|
+
36,
|
|
1209
|
+
54,
|
|
1210
|
+
55,
|
|
1211
|
+
56,
|
|
1212
|
+
57,
|
|
1213
|
+
58,
|
|
1214
|
+
59,
|
|
1215
|
+
60,
|
|
1216
|
+
61,
|
|
1217
|
+
62,
|
|
1218
|
+
63,
|
|
1219
|
+
64,
|
|
1220
|
+
65,
|
|
1221
|
+
66,
|
|
1222
|
+
67,
|
|
1223
|
+
68,
|
|
1224
|
+
69,
|
|
1225
|
+
70,
|
|
1226
|
+
71,
|
|
1227
|
+
72,
|
|
1228
|
+
73,
|
|
1229
|
+
74,
|
|
1230
|
+
75,
|
|
1231
|
+
92,
|
|
1232
|
+
93,
|
|
1233
|
+
94,
|
|
1234
|
+
95,
|
|
1235
|
+
96,
|
|
1236
|
+
97,
|
|
1237
|
+
98,
|
|
1238
|
+
104
|
|
1239
|
+
],
|
|
1240
|
+
inclusive: !0
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
};
|
|
1244
|
+
})();
|
|
1245
|
+
function v() {
|
|
1246
|
+
this.yy = {};
|
|
1247
|
+
}
|
|
1248
|
+
return e(v, "Parser"), v.prototype = _, _.Parser = v, new v();
|
|
1249
|
+
})();
|
|
1250
|
+
xe.parser = xe;
|
|
1251
|
+
var Se = xe, I = /* @__PURE__ */ new Map(), Ce = [], we = /* @__PURE__ */ new Map(), Te = "color", Ee = "fill", De = "bgFill", Oe = ",", L = /* @__PURE__ */ new Map(), ke = "", Ae = /* @__PURE__ */ e((e) => l.sanitizeText(e, u()), "sanitizeText"), je = /* @__PURE__ */ e(function(e, t = "") {
|
|
1252
|
+
let n = L.get(e);
|
|
1253
|
+
n || (n = {
|
|
1254
|
+
id: e,
|
|
1255
|
+
styles: [],
|
|
1256
|
+
textStyles: []
|
|
1257
|
+
}, L.set(e, n)), t?.split(Oe).forEach((e) => {
|
|
1258
|
+
let t = e.replace(/([^;]*);/, "$1").trim();
|
|
1259
|
+
if (RegExp(Te).exec(e)) {
|
|
1260
|
+
let e = t.replace(Ee, De).replace(Te, Ee);
|
|
1261
|
+
n.textStyles.push(e);
|
|
1262
|
+
}
|
|
1263
|
+
n.styles.push(t);
|
|
1264
|
+
});
|
|
1265
|
+
}, "addStyleClass"), Me = /* @__PURE__ */ e(function(e, t = "") {
|
|
1266
|
+
let n = I.get(e);
|
|
1267
|
+
t != null && (n.styles = t.split(Oe));
|
|
1268
|
+
}, "addStyle2Node"), Ne = /* @__PURE__ */ e(function(e, t) {
|
|
1269
|
+
e.split(",").forEach(function(e) {
|
|
1270
|
+
let n = I.get(e);
|
|
1271
|
+
if (n === void 0) {
|
|
1272
|
+
let t = e.trim();
|
|
1273
|
+
n = {
|
|
1274
|
+
id: t,
|
|
1275
|
+
type: "na",
|
|
1276
|
+
children: []
|
|
1277
|
+
}, I.set(t, n);
|
|
1278
|
+
}
|
|
1279
|
+
n.classes ||= [], n.classes.push(t);
|
|
1280
|
+
});
|
|
1281
|
+
}, "setCssClass"), Pe = /* @__PURE__ */ e((e, n) => {
|
|
1282
|
+
let r = e.flat(), i = [], a = r.find((e) => e?.type === "column-setting")?.columns ?? -1;
|
|
1283
|
+
for (let e of r) {
|
|
1284
|
+
if (typeof a == "number" && a > 0 && e.type !== "column-setting" && typeof e.widthInColumns == "number" && e.widthInColumns > a && t.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`), e.label &&= Ae(e.label), e.type === "classDef") {
|
|
1285
|
+
je(e.id, e.css);
|
|
1286
|
+
continue;
|
|
1287
|
+
}
|
|
1288
|
+
if (e.type === "applyClass") {
|
|
1289
|
+
Ne(e.id, e?.styleClass ?? "");
|
|
1290
|
+
continue;
|
|
1291
|
+
}
|
|
1292
|
+
if (e.type === "applyStyles") {
|
|
1293
|
+
e?.stylesStr && Me(e.id, e?.stylesStr);
|
|
1294
|
+
continue;
|
|
1295
|
+
}
|
|
1296
|
+
if (e.type === "column-setting") n.columns = e.columns ?? -1;
|
|
1297
|
+
else if (e.type === "edge") {
|
|
1298
|
+
let t = (we.get(e.id) ?? 0) + 1;
|
|
1299
|
+
we.set(e.id, t), e.id = t + "-" + e.id, Ce.push(e);
|
|
1300
|
+
} else {
|
|
1301
|
+
e.label || (e.type === "composite" ? e.label = "" : e.label = e.id);
|
|
1302
|
+
let t = I.get(e.id);
|
|
1303
|
+
if (t === void 0 ? I.set(e.id, e) : (e.type !== "na" && (t.type = e.type), e.label !== e.id && (t.label = e.label)), e.children && Pe(e.children, e), e.type === "space") {
|
|
1304
|
+
let t = e.width ?? 1;
|
|
1305
|
+
for (let n = 0; n < t; n++) {
|
|
1306
|
+
let t = he(e);
|
|
1307
|
+
t.id = t.id + "-" + n, I.set(t.id, t), i.push(t);
|
|
1308
|
+
}
|
|
1309
|
+
} else t === void 0 && i.push(e);
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
n.children = i;
|
|
1313
|
+
}, "populateBlockDatabase"), Fe = [], R = {
|
|
1314
|
+
id: "root",
|
|
1315
|
+
type: "composite",
|
|
1316
|
+
children: [],
|
|
1317
|
+
columns: -1
|
|
1318
|
+
}, Ie = /* @__PURE__ */ e(() => {
|
|
1319
|
+
t.debug("Clear called"), a(), R = {
|
|
1320
|
+
id: "root",
|
|
1321
|
+
type: "composite",
|
|
1322
|
+
children: [],
|
|
1323
|
+
columns: -1
|
|
1324
|
+
}, I = /* @__PURE__ */ new Map([["root", R]]), Fe = [], L = /* @__PURE__ */ new Map(), Ce = [], we = /* @__PURE__ */ new Map(), ke = "";
|
|
1325
|
+
}, "clear");
|
|
1326
|
+
function Le(e) {
|
|
1327
|
+
switch (t.debug("typeStr2Type", e), e) {
|
|
1328
|
+
case "[]": return "square";
|
|
1329
|
+
case "()": return t.debug("we have a round"), "round";
|
|
1330
|
+
case "(())": return "circle";
|
|
1331
|
+
case ">]": return "rect_left_inv_arrow";
|
|
1332
|
+
case "{}": return "diamond";
|
|
1333
|
+
case "{{}}": return "hexagon";
|
|
1334
|
+
case "([])": return "stadium";
|
|
1335
|
+
case "[[]]": return "subroutine";
|
|
1336
|
+
case "[()]": return "cylinder";
|
|
1337
|
+
case "((()))": return "doublecircle";
|
|
1338
|
+
case "[//]": return "lean_right";
|
|
1339
|
+
case "[\\\\]": return "lean_left";
|
|
1340
|
+
case "[/\\]": return "trapezoid";
|
|
1341
|
+
case "[\\/]": return "inv_trapezoid";
|
|
1342
|
+
case "<[]>": return "block_arrow";
|
|
1343
|
+
default: return "na";
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
e(Le, "typeStr2Type");
|
|
1347
|
+
function Re(e) {
|
|
1348
|
+
switch (t.debug("typeStr2Type", e), e) {
|
|
1349
|
+
case "==": return "thick";
|
|
1350
|
+
default: return "normal";
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
e(Re, "edgeTypeStr2Type");
|
|
1354
|
+
function ze(e) {
|
|
1355
|
+
switch (e.trim().slice(-1)) {
|
|
1356
|
+
case "x": return "arrow_cross";
|
|
1357
|
+
case "o": return "arrow_circle";
|
|
1358
|
+
case ">": return "arrow_point";
|
|
1359
|
+
default: return "";
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
e(ze, "edgeStrToEdgeData");
|
|
1363
|
+
function Be(e) {
|
|
1364
|
+
switch (e.trim().charAt(0)) {
|
|
1365
|
+
case "x": return "arrow_cross";
|
|
1366
|
+
case "o": return "arrow_circle";
|
|
1367
|
+
case "<": return "arrow_point";
|
|
1368
|
+
default: return "arrow_open";
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
e(Be, "edgeStrToEdgeStartData");
|
|
1372
|
+
function Ve(e) {
|
|
1373
|
+
return e.includes("==") ? "thick" : "normal";
|
|
1374
|
+
}
|
|
1375
|
+
e(Ve, "edgeStrToThickness");
|
|
1376
|
+
function He(e) {
|
|
1377
|
+
return e.includes(".-") ? "dotted" : "solid";
|
|
1378
|
+
}
|
|
1379
|
+
e(He, "edgeStrToPattern");
|
|
1380
|
+
var Ue = 0, We = {
|
|
1381
|
+
getConfig: /* @__PURE__ */ e(() => o().block, "getConfig"),
|
|
1382
|
+
typeStr2Type: Le,
|
|
1383
|
+
edgeTypeStr2Type: Re,
|
|
1384
|
+
edgeStrToEdgeData: ze,
|
|
1385
|
+
edgeStrToEdgeStartData: Be,
|
|
1386
|
+
edgeStrToThickness: Ve,
|
|
1387
|
+
edgeStrToPattern: He,
|
|
1388
|
+
getLogger: /* @__PURE__ */ e(() => t, "getLogger"),
|
|
1389
|
+
getBlocksFlat: /* @__PURE__ */ e(() => [...I.values()], "getBlocksFlat"),
|
|
1390
|
+
getBlocks: /* @__PURE__ */ e(() => Fe || [], "getBlocks"),
|
|
1391
|
+
getEdges: /* @__PURE__ */ e(() => Ce, "getEdges"),
|
|
1392
|
+
setHierarchy: /* @__PURE__ */ e((e) => {
|
|
1393
|
+
R.children = e, Pe(e, R), Fe = R.children;
|
|
1394
|
+
}, "setHierarchy"),
|
|
1395
|
+
getBlock: /* @__PURE__ */ e((e) => I.get(e), "getBlock"),
|
|
1396
|
+
setBlock: /* @__PURE__ */ e((e) => {
|
|
1397
|
+
I.set(e.id, e);
|
|
1398
|
+
}, "setBlock"),
|
|
1399
|
+
getColumns: /* @__PURE__ */ e((e) => {
|
|
1400
|
+
let t = I.get(e);
|
|
1401
|
+
return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
|
|
1402
|
+
}, "getColumns"),
|
|
1403
|
+
getClasses: /* @__PURE__ */ e(function() {
|
|
1404
|
+
return L;
|
|
1405
|
+
}, "getClasses"),
|
|
1406
|
+
clear: Ie,
|
|
1407
|
+
generateId: /* @__PURE__ */ e(() => (Ue++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + Ue), "generateId"),
|
|
1408
|
+
setDiagramId: /* @__PURE__ */ e((e) => {
|
|
1409
|
+
ke = e;
|
|
1410
|
+
}, "setDiagramId"),
|
|
1411
|
+
getDiagramId: /* @__PURE__ */ e(() => ke, "getDiagramId")
|
|
1412
|
+
}, z = /* @__PURE__ */ e((e, t) => {
|
|
1413
|
+
let n = f;
|
|
1414
|
+
return c(n(e, "r"), n(e, "g"), n(e, "b"), t);
|
|
1415
|
+
}, "fade"), Ge = /* @__PURE__ */ e((e) => `.label {
|
|
1416
|
+
font-family: ${e.fontFamily};
|
|
1417
|
+
color: ${e.nodeTextColor || e.textColor};
|
|
1418
|
+
}
|
|
1419
|
+
.cluster-label text {
|
|
1420
|
+
fill: ${e.titleColor};
|
|
1421
|
+
}
|
|
1422
|
+
.cluster-label span,p {
|
|
1423
|
+
color: ${e.titleColor};
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
.label text,span,p {
|
|
1429
|
+
fill: ${e.nodeTextColor || e.textColor};
|
|
1430
|
+
color: ${e.nodeTextColor || e.textColor};
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
.node rect,
|
|
1434
|
+
.node circle,
|
|
1435
|
+
.node ellipse,
|
|
1436
|
+
.node polygon,
|
|
1437
|
+
.node path {
|
|
1438
|
+
fill: ${e.mainBkg};
|
|
1439
|
+
stroke: ${e.nodeBorder};
|
|
1440
|
+
stroke-width: 1px;
|
|
1441
|
+
}
|
|
1442
|
+
.flowchart-label text {
|
|
1443
|
+
text-anchor: middle;
|
|
1444
|
+
}
|
|
1445
|
+
// .flowchart-label .text-outer-tspan {
|
|
1446
|
+
// text-anchor: middle;
|
|
1447
|
+
// }
|
|
1448
|
+
// .flowchart-label .text-inner-tspan {
|
|
1449
|
+
// text-anchor: start;
|
|
1450
|
+
// }
|
|
1451
|
+
|
|
1452
|
+
.node .label {
|
|
1453
|
+
text-align: center;
|
|
1454
|
+
}
|
|
1455
|
+
.node.clickable {
|
|
1456
|
+
cursor: pointer;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
.arrowheadPath {
|
|
1460
|
+
fill: ${e.arrowheadColor};
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
.edgePath .path {
|
|
1464
|
+
stroke: ${e.lineColor};
|
|
1465
|
+
stroke-width: 2.0px;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
.flowchart-link {
|
|
1469
|
+
stroke: ${e.lineColor};
|
|
1470
|
+
fill: none;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
.edgeLabel {
|
|
1474
|
+
background-color: ${e.edgeLabelBackground};
|
|
1475
|
+
/*
|
|
1476
|
+
* This is for backward compatibility with existing code that didn't
|
|
1477
|
+
* add a \`<p>\` around edge labels.
|
|
1478
|
+
*
|
|
1479
|
+
* TODO: We should probably remove this in a future release.
|
|
1480
|
+
*/
|
|
1481
|
+
p {
|
|
1482
|
+
margin: 0;
|
|
1483
|
+
padding: 0;
|
|
1484
|
+
display: inline;
|
|
1485
|
+
}
|
|
1486
|
+
rect {
|
|
1487
|
+
opacity: 0.5;
|
|
1488
|
+
background-color: ${e.edgeLabelBackground};
|
|
1489
|
+
fill: ${e.edgeLabelBackground};
|
|
1490
|
+
}
|
|
1491
|
+
text-align: center;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
/* For html labels only */
|
|
1495
|
+
.labelBkg {
|
|
1496
|
+
background-color: ${e.edgeLabelBackground};
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
.node .cluster {
|
|
1500
|
+
// fill: ${z(e.mainBkg, .5)};
|
|
1501
|
+
fill: ${z(e.clusterBkg, .5)};
|
|
1502
|
+
stroke: ${z(e.clusterBorder, .2)};
|
|
1503
|
+
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
1504
|
+
stroke-width: 1px;
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
.cluster text {
|
|
1508
|
+
fill: ${e.titleColor};
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
.cluster span,p {
|
|
1512
|
+
color: ${e.titleColor};
|
|
1513
|
+
}
|
|
1514
|
+
/* .cluster div {
|
|
1515
|
+
color: ${e.titleColor};
|
|
1516
|
+
} */
|
|
1517
|
+
|
|
1518
|
+
div.mermaidTooltip {
|
|
1519
|
+
position: absolute;
|
|
1520
|
+
text-align: center;
|
|
1521
|
+
max-width: 200px;
|
|
1522
|
+
padding: 2px;
|
|
1523
|
+
font-family: ${e.fontFamily};
|
|
1524
|
+
font-size: 12px;
|
|
1525
|
+
background: ${e.tertiaryColor};
|
|
1526
|
+
border: 1px solid ${e.border2};
|
|
1527
|
+
border-radius: 2px;
|
|
1528
|
+
pointer-events: none;
|
|
1529
|
+
z-index: 100;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
.flowchartTitleText {
|
|
1533
|
+
text-anchor: middle;
|
|
1534
|
+
font-size: 18px;
|
|
1535
|
+
fill: ${e.textColor};
|
|
1536
|
+
}
|
|
1537
|
+
${le()}
|
|
1538
|
+
`, "getStyles"), Ke = /* @__PURE__ */ e((e, t, n, r) => {
|
|
1539
|
+
t.forEach((t) => {
|
|
1540
|
+
qe[t](e, n, r);
|
|
1541
|
+
});
|
|
1542
|
+
}, "insertMarkers"), qe = {
|
|
1543
|
+
extension: /* @__PURE__ */ e((e, n, r) => {
|
|
1544
|
+
t.trace("Making markers for ", r), e.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"), e.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");
|
|
1545
|
+
}, "extension"),
|
|
1546
|
+
composition: /* @__PURE__ */ e((e, t, n) => {
|
|
1547
|
+
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");
|
|
1548
|
+
}, "composition"),
|
|
1549
|
+
aggregation: /* @__PURE__ */ e((e, t, n) => {
|
|
1550
|
+
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");
|
|
1551
|
+
}, "aggregation"),
|
|
1552
|
+
dependency: /* @__PURE__ */ e((e, t, n) => {
|
|
1553
|
+
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");
|
|
1554
|
+
}, "dependency"),
|
|
1555
|
+
lollipop: /* @__PURE__ */ e((e, t, n) => {
|
|
1556
|
+
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);
|
|
1557
|
+
}, "lollipop"),
|
|
1558
|
+
point: /* @__PURE__ */ e((e, t, n) => {
|
|
1559
|
+
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");
|
|
1560
|
+
}, "point"),
|
|
1561
|
+
circle: /* @__PURE__ */ e((e, t, n) => {
|
|
1562
|
+
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");
|
|
1563
|
+
}, "circle"),
|
|
1564
|
+
cross: /* @__PURE__ */ e((e, t, n) => {
|
|
1565
|
+
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");
|
|
1566
|
+
}, "cross"),
|
|
1567
|
+
barb: /* @__PURE__ */ e((e, t, n) => {
|
|
1568
|
+
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");
|
|
1569
|
+
}, "barb")
|
|
1570
|
+
}, Je = Ke;
|
|
1571
|
+
function B(e, t) {
|
|
1572
|
+
if (e === 0 || !Number.isInteger(e)) throw Error("Columns must be an integer !== 0.");
|
|
1573
|
+
if (t < 0 || !Number.isInteger(t)) throw Error("Position must be a non-negative integer." + t);
|
|
1574
|
+
return e < 0 ? {
|
|
1575
|
+
px: t,
|
|
1576
|
+
py: 0
|
|
1577
|
+
} : e === 1 ? {
|
|
1578
|
+
px: 0,
|
|
1579
|
+
py: t
|
|
1580
|
+
} : {
|
|
1581
|
+
px: t % e,
|
|
1582
|
+
py: Math.floor(t / e)
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1585
|
+
e(B, "calculateBlockPosition");
|
|
1586
|
+
var Ye = /* @__PURE__ */ e((e) => {
|
|
1587
|
+
let n = 0, r = 0;
|
|
1588
|
+
for (let i of e.children) {
|
|
1589
|
+
let { width: e, height: a, x: o, y: s } = i.size ?? {
|
|
1590
|
+
width: 0,
|
|
1591
|
+
height: 0,
|
|
1592
|
+
x: 0,
|
|
1593
|
+
y: 0
|
|
1594
|
+
};
|
|
1595
|
+
if (t.debug("getMaxChildSize abc95 child:", i.id, "width:", e, "height:", a, "x:", o, "y:", s, i.type), i.type === "space") continue;
|
|
1596
|
+
let c = e / (i.widthInColumns ?? 1);
|
|
1597
|
+
c > n && (n = c), a > r && (r = a);
|
|
1598
|
+
}
|
|
1599
|
+
return {
|
|
1600
|
+
width: n,
|
|
1601
|
+
height: r
|
|
1602
|
+
};
|
|
1603
|
+
}, "getMaxChildSize");
|
|
1604
|
+
function V(e, n, r = 0, i = 0, a = 8) {
|
|
1605
|
+
t.debug("setBlockSizes abc95 (start)", e.id, e?.size?.x, "block width =", e?.size, "siblingWidth", r), e?.size?.width || (e.size = {
|
|
1606
|
+
width: r,
|
|
1607
|
+
height: i,
|
|
1608
|
+
x: 0,
|
|
1609
|
+
y: 0
|
|
1610
|
+
});
|
|
1611
|
+
let o = 0, s = 0;
|
|
1612
|
+
if (e.children?.length > 0) {
|
|
1613
|
+
for (let t of e.children) V(t, n, 0, 0, a);
|
|
1614
|
+
let c = Ye(e);
|
|
1615
|
+
o = c.width, s = c.height, t.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", o, s);
|
|
1616
|
+
for (let n of e.children) n.size && (t.debug(`abc95 Setting size of children of ${e.id} id=${n.id} ${o} ${s} ${JSON.stringify(n.size)}`), n.size.width = o * (n.widthInColumns ?? 1) + a * ((n.widthInColumns ?? 1) - 1), n.size.height = s, n.size.x = 0, n.size.y = 0, t.debug(`abc95 updating size of ${e.id} children child:${n.id} maxWidth:${o} maxHeight:${s}`));
|
|
1617
|
+
for (let t of e.children) V(t, n, o, s, a);
|
|
1618
|
+
let l = e.columns ?? -1, u = 0;
|
|
1619
|
+
for (let t of e.children) u += t.widthInColumns ?? 1;
|
|
1620
|
+
let d = e.children.length;
|
|
1621
|
+
l > 0 && l < u && (d = l);
|
|
1622
|
+
let f = Math.ceil(u / d), p = d * (o + a) + a, m = f * (s + a) + a;
|
|
1623
|
+
if (p < r) {
|
|
1624
|
+
t.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${r} siblingHeight ${i} width ${p}`), p = r, m = i;
|
|
1625
|
+
let n = (r - d * a - a) / d, c = (i - f * a - a) / f;
|
|
1626
|
+
t.debug("Size indata abc88", e.id, "childWidth", n, "maxWidth", o), t.debug("Size indata abc88", e.id, "childHeight", c, "maxHeight", s), t.debug("Size indata abc88 xSize", d, "padding", a);
|
|
1627
|
+
for (let t of e.children) t.size && (t.size.width = n, t.size.height = c, t.size.x = 0, t.size.y = 0);
|
|
1628
|
+
}
|
|
1629
|
+
if (t.debug(`abc95 (finale calc) ${e.id} xSize ${d} ySize ${f} columns ${l}${e.children.length} width=${Math.max(p, e.size?.width || 0)}`), p < (e?.size?.width || 0)) {
|
|
1630
|
+
p = e?.size?.width || 0;
|
|
1631
|
+
let n = l > 0 ? Math.min(e.children.length, l) : e.children.length;
|
|
1632
|
+
if (n > 0) {
|
|
1633
|
+
let r = (p - n * a - a) / n;
|
|
1634
|
+
t.debug("abc95 (growing to fit) width", e.id, p, e.size?.width, r);
|
|
1635
|
+
for (let t of e.children) t.size && (t.size.width = r);
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
e.size = {
|
|
1639
|
+
width: p,
|
|
1640
|
+
height: m,
|
|
1641
|
+
x: 0,
|
|
1642
|
+
y: 0
|
|
1643
|
+
};
|
|
1644
|
+
}
|
|
1645
|
+
t.debug("setBlockSizes abc94 (done)", e.id, e?.size?.x, e?.size?.width, e?.size?.y, e?.size?.height);
|
|
1646
|
+
}
|
|
1647
|
+
e(V, "setBlockSizes");
|
|
1648
|
+
function H(e, n, r = 8) {
|
|
1649
|
+
t.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
|
|
1650
|
+
let i = e.columns ?? -1;
|
|
1651
|
+
if (t.debug("layoutBlocks columns abc95", e.id, "=>", i, e), e.children && e.children.length > 0) {
|
|
1652
|
+
let a = e?.children[0]?.size?.width ?? 0, o = e.children.length * a + (e.children.length - 1) * r;
|
|
1653
|
+
t.debug("widthOfChildren 88", o, "posX");
|
|
1654
|
+
let s = /* @__PURE__ */ new Map();
|
|
1655
|
+
{
|
|
1656
|
+
let t = 0;
|
|
1657
|
+
for (let n of e.children) {
|
|
1658
|
+
if (!n.size) continue;
|
|
1659
|
+
let { py: e } = B(i, t), r = s.get(e) ?? 0;
|
|
1660
|
+
n.size.height > r && s.set(e, n.size.height);
|
|
1661
|
+
let a = n?.widthInColumns ?? 1;
|
|
1662
|
+
i > 0 && (a = Math.min(a, i - t % i)), t += a;
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
let c = /* @__PURE__ */ new Map();
|
|
1666
|
+
{
|
|
1667
|
+
let e = 0, t = [...s.keys()].sort((e, t) => e - t);
|
|
1668
|
+
for (let n of t) c.set(n, e), e += (s.get(n) ?? 0) + r;
|
|
1669
|
+
}
|
|
1670
|
+
let l = 0;
|
|
1671
|
+
t.debug("abc91 block?.size?.x", e.id, e?.size?.x);
|
|
1672
|
+
let u = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -r, d = 0;
|
|
1673
|
+
for (let a of e.children) {
|
|
1674
|
+
let o = e;
|
|
1675
|
+
if (!a.size) continue;
|
|
1676
|
+
let { width: f, height: p } = a.size, { px: m, py: h } = B(i, l);
|
|
1677
|
+
if (h != d && (d = h, u = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -r, t.debug("New row in layout for block", e.id, " and child ", a.id, d)), t.debug(`abc89 layout blocks (child) id: ${a.id} Pos: ${l} (px, py) ${m},${h} (${o?.size?.x},${o?.size?.y}) parent: ${o.id} width: ${f}${r}`), o.size) {
|
|
1678
|
+
let e = f / 2;
|
|
1679
|
+
a.size.x = u + r + e, t.debug(`abc91 layout blocks (calc) px, pyid:${a.id} startingPos=X${u} new startingPosX${a.size.x} ${e} padding=${r} width=${f} halfWidth=${e} => x:${a.size.x} y:${a.size.y} ${a.widthInColumns} (width * (child?.w || 1)) / 2 ${f * (a?.widthInColumns ?? 1) / 2}`), u = a.size.x + e;
|
|
1680
|
+
let n = c.get(h) ?? 0, i = s.get(h) ?? p;
|
|
1681
|
+
a.size.y = o.size.y - o.size.height / 2 + n + i / 2 + r, t.debug(`abc88 layout blocks (calc) px, pyid:${a.id}startingPosX${u}${r}${e}=>x:${a.size.x}y:${a.size.y}${a.widthInColumns}(width * (child?.w || 1)) / 2${f * (a?.widthInColumns ?? 1) / 2}`);
|
|
1682
|
+
}
|
|
1683
|
+
a.children && H(a, n, r);
|
|
1684
|
+
let g = a?.widthInColumns ?? 1;
|
|
1685
|
+
i > 0 && (g = Math.min(g, i - l % i)), l += g, t.debug("abc88 columnsPos", a, l);
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
t.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
|
|
1689
|
+
}
|
|
1690
|
+
e(H, "layoutBlocks");
|
|
1691
|
+
function Xe(e, { minX: t, minY: n, maxX: r, maxY: i } = {
|
|
1692
|
+
minX: 0,
|
|
1693
|
+
minY: 0,
|
|
1694
|
+
maxX: 0,
|
|
1695
|
+
maxY: 0
|
|
1696
|
+
}) {
|
|
1697
|
+
if (e.size && e.id !== "root") {
|
|
1698
|
+
let { x: a, y: o, width: s, height: c } = e.size;
|
|
1699
|
+
a - s / 2 < t && (t = a - s / 2), o - c / 2 < n && (n = o - c / 2), a + s / 2 > r && (r = a + s / 2), o + c / 2 > i && (i = o + c / 2);
|
|
1700
|
+
}
|
|
1701
|
+
if (e.children) for (let a of e.children) ({minX: t, minY: n, maxX: r, maxY: i} = Xe(a, {
|
|
1702
|
+
minX: t,
|
|
1703
|
+
minY: n,
|
|
1704
|
+
maxX: r,
|
|
1705
|
+
maxY: i
|
|
1706
|
+
}));
|
|
1707
|
+
return {
|
|
1708
|
+
minX: t,
|
|
1709
|
+
minY: n,
|
|
1710
|
+
maxX: r,
|
|
1711
|
+
maxY: i
|
|
1712
|
+
};
|
|
1713
|
+
}
|
|
1714
|
+
e(Xe, "findBounds");
|
|
1715
|
+
function Ze(e) {
|
|
1716
|
+
let n = e.getBlock("root");
|
|
1717
|
+
if (!n) return;
|
|
1718
|
+
let r = u()?.block?.padding ?? 8;
|
|
1719
|
+
V(n, e, 0, 0, r), H(n, e, r), t.debug("getBlocks", JSON.stringify(n, null, 2));
|
|
1720
|
+
let { minX: i, minY: a, maxX: o, maxY: s } = Xe(n), c = s - a;
|
|
1721
|
+
return {
|
|
1722
|
+
x: i,
|
|
1723
|
+
y: a,
|
|
1724
|
+
width: o - i,
|
|
1725
|
+
height: c
|
|
1726
|
+
};
|
|
1727
|
+
}
|
|
1728
|
+
e(Ze, "layout");
|
|
1729
|
+
var U = /* @__PURE__ */ e(async (e, t, n, r = !1, a = !1) => {
|
|
1730
|
+
let o = t || "";
|
|
1731
|
+
typeof o == "object" && (o = o[0]);
|
|
1732
|
+
let s = u(), c = i(s);
|
|
1733
|
+
return await P(e, o, {
|
|
1734
|
+
style: n,
|
|
1735
|
+
isTitle: r,
|
|
1736
|
+
useHtmlLabels: c,
|
|
1737
|
+
markdown: !1,
|
|
1738
|
+
isNode: a,
|
|
1739
|
+
width: Infinity
|
|
1740
|
+
}, s);
|
|
1741
|
+
}, "createLabel"), Qe = /* @__PURE__ */ e((e, t, n, r, i) => {
|
|
1742
|
+
t.arrowTypeStart && et(e, "start", t.arrowTypeStart, n, r, i), t.arrowTypeEnd && et(e, "end", t.arrowTypeEnd, n, r, i);
|
|
1743
|
+
}, "addEdgeMarkers"), $e = {
|
|
1744
|
+
arrow_cross: "cross",
|
|
1745
|
+
arrow_point: "point",
|
|
1746
|
+
arrow_barb: "barb",
|
|
1747
|
+
arrow_circle: "circle",
|
|
1748
|
+
aggregation: "aggregation",
|
|
1749
|
+
extension: "extension",
|
|
1750
|
+
composition: "composition",
|
|
1751
|
+
dependency: "dependency",
|
|
1752
|
+
lollipop: "lollipop"
|
|
1753
|
+
}, et = /* @__PURE__ */ e((e, n, r, i, a, o) => {
|
|
1754
|
+
let s = $e[r];
|
|
1755
|
+
if (!s) {
|
|
1756
|
+
t.warn(`Unknown arrow type: ${r}`);
|
|
1757
|
+
return;
|
|
1758
|
+
}
|
|
1759
|
+
let c = n === "start" ? "Start" : "End";
|
|
1760
|
+
e.attr(`marker-${n}`, `url(${i}#${a}_${o}-${s}${c})`);
|
|
1761
|
+
}, "addEdgeMarker"), tt = {}, W = {}, nt = /* @__PURE__ */ e(async (e, t) => {
|
|
1762
|
+
let r = u(), a = i(r), o = e.insert("g").attr("class", "edgeLabel"), s = o.insert("g").attr("class", "label"), c = t.labelType === "markdown", l = await P(e, t.label, {
|
|
1763
|
+
style: t.labelStyle,
|
|
1764
|
+
useHtmlLabels: a,
|
|
1765
|
+
addSvgBackground: c,
|
|
1766
|
+
isNode: !1,
|
|
1767
|
+
markdown: c,
|
|
1768
|
+
width: c ? void 0 : Infinity
|
|
1769
|
+
}, r);
|
|
1770
|
+
s.node().appendChild(l);
|
|
1771
|
+
let d = l.getBBox(), f = d;
|
|
1772
|
+
if (a) {
|
|
1773
|
+
let e = l.children[0], t = n(l);
|
|
1774
|
+
d = e.getBoundingClientRect(), f = d, t.attr("width", d.width), t.attr("height", d.height);
|
|
1775
|
+
} else {
|
|
1776
|
+
let e = n(l).select("text").node();
|
|
1777
|
+
e && typeof e.getBBox == "function" && (f = e.getBBox());
|
|
1778
|
+
}
|
|
1779
|
+
s.attr("transform", F(f, a)), tt[t.id] = o, t.width = d.width, t.height = d.height;
|
|
1780
|
+
let p;
|
|
1781
|
+
if (t.startLabelLeft) {
|
|
1782
|
+
let r = e.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner"), o = await U(i, t.startLabelLeft, t.labelStyle);
|
|
1783
|
+
p = o;
|
|
1784
|
+
let s = o.getBBox();
|
|
1785
|
+
if (a) {
|
|
1786
|
+
let e = o.children[0], t = n(o);
|
|
1787
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
1788
|
+
}
|
|
1789
|
+
i.attr("transform", F(s, a)), W[t.id] || (W[t.id] = {}), W[t.id].startLeft = r, G(p, t.startLabelLeft);
|
|
1790
|
+
}
|
|
1791
|
+
if (t.startLabelRight) {
|
|
1792
|
+
let r = e.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner"), o = await U(i, t.startLabelRight, t.labelStyle);
|
|
1793
|
+
p = o;
|
|
1794
|
+
let s = o.getBBox();
|
|
1795
|
+
if (a) {
|
|
1796
|
+
let e = o.children[0], t = n(o);
|
|
1797
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
1798
|
+
}
|
|
1799
|
+
i.attr("transform", F(s, a)), W[t.id] || (W[t.id] = {}), W[t.id].startRight = r, G(p, t.startLabelRight);
|
|
1800
|
+
}
|
|
1801
|
+
if (t.endLabelLeft) {
|
|
1802
|
+
let r = e.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner"), o = await U(r, t.endLabelLeft, t.labelStyle);
|
|
1803
|
+
p = o;
|
|
1804
|
+
let s = o.getBBox();
|
|
1805
|
+
if (a) {
|
|
1806
|
+
let e = o.children[0], t = n(o);
|
|
1807
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
1808
|
+
}
|
|
1809
|
+
i.attr("transform", F(s, a)), W[t.id] || (W[t.id] = {}), W[t.id].endLeft = r, G(p, t.endLabelLeft);
|
|
1810
|
+
}
|
|
1811
|
+
if (t.endLabelRight) {
|
|
1812
|
+
let r = e.insert("g").attr("class", "edgeTerminals"), i = r.insert("g").attr("class", "inner"), o = await U(r, t.endLabelRight, t.labelStyle);
|
|
1813
|
+
p = o;
|
|
1814
|
+
let s = o.getBBox();
|
|
1815
|
+
if (a) {
|
|
1816
|
+
let e = o.children[0], t = n(o);
|
|
1817
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
1818
|
+
}
|
|
1819
|
+
i.attr("transform", F(s, a)), W[t.id] || (W[t.id] = {}), W[t.id].endRight = r, G(p, t.endLabelRight);
|
|
1820
|
+
}
|
|
1821
|
+
return l;
|
|
1822
|
+
}, "insertEdgeLabel");
|
|
1823
|
+
function G(e, t) {
|
|
1824
|
+
i(u()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
|
|
1825
|
+
}
|
|
1826
|
+
e(G, "setTerminalWidth");
|
|
1827
|
+
var rt = /* @__PURE__ */ e((e, n) => {
|
|
1828
|
+
t.debug("Moving label abc88 ", e.id, e.label, tt[e.id], n);
|
|
1829
|
+
let r = n.updatedPath ? n.updatedPath : n.originalPath, { subGraphTitleTotalMargin: i } = de(u());
|
|
1830
|
+
if (e.label) {
|
|
1831
|
+
let a = tt[e.id], o = e.x, s = e.y;
|
|
1832
|
+
if (r) {
|
|
1833
|
+
let i = N.calcLabelPosition(r);
|
|
1834
|
+
t.debug("Moving label " + e.label + " from (", o, ",", s, ") to (", i.x, ",", i.y, ") abc88"), n.updatedPath && (o = i.x, s = i.y);
|
|
1835
|
+
}
|
|
1836
|
+
a.attr("transform", `translate(${o}, ${s + i / 2})`);
|
|
1837
|
+
}
|
|
1838
|
+
if (e.startLabelLeft) {
|
|
1839
|
+
let t = W[e.id].startLeft, n = e.x, i = e.y;
|
|
1840
|
+
if (r) {
|
|
1841
|
+
let t = N.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", r);
|
|
1842
|
+
n = t.x, i = t.y;
|
|
1843
|
+
}
|
|
1844
|
+
t.attr("transform", `translate(${n}, ${i})`);
|
|
1845
|
+
}
|
|
1846
|
+
if (e.startLabelRight) {
|
|
1847
|
+
let t = W[e.id].startRight, n = e.x, i = e.y;
|
|
1848
|
+
if (r) {
|
|
1849
|
+
let t = N.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", r);
|
|
1850
|
+
n = t.x, i = t.y;
|
|
1851
|
+
}
|
|
1852
|
+
t.attr("transform", `translate(${n}, ${i})`);
|
|
1853
|
+
}
|
|
1854
|
+
if (e.endLabelLeft) {
|
|
1855
|
+
let t = W[e.id].endLeft, n = e.x, i = e.y;
|
|
1856
|
+
if (r) {
|
|
1857
|
+
let t = N.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", r);
|
|
1858
|
+
n = t.x, i = t.y;
|
|
1859
|
+
}
|
|
1860
|
+
t.attr("transform", `translate(${n}, ${i})`);
|
|
1861
|
+
}
|
|
1862
|
+
if (e.endLabelRight) {
|
|
1863
|
+
let t = W[e.id].endRight, n = e.x, i = e.y;
|
|
1864
|
+
if (r) {
|
|
1865
|
+
let t = N.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", r);
|
|
1866
|
+
n = t.x, i = t.y;
|
|
1867
|
+
}
|
|
1868
|
+
t.attr("transform", `translate(${n}, ${i})`);
|
|
1869
|
+
}
|
|
1870
|
+
}, "positionEdgeLabel"), it = /* @__PURE__ */ e((e, t) => {
|
|
1871
|
+
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;
|
|
1872
|
+
return i >= o || a >= s;
|
|
1873
|
+
}, "outsideNode"), at = /* @__PURE__ */ e((e, n, r) => {
|
|
1874
|
+
t.debug(`intersection calc abc89:
|
|
1875
|
+
outsidePoint: ${JSON.stringify(n)}
|
|
1876
|
+
insidePoint : ${JSON.stringify(r)}
|
|
1877
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
|
|
1878
|
+
let i = e.x, a = e.y, o = Math.abs(i - r.x), s = e.width / 2, c = r.x < n.x ? s - o : s + o, l = e.height / 2, u = Math.abs(n.y - r.y), d = Math.abs(n.x - r.x);
|
|
1879
|
+
if (Math.abs(a - n.y) * s > Math.abs(i - n.x) * l) {
|
|
1880
|
+
let e = r.y < n.y ? n.y - l - a : a - l - n.y;
|
|
1881
|
+
c = d * e / u;
|
|
1882
|
+
let i = {
|
|
1883
|
+
x: r.x < n.x ? r.x + c : r.x - d + c,
|
|
1884
|
+
y: r.y < n.y ? r.y + u - e : r.y - u + e
|
|
1885
|
+
};
|
|
1886
|
+
return c === 0 && (i.x = n.x, i.y = n.y), d === 0 && (i.x = n.x), u === 0 && (i.y = n.y), t.debug(`abc89 topp/bott calc, Q ${u}, q ${e}, R ${d}, r ${c}`, i), i;
|
|
1887
|
+
} else {
|
|
1888
|
+
c = r.x < n.x ? n.x - s - i : i - s - n.x;
|
|
1889
|
+
let e = u * c / d, a = r.x < n.x ? r.x + d - c : r.x - d + c, o = r.y < n.y ? r.y + e : r.y - e;
|
|
1890
|
+
return t.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${c}`, {
|
|
1891
|
+
_x: a,
|
|
1892
|
+
_y: o
|
|
1893
|
+
}), c === 0 && (a = n.x, o = n.y), d === 0 && (a = n.x), u === 0 && (o = n.y), {
|
|
1894
|
+
x: a,
|
|
1895
|
+
y: o
|
|
1896
|
+
};
|
|
1897
|
+
}
|
|
1898
|
+
}, "intersection"), ot = /* @__PURE__ */ e((e, n) => {
|
|
1899
|
+
t.debug("abc88 cutPathAtIntersect", e, n);
|
|
1900
|
+
let r = [], i = e[0], a = !1;
|
|
1901
|
+
return e.forEach((e) => {
|
|
1902
|
+
if (!it(n, e) && !a) {
|
|
1903
|
+
let t = at(n, i, e), o = !1;
|
|
1904
|
+
r.forEach((e) => {
|
|
1905
|
+
o ||= e.x === t.x && e.y === t.y;
|
|
1906
|
+
}), r.some((e) => e.x === t.x && e.y === t.y) || r.push(t), a = !0;
|
|
1907
|
+
} else i = e, a || r.push(e);
|
|
1908
|
+
}), r;
|
|
1909
|
+
}, "cutPathAtIntersect"), st = /* @__PURE__ */ e(function(e, n, i, a, o, s, c) {
|
|
1910
|
+
let l = i.points;
|
|
1911
|
+
t.debug("abc88 InsertEdge: edge=", i, "e=", n);
|
|
1912
|
+
let d = !1, f = s.node(n.v);
|
|
1913
|
+
var p = s.node(n.w);
|
|
1914
|
+
p?.intersect && f?.intersect && (l = l.slice(1, i.points.length - 1), l.unshift(f.intersect(l[0])), l.push(p.intersect(l[l.length - 1]))), i.toCluster && (t.debug("to cluster abc88", a[i.toCluster]), l = ot(i.points, a[i.toCluster].node), d = !0), i.fromCluster && (t.debug("from cluster abc88", a[i.fromCluster]), l = ot(l.reverse(), a[i.fromCluster].node).reverse(), d = !0);
|
|
1915
|
+
let m = l.filter((e) => !Number.isNaN(e.y)), h = te;
|
|
1916
|
+
i.curve && (o === "graph" || o === "flowchart") && (h = i.curve);
|
|
1917
|
+
let { x: g, y: _ } = ue(i), v = ce().x(g).y(_).curve(h), y;
|
|
1918
|
+
switch (i.thickness) {
|
|
1919
|
+
case "normal":
|
|
1920
|
+
y = "edge-thickness-normal";
|
|
1921
|
+
break;
|
|
1922
|
+
case "thick":
|
|
1923
|
+
y = "edge-thickness-thick";
|
|
1924
|
+
break;
|
|
1925
|
+
case "invisible":
|
|
1926
|
+
y = "edge-thickness-thick";
|
|
1927
|
+
break;
|
|
1928
|
+
default: y = "";
|
|
1929
|
+
}
|
|
1930
|
+
switch (i.pattern) {
|
|
1931
|
+
case "solid":
|
|
1932
|
+
y += " edge-pattern-solid";
|
|
1933
|
+
break;
|
|
1934
|
+
case "dotted":
|
|
1935
|
+
y += " edge-pattern-dotted";
|
|
1936
|
+
break;
|
|
1937
|
+
case "dashed":
|
|
1938
|
+
y += " edge-pattern-dashed";
|
|
1939
|
+
break;
|
|
1940
|
+
}
|
|
1941
|
+
let b = e.append("path").attr("d", v(m)).attr("id", i.id).attr("class", " " + y + (i.classes ? " " + i.classes : "")).attr("style", i.style), x = "";
|
|
1942
|
+
(u().flowchart.arrowMarkerAbsolute || u().state.arrowMarkerAbsolute) && (x = r(!0)), Qe(b, i, x, c, o);
|
|
1943
|
+
let S = {};
|
|
1944
|
+
return d && (S.updatedPath = l), S.originalPath = i.points, S;
|
|
1945
|
+
}, "insertEdge"), ct = /* @__PURE__ */ e((e) => {
|
|
1946
|
+
let t = /* @__PURE__ */ new Set();
|
|
1947
|
+
for (let n of e) switch (n) {
|
|
1948
|
+
case "x":
|
|
1949
|
+
t.add("right"), t.add("left");
|
|
1950
|
+
break;
|
|
1951
|
+
case "y":
|
|
1952
|
+
t.add("up"), t.add("down");
|
|
1953
|
+
break;
|
|
1954
|
+
default:
|
|
1955
|
+
t.add(n);
|
|
1956
|
+
break;
|
|
1957
|
+
}
|
|
1958
|
+
return t;
|
|
1959
|
+
}, "expandAndDeduplicateDirections"), lt = /* @__PURE__ */ e((e, t, n, r) => {
|
|
1960
|
+
let i = ct(e), a = t.height + 2 * n.padding, o = a / 2, s = r ?? t.width + 2 * o + n.padding, c = n.padding / 2;
|
|
1961
|
+
return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
|
|
1962
|
+
{
|
|
1963
|
+
x: 0,
|
|
1964
|
+
y: 0
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
x: o,
|
|
1968
|
+
y: 0
|
|
1969
|
+
},
|
|
1970
|
+
{
|
|
1971
|
+
x: s / 2,
|
|
1972
|
+
y: 2 * c
|
|
1973
|
+
},
|
|
1974
|
+
{
|
|
1975
|
+
x: s - o,
|
|
1976
|
+
y: 0
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
x: s,
|
|
1980
|
+
y: 0
|
|
1981
|
+
},
|
|
1982
|
+
{
|
|
1983
|
+
x: s,
|
|
1984
|
+
y: -a / 3
|
|
1985
|
+
},
|
|
1986
|
+
{
|
|
1987
|
+
x: s + 2 * c,
|
|
1988
|
+
y: -a / 2
|
|
1989
|
+
},
|
|
1990
|
+
{
|
|
1991
|
+
x: s,
|
|
1992
|
+
y: -2 * a / 3
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
x: s,
|
|
1996
|
+
y: -a
|
|
1997
|
+
},
|
|
1998
|
+
{
|
|
1999
|
+
x: s - o,
|
|
2000
|
+
y: -a
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
x: s / 2,
|
|
2004
|
+
y: -a - 2 * c
|
|
2005
|
+
},
|
|
2006
|
+
{
|
|
2007
|
+
x: o,
|
|
2008
|
+
y: -a
|
|
2009
|
+
},
|
|
2010
|
+
{
|
|
2011
|
+
x: 0,
|
|
2012
|
+
y: -a
|
|
2013
|
+
},
|
|
2014
|
+
{
|
|
2015
|
+
x: 0,
|
|
2016
|
+
y: -2 * a / 3
|
|
2017
|
+
},
|
|
2018
|
+
{
|
|
2019
|
+
x: -2 * c,
|
|
2020
|
+
y: -a / 2
|
|
2021
|
+
},
|
|
2022
|
+
{
|
|
2023
|
+
x: 0,
|
|
2024
|
+
y: -a / 3
|
|
2025
|
+
}
|
|
2026
|
+
] : i.has("right") && i.has("left") && i.has("up") ? [
|
|
2027
|
+
{
|
|
2028
|
+
x: o,
|
|
2029
|
+
y: 0
|
|
2030
|
+
},
|
|
2031
|
+
{
|
|
2032
|
+
x: s - o,
|
|
2033
|
+
y: 0
|
|
2034
|
+
},
|
|
2035
|
+
{
|
|
2036
|
+
x: s,
|
|
2037
|
+
y: -a / 2
|
|
2038
|
+
},
|
|
2039
|
+
{
|
|
2040
|
+
x: s - o,
|
|
2041
|
+
y: -a
|
|
2042
|
+
},
|
|
2043
|
+
{
|
|
2044
|
+
x: o,
|
|
2045
|
+
y: -a
|
|
2046
|
+
},
|
|
2047
|
+
{
|
|
2048
|
+
x: 0,
|
|
2049
|
+
y: -a / 2
|
|
2050
|
+
}
|
|
2051
|
+
] : i.has("right") && i.has("left") && i.has("down") ? [
|
|
2052
|
+
{
|
|
2053
|
+
x: 0,
|
|
2054
|
+
y: 0
|
|
2055
|
+
},
|
|
2056
|
+
{
|
|
2057
|
+
x: o,
|
|
2058
|
+
y: -a
|
|
2059
|
+
},
|
|
2060
|
+
{
|
|
2061
|
+
x: s - o,
|
|
2062
|
+
y: -a
|
|
2063
|
+
},
|
|
2064
|
+
{
|
|
2065
|
+
x: s,
|
|
2066
|
+
y: 0
|
|
2067
|
+
}
|
|
2068
|
+
] : i.has("right") && i.has("up") && i.has("down") ? [
|
|
2069
|
+
{
|
|
2070
|
+
x: 0,
|
|
2071
|
+
y: 0
|
|
2072
|
+
},
|
|
2073
|
+
{
|
|
2074
|
+
x: s,
|
|
2075
|
+
y: -o
|
|
2076
|
+
},
|
|
2077
|
+
{
|
|
2078
|
+
x: s,
|
|
2079
|
+
y: -a + o
|
|
2080
|
+
},
|
|
2081
|
+
{
|
|
2082
|
+
x: 0,
|
|
2083
|
+
y: -a
|
|
2084
|
+
}
|
|
2085
|
+
] : i.has("left") && i.has("up") && i.has("down") ? [
|
|
2086
|
+
{
|
|
2087
|
+
x: s,
|
|
2088
|
+
y: 0
|
|
2089
|
+
},
|
|
2090
|
+
{
|
|
2091
|
+
x: 0,
|
|
2092
|
+
y: -o
|
|
2093
|
+
},
|
|
2094
|
+
{
|
|
2095
|
+
x: 0,
|
|
2096
|
+
y: -a + o
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
x: s,
|
|
2100
|
+
y: -a
|
|
2101
|
+
}
|
|
2102
|
+
] : i.has("right") && i.has("left") ? [
|
|
2103
|
+
{
|
|
2104
|
+
x: o,
|
|
2105
|
+
y: 0
|
|
2106
|
+
},
|
|
2107
|
+
{
|
|
2108
|
+
x: o,
|
|
2109
|
+
y: -c
|
|
2110
|
+
},
|
|
2111
|
+
{
|
|
2112
|
+
x: s - o,
|
|
2113
|
+
y: -c
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
x: s - o,
|
|
2117
|
+
y: 0
|
|
2118
|
+
},
|
|
2119
|
+
{
|
|
2120
|
+
x: s,
|
|
2121
|
+
y: -a / 2
|
|
2122
|
+
},
|
|
2123
|
+
{
|
|
2124
|
+
x: s - o,
|
|
2125
|
+
y: -a
|
|
2126
|
+
},
|
|
2127
|
+
{
|
|
2128
|
+
x: s - o,
|
|
2129
|
+
y: -a + c
|
|
2130
|
+
},
|
|
2131
|
+
{
|
|
2132
|
+
x: o,
|
|
2133
|
+
y: -a + c
|
|
2134
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
x: o,
|
|
2137
|
+
y: -a
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
x: 0,
|
|
2141
|
+
y: -a / 2
|
|
2142
|
+
}
|
|
2143
|
+
] : i.has("up") && i.has("down") ? [
|
|
2144
|
+
{
|
|
2145
|
+
x: s / 2,
|
|
2146
|
+
y: 0
|
|
2147
|
+
},
|
|
2148
|
+
{
|
|
2149
|
+
x: 0,
|
|
2150
|
+
y: -c
|
|
2151
|
+
},
|
|
2152
|
+
{
|
|
2153
|
+
x: o,
|
|
2154
|
+
y: -c
|
|
2155
|
+
},
|
|
2156
|
+
{
|
|
2157
|
+
x: o,
|
|
2158
|
+
y: -a + c
|
|
2159
|
+
},
|
|
2160
|
+
{
|
|
2161
|
+
x: 0,
|
|
2162
|
+
y: -a + c
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
x: s / 2,
|
|
2166
|
+
y: -a
|
|
2167
|
+
},
|
|
2168
|
+
{
|
|
2169
|
+
x: s,
|
|
2170
|
+
y: -a + c
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
x: s - o,
|
|
2174
|
+
y: -a + c
|
|
2175
|
+
},
|
|
2176
|
+
{
|
|
2177
|
+
x: s - o,
|
|
2178
|
+
y: -c
|
|
2179
|
+
},
|
|
2180
|
+
{
|
|
2181
|
+
x: s,
|
|
2182
|
+
y: -c
|
|
2183
|
+
}
|
|
2184
|
+
] : i.has("right") && i.has("up") ? [
|
|
2185
|
+
{
|
|
2186
|
+
x: 0,
|
|
2187
|
+
y: 0
|
|
2188
|
+
},
|
|
2189
|
+
{
|
|
2190
|
+
x: s,
|
|
2191
|
+
y: -o
|
|
2192
|
+
},
|
|
2193
|
+
{
|
|
2194
|
+
x: 0,
|
|
2195
|
+
y: -a
|
|
2196
|
+
}
|
|
2197
|
+
] : i.has("right") && i.has("down") ? [
|
|
2198
|
+
{
|
|
2199
|
+
x: 0,
|
|
2200
|
+
y: 0
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
x: s,
|
|
2204
|
+
y: 0
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
x: 0,
|
|
2208
|
+
y: -a
|
|
2209
|
+
}
|
|
2210
|
+
] : i.has("left") && i.has("up") ? [
|
|
2211
|
+
{
|
|
2212
|
+
x: s,
|
|
2213
|
+
y: 0
|
|
2214
|
+
},
|
|
2215
|
+
{
|
|
2216
|
+
x: 0,
|
|
2217
|
+
y: -o
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
x: s,
|
|
2221
|
+
y: -a
|
|
2222
|
+
}
|
|
2223
|
+
] : i.has("left") && i.has("down") ? [
|
|
2224
|
+
{
|
|
2225
|
+
x: s,
|
|
2226
|
+
y: 0
|
|
2227
|
+
},
|
|
2228
|
+
{
|
|
2229
|
+
x: 0,
|
|
2230
|
+
y: 0
|
|
2231
|
+
},
|
|
2232
|
+
{
|
|
2233
|
+
x: s,
|
|
2234
|
+
y: -a
|
|
2235
|
+
}
|
|
2236
|
+
] : i.has("right") ? [
|
|
2237
|
+
{
|
|
2238
|
+
x: o,
|
|
2239
|
+
y: -c
|
|
2240
|
+
},
|
|
2241
|
+
{
|
|
2242
|
+
x: o,
|
|
2243
|
+
y: -c
|
|
2244
|
+
},
|
|
2245
|
+
{
|
|
2246
|
+
x: s - o,
|
|
2247
|
+
y: -c
|
|
2248
|
+
},
|
|
2249
|
+
{
|
|
2250
|
+
x: s - o,
|
|
2251
|
+
y: 0
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
x: s,
|
|
2255
|
+
y: -a / 2
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
x: s - o,
|
|
2259
|
+
y: -a
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
x: s - o,
|
|
2263
|
+
y: -a + c
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
x: o,
|
|
2267
|
+
y: -a + c
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
x: o,
|
|
2271
|
+
y: -a + c
|
|
2272
|
+
}
|
|
2273
|
+
] : i.has("left") ? [
|
|
2274
|
+
{
|
|
2275
|
+
x: o,
|
|
2276
|
+
y: 0
|
|
2277
|
+
},
|
|
2278
|
+
{
|
|
2279
|
+
x: o,
|
|
2280
|
+
y: -c
|
|
2281
|
+
},
|
|
2282
|
+
{
|
|
2283
|
+
x: s - o,
|
|
2284
|
+
y: -c
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
x: s - o,
|
|
2288
|
+
y: -a + c
|
|
2289
|
+
},
|
|
2290
|
+
{
|
|
2291
|
+
x: o,
|
|
2292
|
+
y: -a + c
|
|
2293
|
+
},
|
|
2294
|
+
{
|
|
2295
|
+
x: o,
|
|
2296
|
+
y: -a
|
|
2297
|
+
},
|
|
2298
|
+
{
|
|
2299
|
+
x: 0,
|
|
2300
|
+
y: -a / 2
|
|
2301
|
+
}
|
|
2302
|
+
] : i.has("up") ? [
|
|
2303
|
+
{
|
|
2304
|
+
x: o,
|
|
2305
|
+
y: -c
|
|
2306
|
+
},
|
|
2307
|
+
{
|
|
2308
|
+
x: o,
|
|
2309
|
+
y: -a + c
|
|
2310
|
+
},
|
|
2311
|
+
{
|
|
2312
|
+
x: 0,
|
|
2313
|
+
y: -a + c
|
|
2314
|
+
},
|
|
2315
|
+
{
|
|
2316
|
+
x: s / 2,
|
|
2317
|
+
y: -a
|
|
2318
|
+
},
|
|
2319
|
+
{
|
|
2320
|
+
x: s,
|
|
2321
|
+
y: -a + c
|
|
2322
|
+
},
|
|
2323
|
+
{
|
|
2324
|
+
x: s - o,
|
|
2325
|
+
y: -a + c
|
|
2326
|
+
},
|
|
2327
|
+
{
|
|
2328
|
+
x: s - o,
|
|
2329
|
+
y: -c
|
|
2330
|
+
}
|
|
2331
|
+
] : i.has("down") ? [
|
|
2332
|
+
{
|
|
2333
|
+
x: s / 2,
|
|
2334
|
+
y: 0
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
x: 0,
|
|
2338
|
+
y: -c
|
|
2339
|
+
},
|
|
2340
|
+
{
|
|
2341
|
+
x: o,
|
|
2342
|
+
y: -c
|
|
2343
|
+
},
|
|
2344
|
+
{
|
|
2345
|
+
x: o,
|
|
2346
|
+
y: -a + c
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
x: s - o,
|
|
2350
|
+
y: -a + c
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
x: s - o,
|
|
2354
|
+
y: -c
|
|
2355
|
+
},
|
|
2356
|
+
{
|
|
2357
|
+
x: s,
|
|
2358
|
+
y: -c
|
|
2359
|
+
}
|
|
2360
|
+
] : [{
|
|
2361
|
+
x: 0,
|
|
2362
|
+
y: 0
|
|
2363
|
+
}];
|
|
2364
|
+
}, "getArrowPoints");
|
|
2365
|
+
function ut(e, t) {
|
|
2366
|
+
return e.intersect(t);
|
|
2367
|
+
}
|
|
2368
|
+
e(ut, "intersectNode");
|
|
2369
|
+
var dt = ut;
|
|
2370
|
+
function ft(e, t, n, r) {
|
|
2371
|
+
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);
|
|
2372
|
+
r.x < i && (l = -l);
|
|
2373
|
+
var u = Math.abs(t * n * s / c);
|
|
2374
|
+
return r.y < a && (u = -u), {
|
|
2375
|
+
x: i + l,
|
|
2376
|
+
y: a + u
|
|
2377
|
+
};
|
|
2378
|
+
}
|
|
2379
|
+
e(ft, "intersectEllipse");
|
|
2380
|
+
var pt = ft;
|
|
2381
|
+
function mt(e, t, n) {
|
|
2382
|
+
return pt(e, t, t, n);
|
|
2383
|
+
}
|
|
2384
|
+
e(mt, "intersectCircle");
|
|
2385
|
+
var ht = mt;
|
|
2386
|
+
function gt(e, t, n, r) {
|
|
2387
|
+
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;
|
|
2388
|
+
if (!(f !== 0 && p !== 0 && _t(f, p)) && (a = r.y - n.y, s = n.x - r.x, l = r.x * n.y - n.x * r.y, u = a * e.x + s * e.y + l, d = a * t.x + s * t.y + l, !(u !== 0 && d !== 0 && _t(u, d)) && (m = i * s - a * o, m !== 0))) return h = Math.abs(m / 2), g = o * l - s * c, _ = g < 0 ? (g - h) / m : (g + h) / m, g = a * c - i * l, v = g < 0 ? (g - h) / m : (g + h) / m, {
|
|
2389
|
+
x: _,
|
|
2390
|
+
y: v
|
|
2391
|
+
};
|
|
2392
|
+
}
|
|
2393
|
+
e(gt, "intersectLine");
|
|
2394
|
+
function _t(e, t) {
|
|
2395
|
+
return e * t > 0;
|
|
2396
|
+
}
|
|
2397
|
+
e(_t, "sameSign");
|
|
2398
|
+
var vt = gt, yt = bt;
|
|
2399
|
+
function bt(e, t, n) {
|
|
2400
|
+
var r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
|
|
2401
|
+
typeof t.forEach == "function" ? t.forEach(function(e) {
|
|
2402
|
+
o = Math.min(o, e.x), s = Math.min(s, e.y);
|
|
2403
|
+
}) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
|
|
2404
|
+
for (var c = r - e.width / 2 - o, l = i - e.height / 2 - s, u = 0; u < t.length; u++) {
|
|
2405
|
+
var d = t[u], f = t[u < t.length - 1 ? u + 1 : 0], p = vt(e, n, {
|
|
2406
|
+
x: c + d.x,
|
|
2407
|
+
y: l + d.y
|
|
2408
|
+
}, {
|
|
2409
|
+
x: c + f.x,
|
|
2410
|
+
y: l + f.y
|
|
2411
|
+
});
|
|
2412
|
+
p && a.push(p);
|
|
2413
|
+
}
|
|
2414
|
+
return a.length ? (a.length > 1 && a.sort(function(e, t) {
|
|
2415
|
+
var r = e.x - n.x, i = e.y - n.y, a = Math.sqrt(r * r + i * i), o = t.x - n.x, s = t.y - n.y, c = Math.sqrt(o * o + s * s);
|
|
2416
|
+
return a < c ? -1 : a === c ? 0 : 1;
|
|
2417
|
+
}), a[0]) : e;
|
|
2418
|
+
}
|
|
2419
|
+
e(bt, "intersectPolygon");
|
|
2420
|
+
var K = {
|
|
2421
|
+
node: dt,
|
|
2422
|
+
circle: ht,
|
|
2423
|
+
ellipse: pt,
|
|
2424
|
+
polygon: yt,
|
|
2425
|
+
rect: /* @__PURE__ */ e((e, t) => {
|
|
2426
|
+
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;
|
|
2427
|
+
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), {
|
|
2428
|
+
x: n + c,
|
|
2429
|
+
y: r + l
|
|
2430
|
+
};
|
|
2431
|
+
}, "intersectRect")
|
|
2432
|
+
}, q = /* @__PURE__ */ e(async (e, t, r, a) => {
|
|
2433
|
+
let o = u(), s, c = t.useHtmlLabels || i(o);
|
|
2434
|
+
s = r || "node default";
|
|
2435
|
+
let l = e.insert("g").attr("class", s).attr("id", t.domId || t.id), f = l.insert("g").attr("class", "label").attr("style", t.labelStyle), p;
|
|
2436
|
+
p = t.labelText === void 0 ? "" : typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
2437
|
+
let m;
|
|
2438
|
+
m = t.labelType === "markdown" ? P(f, d(M(p), o), {
|
|
2439
|
+
useHtmlLabels: c,
|
|
2440
|
+
width: t.width || o.flowchart.wrappingWidth,
|
|
2441
|
+
classes: "markdown-node-label"
|
|
2442
|
+
}, o) : await U(f, d(M(p), o), t.labelStyle, !1, a);
|
|
2443
|
+
let h = m.getBBox(), g = t.padding / 2;
|
|
2444
|
+
if (i(o)) {
|
|
2445
|
+
let e = m.children[0], t = n(m);
|
|
2446
|
+
await fe(e, p), h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
|
|
2447
|
+
}
|
|
2448
|
+
return c ? f.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")") : f.attr("transform", "translate(0, " + -h.height / 2 + ")"), t.centerLabel && f.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), f.insert("rect", ":first-child"), {
|
|
2449
|
+
shapeSvg: l,
|
|
2450
|
+
bbox: h,
|
|
2451
|
+
halfPadding: g,
|
|
2452
|
+
label: f
|
|
2453
|
+
};
|
|
2454
|
+
}, "labelHelper"), J = /* @__PURE__ */ e((e, t) => {
|
|
2455
|
+
let n = t.node().getBBox();
|
|
2456
|
+
e.width = n.width, e.height = n.height;
|
|
2457
|
+
}, "updateNodeBounds");
|
|
2458
|
+
function Y(e, t, n, r) {
|
|
2459
|
+
return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
|
|
2460
|
+
return e.x + "," + e.y;
|
|
2461
|
+
}).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
|
|
2462
|
+
}
|
|
2463
|
+
e(Y, "insertPolygonShape");
|
|
2464
|
+
var xt = /* @__PURE__ */ e(async (e, n) => {
|
|
2465
|
+
n.useHtmlLabels || i(u()) || (n.centerLabel = !0);
|
|
2466
|
+
let { shapeSvg: r, bbox: a, halfPadding: o } = await q(e, n, "node " + n.classes, !0);
|
|
2467
|
+
t.info("Classes = ", n.classes);
|
|
2468
|
+
let s = r.insert("rect", ":first-child");
|
|
2469
|
+
return s.attr("rx", n.rx).attr("ry", n.ry).attr("x", -a.width / 2 - o).attr("y", -a.height / 2 - o).attr("width", a.width + n.padding).attr("height", a.height + n.padding), J(n, s), n.intersect = function(e) {
|
|
2470
|
+
return K.rect(n, e);
|
|
2471
|
+
}, r;
|
|
2472
|
+
}, "note"), St = /* @__PURE__ */ e((e) => e ? " " + e : "", "formatClass"), X = /* @__PURE__ */ e((e, t) => `${t || "node default"}${St(e.classes)} ${St(e.class)}`, "getClassesFromNode"), Ct = /* @__PURE__ */ e(async (e, n) => {
|
|
2473
|
+
let { shapeSvg: r, bbox: i } = await q(e, n, X(n, void 0), !0), a = i.width + n.padding + (i.height + n.padding), o = [
|
|
2474
|
+
{
|
|
2475
|
+
x: a / 2,
|
|
2476
|
+
y: 0
|
|
2477
|
+
},
|
|
2478
|
+
{
|
|
2479
|
+
x: a,
|
|
2480
|
+
y: -a / 2
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
x: a / 2,
|
|
2484
|
+
y: -a
|
|
2485
|
+
},
|
|
2486
|
+
{
|
|
2487
|
+
x: 0,
|
|
2488
|
+
y: -a / 2
|
|
2489
|
+
}
|
|
2490
|
+
];
|
|
2491
|
+
t.info("Question main (Circle)");
|
|
2492
|
+
let s = Y(r, a, a, o);
|
|
2493
|
+
return s.attr("style", n.style), J(n, s), n.intersect = function(e) {
|
|
2494
|
+
return t.warn("Intersect called"), K.polygon(n, o, e);
|
|
2495
|
+
}, r;
|
|
2496
|
+
}, "question"), wt = /* @__PURE__ */ e((e, t) => {
|
|
2497
|
+
let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
2498
|
+
return n.insert("polygon", ":first-child").attr("points", [
|
|
2499
|
+
{
|
|
2500
|
+
x: 0,
|
|
2501
|
+
y: 28 / 2
|
|
2502
|
+
},
|
|
2503
|
+
{
|
|
2504
|
+
x: 28 / 2,
|
|
2505
|
+
y: 0
|
|
2506
|
+
},
|
|
2507
|
+
{
|
|
2508
|
+
x: 0,
|
|
2509
|
+
y: -28 / 2
|
|
2510
|
+
},
|
|
2511
|
+
{
|
|
2512
|
+
x: -28 / 2,
|
|
2513
|
+
y: 0
|
|
2514
|
+
}
|
|
2515
|
+
].map(function(e) {
|
|
2516
|
+
return e.x + "," + e.y;
|
|
2517
|
+
}).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(e) {
|
|
2518
|
+
return K.circle(t, 14, e);
|
|
2519
|
+
}, n;
|
|
2520
|
+
}, "choice"), Tt = /* @__PURE__ */ e(async (e, t) => {
|
|
2521
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = t.positioned ? t.height : r.height + t.padding, a = i / 4, o = t.positioned ? t.width : r.width + 2 * a + t.padding, s = [
|
|
2522
|
+
{
|
|
2523
|
+
x: a,
|
|
2524
|
+
y: 0
|
|
2525
|
+
},
|
|
2526
|
+
{
|
|
2527
|
+
x: o - a,
|
|
2528
|
+
y: 0
|
|
2529
|
+
},
|
|
2530
|
+
{
|
|
2531
|
+
x: o,
|
|
2532
|
+
y: -i / 2
|
|
2533
|
+
},
|
|
2534
|
+
{
|
|
2535
|
+
x: o - a,
|
|
2536
|
+
y: -i
|
|
2537
|
+
},
|
|
2538
|
+
{
|
|
2539
|
+
x: a,
|
|
2540
|
+
y: -i
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
x: 0,
|
|
2544
|
+
y: -i / 2
|
|
2545
|
+
}
|
|
2546
|
+
], c = Y(n, o, i, s);
|
|
2547
|
+
return c.attr("style", t.style), J(t, c), t.intersect = function(e) {
|
|
2548
|
+
return K.polygon(t, s, e);
|
|
2549
|
+
}, n;
|
|
2550
|
+
}, "hexagon"), Et = /* @__PURE__ */ e(async (e, t) => {
|
|
2551
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, void 0, !0), i = r.height + 2 * t.padding, a = i / 2, o = r.width + 2 * a + t.padding, s = t.positioned && (t.widthInColumns ?? 1) > 1 && t.width > o ? t.width : o, c = lt(t.directions, r, t, s), l = Y(n, s, i, c);
|
|
2552
|
+
return l.attr("style", t.style), J(t, l), t.intersect = function(e) {
|
|
2553
|
+
return K.polygon(t, c, e);
|
|
2554
|
+
}, n;
|
|
2555
|
+
}, "block_arrow"), Dt = /* @__PURE__ */ e(async (e, t) => {
|
|
2556
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2557
|
+
{
|
|
2558
|
+
x: -a / 2,
|
|
2559
|
+
y: 0
|
|
2560
|
+
},
|
|
2561
|
+
{
|
|
2562
|
+
x: i,
|
|
2563
|
+
y: 0
|
|
2564
|
+
},
|
|
2565
|
+
{
|
|
2566
|
+
x: i,
|
|
2567
|
+
y: -a
|
|
2568
|
+
},
|
|
2569
|
+
{
|
|
2570
|
+
x: -a / 2,
|
|
2571
|
+
y: -a
|
|
2572
|
+
},
|
|
2573
|
+
{
|
|
2574
|
+
x: 0,
|
|
2575
|
+
y: -a / 2
|
|
2576
|
+
}
|
|
2577
|
+
];
|
|
2578
|
+
return Y(n, i, a, o).attr("style", t.style), t.width = i + a, t.height = a, t.intersect = function(e) {
|
|
2579
|
+
return K.polygon(t, o, e);
|
|
2580
|
+
}, n;
|
|
2581
|
+
}, "rect_left_inv_arrow"), Ot = /* @__PURE__ */ e(async (e, t) => {
|
|
2582
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2583
|
+
{
|
|
2584
|
+
x: -2 * a / 6,
|
|
2585
|
+
y: 0
|
|
2586
|
+
},
|
|
2587
|
+
{
|
|
2588
|
+
x: i - a / 6,
|
|
2589
|
+
y: 0
|
|
2590
|
+
},
|
|
2591
|
+
{
|
|
2592
|
+
x: i + 2 * a / 6,
|
|
2593
|
+
y: -a
|
|
2594
|
+
},
|
|
2595
|
+
{
|
|
2596
|
+
x: a / 6,
|
|
2597
|
+
y: -a
|
|
2598
|
+
}
|
|
2599
|
+
], s = Y(n, i, a, o);
|
|
2600
|
+
return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
|
|
2601
|
+
return K.polygon(t, o, e);
|
|
2602
|
+
}, n;
|
|
2603
|
+
}, "lean_right"), kt = /* @__PURE__ */ e(async (e, t) => {
|
|
2604
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2605
|
+
{
|
|
2606
|
+
x: 2 * a / 6,
|
|
2607
|
+
y: 0
|
|
2608
|
+
},
|
|
2609
|
+
{
|
|
2610
|
+
x: i + a / 6,
|
|
2611
|
+
y: 0
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
x: i - 2 * a / 6,
|
|
2615
|
+
y: -a
|
|
2616
|
+
},
|
|
2617
|
+
{
|
|
2618
|
+
x: -a / 6,
|
|
2619
|
+
y: -a
|
|
2620
|
+
}
|
|
2621
|
+
], s = Y(n, i, a, o);
|
|
2622
|
+
return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
|
|
2623
|
+
return K.polygon(t, o, e);
|
|
2624
|
+
}, n;
|
|
2625
|
+
}, "lean_left"), At = /* @__PURE__ */ e(async (e, t) => {
|
|
2626
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2627
|
+
{
|
|
2628
|
+
x: -2 * a / 6,
|
|
2629
|
+
y: 0
|
|
2630
|
+
},
|
|
2631
|
+
{
|
|
2632
|
+
x: i + 2 * a / 6,
|
|
2633
|
+
y: 0
|
|
2634
|
+
},
|
|
2635
|
+
{
|
|
2636
|
+
x: i - a / 6,
|
|
2637
|
+
y: -a
|
|
2638
|
+
},
|
|
2639
|
+
{
|
|
2640
|
+
x: a / 6,
|
|
2641
|
+
y: -a
|
|
2642
|
+
}
|
|
2643
|
+
], s = Y(n, i, a, o);
|
|
2644
|
+
return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
|
|
2645
|
+
return K.polygon(t, o, e);
|
|
2646
|
+
}, n;
|
|
2647
|
+
}, "trapezoid"), jt = /* @__PURE__ */ e(async (e, t) => {
|
|
2648
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2649
|
+
{
|
|
2650
|
+
x: a / 6,
|
|
2651
|
+
y: 0
|
|
2652
|
+
},
|
|
2653
|
+
{
|
|
2654
|
+
x: i - a / 6,
|
|
2655
|
+
y: 0
|
|
2656
|
+
},
|
|
2657
|
+
{
|
|
2658
|
+
x: i + 2 * a / 6,
|
|
2659
|
+
y: -a
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
x: -2 * a / 6,
|
|
2663
|
+
y: -a
|
|
2664
|
+
}
|
|
2665
|
+
], s = Y(n, i, a, o);
|
|
2666
|
+
return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
|
|
2667
|
+
return K.polygon(t, o, e);
|
|
2668
|
+
}, n;
|
|
2669
|
+
}, "inv_trapezoid"), Mt = /* @__PURE__ */ e(async (e, t) => {
|
|
2670
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2671
|
+
{
|
|
2672
|
+
x: 0,
|
|
2673
|
+
y: 0
|
|
2674
|
+
},
|
|
2675
|
+
{
|
|
2676
|
+
x: i + a / 2,
|
|
2677
|
+
y: 0
|
|
2678
|
+
},
|
|
2679
|
+
{
|
|
2680
|
+
x: i,
|
|
2681
|
+
y: -a / 2
|
|
2682
|
+
},
|
|
2683
|
+
{
|
|
2684
|
+
x: i + a / 2,
|
|
2685
|
+
y: -a
|
|
2686
|
+
},
|
|
2687
|
+
{
|
|
2688
|
+
x: 0,
|
|
2689
|
+
y: -a
|
|
2690
|
+
}
|
|
2691
|
+
], s = Y(n, i, a, o);
|
|
2692
|
+
return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
|
|
2693
|
+
return K.polygon(t, o, e);
|
|
2694
|
+
}, n;
|
|
2695
|
+
}, "rect_right_inv_arrow"), Nt = /* @__PURE__ */ e(async (e, t) => {
|
|
2696
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(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;
|
|
2697
|
+
return J(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) {
|
|
2698
|
+
let n = K.rect(t, e), r = n.x - t.x;
|
|
2699
|
+
if (a != 0 && (Math.abs(r) < t.width / 2 || Math.abs(r) == t.width / 2 && Math.abs(n.y - t.y) > t.height / 2 - o)) {
|
|
2700
|
+
let i = o * o * (1 - r * r / (a * a));
|
|
2701
|
+
i != 0 && (i = Math.sqrt(i)), i = o - i, e.y - t.y > 0 && (i = -i), n.y += i;
|
|
2702
|
+
}
|
|
2703
|
+
return n;
|
|
2704
|
+
}, n;
|
|
2705
|
+
}, "cylinder"), Pt = /* @__PURE__ */ e(async (e, n) => {
|
|
2706
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await q(e, 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;
|
|
2707
|
+
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) {
|
|
2708
|
+
let e = new Set(Object.keys(n.props));
|
|
2709
|
+
n.props.borders && (Z(o, n.props.borders, s, c), e.delete("borders")), e.forEach((e) => {
|
|
2710
|
+
t.warn(`Unknown node property ${e}`);
|
|
2711
|
+
});
|
|
2712
|
+
}
|
|
2713
|
+
return J(n, o), n.intersect = function(e) {
|
|
2714
|
+
return K.rect(n, e);
|
|
2715
|
+
}, r;
|
|
2716
|
+
}, "rect"), Ft = /* @__PURE__ */ e(async (e, n) => {
|
|
2717
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await q(e, 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;
|
|
2718
|
+
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) {
|
|
2719
|
+
let e = new Set(Object.keys(n.props));
|
|
2720
|
+
n.props.borders && (Z(o, n.props.borders, s, c), e.delete("borders")), e.forEach((e) => {
|
|
2721
|
+
t.warn(`Unknown node property ${e}`);
|
|
2722
|
+
});
|
|
2723
|
+
}
|
|
2724
|
+
return J(n, o), n.intersect = function(e) {
|
|
2725
|
+
return K.rect(n, e);
|
|
2726
|
+
}, r;
|
|
2727
|
+
}, "composite"), It = /* @__PURE__ */ e(async (e, n) => {
|
|
2728
|
+
let { shapeSvg: r } = await q(e, n, "label", !0);
|
|
2729
|
+
t.trace("Classes = ", n.class);
|
|
2730
|
+
let i = r.insert("rect", ":first-child");
|
|
2731
|
+
if (i.attr("width", 0).attr("height", 0), r.attr("class", "label edgeLabel"), n.props) {
|
|
2732
|
+
let e = new Set(Object.keys(n.props));
|
|
2733
|
+
n.props.borders && (Z(i, n.props.borders, 0, 0), e.delete("borders")), e.forEach((e) => {
|
|
2734
|
+
t.warn(`Unknown node property ${e}`);
|
|
2735
|
+
});
|
|
2736
|
+
}
|
|
2737
|
+
return J(n, i), n.intersect = function(e) {
|
|
2738
|
+
return K.rect(n, e);
|
|
2739
|
+
}, r;
|
|
2740
|
+
}, "labelRect");
|
|
2741
|
+
function Z(n, r, i, a) {
|
|
2742
|
+
let o = [], s = /* @__PURE__ */ e((e) => {
|
|
2743
|
+
o.push(e, 0);
|
|
2744
|
+
}, "addBorder"), c = /* @__PURE__ */ e((e) => {
|
|
2745
|
+
o.push(0, e);
|
|
2746
|
+
}, "skipBorder");
|
|
2747
|
+
r.includes("t") ? (t.debug("add top border"), s(i)) : c(i), r.includes("r") ? (t.debug("add right border"), s(a)) : c(a), r.includes("b") ? (t.debug("add bottom border"), s(i)) : c(i), r.includes("l") ? (t.debug("add left border"), s(a)) : c(a), n.attr("stroke-dasharray", o.join(" "));
|
|
2748
|
+
}
|
|
2749
|
+
e(Z, "applyNodePropertyBorders");
|
|
2750
|
+
var Lt = /* @__PURE__ */ e(async (e, r) => {
|
|
2751
|
+
let a;
|
|
2752
|
+
a = r.classes ? "node " + r.classes : "node default";
|
|
2753
|
+
let o = e.insert("g").attr("class", a).attr("id", r.domId || r.id), s = o.insert("rect", ":first-child"), c = o.insert("line"), l = o.insert("g").attr("class", "label"), d = r.labelText.flat ? r.labelText.flat() : r.labelText, f = "";
|
|
2754
|
+
f = typeof d == "object" ? d[0] : d, t.info("Label text abc79", f, d, typeof d == "object");
|
|
2755
|
+
let p = await U(l, f, r.labelStyle, !0, !0), m = {
|
|
2756
|
+
width: 0,
|
|
2757
|
+
height: 0
|
|
2758
|
+
};
|
|
2759
|
+
if (i(u())) {
|
|
2760
|
+
let e = p.children[0], t = n(p);
|
|
2761
|
+
m = e.getBoundingClientRect(), t.attr("width", m.width), t.attr("height", m.height);
|
|
2762
|
+
}
|
|
2763
|
+
t.info("Text 2", d);
|
|
2764
|
+
let h = d.slice(1, d.length), g = p.getBBox(), _ = await U(l, h.join ? h.join("<br/>") : h, r.labelStyle, !0, !0);
|
|
2765
|
+
if (i(u())) {
|
|
2766
|
+
let e = _.children[0], t = n(_);
|
|
2767
|
+
m = e.getBoundingClientRect(), t.attr("width", m.width), t.attr("height", m.height);
|
|
2768
|
+
}
|
|
2769
|
+
let v = r.padding / 2;
|
|
2770
|
+
return n(_).attr("transform", "translate( " + (m.width > g.width ? 0 : (g.width - m.width) / 2) + ", " + (g.height + v + 5) + ")"), n(p).attr("transform", "translate( " + (m.width < g.width ? 0 : -(g.width - m.width) / 2) + ", 0)"), m = l.node().getBBox(), l.attr("transform", "translate(" + -m.width / 2 + ", " + (-m.height / 2 - v + 3) + ")"), s.attr("class", "outer title-state").attr("x", -m.width / 2 - v).attr("y", -m.height / 2 - v).attr("width", m.width + r.padding).attr("height", m.height + r.padding), c.attr("class", "divider").attr("x1", -m.width / 2 - v).attr("x2", m.width / 2 + v).attr("y1", -m.height / 2 - v + g.height + v).attr("y2", -m.height / 2 - v + g.height + v), J(r, s), r.intersect = function(e) {
|
|
2771
|
+
return K.rect(r, e);
|
|
2772
|
+
}, o;
|
|
2773
|
+
}, "rectWithTitle"), Rt = /* @__PURE__ */ e(async (e, t) => {
|
|
2774
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.height + t.padding, a = r.width + i / 4 + t.padding;
|
|
2775
|
+
return J(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) {
|
|
2776
|
+
return K.rect(t, e);
|
|
2777
|
+
}, n;
|
|
2778
|
+
}, "stadium"), zt = /* @__PURE__ */ e(async (e, n) => {
|
|
2779
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await q(e, n, X(n, void 0), !0), o = r.insert("circle", ":first-child");
|
|
2780
|
+
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), t.info("Circle main"), J(n, o), n.intersect = function(e) {
|
|
2781
|
+
return t.info("Circle intersect", n, i.width / 2 + a, e), K.circle(n, i.width / 2 + a, e);
|
|
2782
|
+
}, r;
|
|
2783
|
+
}, "circle"), Bt = /* @__PURE__ */ e(async (e, n) => {
|
|
2784
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await q(e, n, X(n, void 0), !0), o = r.insert("g", ":first-child"), s = o.insert("circle"), c = o.insert("circle");
|
|
2785
|
+
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), t.info("DoubleCircle main"), J(n, s), n.intersect = function(e) {
|
|
2786
|
+
return t.info("DoubleCircle intersect", n, i.width / 2 + a + 5, e), K.circle(n, i.width / 2 + a + 5, e);
|
|
2787
|
+
}, r;
|
|
2788
|
+
}, "doublecircle"), Vt = /* @__PURE__ */ e(async (e, t) => {
|
|
2789
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2790
|
+
{
|
|
2791
|
+
x: 0,
|
|
2792
|
+
y: 0
|
|
2793
|
+
},
|
|
2794
|
+
{
|
|
2795
|
+
x: i,
|
|
2796
|
+
y: 0
|
|
2797
|
+
},
|
|
2798
|
+
{
|
|
2799
|
+
x: i,
|
|
2800
|
+
y: -a
|
|
2801
|
+
},
|
|
2802
|
+
{
|
|
2803
|
+
x: 0,
|
|
2804
|
+
y: -a
|
|
2805
|
+
},
|
|
2806
|
+
{
|
|
2807
|
+
x: 0,
|
|
2808
|
+
y: 0
|
|
2809
|
+
},
|
|
2810
|
+
{
|
|
2811
|
+
x: -8,
|
|
2812
|
+
y: 0
|
|
2813
|
+
},
|
|
2814
|
+
{
|
|
2815
|
+
x: i + 8,
|
|
2816
|
+
y: 0
|
|
2817
|
+
},
|
|
2818
|
+
{
|
|
2819
|
+
x: i + 8,
|
|
2820
|
+
y: -a
|
|
2821
|
+
},
|
|
2822
|
+
{
|
|
2823
|
+
x: -8,
|
|
2824
|
+
y: -a
|
|
2825
|
+
},
|
|
2826
|
+
{
|
|
2827
|
+
x: -8,
|
|
2828
|
+
y: 0
|
|
2829
|
+
}
|
|
2830
|
+
], s = Y(n, i, a, o);
|
|
2831
|
+
return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
|
|
2832
|
+
return K.polygon(t, o, e);
|
|
2833
|
+
}, n;
|
|
2834
|
+
}, "subroutine"), Ht = /* @__PURE__ */ e((e, t) => {
|
|
2835
|
+
let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child");
|
|
2836
|
+
return r.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), J(t, r), t.intersect = function(e) {
|
|
2837
|
+
return K.circle(t, 7, e);
|
|
2838
|
+
}, n;
|
|
2839
|
+
}, "start"), Ut = /* @__PURE__ */ e((e, t, n) => {
|
|
2840
|
+
let r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 70, a = 10;
|
|
2841
|
+
return n === "LR" && (i = 10, a = 70), J(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) {
|
|
2842
|
+
return K.rect(t, e);
|
|
2843
|
+
}, r;
|
|
2844
|
+
}, "forkJoin"), Wt = {
|
|
2845
|
+
rhombus: Ct,
|
|
2846
|
+
composite: Ft,
|
|
2847
|
+
question: Ct,
|
|
2848
|
+
rect: Pt,
|
|
2849
|
+
labelRect: It,
|
|
2850
|
+
rectWithTitle: Lt,
|
|
2851
|
+
choice: wt,
|
|
2852
|
+
circle: zt,
|
|
2853
|
+
doublecircle: Bt,
|
|
2854
|
+
stadium: Rt,
|
|
2855
|
+
hexagon: Tt,
|
|
2856
|
+
block_arrow: Et,
|
|
2857
|
+
rect_left_inv_arrow: Dt,
|
|
2858
|
+
lean_right: Ot,
|
|
2859
|
+
lean_left: kt,
|
|
2860
|
+
trapezoid: At,
|
|
2861
|
+
inv_trapezoid: jt,
|
|
2862
|
+
rect_right_inv_arrow: Mt,
|
|
2863
|
+
cylinder: Nt,
|
|
2864
|
+
start: Ht,
|
|
2865
|
+
end: /* @__PURE__ */ e((e, t) => {
|
|
2866
|
+
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");
|
|
2867
|
+
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), J(t, i), t.intersect = function(e) {
|
|
2868
|
+
return K.circle(t, 7, e);
|
|
2869
|
+
}, n;
|
|
2870
|
+
}, "end"),
|
|
2871
|
+
note: xt,
|
|
2872
|
+
subroutine: Vt,
|
|
2873
|
+
fork: Ut,
|
|
2874
|
+
join: Ut,
|
|
2875
|
+
class_box: /* @__PURE__ */ e(async (e, t) => {
|
|
2876
|
+
let r = t.padding / 2, a;
|
|
2877
|
+
a = t.classes ? "node " + t.classes : "node default";
|
|
2878
|
+
let o = e.insert("g").attr("class", a).attr("id", t.domId || t.id), s = o.insert("rect", ":first-child"), c = o.insert("line"), l = o.insert("line"), d = 0, f = 4, p = o.insert("g").attr("class", "label"), m = 0, h = t.classData.annotations?.[0], g = await U(p, t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", t.labelStyle, !0, !0), _ = g.getBBox();
|
|
2879
|
+
if (i(u())) {
|
|
2880
|
+
let e = g.children[0], t = n(g);
|
|
2881
|
+
_ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
|
|
2882
|
+
}
|
|
2883
|
+
t.classData.annotations[0] && (f += _.height + 4, d += _.width);
|
|
2884
|
+
let v = t.classData.label;
|
|
2885
|
+
t.classData.type !== void 0 && t.classData.type !== "" && (i(u()) ? v += "<" + t.classData.type + ">" : v += "<" + t.classData.type + ">");
|
|
2886
|
+
let y = await U(p, v, t.labelStyle, !0, !0);
|
|
2887
|
+
n(y).attr("class", "classTitle");
|
|
2888
|
+
let b = y.getBBox();
|
|
2889
|
+
if (i(u())) {
|
|
2890
|
+
let e = y.children[0], t = n(y);
|
|
2891
|
+
b = e.getBoundingClientRect(), t.attr("width", b.width), t.attr("height", b.height);
|
|
2892
|
+
}
|
|
2893
|
+
f += b.height + 4, b.width > d && (d = b.width);
|
|
2894
|
+
let x = [];
|
|
2895
|
+
t.classData.members.forEach(async (e) => {
|
|
2896
|
+
let r = e.getDisplayDetails(), a = r.displayText;
|
|
2897
|
+
i(u()) && (a = a.replace(/</g, "<").replace(/>/g, ">"));
|
|
2898
|
+
let o = await U(p, a, r.cssStyle ? r.cssStyle : t.labelStyle, !0, !0), s = o.getBBox();
|
|
2899
|
+
if (i(u())) {
|
|
2900
|
+
let e = o.children[0], t = n(o);
|
|
2901
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
2902
|
+
}
|
|
2903
|
+
s.width > d && (d = s.width), f += s.height + 4, x.push(o);
|
|
2904
|
+
}), f += 8;
|
|
2905
|
+
let S = [];
|
|
2906
|
+
if (t.classData.methods.forEach(async (e) => {
|
|
2907
|
+
let r = e.getDisplayDetails(), a = r.displayText;
|
|
2908
|
+
i(u()) && (a = a.replace(/</g, "<").replace(/>/g, ">"));
|
|
2909
|
+
let o = await U(p, a, r.cssStyle ? r.cssStyle : t.labelStyle, !0, !0), s = o.getBBox();
|
|
2910
|
+
if (i(u())) {
|
|
2911
|
+
let e = o.children[0], t = n(o);
|
|
2912
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
2913
|
+
}
|
|
2914
|
+
s.width > d && (d = s.width), f += s.height + 4, S.push(o);
|
|
2915
|
+
}), f += 8, h) {
|
|
2916
|
+
let e = (d - _.width) / 2;
|
|
2917
|
+
n(g).attr("transform", "translate( " + (-1 * d / 2 + e) + ", " + -1 * f / 2 + ")"), m = _.height + 4;
|
|
2918
|
+
}
|
|
2919
|
+
let C = (d - b.width) / 2;
|
|
2920
|
+
return n(y).attr("transform", "translate( " + (-1 * d / 2 + C) + ", " + (-1 * f / 2 + m) + ")"), m += b.height + 4, c.attr("class", "divider").attr("x1", -d / 2 - r).attr("x2", d / 2 + r).attr("y1", -f / 2 - r + 8 + m).attr("y2", -f / 2 - r + 8 + m), m += 8, x.forEach((e) => {
|
|
2921
|
+
n(e).attr("transform", "translate( " + -d / 2 + ", " + (-1 * f / 2 + m + 8 / 2) + ")");
|
|
2922
|
+
let t = e?.getBBox();
|
|
2923
|
+
m += (t?.height ?? 0) + 4;
|
|
2924
|
+
}), m += 8, l.attr("class", "divider").attr("x1", -d / 2 - r).attr("x2", d / 2 + r).attr("y1", -f / 2 - r + 8 + m).attr("y2", -f / 2 - r + 8 + m), m += 8, S.forEach((e) => {
|
|
2925
|
+
n(e).attr("transform", "translate( " + -d / 2 + ", " + (-1 * f / 2 + m) + ")");
|
|
2926
|
+
let t = e?.getBBox();
|
|
2927
|
+
m += (t?.height ?? 0) + 4;
|
|
2928
|
+
}), s.attr("style", t.style).attr("class", "outer title-state").attr("x", -d / 2 - r).attr("y", -(f / 2) - r).attr("width", d + t.padding).attr("height", f + t.padding), J(t, s), t.intersect = function(e) {
|
|
2929
|
+
return K.rect(t, e);
|
|
2930
|
+
}, o;
|
|
2931
|
+
}, "class_box")
|
|
2932
|
+
}, Q = {}, Gt = /* @__PURE__ */ e(async (e, t, n) => {
|
|
2933
|
+
let r, i;
|
|
2934
|
+
if (t.link) {
|
|
2935
|
+
let a;
|
|
2936
|
+
u().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 Wt[t.shape](r, t, n);
|
|
2937
|
+
} else i = await Wt[t.shape](e, t, n), r = i;
|
|
2938
|
+
return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), Q[t.id] = r, t.haveCallback && Q[t.id].attr("class", Q[t.id].attr("class") + " clickable"), r;
|
|
2939
|
+
}, "insertNode"), Kt = /* @__PURE__ */ e((e) => {
|
|
2940
|
+
let n = Q[e.id];
|
|
2941
|
+
t.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
|
|
2942
|
+
let r = e.diff || 0;
|
|
2943
|
+
return e.clusterNode ? n.attr("transform", "translate(" + (e.x + r - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : n.attr("transform", "translate(" + e.x + ", " + e.y + ")"), r;
|
|
2944
|
+
}, "positionNode");
|
|
2945
|
+
function qt(e, t, n = !1) {
|
|
2946
|
+
let r = e, i = "default";
|
|
2947
|
+
(r?.classes?.length || 0) > 0 && (i = (r?.classes ?? []).join(" ")), i += " flowchart-label";
|
|
2948
|
+
let a = 0, s = "", c;
|
|
2949
|
+
switch (r.type) {
|
|
2950
|
+
case "round":
|
|
2951
|
+
a = 5, s = "rect";
|
|
2952
|
+
break;
|
|
2953
|
+
case "composite":
|
|
2954
|
+
a = 0, s = "composite", c = 0;
|
|
2955
|
+
break;
|
|
2956
|
+
case "square":
|
|
2957
|
+
s = "rect";
|
|
2958
|
+
break;
|
|
2959
|
+
case "diamond":
|
|
2960
|
+
s = "question";
|
|
2961
|
+
break;
|
|
2962
|
+
case "hexagon":
|
|
2963
|
+
s = "hexagon";
|
|
2964
|
+
break;
|
|
2965
|
+
case "block_arrow":
|
|
2966
|
+
s = "block_arrow";
|
|
2967
|
+
break;
|
|
2968
|
+
case "odd":
|
|
2969
|
+
s = "rect_left_inv_arrow";
|
|
2970
|
+
break;
|
|
2971
|
+
case "lean_right":
|
|
2972
|
+
s = "lean_right";
|
|
2973
|
+
break;
|
|
2974
|
+
case "lean_left":
|
|
2975
|
+
s = "lean_left";
|
|
2976
|
+
break;
|
|
2977
|
+
case "trapezoid":
|
|
2978
|
+
s = "trapezoid";
|
|
2979
|
+
break;
|
|
2980
|
+
case "inv_trapezoid":
|
|
2981
|
+
s = "inv_trapezoid";
|
|
2982
|
+
break;
|
|
2983
|
+
case "rect_left_inv_arrow":
|
|
2984
|
+
s = "rect_left_inv_arrow";
|
|
2985
|
+
break;
|
|
2986
|
+
case "circle":
|
|
2987
|
+
s = "circle";
|
|
2988
|
+
break;
|
|
2989
|
+
case "ellipse":
|
|
2990
|
+
s = "ellipse";
|
|
2991
|
+
break;
|
|
2992
|
+
case "stadium":
|
|
2993
|
+
s = "stadium";
|
|
2994
|
+
break;
|
|
2995
|
+
case "subroutine":
|
|
2996
|
+
s = "subroutine";
|
|
2997
|
+
break;
|
|
2998
|
+
case "cylinder":
|
|
2999
|
+
s = "cylinder";
|
|
3000
|
+
break;
|
|
3001
|
+
case "group":
|
|
3002
|
+
s = "rect";
|
|
3003
|
+
break;
|
|
3004
|
+
case "doublecircle":
|
|
3005
|
+
s = "doublecircle";
|
|
3006
|
+
break;
|
|
3007
|
+
default: s = "rect";
|
|
3008
|
+
}
|
|
3009
|
+
let l = ie(r?.styles ?? []), u = r.label, d = r.size ?? {
|
|
3010
|
+
width: 0,
|
|
3011
|
+
height: 0,
|
|
3012
|
+
x: 0,
|
|
3013
|
+
y: 0
|
|
3014
|
+
}, f = t.getDiagramId();
|
|
3015
|
+
return {
|
|
3016
|
+
labelStyle: l.labelStyle,
|
|
3017
|
+
shape: s,
|
|
3018
|
+
labelText: u,
|
|
3019
|
+
rx: a,
|
|
3020
|
+
ry: a,
|
|
3021
|
+
class: i,
|
|
3022
|
+
style: l.style,
|
|
3023
|
+
id: r.id,
|
|
3024
|
+
domId: f ? `${f}-${r.id}` : r.id,
|
|
3025
|
+
directions: r.directions,
|
|
3026
|
+
width: d.width,
|
|
3027
|
+
height: d.height,
|
|
3028
|
+
x: d.x,
|
|
3029
|
+
y: d.y,
|
|
3030
|
+
positioned: n,
|
|
3031
|
+
intersect: void 0,
|
|
3032
|
+
type: r.type,
|
|
3033
|
+
padding: c ?? o()?.block?.padding ?? 0,
|
|
3034
|
+
widthInColumns: r.widthInColumns ?? 1
|
|
3035
|
+
};
|
|
3036
|
+
}
|
|
3037
|
+
e(qt, "getNodeFromBlock");
|
|
3038
|
+
async function Jt(e, t, n) {
|
|
3039
|
+
let r = qt(t, n, !1);
|
|
3040
|
+
if (r.type === "group") return;
|
|
3041
|
+
let i = await Gt(e, r, { config: o() }), a = i.node().getBBox(), s = n.getBlock(r.id);
|
|
3042
|
+
s.size = {
|
|
3043
|
+
width: a.width,
|
|
3044
|
+
height: a.height,
|
|
3045
|
+
x: 0,
|
|
3046
|
+
y: 0,
|
|
3047
|
+
node: i
|
|
3048
|
+
}, n.setBlock(s), i.remove();
|
|
3049
|
+
}
|
|
3050
|
+
e(Jt, "calculateBlockSize");
|
|
3051
|
+
async function Yt(e, t, n) {
|
|
3052
|
+
let r = qt(t, n, !0);
|
|
3053
|
+
n.getBlock(r.id).type !== "space" && (await Gt(e, r, { config: o() }), t.intersect = r?.intersect, Kt(r));
|
|
3054
|
+
}
|
|
3055
|
+
e(Yt, "insertBlockPositioned");
|
|
3056
|
+
async function $(e, t, n, r) {
|
|
3057
|
+
for (let i of t) await r(e, i, n), i.children && await $(e, i.children, n, r);
|
|
3058
|
+
}
|
|
3059
|
+
e($, "performOperations");
|
|
3060
|
+
async function Xt(e, t, n) {
|
|
3061
|
+
await $(e, t, n, Jt);
|
|
3062
|
+
}
|
|
3063
|
+
e(Xt, "calculateBlockSizes");
|
|
3064
|
+
async function Zt(e, t, n) {
|
|
3065
|
+
await $(e, t, n, Yt);
|
|
3066
|
+
}
|
|
3067
|
+
e(Zt, "insertBlocks");
|
|
3068
|
+
async function Qt(e, t, n, r, i) {
|
|
3069
|
+
let a = new pe({
|
|
3070
|
+
multigraph: !0,
|
|
3071
|
+
compound: !0
|
|
3072
|
+
});
|
|
3073
|
+
a.setGraph({
|
|
3074
|
+
rankdir: "TB",
|
|
3075
|
+
nodesep: 10,
|
|
3076
|
+
ranksep: 10,
|
|
3077
|
+
marginx: 8,
|
|
3078
|
+
marginy: 8
|
|
3079
|
+
});
|
|
3080
|
+
for (let e of n) e.size && a.setNode(e.id, {
|
|
3081
|
+
width: e.size.width,
|
|
3082
|
+
height: e.size.height,
|
|
3083
|
+
intersect: e.intersect
|
|
3084
|
+
});
|
|
3085
|
+
for (let n of t) if (n.start && n.end) {
|
|
3086
|
+
let t = r.getBlock(n.start), o = r.getBlock(n.end);
|
|
3087
|
+
if (t?.size && o?.size) {
|
|
3088
|
+
let r = t.size, s = o.size, c = [
|
|
3089
|
+
{
|
|
3090
|
+
x: r.x,
|
|
3091
|
+
y: r.y
|
|
3092
|
+
},
|
|
3093
|
+
{
|
|
3094
|
+
x: r.x + (s.x - r.x) / 2,
|
|
3095
|
+
y: r.y + (s.y - r.y) / 2
|
|
3096
|
+
},
|
|
3097
|
+
{
|
|
3098
|
+
x: s.x,
|
|
3099
|
+
y: s.y
|
|
3100
|
+
}
|
|
3101
|
+
], l = i ? `${i}-${n.id}` : n.id, u = `${n.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal"} ${n.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;
|
|
3102
|
+
st(e, {
|
|
3103
|
+
v: n.start,
|
|
3104
|
+
w: n.end,
|
|
3105
|
+
name: l
|
|
3106
|
+
}, {
|
|
3107
|
+
...n,
|
|
3108
|
+
id: l,
|
|
3109
|
+
arrowTypeEnd: n.arrowTypeEnd,
|
|
3110
|
+
arrowTypeStart: n.arrowTypeStart,
|
|
3111
|
+
points: c,
|
|
3112
|
+
classes: u
|
|
3113
|
+
}, void 0, "block", a, i), n.label && (await nt(e, {
|
|
3114
|
+
...n,
|
|
3115
|
+
label: n.label,
|
|
3116
|
+
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
3117
|
+
arrowTypeEnd: n.arrowTypeEnd,
|
|
3118
|
+
arrowTypeStart: n.arrowTypeStart,
|
|
3119
|
+
points: c,
|
|
3120
|
+
classes: u
|
|
3121
|
+
}), rt({
|
|
3122
|
+
...n,
|
|
3123
|
+
x: c[1].x,
|
|
3124
|
+
y: c[1].y
|
|
3125
|
+
}, { originalPath: c }));
|
|
3126
|
+
}
|
|
3127
|
+
}
|
|
3128
|
+
}
|
|
3129
|
+
e(Qt, "insertEdges");
|
|
3130
|
+
var $t = {
|
|
3131
|
+
parser: Se,
|
|
3132
|
+
db: We,
|
|
3133
|
+
renderer: {
|
|
3134
|
+
draw: /* @__PURE__ */ e(async function(e, r, i, a) {
|
|
3135
|
+
let { securityLevel: c, block: l } = o(), u = a.db;
|
|
3136
|
+
u.setDiagramId(r);
|
|
3137
|
+
let d;
|
|
3138
|
+
c === "sandbox" && (d = n("#i" + r));
|
|
3139
|
+
let f = n(c === "sandbox" ? d.nodes()[0].contentDocument.body : "body"), p = c === "sandbox" ? f.select(`[id="${r}"]`) : n(`[id="${r}"]`);
|
|
3140
|
+
Je(p, [
|
|
3141
|
+
"point",
|
|
3142
|
+
"circle",
|
|
3143
|
+
"cross"
|
|
3144
|
+
], a.type, r);
|
|
3145
|
+
let m = u.getBlocks(), h = u.getBlocksFlat(), g = u.getEdges(), _ = p.insert("g").attr("class", "block");
|
|
3146
|
+
await Xt(_, m, u);
|
|
3147
|
+
let v = Ze(u);
|
|
3148
|
+
if (await Zt(_, m, u), await Qt(_, g, h, u, r), v) {
|
|
3149
|
+
let e = v, n = Math.max(1, Math.round(.125 * (e.width / e.height))), r = e.height + n + 10, i = e.width + 10, { useMaxWidth: a } = l;
|
|
3150
|
+
s(p, r, i, !!a), t.debug("Here Bounds", v, e), p.attr("viewBox", `${e.x - 5} ${e.y - 5} ${e.width + 10} ${e.height + 10}`);
|
|
3151
|
+
}
|
|
3152
|
+
}, "draw"),
|
|
3153
|
+
getClasses: /* @__PURE__ */ e(function(e, t) {
|
|
3154
|
+
return t.db.getClasses();
|
|
3155
|
+
}, "getClasses")
|
|
3156
|
+
},
|
|
3157
|
+
styles: Ge
|
|
3158
|
+
};
|
|
3159
|
+
//#endregion
|
|
3160
|
+
export { $t as diagram };
|