@kong-ui-public/documentation 0.8.27-pr.2132.c7fba69a4.0 → 0.8.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_basePickBy-DF_KwdVi-HVXnmpaQ.js +151 -0
- package/dist/_baseUniq-DefQzZRT-CTix3bMY.js +614 -0
- package/dist/arc-B4xWw-B6-BGnuysbe.js +83 -0
- package/dist/architecture-I3QFYML2-7TNhn42L-52ENK4nk.js +5 -0
- package/dist/architectureDiagram-UYN6MBPD-Bg70hFZ--BirbHF75.js +4592 -0
- package/dist/astro-Uf8_VxKJ-CZxoSljj.js +16 -0
- package/dist/blockDiagram-ZHA2E4KO-Ylh05M-x-AVJfewxx.js +2247 -0
- package/dist/c-DASdrs7p-DASdrs7p.js +6 -0
- package/dist/c4Diagram-6F5ED5ID-BA0B_CmS-WdUKqC7Z.js +1581 -0
- package/dist/channel-B5uWur4x-BHu9WG2d.js +5 -0
- package/dist/chunk-5HRBRIJM-B7MbirM8-YDLjZbXN.js +24 -0
- package/dist/chunk-7U56Z5CX-CfNu7Hr2-BQzILIp1.js +1213 -0
- package/dist/chunk-ASOPGD6M-CwvgmaRl-BZAjlsEd.js +64 -0
- package/dist/chunk-KFBOBJHC-BB675Bua-GRhe6aGs.js +15 -0
- package/dist/chunk-T2TOU4HS-BgV1wucS-5Sa82KgW.js +1301 -0
- package/dist/chunk-TMUBEWPD-C22TGOO0-Bl2u--DY.js +9 -0
- package/dist/classDiagram-LNE6IOMH-D5SiSVyM-BbV9LB8E.js +14 -0
- package/dist/classDiagram-v2-MQ7JQ4JX-D5SiSVyM-BbV9LB8E.js +14 -0
- package/dist/clone-CmU1hwye-Lu5-ol5h.js +8 -0
- package/dist/csharp-CYWRhZ2R-CYWRhZ2R.js +6 -0
- package/dist/css-D1aVdRIU-D1aVdRIU.js +6 -0
- package/dist/csv-DvCncUGQ-Tno401i9.js +6 -0
- package/dist/cytoscape.esm-DAyNQ0qu-B7WxGuVh.js +16110 -0
- package/dist/dagre-4EVJKHTY-DMTVcQfE-C1Tr0EYY.js +447 -0
- package/dist/diagram-QW4FP2JN-jc61JuWr-DOMFELfS.js +126 -0
- package/dist/diff-XmNrvgM1-XmNrvgM1.js +6 -0
- package/dist/docker-DWH2onkn-DWH2onkn.js +6 -0
- package/dist/documentation.es.js +7 -0
- package/dist/documentation.umd.js +2404 -0
- package/dist/erDiagram-6RL3IURR-1byskxwI-B-wzYh8R.js +937 -0
- package/dist/flowDiagram-7ASYPVHJ-B3phEI8o-CVXSVDmh.js +1484 -0
- package/dist/ganttDiagram-NTVNEXSI-vYnO_T5c-Ccxkb7aQ.js +2491 -0
- package/dist/git-commit-BspYIY3P-VkbIfR3L.js +8 -0
- package/dist/git-rebase--zLBTjUa-DEW2tfKx.js +8 -0
- package/dist/gitGraph-YCYPL57B-DPx67Iu5-BPrLSH0g.js +5 -0
- package/dist/gitGraphDiagram-NRZ2UAAF-BHxB7Gjs-CeRxz6oW.js +712 -0
- package/dist/go-BErP6iv1-BErP6iv1.js +6 -0
- package/dist/graph-_eClejaU-DigE4Bf5.js +247 -0
- package/dist/graphql-DWpQF4JI-C-3VJmtp.js +14 -0
- package/dist/haml-CMN0hQaL-BV5BsZTy.js +10 -0
- package/dist/handlebars-Cc-7fXX5-B9YgDKzT.js +14 -0
- package/dist/haskell-CtlGos0K-CtlGos0K.js +6 -0
- package/dist/html-B0P_v3yU-BojM9zZg.js +10 -0
- package/dist/html-derivative-BJFFAxYV-iD6NAoKm.js +8 -0
- package/dist/http-Dcjm_K1m-1LFSbOE1.js +14 -0
- package/dist/index-B_RqyDIa.js +37033 -0
- package/dist/info-46DW6VJ7-DeIQKKyY-CVPexu5P.js +5 -0
- package/dist/infoDiagram-A4XQUW5V-Cx0WE_JZ-B_t8JIcX.js +22 -0
- package/dist/ini-BUcvsX-U-BUcvsX-U.js +6 -0
- package/dist/init-DjUOC4st-C8Nwz6AJ.js +16 -0
- package/dist/java-B7odJ7Ap-B7odJ7Ap.js +6 -0
- package/dist/javascript-fa8UlHZE-fa8UlHZE.js +6 -0
- package/dist/journeyDiagram-G5WM74LC-CUWL5R5G-DWlpHybW.js +810 -0
- package/dist/json-71t8ZF9g-71t8ZF9g.js +6 -0
- package/dist/json5-Z7F6rA6a-Z7F6rA6a.js +6 -0
- package/dist/jsonc-Dphhs4m2-Dphhs4m2.js +6 -0
- package/dist/jsonl-D9jj92Gg-D9jj92Gg.js +6 -0
- package/dist/jsx-Bkesy5tT-Bkesy5tT.js +6 -0
- package/dist/kanban-definition-QRCXZQQD-r5CdvT2h-BUkOeUnm.js +718 -0
- package/dist/katex-Qk2jHgyB-CF_fuFJb.js +11637 -0
- package/dist/kotlin-DCgZY7Ii-DCgZY7Ii.js +6 -0
- package/dist/latex-CZXk8SiZ-DbjDPp_f.js +11 -0
- package/dist/layout-DfjmtgNY-Bw6LFOXt.js +1321 -0
- package/dist/less-DQA4v-Nm-DQA4v-Nm.js +6 -0
- package/dist/linear-BGmbGdcc-C--Nxp9Q.js +423 -0
- package/dist/liquid-CvufO3kO-D90bBAdm.js +14 -0
- package/dist/lua-BVfhNLDr-DAa90qLN.js +8 -0
- package/dist/make-BjuHP00g-BjuHP00g.js +6 -0
- package/dist/markdown-B6guhLWd-B6guhLWd.js +6 -0
- package/dist/material-theme-lighter-BUBw43Yz-BUBw43Yz.js +4 -0
- package/dist/material-theme-palenight-C1RVm8K1-C1RVm8K1.js +4 -0
- package/dist/mdc-Bq810vct-Dr8CpN8f.js +12 -0
- package/dist/mdx-DIoECIFU-DIoECIFU.js +6 -0
- package/dist/mermaid-BZ7WHNIe-BZ7WHNIe.js +6 -0
- package/dist/mermaid-parser.core-DxgZuQQq-uP-grJig.js +12400 -0
- package/dist/mindmap-definition-GWI6TPTV-DX5GL05M-B8Eu6UCe.js +3219 -0
- package/dist/nginx-Can2eAjw-DKMoypYC.js +8 -0
- package/dist/objective-c-BGg9R27G-BGg9R27G.js +6 -0
- package/dist/ordinal-DfAQgscy-BEJTu10r.js +61 -0
- package/dist/packet-W2GHVCYJ-CI_-E3C--D1lo2o0i.js +5 -0
- package/dist/pascal-l2bqd7Dz-l2bqd7Dz.js +6 -0
- package/dist/perl-DaMQyPwp-Cxx4wmV7.js +16 -0
- package/dist/php-BL3EfPBi-BZu5YwDX.js +18 -0
- package/dist/pie-BEWT4RHE-B52QOymI-BoBX6ZnD.js +5 -0
- package/dist/pieDiagram-YF2LJOPJ-IHpbN7M9-BBPOh3m7.js +161 -0
- package/dist/plsql-oVq_K_wH-oVq_K_wH.js +6 -0
- package/dist/postcss-BZ3MNRIJ-BZ3MNRIJ.js +6 -0
- package/dist/powershell-Diwyv8Eh-Diwyv8Eh.js +6 -0
- package/dist/proto-o9HLmF90-o9HLmF90.js +6 -0
- package/dist/pug-HKe4Luo3-BYb0El_4.js +12 -0
- package/dist/python-xYxLFJY--xYxLFJY-.js +6 -0
- package/dist/quadrantDiagram-OS5C2QUG-DyfTAjs0-CvYOplDG.js +1024 -0
- package/dist/r-F-9I-ITZ-F-9I-ITZ.js +6 -0
- package/dist/reg-CMUdAgIP-CMUdAgIP.js +6 -0
- package/dist/requirementDiagram-MIRIMTAZ-DpFia6HM-BNS6fGqi.js +768 -0
- package/dist/rst-B8JEEtLI-Dyxh6LOj.js +22 -0
- package/dist/ruby-FDlfLkNa-nf7VLvCK.js +50 -0
- package/dist/rust-Pc7DCsZD-Pc7DCsZD.js +6 -0
- package/dist/sankeyDiagram-Y46BX6SQ-a6p3ZaX0-Cwasp0IA.js +805 -0
- package/dist/sass-iCyS6eP9-iCyS6eP9.js +6 -0
- package/dist/scss-DhHc4lxB-D1lMETuy.js +8 -0
- package/dist/sequenceDiagram-G6AWOVSC-DlZ7du4U-z70BwBnZ.js +2274 -0
- package/dist/shellscript-Dn0-btNd-Dn0-btNd.js +6 -0
- package/dist/shellsession-8OLo3sB6-DD6AdPYk.js +8 -0
- package/dist/splunk-CTqDjQdo-CTqDjQdo.js +6 -0
- package/dist/sql-DCkt643--DCkt643-.js +6 -0
- package/dist/ssh-config-DHHGll-v-DHHGll-v.js +6 -0
- package/dist/stateDiagram-MAYHULR4-tK3TdntS-PielUO6n.js +268 -0
- package/dist/stateDiagram-v2-4JROLMXI-Ib4sJL3A--uDyhxdT.js +14 -0
- package/dist/style.css +1 -0
- package/dist/stylus-n_9f0QQ5-n_9f0QQ5.js +6 -0
- package/dist/svelte-01qw6Rxm-Cjp5Srko.js +14 -0
- package/dist/swift-BAWqNR8A-BAWqNR8A.js +6 -0
- package/dist/timeline-definition-U7ZMHBDA-Db9d-9_E-kHwjVd5T.js +804 -0
- package/dist/toml-CQSfOn0e-CQSfOn0e.js +6 -0
- package/dist/tsx-DiGsgWT8-DiGsgWT8.js +6 -0
- package/dist/twig-DxrNSc26-BIWbKTFO.js +18 -0
- package/dist/types/components/DocumentationContent.vue.d.ts +177 -0
- package/dist/types/components/DocumentationContent.vue.d.ts.map +1 -0
- package/dist/types/components/DocumentationDisplay.vue.d.ts +323 -0
- package/dist/types/components/DocumentationDisplay.vue.d.ts.map +1 -0
- package/dist/types/components/DocumentationPageEmptyState.vue.d.ts +30 -0
- package/dist/types/components/DocumentationPageEmptyState.vue.d.ts.map +1 -0
- package/dist/types/components/ProductDocumentModal.vue.d.ts +71 -0
- package/dist/types/components/ProductDocumentModal.vue.d.ts.map +1 -0
- package/dist/types/composables/index.d.ts +6 -0
- package/dist/types/composables/index.d.ts.map +1 -0
- package/dist/types/composables/useI18n.d.ts +9 -0
- package/dist/types/composables/useI18n.d.ts.map +1 -0
- package/dist/types/external-links.d.ts +5 -0
- package/dist/types/external-links.d.ts.map +1 -0
- package/dist/types/helpers.d.ts +8 -0
- package/dist/types/helpers.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types/document-list.d.ts +28 -0
- package/dist/types/types/document-list.d.ts.map +1 -0
- package/dist/types/types/document-modal.d.ts +8 -0
- package/dist/types/types/document-modal.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +3 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/typescript-buWNZFwO-buWNZFwO.js +6 -0
- package/dist/v-wa8Orrdd-wa8Orrdd.js +6 -0
- package/dist/vb-E2_-jk4M-E2_-jk4M.js +6 -0
- package/dist/viml-B-zWOd7Z-B-zWOd7Z.js +6 -0
- package/dist/vue-DdqTpW8B-BrYVXV7A.js +31 -0
- package/dist/vue-html-B9t4RWro-D1UeMTSX.js +10 -0
- package/dist/wasm-Bv5f0gKv-Bv5f0gKv.js +6 -0
- package/dist/wgsl-DnPoPGDU-DnPoPGDU.js +6 -0
- package/dist/xml-ChBsf5uy-0Ovnixsj.js +8 -0
- package/dist/xsl-BefjlXrd-CZ7IlB9K.js +8 -0
- package/dist/xychartDiagram-6QU3TZC5-L2EgHpF7-Dbx9eZ7M.js +1304 -0
- package/dist/yaml-Bbg74JKr-Bbg74JKr.js +6 -0
- package/package.json +2 -2
|
@@ -0,0 +1,937 @@
|
|
|
1
|
+
import { _ as d, g as z, a5 as Et, a6 as kt, a8 as bt, a7 as Ot, al as Rt, am as Nt, l as j, ar as xt, af as rt, aq as Tt, ag as At, ay as Mt, az as wt, aA as St } from "./index-B_RqyDIa.js";
|
|
2
|
+
import { L as Dt } from "./graph-_eClejaU-DigE4Bf5.js";
|
|
3
|
+
import { o as $t } from "./layout-DfjmtgNY-Bw6LFOXt.js";
|
|
4
|
+
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;
|
|
5
|
+
function vt(t) {
|
|
6
|
+
return typeof t == "string" && Lt.test(t);
|
|
7
|
+
}
|
|
8
|
+
const M = [];
|
|
9
|
+
for (let t = 0; t < 256; ++t)
|
|
10
|
+
M.push((t + 256).toString(16).slice(1));
|
|
11
|
+
function It(t, e = 0) {
|
|
12
|
+
return M[t[e + 0]] + M[t[e + 1]] + M[t[e + 2]] + M[t[e + 3]] + "-" + M[t[e + 4]] + M[t[e + 5]] + "-" + M[t[e + 6]] + M[t[e + 7]] + "-" + M[t[e + 8]] + M[t[e + 9]] + "-" + M[t[e + 10]] + M[t[e + 11]] + M[t[e + 12]] + M[t[e + 13]] + M[t[e + 14]] + M[t[e + 15]];
|
|
13
|
+
}
|
|
14
|
+
function Ct(t) {
|
|
15
|
+
if (!vt(t))
|
|
16
|
+
throw TypeError("Invalid UUID");
|
|
17
|
+
let e;
|
|
18
|
+
const r = new Uint8Array(16);
|
|
19
|
+
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;
|
|
20
|
+
}
|
|
21
|
+
function Pt(t) {
|
|
22
|
+
t = unescape(encodeURIComponent(t));
|
|
23
|
+
const e = [];
|
|
24
|
+
for (let r = 0; r < t.length; ++r)
|
|
25
|
+
e.push(t.charCodeAt(r));
|
|
26
|
+
return e;
|
|
27
|
+
}
|
|
28
|
+
const Yt = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", Zt = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
29
|
+
function Bt(t, e, r) {
|
|
30
|
+
function y(c, _, h, l) {
|
|
31
|
+
var u;
|
|
32
|
+
if (typeof c == "string" && (c = Pt(c)), typeof _ == "string" && (_ = Ct(_)), ((u = _) === null || u === void 0 ? void 0 : u.length) !== 16)
|
|
33
|
+
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
34
|
+
let m = new Uint8Array(16 + c.length);
|
|
35
|
+
if (m.set(_), m.set(c, _.length), m = r(m), m[6] = m[6] & 15 | e, m[8] = m[8] & 63 | 128, h) {
|
|
36
|
+
l = l || 0;
|
|
37
|
+
for (let g = 0; g < 16; ++g)
|
|
38
|
+
h[l + g] = m[g];
|
|
39
|
+
return h;
|
|
40
|
+
}
|
|
41
|
+
return It(m);
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
y.name = t;
|
|
45
|
+
} catch {
|
|
46
|
+
}
|
|
47
|
+
return y.DNS = Yt, y.URL = Zt, y;
|
|
48
|
+
}
|
|
49
|
+
function Ft(t, e, r, y) {
|
|
50
|
+
switch (t) {
|
|
51
|
+
case 0:
|
|
52
|
+
return e & r ^ ~e & y;
|
|
53
|
+
case 1:
|
|
54
|
+
return e ^ r ^ y;
|
|
55
|
+
case 2:
|
|
56
|
+
return e & r ^ e & y ^ r & y;
|
|
57
|
+
case 3:
|
|
58
|
+
return e ^ r ^ y;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function it(t, e) {
|
|
62
|
+
return t << e | t >>> 32 - e;
|
|
63
|
+
}
|
|
64
|
+
function zt(t) {
|
|
65
|
+
const e = [1518500249, 1859775393, 2400959708, 3395469782], r = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
66
|
+
if (typeof t == "string") {
|
|
67
|
+
const h = unescape(encodeURIComponent(t));
|
|
68
|
+
t = [];
|
|
69
|
+
for (let l = 0; l < h.length; ++l)
|
|
70
|
+
t.push(h.charCodeAt(l));
|
|
71
|
+
} else Array.isArray(t) || (t = Array.prototype.slice.call(t));
|
|
72
|
+
t.push(128);
|
|
73
|
+
const y = t.length / 4 + 2, c = Math.ceil(y / 16), _ = new Array(c);
|
|
74
|
+
for (let h = 0; h < c; ++h) {
|
|
75
|
+
const l = new Uint32Array(16);
|
|
76
|
+
for (let u = 0; u < 16; ++u)
|
|
77
|
+
l[u] = t[h * 64 + u * 4] << 24 | t[h * 64 + u * 4 + 1] << 16 | t[h * 64 + u * 4 + 2] << 8 | t[h * 64 + u * 4 + 3];
|
|
78
|
+
_[h] = l;
|
|
79
|
+
}
|
|
80
|
+
_[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;
|
|
81
|
+
for (let h = 0; h < c; ++h) {
|
|
82
|
+
const l = new Uint32Array(80);
|
|
83
|
+
for (let f = 0; f < 16; ++f)
|
|
84
|
+
l[f] = _[h][f];
|
|
85
|
+
for (let f = 16; f < 80; ++f)
|
|
86
|
+
l[f] = it(l[f - 3] ^ l[f - 8] ^ l[f - 14] ^ l[f - 16], 1);
|
|
87
|
+
let u = r[0], m = r[1], g = r[2], E = r[3], k = r[4];
|
|
88
|
+
for (let f = 0; f < 80; ++f) {
|
|
89
|
+
const x = Math.floor(f / 20), w = it(u, 5) + Ft(x, m, g, E) + k + e[x] + l[f] >>> 0;
|
|
90
|
+
k = E, E = g, g = it(m, 30) >>> 0, m = u, u = w;
|
|
91
|
+
}
|
|
92
|
+
r[0] = r[0] + u >>> 0, r[1] = r[1] + m >>> 0, r[2] = r[2] + g >>> 0, r[3] = r[3] + E >>> 0, r[4] = r[4] + k >>> 0;
|
|
93
|
+
}
|
|
94
|
+
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];
|
|
95
|
+
}
|
|
96
|
+
const Kt = Bt("v5", 80, zt);
|
|
97
|
+
var at = function() {
|
|
98
|
+
var t = /* @__PURE__ */ d(function(S, a, s, n) {
|
|
99
|
+
for (s = s || {}, n = S.length; n--; s[S[n]] = a) ;
|
|
100
|
+
return s;
|
|
101
|
+
}, "o"), e = [6, 8, 10, 20, 22, 24, 26, 27, 28], r = [1, 10], y = [1, 11], c = [1, 12], _ = [1, 13], h = [1, 14], l = [1, 15], u = [1, 21], m = [1, 22], g = [1, 23], E = [1, 24], k = [1, 25], f = [6, 8, 10, 13, 15, 18, 19, 20, 22, 24, 26, 27, 28, 41, 42, 43, 44, 45], x = [1, 34], w = [27, 28, 46, 47], Y = [41, 42, 43, 44, 45], Z = [17, 34], B = [1, 54], T = [1, 53], D = [17, 34, 36, 38], O = {
|
|
102
|
+
trace: /* @__PURE__ */ d(function() {
|
|
103
|
+
}, "trace"),
|
|
104
|
+
yy: {},
|
|
105
|
+
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 },
|
|
106
|
+
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" },
|
|
107
|
+
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]],
|
|
108
|
+
performAction: /* @__PURE__ */ d(function(S, a, s, n, p, i, A) {
|
|
109
|
+
var o = i.length - 1;
|
|
110
|
+
switch (p) {
|
|
111
|
+
case 1:
|
|
112
|
+
break;
|
|
113
|
+
case 2:
|
|
114
|
+
this.$ = [];
|
|
115
|
+
break;
|
|
116
|
+
case 3:
|
|
117
|
+
i[o - 1].push(i[o]), this.$ = i[o - 1];
|
|
118
|
+
break;
|
|
119
|
+
case 4:
|
|
120
|
+
case 5:
|
|
121
|
+
this.$ = i[o];
|
|
122
|
+
break;
|
|
123
|
+
case 6:
|
|
124
|
+
case 7:
|
|
125
|
+
this.$ = [];
|
|
126
|
+
break;
|
|
127
|
+
case 8:
|
|
128
|
+
n.addEntity(i[o - 4]), n.addEntity(i[o - 2]), n.addRelationship(i[o - 4], i[o], i[o - 2], i[o - 3]);
|
|
129
|
+
break;
|
|
130
|
+
case 9:
|
|
131
|
+
n.addEntity(i[o - 3]), n.addAttributes(i[o - 3], i[o - 1]);
|
|
132
|
+
break;
|
|
133
|
+
case 10:
|
|
134
|
+
n.addEntity(i[o - 2]);
|
|
135
|
+
break;
|
|
136
|
+
case 11:
|
|
137
|
+
n.addEntity(i[o]);
|
|
138
|
+
break;
|
|
139
|
+
case 12:
|
|
140
|
+
n.addEntity(i[o - 6], i[o - 4]), n.addAttributes(i[o - 6], i[o - 1]);
|
|
141
|
+
break;
|
|
142
|
+
case 13:
|
|
143
|
+
n.addEntity(i[o - 5], i[o - 3]);
|
|
144
|
+
break;
|
|
145
|
+
case 14:
|
|
146
|
+
n.addEntity(i[o - 3], i[o - 1]);
|
|
147
|
+
break;
|
|
148
|
+
case 15:
|
|
149
|
+
case 16:
|
|
150
|
+
this.$ = i[o].trim(), n.setAccTitle(this.$);
|
|
151
|
+
break;
|
|
152
|
+
case 17:
|
|
153
|
+
case 18:
|
|
154
|
+
this.$ = i[o].trim(), n.setAccDescription(this.$);
|
|
155
|
+
break;
|
|
156
|
+
case 19:
|
|
157
|
+
case 43:
|
|
158
|
+
this.$ = i[o];
|
|
159
|
+
break;
|
|
160
|
+
case 20:
|
|
161
|
+
case 41:
|
|
162
|
+
case 42:
|
|
163
|
+
this.$ = i[o].replace(/"/g, "");
|
|
164
|
+
break;
|
|
165
|
+
case 21:
|
|
166
|
+
case 29:
|
|
167
|
+
this.$ = [i[o]];
|
|
168
|
+
break;
|
|
169
|
+
case 22:
|
|
170
|
+
i[o].push(i[o - 1]), this.$ = i[o];
|
|
171
|
+
break;
|
|
172
|
+
case 23:
|
|
173
|
+
this.$ = { attributeType: i[o - 1], attributeName: i[o] };
|
|
174
|
+
break;
|
|
175
|
+
case 24:
|
|
176
|
+
this.$ = { attributeType: i[o - 2], attributeName: i[o - 1], attributeKeyTypeList: i[o] };
|
|
177
|
+
break;
|
|
178
|
+
case 25:
|
|
179
|
+
this.$ = { attributeType: i[o - 2], attributeName: i[o - 1], attributeComment: i[o] };
|
|
180
|
+
break;
|
|
181
|
+
case 26:
|
|
182
|
+
this.$ = { attributeType: i[o - 3], attributeName: i[o - 2], attributeKeyTypeList: i[o - 1], attributeComment: i[o] };
|
|
183
|
+
break;
|
|
184
|
+
case 27:
|
|
185
|
+
case 28:
|
|
186
|
+
case 31:
|
|
187
|
+
this.$ = i[o];
|
|
188
|
+
break;
|
|
189
|
+
case 30:
|
|
190
|
+
i[o - 2].push(i[o]), this.$ = i[o - 2];
|
|
191
|
+
break;
|
|
192
|
+
case 32:
|
|
193
|
+
this.$ = i[o].replace(/"/g, "");
|
|
194
|
+
break;
|
|
195
|
+
case 33:
|
|
196
|
+
this.$ = { cardA: i[o], relType: i[o - 1], cardB: i[o - 2] };
|
|
197
|
+
break;
|
|
198
|
+
case 34:
|
|
199
|
+
this.$ = n.Cardinality.ZERO_OR_ONE;
|
|
200
|
+
break;
|
|
201
|
+
case 35:
|
|
202
|
+
this.$ = n.Cardinality.ZERO_OR_MORE;
|
|
203
|
+
break;
|
|
204
|
+
case 36:
|
|
205
|
+
this.$ = n.Cardinality.ONE_OR_MORE;
|
|
206
|
+
break;
|
|
207
|
+
case 37:
|
|
208
|
+
this.$ = n.Cardinality.ONLY_ONE;
|
|
209
|
+
break;
|
|
210
|
+
case 38:
|
|
211
|
+
this.$ = n.Cardinality.MD_PARENT;
|
|
212
|
+
break;
|
|
213
|
+
case 39:
|
|
214
|
+
this.$ = n.Identification.NON_IDENTIFYING;
|
|
215
|
+
break;
|
|
216
|
+
case 40:
|
|
217
|
+
this.$ = n.Identification.IDENTIFYING;
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
}, "anonymous"),
|
|
221
|
+
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: y, 24: c, 26: _, 27: h, 28: l }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 16, 11: 9, 20: r, 22: y, 24: c, 26: _, 27: h, 28: l }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 11], { 12: 17, 39: 20, 15: [1, 18], 18: [1, 19], 41: u, 42: m, 43: g, 44: E, 45: k }), { 21: [1, 26] }, { 23: [1, 27] }, { 25: [1, 28] }, t(e, [2, 18]), t(f, [2, 19]), t(f, [2, 20]), t(e, [2, 4]), { 11: 29, 27: h, 28: l }, { 16: 30, 17: [1, 31], 29: 32, 30: 33, 34: x }, { 11: 35, 27: h, 28: l }, { 40: 36, 46: [1, 37], 47: [1, 38] }, t(w, [2, 34]), t(w, [2, 35]), t(w, [2, 36]), t(w, [2, 37]), t(w, [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: x }, { 31: 42, 34: [1, 43] }, { 34: [2, 27] }, { 19: [1, 44] }, { 39: 45, 41: u, 42: m, 43: g, 44: E, 45: k }, 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: B, 38: T }), 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: T }), t(Z, [2, 25]), t(D, [2, 29]), t(Z, [2, 32]), t(D, [2, 31]), { 16: 58, 17: [1, 59], 29: 32, 30: 33, 34: x }, t(Z, [2, 26]), { 35: 60, 37: B }, { 17: [1, 61] }, t(e, [2, 13]), t(D, [2, 30]), t(e, [2, 12])],
|
|
222
|
+
defaultActions: { 34: [2, 27], 41: [2, 22] },
|
|
223
|
+
parseError: /* @__PURE__ */ d(function(S, a) {
|
|
224
|
+
if (a.recoverable)
|
|
225
|
+
this.trace(S);
|
|
226
|
+
else {
|
|
227
|
+
var s = new Error(S);
|
|
228
|
+
throw s.hash = a, s;
|
|
229
|
+
}
|
|
230
|
+
}, "parseError"),
|
|
231
|
+
parse: /* @__PURE__ */ d(function(S) {
|
|
232
|
+
var a = this, s = [0], n = [], p = [null], i = [], A = this.table, o = "", G = 0, ot = 0, _t = 2, lt = 1, ft = i.slice.call(arguments, 1), N = Object.create(this.lexer), K = { yy: {} };
|
|
233
|
+
for (var q in this.yy)
|
|
234
|
+
Object.prototype.hasOwnProperty.call(this.yy, q) && (K.yy[q] = this.yy[q]);
|
|
235
|
+
N.setInput(S, K.yy), K.yy.lexer = N, K.yy.parser = this, typeof N.yylloc > "u" && (N.yylloc = {});
|
|
236
|
+
var J = N.yylloc;
|
|
237
|
+
i.push(J);
|
|
238
|
+
var gt = N.options && N.options.ranges;
|
|
239
|
+
typeof K.yy.parseError == "function" ? this.parseError = K.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
240
|
+
function mt(L) {
|
|
241
|
+
s.length = s.length - 2 * L, p.length = p.length - L, i.length = i.length - L;
|
|
242
|
+
}
|
|
243
|
+
d(mt, "popStack");
|
|
244
|
+
function ct() {
|
|
245
|
+
var L;
|
|
246
|
+
return L = n.pop() || N.lex() || lt, typeof L != "number" && (L instanceof Array && (n = L, L = n.pop()), L = a.symbols_[L] || L), L;
|
|
247
|
+
}
|
|
248
|
+
d(ct, "lex");
|
|
249
|
+
for (var $, U, I, tt, Q = {}, X, F, ht, V; ; ) {
|
|
250
|
+
if (U = s[s.length - 1], this.defaultActions[U] ? I = this.defaultActions[U] : (($ === null || typeof $ > "u") && ($ = ct()), I = A[U] && A[U][$]), typeof I > "u" || !I.length || !I[0]) {
|
|
251
|
+
var et = "";
|
|
252
|
+
V = [];
|
|
253
|
+
for (X in A[U])
|
|
254
|
+
this.terminals_[X] && X > _t && V.push("'" + this.terminals_[X] + "'");
|
|
255
|
+
N.showPosition ? et = "Parse error on line " + (G + 1) + `:
|
|
256
|
+
` + N.showPosition() + `
|
|
257
|
+
Expecting ` + V.join(", ") + ", got '" + (this.terminals_[$] || $) + "'" : et = "Parse error on line " + (G + 1) + ": Unexpected " + ($ == lt ? "end of input" : "'" + (this.terminals_[$] || $) + "'"), this.parseError(et, {
|
|
258
|
+
text: N.match,
|
|
259
|
+
token: this.terminals_[$] || $,
|
|
260
|
+
line: N.yylineno,
|
|
261
|
+
loc: J,
|
|
262
|
+
expected: V
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
if (I[0] instanceof Array && I.length > 1)
|
|
266
|
+
throw new Error("Parse Error: multiple actions possible at state: " + U + ", token: " + $);
|
|
267
|
+
switch (I[0]) {
|
|
268
|
+
case 1:
|
|
269
|
+
s.push($), p.push(N.yytext), i.push(N.yylloc), s.push(I[1]), $ = null, ot = N.yyleng, o = N.yytext, G = N.yylineno, J = N.yylloc;
|
|
270
|
+
break;
|
|
271
|
+
case 2:
|
|
272
|
+
if (F = this.productions_[I[1]][1], Q.$ = p[p.length - F], Q._$ = {
|
|
273
|
+
first_line: i[i.length - (F || 1)].first_line,
|
|
274
|
+
last_line: i[i.length - 1].last_line,
|
|
275
|
+
first_column: i[i.length - (F || 1)].first_column,
|
|
276
|
+
last_column: i[i.length - 1].last_column
|
|
277
|
+
}, gt && (Q._$.range = [
|
|
278
|
+
i[i.length - (F || 1)].range[0],
|
|
279
|
+
i[i.length - 1].range[1]
|
|
280
|
+
]), tt = this.performAction.apply(Q, [
|
|
281
|
+
o,
|
|
282
|
+
ot,
|
|
283
|
+
G,
|
|
284
|
+
K.yy,
|
|
285
|
+
I[1],
|
|
286
|
+
p,
|
|
287
|
+
i
|
|
288
|
+
].concat(ft)), typeof tt < "u")
|
|
289
|
+
return tt;
|
|
290
|
+
F && (s = s.slice(0, -1 * F * 2), p = p.slice(0, -1 * F), i = i.slice(0, -1 * F)), s.push(this.productions_[I[1]][0]), p.push(Q.$), i.push(Q._$), ht = A[s[s.length - 2]][s[s.length - 1]], s.push(ht);
|
|
291
|
+
break;
|
|
292
|
+
case 3:
|
|
293
|
+
return !0;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
return !0;
|
|
297
|
+
}, "parse")
|
|
298
|
+
}, R = /* @__PURE__ */ function() {
|
|
299
|
+
var S = {
|
|
300
|
+
EOF: 1,
|
|
301
|
+
parseError: /* @__PURE__ */ d(function(a, s) {
|
|
302
|
+
if (this.yy.parser)
|
|
303
|
+
this.yy.parser.parseError(a, s);
|
|
304
|
+
else
|
|
305
|
+
throw new Error(a);
|
|
306
|
+
}, "parseError"),
|
|
307
|
+
// resets the lexer, sets new input
|
|
308
|
+
setInput: /* @__PURE__ */ d(function(a, s) {
|
|
309
|
+
return this.yy = s || this.yy || {}, this._input = a, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
310
|
+
first_line: 1,
|
|
311
|
+
first_column: 0,
|
|
312
|
+
last_line: 1,
|
|
313
|
+
last_column: 0
|
|
314
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
315
|
+
}, "setInput"),
|
|
316
|
+
// consumes and returns one char from the input
|
|
317
|
+
input: /* @__PURE__ */ d(function() {
|
|
318
|
+
var a = this._input[0];
|
|
319
|
+
this.yytext += a, this.yyleng++, this.offset++, this.match += a, this.matched += a;
|
|
320
|
+
var s = a.match(/(?:\r\n?|\n).*/g);
|
|
321
|
+
return s ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), a;
|
|
322
|
+
}, "input"),
|
|
323
|
+
// unshifts one char (or a string) into the input
|
|
324
|
+
unput: /* @__PURE__ */ d(function(a) {
|
|
325
|
+
var s = a.length, n = a.split(/(?:\r\n?|\n)/g);
|
|
326
|
+
this._input = a + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - s), this.offset -= s;
|
|
327
|
+
var p = this.match.split(/(?:\r\n?|\n)/g);
|
|
328
|
+
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);
|
|
329
|
+
var i = this.yylloc.range;
|
|
330
|
+
return this.yylloc = {
|
|
331
|
+
first_line: this.yylloc.first_line,
|
|
332
|
+
last_line: this.yylineno + 1,
|
|
333
|
+
first_column: this.yylloc.first_column,
|
|
334
|
+
last_column: n ? (n.length === p.length ? this.yylloc.first_column : 0) + p[p.length - n.length].length - n[0].length : this.yylloc.first_column - s
|
|
335
|
+
}, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - s]), this.yyleng = this.yytext.length, this;
|
|
336
|
+
}, "unput"),
|
|
337
|
+
// When called from action, caches matched text and appends it on next action
|
|
338
|
+
more: /* @__PURE__ */ d(function() {
|
|
339
|
+
return this._more = !0, this;
|
|
340
|
+
}, "more"),
|
|
341
|
+
// 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.
|
|
342
|
+
reject: /* @__PURE__ */ d(function() {
|
|
343
|
+
if (this.options.backtrack_lexer)
|
|
344
|
+
this._backtrack = !0;
|
|
345
|
+
else
|
|
346
|
+
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).
|
|
347
|
+
` + this.showPosition(), {
|
|
348
|
+
text: "",
|
|
349
|
+
token: null,
|
|
350
|
+
line: this.yylineno
|
|
351
|
+
});
|
|
352
|
+
return this;
|
|
353
|
+
}, "reject"),
|
|
354
|
+
// retain first n characters of the match
|
|
355
|
+
less: /* @__PURE__ */ d(function(a) {
|
|
356
|
+
this.unput(this.match.slice(a));
|
|
357
|
+
}, "less"),
|
|
358
|
+
// displays already matched input, i.e. for error messages
|
|
359
|
+
pastInput: /* @__PURE__ */ d(function() {
|
|
360
|
+
var a = this.matched.substr(0, this.matched.length - this.match.length);
|
|
361
|
+
return (a.length > 20 ? "..." : "") + a.substr(-20).replace(/\n/g, "");
|
|
362
|
+
}, "pastInput"),
|
|
363
|
+
// displays upcoming input, i.e. for error messages
|
|
364
|
+
upcomingInput: /* @__PURE__ */ d(function() {
|
|
365
|
+
var a = this.match;
|
|
366
|
+
return a.length < 20 && (a += this._input.substr(0, 20 - a.length)), (a.substr(0, 20) + (a.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
367
|
+
}, "upcomingInput"),
|
|
368
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
369
|
+
showPosition: /* @__PURE__ */ d(function() {
|
|
370
|
+
var a = this.pastInput(), s = new Array(a.length + 1).join("-");
|
|
371
|
+
return a + this.upcomingInput() + `
|
|
372
|
+
` + s + "^";
|
|
373
|
+
}, "showPosition"),
|
|
374
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
375
|
+
test_match: /* @__PURE__ */ d(function(a, s) {
|
|
376
|
+
var n, p, i;
|
|
377
|
+
if (this.options.backtrack_lexer && (i = {
|
|
378
|
+
yylineno: this.yylineno,
|
|
379
|
+
yylloc: {
|
|
380
|
+
first_line: this.yylloc.first_line,
|
|
381
|
+
last_line: this.last_line,
|
|
382
|
+
first_column: this.yylloc.first_column,
|
|
383
|
+
last_column: this.yylloc.last_column
|
|
384
|
+
},
|
|
385
|
+
yytext: this.yytext,
|
|
386
|
+
match: this.match,
|
|
387
|
+
matches: this.matches,
|
|
388
|
+
matched: this.matched,
|
|
389
|
+
yyleng: this.yyleng,
|
|
390
|
+
offset: this.offset,
|
|
391
|
+
_more: this._more,
|
|
392
|
+
_input: this._input,
|
|
393
|
+
yy: this.yy,
|
|
394
|
+
conditionStack: this.conditionStack.slice(0),
|
|
395
|
+
done: this.done
|
|
396
|
+
}, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), p = a[0].match(/(?:\r\n?|\n).*/g), p && (this.yylineno += p.length), this.yylloc = {
|
|
397
|
+
first_line: this.yylloc.last_line,
|
|
398
|
+
last_line: this.yylineno + 1,
|
|
399
|
+
first_column: this.yylloc.last_column,
|
|
400
|
+
last_column: p ? p[p.length - 1].length - p[p.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + a[0].length
|
|
401
|
+
}, this.yytext += a[0], this.match += a[0], this.matches = a, 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(a[0].length), this.matched += a[0], n = this.performAction.call(this, this.yy, this, s, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
|
|
402
|
+
return n;
|
|
403
|
+
if (this._backtrack) {
|
|
404
|
+
for (var A in i)
|
|
405
|
+
this[A] = i[A];
|
|
406
|
+
return !1;
|
|
407
|
+
}
|
|
408
|
+
return !1;
|
|
409
|
+
}, "test_match"),
|
|
410
|
+
// return next match in input
|
|
411
|
+
next: /* @__PURE__ */ d(function() {
|
|
412
|
+
if (this.done)
|
|
413
|
+
return this.EOF;
|
|
414
|
+
this._input || (this.done = !0);
|
|
415
|
+
var a, s, n, p;
|
|
416
|
+
this._more || (this.yytext = "", this.match = "");
|
|
417
|
+
for (var i = this._currentRules(), A = 0; A < i.length; A++)
|
|
418
|
+
if (n = this._input.match(this.rules[i[A]]), n && (!s || n[0].length > s[0].length)) {
|
|
419
|
+
if (s = n, p = A, this.options.backtrack_lexer) {
|
|
420
|
+
if (a = this.test_match(n, i[A]), a !== !1)
|
|
421
|
+
return a;
|
|
422
|
+
if (this._backtrack) {
|
|
423
|
+
s = !1;
|
|
424
|
+
continue;
|
|
425
|
+
} else
|
|
426
|
+
return !1;
|
|
427
|
+
} else if (!this.options.flex)
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
return s ? (a = this.test_match(s, i[p]), a !== !1 ? a : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
431
|
+
` + this.showPosition(), {
|
|
432
|
+
text: "",
|
|
433
|
+
token: null,
|
|
434
|
+
line: this.yylineno
|
|
435
|
+
});
|
|
436
|
+
}, "next"),
|
|
437
|
+
// return next match that has a token
|
|
438
|
+
lex: /* @__PURE__ */ d(function() {
|
|
439
|
+
var a = this.next();
|
|
440
|
+
return a || this.lex();
|
|
441
|
+
}, "lex"),
|
|
442
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
443
|
+
begin: /* @__PURE__ */ d(function(a) {
|
|
444
|
+
this.conditionStack.push(a);
|
|
445
|
+
}, "begin"),
|
|
446
|
+
// pop the previously active lexer condition state off the condition stack
|
|
447
|
+
popState: /* @__PURE__ */ d(function() {
|
|
448
|
+
var a = this.conditionStack.length - 1;
|
|
449
|
+
return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
450
|
+
}, "popState"),
|
|
451
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
452
|
+
_currentRules: /* @__PURE__ */ d(function() {
|
|
453
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
454
|
+
}, "_currentRules"),
|
|
455
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
456
|
+
topState: /* @__PURE__ */ d(function(a) {
|
|
457
|
+
return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
|
|
458
|
+
}, "topState"),
|
|
459
|
+
// alias for begin(condition)
|
|
460
|
+
pushState: /* @__PURE__ */ d(function(a) {
|
|
461
|
+
this.begin(a);
|
|
462
|
+
}, "pushState"),
|
|
463
|
+
// return the number of states currently on the stack
|
|
464
|
+
stateStackSize: /* @__PURE__ */ d(function() {
|
|
465
|
+
return this.conditionStack.length;
|
|
466
|
+
}, "stateStackSize"),
|
|
467
|
+
options: { "case-insensitive": !0 },
|
|
468
|
+
performAction: /* @__PURE__ */ d(function(a, s, n, p) {
|
|
469
|
+
switch (n) {
|
|
470
|
+
case 0:
|
|
471
|
+
return this.begin("acc_title"), 22;
|
|
472
|
+
case 1:
|
|
473
|
+
return this.popState(), "acc_title_value";
|
|
474
|
+
case 2:
|
|
475
|
+
return this.begin("acc_descr"), 24;
|
|
476
|
+
case 3:
|
|
477
|
+
return this.popState(), "acc_descr_value";
|
|
478
|
+
case 4:
|
|
479
|
+
this.begin("acc_descr_multiline");
|
|
480
|
+
break;
|
|
481
|
+
case 5:
|
|
482
|
+
this.popState();
|
|
483
|
+
break;
|
|
484
|
+
case 6:
|
|
485
|
+
return "acc_descr_multiline_value";
|
|
486
|
+
case 7:
|
|
487
|
+
return 10;
|
|
488
|
+
case 8:
|
|
489
|
+
break;
|
|
490
|
+
case 9:
|
|
491
|
+
return 8;
|
|
492
|
+
case 10:
|
|
493
|
+
return 28;
|
|
494
|
+
case 11:
|
|
495
|
+
return 48;
|
|
496
|
+
case 12:
|
|
497
|
+
return 4;
|
|
498
|
+
case 13:
|
|
499
|
+
return this.begin("block"), 15;
|
|
500
|
+
case 14:
|
|
501
|
+
return 36;
|
|
502
|
+
case 15:
|
|
503
|
+
break;
|
|
504
|
+
case 16:
|
|
505
|
+
return 37;
|
|
506
|
+
case 17:
|
|
507
|
+
return 34;
|
|
508
|
+
case 18:
|
|
509
|
+
return 34;
|
|
510
|
+
case 19:
|
|
511
|
+
return 38;
|
|
512
|
+
case 20:
|
|
513
|
+
break;
|
|
514
|
+
case 21:
|
|
515
|
+
return this.popState(), 17;
|
|
516
|
+
case 22:
|
|
517
|
+
return s.yytext[0];
|
|
518
|
+
case 23:
|
|
519
|
+
return 18;
|
|
520
|
+
case 24:
|
|
521
|
+
return 19;
|
|
522
|
+
case 25:
|
|
523
|
+
return 41;
|
|
524
|
+
case 26:
|
|
525
|
+
return 43;
|
|
526
|
+
case 27:
|
|
527
|
+
return 43;
|
|
528
|
+
case 28:
|
|
529
|
+
return 43;
|
|
530
|
+
case 29:
|
|
531
|
+
return 41;
|
|
532
|
+
case 30:
|
|
533
|
+
return 41;
|
|
534
|
+
case 31:
|
|
535
|
+
return 42;
|
|
536
|
+
case 32:
|
|
537
|
+
return 42;
|
|
538
|
+
case 33:
|
|
539
|
+
return 42;
|
|
540
|
+
case 34:
|
|
541
|
+
return 42;
|
|
542
|
+
case 35:
|
|
543
|
+
return 42;
|
|
544
|
+
case 36:
|
|
545
|
+
return 43;
|
|
546
|
+
case 37:
|
|
547
|
+
return 42;
|
|
548
|
+
case 38:
|
|
549
|
+
return 43;
|
|
550
|
+
case 39:
|
|
551
|
+
return 44;
|
|
552
|
+
case 40:
|
|
553
|
+
return 44;
|
|
554
|
+
case 41:
|
|
555
|
+
return 44;
|
|
556
|
+
case 42:
|
|
557
|
+
return 44;
|
|
558
|
+
case 43:
|
|
559
|
+
return 41;
|
|
560
|
+
case 44:
|
|
561
|
+
return 42;
|
|
562
|
+
case 45:
|
|
563
|
+
return 43;
|
|
564
|
+
case 46:
|
|
565
|
+
return 45;
|
|
566
|
+
case 47:
|
|
567
|
+
return 46;
|
|
568
|
+
case 48:
|
|
569
|
+
return 47;
|
|
570
|
+
case 49:
|
|
571
|
+
return 47;
|
|
572
|
+
case 50:
|
|
573
|
+
return 46;
|
|
574
|
+
case 51:
|
|
575
|
+
return 46;
|
|
576
|
+
case 52:
|
|
577
|
+
return 46;
|
|
578
|
+
case 53:
|
|
579
|
+
return 27;
|
|
580
|
+
case 54:
|
|
581
|
+
return s.yytext[0];
|
|
582
|
+
case 55:
|
|
583
|
+
return 6;
|
|
584
|
+
}
|
|
585
|
+
}, "anonymous"),
|
|
586
|
+
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],
|
|
587
|
+
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 } }
|
|
588
|
+
};
|
|
589
|
+
return S;
|
|
590
|
+
}();
|
|
591
|
+
O.lexer = R;
|
|
592
|
+
function v() {
|
|
593
|
+
this.yy = {};
|
|
594
|
+
}
|
|
595
|
+
return d(v, "Parser"), v.prototype = O, O.Parser = v, new v();
|
|
596
|
+
}();
|
|
597
|
+
at.parser = at;
|
|
598
|
+
var Ut = at, H = /* @__PURE__ */ new Map(), st = [], Ht = {
|
|
599
|
+
ZERO_OR_ONE: "ZERO_OR_ONE",
|
|
600
|
+
ZERO_OR_MORE: "ZERO_OR_MORE",
|
|
601
|
+
ONE_OR_MORE: "ONE_OR_MORE",
|
|
602
|
+
ONLY_ONE: "ONLY_ONE",
|
|
603
|
+
MD_PARENT: "MD_PARENT"
|
|
604
|
+
}, Qt = {
|
|
605
|
+
NON_IDENTIFYING: "NON_IDENTIFYING",
|
|
606
|
+
IDENTIFYING: "IDENTIFYING"
|
|
607
|
+
}, ut = /* @__PURE__ */ d(function(t, e = void 0) {
|
|
608
|
+
return H.has(t) ? !H.get(t).alias && e && (H.get(t).alias = e, j.info(`Add alias '${e}' to entity '${t}'`)) : (H.set(t, { attributes: [], alias: e }), j.info("Added new entity :", t)), H.get(t);
|
|
609
|
+
}, "addEntity"), jt = /* @__PURE__ */ d(() => H, "getEntities"), Wt = /* @__PURE__ */ d(function(t, e) {
|
|
610
|
+
let r = ut(t), y;
|
|
611
|
+
for (y = e.length - 1; y >= 0; y--)
|
|
612
|
+
r.attributes.push(e[y]), j.debug("Added attribute ", e[y].attributeName);
|
|
613
|
+
}, "addAttributes"), Gt = /* @__PURE__ */ d(function(t, e, r, y) {
|
|
614
|
+
let c = {
|
|
615
|
+
entityA: t,
|
|
616
|
+
roleA: e,
|
|
617
|
+
entityB: r,
|
|
618
|
+
relSpec: y
|
|
619
|
+
};
|
|
620
|
+
st.push(c), j.debug("Added new relationship :", c);
|
|
621
|
+
}, "addRelationship"), Xt = /* @__PURE__ */ d(() => st, "getRelationships"), Vt = /* @__PURE__ */ d(function() {
|
|
622
|
+
H = /* @__PURE__ */ new Map(), st = [], xt();
|
|
623
|
+
}, "clear"), qt = {
|
|
624
|
+
Cardinality: Ht,
|
|
625
|
+
Identification: Qt,
|
|
626
|
+
getConfig: /* @__PURE__ */ d(() => z().er, "getConfig"),
|
|
627
|
+
addEntity: ut,
|
|
628
|
+
addAttributes: Wt,
|
|
629
|
+
getEntities: jt,
|
|
630
|
+
addRelationship: Gt,
|
|
631
|
+
getRelationships: Xt,
|
|
632
|
+
clear: Vt,
|
|
633
|
+
setAccTitle: Et,
|
|
634
|
+
getAccTitle: kt,
|
|
635
|
+
setAccDescription: bt,
|
|
636
|
+
getAccDescription: Ot,
|
|
637
|
+
setDiagramTitle: Rt,
|
|
638
|
+
getDiagramTitle: Nt
|
|
639
|
+
}, C = {
|
|
640
|
+
ONLY_ONE_START: "ONLY_ONE_START",
|
|
641
|
+
ONLY_ONE_END: "ONLY_ONE_END",
|
|
642
|
+
ZERO_OR_ONE_START: "ZERO_OR_ONE_START",
|
|
643
|
+
ZERO_OR_ONE_END: "ZERO_OR_ONE_END",
|
|
644
|
+
ONE_OR_MORE_START: "ONE_OR_MORE_START",
|
|
645
|
+
ONE_OR_MORE_END: "ONE_OR_MORE_END",
|
|
646
|
+
ZERO_OR_MORE_START: "ZERO_OR_MORE_START",
|
|
647
|
+
ZERO_OR_MORE_END: "ZERO_OR_MORE_END",
|
|
648
|
+
MD_PARENT_END: "MD_PARENT_END",
|
|
649
|
+
MD_PARENT_START: "MD_PARENT_START"
|
|
650
|
+
}, Jt = /* @__PURE__ */ d(function(t, e) {
|
|
651
|
+
let r;
|
|
652
|
+
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");
|
|
653
|
+
}, "insertMarkers"), P = {
|
|
654
|
+
ERMarkers: C,
|
|
655
|
+
insertMarkers: Jt
|
|
656
|
+
}, te = /[^\dA-Za-z](\W)*/g, b = {}, W = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ d(function(t) {
|
|
657
|
+
const e = Object.keys(t);
|
|
658
|
+
for (const r of e)
|
|
659
|
+
b[r] = t[r];
|
|
660
|
+
}, "setConf"), re = /* @__PURE__ */ d((t, e, r) => {
|
|
661
|
+
const y = b.entityPadding / 3, c = b.entityPadding / 3, _ = b.fontSize * 0.85, h = e.node().getBBox(), l = [];
|
|
662
|
+
let u = !1, m = !1, g = 0, E = 0, k = 0, f = 0, x = h.height + y * 2, w = 1;
|
|
663
|
+
r.forEach((T) => {
|
|
664
|
+
T.attributeKeyTypeList !== void 0 && T.attributeKeyTypeList.length > 0 && (u = !0), T.attributeComment !== void 0 && (m = !0);
|
|
665
|
+
}), r.forEach((T) => {
|
|
666
|
+
const D = `${e.node().id}-attr-${w}`;
|
|
667
|
+
let O = 0;
|
|
668
|
+
const R = St(T.attributeType), v = t.append("text").classed("er entityLabel", !0).attr("id", `${D}-type`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", z().fontFamily).style("font-size", _ + "px").text(R), S = t.append("text").classed("er entityLabel", !0).attr("id", `${D}-name`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", z().fontFamily).style("font-size", _ + "px").text(T.attributeName), a = {};
|
|
669
|
+
a.tn = v, a.nn = S;
|
|
670
|
+
const s = v.node().getBBox(), n = S.node().getBBox();
|
|
671
|
+
if (g = Math.max(g, s.width), E = Math.max(E, n.width), O = Math.max(s.height, n.height), u) {
|
|
672
|
+
const p = T.attributeKeyTypeList !== void 0 ? T.attributeKeyTypeList.join(",") : "", i = t.append("text").classed("er entityLabel", !0).attr("id", `${D}-key`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", z().fontFamily).style("font-size", _ + "px").text(p);
|
|
673
|
+
a.kn = i;
|
|
674
|
+
const A = i.node().getBBox();
|
|
675
|
+
k = Math.max(k, A.width), O = Math.max(O, A.height);
|
|
676
|
+
}
|
|
677
|
+
if (m) {
|
|
678
|
+
const p = t.append("text").classed("er entityLabel", !0).attr("id", `${D}-comment`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", z().fontFamily).style("font-size", _ + "px").text(T.attributeComment || "");
|
|
679
|
+
a.cn = p;
|
|
680
|
+
const i = p.node().getBBox();
|
|
681
|
+
f = Math.max(f, i.width), O = Math.max(O, i.height);
|
|
682
|
+
}
|
|
683
|
+
a.height = O, l.push(a), x += O + y * 2, w += 1;
|
|
684
|
+
});
|
|
685
|
+
let Y = 4;
|
|
686
|
+
u && (Y += 2), m && (Y += 2);
|
|
687
|
+
const Z = g + E + k + f, B = {
|
|
688
|
+
width: Math.max(
|
|
689
|
+
b.minEntityWidth,
|
|
690
|
+
Math.max(
|
|
691
|
+
h.width + b.entityPadding * 2,
|
|
692
|
+
Z + c * Y
|
|
693
|
+
)
|
|
694
|
+
),
|
|
695
|
+
height: r.length > 0 ? x : Math.max(b.minEntityHeight, h.height + b.entityPadding * 2)
|
|
696
|
+
};
|
|
697
|
+
if (r.length > 0) {
|
|
698
|
+
const T = Math.max(
|
|
699
|
+
0,
|
|
700
|
+
(B.width - Z - c * Y) / (Y / 2)
|
|
701
|
+
);
|
|
702
|
+
e.attr(
|
|
703
|
+
"transform",
|
|
704
|
+
"translate(" + B.width / 2 + "," + (y + h.height / 2) + ")"
|
|
705
|
+
);
|
|
706
|
+
let D = h.height + y * 2, O = "attributeBoxOdd";
|
|
707
|
+
l.forEach((R) => {
|
|
708
|
+
const v = D + y + R.height / 2;
|
|
709
|
+
R.tn.attr("transform", "translate(" + c + "," + v + ")");
|
|
710
|
+
const S = t.insert("rect", "#" + R.tn.node().id).classed(`er ${O}`, !0).attr("x", 0).attr("y", D).attr("width", g + c * 2 + T).attr("height", R.height + y * 2), a = parseFloat(S.attr("x")) + parseFloat(S.attr("width"));
|
|
711
|
+
R.nn.attr(
|
|
712
|
+
"transform",
|
|
713
|
+
"translate(" + (a + c) + "," + v + ")"
|
|
714
|
+
);
|
|
715
|
+
const s = t.insert("rect", "#" + R.nn.node().id).classed(`er ${O}`, !0).attr("x", a).attr("y", D).attr("width", E + c * 2 + T).attr("height", R.height + y * 2);
|
|
716
|
+
let n = parseFloat(s.attr("x")) + parseFloat(s.attr("width"));
|
|
717
|
+
if (u) {
|
|
718
|
+
R.kn.attr(
|
|
719
|
+
"transform",
|
|
720
|
+
"translate(" + (n + c) + "," + v + ")"
|
|
721
|
+
);
|
|
722
|
+
const p = t.insert("rect", "#" + R.kn.node().id).classed(`er ${O}`, !0).attr("x", n).attr("y", D).attr("width", k + c * 2 + T).attr("height", R.height + y * 2);
|
|
723
|
+
n = parseFloat(p.attr("x")) + parseFloat(p.attr("width"));
|
|
724
|
+
}
|
|
725
|
+
m && (R.cn.attr(
|
|
726
|
+
"transform",
|
|
727
|
+
"translate(" + (n + c) + "," + v + ")"
|
|
728
|
+
), t.insert("rect", "#" + R.cn.node().id).classed(`er ${O}`, "true").attr("x", n).attr("y", D).attr("width", f + c * 2 + T).attr("height", R.height + y * 2)), D += R.height + y * 2, O = O === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd";
|
|
729
|
+
});
|
|
730
|
+
} else
|
|
731
|
+
B.height = Math.max(b.minEntityHeight, x), e.attr("transform", "translate(" + B.width / 2 + "," + B.height / 2 + ")");
|
|
732
|
+
return B;
|
|
733
|
+
}, "drawAttributes"), ie = /* @__PURE__ */ d(function(t, e, r) {
|
|
734
|
+
const y = [...e.keys()];
|
|
735
|
+
let c;
|
|
736
|
+
return y.forEach(function(_) {
|
|
737
|
+
const h = pt(_, "entity");
|
|
738
|
+
W.set(_, h);
|
|
739
|
+
const l = t.append("g").attr("id", h);
|
|
740
|
+
c = c === void 0 ? h : c;
|
|
741
|
+
const u = "text-" + h, m = l.append("text").classed("er entityLabel", !0).attr("id", u).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "middle").style("font-family", z().fontFamily).style("font-size", b.fontSize + "px").text(e.get(_).alias ?? _), { width: g, height: E } = re(
|
|
742
|
+
l,
|
|
743
|
+
m,
|
|
744
|
+
e.get(_).attributes
|
|
745
|
+
), k = l.insert("rect", "#" + u).classed("er entityBox", !0).attr("x", 0).attr("y", 0).attr("width", g).attr("height", E).node().getBBox();
|
|
746
|
+
r.setNode(h, {
|
|
747
|
+
width: k.width,
|
|
748
|
+
height: k.height,
|
|
749
|
+
shape: "rect",
|
|
750
|
+
id: h
|
|
751
|
+
});
|
|
752
|
+
}), c;
|
|
753
|
+
}, "drawEntities"), ae = /* @__PURE__ */ d(function(t, e) {
|
|
754
|
+
e.nodes().forEach(function(r) {
|
|
755
|
+
r !== void 0 && e.node(r) !== void 0 && t.select("#" + r).attr(
|
|
756
|
+
"transform",
|
|
757
|
+
"translate(" + (e.node(r).x - e.node(r).width / 2) + "," + (e.node(r).y - e.node(r).height / 2) + " )"
|
|
758
|
+
);
|
|
759
|
+
});
|
|
760
|
+
}, "adjustEntities"), yt = /* @__PURE__ */ d(function(t) {
|
|
761
|
+
return (t.entityA + t.roleA + t.entityB).replace(/\s/g, "");
|
|
762
|
+
}, "getEdgeName"), ne = /* @__PURE__ */ d(function(t, e) {
|
|
763
|
+
return t.forEach(function(r) {
|
|
764
|
+
e.setEdge(
|
|
765
|
+
W.get(r.entityA),
|
|
766
|
+
W.get(r.entityB),
|
|
767
|
+
{ relationship: r },
|
|
768
|
+
yt(r)
|
|
769
|
+
);
|
|
770
|
+
}), t;
|
|
771
|
+
}, "addRelationships"), dt = 0, se = /* @__PURE__ */ d(function(t, e, r, y, c) {
|
|
772
|
+
dt++;
|
|
773
|
+
const _ = r.edge(
|
|
774
|
+
W.get(e.entityA),
|
|
775
|
+
W.get(e.entityB),
|
|
776
|
+
yt(e)
|
|
777
|
+
), h = Mt().x(function(w) {
|
|
778
|
+
return w.x;
|
|
779
|
+
}).y(function(w) {
|
|
780
|
+
return w.y;
|
|
781
|
+
}).curve(wt), l = t.insert("path", "#" + y).classed("er relationshipLine", !0).attr("d", h(_.points)).style("stroke", b.stroke).style("fill", "none");
|
|
782
|
+
e.relSpec.relType === c.db.Identification.NON_IDENTIFYING && l.attr("stroke-dasharray", "8,8");
|
|
783
|
+
let u = "";
|
|
784
|
+
switch (b.arrowMarkerAbsolute && (u = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, u = u.replace(/\(/g, "\\("), u = u.replace(/\)/g, "\\)")), e.relSpec.cardA) {
|
|
785
|
+
case c.db.Cardinality.ZERO_OR_ONE:
|
|
786
|
+
l.attr("marker-end", "url(" + u + "#" + P.ERMarkers.ZERO_OR_ONE_END + ")");
|
|
787
|
+
break;
|
|
788
|
+
case c.db.Cardinality.ZERO_OR_MORE:
|
|
789
|
+
l.attr("marker-end", "url(" + u + "#" + P.ERMarkers.ZERO_OR_MORE_END + ")");
|
|
790
|
+
break;
|
|
791
|
+
case c.db.Cardinality.ONE_OR_MORE:
|
|
792
|
+
l.attr("marker-end", "url(" + u + "#" + P.ERMarkers.ONE_OR_MORE_END + ")");
|
|
793
|
+
break;
|
|
794
|
+
case c.db.Cardinality.ONLY_ONE:
|
|
795
|
+
l.attr("marker-end", "url(" + u + "#" + P.ERMarkers.ONLY_ONE_END + ")");
|
|
796
|
+
break;
|
|
797
|
+
case c.db.Cardinality.MD_PARENT:
|
|
798
|
+
l.attr("marker-end", "url(" + u + "#" + P.ERMarkers.MD_PARENT_END + ")");
|
|
799
|
+
break;
|
|
800
|
+
}
|
|
801
|
+
switch (e.relSpec.cardB) {
|
|
802
|
+
case c.db.Cardinality.ZERO_OR_ONE:
|
|
803
|
+
l.attr(
|
|
804
|
+
"marker-start",
|
|
805
|
+
"url(" + u + "#" + P.ERMarkers.ZERO_OR_ONE_START + ")"
|
|
806
|
+
);
|
|
807
|
+
break;
|
|
808
|
+
case c.db.Cardinality.ZERO_OR_MORE:
|
|
809
|
+
l.attr(
|
|
810
|
+
"marker-start",
|
|
811
|
+
"url(" + u + "#" + P.ERMarkers.ZERO_OR_MORE_START + ")"
|
|
812
|
+
);
|
|
813
|
+
break;
|
|
814
|
+
case c.db.Cardinality.ONE_OR_MORE:
|
|
815
|
+
l.attr(
|
|
816
|
+
"marker-start",
|
|
817
|
+
"url(" + u + "#" + P.ERMarkers.ONE_OR_MORE_START + ")"
|
|
818
|
+
);
|
|
819
|
+
break;
|
|
820
|
+
case c.db.Cardinality.ONLY_ONE:
|
|
821
|
+
l.attr("marker-start", "url(" + u + "#" + P.ERMarkers.ONLY_ONE_START + ")");
|
|
822
|
+
break;
|
|
823
|
+
case c.db.Cardinality.MD_PARENT:
|
|
824
|
+
l.attr("marker-start", "url(" + u + "#" + P.ERMarkers.MD_PARENT_START + ")");
|
|
825
|
+
break;
|
|
826
|
+
}
|
|
827
|
+
const m = l.node().getTotalLength(), g = l.node().getPointAtLength(m * 0.5), E = "rel" + dt, k = e.roleA.split(/<br ?\/>/g), f = t.append("text").classed("er relationshipLabel", !0).attr("id", E).attr("x", g.x).attr("y", g.y).style("text-anchor", "middle").style("dominant-baseline", "middle").style("font-family", z().fontFamily).style("font-size", b.fontSize + "px");
|
|
828
|
+
if (k.length == 1)
|
|
829
|
+
f.text(e.roleA);
|
|
830
|
+
else {
|
|
831
|
+
const w = -(k.length - 1) * 0.5;
|
|
832
|
+
k.forEach((Y, Z) => {
|
|
833
|
+
f.append("tspan").attr("x", g.x).attr("dy", `${Z === 0 ? w : 1}em`).text(Y);
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
const x = f.node().getBBox();
|
|
837
|
+
t.insert("rect", "#" + E).classed("er relationshipLabelBox", !0).attr("x", g.x - x.width / 2).attr("y", g.y - x.height / 2).attr("width", x.width).attr("height", x.height);
|
|
838
|
+
}, "drawRelationshipFromLayout"), oe = /* @__PURE__ */ d(function(t, e, r, y) {
|
|
839
|
+
b = z().er, j.info("Drawing ER diagram");
|
|
840
|
+
const c = z().securityLevel;
|
|
841
|
+
let _;
|
|
842
|
+
c === "sandbox" && (_ = rt("#i" + e));
|
|
843
|
+
const h = (c === "sandbox" ? rt(_.nodes()[0].contentDocument.body) : rt("body")).select(`[id='${e}']`);
|
|
844
|
+
P.insertMarkers(h, b);
|
|
845
|
+
let l;
|
|
846
|
+
l = new Dt({
|
|
847
|
+
multigraph: !0,
|
|
848
|
+
directed: !0,
|
|
849
|
+
compound: !1
|
|
850
|
+
}).setGraph({
|
|
851
|
+
rankdir: b.layoutDirection,
|
|
852
|
+
marginx: 20,
|
|
853
|
+
marginy: 20,
|
|
854
|
+
nodesep: 100,
|
|
855
|
+
edgesep: 100,
|
|
856
|
+
ranksep: 100
|
|
857
|
+
}).setDefaultEdgeLabel(function() {
|
|
858
|
+
return {};
|
|
859
|
+
});
|
|
860
|
+
const u = ie(h, y.db.getEntities(), l), m = ne(y.db.getRelationships(), l);
|
|
861
|
+
$t(l), ae(h, l), m.forEach(function(x) {
|
|
862
|
+
se(h, x, l, u, y);
|
|
863
|
+
});
|
|
864
|
+
const g = b.diagramPadding;
|
|
865
|
+
Tt.insertTitle(h, "entityTitleText", b.titleTopMargin, y.db.getDiagramTitle());
|
|
866
|
+
const E = h.node().getBBox(), k = E.width + g * 2, f = E.height + g * 2;
|
|
867
|
+
At(h, f, k, b.useMaxWidth), h.attr("viewBox", `${E.x - g} ${E.y - g} ${k} ${f}`);
|
|
868
|
+
}, "draw"), le = "28e9f9db-3c8d-5aa5-9faf-44286ae5937c";
|
|
869
|
+
function pt(t = "", e = "") {
|
|
870
|
+
const r = t.replace(te, "");
|
|
871
|
+
return `${nt(e)}${nt(r)}${Kt(
|
|
872
|
+
t,
|
|
873
|
+
le
|
|
874
|
+
)}`;
|
|
875
|
+
}
|
|
876
|
+
d(pt, "generateId");
|
|
877
|
+
function nt(t = "") {
|
|
878
|
+
return t.length > 0 ? `${t}-` : "";
|
|
879
|
+
}
|
|
880
|
+
d(nt, "strWithHyphen");
|
|
881
|
+
var ce = {
|
|
882
|
+
setConf: ee,
|
|
883
|
+
draw: oe
|
|
884
|
+
}, he = /* @__PURE__ */ d((t) => `
|
|
885
|
+
.entityBox {
|
|
886
|
+
fill: ${t.mainBkg};
|
|
887
|
+
stroke: ${t.nodeBorder};
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
.attributeBoxOdd {
|
|
891
|
+
fill: ${t.attributeBackgroundColorOdd};
|
|
892
|
+
stroke: ${t.nodeBorder};
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
.attributeBoxEven {
|
|
896
|
+
fill: ${t.attributeBackgroundColorEven};
|
|
897
|
+
stroke: ${t.nodeBorder};
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
.relationshipLabelBox {
|
|
901
|
+
fill: ${t.tertiaryColor};
|
|
902
|
+
opacity: 0.7;
|
|
903
|
+
background-color: ${t.tertiaryColor};
|
|
904
|
+
rect {
|
|
905
|
+
opacity: 0.5;
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
.relationshipLine {
|
|
910
|
+
stroke: ${t.lineColor};
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.entityTitleText {
|
|
914
|
+
text-anchor: middle;
|
|
915
|
+
font-size: 18px;
|
|
916
|
+
fill: ${t.textColor};
|
|
917
|
+
}
|
|
918
|
+
#MD_PARENT_START {
|
|
919
|
+
fill: #f5f5f5 !important;
|
|
920
|
+
stroke: ${t.lineColor} !important;
|
|
921
|
+
stroke-width: 1;
|
|
922
|
+
}
|
|
923
|
+
#MD_PARENT_END {
|
|
924
|
+
fill: #f5f5f5 !important;
|
|
925
|
+
stroke: ${t.lineColor} !important;
|
|
926
|
+
stroke-width: 1;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
`, "getStyles"), de = he, _e = {
|
|
930
|
+
parser: Ut,
|
|
931
|
+
db: qt,
|
|
932
|
+
renderer: ce,
|
|
933
|
+
styles: de
|
|
934
|
+
};
|
|
935
|
+
export {
|
|
936
|
+
_e as diagram
|
|
937
|
+
};
|