docmedown 0.1.0 → 0.1.2

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 (233) hide show
  1. package/README.md +69 -20
  2. package/dist/abnfDiagram-VCTEODGH-CtQBp0Qv.mjs +89 -0
  3. package/dist/abnfDiagram-VCTEODGH-mccrzlD_.js +1 -0
  4. package/dist/arc-DgPKXEdT.mjs +82 -0
  5. package/dist/arc-n7TW7Bis.js +1 -0
  6. package/dist/architecture-7GRP2DOG-B7myQ46f.js +1 -0
  7. package/dist/architecture-7GRP2DOG-Cxj1ussQ.mjs +3 -0
  8. package/dist/architectureDiagram-5GKGNRK7-BdTCu5T3.js +36 -0
  9. package/dist/architectureDiagram-5GKGNRK7-CkgZa-G1.mjs +4154 -0
  10. package/dist/array-CApNbSU9.mjs +6 -0
  11. package/dist/array-DZSRzHA_.js +1 -0
  12. package/dist/blockDiagram-I7D4REHJ-CSYvpxQw.js +129 -0
  13. package/dist/blockDiagram-I7D4REHJ-CYngfPD9.mjs +1922 -0
  14. package/dist/c4Diagram-7LVT6UL2-B-sz5MUK.js +38 -0
  15. package/dist/c4Diagram-7LVT6UL2-DEzxFf2b.mjs +3010 -0
  16. package/dist/channel-LgHproiI.mjs +5 -0
  17. package/dist/channel-yqu0m4cl.js +1 -0
  18. package/dist/chunk-2E4U76K2-BOyeRQsI.js +1 -0
  19. package/dist/chunk-2E4U76K2-CoTrgtfg.mjs +348 -0
  20. package/dist/chunk-2Q5K7J3B-D4EgYPOq.mjs +15 -0
  21. package/dist/chunk-2Q5K7J3B-DhjCNjaM.js +1 -0
  22. package/dist/chunk-4HAMMTFA-GFyfmcSO.js +62 -0
  23. package/dist/chunk-4HAMMTFA-VgWPe1ng.mjs +4188 -0
  24. package/dist/chunk-5VM5RSS4-GINalzIv.js +15 -0
  25. package/dist/chunk-5VM5RSS4-TqxtqrwE.mjs +5 -0
  26. package/dist/chunk-75Z2AOVW-DYouz5MZ.js +2 -0
  27. package/dist/chunk-75Z2AOVW-Dz0Sko9Y.mjs +1330 -0
  28. package/dist/chunk-CLGD4ZFX-C5J-e2io.js +1 -0
  29. package/dist/chunk-CLGD4ZFX-DBkwyMMv.mjs +14 -0
  30. package/dist/chunk-DU6HZSFF-BEQZSmUu.mjs +3836 -0
  31. package/dist/chunk-DU6HZSFF-CWc5ewtb.js +127 -0
  32. package/dist/chunk-F27PBJKO-8jvY_jJK.js +1 -0
  33. package/dist/chunk-F27PBJKO-DFH3sRZG.mjs +61 -0
  34. package/dist/chunk-FOHPRMQF-LRqOLsSw.mjs +21456 -0
  35. package/dist/chunk-FOHPRMQF-tmTlwTeH.js +161 -0
  36. package/dist/chunk-GMAD6QVW-BZeZ4fdb.mjs +1863 -0
  37. package/dist/chunk-GMAD6QVW-DEQiTa0c.js +72 -0
  38. package/dist/chunk-GVQU2GXP-B1D3J05J.mjs +37 -0
  39. package/dist/chunk-GVQU2GXP-CdJIWN41.js +1 -0
  40. package/dist/chunk-IMKFNOWR-BmZb9U1f.mjs +2042 -0
  41. package/dist/chunk-IMKFNOWR-CPJsszGN.js +231 -0
  42. package/dist/chunk-JWPE2WC7-DIKiF5cm.mjs +8 -0
  43. package/dist/chunk-JWPE2WC7-p1fYVdYc.js +1 -0
  44. package/dist/chunk-L3NEJ4N5-TzDiVs78.js +1 -0
  45. package/dist/chunk-L3NEJ4N5-lal8wUID.mjs +245 -0
  46. package/dist/chunk-LNGE3PJU-BQX75wkM.js +34 -0
  47. package/dist/chunk-LNGE3PJU-DJ9JuXV6.mjs +1521 -0
  48. package/dist/chunk-OSK3NFVY-9AWK88m1.mjs +672 -0
  49. package/dist/chunk-OSK3NFVY-CHzvVe8m.js +10 -0
  50. package/dist/chunk-P2QGCYS3-6q3AXPt5.mjs +67 -0
  51. package/dist/chunk-P2QGCYS3-DKZzpRQW.js +1 -0
  52. package/dist/chunk-POPQ4Y6H-Dd7J9tx3.mjs +26 -0
  53. package/dist/chunk-POPQ4Y6H-T5C7wpjf.js +1 -0
  54. package/dist/chunk-PWAF6VOD-BYG76tEe.mjs +275 -0
  55. package/dist/chunk-PWAF6VOD-DxZLuCEw.js +1 -0
  56. package/dist/chunk-SHT3W25Y-B2Wes8jn.mjs +4183 -0
  57. package/dist/chunk-SHT3W25Y-BQjHSn5K.js +168 -0
  58. package/dist/chunk-SVP7TREG-BFMd615E.js +88 -0
  59. package/dist/chunk-SVP7TREG-CynckzeF.mjs +490 -0
  60. package/dist/chunk-TICWLB2K-BfCuoR1V.mjs +3357 -0
  61. package/dist/chunk-TICWLB2K-agcyBfUp.js +206 -0
  62. package/dist/chunk-TLUHSLCS-CUrWaKDG.mjs +59 -0
  63. package/dist/chunk-TLUHSLCS-Drx_a7am.js +1 -0
  64. package/dist/chunk-XXDRQBXY-AAk1-Cyg.js +1 -0
  65. package/dist/chunk-XXDRQBXY-DpR8eYzz.mjs +9 -0
  66. package/dist/chunk-Y2CYZVJY-CnmLqFtv.js +1 -0
  67. package/dist/chunk-Y2CYZVJY-i11wjrBe.mjs +12 -0
  68. package/dist/classDiagram-ZZMXUADV-B7IN9zcX.js +1 -0
  69. package/dist/classDiagram-ZZMXUADV-tcy6gxSB.mjs +30 -0
  70. package/dist/classDiagram-v2-VYDZK3BY-B7IN9zcX.js +1 -0
  71. package/dist/classDiagram-v2-VYDZK3BY-D5wM6Acp.mjs +30 -0
  72. package/dist/cli.js +719 -532
  73. package/dist/cose-bilkent-JH36ORCC-DBUPO3qJ.js +1 -0
  74. package/dist/cose-bilkent-JH36ORCC-Slpx4WIt.mjs +2253 -0
  75. package/dist/cynefin-OW5HDTMX--QVnfGi1.mjs +3 -0
  76. package/dist/cynefin-OW5HDTMX-lNKysi7S.js +1 -0
  77. package/dist/cynefinDiagram-5FMLGOSQ-CsFONYqx.js +62 -0
  78. package/dist/cynefinDiagram-5FMLGOSQ-DsrxYBcg.mjs +355 -0
  79. package/dist/cytoscape.esm-C5TvPYYm.mjs +18148 -0
  80. package/dist/cytoscape.esm-CBmWJr5M.js +321 -0
  81. package/dist/dagre-CZ6P9L_h.js +1 -0
  82. package/dist/dagre-GXQ25YYZ-CQszk-7P.js +4 -0
  83. package/dist/dagre-GXQ25YYZ-ecYByRSn.mjs +425 -0
  84. package/dist/dagre-J_1oH0eY.mjs +1934 -0
  85. package/dist/defaultLocale-N-0uLSyg.mjs +198 -0
  86. package/dist/defaultLocale-ybN1Vtvg.js +1 -0
  87. package/dist/diagram-S7CK7UJ4-CTMvxX__.js +30 -0
  88. package/dist/diagram-S7CK7UJ4-DxCghfa-.mjs +301 -0
  89. package/dist/diagram-UQ7AKVKN-1viEkqlG.js +41 -0
  90. package/dist/diagram-UQ7AKVKN-BA7Z_oB7.mjs +214 -0
  91. package/dist/diagram-VSXAHHWV-DgVT19mq.js +3 -0
  92. package/dist/diagram-VSXAHHWV-Dtqo03M5.mjs +432 -0
  93. package/dist/diagram-VX7I27RA-CNw0pOX_.js +24 -0
  94. package/dist/diagram-VX7I27RA-GMPRt8Zh.mjs +527 -0
  95. package/dist/diagram-Z3DM3KII-C6XdQK_Q.mjs +134 -0
  96. package/dist/diagram-Z3DM3KII-CPkBr3FT.js +24 -0
  97. package/dist/dist-CXWJafG_.js +1 -0
  98. package/dist/dist-DNdLIC8h.mjs +59 -0
  99. package/dist/docmedown.cjs +125 -44
  100. package/dist/docmedown.iife.js +3477 -72
  101. package/dist/docmedown.mjs +10003 -4807
  102. package/dist/ebnfDiagram-PWID7BFC-CseVsyL3.js +1 -0
  103. package/dist/ebnfDiagram-PWID7BFC-D_dBDXWC.mjs +100 -0
  104. package/dist/erDiagram-RLTQ6QDP-DFwfQTRS.js +99 -0
  105. package/dist/erDiagram-RLTQ6QDP-DP7ddGMH.mjs +1966 -0
  106. package/dist/eventmodeling-NTZA5JFV-CzxVg0l5.js +1 -0
  107. package/dist/eventmodeling-NTZA5JFV-Djsy__5n.mjs +3 -0
  108. package/dist/flowDiagram-HODETNUW-7hSJfI3W.js +1 -0
  109. package/dist/flowDiagram-HODETNUW-Dqu5Lr19.mjs +17 -0
  110. package/dist/ganttDiagram-EL5Y4UJY-KNL3tzTD.mjs +3072 -0
  111. package/dist/ganttDiagram-EL5Y4UJY-aiLqNWgi.js +292 -0
  112. package/dist/gitGraph-4MIJSDKK-DnElfqX7.js +1 -0
  113. package/dist/gitGraph-4MIJSDKK-xuKJBT2e.mjs +3 -0
  114. package/dist/gitGraphDiagram-WWUBYQGX-D4gSo_-e.js +106 -0
  115. package/dist/gitGraphDiagram-WWUBYQGX-Dooss5fG.mjs +733 -0
  116. package/dist/graphlib-BaETKKSa.js +1 -0
  117. package/dist/graphlib-XW-Jr8pF.mjs +1267 -0
  118. package/dist/info-A6RAGUB7-ClYskpn6.mjs +3 -0
  119. package/dist/info-A6RAGUB7-DDvvt-fW.js +1 -0
  120. package/dist/infoDiagram-27XIBGKW-B2-y2mdQ.mjs +20 -0
  121. package/dist/infoDiagram-27XIBGKW-DYQ9NzfL.js +2 -0
  122. package/dist/init-BJdqMO10.js +1 -0
  123. package/dist/init-CsQUQz36.mjs +13 -0
  124. package/dist/ishikawaDiagram-5VMMS53U-ULIhoYO5.js +70 -0
  125. package/dist/ishikawaDiagram-5VMMS53U-xAArNh-1.mjs +719 -0
  126. package/dist/journeyDiagram-3NMN7TZE-BBMYNZRL.js +139 -0
  127. package/dist/journeyDiagram-3NMN7TZE-BH-uKqP7.mjs +884 -0
  128. package/dist/kanban-definition-UXKFOSKX-Be49llXr.mjs +976 -0
  129. package/dist/kanban-definition-UXKFOSKX-CDL5yJkq.js +89 -0
  130. package/dist/line-BEwhHSLl.js +1 -0
  131. package/dist/line-CiXRog8O.mjs +34 -0
  132. package/dist/linear-75tfjrny.js +1 -0
  133. package/dist/linear-Ncx_RuON.mjs +288 -0
  134. package/dist/mermaid-parser.core-BBApyu_y.js +6 -0
  135. package/dist/mermaid-parser.core-BRHibdUE.mjs +638 -0
  136. package/dist/mindmap-definition-YA3MSWOX-Chy7XP_5.mjs +1006 -0
  137. package/dist/mindmap-definition-YA3MSWOX-DOda-fkL.js +96 -0
  138. package/dist/ordinal-B1BNQwUR.mjs +65 -0
  139. package/dist/ordinal-B9aFWmF9.js +1 -0
  140. package/dist/packet-AYTQ26CC-CorIy9Ul.js +1 -0
  141. package/dist/packet-AYTQ26CC-DWH8gXJK.mjs +3 -0
  142. package/dist/path-CnWkkRiY.mjs +84 -0
  143. package/dist/path-DIS6ck99.js +1 -0
  144. package/dist/pegDiagram-XKGWAZYB-Cdw6MeON.js +1 -0
  145. package/dist/pegDiagram-XKGWAZYB-uNfxRaq1.mjs +94 -0
  146. package/dist/pie-WAS4IAKB-Cn5eK-5P.mjs +3 -0
  147. package/dist/pie-WAS4IAKB-D84xrSoY.js +1 -0
  148. package/dist/pieDiagram-E7YTZNPT-Bd6mvpJw.js +39 -0
  149. package/dist/pieDiagram-E7YTZNPT-Cczo96a2.mjs +203 -0
  150. package/dist/quadrantDiagram-AXDQQJYC-BPfgvMsS.js +7 -0
  151. package/dist/quadrantDiagram-AXDQQJYC-eqRNtVRl.mjs +2001 -0
  152. package/dist/radar-RG4KPBEZ-DvkxGdO6.mjs +3 -0
  153. package/dist/radar-RG4KPBEZ-R2sQOLL9.js +1 -0
  154. package/dist/railroad-74A4TZTK-BOZIf6ts.js +1 -0
  155. package/dist/railroad-74A4TZTK-CrQzn8Nm.mjs +3 -0
  156. package/dist/railroad-abnf-HS5TGJTU-BZYetxLz.mjs +3 -0
  157. package/dist/railroad-abnf-HS5TGJTU-CXU1aC4B.js +1 -0
  158. package/dist/railroad-ebnf-LZEXJU2U-D29kI3YW.js +1 -0
  159. package/dist/railroad-ebnf-LZEXJU2U-qgzTOmN6.mjs +3 -0
  160. package/dist/railroad-peg-WCYAUIDC-Bjs9Ws3P.mjs +3 -0
  161. package/dist/railroad-peg-WCYAUIDC-CXviP0hz.js +1 -0
  162. package/dist/railroadDiagram-O6MQD6OU-58kvwt7H.mjs +76 -0
  163. package/dist/railroadDiagram-O6MQD6OU-CKY3uzTc.js +1 -0
  164. package/dist/requirementDiagram-BXWQKSXE-0hZ04Q6h.js +84 -0
  165. package/dist/requirementDiagram-BXWQKSXE-CS673B5n.mjs +2224 -0
  166. package/dist/rough.esm-ChRLLRha.js +1 -0
  167. package/dist/rough.esm-DXYGHN3m.mjs +1361 -0
  168. package/dist/sankeyDiagram-P5KCCOFB-D1D6HfAM.mjs +972 -0
  169. package/dist/sankeyDiagram-P5KCCOFB-ciJb9Zr8.js +40 -0
  170. package/dist/sequenceDiagram-WJ2MYXX4-BXEznuI6.js +162 -0
  171. package/dist/sequenceDiagram-WJ2MYXX4-CI1VT8AG.mjs +4156 -0
  172. package/dist/sizeCapture-INFHLROL-BihkCH-7.js +1 -0
  173. package/dist/sizeCapture-INFHLROL-BmxqyOLj.mjs +46 -0
  174. package/dist/src-B4mN2BMl.js +1 -0
  175. package/dist/src-D_hsMyeP.mjs +2154 -0
  176. package/dist/stateDiagram-D77RDMKH-BQrSs72W.mjs +220 -0
  177. package/dist/stateDiagram-D77RDMKH-D2PtkW2U.js +1 -0
  178. package/dist/stateDiagram-v2-MP3YSRHH-CCbvNfk-.mjs +30 -0
  179. package/dist/stateDiagram-v2-MP3YSRHH-Dq1QuPeN.js +1 -0
  180. package/dist/swimlanes-42K2YHIH-CA316NPm.mjs +4979 -0
  181. package/dist/swimlanes-42K2YHIH-DlggBCTy.js +1 -0
  182. package/dist/swimlanesDiagram-VR7AAH4N-BV9PEIoG.js +8 -0
  183. package/dist/swimlanesDiagram-VR7AAH4N-BfrOCfdf.mjs +31 -0
  184. package/dist/timeline-definition-24CTP7MA-Bkd8rWNJ.js +120 -0
  185. package/dist/timeline-definition-24CTP7MA-BvkqNYt1.mjs +1069 -0
  186. package/dist/treeView-Q6P3EWNA-Aof3Cp1M.mjs +3 -0
  187. package/dist/treeView-Q6P3EWNA-BTzvdwbb.js +1 -0
  188. package/dist/treemap-WGGIJYW6-BNXGg99p.mjs +3 -0
  189. package/dist/treemap-WGGIJYW6-DfR4P2Hh.js +1 -0
  190. package/dist/types/runtime/app.d.ts +3 -3
  191. package/dist/types/runtime/components/AppearanceMenu.d.ts +2 -0
  192. package/dist/types/runtime/components/Builtins.d.ts +3 -3
  193. package/dist/types/runtime/components/Content.d.ts +1 -1
  194. package/dist/types/runtime/components/DmdRegistry.d.ts +4 -2
  195. package/dist/types/runtime/components/Layout.d.ts +1 -1
  196. package/dist/types/runtime/components/MermaidDiagram.d.ts +16 -0
  197. package/dist/types/runtime/components/Navbar.d.ts +1 -1
  198. package/dist/types/runtime/components/OfflineDownloadButton.d.ts +2 -0
  199. package/dist/types/runtime/components/Sidebar.d.ts +1 -1
  200. package/dist/types/runtime/components/TableOfContents.d.ts +2 -2
  201. package/dist/types/runtime/config-schema.d.ts +386 -0
  202. package/dist/types/runtime/config.d.ts +10 -3
  203. package/dist/types/runtime/index.d.ts +7 -5
  204. package/dist/types/runtime/loader/auto-indexer.d.ts +1 -1
  205. package/dist/types/runtime/loader/local-loader.d.ts +1 -1
  206. package/dist/types/runtime/loader/remote-github.d.ts +2 -2
  207. package/dist/types/runtime/loader/remote-gitlab.d.ts +2 -2
  208. package/dist/types/runtime/markdown/callouts.d.ts +1 -1
  209. package/dist/types/runtime/markdown/highlighter.d.ts +16 -16
  210. package/dist/types/runtime/markdown/mermaid.d.ts +82 -1
  211. package/dist/types/runtime/markdown/parser.d.ts +1 -1
  212. package/dist/types/runtime/markdown/renderer.d.ts +1 -1
  213. package/dist/types/runtime/offline-export.d.ts +26 -0
  214. package/dist/types/runtime/provider/DocProvider.d.ts +5 -5
  215. package/dist/types/runtime/provider/ThemeProvider.d.ts +13 -6
  216. package/dist/types/runtime/search/SearchModal.d.ts +2 -2
  217. package/dist/types/runtime/search/search-index.d.ts +1 -1
  218. package/dist/types/runtime/types.d.ts +28 -99
  219. package/dist/vennDiagram-4TSXK5OY-BOUFXjso.js +34 -0
  220. package/dist/vennDiagram-4TSXK5OY-CeOg3-hU.mjs +1880 -0
  221. package/dist/wardley-WFR3VGLG-BOYcSLd1.mjs +3 -0
  222. package/dist/wardley-WFR3VGLG-DWDqJSgm.js +1 -0
  223. package/dist/wardleyDiagram-VM6X3IG4-BhWgMjFr.js +78 -0
  224. package/dist/wardleyDiagram-VM6X3IG4-C31KoRmF.mjs +645 -0
  225. package/dist/xychartDiagram-S5SC5T6Z-1yU8zz6I.js +7 -0
  226. package/dist/xychartDiagram-S5SC5T6Z-BK7upFom.mjs +2210 -0
  227. package/package.json +15 -4
  228. package/schemas/docs.schema.json +166 -0
  229. package/templates/README.md +4 -4
  230. package/templates/docs.json +5 -2
  231. package/templates/getting-started.md +1 -1
  232. package/templates/guides/custom-components.md +2 -0
  233. package/templates/index.html +2 -4
@@ -0,0 +1,1966 @@
1
+ import { m as e, p as t } from "./src-D_hsMyeP.mjs";
2
+ import { n, t as r } from "./chunk-Y2CYZVJY-i11wjrBe.mjs";
3
+ import { H as i, K as a, U as o, a as s, it as c, s as l, v as u, w as d, x as f, y as p } from "./chunk-DU6HZSFF-BEQZSmUu.mjs";
4
+ import { t as m } from "./channel-LgHproiI.mjs";
5
+ import { c as h, g } from "./chunk-75Z2AOVW-Dz0Sko9Y.mjs";
6
+ import "./chunk-P2QGCYS3-6q3AXPt5.mjs";
7
+ import "./chunk-PWAF6VOD-BYG76tEe.mjs";
8
+ import "./chunk-GMAD6QVW-BZeZ4fdb.mjs";
9
+ import "./chunk-4HAMMTFA-VgWPe1ng.mjs";
10
+ import "./chunk-GVQU2GXP-B1D3J05J.mjs";
11
+ import "./chunk-L3NEJ4N5-lal8wUID.mjs";
12
+ import "./chunk-OSK3NFVY-9AWK88m1.mjs";
13
+ import { r as _, t as v } from "./chunk-TLUHSLCS-CUrWaKDG.mjs";
14
+ import { t as y } from "./chunk-XXDRQBXY-DpR8eYzz.mjs";
15
+ import { t as b } from "./chunk-POPQ4Y6H-Dd7J9tx3.mjs";
16
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-RLTQ6QDP.mjs
17
+ var x = (function() {
18
+ var e = /* @__PURE__ */ n(function(e, t, n, r) {
19
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
20
+ return n;
21
+ }, "o"), t = [
22
+ 6,
23
+ 9,
24
+ 21,
25
+ 23,
26
+ 25,
27
+ 27,
28
+ 34,
29
+ 37,
30
+ 38,
31
+ 39,
32
+ 40,
33
+ 41,
34
+ 43,
35
+ 46,
36
+ 47,
37
+ 51,
38
+ 53,
39
+ 54,
40
+ 55
41
+ ], r = [2, 2], i = [1, 7], a = [1, 9], o = [1, 10], s = [1, 11], c = [1, 12], l = [1, 30], u = [1, 23], d = [1, 24], f = [1, 25], p = [1, 26], m = [1, 27], h = [1, 19], g = [1, 28], _ = [1, 29], v = [1, 20], y = [1, 18], b = [1, 21], x = [1, 22], S = [2, 6], C = [
42
+ 6,
43
+ 9,
44
+ 21,
45
+ 23,
46
+ 25,
47
+ 27,
48
+ 33,
49
+ 34,
50
+ 37,
51
+ 38,
52
+ 39,
53
+ 40,
54
+ 41,
55
+ 43,
56
+ 46,
57
+ 47,
58
+ 51,
59
+ 53,
60
+ 54,
61
+ 55
62
+ ], w = [1, 36], T = [1, 37], E = [1, 38], D = [1, 39], O = [1, 40], k = [
63
+ 6,
64
+ 9,
65
+ 12,
66
+ 14,
67
+ 16,
68
+ 19,
69
+ 20,
70
+ 21,
71
+ 23,
72
+ 25,
73
+ 27,
74
+ 33,
75
+ 34,
76
+ 37,
77
+ 38,
78
+ 39,
79
+ 40,
80
+ 41,
81
+ 43,
82
+ 46,
83
+ 47,
84
+ 50,
85
+ 51,
86
+ 53,
87
+ 54,
88
+ 55,
89
+ 69,
90
+ 70,
91
+ 71,
92
+ 72,
93
+ 73
94
+ ], A = [1, 46], j = [1, 47], M = [1, 57], N = [
95
+ 43,
96
+ 51,
97
+ 53,
98
+ 54,
99
+ 55,
100
+ 74,
101
+ 75
102
+ ], P = [1, 70], F = [1, 68], I = [1, 65], L = [1, 69], R = [1, 71], z = [
103
+ 6,
104
+ 9,
105
+ 12,
106
+ 16,
107
+ 21,
108
+ 23,
109
+ 25,
110
+ 27,
111
+ 33,
112
+ 34,
113
+ 37,
114
+ 38,
115
+ 39,
116
+ 40,
117
+ 41,
118
+ 43,
119
+ 44,
120
+ 45,
121
+ 46,
122
+ 47,
123
+ 51,
124
+ 52,
125
+ 53,
126
+ 54,
127
+ 55,
128
+ 69,
129
+ 70,
130
+ 71,
131
+ 72,
132
+ 73
133
+ ], B = [1, 78], V = [1, 77], H = [1, 76], U = [
134
+ 69,
135
+ 70,
136
+ 71,
137
+ 72,
138
+ 73
139
+ ], W = [1, 91], G = [
140
+ 6,
141
+ 9,
142
+ 45,
143
+ 50
144
+ ], K = [
145
+ 6,
146
+ 9,
147
+ 12,
148
+ 44,
149
+ 45,
150
+ 50,
151
+ 51,
152
+ 52
153
+ ], q = [1, 101], J = [1, 100], Y = [1, 99], X = [18, 61], ee = [1, 110], te = [1, 109], ne = [
154
+ 20,
155
+ 43,
156
+ 51,
157
+ 53,
158
+ 54,
159
+ 55
160
+ ], Z = [
161
+ 18,
162
+ 61,
163
+ 64,
164
+ 66
165
+ ], Q = {
166
+ trace: /* @__PURE__ */ n(function() {}, "trace"),
167
+ yy: {},
168
+ symbols_: {
169
+ error: 2,
170
+ start: 3,
171
+ ER_DIAGRAM: 4,
172
+ document: 5,
173
+ EOF: 6,
174
+ line: 7,
175
+ statement: 8,
176
+ NEWLINE: 9,
177
+ entityName: 10,
178
+ relSpec: 11,
179
+ COLON: 12,
180
+ role: 13,
181
+ STYLE_SEPARATOR: 14,
182
+ idList: 15,
183
+ BLOCK_START: 16,
184
+ attributes: 17,
185
+ BLOCK_STOP: 18,
186
+ SQS: 19,
187
+ SQE: 20,
188
+ title: 21,
189
+ title_value: 22,
190
+ acc_title: 23,
191
+ acc_title_value: 24,
192
+ acc_descr: 25,
193
+ acc_descr_value: 26,
194
+ acc_descr_multiline_value: 27,
195
+ direction: 28,
196
+ classDefStatement: 29,
197
+ classStatement: 30,
198
+ styleStatement: 31,
199
+ subgraphHeader: 32,
200
+ END: 33,
201
+ SUBGRAPH: 34,
202
+ separator: 35,
203
+ subgraphTitle: 36,
204
+ direction_tb: 37,
205
+ direction_bt: 38,
206
+ direction_rl: 39,
207
+ direction_lr: 40,
208
+ CLASSDEF: 41,
209
+ stylesOpt: 42,
210
+ UNICODE_TEXT: 43,
211
+ STYLE_TEXT: 44,
212
+ COMMA: 45,
213
+ CLASS: 46,
214
+ STYLE: 47,
215
+ style: 48,
216
+ styleComponent: 49,
217
+ SEMI: 50,
218
+ NUM: 51,
219
+ BRKT: 52,
220
+ ENTITY_NAME: 53,
221
+ DECIMAL_NUM: 54,
222
+ ENTITY_ONE: 55,
223
+ attribute: 56,
224
+ attributeType: 57,
225
+ attributeName: 58,
226
+ attributeKeyTypeList: 59,
227
+ attributeComment: 60,
228
+ ATTRIBUTE_WORD: 61,
229
+ "?": 62,
230
+ attributeKeyType: 63,
231
+ ",": 64,
232
+ ATTRIBUTE_KEY: 65,
233
+ COMMENT: 66,
234
+ cardinality: 67,
235
+ relType: 68,
236
+ ZERO_OR_ONE: 69,
237
+ ZERO_OR_MORE: 70,
238
+ ONE_OR_MORE: 71,
239
+ ONLY_ONE: 72,
240
+ MD_PARENT: 73,
241
+ NON_IDENTIFYING: 74,
242
+ IDENTIFYING: 75,
243
+ WORD: 76,
244
+ $accept: 0,
245
+ $end: 1
246
+ },
247
+ terminals_: {
248
+ 2: "error",
249
+ 4: "ER_DIAGRAM",
250
+ 6: "EOF",
251
+ 9: "NEWLINE",
252
+ 12: "COLON",
253
+ 14: "STYLE_SEPARATOR",
254
+ 16: "BLOCK_START",
255
+ 18: "BLOCK_STOP",
256
+ 19: "SQS",
257
+ 20: "SQE",
258
+ 21: "title",
259
+ 22: "title_value",
260
+ 23: "acc_title",
261
+ 24: "acc_title_value",
262
+ 25: "acc_descr",
263
+ 26: "acc_descr_value",
264
+ 27: "acc_descr_multiline_value",
265
+ 33: "END",
266
+ 34: "SUBGRAPH",
267
+ 37: "direction_tb",
268
+ 38: "direction_bt",
269
+ 39: "direction_rl",
270
+ 40: "direction_lr",
271
+ 41: "CLASSDEF",
272
+ 43: "UNICODE_TEXT",
273
+ 44: "STYLE_TEXT",
274
+ 45: "COMMA",
275
+ 46: "CLASS",
276
+ 47: "STYLE",
277
+ 50: "SEMI",
278
+ 51: "NUM",
279
+ 52: "BRKT",
280
+ 53: "ENTITY_NAME",
281
+ 54: "DECIMAL_NUM",
282
+ 55: "ENTITY_ONE",
283
+ 61: "ATTRIBUTE_WORD",
284
+ 62: "?",
285
+ 64: ",",
286
+ 65: "ATTRIBUTE_KEY",
287
+ 66: "COMMENT",
288
+ 69: "ZERO_OR_ONE",
289
+ 70: "ZERO_OR_MORE",
290
+ 71: "ONE_OR_MORE",
291
+ 72: "ONLY_ONE",
292
+ 73: "MD_PARENT",
293
+ 74: "NON_IDENTIFYING",
294
+ 75: "IDENTIFYING",
295
+ 76: "WORD"
296
+ },
297
+ productions_: [
298
+ 0,
299
+ [3, 3],
300
+ [5, 0],
301
+ [5, 2],
302
+ [7, 1],
303
+ [7, 1],
304
+ [7, 1],
305
+ [8, 5],
306
+ [8, 9],
307
+ [8, 7],
308
+ [8, 7],
309
+ [8, 4],
310
+ [8, 6],
311
+ [8, 3],
312
+ [8, 5],
313
+ [8, 1],
314
+ [8, 3],
315
+ [8, 7],
316
+ [8, 9],
317
+ [8, 6],
318
+ [8, 8],
319
+ [8, 4],
320
+ [8, 6],
321
+ [8, 2],
322
+ [8, 2],
323
+ [8, 2],
324
+ [8, 1],
325
+ [8, 1],
326
+ [8, 1],
327
+ [8, 1],
328
+ [8, 1],
329
+ [8, 3],
330
+ [32, 3],
331
+ [32, 6],
332
+ [36, 1],
333
+ [36, 2],
334
+ [28, 1],
335
+ [28, 1],
336
+ [28, 1],
337
+ [28, 1],
338
+ [29, 4],
339
+ [15, 1],
340
+ [15, 1],
341
+ [15, 3],
342
+ [15, 3],
343
+ [30, 3],
344
+ [31, 4],
345
+ [42, 1],
346
+ [42, 3],
347
+ [48, 1],
348
+ [48, 2],
349
+ [35, 1],
350
+ [35, 1],
351
+ [35, 1],
352
+ [49, 1],
353
+ [49, 1],
354
+ [49, 1],
355
+ [49, 1],
356
+ [10, 1],
357
+ [10, 1],
358
+ [10, 1],
359
+ [10, 1],
360
+ [10, 1],
361
+ [17, 1],
362
+ [17, 2],
363
+ [56, 2],
364
+ [56, 3],
365
+ [56, 3],
366
+ [56, 4],
367
+ [57, 1],
368
+ [57, 2],
369
+ [58, 1],
370
+ [59, 1],
371
+ [59, 3],
372
+ [63, 1],
373
+ [60, 1],
374
+ [11, 3],
375
+ [67, 1],
376
+ [67, 1],
377
+ [67, 1],
378
+ [67, 1],
379
+ [67, 1],
380
+ [68, 1],
381
+ [68, 1],
382
+ [13, 1],
383
+ [13, 1],
384
+ [13, 1]
385
+ ],
386
+ performAction: /* @__PURE__ */ n(function(e, t, n, r, i, a, o) {
387
+ var s = a.length - 1;
388
+ switch (i) {
389
+ case 1: break;
390
+ case 2:
391
+ this.$ = [];
392
+ break;
393
+ case 3:
394
+ this.$ = a[s - 1].concat(a[s]);
395
+ break;
396
+ case 4:
397
+ this.$ = a[s];
398
+ break;
399
+ case 5:
400
+ case 6:
401
+ this.$ = [];
402
+ break;
403
+ case 7:
404
+ r.addEntity(a[s - 4]), r.addEntity(a[s - 2]), r.addRelationship(a[s - 4], a[s], a[s - 2], a[s - 3]), this.$ = [a[s - 4], a[s - 2]];
405
+ break;
406
+ case 8:
407
+ r.addEntity(a[s - 8]), r.addEntity(a[s - 4]), r.addRelationship(a[s - 8], a[s], a[s - 4], a[s - 5]), r.setClass([a[s - 8]], a[s - 6]), r.setClass([a[s - 4]], a[s - 2]), this.$ = [a[s - 8], a[s - 4]];
408
+ break;
409
+ case 9:
410
+ r.addEntity(a[s - 6]), r.addEntity(a[s - 2]), r.addRelationship(a[s - 6], a[s], a[s - 2], a[s - 3]), r.setClass([a[s - 6]], a[s - 4]), this.$ = [a[s - 6], a[s - 2]];
411
+ break;
412
+ case 10:
413
+ r.addEntity(a[s - 6]), r.addEntity(a[s - 4]), r.addRelationship(a[s - 6], a[s], a[s - 4], a[s - 5]), r.setClass([a[s - 4]], a[s - 2]), this.$ = [a[s - 6], a[s - 4]];
414
+ break;
415
+ case 11:
416
+ r.addEntity(a[s - 3]), r.addAttributes(a[s - 3], a[s - 1]), this.$ = [a[s - 3]];
417
+ break;
418
+ case 12:
419
+ r.addEntity(a[s - 5]), r.addAttributes(a[s - 5], a[s - 1]), r.setClass([a[s - 5]], a[s - 3]), this.$ = [a[s - 5]];
420
+ break;
421
+ case 13:
422
+ r.addEntity(a[s - 2]), this.$ = [a[s - 2]];
423
+ break;
424
+ case 14:
425
+ r.addEntity(a[s - 4]), r.setClass([a[s - 4]], a[s - 2]), this.$ = [a[s - 4]];
426
+ break;
427
+ case 15:
428
+ r.addEntity(a[s]), this.$ = [a[s]];
429
+ break;
430
+ case 16:
431
+ r.addEntity(a[s - 2]), r.setClass([a[s - 2]], a[s]), this.$ = [a[s - 2]];
432
+ break;
433
+ case 17:
434
+ r.addEntity(a[s - 6], a[s - 4]), r.addAttributes(a[s - 6], a[s - 1]), this.$ = [a[s - 6]];
435
+ break;
436
+ case 18:
437
+ r.addEntity(a[s - 8], a[s - 6]), r.addAttributes(a[s - 8], a[s - 1]), r.setClass([a[s - 8]], a[s - 3]), this.$ = [a[s - 8]];
438
+ break;
439
+ case 19:
440
+ r.addEntity(a[s - 5], a[s - 3]), this.$ = [a[s - 5]];
441
+ break;
442
+ case 20:
443
+ r.addEntity(a[s - 7], a[s - 5]), r.setClass([a[s - 7]], a[s - 2]), this.$ = [a[s - 7]];
444
+ break;
445
+ case 21:
446
+ r.addEntity(a[s - 3], a[s - 1]);
447
+ break;
448
+ case 22:
449
+ r.addEntity(a[s - 5], a[s - 3]), r.setClass([a[s - 5]], a[s]);
450
+ break;
451
+ case 23:
452
+ case 24:
453
+ this.$ = a[s].trim(), r.setAccTitle(this.$);
454
+ break;
455
+ case 25:
456
+ case 26:
457
+ this.$ = a[s].trim(), r.setAccDescription(this.$);
458
+ break;
459
+ case 27:
460
+ r.subgraphDepth ? this.$ = a[s] : (r.setDirection(a[s].value), this.$ = []);
461
+ break;
462
+ case 31:
463
+ r.subgraphDepth = (r.subgraphDepth || 1) - 1, this.$ = r.addSubGraph({ text: a[s - 2].id }, a[s - 1], { text: a[s - 2].text });
464
+ break;
465
+ case 32:
466
+ r.subgraphDepth = (r.subgraphDepth || 0) + 1, this.$ = {
467
+ id: a[s - 1],
468
+ text: a[s - 1]
469
+ };
470
+ break;
471
+ case 33:
472
+ r.subgraphDepth = (r.subgraphDepth || 0) + 1, this.$ = {
473
+ id: a[s - 4],
474
+ text: a[s - 2]
475
+ };
476
+ break;
477
+ case 34:
478
+ case 59:
479
+ case 60:
480
+ case 61:
481
+ case 62:
482
+ case 86:
483
+ this.$ = a[s];
484
+ break;
485
+ case 35:
486
+ this.$ = a[s - 1] + " " + a[s];
487
+ break;
488
+ case 36:
489
+ this.$ = {
490
+ stmt: "dir",
491
+ value: "TB"
492
+ };
493
+ break;
494
+ case 37:
495
+ this.$ = {
496
+ stmt: "dir",
497
+ value: "BT"
498
+ };
499
+ break;
500
+ case 38:
501
+ this.$ = {
502
+ stmt: "dir",
503
+ value: "RL"
504
+ };
505
+ break;
506
+ case 39:
507
+ this.$ = {
508
+ stmt: "dir",
509
+ value: "LR"
510
+ };
511
+ break;
512
+ case 40:
513
+ this.$ = a[s - 3], r.addClass(a[s - 2], a[s - 1]);
514
+ break;
515
+ case 41:
516
+ case 42:
517
+ case 63:
518
+ case 72:
519
+ this.$ = [a[s]];
520
+ break;
521
+ case 43:
522
+ case 44:
523
+ this.$ = a[s - 2].concat([a[s]]);
524
+ break;
525
+ case 45:
526
+ this.$ = a[s - 2], r.setClass(a[s - 1], a[s]);
527
+ break;
528
+ case 46:
529
+ this.$ = a[s - 3], r.addCssStyles(a[s - 2], a[s - 1]);
530
+ break;
531
+ case 47:
532
+ this.$ = [a[s]];
533
+ break;
534
+ case 48:
535
+ a[s - 2].push(a[s]), this.$ = a[s - 2];
536
+ break;
537
+ case 50:
538
+ this.$ = a[s - 1] + a[s];
539
+ break;
540
+ case 58:
541
+ case 84:
542
+ case 85:
543
+ this.$ = a[s].replace(/"/g, "");
544
+ break;
545
+ case 64:
546
+ a[s].push(a[s - 1]), this.$ = a[s];
547
+ break;
548
+ case 65:
549
+ this.$ = {
550
+ type: a[s - 1],
551
+ name: a[s]
552
+ };
553
+ break;
554
+ case 66:
555
+ this.$ = {
556
+ type: a[s - 2],
557
+ name: a[s - 1],
558
+ keys: a[s]
559
+ };
560
+ break;
561
+ case 67:
562
+ this.$ = {
563
+ type: a[s - 2],
564
+ name: a[s - 1],
565
+ comment: a[s]
566
+ };
567
+ break;
568
+ case 68:
569
+ this.$ = {
570
+ type: a[s - 3],
571
+ name: a[s - 2],
572
+ keys: a[s - 1],
573
+ comment: a[s]
574
+ };
575
+ break;
576
+ case 69:
577
+ case 71:
578
+ case 74:
579
+ this.$ = a[s];
580
+ break;
581
+ case 70:
582
+ this.$ = a[s - 1] + a[s];
583
+ break;
584
+ case 73:
585
+ a[s - 2].push(a[s]), this.$ = a[s - 2];
586
+ break;
587
+ case 75:
588
+ this.$ = a[s].replace(/"/g, "");
589
+ break;
590
+ case 76:
591
+ this.$ = {
592
+ cardA: a[s],
593
+ relType: a[s - 1],
594
+ cardB: a[s - 2]
595
+ };
596
+ break;
597
+ case 77:
598
+ this.$ = r.Cardinality.ZERO_OR_ONE;
599
+ break;
600
+ case 78:
601
+ this.$ = r.Cardinality.ZERO_OR_MORE;
602
+ break;
603
+ case 79:
604
+ this.$ = r.Cardinality.ONE_OR_MORE;
605
+ break;
606
+ case 80:
607
+ this.$ = r.Cardinality.ONLY_ONE;
608
+ break;
609
+ case 81:
610
+ this.$ = r.Cardinality.MD_PARENT;
611
+ break;
612
+ case 82:
613
+ this.$ = r.Identification.NON_IDENTIFYING;
614
+ break;
615
+ case 83: this.$ = r.Identification.IDENTIFYING;
616
+ }
617
+ }, "anonymous"),
618
+ table: [
619
+ {
620
+ 3: 1,
621
+ 4: [1, 2]
622
+ },
623
+ { 1: [3] },
624
+ e(t, r, { 5: 3 }),
625
+ {
626
+ 6: [1, 4],
627
+ 7: 5,
628
+ 8: 6,
629
+ 9: i,
630
+ 10: 8,
631
+ 21: a,
632
+ 23: o,
633
+ 25: s,
634
+ 27: c,
635
+ 28: 13,
636
+ 29: 14,
637
+ 30: 15,
638
+ 31: 16,
639
+ 32: 17,
640
+ 34: l,
641
+ 37: u,
642
+ 38: d,
643
+ 39: f,
644
+ 40: p,
645
+ 41: m,
646
+ 43: h,
647
+ 46: g,
648
+ 47: _,
649
+ 51: v,
650
+ 53: y,
651
+ 54: b,
652
+ 55: x
653
+ },
654
+ e(t, S, { 1: [2, 1] }),
655
+ e(C, [2, 3]),
656
+ e(C, [2, 4]),
657
+ e(C, [2, 5]),
658
+ e(C, [2, 15], {
659
+ 11: 31,
660
+ 67: 35,
661
+ 14: [1, 32],
662
+ 16: [1, 33],
663
+ 19: [1, 34],
664
+ 69: w,
665
+ 70: T,
666
+ 71: E,
667
+ 72: D,
668
+ 73: O
669
+ }),
670
+ { 22: [1, 41] },
671
+ { 24: [1, 42] },
672
+ { 26: [1, 43] },
673
+ e(C, [2, 26]),
674
+ e(C, [2, 27]),
675
+ e(C, [2, 28]),
676
+ e(C, [2, 29]),
677
+ e(C, [2, 30]),
678
+ e(C, r, { 5: 44 }),
679
+ e(k, [2, 58]),
680
+ e(k, [2, 59]),
681
+ e(k, [2, 60]),
682
+ e(k, [2, 61]),
683
+ e(k, [2, 62]),
684
+ e(C, [2, 36]),
685
+ e(C, [2, 37]),
686
+ e(C, [2, 38]),
687
+ e(C, [2, 39]),
688
+ {
689
+ 15: 45,
690
+ 43: A,
691
+ 44: j
692
+ },
693
+ {
694
+ 15: 48,
695
+ 43: A,
696
+ 44: j
697
+ },
698
+ {
699
+ 15: 49,
700
+ 43: A,
701
+ 44: j
702
+ },
703
+ {
704
+ 10: 50,
705
+ 43: h,
706
+ 51: v,
707
+ 53: y,
708
+ 54: b,
709
+ 55: x
710
+ },
711
+ {
712
+ 10: 51,
713
+ 43: h,
714
+ 51: v,
715
+ 53: y,
716
+ 54: b,
717
+ 55: x
718
+ },
719
+ {
720
+ 15: 52,
721
+ 43: A,
722
+ 44: j
723
+ },
724
+ {
725
+ 17: 53,
726
+ 18: [1, 54],
727
+ 56: 55,
728
+ 57: 56,
729
+ 61: M
730
+ },
731
+ {
732
+ 10: 58,
733
+ 43: h,
734
+ 51: v,
735
+ 53: y,
736
+ 54: b,
737
+ 55: x
738
+ },
739
+ {
740
+ 68: 59,
741
+ 74: [1, 60],
742
+ 75: [1, 61]
743
+ },
744
+ e(N, [2, 77]),
745
+ e(N, [2, 78]),
746
+ e(N, [2, 79]),
747
+ e(N, [2, 80]),
748
+ e(N, [2, 81]),
749
+ e(C, [2, 23]),
750
+ e(C, [2, 24]),
751
+ e(C, [2, 25]),
752
+ {
753
+ 6: [1, 63],
754
+ 7: 5,
755
+ 8: 6,
756
+ 9: i,
757
+ 10: 8,
758
+ 21: a,
759
+ 23: o,
760
+ 25: s,
761
+ 27: c,
762
+ 28: 13,
763
+ 29: 14,
764
+ 30: 15,
765
+ 31: 16,
766
+ 32: 17,
767
+ 33: [1, 62],
768
+ 34: l,
769
+ 37: u,
770
+ 38: d,
771
+ 39: f,
772
+ 40: p,
773
+ 41: m,
774
+ 43: h,
775
+ 46: g,
776
+ 47: _,
777
+ 51: v,
778
+ 53: y,
779
+ 54: b,
780
+ 55: x
781
+ },
782
+ {
783
+ 12: P,
784
+ 42: 64,
785
+ 44: F,
786
+ 45: I,
787
+ 48: 66,
788
+ 49: 67,
789
+ 51: L,
790
+ 52: R
791
+ },
792
+ e(z, [2, 41]),
793
+ e(z, [2, 42]),
794
+ {
795
+ 15: 72,
796
+ 43: A,
797
+ 44: j,
798
+ 45: I
799
+ },
800
+ {
801
+ 12: P,
802
+ 42: 73,
803
+ 44: F,
804
+ 45: I,
805
+ 48: 66,
806
+ 49: 67,
807
+ 51: L,
808
+ 52: R
809
+ },
810
+ {
811
+ 6: B,
812
+ 9: V,
813
+ 19: [1, 75],
814
+ 35: 74,
815
+ 50: H
816
+ },
817
+ {
818
+ 12: [1, 79],
819
+ 14: [1, 80]
820
+ },
821
+ e(C, [2, 16], {
822
+ 67: 35,
823
+ 11: 81,
824
+ 16: [1, 82],
825
+ 45: I,
826
+ 69: w,
827
+ 70: T,
828
+ 71: E,
829
+ 72: D,
830
+ 73: O
831
+ }),
832
+ { 18: [1, 83] },
833
+ e(C, [2, 13]),
834
+ {
835
+ 17: 84,
836
+ 18: [2, 63],
837
+ 56: 55,
838
+ 57: 56,
839
+ 61: M
840
+ },
841
+ {
842
+ 58: 85,
843
+ 61: [1, 86]
844
+ },
845
+ {
846
+ 61: [2, 69],
847
+ 62: [1, 87]
848
+ },
849
+ { 20: [1, 88] },
850
+ {
851
+ 67: 89,
852
+ 69: w,
853
+ 70: T,
854
+ 71: E,
855
+ 72: D,
856
+ 73: O
857
+ },
858
+ e(U, [2, 82]),
859
+ e(U, [2, 83]),
860
+ e(C, [2, 31]),
861
+ e(C, S),
862
+ {
863
+ 6: B,
864
+ 9: V,
865
+ 35: 90,
866
+ 45: W,
867
+ 50: H
868
+ },
869
+ {
870
+ 43: [1, 92],
871
+ 44: [1, 93]
872
+ },
873
+ e(G, [2, 47], {
874
+ 49: 94,
875
+ 12: P,
876
+ 44: F,
877
+ 51: L,
878
+ 52: R
879
+ }),
880
+ e(K, [2, 49]),
881
+ e(K, [2, 54]),
882
+ e(K, [2, 55]),
883
+ e(K, [2, 56]),
884
+ e(K, [2, 57]),
885
+ e(C, [2, 45], { 45: I }),
886
+ {
887
+ 6: B,
888
+ 9: V,
889
+ 35: 95,
890
+ 45: W,
891
+ 50: H
892
+ },
893
+ e(C, [2, 32]),
894
+ {
895
+ 10: 97,
896
+ 36: 96,
897
+ 43: h,
898
+ 51: v,
899
+ 53: y,
900
+ 54: b,
901
+ 55: x
902
+ },
903
+ e(C, [2, 51]),
904
+ e(C, [2, 52]),
905
+ e(C, [2, 53]),
906
+ {
907
+ 13: 98,
908
+ 43: q,
909
+ 53: J,
910
+ 76: Y
911
+ },
912
+ {
913
+ 15: 102,
914
+ 43: A,
915
+ 44: j
916
+ },
917
+ {
918
+ 10: 103,
919
+ 43: h,
920
+ 51: v,
921
+ 53: y,
922
+ 54: b,
923
+ 55: x
924
+ },
925
+ {
926
+ 17: 104,
927
+ 18: [1, 105],
928
+ 56: 55,
929
+ 57: 56,
930
+ 61: M
931
+ },
932
+ e(C, [2, 11]),
933
+ { 18: [2, 64] },
934
+ e(X, [2, 65], {
935
+ 59: 106,
936
+ 60: 107,
937
+ 63: 108,
938
+ 65: ee,
939
+ 66: te
940
+ }),
941
+ e([
942
+ 18,
943
+ 61,
944
+ 65,
945
+ 66
946
+ ], [2, 71]),
947
+ { 61: [2, 70] },
948
+ e(C, [2, 21], {
949
+ 14: [1, 112],
950
+ 16: [1, 111]
951
+ }),
952
+ e([
953
+ 43,
954
+ 51,
955
+ 53,
956
+ 54,
957
+ 55
958
+ ], [2, 76]),
959
+ e(C, [2, 40]),
960
+ {
961
+ 12: P,
962
+ 44: F,
963
+ 48: 113,
964
+ 49: 67,
965
+ 51: L,
966
+ 52: R
967
+ },
968
+ e(z, [2, 43]),
969
+ e(z, [2, 44]),
970
+ e(K, [2, 50]),
971
+ e(C, [2, 46]),
972
+ {
973
+ 10: 115,
974
+ 20: [1, 114],
975
+ 43: h,
976
+ 51: v,
977
+ 53: y,
978
+ 54: b,
979
+ 55: x
980
+ },
981
+ e(ne, [2, 34]),
982
+ e(C, [2, 7]),
983
+ e(C, [2, 84]),
984
+ e(C, [2, 85]),
985
+ e(C, [2, 86]),
986
+ {
987
+ 12: [1, 116],
988
+ 45: I
989
+ },
990
+ {
991
+ 12: [1, 118],
992
+ 14: [1, 117]
993
+ },
994
+ { 18: [1, 119] },
995
+ e(C, [2, 14]),
996
+ e(X, [2, 66], {
997
+ 60: 120,
998
+ 64: [1, 121],
999
+ 66: te
1000
+ }),
1001
+ e(X, [2, 67]),
1002
+ e(Z, [2, 72]),
1003
+ e(X, [2, 75]),
1004
+ e(Z, [2, 74]),
1005
+ {
1006
+ 17: 122,
1007
+ 18: [1, 123],
1008
+ 56: 55,
1009
+ 57: 56,
1010
+ 61: M
1011
+ },
1012
+ {
1013
+ 15: 124,
1014
+ 43: A,
1015
+ 44: j
1016
+ },
1017
+ e(G, [2, 48], {
1018
+ 49: 94,
1019
+ 12: P,
1020
+ 44: F,
1021
+ 51: L,
1022
+ 52: R
1023
+ }),
1024
+ {
1025
+ 6: B,
1026
+ 9: V,
1027
+ 35: 125,
1028
+ 50: H
1029
+ },
1030
+ e(ne, [2, 35]),
1031
+ {
1032
+ 13: 126,
1033
+ 43: q,
1034
+ 53: J,
1035
+ 76: Y
1036
+ },
1037
+ {
1038
+ 15: 127,
1039
+ 43: A,
1040
+ 44: j
1041
+ },
1042
+ {
1043
+ 13: 128,
1044
+ 43: q,
1045
+ 53: J,
1046
+ 76: Y
1047
+ },
1048
+ e(C, [2, 12]),
1049
+ e(X, [2, 68]),
1050
+ {
1051
+ 63: 129,
1052
+ 65: ee
1053
+ },
1054
+ { 18: [1, 130] },
1055
+ e(C, [2, 19]),
1056
+ e(C, [2, 22], {
1057
+ 16: [1, 131],
1058
+ 45: I
1059
+ }),
1060
+ e(C, [2, 33]),
1061
+ e(C, [2, 10]),
1062
+ {
1063
+ 12: [1, 132],
1064
+ 45: I
1065
+ },
1066
+ e(C, [2, 9]),
1067
+ e(Z, [2, 73]),
1068
+ e(C, [2, 17]),
1069
+ {
1070
+ 17: 133,
1071
+ 18: [1, 134],
1072
+ 56: 55,
1073
+ 57: 56,
1074
+ 61: M
1075
+ },
1076
+ {
1077
+ 13: 135,
1078
+ 43: q,
1079
+ 53: J,
1080
+ 76: Y
1081
+ },
1082
+ { 18: [1, 136] },
1083
+ e(C, [2, 20]),
1084
+ e(C, [2, 8]),
1085
+ e(C, [2, 18])
1086
+ ],
1087
+ defaultActions: {
1088
+ 84: [2, 64],
1089
+ 87: [2, 70]
1090
+ },
1091
+ parseError: /* @__PURE__ */ n(function(e, t) {
1092
+ if (t.recoverable) this.trace(e);
1093
+ else {
1094
+ var n = Error(e);
1095
+ throw n.hash = t, n;
1096
+ }
1097
+ }, "parseError"),
1098
+ parse: /* @__PURE__ */ n(function(e) {
1099
+ var t = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
1100
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
1101
+ h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
1102
+ var v = h.yylloc;
1103
+ o.push(v);
1104
+ var y = h.options && h.options.ranges;
1105
+ this.parseError = typeof g.yy.parseError == "function" ? g.yy.parseError : Object.getPrototypeOf(this).parseError;
1106
+ function b(e) {
1107
+ r.length -= 2 * e, a.length -= e, o.length -= e;
1108
+ }
1109
+ n(b, "popStack");
1110
+ function x() {
1111
+ var e = i.pop() || h.lex() || p;
1112
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = t.symbols_[e] || e), e;
1113
+ }
1114
+ n(x, "lex");
1115
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
1116
+ if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
1117
+ var M = "";
1118
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
1119
+ M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
1120
+ text: h.match,
1121
+ token: this.terminals_[S] || S,
1122
+ line: h.yylineno,
1123
+ loc: v,
1124
+ expected: j
1125
+ });
1126
+ }
1127
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
1128
+ switch (T[0]) {
1129
+ case 1:
1130
+ r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
1131
+ break;
1132
+ case 2:
1133
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
1134
+ first_line: o[o.length - (k || 1)].first_line,
1135
+ last_line: o[o.length - 1].last_line,
1136
+ first_column: o[o.length - (k || 1)].first_column,
1137
+ last_column: o[o.length - 1].last_column
1138
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
1139
+ c,
1140
+ u,
1141
+ l,
1142
+ g.yy,
1143
+ T[1],
1144
+ a,
1145
+ o
1146
+ ].concat(m)), E !== void 0) return E;
1147
+ k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
1148
+ break;
1149
+ case 3: return !0;
1150
+ }
1151
+ }
1152
+ return !0;
1153
+ }, "parse")
1154
+ };
1155
+ Q.lexer = /* @__PURE__ */ (function() {
1156
+ return {
1157
+ EOF: 1,
1158
+ parseError: /* @__PURE__ */ n(function(e, t) {
1159
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
1160
+ else throw Error(e);
1161
+ }, "parseError"),
1162
+ setInput: /* @__PURE__ */ n(function(e, t) {
1163
+ return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
1164
+ first_line: 1,
1165
+ first_column: 0,
1166
+ last_line: 1,
1167
+ last_column: 0
1168
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
1169
+ }, "setInput"),
1170
+ input: /* @__PURE__ */ n(function() {
1171
+ var e = this._input[0];
1172
+ return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
1173
+ }, "input"),
1174
+ unput: /* @__PURE__ */ n(function(e) {
1175
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
1176
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
1177
+ var r = this.match.split(/(?:\r\n?|\n)/g);
1178
+ 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);
1179
+ var i = this.yylloc.range;
1180
+ return this.yylloc = {
1181
+ first_line: this.yylloc.first_line,
1182
+ last_line: this.yylineno + 1,
1183
+ first_column: this.yylloc.first_column,
1184
+ last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
1185
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
1186
+ }, "unput"),
1187
+ more: /* @__PURE__ */ n(function() {
1188
+ return this._more = !0, this;
1189
+ }, "more"),
1190
+ reject: /* @__PURE__ */ n(function() {
1191
+ if (this.options.backtrack_lexer) this._backtrack = !0;
1192
+ else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
1193
+ text: "",
1194
+ token: null,
1195
+ line: this.yylineno
1196
+ });
1197
+ return this;
1198
+ }, "reject"),
1199
+ less: /* @__PURE__ */ n(function(e) {
1200
+ this.unput(this.match.slice(e));
1201
+ }, "less"),
1202
+ pastInput: /* @__PURE__ */ n(function() {
1203
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
1204
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
1205
+ }, "pastInput"),
1206
+ upcomingInput: /* @__PURE__ */ n(function() {
1207
+ var e = this.match;
1208
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
1209
+ }, "upcomingInput"),
1210
+ showPosition: /* @__PURE__ */ n(function() {
1211
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
1212
+ return e + this.upcomingInput() + "\n" + t + "^";
1213
+ }, "showPosition"),
1214
+ test_match: /* @__PURE__ */ n(function(e, t) {
1215
+ var n, r, i;
1216
+ if (this.options.backtrack_lexer && (i = {
1217
+ yylineno: this.yylineno,
1218
+ yylloc: {
1219
+ first_line: this.yylloc.first_line,
1220
+ last_line: this.last_line,
1221
+ first_column: this.yylloc.first_column,
1222
+ last_column: this.yylloc.last_column
1223
+ },
1224
+ yytext: this.yytext,
1225
+ match: this.match,
1226
+ matches: this.matches,
1227
+ matched: this.matched,
1228
+ yyleng: this.yyleng,
1229
+ offset: this.offset,
1230
+ _more: this._more,
1231
+ _input: this._input,
1232
+ yy: this.yy,
1233
+ conditionStack: this.conditionStack.slice(0),
1234
+ done: this.done
1235
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
1236
+ first_line: this.yylloc.last_line,
1237
+ last_line: this.yylineno + 1,
1238
+ first_column: this.yylloc.last_column,
1239
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
1240
+ }, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
1241
+ if (this._backtrack) {
1242
+ for (var a in i) this[a] = i[a];
1243
+ return !1;
1244
+ }
1245
+ return !1;
1246
+ }, "test_match"),
1247
+ next: /* @__PURE__ */ n(function() {
1248
+ if (this.done) return this.EOF;
1249
+ this._input || (this.done = !0);
1250
+ var e, t, n, r;
1251
+ this._more || (this.yytext = "", this.match = "");
1252
+ for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
1253
+ if (t = n, r = a, this.options.backtrack_lexer) {
1254
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
1255
+ if (this._backtrack) {
1256
+ t = !1;
1257
+ continue;
1258
+ }
1259
+ return !1;
1260
+ }
1261
+ if (!this.options.flex) break;
1262
+ }
1263
+ return t ? (e = this.test_match(t, i[r]), e !== !1 && e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
1264
+ text: "",
1265
+ token: null,
1266
+ line: this.yylineno
1267
+ });
1268
+ }, "next"),
1269
+ lex: /* @__PURE__ */ n(function() {
1270
+ return this.next() || this.lex();
1271
+ }, "lex"),
1272
+ begin: /* @__PURE__ */ n(function(e) {
1273
+ this.conditionStack.push(e);
1274
+ }, "begin"),
1275
+ popState: /* @__PURE__ */ n(function() {
1276
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
1277
+ }, "popState"),
1278
+ _currentRules: /* @__PURE__ */ n(function() {
1279
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
1280
+ }, "_currentRules"),
1281
+ topState: /* @__PURE__ */ n(function(e) {
1282
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
1283
+ }, "topState"),
1284
+ pushState: /* @__PURE__ */ n(function(e) {
1285
+ this.begin(e);
1286
+ }, "pushState"),
1287
+ stateStackSize: /* @__PURE__ */ n(function() {
1288
+ return this.conditionStack.length;
1289
+ }, "stateStackSize"),
1290
+ options: { "case-insensitive": !0 },
1291
+ performAction: /* @__PURE__ */ n(function(e, t, n, r) {
1292
+ switch (n) {
1293
+ case 0: return this.begin("acc_title"), 23;
1294
+ case 1: return this.popState(), "acc_title_value";
1295
+ case 2: return this.begin("acc_descr"), 25;
1296
+ case 3: return this.popState(), "acc_descr_value";
1297
+ case 4:
1298
+ this.begin("acc_descr_multiline");
1299
+ break;
1300
+ case 5:
1301
+ this.popState();
1302
+ break;
1303
+ case 6: return "acc_descr_multiline_value";
1304
+ case 7: return 37;
1305
+ case 8: return 38;
1306
+ case 9: return 39;
1307
+ case 10: return 40;
1308
+ case 11: break;
1309
+ case 12: return 9;
1310
+ case 13: return 53;
1311
+ case 14: return 76;
1312
+ case 15: return 4;
1313
+ case 16: return this.begin("block"), 16;
1314
+ case 17: return 52;
1315
+ case 18: return 52;
1316
+ case 19: return 45;
1317
+ case 20: return 14;
1318
+ case 21: return 12;
1319
+ case 22: break;
1320
+ case 23: return 65;
1321
+ case 24: return 61;
1322
+ case 25: return 61;
1323
+ case 26:
1324
+ this.begin("block_bq");
1325
+ break;
1326
+ case 27: return 61;
1327
+ case 28:
1328
+ this.popState();
1329
+ break;
1330
+ case 29: return 66;
1331
+ case 30: break;
1332
+ case 31: return this.popState(), 18;
1333
+ case 32: return t.yytext[0];
1334
+ case 33: return 19;
1335
+ case 34: return 20;
1336
+ case 35: return this.begin("style"), 47;
1337
+ case 36: return this.popState(), 9;
1338
+ case 37: break;
1339
+ case 38: return 12;
1340
+ case 39: return 45;
1341
+ case 40: return 52;
1342
+ case 41: return this.begin("style"), 41;
1343
+ case 42: return 46;
1344
+ case 43: return 34;
1345
+ case 44: return 33;
1346
+ case 45: return 69;
1347
+ case 46: return 71;
1348
+ case 47: return 71;
1349
+ case 48: return 71;
1350
+ case 49: return 69;
1351
+ case 50: return 69;
1352
+ case 51: return 70;
1353
+ case 52: return 70;
1354
+ case 53: return 70;
1355
+ case 54: return 70;
1356
+ case 55: return 70;
1357
+ case 56: return 71;
1358
+ case 57: return 70;
1359
+ case 58: return 71;
1360
+ case 59: return 72;
1361
+ case 60: return 72;
1362
+ case 61: return 54;
1363
+ case 62: return 72;
1364
+ case 63: return 72;
1365
+ case 64: return 72;
1366
+ case 65: return 55;
1367
+ case 66: return 51;
1368
+ case 67: return 72;
1369
+ case 68: return 69;
1370
+ case 69: return 70;
1371
+ case 70: return 71;
1372
+ case 71: return 73;
1373
+ case 72: return 74;
1374
+ case 73: return 75;
1375
+ case 74: return 75;
1376
+ case 75: return 74;
1377
+ case 76: return 74;
1378
+ case 77: return 74;
1379
+ case 78: return 44;
1380
+ case 79: return 50;
1381
+ case 80: return 43;
1382
+ case 81: return t.yytext[0];
1383
+ case 82: return 6;
1384
+ }
1385
+ }, "anonymous"),
1386
+ rules: [
1387
+ /^(?:accTitle\s*:\s*)/i,
1388
+ /^(?:(?!\n||)*[^\n]*)/i,
1389
+ /^(?:accDescr\s*:\s*)/i,
1390
+ /^(?:(?!\n||)*[^\n]*)/i,
1391
+ /^(?:accDescr\s*\{\s*)/i,
1392
+ /^(?:[\}])/i,
1393
+ /^(?:[^\}]*)/i,
1394
+ /^(?:.*direction\s+TB[^\n]*)/i,
1395
+ /^(?:.*direction\s+BT[^\n]*)/i,
1396
+ /^(?:.*direction\s+RL[^\n]*)/i,
1397
+ /^(?:.*direction\s+LR[^\n]*)/i,
1398
+ /^(?:[ \t\r]+)/i,
1399
+ /^(?:[\n]+)/i,
1400
+ /^(?:"[^"%\r\n\v\b\\]+")/i,
1401
+ /^(?:"[^"]*")/i,
1402
+ /^(?:erDiagram\b)/i,
1403
+ /^(?:\{)/i,
1404
+ /^(?:#)/i,
1405
+ /^(?:#)/i,
1406
+ /^(?:,)/i,
1407
+ /^(?::::)/i,
1408
+ /^(?::)/i,
1409
+ /^(?:\s+)/i,
1410
+ /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,
1411
+ /^(?:([^\s]*)[~].*[~]([^\s]*))/i,
1412
+ /^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,
1413
+ /^(?:[`])/i,
1414
+ /^(?:[^`]+)/i,
1415
+ /^(?:[`])/i,
1416
+ /^(?:"[^"]*")/i,
1417
+ /^(?:[\n]+)/i,
1418
+ /^(?:\})/i,
1419
+ /^(?:.)/i,
1420
+ /^(?:\[)/i,
1421
+ /^(?:\])/i,
1422
+ /^(?:style\b)/i,
1423
+ /^(?:[\n]+)/i,
1424
+ /^(?:\s+)/i,
1425
+ /^(?::)/i,
1426
+ /^(?:,)/i,
1427
+ /^(?:#)/i,
1428
+ /^(?:classDef\b)/i,
1429
+ /^(?:class\b)/i,
1430
+ /^(?:subgraph\b)/i,
1431
+ /^(?:end\b\s*)/i,
1432
+ /^(?:one or zero\b)/i,
1433
+ /^(?:one or more\b)/i,
1434
+ /^(?:one or many\b)/i,
1435
+ /^(?:1\+)/i,
1436
+ /^(?:\|o\b)/i,
1437
+ /^(?:zero or one\b)/i,
1438
+ /^(?:zero or more\b)/i,
1439
+ /^(?:zero or many\b)/i,
1440
+ /^(?:0\+)/i,
1441
+ /^(?:\}o\b)/i,
1442
+ /^(?:many\(0\))/i,
1443
+ /^(?:many\(1\))/i,
1444
+ /^(?:many\b)/i,
1445
+ /^(?:\}\|)/i,
1446
+ /^(?:one\b)/i,
1447
+ /^(?:only one\b)/i,
1448
+ /^(?:[0-9]+\.[0-9]+)/i,
1449
+ /^(?:1(?=\s+[A-Za-z_"']))/i,
1450
+ /^(?:1(?=\s+[0-9]))/i,
1451
+ /^(?:1(?=(--|\.\.|\.-|-\.)))/i,
1452
+ /^(?:1\b)/i,
1453
+ /^(?:[0-9]+)/i,
1454
+ /^(?:\|\|)/i,
1455
+ /^(?:o\|)/i,
1456
+ /^(?:o\{)/i,
1457
+ /^(?:\|\{)/i,
1458
+ /^(?:u(?=[\.\-\|]))/i,
1459
+ /^(?:\.\.)/i,
1460
+ /^(?:--)/i,
1461
+ /^(?:to\b)/i,
1462
+ /^(?:optionally to\b)/i,
1463
+ /^(?:\.-)/i,
1464
+ /^(?:-\.)/i,
1465
+ /^(?:([^\x00-\x7F]|\w|-|\*)+)/i,
1466
+ /^(?:;)/i,
1467
+ /^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,
1468
+ /^(?:.)/i,
1469
+ /^(?:$)/i
1470
+ ],
1471
+ conditions: {
1472
+ style: {
1473
+ rules: [
1474
+ 36,
1475
+ 37,
1476
+ 38,
1477
+ 39,
1478
+ 40,
1479
+ 78,
1480
+ 79
1481
+ ],
1482
+ inclusive: !1
1483
+ },
1484
+ acc_descr_multiline: {
1485
+ rules: [5, 6],
1486
+ inclusive: !1
1487
+ },
1488
+ acc_descr: {
1489
+ rules: [3],
1490
+ inclusive: !1
1491
+ },
1492
+ acc_title: {
1493
+ rules: [1],
1494
+ inclusive: !1
1495
+ },
1496
+ block_bq: {
1497
+ rules: [27, 28],
1498
+ inclusive: !1
1499
+ },
1500
+ block: {
1501
+ rules: [
1502
+ 22,
1503
+ 23,
1504
+ 24,
1505
+ 25,
1506
+ 26,
1507
+ 29,
1508
+ 30,
1509
+ 31,
1510
+ 32
1511
+ ],
1512
+ inclusive: !1
1513
+ },
1514
+ INITIAL: {
1515
+ rules: [
1516
+ 0,
1517
+ 2,
1518
+ 4,
1519
+ 7,
1520
+ 8,
1521
+ 9,
1522
+ 10,
1523
+ 11,
1524
+ 12,
1525
+ 13,
1526
+ 14,
1527
+ 15,
1528
+ 16,
1529
+ 17,
1530
+ 18,
1531
+ 19,
1532
+ 20,
1533
+ 21,
1534
+ 33,
1535
+ 34,
1536
+ 35,
1537
+ 41,
1538
+ 42,
1539
+ 43,
1540
+ 44,
1541
+ 45,
1542
+ 46,
1543
+ 47,
1544
+ 48,
1545
+ 49,
1546
+ 50,
1547
+ 51,
1548
+ 52,
1549
+ 53,
1550
+ 54,
1551
+ 55,
1552
+ 56,
1553
+ 57,
1554
+ 58,
1555
+ 59,
1556
+ 60,
1557
+ 61,
1558
+ 62,
1559
+ 63,
1560
+ 64,
1561
+ 65,
1562
+ 66,
1563
+ 67,
1564
+ 68,
1565
+ 69,
1566
+ 70,
1567
+ 71,
1568
+ 72,
1569
+ 73,
1570
+ 74,
1571
+ 75,
1572
+ 76,
1573
+ 77,
1574
+ 80,
1575
+ 81,
1576
+ 82
1577
+ ],
1578
+ inclusive: !0
1579
+ }
1580
+ }
1581
+ };
1582
+ })();
1583
+ function $() {
1584
+ this.yy = {};
1585
+ }
1586
+ return n($, "Parser"), $.prototype = Q, Q.Parser = $, new $();
1587
+ })();
1588
+ x.parser = x;
1589
+ var S = x, C = class {
1590
+ constructor() {
1591
+ this.entities = /* @__PURE__ */ new Map(), this.relationships = [], this.classes = /* @__PURE__ */ new Map(), this.subgraphDepth = 0, this.subGraphs = [], this.subGraphLookup = /* @__PURE__ */ new Map(), this.subCount = 0, this.direction = "TB", this.Cardinality = {
1592
+ ZERO_OR_ONE: "ZERO_OR_ONE",
1593
+ ZERO_OR_MORE: "ZERO_OR_MORE",
1594
+ ONE_OR_MORE: "ONE_OR_MORE",
1595
+ ONLY_ONE: "ONLY_ONE",
1596
+ MD_PARENT: "MD_PARENT"
1597
+ }, this.Identification = {
1598
+ NON_IDENTIFYING: "NON_IDENTIFYING",
1599
+ IDENTIFYING: "IDENTIFYING"
1600
+ }, this.setAccTitle = o, this.getAccTitle = p, this.setAccDescription = i, this.getAccDescription = u, this.setDiagramTitle = a, this.getDiagramTitle = d, this.getConfig = /* @__PURE__ */ n(() => f().er, "getConfig"), this.clear(), this.addEntity = this.addEntity.bind(this), this.addAttributes = this.addAttributes.bind(this), this.addRelationship = this.addRelationship.bind(this), this.setDirection = this.setDirection.bind(this), this.addCssStyles = this.addCssStyles.bind(this), this.addClass = this.addClass.bind(this), this.setClass = this.setClass.bind(this), this.setAccTitle = this.setAccTitle.bind(this), this.setAccDescription = this.setAccDescription.bind(this), this.addSubGraph = this.addSubGraph.bind(this);
1601
+ }
1602
+ static {
1603
+ n(this, "ErDB");
1604
+ }
1605
+ addEntity(t, n = "") {
1606
+ return this.entities.has(t) ? !this.entities.get(t)?.alias && n && (this.entities.get(t).alias = n, e.info(`Add alias '${n}' to entity '${t}'`)) : (this.entities.set(t, {
1607
+ id: `entity-${t}-${this.entities.size}`,
1608
+ label: t,
1609
+ attributes: [],
1610
+ alias: n,
1611
+ shape: "erBox",
1612
+ look: f().look ?? "default",
1613
+ cssClasses: "default",
1614
+ cssStyles: [],
1615
+ labelType: "markdown"
1616
+ }), e.info("Added new entity :", t)), this.entities.get(t);
1617
+ }
1618
+ getEntity(e) {
1619
+ return this.entities.get(e);
1620
+ }
1621
+ getEntities() {
1622
+ return this.entities;
1623
+ }
1624
+ getClasses() {
1625
+ return this.classes;
1626
+ }
1627
+ addAttributes(t, n) {
1628
+ let r = this.addEntity(t), i;
1629
+ for (i = n.length - 1; i >= 0; i--) n[i].keys || (n[i].keys = []), n[i].comment || (n[i].comment = ""), r.attributes.push(n[i]), e.debug("Added attribute ", n[i].name);
1630
+ }
1631
+ addRelationship(t, n, r, i) {
1632
+ let a;
1633
+ if (this.subGraphLookup.has(t)) a = t;
1634
+ else {
1635
+ let e = this.addEntity(t);
1636
+ if (!e) return;
1637
+ a = e.id;
1638
+ }
1639
+ let o;
1640
+ if (this.subGraphLookup.has(r)) o = r;
1641
+ else {
1642
+ let e = this.addEntity(r);
1643
+ if (!e) return;
1644
+ o = e.id;
1645
+ }
1646
+ let s = {
1647
+ entityA: a,
1648
+ roleA: n,
1649
+ entityB: o,
1650
+ relSpec: i
1651
+ };
1652
+ this.relationships.push(s), e.debug("Added new relationship :", s);
1653
+ }
1654
+ getRelationships() {
1655
+ return this.relationships;
1656
+ }
1657
+ getDirection() {
1658
+ return this.direction;
1659
+ }
1660
+ setDirection(e) {
1661
+ this.direction = e;
1662
+ }
1663
+ getCompiledStyles(e) {
1664
+ let t = [];
1665
+ for (let n of e) {
1666
+ let e = this.classes.get(n);
1667
+ e?.styles && (t = [...t, ...e.styles ?? []].map((e) => e.trim())), e?.textStyles && (t = [...t, ...e.textStyles ?? []].map((e) => e.trim()));
1668
+ }
1669
+ return t;
1670
+ }
1671
+ addCssStyles(e, t) {
1672
+ for (let n of e) {
1673
+ let e = this.entities.get(n), r = this.subGraphLookup.get(n);
1674
+ if (t) {
1675
+ if (e) for (let n of t) e.cssStyles.push(n);
1676
+ if (r) {
1677
+ r.cssStyles ||= [];
1678
+ for (let e of t) r.cssStyles.push(e);
1679
+ }
1680
+ }
1681
+ }
1682
+ }
1683
+ addClass(e, t) {
1684
+ e.forEach((e) => {
1685
+ let n = this.classes.get(e);
1686
+ n === void 0 && (n = {
1687
+ id: e,
1688
+ styles: [],
1689
+ textStyles: []
1690
+ }, this.classes.set(e, n)), t && t.forEach(function(e) {
1691
+ if (/color/.exec(e)) {
1692
+ let t = e.replace("fill", "bgFill");
1693
+ n.textStyles.push(t);
1694
+ }
1695
+ n.styles.push(e);
1696
+ });
1697
+ });
1698
+ }
1699
+ addSubGraph(t, r, i) {
1700
+ let a = t.text.trim(), o = i.text, s = (/* @__PURE__ */ n((e) => {
1701
+ let t = /* @__PURE__ */ new Set(), n;
1702
+ return {
1703
+ nodeList: e.filter((e) => {
1704
+ if (e?.stmt) return e.stmt === "dir" && (n = e.value), !1;
1705
+ if (typeof e != "string") return !1;
1706
+ let r = e.trim();
1707
+ return !r || t.has(r) ? !1 : (t.add(r), !0);
1708
+ }),
1709
+ dir: n
1710
+ };
1711
+ }, "uniq"))(r.flat()), c = s.nodeList, l = s.dir;
1712
+ a ??= "subGraph" + this.subCount, o ||= "", o = this.sanitizeText(o), this.subCount += 1;
1713
+ let u = {
1714
+ id: a,
1715
+ nodes: c,
1716
+ title: o.trim(),
1717
+ classes: [],
1718
+ cssStyles: [],
1719
+ dir: l,
1720
+ labelType: this.sanitizeNodeLabelType(i?.type)
1721
+ };
1722
+ return e.info("Adding", u.id, u.nodes, u.dir), u.nodes = this.makeUniq(u, this.subGraphs).nodes, this.subGraphs.push(u), this.subGraphLookup.set(a, u), a;
1723
+ }
1724
+ getSubGraphs() {
1725
+ return this.subGraphs;
1726
+ }
1727
+ setClass(e, t) {
1728
+ for (let n of e) {
1729
+ let e = this.entities.get(n);
1730
+ if (e) for (let n of t) e.cssClasses += " " + n;
1731
+ let r = this.subGraphLookup.get(n);
1732
+ if (r) for (let e of t) r.classes.push(e);
1733
+ }
1734
+ }
1735
+ subgraphNodeCache(e) {
1736
+ let t = /* @__PURE__ */ new Set();
1737
+ for (let n of e) for (let e of n.nodes) t.add(e);
1738
+ return t;
1739
+ }
1740
+ makeUniq(t, n) {
1741
+ let r = this.subgraphNodeCache(n), i = [];
1742
+ return t.nodes.forEach((n, a) => {
1743
+ r.has(n) ? e.warn(`Entity '${n}' already belongs to another subgraph and will be ignored`) : i.push(t.nodes[a]);
1744
+ }), { nodes: i };
1745
+ }
1746
+ sanitizeText(e) {
1747
+ return l.sanitizeText(e, f());
1748
+ }
1749
+ sanitizeNodeLabelType(e) {
1750
+ switch (e) {
1751
+ case "markdown":
1752
+ case "string":
1753
+ case "text": return e;
1754
+ default: return "markdown";
1755
+ }
1756
+ }
1757
+ clear() {
1758
+ this.entities = /* @__PURE__ */ new Map(), this.classes = /* @__PURE__ */ new Map(), this.relationships = [], this.subGraphs = [], this.subGraphLookup = /* @__PURE__ */ new Map(), this.subCount = 0, this.subgraphDepth = 0, s();
1759
+ }
1760
+ getData() {
1761
+ let e = [], t = [], n = f(), r = this.getSubGraphs(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
1762
+ for (let e = r.length - 1; e >= 0; e--) {
1763
+ let t = r[e];
1764
+ t.nodes.length > 0 && a.set(t.id, !0);
1765
+ for (let e of t.nodes) i.set(e, t.id);
1766
+ }
1767
+ for (let t = r.length - 1; t >= 0; t--) {
1768
+ let a = r[t];
1769
+ e.push({
1770
+ id: a.id,
1771
+ label: a.title,
1772
+ labelStyle: "",
1773
+ labelType: a.labelType,
1774
+ parentId: i.get(a.id),
1775
+ padding: 8,
1776
+ cssCompiledStyles: this.getCompiledStyles(a.classes),
1777
+ cssStyles: a.cssStyles,
1778
+ cssClasses: a.classes.join(" "),
1779
+ shape: "rect",
1780
+ dir: a.dir,
1781
+ isGroup: !0,
1782
+ look: n.look
1783
+ });
1784
+ }
1785
+ let o = new Set(r.map((e) => e.id)), s = 0;
1786
+ for (let t of this.entities.keys()) {
1787
+ if (o.has(t)) continue;
1788
+ let n = this.entities.get(t);
1789
+ n && (n.cssCompiledStyles = this.getCompiledStyles(n.cssClasses.split(" ")), n.colorIndex = s++, e.push({
1790
+ ...n,
1791
+ parentId: i.get(t),
1792
+ isGroup: !1
1793
+ }));
1794
+ }
1795
+ let c = 0;
1796
+ for (let e of this.relationships) {
1797
+ let r = {
1798
+ id: h(e.entityA, e.entityB, {
1799
+ prefix: "id",
1800
+ counter: c++
1801
+ }),
1802
+ type: "normal",
1803
+ curve: "basis",
1804
+ start: e.entityA,
1805
+ end: e.entityB,
1806
+ label: e.roleA,
1807
+ labelpos: "c",
1808
+ thickness: "normal",
1809
+ classes: "relationshipLine",
1810
+ arrowTypeStart: e.relSpec.cardB.toLowerCase(),
1811
+ arrowTypeEnd: e.relSpec.cardA.toLowerCase(),
1812
+ pattern: e.relSpec.relType == "IDENTIFYING" ? "solid" : "dashed",
1813
+ look: n.look,
1814
+ labelType: "markdown"
1815
+ };
1816
+ t.push(r);
1817
+ }
1818
+ return {
1819
+ nodes: e,
1820
+ edges: t,
1821
+ other: {},
1822
+ config: n,
1823
+ direction: this.direction
1824
+ };
1825
+ }
1826
+ }, w = {};
1827
+ r(w, { draw: () => T });
1828
+ var T = /* @__PURE__ */ n(async function(n, r, i, a) {
1829
+ e.info("REF0:"), e.info("Drawing er diagram (unified)", r);
1830
+ let { securityLevel: o, er: s, layout: c } = f(), l = a.db.getData(), u = y(r, o);
1831
+ l.type = a.type, l.layoutAlgorithm = v(c), l.config.flowchart.nodeSpacing = s?.nodeSpacing || 140, l.config.flowchart.rankSpacing = s?.rankSpacing || 80, l.direction = a.db.getDirection();
1832
+ let { config: d } = l, { look: p } = d;
1833
+ l.markers = p === "neo" ? [
1834
+ "only_one_neo",
1835
+ "zero_or_one_neo",
1836
+ "one_or_more_neo",
1837
+ "zero_or_more_neo"
1838
+ ] : [
1839
+ "only_one",
1840
+ "zero_or_one",
1841
+ "one_or_more",
1842
+ "zero_or_more"
1843
+ ], l.diagramId = r, await _(l, u), l.layoutAlgorithm === "elk" && u.select(".edges").lower();
1844
+ let m = u.selectAll("[id*=\"-background\"]");
1845
+ Array.from(m).length > 0 && m.each(function() {
1846
+ let e = t(this), n = e.attr("id").replace("-background", ""), r = u.select(`#${CSS.escape(n)}`);
1847
+ if (!r.empty()) {
1848
+ let t = r.attr("transform");
1849
+ e.attr("transform", t);
1850
+ }
1851
+ }), g.insertTitle(u, "erDiagramTitleText", s?.titleTopMargin ?? 25, a.db.getDiagramTitle()), b(u, 8, "erDiagram", s?.useMaxWidth ?? !0);
1852
+ }, "draw"), E = /* @__PURE__ */ n((e, t) => {
1853
+ let n = m, r = n(e, "r"), i = n(e, "g"), a = n(e, "b");
1854
+ return c(r, i, a, t);
1855
+ }, "fade"), D = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), O = /* @__PURE__ */ n((e) => {
1856
+ let { theme: t, look: n, bkgColorArray: r, borderColorArray: i } = e;
1857
+ if (!D.has(t)) return "";
1858
+ let a = r?.length > 0, o = "";
1859
+ for (let t = 0; t < e.THEME_COLOR_LIMIT; t++) o += `
1860
+
1861
+ [data-look="${n}"][data-color-id="color-${t}"].node path {
1862
+ stroke: ${i[t]};
1863
+ ${a ? `fill: ${r[t]};` : ""}
1864
+ }
1865
+
1866
+ [data-look="${n}"][data-color-id="color-${t}"].node rect {
1867
+ stroke: ${i[t]};
1868
+ ${a ? `fill: ${r[t]};` : ""}
1869
+ }
1870
+ `;
1871
+ return o;
1872
+ }, "genColor"), k = {
1873
+ parser: S,
1874
+ get db() {
1875
+ return new C();
1876
+ },
1877
+ renderer: w,
1878
+ styles: /* @__PURE__ */ n((e) => {
1879
+ let { look: t, theme: n, erEdgeLabelBackground: r, strokeWidth: i } = e;
1880
+ return `
1881
+ ${O(e)}
1882
+ .entityBox {
1883
+ fill: ${e.mainBkg};
1884
+ stroke: ${e.nodeBorder};
1885
+ }
1886
+
1887
+ .relationshipLabelBox {
1888
+ fill: ${e.tertiaryColor};
1889
+ opacity: 0.7;
1890
+ background-color: ${e.tertiaryColor};
1891
+ rect {
1892
+ opacity: 0.5;
1893
+ }
1894
+ }
1895
+
1896
+ .labelBkg {
1897
+ background-color: ${D.has(n) && r ? r : E(e.tertiaryColor, .5)};
1898
+ }
1899
+
1900
+ .edgeLabel {
1901
+ background-color: ${D.has(n) && r ? r : e.edgeLabelBackground};
1902
+ }
1903
+ .edgeLabel .label rect {
1904
+ fill: ${D.has(n) && r ? r : e.edgeLabelBackground};
1905
+ }
1906
+ .edgeLabel .label text {
1907
+ fill: ${e.textColor};
1908
+ }
1909
+
1910
+ .edgeLabel .label {
1911
+ fill: ${e.nodeBorder};
1912
+ font-size: 14px;
1913
+ }
1914
+
1915
+ .label {
1916
+ font-family: ${e.fontFamily};
1917
+ color: ${e.nodeTextColor || e.textColor};
1918
+ }
1919
+
1920
+ .edge-pattern-dashed {
1921
+ stroke-dasharray: 8,8;
1922
+ }
1923
+
1924
+ .node rect,
1925
+ .node circle,
1926
+ .node ellipse,
1927
+ .node polygon
1928
+ {
1929
+ fill: ${e.mainBkg};
1930
+ stroke: ${e.nodeBorder};
1931
+ stroke-width: ${t === "neo" ? i : "1px"};
1932
+ }
1933
+
1934
+ .relationshipLine {
1935
+ stroke: ${e.lineColor};
1936
+ stroke-width: ${t === "neo" ? i : "1px"};
1937
+ fill: none;
1938
+ }
1939
+
1940
+ .marker {
1941
+ fill: none !important;
1942
+ stroke: ${e.lineColor} !important;
1943
+ stroke-width: 1;
1944
+ }
1945
+ [data-look=neo].labelBkg {
1946
+ background-color: ${E(e.tertiaryColor, .5)};
1947
+ }
1948
+
1949
+ .cluster rect {
1950
+ fill: ${e.clusterBkg ?? e.mainBkg};
1951
+ stroke: ${e.clusterBorder ?? e.nodeBorder};
1952
+ stroke-width: 1px;
1953
+ }
1954
+
1955
+ .cluster text {
1956
+ fill: ${e.titleColor ?? e.textColor};
1957
+ }
1958
+
1959
+ .cluster-label text {
1960
+ fill: ${e.titleColor ?? e.textColor};
1961
+ }
1962
+ `;
1963
+ }, "getStyles")
1964
+ };
1965
+ //#endregion
1966
+ export { k as diagram };