@toimc/markdown 0.0.1 → 0.0.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 (237) hide show
  1. package/dist/{CodeBlock.vue.d.ts → components/CodeBlock.vue.d.ts} +10 -1
  2. package/dist/components/CodeBlock.vue.d.ts.map +1 -0
  3. package/dist/components/LatexBlock.vue.d.ts.map +1 -0
  4. package/dist/components/MarkdownRenderer.vue.d.ts.map +1 -0
  5. package/dist/components/MermaidBlock.vue.d.ts.map +1 -0
  6. package/dist/composables/useMarkdownIt.d.ts.map +1 -1
  7. package/dist/index.cjs +62 -59
  8. package/dist/index.d.ts +4 -4
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.mjs +4536 -4331
  11. package/dist/markdown.css +1 -1
  12. package/dist/utils/formula-guard.d.ts +13 -0
  13. package/dist/utils/formula-guard.d.ts.map +1 -0
  14. package/dist/utils/split-lines.d.ts +10 -0
  15. package/dist/utils/split-lines.d.ts.map +1 -0
  16. package/package.json +6 -3
  17. package/dist/CodeBlock.test.d.ts +0 -2
  18. package/dist/CodeBlock.test.d.ts.map +0 -1
  19. package/dist/CodeBlock.vue.d.ts.map +0 -1
  20. package/dist/LatexBlock.test.d.ts +0 -2
  21. package/dist/LatexBlock.test.d.ts.map +0 -1
  22. package/dist/LatexBlock.vue.d.ts.map +0 -1
  23. package/dist/MarkdownRenderer.test.d.ts +0 -2
  24. package/dist/MarkdownRenderer.test.d.ts.map +0 -1
  25. package/dist/MarkdownRenderer.vue.d.ts.map +0 -1
  26. package/dist/MermaidBlock.test.d.ts +0 -2
  27. package/dist/MermaidBlock.test.d.ts.map +0 -1
  28. package/dist/MermaidBlock.vue.d.ts.map +0 -1
  29. package/dist/abnfDiagram-N423BO3Z-CpvDGmAd.cjs +0 -1
  30. package/dist/abnfDiagram-N423BO3Z-DuAPsGBR.js +0 -89
  31. package/dist/arc-CFxpoaLu.js +0 -82
  32. package/dist/arc-Dh2Zrypi.cjs +0 -1
  33. package/dist/architecture-TIHT7OUA-CUym9zMN.cjs +0 -1
  34. package/dist/architecture-TIHT7OUA-DDwCCw0y.js +0 -3
  35. package/dist/architectureDiagram-T3A2C74G-CS6-PQjR.cjs +0 -36
  36. package/dist/architectureDiagram-T3A2C74G-d7xzbLJQ.js +0 -4155
  37. package/dist/array-CApNbSU9.js +0 -6
  38. package/dist/array-DZSRzHA_.cjs +0 -1
  39. package/dist/blockDiagram-VBNYF7ZC-CnvNE8Hq.js +0 -3157
  40. package/dist/blockDiagram-VBNYF7ZC-DVl7vKmv.cjs +0 -132
  41. package/dist/c4Diagram-5PPSVZJV-B1RTcquO.js +0 -2982
  42. package/dist/c4Diagram-5PPSVZJV-Djkk0hzr.cjs +0 -10
  43. package/dist/channel-CNZiSge7.cjs +0 -1
  44. package/dist/channel-CqlbSsMQ.js +0 -5
  45. package/dist/chunk-2GRJ4B5K-BgeLbn06.cjs +0 -1
  46. package/dist/chunk-2GRJ4B5K-C5VToU5T.js +0 -61
  47. package/dist/chunk-2Q5K7J3B-B8v9mTdK.cjs +0 -1
  48. package/dist/chunk-2Q5K7J3B-C3WfnuyI.js +0 -15
  49. package/dist/chunk-4I5QYGJK-Bs8S-Wfu.js +0 -275
  50. package/dist/chunk-4I5QYGJK-CBqJO_mi.cjs +0 -1
  51. package/dist/chunk-5RXB4S5H-BnJ1P9K2.js +0 -2042
  52. package/dist/chunk-5RXB4S5H-BtEDiC1U.cjs +0 -231
  53. package/dist/chunk-5VM5RSS4-BsUXY5k9.js +0 -5
  54. package/dist/chunk-5VM5RSS4-CwDmQ9T_.cjs +0 -15
  55. package/dist/chunk-6Q2QTUOP-C0P-wtth.js +0 -490
  56. package/dist/chunk-6Q2QTUOP-UC-G8b3B.cjs +0 -88
  57. package/dist/chunk-7BUUIJ7U-CZdUK2qY.js +0 -82
  58. package/dist/chunk-7BUUIJ7U-MzS1pW_S.cjs +0 -1
  59. package/dist/chunk-7Z6QIM7H-CJdupq9f.js +0 -593
  60. package/dist/chunk-7Z6QIM7H-CUGcycR0.cjs +0 -10
  61. package/dist/chunk-GF5L2VYU-CDGpCl8Z.js +0 -3357
  62. package/dist/chunk-GF5L2VYU-DWhSvqYP.cjs +0 -206
  63. package/dist/chunk-I66GZJ75-D8wVRUgw.cjs +0 -127
  64. package/dist/chunk-I66GZJ75-xmbkwRyp.js +0 -3754
  65. package/dist/chunk-JQJVKLGR-B-jNEb9r.js +0 -4135
  66. package/dist/chunk-JQJVKLGR-CbhQdRxu.cjs +0 -156
  67. package/dist/chunk-JWPE2WC7-B8JIODrM.js +0 -8
  68. package/dist/chunk-JWPE2WC7-Cs1kjq8S.cjs +0 -1
  69. package/dist/chunk-KBJHAD2P-BMuT9eJO.cjs +0 -1
  70. package/dist/chunk-KBJHAD2P-CCpB6hWQ.js +0 -26
  71. package/dist/chunk-KEIR6QF5-RwFi50en.js +0 -21456
  72. package/dist/chunk-KEIR6QF5-rUKzMPy0.cjs +0 -161
  73. package/dist/chunk-NSK5VX7P-BO1SrWAL.js +0 -1335
  74. package/dist/chunk-NSK5VX7P-BiC_63US.cjs +0 -2
  75. package/dist/chunk-QR6OTTB3-BSxbyKp_.cjs +0 -62
  76. package/dist/chunk-QR6OTTB3-CGxJcV-X.js +0 -3738
  77. package/dist/chunk-RYQCIY6F-Lf2oVMMh.cjs +0 -1
  78. package/dist/chunk-RYQCIY6F-UBebC0ib.js +0 -241
  79. package/dist/chunk-UBXNYLIW-BURVNZm2.cjs +0 -1
  80. package/dist/chunk-UBXNYLIW-fOGkdEwd.js +0 -32
  81. package/dist/chunk-W5SLKNZC-BLFqePZ1.cjs +0 -1
  82. package/dist/chunk-W5SLKNZC-C2SYjJjL.js +0 -67
  83. package/dist/chunk-WRU74C26-Cr4HTCc1.cjs +0 -70
  84. package/dist/chunk-WRU74C26-UGtU6H2a.js +0 -1636
  85. package/dist/chunk-XXDRQBXY-GENMsCHk.js +0 -9
  86. package/dist/chunk-XXDRQBXY-yMT3rT5Y.cjs +0 -1
  87. package/dist/chunk-Y2CYZVJY-CnmLqFtv.cjs +0 -1
  88. package/dist/chunk-Y2CYZVJY-DO9UHHon.js +0 -12
  89. package/dist/classDiagram-JCYQIIEL-DUjWUDYG.cjs +0 -1
  90. package/dist/classDiagram-JCYQIIEL-Dm9anlJw.js +0 -30
  91. package/dist/classDiagram-v2-OCEON4UE-Bl-vyFyz.js +0 -30
  92. package/dist/classDiagram-v2-OCEON4UE-DUjWUDYG.cjs +0 -1
  93. package/dist/composables/useHighlighter.test.d.ts +0 -2
  94. package/dist/composables/useHighlighter.test.d.ts.map +0 -1
  95. package/dist/composables/useMarkdownIt.test.d.ts +0 -2
  96. package/dist/composables/useMarkdownIt.test.d.ts.map +0 -1
  97. package/dist/composables/useShikiTokenizer.test.d.ts +0 -2
  98. package/dist/composables/useShikiTokenizer.test.d.ts.map +0 -1
  99. package/dist/composables/useStreamingMarkdown.test.d.ts +0 -2
  100. package/dist/composables/useStreamingMarkdown.test.d.ts.map +0 -1
  101. package/dist/cose-bilkent-JH36ORCC-C1RCVzVZ.cjs +0 -1
  102. package/dist/cose-bilkent-JH36ORCC-C5FbROLY.js +0 -2254
  103. package/dist/cynefin-VYW2F7L2-CMgnLl46.js +0 -3
  104. package/dist/cynefin-VYW2F7L2-DVi1CF5b.cjs +0 -1
  105. package/dist/cynefinDiagram-MW4NZA55-CkZY080C.cjs +0 -62
  106. package/dist/cynefinDiagram-MW4NZA55-DbAAx9CC.js +0 -355
  107. package/dist/cytoscape.esm-BKhIYxsH.cjs +0 -321
  108. package/dist/cytoscape.esm-DMXbtFI-.js +0 -18145
  109. package/dist/dagre-DarAkhy1.cjs +0 -1
  110. package/dist/dagre-VZM6K2ZE-CpL0s3GG.js +0 -328
  111. package/dist/dagre-VZM6K2ZE-D1_S1oSj.cjs +0 -4
  112. package/dist/dagre-x4cMb6gU.js +0 -1699
  113. package/dist/defaultLocale-ybN1Vtvg.cjs +0 -1
  114. package/dist/defaultLocale-yzzuPw6P.js +0 -198
  115. package/dist/diagram-7IWD3JNH-BXvOBw2z.js +0 -300
  116. package/dist/diagram-7IWD3JNH-W-Kjft6l.cjs +0 -30
  117. package/dist/diagram-B4RE2ZJO-C4lLgW4X.cjs +0 -3
  118. package/dist/diagram-B4RE2ZJO-DyAAD_bR.js +0 -432
  119. package/dist/diagram-LBJQPF4R-BTgCWP5o.cjs +0 -24
  120. package/dist/diagram-LBJQPF4R-BbMQOpt2.js +0 -134
  121. package/dist/diagram-Q27KOJAE-ink_R6qE.js +0 -527
  122. package/dist/diagram-Q27KOJAE-v-ZMzCxs.cjs +0 -24
  123. package/dist/diagram-UB23O5K3-BXTm2BG0.cjs +0 -41
  124. package/dist/diagram-UB23O5K3-C6rqCJBb.js +0 -214
  125. package/dist/dist-BP2me-br.js +0 -59
  126. package/dist/dist-Dwv2VYAL.cjs +0 -1
  127. package/dist/ebnfDiagram-BXEA7PRR-C80cjdjP.js +0 -100
  128. package/dist/ebnfDiagram-BXEA7PRR-lKO9XwUp.cjs +0 -1
  129. package/dist/erDiagram-JOGREHBK-Blwfr6w3.js +0 -1727
  130. package/dist/erDiagram-JOGREHBK-ChgcmULa.cjs +0 -85
  131. package/dist/eventmodeling-45OFAUF4-BDhzj03B.js +0 -3
  132. package/dist/eventmodeling-45OFAUF4-BtU19idK.cjs +0 -1
  133. package/dist/flowDiagram-UKHOOZJN-Co0JpKUU.js +0 -16
  134. package/dist/flowDiagram-UKHOOZJN-db1Ur2LI.cjs +0 -1
  135. package/dist/ganttDiagram-PKOTCBZU-Byi4E8Ye.js +0 -3073
  136. package/dist/ganttDiagram-PKOTCBZU-C_Vwv1o8.cjs +0 -292
  137. package/dist/gitGraph-TEB2WS4Q-CAeGPNFR.cjs +0 -1
  138. package/dist/gitGraph-TEB2WS4Q-DJA_hE4G.js +0 -3
  139. package/dist/gitGraphDiagram-DS77QQ5N-BG8AQVtP.js +0 -733
  140. package/dist/gitGraphDiagram-DS77QQ5N-DK9VJTjf.cjs +0 -106
  141. package/dist/graphlib-BaETKKSa.cjs +0 -1
  142. package/dist/graphlib-DoD0LnUK.js +0 -1267
  143. package/dist/info-DKCQHKI2-BD_vOCz6.js +0 -3
  144. package/dist/info-DKCQHKI2-p0Lazone.cjs +0 -1
  145. package/dist/infoDiagram-6WML65LV-B6PBOy7T.js +0 -20
  146. package/dist/infoDiagram-6WML65LV-nBSrP53Z.cjs +0 -2
  147. package/dist/init-BJdqMO10.cjs +0 -1
  148. package/dist/init-sjaVZO3f.js +0 -13
  149. package/dist/ishikawaDiagram-WSZJBQD7-BxEkaF2A.js +0 -719
  150. package/dist/ishikawaDiagram-WSZJBQD7-CjyKQ_N6.cjs +0 -70
  151. package/dist/journeyDiagram-NVQOT4AX-BPCuqjbW.js +0 -884
  152. package/dist/journeyDiagram-NVQOT4AX-DKgEeNcy.cjs +0 -139
  153. package/dist/kanban-definition-27J2QSJJ-BeKnR9zB.cjs +0 -89
  154. package/dist/kanban-definition-27J2QSJJ-D1pVuCv2.js +0 -974
  155. package/dist/katex-BfeHGk4M.js +0 -21977
  156. package/dist/katex-CEF6MvLx.cjs +0 -257
  157. package/dist/line-8EHPtDZA.cjs +0 -1
  158. package/dist/line-BifI9Y7j.js +0 -34
  159. package/dist/linear-Nt9BuHfn.cjs +0 -1
  160. package/dist/linear-l8AD1ib_.js +0 -288
  161. package/dist/map-CCpPjiU9.cjs +0 -1
  162. package/dist/map-DUk1uXZC.js +0 -241
  163. package/dist/mermaid-parser.core-BupC9XGF.js +0 -638
  164. package/dist/mermaid-parser.core-aXxW1VLR.cjs +0 -6
  165. package/dist/mermaid.core-C05C5gh_.cjs +0 -41
  166. package/dist/mermaid.core-CxM-VhZd.js +0 -2297
  167. package/dist/mindmap-definition-FAOFIHXS-B_k8KOvw.js +0 -1006
  168. package/dist/mindmap-definition-FAOFIHXS-CKPAiVKf.cjs +0 -96
  169. package/dist/ordinal-Bm_chml2.cjs +0 -1
  170. package/dist/ordinal-CNQzPcrr.js +0 -65
  171. package/dist/packet-7NZHBO7P-CVdRavgo.cjs +0 -1
  172. package/dist/packet-7NZHBO7P-CgBlALV1.js +0 -3
  173. package/dist/path-DIS6ck99.cjs +0 -1
  174. package/dist/path-DVvH25eQ.js +0 -84
  175. package/dist/pegDiagram-VL7TDLO6-B5Jhedbv.cjs +0 -1
  176. package/dist/pegDiagram-VL7TDLO6-PP-A-3Lv.js +0 -94
  177. package/dist/pie-RZYD4A2V-CryPC-P_.js +0 -3
  178. package/dist/pie-RZYD4A2V-CwDJ0bEW.cjs +0 -1
  179. package/dist/pieDiagram-7S7Q4E2Y-CgDU9E10.cjs +0 -39
  180. package/dist/pieDiagram-7S7Q4E2Y-CxNt1xaN.js +0 -203
  181. package/dist/quadrantDiagram-CIZ2JOQS-CMUanfcR.js +0 -2001
  182. package/dist/quadrantDiagram-CIZ2JOQS-vybEBK1o.cjs +0 -7
  183. package/dist/radar-I7S5WNFK-DaVgEjvC.cjs +0 -1
  184. package/dist/radar-I7S5WNFK-DgzJDRy3.js +0 -3
  185. package/dist/railroad-3IZDKUUU-BPsrMjqz.cjs +0 -1
  186. package/dist/railroad-3IZDKUUU-DFp3mbpB.js +0 -3
  187. package/dist/railroad-abnf-AHOZXSZD-BRjidKH0.js +0 -3
  188. package/dist/railroad-abnf-AHOZXSZD-ZpHq_KEy.cjs +0 -1
  189. package/dist/railroad-ebnf-EBAXGLYW-B45niwuq.cjs +0 -1
  190. package/dist/railroad-ebnf-EBAXGLYW-PgrDWact.js +0 -3
  191. package/dist/railroad-peg-LSFZ7HO6-CMKir81Y.js +0 -3
  192. package/dist/railroad-peg-LSFZ7HO6-DUsuEX2Z.cjs +0 -1
  193. package/dist/railroadDiagram-AXF67PYL-D7y_2yAa.cjs +0 -1
  194. package/dist/railroadDiagram-AXF67PYL-iLkvx2oU.js +0 -76
  195. package/dist/renderers/tokensToHtml.test.d.ts +0 -2
  196. package/dist/renderers/tokensToHtml.test.d.ts.map +0 -1
  197. package/dist/requirementDiagram-LRYGKXZP-Bs2mCDzB.js +0 -2223
  198. package/dist/requirementDiagram-LRYGKXZP-lA2nVr6h.cjs +0 -84
  199. package/dist/rolldown-runtime-B0aSnxlc.js +0 -20
  200. package/dist/rolldown-runtime-DF3sbh8G.cjs +0 -1
  201. package/dist/rough.esm-B2w_aYoc.js +0 -1361
  202. package/dist/rough.esm-ChRLLRha.cjs +0 -1
  203. package/dist/sankeyDiagram-W5VNT64P-BxYQllhE.js +0 -972
  204. package/dist/sankeyDiagram-W5VNT64P-vPci5pOT.cjs +0 -40
  205. package/dist/sequenceDiagram-SI44F4Z6-BNu1-3EN.cjs +0 -162
  206. package/dist/sequenceDiagram-SI44F4Z6-E6AoYU_R.js +0 -4156
  207. package/dist/sizeCapture-X5ZJPWSS-8gbZlYqg.js +0 -46
  208. package/dist/sizeCapture-X5ZJPWSS-bJ2ZX4Du.cjs +0 -1
  209. package/dist/src-C7bjHtAI.js +0 -2139
  210. package/dist/src-D9o9TOtH.cjs +0 -1
  211. package/dist/stateDiagram-OKZ733FA-B7ITlY91.cjs +0 -1
  212. package/dist/stateDiagram-OKZ733FA-BfcOAK65.js +0 -220
  213. package/dist/stateDiagram-v2-UEYNNEHI-BHO-uUPG.js +0 -30
  214. package/dist/stateDiagram-v2-UEYNNEHI-lgGjJyRM.cjs +0 -1
  215. package/dist/swimlanes-SLNWSIFB-BHIPInzG.js +0 -5069
  216. package/dist/swimlanes-SLNWSIFB-C-Z31wMl.cjs +0 -1
  217. package/dist/swimlanesDiagram-ULZ7WXOC-C8pvRoyc.cjs +0 -8
  218. package/dist/swimlanesDiagram-ULZ7WXOC-CK6AVyRM.js +0 -30
  219. package/dist/timeline-definition-Z64GVDOM-C31otJwb.cjs +0 -120
  220. package/dist/timeline-definition-Z64GVDOM-rUKJY7cp.js +0 -1069
  221. package/dist/treeView-QDETBFTQ-BkNUN560.cjs +0 -1
  222. package/dist/treeView-QDETBFTQ-DVp4aTZQ.js +0 -3
  223. package/dist/treemap-6X3UGDF4-BbBnHMHJ.js +0 -3
  224. package/dist/treemap-6X3UGDF4-BcO657a2.cjs +0 -1
  225. package/dist/utils/extractCompleteMarkdown.test.d.ts +0 -2
  226. package/dist/utils/extractCompleteMarkdown.test.d.ts.map +0 -1
  227. package/dist/vennDiagram-T6HMQDX7-DjlTuTEH.cjs +0 -34
  228. package/dist/vennDiagram-T6HMQDX7-vxMe-3nF.js +0 -1880
  229. package/dist/wardley-OPB4EBWU-B-RXhnoN.js +0 -3
  230. package/dist/wardley-OPB4EBWU-CiILNYeL.cjs +0 -1
  231. package/dist/wardleyDiagram-T6FBY63Y-BMQLZV1W.cjs +0 -78
  232. package/dist/wardleyDiagram-T6FBY63Y-C_Q2NmJu.js +0 -645
  233. package/dist/xychartDiagram-ELKLHX3M-Bsa_zeyd.cjs +0 -7
  234. package/dist/xychartDiagram-ELKLHX3M-OcVmrPL6.js +0 -2101
  235. /package/dist/{LatexBlock.vue.d.ts → components/LatexBlock.vue.d.ts} +0 -0
  236. /package/dist/{MarkdownRenderer.vue.d.ts → components/MarkdownRenderer.vue.d.ts} +0 -0
  237. /package/dist/{MermaidBlock.vue.d.ts → components/MermaidBlock.vue.d.ts} +0 -0
@@ -1,1727 +0,0 @@
1
- import { n as e, t } from "./chunk-Y2CYZVJY-DO9UHHon.js";
2
- import { m as n, p as r } from "./src-C7bjHtAI.js";
3
- import { H as i, K as a, U as o, a as s, it as c, v as l, w as u, x as d, y as f } from "./chunk-I66GZJ75-xmbkwRyp.js";
4
- import { t as p } from "./channel-CqlbSsMQ.js";
5
- import { c as m, g as h } from "./chunk-NSK5VX7P-BO1SrWAL.js";
6
- import "./chunk-4I5QYGJK-Bs8S-Wfu.js";
7
- import "./chunk-WRU74C26-UGtU6H2a.js";
8
- import "./chunk-7BUUIJ7U-CZdUK2qY.js";
9
- import "./chunk-UBXNYLIW-fOGkdEwd.js";
10
- import { t as g } from "./chunk-XXDRQBXY-GENMsCHk.js";
11
- import { t as _ } from "./chunk-KBJHAD2P-CCpB6hWQ.js";
12
- import "./chunk-W5SLKNZC-C2SYjJjL.js";
13
- import "./chunk-QR6OTTB3-CGxJcV-X.js";
14
- import "./chunk-7Z6QIM7H-CJdupq9f.js";
15
- import { i as v, r as y } from "./mermaid.core-CxM-VhZd.js";
16
- //#region ../../node_modules/.pnpm/mermaid@11.16.1/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-JOGREHBK.mjs
17
- var b = (function() {
18
- var t = /* @__PURE__ */ e(function(e, t, n, r) {
19
- for (n ||= {}, r = e.length; r--; n[e[r]] = t);
20
- return n;
21
- }, "o"), n = [
22
- 6,
23
- 8,
24
- 10,
25
- 22,
26
- 24,
27
- 26,
28
- 28,
29
- 33,
30
- 34,
31
- 35,
32
- 36,
33
- 37,
34
- 40,
35
- 43,
36
- 44,
37
- 48,
38
- 50,
39
- 51,
40
- 52
41
- ], r = [1, 10], i = [1, 11], a = [1, 12], o = [1, 13], s = [1, 23], c = [1, 24], l = [1, 25], u = [1, 26], d = [1, 27], f = [1, 19], p = [1, 28], m = [1, 29], h = [1, 20], g = [1, 18], _ = [1, 21], v = [1, 22], y = [1, 36], b = [1, 37], x = [1, 38], S = [1, 39], C = [1, 40], w = [
42
- 6,
43
- 8,
44
- 10,
45
- 13,
46
- 15,
47
- 17,
48
- 20,
49
- 21,
50
- 22,
51
- 24,
52
- 26,
53
- 28,
54
- 33,
55
- 34,
56
- 35,
57
- 36,
58
- 37,
59
- 40,
60
- 43,
61
- 44,
62
- 48,
63
- 50,
64
- 51,
65
- 52,
66
- 66,
67
- 67,
68
- 68,
69
- 69,
70
- 70
71
- ], T = [1, 45], E = [1, 46], D = [1, 55], O = [
72
- 40,
73
- 48,
74
- 50,
75
- 51,
76
- 52,
77
- 71,
78
- 72
79
- ], k = [1, 66], A = [1, 64], j = [1, 61], M = [1, 65], N = [1, 67], P = [
80
- 6,
81
- 8,
82
- 10,
83
- 13,
84
- 17,
85
- 22,
86
- 24,
87
- 26,
88
- 28,
89
- 33,
90
- 34,
91
- 35,
92
- 36,
93
- 37,
94
- 40,
95
- 41,
96
- 42,
97
- 43,
98
- 44,
99
- 48,
100
- 49,
101
- 50,
102
- 51,
103
- 52,
104
- 66,
105
- 67,
106
- 68,
107
- 69,
108
- 70
109
- ], F = [
110
- 66,
111
- 67,
112
- 68,
113
- 69,
114
- 70
115
- ], I = [1, 85], L = [1, 84], R = [1, 82], z = [1, 83], B = [
116
- 6,
117
- 10,
118
- 42,
119
- 47
120
- ], V = [
121
- 6,
122
- 10,
123
- 13,
124
- 41,
125
- 42,
126
- 47,
127
- 48,
128
- 49
129
- ], H = [1, 93], U = [1, 92], W = [1, 91], G = [19, 58], K = [1, 102], q = [1, 101], J = [
130
- 19,
131
- 58,
132
- 61,
133
- 63
134
- ], Y = {
135
- trace: /* @__PURE__ */ e(function() {}, "trace"),
136
- yy: {},
137
- symbols_: {
138
- error: 2,
139
- start: 3,
140
- ER_DIAGRAM: 4,
141
- document: 5,
142
- EOF: 6,
143
- line: 7,
144
- SPACE: 8,
145
- statement: 9,
146
- NEWLINE: 10,
147
- entityName: 11,
148
- relSpec: 12,
149
- COLON: 13,
150
- role: 14,
151
- STYLE_SEPARATOR: 15,
152
- idList: 16,
153
- BLOCK_START: 17,
154
- attributes: 18,
155
- BLOCK_STOP: 19,
156
- SQS: 20,
157
- SQE: 21,
158
- title: 22,
159
- title_value: 23,
160
- acc_title: 24,
161
- acc_title_value: 25,
162
- acc_descr: 26,
163
- acc_descr_value: 27,
164
- acc_descr_multiline_value: 28,
165
- direction: 29,
166
- classDefStatement: 30,
167
- classStatement: 31,
168
- styleStatement: 32,
169
- direction_tb: 33,
170
- direction_bt: 34,
171
- direction_rl: 35,
172
- direction_lr: 36,
173
- CLASSDEF: 37,
174
- stylesOpt: 38,
175
- separator: 39,
176
- UNICODE_TEXT: 40,
177
- STYLE_TEXT: 41,
178
- COMMA: 42,
179
- CLASS: 43,
180
- STYLE: 44,
181
- style: 45,
182
- styleComponent: 46,
183
- SEMI: 47,
184
- NUM: 48,
185
- BRKT: 49,
186
- ENTITY_NAME: 50,
187
- DECIMAL_NUM: 51,
188
- ENTITY_ONE: 52,
189
- attribute: 53,
190
- attributeType: 54,
191
- attributeName: 55,
192
- attributeKeyTypeList: 56,
193
- attributeComment: 57,
194
- ATTRIBUTE_WORD: 58,
195
- "?": 59,
196
- attributeKeyType: 60,
197
- ",": 61,
198
- ATTRIBUTE_KEY: 62,
199
- COMMENT: 63,
200
- cardinality: 64,
201
- relType: 65,
202
- ZERO_OR_ONE: 66,
203
- ZERO_OR_MORE: 67,
204
- ONE_OR_MORE: 68,
205
- ONLY_ONE: 69,
206
- MD_PARENT: 70,
207
- NON_IDENTIFYING: 71,
208
- IDENTIFYING: 72,
209
- WORD: 73,
210
- $accept: 0,
211
- $end: 1
212
- },
213
- terminals_: {
214
- 2: "error",
215
- 4: "ER_DIAGRAM",
216
- 6: "EOF",
217
- 8: "SPACE",
218
- 10: "NEWLINE",
219
- 13: "COLON",
220
- 15: "STYLE_SEPARATOR",
221
- 17: "BLOCK_START",
222
- 19: "BLOCK_STOP",
223
- 20: "SQS",
224
- 21: "SQE",
225
- 22: "title",
226
- 23: "title_value",
227
- 24: "acc_title",
228
- 25: "acc_title_value",
229
- 26: "acc_descr",
230
- 27: "acc_descr_value",
231
- 28: "acc_descr_multiline_value",
232
- 33: "direction_tb",
233
- 34: "direction_bt",
234
- 35: "direction_rl",
235
- 36: "direction_lr",
236
- 37: "CLASSDEF",
237
- 40: "UNICODE_TEXT",
238
- 41: "STYLE_TEXT",
239
- 42: "COMMA",
240
- 43: "CLASS",
241
- 44: "STYLE",
242
- 47: "SEMI",
243
- 48: "NUM",
244
- 49: "BRKT",
245
- 50: "ENTITY_NAME",
246
- 51: "DECIMAL_NUM",
247
- 52: "ENTITY_ONE",
248
- 58: "ATTRIBUTE_WORD",
249
- 59: "?",
250
- 61: ",",
251
- 62: "ATTRIBUTE_KEY",
252
- 63: "COMMENT",
253
- 66: "ZERO_OR_ONE",
254
- 67: "ZERO_OR_MORE",
255
- 68: "ONE_OR_MORE",
256
- 69: "ONLY_ONE",
257
- 70: "MD_PARENT",
258
- 71: "NON_IDENTIFYING",
259
- 72: "IDENTIFYING",
260
- 73: "WORD"
261
- },
262
- productions_: [
263
- 0,
264
- [3, 3],
265
- [5, 0],
266
- [5, 2],
267
- [7, 2],
268
- [7, 1],
269
- [7, 1],
270
- [7, 1],
271
- [9, 5],
272
- [9, 9],
273
- [9, 7],
274
- [9, 7],
275
- [9, 4],
276
- [9, 6],
277
- [9, 3],
278
- [9, 5],
279
- [9, 1],
280
- [9, 3],
281
- [9, 7],
282
- [9, 9],
283
- [9, 6],
284
- [9, 8],
285
- [9, 4],
286
- [9, 6],
287
- [9, 2],
288
- [9, 2],
289
- [9, 2],
290
- [9, 1],
291
- [9, 1],
292
- [9, 1],
293
- [9, 1],
294
- [9, 1],
295
- [29, 1],
296
- [29, 1],
297
- [29, 1],
298
- [29, 1],
299
- [30, 4],
300
- [16, 1],
301
- [16, 1],
302
- [16, 3],
303
- [16, 3],
304
- [31, 3],
305
- [32, 4],
306
- [38, 1],
307
- [38, 3],
308
- [45, 1],
309
- [45, 2],
310
- [39, 1],
311
- [39, 1],
312
- [39, 1],
313
- [46, 1],
314
- [46, 1],
315
- [46, 1],
316
- [46, 1],
317
- [11, 1],
318
- [11, 1],
319
- [11, 1],
320
- [11, 1],
321
- [11, 1],
322
- [18, 1],
323
- [18, 2],
324
- [53, 2],
325
- [53, 3],
326
- [53, 3],
327
- [53, 4],
328
- [54, 1],
329
- [54, 2],
330
- [55, 1],
331
- [56, 1],
332
- [56, 3],
333
- [60, 1],
334
- [57, 1],
335
- [12, 3],
336
- [64, 1],
337
- [64, 1],
338
- [64, 1],
339
- [64, 1],
340
- [64, 1],
341
- [65, 1],
342
- [65, 1],
343
- [14, 1],
344
- [14, 1],
345
- [14, 1]
346
- ],
347
- performAction: /* @__PURE__ */ e(function(e, t, n, r, i, a, o) {
348
- var s = a.length - 1;
349
- switch (i) {
350
- case 1: break;
351
- case 2:
352
- this.$ = [];
353
- break;
354
- case 3:
355
- a[s - 1].push(a[s]), this.$ = a[s - 1];
356
- break;
357
- case 4:
358
- case 5:
359
- this.$ = a[s];
360
- break;
361
- case 6:
362
- case 7:
363
- this.$ = [];
364
- break;
365
- case 8:
366
- r.addEntity(a[s - 4]), r.addEntity(a[s - 2]), r.addRelationship(a[s - 4], a[s], a[s - 2], a[s - 3]);
367
- break;
368
- case 9:
369
- 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]);
370
- break;
371
- case 10:
372
- 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]);
373
- break;
374
- case 11:
375
- 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]);
376
- break;
377
- case 12:
378
- r.addEntity(a[s - 3]), r.addAttributes(a[s - 3], a[s - 1]);
379
- break;
380
- case 13:
381
- r.addEntity(a[s - 5]), r.addAttributes(a[s - 5], a[s - 1]), r.setClass([a[s - 5]], a[s - 3]);
382
- break;
383
- case 14:
384
- r.addEntity(a[s - 2]);
385
- break;
386
- case 15:
387
- r.addEntity(a[s - 4]), r.setClass([a[s - 4]], a[s - 2]);
388
- break;
389
- case 16:
390
- r.addEntity(a[s]);
391
- break;
392
- case 17:
393
- r.addEntity(a[s - 2]), r.setClass([a[s - 2]], a[s]);
394
- break;
395
- case 18:
396
- r.addEntity(a[s - 6], a[s - 4]), r.addAttributes(a[s - 6], a[s - 1]);
397
- break;
398
- case 19:
399
- r.addEntity(a[s - 8], a[s - 6]), r.addAttributes(a[s - 8], a[s - 1]), r.setClass([a[s - 8]], a[s - 3]);
400
- break;
401
- case 20:
402
- r.addEntity(a[s - 5], a[s - 3]);
403
- break;
404
- case 21:
405
- r.addEntity(a[s - 7], a[s - 5]), r.setClass([a[s - 7]], a[s - 2]);
406
- break;
407
- case 22:
408
- r.addEntity(a[s - 3], a[s - 1]);
409
- break;
410
- case 23:
411
- r.addEntity(a[s - 5], a[s - 3]), r.setClass([a[s - 5]], a[s]);
412
- break;
413
- case 24:
414
- case 25:
415
- this.$ = a[s].trim(), r.setAccTitle(this.$);
416
- break;
417
- case 26:
418
- case 27:
419
- this.$ = a[s].trim(), r.setAccDescription(this.$);
420
- break;
421
- case 32:
422
- r.setDirection("TB");
423
- break;
424
- case 33:
425
- r.setDirection("BT");
426
- break;
427
- case 34:
428
- r.setDirection("RL");
429
- break;
430
- case 35:
431
- r.setDirection("LR");
432
- break;
433
- case 36:
434
- this.$ = a[s - 3], r.addClass(a[s - 2], a[s - 1]);
435
- break;
436
- case 37:
437
- case 38:
438
- case 59:
439
- case 68:
440
- this.$ = [a[s]];
441
- break;
442
- case 39:
443
- case 40:
444
- this.$ = a[s - 2].concat([a[s]]);
445
- break;
446
- case 41:
447
- this.$ = a[s - 2], r.setClass(a[s - 1], a[s]);
448
- break;
449
- case 42:
450
- this.$ = a[s - 3], r.addCssStyles(a[s - 2], a[s - 1]);
451
- break;
452
- case 43:
453
- this.$ = [a[s]];
454
- break;
455
- case 44:
456
- a[s - 2].push(a[s]), this.$ = a[s - 2];
457
- break;
458
- case 46:
459
- this.$ = a[s - 1] + a[s];
460
- break;
461
- case 54:
462
- case 80:
463
- case 81:
464
- this.$ = a[s].replace(/"/g, "");
465
- break;
466
- case 55:
467
- case 56:
468
- case 57:
469
- case 58:
470
- case 82:
471
- this.$ = a[s];
472
- break;
473
- case 60:
474
- a[s].push(a[s - 1]), this.$ = a[s];
475
- break;
476
- case 61:
477
- this.$ = {
478
- type: a[s - 1],
479
- name: a[s]
480
- };
481
- break;
482
- case 62:
483
- this.$ = {
484
- type: a[s - 2],
485
- name: a[s - 1],
486
- keys: a[s]
487
- };
488
- break;
489
- case 63:
490
- this.$ = {
491
- type: a[s - 2],
492
- name: a[s - 1],
493
- comment: a[s]
494
- };
495
- break;
496
- case 64:
497
- this.$ = {
498
- type: a[s - 3],
499
- name: a[s - 2],
500
- keys: a[s - 1],
501
- comment: a[s]
502
- };
503
- break;
504
- case 65:
505
- case 67:
506
- case 70:
507
- this.$ = a[s];
508
- break;
509
- case 66:
510
- this.$ = a[s - 1] + a[s];
511
- break;
512
- case 69:
513
- a[s - 2].push(a[s]), this.$ = a[s - 2];
514
- break;
515
- case 71:
516
- this.$ = a[s].replace(/"/g, "");
517
- break;
518
- case 72:
519
- this.$ = {
520
- cardA: a[s],
521
- relType: a[s - 1],
522
- cardB: a[s - 2]
523
- };
524
- break;
525
- case 73:
526
- this.$ = r.Cardinality.ZERO_OR_ONE;
527
- break;
528
- case 74:
529
- this.$ = r.Cardinality.ZERO_OR_MORE;
530
- break;
531
- case 75:
532
- this.$ = r.Cardinality.ONE_OR_MORE;
533
- break;
534
- case 76:
535
- this.$ = r.Cardinality.ONLY_ONE;
536
- break;
537
- case 77:
538
- this.$ = r.Cardinality.MD_PARENT;
539
- break;
540
- case 78:
541
- this.$ = r.Identification.NON_IDENTIFYING;
542
- break;
543
- case 79: this.$ = r.Identification.IDENTIFYING;
544
- }
545
- }, "anonymous"),
546
- table: [
547
- {
548
- 3: 1,
549
- 4: [1, 2]
550
- },
551
- { 1: [3] },
552
- t(n, [2, 2], { 5: 3 }),
553
- {
554
- 6: [1, 4],
555
- 7: 5,
556
- 8: [1, 6],
557
- 9: 7,
558
- 10: [1, 8],
559
- 11: 9,
560
- 22: r,
561
- 24: i,
562
- 26: a,
563
- 28: o,
564
- 29: 14,
565
- 30: 15,
566
- 31: 16,
567
- 32: 17,
568
- 33: s,
569
- 34: c,
570
- 35: l,
571
- 36: u,
572
- 37: d,
573
- 40: f,
574
- 43: p,
575
- 44: m,
576
- 48: h,
577
- 50: g,
578
- 51: _,
579
- 52: v
580
- },
581
- t(n, [2, 7], { 1: [2, 1] }),
582
- t(n, [2, 3]),
583
- {
584
- 9: 30,
585
- 11: 9,
586
- 22: r,
587
- 24: i,
588
- 26: a,
589
- 28: o,
590
- 29: 14,
591
- 30: 15,
592
- 31: 16,
593
- 32: 17,
594
- 33: s,
595
- 34: c,
596
- 35: l,
597
- 36: u,
598
- 37: d,
599
- 40: f,
600
- 43: p,
601
- 44: m,
602
- 48: h,
603
- 50: g,
604
- 51: _,
605
- 52: v
606
- },
607
- t(n, [2, 5]),
608
- t(n, [2, 6]),
609
- t(n, [2, 16], {
610
- 12: 31,
611
- 64: 35,
612
- 15: [1, 32],
613
- 17: [1, 33],
614
- 20: [1, 34],
615
- 66: y,
616
- 67: b,
617
- 68: x,
618
- 69: S,
619
- 70: C
620
- }),
621
- { 23: [1, 41] },
622
- { 25: [1, 42] },
623
- { 27: [1, 43] },
624
- t(n, [2, 27]),
625
- t(n, [2, 28]),
626
- t(n, [2, 29]),
627
- t(n, [2, 30]),
628
- t(n, [2, 31]),
629
- t(w, [2, 54]),
630
- t(w, [2, 55]),
631
- t(w, [2, 56]),
632
- t(w, [2, 57]),
633
- t(w, [2, 58]),
634
- t(n, [2, 32]),
635
- t(n, [2, 33]),
636
- t(n, [2, 34]),
637
- t(n, [2, 35]),
638
- {
639
- 16: 44,
640
- 40: T,
641
- 41: E
642
- },
643
- {
644
- 16: 47,
645
- 40: T,
646
- 41: E
647
- },
648
- {
649
- 16: 48,
650
- 40: T,
651
- 41: E
652
- },
653
- t(n, [2, 4]),
654
- {
655
- 11: 49,
656
- 40: f,
657
- 48: h,
658
- 50: g,
659
- 51: _,
660
- 52: v
661
- },
662
- {
663
- 16: 50,
664
- 40: T,
665
- 41: E
666
- },
667
- {
668
- 18: 51,
669
- 19: [1, 52],
670
- 53: 53,
671
- 54: 54,
672
- 58: D
673
- },
674
- {
675
- 11: 56,
676
- 40: f,
677
- 48: h,
678
- 50: g,
679
- 51: _,
680
- 52: v
681
- },
682
- {
683
- 65: 57,
684
- 71: [1, 58],
685
- 72: [1, 59]
686
- },
687
- t(O, [2, 73]),
688
- t(O, [2, 74]),
689
- t(O, [2, 75]),
690
- t(O, [2, 76]),
691
- t(O, [2, 77]),
692
- t(n, [2, 24]),
693
- t(n, [2, 25]),
694
- t(n, [2, 26]),
695
- {
696
- 13: k,
697
- 38: 60,
698
- 41: A,
699
- 42: j,
700
- 45: 62,
701
- 46: 63,
702
- 48: M,
703
- 49: N
704
- },
705
- t(P, [2, 37]),
706
- t(P, [2, 38]),
707
- {
708
- 16: 68,
709
- 40: T,
710
- 41: E,
711
- 42: j
712
- },
713
- {
714
- 13: k,
715
- 38: 69,
716
- 41: A,
717
- 42: j,
718
- 45: 62,
719
- 46: 63,
720
- 48: M,
721
- 49: N
722
- },
723
- {
724
- 13: [1, 70],
725
- 15: [1, 71]
726
- },
727
- t(n, [2, 17], {
728
- 64: 35,
729
- 12: 72,
730
- 17: [1, 73],
731
- 42: j,
732
- 66: y,
733
- 67: b,
734
- 68: x,
735
- 69: S,
736
- 70: C
737
- }),
738
- { 19: [1, 74] },
739
- t(n, [2, 14]),
740
- {
741
- 18: 75,
742
- 19: [2, 59],
743
- 53: 53,
744
- 54: 54,
745
- 58: D
746
- },
747
- {
748
- 55: 76,
749
- 58: [1, 77]
750
- },
751
- {
752
- 58: [2, 65],
753
- 59: [1, 78]
754
- },
755
- { 21: [1, 79] },
756
- {
757
- 64: 80,
758
- 66: y,
759
- 67: b,
760
- 68: x,
761
- 69: S,
762
- 70: C
763
- },
764
- t(F, [2, 78]),
765
- t(F, [2, 79]),
766
- {
767
- 6: I,
768
- 10: L,
769
- 39: 81,
770
- 42: R,
771
- 47: z
772
- },
773
- {
774
- 40: [1, 86],
775
- 41: [1, 87]
776
- },
777
- t(B, [2, 43], {
778
- 46: 88,
779
- 13: k,
780
- 41: A,
781
- 48: M,
782
- 49: N
783
- }),
784
- t(V, [2, 45]),
785
- t(V, [2, 50]),
786
- t(V, [2, 51]),
787
- t(V, [2, 52]),
788
- t(V, [2, 53]),
789
- t(n, [2, 41], { 42: j }),
790
- {
791
- 6: I,
792
- 10: L,
793
- 39: 89,
794
- 42: R,
795
- 47: z
796
- },
797
- {
798
- 14: 90,
799
- 40: H,
800
- 50: U,
801
- 73: W
802
- },
803
- {
804
- 16: 94,
805
- 40: T,
806
- 41: E
807
- },
808
- {
809
- 11: 95,
810
- 40: f,
811
- 48: h,
812
- 50: g,
813
- 51: _,
814
- 52: v
815
- },
816
- {
817
- 18: 96,
818
- 19: [1, 97],
819
- 53: 53,
820
- 54: 54,
821
- 58: D
822
- },
823
- t(n, [2, 12]),
824
- { 19: [2, 60] },
825
- t(G, [2, 61], {
826
- 56: 98,
827
- 57: 99,
828
- 60: 100,
829
- 62: K,
830
- 63: q
831
- }),
832
- t([
833
- 19,
834
- 58,
835
- 62,
836
- 63
837
- ], [2, 67]),
838
- { 58: [2, 66] },
839
- t(n, [2, 22], {
840
- 15: [1, 104],
841
- 17: [1, 103]
842
- }),
843
- t([
844
- 40,
845
- 48,
846
- 50,
847
- 51,
848
- 52
849
- ], [2, 72]),
850
- t(n, [2, 36]),
851
- {
852
- 13: k,
853
- 41: A,
854
- 45: 105,
855
- 46: 63,
856
- 48: M,
857
- 49: N
858
- },
859
- t(n, [2, 47]),
860
- t(n, [2, 48]),
861
- t(n, [2, 49]),
862
- t(P, [2, 39]),
863
- t(P, [2, 40]),
864
- t(V, [2, 46]),
865
- t(n, [2, 42]),
866
- t(n, [2, 8]),
867
- t(n, [2, 80]),
868
- t(n, [2, 81]),
869
- t(n, [2, 82]),
870
- {
871
- 13: [1, 106],
872
- 42: j
873
- },
874
- {
875
- 13: [1, 108],
876
- 15: [1, 107]
877
- },
878
- { 19: [1, 109] },
879
- t(n, [2, 15]),
880
- t(G, [2, 62], {
881
- 57: 110,
882
- 61: [1, 111],
883
- 63: q
884
- }),
885
- t(G, [2, 63]),
886
- t(J, [2, 68]),
887
- t(G, [2, 71]),
888
- t(J, [2, 70]),
889
- {
890
- 18: 112,
891
- 19: [1, 113],
892
- 53: 53,
893
- 54: 54,
894
- 58: D
895
- },
896
- {
897
- 16: 114,
898
- 40: T,
899
- 41: E
900
- },
901
- t(B, [2, 44], {
902
- 46: 88,
903
- 13: k,
904
- 41: A,
905
- 48: M,
906
- 49: N
907
- }),
908
- {
909
- 14: 115,
910
- 40: H,
911
- 50: U,
912
- 73: W
913
- },
914
- {
915
- 16: 116,
916
- 40: T,
917
- 41: E
918
- },
919
- {
920
- 14: 117,
921
- 40: H,
922
- 50: U,
923
- 73: W
924
- },
925
- t(n, [2, 13]),
926
- t(G, [2, 64]),
927
- {
928
- 60: 118,
929
- 62: K
930
- },
931
- { 19: [1, 119] },
932
- t(n, [2, 20]),
933
- t(n, [2, 23], {
934
- 17: [1, 120],
935
- 42: j
936
- }),
937
- t(n, [2, 11]),
938
- {
939
- 13: [1, 121],
940
- 42: j
941
- },
942
- t(n, [2, 10]),
943
- t(J, [2, 69]),
944
- t(n, [2, 18]),
945
- {
946
- 18: 122,
947
- 19: [1, 123],
948
- 53: 53,
949
- 54: 54,
950
- 58: D
951
- },
952
- {
953
- 14: 124,
954
- 40: H,
955
- 50: U,
956
- 73: W
957
- },
958
- { 19: [1, 125] },
959
- t(n, [2, 21]),
960
- t(n, [2, 9]),
961
- t(n, [2, 19])
962
- ],
963
- defaultActions: {
964
- 75: [2, 60],
965
- 78: [2, 66]
966
- },
967
- parseError: /* @__PURE__ */ e(function(e, t) {
968
- if (t.recoverable) this.trace(e);
969
- else {
970
- var n = Error(e);
971
- throw n.hash = t, n;
972
- }
973
- }, "parseError"),
974
- parse: /* @__PURE__ */ e(function(t) {
975
- var n = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
976
- for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
977
- h.setInput(t, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
978
- var v = h.yylloc;
979
- o.push(v);
980
- var y = h.options && h.options.ranges;
981
- this.parseError = typeof g.yy.parseError == "function" ? g.yy.parseError : Object.getPrototypeOf(this).parseError;
982
- function b(e) {
983
- r.length -= 2 * e, a.length -= e, o.length -= e;
984
- }
985
- e(b, "popStack");
986
- function x() {
987
- var e = i.pop() || h.lex() || p;
988
- return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
989
- }
990
- e(x, "lex");
991
- for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
992
- 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]) {
993
- var M = "";
994
- for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
995
- 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, {
996
- text: h.match,
997
- token: this.terminals_[S] || S,
998
- line: h.yylineno,
999
- loc: v,
1000
- expected: j
1001
- });
1002
- }
1003
- if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
1004
- switch (T[0]) {
1005
- case 1:
1006
- 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--);
1007
- break;
1008
- case 2:
1009
- if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
1010
- first_line: o[o.length - (k || 1)].first_line,
1011
- last_line: o[o.length - 1].last_line,
1012
- first_column: o[o.length - (k || 1)].first_column,
1013
- last_column: o[o.length - 1].last_column
1014
- }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
1015
- c,
1016
- u,
1017
- l,
1018
- g.yy,
1019
- T[1],
1020
- a,
1021
- o
1022
- ].concat(m)), E !== void 0) return E;
1023
- 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);
1024
- break;
1025
- case 3: return !0;
1026
- }
1027
- }
1028
- return !0;
1029
- }, "parse")
1030
- };
1031
- Y.lexer = /* @__PURE__ */ (function() {
1032
- return {
1033
- EOF: 1,
1034
- parseError: /* @__PURE__ */ e(function(e, t) {
1035
- if (this.yy.parser) this.yy.parser.parseError(e, t);
1036
- else throw Error(e);
1037
- }, "parseError"),
1038
- setInput: /* @__PURE__ */ e(function(e, t) {
1039
- 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 = {
1040
- first_line: 1,
1041
- first_column: 0,
1042
- last_line: 1,
1043
- last_column: 0
1044
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
1045
- }, "setInput"),
1046
- input: /* @__PURE__ */ e(function() {
1047
- var e = this._input[0];
1048
- 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;
1049
- }, "input"),
1050
- unput: /* @__PURE__ */ e(function(e) {
1051
- var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
1052
- this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
1053
- var r = this.match.split(/(?:\r\n?|\n)/g);
1054
- 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);
1055
- var i = this.yylloc.range;
1056
- return this.yylloc = {
1057
- first_line: this.yylloc.first_line,
1058
- last_line: this.yylineno + 1,
1059
- first_column: this.yylloc.first_column,
1060
- 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
1061
- }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
1062
- }, "unput"),
1063
- more: /* @__PURE__ */ e(function() {
1064
- return this._more = !0, this;
1065
- }, "more"),
1066
- reject: /* @__PURE__ */ e(function() {
1067
- if (this.options.backtrack_lexer) this._backtrack = !0;
1068
- 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(), {
1069
- text: "",
1070
- token: null,
1071
- line: this.yylineno
1072
- });
1073
- return this;
1074
- }, "reject"),
1075
- less: /* @__PURE__ */ e(function(e) {
1076
- this.unput(this.match.slice(e));
1077
- }, "less"),
1078
- pastInput: /* @__PURE__ */ e(function() {
1079
- var e = this.matched.substr(0, this.matched.length - this.match.length);
1080
- return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
1081
- }, "pastInput"),
1082
- upcomingInput: /* @__PURE__ */ e(function() {
1083
- var e = this.match;
1084
- return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
1085
- }, "upcomingInput"),
1086
- showPosition: /* @__PURE__ */ e(function() {
1087
- var e = this.pastInput(), t = Array(e.length + 1).join("-");
1088
- return e + this.upcomingInput() + "\n" + t + "^";
1089
- }, "showPosition"),
1090
- test_match: /* @__PURE__ */ e(function(e, t) {
1091
- var n, r, i;
1092
- if (this.options.backtrack_lexer && (i = {
1093
- yylineno: this.yylineno,
1094
- yylloc: {
1095
- first_line: this.yylloc.first_line,
1096
- last_line: this.last_line,
1097
- first_column: this.yylloc.first_column,
1098
- last_column: this.yylloc.last_column
1099
- },
1100
- yytext: this.yytext,
1101
- match: this.match,
1102
- matches: this.matches,
1103
- matched: this.matched,
1104
- yyleng: this.yyleng,
1105
- offset: this.offset,
1106
- _more: this._more,
1107
- _input: this._input,
1108
- yy: this.yy,
1109
- conditionStack: this.conditionStack.slice(0),
1110
- done: this.done
1111
- }, 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 = {
1112
- first_line: this.yylloc.last_line,
1113
- last_line: this.yylineno + 1,
1114
- first_column: this.yylloc.last_column,
1115
- last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
1116
- }, 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;
1117
- if (this._backtrack) {
1118
- for (var a in i) this[a] = i[a];
1119
- return !1;
1120
- }
1121
- return !1;
1122
- }, "test_match"),
1123
- next: /* @__PURE__ */ e(function() {
1124
- if (this.done) return this.EOF;
1125
- this._input || (this.done = !0);
1126
- var e, t, n, r;
1127
- this._more || (this.yytext = "", this.match = "");
1128
- 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)) {
1129
- if (t = n, r = a, this.options.backtrack_lexer) {
1130
- if (e = this.test_match(n, i[a]), e !== !1) return e;
1131
- if (this._backtrack) {
1132
- t = !1;
1133
- continue;
1134
- }
1135
- return !1;
1136
- }
1137
- if (!this.options.flex) break;
1138
- }
1139
- 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(), {
1140
- text: "",
1141
- token: null,
1142
- line: this.yylineno
1143
- });
1144
- }, "next"),
1145
- lex: /* @__PURE__ */ e(function() {
1146
- return this.next() || this.lex();
1147
- }, "lex"),
1148
- begin: /* @__PURE__ */ e(function(e) {
1149
- this.conditionStack.push(e);
1150
- }, "begin"),
1151
- popState: /* @__PURE__ */ e(function() {
1152
- return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
1153
- }, "popState"),
1154
- _currentRules: /* @__PURE__ */ e(function() {
1155
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
1156
- }, "_currentRules"),
1157
- topState: /* @__PURE__ */ e(function(e) {
1158
- return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
1159
- }, "topState"),
1160
- pushState: /* @__PURE__ */ e(function(e) {
1161
- this.begin(e);
1162
- }, "pushState"),
1163
- stateStackSize: /* @__PURE__ */ e(function() {
1164
- return this.conditionStack.length;
1165
- }, "stateStackSize"),
1166
- options: { "case-insensitive": !0 },
1167
- performAction: /* @__PURE__ */ e(function(e, t, n, r) {
1168
- switch (n) {
1169
- case 0: return this.begin("acc_title"), 24;
1170
- case 1: return this.popState(), "acc_title_value";
1171
- case 2: return this.begin("acc_descr"), 26;
1172
- case 3: return this.popState(), "acc_descr_value";
1173
- case 4:
1174
- this.begin("acc_descr_multiline");
1175
- break;
1176
- case 5:
1177
- this.popState();
1178
- break;
1179
- case 6: return "acc_descr_multiline_value";
1180
- case 7: return 33;
1181
- case 8: return 34;
1182
- case 9: return 35;
1183
- case 10: return 36;
1184
- case 11: return 10;
1185
- case 12: break;
1186
- case 13: return 8;
1187
- case 14: return 50;
1188
- case 15: return 73;
1189
- case 16: return 4;
1190
- case 17: return this.begin("block"), 17;
1191
- case 18: return 49;
1192
- case 19: return 49;
1193
- case 20: return 42;
1194
- case 21: return 15;
1195
- case 22: return 13;
1196
- case 23: break;
1197
- case 24: return 62;
1198
- case 25: return 58;
1199
- case 26: return 58;
1200
- case 27:
1201
- this.begin("block_bq");
1202
- break;
1203
- case 28: return 58;
1204
- case 29:
1205
- this.popState();
1206
- break;
1207
- case 30: return 63;
1208
- case 31: break;
1209
- case 32: return this.popState(), 19;
1210
- case 33: return t.yytext[0];
1211
- case 34: return 20;
1212
- case 35: return 21;
1213
- case 36: return this.begin("style"), 44;
1214
- case 37: return this.popState(), 10;
1215
- case 38: break;
1216
- case 39: return 13;
1217
- case 40: return 42;
1218
- case 41: return 49;
1219
- case 42: return this.begin("style"), 37;
1220
- case 43: return 43;
1221
- case 44: return 66;
1222
- case 45: return 68;
1223
- case 46: return 68;
1224
- case 47: return 68;
1225
- case 48: return 66;
1226
- case 49: return 66;
1227
- case 50: return 67;
1228
- case 51: return 67;
1229
- case 52: return 67;
1230
- case 53: return 67;
1231
- case 54: return 67;
1232
- case 55: return 68;
1233
- case 56: return 67;
1234
- case 57: return 68;
1235
- case 58: return 69;
1236
- case 59: return 69;
1237
- case 60: return 51;
1238
- case 61: return 69;
1239
- case 62: return 69;
1240
- case 63: return 69;
1241
- case 64: return 52;
1242
- case 65: return 48;
1243
- case 66: return 69;
1244
- case 67: return 66;
1245
- case 68: return 67;
1246
- case 69: return 68;
1247
- case 70: return 70;
1248
- case 71: return 71;
1249
- case 72: return 72;
1250
- case 73: return 72;
1251
- case 74: return 71;
1252
- case 75: return 71;
1253
- case 76: return 71;
1254
- case 77: return 41;
1255
- case 78: return 47;
1256
- case 79: return 40;
1257
- case 80: return t.yytext[0];
1258
- case 81: return 6;
1259
- }
1260
- }, "anonymous"),
1261
- rules: [
1262
- /^(?:accTitle\s*:\s*)/i,
1263
- /^(?:(?!\n||)*[^\n]*)/i,
1264
- /^(?:accDescr\s*:\s*)/i,
1265
- /^(?:(?!\n||)*[^\n]*)/i,
1266
- /^(?:accDescr\s*\{\s*)/i,
1267
- /^(?:[\}])/i,
1268
- /^(?:[^\}]*)/i,
1269
- /^(?:.*direction\s+TB[^\n]*)/i,
1270
- /^(?:.*direction\s+BT[^\n]*)/i,
1271
- /^(?:.*direction\s+RL[^\n]*)/i,
1272
- /^(?:.*direction\s+LR[^\n]*)/i,
1273
- /^(?:[\n]+)/i,
1274
- /^(?:\s+)/i,
1275
- /^(?:[\s]+)/i,
1276
- /^(?:"[^"%\r\n\v\b\\]+")/i,
1277
- /^(?:"[^"]*")/i,
1278
- /^(?:erDiagram\b)/i,
1279
- /^(?:\{)/i,
1280
- /^(?:#)/i,
1281
- /^(?:#)/i,
1282
- /^(?:,)/i,
1283
- /^(?::::)/i,
1284
- /^(?::)/i,
1285
- /^(?:\s+)/i,
1286
- /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,
1287
- /^(?:([^\s]*)[~].*[~]([^\s]*))/i,
1288
- /^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,
1289
- /^(?:[`])/i,
1290
- /^(?:[^`]+)/i,
1291
- /^(?:[`])/i,
1292
- /^(?:"[^"]*")/i,
1293
- /^(?:[\n]+)/i,
1294
- /^(?:\})/i,
1295
- /^(?:.)/i,
1296
- /^(?:\[)/i,
1297
- /^(?:\])/i,
1298
- /^(?:style\b)/i,
1299
- /^(?:[\n]+)/i,
1300
- /^(?:\s+)/i,
1301
- /^(?::)/i,
1302
- /^(?:,)/i,
1303
- /^(?:#)/i,
1304
- /^(?:classDef\b)/i,
1305
- /^(?:class\b)/i,
1306
- /^(?:one or zero\b)/i,
1307
- /^(?:one or more\b)/i,
1308
- /^(?:one or many\b)/i,
1309
- /^(?:1\+)/i,
1310
- /^(?:\|o\b)/i,
1311
- /^(?:zero or one\b)/i,
1312
- /^(?:zero or more\b)/i,
1313
- /^(?:zero or many\b)/i,
1314
- /^(?:0\+)/i,
1315
- /^(?:\}o\b)/i,
1316
- /^(?:many\(0\))/i,
1317
- /^(?:many\(1\))/i,
1318
- /^(?:many\b)/i,
1319
- /^(?:\}\|)/i,
1320
- /^(?:one\b)/i,
1321
- /^(?:only one\b)/i,
1322
- /^(?:[0-9]+\.[0-9]+)/i,
1323
- /^(?:1(?=\s+[A-Za-z_"']))/i,
1324
- /^(?:1(?=\s+[0-9]))/i,
1325
- /^(?:1(?=(--|\.\.|\.-|-\.)))/i,
1326
- /^(?:1\b)/i,
1327
- /^(?:[0-9]+)/i,
1328
- /^(?:\|\|)/i,
1329
- /^(?:o\|)/i,
1330
- /^(?:o\{)/i,
1331
- /^(?:\|\{)/i,
1332
- /^(?:u(?=[\.\-\|]))/i,
1333
- /^(?:\.\.)/i,
1334
- /^(?:--)/i,
1335
- /^(?:to\b)/i,
1336
- /^(?:optionally to\b)/i,
1337
- /^(?:\.-)/i,
1338
- /^(?:-\.)/i,
1339
- /^(?:([^\x00-\x7F]|\w|-|\*)+)/i,
1340
- /^(?:;)/i,
1341
- /^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,
1342
- /^(?:.)/i,
1343
- /^(?:$)/i
1344
- ],
1345
- conditions: {
1346
- style: {
1347
- rules: [
1348
- 37,
1349
- 38,
1350
- 39,
1351
- 40,
1352
- 41,
1353
- 77,
1354
- 78
1355
- ],
1356
- inclusive: !1
1357
- },
1358
- acc_descr_multiline: {
1359
- rules: [5, 6],
1360
- inclusive: !1
1361
- },
1362
- acc_descr: {
1363
- rules: [3],
1364
- inclusive: !1
1365
- },
1366
- acc_title: {
1367
- rules: [1],
1368
- inclusive: !1
1369
- },
1370
- block_bq: {
1371
- rules: [28, 29],
1372
- inclusive: !1
1373
- },
1374
- block: {
1375
- rules: [
1376
- 23,
1377
- 24,
1378
- 25,
1379
- 26,
1380
- 27,
1381
- 30,
1382
- 31,
1383
- 32,
1384
- 33
1385
- ],
1386
- inclusive: !1
1387
- },
1388
- INITIAL: {
1389
- rules: [
1390
- 0,
1391
- 2,
1392
- 4,
1393
- 7,
1394
- 8,
1395
- 9,
1396
- 10,
1397
- 11,
1398
- 12,
1399
- 13,
1400
- 14,
1401
- 15,
1402
- 16,
1403
- 17,
1404
- 18,
1405
- 19,
1406
- 20,
1407
- 21,
1408
- 22,
1409
- 34,
1410
- 35,
1411
- 36,
1412
- 42,
1413
- 43,
1414
- 44,
1415
- 45,
1416
- 46,
1417
- 47,
1418
- 48,
1419
- 49,
1420
- 50,
1421
- 51,
1422
- 52,
1423
- 53,
1424
- 54,
1425
- 55,
1426
- 56,
1427
- 57,
1428
- 58,
1429
- 59,
1430
- 60,
1431
- 61,
1432
- 62,
1433
- 63,
1434
- 64,
1435
- 65,
1436
- 66,
1437
- 67,
1438
- 68,
1439
- 69,
1440
- 70,
1441
- 71,
1442
- 72,
1443
- 73,
1444
- 74,
1445
- 75,
1446
- 76,
1447
- 79,
1448
- 80,
1449
- 81
1450
- ],
1451
- inclusive: !0
1452
- }
1453
- }
1454
- };
1455
- })();
1456
- function X() {
1457
- this.yy = {};
1458
- }
1459
- return e(X, "Parser"), X.prototype = Y, Y.Parser = X, new X();
1460
- })();
1461
- b.parser = b;
1462
- var x = b, S = class {
1463
- constructor() {
1464
- this.entities = /* @__PURE__ */ new Map(), this.relationships = [], this.classes = /* @__PURE__ */ new Map(), this.direction = "TB", this.Cardinality = {
1465
- ZERO_OR_ONE: "ZERO_OR_ONE",
1466
- ZERO_OR_MORE: "ZERO_OR_MORE",
1467
- ONE_OR_MORE: "ONE_OR_MORE",
1468
- ONLY_ONE: "ONLY_ONE",
1469
- MD_PARENT: "MD_PARENT"
1470
- }, this.Identification = {
1471
- NON_IDENTIFYING: "NON_IDENTIFYING",
1472
- IDENTIFYING: "IDENTIFYING"
1473
- }, this.setAccTitle = o, this.getAccTitle = f, this.setAccDescription = i, this.getAccDescription = l, this.setDiagramTitle = a, this.getDiagramTitle = u, this.getConfig = /* @__PURE__ */ e(() => d().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);
1474
- }
1475
- static {
1476
- e(this, "ErDB");
1477
- }
1478
- addEntity(e, t = "") {
1479
- return this.entities.has(e) ? !this.entities.get(e)?.alias && t && (this.entities.get(e).alias = t, n.info(`Add alias '${t}' to entity '${e}'`)) : (this.entities.set(e, {
1480
- id: `entity-${e}-${this.entities.size}`,
1481
- label: e,
1482
- attributes: [],
1483
- alias: t,
1484
- shape: "erBox",
1485
- look: d().look ?? "default",
1486
- cssClasses: "default",
1487
- cssStyles: [],
1488
- labelType: "markdown"
1489
- }), n.info("Added new entity :", e)), this.entities.get(e);
1490
- }
1491
- getEntity(e) {
1492
- return this.entities.get(e);
1493
- }
1494
- getEntities() {
1495
- return this.entities;
1496
- }
1497
- getClasses() {
1498
- return this.classes;
1499
- }
1500
- addAttributes(e, t) {
1501
- let r = this.addEntity(e), i;
1502
- for (i = t.length - 1; i >= 0; i--) t[i].keys || (t[i].keys = []), t[i].comment || (t[i].comment = ""), r.attributes.push(t[i]), n.debug("Added attribute ", t[i].name);
1503
- }
1504
- addRelationship(e, t, r, i) {
1505
- let a = this.entities.get(e), o = this.entities.get(r);
1506
- if (!a || !o) return;
1507
- let s = {
1508
- entityA: a.id,
1509
- roleA: t,
1510
- entityB: o.id,
1511
- relSpec: i
1512
- };
1513
- this.relationships.push(s), n.debug("Added new relationship :", s);
1514
- }
1515
- getRelationships() {
1516
- return this.relationships;
1517
- }
1518
- getDirection() {
1519
- return this.direction;
1520
- }
1521
- setDirection(e) {
1522
- this.direction = e;
1523
- }
1524
- getCompiledStyles(e) {
1525
- let t = [];
1526
- for (let n of e) {
1527
- let e = this.classes.get(n);
1528
- e?.styles && (t = [...t, ...e.styles ?? []].map((e) => e.trim())), e?.textStyles && (t = [...t, ...e.textStyles ?? []].map((e) => e.trim()));
1529
- }
1530
- return t;
1531
- }
1532
- addCssStyles(e, t) {
1533
- for (let n of e) {
1534
- let e = this.entities.get(n);
1535
- if (!t || !e) return;
1536
- for (let n of t) e.cssStyles.push(n);
1537
- }
1538
- }
1539
- addClass(e, t) {
1540
- e.forEach((e) => {
1541
- let n = this.classes.get(e);
1542
- n === void 0 && (n = {
1543
- id: e,
1544
- styles: [],
1545
- textStyles: []
1546
- }, this.classes.set(e, n)), t && t.forEach(function(e) {
1547
- if (/color/.exec(e)) {
1548
- let t = e.replace("fill", "bgFill");
1549
- n.textStyles.push(t);
1550
- }
1551
- n.styles.push(e);
1552
- });
1553
- });
1554
- }
1555
- setClass(e, t) {
1556
- for (let n of e) {
1557
- let e = this.entities.get(n);
1558
- if (e) for (let n of t) e.cssClasses += " " + n;
1559
- }
1560
- }
1561
- clear() {
1562
- this.entities = /* @__PURE__ */ new Map(), this.classes = /* @__PURE__ */ new Map(), this.relationships = [], s();
1563
- }
1564
- getData() {
1565
- let e = [], t = [], n = d(), r = 0;
1566
- for (let t of this.entities.keys()) {
1567
- let n = this.entities.get(t);
1568
- n && (n.cssCompiledStyles = this.getCompiledStyles(n.cssClasses.split(" ")), n.colorIndex = r++, e.push(n));
1569
- }
1570
- let i = 0;
1571
- for (let e of this.relationships) {
1572
- let r = {
1573
- id: m(e.entityA, e.entityB, {
1574
- prefix: "id",
1575
- counter: i++
1576
- }),
1577
- type: "normal",
1578
- curve: "basis",
1579
- start: e.entityA,
1580
- end: e.entityB,
1581
- label: e.roleA,
1582
- labelpos: "c",
1583
- thickness: "normal",
1584
- classes: "relationshipLine",
1585
- arrowTypeStart: e.relSpec.cardB.toLowerCase(),
1586
- arrowTypeEnd: e.relSpec.cardA.toLowerCase(),
1587
- pattern: e.relSpec.relType == "IDENTIFYING" ? "solid" : "dashed",
1588
- look: n.look,
1589
- labelType: "markdown"
1590
- };
1591
- t.push(r);
1592
- }
1593
- return {
1594
- nodes: e,
1595
- edges: t,
1596
- other: {},
1597
- config: n,
1598
- direction: "TB"
1599
- };
1600
- }
1601
- }, C = {};
1602
- t(C, { draw: () => w });
1603
- var w = /* @__PURE__ */ e(async function(e, t, i, a) {
1604
- n.info("REF0:"), n.info("Drawing er diagram (unified)", t);
1605
- let { securityLevel: o, er: s, layout: c } = d(), l = a.db.getData(), u = g(t, o);
1606
- l.type = a.type, l.layoutAlgorithm = y(c), l.config.flowchart.nodeSpacing = s?.nodeSpacing || 140, l.config.flowchart.rankSpacing = s?.rankSpacing || 80, l.direction = a.db.getDirection();
1607
- let { config: f } = l, { look: p } = f;
1608
- l.markers = p === "neo" ? [
1609
- "only_one_neo",
1610
- "zero_or_one_neo",
1611
- "one_or_more_neo",
1612
- "zero_or_more_neo"
1613
- ] : [
1614
- "only_one",
1615
- "zero_or_one",
1616
- "one_or_more",
1617
- "zero_or_more"
1618
- ], l.diagramId = t, await v(l, u), l.layoutAlgorithm === "elk" && u.select(".edges").lower();
1619
- let m = u.selectAll("[id*=\"-background\"]");
1620
- Array.from(m).length > 0 && m.each(function() {
1621
- let e = r(this), t = e.attr("id").replace("-background", ""), n = u.select(`#${CSS.escape(t)}`);
1622
- if (!n.empty()) {
1623
- let t = n.attr("transform");
1624
- e.attr("transform", t);
1625
- }
1626
- }), h.insertTitle(u, "erDiagramTitleText", s?.titleTopMargin ?? 25, a.db.getDiagramTitle()), _(u, 8, "erDiagram", s?.useMaxWidth ?? !0);
1627
- }, "draw"), T = /* @__PURE__ */ e((e, t) => {
1628
- let n = p, r = n(e, "r"), i = n(e, "g"), a = n(e, "b");
1629
- return c(r, i, a, t);
1630
- }, "fade"), E = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), D = /* @__PURE__ */ e((e) => {
1631
- let { theme: t, look: n, bkgColorArray: r, borderColorArray: i } = e;
1632
- if (!E.has(t)) return "";
1633
- let a = r?.length > 0, o = "";
1634
- for (let t = 0; t < e.THEME_COLOR_LIMIT; t++) o += `
1635
-
1636
- [data-look="${n}"][data-color-id="color-${t}"].node path {
1637
- stroke: ${i[t]};
1638
- ${a ? `fill: ${r[t]};` : ""}
1639
- }
1640
-
1641
- [data-look="${n}"][data-color-id="color-${t}"].node rect {
1642
- stroke: ${i[t]};
1643
- ${a ? `fill: ${r[t]};` : ""}
1644
- }
1645
- `;
1646
- return o;
1647
- }, "genColor"), O = {
1648
- parser: x,
1649
- get db() {
1650
- return new S();
1651
- },
1652
- renderer: C,
1653
- styles: /* @__PURE__ */ e((e) => {
1654
- let { look: t, theme: n, erEdgeLabelBackground: r, strokeWidth: i } = e;
1655
- return `
1656
- ${D(e)}
1657
- .entityBox {
1658
- fill: ${e.mainBkg};
1659
- stroke: ${e.nodeBorder};
1660
- }
1661
-
1662
- .relationshipLabelBox {
1663
- fill: ${e.tertiaryColor};
1664
- opacity: 0.7;
1665
- background-color: ${e.tertiaryColor};
1666
- rect {
1667
- opacity: 0.5;
1668
- }
1669
- }
1670
-
1671
- .labelBkg {
1672
- background-color: ${E.has(n) && r ? r : T(e.tertiaryColor, .5)};
1673
- }
1674
-
1675
- .edgeLabel {
1676
- background-color: ${E.has(n) && r ? r : e.edgeLabelBackground};
1677
- }
1678
- .edgeLabel .label rect {
1679
- fill: ${E.has(n) && r ? r : e.edgeLabelBackground};
1680
- }
1681
- .edgeLabel .label text {
1682
- fill: ${e.textColor};
1683
- }
1684
-
1685
- .edgeLabel .label {
1686
- fill: ${e.nodeBorder};
1687
- font-size: 14px;
1688
- }
1689
-
1690
- .label {
1691
- font-family: ${e.fontFamily};
1692
- color: ${e.nodeTextColor || e.textColor};
1693
- }
1694
-
1695
- .edge-pattern-dashed {
1696
- stroke-dasharray: 8,8;
1697
- }
1698
-
1699
- .node rect,
1700
- .node circle,
1701
- .node ellipse,
1702
- .node polygon
1703
- {
1704
- fill: ${e.mainBkg};
1705
- stroke: ${e.nodeBorder};
1706
- stroke-width: ${t === "neo" ? i : "1px"};
1707
- }
1708
-
1709
- .relationshipLine {
1710
- stroke: ${e.lineColor};
1711
- stroke-width: ${t === "neo" ? i : "1px"};
1712
- fill: none;
1713
- }
1714
-
1715
- .marker {
1716
- fill: none !important;
1717
- stroke: ${e.lineColor} !important;
1718
- stroke-width: 1;
1719
- }
1720
- [data-look=neo].labelBkg {
1721
- background-color: ${T(e.tertiaryColor, .5)};
1722
- }
1723
- `;
1724
- }, "getStyles")
1725
- };
1726
- //#endregion
1727
- export { O as diagram };