iris-gantt 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +183 -215
  2. package/USAGE.md +838 -0
  3. package/dist/Gantt/Chart.d.ts +22 -0
  4. package/dist/Gantt/Chart.d.ts.map +1 -0
  5. package/dist/Gantt/ContextMenu.d.ts +19 -0
  6. package/dist/Gantt/ContextMenu.d.ts.map +1 -0
  7. package/dist/Gantt/DependencyEditor.d.ts +13 -0
  8. package/dist/Gantt/DependencyEditor.d.ts.map +1 -0
  9. package/dist/Gantt/DependencyPopover.d.ts +12 -0
  10. package/dist/Gantt/DependencyPopover.d.ts.map +1 -0
  11. package/dist/Gantt/DragDrop.d.ts +18 -0
  12. package/dist/Gantt/DragDrop.d.ts.map +1 -0
  13. package/dist/Gantt/Gantt.d.ts +35 -0
  14. package/dist/Gantt/Gantt.d.ts.map +1 -0
  15. package/dist/Gantt/GanttPro.d.ts +16 -0
  16. package/dist/Gantt/GanttPro.d.ts.map +1 -0
  17. package/dist/Gantt/Grid.d.ts +29 -0
  18. package/dist/Gantt/Grid.d.ts.map +1 -0
  19. package/dist/Gantt/LinkRenderer.d.ts +15 -0
  20. package/dist/Gantt/LinkRenderer.d.ts.map +1 -0
  21. package/dist/Gantt/TaskBar.d.ts +19 -0
  22. package/dist/Gantt/TaskBar.d.ts.map +1 -0
  23. package/dist/Gantt/TaskCreator.d.ts +8 -0
  24. package/dist/Gantt/TaskCreator.d.ts.map +1 -0
  25. package/dist/Gantt/TaskEditor.d.ts +10 -0
  26. package/dist/Gantt/TaskEditor.d.ts.map +1 -0
  27. package/dist/Gantt/Timeline.d.ts +23 -0
  28. package/dist/Gantt/Timeline.d.ts.map +1 -0
  29. package/dist/Gantt/Toolbar.d.ts +15 -0
  30. package/dist/Gantt/Toolbar.d.ts.map +1 -0
  31. package/dist/Gantt/UndoRedo.d.ts +27 -0
  32. package/dist/Gantt/UndoRedo.d.ts.map +1 -0
  33. package/dist/Gantt/exports.d.ts +21 -0
  34. package/dist/Gantt/exports.d.ts.map +1 -0
  35. package/dist/Gantt/features/AutoScheduler.d.ts +10 -0
  36. package/dist/Gantt/features/AutoScheduler.d.ts.map +1 -0
  37. package/dist/Gantt/features/Baselines.d.ts +27 -0
  38. package/dist/Gantt/features/Baselines.d.ts.map +1 -0
  39. package/dist/Gantt/features/CriticalPath.d.ts +10 -0
  40. package/dist/Gantt/features/CriticalPath.d.ts.map +1 -0
  41. package/dist/Gantt/features/ExportUtils.d.ts +11 -0
  42. package/dist/Gantt/features/ExportUtils.d.ts.map +1 -0
  43. package/dist/Gantt/features/FilterSearch.d.ts +20 -0
  44. package/dist/Gantt/features/FilterSearch.d.ts.map +1 -0
  45. package/dist/Gantt/types.d.ts +80 -0
  46. package/dist/Gantt/types.d.ts.map +1 -0
  47. package/dist/Gantt/utils/dateUtils.d.ts +11 -0
  48. package/dist/Gantt/utils/dateUtils.d.ts.map +1 -0
  49. package/dist/Gantt/utils/dependencyParser.d.ts +26 -0
  50. package/dist/Gantt/utils/dependencyParser.d.ts.map +1 -0
  51. package/dist/gantt.css +1 -0
  52. package/dist/index.d.ts +3 -0
  53. package/dist/index.d.ts.map +1 -0
  54. package/dist/iris-gantt.js +1232 -1500
  55. package/dist/iris-gantt.umd.cjs +8 -8
  56. package/dist/types.d.ts +2 -0
  57. package/dist/types.d.ts.map +1 -0
  58. package/package.json +43 -8
  59. package/dist/iris-gantt.css +0 -1
  60. package/src/components/Gantt/gantt.css +0 -2167
@@ -1,301 +1,299 @@
1
- import Be, { useState as B, useMemo as Bt, forwardRef as qe, useCallback as me, useRef as Ve, useEffect as tt } from "react";
2
- import { Typography as ft, Select as ie, Input as ve, List as $e, Radio as Ce, Space as ge, InputNumber as ke, Button as se, Popover as zt, Tooltip as ye, Divider as Le, Form as G, Modal as ze, DatePicker as pt, ColorPicker as gt, Card as nt, Alert as Xe, Tag as be, Menu as Ht } from "antd";
3
- import { FontAwesomeIcon as z } from "@fortawesome/react-fontawesome";
4
- import { faChevronRight as mt, faPlus as Ne, faChevronDown as st, faGripVertical as xt, faTimesCircle as Wt, faCalendarCheck as Ut, faSearchMinus as Jt, faSearchPlus as Vt, faRotateLeft as yt, faFileCsv as Xt, faFileExcel as Gt, faFileCode as qt, faFilePdf as Zt, faExclamationTriangle as Kt, faArrowDown as Qt, faArrowUp as en, faInfoCircle as rt, faLink as wt, faTrash as jt, faEdit as tn, faCopy as nn, faFlag as sn, faTasks as rn, faFolder as an } from "@fortawesome/free-solid-svg-icons";
5
- function on(t) {
6
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
7
- }
8
- var _e = { exports: {} }, Ee = {};
9
- var at;
10
- function ln() {
11
- if (at) return Ee;
12
- at = 1;
13
- var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), r = /* @__PURE__ */ Symbol.for("react.fragment");
14
- function a(i, s, p) {
1
+ import Ee, { useState as $, useMemo as Bt, forwardRef as qe, useCallback as ue, useEffect as Oe, useRef as Xe } from "react";
2
+ import { Typography as ut, Select as te, Input as ye, List as Te, Radio as Me, Space as de, InputNumber as De, Button as J, Popover as zt, Tooltip as xe, Divider as Ae, Form as z, Modal as Be, DatePicker as ht, ColorPicker as ft, Card as tt, Alert as Je, Tag as we, Menu as Ht } from "antd";
3
+ import { FontAwesomeIcon as N } from "@fortawesome/react-fontawesome";
4
+ import { faChevronRight as pt, faPlus as Fe, faChevronDown as nt, faGripVertical as xt, faTimesCircle as Wt, faCalendarCheck as Ut, faSearchMinus as Vt, faSearchPlus as Xt, faRotateLeft as gt, faFileCsv as Jt, faFileExcel as Gt, faFileCode as qt, faFilePdf as Zt, faExclamationTriangle as Kt, faArrowDown as Qt, faArrowUp as en, faInfoCircle as st, faLink as mt, faTrash as yt, faEdit as tn, faCopy as nn, faFlag as sn, faTasks as rn, faFolder as an } from "@fortawesome/free-solid-svg-icons";
5
+ import jt from "dayjs";
6
+ var Ie = { exports: {} }, ke = {};
7
+ var rt;
8
+ function on() {
9
+ if (rt) return ke;
10
+ rt = 1;
11
+ var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
12
+ function a(i, s, h) {
15
13
  var l = null;
16
- if (p !== void 0 && (l = "" + p), s.key !== void 0 && (l = "" + s.key), "key" in s) {
17
- p = {};
14
+ if (h !== void 0 && (l = "" + h), s.key !== void 0 && (l = "" + s.key), "key" in s) {
15
+ h = {};
18
16
  for (var o in s)
19
- o !== "key" && (p[o] = s[o]);
20
- } else p = s;
21
- return s = p.ref, {
17
+ o !== "key" && (h[o] = s[o]);
18
+ } else h = s;
19
+ return s = h.ref, {
22
20
  $$typeof: t,
23
21
  type: i,
24
22
  key: l,
25
23
  ref: s !== void 0 ? s : null,
26
- props: p
24
+ props: h
27
25
  };
28
26
  }
29
- return Ee.Fragment = r, Ee.jsx = a, Ee.jsxs = a, Ee;
27
+ return ke.Fragment = n, ke.jsx = a, ke.jsxs = a, ke;
30
28
  }
31
- var Fe = {};
32
- var it;
33
- function cn() {
34
- return it || (it = 1, process.env.NODE_ENV !== "production" && (function() {
35
- function t(n) {
36
- if (n == null) return null;
37
- if (typeof n == "function")
38
- return n.$$typeof === P ? null : n.displayName || n.name || null;
39
- if (typeof n == "string") return n;
40
- switch (n) {
41
- case _:
29
+ var Ce = {};
30
+ var at;
31
+ function ln() {
32
+ return at || (at = 1, process.env.NODE_ENV !== "production" && (function() {
33
+ function t(r) {
34
+ if (r == null) return null;
35
+ if (typeof r == "function")
36
+ return r.$$typeof === B ? null : r.displayName || r.name || null;
37
+ if (typeof r == "string") return r;
38
+ switch (r) {
39
+ case k:
42
40
  return "Fragment";
43
- case D:
41
+ case w:
44
42
  return "Profiler";
45
- case m:
43
+ case f:
46
44
  return "StrictMode";
47
- case A:
45
+ case I:
48
46
  return "Suspense";
49
47
  case X:
50
48
  return "SuspenseList";
51
- case R:
49
+ case Y:
52
50
  return "Activity";
53
51
  }
54
- if (typeof n == "object")
55
- switch (typeof n.tag == "number" && console.error(
52
+ if (typeof r == "object")
53
+ switch (typeof r.tag == "number" && console.error(
56
54
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
57
- ), n.$$typeof) {
58
- case T:
55
+ ), r.$$typeof) {
56
+ case j:
59
57
  return "Portal";
60
- case L:
61
- return n.displayName || "Context";
62
- case Y:
63
- return (n._context.displayName || "Context") + ".Consumer";
64
- case O:
65
- var y = n.render;
66
- return n = n.displayName, n || (n = y.displayName || y.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
67
- case te:
68
- return y = n.displayName || null, y !== null ? y : t(n.type) || "Memo";
69
- case x:
70
- y = n._payload, n = n._init;
58
+ case E:
59
+ return r.displayName || "Context";
60
+ case C:
61
+ return (r._context.displayName || "Context") + ".Consumer";
62
+ case P:
63
+ var m = r.render;
64
+ return r = r.displayName, r || (r = m.displayName || m.name || "", r = r !== "" ? "ForwardRef(" + r + ")" : "ForwardRef"), r;
65
+ case Z:
66
+ return m = r.displayName || null, m !== null ? m : t(r.type) || "Memo";
67
+ case p:
68
+ m = r._payload, r = r._init;
71
69
  try {
72
- return t(n(y));
70
+ return t(r(m));
73
71
  } catch {
74
72
  }
75
73
  }
76
74
  return null;
77
75
  }
78
- function r(n) {
79
- return "" + n;
76
+ function n(r) {
77
+ return "" + r;
80
78
  }
81
- function a(n) {
79
+ function a(r) {
82
80
  try {
83
- r(n);
84
- var y = !1;
81
+ n(r);
82
+ var m = !1;
85
83
  } catch {
86
- y = !0;
84
+ m = !0;
87
85
  }
88
- if (y) {
89
- y = console;
90
- var C = y.error, N = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
91
- return C.call(
92
- y,
86
+ if (m) {
87
+ m = console;
88
+ var M = m.error, F = typeof Symbol == "function" && Symbol.toStringTag && r[Symbol.toStringTag] || r.constructor.name || "Object";
89
+ return M.call(
90
+ m,
93
91
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
94
- N
95
- ), r(n);
92
+ F
93
+ ), n(r);
96
94
  }
97
95
  }
98
- function i(n) {
99
- if (n === _) return "<>";
100
- if (typeof n == "object" && n !== null && n.$$typeof === x)
96
+ function i(r) {
97
+ if (r === k) return "<>";
98
+ if (typeof r == "object" && r !== null && r.$$typeof === p)
101
99
  return "<...>";
102
100
  try {
103
- var y = t(n);
104
- return y ? "<" + y + ">" : "<...>";
101
+ var m = t(r);
102
+ return m ? "<" + m + ">" : "<...>";
105
103
  } catch {
106
104
  return "<...>";
107
105
  }
108
106
  }
109
107
  function s() {
110
- var n = J.A;
111
- return n === null ? null : n.getOwner();
108
+ var r = H.A;
109
+ return r === null ? null : r.getOwner();
112
110
  }
113
- function p() {
111
+ function h() {
114
112
  return Error("react-stack-top-frame");
115
113
  }
116
- function l(n) {
117
- if (U.call(n, "key")) {
118
- var y = Object.getOwnPropertyDescriptor(n, "key").get;
119
- if (y && y.isReactWarning) return !1;
114
+ function l(r) {
115
+ if (L.call(r, "key")) {
116
+ var m = Object.getOwnPropertyDescriptor(r, "key").get;
117
+ if (m && m.isReactWarning) return !1;
120
118
  }
121
- return n.key !== void 0;
119
+ return r.key !== void 0;
122
120
  }
123
- function o(n, y) {
124
- function C() {
125
- g || (g = !0, console.error(
121
+ function o(r, m) {
122
+ function M() {
123
+ ne || (ne = !0, console.error(
126
124
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
127
- y
125
+ m
128
126
  ));
129
127
  }
130
- C.isReactWarning = !0, Object.defineProperty(n, "key", {
131
- get: C,
128
+ M.isReactWarning = !0, Object.defineProperty(r, "key", {
129
+ get: M,
132
130
  configurable: !0
133
131
  });
134
132
  }
135
- function c() {
136
- var n = t(this.type);
137
- return $[n] || ($[n] = !0, console.error(
133
+ function x() {
134
+ var r = t(this.type);
135
+ return G[r] || (G[r] = !0, console.error(
138
136
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
139
- )), n = this.props.ref, n !== void 0 ? n : null;
137
+ )), r = this.props.ref, r !== void 0 ? r : null;
140
138
  }
141
- function v(n, y, C, N, H, K) {
142
- var I = C.ref;
143
- return n = {
139
+ function b(r, m, M, F, U, he) {
140
+ var A = M.ref;
141
+ return r = {
144
142
  $$typeof: u,
145
- type: n,
146
- key: y,
147
- props: C,
148
- _owner: N
149
- }, (I !== void 0 ? I : null) !== null ? Object.defineProperty(n, "ref", {
143
+ type: r,
144
+ key: m,
145
+ props: M,
146
+ _owner: F
147
+ }, (A !== void 0 ? A : null) !== null ? Object.defineProperty(r, "ref", {
150
148
  enumerable: !1,
151
- get: c
152
- }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
149
+ get: x
150
+ }) : Object.defineProperty(r, "ref", { enumerable: !1, value: null }), r._store = {}, Object.defineProperty(r._store, "validated", {
153
151
  configurable: !1,
154
152
  enumerable: !1,
155
153
  writable: !0,
156
154
  value: 0
157
- }), Object.defineProperty(n, "_debugInfo", {
155
+ }), Object.defineProperty(r, "_debugInfo", {
158
156
  configurable: !1,
159
157
  enumerable: !1,
160
158
  writable: !0,
161
159
  value: null
162
- }), Object.defineProperty(n, "_debugStack", {
160
+ }), Object.defineProperty(r, "_debugStack", {
163
161
  configurable: !1,
164
162
  enumerable: !1,
165
163
  writable: !0,
166
- value: H
167
- }), Object.defineProperty(n, "_debugTask", {
164
+ value: U
165
+ }), Object.defineProperty(r, "_debugTask", {
168
166
  configurable: !1,
169
167
  enumerable: !1,
170
168
  writable: !0,
171
- value: K
172
- }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
169
+ value: he
170
+ }), Object.freeze && (Object.freeze(r.props), Object.freeze(r)), r;
173
171
  }
174
- function b(n, y, C, N, H, K) {
175
- var I = y.children;
176
- if (I !== void 0)
177
- if (N)
178
- if (E(I)) {
179
- for (N = 0; N < I.length; N++)
180
- j(I[N]);
181
- Object.freeze && Object.freeze(I);
172
+ function c(r, m, M, F, U, he) {
173
+ var A = m.children;
174
+ if (A !== void 0)
175
+ if (F)
176
+ if (ie(A)) {
177
+ for (F = 0; F < A.length; F++)
178
+ g(A[F]);
179
+ Object.freeze && Object.freeze(A);
182
180
  } else
183
181
  console.error(
184
182
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
185
183
  );
186
- else j(I);
187
- if (U.call(y, "key")) {
188
- I = t(n);
189
- var ee = Object.keys(y).filter(function(q) {
190
- return q !== "key";
184
+ else g(A);
185
+ if (L.call(m, "key")) {
186
+ A = t(r);
187
+ var q = Object.keys(m).filter(function(je) {
188
+ return je !== "key";
191
189
  });
192
- N = 0 < ee.length ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}", f[I + N] || (ee = 0 < ee.length ? "{" + ee.join(": ..., ") + ": ...}" : "{}", console.error(
190
+ F = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", D[A + F] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
193
191
  `A props object containing a "key" prop is being spread into JSX:
194
192
  let props = %s;
195
193
  <%s {...props} />
196
194
  React keys must be passed directly to JSX without using spread:
197
195
  let props = %s;
198
196
  <%s key={someKey} {...props} />`,
199
- N,
200
- I,
201
- ee,
202
- I
203
- ), f[I + N] = !0);
197
+ F,
198
+ A,
199
+ q,
200
+ A
201
+ ), D[A + F] = !0);
204
202
  }
205
- if (I = null, C !== void 0 && (a(C), I = "" + C), l(y) && (a(y.key), I = "" + y.key), "key" in y) {
206
- C = {};
207
- for (var ne in y)
208
- ne !== "key" && (C[ne] = y[ne]);
209
- } else C = y;
210
- return I && o(
211
- C,
212
- typeof n == "function" ? n.displayName || n.name || "Unknown" : n
213
- ), v(
214
- n,
215
- I,
216
- C,
203
+ if (A = null, M !== void 0 && (a(M), A = "" + M), l(m) && (a(m.key), A = "" + m.key), "key" in m) {
204
+ M = {};
205
+ for (var fe in m)
206
+ fe !== "key" && (M[fe] = m[fe]);
207
+ } else M = m;
208
+ return A && o(
209
+ M,
210
+ typeof r == "function" ? r.displayName || r.name || "Unknown" : r
211
+ ), b(
212
+ r,
213
+ A,
214
+ M,
217
215
  s(),
218
- H,
219
- K
216
+ U,
217
+ he
220
218
  );
221
219
  }
222
- function j(n) {
223
- k(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === x && (n._payload.status === "fulfilled" ? k(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
220
+ function g(r) {
221
+ S(r) ? r._store && (r._store.validated = 1) : typeof r == "object" && r !== null && r.$$typeof === p && (r._payload.status === "fulfilled" ? S(r._payload.value) && r._payload.value._store && (r._payload.value._store.validated = 1) : r._store && (r._store.validated = 1));
224
222
  }
225
- function k(n) {
226
- return typeof n == "object" && n !== null && n.$$typeof === u;
223
+ function S(r) {
224
+ return typeof r == "object" && r !== null && r.$$typeof === u;
227
225
  }
228
- var d = Be, u = /* @__PURE__ */ Symbol.for("react.transitional.element"), T = /* @__PURE__ */ Symbol.for("react.portal"), _ = /* @__PURE__ */ Symbol.for("react.fragment"), m = /* @__PURE__ */ Symbol.for("react.strict_mode"), D = /* @__PURE__ */ Symbol.for("react.profiler"), Y = /* @__PURE__ */ Symbol.for("react.consumer"), L = /* @__PURE__ */ Symbol.for("react.context"), O = /* @__PURE__ */ Symbol.for("react.forward_ref"), A = /* @__PURE__ */ Symbol.for("react.suspense"), X = /* @__PURE__ */ Symbol.for("react.suspense_list"), te = /* @__PURE__ */ Symbol.for("react.memo"), x = /* @__PURE__ */ Symbol.for("react.lazy"), R = /* @__PURE__ */ Symbol.for("react.activity"), P = /* @__PURE__ */ Symbol.for("react.client.reference"), J = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, E = Array.isArray, S = console.createTask ? console.createTask : function() {
226
+ var d = Ee, u = /* @__PURE__ */ Symbol.for("react.transitional.element"), j = /* @__PURE__ */ Symbol.for("react.portal"), k = /* @__PURE__ */ Symbol.for("react.fragment"), f = /* @__PURE__ */ Symbol.for("react.strict_mode"), w = /* @__PURE__ */ Symbol.for("react.profiler"), C = /* @__PURE__ */ Symbol.for("react.consumer"), E = /* @__PURE__ */ Symbol.for("react.context"), P = /* @__PURE__ */ Symbol.for("react.forward_ref"), I = /* @__PURE__ */ Symbol.for("react.suspense"), X = /* @__PURE__ */ Symbol.for("react.suspense_list"), Z = /* @__PURE__ */ Symbol.for("react.memo"), p = /* @__PURE__ */ Symbol.for("react.lazy"), Y = /* @__PURE__ */ Symbol.for("react.activity"), B = /* @__PURE__ */ Symbol.for("react.client.reference"), H = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, ie = Array.isArray, K = console.createTask ? console.createTask : function() {
229
227
  return null;
230
228
  };
231
229
  d = {
232
- react_stack_bottom_frame: function(n) {
233
- return n();
230
+ react_stack_bottom_frame: function(r) {
231
+ return r();
234
232
  }
235
233
  };
236
- var g, $ = {}, w = d.react_stack_bottom_frame.bind(
234
+ var ne, G = {}, _ = d.react_stack_bottom_frame.bind(
237
235
  d,
238
- p
239
- )(), h = S(i(p)), f = {};
240
- Fe.Fragment = _, Fe.jsx = function(n, y, C) {
241
- var N = 1e4 > J.recentlyCreatedOwnerStacks++;
242
- return b(
243
- n,
244
- y,
245
- C,
236
+ h
237
+ )(), v = K(i(h)), D = {};
238
+ Ce.Fragment = k, Ce.jsx = function(r, m, M) {
239
+ var F = 1e4 > H.recentlyCreatedOwnerStacks++;
240
+ return c(
241
+ r,
242
+ m,
243
+ M,
246
244
  !1,
247
- N ? Error("react-stack-top-frame") : w,
248
- N ? S(i(n)) : h
245
+ F ? Error("react-stack-top-frame") : _,
246
+ F ? K(i(r)) : v
249
247
  );
250
- }, Fe.jsxs = function(n, y, C) {
251
- var N = 1e4 > J.recentlyCreatedOwnerStacks++;
252
- return b(
253
- n,
254
- y,
255
- C,
248
+ }, Ce.jsxs = function(r, m, M) {
249
+ var F = 1e4 > H.recentlyCreatedOwnerStacks++;
250
+ return c(
251
+ r,
252
+ m,
253
+ M,
256
254
  !0,
257
- N ? Error("react-stack-top-frame") : w,
258
- N ? S(i(n)) : h
255
+ F ? Error("react-stack-top-frame") : _,
256
+ F ? K(i(r)) : v
259
257
  );
260
258
  };
261
- })()), Fe;
259
+ })()), Ce;
262
260
  }
263
- var ot;
264
- function dn() {
265
- return ot || (ot = 1, process.env.NODE_ENV === "production" ? _e.exports = ln() : _e.exports = cn()), _e.exports;
261
+ var it;
262
+ function cn() {
263
+ return it || (it = 1, process.env.NODE_ENV === "production" ? Ie.exports = on() : Ie.exports = ln()), Ie.exports;
266
264
  }
267
- var e = dn();
268
- const ae = (t, r, a) => {
265
+ var e = cn();
266
+ const ee = (t, n, a) => {
269
267
  const i = new Date(t);
270
268
  switch (a) {
271
269
  case "hour":
272
- i.setHours(i.getHours() + r);
270
+ i.setHours(i.getHours() + n);
273
271
  break;
274
272
  case "day":
275
- i.setDate(i.getDate() + r);
273
+ i.setDate(i.getDate() + n);
276
274
  break;
277
275
  case "week":
278
- i.setDate(i.getDate() + r * 7);
276
+ i.setDate(i.getDate() + n * 7);
279
277
  break;
280
278
  case "month":
281
- i.setMonth(i.getMonth() + r);
279
+ i.setMonth(i.getMonth() + n);
282
280
  break;
283
281
  case "quarter":
284
- i.setMonth(i.getMonth() + r * 3);
282
+ i.setMonth(i.getMonth() + n * 3);
285
283
  break;
286
284
  case "year":
287
- i.setFullYear(i.getFullYear() + r);
285
+ i.setFullYear(i.getFullYear() + n);
288
286
  break;
289
287
  }
290
288
  return i;
291
- }, Ie = (t, r) => {
292
- const a = r.getTime() - t.getTime();
289
+ }, _e = (t, n) => {
290
+ const a = n.getTime() - t.getTime();
293
291
  return Math.ceil(a / (1e3 * 60 * 60 * 24));
294
- }, un = (t, r) => {
295
- const a = r.getTime() - t.getTime();
292
+ }, dn = (t, n) => {
293
+ const a = n.getTime() - t.getTime();
296
294
  return Math.ceil(a / (1e3 * 60 * 60));
297
- }, ce = (t, r) => {
298
- const a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], i = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], s = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], p = {
295
+ }, ae = (t, n) => {
296
+ const a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], i = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], s = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], h = {
299
297
  YYYY: t.getFullYear().toString(),
300
298
  YY: t.getFullYear().toString().slice(-2),
301
299
  MMMM: i[t.getMonth()],
@@ -310,41 +308,41 @@ const ae = (t, r, a) => {
310
308
  mm: String(t.getMinutes()).padStart(2, "0"),
311
309
  m: String(t.getMinutes())
312
310
  };
313
- return r.replace(/YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|HH|H|mm|m/g, (l) => p[l]);
314
- }, lt = (t) => {
315
- const r = t.getDay();
316
- return r === 0 || r === 6;
317
- }, ct = (t, r) => r.some(
311
+ return n.replace(/YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|HH|H|mm|m/g, (l) => h[l]);
312
+ }, ot = (t) => {
313
+ const n = t.getDay();
314
+ return n === 0 || n === 6;
315
+ }, lt = (t, n) => n.some(
318
316
  (a) => a.getFullYear() === t.getFullYear() && a.getMonth() === t.getMonth() && a.getDate() === t.getDate()
319
317
  ), Ye = (t) => {
320
- const r = new Date(t);
321
- return r.setHours(0, 0, 0, 0), r;
322
- }, es = (t) => {
323
- const r = new Date(t);
324
- return r.setHours(23, 59, 59, 999), r;
325
- }, ts = (t, r, a = "day") => {
318
+ const n = new Date(t);
319
+ return n.setHours(0, 0, 0, 0), n;
320
+ }, Zn = (t) => {
321
+ const n = new Date(t);
322
+ return n.setHours(23, 59, 59, 999), n;
323
+ }, Kn = (t, n, a = "day") => {
326
324
  switch (a) {
327
325
  case "hour":
328
- return un(t, r);
326
+ return dn(t, n);
329
327
  case "day":
330
- return Ie(t, r);
328
+ return _e(t, n);
331
329
  case "week":
332
- return Math.ceil(Ie(t, r) / 7);
330
+ return Math.ceil(_e(t, n) / 7);
333
331
  case "month":
334
- return (r.getFullYear() - t.getFullYear()) * 12 + (r.getMonth() - t.getMonth());
332
+ return (n.getFullYear() - t.getFullYear()) * 12 + (n.getMonth() - t.getMonth());
335
333
  default:
336
- return Ie(t, r);
334
+ return _e(t, n);
337
335
  }
338
336
  };
339
- function hn(t) {
337
+ function un(t) {
340
338
  if (!t || typeof t != "string") return null;
341
- const r = t.trim(), a = /^(\d+)(FS|SS|FF|SF)(([+-])(\d+)([dhwm]))?$/i, i = r.match(a);
339
+ const n = t.trim(), a = /^(\d+)(FS|SS|FF|SF)(([+-])(\d+)([dhwm]))?$/i, i = n.match(a);
342
340
  if (!i) return null;
343
- const s = parseInt(i[1], 10), p = i[2].toUpperCase();
341
+ const s = parseInt(i[1], 10), h = i[2].toUpperCase();
344
342
  let l = 0, o = "day";
345
343
  if (i[3]) {
346
- const c = i[4] === "-" ? -1 : 1;
347
- switch (l = parseInt(i[5], 10) * c, i[6].toLowerCase()) {
344
+ const x = i[4] === "-" ? -1 : 1;
345
+ switch (l = parseInt(i[5], 10) * x, i[6].toLowerCase()) {
348
346
  case "d":
349
347
  o = "day";
350
348
  break;
@@ -359,10 +357,10 @@ function hn(t) {
359
357
  break;
360
358
  }
361
359
  }
362
- return { taskNumber: s, type: p, lag: l, lagUnit: o };
360
+ return { taskNumber: s, type: h, lag: l, lagUnit: o };
363
361
  }
364
- function Ge(t, r) {
365
- switch (r) {
362
+ function Ge(t, n) {
363
+ switch (n) {
366
364
  case "hour":
367
365
  return t / 24;
368
366
  case "day":
@@ -376,34 +374,34 @@ function Ge(t, r) {
376
374
  return t;
377
375
  }
378
376
  }
379
- function fn(t, r) {
377
+ function hn(t, n) {
380
378
  const i = {
381
379
  e2s: "FS",
382
380
  s2s: "SS",
383
381
  e2e: "FF",
384
382
  s2e: "SF"
385
383
  }[t.type];
386
- let s = `${r}${i}`;
384
+ let s = `${n}${i}`;
387
385
  if (t.lag && t.lag !== 0) {
388
- const p = t.lag > 0 ? "+" : "", o = (t.lagUnit || "day").charAt(0);
389
- let c = t.lag;
386
+ const h = t.lag > 0 ? "+" : "", o = (t.lagUnit || "day").charAt(0);
387
+ let x = t.lag;
390
388
  if (t.lagUnit && t.lagUnit !== "day")
391
389
  switch (t.lagUnit) {
392
390
  case "hour":
393
- c = t.lag * 24;
391
+ x = t.lag * 24;
394
392
  break;
395
393
  case "week":
396
- c = t.lag / 7;
394
+ x = t.lag / 7;
397
395
  break;
398
396
  case "month":
399
- c = t.lag / 30;
397
+ x = t.lag / 30;
400
398
  break;
401
399
  }
402
- s += `${p}${Math.round(c)}${o}`;
400
+ s += `${h}${Math.round(x)}${o}`;
403
401
  }
404
402
  return s;
405
403
  }
406
- function pn(t) {
404
+ function fn(t) {
407
405
  return {
408
406
  FS: "e2s",
409
407
  SS: "s2s",
@@ -411,30 +409,30 @@ function pn(t) {
411
409
  SF: "s2e"
412
410
  }[t];
413
411
  }
414
- const { Text: we, Paragraph: gn, Link: mn } = ft, { Option: dt } = ie, xn = ({
412
+ const { Text: ge, Paragraph: pn, Link: xn } = ut, { Option: ct } = te, gn = ({
415
413
  task: t,
416
- allTasks: r,
414
+ allTasks: n,
417
415
  onAddDependency: a,
418
416
  children: i
419
417
  }) => {
420
- const [s, p] = B(!1), [l, o] = B(""), [c, v] = B(null), [b, j] = B("e2s"), [k, d] = B("lag"), [u, T] = B(0), [_, m] = B(!0), D = "day", Y = Bt(() => {
421
- if (!l) return r.filter((R) => R.id !== t.id);
422
- const x = l.toLowerCase();
423
- return r.filter(
424
- (R) => R.id !== t.id && (R.text.toLowerCase().includes(x) || (r.indexOf(R) + 1).toString().includes(x))
418
+ const [s, h] = $(!1), [l, o] = $(""), [x, b] = $(null), [c, g] = $("e2s"), [S, d] = $("lag"), [u, j] = $(0), [k, f] = $(!0), w = "day", C = Bt(() => {
419
+ if (!l) return n.filter((Y) => Y.id !== t.id);
420
+ const p = l.toLowerCase();
421
+ return n.filter(
422
+ (Y) => Y.id !== t.id && (Y.text.toLowerCase().includes(p) || (n.indexOf(Y) + 1).toString().includes(p))
425
423
  );
426
- }, [r, l, t.id]), L = () => {
427
- if (c) {
428
- const x = k === "lag" ? u : -u, R = Ge(x, D);
429
- a(c, t.id, b, R), p(!1), O();
424
+ }, [n, l, t.id]), E = () => {
425
+ if (x) {
426
+ const p = S === "lag" ? u : -u, Y = Ge(p, w);
427
+ a(x, t.id, c, Y), h(!1), P();
430
428
  }
431
- }, O = () => {
432
- o(""), v(null), j("e2s"), d("lag"), T(0);
433
- }, A = () => {
434
- if (!_) return null;
435
- const x = b === "e2s", R = b === "s2s", P = b === "e2e", J = b === "s2e";
436
- let U = 0, E = 0, S = "", g = 0, $ = -1;
437
- return x ? (U = 20, E = 160, g = 140, $ = 160, S = "M 140 40 L 150 40 C 160 40, 160 90, 150 90 L 160 90") : P ? (U = 60, E = 60, g = 180, $ = -1, S = "M 180 40 L 200 40 L 200 90 L 180 90") : R ? (U = 100, E = 100, g = 100, $ = -1, S = "M 100 40 L 80 40 L 80 90 L 100 90") : J && (U = 160, E = 20, g = 160, $ = 140, S = "M 160 40 L 150 40 C 140 40, 140 90, 150 90 L 140 90"), /* @__PURE__ */ e.jsx("div", { style: {
429
+ }, P = () => {
430
+ o(""), b(null), g("e2s"), d("lag"), j(0);
431
+ }, I = () => {
432
+ if (!k) return null;
433
+ const p = c === "e2s", Y = c === "s2s", B = c === "e2e", H = c === "s2e";
434
+ let L = 0, ie = 0, K = "", ne = 0, G = -1;
435
+ return p ? (L = 20, ie = 160, ne = 140, G = 160, K = "M 140 40 L 150 40 C 160 40, 160 90, 150 90 L 160 90") : B ? (L = 60, ie = 60, ne = 180, G = -1, K = "M 180 40 L 200 40 L 200 90 L 180 90") : Y ? (L = 100, ie = 100, ne = 100, G = -1, K = "M 100 40 L 80 40 L 80 90 L 100 90") : H && (L = 160, ie = 20, ne = 160, G = 140, K = "M 160 40 L 150 40 C 140 40, 140 90, 150 90 L 140 90"), /* @__PURE__ */ e.jsx("div", { style: {
438
436
  width: "100%",
439
437
  height: 120,
440
438
  backgroundColor: "#fff",
@@ -444,75 +442,75 @@ const { Text: we, Paragraph: gn, Link: mn } = ft, { Option: dt } = ie, xn = ({
444
442
  position: "relative",
445
443
  overflow: "hidden"
446
444
  }, children: /* @__PURE__ */ e.jsxs("svg", { viewBox: "0 0 300 120", style: { width: "100%", height: "100%" }, children: [
447
- /* @__PURE__ */ e.jsx("line", { x1: g, x2: g, y1: "0", y2: "120", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
448
- $ !== -1 && /* @__PURE__ */ e.jsx("line", { x1: $, x2: $, y1: "0", y2: "120", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
449
- /* @__PURE__ */ e.jsx("rect", { x: U, y: "28", width: "120", height: "24", rx: "4", fill: "#bae7ff", stroke: "#69c0ff" }),
450
- /* @__PURE__ */ e.jsx("text", { x: U + 60, y: "44", fontSize: "11", textAnchor: "middle", fill: "#0050b3", children: "Task 2" }),
451
- /* @__PURE__ */ e.jsx("rect", { x: E, y: "78", width: "120", height: "24", rx: "4", fill: "#bae7ff", stroke: "#69c0ff" }),
452
- /* @__PURE__ */ e.jsx("text", { x: E + 60, y: "94", fontSize: "11", textAnchor: "middle", fill: "#0050b3", children: "Task 3" }),
453
- /* @__PURE__ */ e.jsx("path", { d: S, fill: "none", stroke: "#8c8c8c", strokeWidth: "1.5", markerEnd: "url(#arrowhead)" }),
445
+ /* @__PURE__ */ e.jsx("line", { x1: ne, x2: ne, y1: "0", y2: "120", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
446
+ G !== -1 && /* @__PURE__ */ e.jsx("line", { x1: G, x2: G, y1: "0", y2: "120", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
447
+ /* @__PURE__ */ e.jsx("rect", { x: L, y: "28", width: "120", height: "24", rx: "4", fill: "#bae7ff", stroke: "#69c0ff" }),
448
+ /* @__PURE__ */ e.jsx("text", { x: L + 60, y: "44", fontSize: "11", textAnchor: "middle", fill: "#0050b3", children: "Task 2" }),
449
+ /* @__PURE__ */ e.jsx("rect", { x: ie, y: "78", width: "120", height: "24", rx: "4", fill: "#bae7ff", stroke: "#69c0ff" }),
450
+ /* @__PURE__ */ e.jsx("text", { x: ie + 60, y: "94", fontSize: "11", textAnchor: "middle", fill: "#0050b3", children: "Task 3" }),
451
+ /* @__PURE__ */ e.jsx("path", { d: K, fill: "none", stroke: "#8c8c8c", strokeWidth: "1.5", markerEnd: "url(#arrowhead)" }),
454
452
  /* @__PURE__ */ e.jsx("defs", { children: /* @__PURE__ */ e.jsx("marker", { id: "arrowhead", markerWidth: "10", markerHeight: "7", refX: "9", refY: "3.5", orient: "auto", children: /* @__PURE__ */ e.jsx("polygon", { points: "0 0, 10 3.5, 0 7", fill: "#8c8c8c" }) }) })
455
453
  ] }) });
456
454
  }, X = () => {
457
- const x = r.find((U) => U.id === c);
458
- if (!x) return "Select a task from the list to see how it will relate to the current task.";
459
- const R = r.indexOf(t) + 1, P = r.indexOf(x) + 1;
460
- let J = "";
461
- switch (b) {
455
+ const p = n.find((L) => L.id === x);
456
+ if (!p) return "Select a task from the list to see how it will relate to the current task.";
457
+ const Y = n.indexOf(t) + 1, B = n.indexOf(p) + 1;
458
+ let H = "";
459
+ switch (c) {
462
460
  case "e2s":
463
- J = `Task ${R} starts after Task ${P} finishes`;
461
+ H = `Task ${Y} starts after Task ${B} finishes`;
464
462
  break;
465
463
  case "s2s":
466
- J = `Task ${R} starts when Task ${P} starts`;
464
+ H = `Task ${Y} starts when Task ${B} starts`;
467
465
  break;
468
466
  case "e2e":
469
- J = `Task ${R} finishes when Task ${P} finishes`;
467
+ H = `Task ${Y} finishes when Task ${B} finishes`;
470
468
  break;
471
469
  case "s2e":
472
- J = `Task ${R} finishes when Task ${P} starts`;
470
+ H = `Task ${Y} finishes when Task ${B} starts`;
473
471
  break;
474
472
  }
475
473
  if (u > 0) {
476
- const U = `${u} ${D}${u > 1 ? "s" : ""}`;
477
- k === "lag" ? J += ` + ${U} delay` : J += ` - ${U} overlap`;
474
+ const L = `${u} ${w}${u > 1 ? "s" : ""}`;
475
+ S === "lag" ? H += ` + ${L} delay` : H += ` - ${L} overlap`;
478
476
  }
479
- return J + ".";
480
- }, te = /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", width: 620, height: 480, backgroundColor: "#fff", borderRadius: "8px", overflow: "hidden" }, children: [
477
+ return H + ".";
478
+ }, Z = /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", width: 620, height: 480, backgroundColor: "#fff", borderRadius: "8px", overflow: "hidden" }, children: [
481
479
  /* @__PURE__ */ e.jsxs("div", { style: { flex: 1, borderRight: "1px solid #f0f0f0", display: "flex", flexDirection: "column", padding: 0 }, children: [
482
480
  /* @__PURE__ */ e.jsx("div", { style: { padding: "12px" }, children: /* @__PURE__ */ e.jsx(
483
- ve,
481
+ ye,
484
482
  {
485
483
  placeholder: "Search task...",
486
484
  value: l,
487
- onChange: (x) => o(x.target.value),
485
+ onChange: (p) => o(p.target.value),
488
486
  style: { marginBottom: 8 },
489
487
  autoFocus: !0,
490
488
  size: "large"
491
489
  }
492
490
  ) }),
493
491
  /* @__PURE__ */ e.jsx("div", { style: { flex: 1, overflowY: "auto" }, children: /* @__PURE__ */ e.jsx(
494
- $e,
492
+ Te,
495
493
  {
496
494
  size: "small",
497
- dataSource: Y,
498
- renderItem: (x) => /* @__PURE__ */ e.jsxs(
499
- $e.Item,
495
+ dataSource: C,
496
+ renderItem: (p) => /* @__PURE__ */ e.jsxs(
497
+ Te.Item,
500
498
  {
501
- className: `task-list-item ${c === x.id ? "selected" : ""}`,
502
- onClick: () => v(x.id),
499
+ className: `task-list-item ${x === p.id ? "selected" : ""}`,
500
+ onClick: () => b(p.id),
503
501
  style: {
504
502
  cursor: "pointer",
505
503
  padding: "8px 16px",
506
- backgroundColor: c === x.id ? "#f0f7ff" : "transparent",
504
+ backgroundColor: x === p.id ? "#f0f7ff" : "transparent",
507
505
  display: "flex",
508
506
  justifyContent: "space-between"
509
507
  },
510
508
  children: [
511
509
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 12 }, children: [
512
- /* @__PURE__ */ e.jsx(we, { type: "secondary", style: { width: 20 }, children: r.indexOf(x) + 1 }),
513
- /* @__PURE__ */ e.jsx(we, { children: x.text })
510
+ /* @__PURE__ */ e.jsx(ge, { type: "secondary", style: { width: 20 }, children: n.indexOf(p) + 1 }),
511
+ /* @__PURE__ */ e.jsx(ge, { children: p.text })
514
512
  ] }),
515
- /* @__PURE__ */ e.jsx(z, { icon: mt, style: { fontSize: 10, color: "#bfbfbf" } })
513
+ /* @__PURE__ */ e.jsx(N, { icon: pt, style: { fontSize: 10, color: "#bfbfbf" } })
516
514
  ]
517
515
  }
518
516
  )
@@ -521,60 +519,60 @@ const { Text: we, Paragraph: gn, Link: mn } = ft, { Option: dt } = ie, xn = ({
521
519
  ] }),
522
520
  /* @__PURE__ */ e.jsxs("div", { style: { width: 340, padding: "24px", display: "flex", flexDirection: "column", borderLeft: "1px solid #f0f0f0" }, children: [
523
521
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 15 }, children: [
524
- /* @__PURE__ */ e.jsx(we, { strong: !0, children: "Dependency type" }),
522
+ /* @__PURE__ */ e.jsx(ge, { strong: !0, children: "Dependency type" }),
525
523
  /* @__PURE__ */ e.jsx(
526
- mn,
524
+ xn,
527
525
  {
528
526
  style: { fontSize: "12px" },
529
- onClick: () => m(!_),
530
- children: _ ? "Hide preview" : "Show preview"
527
+ onClick: () => f(!k),
528
+ children: k ? "Hide preview" : "Show preview"
531
529
  }
532
530
  )
533
531
  ] }),
534
- A(),
535
- /* @__PURE__ */ e.jsx(gn, { style: { fontSize: "13px", color: "#262626", marginBottom: 20, minHeight: 48, lineHeight: "1.6" }, children: X() }),
532
+ I(),
533
+ /* @__PURE__ */ e.jsx(pn, { style: { fontSize: "13px", color: "#262626", marginBottom: 20, minHeight: 48, lineHeight: "1.6" }, children: X() }),
536
534
  /* @__PURE__ */ e.jsx(
537
- Ce.Group,
535
+ Me.Group,
538
536
  {
539
- value: b,
540
- onChange: (x) => j(x.target.value),
537
+ value: c,
538
+ onChange: (p) => g(p.target.value),
541
539
  style: { width: "100%", marginBottom: 20 },
542
- children: /* @__PURE__ */ e.jsxs(ge, { direction: "vertical", style: { width: "100%" }, children: [
540
+ children: /* @__PURE__ */ e.jsxs(de, { direction: "vertical", style: { width: "100%" }, children: [
543
541
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", justifyContent: "space-between", width: "100%" }, children: [
544
- /* @__PURE__ */ e.jsx(Ce, { value: "e2s", children: "Finish to Start" }),
545
- /* @__PURE__ */ e.jsx(we, { type: "secondary", children: "FS" })
542
+ /* @__PURE__ */ e.jsx(Me, { value: "e2s", children: "Finish to Start" }),
543
+ /* @__PURE__ */ e.jsx(ge, { type: "secondary", children: "FS" })
546
544
  ] }),
547
545
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", justifyContent: "space-between", width: "100%" }, children: [
548
- /* @__PURE__ */ e.jsx(Ce, { value: "e2e", children: "Finish to Finish" }),
549
- /* @__PURE__ */ e.jsx(we, { type: "secondary", children: "FF" })
546
+ /* @__PURE__ */ e.jsx(Me, { value: "e2e", children: "Finish to Finish" }),
547
+ /* @__PURE__ */ e.jsx(ge, { type: "secondary", children: "FF" })
550
548
  ] }),
551
549
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", justifyContent: "space-between", width: "100%" }, children: [
552
- /* @__PURE__ */ e.jsx(Ce, { value: "s2s", children: "Start to Start" }),
553
- /* @__PURE__ */ e.jsx(we, { type: "secondary", children: "SS" })
550
+ /* @__PURE__ */ e.jsx(Me, { value: "s2s", children: "Start to Start" }),
551
+ /* @__PURE__ */ e.jsx(ge, { type: "secondary", children: "SS" })
554
552
  ] }),
555
553
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", justifyContent: "space-between", width: "100%" }, children: [
556
- /* @__PURE__ */ e.jsx(Ce, { value: "s2e", children: "Start to Finish" }),
557
- /* @__PURE__ */ e.jsx(we, { type: "secondary", children: "SF" })
554
+ /* @__PURE__ */ e.jsx(Me, { value: "s2e", children: "Start to Finish" }),
555
+ /* @__PURE__ */ e.jsx(ge, { type: "secondary", children: "SF" })
558
556
  ] })
559
557
  ] })
560
558
  }
561
559
  ),
562
560
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: "10px", marginBottom: 20 }, children: [
563
561
  /* @__PURE__ */ e.jsxs("div", { style: { flex: 1 }, children: [
564
- /* @__PURE__ */ e.jsx(we, { type: "secondary", style: { fontSize: "11px", display: "block", marginBottom: 4 }, children: "Delay type" }),
565
- /* @__PURE__ */ e.jsxs(ie, { value: k, onChange: (x) => d(x), style: { width: "100%" }, size: "large", children: [
566
- /* @__PURE__ */ e.jsx(dt, { value: "lag", children: "Lag by" }),
567
- /* @__PURE__ */ e.jsx(dt, { value: "lead", children: "Lead by" })
562
+ /* @__PURE__ */ e.jsx(ge, { type: "secondary", style: { fontSize: "11px", display: "block", marginBottom: 4 }, children: "Delay type" }),
563
+ /* @__PURE__ */ e.jsxs(te, { value: S, onChange: (p) => d(p), style: { width: "100%" }, size: "large", children: [
564
+ /* @__PURE__ */ e.jsx(ct, { value: "lag", children: "Lag by" }),
565
+ /* @__PURE__ */ e.jsx(ct, { value: "lead", children: "Lead by" })
568
566
  ] })
569
567
  ] }),
570
568
  /* @__PURE__ */ e.jsxs("div", { style: { width: 100 }, children: [
571
- /* @__PURE__ */ e.jsx(we, { type: "secondary", style: { fontSize: "11px", display: "block", marginBottom: 4 }, children: "Days" }),
572
- /* @__PURE__ */ e.jsx(ge.Compact, { style: { width: "100%" }, children: /* @__PURE__ */ e.jsx(
573
- ke,
569
+ /* @__PURE__ */ e.jsx(ge, { type: "secondary", style: { fontSize: "11px", display: "block", marginBottom: 4 }, children: "Days" }),
570
+ /* @__PURE__ */ e.jsx(de.Compact, { style: { width: "100%" }, children: /* @__PURE__ */ e.jsx(
571
+ De,
574
572
  {
575
573
  min: 0,
576
574
  value: u,
577
- onChange: (x) => T(x || 0),
575
+ onChange: (p) => j(p || 0),
578
576
  style: { width: "100%" },
579
577
  placeholder: "0",
580
578
  size: "large"
@@ -583,12 +581,12 @@ const { Text: we, Paragraph: gn, Link: mn } = ft, { Option: dt } = ie, xn = ({
583
581
  ] })
584
582
  ] }),
585
583
  /* @__PURE__ */ e.jsx(
586
- se,
584
+ J,
587
585
  {
588
586
  type: "primary",
589
587
  block: !0,
590
- onClick: L,
591
- disabled: !c,
588
+ onClick: E,
589
+ disabled: !x,
592
590
  style: { marginTop: "auto", backgroundColor: "#5c67f2", height: 44, borderRadius: "6px" },
593
591
  children: "Add"
594
592
  }
@@ -598,50 +596,50 @@ const { Text: we, Paragraph: gn, Link: mn } = ft, { Option: dt } = ie, xn = ({
598
596
  return /* @__PURE__ */ e.jsx(
599
597
  zt,
600
598
  {
601
- content: te,
599
+ content: Z,
602
600
  trigger: "click",
603
601
  open: s,
604
- onOpenChange: p,
602
+ onOpenChange: h,
605
603
  placement: "bottomLeft",
606
604
  overlayClassName: "dependency-popover",
607
605
  overlayInnerStyle: { padding: 0 },
608
606
  children: i
609
607
  }
610
608
  );
611
- }, vt = qe(
612
- ({ tasks: t, allTasks: r = [], columns: a, selectedTask: i, onTaskClick: s, onTaskContextMenu: p, onTaskUpdate: l, onTaskDragStart: o, onAddTask: c, onAddDependency: v, links: b = [], dropIndicator: j, reorderTask: k }, d) => {
613
- const u = Be.useRef(null);
614
- Be.useImperativeHandle(d, () => u.current);
615
- const T = (m, D = 0) => {
616
- if (!m.parent) return D;
617
- const Y = t.find((L) => L.id === m.parent);
618
- return Y ? T(Y, D + 1) : D;
619
- }, _ = (m, D) => {
620
- if (D.template)
621
- return D.template(m);
622
- switch (D.name) {
609
+ }, wt = qe(
610
+ ({ tasks: t, allTasks: n = [], columns: a, selectedTask: i, onTaskClick: s, onTaskContextMenu: h, onTaskUpdate: l, onTaskDragStart: o, onAddTask: x, onAddDependency: b, links: c = [], dropIndicator: g, reorderTask: S }, d) => {
611
+ const u = Ee.useRef(null);
612
+ Ee.useImperativeHandle(d, () => u.current);
613
+ const j = (f, w = 0) => {
614
+ if (!f.parent) return w;
615
+ const C = t.find((E) => E.id === f.parent);
616
+ return C ? j(C, w + 1) : w;
617
+ }, k = (f, w) => {
618
+ if (w.template)
619
+ return w.template(f);
620
+ switch (w.name) {
623
621
  case "text":
624
- const Y = T(m);
625
- return /* @__PURE__ */ e.jsxs("div", { className: "gantt-grid-cell-text", style: { paddingLeft: Y * 14 }, children: [
622
+ const C = j(f);
623
+ return /* @__PURE__ */ e.jsxs("div", { className: "gantt-grid-cell-text", style: { paddingLeft: C * 14 }, children: [
626
624
  /* @__PURE__ */ e.jsx(
627
625
  "div",
628
626
  {
629
627
  className: "gantt-row-drag-handle",
630
- onMouseDown: (O) => {
631
- O.preventDefault(), o?.(m.id, O.clientX, O.clientY, "reorder");
628
+ onMouseDown: (P) => {
629
+ P.preventDefault(), o?.(f.id, P.clientX, P.clientY, "reorder");
632
630
  },
633
- children: /* @__PURE__ */ e.jsx(z, { icon: xt })
631
+ children: /* @__PURE__ */ e.jsx(N, { icon: xt })
634
632
  }
635
633
  ),
636
- m.type === "project" ? /* @__PURE__ */ e.jsx("span", { className: "gantt-tree-icon", onClick: (O) => {
637
- O.stopPropagation(), l?.({ ...m, open: !m.open });
638
- }, children: /* @__PURE__ */ e.jsx(z, { icon: m.open ? st : mt }) }) : /* @__PURE__ */ e.jsx("span", { style: { width: 16, display: "inline-block" } }),
639
- /* @__PURE__ */ e.jsx("span", { className: "gantt-task-name-text", children: m.text })
634
+ f.type === "project" ? /* @__PURE__ */ e.jsx("span", { className: "gantt-tree-icon", onClick: (P) => {
635
+ P.stopPropagation(), l?.({ ...f, open: !f.open });
636
+ }, children: /* @__PURE__ */ e.jsx(N, { icon: f.open ? nt : pt }) }) : /* @__PURE__ */ e.jsx("span", { style: { width: 16, display: "inline-block" } }),
637
+ /* @__PURE__ */ e.jsx("span", { className: "gantt-task-name-text", children: f.text })
640
638
  ] });
641
639
  case "start":
642
- return ce(m.start, "DD-MM-YYYY");
640
+ return ae(f.start, "DD-MM-YYYY");
643
641
  case "end":
644
- return ce(m.end, "DD-MM-YYYY");
642
+ return ae(f.end, "DD-MM-YYYY");
645
643
  case "duration":
646
644
  return /* @__PURE__ */ e.jsxs("div", { style: {
647
645
  backgroundColor: "#f6e7db",
@@ -653,19 +651,19 @@ const { Text: we, Paragraph: gn, Link: mn } = ft, { Option: dt } = ie, xn = ({
653
651
  minWidth: "70px",
654
652
  textAlign: "center"
655
653
  }, children: [
656
- m.duration,
654
+ f.duration,
657
655
  " day",
658
- m.duration !== 1 ? "s" : ""
656
+ f.duration !== 1 ? "s" : ""
659
657
  ] });
660
658
  case "predecessors":
661
- const L = b.filter((O) => O.target === m.id);
659
+ const E = c.filter((P) => P.target === f.id);
662
660
  return /* @__PURE__ */ e.jsx(
663
- xn,
661
+ gn,
664
662
  {
665
- task: m,
666
- allTasks: r,
667
- links: b,
668
- onAddDependency: (O, A, X, te) => v?.(O, A, X, te),
663
+ task: f,
664
+ allTasks: n,
665
+ links: c,
666
+ onAddDependency: (P, I, X, Z) => b?.(P, I, X, Z),
669
667
  children: /* @__PURE__ */ e.jsx("div", { style: {
670
668
  cursor: "pointer",
671
669
  minHeight: "24px",
@@ -673,8 +671,8 @@ const { Text: we, Paragraph: gn, Link: mn } = ft, { Option: dt } = ie, xn = ({
673
671
  display: "flex",
674
672
  alignItems: "center",
675
673
  gap: "4px"
676
- }, children: L.map((O) => {
677
- const A = r.find((te) => te.id === O.source), X = A ? r.indexOf(A) + 1 : 0;
674
+ }, children: E.map((P) => {
675
+ const I = n.find((Z) => Z.id === P.source), X = I ? n.indexOf(I) + 1 : 0;
678
676
  return /* @__PURE__ */ e.jsx(
679
677
  "span",
680
678
  {
@@ -687,22 +685,22 @@ const { Text: we, Paragraph: gn, Link: mn } = ft, { Option: dt } = ie, xn = ({
687
685
  borderRadius: "4px",
688
686
  whiteSpace: "nowrap"
689
687
  },
690
- children: fn(O, X)
688
+ children: hn(P, X)
691
689
  },
692
- O.id
690
+ P.id
693
691
  );
694
692
  }) })
695
693
  }
696
694
  );
697
695
  case "add":
698
696
  return /* @__PURE__ */ e.jsx(
699
- se,
697
+ J,
700
698
  {
701
699
  type: "text",
702
700
  size: "small",
703
- icon: /* @__PURE__ */ e.jsx(z, { icon: Ne, style: { fontSize: 12, color: "#adb5bd" } }),
704
- onClick: (O) => {
705
- O.stopPropagation(), c?.(m.id);
701
+ icon: /* @__PURE__ */ e.jsx(N, { icon: Fe, style: { fontSize: 12, color: "#adb5bd" } }),
702
+ onClick: (P) => {
703
+ P.stopPropagation(), x?.(f.id);
706
704
  }
707
705
  }
708
706
  );
@@ -712,104 +710,104 @@ const { Text: we, Paragraph: gn, Link: mn } = ft, { Option: dt } = ie, xn = ({
712
710
  "div",
713
711
  {
714
712
  className: "gantt-progress-bar-fill",
715
- style: { width: `${m.progress}%` }
713
+ style: { width: `${f.progress}%` }
716
714
  }
717
715
  ) }),
718
716
  /* @__PURE__ */ e.jsxs("span", { className: "gantt-progress-text", children: [
719
- m.progress,
717
+ f.progress,
720
718
  "%"
721
719
  ] })
722
720
  ] });
723
721
  case "index":
724
- return /* @__PURE__ */ e.jsx("span", { style: { color: "#8c8c8c" }, children: r.indexOf(m) + 1 });
722
+ return /* @__PURE__ */ e.jsx("span", { style: { color: "#8c8c8c" }, children: n.indexOf(f) + 1 });
725
723
  default:
726
- return m[D.name] || "";
724
+ return f[w.name] || "";
727
725
  }
728
726
  };
729
727
  return /* @__PURE__ */ e.jsxs("div", { className: "gantt-grid", ref: u, children: [
730
- /* @__PURE__ */ e.jsx("div", { className: "gantt-grid-header", children: a.map((m) => /* @__PURE__ */ e.jsx(
728
+ /* @__PURE__ */ e.jsx("div", { className: "gantt-grid-header", children: a.map((f) => /* @__PURE__ */ e.jsx(
731
729
  "div",
732
730
  {
733
731
  className: "gantt-grid-header-cell",
734
732
  style: {
735
- width: m.width,
736
- justifyContent: m.align === "center" ? "center" : "flex-start"
733
+ width: f.width,
734
+ justifyContent: f.align === "center" ? "center" : "flex-start"
737
735
  },
738
- children: m.name === "add" ? /* @__PURE__ */ e.jsx(
739
- z,
736
+ children: f.name === "add" ? /* @__PURE__ */ e.jsx(
737
+ N,
740
738
  {
741
- icon: Ne,
739
+ icon: Fe,
742
740
  style: { fontSize: 12, color: "#64748b", cursor: "pointer" },
743
- onClick: () => c?.()
741
+ onClick: () => x?.()
744
742
  }
745
743
  ) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
746
- m.label,
747
- m.name === "start" && /* @__PURE__ */ e.jsx(z, { icon: st, style: { marginLeft: 8, fontSize: 10, color: "#64748b" } })
744
+ f.label,
745
+ f.name === "start" && /* @__PURE__ */ e.jsx(N, { icon: nt, style: { marginLeft: 8, fontSize: 10, color: "#64748b" } })
748
746
  ] })
749
747
  },
750
- m.name
748
+ f.name
751
749
  )) }),
752
- /* @__PURE__ */ e.jsx("div", { className: "gantt-grid-body", children: t.map((m) => {
753
- const D = k?.id === m.id, Y = k?.descendantIds.includes(m.id);
750
+ /* @__PURE__ */ e.jsx("div", { className: "gantt-grid-body", children: t.map((f) => {
751
+ const w = S?.id === f.id, C = S?.descendantIds.includes(f.id);
754
752
  return /* @__PURE__ */ e.jsxs(
755
753
  "div",
756
754
  {
757
- className: `gantt-grid-row ${i === m.id ? "selected" : ""} ${D ? "dragging-row" : ""} ${Y ? "descendant-dragging-row" : ""} ${j?.taskId === m.id ? `drop-target-${j.position}` : ""}`,
758
- onClick: () => s(m.id),
759
- onContextMenu: (L) => p?.(L, m.id),
755
+ className: `gantt-grid-row ${i === f.id ? "selected" : ""} ${w ? "dragging-row" : ""} ${C ? "descendant-dragging-row" : ""} ${g?.taskId === f.id ? `drop-target-${g.position}` : ""}`,
756
+ onClick: () => s(f.id),
757
+ onContextMenu: (E) => h?.(E, f.id),
760
758
  children: [
761
- a.map((L) => /* @__PURE__ */ e.jsx(
759
+ a.map((E) => /* @__PURE__ */ e.jsx(
762
760
  "div",
763
761
  {
764
762
  className: "gantt-grid-cell",
765
763
  style: {
766
- width: L.width,
767
- textAlign: L.align || "left"
764
+ width: E.width,
765
+ textAlign: E.align || "left"
768
766
  },
769
- children: _(m, L)
767
+ children: k(f, E)
770
768
  },
771
- `${m.id}-${L.name}`
769
+ `${f.id}-${E.name}`
772
770
  )),
773
- j?.taskId === m.id && /* @__PURE__ */ e.jsx("div", { className: `gantt-drop-indicator ${j.position}` })
771
+ g?.taskId === f.id && /* @__PURE__ */ e.jsx("div", { className: `gantt-drop-indicator ${g.position}` })
774
772
  ]
775
773
  },
776
- m.id
774
+ f.id
777
775
  );
778
776
  }) })
779
777
  ] });
780
778
  }
781
779
  );
782
- vt.displayName = "Grid";
783
- const yn = ({
780
+ wt.displayName = "Grid";
781
+ const mn = ({
784
782
  task: t,
785
- position: r,
783
+ position: n,
786
784
  selected: a,
787
785
  dragging: i,
788
786
  onClick: s,
789
- onDragStart: p,
787
+ onDragStart: h,
790
788
  dragDeltaX: l = 0,
791
789
  dragType: o = null,
792
- readonly: c = !1
790
+ readonly: x = !1
793
791
  }) => {
794
- const v = (u, T) => {
795
- c || (u.preventDefault(), u.stopPropagation(), p(u.clientX, u.clientY, T));
796
- }, b = () => {
792
+ const b = (u, j) => {
793
+ x || (u.preventDefault(), u.stopPropagation(), h(u.clientX, u.clientY, j));
794
+ }, c = () => {
797
795
  const u = ["gantt-task-bar"];
798
796
  return t.type === "milestone" && u.push("milestone"), t.type === "project" && u.push("project"), a && u.push("selected"), i && u.push("dragging"), u.join(" ");
799
- }, j = () => {
800
- let u = r.left, T = r.width;
801
- return i && o && (o === "move" ? u += l : o === "resize-left" ? (u += l, T -= l) : o === "resize-right" && (T += l)), {
797
+ }, g = () => {
798
+ let u = n.left, j = n.width;
799
+ return i && o && (o === "move" ? u += l : o === "resize-left" ? (u += l, j -= l) : o === "resize-right" && (j += l)), {
802
800
  left: `${u}px`,
803
- width: `${Math.max(T, 0)}px`,
801
+ width: `${Math.max(j, 0)}px`,
804
802
  // Color handled by CSS classes (.project, .milestone) or task.color override
805
803
  backgroundColor: t.color || void 0
806
804
  };
807
- }, k = (u = !1) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
808
- !c && t.type !== "milestone" && !u && /* @__PURE__ */ e.jsx(
805
+ }, S = (u = !1) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
806
+ !x && t.type !== "milestone" && !u && /* @__PURE__ */ e.jsx(
809
807
  "div",
810
808
  {
811
809
  className: "gantt-task-resize-handle gantt-task-resize-left",
812
- onMouseDown: (T) => v(T, "resize-left")
810
+ onMouseDown: (j) => b(j, "resize-left")
813
811
  }
814
812
  ),
815
813
  !u && t.type !== "milestone" && /* @__PURE__ */ e.jsx(
@@ -824,19 +822,19 @@ const yn = ({
824
822
  /* @__PURE__ */ e.jsx("div", { className: "gantt-milestone-diamond" }),
825
823
  /* @__PURE__ */ e.jsx("span", { className: "gantt-milestone-text", children: t.text })
826
824
  ] }),
827
- !c && t.type !== "milestone" && !u && /* @__PURE__ */ e.jsx(
825
+ !x && t.type !== "milestone" && !u && /* @__PURE__ */ e.jsx(
828
826
  "div",
829
827
  {
830
828
  className: "gantt-task-resize-handle gantt-task-resize-right",
831
- onMouseDown: (T) => v(T, "resize-right")
829
+ onMouseDown: (j) => b(j, "resize-right")
832
830
  }
833
831
  )
834
832
  ] }), d = /* @__PURE__ */ e.jsxs("div", { className: "gantt-tooltip", children: [
835
833
  /* @__PURE__ */ e.jsx("div", { className: "gantt-tooltip-title", children: t.text }),
836
834
  /* @__PURE__ */ e.jsxs("div", { className: "gantt-tooltip-dates", children: [
837
- ce(t.start, "MMM D"),
835
+ ae(t.start, "MMM D"),
838
836
  " - ",
839
- ce(t.end, "MMM D")
837
+ ae(t.end, "MMM D")
840
838
  ] }),
841
839
  /* @__PURE__ */ e.jsxs("div", { className: "gantt-tooltip-progress", children: [
842
840
  "Progress: ",
@@ -848,89 +846,89 @@ const yn = ({
848
846
  t.owner
849
847
  ] })
850
848
  ] });
851
- return t.segments && t.segments.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "gantt-task-group", children: t.segments.map((u, T) => /* @__PURE__ */ e.jsx(ye, { title: d, mouseEnterDelay: 0.5, children: /* @__PURE__ */ e.jsx(
849
+ return t.segments && t.segments.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "gantt-task-group", children: t.segments.map((u, j) => /* @__PURE__ */ e.jsx(xe, { title: d, mouseEnterDelay: 0.5, children: /* @__PURE__ */ e.jsx(
852
850
  "div",
853
851
  {
854
- className: b() + " segment",
852
+ className: c() + " segment",
855
853
  style: {
856
- left: `${r.left + (u.start.getTime() - t.start.getTime()) / (t.end.getTime() - t.start.getTime()) * r.width}px`,
857
- width: `${(u.end.getTime() - u.start.getTime()) / (t.end.getTime() - t.start.getTime()) * r.width}px`,
854
+ left: `${n.left + (u.start.getTime() - t.start.getTime()) / (t.end.getTime() - t.start.getTime()) * n.width}px`,
855
+ width: `${(u.end.getTime() - u.start.getTime()) / (t.end.getTime() - t.start.getTime()) * n.width}px`,
858
856
  backgroundColor: t.color || "#ADCFFE"
859
857
  },
860
858
  onClick: s,
861
- onMouseDown: (_) => v(_, "move"),
862
- children: k(!0)
859
+ onMouseDown: (k) => b(k, "move"),
860
+ children: S(!0)
863
861
  }
864
- ) }, T)) }) : /* @__PURE__ */ e.jsx(ye, { title: d, mouseEnterDelay: 0.5, children: /* @__PURE__ */ e.jsx(
862
+ ) }, j)) }) : /* @__PURE__ */ e.jsx(xe, { title: d, mouseEnterDelay: 0.5, children: /* @__PURE__ */ e.jsx(
865
863
  "div",
866
864
  {
867
- className: b(),
868
- style: j(),
865
+ className: c(),
866
+ style: g(),
869
867
  onClick: s,
870
- onMouseDown: (u) => v(u, "move"),
871
- children: k()
868
+ onMouseDown: (u) => b(u, "move"),
869
+ children: S()
872
870
  }
873
871
  ) });
874
- }, wn = ({ links: t, tasks: r, getTaskPosition: a }) => {
875
- const i = (l) => r.find((o) => o.id === l), s = (l) => {
876
- const o = i(l.source), c = i(l.target);
877
- if (!o || !c) return "";
878
- const v = a(o), b = a(c), j = v.top + v.height / 2, k = b.top + b.height / 2;
872
+ }, yn = ({ links: t, tasks: n, getTaskPosition: a }) => {
873
+ const i = (l) => n.find((o) => o.id === l), s = (l) => {
874
+ const o = i(l.source), x = i(l.target);
875
+ if (!o || !x) return "";
876
+ const b = a(o), c = a(x), g = b.top + b.height / 2, S = c.top + c.height / 2;
879
877
  let d = 0, u = 0;
880
878
  switch (l.type) {
881
879
  case "e2s":
882
- d = v.left + v.width, u = b.left;
880
+ d = b.left + b.width, u = c.left;
883
881
  break;
884
882
  case "s2s":
885
- d = v.left, u = b.left;
883
+ d = b.left, u = c.left;
886
884
  break;
887
885
  case "e2e":
888
- d = v.left + v.width, u = b.left + b.width;
886
+ d = b.left + b.width, u = c.left + c.width;
889
887
  break;
890
888
  case "s2e":
891
- d = v.left, u = b.left + b.width;
889
+ d = b.left, u = c.left + c.width;
892
890
  break;
893
891
  }
894
- const T = u - d, _ = k - j, m = 20;
892
+ const j = u - d, k = S - g, f = 20;
895
893
  if (l.type === "e2s")
896
- if (T >= m) {
897
- const D = d + T / 2;
898
- return `M ${d},${j} L ${D},${j} L ${D},${k} L ${u},${k}`;
894
+ if (j >= f) {
895
+ const w = d + j / 2;
896
+ return `M ${d},${g} L ${w},${g} L ${w},${S} L ${u},${S}`;
899
897
  } else {
900
- const D = m / 2, Y = j + _ / 2;
901
- return `M ${d},${j} L ${d + D},${j} L ${d + D},${Y} L ${u - D},${Y} L ${u - D},${k} L ${u},${k}`;
898
+ const w = f / 2, C = g + k / 2;
899
+ return `M ${d},${g} L ${d + w},${g} L ${d + w},${C} L ${u - w},${C} L ${u - w},${S} L ${u},${S}`;
902
900
  }
903
901
  else if (l.type === "s2s") {
904
- const D = Math.min(d, u) - m / 2;
905
- return `M ${d},${j} L ${D},${j} L ${D},${k} L ${u},${k}`;
902
+ const w = Math.min(d, u) - f / 2;
903
+ return `M ${d},${g} L ${w},${g} L ${w},${S} L ${u},${S}`;
906
904
  } else if (l.type === "e2e") {
907
- const D = Math.max(d, u) + m / 2;
908
- return `M ${d},${j} L ${D},${j} L ${D},${k} L ${u},${k}`;
905
+ const w = Math.max(d, u) + f / 2;
906
+ return `M ${d},${g} L ${w},${g} L ${w},${S} L ${u},${S}`;
909
907
  } else if (l.type === "s2e")
910
- if (T <= -m) {
911
- const D = d + T / 2;
912
- return `M ${d},${j} L ${D},${j} L ${D},${k} L ${u},${k}`;
908
+ if (j <= -f) {
909
+ const w = d + j / 2;
910
+ return `M ${d},${g} L ${w},${g} L ${w},${S} L ${u},${S}`;
913
911
  } else {
914
- const D = m / 2, Y = j + _ / 2;
915
- return `M ${d},${j} L ${d - D},${j} L ${d - D},${Y} L ${u + D},${Y} L ${u + D},${k} L ${u},${k}`;
912
+ const w = f / 2, C = g + k / 2;
913
+ return `M ${d},${g} L ${d - w},${g} L ${d - w},${C} L ${u + w},${C} L ${u + w},${S} L ${u},${S}`;
916
914
  }
917
915
  return "";
918
- }, p = (l) => {
916
+ }, h = (l) => {
919
917
  const o = i(l.target);
920
918
  if (!o) return "";
921
- const c = a(o), v = c.top + c.height / 2, b = 8, j = 6;
922
- let k = 0, d = !0;
923
- return l.type === "e2s" || l.type === "s2s" ? (k = c.left, d = !0) : (k = c.left + c.width, d = !1), d ? `M ${k},${v} L ${k - b},${v - j / 2} L ${k - b},${v + j / 2} Z` : `M ${k},${v} L ${k + b},${v - j / 2} L ${k + b},${v + j / 2} Z`;
919
+ const x = a(o), b = x.top + x.height / 2, c = 8, g = 6;
920
+ let S = 0, d = !0;
921
+ return l.type === "e2s" || l.type === "s2s" ? (S = x.left, d = !0) : (S = x.left + x.width, d = !1), d ? `M ${S},${b} L ${S - c},${b - g / 2} L ${S - c},${b + g / 2} Z` : `M ${S},${b} L ${S + c},${b - g / 2} L ${S + c},${b + g / 2} Z`;
924
922
  };
925
923
  return /* @__PURE__ */ e.jsx("svg", { className: "gantt-links-layer", style: { overflow: "visible" }, children: t.map((l) => {
926
- const o = i(l.source), c = i(l.target);
927
- if (!o || !c) return null;
928
- const v = s(l), b = p(l);
924
+ const o = i(l.source), x = i(l.target);
925
+ if (!o || !x) return null;
926
+ const b = s(l), c = h(l);
929
927
  return /* @__PURE__ */ e.jsxs("g", { className: "gantt-link", children: [
930
928
  /* @__PURE__ */ e.jsx(
931
929
  "path",
932
930
  {
933
- d: v,
931
+ d: b,
934
932
  fill: "none",
935
933
  strokeWidth: "1.5",
936
934
  className: "gantt-link-line"
@@ -939,14 +937,14 @@ const yn = ({
939
937
  /* @__PURE__ */ e.jsx(
940
938
  "path",
941
939
  {
942
- d: b,
940
+ d: c,
943
941
  className: "gantt-link-arrow"
944
942
  }
945
943
  )
946
944
  ] }, l.id);
947
945
  }) });
948
- }, jn = (t, r, a = 60, i = "day", s = 1) => {
949
- const [p, l] = B({
946
+ }, jn = (t, n, a = 60, i = "day", s = 1) => {
947
+ const [h, l] = $({
950
948
  taskId: null,
951
949
  initialX: 0,
952
950
  initialY: 0,
@@ -955,52 +953,52 @@ const yn = ({
955
953
  type: null,
956
954
  dragDeltaX: 0,
957
955
  dragDeltaY: 0
958
- }), o = me((b, j, k, d) => {
959
- const u = t.find((T) => T.id === b);
956
+ }), o = ue((c, g, S, d) => {
957
+ const u = t.find((j) => j.id === c);
960
958
  u && l({
961
- taskId: b,
962
- initialX: j,
963
- initialY: k,
959
+ taskId: c,
960
+ initialX: g,
961
+ initialY: S,
964
962
  initialStart: new Date(u.start),
965
963
  initialEnd: new Date(u.end),
966
964
  type: d,
967
965
  dragDeltaX: 0,
968
966
  dragDeltaY: 0
969
967
  });
970
- }, [t]), c = me((b, j) => {
971
- if (!p.taskId || !p.type) return null;
972
- const k = b - p.initialX, d = j - p.initialY;
973
- if (l((Y) => ({
974
- ...Y,
975
- dragDeltaX: k,
968
+ }, [t]), x = ue((c, g) => {
969
+ if (!h.taskId || !h.type) return null;
970
+ const S = c - h.initialX, d = g - h.initialY;
971
+ if (l((C) => ({
972
+ ...C,
973
+ dragDeltaX: S,
976
974
  dragDeltaY: d
977
- })), p.type === "reorder") return null;
978
- const u = t.find((Y) => Y.id === p.taskId);
975
+ })), h.type === "reorder") return null;
976
+ const u = t.find((C) => C.id === h.taskId);
979
977
  if (!u) return null;
980
- const T = Math.round(k / a);
981
- let _ = new Date(p.initialStart), m = new Date(p.initialEnd);
982
- switch (p.type) {
978
+ const j = Math.round(S / a);
979
+ let k = new Date(h.initialStart), f = new Date(h.initialEnd);
980
+ switch (h.type) {
983
981
  case "move":
984
- _ = ae(p.initialStart, T * s, i), m = ae(p.initialEnd, T * s, i);
982
+ k = ee(h.initialStart, j * s, i), f = ee(h.initialEnd, j * s, i);
985
983
  break;
986
984
  case "resize-left":
987
- _ = ae(p.initialStart, T * s, i), _ >= m && (_ = ae(m, -s, i));
985
+ k = ee(h.initialStart, j * s, i), k >= f && (k = ee(f, -s, i));
988
986
  break;
989
987
  case "resize-right":
990
- m = ae(p.initialEnd, T * s, i), m <= _ && (m = ae(_, s, i));
988
+ f = ee(h.initialEnd, j * s, i), f <= k && (f = ee(k, s, i));
991
989
  break;
992
990
  }
993
- const D = Ie(_, m);
991
+ const w = _e(k, f);
994
992
  return {
995
993
  ...u,
996
- start: _,
997
- end: m,
998
- duration: D
994
+ start: k,
995
+ end: f,
996
+ duration: w
999
997
  };
1000
- }, [p, t, a]), v = me((b) => {
1001
- if (b && r) {
1002
- const { id: j, ...k } = b;
1003
- r(j, k);
998
+ }, [h, t, a]), b = ue((c) => {
999
+ if (c && n) {
1000
+ const { id: g, ...S } = c;
1001
+ n(g, S);
1004
1002
  }
1005
1003
  l({
1006
1004
  taskId: null,
@@ -1012,217 +1010,217 @@ const yn = ({
1012
1010
  dragDeltaX: 0,
1013
1011
  dragDeltaY: 0
1014
1012
  });
1015
- }, [r]);
1013
+ }, [n]);
1016
1014
  return {
1017
- dragState: p,
1015
+ dragState: h,
1018
1016
  handleDragStart: o,
1019
- handleDrag: c,
1020
- handleDragEnd: v
1017
+ handleDrag: x,
1018
+ handleDragEnd: b
1021
1019
  };
1022
1020
  }, bt = qe(
1023
1021
  ({
1024
1022
  tasks: t,
1025
- links: r,
1023
+ links: n,
1026
1024
  range: a,
1027
1025
  scales: i,
1028
1026
  config: s,
1029
- selectedTask: p,
1027
+ selectedTask: h,
1030
1028
  onTaskClick: l,
1031
1029
  onTaskDragStart: o,
1032
- onTaskDragEnd: c,
1033
- onTaskUpdate: v,
1034
- zoomLevel: b,
1035
- baselines: j
1036
- }, k) => {
1037
- const [d, u] = B(t), T = (s.columnWidth || 60) * b, _ = s.baselines && j && j.size > 0, { dragState: m, handleDragStart: D, handleDrag: Y, handleDragEnd: L } = jn(
1030
+ onTaskDragEnd: x,
1031
+ onTaskUpdate: b,
1032
+ zoomLevel: c,
1033
+ baselines: g
1034
+ }, S) => {
1035
+ const [d, u] = $(t), j = (s.columnWidth || 60) * c, k = s.baselines && g && g.size > 0, { dragState: f, handleDragStart: w, handleDrag: C, handleDragEnd: E } = jn(
1038
1036
  d,
1039
- v,
1040
- T,
1037
+ b,
1038
+ j,
1041
1039
  i[1].unit,
1042
1040
  i[1].step
1043
1041
  );
1044
- Be.useEffect(() => {
1042
+ Ee.useEffect(() => {
1045
1043
  u(t);
1046
1044
  }, [t]);
1047
- const O = (h) => {
1048
- const f = [];
1049
- let n = new Date(a.start);
1050
- for (; n <= a.end; )
1051
- f.push({
1052
- date: new Date(n),
1053
- label: ce(n, h.format || "D")
1054
- }), n = ae(n, h.step, h.unit);
1055
- return f;
1056
- }, A = (h) => {
1057
- const f = i[1], n = a.start.getTime(), C = h.getTime() - n, H = {
1045
+ const P = (v) => {
1046
+ const D = [];
1047
+ let r = new Date(a.start);
1048
+ for (; r <= a.end; )
1049
+ D.push({
1050
+ date: new Date(r),
1051
+ label: ae(r, v.format || "D")
1052
+ }), r = ee(r, v.step, v.unit);
1053
+ return D;
1054
+ }, I = (v) => {
1055
+ const D = i[1], r = a.start.getTime(), M = v.getTime() - r, U = {
1058
1056
  hour: 36e5,
1059
1057
  day: 864e5,
1060
1058
  week: 6048e5,
1061
1059
  month: 2592e6,
1062
1060
  quarter: 7776e6,
1063
1061
  year: 31536e6
1064
- }[f.unit] || 864e5;
1065
- return C / (H * f.step) * T;
1066
- }, X = (h) => {
1067
- const f = A(h.start), n = A(h.end);
1062
+ }[D.unit] || 864e5;
1063
+ return M / (U * D.step) * j;
1064
+ }, X = (v) => {
1065
+ const D = I(v.start), r = I(v.end);
1068
1066
  return {
1069
- left: f,
1070
- width: Math.max(n - f, 0)
1067
+ left: D,
1068
+ width: Math.max(r - D, 0)
1071
1069
  };
1072
- }, te = (h) => {
1073
- const f = A(h.start), n = A(h.end);
1070
+ }, Z = (v) => {
1071
+ const D = I(v.start), r = I(v.end);
1074
1072
  return {
1075
- left: f,
1076
- width: Math.max(n - f, 0)
1073
+ left: D,
1074
+ width: Math.max(r - D, 0)
1077
1075
  };
1078
- }, x = (h) => {
1079
- const f = X(h), n = d.findIndex((H) => H.id === h.id), y = s.rowHeight || 48, C = 32, N = (y - C) / 2;
1076
+ }, p = (v) => {
1077
+ const D = X(v), r = d.findIndex((U) => U.id === v.id), m = s.rowHeight || 48, M = 32, F = (m - M) / 2;
1080
1078
  return {
1081
- left: f.left,
1082
- width: f.width,
1083
- top: n * y + N,
1084
- height: C
1079
+ left: D.left,
1080
+ width: D.width,
1081
+ top: r * m + F,
1082
+ height: M
1085
1083
  };
1086
- }, R = me((h) => {
1087
- if (m.taskId && m.type) {
1088
- const f = Y(h.clientX, h.clientY);
1089
- f && u(
1090
- (n) => n.map((y) => y.id === f.id ? f : y)
1084
+ }, Y = ue((v) => {
1085
+ if (f.taskId && f.type) {
1086
+ const D = C(v.clientX, v.clientY);
1087
+ D && u(
1088
+ (r) => r.map((m) => m.id === D.id ? D : m)
1091
1089
  );
1092
1090
  }
1093
- }, [m, Y]), P = me(() => {
1094
- if (m.taskId) {
1095
- const h = d.find((f) => f.id === m.taskId);
1096
- L(h || null), c();
1091
+ }, [f, C]), B = ue(() => {
1092
+ if (f.taskId) {
1093
+ const v = d.find((D) => D.id === f.taskId);
1094
+ E(v || null), x();
1097
1095
  }
1098
- }, [m, d, L, c]), J = i[1], U = O(J), E = () => {
1099
- const h = [];
1100
- let f = -1, n = -1, y = 0, C = "";
1101
- return U.forEach((N) => {
1102
- const H = N.date.getMonth(), K = N.date.getFullYear(), I = ce(N.date, "MMM YYYY");
1103
- H !== f || K !== n ? (f !== -1 && h.push({ label: C, width: y }), f = H, n = K, y = T, C = I) : y += T;
1104
- }), f !== -1 && h.push({ label: C, width: y }), h;
1105
- }, S = () => {
1106
- const h = [];
1107
- let f = -1, n = 0, y = -1, C = -1, N = "";
1108
- return U.forEach((H) => {
1109
- const I = H.date.getDate() <= 15 ? 0 : 1, ee = H.date.getMonth(), ne = H.date.getFullYear(), q = ce(H.date, "MMM"), ue = new Date(ne, ee + 1, 0).getDate(), he = I === 0 ? `${q} 1 - 15` : `${q} 16 - ${ue}`;
1110
- I !== f || ee !== y || ne !== C ? (f !== -1 && h.push({ label: N, width: n }), f = I, y = ee, C = ne, n = T, N = he) : n += T;
1111
- }), f !== -1 && h.push({ label: N, width: n }), h;
1112
- }, g = E(), $ = S(), w = U.length * T;
1096
+ }, [f, d, E, x]), H = i[1], L = P(H), ie = () => {
1097
+ const v = [];
1098
+ let D = -1, r = -1, m = 0, M = "";
1099
+ return L.forEach((F) => {
1100
+ const U = F.date.getMonth(), he = F.date.getFullYear(), A = ae(F.date, "MMM YYYY");
1101
+ U !== D || he !== r ? (D !== -1 && v.push({ label: M, width: m }), D = U, r = he, m = j, M = A) : m += j;
1102
+ }), D !== -1 && v.push({ label: M, width: m }), v;
1103
+ }, K = () => {
1104
+ const v = [];
1105
+ let D = -1, r = 0, m = -1, M = -1, F = "";
1106
+ return L.forEach((U) => {
1107
+ const A = U.date.getDate() <= 15 ? 0 : 1, q = U.date.getMonth(), fe = U.date.getFullYear(), je = ae(U.date, "MMM"), $e = new Date(fe, q + 1, 0).getDate(), He = A === 0 ? `${je} 1 - 15` : `${je} 16 - ${$e}`;
1108
+ A !== D || q !== m || fe !== M ? (D !== -1 && v.push({ label: F, width: r }), D = A, m = q, M = fe, r = j, F = He) : r += j;
1109
+ }), D !== -1 && v.push({ label: F, width: r }), v;
1110
+ }, ne = ie(), G = K(), _ = L.length * j;
1113
1111
  return /* @__PURE__ */ e.jsxs(
1114
1112
  "div",
1115
1113
  {
1116
1114
  className: "gantt-timeline-container",
1117
- ref: k,
1118
- onMouseMove: R,
1119
- onMouseUp: P,
1120
- style: { width: w },
1115
+ ref: S,
1116
+ onMouseMove: Y,
1117
+ onMouseUp: B,
1118
+ style: { width: _ },
1121
1119
  children: [
1122
- /* @__PURE__ */ e.jsxs("div", { className: "gantt-timeline-header", style: { width: w, minWidth: w }, children: [
1123
- /* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-month", style: { width: w }, children: g.map((h, f) => /* @__PURE__ */ e.jsx(
1120
+ /* @__PURE__ */ e.jsxs("div", { className: "gantt-timeline-header", style: { width: _, minWidth: _ }, children: [
1121
+ /* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-month", style: { width: _ }, children: ne.map((v, D) => /* @__PURE__ */ e.jsx(
1124
1122
  "div",
1125
1123
  {
1126
1124
  className: "gantt-timeline-cell",
1127
1125
  style: {
1128
- width: h.width,
1129
- minWidth: h.width,
1130
- maxWidth: h.width,
1131
- borderRight: f === g.length - 1 ? "none" : "var(--wx-gantt-border)"
1126
+ width: v.width,
1127
+ minWidth: v.width,
1128
+ maxWidth: v.width,
1129
+ borderRight: D === ne.length - 1 ? "none" : "var(--wx-gantt-border)"
1132
1130
  },
1133
- children: h.label
1131
+ children: v.label
1134
1132
  },
1135
- `top-${f}`
1133
+ `top-${D}`
1136
1134
  )) }),
1137
- /* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-range", style: { width: w }, children: $.map((h, f) => /* @__PURE__ */ e.jsx(
1135
+ /* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-range", style: { width: _ }, children: G.map((v, D) => /* @__PURE__ */ e.jsx(
1138
1136
  "div",
1139
1137
  {
1140
1138
  className: "gantt-timeline-cell",
1141
1139
  style: {
1142
- width: h.width,
1143
- minWidth: h.width,
1144
- maxWidth: h.width,
1145
- borderRight: f === $.length - 1 ? "none" : "var(--wx-gantt-border)"
1140
+ width: v.width,
1141
+ minWidth: v.width,
1142
+ maxWidth: v.width,
1143
+ borderRight: D === G.length - 1 ? "none" : "var(--wx-gantt-border)"
1146
1144
  },
1147
- children: h.label
1145
+ children: v.label
1148
1146
  },
1149
- `mid-${f}`
1147
+ `mid-${D}`
1150
1148
  )) }),
1151
- /* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-day", style: { width: w }, children: U.map((h, f) => {
1152
- const n = s.weekends && lt(h.date), y = s.holidays && ct(h.date, s.holidays);
1149
+ /* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-day", style: { width: _ }, children: L.map((v, D) => {
1150
+ const r = s.weekends && ot(v.date), m = s.holidays && lt(v.date, s.holidays);
1153
1151
  return /* @__PURE__ */ e.jsx(
1154
1152
  "div",
1155
1153
  {
1156
- className: `gantt-timeline-cell ${n ? "weekend" : ""} ${y ? "holiday" : ""}`,
1154
+ className: `gantt-timeline-cell ${r ? "weekend" : ""} ${m ? "holiday" : ""}`,
1157
1155
  style: {
1158
- width: T,
1159
- minWidth: T,
1160
- maxWidth: T,
1161
- borderRight: f === U.length - 1 ? "none" : "var(--wx-gantt-border)"
1156
+ width: j,
1157
+ minWidth: j,
1158
+ maxWidth: j,
1159
+ borderRight: D === L.length - 1 ? "none" : "var(--wx-gantt-border)"
1162
1160
  },
1163
- children: h.label
1161
+ children: v.label
1164
1162
  },
1165
- `day-${f}`
1163
+ `day-${D}`
1166
1164
  );
1167
1165
  }) })
1168
1166
  ] }),
1169
- /* @__PURE__ */ e.jsxs("div", { className: "gantt-timeline-body", style: { width: w }, children: [
1170
- /* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-grid", children: U.map((h, f) => {
1171
- const n = s.weekends && lt(h.date), y = s.holidays && ct(h.date, s.holidays);
1167
+ /* @__PURE__ */ e.jsxs("div", { className: "gantt-timeline-body", style: { width: _ }, children: [
1168
+ /* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-grid", children: L.map((v, D) => {
1169
+ const r = s.weekends && ot(v.date), m = s.holidays && lt(v.date, s.holidays);
1172
1170
  return /* @__PURE__ */ e.jsx(
1173
1171
  "div",
1174
1172
  {
1175
- className: `gantt-timeline-grid-column ${n ? "weekend" : ""} ${y ? "holiday" : ""}`,
1176
- style: { width: T, minWidth: T }
1173
+ className: `gantt-timeline-grid-column ${r ? "weekend" : ""} ${m ? "holiday" : ""}`,
1174
+ style: { width: j, minWidth: j }
1177
1175
  },
1178
- f
1176
+ D
1179
1177
  );
1180
1178
  }) }),
1181
- r.length > 0 && /* @__PURE__ */ e.jsx(
1182
- wn,
1179
+ n.length > 0 && /* @__PURE__ */ e.jsx(
1180
+ yn,
1183
1181
  {
1184
- links: r,
1182
+ links: n,
1185
1183
  tasks: d,
1186
- getTaskPosition: x
1184
+ getTaskPosition: p
1187
1185
  }
1188
1186
  ),
1189
- /* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-tasks", style: { width: w }, children: d.map((h) => {
1190
- const f = X(h), n = _ ? j?.get(h.id) : void 0, y = n ? te(n) : void 0;
1187
+ /* @__PURE__ */ e.jsx("div", { className: "gantt-timeline-tasks", style: { width: _ }, children: d.map((v) => {
1188
+ const D = X(v), r = k ? g?.get(v.id) : void 0, m = r ? Z(r) : void 0;
1191
1189
  return /* @__PURE__ */ e.jsxs(
1192
1190
  "div",
1193
1191
  {
1194
1192
  className: "gantt-timeline-row",
1195
1193
  children: [
1196
- n && y && h.type !== "milestone" && /* @__PURE__ */ e.jsx(
1194
+ r && m && v.type !== "milestone" && /* @__PURE__ */ e.jsx(
1197
1195
  "div",
1198
1196
  {
1199
1197
  className: "gantt-baseline-bar",
1200
1198
  style: {
1201
- left: `${y.left}px`,
1202
- width: `${y.width}px`
1199
+ left: `${m.left}px`,
1200
+ width: `${m.width}px`
1203
1201
  },
1204
- title: `Baseline: ${n.start.toLocaleDateString()} - ${n.end.toLocaleDateString()}`
1202
+ title: `Baseline: ${r.start.toLocaleDateString()} - ${r.end.toLocaleDateString()}`
1205
1203
  }
1206
1204
  ),
1207
1205
  /* @__PURE__ */ e.jsx(
1208
- yn,
1206
+ mn,
1209
1207
  {
1210
- task: h,
1211
- position: f,
1212
- selected: p === h.id,
1213
- dragging: m.taskId === h.id,
1214
- dragDeltaX: m.dragDeltaX,
1215
- dragType: m.type,
1216
- onClick: () => l(h.id),
1217
- onDragStart: (C, N, H) => {
1218
- D(h.id, C, N, H), o(h.id, C, N);
1208
+ task: v,
1209
+ position: D,
1210
+ selected: h === v.id,
1211
+ dragging: f.taskId === v.id,
1212
+ dragDeltaX: f.dragDeltaX,
1213
+ dragType: f.type,
1214
+ onClick: () => l(v.id),
1215
+ onDragStart: (M, F, U) => {
1216
+ w(v.id, M, F, U), o(v.id, M, F);
1219
1217
  },
1220
1218
  readonly: s.readonly
1221
1219
  }
1222
1220
  )
1223
1221
  ]
1224
1222
  },
1225
- h.id
1223
+ v.id
1226
1224
  );
1227
1225
  }) })
1228
1226
  ] })
@@ -1232,18 +1230,18 @@ const yn = ({
1232
1230
  }
1233
1231
  );
1234
1232
  bt.displayName = "Timeline";
1235
- const St = qe((t, r) => /* @__PURE__ */ e.jsx("div", { className: "gantt-chart-wrapper", style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ e.jsx(bt, { ...t, ref: r }) }));
1236
- St.displayName = "Chart";
1237
- const { Search: vn } = ve, bn = ({ onFilterChange: t, owners: r }) => {
1238
- const [a, i] = B({
1233
+ const vt = qe((t, n) => /* @__PURE__ */ e.jsx("div", { className: "gantt-chart-wrapper", style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ e.jsx(bt, { ...t, ref: n }) }));
1234
+ vt.displayName = "Chart";
1235
+ const { Search: wn } = ye, bn = ({ onFilterChange: t, owners: n = [] }) => {
1236
+ const [a, i] = $({
1239
1237
  searchText: "",
1240
1238
  status: "all",
1241
1239
  priority: "all",
1242
1240
  owner: ""
1243
1241
  }), s = (o) => {
1244
- const c = { ...a, ...o };
1245
- i(c), t(c);
1246
- }, p = () => {
1242
+ const x = { ...a, ...o };
1243
+ i(x), t(x);
1244
+ }, h = () => {
1247
1245
  const o = {
1248
1246
  searchText: "",
1249
1247
  status: "all",
@@ -1254,7 +1252,7 @@ const { Search: vn } = ve, bn = ({ onFilterChange: t, owners: r }) => {
1254
1252
  }, l = a.searchText !== "" || a.status !== "all" || a.priority !== "all" || a.owner !== "";
1255
1253
  return /* @__PURE__ */ e.jsx("div", { className: "gantt-filter-container", children: /* @__PURE__ */ e.jsxs("div", { className: "gantt-filter-bar", children: [
1256
1254
  /* @__PURE__ */ e.jsx("div", { className: "gantt-filter-left", children: /* @__PURE__ */ e.jsx(
1257
- vn,
1255
+ wn,
1258
1256
  {
1259
1257
  placeholder: "Search tasks...",
1260
1258
  value: a.searchText,
@@ -1266,7 +1264,7 @@ const { Search: vn } = ve, bn = ({ onFilterChange: t, owners: r }) => {
1266
1264
  ) }),
1267
1265
  /* @__PURE__ */ e.jsxs("div", { className: "gantt-filter-right", children: [
1268
1266
  /* @__PURE__ */ e.jsx(
1269
- ie,
1267
+ te,
1270
1268
  {
1271
1269
  value: a.status,
1272
1270
  onChange: (o) => s({ status: o }),
@@ -1281,7 +1279,7 @@ const { Search: vn } = ve, bn = ({ onFilterChange: t, owners: r }) => {
1281
1279
  }
1282
1280
  ),
1283
1281
  /* @__PURE__ */ e.jsx(
1284
- ie,
1282
+ te,
1285
1283
  {
1286
1284
  value: a.priority,
1287
1285
  onChange: (o) => s({ priority: o }),
@@ -1296,7 +1294,7 @@ const { Search: vn } = ve, bn = ({ onFilterChange: t, owners: r }) => {
1296
1294
  }
1297
1295
  ),
1298
1296
  /* @__PURE__ */ e.jsx(
1299
- ie,
1297
+ te,
1300
1298
  {
1301
1299
  value: a.owner || void 0,
1302
1300
  onChange: (o) => s({ owner: o || "" }),
@@ -1306,116 +1304,116 @@ const { Search: vn } = ve, bn = ({ onFilterChange: t, owners: r }) => {
1306
1304
  allowClear: !0,
1307
1305
  options: [
1308
1306
  { value: "", label: "All Owners" },
1309
- ...r.map((o) => ({ value: o, label: o }))
1307
+ ...(n || []).map((o) => ({ value: o, label: o }))
1310
1308
  ]
1311
1309
  }
1312
1310
  ),
1313
1311
  l && /* @__PURE__ */ e.jsx(
1314
- se,
1312
+ J,
1315
1313
  {
1316
1314
  type: "default",
1317
1315
  danger: !0,
1318
- icon: /* @__PURE__ */ e.jsx(z, { icon: Wt }),
1319
- onClick: p,
1316
+ icon: /* @__PURE__ */ e.jsx(N, { icon: Wt }),
1317
+ onClick: h,
1320
1318
  className: "gantt-filter-clear-antd",
1321
1319
  children: "Clear"
1322
1320
  }
1323
1321
  )
1324
1322
  ] })
1325
1323
  ] }) });
1326
- }, Sn = (t, r) => t.filter((a) => {
1327
- if (r.searchText) {
1328
- const i = r.searchText.toLowerCase(), s = a.text.toLowerCase().includes(i), p = a.owner?.toLowerCase().includes(i), l = a.details?.toLowerCase().includes(i);
1329
- if (!s && !p && !l)
1324
+ }, vn = (t, n) => t.filter((a) => {
1325
+ if (n.searchText) {
1326
+ const i = n.searchText.toLowerCase(), s = a.text.toLowerCase().includes(i), h = a.owner?.toLowerCase().includes(i), l = a.details?.toLowerCase().includes(i);
1327
+ if (!s && !h && !l)
1330
1328
  return !1;
1331
1329
  }
1332
- if (r.status !== "all" && (a.progress === 0 ? "not-started" : a.progress === 100 ? "completed" : "in-progress") !== r.status || r.priority !== "all" && a.priority !== r.priority || r.owner && a.owner !== r.owner)
1330
+ if (n.status !== "all" && (a.progress === 0 ? "not-started" : a.progress === 100 ? "completed" : "in-progress") !== n.status || n.priority !== "all" && a.priority !== n.priority || n.owner && a.owner !== n.owner)
1333
1331
  return !1;
1334
- if (r.dateRange) {
1335
- const i = a.start.getTime(), s = r.dateRange.start.getTime(), p = r.dateRange.end.getTime();
1336
- if (i < s || i > p)
1332
+ if (n.dateRange) {
1333
+ const i = a.start.getTime(), s = n.dateRange.start.getTime(), h = n.dateRange.end.getTime();
1334
+ if (i < s || i > h)
1337
1335
  return !1;
1338
1336
  }
1339
1337
  return !0;
1340
- }), Dn = ({
1338
+ }), Sn = ({
1341
1339
  zoomLevel: t,
1342
- setZoomLevel: r,
1340
+ setZoomLevel: n,
1343
1341
  onBaselineToggle: a,
1344
1342
  showBaselines: i,
1345
1343
  onExport: s,
1346
- onFilterChange: p,
1344
+ onFilterChange: h,
1347
1345
  owners: l,
1348
1346
  onAddTask: o
1349
1347
  }) => /* @__PURE__ */ e.jsxs("div", { className: "gantt-toolbar-wrapper", children: [
1350
1348
  /* @__PURE__ */ e.jsxs("div", { className: "gantt-toolbar", children: [
1351
- /* @__PURE__ */ e.jsx("div", { className: "gantt-toolbar-left", children: /* @__PURE__ */ e.jsxs(ge, { size: 8, children: [
1349
+ /* @__PURE__ */ e.jsx("div", { className: "gantt-toolbar-left", children: /* @__PURE__ */ e.jsxs(de, { size: 8, children: [
1352
1350
  /* @__PURE__ */ e.jsx(
1353
- se,
1351
+ J,
1354
1352
  {
1355
1353
  type: "primary",
1356
- icon: /* @__PURE__ */ e.jsx(z, { icon: Ne }),
1354
+ icon: /* @__PURE__ */ e.jsx(N, { icon: Fe }),
1357
1355
  onClick: o,
1358
1356
  children: "New Task"
1359
1357
  }
1360
1358
  ),
1361
- /* @__PURE__ */ e.jsx(ye, { title: i ? "Hide Baselines" : "Show Baselines", children: /* @__PURE__ */ e.jsx(
1362
- se,
1359
+ /* @__PURE__ */ e.jsx(xe, { title: i ? "Hide Baselines" : "Show Baselines", children: /* @__PURE__ */ e.jsx(
1360
+ J,
1363
1361
  {
1364
1362
  type: i ? "primary" : "default",
1365
- icon: /* @__PURE__ */ e.jsx(z, { icon: Ut }),
1363
+ icon: /* @__PURE__ */ e.jsx(N, { icon: Ut }),
1366
1364
  onClick: a,
1367
1365
  children: i ? "Baselines" : "Set Baseline"
1368
1366
  }
1369
1367
  ) })
1370
1368
  ] }) }),
1371
- /* @__PURE__ */ e.jsx("div", { className: "gantt-toolbar-right", children: /* @__PURE__ */ e.jsxs(ge, { size: 4, children: [
1372
- /* @__PURE__ */ e.jsx(ye, { title: "Zoom Out", children: /* @__PURE__ */ e.jsx(
1373
- se,
1369
+ /* @__PURE__ */ e.jsx("div", { className: "gantt-toolbar-right", children: /* @__PURE__ */ e.jsxs(de, { size: 4, children: [
1370
+ /* @__PURE__ */ e.jsx(xe, { title: "Zoom Out", children: /* @__PURE__ */ e.jsx(
1371
+ J,
1374
1372
  {
1375
- icon: /* @__PURE__ */ e.jsx(z, { icon: Jt }),
1376
- onClick: () => r(Math.max(0.5, t - 0.25))
1373
+ icon: /* @__PURE__ */ e.jsx(N, { icon: Vt }),
1374
+ onClick: () => n(Math.max(0.5, t - 0.25))
1377
1375
  }
1378
1376
  ) }),
1379
- /* @__PURE__ */ e.jsx(ye, { title: "Zoom In", children: /* @__PURE__ */ e.jsx(
1380
- se,
1377
+ /* @__PURE__ */ e.jsx(xe, { title: "Zoom In", children: /* @__PURE__ */ e.jsx(
1378
+ J,
1381
1379
  {
1382
- icon: /* @__PURE__ */ e.jsx(z, { icon: Vt }),
1383
- onClick: () => r(Math.min(2, t + 0.25))
1380
+ icon: /* @__PURE__ */ e.jsx(N, { icon: Xt }),
1381
+ onClick: () => n(Math.min(2, t + 0.25))
1384
1382
  }
1385
1383
  ) }),
1386
- /* @__PURE__ */ e.jsx(ye, { title: "Reset Zoom", children: /* @__PURE__ */ e.jsx(
1387
- se,
1384
+ /* @__PURE__ */ e.jsx(xe, { title: "Reset Zoom", children: /* @__PURE__ */ e.jsx(
1385
+ J,
1388
1386
  {
1389
- icon: /* @__PURE__ */ e.jsx(z, { icon: yt }),
1390
- onClick: () => r(1)
1387
+ icon: /* @__PURE__ */ e.jsx(N, { icon: gt }),
1388
+ onClick: () => n(1)
1391
1389
  }
1392
1390
  ) }),
1393
- /* @__PURE__ */ e.jsx(Le, { type: "vertical", style: { height: 24, margin: "0 4px" } }),
1394
- /* @__PURE__ */ e.jsx(ye, { title: "Export to CSV", children: /* @__PURE__ */ e.jsx(
1395
- se,
1391
+ /* @__PURE__ */ e.jsx(Ae, { type: "vertical", style: { height: 24, margin: "0 4px" } }),
1392
+ /* @__PURE__ */ e.jsx(xe, { title: "Export to CSV", children: /* @__PURE__ */ e.jsx(
1393
+ J,
1396
1394
  {
1397
- icon: /* @__PURE__ */ e.jsx(z, { icon: Xt }),
1395
+ icon: /* @__PURE__ */ e.jsx(N, { icon: Jt }),
1398
1396
  onClick: () => s("csv")
1399
1397
  }
1400
1398
  ) }),
1401
- /* @__PURE__ */ e.jsx(ye, { title: "Export to Excel", children: /* @__PURE__ */ e.jsx(
1402
- se,
1399
+ /* @__PURE__ */ e.jsx(xe, { title: "Export to Excel", children: /* @__PURE__ */ e.jsx(
1400
+ J,
1403
1401
  {
1404
- icon: /* @__PURE__ */ e.jsx(z, { icon: Gt }),
1402
+ icon: /* @__PURE__ */ e.jsx(N, { icon: Gt }),
1405
1403
  onClick: () => s("excel")
1406
1404
  }
1407
1405
  ) }),
1408
- /* @__PURE__ */ e.jsx(ye, { title: "Export to JSON", children: /* @__PURE__ */ e.jsx(
1409
- se,
1406
+ /* @__PURE__ */ e.jsx(xe, { title: "Export to JSON", children: /* @__PURE__ */ e.jsx(
1407
+ J,
1410
1408
  {
1411
- icon: /* @__PURE__ */ e.jsx(z, { icon: qt }),
1409
+ icon: /* @__PURE__ */ e.jsx(N, { icon: qt }),
1412
1410
  onClick: () => s("json")
1413
1411
  }
1414
1412
  ) }),
1415
- /* @__PURE__ */ e.jsx(ye, { title: "Export to PDF", children: /* @__PURE__ */ e.jsx(
1416
- se,
1413
+ /* @__PURE__ */ e.jsx(xe, { title: "Export to PDF", children: /* @__PURE__ */ e.jsx(
1414
+ J,
1417
1415
  {
1418
- icon: /* @__PURE__ */ e.jsx(z, { icon: Zt }),
1416
+ icon: /* @__PURE__ */ e.jsx(N, { icon: Zt }),
1419
1417
  onClick: () => s("pdf")
1420
1418
  }
1421
1419
  ) })
@@ -1424,296 +1422,16 @@ const { Search: vn } = ve, bn = ({ onFilterChange: t, owners: r }) => {
1424
1422
  /* @__PURE__ */ e.jsx(
1425
1423
  bn,
1426
1424
  {
1427
- onFilterChange: p,
1425
+ onFilterChange: h,
1428
1426
  owners: l
1429
1427
  }
1430
1428
  )
1431
- ] });
1432
- var Ae = { exports: {} }, Mn = Ae.exports, ut;
1433
- function Tn() {
1434
- return ut || (ut = 1, (function(t, r) {
1435
- (function(a, i) {
1436
- t.exports = i();
1437
- })(Mn, (function() {
1438
- var a = 1e3, i = 6e4, s = 36e5, p = "millisecond", l = "second", o = "minute", c = "hour", v = "day", b = "week", j = "month", k = "quarter", d = "year", u = "date", T = "Invalid Date", _ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, m = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, D = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(E) {
1439
- var S = ["th", "st", "nd", "rd"], g = E % 100;
1440
- return "[" + E + (S[(g - 20) % 10] || S[g] || S[0]) + "]";
1441
- } }, Y = function(E, S, g) {
1442
- var $ = String(E);
1443
- return !$ || $.length >= S ? E : "" + Array(S + 1 - $.length).join(g) + E;
1444
- }, L = { s: Y, z: function(E) {
1445
- var S = -E.utcOffset(), g = Math.abs(S), $ = Math.floor(g / 60), w = g % 60;
1446
- return (S <= 0 ? "+" : "-") + Y($, 2, "0") + ":" + Y(w, 2, "0");
1447
- }, m: function E(S, g) {
1448
- if (S.date() < g.date()) return -E(g, S);
1449
- var $ = 12 * (g.year() - S.year()) + (g.month() - S.month()), w = S.clone().add($, j), h = g - w < 0, f = S.clone().add($ + (h ? -1 : 1), j);
1450
- return +(-($ + (g - w) / (h ? w - f : f - w)) || 0);
1451
- }, a: function(E) {
1452
- return E < 0 ? Math.ceil(E) || 0 : Math.floor(E);
1453
- }, p: function(E) {
1454
- return { M: j, y: d, w: b, d: v, D: u, h: c, m: o, s: l, ms: p, Q: k }[E] || String(E || "").toLowerCase().replace(/s$/, "");
1455
- }, u: function(E) {
1456
- return E === void 0;
1457
- } }, O = "en", A = {};
1458
- A[O] = D;
1459
- var X = "$isDayjsObject", te = function(E) {
1460
- return E instanceof J || !(!E || !E[X]);
1461
- }, x = function E(S, g, $) {
1462
- var w;
1463
- if (!S) return O;
1464
- if (typeof S == "string") {
1465
- var h = S.toLowerCase();
1466
- A[h] && (w = h), g && (A[h] = g, w = h);
1467
- var f = S.split("-");
1468
- if (!w && f.length > 1) return E(f[0]);
1469
- } else {
1470
- var n = S.name;
1471
- A[n] = S, w = n;
1472
- }
1473
- return !$ && w && (O = w), w || !$ && O;
1474
- }, R = function(E, S) {
1475
- if (te(E)) return E.clone();
1476
- var g = typeof S == "object" ? S : {};
1477
- return g.date = E, g.args = arguments, new J(g);
1478
- }, P = L;
1479
- P.l = x, P.i = te, P.w = function(E, S) {
1480
- return R(E, { locale: S.$L, utc: S.$u, x: S.$x, $offset: S.$offset });
1481
- };
1482
- var J = (function() {
1483
- function E(g) {
1484
- this.$L = x(g.locale, null, !0), this.parse(g), this.$x = this.$x || g.x || {}, this[X] = !0;
1485
- }
1486
- var S = E.prototype;
1487
- return S.parse = function(g) {
1488
- this.$d = (function($) {
1489
- var w = $.date, h = $.utc;
1490
- if (w === null) return /* @__PURE__ */ new Date(NaN);
1491
- if (P.u(w)) return /* @__PURE__ */ new Date();
1492
- if (w instanceof Date) return new Date(w);
1493
- if (typeof w == "string" && !/Z$/i.test(w)) {
1494
- var f = w.match(_);
1495
- if (f) {
1496
- var n = f[2] - 1 || 0, y = (f[7] || "0").substring(0, 3);
1497
- return h ? new Date(Date.UTC(f[1], n, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, y)) : new Date(f[1], n, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, y);
1498
- }
1499
- }
1500
- return new Date(w);
1501
- })(g), this.init();
1502
- }, S.init = function() {
1503
- var g = this.$d;
1504
- this.$y = g.getFullYear(), this.$M = g.getMonth(), this.$D = g.getDate(), this.$W = g.getDay(), this.$H = g.getHours(), this.$m = g.getMinutes(), this.$s = g.getSeconds(), this.$ms = g.getMilliseconds();
1505
- }, S.$utils = function() {
1506
- return P;
1507
- }, S.isValid = function() {
1508
- return this.$d.toString() !== T;
1509
- }, S.isSame = function(g, $) {
1510
- var w = R(g);
1511
- return this.startOf($) <= w && w <= this.endOf($);
1512
- }, S.isAfter = function(g, $) {
1513
- return R(g) < this.startOf($);
1514
- }, S.isBefore = function(g, $) {
1515
- return this.endOf($) < R(g);
1516
- }, S.$g = function(g, $, w) {
1517
- return P.u(g) ? this[$] : this.set(w, g);
1518
- }, S.unix = function() {
1519
- return Math.floor(this.valueOf() / 1e3);
1520
- }, S.valueOf = function() {
1521
- return this.$d.getTime();
1522
- }, S.startOf = function(g, $) {
1523
- var w = this, h = !!P.u($) || $, f = P.p(g), n = function(ne, q) {
1524
- var ue = P.w(w.$u ? Date.UTC(w.$y, q, ne) : new Date(w.$y, q, ne), w);
1525
- return h ? ue : ue.endOf(v);
1526
- }, y = function(ne, q) {
1527
- return P.w(w.toDate()[ne].apply(w.toDate("s"), (h ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(q)), w);
1528
- }, C = this.$W, N = this.$M, H = this.$D, K = "set" + (this.$u ? "UTC" : "");
1529
- switch (f) {
1530
- case d:
1531
- return h ? n(1, 0) : n(31, 11);
1532
- case j:
1533
- return h ? n(1, N) : n(0, N + 1);
1534
- case b:
1535
- var I = this.$locale().weekStart || 0, ee = (C < I ? C + 7 : C) - I;
1536
- return n(h ? H - ee : H + (6 - ee), N);
1537
- case v:
1538
- case u:
1539
- return y(K + "Hours", 0);
1540
- case c:
1541
- return y(K + "Minutes", 1);
1542
- case o:
1543
- return y(K + "Seconds", 2);
1544
- case l:
1545
- return y(K + "Milliseconds", 3);
1546
- default:
1547
- return this.clone();
1548
- }
1549
- }, S.endOf = function(g) {
1550
- return this.startOf(g, !1);
1551
- }, S.$set = function(g, $) {
1552
- var w, h = P.p(g), f = "set" + (this.$u ? "UTC" : ""), n = (w = {}, w[v] = f + "Date", w[u] = f + "Date", w[j] = f + "Month", w[d] = f + "FullYear", w[c] = f + "Hours", w[o] = f + "Minutes", w[l] = f + "Seconds", w[p] = f + "Milliseconds", w)[h], y = h === v ? this.$D + ($ - this.$W) : $;
1553
- if (h === j || h === d) {
1554
- var C = this.clone().set(u, 1);
1555
- C.$d[n](y), C.init(), this.$d = C.set(u, Math.min(this.$D, C.daysInMonth())).$d;
1556
- } else n && this.$d[n](y);
1557
- return this.init(), this;
1558
- }, S.set = function(g, $) {
1559
- return this.clone().$set(g, $);
1560
- }, S.get = function(g) {
1561
- return this[P.p(g)]();
1562
- }, S.add = function(g, $) {
1563
- var w, h = this;
1564
- g = Number(g);
1565
- var f = P.p($), n = function(N) {
1566
- var H = R(h);
1567
- return P.w(H.date(H.date() + Math.round(N * g)), h);
1568
- };
1569
- if (f === j) return this.set(j, this.$M + g);
1570
- if (f === d) return this.set(d, this.$y + g);
1571
- if (f === v) return n(1);
1572
- if (f === b) return n(7);
1573
- var y = (w = {}, w[o] = i, w[c] = s, w[l] = a, w)[f] || 1, C = this.$d.getTime() + g * y;
1574
- return P.w(C, this);
1575
- }, S.subtract = function(g, $) {
1576
- return this.add(-1 * g, $);
1577
- }, S.format = function(g) {
1578
- var $ = this, w = this.$locale();
1579
- if (!this.isValid()) return w.invalidDate || T;
1580
- var h = g || "YYYY-MM-DDTHH:mm:ssZ", f = P.z(this), n = this.$H, y = this.$m, C = this.$M, N = w.weekdays, H = w.months, K = w.meridiem, I = function(q, ue, he, Se) {
1581
- return q && (q[ue] || q($, h)) || he[ue].slice(0, Se);
1582
- }, ee = function(q) {
1583
- return P.s(n % 12 || 12, q, "0");
1584
- }, ne = K || function(q, ue, he) {
1585
- var Se = q < 12 ? "AM" : "PM";
1586
- return he ? Se.toLowerCase() : Se;
1587
- };
1588
- return h.replace(m, (function(q, ue) {
1589
- return ue || (function(he) {
1590
- switch (he) {
1591
- case "YY":
1592
- return String($.$y).slice(-2);
1593
- case "YYYY":
1594
- return P.s($.$y, 4, "0");
1595
- case "M":
1596
- return C + 1;
1597
- case "MM":
1598
- return P.s(C + 1, 2, "0");
1599
- case "MMM":
1600
- return I(w.monthsShort, C, H, 3);
1601
- case "MMMM":
1602
- return I(H, C);
1603
- case "D":
1604
- return $.$D;
1605
- case "DD":
1606
- return P.s($.$D, 2, "0");
1607
- case "d":
1608
- return String($.$W);
1609
- case "dd":
1610
- return I(w.weekdaysMin, $.$W, N, 2);
1611
- case "ddd":
1612
- return I(w.weekdaysShort, $.$W, N, 3);
1613
- case "dddd":
1614
- return N[$.$W];
1615
- case "H":
1616
- return String(n);
1617
- case "HH":
1618
- return P.s(n, 2, "0");
1619
- case "h":
1620
- return ee(1);
1621
- case "hh":
1622
- return ee(2);
1623
- case "a":
1624
- return ne(n, y, !0);
1625
- case "A":
1626
- return ne(n, y, !1);
1627
- case "m":
1628
- return String(y);
1629
- case "mm":
1630
- return P.s(y, 2, "0");
1631
- case "s":
1632
- return String($.$s);
1633
- case "ss":
1634
- return P.s($.$s, 2, "0");
1635
- case "SSS":
1636
- return P.s($.$ms, 3, "0");
1637
- case "Z":
1638
- return f;
1639
- }
1640
- return null;
1641
- })(q) || f.replace(":", "");
1642
- }));
1643
- }, S.utcOffset = function() {
1644
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1645
- }, S.diff = function(g, $, w) {
1646
- var h, f = this, n = P.p($), y = R(g), C = (y.utcOffset() - this.utcOffset()) * i, N = this - y, H = function() {
1647
- return P.m(f, y);
1648
- };
1649
- switch (n) {
1650
- case d:
1651
- h = H() / 12;
1652
- break;
1653
- case j:
1654
- h = H();
1655
- break;
1656
- case k:
1657
- h = H() / 3;
1658
- break;
1659
- case b:
1660
- h = (N - C) / 6048e5;
1661
- break;
1662
- case v:
1663
- h = (N - C) / 864e5;
1664
- break;
1665
- case c:
1666
- h = N / s;
1667
- break;
1668
- case o:
1669
- h = N / i;
1670
- break;
1671
- case l:
1672
- h = N / a;
1673
- break;
1674
- default:
1675
- h = N;
1676
- }
1677
- return w ? h : P.a(h);
1678
- }, S.daysInMonth = function() {
1679
- return this.endOf(j).$D;
1680
- }, S.$locale = function() {
1681
- return A[this.$L];
1682
- }, S.locale = function(g, $) {
1683
- if (!g) return this.$L;
1684
- var w = this.clone(), h = x(g, $, !0);
1685
- return h && (w.$L = h), w;
1686
- }, S.clone = function() {
1687
- return P.w(this.$d, this);
1688
- }, S.toDate = function() {
1689
- return new Date(this.valueOf());
1690
- }, S.toJSON = function() {
1691
- return this.isValid() ? this.toISOString() : null;
1692
- }, S.toISOString = function() {
1693
- return this.$d.toISOString();
1694
- }, S.toString = function() {
1695
- return this.$d.toUTCString();
1696
- }, E;
1697
- })(), U = J.prototype;
1698
- return R.prototype = U, [["$ms", p], ["$s", l], ["$m", o], ["$H", c], ["$W", v], ["$M", j], ["$y", d], ["$D", u]].forEach((function(E) {
1699
- U[E[1]] = function(S) {
1700
- return this.$g(S, E[0], E[1]);
1701
- };
1702
- })), R.extend = function(E, S) {
1703
- return E.$i || (E(S, J, R), E.$i = !0), R;
1704
- }, R.locale = x, R.isDayjs = te, R.unix = function(E) {
1705
- return R(1e3 * E);
1706
- }, R.en = A[O], R.Ls = A, R.p = {}, R;
1707
- }));
1708
- })(Ae)), Ae.exports;
1709
- }
1710
- var $n = Tn();
1711
- const Dt = /* @__PURE__ */ on($n), { Option: Me } = ie, { TextArea: kn } = ve, Cn = ({ onCreateTask: t, onClose: r }) => {
1712
- const [a] = G.useForm(), i = (s) => {
1713
- const p = s.start.toDate(), l = new Date(p);
1429
+ ] }), { Option: ve } = te, { TextArea: Tn } = ye, Dn = ({ onCreateTask: t, onClose: n }) => {
1430
+ const [a] = z.useForm(), i = (s) => {
1431
+ const h = s.start.toDate(), l = new Date(h);
1714
1432
  l.setDate(l.getDate() + (s.duration || 1)), t({
1715
1433
  text: s.text,
1716
- start: p,
1434
+ start: h,
1717
1435
  end: l,
1718
1436
  duration: s.duration || 1,
1719
1437
  progress: s.progress || 0,
@@ -1722,21 +1440,21 @@ const Dt = /* @__PURE__ */ on($n), { Option: Me } = ie, { TextArea: kn } = ve, C
1722
1440
  owner: s.owner || "",
1723
1441
  priority: s.priority || "medium",
1724
1442
  details: s.details || ""
1725
- }), r();
1443
+ }), n();
1726
1444
  };
1727
1445
  return /* @__PURE__ */ e.jsx(
1728
- ze,
1446
+ Be,
1729
1447
  {
1730
1448
  title: "Create New Task",
1731
1449
  open: !0,
1732
- onCancel: r,
1450
+ onCancel: n,
1733
1451
  onOk: () => a.submit(),
1734
1452
  okText: "Create Task",
1735
1453
  cancelText: "Cancel",
1736
1454
  width: 600,
1737
1455
  className: "gantt-modal-antd",
1738
1456
  children: /* @__PURE__ */ e.jsxs(
1739
- G,
1457
+ z,
1740
1458
  {
1741
1459
  form: a,
1742
1460
  layout: "vertical",
@@ -1744,56 +1462,56 @@ const Dt = /* @__PURE__ */ on($n), { Option: Me } = ie, { TextArea: kn } = ve, C
1744
1462
  initialValues: {
1745
1463
  type: "task",
1746
1464
  priority: "medium",
1747
- start: Dt(),
1465
+ start: jt(),
1748
1466
  duration: 1,
1749
1467
  progress: 0,
1750
1468
  color: "#4A90E2"
1751
1469
  },
1752
1470
  children: [
1753
1471
  /* @__PURE__ */ e.jsx(
1754
- G.Item,
1472
+ z.Item,
1755
1473
  {
1756
1474
  name: "text",
1757
1475
  label: "Task Name",
1758
1476
  rules: [{ required: !0, message: "Please enter task name" }],
1759
- children: /* @__PURE__ */ e.jsx(ve, { placeholder: "Enter task name", autoFocus: !0 })
1477
+ children: /* @__PURE__ */ e.jsx(ye, { placeholder: "Enter task name", autoFocus: !0 })
1760
1478
  }
1761
1479
  ),
1762
1480
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
1763
- /* @__PURE__ */ e.jsx(G.Item, { name: "type", label: "Type", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(ie, { children: [
1764
- /* @__PURE__ */ e.jsx(Me, { value: "task", children: "Task" }),
1765
- /* @__PURE__ */ e.jsx(Me, { value: "milestone", children: "Milestone" }),
1766
- /* @__PURE__ */ e.jsx(Me, { value: "project", children: "Project" })
1481
+ /* @__PURE__ */ e.jsx(z.Item, { name: "type", label: "Type", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(te, { children: [
1482
+ /* @__PURE__ */ e.jsx(ve, { value: "task", children: "Task" }),
1483
+ /* @__PURE__ */ e.jsx(ve, { value: "milestone", children: "Milestone" }),
1484
+ /* @__PURE__ */ e.jsx(ve, { value: "project", children: "Project" })
1767
1485
  ] }) }),
1768
- /* @__PURE__ */ e.jsx(G.Item, { name: "priority", label: "Priority", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(ie, { children: [
1769
- /* @__PURE__ */ e.jsx(Me, { value: "low", children: "Low" }),
1770
- /* @__PURE__ */ e.jsx(Me, { value: "medium", children: "Medium" }),
1771
- /* @__PURE__ */ e.jsx(Me, { value: "high", children: "High" })
1486
+ /* @__PURE__ */ e.jsx(z.Item, { name: "priority", label: "Priority", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(te, { children: [
1487
+ /* @__PURE__ */ e.jsx(ve, { value: "low", children: "Low" }),
1488
+ /* @__PURE__ */ e.jsx(ve, { value: "medium", children: "Medium" }),
1489
+ /* @__PURE__ */ e.jsx(ve, { value: "high", children: "High" })
1772
1490
  ] }) })
1773
1491
  ] }),
1774
1492
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
1775
- /* @__PURE__ */ e.jsx(G.Item, { name: "start", label: "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(pt, { style: { width: "100%" } }) }),
1776
- /* @__PURE__ */ e.jsx(G.Item, { name: "duration", label: "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(ke, { min: 0, style: { width: "100%" } }) })
1493
+ /* @__PURE__ */ e.jsx(z.Item, { name: "start", label: "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(ht, { style: { width: "100%" } }) }),
1494
+ /* @__PURE__ */ e.jsx(z.Item, { name: "duration", label: "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(De, { min: 0, style: { width: "100%" } }) })
1777
1495
  ] }),
1778
1496
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
1779
- /* @__PURE__ */ e.jsx(G.Item, { name: "color", label: "Color", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(gt, { showText: !0 }) }),
1780
- /* @__PURE__ */ e.jsx(G.Item, { name: "progress", label: "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(ke, { min: 0, max: 100, style: { width: "100%" } }) })
1497
+ /* @__PURE__ */ e.jsx(z.Item, { name: "color", label: "Color", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(ft, { showText: !0 }) }),
1498
+ /* @__PURE__ */ e.jsx(z.Item, { name: "progress", label: "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(De, { min: 0, max: 100, style: { width: "100%" } }) })
1781
1499
  ] }),
1782
- /* @__PURE__ */ e.jsx(G.Item, { name: "owner", label: "Owner", children: /* @__PURE__ */ e.jsx(ve, { placeholder: "Assign to..." }) }),
1783
- /* @__PURE__ */ e.jsx(G.Item, { name: "details", label: "Details", children: /* @__PURE__ */ e.jsx(kn, { placeholder: "Add task description...", rows: 3 }) })
1500
+ /* @__PURE__ */ e.jsx(z.Item, { name: "owner", label: "Owner", children: /* @__PURE__ */ e.jsx(ye, { placeholder: "Assign to..." }) }),
1501
+ /* @__PURE__ */ e.jsx(z.Item, { name: "details", label: "Details", children: /* @__PURE__ */ e.jsx(Tn, { placeholder: "Add task description...", rows: 3 }) })
1784
1502
  ]
1785
1503
  }
1786
1504
  )
1787
1505
  }
1788
1506
  );
1789
- }, { Option: Te } = ie, { TextArea: En } = ve, { confirm: Fn } = ze, Nn = ({ task: t, onUpdate: r, onDelete: a, onClose: i }) => {
1790
- const [s] = G.useForm(), p = (o) => {
1791
- const c = o.start.toDate(), v = new Date(c);
1792
- v.setDate(v.getDate() + (o.duration || 1)), r({
1507
+ }, { Option: Se } = te, { TextArea: Mn } = ye, { confirm: kn } = Be, Cn = ({ task: t, onUpdate: n, onDelete: a, onClose: i }) => {
1508
+ const [s] = z.useForm(), h = (o) => {
1509
+ const x = o.start.toDate(), b = new Date(x);
1510
+ b.setDate(b.getDate() + (o.duration || 1)), n({
1793
1511
  ...t,
1794
1512
  text: o.text,
1795
- start: c,
1796
- end: v,
1513
+ start: x,
1514
+ end: b,
1797
1515
  duration: o.duration || 1,
1798
1516
  progress: o.progress || 0,
1799
1517
  type: o.type,
@@ -1803,9 +1521,9 @@ const Dt = /* @__PURE__ */ on($n), { Option: Me } = ie, { TextArea: kn } = ve, C
1803
1521
  details: o.details || ""
1804
1522
  }), i();
1805
1523
  }, l = () => {
1806
- Fn({
1524
+ kn({
1807
1525
  title: `Are you sure you want to delete "${t.text}"?`,
1808
- icon: /* @__PURE__ */ e.jsx(z, { icon: Kt, style: { color: "#faad14", marginRight: 8 } }),
1526
+ icon: /* @__PURE__ */ e.jsx(N, { icon: Kt, style: { color: "#faad14", marginRight: 8 } }),
1809
1527
  content: "This action cannot be undone.",
1810
1528
  okText: "Yes, Delete",
1811
1529
  okType: "danger",
@@ -1816,29 +1534,29 @@ const Dt = /* @__PURE__ */ on($n), { Option: Me } = ie, { TextArea: kn } = ve, C
1816
1534
  });
1817
1535
  };
1818
1536
  return /* @__PURE__ */ e.jsx(
1819
- ze,
1537
+ Be,
1820
1538
  {
1821
1539
  title: "Edit Task",
1822
1540
  open: !0,
1823
1541
  onCancel: i,
1824
1542
  footer: [
1825
- /* @__PURE__ */ e.jsx(se, { danger: !0, onClick: l, style: { float: "left" }, children: "Delete" }, "delete"),
1826
- /* @__PURE__ */ e.jsx(se, { onClick: i, children: "Cancel" }, "cancel"),
1827
- /* @__PURE__ */ e.jsx(se, { type: "primary", onClick: () => s.submit(), children: "Save Changes" }, "submit")
1543
+ /* @__PURE__ */ e.jsx(J, { danger: !0, onClick: l, style: { float: "left" }, children: "Delete" }, "delete"),
1544
+ /* @__PURE__ */ e.jsx(J, { onClick: i, children: "Cancel" }, "cancel"),
1545
+ /* @__PURE__ */ e.jsx(J, { type: "primary", onClick: () => s.submit(), children: "Save Changes" }, "submit")
1828
1546
  ],
1829
1547
  width: 600,
1830
1548
  className: "gantt-modal-antd",
1831
1549
  children: /* @__PURE__ */ e.jsxs(
1832
- G,
1550
+ z,
1833
1551
  {
1834
1552
  form: s,
1835
1553
  layout: "vertical",
1836
- onFinish: p,
1554
+ onFinish: h,
1837
1555
  initialValues: {
1838
1556
  text: t.text,
1839
1557
  type: t.type || "task",
1840
1558
  priority: t.priority || "medium",
1841
- start: Dt(t.start),
1559
+ start: jt(t.start),
1842
1560
  duration: t.duration,
1843
1561
  progress: t.progress,
1844
1562
  color: t.color || "#4A90E2",
@@ -1847,71 +1565,71 @@ const Dt = /* @__PURE__ */ on($n), { Option: Me } = ie, { TextArea: kn } = ve, C
1847
1565
  },
1848
1566
  children: [
1849
1567
  /* @__PURE__ */ e.jsx(
1850
- G.Item,
1568
+ z.Item,
1851
1569
  {
1852
1570
  name: "text",
1853
1571
  label: "Task Name",
1854
1572
  rules: [{ required: !0, message: "Please enter task name" }],
1855
- children: /* @__PURE__ */ e.jsx(ve, { placeholder: "Enter task name" })
1573
+ children: /* @__PURE__ */ e.jsx(ye, { placeholder: "Enter task name" })
1856
1574
  }
1857
1575
  ),
1858
1576
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
1859
- /* @__PURE__ */ e.jsx(G.Item, { name: "type", label: "Type", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(ie, { children: [
1860
- /* @__PURE__ */ e.jsx(Te, { value: "task", children: "Task" }),
1861
- /* @__PURE__ */ e.jsx(Te, { value: "milestone", children: "Milestone" }),
1862
- /* @__PURE__ */ e.jsx(Te, { value: "project", children: "Project" })
1577
+ /* @__PURE__ */ e.jsx(z.Item, { name: "type", label: "Type", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(te, { children: [
1578
+ /* @__PURE__ */ e.jsx(Se, { value: "task", children: "Task" }),
1579
+ /* @__PURE__ */ e.jsx(Se, { value: "milestone", children: "Milestone" }),
1580
+ /* @__PURE__ */ e.jsx(Se, { value: "project", children: "Project" })
1863
1581
  ] }) }),
1864
- /* @__PURE__ */ e.jsx(G.Item, { name: "priority", label: "Priority", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(ie, { children: [
1865
- /* @__PURE__ */ e.jsx(Te, { value: "low", children: "Low" }),
1866
- /* @__PURE__ */ e.jsx(Te, { value: "medium", children: "Medium" }),
1867
- /* @__PURE__ */ e.jsx(Te, { value: "high", children: "High" })
1582
+ /* @__PURE__ */ e.jsx(z.Item, { name: "priority", label: "Priority", style: { flex: 1 }, children: /* @__PURE__ */ e.jsxs(te, { children: [
1583
+ /* @__PURE__ */ e.jsx(Se, { value: "low", children: "Low" }),
1584
+ /* @__PURE__ */ e.jsx(Se, { value: "medium", children: "Medium" }),
1585
+ /* @__PURE__ */ e.jsx(Se, { value: "high", children: "High" })
1868
1586
  ] }) })
1869
1587
  ] }),
1870
1588
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
1871
- /* @__PURE__ */ e.jsx(G.Item, { name: "start", label: "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(pt, { style: { width: "100%" } }) }),
1872
- /* @__PURE__ */ e.jsx(G.Item, { name: "duration", label: "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(ke, { min: 0, style: { width: "100%" } }) })
1589
+ /* @__PURE__ */ e.jsx(z.Item, { name: "start", label: "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(ht, { style: { width: "100%" } }) }),
1590
+ /* @__PURE__ */ e.jsx(z.Item, { name: "duration", label: "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(De, { min: 0, style: { width: "100%" } }) })
1873
1591
  ] }),
1874
1592
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
1875
- /* @__PURE__ */ e.jsx(G.Item, { name: "color", label: "Color", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(gt, { showText: !0 }) }),
1876
- /* @__PURE__ */ e.jsx(G.Item, { name: "progress", label: "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(ke, { min: 0, max: 100, style: { width: "100%" } }) })
1593
+ /* @__PURE__ */ e.jsx(z.Item, { name: "color", label: "Color", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(ft, { showText: !0 }) }),
1594
+ /* @__PURE__ */ e.jsx(z.Item, { name: "progress", label: "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ e.jsx(De, { min: 0, max: 100, style: { width: "100%" } }) })
1877
1595
  ] }),
1878
- /* @__PURE__ */ e.jsx(G.Item, { name: "owner", label: "Owner", children: /* @__PURE__ */ e.jsx(ve, { placeholder: "Assign to..." }) }),
1879
- /* @__PURE__ */ e.jsx(G.Item, { name: "details", label: "Details", children: /* @__PURE__ */ e.jsx(En, { placeholder: "Add task description...", rows: 3 }) })
1596
+ /* @__PURE__ */ e.jsx(z.Item, { name: "owner", label: "Owner", children: /* @__PURE__ */ e.jsx(ye, { placeholder: "Assign to..." }) }),
1597
+ /* @__PURE__ */ e.jsx(z.Item, { name: "details", label: "Details", children: /* @__PURE__ */ e.jsx(Mn, { placeholder: "Add task description...", rows: 3 }) })
1880
1598
  ]
1881
1599
  }
1882
1600
  )
1883
1601
  }
1884
1602
  );
1885
- }, { Title: Oe, Text: pe, Paragraph: ht } = ft, { Option: je } = ie, Pn = ({
1603
+ }, { Title: Le, Text: ce, Paragraph: dt } = ut, { Option: me } = te, En = ({
1886
1604
  task: t,
1887
- allTasks: r,
1605
+ allTasks: n,
1888
1606
  links: a,
1889
1607
  onAddDependency: i,
1890
1608
  onRemoveDependency: s,
1891
- onClose: p
1609
+ onClose: h
1892
1610
  }) => {
1893
- const [l, o] = B(""), [c, v] = B("e2s"), [b, j] = B(0), [k, d] = B("day"), [u, T] = B(""), _ = a.filter((x) => x.target === t.id), m = a.filter((x) => x.source === t.id), D = r.filter((x) => x.id !== t.id && x.id !== t.parent), Y = () => {
1611
+ const [l, o] = $(""), [x, b] = $("e2s"), [c, g] = $(0), [S, d] = $("day"), [u, j] = $(""), k = a.filter((p) => p.target === t.id), f = a.filter((p) => p.source === t.id), w = n.filter((p) => p.id !== t.id && p.id !== t.parent), C = () => {
1894
1612
  if (l) {
1895
- const x = Ge(b, k);
1896
- i(l, t.id, c, x), o(""), j(0), d("day");
1613
+ const p = Ge(c, S);
1614
+ i(l, t.id, x, p), o(""), g(0), d("day");
1897
1615
  }
1898
- }, L = () => {
1616
+ }, E = () => {
1899
1617
  if (!u.trim()) return;
1900
- const x = hn(u.trim());
1901
- if (!x) {
1618
+ const p = un(u.trim());
1619
+ if (!p) {
1902
1620
  alert(`Invalid format. Use: [TaskNumber][Type][+/-][Lag][Unit]
1903
1621
  Example: 3FS+10d`);
1904
1622
  return;
1905
1623
  }
1906
- const R = x.taskNumber - 1, P = r[R];
1907
- if (!P) {
1908
- alert(`Task ${x.taskNumber} not found`);
1624
+ const Y = p.taskNumber - 1, B = n[Y];
1625
+ if (!B) {
1626
+ alert(`Task ${p.taskNumber} not found`);
1909
1627
  return;
1910
1628
  }
1911
- const J = pn(x.type), U = Ge(x.lag, x.lagUnit);
1912
- i(P.id, t.id, J, U), T("");
1913
- }, O = (x) => {
1914
- switch (x) {
1629
+ const H = fn(p.type), L = Ge(p.lag, p.lagUnit);
1630
+ i(B.id, t.id, H, L), j("");
1631
+ }, P = (p) => {
1632
+ switch (p) {
1915
1633
  case "e2s":
1916
1634
  return "Finish-to-Start (FS)";
1917
1635
  case "s2s":
@@ -1921,8 +1639,8 @@ Example: 3FS+10d`);
1921
1639
  case "s2e":
1922
1640
  return "Start-to-Finish (SF)";
1923
1641
  }
1924
- }, A = (x) => {
1925
- switch (x) {
1642
+ }, I = (p) => {
1643
+ switch (p) {
1926
1644
  case "e2s":
1927
1645
  return "blue";
1928
1646
  case "s2s":
@@ -1932,41 +1650,41 @@ Example: 3FS+10d`);
1932
1650
  case "s2e":
1933
1651
  return "orange";
1934
1652
  }
1935
- }, X = (x) => !x || x === 0 ? null : x > 0 ? /* @__PURE__ */ e.jsxs(be, { color: "warning", children: [
1653
+ }, X = (p) => !p || p === 0 ? null : p > 0 ? /* @__PURE__ */ e.jsxs(we, { color: "warning", children: [
1936
1654
  "+",
1937
- x,
1655
+ p,
1938
1656
  "d lag"
1939
- ] }) : /* @__PURE__ */ e.jsxs(be, { color: "processing", children: [
1940
- x,
1657
+ ] }) : /* @__PURE__ */ e.jsxs(we, { color: "processing", children: [
1658
+ p,
1941
1659
  "d lead"
1942
- ] }), te = (x, R) => {
1943
- const P = r.find((J) => J.id === (R === "source" ? x.source : x.target));
1660
+ ] }), Z = (p, Y) => {
1661
+ const B = n.find((H) => H.id === (Y === "source" ? p.source : p.target));
1944
1662
  return /* @__PURE__ */ e.jsx(
1945
- $e.Item,
1663
+ Te.Item,
1946
1664
  {
1947
1665
  actions: [
1948
1666
  /* @__PURE__ */ e.jsx(
1949
- se,
1667
+ J,
1950
1668
  {
1951
1669
  type: "text",
1952
1670
  danger: !0,
1953
- icon: /* @__PURE__ */ e.jsx(z, { icon: jt }),
1954
- onClick: () => s(x.id),
1671
+ icon: /* @__PURE__ */ e.jsx(N, { icon: yt }),
1672
+ onClick: () => s(p.id),
1955
1673
  children: "Remove"
1956
1674
  }
1957
1675
  )
1958
1676
  ],
1959
1677
  children: /* @__PURE__ */ e.jsx(
1960
- $e.Item.Meta,
1678
+ Te.Item.Meta,
1961
1679
  {
1962
- title: /* @__PURE__ */ e.jsxs(ge, { children: [
1963
- /* @__PURE__ */ e.jsx(pe, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif" }, children: P?.text || (R === "source" ? x.source : x.target) }),
1964
- /* @__PURE__ */ e.jsx(be, { color: A(x.type), children: O(x.type) }),
1965
- X(x.lag)
1680
+ title: /* @__PURE__ */ e.jsxs(de, { children: [
1681
+ /* @__PURE__ */ e.jsx(ce, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif" }, children: B?.text || (Y === "source" ? p.source : p.target) }),
1682
+ /* @__PURE__ */ e.jsx(we, { color: I(p.type), children: P(p.type) }),
1683
+ X(p.lag)
1966
1684
  ] }),
1967
- description: /* @__PURE__ */ e.jsxs(pe, { type: "secondary", style: { fontFamily: "IBM Plex Sans, sans-serif", fontSize: "12px" }, children: [
1968
- P?.owner && `Owner: ${P.owner}`,
1969
- P?.priority && ` • Priority: ${P.priority}`
1685
+ description: /* @__PURE__ */ e.jsxs(ce, { type: "secondary", style: { fontFamily: "IBM Plex Sans, sans-serif", fontSize: "12px" }, children: [
1686
+ B?.owner && `Owner: ${B.owner}`,
1687
+ B?.priority && ` • Priority: ${B.priority}`
1970
1688
  ] })
1971
1689
  }
1972
1690
  )
@@ -1974,14 +1692,14 @@ Example: 3FS+10d`);
1974
1692
  );
1975
1693
  };
1976
1694
  return /* @__PURE__ */ e.jsxs(
1977
- ze,
1695
+ Be,
1978
1696
  {
1979
- title: /* @__PURE__ */ e.jsxs(ge, { children: [
1980
- /* @__PURE__ */ e.jsx(z, { icon: wt, style: { fontSize: "20px" } }),
1981
- /* @__PURE__ */ e.jsx(Oe, { level: 4, style: { margin: 0, fontFamily: "IBM Plex Mono, monospace" }, children: "Task Dependencies" })
1697
+ title: /* @__PURE__ */ e.jsxs(de, { children: [
1698
+ /* @__PURE__ */ e.jsx(N, { icon: mt, style: { fontSize: "20px" } }),
1699
+ /* @__PURE__ */ e.jsx(Le, { level: 4, style: { margin: 0, fontFamily: "IBM Plex Mono, monospace" }, children: "Task Dependencies" })
1982
1700
  ] }),
1983
1701
  open: !0,
1984
- onCancel: p,
1702
+ onCancel: h,
1985
1703
  width: 900,
1986
1704
  footer: null,
1987
1705
  className: "gantt-dependency-modal",
@@ -1990,13 +1708,13 @@ Example: 3FS+10d`);
1990
1708
  },
1991
1709
  children: [
1992
1710
  /* @__PURE__ */ e.jsx(
1993
- nt,
1711
+ tt,
1994
1712
  {
1995
1713
  size: "small",
1996
1714
  style: { marginBottom: 24, backgroundColor: "#f5f5f5", borderColor: "#d9d9d9" },
1997
- children: /* @__PURE__ */ e.jsxs(ge, { direction: "vertical", size: 4, children: [
1998
- /* @__PURE__ */ e.jsx(pe, { strong: !0, style: { fontFamily: "IBM Plex Mono, monospace", fontSize: "16px" }, children: t.text }),
1999
- /* @__PURE__ */ e.jsxs(pe, { type: "secondary", style: { fontFamily: "IBM Plex Sans, sans-serif", fontSize: "13px" }, children: [
1715
+ children: /* @__PURE__ */ e.jsxs(de, { direction: "vertical", size: 4, children: [
1716
+ /* @__PURE__ */ e.jsx(ce, { strong: !0, style: { fontFamily: "IBM Plex Mono, monospace", fontSize: "16px" }, children: t.text }),
1717
+ /* @__PURE__ */ e.jsxs(ce, { type: "secondary", style: { fontFamily: "IBM Plex Sans, sans-serif", fontSize: "13px" }, children: [
2000
1718
  t.start.toLocaleDateString(),
2001
1719
  " → ",
2002
1720
  t.end.toLocaleDateString(),
@@ -2008,7 +1726,7 @@ Example: 3FS+10d`);
2008
1726
  ),
2009
1727
  /* @__PURE__ */ e.jsxs("div", { style: { marginBottom: 32 }, children: [
2010
1728
  /* @__PURE__ */ e.jsxs(
2011
- Oe,
1729
+ Le,
2012
1730
  {
2013
1731
  level: 5,
2014
1732
  style: {
@@ -2019,13 +1737,13 @@ Example: 3FS+10d`);
2019
1737
  color: "#595959"
2020
1738
  },
2021
1739
  children: [
2022
- /* @__PURE__ */ e.jsx(z, { icon: Qt, style: { marginRight: "8px" } }),
1740
+ /* @__PURE__ */ e.jsx(N, { icon: Qt, style: { marginRight: "8px" } }),
2023
1741
  "Depends On (Predecessors)"
2024
1742
  ]
2025
1743
  }
2026
1744
  ),
2027
- _.length === 0 ? /* @__PURE__ */ e.jsx(
2028
- Xe,
1745
+ k.length === 0 ? /* @__PURE__ */ e.jsx(
1746
+ Je,
2029
1747
  {
2030
1748
  message: "No dependencies",
2031
1749
  description: "This task doesn't depend on any other tasks.",
@@ -2034,10 +1752,10 @@ Example: 3FS+10d`);
2034
1752
  style: { fontFamily: "IBM Plex Sans, sans-serif" }
2035
1753
  }
2036
1754
  ) : /* @__PURE__ */ e.jsx(
2037
- $e,
1755
+ Te,
2038
1756
  {
2039
- dataSource: _,
2040
- renderItem: (x) => te(x, "source"),
1757
+ dataSource: k,
1758
+ renderItem: (p) => Z(p, "source"),
2041
1759
  bordered: !0,
2042
1760
  style: { fontFamily: "IBM Plex Sans, sans-serif" }
2043
1761
  }
@@ -2045,7 +1763,7 @@ Example: 3FS+10d`);
2045
1763
  ] }),
2046
1764
  /* @__PURE__ */ e.jsxs("div", { style: { marginBottom: 32 }, children: [
2047
1765
  /* @__PURE__ */ e.jsxs(
2048
- Oe,
1766
+ Le,
2049
1767
  {
2050
1768
  level: 5,
2051
1769
  style: {
@@ -2056,13 +1774,13 @@ Example: 3FS+10d`);
2056
1774
  color: "#595959"
2057
1775
  },
2058
1776
  children: [
2059
- /* @__PURE__ */ e.jsx(z, { icon: en, style: { marginRight: "8px" } }),
1777
+ /* @__PURE__ */ e.jsx(N, { icon: en, style: { marginRight: "8px" } }),
2060
1778
  "Dependents (Successors)"
2061
1779
  ]
2062
1780
  }
2063
1781
  ),
2064
- m.length === 0 ? /* @__PURE__ */ e.jsx(
2065
- Xe,
1782
+ f.length === 0 ? /* @__PURE__ */ e.jsx(
1783
+ Je,
2066
1784
  {
2067
1785
  message: "No dependent tasks",
2068
1786
  description: "No other tasks depend on this task.",
@@ -2071,21 +1789,21 @@ Example: 3FS+10d`);
2071
1789
  style: { fontFamily: "IBM Plex Sans, sans-serif" }
2072
1790
  }
2073
1791
  ) : /* @__PURE__ */ e.jsx(
2074
- $e,
1792
+ Te,
2075
1793
  {
2076
- dataSource: m,
2077
- renderItem: (x) => te(x, "target"),
1794
+ dataSource: f,
1795
+ renderItem: (p) => Z(p, "target"),
2078
1796
  bordered: !0,
2079
1797
  style: { fontFamily: "IBM Plex Sans, sans-serif" }
2080
1798
  }
2081
1799
  )
2082
1800
  ] }),
2083
- /* @__PURE__ */ e.jsx(Le, {}),
1801
+ /* @__PURE__ */ e.jsx(Ae, {}),
2084
1802
  /* @__PURE__ */ e.jsx(
2085
- nt,
1803
+ tt,
2086
1804
  {
2087
1805
  title: /* @__PURE__ */ e.jsxs(
2088
- Oe,
1806
+ Le,
2089
1807
  {
2090
1808
  level: 5,
2091
1809
  style: {
@@ -2094,45 +1812,45 @@ Example: 3FS+10d`);
2094
1812
  fontSize: "14px"
2095
1813
  },
2096
1814
  children: [
2097
- /* @__PURE__ */ e.jsx(z, { icon: Ne, style: { marginRight: "8px" } }),
1815
+ /* @__PURE__ */ e.jsx(N, { icon: Fe, style: { marginRight: "8px" } }),
2098
1816
  "Add New Dependency"
2099
1817
  ]
2100
1818
  }
2101
1819
  ),
2102
1820
  style: { marginBottom: 24 },
2103
- children: /* @__PURE__ */ e.jsxs(ge, { direction: "vertical", size: "large", style: { width: "100%" }, children: [
1821
+ children: /* @__PURE__ */ e.jsxs(de, { direction: "vertical", size: "large", style: { width: "100%" }, children: [
2104
1822
  /* @__PURE__ */ e.jsxs("div", { children: [
2105
- /* @__PURE__ */ e.jsx(pe, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif", display: "block", marginBottom: 8 }, children: "Quick Add (Keyboard Shortcut):" }),
2106
- /* @__PURE__ */ e.jsx(pe, { type: "secondary", style: { fontFamily: "IBM Plex Sans, sans-serif", fontSize: "12px", display: "block", marginBottom: 8 }, children: "Format: [TaskNumber][Type][+/-][Lag][Unit] • Example: 3FS+10d, 5SS-2w" }),
2107
- /* @__PURE__ */ e.jsxs(ge.Compact, { style: { width: "100%" }, children: [
1823
+ /* @__PURE__ */ e.jsx(ce, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif", display: "block", marginBottom: 8 }, children: "Quick Add (Keyboard Shortcut):" }),
1824
+ /* @__PURE__ */ e.jsx(ce, { type: "secondary", style: { fontFamily: "IBM Plex Sans, sans-serif", fontSize: "12px", display: "block", marginBottom: 8 }, children: "Format: [TaskNumber][Type][+/-][Lag][Unit] • Example: 3FS+10d, 5SS-2w" }),
1825
+ /* @__PURE__ */ e.jsxs(de.Compact, { style: { width: "100%" }, children: [
2108
1826
  /* @__PURE__ */ e.jsx(
2109
- ve,
1827
+ ye,
2110
1828
  {
2111
1829
  placeholder: "e.g., 3FS+10d",
2112
1830
  value: u,
2113
- onChange: (x) => T(x.target.value),
2114
- onPressEnter: L,
1831
+ onChange: (p) => j(p.target.value),
1832
+ onPressEnter: E,
2115
1833
  size: "large",
2116
1834
  style: { fontFamily: "IBM Plex Mono, monospace" }
2117
1835
  }
2118
1836
  ),
2119
1837
  /* @__PURE__ */ e.jsx(
2120
- se,
1838
+ J,
2121
1839
  {
2122
1840
  type: "primary",
2123
1841
  size: "large",
2124
- onClick: L,
1842
+ onClick: E,
2125
1843
  style: { fontFamily: "IBM Plex Sans, sans-serif" },
2126
1844
  children: "Add"
2127
1845
  }
2128
1846
  )
2129
1847
  ] })
2130
1848
  ] }),
2131
- /* @__PURE__ */ e.jsx(Le, { style: { margin: "8px 0" }, children: "OR" }),
1849
+ /* @__PURE__ */ e.jsx(Ae, { style: { margin: "8px 0" }, children: "OR" }),
2132
1850
  /* @__PURE__ */ e.jsxs("div", { children: [
2133
- /* @__PURE__ */ e.jsx(pe, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif", display: "block", marginBottom: 8 }, children: "Select Task:" }),
1851
+ /* @__PURE__ */ e.jsx(ce, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif", display: "block", marginBottom: 8 }, children: "Select Task:" }),
2134
1852
  /* @__PURE__ */ e.jsx(
2135
- ie,
1853
+ te,
2136
1854
  {
2137
1855
  placeholder: "Choose a task...",
2138
1856
  value: l || void 0,
@@ -2140,50 +1858,50 @@ Example: 3FS+10d`);
2140
1858
  style: { width: "100%", fontFamily: "IBM Plex Sans, sans-serif" },
2141
1859
  size: "large",
2142
1860
  showSearch: !0,
2143
- filterOption: (x, R) => String(R?.children || "").toLowerCase().includes(x.toLowerCase()),
2144
- children: D.map((x) => /* @__PURE__ */ e.jsx(je, { value: x.id, children: x.text }, x.id))
1861
+ filterOption: (p, Y) => String(Y?.children || "").toLowerCase().includes(p.toLowerCase()),
1862
+ children: w.map((p) => /* @__PURE__ */ e.jsx(me, { value: p.id, children: p.text }, p.id))
2145
1863
  }
2146
1864
  )
2147
1865
  ] }),
2148
1866
  /* @__PURE__ */ e.jsxs("div", { children: [
2149
- /* @__PURE__ */ e.jsx(pe, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif", display: "block", marginBottom: 8 }, children: "Dependency Type:" }),
1867
+ /* @__PURE__ */ e.jsx(ce, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif", display: "block", marginBottom: 8 }, children: "Dependency Type:" }),
2150
1868
  /* @__PURE__ */ e.jsxs(
2151
- ie,
1869
+ te,
2152
1870
  {
2153
- value: c,
2154
- onChange: v,
1871
+ value: x,
1872
+ onChange: b,
2155
1873
  style: { width: "100%", fontFamily: "IBM Plex Sans, sans-serif" },
2156
1874
  size: "large",
2157
1875
  children: [
2158
- /* @__PURE__ */ e.jsxs(je, { value: "e2s", children: [
2159
- /* @__PURE__ */ e.jsx(be, { color: "blue", children: "FS" }),
1876
+ /* @__PURE__ */ e.jsxs(me, { value: "e2s", children: [
1877
+ /* @__PURE__ */ e.jsx(we, { color: "blue", children: "FS" }),
2160
1878
  " Finish-to-Start"
2161
1879
  ] }),
2162
- /* @__PURE__ */ e.jsxs(je, { value: "s2s", children: [
2163
- /* @__PURE__ */ e.jsx(be, { color: "green", children: "SS" }),
1880
+ /* @__PURE__ */ e.jsxs(me, { value: "s2s", children: [
1881
+ /* @__PURE__ */ e.jsx(we, { color: "green", children: "SS" }),
2164
1882
  " Start-to-Start"
2165
1883
  ] }),
2166
- /* @__PURE__ */ e.jsxs(je, { value: "e2e", children: [
2167
- /* @__PURE__ */ e.jsx(be, { color: "purple", children: "FF" }),
1884
+ /* @__PURE__ */ e.jsxs(me, { value: "e2e", children: [
1885
+ /* @__PURE__ */ e.jsx(we, { color: "purple", children: "FF" }),
2168
1886
  " Finish-to-Finish"
2169
1887
  ] }),
2170
- /* @__PURE__ */ e.jsxs(je, { value: "s2e", children: [
2171
- /* @__PURE__ */ e.jsx(be, { color: "orange", children: "SF" }),
1888
+ /* @__PURE__ */ e.jsxs(me, { value: "s2e", children: [
1889
+ /* @__PURE__ */ e.jsx(we, { color: "orange", children: "SF" }),
2172
1890
  " Start-to-Finish"
2173
1891
  ] })
2174
1892
  ]
2175
1893
  }
2176
1894
  )
2177
1895
  ] }),
2178
- /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(ge, { direction: "vertical", size: 4, style: { width: "100%" }, children: [
2179
- /* @__PURE__ */ e.jsx(pe, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif" }, children: "Lead/Lag Time:" }),
2180
- /* @__PURE__ */ e.jsx(pe, { type: "secondary", style: { fontFamily: "IBM Plex Sans, sans-serif", fontSize: "12px" }, children: "Negative = lead time (overlap), Positive = lag time (delay)" }),
2181
- /* @__PURE__ */ e.jsxs(ge.Compact, { style: { width: "100%" }, children: [
1896
+ /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(de, { direction: "vertical", size: 4, style: { width: "100%" }, children: [
1897
+ /* @__PURE__ */ e.jsx(ce, { strong: !0, style: { fontFamily: "IBM Plex Sans, sans-serif" }, children: "Lead/Lag Time:" }),
1898
+ /* @__PURE__ */ e.jsx(ce, { type: "secondary", style: { fontFamily: "IBM Plex Sans, sans-serif", fontSize: "12px" }, children: "Negative = lead time (overlap), Positive = lag time (delay)" }),
1899
+ /* @__PURE__ */ e.jsxs(de.Compact, { style: { width: "100%" }, children: [
2182
1900
  /* @__PURE__ */ e.jsx(
2183
- ke,
1901
+ De,
2184
1902
  {
2185
- value: b,
2186
- onChange: (x) => j(x || 0),
1903
+ value: c,
1904
+ onChange: (p) => g(p || 0),
2187
1905
  style: { flex: 1, fontFamily: "IBM Plex Sans, sans-serif" },
2188
1906
  size: "large",
2189
1907
  placeholder: "0",
@@ -2192,29 +1910,29 @@ Example: 3FS+10d`);
2192
1910
  }
2193
1911
  ),
2194
1912
  /* @__PURE__ */ e.jsxs(
2195
- ie,
1913
+ te,
2196
1914
  {
2197
- value: k,
1915
+ value: S,
2198
1916
  onChange: d,
2199
1917
  style: { width: 120, fontFamily: "IBM Plex Sans, sans-serif" },
2200
1918
  size: "large",
2201
1919
  children: [
2202
- /* @__PURE__ */ e.jsx(je, { value: "day", children: "Days" }),
2203
- /* @__PURE__ */ e.jsx(je, { value: "hour", children: "Hours" }),
2204
- /* @__PURE__ */ e.jsx(je, { value: "week", children: "Weeks" }),
2205
- /* @__PURE__ */ e.jsx(je, { value: "month", children: "Months" })
1920
+ /* @__PURE__ */ e.jsx(me, { value: "day", children: "Days" }),
1921
+ /* @__PURE__ */ e.jsx(me, { value: "hour", children: "Hours" }),
1922
+ /* @__PURE__ */ e.jsx(me, { value: "week", children: "Weeks" }),
1923
+ /* @__PURE__ */ e.jsx(me, { value: "month", children: "Months" })
2206
1924
  ]
2207
1925
  }
2208
1926
  )
2209
1927
  ] })
2210
1928
  ] }) }),
2211
1929
  /* @__PURE__ */ e.jsx(
2212
- se,
1930
+ J,
2213
1931
  {
2214
1932
  type: "primary",
2215
1933
  size: "large",
2216
- icon: /* @__PURE__ */ e.jsx(z, { icon: Ne }),
2217
- onClick: Y,
1934
+ icon: /* @__PURE__ */ e.jsx(N, { icon: Fe }),
1935
+ onClick: C,
2218
1936
  disabled: !l,
2219
1937
  block: !0,
2220
1938
  style: { fontFamily: "IBM Plex Sans, sans-serif", fontWeight: 600 },
@@ -2225,10 +1943,10 @@ Example: 3FS+10d`);
2225
1943
  }
2226
1944
  ),
2227
1945
  /* @__PURE__ */ e.jsx(
2228
- Xe,
1946
+ Je,
2229
1947
  {
2230
- message: /* @__PURE__ */ e.jsxs(pe, { strong: !0, style: { fontFamily: "IBM Plex Mono, monospace" }, children: [
2231
- /* @__PURE__ */ e.jsx(z, { icon: rt, style: { marginRight: "8px" } }),
1948
+ message: /* @__PURE__ */ e.jsxs(ce, { strong: !0, style: { fontFamily: "IBM Plex Mono, monospace" }, children: [
1949
+ /* @__PURE__ */ e.jsx(N, { icon: st, style: { marginRight: "8px" } }),
2232
1950
  "Dependency Types Explained"
2233
1951
  ] }),
2234
1952
  description: /* @__PURE__ */ e.jsxs("div", { style: { fontFamily: "IBM Plex Sans, sans-serif" }, children: [
@@ -2250,10 +1968,10 @@ Example: 3FS+10d`);
2250
1968
  " Successor finishes when predecessor starts"
2251
1969
  ] })
2252
1970
  ] }),
2253
- /* @__PURE__ */ e.jsx(Le, { style: { margin: "12px 0" } }),
2254
- /* @__PURE__ */ e.jsx(pe, { strong: !0, style: { display: "block", marginBottom: 4 }, children: "Keyboard Shortcuts:" }),
2255
- /* @__PURE__ */ e.jsx(ht, { style: { margin: 0, fontSize: "12px" }, code: !0, children: "[TaskID][Type]+/-[Days]d" }),
2256
- /* @__PURE__ */ e.jsxs(ht, { style: { margin: 0, fontSize: "12px" }, children: [
1971
+ /* @__PURE__ */ e.jsx(Ae, { style: { margin: "12px 0" } }),
1972
+ /* @__PURE__ */ e.jsx(ce, { strong: !0, style: { display: "block", marginBottom: 4 }, children: "Keyboard Shortcuts:" }),
1973
+ /* @__PURE__ */ e.jsx(dt, { style: { margin: 0, fontSize: "12px" }, code: !0, children: "[TaskID][Type]+/-[Days]d" }),
1974
+ /* @__PURE__ */ e.jsxs(dt, { style: { margin: 0, fontSize: "12px" }, children: [
2257
1975
  "Example: ",
2258
1976
  /* @__PURE__ */ e.jsx("code", { children: "3FS+10d" }),
2259
1977
  " = Task 3, Finish-to-Start, 10 days lag"
@@ -2261,51 +1979,51 @@ Example: 3FS+10d`);
2261
1979
  ] }),
2262
1980
  type: "info",
2263
1981
  showIcon: !0,
2264
- icon: /* @__PURE__ */ e.jsx(z, { icon: rt }),
1982
+ icon: /* @__PURE__ */ e.jsx(N, { icon: st }),
2265
1983
  style: { marginTop: 16 }
2266
1984
  }
2267
1985
  )
2268
1986
  ]
2269
1987
  }
2270
1988
  );
2271
- }, Rn = ({
1989
+ }, Fn = ({
2272
1990
  x: t,
2273
- y: r,
1991
+ y: n,
2274
1992
  task: a,
2275
1993
  onEdit: i,
2276
1994
  onDelete: s,
2277
- onCopy: p,
1995
+ onCopy: h,
2278
1996
  onDependencies: l,
2279
1997
  onConvertToMilestone: o,
2280
- onConvertToTask: c,
2281
- onConvertToProject: v,
2282
- onAutoSchedule: b,
2283
- onClose: j
1998
+ onConvertToTask: x,
1999
+ onConvertToProject: b,
2000
+ onAutoSchedule: c,
2001
+ onClose: g
2284
2002
  }) => {
2285
2003
  if (!a) return null;
2286
- const k = [
2004
+ const S = [
2287
2005
  {
2288
2006
  key: "edit",
2289
2007
  label: "Edit",
2290
- icon: /* @__PURE__ */ e.jsx(z, { icon: tn }),
2008
+ icon: /* @__PURE__ */ e.jsx(N, { icon: tn }),
2291
2009
  onClick: () => {
2292
- i(), j();
2010
+ i(), g();
2293
2011
  }
2294
2012
  },
2295
2013
  {
2296
2014
  key: "copy",
2297
2015
  label: "Copy",
2298
- icon: /* @__PURE__ */ e.jsx(z, { icon: nn }),
2016
+ icon: /* @__PURE__ */ e.jsx(N, { icon: nn }),
2299
2017
  onClick: () => {
2300
- p(), j();
2018
+ h(), g();
2301
2019
  }
2302
2020
  },
2303
2021
  {
2304
2022
  key: "dependencies",
2305
2023
  label: "Dependencies",
2306
- icon: /* @__PURE__ */ e.jsx(z, { icon: wt }),
2024
+ icon: /* @__PURE__ */ e.jsx(N, { icon: mt }),
2307
2025
  onClick: () => {
2308
- l(), j();
2026
+ l(), g();
2309
2027
  }
2310
2028
  },
2311
2029
  {
@@ -2319,28 +2037,28 @@ Example: 3FS+10d`);
2319
2037
  {
2320
2038
  key: "milestone",
2321
2039
  label: "Milestone",
2322
- icon: /* @__PURE__ */ e.jsx(z, { icon: sn }),
2040
+ icon: /* @__PURE__ */ e.jsx(N, { icon: sn }),
2323
2041
  disabled: a.type === "milestone",
2324
2042
  onClick: () => {
2325
- o(), j();
2043
+ o(), g();
2326
2044
  }
2327
2045
  },
2328
2046
  {
2329
2047
  key: "task",
2330
2048
  label: "Task",
2331
- icon: /* @__PURE__ */ e.jsx(z, { icon: rn }),
2049
+ icon: /* @__PURE__ */ e.jsx(N, { icon: rn }),
2332
2050
  disabled: a.type === "task",
2333
2051
  onClick: () => {
2334
- c(), j();
2052
+ x(), g();
2335
2053
  }
2336
2054
  },
2337
2055
  {
2338
2056
  key: "project",
2339
2057
  label: "Project",
2340
- icon: /* @__PURE__ */ e.jsx(z, { icon: an }),
2058
+ icon: /* @__PURE__ */ e.jsx(N, { icon: an }),
2341
2059
  disabled: a.type === "project",
2342
2060
  onClick: () => {
2343
- v(), j();
2061
+ b(), g();
2344
2062
  }
2345
2063
  }
2346
2064
  ]
@@ -2348,9 +2066,9 @@ Example: 3FS+10d`);
2348
2066
  {
2349
2067
  key: "auto-schedule",
2350
2068
  label: "Auto Schedule",
2351
- icon: /* @__PURE__ */ e.jsx(z, { icon: yt }),
2069
+ icon: /* @__PURE__ */ e.jsx(N, { icon: gt }),
2352
2070
  onClick: () => {
2353
- b?.(), j();
2071
+ c?.(), g();
2354
2072
  }
2355
2073
  },
2356
2074
  {
@@ -2359,10 +2077,10 @@ Example: 3FS+10d`);
2359
2077
  {
2360
2078
  key: "delete",
2361
2079
  label: "Delete",
2362
- icon: /* @__PURE__ */ e.jsx(z, { icon: jt }),
2080
+ icon: /* @__PURE__ */ e.jsx(N, { icon: yt }),
2363
2081
  danger: !0,
2364
2082
  onClick: () => {
2365
- s(), j();
2083
+ s(), g();
2366
2084
  }
2367
2085
  }
2368
2086
  ];
@@ -2373,14 +2091,14 @@ Example: 3FS+10d`);
2373
2091
  style: {
2374
2092
  position: "fixed",
2375
2093
  left: `${t}px`,
2376
- top: `${r}px`,
2094
+ top: `${n}px`,
2377
2095
  zIndex: 1e4
2378
2096
  },
2379
2097
  onClick: (d) => d.stopPropagation(),
2380
2098
  children: /* @__PURE__ */ e.jsx(
2381
2099
  Ht,
2382
2100
  {
2383
- items: k,
2101
+ items: S,
2384
2102
  style: {
2385
2103
  boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
2386
2104
  borderRadius: "6px",
@@ -2390,156 +2108,162 @@ Example: 3FS+10d`);
2390
2108
  )
2391
2109
  }
2392
2110
  );
2393
- }, _n = (t, r = []) => {
2394
- const [a, i] = B([]), [s, p] = B(-1), [l, o] = B(t), [c, v] = B(r), b = me((D, Y, L) => {
2395
- const O = {
2396
- type: D,
2397
- before: Y,
2398
- after: L,
2111
+ }, $n = (t, n = []) => {
2112
+ const [a, i] = $([]), [s, h] = $(-1), [l, o] = $(t), [x, b] = $(n);
2113
+ Oe(() => {
2114
+ o(t);
2115
+ }, [t]), Oe(() => {
2116
+ b(n);
2117
+ }, [n]);
2118
+ const c = ue((w, C, E) => {
2119
+ const P = {
2120
+ type: w,
2121
+ before: C,
2122
+ after: E,
2399
2123
  timestamp: Date.now()
2400
- }, A = a.slice(0, s + 1);
2401
- A.push(O), A.length > 50 ? A.shift() : p(s + 1), i(A);
2402
- }, [a, s]), j = me(() => {
2124
+ }, I = a.slice(0, s + 1);
2125
+ I.push(P), I.length > 50 ? I.shift() : h(s + 1), i(I);
2126
+ }, [a, s]), g = ue(() => {
2403
2127
  if (s < 0) return;
2404
- const D = a[s];
2405
- o(D.before.tasks), v(D.before.links), p(s - 1);
2406
- }, [a, s]), k = me(() => {
2128
+ const w = a[s];
2129
+ o(w.before.tasks), b(w.before.links), h(s - 1);
2130
+ }, [a, s]), S = ue(() => {
2407
2131
  if (s >= a.length - 1) return;
2408
- const D = a[s + 1];
2409
- o(D.after.tasks), v(D.after.links), p(s + 1);
2410
- }, [a, s]), d = s >= 0, u = s < a.length - 1, T = me((D) => {
2411
- const Y = { tasks: l, links: c }, L = l.map((A) => A.id === D.id ? D : A);
2412
- b("task_update", Y, { tasks: L, links: c }), o(L);
2413
- }, [l, c, b]), _ = me((D) => {
2414
- const Y = { tasks: l, links: c }, L = [...l, D];
2415
- b("task_create", Y, { tasks: L, links: c }), o(L);
2416
- }, [l, c, b]), m = me((D) => {
2417
- const Y = { tasks: l, links: c }, L = l.filter((X) => X.id !== D), O = c.filter((X) => X.source !== D && X.target !== D);
2418
- b("task_delete", Y, { tasks: L, links: O }), o(L), v(O);
2419
- }, [l, c, b]);
2132
+ const w = a[s + 1];
2133
+ o(w.after.tasks), b(w.after.links), h(s + 1);
2134
+ }, [a, s]), d = s >= 0, u = s < a.length - 1, j = ue((w) => {
2135
+ const C = { tasks: l, links: x }, E = l.map((I) => I.id === w.id ? w : I);
2136
+ c("task_update", C, { tasks: E, links: x }), o(E);
2137
+ }, [l, x, c]), k = ue((w) => {
2138
+ const C = { tasks: l, links: x }, E = [...l, w];
2139
+ c("task_create", C, { tasks: E, links: x }), o(E);
2140
+ }, [l, x, c]), f = ue((w) => {
2141
+ const C = { tasks: l, links: x }, E = l.filter((X) => X.id !== w), P = x.filter((X) => X.source !== w && X.target !== w);
2142
+ c("task_delete", C, { tasks: E, links: P }), o(E), b(P);
2143
+ }, [l, x, c]);
2420
2144
  return {
2421
2145
  tasks: l,
2422
- links: c,
2146
+ links: x,
2423
2147
  setTasks: o,
2424
- setLinks: v,
2425
- undo: j,
2426
- redo: k,
2148
+ setLinks: b,
2149
+ undo: g,
2150
+ redo: S,
2427
2151
  canUndo: d,
2428
2152
  canRedo: u,
2429
- updateTask: T,
2430
- createTask: _,
2431
- deleteTask: m,
2432
- saveState: b,
2153
+ updateTask: j,
2154
+ createTask: k,
2155
+ deleteTask: f,
2156
+ saveState: c,
2433
2157
  history: a
2434
2158
  };
2435
- }, Mt = (t, r, a = { mode: "forward" }) => {
2159
+ }, St = (t, n, a = { mode: "forward" }) => {
2436
2160
  const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
2437
- return t.forEach((p) => {
2438
- i.set(p.id, []), s.set(p.id, []);
2439
- }), r.forEach((p) => {
2440
- p.type === "e2s" && (i.get(p.target)?.push(p.source), s.get(p.source)?.push(p.target));
2441
- }), a.mode === "forward" ? Yn(t, i, a) : On(t, s, a);
2442
- }, Yn = (t, r, a) => {
2443
- const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), p = a.projectStart || /* @__PURE__ */ new Date(), l = (o) => {
2161
+ return t.forEach((h) => {
2162
+ i.set(h.id, []), s.set(h.id, []);
2163
+ }), n.forEach((h) => {
2164
+ h.type === "e2s" && (i.get(h.target)?.push(h.source), s.get(h.source)?.push(h.target));
2165
+ }), a.mode === "forward" ? Nn(t, i, a) : Pn(t, s, a);
2166
+ }, Nn = (t, n, a) => {
2167
+ const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), h = a.projectStart || /* @__PURE__ */ new Date(), l = (o) => {
2444
2168
  if (s.has(o)) return;
2445
- const c = t.find((u) => u.id === o);
2446
- if (!c) return;
2447
- const v = r.get(o) || [];
2448
- v.forEach((u) => l(u));
2449
- let b = p;
2450
- v.forEach((u) => {
2451
- const T = i.get(u);
2452
- T && T.end > b && (b = new Date(T.end));
2169
+ const x = t.find((u) => u.id === o);
2170
+ if (!x) return;
2171
+ const b = n.get(o) || [];
2172
+ b.forEach((u) => l(u));
2173
+ let c = h;
2174
+ b.forEach((u) => {
2175
+ const j = i.get(u);
2176
+ j && j.end > c && (c = new Date(j.end));
2453
2177
  });
2454
- const j = new Date(b), k = ae(j, c.duration, "day"), d = {
2455
- ...c,
2456
- start: j,
2457
- end: k
2178
+ const g = new Date(c), S = ee(g, x.duration, "day"), d = {
2179
+ ...x,
2180
+ start: g,
2181
+ end: S
2458
2182
  };
2459
2183
  i.set(o, d), s.add(o);
2460
2184
  };
2461
2185
  return t.forEach((o) => l(o.id)), t.map((o) => i.get(o.id) || o);
2462
- }, On = (t, r, a) => {
2463
- const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), p = a.projectEnd || new Date(
2186
+ }, Pn = (t, n, a) => {
2187
+ const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), h = a.projectEnd || new Date(
2464
2188
  Math.max(...t.map((o) => o.end.getTime()))
2465
2189
  ), l = (o) => {
2466
2190
  if (s.has(o)) return;
2467
- const c = t.find((u) => u.id === o);
2468
- if (!c) return;
2469
- const v = r.get(o) || [];
2470
- v.forEach((u) => l(u));
2471
- let b = p;
2472
- v.forEach((u) => {
2473
- const T = i.get(u);
2474
- T && T.start < b && (b = new Date(T.start));
2191
+ const x = t.find((u) => u.id === o);
2192
+ if (!x) return;
2193
+ const b = n.get(o) || [];
2194
+ b.forEach((u) => l(u));
2195
+ let c = h;
2196
+ b.forEach((u) => {
2197
+ const j = i.get(u);
2198
+ j && j.start < c && (c = new Date(j.start));
2475
2199
  });
2476
- const j = new Date(b), k = ae(j, -c.duration, "day"), d = {
2477
- ...c,
2478
- start: k,
2479
- end: j
2200
+ const g = new Date(c), S = ee(g, -x.duration, "day"), d = {
2201
+ ...x,
2202
+ start: S,
2203
+ end: g
2480
2204
  };
2481
2205
  i.set(o, d), s.add(o);
2482
2206
  };
2483
2207
  return t.forEach((o) => l(o.id)), t.map((o) => i.get(o.id) || o);
2484
- }, Ln = (t) => {
2485
- const r = /* @__PURE__ */ new Map();
2208
+ }, Rn = (t) => {
2209
+ const n = /* @__PURE__ */ new Map();
2486
2210
  t.forEach((i) => {
2487
- i.owner && (r.has(i.owner) || r.set(i.owner, []), r.get(i.owner).push(i));
2211
+ i.owner && (n.has(i.owner) || n.set(i.owner, []), n.get(i.owner).push(i));
2488
2212
  });
2489
2213
  const a = [...t];
2490
- return r.forEach((i, s) => {
2491
- const p = i.sort((l, o) => l.start.getTime() - o.start.getTime());
2492
- for (let l = 1; l < p.length; l++) {
2493
- const o = p[l], c = p[l - 1];
2494
- if (o.start < c.end) {
2495
- const v = a.findIndex((b) => b.id === o.id);
2496
- if (v >= 0) {
2497
- const b = new Date(c.end), j = ae(b, o.duration, "day");
2498
- a[v] = {
2214
+ return n.forEach((i, s) => {
2215
+ const h = i.sort((l, o) => l.start.getTime() - o.start.getTime());
2216
+ for (let l = 1; l < h.length; l++) {
2217
+ const o = h[l], x = h[l - 1];
2218
+ if (o.start < x.end) {
2219
+ const b = a.findIndex((c) => c.id === o.id);
2220
+ if (b >= 0) {
2221
+ const c = new Date(x.end), g = ee(c, o.duration, "day");
2222
+ a[b] = {
2499
2223
  ...o,
2500
- start: b,
2501
- end: j
2224
+ start: c,
2225
+ end: g
2502
2226
  };
2503
2227
  }
2504
2228
  }
2505
2229
  }
2506
2230
  }), a;
2507
- }, ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2231
+ }, Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2508
2232
  __proto__: null,
2509
- autoSchedule: Mt,
2510
- levelResources: Ln
2233
+ autoSchedule: St,
2234
+ levelResources: Rn
2511
2235
  }, Symbol.toStringTag, { value: "Module" })), In = (t) => {
2512
- const r = /* @__PURE__ */ new Map();
2236
+ const n = /* @__PURE__ */ new Map();
2513
2237
  return t.forEach((a) => {
2514
- r.set(a.id, {
2238
+ n.set(a.id, {
2515
2239
  taskId: a.id,
2516
2240
  start: new Date(a.start),
2517
2241
  end: new Date(a.end)
2518
2242
  });
2519
- }), r;
2243
+ }), n;
2520
2244
  }, Tt = (t) => {
2521
- const r = ["ID", "Task Name", "Start Date", "End Date", "Duration", "Progress", "Type", "Owner", "Priority"], a = t.map((s) => [
2245
+ const n = ["ID", "Task Name", "Start Date", "End Date", "Duration", "Progress", "Type", "Owner", "Priority"], a = t.map((s) => [
2522
2246
  s.id,
2523
2247
  s.text,
2524
- ce(s.start, "YYYY-MM-DD"),
2525
- ce(s.end, "YYYY-MM-DD"),
2248
+ ae(s.start, "YYYY-MM-DD"),
2249
+ ae(s.end, "YYYY-MM-DD"),
2526
2250
  s.duration.toString(),
2527
2251
  `${s.progress}%`,
2528
2252
  s.type || "task",
2529
2253
  s.owner || "",
2530
2254
  s.priority || "medium"
2531
2255
  ]), i = [
2532
- r.join(","),
2533
- ...a.map((s) => s.map((p) => `"${p}"`).join(","))
2256
+ n.join(","),
2257
+ ...a.map((s) => s.map((h) => `"${h}"`).join(","))
2534
2258
  ].join(`
2535
2259
  `);
2536
- He(i, "gantt-tasks.csv", "text/csv");
2537
- }, $t = (t) => {
2538
- const r = ["ID", "Task Name", "Start Date", "End Date", "Duration", "Progress", "Type", "Owner", "Priority", "Details"], a = t.map((s) => [
2260
+ ze(i, "gantt-tasks.csv", "text/csv");
2261
+ }, Dt = (t) => {
2262
+ const n = ["ID", "Task Name", "Start Date", "End Date", "Duration", "Progress", "Type", "Owner", "Priority", "Details"], a = t.map((s) => [
2539
2263
  s.id,
2540
2264
  s.text,
2541
- ce(s.start, "MM/DD/YYYY"),
2542
- ce(s.end, "MM/DD/YYYY"),
2265
+ ae(s.start, "MM/DD/YYYY"),
2266
+ ae(s.end, "MM/DD/YYYY"),
2543
2267
  s.duration.toString(),
2544
2268
  s.progress.toString(),
2545
2269
  s.type || "task",
@@ -2548,37 +2272,37 @@ Example: 3FS+10d`);
2548
2272
  s.details || ""
2549
2273
  ]), i = "\uFEFF" + [
2550
2274
  // BOM for UTF-8
2551
- r.join(" "),
2552
- ...a.map((s) => s.map((p) => p.replace(/\t/g, " ")).join(" "))
2275
+ n.join(" "),
2276
+ ...a.map((s) => s.map((h) => h.replace(/\t/g, " ")).join(" "))
2553
2277
  ].join(`
2554
2278
  `);
2555
- He(i, "gantt-tasks.xls", "application/vnd.ms-excel");
2556
- }, kt = (t, r) => {
2279
+ ze(i, "gantt-tasks.xls", "application/vnd.ms-excel");
2280
+ }, Mt = (t, n) => {
2557
2281
  const a = {
2558
2282
  tasks: t,
2559
- links: r,
2283
+ links: n,
2560
2284
  exported: (/* @__PURE__ */ new Date()).toISOString(),
2561
2285
  version: "1.0"
2562
2286
  }, i = JSON.stringify(a, null, 2);
2563
- He(i, "gantt-project.json", "application/json");
2564
- }, Ct = (t) => {
2565
- const r = `
2287
+ ze(i, "gantt-project.json", "application/json");
2288
+ }, kt = (t) => {
2289
+ const n = `
2566
2290
  GANTT CHART PROJECT
2567
2291
  Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
2568
2292
 
2569
2293
  Tasks:
2570
2294
  ${t.map((a, i) => `
2571
2295
  ${i + 1}. ${a.text}
2572
- Start: ${ce(a.start, "MM/DD/YYYY")}
2573
- End: ${ce(a.end, "MM/DD/YYYY")}
2296
+ Start: ${ae(a.start, "MM/DD/YYYY")}
2297
+ End: ${ae(a.end, "MM/DD/YYYY")}
2574
2298
  Duration: ${a.duration} days
2575
2299
  Progress: ${a.progress}%
2576
2300
  ${a.owner ? `Owner: ${a.owner}` : ""}
2577
2301
  `).join(`
2578
2302
  `)}
2579
2303
  `.trim();
2580
- He(r, "gantt-report.txt", "text/plain"), alert("PDF export is a simplified text version. For full PDF with charts, a PDF library would be needed.");
2581
- }, An = (t, r, a = "png") => {
2304
+ ze(n, "gantt-report.txt", "text/plain"), alert("PDF export is a simplified text version. For full PDF with charts, a PDF library would be needed.");
2305
+ }, Yn = (t, n, a = "png") => {
2582
2306
  if (!document.getElementById(t)) {
2583
2307
  alert("Could not find Gantt chart element to export");
2584
2308
  return;
@@ -2588,73 +2312,73 @@ ${i + 1}. ${a.text}
2588
2312
  return;
2589
2313
  }
2590
2314
  alert("Image export requires html2canvas library. Install with: npm install html2canvas");
2591
- }, He = (t, r, a) => {
2315
+ }, ze = (t, n, a) => {
2592
2316
  const i = new Blob([t], { type: a }), s = URL.createObjectURL(i);
2593
- Bn(s, r), URL.revokeObjectURL(s);
2594
- }, Bn = (t, r) => {
2317
+ Ln(s, n), URL.revokeObjectURL(s);
2318
+ }, Ln = (t, n) => {
2595
2319
  const a = document.createElement("a");
2596
- a.href = t, a.download = r, document.body.appendChild(a), a.click(), document.body.removeChild(a);
2597
- }, zn = (t) => new Promise((r, a) => {
2320
+ a.href = t, a.download = n, document.body.appendChild(a), a.click(), document.body.removeChild(a);
2321
+ }, An = (t) => new Promise((n, a) => {
2598
2322
  const i = new FileReader();
2599
2323
  i.onload = (s) => {
2600
2324
  try {
2601
- const p = s.target?.result, l = JSON.parse(p), o = l.tasks.map((c) => ({
2602
- ...c,
2603
- start: new Date(c.start),
2604
- end: new Date(c.end)
2325
+ const h = s.target?.result, l = JSON.parse(h), o = l.tasks.map((x) => ({
2326
+ ...x,
2327
+ start: new Date(x.start),
2328
+ end: new Date(x.end)
2605
2329
  }));
2606
- r({ tasks: o, links: l.links || [] });
2330
+ n({ tasks: o, links: l.links || [] });
2607
2331
  } catch {
2608
2332
  a(new Error("Invalid JSON file"));
2609
2333
  }
2610
2334
  }, i.onerror = () => a(new Error("Failed to read file")), i.readAsText(t);
2611
- }), ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2335
+ }), es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2612
2336
  __proto__: null,
2613
2337
  exportToCSV: Tt,
2614
- exportToExcel: $t,
2615
- exportToImage: An,
2616
- exportToJSON: kt,
2617
- exportToPDF: Ct,
2618
- importFromJSON: zn
2619
- }, Symbol.toStringTag, { value: "Module" })), Hn = [
2338
+ exportToExcel: Dt,
2339
+ exportToImage: Yn,
2340
+ exportToJSON: Mt,
2341
+ exportToPDF: kt,
2342
+ importFromJSON: An
2343
+ }, Symbol.toStringTag, { value: "Module" })), _n = [
2620
2344
  { name: "index", label: "", width: 40, align: "center" },
2621
2345
  { name: "text", label: "Name", width: 300, align: "left", resize: !0 },
2622
2346
  { name: "predecessors", label: "Depends on", width: 120, align: "left" },
2623
2347
  { name: "duration", label: "Duration", width: 100, align: "left" },
2624
2348
  { name: "start", label: "Start", width: 120, align: "left" },
2625
2349
  { name: "add", label: "", width: 40, align: "center" }
2626
- ], Wn = [
2350
+ ], On = [
2627
2351
  { unit: "month", step: 1, format: "MMM" },
2628
2352
  { unit: "day", step: 1, format: "D" }
2629
- ], rs = ({
2630
- tasks: t,
2631
- links: r = [],
2353
+ ], ts = ({
2354
+ tasks: t = [],
2355
+ links: n = [],
2632
2356
  config: a = {},
2633
2357
  onTaskUpdate: i,
2634
2358
  onTaskCreate: s,
2635
- onTaskDelete: p,
2359
+ onTaskDelete: h,
2636
2360
  onLinkCreate: l,
2637
2361
  onLinkDelete: o
2638
2362
  }) => {
2639
- const {
2363
+ const x = Array.isArray(t) ? t : [], b = Array.isArray(n) ? n : [], {
2640
2364
  tasks: c,
2641
- links: v,
2642
- setTasks: b,
2643
- setLinks: j,
2644
- undo: k,
2645
- redo: d,
2646
- updateTask: u,
2647
- createTask: T,
2648
- deleteTask: _,
2649
- saveState: m
2650
- } = _n(t, r), [D, Y] = B(c), [L, O] = B(null), [A, X] = B(null), [te, x] = B(!1), [R, P] = B(!1), [J, U] = B(null), [E, S] = B(null), [g, $] = B(null), [w, h] = B(null), [f, n] = B(null), [y, C] = B(1), [N, H] = B(/* @__PURE__ */ new Map()), [K, I] = B(!1), [ee] = B(a.theme || "light"), [ne, q] = B({
2365
+ links: g,
2366
+ setTasks: S,
2367
+ setLinks: d,
2368
+ undo: u,
2369
+ redo: j,
2370
+ updateTask: k,
2371
+ createTask: f,
2372
+ deleteTask: w,
2373
+ saveState: C
2374
+ } = $n(x, b), [E, P] = $(c), [I, X] = $(null), [Z, p] = $(null), [Y, B] = $(!1), [H, L] = $(!1), [ie, K] = $(null), [ne, G] = $(null), [_, v] = $(null), [D, r] = $(null), [m, M] = $(null), [F, U] = $(1), [he, A] = $(/* @__PURE__ */ new Map()), [q, fe] = $(!1), [je] = $(a.theme || "light"), [$e, He] = $({
2651
2375
  searchText: "",
2652
2376
  status: "all",
2653
2377
  priority: "all",
2654
2378
  owner: ""
2655
- }), ue = Ve(null), he = Ve(null), Se = Ve(null), xe = {
2656
- columns: Hn,
2657
- scales: Wn,
2379
+ }), Ct = Xe(null), Ne = Xe(null), Et = Xe(null), pe = {
2380
+ columns: _n,
2381
+ scales: On,
2658
2382
  readonly: !1,
2659
2383
  editable: !0,
2660
2384
  taskHeight: 28,
@@ -2664,385 +2388,393 @@ ${i + 1}. ${a.text}
2664
2388
  minColumnWidth: 60,
2665
2389
  autoSchedule: !1,
2666
2390
  criticalPath: !1,
2667
- baselines: K,
2391
+ baselines: q,
2668
2392
  weekends: !0,
2669
2393
  holidays: [],
2670
- theme: ee,
2394
+ theme: je,
2671
2395
  locale: "en",
2672
2396
  ...a
2673
2397
  };
2674
- tt(() => {
2675
- const M = Sn(c, ne);
2676
- Y(((W) => {
2677
- const Q = [], oe = (V) => {
2678
- if (!V) return !1;
2679
- const de = W.find((Z) => Z.id === V);
2680
- return de && !de.open && de.type === "project" ? !0 : oe(de?.parent);
2398
+ Oe(() => {
2399
+ const y = vn(c, $e);
2400
+ P(((R) => {
2401
+ const V = [], se = (O) => {
2402
+ if (!O) return !1;
2403
+ const oe = R.find((W) => W.id === O);
2404
+ return oe && !oe.open && oe.type === "project" ? !0 : se(oe?.parent);
2681
2405
  };
2682
- return W.forEach((V) => {
2683
- oe(V.parent) || Q.push(V);
2684
- }), Q;
2685
- })(M));
2686
- }, [c, ne]);
2687
- const Et = Array.from(new Set(c.map((M) => M.owner).filter(Boolean))), Ft = (() => {
2688
- const M = D.length > 0 ? D : c;
2689
- if (M.length === 0) {
2690
- const V = /* @__PURE__ */ new Date();
2406
+ return R.forEach((O) => {
2407
+ se(O.parent) || V.push(O);
2408
+ }), V;
2409
+ })(y));
2410
+ }, [c, $e]);
2411
+ const Ft = Ee.useMemo(() => {
2412
+ if (!c || !Array.isArray(c)) return [];
2413
+ try {
2414
+ return Array.from(new Set(c.map((y) => y?.owner).filter(Boolean)));
2415
+ } catch (y) {
2416
+ return console.warn("Error extracting owners:", y), [];
2417
+ }
2418
+ }, [c]), $t = (() => {
2419
+ const y = E.length > 0 ? E : c;
2420
+ if (y.length === 0) {
2421
+ const O = /* @__PURE__ */ new Date();
2691
2422
  return {
2692
- start: Ye(ae(V, -30, "day")),
2693
- end: Ye(ae(V, 60, "day"))
2423
+ start: Ye(ee(O, -30, "day")),
2424
+ end: Ye(ee(O, 60, "day"))
2694
2425
  };
2695
2426
  }
2696
- const F = M.map((V) => V.start.getTime()), W = M.map((V) => V.end.getTime()), Q = new Date(Math.min(...F)), oe = new Date(Math.max(...W));
2427
+ const T = y.map((O) => O.start.getTime()), R = y.map((O) => O.end.getTime()), V = new Date(Math.min(...T)), se = new Date(Math.max(...R));
2697
2428
  return {
2698
- start: Ye(ae(Q, -7, "day")),
2699
- end: Ye(oe)
2429
+ start: Ye(ee(V, -7, "day")),
2430
+ end: Ye(se)
2700
2431
  };
2701
- })(), Nt = (M) => {
2702
- O(M);
2703
- }, Pt = (M, F) => {
2704
- if (xe.readonly) return;
2705
- M.preventDefault();
2706
- const W = c.find((Q) => Q.id === F);
2707
- W && n({ x: M.clientX, y: M.clientY, task: W });
2432
+ })(), Nt = (y) => {
2433
+ X(y);
2434
+ }, Pt = (y, T) => {
2435
+ if (pe.readonly) return;
2436
+ y.preventDefault();
2437
+ const R = c.find((V) => V.id === T);
2438
+ R && M({ x: y.clientX, y: y.clientY, task: R });
2708
2439
  }, Rt = () => {
2709
- if (!f?.task) return;
2710
- const M = f.task, F = {
2711
- ...M,
2440
+ if (!m?.task) return;
2441
+ const y = m.task, T = {
2442
+ ...y,
2712
2443
  id: `task-${Date.now()}`,
2713
- text: `${M.text} (Copy)`,
2714
- start: ae(M.start, 7, "day"),
2715
- end: ae(M.end, 7, "day")
2444
+ text: `${y.text} (Copy)`,
2445
+ start: ee(y.start, 7, "day"),
2446
+ end: ee(y.end, 7, "day")
2716
2447
  };
2717
- T(F), s && s(F);
2718
- }, We = (M) => {
2719
- if (!f?.task) return;
2720
- const F = { ...f.task, type: M };
2721
- u(F), i && i(F);
2722
- }, _t = (M, F, W, Q) => {
2723
- if (!xe.readonly)
2724
- if (Q === "reorder") {
2725
- const oe = D.findIndex((Z) => Z.id === M), V = (Z, le) => {
2726
- let De = [];
2727
- return le.filter((fe) => fe.parent === Z).forEach((fe) => {
2728
- De.push(fe.id), De = [...De, ...V(fe.id, le)];
2729
- }), De;
2730
- }, de = V(M, c);
2731
- $({ id: M, initialIndex: oe, currentY: W, descendantIds: de }), document.body.classList.add("gantt-dragging");
2448
+ f(T), s && s(T);
2449
+ }, We = (y) => {
2450
+ if (!m?.task) return;
2451
+ const T = { ...m.task, type: y };
2452
+ k(T), i && i(T);
2453
+ }, It = (y, T, R, V) => {
2454
+ if (!pe.readonly)
2455
+ if (V === "reorder") {
2456
+ const se = E.findIndex((W) => W.id === y), O = (W, re) => {
2457
+ let be = [];
2458
+ return re.filter((le) => le.parent === W).forEach((le) => {
2459
+ be.push(le.id), be = [...be, ...O(le.id, re)];
2460
+ }), be;
2461
+ }, oe = O(y, c);
2462
+ v({ id: y, initialIndex: se, currentY: R, descendantIds: oe }), document.body.classList.add("gantt-dragging");
2732
2463
  } else
2733
- S(M);
2464
+ G(y);
2734
2465
  }, Yt = () => {
2735
- if (g && w) {
2736
- const M = c.find((W) => W.id === g.id), F = c.find((W) => W.id === w.taskId);
2737
- if (M && F && M.id !== F.id) {
2738
- const W = [M.id, ...g.descendantIds];
2739
- if (!W.includes(F.id)) {
2740
- const Q = [...c];
2741
- let oe = w.position === "inside" ? F.id : F.parent;
2742
- const V = Q.findIndex((re) => re.id === M.id);
2743
- V !== -1 && (Q[V] = { ...Q[V], parent: oe });
2744
- const de = Q.filter((re) => W.includes(re.id)), Z = Q.filter((re) => !W.includes(re.id));
2745
- let le = Z.findIndex((re) => re.id === F.id);
2746
- if (w.position === "inside") {
2747
- const re = Z.filter((fe) => fe.parent === F.id);
2748
- re.length > 0 ? le = Z.findIndex((fe) => fe.id === re[re.length - 1].id) + 1 : le++;
2749
- } else if (w.position === "below") {
2750
- const re = (Je, et) => {
2466
+ if (_ && D) {
2467
+ const y = c.find((R) => R.id === _.id), T = c.find((R) => R.id === D.taskId);
2468
+ if (y && T && y.id !== T.id) {
2469
+ const R = [y.id, ..._.descendantIds];
2470
+ if (!R.includes(T.id)) {
2471
+ const V = [...c];
2472
+ let se = D.position === "inside" ? T.id : T.parent;
2473
+ const O = V.findIndex((Q) => Q.id === y.id);
2474
+ O !== -1 && (V[O] = { ...V[O], parent: se });
2475
+ const oe = V.filter((Q) => R.includes(Q.id)), W = V.filter((Q) => !R.includes(Q.id));
2476
+ let re = W.findIndex((Q) => Q.id === T.id);
2477
+ if (D.position === "inside") {
2478
+ const Q = W.filter((le) => le.parent === T.id);
2479
+ Q.length > 0 ? re = W.findIndex((le) => le.id === Q[Q.length - 1].id) + 1 : re++;
2480
+ } else if (D.position === "below") {
2481
+ const Q = (Ve, et) => {
2751
2482
  let Pe = [];
2752
- return et.filter((Re) => Re.parent === Je).forEach((Re) => {
2753
- Pe.push(Re.id), Pe = [...Pe, ...re(Re.id, et)];
2483
+ return et.filter((Re) => Re.parent === Ve).forEach((Re) => {
2484
+ Pe.push(Re.id), Pe = [...Pe, ...Q(Re.id, et)];
2754
2485
  }), Pe;
2755
- }, fe = re(F.id, Z);
2756
- fe.length > 0 ? le = Z.findIndex((Je) => Je.id === fe[fe.length - 1]) + 1 : le++;
2486
+ }, le = Q(T.id, W);
2487
+ le.length > 0 ? re = W.findIndex((Ve) => Ve.id === le[le.length - 1]) + 1 : re++;
2757
2488
  }
2758
- const De = { tasks: [...c], links: [...v] };
2759
- Z.splice(le, 0, ...de), b(Z), m("task_update", De, { tasks: Z, links: v });
2489
+ const be = { tasks: [...c], links: [...g] };
2490
+ W.splice(re, 0, ...oe), S(W), C("task_update", be, { tasks: W, links: g });
2760
2491
  }
2761
2492
  }
2762
2493
  }
2763
- S(null), $(null), h(null), document.body.classList.remove("gantt-dragging");
2764
- }, Ot = (M) => {
2765
- if (g) {
2766
- const F = xe.rowHeight || 44, W = he.current?.querySelector(".gantt-grid-body");
2767
- if (!W) return;
2768
- const Q = W.getBoundingClientRect(), oe = M.clientY - Q.top;
2769
- let V = Math.floor(oe / F);
2770
- V = Math.max(0, Math.min(V, D.length - 1));
2771
- const de = D[V];
2772
- if (de) {
2773
- const Z = oe - V * F;
2774
- let le = "above";
2775
- de.type === "project" ? Z < F * 0.3 ? le = "above" : Z > F * 0.7 ? le = "below" : le = "inside" : le = Z < F / 2 ? "above" : "below", de.id !== g.id ? h({ taskId: de.id, position: le }) : h(null);
2494
+ G(null), v(null), r(null), document.body.classList.remove("gantt-dragging");
2495
+ }, Lt = (y) => {
2496
+ if (_) {
2497
+ const T = pe.rowHeight || 44, R = Ne.current?.querySelector(".gantt-grid-body");
2498
+ if (!R) return;
2499
+ const V = R.getBoundingClientRect(), se = y.clientY - V.top;
2500
+ let O = Math.floor(se / T);
2501
+ O = Math.max(0, Math.min(O, E.length - 1));
2502
+ const oe = E[O];
2503
+ if (oe) {
2504
+ const W = se - O * T;
2505
+ let re = "above";
2506
+ oe.type === "project" ? W < T * 0.3 ? re = "above" : W > T * 0.7 ? re = "below" : re = "inside" : re = W < T / 2 ? "above" : "below", oe.id !== _.id ? r({ taskId: oe.id, position: re }) : r(null);
2776
2507
  }
2777
- $((Z) => Z ? { ...Z, currentY: M.clientY } : null);
2508
+ v((W) => W ? { ...W, currentY: y.clientY } : null);
2778
2509
  }
2779
2510
  }, Ze = () => {
2780
- g && Yt();
2781
- }, Lt = (M) => {
2782
- const F = { ...M, id: `task-${Date.now()}` };
2783
- T(F), s && s(F);
2784
- }, Ue = (M) => {
2785
- u(M), i && i(M);
2786
- }, Ke = (M) => {
2787
- _(M), p && p(M);
2788
- }, Qe = (M, F, W, Q) => {
2789
- const oe = { id: `link-${Date.now()}`, source: M, target: F, type: W, lag: Q };
2790
- j([...v, oe]), l && l(oe);
2791
- }, It = (M) => {
2792
- const F = v.filter((W) => W.id !== M);
2793
- j(F), o && o(M);
2794
- }, At = () => {
2795
- if (!K && N.size === 0) {
2796
- const M = In(c);
2797
- H(M), I(!0);
2798
- } else I(!K);
2511
+ _ && Yt();
2512
+ }, At = (y) => {
2513
+ const T = { ...y, id: `task-${Date.now()}` };
2514
+ f(T), s && s(T);
2515
+ }, Ue = (y) => {
2516
+ k(y), i && i(y);
2517
+ }, Ke = (y) => {
2518
+ w(y), h && h(y);
2519
+ }, Qe = (y, T, R, V) => {
2520
+ const se = { id: `link-${Date.now()}`, source: y, target: T, type: R, lag: V };
2521
+ d([...g, se]), l && l(se);
2522
+ }, _t = (y) => {
2523
+ const T = g.filter((R) => R.id !== y);
2524
+ d(T), o && o(y);
2525
+ }, Ot = () => {
2526
+ if (!q && he.size === 0) {
2527
+ const y = In(c);
2528
+ A(y), fe(!0);
2529
+ } else fe(!q);
2799
2530
  };
2800
- return tt(() => {
2801
- const M = (F) => {
2802
- (F.ctrlKey || F.metaKey) && (F.key === "z" && !F.shiftKey ? (F.preventDefault(), k()) : (F.key === "y" || F.key === "z" && F.shiftKey) && (F.preventDefault(), d()));
2531
+ return Oe(() => {
2532
+ const y = (T) => {
2533
+ (T.ctrlKey || T.metaKey) && (T.key === "z" && !T.shiftKey ? (T.preventDefault(), u()) : (T.key === "y" || T.key === "z" && T.shiftKey) && (T.preventDefault(), j()));
2803
2534
  };
2804
- return window.addEventListener("keydown", M), () => window.removeEventListener("keydown", M);
2805
- }, [k, d]), /* @__PURE__ */ e.jsxs("div", { className: `gantt-page-wrapper theme-${ee}`, children: [
2535
+ return window.addEventListener("keydown", y), () => window.removeEventListener("keydown", y);
2536
+ }, [u, j]), /* @__PURE__ */ e.jsxs("div", { className: `gantt-page-wrapper theme-${je}`, children: [
2806
2537
  /* @__PURE__ */ e.jsx("div", { className: "gantt-page-header", children: /* @__PURE__ */ e.jsx("div", { className: "gantt-page-header-left", children: /* @__PURE__ */ e.jsx("h1", { className: "gantt-page-title", children: "Iris Gantt" }) }) }),
2807
- /* @__PURE__ */ e.jsxs("div", { className: `gantt-container theme-${xe.theme}`, children: [
2538
+ /* @__PURE__ */ e.jsxs("div", { className: `gantt-container theme-${pe.theme}`, children: [
2808
2539
  /* @__PURE__ */ e.jsx(
2809
- Dn,
2540
+ Sn,
2810
2541
  {
2811
- zoomLevel: y,
2812
- setZoomLevel: C,
2813
- onBaselineToggle: At,
2814
- showBaselines: K,
2815
- onExport: (M) => {
2816
- M === "csv" && Tt(c), M === "excel" && $t(c), M === "json" && kt(c, v), M === "pdf" && Ct(c);
2542
+ zoomLevel: F,
2543
+ setZoomLevel: U,
2544
+ onBaselineToggle: Ot,
2545
+ showBaselines: q,
2546
+ onExport: (y) => {
2547
+ y === "csv" && Tt(c), y === "excel" && Dt(c), y === "json" && Mt(c, g), y === "pdf" && kt(c);
2817
2548
  },
2818
- onFilterChange: (M) => q(M),
2819
- owners: Et,
2820
- onAddTask: () => x(!0)
2549
+ onFilterChange: (y) => He(y),
2550
+ owners: Ft || [],
2551
+ onAddTask: () => B(!0)
2821
2552
  }
2822
2553
  ),
2823
- /* @__PURE__ */ e.jsxs("div", { className: "gantt-layout", ref: Se, onMouseMove: Ot, onMouseUp: Ze, onMouseLeave: Ze, children: [
2554
+ /* @__PURE__ */ e.jsxs("div", { className: "gantt-layout", ref: Et, onMouseMove: Lt, onMouseUp: Ze, onMouseLeave: Ze, children: [
2824
2555
  /* @__PURE__ */ e.jsx(
2825
- vt,
2556
+ wt,
2826
2557
  {
2827
- ref: he,
2828
- tasks: D,
2829
- columns: xe.columns || [],
2830
- selectedTask: L,
2558
+ ref: Ne,
2559
+ tasks: E,
2560
+ columns: pe.columns || [],
2561
+ selectedTask: I,
2831
2562
  onTaskClick: Nt,
2832
2563
  onTaskContextMenu: Pt,
2833
2564
  onTaskUpdate: Ue,
2834
- onTaskDragStart: _t,
2835
- onAddTask: () => x(!0),
2565
+ onTaskDragStart: It,
2566
+ onAddTask: () => B(!0),
2836
2567
  onAddDependency: Qe,
2837
- onDependencyClick: (M) => {
2838
- const F = c.find((W) => W.id === M);
2839
- F && (U(F), P(!0));
2568
+ onDependencyClick: (y) => {
2569
+ const T = c.find((R) => R.id === y);
2570
+ T && (K(T), L(!0));
2840
2571
  },
2841
- links: v,
2572
+ links: g,
2842
2573
  allTasks: c,
2843
- dropIndicator: w,
2844
- reorderTask: g
2574
+ dropIndicator: D,
2575
+ reorderTask: _
2845
2576
  }
2846
2577
  ),
2847
2578
  /* @__PURE__ */ e.jsx(
2848
- St,
2579
+ vt,
2849
2580
  {
2850
- ref: ue,
2851
- tasks: D,
2852
- links: v,
2853
- range: Ft,
2854
- scales: xe.scales,
2855
- config: xe,
2856
- selectedTask: L,
2857
- draggedTask: E,
2581
+ ref: Ct,
2582
+ tasks: E,
2583
+ links: g,
2584
+ range: $t,
2585
+ scales: pe.scales,
2586
+ config: pe,
2587
+ selectedTask: I,
2588
+ draggedTask: ne,
2858
2589
  onTaskClick: () => {
2859
2590
  },
2860
2591
  onTaskDragStart: () => {
2861
2592
  },
2862
2593
  onTaskDragEnd: () => {
2863
2594
  },
2864
- onTaskUpdate: (M, F) => {
2865
- const W = c.find((Q) => Q.id === M);
2866
- W && Ue({ ...W, ...F });
2595
+ onTaskUpdate: (y, T) => {
2596
+ const R = c.find((V) => V.id === y);
2597
+ R && Ue({ ...R, ...T });
2867
2598
  },
2868
- zoomLevel: y,
2869
- baselines: K ? N : /* @__PURE__ */ new Map()
2599
+ zoomLevel: F,
2600
+ baselines: q ? he : /* @__PURE__ */ new Map()
2870
2601
  }
2871
2602
  )
2872
2603
  ] }),
2873
- te && /* @__PURE__ */ e.jsx(Cn, { onCreateTask: Lt, onClose: () => x(!1) }),
2874
- A && /* @__PURE__ */ e.jsx(Nn, { task: A, onUpdate: Ue, onDelete: Ke, onClose: () => X(null) }),
2875
- R && J && /* @__PURE__ */ e.jsx(
2876
- Pn,
2604
+ Y && /* @__PURE__ */ e.jsx(Dn, { onCreateTask: At, onClose: () => B(!1) }),
2605
+ Z && /* @__PURE__ */ e.jsx(Cn, { task: Z, onUpdate: Ue, onDelete: Ke, onClose: () => p(null) }),
2606
+ H && ie && /* @__PURE__ */ e.jsx(
2607
+ En,
2877
2608
  {
2878
- task: J,
2609
+ task: ie,
2879
2610
  allTasks: c,
2880
- links: v,
2611
+ links: g,
2881
2612
  onAddDependency: Qe,
2882
- onRemoveDependency: It,
2613
+ onRemoveDependency: _t,
2883
2614
  onClose: () => {
2884
- P(!1), U(null);
2615
+ L(!1), K(null);
2885
2616
  }
2886
2617
  }
2887
2618
  ),
2888
- f && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2889
- /* @__PURE__ */ e.jsx("div", { className: "gantt-context-menu-overlay", onClick: () => n(null), onContextMenu: (M) => {
2890
- M.preventDefault(), n(null);
2619
+ m && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2620
+ /* @__PURE__ */ e.jsx("div", { className: "gantt-context-menu-overlay", onClick: () => M(null), onContextMenu: (y) => {
2621
+ y.preventDefault(), M(null);
2891
2622
  } }),
2892
2623
  /* @__PURE__ */ e.jsx(
2893
- Rn,
2624
+ Fn,
2894
2625
  {
2895
- x: f.x,
2896
- y: f.y,
2897
- task: f.task,
2626
+ x: m.x,
2627
+ y: m.y,
2628
+ task: m.task,
2898
2629
  onEdit: () => {
2899
- f.task && X(f.task);
2630
+ m.task && p(m.task);
2900
2631
  },
2901
2632
  onDelete: () => {
2902
- f.task && Ke(f.task.id);
2633
+ m.task && Ke(m.task.id);
2903
2634
  },
2904
2635
  onCopy: Rt,
2905
2636
  onDependencies: () => {
2906
- f.task && (U(f.task), P(!0));
2637
+ m.task && (K(m.task), L(!0));
2907
2638
  },
2908
2639
  onConvertToMilestone: () => We("milestone"),
2909
2640
  onConvertToTask: () => We("task"),
2910
2641
  onConvertToProject: () => We("project"),
2911
- onClose: () => n(null),
2642
+ onClose: () => M(null),
2912
2643
  onAutoSchedule: () => {
2913
- const M = Mt(c, v, { mode: "forward" });
2914
- b(M), n(null);
2644
+ const y = St(c, g, { mode: "forward" });
2645
+ S(y), M(null);
2915
2646
  }
2916
2647
  }
2917
2648
  )
2918
2649
  ] }),
2919
- g && /* @__PURE__ */ e.jsx(
2650
+ _ && /* @__PURE__ */ e.jsx(
2920
2651
  "div",
2921
2652
  {
2922
2653
  className: "gantt-grid-row ghost-row",
2923
2654
  style: {
2924
- height: xe.rowHeight,
2925
- top: g.currentY - (xe.rowHeight || 48) / 2,
2926
- left: he.current?.getBoundingClientRect().left,
2655
+ height: pe.rowHeight,
2656
+ top: _.currentY - (pe.rowHeight || 48) / 2,
2657
+ left: Ne.current?.getBoundingClientRect().left,
2927
2658
  position: "fixed",
2928
2659
  pointerEvents: "none",
2929
2660
  opacity: 0.8,
2930
2661
  zIndex: 9999,
2931
- width: he.current?.offsetWidth,
2662
+ width: Ne.current?.offsetWidth,
2932
2663
  backgroundColor: "#ffffff",
2933
2664
  boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
2934
2665
  border: "1px solid #2196F3",
2935
2666
  display: "flex"
2936
2667
  },
2937
- children: xe.columns?.map((M) => /* @__PURE__ */ e.jsx("div", { className: "gantt-grid-cell", style: { width: M.width, textAlign: M.align || "left" }, children: (() => {
2938
- const F = c.find((W) => W.id === g.id);
2939
- if (!F) return null;
2940
- if (M.template) return M.template(F);
2941
- switch (M.name) {
2668
+ children: pe.columns?.map((y) => /* @__PURE__ */ e.jsx("div", { className: "gantt-grid-cell", style: { width: y.width, textAlign: y.align || "left" }, children: (() => {
2669
+ const T = c.find((R) => R.id === _.id);
2670
+ if (!T) return null;
2671
+ if (y.template) return y.template(T);
2672
+ switch (y.name) {
2942
2673
  case "text":
2943
2674
  return /* @__PURE__ */ e.jsxs("div", { className: "gantt-grid-cell-text", children: [
2944
- /* @__PURE__ */ e.jsx(z, { icon: xt, style: { marginRight: 8, color: "#adb5bd" } }),
2675
+ /* @__PURE__ */ e.jsx(N, { icon: xt, style: { marginRight: 8, color: "#adb5bd" } }),
2945
2676
  /* @__PURE__ */ e.jsxs("span", { className: "gantt-task-name-text", children: [
2946
- F.text,
2947
- g.descendantIds.length > 0 && /* @__PURE__ */ e.jsxs("span", { children: [
2677
+ T.text,
2678
+ _.descendantIds.length > 0 && /* @__PURE__ */ e.jsxs("span", { children: [
2948
2679
  " +",
2949
- g.descendantIds.length,
2680
+ _.descendantIds.length,
2950
2681
  " subtasks"
2951
2682
  ] })
2952
2683
  ] })
2953
2684
  ] });
2954
2685
  case "start":
2955
- return ce(F.start, "DD MMM YYYY");
2686
+ return ae(T.start, "DD MMM YYYY");
2956
2687
  case "duration":
2957
- return `${F.duration}`;
2688
+ return `${T.duration}`;
2958
2689
  default:
2959
- return F[M.name] || "";
2690
+ return T[y.name] || "";
2960
2691
  }
2961
- })() }, `ghost-${M.name}`))
2692
+ })() }, `ghost-${y.name}`))
2962
2693
  }
2963
2694
  )
2964
2695
  ] })
2965
2696
  ] });
2966
- }, Un = (t, r) => {
2967
- const a = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
2697
+ }, Bn = (t, n) => {
2698
+ const a = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map();
2968
2699
  t.forEach((d) => {
2969
- s.set(d.id, []), p.set(d.id, []);
2970
- }), r.forEach((d) => {
2971
- d.type === "e2s" && (s.get(d.source)?.push(d.target), p.get(d.target)?.push(d.source));
2700
+ s.set(d.id, []), h.set(d.id, []);
2701
+ }), n.forEach((d) => {
2702
+ d.type === "e2s" && (s.get(d.source)?.push(d.target), h.get(d.target)?.push(d.source));
2972
2703
  });
2973
- const l = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), c = (d, u = /* @__PURE__ */ new Set()) => {
2704
+ const l = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), x = (d, u = /* @__PURE__ */ new Set()) => {
2974
2705
  if (u.has(d)) return;
2975
2706
  u.add(d);
2976
- const T = t.find((m) => m.id === d);
2977
- if (!T) return;
2978
- const _ = p.get(d) || [];
2979
- if (_.length === 0)
2980
- l.set(d, 0), o.set(d, T.duration);
2707
+ const j = t.find((f) => f.id === d);
2708
+ if (!j) return;
2709
+ const k = h.get(d) || [];
2710
+ if (k.length === 0)
2711
+ l.set(d, 0), o.set(d, j.duration);
2981
2712
  else {
2982
- let m = 0;
2983
- _.forEach((D) => {
2984
- c(D, u);
2985
- const Y = o.get(D) || 0;
2986
- m = Math.max(m, Y);
2987
- }), l.set(d, m), o.set(d, m + T.duration);
2713
+ let f = 0;
2714
+ k.forEach((w) => {
2715
+ x(w, u);
2716
+ const C = o.get(w) || 0;
2717
+ f = Math.max(f, C);
2718
+ }), l.set(d, f), o.set(d, f + j.duration);
2988
2719
  }
2989
2720
  };
2990
- t.forEach((d) => c(d.id));
2991
- const v = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), j = Math.max(...Array.from(o.values())), k = (d, u = /* @__PURE__ */ new Set()) => {
2721
+ t.forEach((d) => x(d.id));
2722
+ const b = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), g = Math.max(...Array.from(o.values())), S = (d, u = /* @__PURE__ */ new Set()) => {
2992
2723
  if (u.has(d)) return;
2993
2724
  u.add(d);
2994
- const T = t.find((m) => m.id === d);
2995
- if (!T) return;
2996
- const _ = s.get(d) || [];
2997
- if (_.length === 0)
2998
- b.set(d, j), v.set(d, j - T.duration);
2725
+ const j = t.find((f) => f.id === d);
2726
+ if (!j) return;
2727
+ const k = s.get(d) || [];
2728
+ if (k.length === 0)
2729
+ c.set(d, g), b.set(d, g - j.duration);
2999
2730
  else {
3000
- let m = 1 / 0;
3001
- _.forEach((D) => {
3002
- k(D, u);
3003
- const Y = v.get(D) || 0;
3004
- m = Math.min(m, Y);
3005
- }), b.set(d, m), v.set(d, m - T.duration);
2731
+ let f = 1 / 0;
2732
+ k.forEach((w) => {
2733
+ S(w, u);
2734
+ const C = b.get(w) || 0;
2735
+ f = Math.min(f, C);
2736
+ }), c.set(d, f), b.set(d, f - j.duration);
3006
2737
  }
3007
2738
  };
3008
- return t.forEach((d) => k(d.id)), t.forEach((d) => {
3009
- const u = l.get(d.id) || 0, _ = (v.get(d.id) || 0) - u;
3010
- i.set(d.id, _), Math.abs(_) < 0.01 && a.add(d.id);
2739
+ return t.forEach((d) => S(d.id)), t.forEach((d) => {
2740
+ const u = l.get(d.id) || 0, k = (b.get(d.id) || 0) - u;
2741
+ i.set(d.id, k), Math.abs(k) < 0.01 && a.add(d.id);
3011
2742
  }), {
3012
2743
  criticalTasks: a,
3013
2744
  taskFloats: i,
3014
- projectDuration: j
2745
+ projectDuration: g
3015
2746
  };
3016
- }, Jn = (t, r) => r.criticalTasks.has(t), Vn = (t, r) => r.taskFloats.get(t) || 0, as = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2747
+ }, zn = (t, n) => n.criticalTasks.has(t), Hn = (t, n) => n.taskFloats.get(t) || 0, ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3017
2748
  __proto__: null,
3018
- calculateCriticalPath: Un,
3019
- getTaskFloat: Vn,
3020
- isCriticalTask: Jn
2749
+ calculateCriticalPath: Bn,
2750
+ getTaskFloat: Hn,
2751
+ isCriticalTask: zn
3021
2752
  }, Symbol.toStringTag, { value: "Module" }));
3022
2753
  export {
3023
- ns as AutoScheduler,
3024
- St as Chart,
3025
- as as CriticalPath,
3026
- Pn as DependencyEditor,
3027
- ss as ExportUtils,
2754
+ Qn as AutoScheduler,
2755
+ vt as Chart,
2756
+ ns as CriticalPath,
2757
+ En as DependencyEditor,
2758
+ es as ExportUtils,
3028
2759
  bn as FilterSearch,
3029
- rs as Gantt,
3030
- vt as Grid,
3031
- yn as TaskBar,
3032
- Cn as TaskCreator,
3033
- Nn as TaskEditor,
2760
+ ts as Gantt,
2761
+ wt as Grid,
2762
+ mn as TaskBar,
2763
+ Dn as TaskCreator,
2764
+ Cn as TaskEditor,
3034
2765
  bt as Timeline,
3035
- Dn as Toolbar,
3036
- ae as addToDate,
3037
- Sn as applyFilters,
3038
- ts as calculateDuration,
2766
+ Sn as Toolbar,
2767
+ ee as addToDate,
2768
+ vn as applyFilters,
2769
+ Kn as calculateDuration,
3039
2770
  In as createBaseline,
3040
- ce as formatDate,
3041
- Ie as getDaysBetween,
3042
- es as getEndOfDay,
3043
- un as getHoursBetween,
2771
+ ts as default,
2772
+ ae as formatDate,
2773
+ _e as getDaysBetween,
2774
+ Zn as getEndOfDay,
2775
+ dn as getHoursBetween,
3044
2776
  Ye as getStartOfDay,
3045
- ct as isHoliday,
3046
- lt as isWeekend,
3047
- _n as useUndoRedo
2777
+ lt as isHoliday,
2778
+ ot as isWeekend,
2779
+ $n as useUndoRedo
3048
2780
  };