zegantt 0.2.2 → 0.2.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.
package/dist/zegantt.js CHANGED
@@ -1,17 +1,17 @@
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 He = 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(He.Provider, { value: c, children: n });
7
7
  }
8
- function ke() {
9
- const n = tt(_e);
8
+ function Ie() {
9
+ const n = tt(He);
10
10
  if (!n)
11
11
  throw new Error("useGanttContext must be used within a GanttProvider");
12
12
  return n;
13
13
  }
14
- const V = {
14
+ const G = {
15
15
  white: "#FFFFFF",
16
16
  dark_gray: "#4F4F4F",
17
17
  gray: "#7B7B7B",
@@ -24,45 +24,45 @@ const V = {
24
24
  red: "#FF0000"
25
25
  }, e = {
26
26
  pageBg: "#F8FAFB",
27
- surface: V.white,
27
+ surface: G.white,
28
28
  // #FFFFFF
29
29
  surfaceAlt: "#F7FAF8",
30
30
  // subtle alternating row
31
31
  headerBg: "#F2F5F3",
32
32
  // soft green-tinted header
33
- textTitle: V.dark_green,
33
+ textTitle: G.dark_green,
34
34
  // #1A3C30
35
- textPrimary: V.dark_gray,
35
+ textPrimary: G.dark_gray,
36
36
  // #4F4F4F
37
- textSecondary: V.gray,
37
+ textSecondary: G.gray,
38
38
  // #7B7B7B
39
- textMuted: V.light_gray,
39
+ textMuted: G.light_gray,
40
40
  // #D9D9D9
41
- group: V.dark_green,
41
+ group: G.dark_green,
42
42
  // #1A3C30
43
- groupLight: V.water_green,
43
+ groupLight: G.water_green,
44
44
  // #A0D8A8 (bar border)
45
- milestone: V.dark_green,
45
+ milestone: G.dark_green,
46
46
  // #1A3C30
47
- milestoneRing: V.light_green,
47
+ milestoneRing: G.light_green,
48
48
  // #A0D8A8
49
- event: V.orange,
49
+ event: G.orange,
50
50
  // yellow translucent
51
- note: V.yellow,
51
+ note: G.yellow,
52
52
  // #FFBB1C
53
- border: V.light_gray,
53
+ border: G.light_gray,
54
54
  // #D9D9D9
55
55
  borderLight: "#ECECEC",
56
56
  weekendBg: "#F4F6F5",
57
- today: V.red,
57
+ today: G.red,
58
58
  // #FF0000
59
59
  todayBg: "#FF000008",
60
60
  // today column tint
61
- arrow: V.gray,
61
+ arrow: G.gray,
62
62
  // #7B7B7B
63
- arrowHover: V.dark_green
63
+ arrowHover: G.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, ne = 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
- setVisibleTypes: x,
100
- newActionOpen: w,
99
+ setVisibleTypes: w,
100
+ newActionOpen: x,
101
101
  setNewActionOpen: C,
102
102
  newActionRef: M
103
- } = ke(), { projectName: u, onAddNewStage: $, onAddMilestone: b, onAddEvent: F, onAddNote: S } = n, B = (r) => {
104
- x((i) => {
105
- const T = new Set(i);
106
- return T.has(r) ? T.delete(r) : T.add(r), T;
103
+ } = Ie(), { projectName: f, onAddNewStage: E, onAddMilestone: b, onAddEvent: F, onAddNote: S } = n, B = (r) => {
104
+ w((i) => {
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(
@@ -123,7 +123,7 @@ function yt() {
123
123
  /* @__PURE__ */ t("h3", { style: { margin: 0, fontSize: 14, fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.1em", color: e.textTitle }, children: c("planning.gantt", "Project Planning") }),
124
124
  /* @__PURE__ */ t("div", { style: { height: 2.5, width: 64, marginTop: 6, borderRadius: 9999, background: `linear-gradient(90deg, ${e.group}, ${e.milestoneRing})` } })
125
125
  ] }),
126
- u && /* @__PURE__ */ t(
126
+ f && /* @__PURE__ */ t(
127
127
  "span",
128
128
  {
129
129
  style: {
@@ -135,7 +135,7 @@ function yt() {
135
135
  background: e.surface,
136
136
  border: `1px solid ${e.border}`
137
137
  },
138
- children: u
138
+ children: f
139
139
  }
140
140
  )
141
141
  ] }),
@@ -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
+ E && /* @__PURE__ */ o("div", { ref: M, style: { position: "relative" }, children: [
194
194
  /* @__PURE__ */ o(
195
195
  "button",
196
196
  {
@@ -212,11 +212,11 @@ function yt() {
212
212
  children: [
213
213
  /* @__PURE__ */ t(ot, { size: 16 }),
214
214
  /* @__PURE__ */ t("span", { children: c("charts.gantt.newAction", "New Action") }),
215
- /* @__PURE__ */ t(Be, { size: 14, style: { opacity: 0.7, transform: w ? "rotate(180deg)" : "none", transition: "transform 0.18s" } })
215
+ /* @__PURE__ */ t(Be, { size: 14, style: { opacity: 0.7, transform: x ? "rotate(180deg)" : "none", transition: "transform 0.18s" } })
216
216
  ]
217
217
  }
218
218
  ),
219
- w && /* @__PURE__ */ t(
219
+ x && /* @__PURE__ */ t(
220
220
  "div",
221
221
  {
222
222
  style: {
@@ -238,19 +238,19 @@ function yt() {
238
238
  label: c("gantt.newAction.step", "Step"),
239
239
  icon: /* @__PURE__ */ t("div", { style: { width: 14, height: 14, borderRadius: 3, background: oe[0].bar, border: `1.5px solid ${oe[0].barBorder}`, flexShrink: 0 } }),
240
240
  action: () => {
241
- $(), C(!1);
241
+ E(), C(!1);
242
242
  }
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 Ge = 864e5, Z = (n, c) => new Date(n.getTime() + c * Ge), ye = (n, c) => Math.round((c.getTime() - n.getTime()) / Ge), Ye = (n) => new Date(n.getFullYear(), n.getMonth(), 1), We = (n) => new Date(n.getFullYear(), n.getMonth() + 1, 0), Q = (n) => `${String(n.getDate()).padStart(2, "0")}/${String(n.getMonth() + 1).padStart(2, "0")}/${n.getFullYear()}`, Oe = (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
- toggleProject: x,
315
- toggleGroup: w,
314
+ toggleProject: w,
315
+ toggleGroup: x,
316
316
  hoveredTaskId: C,
317
317
  setHoveredTaskId: M,
318
- selectedTaskId: u,
319
- setSelectedTaskId: $,
318
+ selectedTaskId: f,
319
+ setSelectedTaskId: E,
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 },
@@ -369,9 +369,9 @@ function xt() {
369
369
  borderBottom: `1.5px solid ${e.group}44`,
370
370
  background: `${e.group}0E`
371
371
  },
372
- onClick: () => x(r.projectId),
372
+ onClick: () => w(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,
@@ -401,9 +401,9 @@ function xt() {
401
401
  borderBottom: `1px solid ${e.border}`,
402
402
  background: e.headerBg
403
403
  },
404
- onClick: () => w(A),
404
+ onClick: () => x(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 = f === i.id, l = C === i.id, $ = i.originalType !== "step", u = b.has(i.id), D = F.has(i.id), s = f !== null && i.id !== f && !S.has(i.id), y = f !== null && S.has(i.id), N = u ? "#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` : D ? `3px solid ${e.today}` : void 0,
428
428
  opacity: s ? 0.3 : 1
429
429
  },
430
- onClick: () => $((A) => A === i.id ? null : i.id),
430
+ onClick: () => E((A) => A === i.id ? null : i.id),
431
431
  onDoubleClick: () => n.onTaskClick?.(B(i)),
432
432
  onMouseEnter: () => M(i.id),
433
433
  onMouseLeave: () => M(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 : u ? e.today : e.textPrimary,
449
449
  overflow: "hidden",
450
450
  textOverflow: "ellipsis",
451
451
  whiteSpace: "nowrap"
@@ -474,13 +474,13 @@ 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
- f && /* @__PURE__ */ t(rt, { size: 12, style: { flexShrink: 0, color: e.today } })
480
+ u && /* @__PURE__ */ t(rt, { size: 12, style: { flexShrink: 0, color: e.today } })
481
481
  ] }),
482
- /* @__PURE__ */ t("div", { style: { width: 80, fontSize: 11, fontWeight: 500, textAlign: "center", fontVariantNumeric: "tabular-nums", color: f ? e.today : e.textMuted }, children: ne(i.start) }),
483
- /* @__PURE__ */ t("div", { style: { width: 80, fontSize: 11, fontWeight: 500, textAlign: "center", fontVariantNumeric: "tabular-nums", color: f ? e.today : e.textMuted }, children: E ? "—" : ne(i.end) })
482
+ /* @__PURE__ */ t("div", { style: { width: 80, fontSize: 11, fontWeight: 500, textAlign: "center", fontVariantNumeric: "tabular-nums", color: u ? e.today : e.textMuted }, children: Q(i.start) }),
483
+ /* @__PURE__ */ t("div", { style: { width: 80, fontSize: 11, fontWeight: 500, textAlign: "center", fontVariantNumeric: "tabular-nums", color: u ? e.today : e.textMuted }, children: $ ? "—" : Q(i.end) })
484
484
  ]
485
485
  },
486
486
  i.id
@@ -491,75 +491,75 @@ 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();
496
- let E = -1;
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,
494
+ const T = c === "day" ? ut : ft, h = (r, i) => {
495
+ const I = [], l = (/* @__PURE__ */ new Date()).toDateString();
496
+ let $ = -1;
497
+ for (let u = 0; u < i; u++) {
498
+ const D = Z(r, u), s = D.toDateString() === l;
499
+ s && ($ = u), I.push({
500
+ date: D,
501
501
  isToday: s,
502
- isWeekend: k.getDay() === 0 || k.getDay() === 6
502
+ isWeekend: D.getDay() === 0 || D.getDay() === 6
503
503
  });
504
504
  }
505
- return { daysArr: T, todayIndex: E };
505
+ return { daysArr: I, todayIndex: $ };
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 = We(r), l = ye(i, I) + 1, { daysArr: $, todayIndex: u } = 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 }],
517
- days: E,
518
- todayIndex: f
513
+ dayWidth: T,
514
+ totalWidth: l * T,
515
+ months: [{ date: i, label: `${Oe(i, p)} ${i.getFullYear()}`, startDay: 0, days: l, width: l * T }],
516
+ years: [{ label: i.getFullYear().toString(), width: l * T }],
517
+ days: $,
518
+ todayIndex: u
519
519
  };
520
520
  }
521
- let x = new Date(n[0].start), w = new Date(n[0].end);
521
+ let w = new Date(n[0].start), x = new Date(n[0].end);
522
522
  n.forEach((r) => {
523
- r.start < x && (x = new Date(r.start)), r.end > w && (w = new Date(r.end));
523
+ r.start < w && (w = new Date(r.start)), r.end > x && (x = 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(Z(w, -14)), M = We(Z(x, 14)), f = ye(C, M) + 1, E = [];
526
526
  let b = new Date(C);
527
527
  for (; b <= M; ) {
528
- const r = ze(b), i = r > M ? M : r, T = fe(C, b), l = fe(b, i) + 1;
529
- $.push({
528
+ const r = We(b), i = r > M ? M : r, I = ye(C, b), l = ye(b, i) + 1;
529
+ E.push({
530
530
  date: new Date(b),
531
- label: `${Ye(b, p)} ${b.getFullYear()}`,
532
- startDay: T,
531
+ label: `${Oe(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
- const { daysArr: F, todayIndex: S } = h(C, u), B = [];
537
+ const { daysArr: F, todayIndex: S } = h(C, f), 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 E) {
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: M, totalDays: f, dayWidth: T, totalWidth: f * T, months: E, 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
- isHov: x,
558
- isDrag: w,
557
+ isHov: w,
558
+ isDrag: x,
559
559
  isResize: C,
560
560
  isCritical: M,
561
- isDelayed: u,
562
- isConnectTarget: $,
561
+ isDelayed: f,
562
+ isConnectTarget: E,
563
563
  showDots: b,
564
564
  isBarDimmed: F,
565
565
  isBarHighlighted: S,
@@ -567,14 +567,14 @@ 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 $ = oe[n.colorIdx ?? 0], u = p + (_ - ne) / 2, D = !!(n.previsionStart && n.previsionEnd), s = D ? se(n.previsionStart, I) : 0, y = D ? Math.max(se(n.previsionEnd, I) - s, l === "month" ? I.dayWidth : 6) : 0, N = u + ne + 3;
573
573
  return /* @__PURE__ */ o(de, { children: [
574
- k && /* @__PURE__ */ t(
574
+ D && /* @__PURE__ */ t(
575
575
  "div",
576
576
  {
577
- title: `Previsto: ${ne(n.previsionStart)} → ${ne(n.previsionEnd)}`,
577
+ title: `Previsto: ${Q(n.previsionStart)} → ${Q(n.previsionEnd)}`,
578
578
  style: {
579
579
  position: "absolute",
580
580
  left: s,
@@ -582,9 +582,9 @@ function mt({
582
582
  width: y,
583
583
  height: 5,
584
584
  borderRadius: 3,
585
- background: `${E.progress}33`,
586
- border: `1.5px solid ${E.progress}66`,
587
- boxShadow: `inset 0 0 0 1px ${E.progress}22`,
585
+ background: `${$.progress}33`,
586
+ border: `1.5px solid ${$.progress}66`,
587
+ boxShadow: `inset 0 0 0 1px ${$.progress}22`,
588
588
  pointerEvents: "none",
589
589
  zIndex: 5
590
590
  }
@@ -598,33 +598,33 @@ function mt({
598
598
  style: {
599
599
  position: "absolute",
600
600
  left: c,
601
- top: f,
602
- width: D,
603
- height: te,
604
- borderRadius: te / 2,
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}`,
607
- cursor: w || C ? "grabbing" : "grab",
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",
610
- transform: x ? "scaleY(1.06)" : "scaleY(1)",
601
+ top: u,
602
+ width: T,
603
+ height: ne,
604
+ borderRadius: ne / 2,
605
+ background: f ? "linear-gradient(135deg, #fdd, #fee)" : $.bar,
606
+ border: M ? `2px solid ${e.today}` : f ? `1.5px solid ${e.today}88` : `1.5px solid ${$.barBorder}`,
607
+ cursor: x || C ? "grabbing" : "grab",
608
+ zIndex: w || E ? 20 : 10,
609
+ boxShadow: E ? `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 && !w ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : w ? `0 3px 12px ${$.progress}22` : "none",
610
+ transform: w ? "scaleY(1.06)" : "scaleY(1)",
611
611
  opacity: F ? 0.15 : 1,
612
- transition: w || C ? "none" : "box-shadow 0.2s, transform 0.15s, opacity 0.18s",
612
+ transition: x || 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: ne / 2, overflow: "hidden", pointerEvents: "none" }, children: [
617
617
  /* @__PURE__ */ t("div", { style: {
618
618
  position: "absolute",
619
619
  left: 0,
620
620
  top: 0,
621
621
  width: h,
622
622
  height: "100%",
623
- background: u ? `linear-gradient(90deg, ${e.today}cc, ${e.today}88)` : `linear-gradient(90deg, ${E.progress}, ${E.progress}cc)`,
624
- borderRadius: `${te / 2}px 0 0 ${te / 2}px`,
625
- transition: w || C ? "none" : "width 0.3s"
623
+ background: f ? `linear-gradient(90deg, ${e.today}cc, ${e.today}88)` : `linear-gradient(90deg, ${$.progress}, ${$.progress}cc)`,
624
+ borderRadius: `${ne / 2}px 0 0 ${ne / 2}px`,
625
+ transition: x || 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",
@@ -633,7 +633,7 @@ function mt({
633
633
  fontSize: 10,
634
634
  fontWeight: 700,
635
635
  letterSpacing: "0.05em",
636
- color: n.progress > 50 ? "#fff" : u ? e.today : E.progress,
636
+ color: n.progress > 50 ? "#fff" : f ? e.today : $.progress,
637
637
  zIndex: 1,
638
638
  pointerEvents: "none"
639
639
  }, children: [
@@ -641,8 +641,8 @@ function mt({
641
641
  "%"
642
642
  ] })
643
643
  ] }),
644
- /* @__PURE__ */ t("div", { onMouseDown: (A) => r(A, n, "left"), style: { position: "absolute", left: 0, top: 0, width: 8, height: "100%", cursor: "col-resize", zIndex: 2, borderRadius: `${te / 2}px 0 0 ${te / 2}px` } }),
645
- /* @__PURE__ */ t("div", { onMouseDown: (A) => r(A, n, "right"), style: { position: "absolute", right: 0, top: 0, width: 8, height: "100%", cursor: "col-resize", zIndex: 2, borderRadius: `0 ${te / 2}px ${te / 2}px 0` } }),
644
+ /* @__PURE__ */ t("div", { onMouseDown: (A) => r(A, n, "left"), style: { position: "absolute", left: 0, top: 0, width: 8, height: "100%", cursor: "col-resize", zIndex: 2, borderRadius: `${ne / 2}px 0 0 ${ne / 2}px` } }),
645
+ /* @__PURE__ */ t("div", { onMouseDown: (A) => r(A, n, "right"), style: { position: "absolute", right: 0, top: 0, width: 8, height: "100%", cursor: "col-resize", zIndex: 2, borderRadius: `0 ${ne / 2}px ${ne / 2}px 0` } }),
646
646
  b && /* @__PURE__ */ o(de, { children: [
647
647
  /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (A) => i(A, 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 } }),
648
648
  /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (A) => i(A, 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 } })
@@ -653,7 +653,7 @@ function mt({
653
653
  ] });
654
654
  }
655
655
  if (n.originalType === "milestone") {
656
- const E = p + (_ - Ae) / 2;
656
+ const $ = p + (_ - fe) / 2;
657
657
  return /* @__PURE__ */ o(
658
658
  "div",
659
659
  {
@@ -662,40 +662,40 @@ function mt({
662
662
  style: {
663
663
  position: "absolute",
664
664
  left: c - 6,
665
- top: E,
666
- height: Ae,
667
- minWidth: Ge,
668
- borderRadius: Ae / 2,
665
+ top: $,
666
+ height: fe,
667
+ minWidth: Le,
668
+ borderRadius: fe / 2,
669
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}`,
670
+ border: E ? `2px solid ${e.group}` : M ? `2px solid ${e.today}` : `1.5px solid ${e.milestoneRing}`,
671
671
  display: "flex",
672
672
  alignItems: "center",
673
673
  gap: 6,
674
674
  paddingLeft: 4,
675
675
  paddingRight: 12,
676
- cursor: w ? "grabbing" : "grab",
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)",
676
+ cursor: x ? "grabbing" : "grab",
677
+ zIndex: w || E ? 20 : 10,
678
+ boxShadow: E ? `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 && !w ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : w ? `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
- transform: x ? "translateY(-1px)" : "none",
681
+ transform: w ? "translateY(-1px)" : "none",
682
682
  whiteSpace: "nowrap",
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 }) }),
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(Se, { size: 11, color: "#fff", strokeWidth: 2.5 }) }),
687
687
  /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: M ? 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
- /* @__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 } }),
691
- /* @__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 } })
690
+ /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (u) => i(u, 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 } }),
691
+ /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (u) => i(u, 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 } })
692
692
  ] })
693
693
  ]
694
694
  }
695
695
  );
696
696
  }
697
697
  if (n.originalType === "event") {
698
- const f = p + (_ - 22) / 2;
698
+ const $ = 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%",
706
+ left: c - 6,
707
+ top: $,
708
+ height: fe,
709
+ minWidth: Le,
710
+ borderRadius: fe / 2,
711
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}`,
712
+ border: E ? `2px solid ${e.group}` : M ? `2px solid ${e.today}` : `1.5px solid ${e.event}`,
713
713
  display: "flex",
714
714
  alignItems: "center",
715
- justifyContent: "center",
716
- cursor: w ? "grabbing" : "grab",
717
- 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)",
715
+ gap: 6,
716
+ paddingLeft: 4,
717
+ paddingRight: 12,
718
+ cursor: x ? "grabbing" : "grab",
719
+ zIndex: w || E ? 20 : 10,
720
+ boxShadow: E ? `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 && !w ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : w ? `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: w ? "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: M ? 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: M ? 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: (u) => i(u, 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: (u) => i(u, 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 u = p + 4, D = n.noteColor || "#FEF08A", s = n.filesCount || 0;
755
741
  return /* @__PURE__ */ o(
756
742
  "div",
757
743
  {
@@ -759,53 +745,73 @@ function mt({
759
745
  ...B,
760
746
  style: {
761
747
  position: "absolute",
762
- left: c - 36 / 2,
763
- top: k,
764
- width: 36,
765
- height: 44,
766
- background: s,
767
- borderRadius: 2,
768
- cursor: w ? "grabbing" : "grab",
769
- zIndex: x || $ ? 20 : 10,
770
- boxShadow: $ ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : S && !x ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : x ? "3px 4px 12px rgba(0,0,0,0.2)" : "1px 2px 5px rgba(0,0,0,0.15)",
748
+ left: c,
749
+ top: u,
750
+ width: 148,
751
+ minHeight: 72,
752
+ background: D,
753
+ borderRadius: 3,
754
+ cursor: x ? "grabbing" : "grab",
755
+ zIndex: w || E ? 20 : 10,
756
+ boxShadow: E ? `0 0 0 2px ${e.group}, 4px 6px 16px rgba(0,0,0,0.22)` : S && !w ? `0 0 0 2px ${e.group}99, 3px 4px 14px rgba(0,0,0,0.18)` : w ? "4px 6px 18px rgba(0,0,0,0.22)" : "2px 3px 8px rgba(0,0,0,0.13)",
771
757
  opacity: F ? 0.2 : 1,
772
- transition: "box-shadow 0.2s, transform 0.15s, opacity 0.18s",
773
- transform: x ? "rotate(-2deg) scale(1.05)" : "none",
774
- overflow: "visible",
758
+ transition: x ? "none" : "box-shadow 0.2s, transform 0.15s, opacity 0.18s",
759
+ transform: w ? "rotate(-1.5deg) scale(1.03) translateY(-2px)" : "rotate(0deg)",
760
+ border: "1px solid rgba(0,0,0,0.06)",
761
+ padding: "12px 10px 10px",
775
762
  display: "flex",
776
763
  flexDirection: "column",
777
- border: "1px solid rgba(0,0,0,0.04)"
764
+ gap: 2,
765
+ userSelect: "none"
778
766
  },
779
767
  children: [
780
- /* @__PURE__ */ t("div", { style: { position: "absolute", top: -5, left: "50%", transform: "translateX(-50%)", width: 18, height: 6, background: "rgba(255,255,255,0.6)", borderRadius: 1, boxShadow: "0 1px 2px rgba(0,0,0,0.05)" } }),
781
- /* @__PURE__ */ o("div", { style: { padding: "6px 4px 2px", flex: 1, overflow: "hidden" }, children: [
782
- /* @__PURE__ */ t("div", { style: { width: "80%", height: 2, background: "rgba(0,0,0,0.1)", borderRadius: 1, marginBottom: 3 } }),
783
- /* @__PURE__ */ t("div", { style: { width: "60%", height: 2, background: "rgba(0,0,0,0.1)", borderRadius: 1, marginBottom: 3 } }),
784
- /* @__PURE__ */ t("div", { style: { width: "90%", height: 2, background: "rgba(0,0,0,0.1)", borderRadius: 1 } })
785
- ] }),
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 }) }),
787
768
  /* @__PURE__ */ t("div", { style: {
788
769
  position: "absolute",
789
- top: "100%",
770
+ top: -6,
790
771
  left: "50%",
791
772
  transform: "translateX(-50%)",
792
- marginTop: 6,
793
- background: "rgba(255,255,255,0.95)",
794
- padding: "3px 8px",
795
- borderRadius: 4,
796
- border: `1px solid ${e.borderLight}`,
797
- fontSize: 10,
798
- fontWeight: 500,
799
- color: e.textPrimary,
800
- whiteSpace: "nowrap",
801
- pointerEvents: "none",
802
- opacity: x ? 1 : 0,
803
- transition: "opacity 0.15s",
804
- boxShadow: "0 2px 8px rgba(0,0,0,0.08)"
773
+ width: 40,
774
+ height: 11,
775
+ background: "rgba(255,255,255,0.55)",
776
+ borderRadius: 2,
777
+ boxShadow: "0 1px 3px rgba(0,0,0,0.08)"
778
+ } }),
779
+ /* @__PURE__ */ t("span", { style: {
780
+ fontSize: 13,
781
+ fontWeight: 700,
782
+ color: "#1a1a1a",
783
+ lineHeight: "1.3",
784
+ wordBreak: "break-word",
785
+ display: "-webkit-box",
786
+ WebkitLineClamp: 2,
787
+ WebkitBoxOrient: "vertical",
788
+ overflow: "hidden"
805
789
  }, children: n.name }),
790
+ n.projectTitle && /* @__PURE__ */ t("span", { style: {
791
+ fontSize: 10,
792
+ fontWeight: 400,
793
+ color: "rgba(0,0,0,0.55)",
794
+ overflow: "hidden",
795
+ textOverflow: "ellipsis",
796
+ whiteSpace: "nowrap"
797
+ }, children: n.projectTitle }),
798
+ /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginTop: 2 }, children: [
799
+ /* @__PURE__ */ t("span", { style: { fontSize: 9, fontWeight: 500, color: "rgba(0,0,0,0.45)" }, children: Q(n.start) }),
800
+ s > 0 && /* @__PURE__ */ o("span", { style: {
801
+ display: "flex",
802
+ alignItems: "center",
803
+ gap: 2,
804
+ fontSize: 9,
805
+ color: "rgba(0,0,0,0.45)"
806
+ }, children: [
807
+ /* @__PURE__ */ t(Fe, { size: 8 }),
808
+ " ",
809
+ s
810
+ ] })
811
+ ] }),
806
812
  b && /* @__PURE__ */ o(de, { children: [
807
- /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (y) => i(y, n, "left"), style: { position: "absolute", left: -10, 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 } }),
808
- /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (y) => i(y, n, "right"), style: { position: "absolute", right: -10, 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 } })
813
+ /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (y) => i(y, 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 } }),
814
+ /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (y) => i(y, 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 } })
809
815
  ] })
810
816
  ]
811
817
  }
@@ -818,18 +824,18 @@ function vt() {
818
824
  arrows: n,
819
825
  hoveredTaskId: c,
820
826
  selectedTaskId: p,
821
- relatedIds: D
822
- } = ke();
823
- 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;
827
+ relatedIds: T
828
+ } = Ie();
829
+ return /* @__PURE__ */ t(de, { children: n.map((h, w) => {
830
+ const x = c === h.predId || c === h.succId, C = !p || h.predId === p || h.succId === p || T.has(h.predId) || T.has(h.succId), M = p !== null && C, f = x ? e.arrowHover : M ? e.group : e.arrow;
825
831
  return /* @__PURE__ */ o("g", { style: { opacity: C ? M ? 1 : void 0 : 0.08, transition: "opacity 0.18s" }, children: [
826
832
  /* @__PURE__ */ t(
827
833
  "path",
828
834
  {
829
835
  d: h.path,
830
836
  fill: "none",
831
- stroke: u,
832
- strokeWidth: M ? 2.5 : w ? 2 : 1.5,
837
+ stroke: f,
838
+ strokeWidth: M ? 2.5 : x ? 2 : 1.5,
833
839
  style: { transition: "stroke 0.2s, stroke-width 0.2s" }
834
840
  }
835
841
  ),
@@ -837,28 +843,28 @@ function vt() {
837
843
  "polygon",
838
844
  {
839
845
  points: `${h.headX},${h.headY} ${h.headX - 6},${h.headY - 4} ${h.headX - 6},${h.headY + 4}`,
840
- fill: u,
846
+ fill: f,
841
847
  style: { transition: "fill 0.2s" }
842
848
  }
843
849
  )
844
- ] }, x);
850
+ ] }, w);
845
851
  }) });
846
852
  }
847
- const We = (n) => ({
853
+ const ze = (n) => ({
848
854
  id: n.id,
849
855
  name: n.name,
850
856
  start: n.start,
851
857
  end: n.end,
852
858
  type: n.originalType === "step" ? "task" : n.originalType,
853
859
  progress: n.progress
854
- }), me = (n, c) => {
860
+ }), ve = (n, c) => {
855
861
  switch (n) {
856
862
  case "step":
857
863
  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
864
  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" }) });
865
+ 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
866
  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" }) });
867
+ 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
868
  case "note":
863
869
  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
870
  default:
@@ -870,59 +876,59 @@ function wt() {
870
876
  props: n,
871
877
  viewMode: c,
872
878
  timeline: p,
873
- displayRows: D,
879
+ displayRows: T,
874
880
  dragState: h,
875
- resizeState: x,
876
- connectState: w,
881
+ resizeState: w,
882
+ connectState: x,
877
883
  pendingConnection: C,
878
884
  setPendingConnection: M,
879
- depModalType: u,
880
- setDepModalType: $,
885
+ depModalType: f,
886
+ setDepModalType: E,
881
887
  depModalLag: b,
882
888
  setDepModalLag: F,
883
889
  depCreating: S,
884
890
  deletingDepId: B,
885
891
  setDeletingDepId: r,
886
892
  chartMenu: i,
887
- setChartMenu: T,
893
+ setChartMenu: I,
888
894
  rightBodyRef: l,
889
- timeHeaderRef: E,
890
- handleChartMouseDown: f,
891
- handleChartWheel: k,
895
+ timeHeaderRef: $,
896
+ handleChartMouseDown: u,
897
+ handleChartWheel: D,
892
898
  openChartMenu: s,
893
899
  hoveredTaskId: y,
894
900
  setHoveredTaskId: N,
895
901
  selectedTaskId: A,
896
- setSelectedTaskId: Z,
897
- tooltip: I,
902
+ setSelectedTaskId: ee,
903
+ tooltip: k,
898
904
  setTooltip: g,
899
905
  popupState: Y,
900
- setPopupState: H,
906
+ setPopupState: V,
901
907
  criticalIds: q,
902
- delayedIds: G,
908
+ delayedIds: H,
903
909
  relatedIds: ie,
904
- handleBarMouseDown: ye,
905
- handleResizeMouseDown: Ie,
906
- handleConnectDotMouseDown: xe,
907
- handleCreateDependency: Te
908
- } = ke(), {
910
+ handleBarMouseDown: xe,
911
+ handleResizeMouseDown: Te,
912
+ handleConnectDotMouseDown: be,
913
+ handleCreateDependency: Me
914
+ } = Ie(), {
909
915
  translations: le,
910
- onViewStage: be,
916
+ onViewStage: me,
911
917
  onEditStage: De,
912
918
  onDeleteStage: j,
913
- onDeleteDependency: O,
914
- onAddNewStage: Me,
915
- onAddMilestone: Re,
916
- onAddEvent: Ce,
919
+ onDeleteDependency: X,
920
+ onAddNewStage: Re,
921
+ onAddMilestone: Ce,
922
+ onAddEvent: Ee,
917
923
  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 });
924
+ } = 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) + 80, ue = () => V({ isOpen: !1, position: { x: 0, y: 0 }, task: null });
919
925
  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
926
  /* @__PURE__ */ t(
921
927
  "div",
922
928
  {
923
- ref: E,
929
+ ref: $,
924
930
  style: {
925
- height: ve * 2,
931
+ height: we * 2,
926
932
  background: e.headerBg,
927
933
  borderBottom: `1px solid ${e.borderLight}`,
928
934
  overflow: "hidden",
@@ -930,13 +936,13 @@ function wt() {
930
936
  flexShrink: 0,
931
937
  boxShadow: "0 1px 3px rgba(0,0,0,0.02)"
932
938
  },
933
- onWheel: k,
939
+ onWheel: D,
934
940
  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: [
941
+ /* @__PURE__ */ o("div", { style: { position: "absolute", top: 0, left: 0, right: 0, height: we, display: "flex" }, children: [
936
942
  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
943
  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
944
  ] }),
939
- /* @__PURE__ */ o("div", { style: { position: "absolute", top: ve, left: 0, right: 0, height: ve, display: "flex" }, children: [
945
+ /* @__PURE__ */ o("div", { style: { position: "absolute", top: we, left: 0, right: 0, height: we, display: "flex" }, children: [
940
946
  c === "day" && p.days.map((m, a) => {
941
947
  const d = m.isToday;
942
948
  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);
@@ -952,8 +958,8 @@ function wt() {
952
958
  ref: l,
953
959
  className: "zg-no-scrollbar",
954
960
  style: { flex: 1, overflow: "auto", background: "#fff", position: "relative" },
955
- onMouseDown: f,
956
- onWheel: k,
961
+ onMouseDown: u,
962
+ onWheel: D,
957
963
  onContextMenu: s,
958
964
  children: /* @__PURE__ */ o("div", { style: { width: p.totalWidth, height: re, position: "relative" }, children: [
959
965
  /* @__PURE__ */ o("svg", { width: p.totalWidth, height: re, style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" }, children: [
@@ -970,7 +976,7 @@ function wt() {
970
976
  /* @__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
977
  ] })
972
978
  ] }),
973
- D.map((m, a) => m.kind === "group" || m.kind === "projectHeader" ? /* @__PURE__ */ t("div", { style: {
979
+ T.map((m, a) => m.kind === "group" || m.kind === "projectHeader" ? /* @__PURE__ */ t("div", { style: {
974
980
  position: "absolute",
975
981
  left: 0,
976
982
  top: a * _,
@@ -981,12 +987,12 @@ function wt() {
981
987
  pointerEvents: "none"
982
988
  } }, `bg-${a}`) : null),
983
989
  /* @__PURE__ */ o("div", { style: { position: "absolute", inset: 0 }, children: [
984
- D.map((m, a) => {
990
+ T.map((m, a) => {
985
991
  if (m.kind !== "task") return null;
986
- 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
- let ce = se(L, p), U = 0, ee = 0;
988
- 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 * _;
992
+ const d = m.task, v = h?.task.id === d.id, z = w?.task.id === d.id, L = v || z && w.edge === "left" ? Z(d.start, v ? h.offsetDays : w.offsetDays) : d.start, W = v || z && w.edge === "right" ? Z(d.end, v ? h.offsetDays : w.offsetDays) : d.end, O = d.originalType !== "step";
993
+ let ce = se(L, p), U = 0, te = 0;
994
+ O || (U = Math.max(se(W, p) - ce, p.dayWidth), te = U * (d.progress / 100));
995
+ const je = y === d.id, Ae = A === d.id, Ve = H.has(d.id), Ue = q.has(d.id), qe = !!A && !Ae && !ie.has(d.id), Ke = Ae || !!A && ie.has(d.id), Je = x?.hoverTargetId === d.id, Qe = je || Ae, Ze = a * _;
990
996
  return /* @__PURE__ */ t(
991
997
  mt,
992
998
  {
@@ -994,43 +1000,43 @@ function wt() {
994
1000
  x: ce,
995
1001
  y: Ze,
996
1002
  w: U,
997
- progW: ee,
998
- isHov: Le,
1003
+ progW: te,
1004
+ isHov: je,
999
1005
  isDrag: v,
1000
- isResize: W,
1006
+ isResize: z,
1001
1007
  isCritical: Ue,
1002
- isDelayed: He,
1008
+ isDelayed: Ve,
1003
1009
  isConnectTarget: Je,
1004
1010
  showDots: Qe,
1005
1011
  isBarDimmed: qe,
1006
1012
  isBarHighlighted: Ke,
1007
1013
  commonEvents: {
1008
1014
  onMouseEnter: (K) => {
1009
- N(d.id), !h && !x && g({ task: d, x: K.clientX, y: K.clientY });
1015
+ N(d.id), !h && !w && g({ task: d, x: K.clientX, y: K.clientY });
1010
1016
  },
1011
1017
  onMouseMove: (K) => {
1012
- y === d.id && !h && !x && g({ task: d, x: K.clientX, y: K.clientY });
1018
+ y === d.id && !h && !w && g({ task: d, x: K.clientX, y: K.clientY });
1013
1019
  },
1014
1020
  onMouseLeave: () => {
1015
1021
  N(null), g(null);
1016
1022
  },
1017
1023
  onClick: (K) => {
1018
- K.stopPropagation(), Z(d.id), K.detail === 2 && be?.(We(d)), H(!Y.isOpen || Y.task?.id !== d.id ? {
1024
+ K.stopPropagation(), ee(d.id), K.detail === 2 && me?.(ze(d)), V(!Y.isOpen || Y.task?.id !== d.id ? {
1019
1025
  isOpen: !0,
1020
1026
  position: { x: K.clientX, y: K.clientY },
1021
1027
  task: d
1022
1028
  } : { isOpen: !1, position: { x: 0, y: 0 }, task: null });
1023
1029
  },
1024
- onMouseDown: (K) => ye(K, d)
1030
+ onMouseDown: (K) => xe(K, d)
1025
1031
  },
1026
- handleResizeMouseDown: Ie,
1027
- handleConnectDotMouseDown: xe
1032
+ handleResizeMouseDown: Te,
1033
+ handleConnectDotMouseDown: be
1028
1034
  },
1029
1035
  d.id
1030
1036
  );
1031
1037
  }),
1032
1038
  /* @__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(
1039
+ k && !h && /* @__PURE__ */ t("div", { style: { position: "fixed", left: k.x + 16, top: k.y - 10, zIndex: 9999, pointerEvents: "none" }, children: /* @__PURE__ */ o(
1034
1040
  "div",
1035
1041
  {
1036
1042
  style: {
@@ -1044,11 +1050,11 @@ function wt() {
1044
1050
  },
1045
1051
  children: [
1046
1052
  /* @__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 })
1053
+ ve(k.task.originalType, k.task.colorIdx),
1054
+ /* @__PURE__ */ t("span", { style: { fontSize: 12, fontWeight: 700, color: e.textTitle, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: k.task.name })
1049
1055
  ] }),
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: [
1056
+ /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 4, fontSize: 11, color: e.textSecondary }, children: k.task.originalType === "step" ? /* @__PURE__ */ o(de, { children: [
1057
+ k.task.previsionStart && k.task.previsionEnd && /* @__PURE__ */ o("div", { style: { background: `${e.headerBg}`, borderRadius: 6, padding: "4px 6px", marginBottom: 2 }, children: [
1052
1058
  /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 4, marginBottom: 4 }, children: [
1053
1059
  /* @__PURE__ */ t("div", { style: { width: 20, height: 4, borderRadius: 2, background: `${e.textSecondary}44`, border: `1.5px solid ${e.textSecondary}66` } }),
1054
1060
  /* @__PURE__ */ t("span", { style: { fontSize: 9, fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.06em", color: e.textSecondary }, children: R("gantt.tooltip.planned", "Planned") })
@@ -1058,14 +1064,14 @@ function wt() {
1058
1064
  R("gantt.tooltip.start", "Start"),
1059
1065
  ":"
1060
1066
  ] }),
1061
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(I.task.previsionStart) })
1067
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: Q(k.task.previsionStart) })
1062
1068
  ] }),
1063
1069
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1064
1070
  /* @__PURE__ */ o("span", { children: [
1065
1071
  R("gantt.tooltip.end", "End"),
1066
1072
  ":"
1067
1073
  ] }),
1068
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(I.task.previsionEnd) })
1074
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: Q(k.task.previsionEnd) })
1069
1075
  ] }),
1070
1076
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1071
1077
  /* @__PURE__ */ o("span", { children: [
@@ -1073,29 +1079,29 @@ function wt() {
1073
1079
  ":"
1074
1080
  ] }),
1075
1081
  /* @__PURE__ */ o("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: [
1076
- he(I.task.previsionStart, I.task.previsionEnd),
1082
+ he(k.task.previsionStart, k.task.previsionEnd),
1077
1083
  "d"
1078
1084
  ] })
1079
1085
  ] })
1080
1086
  ] }),
1081
- /* @__PURE__ */ o("div", { style: { background: I.task.hasActualDates ? `${e.groupLight}22` : "transparent", borderRadius: 6, padding: "4px 6px" }, children: [
1087
+ /* @__PURE__ */ o("div", { style: { background: k.task.hasActualDates ? `${e.groupLight}22` : "transparent", borderRadius: 6, padding: "4px 6px" }, children: [
1082
1088
  /* @__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)") })
1089
+ /* @__PURE__ */ t("div", { style: { width: 20, height: 4, borderRadius: 2, background: oe[k.task.colorIdx ?? 0].progress } }),
1090
+ /* @__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
1091
  ] }),
1086
1092
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1087
1093
  /* @__PURE__ */ o("span", { children: [
1088
1094
  R("gantt.tooltip.start", "Start"),
1089
1095
  ":"
1090
1096
  ] }),
1091
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(I.task.start) })
1097
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: Q(k.task.start) })
1092
1098
  ] }),
1093
1099
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1094
1100
  /* @__PURE__ */ o("span", { children: [
1095
1101
  R("gantt.tooltip.end", "End"),
1096
1102
  ":"
1097
1103
  ] }),
1098
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(I.task.end) })
1104
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: Q(k.task.end) })
1099
1105
  ] }),
1100
1106
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1101
1107
  /* @__PURE__ */ o("span", { children: [
@@ -1103,7 +1109,7 @@ function wt() {
1103
1109
  ":"
1104
1110
  ] }),
1105
1111
  /* @__PURE__ */ o("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: [
1106
- he(I.task.start, I.task.end),
1112
+ he(k.task.start, k.task.end),
1107
1113
  "d"
1108
1114
  ] })
1109
1115
  ] })
@@ -1114,30 +1120,30 @@ function wt() {
1114
1120
  ":"
1115
1121
  ] }),
1116
1122
  /* @__PURE__ */ o("span", { style: { fontWeight: 700, color: e.group }, children: [
1117
- Math.round(I.task.progress),
1123
+ Math.round(k.task.progress),
1118
1124
  "%"
1119
1125
  ] })
1120
1126
  ] })
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 })
1127
+ ] }) : k.task.originalType === "note" ? /* @__PURE__ */ o(de, { children: [
1128
+ k.task.noteProjectTitle && /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 6, marginBottom: 4 }, children: [
1129
+ /* @__PURE__ */ t("div", { style: { width: 8, height: 8, borderRadius: 2, background: k.task.noteColor || e.note, flexShrink: 0 } }),
1130
+ /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: e.textPrimary, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: k.task.noteProjectTitle })
1125
1131
  ] }),
1126
1132
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1127
1133
  /* @__PURE__ */ o("span", { children: [
1128
1134
  R("gantt.tooltip.date", "Date"),
1129
1135
  ":"
1130
1136
  ] }),
1131
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(I.task.start) })
1137
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: Q(k.task.start) })
1132
1138
  ] }),
1133
- (I.task.filesCount || 0) > 0 && /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1139
+ (k.task.filesCount || 0) > 0 && /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1134
1140
  /* @__PURE__ */ o("span", { children: [
1135
1141
  R("gantt.tooltip.attachments", "Attachments"),
1136
1142
  ":"
1137
1143
  ] }),
1138
1144
  /* @__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
1145
+ /* @__PURE__ */ t(Fe, { size: 10 }),
1146
+ k.task.filesCount
1141
1147
  ] })
1142
1148
  ] })
1143
1149
  ] }) : /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
@@ -1145,7 +1151,7 @@ function wt() {
1145
1151
  R("charts.gantt.start", "Start"),
1146
1152
  ":"
1147
1153
  ] }),
1148
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(I.task.start) })
1154
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: Q(k.task.start) })
1149
1155
  ] }) })
1150
1156
  ]
1151
1157
  }
@@ -1155,25 +1161,25 @@ function wt() {
1155
1161
  }
1156
1162
  ),
1157
1163
  Y.task && Y.isOpen && (() => {
1158
- const m = Y.task, a = (n.dependencies || []).filter((z) => z.predecessorId === m.id || z.successorId === m.id), d = { FS: R("gantt.depType.fs", "Finish to Start"), SS: R("gantt.depType.ss", "Start to Start"), FF: R("gantt.depType.ff", "Finish to Finish"), SF: R("gantt.depType.sf", "Start to Finish") }, v = a.length > 0 ? 300 : 220, W = Math.min(Y.position.x, window.innerWidth - v - 16), L = Y.position.y + 8;
1164
+ const m = Y.task, a = (n.dependencies || []).filter((W) => W.predecessorId === m.id || W.successorId === m.id), d = { FS: R("gantt.depType.fs", "Finish to Start"), SS: R("gantt.depType.ss", "Start to Start"), FF: R("gantt.depType.ff", "Finish to Finish"), SF: R("gantt.depType.sf", "Start to Finish") }, v = a.length > 0 ? 300 : 220, z = Math.min(Y.position.x, window.innerWidth - v - 16), L = Y.position.y + 8;
1159
1165
  return /* @__PURE__ */ o(
1160
1166
  "div",
1161
1167
  {
1162
1168
  "data-popup": "gantt-action",
1163
- style: { position: "fixed", left: W, top: L, zIndex: 9999, background: "#fff", borderRadius: 4, boxShadow: "0 12px 40px rgba(0,0,0,0.14), 0 3px 10px rgba(0,0,0,0.07)", border: `1.5px solid ${e.borderLight}`, width: v, overflow: "hidden" },
1164
- onMouseDown: (z) => z.stopPropagation(),
1169
+ style: { position: "fixed", left: z, top: L, zIndex: 9999, background: "#fff", borderRadius: 4, boxShadow: "0 12px 40px rgba(0,0,0,0.14), 0 3px 10px rgba(0,0,0,0.07)", border: `1.5px solid ${e.borderLight}`, width: v, overflow: "hidden" },
1170
+ onMouseDown: (W) => W.stopPropagation(),
1165
1171
  children: [
1166
1172
  /* @__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
1173
  /* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: 2, padding: "8px 6px" }, children: [
1168
1174
  /* @__PURE__ */ o("button", { onClick: () => {
1169
- be?.(We(m)), ue();
1175
+ me?.(ze(m)), ue();
1170
1176
  }, className: "zg-popup-btn", children: [
1171
1177
  /* @__PURE__ */ t(it, { size: 15 }),
1172
1178
  " ",
1173
1179
  /* @__PURE__ */ t("span", { children: R("gantt.popup.viewDetails", "View details") })
1174
1180
  ] }),
1175
1181
  /* @__PURE__ */ o("button", { onClick: () => {
1176
- De?.(We(m)), ue();
1182
+ De?.(ze(m)), ue();
1177
1183
  }, className: "zg-popup-btn", children: [
1178
1184
  /* @__PURE__ */ t(at, { size: 15 }),
1179
1185
  " ",
@@ -1194,26 +1200,26 @@ function wt() {
1194
1200
  a.length,
1195
1201
  ")"
1196
1202
  ] }),
1197
- /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 5 }, children: a.map((z) => {
1198
- const X = z.predecessorId === m.id, ce = X ? z.successorName : z.predecessorName, U = B === z.id;
1203
+ /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 5 }, children: a.map((W) => {
1204
+ const O = W.predecessorId === m.id, ce = O ? W.successorName : W.predecessorName, U = B === W.id;
1199
1205
  return /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 8, padding: "6px 8px", borderRadius: 8, background: "#f8fafb", border: `1px solid ${e.borderLight}` }, children: [
1200
1206
  /* @__PURE__ */ o("div", { style: { flex: 1, minWidth: 0 }, children: [
1201
1207
  /* @__PURE__ */ o("div", { style: { fontSize: 10, fontWeight: 700, color: e.group, marginBottom: 2 }, children: [
1202
- /* @__PURE__ */ t("span", { style: { background: `${e.group}15`, borderRadius: 4, padding: "1px 5px" }, children: z.type }),
1208
+ /* @__PURE__ */ t("span", { style: { background: `${e.group}15`, borderRadius: 4, padding: "1px 5px" }, children: W.type }),
1203
1209
  " ",
1204
- /* @__PURE__ */ t("span", { style: { color: e.textSecondary, fontWeight: 500 }, children: X ? "→ " : "← " }),
1205
- /* @__PURE__ */ t("span", { style: { color: e.textMuted, fontWeight: 400, fontSize: 9 }, children: d[z.type] ?? z.type })
1210
+ /* @__PURE__ */ t("span", { style: { color: e.textSecondary, fontWeight: 500 }, children: O ? "→ " : "← " }),
1211
+ /* @__PURE__ */ t("span", { style: { color: e.textMuted, fontWeight: 400, fontSize: 9 }, children: d[W.type] ?? W.type })
1206
1212
  ] }),
1207
1213
  /* @__PURE__ */ t("div", { style: { fontSize: 11, color: e.textPrimary, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, title: ce, children: ce })
1208
1214
  ] }),
1209
- O && /* @__PURE__ */ t(
1215
+ X && /* @__PURE__ */ t(
1210
1216
  "button",
1211
1217
  {
1212
1218
  disabled: !!U,
1213
1219
  onClick: async () => {
1214
- r(z.id);
1220
+ r(W.id);
1215
1221
  try {
1216
- await O(z.id);
1222
+ await X(W.id);
1217
1223
  } finally {
1218
1224
  r(null);
1219
1225
  }
@@ -1222,7 +1228,7 @@ function wt() {
1222
1228
  children: U ? "⟳" : "🗑"
1223
1229
  }
1224
1230
  )
1225
- ] }, z.id);
1231
+ ] }, W.id);
1226
1232
  }) })
1227
1233
  ] })
1228
1234
  ]
@@ -1250,20 +1256,20 @@ function wt() {
1250
1256
  /* @__PURE__ */ t("div", { style: { padding: "9px 13px 8px", borderBottom: `1px solid ${e.borderLight}`, background: e.headerBg }, children: /* @__PURE__ */ o("p", { style: { margin: 0, fontSize: 10, fontWeight: 700, color: e.textSecondary, textTransform: "uppercase", letterSpacing: "0.08em" }, children: [
1251
1257
  R("gantt.chart.addOn", "Add on"),
1252
1258
  " ",
1253
- ne(i.date)
1259
+ Q(i.date)
1254
1260
  ] }) }),
1255
1261
  /* @__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);
1262
+ { label: R("gantt.newAction.step", "Step"), icon: ve("step", 0), action: () => {
1263
+ Re?.(i.date, i.projectId), I(null);
1258
1264
  } },
1259
- { label: R("gantt.newAction.milestone", "Milestone"), icon: me("milestone"), action: () => {
1260
- Re?.(i.date, i.projectId), T(null);
1265
+ { label: R("gantt.newAction.milestone", "Milestone"), icon: ve("milestone"), action: () => {
1266
+ Ce?.(i.date, i.projectId), I(null);
1261
1267
  } },
1262
- { label: R("gantt.newAction.event", "Event"), icon: me("event"), action: () => {
1263
- Ce?.(i.date, i.projectId), T(null);
1268
+ { label: R("gantt.newAction.event", "Event"), icon: ve("event"), action: () => {
1269
+ Ee?.(i.date, i.projectId), I(null);
1264
1270
  } },
1265
- { label: R("gantt.newAction.note", "Note"), icon: me("note"), action: () => {
1266
- $e?.(i.date, i.projectId), T(null);
1271
+ { label: R("gantt.newAction.note", "Note"), icon: ve("note"), action: () => {
1272
+ $e?.(i.date, i.projectId), I(null);
1267
1273
  } }
1268
1274
  ].map((m) => /* @__PURE__ */ o(
1269
1275
  "button",
@@ -1282,9 +1288,9 @@ function wt() {
1282
1288
  ]
1283
1289
  }
1284
1290
  ),
1285
- w && /* @__PURE__ */ o("svg", { style: { position: "fixed", inset: 0, width: "100vw", height: "100vh", pointerEvents: "none", zIndex: 99999 }, children: [
1291
+ x && /* @__PURE__ */ o("svg", { style: { position: "fixed", inset: 0, width: "100vw", height: "100vh", pointerEvents: "none", zIndex: 99999 }, children: [
1286
1292
  /* @__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
- /* @__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" } })
1293
+ /* @__PURE__ */ t("line", { x1: x.fromScreenX, y1: x.fromScreenY, x2: x.currentScreenX, y2: x.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
1294
  ] }),
1289
1295
  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: [
1290
1296
  /* @__PURE__ */ o("div", { style: { marginBottom: 20 }, children: [
@@ -1296,8 +1302,8 @@ function wt() {
1296
1302
  { type: "SS", label: R("gantt.depModal.ss", "Start to Start"), desc: R("gantt.depModal.ssDesc", "A and B start together") },
1297
1303
  { type: "FF", label: R("gantt.depModal.ff", "Finish to Finish"), desc: R("gantt.depModal.ffDesc", "A and B finish together") },
1298
1304
  { type: "SF", label: R("gantt.depModal.sf", "Start to Finish"), desc: R("gantt.depModal.sfDesc", "B finishes when A starts") }
1299
- ].map((m) => /* @__PURE__ */ o("button", { onClick: () => $(m.type), style: { border: u === m.type ? `2px solid ${e.group}` : `1.5px solid ${e.borderLight}`, borderRadius: 12, padding: "12px 14px", textAlign: "left", cursor: "pointer", background: u === m.type ? `${e.group}0d` : "#fafafa" }, children: [
1300
- /* @__PURE__ */ t("div", { style: { fontSize: 11, fontFamily: "monospace", fontWeight: 700, color: e.group, marginBottom: 4, background: u === m.type ? `${e.group}20` : `${e.group}0d`, borderRadius: 6, padding: "2px 6px", display: "inline-block" }, children: m.type }),
1305
+ ].map((m) => /* @__PURE__ */ o("button", { onClick: () => E(m.type), style: { border: f === m.type ? `2px solid ${e.group}` : `1.5px solid ${e.borderLight}`, borderRadius: 12, padding: "12px 14px", textAlign: "left", cursor: "pointer", background: f === m.type ? `${e.group}0d` : "#fafafa" }, children: [
1306
+ /* @__PURE__ */ t("div", { style: { fontSize: 11, fontFamily: "monospace", fontWeight: 700, color: e.group, marginBottom: 4, background: f === m.type ? `${e.group}20` : `${e.group}0d`, borderRadius: 6, padding: "2px 6px", display: "inline-block" }, children: m.type }),
1301
1307
  /* @__PURE__ */ t("div", { style: { fontSize: 13, fontWeight: 600, color: e.textTitle, marginBottom: 2 }, children: m.label }),
1302
1308
  /* @__PURE__ */ t("div", { style: { fontSize: 11, color: e.textSecondary }, children: m.desc })
1303
1309
  ] }, m.type)) }),
@@ -1307,155 +1313,155 @@ function wt() {
1307
1313
  ] }),
1308
1314
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "flex-end", gap: 12 }, children: [
1309
1315
  /* @__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") })
1316
+ /* @__PURE__ */ t("button", { onClick: Me, 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
1317
  ] })
1312
1318
  ] }) })
1313
1319
  ] });
1314
1320
  }
1315
1321
  function St(n) {
1316
- const c = pe(null), p = pe(null), D = pe(null), h = pe(!1), x = J(() => {
1322
+ const c = pe(null), p = pe(null), T = pe(null), h = pe(!1), w = J(() => {
1317
1323
  if (h.current) return;
1318
1324
  h.current = !0;
1319
- const u = p.current;
1320
- u && c.current && (c.current.scrollTop = u.scrollTop), u && D.current && (D.current.scrollLeft = u.scrollLeft), h.current = !1;
1321
- }, []), w = J(() => {
1325
+ const f = p.current;
1326
+ f && c.current && (c.current.scrollTop = f.scrollTop), f && T.current && (T.current.scrollLeft = f.scrollLeft), h.current = !1;
1327
+ }, []), x = J(() => {
1322
1328
  h.current || (h.current = !0, c.current && p.current && (p.current.scrollTop = c.current.scrollTop), h.current = !1);
1323
1329
  }, []), C = pe(!1);
1324
1330
  ge(() => {
1325
1331
  if (C.current || !n.totalWidth) return;
1326
- const u = p.current;
1327
- if (!u) return;
1328
- const $ = se(/* @__PURE__ */ new Date(), n);
1329
- if ($ >= 0 && $ <= n.totalWidth) {
1330
- const b = $ - u.clientWidth / 2;
1331
- u.scrollLeft = Math.max(0, b), D.current && (D.current.scrollLeft = u.scrollLeft), C.current = !0;
1332
+ const f = p.current;
1333
+ if (!f) return;
1334
+ const E = se(/* @__PURE__ */ new Date(), n);
1335
+ if (E >= 0 && E <= n.totalWidth) {
1336
+ const b = E - f.clientWidth / 2;
1337
+ f.scrollLeft = Math.max(0, b), T.current && (T.current.scrollLeft = f.scrollLeft), C.current = !0;
1332
1338
  }
1333
1339
  }, [n]);
1334
- const M = J((u) => {
1335
- const $ = p.current;
1336
- if ($)
1337
- if (u.preventDefault(), u.shiftKey || Math.abs(u.deltaX) > Math.abs(u.deltaY)) {
1338
- const b = u.shiftKey ? u.deltaY : u.deltaX;
1339
- $.scrollLeft += b, D.current && (D.current.scrollLeft = $.scrollLeft);
1340
+ const M = J((f) => {
1341
+ const E = p.current;
1342
+ if (E)
1343
+ if (f.preventDefault(), f.shiftKey || Math.abs(f.deltaX) > Math.abs(f.deltaY)) {
1344
+ const b = f.shiftKey ? f.deltaY : f.deltaX;
1345
+ E.scrollLeft += b, T.current && (T.current.scrollLeft = E.scrollLeft);
1340
1346
  } else
1341
- $.scrollTop += u.deltaY, c.current && (c.current.scrollTop = $.scrollTop);
1347
+ E.scrollTop += f.deltaY, c.current && (c.current.scrollTop = E.scrollTop);
1342
1348
  }, []);
1343
1349
  return {
1344
1350
  leftBodyRef: c,
1345
1351
  rightBodyRef: p,
1346
- timeHeaderRef: D,
1347
- handleRightScroll: x,
1348
- handleLeftScroll: w,
1352
+ timeHeaderRef: T,
1353
+ handleRightScroll: w,
1354
+ handleLeftScroll: x,
1349
1355
  handleChartWheel: M
1350
1356
  };
1351
1357
  }
1352
- function kt(n, c, p, D) {
1358
+ function kt(n, c, p, T) {
1353
1359
  const h = /* @__PURE__ */ new Map();
1354
- return n.forEach((x) => h.set(x.id, x)), c.map((x) => {
1355
- const w = h.get(x.predecessorId), C = h.get(x.successorId);
1356
- 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}`;
1360
- return { predId: w.id, succId: C.id, path: l, headX: B - 6, headY: r };
1360
+ return n.forEach((w) => h.set(w.id, w)), c.map((w) => {
1361
+ const x = h.get(w.predecessorId), C = h.get(w.successorId);
1362
+ if (!x || !C) return null;
1363
+ const M = T.get(x.id), f = T.get(C.id);
1364
+ if (M == null || f == null) return null;
1365
+ const E = x.originalType !== "step", b = C.originalType !== "step", F = E ? se(x.start, p) + Le : se(x.end, p), S = M * _ + _ / 2, B = b ? se(C.start, p) - 10 : se(C.start, p), r = f * _ + _ / 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}`;
1366
+ return { predId: x.id, succId: C.id, path: l, headX: B - 6, headY: r };
1361
1367
  }).filter(Boolean);
1362
1368
  }
1363
1369
  function It(n, c) {
1364
1370
  if (n.length === 0 || c.length === 0) return /* @__PURE__ */ new Set();
1365
1371
  const p = /* @__PURE__ */ new Map();
1366
1372
  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));
1373
+ const T = new Set(n.map((l) => l.id)), h = c.filter((l) => T.has(l.predecessorId) && T.has(l.successorId));
1368
1374
  if (h.length === 0) return /* @__PURE__ */ new Set();
1369
- const x = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
1375
+ const w = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
1370
1376
  h.forEach((l) => {
1371
- 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);
1377
+ w.has(l.predecessorId) || w.set(l.predecessorId, []), w.get(l.predecessorId).push(l.successorId), x.has(l.successorId) || x.set(l.successorId, []), x.get(l.successorId).push(l.predecessorId);
1372
1378
  });
1373
- const C = (l) => Math.max(1, fe(l.start, l.end)), M = /* @__PURE__ */ new Set(), u = [];
1374
- function $(l) {
1375
- M.has(l) || (M.add(l), (x.get(l) || []).forEach($), u.unshift(l));
1379
+ const C = (l) => Math.max(1, ye(l.start, l.end)), M = /* @__PURE__ */ new Set(), f = [];
1380
+ function E(l) {
1381
+ M.has(l) || (M.add(l), (w.get(l) || []).forEach(E), f.unshift(l));
1376
1382
  }
1377
- n.forEach((l) => $(l.id));
1383
+ n.forEach((l) => E(l.id));
1378
1384
  const b = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map();
1379
- for (const l of u) {
1380
- 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;
1384
- b.set(l, s), F.set(l, s + C(E));
1385
+ for (const l of f) {
1386
+ const $ = p.get(l), u = x.get(l) || [];
1387
+ let D = 0;
1388
+ for (const y of u) D = Math.max(D, F.get(y) || 0);
1389
+ const s = u.length > 0 ? D : 0;
1390
+ b.set(l, s), F.set(l, s + C($));
1385
1391
  }
1386
1392
  let S = 0;
1387
1393
  F.forEach((l) => {
1388
1394
  l > S && (S = l);
1389
1395
  });
1390
1396
  const B = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
1391
- for (let l = u.length - 1; l >= 0; l--) {
1392
- const E = u[l], f = p.get(E), k = x.get(E) || [];
1397
+ for (let l = f.length - 1; l >= 0; l--) {
1398
+ const $ = f[l], u = p.get($), D = w.get($) || [];
1393
1399
  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));
1400
+ for (const y of D) s = Math.min(s, B.get(y) ?? S);
1401
+ r.set($, D.length > 0 ? s : S), B.set($, (r.get($) || 0) - C(u));
1396
1402
  }
1397
1403
  const i = /* @__PURE__ */ new Set();
1398
1404
  h.forEach((l) => {
1399
1405
  i.add(l.predecessorId), i.add(l.successorId);
1400
1406
  });
1401
- const T = /* @__PURE__ */ new Set();
1402
- for (const l of u) {
1407
+ const I = /* @__PURE__ */ new Set();
1408
+ for (const l of f) {
1403
1409
  if (!i.has(l)) continue;
1404
- const E = (B.get(l) || 0) - (b.get(l) || 0);
1405
- Math.abs(E) < 0.5 && T.add(l);
1410
+ const $ = (B.get(l) || 0) - (b.get(l) || 0);
1411
+ Math.abs($) < 0.5 && I.add(l);
1406
1412
  }
1407
- return T;
1413
+ return I;
1408
1414
  }
1409
1415
  function Tt({
1410
1416
  steps: n,
1411
1417
  milestones: c,
1412
1418
  events: p,
1413
- notes: D,
1419
+ notes: T,
1414
1420
  dependencies: h,
1415
- viewMode: x,
1416
- locale: w,
1421
+ viewMode: w,
1422
+ locale: x,
1417
1423
  groupByProject: C,
1418
1424
  visibleTypes: M,
1419
- collapsedGroups: u,
1420
- collapsedProjects: $,
1425
+ collapsedGroups: f,
1426
+ collapsedProjects: E,
1421
1427
  selectedTaskId: b
1422
1428
  }) {
1423
1429
  const F = ae(() => {
1424
- const f = [];
1425
- let k = 0;
1430
+ const u = [];
1431
+ let D = 0;
1426
1432
  return n.forEach((s) => {
1427
1433
  const y = !!(s.startDate && s.finishDate), N = s.startDate || s.previsionStartDate, A = s.finishDate || s.previsionFinishDate;
1428
1434
  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);
1435
+ const ee = new Date(N), k = new Date(A);
1436
+ if (isNaN(ee.getTime()) || isNaN(k.getTime())) return;
1437
+ k <= ee && k.setDate(k.getDate() + 1);
1432
1438
  let g, Y;
1433
1439
  if (s.previsionStartDate && s.previsionFinishDate) {
1434
- const G = new Date(s.previsionStartDate), ie = new Date(s.previsionFinishDate);
1435
- !isNaN(G.getTime()) && !isNaN(ie.getTime()) && (g = G, Y = ie <= G ? Q(G, 1) : ie);
1440
+ const H = new Date(s.previsionStartDate), ie = new Date(s.previsionFinishDate);
1441
+ !isNaN(H.getTime()) && !isNaN(ie.getTime()) && (g = H, Y = ie <= H ? Z(H, 1) : ie);
1436
1442
  }
1437
- const H = h?.filter((G) => G.successorId === s.id).map((G) => G.predecessorId) || [], q = s.conclusionPercent != null ? Number(s.conclusionPercent) : 0;
1438
- f.push({
1443
+ const V = h?.filter((H) => H.successorId === s.id).map((H) => H.predecessorId) || [], q = s.conclusionPercent != null ? Number(s.conclusionPercent) : 0;
1444
+ u.push({
1439
1445
  id: s.id,
1440
1446
  name: s.name,
1441
- start: Z,
1442
- end: I,
1447
+ start: ee,
1448
+ end: k,
1443
1449
  progress: q > 1 ? Math.min(q, 100) : q * 100,
1444
1450
  originalType: "step",
1445
- deps: H,
1446
- colorIdx: k % oe.length,
1451
+ deps: V,
1452
+ colorIdx: D % oe.length,
1447
1453
  previsionStart: g,
1448
1454
  previsionEnd: Y,
1449
1455
  hasActualDates: y,
1450
1456
  projectId: s.projectId || void 0,
1451
1457
  projectTitle: s.projectTitle || void 0
1452
- }), k++;
1458
+ }), D++;
1453
1459
  }), c?.forEach((s) => {
1454
1460
  if (!s.date) return;
1455
1461
  const y = new Date(s.date);
1456
1462
  if (isNaN(y.getTime())) return;
1457
1463
  const N = h?.filter((A) => A.successorId === s.id).map((A) => A.predecessorId) || [];
1458
- f.push({
1464
+ u.push({
1459
1465
  id: s.id,
1460
1466
  name: s.name,
1461
1467
  start: y,
@@ -1471,7 +1477,7 @@ function Tt({
1471
1477
  const y = new Date(s.date);
1472
1478
  if (isNaN(y.getTime())) return;
1473
1479
  const N = h?.filter((A) => A.successorId === s.id).map((A) => A.predecessorId) || [];
1474
- f.push({
1480
+ u.push({
1475
1481
  id: s.id,
1476
1482
  name: s.title,
1477
1483
  start: y,
@@ -1482,10 +1488,10 @@ function Tt({
1482
1488
  projectId: s.projectId || void 0,
1483
1489
  projectTitle: s.projectTitle || void 0
1484
1490
  });
1485
- }), D?.forEach((s) => {
1491
+ }), T?.forEach((s) => {
1486
1492
  if (!s.date) return;
1487
1493
  const y = new Date(s.date);
1488
- isNaN(y.getTime()) || f.push({
1494
+ isNaN(y.getTime()) || u.push({
1489
1495
  id: s.id,
1490
1496
  name: s.title || "Note",
1491
1497
  start: y,
@@ -1500,58 +1506,58 @@ function Tt({
1500
1506
  projectId: s.projectId || void 0,
1501
1507
  projectTitle: s.projectTitle || void 0
1502
1508
  });
1503
- }), 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"];
1509
+ }), u;
1510
+ }, [n, c, p, T, h]), S = ae(() => bt(F, w, x), [F, w, x]), B = ae(() => {
1511
+ const u = [], D = ["step", "milestone", "event", "note"];
1506
1512
  if (C) {
1507
1513
  const s = /* @__PURE__ */ new Map();
1508
1514
  F.forEach((y) => {
1509
1515
  y.projectId && !s.has(y.projectId) && s.set(y.projectId, y.projectTitle || y.projectId);
1510
1516
  });
1511
1517
  for (const [y, N] of Array.from(s.entries())) {
1512
- const A = $.has(y);
1513
- 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);
1518
+ const A = E.has(y);
1519
+ if (u.push({ kind: "projectHeader", projectId: y, projectTitle: N, collapsed: A }), !A) {
1520
+ const ee = F.filter((k) => k.projectId === y);
1521
+ for (const k of D) {
1522
+ if (!M.has(k)) continue;
1523
+ const g = ee.filter((q) => q.originalType === k);
1518
1524
  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 }));
1525
+ const Y = `${y}-${k}`, V = f.has(Y);
1526
+ u.push({ kind: "group", groupType: k, label: Ne[k], count: g.length, collapsed: V, projectId: y }), V || g.forEach((q) => u.push({ kind: "task", task: q }));
1521
1527
  }
1522
1528
  }
1523
1529
  }
1524
1530
  } else
1525
- for (const s of k) {
1531
+ for (const s of D) {
1526
1532
  if (!M.has(s)) continue;
1527
1533
  const y = F.filter((A) => A.originalType === s);
1528
1534
  if (y.length === 0) continue;
1529
- 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 }));
1535
+ const N = f.has(s);
1536
+ u.push({ kind: "group", groupType: s, label: Ne[s], count: y.length, collapsed: N }), N || y.forEach((A) => u.push({ kind: "task", task: A }));
1531
1537
  }
1532
- return f;
1533
- }, [F, M, u, $, C]), r = ae(() => {
1534
- const f = /* @__PURE__ */ new Map();
1535
- return B.forEach((k, s) => {
1536
- k.kind === "task" && f.set(k.task.id, s);
1537
- }), f;
1538
+ return u;
1539
+ }, [F, M, f, E, C]), r = ae(() => {
1540
+ const u = /* @__PURE__ */ new Map();
1541
+ return B.forEach((D, s) => {
1542
+ D.kind === "task" && u.set(D.task.id, s);
1543
+ }), u;
1538
1544
  }, [B]), i = ae(
1539
1545
  () => kt(F, h || [], S, r),
1540
1546
  [F, h, S, r]
1541
- ), T = ae(() => It(F, h || []), [F, h]), l = ae(() => {
1542
- const f = /* @__PURE__ */ new Set(), k = /* @__PURE__ */ new Date();
1547
+ ), I = ae(() => It(F, h || []), [F, h]), l = ae(() => {
1548
+ const u = /* @__PURE__ */ new Set(), D = /* @__PURE__ */ new Date();
1543
1549
  return F.forEach((s) => {
1544
- s.originalType === "step" && s.end < k && s.progress < 100 && f.add(s.id);
1545
- }), f;
1546
- }, [F]), E = ae(() => {
1550
+ s.originalType === "step" && s.end < D && s.progress < 100 && u.add(s.id);
1551
+ }), u;
1552
+ }, [F]), $ = ae(() => {
1547
1553
  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();
1554
+ const u = /* @__PURE__ */ new Set(), D = [b];
1555
+ for (; D.length; ) {
1556
+ const s = D.shift();
1551
1557
  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));
1558
+ y.predecessorId === s && !u.has(y.successorId) && (u.add(y.successorId), D.push(y.successorId)), y.successorId === s && !u.has(y.predecessorId) && (u.add(y.predecessorId), D.push(y.predecessorId));
1553
1559
  }
1554
- return f;
1560
+ return u;
1555
1561
  }, [b, h]);
1556
1562
  return {
1557
1563
  tasks: F,
@@ -1559,28 +1565,28 @@ function Tt({
1559
1565
  displayRows: B,
1560
1566
  taskRowIndex: r,
1561
1567
  arrows: i,
1562
- criticalIds: T,
1568
+ criticalIds: I,
1563
1569
  delayedIds: l,
1564
- relatedIds: E
1570
+ relatedIds: $
1565
1571
  };
1566
1572
  }
1567
- function Et(n) {
1568
- const [c, p] = P("day"), [D, h] = P(null), [x, w] = P(null), [C, M] = P(null), [u, $] = P({
1573
+ function $t(n) {
1574
+ const [c, p] = P("day"), [T, h] = P(null), [w, x] = P(null), [C, M] = P(null), [f, E] = P({
1569
1575
  isOpen: !1,
1570
1576
  position: { x: 0, y: 0 },
1571
1577
  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) => {
1578
+ }), [b, F] = P(null), [S, B] = P(null), [r, i] = P(null), [I, l] = P(null), [$, u] = P("FS"), [D, s] = P(0), [y, N] = P(!1), [A, ee] = P(null), [k, g] = P(null), [Y, V] = P(!1), q = pe(null), [H, ie] = P(/* @__PURE__ */ new Set(["step", "milestone", "event", "note"])), [xe, Te] = P(/* @__PURE__ */ new Set()), [be, Me] = P(/* @__PURE__ */ new Set()), le = J((a) => {
1573
1579
  ie((d) => {
1574
1580
  const v = new Set(d);
1575
1581
  return v.has(a) ? v.delete(a) : v.add(a), v;
1576
1582
  });
1577
- }, []), be = J((a) => {
1578
- Ie((d) => {
1583
+ }, []), me = J((a) => {
1584
+ Te((d) => {
1579
1585
  const v = new Set(d);
1580
1586
  return v.has(a) ? v.delete(a) : v.add(a), v;
1581
1587
  });
1582
1588
  }, []), De = J((a) => {
1583
- Te((d) => {
1589
+ Me((d) => {
1584
1590
  const v = new Set(d);
1585
1591
  return v.has(a) ? v.delete(a) : v.add(a), v;
1586
1592
  });
@@ -1592,40 +1598,40 @@ function Et(n) {
1592
1598
  dependencies: n.dependencies,
1593
1599
  viewMode: c,
1594
1600
  locale: n.locale,
1595
- visibleTypes: G,
1596
- collapsedGroups: ye,
1597
- collapsedProjects: xe,
1601
+ visibleTypes: H,
1602
+ collapsedGroups: xe,
1603
+ collapsedProjects: be,
1598
1604
  groupByProject: n.groupByProject,
1599
- selectedTaskId: x || null
1600
- }), O = St(j.timeline), Me = J((a, d) => {
1605
+ selectedTaskId: w || null
1606
+ }), X = St(j.timeline), Re = J((a, d) => {
1601
1607
  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
1608
  }, []), Ce = J((a, d, v) => {
1609
+ a.preventDefault(), a.stopPropagation(), B({ task: d, edge: v, startMouseX: a.clientX, originalStart: new Date(d.start), originalEnd: new Date(d.end), offsetDays: 0 });
1610
+ }, []), Ee = J((a, d, v) => {
1605
1611
  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
1612
  }, []), $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);
1613
+ if (!I || !n.onCreateDependency) return;
1614
+ const a = new Map(j.tasks.map((O) => [O.id, O])), d = a.get(I.fromTaskId), v = a.get(I.toTaskId);
1609
1615
  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;
1616
+ const z = (O) => O.originalType === "step" ? "STEP" : "MILESTONE", L = I.fromEdge === "right" ? d : v, W = I.fromEdge === "right" ? v : d;
1611
1617
  N(!0);
1612
1618
  try {
1613
- await n.onCreateDependency({ predecessorId: L.id, predecessorType: W(L), successorId: z.id, successorType: W(z), type: E, lag: k }), l(null);
1619
+ await n.onCreateDependency({ predecessorId: L.id, predecessorType: z(L), successorId: W.id, successorType: z(W), type: $, lag: D }), l(null);
1614
1620
  } finally {
1615
1621
  N(!1);
1616
1622
  }
1617
- }, [T, j.tasks, n.onCreateDependency, E, k]);
1623
+ }, [I, j.tasks, n.onCreateDependency, $, D]);
1618
1624
  ge(() => {
1619
1625
  if (!b) return;
1620
1626
  const a = (v) => {
1621
- const W = v.clientX - b.startMouseX, L = Math.round(W / j.timeline.dayWidth);
1622
- L !== b.offsetDays && F((z) => z ? { ...z, offsetDays: L } : null);
1627
+ const z = v.clientX - b.startMouseX, L = Math.round(z / j.timeline.dayWidth);
1628
+ L !== b.offsetDays && F((W) => W ? { ...W, offsetDays: L } : null);
1623
1629
  }, d = () => {
1624
1630
  b.offsetDays !== 0 && n.onTaskChange && n.onTaskChange({
1625
1631
  id: b.task.id,
1626
1632
  name: b.task.name,
1627
- start: Q(b.originalStart, b.offsetDays),
1628
- end: Q(b.originalEnd, b.offsetDays),
1633
+ start: Z(b.originalStart, b.offsetDays),
1634
+ end: Z(b.originalEnd, b.offsetDays),
1629
1635
  type: b.task.originalType === "step" ? "task" : "milestone",
1630
1636
  progress: b.task.progress
1631
1637
  }), F(null);
@@ -1636,12 +1642,12 @@ function Et(n) {
1636
1642
  }, [b, j.timeline.dayWidth, n.onTaskChange]), ge(() => {
1637
1643
  if (!S) return;
1638
1644
  const a = (v) => {
1639
- const W = v.clientX - S.startMouseX, L = Math.round(W / j.timeline.dayWidth);
1640
- L !== S.offsetDays && B((z) => z ? { ...z, offsetDays: L } : null);
1645
+ const z = v.clientX - S.startMouseX, L = Math.round(z / j.timeline.dayWidth);
1646
+ L !== S.offsetDays && B((W) => W ? { ...W, offsetDays: L } : null);
1641
1647
  }, d = () => {
1642
1648
  if (S.offsetDays !== 0 && n.onTaskChange) {
1643
- const v = S.edge === "left" ? Q(S.originalStart, S.offsetDays) : S.originalStart, W = S.edge === "right" ? Q(S.originalEnd, S.offsetDays) : S.originalEnd;
1644
- W > v && n.onTaskChange({ id: S.task.id, name: S.task.name, start: v, end: W, type: "task", progress: S.task.progress });
1649
+ const v = S.edge === "left" ? Z(S.originalStart, S.offsetDays) : S.originalStart, z = S.edge === "right" ? Z(S.originalEnd, S.offsetDays) : S.originalEnd;
1650
+ z > v && n.onTaskChange({ id: S.task.id, name: S.task.name, start: v, end: z, type: "task", progress: S.task.progress });
1645
1651
  }
1646
1652
  B(null);
1647
1653
  };
@@ -1651,25 +1657,25 @@ function Et(n) {
1651
1657
  }, [S, j.timeline.dayWidth, n.onTaskChange]), ge(() => {
1652
1658
  if (!r) return;
1653
1659
  const a = (v) => {
1654
- let W = null;
1660
+ let z = null;
1655
1661
  for (const L of document.elementsFromPoint(v.clientX, v.clientY)) {
1656
- const z = L.dataset?.taskId;
1657
- if (z && z !== r.fromTaskId) {
1658
- W = z;
1662
+ const W = L.dataset?.taskId;
1663
+ if (W && W !== r.fromTaskId) {
1664
+ z = W;
1659
1665
  break;
1660
1666
  }
1661
1667
  }
1662
- i((L) => L ? { ...L, currentScreenX: v.clientX, currentScreenY: v.clientY, hoverTargetId: W } : null);
1668
+ i((L) => L ? { ...L, currentScreenX: v.clientX, currentScreenY: v.clientY, hoverTargetId: z } : null);
1663
1669
  }, d = (v) => {
1664
- let W = null;
1670
+ let z = null;
1665
1671
  for (const L of document.elementsFromPoint(v.clientX, v.clientY)) {
1666
- const z = L.dataset?.taskId;
1667
- if (z && z !== r.fromTaskId) {
1668
- W = z;
1672
+ const W = L.dataset?.taskId;
1673
+ if (W && W !== r.fromTaskId) {
1674
+ z = W;
1669
1675
  break;
1670
1676
  }
1671
1677
  }
1672
- W && n.onCreateDependency && (l({ fromTaskId: r.fromTaskId, fromEdge: r.fromEdge, toTaskId: W }), f("FS"), s(0)), i(null);
1678
+ z && n.onCreateDependency && (l({ fromTaskId: r.fromTaskId, fromEdge: r.fromEdge, toTaskId: z }), u("FS"), s(0)), i(null);
1673
1679
  };
1674
1680
  return document.addEventListener("mousemove", a), document.addEventListener("mouseup", d), () => {
1675
1681
  document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", d);
@@ -1677,93 +1683,93 @@ function Et(n) {
1677
1683
  }, [r?.fromTaskId, r?.fromEdge, n.onCreateDependency]);
1678
1684
  const [R, he] = P(null), re = J((a) => {
1679
1685
  if (S || b || a.button === 2) return;
1680
- const d = O.rightBodyRef.current;
1686
+ const d = X.rightBodyRef.current;
1681
1687
  d && (a.preventDefault(), he({ startX: a.clientX, startY: a.clientY, scrollLeft: d.scrollLeft, scrollTop: d.scrollTop }));
1682
- }, [S, b, O.rightBodyRef]);
1688
+ }, [S, b, X.rightBodyRef]);
1683
1689
  ge(() => {
1684
1690
  if (!R) return;
1685
1691
  const a = (v) => {
1686
- const W = O.rightBodyRef.current;
1687
- W && (W.scrollLeft = R.scrollLeft - (v.clientX - R.startX), W.scrollTop = R.scrollTop - (v.clientY - R.startY), O.leftBodyRef.current && (O.leftBodyRef.current.scrollTop = W.scrollTop), O.timeHeaderRef.current && (O.timeHeaderRef.current.scrollLeft = W.scrollLeft));
1692
+ const z = X.rightBodyRef.current;
1693
+ z && (z.scrollLeft = R.scrollLeft - (v.clientX - R.startX), z.scrollTop = R.scrollTop - (v.clientY - R.startY), X.leftBodyRef.current && (X.leftBodyRef.current.scrollTop = z.scrollTop), X.timeHeaderRef.current && (X.timeHeaderRef.current.scrollLeft = z.scrollLeft));
1688
1694
  }, d = () => he(null);
1689
1695
  return document.addEventListener("mousemove", a), document.addEventListener("mouseup", d), () => {
1690
1696
  document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", d);
1691
1697
  };
1692
- }, [R, O.rightBodyRef, O.leftBodyRef, O.timeHeaderRef]);
1698
+ }, [R, X.rightBodyRef, X.leftBodyRef, X.timeHeaderRef]);
1693
1699
  const ue = J((a) => {
1694
1700
  a.preventDefault(), a.stopPropagation();
1695
- const d = (W) => {
1696
- const L = O.rightBodyRef.current;
1701
+ const d = (z) => {
1702
+ const L = X.rightBodyRef.current;
1697
1703
  if (!L) return /* @__PURE__ */ new Date();
1698
- const z = L.getBoundingClientRect(), X = W - z.left + L.scrollLeft;
1699
- return Q(j.timeline.start, Math.max(0, Math.floor(X / j.timeline.dayWidth)));
1700
- }, v = (W) => {
1704
+ const W = L.getBoundingClientRect(), O = z - W.left + L.scrollLeft;
1705
+ return Z(j.timeline.start, Math.max(0, Math.floor(O / j.timeline.dayWidth)));
1706
+ }, v = (z) => {
1701
1707
  if (!n.groupByProject) return;
1702
- const L = O.leftBodyRef.current;
1708
+ const L = X.leftBodyRef.current;
1703
1709
  if (!L) return;
1704
- const z = L.getBoundingClientRect(), X = W - z.top + L.scrollTop, ce = Math.max(0, Math.floor(X / 50));
1710
+ const W = L.getBoundingClientRect(), O = z - W.top + L.scrollTop, ce = Math.max(0, Math.floor(O / 50));
1705
1711
  for (let U = Math.min(ce, j.displayRows.length - 1); U >= 0; U--) {
1706
- const ee = j.displayRows[U];
1707
- if (ee.kind === "projectHeader") return ee.projectId;
1708
- if (ee.kind === "task" && ee.task.projectId) return ee.task.projectId;
1709
- if (ee.kind === "group" && ee.projectId) return ee.projectId;
1712
+ const te = j.displayRows[U];
1713
+ if (te.kind === "projectHeader") return te.projectId;
1714
+ if (te.kind === "task" && te.task.projectId) return te.task.projectId;
1715
+ if (te.kind === "group" && te.projectId) return te.projectId;
1710
1716
  }
1711
1717
  };
1712
1718
  g({ x: a.clientX, y: a.clientY, date: d(a.clientX), projectId: v(a.clientY) }), he(null);
1713
- }, [j.timeline, j.displayRows, n.groupByProject, O.rightBodyRef, O.leftBodyRef]);
1719
+ }, [j.timeline, j.displayRows, n.groupByProject, X.rightBodyRef, X.leftBodyRef]);
1714
1720
  ge(() => {
1715
- if (!I) return;
1716
- const a = (W) => {
1717
- W.key === "Escape" && g(null);
1718
- }, d = (W) => {
1719
- W.target.closest('[data-menu="chart-create"]') || g(null);
1721
+ if (!k) return;
1722
+ const a = (z) => {
1723
+ z.key === "Escape" && g(null);
1724
+ }, d = (z) => {
1725
+ z.target.closest('[data-menu="chart-create"]') || g(null);
1720
1726
  }, v = () => g(null);
1721
1727
  return document.addEventListener("keydown", a), document.addEventListener("click", d), window.addEventListener("scroll", v, !0), () => {
1722
1728
  document.removeEventListener("keydown", a), document.removeEventListener("click", d), window.removeEventListener("scroll", v, !0);
1723
1729
  };
1724
- }, [I]);
1730
+ }, [k]);
1725
1731
  const m = ae(() => ({
1726
1732
  props: n,
1727
1733
  t: (a, d) => n.translations ? typeof n.translations == "function" ? n.translations(a, d) : n.translations[a] || d || "" : d || "",
1728
1734
  viewMode: c,
1729
1735
  setViewMode: p,
1730
- hoveredTaskId: D,
1736
+ hoveredTaskId: T,
1731
1737
  setHoveredTaskId: h,
1732
- selectedTaskId: x,
1733
- setSelectedTaskId: w,
1738
+ selectedTaskId: w,
1739
+ setSelectedTaskId: x,
1734
1740
  tooltip: C,
1735
1741
  setTooltip: M,
1736
- popupState: u,
1737
- setPopupState: $,
1742
+ popupState: f,
1743
+ setPopupState: E,
1738
1744
  dragState: b,
1739
1745
  setDragState: F,
1740
1746
  resizeState: S,
1741
1747
  setResizeState: B,
1742
1748
  connectState: r,
1743
1749
  setConnectState: i,
1744
- visibleTypes: G,
1750
+ visibleTypes: H,
1745
1751
  setVisibleTypes: ie,
1746
1752
  toggleVisibility: le,
1747
- collapsedGroups: ye,
1748
- setCollapsedGroups: Ie,
1749
- toggleGroup: be,
1750
- collapsedProjects: xe,
1751
- setCollapsedProjects: Te,
1753
+ collapsedGroups: xe,
1754
+ setCollapsedGroups: Te,
1755
+ toggleGroup: me,
1756
+ collapsedProjects: be,
1757
+ setCollapsedProjects: Me,
1752
1758
  toggleProject: De,
1753
- pendingConnection: T,
1759
+ pendingConnection: I,
1754
1760
  setPendingConnection: l,
1755
- depModalType: E,
1756
- setDepModalType: f,
1757
- depModalLag: k,
1761
+ depModalType: $,
1762
+ setDepModalType: u,
1763
+ depModalLag: D,
1758
1764
  setDepModalLag: s,
1759
1765
  depCreating: y,
1760
1766
  setDepCreating: N,
1761
1767
  deletingDepId: A,
1762
- setDeletingDepId: Z,
1763
- chartMenu: I,
1768
+ setDeletingDepId: ee,
1769
+ chartMenu: k,
1764
1770
  setChartMenu: g,
1765
1771
  newActionOpen: Y,
1766
- setNewActionOpen: H,
1772
+ setNewActionOpen: V,
1767
1773
  tasks: j.tasks,
1768
1774
  timeline: j.timeline,
1769
1775
  displayRows: j.displayRows,
@@ -1772,65 +1778,65 @@ function Et(n) {
1772
1778
  criticalIds: j.criticalIds,
1773
1779
  delayedIds: j.delayedIds,
1774
1780
  relatedIds: j.relatedIds,
1775
- ...O,
1781
+ ...X,
1776
1782
  newActionRef: q,
1777
1783
  screenXToDate: (a) => {
1778
- const d = O.rightBodyRef.current;
1784
+ const d = X.rightBodyRef.current;
1779
1785
  if (!d) return /* @__PURE__ */ new Date();
1780
- const v = d.getBoundingClientRect(), W = a - v.left + d.scrollLeft;
1781
- return Q(j.timeline.start, Math.max(0, Math.floor(W / j.timeline.dayWidth)));
1786
+ const v = d.getBoundingClientRect(), z = a - v.left + d.scrollLeft;
1787
+ return Z(j.timeline.start, Math.max(0, Math.floor(z / j.timeline.dayWidth)));
1782
1788
  },
1783
1789
  screenYToProjectId: (a) => {
1784
1790
  if (!n.groupByProject) return;
1785
- const d = O.leftBodyRef.current;
1791
+ const d = X.leftBodyRef.current;
1786
1792
  if (!d) return;
1787
- const v = d.getBoundingClientRect(), W = a - v.top + d.scrollTop, L = Math.max(0, Math.floor(W / 50));
1788
- for (let z = Math.min(L, j.displayRows.length - 1); z >= 0; z--) {
1789
- const X = j.displayRows[z];
1790
- if (X.kind === "projectHeader") return X.projectId;
1791
- if (X.kind === "task" && X.task.projectId) return X.task.projectId;
1792
- if (X.kind === "group" && X.projectId) return X.projectId;
1793
+ const v = d.getBoundingClientRect(), z = a - v.top + d.scrollTop, L = Math.max(0, Math.floor(z / 50));
1794
+ for (let W = Math.min(L, j.displayRows.length - 1); W >= 0; W--) {
1795
+ const O = j.displayRows[W];
1796
+ if (O.kind === "projectHeader") return O.projectId;
1797
+ if (O.kind === "task" && O.task.projectId) return O.task.projectId;
1798
+ if (O.kind === "group" && O.projectId) return O.projectId;
1793
1799
  }
1794
1800
  },
1795
1801
  handleChartMouseDown: re,
1796
1802
  openChartMenu: ue,
1797
- handleBarMouseDown: Me,
1798
- handleResizeMouseDown: Re,
1799
- handleConnectDotMouseDown: Ce,
1803
+ handleBarMouseDown: Re,
1804
+ handleResizeMouseDown: Ce,
1805
+ handleConnectDotMouseDown: Ee,
1800
1806
  handleCreateDependency: $e
1801
1807
  }), [
1802
1808
  n,
1803
1809
  c,
1804
- D,
1805
- x,
1810
+ T,
1811
+ w,
1806
1812
  C,
1807
- u,
1813
+ f,
1808
1814
  b,
1809
1815
  S,
1810
1816
  r,
1811
- G,
1812
- ye,
1817
+ H,
1813
1818
  xe,
1814
- T,
1815
- E,
1816
- k,
1819
+ be,
1820
+ I,
1821
+ $,
1822
+ D,
1817
1823
  y,
1818
1824
  A,
1819
- I,
1825
+ k,
1820
1826
  Y,
1821
1827
  j,
1822
- O,
1828
+ X,
1823
1829
  le,
1824
- be,
1830
+ me,
1825
1831
  De,
1826
1832
  re,
1827
1833
  ue,
1828
- Me,
1829
1834
  Re,
1830
1835
  Ce,
1836
+ Ee,
1831
1837
  $e
1832
1838
  ]);
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(
1839
+ 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
1840
  "div",
1835
1841
  {
1836
1842
  style: {
@@ -1857,7 +1863,7 @@ function Et(n) {
1857
1863
  }
1858
1864
  ) });
1859
1865
  }
1860
- const Dt = [
1866
+ const Mt = [
1861
1867
  { label: "Yellow", value: "#FEF08A" },
1862
1868
  { label: "Green", value: "#BBF7D0" },
1863
1869
  { label: "Blue", value: "#BFDBFE" },
@@ -1875,36 +1881,36 @@ function Ft({
1875
1881
  isOpen: n,
1876
1882
  onClose: c,
1877
1883
  availableMilestones: p = [],
1878
- initialDate: D,
1884
+ initialDate: T,
1879
1885
  translations: h,
1880
- onSaveNote: x
1886
+ onSaveNote: w
1881
1887
  }) {
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);
1888
+ const x = (g, Y) => h ? typeof h == "function" ? h(g, Y) : h[g] || Y : Y, [C, M] = P(""), [f, E] = P(""), [b, F] = P("#FEF08A"), [S, B] = P(""), [r, i] = P(""), [I, l] = P("FS"), [$, u] = P(!1), [D, s] = P([]), [y, N] = P(""), A = pe(null);
1883
1889
  ge(() => {
1884
- n && (M(""), $(""), F("#FEF08A"), B(D ?? (/* @__PURE__ */ new Date()).toISOString().split("T")[0]), i(""), l("FS"), s([]), N(""));
1885
- }, [n, D]);
1886
- const Z = [
1890
+ n && (M(""), E(""), F("#FEF08A"), B(T ?? (/* @__PURE__ */ new Date()).toISOString().split("T")[0]), i(""), l("FS"), s([]), N(""));
1891
+ }, [n, T]);
1892
+ const ee = [
1887
1893
  ...p.map((g) => ({ id: g.id, name: g.name, type: "MILESTONE" }))
1888
- ], I = async () => {
1889
- if (!C.trim() && !u.trim()) {
1890
- N(w("noteModal.errorEmpty", "Please provide a title or content for the note."));
1894
+ ], k = async () => {
1895
+ if (!C.trim() && !f.trim()) {
1896
+ N(x("noteModal.errorEmpty", "Please provide a title or content for the note."));
1891
1897
  return;
1892
1898
  }
1893
1899
  N("");
1894
1900
  try {
1895
- f(!0), await x({
1896
- title: C || w("noteModal.untitled", "Untitled"),
1897
- description: u,
1901
+ u(!0), await w({
1902
+ title: C || x("noteModal.untitled", "Untitled"),
1903
+ description: f,
1898
1904
  color: b,
1899
1905
  date: S ? `${S}T00:00:00` : (/* @__PURE__ */ new Date()).toISOString(),
1900
1906
  predecessorId: r,
1901
- dependencyType: T,
1902
- files: k
1907
+ dependencyType: I,
1908
+ files: D
1903
1909
  }), c();
1904
1910
  } catch (g) {
1905
- console.error(g), N(w("noteModal.errorSave", "Error creating note."));
1911
+ console.error(g), N(x("noteModal.errorSave", "Error creating note."));
1906
1912
  } finally {
1907
- f(!1);
1913
+ u(!1);
1908
1914
  }
1909
1915
  };
1910
1916
  return n ? /* @__PURE__ */ t("div", { style: { position: "fixed", inset: 0, background: "rgba(0,0,0,0.2)", backdropFilter: "blur(2px)", display: "flex", alignItems: "center", justifyContent: "center", zIndex: 9999, padding: 16 }, onClick: c, children: /* @__PURE__ */ o("div", { onClick: (g) => g.stopPropagation(), style: {
@@ -1940,7 +1946,7 @@ function Ft({
1940
1946
  type: "text",
1941
1947
  value: C,
1942
1948
  onChange: (g) => M(g.target.value),
1943
- placeholder: w("noteModal.titlePlaceholder", "Note title..."),
1949
+ placeholder: x("noteModal.titlePlaceholder", "Note title..."),
1944
1950
  style: {
1945
1951
  width: "100%",
1946
1952
  background: "transparent",
@@ -1961,10 +1967,10 @@ function Ft({
1961
1967
  /* @__PURE__ */ t(
1962
1968
  "textarea",
1963
1969
  {
1964
- value: u,
1965
- onChange: (g) => $(g.target.value),
1970
+ value: f,
1971
+ onChange: (g) => E(g.target.value),
1966
1972
  rows: 6,
1967
- placeholder: w("noteModal.contentPlaceholder", "Write your note here..."),
1973
+ placeholder: x("noteModal.contentPlaceholder", "Write your note here..."),
1968
1974
  style: {
1969
1975
  width: "100%",
1970
1976
  background: "transparent",
@@ -1991,7 +1997,7 @@ function Ft({
1991
1997
  multiple: !0,
1992
1998
  onChange: (g) => {
1993
1999
  const Y = g.target.files ? Array.from(g.target.files) : [];
1994
- Y.length > 0 && s((H) => [...H, ...Y]), A.current && (A.current.value = "");
2000
+ Y.length > 0 && s((V) => [...V, ...Y]), A.current && (A.current.value = "");
1995
2001
  },
1996
2002
  style: { display: "none" }
1997
2003
  }
@@ -2021,11 +2027,11 @@ function Ft({
2021
2027
  onMouseLeave: (g) => g.currentTarget.style.background = "rgba(0,0,0,0.05)",
2022
2028
  children: [
2023
2029
  /* @__PURE__ */ t(dt, { size: 13 }),
2024
- w("noteModal.attachFiles", "Attach files")
2030
+ x("noteModal.attachFiles", "Attach files")
2025
2031
  ]
2026
2032
  }
2027
2033
  ),
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: {
2034
+ D.length > 0 && /* @__PURE__ */ t("div", { style: { marginTop: 8, display: "flex", flexDirection: "column", gap: 4 }, children: D.map((g, Y) => /* @__PURE__ */ o("div", { style: {
2029
2035
  display: "flex",
2030
2036
  alignItems: "center",
2031
2037
  gap: 6,
@@ -2035,7 +2041,7 @@ function Ft({
2035
2041
  fontSize: 11,
2036
2042
  color: "#3a3a3a"
2037
2043
  }, children: [
2038
- /* @__PURE__ */ t(Ee, { size: 10, style: { flexShrink: 0 } }),
2044
+ /* @__PURE__ */ t(Fe, { size: 10, style: { flexShrink: 0 } }),
2039
2045
  /* @__PURE__ */ t("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: g.name }),
2040
2046
  /* @__PURE__ */ o("span", { style: { fontSize: 9, color: "rgba(58,58,58,0.4)", flexShrink: 0 }, children: [
2041
2047
  (g.size / 1024).toFixed(0),
@@ -2045,9 +2051,9 @@ function Ft({
2045
2051
  "button",
2046
2052
  {
2047
2053
  type: "button",
2048
- onClick: () => s((H) => H.filter((q, G) => G !== Y)),
2054
+ onClick: () => s((V) => V.filter((q, H) => H !== Y)),
2049
2055
  style: { background: "none", border: "none", cursor: "pointer", padding: 2, display: "flex", color: "#ef4444" },
2050
- title: w("noteModal.removeFile", "Remove"),
2056
+ title: x("noteModal.removeFile", "Remove"),
2051
2057
  children: /* @__PURE__ */ t(lt, { size: 12 })
2052
2058
  }
2053
2059
  )
@@ -2074,7 +2080,7 @@ function Ft({
2074
2080
  }
2075
2081
  }
2076
2082
  ),
2077
- /* @__PURE__ */ t("div", { style: { display: "flex", gap: 6, alignItems: "center", flexWrap: "wrap", justifyContent: "flex-end" }, children: Dt.map((g) => /* @__PURE__ */ t(
2083
+ /* @__PURE__ */ t("div", { style: { display: "flex", gap: 6, alignItems: "center", flexWrap: "wrap", justifyContent: "flex-end" }, children: Mt.map((g) => /* @__PURE__ */ t(
2078
2084
  "button",
2079
2085
  {
2080
2086
  type: "button",
@@ -2096,10 +2102,10 @@ function Ft({
2096
2102
  g.value
2097
2103
  )) })
2098
2104
  ] }),
2099
- Z.length > 0 && /* @__PURE__ */ o("div", { style: { marginTop: 12, paddingTop: 12, borderTop: "1px solid rgba(0,0,0,0.08)" }, children: [
2105
+ ee.length > 0 && /* @__PURE__ */ o("div", { style: { marginTop: 12, paddingTop: 12, borderTop: "1px solid rgba(0,0,0,0.08)" }, children: [
2100
2106
  /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 6, marginBottom: 8 }, children: [
2101
2107
  /* @__PURE__ */ t(ct, { size: 14, style: { color: "rgba(58,58,58,0.5)" } }),
2102
- /* @__PURE__ */ t("span", { style: { fontSize: 11, color: "rgba(58,58,58,0.5)", fontWeight: 600 }, children: w("noteModal.dependency", "Dependency") })
2108
+ /* @__PURE__ */ t("span", { style: { fontSize: 11, color: "rgba(58,58,58,0.5)", fontWeight: 600 }, children: x("noteModal.dependency", "Dependency") })
2103
2109
  ] }),
2104
2110
  /* @__PURE__ */ o(
2105
2111
  "select",
@@ -2119,15 +2125,15 @@ function Ft({
2119
2125
  cursor: "pointer"
2120
2126
  },
2121
2127
  children: [
2122
- /* @__PURE__ */ t("option", { value: "", children: w("noteModal.none", "None") }),
2123
- p.length > 0 && /* @__PURE__ */ t("optgroup", { label: w("noteModal.milestones", "Milestones"), children: p.map((g) => /* @__PURE__ */ t("option", { value: g.id, children: g.name }, g.id)) })
2128
+ /* @__PURE__ */ t("option", { value: "", children: x("noteModal.none", "None") }),
2129
+ p.length > 0 && /* @__PURE__ */ t("optgroup", { label: x("noteModal.milestones", "Milestones"), children: p.map((g) => /* @__PURE__ */ t("option", { value: g.id, children: g.name }, g.id)) })
2124
2130
  ]
2125
2131
  }
2126
2132
  ),
2127
2133
  r && /* @__PURE__ */ t(
2128
2134
  "select",
2129
2135
  {
2130
- value: T,
2136
+ value: I,
2131
2137
  onChange: (g) => l(g.target.value),
2132
2138
  style: {
2133
2139
  width: "100%",
@@ -2152,18 +2158,18 @@ function Ft({
2152
2158
  {
2153
2159
  onClick: c,
2154
2160
  style: { padding: "8px 16px", fontSize: 13, color: "#3a3a3a", background: "rgba(255,255,255,0.5)", border: "1px solid rgba(0,0,0,0.1)", borderRadius: 8, cursor: "pointer" },
2155
- children: w("noteModal.cancel", "Cancel")
2161
+ children: x("noteModal.cancel", "Cancel")
2156
2162
  }
2157
2163
  ),
2158
2164
  /* @__PURE__ */ o(
2159
2165
  "button",
2160
2166
  {
2161
- onClick: I,
2162
- disabled: E,
2163
- 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 },
2167
+ onClick: k,
2168
+ disabled: $,
2169
+ style: { padding: "8px 20px", fontSize: 13, color: "#fff", background: "#1A3C30", border: "none", borderRadius: 8, cursor: "pointer", display: "flex", alignItems: "center", gap: 6, opacity: $ ? 0.5 : 1 },
2164
2170
  children: [
2165
- E && /* @__PURE__ */ t(Oe, { size: 16, style: { animation: "zg-spin 1s linear infinite" } }),
2166
- w("noteModal.create", "Create Note")
2171
+ $ && /* @__PURE__ */ t(_e, { size: 16, style: { animation: "zg-spin 1s linear infinite" } }),
2172
+ x("noteModal.create", "Create Note")
2167
2173
  ]
2168
2174
  }
2169
2175
  )
@@ -2246,6 +2252,6 @@ const At = {
2246
2252
  };
2247
2253
  export {
2248
2254
  Ft as NoteModal,
2249
- Et as ProjectGantt,
2255
+ $t as ProjectGantt,
2250
2256
  At as ptBR
2251
2257
  };