iris-gantt 1.6.1 → 1.6.2

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,5 +1,5 @@
1
- import A, { useState as q, memo as Ir, forwardRef as wr, useCallback as Ze, useEffect as ct, useRef as ft } from "react";
2
- import { Typography as br, Select as $e, InputNumber as nt, Button as Ne, Popover as zr, Tooltip as rt, Input as ut, Space as er, Segmented as Br, Divider as tr, Form as je, Modal as At, DatePicker as Sr, ColorPicker as vr, Alert as Hr, Card as dr, List as Jt, Tag as Wr, Menu as Vr } from "antd";
1
+ import A, { useState as J, memo as Ir, forwardRef as wr, useCallback as Je, useEffect as ut, useRef as ft } from "react";
2
+ import { Typography as br, Select as Oe, InputNumber as at, Button as Pe, Popover as zr, Tooltip as nt, Input as pt, Space as er, Segmented as Br, Divider as tr, Form as je, Modal as At, DatePicker as Sr, ColorPicker as vr, Alert as Hr, Card as dr, List as Jt, Tag as Wr, Menu as Vr } from "antd";
3
3
  import { FontAwesomeIcon as Ee } from "@fortawesome/react-fontawesome";
4
4
  import { faChevronDown as cr, faPlus as ar, faGripVertical as Xr, faChevronRight as Ur, faTimesCircle as qr, faSearchMinus as Gr, faSearchPlus as Jr, faRotateLeft as jr, faFileCsv as Kr, faFileExcel as Zr, faFileCode as Qr, faFilePdf as en, faExclamationTriangle as tn, faLink as Tr, faTrash as Dr, faInfoCircle as rn, faEdit as nn, faCopy as an, faFlag as on, faTasks as sn, faFolder as ln } from "@fortawesome/free-solid-svg-icons";
5
5
  import Mr from "dayjs";
@@ -9,12 +9,12 @@ function dn() {
9
9
  if (ur) return Ft;
10
10
  ur = 1;
11
11
  var e = A, a = /* @__PURE__ */ Symbol.for("react.element"), n = /* @__PURE__ */ Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
12
- function b(u, d, p) {
13
- var h, v = {}, g = null, m = null;
14
- p !== void 0 && (g = "" + p), d.key !== void 0 && (g = "" + d.key), d.ref !== void 0 && (m = d.ref);
15
- for (h in d) s.call(d, h) && !c.hasOwnProperty(h) && (v[h] = d[h]);
16
- if (u && u.defaultProps) for (h in d = u.defaultProps, d) v[h] === void 0 && (v[h] = d[h]);
17
- return { $$typeof: a, type: u, key: g, ref: m, props: v, _owner: r.current };
12
+ function b(u, d, h) {
13
+ var p, S = {}, y = null, m = null;
14
+ h !== void 0 && (y = "" + h), d.key !== void 0 && (y = "" + d.key), d.ref !== void 0 && (m = d.ref);
15
+ for (p in d) s.call(d, p) && !c.hasOwnProperty(p) && (S[p] = d[p]);
16
+ if (u && u.defaultProps) for (p in d = u.defaultProps, d) S[p] === void 0 && (S[p] = d[p]);
17
+ return { $$typeof: a, type: u, key: y, ref: m, props: S, _owner: r.current };
18
18
  }
19
19
  return Ft.Fragment = n, Ft.jsx = b, Ft.jsxs = b, Ft;
20
20
  }
@@ -22,7 +22,7 @@ var Rt = {};
22
22
  var pr;
23
23
  function cn() {
24
24
  return pr || (pr = 1, process.env.NODE_ENV !== "production" && (function() {
25
- var e = A, a = /* @__PURE__ */ Symbol.for("react.element"), n = /* @__PURE__ */ Symbol.for("react.portal"), s = /* @__PURE__ */ Symbol.for("react.fragment"), r = /* @__PURE__ */ Symbol.for("react.strict_mode"), c = /* @__PURE__ */ Symbol.for("react.profiler"), b = /* @__PURE__ */ Symbol.for("react.provider"), u = /* @__PURE__ */ Symbol.for("react.context"), d = /* @__PURE__ */ Symbol.for("react.forward_ref"), p = /* @__PURE__ */ Symbol.for("react.suspense"), h = /* @__PURE__ */ Symbol.for("react.suspense_list"), v = /* @__PURE__ */ Symbol.for("react.memo"), g = /* @__PURE__ */ Symbol.for("react.lazy"), m = /* @__PURE__ */ Symbol.for("react.offscreen"), E = Symbol.iterator, F = "@@iterator";
25
+ var e = A, a = /* @__PURE__ */ Symbol.for("react.element"), n = /* @__PURE__ */ Symbol.for("react.portal"), s = /* @__PURE__ */ Symbol.for("react.fragment"), r = /* @__PURE__ */ Symbol.for("react.strict_mode"), c = /* @__PURE__ */ Symbol.for("react.profiler"), b = /* @__PURE__ */ Symbol.for("react.provider"), u = /* @__PURE__ */ Symbol.for("react.context"), d = /* @__PURE__ */ Symbol.for("react.forward_ref"), h = /* @__PURE__ */ Symbol.for("react.suspense"), p = /* @__PURE__ */ Symbol.for("react.suspense_list"), S = /* @__PURE__ */ Symbol.for("react.memo"), y = /* @__PURE__ */ Symbol.for("react.lazy"), m = /* @__PURE__ */ Symbol.for("react.offscreen"), E = Symbol.iterator, F = "@@iterator";
26
26
  function N(o) {
27
27
  if (o === null || typeof o != "object")
28
28
  return null;
@@ -30,7 +30,7 @@ function cn() {
30
30
  return typeof x == "function" ? x : null;
31
31
  }
32
32
  var M = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
33
- function S(o) {
33
+ function v(o) {
34
34
  {
35
35
  for (var x = arguments.length, L = new Array(x > 1 ? x - 1 : 0), _ = 1; _ < x; _++)
36
36
  L[_ - 1] = arguments[_];
@@ -41,16 +41,16 @@ function cn() {
41
41
  {
42
42
  var _ = M.ReactDebugCurrentFrame, te = _.getStackAddendum();
43
43
  te !== "" && (x += "%s", L = L.concat([te]));
44
- var oe = L.map(function(ee) {
45
- return String(ee);
44
+ var oe = L.map(function(Q) {
45
+ return String(Q);
46
46
  });
47
47
  oe.unshift("Warning: " + x), Function.prototype.apply.call(console[o], console, oe);
48
48
  }
49
49
  }
50
50
  var C = !1, Z = !1, W = !1, re = !1, le = !1, j;
51
51
  j = /* @__PURE__ */ Symbol.for("react.module.reference");
52
- function U(o) {
53
- return !!(typeof o == "string" || typeof o == "function" || o === s || o === c || le || o === r || o === p || o === h || re || o === m || C || Z || W || typeof o == "object" && o !== null && (o.$$typeof === g || o.$$typeof === v || o.$$typeof === b || o.$$typeof === u || o.$$typeof === d || // This needs to include all possible module reference object
52
+ function X(o) {
53
+ return !!(typeof o == "string" || typeof o == "function" || o === s || o === c || le || o === r || o === h || o === p || re || o === m || C || Z || W || typeof o == "object" && o !== null && (o.$$typeof === y || o.$$typeof === S || o.$$typeof === b || o.$$typeof === u || o.$$typeof === d || // This needs to include all possible module reference object
54
54
  // types supported by any Flight configuration anywhere since
55
55
  // we don't know which Flight build this will end up being used
56
56
  // with.
@@ -63,13 +63,13 @@ function cn() {
63
63
  var te = x.displayName || x.name || "";
64
64
  return te !== "" ? L + "(" + te + ")" : L;
65
65
  }
66
- function O(o) {
66
+ function k(o) {
67
67
  return o.displayName || "Context";
68
68
  }
69
69
  function B(o) {
70
70
  if (o == null)
71
71
  return null;
72
- if (typeof o.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
72
+ if (typeof o.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
73
73
  return o.displayName || o.name || null;
74
74
  if (typeof o == "string")
75
75
  return o;
@@ -82,28 +82,28 @@ function cn() {
82
82
  return "Profiler";
83
83
  case r:
84
84
  return "StrictMode";
85
- case p:
86
- return "Suspense";
87
85
  case h:
86
+ return "Suspense";
87
+ case p:
88
88
  return "SuspenseList";
89
89
  }
90
90
  if (typeof o == "object")
91
91
  switch (o.$$typeof) {
92
92
  case u:
93
93
  var x = o;
94
- return O(x) + ".Consumer";
94
+ return k(x) + ".Consumer";
95
95
  case b:
96
96
  var L = o;
97
- return O(L._context) + ".Provider";
97
+ return k(L._context) + ".Provider";
98
98
  case d:
99
99
  return R(o, o.render, "ForwardRef");
100
- case v:
100
+ case S:
101
101
  var _ = o.displayName || null;
102
102
  return _ !== null ? _ : B(o.type) || "Memo";
103
- case g: {
104
- var te = o, oe = te._payload, ee = te._init;
103
+ case y: {
104
+ var te = o, oe = te._payload, Q = te._init;
105
105
  try {
106
- return B(ee(oe));
106
+ return B(Q(oe));
107
107
  } catch {
108
108
  return null;
109
109
  }
@@ -111,14 +111,14 @@ function cn() {
111
111
  }
112
112
  return null;
113
113
  }
114
- var Y = Object.assign, k = 0, De, we, V, I, ne, de, se;
114
+ var Y = Object.assign, O = 0, De, Se, V, I, ne, de, se;
115
115
  function ue() {
116
116
  }
117
117
  ue.__reactDisabledLog = !0;
118
118
  function z() {
119
119
  {
120
- if (k === 0) {
121
- De = console.log, we = console.info, V = console.warn, I = console.error, ne = console.group, de = console.groupCollapsed, se = console.groupEnd;
120
+ if (O === 0) {
121
+ De = console.log, Se = console.info, V = console.warn, I = console.error, ne = console.group, de = console.groupCollapsed, se = console.groupEnd;
122
122
  var o = {
123
123
  configurable: !0,
124
124
  enumerable: !0,
@@ -135,12 +135,12 @@ function cn() {
135
135
  groupEnd: o
136
136
  });
137
137
  }
138
- k++;
138
+ O++;
139
139
  }
140
140
  }
141
- function ge() {
141
+ function ye() {
142
142
  {
143
- if (k--, k === 0) {
143
+ if (O--, O === 0) {
144
144
  var o = {
145
145
  configurable: !0,
146
146
  enumerable: !0,
@@ -151,7 +151,7 @@ function cn() {
151
151
  value: De
152
152
  }),
153
153
  info: Y({}, o, {
154
- value: we
154
+ value: Se
155
155
  }),
156
156
  warn: Y({}, o, {
157
157
  value: V
@@ -170,7 +170,7 @@ function cn() {
170
170
  })
171
171
  });
172
172
  }
173
- k < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
173
+ O < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
174
174
  }
175
175
  }
176
176
  var Le = M.ReactCurrentDispatcher, Ie;
@@ -187,16 +187,16 @@ function cn() {
187
187
  ` + Ie + o;
188
188
  }
189
189
  }
190
- var $ = !1, G;
190
+ var $ = !1, q;
191
191
  {
192
- var be = typeof WeakMap == "function" ? WeakMap : Map;
193
- G = new be();
192
+ var xe = typeof WeakMap == "function" ? WeakMap : Map;
193
+ q = new xe();
194
194
  }
195
- function qe(o, x) {
195
+ function Qe(o, x) {
196
196
  if (!o || $)
197
197
  return "";
198
198
  {
199
- var L = G.get(o);
199
+ var L = q.get(o);
200
200
  if (L !== void 0)
201
201
  return L;
202
202
  }
@@ -208,63 +208,63 @@ function cn() {
208
208
  oe = Le.current, Le.current = null, z();
209
209
  try {
210
210
  if (x) {
211
- var ee = function() {
211
+ var Q = function() {
212
212
  throw Error();
213
213
  };
214
- if (Object.defineProperty(ee.prototype, "props", {
214
+ if (Object.defineProperty(Q.prototype, "props", {
215
215
  set: function() {
216
216
  throw Error();
217
217
  }
218
218
  }), typeof Reflect == "object" && Reflect.construct) {
219
219
  try {
220
- Reflect.construct(ee, []);
221
- } catch (Oe) {
222
- _ = Oe;
220
+ Reflect.construct(Q, []);
221
+ } catch (Ne) {
222
+ _ = Ne;
223
223
  }
224
- Reflect.construct(o, [], ee);
224
+ Reflect.construct(o, [], Q);
225
225
  } else {
226
226
  try {
227
- ee.call();
228
- } catch (Oe) {
229
- _ = Oe;
227
+ Q.call();
228
+ } catch (Ne) {
229
+ _ = Ne;
230
230
  }
231
- o.call(ee.prototype);
231
+ o.call(Q.prototype);
232
232
  }
233
233
  } else {
234
234
  try {
235
235
  throw Error();
236
- } catch (Oe) {
237
- _ = Oe;
236
+ } catch (Ne) {
237
+ _ = Ne;
238
238
  }
239
239
  o();
240
240
  }
241
- } catch (Oe) {
242
- if (Oe && _ && typeof Oe.stack == "string") {
243
- for (var K = Oe.stack.split(`
241
+ } catch (Ne) {
242
+ if (Ne && _ && typeof Ne.stack == "string") {
243
+ for (var K = Ne.stack.split(`
244
244
  `), Re = _.stack.split(`
245
- `), ye = K.length - 1, xe = Re.length - 1; ye >= 1 && xe >= 0 && K[ye] !== Re[xe]; )
246
- xe--;
247
- for (; ye >= 1 && xe >= 0; ye--, xe--)
248
- if (K[ye] !== Re[xe]) {
249
- if (ye !== 1 || xe !== 1)
245
+ `), we = K.length - 1, be = Re.length - 1; we >= 1 && be >= 0 && K[we] !== Re[be]; )
246
+ be--;
247
+ for (; we >= 1 && be >= 0; we--, be--)
248
+ if (K[we] !== Re[be]) {
249
+ if (we !== 1 || be !== 1)
250
250
  do
251
- if (ye--, xe--, xe < 0 || K[ye] !== Re[xe]) {
251
+ if (we--, be--, be < 0 || K[we] !== Re[be]) {
252
252
  var Be = `
253
- ` + K[ye].replace(" at new ", " at ");
254
- return o.displayName && Be.includes("<anonymous>") && (Be = Be.replace("<anonymous>", o.displayName)), typeof o == "function" && G.set(o, Be), Be;
253
+ ` + K[we].replace(" at new ", " at ");
254
+ return o.displayName && Be.includes("<anonymous>") && (Be = Be.replace("<anonymous>", o.displayName)), typeof o == "function" && q.set(o, Be), Be;
255
255
  }
256
- while (ye >= 1 && xe >= 0);
256
+ while (we >= 1 && be >= 0);
257
257
  break;
258
258
  }
259
259
  }
260
260
  } finally {
261
- $ = !1, Le.current = oe, ge(), Error.prepareStackTrace = te;
261
+ $ = !1, Le.current = oe, ye(), Error.prepareStackTrace = te;
262
262
  }
263
- var Ke = o ? o.displayName || o.name : "", et = Ke ? Ye(Ke) : "";
264
- return typeof o == "function" && G.set(o, et), et;
263
+ var Ge = o ? o.displayName || o.name : "", Ze = Ge ? Ye(Ge) : "";
264
+ return typeof o == "function" && q.set(o, Ze), Ze;
265
265
  }
266
266
  function ce(o, x, L) {
267
- return qe(o, !1);
267
+ return Qe(o, !1);
268
268
  }
269
269
  function me(o) {
270
270
  var x = o.prototype;
@@ -274,22 +274,22 @@ function cn() {
274
274
  if (o == null)
275
275
  return "";
276
276
  if (typeof o == "function")
277
- return qe(o, me(o));
277
+ return Qe(o, me(o));
278
278
  if (typeof o == "string")
279
279
  return Ye(o);
280
280
  switch (o) {
281
- case p:
282
- return Ye("Suspense");
283
281
  case h:
282
+ return Ye("Suspense");
283
+ case p:
284
284
  return Ye("SuspenseList");
285
285
  }
286
286
  if (typeof o == "object")
287
287
  switch (o.$$typeof) {
288
288
  case d:
289
289
  return ce(o.render);
290
- case v:
290
+ case S:
291
291
  return Fe(o.type, x, L);
292
- case g: {
292
+ case y: {
293
293
  var _ = o, te = _._payload, oe = _._init;
294
294
  try {
295
295
  return Fe(oe(te), x, L);
@@ -299,86 +299,86 @@ function cn() {
299
299
  }
300
300
  return "";
301
301
  }
302
- var ze = Object.prototype.hasOwnProperty, Se = {}, Qe = M.ReactDebugCurrentFrame;
303
- function _e(o) {
302
+ var pe = Object.prototype.hasOwnProperty, et = {}, _e = M.ReactDebugCurrentFrame;
303
+ function Xe(o) {
304
304
  if (o) {
305
305
  var x = o._owner, L = Fe(o.type, o._source, x ? x.type : null);
306
- Qe.setExtraStackFrame(L);
306
+ _e.setExtraStackFrame(L);
307
307
  } else
308
- Qe.setExtraStackFrame(null);
308
+ _e.setExtraStackFrame(null);
309
309
  }
310
- function pt(o, x, L, _, te) {
310
+ function Ue(o, x, L, _, te) {
311
311
  {
312
- var oe = Function.call.bind(ze);
313
- for (var ee in o)
314
- if (oe(o, ee)) {
312
+ var oe = Function.call.bind(pe);
313
+ for (var Q in o)
314
+ if (oe(o, Q)) {
315
315
  var K = void 0;
316
316
  try {
317
- if (typeof o[ee] != "function") {
318
- var Re = Error((_ || "React class") + ": " + L + " type `" + ee + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[ee] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
317
+ if (typeof o[Q] != "function") {
318
+ var Re = Error((_ || "React class") + ": " + L + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[Q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
319
319
  throw Re.name = "Invariant Violation", Re;
320
320
  }
321
- K = o[ee](x, ee, _, L, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
322
- } catch (ye) {
323
- K = ye;
321
+ K = o[Q](x, Q, _, L, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
322
+ } catch (we) {
323
+ K = we;
324
324
  }
325
- K && !(K instanceof Error) && (_e(te), S("%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).", _ || "React class", L, ee, typeof K), _e(null)), K instanceof Error && !(K.message in Se) && (Se[K.message] = !0, _e(te), S("Failed %s type: %s", L, K.message), _e(null));
325
+ K && !(K instanceof Error) && (Xe(te), v("%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).", _ || "React class", L, Q, typeof K), Xe(null)), K instanceof Error && !(K.message in et) && (et[K.message] = !0, Xe(te), v("Failed %s type: %s", L, K.message), Xe(null));
326
326
  }
327
327
  }
328
328
  }
329
- var We = Array.isArray;
330
- function at(o) {
331
- return We(o);
332
- }
329
+ var ot = Array.isArray;
333
330
  function i(o) {
331
+ return ot(o);
332
+ }
333
+ function g(o) {
334
334
  {
335
335
  var x = typeof Symbol == "function" && Symbol.toStringTag, L = x && o[Symbol.toStringTag] || o.constructor.name || "Object";
336
336
  return L;
337
337
  }
338
338
  }
339
- function y(o) {
339
+ function D(o) {
340
340
  try {
341
- return T(o), !1;
341
+ return f(o), !1;
342
342
  } catch {
343
343
  return !0;
344
344
  }
345
345
  }
346
- function T(o) {
346
+ function f(o) {
347
347
  return "" + o;
348
348
  }
349
- function f(o) {
350
- if (y(o))
351
- return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", i(o)), T(o);
349
+ function U(o) {
350
+ if (D(o))
351
+ return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", g(o)), f(o);
352
352
  }
353
- var X = M.ReactCurrentOwner, Q = {
353
+ var G = M.ReactCurrentOwner, ee = {
354
354
  key: !0,
355
355
  ref: !0,
356
356
  __self: !0,
357
357
  __source: !0
358
- }, J, pe;
359
- function Ce(o) {
360
- if (ze.call(o, "ref")) {
358
+ }, ie, $e;
359
+ function ze(o) {
360
+ if (pe.call(o, "ref")) {
361
361
  var x = Object.getOwnPropertyDescriptor(o, "ref").get;
362
362
  if (x && x.isReactWarning)
363
363
  return !1;
364
364
  }
365
365
  return o.ref !== void 0;
366
366
  }
367
- function ie(o) {
368
- if (ze.call(o, "key")) {
367
+ function ge(o) {
368
+ if (pe.call(o, "key")) {
369
369
  var x = Object.getOwnPropertyDescriptor(o, "key").get;
370
370
  if (x && x.isReactWarning)
371
371
  return !1;
372
372
  }
373
373
  return o.key !== void 0;
374
374
  }
375
- function Xe(o, x) {
376
- typeof o.ref == "string" && X.current;
375
+ function tt(o, x) {
376
+ typeof o.ref == "string" && G.current;
377
377
  }
378
- function Ge(o, x) {
378
+ function Ke(o, x) {
379
379
  {
380
380
  var L = function() {
381
- J || (J = !0, S("%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)", x));
381
+ ie || (ie = !0, v("%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)", x));
382
382
  };
383
383
  L.isReactWarning = !0, Object.defineProperty(o, "key", {
384
384
  get: L,
@@ -386,10 +386,10 @@ function cn() {
386
386
  });
387
387
  }
388
388
  }
389
- function ot(o, x) {
389
+ function st(o, x) {
390
390
  {
391
391
  var L = function() {
392
- pe || (pe = !0, S("%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)", x));
392
+ $e || ($e = !0, v("%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)", x));
393
393
  };
394
394
  L.isReactWarning = !0, Object.defineProperty(o, "ref", {
395
395
  get: L,
@@ -397,7 +397,7 @@ function cn() {
397
397
  });
398
398
  }
399
399
  }
400
- var Pe = function(o, x, L, _, te, oe, ee) {
400
+ var Ce = function(o, x, L, _, te, oe, Q) {
401
401
  var K = {
402
402
  // This tag allows us to uniquely identify this as a React Element
403
403
  $$typeof: a,
@@ -405,7 +405,7 @@ function cn() {
405
405
  type: o,
406
406
  key: x,
407
407
  ref: L,
408
- props: ee,
408
+ props: Q,
409
409
  // Record the component responsible for creating this element.
410
410
  _owner: oe
411
411
  };
@@ -428,32 +428,32 @@ function cn() {
428
428
  };
429
429
  function ht(o, x, L, _, te) {
430
430
  {
431
- var oe, ee = {}, K = null, Re = null;
432
- L !== void 0 && (f(L), K = "" + L), ie(x) && (f(x.key), K = "" + x.key), Ce(x) && (Re = x.ref, Xe(x, te));
431
+ var oe, Q = {}, K = null, Re = null;
432
+ L !== void 0 && (U(L), K = "" + L), ge(x) && (U(x.key), K = "" + x.key), ze(x) && (Re = x.ref, tt(x, te));
433
433
  for (oe in x)
434
- ze.call(x, oe) && !Q.hasOwnProperty(oe) && (ee[oe] = x[oe]);
434
+ pe.call(x, oe) && !ee.hasOwnProperty(oe) && (Q[oe] = x[oe]);
435
435
  if (o && o.defaultProps) {
436
- var ye = o.defaultProps;
437
- for (oe in ye)
438
- ee[oe] === void 0 && (ee[oe] = ye[oe]);
436
+ var we = o.defaultProps;
437
+ for (oe in we)
438
+ Q[oe] === void 0 && (Q[oe] = we[oe]);
439
439
  }
440
440
  if (K || Re) {
441
- var xe = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
442
- K && Ge(ee, xe), Re && ot(ee, xe);
441
+ var be = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
442
+ K && Ke(Q, be), Re && st(Q, be);
443
443
  }
444
- return Pe(o, K, Re, te, _, X.current, ee);
444
+ return Ce(o, K, Re, te, _, G.current, Q);
445
445
  }
446
446
  }
447
- var xt = M.ReactCurrentOwner, Ot = M.ReactDebugCurrentFrame;
448
- function Je(o) {
447
+ var xt = M.ReactCurrentOwner, kt = M.ReactDebugCurrentFrame;
448
+ function qe(o) {
449
449
  if (o) {
450
450
  var x = o._owner, L = Fe(o.type, o._source, x ? x.type : null);
451
- Ot.setExtraStackFrame(L);
451
+ kt.setExtraStackFrame(L);
452
452
  } else
453
- Ot.setExtraStackFrame(null);
453
+ kt.setExtraStackFrame(null);
454
454
  }
455
- var st;
456
- st = !1;
455
+ var it;
456
+ it = !1;
457
457
  function wt(o) {
458
458
  return typeof o == "object" && o !== null && o.$$typeof === a;
459
459
  }
@@ -485,7 +485,7 @@ Check the top-level render call using <` + L + ">.");
485
485
  return x;
486
486
  }
487
487
  }
488
- function kt(o, x) {
488
+ function Ot(o, x) {
489
489
  {
490
490
  if (!o._store || o._store.validated || o.key != null)
491
491
  return;
@@ -495,29 +495,29 @@ Check the top-level render call using <` + L + ">.");
495
495
  return;
496
496
  Dt[L] = !0;
497
497
  var _ = "";
498
- o && o._owner && o._owner !== xt.current && (_ = " It was passed a child from " + B(o._owner.type) + "."), Je(o), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', L, _), Je(null);
498
+ o && o._owner && o._owner !== xt.current && (_ = " It was passed a child from " + B(o._owner.type) + "."), qe(o), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', L, _), qe(null);
499
499
  }
500
500
  }
501
501
  function Et(o, x) {
502
502
  {
503
503
  if (typeof o != "object")
504
504
  return;
505
- if (at(o))
505
+ if (i(o))
506
506
  for (var L = 0; L < o.length; L++) {
507
507
  var _ = o[L];
508
- wt(_) && kt(_, x);
508
+ wt(_) && Ot(_, x);
509
509
  }
510
510
  else if (wt(o))
511
511
  o._store && (o._store.validated = !0);
512
512
  else if (o) {
513
513
  var te = N(o);
514
514
  if (typeof te == "function" && te !== o.entries)
515
- for (var oe = te.call(o), ee; !(ee = oe.next()).done; )
516
- wt(ee.value) && kt(ee.value, x);
515
+ for (var oe = te.call(o), Q; !(Q = oe.next()).done; )
516
+ wt(Q.value) && Ot(Q.value, x);
517
517
  }
518
518
  }
519
519
  }
520
- function it(o) {
520
+ function lt(o) {
521
521
  {
522
522
  var x = o.type;
523
523
  if (x == null || typeof x == "string")
@@ -527,19 +527,19 @@ Check the top-level render call using <` + L + ">.");
527
527
  L = x.propTypes;
528
528
  else if (typeof x == "object" && (x.$$typeof === d || // Note: Memo only checks outer props here.
529
529
  // Inner props are checked in the reconciler.
530
- x.$$typeof === v))
530
+ x.$$typeof === S))
531
531
  L = x.propTypes;
532
532
  else
533
533
  return;
534
534
  if (L) {
535
535
  var _ = B(x);
536
- pt(L, o.props, "prop", _, o);
537
- } else if (x.PropTypes !== void 0 && !st) {
538
- st = !0;
536
+ Ue(L, o.props, "prop", _, o);
537
+ } else if (x.PropTypes !== void 0 && !it) {
538
+ it = !0;
539
539
  var te = B(x);
540
- S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", te || "Unknown");
540
+ v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", te || "Unknown");
541
541
  }
542
- typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
542
+ typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
543
543
  }
544
544
  }
545
545
  function $t(o) {
@@ -547,56 +547,56 @@ Check the top-level render call using <` + L + ">.");
547
547
  for (var x = Object.keys(o.props), L = 0; L < x.length; L++) {
548
548
  var _ = x[L];
549
549
  if (_ !== "children" && _ !== "key") {
550
- Je(o), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _), Je(null);
550
+ qe(o), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _), qe(null);
551
551
  break;
552
552
  }
553
553
  }
554
- o.ref !== null && (Je(o), S("Invalid attribute `ref` supplied to `React.Fragment`."), Je(null));
554
+ o.ref !== null && (qe(o), v("Invalid attribute `ref` supplied to `React.Fragment`."), qe(null));
555
555
  }
556
556
  }
557
557
  var Bt = {};
558
558
  function Ae(o, x, L, _, te, oe) {
559
559
  {
560
- var ee = U(o);
561
- if (!ee) {
560
+ var Q = X(o);
561
+ if (!Q) {
562
562
  var K = "";
563
563
  (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (K += " 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
564
  var Re = zt();
565
565
  Re ? K += Re : K += Tt();
566
- var ye;
567
- o === null ? ye = "null" : at(o) ? ye = "array" : o !== void 0 && o.$$typeof === a ? (ye = "<" + (B(o.type) || "Unknown") + " />", K = " Did you accidentally export a JSX literal instead of a component?") : ye = typeof o, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ye, K);
566
+ var we;
567
+ o === null ? we = "null" : i(o) ? we = "array" : o !== void 0 && o.$$typeof === a ? (we = "<" + (B(o.type) || "Unknown") + " />", K = " Did you accidentally export a JSX literal instead of a component?") : we = typeof o, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", we, K);
568
568
  }
569
- var xe = ht(o, x, L, te, oe);
570
- if (xe == null)
571
- return xe;
572
- if (ee) {
569
+ var be = ht(o, x, L, te, oe);
570
+ if (be == null)
571
+ return be;
572
+ if (Q) {
573
573
  var Be = x.children;
574
574
  if (Be !== void 0)
575
575
  if (_)
576
- if (at(Be)) {
577
- for (var Ke = 0; Ke < Be.length; Ke++)
578
- Et(Be[Ke], o);
576
+ if (i(Be)) {
577
+ for (var Ge = 0; Ge < Be.length; Ge++)
578
+ Et(Be[Ge], o);
579
579
  Object.freeze && Object.freeze(Be);
580
580
  } else
581
- S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
581
+ v("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
582
  else
583
583
  Et(Be, o);
584
584
  }
585
- if (ze.call(x, "key")) {
586
- var et = B(o), Oe = Object.keys(x).filter(function(Ut) {
585
+ if (pe.call(x, "key")) {
586
+ var Ze = B(o), Ne = Object.keys(x).filter(function(Ut) {
587
587
  return Ut !== "key";
588
- }), bt = Oe.length > 0 ? "{key: someKey, " + Oe.join(": ..., ") + ": ...}" : "{key: someKey}";
589
- if (!Bt[et + bt]) {
590
- var Xt = Oe.length > 0 ? "{" + Oe.join(": ..., ") + ": ...}" : "{}";
591
- S(`A props object containing a "key" prop is being spread into JSX:
588
+ }), bt = Ne.length > 0 ? "{key: someKey, " + Ne.join(": ..., ") + ": ...}" : "{key: someKey}";
589
+ if (!Bt[Ze + bt]) {
590
+ var Xt = Ne.length > 0 ? "{" + Ne.join(": ..., ") + ": ...}" : "{}";
591
+ v(`A props object containing a "key" prop is being spread into JSX:
592
592
  let props = %s;
593
593
  <%s {...props} />
594
594
  React keys must be passed directly to JSX without using spread:
595
595
  let props = %s;
596
- <%s key={someKey} {...props} />`, bt, et, Xt, et), Bt[et + bt] = !0;
596
+ <%s key={someKey} {...props} />`, bt, Ze, Xt, Ze), Bt[Ze + bt] = !0;
597
597
  }
598
598
  }
599
- return o === s ? $t(xe) : it(xe), xe;
599
+ return o === s ? $t(be) : lt(be), be;
600
600
  }
601
601
  }
602
602
  function Ht(o, x, L) {
@@ -658,8 +658,8 @@ const Te = (e, a, n) => {
658
658
  H: String(e.getHours()),
659
659
  mm: String(e.getMinutes()).padStart(2, "0"),
660
660
  m: String(e.getMinutes())
661
- };
662
- return a.replace(/YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|HH|H|mm|m/g, (b) => c[b]);
661
+ }, b = /YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|HH|H|mm|m/g, u = [];
662
+ return a.replace(/\[([^\]]*)\]/g, (p, S) => (u.push(S), `${u.length - 1}`)).replace(b, (p) => c[p]).replace(/\uE000(\d+)\uE001/g, (p, S) => u[Number(S)]);
663
663
  }, Kt = (e) => {
664
664
  const a = e.getDay();
665
665
  return a === 0 || a === 6;
@@ -668,10 +668,10 @@ const Te = (e, a, n) => {
668
668
  ), yt = (e) => {
669
669
  const a = new Date(e);
670
670
  return a.setHours(0, 0, 0, 0), a;
671
- }, da = (e) => {
671
+ }, la = (e) => {
672
672
  const a = new Date(e);
673
673
  return a.setHours(23, 59, 59, 999), a;
674
- }, ca = (e, a, n = "day") => {
674
+ }, da = (e, a, n = "day") => {
675
675
  switch (n) {
676
676
  case "hour":
677
677
  return pn(e, a);
@@ -837,7 +837,7 @@ const jt = (e) => e ? {
837
837
  lineHeight: e.lineHeight || 1.5714285714285714,
838
838
  color: e.fontColor || "rgba(0, 0, 0, 0.88)"
839
839
  }
840
- } : {}, { Text: Ve, Paragraph: gn } = br, { Option: lt } = $e, yn = ({
840
+ } : {}, { Text: We, Paragraph: gn } = br, { Option: dt } = Oe, yn = ({
841
841
  task: e,
842
842
  allTasks: a,
843
843
  links: n,
@@ -847,8 +847,8 @@ const jt = (e) => e ? {
847
847
  children: b,
848
848
  styleConfig: u
849
849
  }) => {
850
- const d = jt(u), [p, h] = q(!1), [v, g] = q(null), [m, E] = q("e2s"), [F, N] = q("lag"), [M, S] = q(0), [w, C] = q(e.duration), [Z, W] = q(!0), re = "day", le = n.find((V) => V.target === e.id), j = !!le, U = A.useMemo(() => a.length === 0 ? /* @__PURE__ */ new Date() : new Date(Math.min(...a.map((V) => V.start.getTime()))), [a]), R = () => {
851
- if (v) {
850
+ const d = jt(u), [h, p] = J(!1), [S, y] = J(null), [m, E] = J("e2s"), [F, N] = J("lag"), [M, v] = J(0), [w, C] = J(e.duration), [Z, W] = J(!0), re = "day", le = n.find((V) => V.target === e.id), j = !!le, X = A.useMemo(() => a.length === 0 ? /* @__PURE__ */ new Date() : new Date(Math.min(...a.map((V) => V.start.getTime()))), [a]), R = () => {
851
+ if (S) {
852
852
  const V = F === "lag" ? M : -M, I = rr(V, re);
853
853
  if (w !== e.duration && c) {
854
854
  const ne = Te(new Date(e.start), w, "day");
@@ -858,28 +858,28 @@ const jt = (e) => e ? {
858
858
  end: ne
859
859
  });
860
860
  }
861
- s(v, e.id, m, I), h(!1), O();
861
+ s(S, e.id, m, I), p(!1), k();
862
862
  }
863
- }, O = () => {
864
- g(null), E("e2s"), N("lag"), S(0), C(e.duration);
863
+ }, k = () => {
864
+ y(null), E("e2s"), N("lag"), v(0), C(e.duration);
865
865
  }, B = () => {
866
- le && r && (r(le.id), h(!1), O());
866
+ le && r && (r(le.id), p(!1), k());
867
867
  }, Y = (V) => {
868
- if (h(V), V) {
868
+ if (p(V), V) {
869
869
  if (W(!0), le) {
870
- g(le.source), E(le.type);
870
+ y(le.source), E(le.type);
871
871
  const I = le.lag || 0;
872
- I >= 0 ? (N("lag"), S(I)) : (N("lead"), S(Math.abs(I)));
872
+ I >= 0 ? (N("lag"), v(I)) : (N("lead"), v(Math.abs(I)));
873
873
  } else
874
- O();
874
+ k();
875
875
  C(e.duration);
876
876
  }
877
- }, k = () => {
877
+ }, O = () => {
878
878
  if (!Z) return null;
879
879
  const V = m === "e2s", I = m === "s2s", ne = m === "e2e", de = m === "s2e";
880
- let se = 0, ue = 0, z = "", ge = 0, Le = -1;
881
- V ? (se = 50, ue = 350, ge = 250, Le = 350, z = "M 250 60 L 300 60 L 300 140 L 348 140") : ne ? (se = 100, ue = 100, ge = 300, Le = -1, z = "M 300 60 L 350 60 L 350 140 L 302 140") : I ? (se = 250, ue = 250, ge = 250, Le = -1, z = "M 250 60 L 200 60 L 200 140 L 248 140") : de && (se = 350, ue = 50, ge = 350, Le = 250, z = "M 350 60 L 300 60 L 300 140 L 252 140");
882
- const Ie = v === "gantt-start-date", Ye = a.find(($) => $.id === v);
880
+ let se = 0, ue = 0, z = "", ye = 0, Le = -1;
881
+ V ? (se = 50, ue = 350, ye = 250, Le = 350, z = "M 250 60 L 300 60 L 300 140 L 348 140") : ne ? (se = 100, ue = 100, ye = 300, Le = -1, z = "M 300 60 L 350 60 L 350 140 L 302 140") : I ? (se = 250, ue = 250, ye = 250, Le = -1, z = "M 250 60 L 200 60 L 200 140 L 248 140") : de && (se = 350, ue = 50, ye = 350, Le = 250, z = "M 350 60 L 300 60 L 300 140 L 252 140");
882
+ const Ie = S === "gantt-start-date", Ye = a.find(($) => $.id === S);
883
883
  return /* @__PURE__ */ t.jsx("div", { style: {
884
884
  width: "100%",
885
885
  height: 90,
@@ -892,7 +892,7 @@ const jt = (e) => e ? {
892
892
  flexShrink: 0
893
893
  }, children: /* @__PURE__ */ t.jsxs("svg", { viewBox: "0 0 600 200", style: { width: "100%", height: "100%" }, preserveAspectRatio: "xMidYMid meet", children: [
894
894
  /* @__PURE__ */ t.jsx("defs", { children: /* @__PURE__ */ t.jsx("marker", { id: "arrowhead", markerWidth: "12", markerHeight: "9", refX: "12", refY: "4.5", orient: "auto", children: /* @__PURE__ */ t.jsx("polygon", { points: "0 0, 12 4.5, 0 9", fill: "#8c8c8c" }) }) }),
895
- /* @__PURE__ */ t.jsx("line", { x1: ge, x2: ge, y1: "0", y2: "200", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
895
+ /* @__PURE__ */ t.jsx("line", { x1: ye, x2: ye, y1: "0", y2: "200", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
896
896
  Le !== -1 && /* @__PURE__ */ t.jsx("line", { x1: Le, x2: Le, y1: "0", y2: "200", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
897
897
  /* @__PURE__ */ t.jsx("rect", { x: se, y: "35", width: "200", height: "50", rx: "4", fill: "#e6f4ff", stroke: "#91caff", strokeWidth: "2" }),
898
898
  /* @__PURE__ */ t.jsx("text", { x: se + 100, y: "66", fontSize: "15", textAnchor: "middle", fill: "#003a8c", fontWeight: "600", children: Ie ? "Start Date" : Ye ? `Stage ${a.indexOf(Ye) + 1}` : "Predecessor" }),
@@ -904,8 +904,8 @@ const jt = (e) => e ? {
904
904
  /* @__PURE__ */ t.jsx("path", { d: z, fill: "none", stroke: "#8c8c8c", strokeWidth: "2.5", markerEnd: "url(#arrowhead)" })
905
905
  ] }) });
906
906
  }, De = () => {
907
- const V = v === "gantt-start-date", I = a.find((ue) => ue.id === v);
908
- if (!v) return "Select a checklist from the list to see how it will relate to the current stage.";
907
+ const V = S === "gantt-start-date", I = a.find((ue) => ue.id === S);
908
+ if (!S) return "Select a checklist from the list to see how it will relate to the current stage.";
909
909
  const ne = a.indexOf(e) + 1, de = V ? "Start Date" : `Stage ${a.indexOf(I) + 1}`;
910
910
  let se = "";
911
911
  switch (m) {
@@ -927,7 +927,7 @@ const jt = (e) => e ? {
927
927
  F === "lag" ? se += ` + ${ue} delay` : se += ` - ${ue} overlap`;
928
928
  }
929
929
  return se + ".";
930
- }, we = /* @__PURE__ */ t.jsxs("div", { style: {
930
+ }, Se = /* @__PURE__ */ t.jsxs("div", { style: {
931
931
  width: 550,
932
932
  backgroundColor: d.popover?.backgroundColor || "#fff",
933
933
  borderRadius: d.popover?.borderRadius || "8px",
@@ -935,15 +935,15 @@ const jt = (e) => e ? {
935
935
  boxShadow: d.popover?.boxShadow,
936
936
  fontFamily: d.popover?.fontFamily
937
937
  }, children: [
938
- /* @__PURE__ */ t.jsx(Ve, { strong: !0, style: { fontSize: "16px", display: "block", marginBottom: 16, color: d.font?.color }, children: "Add Dependency" }),
938
+ /* @__PURE__ */ t.jsx(We, { strong: !0, style: { fontSize: "16px", display: "block", marginBottom: 16, color: d.font?.color }, children: "Add Dependency" }),
939
939
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 12, marginBottom: 14 }, children: [
940
940
  /* @__PURE__ */ t.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(
941
- $e,
941
+ Oe,
942
942
  {
943
943
  showSearch: !0,
944
944
  placeholder: "Select checklist",
945
- value: v,
946
- onChange: g,
945
+ value: S,
946
+ onChange: y,
947
947
  style: { width: "100%" },
948
948
  filterOption: (V, I) => {
949
949
  if (I?.value === "gantt-start-date")
@@ -955,63 +955,63 @@ const jt = (e) => e ? {
955
955
  },
956
956
  optionLabelProp: "label",
957
957
  children: [
958
- a.filter((V) => V.id !== e.id).map((V) => /* @__PURE__ */ t.jsx(lt, { value: V.id, label: V.text, children: /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", flexDirection: "column", padding: "4px 0" }, children: [
959
- /* @__PURE__ */ t.jsxs(Ve, { style: { fontSize: "13px" }, children: [
958
+ a.filter((V) => V.id !== e.id).map((V) => /* @__PURE__ */ t.jsx(dt, { value: V.id, label: V.text, children: /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", flexDirection: "column", padding: "4px 0" }, children: [
959
+ /* @__PURE__ */ t.jsxs(We, { style: { fontSize: "13px" }, children: [
960
960
  a.indexOf(V) + 1,
961
961
  ". ",
962
962
  V.text
963
963
  ] }),
964
- /* @__PURE__ */ t.jsxs(Ve, { type: "secondary", style: { fontSize: "11px" }, children: [
964
+ /* @__PURE__ */ t.jsxs(We, { type: "secondary", style: { fontSize: "11px" }, children: [
965
965
  "Start: ",
966
966
  ke(V.start, "MMM D, YYYY")
967
967
  ] })
968
968
  ] }) }, V.id)),
969
- /* @__PURE__ */ t.jsx(lt, { value: "gantt-start-date", label: "Start Date", children: /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", flexDirection: "column", padding: "4px 0", borderTop: "1px solid #f0f0f0", marginTop: "4px", paddingTop: "8px" }, children: [
970
- /* @__PURE__ */ t.jsx(Ve, { style: { fontSize: "13px", fontWeight: 600 }, children: "Start Date" }),
971
- /* @__PURE__ */ t.jsx(Ve, { type: "secondary", style: { fontSize: "11px" }, children: ke(U, "MMM D, YYYY") })
969
+ /* @__PURE__ */ t.jsx(dt, { value: "gantt-start-date", label: "Start Date", children: /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", flexDirection: "column", padding: "4px 0", borderTop: "1px solid #f0f0f0", marginTop: "4px", paddingTop: "8px" }, children: [
970
+ /* @__PURE__ */ t.jsx(We, { style: { fontSize: "13px", fontWeight: 600 }, children: "Start Date" }),
971
+ /* @__PURE__ */ t.jsx(We, { type: "secondary", style: { fontSize: "11px" }, children: ke(X, "MMM D, YYYY") })
972
972
  ] }) }, "gantt-start-date")
973
973
  ]
974
974
  }
975
975
  ) }),
976
976
  /* @__PURE__ */ t.jsx("div", { style: { width: 100 }, children: /* @__PURE__ */ t.jsxs(
977
- $e,
977
+ Oe,
978
978
  {
979
979
  value: m,
980
980
  onChange: E,
981
981
  style: { width: "100%" },
982
982
  children: [
983
- /* @__PURE__ */ t.jsx(lt, { value: "e2s", children: "FS" }),
984
- /* @__PURE__ */ t.jsx(lt, { value: "e2e", children: "FF" }),
985
- /* @__PURE__ */ t.jsx(lt, { value: "s2s", children: "SS" }),
986
- /* @__PURE__ */ t.jsx(lt, { value: "s2e", children: "SF" })
983
+ /* @__PURE__ */ t.jsx(dt, { value: "e2s", children: "FS" }),
984
+ /* @__PURE__ */ t.jsx(dt, { value: "e2e", children: "FF" }),
985
+ /* @__PURE__ */ t.jsx(dt, { value: "s2s", children: "SS" }),
986
+ /* @__PURE__ */ t.jsx(dt, { value: "s2e", children: "SF" })
987
987
  ]
988
988
  }
989
989
  ) })
990
990
  ] }),
991
991
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 12, marginBottom: 14 }, children: [
992
992
  /* @__PURE__ */ t.jsxs("div", { style: { flex: 1 }, children: [
993
- /* @__PURE__ */ t.jsx(Ve, { style: { fontSize: "12px", display: "block", marginBottom: 6, color: d.font?.color }, children: "Delay type" }),
993
+ /* @__PURE__ */ t.jsx(We, { style: { fontSize: "12px", display: "block", marginBottom: 6, color: d.font?.color }, children: "Delay type" }),
994
994
  /* @__PURE__ */ t.jsxs(
995
- $e,
995
+ Oe,
996
996
  {
997
997
  value: F,
998
998
  onChange: N,
999
999
  style: { width: "100%" },
1000
1000
  children: [
1001
- /* @__PURE__ */ t.jsx(lt, { value: "lag", children: "Lag by" }),
1002
- /* @__PURE__ */ t.jsx(lt, { value: "lead", children: "Lead by" })
1001
+ /* @__PURE__ */ t.jsx(dt, { value: "lag", children: "Lag by" }),
1002
+ /* @__PURE__ */ t.jsx(dt, { value: "lead", children: "Lead by" })
1003
1003
  ]
1004
1004
  }
1005
1005
  )
1006
1006
  ] }),
1007
1007
  /* @__PURE__ */ t.jsxs("div", { style: { flex: 1 }, children: [
1008
- /* @__PURE__ */ t.jsx(Ve, { style: { fontSize: "12px", display: "block", marginBottom: 6, color: d.font?.color }, children: "Days" }),
1008
+ /* @__PURE__ */ t.jsx(We, { style: { fontSize: "12px", display: "block", marginBottom: 6, color: d.font?.color }, children: "Days" }),
1009
1009
  /* @__PURE__ */ t.jsx(
1010
- nt,
1010
+ at,
1011
1011
  {
1012
1012
  min: 0,
1013
1013
  value: M,
1014
- onChange: (V) => S(V || 0),
1014
+ onChange: (V) => v(V || 0),
1015
1015
  style: { width: "100%" },
1016
1016
  placeholder: "0"
1017
1017
  }
@@ -1019,9 +1019,9 @@ const jt = (e) => e ? {
1019
1019
  ] })
1020
1020
  ] }),
1021
1021
  /* @__PURE__ */ t.jsxs("div", { style: { marginBottom: 14 }, children: [
1022
- /* @__PURE__ */ t.jsx(Ve, { style: { fontSize: "12px", display: "block", marginBottom: 6, color: d.font?.color }, children: "Duration (days)" }),
1022
+ /* @__PURE__ */ t.jsx(We, { style: { fontSize: "12px", display: "block", marginBottom: 6, color: d.font?.color }, children: "Duration (days)" }),
1023
1023
  /* @__PURE__ */ t.jsx(
1024
- nt,
1024
+ at,
1025
1025
  {
1026
1026
  min: 1,
1027
1027
  value: w,
@@ -1037,13 +1037,13 @@ const jt = (e) => e ? {
1037
1037
  borderRadius: "4px",
1038
1038
  marginBottom: 14
1039
1039
  }, children: /* @__PURE__ */ t.jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "8px" }, children: [
1040
- /* @__PURE__ */ t.jsx(Ve, { style: { fontSize: "11px", color: d.font?.color }, children: "FS: Finish to Start" }),
1041
- /* @__PURE__ */ t.jsx(Ve, { style: { fontSize: "11px", color: d.font?.color }, children: "SS: Start to Start" }),
1042
- /* @__PURE__ */ t.jsx(Ve, { style: { fontSize: "11px", color: d.font?.color }, children: "FF: Finish to Finish" }),
1043
- /* @__PURE__ */ t.jsx(Ve, { style: { fontSize: "11px", color: d.font?.color }, children: "SF: Start to Finish" })
1040
+ /* @__PURE__ */ t.jsx(We, { style: { fontSize: "11px", color: d.font?.color }, children: "FS: Finish to Start" }),
1041
+ /* @__PURE__ */ t.jsx(We, { style: { fontSize: "11px", color: d.font?.color }, children: "SS: Start to Start" }),
1042
+ /* @__PURE__ */ t.jsx(We, { style: { fontSize: "11px", color: d.font?.color }, children: "FF: Finish to Finish" }),
1043
+ /* @__PURE__ */ t.jsx(We, { style: { fontSize: "11px", color: d.font?.color }, children: "SF: Start to Finish" })
1044
1044
  ] }) }),
1045
1045
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 8 }, children: [
1046
- /* @__PURE__ */ t.jsx(Ve, { strong: !0, style: { fontSize: "13px", color: d.font?.color }, children: "Dependency preview" }),
1046
+ /* @__PURE__ */ t.jsx(We, { strong: !0, style: { fontSize: "13px", color: d.font?.color }, children: "Dependency preview" }),
1047
1047
  /* @__PURE__ */ t.jsx(
1048
1048
  "a",
1049
1049
  {
@@ -1059,7 +1059,7 @@ const jt = (e) => e ? {
1059
1059
  )
1060
1060
  ] }),
1061
1061
  Z && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1062
- k(),
1062
+ O(),
1063
1063
  /* @__PURE__ */ t.jsx(gn, { style: {
1064
1064
  fontSize: "12px",
1065
1065
  color: d.font?.color || "#262626",
@@ -1069,7 +1069,7 @@ const jt = (e) => e ? {
1069
1069
  ] }),
1070
1070
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", justifyContent: "flex-end", gap: 10 }, children: [
1071
1071
  j && /* @__PURE__ */ t.jsx(
1072
- Ne,
1072
+ Pe,
1073
1073
  {
1074
1074
  danger: !0,
1075
1075
  onClick: B,
@@ -1080,11 +1080,11 @@ const jt = (e) => e ? {
1080
1080
  }
1081
1081
  ),
1082
1082
  /* @__PURE__ */ t.jsx(
1083
- Ne,
1083
+ Pe,
1084
1084
  {
1085
1085
  type: "primary",
1086
1086
  onClick: R,
1087
- disabled: !v,
1087
+ disabled: !S,
1088
1088
  style: {
1089
1089
  ...d.buttonPrimary,
1090
1090
  minWidth: 100
@@ -1097,9 +1097,9 @@ const jt = (e) => e ? {
1097
1097
  return /* @__PURE__ */ t.jsx(
1098
1098
  zr,
1099
1099
  {
1100
- content: we,
1100
+ content: Se,
1101
1101
  trigger: "click",
1102
- open: p,
1102
+ open: h,
1103
1103
  onOpenChange: Y,
1104
1104
  placement: "bottomLeft",
1105
1105
  overlayClassName: "dependency-popover",
@@ -1108,25 +1108,25 @@ const jt = (e) => e ? {
1108
1108
  }
1109
1109
  );
1110
1110
  }, Er = Ir(wr(
1111
- ({ tasks: e, allTasks: a = [], columns: n, selectedTask: s, onTaskClick: r, onTaskContextMenu: c, onTaskUpdate: b, onTaskDragStart: u, onAddTask: d, onAddDependency: p, onRemoveDependency: h, links: v = [], dropIndicator: g, reorderTask: m, styleConfig: E, headerHeight: F }, N) => {
1111
+ ({ tasks: e, allTasks: a = [], columns: n, selectedTask: s, onTaskClick: r, onTaskContextMenu: c, onTaskUpdate: b, onTaskDragStart: u, onAddTask: d, onAddDependency: h, onRemoveDependency: p, links: S = [], dropIndicator: y, reorderTask: m, styleConfig: E, headerHeight: F }, N) => {
1112
1112
  const M = A.useRef(null);
1113
1113
  A.useImperativeHandle(N, () => M.current);
1114
- const [S, w] = A.useState(null), [C, Z] = A.useState(0), W = (j, U = 0) => {
1115
- if (!j.parent) return U;
1116
- const R = e.find((O) => O.id === j.parent);
1117
- return R ? W(R, U + 1) : U;
1118
- }, re = (j, U) => {
1119
- if (U === j.duration) return;
1120
- const R = Te(new Date(j.start), U, "day");
1114
+ const [v, w] = A.useState(null), [C, Z] = A.useState(0), W = (j, X = 0) => {
1115
+ if (!j.parent) return X;
1116
+ const R = e.find((k) => k.id === j.parent);
1117
+ return R ? W(R, X + 1) : X;
1118
+ }, re = (j, X) => {
1119
+ if (X === j.duration) return;
1120
+ const R = Te(new Date(j.start), X, "day");
1121
1121
  b?.({
1122
1122
  ...j,
1123
- duration: U,
1123
+ duration: X,
1124
1124
  end: R
1125
1125
  });
1126
- }, le = (j, U) => {
1127
- if (U.template)
1128
- return U.template(j);
1129
- switch (U.name) {
1126
+ }, le = (j, X) => {
1127
+ if (X.template)
1128
+ return X.template(j);
1129
+ switch (X.name) {
1130
1130
  case "text": {
1131
1131
  const R = W(j);
1132
1132
  return /* @__PURE__ */ t.jsxs("div", { className: "gantt-grid-cell-text", style: { paddingLeft: R * 14 }, children: [
@@ -1134,14 +1134,14 @@ const jt = (e) => e ? {
1134
1134
  "div",
1135
1135
  {
1136
1136
  className: "gantt-row-drag-handle",
1137
- onMouseDown: (O) => {
1138
- O.preventDefault(), u?.(j.id, O.clientX, O.clientY, "reorder");
1137
+ onMouseDown: (k) => {
1138
+ k.preventDefault(), u?.(j.id, k.clientX, k.clientY, "reorder");
1139
1139
  },
1140
1140
  children: /* @__PURE__ */ t.jsx(Ee, { icon: Xr })
1141
1141
  }
1142
1142
  ),
1143
- j.type === "project" ? /* @__PURE__ */ t.jsx("span", { className: "gantt-tree-icon", onClick: (O) => {
1144
- O.stopPropagation(), b?.({ ...j, open: !j.open });
1143
+ j.type === "project" ? /* @__PURE__ */ t.jsx("span", { className: "gantt-tree-icon", onClick: (k) => {
1144
+ k.stopPropagation(), b?.({ ...j, open: !j.open });
1145
1145
  }, children: /* @__PURE__ */ t.jsx(Ee, { icon: j.open ? cr : Ur }) }) : /* @__PURE__ */ t.jsx("span", { style: { width: 16, display: "inline-block" } }),
1146
1146
  /* @__PURE__ */ t.jsx("span", { className: "gantt-task-name-text", children: j.text })
1147
1147
  ] });
@@ -1151,13 +1151,13 @@ const jt = (e) => e ? {
1151
1151
  case "end":
1152
1152
  return ke(j.end, "DD-MM-YYYY");
1153
1153
  case "duration":
1154
- return S === j.id ? /* @__PURE__ */ t.jsx(
1155
- nt,
1154
+ return v === j.id ? /* @__PURE__ */ t.jsx(
1155
+ at,
1156
1156
  {
1157
1157
  size: "small",
1158
1158
  min: 1,
1159
1159
  value: C,
1160
- onChange: (O) => Z(O || 1),
1160
+ onChange: (k) => Z(k || 1),
1161
1161
  onBlur: () => {
1162
1162
  re(j, C), w(null);
1163
1163
  },
@@ -1170,8 +1170,8 @@ const jt = (e) => e ? {
1170
1170
  ) : /* @__PURE__ */ t.jsxs(
1171
1171
  "div",
1172
1172
  {
1173
- onClick: (O) => {
1174
- O.stopPropagation(), w(j.id), Z(j.duration);
1173
+ onClick: (k) => {
1174
+ k.stopPropagation(), w(j.id), Z(j.duration);
1175
1175
  },
1176
1176
  style: {
1177
1177
  backgroundColor: "#fff7e6",
@@ -1192,15 +1192,15 @@ const jt = (e) => e ? {
1192
1192
  }
1193
1193
  );
1194
1194
  case "predecessors": {
1195
- const O = v.filter((B) => B.target === j.id)[0];
1195
+ const k = S.filter((B) => B.target === j.id)[0];
1196
1196
  return /* @__PURE__ */ t.jsx(
1197
1197
  yn,
1198
1198
  {
1199
1199
  task: j,
1200
1200
  allTasks: a,
1201
- links: v,
1202
- onAddDependency: (B, Y, k, De) => p?.(B, Y, k, De),
1203
- onRemoveDependency: (B) => h?.(B),
1201
+ links: S,
1202
+ onAddDependency: (B, Y, O, De) => h?.(B, Y, O, De),
1203
+ onRemoveDependency: (B) => p?.(B),
1204
1204
  onTaskUpdate: b,
1205
1205
  styleConfig: E,
1206
1206
  children: /* @__PURE__ */ t.jsx(
@@ -1214,8 +1214,8 @@ const jt = (e) => e ? {
1214
1214
  alignItems: "center",
1215
1215
  gap: "4px"
1216
1216
  },
1217
- children: O ? (() => {
1218
- const B = a.find((k) => k.id === O.source), Y = B ? a.indexOf(B) + 1 : 0;
1217
+ children: k ? (() => {
1218
+ const B = a.find((O) => O.id === k.source), Y = B ? a.indexOf(B) + 1 : 0;
1219
1219
  return /* @__PURE__ */ t.jsx(
1220
1220
  "span",
1221
1221
  {
@@ -1228,7 +1228,7 @@ const jt = (e) => e ? {
1228
1228
  borderRadius: "4px",
1229
1229
  whiteSpace: "nowrap"
1230
1230
  },
1231
- children: mn(O, Y)
1231
+ children: mn(k, Y)
1232
1232
  }
1233
1233
  );
1234
1234
  })() : /* @__PURE__ */ t.jsx(
@@ -1252,7 +1252,7 @@ const jt = (e) => e ? {
1252
1252
  }
1253
1253
  case "add":
1254
1254
  return /* @__PURE__ */ t.jsx(
1255
- Ne,
1255
+ Pe,
1256
1256
  {
1257
1257
  type: "primary",
1258
1258
  size: "small",
@@ -1290,7 +1290,7 @@ const jt = (e) => e ? {
1290
1290
  case "index":
1291
1291
  return /* @__PURE__ */ t.jsx("span", { style: { color: "#8c8c8c" }, children: a.indexOf(j) + 1 });
1292
1292
  default:
1293
- return j[U.name] || "";
1293
+ return j[X.name] || "";
1294
1294
  }
1295
1295
  };
1296
1296
  return /* @__PURE__ */ t.jsxs("div", { className: "gantt-grid", ref: M, children: [
@@ -1312,44 +1312,44 @@ const jt = (e) => e ? {
1312
1312
  j.name
1313
1313
  )) }),
1314
1314
  /* @__PURE__ */ t.jsx("div", { className: "gantt-grid-body", children: e.map((j) => {
1315
- const U = m?.id === j.id, R = m?.descendantIds.includes(j.id);
1315
+ const X = m?.id === j.id, R = m?.descendantIds.includes(j.id);
1316
1316
  return /* @__PURE__ */ t.jsxs(
1317
1317
  "div",
1318
1318
  {
1319
- className: `gantt-grid-row ${s === j.id ? "selected" : ""} ${U ? "dragging-row" : ""} ${R ? "descendant-dragging-row" : ""} ${g?.taskId === j.id ? `drop-target-${g.position}` : ""}`,
1319
+ className: `gantt-grid-row ${s === j.id ? "selected" : ""} ${X ? "dragging-row" : ""} ${R ? "descendant-dragging-row" : ""} ${y?.taskId === j.id ? `drop-target-${y.position}` : ""}`,
1320
1320
  onClick: () => r(j.id),
1321
- onContextMenu: (O) => c?.(O, j.id),
1321
+ onContextMenu: (k) => c?.(k, j.id),
1322
1322
  style: {
1323
1323
  display: "flex",
1324
1324
  minWidth: "100%"
1325
1325
  /* Ensure row spans all columns */
1326
1326
  },
1327
1327
  children: [
1328
- n.map((O) => {
1329
- const B = O.name === "add";
1328
+ n.map((k) => {
1329
+ const B = k.name === "add";
1330
1330
  return /* @__PURE__ */ t.jsx(
1331
1331
  "div",
1332
1332
  {
1333
1333
  className: "gantt-grid-cell",
1334
1334
  style: {
1335
- width: O.width,
1336
- minWidth: O.width,
1335
+ width: k.width,
1336
+ minWidth: k.width,
1337
1337
  /* Ensure column maintains width */
1338
- textAlign: O.align || "left",
1338
+ textAlign: k.align || "left",
1339
1339
  display: "flex",
1340
1340
  alignItems: "center",
1341
- justifyContent: B ? "center" : O.name === "text" ? "flex-start" : O.align === "center" ? "center" : O.align === "right" ? "flex-end" : "flex-start",
1341
+ justifyContent: B ? "center" : k.name === "text" ? "flex-start" : k.align === "center" ? "center" : k.align === "right" ? "flex-end" : "flex-start",
1342
1342
  visibility: "visible",
1343
1343
  /* Ensure column is visible */
1344
1344
  opacity: 1
1345
1345
  /* Ensure column is not transparent */
1346
1346
  },
1347
- children: le(j, O)
1347
+ children: le(j, k)
1348
1348
  },
1349
- `${j.id}-${O.name}`
1349
+ `${j.id}-${k.name}`
1350
1350
  );
1351
1351
  }),
1352
- g?.taskId === j.id && /* @__PURE__ */ t.jsx("div", { className: `gantt-drop-indicator ${g.position}` })
1352
+ y?.taskId === j.id && /* @__PURE__ */ t.jsx("div", { className: `gantt-drop-indicator ${y.position}` })
1353
1353
  ]
1354
1354
  },
1355
1355
  j.id
@@ -1369,35 +1369,35 @@ const xn = ({
1369
1369
  dragDeltaX: b = 0,
1370
1370
  dragType: u = null,
1371
1371
  readonly: d = !1,
1372
- baseline: p,
1373
- dependencyRuleDescriptions: h = [],
1374
- tooltipConfig: v
1372
+ baseline: h,
1373
+ dependencyRuleDescriptions: p = [],
1374
+ tooltipConfig: S
1375
1375
  }) => {
1376
- const g = e.ShowHandle !== void 0 ? e.ShowHandle : !0, m = ($, G) => {
1377
- d || ($.preventDefault(), $.stopPropagation(), c($.clientX, $.clientY, G));
1376
+ const y = e.ShowHandle !== void 0 ? e.ShowHandle : !0, m = ($, q) => {
1377
+ d || ($.preventDefault(), $.stopPropagation(), c($.clientX, $.clientY, q));
1378
1378
  }, E = () => {
1379
1379
  const $ = ["gantt-task-bar"];
1380
1380
  if (e.type === "milestone" && $.push("milestone"), e.type === "project" && $.push("project"), n && $.push("selected"), s && $.push("dragging"), e.status) {
1381
- const G = String(e.status).trim().toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
1382
- G && $.push(`status-${G}`);
1381
+ const q = String(e.status).trim().toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
1382
+ q && $.push(`status-${q}`);
1383
1383
  }
1384
1384
  return $.join(" ");
1385
1385
  }, F = () => {
1386
- let $ = a.left, G = a.width;
1387
- s && u && (u === "move" ? $ += b : u === "resize-left" ? ($ += b, G -= b) : u === "resize-right" && (G += b));
1388
- const be = 20;
1389
- return e.type === "milestone" && G < be && ($ -= (be - G) / 2, G = be), {
1386
+ let $ = a.left, q = a.width;
1387
+ s && u && (u === "move" ? $ += b : u === "resize-left" ? ($ += b, q -= b) : u === "resize-right" && (q += b));
1388
+ const xe = 20;
1389
+ return e.type === "milestone" && q < xe && ($ -= (xe - q) / 2, q = xe), {
1390
1390
  left: `${$}px`,
1391
- width: `${Math.max(G, 0)}px`,
1391
+ width: `${Math.max(q, 0)}px`,
1392
1392
  // Color handled by CSS classes (.project, .milestone) or task.color override
1393
1393
  backgroundColor: e.color || void 0
1394
1394
  };
1395
1395
  }, N = ($ = !1) => /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1396
- !d && g && !$ && /* @__PURE__ */ t.jsx(
1396
+ !d && y && !$ && /* @__PURE__ */ t.jsx(
1397
1397
  "div",
1398
1398
  {
1399
1399
  className: "gantt-task-resize-handle gantt-task-resize-left",
1400
- onMouseDown: (G) => m(G, "resize-left")
1400
+ onMouseDown: (q) => m(q, "resize-left")
1401
1401
  }
1402
1402
  ),
1403
1403
  !$ && e.type !== "milestone" && /* @__PURE__ */ t.jsx(
@@ -1412,50 +1412,50 @@ const xn = ({
1412
1412
  }
1413
1413
  ),
1414
1414
  /* @__PURE__ */ t.jsx("div", { className: "gantt-task-content", children: !$ && /* @__PURE__ */ t.jsx("span", { className: "gantt-task-text", children: e.text }) }),
1415
- !d && g && !$ && /* @__PURE__ */ t.jsx(
1415
+ !d && y && !$ && /* @__PURE__ */ t.jsx(
1416
1416
  "div",
1417
1417
  {
1418
1418
  className: "gantt-task-resize-handle gantt-task-resize-right",
1419
- onMouseDown: (G) => m(G, "resize-right")
1419
+ onMouseDown: (q) => m(q, "resize-right")
1420
1420
  }
1421
1421
  )
1422
- ] }), M = ($, G) => {
1422
+ ] }), M = ($, q) => {
1423
1423
  if ($ instanceof Date)
1424
- return Number.isNaN($.getTime()) ? G : $;
1424
+ return Number.isNaN($.getTime()) ? q : $;
1425
1425
  if (typeof $ == "string" || typeof $ == "number") {
1426
- const be = new Date($);
1427
- return Number.isNaN(be.getTime()) ? G : be;
1426
+ const xe = new Date($);
1427
+ return Number.isNaN(xe.getTime()) ? q : xe;
1428
1428
  }
1429
- return G;
1430
- }, S = ($) => {
1429
+ return q;
1430
+ }, v = ($) => {
1431
1431
  if (Array.isArray($)) {
1432
- const G = $.map((be) => String(be).trim()).filter(Boolean);
1433
- return G.length > 0 ? G : void 0;
1432
+ const q = $.map((xe) => String(xe).trim()).filter(Boolean);
1433
+ return q.length > 0 ? q : void 0;
1434
1434
  }
1435
1435
  if (typeof $ == "string") {
1436
- const G = $.split(/\r?\n|\|/).map((be) => be.trim()).filter(Boolean);
1437
- return G.length > 0 ? G : void 0;
1436
+ const q = $.split(/\r?\n|\|/).map((xe) => xe.trim()).filter(Boolean);
1437
+ return q.length > 0 ? q : void 0;
1438
1438
  }
1439
- }, w = e.tooltipConfig ? { ...v, ...e.tooltipConfig } : v, C = w?.dateFormat || "MMM D, YYYY", Z = w?.taskNameAccessor?.(e) ?? e.text, W = String(Z ?? "").trim() || `Task ${e.id}`, re = w?.taskNameFormatter ? w.taskNameFormatter(W, e) : W, le = M(
1440
- w?.plannedStartAccessor?.(e) ?? e.plannedStart ?? p?.start ?? e.start,
1439
+ }, w = e.tooltipConfig ? { ...S, ...e.tooltipConfig } : S, C = w?.dateFormat || "MMM D, YYYY", Z = w?.taskNameAccessor?.(e) ?? e.text, W = String(Z ?? "").trim() || `Task ${e.id}`, re = w?.taskNameFormatter ? w.taskNameFormatter(W, e) : W, le = M(
1440
+ w?.plannedStartAccessor?.(e) ?? e.plannedStart ?? h?.start ?? e.start,
1441
1441
  e.start
1442
1442
  ), j = M(
1443
- w?.plannedEndAccessor?.(e) ?? e.plannedEnd ?? p?.end ?? e.end,
1443
+ w?.plannedEndAccessor?.(e) ?? e.plannedEnd ?? h?.end ?? e.end,
1444
1444
  e.end
1445
- ), U = w?.plannedDatesFormatter ? w.plannedDatesFormatter(le, j, e) : `${ke(le, C)} - ${ke(j, C)}`, R = M(
1445
+ ), X = w?.plannedDatesFormatter ? w.plannedDatesFormatter(le, j, e) : `${ke(le, C)} - ${ke(j, C)}`, R = M(
1446
1446
  w?.actualStartAccessor?.(e) ?? e.actualStart ?? e.start,
1447
1447
  e.start
1448
- ), O = M(
1448
+ ), k = M(
1449
1449
  w?.actualEndAccessor?.(e) ?? e.actualEnd ?? e.end,
1450
1450
  e.end
1451
- ), B = w?.actualDatesFormatter ? w.actualDatesFormatter(R, O, e) : `${ke(R, C)} - ${ke(O, C)}`, Y = w?.statusAccessor?.(e) ?? e.status, k = Y != null ? String(Y) : "", De = w?.statusFormatter ? w.statusFormatter(k, e) : k ? k.replace(/-/g, " ") : w?.emptyStatusText || "Not set", we = w?.ownerAccessor?.(e) ?? e.owner, V = we != null ? String(we).trim() : "", I = V ? w?.ownerFormatter ? w.ownerFormatter(V, e) : V : w?.emptyOwnerText || "", ne = h.length > 0 ? h : e.dependencyRule || [], se = S(
1451
+ ), B = w?.actualDatesFormatter ? w.actualDatesFormatter(R, k, e) : `${ke(R, C)} - ${ke(k, C)}`, Y = w?.statusAccessor?.(e) ?? e.status, O = Y != null ? String(Y) : "", De = w?.statusFormatter ? w.statusFormatter(O, e) : O ? O.replace(/-/g, " ") : w?.emptyStatusText || "Not set", Se = w?.ownerAccessor?.(e) ?? e.owner, V = Se != null ? String(Se).trim() : "", I = V ? w?.ownerFormatter ? w.ownerFormatter(V, e) : V : w?.emptyOwnerText || "", ne = p.length > 0 ? p : e.dependencyRule || [], se = v(
1452
1452
  w?.dependencyRuleAccessor?.(e, ne)
1453
- ) || ne, ue = se.length > 0 ? se.map(($) => w?.dependencyRuleFormatter ? w.dependencyRuleFormatter($, e) : $).join(w?.dependencySeparator || " | ") : w?.emptyDependencyRuleText || "No dependency rule", z = w?.progressAccessor?.(e) ?? e.progress, ge = typeof z == "number" ? z : Number(z), Le = Number.isFinite(ge) ? ge : e.progress, Ie = w?.progressFormatter ? w.progressFormatter(Le, e) : `${Le}%`, Ye = /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip", children: [
1453
+ ) || ne, ue = se.length > 0 ? se.map(($) => w?.dependencyRuleFormatter ? w.dependencyRuleFormatter($, e) : $).join(w?.dependencySeparator || " | ") : w?.emptyDependencyRuleText || "No dependency rule", z = w?.progressAccessor?.(e) ?? e.progress, ye = typeof z == "number" ? z : Number(z), Le = Number.isFinite(ye) ? ye : e.progress, Ie = w?.progressFormatter ? w.progressFormatter(Le, e) : `${Le}%`, Ye = /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip", children: [
1454
1454
  w?.showTaskName !== !1 && /* @__PURE__ */ t.jsx("div", { className: "gantt-tooltip-title", children: re }),
1455
1455
  w?.showPlannedDates !== !1 && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-dates", children: [
1456
1456
  w?.plannedLabel || "Planned",
1457
1457
  ": ",
1458
- U
1458
+ X
1459
1459
  ] }),
1460
1460
  w?.showActualDates !== !1 && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-dates", children: [
1461
1461
  w?.actualLabel || "Actual",
@@ -1485,15 +1485,15 @@ const xn = ({
1485
1485
  ] });
1486
1486
  if (e.segments && e.segments.length > 0 || e.onHoldPeriods && e.onHoldPeriods.length > 0) {
1487
1487
  console.log("[TaskBar] " + e.text + " onHold:", e.onHoldPeriods);
1488
- const $ = e.end.getTime() - e.start.getTime(), G = (e.onHoldPeriods || []).map((ce) => ({
1488
+ const $ = e.end.getTime() - e.start.getTime(), q = (e.onHoldPeriods || []).map((ce) => ({
1489
1489
  startMs: Math.max(ce.start.getTime(), e.start.getTime()),
1490
1490
  endMs: Math.min(ce.end.getTime(), e.end.getTime())
1491
1491
  })).filter((ce) => ce.endMs > ce.startMs).sort((ce, me) => ce.startMs - me.startMs).reduce((ce, me) => {
1492
1492
  const Fe = ce[ce.length - 1];
1493
1493
  return !Fe || me.startMs > Fe.endMs ? (ce.push({ ...me }), ce) : (Fe.endMs = Math.max(Fe.endMs, me.endMs), ce);
1494
- }, []), be = !!(e.segments && e.segments.length > 0), qe = be ? e.segments : [{ start: e.start, end: e.end, duration: e.duration || 0 }];
1494
+ }, []), xe = !!(e.segments && e.segments.length > 0), Qe = xe ? e.segments : [{ start: e.start, end: e.end, duration: e.duration || 0 }];
1495
1495
  return /* @__PURE__ */ t.jsxs("div", { className: "gantt-task-group", children: [
1496
- qe.map((ce, me) => /* @__PURE__ */ t.jsx(rt, { title: Ye, mouseEnterDelay: 0.5, children: /* @__PURE__ */ t.jsx(
1496
+ Qe.map((ce, me) => /* @__PURE__ */ t.jsx(nt, { title: Ye, mouseEnterDelay: 0.5, children: /* @__PURE__ */ t.jsx(
1497
1497
  "div",
1498
1498
  {
1499
1499
  className: E() + " segment",
@@ -1507,21 +1507,21 @@ const xn = ({
1507
1507
  children: N(me > 0)
1508
1508
  }
1509
1509
  ) }, `seg-${me}`)),
1510
- G.map((ce, me) => {
1511
- const Fe = $ > 0 ? $ : 864e5, ze = ce.endMs - ce.startMs;
1512
- if (ze <= 0) return null;
1513
- const Se = a.left + (ce.startMs - e.start.getTime()) / Fe * a.width, Qe = ze / Fe * a.width;
1510
+ q.map((ce, me) => {
1511
+ const Fe = $ > 0 ? $ : 864e5, pe = ce.endMs - ce.startMs;
1512
+ if (pe <= 0) return null;
1513
+ const et = a.left + (ce.startMs - e.start.getTime()) / Fe * a.width, _e = pe / Fe * a.width;
1514
1514
  return /* @__PURE__ */ t.jsx(
1515
1515
  "div",
1516
1516
  {
1517
1517
  className: "gantt-on-hold-period",
1518
1518
  style: {
1519
- left: `${Se}px`,
1520
- width: `${Qe}px`,
1519
+ left: `${et}px`,
1520
+ width: `${_e}px`,
1521
1521
  // z-index 101: above hover state (100)
1522
1522
  // Always rendered on top regardless of status-* colour
1523
1523
  zIndex: 101,
1524
- opacity: be ? 0.9 : 0.75,
1524
+ opacity: xe ? 0.9 : 0.75,
1525
1525
  pointerEvents: "none"
1526
1526
  }
1527
1527
  },
@@ -1530,7 +1530,7 @@ const xn = ({
1530
1530
  })
1531
1531
  ] });
1532
1532
  }
1533
- return /* @__PURE__ */ t.jsx(rt, { title: Ye, mouseEnterDelay: 0.5, children: /* @__PURE__ */ t.jsx(
1533
+ return /* @__PURE__ */ t.jsx(nt, { title: Ye, mouseEnterDelay: 0.5, children: /* @__PURE__ */ t.jsx(
1534
1534
  "div",
1535
1535
  {
1536
1536
  className: E(),
@@ -1542,45 +1542,45 @@ const xn = ({
1542
1542
  ) });
1543
1543
  }, wn = ({ links: e, tasks: a, getTaskPosition: n }) => {
1544
1544
  const s = A.useMemo(() => {
1545
- const p = /* @__PURE__ */ new Map();
1546
- return a.forEach((h) => p.set(h.id, h)), p;
1547
- }, [a]), r = (p) => s.get(p), c = A.useMemo(() => {
1548
- const p = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
1545
+ const h = /* @__PURE__ */ new Map();
1546
+ return a.forEach((p) => h.set(p.id, p)), h;
1547
+ }, [a]), r = (h) => s.get(h), c = A.useMemo(() => {
1548
+ const h = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map();
1549
1549
  e.forEach((F) => {
1550
- p.set(F.source, (p.get(F.source) || 0) + 1), h.set(F.target, (h.get(F.target) || 0) + 1);
1550
+ h.set(F.source, (h.get(F.source) || 0) + 1), p.set(F.target, (p.get(F.target) || 0) + 1);
1551
1551
  });
1552
1552
  const m = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
1553
1553
  return e.forEach((F) => {
1554
1554
  const N = m.get(F.source) || 0;
1555
- v.set(F.id, N), m.set(F.source, N + 1);
1555
+ S.set(F.id, N), m.set(F.source, N + 1);
1556
1556
  const M = E.get(F.target) || 0;
1557
- g.set(F.id, M), E.set(F.target, M + 1);
1557
+ y.set(F.id, M), E.set(F.target, M + 1);
1558
1558
  }), {
1559
- outgoingCountByTaskId: p,
1560
- incomingCountByTaskId: h,
1561
- outgoingIndexByLinkId: v,
1562
- incomingIndexByLinkId: g
1559
+ outgoingCountByTaskId: h,
1560
+ incomingCountByTaskId: p,
1561
+ outgoingIndexByLinkId: S,
1562
+ incomingIndexByLinkId: y
1563
1563
  };
1564
1564
  }, [e]), b = A.useMemo(() => {
1565
- let p = 0, h = 0;
1566
- return a.forEach((v) => {
1565
+ let h = 0, p = 0;
1566
+ return a.forEach((S) => {
1567
1567
  try {
1568
- const g = n(v);
1569
- g && typeof g.left == "number" && typeof g.width == "number" && (p = Math.max(p, g.left + g.width)), g && typeof g.top == "number" && typeof g.height == "number" && (h = Math.max(h, g.top + g.height));
1570
- } catch (g) {
1571
- console.warn("Failed to position task for link rendering:", v.id, g);
1568
+ const y = n(S);
1569
+ y && typeof y.left == "number" && typeof y.width == "number" && (h = Math.max(h, y.left + y.width)), y && typeof y.top == "number" && typeof y.height == "number" && (p = Math.max(p, y.top + y.height));
1570
+ } catch (y) {
1571
+ console.warn("Failed to position task for link rendering:", S.id, y);
1572
1572
  }
1573
1573
  }), {
1574
- width: Math.max(p, 1e3),
1575
- height: Math.max(h, 100)
1574
+ width: Math.max(h, 1e3),
1575
+ height: Math.max(p, 100)
1576
1576
  };
1577
- }, [a, n]), u = (p, h) => {
1578
- const v = Math.max(3, Math.round(h / 7)), g = Math.max(2, h / 2 - 2);
1579
- return Math.min((p + 1) * v, g);
1580
- }, d = (p) => {
1581
- const h = r(p.source), v = r(p.target);
1582
- if (!h || !v) return { path: "", arrow: "" };
1583
- const g = n(h), m = n(v), E = (c.outgoingCountByTaskId.get(h.id) || 0) > 0 && (c.incomingCountByTaskId.get(h.id) || 0) > 0, F = (c.outgoingCountByTaskId.get(v.id) || 0) > 0 && (c.incomingCountByTaskId.get(v.id) || 0) > 0, N = g.top + g.height / 2 + (E ? u(c.outgoingIndexByLinkId.get(p.id) || 0, g.height) : 0), M = m.top + m.height / 2 - (F ? u(c.incomingIndexByLinkId.get(p.id) || 0, m.height) : 0), S = {
1577
+ }, [a, n]), u = (h, p) => {
1578
+ const S = Math.max(3, Math.round(p / 7)), y = Math.max(2, p / 2 - 2);
1579
+ return Math.min((h + 1) * S, y);
1580
+ }, d = (h) => {
1581
+ const p = r(h.source), S = r(h.target);
1582
+ if (!p || !S) return { path: "", arrow: "" };
1583
+ const y = n(p), m = n(S), E = (c.outgoingCountByTaskId.get(p.id) || 0) > 0 && (c.incomingCountByTaskId.get(p.id) || 0) > 0, F = (c.outgoingCountByTaskId.get(S.id) || 0) > 0 && (c.incomingCountByTaskId.get(S.id) || 0) > 0, N = y.top + y.height / 2 + (E ? u(c.outgoingIndexByLinkId.get(h.id) || 0, y.height) : 0), M = m.top + m.height / 2 - (F ? u(c.incomingIndexByLinkId.get(h.id) || 0, m.height) : 0), v = {
1584
1584
  sourceStub: 14,
1585
1585
  targetStub: 8,
1586
1586
  detourPadding: 24,
@@ -1592,49 +1592,49 @@ const xn = ({
1592
1592
  chevronNotchDepth: 5
1593
1593
  };
1594
1594
  let w = 0, C = 0, Z = 1, W = 1;
1595
- switch (p.type) {
1595
+ switch (h.type) {
1596
1596
  case "e2s":
1597
- w = g.left + g.width, C = m.left, Z = 1, W = 1;
1597
+ w = y.left + y.width, C = m.left, Z = 1, W = 1;
1598
1598
  break;
1599
1599
  case "s2s":
1600
- w = g.left, C = m.left, Z = -1, W = 1;
1600
+ w = y.left, C = m.left, Z = -1, W = 1;
1601
1601
  break;
1602
1602
  case "e2e":
1603
- w = g.left + g.width, C = m.left + m.width, Z = 1, W = -1;
1603
+ w = y.left + y.width, C = m.left + m.width, Z = 1, W = -1;
1604
1604
  break;
1605
1605
  case "s2e":
1606
- w = g.left, C = m.left + m.width, Z = -1, W = -1;
1606
+ w = y.left, C = m.left + m.width, Z = -1, W = -1;
1607
1607
  break;
1608
1608
  }
1609
- const re = w + Z * S.sourceStub, le = C - W * S.arrowGap, j = le - W * S.arrowLength, U = j + W * S.chevronNotchDepth, R = U - W * S.targetStub, O = U + W * S.arrowStemOverlap, B = Math.abs(M - N) > 1;
1609
+ const re = w + Z * v.sourceStub, le = C - W * v.arrowGap, j = le - W * v.arrowLength, X = j + W * v.chevronNotchDepth, R = X - W * v.targetStub, k = X + W * v.arrowStemOverlap, B = Math.abs(M - N) > 1;
1610
1610
  let Y;
1611
1611
  if (B) {
1612
1612
  const ne = M > N;
1613
- let de = ne ? Math.min(g.top + g.height + 6, m.top - 6) : Math.max(g.top - 6, m.top + m.height + 6);
1613
+ let de = ne ? Math.min(y.top + y.height + 6, m.top - 6) : Math.max(y.top - 6, m.top + m.height + 6);
1614
1614
  Math.abs(de - N) < 2 && (de = N + (ne ? 2 : -2)), Math.abs(de - M) < 2 && (de = M + (ne ? -2 : 2)), Y = [
1615
1615
  { x: w, y: N },
1616
1616
  { x: re, y: N },
1617
1617
  { x: re, y: de },
1618
1618
  { x: R, y: de },
1619
1619
  { x: R, y: M },
1620
- { x: O, y: M }
1620
+ { x: k, y: M }
1621
1621
  ];
1622
1622
  } else {
1623
1623
  let I;
1624
- Z === W && (Z === 1 ? R - re >= S.minHorizontalSpan : re - R >= S.minHorizontalSpan) ? I = (re + R) / 2 : I = Z === 1 ? Math.max(w, C) + S.detourPadding : Math.min(w, C) - S.detourPadding, Y = [
1624
+ Z === W && (Z === 1 ? R - re >= v.minHorizontalSpan : re - R >= v.minHorizontalSpan) ? I = (re + R) / 2 : I = Z === 1 ? Math.max(w, C) + v.detourPadding : Math.min(w, C) - v.detourPadding, Y = [
1625
1625
  { x: w, y: N },
1626
1626
  { x: re, y: N },
1627
1627
  { x: I, y: N },
1628
1628
  { x: I, y: M },
1629
1629
  { x: R, y: M },
1630
- { x: O, y: M }
1630
+ { x: k, y: M }
1631
1631
  ];
1632
1632
  }
1633
- const k = Y.filter((I, ne) => {
1633
+ const O = Y.filter((I, ne) => {
1634
1634
  if (ne === 0) return !0;
1635
1635
  const de = Y[ne - 1];
1636
1636
  return Math.abs(I.x - de.x) > 0.5 || Math.abs(I.y - de.y) > 0.5;
1637
- }), De = k.length > 0 ? k.map((I, ne) => `${ne === 0 ? "M" : "L"} ${I.x},${I.y}`).join(" ") : "", we = S.arrowWidth / 2, V = `M ${j},${M - we} L ${le},${M} L ${j},${M + we} L ${U},${M} Z`;
1637
+ }), De = O.length > 0 ? O.map((I, ne) => `${ne === 0 ? "M" : "L"} ${I.x},${I.y}`).join(" ") : "", Se = v.arrowWidth / 2, V = `M ${j},${M - Se} L ${le},${M} L ${j},${M + Se} L ${X},${M} Z`;
1638
1638
  return { path: De, arrow: V };
1639
1639
  };
1640
1640
  return e.length === 0 ? null : /* @__PURE__ */ t.jsx(
@@ -1650,10 +1650,10 @@ const xn = ({
1650
1650
  left: 0,
1651
1651
  pointerEvents: "none"
1652
1652
  },
1653
- children: e.map((p) => {
1654
- const h = r(p.source), v = r(p.target);
1655
- if (!h || !v) return null;
1656
- const g = d(p), m = g.path, E = g.arrow;
1653
+ children: e.map((h) => {
1654
+ const p = r(h.source), S = r(h.target);
1655
+ if (!p || !S) return null;
1656
+ const y = d(h), m = y.path, E = y.arrow;
1657
1657
  return !m || !E ? null : /* @__PURE__ */ t.jsxs("g", { className: "gantt-link", children: [
1658
1658
  /* @__PURE__ */ t.jsx(
1659
1659
  "path",
@@ -1671,12 +1671,12 @@ const xn = ({
1671
1671
  className: "gantt-link-arrow"
1672
1672
  }
1673
1673
  )
1674
- ] }, p.id);
1674
+ ] }, h.id);
1675
1675
  })
1676
1676
  }
1677
1677
  );
1678
1678
  }, bn = (e, a, n = 60, s = "day", r = 1) => {
1679
- const [c, b] = q({
1679
+ const [c, b] = J({
1680
1680
  taskId: null,
1681
1681
  initialX: 0,
1682
1682
  initialY: 0,
@@ -1685,52 +1685,52 @@ const xn = ({
1685
1685
  type: null,
1686
1686
  dragDeltaX: 0,
1687
1687
  dragDeltaY: 0
1688
- }), u = Ze((h, v, g, m) => {
1689
- const E = e.find((F) => F.id === h);
1688
+ }), u = Je((p, S, y, m) => {
1689
+ const E = e.find((F) => F.id === p);
1690
1690
  E && b({
1691
- taskId: h,
1692
- initialX: v,
1693
- initialY: g,
1691
+ taskId: p,
1692
+ initialX: S,
1693
+ initialY: y,
1694
1694
  initialStart: new Date(E.start),
1695
1695
  initialEnd: new Date(E.end),
1696
1696
  type: m,
1697
1697
  dragDeltaX: 0,
1698
1698
  dragDeltaY: 0
1699
1699
  });
1700
- }, [e]), d = Ze((h, v) => {
1700
+ }, [e]), d = Je((p, S) => {
1701
1701
  if (!c.taskId || !c.type) return null;
1702
- const g = h - c.initialX, m = v - c.initialY;
1702
+ const y = p - c.initialX, m = S - c.initialY;
1703
1703
  if (b((C) => ({
1704
1704
  ...C,
1705
- dragDeltaX: g,
1705
+ dragDeltaX: y,
1706
1706
  dragDeltaY: m
1707
1707
  })), c.type === "reorder") return null;
1708
1708
  const E = e.find((C) => C.id === c.taskId);
1709
1709
  if (!E) return null;
1710
1710
  let F = 0, N = s;
1711
- s === "week" ? (F = Math.round(g / n * 7), N = "day") : s === "month" ? (F = Math.round(g / n * 30), N = "day") : (F = Math.round(g / n) * r, N = s);
1712
- let M = new Date(c.initialStart), S = new Date(c.initialEnd);
1711
+ s === "week" ? (F = Math.round(y / n * 7), N = "day") : s === "month" ? (F = Math.round(y / n * 30), N = "day") : (F = Math.round(y / n) * r, N = s);
1712
+ let M = new Date(c.initialStart), v = new Date(c.initialEnd);
1713
1713
  switch (c.type) {
1714
1714
  case "move":
1715
- M = Te(c.initialStart, F, N), S = Te(c.initialEnd, F, N);
1715
+ M = Te(c.initialStart, F, N), v = Te(c.initialEnd, F, N);
1716
1716
  break;
1717
1717
  case "resize-left":
1718
- M = Te(c.initialStart, F, N), M >= S && (M = Te(S, N === "day" ? -1 : -r, N));
1718
+ M = Te(c.initialStart, F, N), M >= v && (M = Te(v, N === "day" ? -1 : -r, N));
1719
1719
  break;
1720
1720
  case "resize-right":
1721
- S = Te(c.initialEnd, F, N), S <= M && (S = Te(M, N === "day" ? 1 : r, N));
1721
+ v = Te(c.initialEnd, F, N), v <= M && (v = Te(M, N === "day" ? 1 : r, N));
1722
1722
  break;
1723
1723
  }
1724
- const w = Nt(M, S);
1724
+ const w = Nt(M, v);
1725
1725
  return {
1726
1726
  ...E,
1727
1727
  start: M,
1728
- end: S,
1728
+ end: v,
1729
1729
  duration: w
1730
1730
  };
1731
- }, [c, e, n, r, s]), p = Ze((h) => {
1732
- if (h && a) {
1733
- const { id: v, ...g } = h, m = c.type;
1731
+ }, [c, e, n, r, s]), h = Je((p) => {
1732
+ if (p && a) {
1733
+ const { id: S, ...y } = p, m = c.type;
1734
1734
  if (m && m !== "reorder") {
1735
1735
  const E = {
1736
1736
  dragType: m,
@@ -1738,9 +1738,9 @@ const xn = ({
1738
1738
  previousEnd: new Date(c.initialEnd),
1739
1739
  previousDuration: Nt(c.initialStart, c.initialEnd)
1740
1740
  };
1741
- a(v, g, E);
1741
+ a(S, y, E);
1742
1742
  } else
1743
- a(v, g);
1743
+ a(S, y);
1744
1744
  }
1745
1745
  b({
1746
1746
  taskId: null,
@@ -1757,12 +1757,12 @@ const xn = ({
1757
1757
  dragState: c,
1758
1758
  handleDragStart: u,
1759
1759
  handleDrag: d,
1760
- handleDragEnd: p
1760
+ handleDragEnd: h
1761
1761
  };
1762
1762
  }, mr = (e) => {
1763
1763
  const a = new Date(e.getFullYear(), e.getMonth(), 1);
1764
1764
  return Math.ceil((e.getDate() + a.getDay()) / 7);
1765
- }, fr = (e) => Math.floor(e.getMonth() / 3) + 1, Sn = (e, a) => (a.getFullYear() - e.getFullYear()) * 12 + (a.getMonth() - e.getMonth()), Qt = (e, a, n) => a.unit === "week" ? a.format?.includes("W") ? a.format.replace(/\bW\b/g, String(mr(e))) : `Week ${mr(e)}` : a.unit === "quarter" ? a.format?.includes("Q") ? a.format.replace(/\bQ\b/g, String(fr(e))) : `Q${fr(e)}` : ke(e, a.format || n), vn = (e, a) => {
1765
+ }, fr = (e) => Math.floor(e.getMonth() / 3) + 1, Qt = (e, a, n) => a.unit === "week" ? a.format?.includes("W") ? a.format.replace(/\bW\b/g, String(mr(e))) : `Week ${mr(e)}` : a.unit === "quarter" ? a.format?.includes("Q") ? a.format.replace(/\bQ\b/g, String(fr(e))) : `Q${fr(e)}` : ke(e, a.format || n), Sn = (e, a) => {
1766
1766
  const n = new Date(e);
1767
1767
  switch (n.setMinutes(0, 0, 0), a.unit) {
1768
1768
  case "hour": {
@@ -1792,226 +1792,223 @@ const xn = ({
1792
1792
  }
1793
1793
  }, Lr = A.memo(
1794
1794
  A.forwardRef(
1795
- ({ tasks: e, links: a, range: n, scales: s, config: r, selectedTask: c, onTaskClick: b, onTaskDragStart: u, onTaskDragEnd: d, onTaskUpdate: p, zoomLevel: h, baselines: v, allowBaselineOnlyMode: g, taskTooltipConfig: m, headerHeight: E }, F) => {
1795
+ ({ tasks: e, links: a, range: n, scales: s, config: r, selectedTask: c, onTaskClick: b, onTaskDragStart: u, onTaskDragEnd: d, onTaskUpdate: h, zoomLevel: p, baselines: S, allowBaselineOnlyMode: y, taskTooltipConfig: m, headerHeight: E }, F) => {
1796
1796
  const N = A.useRef(null), M = A.useCallback((i) => {
1797
1797
  N.current = i, typeof F == "function" ? F(i) : F && (F.current = i);
1798
- }, [F]), [S, w] = q(e), [C, Z] = q(a), [W, re] = q(0), le = A.useMemo(
1799
- () => Math.max((r.columnWidth || 60) * h, r.minColumnWidth || 0),
1800
- [r.columnWidth, r.minColumnWidth, h]
1801
- ), j = r.baselines && v && v.size > 0, U = A.useMemo(() => {
1798
+ }, [F]), [v, w] = J(e), [C, Z] = J(a), [W, re] = J(0), le = A.useMemo(
1799
+ () => Math.max((r.columnWidth || 60) * p, r.minColumnWidth || 0),
1800
+ [r.columnWidth, r.minColumnWidth, p]
1801
+ ), j = r.baselines && S && S.size > 0, X = A.useMemo(() => {
1802
1802
  const i = /* @__PURE__ */ new Map();
1803
- return S.forEach((y) => i.set(y.id, y)), i;
1804
- }, [S]), R = A.useMemo(() => {
1805
- const i = /* @__PURE__ */ new Map(), y = {
1803
+ return v.forEach((g) => i.set(g.id, g)), i;
1804
+ }, [v]), R = A.useMemo(() => {
1805
+ const i = /* @__PURE__ */ new Map(), g = {
1806
1806
  e2s: "Finish-to-Start",
1807
1807
  s2s: "Start-to-Start",
1808
1808
  e2e: "Finish-to-Finish",
1809
1809
  s2e: "Start-to-Finish"
1810
- }, T = (f, X) => {
1811
- const J = [...i.get(f) || [], ...X.map((pe) => pe.trim()).filter(Boolean)];
1812
- J.length > 0 && i.set(f, Array.from(new Set(J)));
1810
+ }, D = (f, U) => {
1811
+ const ee = [...i.get(f) || [], ...U.map((ie) => ie.trim()).filter(Boolean)];
1812
+ ee.length > 0 && i.set(f, Array.from(new Set(ee)));
1813
1813
  };
1814
- return S.forEach((f) => {
1815
- f.dependencyRule && f.dependencyRule.length > 0 && T(f.id, f.dependencyRule);
1814
+ return v.forEach((f) => {
1815
+ f.dependencyRule && f.dependencyRule.length > 0 && D(f.id, f.dependencyRule);
1816
1816
  }), C.forEach((f) => {
1817
- const X = U.get(f.source), Q = U.get(f.target), J = X?.text || `Task ${f.source}`, pe = Q?.text || `Task ${f.target}`, Ce = y[f.type], ie = typeof f.lag == "number" && f.lag !== 0 ? ` (${f.lag > 0 ? "+" : ""}${f.lag} ${f.lagUnit || "day"})` : "", Xe = `${pe} depends on ${J} [${Ce}]${ie}`;
1818
- T(f.target, [Xe]);
1817
+ const U = X.get(f.source), G = X.get(f.target), ee = U?.text || `Task ${f.source}`, ie = G?.text || `Task ${f.target}`, $e = g[f.type], ze = typeof f.lag == "number" && f.lag !== 0 ? ` (${f.lag > 0 ? "+" : ""}${f.lag} ${f.lagUnit || "day"})` : "", ge = `${ie} depends on ${ee} [${$e}]${ze}`;
1818
+ D(f.target, [ge]);
1819
1819
  }), i;
1820
- }, [C, S, U]);
1820
+ }, [C, v, X]);
1821
1821
  A.useEffect(() => {
1822
- (e.length !== S.length || e.some((y, T) => {
1823
- const f = S[T];
1824
- return !f || y.id !== f.id || y.start.getTime() !== f.start.getTime() || y.end.getTime() !== f.end.getTime() || y.duration !== f.duration;
1822
+ (e.length !== v.length || e.some((g, D) => {
1823
+ const f = v[D];
1824
+ return !f || g.id !== f.id || g.start.getTime() !== f.start.getTime() || g.end.getTime() !== f.end.getTime() || g.duration !== f.duration;
1825
1825
  })) && w(e);
1826
1826
  }, [e]), A.useEffect(() => {
1827
- (a.length !== C.length || a.some((y, T) => {
1828
- const f = C[T];
1829
- return !f || y.id !== f.id || y.source !== f.source || y.target !== f.target || y.type !== f.type;
1827
+ (a.length !== C.length || a.some((g, D) => {
1828
+ const f = C[D];
1829
+ return !f || g.id !== f.id || g.source !== f.source || g.target !== f.target || g.type !== f.type;
1830
1830
  })) && Z(a);
1831
1831
  }, [a]), A.useEffect(() => {
1832
1832
  const i = N.current?.parentElement;
1833
1833
  if (!i) return;
1834
- const y = () => {
1835
- let X = i.clientWidth;
1836
- const Q = i.closest(".gantt-layout"), J = Q?.querySelector(".gantt-grid");
1837
- Q && J && (X = Math.max(0, Q.clientWidth - J.offsetWidth)), re((pe) => pe === X ? pe : X);
1834
+ const g = () => {
1835
+ let U = i.clientWidth;
1836
+ const G = i.closest(".gantt-layout"), ee = G?.querySelector(".gantt-grid");
1837
+ G && ee && (U = Math.max(0, G.clientWidth - ee.offsetWidth)), re((ie) => ie === U ? ie : U);
1838
1838
  };
1839
- y();
1840
- const T = i.closest(".gantt-layout") || i;
1839
+ g();
1840
+ const D = i.closest(".gantt-layout") || i;
1841
1841
  if (typeof ResizeObserver > "u")
1842
- return window.addEventListener("resize", y), () => window.removeEventListener("resize", y);
1842
+ return window.addEventListener("resize", g), () => window.removeEventListener("resize", g);
1843
1843
  const f = new ResizeObserver(() => {
1844
- y();
1844
+ g();
1845
1845
  });
1846
- return f.observe(T), () => f.disconnect();
1846
+ return f.observe(D), () => f.disconnect();
1847
1847
  }, []);
1848
- const O = A.useCallback((i) => {
1849
- const y = [];
1850
- let T = new Date(n.start);
1851
- for (; T <= n.end; ) {
1848
+ const k = A.useCallback((i) => {
1849
+ const g = [];
1850
+ let D = new Date(n.start);
1851
+ for (; D <= n.end; ) {
1852
1852
  let f = Qt(
1853
- T,
1853
+ D,
1854
1854
  i,
1855
1855
  i.unit === "year" ? "YYYY" : i.unit === "month" ? "MMM" : i.unit === "hour" ? "HH" : "D"
1856
1856
  );
1857
1857
  if (r.relativeDayNumbering && i.unit === "day") {
1858
- const X = T.getTime() - n.start.getTime(), Q = Math.floor(X / (1e3 * 60 * 60 * 24)) + 1;
1859
- f = String(Q);
1858
+ const U = D.getTime() - n.start.getTime(), G = Math.floor(U / (1e3 * 60 * 60 * 24)) + 1;
1859
+ f = String(G);
1860
1860
  }
1861
- y.push({
1862
- date: new Date(T),
1861
+ g.push({
1862
+ date: new Date(D),
1863
1863
  label: f
1864
- }), T = Te(T, i.step, i.unit);
1864
+ }), D = Te(D, i.step, i.unit);
1865
1865
  }
1866
1866
  if (W > 0) {
1867
1867
  const f = Math.floor(W / le);
1868
- for (; y.length < f; ) {
1869
- let X = Qt(
1870
- T,
1868
+ for (; g.length < f; ) {
1869
+ let U = Qt(
1870
+ D,
1871
1871
  i,
1872
1872
  i.unit === "year" ? "YYYY" : i.unit === "month" ? "MMM" : i.unit === "hour" ? "HH" : "D"
1873
1873
  );
1874
1874
  if (r.relativeDayNumbering && i.unit === "day") {
1875
- const Q = T.getTime() - n.start.getTime(), J = Math.floor(Q / (1e3 * 60 * 60 * 24)) + 1;
1876
- X = String(J);
1875
+ const G = D.getTime() - n.start.getTime(), ee = Math.floor(G / (1e3 * 60 * 60 * 24)) + 1;
1876
+ U = String(ee);
1877
1877
  }
1878
- y.push({
1879
- date: new Date(T),
1880
- label: X
1881
- }), T = Te(T, i.step, i.unit);
1878
+ g.push({
1879
+ date: new Date(D),
1880
+ label: U
1881
+ }), D = Te(D, i.step, i.unit);
1882
1882
  }
1883
1883
  }
1884
- return y;
1885
- }, [n.start, n.end, W, le]), B = s[s.length - 1] || s[0], Y = A.useMemo(() => O(B), [O, B]), k = A.useMemo(() => Y.length === 0 || W <= 0 ? le : Math.max(le, W / Y.length), [le, Y.length, W]), De = g && S.length === 0 && j, we = !!r.timelineView || !!r.timelineViews?.length, V = A.useMemo(() => {
1884
+ return g;
1885
+ }, [n.start, n.end, W, le]), B = s[s.length - 1] || s[0], Y = A.useMemo(() => k(B), [k, B]), O = A.useMemo(() => Y.length === 0 || W <= 0 ? le : Math.max(le, W / Y.length), [le, Y.length, W]), De = y && v.length === 0 && j, Se = !!r.timelineView || !!r.timelineViews?.length, V = A.useMemo(() => {
1886
1886
  if (r.showTimelineHeader === !1) return 0;
1887
- let i = we ? Math.max(s.length - 1, 0) : 2;
1887
+ let i = Se ? Math.max(s.length - 1, 0) : 2;
1888
1888
  if (r.showMonthHeading === !1 && (i = Math.max(0, i - 1)), r.showRangeHeading === !1) {
1889
- const y = we ? Math.max(0, s.length - 2) : 1;
1890
- i = Math.max(0, i - y);
1889
+ const g = Se ? Math.max(0, s.length - 2) : 1;
1890
+ i = Math.max(0, i - g);
1891
1891
  }
1892
1892
  return i;
1893
- }, [r.showTimelineHeader, r.showMonthHeading, r.showRangeHeading, we, s.length]), { dragState: I, handleDragStart: ne, handleDrag: de, handleDragEnd: se } = bn(
1894
- S,
1895
- p,
1896
- k,
1893
+ }, [r.showTimelineHeader, r.showMonthHeading, r.showRangeHeading, Se, s.length]), { dragState: I, handleDragStart: ne, handleDrag: de, handleDragEnd: se } = bn(
1894
+ v,
1895
+ h,
1896
+ O,
1897
1897
  B.unit,
1898
1898
  B.step
1899
1899
  ), ue = A.useCallback((i) => {
1900
1900
  if (Y.length === 0) return 0;
1901
- const y = i.getTime(), T = Y.length - 1;
1902
- for (let f = 0; f <= T; f++) {
1903
- const X = Y[f], Q = X.date.getTime(), pe = (f < T ? Y[f + 1].date : Te(X.date, B.step, B.unit)).getTime(), Ce = Math.max(pe - Q, 1);
1904
- if (y < Q)
1905
- return f * k;
1906
- if (y <= pe) {
1907
- const ie = Math.max(0, Math.min((y - Q) / Ce, 1));
1908
- return (f + ie) * k;
1901
+ const g = i.getTime(), D = Y.length - 1;
1902
+ for (let f = 0; f <= D; f++) {
1903
+ const U = Y[f], G = U.date.getTime(), ie = (f < D ? Y[f + 1].date : Te(U.date, B.step, B.unit)).getTime(), $e = Math.max(ie - G, 1);
1904
+ if (g < G)
1905
+ return f * O;
1906
+ if (g <= ie) {
1907
+ const ze = Math.max(0, Math.min((g - G) / $e, 1));
1908
+ return (f + ze) * O;
1909
1909
  }
1910
1910
  }
1911
- return Y.length * k;
1912
- }, [Y, B, k]), z = (i) => {
1913
- const y = ue(i.start), T = ue(i.end);
1911
+ return Y.length * O;
1912
+ }, [Y, B, O]), z = (i) => {
1913
+ const g = ue(i.start), D = ue(i.end);
1914
1914
  return {
1915
- left: y,
1916
- width: Math.max(T - y, 0)
1915
+ left: g,
1916
+ width: Math.max(D - g, 0)
1917
1917
  };
1918
- }, ge = (i) => {
1919
- const y = ue(i.start), T = ue(i.end);
1918
+ }, ye = (i) => {
1919
+ const g = ue(i.start), D = ue(i.end);
1920
1920
  return {
1921
- left: y,
1922
- width: Math.max(T - y, 0)
1921
+ left: g,
1922
+ width: Math.max(D - g, 0)
1923
1923
  };
1924
1924
  }, Le = A.useCallback((i) => {
1925
- const y = z(i), T = S.findIndex((J) => J.id === i.id);
1925
+ const g = z(i), D = v.findIndex((ee) => ee.id === i.id);
1926
1926
  let f = r.rowHeight || 48;
1927
1927
  if (N.current) {
1928
- const J = getComputedStyle(N.current).getPropertyValue("--gantt-row-height");
1929
- if (J) {
1930
- const pe = parseFloat(J);
1931
- !isNaN(pe) && pe > 0 && (f = pe);
1928
+ const ee = getComputedStyle(N.current).getPropertyValue("--gantt-row-height");
1929
+ if (ee) {
1930
+ const ie = parseFloat(ee);
1931
+ !isNaN(ie) && ie > 0 && (f = ie);
1932
1932
  }
1933
1933
  }
1934
- const X = r.taskHeight || 28, Q = (f - X) / 2;
1934
+ const U = r.taskHeight || 28, G = (f - U) / 2;
1935
1935
  return {
1936
- left: y.left,
1937
- width: y.width,
1938
- top: T * f + Q,
1939
- height: X
1936
+ left: g.left,
1937
+ width: g.width,
1938
+ top: D * f + G,
1939
+ height: U
1940
1940
  };
1941
- }, [z, S, r.rowHeight, r.taskHeight]), Ie = A.useRef(null), Ye = Ze((i) => {
1941
+ }, [z, v, r.rowHeight, r.taskHeight]), Ie = A.useRef(null), Ye = Je((i) => {
1942
1942
  I.taskId && I.type && (Ie.current && cancelAnimationFrame(Ie.current), Ie.current = requestAnimationFrame(() => {
1943
- const y = de(i.clientX, i.clientY);
1944
- y && w(
1945
- (T) => T.map((f) => f.id === y.id ? y : f)
1943
+ const g = de(i.clientX, i.clientY);
1944
+ g && w(
1945
+ (D) => D.map((f) => f.id === g.id ? g : f)
1946
1946
  );
1947
1947
  }));
1948
- }, [I, de]), $ = Ze(() => {
1948
+ }, [I, de]), $ = Je(() => {
1949
1949
  if (I.taskId) {
1950
- const i = S.find((y) => y.id === I.taskId);
1950
+ const i = v.find((g) => g.id === I.taskId);
1951
1951
  se(i || null), d();
1952
1952
  }
1953
- }, [I, S, se, d]), G = A.useMemo(() => {
1954
- const i = Y[0]?.date ?? n.start;
1955
- return new Date(i.getFullYear(), i.getMonth(), 1);
1956
- }, [Y, n.start]), be = A.useCallback((i) => {
1957
- const y = [];
1958
- let T = "", f = "", X = 0;
1959
- return Y.forEach((Q) => {
1960
- const J = vn(Q.date, i), pe = J.toISOString(), Ce = i.unit === "year" ? "YYYY" : i.unit === "month" ? "MMM YYYY" : i.unit === "day" ? "MMM D" : "D", ie = r.timelineView === "day" && i.unit === "month" ? `Month ${Math.max(0, Sn(G, J))}` : Qt(J, i, Ce);
1961
- pe !== T ? (T && y.push({ key: T, label: f, width: X }), T = pe, f = ie, X = k) : X += k;
1962
- }), T && y.push({ key: T, label: f, width: X }), y;
1963
- }, [Y, k, r.timelineView, G]), qe = A.useMemo(() => {
1964
- if (!we) return [];
1953
+ }, [I, v, se, d]), q = A.useCallback((i) => {
1954
+ const g = [];
1955
+ let D = "", f = "", U = 0;
1956
+ return Y.forEach((G) => {
1957
+ const ee = Sn(G.date, i), ie = ee.toISOString(), $e = i.unit === "year" ? "YYYY" : i.unit === "month" ? "MMM YYYY" : i.unit === "day" ? "MMM D" : "D", ze = Qt(ee, i, $e);
1958
+ ie !== D ? (D && g.push({ key: D, label: f, width: U }), D = ie, f = ze, U = O) : U += O;
1959
+ }), D && g.push({ key: D, label: f, width: U }), g;
1960
+ }, [Y, O]), xe = A.useMemo(() => {
1961
+ if (!Se) return [];
1965
1962
  const i = [];
1966
- if (s.slice(0, -1).forEach((T) => {
1967
- const f = be(T);
1963
+ if (s.slice(0, -1).forEach((D) => {
1964
+ const f = q(D);
1968
1965
  f.length > 0 && i.push(f);
1969
1966
  }), r.timelineView === "day" && i.length === 0) {
1970
- const T = be({ unit: "month", step: 1, format: "MMM YYYY" });
1971
- T.length > 0 && i.push(T);
1967
+ const D = q({ unit: "month", step: 1, format: "MMM YYYY" });
1968
+ D.length > 0 && i.push(D);
1972
1969
  }
1973
1970
  return i.push(
1974
- Y.map((T, f) => ({
1971
+ Y.map((D, f) => ({
1975
1972
  key: `secondary-${f}`,
1976
- label: T.label,
1977
- width: k,
1978
- date: T.date
1973
+ label: D.label,
1974
+ width: O,
1975
+ date: D.date
1979
1976
  }))
1980
1977
  ), i;
1981
- }, [be, k, we, s, Y]), ce = A.useCallback(() => {
1978
+ }, [q, O, Se, s, Y]), Qe = A.useCallback(() => {
1982
1979
  const i = [];
1983
- let y = -1, T = -1, f = 0, X = "";
1984
- return Y.forEach((Q) => {
1985
- const J = Q.date.getMonth(), pe = Q.date.getFullYear(), Ce = ke(Q.date, "MMM YYYY");
1986
- J !== y || pe !== T ? (y !== -1 && i.push({ label: X, width: f }), y = J, T = pe, f = k, X = Ce) : f += k;
1987
- }), y !== -1 && i.push({ label: X, width: f }), i;
1988
- }, [Y, k]), me = A.useCallback(() => {
1980
+ let g = -1, D = -1, f = 0, U = "";
1981
+ return Y.forEach((G) => {
1982
+ const ee = G.date.getMonth(), ie = G.date.getFullYear(), $e = ke(G.date, "MMM YYYY");
1983
+ ee !== g || ie !== D ? (g !== -1 && i.push({ label: U, width: f }), g = ee, D = ie, f = O, U = $e) : f += O;
1984
+ }), g !== -1 && i.push({ label: U, width: f }), i;
1985
+ }, [Y, O]), ce = A.useCallback(() => {
1989
1986
  const i = [];
1990
- let y = -1, T = 0, f = -1, X = -1, Q = "";
1991
- return Y.forEach((J) => {
1992
- const Ce = J.date.getDate() <= 15 ? 0 : 1, ie = J.date.getMonth(), Xe = J.date.getFullYear(), Ge = ke(J.date, "MMM"), ot = new Date(Xe, ie + 1, 0).getDate(), Pe = Ce === 0 ? `${Ge} 1 - 15` : `${Ge} 16 - ${ot}`;
1993
- Ce !== y || ie !== f || Xe !== X ? (y !== -1 && i.push({ label: Q, width: T }), y = Ce, f = ie, X = Xe, T = k, Q = Pe) : T += k;
1994
- }), y !== -1 && i.push({ label: Q, width: T }), i;
1995
- }, [Y, k]), Fe = A.useMemo(() => ce(), [ce]), ze = A.useMemo(() => me(), [me]), Se = A.useMemo(() => Y.length * k, [Y.length, k]), Qe = A.useMemo(() => {
1987
+ let g = -1, D = 0, f = -1, U = -1, G = "";
1988
+ return Y.forEach((ee) => {
1989
+ const $e = ee.date.getDate() <= 15 ? 0 : 1, ze = ee.date.getMonth(), ge = ee.date.getFullYear(), tt = ke(ee.date, "MMM"), Ke = new Date(ge, ze + 1, 0).getDate(), st = $e === 0 ? `${tt} 1 - 15` : `${tt} 16 - ${Ke}`;
1990
+ $e !== g || ze !== f || ge !== U ? (g !== -1 && i.push({ label: G, width: D }), g = $e, f = ze, U = ge, D = O, G = st) : D += O;
1991
+ }), g !== -1 && i.push({ label: G, width: D }), i;
1992
+ }, [Y, O]), me = A.useMemo(() => Qe(), [Qe]), Fe = A.useMemo(() => ce(), [ce]), pe = A.useMemo(() => Y.length * O, [Y.length, O]), et = A.useMemo(() => {
1996
1993
  const i = /* @__PURE__ */ new Date();
1997
1994
  return i.setHours(0, 0, 0, 0), i;
1998
1995
  }, []), _e = A.useMemo(() => {
1999
1996
  if (!r.showTodayLine) return null;
2000
- const i = ue(Qe);
2001
- return i >= -k && i <= Se + k ? Math.max(0, Math.min(i, Se)) : null;
2002
- }, [r.showTodayLine, Qe, Se, k, ue]), pt = A.useMemo(() => {
1997
+ const i = ue(et);
1998
+ return i >= -O && i <= pe + O ? Math.max(0, Math.min(i, pe)) : null;
1999
+ }, [r.showTodayLine, et, pe, O, ue]), Xe = A.useMemo(() => {
2003
2000
  if (r.projectStartDate)
2004
2001
  return yt(r.projectStartDate);
2005
- if (S.length > 0) {
2006
- const i = S.map((y) => y.start.getTime());
2002
+ if (v.length > 0) {
2003
+ const i = v.map((g) => g.start.getTime());
2007
2004
  return yt(new Date(Math.min(...i)));
2008
2005
  }
2009
2006
  return null;
2010
- }, [r.projectStartDate, S]), We = A.useMemo(() => {
2011
- if (!r.showProjectStartLine || !pt) return null;
2012
- const i = ue(pt);
2013
- return i >= -k && i <= Se + k ? Math.max(0, Math.min(i, Se)) : null;
2014
- }, [r.showProjectStartLine, pt, Se, k, ue]), at = `calc(var(--gantt-scale-height, 24px) * ${V})`;
2007
+ }, [r.projectStartDate, v]), Ue = A.useMemo(() => {
2008
+ if (!r.showProjectStartLine || !Xe) return null;
2009
+ const i = ue(Xe);
2010
+ return i >= -O && i <= pe + O ? Math.max(0, Math.min(i, pe)) : null;
2011
+ }, [r.showProjectStartLine, Xe, pe, O, ue]), ot = `calc(var(--gantt-scale-height, 24px) * ${V})`;
2015
2012
  return /* @__PURE__ */ t.jsxs(
2016
2013
  "div",
2017
2014
  {
@@ -2019,16 +2016,16 @@ const xn = ({
2019
2016
  ref: M,
2020
2017
  onMouseMove: Ye,
2021
2018
  onMouseUp: $,
2022
- style: { width: Se, position: "relative" },
2019
+ style: { width: pe, position: "relative" },
2023
2020
  children: [
2024
- /* @__PURE__ */ t.jsxs("div", { className: "gantt-timeline-header", style: { width: Se, minWidth: Se, position: "relative", height: E }, children: [
2021
+ /* @__PURE__ */ t.jsxs("div", { className: "gantt-timeline-header", style: { width: pe, minWidth: pe, position: "relative", height: E }, children: [
2025
2022
  _e !== null && r.showTodayLine && r.todayLineLabel && r.todayLineLabel !== "" && /* @__PURE__ */ t.jsx(
2026
2023
  "div",
2027
2024
  {
2028
2025
  className: "gantt-today-line-label",
2029
2026
  style: {
2030
2027
  position: "absolute",
2031
- top: at,
2028
+ top: ot,
2032
2029
  left: `${_e}px`,
2033
2030
  transform: "translateX(-50%)",
2034
2031
  backgroundColor: r.todayLineColor || "#ff4d4f",
@@ -2048,14 +2045,14 @@ const xn = ({
2048
2045
  children: r.todayLineLabel
2049
2046
  }
2050
2047
  ),
2051
- We !== null && r.showProjectStartLine && r.projectStartLineLabel && r.projectStartLineLabel !== "" && /* @__PURE__ */ t.jsx(
2048
+ Ue !== null && r.showProjectStartLine && r.projectStartLineLabel && r.projectStartLineLabel !== "" && /* @__PURE__ */ t.jsx(
2052
2049
  "div",
2053
2050
  {
2054
2051
  className: "gantt-project-start-line-label",
2055
2052
  style: {
2056
2053
  position: "absolute",
2057
- top: at,
2058
- left: `${We}px`,
2054
+ top: ot,
2055
+ left: `${Ue}px`,
2059
2056
  transform: "translateX(-50%)",
2060
2057
  backgroundColor: r.projectStartLineColor || "#40a9ff",
2061
2058
  color: "#ffffff",
@@ -2074,24 +2071,24 @@ const xn = ({
2074
2071
  children: r.projectStartLineLabel
2075
2072
  }
2076
2073
  ),
2077
- r.showTimelineHeader !== !1 && (we ? qe.map((i, y) => {
2078
- const T = y === 0 ? "gantt-timeline-scale-month" : y === qe.length - 1 ? "gantt-timeline-scale-day" : "gantt-timeline-scale-range";
2074
+ r.showTimelineHeader !== !1 && (Se ? xe.map((i, g) => {
2075
+ const D = g === 0 ? "gantt-timeline-scale-month" : g === xe.length - 1 ? "gantt-timeline-scale-day" : "gantt-timeline-scale-range";
2079
2076
  return /* @__PURE__ */ t.jsx(
2080
2077
  "div",
2081
2078
  {
2082
- className: `gantt-timeline-scale ${T}`,
2083
- style: { width: Se, display: y === 0 && r.showMonthHeading === !1 || y !== 0 && y !== qe.length - 1 && r.showRangeHeading === !1 ? "none" : "flex" },
2084
- children: i.map((f, X) => {
2085
- const Q = y === qe.length - 1, J = Q && f.date ? r.weekends && Kt(f.date) : !1, pe = Q && f.date ? r.holidays && Zt(f.date, r.holidays) : !1;
2079
+ className: `gantt-timeline-scale ${D}`,
2080
+ style: { width: pe, display: g === 0 && r.showMonthHeading === !1 || g !== 0 && g !== xe.length - 1 && r.showRangeHeading === !1 ? "none" : "flex" },
2081
+ children: i.map((f, U) => {
2082
+ const G = g === xe.length - 1, ee = G && f.date ? r.weekends && Kt(f.date) : !1, ie = G && f.date ? r.holidays && Zt(f.date, r.holidays) : !1;
2086
2083
  return /* @__PURE__ */ t.jsx(
2087
2084
  "div",
2088
2085
  {
2089
- className: `gantt-timeline-cell ${J ? "weekend" : ""} ${pe ? "holiday" : ""}`,
2086
+ className: `gantt-timeline-cell ${ee ? "weekend" : ""} ${ie ? "holiday" : ""}`,
2090
2087
  style: {
2091
2088
  width: f.width,
2092
2089
  minWidth: f.width,
2093
2090
  maxWidth: f.width,
2094
- borderRight: X === i.length - 1 ? "none" : "var(--wx-gantt-border)"
2091
+ borderRight: U === i.length - 1 ? "none" : "var(--wx-gantt-border)"
2095
2092
  },
2096
2093
  children: f.label
2097
2094
  },
@@ -2099,10 +2096,10 @@ const xn = ({
2099
2096
  );
2100
2097
  })
2101
2098
  },
2102
- `dynamic-row-${y}`
2099
+ `dynamic-row-${g}`
2103
2100
  );
2104
2101
  }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2105
- r.showMonthHeading !== !1 && /* @__PURE__ */ t.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-month", style: { width: Se }, children: Fe.map((i, y) => /* @__PURE__ */ t.jsx(
2102
+ r.showMonthHeading !== !1 && /* @__PURE__ */ t.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-month", style: { width: pe }, children: me.map((i, g) => /* @__PURE__ */ t.jsx(
2106
2103
  "div",
2107
2104
  {
2108
2105
  className: "gantt-timeline-cell",
@@ -2110,13 +2107,13 @@ const xn = ({
2110
2107
  width: i.width,
2111
2108
  minWidth: i.width,
2112
2109
  maxWidth: i.width,
2113
- borderRight: y === Fe.length - 1 ? "none" : "var(--wx-gantt-border)"
2110
+ borderRight: g === me.length - 1 ? "none" : "var(--wx-gantt-border)"
2114
2111
  },
2115
2112
  children: i.label
2116
2113
  },
2117
- `top-${y}`
2114
+ `top-${g}`
2118
2115
  )) }),
2119
- r.showRangeHeading !== !1 && /* @__PURE__ */ t.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-range", style: { width: Se }, children: ze.map((i, y) => /* @__PURE__ */ t.jsx(
2116
+ r.showRangeHeading !== !1 && /* @__PURE__ */ t.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-range", style: { width: pe }, children: Fe.map((i, g) => /* @__PURE__ */ t.jsx(
2120
2117
  "div",
2121
2118
  {
2122
2119
  className: "gantt-timeline-cell",
@@ -2124,36 +2121,36 @@ const xn = ({
2124
2121
  width: i.width,
2125
2122
  minWidth: i.width,
2126
2123
  maxWidth: i.width,
2127
- borderRight: y === ze.length - 1 ? "none" : "var(--wx-gantt-border)"
2124
+ borderRight: g === Fe.length - 1 ? "none" : "var(--wx-gantt-border)"
2128
2125
  },
2129
2126
  children: i.label
2130
2127
  },
2131
- `mid-${y}`
2128
+ `mid-${g}`
2132
2129
  )) }),
2133
- /* @__PURE__ */ t.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-day", style: { width: Se }, children: Y.map((i, y) => {
2134
- const T = r.weekends && Kt(i.date), f = r.holidays && Zt(i.date, r.holidays);
2130
+ /* @__PURE__ */ t.jsx("div", { className: "gantt-timeline-scale gantt-timeline-scale-day", style: { width: pe }, children: Y.map((i, g) => {
2131
+ const D = r.weekends && Kt(i.date), f = r.holidays && Zt(i.date, r.holidays);
2135
2132
  return /* @__PURE__ */ t.jsx(
2136
2133
  "div",
2137
2134
  {
2138
- className: `gantt-timeline-cell ${T ? "weekend" : ""} ${f ? "holiday" : ""}`,
2135
+ className: `gantt-timeline-cell ${D ? "weekend" : ""} ${f ? "holiday" : ""}`,
2139
2136
  style: {
2140
- width: k,
2141
- minWidth: k,
2142
- maxWidth: k,
2143
- borderRight: y === Y.length - 1 ? "none" : "var(--wx-gantt-border)"
2137
+ width: O,
2138
+ minWidth: O,
2139
+ maxWidth: O,
2140
+ borderRight: g === Y.length - 1 ? "none" : "var(--wx-gantt-border)"
2144
2141
  },
2145
2142
  children: i.label
2146
2143
  },
2147
- `day-${y}`
2144
+ `day-${g}`
2148
2145
  );
2149
2146
  }) })
2150
2147
  ] }))
2151
2148
  ] }),
2152
- /* @__PURE__ */ t.jsxs("div", { className: "gantt-timeline-body", style: { width: Se, position: "relative" }, children: [
2149
+ /* @__PURE__ */ t.jsxs("div", { className: "gantt-timeline-body", style: { width: pe, position: "relative" }, children: [
2153
2150
  _e !== null && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2154
2151
  r.showTodayLineMarker !== !1 && (() => {
2155
- const i = r.todayLineMarkerSize || 8, y = r.todayLineColor || "#ff4d4f", T = r.todayLineMarkerStyle || "triangle", f = r.todayLineOpacity !== void 0 ? r.todayLineOpacity : 1;
2156
- return T === "triangle" ? /* @__PURE__ */ t.jsx(
2152
+ const i = r.todayLineMarkerSize || 8, g = r.todayLineColor || "#ff4d4f", D = r.todayLineMarkerStyle || "triangle", f = r.todayLineOpacity !== void 0 ? r.todayLineOpacity : 1;
2153
+ return D === "triangle" ? /* @__PURE__ */ t.jsx(
2157
2154
  "div",
2158
2155
  {
2159
2156
  className: "gantt-today-line-marker",
@@ -2166,13 +2163,13 @@ const xn = ({
2166
2163
  height: 0,
2167
2164
  borderLeft: `${i}px solid transparent`,
2168
2165
  borderRight: `${i}px solid transparent`,
2169
- borderBottom: `${i}px solid ${y}`,
2166
+ borderBottom: `${i}px solid ${g}`,
2170
2167
  zIndex: 7,
2171
2168
  pointerEvents: "none",
2172
2169
  opacity: f
2173
2170
  }
2174
2171
  }
2175
- ) : T === "arrow" ? /* @__PURE__ */ t.jsx(
2172
+ ) : D === "arrow" ? /* @__PURE__ */ t.jsx(
2176
2173
  "div",
2177
2174
  {
2178
2175
  className: "gantt-today-line-marker",
@@ -2185,13 +2182,13 @@ const xn = ({
2185
2182
  height: 0,
2186
2183
  borderLeft: `${i}px solid transparent`,
2187
2184
  borderRight: `${i}px solid transparent`,
2188
- borderBottom: `${i * 0.7}px solid ${y}`,
2185
+ borderBottom: `${i * 0.7}px solid ${g}`,
2189
2186
  zIndex: 7,
2190
2187
  pointerEvents: "none",
2191
2188
  opacity: f
2192
2189
  }
2193
2190
  }
2194
- ) : T === "dot" ? /* @__PURE__ */ t.jsx(
2191
+ ) : D === "dot" ? /* @__PURE__ */ t.jsx(
2195
2192
  "div",
2196
2193
  {
2197
2194
  className: "gantt-today-line-marker",
@@ -2203,7 +2200,7 @@ const xn = ({
2203
2200
  width: `${i}px`,
2204
2201
  height: `${i}px`,
2205
2202
  borderRadius: "50%",
2206
- backgroundColor: y,
2203
+ backgroundColor: g,
2207
2204
  zIndex: 7,
2208
2205
  pointerEvents: "none",
2209
2206
  opacity: f
@@ -2232,60 +2229,60 @@ const xn = ({
2232
2229
  }
2233
2230
  )
2234
2231
  ] }),
2235
- We !== null && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2232
+ Ue !== null && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2236
2233
  r.showProjectStartLineMarker !== !1 && (() => {
2237
- const i = r.projectStartLineMarkerSize || 8, y = r.projectStartLineColor || "#40a9ff", T = r.projectStartLineMarkerStyle || "triangle", f = r.projectStartLineOpacity !== void 0 ? r.projectStartLineOpacity : 1;
2238
- return T === "triangle" ? /* @__PURE__ */ t.jsx(
2234
+ const i = r.projectStartLineMarkerSize || 8, g = r.projectStartLineColor || "#40a9ff", D = r.projectStartLineMarkerStyle || "triangle", f = r.projectStartLineOpacity !== void 0 ? r.projectStartLineOpacity : 1;
2235
+ return D === "triangle" ? /* @__PURE__ */ t.jsx(
2239
2236
  "div",
2240
2237
  {
2241
2238
  className: "gantt-project-start-line-marker",
2242
2239
  style: {
2243
2240
  position: "absolute",
2244
- left: `${We}px`,
2241
+ left: `${Ue}px`,
2245
2242
  top: "-4px",
2246
2243
  transform: "translateX(-50%)",
2247
2244
  width: 0,
2248
2245
  height: 0,
2249
2246
  borderLeft: `${i}px solid transparent`,
2250
2247
  borderRight: `${i}px solid transparent`,
2251
- borderBottom: `${i}px solid ${y}`,
2248
+ borderBottom: `${i}px solid ${g}`,
2252
2249
  zIndex: 7,
2253
2250
  pointerEvents: "none",
2254
2251
  opacity: f
2255
2252
  }
2256
2253
  }
2257
- ) : T === "arrow" ? /* @__PURE__ */ t.jsx(
2254
+ ) : D === "arrow" ? /* @__PURE__ */ t.jsx(
2258
2255
  "div",
2259
2256
  {
2260
2257
  className: "gantt-project-start-line-marker",
2261
2258
  style: {
2262
2259
  position: "absolute",
2263
- left: `${We}px`,
2260
+ left: `${Ue}px`,
2264
2261
  top: "-6px",
2265
2262
  transform: "translateX(-50%)",
2266
2263
  width: 0,
2267
2264
  height: 0,
2268
2265
  borderLeft: `${i}px solid transparent`,
2269
2266
  borderRight: `${i}px solid transparent`,
2270
- borderBottom: `${i * 0.7}px solid ${y}`,
2267
+ borderBottom: `${i * 0.7}px solid ${g}`,
2271
2268
  zIndex: 7,
2272
2269
  pointerEvents: "none",
2273
2270
  opacity: f
2274
2271
  }
2275
2272
  }
2276
- ) : T === "dot" ? /* @__PURE__ */ t.jsx(
2273
+ ) : D === "dot" ? /* @__PURE__ */ t.jsx(
2277
2274
  "div",
2278
2275
  {
2279
2276
  className: "gantt-project-start-line-marker",
2280
2277
  style: {
2281
2278
  position: "absolute",
2282
- left: `${We}px`,
2279
+ left: `${Ue}px`,
2283
2280
  top: `-${i / 2}px`,
2284
2281
  transform: "translateX(-50%)",
2285
2282
  width: `${i}px`,
2286
2283
  height: `${i}px`,
2287
2284
  borderRadius: "50%",
2288
- backgroundColor: y,
2285
+ backgroundColor: g,
2289
2286
  zIndex: 7,
2290
2287
  pointerEvents: "none",
2291
2288
  opacity: f
@@ -2299,7 +2296,7 @@ const xn = ({
2299
2296
  className: "gantt-project-start-line",
2300
2297
  style: {
2301
2298
  position: "absolute",
2302
- left: `${We}px`,
2299
+ left: `${Ue}px`,
2303
2300
  top: 0,
2304
2301
  bottom: 0,
2305
2302
  width: `${r.projectStartLineWidth || 1}px`,
@@ -2314,27 +2311,27 @@ const xn = ({
2314
2311
  }
2315
2312
  )
2316
2313
  ] }),
2317
- /* @__PURE__ */ t.jsx("div", { className: "gantt-timeline-grid", children: Y.map((i, y) => {
2318
- const T = r.weekends && Kt(i.date), f = r.holidays && Zt(i.date, r.holidays);
2314
+ /* @__PURE__ */ t.jsx("div", { className: "gantt-timeline-grid", children: Y.map((i, g) => {
2315
+ const D = r.weekends && Kt(i.date), f = r.holidays && Zt(i.date, r.holidays);
2319
2316
  return /* @__PURE__ */ t.jsx(
2320
2317
  "div",
2321
2318
  {
2322
- className: `gantt-timeline-grid-column ${T ? "weekend" : ""} ${f ? "holiday" : ""}`,
2323
- style: { width: k, minWidth: k }
2319
+ className: `gantt-timeline-grid-column ${D ? "weekend" : ""} ${f ? "holiday" : ""}`,
2320
+ style: { width: O, minWidth: O }
2324
2321
  },
2325
- y
2322
+ g
2326
2323
  );
2327
2324
  }) }),
2328
2325
  C.length > 0 && /* @__PURE__ */ t.jsx(
2329
2326
  wn,
2330
2327
  {
2331
2328
  links: C,
2332
- tasks: S,
2329
+ tasks: v,
2333
2330
  getTaskPosition: Le
2334
2331
  }
2335
2332
  ),
2336
- /* @__PURE__ */ t.jsx("div", { className: "gantt-timeline-tasks", style: { width: Se }, children: De ? Array.from(v?.values() || []).map((i) => {
2337
- const y = ge(i);
2333
+ /* @__PURE__ */ t.jsx("div", { className: "gantt-timeline-tasks", style: { width: pe }, children: De ? Array.from(S?.values() || []).map((i) => {
2334
+ const g = ye(i);
2338
2335
  return /* @__PURE__ */ t.jsx(
2339
2336
  "div",
2340
2337
  {
@@ -2344,8 +2341,8 @@ const xn = ({
2344
2341
  {
2345
2342
  className: "gantt-baseline-bar baseline-only",
2346
2343
  style: {
2347
- left: `${y.left}px`,
2348
- width: `${y.width}px`
2344
+ left: `${g.left}px`,
2345
+ width: `${g.width}px`
2349
2346
  },
2350
2347
  title: `Baseline: ${i.start.toLocaleDateString()} - ${i.end.toLocaleDateString()}`
2351
2348
  }
@@ -2353,14 +2350,14 @@ const xn = ({
2353
2350
  },
2354
2351
  `baseline-only-${i.taskId}`
2355
2352
  );
2356
- }) : S.map((i) => {
2357
- const y = z(i), T = j ? v?.get(i.id) : void 0, f = T ? ge(T) : void 0;
2353
+ }) : v.map((i) => {
2354
+ const g = z(i), D = j ? S?.get(i.id) : void 0, f = D ? ye(D) : void 0;
2358
2355
  return /* @__PURE__ */ t.jsxs(
2359
2356
  "div",
2360
2357
  {
2361
2358
  className: "gantt-timeline-row",
2362
2359
  children: [
2363
- T && f && /* @__PURE__ */ t.jsx(
2360
+ D && f && /* @__PURE__ */ t.jsx(
2364
2361
  "div",
2365
2362
  {
2366
2363
  className: `gantt-baseline-bar ${i.type === "milestone" ? "milestone" : ""}`,
@@ -2368,24 +2365,24 @@ const xn = ({
2368
2365
  left: `${f.left}px`,
2369
2366
  width: `${f.width}px`
2370
2367
  },
2371
- title: `Baseline: ${T.start.toLocaleDateString()} - ${T.end.toLocaleDateString()}`
2368
+ title: `Baseline: ${D.start.toLocaleDateString()} - ${D.end.toLocaleDateString()}`
2372
2369
  }
2373
2370
  ),
2374
2371
  !i.hideBar && /* @__PURE__ */ t.jsx(
2375
2372
  xn,
2376
2373
  {
2377
2374
  task: i,
2378
- baseline: T,
2375
+ baseline: D,
2379
2376
  dependencyRuleDescriptions: R.get(i.id) || [],
2380
2377
  tooltipConfig: m,
2381
- position: y,
2378
+ position: g,
2382
2379
  selected: c === i.id,
2383
2380
  dragging: I.taskId === i.id,
2384
2381
  dragDeltaX: I.dragDeltaX,
2385
2382
  dragType: I.type,
2386
2383
  onClick: () => b(i.id),
2387
- onDragStart: (X, Q, J) => {
2388
- ne(i.id, X, Q, J), u(i.id, X, Q);
2384
+ onDragStart: (U, G, ee) => {
2385
+ ne(i.id, U, G, ee), u(i.id, U, G);
2389
2386
  },
2390
2387
  readonly: r.readonly
2391
2388
  }
@@ -2405,15 +2402,15 @@ const xn = ({
2405
2402
  Lr.displayName = "Timeline";
2406
2403
  const Fr = wr((e, a) => /* @__PURE__ */ t.jsx("div", { className: "gantt-chart-wrapper", style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t.jsx(Lr, { ...e, ref: a }) }));
2407
2404
  Fr.displayName = "Chart";
2408
- const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig: n = {} }) => {
2409
- const [s, r] = q({
2405
+ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig: n = {} }) => {
2406
+ const [s, r] = J({
2410
2407
  searchText: "",
2411
2408
  status: "all",
2412
2409
  priority: "all",
2413
2410
  owner: ""
2414
2411
  }), c = (d) => {
2415
- const p = { ...s, ...d };
2416
- r(p), e(p);
2412
+ const h = { ...s, ...d };
2413
+ r(h), e(h);
2417
2414
  }, b = () => {
2418
2415
  const d = {
2419
2416
  searchText: "",
@@ -2425,7 +2422,7 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2425
2422
  }, u = s.searchText !== "" || s.status !== "all" || s.priority !== "all" || s.owner !== "";
2426
2423
  return /* @__PURE__ */ t.jsx("div", { className: "gantt-filter-container", children: /* @__PURE__ */ t.jsxs("div", { className: "gantt-filter-bar", children: [
2427
2424
  /* @__PURE__ */ t.jsx("div", { className: "gantt-filter-left", children: /* @__PURE__ */ t.jsx(
2428
- jn,
2425
+ vn,
2429
2426
  {
2430
2427
  placeholder: n.searchPlaceholder || "Search stages...",
2431
2428
  value: s.searchText,
@@ -2437,7 +2434,7 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2437
2434
  ) }),
2438
2435
  /* @__PURE__ */ t.jsxs("div", { className: "gantt-filter-right", children: [
2439
2436
  /* @__PURE__ */ t.jsx(
2440
- $e,
2437
+ Oe,
2441
2438
  {
2442
2439
  value: s.status,
2443
2440
  onChange: (d) => c({ status: d }),
@@ -2452,7 +2449,7 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2452
2449
  }
2453
2450
  ),
2454
2451
  /* @__PURE__ */ t.jsx(
2455
- $e,
2452
+ Oe,
2456
2453
  {
2457
2454
  value: s.priority,
2458
2455
  onChange: (d) => c({ priority: d }),
@@ -2467,7 +2464,7 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2467
2464
  }
2468
2465
  ),
2469
2466
  /* @__PURE__ */ t.jsx(
2470
- $e,
2467
+ Oe,
2471
2468
  {
2472
2469
  value: s.owner || void 0,
2473
2470
  onChange: (d) => c({ owner: d || "" }),
@@ -2482,7 +2479,7 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2482
2479
  }
2483
2480
  ),
2484
2481
  u && /* @__PURE__ */ t.jsx(
2485
- Ne,
2482
+ Pe,
2486
2483
  {
2487
2484
  type: "default",
2488
2485
  danger: !0,
@@ -2494,7 +2491,7 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2494
2491
  )
2495
2492
  ] })
2496
2493
  ] }) });
2497
- }, dt = (e, a) => e ? typeof e == "string" ? /* @__PURE__ */ t.jsx(Ee, { icon: a }) : e : /* @__PURE__ */ t.jsx(Ee, { icon: a }), Dn = ({
2494
+ }, ct = (e, a) => e ? typeof e == "string" ? /* @__PURE__ */ t.jsx(Ee, { icon: a }) : e : /* @__PURE__ */ t.jsx(Ee, { icon: a }), Tn = ({
2498
2495
  zoomLevel: e,
2499
2496
  setZoomLevel: a,
2500
2497
  timelineView: n,
@@ -2504,21 +2501,21 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2504
2501
  onFilterChange: b,
2505
2502
  owners: u,
2506
2503
  onAddTask: d,
2507
- uiConfig: p,
2508
- iconConfig: h = {},
2509
- styleConfig: v
2504
+ uiConfig: h,
2505
+ iconConfig: p = {},
2506
+ styleConfig: S
2510
2507
  }) => {
2511
- const g = jt(v), m = p.showZoomButtons !== !1, E = p.showExportButtons !== !1, F = s.length > 1 && r, N = m && E;
2508
+ const y = jt(S), m = h.showZoomButtons !== !1, E = h.showExportButtons !== !1, F = s.length > 1 && r, N = m && E;
2512
2509
  return /* @__PURE__ */ t.jsxs("div", { className: "gantt-toolbar-wrapper", children: [
2513
2510
  /* @__PURE__ */ t.jsxs("div", { className: "gantt-toolbar", children: [
2514
- /* @__PURE__ */ t.jsx("div", { className: "gantt-toolbar-left", children: /* @__PURE__ */ t.jsx(er, { size: 8, children: p.showAddTaskButton !== !1 && /* @__PURE__ */ t.jsx(
2515
- Ne,
2511
+ /* @__PURE__ */ t.jsx("div", { className: "gantt-toolbar-left", children: /* @__PURE__ */ t.jsx(er, { size: 8, children: h.showAddTaskButton !== !1 && /* @__PURE__ */ t.jsx(
2512
+ Pe,
2516
2513
  {
2517
2514
  type: "primary",
2518
- icon: dt(h.addTask, ar),
2515
+ icon: ct(p.addTask, ar),
2519
2516
  onClick: () => d?.(),
2520
- style: g.buttonPrimary,
2521
- children: p.addTaskButtonText || "New Stage"
2517
+ style: y.buttonPrimary,
2518
+ children: h.addTaskButtonText || "New Stage"
2522
2519
  }
2523
2520
  ) }) }),
2524
2521
  /* @__PURE__ */ t.jsx("div", { className: "gantt-toolbar-right", children: /* @__PURE__ */ t.jsxs(er, { size: 4, children: [
@@ -2535,91 +2532,91 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2535
2532
  (m || E) && /* @__PURE__ */ t.jsx(tr, { type: "vertical", style: { height: 24, margin: "0 4px" } })
2536
2533
  ] }),
2537
2534
  m && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2538
- /* @__PURE__ */ t.jsx(rt, { title: p.zoomOutTooltip || "Zoom Out", children: /* @__PURE__ */ t.jsx(
2539
- Ne,
2535
+ /* @__PURE__ */ t.jsx(nt, { title: h.zoomOutTooltip || "Zoom Out", children: /* @__PURE__ */ t.jsx(
2536
+ Pe,
2540
2537
  {
2541
- icon: dt(h.zoomOut, Gr),
2538
+ icon: ct(p.zoomOut, Gr),
2542
2539
  onClick: () => a(Math.max(0.5, e - 0.25)),
2543
- style: g.buttonSecondary
2540
+ style: y.buttonSecondary
2544
2541
  }
2545
2542
  ) }),
2546
- /* @__PURE__ */ t.jsx(rt, { title: p.zoomInTooltip || "Zoom In", children: /* @__PURE__ */ t.jsx(
2547
- Ne,
2543
+ /* @__PURE__ */ t.jsx(nt, { title: h.zoomInTooltip || "Zoom In", children: /* @__PURE__ */ t.jsx(
2544
+ Pe,
2548
2545
  {
2549
- icon: dt(h.zoomIn, Jr),
2546
+ icon: ct(p.zoomIn, Jr),
2550
2547
  onClick: () => a(Math.min(2, e + 0.25)),
2551
- style: g.buttonSecondary
2548
+ style: y.buttonSecondary
2552
2549
  }
2553
2550
  ) }),
2554
- /* @__PURE__ */ t.jsx(rt, { title: p.resetZoomTooltip || "Reset Zoom", children: /* @__PURE__ */ t.jsx(
2555
- Ne,
2551
+ /* @__PURE__ */ t.jsx(nt, { title: h.resetZoomTooltip || "Reset Zoom", children: /* @__PURE__ */ t.jsx(
2552
+ Pe,
2556
2553
  {
2557
- icon: dt(h.resetZoom, jr),
2554
+ icon: ct(p.resetZoom, jr),
2558
2555
  onClick: () => a(1),
2559
- style: g.buttonSecondary
2556
+ style: y.buttonSecondary
2560
2557
  }
2561
2558
  ) })
2562
2559
  ] }),
2563
2560
  N && /* @__PURE__ */ t.jsx(tr, { type: "vertical", style: { height: 24, margin: "0 4px" } }),
2564
2561
  E && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2565
- /* @__PURE__ */ t.jsx(rt, { title: p.exportCSVTooltip || "Export to CSV", children: /* @__PURE__ */ t.jsx(
2566
- Ne,
2562
+ /* @__PURE__ */ t.jsx(nt, { title: h.exportCSVTooltip || "Export to CSV", children: /* @__PURE__ */ t.jsx(
2563
+ Pe,
2567
2564
  {
2568
- icon: dt(h.exportCSV, Kr),
2565
+ icon: ct(p.exportCSV, Kr),
2569
2566
  onClick: () => c("csv"),
2570
- style: g.buttonSecondary
2567
+ style: y.buttonSecondary
2571
2568
  }
2572
2569
  ) }),
2573
- /* @__PURE__ */ t.jsx(rt, { title: p.exportExcelTooltip || "Export to Excel", children: /* @__PURE__ */ t.jsx(
2574
- Ne,
2570
+ /* @__PURE__ */ t.jsx(nt, { title: h.exportExcelTooltip || "Export to Excel", children: /* @__PURE__ */ t.jsx(
2571
+ Pe,
2575
2572
  {
2576
- icon: dt(h.exportExcel, Zr),
2573
+ icon: ct(p.exportExcel, Zr),
2577
2574
  onClick: () => c("excel"),
2578
- style: g.buttonSecondary
2575
+ style: y.buttonSecondary
2579
2576
  }
2580
2577
  ) }),
2581
- /* @__PURE__ */ t.jsx(rt, { title: p.exportJSONTooltip || "Export to JSON", children: /* @__PURE__ */ t.jsx(
2582
- Ne,
2578
+ /* @__PURE__ */ t.jsx(nt, { title: h.exportJSONTooltip || "Export to JSON", children: /* @__PURE__ */ t.jsx(
2579
+ Pe,
2583
2580
  {
2584
- icon: dt(h.exportJSON, Qr),
2581
+ icon: ct(p.exportJSON, Qr),
2585
2582
  onClick: () => c("json"),
2586
- style: g.buttonSecondary
2583
+ style: y.buttonSecondary
2587
2584
  }
2588
2585
  ) }),
2589
- /* @__PURE__ */ t.jsx(rt, { title: p.exportPDFTooltip || "Export to PDF", children: /* @__PURE__ */ t.jsx(
2590
- Ne,
2586
+ /* @__PURE__ */ t.jsx(nt, { title: h.exportPDFTooltip || "Export to PDF", children: /* @__PURE__ */ t.jsx(
2587
+ Pe,
2591
2588
  {
2592
- icon: dt(h.exportPDF, en),
2589
+ icon: ct(p.exportPDF, en),
2593
2590
  onClick: () => c("pdf"),
2594
- style: g.buttonSecondary
2591
+ style: y.buttonSecondary
2595
2592
  }
2596
2593
  ) })
2597
2594
  ] })
2598
2595
  ] }) })
2599
2596
  ] }),
2600
- p.showFilterSearch !== !1 && /* @__PURE__ */ t.jsx(
2601
- Tn,
2597
+ h.showFilterSearch !== !1 && /* @__PURE__ */ t.jsx(
2598
+ jn,
2602
2599
  {
2603
2600
  onFilterChange: b,
2604
2601
  owners: u,
2605
- uiConfig: p
2602
+ uiConfig: h
2606
2603
  }
2607
2604
  )
2608
2605
  ] });
2609
- }, { Option: St } = $e, { TextArea: Mn } = ut, En = ({ onCreateTask: e, onClose: a, uiConfig: n = {}, parentId: s, parentTaskName: r, styleConfig: c }) => {
2610
- const [b] = je.useForm(), u = jt(c), d = (p) => {
2611
- const h = p.start.toDate(), v = new Date(h);
2612
- v.setDate(v.getDate() + (p.duration || 1)), e({
2613
- text: p.text,
2614
- start: h,
2615
- end: v,
2616
- duration: p.duration || 1,
2617
- progress: p.progress || 0,
2618
- type: p.type,
2619
- color: typeof p.color == "string" ? p.color : p.color?.toHexString?.() || "#4A90E2",
2620
- owner: p.owner || "",
2621
- priority: p.priority || "medium",
2622
- details: p.details || "",
2606
+ }, { Option: St } = Oe, { TextArea: Dn } = pt, Mn = ({ onCreateTask: e, onClose: a, uiConfig: n = {}, parentId: s, parentTaskName: r, styleConfig: c }) => {
2607
+ const [b] = je.useForm(), u = jt(c), d = (h) => {
2608
+ const p = h.start.toDate(), S = new Date(p);
2609
+ S.setDate(S.getDate() + (h.duration || 1)), e({
2610
+ text: h.text,
2611
+ start: p,
2612
+ end: S,
2613
+ duration: h.duration || 1,
2614
+ progress: h.progress || 0,
2615
+ type: h.type,
2616
+ color: typeof h.color == "string" ? h.color : h.color?.toHexString?.() || "#4A90E2",
2617
+ owner: h.owner || "",
2618
+ priority: h.priority || "medium",
2619
+ details: h.details || "",
2623
2620
  parent: s
2624
2621
  // Set parent for subtasks
2625
2622
  }, s), a();
@@ -2662,16 +2659,16 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2662
2659
  name: "text",
2663
2660
  label: n.taskNameLabel || "Stage Name",
2664
2661
  rules: [{ required: !0, message: n.taskNameRequired || "Please enter stage name" }],
2665
- children: /* @__PURE__ */ t.jsx(ut, { placeholder: n.taskNamePlaceholder || "Enter stage name", autoFocus: !0, style: u.input })
2662
+ children: /* @__PURE__ */ t.jsx(pt, { placeholder: n.taskNamePlaceholder || "Enter stage name", autoFocus: !0, style: u.input })
2666
2663
  }
2667
2664
  ),
2668
2665
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
2669
- /* @__PURE__ */ t.jsx(je.Item, { name: "type", label: n.typeLabel || "Type", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs($e, { style: u.input, children: [
2666
+ /* @__PURE__ */ t.jsx(je.Item, { name: "type", label: n.typeLabel || "Type", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(Oe, { style: u.input, children: [
2670
2667
  /* @__PURE__ */ t.jsx(St, { value: "task", children: n.taskTypeOptions?.task || "Stage" }),
2671
2668
  /* @__PURE__ */ t.jsx(St, { value: "milestone", children: n.taskTypeOptions?.milestone || "Milestone" }),
2672
2669
  /* @__PURE__ */ t.jsx(St, { value: "project", children: n.taskTypeOptions?.project || "Project" })
2673
2670
  ] }) }),
2674
- /* @__PURE__ */ t.jsx(je.Item, { name: "priority", label: n.priorityLabel || "Priority", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs($e, { style: u.input, children: [
2671
+ /* @__PURE__ */ t.jsx(je.Item, { name: "priority", label: n.priorityLabel || "Priority", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(Oe, { style: u.input, children: [
2675
2672
  /* @__PURE__ */ t.jsx(St, { value: "low", children: n.priorityOptions?.low || "Low" }),
2676
2673
  /* @__PURE__ */ t.jsx(St, { value: "medium", children: n.priorityOptions?.medium || "Medium" }),
2677
2674
  /* @__PURE__ */ t.jsx(St, { value: "high", children: n.priorityOptions?.high || "High" })
@@ -2679,37 +2676,37 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2679
2676
  ] }),
2680
2677
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
2681
2678
  /* @__PURE__ */ t.jsx(je.Item, { name: "start", label: n.startDateLabel || "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(Sr, { style: { width: "100%", ...u.input } }) }),
2682
- /* @__PURE__ */ t.jsx(je.Item, { name: "duration", label: n.durationLabel || "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(nt, { min: 0, style: { width: "100%", ...u.input } }) })
2679
+ /* @__PURE__ */ t.jsx(je.Item, { name: "duration", label: n.durationLabel || "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(at, { min: 0, style: { width: "100%", ...u.input } }) })
2683
2680
  ] }),
2684
2681
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
2685
2682
  /* @__PURE__ */ t.jsx(je.Item, { name: "color", label: n.colorLabel || "Color", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(vr, { showText: !0 }) }),
2686
- /* @__PURE__ */ t.jsx(je.Item, { name: "progress", label: n.progressLabel || "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(nt, { min: 0, max: 100, style: { width: "100%", ...u.input } }) })
2683
+ /* @__PURE__ */ t.jsx(je.Item, { name: "progress", label: n.progressLabel || "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(at, { min: 0, max: 100, style: { width: "100%", ...u.input } }) })
2687
2684
  ] }),
2688
- /* @__PURE__ */ t.jsx(je.Item, { name: "owner", label: n.ownerLabel || "Owner", children: /* @__PURE__ */ t.jsx(ut, { placeholder: n.ownerPlaceholder || "Assign to...", style: u.input }) }),
2689
- /* @__PURE__ */ t.jsx(je.Item, { name: "details", label: n.detailsLabel || "Details", children: /* @__PURE__ */ t.jsx(Mn, { placeholder: n.detailsPlaceholder || "Add stage description...", rows: 3, style: u.input }) })
2685
+ /* @__PURE__ */ t.jsx(je.Item, { name: "owner", label: n.ownerLabel || "Owner", children: /* @__PURE__ */ t.jsx(pt, { placeholder: n.ownerPlaceholder || "Assign to...", style: u.input }) }),
2686
+ /* @__PURE__ */ t.jsx(je.Item, { name: "details", label: n.detailsLabel || "Details", children: /* @__PURE__ */ t.jsx(Dn, { placeholder: n.detailsPlaceholder || "Add stage description...", rows: 3, style: u.input }) })
2690
2687
  ]
2691
2688
  }
2692
2689
  )
2693
2690
  }
2694
2691
  );
2695
- }, { Option: vt } = $e, { TextArea: Ln } = ut, { confirm: Fn } = At, Rn = ({ task: e, onUpdate: a, onDelete: n, onClose: s, uiConfig: r = {}, styleConfig: c }) => {
2696
- const [b] = je.useForm(), u = jt(c), d = (h) => {
2697
- const v = h.start.toDate(), g = new Date(v);
2698
- g.setDate(g.getDate() + (h.duration || 1)), a({
2692
+ }, { Option: vt } = Oe, { TextArea: En } = pt, { confirm: Ln } = At, Fn = ({ task: e, onUpdate: a, onDelete: n, onClose: s, uiConfig: r = {}, styleConfig: c }) => {
2693
+ const [b] = je.useForm(), u = jt(c), d = (p) => {
2694
+ const S = p.start.toDate(), y = new Date(S);
2695
+ y.setDate(y.getDate() + (p.duration || 1)), a({
2699
2696
  ...e,
2700
- text: h.text,
2701
- start: v,
2702
- end: g,
2703
- duration: h.duration || 1,
2704
- progress: h.progress || 0,
2705
- type: h.type,
2706
- color: typeof h.color == "string" ? h.color : h.color?.toHexString?.() || "#4A90E2",
2707
- owner: h.owner || "",
2708
- priority: h.priority || "medium",
2709
- details: h.details || ""
2697
+ text: p.text,
2698
+ start: S,
2699
+ end: y,
2700
+ duration: p.duration || 1,
2701
+ progress: p.progress || 0,
2702
+ type: p.type,
2703
+ color: typeof p.color == "string" ? p.color : p.color?.toHexString?.() || "#4A90E2",
2704
+ owner: p.owner || "",
2705
+ priority: p.priority || "medium",
2706
+ details: p.details || ""
2710
2707
  }), s();
2711
- }, p = () => {
2712
- Fn({
2708
+ }, h = () => {
2709
+ Ln({
2713
2710
  title: r.deleteConfirmTitle ? `${r.deleteConfirmTitle}: "${e.text}"?` : `Are you sure you want to delete "${e.text}"?`,
2714
2711
  icon: /* @__PURE__ */ t.jsx(Ee, { icon: tn, style: { color: "#faad14", marginRight: 8 } }),
2715
2712
  content: r.deleteConfirmContent || "This action cannot be undone.",
@@ -2728,9 +2725,9 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2728
2725
  open: !0,
2729
2726
  onCancel: s,
2730
2727
  footer: [
2731
- /* @__PURE__ */ t.jsx(Ne, { danger: !0, onClick: p, style: { float: "left", ...u.buttonDanger }, children: r.taskEditorDeleteText || "Delete" }, "delete"),
2732
- /* @__PURE__ */ t.jsx(Ne, { onClick: s, style: u.buttonSecondary, children: r.taskEditorCancelText || "Cancel" }, "cancel"),
2733
- /* @__PURE__ */ t.jsx(Ne, { type: "primary", onClick: () => b.submit(), style: u.buttonPrimary, children: r.taskEditorSaveText || "Save Changes" }, "submit")
2728
+ /* @__PURE__ */ t.jsx(Pe, { danger: !0, onClick: h, style: { float: "left", ...u.buttonDanger }, children: r.taskEditorDeleteText || "Delete" }, "delete"),
2729
+ /* @__PURE__ */ t.jsx(Pe, { onClick: s, style: u.buttonSecondary, children: r.taskEditorCancelText || "Cancel" }, "cancel"),
2730
+ /* @__PURE__ */ t.jsx(Pe, { type: "primary", onClick: () => b.submit(), style: u.buttonPrimary, children: r.taskEditorSaveText || "Save Changes" }, "submit")
2734
2731
  ],
2735
2732
  width: 600,
2736
2733
  className: "gantt-modal-antd",
@@ -2762,16 +2759,16 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2762
2759
  name: "text",
2763
2760
  label: r.taskNameLabel || "Stage Name",
2764
2761
  rules: [{ required: !0, message: r.taskNameRequired || "Please enter stage name" }],
2765
- children: /* @__PURE__ */ t.jsx(ut, { placeholder: r.taskNamePlaceholder || "Enter stage name", style: u.input })
2762
+ children: /* @__PURE__ */ t.jsx(pt, { placeholder: r.taskNamePlaceholder || "Enter stage name", style: u.input })
2766
2763
  }
2767
2764
  ),
2768
2765
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
2769
- /* @__PURE__ */ t.jsx(je.Item, { name: "type", label: r.typeLabel || "Type", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs($e, { style: u.input, children: [
2766
+ /* @__PURE__ */ t.jsx(je.Item, { name: "type", label: r.typeLabel || "Type", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(Oe, { style: u.input, children: [
2770
2767
  /* @__PURE__ */ t.jsx(vt, { value: "task", children: r.taskTypeOptions?.task || "Stage" }),
2771
2768
  /* @__PURE__ */ t.jsx(vt, { value: "milestone", children: r.taskTypeOptions?.milestone || "Milestone" }),
2772
2769
  /* @__PURE__ */ t.jsx(vt, { value: "project", children: r.taskTypeOptions?.project || "Project" })
2773
2770
  ] }) }),
2774
- /* @__PURE__ */ t.jsx(je.Item, { name: "priority", label: r.priorityLabel || "Priority", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs($e, { style: u.input, children: [
2771
+ /* @__PURE__ */ t.jsx(je.Item, { name: "priority", label: r.priorityLabel || "Priority", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(Oe, { style: u.input, children: [
2775
2772
  /* @__PURE__ */ t.jsx(vt, { value: "low", children: r.priorityOptions?.low || "Low" }),
2776
2773
  /* @__PURE__ */ t.jsx(vt, { value: "medium", children: r.priorityOptions?.medium || "Medium" }),
2777
2774
  /* @__PURE__ */ t.jsx(vt, { value: "high", children: r.priorityOptions?.high || "High" })
@@ -2779,20 +2776,20 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2779
2776
  ] }),
2780
2777
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
2781
2778
  /* @__PURE__ */ t.jsx(je.Item, { name: "start", label: r.startDateLabel || "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(Sr, { style: { width: "100%", ...u.input } }) }),
2782
- /* @__PURE__ */ t.jsx(je.Item, { name: "duration", label: r.durationLabel || "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(nt, { min: 0, style: { width: "100%", ...u.input } }) })
2779
+ /* @__PURE__ */ t.jsx(je.Item, { name: "duration", label: r.durationLabel || "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(at, { min: 0, style: { width: "100%", ...u.input } }) })
2783
2780
  ] }),
2784
2781
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
2785
2782
  /* @__PURE__ */ t.jsx(je.Item, { name: "color", label: r.colorLabel || "Color", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(vr, { showText: !0 }) }),
2786
- /* @__PURE__ */ t.jsx(je.Item, { name: "progress", label: r.progressLabel || "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(nt, { min: 0, max: 100, style: { width: "100%", ...u.input } }) })
2783
+ /* @__PURE__ */ t.jsx(je.Item, { name: "progress", label: r.progressLabel || "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(at, { min: 0, max: 100, style: { width: "100%", ...u.input } }) })
2787
2784
  ] }),
2788
- /* @__PURE__ */ t.jsx(je.Item, { name: "owner", label: r.ownerLabel || "Owner", children: /* @__PURE__ */ t.jsx(ut, { placeholder: r.ownerPlaceholder || "Assign to...", style: u.input }) }),
2789
- /* @__PURE__ */ t.jsx(je.Item, { name: "details", label: r.detailsLabel || "Details", children: /* @__PURE__ */ t.jsx(Ln, { placeholder: r.detailsPlaceholder || "Add stage description...", rows: 3, style: u.input }) })
2785
+ /* @__PURE__ */ t.jsx(je.Item, { name: "owner", label: r.ownerLabel || "Owner", children: /* @__PURE__ */ t.jsx(pt, { placeholder: r.ownerPlaceholder || "Assign to...", style: u.input }) }),
2786
+ /* @__PURE__ */ t.jsx(je.Item, { name: "details", label: r.detailsLabel || "Details", children: /* @__PURE__ */ t.jsx(En, { placeholder: r.detailsPlaceholder || "Add stage description...", rows: 3, style: u.input }) })
2790
2787
  ]
2791
2788
  }
2792
2789
  )
2793
2790
  }
2794
2791
  );
2795
- }, { Title: Pt, Text: gt, Paragraph: Pn } = br, { Option: tt } = $e, Nn = ({
2792
+ }, { Title: Pt, Text: gt, Paragraph: Rn } = br, { Option: rt } = Oe, Pn = ({
2796
2793
  task: e,
2797
2794
  allTasks: a,
2798
2795
  links: n,
@@ -2802,18 +2799,18 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2802
2799
  onClose: b,
2803
2800
  styleConfig: u
2804
2801
  }) => {
2805
- const d = jt(u), [p, h] = q(""), [v, g] = q("e2s"), [m, E] = q(0), [F, N] = q("day"), [M, S] = q(e.duration), [w, C] = q(""), Z = n.filter((R) => R.target === e.id), W = a.filter((R) => R.id !== e.id && R.id !== e.parent), re = () => {
2806
- if (p) {
2802
+ const d = jt(u), [h, p] = J(""), [S, y] = J("e2s"), [m, E] = J(0), [F, N] = J("day"), [M, v] = J(e.duration), [w, C] = J(""), Z = n.filter((R) => R.target === e.id), W = a.filter((R) => R.id !== e.id && R.id !== e.parent), re = () => {
2803
+ if (h) {
2807
2804
  const R = rr(m, F);
2808
2805
  if (M !== e.duration && c) {
2809
- const O = Te(new Date(e.start), M, "day");
2806
+ const k = Te(new Date(e.start), M, "day");
2810
2807
  c({
2811
2808
  ...e,
2812
2809
  duration: M,
2813
- end: O
2810
+ end: k
2814
2811
  });
2815
2812
  }
2816
- s(p, e.id, v, R), h(""), E(0), N("day");
2813
+ s(h, e.id, S, R), p(""), E(0), N("day");
2817
2814
  }
2818
2815
  }, le = () => {
2819
2816
  if (!w.trim()) return;
@@ -2823,13 +2820,13 @@ const { Search: jn } = ut, Tn = ({ onFilterChange: e, owners: a = [], uiConfig:
2823
2820
  Example: 3FS+10d`);
2824
2821
  return;
2825
2822
  }
2826
- const O = R.taskNumber - 1, B = a[O];
2823
+ const k = R.taskNumber - 1, B = a[k];
2827
2824
  if (!B) {
2828
2825
  alert(`Task ${R.taskNumber} not found`);
2829
2826
  return;
2830
2827
  }
2831
- const Y = fn(R.type), k = rr(R.lag, R.lagUnit);
2832
- s(B.id, e.id, Y, k), C("");
2828
+ const Y = fn(R.type), O = rr(R.lag, R.lagUnit);
2829
+ s(B.id, e.id, Y, O), C("");
2833
2830
  }, j = (R) => {
2834
2831
  switch (R) {
2835
2832
  case "e2s":
@@ -2841,7 +2838,7 @@ Example: 3FS+10d`);
2841
2838
  case "s2e":
2842
2839
  return "Start-to-Finish (SF)";
2843
2840
  }
2844
- }, U = (R) => {
2841
+ }, X = (R) => {
2845
2842
  switch (R) {
2846
2843
  case "e2s":
2847
2844
  return "blue";
@@ -2887,15 +2884,15 @@ Example: 3FS+10d`);
2887
2884
  /* @__PURE__ */ t.jsxs("div", { children: [
2888
2885
  /* @__PURE__ */ t.jsx(gt, { style: { display: "block", marginBottom: 8, fontSize: 13, color: d.font?.color }, children: "Predecessor" }),
2889
2886
  /* @__PURE__ */ t.jsx(
2890
- $e,
2887
+ Oe,
2891
2888
  {
2892
2889
  showSearch: !0,
2893
2890
  placeholder: "Select a task",
2894
2891
  optionFilterProp: "children",
2895
2892
  style: { width: "100%", ...d.input },
2896
- value: p,
2897
- onChange: h,
2898
- children: W.map((R) => /* @__PURE__ */ t.jsxs(tt, { value: R.id, children: [
2893
+ value: h,
2894
+ onChange: p,
2895
+ children: W.map((R) => /* @__PURE__ */ t.jsxs(rt, { value: R.id, children: [
2899
2896
  "[",
2900
2897
  a.indexOf(R) + 1,
2901
2898
  "] ",
@@ -2907,16 +2904,16 @@ Example: 3FS+10d`);
2907
2904
  /* @__PURE__ */ t.jsxs("div", { children: [
2908
2905
  /* @__PURE__ */ t.jsx(gt, { style: { display: "block", marginBottom: 8, fontSize: 13, color: d.font?.color }, children: "Type" }),
2909
2906
  /* @__PURE__ */ t.jsxs(
2910
- $e,
2907
+ Oe,
2911
2908
  {
2912
2909
  style: { width: "100%", ...d.input },
2913
- value: v,
2914
- onChange: g,
2910
+ value: S,
2911
+ onChange: y,
2915
2912
  children: [
2916
- /* @__PURE__ */ t.jsx(tt, { value: "e2s", children: "Finish-to-Start (FS)" }),
2917
- /* @__PURE__ */ t.jsx(tt, { value: "s2s", children: "Start-to-Start (SS)" }),
2918
- /* @__PURE__ */ t.jsx(tt, { value: "e2e", children: "Finish-to-Finish (FF)" }),
2919
- /* @__PURE__ */ t.jsx(tt, { value: "s2e", children: "Start-to-Finish (SF)" })
2913
+ /* @__PURE__ */ t.jsx(rt, { value: "e2s", children: "Finish-to-Start (FS)" }),
2914
+ /* @__PURE__ */ t.jsx(rt, { value: "s2s", children: "Start-to-Start (SS)" }),
2915
+ /* @__PURE__ */ t.jsx(rt, { value: "e2e", children: "Finish-to-Finish (FF)" }),
2916
+ /* @__PURE__ */ t.jsx(rt, { value: "s2e", children: "Start-to-Finish (SF)" })
2920
2917
  ]
2921
2918
  }
2922
2919
  )
@@ -2925,7 +2922,7 @@ Example: 3FS+10d`);
2925
2922
  /* @__PURE__ */ t.jsxs("div", { style: { flex: 1 }, children: [
2926
2923
  /* @__PURE__ */ t.jsx(gt, { style: { display: "block", marginBottom: 8, fontSize: 13, color: d.font?.color }, children: "Lag/Lead" }),
2927
2924
  /* @__PURE__ */ t.jsx(
2928
- nt,
2925
+ at,
2929
2926
  {
2930
2927
  style: { width: "100%", ...d.input },
2931
2928
  value: m,
@@ -2936,16 +2933,16 @@ Example: 3FS+10d`);
2936
2933
  /* @__PURE__ */ t.jsxs("div", { style: { flex: 1 }, children: [
2937
2934
  /* @__PURE__ */ t.jsx(gt, { style: { display: "block", marginBottom: 8, fontSize: 13, color: d.font?.color }, children: "Units" }),
2938
2935
  /* @__PURE__ */ t.jsxs(
2939
- $e,
2936
+ Oe,
2940
2937
  {
2941
2938
  style: { width: "100%", ...d.input },
2942
2939
  value: F,
2943
2940
  onChange: N,
2944
2941
  children: [
2945
- /* @__PURE__ */ t.jsx(tt, { value: "day", children: "Days" }),
2946
- /* @__PURE__ */ t.jsx(tt, { value: "hour", children: "Hours" }),
2947
- /* @__PURE__ */ t.jsx(tt, { value: "week", children: "Weeks" }),
2948
- /* @__PURE__ */ t.jsx(tt, { value: "month", children: "Months" })
2942
+ /* @__PURE__ */ t.jsx(rt, { value: "day", children: "Days" }),
2943
+ /* @__PURE__ */ t.jsx(rt, { value: "hour", children: "Hours" }),
2944
+ /* @__PURE__ */ t.jsx(rt, { value: "week", children: "Weeks" }),
2945
+ /* @__PURE__ */ t.jsx(rt, { value: "month", children: "Months" })
2949
2946
  ]
2950
2947
  }
2951
2948
  )
@@ -2954,23 +2951,23 @@ Example: 3FS+10d`);
2954
2951
  /* @__PURE__ */ t.jsxs("div", { children: [
2955
2952
  /* @__PURE__ */ t.jsx(gt, { style: { display: "block", marginBottom: 8, fontSize: 13, color: d.font?.color }, children: "Duration (days)" }),
2956
2953
  /* @__PURE__ */ t.jsx(
2957
- nt,
2954
+ at,
2958
2955
  {
2959
2956
  style: { width: "100%", ...d.input },
2960
2957
  min: 1,
2961
2958
  value: M,
2962
- onChange: (R) => S(R || 1)
2959
+ onChange: (R) => v(R || 1)
2963
2960
  }
2964
2961
  )
2965
2962
  ] }),
2966
2963
  /* @__PURE__ */ t.jsx(
2967
- Ne,
2964
+ Pe,
2968
2965
  {
2969
2966
  type: "primary",
2970
2967
  icon: /* @__PURE__ */ t.jsx(Ee, { icon: ar, style: { marginRight: 8 } }),
2971
2968
  block: !0,
2972
2969
  onClick: re,
2973
- disabled: !p,
2970
+ disabled: !h,
2974
2971
  style: {
2975
2972
  height: 40,
2976
2973
  marginTop: 8,
@@ -2990,13 +2987,13 @@ Example: 3FS+10d`);
2990
2987
  style: { width: 250, ...d.modal },
2991
2988
  headStyle: { borderBottom: `1px solid ${d.modal?.borderColor || "#f0f0f0"}` },
2992
2989
  children: [
2993
- /* @__PURE__ */ t.jsxs(Pn, { type: "secondary", style: { fontSize: 12, marginBottom: 16, color: d.font?.color, opacity: 0.7 }, children: [
2990
+ /* @__PURE__ */ t.jsxs(Rn, { type: "secondary", style: { fontSize: 12, marginBottom: 16, color: d.font?.color, opacity: 0.7 }, children: [
2994
2991
  "Format: [TaskNumber][Type][+/-][Lag][Unit]",
2995
2992
  /* @__PURE__ */ t.jsx("br", {}),
2996
2993
  "Example: 3FS+10d"
2997
2994
  ] }),
2998
2995
  /* @__PURE__ */ t.jsx(
2999
- ut,
2996
+ pt,
3000
2997
  {
3001
2998
  placeholder: "e.g. 5FS+2d",
3002
2999
  value: w,
@@ -3010,7 +3007,7 @@ Example: 3FS+10d`);
3010
3007
  }
3011
3008
  ),
3012
3009
  /* @__PURE__ */ t.jsx(
3013
- Ne,
3010
+ Pe,
3014
3011
  {
3015
3012
  block: !0,
3016
3013
  onClick: le,
@@ -3034,7 +3031,7 @@ Example: 3FS+10d`);
3034
3031
  dataSource: Z,
3035
3032
  locale: { emptyText: /* @__PURE__ */ t.jsx(gt, { type: "secondary", style: { color: d.font?.color, opacity: 0.5 }, children: "No dependencies added yet." }) },
3036
3033
  renderItem: (R) => {
3037
- const O = a.find((B) => B.id === R.source);
3034
+ const k = a.find((B) => B.id === R.source);
3038
3035
  return /* @__PURE__ */ t.jsx(
3039
3036
  Jt.Item,
3040
3037
  {
@@ -3047,7 +3044,7 @@ Example: 3FS+10d`);
3047
3044
  },
3048
3045
  actions: [
3049
3046
  /* @__PURE__ */ t.jsx(
3050
- Ne,
3047
+ Pe,
3051
3048
  {
3052
3049
  type: "text",
3053
3050
  danger: !0,
@@ -3071,10 +3068,10 @@ Example: 3FS+10d`);
3071
3068
  color: "#fff",
3072
3069
  fontSize: 12,
3073
3070
  fontWeight: "bold"
3074
- }, children: O ? a.indexOf(O) + 1 : "?" }),
3071
+ }, children: k ? a.indexOf(k) + 1 : "?" }),
3075
3072
  title: /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
3076
- /* @__PURE__ */ t.jsx("span", { style: { fontWeight: 600, color: d.font?.color }, children: O?.text || "Unknown Task" }),
3077
- /* @__PURE__ */ t.jsx(Wr, { color: U(R.type), style: { margin: 0 }, children: j(R.type) })
3073
+ /* @__PURE__ */ t.jsx("span", { style: { fontWeight: 600, color: d.font?.color }, children: k?.text || "Unknown Task" }),
3074
+ /* @__PURE__ */ t.jsx(Wr, { color: X(R.type), style: { margin: 0 }, children: j(R.type) })
3078
3075
  ] }),
3079
3076
  description: /* @__PURE__ */ t.jsx("div", { style: { display: "flex", alignItems: "center", gap: 16, marginTop: 4 }, children: /* @__PURE__ */ t.jsxs("span", { style: { fontSize: 12, color: d.font?.color, opacity: 0.7 }, children: [
3080
3077
  /* @__PURE__ */ t.jsx(Ee, { icon: Tr, style: { marginRight: 6 } }),
@@ -3100,7 +3097,7 @@ Example: 3FS+10d`);
3100
3097
  ] })
3101
3098
  }
3102
3099
  );
3103
- }, On = ({
3100
+ }, Nn = ({
3104
3101
  x: e,
3105
3102
  y: a,
3106
3103
  task: n,
@@ -3110,12 +3107,12 @@ Example: 3FS+10d`);
3110
3107
  onDependencies: b,
3111
3108
  onConvertToMilestone: u,
3112
3109
  onConvertToTask: d,
3113
- onConvertToProject: p,
3114
- onAutoSchedule: h,
3115
- onClose: v,
3116
- styleConfig: g
3110
+ onConvertToProject: h,
3111
+ onAutoSchedule: p,
3112
+ onClose: S,
3113
+ styleConfig: y
3117
3114
  }) => {
3118
- const m = jt(g);
3115
+ const m = jt(y);
3119
3116
  if (!n) return null;
3120
3117
  const E = [
3121
3118
  {
@@ -3123,7 +3120,7 @@ Example: 3FS+10d`);
3123
3120
  label: "Edit",
3124
3121
  icon: /* @__PURE__ */ t.jsx(Ee, { icon: nn }),
3125
3122
  onClick: () => {
3126
- s(), v();
3123
+ s(), S();
3127
3124
  }
3128
3125
  },
3129
3126
  {
@@ -3131,7 +3128,7 @@ Example: 3FS+10d`);
3131
3128
  label: "Copy",
3132
3129
  icon: /* @__PURE__ */ t.jsx(Ee, { icon: an }),
3133
3130
  onClick: () => {
3134
- c(), v();
3131
+ c(), S();
3135
3132
  }
3136
3133
  },
3137
3134
  {
@@ -3139,7 +3136,7 @@ Example: 3FS+10d`);
3139
3136
  label: "Dependencies",
3140
3137
  icon: /* @__PURE__ */ t.jsx(Ee, { icon: Tr }),
3141
3138
  onClick: () => {
3142
- b(), v();
3139
+ b(), S();
3143
3140
  }
3144
3141
  },
3145
3142
  {
@@ -3156,7 +3153,7 @@ Example: 3FS+10d`);
3156
3153
  icon: /* @__PURE__ */ t.jsx(Ee, { icon: on }),
3157
3154
  disabled: n.type === "milestone",
3158
3155
  onClick: () => {
3159
- u(), v();
3156
+ u(), S();
3160
3157
  }
3161
3158
  },
3162
3159
  {
@@ -3165,7 +3162,7 @@ Example: 3FS+10d`);
3165
3162
  icon: /* @__PURE__ */ t.jsx(Ee, { icon: sn }),
3166
3163
  disabled: n.type === "task",
3167
3164
  onClick: () => {
3168
- d(), v();
3165
+ d(), S();
3169
3166
  }
3170
3167
  },
3171
3168
  {
@@ -3174,7 +3171,7 @@ Example: 3FS+10d`);
3174
3171
  icon: /* @__PURE__ */ t.jsx(Ee, { icon: ln }),
3175
3172
  disabled: n.type === "project",
3176
3173
  onClick: () => {
3177
- p(), v();
3174
+ h(), S();
3178
3175
  }
3179
3176
  }
3180
3177
  ]
@@ -3184,7 +3181,7 @@ Example: 3FS+10d`);
3184
3181
  label: "Auto Schedule",
3185
3182
  icon: /* @__PURE__ */ t.jsx(Ee, { icon: jr }),
3186
3183
  onClick: () => {
3187
- h?.(), v();
3184
+ p?.(), S();
3188
3185
  }
3189
3186
  },
3190
3187
  {
@@ -3196,7 +3193,7 @@ Example: 3FS+10d`);
3196
3193
  icon: /* @__PURE__ */ t.jsx(Ee, { icon: Dr }),
3197
3194
  danger: !0,
3198
3195
  onClick: () => {
3199
- r(), v();
3196
+ r(), S();
3200
3197
  }
3201
3198
  }
3202
3199
  ];
@@ -3228,51 +3225,51 @@ Example: 3FS+10d`);
3228
3225
  }
3229
3226
  );
3230
3227
  }, kn = (e, a = []) => {
3231
- const [n, s] = q([]), [r, c] = q(-1), [b, u] = q(e), [d, p] = q(a);
3232
- ct(() => {
3228
+ const [n, s] = J([]), [r, c] = J(-1), [b, u] = J(e), [d, h] = J(a);
3229
+ ut(() => {
3233
3230
  u(e);
3234
- }, [e]), ct(() => {
3235
- p(a);
3231
+ }, [e]), ut(() => {
3232
+ h(a);
3236
3233
  }, [a]);
3237
- const h = Ze((S, w, C) => {
3234
+ const p = Je((v, w, C) => {
3238
3235
  const Z = {
3239
- type: S,
3236
+ type: v,
3240
3237
  before: w,
3241
3238
  after: C,
3242
3239
  timestamp: Date.now()
3243
3240
  }, W = n.slice(0, r + 1);
3244
3241
  W.push(Z), W.length > 50 ? W.shift() : c(r + 1), s(W);
3245
- }, [n, r]), v = Ze(() => {
3242
+ }, [n, r]), S = Je(() => {
3246
3243
  if (r < 0) return;
3247
- const S = n[r];
3248
- u(S.before.tasks), p(S.before.links), c(r - 1);
3249
- }, [n, r]), g = Ze(() => {
3244
+ const v = n[r];
3245
+ u(v.before.tasks), h(v.before.links), c(r - 1);
3246
+ }, [n, r]), y = Je(() => {
3250
3247
  if (r >= n.length - 1) return;
3251
- const S = n[r + 1];
3252
- u(S.after.tasks), p(S.after.links), c(r + 1);
3253
- }, [n, r]), m = r >= 0, E = r < n.length - 1, F = Ze((S) => {
3254
- const w = { tasks: b, links: d }, C = b.map((W) => W.id === S.id ? S : W);
3255
- h("task_update", w, { tasks: C, links: d }), u(C);
3256
- }, [b, d, h]), N = Ze((S) => {
3257
- const w = { tasks: b, links: d }, C = [...b, S];
3258
- h("task_create", w, { tasks: C, links: d }), u(C);
3259
- }, [b, d, h]), M = Ze((S) => {
3260
- const w = { tasks: b, links: d }, C = b.filter((re) => re.id !== S), Z = d.filter((re) => re.source !== S && re.target !== S);
3261
- h("task_delete", w, { tasks: C, links: Z }), u(C), p(Z);
3262
- }, [b, d, h]);
3248
+ const v = n[r + 1];
3249
+ u(v.after.tasks), h(v.after.links), c(r + 1);
3250
+ }, [n, r]), m = r >= 0, E = r < n.length - 1, F = Je((v) => {
3251
+ const w = { tasks: b, links: d }, C = b.map((W) => W.id === v.id ? v : W);
3252
+ p("task_update", w, { tasks: C, links: d }), u(C);
3253
+ }, [b, d, p]), N = Je((v) => {
3254
+ const w = { tasks: b, links: d }, C = [...b, v];
3255
+ p("task_create", w, { tasks: C, links: d }), u(C);
3256
+ }, [b, d, p]), M = Je((v) => {
3257
+ const w = { tasks: b, links: d }, C = b.filter((re) => re.id !== v), Z = d.filter((re) => re.source !== v && re.target !== v);
3258
+ p("task_delete", w, { tasks: C, links: Z }), u(C), h(Z);
3259
+ }, [b, d, p]);
3263
3260
  return {
3264
3261
  tasks: b,
3265
3262
  links: d,
3266
3263
  setTasks: u,
3267
- setLinks: p,
3268
- undo: v,
3269
- redo: g,
3264
+ setLinks: h,
3265
+ undo: S,
3266
+ redo: y,
3270
3267
  canUndo: m,
3271
3268
  canRedo: E,
3272
3269
  updateTask: F,
3273
3270
  createTask: N,
3274
3271
  deleteTask: M,
3275
- saveState: h,
3272
+ saveState: p,
3276
3273
  history: n
3277
3274
  };
3278
3275
  }, Rr = (e, a, n = { mode: "forward" }) => {
@@ -3281,50 +3278,50 @@ Example: 3FS+10d`);
3281
3278
  s.set(c.id, []), r.set(c.id, []);
3282
3279
  }), a.forEach((c) => {
3283
3280
  c.type === "e2s" && (s.get(c.target)?.push(c.source), r.get(c.source)?.push(c.target));
3284
- }), n.mode === "forward" ? $n(e, s, n) : Cn(e, r, n);
3285
- }, $n = (e, a, n) => {
3281
+ }), n.mode === "forward" ? On(e, s, n) : $n(e, r, n);
3282
+ }, On = (e, a, n) => {
3286
3283
  const s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), c = n.projectStart || /* @__PURE__ */ new Date(), b = (u) => {
3287
3284
  if (r.has(u)) return;
3288
3285
  const d = e.find((E) => E.id === u);
3289
3286
  if (!d) return;
3290
- const p = a.get(u) || [];
3291
- p.forEach((E) => b(E));
3292
- let h = c;
3293
- p.forEach((E) => {
3287
+ const h = a.get(u) || [];
3288
+ h.forEach((E) => b(E));
3289
+ let p = c;
3290
+ h.forEach((E) => {
3294
3291
  const F = s.get(E);
3295
- F && F.end > h && (h = new Date(F.end));
3292
+ F && F.end > p && (p = new Date(F.end));
3296
3293
  });
3297
- const v = new Date(h), g = Te(v, d.duration, "day"), m = {
3294
+ const S = new Date(p), y = Te(S, d.duration, "day"), m = {
3298
3295
  ...d,
3299
- start: v,
3300
- end: g
3296
+ start: S,
3297
+ end: y
3301
3298
  };
3302
3299
  s.set(u, m), r.add(u);
3303
3300
  };
3304
3301
  return e.forEach((u) => b(u.id)), e.map((u) => s.get(u.id) || u);
3305
- }, Cn = (e, a, n) => {
3302
+ }, $n = (e, a, n) => {
3306
3303
  const s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), c = n.projectEnd || new Date(
3307
3304
  Math.max(...e.map((u) => u.end.getTime()))
3308
3305
  ), b = (u) => {
3309
3306
  if (r.has(u)) return;
3310
3307
  const d = e.find((E) => E.id === u);
3311
3308
  if (!d) return;
3312
- const p = a.get(u) || [];
3313
- p.forEach((E) => b(E));
3314
- let h = c;
3315
- p.forEach((E) => {
3309
+ const h = a.get(u) || [];
3310
+ h.forEach((E) => b(E));
3311
+ let p = c;
3312
+ h.forEach((E) => {
3316
3313
  const F = s.get(E);
3317
- F && F.start < h && (h = new Date(F.start));
3314
+ F && F.start < p && (p = new Date(F.start));
3318
3315
  });
3319
- const v = new Date(h), g = Te(v, -d.duration, "day"), m = {
3316
+ const S = new Date(p), y = Te(S, -d.duration, "day"), m = {
3320
3317
  ...d,
3321
- start: g,
3322
- end: v
3318
+ start: y,
3319
+ end: S
3323
3320
  };
3324
3321
  s.set(u, m), r.add(u);
3325
3322
  };
3326
3323
  return e.forEach((u) => b(u.id)), e.map((u) => s.get(u.id) || u);
3327
- }, Yn = (e) => {
3324
+ }, Cn = (e) => {
3328
3325
  const a = /* @__PURE__ */ new Map();
3329
3326
  e.forEach((s) => {
3330
3327
  s.owner && (a.has(s.owner) || a.set(s.owner, []), a.get(s.owner).push(s));
@@ -3335,23 +3332,23 @@ Example: 3FS+10d`);
3335
3332
  for (let c = 1; c < r.length; c++) {
3336
3333
  const b = r[c], u = r[c - 1];
3337
3334
  if (b.start < u.end) {
3338
- const d = n.findIndex((p) => p.id === b.id);
3335
+ const d = n.findIndex((h) => h.id === b.id);
3339
3336
  if (d >= 0) {
3340
- const p = new Date(u.end), h = Te(p, b.duration, "day");
3337
+ const h = new Date(u.end), p = Te(h, b.duration, "day");
3341
3338
  n[d] = {
3342
3339
  ...b,
3343
- start: p,
3344
- end: h
3340
+ start: h,
3341
+ end: p
3345
3342
  };
3346
3343
  }
3347
3344
  }
3348
3345
  }
3349
3346
  }), n;
3350
- }, ua = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3347
+ }, ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3351
3348
  __proto__: null,
3352
3349
  autoSchedule: Rr,
3353
- levelResources: Yn
3354
- }, Symbol.toStringTag, { value: "Module" })), _n = (e) => {
3350
+ levelResources: Cn
3351
+ }, Symbol.toStringTag, { value: "Module" })), Yn = (e) => {
3355
3352
  const a = /* @__PURE__ */ new Map();
3356
3353
  return e.forEach((n) => {
3357
3354
  a.set(n.id, {
@@ -3396,7 +3393,7 @@ Example: 3FS+10d`);
3396
3393
  ].join(`
3397
3394
  `);
3398
3395
  It(s, "gantt-tasks.xls", "application/vnd.ms-excel");
3399
- }, Or = (e, a) => {
3396
+ }, kr = (e, a) => {
3400
3397
  const n = {
3401
3398
  tasks: e,
3402
3399
  links: a,
@@ -3404,7 +3401,7 @@ Example: 3FS+10d`);
3404
3401
  version: "1.0"
3405
3402
  }, s = JSON.stringify(n, null, 2);
3406
3403
  It(s, "gantt-project.json", "application/json");
3407
- }, kr = (e) => {
3404
+ }, Or = (e) => {
3408
3405
  const a = `
3409
3406
  GANTT CHART PROJECT
3410
3407
  Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
@@ -3421,7 +3418,7 @@ ${s + 1}. ${n.text}
3421
3418
  `)}
3422
3419
  `.trim();
3423
3420
  It(a, "gantt-report.txt", "text/plain"), alert("PDF export is a simplified text version. For full PDF with charts, a PDF library would be needed.");
3424
- }, An = (e, a, n = "png") => {
3421
+ }, _n = (e, a, n = "png") => {
3425
3422
  if (!document.getElementById(e)) {
3426
3423
  alert("Could not find Gantt chart element to export");
3427
3424
  return;
@@ -3433,11 +3430,11 @@ ${s + 1}. ${n.text}
3433
3430
  alert("Image export requires html2canvas library. Install with: npm install html2canvas");
3434
3431
  }, It = (e, a, n) => {
3435
3432
  const s = new Blob([e], { type: n }), r = URL.createObjectURL(s);
3436
- In(r, a), URL.revokeObjectURL(r);
3437
- }, In = (e, a) => {
3433
+ An(r, a), URL.revokeObjectURL(r);
3434
+ }, An = (e, a) => {
3438
3435
  const n = document.createElement("a");
3439
3436
  n.href = e, n.download = a, document.body.appendChild(n), n.click(), document.body.removeChild(n);
3440
- }, zn = (e) => new Promise((a, n) => {
3437
+ }, In = (e) => new Promise((a, n) => {
3441
3438
  const s = new FileReader();
3442
3439
  s.onload = (r) => {
3443
3440
  try {
@@ -3451,15 +3448,15 @@ ${s + 1}. ${n.text}
3451
3448
  n(new Error("Invalid JSON file"));
3452
3449
  }
3453
3450
  }, s.onerror = () => n(new Error("Failed to read file")), s.readAsText(e);
3454
- }), pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3451
+ }), ua = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3455
3452
  __proto__: null,
3456
3453
  exportToCSV: Pr,
3457
3454
  exportToExcel: Nr,
3458
- exportToImage: An,
3459
- exportToJSON: Or,
3460
- exportToPDF: kr,
3461
- importFromJSON: zn
3462
- }, Symbol.toStringTag, { value: "Module" })), Bn = (e, a) => e.filter((n) => {
3455
+ exportToImage: _n,
3456
+ exportToJSON: kr,
3457
+ exportToPDF: Or,
3458
+ importFromJSON: In
3459
+ }, Symbol.toStringTag, { value: "Module" })), zn = (e, a) => e.filter((n) => {
3463
3460
  if (a.searchText) {
3464
3461
  const s = a.searchText.toLowerCase(), r = n.text.toLowerCase().includes(s), c = n.owner?.toLowerCase().includes(s), b = n.details?.toLowerCase().includes(s);
3465
3462
  if (!r && !c && !b)
@@ -3473,7 +3470,7 @@ ${s + 1}. ${n.text}
3473
3470
  return !1;
3474
3471
  }
3475
3472
  return !0;
3476
- }), $r = 1440 * 60 * 1e3, Ue = (e, a) => {
3473
+ }), $r = 1440 * 60 * 1e3, Ve = (e, a) => {
3477
3474
  if (e instanceof Date) {
3478
3475
  const n = new Date(e.getTime());
3479
3476
  return Number.isNaN(n.getTime()) ? new Date(a.getTime()) : n;
@@ -3495,7 +3492,7 @@ ${s + 1}. ${n.text}
3495
3492
  return n;
3496
3493
  }
3497
3494
  return [];
3498
- }, Hn = (e) => {
3495
+ }, Bn = (e) => {
3499
3496
  if (Array.isArray(e)) {
3500
3497
  const a = e.map((n) => String(n).trim()).filter(Boolean);
3501
3498
  return a.length > 0 ? a : void 0;
@@ -3504,7 +3501,7 @@ ${s + 1}. ${n.text}
3504
3501
  const a = e.split(/[|,]/).map((n) => n.trim()).filter(Boolean);
3505
3502
  return a.length > 0 ? a : void 0;
3506
3503
  }
3507
- }, Wn = (e) => {
3504
+ }, Hn = (e) => {
3508
3505
  if (Array.isArray(e)) {
3509
3506
  const a = e.map((n) => String(n).trim()).filter(Boolean);
3510
3507
  return a.length > 0 ? a : void 0;
@@ -3513,37 +3510,37 @@ ${s + 1}. ${n.text}
3513
3510
  const a = e.split(/\r?\n|\|/).map((n) => n.trim()).filter(Boolean);
3514
3511
  return a.length > 0 ? a : void 0;
3515
3512
  }
3516
- }, Vn = (e, a, n) => {
3513
+ }, Wn = (e, a, n) => {
3517
3514
  const s = Cr(e);
3518
3515
  if (s.length === 0) return;
3519
3516
  const r = a.getTime(), c = n.getTime();
3520
3517
  return s.map((b) => {
3521
- const u = Ue(b?.start, a), d = Ue(b?.end, n), p = Math.max(u.getTime(), r), h = Math.min(d.getTime(), c);
3518
+ const u = Ve(b?.start, a), d = Ve(b?.end, n), h = Math.max(u.getTime(), r), p = Math.min(d.getTime(), c);
3522
3519
  return {
3523
- start: new Date(p),
3524
- end: new Date(h)
3520
+ start: new Date(h),
3521
+ end: new Date(p)
3525
3522
  };
3526
3523
  }).filter((b) => b.end.getTime() > b.start.getTime());
3527
- }, Xn = (e, a, n) => {
3524
+ }, Vn = (e, a, n) => {
3528
3525
  if (Array.isArray(e))
3529
3526
  return e.map((s) => {
3530
- const r = Ue(s?.start, a), c = Ue(s?.end, n), b = c.getTime() < r.getTime() ? r : c, u = Math.max(Math.ceil((b.getTime() - r.getTime()) / $r), 0);
3527
+ const r = Ve(s?.start, a), c = Ve(s?.end, n), b = c.getTime() < r.getTime() ? r : c, u = Math.max(Math.ceil((b.getTime() - r.getTime()) / $r), 0);
3531
3528
  return {
3532
3529
  start: r,
3533
3530
  end: b,
3534
3531
  duration: nr(s?.duration, u)
3535
3532
  };
3536
3533
  }).filter((s) => s.end.getTime() >= s.start.getTime());
3537
- }, Un = (e) => {
3538
- const a = /* @__PURE__ */ new Date(), n = Ue(
3534
+ }, Xn = (e) => {
3535
+ const a = /* @__PURE__ */ new Date(), n = Ve(
3539
3536
  e.start ?? e.startDate ?? e.start_date ?? e.plannedStartDate,
3540
3537
  a
3541
- ), s = Ue(
3538
+ ), s = Ve(
3542
3539
  e.end ?? e.endDate ?? e.end_date ?? e.plannedEndDate,
3543
3540
  n
3544
- ), r = s.getTime() < n.getTime() ? n : s, c = Ue(e.plannedStart ?? e.planned_start ?? e.planned_start_date, n), b = Ue(e.plannedEnd ?? e.planned_end ?? e.planned_end_date, r), u = b.getTime() < c.getTime() ? c : b, d = Ue(e.actualStart ?? e.actual_start ?? e.actual_start_date, n), p = Ue(e.actualEnd ?? e.actual_end ?? e.actual_end_date, r), h = p.getTime() < d.getTime() ? d : p, v = Math.max(Math.ceil((r.getTime() - n.getTime()) / $r), 0), g = Hn(e.dependencies ?? e.dependsOn ?? e.depends_on), m = Wn(
3541
+ ), r = s.getTime() < n.getTime() ? n : s, c = Ve(e.plannedStart ?? e.planned_start ?? e.planned_start_date, n), b = Ve(e.plannedEnd ?? e.planned_end ?? e.planned_end_date, r), u = b.getTime() < c.getTime() ? c : b, d = Ve(e.actualStart ?? e.actual_start ?? e.actual_start_date, n), h = Ve(e.actualEnd ?? e.actual_end ?? e.actual_end_date, r), p = h.getTime() < d.getTime() ? d : h, S = Math.max(Math.ceil((r.getTime() - n.getTime()) / $r), 0), y = Bn(e.dependencies ?? e.dependsOn ?? e.depends_on), m = Hn(
3545
3542
  e.dependencyRule ?? e.dependency_rule ?? e.dependencyRuleDescription ?? e.dependency_rule_description
3546
- ), E = Vn(
3543
+ ), E = Wn(
3547
3544
  Yr(
3548
3545
  e.onHoldPeriods,
3549
3546
  e.on_hold_periods,
@@ -3565,8 +3562,8 @@ ${s + 1}. ${n.text}
3565
3562
  plannedStart: c,
3566
3563
  plannedEnd: u,
3567
3564
  actualStart: d,
3568
- actualEnd: h,
3569
- duration: nr(e.duration, v),
3565
+ actualEnd: p,
3566
+ duration: nr(e.duration, S),
3570
3567
  progress: Math.max(0, Math.min(100, nr(e.progress ?? e.progressPercentage ?? e.progress_percentage, 0))),
3571
3568
  type: e.type,
3572
3569
  parent: e.parent !== void 0 && e.parent !== null && String(e.parent).length > 0 ? String(e.parent) : void 0,
@@ -3577,14 +3574,14 @@ ${s + 1}. ${n.text}
3577
3574
  priority: e.priority,
3578
3575
  status: e.status ?? e.currentStatus ?? e.current_status,
3579
3576
  onHoldPeriods: E,
3580
- dependencies: g,
3577
+ dependencies: y,
3581
3578
  dependencyRule: m,
3582
- segments: Xn(e.segments, n, r),
3579
+ segments: Vn(e.segments, n, r),
3583
3580
  sequence_id: e.sequence_id,
3584
3581
  stage_id: e.stage_id,
3585
3582
  tooltipConfig: e.tooltipConfig
3586
3583
  };
3587
- }, qn = (e) => Array.isArray(e) ? e.map(Un) : [], gr = (e) => {
3584
+ }, Un = (e) => Array.isArray(e) ? e.map(Xn) : [], gr = (e) => {
3588
3585
  if (e.length === 0) return [];
3589
3586
  const a = [...e].filter((s) => s.end.getTime() > s.start.getTime()).sort((s, r) => s.start.getTime() - r.start.getTime());
3590
3587
  if (a.length === 0) return [];
@@ -3594,14 +3591,14 @@ ${s + 1}. ${n.text}
3594
3591
  r.start.getTime() <= c.end.getTime() ? c.end = new Date(Math.max(c.end.getTime(), r.end.getTime())) : n.push({ ...r });
3595
3592
  }
3596
3593
  return n;
3597
- }, Gn = (e, a, n) => n.filter((s) => a > s.start.getTime() && e < s.end.getTime()).map((s) => ({
3594
+ }, qn = (e, a, n) => n.filter((s) => a > s.start.getTime() && e < s.end.getTime()).map((s) => ({
3598
3595
  start: new Date(s.start.getTime()),
3599
3596
  end: new Date(s.end.getTime())
3600
- })), Jn = (e, a) => {
3597
+ })), Gn = (e, a) => {
3601
3598
  if (a.length === 0) return e;
3602
3599
  const n = gr(a);
3603
3600
  return e.map((s) => {
3604
- const r = s.start.getTime(), c = s.end.getTime(), b = Gn(r, c, n);
3601
+ const r = s.start.getTime(), c = s.end.getTime(), b = qn(r, c, n);
3605
3602
  if (b.length === 0)
3606
3603
  return s;
3607
3604
  const u = s.onHoldPeriods || [], d = gr([...u, ...b]);
@@ -3610,13 +3607,13 @@ ${s + 1}. ${n.text}
3610
3607
  onHoldPeriods: d
3611
3608
  };
3612
3609
  });
3613
- }, Kn = (e) => [
3610
+ }, Jn = (e) => [
3614
3611
  { name: "index", label: "", width: 40, align: "center" },
3615
3612
  { name: "text", label: e?.columnLabels?.name || "Name", width: 250, align: "left", resize: !0 },
3616
3613
  { name: "predecessors", label: e?.columnLabels?.dependsOn || "Depends on", width: 120, align: "left" },
3617
3614
  { name: "duration", label: e?.columnLabels?.duration || "Duration", width: 110, align: "left" },
3618
3615
  { name: "start", label: e?.columnLabels?.start || "Start", width: 130, align: "left" }
3619
- ], Zn = [
3616
+ ], Kn = [
3620
3617
  { unit: "month", step: 1, format: "MMM" },
3621
3618
  { unit: "day", step: 1, format: "D" }
3622
3619
  ], yr = {
@@ -3650,7 +3647,7 @@ ${s + 1}. ${n.text}
3650
3647
  default:
3651
3648
  return s;
3652
3649
  }
3653
- }, Qn = {
3650
+ }, Zn = {
3654
3651
  showTaskName: !0,
3655
3652
  showPlannedDates: !0,
3656
3653
  showActualDates: !0,
@@ -3669,7 +3666,7 @@ ${s + 1}. ${n.text}
3669
3666
  emptyStatusText: "Not set",
3670
3667
  emptyOwnerText: "Not assigned",
3671
3668
  emptyDependencyRuleText: "No dependency rule"
3672
- }, ea = {
3669
+ }, Qn = {
3673
3670
  headerTitle: "Iris Gantt",
3674
3671
  showHeader: !0,
3675
3672
  showAddTaskButton: !0,
@@ -3753,7 +3750,7 @@ ${s + 1}. ${n.text}
3753
3750
  start: "Start"
3754
3751
  },
3755
3752
  taskNameRequired: "Please enter task name"
3756
- }, ha = ({
3753
+ }, pa = ({
3757
3754
  tasks: e = [],
3758
3755
  links: a = [],
3759
3756
  config: n = {},
@@ -3763,89 +3760,89 @@ ${s + 1}. ${n.text}
3763
3760
  taskTooltipConfig: b = {},
3764
3761
  onHoldPeriods: u,
3765
3762
  on_hold_periods: d,
3766
- onHold: p,
3767
- on_hold: h,
3768
- onhold: v,
3769
- onTaskUpdate: g,
3763
+ onHold: h,
3764
+ on_hold: p,
3765
+ onhold: S,
3766
+ onTaskUpdate: y,
3770
3767
  onTaskDragUpdate: m,
3771
3768
  onTaskCreate: E,
3772
3769
  onTaskDelete: F,
3773
3770
  onLinkCreate: N,
3774
3771
  onLinkDelete: M,
3775
- onTimelineViewChange: S,
3772
+ onTimelineViewChange: v,
3776
3773
  baselines: w,
3777
3774
  showMonthHeading: C,
3778
3775
  showRangeHeading: Z,
3779
3776
  relativeDayNumbering: W
3780
3777
  }) => {
3781
- const re = { ...ea, ...s }, le = { ...Qn, ...b }, j = !!(n.timelineView || Array.isArray(n.timelineViews) && n.timelineViews.length > 0 || n.timelineViewScales), U = A.useMemo(() => {
3778
+ const re = { ...Qn, ...s }, le = { ...Zn, ...b }, j = !!(n.timelineView || Array.isArray(n.timelineViews) && n.timelineViews.length > 0 || n.timelineViewScales), X = A.useMemo(() => {
3782
3779
  if (!j) return [];
3783
3780
  const l = Array.isArray(n.timelineViews) && n.timelineViews.length > 0 ? n.timelineViews : xr;
3784
- return Array.from(new Set(l.filter((D) => xr.includes(D))));
3781
+ return Array.from(new Set(l.filter((T) => xr.includes(T))));
3785
3782
  }, [n.timelineViews, j]), R = A.useMemo(
3786
3783
  () => ({
3787
3784
  ...yr,
3788
3785
  ...n.timelineViewScales
3789
3786
  }),
3790
3787
  [n.timelineViewScales]
3791
- ), O = A.useMemo(() => j && n.timelineView && U.includes(n.timelineView) ? n.timelineView : j && U.length > 0 ? U[0] : "day", [n.timelineView, j, U]), [B, Y] = q(O), k = j && U.includes(B) ? B : O, De = j ? R[k] || yr[k] : n.scales || Zn, we = j && re.showTimelineViewSwitcher !== !1 && U.length > 1, V = we ? U.map((l) => ({
3788
+ ), k = A.useMemo(() => j && n.timelineView && X.includes(n.timelineView) ? n.timelineView : j && X.length > 0 ? X[0] : "day", [n.timelineView, j, X]), [B, Y] = J(k), O = j && X.includes(B) ? B : k, De = j ? R[O] || yr[O] : n.scales || Kn, Se = j && re.showTimelineViewSwitcher !== !1 && X.length > 1, V = Se ? X.map((l) => ({
3792
3789
  value: l,
3793
3790
  label: re.timelineViewLabels?.[l] || `${l.charAt(0).toUpperCase()}${l.slice(1)}s`
3794
3791
  })) : [], I = A.useMemo(() => {
3795
3792
  if (n.showTimelineHeader === !1) return 0;
3796
3793
  let l = j ? Math.max(De.length - 1, 0) : 2;
3797
3794
  if ((C === !1 || n.showMonthHeading === !1) && (l = Math.max(0, l - 1)), Z === !1 || n.showRangeHeading === !1) {
3798
- const D = j ? Math.max(0, De.length - 2) : 1;
3799
- l = Math.max(0, l - D);
3795
+ const T = j ? Math.max(0, De.length - 2) : 1;
3796
+ l = Math.max(0, l - T);
3800
3797
  }
3801
3798
  return l + 1;
3802
3799
  }, [n.showTimelineHeader, n.showMonthHeading, C, n.showRangeHeading, Z, j, De.length]), ne = A.useMemo(() => {
3803
3800
  const l = {};
3804
- return r.primary && (l["--wx-gantt-primary"] = r.primary), r.primarySelected && (l["--wx-gantt-primary-selected"] = r.primarySelected), r.success && (l["--wx-gantt-success"] = r.success), r.warning && (l["--wx-gantt-warning"] = r.warning), r.danger && (l["--wx-gantt-danger"] = r.danger), r.background && (l["--wx-gantt-background"] = r.background), r.backgroundAlt && (l["--wx-gantt-background-alt"] = r.backgroundAlt), r.backgroundHover && (l["--wx-gantt-background-hover"] = r.backgroundHover), r.selectColor && (l["--wx-gantt-select-color"] = r.selectColor), r.taskColor && (l["--wx-gantt-task-color"] = r.taskColor), r.taskFillColor && (l["--wx-gantt-task-fill-color"] = r.taskFillColor), r.projectColor && (l["--wx-gantt-project-color"] = r.projectColor), r.milestoneColor && (l["--wx-gantt-milestone-color"] = r.milestoneColor), r.fontColor && (l["--wx-gantt-font-color"] = r.fontColor), r.fontColorAlt && (l["--wx-gantt-font-color-alt"] = r.fontColorAlt), r.iconColor && (l["--wx-gantt-icon-color"] = r.iconColor), r.borderColor && (l["--wx-gantt-border-color"] = r.borderColor), r.fontFamily && (l["--wx-gantt-font-family"] = r.fontFamily), r.fontMono && (l["--wx-gantt-font-mono"] = r.fontMono), r.fontSize && (l["--wx-gantt-font-size"] = r.fontSize), r.fontWeight && (l["--wx-gantt-font-weight"] = String(r.fontWeight)), r.lineHeight && (l["--wx-gantt-line-height"] = String(r.lineHeight)), r.spacingXS && (l["--gantt-spacing-xs"] = r.spacingXS), r.spacingSM && (l["--gantt-spacing-sm"] = r.spacingSM), r.spacingMD && (l["--gantt-spacing-md"] = r.spacingMD), r.spacingLG && (l["--gantt-spacing-lg"] = r.spacingLG), r.customCSSVariables && Object.entries(r.customCSSVariables).forEach(([D, P]) => {
3805
- l[D.startsWith("--") ? D : `--${D}`] = P;
3801
+ return r.primary && (l["--wx-gantt-primary"] = r.primary), r.primarySelected && (l["--wx-gantt-primary-selected"] = r.primarySelected), r.success && (l["--wx-gantt-success"] = r.success), r.warning && (l["--wx-gantt-warning"] = r.warning), r.danger && (l["--wx-gantt-danger"] = r.danger), r.background && (l["--wx-gantt-background"] = r.background), r.backgroundAlt && (l["--wx-gantt-background-alt"] = r.backgroundAlt), r.backgroundHover && (l["--wx-gantt-background-hover"] = r.backgroundHover), r.selectColor && (l["--wx-gantt-select-color"] = r.selectColor), r.taskColor && (l["--wx-gantt-task-color"] = r.taskColor), r.taskFillColor && (l["--wx-gantt-task-fill-color"] = r.taskFillColor), r.projectColor && (l["--wx-gantt-project-color"] = r.projectColor), r.milestoneColor && (l["--wx-gantt-milestone-color"] = r.milestoneColor), r.fontColor && (l["--wx-gantt-font-color"] = r.fontColor), r.fontColorAlt && (l["--wx-gantt-font-color-alt"] = r.fontColorAlt), r.iconColor && (l["--wx-gantt-icon-color"] = r.iconColor), r.borderColor && (l["--wx-gantt-border-color"] = r.borderColor), r.fontFamily && (l["--wx-gantt-font-family"] = r.fontFamily), r.fontMono && (l["--wx-gantt-font-mono"] = r.fontMono), r.fontSize && (l["--wx-gantt-font-size"] = r.fontSize), r.fontWeight && (l["--wx-gantt-font-weight"] = String(r.fontWeight)), r.lineHeight && (l["--wx-gantt-line-height"] = String(r.lineHeight)), r.spacingXS && (l["--gantt-spacing-xs"] = r.spacingXS), r.spacingSM && (l["--gantt-spacing-sm"] = r.spacingSM), r.spacingMD && (l["--gantt-spacing-md"] = r.spacingMD), r.spacingLG && (l["--gantt-spacing-lg"] = r.spacingLG), r.customCSSVariables && Object.entries(r.customCSSVariables).forEach(([T, P]) => {
3802
+ l[T.startsWith("--") ? T : `--${T}`] = P;
3806
3803
  }), l["--gantt-header-rows"] = String(I), l;
3807
3804
  }, [r, I]), de = A.useMemo(() => {
3808
3805
  const l = Yr(
3809
3806
  u,
3810
3807
  d,
3811
- p,
3812
3808
  h,
3813
- v
3809
+ p,
3810
+ S
3814
3811
  );
3815
3812
  if (l.length === 0) return [];
3816
- const D = /* @__PURE__ */ new Date();
3813
+ const T = /* @__PURE__ */ new Date();
3817
3814
  return l.map((P) => ({
3818
- start: Ue(P.start, D),
3819
- end: Ue(P.end, D)
3815
+ start: Ve(P.start, T),
3816
+ end: Ve(P.end, T)
3820
3817
  })).filter((P) => P.end.getTime() > P.start.getTime());
3821
- }, [u, d, p, h, v]), se = A.useMemo(() => {
3822
- const l = qn(e);
3823
- return Jn(l, de);
3818
+ }, [u, d, h, p, S]), se = A.useMemo(() => {
3819
+ const l = Un(e);
3820
+ return Gn(l, de);
3824
3821
  }, [e, de]), ue = Array.isArray(a) ? a : [], {
3825
3822
  tasks: z,
3826
- links: ge,
3823
+ links: ye,
3827
3824
  setTasks: Le,
3828
3825
  setLinks: Ie,
3829
3826
  undo: Ye,
3830
3827
  redo: $,
3831
- updateTask: G,
3832
- createTask: be,
3833
- deleteTask: qe,
3828
+ updateTask: q,
3829
+ createTask: xe,
3830
+ deleteTask: Qe,
3834
3831
  saveState: ce
3835
- } = kn(se, ue), [me, Fe] = q(z), [ze, Se] = q(null), [Qe, _e] = q(null), [pt, We] = q(!1), [at, i] = q(void 0), [y, T] = q(void 0), [f, X] = q(!1), [Q, J] = q(null), [pe, Ce] = q(null), [ie, Xe] = q(null), [Ge, ot] = q(null), [Pe, ht] = q(null), [xt, Ot] = q(1), [Je, st] = q(() => w && w.size > 0 ? w : se.length > 0 ? _n(se) : /* @__PURE__ */ new Map());
3836
- ct(() => {
3837
- w && w.size > 0 && st(w);
3838
- }, [w]), ct(() => {
3839
- j && Y(O);
3840
- }, [j, O]);
3841
- const [wt] = q(n.theme || "light"), [Tt, zt] = q({
3832
+ } = kn(se, ue), [me, Fe] = J(z), [pe, et] = J(null), [_e, Xe] = J(null), [Ue, ot] = J(!1), [i, g] = J(void 0), [D, f] = J(void 0), [U, G] = J(!1), [ee, ie] = J(null), [$e, ze] = J(null), [ge, tt] = J(null), [Ke, st] = J(null), [Ce, ht] = J(null), [xt, kt] = J(1), [qe, it] = J(() => w && w.size > 0 ? w : se.length > 0 ? Yn(se) : /* @__PURE__ */ new Map());
3833
+ ut(() => {
3834
+ w && w.size > 0 && it(w);
3835
+ }, [w]), ut(() => {
3836
+ j && Y(k);
3837
+ }, [j, k]);
3838
+ const [wt] = J(n.theme || "light"), [Tt, zt] = J({
3842
3839
  searchText: "",
3843
3840
  status: "all",
3844
3841
  priority: "all",
3845
3842
  owner: ""
3846
- }), Dt = ft(null), Mt = ft(null), kt = ft(null), Et = ft(null), it = ft(null), $t = ft(null), Ae = {
3843
+ }), Dt = ft(null), Mt = ft(null), Ot = ft(null), Et = ft(null), lt = ft(null), $t = ft(null), Ae = {
3847
3844
  ...{
3848
- columns: n.columns || Kn(s),
3845
+ columns: n.columns || Jn(s),
3849
3846
  readonly: !1,
3850
3847
  editable: !0,
3851
3848
  taskHeight: 28,
@@ -3905,8 +3902,8 @@ ${s + 1}. ${n.text}
3905
3902
  },
3906
3903
  ...n,
3907
3904
  scales: De,
3908
- timelineView: j ? k : n.timelineView,
3909
- timelineViews: j ? U : n.timelineViews,
3905
+ timelineView: j ? O : n.timelineView,
3906
+ timelineViews: j ? X : n.timelineViews,
3910
3907
  timelineViewScales: j ? R : n.timelineViewScales,
3911
3908
  // IMPORTANT: Re-apply baselines after spread so undefined from config doesn't override the default.
3912
3909
  // baselines should always be true unless the user explicitly passes false.
@@ -3915,8 +3912,8 @@ ${s + 1}. ${n.text}
3915
3912
  showRangeHeading: Z !== void 0 ? Z : n.showRangeHeading,
3916
3913
  relativeDayNumbering: W !== void 0 ? W : n.relativeDayNumbering
3917
3914
  };
3918
- ct(() => {
3919
- const l = Bn(z, Tt);
3915
+ ut(() => {
3916
+ const l = zn(z, Tt);
3920
3917
  Fe(((P) => {
3921
3918
  const H = [], ae = (fe) => {
3922
3919
  if (!fe) return !1;
@@ -3936,74 +3933,74 @@ ${s + 1}. ${n.text}
3936
3933
  return console.warn("Error extracting owners:", l), [];
3937
3934
  }
3938
3935
  }, [z]), Wt = (() => {
3939
- const l = De[De.length - 1] || De[0], D = me.length > 0 ? me : z;
3940
- if (D.length === 0) {
3936
+ const l = De[De.length - 1] || De[0], T = me.length > 0 ? me : z;
3937
+ if (T.length === 0) {
3941
3938
  const ve = /* @__PURE__ */ new Date();
3942
3939
  return {
3943
3940
  start: _t(Te(ve, -30, "day"), l, "start"),
3944
3941
  end: _t(Te(ve, 60, "day"), l, "end")
3945
3942
  };
3946
3943
  }
3947
- const P = D.map((ve) => ve.start.getTime()), H = D.map((ve) => ve.end.getTime()), ae = new Date(Math.min(...P)), fe = new Date(Math.max(...H));
3944
+ const P = T.map((ve) => ve.start.getTime()), H = T.map((ve) => ve.end.getTime()), ae = new Date(Math.min(...P)), fe = new Date(Math.max(...H));
3948
3945
  return {
3949
3946
  start: _t(Te(ae, -7, "day"), l, "start"),
3950
3947
  end: _t(fe, l, "end")
3951
3948
  };
3952
3949
  })(), Vt = (l) => {
3953
- !U.includes(l) || l === k || (Y(l), S?.(l));
3950
+ !X.includes(l) || l === O || (Y(l), v?.(l));
3954
3951
  }, o = (l) => {
3955
- Se(l);
3956
- }, x = (l, D) => {
3952
+ et(l);
3953
+ }, x = (l, T) => {
3957
3954
  if (Ae.readonly) return;
3958
3955
  l.preventDefault();
3959
- const P = z.find((H) => H.id === D);
3956
+ const P = z.find((H) => H.id === T);
3960
3957
  P && ht({ x: l.clientX, y: l.clientY, task: P });
3961
3958
  }, L = () => {
3962
- if (!Pe?.task) return;
3963
- const l = Pe.task, D = {
3959
+ if (!Ce?.task) return;
3960
+ const l = Ce.task, T = {
3964
3961
  ...l,
3965
3962
  id: `task-${Date.now()}`,
3966
3963
  text: `${l.text} (Copy)`,
3967
3964
  start: Te(l.start, 7, "day"),
3968
3965
  end: Te(l.end, 7, "day")
3969
3966
  };
3970
- be(D), E && E(D);
3967
+ xe(T), E && E(T);
3971
3968
  }, _ = (l) => {
3972
- if (!Pe?.task) return;
3973
- const D = { ...Pe.task, type: l };
3974
- G(D), g && g(D);
3975
- }, te = A.useCallback((l, D) => {
3969
+ if (!Ce?.task) return;
3970
+ const T = { ...Ce.task, type: l };
3971
+ q(T), y && y(T);
3972
+ }, te = A.useCallback((l, T) => {
3976
3973
  let P = [];
3977
- return D.filter((ae) => ae.parent === l).forEach((ae) => {
3978
- P.push(ae.id), P = [...P, ...te(ae.id, D)];
3974
+ return T.filter((ae) => ae.parent === l).forEach((ae) => {
3975
+ P.push(ae.id), P = [...P, ...te(ae.id, T)];
3979
3976
  }), P;
3980
- }, []), oe = (l, D) => (l ?? null) === (D ?? null), ee = (l, D, P, H) => {
3977
+ }, []), oe = (l, T) => (l ?? null) === (T ?? null), Q = (l, T, P, H) => {
3981
3978
  if (!Ae.readonly)
3982
3979
  if (H === "reorder") {
3983
3980
  const ae = me.findIndex((ve) => ve.id === l), fe = te(l, z);
3984
- Xe({ id: l, initialIndex: ae, currentX: D, currentY: P, descendantIds: fe }), document.body.classList.add("gantt-dragging");
3981
+ tt({ id: l, initialIndex: ae, currentX: T, currentY: P, descendantIds: fe }), document.body.classList.add("gantt-dragging");
3985
3982
  } else
3986
- Ce(l);
3983
+ ze(l);
3987
3984
  }, K = () => {
3988
- if (ie && Ge) {
3989
- const l = z.find((P) => P.id === ie.id), D = z.find((P) => P.id === Ge.taskId);
3990
- if (l && D && l.id !== D.id) {
3991
- const P = [l.id, ...ie.descendantIds];
3992
- if (!P.includes(D.id)) {
3993
- const H = [...z], ae = (Ge.position === "inside" ? D.id : D.parent) ?? void 0, fe = H.findIndex((he) => he.id === l.id);
3985
+ if (ge && Ke) {
3986
+ const l = z.find((P) => P.id === ge.id), T = z.find((P) => P.id === Ke.taskId);
3987
+ if (l && T && l.id !== T.id) {
3988
+ const P = [l.id, ...ge.descendantIds];
3989
+ if (!P.includes(T.id)) {
3990
+ const H = [...z], ae = (Ke.position === "inside" ? T.id : T.parent) ?? void 0, fe = H.findIndex((he) => he.id === l.id);
3994
3991
  fe !== -1 && (H[fe] = { ...H[fe], parent: ae });
3995
3992
  const ve = H.filter((he) => P.includes(he.id)), Me = H.filter((he) => !P.includes(he.id));
3996
- let He = Me.findIndex((he) => he.id === D.id);
3997
- if (Ge.position === "inside") {
3998
- const he = [D.id, ...te(D.id, Me)], Gt = he[he.length - 1];
3993
+ let He = Me.findIndex((he) => he.id === T.id);
3994
+ if (Ke.position === "inside") {
3995
+ const he = [T.id, ...te(T.id, Me)], Gt = he[he.length - 1];
3999
3996
  He = Me.findIndex((Ar) => Ar.id === Gt) + 1;
4000
- } else if (Ge.position === "below") {
4001
- const he = te(D.id, Me);
3997
+ } else if (Ke.position === "below") {
3998
+ const he = te(T.id, Me);
4002
3999
  he.length > 0 ? He = Me.findIndex((Gt) => Gt.id === he[he.length - 1]) + 1 : He++;
4003
4000
  }
4004
4001
  He < 0 && (He = Me.length);
4005
- const Lt = { tasks: [...z], links: [...ge] };
4006
- Me.splice(He, 0, ...ve), Le(Me), ce("task_update", Lt, { tasks: Me, links: ge });
4002
+ const Lt = { tasks: [...z], links: [...ye] };
4003
+ Me.splice(He, 0, ...ve), Le(Me), ce("task_update", Lt, { tasks: Me, links: ye });
4007
4004
  const mt = z.filter((he) => oe(he.parent, l.parent)).findIndex((he) => he.id === l.id) + 1, sr = Me.filter((he) => oe(he.parent, ae)).findIndex((he) => he.id === l.id) + 1, ir = {
4008
4005
  currentSequenceId: mt,
4009
4006
  targetSequenceId: sr,
@@ -4015,7 +4012,7 @@ ${s + 1}. ${n.text}
4015
4012
  sequence_id: sr,
4016
4013
  stage_id: ae ?? null
4017
4014
  };
4018
- g && g(he, ir), m && m({
4015
+ y && y(he, ir), m && m({
4019
4016
  task: he,
4020
4017
  previousTask: l,
4021
4018
  dragType: "reorder",
@@ -4025,14 +4022,14 @@ ${s + 1}. ${n.text}
4025
4022
  }
4026
4023
  }
4027
4024
  }
4028
- Ce(null), Xe(null), ot(null), document.body.classList.remove("gantt-dragging");
4029
- }, Re = ft(null), ye = A.useCallback((l) => {
4030
- if (ie) {
4031
- const { clientX: D, clientY: P } = l;
4025
+ ze(null), tt(null), st(null), document.body.classList.remove("gantt-dragging");
4026
+ }, Re = ft(null), we = A.useCallback((l) => {
4027
+ if (ge) {
4028
+ const { clientX: T, clientY: P } = l;
4032
4029
  Re.current && cancelAnimationFrame(Re.current), Re.current = requestAnimationFrame(() => {
4033
4030
  const H = Ae.rowHeight || 48, ae = Mt.current?.querySelector(".gantt-grid-body");
4034
4031
  if (!ae || me.length === 0) {
4035
- ot(null);
4032
+ st(null);
4036
4033
  return;
4037
4034
  }
4038
4035
  const fe = ae.getBoundingClientRect(), ve = P - fe.top + ae.scrollTop;
@@ -4040,27 +4037,27 @@ ${s + 1}. ${n.text}
4040
4037
  Me = Math.max(0, Math.min(Me, me.length - 1));
4041
4038
  const He = me[Me];
4042
4039
  if (He) {
4043
- if (He.id === ie.id || ie.descendantIds.includes(He.id)) {
4044
- ot(null), Xe((qt) => qt ? { ...qt, currentX: D, currentY: P } : null);
4040
+ if (He.id === ge.id || ge.descendantIds.includes(He.id)) {
4041
+ st(null), tt((qt) => qt ? { ...qt, currentX: T, currentY: P } : null);
4045
4042
  return;
4046
4043
  }
4047
4044
  const Ct = ve - Me * H;
4048
4045
  let mt = "above";
4049
- He.type !== "milestone" ? Ct < H * 0.3 ? mt = "above" : Ct > H * 0.7 ? mt = "below" : mt = "inside" : mt = Ct < H / 2 ? "above" : "below", ot({ taskId: He.id, position: mt });
4046
+ He.type !== "milestone" ? Ct < H * 0.3 ? mt = "above" : Ct > H * 0.7 ? mt = "below" : mt = "inside" : mt = Ct < H / 2 ? "above" : "below", st({ taskId: He.id, position: mt });
4050
4047
  }
4051
- Xe((Lt) => Lt ? { ...Lt, currentX: D, currentY: P } : null);
4048
+ tt((Lt) => Lt ? { ...Lt, currentX: T, currentY: P } : null);
4052
4049
  });
4053
4050
  }
4054
- }, [ie, me, Ae.rowHeight]), xe = () => {
4055
- ie && K();
4056
- }, Be = (l, D) => {
4051
+ }, [ge, me, Ae.rowHeight]), be = () => {
4052
+ ge && K();
4053
+ }, Be = (l, T) => {
4057
4054
  const P = {
4058
4055
  ...l,
4059
4056
  id: `task-${Date.now()}`,
4060
- parent: D
4057
+ parent: T
4061
4058
  // Set parent if provided (for subtasks)
4062
4059
  };
4063
- be(P);
4060
+ xe(P);
4064
4061
  const H = {
4065
4062
  taskId: P.id,
4066
4063
  start: new Date(P.start),
@@ -4068,61 +4065,61 @@ ${s + 1}. ${n.text}
4068
4065
  end: new Date(P.end)
4069
4066
  // Capture original end date
4070
4067
  };
4071
- st((ae) => {
4068
+ it((ae) => {
4072
4069
  const fe = new Map(ae);
4073
4070
  return fe.set(P.id, H), fe;
4074
4071
  }), E && E(P);
4075
- }, Ke = (l) => {
4076
- G(l), g && g(l);
4077
- }, et = (l) => {
4078
- qe(l), st((D) => {
4079
- const P = new Map(D);
4072
+ }, Ge = (l) => {
4073
+ q(l), y && y(l);
4074
+ }, Ze = (l) => {
4075
+ Qe(l), it((T) => {
4076
+ const P = new Map(T);
4080
4077
  return P.delete(l), P;
4081
4078
  }), F && F(l);
4082
- }, Oe = (l, D, P, H) => {
4083
- const ae = { id: `link-${Date.now()}`, source: l, target: D, type: P, lag: H };
4084
- Ie([...ge, ae]), N && N(ae);
4079
+ }, Ne = (l, T, P, H) => {
4080
+ const ae = { id: `link-${Date.now()}`, source: l, target: T, type: P, lag: H };
4081
+ Ie([...ye, ae]), N && N(ae);
4085
4082
  }, bt = (l) => {
4086
- const D = ge.filter((P) => P.id !== l);
4087
- Ie(D), M && M(l);
4083
+ const T = ye.filter((P) => P.id !== l);
4084
+ Ie(T), M && M(l);
4088
4085
  };
4089
- ct(() => {
4086
+ ut(() => {
4090
4087
  if (w && w.size > 0)
4091
4088
  return;
4092
- const l = new Map(Je);
4093
- let D = !1;
4089
+ const l = new Map(qe);
4090
+ let T = !1;
4094
4091
  z.forEach((H) => {
4095
- Je.has(H.id) || (l.set(H.id, {
4092
+ qe.has(H.id) || (l.set(H.id, {
4096
4093
  taskId: H.id,
4097
4094
  start: new Date(H.plannedStart ?? H.start),
4098
4095
  // Use planned dates if available
4099
4096
  end: new Date(H.plannedEnd ?? H.end)
4100
4097
  // Use planned dates if available
4101
- }), D = !0);
4098
+ }), T = !0);
4102
4099
  });
4103
4100
  const P = new Set(z.map((H) => H.id));
4104
- Je.forEach((H, ae) => {
4105
- P.has(ae) || (l.delete(ae), D = !0);
4106
- }), D && st(l);
4107
- }, [z, w]), ct(() => {
4108
- const l = (D) => {
4109
- (D.ctrlKey || D.metaKey) && (D.key === "z" && !D.shiftKey ? (D.preventDefault(), Ye()) : (D.key === "y" || D.key === "z" && D.shiftKey) && (D.preventDefault(), $()));
4101
+ qe.forEach((H, ae) => {
4102
+ P.has(ae) || (l.delete(ae), T = !0);
4103
+ }), T && it(l);
4104
+ }, [z, w]), ut(() => {
4105
+ const l = (T) => {
4106
+ (T.ctrlKey || T.metaKey) && (T.key === "z" && !T.shiftKey ? (T.preventDefault(), Ye()) : (T.key === "y" || T.key === "z" && T.shiftKey) && (T.preventDefault(), $()));
4110
4107
  };
4111
4108
  return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
4112
- }, [Ye, $]), ct(() => {
4113
- const l = Mt.current?.querySelector(".gantt-grid-body"), D = Dt.current?.querySelector(".gantt-timeline-body");
4114
- if (!l || !D) return;
4109
+ }, [Ye, $]), ut(() => {
4110
+ const l = Mt.current?.querySelector(".gantt-grid-body"), T = Dt.current?.querySelector(".gantt-timeline-body");
4111
+ if (!l || !T) return;
4115
4112
  const P = () => {
4116
- it.current !== "timeline" && (it.current = "grid", D.scrollTop = l.scrollTop, requestAnimationFrame(() => {
4117
- it.current = null;
4113
+ lt.current !== "timeline" && (lt.current = "grid", T.scrollTop = l.scrollTop, requestAnimationFrame(() => {
4114
+ lt.current = null;
4118
4115
  }));
4119
4116
  }, H = () => {
4120
- it.current !== "grid" && (it.current = "timeline", l.scrollTop = D.scrollTop, requestAnimationFrame(() => {
4121
- it.current = null;
4117
+ lt.current !== "grid" && (lt.current = "timeline", l.scrollTop = T.scrollTop, requestAnimationFrame(() => {
4118
+ lt.current = null;
4122
4119
  }));
4123
4120
  };
4124
- return l.addEventListener("scroll", P, { passive: !0 }), D.addEventListener("scroll", H, { passive: !0 }), () => {
4125
- l.removeEventListener("scroll", P), D.removeEventListener("scroll", H), $t.current && clearTimeout($t.current);
4121
+ return l.addEventListener("scroll", P, { passive: !0 }), T.addEventListener("scroll", H, { passive: !0 }), () => {
4122
+ l.removeEventListener("scroll", P), T.removeEventListener("scroll", H), $t.current && clearTimeout($t.current);
4126
4123
  };
4127
4124
  }, [me]);
4128
4125
  const Xt = {
@@ -4147,61 +4144,61 @@ ${s + 1}. ${n.text}
4147
4144
  style: { ..._r, ...Ut },
4148
4145
  children: [
4149
4146
  /* @__PURE__ */ t.jsx(
4150
- Dn,
4147
+ Tn,
4151
4148
  {
4152
4149
  zoomLevel: xt,
4153
- setZoomLevel: Ot,
4154
- timelineView: we ? k : void 0,
4150
+ setZoomLevel: kt,
4151
+ timelineView: Se ? O : void 0,
4155
4152
  timelineViewOptions: V,
4156
- onTimelineViewChange: we ? Vt : void 0,
4153
+ onTimelineViewChange: Se ? Vt : void 0,
4157
4154
  onExport: (l) => {
4158
- l === "csv" && Pr(z), l === "excel" && Nr(z), l === "json" && Or(z, ge), l === "pdf" && kr(z);
4155
+ l === "csv" && Pr(z), l === "excel" && Nr(z), l === "json" && kr(z, ye), l === "pdf" && Or(z);
4159
4156
  },
4160
4157
  onFilterChange: (l) => zt(l),
4161
4158
  owners: Ht || [],
4162
4159
  onAddTask: (l) => {
4163
4160
  if (l) {
4164
- const D = z.find((P) => P.id === l);
4165
- i(l), T(D?.text);
4161
+ const T = z.find((P) => P.id === l);
4162
+ g(l), f(T?.text);
4166
4163
  } else
4167
- i(void 0), T(void 0);
4168
- We(!0);
4164
+ g(void 0), f(void 0);
4165
+ ot(!0);
4169
4166
  },
4170
4167
  uiConfig: re,
4171
4168
  iconConfig: c,
4172
4169
  styleConfig: r
4173
4170
  }
4174
4171
  ),
4175
- /* @__PURE__ */ t.jsxs("div", { className: "gantt-layout", ref: kt, onMouseMove: ye, onMouseUp: xe, onMouseLeave: xe, children: [
4172
+ /* @__PURE__ */ t.jsxs("div", { className: "gantt-layout", ref: Ot, onMouseMove: we, onMouseUp: be, onMouseLeave: be, children: [
4176
4173
  /* @__PURE__ */ t.jsx(
4177
4174
  Er,
4178
4175
  {
4179
4176
  ref: Mt,
4180
4177
  tasks: me,
4181
4178
  columns: Ae.columns || [],
4182
- selectedTask: ze,
4179
+ selectedTask: pe,
4183
4180
  onTaskClick: o,
4184
4181
  onTaskContextMenu: x,
4185
- onTaskUpdate: Ke,
4186
- onTaskDragStart: ee,
4182
+ onTaskUpdate: Ge,
4183
+ onTaskDragStart: Q,
4187
4184
  onAddTask: (l) => {
4188
4185
  if (l) {
4189
- const D = z.find((P) => P.id === l);
4190
- i(l), T(D?.text);
4186
+ const T = z.find((P) => P.id === l);
4187
+ g(l), f(T?.text);
4191
4188
  } else
4192
- i(void 0), T(void 0);
4193
- We(!0);
4189
+ g(void 0), f(void 0);
4190
+ ot(!0);
4194
4191
  },
4195
- onAddDependency: Oe,
4192
+ onAddDependency: Ne,
4196
4193
  onRemoveDependency: bt,
4197
4194
  onDependencyClick: (l) => {
4198
- const D = z.find((P) => P.id === l);
4199
- D && (J(D), X(!0));
4195
+ const T = z.find((P) => P.id === l);
4196
+ T && (ie(T), G(!0));
4200
4197
  },
4201
- links: ge,
4198
+ links: ye,
4202
4199
  allTasks: z,
4203
- dropIndicator: Ge,
4204
- reorderTask: ie,
4200
+ dropIndicator: Ke,
4201
+ reorderTask: ge,
4205
4202
  iconConfig: c,
4206
4203
  styleConfig: r,
4207
4204
  headerHeight: (Ae.scaleHeight || 28) * I
@@ -4212,90 +4209,90 @@ ${s + 1}. ${n.text}
4212
4209
  {
4213
4210
  ref: Dt,
4214
4211
  tasks: me,
4215
- links: ge,
4212
+ links: ye,
4216
4213
  range: Wt,
4217
4214
  scales: Ae.scales,
4218
4215
  config: Ae,
4219
- selectedTask: ze,
4220
- draggedTask: pe,
4216
+ selectedTask: pe,
4217
+ draggedTask: $e,
4221
4218
  onTaskClick: () => {
4222
4219
  },
4223
4220
  onTaskDragStart: () => {
4224
4221
  },
4225
4222
  onTaskDragEnd: () => {
4226
4223
  },
4227
- onTaskUpdate: (l, D, P) => {
4224
+ onTaskUpdate: (l, T, P) => {
4228
4225
  const H = z.find((ve) => ve.id === l);
4229
4226
  if (!H) return;
4230
- const ae = { ...H }, fe = { ...H, ...D };
4231
- Ke(fe), P && m && m({
4227
+ const ae = { ...H }, fe = { ...H, ...T };
4228
+ Ge(fe), P && m && m({
4232
4229
  task: fe,
4233
4230
  previousTask: ae,
4234
4231
  dragType: P.dragType
4235
4232
  });
4236
4233
  },
4237
4234
  zoomLevel: xt,
4238
- baselines: Je,
4235
+ baselines: qe,
4239
4236
  taskTooltipConfig: le,
4240
4237
  headerHeight: (Ae.scaleHeight || 28) * I
4241
4238
  }
4242
4239
  )
4243
4240
  ] }),
4244
- pt && /* @__PURE__ */ t.jsx(
4245
- En,
4241
+ Ue && /* @__PURE__ */ t.jsx(
4242
+ Mn,
4246
4243
  {
4247
4244
  onCreateTask: Be,
4248
4245
  onClose: () => {
4249
- We(!1), i(void 0), T(void 0);
4246
+ ot(!1), g(void 0), f(void 0);
4250
4247
  },
4251
4248
  uiConfig: re,
4252
- parentId: at,
4253
- parentTaskName: y,
4249
+ parentId: i,
4250
+ parentTaskName: D,
4254
4251
  styleConfig: r
4255
4252
  }
4256
4253
  ),
4257
- Qe && /* @__PURE__ */ t.jsx(Rn, { task: Qe, onUpdate: Ke, onDelete: et, onClose: () => _e(null), uiConfig: re, styleConfig: r }),
4258
- f && Q && /* @__PURE__ */ t.jsx(
4259
- Nn,
4254
+ _e && /* @__PURE__ */ t.jsx(Fn, { task: _e, onUpdate: Ge, onDelete: Ze, onClose: () => Xe(null), uiConfig: re, styleConfig: r }),
4255
+ U && ee && /* @__PURE__ */ t.jsx(
4256
+ Pn,
4260
4257
  {
4261
- task: Q,
4258
+ task: ee,
4262
4259
  allTasks: z,
4263
- links: ge,
4264
- onAddDependency: Oe,
4260
+ links: ye,
4261
+ onAddDependency: Ne,
4265
4262
  onRemoveDependency: bt,
4266
- onTaskUpdate: Ke,
4263
+ onTaskUpdate: Ge,
4267
4264
  onClose: () => {
4268
- X(!1), J(null);
4265
+ G(!1), ie(null);
4269
4266
  },
4270
4267
  styleConfig: r
4271
4268
  }
4272
4269
  ),
4273
- Pe && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
4270
+ Ce && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
4274
4271
  /* @__PURE__ */ t.jsx("div", { className: "gantt-context-menu-overlay", onClick: () => ht(null), onContextMenu: (l) => {
4275
4272
  l.preventDefault(), ht(null);
4276
4273
  } }),
4277
4274
  /* @__PURE__ */ t.jsx(
4278
- On,
4275
+ Nn,
4279
4276
  {
4280
- x: Pe.x,
4281
- y: Pe.y,
4282
- task: Pe.task,
4277
+ x: Ce.x,
4278
+ y: Ce.y,
4279
+ task: Ce.task,
4283
4280
  onEdit: () => {
4284
- Pe.task && _e(Pe.task);
4281
+ Ce.task && Xe(Ce.task);
4285
4282
  },
4286
4283
  onDelete: () => {
4287
- Pe.task && et(Pe.task.id);
4284
+ Ce.task && Ze(Ce.task.id);
4288
4285
  },
4289
4286
  onCopy: L,
4290
4287
  onDependencies: () => {
4291
- Pe.task && (J(Pe.task), X(!0));
4288
+ Ce.task && (ie(Ce.task), G(!0));
4292
4289
  },
4293
4290
  onConvertToMilestone: () => _("milestone"),
4294
4291
  onConvertToTask: () => _("task"),
4295
4292
  onConvertToProject: () => _("project"),
4296
4293
  onClose: () => ht(null),
4297
4294
  onAutoSchedule: () => {
4298
- const l = Rr(z, ge, { mode: "forward" });
4295
+ const l = Rr(z, ye, { mode: "forward" });
4299
4296
  Le(l), ht(null);
4300
4297
  },
4301
4298
  iconConfig: c,
@@ -4303,10 +4300,10 @@ ${s + 1}. ${n.text}
4303
4300
  }
4304
4301
  )
4305
4302
  ] }),
4306
- ie && (() => {
4307
- const l = z.find((He) => He.id === ie.id);
4303
+ ge && (() => {
4304
+ const l = z.find((He) => He.id === ge.id);
4308
4305
  if (!l) return null;
4309
- const D = Number.isFinite(ie.currentX) ? ie.currentX : 0, P = Number.isFinite(ie.currentY) ? ie.currentY : 0, H = Ae.rowHeight || 48, fe = Et.current?.getBoundingClientRect(), ve = fe ? D - fe.left + 12 : D + 12, Me = fe ? P - fe.top + 12 : P + 12;
4306
+ const T = Number.isFinite(ge.currentX) ? ge.currentX : 0, P = Number.isFinite(ge.currentY) ? ge.currentY : 0, H = Ae.rowHeight || 48, fe = Et.current?.getBoundingClientRect(), ve = fe ? T - fe.left + 12 : T + 12, Me = fe ? P - fe.top + 12 : P + 12;
4310
4307
  return /* @__PURE__ */ t.jsxs(
4311
4308
  "div",
4312
4309
  {
@@ -4322,9 +4319,9 @@ ${s + 1}. ${n.text}
4322
4319
  },
4323
4320
  children: [
4324
4321
  /* @__PURE__ */ t.jsx("span", { className: "gantt-drag-preview-name", title: l.text, children: l.text }),
4325
- ie.descendantIds.length > 0 && /* @__PURE__ */ t.jsxs("span", { className: "gantt-drag-preview-count", children: [
4322
+ ge.descendantIds.length > 0 && /* @__PURE__ */ t.jsxs("span", { className: "gantt-drag-preview-count", children: [
4326
4323
  "+",
4327
- ie.descendantIds.length
4324
+ ge.descendantIds.length
4328
4325
  ] })
4329
4326
  ]
4330
4327
  }
@@ -4336,7 +4333,7 @@ ${s + 1}. ${n.text}
4336
4333
  ]
4337
4334
  }
4338
4335
  );
4339
- }, ta = (e, a) => {
4336
+ }, ea = (e, a) => {
4340
4337
  const n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
4341
4338
  e.forEach((m) => {
4342
4339
  r.set(m.id, []), c.set(m.id, []);
@@ -4353,66 +4350,66 @@ ${s + 1}. ${n.text}
4353
4350
  b.set(m, 0), u.set(m, F.duration);
4354
4351
  else {
4355
4352
  let M = 0;
4356
- N.forEach((S) => {
4357
- d(S, E);
4358
- const w = u.get(S) || 0;
4353
+ N.forEach((v) => {
4354
+ d(v, E);
4355
+ const w = u.get(v) || 0;
4359
4356
  M = Math.max(M, w);
4360
4357
  }), b.set(m, M), u.set(m, M + F.duration);
4361
4358
  }
4362
4359
  };
4363
4360
  e.forEach((m) => d(m.id));
4364
- const p = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), v = Math.max(...Array.from(u.values())), g = (m, E = /* @__PURE__ */ new Set()) => {
4361
+ const h = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), S = Math.max(...Array.from(u.values())), y = (m, E = /* @__PURE__ */ new Set()) => {
4365
4362
  if (E.has(m)) return;
4366
4363
  E.add(m);
4367
4364
  const F = e.find((M) => M.id === m);
4368
4365
  if (!F) return;
4369
4366
  const N = r.get(m) || [];
4370
4367
  if (N.length === 0)
4371
- h.set(m, v), p.set(m, v - F.duration);
4368
+ p.set(m, S), h.set(m, S - F.duration);
4372
4369
  else {
4373
4370
  let M = 1 / 0;
4374
- N.forEach((S) => {
4375
- g(S, E);
4376
- const w = p.get(S) || 0;
4371
+ N.forEach((v) => {
4372
+ y(v, E);
4373
+ const w = h.get(v) || 0;
4377
4374
  M = Math.min(M, w);
4378
- }), h.set(m, M), p.set(m, M - F.duration);
4375
+ }), p.set(m, M), h.set(m, M - F.duration);
4379
4376
  }
4380
4377
  };
4381
- return e.forEach((m) => g(m.id)), e.forEach((m) => {
4382
- const E = b.get(m.id) || 0, N = (p.get(m.id) || 0) - E;
4378
+ return e.forEach((m) => y(m.id)), e.forEach((m) => {
4379
+ const E = b.get(m.id) || 0, N = (h.get(m.id) || 0) - E;
4383
4380
  s.set(m.id, N), Math.abs(N) < 0.01 && n.add(m.id);
4384
4381
  }), {
4385
4382
  criticalTasks: n,
4386
4383
  taskFloats: s,
4387
- projectDuration: v
4384
+ projectDuration: S
4388
4385
  };
4389
- }, ra = (e, a) => a.criticalTasks.has(e), na = (e, a) => a.taskFloats.get(e) || 0, ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4386
+ }, ta = (e, a) => a.criticalTasks.has(e), ra = (e, a) => a.taskFloats.get(e) || 0, ha = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4390
4387
  __proto__: null,
4391
- calculateCriticalPath: ta,
4392
- getTaskFloat: na,
4393
- isCriticalTask: ra
4388
+ calculateCriticalPath: ea,
4389
+ getTaskFloat: ra,
4390
+ isCriticalTask: ta
4394
4391
  }, Symbol.toStringTag, { value: "Module" }));
4395
4392
  export {
4396
- ua as AutoScheduler,
4393
+ ca as AutoScheduler,
4397
4394
  Fr as Chart,
4398
- ma as CriticalPath,
4399
- Nn as DependencyEditor,
4400
- pa as ExportUtils,
4401
- Tn as FilterSearch,
4402
- ha as Gantt,
4395
+ ha as CriticalPath,
4396
+ Pn as DependencyEditor,
4397
+ ua as ExportUtils,
4398
+ jn as FilterSearch,
4399
+ pa as Gantt,
4403
4400
  Er as Grid,
4404
4401
  xn as TaskBar,
4405
- En as TaskCreator,
4406
- Rn as TaskEditor,
4402
+ Mn as TaskCreator,
4403
+ Fn as TaskEditor,
4407
4404
  Lr as Timeline,
4408
- Dn as Toolbar,
4405
+ Tn as Toolbar,
4409
4406
  Te as addToDate,
4410
- Bn as applyFilters,
4411
- ca as calculateDuration,
4412
- _n as createBaseline,
4407
+ zn as applyFilters,
4408
+ da as calculateDuration,
4409
+ Yn as createBaseline,
4413
4410
  ke as formatDate,
4414
4411
  Nt as getDaysBetween,
4415
- da as getEndOfDay,
4412
+ la as getEndOfDay,
4416
4413
  pn as getHoursBetween,
4417
4414
  yt as getStartOfDay,
4418
4415
  Zt as isHoliday,