@orangelogic/design-system 2.162.0 → 2.164.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/library/chunks/{AxisLabelRadial.lE2gKah-.js → AxisLabelRadial.fe7zjixN.js} +1 -1
  2. package/library/chunks/{BaseColumnSeries.B57B3iHh.js → BaseColumnSeries.8Mpxz385.js} +1 -1
  3. package/library/chunks/{CandlestickSeries.CmmI426l.js → CandlestickSeries.DuadaOTa.js} +19 -19
  4. package/library/chunks/{Circle.DAhHYhrc.js → Circle.6LomW0ej.js} +1 -1
  5. package/library/chunks/{ColumnSeries.DBgXk-b4.js → ColumnSeries.D1NLfRh5.js} +2 -2
  6. package/library/chunks/{EditableAxisLabel.C6H99qiS.js → EditableAxisLabel.Bi9vxLDV.js} +2 -2
  7. package/library/chunks/{EditableLabel.B7HB7Cu4.js → EditableLabel.CMR3O9E-.js} +1 -1
  8. package/library/chunks/{Gradient.DHhBnhFd.js → Gradient.CquE8_a4.js} +1 -1
  9. package/library/chunks/{LinearGradient.CGx00O8B.js → LinearGradient.CVN1VJp-.js} +9 -9
  10. package/library/chunks/{Picture.DYltTVSo.js → Picture.BYTZ_I8g.js} +1 -1
  11. package/library/chunks/{Polygon.BCrxKagx.js → Polygon.CU2sMltE.js} +1 -1
  12. package/library/chunks/{ProgressPie.CXksPJFv.js → ProgressPie.Dd74dbmm.js} +6 -6
  13. package/library/chunks/{RadialLabel.BYH69FGU.js → RadialLabel.7ka6ND-t.js} +1 -1
  14. package/library/chunks/{Scrollbar.DEv50o4R.js → Scrollbar.DqUnZReo.js} +1 -1
  15. package/library/chunks/Slice.BVI8rfHI.js +34 -0
  16. package/library/chunks/{Slider.BX8g2iGv.js → Slider.DtjYaJOw.js} +1 -1
  17. package/library/chunks/{SpriteResizer.CfIBMSp3.js → SpriteResizer.Ci2Wt2YJ.js} +11 -11
  18. package/library/chunks/{Triangle.CNY8-QfL.js → Triangle.C75emy3D.js} +1 -1
  19. package/library/chunks/{ZoomTools.6jZrzA7x.js → ZoomTools.CA9mtHI8.js} +2 -2
  20. package/library/chunks/_arrayEach.DU4X1H_a.js +8 -0
  21. package/library/chunks/_baseClone.BHNjfIdS.js +215 -0
  22. package/library/chunks/_baseEach.DQk0As2f.js +32 -0
  23. package/library/chunks/{_baseIteratee.BdKyHJ5i.js → _baseIteratee.sC2wLi2m.js} +3 -2
  24. package/library/chunks/{_baseUniq.je-HWbb3.js → _baseUniq.lwMgmtt2.js} +16 -15
  25. package/library/chunks/_baseXor.DixEm6JQ.js +35 -0
  26. package/library/chunks/_flatRest.D3ZVApI5.js +30 -0
  27. package/library/chunks/abnfDiagram-VRR7QNED.DKqYa5p7.js +89 -0
  28. package/library/chunks/{am-chart.CqdmTS0P.js → am-chart.Cr-vMjcY.js} +1577 -1727
  29. package/library/chunks/{animation.S74lUDDc.js → animation.BD-1xugN.js} +1 -1
  30. package/library/chunks/arc.xqNd6x9S.js +84 -0
  31. package/library/chunks/architectureDiagram-ZJ3FMSHR.CBIOk9Kp.js +4757 -0
  32. package/library/chunks/{asset-link-format.DLAzKfhk.js → asset-link-format.0q_MQOYh.js} +691 -635
  33. package/library/chunks/asset-link-format.ClaYu_v8.js +7 -0
  34. package/library/chunks/blockDiagram-677ZJIJ3.CeQxLPwj.js +2428 -0
  35. package/library/chunks/{button.8syoJXYs.js → button.DGyqdBou.js} +2 -2
  36. package/library/chunks/c4Diagram-LMCZKHZV.B73xdpNh.js +1580 -0
  37. package/library/chunks/{capitalize.BTYI3NfM.js → capitalize.CIBKBL10.js} +1 -1
  38. package/library/chunks/{cardinal.BCA_LB0u.js → cardinal.BXTAeOLk.js} +1 -0
  39. package/library/chunks/cardinalClosed.Mdce1x5M.js +59 -0
  40. package/library/chunks/channel.s_XjcUYI.js +5 -0
  41. package/library/chunks/chunk-2Q5K7J3B.Dy1Z-bMH.js +15 -0
  42. package/library/chunks/chunk-32BRIVSS.BbIrVi3j.js +71 -0
  43. package/library/chunks/chunk-5VM5RSS4.D0-lddDM.js +19 -0
  44. package/library/chunks/chunk-EX3LRPZG.L693y8d4.js +1412 -0
  45. package/library/chunks/chunk-JWPE2WC7.BV0i4LDu.js +8 -0
  46. package/library/chunks/chunk-MOJQB5TN.BZstBMYC.js +664 -0
  47. package/library/chunks/chunk-RYQCIY6F.BMsuG7ya.js +314 -0
  48. package/library/chunks/chunk-V7JOEXUC.DcJlyQO0.js +1537 -0
  49. package/library/chunks/chunk-VR4S4FIN.BpryBs7q.js +19 -0
  50. package/library/chunks/chunk-XXDRQBXY.CSOjab1V.js +11 -0
  51. package/library/chunks/classDiagram-OUVF2IWQ.Dvz7CNwe.js +18 -0
  52. package/library/chunks/classDiagram-v2-EOCWNBFH.Dvz7CNwe.js +18 -0
  53. package/library/chunks/cloneDeep.B-5z5SI3.js +51 -0
  54. package/library/chunks/{color-swatch-group.CLv1LSZy.js → color-swatch-group.ChP9amU9.js} +2576 -2723
  55. package/library/chunks/{color-swatch.DsWP2fd-.js → color-swatch.QsHoy_K1.js} +1 -1
  56. package/library/chunks/{colorPicker.GYgA76kc.js → colorPicker.Cg6Zxf8f.js} +5 -5
  57. package/library/chunks/{confirm-popover.C-eHPJaU.js → confirm-popover.D8mdy6KG.js} +2 -2
  58. package/library/chunks/constant.BQ4UJ-kW.js +12 -0
  59. package/library/chunks/cose-bilkent-JH36ORCC.cfzS2XsK.js +2612 -0
  60. package/library/chunks/cynefin-VYW2F7L2.c7H5z9nQ.js +23790 -0
  61. package/library/chunks/cynefinDiagram-TSTJHNR4.C8SgNXWI.js +299 -0
  62. package/library/chunks/cytoscape.esm.Cbrwqewp.js +18786 -0
  63. package/library/chunks/dagre-VKFMJZFB.D5B1cAri.js +343 -0
  64. package/library/chunks/debounce.Bv1rtE8D.js +55 -0
  65. package/library/chunks/defaultLocale.CPy_WVtp.js +171 -0
  66. package/library/chunks/descending.AD5n-tFs.js +10 -0
  67. package/library/chunks/diagram-FQU43EPY.DJukDcLl.js +466 -0
  68. package/library/chunks/diagram-G47NLZAW.BBOvcbcR.js +316 -0
  69. package/library/chunks/diagram-NH7WQ7WH.DOpRwmC2.js +142 -0
  70. package/library/chunks/diagram-OA4YK3LP.Dm5WJs91.js +350 -0
  71. package/library/chunks/diagram-WEI45ONY.COuzdmSR.js +217 -0
  72. package/library/chunks/{dialog.Bzf4-IgH.js → dialog.05FgdLBZ.js} +2 -2
  73. package/library/chunks/{document-viewer.CGyOG1yw.js → document-viewer.Cng07M-1.js} +7 -7
  74. package/library/chunks/{dot-pagination.BdZc-K0r.js → dot-pagination.Pg9O0nIh.js} +1 -1
  75. package/library/chunks/ebnfDiagram-CCIWWBDH.Dz-QBH6Y.js +111 -0
  76. package/library/chunks/erDiagram-Q63AITRT.sSw_w-2B.js +913 -0
  77. package/library/chunks/{exporting.DQhKH1BX.js → exporting.Djsoh75g.js} +11 -11
  78. package/library/chunks/flow.aZRVH3p1.js +1304 -0
  79. package/library/chunks/flowDiagram-23GEKE2U.CMMbuUHf.js +1642 -0
  80. package/library/chunks/{folder-select.BKAuh4GE.js → folder-select.Dw1ZKZAq.js} +160 -140
  81. package/library/chunks/{gantt.tu-w6fQ5.js → gantt.Bv6_3H9y.js} +22 -22
  82. package/library/chunks/ganttDiagram-NO4QXBWP.DZdwd0O4.js +2715 -0
  83. package/library/chunks/gitGraphDiagram-IHSO6WYX.F6mwS3uS.js +818 -0
  84. package/library/chunks/graph.XHMI5hta.js +653 -0
  85. package/library/chunks/{header.e1FLwywx.js → header.DDI0MfJA.js} +1 -1
  86. package/library/chunks/{hierarchy.CTnBzzmQ.js → hierarchy.C4LxmFxx.js} +836 -904
  87. package/library/chunks/{hub-connection.CA_wS_wh.js → hub-connection.BtevPWYb.js} +1 -1
  88. package/library/chunks/{icon-button.DbVIFgu7.js → icon-button.BwmMJ0bI.js} +1 -1
  89. package/library/chunks/{icon.mxNZ85k0.js → icon.D5iM9wXS.js} +1 -1
  90. package/library/chunks/{iframe.DcHjOcLG.js → iframe.Cc-xZIm_.js} +1 -1
  91. package/library/chunks/{image.5mhGPvMN.js → image.BgODrAzQ.js} +2 -2
  92. package/library/chunks/{image.QVlPFadX.js → image.Y5c_hFx8.js} +1 -1
  93. package/library/chunks/{index.BVDhdCk-.js → index.2SOQHTpX.js} +23 -23
  94. package/library/chunks/index.BDn1QW8J.js +167 -0
  95. package/library/chunks/{index.DcjJFMlq.js → index.CrhRU5m8.js} +284 -273
  96. package/library/chunks/index.thKLME8E.js +77 -0
  97. package/library/chunks/infoDiagram-FWYZ7A6U.BnktKL7i.js +24 -0
  98. package/library/chunks/init.DjUOC4st.js +16 -0
  99. package/library/chunks/{input.BcyLZUmv.js → input.DOorVTYZ.js} +2 -2
  100. package/library/chunks/isArrayLikeObject.D7afXo-f.js +86 -0
  101. package/library/chunks/isEmpty.DtTJTUcf.js +27 -0
  102. package/library/chunks/ishikawaDiagram-FXEZZL3T.CFp-9Kes.js +621 -0
  103. package/library/chunks/journeyDiagram-5HDEW3XC.BxO1aPu_.js +837 -0
  104. package/library/chunks/{json.D7WeFaJm.js → json.Dz5QFEi5.js} +3 -3
  105. package/library/chunks/kanban-definition-HUTT4EX6.Bk8vmLFK.js +724 -0
  106. package/library/chunks/katex.DoRnZ_sp.js +11682 -0
  107. package/library/chunks/layout.DZcMFKol.js +1446 -0
  108. package/library/chunks/line.DP-iSN_J.js +157 -0
  109. package/library/chunks/linear.TNHhsH1m.js +215 -0
  110. package/library/chunks/{map.BjtxEozr.js → map.CBcV0WVq.js} +100 -105
  111. package/library/chunks/map.DJnohTgl.js +18 -0
  112. package/library/chunks/markdown.I1AJG75v.js +4180 -0
  113. package/library/chunks/math.D2lKC7md.js +22 -0
  114. package/library/chunks/mermaid.core.Dspbw7Ig.js +13598 -0
  115. package/library/chunks/mindmap-definition-LN4V7U3C.DuCBBYwE.js +808 -0
  116. package/library/chunks/{number.CtCaI0T_.js → number.Cx2ncfJJ.js} +2 -2
  117. package/library/chunks/{option.qN3aaqVI.js → option.DyNR1vzy.js} +2 -2
  118. package/library/chunks/ordinal.bqVaUip-.js +61 -0
  119. package/library/chunks/{pagination.Cupa46TN.js → pagination.qFmncShC.js} +5 -5
  120. package/library/chunks/pegDiagram-2B236MQR.DQrkEdJr.js +97 -0
  121. package/library/chunks/{percent.D_CkaRGb.js → percent.D8mkiJ2G.js} +17 -17
  122. package/library/chunks/pieDiagram-ENE6RG2P.B6nPW8Pj.js +212 -0
  123. package/library/chunks/position-picker.DjnhxIKF.js +4 -0
  124. package/library/chunks/quadrantDiagram-ABIIQ3AL.BFy9moxz.js +1026 -0
  125. package/library/chunks/{radar.BMKaNvJH.js → radar.B3p5bRix.js} +78 -129
  126. package/library/chunks/railroadDiagram-RFXS5EU6.CSao8YZX.js +79 -0
  127. package/library/chunks/range.DdOGybNB.js +9 -0
  128. package/library/chunks/requirementDiagram-TGXJPOKE.CjpliZnF.js +882 -0
  129. package/library/chunks/sankey.BR94A-8L.js +294 -0
  130. package/library/chunks/sankeyDiagram-HTMAVEWB.D8aAxVGe.js +564 -0
  131. package/library/chunks/select.C6_sM3Pr.js +7 -0
  132. package/library/chunks/sequenceDiagram-DBY2YBRQ.Cu9MV3h-.js +2891 -0
  133. package/library/chunks/sizeCapture-X5ZJPWSS.BDByEFcW.js +46 -0
  134. package/library/chunks/{sliceGrouper.C-t5ZRrz.js → sliceGrouper.CcRqQhZX.js} +1 -1
  135. package/library/chunks/stateDiagram-2N3HPSRC.DvrAW9Ck.js +267 -0
  136. package/library/chunks/stateDiagram-v2-6OUMAXLB.CFfuaFM1.js +18 -0
  137. package/library/chunks/step.almIqwJ6.js +51 -0
  138. package/library/chunks/{stock.vF_pji1F.js → stock.CQbn6zW4.js} +9 -9
  139. package/library/chunks/swimlanes-5IMT3BWC.AtMD47q7.js +5332 -0
  140. package/library/chunks/swimlanesDiagram-G3AALYLV.26A1eX7s.js +15 -0
  141. package/library/chunks/{tab-group.kSg5_10g.js → tab-group.1Y71_aN8.js} +3 -3
  142. package/library/chunks/{time.DWfbnPnM.js → time.DYWuX2id.js} +1 -1
  143. package/library/chunks/timeline-definition-FHXFAJF6.CYSh6xl5.js +1058 -0
  144. package/library/chunks/{timeline.gWu0up6r.js → timeline.Czz_uBEd.js} +33 -32
  145. package/library/chunks/toNumber.MuDz8DgU.js +31 -0
  146. package/library/chunks/{toString.Dcbz5jVT.js → toString.B1zKIiZc.js} +1 -1
  147. package/library/chunks/{toast.TDU3wVhq.js → toast.CXEAfCvN.js} +1 -1
  148. package/library/chunks/transformation.8uLv6uwG.js +264 -0
  149. package/library/chunks/{tree.C2dPd6gt.js → tree.vn5sHbdt.js} +123 -117
  150. package/library/chunks/value.BXEGBVFV.js +44 -0
  151. package/library/chunks/{venn.BVBe-JXs.js → venn.B5Jl-c4i.js} +2 -2
  152. package/library/chunks/vennDiagram-L72KCM5P.CSk1WWlu.js +1581 -0
  153. package/library/chunks/wardleyDiagram-EHGQE667.C7UzXYG7.js +675 -0
  154. package/library/chunks/{watch.DOt4Mabe.js → watch.DJF5K-8U.js} +27 -27
  155. package/library/chunks/{wc.DTNpfIc1.js → wc.B2THb2Kk.js} +18 -18
  156. package/library/chunks/xy.BO6U5QrZ.js +294 -0
  157. package/library/chunks/xychartDiagram-FW5EYKEG.idiZWvYS.js +1383 -0
  158. package/library/components/alert.js +2 -2
  159. package/library/components/am-chart.js +3 -3
  160. package/library/components/animated-image.js +2 -2
  161. package/library/components/animation.js +2 -2
  162. package/library/components/array-line-clamp.js +1 -1
  163. package/library/components/asset-link-format.js +8 -7
  164. package/library/components/atoms.js +29 -29
  165. package/library/components/audio.js +3 -3
  166. package/library/components/avatar.js +2 -2
  167. package/library/components/border-input-group.js +1 -1
  168. package/library/components/breadcrumb-item.js +1 -1
  169. package/library/components/breadcrumb.js +1 -1
  170. package/library/components/button.js +3 -3
  171. package/library/components/checkbox.js +195 -18
  172. package/library/components/color-picker.js +4 -4
  173. package/library/components/color-swatch-group.js +5 -5
  174. package/library/components/color-swatch.js +2 -2
  175. package/library/components/confirm-popover.js +3 -3
  176. package/library/components/copy-button.js +2 -2
  177. package/library/components/corner-position-input-group.js +2 -2
  178. package/library/components/cropper.js +4 -4
  179. package/library/components/date-calendar.js +1 -1
  180. package/library/components/details.js +2 -2
  181. package/library/components/dialog.js +3 -3
  182. package/library/components/diff.js +1 -1
  183. package/library/components/divider.js +1 -1
  184. package/library/components/document-viewer.js +3 -3
  185. package/library/components/dot-pagination.js +2 -2
  186. package/library/components/drawer.js +3 -3
  187. package/library/components/dropdown.js +2 -2
  188. package/library/components/dynamic-select.js +6 -6
  189. package/library/components/e-chart.js +1 -1
  190. package/library/components/element-clamp.js +2 -2
  191. package/library/components/file-on-demand.js +350 -374
  192. package/library/components/folder-select.js +5 -5
  193. package/library/components/format-time.js +2 -2
  194. package/library/components/grid-item.js +1 -1
  195. package/library/components/header.js +2 -2
  196. package/library/components/hub-connection.js +2 -2
  197. package/library/components/icon-button.js +2 -2
  198. package/library/components/icon.js +2 -2
  199. package/library/components/iframe.js +2 -2
  200. package/library/components/image-comparer.js +2 -2
  201. package/library/components/image.js +3 -3
  202. package/library/components/include.js +1 -1
  203. package/library/components/input.js +3 -3
  204. package/library/components/line-clamp.js +1 -1
  205. package/library/components/markdown.js +11 -2704
  206. package/library/components/masonry.js +76 -73
  207. package/library/components/menu-item.js +2 -2
  208. package/library/components/molecules.js +3 -3
  209. package/library/components/mutation-observer.js +1 -1
  210. package/library/components/option.js +3 -3
  211. package/library/components/organisms.js +2 -2
  212. package/library/components/padding-input-group.js +1 -1
  213. package/library/components/pagination.js +6 -6
  214. package/library/components/position-picker.js +25 -25
  215. package/library/components/qr-code.js +1 -1
  216. package/library/components/radio-button.js +1 -1
  217. package/library/components/radio-card.js +1 -1
  218. package/library/components/radio-group.js +1 -1
  219. package/library/components/radio.js +2 -2
  220. package/library/components/range.js +1 -1
  221. package/library/components/rating.js +2 -2
  222. package/library/components/resize-observer.js +1 -1
  223. package/library/components/select.js +3 -3
  224. package/library/components/shadow-input-group.js +1 -1
  225. package/library/components/share-option-list.js +2 -2
  226. package/library/components/sidebar.js +3 -3
  227. package/library/components/size-input-group.js +3 -3
  228. package/library/components/split-panel.js +1 -1
  229. package/library/components/step.js +1 -1
  230. package/library/components/stepper-wizard.js +1 -1
  231. package/library/components/stepper.js +1 -1
  232. package/library/components/switch.js +1 -1
  233. package/library/components/tab-group.js +4 -4
  234. package/library/components/tab-panel.js +1 -1
  235. package/library/components/tab.js +2 -2
  236. package/library/components/tag.js +1 -1
  237. package/library/components/textarea.js +1 -1
  238. package/library/components/timecode.js +1 -1
  239. package/library/components/tooltip.js +1 -1
  240. package/library/components/tree-item.js +4 -4
  241. package/library/components/tree.js +2 -2
  242. package/library/components/typeface.js +2 -2
  243. package/library/components/types.js +122327 -120686
  244. package/library/components/video.js +2 -2
  245. package/library/package.json +2 -1
  246. package/library/packages/atoms/src/components/markdown/markdown.d.ts +41 -1
  247. package/library/packages/atoms/src/components/markdown/parser.d.ts +18 -3
  248. package/library/packages/atoms/src/components/markdown/styles.d.ts +17 -0
  249. package/library/packages/atoms/src/components/tree/tree.d.ts +7 -1
  250. package/library/packages/atoms/src/components/tree-item/tree-item.d.ts +11 -1
  251. package/library/packages/events/src/cx-folder-select-loading-change.d.ts +8 -0
  252. package/library/packages/events/src/events.d.ts +1 -0
  253. package/library/packages/hybrid/table-core/src/table/styles/table-frozen.styles.d.ts +8 -0
  254. package/library/packages/hybrid/table-core/src/table/table.d.ts +9 -1
  255. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/FrozenColumns/FrozenColumns.d.ts +14 -1
  256. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/ResizeColumns/ResizeColumns.d.ts +18 -1
  257. package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +7 -0
  258. package/library/packages/molecules/src/folder-select/folder-select.d.ts +7 -0
  259. package/library/packages/molecules/src/index.d.ts +1 -0
  260. package/library/packages/molecules/src/markdown-viewer/markdown-viewer.d.ts +124 -0
  261. package/library/packages/molecules/src/markdown-viewer/markdown-viewer.styles.d.ts +6 -0
  262. package/library/packages/molecules/src/masonry/masonry.d.ts +5 -0
  263. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +9 -0
  264. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +30 -0
  265. package/library/packages/tools/src/tiptap/utils/md/editor-controller.d.ts +57 -0
  266. package/library/packages/tools/src/tiptap/utils/md/from-markdown.d.ts +11 -0
  267. package/library/packages/tools/src/tiptap/utils/md/input-rules.d.ts +15 -0
  268. package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +13 -0
  269. package/library/packages/tools/src/tiptap/utils/md/to-markdown.d.ts +14 -0
  270. package/library/packages/types/src/asset-link-format.d.ts +19 -0
  271. package/library/packages/types/src/markdown-viewer.d.ts +12 -0
  272. package/library/packages/types/src/tree-item.d.ts +12 -0
  273. package/library/react-web-component.d.ts +86 -8
  274. package/library/utils.js +64 -65
  275. package/package.json +2 -1
  276. package/library/chunks/Slice.C5lVu2g_.js +0 -120
  277. package/library/chunks/_baseXor.VohG8cOH.js +0 -116
  278. package/library/chunks/asset-link-format.QzzboHHE.js +0 -6
  279. package/library/chunks/checkbox.3i2j3PHc.js +0 -198
  280. package/library/chunks/content-builder.BU8X7I6V.js +0 -60
  281. package/library/chunks/debounce.C_J-9zJi.js +0 -82
  282. package/library/chunks/flow.hz0UDjCb.js +0 -1594
  283. package/library/chunks/index.DU0XUO4k.js +0 -176
  284. package/library/chunks/transformation.D1alV_s4.js +0 -189
  285. package/library/chunks/xy.BNgyrwGD.js +0 -333
@@ -0,0 +1,818 @@
1
+ import { I as le } from "./chunk-2Q5K7J3B.Dy1Z-bMH.js";
2
+ import { p as he } from "./chunk-JWPE2WC7.BV0i4LDu.js";
3
+ import { _ as h, o as $e, n as fe, s as ge, g as ue, a as ye, b as xe, y as J, l as w, c as q, x as me, z as pe, p as be, j as B, A as we, B as ke, D as ve } from "./mermaid.core.Dspbw7Ig.js";
4
+ import { p as Ce } from "./cynefin-VYW2F7L2.c7H5z9nQ.js";
5
+ import "./index.CrhRU5m8.js";
6
+ import "./transform.BuqENXeT.js";
7
+ import { s as Ee } from "./select.C6_sM3Pr.js";
8
+ var m = {
9
+ NORMAL: 0,
10
+ REVERSE: 1,
11
+ HIGHLIGHT: 2,
12
+ MERGE: 3,
13
+ CHERRY_PICK: 4
14
+ }, Be = ke.gitGraph, S = /* @__PURE__ */ h(() => we({
15
+ ...Be,
16
+ ...J().gitGraph
17
+ }), "getConfig"), d = new le(() => {
18
+ const e = S(), r = e.mainBranchName, t = e.mainBranchOrder;
19
+ return {
20
+ mainBranchName: r,
21
+ commits: /* @__PURE__ */ new Map(),
22
+ head: null,
23
+ branchConfig: /* @__PURE__ */ new Map([[r, { name: r, order: t }]]),
24
+ branches: /* @__PURE__ */ new Map([[r, null]]),
25
+ currBranch: r,
26
+ direction: "LR",
27
+ seq: 0,
28
+ options: {}
29
+ };
30
+ });
31
+ function Y() {
32
+ return ve({ length: 7 });
33
+ }
34
+ h(Y, "getID");
35
+ function te(e, r) {
36
+ const t = /* @__PURE__ */ Object.create(null);
37
+ return e.reduce((s, o) => {
38
+ const i = r(o);
39
+ return t[i] || (t[i] = !0, s.push(o)), s;
40
+ }, []);
41
+ }
42
+ h(te, "uniqBy");
43
+ var Te = /* @__PURE__ */ h(function(e) {
44
+ d.records.direction = e;
45
+ }, "setDirection"), Le = /* @__PURE__ */ h(function(e) {
46
+ w.debug("options str", e), e = e?.trim(), e = e || "{}";
47
+ try {
48
+ d.records.options = JSON.parse(e);
49
+ } catch (r) {
50
+ w.error("error while parsing gitGraph options", r.message);
51
+ }
52
+ }, "setOptions"), Me = /* @__PURE__ */ h(function() {
53
+ return d.records.options;
54
+ }, "getOptions"), Re = /* @__PURE__ */ h(function(e) {
55
+ let r = e.msg, t = e.id;
56
+ const s = e.type;
57
+ let o = e.tags;
58
+ w.info("commit", r, t, s, o), w.debug("Entering commit:", r, t, s, o);
59
+ const i = S();
60
+ t = B.sanitizeText(t, i), r = B.sanitizeText(r, i), o = o?.map((a) => B.sanitizeText(a, i));
61
+ const n = {
62
+ id: t || d.records.seq + "-" + Y(),
63
+ message: r,
64
+ seq: d.records.seq++,
65
+ type: s ?? m.NORMAL,
66
+ tags: o ?? [],
67
+ parents: d.records.head == null ? [] : [d.records.head.id],
68
+ branch: d.records.currBranch
69
+ };
70
+ d.records.head = n, w.info("main branch", i.mainBranchName), d.records.commits.has(n.id) && w.warn(`Commit ID ${n.id} already exists`), d.records.commits.set(n.id, n), d.records.branches.set(d.records.currBranch, n.id), w.debug("in pushCommit " + n.id);
71
+ }, "commit"), Ie = /* @__PURE__ */ h(function(e) {
72
+ let r = e.name;
73
+ const t = e.order;
74
+ if (r = B.sanitizeText(r, S()), d.records.branches.has(r))
75
+ throw new Error(
76
+ `Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`
77
+ );
78
+ d.records.branches.set(r, d.records.head != null ? d.records.head.id : null), d.records.branchConfig.set(r, { name: r, order: t }), ae(r), w.debug("in createBranch");
79
+ }, "branch"), Oe = /* @__PURE__ */ h((e) => {
80
+ let r = e.branch, t = e.id;
81
+ const s = e.type, o = e.tags, i = S();
82
+ r = B.sanitizeText(r, i), t && (t = B.sanitizeText(t, i));
83
+ const n = d.records.branches.get(d.records.currBranch), a = d.records.branches.get(r), l = n ? d.records.commits.get(n) : void 0, f = a ? d.records.commits.get(a) : void 0;
84
+ if (l && f && l.branch === r)
85
+ throw new Error(`Cannot merge branch '${r}' into itself.`);
86
+ if (d.records.currBranch === r) {
87
+ const c = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
88
+ throw c.hash = {
89
+ text: `merge ${r}`,
90
+ token: `merge ${r}`,
91
+ expected: ["branch abc"]
92
+ }, c;
93
+ }
94
+ if (l === void 0 || !l) {
95
+ const c = new Error(
96
+ `Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`
97
+ );
98
+ throw c.hash = {
99
+ text: `merge ${r}`,
100
+ token: `merge ${r}`,
101
+ expected: ["commit"]
102
+ }, c;
103
+ }
104
+ if (!d.records.branches.has(r)) {
105
+ const c = new Error(
106
+ 'Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist"
107
+ );
108
+ throw c.hash = {
109
+ text: `merge ${r}`,
110
+ token: `merge ${r}`,
111
+ expected: [`branch ${r}`]
112
+ }, c;
113
+ }
114
+ if (f === void 0 || !f) {
115
+ const c = new Error(
116
+ 'Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits"
117
+ );
118
+ throw c.hash = {
119
+ text: `merge ${r}`,
120
+ token: `merge ${r}`,
121
+ expected: ['"commit"']
122
+ }, c;
123
+ }
124
+ if (l === f) {
125
+ const c = new Error('Incorrect usage of "merge". Both branches have same head');
126
+ throw c.hash = {
127
+ text: `merge ${r}`,
128
+ token: `merge ${r}`,
129
+ expected: ["branch abc"]
130
+ }, c;
131
+ }
132
+ if (t && d.records.commits.has(t)) {
133
+ const c = new Error(
134
+ 'Incorrect usage of "merge". Commit with id:' + t + " already exists, use different custom id"
135
+ );
136
+ throw c.hash = {
137
+ text: `merge ${r} ${t} ${s} ${o?.join(" ")}`,
138
+ token: `merge ${r} ${t} ${s} ${o?.join(" ")}`,
139
+ expected: [
140
+ `merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`
141
+ ]
142
+ }, c;
143
+ }
144
+ const g = a || "", $ = {
145
+ id: t || `${d.records.seq}-${Y()}`,
146
+ message: `merged branch ${r} into ${d.records.currBranch}`,
147
+ seq: d.records.seq++,
148
+ parents: d.records.head == null ? [] : [d.records.head.id, g],
149
+ branch: d.records.currBranch,
150
+ type: m.MERGE,
151
+ customType: s,
152
+ customId: !!t,
153
+ tags: o ?? []
154
+ };
155
+ d.records.head = $, d.records.commits.set($.id, $), d.records.branches.set(d.records.currBranch, $.id), w.debug(d.records.branches), w.debug("in mergeBranch");
156
+ }, "merge"), _e = /* @__PURE__ */ h(function(e) {
157
+ let r = e.id, t = e.targetId, s = e.tags, o = e.parent;
158
+ w.debug("Entering cherryPick:", r, t, s);
159
+ const i = S();
160
+ if (r = B.sanitizeText(r, i), t = B.sanitizeText(t, i), s = s?.map((l) => B.sanitizeText(l, i)), o = B.sanitizeText(o, i), !r || !d.records.commits.has(r)) {
161
+ const l = new Error(
162
+ 'Incorrect usage of "cherryPick". Source commit id should exist and provided'
163
+ );
164
+ throw l.hash = {
165
+ text: `cherryPick ${r} ${t}`,
166
+ token: `cherryPick ${r} ${t}`,
167
+ expected: ["cherry-pick abc"]
168
+ }, l;
169
+ }
170
+ const n = d.records.commits.get(r);
171
+ if (n === void 0 || !n)
172
+ throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
173
+ if (o && !(Array.isArray(n.parents) && n.parents.includes(o)))
174
+ throw new Error(
175
+ "Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
176
+ );
177
+ const a = n.branch;
178
+ if (n.type === m.MERGE && !o)
179
+ throw new Error(
180
+ "Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
181
+ );
182
+ if (!t || !d.records.commits.has(t)) {
183
+ if (a === d.records.currBranch) {
184
+ const $ = new Error(
185
+ 'Incorrect usage of "cherryPick". Source commit is already on current branch'
186
+ );
187
+ throw $.hash = {
188
+ text: `cherryPick ${r} ${t}`,
189
+ token: `cherryPick ${r} ${t}`,
190
+ expected: ["cherry-pick abc"]
191
+ }, $;
192
+ }
193
+ const l = d.records.branches.get(d.records.currBranch);
194
+ if (l === void 0 || !l) {
195
+ const $ = new Error(
196
+ `Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`
197
+ );
198
+ throw $.hash = {
199
+ text: `cherryPick ${r} ${t}`,
200
+ token: `cherryPick ${r} ${t}`,
201
+ expected: ["cherry-pick abc"]
202
+ }, $;
203
+ }
204
+ const f = d.records.commits.get(l);
205
+ if (f === void 0 || !f) {
206
+ const $ = new Error(
207
+ `Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`
208
+ );
209
+ throw $.hash = {
210
+ text: `cherryPick ${r} ${t}`,
211
+ token: `cherryPick ${r} ${t}`,
212
+ expected: ["cherry-pick abc"]
213
+ }, $;
214
+ }
215
+ const g = {
216
+ id: d.records.seq + "-" + Y(),
217
+ message: `cherry-picked ${n?.message} into ${d.records.currBranch}`,
218
+ seq: d.records.seq++,
219
+ parents: d.records.head == null ? [] : [d.records.head.id, n.id],
220
+ branch: d.records.currBranch,
221
+ type: m.CHERRY_PICK,
222
+ tags: s ? s.filter(Boolean) : [
223
+ `cherry-pick:${n.id}${n.type === m.MERGE ? `|parent:${o}` : ""}`
224
+ ]
225
+ };
226
+ d.records.head = g, d.records.commits.set(g.id, g), d.records.branches.set(d.records.currBranch, g.id), w.debug(d.records.branches), w.debug("in cherryPick");
227
+ }
228
+ }, "cherryPick"), ae = /* @__PURE__ */ h(function(e) {
229
+ if (e = B.sanitizeText(e, S()), d.records.branches.has(e)) {
230
+ d.records.currBranch = e;
231
+ const r = d.records.branches.get(d.records.currBranch);
232
+ r === void 0 || !r ? d.records.head = null : d.records.head = d.records.commits.get(r) ?? null;
233
+ } else {
234
+ const r = new Error(
235
+ `Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`
236
+ );
237
+ throw r.hash = {
238
+ text: `checkout ${e}`,
239
+ token: `checkout ${e}`,
240
+ expected: [`branch ${e}`]
241
+ }, r;
242
+ }
243
+ }, "checkout");
244
+ function V(e, r, t) {
245
+ const s = e.indexOf(r);
246
+ s === -1 ? e.push(t) : e.splice(s, 1, t);
247
+ }
248
+ h(V, "upsert");
249
+ function Q(e) {
250
+ const r = e.reduce((o, i) => o.seq > i.seq ? o : i, e[0]);
251
+ let t = "";
252
+ e.forEach(function(o) {
253
+ o === r ? t += " *" : t += " |";
254
+ });
255
+ const s = [t, r.id, r.seq];
256
+ for (const o in d.records.branches)
257
+ d.records.branches.get(o) === r.id && s.push(o);
258
+ if (w.debug(s.join(" ")), r.parents && r.parents.length == 2 && r.parents[0] && r.parents[1]) {
259
+ const o = d.records.commits.get(r.parents[0]);
260
+ V(e, r, o), r.parents[1] && e.push(d.records.commits.get(r.parents[1]));
261
+ } else {
262
+ if (r.parents.length == 0)
263
+ return;
264
+ if (r.parents[0]) {
265
+ const o = d.records.commits.get(r.parents[0]);
266
+ V(e, r, o);
267
+ }
268
+ }
269
+ e = te(e, (o) => o.id), Q(e);
270
+ }
271
+ h(Q, "prettyPrintCommitHistory");
272
+ var Ge = /* @__PURE__ */ h(function() {
273
+ w.debug(d.records.commits);
274
+ const e = ne()[0];
275
+ Q([e]);
276
+ }, "prettyPrint"), He = /* @__PURE__ */ h(function() {
277
+ d.reset(), be();
278
+ }, "clear"), Se = /* @__PURE__ */ h(function() {
279
+ return [...d.records.branchConfig.values()].map((r, t) => r.order !== null && r.order !== void 0 ? r : {
280
+ ...r,
281
+ order: parseFloat(`0.${t}`)
282
+ }).sort((r, t) => (r.order ?? 0) - (t.order ?? 0)).map(({ name: r }) => ({ name: r }));
283
+ }, "getBranchesAsObjArray"), Ae = /* @__PURE__ */ h(function() {
284
+ return d.records.branches;
285
+ }, "getBranches"), De = /* @__PURE__ */ h(function() {
286
+ return d.records.commits;
287
+ }, "getCommits"), ne = /* @__PURE__ */ h(function() {
288
+ const e = [...d.records.commits.values()];
289
+ return e.forEach(function(r) {
290
+ w.debug(r.id);
291
+ }), e.sort((r, t) => r.seq - t.seq), e;
292
+ }, "getCommitsArray"), Pe = /* @__PURE__ */ h(function() {
293
+ return d.records.currBranch;
294
+ }, "getCurrentBranch"), We = /* @__PURE__ */ h(function() {
295
+ return d.records.direction;
296
+ }, "getDirection"), qe = /* @__PURE__ */ h(function() {
297
+ return d.records.head;
298
+ }, "getHead"), se = {
299
+ commitType: m,
300
+ getConfig: S,
301
+ setDirection: Te,
302
+ setOptions: Le,
303
+ getOptions: Me,
304
+ commit: Re,
305
+ branch: Ie,
306
+ merge: Oe,
307
+ cherryPick: _e,
308
+ checkout: ae,
309
+ //reset,
310
+ prettyPrint: Ge,
311
+ clear: He,
312
+ getBranchesAsObjArray: Se,
313
+ getBranches: Ae,
314
+ getCommits: De,
315
+ getCommitsArray: ne,
316
+ getCurrentBranch: Pe,
317
+ getDirection: We,
318
+ getHead: qe,
319
+ setAccTitle: xe,
320
+ getAccTitle: ye,
321
+ getAccDescription: ue,
322
+ setAccDescription: ge,
323
+ setDiagramTitle: fe,
324
+ getDiagramTitle: $e
325
+ }, Ne = /* @__PURE__ */ h((e, r) => {
326
+ he(e, r), e.dir && r.setDirection(e.dir);
327
+ for (const t of e.statements)
328
+ Fe(t, r);
329
+ }, "populate"), Fe = /* @__PURE__ */ h((e, r) => {
330
+ const s = {
331
+ Commit: /* @__PURE__ */ h((o) => r.commit(ze(o)), "Commit"),
332
+ Branch: /* @__PURE__ */ h((o) => r.branch(Ye(o)), "Branch"),
333
+ Merge: /* @__PURE__ */ h((o) => r.merge(je(o)), "Merge"),
334
+ Checkout: /* @__PURE__ */ h((o) => r.checkout(Ue(o)), "Checkout"),
335
+ CherryPicking: /* @__PURE__ */ h((o) => r.cherryPick(Ke(o)), "CherryPicking")
336
+ }[e.$type];
337
+ s ? s(e) : w.error(`Unknown statement type: ${e.$type}`);
338
+ }, "parseStatement"), ze = /* @__PURE__ */ h((e) => ({
339
+ id: e.id,
340
+ msg: e.message ?? "",
341
+ type: e.type !== void 0 ? m[e.type] : m.NORMAL,
342
+ tags: e.tags ?? void 0
343
+ }), "parseCommit"), Ye = /* @__PURE__ */ h((e) => ({
344
+ name: e.name,
345
+ order: e.order ?? 0
346
+ }), "parseBranch"), je = /* @__PURE__ */ h((e) => ({
347
+ branch: e.branch,
348
+ id: e.id ?? "",
349
+ type: e.type !== void 0 ? m[e.type] : void 0,
350
+ tags: e.tags ?? void 0
351
+ }), "parseMerge"), Ue = /* @__PURE__ */ h((e) => e.branch, "parseCheckout"), Ke = /* @__PURE__ */ h((e) => ({
352
+ id: e.id,
353
+ targetId: "",
354
+ tags: e.tags?.length === 0 ? void 0 : e.tags,
355
+ parent: e.parent
356
+ }), "parseCherryPicking"), Ve = {
357
+ parse: /* @__PURE__ */ h(async (e) => {
358
+ const r = await Ce("gitGraph", e);
359
+ w.debug(r), Ne(r, se);
360
+ }, "parse")
361
+ }, O = 10, _ = 40, L = 4, R = 2, G = 8, j = /* @__PURE__ */ new Set(["redux", "redux-dark", "redux-color", "redux-dark-color"]), X = 12, Z = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), Xe = /* @__PURE__ */ new Set(["dark", "redux-dark", "redux-dark-color", "neo-dark"]), H = /* @__PURE__ */ h((e, r, t = !1) => t && e > 0 ? (e - 1) % (r - 1) + 1 : e % r, "calcColorIndex"), C = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), F = 30, P = /* @__PURE__ */ new Map(), z = [], I = 0, y = "LR", Je = /* @__PURE__ */ h(() => {
362
+ C.clear(), E.clear(), P.clear(), I = 0, z = [], y = "LR";
363
+ }, "clear"), oe = /* @__PURE__ */ h((e) => {
364
+ const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
365
+ return (typeof e == "string" ? e.split(/\\n|\n|<br\s*\/?>/gi) : e).forEach((s) => {
366
+ const o = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
367
+ o.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), o.setAttribute("dy", "1em"), o.setAttribute("x", "0"), o.setAttribute("class", "row"), o.textContent = s.trim(), r.appendChild(o);
368
+ }), r;
369
+ }, "drawText"), ce = /* @__PURE__ */ h((e) => {
370
+ let r, t, s;
371
+ return y === "BT" ? (t = /* @__PURE__ */ h((o, i) => o <= i, "comparisonFunc"), s = 1 / 0) : (t = /* @__PURE__ */ h((o, i) => o >= i, "comparisonFunc"), s = 0), e.forEach((o) => {
372
+ const i = y === "TB" || y == "BT" ? E.get(o)?.y : E.get(o)?.x;
373
+ i !== void 0 && t(i, s) && (r = o, s = i);
374
+ }), r;
375
+ }, "findClosestParent"), Qe = /* @__PURE__ */ h((e) => {
376
+ let r = "", t = 1 / 0;
377
+ return e.forEach((s) => {
378
+ const o = E.get(s).y;
379
+ o <= t && (r = s, t = o);
380
+ }), r || void 0;
381
+ }, "findClosestParentBT"), Ze = /* @__PURE__ */ h((e, r, t) => {
382
+ let s = t, o = t;
383
+ const i = [];
384
+ e.forEach((n) => {
385
+ const a = r.get(n);
386
+ if (!a)
387
+ throw new Error(`Commit not found for key ${n}`);
388
+ a.parents.length ? (s = rr(a), o = Math.max(s, o)) : i.push(a), tr(a, s);
389
+ }), s = o, i.forEach((n) => {
390
+ ar(n, s, t);
391
+ }), e.forEach((n) => {
392
+ const a = r.get(n);
393
+ if (a?.parents.length) {
394
+ const l = Qe(a.parents);
395
+ s = E.get(l).y - _, s <= o && (o = s);
396
+ const f = C.get(a.branch).pos, g = s - O;
397
+ E.set(a.id, { x: f, y: g });
398
+ }
399
+ });
400
+ }, "setParallelBTPos"), er = /* @__PURE__ */ h((e) => {
401
+ const r = ce(e.parents.filter((s) => s !== null));
402
+ if (!r)
403
+ throw new Error(`Closest parent not found for commit ${e.id}`);
404
+ const t = E.get(r)?.y;
405
+ if (t === void 0)
406
+ throw new Error(`Closest parent position not found for commit ${e.id}`);
407
+ return t;
408
+ }, "findClosestParentPos"), rr = /* @__PURE__ */ h((e) => er(e) + _, "calculateCommitPosition"), tr = /* @__PURE__ */ h((e, r) => {
409
+ const t = C.get(e.branch);
410
+ if (!t)
411
+ throw new Error(`Branch not found for commit ${e.id}`);
412
+ const s = t.pos, o = r + O;
413
+ return E.set(e.id, { x: s, y: o }), { x: s, y: o };
414
+ }, "setCommitPosition"), ar = /* @__PURE__ */ h((e, r, t) => {
415
+ const s = C.get(e.branch);
416
+ if (!s)
417
+ throw new Error(`Branch not found for commit ${e.id}`);
418
+ const o = r + t, i = s.pos;
419
+ E.set(e.id, { x: i, y: o });
420
+ }, "setRootPosition"), nr = /* @__PURE__ */ h((e, r, t, s, o, i) => {
421
+ const { theme: n } = q(), a = j.has(n ?? ""), l = Z.has(n ?? ""), f = Xe.has(n ?? "");
422
+ if (i === m.HIGHLIGHT)
423
+ e.append("rect").attr("x", t.x - 10 + (a ? 3 : 0)).attr("y", t.y - 10 + (a ? 3 : 0)).attr("width", a ? 14 : 20).attr("height", a ? 14 : 20).attr(
424
+ "class",
425
+ `commit ${r.id} commit-highlight${H(o, G, l)} ${s}-outer`
426
+ ), e.append("rect").attr("x", t.x - 6 + (a ? 2 : 0)).attr("y", t.y - 6 + (a ? 2 : 0)).attr("width", a ? 8 : 12).attr("height", a ? 8 : 12).attr(
427
+ "class",
428
+ `commit ${r.id} commit${H(o, G, l)} ${s}-inner`
429
+ );
430
+ else if (i === m.CHERRY_PICK)
431
+ e.append("circle").attr("cx", t.x).attr("cy", t.y).attr("r", a ? 7 : 10).attr("class", `commit ${r.id} ${s}`), e.append("circle").attr("cx", t.x - 3).attr("cy", t.y + 2).attr("r", a ? 2.5 : 2.75).attr("fill", f ? "#000000" : "#fff").attr("class", `commit ${r.id} ${s}`), e.append("circle").attr("cx", t.x + 3).attr("cy", t.y + 2).attr("r", a ? 2.5 : 2.75).attr("fill", f ? "#000000" : "#fff").attr("class", `commit ${r.id} ${s}`), e.append("line").attr("x1", t.x + 3).attr("y1", t.y + 1).attr("x2", t.x).attr("y2", t.y - 5).attr("stroke", f ? "#000000" : "#fff").attr("class", `commit ${r.id} ${s}`), e.append("line").attr("x1", t.x - 3).attr("y1", t.y + 1).attr("x2", t.x).attr("y2", t.y - 5).attr("stroke", f ? "#000000" : "#fff").attr("class", `commit ${r.id} ${s}`);
432
+ else {
433
+ const g = e.append("circle");
434
+ if (g.attr("cx", t.x), g.attr("cy", t.y), g.attr("r", a ? 7 : 10), g.attr(
435
+ "class",
436
+ `commit ${r.id} commit${H(o, G, l)}`
437
+ ), i === m.MERGE) {
438
+ const $ = e.append("circle");
439
+ $.attr("cx", t.x), $.attr("cy", t.y), $.attr("r", a ? 5 : 6), $.attr(
440
+ "class",
441
+ `commit ${s} ${r.id} commit${H(o, G, l)}`
442
+ );
443
+ }
444
+ if (i === m.REVERSE) {
445
+ const $ = e.append("path"), c = a ? 4 : 5;
446
+ $.attr(
447
+ "d",
448
+ `M ${t.x - c},${t.y - c}L${t.x + c},${t.y + c}M${t.x - c},${t.y + c}L${t.x + c},${t.y - c}`
449
+ ).attr(
450
+ "class",
451
+ `commit ${s} ${r.id} commit${H(o, G, l)}`
452
+ );
453
+ }
454
+ }
455
+ }, "drawCommitBullet"), sr = /* @__PURE__ */ h((e, r, t, s, o) => {
456
+ if (r.type !== m.CHERRY_PICK && (r.customId && r.type === m.MERGE || r.type !== m.MERGE) && o.showCommitLabel) {
457
+ const i = e.append("g"), n = i.insert("rect").attr("class", "commit-label-bkg"), a = i.append("text").attr("x", s).attr("y", t.y + 25).attr("class", "commit-label").text(r.id), l = a.node()?.getBBox();
458
+ if (l && (n.attr("x", t.posWithOffset - l.width / 2 - R).attr("y", t.y + 13.5).attr("width", l.width + 2 * R).attr("height", l.height + 2 * R), y === "TB" || y === "BT" ? (n.attr("x", t.x - (l.width + 4 * L + 5)).attr("y", t.y - 12), a.attr("x", t.x - (l.width + 4 * L)).attr("y", t.y + l.height - 12)) : a.attr("x", t.posWithOffset - l.width / 2), o.rotateCommitLabel))
459
+ if (y === "TB" || y === "BT")
460
+ a.attr(
461
+ "transform",
462
+ "rotate(-45, " + t.x + ", " + t.y + ")"
463
+ ), n.attr(
464
+ "transform",
465
+ "rotate(-45, " + t.x + ", " + t.y + ")"
466
+ );
467
+ else {
468
+ const f = -7.5 - (l.width + 10) / 25 * 9.5, g = 10 + l.width / 25 * 8.5;
469
+ i.attr(
470
+ "transform",
471
+ "translate(" + f + ", " + g + ") rotate(-45, " + s + ", " + t.y + ")"
472
+ );
473
+ }
474
+ }
475
+ }, "drawCommitLabel"), or = /* @__PURE__ */ h((e, r, t, s) => {
476
+ if (r.tags.length > 0) {
477
+ let o = 0, i = 0, n = 0;
478
+ const a = [];
479
+ for (const l of r.tags.reverse()) {
480
+ const f = e.insert("polygon"), g = e.append("circle"), $ = e.append("text").attr("y", t.y - 16 - o).attr("class", "tag-label").text(l), c = $.node()?.getBBox();
481
+ if (!c)
482
+ throw new Error("Tag bbox not found");
483
+ i = Math.max(i, c.width), n = Math.max(n, c.height), $.attr("x", t.posWithOffset - c.width / 2), a.push({
484
+ tag: $,
485
+ hole: g,
486
+ rect: f,
487
+ yOffset: o
488
+ }), o += 20;
489
+ }
490
+ for (const { tag: l, hole: f, rect: g, yOffset: $ } of a) {
491
+ const c = n / 2, x = t.y - 19.2 - $;
492
+ if (g.attr("class", "tag-label-bkg").attr(
493
+ "points",
494
+ `
495
+ ${s - i / 2 - L / 2},${x + R}
496
+ ${s - i / 2 - L / 2},${x - R}
497
+ ${t.posWithOffset - i / 2 - L},${x - c - R}
498
+ ${t.posWithOffset + i / 2 + L},${x - c - R}
499
+ ${t.posWithOffset + i / 2 + L},${x + c + R}
500
+ ${t.posWithOffset - i / 2 - L},${x + c + R}`
501
+ ), f.attr("cy", x).attr("cx", s - i / 2 + L / 2).attr("r", 1.5).attr("class", "tag-hole"), y === "TB" || y === "BT") {
502
+ const u = s + $;
503
+ g.attr("class", "tag-label-bkg").attr(
504
+ "points",
505
+ `
506
+ ${t.x},${u + 2}
507
+ ${t.x},${u - 2}
508
+ ${t.x + O},${u - c - 2}
509
+ ${t.x + O + i + 4},${u - c - 2}
510
+ ${t.x + O + i + 4},${u + c + 2}
511
+ ${t.x + O},${u + c + 2}`
512
+ ).attr("transform", "translate(12,12) rotate(45, " + t.x + "," + s + ")"), f.attr("cx", t.x + L / 2).attr("cy", u).attr("transform", "translate(12,12) rotate(45, " + t.x + "," + s + ")"), l.attr("x", t.x + 5).attr("y", u + 3).attr("transform", "translate(14,14) rotate(45, " + t.x + "," + s + ")");
513
+ }
514
+ }
515
+ }
516
+ }, "drawCommitTags"), cr = /* @__PURE__ */ h((e) => {
517
+ switch (e.customType ?? e.type) {
518
+ case m.NORMAL:
519
+ return "commit-normal";
520
+ case m.REVERSE:
521
+ return "commit-reverse";
522
+ case m.HIGHLIGHT:
523
+ return "commit-highlight";
524
+ case m.MERGE:
525
+ return "commit-merge";
526
+ case m.CHERRY_PICK:
527
+ return "commit-cherry-pick";
528
+ default:
529
+ return "commit-normal";
530
+ }
531
+ }, "getCommitClassType"), ir = /* @__PURE__ */ h((e, r, t, s) => {
532
+ const o = { x: 0, y: 0 };
533
+ if (e.parents.length > 0) {
534
+ const i = ce(e.parents);
535
+ if (i) {
536
+ const n = s.get(i) ?? o;
537
+ return r === "TB" ? n.y + _ : r === "BT" ? (s.get(e.id) ?? o).y - _ : n.x + _;
538
+ }
539
+ } else
540
+ return r === "TB" ? F : r === "BT" ? (s.get(e.id) ?? o).y - _ : 0;
541
+ return 0;
542
+ }, "calculatePosition"), dr = /* @__PURE__ */ h((e, r, t) => {
543
+ const s = y === "BT" && t ? r : r + O, o = C.get(e.branch)?.pos, i = y === "TB" || y === "BT" ? C.get(e.branch)?.pos : s;
544
+ if (i === void 0 || o === void 0)
545
+ throw new Error(`Position were undefined for commit ${e.id}`);
546
+ const n = j.has(q().theme ?? ""), a = y === "TB" || y === "BT" ? s : o + (n ? X / 2 + 1 : -2);
547
+ return { x: i, y: a, posWithOffset: s };
548
+ }, "getCommitPosition"), re = /* @__PURE__ */ h((e, r, t, s) => {
549
+ const o = e.append("g").attr("class", "commit-bullets"), i = e.append("g").attr("class", "commit-labels");
550
+ let n = y === "TB" || y === "BT" ? F : 0;
551
+ const a = [...r.keys()], l = s.parallelCommits ?? !1, f = /* @__PURE__ */ h(($, c) => {
552
+ const x = r.get($)?.seq, u = r.get(c)?.seq;
553
+ return x !== void 0 && u !== void 0 ? x - u : 0;
554
+ }, "sortKeys");
555
+ let g = a.sort(f);
556
+ y === "BT" && (l && Ze(g, r, n), g = g.reverse()), g.forEach(($) => {
557
+ const c = r.get($);
558
+ if (!c)
559
+ throw new Error(`Commit not found for key ${$}`);
560
+ l && (n = ir(c, y, n, E));
561
+ const x = dr(c, n, l);
562
+ if (t) {
563
+ const u = cr(c), p = c.customType ?? c.type, b = C.get(c.branch)?.index ?? 0;
564
+ nr(o, c, x, u, b, p), sr(i, c, x, n, s), or(i, c, x, n);
565
+ }
566
+ y === "TB" || y === "BT" ? E.set(c.id, { x: x.x, y: x.posWithOffset }) : E.set(c.id, { x: x.posWithOffset, y: x.y }), n = y === "BT" && l ? n + _ : n + _ + O, n > I && (I = n);
567
+ });
568
+ }, "drawCommits"), lr = /* @__PURE__ */ h((e, r, t, s, o) => {
569
+ const n = (y === "TB" || y === "BT" ? t.x < s.x : t.y < s.y) ? r.branch : e.branch, a = /* @__PURE__ */ h((f) => f.branch === n, "isOnBranchToGetCurve"), l = /* @__PURE__ */ h((f) => f.seq > e.seq && f.seq < r.seq, "isBetweenCommits");
570
+ return [...o.values()].some((f) => l(f) && a(f));
571
+ }, "shouldRerouteArrow"), W = /* @__PURE__ */ h((e, r, t = 0) => {
572
+ const s = e + Math.abs(e - r) / 2;
573
+ if (t > 5)
574
+ return s;
575
+ if (z.every((n) => Math.abs(n - s) >= 10))
576
+ return z.push(s), s;
577
+ const i = Math.abs(e - r);
578
+ return W(e, r - i / 5, t + 1);
579
+ }, "findLane"), hr = /* @__PURE__ */ h((e, r, t, s) => {
580
+ const { theme: o } = q(), i = Z.has(o ?? ""), n = E.get(r.id), a = E.get(t.id);
581
+ if (n === void 0 || a === void 0)
582
+ throw new Error(`Commit positions not found for commits ${r.id} and ${t.id}`);
583
+ const l = lr(r, t, n, a, s);
584
+ let f = "", g = "", $ = 0, c = 0, x = C.get(t.branch)?.index;
585
+ t.type === m.MERGE && r.id !== t.parents[0] && (x = C.get(r.branch)?.index);
586
+ let u;
587
+ if (l) {
588
+ f = "A 10 10, 0, 0, 0,", g = "A 10 10, 0, 0, 1,", $ = 10, c = 10;
589
+ const p = n.y < a.y ? W(n.y, a.y) : W(a.y, n.y), b = n.x < a.x ? W(n.x, a.x) : W(a.x, n.x);
590
+ y === "TB" ? n.x < a.x ? u = `M ${n.x} ${n.y} L ${b - $} ${n.y} ${g} ${b} ${n.y + c} L ${b} ${a.y - $} ${f} ${b + c} ${a.y} L ${a.x} ${a.y}` : (x = C.get(r.branch)?.index, u = `M ${n.x} ${n.y} L ${b + $} ${n.y} ${f} ${b} ${n.y + c} L ${b} ${a.y - $} ${g} ${b - c} ${a.y} L ${a.x} ${a.y}`) : y === "BT" ? n.x < a.x ? u = `M ${n.x} ${n.y} L ${b - $} ${n.y} ${f} ${b} ${n.y - c} L ${b} ${a.y + $} ${g} ${b + c} ${a.y} L ${a.x} ${a.y}` : (x = C.get(r.branch)?.index, u = `M ${n.x} ${n.y} L ${b + $} ${n.y} ${g} ${b} ${n.y - c} L ${b} ${a.y + $} ${f} ${b - c} ${a.y} L ${a.x} ${a.y}`) : n.y < a.y ? u = `M ${n.x} ${n.y} L ${n.x} ${p - $} ${f} ${n.x + c} ${p} L ${a.x - $} ${p} ${g} ${a.x} ${p + c} L ${a.x} ${a.y}` : (x = C.get(r.branch)?.index, u = `M ${n.x} ${n.y} L ${n.x} ${p + $} ${g} ${n.x + c} ${p} L ${a.x - $} ${p} ${f} ${a.x} ${p - c} L ${a.x} ${a.y}`);
591
+ } else
592
+ f = "A 20 20, 0, 0, 0,", g = "A 20 20, 0, 0, 1,", $ = 20, c = 20, y === "TB" ? (n.x < a.x && (t.type === m.MERGE && r.id !== t.parents[0] ? u = `M ${n.x} ${n.y} L ${n.x} ${a.y - $} ${f} ${n.x + c} ${a.y} L ${a.x} ${a.y}` : u = `M ${n.x} ${n.y} L ${a.x - $} ${n.y} ${g} ${a.x} ${n.y + c} L ${a.x} ${a.y}`), n.x > a.x && (f = "A 20 20, 0, 0, 0,", g = "A 20 20, 0, 0, 1,", $ = 20, c = 20, t.type === m.MERGE && r.id !== t.parents[0] ? u = `M ${n.x} ${n.y} L ${n.x} ${a.y - $} ${g} ${n.x - c} ${a.y} L ${a.x} ${a.y}` : u = `M ${n.x} ${n.y} L ${a.x + $} ${n.y} ${f} ${a.x} ${n.y + c} L ${a.x} ${a.y}`), n.x === a.x && (u = `M ${n.x} ${n.y} L ${a.x} ${a.y}`)) : y === "BT" ? (n.x < a.x && (t.type === m.MERGE && r.id !== t.parents[0] ? u = `M ${n.x} ${n.y} L ${n.x} ${a.y + $} ${g} ${n.x + c} ${a.y} L ${a.x} ${a.y}` : u = `M ${n.x} ${n.y} L ${a.x - $} ${n.y} ${f} ${a.x} ${n.y - c} L ${a.x} ${a.y}`), n.x > a.x && (f = "A 20 20, 0, 0, 0,", g = "A 20 20, 0, 0, 1,", $ = 20, c = 20, t.type === m.MERGE && r.id !== t.parents[0] ? u = `M ${n.x} ${n.y} L ${n.x} ${a.y + $} ${f} ${n.x - c} ${a.y} L ${a.x} ${a.y}` : u = `M ${n.x} ${n.y} L ${a.x + $} ${n.y} ${g} ${a.x} ${n.y - c} L ${a.x} ${a.y}`), n.x === a.x && (u = `M ${n.x} ${n.y} L ${a.x} ${a.y}`)) : (n.y < a.y && (t.type === m.MERGE && r.id !== t.parents[0] ? u = `M ${n.x} ${n.y} L ${a.x - $} ${n.y} ${g} ${a.x} ${n.y + c} L ${a.x} ${a.y}` : u = `M ${n.x} ${n.y} L ${n.x} ${a.y - $} ${f} ${n.x + c} ${a.y} L ${a.x} ${a.y}`), n.y > a.y && (t.type === m.MERGE && r.id !== t.parents[0] ? u = `M ${n.x} ${n.y} L ${a.x - $} ${n.y} ${f} ${a.x} ${n.y - c} L ${a.x} ${a.y}` : u = `M ${n.x} ${n.y} L ${n.x} ${a.y + $} ${g} ${n.x + c} ${a.y} L ${a.x} ${a.y}`), n.y === a.y && (u = `M ${n.x} ${n.y} L ${a.x} ${a.y}`));
593
+ if (u === void 0)
594
+ throw new Error("Line definition not found");
595
+ e.append("path").attr("d", u).attr(
596
+ "class",
597
+ "arrow arrow" + H(x, G, i)
598
+ );
599
+ }, "drawArrow"), $r = /* @__PURE__ */ h((e, r) => {
600
+ const t = e.append("g").attr("class", "commit-arrows");
601
+ [...r.keys()].forEach((s) => {
602
+ const o = r.get(s);
603
+ o.parents && o.parents.length > 0 && o.parents.forEach((i) => {
604
+ hr(t, r.get(i), o, r);
605
+ });
606
+ });
607
+ }, "drawArrows"), fr = /* @__PURE__ */ h((e, r, t, s) => {
608
+ const { look: o, theme: i, themeVariables: n } = q(), { dropShadow: a, THEME_COLOR_LIMIT: l } = n, f = j.has(i ?? ""), g = Z.has(i ?? ""), $ = e.append("g");
609
+ r.forEach((c, x) => {
610
+ const u = H(
611
+ x,
612
+ f ? l : G,
613
+ g
614
+ ), p = C.get(c.name)?.pos;
615
+ if (p === void 0)
616
+ throw new Error(`Position not found for branch ${c.name}`);
617
+ const b = y === "TB" || y === "BT" ? p : f ? p + X / 2 + 1 : p - 2, k = $.append("line");
618
+ k.attr("x1", 0), k.attr("y1", b), k.attr("x2", I), k.attr("y2", b), k.attr("class", "branch branch" + u), y === "TB" ? (k.attr("y1", F), k.attr("x1", p), k.attr("y2", I), k.attr("x2", p)) : y === "BT" && (k.attr("y1", I), k.attr("x1", p), k.attr("y2", F), k.attr("x2", p)), z.push(b);
619
+ const U = c.name, D = oe(U), T = $.insert("rect"), M = $.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + u);
620
+ M.node().appendChild(D);
621
+ const v = D.getBBox(), ee = f ? 0 : 4, N = f ? 16 : 0, A = f ? X : 0;
622
+ o === "neo" && T.attr("data-look", "neo"), T.attr("class", "branchLabelBkg label" + u).attr(
623
+ "style",
624
+ o === "neo" ? `filter:${f ? `url(#${s}-drop-shadow)` : a}` : ""
625
+ ).attr("rx", ee).attr("ry", ee).attr("x", -v.width - 4 - (t.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -v.height / 2 + 10).attr("width", v.width + 18 + N).attr("height", v.height + 4 + A), M.attr(
626
+ "transform",
627
+ "translate(" + (-v.width - 14 - (t.rotateCommitLabel === !0 ? 30 : 0) + N / 2) + ", " + (b - v.height / 2 - 2) + ")"
628
+ ), y === "TB" ? (T.attr("x", p - v.width / 2 - 10).attr("y", 0), M.attr("transform", "translate(" + (p - v.width / 2 - 5) + ", 0)"), f && (T.attr("transform", `translate(${-N / 2 - 3}, ${-A - 10})`), M.attr(
629
+ "transform",
630
+ "translate(" + (p - v.width / 2 - 5) + ", " + (-A * 2 + 7) + ")"
631
+ ))) : y === "BT" ? (T.attr("x", p - v.width / 2 - 10).attr("y", I), M.attr("transform", "translate(" + (p - v.width / 2 - 5) + ", " + I + ")"), f && (T.attr("transform", `translate(${-N / 2 - 3}, ${A + 10})`), M.attr(
632
+ "transform",
633
+ "translate(" + (p - v.width / 2 - 5) + ", " + (I + A * 2 + 4) + ")"
634
+ ))) : T.attr("transform", "translate(-19, " + (b - 12 - A / 2) + ")");
635
+ });
636
+ }, "drawBranches"), gr = /* @__PURE__ */ h(function(e, r, t, s, o) {
637
+ return C.set(e, { pos: r, index: t }), r += 50 + (o ? 40 : 0) + (y === "TB" || y === "BT" ? s.width / 2 : 0), r;
638
+ }, "setBranchPosition"), ur = /* @__PURE__ */ h(function(e, r, t, s) {
639
+ Je(), w.debug("in gitgraph renderer", e + `
640
+ `, "id:", r, t);
641
+ const o = s.db;
642
+ if (!o.getConfig) {
643
+ w.error("getConfig method is not available on db");
644
+ return;
645
+ }
646
+ const i = o.getConfig(), n = i.rotateCommitLabel ?? !1;
647
+ P = o.getCommits();
648
+ const a = o.getBranchesAsObjArray();
649
+ y = o.getDirection();
650
+ const l = Ee(`[id="${r}"]`), { look: f, theme: g, themeVariables: $ } = q(), { useGradient: c, gradientStart: x, gradientStop: u, filterColor: p } = $;
651
+ if (c) {
652
+ const k = l.append("defs").append("linearGradient").attr("id", r + "-gradient").attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
653
+ k.append("stop").attr("offset", "0%").attr("stop-color", x).attr("stop-opacity", 1), k.append("stop").attr("offset", "100%").attr("stop-color", u).attr("stop-opacity", 1);
654
+ }
655
+ f === "neo" && j.has(g ?? "") && l.append("defs").append("filter").attr("id", r + "-drop-shadow").attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", "0.06").attr("flood-color", p);
656
+ let b = 0;
657
+ a.forEach((k, U) => {
658
+ const D = oe(k.name), T = l.append("g"), K = T.insert("g").attr("class", "branchLabel"), M = K.insert("g").attr("class", "label branch-label");
659
+ M.node()?.appendChild(D);
660
+ const v = D.getBBox();
661
+ b = gr(k.name, b, U, v, n), M.remove(), K.remove(), T.remove();
662
+ }), re(l, P, !1, i), i.showBranches && fr(l, a, i, r), $r(l, P), re(l, P, !0, i), me.insertTitle(
663
+ l,
664
+ "gitTitleText",
665
+ i.titleTopMargin ?? 0,
666
+ o.getDiagramTitle()
667
+ ), pe(void 0, l, i.diagramPadding, i.useMaxWidth);
668
+ }, "draw"), yr = {
669
+ draw: ur
670
+ }, ie = 8, de = /* @__PURE__ */ new Set(["redux", "redux-dark", "redux-color", "redux-dark-color"]), xr = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), mr = /* @__PURE__ */ new Set(["neo", "neo-dark"]), pr = /* @__PURE__ */ new Set(["dark", "redux-dark", "redux-dark-color", "neo-dark"]), br = /* @__PURE__ */ new Set([
671
+ "redux",
672
+ "redux-dark",
673
+ "redux-color",
674
+ "redux-dark-color",
675
+ "neo",
676
+ "neo-dark"
677
+ ]), wr = /* @__PURE__ */ h((e) => {
678
+ const { svgId: r } = e;
679
+ let t = "";
680
+ if (e.useGradient && r)
681
+ for (let s = 0; s < e.THEME_COLOR_LIMIT; s++)
682
+ t += `
683
+ .label${s} { fill: ${e.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${e.strokeWidth};}
684
+ `;
685
+ return t;
686
+ }, "genGitGraphGradient"), kr = /* @__PURE__ */ h((e) => {
687
+ const r = J(), { theme: t, themeVariables: s } = r, { borderColorArray: o } = s, i = de.has(t);
688
+ if (mr.has(t)) {
689
+ let n = "";
690
+ for (let a = 0; a < e.THEME_COLOR_LIMIT; a++)
691
+ if (a === 0)
692
+ n += `
693
+ .branch-label${a} { fill: ${e.nodeBorder};}
694
+ .commit${a} { stroke: ${e.nodeBorder}; }
695
+ .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
696
+ .arrow${a} { stroke: ${e.nodeBorder}; }
697
+ .commit-bullets { fill: ${e.nodeBorder}; }
698
+ .commit-cherry-pick${a} { stroke: ${e.nodeBorder}; }
699
+ ${wr(e)}`;
700
+ else {
701
+ const l = a % ie;
702
+ n += `
703
+ .branch-label${a} { fill: ${e["gitBranchLabel" + l]}; }
704
+ .commit${a} { stroke: ${e["git" + l]}; fill: ${e["git" + l]}; }
705
+ .commit-highlight${a} { stroke: ${e["gitInv" + l]}; fill: ${e["gitInv" + l]}; }
706
+ .arrow${a} { stroke: ${e["git" + l]}; }
707
+ `;
708
+ }
709
+ return n;
710
+ } else if (xr.has(t)) {
711
+ let n = "";
712
+ for (let a = 0; a < e.THEME_COLOR_LIMIT; a++)
713
+ if (a === 0)
714
+ n += `
715
+ .branch-label${a} { fill: ${e.nodeBorder}; ${i ? `font-weight:${e.noteFontWeight}` : ""} }
716
+ .commit${a} { stroke: ${e.nodeBorder}; }
717
+ .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.mainBkg}; }
718
+ .label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${i ? `font-weight:${e.noteFontWeight}` : ""} }
719
+ .arrow${a} { stroke: ${e.nodeBorder}; }
720
+ .commit-bullets { fill: ${e.nodeBorder}; }
721
+ `;
722
+ else {
723
+ const l = a % o.length;
724
+ n += `
725
+ .branch-label${a} { fill: ${e.nodeBorder}; ${i ? `font-weight:${e.noteFontWeight}` : ""} }
726
+ .commit${a} { stroke: ${o[l]}; fill: ${o[l]}; }
727
+ .commit-highlight${a} { stroke: ${o[l]}; fill: ${o[l]}; }
728
+ .label${a} { fill: ${pr.has(t) ? e.mainBkg : o[l]}; stroke: ${o[l]}; stroke-width: ${e.strokeWidth}; }
729
+ .arrow${a} { stroke: ${o[l]}; }
730
+ `;
731
+ }
732
+ return n;
733
+ } else {
734
+ let n = "";
735
+ for (let a = 0; a < e.THEME_COLOR_LIMIT; a++)
736
+ n += `
737
+ .branch-label${a} { fill: ${e.nodeBorder}; ${i ? `font-weight:${e.noteFontWeight}` : ""} }
738
+ .commit${a} { stroke: ${e.nodeBorder}; }
739
+ .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
740
+ .label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${i ? `font-weight:${e.noteFontWeight}` : ""}}
741
+ .arrow${a} { stroke: ${e.nodeBorder}; }
742
+ .commit-bullets { fill: ${e.nodeBorder}; }
743
+ .commit-cherry-pick${a} { stroke: ${e.nodeBorder}; }
744
+ `;
745
+ return n;
746
+ }
747
+ }, "genColor"), vr = /* @__PURE__ */ h((e) => `${Array.from({ length: e.THEME_COLOR_LIMIT }, (r, t) => t).map((r) => {
748
+ const t = r % ie;
749
+ return `
750
+ .branch-label${r} { fill: ${e["gitBranchLabel" + t]}; }
751
+ .commit${r} { stroke: ${e["git" + t]}; fill: ${e["git" + t]}; }
752
+ .commit-highlight${r} { stroke: ${e["gitInv" + t]}; fill: ${e["gitInv" + t]}; }
753
+ .label${r} { fill: ${e["git" + t]}; }
754
+ .arrow${r} { stroke: ${e["git" + t]}; }
755
+ `;
756
+ }).join(`
757
+ `)}`, "normalTheme"), Cr = /* @__PURE__ */ h((e) => {
758
+ const r = J(), { theme: t } = r, s = br.has(t);
759
+ return `
760
+ .commit-id,
761
+ .commit-msg,
762
+ .branch-label {
763
+ fill: lightgrey;
764
+ color: lightgrey;
765
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
766
+ font-family: var(--mermaid-font-family);
767
+ }
768
+
769
+ ${s ? kr(e) : vr(e)}
770
+
771
+ .branch {
772
+ stroke-width: ${e.strokeWidth};
773
+ stroke: ${e.commitLineColor ?? e.lineColor};
774
+ stroke-dasharray: ${s ? "4 2" : "2"};
775
+ }
776
+ .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${s ? e.nodeBorder : e.commitLabelColor}; ${s ? `font-weight:${e.noteFontWeight};` : ""}}
777
+ .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${s ? "transparent" : e.commitLabelBackground}; opacity: ${s ? "" : 0.5}; }
778
+ .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
779
+ .tag-label-bkg { fill: ${s ? e.mainBkg : e.tagLabelBackground}; stroke: ${s ? e.nodeBorder : e.tagLabelBorder}; ${s ? `filter:${e.dropShadow}` : ""} }
780
+ .tag-hole { fill: ${e.textColor}; }
781
+
782
+ .commit-merge {
783
+ stroke: ${s ? e.mainBkg : e.primaryColor};
784
+ fill: ${s ? e.mainBkg : e.primaryColor};
785
+ }
786
+ .commit-reverse {
787
+ stroke: ${s ? e.mainBkg : e.primaryColor};
788
+ fill: ${s ? e.mainBkg : e.primaryColor};
789
+ stroke-width: ${s ? e.strokeWidth : 3};
790
+ }
791
+ .commit-highlight-outer {
792
+ }
793
+ .commit-highlight-inner {
794
+ stroke: ${s ? e.mainBkg : e.primaryColor};
795
+ fill: ${s ? e.mainBkg : e.primaryColor};
796
+ }
797
+
798
+ .arrow {
799
+ /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
800
+ stroke-width: ${de.has(t) ? e.strokeWidth : 8};
801
+ stroke-linecap: round;
802
+ fill: none
803
+ }
804
+ .gitTitleText {
805
+ text-anchor: middle;
806
+ font-size: 18px;
807
+ fill: ${e.textColor};
808
+ }
809
+ `;
810
+ }, "getStyles"), Er = Cr, _r = {
811
+ parser: Ve,
812
+ db: se,
813
+ renderer: yr,
814
+ styles: Er
815
+ };
816
+ export {
817
+ _r as diagram
818
+ };