@akshay-rajput/git-graph-svg 2.0.2 → 2.0.4

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.
@@ -1,105 +1,105 @@
1
- import Ce, { useMemo as ie, forwardRef as pr, useRef as gr, useEffect as Er } from "react";
2
- var de = { exports: {} }, ae = {};
3
- var Me;
4
- function yr() {
5
- if (Me) return ae;
6
- Me = 1;
7
- var O = Ce, R = /* @__PURE__ */ Symbol.for("react.element"), T = /* @__PURE__ */ Symbol.for("react.fragment"), C = Object.prototype.hasOwnProperty, m = O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, $ = { key: !0, ref: !0, __self: !0, __source: !0 };
8
- function F(A, g, M) {
9
- var b, W = {}, U = null, I = null;
10
- M !== void 0 && (U = "" + M), g.key !== void 0 && (U = "" + g.key), g.ref !== void 0 && (I = g.ref);
11
- for (b in g) C.call(g, b) && !$.hasOwnProperty(b) && (W[b] = g[b]);
12
- if (A && A.defaultProps) for (b in g = A.defaultProps, g) W[b] === void 0 && (W[b] = g[b]);
13
- return { $$typeof: R, type: A, key: U, ref: I, props: W, _owner: m.current };
1
+ import Te, { useMemo as le, forwardRef as gr, useEffect as Er } from "react";
2
+ var pe = { exports: {} }, ie = {};
3
+ var Be;
4
+ function br() {
5
+ if (Be) return ie;
6
+ Be = 1;
7
+ var P = Te, T = /* @__PURE__ */ Symbol.for("react.element"), _ = /* @__PURE__ */ Symbol.for("react.fragment"), y = Object.prototype.hasOwnProperty, w = P.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, I = { key: !0, ref: !0, __self: !0, __source: !0 };
8
+ function A(L, g, B) {
9
+ var x, m = {}, M = null, H = null;
10
+ B !== void 0 && (M = "" + B), g.key !== void 0 && (M = "" + g.key), g.ref !== void 0 && (H = g.ref);
11
+ for (x in g) y.call(g, x) && !I.hasOwnProperty(x) && (m[x] = g[x]);
12
+ if (L && L.defaultProps) for (x in g = L.defaultProps, g) m[x] === void 0 && (m[x] = g[x]);
13
+ return { $$typeof: T, type: L, key: M, ref: H, props: m, _owner: w.current };
14
14
  }
15
- return ae.Fragment = T, ae.jsx = F, ae.jsxs = F, ae;
15
+ return ie.Fragment = _, ie.jsx = A, ie.jsxs = A, ie;
16
16
  }
17
- var oe = {};
18
- var Ue;
19
- function br() {
20
- return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && (function() {
21
- var O = Ce, R = /* @__PURE__ */ Symbol.for("react.element"), T = /* @__PURE__ */ Symbol.for("react.portal"), C = /* @__PURE__ */ Symbol.for("react.fragment"), m = /* @__PURE__ */ Symbol.for("react.strict_mode"), $ = /* @__PURE__ */ Symbol.for("react.profiler"), F = /* @__PURE__ */ Symbol.for("react.provider"), A = /* @__PURE__ */ Symbol.for("react.context"), g = /* @__PURE__ */ Symbol.for("react.forward_ref"), M = /* @__PURE__ */ Symbol.for("react.suspense"), b = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), U = /* @__PURE__ */ Symbol.for("react.lazy"), I = /* @__PURE__ */ Symbol.for("react.offscreen"), c = Symbol.iterator, y = "@@iterator";
22
- function P(e) {
17
+ var se = {};
18
+ var Me;
19
+ function yr() {
20
+ return Me || (Me = 1, process.env.NODE_ENV !== "production" && (function() {
21
+ var P = Te, T = /* @__PURE__ */ Symbol.for("react.element"), _ = /* @__PURE__ */ Symbol.for("react.portal"), y = /* @__PURE__ */ Symbol.for("react.fragment"), w = /* @__PURE__ */ Symbol.for("react.strict_mode"), I = /* @__PURE__ */ Symbol.for("react.profiler"), A = /* @__PURE__ */ Symbol.for("react.provider"), L = /* @__PURE__ */ Symbol.for("react.context"), g = /* @__PURE__ */ Symbol.for("react.forward_ref"), B = /* @__PURE__ */ Symbol.for("react.suspense"), x = /* @__PURE__ */ Symbol.for("react.suspense_list"), m = /* @__PURE__ */ Symbol.for("react.memo"), M = /* @__PURE__ */ Symbol.for("react.lazy"), H = /* @__PURE__ */ Symbol.for("react.offscreen"), s = Symbol.iterator, E = "@@iterator";
22
+ function $(e) {
23
23
  if (e === null || typeof e != "object")
24
24
  return null;
25
- var r = c && e[c] || e[y];
25
+ var r = s && e[s] || e[E];
26
26
  return typeof r == "function" ? r : null;
27
27
  }
28
- var k = O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
29
- function p(e) {
28
+ var k = P.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
29
+ function h(e) {
30
30
  {
31
31
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
32
32
  t[a - 1] = arguments[a];
33
- B("error", e, t);
33
+ U("error", e, t);
34
34
  }
35
35
  }
36
- function B(e, r, t) {
36
+ function U(e, r, t) {
37
37
  {
38
- var a = k.ReactDebugCurrentFrame, h = a.getStackAddendum();
39
- h !== "" && (r += "%s", t = t.concat([h]));
40
- var E = t.map(function(d) {
41
- return String(d);
38
+ var a = k.ReactDebugCurrentFrame, p = a.getStackAddendum();
39
+ p !== "" && (r += "%s", t = t.concat([p]));
40
+ var b = t.map(function(v) {
41
+ return String(v);
42
42
  });
43
- E.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, E);
43
+ b.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, b);
44
44
  }
45
45
  }
46
- var H = !1, i = !1, Z = !1, J = !1, he = !1, re;
47
- re = /* @__PURE__ */ Symbol.for("react.module.reference");
48
- function pe(e) {
49
- return !!(typeof e == "string" || typeof e == "function" || e === C || e === $ || he || e === m || e === M || e === b || J || e === I || H || i || Z || typeof e == "object" && e !== null && (e.$$typeof === U || e.$$typeof === W || e.$$typeof === F || e.$$typeof === A || e.$$typeof === g || // This needs to include all possible module reference object
46
+ var J = !1, D = !1, re = !1, d = !1, te = !1, ne;
47
+ ne = /* @__PURE__ */ Symbol.for("react.module.reference");
48
+ function Ee(e) {
49
+ return !!(typeof e == "string" || typeof e == "function" || e === y || e === I || te || e === w || e === B || e === x || d || e === H || J || D || re || typeof e == "object" && e !== null && (e.$$typeof === M || e.$$typeof === m || e.$$typeof === A || e.$$typeof === L || e.$$typeof === g || // This needs to include all possible module reference object
50
50
  // types supported by any Flight configuration anywhere since
51
51
  // we don't know which Flight build this will end up being used
52
52
  // with.
53
- e.$$typeof === re || e.getModuleId !== void 0));
53
+ e.$$typeof === ne || e.getModuleId !== void 0));
54
54
  }
55
- function ge(e, r, t) {
55
+ function ue(e, r, t) {
56
56
  var a = e.displayName;
57
57
  if (a)
58
58
  return a;
59
- var h = r.displayName || r.name || "";
60
- return h !== "" ? t + "(" + h + ")" : t;
59
+ var p = r.displayName || r.name || "";
60
+ return p !== "" ? t + "(" + p + ")" : t;
61
61
  }
62
- function se(e) {
62
+ function fe(e) {
63
63
  return e.displayName || "Context";
64
64
  }
65
65
  function N(e) {
66
66
  if (e == null)
67
67
  return null;
68
- if (typeof e.tag == "number" && p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
68
+ if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
69
69
  return e.displayName || e.name || null;
70
70
  if (typeof e == "string")
71
71
  return e;
72
72
  switch (e) {
73
- case C:
73
+ case y:
74
74
  return "Fragment";
75
- case T:
75
+ case _:
76
76
  return "Portal";
77
- case $:
77
+ case I:
78
78
  return "Profiler";
79
- case m:
79
+ case w:
80
80
  return "StrictMode";
81
- case M:
81
+ case B:
82
82
  return "Suspense";
83
- case b:
83
+ case x:
84
84
  return "SuspenseList";
85
85
  }
86
86
  if (typeof e == "object")
87
87
  switch (e.$$typeof) {
88
- case A:
88
+ case L:
89
89
  var r = e;
90
- return se(r) + ".Consumer";
91
- case F:
90
+ return fe(r) + ".Consumer";
91
+ case A:
92
92
  var t = e;
93
- return se(t._context) + ".Provider";
93
+ return fe(t._context) + ".Provider";
94
94
  case g:
95
- return ge(e, e.render, "ForwardRef");
96
- case W:
95
+ return ue(e, e.render, "ForwardRef");
96
+ case m:
97
97
  var a = e.displayName || null;
98
98
  return a !== null ? a : N(e.type) || "Memo";
99
- case U: {
100
- var h = e, E = h._payload, d = h._init;
99
+ case M: {
100
+ var p = e, b = p._payload, v = p._init;
101
101
  try {
102
- return N(d(E));
102
+ return N(v(b));
103
103
  } catch {
104
104
  return null;
105
105
  }
@@ -107,18 +107,18 @@ function br() {
107
107
  }
108
108
  return null;
109
109
  }
110
- var K = Object.assign, q = 0, n, o, l, s, f, v, _;
111
- function x() {
110
+ var K = Object.assign, q = 0, ce, de, n, i, l, o, u;
111
+ function f() {
112
112
  }
113
- x.__reactDisabledLog = !0;
114
- function j() {
113
+ f.__reactDisabledLog = !0;
114
+ function C() {
115
115
  {
116
116
  if (q === 0) {
117
- n = console.log, o = console.info, l = console.warn, s = console.error, f = console.group, v = console.groupCollapsed, _ = console.groupEnd;
117
+ ce = console.log, de = console.info, n = console.warn, i = console.error, l = console.group, o = console.groupCollapsed, u = console.groupEnd;
118
118
  var e = {
119
119
  configurable: !0,
120
120
  enumerable: !0,
121
- value: x,
121
+ value: f,
122
122
  writable: !0
123
123
  };
124
124
  Object.defineProperties(console, {
@@ -134,7 +134,7 @@ function br() {
134
134
  q++;
135
135
  }
136
136
  }
137
- function te() {
137
+ function R() {
138
138
  {
139
139
  if (q--, q === 0) {
140
140
  var e = {
@@ -144,237 +144,237 @@ function br() {
144
144
  };
145
145
  Object.defineProperties(console, {
146
146
  log: K({}, e, {
147
- value: n
147
+ value: ce
148
148
  }),
149
149
  info: K({}, e, {
150
- value: o
150
+ value: de
151
151
  }),
152
152
  warn: K({}, e, {
153
- value: l
153
+ value: n
154
154
  }),
155
155
  error: K({}, e, {
156
- value: s
156
+ value: i
157
157
  }),
158
158
  group: K({}, e, {
159
- value: f
159
+ value: l
160
160
  }),
161
161
  groupCollapsed: K({}, e, {
162
- value: v
162
+ value: o
163
163
  }),
164
164
  groupEnd: K({}, e, {
165
- value: _
165
+ value: u
166
166
  })
167
167
  });
168
168
  }
169
- q < 0 && p("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
169
+ q < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
170
170
  }
171
171
  }
172
- var le = k.ReactCurrentDispatcher, X;
173
- function V(e, r, t) {
172
+ var j = k.ReactCurrentDispatcher, X;
173
+ function ae(e, r, t) {
174
174
  {
175
175
  if (X === void 0)
176
176
  try {
177
177
  throw Error();
178
- } catch (h) {
179
- var a = h.stack.trim().match(/\n( *(at )?)/);
178
+ } catch (p) {
179
+ var a = p.stack.trim().match(/\n( *(at )?)/);
180
180
  X = a && a[1] || "";
181
181
  }
182
182
  return `
183
183
  ` + X + e;
184
184
  }
185
185
  }
186
- var Ee = !1, ue;
186
+ var z = !1, V;
187
187
  {
188
- var Ve = typeof WeakMap == "function" ? WeakMap : Map;
189
- ue = new Ve();
188
+ var Ge = typeof WeakMap == "function" ? WeakMap : Map;
189
+ V = new Ge();
190
190
  }
191
- function we(e, r) {
192
- if (!e || Ee)
191
+ function Ce(e, r) {
192
+ if (!e || z)
193
193
  return "";
194
194
  {
195
- var t = ue.get(e);
195
+ var t = V.get(e);
196
196
  if (t !== void 0)
197
197
  return t;
198
198
  }
199
199
  var a;
200
- Ee = !0;
201
- var h = Error.prepareStackTrace;
200
+ z = !0;
201
+ var p = Error.prepareStackTrace;
202
202
  Error.prepareStackTrace = void 0;
203
- var E;
204
- E = le.current, le.current = null, j();
203
+ var b;
204
+ b = j.current, j.current = null, C();
205
205
  try {
206
206
  if (r) {
207
- var d = function() {
207
+ var v = function() {
208
208
  throw Error();
209
209
  };
210
- if (Object.defineProperty(d.prototype, "props", {
210
+ if (Object.defineProperty(v.prototype, "props", {
211
211
  set: function() {
212
212
  throw Error();
213
213
  }
214
214
  }), typeof Reflect == "object" && Reflect.construct) {
215
215
  try {
216
- Reflect.construct(d, []);
217
- } catch (L) {
218
- a = L;
216
+ Reflect.construct(v, []);
217
+ } catch (W) {
218
+ a = W;
219
219
  }
220
- Reflect.construct(e, [], d);
220
+ Reflect.construct(e, [], v);
221
221
  } else {
222
222
  try {
223
- d.call();
224
- } catch (L) {
225
- a = L;
223
+ v.call();
224
+ } catch (W) {
225
+ a = W;
226
226
  }
227
- e.call(d.prototype);
227
+ e.call(v.prototype);
228
228
  }
229
229
  } else {
230
230
  try {
231
231
  throw Error();
232
- } catch (L) {
233
- a = L;
232
+ } catch (W) {
233
+ a = W;
234
234
  }
235
235
  e();
236
236
  }
237
- } catch (L) {
238
- if (L && a && typeof L.stack == "string") {
239
- for (var u = L.stack.split(`
240
- `), D = a.stack.split(`
241
- `), w = u.length - 1, S = D.length - 1; w >= 1 && S >= 0 && u[w] !== D[S]; )
242
- S--;
243
- for (; w >= 1 && S >= 0; w--, S--)
244
- if (u[w] !== D[S]) {
245
- if (w !== 1 || S !== 1)
237
+ } catch (W) {
238
+ if (W && a && typeof W.stack == "string") {
239
+ for (var c = W.stack.split(`
240
+ `), F = a.stack.split(`
241
+ `), S = c.length - 1, O = F.length - 1; S >= 1 && O >= 0 && c[S] !== F[O]; )
242
+ O--;
243
+ for (; S >= 1 && O >= 0; S--, O--)
244
+ if (c[S] !== F[O]) {
245
+ if (S !== 1 || O !== 1)
246
246
  do
247
- if (w--, S--, S < 0 || u[w] !== D[S]) {
247
+ if (S--, O--, O < 0 || c[S] !== F[O]) {
248
248
  var Y = `
249
- ` + u[w].replace(" at new ", " at ");
250
- return e.displayName && Y.includes("<anonymous>") && (Y = Y.replace("<anonymous>", e.displayName)), typeof e == "function" && ue.set(e, Y), Y;
249
+ ` + c[S].replace(" at new ", " at ");
250
+ return e.displayName && Y.includes("<anonymous>") && (Y = Y.replace("<anonymous>", e.displayName)), typeof e == "function" && V.set(e, Y), Y;
251
251
  }
252
- while (w >= 1 && S >= 0);
252
+ while (S >= 1 && O >= 0);
253
253
  break;
254
254
  }
255
255
  }
256
256
  } finally {
257
- Ee = !1, le.current = E, te(), Error.prepareStackTrace = h;
257
+ z = !1, j.current = b, R(), Error.prepareStackTrace = p;
258
258
  }
259
- var ee = e ? e.displayName || e.name : "", z = ee ? V(ee) : "";
260
- return typeof e == "function" && ue.set(e, z), z;
259
+ var ee = e ? e.displayName || e.name : "", Z = ee ? ae(ee) : "";
260
+ return typeof e == "function" && V.set(e, Z), Z;
261
261
  }
262
- function Ge(e, r, t) {
263
- return we(e, !1);
262
+ function Ke(e, r, t) {
263
+ return Ce(e, !1);
264
264
  }
265
- function Ke(e) {
265
+ function He(e) {
266
266
  var r = e.prototype;
267
267
  return !!(r && r.isReactComponent);
268
268
  }
269
- function ce(e, r, t) {
269
+ function ve(e, r, t) {
270
270
  if (e == null)
271
271
  return "";
272
272
  if (typeof e == "function")
273
- return we(e, Ke(e));
273
+ return Ce(e, He(e));
274
274
  if (typeof e == "string")
275
- return V(e);
275
+ return ae(e);
276
276
  switch (e) {
277
- case M:
278
- return V("Suspense");
279
- case b:
280
- return V("SuspenseList");
277
+ case B:
278
+ return ae("Suspense");
279
+ case x:
280
+ return ae("SuspenseList");
281
281
  }
282
282
  if (typeof e == "object")
283
283
  switch (e.$$typeof) {
284
284
  case g:
285
- return Ge(e.render);
286
- case W:
287
- return ce(e.type, r, t);
288
- case U: {
289
- var a = e, h = a._payload, E = a._init;
285
+ return Ke(e.render);
286
+ case m:
287
+ return ve(e.type, r, t);
288
+ case M: {
289
+ var a = e, p = a._payload, b = a._init;
290
290
  try {
291
- return ce(E(h), r, t);
291
+ return ve(b(p), r, t);
292
292
  } catch {
293
293
  }
294
294
  }
295
295
  }
296
296
  return "";
297
297
  }
298
- var ne = Object.prototype.hasOwnProperty, Se = {}, Oe = k.ReactDebugCurrentFrame;
299
- function fe(e) {
298
+ var oe = Object.prototype.hasOwnProperty, we = {}, Se = k.ReactDebugCurrentFrame;
299
+ function he(e) {
300
300
  if (e) {
301
- var r = e._owner, t = ce(e.type, e._source, r ? r.type : null);
302
- Oe.setExtraStackFrame(t);
301
+ var r = e._owner, t = ve(e.type, e._source, r ? r.type : null);
302
+ Se.setExtraStackFrame(t);
303
303
  } else
304
- Oe.setExtraStackFrame(null);
304
+ Se.setExtraStackFrame(null);
305
305
  }
306
- function He(e, r, t, a, h) {
306
+ function Je(e, r, t, a, p) {
307
307
  {
308
- var E = Function.call.bind(ne);
309
- for (var d in e)
310
- if (E(e, d)) {
311
- var u = void 0;
308
+ var b = Function.call.bind(oe);
309
+ for (var v in e)
310
+ if (b(e, v)) {
311
+ var c = void 0;
312
312
  try {
313
- if (typeof e[d] != "function") {
314
- var D = Error((a || "React class") + ": " + t + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
315
- throw D.name = "Invariant Violation", D;
313
+ if (typeof e[v] != "function") {
314
+ var F = Error((a || "React class") + ": " + t + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
315
+ throw F.name = "Invariant Violation", F;
316
316
  }
317
- u = e[d](r, d, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
318
- } catch (w) {
319
- u = w;
317
+ c = e[v](r, v, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
318
+ } catch (S) {
319
+ c = S;
320
320
  }
321
- u && !(u instanceof Error) && (fe(h), p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", t, d, typeof u), fe(null)), u instanceof Error && !(u.message in Se) && (Se[u.message] = !0, fe(h), p("Failed %s type: %s", t, u.message), fe(null));
321
+ c && !(c instanceof Error) && (he(p), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", t, v, typeof c), he(null)), c instanceof Error && !(c.message in we) && (we[c.message] = !0, he(p), h("Failed %s type: %s", t, c.message), he(null));
322
322
  }
323
323
  }
324
324
  }
325
- var Je = Array.isArray;
326
- function ye(e) {
327
- return Je(e);
325
+ var qe = Array.isArray;
326
+ function be(e) {
327
+ return qe(e);
328
328
  }
329
- function qe(e) {
329
+ function Xe(e) {
330
330
  {
331
331
  var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
332
332
  return t;
333
333
  }
334
334
  }
335
- function Xe(e) {
335
+ function ze(e) {
336
336
  try {
337
- return me(e), !1;
337
+ return Oe(e), !1;
338
338
  } catch {
339
339
  return !0;
340
340
  }
341
341
  }
342
- function me(e) {
342
+ function Oe(e) {
343
343
  return "" + e;
344
344
  }
345
345
  function Pe(e) {
346
- if (Xe(e))
347
- return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qe(e)), me(e);
346
+ if (ze(e))
347
+ return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xe(e)), Oe(e);
348
348
  }
349
- var $e = k.ReactCurrentOwner, ze = {
349
+ var me = k.ReactCurrentOwner, Ze = {
350
350
  key: !0,
351
351
  ref: !0,
352
352
  __self: !0,
353
353
  __source: !0
354
- }, je, Ie;
355
- function Ze(e) {
356
- if (ne.call(e, "ref")) {
354
+ }, $e, je;
355
+ function Qe(e) {
356
+ if (oe.call(e, "ref")) {
357
357
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
358
358
  if (r && r.isReactWarning)
359
359
  return !1;
360
360
  }
361
361
  return e.ref !== void 0;
362
362
  }
363
- function Qe(e) {
364
- if (ne.call(e, "key")) {
363
+ function er(e) {
364
+ if (oe.call(e, "key")) {
365
365
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
366
366
  if (r && r.isReactWarning)
367
367
  return !1;
368
368
  }
369
369
  return e.key !== void 0;
370
370
  }
371
- function er(e, r) {
372
- typeof e.ref == "string" && $e.current;
373
- }
374
371
  function rr(e, r) {
372
+ typeof e.ref == "string" && me.current;
373
+ }
374
+ function tr(e, r) {
375
375
  {
376
376
  var t = function() {
377
- je || (je = !0, p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
377
+ $e || ($e = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
378
378
  };
379
379
  t.isReactWarning = !0, Object.defineProperty(e, "key", {
380
380
  get: t,
@@ -382,10 +382,10 @@ function br() {
382
382
  });
383
383
  }
384
384
  }
385
- function tr(e, r) {
385
+ function nr(e, r) {
386
386
  {
387
387
  var t = function() {
388
- Ie || (Ie = !0, p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
388
+ je || (je = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
389
389
  };
390
390
  t.isReactWarning = !0, Object.defineProperty(e, "ref", {
391
391
  get: t,
@@ -393,70 +393,70 @@ function br() {
393
393
  });
394
394
  }
395
395
  }
396
- var nr = function(e, r, t, a, h, E, d) {
397
- var u = {
396
+ var ar = function(e, r, t, a, p, b, v) {
397
+ var c = {
398
398
  // This tag allows us to uniquely identify this as a React Element
399
- $$typeof: R,
399
+ $$typeof: T,
400
400
  // Built-in properties that belong on the element
401
401
  type: e,
402
402
  key: r,
403
403
  ref: t,
404
- props: d,
404
+ props: v,
405
405
  // Record the component responsible for creating this element.
406
- _owner: E
406
+ _owner: b
407
407
  };
408
- return u._store = {}, Object.defineProperty(u._store, "validated", {
408
+ return c._store = {}, Object.defineProperty(c._store, "validated", {
409
409
  configurable: !1,
410
410
  enumerable: !1,
411
411
  writable: !0,
412
412
  value: !1
413
- }), Object.defineProperty(u, "_self", {
413
+ }), Object.defineProperty(c, "_self", {
414
414
  configurable: !1,
415
415
  enumerable: !1,
416
416
  writable: !1,
417
417
  value: a
418
- }), Object.defineProperty(u, "_source", {
418
+ }), Object.defineProperty(c, "_source", {
419
419
  configurable: !1,
420
420
  enumerable: !1,
421
421
  writable: !1,
422
- value: h
423
- }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
422
+ value: p
423
+ }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
424
424
  };
425
- function ar(e, r, t, a, h) {
425
+ function or(e, r, t, a, p) {
426
426
  {
427
- var E, d = {}, u = null, D = null;
428
- t !== void 0 && (Pe(t), u = "" + t), Qe(r) && (Pe(r.key), u = "" + r.key), Ze(r) && (D = r.ref, er(r, h));
429
- for (E in r)
430
- ne.call(r, E) && !ze.hasOwnProperty(E) && (d[E] = r[E]);
427
+ var b, v = {}, c = null, F = null;
428
+ t !== void 0 && (Pe(t), c = "" + t), er(r) && (Pe(r.key), c = "" + r.key), Qe(r) && (F = r.ref, rr(r, p));
429
+ for (b in r)
430
+ oe.call(r, b) && !Ze.hasOwnProperty(b) && (v[b] = r[b]);
431
431
  if (e && e.defaultProps) {
432
- var w = e.defaultProps;
433
- for (E in w)
434
- d[E] === void 0 && (d[E] = w[E]);
432
+ var S = e.defaultProps;
433
+ for (b in S)
434
+ v[b] === void 0 && (v[b] = S[b]);
435
435
  }
436
- if (u || D) {
437
- var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
438
- u && rr(d, S), D && tr(d, S);
436
+ if (c || F) {
437
+ var O = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
438
+ c && tr(v, O), F && nr(v, O);
439
439
  }
440
- return nr(e, u, D, h, a, $e.current, d);
440
+ return ar(e, c, F, p, a, me.current, v);
441
441
  }
442
442
  }
443
- var be = k.ReactCurrentOwner, ke = k.ReactDebugCurrentFrame;
443
+ var ye = k.ReactCurrentOwner, Ie = k.ReactDebugCurrentFrame;
444
444
  function Q(e) {
445
445
  if (e) {
446
- var r = e._owner, t = ce(e.type, e._source, r ? r.type : null);
447
- ke.setExtraStackFrame(t);
446
+ var r = e._owner, t = ve(e.type, e._source, r ? r.type : null);
447
+ Ie.setExtraStackFrame(t);
448
448
  } else
449
- ke.setExtraStackFrame(null);
449
+ Ie.setExtraStackFrame(null);
450
450
  }
451
451
  var _e;
452
452
  _e = !1;
453
453
  function xe(e) {
454
- return typeof e == "object" && e !== null && e.$$typeof === R;
454
+ return typeof e == "object" && e !== null && e.$$typeof === T;
455
455
  }
456
- function De() {
456
+ function ke() {
457
457
  {
458
- if (be.current) {
459
- var e = N(be.current.type);
458
+ if (ye.current) {
459
+ var e = N(ye.current.type);
460
460
  if (e)
461
461
  return `
462
462
 
@@ -465,13 +465,13 @@ Check the render method of \`` + e + "`.";
465
465
  return "";
466
466
  }
467
467
  }
468
- function or(e) {
468
+ function ir(e) {
469
469
  return "";
470
470
  }
471
- var Fe = {};
472
- function ir(e) {
471
+ var De = {};
472
+ function sr(e) {
473
473
  {
474
- var r = De();
474
+ var r = ke();
475
475
  if (!r) {
476
476
  var t = typeof e == "string" ? e : e.displayName || e.name;
477
477
  t && (r = `
@@ -481,39 +481,39 @@ Check the top-level render call using <` + t + ">.");
481
481
  return r;
482
482
  }
483
483
  }
484
- function Ae(e, r) {
484
+ function Fe(e, r) {
485
485
  {
486
486
  if (!e._store || e._store.validated || e.key != null)
487
487
  return;
488
488
  e._store.validated = !0;
489
- var t = ir(r);
490
- if (Fe[t])
489
+ var t = sr(r);
490
+ if (De[t])
491
491
  return;
492
- Fe[t] = !0;
492
+ De[t] = !0;
493
493
  var a = "";
494
- e && e._owner && e._owner !== be.current && (a = " It was passed a child from " + N(e._owner.type) + "."), Q(e), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), Q(null);
494
+ e && e._owner && e._owner !== ye.current && (a = " It was passed a child from " + N(e._owner.type) + "."), Q(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), Q(null);
495
495
  }
496
496
  }
497
- function Le(e, r) {
497
+ function Ae(e, r) {
498
498
  {
499
499
  if (typeof e != "object")
500
500
  return;
501
- if (ye(e))
501
+ if (be(e))
502
502
  for (var t = 0; t < e.length; t++) {
503
503
  var a = e[t];
504
- xe(a) && Ae(a, r);
504
+ xe(a) && Fe(a, r);
505
505
  }
506
506
  else if (xe(e))
507
507
  e._store && (e._store.validated = !0);
508
508
  else if (e) {
509
- var h = P(e);
510
- if (typeof h == "function" && h !== e.entries)
511
- for (var E = h.call(e), d; !(d = E.next()).done; )
512
- xe(d.value) && Ae(d.value, r);
509
+ var p = $(e);
510
+ if (typeof p == "function" && p !== e.entries)
511
+ for (var b = p.call(e), v; !(v = b.next()).done; )
512
+ xe(v.value) && Fe(v.value, r);
513
513
  }
514
514
  }
515
515
  }
516
- function sr(e) {
516
+ function lr(e) {
517
517
  {
518
518
  var r = e.type;
519
519
  if (r == null || typeof r == "string")
@@ -523,128 +523,128 @@ Check the top-level render call using <` + t + ">.");
523
523
  t = r.propTypes;
524
524
  else if (typeof r == "object" && (r.$$typeof === g || // Note: Memo only checks outer props here.
525
525
  // Inner props are checked in the reconciler.
526
- r.$$typeof === W))
526
+ r.$$typeof === m))
527
527
  t = r.propTypes;
528
528
  else
529
529
  return;
530
530
  if (t) {
531
531
  var a = N(r);
532
- He(t, e.props, "prop", a, e);
532
+ Je(t, e.props, "prop", a, e);
533
533
  } else if (r.PropTypes !== void 0 && !_e) {
534
534
  _e = !0;
535
- var h = N(r);
536
- p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", h || "Unknown");
535
+ var p = N(r);
536
+ h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
537
537
  }
538
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
538
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
539
539
  }
540
540
  }
541
- function lr(e) {
541
+ function ur(e) {
542
542
  {
543
543
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
544
544
  var a = r[t];
545
545
  if (a !== "children" && a !== "key") {
546
- Q(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), Q(null);
546
+ Q(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), Q(null);
547
547
  break;
548
548
  }
549
549
  }
550
- e.ref !== null && (Q(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), Q(null));
550
+ e.ref !== null && (Q(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), Q(null));
551
551
  }
552
552
  }
553
- var We = {};
554
- function Be(e, r, t, a, h, E) {
553
+ var Le = {};
554
+ function We(e, r, t, a, p, b) {
555
555
  {
556
- var d = pe(e);
557
- if (!d) {
558
- var u = "";
559
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
560
- var D = or();
561
- D ? u += D : u += De();
562
- var w;
563
- e === null ? w = "null" : ye(e) ? w = "array" : e !== void 0 && e.$$typeof === R ? (w = "<" + (N(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : w = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", w, u);
556
+ var v = Ee(e);
557
+ if (!v) {
558
+ var c = "";
559
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (c += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
560
+ var F = ir();
561
+ F ? c += F : c += ke();
562
+ var S;
563
+ e === null ? S = "null" : be(e) ? S = "array" : e !== void 0 && e.$$typeof === T ? (S = "<" + (N(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : S = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", S, c);
564
564
  }
565
- var S = ar(e, r, t, h, E);
566
- if (S == null)
567
- return S;
568
- if (d) {
565
+ var O = or(e, r, t, p, b);
566
+ if (O == null)
567
+ return O;
568
+ if (v) {
569
569
  var Y = r.children;
570
570
  if (Y !== void 0)
571
571
  if (a)
572
- if (ye(Y)) {
572
+ if (be(Y)) {
573
573
  for (var ee = 0; ee < Y.length; ee++)
574
- Le(Y[ee], e);
574
+ Ae(Y[ee], e);
575
575
  Object.freeze && Object.freeze(Y);
576
576
  } else
577
- p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
577
+ h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
578
578
  else
579
- Le(Y, e);
579
+ Ae(Y, e);
580
580
  }
581
- if (ne.call(r, "key")) {
582
- var z = N(e), L = Object.keys(r).filter(function(hr) {
583
- return hr !== "key";
584
- }), Re = L.length > 0 ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}";
585
- if (!We[z + Re]) {
586
- var vr = L.length > 0 ? "{" + L.join(": ..., ") + ": ...}" : "{}";
587
- p(`A props object containing a "key" prop is being spread into JSX:
581
+ if (oe.call(r, "key")) {
582
+ var Z = N(e), W = Object.keys(r).filter(function(pr) {
583
+ return pr !== "key";
584
+ }), Re = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
585
+ if (!Le[Z + Re]) {
586
+ var hr = W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}";
587
+ h(`A props object containing a "key" prop is being spread into JSX:
588
588
  let props = %s;
589
589
  <%s {...props} />
590
590
  React keys must be passed directly to JSX without using spread:
591
591
  let props = %s;
592
- <%s key={someKey} {...props} />`, Re, z, vr, z), We[z + Re] = !0;
592
+ <%s key={someKey} {...props} />`, Re, Z, hr, Z), Le[Z + Re] = !0;
593
593
  }
594
594
  }
595
- return e === C ? lr(S) : sr(S), S;
595
+ return e === y ? ur(O) : lr(O), O;
596
596
  }
597
597
  }
598
- function ur(e, r, t) {
599
- return Be(e, r, t, !0);
598
+ function fr(e, r, t) {
599
+ return We(e, r, t, !0);
600
600
  }
601
601
  function cr(e, r, t) {
602
- return Be(e, r, t, !1);
602
+ return We(e, r, t, !1);
603
603
  }
604
- var fr = cr, dr = ur;
605
- oe.Fragment = C, oe.jsx = fr, oe.jsxs = dr;
606
- })()), oe;
604
+ var dr = cr, vr = fr;
605
+ se.Fragment = y, se.jsx = dr, se.jsxs = vr;
606
+ })()), se;
607
607
  }
608
- var Ye;
608
+ var Ue;
609
609
  function _r() {
610
- return Ye || (Ye = 1, process.env.NODE_ENV === "production" ? de.exports = yr() : de.exports = br()), de.exports;
610
+ return Ue || (Ue = 1, process.env.NODE_ENV === "production" ? pe.exports = br() : pe.exports = yr()), pe.exports;
611
611
  }
612
612
  var G = _r();
613
- const Ne = 50, xr = 5, Rr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0b"], Pr = ({
614
- commits: O,
615
- rowHeight: R,
616
- colorPalette: T,
617
- laneWidth: C,
618
- renderNode: m,
619
- renderEdge: $
613
+ const Ye = 50, xr = 5, Rr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0b"], Pr = ({
614
+ commits: P,
615
+ rowHeight: T,
616
+ colorPalette: _,
617
+ laneWidth: y,
618
+ renderNode: w,
619
+ renderEdge: I
620
620
  }) => {
621
- const F = C || Ne, A = R || Ne, g = ie(
622
- () => (T || Rr).map((c, y) => ({
623
- color: c,
621
+ const A = y || Ye, L = T || Ye, g = le(
622
+ () => (_ || Rr).map((s, E) => ({
623
+ color: s,
624
624
  branch: null,
625
- lane: y + 1,
626
- index: y
625
+ lane: E + 1,
626
+ index: E
627
627
  })),
628
- [T, O]
628
+ [_, P]
629
629
  );
630
- function M() {
631
- var c = g.findIndex((P) => !P.branch);
632
- if (c > -1)
633
- return g[c];
634
- var y = {
630
+ function B() {
631
+ var s = g.findIndex(($) => !$.branch);
632
+ if (s > -1)
633
+ return g[s];
634
+ var E = {
635
635
  color: "#" + Math.floor(Math.random() * 16777215).toString(16),
636
636
  branch: null,
637
637
  lane: g.length + 1,
638
- index: c
638
+ index: s
639
639
  };
640
- return g.push(y), y;
640
+ return g.push(E), E;
641
641
  }
642
- const b = ie(() => {
643
- var c = [];
644
- const y = /* @__PURE__ */ new Map();
645
- return O.forEach((P, k) => {
646
- var p = {
647
- ...P,
642
+ const x = le(() => {
643
+ var s = [];
644
+ const E = /* @__PURE__ */ new Map();
645
+ return P.forEach(($, k) => {
646
+ var h = {
647
+ ...$,
648
648
  color: "",
649
649
  lane: 0,
650
650
  cx: 0,
@@ -652,75 +652,75 @@ const Ne = 50, xr = 5, Rr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0
652
652
  prev: [],
653
653
  // initialize empty
654
654
  index: k
655
- }, B = g.find((i) => i.branch == P.id);
656
- B ? g.forEach((i) => {
657
- i.branch === P.id && i.index !== B?.index && (i.branch = null);
658
- }) : B = M();
659
- for (const i of P.parents)
660
- if (g.find((J) => J.branch === i))
661
- B.branch = i;
662
- else if (B.branch == P.id) B.branch = i;
655
+ }, U = g.find((D) => D.branch == $.id);
656
+ U ? g.forEach((D) => {
657
+ D.branch === $.id && D.index !== U?.index && (D.branch = null);
658
+ }) : U = B();
659
+ for (const D of $.parents)
660
+ if (g.find((d) => d.branch === D))
661
+ U.branch = D;
662
+ else if (U.branch == $.id) U.branch = D;
663
663
  else {
664
- var H = g.find((J) => !J.branch);
665
- H || (H = M()), H.branch = i;
664
+ var J = g.find((d) => !d.branch);
665
+ J || (J = B()), J.branch = D;
666
666
  }
667
- p.color = B.color, p.lane = B.lane, p.cx = p.lane * F - F / 2, p.cy = A * k + F / 2, c.push(p), y.set(p.id, p);
668
- }), c.forEach((P) => {
669
- P.parents.forEach((k) => {
670
- const p = y.get(k);
671
- p && p.prev.push(P);
667
+ h.color = U.color, h.lane = U.lane, h.cx = h.lane * A - A / 2, h.cy = L * k + A / 2, s.push(h), E.set(h.id, h);
668
+ }), s.forEach(($) => {
669
+ $.parents.forEach((k) => {
670
+ const h = E.get(k);
671
+ h && h.prev.push($);
672
672
  });
673
- }), c;
674
- }, [O, A, F]);
675
- function W(c, y) {
676
- return `M ${c.cx} ${c.cy} L ${y.cx} ${y.cy}`;
673
+ }), s;
674
+ }, [P, L, A]);
675
+ function m(s, E) {
676
+ return `M ${s.cx} ${s.cy} L ${E.cx} ${E.cy}`;
677
677
  }
678
- const U = ie(() => Math.max(...b.map((c) => c.lane), 0), [b]), I = ie(() => U * F + 100, [U, F]);
679
- return /* @__PURE__ */ G.jsxs("svg", { width: I, height: A * b.length, children: [
680
- b.flatMap(
681
- (c) => c.prev.map((y, P) => {
682
- if ($)
683
- return $(c, y, b, P);
684
- const k = W(c, y);
678
+ const M = le(() => Math.max(...x.map((s) => s.lane), 0), [x]), H = le(() => M * A + 100, [M, A]);
679
+ return /* @__PURE__ */ G.jsxs("svg", { width: H, height: L * x.length, children: [
680
+ x.flatMap(
681
+ (s) => s.prev.map((E, $) => {
682
+ if (I)
683
+ return I(s, E, x, $);
684
+ const k = m(s, E);
685
685
  return /* @__PURE__ */ G.jsx(
686
686
  "path",
687
687
  {
688
688
  d: k,
689
689
  fill: "none",
690
- stroke: c.lane <= y.lane ? y.color : c.color,
690
+ stroke: s.lane <= E.lane ? E.color : s.color,
691
691
  strokeWidth: 2
692
692
  },
693
- `${c.id}-${y.id}_${P}`
693
+ `${s.id}-${E.id}_${$}`
694
694
  );
695
695
  })
696
696
  ),
697
- b.map((c, y) => m ? m(c, y) : /* @__PURE__ */ G.jsx(
697
+ x.map((s, E) => w ? w(s, E) : /* @__PURE__ */ G.jsx(
698
698
  "circle",
699
699
  {
700
- cx: c.cx,
701
- cy: c.cy,
700
+ cx: s.cx,
701
+ cy: s.cy,
702
702
  r: xr,
703
- fill: c.color
703
+ fill: s.color
704
704
  },
705
- `${c.id}_${y}`
705
+ `${s.id}_${E}`
706
706
  ))
707
707
  ] });
708
- }, ve = {
709
- getCurveTop(O, R, T, C) {
710
- const m = Math.min(15, Math.abs(C - R) / 2);
711
- let $ = ` C ${O} ${R + m}, ${T} ${R + m}, ${T} ${R + m * 2}`;
712
- return R + m * 2 < C && ($ += ` L ${T} ${C}`), $;
708
+ }, ge = {
709
+ getCurveTop(P, T, _, y) {
710
+ const w = Math.min(15, Math.abs(y - T) / 2);
711
+ let I = ` C ${P} ${T + w}, ${_} ${T + w}, ${_} ${T + w * 2}`;
712
+ return T + w * 2 < y && (I += ` L ${_} ${y}`), I;
713
713
  },
714
- getCurveBottom(O, R, T, C) {
715
- const m = Math.min(15, Math.abs(C - R) / 2);
716
- let $ = "";
717
- return C - m * 2 > R && ($ += ` L ${O} ${C - m * 2}`), $ += ` C ${O} ${C - m}, ${T} ${C - m}, ${T} ${C}`, $;
714
+ getCurveBottom(P, T, _, y) {
715
+ const w = Math.min(15, Math.abs(y - T) / 2);
716
+ let I = "";
717
+ return y - w * 2 > T && (I += ` L ${P} ${y - w * 2}`), I += ` C ${P} ${y - w}, ${_} ${y - w}, ${_} ${y}`, I;
718
718
  },
719
- drawFinalPath(O, R, T = 2) {
720
- return /* @__PURE__ */ G.jsx("path", { d: O, stroke: R, strokeWidth: T, fill: "none" });
719
+ drawFinalPath(P, T, _ = 2, y, w) {
720
+ return /* @__PURE__ */ G.jsx("path", { d: P, stroke: T, strokeWidth: _, fill: "none" }, `${y.id}-${w.id}`);
721
721
  },
722
- drawPoint(O, R, T, C) {
723
- return /* @__PURE__ */ G.jsx("circle", { cx: O, cy: R, r: 5, fill: T, stroke: "none" });
722
+ drawPoint(P, T, _, y) {
723
+ return /* @__PURE__ */ G.jsx("circle", { cx: P, cy: T, r: 5, fill: _, stroke: "none" }, y.id);
724
724
  }
725
725
  }, Tr = [
726
726
  "#3a86ff",
@@ -733,194 +733,218 @@ const Ne = 50, xr = 5, Rr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0
733
733
  "#ff009d",
734
734
  "#fb7507",
735
735
  "#0b38ff"
736
- ], Cr = 35, wr = 35, Te = 25, Sr = 25, Or = 2, $r = pr((O, R) => {
736
+ ], Cr = 35, wr = 35, Ne = 25, Ve = 25, Sr = 2, mr = gr((P, T) => {
737
737
  const {
738
- commits: T,
739
- colorPalette: C,
740
- rowHeight: m,
741
- laneWidth: $,
742
- style: F,
743
- renderNode: A,
738
+ commits: _,
739
+ colorPalette: y,
740
+ rowHeight: w,
741
+ laneWidth: I,
742
+ style: A,
743
+ renderNode: L,
744
744
  renderEdge: g,
745
- getMergeCurve: M,
746
- getBranchSplitCurve: b
747
- } = O;
748
- gr(null);
749
- const [W, U] = Ce.useState(0);
750
- let I = 0;
751
- const c = C || Tr, y = m || Cr, P = $ || wr, { nodes: k, edges: p } = ie(() => {
752
- const B = [], H = [];
753
- let i = {}, Z = [], J = 0;
754
- function he(n, o, l, s) {
755
- return I = Math.max(I, l, n), M ? M(n, o, l, s) : ve.getCurveTop(n, o, l, s);
756
- }
757
- function re(n, o, l, s) {
758
- return I = Math.max(I, l, n), b ? b(n, o, l, s) : ve.getCurveBottom(n, o, l, s);
759
- }
760
- function pe(n, o, l, s = 2) {
745
+ getMergeCurve: B,
746
+ getBranchSplitCurve: x,
747
+ padding: m
748
+ } = P, [M, H] = Te.useState(0);
749
+ let s = 0;
750
+ const E = y || Tr, $ = w || Cr, k = I || wr, h = typeof m == "number" ? { left: m, right: m, bottom: m, top: m } : m || {
751
+ left: Ne,
752
+ right: Ne,
753
+ bottom: Ve,
754
+ top: Ve
755
+ }, { nodes: U, edges: J } = le(() => {
756
+ const D = [], re = [];
757
+ let d = {}, te = [], ne = 0;
758
+ function Ee(n, i, l, o) {
759
+ return s = Math.max(s, l, n), B ? B(n, i, l, o) : ge.getCurveTop(n, i, l, o);
760
+ }
761
+ function ue(n, i, l, o) {
762
+ return s = Math.max(s, l, n), x ? x(n, i, l, o) : ge.getCurveBottom(n, i, l, o);
763
+ }
764
+ function fe(n, i, l, o, u) {
761
765
  if (g) {
762
- let f = g(o, l);
766
+ let f = g(o, u, i, l);
763
767
  n.push(f);
764
768
  } else {
765
- let f = ve.drawFinalPath(o, l, s);
769
+ let f = ge.drawFinalPath(
770
+ i,
771
+ l,
772
+ Sr,
773
+ o,
774
+ u
775
+ );
766
776
  n.push(f);
767
777
  }
768
778
  }
769
- function ge(n, o, l, s, f) {
770
- if (I = Math.max(I, o), A) {
771
- let v = A(o, l, s, f);
772
- n.push(v);
779
+ function N(n, i, l, o, u) {
780
+ if (s = Math.max(s, i), L) {
781
+ let f = L(i, l, o, u);
782
+ n.push(f);
773
783
  } else {
774
- let v = ve.drawPoint(o, l, s, f);
775
- n.push(v);
784
+ let f = ge.drawPoint(i, l, o, u);
785
+ n.push(f);
776
786
  }
777
787
  }
778
- function se() {
779
- const n = Object.values(i), o = new Set(n.map((s) => s.xIndex));
788
+ function K() {
789
+ const n = Object.values(d), i = new Set(n.map((o) => o.xIndex));
780
790
  let l = 0;
781
- for (; o.has(l); ) l++;
791
+ for (; i.has(l); ) l++;
782
792
  return {
783
- color: c[J++ % c.length],
793
+ color: E[ne++ % E.length],
784
794
  xIndex: l
785
795
  };
786
796
  }
787
- function N() {
788
- const n = Object.keys(i), o = /* @__PURE__ */ new Set();
789
- n.filter((s) => s.startsWith("merge_")).forEach((s) => {
790
- o.add(i[s].xIndex);
797
+ function q() {
798
+ const n = Object.keys(d), i = /* @__PURE__ */ new Set();
799
+ n.filter((o) => o.startsWith("merge_")).forEach((o) => {
800
+ i.add(d[o].xIndex);
791
801
  });
792
- const l = n.filter((s) => !s.startsWith("merge_")).map((s) => i[s]);
793
- l.sort((s, f) => s.xIndex - f.xIndex);
794
- for (const s of l) {
795
- let f = 0;
796
- for (; o.has(f); )
797
- f++;
798
- f < s.xIndex && (s.xIndex = f), o.add(s.xIndex);
802
+ const l = n.filter((o) => !o.startsWith("merge_")).map((o) => d[o]);
803
+ l.sort((o, u) => o.xIndex - u.xIndex);
804
+ for (const o of l) {
805
+ let u = 0;
806
+ for (; i.has(u); )
807
+ u++;
808
+ u < o.xIndex && (o.xIndex = u), i.add(o.xIndex);
799
809
  }
800
810
  }
801
- function K(n, o) {
802
- let l = /* @__PURE__ */ new Set(), s = i[o];
803
- s && (l.add(o), s.toBeClosed && s.toBeClosed.forEach((f) => l.add(f))), Object.keys(i).forEach((f) => {
804
- if (l.has(f)) return;
805
- const v = i[f], _ = v.xIndex * P + Te;
806
- v.lastxy.y !== n && (v.lastxy.x !== _ ? v.pathStr += he(
807
- v.lastxy.x,
808
- v.lastxy.y,
809
- _,
811
+ function ce(n, i) {
812
+ let l = /* @__PURE__ */ new Set(), o = d[i];
813
+ o && (l.add(i), o.toBeClosed && o.toBeClosed.forEach((u) => l.add(u))), Object.keys(d).forEach((u) => {
814
+ if (l.has(u)) return;
815
+ const f = d[u], C = f.xIndex * k + h.left;
816
+ f.lastxy.y !== n && (f.lastxy.x !== C ? f.pathStr += Ee(
817
+ f.lastxy.x,
818
+ f.lastxy.y,
819
+ C,
810
820
  n
811
- ) : v.pathStr += ` L ${_} ${n}`, v.lastxy = { x: _, y: n });
821
+ ) : f.pathStr += ` L ${C} ${n}`, f.lastxy = { x: C, y: n });
812
822
  });
813
823
  }
814
- function q(n) {
815
- let o = i[n.id], l = 0, s = "";
816
- if (o)
817
- l = o.xIndex, s = o.color;
824
+ function de(n) {
825
+ let i = d[n.id], l = 0, o = "";
826
+ if (i)
827
+ l = i.xIndex, o = i.color;
818
828
  else {
819
- let _ = se();
820
- l = _.xIndex, s = _.color;
829
+ let C = K();
830
+ l = C.xIndex, o = C.color;
821
831
  }
822
- const f = l * P + Te, v = n.meta.yIndex * y + Sr;
823
- if (K(v, n.id), o && ((o.lastxy.y !== v || o.lastxy.x !== f) && (o.pathStr += re(
824
- o.lastxy.x,
825
- o.lastxy.y,
826
- f,
827
- v
828
- )), Z.push({
829
- d: o.pathStr,
830
- color: o.color
831
- }), o.toBeClosed && o.toBeClosed.forEach((_) => {
832
- let x = i[_];
833
- x && ((x.lastxy.y !== v || x.lastxy.x !== f) && (x.pathStr += re(
834
- x.lastxy.x,
835
- x.lastxy.y,
836
- f,
837
- v
838
- )), Z.push({
839
- d: x.pathStr,
840
- color: x.color
841
- }), delete i[_]);
842
- }), delete i[n.id]), ge(B, f, v, s, n), n.parents.length > 0) {
843
- let _ = n.parents[0];
844
- if (!i[_])
845
- i[_] = {
846
- color: s,
832
+ const u = l * k + h.left, f = n.meta.yIndex * $ + h.top;
833
+ if (ce(f, n.id), i && ((i.lastxy.y !== f || i.lastxy.x !== u) && (i.pathStr += ue(
834
+ i.lastxy.x,
835
+ i.lastxy.y,
836
+ u,
837
+ f
838
+ )), te.push({
839
+ d: i.pathStr,
840
+ color: i.color,
841
+ from: i.from,
842
+ to: n
843
+ }), i.toBeClosed && i.toBeClosed.forEach((C) => {
844
+ let R = d[C];
845
+ R && ((R.lastxy.y !== f || R.lastxy.x !== u) && (R.pathStr += ue(
846
+ R.lastxy.x,
847
+ R.lastxy.y,
848
+ u,
849
+ f
850
+ )), te.push({
851
+ d: R.pathStr,
852
+ color: R.color,
853
+ from: R.from,
854
+ to: n
855
+ }), delete d[C]);
856
+ }), delete d[n.id]), N(D, u, f, o, n), n.parents.length > 0) {
857
+ let C = n.parents[0];
858
+ if (!d[C])
859
+ d[C] = {
860
+ color: o,
847
861
  xIndex: l,
848
- lastxy: { x: f, y: v },
849
- pathStr: `M ${f} ${v}`
862
+ lastxy: { x: u, y: f },
863
+ pathStr: `M ${u} ${f}`,
850
864
  // Creates a fresh string for the parent
865
+ from: n
851
866
  };
852
867
  else {
853
- let x = i[_];
854
- if (l < x.xIndex) {
855
- let j = `merge_${n.id}_${_}_${x.xIndex}`;
856
- i[j] = x, i[_] = {
857
- color: s,
868
+ let R = d[C];
869
+ if (l < R.xIndex) {
870
+ let j = `merge_${n.id}_${C}_${R.xIndex}`;
871
+ d[j] = R, d[C] = {
872
+ color: o,
858
873
  xIndex: l,
859
- lastxy: { x: f, y: v },
860
- pathStr: `M ${f} ${v}`,
874
+ lastxy: { x: u, y: f },
875
+ pathStr: `M ${u} ${f}`,
861
876
  // Creates a fresh string
862
- toBeClosed: x.toBeClosed ? [...x.toBeClosed, j] : [j]
863
- }, delete x.toBeClosed;
877
+ toBeClosed: R.toBeClosed ? [...R.toBeClosed, j] : [j],
878
+ from: n
879
+ }, delete R.toBeClosed;
864
880
  } else {
865
- let j = `merge_${n.id}_${_}_${l}`;
866
- i[j] = {
867
- color: s,
881
+ let j = `merge_${n.id}_${C}_${l}`;
882
+ d[j] = {
883
+ color: o,
868
884
  xIndex: l,
869
- lastxy: { x: f, y: v },
870
- pathStr: `M ${f} ${v}`
885
+ lastxy: { x: u, y: f },
886
+ pathStr: `M ${u} ${f}`,
871
887
  // Creates a fresh string
872
- }, i[_].toBeClosed || (i[_].toBeClosed = []), i[_].toBeClosed.push(j);
888
+ from: n
889
+ }, d[C].toBeClosed || (d[C].toBeClosed = []), d[C].toBeClosed.push(j);
873
890
  }
874
891
  }
875
- for (let x = 1; x < n.parents.length; x++) {
876
- let j = n.parents[x], te = l + x;
877
- Object.values(i).forEach((V) => {
878
- V.xIndex >= te && V.xIndex++;
892
+ for (let R = 1; R < n.parents.length; R++) {
893
+ let j = n.parents[R], X = l + R;
894
+ Object.values(d).forEach((V) => {
895
+ V.xIndex >= X && V.xIndex++;
879
896
  });
880
- let X = {
881
- color: c[J++ % c.length],
882
- xIndex: te,
883
- lastxy: { x: f, y: v },
884
- pathStr: `M ${f} ${v}`
897
+ let z = {
898
+ color: E[ne++ % E.length],
899
+ xIndex: X,
900
+ lastxy: { x: u, y: f },
901
+ pathStr: `M ${u} ${f}`,
885
902
  // Creates a fresh string
903
+ from: n
886
904
  };
887
- if (!i[j])
888
- i[j] = X;
905
+ if (!d[j])
906
+ d[j] = z;
889
907
  else {
890
- let V = `merge_${n.id}_${j}_${te}`;
891
- X.color = i[j].color, i[V] = X, i[j].toBeClosed || (i[j].toBeClosed = []), i[j].toBeClosed.push(V);
908
+ let V = `merge_${n.id}_${j}_${X}`;
909
+ z.color = d[j].color, d[V] = z, d[j].toBeClosed || (d[j].toBeClosed = []), d[j].toBeClosed.push(V);
892
910
  }
893
911
  }
894
912
  }
895
- N();
896
- }
897
- return T.sort(
898
- (n, o) => new Date(o.date).getTime() - new Date(n.date).getTime()
899
- ), T.forEach((n, o) => {
900
- n.meta = { yIndex: o };
901
- }), T.forEach((n) => {
902
- q(n);
903
- }), Z.forEach((n) => {
904
- pe(H, n.d, n.color, Or);
905
- }), { nodes: B, edges: H };
906
- }, [{ ...O }]);
913
+ q();
914
+ }
915
+ return _.sort(
916
+ (n, i) => new Date(i.date).getTime() - new Date(n.date).getTime()
917
+ ), _.forEach((n, i) => {
918
+ n.meta == null && (n.meta = { yIndex: i, prev: [] }), n.meta.yIndex = i, n.parents.forEach((l) => {
919
+ var o = _.findIndex((f) => f.id === l);
920
+ if (o > -1) {
921
+ var u = _[o];
922
+ u.meta == null && (u.meta = { yIndex: o, prev: [] }), u.meta.prev.indexOf(n.id) < 0 && u.meta.prev.push(n.id);
923
+ }
924
+ });
925
+ }), _.forEach((n) => {
926
+ de(n);
927
+ }), te.forEach((n) => {
928
+ fe(re, n.d, n.color, n.from, n.to);
929
+ }), { nodes: D, edges: re };
930
+ }, [{ ...P }]);
907
931
  return Er(() => {
908
- U(I + Te);
909
- }, [I]), /* @__PURE__ */ G.jsx(G.Fragment, { children: /* @__PURE__ */ G.jsxs(
932
+ H(s + h.right);
933
+ }, [s]), /* @__PURE__ */ G.jsx(G.Fragment, { children: /* @__PURE__ */ G.jsxs(
910
934
  "svg",
911
935
  {
912
- ref: R,
913
- height: y * T.length,
914
- width: W,
915
- style: F,
936
+ ref: T,
937
+ height: $ * _.length + h.bottom,
938
+ width: M,
939
+ style: A,
916
940
  children: [
917
- /* @__PURE__ */ G.jsx("g", { id: "layer-lines", children: p }),
918
- /* @__PURE__ */ G.jsx("g", { id: "layer-points", children: k })
941
+ /* @__PURE__ */ G.jsx("g", { id: "layer-lines", children: J }),
942
+ /* @__PURE__ */ G.jsx("g", { id: "layer-points", children: U })
919
943
  ]
920
944
  }
921
945
  ) });
922
946
  });
923
947
  export {
924
- $r as GitGraph,
948
+ mr as GitGraph,
925
949
  Pr as GitGraphSVG
926
950
  };