@marimo-team/islands 0.12.1-dev2 → 0.12.1-dev21

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.
Files changed (92) hide show
  1. package/dist/{ConnectedDataExplorerComponent-BUkHSSQ3.js → ConnectedDataExplorerComponent-DNQoDjFe.js} +8 -8
  2. package/dist/{VegaLite-D2gsHKuf.js → VegaLite-C61XFnJy.js} +2456 -2455
  3. package/dist/{_baseUniq-CGdEI3Nv.js → _baseUniq-BVJ8xAuG.js} +1 -1
  4. package/dist/{any-language-editor-CKyudq2-.js → any-language-editor-OJReD1ph.js} +176 -177
  5. package/dist/architectureDiagram-IEHRJDOE-C5szj5L-.js +4634 -0
  6. package/dist/assets/{save-worker-J2nVA3vw.js → save-worker-CYdkP5Ic.js} +5 -5
  7. package/dist/assets/{worker-6ypxTHEH.js → worker-CH7zxkMA.js} +5 -5
  8. package/dist/assets/{worker-0hM8VAjI.js → worker-DEw2ZetQ.js} +5 -5
  9. package/dist/{blockDiagram-ZHA2E4KO-BlCDChLH.js → blockDiagram-JOT3LUYC-6huJKNk4.js} +4 -4
  10. package/dist/{c4Diagram-6F5ED5ID-niLscHfK.js → c4Diagram-VJAJSXHY-DLdlB4_f.js} +2 -2
  11. package/dist/{channel-Bt8mGm9q.js → channel-C4MpN-FJ.js} +1 -1
  12. package/dist/{chunk-TMUBEWPD-CQLP9BEl.js → chunk-4BMEZGHF-CczBKfna.js} +1 -1
  13. package/dist/chunk-A2AXSNBT-BsMPztSQ.js +1372 -0
  14. package/dist/chunk-AEK57VVT-B6c3n8K2.js +1415 -0
  15. package/dist/{chunk-ASOPGD6M-DCxLLtgf.js → chunk-D6G4REZN-X8xBS5rG.js} +1 -1
  16. package/dist/{chunk-5HRBRIJM-DjjlC6eW.js → chunk-RZ5BOZE2-CUqnF2K6.js} +1 -1
  17. package/dist/{chunk-KFBOBJHC-DPkQurpv.js → chunk-XZIHB7SX-CSouwcyb.js} +1 -1
  18. package/dist/classDiagram-GIVACNV2-CG_R_HQh.js +16 -0
  19. package/dist/classDiagram-v2-COTLJTTW-CG_R_HQh.js +16 -0
  20. package/dist/{clike-BLr83cjT.js → clike-BUuHEmgZ.js} +19 -17
  21. package/dist/{clone-COI_V4qE.js → clone-DK3J-MiR.js} +1 -1
  22. package/dist/{dagre-4EVJKHTY-DPsWdzds.js → dagre-OKDRZEBW-D8zhCeNW.js} +46 -46
  23. package/dist/{data-editor-D2rMsHxb.js → data-editor-BHWBseKi.js} +27 -22
  24. package/dist/diagram-SSKATNLV-pHZ4gvQ1.js +221 -0
  25. package/dist/{diagram-QW4FP2JN-D4dzrYii.js → diagram-VNBRO52H-D5_43LWo.js} +28 -28
  26. package/dist/{dockerfile-CFG_IPGn.js → dockerfile-DIy8NleC.js} +1 -1
  27. package/dist/erDiagram-Q7BY3M3F-CqUXZyK-.js +841 -0
  28. package/dist/{factor-DJHfQ4a1.js → factor-DDOC7X6P.js} +1 -1
  29. package/dist/flowDiagram-4HSFHLVR-DwhP_PW-.js +1622 -0
  30. package/dist/ganttDiagram-APWFNJXF-Coo7g8mK.js +1681 -0
  31. package/dist/{gitGraphDiagram-NRZ2UAAF-CO9Yfk-1.js → gitGraphDiagram-7IBYFJ6S-CJM5LDZc.js} +55 -55
  32. package/dist/{graph-j21MX5m5.js → graph-DXseY-wc.js} +3 -3
  33. package/dist/{groovy-CdgvOO23.js → groovy-DZeT_VM-.js} +1 -1
  34. package/dist/{index-DwhNQhNY.js → index-B-lvhTmE.js} +1 -1
  35. package/dist/{index-CZoype9l.js → index-B4nMPVvH.js} +1 -1
  36. package/dist/{index-C-FP0asF.js → index-BJcH72DF.js} +1 -1
  37. package/dist/{index-DATq7mzH.js → index-BUjAylGO.js} +1 -1
  38. package/dist/{index-CNYIP8n0.js → index-BeNQgFqm.js} +1 -1
  39. package/dist/{index-CqtUFj8g.js → index-BfQvDHaW.js} +1 -1
  40. package/dist/{index-D83p58Zi.js → index-BnGDaicg.js} +1 -1
  41. package/dist/{index-CxqVUOhW.js → index-C2ispfH7.js} +1 -1
  42. package/dist/{index-Cr0IVnKP.js → index-C31uOHRg.js} +3 -3
  43. package/dist/{index-4YXC3aOd.js → index-CwJWNsd3.js} +1 -1
  44. package/dist/{index-Wlh2yRsy.js → index-DC3Cnx5t.js} +1 -1
  45. package/dist/{index-_v--1fvH.js → index-DCcdmTNw.js} +1 -1
  46. package/dist/{index-Ec1JnxMr.js → index-DMfwuBgb.js} +1 -1
  47. package/dist/{index-VZAogpU3.js → index-DWPlo8vh.js} +1 -1
  48. package/dist/{index-B8argTgS.js → index-DYFTJIXf.js} +1 -1
  49. package/dist/{infoDiagram-A4XQUW5V-D6HtVB0K.js → infoDiagram-PH2N3AL5-CAFARnGi.js} +5 -5
  50. package/dist/{journeyDiagram-G5WM74LC-DMj7UaUs.js → journeyDiagram-U35MCT3I-CxCG-gu9.js} +34 -35
  51. package/dist/{kanban-definition-QRCXZQQD-C9sAvwvv.js → kanban-definition-NDS4AKOZ-DXWk4fBs.js} +26 -25
  52. package/dist/{layout-DnpJ8ssh.js → layout-DCbiAC-B.js} +4 -4
  53. package/dist/{linear-C7S_zUSg.js → linear-C-BjrWtA.js} +1 -1
  54. package/dist/{main-jjvPwD9F.js → main-VRYALaFR.js} +31084 -30575
  55. package/dist/main.js +1 -1
  56. package/dist/mermaid-3srgUkji.js +11991 -0
  57. package/dist/{min-DNi_26db.js → min-C6jNU-8q.js} +2 -2
  58. package/dist/{mindmap-definition-GWI6TPTV-Bbg64FAI.js → mindmap-definition-ALO5MXBD-ItSGCYxS.js} +3 -2
  59. package/dist/{nsis-BtA0qkjU.js → nsis-fePjrhq7.js} +1 -1
  60. package/dist/{pascal-ixanSKUz.js → pascal-De0D6mP7.js} +1 -1
  61. package/dist/{pieDiagram-YF2LJOPJ-Cr3o9epk.js → pieDiagram-IB7DONF6-DvX9YZO3.js} +38 -38
  62. package/dist/{quadrantDiagram-OS5C2QUG-CTdokV-X.js → quadrantDiagram-7GDLP6J5-BbXv1kiZ.js} +2 -2
  63. package/dist/{gitGraph-YCYPL57B-C6vjpJLv.js → radar-MK3ICKWK-Chc5umY2.js} +3259 -2897
  64. package/dist/{react-plotly-D7fFNQUF.js → react-plotly--Re2eJt2.js} +1 -1
  65. package/dist/requirementDiagram-KVF5MWMF-0r_3Jc_R.js +851 -0
  66. package/dist/{sankeyDiagram-Y46BX6SQ-CtGs7dt9.js → sankeyDiagram-QLVOVGJD-eycVAOR9.js} +152 -149
  67. package/dist/sequenceDiagram-X6HHIX6F-DQpYFs9_.js +2281 -0
  68. package/dist/{simple-mode-HGTvdazT.js → simple-mode-B0dvCdAA.js} +15 -14
  69. package/dist/slides-component-BM71y3QA.js +3782 -0
  70. package/dist/{stateDiagram-MAYHULR4-HCOwrhPJ.js → stateDiagram-DGXRK772--5awulBB.js} +41 -39
  71. package/dist/stateDiagram-v2-YXO3MK2T-CrxS4RqA.js +16 -0
  72. package/dist/style.css +1 -1
  73. package/dist/{time-Cf454IRV.js → time-aNhcx3m7.js} +2 -2
  74. package/dist/{timeline-definition-U7ZMHBDA-AcXJneLr.js → timeline-definition-BDJGKUSR-D5qQYaXU.js} +25 -25
  75. package/dist/{vega-component-DN01b8IT.js → vega-component-IC6ZSnx9.js} +2 -2
  76. package/dist/{xquery-xQxle02u.js → xquery-BUQdORAS.js} +72 -76
  77. package/dist/{xychartDiagram-6QU3TZC5-B3SwzwIL.js → xychartDiagram-VJFVF3MP-Ceb_sCs0.js} +11 -11
  78. package/package.json +25 -23
  79. package/dist/architectureDiagram-UYN6MBPD-C8FCwy4e.js +0 -4595
  80. package/dist/chunk-7U56Z5CX-D1T9hvBU.js +0 -1215
  81. package/dist/chunk-T2TOU4HS-DcM_xxju.js +0 -1303
  82. package/dist/classDiagram-LNE6IOMH-XbDq3sOW.js +0 -14
  83. package/dist/classDiagram-v2-MQ7JQ4JX-XbDq3sOW.js +0 -14
  84. package/dist/erDiagram-6RL3IURR-13ULGiOU.js +0 -938
  85. package/dist/flowDiagram-7ASYPVHJ-CMtLojGE.js +0 -1484
  86. package/dist/ganttDiagram-NTVNEXSI-Crv4rrPG.js +0 -1679
  87. package/dist/mermaid-BwpuxK20.js +0 -12937
  88. package/dist/requirementDiagram-MIRIMTAZ-Bz15K_7J.js +0 -769
  89. package/dist/sequenceDiagram-G6AWOVSC-D0hnYjDZ.js +0 -2274
  90. package/dist/slides-component-DM7nuuqG.js +0 -3776
  91. package/dist/stateDiagram-v2-4JROLMXI-Cj6uqksM.js +0 -14
  92. package/dist/stex-92raWT1r.js +0 -129
@@ -1,938 +0,0 @@
1
- import { _ as u, o as kt, p as xt, g as Rt, s as Ot, a as bt, b as Nt, c as U, l as X, d as at, u as Tt, e as At, x as Mt, Q as vt } from "./mermaid-BwpuxK20.js";
2
- import { G as St } from "./graph-j21MX5m5.js";
3
- import { l as wt } from "./layout-DnpJ8ssh.js";
4
- import { l as It, k as Dt } from "./timer-ly3uOrxC.js";
5
- const Lt = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
6
- function Bt(t) {
7
- return typeof t == "string" && Lt.test(t);
8
- }
9
- const v = [];
10
- for (let t = 0; t < 256; ++t)
11
- v.push((t + 256).toString(16).slice(1));
12
- function Ct(t, e = 0) {
13
- return v[t[e + 0]] + v[t[e + 1]] + v[t[e + 2]] + v[t[e + 3]] + "-" + v[t[e + 4]] + v[t[e + 5]] + "-" + v[t[e + 6]] + v[t[e + 7]] + "-" + v[t[e + 8]] + v[t[e + 9]] + "-" + v[t[e + 10]] + v[t[e + 11]] + v[t[e + 12]] + v[t[e + 13]] + v[t[e + 14]] + v[t[e + 15]];
14
- }
15
- function Pt(t) {
16
- if (!Bt(t))
17
- throw TypeError("Invalid UUID");
18
- let e;
19
- const r = new Uint8Array(16);
20
- return r[0] = (e = parseInt(t.slice(0, 8), 16)) >>> 24, r[1] = e >>> 16 & 255, r[2] = e >>> 8 & 255, r[3] = e & 255, r[4] = (e = parseInt(t.slice(9, 13), 16)) >>> 8, r[5] = e & 255, r[6] = (e = parseInt(t.slice(14, 18), 16)) >>> 8, r[7] = e & 255, r[8] = (e = parseInt(t.slice(19, 23), 16)) >>> 8, r[9] = e & 255, r[10] = (e = parseInt(t.slice(24, 36), 16)) / 1099511627776 & 255, r[11] = e / 4294967296 & 255, r[12] = e >>> 24 & 255, r[13] = e >>> 16 & 255, r[14] = e >>> 8 & 255, r[15] = e & 255, r;
21
- }
22
- function Yt(t) {
23
- t = unescape(encodeURIComponent(t));
24
- const e = [];
25
- for (let r = 0; r < t.length; ++r)
26
- e.push(t.charCodeAt(r));
27
- return e;
28
- }
29
- const Zt = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", Ft = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
30
- function Wt(t, e, r) {
31
- function f(c, _, y, o) {
32
- var h;
33
- if (typeof c == "string" && (c = Yt(c)), typeof _ == "string" && (_ = Pt(_)), ((h = _) === null || h === void 0 ? void 0 : h.length) !== 16)
34
- throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
35
- let g = new Uint8Array(16 + c.length);
36
- if (g.set(_), g.set(c, _.length), g = r(g), g[6] = g[6] & 15 | e, g[8] = g[8] & 63 | 128, y) {
37
- o = o || 0;
38
- for (let m = 0; m < 16; ++m)
39
- y[o + m] = g[m];
40
- return y;
41
- }
42
- return Ct(g);
43
- }
44
- try {
45
- f.name = t;
46
- } catch {
47
- }
48
- return f.DNS = Zt, f.URL = Ft, f;
49
- }
50
- function Ut(t, e, r, f) {
51
- switch (t) {
52
- case 0:
53
- return e & r ^ ~e & f;
54
- case 1:
55
- return e ^ r ^ f;
56
- case 2:
57
- return e & r ^ e & f ^ r & f;
58
- case 3:
59
- return e ^ r ^ f;
60
- }
61
- }
62
- function it(t, e) {
63
- return t << e | t >>> 32 - e;
64
- }
65
- function Ht(t) {
66
- const e = [1518500249, 1859775393, 2400959708, 3395469782], r = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
67
- if (typeof t == "string") {
68
- const y = unescape(encodeURIComponent(t));
69
- t = [];
70
- for (let o = 0; o < y.length; ++o)
71
- t.push(y.charCodeAt(o));
72
- } else Array.isArray(t) || (t = Array.prototype.slice.call(t));
73
- t.push(128);
74
- const f = t.length / 4 + 2, c = Math.ceil(f / 16), _ = new Array(c);
75
- for (let y = 0; y < c; ++y) {
76
- const o = new Uint32Array(16);
77
- for (let h = 0; h < 16; ++h)
78
- o[h] = t[y * 64 + h * 4] << 24 | t[y * 64 + h * 4 + 1] << 16 | t[y * 64 + h * 4 + 2] << 8 | t[y * 64 + h * 4 + 3];
79
- _[y] = o;
80
- }
81
- _[c - 1][14] = (t.length - 1) * 8 / Math.pow(2, 32), _[c - 1][14] = Math.floor(_[c - 1][14]), _[c - 1][15] = (t.length - 1) * 8 & 4294967295;
82
- for (let y = 0; y < c; ++y) {
83
- const o = new Uint32Array(80);
84
- for (let p = 0; p < 16; ++p)
85
- o[p] = _[y][p];
86
- for (let p = 16; p < 80; ++p)
87
- o[p] = it(o[p - 3] ^ o[p - 8] ^ o[p - 14] ^ o[p - 16], 1);
88
- let h = r[0], g = r[1], m = r[2], k = r[3], x = r[4];
89
- for (let p = 0; p < 80; ++p) {
90
- const O = Math.floor(p / 20), b = it(h, 5) + Ut(O, g, m, k) + x + e[O] + o[p] >>> 0;
91
- x = k, k = m, m = it(g, 30) >>> 0, g = h, h = b;
92
- }
93
- r[0] = r[0] + h >>> 0, r[1] = r[1] + g >>> 0, r[2] = r[2] + m >>> 0, r[3] = r[3] + k >>> 0, r[4] = r[4] + x >>> 0;
94
- }
95
- return [r[0] >> 24 & 255, r[0] >> 16 & 255, r[0] >> 8 & 255, r[0] & 255, r[1] >> 24 & 255, r[1] >> 16 & 255, r[1] >> 8 & 255, r[1] & 255, r[2] >> 24 & 255, r[2] >> 16 & 255, r[2] >> 8 & 255, r[2] & 255, r[3] >> 24 & 255, r[3] >> 16 & 255, r[3] >> 8 & 255, r[3] & 255, r[4] >> 24 & 255, r[4] >> 16 & 255, r[4] >> 8 & 255, r[4] & 255];
96
- }
97
- const zt = Wt("v5", 80, Ht);
98
- var nt = function() {
99
- var t = /* @__PURE__ */ u(function(w, i, n, l) {
100
- for (n = n || {}, l = w.length; l--; n[w[l]] = i) ;
101
- return n;
102
- }, "o"), e = [6, 8, 10, 20, 22, 24, 26, 27, 28], r = [1, 10], f = [1, 11], c = [1, 12], _ = [1, 13], y = [1, 14], o = [1, 15], h = [1, 21], g = [1, 22], m = [1, 23], k = [1, 24], x = [1, 25], p = [6, 8, 10, 13, 15, 18, 19, 20, 22, 24, 26, 27, 28, 41, 42, 43, 44, 45], O = [1, 34], b = [27, 28, 46, 47], Y = [41, 42, 43, 44, 45], Z = [17, 34], F = [1, 54], M = [1, 53], S = [17, 34, 36, 38], N = {
103
- trace: /* @__PURE__ */ u(function() {
104
- }, "trace"),
105
- yy: {},
106
- symbols_: { error: 2, start: 3, ER_DIAGRAM: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, entityName: 11, relSpec: 12, ":": 13, role: 14, BLOCK_START: 15, attributes: 16, BLOCK_STOP: 17, SQS: 18, SQE: 19, title: 20, title_value: 21, acc_title: 22, acc_title_value: 23, acc_descr: 24, acc_descr_value: 25, acc_descr_multiline_value: 26, ALPHANUM: 27, ENTITY_NAME: 28, attribute: 29, attributeType: 30, attributeName: 31, attributeKeyTypeList: 32, attributeComment: 33, ATTRIBUTE_WORD: 34, attributeKeyType: 35, COMMA: 36, ATTRIBUTE_KEY: 37, COMMENT: 38, cardinality: 39, relType: 40, ZERO_OR_ONE: 41, ZERO_OR_MORE: 42, ONE_OR_MORE: 43, ONLY_ONE: 44, MD_PARENT: 45, NON_IDENTIFYING: 46, IDENTIFYING: 47, WORD: 48, $accept: 0, $end: 1 },
107
- terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: ":", 15: "BLOCK_START", 17: "BLOCK_STOP", 18: "SQS", 19: "SQE", 20: "title", 21: "title_value", 22: "acc_title", 23: "acc_title_value", 24: "acc_descr", 25: "acc_descr_value", 26: "acc_descr_multiline_value", 27: "ALPHANUM", 28: "ENTITY_NAME", 34: "ATTRIBUTE_WORD", 36: "COMMA", 37: "ATTRIBUTE_KEY", 38: "COMMENT", 41: "ZERO_OR_ONE", 42: "ZERO_OR_MORE", 43: "ONE_OR_MORE", 44: "ONLY_ONE", 45: "MD_PARENT", 46: "NON_IDENTIFYING", 47: "IDENTIFYING", 48: "WORD" },
108
- productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 4], [9, 3], [9, 1], [9, 7], [9, 6], [9, 4], [9, 2], [9, 2], [9, 2], [9, 1], [11, 1], [11, 1], [16, 1], [16, 2], [29, 2], [29, 3], [29, 3], [29, 4], [30, 1], [31, 1], [32, 1], [32, 3], [35, 1], [33, 1], [12, 3], [39, 1], [39, 1], [39, 1], [39, 1], [39, 1], [40, 1], [40, 1], [14, 1], [14, 1], [14, 1]],
109
- performAction: /* @__PURE__ */ u(function(i, n, l, d, E, a, V) {
110
- var s = a.length - 1;
111
- switch (E) {
112
- case 1:
113
- break;
114
- case 2:
115
- this.$ = [];
116
- break;
117
- case 3:
118
- a[s - 1].push(a[s]), this.$ = a[s - 1];
119
- break;
120
- case 4:
121
- case 5:
122
- this.$ = a[s];
123
- break;
124
- case 6:
125
- case 7:
126
- this.$ = [];
127
- break;
128
- case 8:
129
- d.addEntity(a[s - 4]), d.addEntity(a[s - 2]), d.addRelationship(a[s - 4], a[s], a[s - 2], a[s - 3]);
130
- break;
131
- case 9:
132
- d.addEntity(a[s - 3]), d.addAttributes(a[s - 3], a[s - 1]);
133
- break;
134
- case 10:
135
- d.addEntity(a[s - 2]);
136
- break;
137
- case 11:
138
- d.addEntity(a[s]);
139
- break;
140
- case 12:
141
- d.addEntity(a[s - 6], a[s - 4]), d.addAttributes(a[s - 6], a[s - 1]);
142
- break;
143
- case 13:
144
- d.addEntity(a[s - 5], a[s - 3]);
145
- break;
146
- case 14:
147
- d.addEntity(a[s - 3], a[s - 1]);
148
- break;
149
- case 15:
150
- case 16:
151
- this.$ = a[s].trim(), d.setAccTitle(this.$);
152
- break;
153
- case 17:
154
- case 18:
155
- this.$ = a[s].trim(), d.setAccDescription(this.$);
156
- break;
157
- case 19:
158
- case 43:
159
- this.$ = a[s];
160
- break;
161
- case 20:
162
- case 41:
163
- case 42:
164
- this.$ = a[s].replace(/"/g, "");
165
- break;
166
- case 21:
167
- case 29:
168
- this.$ = [a[s]];
169
- break;
170
- case 22:
171
- a[s].push(a[s - 1]), this.$ = a[s];
172
- break;
173
- case 23:
174
- this.$ = { attributeType: a[s - 1], attributeName: a[s] };
175
- break;
176
- case 24:
177
- this.$ = { attributeType: a[s - 2], attributeName: a[s - 1], attributeKeyTypeList: a[s] };
178
- break;
179
- case 25:
180
- this.$ = { attributeType: a[s - 2], attributeName: a[s - 1], attributeComment: a[s] };
181
- break;
182
- case 26:
183
- this.$ = { attributeType: a[s - 3], attributeName: a[s - 2], attributeKeyTypeList: a[s - 1], attributeComment: a[s] };
184
- break;
185
- case 27:
186
- case 28:
187
- case 31:
188
- this.$ = a[s];
189
- break;
190
- case 30:
191
- a[s - 2].push(a[s]), this.$ = a[s - 2];
192
- break;
193
- case 32:
194
- this.$ = a[s].replace(/"/g, "");
195
- break;
196
- case 33:
197
- this.$ = { cardA: a[s], relType: a[s - 1], cardB: a[s - 2] };
198
- break;
199
- case 34:
200
- this.$ = d.Cardinality.ZERO_OR_ONE;
201
- break;
202
- case 35:
203
- this.$ = d.Cardinality.ZERO_OR_MORE;
204
- break;
205
- case 36:
206
- this.$ = d.Cardinality.ONE_OR_MORE;
207
- break;
208
- case 37:
209
- this.$ = d.Cardinality.ONLY_ONE;
210
- break;
211
- case 38:
212
- this.$ = d.Cardinality.MD_PARENT;
213
- break;
214
- case 39:
215
- this.$ = d.Identification.NON_IDENTIFYING;
216
- break;
217
- case 40:
218
- this.$ = d.Identification.IDENTIFYING;
219
- break;
220
- }
221
- }, "anonymous"),
222
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 20: r, 22: f, 24: c, 26: _, 27: y, 28: o }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 16, 11: 9, 20: r, 22: f, 24: c, 26: _, 27: y, 28: o }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 11], { 12: 17, 39: 20, 15: [1, 18], 18: [1, 19], 41: h, 42: g, 43: m, 44: k, 45: x }), { 21: [1, 26] }, { 23: [1, 27] }, { 25: [1, 28] }, t(e, [2, 18]), t(p, [2, 19]), t(p, [2, 20]), t(e, [2, 4]), { 11: 29, 27: y, 28: o }, { 16: 30, 17: [1, 31], 29: 32, 30: 33, 34: O }, { 11: 35, 27: y, 28: o }, { 40: 36, 46: [1, 37], 47: [1, 38] }, t(b, [2, 34]), t(b, [2, 35]), t(b, [2, 36]), t(b, [2, 37]), t(b, [2, 38]), t(e, [2, 15]), t(e, [2, 16]), t(e, [2, 17]), { 13: [1, 39] }, { 17: [1, 40] }, t(e, [2, 10]), { 16: 41, 17: [2, 21], 29: 32, 30: 33, 34: O }, { 31: 42, 34: [1, 43] }, { 34: [2, 27] }, { 19: [1, 44] }, { 39: 45, 41: h, 42: g, 43: m, 44: k, 45: x }, t(Y, [2, 39]), t(Y, [2, 40]), { 14: 46, 27: [1, 49], 28: [1, 48], 48: [1, 47] }, t(e, [2, 9]), { 17: [2, 22] }, t(Z, [2, 23], { 32: 50, 33: 51, 35: 52, 37: F, 38: M }), t([17, 34, 37, 38], [2, 28]), t(e, [2, 14], { 15: [1, 55] }), t([27, 28], [2, 33]), t(e, [2, 8]), t(e, [2, 41]), t(e, [2, 42]), t(e, [2, 43]), t(Z, [2, 24], { 33: 56, 36: [1, 57], 38: M }), t(Z, [2, 25]), t(S, [2, 29]), t(Z, [2, 32]), t(S, [2, 31]), { 16: 58, 17: [1, 59], 29: 32, 30: 33, 34: O }, t(Z, [2, 26]), { 35: 60, 37: F }, { 17: [1, 61] }, t(e, [2, 13]), t(S, [2, 30]), t(e, [2, 12])],
223
- defaultActions: { 34: [2, 27], 41: [2, 22] },
224
- parseError: /* @__PURE__ */ u(function(i, n) {
225
- if (n.recoverable)
226
- this.trace(i);
227
- else {
228
- var l = new Error(i);
229
- throw l.hash = n, l;
230
- }
231
- }, "parseError"),
232
- parse: /* @__PURE__ */ u(function(i) {
233
- var n = this, l = [0], d = [], E = [null], a = [], V = this.table, s = "", j = 0, lt = 0, _t = 2, ct = 1, Et = a.slice.call(arguments, 1), A = Object.create(this.lexer), H = { yy: {} };
234
- for (var $ in this.yy)
235
- Object.prototype.hasOwnProperty.call(this.yy, $) && (H.yy[$] = this.yy[$]);
236
- A.setInput(i, H.yy), H.yy.lexer = A, H.yy.parser = this, typeof A.yylloc > "u" && (A.yylloc = {});
237
- var tt = A.yylloc;
238
- a.push(tt);
239
- var gt = A.options && A.options.ranges;
240
- typeof H.yy.parseError == "function" ? this.parseError = H.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
241
- function mt(D) {
242
- l.length = l.length - 2 * D, E.length = E.length - D, a.length = a.length - D;
243
- }
244
- u(mt, "popStack");
245
- function ht() {
246
- var D;
247
- return D = d.pop() || A.lex() || ct, typeof D != "number" && (D instanceof Array && (d = D, D = d.pop()), D = n.symbols_[D] || D), D;
248
- }
249
- u(ht, "lex");
250
- for (var I, z, B, et, K = {}, q, W, dt, J; ; ) {
251
- if (z = l[l.length - 1], this.defaultActions[z] ? B = this.defaultActions[z] : ((I === null || typeof I > "u") && (I = ht()), B = V[z] && V[z][I]), typeof B > "u" || !B.length || !B[0]) {
252
- var rt = "";
253
- J = [];
254
- for (q in V[z])
255
- this.terminals_[q] && q > _t && J.push("'" + this.terminals_[q] + "'");
256
- A.showPosition ? rt = "Parse error on line " + (j + 1) + `:
257
- ` + A.showPosition() + `
258
- Expecting ` + J.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : rt = "Parse error on line " + (j + 1) + ": Unexpected " + (I == ct ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError(rt, {
259
- text: A.match,
260
- token: this.terminals_[I] || I,
261
- line: A.yylineno,
262
- loc: tt,
263
- expected: J
264
- });
265
- }
266
- if (B[0] instanceof Array && B.length > 1)
267
- throw new Error("Parse Error: multiple actions possible at state: " + z + ", token: " + I);
268
- switch (B[0]) {
269
- case 1:
270
- l.push(I), E.push(A.yytext), a.push(A.yylloc), l.push(B[1]), I = null, lt = A.yyleng, s = A.yytext, j = A.yylineno, tt = A.yylloc;
271
- break;
272
- case 2:
273
- if (W = this.productions_[B[1]][1], K.$ = E[E.length - W], K._$ = {
274
- first_line: a[a.length - (W || 1)].first_line,
275
- last_line: a[a.length - 1].last_line,
276
- first_column: a[a.length - (W || 1)].first_column,
277
- last_column: a[a.length - 1].last_column
278
- }, gt && (K._$.range = [
279
- a[a.length - (W || 1)].range[0],
280
- a[a.length - 1].range[1]
281
- ]), et = this.performAction.apply(K, [
282
- s,
283
- lt,
284
- j,
285
- H.yy,
286
- B[1],
287
- E,
288
- a
289
- ].concat(Et)), typeof et < "u")
290
- return et;
291
- W && (l = l.slice(0, -1 * W * 2), E = E.slice(0, -1 * W), a = a.slice(0, -1 * W)), l.push(this.productions_[B[1]][0]), E.push(K.$), a.push(K._$), dt = V[l[l.length - 2]][l[l.length - 1]], l.push(dt);
292
- break;
293
- case 3:
294
- return !0;
295
- }
296
- }
297
- return !0;
298
- }, "parse")
299
- }, T = /* @__PURE__ */ function() {
300
- var w = {
301
- EOF: 1,
302
- parseError: /* @__PURE__ */ u(function(n, l) {
303
- if (this.yy.parser)
304
- this.yy.parser.parseError(n, l);
305
- else
306
- throw new Error(n);
307
- }, "parseError"),
308
- // resets the lexer, sets new input
309
- setInput: /* @__PURE__ */ u(function(i, n) {
310
- return this.yy = n || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
311
- first_line: 1,
312
- first_column: 0,
313
- last_line: 1,
314
- last_column: 0
315
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
316
- }, "setInput"),
317
- // consumes and returns one char from the input
318
- input: /* @__PURE__ */ u(function() {
319
- var i = this._input[0];
320
- this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
321
- var n = i.match(/(?:\r\n?|\n).*/g);
322
- return n ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
323
- }, "input"),
324
- // unshifts one char (or a string) into the input
325
- unput: /* @__PURE__ */ u(function(i) {
326
- var n = i.length, l = i.split(/(?:\r\n?|\n)/g);
327
- this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - n), this.offset -= n;
328
- var d = this.match.split(/(?:\r\n?|\n)/g);
329
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
330
- var E = this.yylloc.range;
331
- return this.yylloc = {
332
- first_line: this.yylloc.first_line,
333
- last_line: this.yylineno + 1,
334
- first_column: this.yylloc.first_column,
335
- last_column: l ? (l.length === d.length ? this.yylloc.first_column : 0) + d[d.length - l.length].length - l[0].length : this.yylloc.first_column - n
336
- }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - n]), this.yyleng = this.yytext.length, this;
337
- }, "unput"),
338
- // When called from action, caches matched text and appends it on next action
339
- more: /* @__PURE__ */ u(function() {
340
- return this._more = !0, this;
341
- }, "more"),
342
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
343
- reject: /* @__PURE__ */ u(function() {
344
- if (this.options.backtrack_lexer)
345
- this._backtrack = !0;
346
- else
347
- 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).
348
- ` + this.showPosition(), {
349
- text: "",
350
- token: null,
351
- line: this.yylineno
352
- });
353
- return this;
354
- }, "reject"),
355
- // retain first n characters of the match
356
- less: /* @__PURE__ */ u(function(i) {
357
- this.unput(this.match.slice(i));
358
- }, "less"),
359
- // displays already matched input, i.e. for error messages
360
- pastInput: /* @__PURE__ */ u(function() {
361
- var i = this.matched.substr(0, this.matched.length - this.match.length);
362
- return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
363
- }, "pastInput"),
364
- // displays upcoming input, i.e. for error messages
365
- upcomingInput: /* @__PURE__ */ u(function() {
366
- var i = this.match;
367
- return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
368
- }, "upcomingInput"),
369
- // displays the character position where the lexing error occurred, i.e. for error messages
370
- showPosition: /* @__PURE__ */ u(function() {
371
- var i = this.pastInput(), n = new Array(i.length + 1).join("-");
372
- return i + this.upcomingInput() + `
373
- ` + n + "^";
374
- }, "showPosition"),
375
- // test the lexed token: return FALSE when not a match, otherwise return token
376
- test_match: /* @__PURE__ */ u(function(i, n) {
377
- var l, d, E;
378
- if (this.options.backtrack_lexer && (E = {
379
- yylineno: this.yylineno,
380
- yylloc: {
381
- first_line: this.yylloc.first_line,
382
- last_line: this.last_line,
383
- first_column: this.yylloc.first_column,
384
- last_column: this.yylloc.last_column
385
- },
386
- yytext: this.yytext,
387
- match: this.match,
388
- matches: this.matches,
389
- matched: this.matched,
390
- yyleng: this.yyleng,
391
- offset: this.offset,
392
- _more: this._more,
393
- _input: this._input,
394
- yy: this.yy,
395
- conditionStack: this.conditionStack.slice(0),
396
- done: this.done
397
- }, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
398
- first_line: this.yylloc.last_line,
399
- last_line: this.yylineno + 1,
400
- first_column: this.yylloc.last_column,
401
- last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
402
- }, this.yytext += i[0], this.match += i[0], this.matches = i, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(i[0].length), this.matched += i[0], l = this.performAction.call(this, this.yy, this, n, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
403
- return l;
404
- if (this._backtrack) {
405
- for (var a in E)
406
- this[a] = E[a];
407
- return !1;
408
- }
409
- return !1;
410
- }, "test_match"),
411
- // return next match in input
412
- next: /* @__PURE__ */ u(function() {
413
- if (this.done)
414
- return this.EOF;
415
- this._input || (this.done = !0);
416
- var i, n, l, d;
417
- this._more || (this.yytext = "", this.match = "");
418
- for (var E = this._currentRules(), a = 0; a < E.length; a++)
419
- if (l = this._input.match(this.rules[E[a]]), l && (!n || l[0].length > n[0].length)) {
420
- if (n = l, d = a, this.options.backtrack_lexer) {
421
- if (i = this.test_match(l, E[a]), i !== !1)
422
- return i;
423
- if (this._backtrack) {
424
- n = !1;
425
- continue;
426
- } else
427
- return !1;
428
- } else if (!this.options.flex)
429
- break;
430
- }
431
- return n ? (i = this.test_match(n, E[d]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
432
- ` + this.showPosition(), {
433
- text: "",
434
- token: null,
435
- line: this.yylineno
436
- });
437
- }, "next"),
438
- // return next match that has a token
439
- lex: /* @__PURE__ */ u(function() {
440
- var n = this.next();
441
- return n || this.lex();
442
- }, "lex"),
443
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
444
- begin: /* @__PURE__ */ u(function(n) {
445
- this.conditionStack.push(n);
446
- }, "begin"),
447
- // pop the previously active lexer condition state off the condition stack
448
- popState: /* @__PURE__ */ u(function() {
449
- var n = this.conditionStack.length - 1;
450
- return n > 0 ? this.conditionStack.pop() : this.conditionStack[0];
451
- }, "popState"),
452
- // produce the lexer rule set which is active for the currently active lexer condition state
453
- _currentRules: /* @__PURE__ */ u(function() {
454
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
455
- }, "_currentRules"),
456
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
457
- topState: /* @__PURE__ */ u(function(n) {
458
- return n = this.conditionStack.length - 1 - Math.abs(n || 0), n >= 0 ? this.conditionStack[n] : "INITIAL";
459
- }, "topState"),
460
- // alias for begin(condition)
461
- pushState: /* @__PURE__ */ u(function(n) {
462
- this.begin(n);
463
- }, "pushState"),
464
- // return the number of states currently on the stack
465
- stateStackSize: /* @__PURE__ */ u(function() {
466
- return this.conditionStack.length;
467
- }, "stateStackSize"),
468
- options: { "case-insensitive": !0 },
469
- performAction: /* @__PURE__ */ u(function(n, l, d, E) {
470
- switch (d) {
471
- case 0:
472
- return this.begin("acc_title"), 22;
473
- case 1:
474
- return this.popState(), "acc_title_value";
475
- case 2:
476
- return this.begin("acc_descr"), 24;
477
- case 3:
478
- return this.popState(), "acc_descr_value";
479
- case 4:
480
- this.begin("acc_descr_multiline");
481
- break;
482
- case 5:
483
- this.popState();
484
- break;
485
- case 6:
486
- return "acc_descr_multiline_value";
487
- case 7:
488
- return 10;
489
- case 8:
490
- break;
491
- case 9:
492
- return 8;
493
- case 10:
494
- return 28;
495
- case 11:
496
- return 48;
497
- case 12:
498
- return 4;
499
- case 13:
500
- return this.begin("block"), 15;
501
- case 14:
502
- return 36;
503
- case 15:
504
- break;
505
- case 16:
506
- return 37;
507
- case 17:
508
- return 34;
509
- case 18:
510
- return 34;
511
- case 19:
512
- return 38;
513
- case 20:
514
- break;
515
- case 21:
516
- return this.popState(), 17;
517
- case 22:
518
- return l.yytext[0];
519
- case 23:
520
- return 18;
521
- case 24:
522
- return 19;
523
- case 25:
524
- return 41;
525
- case 26:
526
- return 43;
527
- case 27:
528
- return 43;
529
- case 28:
530
- return 43;
531
- case 29:
532
- return 41;
533
- case 30:
534
- return 41;
535
- case 31:
536
- return 42;
537
- case 32:
538
- return 42;
539
- case 33:
540
- return 42;
541
- case 34:
542
- return 42;
543
- case 35:
544
- return 42;
545
- case 36:
546
- return 43;
547
- case 37:
548
- return 42;
549
- case 38:
550
- return 43;
551
- case 39:
552
- return 44;
553
- case 40:
554
- return 44;
555
- case 41:
556
- return 44;
557
- case 42:
558
- return 44;
559
- case 43:
560
- return 41;
561
- case 44:
562
- return 42;
563
- case 45:
564
- return 43;
565
- case 46:
566
- return 45;
567
- case 47:
568
- return 46;
569
- case 48:
570
- return 47;
571
- case 49:
572
- return 47;
573
- case 50:
574
- return 46;
575
- case 51:
576
- return 46;
577
- case 52:
578
- return 46;
579
- case 53:
580
- return 27;
581
- case 54:
582
- return l.yytext[0];
583
- case 55:
584
- return 6;
585
- }
586
- }, "anonymous"),
587
- rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:,)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:(.*?)[~](.*?)*[~])/i, /^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\s*u\b)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i, /^(?:.)/i, /^(?:$)/i],
588
- conditions: { acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, block: { rules: [14, 15, 16, 17, 18, 19, 20, 21, 22], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55], inclusive: !0 } }
589
- };
590
- return w;
591
- }();
592
- N.lexer = T;
593
- function L() {
594
- this.yy = {};
595
- }
596
- return u(L, "Parser"), L.prototype = N, N.Parser = L, new L();
597
- }();
598
- nt.parser = nt;
599
- var Gt = nt, G = /* @__PURE__ */ new Map(), ot = [], Kt = {
600
- ZERO_OR_ONE: "ZERO_OR_ONE",
601
- ZERO_OR_MORE: "ZERO_OR_MORE",
602
- ONE_OR_MORE: "ONE_OR_MORE",
603
- ONLY_ONE: "ONLY_ONE",
604
- MD_PARENT: "MD_PARENT"
605
- }, Vt = {
606
- NON_IDENTIFYING: "NON_IDENTIFYING",
607
- IDENTIFYING: "IDENTIFYING"
608
- }, ft = /* @__PURE__ */ u(function(t, e = void 0) {
609
- return G.has(t) ? !G.get(t).alias && e && (G.get(t).alias = e, X.info(`Add alias '${e}' to entity '${t}'`)) : (G.set(t, { attributes: [], alias: e }), X.info("Added new entity :", t)), G.get(t);
610
- }, "addEntity"), Xt = /* @__PURE__ */ u(() => G, "getEntities"), Qt = /* @__PURE__ */ u(function(t, e) {
611
- let r = ft(t), f;
612
- for (f = e.length - 1; f >= 0; f--)
613
- r.attributes.push(e[f]), X.debug("Added attribute ", e[f].attributeName);
614
- }, "addAttributes"), jt = /* @__PURE__ */ u(function(t, e, r, f) {
615
- let c = {
616
- entityA: t,
617
- roleA: e,
618
- entityB: r,
619
- relSpec: f
620
- };
621
- ot.push(c), X.debug("Added new relationship :", c);
622
- }, "addRelationship"), qt = /* @__PURE__ */ u(() => ot, "getRelationships"), Jt = /* @__PURE__ */ u(function() {
623
- G = /* @__PURE__ */ new Map(), ot = [], Mt();
624
- }, "clear"), $t = {
625
- Cardinality: Kt,
626
- Identification: Vt,
627
- getConfig: /* @__PURE__ */ u(() => U().er, "getConfig"),
628
- addEntity: ft,
629
- addAttributes: Qt,
630
- getEntities: Xt,
631
- addRelationship: jt,
632
- getRelationships: qt,
633
- clear: Jt,
634
- setAccTitle: Nt,
635
- getAccTitle: bt,
636
- setAccDescription: Ot,
637
- getAccDescription: Rt,
638
- setDiagramTitle: xt,
639
- getDiagramTitle: kt
640
- }, C = {
641
- ONLY_ONE_START: "ONLY_ONE_START",
642
- ONLY_ONE_END: "ONLY_ONE_END",
643
- ZERO_OR_ONE_START: "ZERO_OR_ONE_START",
644
- ZERO_OR_ONE_END: "ZERO_OR_ONE_END",
645
- ONE_OR_MORE_START: "ONE_OR_MORE_START",
646
- ONE_OR_MORE_END: "ONE_OR_MORE_END",
647
- ZERO_OR_MORE_START: "ZERO_OR_MORE_START",
648
- ZERO_OR_MORE_END: "ZERO_OR_MORE_END",
649
- MD_PARENT_END: "MD_PARENT_END",
650
- MD_PARENT_START: "MD_PARENT_START"
651
- }, te = /* @__PURE__ */ u(function(t, e) {
652
- let r;
653
- t.append("defs").append("marker").attr("id", C.MD_PARENT_START).attr("refX", 0).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"), t.append("defs").append("marker").attr("id", C.MD_PARENT_END).attr("refX", 19).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"), t.append("defs").append("marker").attr("id", C.ONLY_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M9,0 L9,18 M15,0 L15,18"), t.append("defs").append("marker").attr("id", C.ONLY_ONE_END).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M3,0 L3,18 M9,0 L9,18"), r = t.append("defs").append("marker").attr("id", C.ZERO_OR_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M9,0 L9,18"), r = t.append("defs").append("marker").attr("id", C.ZERO_OR_ONE_END).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M21,0 L21,18"), t.append("defs").append("marker").attr("id", C.ONE_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"), t.append("defs").append("marker").attr("id", C.ONE_OR_MORE_END).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"), r = t.append("defs").append("marker").attr("id", C.ZERO_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18"), r = t.append("defs").append("marker").attr("id", C.ZERO_OR_MORE_END).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
654
- }, "insertMarkers"), P = {
655
- ERMarkers: C,
656
- insertMarkers: te
657
- }, ee = /[^\dA-Za-z](\W)*/g, R = {}, Q = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ u(function(t) {
658
- const e = Object.keys(t);
659
- for (const r of e)
660
- R[r] = t[r];
661
- }, "setConf"), ae = /* @__PURE__ */ u((t, e, r) => {
662
- const f = R.entityPadding / 3, c = R.entityPadding / 3, _ = R.fontSize * 0.85, y = e.node().getBBox(), o = [];
663
- let h = !1, g = !1, m = 0, k = 0, x = 0, p = 0, O = y.height + f * 2, b = 1;
664
- r.forEach((M) => {
665
- M.attributeKeyTypeList !== void 0 && M.attributeKeyTypeList.length > 0 && (h = !0), M.attributeComment !== void 0 && (g = !0);
666
- }), r.forEach((M) => {
667
- const S = `${e.node().id}-attr-${b}`;
668
- let N = 0;
669
- const T = vt(M.attributeType), L = t.append("text").classed("er entityLabel", !0).attr("id", `${S}-type`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", U().fontFamily).style("font-size", _ + "px").text(T), w = t.append("text").classed("er entityLabel", !0).attr("id", `${S}-name`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", U().fontFamily).style("font-size", _ + "px").text(M.attributeName), i = {};
670
- i.tn = L, i.nn = w;
671
- const n = L.node().getBBox(), l = w.node().getBBox();
672
- if (m = Math.max(m, n.width), k = Math.max(k, l.width), N = Math.max(n.height, l.height), h) {
673
- const d = M.attributeKeyTypeList !== void 0 ? M.attributeKeyTypeList.join(",") : "", E = t.append("text").classed("er entityLabel", !0).attr("id", `${S}-key`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", U().fontFamily).style("font-size", _ + "px").text(d);
674
- i.kn = E;
675
- const a = E.node().getBBox();
676
- x = Math.max(x, a.width), N = Math.max(N, a.height);
677
- }
678
- if (g) {
679
- const d = t.append("text").classed("er entityLabel", !0).attr("id", `${S}-comment`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", U().fontFamily).style("font-size", _ + "px").text(M.attributeComment || "");
680
- i.cn = d;
681
- const E = d.node().getBBox();
682
- p = Math.max(p, E.width), N = Math.max(N, E.height);
683
- }
684
- i.height = N, o.push(i), O += N + f * 2, b += 1;
685
- });
686
- let Y = 4;
687
- h && (Y += 2), g && (Y += 2);
688
- const Z = m + k + x + p, F = {
689
- width: Math.max(
690
- R.minEntityWidth,
691
- Math.max(
692
- y.width + R.entityPadding * 2,
693
- Z + c * Y
694
- )
695
- ),
696
- height: r.length > 0 ? O : Math.max(R.minEntityHeight, y.height + R.entityPadding * 2)
697
- };
698
- if (r.length > 0) {
699
- const M = Math.max(
700
- 0,
701
- (F.width - Z - c * Y) / (Y / 2)
702
- );
703
- e.attr(
704
- "transform",
705
- "translate(" + F.width / 2 + "," + (f + y.height / 2) + ")"
706
- );
707
- let S = y.height + f * 2, N = "attributeBoxOdd";
708
- o.forEach((T) => {
709
- const L = S + f + T.height / 2;
710
- T.tn.attr("transform", "translate(" + c + "," + L + ")");
711
- const w = t.insert("rect", "#" + T.tn.node().id).classed(`er ${N}`, !0).attr("x", 0).attr("y", S).attr("width", m + c * 2 + M).attr("height", T.height + f * 2), i = parseFloat(w.attr("x")) + parseFloat(w.attr("width"));
712
- T.nn.attr(
713
- "transform",
714
- "translate(" + (i + c) + "," + L + ")"
715
- );
716
- const n = t.insert("rect", "#" + T.nn.node().id).classed(`er ${N}`, !0).attr("x", i).attr("y", S).attr("width", k + c * 2 + M).attr("height", T.height + f * 2);
717
- let l = parseFloat(n.attr("x")) + parseFloat(n.attr("width"));
718
- if (h) {
719
- T.kn.attr(
720
- "transform",
721
- "translate(" + (l + c) + "," + L + ")"
722
- );
723
- const d = t.insert("rect", "#" + T.kn.node().id).classed(`er ${N}`, !0).attr("x", l).attr("y", S).attr("width", x + c * 2 + M).attr("height", T.height + f * 2);
724
- l = parseFloat(d.attr("x")) + parseFloat(d.attr("width"));
725
- }
726
- g && (T.cn.attr(
727
- "transform",
728
- "translate(" + (l + c) + "," + L + ")"
729
- ), t.insert("rect", "#" + T.cn.node().id).classed(`er ${N}`, "true").attr("x", l).attr("y", S).attr("width", p + c * 2 + M).attr("height", T.height + f * 2)), S += T.height + f * 2, N = N === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd";
730
- });
731
- } else
732
- F.height = Math.max(R.minEntityHeight, O), e.attr("transform", "translate(" + F.width / 2 + "," + F.height / 2 + ")");
733
- return F;
734
- }, "drawAttributes"), ie = /* @__PURE__ */ u(function(t, e, r) {
735
- const f = [...e.keys()];
736
- let c;
737
- return f.forEach(function(_) {
738
- const y = pt(_, "entity");
739
- Q.set(_, y);
740
- const o = t.append("g").attr("id", y);
741
- c = c === void 0 ? y : c;
742
- const h = "text-" + y, g = o.append("text").classed("er entityLabel", !0).attr("id", h).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "middle").style("font-family", U().fontFamily).style("font-size", R.fontSize + "px").text(e.get(_).alias ?? _), { width: m, height: k } = ae(
743
- o,
744
- g,
745
- e.get(_).attributes
746
- ), p = o.insert("rect", "#" + h).classed("er entityBox", !0).attr("x", 0).attr("y", 0).attr("width", m).attr("height", k).node().getBBox();
747
- r.setNode(y, {
748
- width: p.width,
749
- height: p.height,
750
- shape: "rect",
751
- id: y
752
- });
753
- }), c;
754
- }, "drawEntities"), ne = /* @__PURE__ */ u(function(t, e) {
755
- e.nodes().forEach(function(r) {
756
- r !== void 0 && e.node(r) !== void 0 && t.select("#" + r).attr(
757
- "transform",
758
- "translate(" + (e.node(r).x - e.node(r).width / 2) + "," + (e.node(r).y - e.node(r).height / 2) + " )"
759
- );
760
- });
761
- }, "adjustEntities"), yt = /* @__PURE__ */ u(function(t) {
762
- return (t.entityA + t.roleA + t.entityB).replace(/\s/g, "");
763
- }, "getEdgeName"), se = /* @__PURE__ */ u(function(t, e) {
764
- return t.forEach(function(r) {
765
- e.setEdge(
766
- Q.get(r.entityA),
767
- Q.get(r.entityB),
768
- { relationship: r },
769
- yt(r)
770
- );
771
- }), t;
772
- }, "addRelationships"), ut = 0, oe = /* @__PURE__ */ u(function(t, e, r, f, c) {
773
- ut++;
774
- const _ = r.edge(
775
- Q.get(e.entityA),
776
- Q.get(e.entityB),
777
- yt(e)
778
- ), y = It().x(function(b) {
779
- return b.x;
780
- }).y(function(b) {
781
- return b.y;
782
- }).curve(Dt), o = t.insert("path", "#" + f).classed("er relationshipLine", !0).attr("d", y(_.points)).style("stroke", R.stroke).style("fill", "none");
783
- e.relSpec.relType === c.db.Identification.NON_IDENTIFYING && o.attr("stroke-dasharray", "8,8");
784
- let h = "";
785
- switch (R.arrowMarkerAbsolute && (h = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, h = h.replace(/\(/g, "\\("), h = h.replace(/\)/g, "\\)")), e.relSpec.cardA) {
786
- case c.db.Cardinality.ZERO_OR_ONE:
787
- o.attr("marker-end", "url(" + h + "#" + P.ERMarkers.ZERO_OR_ONE_END + ")");
788
- break;
789
- case c.db.Cardinality.ZERO_OR_MORE:
790
- o.attr("marker-end", "url(" + h + "#" + P.ERMarkers.ZERO_OR_MORE_END + ")");
791
- break;
792
- case c.db.Cardinality.ONE_OR_MORE:
793
- o.attr("marker-end", "url(" + h + "#" + P.ERMarkers.ONE_OR_MORE_END + ")");
794
- break;
795
- case c.db.Cardinality.ONLY_ONE:
796
- o.attr("marker-end", "url(" + h + "#" + P.ERMarkers.ONLY_ONE_END + ")");
797
- break;
798
- case c.db.Cardinality.MD_PARENT:
799
- o.attr("marker-end", "url(" + h + "#" + P.ERMarkers.MD_PARENT_END + ")");
800
- break;
801
- }
802
- switch (e.relSpec.cardB) {
803
- case c.db.Cardinality.ZERO_OR_ONE:
804
- o.attr(
805
- "marker-start",
806
- "url(" + h + "#" + P.ERMarkers.ZERO_OR_ONE_START + ")"
807
- );
808
- break;
809
- case c.db.Cardinality.ZERO_OR_MORE:
810
- o.attr(
811
- "marker-start",
812
- "url(" + h + "#" + P.ERMarkers.ZERO_OR_MORE_START + ")"
813
- );
814
- break;
815
- case c.db.Cardinality.ONE_OR_MORE:
816
- o.attr(
817
- "marker-start",
818
- "url(" + h + "#" + P.ERMarkers.ONE_OR_MORE_START + ")"
819
- );
820
- break;
821
- case c.db.Cardinality.ONLY_ONE:
822
- o.attr("marker-start", "url(" + h + "#" + P.ERMarkers.ONLY_ONE_START + ")");
823
- break;
824
- case c.db.Cardinality.MD_PARENT:
825
- o.attr("marker-start", "url(" + h + "#" + P.ERMarkers.MD_PARENT_START + ")");
826
- break;
827
- }
828
- const g = o.node().getTotalLength(), m = o.node().getPointAtLength(g * 0.5), k = "rel" + ut, x = e.roleA.split(/<br ?\/>/g), p = t.append("text").classed("er relationshipLabel", !0).attr("id", k).attr("x", m.x).attr("y", m.y).style("text-anchor", "middle").style("dominant-baseline", "middle").style("font-family", U().fontFamily).style("font-size", R.fontSize + "px");
829
- if (x.length == 1)
830
- p.text(e.roleA);
831
- else {
832
- const b = -(x.length - 1) * 0.5;
833
- x.forEach((Y, Z) => {
834
- p.append("tspan").attr("x", m.x).attr("dy", `${Z === 0 ? b : 1}em`).text(Y);
835
- });
836
- }
837
- const O = p.node().getBBox();
838
- t.insert("rect", "#" + k).classed("er relationshipLabelBox", !0).attr("x", m.x - O.width / 2).attr("y", m.y - O.height / 2).attr("width", O.width).attr("height", O.height);
839
- }, "drawRelationshipFromLayout"), le = /* @__PURE__ */ u(function(t, e, r, f) {
840
- R = U().er, X.info("Drawing ER diagram");
841
- const c = U().securityLevel;
842
- let _;
843
- c === "sandbox" && (_ = at("#i" + e));
844
- const o = (c === "sandbox" ? at(_.nodes()[0].contentDocument.body) : at("body")).select(`[id='${e}']`);
845
- P.insertMarkers(o, R);
846
- let h;
847
- h = new St({
848
- multigraph: !0,
849
- directed: !0,
850
- compound: !1
851
- }).setGraph({
852
- rankdir: R.layoutDirection,
853
- marginx: 20,
854
- marginy: 20,
855
- nodesep: 100,
856
- edgesep: 100,
857
- ranksep: 100
858
- }).setDefaultEdgeLabel(function() {
859
- return {};
860
- });
861
- const g = ie(o, f.db.getEntities(), h), m = se(f.db.getRelationships(), h);
862
- wt(h), ne(o, h), m.forEach(function(b) {
863
- oe(o, b, h, g, f);
864
- });
865
- const k = R.diagramPadding;
866
- Tt.insertTitle(o, "entityTitleText", R.titleTopMargin, f.db.getDiagramTitle());
867
- const x = o.node().getBBox(), p = x.width + k * 2, O = x.height + k * 2;
868
- At(o, O, p, R.useMaxWidth), o.attr("viewBox", `${x.x - k} ${x.y - k} ${p} ${O}`);
869
- }, "draw"), ce = "28e9f9db-3c8d-5aa5-9faf-44286ae5937c";
870
- function pt(t = "", e = "") {
871
- const r = t.replace(ee, "");
872
- return `${st(e)}${st(r)}${zt(
873
- t,
874
- ce
875
- )}`;
876
- }
877
- u(pt, "generateId");
878
- function st(t = "") {
879
- return t.length > 0 ? `${t}-` : "";
880
- }
881
- u(st, "strWithHyphen");
882
- var he = {
883
- setConf: re,
884
- draw: le
885
- }, de = /* @__PURE__ */ u((t) => `
886
- .entityBox {
887
- fill: ${t.mainBkg};
888
- stroke: ${t.nodeBorder};
889
- }
890
-
891
- .attributeBoxOdd {
892
- fill: ${t.attributeBackgroundColorOdd};
893
- stroke: ${t.nodeBorder};
894
- }
895
-
896
- .attributeBoxEven {
897
- fill: ${t.attributeBackgroundColorEven};
898
- stroke: ${t.nodeBorder};
899
- }
900
-
901
- .relationshipLabelBox {
902
- fill: ${t.tertiaryColor};
903
- opacity: 0.7;
904
- background-color: ${t.tertiaryColor};
905
- rect {
906
- opacity: 0.5;
907
- }
908
- }
909
-
910
- .relationshipLine {
911
- stroke: ${t.lineColor};
912
- }
913
-
914
- .entityTitleText {
915
- text-anchor: middle;
916
- font-size: 18px;
917
- fill: ${t.textColor};
918
- }
919
- #MD_PARENT_START {
920
- fill: #f5f5f5 !important;
921
- stroke: ${t.lineColor} !important;
922
- stroke-width: 1;
923
- }
924
- #MD_PARENT_END {
925
- fill: #f5f5f5 !important;
926
- stroke: ${t.lineColor} !important;
927
- stroke-width: 1;
928
- }
929
-
930
- `, "getStyles"), ue = de, Ee = {
931
- parser: Gt,
932
- db: $t,
933
- renderer: he,
934
- styles: ue
935
- };
936
- export {
937
- Ee as diagram
938
- };