jekyll-ham 1.0.4 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (366) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -2
  3. data/_layouts/default.html +6 -0
  4. data/_layouts/page.html +1 -1
  5. data/assets/mermaid/Diagram.d.ts +33 -0
  6. data/assets/mermaid/Tableau10-31042135.js +10 -0
  7. data/assets/mermaid/Tableau10-558cc280.js +9 -0
  8. data/assets/mermaid/__mocks__/mermaidAPI.d.ts +13 -0
  9. data/assets/mermaid/accessibility.d.ts +27 -0
  10. data/assets/mermaid/accessibility.spec.d.ts +1 -0
  11. data/assets/mermaid/arc-c0f908ab.js +148 -0
  12. data/assets/mermaid/arc-d1f6357e.js +86 -0
  13. data/assets/mermaid/array-2ff2c7a6.js +6 -0
  14. data/assets/mermaid/array-b7dcf730.js +6 -0
  15. data/assets/mermaid/assignWithDepth.d.ts +30 -0
  16. data/assets/mermaid/blockDiagram-5dc23a45.js +1230 -0
  17. data/assets/mermaid/blockDiagram-9f4a6865.js +1822 -0
  18. data/assets/mermaid/blockDiagram-efe38566.js +1818 -0
  19. data/assets/mermaid/c4Diagram-1e775db3.js +1579 -0
  20. data/assets/mermaid/c4Diagram-ae766693.js +2473 -0
  21. data/assets/mermaid/c4Diagram-af207393.js +2463 -0
  22. data/assets/mermaid/channel-ebbc4130.js +5 -0
  23. data/assets/mermaid/channel-f9001828.js +8 -0
  24. data/assets/mermaid/classDiagram-72b9c71d.js +356 -0
  25. data/assets/mermaid/classDiagram-f52caa06.js +220 -0
  26. data/assets/mermaid/classDiagram-fb54d2a0.js +363 -0
  27. data/assets/mermaid/classDiagram-v2-640c694e.js +206 -0
  28. data/assets/mermaid/classDiagram-v2-a2b738ad.js +298 -0
  29. data/assets/mermaid/classDiagram-v2-fedb80f6.js +290 -0
  30. data/assets/mermaid/clone-9ea6bfeb.js +8 -0
  31. data/assets/mermaid/clone-afc2f047.js +8 -0
  32. data/assets/mermaid/config.d.ts +98 -0
  33. data/assets/mermaid/config.spec.d.ts +1 -0
  34. data/assets/mermaid/config.type.d.ts +1534 -0
  35. data/assets/mermaid/createText-03b82060.js +2966 -0
  36. data/assets/mermaid/createText-b70fe78a.js +4929 -0
  37. data/assets/mermaid/createText-ca0c5216.js +251 -0
  38. data/assets/mermaid/dagre-wrapper/blockArrowHelper.d.ts +8 -0
  39. data/assets/mermaid/dagre-wrapper/clusters.d.ts +4 -0
  40. data/assets/mermaid/dagre-wrapper/createLabel.d.ts +9 -0
  41. data/assets/mermaid/dagre-wrapper/edgeMarker.d.ts +12 -0
  42. data/assets/mermaid/dagre-wrapper/edgeMarker.spec.d.ts +1 -0
  43. data/assets/mermaid/dagre-wrapper/edges.d.ts +14 -0
  44. data/assets/mermaid/dagre-wrapper/index.d.ts +1 -0
  45. data/assets/mermaid/dagre-wrapper/intersect/index.d.ts +13 -0
  46. data/assets/mermaid/dagre-wrapper/intersect/intersect-circle.d.ts +10 -0
  47. data/assets/mermaid/dagre-wrapper/intersect/intersect-ellipse.d.ts +11 -0
  48. data/assets/mermaid/dagre-wrapper/intersect/intersect-line.d.ts +13 -0
  49. data/assets/mermaid/dagre-wrapper/intersect/intersect-node.d.ts +6 -0
  50. data/assets/mermaid/dagre-wrapper/intersect/intersect-polygon.d.ts +10 -0
  51. data/assets/mermaid/dagre-wrapper/intersect/intersect-rect.d.ts +5 -0
  52. data/assets/mermaid/dagre-wrapper/markers.d.ts +2 -0
  53. data/assets/mermaid/dagre-wrapper/mermaid-graphlib.d.ts +8 -0
  54. data/assets/mermaid/dagre-wrapper/nodes.d.ts +4 -0
  55. data/assets/mermaid/dagre-wrapper/shapes/note.d.ts +2 -0
  56. data/assets/mermaid/dagre-wrapper/shapes/util.d.ts +14 -0
  57. data/assets/mermaid/defaultConfig.d.ts +12 -0
  58. data/assets/mermaid/diagram-api/comments.d.ts +6 -0
  59. data/assets/mermaid/diagram-api/comments.spec.d.ts +1 -0
  60. data/assets/mermaid/diagram-api/detectType.d.ts +42 -0
  61. data/assets/mermaid/diagram-api/diagram-orchestration.d.ts +1 -0
  62. data/assets/mermaid/diagram-api/diagram-orchestration.spec.d.ts +1 -0
  63. data/assets/mermaid/diagram-api/diagramAPI.d.ts +31 -0
  64. data/assets/mermaid/diagram-api/diagramAPI.spec.d.ts +1 -0
  65. data/assets/mermaid/diagram-api/frontmatter.d.ts +18 -0
  66. data/assets/mermaid/diagram-api/frontmatter.spec.d.ts +1 -0
  67. data/assets/mermaid/diagram-api/loadDiagram.d.ts +1 -0
  68. data/assets/mermaid/diagram-api/regexes.d.ts +3 -0
  69. data/assets/mermaid/diagram-api/types.d.ts +84 -0
  70. data/assets/mermaid/diagram.spec.d.ts +1 -0
  71. data/assets/mermaid/diagrams/block/blockDB.d.ts +54 -0
  72. data/assets/mermaid/diagrams/block/blockDetector.d.ts +3 -0
  73. data/assets/mermaid/diagrams/block/blockDiagram.d.ts +2 -0
  74. data/assets/mermaid/diagrams/block/blockRenderer.d.ts +15 -0
  75. data/assets/mermaid/diagrams/block/blockTypes.d.ts +36 -0
  76. data/assets/mermaid/diagrams/block/blockUtils.d.ts +1 -0
  77. data/assets/mermaid/diagrams/block/layout.d.ts +13 -0
  78. data/assets/mermaid/diagrams/block/layout.spec.d.ts +1 -0
  79. data/assets/mermaid/diagrams/block/parser/block.spec.d.ts +1 -0
  80. data/assets/mermaid/diagrams/block/renderHelpers.d.ts +10 -0
  81. data/assets/mermaid/diagrams/block/styles.d.ts +18 -0
  82. data/assets/mermaid/diagrams/c4/c4Db.d.ts +127 -0
  83. data/assets/mermaid/diagrams/c4/c4Detector.d.ts +3 -0
  84. data/assets/mermaid/diagrams/c4/c4Diagram.d.ts +2 -0
  85. data/assets/mermaid/diagrams/c4/c4Renderer.d.ts +12 -0
  86. data/assets/mermaid/diagrams/c4/styles.d.ts +2 -0
  87. data/assets/mermaid/diagrams/c4/svgDraw.d.ts +36 -0
  88. data/assets/mermaid/diagrams/class/classDb.d.ts +144 -0
  89. data/assets/mermaid/diagrams/class/classDetector-V2.d.ts +3 -0
  90. data/assets/mermaid/diagrams/class/classDetector.d.ts +3 -0
  91. data/assets/mermaid/diagrams/class/classDiagram-v2.d.ts +2 -0
  92. data/assets/mermaid/diagrams/class/classDiagram.d.ts +2 -0
  93. data/assets/mermaid/diagrams/class/classDiagram.spec.d.ts +1 -0
  94. data/assets/mermaid/diagrams/class/classRenderer-v2.d.ts +57 -0
  95. data/assets/mermaid/diagrams/class/classRenderer.d.ts +5 -0
  96. data/assets/mermaid/diagrams/class/classTypes.d.ts +78 -0
  97. data/assets/mermaid/diagrams/class/classTypes.spec.d.ts +1 -0
  98. data/assets/mermaid/diagrams/class/styles.d.ts +2 -0
  99. data/assets/mermaid/diagrams/class/svgDraw.d.ts +25 -0
  100. data/assets/mermaid/diagrams/common/common.d.ts +110 -0
  101. data/assets/mermaid/diagrams/common/common.spec.d.ts +1 -0
  102. data/assets/mermaid/diagrams/common/commonDb.d.ts +7 -0
  103. data/assets/mermaid/diagrams/common/commonTypes.d.ts +51 -0
  104. data/assets/mermaid/diagrams/common/svgDrawCommon.d.ts +15 -0
  105. data/assets/mermaid/diagrams/er/erDb.d.ts +49 -0
  106. data/assets/mermaid/diagrams/er/erDetector.d.ts +3 -0
  107. data/assets/mermaid/diagrams/er/erDiagram.d.ts +34 -0
  108. data/assets/mermaid/diagrams/er/erMarkers.d.ts +24 -0
  109. data/assets/mermaid/diagrams/er/erRenderer.d.ts +19 -0
  110. data/assets/mermaid/diagrams/er/erRenderer.spec.d.ts +1 -0
  111. data/assets/mermaid/diagrams/er/styles.d.ts +2 -0
  112. data/assets/mermaid/diagrams/error/errorDiagram.d.ts +3 -0
  113. data/assets/mermaid/diagrams/error/errorRenderer.d.ts +12 -0
  114. data/assets/mermaid/diagrams/flowchart/elk/detector.d.ts +3 -0
  115. data/assets/mermaid/diagrams/flowchart/elk/detector.spec.d.ts +1 -0
  116. data/assets/mermaid/diagrams/flowchart/elk/flowRenderer-elk.d.ts +10 -0
  117. data/assets/mermaid/diagrams/flowchart/elk/flowchart-elk-definition.d.ts +10 -0
  118. data/assets/mermaid/diagrams/flowchart/elk/render-utils.d.ts +5 -0
  119. data/assets/mermaid/diagrams/flowchart/elk/render-utils.spec.d.ts +1 -0
  120. data/assets/mermaid/diagrams/flowchart/elk/styles.d.ts +19 -0
  121. data/assets/mermaid/diagrams/flowchart/flowChartShapes.d.ts +9 -0
  122. data/assets/mermaid/diagrams/flowchart/flowDb.d.ts +87 -0
  123. data/assets/mermaid/diagrams/flowchart/flowDetector-v2.d.ts +3 -0
  124. data/assets/mermaid/diagrams/flowchart/flowDetector.d.ts +3 -0
  125. data/assets/mermaid/diagrams/flowchart/flowDiagram-v2.d.ts +57 -0
  126. data/assets/mermaid/diagrams/flowchart/flowDiagram.d.ts +57 -0
  127. data/assets/mermaid/diagrams/flowchart/flowRenderer-v2.d.ts +13 -0
  128. data/assets/mermaid/diagrams/flowchart/flowRenderer.d.ts +13 -0
  129. data/assets/mermaid/diagrams/flowchart/styles.d.ts +18 -0
  130. data/assets/mermaid/diagrams/gantt/ganttDb.d.ts +106 -0
  131. data/assets/mermaid/diagrams/gantt/ganttDb.spec.d.ts +1 -0
  132. data/assets/mermaid/diagrams/gantt/ganttDetector.d.ts +3 -0
  133. data/assets/mermaid/diagrams/gantt/ganttDiagram.d.ts +2 -0
  134. data/assets/mermaid/diagrams/gantt/ganttRenderer.d.ts +7 -0
  135. data/assets/mermaid/diagrams/gantt/styles.d.ts +2 -0
  136. data/assets/mermaid/diagrams/git/gitGraphAst.d.ts +61 -0
  137. data/assets/mermaid/diagrams/git/gitGraphDetector.d.ts +3 -0
  138. data/assets/mermaid/diagrams/git/gitGraphDiagram.d.ts +2 -0
  139. data/assets/mermaid/diagrams/git/gitGraphRenderer.d.ts +5 -0
  140. data/assets/mermaid/diagrams/git/styles.d.ts +2 -0
  141. data/assets/mermaid/diagrams/info/info.spec.d.ts +1 -0
  142. data/assets/mermaid/diagrams/info/infoDb.d.ts +5 -0
  143. data/assets/mermaid/diagrams/info/infoDetector.d.ts +2 -0
  144. data/assets/mermaid/diagrams/info/infoDiagram.d.ts +2 -0
  145. data/assets/mermaid/diagrams/info/infoRenderer.d.ts +4 -0
  146. data/assets/mermaid/diagrams/info/infoTypes.d.ts +9 -0
  147. data/assets/mermaid/diagrams/mindmap/detector.d.ts +3 -0
  148. data/assets/mermaid/diagrams/mindmap/mindmap-definition.d.ts +2 -0
  149. data/assets/mermaid/diagrams/mindmap/mindmap.spec.d.ts +1 -0
  150. data/assets/mermaid/diagrams/mindmap/mindmapDb.d.ts +30 -0
  151. data/assets/mermaid/diagrams/mindmap/mindmapRenderer.d.ts +21 -0
  152. data/assets/mermaid/diagrams/mindmap/mindmapTypes.d.ts +20 -0
  153. data/assets/mermaid/diagrams/mindmap/styles.d.ts +3 -0
  154. data/assets/mermaid/diagrams/mindmap/svgDraw.d.ts +13 -0
  155. data/assets/mermaid/diagrams/pie/pie.spec.d.ts +1 -0
  156. data/assets/mermaid/diagrams/pie/pieDb.d.ts +6 -0
  157. data/assets/mermaid/diagrams/pie/pieDetector.d.ts +2 -0
  158. data/assets/mermaid/diagrams/pie/pieDiagram.d.ts +2 -0
  159. data/assets/mermaid/diagrams/pie/pieRenderer.d.ts +13 -0
  160. data/assets/mermaid/diagrams/pie/pieStyles.d.ts +3 -0
  161. data/assets/mermaid/diagrams/pie/pieTypes.d.ts +53 -0
  162. data/assets/mermaid/diagrams/quadrant-chart/parser/quadrant.jison.spec.d.ts +1 -0
  163. data/assets/mermaid/diagrams/quadrant-chart/quadrantBuilder.d.ts +118 -0
  164. data/assets/mermaid/diagrams/quadrant-chart/quadrantDb.d.ts +38 -0
  165. data/assets/mermaid/diagrams/quadrant-chart/quadrantDetector.d.ts +3 -0
  166. data/assets/mermaid/diagrams/quadrant-chart/quadrantDiagram.d.ts +2 -0
  167. data/assets/mermaid/diagrams/quadrant-chart/quadrantRenderer.d.ts +6 -0
  168. data/assets/mermaid/diagrams/requirement/requirementDb.d.ts +70 -0
  169. data/assets/mermaid/diagrams/requirement/requirementDetector.d.ts +3 -0
  170. data/assets/mermaid/diagrams/requirement/requirementDiagram.d.ts +2 -0
  171. data/assets/mermaid/diagrams/requirement/requirementMarkers.d.ts +10 -0
  172. data/assets/mermaid/diagrams/requirement/requirementRenderer.d.ts +7 -0
  173. data/assets/mermaid/diagrams/requirement/styles.d.ts +2 -0
  174. data/assets/mermaid/diagrams/sankey/parser/sankey.spec.d.ts +1 -0
  175. data/assets/mermaid/diagrams/sankey/sankeyDB.d.ts +36 -0
  176. data/assets/mermaid/diagrams/sankey/sankeyDetector.d.ts +3 -0
  177. data/assets/mermaid/diagrams/sankey/sankeyDiagram.d.ts +2 -0
  178. data/assets/mermaid/diagrams/sankey/sankeyRenderer.d.ts +14 -0
  179. data/assets/mermaid/diagrams/sankey/sankeyUtils.d.ts +1 -0
  180. data/assets/mermaid/diagrams/sequence/sequenceDb.d.ts +153 -0
  181. data/assets/mermaid/diagrams/sequence/sequenceDetector.d.ts +3 -0
  182. data/assets/mermaid/diagrams/sequence/sequenceDiagram.d.ts +2 -0
  183. data/assets/mermaid/diagrams/sequence/sequenceRenderer.d.ts +202 -0
  184. data/assets/mermaid/diagrams/sequence/styles.d.ts +2 -0
  185. data/assets/mermaid/diagrams/sequence/svgDraw.d.ts +73 -0
  186. data/assets/mermaid/diagrams/state/id-cache.d.ts +11 -0
  187. data/assets/mermaid/diagrams/state/shapes.d.ts +14 -0
  188. data/assets/mermaid/diagrams/state/stateCommon.d.ts +22 -0
  189. data/assets/mermaid/diagrams/state/stateDb.d.ts +91 -0
  190. data/assets/mermaid/diagrams/state/stateDetector-V2.d.ts +3 -0
  191. data/assets/mermaid/diagrams/state/stateDetector.d.ts +3 -0
  192. data/assets/mermaid/diagrams/state/stateDiagram-v2.d.ts +2 -0
  193. data/assets/mermaid/diagrams/state/stateDiagram.d.ts +2 -0
  194. data/assets/mermaid/diagrams/state/stateRenderer-v2.d.ts +20 -0
  195. data/assets/mermaid/diagrams/state/stateRenderer.d.ts +7 -0
  196. data/assets/mermaid/diagrams/state/styles.d.ts +2 -0
  197. data/assets/mermaid/diagrams/timeline/detector.d.ts +3 -0
  198. data/assets/mermaid/diagrams/timeline/styles.d.ts +2 -0
  199. data/assets/mermaid/diagrams/timeline/svgDraw.d.ts +46 -0
  200. data/assets/mermaid/diagrams/timeline/timeline-definition.d.ts +10 -0
  201. data/assets/mermaid/diagrams/timeline/timelineDb.d.ts +20 -0
  202. data/assets/mermaid/diagrams/timeline/timelineRenderer.d.ts +19 -0
  203. data/assets/mermaid/diagrams/user-journey/journeyDb.d.ts +30 -0
  204. data/assets/mermaid/diagrams/user-journey/journeyDetector.d.ts +3 -0
  205. data/assets/mermaid/diagrams/user-journey/journeyDiagram.d.ts +2 -0
  206. data/assets/mermaid/diagrams/user-journey/journeyRenderer.d.ts +30 -0
  207. data/assets/mermaid/diagrams/user-journey/styles.d.ts +2 -0
  208. data/assets/mermaid/diagrams/user-journey/svgDraw.d.ts +20 -0
  209. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/bandAxis.d.ts +12 -0
  210. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/baseAxis.d.ts +38 -0
  211. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/index.d.ts +12 -0
  212. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/linearAxis.d.ts +11 -0
  213. data/assets/mermaid/diagrams/xychart/chartBuilder/components/chartTitle.d.ts +16 -0
  214. data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/barPlot.d.ts +12 -0
  215. data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/index.d.ts +20 -0
  216. data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/linePlot.d.ts +11 -0
  217. data/assets/mermaid/diagrams/xychart/chartBuilder/index.d.ts +5 -0
  218. data/assets/mermaid/diagrams/xychart/chartBuilder/interfaces.d.ts +132 -0
  219. data/assets/mermaid/diagrams/xychart/chartBuilder/orchestrator.d.ts +12 -0
  220. data/assets/mermaid/diagrams/xychart/chartBuilder/textDimensionCalculator.d.ts +10 -0
  221. data/assets/mermaid/diagrams/xychart/parser/xychart.jison.spec.d.ts +1 -0
  222. data/assets/mermaid/diagrams/xychart/xychartDb.d.ts +40 -0
  223. data/assets/mermaid/diagrams/xychart/xychartDetector.d.ts +3 -0
  224. data/assets/mermaid/diagrams/xychart/xychartDiagram.d.ts +2 -0
  225. data/assets/mermaid/diagrams/xychart/xychartRenderer.d.ts +6 -0
  226. data/assets/mermaid/docs/vite.config.d.ts +2 -0
  227. data/assets/mermaid/edges-066a5561.js +1840 -0
  228. data/assets/mermaid/edges-16357fde.js +1083 -0
  229. data/assets/mermaid/edges-ce5cfb7c.js +1840 -0
  230. data/assets/mermaid/erDiagram-09d1c15f.js +1176 -0
  231. data/assets/mermaid/erDiagram-543717f2.js +1321 -0
  232. data/assets/mermaid/erDiagram-c7ff1bec.js +931 -0
  233. data/assets/mermaid/errors.d.ts +3 -0
  234. data/assets/mermaid/flowDb-9a89ea33.js +1126 -0
  235. data/assets/mermaid/flowDb-ba9bd7fa.js +1713 -0
  236. data/assets/mermaid/flowDb-c1833063.js +1714 -0
  237. data/assets/mermaid/flowDiagram-aadb13b0.js +797 -0
  238. data/assets/mermaid/flowDiagram-b222e15a.js +614 -0
  239. data/assets/mermaid/flowDiagram-b5e7ba30.js +1278 -0
  240. data/assets/mermaid/flowDiagram-v2-13329dc7.js +40 -0
  241. data/assets/mermaid/flowDiagram-v2-54711e03.js +32 -0
  242. data/assets/mermaid/flowDiagram-v2-f2119625.js +25 -0
  243. data/assets/mermaid/flowchart-elk-definition-2d49707c.js +93397 -0
  244. data/assets/mermaid/flowchart-elk-definition-ae0efee6.js +814 -0
  245. data/assets/mermaid/flowchart-elk-definition-cf813a97.js +48407 -0
  246. data/assets/mermaid/ganttDiagram-12cf43db.js +3445 -0
  247. data/assets/mermaid/ganttDiagram-3c2fde2b.js +2501 -0
  248. data/assets/mermaid/ganttDiagram-b62c793e.js +2061 -0
  249. data/assets/mermaid/gitGraphDiagram-942e62fe.js +1800 -0
  250. data/assets/mermaid/gitGraphDiagram-b9392a12.js +1790 -0
  251. data/assets/mermaid/gitGraphDiagram-c3a0619c.js +1264 -0
  252. data/assets/mermaid/graph-0ee63739.js +881 -0
  253. data/assets/mermaid/graph-fe24fab6.js +1285 -0
  254. data/assets/mermaid/index-01f381cb.js +622 -0
  255. data/assets/mermaid/index-bb6d8841.js +373 -0
  256. data/assets/mermaid/index-fc479858.js +663 -0
  257. data/assets/mermaid/infoDiagram-2f5c50c0.js +319 -0
  258. data/assets/mermaid/infoDiagram-94cd232f.js +520 -0
  259. data/assets/mermaid/infoDiagram-d0d5c9bd.js +510 -0
  260. data/assets/mermaid/init-cc95ec8e.js +16 -0
  261. data/assets/mermaid/init-f9637058.js +16 -0
  262. data/assets/mermaid/interactionDb.d.ts +2 -0
  263. data/assets/mermaid/journeyDiagram-14fe341a.js +804 -0
  264. data/assets/mermaid/journeyDiagram-6625b456.js +1191 -0
  265. data/assets/mermaid/journeyDiagram-b56e6921.js +1183 -0
  266. data/assets/mermaid/katex-d90b6d29.js +11624 -0
  267. data/assets/mermaid/katex-ffb0e8f1.js +14432 -0
  268. data/assets/mermaid/layout-163b9689.js +2314 -0
  269. data/assets/mermaid/layout-fd473db2.js +1536 -0
  270. data/assets/mermaid/line-24d93f1b.js +34 -0
  271. data/assets/mermaid/line-87f517ef.js +50 -0
  272. data/assets/mermaid/linear-0ad15847.js +595 -0
  273. data/assets/mermaid/linear-9bcf74c4.js +447 -0
  274. data/assets/mermaid/logger.d.ts +9 -0
  275. data/assets/mermaid/mermaid-6dc72991.js +6461 -0
  276. data/assets/mermaid/mermaid-9f2aa176.js +8112 -0
  277. data/assets/mermaid/mermaid-dcacb631.js +12793 -0
  278. data/assets/mermaid/mermaid.core.mjs +14 -0
  279. data/assets/mermaid/mermaid.d.ts +146 -0
  280. data/assets/mermaid/mermaid.esm.min.mjs +4 -0
  281. data/assets/mermaid/mermaid.esm.mjs +4 -0
  282. data/assets/mermaid/mermaid.js +195755 -0
  283. data/assets/mermaid/mermaid.min.js +2029 -0
  284. data/assets/mermaid/mermaid.spec.d.ts +1 -0
  285. data/assets/mermaid/mermaidAPI.d.ts +170 -0
  286. data/assets/mermaid/mermaidAPI.spec.d.ts +1 -0
  287. data/assets/mermaid/mindmap-definition-307c710a.js +1177 -0
  288. data/assets/mermaid/mindmap-definition-696ddea4.js +32342 -0
  289. data/assets/mermaid/mindmap-definition-9399c7e6.js +18760 -0
  290. data/assets/mermaid/ordinal-475e0c0c.js +82 -0
  291. data/assets/mermaid/ordinal-5695958c.js +65 -0
  292. data/assets/mermaid/path-39bad7e2.js +118 -0
  293. data/assets/mermaid/path-428ebac9.js +91 -0
  294. data/assets/mermaid/pieDiagram-828dae43.js +502 -0
  295. data/assets/mermaid/pieDiagram-bb1d19e5.js +722 -0
  296. data/assets/mermaid/pieDiagram-e854eaf0.js +772 -0
  297. data/assets/mermaid/preprocess.d.ts +10 -0
  298. data/assets/mermaid/quadrantDiagram-25a9848b.js +1199 -0
  299. data/assets/mermaid/quadrantDiagram-5fa00455.js +904 -0
  300. data/assets/mermaid/quadrantDiagram-c759a472.js +1207 -0
  301. data/assets/mermaid/rendering-util/createText.d.ts +11 -0
  302. data/assets/mermaid/rendering-util/handle-markdown-text.d.ts +6 -0
  303. data/assets/mermaid/rendering-util/handle-markdown-text.spec.d.ts +1 -0
  304. data/assets/mermaid/rendering-util/selectSvgElement.d.ts +8 -0
  305. data/assets/mermaid/rendering-util/splitText.d.ts +24 -0
  306. data/assets/mermaid/rendering-util/splitText.spec.d.ts +1 -0
  307. data/assets/mermaid/rendering-util/uid.d.ts +8 -0
  308. data/assets/mermaid/requirementDiagram-03163dc4.js +769 -0
  309. data/assets/mermaid/requirementDiagram-87253d64.js +1098 -0
  310. data/assets/mermaid/requirementDiagram-a721e157.js +1091 -0
  311. data/assets/mermaid/sankeyDiagram-33525efb.js +1198 -0
  312. data/assets/mermaid/sankeyDiagram-52ec8976.js +818 -0
  313. data/assets/mermaid/sankeyDiagram-707fac0f.js +660 -0
  314. data/assets/mermaid/sequenceDiagram-6894f283.js +3346 -0
  315. data/assets/mermaid/sequenceDiagram-9813c129.js +3336 -0
  316. data/assets/mermaid/sequenceDiagram-b517d154.js +2234 -0
  317. data/assets/mermaid/setupGraphViewbox.d.ts +3 -0
  318. data/assets/mermaid/stateDiagram-5dee940d.js +474 -0
  319. data/assets/mermaid/stateDiagram-5ec31577.js +467 -0
  320. data/assets/mermaid/stateDiagram-fca82b5b.js +275 -0
  321. data/assets/mermaid/stateDiagram-v2-1992cada.js +333 -0
  322. data/assets/mermaid/stateDiagram-v2-992e82a1.js +325 -0
  323. data/assets/mermaid/stateDiagram-v2-ed04200a.js +190 -0
  324. data/assets/mermaid/styles-0784dbeb.js +1363 -0
  325. data/assets/mermaid/styles-11e81fdd.js +1089 -0
  326. data/assets/mermaid/styles-36a1a2e8.js +1483 -0
  327. data/assets/mermaid/styles-483fbfea.js +509 -0
  328. data/assets/mermaid/styles-727cdd61.js +571 -0
  329. data/assets/mermaid/styles-b83b31c9.js +1484 -0
  330. data/assets/mermaid/styles-cacbff60.js +960 -0
  331. data/assets/mermaid/styles-e75131e4.js +433 -0
  332. data/assets/mermaid/styles-f80da881.js +1363 -0
  333. data/assets/mermaid/styles.d.ts +12 -0
  334. data/assets/mermaid/styles.spec.d.ts +1 -0
  335. data/assets/mermaid/svgDrawCommon-5e1cfd1d.js +101 -0
  336. data/assets/mermaid/svgDrawCommon-d6ab583c.js +100 -0
  337. data/assets/mermaid/svgDrawCommon-ecc5f780.js +64 -0
  338. data/assets/mermaid/tests/MockedD3.d.ts +45 -0
  339. data/assets/mermaid/tests/setup.d.ts +1 -0
  340. data/assets/mermaid/tests/util.d.ts +3 -0
  341. data/assets/mermaid/themes/erDiagram-oldHardcodedValues.d.ts +7 -0
  342. data/assets/mermaid/themes/index.d.ts +24 -0
  343. data/assets/mermaid/themes/theme-base.d.ts +189 -0
  344. data/assets/mermaid/themes/theme-dark.d.ts +177 -0
  345. data/assets/mermaid/themes/theme-default.d.ts +188 -0
  346. data/assets/mermaid/themes/theme-forest.d.ts +185 -0
  347. data/assets/mermaid/themes/theme-helpers.d.ts +1 -0
  348. data/assets/mermaid/themes/theme-neutral.d.ts +182 -0
  349. data/assets/mermaid/timeline-definition-23ce0e2e.js +1211 -0
  350. data/assets/mermaid/timeline-definition-4ee9bff4.js +795 -0
  351. data/assets/mermaid/timeline-definition-bf702344.js +1219 -0
  352. data/assets/mermaid/types.d.ts +31 -0
  353. data/assets/mermaid/utils/imperativeState.d.ts +32 -0
  354. data/assets/mermaid/utils/imperativeState.spec.d.ts +1 -0
  355. data/assets/mermaid/utils/lineWithOffset.d.ts +5 -0
  356. data/assets/mermaid/utils/sanitizeDirective.d.ts +7 -0
  357. data/assets/mermaid/utils/subGraphTitleMargins.d.ts +8 -0
  358. data/assets/mermaid/utils/subGraphTitleMargins.spec.d.ts +1 -0
  359. data/assets/mermaid/utils.d.ts +286 -0
  360. data/assets/mermaid/utils.spec.d.ts +1 -0
  361. data/assets/mermaid/xychartDiagram-de2e5521.js +1800 -0
  362. data/assets/mermaid/xychartDiagram-e5e6b652.js +1284 -0
  363. data/assets/mermaid/xychartDiagram-f11f50a6.js +1745 -0
  364. data/assets/tables.css +23 -0
  365. data/assets/toURI.js +142 -0
  366. metadata +363 -2
@@ -0,0 +1,1800 @@
1
+ import { c as getConfig, s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, q as setDiagramTitle, t as getDiagramTitle, l as log, e as common, v as clear$2, y as random, u as utils, z as setupGraphViewbox } from "./mermaid-6dc72991.js";
2
+ import { select } from "d3";
3
+ import "ts-dedent";
4
+ import "dayjs";
5
+ import "@braintree/sanitize-url";
6
+ import "dompurify";
7
+ import "khroma";
8
+ import "lodash-es/memoize.js";
9
+ import "lodash-es/merge.js";
10
+ import "stylis";
11
+ import "lodash-es/isEmpty.js";
12
+ var parser = function() {
13
+ var o = function(k, v, o2, l) {
14
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
15
+ ;
16
+ return o2;
17
+ }, $V0 = [1, 3], $V1 = [1, 6], $V2 = [1, 4], $V3 = [1, 5], $V4 = [2, 5], $V5 = [1, 12], $V6 = [5, 7, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40, 47], $V7 = [7, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40], $V8 = [7, 12, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40], $V9 = [7, 13, 47], $Va = [1, 42], $Vb = [1, 41], $Vc = [7, 13, 29, 32, 35, 38, 47], $Vd = [1, 55], $Ve = [1, 56], $Vf = [1, 57], $Vg = [7, 13, 32, 35, 42, 47];
18
+ var parser2 = {
19
+ trace: function trace() {
20
+ },
21
+ yy: {},
22
+ symbols_: { "error": 2, "start": 3, "eol": 4, "GG": 5, "document": 6, "EOF": 7, ":": 8, "DIR": 9, "options": 10, "body": 11, "OPT": 12, "NL": 13, "line": 14, "statement": 15, "commitStatement": 16, "mergeStatement": 17, "cherryPickStatement": 18, "acc_title": 19, "acc_title_value": 20, "acc_descr": 21, "acc_descr_value": 22, "acc_descr_multiline_value": 23, "section": 24, "branchStatement": 25, "CHECKOUT": 26, "ref": 27, "BRANCH": 28, "ORDER": 29, "NUM": 30, "CHERRY_PICK": 31, "COMMIT_ID": 32, "STR": 33, "PARENT_COMMIT": 34, "COMMIT_TAG": 35, "EMPTYSTR": 36, "MERGE": 37, "COMMIT_TYPE": 38, "commitType": 39, "COMMIT": 40, "commit_arg": 41, "COMMIT_MSG": 42, "NORMAL": 43, "REVERSE": 44, "HIGHLIGHT": 45, "ID": 46, ";": 47, "$accept": 0, "$end": 1 },
23
+ terminals_: { 2: "error", 5: "GG", 7: "EOF", 8: ":", 9: "DIR", 12: "OPT", 13: "NL", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "section", 26: "CHECKOUT", 28: "BRANCH", 29: "ORDER", 30: "NUM", 31: "CHERRY_PICK", 32: "COMMIT_ID", 33: "STR", 34: "PARENT_COMMIT", 35: "COMMIT_TAG", 36: "EMPTYSTR", 37: "MERGE", 38: "COMMIT_TYPE", 40: "COMMIT", 42: "COMMIT_MSG", 43: "NORMAL", 44: "REVERSE", 45: "HIGHLIGHT", 46: "ID", 47: ";" },
24
+ productions_: [0, [3, 2], [3, 3], [3, 4], [3, 5], [6, 0], [6, 2], [10, 2], [10, 1], [11, 0], [11, 2], [14, 2], [14, 1], [15, 1], [15, 1], [15, 1], [15, 2], [15, 2], [15, 1], [15, 1], [15, 1], [15, 2], [25, 2], [25, 4], [18, 3], [18, 5], [18, 5], [18, 7], [18, 7], [18, 5], [18, 5], [18, 5], [18, 7], [18, 7], [18, 7], [18, 7], [17, 2], [17, 4], [17, 4], [17, 4], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [16, 2], [16, 3], [16, 3], [16, 5], [16, 5], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [41, 0], [41, 1], [39, 1], [39, 1], [39, 1], [27, 1], [27, 1], [4, 1], [4, 1], [4, 1]],
25
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
26
+ var $0 = $$.length - 1;
27
+ switch (yystate) {
28
+ case 2:
29
+ return $$[$0];
30
+ case 3:
31
+ return $$[$0 - 1];
32
+ case 4:
33
+ yy.setDirection($$[$0 - 3]);
34
+ return $$[$0 - 1];
35
+ case 6:
36
+ yy.setOptions($$[$0 - 1]);
37
+ this.$ = $$[$0];
38
+ break;
39
+ case 7:
40
+ $$[$0 - 1] += $$[$0];
41
+ this.$ = $$[$0 - 1];
42
+ break;
43
+ case 9:
44
+ this.$ = [];
45
+ break;
46
+ case 10:
47
+ $$[$0 - 1].push($$[$0]);
48
+ this.$ = $$[$0 - 1];
49
+ break;
50
+ case 11:
51
+ this.$ = $$[$0 - 1];
52
+ break;
53
+ case 16:
54
+ this.$ = $$[$0].trim();
55
+ yy.setAccTitle(this.$);
56
+ break;
57
+ case 17:
58
+ case 18:
59
+ this.$ = $$[$0].trim();
60
+ yy.setAccDescription(this.$);
61
+ break;
62
+ case 19:
63
+ yy.addSection($$[$0].substr(8));
64
+ this.$ = $$[$0].substr(8);
65
+ break;
66
+ case 21:
67
+ yy.checkout($$[$0]);
68
+ break;
69
+ case 22:
70
+ yy.branch($$[$0]);
71
+ break;
72
+ case 23:
73
+ yy.branch($$[$0 - 2], $$[$0]);
74
+ break;
75
+ case 24:
76
+ yy.cherryPick($$[$0], "", void 0);
77
+ break;
78
+ case 25:
79
+ yy.cherryPick($$[$0 - 2], "", void 0, $$[$0]);
80
+ break;
81
+ case 26:
82
+ yy.cherryPick($$[$0 - 2], "", $$[$0]);
83
+ break;
84
+ case 27:
85
+ yy.cherryPick($$[$0 - 4], "", $$[$0], $$[$0 - 2]);
86
+ break;
87
+ case 28:
88
+ yy.cherryPick($$[$0 - 4], "", $$[$0 - 2], $$[$0]);
89
+ break;
90
+ case 29:
91
+ yy.cherryPick($$[$0], "", $$[$0 - 2]);
92
+ break;
93
+ case 30:
94
+ yy.cherryPick($$[$0], "", "");
95
+ break;
96
+ case 31:
97
+ yy.cherryPick($$[$0 - 2], "", "");
98
+ break;
99
+ case 32:
100
+ yy.cherryPick($$[$0 - 4], "", "", $$[$0 - 2]);
101
+ break;
102
+ case 33:
103
+ yy.cherryPick($$[$0 - 4], "", "", $$[$0]);
104
+ break;
105
+ case 34:
106
+ yy.cherryPick($$[$0 - 2], "", $$[$0 - 4], $$[$0]);
107
+ break;
108
+ case 35:
109
+ yy.cherryPick($$[$0 - 2], "", "", $$[$0]);
110
+ break;
111
+ case 36:
112
+ yy.merge($$[$0], "", "", "");
113
+ break;
114
+ case 37:
115
+ yy.merge($$[$0 - 2], $$[$0], "", "");
116
+ break;
117
+ case 38:
118
+ yy.merge($$[$0 - 2], "", $$[$0], "");
119
+ break;
120
+ case 39:
121
+ yy.merge($$[$0 - 2], "", "", $$[$0]);
122
+ break;
123
+ case 40:
124
+ yy.merge($$[$0 - 4], $$[$0], "", $$[$0 - 2]);
125
+ break;
126
+ case 41:
127
+ yy.merge($$[$0 - 4], "", $$[$0], $$[$0 - 2]);
128
+ break;
129
+ case 42:
130
+ yy.merge($$[$0 - 4], "", $$[$0 - 2], $$[$0]);
131
+ break;
132
+ case 43:
133
+ yy.merge($$[$0 - 4], $$[$0 - 2], $$[$0], "");
134
+ break;
135
+ case 44:
136
+ yy.merge($$[$0 - 4], $$[$0 - 2], "", $$[$0]);
137
+ break;
138
+ case 45:
139
+ yy.merge($$[$0 - 4], $$[$0], $$[$0 - 2], "");
140
+ break;
141
+ case 46:
142
+ yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]);
143
+ break;
144
+ case 47:
145
+ yy.merge($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]);
146
+ break;
147
+ case 48:
148
+ yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]);
149
+ break;
150
+ case 49:
151
+ yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]);
152
+ break;
153
+ case 50:
154
+ yy.merge($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]);
155
+ break;
156
+ case 51:
157
+ yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]);
158
+ break;
159
+ case 52:
160
+ yy.commit($$[$0]);
161
+ break;
162
+ case 53:
163
+ yy.commit("", "", yy.commitType.NORMAL, $$[$0]);
164
+ break;
165
+ case 54:
166
+ yy.commit("", "", $$[$0], "");
167
+ break;
168
+ case 55:
169
+ yy.commit("", "", $$[$0], $$[$0 - 2]);
170
+ break;
171
+ case 56:
172
+ yy.commit("", "", $$[$0 - 2], $$[$0]);
173
+ break;
174
+ case 57:
175
+ yy.commit("", $$[$0], yy.commitType.NORMAL, "");
176
+ break;
177
+ case 58:
178
+ yy.commit("", $$[$0 - 2], yy.commitType.NORMAL, $$[$0]);
179
+ break;
180
+ case 59:
181
+ yy.commit("", $$[$0], yy.commitType.NORMAL, $$[$0 - 2]);
182
+ break;
183
+ case 60:
184
+ yy.commit("", $$[$0 - 2], $$[$0], "");
185
+ break;
186
+ case 61:
187
+ yy.commit("", $$[$0], $$[$0 - 2], "");
188
+ break;
189
+ case 62:
190
+ yy.commit("", $$[$0 - 4], $$[$0 - 2], $$[$0]);
191
+ break;
192
+ case 63:
193
+ yy.commit("", $$[$0 - 4], $$[$0], $$[$0 - 2]);
194
+ break;
195
+ case 64:
196
+ yy.commit("", $$[$0 - 2], $$[$0 - 4], $$[$0]);
197
+ break;
198
+ case 65:
199
+ yy.commit("", $$[$0], $$[$0 - 4], $$[$0 - 2]);
200
+ break;
201
+ case 66:
202
+ yy.commit("", $$[$0], $$[$0 - 2], $$[$0 - 4]);
203
+ break;
204
+ case 67:
205
+ yy.commit("", $$[$0 - 2], $$[$0], $$[$0 - 4]);
206
+ break;
207
+ case 68:
208
+ yy.commit($$[$0], "", yy.commitType.NORMAL, "");
209
+ break;
210
+ case 69:
211
+ yy.commit($$[$0], "", yy.commitType.NORMAL, $$[$0 - 2]);
212
+ break;
213
+ case 70:
214
+ yy.commit($$[$0 - 2], "", yy.commitType.NORMAL, $$[$0]);
215
+ break;
216
+ case 71:
217
+ yy.commit($$[$0 - 2], "", $$[$0], "");
218
+ break;
219
+ case 72:
220
+ yy.commit($$[$0], "", $$[$0 - 2], "");
221
+ break;
222
+ case 73:
223
+ yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, "");
224
+ break;
225
+ case 74:
226
+ yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, "");
227
+ break;
228
+ case 75:
229
+ yy.commit($$[$0 - 4], "", $$[$0 - 2], $$[$0]);
230
+ break;
231
+ case 76:
232
+ yy.commit($$[$0 - 4], "", $$[$0], $$[$0 - 2]);
233
+ break;
234
+ case 77:
235
+ yy.commit($$[$0 - 2], "", $$[$0 - 4], $$[$0]);
236
+ break;
237
+ case 78:
238
+ yy.commit($$[$0], "", $$[$0 - 4], $$[$0 - 2]);
239
+ break;
240
+ case 79:
241
+ yy.commit($$[$0], "", $$[$0 - 2], $$[$0 - 4]);
242
+ break;
243
+ case 80:
244
+ yy.commit($$[$0 - 2], "", $$[$0], $$[$0 - 4]);
245
+ break;
246
+ case 81:
247
+ yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], "");
248
+ break;
249
+ case 82:
250
+ yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], "");
251
+ break;
252
+ case 83:
253
+ yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], "");
254
+ break;
255
+ case 84:
256
+ yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], "");
257
+ break;
258
+ case 85:
259
+ yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], "");
260
+ break;
261
+ case 86:
262
+ yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], "");
263
+ break;
264
+ case 87:
265
+ yy.commit($$[$0 - 4], $$[$0], yy.commitType.NORMAL, $$[$0 - 2]);
266
+ break;
267
+ case 88:
268
+ yy.commit($$[$0 - 4], $$[$0 - 2], yy.commitType.NORMAL, $$[$0]);
269
+ break;
270
+ case 89:
271
+ yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, $$[$0 - 4]);
272
+ break;
273
+ case 90:
274
+ yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, $$[$0 - 4]);
275
+ break;
276
+ case 91:
277
+ yy.commit($$[$0], $$[$0 - 4], yy.commitType.NORMAL, $$[$0 - 2]);
278
+ break;
279
+ case 92:
280
+ yy.commit($$[$0 - 2], $$[$0 - 4], yy.commitType.NORMAL, $$[$0]);
281
+ break;
282
+ case 93:
283
+ yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]);
284
+ break;
285
+ case 94:
286
+ yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]);
287
+ break;
288
+ case 95:
289
+ yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]);
290
+ break;
291
+ case 96:
292
+ yy.commit($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]);
293
+ break;
294
+ case 97:
295
+ yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]);
296
+ break;
297
+ case 98:
298
+ yy.commit($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]);
299
+ break;
300
+ case 99:
301
+ yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0 - 2], $$[$0]);
302
+ break;
303
+ case 100:
304
+ yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0], $$[$0 - 2]);
305
+ break;
306
+ case 101:
307
+ yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0 - 4], $$[$0]);
308
+ break;
309
+ case 102:
310
+ yy.commit($$[$0], $$[$0 - 6], $$[$0 - 4], $$[$0 - 2]);
311
+ break;
312
+ case 103:
313
+ yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0], $$[$0 - 4]);
314
+ break;
315
+ case 104:
316
+ yy.commit($$[$0], $$[$0 - 6], $$[$0 - 2], $$[$0 - 4]);
317
+ break;
318
+ case 105:
319
+ yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], $$[$0 - 6]);
320
+ break;
321
+ case 106:
322
+ yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], $$[$0 - 6]);
323
+ break;
324
+ case 107:
325
+ yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], $$[$0 - 6]);
326
+ break;
327
+ case 108:
328
+ yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], $$[$0 - 6]);
329
+ break;
330
+ case 109:
331
+ yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], $$[$0 - 6]);
332
+ break;
333
+ case 110:
334
+ yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 6]);
335
+ break;
336
+ case 111:
337
+ yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0 - 6], $$[$0]);
338
+ break;
339
+ case 112:
340
+ yy.commit($$[$0], $$[$0 - 4], $$[$0 - 6], $$[$0 - 2]);
341
+ break;
342
+ case 113:
343
+ yy.commit($$[$0 - 2], $$[$0], $$[$0 - 6], $$[$0 - 4]);
344
+ break;
345
+ case 114:
346
+ yy.commit($$[$0], $$[$0 - 2], $$[$0 - 6], $$[$0 - 4]);
347
+ break;
348
+ case 115:
349
+ yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0 - 6], $$[$0]);
350
+ break;
351
+ case 116:
352
+ yy.commit($$[$0 - 4], $$[$0], $$[$0 - 6], $$[$0 - 2]);
353
+ break;
354
+ case 117:
355
+ this.$ = "";
356
+ break;
357
+ case 118:
358
+ this.$ = $$[$0];
359
+ break;
360
+ case 119:
361
+ this.$ = yy.commitType.NORMAL;
362
+ break;
363
+ case 120:
364
+ this.$ = yy.commitType.REVERSE;
365
+ break;
366
+ case 121:
367
+ this.$ = yy.commitType.HIGHLIGHT;
368
+ break;
369
+ }
370
+ },
371
+ table: [{ 3: 1, 4: 2, 5: $V0, 7: $V1, 13: $V2, 47: $V3 }, { 1: [3] }, { 3: 7, 4: 2, 5: $V0, 7: $V1, 13: $V2, 47: $V3 }, { 6: 8, 7: $V4, 8: [1, 9], 9: [1, 10], 10: 11, 13: $V5 }, o($V6, [2, 124]), o($V6, [2, 125]), o($V6, [2, 126]), { 1: [2, 1] }, { 7: [1, 13] }, { 6: 14, 7: $V4, 10: 11, 13: $V5 }, { 8: [1, 15] }, o($V7, [2, 9], { 11: 16, 12: [1, 17] }), o($V8, [2, 8]), { 1: [2, 2] }, { 7: [1, 18] }, { 6: 19, 7: $V4, 10: 11, 13: $V5 }, { 7: [2, 6], 13: [1, 22], 14: 20, 15: 21, 16: 23, 17: 24, 18: 25, 19: [1, 26], 21: [1, 27], 23: [1, 28], 24: [1, 29], 25: 30, 26: [1, 31], 28: [1, 35], 31: [1, 34], 37: [1, 33], 40: [1, 32] }, o($V8, [2, 7]), { 1: [2, 3] }, { 7: [1, 36] }, o($V7, [2, 10]), { 4: 37, 7: $V1, 13: $V2, 47: $V3 }, o($V7, [2, 12]), o($V9, [2, 13]), o($V9, [2, 14]), o($V9, [2, 15]), { 20: [1, 38] }, { 22: [1, 39] }, o($V9, [2, 18]), o($V9, [2, 19]), o($V9, [2, 20]), { 27: 40, 33: $Va, 46: $Vb }, o($V9, [2, 117], { 41: 43, 32: [1, 46], 33: [1, 48], 35: [1, 44], 38: [1, 45], 42: [1, 47] }), { 27: 49, 33: $Va, 46: $Vb }, { 32: [1, 50], 35: [1, 51] }, { 27: 52, 33: $Va, 46: $Vb }, { 1: [2, 4] }, o($V7, [2, 11]), o($V9, [2, 16]), o($V9, [2, 17]), o($V9, [2, 21]), o($Vc, [2, 122]), o($Vc, [2, 123]), o($V9, [2, 52]), { 33: [1, 53] }, { 39: 54, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 58] }, { 33: [1, 59] }, o($V9, [2, 118]), o($V9, [2, 36], { 32: [1, 60], 35: [1, 62], 38: [1, 61] }), { 33: [1, 63] }, { 33: [1, 64], 36: [1, 65] }, o($V9, [2, 22], { 29: [1, 66] }), o($V9, [2, 53], { 32: [1, 68], 38: [1, 67], 42: [1, 69] }), o($V9, [2, 54], { 32: [1, 71], 35: [1, 70], 42: [1, 72] }), o($Vg, [2, 119]), o($Vg, [2, 120]), o($Vg, [2, 121]), o($V9, [2, 57], { 35: [1, 73], 38: [1, 74], 42: [1, 75] }), o($V9, [2, 68], { 32: [1, 78], 35: [1, 76], 38: [1, 77] }), { 33: [1, 79] }, { 39: 80, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 81] }, o($V9, [2, 24], { 34: [1, 82], 35: [1, 83] }), { 32: [1, 84] }, { 32: [1, 85] }, { 30: [1, 86] }, { 39: 87, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 88] }, { 33: [1, 89] }, { 33: [1, 90] }, { 33: [1, 91] }, { 33: [1, 92] }, { 33: [1, 93] }, { 39: 94, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 95] }, { 33: [1, 96] }, { 39: 97, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 98] }, o($V9, [2, 37], { 35: [1, 100], 38: [1, 99] }), o($V9, [2, 38], { 32: [1, 102], 35: [1, 101] }), o($V9, [2, 39], { 32: [1, 103], 38: [1, 104] }), { 33: [1, 105] }, { 33: [1, 106], 36: [1, 107] }, { 33: [1, 108] }, { 33: [1, 109] }, o($V9, [2, 23]), o($V9, [2, 55], { 32: [1, 110], 42: [1, 111] }), o($V9, [2, 59], { 38: [1, 112], 42: [1, 113] }), o($V9, [2, 69], { 32: [1, 115], 38: [1, 114] }), o($V9, [2, 56], { 32: [1, 116], 42: [1, 117] }), o($V9, [2, 61], { 35: [1, 118], 42: [1, 119] }), o($V9, [2, 72], { 32: [1, 121], 35: [1, 120] }), o($V9, [2, 58], { 38: [1, 122], 42: [1, 123] }), o($V9, [2, 60], { 35: [1, 124], 42: [1, 125] }), o($V9, [2, 73], { 35: [1, 127], 38: [1, 126] }), o($V9, [2, 70], { 32: [1, 129], 38: [1, 128] }), o($V9, [2, 71], { 32: [1, 131], 35: [1, 130] }), o($V9, [2, 74], { 35: [1, 133], 38: [1, 132] }), { 39: 134, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 135] }, { 33: [1, 136] }, { 33: [1, 137] }, { 33: [1, 138] }, { 39: 139, 43: $Vd, 44: $Ve, 45: $Vf }, o($V9, [2, 25], { 35: [1, 140] }), o($V9, [2, 26], { 34: [1, 141] }), o($V9, [2, 31], { 34: [1, 142] }), o($V9, [2, 29], { 34: [1, 143] }), o($V9, [2, 30], { 34: [1, 144] }), { 33: [1, 145] }, { 33: [1, 146] }, { 39: 147, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 148] }, { 39: 149, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 150] }, { 33: [1, 151] }, { 33: [1, 152] }, { 33: [1, 153] }, { 33: [1, 154] }, { 33: [1, 155] }, { 33: [1, 156] }, { 39: 157, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 158] }, { 33: [1, 159] }, { 33: [1, 160] }, { 39: 161, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 162] }, { 39: 163, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 164] }, { 33: [1, 165] }, { 33: [1, 166] }, { 39: 167, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 168] }, o($V9, [2, 43], { 35: [1, 169] }), o($V9, [2, 44], { 38: [1, 170] }), o($V9, [2, 42], { 32: [1, 171] }), o($V9, [2, 45], { 35: [1, 172] }), o($V9, [2, 40], { 38: [1, 173] }), o($V9, [2, 41], { 32: [1, 174] }), { 33: [1, 175], 36: [1, 176] }, { 33: [1, 177] }, { 33: [1, 178] }, { 33: [1, 179] }, { 33: [1, 180] }, o($V9, [2, 66], { 42: [1, 181] }), o($V9, [2, 79], { 32: [1, 182] }), o($V9, [2, 67], { 42: [1, 183] }), o($V9, [2, 90], { 38: [1, 184] }), o($V9, [2, 80], { 32: [1, 185] }), o($V9, [2, 89], { 38: [1, 186] }), o($V9, [2, 65], { 42: [1, 187] }), o($V9, [2, 78], { 32: [1, 188] }), o($V9, [2, 64], { 42: [1, 189] }), o($V9, [2, 84], { 35: [1, 190] }), o($V9, [2, 77], { 32: [1, 191] }), o($V9, [2, 83], { 35: [1, 192] }), o($V9, [2, 63], { 42: [1, 193] }), o($V9, [2, 91], { 38: [1, 194] }), o($V9, [2, 62], { 42: [1, 195] }), o($V9, [2, 85], { 35: [1, 196] }), o($V9, [2, 86], { 35: [1, 197] }), o($V9, [2, 92], { 38: [1, 198] }), o($V9, [2, 76], { 32: [1, 199] }), o($V9, [2, 87], { 38: [1, 200] }), o($V9, [2, 75], { 32: [1, 201] }), o($V9, [2, 81], { 35: [1, 202] }), o($V9, [2, 82], { 35: [1, 203] }), o($V9, [2, 88], { 38: [1, 204] }), { 33: [1, 205] }, { 39: 206, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 207] }, { 33: [1, 208] }, { 39: 209, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 210] }, o($V9, [2, 27]), o($V9, [2, 32]), o($V9, [2, 28]), o($V9, [2, 33]), o($V9, [2, 34]), o($V9, [2, 35]), { 33: [1, 211] }, { 33: [1, 212] }, { 33: [1, 213] }, { 39: 214, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 215] }, { 39: 216, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 217] }, { 33: [1, 218] }, { 33: [1, 219] }, { 33: [1, 220] }, { 33: [1, 221] }, { 33: [1, 222] }, { 33: [1, 223] }, { 39: 224, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 225] }, { 33: [1, 226] }, { 33: [1, 227] }, { 39: 228, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 229] }, { 39: 230, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 231] }, { 33: [1, 232] }, { 33: [1, 233] }, { 39: 234, 43: $Vd, 44: $Ve, 45: $Vf }, o($V9, [2, 46]), o($V9, [2, 48]), o($V9, [2, 47]), o($V9, [2, 49]), o($V9, [2, 51]), o($V9, [2, 50]), o($V9, [2, 107]), o($V9, [2, 108]), o($V9, [2, 105]), o($V9, [2, 106]), o($V9, [2, 110]), o($V9, [2, 109]), o($V9, [2, 114]), o($V9, [2, 113]), o($V9, [2, 112]), o($V9, [2, 111]), o($V9, [2, 116]), o($V9, [2, 115]), o($V9, [2, 104]), o($V9, [2, 103]), o($V9, [2, 102]), o($V9, [2, 101]), o($V9, [2, 99]), o($V9, [2, 100]), o($V9, [2, 98]), o($V9, [2, 97]), o($V9, [2, 96]), o($V9, [2, 95]), o($V9, [2, 93]), o($V9, [2, 94])],
372
+ defaultActions: { 7: [2, 1], 13: [2, 2], 18: [2, 3], 36: [2, 4] },
373
+ parseError: function parseError(str, hash) {
374
+ if (hash.recoverable) {
375
+ this.trace(str);
376
+ } else {
377
+ var error = new Error(str);
378
+ error.hash = hash;
379
+ throw error;
380
+ }
381
+ },
382
+ parse: function parse(input) {
383
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
384
+ var args = lstack.slice.call(arguments, 1);
385
+ var lexer2 = Object.create(this.lexer);
386
+ var sharedState = { yy: {} };
387
+ for (var k in this.yy) {
388
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
389
+ sharedState.yy[k] = this.yy[k];
390
+ }
391
+ }
392
+ lexer2.setInput(input, sharedState.yy);
393
+ sharedState.yy.lexer = lexer2;
394
+ sharedState.yy.parser = this;
395
+ if (typeof lexer2.yylloc == "undefined") {
396
+ lexer2.yylloc = {};
397
+ }
398
+ var yyloc = lexer2.yylloc;
399
+ lstack.push(yyloc);
400
+ var ranges = lexer2.options && lexer2.options.ranges;
401
+ if (typeof sharedState.yy.parseError === "function") {
402
+ this.parseError = sharedState.yy.parseError;
403
+ } else {
404
+ this.parseError = Object.getPrototypeOf(this).parseError;
405
+ }
406
+ function lex() {
407
+ var token;
408
+ token = tstack.pop() || lexer2.lex() || EOF;
409
+ if (typeof token !== "number") {
410
+ if (token instanceof Array) {
411
+ tstack = token;
412
+ token = tstack.pop();
413
+ }
414
+ token = self.symbols_[token] || token;
415
+ }
416
+ return token;
417
+ }
418
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
419
+ while (true) {
420
+ state = stack[stack.length - 1];
421
+ if (this.defaultActions[state]) {
422
+ action = this.defaultActions[state];
423
+ } else {
424
+ if (symbol === null || typeof symbol == "undefined") {
425
+ symbol = lex();
426
+ }
427
+ action = table[state] && table[state][symbol];
428
+ }
429
+ if (typeof action === "undefined" || !action.length || !action[0]) {
430
+ var errStr = "";
431
+ expected = [];
432
+ for (p in table[state]) {
433
+ if (this.terminals_[p] && p > TERROR) {
434
+ expected.push("'" + this.terminals_[p] + "'");
435
+ }
436
+ }
437
+ if (lexer2.showPosition) {
438
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
439
+ } else {
440
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
441
+ }
442
+ this.parseError(errStr, {
443
+ text: lexer2.match,
444
+ token: this.terminals_[symbol] || symbol,
445
+ line: lexer2.yylineno,
446
+ loc: yyloc,
447
+ expected
448
+ });
449
+ }
450
+ if (action[0] instanceof Array && action.length > 1) {
451
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
452
+ }
453
+ switch (action[0]) {
454
+ case 1:
455
+ stack.push(symbol);
456
+ vstack.push(lexer2.yytext);
457
+ lstack.push(lexer2.yylloc);
458
+ stack.push(action[1]);
459
+ symbol = null;
460
+ {
461
+ yyleng = lexer2.yyleng;
462
+ yytext = lexer2.yytext;
463
+ yylineno = lexer2.yylineno;
464
+ yyloc = lexer2.yylloc;
465
+ }
466
+ break;
467
+ case 2:
468
+ len = this.productions_[action[1]][1];
469
+ yyval.$ = vstack[vstack.length - len];
470
+ yyval._$ = {
471
+ first_line: lstack[lstack.length - (len || 1)].first_line,
472
+ last_line: lstack[lstack.length - 1].last_line,
473
+ first_column: lstack[lstack.length - (len || 1)].first_column,
474
+ last_column: lstack[lstack.length - 1].last_column
475
+ };
476
+ if (ranges) {
477
+ yyval._$.range = [
478
+ lstack[lstack.length - (len || 1)].range[0],
479
+ lstack[lstack.length - 1].range[1]
480
+ ];
481
+ }
482
+ r = this.performAction.apply(yyval, [
483
+ yytext,
484
+ yyleng,
485
+ yylineno,
486
+ sharedState.yy,
487
+ action[1],
488
+ vstack,
489
+ lstack
490
+ ].concat(args));
491
+ if (typeof r !== "undefined") {
492
+ return r;
493
+ }
494
+ if (len) {
495
+ stack = stack.slice(0, -1 * len * 2);
496
+ vstack = vstack.slice(0, -1 * len);
497
+ lstack = lstack.slice(0, -1 * len);
498
+ }
499
+ stack.push(this.productions_[action[1]][0]);
500
+ vstack.push(yyval.$);
501
+ lstack.push(yyval._$);
502
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
503
+ stack.push(newState);
504
+ break;
505
+ case 3:
506
+ return true;
507
+ }
508
+ }
509
+ return true;
510
+ }
511
+ };
512
+ var lexer = function() {
513
+ var lexer2 = {
514
+ EOF: 1,
515
+ parseError: function parseError(str, hash) {
516
+ if (this.yy.parser) {
517
+ this.yy.parser.parseError(str, hash);
518
+ } else {
519
+ throw new Error(str);
520
+ }
521
+ },
522
+ // resets the lexer, sets new input
523
+ setInput: function(input, yy) {
524
+ this.yy = yy || this.yy || {};
525
+ this._input = input;
526
+ this._more = this._backtrack = this.done = false;
527
+ this.yylineno = this.yyleng = 0;
528
+ this.yytext = this.matched = this.match = "";
529
+ this.conditionStack = ["INITIAL"];
530
+ this.yylloc = {
531
+ first_line: 1,
532
+ first_column: 0,
533
+ last_line: 1,
534
+ last_column: 0
535
+ };
536
+ if (this.options.ranges) {
537
+ this.yylloc.range = [0, 0];
538
+ }
539
+ this.offset = 0;
540
+ return this;
541
+ },
542
+ // consumes and returns one char from the input
543
+ input: function() {
544
+ var ch = this._input[0];
545
+ this.yytext += ch;
546
+ this.yyleng++;
547
+ this.offset++;
548
+ this.match += ch;
549
+ this.matched += ch;
550
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
551
+ if (lines) {
552
+ this.yylineno++;
553
+ this.yylloc.last_line++;
554
+ } else {
555
+ this.yylloc.last_column++;
556
+ }
557
+ if (this.options.ranges) {
558
+ this.yylloc.range[1]++;
559
+ }
560
+ this._input = this._input.slice(1);
561
+ return ch;
562
+ },
563
+ // unshifts one char (or a string) into the input
564
+ unput: function(ch) {
565
+ var len = ch.length;
566
+ var lines = ch.split(/(?:\r\n?|\n)/g);
567
+ this._input = ch + this._input;
568
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
569
+ this.offset -= len;
570
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
571
+ this.match = this.match.substr(0, this.match.length - 1);
572
+ this.matched = this.matched.substr(0, this.matched.length - 1);
573
+ if (lines.length - 1) {
574
+ this.yylineno -= lines.length - 1;
575
+ }
576
+ var r = this.yylloc.range;
577
+ this.yylloc = {
578
+ first_line: this.yylloc.first_line,
579
+ last_line: this.yylineno + 1,
580
+ first_column: this.yylloc.first_column,
581
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
582
+ };
583
+ if (this.options.ranges) {
584
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
585
+ }
586
+ this.yyleng = this.yytext.length;
587
+ return this;
588
+ },
589
+ // When called from action, caches matched text and appends it on next action
590
+ more: function() {
591
+ this._more = true;
592
+ return this;
593
+ },
594
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
595
+ reject: function() {
596
+ if (this.options.backtrack_lexer) {
597
+ this._backtrack = true;
598
+ } else {
599
+ 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(), {
600
+ text: "",
601
+ token: null,
602
+ line: this.yylineno
603
+ });
604
+ }
605
+ return this;
606
+ },
607
+ // retain first n characters of the match
608
+ less: function(n) {
609
+ this.unput(this.match.slice(n));
610
+ },
611
+ // displays already matched input, i.e. for error messages
612
+ pastInput: function() {
613
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
614
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
615
+ },
616
+ // displays upcoming input, i.e. for error messages
617
+ upcomingInput: function() {
618
+ var next = this.match;
619
+ if (next.length < 20) {
620
+ next += this._input.substr(0, 20 - next.length);
621
+ }
622
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
623
+ },
624
+ // displays the character position where the lexing error occurred, i.e. for error messages
625
+ showPosition: function() {
626
+ var pre = this.pastInput();
627
+ var c = new Array(pre.length + 1).join("-");
628
+ return pre + this.upcomingInput() + "\n" + c + "^";
629
+ },
630
+ // test the lexed token: return FALSE when not a match, otherwise return token
631
+ test_match: function(match, indexed_rule) {
632
+ var token, lines, backup;
633
+ if (this.options.backtrack_lexer) {
634
+ backup = {
635
+ yylineno: this.yylineno,
636
+ yylloc: {
637
+ first_line: this.yylloc.first_line,
638
+ last_line: this.last_line,
639
+ first_column: this.yylloc.first_column,
640
+ last_column: this.yylloc.last_column
641
+ },
642
+ yytext: this.yytext,
643
+ match: this.match,
644
+ matches: this.matches,
645
+ matched: this.matched,
646
+ yyleng: this.yyleng,
647
+ offset: this.offset,
648
+ _more: this._more,
649
+ _input: this._input,
650
+ yy: this.yy,
651
+ conditionStack: this.conditionStack.slice(0),
652
+ done: this.done
653
+ };
654
+ if (this.options.ranges) {
655
+ backup.yylloc.range = this.yylloc.range.slice(0);
656
+ }
657
+ }
658
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
659
+ if (lines) {
660
+ this.yylineno += lines.length;
661
+ }
662
+ this.yylloc = {
663
+ first_line: this.yylloc.last_line,
664
+ last_line: this.yylineno + 1,
665
+ first_column: this.yylloc.last_column,
666
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
667
+ };
668
+ this.yytext += match[0];
669
+ this.match += match[0];
670
+ this.matches = match;
671
+ this.yyleng = this.yytext.length;
672
+ if (this.options.ranges) {
673
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
674
+ }
675
+ this._more = false;
676
+ this._backtrack = false;
677
+ this._input = this._input.slice(match[0].length);
678
+ this.matched += match[0];
679
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
680
+ if (this.done && this._input) {
681
+ this.done = false;
682
+ }
683
+ if (token) {
684
+ return token;
685
+ } else if (this._backtrack) {
686
+ for (var k in backup) {
687
+ this[k] = backup[k];
688
+ }
689
+ return false;
690
+ }
691
+ return false;
692
+ },
693
+ // return next match in input
694
+ next: function() {
695
+ if (this.done) {
696
+ return this.EOF;
697
+ }
698
+ if (!this._input) {
699
+ this.done = true;
700
+ }
701
+ var token, match, tempMatch, index;
702
+ if (!this._more) {
703
+ this.yytext = "";
704
+ this.match = "";
705
+ }
706
+ var rules = this._currentRules();
707
+ for (var i = 0; i < rules.length; i++) {
708
+ tempMatch = this._input.match(this.rules[rules[i]]);
709
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
710
+ match = tempMatch;
711
+ index = i;
712
+ if (this.options.backtrack_lexer) {
713
+ token = this.test_match(tempMatch, rules[i]);
714
+ if (token !== false) {
715
+ return token;
716
+ } else if (this._backtrack) {
717
+ match = false;
718
+ continue;
719
+ } else {
720
+ return false;
721
+ }
722
+ } else if (!this.options.flex) {
723
+ break;
724
+ }
725
+ }
726
+ }
727
+ if (match) {
728
+ token = this.test_match(match, rules[index]);
729
+ if (token !== false) {
730
+ return token;
731
+ }
732
+ return false;
733
+ }
734
+ if (this._input === "") {
735
+ return this.EOF;
736
+ } else {
737
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
738
+ text: "",
739
+ token: null,
740
+ line: this.yylineno
741
+ });
742
+ }
743
+ },
744
+ // return next match that has a token
745
+ lex: function lex() {
746
+ var r = this.next();
747
+ if (r) {
748
+ return r;
749
+ } else {
750
+ return this.lex();
751
+ }
752
+ },
753
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
754
+ begin: function begin(condition) {
755
+ this.conditionStack.push(condition);
756
+ },
757
+ // pop the previously active lexer condition state off the condition stack
758
+ popState: function popState() {
759
+ var n = this.conditionStack.length - 1;
760
+ if (n > 0) {
761
+ return this.conditionStack.pop();
762
+ } else {
763
+ return this.conditionStack[0];
764
+ }
765
+ },
766
+ // produce the lexer rule set which is active for the currently active lexer condition state
767
+ _currentRules: function _currentRules() {
768
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
769
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
770
+ } else {
771
+ return this.conditions["INITIAL"].rules;
772
+ }
773
+ },
774
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
775
+ topState: function topState(n) {
776
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
777
+ if (n >= 0) {
778
+ return this.conditionStack[n];
779
+ } else {
780
+ return "INITIAL";
781
+ }
782
+ },
783
+ // alias for begin(condition)
784
+ pushState: function pushState(condition) {
785
+ this.begin(condition);
786
+ },
787
+ // return the number of states currently on the stack
788
+ stateStackSize: function stateStackSize() {
789
+ return this.conditionStack.length;
790
+ },
791
+ options: { "case-insensitive": true },
792
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
793
+ switch ($avoiding_name_collisions) {
794
+ case 0:
795
+ this.begin("acc_title");
796
+ return 19;
797
+ case 1:
798
+ this.popState();
799
+ return "acc_title_value";
800
+ case 2:
801
+ this.begin("acc_descr");
802
+ return 21;
803
+ case 3:
804
+ this.popState();
805
+ return "acc_descr_value";
806
+ case 4:
807
+ this.begin("acc_descr_multiline");
808
+ break;
809
+ case 5:
810
+ this.popState();
811
+ break;
812
+ case 6:
813
+ return "acc_descr_multiline_value";
814
+ case 7:
815
+ return 13;
816
+ case 8:
817
+ break;
818
+ case 9:
819
+ break;
820
+ case 10:
821
+ return 5;
822
+ case 11:
823
+ return 40;
824
+ case 12:
825
+ return 32;
826
+ case 13:
827
+ return 38;
828
+ case 14:
829
+ return 42;
830
+ case 15:
831
+ return 43;
832
+ case 16:
833
+ return 44;
834
+ case 17:
835
+ return 45;
836
+ case 18:
837
+ return 35;
838
+ case 19:
839
+ return 28;
840
+ case 20:
841
+ return 29;
842
+ case 21:
843
+ return 37;
844
+ case 22:
845
+ return 31;
846
+ case 23:
847
+ return 34;
848
+ case 24:
849
+ return 26;
850
+ case 25:
851
+ return 9;
852
+ case 26:
853
+ return 9;
854
+ case 27:
855
+ return 8;
856
+ case 28:
857
+ return "CARET";
858
+ case 29:
859
+ this.begin("options");
860
+ break;
861
+ case 30:
862
+ this.popState();
863
+ break;
864
+ case 31:
865
+ return 12;
866
+ case 32:
867
+ return 36;
868
+ case 33:
869
+ this.begin("string");
870
+ break;
871
+ case 34:
872
+ this.popState();
873
+ break;
874
+ case 35:
875
+ return 33;
876
+ case 36:
877
+ return 30;
878
+ case 37:
879
+ return 46;
880
+ case 38:
881
+ return 7;
882
+ }
883
+ },
884
+ rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:gitGraph\b)/i, /^(?:commit(?=\s|$))/i, /^(?:id:)/i, /^(?:type:)/i, /^(?:msg:)/i, /^(?:NORMAL\b)/i, /^(?:REVERSE\b)/i, /^(?:HIGHLIGHT\b)/i, /^(?:tag:)/i, /^(?:branch(?=\s|$))/i, /^(?:order:)/i, /^(?:merge(?=\s|$))/i, /^(?:cherry-pick(?=\s|$))/i, /^(?:parent:)/i, /^(?:checkout(?=\s|$))/i, /^(?:LR\b)/i, /^(?:TB\b)/i, /^(?::)/i, /^(?:\^)/i, /^(?:options\r?\n)/i, /^(?:[ \r\n\t]+end\b)/i, /^(?:[\s\S]+(?=[ \r\n\t]+end))/i, /^(?:["]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[0-9]+(?=\s|$))/i, /^(?:\w([-\./\w]*[-\w])?)/i, /^(?:$)/i, /^(?:\s+)/i],
885
+ conditions: { "acc_descr_multiline": { "rules": [5, 6], "inclusive": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "options": { "rules": [30, 31], "inclusive": false }, "string": { "rules": [34, 35], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 36, 37, 38, 39], "inclusive": true } }
886
+ };
887
+ return lexer2;
888
+ }();
889
+ parser2.lexer = lexer;
890
+ function Parser() {
891
+ this.yy = {};
892
+ }
893
+ Parser.prototype = parser2;
894
+ parser2.Parser = Parser;
895
+ return new Parser();
896
+ }();
897
+ parser.parser = parser;
898
+ const gitGraphParser = parser;
899
+ let mainBranchName = getConfig().gitGraph.mainBranchName;
900
+ let mainBranchOrder = getConfig().gitGraph.mainBranchOrder;
901
+ let commits = {};
902
+ let head = null;
903
+ let branchesConfig = {};
904
+ branchesConfig[mainBranchName] = { name: mainBranchName, order: mainBranchOrder };
905
+ let branches = {};
906
+ branches[mainBranchName] = head;
907
+ let curBranch = mainBranchName;
908
+ let direction = "LR";
909
+ let seq = 0;
910
+ function getId() {
911
+ return random({ length: 7 });
912
+ }
913
+ function uniqBy(list, fn) {
914
+ const recordMap = /* @__PURE__ */ Object.create(null);
915
+ return list.reduce((out, item) => {
916
+ const key = fn(item);
917
+ if (!recordMap[key]) {
918
+ recordMap[key] = true;
919
+ out.push(item);
920
+ }
921
+ return out;
922
+ }, []);
923
+ }
924
+ const setDirection = function(dir2) {
925
+ direction = dir2;
926
+ };
927
+ let options = {};
928
+ const setOptions = function(rawOptString) {
929
+ log.debug("options str", rawOptString);
930
+ rawOptString = rawOptString && rawOptString.trim();
931
+ rawOptString = rawOptString || "{}";
932
+ try {
933
+ options = JSON.parse(rawOptString);
934
+ } catch (e) {
935
+ log.error("error while parsing gitGraph options", e.message);
936
+ }
937
+ };
938
+ const getOptions = function() {
939
+ return options;
940
+ };
941
+ const commit = function(msg, id, type, tag) {
942
+ log.debug("Entering commit:", msg, id, type, tag);
943
+ id = common.sanitizeText(id, getConfig());
944
+ msg = common.sanitizeText(msg, getConfig());
945
+ tag = common.sanitizeText(tag, getConfig());
946
+ const commit2 = {
947
+ id: id ? id : seq + "-" + getId(),
948
+ message: msg,
949
+ seq: seq++,
950
+ type: type ? type : commitType$1.NORMAL,
951
+ tag: tag ? tag : "",
952
+ parents: head == null ? [] : [head.id],
953
+ branch: curBranch
954
+ };
955
+ head = commit2;
956
+ commits[commit2.id] = commit2;
957
+ branches[curBranch] = commit2.id;
958
+ log.debug("in pushCommit " + commit2.id);
959
+ };
960
+ const branch = function(name, order) {
961
+ name = common.sanitizeText(name, getConfig());
962
+ if (branches[name] === void 0) {
963
+ branches[name] = head != null ? head.id : null;
964
+ branchesConfig[name] = { name, order: order ? parseInt(order, 10) : null };
965
+ checkout(name);
966
+ log.debug("in createBranch");
967
+ } else {
968
+ let error = new Error(
969
+ 'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + name + '")'
970
+ );
971
+ error.hash = {
972
+ text: "branch " + name,
973
+ token: "branch " + name,
974
+ line: "1",
975
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
976
+ expected: ['"checkout ' + name + '"']
977
+ };
978
+ throw error;
979
+ }
980
+ };
981
+ const merge = function(otherBranch, custom_id, override_type, custom_tag) {
982
+ otherBranch = common.sanitizeText(otherBranch, getConfig());
983
+ custom_id = common.sanitizeText(custom_id, getConfig());
984
+ const currentCommit = commits[branches[curBranch]];
985
+ const otherCommit = commits[branches[otherBranch]];
986
+ if (curBranch === otherBranch) {
987
+ let error = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
988
+ error.hash = {
989
+ text: "merge " + otherBranch,
990
+ token: "merge " + otherBranch,
991
+ line: "1",
992
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
993
+ expected: ["branch abc"]
994
+ };
995
+ throw error;
996
+ } else if (currentCommit === void 0 || !currentCommit) {
997
+ let error = new Error(
998
+ 'Incorrect usage of "merge". Current branch (' + curBranch + ")has no commits"
999
+ );
1000
+ error.hash = {
1001
+ text: "merge " + otherBranch,
1002
+ token: "merge " + otherBranch,
1003
+ line: "1",
1004
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
1005
+ expected: ["commit"]
1006
+ };
1007
+ throw error;
1008
+ } else if (branches[otherBranch] === void 0) {
1009
+ let error = new Error(
1010
+ 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") does not exist"
1011
+ );
1012
+ error.hash = {
1013
+ text: "merge " + otherBranch,
1014
+ token: "merge " + otherBranch,
1015
+ line: "1",
1016
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
1017
+ expected: ["branch " + otherBranch]
1018
+ };
1019
+ throw error;
1020
+ } else if (otherCommit === void 0 || !otherCommit) {
1021
+ let error = new Error(
1022
+ 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") has no commits"
1023
+ );
1024
+ error.hash = {
1025
+ text: "merge " + otherBranch,
1026
+ token: "merge " + otherBranch,
1027
+ line: "1",
1028
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
1029
+ expected: ['"commit"']
1030
+ };
1031
+ throw error;
1032
+ } else if (currentCommit === otherCommit) {
1033
+ let error = new Error('Incorrect usage of "merge". Both branches have same head');
1034
+ error.hash = {
1035
+ text: "merge " + otherBranch,
1036
+ token: "merge " + otherBranch,
1037
+ line: "1",
1038
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
1039
+ expected: ["branch abc"]
1040
+ };
1041
+ throw error;
1042
+ } else if (custom_id && commits[custom_id] !== void 0) {
1043
+ let error = new Error(
1044
+ 'Incorrect usage of "merge". Commit with id:' + custom_id + " already exists, use different custom Id"
1045
+ );
1046
+ error.hash = {
1047
+ text: "merge " + otherBranch + custom_id + override_type + custom_tag,
1048
+ token: "merge " + otherBranch + custom_id + override_type + custom_tag,
1049
+ line: "1",
1050
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
1051
+ expected: [
1052
+ "merge " + otherBranch + " " + custom_id + "_UNIQUE " + override_type + " " + custom_tag
1053
+ ]
1054
+ };
1055
+ throw error;
1056
+ }
1057
+ const commit2 = {
1058
+ id: custom_id ? custom_id : seq + "-" + getId(),
1059
+ message: "merged branch " + otherBranch + " into " + curBranch,
1060
+ seq: seq++,
1061
+ parents: [head == null ? null : head.id, branches[otherBranch]],
1062
+ branch: curBranch,
1063
+ type: commitType$1.MERGE,
1064
+ customType: override_type,
1065
+ customId: custom_id ? true : false,
1066
+ tag: custom_tag ? custom_tag : ""
1067
+ };
1068
+ head = commit2;
1069
+ commits[commit2.id] = commit2;
1070
+ branches[curBranch] = commit2.id;
1071
+ log.debug(branches);
1072
+ log.debug("in mergeBranch");
1073
+ };
1074
+ const cherryPick = function(sourceId, targetId, tag, parentCommitId) {
1075
+ log.debug("Entering cherryPick:", sourceId, targetId, tag);
1076
+ sourceId = common.sanitizeText(sourceId, getConfig());
1077
+ targetId = common.sanitizeText(targetId, getConfig());
1078
+ tag = common.sanitizeText(tag, getConfig());
1079
+ parentCommitId = common.sanitizeText(parentCommitId, getConfig());
1080
+ if (!sourceId || commits[sourceId] === void 0) {
1081
+ let error = new Error(
1082
+ 'Incorrect usage of "cherryPick". Source commit id should exist and provided'
1083
+ );
1084
+ error.hash = {
1085
+ text: "cherryPick " + sourceId + " " + targetId,
1086
+ token: "cherryPick " + sourceId + " " + targetId,
1087
+ line: "1",
1088
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
1089
+ expected: ["cherry-pick abc"]
1090
+ };
1091
+ throw error;
1092
+ }
1093
+ let sourceCommit = commits[sourceId];
1094
+ let sourceCommitBranch = sourceCommit.branch;
1095
+ if (parentCommitId && !(Array.isArray(sourceCommit.parents) && sourceCommit.parents.includes(parentCommitId))) {
1096
+ let error = new Error(
1097
+ "Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
1098
+ );
1099
+ throw error;
1100
+ }
1101
+ if (sourceCommit.type === commitType$1.MERGE && !parentCommitId) {
1102
+ let error = new Error(
1103
+ "Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
1104
+ );
1105
+ throw error;
1106
+ }
1107
+ if (!targetId || commits[targetId] === void 0) {
1108
+ if (sourceCommitBranch === curBranch) {
1109
+ let error = new Error(
1110
+ 'Incorrect usage of "cherryPick". Source commit is already on current branch'
1111
+ );
1112
+ error.hash = {
1113
+ text: "cherryPick " + sourceId + " " + targetId,
1114
+ token: "cherryPick " + sourceId + " " + targetId,
1115
+ line: "1",
1116
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
1117
+ expected: ["cherry-pick abc"]
1118
+ };
1119
+ throw error;
1120
+ }
1121
+ const currentCommit = commits[branches[curBranch]];
1122
+ if (currentCommit === void 0 || !currentCommit) {
1123
+ let error = new Error(
1124
+ 'Incorrect usage of "cherry-pick". Current branch (' + curBranch + ")has no commits"
1125
+ );
1126
+ error.hash = {
1127
+ text: "cherryPick " + sourceId + " " + targetId,
1128
+ token: "cherryPick " + sourceId + " " + targetId,
1129
+ line: "1",
1130
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
1131
+ expected: ["cherry-pick abc"]
1132
+ };
1133
+ throw error;
1134
+ }
1135
+ const commit2 = {
1136
+ id: seq + "-" + getId(),
1137
+ message: "cherry-picked " + sourceCommit + " into " + curBranch,
1138
+ seq: seq++,
1139
+ parents: [head == null ? null : head.id, sourceCommit.id],
1140
+ branch: curBranch,
1141
+ type: commitType$1.CHERRY_PICK,
1142
+ tag: tag ?? `cherry-pick:${sourceCommit.id}${sourceCommit.type === commitType$1.MERGE ? `|parent:${parentCommitId}` : ""}`
1143
+ };
1144
+ head = commit2;
1145
+ commits[commit2.id] = commit2;
1146
+ branches[curBranch] = commit2.id;
1147
+ log.debug(branches);
1148
+ log.debug("in cherryPick");
1149
+ }
1150
+ };
1151
+ const checkout = function(branch2) {
1152
+ branch2 = common.sanitizeText(branch2, getConfig());
1153
+ if (branches[branch2] === void 0) {
1154
+ let error = new Error(
1155
+ 'Trying to checkout branch which is not yet created. (Help try using "branch ' + branch2 + '")'
1156
+ );
1157
+ error.hash = {
1158
+ text: "checkout " + branch2,
1159
+ token: "checkout " + branch2,
1160
+ line: "1",
1161
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
1162
+ expected: ['"branch ' + branch2 + '"']
1163
+ };
1164
+ throw error;
1165
+ } else {
1166
+ curBranch = branch2;
1167
+ const id = branches[curBranch];
1168
+ head = commits[id];
1169
+ }
1170
+ };
1171
+ function upsert(arr, key, newVal) {
1172
+ const index = arr.indexOf(key);
1173
+ if (index === -1) {
1174
+ arr.push(newVal);
1175
+ } else {
1176
+ arr.splice(index, 1, newVal);
1177
+ }
1178
+ }
1179
+ function prettyPrintCommitHistory(commitArr) {
1180
+ const commit2 = commitArr.reduce((out, commit3) => {
1181
+ if (out.seq > commit3.seq) {
1182
+ return out;
1183
+ }
1184
+ return commit3;
1185
+ }, commitArr[0]);
1186
+ let line = "";
1187
+ commitArr.forEach(function(c) {
1188
+ if (c === commit2) {
1189
+ line += " *";
1190
+ } else {
1191
+ line += " |";
1192
+ }
1193
+ });
1194
+ const label = [line, commit2.id, commit2.seq];
1195
+ for (let branch2 in branches) {
1196
+ if (branches[branch2] === commit2.id) {
1197
+ label.push(branch2);
1198
+ }
1199
+ }
1200
+ log.debug(label.join(" "));
1201
+ if (commit2.parents && commit2.parents.length == 2) {
1202
+ const newCommit = commits[commit2.parents[0]];
1203
+ upsert(commitArr, commit2, newCommit);
1204
+ commitArr.push(commits[commit2.parents[1]]);
1205
+ } else if (commit2.parents.length == 0) {
1206
+ return;
1207
+ } else {
1208
+ const nextCommit = commits[commit2.parents];
1209
+ upsert(commitArr, commit2, nextCommit);
1210
+ }
1211
+ commitArr = uniqBy(commitArr, (c) => c.id);
1212
+ prettyPrintCommitHistory(commitArr);
1213
+ }
1214
+ const prettyPrint = function() {
1215
+ log.debug(commits);
1216
+ const node = getCommitsArray()[0];
1217
+ prettyPrintCommitHistory([node]);
1218
+ };
1219
+ const clear$1 = function() {
1220
+ commits = {};
1221
+ head = null;
1222
+ let mainBranch = getConfig().gitGraph.mainBranchName;
1223
+ let mainBranchOrder2 = getConfig().gitGraph.mainBranchOrder;
1224
+ branches = {};
1225
+ branches[mainBranch] = null;
1226
+ branchesConfig = {};
1227
+ branchesConfig[mainBranch] = { name: mainBranch, order: mainBranchOrder2 };
1228
+ curBranch = mainBranch;
1229
+ seq = 0;
1230
+ clear$2();
1231
+ };
1232
+ const getBranchesAsObjArray = function() {
1233
+ const branchesArray = Object.values(branchesConfig).map((branchConfig, i) => {
1234
+ if (branchConfig.order !== null) {
1235
+ return branchConfig;
1236
+ }
1237
+ return {
1238
+ ...branchConfig,
1239
+ order: parseFloat(`0.${i}`, 10)
1240
+ };
1241
+ }).sort((a, b) => a.order - b.order).map(({ name }) => ({ name }));
1242
+ return branchesArray;
1243
+ };
1244
+ const getBranches = function() {
1245
+ return branches;
1246
+ };
1247
+ const getCommits = function() {
1248
+ return commits;
1249
+ };
1250
+ const getCommitsArray = function() {
1251
+ const commitArr = Object.keys(commits).map(function(key) {
1252
+ return commits[key];
1253
+ });
1254
+ commitArr.forEach(function(o) {
1255
+ log.debug(o.id);
1256
+ });
1257
+ commitArr.sort((a, b) => a.seq - b.seq);
1258
+ return commitArr;
1259
+ };
1260
+ const getCurrentBranch = function() {
1261
+ return curBranch;
1262
+ };
1263
+ const getDirection = function() {
1264
+ return direction;
1265
+ };
1266
+ const getHead = function() {
1267
+ return head;
1268
+ };
1269
+ const commitType$1 = {
1270
+ NORMAL: 0,
1271
+ REVERSE: 1,
1272
+ HIGHLIGHT: 2,
1273
+ MERGE: 3,
1274
+ CHERRY_PICK: 4
1275
+ };
1276
+ const gitGraphDb = {
1277
+ getConfig: () => getConfig().gitGraph,
1278
+ setDirection,
1279
+ setOptions,
1280
+ getOptions,
1281
+ commit,
1282
+ branch,
1283
+ merge,
1284
+ cherryPick,
1285
+ checkout,
1286
+ //reset,
1287
+ prettyPrint,
1288
+ clear: clear$1,
1289
+ getBranchesAsObjArray,
1290
+ getBranches,
1291
+ getCommits,
1292
+ getCommitsArray,
1293
+ getCurrentBranch,
1294
+ getDirection,
1295
+ getHead,
1296
+ setAccTitle,
1297
+ getAccTitle,
1298
+ getAccDescription,
1299
+ setAccDescription,
1300
+ setDiagramTitle,
1301
+ getDiagramTitle,
1302
+ commitType: commitType$1
1303
+ };
1304
+ let allCommitsDict = {};
1305
+ const commitType = {
1306
+ NORMAL: 0,
1307
+ REVERSE: 1,
1308
+ HIGHLIGHT: 2,
1309
+ MERGE: 3,
1310
+ CHERRY_PICK: 4
1311
+ };
1312
+ const THEME_COLOR_LIMIT = 8;
1313
+ let branchPos = {};
1314
+ let commitPos = {};
1315
+ let lanes = [];
1316
+ let maxPos = 0;
1317
+ let dir = "LR";
1318
+ const clear = () => {
1319
+ branchPos = {};
1320
+ commitPos = {};
1321
+ allCommitsDict = {};
1322
+ maxPos = 0;
1323
+ lanes = [];
1324
+ dir = "LR";
1325
+ };
1326
+ const drawText = (txt) => {
1327
+ const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text");
1328
+ let rows = [];
1329
+ if (typeof txt === "string") {
1330
+ rows = txt.split(/\\n|\n|<br\s*\/?>/gi);
1331
+ } else if (Array.isArray(txt)) {
1332
+ rows = txt;
1333
+ } else {
1334
+ rows = [];
1335
+ }
1336
+ for (const row of rows) {
1337
+ const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1338
+ tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
1339
+ tspan.setAttribute("dy", "1em");
1340
+ tspan.setAttribute("x", "0");
1341
+ tspan.setAttribute("class", "row");
1342
+ tspan.textContent = row.trim();
1343
+ svgLabel.appendChild(tspan);
1344
+ }
1345
+ return svgLabel;
1346
+ };
1347
+ const findClosestParent = (parents) => {
1348
+ let closestParent = "";
1349
+ let maxPosition = 0;
1350
+ parents.forEach((parent) => {
1351
+ const parentPosition = dir === "TB" ? commitPos[parent].y : commitPos[parent].x;
1352
+ if (parentPosition >= maxPosition) {
1353
+ closestParent = parent;
1354
+ maxPosition = parentPosition;
1355
+ }
1356
+ });
1357
+ return closestParent || void 0;
1358
+ };
1359
+ const drawCommits = (svg, commits2, modifyGraph) => {
1360
+ const gitGraphConfig = getConfig().gitGraph;
1361
+ const gBullets = svg.append("g").attr("class", "commit-bullets");
1362
+ const gLabels = svg.append("g").attr("class", "commit-labels");
1363
+ let pos = 0;
1364
+ if (dir === "TB") {
1365
+ pos = 30;
1366
+ }
1367
+ const keys = Object.keys(commits2);
1368
+ const sortedKeys = keys.sort((a, b) => {
1369
+ return commits2[a].seq - commits2[b].seq;
1370
+ });
1371
+ const isParallelCommits = gitGraphConfig.parallelCommits;
1372
+ const layoutOffset = 10;
1373
+ const commitStep = 40;
1374
+ sortedKeys.forEach((key) => {
1375
+ const commit2 = commits2[key];
1376
+ if (isParallelCommits) {
1377
+ if (commit2.parents.length) {
1378
+ const closestParent = findClosestParent(commit2.parents);
1379
+ pos = dir === "TB" ? commitPos[closestParent].y + commitStep : commitPos[closestParent].x + commitStep;
1380
+ } else {
1381
+ pos = 0;
1382
+ if (dir === "TB") {
1383
+ pos = 30;
1384
+ }
1385
+ }
1386
+ }
1387
+ const posWithOffset = pos + layoutOffset;
1388
+ const y = dir === "TB" ? posWithOffset : branchPos[commit2.branch].pos;
1389
+ const x = dir === "TB" ? branchPos[commit2.branch].pos : posWithOffset;
1390
+ if (modifyGraph) {
1391
+ let typeClass;
1392
+ let commitSymbolType = commit2.customType !== void 0 && commit2.customType !== "" ? commit2.customType : commit2.type;
1393
+ switch (commitSymbolType) {
1394
+ case commitType.NORMAL:
1395
+ typeClass = "commit-normal";
1396
+ break;
1397
+ case commitType.REVERSE:
1398
+ typeClass = "commit-reverse";
1399
+ break;
1400
+ case commitType.HIGHLIGHT:
1401
+ typeClass = "commit-highlight";
1402
+ break;
1403
+ case commitType.MERGE:
1404
+ typeClass = "commit-merge";
1405
+ break;
1406
+ case commitType.CHERRY_PICK:
1407
+ typeClass = "commit-cherry-pick";
1408
+ break;
1409
+ default:
1410
+ typeClass = "commit-normal";
1411
+ }
1412
+ if (commitSymbolType === commitType.HIGHLIGHT) {
1413
+ const circle = gBullets.append("rect");
1414
+ circle.attr("x", x - 10);
1415
+ circle.attr("y", y - 10);
1416
+ circle.attr("height", 20);
1417
+ circle.attr("width", 20);
1418
+ circle.attr(
1419
+ "class",
1420
+ `commit ${commit2.id} commit-highlight${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-outer`
1421
+ );
1422
+ gBullets.append("rect").attr("x", x - 6).attr("y", y - 6).attr("height", 12).attr("width", 12).attr(
1423
+ "class",
1424
+ `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-inner`
1425
+ );
1426
+ } else if (commitSymbolType === commitType.CHERRY_PICK) {
1427
+ gBullets.append("circle").attr("cx", x).attr("cy", y).attr("r", 10).attr("class", `commit ${commit2.id} ${typeClass}`);
1428
+ gBullets.append("circle").attr("cx", x - 3).attr("cy", y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`);
1429
+ gBullets.append("circle").attr("cx", x + 3).attr("cy", y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`);
1430
+ gBullets.append("line").attr("x1", x + 3).attr("y1", y + 1).attr("x2", x).attr("y2", y - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`);
1431
+ gBullets.append("line").attr("x1", x - 3).attr("y1", y + 1).attr("x2", x).attr("y2", y - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`);
1432
+ } else {
1433
+ const circle = gBullets.append("circle");
1434
+ circle.attr("cx", x);
1435
+ circle.attr("cy", y);
1436
+ circle.attr("r", commit2.type === commitType.MERGE ? 9 : 10);
1437
+ circle.attr(
1438
+ "class",
1439
+ `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}`
1440
+ );
1441
+ if (commitSymbolType === commitType.MERGE) {
1442
+ const circle2 = gBullets.append("circle");
1443
+ circle2.attr("cx", x);
1444
+ circle2.attr("cy", y);
1445
+ circle2.attr("r", 6);
1446
+ circle2.attr(
1447
+ "class",
1448
+ `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}`
1449
+ );
1450
+ }
1451
+ if (commitSymbolType === commitType.REVERSE) {
1452
+ const cross = gBullets.append("path");
1453
+ cross.attr("d", `M ${x - 5},${y - 5}L${x + 5},${y + 5}M${x - 5},${y + 5}L${x + 5},${y - 5}`).attr(
1454
+ "class",
1455
+ `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}`
1456
+ );
1457
+ }
1458
+ }
1459
+ }
1460
+ if (dir === "TB") {
1461
+ commitPos[commit2.id] = { x, y: posWithOffset };
1462
+ } else {
1463
+ commitPos[commit2.id] = { x: posWithOffset, y };
1464
+ }
1465
+ if (modifyGraph) {
1466
+ const px = 4;
1467
+ const py = 2;
1468
+ if (commit2.type !== commitType.CHERRY_PICK && (commit2.customId && commit2.type === commitType.MERGE || commit2.type !== commitType.MERGE) && gitGraphConfig.showCommitLabel) {
1469
+ const wrapper = gLabels.append("g");
1470
+ const labelBkg = wrapper.insert("rect").attr("class", "commit-label-bkg");
1471
+ const text = wrapper.append("text").attr("x", pos).attr("y", y + 25).attr("class", "commit-label").text(commit2.id);
1472
+ let bbox = text.node().getBBox();
1473
+ labelBkg.attr("x", posWithOffset - bbox.width / 2 - py).attr("y", y + 13.5).attr("width", bbox.width + 2 * py).attr("height", bbox.height + 2 * py);
1474
+ if (dir === "TB") {
1475
+ labelBkg.attr("x", x - (bbox.width + 4 * px + 5)).attr("y", y - 12);
1476
+ text.attr("x", x - (bbox.width + 4 * px)).attr("y", y + bbox.height - 12);
1477
+ }
1478
+ if (dir !== "TB") {
1479
+ text.attr("x", posWithOffset - bbox.width / 2);
1480
+ }
1481
+ if (gitGraphConfig.rotateCommitLabel) {
1482
+ if (dir === "TB") {
1483
+ text.attr("transform", "rotate(-45, " + x + ", " + y + ")");
1484
+ labelBkg.attr("transform", "rotate(-45, " + x + ", " + y + ")");
1485
+ } else {
1486
+ let r_x = -7.5 - (bbox.width + 10) / 25 * 9.5;
1487
+ let r_y = 10 + bbox.width / 25 * 8.5;
1488
+ wrapper.attr(
1489
+ "transform",
1490
+ "translate(" + r_x + ", " + r_y + ") rotate(-45, " + pos + ", " + y + ")"
1491
+ );
1492
+ }
1493
+ }
1494
+ }
1495
+ if (commit2.tag) {
1496
+ const rect = gLabels.insert("polygon");
1497
+ const hole = gLabels.append("circle");
1498
+ const tag = gLabels.append("text").attr("y", y - 16).attr("class", "tag-label").text(commit2.tag);
1499
+ let tagBbox = tag.node().getBBox();
1500
+ tag.attr("x", posWithOffset - tagBbox.width / 2);
1501
+ const h2 = tagBbox.height / 2;
1502
+ const ly = y - 19.2;
1503
+ rect.attr("class", "tag-label-bkg").attr(
1504
+ "points",
1505
+ `
1506
+ ${pos - tagBbox.width / 2 - px / 2},${ly + py}
1507
+ ${pos - tagBbox.width / 2 - px / 2},${ly - py}
1508
+ ${posWithOffset - tagBbox.width / 2 - px},${ly - h2 - py}
1509
+ ${posWithOffset + tagBbox.width / 2 + px},${ly - h2 - py}
1510
+ ${posWithOffset + tagBbox.width / 2 + px},${ly + h2 + py}
1511
+ ${posWithOffset - tagBbox.width / 2 - px},${ly + h2 + py}`
1512
+ );
1513
+ hole.attr("cx", pos - tagBbox.width / 2 + px / 2).attr("cy", ly).attr("r", 1.5).attr("class", "tag-hole");
1514
+ if (dir === "TB") {
1515
+ rect.attr("class", "tag-label-bkg").attr(
1516
+ "points",
1517
+ `
1518
+ ${x},${pos + py}
1519
+ ${x},${pos - py}
1520
+ ${x + layoutOffset},${pos - h2 - py}
1521
+ ${x + layoutOffset + tagBbox.width + px},${pos - h2 - py}
1522
+ ${x + layoutOffset + tagBbox.width + px},${pos + h2 + py}
1523
+ ${x + layoutOffset},${pos + h2 + py}`
1524
+ ).attr("transform", "translate(12,12) rotate(45, " + x + "," + pos + ")");
1525
+ hole.attr("cx", x + px / 2).attr("cy", pos).attr("transform", "translate(12,12) rotate(45, " + x + "," + pos + ")");
1526
+ tag.attr("x", x + 5).attr("y", pos + 3).attr("transform", "translate(14,14) rotate(45, " + x + "," + pos + ")");
1527
+ }
1528
+ }
1529
+ }
1530
+ pos += commitStep + layoutOffset;
1531
+ if (pos > maxPos) {
1532
+ maxPos = pos;
1533
+ }
1534
+ });
1535
+ };
1536
+ const shouldRerouteArrow = (commitA, commitB, p1, p2, allCommits) => {
1537
+ const commitBIsFurthest = dir === "TB" ? p1.x < p2.x : p1.y < p2.y;
1538
+ const branchToGetCurve = commitBIsFurthest ? commitB.branch : commitA.branch;
1539
+ const isOnBranchToGetCurve = (x) => x.branch === branchToGetCurve;
1540
+ const isBetweenCommits = (x) => x.seq > commitA.seq && x.seq < commitB.seq;
1541
+ return Object.values(allCommits).some((commitX) => {
1542
+ return isBetweenCommits(commitX) && isOnBranchToGetCurve(commitX);
1543
+ });
1544
+ };
1545
+ const findLane = (y1, y2, depth = 0) => {
1546
+ const candidate = y1 + Math.abs(y1 - y2) / 2;
1547
+ if (depth > 5) {
1548
+ return candidate;
1549
+ }
1550
+ let ok = lanes.every((lane) => Math.abs(lane - candidate) >= 10);
1551
+ if (ok) {
1552
+ lanes.push(candidate);
1553
+ return candidate;
1554
+ }
1555
+ const diff = Math.abs(y1 - y2);
1556
+ return findLane(y1, y2 - diff / 5, depth + 1);
1557
+ };
1558
+ const drawArrow = (svg, commitA, commitB, allCommits) => {
1559
+ const p1 = commitPos[commitA.id];
1560
+ const p2 = commitPos[commitB.id];
1561
+ const arrowNeedsRerouting = shouldRerouteArrow(commitA, commitB, p1, p2, allCommits);
1562
+ let arc = "";
1563
+ let arc2 = "";
1564
+ let radius = 0;
1565
+ let offset = 0;
1566
+ let colorClassNum = branchPos[commitB.branch].index;
1567
+ if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
1568
+ colorClassNum = branchPos[commitA.branch].index;
1569
+ }
1570
+ let lineDef;
1571
+ if (arrowNeedsRerouting) {
1572
+ arc = "A 10 10, 0, 0, 0,";
1573
+ arc2 = "A 10 10, 0, 0, 1,";
1574
+ radius = 10;
1575
+ offset = 10;
1576
+ const lineY = p1.y < p2.y ? findLane(p1.y, p2.y) : findLane(p2.y, p1.y);
1577
+ const lineX = p1.x < p2.x ? findLane(p1.x, p2.x) : findLane(p2.x, p1.x);
1578
+ if (dir === "TB") {
1579
+ if (p1.x < p2.x) {
1580
+ lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc2} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`;
1581
+ } else {
1582
+ colorClassNum = branchPos[commitA.branch].index;
1583
+ lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc2} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`;
1584
+ }
1585
+ } else {
1586
+ if (p1.y < p2.y) {
1587
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY - radius} ${arc} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc2} ${p2.x} ${lineY + offset} L ${p2.x} ${p2.y}`;
1588
+ } else {
1589
+ colorClassNum = branchPos[commitA.branch].index;
1590
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY + radius} ${arc2} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc} ${p2.x} ${lineY - offset} L ${p2.x} ${p2.y}`;
1591
+ }
1592
+ }
1593
+ } else {
1594
+ arc = "A 20 20, 0, 0, 0,";
1595
+ arc2 = "A 20 20, 0, 0, 1,";
1596
+ radius = 20;
1597
+ offset = 20;
1598
+ if (dir === "TB") {
1599
+ if (p1.x < p2.x) {
1600
+ if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
1601
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`;
1602
+ } else {
1603
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`;
1604
+ }
1605
+ }
1606
+ if (p1.x > p2.x) {
1607
+ arc = "A 20 20, 0, 0, 0,";
1608
+ arc2 = "A 20 20, 0, 0, 1,";
1609
+ radius = 20;
1610
+ offset = 20;
1611
+ if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
1612
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc2} ${p1.x - offset} ${p2.y} L ${p2.x} ${p2.y}`;
1613
+ } else {
1614
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x + radius} ${p1.y} ${arc} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`;
1615
+ }
1616
+ }
1617
+ if (p1.x === p2.x) {
1618
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;
1619
+ }
1620
+ } else {
1621
+ if (p1.y < p2.y) {
1622
+ if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
1623
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`;
1624
+ } else {
1625
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`;
1626
+ }
1627
+ }
1628
+ if (p1.y > p2.y) {
1629
+ if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
1630
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${p1.y - offset} L ${p2.x} ${p2.y}`;
1631
+ } else {
1632
+ lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc2} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`;
1633
+ }
1634
+ }
1635
+ if (p1.y === p2.y) {
1636
+ lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;
1637
+ }
1638
+ }
1639
+ }
1640
+ svg.append("path").attr("d", lineDef).attr("class", "arrow arrow" + colorClassNum % THEME_COLOR_LIMIT);
1641
+ };
1642
+ const drawArrows = (svg, commits2) => {
1643
+ const gArrows = svg.append("g").attr("class", "commit-arrows");
1644
+ Object.keys(commits2).forEach((key) => {
1645
+ const commit2 = commits2[key];
1646
+ if (commit2.parents && commit2.parents.length > 0) {
1647
+ commit2.parents.forEach((parent) => {
1648
+ drawArrow(gArrows, commits2[parent], commit2, commits2);
1649
+ });
1650
+ }
1651
+ });
1652
+ };
1653
+ const drawBranches = (svg, branches2) => {
1654
+ const gitGraphConfig = getConfig().gitGraph;
1655
+ const g = svg.append("g");
1656
+ branches2.forEach((branch2, index) => {
1657
+ const adjustIndexForTheme = index % THEME_COLOR_LIMIT;
1658
+ const pos = branchPos[branch2.name].pos;
1659
+ const line = g.append("line");
1660
+ line.attr("x1", 0);
1661
+ line.attr("y1", pos);
1662
+ line.attr("x2", maxPos);
1663
+ line.attr("y2", pos);
1664
+ line.attr("class", "branch branch" + adjustIndexForTheme);
1665
+ if (dir === "TB") {
1666
+ line.attr("y1", 30);
1667
+ line.attr("x1", pos);
1668
+ line.attr("y2", maxPos);
1669
+ line.attr("x2", pos);
1670
+ }
1671
+ lanes.push(pos);
1672
+ let name = branch2.name;
1673
+ const labelElement = drawText(name);
1674
+ const bkg = g.insert("rect");
1675
+ const branchLabel = g.insert("g").attr("class", "branchLabel");
1676
+ const label = branchLabel.insert("g").attr("class", "label branch-label" + adjustIndexForTheme);
1677
+ label.node().appendChild(labelElement);
1678
+ let bbox = labelElement.getBBox();
1679
+ bkg.attr("class", "branchLabelBkg label" + adjustIndexForTheme).attr("rx", 4).attr("ry", 4).attr("x", -bbox.width - 4 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)).attr("y", -bbox.height / 2 + 8).attr("width", bbox.width + 18).attr("height", bbox.height + 4);
1680
+ label.attr(
1681
+ "transform",
1682
+ "translate(" + (-bbox.width - 14 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)) + ", " + (pos - bbox.height / 2 - 1) + ")"
1683
+ );
1684
+ if (dir === "TB") {
1685
+ bkg.attr("x", pos - bbox.width / 2 - 10).attr("y", 0);
1686
+ label.attr("transform", "translate(" + (pos - bbox.width / 2 - 5) + ", 0)");
1687
+ }
1688
+ if (dir !== "TB") {
1689
+ bkg.attr("transform", "translate(-19, " + (pos - bbox.height / 2) + ")");
1690
+ }
1691
+ });
1692
+ };
1693
+ const draw = function(txt, id, ver, diagObj) {
1694
+ clear();
1695
+ const conf = getConfig();
1696
+ const gitGraphConfig = conf.gitGraph;
1697
+ log.debug("in gitgraph renderer", txt + "\n", "id:", id, ver);
1698
+ allCommitsDict = diagObj.db.getCommits();
1699
+ const branches2 = diagObj.db.getBranchesAsObjArray();
1700
+ dir = diagObj.db.getDirection();
1701
+ const diagram2 = select(`[id="${id}"]`);
1702
+ let pos = 0;
1703
+ branches2.forEach((branch2, index) => {
1704
+ const labelElement = drawText(branch2.name);
1705
+ const g = diagram2.append("g");
1706
+ const branchLabel = g.insert("g").attr("class", "branchLabel");
1707
+ const label = branchLabel.insert("g").attr("class", "label branch-label");
1708
+ label.node().appendChild(labelElement);
1709
+ let bbox = labelElement.getBBox();
1710
+ branchPos[branch2.name] = { pos, index };
1711
+ pos += 50 + (gitGraphConfig.rotateCommitLabel ? 40 : 0) + (dir === "TB" ? bbox.width / 2 : 0);
1712
+ label.remove();
1713
+ branchLabel.remove();
1714
+ g.remove();
1715
+ });
1716
+ drawCommits(diagram2, allCommitsDict, false);
1717
+ if (gitGraphConfig.showBranches) {
1718
+ drawBranches(diagram2, branches2);
1719
+ }
1720
+ drawArrows(diagram2, allCommitsDict);
1721
+ drawCommits(diagram2, allCommitsDict, true);
1722
+ utils.insertTitle(
1723
+ diagram2,
1724
+ "gitTitleText",
1725
+ gitGraphConfig.titleTopMargin,
1726
+ diagObj.db.getDiagramTitle()
1727
+ );
1728
+ setupGraphViewbox(
1729
+ void 0,
1730
+ diagram2,
1731
+ gitGraphConfig.diagramPadding,
1732
+ gitGraphConfig.useMaxWidth ?? conf.useMaxWidth
1733
+ );
1734
+ };
1735
+ const gitGraphRenderer = {
1736
+ draw
1737
+ };
1738
+ const getStyles = (options2) => `
1739
+ .commit-id,
1740
+ .commit-msg,
1741
+ .branch-label {
1742
+ fill: lightgrey;
1743
+ color: lightgrey;
1744
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
1745
+ font-family: var(--mermaid-font-family);
1746
+ }
1747
+ ${[0, 1, 2, 3, 4, 5, 6, 7].map(
1748
+ (i) => `
1749
+ .branch-label${i} { fill: ${options2["gitBranchLabel" + i]}; }
1750
+ .commit${i} { stroke: ${options2["git" + i]}; fill: ${options2["git" + i]}; }
1751
+ .commit-highlight${i} { stroke: ${options2["gitInv" + i]}; fill: ${options2["gitInv" + i]}; }
1752
+ .label${i} { fill: ${options2["git" + i]}; }
1753
+ .arrow${i} { stroke: ${options2["git" + i]}; }
1754
+ `
1755
+ ).join("\n")}
1756
+
1757
+ .branch {
1758
+ stroke-width: 1;
1759
+ stroke: ${options2.lineColor};
1760
+ stroke-dasharray: 2;
1761
+ }
1762
+ .commit-label { font-size: ${options2.commitLabelFontSize}; fill: ${options2.commitLabelColor};}
1763
+ .commit-label-bkg { font-size: ${options2.commitLabelFontSize}; fill: ${options2.commitLabelBackground}; opacity: 0.5; }
1764
+ .tag-label { font-size: ${options2.tagLabelFontSize}; fill: ${options2.tagLabelColor};}
1765
+ .tag-label-bkg { fill: ${options2.tagLabelBackground}; stroke: ${options2.tagLabelBorder}; }
1766
+ .tag-hole { fill: ${options2.textColor}; }
1767
+
1768
+ .commit-merge {
1769
+ stroke: ${options2.primaryColor};
1770
+ fill: ${options2.primaryColor};
1771
+ }
1772
+ .commit-reverse {
1773
+ stroke: ${options2.primaryColor};
1774
+ fill: ${options2.primaryColor};
1775
+ stroke-width: 3;
1776
+ }
1777
+ .commit-highlight-outer {
1778
+ }
1779
+ .commit-highlight-inner {
1780
+ stroke: ${options2.primaryColor};
1781
+ fill: ${options2.primaryColor};
1782
+ }
1783
+
1784
+ .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
1785
+ .gitTitleText {
1786
+ text-anchor: middle;
1787
+ font-size: 18px;
1788
+ fill: ${options2.textColor};
1789
+ }
1790
+ `;
1791
+ const gitGraphStyles = getStyles;
1792
+ const diagram = {
1793
+ parser: gitGraphParser,
1794
+ db: gitGraphDb,
1795
+ renderer: gitGraphRenderer,
1796
+ styles: gitGraphStyles
1797
+ };
1798
+ export {
1799
+ diagram
1800
+ };