iris-gantt 1.0.3 → 1.0.5

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