@kong-ui-public/documentation 1.7.21 → 1.7.22-pr.3646.2d80ddaf3.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 (159) hide show
  1. package/package.json +4 -4
  2. package/dist/arc-DZdQjcG8-CduayE88.js +0 -79
  3. package/dist/architectureDiagram-3BPJPVTR-By_DXDyu-U3MSLbOU.js +0 -4065
  4. package/dist/astro-D8QEIUE9-nzvtSwAQ.js +0 -18
  5. package/dist/blockDiagram-GPEHLZMM-9Cp9Hbl7-CKP-SiVG.js +0 -3268
  6. package/dist/c-GOwUpV7U-DMPKLUI8.js +0 -4
  7. package/dist/c4Diagram-AAUBKEIU-ftdwlfdB-D3A61SdV.js +0 -3035
  8. package/dist/catppuccin-latte-BcV8jije-D8pvGdu1.js +0 -4
  9. package/dist/channel-DM9j7IFL-DxqBUxfY.js +0 -5
  10. package/dist/chunk-2J33WTMH-CBbjVzWb-0og4LHQ-.js +0 -24
  11. package/dist/chunk-4BX2VUAB-C_NnimAy--QQ0Db2V.js +0 -8
  12. package/dist/chunk-55IACEB6-DZn1aNO0-A3zOZ7dT.js +0 -8
  13. package/dist/chunk-727SXJPM-B2_6_WLv-Bs3CxHaX.js +0 -3445
  14. package/dist/chunk-AQP2D5EJ-DEAEiJjW-DTbwZT8N.js +0 -2096
  15. package/dist/chunk-FMBD7UC4-D_tZ4Dxg-DwjoPGUH.js +0 -19
  16. package/dist/chunk-ND2GUHAM-Duw3k8MU-HmrdHLJ9.js +0 -65
  17. package/dist/chunk-QZHKN3VN-DN6nBdn0-BvQOETVz.js +0 -12
  18. package/dist/classDiagram-4FO5ZUOK-Du5qFrfN-BqXc0etQ.js +0 -17
  19. package/dist/classDiagram-v2-Q7XG4LA2-DM6zutfc-BqXc0etQ.js +0 -17
  20. package/dist/cose-bilkent-S5V4N54A-0ZumbVgj-0z7CQbIH.js +0 -2260
  21. package/dist/csharp-Cy04UeDC-OaGPefhL.js +0 -4
  22. package/dist/css-CJQ-rcMF-B_2PRTA_.js +0 -4
  23. package/dist/csv-Bx_Umlp--BPWcOTV4.js +0 -4
  24. package/dist/cytoscape.esm-BDIiOYYO-C1jMBhD8.js +0 -18220
  25. package/dist/dagre-BM42HDAG-qMWMsyLb-DGMrq3i3.js +0 -288
  26. package/dist/dagre-DJxg_nfI-hVOVexz-.js +0 -1687
  27. package/dist/defaultLocale-mtMQ0U8A-D6jPixjH.js +0 -182
  28. package/dist/diagram-2AECGRRQ-B2gF_dHe-Bv_EpxRz.js +0 -210
  29. package/dist/diagram-5GNKFQAL-DJ9WwRrD-WVvm0Icu.js +0 -99
  30. package/dist/diagram-KO2AKTUF-RfkqD-VW-yyAds1Qq.js +0 -439
  31. package/dist/diagram-LMA3HP47-Ct7s9hIt-Dy6f9BAO.js +0 -127
  32. package/dist/diagram-OG6HWLK6-BSYJ2CoI-ckmfat-L.js +0 -475
  33. package/dist/diff-DZRtXnMG-DenOJuyV.js +0 -4
  34. package/dist/docker-DQBBDNmU-xX8PDoIv.js +0 -4
  35. package/dist/documentation.es.js +0 -7
  36. package/dist/documentation.umd.js +0 -3474
  37. package/dist/erDiagram-TEJ5UH35-BudwiSYX-bVzp1Kjr.js +0 -1773
  38. package/dist/flowDiagram-I6XJVG4X-B23Smlxp-ClHvdCdJ.js +0 -4258
  39. package/dist/ganttDiagram-6RSMTGT7-C-i89z_P-t5UAyRM5.js +0 -3099
  40. package/dist/git-commit-BOgnKaZ8-Csu8eMzs.js +0 -5
  41. package/dist/git-rebase-0v-YFIjP-D701iWbX.js +0 -5
  42. package/dist/gitGraphDiagram-PVQCEYII-DpVfXnUD-Cg3smOdz.js +0 -734
  43. package/dist/go-DpaXbCNA-DqSXHrGo.js +0 -4
  44. package/dist/graphlib-D2YdGpuK-CnQPmzkS.js +0 -1071
  45. package/dist/graphql-BSO8hVnT-C6Okg5tI.js +0 -14
  46. package/dist/haml-DizLz-gS-BWwS-eha.js +0 -10
  47. package/dist/handlebars-tnt1-4s--xVtJSIx5.js +0 -14
  48. package/dist/haskell-BDLr0yXS-BlmVjKNy.js +0 -4
  49. package/dist/html-DdIT5Pi9-C35UyBqr.js +0 -10
  50. package/dist/html-derivative-BHAKSQcK-BChKhjnv.js +0 -5
  51. package/dist/http-DRk-iX-V-DQ76ihB0.js +0 -14
  52. package/dist/index-DfVKdDwj.js +0 -40029
  53. package/dist/infoDiagram-5YYISTIA-CDUwzFql-Bmthmcp4.js +0 -18
  54. package/dist/ini-D-uG5DCC-70PBzbbb.js +0 -4
  55. package/dist/init-8lPFe2y8-B2MlpiqM.js +0 -16
  56. package/dist/ishikawaDiagram-YF4QCWOH-MfYdx0rK-cbltssua.js +0 -728
  57. package/dist/java-CQQr73XR-D6YBp1XX.js +0 -4
  58. package/dist/javascript-CXmFGv-C-BRPKgr3C.js +0 -4
  59. package/dist/journeyDiagram-JHISSGLW-C_udOPtJ-BjAvgSAR.js +0 -908
  60. package/dist/json-BXFRNzj8-D8uacQj0.js +0 -4
  61. package/dist/json5-B5-J7v9w-Biib5ALh.js +0 -4
  62. package/dist/jsonc-CeA7x8NU-BZEKkMok.js +0 -4
  63. package/dist/jsonl-BBlxch9W-BG2V-IA2.js +0 -4
  64. package/dist/jsx-DucQCby8-Cl0AMtmu.js +0 -4
  65. package/dist/kanban-definition-UN3LZRKU-C1Su-UOY-DZ93dsWZ.js +0 -1028
  66. package/dist/katex-D7tFlpqA-BOSQxXe1.js +0 -22315
  67. package/dist/kotlin-CDXyBjvc-Dy_91eL4.js +0 -4
  68. package/dist/latex-COX74REd-l1quglTx.js +0 -5
  69. package/dist/less-QqooI0UQ-tcNg8M2_.js +0 -4
  70. package/dist/linear-1MXhYum8-9C1jno9G.js +0 -255
  71. package/dist/liquid-CsynDTV--Bdhb3gsJ.js +0 -14
  72. package/dist/lua-B3xrKnOz-Coo0MCwO.js +0 -5
  73. package/dist/make-eFBmESRY-CrUl7LOH.js +0 -4
  74. package/dist/markdown-DkQv9NwM-Bcqt-5kX.js +0 -4
  75. package/dist/material-theme-darker-Bp7Jj852-DMHCIvq5.js +0 -4
  76. package/dist/mdc-BK-Z5Xv--aFc-Oyv5.js +0 -12
  77. package/dist/mdx-CjbEMaEg-CK6jOqmu.js +0 -4
  78. package/dist/mermaid-Ccfpee4A-BgbNnQO5.js +0 -4
  79. package/dist/mindmap-definition-RKZ34NQL-MuSV765K-Kub1iXFv.js +0 -1026
  80. package/dist/nginx-DQrs__jO-BS9Jcr4V.js +0 -5
  81. package/dist/objective-c-CXg1TPY9-C809HPrX.js +0 -4
  82. package/dist/ordinal-D9ksOc8y-2hZwLyEk.js +0 -63
  83. package/dist/pascal-C6L9Tn1x-a8whuidZ.js +0 -4
  84. package/dist/perl-Dbi-SlHs-DsZjIGqU.js +0 -16
  85. package/dist/php-J5w8HAya-DnRg4f-g.js +0 -18
  86. package/dist/pieDiagram-4H26LBE5-TgFp7J6_-i6NxP3Xz.js +0 -153
  87. package/dist/plsql-Ba_yrVwL-BJoF2Vrf.js +0 -4
  88. package/dist/postcss-Bsoc__IZ-DaHMm3XW.js +0 -4
  89. package/dist/powershell-CKvM5hOe-Box9VSDW.js +0 -4
  90. package/dist/proto-iweZN-Ks-w0B_itsp.js +0 -4
  91. package/dist/pug-DUPsoXbW-BFHDRSax.js +0 -12
  92. package/dist/python-MxhgNM12-D_5pfY__.js +0 -4
  93. package/dist/quadrantDiagram-W4KKPZXB-DKPne3o_-DXLHqRuR.js +0 -2046
  94. package/dist/r-CoGPXt5G-BrbXTU3W.js +0 -4
  95. package/dist/reg-CHAl2UuA-bHAwx9Pm.js +0 -4
  96. package/dist/requirementDiagram-4Y6WPE33-vh8uUAp_-CHtsISxP.js +0 -2281
  97. package/dist/rst-D-Zcnz0t-C3PGnqgH.js +0 -20
  98. package/dist/ruby-CQp7mk0v-B3KpG-9E.js +0 -46
  99. package/dist/rust-W9HETclW-CaZtBt24.js +0 -4
  100. package/dist/sankeyDiagram-5OEKKPKP-Cgs6W_El-D7GZyd8n.js +0 -946
  101. package/dist/sass-DzGfEb5u-pslLeRRb.js +0 -4
  102. package/dist/scss-cWHTb1-d-DN6jMR75.js +0 -5
  103. package/dist/sequenceDiagram-3UESZ5HK-C5F57Dkt-BW1Hb7UW.js +0 -4266
  104. package/dist/shellscript-BvJBBLP1-BtH46UX7.js +0 -4
  105. package/dist/shellsession-CXHk-hsk-D-2JR5oU.js +0 -5
  106. package/dist/splunk-TtOhH_8h-BP8P7eWt.js +0 -4
  107. package/dist/sql-B-h_q34g-uWwuAxg_.js +0 -4
  108. package/dist/ssh-config-B7jk1vQp-BB1rrGb9.js +0 -4
  109. package/dist/stateDiagram-AJRCARHV-09dUKG6Y-Dm2a1vNu.js +0 -210
  110. package/dist/stateDiagram-v2-BHNVJYJU-CWqmRt12-DbWzZ-j-.js +0 -16
  111. package/dist/style.css +0 -1
  112. package/dist/stylus-Ccd_7r3J-DAu5PNZ9.js +0 -4
  113. package/dist/svelte-CYqtuUsn-Cf97VB5J.js +0 -14
  114. package/dist/swift-CzsQqA0L-BPF2ddNF.js +0 -4
  115. package/dist/timeline-definition-PNZ67QCA-CCndyx0V-B5CT96H-.js +0 -1095
  116. package/dist/toml-CRTROHRr-DjT9Bjqu.js +0 -4
  117. package/dist/tsx-CE8dfKwK-B-5hSr15.js +0 -4
  118. package/dist/twig-Bst4uh7S-C3aA9tng.js +0 -18
  119. package/dist/types/components/DiscardChangesPrompt.vue.d.ts +0 -35
  120. package/dist/types/components/DiscardChangesPrompt.vue.d.ts.map +0 -1
  121. package/dist/types/components/DocumentationContent.vue.d.ts +0 -186
  122. package/dist/types/components/DocumentationContent.vue.d.ts.map +0 -1
  123. package/dist/types/components/DocumentationDisplay.vue.d.ts +0 -105
  124. package/dist/types/components/DocumentationDisplay.vue.d.ts.map +0 -1
  125. package/dist/types/components/DocumentationPageEmptyState.vue.d.ts +0 -31
  126. package/dist/types/components/DocumentationPageEmptyState.vue.d.ts.map +0 -1
  127. package/dist/types/components/ProductDocumentModal.vue.d.ts +0 -72
  128. package/dist/types/components/ProductDocumentModal.vue.d.ts.map +0 -1
  129. package/dist/types/composables/index.d.ts +0 -6
  130. package/dist/types/composables/index.d.ts.map +0 -1
  131. package/dist/types/composables/useI18n.d.ts +0 -9
  132. package/dist/types/composables/useI18n.d.ts.map +0 -1
  133. package/dist/types/external-links.d.ts +0 -5
  134. package/dist/types/external-links.d.ts.map +0 -1
  135. package/dist/types/helpers.d.ts +0 -8
  136. package/dist/types/helpers.d.ts.map +0 -1
  137. package/dist/types/index.d.ts +0 -7
  138. package/dist/types/index.d.ts.map +0 -1
  139. package/dist/types/types/document-list.d.ts +0 -28
  140. package/dist/types/types/document-list.d.ts.map +0 -1
  141. package/dist/types/types/document-modal.d.ts +0 -8
  142. package/dist/types/types/document-modal.d.ts.map +0 -1
  143. package/dist/types/types/index.d.ts +0 -3
  144. package/dist/types/types/index.d.ts.map +0 -1
  145. package/dist/typescript-8ogSSNer-B0ag8pir.js +0 -4
  146. package/dist/v-NeSnRB8V-CYSa2rJN.js +0 -4
  147. package/dist/vb-Dz72yc4q-B6FpM2Kc.js +0 -4
  148. package/dist/vennDiagram-CIIHVFJN-DQfKxM3L-qUaKEl7l.js +0 -1889
  149. package/dist/viml-DB1flIhL-BeYQ8dZh.js +0 -4
  150. package/dist/vue-Bq4JA_WT-CGBUDahs.js +0 -22
  151. package/dist/vue-html-BygQzR-9-BPez-Otx.js +0 -5
  152. package/dist/wardley-L42UT6IY-BjAkE_cs-C-giFqos.js +0 -20731
  153. package/dist/wardleyDiagram-YWT4CUSO-Bf9L2NsL-DXPF2Ee9.js +0 -639
  154. package/dist/wasm-BmZuu1vu-CfuK9YWP.js +0 -4
  155. package/dist/wgsl-D-vNyw6e-C2IZ7ENh.js +0 -4
  156. package/dist/xml-juAhGoTG-khG3jjDl.js +0 -5
  157. package/dist/xsl-CHgyQG2O-CiMa9sUf.js +0 -5
  158. package/dist/xychartDiagram-2RQKCTM6-ChNH3q1U-a59DsJDA.js +0 -2055
  159. package/dist/yaml-BK_xXVzk-X78l_Ibz.js +0 -4
@@ -1,734 +0,0 @@
1
- import { i as dt, f as lt, G as ht, K as $t, W as mt, U as gt, p as l, o as Q, g as k, q as yt, Z as z, N as ft, r as pt, H as xt, a as L, s as ut, F as bt, w as kt } from "./index-DfVKdDwj.js";
2
- import { t as Bt } from "./chunk-4BX2VUAB-C_NnimAy--QQ0Db2V.js";
3
- import { r as wt } from "./wardley-L42UT6IY-BjAkE_cs-C-giFqos.js";
4
- import { t as Et } from "./chunk-QZHKN3VN-DN6nBdn0-BvQOETVz.js";
5
- var x = {
6
- NORMAL: 0,
7
- REVERSE: 1,
8
- HIGHLIGHT: 2,
9
- MERGE: 3,
10
- CHERRY_PICK: 4
11
- }, Ct = bt.gitGraph, S = /* @__PURE__ */ l(() => ut({
12
- ...Ct,
13
- ...Q().gitGraph
14
- }), "getConfig"), d = new Et(() => {
15
- let t = S(), r = t.mainBranchName, e = t.mainBranchOrder;
16
- return {
17
- mainBranchName: r,
18
- commits: /* @__PURE__ */ new Map(),
19
- head: null,
20
- branchConfig: /* @__PURE__ */ new Map([[r, {
21
- name: r,
22
- order: e
23
- }]]),
24
- branches: /* @__PURE__ */ new Map([[r, null]]),
25
- currBranch: r,
26
- direction: "LR",
27
- seq: 0,
28
- options: {}
29
- };
30
- });
31
- function K() {
32
- return kt({ length: 7 });
33
- }
34
- l(K, "getID");
35
- function rt(t, r) {
36
- let e = /* @__PURE__ */ Object.create(null);
37
- return t.reduce((i, s) => {
38
- let n = r(s);
39
- return e[n] || (e[n] = !0, i.push(s)), i;
40
- }, []);
41
- }
42
- l(rt, "uniqBy");
43
- var Lt = /* @__PURE__ */ l(function(t) {
44
- d.records.direction = t;
45
- }, "setDirection"), Tt = /* @__PURE__ */ l(function(t) {
46
- k.debug("options str", t), t = t?.trim(), t ||= "{}";
47
- try {
48
- d.records.options = JSON.parse(t);
49
- } catch (r) {
50
- k.error("error while parsing gitGraph options", r.message);
51
- }
52
- }, "setOptions"), Mt = /* @__PURE__ */ l(function() {
53
- return d.records.options;
54
- }, "getOptions"), vt = /* @__PURE__ */ l(function(t) {
55
- let r = t.msg, e = t.id, i = t.type, s = t.tags;
56
- k.info("commit", r, e, i, s), k.debug("Entering commit:", r, e, i, s);
57
- let n = S();
58
- e = L.sanitizeText(e, n), r = L.sanitizeText(r, n), s = s?.map((a) => L.sanitizeText(a, n));
59
- let o = {
60
- id: e || d.records.seq + "-" + K(),
61
- message: r,
62
- seq: d.records.seq++,
63
- type: i ?? x.NORMAL,
64
- tags: s ?? [],
65
- parents: d.records.head == null ? [] : [d.records.head.id],
66
- branch: d.records.currBranch
67
- };
68
- d.records.head = o, k.info("main branch", n.mainBranchName), d.records.commits.has(o.id) && k.warn(`Commit ID ${o.id} already exists`), d.records.commits.set(o.id, o), d.records.branches.set(d.records.currBranch, o.id), k.debug("in pushCommit " + o.id);
69
- }, "commit"), It = /* @__PURE__ */ l(function(t) {
70
- let r = t.name, e = t.order;
71
- if (r = L.sanitizeText(r, S()), d.records.branches.has(r)) throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);
72
- d.records.branches.set(r, d.records.head == null ? null : d.records.head.id), d.records.branchConfig.set(r, {
73
- name: r,
74
- order: e
75
- }), et(r), k.debug("in createBranch");
76
- }, "branch"), Rt = /* @__PURE__ */ l((t) => {
77
- let r = t.branch, e = t.id, i = t.type, s = t.tags, n = S();
78
- r = L.sanitizeText(r, n), e &&= L.sanitizeText(e, n);
79
- let o = d.records.branches.get(d.records.currBranch), a = d.records.branches.get(r), $ = o ? d.records.commits.get(o) : void 0, m = a ? d.records.commits.get(a) : void 0;
80
- if ($ && m && $.branch === r) throw Error(`Cannot merge branch '${r}' into itself.`);
81
- if (d.records.currBranch === r) {
82
- let c = /* @__PURE__ */ Error('Incorrect usage of "merge". Cannot merge a branch to itself');
83
- throw c.hash = {
84
- text: `merge ${r}`,
85
- token: `merge ${r}`,
86
- expected: ["branch abc"]
87
- }, c;
88
- }
89
- if ($ === void 0 || !$) {
90
- let c = /* @__PURE__ */ Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);
91
- throw c.hash = {
92
- text: `merge ${r}`,
93
- token: `merge ${r}`,
94
- expected: ["commit"]
95
- }, c;
96
- }
97
- if (!d.records.branches.has(r)) {
98
- let c = /* @__PURE__ */ Error('Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist");
99
- throw c.hash = {
100
- text: `merge ${r}`,
101
- token: `merge ${r}`,
102
- expected: [`branch ${r}`]
103
- }, c;
104
- }
105
- if (m === void 0 || !m) {
106
- let c = /* @__PURE__ */ Error('Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits");
107
- throw c.hash = {
108
- text: `merge ${r}`,
109
- token: `merge ${r}`,
110
- expected: ['"commit"']
111
- }, c;
112
- }
113
- if ($ === m) {
114
- let c = /* @__PURE__ */ Error('Incorrect usage of "merge". Both branches have same head');
115
- throw c.hash = {
116
- text: `merge ${r}`,
117
- token: `merge ${r}`,
118
- expected: ["branch abc"]
119
- }, c;
120
- }
121
- if (e && d.records.commits.has(e)) {
122
- let c = /* @__PURE__ */ Error('Incorrect usage of "merge". Commit with id:' + e + " already exists, use different custom id");
123
- throw c.hash = {
124
- text: `merge ${r} ${e} ${i} ${s?.join(" ")}`,
125
- token: `merge ${r} ${e} ${i} ${s?.join(" ")}`,
126
- expected: [`merge ${r} ${e}_UNIQUE ${i} ${s?.join(" ")}`]
127
- }, c;
128
- }
129
- let g = a || "", h = {
130
- id: e || `${d.records.seq}-${K()}`,
131
- message: `merged branch ${r} into ${d.records.currBranch}`,
132
- seq: d.records.seq++,
133
- parents: d.records.head == null ? [] : [d.records.head.id, g],
134
- branch: d.records.currBranch,
135
- type: x.MERGE,
136
- customType: i,
137
- customId: !!e,
138
- tags: s ?? []
139
- };
140
- d.records.head = h, d.records.commits.set(h.id, h), d.records.branches.set(d.records.currBranch, h.id), k.debug(d.records.branches), k.debug("in mergeBranch");
141
- }, "merge"), Pt = /* @__PURE__ */ l(function(t) {
142
- let r = t.id, e = t.targetId, i = t.tags, s = t.parent;
143
- k.debug("Entering cherryPick:", r, e, i);
144
- let n = S();
145
- if (r = L.sanitizeText(r, n), e = L.sanitizeText(e, n), i = i?.map(($) => L.sanitizeText($, n)), s = L.sanitizeText(s, n), !r || !d.records.commits.has(r)) {
146
- let $ = /* @__PURE__ */ Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
147
- throw $.hash = {
148
- text: `cherryPick ${r} ${e}`,
149
- token: `cherryPick ${r} ${e}`,
150
- expected: ["cherry-pick abc"]
151
- }, $;
152
- }
153
- let o = d.records.commits.get(r);
154
- if (o === void 0 || !o) throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
155
- if (s && !(Array.isArray(o.parents) && o.parents.includes(s))) throw /* @__PURE__ */ Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");
156
- let a = o.branch;
157
- if (o.type === x.MERGE && !s) throw /* @__PURE__ */ Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");
158
- if (!e || !d.records.commits.has(e)) {
159
- if (a === d.records.currBranch) {
160
- let h = /* @__PURE__ */ Error('Incorrect usage of "cherryPick". Source commit is already on current branch');
161
- throw h.hash = {
162
- text: `cherryPick ${r} ${e}`,
163
- token: `cherryPick ${r} ${e}`,
164
- expected: ["cherry-pick abc"]
165
- }, h;
166
- }
167
- let $ = d.records.branches.get(d.records.currBranch);
168
- if ($ === void 0 || !$) {
169
- let h = /* @__PURE__ */ Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);
170
- throw h.hash = {
171
- text: `cherryPick ${r} ${e}`,
172
- token: `cherryPick ${r} ${e}`,
173
- expected: ["cherry-pick abc"]
174
- }, h;
175
- }
176
- let m = d.records.commits.get($);
177
- if (m === void 0 || !m) {
178
- let h = /* @__PURE__ */ Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);
179
- throw h.hash = {
180
- text: `cherryPick ${r} ${e}`,
181
- token: `cherryPick ${r} ${e}`,
182
- expected: ["cherry-pick abc"]
183
- }, h;
184
- }
185
- let g = {
186
- id: d.records.seq + "-" + K(),
187
- message: `cherry-picked ${o?.message} into ${d.records.currBranch}`,
188
- seq: d.records.seq++,
189
- parents: d.records.head == null ? [] : [d.records.head.id, o.id],
190
- branch: d.records.currBranch,
191
- type: x.CHERRY_PICK,
192
- tags: i ? i.filter(Boolean) : [`cherry-pick:${o.id}${o.type === x.MERGE ? `|parent:${s}` : ""}`]
193
- };
194
- d.records.head = g, d.records.commits.set(g.id, g), d.records.branches.set(d.records.currBranch, g.id), k.debug(d.records.branches), k.debug("in cherryPick");
195
- }
196
- }, "cherryPick"), et = /* @__PURE__ */ l(function(t) {
197
- if (t = L.sanitizeText(t, S()), d.records.branches.has(t)) {
198
- d.records.currBranch = t;
199
- let r = d.records.branches.get(d.records.currBranch);
200
- r === void 0 || !r ? d.records.head = null : d.records.head = d.records.commits.get(r) ?? null;
201
- } else {
202
- let r = /* @__PURE__ */ Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);
203
- throw r.hash = {
204
- text: `checkout ${t}`,
205
- token: `checkout ${t}`,
206
- expected: [`branch ${t}`]
207
- }, r;
208
- }
209
- }, "checkout");
210
- function Y(t, r, e) {
211
- let i = t.indexOf(r);
212
- i === -1 ? t.push(e) : t.splice(i, 1, e);
213
- }
214
- l(Y, "upsert");
215
- function Z(t) {
216
- let r = t.reduce((s, n) => s.seq > n.seq ? s : n, t[0]), e = "";
217
- t.forEach(function(s) {
218
- s === r ? e += " *" : e += " |";
219
- });
220
- let i = [
221
- e,
222
- r.id,
223
- r.seq
224
- ];
225
- for (let s in d.records.branches) d.records.branches.get(s) === r.id && i.push(s);
226
- if (k.debug(i.join(" ")), r.parents && r.parents.length == 2 && r.parents[0] && r.parents[1]) {
227
- let s = d.records.commits.get(r.parents[0]);
228
- Y(t, r, s), r.parents[1] && t.push(d.records.commits.get(r.parents[1]));
229
- } else {
230
- if (r.parents.length == 0) return;
231
- if (r.parents[0]) {
232
- let s = d.records.commits.get(r.parents[0]);
233
- Y(t, r, s);
234
- }
235
- }
236
- t = rt(t, (s) => s.id), Z(t);
237
- }
238
- l(Z, "prettyPrintCommitHistory");
239
- var Ot = /* @__PURE__ */ l(function() {
240
- k.debug(d.records.commits);
241
- let t = ot()[0];
242
- Z([t]);
243
- }, "prettyPrint"), At = /* @__PURE__ */ l(function() {
244
- d.reset(), xt();
245
- }, "clear"), Gt = /* @__PURE__ */ l(function() {
246
- return [...d.records.branchConfig.values()].map((t, r) => t.order !== null && t.order !== void 0 ? t : {
247
- ...t,
248
- order: parseFloat(`0.${r}`)
249
- }).sort((t, r) => (t.order ?? 0) - (r.order ?? 0)).map(({ name: t }) => ({ name: t }));
250
- }, "getBranchesAsObjArray"), St = /* @__PURE__ */ l(function() {
251
- return d.records.branches;
252
- }, "getBranches"), Ht = /* @__PURE__ */ l(function() {
253
- return d.records.commits;
254
- }, "getCommits"), ot = /* @__PURE__ */ l(function() {
255
- let t = [...d.records.commits.values()];
256
- return t.forEach(function(r) {
257
- k.debug(r.id);
258
- }), t.sort((r, e) => r.seq - e.seq), t;
259
- }, "getCommitsArray"), at = {
260
- commitType: x,
261
- getConfig: S,
262
- setDirection: Lt,
263
- setOptions: Tt,
264
- getOptions: Mt,
265
- commit: vt,
266
- branch: It,
267
- merge: Rt,
268
- cherryPick: Pt,
269
- checkout: et,
270
- prettyPrint: Ot,
271
- clear: At,
272
- getBranchesAsObjArray: Gt,
273
- getBranches: St,
274
- getCommits: Ht,
275
- getCommitsArray: ot,
276
- getCurrentBranch: /* @__PURE__ */ l(function() {
277
- return d.records.currBranch;
278
- }, "getCurrentBranch"),
279
- getDirection: /* @__PURE__ */ l(function() {
280
- return d.records.direction;
281
- }, "getDirection"),
282
- getHead: /* @__PURE__ */ l(function() {
283
- return d.records.head;
284
- }, "getHead"),
285
- setAccTitle: gt,
286
- getAccTitle: mt,
287
- getAccDescription: $t,
288
- setAccDescription: ht,
289
- setDiagramTitle: lt,
290
- getDiagramTitle: dt
291
- }, Wt = /* @__PURE__ */ l((t, r) => {
292
- Bt(t, r), t.dir && r.setDirection(t.dir);
293
- for (let e of t.statements) qt(e, r);
294
- }, "populate"), qt = /* @__PURE__ */ l((t, r) => {
295
- let e = {
296
- Commit: /* @__PURE__ */ l((i) => r.commit(_t(i)), "Commit"),
297
- Branch: /* @__PURE__ */ l((i) => r.branch(zt(i)), "Branch"),
298
- Merge: /* @__PURE__ */ l((i) => r.merge(Dt(i)), "Merge"),
299
- Checkout: /* @__PURE__ */ l((i) => r.checkout(Ft(i)), "Checkout"),
300
- CherryPicking: /* @__PURE__ */ l((i) => r.cherryPick(Nt(i)), "CherryPicking")
301
- }[t.$type];
302
- e ? e(t) : k.error(`Unknown statement type: ${t.$type}`);
303
- }, "parseStatement"), _t = /* @__PURE__ */ l((t) => ({
304
- id: t.id,
305
- msg: t.message ?? "",
306
- type: t.type === void 0 ? x.NORMAL : x[t.type],
307
- tags: t.tags ?? void 0
308
- }), "parseCommit"), zt = /* @__PURE__ */ l((t) => ({
309
- name: t.name,
310
- order: t.order ?? 0
311
- }), "parseBranch"), Dt = /* @__PURE__ */ l((t) => ({
312
- branch: t.branch,
313
- id: t.id ?? "",
314
- type: t.type === void 0 ? void 0 : x[t.type],
315
- tags: t.tags ?? void 0
316
- }), "parseMerge"), Ft = /* @__PURE__ */ l((t) => t.branch, "parseCheckout"), Nt = /* @__PURE__ */ l((t) => ({
317
- id: t.id,
318
- targetId: "",
319
- tags: t.tags?.length === 0 ? void 0 : t.tags,
320
- parent: t.parent
321
- }), "parseCherryPicking"), jt = { parse: /* @__PURE__ */ l(async (t) => {
322
- let r = await wt("gitGraph", t);
323
- k.debug(r), Wt(r, at);
324
- }, "parse") }, P = 10, O = 40, M = 4, I = 2, A = 8, U = /* @__PURE__ */ new Set([
325
- "redux",
326
- "redux-dark",
327
- "redux-color",
328
- "redux-dark-color"
329
- ]), J = 12, X = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), Kt = /* @__PURE__ */ new Set([
330
- "dark",
331
- "redux-dark",
332
- "redux-dark-color",
333
- "neo-dark"
334
- ]), G = /* @__PURE__ */ l((t, r, e = !1) => e && t > 0 ? (t - 1) % (r - 1) + 1 : t % r, "calcColorIndex"), E = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), N = 30, q = /* @__PURE__ */ new Map(), j = [], R = 0, f = "LR", Ut = /* @__PURE__ */ l(() => {
335
- E.clear(), C.clear(), q.clear(), R = 0, j = [], f = "LR";
336
- }, "clear"), it = /* @__PURE__ */ l((t) => {
337
- let r = document.createElementNS("http://www.w3.org/2000/svg", "text");
338
- return (typeof t == "string" ? t.split(/\\n|\n|<br\s*\/?>/gi) : t).forEach((e) => {
339
- let i = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
340
- i.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), i.setAttribute("dy", "1em"), i.setAttribute("x", "0"), i.setAttribute("class", "row"), i.textContent = e.trim(), r.appendChild(i);
341
- }), r;
342
- }, "drawText"), st = /* @__PURE__ */ l((t) => {
343
- let r, e, i;
344
- return f === "BT" ? (e = /* @__PURE__ */ l((s, n) => s <= n, "comparisonFunc"), i = 1 / 0) : (e = /* @__PURE__ */ l((s, n) => s >= n, "comparisonFunc"), i = 0), t.forEach((s) => {
345
- let n = f === "TB" || f == "BT" ? C.get(s)?.y : C.get(s)?.x;
346
- n !== void 0 && e(n, i) && (r = s, i = n);
347
- }), r;
348
- }, "findClosestParent"), Vt = /* @__PURE__ */ l((t) => {
349
- let r = "", e = 1 / 0;
350
- return t.forEach((i) => {
351
- let s = C.get(i).y;
352
- s <= e && (r = i, e = s);
353
- }), r || void 0;
354
- }, "findClosestParentBT"), Yt = /* @__PURE__ */ l((t, r, e) => {
355
- let i = e, s = e, n = [];
356
- t.forEach((o) => {
357
- let a = r.get(o);
358
- if (!a) throw Error(`Commit not found for key ${o}`);
359
- a.parents.length ? (i = Qt(a), s = Math.max(i, s)) : n.push(a), Zt(a, i);
360
- }), i = s, n.forEach((o) => {
361
- Xt(o, i, e);
362
- }), t.forEach((o) => {
363
- let a = r.get(o);
364
- if (a?.parents.length) {
365
- let $ = Vt(a.parents);
366
- i = C.get($).y - O, i <= s && (s = i);
367
- let m = E.get(a.branch).pos, g = i - P;
368
- C.set(a.id, {
369
- x: m,
370
- y: g
371
- });
372
- }
373
- });
374
- }, "setParallelBTPos"), Jt = /* @__PURE__ */ l((t) => {
375
- let r = st(t.parents.filter((i) => i !== null));
376
- if (!r) throw Error(`Closest parent not found for commit ${t.id}`);
377
- let e = C.get(r)?.y;
378
- if (e === void 0) throw Error(`Closest parent position not found for commit ${t.id}`);
379
- return e;
380
- }, "findClosestParentPos"), Qt = /* @__PURE__ */ l((t) => Jt(t) + O, "calculateCommitPosition"), Zt = /* @__PURE__ */ l((t, r) => {
381
- let e = E.get(t.branch);
382
- if (!e) throw Error(`Branch not found for commit ${t.id}`);
383
- let i = e.pos, s = r + P;
384
- return C.set(t.id, {
385
- x: i,
386
- y: s
387
- }), {
388
- x: i,
389
- y: s
390
- };
391
- }, "setCommitPosition"), Xt = /* @__PURE__ */ l((t, r, e) => {
392
- let i = E.get(t.branch);
393
- if (!i) throw Error(`Branch not found for commit ${t.id}`);
394
- let s = r + e, n = i.pos;
395
- C.set(t.id, {
396
- x: n,
397
- y: s
398
- });
399
- }, "setRootPosition"), tr = /* @__PURE__ */ l((t, r, e, i, s, n) => {
400
- let { theme: o } = z(), a = U.has(o ?? ""), $ = X.has(o ?? ""), m = Kt.has(o ?? "");
401
- if (n === x.HIGHLIGHT) t.append("rect").attr("x", e.x - 10 + (a ? 3 : 0)).attr("y", e.y - 10 + (a ? 3 : 0)).attr("width", a ? 14 : 20).attr("height", a ? 14 : 20).attr("class", `commit ${r.id} commit-highlight${G(s, A, $)} ${i}-outer`), t.append("rect").attr("x", e.x - 6 + (a ? 2 : 0)).attr("y", e.y - 6 + (a ? 2 : 0)).attr("width", a ? 8 : 12).attr("height", a ? 8 : 12).attr("class", `commit ${r.id} commit${G(s, A, $)} ${i}-inner`);
402
- else if (n === x.CHERRY_PICK) t.append("circle").attr("cx", e.x).attr("cy", e.y).attr("r", a ? 7 : 10).attr("class", `commit ${r.id} ${i}`), t.append("circle").attr("cx", e.x - 3).attr("cy", e.y + 2).attr("r", a ? 2.5 : 2.75).attr("fill", m ? "#000000" : "#fff").attr("class", `commit ${r.id} ${i}`), t.append("circle").attr("cx", e.x + 3).attr("cy", e.y + 2).attr("r", a ? 2.5 : 2.75).attr("fill", m ? "#000000" : "#fff").attr("class", `commit ${r.id} ${i}`), t.append("line").attr("x1", e.x + 3).attr("y1", e.y + 1).attr("x2", e.x).attr("y2", e.y - 5).attr("stroke", m ? "#000000" : "#fff").attr("class", `commit ${r.id} ${i}`), t.append("line").attr("x1", e.x - 3).attr("y1", e.y + 1).attr("x2", e.x).attr("y2", e.y - 5).attr("stroke", m ? "#000000" : "#fff").attr("class", `commit ${r.id} ${i}`);
403
- else {
404
- let g = t.append("circle");
405
- if (g.attr("cx", e.x), g.attr("cy", e.y), g.attr("r", a ? 7 : 10), g.attr("class", `commit ${r.id} commit${G(s, A, $)}`), n === x.MERGE) {
406
- let h = t.append("circle");
407
- h.attr("cx", e.x), h.attr("cy", e.y), h.attr("r", a ? 5 : 6), h.attr("class", `commit ${i} ${r.id} commit${G(s, A, $)}`);
408
- }
409
- if (n === x.REVERSE) {
410
- let h = t.append("path"), c = a ? 4 : 5;
411
- h.attr("d", `M ${e.x - c},${e.y - c}L${e.x + c},${e.y + c}M${e.x - c},${e.y + c}L${e.x + c},${e.y - c}`).attr("class", `commit ${i} ${r.id} commit${G(s, A, $)}`);
412
- }
413
- }
414
- }, "drawCommitBullet"), rr = /* @__PURE__ */ l((t, r, e, i, s) => {
415
- if (r.type !== x.CHERRY_PICK && (r.customId && r.type === x.MERGE || r.type !== x.MERGE) && s.showCommitLabel) {
416
- let n = t.append("g"), o = n.insert("rect").attr("class", "commit-label-bkg"), a = n.append("text").attr("x", i).attr("y", e.y + 25).attr("class", "commit-label").text(r.id), $ = a.node()?.getBBox();
417
- if ($ && (o.attr("x", e.posWithOffset - $.width / 2 - I).attr("y", e.y + 13.5).attr("width", $.width + 2 * I).attr("height", $.height + 2 * I), f === "TB" || f === "BT" ? (o.attr("x", e.x - ($.width + 4 * M + 5)).attr("y", e.y - 12), a.attr("x", e.x - ($.width + 4 * M)).attr("y", e.y + $.height - 12)) : a.attr("x", e.posWithOffset - $.width / 2), s.rotateCommitLabel)) if (f === "TB" || f === "BT") a.attr("transform", "rotate(-45, " + e.x + ", " + e.y + ")"), o.attr("transform", "rotate(-45, " + e.x + ", " + e.y + ")");
418
- else {
419
- let m = -7.5 - ($.width + 10) / 25 * 9.5, g = 10 + $.width / 25 * 8.5;
420
- n.attr("transform", "translate(" + m + ", " + g + ") rotate(-45, " + i + ", " + e.y + ")");
421
- }
422
- }
423
- }, "drawCommitLabel"), er = /* @__PURE__ */ l((t, r, e, i) => {
424
- if (r.tags.length > 0) {
425
- let s = 0, n = 0, o = 0, a = [];
426
- for (let $ of r.tags.reverse()) {
427
- let m = t.insert("polygon"), g = t.append("circle"), h = t.append("text").attr("y", e.y - 16 - s).attr("class", "tag-label").text($), c = h.node()?.getBBox();
428
- if (!c) throw Error("Tag bbox not found");
429
- n = Math.max(n, c.width), o = Math.max(o, c.height), h.attr("x", e.posWithOffset - c.width / 2), a.push({
430
- tag: h,
431
- hole: g,
432
- rect: m,
433
- yOffset: s
434
- }), s += 20;
435
- }
436
- for (let { tag: $, hole: m, rect: g, yOffset: h } of a) {
437
- let c = o / 2, p = e.y - 19.2 - h;
438
- if (g.attr("class", "tag-label-bkg").attr("points", `
439
- ${i - n / 2 - M / 2},${p + I}
440
- ${i - n / 2 - M / 2},${p - I}
441
- ${e.posWithOffset - n / 2 - M},${p - c - I}
442
- ${e.posWithOffset + n / 2 + M},${p - c - I}
443
- ${e.posWithOffset + n / 2 + M},${p + c + I}
444
- ${e.posWithOffset - n / 2 - M},${p + c + I}`), m.attr("cy", p).attr("cx", i - n / 2 + M / 2).attr("r", 1.5).attr("class", "tag-hole"), f === "TB" || f === "BT") {
445
- let y = i + h;
446
- g.attr("class", "tag-label-bkg").attr("points", `
447
- ${e.x},${y + 2}
448
- ${e.x},${y - 2}
449
- ${e.x + P},${y - c - 2}
450
- ${e.x + P + n + 4},${y - c - 2}
451
- ${e.x + P + n + 4},${y + c + 2}
452
- ${e.x + P},${y + c + 2}`).attr("transform", "translate(12,12) rotate(45, " + e.x + "," + i + ")"), m.attr("cx", e.x + M / 2).attr("cy", y).attr("transform", "translate(12,12) rotate(45, " + e.x + "," + i + ")"), $.attr("x", e.x + 5).attr("y", y + 3).attr("transform", "translate(14,14) rotate(45, " + e.x + "," + i + ")");
453
- }
454
- }
455
- }
456
- }, "drawCommitTags"), or = /* @__PURE__ */ l((t) => {
457
- switch (t.customType ?? t.type) {
458
- case x.NORMAL:
459
- return "commit-normal";
460
- case x.REVERSE:
461
- return "commit-reverse";
462
- case x.HIGHLIGHT:
463
- return "commit-highlight";
464
- case x.MERGE:
465
- return "commit-merge";
466
- case x.CHERRY_PICK:
467
- return "commit-cherry-pick";
468
- default:
469
- return "commit-normal";
470
- }
471
- }, "getCommitClassType"), ar = /* @__PURE__ */ l((t, r, e, i) => {
472
- let s = {
473
- x: 0,
474
- y: 0
475
- };
476
- if (t.parents.length > 0) {
477
- let n = st(t.parents);
478
- if (n) {
479
- let o = i.get(n) ?? s;
480
- return r === "TB" ? o.y + O : r === "BT" ? (i.get(t.id) ?? s).y - O : o.x + O;
481
- }
482
- } else return r === "TB" ? N : r === "BT" ? (i.get(t.id) ?? s).y - O : 0;
483
- return 0;
484
- }, "calculatePosition"), ir = /* @__PURE__ */ l((t, r, e) => {
485
- let i = f === "BT" && e ? r : r + P, s = E.get(t.branch)?.pos, n = f === "TB" || f === "BT" ? E.get(t.branch)?.pos : i;
486
- if (n === void 0 || s === void 0) throw Error(`Position were undefined for commit ${t.id}`);
487
- let o = U.has(z().theme ?? "");
488
- return {
489
- x: n,
490
- y: f === "TB" || f === "BT" ? i : s + (o ? J / 2 + 1 : -2),
491
- posWithOffset: i
492
- };
493
- }, "getCommitPosition"), tt = /* @__PURE__ */ l((t, r, e, i) => {
494
- let s = t.append("g").attr("class", "commit-bullets"), n = t.append("g").attr("class", "commit-labels"), o = f === "TB" || f === "BT" ? N : 0, a = [...r.keys()], $ = i.parallelCommits ?? !1, m = /* @__PURE__ */ l((h, c) => {
495
- let p = r.get(h)?.seq, y = r.get(c)?.seq;
496
- return p !== void 0 && y !== void 0 ? p - y : 0;
497
- }, "sortKeys"), g = a.sort(m);
498
- f === "BT" && ($ && Yt(g, r, o), g = g.reverse()), g.forEach((h) => {
499
- let c = r.get(h);
500
- if (!c) throw Error(`Commit not found for key ${h}`);
501
- $ && (o = ar(c, f, o, C));
502
- let p = ir(c, o, $);
503
- if (e) {
504
- let y = or(c), u = c.customType ?? c.type;
505
- tr(s, c, p, y, E.get(c.branch)?.index ?? 0, u), rr(n, c, p, o, i), er(n, c, p, o);
506
- }
507
- f === "TB" || f === "BT" ? C.set(c.id, {
508
- x: p.x,
509
- y: p.posWithOffset
510
- }) : C.set(c.id, {
511
- x: p.posWithOffset,
512
- y: p.y
513
- }), o = f === "BT" && $ ? o + O : o + O + P, o > R && (R = o);
514
- });
515
- }, "drawCommits"), sr = /* @__PURE__ */ l((t, r, e, i, s) => {
516
- let n = (f === "TB" || f === "BT" ? e.x < i.x : e.y < i.y) ? r.branch : t.branch, o = /* @__PURE__ */ l(($) => $.branch === n, "isOnBranchToGetCurve"), a = /* @__PURE__ */ l(($) => $.seq > t.seq && $.seq < r.seq, "isBetweenCommits");
517
- return [...s.values()].some(($) => a($) && o($));
518
- }, "shouldRerouteArrow"), _ = /* @__PURE__ */ l((t, r, e = 0) => {
519
- let i = t + Math.abs(t - r) / 2;
520
- return e > 5 ? i : j.every((s) => Math.abs(s - i) >= 10) ? (j.push(i), i) : _(t, r - Math.abs(t - r) / 5, e + 1);
521
- }, "findLane"), nr = /* @__PURE__ */ l((t, r, e, i) => {
522
- let { theme: s } = z(), n = X.has(s ?? ""), o = C.get(r.id), a = C.get(e.id);
523
- if (o === void 0 || a === void 0) throw Error(`Commit positions not found for commits ${r.id} and ${e.id}`);
524
- let $ = sr(r, e, o, a, i), m = "", g = "", h = 0, c = 0, p = E.get(e.branch)?.index;
525
- e.type === x.MERGE && r.id !== e.parents[0] && (p = E.get(r.branch)?.index);
526
- let y;
527
- if ($) {
528
- m = "A 10 10, 0, 0, 0,", g = "A 10 10, 0, 0, 1,", h = 10, c = 10;
529
- let u = o.y < a.y ? _(o.y, a.y) : _(a.y, o.y), b = o.x < a.x ? _(o.x, a.x) : _(a.x, o.x);
530
- f === "TB" ? o.x < a.x ? y = `M ${o.x} ${o.y} L ${b - h} ${o.y} ${g} ${b} ${o.y + c} L ${b} ${a.y - h} ${m} ${b + c} ${a.y} L ${a.x} ${a.y}` : (p = E.get(r.branch)?.index, y = `M ${o.x} ${o.y} L ${b + h} ${o.y} ${m} ${b} ${o.y + c} L ${b} ${a.y - h} ${g} ${b - c} ${a.y} L ${a.x} ${a.y}`) : f === "BT" ? o.x < a.x ? y = `M ${o.x} ${o.y} L ${b - h} ${o.y} ${m} ${b} ${o.y - c} L ${b} ${a.y + h} ${g} ${b + c} ${a.y} L ${a.x} ${a.y}` : (p = E.get(r.branch)?.index, y = `M ${o.x} ${o.y} L ${b + h} ${o.y} ${g} ${b} ${o.y - c} L ${b} ${a.y + h} ${m} ${b - c} ${a.y} L ${a.x} ${a.y}`) : o.y < a.y ? y = `M ${o.x} ${o.y} L ${o.x} ${u - h} ${m} ${o.x + c} ${u} L ${a.x - h} ${u} ${g} ${a.x} ${u + c} L ${a.x} ${a.y}` : (p = E.get(r.branch)?.index, y = `M ${o.x} ${o.y} L ${o.x} ${u + h} ${g} ${o.x + c} ${u} L ${a.x - h} ${u} ${m} ${a.x} ${u - c} L ${a.x} ${a.y}`);
531
- } else m = "A 20 20, 0, 0, 0,", g = "A 20 20, 0, 0, 1,", h = 20, c = 20, f === "TB" ? (o.x < a.x && (y = e.type === x.MERGE && r.id !== e.parents[0] ? `M ${o.x} ${o.y} L ${o.x} ${a.y - h} ${m} ${o.x + c} ${a.y} L ${a.x} ${a.y}` : `M ${o.x} ${o.y} L ${a.x - h} ${o.y} ${g} ${a.x} ${o.y + c} L ${a.x} ${a.y}`), o.x > a.x && (m = "A 20 20, 0, 0, 0,", g = "A 20 20, 0, 0, 1,", h = 20, c = 20, y = e.type === x.MERGE && r.id !== e.parents[0] ? `M ${o.x} ${o.y} L ${o.x} ${a.y - h} ${g} ${o.x - c} ${a.y} L ${a.x} ${a.y}` : `M ${o.x} ${o.y} L ${a.x + h} ${o.y} ${m} ${a.x} ${o.y + c} L ${a.x} ${a.y}`), o.x === a.x && (y = `M ${o.x} ${o.y} L ${a.x} ${a.y}`)) : f === "BT" ? (o.x < a.x && (y = e.type === x.MERGE && r.id !== e.parents[0] ? `M ${o.x} ${o.y} L ${o.x} ${a.y + h} ${g} ${o.x + c} ${a.y} L ${a.x} ${a.y}` : `M ${o.x} ${o.y} L ${a.x - h} ${o.y} ${m} ${a.x} ${o.y - c} L ${a.x} ${a.y}`), o.x > a.x && (m = "A 20 20, 0, 0, 0,", g = "A 20 20, 0, 0, 1,", h = 20, c = 20, y = e.type === x.MERGE && r.id !== e.parents[0] ? `M ${o.x} ${o.y} L ${o.x} ${a.y + h} ${m} ${o.x - c} ${a.y} L ${a.x} ${a.y}` : `M ${o.x} ${o.y} L ${a.x + h} ${o.y} ${g} ${a.x} ${o.y - c} L ${a.x} ${a.y}`), o.x === a.x && (y = `M ${o.x} ${o.y} L ${a.x} ${a.y}`)) : (o.y < a.y && (y = e.type === x.MERGE && r.id !== e.parents[0] ? `M ${o.x} ${o.y} L ${a.x - h} ${o.y} ${g} ${a.x} ${o.y + c} L ${a.x} ${a.y}` : `M ${o.x} ${o.y} L ${o.x} ${a.y - h} ${m} ${o.x + c} ${a.y} L ${a.x} ${a.y}`), o.y > a.y && (y = e.type === x.MERGE && r.id !== e.parents[0] ? `M ${o.x} ${o.y} L ${a.x - h} ${o.y} ${m} ${a.x} ${o.y - c} L ${a.x} ${a.y}` : `M ${o.x} ${o.y} L ${o.x} ${a.y + h} ${g} ${o.x + c} ${a.y} L ${a.x} ${a.y}`), o.y === a.y && (y = `M ${o.x} ${o.y} L ${a.x} ${a.y}`));
532
- if (y === void 0) throw Error("Line definition not found");
533
- t.append("path").attr("d", y).attr("class", "arrow arrow" + G(p, A, n));
534
- }, "drawArrow"), cr = /* @__PURE__ */ l((t, r) => {
535
- let e = t.append("g").attr("class", "commit-arrows");
536
- [...r.keys()].forEach((i) => {
537
- let s = r.get(i);
538
- s.parents && s.parents.length > 0 && s.parents.forEach((n) => {
539
- nr(e, r.get(n), s, r);
540
- });
541
- });
542
- }, "drawArrows"), dr = /* @__PURE__ */ l((t, r, e, i) => {
543
- let { look: s, theme: n, themeVariables: o } = z(), { dropShadow: a, THEME_COLOR_LIMIT: $ } = o, m = U.has(n ?? ""), g = X.has(n ?? ""), h = t.append("g");
544
- r.forEach((c, p) => {
545
- let y = G(p, m ? $ : A, g), u = E.get(c.name)?.pos;
546
- if (u === void 0) throw Error(`Position not found for branch ${c.name}`);
547
- let b = f === "TB" || f === "BT" ? u : m ? u + J / 2 + 1 : u - 2, B = h.append("line");
548
- B.attr("x1", 0), B.attr("y1", b), B.attr("x2", R), B.attr("y2", b), B.attr("class", "branch branch" + y), f === "TB" ? (B.attr("y1", N), B.attr("x1", u), B.attr("y2", R), B.attr("x2", u)) : f === "BT" && (B.attr("y1", R), B.attr("x1", u), B.attr("y2", N), B.attr("x2", u)), j.push(b);
549
- let V = c.name, W = it(V), T = h.insert("rect"), v = h.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + y);
550
- v.node().appendChild(W);
551
- let w = W.getBBox(), D = m ? 0 : 4, F = m ? 16 : 0, H = m ? J : 0;
552
- s === "neo" && T.attr("data-look", "neo"), T.attr("class", "branchLabelBkg label" + y).attr("style", s === "neo" ? `filter:${m ? `url(#${i}-drop-shadow)` : a}` : "").attr("rx", D).attr("ry", D).attr("x", -w.width - 4 - (e.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -w.height / 2 + 10).attr("width", w.width + 18 + F).attr("height", w.height + 4 + H), v.attr("transform", "translate(" + (-w.width - 14 - (e.rotateCommitLabel === !0 ? 30 : 0) + F / 2) + ", " + (b - w.height / 2 - 2) + ")"), f === "TB" ? (T.attr("x", u - w.width / 2 - 10).attr("y", 0), v.attr("transform", "translate(" + (u - w.width / 2 - 5) + ", 0)"), m && (T.attr("transform", `translate(${-F / 2 - 3}, ${-H - 10})`), v.attr("transform", "translate(" + (u - w.width / 2 - 5) + ", " + (-H * 2 + 7) + ")"))) : f === "BT" ? (T.attr("x", u - w.width / 2 - 10).attr("y", R), v.attr("transform", "translate(" + (u - w.width / 2 - 5) + ", " + R + ")"), m && (T.attr("transform", `translate(${-F / 2 - 3}, ${H + 10})`), v.attr("transform", "translate(" + (u - w.width / 2 - 5) + ", " + (R + H * 2 + 4) + ")"))) : T.attr("transform", "translate(-19, " + (b - 12 - H / 2) + ")");
553
- });
554
- }, "drawBranches"), lr = /* @__PURE__ */ l(function(t, r, e, i, s) {
555
- return E.set(t, {
556
- pos: r,
557
- index: e
558
- }), r += 50 + (s ? 40 : 0) + (f === "TB" || f === "BT" ? i.width / 2 : 0), r;
559
- }, "setBranchPosition"), hr = { draw: /* @__PURE__ */ l(function(t, r, e, i) {
560
- Ut(), k.debug("in gitgraph renderer", t + `
561
- `, "id:", r, e);
562
- let s = i.db;
563
- if (!s.getConfig) {
564
- k.error("getConfig method is not available on db");
565
- return;
566
- }
567
- let n = s.getConfig(), o = n.rotateCommitLabel ?? !1;
568
- q = s.getCommits();
569
- let a = s.getBranchesAsObjArray();
570
- f = s.getDirection();
571
- let $ = yt(`[id="${r}"]`), { look: m, theme: g, themeVariables: h } = z(), { useGradient: c, gradientStart: p, gradientStop: y, filterColor: u } = h;
572
- if (c) {
573
- let B = $.append("defs").append("linearGradient").attr("id", r + "-gradient").attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
574
- B.append("stop").attr("offset", "0%").attr("stop-color", p).attr("stop-opacity", 1), B.append("stop").attr("offset", "100%").attr("stop-color", y).attr("stop-opacity", 1);
575
- }
576
- m === "neo" && U.has(g ?? "") && $.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", u);
577
- let b = 0;
578
- a.forEach((B, V) => {
579
- let W = it(B.name), T = $.append("g"), v = T.insert("g").attr("class", "branchLabel"), w = v.insert("g").attr("class", "label branch-label");
580
- w.node()?.appendChild(W);
581
- let D = W.getBBox();
582
- b = lr(B.name, b, V, D, o), w.remove(), v.remove(), T.remove();
583
- }), tt($, q, !1, n), n.showBranches && dr($, a, n, r), cr($, q), tt($, q, !0, n), ft.insertTitle($, "gitTitleText", n.titleTopMargin ?? 0, s.getDiagramTitle()), pt(void 0, $, n.diagramPadding, n.useMaxWidth);
584
- }, "draw") }, nt = 8, ct = /* @__PURE__ */ new Set([
585
- "redux",
586
- "redux-dark",
587
- "redux-color",
588
- "redux-dark-color"
589
- ]), $r = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), mr = /* @__PURE__ */ new Set(["neo", "neo-dark"]), gr = /* @__PURE__ */ new Set([
590
- "dark",
591
- "redux-dark",
592
- "redux-dark-color",
593
- "neo-dark"
594
- ]), yr = /* @__PURE__ */ new Set([
595
- "redux",
596
- "redux-dark",
597
- "redux-color",
598
- "redux-dark-color",
599
- "neo",
600
- "neo-dark"
601
- ]), fr = /* @__PURE__ */ l((t) => {
602
- let { svgId: r } = t, e = "";
603
- if (t.useGradient && r) for (let i = 0; i < t.THEME_COLOR_LIMIT; i++) e += `
604
- .label${i} { fill: ${t.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${t.strokeWidth};}
605
- `;
606
- return e;
607
- }, "genGitGraphGradient"), pr = /* @__PURE__ */ l((t) => {
608
- let { theme: r, themeVariables: e } = Q(), { borderColorArray: i } = e, s = ct.has(r);
609
- if (mr.has(r)) {
610
- let n = "";
611
- for (let o = 0; o < t.THEME_COLOR_LIMIT; o++) if (o === 0) n += `
612
- .branch-label${o} { fill: ${t.nodeBorder};}
613
- .commit${o} { stroke: ${t.nodeBorder}; }
614
- .commit-highlight${o} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }
615
- .arrow${o} { stroke: ${t.nodeBorder}; }
616
- .commit-bullets { fill: ${t.nodeBorder}; }
617
- .commit-cherry-pick${o} { stroke: ${t.nodeBorder}; }
618
- ${fr(t)}`;
619
- else {
620
- let a = o % nt;
621
- n += `
622
- .branch-label${o} { fill: ${t["gitBranchLabel" + a]}; }
623
- .commit${o} { stroke: ${t["git" + a]}; fill: ${t["git" + a]}; }
624
- .commit-highlight${o} { stroke: ${t["gitInv" + a]}; fill: ${t["gitInv" + a]}; }
625
- .arrow${o} { stroke: ${t["git" + a]}; }
626
- `;
627
- }
628
- return n;
629
- } else if ($r.has(r)) {
630
- let n = "";
631
- for (let o = 0; o < t.THEME_COLOR_LIMIT; o++) if (o === 0) n += `
632
- .branch-label${o} { fill: ${t.nodeBorder}; ${s ? `font-weight:${t.noteFontWeight}` : ""} }
633
- .commit${o} { stroke: ${t.nodeBorder}; }
634
- .commit-highlight${o} { stroke: ${t.nodeBorder}; fill: ${t.mainBkg}; }
635
- .label${o} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${s ? `font-weight:${t.noteFontWeight}` : ""} }
636
- .arrow${o} { stroke: ${t.nodeBorder}; }
637
- .commit-bullets { fill: ${t.nodeBorder}; }
638
- `;
639
- else {
640
- let a = o % i.length;
641
- n += `
642
- .branch-label${o} { fill: ${t.nodeBorder}; ${s ? `font-weight:${t.noteFontWeight}` : ""} }
643
- .commit${o} { stroke: ${i[a]}; fill: ${i[a]}; }
644
- .commit-highlight${o} { stroke: ${i[a]}; fill: ${i[a]}; }
645
- .label${o} { fill: ${gr.has(r) ? t.mainBkg : i[a]}; stroke: ${i[a]}; stroke-width: ${t.strokeWidth}; }
646
- .arrow${o} { stroke: ${i[a]}; }
647
- `;
648
- }
649
- return n;
650
- } else {
651
- let n = "";
652
- for (let o = 0; o < t.THEME_COLOR_LIMIT; o++) n += `
653
- .branch-label${o} { fill: ${t.nodeBorder}; ${s ? `font-weight:${t.noteFontWeight}` : ""} }
654
- .commit${o} { stroke: ${t.nodeBorder}; }
655
- .commit-highlight${o} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }
656
- .label${o} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${s ? `font-weight:${t.noteFontWeight}` : ""}}
657
- .arrow${o} { stroke: ${t.nodeBorder}; }
658
- .commit-bullets { fill: ${t.nodeBorder}; }
659
- .commit-cherry-pick${o} { stroke: ${t.nodeBorder}; }
660
- `;
661
- return n;
662
- }
663
- }, "genColor"), xr = /* @__PURE__ */ l((t) => `${Array.from({ length: t.THEME_COLOR_LIMIT }, (r, e) => e).map((r) => {
664
- let e = r % nt;
665
- return `
666
- .branch-label${r} { fill: ${t["gitBranchLabel" + e]}; }
667
- .commit${r} { stroke: ${t["git" + e]}; fill: ${t["git" + e]}; }
668
- .commit-highlight${r} { stroke: ${t["gitInv" + e]}; fill: ${t["gitInv" + e]}; }
669
- .label${r} { fill: ${t["git" + e]}; }
670
- .arrow${r} { stroke: ${t["git" + e]}; }
671
- `;
672
- }).join(`
673
- `)}`, "normalTheme"), wr = {
674
- parser: jt,
675
- db: at,
676
- renderer: hr,
677
- styles: /* @__PURE__ */ l((t) => {
678
- let { theme: r } = Q(), e = yr.has(r);
679
- return `
680
- .commit-id,
681
- .commit-msg,
682
- .branch-label {
683
- fill: lightgrey;
684
- color: lightgrey;
685
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
686
- font-family: var(--mermaid-font-family);
687
- }
688
-
689
- ${e ? pr(t) : xr(t)}
690
-
691
- .branch {
692
- stroke-width: ${t.strokeWidth};
693
- stroke: ${t.commitLineColor ?? t.lineColor};
694
- stroke-dasharray: ${e ? "4 2" : "2"};
695
- }
696
- .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${e ? t.nodeBorder : t.commitLabelColor}; ${e ? `font-weight:${t.noteFontWeight};` : ""}}
697
- .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${e ? "transparent" : t.commitLabelBackground}; opacity: ${e ? "" : 0.5}; }
698
- .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
699
- .tag-label-bkg { fill: ${e ? t.mainBkg : t.tagLabelBackground}; stroke: ${e ? t.nodeBorder : t.tagLabelBorder}; ${e ? `filter:${t.dropShadow}` : ""} }
700
- .tag-hole { fill: ${t.textColor}; }
701
-
702
- .commit-merge {
703
- stroke: ${e ? t.mainBkg : t.primaryColor};
704
- fill: ${e ? t.mainBkg : t.primaryColor};
705
- }
706
- .commit-reverse {
707
- stroke: ${e ? t.mainBkg : t.primaryColor};
708
- fill: ${e ? t.mainBkg : t.primaryColor};
709
- stroke-width: ${e ? t.strokeWidth : 3};
710
- }
711
- .commit-highlight-outer {
712
- }
713
- .commit-highlight-inner {
714
- stroke: ${e ? t.mainBkg : t.primaryColor};
715
- fill: ${e ? t.mainBkg : t.primaryColor};
716
- }
717
-
718
- .arrow {
719
- /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
720
- stroke-width: ${ct.has(r) ? t.strokeWidth : 8};
721
- stroke-linecap: round;
722
- fill: none
723
- }
724
- .gitTitleText {
725
- text-anchor: middle;
726
- font-size: 18px;
727
- fill: ${t.textColor};
728
- }
729
- `;
730
- }, "getStyles")
731
- };
732
- export {
733
- wr as diagram
734
- };