@schmitech/chatbot-widget 0.6.3 → 0.7.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 (82) hide show
  1. package/dist/ChatWidget.d.ts +11 -0
  2. package/dist/{_baseUniq-BPMphbq5-xiRWQlDn.js → _baseUniq-BRKsqoH--HqBVqMpT.js} +126 -126
  3. package/dist/arc-pab_su9s-DkImmxyv.js +84 -0
  4. package/dist/architecture-U656AL7Q-CRlU-eNB-vFayp_Gk.js +7 -0
  5. package/dist/{architectureDiagram-VXUJARFQ-BiqZtsDe-rYpYn0Hz.js → architectureDiagram-VXUJARFQ-DqQ8r_6g-DTzMoAeY.js} +5 -5
  6. package/dist/{blockDiagram-VD42YOAC-zcRIdFTD-B54KiQJD.js → blockDiagram-VD42YOAC-B-dKfcH3-DKPGmrNb.js} +50 -50
  7. package/dist/{c4Diagram-YG6GDRKO-DYXNcDX4-B9fXQAMg.js → c4Diagram-YG6GDRKO-DMUPaBEl-CXjiCiKq.js} +63 -63
  8. package/dist/channel-HKsfPa5q-B30_3C0d.js +6 -0
  9. package/dist/chatbot-widget.bundle.js +11596 -0
  10. package/dist/chatbot-widget.es.js +1 -1
  11. package/dist/chatbot-widget.umd.js +4342 -3550
  12. package/dist/{chunk-4BX2VUAB-DAh9ktmY-CF6YTNXg.js → chunk-4BX2VUAB-CX67kh_B-JdLaNmBY.js} +1 -1
  13. package/dist/chunk-55IACEB6-BocSyyvr--btUJ1po.js +9 -0
  14. package/dist/{chunk-B4BG7PRW-BTUSpeKy-CXaYsx4a.js → chunk-B4BG7PRW-CO8QAyfE-p5mLBzD4.js} +30 -30
  15. package/dist/{chunk-DI55MBZ5-DKt4WII7-CjsnNRFb.js → chunk-DI55MBZ5-Dw1L6Eos-zQC2oI_e.js} +149 -149
  16. package/dist/{chunk-FMBD7UC4-DdcCR8w3-BbYkKjQZ.js → chunk-FMBD7UC4-dPK7Boav-C-fxYlU9.js} +1 -1
  17. package/dist/{chunk-QN33PNHL-v6AkzOl1-DrzKpDUJ.js → chunk-QN33PNHL-vP2PqfVG-ByquTp49.js} +5 -5
  18. package/dist/{chunk-QZHKN3VN-DVJOrqBZ-BQORk0pj.js → chunk-QZHKN3VN-Bcidzu63-ukwvi4Mt.js} +1 -1
  19. package/dist/{chunk-TZMSLE5B-G2jJHqli-B_BRSOS0.js → chunk-TZMSLE5B-BtljMjlg-DP4v1MME.js} +1 -1
  20. package/dist/{classDiagram-v2-WZHVMYZB-CxmgTanh-ByLirDpd.js → classDiagram-2ON5EDUG-C7cYN9hv-CtX4c_16.js} +2 -2
  21. package/dist/{classDiagram-2ON5EDUG-CxmgTanh-ByLirDpd.js → classDiagram-v2-WZHVMYZB-C7cYN9hv-CtX4c_16.js} +2 -2
  22. package/dist/{clone-CsNB4mMi-B2bGL_Hr.js → clone-DoPb9X13-BkFPVisk.js} +1 -1
  23. package/dist/config/index.d.ts +81 -0
  24. package/dist/{cose-bilkent-S5V4N54A-BRr2Y6dg-C4O3AMLV.js → cose-bilkent-S5V4N54A-BGzO4EsH-BNoSF82N.js} +1 -1
  25. package/dist/{dagre-6UL2VRFP-DX8gNHmJ-BSzSR8Xh.js → dagre-6UL2VRFP-TzNvXCds-Dnr2OGZv.js} +45 -45
  26. package/dist/{diagram-PSM6KHXK-DNX818To-D60Hp_rL.js → diagram-PSM6KHXK-BqY4RpUg-BAHxSfLA.js} +119 -119
  27. package/dist/{diagram-QEK2KX5R-BDO6hKtm-BHvRInjZ.js → diagram-QEK2KX5R-CTjgBsne-D-9APhrR.js} +74 -74
  28. package/dist/{diagram-S2PKOQOG-IEqaDwzi-CZZkmLuc.js → diagram-S2PKOQOG-BqrhTIpA-DvsAaFEx.js} +21 -21
  29. package/dist/{erDiagram-Q2GNP2WA-DbLpN8Jp-902zC-_U.js → erDiagram-Q2GNP2WA-B2hsi_Tl-CQQl2KTS.js} +24 -24
  30. package/dist/{flowDiagram-NV44I4VS-pJlHae8Y-hM8e9jah.js → flowDiagram-NV44I4VS-C03vtt_F-Ds5DxRz1.js} +37 -37
  31. package/dist/{ganttDiagram-JELNMOA3-J0Tkq5TR-C8n0Mtt1.js → ganttDiagram-JELNMOA3-B3hAg964-D9cHQTuZ.js} +110 -110
  32. package/dist/gitGraph-F6HP7TQM-B-XXB6PA-CXOJho2m.js +7 -0
  33. package/dist/{gitGraphDiagram-NY62KEGX-DgYonpsZ-CAVA4-Vo.js → gitGraphDiagram-NY62KEGX-ByhMH0yZ-DTWIR_Gp.js} +238 -238
  34. package/dist/{graph-BpcfrHXY-Dllj_YdG.js → graph-BmNkcFEM-CTJN7Ty_.js} +67 -67
  35. package/dist/hooks/useAnimationManagement.d.ts +16 -0
  36. package/dist/hooks/useInputManagement.d.ts +21 -0
  37. package/dist/hooks/useScrollManagement.d.ts +17 -0
  38. package/dist/index-BXexqYFc-Bn0M0HQB.js +13693 -0
  39. package/dist/{index-DlxA4QQ9.js → index-DU3Jqd59.js} +80142 -50172
  40. package/dist/index.d.ts +19 -0
  41. package/dist/info-NVLQJR56-BJV_yXNb-CH_hMh0K.js +7 -0
  42. package/dist/infoDiagram-WHAUD3N6-is6Ho4-T-E3qEjHYs.js +25 -0
  43. package/dist/{journeyDiagram-XKPGCS4Q-CfjB2Qdf-nD3bX36U.js → journeyDiagram-XKPGCS4Q-CRTOL26C-VvuJ7JPc.js} +71 -71
  44. package/dist/{kanban-definition-3W4ZIXB7-CrW8yVmd-C_Okjmcp.js → kanban-definition-3W4ZIXB7-CNnO_t6O-BsqhwZAY.js} +88 -88
  45. package/dist/{layout-bsfAhWjc-fb3F3QBs.js → layout-C0kZPebx-CrIgKtBd.js} +109 -109
  46. package/dist/{mermaid-parser.core-3GIbpcw--KxsyRnD0.js → mermaid-parser.core-C88_DDui-CHG6v5qB.js} +10 -10
  47. package/dist/min-7Gb0pNxh-Cd_K7Lpk.js +39 -0
  48. package/dist/{mindmap-definition-VGOIOE7T-Dj37RkY_-BXffQH_4.js → mindmap-definition-VGOIOE7T-CJZ2wTTa-D4yK-MK1.js} +40 -40
  49. package/dist/packet-BFZMPI3H-DPt2EftX-Bgsdgnv-.js +7 -0
  50. package/dist/pie-7BOR55EZ-aEOtXZZV-CT0TLfil.js +7 -0
  51. package/dist/{pieDiagram-ADFJNKIX-BiQvDx8I-DnApOdvY.js → pieDiagram-ADFJNKIX-C9OSknjr-DguaGmOm.js} +49 -49
  52. package/dist/{quadrantDiagram-AYHSOK5B-D4b-YFzI-DrTslixM.js → quadrantDiagram-AYHSOK5B-CW8yuAqv-Dp9c_xnT.js} +54 -54
  53. package/dist/radar-NHE76QYJ-Dv7iPziq-DzohugO5.js +7 -0
  54. package/dist/{requirementDiagram-UZGBJVZJ-km07nlVd-C-mMa1KG.js → requirementDiagram-UZGBJVZJ-nGPhruO1-DINXeP9u.js} +5 -5
  55. package/dist/{sankeyDiagram-TZEHDZUN-LfuSRRbf-4X6kl_ss.js → sankeyDiagram-TZEHDZUN-CmL90u-m-YTiy7xgb.js} +146 -146
  56. package/dist/{sequenceDiagram-WL72ISMW-CQ4J-0_7-CEQiE3WJ.js → sequenceDiagram-WL72ISMW-B02VRcnM-B0n6W8Zi.js} +3 -3
  57. package/dist/shared/styles.d.ts +76 -0
  58. package/dist/{stateDiagram-FKZM4ZOC-JtogJwt6-YmKguJGd.js → stateDiagram-FKZM4ZOC-DjoyLUdz-BEUNa8-U.js} +14 -14
  59. package/dist/{stateDiagram-v2-4FDKWEC3-DuQ7UaeU-D6r92VaJ.js → stateDiagram-v2-4FDKWEC3-Bq76BTB7-DJxNsvnB.js} +2 -2
  60. package/dist/store/chatStore.d.ts +19 -0
  61. package/dist/{timeline-definition-IT6M3QCI-Cs3NnF2M-BigQwSNM.js → timeline-definition-IT6M3QCI-CTn0Gm3T-sHrk-A3B.js} +78 -78
  62. package/dist/treemap-KMMF4GRG-BjgLKKyi-CXHyJ_sr.js +7 -0
  63. package/dist/ui/ChatInput.d.ts +17 -0
  64. package/dist/ui/Message.d.ts +22 -0
  65. package/dist/ui/MessagesList.d.ts +32 -0
  66. package/dist/utils/contentFiltering.d.ts +12 -0
  67. package/dist/utils/sessionManager.d.ts +2 -0
  68. package/dist/{xychartDiagram-PRI3JC2R-JzAaXa5z-k94imfkQ.js → xychartDiagram-PRI3JC2R-Cgg6Uija-BysdxdV7.js} +79 -79
  69. package/package.json +9 -9
  70. package/dist/arc-D9rhTKV0-3XdW6Lry.js +0 -84
  71. package/dist/architecture-U656AL7Q-BFNI3st4-ChEUjpe5.js +0 -6
  72. package/dist/channel-CUIutAfm-COC3Ib4R.js +0 -6
  73. package/dist/chunk-55IACEB6-Cza7pcpr-C1E53ZSc.js +0 -9
  74. package/dist/gitGraph-F6HP7TQM-CD3YuciB-WOZqeAgY.js +0 -6
  75. package/dist/index-DvNpGWs7-CTu7Fgm8.js +0 -13251
  76. package/dist/info-NVLQJR56-yPC6AWqF-CQWIUnLc.js +0 -6
  77. package/dist/infoDiagram-WHAUD3N6-C3JLOAnb-o3ipZ1gK.js +0 -25
  78. package/dist/min-C2aDz5ZK-NndI1eE7.js +0 -39
  79. package/dist/packet-BFZMPI3H-3ROFuof--C96yO55O.js +0 -6
  80. package/dist/pie-7BOR55EZ-BZ_QeD6P-Bs0c_r6N.js +0 -6
  81. package/dist/radar-NHE76QYJ-BkSncUeS-jHSdaVBc.js +0 -6
  82. package/dist/treemap-KMMF4GRG-CkW25-tn-CkfndsG5.js +0 -6
@@ -1,7 +1,7 @@
1
- import { m as J } from "./chunk-4BX2VUAB-DAh9ktmY-CF6YTNXg.js";
2
- import { e as U } from "./chunk-QZHKN3VN-DVJOrqBZ-BQORk0pj.js";
3
- import { Q as m, E as Z, v as rr, e as tr, p as er, h as or, B as nr, s as w, k as cr, w as ar, O as sr, K as ir, F as dr, l as C, X as hr, L as $r, T as mr, R as lr } from "./index-DlxA4QQ9.js";
4
- import { j as yr } from "./mermaid-parser.core-3GIbpcw--KxsyRnD0.js";
1
+ import { m as Q } from "./chunk-4BX2VUAB-CX67kh_B-JdLaNmBY.js";
2
+ import { e as X } from "./chunk-QZHKN3VN-Bcidzu63-ukwvi4Mt.js";
3
+ import { t as Z, s as rr, e as tr, f as er, g as or, h as nr, M as m, a as w, d as ar, r as cr, R as ir, N as sr, m as k, K as dr, _ as hr, P as $r, C as mr, Q as lr } from "./index-DU3Jqd59.js";
4
+ import { j as yr } from "./mermaid-parser.core-C88_DDui-CHG6v5qB.js";
5
5
  typeof window < "u" && (window.global = window);
6
6
  var u = {
7
7
  NORMAL: 0,
@@ -9,10 +9,10 @@ var u = {
9
9
  HIGHLIGHT: 2,
10
10
  MERGE: 3,
11
11
  CHERRY_PICK: 4
12
- }, gr = mr.gitGraph, O = /* @__PURE__ */ m(() => hr({
12
+ }, gr = hr.gitGraph, O = /* @__PURE__ */ m(() => dr({
13
13
  ...gr,
14
14
  ...$r().gitGraph
15
- }), "getConfig"), i = new U(() => {
15
+ }), "getConfig"), s = new X(() => {
16
16
  const t = O(), r = t.mainBranchName, e = t.mainBranchOrder;
17
17
  return {
18
18
  mainBranchName: r,
@@ -26,62 +26,62 @@ var u = {
26
26
  options: {}
27
27
  };
28
28
  });
29
- function D() {
29
+ function N() {
30
30
  return lr({ length: 7 });
31
31
  }
32
- m(D, "getID");
33
- function F(t, r) {
32
+ m(N, "getID");
33
+ function K(t, r) {
34
34
  const e = /* @__PURE__ */ Object.create(null);
35
- return t.reduce((c, a) => {
36
- const s = r(a);
37
- return e[s] || (e[s] = !0, c.push(a)), c;
35
+ return t.reduce((a, c) => {
36
+ const i = r(c);
37
+ return e[i] || (e[i] = !0, a.push(c)), a;
38
38
  }, []);
39
39
  }
40
- m(F, "uniqBy");
40
+ m(K, "uniqBy");
41
41
  var pr = /* @__PURE__ */ m(function(t) {
42
- i.records.direction = t;
42
+ s.records.direction = t;
43
43
  }, "setDirection"), fr = /* @__PURE__ */ m(function(t) {
44
44
  w.debug("options str", t), t = t == null ? void 0 : t.trim(), t = t || "{}";
45
45
  try {
46
- i.records.options = JSON.parse(t);
46
+ s.records.options = JSON.parse(t);
47
47
  } catch (r) {
48
48
  w.error("error while parsing gitGraph options", r.message);
49
49
  }
50
50
  }, "setOptions"), xr = /* @__PURE__ */ m(function() {
51
- return i.records.options;
51
+ return s.records.options;
52
52
  }, "getOptions"), ur = /* @__PURE__ */ m(function(t) {
53
53
  let r = t.msg, e = t.id;
54
- const c = t.type;
55
- let a = t.tags;
56
- w.info("commit", r, e, c, a), w.debug("Entering commit:", r, e, c, a);
57
- const s = O();
58
- e = C.sanitizeText(e, s), r = C.sanitizeText(r, s), a = a == null ? void 0 : a.map((h) => C.sanitizeText(h, s));
54
+ const a = t.type;
55
+ let c = t.tags;
56
+ w.info("commit", r, e, a, c), w.debug("Entering commit:", r, e, a, c);
57
+ const i = O();
58
+ e = k.sanitizeText(e, i), r = k.sanitizeText(r, i), c = c == null ? void 0 : c.map((h) => k.sanitizeText(h, i));
59
59
  const d = {
60
- id: e || i.records.seq + "-" + D(),
60
+ id: e || s.records.seq + "-" + N(),
61
61
  message: r,
62
- seq: i.records.seq++,
63
- type: c ?? u.NORMAL,
64
- tags: a ?? [],
65
- parents: i.records.head == null ? [] : [i.records.head.id],
66
- branch: i.records.currBranch
62
+ seq: s.records.seq++,
63
+ type: a ?? u.NORMAL,
64
+ tags: c ?? [],
65
+ parents: s.records.head == null ? [] : [s.records.head.id],
66
+ branch: s.records.currBranch
67
67
  };
68
- i.records.head = d, w.info("main branch", s.mainBranchName), i.records.commits.has(d.id) && w.warn(`Commit ID ${d.id} already exists`), i.records.commits.set(d.id, d), i.records.branches.set(i.records.currBranch, d.id), w.debug("in pushCommit " + d.id);
68
+ s.records.head = d, w.info("main branch", i.mainBranchName), s.records.commits.has(d.id) && w.warn(`Commit ID ${d.id} already exists`), s.records.commits.set(d.id, d), s.records.branches.set(s.records.currBranch, d.id), w.debug("in pushCommit " + d.id);
69
69
  }, "commit"), br = /* @__PURE__ */ m(function(t) {
70
70
  let r = t.name;
71
71
  const e = t.order;
72
- if (r = C.sanitizeText(r, O()), i.records.branches.has(r))
72
+ if (r = k.sanitizeText(r, O()), s.records.branches.has(r))
73
73
  throw new Error(
74
74
  `Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`
75
75
  );
76
- i.records.branches.set(r, i.records.head != null ? i.records.head.id : null), i.records.branchConfig.set(r, { name: r, order: e }), _(r), w.debug("in createBranch");
76
+ s.records.branches.set(r, s.records.head != null ? s.records.head.id : null), s.records.branchConfig.set(r, { name: r, order: e }), F(r), w.debug("in createBranch");
77
77
  }, "branch"), wr = /* @__PURE__ */ m((t) => {
78
78
  let r = t.branch, e = t.id;
79
- const c = t.type, a = t.tags, s = O();
80
- r = C.sanitizeText(r, s), e && (e = C.sanitizeText(e, s));
81
- const d = i.records.branches.get(i.records.currBranch), h = i.records.branches.get(r), l = d ? i.records.commits.get(d) : void 0, o = h ? i.records.commits.get(h) : void 0;
79
+ const a = t.type, c = t.tags, i = O();
80
+ r = k.sanitizeText(r, i), e && (e = k.sanitizeText(e, i));
81
+ const d = s.records.branches.get(s.records.currBranch), h = s.records.branches.get(r), l = d ? s.records.commits.get(d) : void 0, o = h ? s.records.commits.get(h) : void 0;
82
82
  if (l && o && l.branch === r)
83
83
  throw new Error(`Cannot merge branch '${r}' into itself.`);
84
- if (i.records.currBranch === r) {
84
+ if (s.records.currBranch === r) {
85
85
  const $ = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
86
86
  throw $.hash = {
87
87
  text: `merge ${r}`,
@@ -91,7 +91,7 @@ var pr = /* @__PURE__ */ m(function(t) {
91
91
  }
92
92
  if (l === void 0 || !l) {
93
93
  const $ = new Error(
94
- `Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`
94
+ `Incorrect usage of "merge". Current branch (${s.records.currBranch})has no commits`
95
95
  );
96
96
  throw $.hash = {
97
97
  text: `merge ${r}`,
@@ -99,7 +99,7 @@ var pr = /* @__PURE__ */ m(function(t) {
99
99
  expected: ["commit"]
100
100
  }, $;
101
101
  }
102
- if (!i.records.branches.has(r)) {
102
+ if (!s.records.branches.has(r)) {
103
103
  const $ = new Error(
104
104
  'Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist"
105
105
  );
@@ -127,35 +127,35 @@ var pr = /* @__PURE__ */ m(function(t) {
127
127
  expected: ["branch abc"]
128
128
  }, $;
129
129
  }
130
- if (e && i.records.commits.has(e)) {
130
+ if (e && s.records.commits.has(e)) {
131
131
  const $ = new Error(
132
132
  'Incorrect usage of "merge". Commit with id:' + e + " already exists, use different custom id"
133
133
  );
134
134
  throw $.hash = {
135
- text: `merge ${r} ${e} ${c} ${a == null ? void 0 : a.join(" ")}`,
136
- token: `merge ${r} ${e} ${c} ${a == null ? void 0 : a.join(" ")}`,
135
+ text: `merge ${r} ${e} ${a} ${c == null ? void 0 : c.join(" ")}`,
136
+ token: `merge ${r} ${e} ${a} ${c == null ? void 0 : c.join(" ")}`,
137
137
  expected: [
138
- `merge ${r} ${e}_UNIQUE ${c} ${a == null ? void 0 : a.join(" ")}`
138
+ `merge ${r} ${e}_UNIQUE ${a} ${c == null ? void 0 : c.join(" ")}`
139
139
  ]
140
140
  }, $;
141
141
  }
142
142
  const n = h || "", x = {
143
- id: e || `${i.records.seq}-${D()}`,
144
- message: `merged branch ${r} into ${i.records.currBranch}`,
145
- seq: i.records.seq++,
146
- parents: i.records.head == null ? [] : [i.records.head.id, n],
147
- branch: i.records.currBranch,
143
+ id: e || `${s.records.seq}-${N()}`,
144
+ message: `merged branch ${r} into ${s.records.currBranch}`,
145
+ seq: s.records.seq++,
146
+ parents: s.records.head == null ? [] : [s.records.head.id, n],
147
+ branch: s.records.currBranch,
148
148
  type: u.MERGE,
149
- customType: c,
149
+ customType: a,
150
150
  customId: !!e,
151
- tags: a ?? []
151
+ tags: c ?? []
152
152
  };
153
- i.records.head = x, i.records.commits.set(x.id, x), i.records.branches.set(i.records.currBranch, x.id), w.debug(i.records.branches), w.debug("in mergeBranch");
153
+ s.records.head = x, s.records.commits.set(x.id, x), s.records.branches.set(s.records.currBranch, x.id), w.debug(s.records.branches), w.debug("in mergeBranch");
154
154
  }, "merge"), Br = /* @__PURE__ */ m(function(t) {
155
- let r = t.id, e = t.targetId, c = t.tags, a = t.parent;
156
- w.debug("Entering cherryPick:", r, e, c);
157
- const s = O();
158
- if (r = C.sanitizeText(r, s), e = C.sanitizeText(e, s), c = c == null ? void 0 : c.map((l) => C.sanitizeText(l, s)), a = C.sanitizeText(a, s), !r || !i.records.commits.has(r)) {
155
+ let r = t.id, e = t.targetId, a = t.tags, c = t.parent;
156
+ w.debug("Entering cherryPick:", r, e, a);
157
+ const i = O();
158
+ if (r = k.sanitizeText(r, i), e = k.sanitizeText(e, i), a = a == null ? void 0 : a.map((l) => k.sanitizeText(l, i)), c = k.sanitizeText(c, i), !r || !s.records.commits.has(r)) {
159
159
  const l = new Error(
160
160
  'Incorrect usage of "cherryPick". Source commit id should exist and provided'
161
161
  );
@@ -165,20 +165,20 @@ var pr = /* @__PURE__ */ m(function(t) {
165
165
  expected: ["cherry-pick abc"]
166
166
  }, l;
167
167
  }
168
- const d = i.records.commits.get(r);
168
+ const d = s.records.commits.get(r);
169
169
  if (d === void 0 || !d)
170
170
  throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
171
- if (a && !(Array.isArray(d.parents) && d.parents.includes(a)))
171
+ if (c && !(Array.isArray(d.parents) && d.parents.includes(c)))
172
172
  throw new Error(
173
173
  "Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
174
174
  );
175
175
  const h = d.branch;
176
- if (d.type === u.MERGE && !a)
176
+ if (d.type === u.MERGE && !c)
177
177
  throw new Error(
178
178
  "Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
179
179
  );
180
- if (!e || !i.records.commits.has(e)) {
181
- if (h === i.records.currBranch) {
180
+ if (!e || !s.records.commits.has(e)) {
181
+ if (h === s.records.currBranch) {
182
182
  const x = new Error(
183
183
  'Incorrect usage of "cherryPick". Source commit is already on current branch'
184
184
  );
@@ -188,10 +188,10 @@ var pr = /* @__PURE__ */ m(function(t) {
188
188
  expected: ["cherry-pick abc"]
189
189
  }, x;
190
190
  }
191
- const l = i.records.branches.get(i.records.currBranch);
191
+ const l = s.records.branches.get(s.records.currBranch);
192
192
  if (l === void 0 || !l) {
193
193
  const x = new Error(
194
- `Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`
194
+ `Incorrect usage of "cherry-pick". Current branch (${s.records.currBranch})has no commits`
195
195
  );
196
196
  throw x.hash = {
197
197
  text: `cherryPick ${r} ${e}`,
@@ -199,10 +199,10 @@ var pr = /* @__PURE__ */ m(function(t) {
199
199
  expected: ["cherry-pick abc"]
200
200
  }, x;
201
201
  }
202
- const o = i.records.commits.get(l);
202
+ const o = s.records.commits.get(l);
203
203
  if (o === void 0 || !o) {
204
204
  const x = new Error(
205
- `Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`
205
+ `Incorrect usage of "cherry-pick". Current branch (${s.records.currBranch})has no commits`
206
206
  );
207
207
  throw x.hash = {
208
208
  text: `cherryPick ${r} ${e}`,
@@ -211,23 +211,23 @@ var pr = /* @__PURE__ */ m(function(t) {
211
211
  }, x;
212
212
  }
213
213
  const n = {
214
- id: i.records.seq + "-" + D(),
215
- message: `cherry-picked ${d == null ? void 0 : d.message} into ${i.records.currBranch}`,
216
- seq: i.records.seq++,
217
- parents: i.records.head == null ? [] : [i.records.head.id, d.id],
218
- branch: i.records.currBranch,
214
+ id: s.records.seq + "-" + N(),
215
+ message: `cherry-picked ${d == null ? void 0 : d.message} into ${s.records.currBranch}`,
216
+ seq: s.records.seq++,
217
+ parents: s.records.head == null ? [] : [s.records.head.id, d.id],
218
+ branch: s.records.currBranch,
219
219
  type: u.CHERRY_PICK,
220
- tags: c ? c.filter(Boolean) : [
221
- `cherry-pick:${d.id}${d.type === u.MERGE ? `|parent:${a}` : ""}`
220
+ tags: a ? a.filter(Boolean) : [
221
+ `cherry-pick:${d.id}${d.type === u.MERGE ? `|parent:${c}` : ""}`
222
222
  ]
223
223
  };
224
- i.records.head = n, i.records.commits.set(n.id, n), i.records.branches.set(i.records.currBranch, n.id), w.debug(i.records.branches), w.debug("in cherryPick");
224
+ s.records.head = n, s.records.commits.set(n.id, n), s.records.branches.set(s.records.currBranch, n.id), w.debug(s.records.branches), w.debug("in cherryPick");
225
225
  }
226
- }, "cherryPick"), _ = /* @__PURE__ */ m(function(t) {
227
- if (t = C.sanitizeText(t, O()), i.records.branches.has(t)) {
228
- i.records.currBranch = t;
229
- const r = i.records.branches.get(i.records.currBranch);
230
- r === void 0 || !r ? i.records.head = null : i.records.head = i.records.commits.get(r) ?? null;
226
+ }, "cherryPick"), F = /* @__PURE__ */ m(function(t) {
227
+ if (t = k.sanitizeText(t, O()), s.records.branches.has(t)) {
228
+ s.records.currBranch = t;
229
+ const r = s.records.branches.get(s.records.currBranch);
230
+ r === void 0 || !r ? s.records.head = null : s.records.head = s.records.commits.get(r) ?? null;
231
231
  } else {
232
232
  const r = new Error(
233
233
  `Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`
@@ -239,61 +239,61 @@ var pr = /* @__PURE__ */ m(function(t) {
239
239
  }, r;
240
240
  }
241
241
  }, "checkout");
242
- function N(t, r, e) {
243
- const c = t.indexOf(r);
244
- c === -1 ? t.push(e) : t.splice(c, 1, e);
242
+ function D(t, r, e) {
243
+ const a = t.indexOf(r);
244
+ a === -1 ? t.push(e) : t.splice(a, 1, e);
245
245
  }
246
- m(N, "upsert");
246
+ m(D, "upsert");
247
247
  function j(t) {
248
- const r = t.reduce((a, s) => a.seq > s.seq ? a : s, t[0]);
248
+ const r = t.reduce((c, i) => c.seq > i.seq ? c : i, t[0]);
249
249
  let e = "";
250
- t.forEach(function(a) {
251
- a === r ? e += " *" : e += " |";
250
+ t.forEach(function(c) {
251
+ c === r ? e += " *" : e += " |";
252
252
  });
253
- const c = [e, r.id, r.seq];
254
- for (const a in i.records.branches)
255
- i.records.branches.get(a) === r.id && c.push(a);
256
- if (w.debug(c.join(" ")), r.parents && r.parents.length == 2 && r.parents[0] && r.parents[1]) {
257
- const a = i.records.commits.get(r.parents[0]);
258
- N(t, r, a), r.parents[1] && t.push(i.records.commits.get(r.parents[1]));
253
+ const a = [e, r.id, r.seq];
254
+ for (const c in s.records.branches)
255
+ s.records.branches.get(c) === r.id && a.push(c);
256
+ if (w.debug(a.join(" ")), r.parents && r.parents.length == 2 && r.parents[0] && r.parents[1]) {
257
+ const c = s.records.commits.get(r.parents[0]);
258
+ D(t, r, c), r.parents[1] && t.push(s.records.commits.get(r.parents[1]));
259
259
  } else {
260
260
  if (r.parents.length == 0)
261
261
  return;
262
262
  if (r.parents[0]) {
263
- const a = i.records.commits.get(r.parents[0]);
264
- N(t, r, a);
263
+ const c = s.records.commits.get(r.parents[0]);
264
+ D(t, r, c);
265
265
  }
266
266
  }
267
- t = F(t, (a) => a.id), j(t);
267
+ t = K(t, (c) => c.id), j(t);
268
268
  }
269
269
  m(j, "prettyPrintCommitHistory");
270
270
  var Er = /* @__PURE__ */ m(function() {
271
- w.debug(i.records.commits);
271
+ w.debug(s.records.commits);
272
272
  const t = Y()[0];
273
273
  j([t]);
274
274
  }, "prettyPrint"), vr = /* @__PURE__ */ m(function() {
275
- i.reset(), dr();
276
- }, "clear"), kr = /* @__PURE__ */ m(function() {
277
- return [...i.records.branchConfig.values()].map((t, r) => t.order !== null && t.order !== void 0 ? t : {
275
+ s.reset(), sr();
276
+ }, "clear"), Cr = /* @__PURE__ */ m(function() {
277
+ return [...s.records.branchConfig.values()].map((t, r) => t.order !== null && t.order !== void 0 ? t : {
278
278
  ...t,
279
279
  order: parseFloat(`0.${r}`)
280
280
  }).sort((t, r) => (t.order ?? 0) - (r.order ?? 0)).map(({ name: t }) => ({ name: t }));
281
- }, "getBranchesAsObjArray"), Cr = /* @__PURE__ */ m(function() {
282
- return i.records.branches;
281
+ }, "getBranchesAsObjArray"), kr = /* @__PURE__ */ m(function() {
282
+ return s.records.branches;
283
283
  }, "getBranches"), Lr = /* @__PURE__ */ m(function() {
284
- return i.records.commits;
284
+ return s.records.commits;
285
285
  }, "getCommits"), Y = /* @__PURE__ */ m(function() {
286
- const t = [...i.records.commits.values()];
286
+ const t = [...s.records.commits.values()];
287
287
  return t.forEach(function(r) {
288
288
  w.debug(r.id);
289
289
  }), t.sort((r, e) => r.seq - e.seq), t;
290
290
  }, "getCommitsArray"), Tr = /* @__PURE__ */ m(function() {
291
- return i.records.currBranch;
291
+ return s.records.currBranch;
292
292
  }, "getCurrentBranch"), Mr = /* @__PURE__ */ m(function() {
293
- return i.records.direction;
293
+ return s.records.direction;
294
294
  }, "getDirection"), Pr = /* @__PURE__ */ m(function() {
295
- return i.records.head;
296
- }, "getHead"), Q = {
295
+ return s.records.head;
296
+ }, "getHead"), U = {
297
297
  commitType: u,
298
298
  getConfig: O,
299
299
  setDirection: pr,
@@ -303,12 +303,12 @@ var Er = /* @__PURE__ */ m(function() {
303
303
  branch: br,
304
304
  merge: wr,
305
305
  cherryPick: Br,
306
- checkout: _,
306
+ checkout: F,
307
307
  //reset,
308
308
  prettyPrint: Er,
309
309
  clear: vr,
310
- getBranchesAsObjArray: kr,
311
- getBranches: Cr,
310
+ getBranchesAsObjArray: Cr,
311
+ getBranches: kr,
312
312
  getCommits: Lr,
313
313
  getCommitsArray: Y,
314
314
  getCurrentBranch: Tr,
@@ -321,19 +321,19 @@ var Er = /* @__PURE__ */ m(function() {
321
321
  setDiagramTitle: rr,
322
322
  getDiagramTitle: Z
323
323
  }, Rr = /* @__PURE__ */ m((t, r) => {
324
- J(t, r), t.dir && r.setDirection(t.dir);
324
+ Q(t, r), t.dir && r.setDirection(t.dir);
325
325
  for (const e of t.statements)
326
- Ir(e, r);
327
- }, "populate"), Ir = /* @__PURE__ */ m((t, r) => {
326
+ Ar(e, r);
327
+ }, "populate"), Ar = /* @__PURE__ */ m((t, r) => {
328
328
  const e = {
329
- Commit: /* @__PURE__ */ m((c) => r.commit(Ar(c)), "Commit"),
330
- Branch: /* @__PURE__ */ m((c) => r.branch(Gr(c)), "Branch"),
331
- Merge: /* @__PURE__ */ m((c) => r.merge(Or(c)), "Merge"),
332
- Checkout: /* @__PURE__ */ m((c) => r.checkout(qr(c)), "Checkout"),
333
- CherryPicking: /* @__PURE__ */ m((c) => r.cherryPick(Hr(c)), "CherryPicking")
329
+ Commit: /* @__PURE__ */ m((a) => r.commit(Ir(a)), "Commit"),
330
+ Branch: /* @__PURE__ */ m((a) => r.branch(Gr(a)), "Branch"),
331
+ Merge: /* @__PURE__ */ m((a) => r.merge(Or(a)), "Merge"),
332
+ Checkout: /* @__PURE__ */ m((a) => r.checkout(qr(a)), "Checkout"),
333
+ CherryPicking: /* @__PURE__ */ m((a) => r.cherryPick(Hr(a)), "CherryPicking")
334
334
  }[t.$type];
335
335
  e ? e(t) : w.error(`Unknown statement type: ${t.$type}`);
336
- }, "parseStatement"), Ar = /* @__PURE__ */ m((t) => ({
336
+ }, "parseStatement"), Ir = /* @__PURE__ */ m((t) => ({
337
337
  id: t.id,
338
338
  msg: t.message ?? "",
339
339
  type: t.type !== void 0 ? u[t.type] : u.NORMAL,
@@ -357,98 +357,98 @@ var Er = /* @__PURE__ */ m(function() {
357
357
  }, "parseCherryPicking"), zr = {
358
358
  parse: /* @__PURE__ */ m(async (t) => {
359
359
  const r = await yr("gitGraph", t);
360
- w.debug(r), Rr(r, Q);
360
+ w.debug(r), Rr(r, U);
361
361
  }, "parse")
362
- }, W = cr(), E = W == null ? void 0 : W.gitGraph, I = 10, A = 40, L = 4, M = 2, G = 8, v = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(), z = 30, q = /* @__PURE__ */ new Map(), S = [], R = 0, f = "LR", Sr = /* @__PURE__ */ m(() => {
363
- v.clear(), k.clear(), q.clear(), R = 0, S = [], f = "LR";
362
+ }, W = mr(), E = W == null ? void 0 : W.gitGraph, A = 10, I = 40, L = 4, M = 2, G = 8, v = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), z = 30, q = /* @__PURE__ */ new Map(), S = [], R = 0, f = "LR", Sr = /* @__PURE__ */ m(() => {
363
+ v.clear(), C.clear(), q.clear(), R = 0, S = [], f = "LR";
364
364
  }, "clear"), V = /* @__PURE__ */ m((t) => {
365
365
  const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
366
366
  return (typeof t == "string" ? t.split(/\\n|\n|<br\s*\/?>/gi) : t).forEach((e) => {
367
- const c = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
368
- c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), c.setAttribute("dy", "1em"), c.setAttribute("x", "0"), c.setAttribute("class", "row"), c.textContent = e.trim(), r.appendChild(c);
367
+ const a = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
368
+ a.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), a.setAttribute("dy", "1em"), a.setAttribute("x", "0"), a.setAttribute("class", "row"), a.textContent = e.trim(), r.appendChild(a);
369
369
  }), r;
370
- }, "drawText"), X = /* @__PURE__ */ m((t) => {
371
- let r, e, c;
372
- return f === "BT" ? (e = /* @__PURE__ */ m((a, s) => a <= s, "comparisonFunc"), c = 1 / 0) : (e = /* @__PURE__ */ m((a, s) => a >= s, "comparisonFunc"), c = 0), t.forEach((a) => {
373
- var s, d;
374
- const h = f === "TB" || f == "BT" ? (s = k.get(a)) == null ? void 0 : s.y : (d = k.get(a)) == null ? void 0 : d.x;
375
- h !== void 0 && e(h, c) && (r = a, c = h);
370
+ }, "drawText"), J = /* @__PURE__ */ m((t) => {
371
+ let r, e, a;
372
+ return f === "BT" ? (e = /* @__PURE__ */ m((c, i) => c <= i, "comparisonFunc"), a = 1 / 0) : (e = /* @__PURE__ */ m((c, i) => c >= i, "comparisonFunc"), a = 0), t.forEach((c) => {
373
+ var i, d;
374
+ const h = f === "TB" || f == "BT" ? (i = C.get(c)) == null ? void 0 : i.y : (d = C.get(c)) == null ? void 0 : d.x;
375
+ h !== void 0 && e(h, a) && (r = c, a = h);
376
376
  }), r;
377
- }, "findClosestParent"), Dr = /* @__PURE__ */ m((t) => {
377
+ }, "findClosestParent"), Nr = /* @__PURE__ */ m((t) => {
378
378
  let r = "", e = 1 / 0;
379
- return t.forEach((c) => {
380
- const a = k.get(c).y;
381
- a <= e && (r = c, e = a);
379
+ return t.forEach((a) => {
380
+ const c = C.get(a).y;
381
+ c <= e && (r = a, e = c);
382
382
  }), r || void 0;
383
- }, "findClosestParentBT"), Nr = /* @__PURE__ */ m((t, r, e) => {
384
- let c = e, a = e;
385
- const s = [];
383
+ }, "findClosestParentBT"), Dr = /* @__PURE__ */ m((t, r, e) => {
384
+ let a = e, c = e;
385
+ const i = [];
386
386
  t.forEach((d) => {
387
387
  const h = r.get(d);
388
388
  if (!h)
389
389
  throw new Error(`Commit not found for key ${d}`);
390
- h.parents.length ? (c = Wr(h), a = Math.max(c, a)) : s.push(h), Kr(h, c);
391
- }), c = a, s.forEach((d) => {
392
- Fr(d, c, e);
390
+ h.parents.length ? (a = Wr(h), c = Math.max(a, c)) : i.push(h), _r(h, a);
391
+ }), a = c, i.forEach((d) => {
392
+ Kr(d, a, e);
393
393
  }), t.forEach((d) => {
394
394
  const h = r.get(d);
395
395
  if (h != null && h.parents.length) {
396
- const l = Dr(h.parents);
397
- c = k.get(l).y - A, c <= a && (a = c);
398
- const o = v.get(h.branch).pos, n = c - I;
399
- k.set(h.id, { x: o, y: n });
396
+ const l = Nr(h.parents);
397
+ a = C.get(l).y - I, a <= c && (c = a);
398
+ const o = v.get(h.branch).pos, n = a - A;
399
+ C.set(h.id, { x: o, y: n });
400
400
  }
401
401
  });
402
402
  }, "setParallelBTPos"), jr = /* @__PURE__ */ m((t) => {
403
403
  var r;
404
- const e = X(t.parents.filter((a) => a !== null));
404
+ const e = J(t.parents.filter((c) => c !== null));
405
405
  if (!e)
406
406
  throw new Error(`Closest parent not found for commit ${t.id}`);
407
- const c = (r = k.get(e)) == null ? void 0 : r.y;
408
- if (c === void 0)
407
+ const a = (r = C.get(e)) == null ? void 0 : r.y;
408
+ if (a === void 0)
409
409
  throw new Error(`Closest parent position not found for commit ${t.id}`);
410
- return c;
411
- }, "findClosestParentPos"), Wr = /* @__PURE__ */ m((t) => jr(t) + A, "calculateCommitPosition"), Kr = /* @__PURE__ */ m((t, r) => {
410
+ return a;
411
+ }, "findClosestParentPos"), Wr = /* @__PURE__ */ m((t) => jr(t) + I, "calculateCommitPosition"), _r = /* @__PURE__ */ m((t, r) => {
412
412
  const e = v.get(t.branch);
413
413
  if (!e)
414
414
  throw new Error(`Branch not found for commit ${t.id}`);
415
- const c = e.pos, a = r + I;
416
- return k.set(t.id, { x: c, y: a }), { x: c, y: a };
417
- }, "setCommitPosition"), Fr = /* @__PURE__ */ m((t, r, e) => {
418
- const c = v.get(t.branch);
419
- if (!c)
415
+ const a = e.pos, c = r + A;
416
+ return C.set(t.id, { x: a, y: c }), { x: a, y: c };
417
+ }, "setCommitPosition"), Kr = /* @__PURE__ */ m((t, r, e) => {
418
+ const a = v.get(t.branch);
419
+ if (!a)
420
420
  throw new Error(`Branch not found for commit ${t.id}`);
421
- const a = r + e, s = c.pos;
422
- k.set(t.id, { x: s, y: a });
423
- }, "setRootPosition"), _r = /* @__PURE__ */ m((t, r, e, c, a, s) => {
424
- if (s === u.HIGHLIGHT)
421
+ const c = r + e, i = a.pos;
422
+ C.set(t.id, { x: i, y: c });
423
+ }, "setRootPosition"), Fr = /* @__PURE__ */ m((t, r, e, a, c, i) => {
424
+ if (i === u.HIGHLIGHT)
425
425
  t.append("rect").attr("x", e.x - 10).attr("y", e.y - 10).attr("width", 20).attr("height", 20).attr(
426
426
  "class",
427
- `commit ${r.id} commit-highlight${a % G} ${c}-outer`
427
+ `commit ${r.id} commit-highlight${c % G} ${a}-outer`
428
428
  ), t.append("rect").attr("x", e.x - 6).attr("y", e.y - 6).attr("width", 12).attr("height", 12).attr(
429
429
  "class",
430
- `commit ${r.id} commit${a % G} ${c}-inner`
430
+ `commit ${r.id} commit${c % G} ${a}-inner`
431
431
  );
432
- else if (s === u.CHERRY_PICK)
433
- t.append("circle").attr("cx", e.x).attr("cy", e.y).attr("r", 10).attr("class", `commit ${r.id} ${c}`), t.append("circle").attr("cx", e.x - 3).attr("cy", e.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${c}`), t.append("circle").attr("cx", e.x + 3).attr("cy", e.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${c}`), t.append("line").attr("x1", e.x + 3).attr("y1", e.y + 1).attr("x2", e.x).attr("y2", e.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${c}`), t.append("line").attr("x1", e.x - 3).attr("y1", e.y + 1).attr("x2", e.x).attr("y2", e.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${c}`);
432
+ else if (i === u.CHERRY_PICK)
433
+ t.append("circle").attr("cx", e.x).attr("cy", e.y).attr("r", 10).attr("class", `commit ${r.id} ${a}`), t.append("circle").attr("cx", e.x - 3).attr("cy", e.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${a}`), t.append("circle").attr("cx", e.x + 3).attr("cy", e.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${a}`), t.append("line").attr("x1", e.x + 3).attr("y1", e.y + 1).attr("x2", e.x).attr("y2", e.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${a}`), t.append("line").attr("x1", e.x - 3).attr("y1", e.y + 1).attr("x2", e.x).attr("y2", e.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${a}`);
434
434
  else {
435
435
  const d = t.append("circle");
436
- if (d.attr("cx", e.x), d.attr("cy", e.y), d.attr("r", r.type === u.MERGE ? 9 : 10), d.attr("class", `commit ${r.id} commit${a % G}`), s === u.MERGE) {
436
+ if (d.attr("cx", e.x), d.attr("cy", e.y), d.attr("r", r.type === u.MERGE ? 9 : 10), d.attr("class", `commit ${r.id} commit${c % G}`), i === u.MERGE) {
437
437
  const h = t.append("circle");
438
438
  h.attr("cx", e.x), h.attr("cy", e.y), h.attr("r", 6), h.attr(
439
439
  "class",
440
- `commit ${c} ${r.id} commit${a % G}`
440
+ `commit ${a} ${r.id} commit${c % G}`
441
441
  );
442
442
  }
443
- s === u.REVERSE && t.append("path").attr(
443
+ i === u.REVERSE && t.append("path").attr(
444
444
  "d",
445
445
  `M ${e.x - 5},${e.y - 5}L${e.x + 5},${e.y + 5}M${e.x - 5},${e.y + 5}L${e.x + 5},${e.y - 5}`
446
- ).attr("class", `commit ${c} ${r.id} commit${a % G}`);
446
+ ).attr("class", `commit ${a} ${r.id} commit${c % G}`);
447
447
  }
448
- }, "drawCommitBullet"), Yr = /* @__PURE__ */ m((t, r, e, c) => {
449
- var a;
448
+ }, "drawCommitBullet"), Yr = /* @__PURE__ */ m((t, r, e, a) => {
449
+ var c;
450
450
  if (r.type !== u.CHERRY_PICK && (r.customId && r.type === u.MERGE || r.type !== u.MERGE) && E != null && E.showCommitLabel) {
451
- const s = t.append("g"), d = s.insert("rect").attr("class", "commit-label-bkg"), h = s.append("text").attr("x", c).attr("y", e.y + 25).attr("class", "commit-label").text(r.id), l = (a = h.node()) == null ? void 0 : a.getBBox();
451
+ const i = t.append("g"), d = i.insert("rect").attr("class", "commit-label-bkg"), h = i.append("text").attr("x", a).attr("y", e.y + 25).attr("class", "commit-label").text(r.id), l = (c = h.node()) == null ? void 0 : c.getBBox();
452
452
  if (l && (d.attr("x", e.posWithOffset - l.width / 2 - M).attr("y", e.y + 13.5).attr("width", l.width + 2 * M).attr("height", l.height + 2 * M), f === "TB" || f === "BT" ? (d.attr("x", e.x - (l.width + 4 * L + 5)).attr("y", e.y - 12), h.attr("x", e.x - (l.width + 4 * L)).attr("y", e.y + l.height - 12)) : h.attr("x", e.posWithOffset - l.width / 2), E.rotateCommitLabel))
453
453
  if (f === "TB" || f === "BT")
454
454
  h.attr(
@@ -460,51 +460,51 @@ var Er = /* @__PURE__ */ m(function() {
460
460
  );
461
461
  else {
462
462
  const o = -7.5 - (l.width + 10) / 25 * 9.5, n = 10 + l.width / 25 * 8.5;
463
- s.attr(
463
+ i.attr(
464
464
  "transform",
465
- "translate(" + o + ", " + n + ") rotate(-45, " + c + ", " + e.y + ")"
465
+ "translate(" + o + ", " + n + ") rotate(-45, " + a + ", " + e.y + ")"
466
466
  );
467
467
  }
468
468
  }
469
- }, "drawCommitLabel"), Qr = /* @__PURE__ */ m((t, r, e, c) => {
470
- var a;
469
+ }, "drawCommitLabel"), Ur = /* @__PURE__ */ m((t, r, e, a) => {
470
+ var c;
471
471
  if (r.tags.length > 0) {
472
- let s = 0, d = 0, h = 0;
472
+ let i = 0, d = 0, h = 0;
473
473
  const l = [];
474
474
  for (const o of r.tags.reverse()) {
475
- const n = t.insert("polygon"), x = t.append("circle"), $ = t.append("text").attr("y", e.y - 16 - s).attr("class", "tag-label").text(o), y = (a = $.node()) == null ? void 0 : a.getBBox();
475
+ const n = t.insert("polygon"), x = t.append("circle"), $ = t.append("text").attr("y", e.y - 16 - i).attr("class", "tag-label").text(o), y = (c = $.node()) == null ? void 0 : c.getBBox();
476
476
  if (!y)
477
477
  throw new Error("Tag bbox not found");
478
478
  d = Math.max(d, y.width), h = Math.max(h, y.height), $.attr("x", e.posWithOffset - y.width / 2), l.push({
479
479
  tag: $,
480
480
  hole: x,
481
481
  rect: n,
482
- yOffset: s
483
- }), s += 20;
482
+ yOffset: i
483
+ }), i += 20;
484
484
  }
485
485
  for (const { tag: o, hole: n, rect: x, yOffset: $ } of l) {
486
486
  const y = h / 2, p = e.y - 19.2 - $;
487
487
  if (x.attr("class", "tag-label-bkg").attr(
488
488
  "points",
489
489
  `
490
- ${c - d / 2 - L / 2},${p + M}
491
- ${c - d / 2 - L / 2},${p - M}
490
+ ${a - d / 2 - L / 2},${p + M}
491
+ ${a - d / 2 - L / 2},${p - M}
492
492
  ${e.posWithOffset - d / 2 - L},${p - y - M}
493
493
  ${e.posWithOffset + d / 2 + L},${p - y - M}
494
494
  ${e.posWithOffset + d / 2 + L},${p + y + M}
495
495
  ${e.posWithOffset - d / 2 - L},${p + y + M}`
496
- ), n.attr("cy", p).attr("cx", c - d / 2 + L / 2).attr("r", 1.5).attr("class", "tag-hole"), f === "TB" || f === "BT") {
497
- const g = c + $;
496
+ ), n.attr("cy", p).attr("cx", a - d / 2 + L / 2).attr("r", 1.5).attr("class", "tag-hole"), f === "TB" || f === "BT") {
497
+ const g = a + $;
498
498
  x.attr("class", "tag-label-bkg").attr(
499
499
  "points",
500
500
  `
501
501
  ${e.x},${g + 2}
502
502
  ${e.x},${g - 2}
503
- ${e.x + I},${g - y - 2}
504
- ${e.x + I + d + 4},${g - y - 2}
505
- ${e.x + I + d + 4},${g + y + 2}
506
- ${e.x + I},${g + y + 2}`
507
- ).attr("transform", "translate(12,12) rotate(45, " + e.x + "," + c + ")"), n.attr("cx", e.x + L / 2).attr("cy", g).attr("transform", "translate(12,12) rotate(45, " + e.x + "," + c + ")"), o.attr("x", e.x + 5).attr("y", g + 3).attr("transform", "translate(14,14) rotate(45, " + e.x + "," + c + ")");
503
+ ${e.x + A},${g - y - 2}
504
+ ${e.x + A + d + 4},${g - y - 2}
505
+ ${e.x + A + d + 4},${g + y + 2}
506
+ ${e.x + A},${g + y + 2}`
507
+ ).attr("transform", "translate(12,12) rotate(45, " + e.x + "," + a + ")"), n.attr("cx", e.x + L / 2).attr("cy", g).attr("transform", "translate(12,12) rotate(45, " + e.x + "," + a + ")"), o.attr("x", e.x + 5).attr("y", g + 3).attr("transform", "translate(14,14) rotate(45, " + e.x + "," + a + ")");
508
508
  }
509
509
  }
510
510
  }
@@ -523,66 +523,66 @@ var Er = /* @__PURE__ */ m(function() {
523
523
  default:
524
524
  return "commit-normal";
525
525
  }
526
- }, "getCommitClassType"), Xr = /* @__PURE__ */ m((t, r, e, c) => {
527
- const a = { x: 0, y: 0 };
526
+ }, "getCommitClassType"), Jr = /* @__PURE__ */ m((t, r, e, a) => {
527
+ const c = { x: 0, y: 0 };
528
528
  if (t.parents.length > 0) {
529
- const s = X(t.parents);
530
- if (s) {
531
- const d = c.get(s) ?? a;
532
- return r === "TB" ? d.y + A : r === "BT" ? (c.get(t.id) ?? a).y - A : d.x + A;
529
+ const i = J(t.parents);
530
+ if (i) {
531
+ const d = a.get(i) ?? c;
532
+ return r === "TB" ? d.y + I : r === "BT" ? (a.get(t.id) ?? c).y - I : d.x + I;
533
533
  }
534
534
  } else
535
- return r === "TB" ? z : r === "BT" ? (c.get(t.id) ?? a).y - A : 0;
535
+ return r === "TB" ? z : r === "BT" ? (a.get(t.id) ?? c).y - I : 0;
536
536
  return 0;
537
- }, "calculatePosition"), Jr = /* @__PURE__ */ m((t, r, e) => {
538
- var c, a;
539
- const s = f === "BT" && e ? r : r + I, d = f === "TB" || f === "BT" ? s : (c = v.get(t.branch)) == null ? void 0 : c.pos, h = f === "TB" || f === "BT" ? (a = v.get(t.branch)) == null ? void 0 : a.pos : s;
537
+ }, "calculatePosition"), Qr = /* @__PURE__ */ m((t, r, e) => {
538
+ var a, c;
539
+ const i = f === "BT" && e ? r : r + A, d = f === "TB" || f === "BT" ? i : (a = v.get(t.branch)) == null ? void 0 : a.pos, h = f === "TB" || f === "BT" ? (c = v.get(t.branch)) == null ? void 0 : c.pos : i;
540
540
  if (h === void 0 || d === void 0)
541
541
  throw new Error(`Position were undefined for commit ${t.id}`);
542
- return { x: h, y: d, posWithOffset: s };
543
- }, "getCommitPosition"), K = /* @__PURE__ */ m((t, r, e) => {
542
+ return { x: h, y: d, posWithOffset: i };
543
+ }, "getCommitPosition"), _ = /* @__PURE__ */ m((t, r, e) => {
544
544
  if (!E)
545
545
  throw new Error("GitGraph config not found");
546
- const c = t.append("g").attr("class", "commit-bullets"), a = t.append("g").attr("class", "commit-labels");
547
- let s = f === "TB" || f === "BT" ? z : 0;
546
+ const a = t.append("g").attr("class", "commit-bullets"), c = t.append("g").attr("class", "commit-labels");
547
+ let i = f === "TB" || f === "BT" ? z : 0;
548
548
  const d = [...r.keys()], h = (E == null ? void 0 : E.parallelCommits) ?? !1, l = /* @__PURE__ */ m((n, x) => {
549
549
  var $, y;
550
550
  const p = ($ = r.get(n)) == null ? void 0 : $.seq, g = (y = r.get(x)) == null ? void 0 : y.seq;
551
551
  return p !== void 0 && g !== void 0 ? p - g : 0;
552
552
  }, "sortKeys");
553
553
  let o = d.sort(l);
554
- f === "BT" && (h && Nr(o, r, s), o = o.reverse()), o.forEach((n) => {
554
+ f === "BT" && (h && Dr(o, r, i), o = o.reverse()), o.forEach((n) => {
555
555
  var x;
556
556
  const $ = r.get(n);
557
557
  if (!$)
558
558
  throw new Error(`Commit not found for key ${n}`);
559
- h && (s = Xr($, f, s, k));
560
- const y = Jr($, s, h);
559
+ h && (i = Jr($, f, i, C));
560
+ const y = Qr($, i, h);
561
561
  if (e) {
562
562
  const p = Vr($), g = $.customType ?? $.type, T = ((x = v.get($.branch)) == null ? void 0 : x.index) ?? 0;
563
- _r(c, $, y, p, T, g), Yr(a, $, y, s), Qr(a, $, y, s);
563
+ Fr(a, $, y, p, T, g), Yr(c, $, y, i), Ur(c, $, y, i);
564
564
  }
565
- f === "TB" || f === "BT" ? k.set($.id, { x: y.x, y: y.posWithOffset }) : k.set($.id, { x: y.posWithOffset, y: y.y }), s = f === "BT" && h ? s + A : s + A + I, s > R && (R = s);
565
+ f === "TB" || f === "BT" ? C.set($.id, { x: y.x, y: y.posWithOffset }) : C.set($.id, { x: y.posWithOffset, y: y.y }), i = f === "BT" && h ? i + I : i + I + A, i > R && (R = i);
566
566
  });
567
- }, "drawCommits"), Ur = /* @__PURE__ */ m((t, r, e, c, a) => {
568
- const s = (f === "TB" || f === "BT" ? e.x < c.x : e.y < c.y) ? r.branch : t.branch, d = /* @__PURE__ */ m((l) => l.branch === s, "isOnBranchToGetCurve"), h = /* @__PURE__ */ m((l) => l.seq > t.seq && l.seq < r.seq, "isBetweenCommits");
569
- return [...a.values()].some((l) => h(l) && d(l));
567
+ }, "drawCommits"), Xr = /* @__PURE__ */ m((t, r, e, a, c) => {
568
+ const i = (f === "TB" || f === "BT" ? e.x < a.x : e.y < a.y) ? r.branch : t.branch, d = /* @__PURE__ */ m((l) => l.branch === i, "isOnBranchToGetCurve"), h = /* @__PURE__ */ m((l) => l.seq > t.seq && l.seq < r.seq, "isBetweenCommits");
569
+ return [...c.values()].some((l) => h(l) && d(l));
570
570
  }, "shouldRerouteArrow"), H = /* @__PURE__ */ m((t, r, e = 0) => {
571
- const c = t + Math.abs(t - r) / 2;
571
+ const a = t + Math.abs(t - r) / 2;
572
572
  if (e > 5)
573
- return c;
574
- if (S.every((s) => Math.abs(s - c) >= 10))
575
- return S.push(c), c;
576
- const a = Math.abs(t - r);
577
- return H(t, r - a / 5, e + 1);
578
- }, "findLane"), Zr = /* @__PURE__ */ m((t, r, e, c) => {
579
- var a, s, d, h, l;
580
- const o = k.get(r.id), n = k.get(e.id);
573
+ return a;
574
+ if (S.every((i) => Math.abs(i - a) >= 10))
575
+ return S.push(a), a;
576
+ const c = Math.abs(t - r);
577
+ return H(t, r - c / 5, e + 1);
578
+ }, "findLane"), Zr = /* @__PURE__ */ m((t, r, e, a) => {
579
+ var c, i, d, h, l;
580
+ const o = C.get(r.id), n = C.get(e.id);
581
581
  if (o === void 0 || n === void 0)
582
582
  throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);
583
- const x = Ur(r, e, o, n, c);
584
- let $ = "", y = "", p = 0, g = 0, T = (a = v.get(e.branch)) == null ? void 0 : a.index;
585
- e.type === u.MERGE && r.id !== e.parents[0] && (T = (s = v.get(r.branch)) == null ? void 0 : s.index);
583
+ const x = Xr(r, e, o, n, a);
584
+ let $ = "", y = "", p = 0, g = 0, T = (c = v.get(e.branch)) == null ? void 0 : c.index;
585
+ e.type === u.MERGE && r.id !== e.parents[0] && (T = (i = v.get(r.branch)) == null ? void 0 : i.index);
586
586
  let b;
587
587
  if (x) {
588
588
  $ = "A 10 10, 0, 0, 0,", y = "A 10 10, 0, 0, 1,", p = 10, g = 10;
@@ -595,22 +595,22 @@ var Er = /* @__PURE__ */ m(function() {
595
595
  t.append("path").attr("d", b).attr("class", "arrow arrow" + T % G);
596
596
  }, "drawArrow"), rt = /* @__PURE__ */ m((t, r) => {
597
597
  const e = t.append("g").attr("class", "commit-arrows");
598
- [...r.keys()].forEach((c) => {
599
- const a = r.get(c);
600
- a.parents && a.parents.length > 0 && a.parents.forEach((s) => {
601
- Zr(e, r.get(s), a, r);
598
+ [...r.keys()].forEach((a) => {
599
+ const c = r.get(a);
600
+ c.parents && c.parents.length > 0 && c.parents.forEach((i) => {
601
+ Zr(e, r.get(i), c, r);
602
602
  });
603
603
  });
604
604
  }, "drawArrows"), tt = /* @__PURE__ */ m((t, r) => {
605
605
  const e = t.append("g");
606
- r.forEach((c, a) => {
607
- var s;
608
- const d = a % G, h = (s = v.get(c.name)) == null ? void 0 : s.pos;
606
+ r.forEach((a, c) => {
607
+ var i;
608
+ const d = c % G, h = (i = v.get(a.name)) == null ? void 0 : i.pos;
609
609
  if (h === void 0)
610
- throw new Error(`Position not found for branch ${c.name}`);
610
+ throw new Error(`Position not found for branch ${a.name}`);
611
611
  const l = e.append("line");
612
612
  l.attr("x1", 0), l.attr("y1", h), l.attr("x2", R), l.attr("y2", h), l.attr("class", "branch branch" + d), f === "TB" ? (l.attr("y1", z), l.attr("x1", h), l.attr("y2", R), l.attr("x2", h)) : f === "BT" && (l.attr("y1", R), l.attr("x1", h), l.attr("y2", z), l.attr("x2", h)), S.push(h);
613
- const o = c.name, n = V(o), x = e.insert("rect"), $ = e.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + d);
613
+ const o = a.name, n = V(o), x = e.insert("rect"), $ = e.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + d);
614
614
  $.node().appendChild(n);
615
615
  const y = n.getBBox();
616
616
  x.attr("class", "branchLabelBkg label" + d).attr("rx", 4).attr("ry", 4).attr("x", -y.width - 4 - ((E == null ? void 0 : E.rotateCommitLabel) === !0 ? 30 : 0)).attr("y", -y.height / 2 + 8).attr("width", y.width + 18).attr("height", y.height + 4), $.attr(
@@ -618,16 +618,16 @@ var Er = /* @__PURE__ */ m(function() {
618
618
  "translate(" + (-y.width - 14 - ((E == null ? void 0 : E.rotateCommitLabel) === !0 ? 30 : 0)) + ", " + (h - y.height / 2 - 1) + ")"
619
619
  ), f === "TB" ? (x.attr("x", h - y.width / 2 - 10).attr("y", 0), $.attr("transform", "translate(" + (h - y.width / 2 - 5) + ", 0)")) : f === "BT" ? (x.attr("x", h - y.width / 2 - 10).attr("y", R), $.attr("transform", "translate(" + (h - y.width / 2 - 5) + ", " + R + ")")) : x.attr("transform", "translate(-19, " + (h - y.height / 2) + ")");
620
620
  });
621
- }, "drawBranches"), et = /* @__PURE__ */ m(function(t, r, e, c, a) {
622
- return v.set(t, { pos: r, index: e }), r += 50 + (a ? 40 : 0) + (f === "TB" || f === "BT" ? c.width / 2 : 0), r;
623
- }, "setBranchPosition"), ot = /* @__PURE__ */ m(function(t, r, e, c) {
621
+ }, "drawBranches"), et = /* @__PURE__ */ m(function(t, r, e, a, c) {
622
+ return v.set(t, { pos: r, index: e }), r += 50 + (c ? 40 : 0) + (f === "TB" || f === "BT" ? a.width / 2 : 0), r;
623
+ }, "setBranchPosition"), ot = /* @__PURE__ */ m(function(t, r, e, a) {
624
624
  if (Sr(), w.debug("in gitgraph renderer", t + `
625
625
  `, "id:", r, e), !E)
626
626
  throw new Error("GitGraph config not found");
627
- const a = E.rotateCommitLabel ?? !1, s = c.db;
628
- q = s.getCommits();
629
- const d = s.getBranchesAsObjArray();
630
- f = s.getDirection();
627
+ const c = E.rotateCommitLabel ?? !1, i = a.db;
628
+ q = i.getCommits();
629
+ const d = i.getBranchesAsObjArray();
630
+ f = i.getDirection();
631
631
  const h = ar(`[id="${r}"]`);
632
632
  let l = 0;
633
633
  d.forEach((o, n) => {
@@ -635,12 +635,12 @@ var Er = /* @__PURE__ */ m(function() {
635
635
  const $ = V(o.name), y = h.append("g"), p = y.insert("g").attr("class", "branchLabel"), g = p.insert("g").attr("class", "label branch-label");
636
636
  (x = g.node()) == null || x.appendChild($);
637
637
  const T = $.getBBox();
638
- l = et(o.name, l, n, T, a), g.remove(), p.remove(), y.remove();
639
- }), K(h, q, !1), E.showBranches && tt(h, d), rt(h, q), K(h, q, !0), sr.insertTitle(
638
+ l = et(o.name, l, n, T, c), g.remove(), p.remove(), y.remove();
639
+ }), _(h, q, !1), E.showBranches && tt(h, d), rt(h, q), _(h, q, !0), cr.insertTitle(
640
640
  h,
641
641
  "gitTitleText",
642
642
  E.titleTopMargin ?? 0,
643
- s.getDiagramTitle()
643
+ i.getDiagramTitle()
644
644
  ), ir(
645
645
  void 0,
646
646
  h,
@@ -649,7 +649,7 @@ var Er = /* @__PURE__ */ m(function() {
649
649
  );
650
650
  }, "draw"), nt = {
651
651
  draw: ot
652
- }, ct = /* @__PURE__ */ m((t) => `
652
+ }, at = /* @__PURE__ */ m((t) => `
653
653
  .commit-id,
654
654
  .commit-msg,
655
655
  .branch-label {
@@ -702,11 +702,11 @@ var Er = /* @__PURE__ */ m(function() {
702
702
  font-size: 18px;
703
703
  fill: ${t.textColor};
704
704
  }
705
- `, "getStyles"), at = ct, $t = {
705
+ `, "getStyles"), ct = at, $t = {
706
706
  parser: zr,
707
- db: Q,
707
+ db: U,
708
708
  renderer: nt,
709
- styles: at
709
+ styles: ct
710
710
  };
711
711
  export {
712
712
  $t as diagram