zegantt 0.2.2 → 0.2.3

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.
package/dist/zegantt.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { jsx as t, jsxs as o, Fragment as de } from "react/jsx-runtime";
2
2
  import { createContext as et, useContext as tt, useRef as pe, useCallback as J, useEffect as ge, useMemo as ae, useState as P } from "react";
3
- import { Flag as we, Clock as Se, MessageCircle as nt, Plus as ot, ChevronDown as Be, ChevronRight as je, Paperclip as Ee, AlertTriangle as rt, Eye as it, Edit2 as at, Trash2 as st, Loader2 as Oe, Upload as dt, X as lt, Link2 as ct } from "lucide-react";
4
- const _e = et(void 0);
3
+ import { Flag as Se, Clock as ke, MessageCircle as nt, Plus as ot, ChevronDown as Be, ChevronRight as Pe, Paperclip as Fe, AlertTriangle as rt, Eye as it, Edit2 as at, Trash2 as st, Loader2 as _e, Upload as dt, X as lt, Link2 as ct } from "lucide-react";
4
+ const Ge = et(void 0);
5
5
  function pt({ children: n, value: c }) {
6
- return /* @__PURE__ */ t(_e.Provider, { value: c, children: n });
6
+ return /* @__PURE__ */ t(Ge.Provider, { value: c, children: n });
7
7
  }
8
- function ke() {
9
- const n = tt(_e);
8
+ function Ie() {
9
+ const n = tt(Ge);
10
10
  if (!n)
11
11
  throw new Error("useGanttContext must be used within a GanttProvider");
12
12
  return n;
@@ -62,7 +62,7 @@ const V = {
62
62
  // #7B7B7B
63
63
  arrowHover: V.dark_green
64
64
  // #1A3C30
65
- }, _ = 50, ve = 32, gt = ve * 2, ht = 460, te = 26, Ae = 28, Ge = 120, ut = 40, ft = 3.5, oe = [
65
+ }, _ = 50, we = 32, gt = we * 2, ht = 460, te = 26, fe = 28, Le = 120, ut = 40, ft = 3.5, oe = [
66
66
  { bar: "#D1D8A0", barBorder: "#A0D8A8", progress: "#1A3C30" },
67
67
  // sistema (light_yellow)
68
68
  { bar: "#A0D8C8", barBorder: "#6BBFA8", progress: "#14534A" },
@@ -83,7 +83,7 @@ const V = {
83
83
  // violet
84
84
  { bar: "#A0D8B0", barBorder: "#70C888", progress: "#1A5030" }
85
85
  // mint
86
- ], Pe = {
86
+ ], Ne = {
87
87
  step: "Steps",
88
88
  milestone: "Milestones",
89
89
  event: "Events",
@@ -94,16 +94,16 @@ function yt() {
94
94
  props: n,
95
95
  t: c,
96
96
  viewMode: p,
97
- setViewMode: D,
97
+ setViewMode: T,
98
98
  visibleTypes: h,
99
99
  setVisibleTypes: x,
100
100
  newActionOpen: w,
101
101
  setNewActionOpen: C,
102
- newActionRef: M
103
- } = ke(), { projectName: u, onAddNewStage: $, onAddMilestone: b, onAddEvent: F, onAddNote: S } = n, B = (r) => {
102
+ newActionRef: D
103
+ } = Ie(), { projectName: u, onAddNewStage: $, onAddMilestone: b, onAddEvent: F, onAddNote: S } = n, B = (r) => {
104
104
  x((i) => {
105
- const T = new Set(i);
106
- return T.has(r) ? T.delete(r) : T.add(r), T;
105
+ const I = new Set(i);
106
+ return I.has(r) ? I.delete(r) : I.add(r), I;
107
107
  });
108
108
  };
109
109
  return /* @__PURE__ */ o(
@@ -143,7 +143,7 @@ function yt() {
143
143
  /* @__PURE__ */ t("div", { style: { display: "flex", padding: 4, borderRadius: 8, background: "rgba(122,122,122,0.07)", border: `1px solid ${e.borderLight}` }, children: ["day", "month"].map((r) => /* @__PURE__ */ t(
144
144
  "button",
145
145
  {
146
- onClick: () => D(r),
146
+ onClick: () => T(r),
147
147
  style: {
148
148
  padding: "6px 20px",
149
149
  fontSize: 12,
@@ -160,8 +160,8 @@ function yt() {
160
160
  )) }),
161
161
  /* @__PURE__ */ t("div", { style: { display: "flex", padding: 4, borderRadius: 8, gap: 2, background: "rgba(122,122,122,0.07)", border: `1px solid ${e.borderLight}` }, children: [
162
162
  { type: "step", label: c("gantt.filter.steps", "Steps"), icon: /* @__PURE__ */ t("div", { style: { width: 10, height: 10, borderRadius: 2, background: oe[0].bar, border: `1px solid ${oe[0].barBorder}` } }) },
163
- { type: "milestone", label: c("gantt.filter.milestones", "Milestones"), icon: /* @__PURE__ */ t(we, { size: 11, style: { color: e.milestone } }) },
164
- { type: "event", label: c("gantt.filter.events", "Events"), icon: /* @__PURE__ */ t(Se, { size: 11, style: { color: e.event } }) },
163
+ { type: "milestone", label: c("gantt.filter.milestones", "Milestones"), icon: /* @__PURE__ */ t(Se, { size: 11, style: { color: e.milestone } }) },
164
+ { type: "event", label: c("gantt.filter.events", "Events"), icon: /* @__PURE__ */ t(ke, { size: 11, style: { color: e.event } }) },
165
165
  { type: "note", label: c("gantt.filter.notes", "Notes"), icon: /* @__PURE__ */ t(nt, { size: 11, style: { color: e.note } }) }
166
166
  ].map((r) => {
167
167
  const i = h.has(r.type);
@@ -190,7 +190,7 @@ function yt() {
190
190
  r.type
191
191
  );
192
192
  }) }),
193
- $ && /* @__PURE__ */ o("div", { ref: M, style: { position: "relative" }, children: [
193
+ $ && /* @__PURE__ */ o("div", { ref: D, style: { position: "relative" }, children: [
194
194
  /* @__PURE__ */ o(
195
195
  "button",
196
196
  {
@@ -243,14 +243,14 @@ function yt() {
243
243
  },
244
244
  {
245
245
  label: c("gantt.newAction.milestone", "Milestone"),
246
- icon: /* @__PURE__ */ t("div", { style: { width: 22, height: 22, borderRadius: "50%", background: `${e.milestoneRing}30`, border: `1.5px solid ${e.milestoneRing}`, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(we, { size: 11, style: { color: e.milestone } }) }),
246
+ icon: /* @__PURE__ */ t("div", { style: { width: 22, height: 22, borderRadius: "50%", background: `${e.milestoneRing}30`, border: `1.5px solid ${e.milestoneRing}`, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(Se, { size: 11, style: { color: e.milestone } }) }),
247
247
  action: () => {
248
248
  b?.(), C(!1);
249
249
  }
250
250
  },
251
251
  {
252
252
  label: c("gantt.newAction.event", "Event"),
253
- icon: /* @__PURE__ */ t("div", { style: { width: 22, height: 22, borderRadius: "50%", background: `${e.event}18`, border: `1.5px solid ${e.event}55`, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(Se, { size: 11, style: { color: e.event } }) }),
253
+ icon: /* @__PURE__ */ t("div", { style: { width: 22, height: 22, borderRadius: "50%", background: `${e.event}18`, border: `1.5px solid ${e.event}55`, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(ke, { size: 11, style: { color: e.event } }) }),
254
254
  action: () => {
255
255
  F?.(), C(!1);
256
256
  }
@@ -303,24 +303,24 @@ function yt() {
303
303
  }
304
304
  );
305
305
  }
306
- const Ve = 864e5, Q = (n, c) => new Date(n.getTime() + c * Ve), fe = (n, c) => Math.round((c.getTime() - n.getTime()) / Ve), Ne = (n) => new Date(n.getFullYear(), n.getMonth(), 1), ze = (n) => new Date(n.getFullYear(), n.getMonth() + 1, 0), ne = (n) => `${String(n.getDate()).padStart(2, "0")}/${String(n.getMonth() + 1).padStart(2, "0")}/${n.getFullYear()}`, Ye = (n, c = "en") => new Intl.DateTimeFormat(c, { month: "long" }).format(n).toUpperCase();
306
+ const Ve = 864e5, Q = (n, c) => new Date(n.getTime() + c * Ve), ye = (n, c) => Math.round((c.getTime() - n.getTime()) / Ve), Ye = (n) => new Date(n.getFullYear(), n.getMonth(), 1), ze = (n) => new Date(n.getFullYear(), n.getMonth() + 1, 0), ne = (n) => `${String(n.getDate()).padStart(2, "0")}/${String(n.getMonth() + 1).padStart(2, "0")}/${n.getFullYear()}`, Xe = (n, c = "en") => new Intl.DateTimeFormat(c, { month: "long" }).format(n).toUpperCase();
307
307
  function xt() {
308
308
  const {
309
309
  props: n,
310
310
  t: c,
311
311
  displayRows: p,
312
- leftBodyRef: D,
312
+ leftBodyRef: T,
313
313
  handleLeftScroll: h,
314
314
  toggleProject: x,
315
315
  toggleGroup: w,
316
316
  hoveredTaskId: C,
317
- setHoveredTaskId: M,
317
+ setHoveredTaskId: D,
318
318
  selectedTaskId: u,
319
319
  setSelectedTaskId: $,
320
320
  delayedIds: b,
321
321
  criticalIds: F,
322
322
  relatedIds: S
323
- } = ke(), B = (r) => ({
323
+ } = Ie(), B = (r) => ({
324
324
  id: r.id,
325
325
  name: r.name,
326
326
  start: r.start,
@@ -350,7 +350,7 @@ function xt() {
350
350
  /* @__PURE__ */ t(
351
351
  "div",
352
352
  {
353
- ref: D,
353
+ ref: T,
354
354
  onScroll: h,
355
355
  className: "zg-no-scrollbar",
356
356
  style: { overflowY: "auto", overflowX: "hidden", flex: 1 },
@@ -371,7 +371,7 @@ function xt() {
371
371
  },
372
372
  onClick: () => x(r.projectId),
373
373
  children: /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1, minWidth: 0 }, children: [
374
- r.collapsed ? /* @__PURE__ */ t(je, { size: 15, style: { color: e.group, flexShrink: 0 } }) : /* @__PURE__ */ t(Be, { size: 15, style: { color: e.group, flexShrink: 0 } }),
374
+ r.collapsed ? /* @__PURE__ */ t(Pe, { size: 15, style: { color: e.group, flexShrink: 0 } }) : /* @__PURE__ */ t(Be, { size: 15, style: { color: e.group, flexShrink: 0 } }),
375
375
  /* @__PURE__ */ t("span", { style: {
376
376
  fontSize: 12,
377
377
  fontWeight: 700,
@@ -403,7 +403,7 @@ function xt() {
403
403
  },
404
404
  onClick: () => w(A),
405
405
  children: /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1, minWidth: 0 }, children: [
406
- r.collapsed ? /* @__PURE__ */ t(je, { size: 14, style: { color: e.textSecondary, flexShrink: 0 } }) : /* @__PURE__ */ t(Be, { size: 14, style: { color: e.textSecondary, flexShrink: 0 } }),
406
+ r.collapsed ? /* @__PURE__ */ t(Pe, { size: 14, style: { color: e.textSecondary, flexShrink: 0 } }) : /* @__PURE__ */ t(Be, { size: 14, style: { color: e.textSecondary, flexShrink: 0 } }),
407
407
  /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.05em", color: e.textTitle }, children: c(`gantt.group.${r.groupType}`, r.label) }),
408
408
  /* @__PURE__ */ t("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 6px", borderRadius: 9999, background: "rgba(0,0,0,0.06)", color: e.textSecondary }, children: r.count })
409
409
  ] })
@@ -411,7 +411,7 @@ function xt() {
411
411
  `g-${A}`
412
412
  );
413
413
  }
414
- const i = r.task, T = u === i.id, l = C === i.id, E = i.originalType !== "step", f = b.has(i.id), k = F.has(i.id), s = u !== null && i.id !== u && !S.has(i.id), y = u !== null && S.has(i.id), N = f ? "#FFF5F5" : T ? e.groupLight : y ? `${e.groupLight}99` : l ? e.pageBg : e.surface;
414
+ const i = r.task, I = u === i.id, l = C === i.id, E = i.originalType !== "step", f = b.has(i.id), M = F.has(i.id), s = u !== null && i.id !== u && !S.has(i.id), y = u !== null && S.has(i.id), N = f ? "#FFF5F5" : I ? e.groupLight : y ? `${e.groupLight}99` : l ? e.pageBg : e.surface;
415
415
  return /* @__PURE__ */ o(
416
416
  "div",
417
417
  {
@@ -424,18 +424,18 @@ function xt() {
424
424
  height: _,
425
425
  borderBottom: `1px solid ${e.borderLight}`,
426
426
  background: N,
427
- borderLeft: T ? `3px solid ${e.group}` : y ? `3px solid ${e.group}66` : k ? `3px solid ${e.today}` : void 0,
427
+ borderLeft: I ? `3px solid ${e.group}` : y ? `3px solid ${e.group}66` : M ? `3px solid ${e.today}` : void 0,
428
428
  opacity: s ? 0.3 : 1
429
429
  },
430
430
  onClick: () => $((A) => A === i.id ? null : i.id),
431
431
  onDoubleClick: () => n.onTaskClick?.(B(i)),
432
- onMouseEnter: () => M(i.id),
433
- onMouseLeave: () => M(null),
432
+ onMouseEnter: () => D(i.id),
433
+ onMouseLeave: () => D(null),
434
434
  children: [
435
435
  /* @__PURE__ */ o("div", { style: { flex: 1, display: "flex", alignItems: "center", gap: 8, minWidth: 0, paddingRight: 8 }, children: [
436
436
  i.originalType === "step" && /* @__PURE__ */ t("div", { style: { flexShrink: 0, borderRadius: 4, width: 14, height: 14, background: oe[i.colorIdx ?? 0].bar, border: `1.5px solid ${oe[i.colorIdx ?? 0].barBorder}` } }),
437
- i.originalType === "milestone" && /* @__PURE__ */ t("div", { style: { flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", width: 22, height: 22, background: `${e.milestoneRing}30`, border: `1.5px solid ${e.milestoneRing}` }, children: /* @__PURE__ */ t(we, { size: 11, style: { color: e.milestone } }) }),
438
- i.originalType === "event" && /* @__PURE__ */ t("div", { style: { flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", width: 22, height: 22, background: `${e.event}18`, border: `1.5px solid ${e.event}55` }, children: /* @__PURE__ */ t(Se, { size: 11, style: { color: e.event } }) }),
437
+ i.originalType === "milestone" && /* @__PURE__ */ t("div", { style: { flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", width: 22, height: 22, background: `${e.milestoneRing}30`, border: `1.5px solid ${e.milestoneRing}` }, children: /* @__PURE__ */ t(Se, { size: 11, style: { color: e.milestone } }) }),
438
+ i.originalType === "event" && /* @__PURE__ */ t("div", { style: { flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", width: 22, height: 22, background: `${e.event}18`, border: `1.5px solid ${e.event}55` }, children: /* @__PURE__ */ t(ke, { size: 11, style: { color: e.event } }) }),
439
439
  i.originalType === "note" && /* @__PURE__ */ t("div", { style: { flexShrink: 0, width: 16, height: 20, background: i.noteColor || e.note, borderRadius: 2, boxShadow: "1px 1px 3px rgba(0,0,0,0.14)", position: "relative", overflow: "visible" }, children: /* @__PURE__ */ t("div", { style: { position: "absolute", top: -2, left: "50%", transform: "translateX(-50%)", width: 10, height: 4, background: "rgba(255,255,255,0.55)", borderRadius: 1 } }) }),
440
440
  /* @__PURE__ */ o("div", { style: { flex: 1, display: "flex", flexDirection: "column", minWidth: 0 }, children: [
441
441
  /* @__PURE__ */ t(
@@ -445,7 +445,7 @@ function xt() {
445
445
  fontSize: 13,
446
446
  fontWeight: 500,
447
447
  lineHeight: 1.25,
448
- color: T ? e.group : f ? e.today : e.textPrimary,
448
+ color: I ? e.group : f ? e.today : e.textPrimary,
449
449
  overflow: "hidden",
450
450
  textOverflow: "ellipsis",
451
451
  whiteSpace: "nowrap"
@@ -474,7 +474,7 @@ function xt() {
474
474
  background: e.headerBg,
475
475
  border: `1px solid ${e.borderLight}`
476
476
  }, children: [
477
- /* @__PURE__ */ t(Ee, { size: 9 }),
477
+ /* @__PURE__ */ t(Fe, { size: 9 }),
478
478
  i.filesCount
479
479
  ] }),
480
480
  f && /* @__PURE__ */ t(rt, { size: 12, style: { flexShrink: 0, color: e.today } })
@@ -491,29 +491,29 @@ function xt() {
491
491
  ] });
492
492
  }
493
493
  function bt(n, c, p = "en") {
494
- const D = c === "day" ? ut : ft, h = (r, i) => {
495
- const T = [], l = (/* @__PURE__ */ new Date()).toDateString();
494
+ const T = c === "day" ? ut : ft, h = (r, i) => {
495
+ const I = [], l = (/* @__PURE__ */ new Date()).toDateString();
496
496
  let E = -1;
497
497
  for (let f = 0; f < i; f++) {
498
- const k = Q(r, f), s = k.toDateString() === l;
499
- s && (E = f), T.push({
500
- date: k,
498
+ const M = Q(r, f), s = M.toDateString() === l;
499
+ s && (E = f), I.push({
500
+ date: M,
501
501
  isToday: s,
502
- isWeekend: k.getDay() === 0 || k.getDay() === 6
502
+ isWeekend: M.getDay() === 0 || M.getDay() === 6
503
503
  });
504
504
  }
505
- return { daysArr: T, todayIndex: E };
505
+ return { daysArr: I, todayIndex: E };
506
506
  };
507
507
  if (n.length === 0) {
508
- const r = /* @__PURE__ */ new Date(), i = Ne(r), T = ze(r), l = fe(i, T) + 1, { daysArr: E, todayIndex: f } = h(i, l);
508
+ const r = /* @__PURE__ */ new Date(), i = Ye(r), I = ze(r), l = ye(i, I) + 1, { daysArr: E, todayIndex: f } = h(i, l);
509
509
  return {
510
510
  start: i,
511
- end: T,
511
+ end: I,
512
512
  totalDays: l,
513
- dayWidth: D,
514
- totalWidth: l * D,
515
- months: [{ date: i, label: `${Ye(i, p)} ${i.getFullYear()}`, startDay: 0, days: l, width: l * D }],
516
- years: [{ label: i.getFullYear().toString(), width: l * D }],
513
+ dayWidth: T,
514
+ totalWidth: l * T,
515
+ months: [{ date: i, label: `${Xe(i, p)} ${i.getFullYear()}`, startDay: 0, days: l, width: l * T }],
516
+ years: [{ label: i.getFullYear().toString(), width: l * T }],
517
517
  days: E,
518
518
  todayIndex: f
519
519
  };
@@ -522,42 +522,42 @@ function bt(n, c, p = "en") {
522
522
  n.forEach((r) => {
523
523
  r.start < x && (x = new Date(r.start)), r.end > w && (w = new Date(r.end));
524
524
  });
525
- const C = Ne(Q(x, -14)), M = ze(Q(w, 14)), u = fe(C, M) + 1, $ = [];
525
+ const C = Ye(Q(x, -14)), D = ze(Q(w, 14)), u = ye(C, D) + 1, $ = [];
526
526
  let b = new Date(C);
527
- for (; b <= M; ) {
528
- const r = ze(b), i = r > M ? M : r, T = fe(C, b), l = fe(b, i) + 1;
527
+ for (; b <= D; ) {
528
+ const r = ze(b), i = r > D ? D : r, I = ye(C, b), l = ye(b, i) + 1;
529
529
  $.push({
530
530
  date: new Date(b),
531
- label: `${Ye(b, p)} ${b.getFullYear()}`,
532
- startDay: T,
531
+ label: `${Xe(b, p)} ${b.getFullYear()}`,
532
+ startDay: I,
533
533
  days: l,
534
- width: l * D
534
+ width: l * T
535
535
  }), b = new Date(b.getFullYear(), b.getMonth() + 1, 1);
536
536
  }
537
537
  const { daysArr: F, todayIndex: S } = h(C, u), B = [];
538
538
  if (c === "month") {
539
539
  let r = "", i = 0;
540
- for (const T of $) {
541
- const l = T.date.getFullYear().toString();
542
- l !== r ? (r && B.push({ label: r, width: i * D }), r = l, i = T.days) : i += T.days;
540
+ for (const I of $) {
541
+ const l = I.date.getFullYear().toString();
542
+ l !== r ? (r && B.push({ label: r, width: i * T }), r = l, i = I.days) : i += I.days;
543
543
  }
544
- r && B.push({ label: r, width: i * D });
544
+ r && B.push({ label: r, width: i * T });
545
545
  }
546
- return { start: C, end: M, totalDays: u, dayWidth: D, totalWidth: u * D, months: $, years: B, days: F, todayIndex: S };
546
+ return { start: C, end: D, totalDays: u, dayWidth: T, totalWidth: u * T, months: $, years: B, days: F, todayIndex: S };
547
547
  }
548
548
  function se(n, c) {
549
- return fe(c.start, n) * c.dayWidth;
549
+ return ye(c.start, n) * c.dayWidth;
550
550
  }
551
551
  function mt({
552
552
  task: n,
553
553
  x: c,
554
554
  y: p,
555
- w: D,
555
+ w: T,
556
556
  progW: h,
557
557
  isHov: x,
558
558
  isDrag: w,
559
559
  isResize: C,
560
- isCritical: M,
560
+ isCritical: D,
561
561
  isDelayed: u,
562
562
  isConnectTarget: $,
563
563
  showDots: b,
@@ -567,11 +567,11 @@ function mt({
567
567
  handleResizeMouseDown: r,
568
568
  handleConnectDotMouseDown: i
569
569
  }) {
570
- const { timeline: T, viewMode: l } = ke();
570
+ const { timeline: I, viewMode: l } = Ie();
571
571
  if (n.originalType === "step") {
572
- const E = oe[n.colorIdx ?? 0], f = p + (_ - te) / 2, k = !!(n.previsionStart && n.previsionEnd), s = k ? se(n.previsionStart, T) : 0, y = k ? Math.max(se(n.previsionEnd, T) - s, l === "month" ? T.dayWidth : 6) : 0, N = f + te + 3;
572
+ const E = oe[n.colorIdx ?? 0], f = p + (_ - te) / 2, M = !!(n.previsionStart && n.previsionEnd), s = M ? se(n.previsionStart, I) : 0, y = M ? Math.max(se(n.previsionEnd, I) - s, l === "month" ? I.dayWidth : 6) : 0, N = f + te + 3;
573
573
  return /* @__PURE__ */ o(de, { children: [
574
- k && /* @__PURE__ */ t(
574
+ M && /* @__PURE__ */ t(
575
575
  "div",
576
576
  {
577
577
  title: `Previsto: ${ne(n.previsionStart)} → ${ne(n.previsionEnd)}`,
@@ -599,21 +599,21 @@ function mt({
599
599
  position: "absolute",
600
600
  left: c,
601
601
  top: f,
602
- width: D,
602
+ width: T,
603
603
  height: te,
604
604
  borderRadius: te / 2,
605
605
  background: u ? "linear-gradient(135deg, #fdd, #fee)" : E.bar,
606
- border: M ? `2px solid ${e.today}` : u ? `1.5px solid ${e.today}88` : `1.5px solid ${E.barBorder}`,
606
+ border: D ? `2px solid ${e.today}` : u ? `1.5px solid ${e.today}88` : `1.5px solid ${E.barBorder}`,
607
607
  cursor: w || C ? "grabbing" : "grab",
608
608
  zIndex: x || $ ? 20 : 10,
609
- boxShadow: $ ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : M ? `0 0 0 1px ${e.today}44, 0 3px 12px ${e.today}22` : S && !x ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : x ? `0 3px 12px ${E.progress}22` : "none",
609
+ boxShadow: $ ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : D ? `0 0 0 1px ${e.today}44, 0 3px 12px ${e.today}22` : S && !x ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : x ? `0 3px 12px ${E.progress}22` : "none",
610
610
  transform: x ? "scaleY(1.06)" : "scaleY(1)",
611
611
  opacity: F ? 0.15 : 1,
612
612
  transition: w || C ? "none" : "box-shadow 0.2s, transform 0.15s, opacity 0.18s",
613
613
  overflow: "visible"
614
614
  },
615
615
  children: [
616
- /* @__PURE__ */ o("div", { style: { position: "absolute", left: 0, top: 0, width: D, height: "100%", borderRadius: te / 2, overflow: "hidden", pointerEvents: "none" }, children: [
616
+ /* @__PURE__ */ o("div", { style: { position: "absolute", left: 0, top: 0, width: T, height: "100%", borderRadius: te / 2, overflow: "hidden", pointerEvents: "none" }, children: [
617
617
  /* @__PURE__ */ t("div", { style: {
618
618
  position: "absolute",
619
619
  left: 0,
@@ -624,7 +624,7 @@ function mt({
624
624
  borderRadius: `${te / 2}px 0 0 ${te / 2}px`,
625
625
  transition: w || C ? "none" : "width 0.3s"
626
626
  } }),
627
- D > 50 && /* @__PURE__ */ o("span", { style: {
627
+ T > 50 && /* @__PURE__ */ o("span", { style: {
628
628
  position: "absolute",
629
629
  inset: 0,
630
630
  display: "flex",
@@ -653,7 +653,7 @@ function mt({
653
653
  ] });
654
654
  }
655
655
  if (n.originalType === "milestone") {
656
- const E = p + (_ - Ae) / 2;
656
+ const E = p + (_ - fe) / 2;
657
657
  return /* @__PURE__ */ o(
658
658
  "div",
659
659
  {
@@ -663,11 +663,11 @@ function mt({
663
663
  position: "absolute",
664
664
  left: c - 6,
665
665
  top: E,
666
- height: Ae,
667
- minWidth: Ge,
668
- borderRadius: Ae / 2,
669
- background: M ? "linear-gradient(135deg, #fee, #fff5f5)" : "linear-gradient(135deg, #e8f5ee, #f0f8f4)",
670
- border: $ ? `2px solid ${e.group}` : M ? `2px solid ${e.today}` : `1.5px solid ${e.milestoneRing}`,
666
+ height: fe,
667
+ minWidth: Le,
668
+ borderRadius: fe / 2,
669
+ background: D ? "linear-gradient(135deg, #fee, #fff5f5)" : "linear-gradient(135deg, #e8f5ee, #f0f8f4)",
670
+ border: $ ? `2px solid ${e.group}` : D ? `2px solid ${e.today}` : `1.5px solid ${e.milestoneRing}`,
671
671
  display: "flex",
672
672
  alignItems: "center",
673
673
  gap: 6,
@@ -675,7 +675,7 @@ function mt({
675
675
  paddingRight: 12,
676
676
  cursor: w ? "grabbing" : "grab",
677
677
  zIndex: x || $ ? 20 : 10,
678
- boxShadow: $ ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : M ? `0 0 0 1px ${e.today}44, 0 3px 12px ${e.today}22` : S && !x ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : x ? `0 3px 12px ${e.milestone}22` : "0 1px 3px rgba(0,0,0,0.06)",
678
+ boxShadow: $ ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : D ? `0 0 0 1px ${e.today}44, 0 3px 12px ${e.today}22` : S && !x ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : x ? `0 3px 12px ${e.milestone}22` : "0 1px 3px rgba(0,0,0,0.06)",
679
679
  opacity: F ? 0.15 : 1,
680
680
  transition: "box-shadow 0.2s, transform 0.15s, opacity 0.18s",
681
681
  transform: x ? "translateY(-1px)" : "none",
@@ -683,8 +683,8 @@ function mt({
683
683
  overflow: "visible"
684
684
  },
685
685
  children: [
686
- /* @__PURE__ */ t("div", { style: { width: 20, height: 20, borderRadius: "50%", background: M ? e.today : e.milestone, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(we, { size: 11, color: "#fff", strokeWidth: 2.5 }) }),
687
- /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: M ? e.today : e.milestone, overflow: "hidden", textOverflow: "ellipsis", maxWidth: 130 }, children: n.name }),
686
+ /* @__PURE__ */ t("div", { style: { width: 20, height: 20, borderRadius: "50%", background: D ? e.today : e.milestone, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(Se, { size: 11, color: "#fff", strokeWidth: 2.5 }) }),
687
+ /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: D ? e.today : e.milestone, overflow: "hidden", textOverflow: "ellipsis", maxWidth: 130 }, children: n.name }),
688
688
  n.progress >= 100 && /* @__PURE__ */ t("span", { style: { fontSize: 9, fontWeight: 700, color: "#fff", background: e.milestoneRing, borderRadius: 6, padding: "1px 5px" }, children: "✓" }),
689
689
  b && /* @__PURE__ */ o(de, { children: [
690
690
  /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (f) => i(f, n, "left"), style: { position: "absolute", left: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } }),
@@ -695,7 +695,7 @@ function mt({
695
695
  );
696
696
  }
697
697
  if (n.originalType === "event") {
698
- const f = p + (_ - 22) / 2;
698
+ const E = p + (_ - fe) / 2;
699
699
  return /* @__PURE__ */ o(
700
700
  "div",
701
701
  {
@@ -703,55 +703,41 @@ function mt({
703
703
  ...B,
704
704
  style: {
705
705
  position: "absolute",
706
- left: c - 22 / 2,
707
- top: f,
708
- width: 22,
709
- height: 22,
710
- borderRadius: "50%",
711
- background: M ? "linear-gradient(135deg, #fee, #fff5f5)" : "linear-gradient(135deg, #fff7ed, #ffedd5)",
712
- border: $ ? `2px solid ${e.group}` : M ? `2px solid ${e.today}` : `1.5px solid ${e.event}`,
706
+ left: c - 6,
707
+ top: E,
708
+ height: fe,
709
+ minWidth: Le,
710
+ borderRadius: fe / 2,
711
+ background: D ? "linear-gradient(135deg, #fee, #fff5f5)" : "linear-gradient(135deg, #fff7ed, #ffedd5)",
712
+ border: $ ? `2px solid ${e.group}` : D ? `2px solid ${e.today}` : `1.5px solid ${e.event}`,
713
713
  display: "flex",
714
714
  alignItems: "center",
715
- justifyContent: "center",
715
+ gap: 6,
716
+ paddingLeft: 4,
717
+ paddingRight: 12,
716
718
  cursor: w ? "grabbing" : "grab",
717
719
  zIndex: x || $ ? 20 : 10,
718
- boxShadow: $ ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : M ? `0 0 0 1px ${e.today}44, 0 3px 12px ${e.today}22` : S && !x ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : x ? `0 3px 12px ${e.event}33` : "0 1px 3px rgba(0,0,0,0.06)",
720
+ boxShadow: $ ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : D ? `0 0 0 1px ${e.today}44, 0 3px 12px ${e.today}22` : S && !x ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : x ? `0 3px 12px ${e.event}33` : "0 1px 3px rgba(0,0,0,0.06)",
719
721
  opacity: F ? 0.15 : 1,
720
722
  transition: "box-shadow 0.2s, transform 0.15s, opacity 0.18s",
721
- transform: x ? "scale(1.15)" : "none",
723
+ transform: x ? "translateY(-1px)" : "none",
724
+ whiteSpace: "nowrap",
722
725
  overflow: "visible"
723
726
  },
724
727
  children: [
725
- /* @__PURE__ */ t("div", { style: { width: 14, height: 14, borderRadius: "50%", background: M ? e.today : e.event, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ t(Se, { size: 8, color: "#fff", strokeWidth: 3 }) }),
726
- n.progress >= 100 && /* @__PURE__ */ t("div", { style: { position: "absolute", top: -5, right: -12, background: e.event, color: "#fff", fontSize: 8, fontWeight: 700, padding: "1px 4px", borderRadius: 4 }, children: "✓" }),
727
- /* @__PURE__ */ t("div", { style: {
728
- position: "absolute",
729
- top: "100%",
730
- left: "50%",
731
- transform: "translateX(-50%)",
732
- marginTop: 4,
733
- background: "rgba(255,255,255,0.9)",
734
- padding: "2px 6px",
735
- borderRadius: 4,
736
- border: `1px solid ${e.borderLight}`,
737
- fontSize: 9,
738
- fontWeight: 600,
739
- color: M ? e.today : e.event,
740
- whiteSpace: "nowrap",
741
- pointerEvents: "none",
742
- opacity: x ? 1 : 0,
743
- transition: "opacity 0.15s"
744
- }, children: n.name }),
728
+ /* @__PURE__ */ t("div", { style: { width: 20, height: 20, borderRadius: "50%", background: D ? e.today : e.event, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(ke, { size: 11, color: "#fff", strokeWidth: 2.5 }) }),
729
+ /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: D ? e.today : e.event, overflow: "hidden", textOverflow: "ellipsis", maxWidth: 130 }, children: n.name }),
730
+ n.progress >= 100 && /* @__PURE__ */ t("span", { style: { fontSize: 9, fontWeight: 700, color: "#fff", background: e.event, borderRadius: 6, padding: "1px 5px" }, children: "✓" }),
745
731
  b && /* @__PURE__ */ o(de, { children: [
746
- /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (k) => i(k, n, "left"), style: { position: "absolute", left: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } }),
747
- /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (k) => i(k, n, "right"), style: { position: "absolute", right: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } })
732
+ /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (f) => i(f, n, "left"), style: { position: "absolute", left: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } }),
733
+ /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (f) => i(f, n, "right"), style: { position: "absolute", right: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } })
748
734
  ] })
749
735
  ]
750
736
  }
751
737
  );
752
738
  }
753
739
  if (n.originalType === "note") {
754
- const k = p + (_ - 44) / 2, s = n.noteColor || e.note;
740
+ const M = p + (_ - 44) / 2, s = n.noteColor || e.note;
755
741
  return /* @__PURE__ */ o(
756
742
  "div",
757
743
  {
@@ -760,7 +746,7 @@ function mt({
760
746
  style: {
761
747
  position: "absolute",
762
748
  left: c - 36 / 2,
763
- top: k,
749
+ top: M,
764
750
  width: 36,
765
751
  height: 44,
766
752
  background: s,
@@ -783,7 +769,7 @@ function mt({
783
769
  /* @__PURE__ */ t("div", { style: { width: "60%", height: 2, background: "rgba(0,0,0,0.1)", borderRadius: 1, marginBottom: 3 } }),
784
770
  /* @__PURE__ */ t("div", { style: { width: "90%", height: 2, background: "rgba(0,0,0,0.1)", borderRadius: 1 } })
785
771
  ] }),
786
- (n.filesCount || 0) > 0 && /* @__PURE__ */ t("div", { style: { position: "absolute", bottom: -5, right: -5, background: e.headerBg, color: e.textSecondary, borderRadius: "50%", border: `1px solid ${e.borderLight}`, width: 16, height: 16, display: "flex", alignItems: "center", justifyContent: "center", boxShadow: "0 1px 3px rgba(0,0,0,0.1)", zIndex: 2 }, children: /* @__PURE__ */ t(Ee, { size: 8 }) }),
772
+ (n.filesCount || 0) > 0 && /* @__PURE__ */ t("div", { style: { position: "absolute", bottom: -5, right: -5, background: e.headerBg, color: e.textSecondary, borderRadius: "50%", border: `1px solid ${e.borderLight}`, width: 16, height: 16, display: "flex", alignItems: "center", justifyContent: "center", boxShadow: "0 1px 3px rgba(0,0,0,0.1)", zIndex: 2 }, children: /* @__PURE__ */ t(Fe, { size: 8 }) }),
787
773
  /* @__PURE__ */ t("div", { style: {
788
774
  position: "absolute",
789
775
  top: "100%",
@@ -818,18 +804,18 @@ function vt() {
818
804
  arrows: n,
819
805
  hoveredTaskId: c,
820
806
  selectedTaskId: p,
821
- relatedIds: D
822
- } = ke();
807
+ relatedIds: T
808
+ } = Ie();
823
809
  return /* @__PURE__ */ t(de, { children: n.map((h, x) => {
824
- const w = c === h.predId || c === h.succId, C = !p || h.predId === p || h.succId === p || D.has(h.predId) || D.has(h.succId), M = p !== null && C, u = w ? e.arrowHover : M ? e.group : e.arrow;
825
- return /* @__PURE__ */ o("g", { style: { opacity: C ? M ? 1 : void 0 : 0.08, transition: "opacity 0.18s" }, children: [
810
+ const w = c === h.predId || c === h.succId, C = !p || h.predId === p || h.succId === p || T.has(h.predId) || T.has(h.succId), D = p !== null && C, u = w ? e.arrowHover : D ? e.group : e.arrow;
811
+ return /* @__PURE__ */ o("g", { style: { opacity: C ? D ? 1 : void 0 : 0.08, transition: "opacity 0.18s" }, children: [
826
812
  /* @__PURE__ */ t(
827
813
  "path",
828
814
  {
829
815
  d: h.path,
830
816
  fill: "none",
831
817
  stroke: u,
832
- strokeWidth: M ? 2.5 : w ? 2 : 1.5,
818
+ strokeWidth: D ? 2.5 : w ? 2 : 1.5,
833
819
  style: { transition: "stroke 0.2s, stroke-width 0.2s" }
834
820
  }
835
821
  ),
@@ -851,14 +837,14 @@ const We = (n) => ({
851
837
  end: n.end,
852
838
  type: n.originalType === "step" ? "task" : n.originalType,
853
839
  progress: n.progress
854
- }), me = (n, c) => {
840
+ }), ve = (n, c) => {
855
841
  switch (n) {
856
842
  case "step":
857
843
  return /* @__PURE__ */ t("div", { style: { width: 12, height: 12, borderRadius: 2, background: oe[c ?? 0].bar, border: `1.5px solid ${oe[c ?? 0].barBorder}`, flexShrink: 0 } });
858
844
  case "milestone":
859
- return /* @__PURE__ */ t("div", { style: { width: 16, height: 16, borderRadius: "50%", background: e.milestone, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(we, { size: 8, color: "#fff" }) });
845
+ return /* @__PURE__ */ t("div", { style: { width: 16, height: 16, borderRadius: "50%", background: e.milestone, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(Se, { size: 8, color: "#fff" }) });
860
846
  case "event":
861
- return /* @__PURE__ */ t("div", { style: { width: 16, height: 16, borderRadius: "50%", background: e.event, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(Se, { size: 8, color: "#fff" }) });
847
+ return /* @__PURE__ */ t("div", { style: { width: 16, height: 16, borderRadius: "50%", background: e.event, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(ke, { size: 8, color: "#fff" }) });
862
848
  case "note":
863
849
  return /* @__PURE__ */ t("div", { style: { width: 12, height: 14, background: e.note, borderRadius: 2, boxShadow: "1px 1px 2px rgba(0,0,0,0.1)", flexShrink: 0 } });
864
850
  default:
@@ -870,12 +856,12 @@ function wt() {
870
856
  props: n,
871
857
  viewMode: c,
872
858
  timeline: p,
873
- displayRows: D,
859
+ displayRows: T,
874
860
  dragState: h,
875
861
  resizeState: x,
876
862
  connectState: w,
877
863
  pendingConnection: C,
878
- setPendingConnection: M,
864
+ setPendingConnection: D,
879
865
  depModalType: u,
880
866
  setDepModalType: $,
881
867
  depModalLag: b,
@@ -884,45 +870,45 @@ function wt() {
884
870
  deletingDepId: B,
885
871
  setDeletingDepId: r,
886
872
  chartMenu: i,
887
- setChartMenu: T,
873
+ setChartMenu: I,
888
874
  rightBodyRef: l,
889
875
  timeHeaderRef: E,
890
876
  handleChartMouseDown: f,
891
- handleChartWheel: k,
877
+ handleChartWheel: M,
892
878
  openChartMenu: s,
893
879
  hoveredTaskId: y,
894
880
  setHoveredTaskId: N,
895
881
  selectedTaskId: A,
896
882
  setSelectedTaskId: Z,
897
- tooltip: I,
883
+ tooltip: k,
898
884
  setTooltip: g,
899
885
  popupState: Y,
900
886
  setPopupState: H,
901
887
  criticalIds: q,
902
888
  delayedIds: G,
903
889
  relatedIds: ie,
904
- handleBarMouseDown: ye,
905
- handleResizeMouseDown: Ie,
906
- handleConnectDotMouseDown: xe,
907
- handleCreateDependency: Te
908
- } = ke(), {
890
+ handleBarMouseDown: xe,
891
+ handleResizeMouseDown: Te,
892
+ handleConnectDotMouseDown: be,
893
+ handleCreateDependency: De
894
+ } = Ie(), {
909
895
  translations: le,
910
- onViewStage: be,
911
- onEditStage: De,
896
+ onViewStage: me,
897
+ onEditStage: Me,
912
898
  onDeleteStage: j,
913
899
  onDeleteDependency: O,
914
- onAddNewStage: Me,
915
- onAddMilestone: Re,
916
- onAddEvent: Ce,
917
- onAddNote: $e
918
- } = n, R = (m, a) => le ? typeof le == "function" ? le(m, a) : le[m] || a : a, he = (m, a) => Math.round((a.getTime() - m.getTime()) / 864e5) + 1, re = Math.max(D.length * _, 400), ue = () => H({ isOpen: !1, position: { x: 0, y: 0 }, task: null });
900
+ onAddNewStage: Re,
901
+ onAddMilestone: Ce,
902
+ onAddEvent: $e,
903
+ onAddNote: Ee
904
+ } = n, R = (m, a) => le ? typeof le == "function" ? le(m, a) : le[m] || a : a, he = (m, a) => Math.round((a.getTime() - m.getTime()) / 864e5) + 1, re = Math.max(T.length * _, 400), ue = () => H({ isOpen: !1, position: { x: 0, y: 0 }, task: null });
919
905
  return /* @__PURE__ */ o("div", { style: { flex: 1, width: "100%", background: "#FAFAFA", display: "flex", flexDirection: "column", position: "relative", overflow: "hidden", borderLeft: `1px solid ${e.borderLight}` }, children: [
920
906
  /* @__PURE__ */ t(
921
907
  "div",
922
908
  {
923
909
  ref: E,
924
910
  style: {
925
- height: ve * 2,
911
+ height: we * 2,
926
912
  background: e.headerBg,
927
913
  borderBottom: `1px solid ${e.borderLight}`,
928
914
  overflow: "hidden",
@@ -930,13 +916,13 @@ function wt() {
930
916
  flexShrink: 0,
931
917
  boxShadow: "0 1px 3px rgba(0,0,0,0.02)"
932
918
  },
933
- onWheel: k,
919
+ onWheel: M,
934
920
  children: /* @__PURE__ */ o("div", { style: { width: p.totalWidth, height: "100%", position: "relative" }, children: [
935
- /* @__PURE__ */ o("div", { style: { position: "absolute", top: 0, left: 0, right: 0, height: ve, display: "flex" }, children: [
921
+ /* @__PURE__ */ o("div", { style: { position: "absolute", top: 0, left: 0, right: 0, height: we, display: "flex" }, children: [
936
922
  c === "day" && p.months.map((m, a) => /* @__PURE__ */ t("div", { style: { width: m.width, position: "relative", height: "100%", borderRight: `1px solid ${e.borderLight}`, paddingLeft: 12, display: "flex", alignItems: "flex-end", paddingBottom: 6 }, children: /* @__PURE__ */ t("span", { style: { fontSize: 13, fontWeight: 700, color: e.textTitle, letterSpacing: "0.02em" }, children: m.label }) }, a)),
937
923
  c === "month" && p.years?.map((m, a) => /* @__PURE__ */ t("div", { style: { width: m.width, position: "relative", height: "100%", borderRight: `1px solid ${e.borderLight}`, paddingLeft: 12, display: "flex", alignItems: "flex-end", paddingBottom: 6 }, children: /* @__PURE__ */ t("span", { style: { fontSize: 13, fontWeight: 700, color: e.textTitle, letterSpacing: "0.02em" }, children: m.label }) }, a))
938
924
  ] }),
939
- /* @__PURE__ */ o("div", { style: { position: "absolute", top: ve, left: 0, right: 0, height: ve, display: "flex" }, children: [
925
+ /* @__PURE__ */ o("div", { style: { position: "absolute", top: we, left: 0, right: 0, height: we, display: "flex" }, children: [
940
926
  c === "day" && p.days.map((m, a) => {
941
927
  const d = m.isToday;
942
928
  return /* @__PURE__ */ t("div", { style: { width: p.dayWidth, position: "relative", height: "100%", borderRight: `1px solid ${e.borderLight}`, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: d ? 800 : 500, color: d ? e.today : e.textSecondary, letterSpacing: "-0.03em" }, children: m.date.getDate().toString().padStart(2, "0") }) }, a);
@@ -953,7 +939,7 @@ function wt() {
953
939
  className: "zg-no-scrollbar",
954
940
  style: { flex: 1, overflow: "auto", background: "#fff", position: "relative" },
955
941
  onMouseDown: f,
956
- onWheel: k,
942
+ onWheel: M,
957
943
  onContextMenu: s,
958
944
  children: /* @__PURE__ */ o("div", { style: { width: p.totalWidth, height: re, position: "relative" }, children: [
959
945
  /* @__PURE__ */ o("svg", { width: p.totalWidth, height: re, style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" }, children: [
@@ -970,7 +956,7 @@ function wt() {
970
956
  /* @__PURE__ */ t("line", { x1: (p.todayIndex + 0.5) * p.dayWidth, y1: 0, x2: (p.todayIndex + 0.5) * p.dayWidth, y2: re, stroke: e.today, strokeWidth: 2, strokeDasharray: "4 4", opacity: 0.3 })
971
957
  ] })
972
958
  ] }),
973
- D.map((m, a) => m.kind === "group" || m.kind === "projectHeader" ? /* @__PURE__ */ t("div", { style: {
959
+ T.map((m, a) => m.kind === "group" || m.kind === "projectHeader" ? /* @__PURE__ */ t("div", { style: {
974
960
  position: "absolute",
975
961
  left: 0,
976
962
  top: a * _,
@@ -981,12 +967,12 @@ function wt() {
981
967
  pointerEvents: "none"
982
968
  } }, `bg-${a}`) : null),
983
969
  /* @__PURE__ */ o("div", { style: { position: "absolute", inset: 0 }, children: [
984
- D.map((m, a) => {
970
+ T.map((m, a) => {
985
971
  if (m.kind !== "task") return null;
986
972
  const d = m.task, v = h?.task.id === d.id, W = x?.task.id === d.id, L = v || W && x.edge === "left" ? Q(d.start, v ? h.offsetDays : x.offsetDays) : d.start, z = v || W && x.edge === "right" ? Q(d.end, v ? h.offsetDays : x.offsetDays) : d.end, X = d.originalType !== "step";
987
973
  let ce = se(L, p), U = 0, ee = 0;
988
974
  X || (U = Math.max(se(z, p) - ce, p.dayWidth), ee = U * (d.progress / 100));
989
- const Le = y === d.id, Fe = A === d.id, He = G.has(d.id), Ue = q.has(d.id), qe = !!A && !Fe && !ie.has(d.id), Ke = Fe || !!A && ie.has(d.id), Je = w?.hoverTargetId === d.id, Qe = Le || Fe, Ze = a * _;
975
+ const je = y === d.id, Ae = A === d.id, He = G.has(d.id), Ue = q.has(d.id), qe = !!A && !Ae && !ie.has(d.id), Ke = Ae || !!A && ie.has(d.id), Je = w?.hoverTargetId === d.id, Qe = je || Ae, Ze = a * _;
990
976
  return /* @__PURE__ */ t(
991
977
  mt,
992
978
  {
@@ -995,7 +981,7 @@ function wt() {
995
981
  y: Ze,
996
982
  w: U,
997
983
  progW: ee,
998
- isHov: Le,
984
+ isHov: je,
999
985
  isDrag: v,
1000
986
  isResize: W,
1001
987
  isCritical: Ue,
@@ -1015,22 +1001,22 @@ function wt() {
1015
1001
  N(null), g(null);
1016
1002
  },
1017
1003
  onClick: (K) => {
1018
- K.stopPropagation(), Z(d.id), K.detail === 2 && be?.(We(d)), H(!Y.isOpen || Y.task?.id !== d.id ? {
1004
+ K.stopPropagation(), Z(d.id), K.detail === 2 && me?.(We(d)), H(!Y.isOpen || Y.task?.id !== d.id ? {
1019
1005
  isOpen: !0,
1020
1006
  position: { x: K.clientX, y: K.clientY },
1021
1007
  task: d
1022
1008
  } : { isOpen: !1, position: { x: 0, y: 0 }, task: null });
1023
1009
  },
1024
- onMouseDown: (K) => ye(K, d)
1010
+ onMouseDown: (K) => xe(K, d)
1025
1011
  },
1026
- handleResizeMouseDown: Ie,
1027
- handleConnectDotMouseDown: xe
1012
+ handleResizeMouseDown: Te,
1013
+ handleConnectDotMouseDown: be
1028
1014
  },
1029
1015
  d.id
1030
1016
  );
1031
1017
  }),
1032
1018
  /* @__PURE__ */ t("svg", { width: p.totalWidth, height: re, style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: /* @__PURE__ */ t(vt, {}) }),
1033
- I && !h && /* @__PURE__ */ t("div", { style: { position: "fixed", left: I.x + 16, top: I.y - 10, zIndex: 9999, pointerEvents: "none" }, children: /* @__PURE__ */ o(
1019
+ k && !h && /* @__PURE__ */ t("div", { style: { position: "fixed", left: k.x + 16, top: k.y - 10, zIndex: 9999, pointerEvents: "none" }, children: /* @__PURE__ */ o(
1034
1020
  "div",
1035
1021
  {
1036
1022
  style: {
@@ -1044,11 +1030,11 @@ function wt() {
1044
1030
  },
1045
1031
  children: [
1046
1032
  /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 6 }, children: [
1047
- me(I.task.originalType, I.task.colorIdx),
1048
- /* @__PURE__ */ t("span", { style: { fontSize: 12, fontWeight: 700, color: e.textTitle, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: I.task.name })
1033
+ ve(k.task.originalType, k.task.colorIdx),
1034
+ /* @__PURE__ */ t("span", { style: { fontSize: 12, fontWeight: 700, color: e.textTitle, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: k.task.name })
1049
1035
  ] }),
1050
- /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 4, fontSize: 11, color: e.textSecondary }, children: I.task.originalType === "step" ? /* @__PURE__ */ o(de, { children: [
1051
- I.task.previsionStart && I.task.previsionEnd && /* @__PURE__ */ o("div", { style: { background: `${e.headerBg}`, borderRadius: 6, padding: "4px 6px", marginBottom: 2 }, children: [
1036
+ /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 4, fontSize: 11, color: e.textSecondary }, children: k.task.originalType === "step" ? /* @__PURE__ */ o(de, { children: [
1037
+ k.task.previsionStart && k.task.previsionEnd && /* @__PURE__ */ o("div", { style: { background: `${e.headerBg}`, borderRadius: 6, padding: "4px 6px", marginBottom: 2 }, children: [
1052
1038
  /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 4, marginBottom: 4 }, children: [
1053
1039
  /* @__PURE__ */ t("div", { style: { width: 20, height: 4, borderRadius: 2, background: `${e.textSecondary}44`, border: `1.5px solid ${e.textSecondary}66` } }),
1054
1040
  /* @__PURE__ */ t("span", { style: { fontSize: 9, fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.06em", color: e.textSecondary }, children: R("gantt.tooltip.planned", "Planned") })
@@ -1058,14 +1044,14 @@ function wt() {
1058
1044
  R("gantt.tooltip.start", "Start"),
1059
1045
  ":"
1060
1046
  ] }),
1061
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(I.task.previsionStart) })
1047
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(k.task.previsionStart) })
1062
1048
  ] }),
1063
1049
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1064
1050
  /* @__PURE__ */ o("span", { children: [
1065
1051
  R("gantt.tooltip.end", "End"),
1066
1052
  ":"
1067
1053
  ] }),
1068
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(I.task.previsionEnd) })
1054
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(k.task.previsionEnd) })
1069
1055
  ] }),
1070
1056
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1071
1057
  /* @__PURE__ */ o("span", { children: [
@@ -1073,29 +1059,29 @@ function wt() {
1073
1059
  ":"
1074
1060
  ] }),
1075
1061
  /* @__PURE__ */ o("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: [
1076
- he(I.task.previsionStart, I.task.previsionEnd),
1062
+ he(k.task.previsionStart, k.task.previsionEnd),
1077
1063
  "d"
1078
1064
  ] })
1079
1065
  ] })
1080
1066
  ] }),
1081
- /* @__PURE__ */ o("div", { style: { background: I.task.hasActualDates ? `${e.groupLight}22` : "transparent", borderRadius: 6, padding: "4px 6px" }, children: [
1067
+ /* @__PURE__ */ o("div", { style: { background: k.task.hasActualDates ? `${e.groupLight}22` : "transparent", borderRadius: 6, padding: "4px 6px" }, children: [
1082
1068
  /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 4, marginBottom: 4 }, children: [
1083
- /* @__PURE__ */ t("div", { style: { width: 20, height: 4, borderRadius: 2, background: oe[I.task.colorIdx ?? 0].progress } }),
1084
- /* @__PURE__ */ t("span", { style: { fontSize: 9, fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.06em", color: I.task.hasActualDates ? e.group : e.textSecondary }, children: I.task.hasActualDates ? R("gantt.tooltip.actual", "Actual") : R("gantt.tooltip.plannedInUse", "Planned (in use)") })
1069
+ /* @__PURE__ */ t("div", { style: { width: 20, height: 4, borderRadius: 2, background: oe[k.task.colorIdx ?? 0].progress } }),
1070
+ /* @__PURE__ */ t("span", { style: { fontSize: 9, fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.06em", color: k.task.hasActualDates ? e.group : e.textSecondary }, children: k.task.hasActualDates ? R("gantt.tooltip.actual", "Actual") : R("gantt.tooltip.plannedInUse", "Planned (in use)") })
1085
1071
  ] }),
1086
1072
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1087
1073
  /* @__PURE__ */ o("span", { children: [
1088
1074
  R("gantt.tooltip.start", "Start"),
1089
1075
  ":"
1090
1076
  ] }),
1091
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(I.task.start) })
1077
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(k.task.start) })
1092
1078
  ] }),
1093
1079
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1094
1080
  /* @__PURE__ */ o("span", { children: [
1095
1081
  R("gantt.tooltip.end", "End"),
1096
1082
  ":"
1097
1083
  ] }),
1098
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(I.task.end) })
1084
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(k.task.end) })
1099
1085
  ] }),
1100
1086
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1101
1087
  /* @__PURE__ */ o("span", { children: [
@@ -1103,7 +1089,7 @@ function wt() {
1103
1089
  ":"
1104
1090
  ] }),
1105
1091
  /* @__PURE__ */ o("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: [
1106
- he(I.task.start, I.task.end),
1092
+ he(k.task.start, k.task.end),
1107
1093
  "d"
1108
1094
  ] })
1109
1095
  ] })
@@ -1114,30 +1100,30 @@ function wt() {
1114
1100
  ":"
1115
1101
  ] }),
1116
1102
  /* @__PURE__ */ o("span", { style: { fontWeight: 700, color: e.group }, children: [
1117
- Math.round(I.task.progress),
1103
+ Math.round(k.task.progress),
1118
1104
  "%"
1119
1105
  ] })
1120
1106
  ] })
1121
- ] }) : I.task.originalType === "note" ? /* @__PURE__ */ o(de, { children: [
1122
- I.task.noteProjectTitle && /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 6, marginBottom: 4 }, children: [
1123
- /* @__PURE__ */ t("div", { style: { width: 8, height: 8, borderRadius: 2, background: I.task.noteColor || e.note, flexShrink: 0 } }),
1124
- /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: e.textPrimary, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: I.task.noteProjectTitle })
1107
+ ] }) : k.task.originalType === "note" ? /* @__PURE__ */ o(de, { children: [
1108
+ k.task.noteProjectTitle && /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 6, marginBottom: 4 }, children: [
1109
+ /* @__PURE__ */ t("div", { style: { width: 8, height: 8, borderRadius: 2, background: k.task.noteColor || e.note, flexShrink: 0 } }),
1110
+ /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: e.textPrimary, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: k.task.noteProjectTitle })
1125
1111
  ] }),
1126
1112
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1127
1113
  /* @__PURE__ */ o("span", { children: [
1128
1114
  R("gantt.tooltip.date", "Date"),
1129
1115
  ":"
1130
1116
  ] }),
1131
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(I.task.start) })
1117
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(k.task.start) })
1132
1118
  ] }),
1133
- (I.task.filesCount || 0) > 0 && /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1119
+ (k.task.filesCount || 0) > 0 && /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1134
1120
  /* @__PURE__ */ o("span", { children: [
1135
1121
  R("gantt.tooltip.attachments", "Attachments"),
1136
1122
  ":"
1137
1123
  ] }),
1138
1124
  /* @__PURE__ */ o("span", { style: { fontWeight: 600, display: "flex", alignItems: "center", gap: 4, color: e.textPrimary }, children: [
1139
- /* @__PURE__ */ t(Ee, { size: 10 }),
1140
- I.task.filesCount
1125
+ /* @__PURE__ */ t(Fe, { size: 10 }),
1126
+ k.task.filesCount
1141
1127
  ] })
1142
1128
  ] })
1143
1129
  ] }) : /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
@@ -1145,7 +1131,7 @@ function wt() {
1145
1131
  R("charts.gantt.start", "Start"),
1146
1132
  ":"
1147
1133
  ] }),
1148
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(I.task.start) })
1134
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(k.task.start) })
1149
1135
  ] }) })
1150
1136
  ]
1151
1137
  }
@@ -1166,14 +1152,14 @@ function wt() {
1166
1152
  /* @__PURE__ */ t("div", { style: { padding: "12px 14px 10px", borderBottom: `1px solid ${e.borderLight}` }, children: /* @__PURE__ */ t("p", { style: { fontSize: 13, fontWeight: 700, color: e.group, margin: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, title: m.name, children: m.name }) }),
1167
1153
  /* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: 2, padding: "8px 6px" }, children: [
1168
1154
  /* @__PURE__ */ o("button", { onClick: () => {
1169
- be?.(We(m)), ue();
1155
+ me?.(We(m)), ue();
1170
1156
  }, className: "zg-popup-btn", children: [
1171
1157
  /* @__PURE__ */ t(it, { size: 15 }),
1172
1158
  " ",
1173
1159
  /* @__PURE__ */ t("span", { children: R("gantt.popup.viewDetails", "View details") })
1174
1160
  ] }),
1175
1161
  /* @__PURE__ */ o("button", { onClick: () => {
1176
- De?.(We(m)), ue();
1162
+ Me?.(We(m)), ue();
1177
1163
  }, className: "zg-popup-btn", children: [
1178
1164
  /* @__PURE__ */ t(at, { size: 15 }),
1179
1165
  " ",
@@ -1253,17 +1239,17 @@ function wt() {
1253
1239
  ne(i.date)
1254
1240
  ] }) }),
1255
1241
  /* @__PURE__ */ t("div", { style: { padding: "5px 5px" }, children: [
1256
- { label: R("gantt.newAction.step", "Step"), icon: me("step", 0), action: () => {
1257
- Me?.(i.date, i.projectId), T(null);
1242
+ { label: R("gantt.newAction.step", "Step"), icon: ve("step", 0), action: () => {
1243
+ Re?.(i.date, i.projectId), I(null);
1258
1244
  } },
1259
- { label: R("gantt.newAction.milestone", "Milestone"), icon: me("milestone"), action: () => {
1260
- Re?.(i.date, i.projectId), T(null);
1245
+ { label: R("gantt.newAction.milestone", "Milestone"), icon: ve("milestone"), action: () => {
1246
+ Ce?.(i.date, i.projectId), I(null);
1261
1247
  } },
1262
- { label: R("gantt.newAction.event", "Event"), icon: me("event"), action: () => {
1263
- Ce?.(i.date, i.projectId), T(null);
1248
+ { label: R("gantt.newAction.event", "Event"), icon: ve("event"), action: () => {
1249
+ $e?.(i.date, i.projectId), I(null);
1264
1250
  } },
1265
- { label: R("gantt.newAction.note", "Note"), icon: me("note"), action: () => {
1266
- $e?.(i.date, i.projectId), T(null);
1251
+ { label: R("gantt.newAction.note", "Note"), icon: ve("note"), action: () => {
1252
+ Ee?.(i.date, i.projectId), I(null);
1267
1253
  } }
1268
1254
  ].map((m) => /* @__PURE__ */ o(
1269
1255
  "button",
@@ -1286,7 +1272,7 @@ function wt() {
1286
1272
  /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t("marker", { id: "connect-arrow", markerWidth: "8", markerHeight: "8", refX: "6", refY: "3", orient: "auto", children: /* @__PURE__ */ t("path", { d: "M0,0 L0,6 L6,3 z", fill: e.group }) }) }),
1287
1273
  /* @__PURE__ */ t("line", { x1: w.fromScreenX, y1: w.fromScreenY, x2: w.currentScreenX, y2: w.currentScreenY, stroke: e.group, strokeWidth: 2.5, strokeDasharray: "8 5", markerEnd: "url(#connect-arrow)", opacity: 0.85, style: { animation: "zg-dash 0.5s linear infinite" } })
1288
1274
  ] }),
1289
- C && /* @__PURE__ */ t("div", { style: { position: "fixed", inset: 0, background: "rgba(0,0,0,0.35)", backdropFilter: "blur(4px)", display: "flex", alignItems: "center", justifyContent: "center", zIndex: 99998 }, onClick: () => M(null), children: /* @__PURE__ */ o("div", { style: { background: "#fff", borderRadius: 20, padding: "32px 36px", width: 420, boxShadow: "0 24px 80px rgba(0,0,0,0.18), 0 6px 24px rgba(0,0,0,0.08)" }, onClick: (m) => m.stopPropagation(), children: [
1275
+ C && /* @__PURE__ */ t("div", { style: { position: "fixed", inset: 0, background: "rgba(0,0,0,0.35)", backdropFilter: "blur(4px)", display: "flex", alignItems: "center", justifyContent: "center", zIndex: 99998 }, onClick: () => D(null), children: /* @__PURE__ */ o("div", { style: { background: "#fff", borderRadius: 20, padding: "32px 36px", width: 420, boxShadow: "0 24px 80px rgba(0,0,0,0.18), 0 6px 24px rgba(0,0,0,0.08)" }, onClick: (m) => m.stopPropagation(), children: [
1290
1276
  /* @__PURE__ */ o("div", { style: { marginBottom: 20 }, children: [
1291
1277
  /* @__PURE__ */ t("h3", { style: { fontSize: 18, fontWeight: 700, color: e.textTitle, marginBottom: 4 }, children: R("gantt.depModal.title", "Relation Type") }),
1292
1278
  /* @__PURE__ */ t("p", { style: { fontSize: 13, color: e.textSecondary }, children: R("gantt.depModal.subtitle", "Choose how the two tasks relate") })
@@ -1306,18 +1292,18 @@ function wt() {
1306
1292
  /* @__PURE__ */ t("input", { type: "number", value: b, onChange: (m) => F(parseInt(m.target.value) || 0), style: { width: "100%", padding: "10px 12px", border: `1.5px solid ${e.borderLight}`, borderRadius: 8, fontSize: 14 } })
1307
1293
  ] }),
1308
1294
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "flex-end", gap: 12 }, children: [
1309
- /* @__PURE__ */ t("button", { onClick: () => M(null), style: { padding: "10px 16px", borderRadius: 8, border: `1px solid ${e.borderLight}`, background: "#fff", cursor: "pointer", fontWeight: 600 }, children: R("gantt.depModal.cancel", "Cancel") }),
1310
- /* @__PURE__ */ t("button", { onClick: Te, disabled: S, style: { padding: "10px 16px", borderRadius: 8, border: "none", background: e.group, color: "#fff", cursor: S ? "wait" : "pointer", fontWeight: 600 }, children: S ? R("gantt.depModal.saving", "Saving...") : R("gantt.depModal.create", "Create Dependency") })
1295
+ /* @__PURE__ */ t("button", { onClick: () => D(null), style: { padding: "10px 16px", borderRadius: 8, border: `1px solid ${e.borderLight}`, background: "#fff", cursor: "pointer", fontWeight: 600 }, children: R("gantt.depModal.cancel", "Cancel") }),
1296
+ /* @__PURE__ */ t("button", { onClick: De, disabled: S, style: { padding: "10px 16px", borderRadius: 8, border: "none", background: e.group, color: "#fff", cursor: S ? "wait" : "pointer", fontWeight: 600 }, children: S ? R("gantt.depModal.saving", "Saving...") : R("gantt.depModal.create", "Create Dependency") })
1311
1297
  ] })
1312
1298
  ] }) })
1313
1299
  ] });
1314
1300
  }
1315
1301
  function St(n) {
1316
- const c = pe(null), p = pe(null), D = pe(null), h = pe(!1), x = J(() => {
1302
+ const c = pe(null), p = pe(null), T = pe(null), h = pe(!1), x = J(() => {
1317
1303
  if (h.current) return;
1318
1304
  h.current = !0;
1319
1305
  const u = p.current;
1320
- u && c.current && (c.current.scrollTop = u.scrollTop), u && D.current && (D.current.scrollLeft = u.scrollLeft), h.current = !1;
1306
+ u && c.current && (c.current.scrollTop = u.scrollTop), u && T.current && (T.current.scrollLeft = u.scrollLeft), h.current = !1;
1321
1307
  }, []), w = J(() => {
1322
1308
  h.current || (h.current = !0, c.current && p.current && (p.current.scrollTop = c.current.scrollTop), h.current = !1);
1323
1309
  }, []), C = pe(!1);
@@ -1328,35 +1314,35 @@ function St(n) {
1328
1314
  const $ = se(/* @__PURE__ */ new Date(), n);
1329
1315
  if ($ >= 0 && $ <= n.totalWidth) {
1330
1316
  const b = $ - u.clientWidth / 2;
1331
- u.scrollLeft = Math.max(0, b), D.current && (D.current.scrollLeft = u.scrollLeft), C.current = !0;
1317
+ u.scrollLeft = Math.max(0, b), T.current && (T.current.scrollLeft = u.scrollLeft), C.current = !0;
1332
1318
  }
1333
1319
  }, [n]);
1334
- const M = J((u) => {
1320
+ const D = J((u) => {
1335
1321
  const $ = p.current;
1336
1322
  if ($)
1337
1323
  if (u.preventDefault(), u.shiftKey || Math.abs(u.deltaX) > Math.abs(u.deltaY)) {
1338
1324
  const b = u.shiftKey ? u.deltaY : u.deltaX;
1339
- $.scrollLeft += b, D.current && (D.current.scrollLeft = $.scrollLeft);
1325
+ $.scrollLeft += b, T.current && (T.current.scrollLeft = $.scrollLeft);
1340
1326
  } else
1341
1327
  $.scrollTop += u.deltaY, c.current && (c.current.scrollTop = $.scrollTop);
1342
1328
  }, []);
1343
1329
  return {
1344
1330
  leftBodyRef: c,
1345
1331
  rightBodyRef: p,
1346
- timeHeaderRef: D,
1332
+ timeHeaderRef: T,
1347
1333
  handleRightScroll: x,
1348
1334
  handleLeftScroll: w,
1349
- handleChartWheel: M
1335
+ handleChartWheel: D
1350
1336
  };
1351
1337
  }
1352
- function kt(n, c, p, D) {
1338
+ function kt(n, c, p, T) {
1353
1339
  const h = /* @__PURE__ */ new Map();
1354
1340
  return n.forEach((x) => h.set(x.id, x)), c.map((x) => {
1355
1341
  const w = h.get(x.predecessorId), C = h.get(x.successorId);
1356
1342
  if (!w || !C) return null;
1357
- const M = D.get(w.id), u = D.get(C.id);
1358
- if (M == null || u == null) return null;
1359
- const $ = w.originalType !== "step", b = C.originalType !== "step", F = $ ? se(w.start, p) + Ge : se(w.end, p), S = M * _ + _ / 2, B = b ? se(C.start, p) - 10 : se(C.start, p), r = u * _ + _ / 2, i = 14, T = Math.max(F + i, B - i), l = S === r ? `M${F},${S} L${B - 6},${r}` : `M${F},${S} L${T},${S} L${T},${r} L${B - 6},${r}`;
1343
+ const D = T.get(w.id), u = T.get(C.id);
1344
+ if (D == null || u == null) return null;
1345
+ const $ = w.originalType !== "step", b = C.originalType !== "step", F = $ ? se(w.start, p) + Le : se(w.end, p), S = D * _ + _ / 2, B = b ? se(C.start, p) - 10 : se(C.start, p), r = u * _ + _ / 2, i = 14, I = Math.max(F + i, B - i), l = S === r ? `M${F},${S} L${B - 6},${r}` : `M${F},${S} L${I},${S} L${I},${r} L${B - 6},${r}`;
1360
1346
  return { predId: w.id, succId: C.id, path: l, headX: B - 6, headY: r };
1361
1347
  }).filter(Boolean);
1362
1348
  }
@@ -1364,23 +1350,23 @@ function It(n, c) {
1364
1350
  if (n.length === 0 || c.length === 0) return /* @__PURE__ */ new Set();
1365
1351
  const p = /* @__PURE__ */ new Map();
1366
1352
  n.forEach((l) => p.set(l.id, l));
1367
- const D = new Set(n.map((l) => l.id)), h = c.filter((l) => D.has(l.predecessorId) && D.has(l.successorId));
1353
+ const T = new Set(n.map((l) => l.id)), h = c.filter((l) => T.has(l.predecessorId) && T.has(l.successorId));
1368
1354
  if (h.length === 0) return /* @__PURE__ */ new Set();
1369
1355
  const x = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
1370
1356
  h.forEach((l) => {
1371
1357
  x.has(l.predecessorId) || x.set(l.predecessorId, []), x.get(l.predecessorId).push(l.successorId), w.has(l.successorId) || w.set(l.successorId, []), w.get(l.successorId).push(l.predecessorId);
1372
1358
  });
1373
- const C = (l) => Math.max(1, fe(l.start, l.end)), M = /* @__PURE__ */ new Set(), u = [];
1359
+ const C = (l) => Math.max(1, ye(l.start, l.end)), D = /* @__PURE__ */ new Set(), u = [];
1374
1360
  function $(l) {
1375
- M.has(l) || (M.add(l), (x.get(l) || []).forEach($), u.unshift(l));
1361
+ D.has(l) || (D.add(l), (x.get(l) || []).forEach($), u.unshift(l));
1376
1362
  }
1377
1363
  n.forEach((l) => $(l.id));
1378
1364
  const b = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map();
1379
1365
  for (const l of u) {
1380
1366
  const E = p.get(l), f = w.get(l) || [];
1381
- let k = 0;
1382
- for (const y of f) k = Math.max(k, F.get(y) || 0);
1383
- const s = f.length > 0 ? k : 0;
1367
+ let M = 0;
1368
+ for (const y of f) M = Math.max(M, F.get(y) || 0);
1369
+ const s = f.length > 0 ? M : 0;
1384
1370
  b.set(l, s), F.set(l, s + C(E));
1385
1371
  }
1386
1372
  let S = 0;
@@ -1389,46 +1375,46 @@ function It(n, c) {
1389
1375
  });
1390
1376
  const B = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
1391
1377
  for (let l = u.length - 1; l >= 0; l--) {
1392
- const E = u[l], f = p.get(E), k = x.get(E) || [];
1378
+ const E = u[l], f = p.get(E), M = x.get(E) || [];
1393
1379
  let s = S;
1394
- for (const y of k) s = Math.min(s, B.get(y) ?? S);
1395
- r.set(E, k.length > 0 ? s : S), B.set(E, (r.get(E) || 0) - C(f));
1380
+ for (const y of M) s = Math.min(s, B.get(y) ?? S);
1381
+ r.set(E, M.length > 0 ? s : S), B.set(E, (r.get(E) || 0) - C(f));
1396
1382
  }
1397
1383
  const i = /* @__PURE__ */ new Set();
1398
1384
  h.forEach((l) => {
1399
1385
  i.add(l.predecessorId), i.add(l.successorId);
1400
1386
  });
1401
- const T = /* @__PURE__ */ new Set();
1387
+ const I = /* @__PURE__ */ new Set();
1402
1388
  for (const l of u) {
1403
1389
  if (!i.has(l)) continue;
1404
1390
  const E = (B.get(l) || 0) - (b.get(l) || 0);
1405
- Math.abs(E) < 0.5 && T.add(l);
1391
+ Math.abs(E) < 0.5 && I.add(l);
1406
1392
  }
1407
- return T;
1393
+ return I;
1408
1394
  }
1409
1395
  function Tt({
1410
1396
  steps: n,
1411
1397
  milestones: c,
1412
1398
  events: p,
1413
- notes: D,
1399
+ notes: T,
1414
1400
  dependencies: h,
1415
1401
  viewMode: x,
1416
1402
  locale: w,
1417
1403
  groupByProject: C,
1418
- visibleTypes: M,
1404
+ visibleTypes: D,
1419
1405
  collapsedGroups: u,
1420
1406
  collapsedProjects: $,
1421
1407
  selectedTaskId: b
1422
1408
  }) {
1423
1409
  const F = ae(() => {
1424
1410
  const f = [];
1425
- let k = 0;
1411
+ let M = 0;
1426
1412
  return n.forEach((s) => {
1427
1413
  const y = !!(s.startDate && s.finishDate), N = s.startDate || s.previsionStartDate, A = s.finishDate || s.previsionFinishDate;
1428
1414
  if (!N || !A) return;
1429
- const Z = new Date(N), I = new Date(A);
1430
- if (isNaN(Z.getTime()) || isNaN(I.getTime())) return;
1431
- I <= Z && I.setDate(I.getDate() + 1);
1415
+ const Z = new Date(N), k = new Date(A);
1416
+ if (isNaN(Z.getTime()) || isNaN(k.getTime())) return;
1417
+ k <= Z && k.setDate(k.getDate() + 1);
1432
1418
  let g, Y;
1433
1419
  if (s.previsionStartDate && s.previsionFinishDate) {
1434
1420
  const G = new Date(s.previsionStartDate), ie = new Date(s.previsionFinishDate);
@@ -1439,17 +1425,17 @@ function Tt({
1439
1425
  id: s.id,
1440
1426
  name: s.name,
1441
1427
  start: Z,
1442
- end: I,
1428
+ end: k,
1443
1429
  progress: q > 1 ? Math.min(q, 100) : q * 100,
1444
1430
  originalType: "step",
1445
1431
  deps: H,
1446
- colorIdx: k % oe.length,
1432
+ colorIdx: M % oe.length,
1447
1433
  previsionStart: g,
1448
1434
  previsionEnd: Y,
1449
1435
  hasActualDates: y,
1450
1436
  projectId: s.projectId || void 0,
1451
1437
  projectTitle: s.projectTitle || void 0
1452
- }), k++;
1438
+ }), M++;
1453
1439
  }), c?.forEach((s) => {
1454
1440
  if (!s.date) return;
1455
1441
  const y = new Date(s.date);
@@ -1482,7 +1468,7 @@ function Tt({
1482
1468
  projectId: s.projectId || void 0,
1483
1469
  projectTitle: s.projectTitle || void 0
1484
1470
  });
1485
- }), D?.forEach((s) => {
1471
+ }), T?.forEach((s) => {
1486
1472
  if (!s.date) return;
1487
1473
  const y = new Date(s.date);
1488
1474
  isNaN(y.getTime()) || f.push({
@@ -1501,8 +1487,8 @@ function Tt({
1501
1487
  projectTitle: s.projectTitle || void 0
1502
1488
  });
1503
1489
  }), f;
1504
- }, [n, c, p, D, h]), S = ae(() => bt(F, x, w), [F, x, w]), B = ae(() => {
1505
- const f = [], k = ["step", "milestone", "event", "note"];
1490
+ }, [n, c, p, T, h]), S = ae(() => bt(F, x, w), [F, x, w]), B = ae(() => {
1491
+ const f = [], M = ["step", "milestone", "event", "note"];
1506
1492
  if (C) {
1507
1493
  const s = /* @__PURE__ */ new Map();
1508
1494
  F.forEach((y) => {
@@ -1511,45 +1497,45 @@ function Tt({
1511
1497
  for (const [y, N] of Array.from(s.entries())) {
1512
1498
  const A = $.has(y);
1513
1499
  if (f.push({ kind: "projectHeader", projectId: y, projectTitle: N, collapsed: A }), !A) {
1514
- const Z = F.filter((I) => I.projectId === y);
1515
- for (const I of k) {
1516
- if (!M.has(I)) continue;
1517
- const g = Z.filter((q) => q.originalType === I);
1500
+ const Z = F.filter((k) => k.projectId === y);
1501
+ for (const k of M) {
1502
+ if (!D.has(k)) continue;
1503
+ const g = Z.filter((q) => q.originalType === k);
1518
1504
  if (g.length === 0) continue;
1519
- const Y = `${y}-${I}`, H = u.has(Y);
1520
- f.push({ kind: "group", groupType: I, label: Pe[I], count: g.length, collapsed: H, projectId: y }), H || g.forEach((q) => f.push({ kind: "task", task: q }));
1505
+ const Y = `${y}-${k}`, H = u.has(Y);
1506
+ f.push({ kind: "group", groupType: k, label: Ne[k], count: g.length, collapsed: H, projectId: y }), H || g.forEach((q) => f.push({ kind: "task", task: q }));
1521
1507
  }
1522
1508
  }
1523
1509
  }
1524
1510
  } else
1525
- for (const s of k) {
1526
- if (!M.has(s)) continue;
1511
+ for (const s of M) {
1512
+ if (!D.has(s)) continue;
1527
1513
  const y = F.filter((A) => A.originalType === s);
1528
1514
  if (y.length === 0) continue;
1529
1515
  const N = u.has(s);
1530
- f.push({ kind: "group", groupType: s, label: Pe[s], count: y.length, collapsed: N }), N || y.forEach((A) => f.push({ kind: "task", task: A }));
1516
+ f.push({ kind: "group", groupType: s, label: Ne[s], count: y.length, collapsed: N }), N || y.forEach((A) => f.push({ kind: "task", task: A }));
1531
1517
  }
1532
1518
  return f;
1533
- }, [F, M, u, $, C]), r = ae(() => {
1519
+ }, [F, D, u, $, C]), r = ae(() => {
1534
1520
  const f = /* @__PURE__ */ new Map();
1535
- return B.forEach((k, s) => {
1536
- k.kind === "task" && f.set(k.task.id, s);
1521
+ return B.forEach((M, s) => {
1522
+ M.kind === "task" && f.set(M.task.id, s);
1537
1523
  }), f;
1538
1524
  }, [B]), i = ae(
1539
1525
  () => kt(F, h || [], S, r),
1540
1526
  [F, h, S, r]
1541
- ), T = ae(() => It(F, h || []), [F, h]), l = ae(() => {
1542
- const f = /* @__PURE__ */ new Set(), k = /* @__PURE__ */ new Date();
1527
+ ), I = ae(() => It(F, h || []), [F, h]), l = ae(() => {
1528
+ const f = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Date();
1543
1529
  return F.forEach((s) => {
1544
- s.originalType === "step" && s.end < k && s.progress < 100 && f.add(s.id);
1530
+ s.originalType === "step" && s.end < M && s.progress < 100 && f.add(s.id);
1545
1531
  }), f;
1546
1532
  }, [F]), E = ae(() => {
1547
1533
  if (!b || !h?.length) return /* @__PURE__ */ new Set();
1548
- const f = /* @__PURE__ */ new Set(), k = [b];
1549
- for (; k.length; ) {
1550
- const s = k.shift();
1534
+ const f = /* @__PURE__ */ new Set(), M = [b];
1535
+ for (; M.length; ) {
1536
+ const s = M.shift();
1551
1537
  for (const y of h)
1552
- y.predecessorId === s && !f.has(y.successorId) && (f.add(y.successorId), k.push(y.successorId)), y.successorId === s && !f.has(y.predecessorId) && (f.add(y.predecessorId), k.push(y.predecessorId));
1538
+ y.predecessorId === s && !f.has(y.successorId) && (f.add(y.successorId), M.push(y.successorId)), y.successorId === s && !f.has(y.predecessorId) && (f.add(y.predecessorId), M.push(y.predecessorId));
1553
1539
  }
1554
1540
  return f;
1555
1541
  }, [b, h]);
@@ -1559,28 +1545,28 @@ function Tt({
1559
1545
  displayRows: B,
1560
1546
  taskRowIndex: r,
1561
1547
  arrows: i,
1562
- criticalIds: T,
1548
+ criticalIds: I,
1563
1549
  delayedIds: l,
1564
1550
  relatedIds: E
1565
1551
  };
1566
1552
  }
1567
1553
  function Et(n) {
1568
- const [c, p] = P("day"), [D, h] = P(null), [x, w] = P(null), [C, M] = P(null), [u, $] = P({
1554
+ const [c, p] = P("day"), [T, h] = P(null), [x, w] = P(null), [C, D] = P(null), [u, $] = P({
1569
1555
  isOpen: !1,
1570
1556
  position: { x: 0, y: 0 },
1571
1557
  task: null
1572
- }), [b, F] = P(null), [S, B] = P(null), [r, i] = P(null), [T, l] = P(null), [E, f] = P("FS"), [k, s] = P(0), [y, N] = P(!1), [A, Z] = P(null), [I, g] = P(null), [Y, H] = P(!1), q = pe(null), [G, ie] = P(/* @__PURE__ */ new Set(["step", "milestone", "event", "note"])), [ye, Ie] = P(/* @__PURE__ */ new Set()), [xe, Te] = P(/* @__PURE__ */ new Set()), le = J((a) => {
1558
+ }), [b, F] = P(null), [S, B] = P(null), [r, i] = P(null), [I, l] = P(null), [E, f] = P("FS"), [M, s] = P(0), [y, N] = P(!1), [A, Z] = P(null), [k, g] = P(null), [Y, H] = P(!1), q = pe(null), [G, ie] = P(/* @__PURE__ */ new Set(["step", "milestone", "event", "note"])), [xe, Te] = P(/* @__PURE__ */ new Set()), [be, De] = P(/* @__PURE__ */ new Set()), le = J((a) => {
1573
1559
  ie((d) => {
1574
1560
  const v = new Set(d);
1575
1561
  return v.has(a) ? v.delete(a) : v.add(a), v;
1576
1562
  });
1577
- }, []), be = J((a) => {
1578
- Ie((d) => {
1563
+ }, []), me = J((a) => {
1564
+ Te((d) => {
1579
1565
  const v = new Set(d);
1580
1566
  return v.has(a) ? v.delete(a) : v.add(a), v;
1581
1567
  });
1582
- }, []), De = J((a) => {
1583
- Te((d) => {
1568
+ }, []), Me = J((a) => {
1569
+ De((d) => {
1584
1570
  const v = new Set(d);
1585
1571
  return v.has(a) ? v.delete(a) : v.add(a), v;
1586
1572
  });
@@ -1593,28 +1579,28 @@ function Et(n) {
1593
1579
  viewMode: c,
1594
1580
  locale: n.locale,
1595
1581
  visibleTypes: G,
1596
- collapsedGroups: ye,
1597
- collapsedProjects: xe,
1582
+ collapsedGroups: xe,
1583
+ collapsedProjects: be,
1598
1584
  groupByProject: n.groupByProject,
1599
1585
  selectedTaskId: x || null
1600
- }), O = St(j.timeline), Me = J((a, d) => {
1586
+ }), O = St(j.timeline), Re = J((a, d) => {
1601
1587
  a.preventDefault(), a.stopPropagation(), F({ task: d, startMouseX: a.clientX, originalStart: new Date(d.start), originalEnd: new Date(d.end), offsetDays: 0 });
1602
- }, []), Re = J((a, d, v) => {
1603
- a.preventDefault(), a.stopPropagation(), B({ task: d, edge: v, startMouseX: a.clientX, originalStart: new Date(d.start), originalEnd: new Date(d.end), offsetDays: 0 });
1604
1588
  }, []), Ce = J((a, d, v) => {
1589
+ a.preventDefault(), a.stopPropagation(), B({ task: d, edge: v, startMouseX: a.clientX, originalStart: new Date(d.start), originalEnd: new Date(d.end), offsetDays: 0 });
1590
+ }, []), $e = J((a, d, v) => {
1605
1591
  a.preventDefault(), a.stopPropagation(), i({ fromTaskId: d.id, fromEdge: v, fromScreenX: a.clientX, fromScreenY: a.clientY, currentScreenX: a.clientX, currentScreenY: a.clientY, hoverTargetId: null });
1606
- }, []), $e = J(async () => {
1607
- if (!T || !n.onCreateDependency) return;
1608
- const a = new Map(j.tasks.map((X) => [X.id, X])), d = a.get(T.fromTaskId), v = a.get(T.toTaskId);
1592
+ }, []), Ee = J(async () => {
1593
+ if (!I || !n.onCreateDependency) return;
1594
+ const a = new Map(j.tasks.map((X) => [X.id, X])), d = a.get(I.fromTaskId), v = a.get(I.toTaskId);
1609
1595
  if (!d || !v) return;
1610
- const W = (X) => X.originalType === "step" ? "STEP" : "MILESTONE", L = T.fromEdge === "right" ? d : v, z = T.fromEdge === "right" ? v : d;
1596
+ const W = (X) => X.originalType === "step" ? "STEP" : "MILESTONE", L = I.fromEdge === "right" ? d : v, z = I.fromEdge === "right" ? v : d;
1611
1597
  N(!0);
1612
1598
  try {
1613
- await n.onCreateDependency({ predecessorId: L.id, predecessorType: W(L), successorId: z.id, successorType: W(z), type: E, lag: k }), l(null);
1599
+ await n.onCreateDependency({ predecessorId: L.id, predecessorType: W(L), successorId: z.id, successorType: W(z), type: E, lag: M }), l(null);
1614
1600
  } finally {
1615
1601
  N(!1);
1616
1602
  }
1617
- }, [T, j.tasks, n.onCreateDependency, E, k]);
1603
+ }, [I, j.tasks, n.onCreateDependency, E, M]);
1618
1604
  ge(() => {
1619
1605
  if (!b) return;
1620
1606
  const a = (v) => {
@@ -1712,7 +1698,7 @@ function Et(n) {
1712
1698
  g({ x: a.clientX, y: a.clientY, date: d(a.clientX), projectId: v(a.clientY) }), he(null);
1713
1699
  }, [j.timeline, j.displayRows, n.groupByProject, O.rightBodyRef, O.leftBodyRef]);
1714
1700
  ge(() => {
1715
- if (!I) return;
1701
+ if (!k) return;
1716
1702
  const a = (W) => {
1717
1703
  W.key === "Escape" && g(null);
1718
1704
  }, d = (W) => {
@@ -1721,18 +1707,18 @@ function Et(n) {
1721
1707
  return document.addEventListener("keydown", a), document.addEventListener("click", d), window.addEventListener("scroll", v, !0), () => {
1722
1708
  document.removeEventListener("keydown", a), document.removeEventListener("click", d), window.removeEventListener("scroll", v, !0);
1723
1709
  };
1724
- }, [I]);
1710
+ }, [k]);
1725
1711
  const m = ae(() => ({
1726
1712
  props: n,
1727
1713
  t: (a, d) => n.translations ? typeof n.translations == "function" ? n.translations(a, d) : n.translations[a] || d || "" : d || "",
1728
1714
  viewMode: c,
1729
1715
  setViewMode: p,
1730
- hoveredTaskId: D,
1716
+ hoveredTaskId: T,
1731
1717
  setHoveredTaskId: h,
1732
1718
  selectedTaskId: x,
1733
1719
  setSelectedTaskId: w,
1734
1720
  tooltip: C,
1735
- setTooltip: M,
1721
+ setTooltip: D,
1736
1722
  popupState: u,
1737
1723
  setPopupState: $,
1738
1724
  dragState: b,
@@ -1744,23 +1730,23 @@ function Et(n) {
1744
1730
  visibleTypes: G,
1745
1731
  setVisibleTypes: ie,
1746
1732
  toggleVisibility: le,
1747
- collapsedGroups: ye,
1748
- setCollapsedGroups: Ie,
1749
- toggleGroup: be,
1750
- collapsedProjects: xe,
1751
- setCollapsedProjects: Te,
1752
- toggleProject: De,
1753
- pendingConnection: T,
1733
+ collapsedGroups: xe,
1734
+ setCollapsedGroups: Te,
1735
+ toggleGroup: me,
1736
+ collapsedProjects: be,
1737
+ setCollapsedProjects: De,
1738
+ toggleProject: Me,
1739
+ pendingConnection: I,
1754
1740
  setPendingConnection: l,
1755
1741
  depModalType: E,
1756
1742
  setDepModalType: f,
1757
- depModalLag: k,
1743
+ depModalLag: M,
1758
1744
  setDepModalLag: s,
1759
1745
  depCreating: y,
1760
1746
  setDepCreating: N,
1761
1747
  deletingDepId: A,
1762
1748
  setDeletingDepId: Z,
1763
- chartMenu: I,
1749
+ chartMenu: k,
1764
1750
  setChartMenu: g,
1765
1751
  newActionOpen: Y,
1766
1752
  setNewActionOpen: H,
@@ -1794,14 +1780,14 @@ function Et(n) {
1794
1780
  },
1795
1781
  handleChartMouseDown: re,
1796
1782
  openChartMenu: ue,
1797
- handleBarMouseDown: Me,
1798
- handleResizeMouseDown: Re,
1799
- handleConnectDotMouseDown: Ce,
1800
- handleCreateDependency: $e
1783
+ handleBarMouseDown: Re,
1784
+ handleResizeMouseDown: Ce,
1785
+ handleConnectDotMouseDown: $e,
1786
+ handleCreateDependency: Ee
1801
1787
  }), [
1802
1788
  n,
1803
1789
  c,
1804
- D,
1790
+ T,
1805
1791
  x,
1806
1792
  C,
1807
1793
  u,
@@ -1809,28 +1795,28 @@ function Et(n) {
1809
1795
  S,
1810
1796
  r,
1811
1797
  G,
1812
- ye,
1813
1798
  xe,
1814
- T,
1799
+ be,
1800
+ I,
1815
1801
  E,
1816
- k,
1802
+ M,
1817
1803
  y,
1818
1804
  A,
1819
- I,
1805
+ k,
1820
1806
  Y,
1821
1807
  j,
1822
1808
  O,
1823
1809
  le,
1824
- be,
1825
- De,
1810
+ me,
1811
+ Me,
1826
1812
  re,
1827
1813
  ue,
1828
- Me,
1829
1814
  Re,
1830
1815
  Ce,
1831
- $e
1816
+ $e,
1817
+ Ee
1832
1818
  ]);
1833
- return n.loading ? /* @__PURE__ */ t("div", { style: { padding: 48, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", color: e.textSecondary }, children: /* @__PURE__ */ t(Oe, { size: 32, style: { animation: "zg-spin 1.5s linear infinite", color: e.group } }) }) : /* @__PURE__ */ t(pt, { value: m, children: /* @__PURE__ */ o(
1819
+ return n.loading ? /* @__PURE__ */ t("div", { style: { padding: 48, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", color: e.textSecondary }, children: /* @__PURE__ */ t(_e, { size: 32, style: { animation: "zg-spin 1.5s linear infinite", color: e.group } }) }) : /* @__PURE__ */ t(pt, { value: m, children: /* @__PURE__ */ o(
1834
1820
  "div",
1835
1821
  {
1836
1822
  style: {
@@ -1865,7 +1851,7 @@ const Dt = [
1865
1851
  { label: "Purple", value: "#E9D5FF" },
1866
1852
  { label: "Orange", value: "#FED7AA" },
1867
1853
  { label: "White", value: "#FFFFFF" }
1868
- ], Xe = {
1854
+ ], Oe = {
1869
1855
  FS: "Finish → Start (FS)",
1870
1856
  SS: "Start → Start (SS)",
1871
1857
  FF: "Finish → Finish (FF)",
@@ -1875,17 +1861,17 @@ function Ft({
1875
1861
  isOpen: n,
1876
1862
  onClose: c,
1877
1863
  availableMilestones: p = [],
1878
- initialDate: D,
1864
+ initialDate: T,
1879
1865
  translations: h,
1880
1866
  onSaveNote: x
1881
1867
  }) {
1882
- const w = (g, Y) => h ? typeof h == "function" ? h(g, Y) : h[g] || Y : Y, [C, M] = P(""), [u, $] = P(""), [b, F] = P("#FEF08A"), [S, B] = P(""), [r, i] = P(""), [T, l] = P("FS"), [E, f] = P(!1), [k, s] = P([]), [y, N] = P(""), A = pe(null);
1868
+ const w = (g, Y) => h ? typeof h == "function" ? h(g, Y) : h[g] || Y : Y, [C, D] = P(""), [u, $] = P(""), [b, F] = P("#FEF08A"), [S, B] = P(""), [r, i] = P(""), [I, l] = P("FS"), [E, f] = P(!1), [M, s] = P([]), [y, N] = P(""), A = pe(null);
1883
1869
  ge(() => {
1884
- n && (M(""), $(""), F("#FEF08A"), B(D ?? (/* @__PURE__ */ new Date()).toISOString().split("T")[0]), i(""), l("FS"), s([]), N(""));
1885
- }, [n, D]);
1870
+ n && (D(""), $(""), F("#FEF08A"), B(T ?? (/* @__PURE__ */ new Date()).toISOString().split("T")[0]), i(""), l("FS"), s([]), N(""));
1871
+ }, [n, T]);
1886
1872
  const Z = [
1887
1873
  ...p.map((g) => ({ id: g.id, name: g.name, type: "MILESTONE" }))
1888
- ], I = async () => {
1874
+ ], k = async () => {
1889
1875
  if (!C.trim() && !u.trim()) {
1890
1876
  N(w("noteModal.errorEmpty", "Please provide a title or content for the note."));
1891
1877
  return;
@@ -1898,8 +1884,8 @@ function Ft({
1898
1884
  color: b,
1899
1885
  date: S ? `${S}T00:00:00` : (/* @__PURE__ */ new Date()).toISOString(),
1900
1886
  predecessorId: r,
1901
- dependencyType: T,
1902
- files: k
1887
+ dependencyType: I,
1888
+ files: M
1903
1889
  }), c();
1904
1890
  } catch (g) {
1905
1891
  console.error(g), N(w("noteModal.errorSave", "Error creating note."));
@@ -1939,7 +1925,7 @@ function Ft({
1939
1925
  {
1940
1926
  type: "text",
1941
1927
  value: C,
1942
- onChange: (g) => M(g.target.value),
1928
+ onChange: (g) => D(g.target.value),
1943
1929
  placeholder: w("noteModal.titlePlaceholder", "Note title..."),
1944
1930
  style: {
1945
1931
  width: "100%",
@@ -2025,7 +2011,7 @@ function Ft({
2025
2011
  ]
2026
2012
  }
2027
2013
  ),
2028
- k.length > 0 && /* @__PURE__ */ t("div", { style: { marginTop: 8, display: "flex", flexDirection: "column", gap: 4 }, children: k.map((g, Y) => /* @__PURE__ */ o("div", { style: {
2014
+ M.length > 0 && /* @__PURE__ */ t("div", { style: { marginTop: 8, display: "flex", flexDirection: "column", gap: 4 }, children: M.map((g, Y) => /* @__PURE__ */ o("div", { style: {
2029
2015
  display: "flex",
2030
2016
  alignItems: "center",
2031
2017
  gap: 6,
@@ -2035,7 +2021,7 @@ function Ft({
2035
2021
  fontSize: 11,
2036
2022
  color: "#3a3a3a"
2037
2023
  }, children: [
2038
- /* @__PURE__ */ t(Ee, { size: 10, style: { flexShrink: 0 } }),
2024
+ /* @__PURE__ */ t(Fe, { size: 10, style: { flexShrink: 0 } }),
2039
2025
  /* @__PURE__ */ t("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: g.name }),
2040
2026
  /* @__PURE__ */ o("span", { style: { fontSize: 9, color: "rgba(58,58,58,0.4)", flexShrink: 0 }, children: [
2041
2027
  (g.size / 1024).toFixed(0),
@@ -2127,7 +2113,7 @@ function Ft({
2127
2113
  r && /* @__PURE__ */ t(
2128
2114
  "select",
2129
2115
  {
2130
- value: T,
2116
+ value: I,
2131
2117
  onChange: (g) => l(g.target.value),
2132
2118
  style: {
2133
2119
  width: "100%",
@@ -2142,7 +2128,7 @@ function Ft({
2142
2128
  cursor: "pointer",
2143
2129
  marginTop: 6
2144
2130
  },
2145
- children: Object.keys(Xe).map((g) => /* @__PURE__ */ t("option", { value: g, children: Xe[g] }, g))
2131
+ children: Object.keys(Oe).map((g) => /* @__PURE__ */ t("option", { value: g, children: Oe[g] }, g))
2146
2132
  }
2147
2133
  )
2148
2134
  ] }),
@@ -2158,11 +2144,11 @@ function Ft({
2158
2144
  /* @__PURE__ */ o(
2159
2145
  "button",
2160
2146
  {
2161
- onClick: I,
2147
+ onClick: k,
2162
2148
  disabled: E,
2163
2149
  style: { padding: "8px 20px", fontSize: 13, color: "#fff", background: "#1A3C30", border: "none", borderRadius: 8, cursor: "pointer", display: "flex", alignItems: "center", gap: 6, opacity: E ? 0.5 : 1 },
2164
2150
  children: [
2165
- E && /* @__PURE__ */ t(Oe, { size: 16, style: { animation: "zg-spin 1s linear infinite" } }),
2151
+ E && /* @__PURE__ */ t(_e, { size: 16, style: { animation: "zg-spin 1s linear infinite" } }),
2166
2152
  w("noteModal.create", "Create Note")
2167
2153
  ]
2168
2154
  }