@jaeungkim/gantt-chart 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,473 +1,27 @@
1
- import * as Ue from "react";
2
- import Ce, { useState as oe, useMemo as _e, useEffect as xe, useRef as V } from "react";
3
- function ne(n) {
4
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
5
- }
6
- var Se = { exports: {} }, ge = {};
7
- /**
8
- * @license React
9
- * react-jsx-runtime.production.js
10
- *
11
- * Copyright (c) Meta Platforms, Inc. and affiliates.
12
- *
13
- * This source code is licensed under the MIT license found in the
14
- * LICENSE file in the root directory of this source tree.
15
- */
16
- var He;
17
- function lt() {
18
- if (He) return ge;
19
- He = 1;
20
- var n = Symbol.for("react.transitional.element"), o = Symbol.for("react.fragment");
21
- function r(s, i, e) {
22
- var l = null;
23
- if (e !== void 0 && (l = "" + e), i.key !== void 0 && (l = "" + i.key), "key" in i) {
24
- e = {};
25
- for (var u in i)
26
- u !== "key" && (e[u] = i[u]);
27
- } else e = i;
28
- return i = e.ref, {
29
- $$typeof: n,
30
- type: s,
31
- key: l,
32
- ref: i !== void 0 ? i : null,
33
- props: e
34
- };
35
- }
36
- return ge.Fragment = o, ge.jsx = r, ge.jsxs = r, ge;
37
- }
38
- var ve = {};
39
- /**
40
- * @license React
41
- * react-jsx-runtime.development.js
42
- *
43
- * Copyright (c) Meta Platforms, Inc. and affiliates.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE file in the root directory of this source tree.
47
- */
48
- var ze;
49
- function ft() {
50
- return ze || (ze = 1, process.env.NODE_ENV !== "production" && function() {
51
- function n(t) {
52
- if (t == null) return null;
53
- if (typeof t == "function")
54
- return t.$$typeof === x ? null : t.displayName || t.name || null;
55
- if (typeof t == "string") return t;
56
- switch (t) {
57
- case k:
58
- return "Fragment";
59
- case L:
60
- return "Portal";
61
- case W:
62
- return "Profiler";
63
- case P:
64
- return "StrictMode";
65
- case B:
66
- return "Suspense";
67
- case ee:
68
- return "SuspenseList";
69
- }
70
- if (typeof t == "object")
71
- switch (typeof t.tag == "number" && console.error(
72
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
73
- ), t.$$typeof) {
74
- case d:
75
- return (t.displayName || "Context") + ".Provider";
76
- case $:
77
- return (t._context.displayName || "Context") + ".Consumer";
78
- case O:
79
- var b = t.render;
80
- return t = t.displayName, t || (t = b.displayName || b.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
81
- case I:
82
- return b = t.displayName || null, b !== null ? b : n(t.type) || "Memo";
83
- case D:
84
- b = t._payload, t = t._init;
85
- try {
86
- return n(t(b));
87
- } catch {
88
- }
89
- }
90
- return null;
91
- }
92
- function o(t) {
93
- return "" + t;
94
- }
95
- function r(t) {
96
- try {
97
- o(t);
98
- var b = !1;
99
- } catch {
100
- b = !0;
101
- }
102
- if (b) {
103
- b = console;
104
- var w = b.error, q = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
105
- return w.call(
106
- b,
107
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
108
- q
109
- ), o(t);
110
- }
111
- }
112
- function s() {
113
- }
114
- function i() {
115
- if (Y === 0) {
116
- J = console.log, se = console.info, re = console.warn, de = console.error, ae = console.group, G = console.groupCollapsed, te = console.groupEnd;
117
- var t = {
118
- configurable: !0,
119
- enumerable: !0,
120
- value: s,
121
- writable: !0
122
- };
123
- Object.defineProperties(console, {
124
- info: t,
125
- log: t,
126
- warn: t,
127
- error: t,
128
- group: t,
129
- groupCollapsed: t,
130
- groupEnd: t
131
- });
132
- }
133
- Y++;
134
- }
135
- function e() {
136
- if (Y--, Y === 0) {
137
- var t = { configurable: !0, enumerable: !0, writable: !0 };
138
- Object.defineProperties(console, {
139
- log: C({}, t, { value: J }),
140
- info: C({}, t, { value: se }),
141
- warn: C({}, t, { value: re }),
142
- error: C({}, t, { value: de }),
143
- group: C({}, t, { value: ae }),
144
- groupCollapsed: C({}, t, { value: G }),
145
- groupEnd: C({}, t, { value: te })
146
- });
147
- }
148
- 0 > Y && console.error(
149
- "disabledDepth fell below zero. This is a bug in React. Please file an issue."
150
- );
151
- }
152
- function l(t) {
153
- if (ie === void 0)
154
- try {
155
- throw Error();
156
- } catch (w) {
157
- var b = w.stack.trim().match(/\n( *(at )?)/);
158
- ie = b && b[1] || "", fe = -1 < w.stack.indexOf(`
159
- at`) ? " (<anonymous>)" : -1 < w.stack.indexOf("@") ? "@unknown:0:0" : "";
160
- }
161
- return `
162
- ` + ie + t + fe;
163
- }
164
- function u(t, b) {
165
- if (!t || je) return "";
166
- var w = Ze.get(t);
167
- if (w !== void 0) return w;
168
- je = !0, w = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
169
- var q = null;
170
- q = R.H, R.H = null, i();
171
- try {
172
- var X = {
173
- DetermineComponentFrameRoot: function() {
174
- try {
175
- if (b) {
176
- var le = function() {
177
- throw Error();
178
- };
179
- if (Object.defineProperty(le.prototype, "props", {
180
- set: function() {
181
- throw Error();
182
- }
183
- }), typeof Reflect == "object" && Reflect.construct) {
184
- try {
185
- Reflect.construct(le, []);
186
- } catch (ce) {
187
- var De = ce;
188
- }
189
- Reflect.construct(t, [], le);
190
- } else {
191
- try {
192
- le.call();
193
- } catch (ce) {
194
- De = ce;
195
- }
196
- t.call(le.prototype);
197
- }
198
- } else {
199
- try {
200
- throw Error();
201
- } catch (ce) {
202
- De = ce;
203
- }
204
- (le = t()) && typeof le.catch == "function" && le.catch(function() {
205
- });
206
- }
207
- } catch (ce) {
208
- if (ce && De && typeof ce.stack == "string")
209
- return [ce.stack, De.stack];
210
- }
211
- return [null, null];
212
- }
213
- };
214
- X.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
215
- var H = Object.getOwnPropertyDescriptor(
216
- X.DetermineComponentFrameRoot,
217
- "name"
218
- );
219
- H && H.configurable && Object.defineProperty(
220
- X.DetermineComponentFrameRoot,
221
- "name",
222
- { value: "DetermineComponentFrameRoot" }
223
- );
224
- var _ = X.DetermineComponentFrameRoot(), ue = _[0], he = _[1];
225
- if (ue && he) {
226
- var Q = ue.split(`
227
- `), pe = he.split(`
228
- `);
229
- for (_ = H = 0; H < Q.length && !Q[H].includes(
230
- "DetermineComponentFrameRoot"
231
- ); )
232
- H++;
233
- for (; _ < pe.length && !pe[_].includes(
234
- "DetermineComponentFrameRoot"
235
- ); )
236
- _++;
237
- if (H === Q.length || _ === pe.length)
238
- for (H = Q.length - 1, _ = pe.length - 1; 1 <= H && 0 <= _ && Q[H] !== pe[_]; )
239
- _--;
240
- for (; 1 <= H && 0 <= _; H--, _--)
241
- if (Q[H] !== pe[_]) {
242
- if (H !== 1 || _ !== 1)
243
- do
244
- if (H--, _--, 0 > _ || Q[H] !== pe[_]) {
245
- var $e = `
246
- ` + Q[H].replace(
247
- " at new ",
248
- " at "
249
- );
250
- return t.displayName && $e.includes("<anonymous>") && ($e = $e.replace("<anonymous>", t.displayName)), typeof t == "function" && Ze.set(t, $e), $e;
251
- }
252
- while (1 <= H && 0 <= _);
253
- break;
254
- }
255
- }
256
- } finally {
257
- je = !1, R.H = q, e(), Error.prepareStackTrace = w;
258
- }
259
- return Q = (Q = t ? t.displayName || t.name : "") ? l(Q) : "", typeof t == "function" && Ze.set(t, Q), Q;
260
- }
261
- function p(t) {
262
- if (t == null) return "";
263
- if (typeof t == "function") {
264
- var b = t.prototype;
265
- return u(
266
- t,
267
- !(!b || !b.isReactComponent)
268
- );
269
- }
270
- if (typeof t == "string") return l(t);
271
- switch (t) {
272
- case B:
273
- return l("Suspense");
274
- case ee:
275
- return l("SuspenseList");
276
- }
277
- if (typeof t == "object")
278
- switch (t.$$typeof) {
279
- case O:
280
- return t = u(t.render, !1), t;
281
- case I:
282
- return p(t.type);
283
- case D:
284
- b = t._payload, t = t._init;
285
- try {
286
- return p(t(b));
287
- } catch {
288
- }
289
- }
290
- return "";
291
- }
292
- function m() {
293
- var t = R.A;
294
- return t === null ? null : t.getOwner();
295
- }
296
- function g(t) {
297
- if (j.call(t, "key")) {
298
- var b = Object.getOwnPropertyDescriptor(t, "key").get;
299
- if (b && b.isReactWarning) return !1;
300
- }
301
- return t.key !== void 0;
302
- }
303
- function a(t, b) {
304
- function w() {
305
- Ae || (Ae = !0, console.error(
306
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
307
- b
308
- ));
309
- }
310
- w.isReactWarning = !0, Object.defineProperty(t, "key", {
311
- get: w,
312
- configurable: !0
313
- });
314
- }
315
- function c() {
316
- var t = n(this.type);
317
- return qe[t] || (qe[t] = !0, console.error(
318
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
319
- )), t = this.props.ref, t !== void 0 ? t : null;
320
- }
321
- function y(t, b, w, q, X, H) {
322
- return w = H.ref, t = {
323
- $$typeof: Z,
324
- type: t,
325
- key: b,
326
- props: H,
327
- _owner: X
328
- }, (w !== void 0 ? w : null) !== null ? Object.defineProperty(t, "ref", {
329
- enumerable: !1,
330
- get: c
331
- }) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
332
- configurable: !1,
333
- enumerable: !1,
334
- writable: !0,
335
- value: 0
336
- }), Object.defineProperty(t, "_debugInfo", {
337
- configurable: !1,
338
- enumerable: !1,
339
- writable: !0,
340
- value: null
341
- }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
342
- }
343
- function h(t, b, w, q, X, H) {
344
- if (typeof t == "string" || typeof t == "function" || t === k || t === W || t === P || t === B || t === ee || t === v || typeof t == "object" && t !== null && (t.$$typeof === D || t.$$typeof === I || t.$$typeof === d || t.$$typeof === $ || t.$$typeof === O || t.$$typeof === U || t.getModuleId !== void 0)) {
345
- var _ = b.children;
346
- if (_ !== void 0)
347
- if (q)
348
- if (z(_)) {
349
- for (q = 0; q < _.length; q++)
350
- f(_[q], t);
351
- Object.freeze && Object.freeze(_);
352
- } else
353
- console.error(
354
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
355
- );
356
- else f(_, t);
357
- } else
358
- _ = "", (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), t === null ? q = "null" : z(t) ? q = "array" : t !== void 0 && t.$$typeof === Z ? (q = "<" + (n(t.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : q = typeof t, console.error(
359
- "React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
360
- q,
361
- _
362
- );
363
- if (j.call(b, "key")) {
364
- _ = n(t);
365
- var ue = Object.keys(b).filter(function(Q) {
366
- return Q !== "key";
367
- });
368
- q = 0 < ue.length ? "{key: someKey, " + ue.join(": ..., ") + ": ...}" : "{key: someKey}", We[_ + q] || (ue = 0 < ue.length ? "{" + ue.join(": ..., ") + ": ...}" : "{}", console.error(
369
- `A props object containing a "key" prop is being spread into JSX:
370
- let props = %s;
371
- <%s {...props} />
372
- React keys must be passed directly to JSX without using spread:
373
- let props = %s;
374
- <%s key={someKey} {...props} />`,
375
- q,
376
- _,
377
- ue,
378
- _
379
- ), We[_ + q] = !0);
380
- }
381
- if (_ = null, w !== void 0 && (r(w), _ = "" + w), g(b) && (r(b.key), _ = "" + b.key), "key" in b) {
382
- w = {};
383
- for (var he in b)
384
- he !== "key" && (w[he] = b[he]);
385
- } else w = b;
386
- return _ && a(
387
- w,
388
- typeof t == "function" ? t.displayName || t.name || "Unknown" : t
389
- ), y(t, _, H, X, m(), w);
390
- }
391
- function f(t, b) {
392
- if (typeof t == "object" && t && t.$$typeof !== dt) {
393
- if (z(t))
394
- for (var w = 0; w < t.length; w++) {
395
- var q = t[w];
396
- S(q) && E(q, b);
397
- }
398
- else if (S(t))
399
- t._store && (t._store.validated = 1);
400
- else if (t === null || typeof t != "object" ? w = null : (w = T && t[T] || t["@@iterator"], w = typeof w == "function" ? w : null), typeof w == "function" && w !== t.entries && (w = w.call(t), w !== t))
401
- for (; !(t = w.next()).done; )
402
- S(t.value) && E(t.value, b);
403
- }
404
- }
405
- function S(t) {
406
- return typeof t == "object" && t !== null && t.$$typeof === Z;
407
- }
408
- function E(t, b) {
409
- if (t._store && !t._store.validated && t.key == null && (t._store.validated = 1, b = F(b), !Ne[b])) {
410
- Ne[b] = !0;
411
- var w = "";
412
- t && t._owner != null && t._owner !== m() && (w = null, typeof t._owner.tag == "number" ? w = n(t._owner.type) : typeof t._owner.name == "string" && (w = t._owner.name), w = " It was passed a child from " + w + ".");
413
- var q = R.getCurrentStack;
414
- R.getCurrentStack = function() {
415
- var X = p(t.type);
416
- return q && (X += q() || ""), X;
417
- }, console.error(
418
- 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
419
- b,
420
- w
421
- ), R.getCurrentStack = q;
422
- }
423
- }
424
- function F(t) {
425
- var b = "", w = m();
426
- return w && (w = n(w.type)) && (b = `
427
-
428
- Check the render method of \`` + w + "`."), b || (t = n(t)) && (b = `
429
-
430
- Check the top-level render call using <` + t + ">."), b;
431
- }
432
- var M = Ce, Z = Symbol.for("react.transitional.element"), L = Symbol.for("react.portal"), k = Symbol.for("react.fragment"), P = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), d = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), ee = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), T = Symbol.iterator, x = Symbol.for("react.client.reference"), R = M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, C = Object.assign, U = Symbol.for("react.client.reference"), z = Array.isArray, Y = 0, J, se, re, de, ae, G, te;
433
- s.__reactDisabledLog = !0;
434
- var ie, fe, je = !1, Ze = new (typeof WeakMap == "function" ? WeakMap : Map)(), dt = Symbol.for("react.client.reference"), Ae, qe = {}, We = {}, Ne = {};
435
- ve.Fragment = k, ve.jsx = function(t, b, w, q, X) {
436
- return h(t, b, w, !1, q, X);
437
- }, ve.jsxs = function(t, b, w, q, X) {
438
- return h(t, b, w, !0, q, X);
439
- };
440
- }()), ve;
441
- }
442
- var Ye;
443
- function pt() {
444
- return Ye || (Ye = 1, process.env.NODE_ENV === "production" ? Se.exports = lt() : Se.exports = ft()), Se.exports;
445
- }
446
- var A = pt();
447
- const ut = 2.375 * 16, Be = 3, K = {
1
+ import { jsxs as X, jsx as P } from "react/jsx-runtime";
2
+ import * as yt from "react";
3
+ import nt, { useRef as St, useState as Mt, useCallback as Qt, useMemo as st, useEffect as Q } from "react";
4
+ import { flushSync as te } from "react-dom";
5
+ const bt = 38, ee = 5, Z = {
448
6
  day: {
449
7
  labelUnit: "day",
450
8
  tickUnit: "hour",
451
9
  unitPerTick: 1,
452
- dragStepUnit: "minute",
453
- dragStepAmount: 15,
454
- basePxPerDragStep: 16,
455
- formatTickLabel: (n) => n.format("h A"),
456
- // → 9:12 AM, 12:00 PM, 3:45 PM // 09:00, 10:00...
457
- formatHeaderLabel: (n) => n.format("MMM D")
458
- // Jun 1
10
+ dragStepUnit: "hour",
11
+ dragStepAmount: 1,
12
+ basePxPerDragStep: 32,
13
+ formatTickLabel: (r) => r.format("hh"),
14
+ formatHeaderLabel: (r) => r.format("MMM D")
459
15
  },
460
16
  week: {
461
- labelUnit: "week",
17
+ labelUnit: "month",
462
18
  tickUnit: "day",
463
19
  unitPerTick: 1,
464
20
  dragStepUnit: "hour",
465
21
  dragStepAmount: 6,
466
- basePxPerDragStep: 32,
467
- formatTickLabel: (n) => n.format("D"),
468
- // 1, 2, 3...
469
- formatHeaderLabel: (n) => n.format("MMM")
470
- // Jun
22
+ basePxPerDragStep: 54,
23
+ formatTickLabel: (r) => r.format("D"),
24
+ formatHeaderLabel: (r) => r.format("MMM")
471
25
  },
472
26
  month: {
473
27
  labelUnit: "month",
@@ -475,1509 +29,2329 @@ const ut = 2.375 * 16, Be = 3, K = {
475
29
  unitPerTick: 1,
476
30
  dragStepUnit: "day",
477
31
  dragStepAmount: 1,
478
- basePxPerDragStep: 64,
479
- formatTickLabel: (n) => n.format("D"),
480
- // 1, 2, 3...
481
- formatHeaderLabel: (n) => n.format("MMM YYYY")
482
- // Jun 2024
32
+ basePxPerDragStep: 32,
33
+ formatTickLabel: (r) => r.format("D"),
34
+ formatHeaderLabel: (r) => r.format("MMM YYYY")
483
35
  },
484
36
  year: {
485
- labelUnit: "year",
486
- tickUnit: "day",
487
- unitPerTick: 7,
37
+ labelUnit: "month",
38
+ tickUnit: "month",
39
+ unitPerTick: 1,
488
40
  dragStepUnit: "day",
489
- dragStepAmount: 1,
490
- basePxPerDragStep: 16,
491
- formatTickLabel: (n) => n.format("D"),
492
- // Jan, Feb...
493
- formatHeaderLabel: (n) => n.format("YYYY")
494
- // 2024
41
+ dragStepAmount: 7,
42
+ basePxPerDragStep: 28,
43
+ formatTickLabel: (r) => r.format("D"),
44
+ formatHeaderLabel: (r) => r.format("MMM YYYY")
45
+ }
46
+ }, wt = (r) => Symbol.iterator in r, Dt = (r) => (
47
+ // HACK: avoid checking entries type
48
+ "entries" in r
49
+ ), Ot = (r, a) => {
50
+ const e = r instanceof Map ? r : new Map(r.entries()), n = a instanceof Map ? a : new Map(a.entries());
51
+ if (e.size !== n.size)
52
+ return !1;
53
+ for (const [s, t] of e)
54
+ if (!n.has(s) || !Object.is(t, n.get(s)))
55
+ return !1;
56
+ return !0;
57
+ }, ne = (r, a) => {
58
+ const e = r[Symbol.iterator](), n = a[Symbol.iterator]();
59
+ let s = e.next(), t = n.next();
60
+ for (; !s.done && !t.done; ) {
61
+ if (!Object.is(s.value, t.value))
62
+ return !1;
63
+ s = e.next(), t = n.next();
495
64
  }
65
+ return !!s.done && !!t.done;
496
66
  };
497
- var be = { exports: {} }, ht = be.exports, Ge;
498
- function mt() {
499
- return Ge || (Ge = 1, function(n, o) {
500
- (function(r, s) {
501
- n.exports = s();
502
- })(ht, function() {
503
- var r = 1e3, s = 6e4, i = 36e5, e = "millisecond", l = "second", u = "minute", p = "hour", m = "day", g = "week", a = "month", c = "quarter", y = "year", h = "date", f = "Invalid Date", S = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, E = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, F = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(I) {
504
- var D = ["th", "st", "nd", "rd"], v = I % 100;
505
- return "[" + I + (D[(v - 20) % 10] || D[v] || D[0]) + "]";
506
- } }, M = function(I, D, v) {
507
- var T = String(I);
508
- return !T || T.length >= D ? I : "" + Array(D + 1 - T.length).join(v) + I;
509
- }, Z = { s: M, z: function(I) {
510
- var D = -I.utcOffset(), v = Math.abs(D), T = Math.floor(v / 60), x = v % 60;
511
- return (D <= 0 ? "+" : "-") + M(T, 2, "0") + ":" + M(x, 2, "0");
512
- }, m: function I(D, v) {
513
- if (D.date() < v.date()) return -I(v, D);
514
- var T = 12 * (v.year() - D.year()) + (v.month() - D.month()), x = D.clone().add(T, a), R = v - x < 0, j = D.clone().add(T + (R ? -1 : 1), a);
515
- return +(-(T + (v - x) / (R ? x - j : j - x)) || 0);
516
- }, a: function(I) {
517
- return I < 0 ? Math.ceil(I) || 0 : Math.floor(I);
518
- }, p: function(I) {
519
- return { M: a, y, w: g, d: m, D: h, h: p, m: u, s: l, ms: e, Q: c }[I] || String(I || "").toLowerCase().replace(/s$/, "");
520
- }, u: function(I) {
521
- return I === void 0;
522
- } }, L = "en", k = {};
523
- k[L] = F;
524
- var P = "$isDayjsObject", W = function(I) {
525
- return I instanceof B || !(!I || !I[P]);
526
- }, $ = function I(D, v, T) {
527
- var x;
528
- if (!D) return L;
529
- if (typeof D == "string") {
530
- var R = D.toLowerCase();
531
- k[R] && (x = R), v && (k[R] = v, x = R);
532
- var j = D.split("-");
533
- if (!x && j.length > 1) return I(j[0]);
67
+ function re(r, a) {
68
+ return Object.is(r, a) ? !0 : typeof r != "object" || r === null || typeof a != "object" || a === null || Object.getPrototypeOf(r) !== Object.getPrototypeOf(a) ? !1 : wt(r) && wt(a) ? Dt(r) && Dt(a) ? Ot(r, a) : ne(r, a) : Ot(
69
+ { entries: () => Object.entries(r) },
70
+ { entries: () => Object.entries(a) }
71
+ );
72
+ }
73
+ function se(r) {
74
+ const a = nt.useRef(void 0);
75
+ return (e) => {
76
+ const n = r(e);
77
+ return re(a.current, n) ? a.current : a.current = n;
78
+ };
79
+ }
80
+ const kt = (r) => {
81
+ let a;
82
+ const e = /* @__PURE__ */ new Set(), n = (c, d) => {
83
+ const l = typeof c == "function" ? c(a) : c;
84
+ if (!Object.is(l, a)) {
85
+ const h = a;
86
+ a = d ?? (typeof l != "object" || l === null) ? l : Object.assign({}, a, l), e.forEach((b) => b(a, h));
87
+ }
88
+ }, s = () => a, i = { setState: n, getState: s, getInitialState: () => u, subscribe: (c) => (e.add(c), () => e.delete(c)) }, u = a = r(n, s, i);
89
+ return i;
90
+ }, ie = ((r) => r ? kt(r) : kt), oe = (r) => r;
91
+ function ae(r, a = oe) {
92
+ const e = nt.useSyncExternalStore(
93
+ r.subscribe,
94
+ nt.useCallback(() => a(r.getState()), [r, a]),
95
+ nt.useCallback(() => a(r.getInitialState()), [r, a])
96
+ );
97
+ return nt.useDebugValue(e), e;
98
+ }
99
+ const ue = (r) => {
100
+ const a = ie(r), e = (n) => ae(a, n);
101
+ return Object.assign(e, a), e;
102
+ }, ce = ((r) => ue);
103
+ function Zt(r, a) {
104
+ let e;
105
+ try {
106
+ e = r();
107
+ } catch {
108
+ return;
109
+ }
110
+ return {
111
+ getItem: (s) => {
112
+ var t;
113
+ const o = (u) => u === null ? null : JSON.parse(u, void 0), i = (t = e.getItem(s)) != null ? t : null;
114
+ return i instanceof Promise ? i.then(o) : o(i);
115
+ },
116
+ setItem: (s, t) => e.setItem(s, JSON.stringify(t, void 0)),
117
+ removeItem: (s) => e.removeItem(s)
118
+ };
119
+ }
120
+ const xt = (r) => (a) => {
121
+ try {
122
+ const e = r(a);
123
+ return e instanceof Promise ? e : {
124
+ then(n) {
125
+ return xt(n)(e);
126
+ },
127
+ catch(n) {
128
+ return this;
129
+ }
130
+ };
131
+ } catch (e) {
132
+ return {
133
+ then(n) {
134
+ return this;
135
+ },
136
+ catch(n) {
137
+ return xt(n)(e);
138
+ }
139
+ };
140
+ }
141
+ }, le = (r, a) => (e, n, s) => {
142
+ let t = {
143
+ storage: Zt(() => localStorage),
144
+ partialize: (f) => f,
145
+ version: 0,
146
+ merge: (f, S) => ({
147
+ ...S,
148
+ ...f
149
+ }),
150
+ ...a
151
+ }, o = !1;
152
+ const i = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
153
+ let c = t.storage;
154
+ if (!c)
155
+ return r(
156
+ (...f) => {
157
+ console.warn(
158
+ `[zustand persist middleware] Unable to update item '${t.name}', the given storage is currently unavailable.`
159
+ ), e(...f);
160
+ },
161
+ n,
162
+ s
163
+ );
164
+ const d = () => {
165
+ const f = t.partialize({ ...n() });
166
+ return c.setItem(t.name, {
167
+ state: f,
168
+ version: t.version
169
+ });
170
+ }, l = s.setState;
171
+ s.setState = (f, S) => (l(f, S), d());
172
+ const h = r(
173
+ (...f) => (e(...f), d()),
174
+ n,
175
+ s
176
+ );
177
+ s.getInitialState = () => h;
178
+ let b;
179
+ const y = () => {
180
+ var f, S;
181
+ if (!c) return;
182
+ o = !1, i.forEach((x) => {
183
+ var p;
184
+ return x((p = n()) != null ? p : h);
185
+ });
186
+ const D = ((S = t.onRehydrateStorage) == null ? void 0 : S.call(t, (f = n()) != null ? f : h)) || void 0;
187
+ return xt(c.getItem.bind(c))(t.name).then((x) => {
188
+ if (x)
189
+ if (typeof x.version == "number" && x.version !== t.version) {
190
+ if (t.migrate) {
191
+ const p = t.migrate(
192
+ x.state,
193
+ x.version
194
+ );
195
+ return p instanceof Promise ? p.then((z) => [!0, z]) : [!0, p];
196
+ }
197
+ console.error(
198
+ "State loaded from storage couldn't be migrated since no migrate function was provided"
199
+ );
200
+ } else
201
+ return [!1, x.state];
202
+ return [!1, void 0];
203
+ }).then((x) => {
204
+ var p;
205
+ const [z, R] = x;
206
+ if (b = t.merge(
207
+ R,
208
+ (p = n()) != null ? p : h
209
+ ), e(b, !0), z)
210
+ return d();
211
+ }).then(() => {
212
+ D == null || D(b, void 0), b = n(), o = !0, u.forEach((x) => x(b));
213
+ }).catch((x) => {
214
+ D == null || D(void 0, x);
215
+ });
216
+ };
217
+ return s.persist = {
218
+ setOptions: (f) => {
219
+ t = {
220
+ ...t,
221
+ ...f
222
+ }, f.storage && (c = f.storage);
223
+ },
224
+ clearStorage: () => {
225
+ c == null || c.removeItem(t.name);
226
+ },
227
+ getOptions: () => t,
228
+ rehydrate: () => y(),
229
+ hasHydrated: () => o,
230
+ onHydrate: (f) => (i.add(f), () => {
231
+ i.delete(f);
232
+ }),
233
+ onFinishHydration: (f) => (u.add(f), () => {
234
+ u.delete(f);
235
+ })
236
+ }, t.skipHydration || y(), b || h;
237
+ }, fe = le, rt = ce()(
238
+ fe(
239
+ (r, a) => ({
240
+ rawTasks: [],
241
+ transformedTasks: [],
242
+ bottomRowCells: [],
243
+ selectedScale: "month",
244
+ currentTask: null,
245
+ dragOffsets: {},
246
+ setCurrentTask: (e) => r({ currentTask: e }),
247
+ setSelectedScale: (e) => r({ selectedScale: e }),
248
+ setRawTasks: (e) => r({ rawTasks: e }),
249
+ setBottomRowCells: (e) => r({ bottomRowCells: e }),
250
+ setTransformedTasks: (e) => r({ transformedTasks: e }),
251
+ setDragOffset: (e, n) => r((s) => ({
252
+ dragOffsets: { ...s.dragOffsets, [e]: n }
253
+ })),
254
+ clearDragOffset: (e) => r((n) => {
255
+ const { [e]: s, ...t } = n.dragOffsets;
256
+ return { dragOffsets: t };
257
+ }),
258
+ getCurrentDragOffset: (e) => a().dragOffsets[e] || null,
259
+ getTotalWidth: () => a().bottomRowCells.reduce((n, s) => n + s.widthPx, 0)
260
+ }),
261
+ {
262
+ name: "gantt-storage",
263
+ storage: Zt(() => sessionStorage),
264
+ partialize: (r) => ({ selectedScale: r.selectedScale })
265
+ }
266
+ )
267
+ );
268
+ function Jt() {
269
+ return rt(
270
+ se((r) => ({
271
+ // 상태
272
+ rawTasks: r.rawTasks,
273
+ transformedTasks: r.transformedTasks,
274
+ bottomRowCells: r.bottomRowCells,
275
+ selectedScale: r.selectedScale,
276
+ currentTask: r.currentTask,
277
+ dragOffsets: r.dragOffsets,
278
+ // 액션
279
+ setRawTasks: r.setRawTasks,
280
+ setTransformedTasks: r.setTransformedTasks,
281
+ setBottomRowCells: r.setBottomRowCells,
282
+ setSelectedScale: r.setSelectedScale,
283
+ setCurrentTask: r.setCurrentTask,
284
+ setDragOffset: r.setDragOffset,
285
+ clearDragOffset: r.clearDragOffset,
286
+ // 계산된 값
287
+ getTotalWidth: r.getTotalWidth,
288
+ getCurrentDragOffset: r.getCurrentDragOffset
289
+ }))
290
+ );
291
+ }
292
+ function j(r) {
293
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
294
+ }
295
+ var ot = { exports: {} }, de = ot.exports, Tt;
296
+ function he() {
297
+ return Tt || (Tt = 1, (function(r, a) {
298
+ (function(e, n) {
299
+ r.exports = n();
300
+ })(de, (function() {
301
+ var e = 1e3, n = 6e4, s = 36e5, t = "millisecond", o = "second", i = "minute", u = "hour", c = "day", d = "week", l = "month", h = "quarter", b = "year", y = "date", f = "Invalid Date", S = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, D = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, x = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(E) {
302
+ var O = ["th", "st", "nd", "rd"], M = E % 100;
303
+ return "[" + E + (O[(M - 20) % 10] || O[M] || O[0]) + "]";
304
+ } }, p = function(E, O, M) {
305
+ var I = String(E);
306
+ return !I || I.length >= O ? E : "" + Array(O + 1 - I.length).join(M) + E;
307
+ }, z = { s: p, z: function(E) {
308
+ var O = -E.utcOffset(), M = Math.abs(O), I = Math.floor(M / 60), w = M % 60;
309
+ return (O <= 0 ? "+" : "-") + p(I, 2, "0") + ":" + p(w, 2, "0");
310
+ }, m: function E(O, M) {
311
+ if (O.date() < M.date()) return -E(M, O);
312
+ var I = 12 * (M.year() - O.year()) + (M.month() - O.month()), w = O.clone().add(I, l), C = M - w < 0, L = O.clone().add(I + (C ? -1 : 1), l);
313
+ return +(-(I + (M - w) / (C ? w - L : L - w)) || 0);
314
+ }, a: function(E) {
315
+ return E < 0 ? Math.ceil(E) || 0 : Math.floor(E);
316
+ }, p: function(E) {
317
+ return { M: l, y: b, w: d, d: c, D: y, h: u, m: i, s: o, ms: t, Q: h }[E] || String(E || "").toLowerCase().replace(/s$/, "");
318
+ }, u: function(E) {
319
+ return E === void 0;
320
+ } }, R = "en", T = {};
321
+ T[R] = x;
322
+ var v = "$isDayjsObject", g = function(E) {
323
+ return E instanceof W || !(!E || !E[v]);
324
+ }, $ = function E(O, M, I) {
325
+ var w;
326
+ if (!O) return R;
327
+ if (typeof O == "string") {
328
+ var C = O.toLowerCase();
329
+ T[C] && (w = C), M && (T[C] = M, w = C);
330
+ var L = O.split("-");
331
+ if (!w && L.length > 1) return E(L[0]);
534
332
  } else {
535
- var C = D.name;
536
- k[C] = D, x = C;
333
+ var _ = O.name;
334
+ T[_] = O, w = _;
537
335
  }
538
- return !T && x && (L = x), x || !T && L;
539
- }, d = function(I, D) {
540
- if (W(I)) return I.clone();
541
- var v = typeof D == "object" ? D : {};
542
- return v.date = I, v.args = arguments, new B(v);
543
- }, O = Z;
544
- O.l = $, O.i = W, O.w = function(I, D) {
545
- return d(I, { locale: D.$L, utc: D.$u, x: D.$x, $offset: D.$offset });
336
+ return !I && w && (R = w), w || !I && R;
337
+ }, m = function(E, O) {
338
+ if (g(E)) return E.clone();
339
+ var M = typeof O == "object" ? O : {};
340
+ return M.date = E, M.args = arguments, new W(M);
341
+ }, k = z;
342
+ k.l = $, k.i = g, k.w = function(E, O) {
343
+ return m(E, { locale: O.$L, utc: O.$u, x: O.$x, $offset: O.$offset });
546
344
  };
547
- var B = function() {
548
- function I(v) {
549
- this.$L = $(v.locale, null, !0), this.parse(v), this.$x = this.$x || v.x || {}, this[P] = !0;
345
+ var W = (function() {
346
+ function E(M) {
347
+ this.$L = $(M.locale, null, !0), this.parse(M), this.$x = this.$x || M.x || {}, this[v] = !0;
550
348
  }
551
- var D = I.prototype;
552
- return D.parse = function(v) {
553
- this.$d = function(T) {
554
- var x = T.date, R = T.utc;
555
- if (x === null) return /* @__PURE__ */ new Date(NaN);
556
- if (O.u(x)) return /* @__PURE__ */ new Date();
557
- if (x instanceof Date) return new Date(x);
558
- if (typeof x == "string" && !/Z$/i.test(x)) {
559
- var j = x.match(S);
560
- if (j) {
561
- var C = j[2] - 1 || 0, U = (j[7] || "0").substring(0, 3);
562
- return R ? new Date(Date.UTC(j[1], C, j[3] || 1, j[4] || 0, j[5] || 0, j[6] || 0, U)) : new Date(j[1], C, j[3] || 1, j[4] || 0, j[5] || 0, j[6] || 0, U);
349
+ var O = E.prototype;
350
+ return O.parse = function(M) {
351
+ this.$d = (function(I) {
352
+ var w = I.date, C = I.utc;
353
+ if (w === null) return /* @__PURE__ */ new Date(NaN);
354
+ if (k.u(w)) return /* @__PURE__ */ new Date();
355
+ if (w instanceof Date) return new Date(w);
356
+ if (typeof w == "string" && !/Z$/i.test(w)) {
357
+ var L = w.match(S);
358
+ if (L) {
359
+ var _ = L[2] - 1 || 0, F = (L[7] || "0").substring(0, 3);
360
+ return C ? new Date(Date.UTC(L[1], _, L[3] || 1, L[4] || 0, L[5] || 0, L[6] || 0, F)) : new Date(L[1], _, L[3] || 1, L[4] || 0, L[5] || 0, L[6] || 0, F);
563
361
  }
564
362
  }
565
- return new Date(x);
566
- }(v), this.init();
567
- }, D.init = function() {
568
- var v = this.$d;
569
- this.$y = v.getFullYear(), this.$M = v.getMonth(), this.$D = v.getDate(), this.$W = v.getDay(), this.$H = v.getHours(), this.$m = v.getMinutes(), this.$s = v.getSeconds(), this.$ms = v.getMilliseconds();
570
- }, D.$utils = function() {
571
- return O;
572
- }, D.isValid = function() {
363
+ return new Date(w);
364
+ })(M), this.init();
365
+ }, O.init = function() {
366
+ var M = this.$d;
367
+ this.$y = M.getFullYear(), this.$M = M.getMonth(), this.$D = M.getDate(), this.$W = M.getDay(), this.$H = M.getHours(), this.$m = M.getMinutes(), this.$s = M.getSeconds(), this.$ms = M.getMilliseconds();
368
+ }, O.$utils = function() {
369
+ return k;
370
+ }, O.isValid = function() {
573
371
  return this.$d.toString() !== f;
574
- }, D.isSame = function(v, T) {
575
- var x = d(v);
576
- return this.startOf(T) <= x && x <= this.endOf(T);
577
- }, D.isAfter = function(v, T) {
578
- return d(v) < this.startOf(T);
579
- }, D.isBefore = function(v, T) {
580
- return this.endOf(T) < d(v);
581
- }, D.$g = function(v, T, x) {
582
- return O.u(v) ? this[T] : this.set(x, v);
583
- }, D.unix = function() {
372
+ }, O.isSame = function(M, I) {
373
+ var w = m(M);
374
+ return this.startOf(I) <= w && w <= this.endOf(I);
375
+ }, O.isAfter = function(M, I) {
376
+ return m(M) < this.startOf(I);
377
+ }, O.isBefore = function(M, I) {
378
+ return this.endOf(I) < m(M);
379
+ }, O.$g = function(M, I, w) {
380
+ return k.u(M) ? this[I] : this.set(w, M);
381
+ }, O.unix = function() {
584
382
  return Math.floor(this.valueOf() / 1e3);
585
- }, D.valueOf = function() {
383
+ }, O.valueOf = function() {
586
384
  return this.$d.getTime();
587
- }, D.startOf = function(v, T) {
588
- var x = this, R = !!O.u(T) || T, j = O.p(v), C = function(ae, G) {
589
- var te = O.w(x.$u ? Date.UTC(x.$y, G, ae) : new Date(x.$y, G, ae), x);
590
- return R ? te : te.endOf(m);
591
- }, U = function(ae, G) {
592
- return O.w(x.toDate()[ae].apply(x.toDate("s"), (R ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(G)), x);
593
- }, z = this.$W, Y = this.$M, J = this.$D, se = "set" + (this.$u ? "UTC" : "");
594
- switch (j) {
385
+ }, O.startOf = function(M, I) {
386
+ var w = this, C = !!k.u(I) || I, L = k.p(M), _ = function(G, U) {
387
+ var q = k.w(w.$u ? Date.UTC(w.$y, U, G) : new Date(w.$y, U, G), w);
388
+ return C ? q : q.endOf(c);
389
+ }, F = function(G, U) {
390
+ return k.w(w.toDate()[G].apply(w.toDate("s"), (C ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(U)), w);
391
+ }, H = this.$W, Y = this.$M, B = this.$D, J = "set" + (this.$u ? "UTC" : "");
392
+ switch (L) {
393
+ case b:
394
+ return C ? _(1, 0) : _(31, 11);
395
+ case l:
396
+ return C ? _(1, Y) : _(0, Y + 1);
397
+ case d:
398
+ var V = this.$locale().weekStart || 0, tt = (H < V ? H + 7 : H) - V;
399
+ return _(C ? B - tt : B + (6 - tt), Y);
400
+ case c:
595
401
  case y:
596
- return R ? C(1, 0) : C(31, 11);
597
- case a:
598
- return R ? C(1, Y) : C(0, Y + 1);
599
- case g:
600
- var re = this.$locale().weekStart || 0, de = (z < re ? z + 7 : z) - re;
601
- return C(R ? J - de : J + (6 - de), Y);
602
- case m:
603
- case h:
604
- return U(se + "Hours", 0);
605
- case p:
606
- return U(se + "Minutes", 1);
402
+ return F(J + "Hours", 0);
607
403
  case u:
608
- return U(se + "Seconds", 2);
609
- case l:
610
- return U(se + "Milliseconds", 3);
404
+ return F(J + "Minutes", 1);
405
+ case i:
406
+ return F(J + "Seconds", 2);
407
+ case o:
408
+ return F(J + "Milliseconds", 3);
611
409
  default:
612
410
  return this.clone();
613
411
  }
614
- }, D.endOf = function(v) {
615
- return this.startOf(v, !1);
616
- }, D.$set = function(v, T) {
617
- var x, R = O.p(v), j = "set" + (this.$u ? "UTC" : ""), C = (x = {}, x[m] = j + "Date", x[h] = j + "Date", x[a] = j + "Month", x[y] = j + "FullYear", x[p] = j + "Hours", x[u] = j + "Minutes", x[l] = j + "Seconds", x[e] = j + "Milliseconds", x)[R], U = R === m ? this.$D + (T - this.$W) : T;
618
- if (R === a || R === y) {
619
- var z = this.clone().set(h, 1);
620
- z.$d[C](U), z.init(), this.$d = z.set(h, Math.min(this.$D, z.daysInMonth())).$d;
621
- } else C && this.$d[C](U);
412
+ }, O.endOf = function(M) {
413
+ return this.startOf(M, !1);
414
+ }, O.$set = function(M, I) {
415
+ var w, C = k.p(M), L = "set" + (this.$u ? "UTC" : ""), _ = (w = {}, w[c] = L + "Date", w[y] = L + "Date", w[l] = L + "Month", w[b] = L + "FullYear", w[u] = L + "Hours", w[i] = L + "Minutes", w[o] = L + "Seconds", w[t] = L + "Milliseconds", w)[C], F = C === c ? this.$D + (I - this.$W) : I;
416
+ if (C === l || C === b) {
417
+ var H = this.clone().set(y, 1);
418
+ H.$d[_](F), H.init(), this.$d = H.set(y, Math.min(this.$D, H.daysInMonth())).$d;
419
+ } else _ && this.$d[_](F);
622
420
  return this.init(), this;
623
- }, D.set = function(v, T) {
624
- return this.clone().$set(v, T);
625
- }, D.get = function(v) {
626
- return this[O.p(v)]();
627
- }, D.add = function(v, T) {
628
- var x, R = this;
629
- v = Number(v);
630
- var j = O.p(T), C = function(Y) {
631
- var J = d(R);
632
- return O.w(J.date(J.date() + Math.round(Y * v)), R);
421
+ }, O.set = function(M, I) {
422
+ return this.clone().$set(M, I);
423
+ }, O.get = function(M) {
424
+ return this[k.p(M)]();
425
+ }, O.add = function(M, I) {
426
+ var w, C = this;
427
+ M = Number(M);
428
+ var L = k.p(I), _ = function(Y) {
429
+ var B = m(C);
430
+ return k.w(B.date(B.date() + Math.round(Y * M)), C);
633
431
  };
634
- if (j === a) return this.set(a, this.$M + v);
635
- if (j === y) return this.set(y, this.$y + v);
636
- if (j === m) return C(1);
637
- if (j === g) return C(7);
638
- var U = (x = {}, x[u] = s, x[p] = i, x[l] = r, x)[j] || 1, z = this.$d.getTime() + v * U;
639
- return O.w(z, this);
640
- }, D.subtract = function(v, T) {
641
- return this.add(-1 * v, T);
642
- }, D.format = function(v) {
643
- var T = this, x = this.$locale();
644
- if (!this.isValid()) return x.invalidDate || f;
645
- var R = v || "YYYY-MM-DDTHH:mm:ssZ", j = O.z(this), C = this.$H, U = this.$m, z = this.$M, Y = x.weekdays, J = x.months, se = x.meridiem, re = function(G, te, ie, fe) {
646
- return G && (G[te] || G(T, R)) || ie[te].slice(0, fe);
647
- }, de = function(G) {
648
- return O.s(C % 12 || 12, G, "0");
649
- }, ae = se || function(G, te, ie) {
650
- var fe = G < 12 ? "AM" : "PM";
651
- return ie ? fe.toLowerCase() : fe;
432
+ if (L === l) return this.set(l, this.$M + M);
433
+ if (L === b) return this.set(b, this.$y + M);
434
+ if (L === c) return _(1);
435
+ if (L === d) return _(7);
436
+ var F = (w = {}, w[i] = n, w[u] = s, w[o] = e, w)[L] || 1, H = this.$d.getTime() + M * F;
437
+ return k.w(H, this);
438
+ }, O.subtract = function(M, I) {
439
+ return this.add(-1 * M, I);
440
+ }, O.format = function(M) {
441
+ var I = this, w = this.$locale();
442
+ if (!this.isValid()) return w.invalidDate || f;
443
+ var C = M || "YYYY-MM-DDTHH:mm:ssZ", L = k.z(this), _ = this.$H, F = this.$m, H = this.$M, Y = w.weekdays, B = w.months, J = w.meridiem, V = function(U, q, et, it) {
444
+ return U && (U[q] || U(I, C)) || et[q].slice(0, it);
445
+ }, tt = function(U) {
446
+ return k.s(_ % 12 || 12, U, "0");
447
+ }, G = J || function(U, q, et) {
448
+ var it = U < 12 ? "AM" : "PM";
449
+ return et ? it.toLowerCase() : it;
652
450
  };
653
- return R.replace(E, function(G, te) {
654
- return te || function(ie) {
655
- switch (ie) {
451
+ return C.replace(D, (function(U, q) {
452
+ return q || (function(et) {
453
+ switch (et) {
656
454
  case "YY":
657
- return String(T.$y).slice(-2);
455
+ return String(I.$y).slice(-2);
658
456
  case "YYYY":
659
- return O.s(T.$y, 4, "0");
457
+ return k.s(I.$y, 4, "0");
660
458
  case "M":
661
- return z + 1;
459
+ return H + 1;
662
460
  case "MM":
663
- return O.s(z + 1, 2, "0");
461
+ return k.s(H + 1, 2, "0");
664
462
  case "MMM":
665
- return re(x.monthsShort, z, J, 3);
463
+ return V(w.monthsShort, H, B, 3);
666
464
  case "MMMM":
667
- return re(J, z);
465
+ return V(B, H);
668
466
  case "D":
669
- return T.$D;
467
+ return I.$D;
670
468
  case "DD":
671
- return O.s(T.$D, 2, "0");
469
+ return k.s(I.$D, 2, "0");
672
470
  case "d":
673
- return String(T.$W);
471
+ return String(I.$W);
674
472
  case "dd":
675
- return re(x.weekdaysMin, T.$W, Y, 2);
473
+ return V(w.weekdaysMin, I.$W, Y, 2);
676
474
  case "ddd":
677
- return re(x.weekdaysShort, T.$W, Y, 3);
475
+ return V(w.weekdaysShort, I.$W, Y, 3);
678
476
  case "dddd":
679
- return Y[T.$W];
477
+ return Y[I.$W];
680
478
  case "H":
681
- return String(C);
479
+ return String(_);
682
480
  case "HH":
683
- return O.s(C, 2, "0");
481
+ return k.s(_, 2, "0");
684
482
  case "h":
685
- return de(1);
483
+ return tt(1);
686
484
  case "hh":
687
- return de(2);
485
+ return tt(2);
688
486
  case "a":
689
- return ae(C, U, !0);
487
+ return G(_, F, !0);
690
488
  case "A":
691
- return ae(C, U, !1);
489
+ return G(_, F, !1);
692
490
  case "m":
693
- return String(U);
491
+ return String(F);
694
492
  case "mm":
695
- return O.s(U, 2, "0");
493
+ return k.s(F, 2, "0");
696
494
  case "s":
697
- return String(T.$s);
495
+ return String(I.$s);
698
496
  case "ss":
699
- return O.s(T.$s, 2, "0");
497
+ return k.s(I.$s, 2, "0");
700
498
  case "SSS":
701
- return O.s(T.$ms, 3, "0");
499
+ return k.s(I.$ms, 3, "0");
702
500
  case "Z":
703
- return j;
501
+ return L;
704
502
  }
705
503
  return null;
706
- }(G) || j.replace(":", "");
707
- });
708
- }, D.utcOffset = function() {
504
+ })(U) || L.replace(":", "");
505
+ }));
506
+ }, O.utcOffset = function() {
709
507
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
710
- }, D.diff = function(v, T, x) {
711
- var R, j = this, C = O.p(T), U = d(v), z = (U.utcOffset() - this.utcOffset()) * s, Y = this - U, J = function() {
712
- return O.m(j, U);
508
+ }, O.diff = function(M, I, w) {
509
+ var C, L = this, _ = k.p(I), F = m(M), H = (F.utcOffset() - this.utcOffset()) * n, Y = this - F, B = function() {
510
+ return k.m(L, F);
713
511
  };
714
- switch (C) {
715
- case y:
716
- R = J() / 12;
512
+ switch (_) {
513
+ case b:
514
+ C = B() / 12;
717
515
  break;
718
- case a:
719
- R = J();
720
- break;
721
- case c:
722
- R = J() / 3;
516
+ case l:
517
+ C = B();
723
518
  break;
724
- case g:
725
- R = (Y - z) / 6048e5;
519
+ case h:
520
+ C = B() / 3;
726
521
  break;
727
- case m:
728
- R = (Y - z) / 864e5;
522
+ case d:
523
+ C = (Y - H) / 6048e5;
729
524
  break;
730
- case p:
731
- R = Y / i;
525
+ case c:
526
+ C = (Y - H) / 864e5;
732
527
  break;
733
528
  case u:
734
- R = Y / s;
529
+ C = Y / s;
735
530
  break;
736
- case l:
737
- R = Y / r;
531
+ case i:
532
+ C = Y / n;
533
+ break;
534
+ case o:
535
+ C = Y / e;
738
536
  break;
739
537
  default:
740
- R = Y;
538
+ C = Y;
741
539
  }
742
- return x ? R : O.a(R);
743
- }, D.daysInMonth = function() {
744
- return this.endOf(a).$D;
745
- }, D.$locale = function() {
746
- return k[this.$L];
747
- }, D.locale = function(v, T) {
748
- if (!v) return this.$L;
749
- var x = this.clone(), R = $(v, T, !0);
750
- return R && (x.$L = R), x;
751
- }, D.clone = function() {
752
- return O.w(this.$d, this);
753
- }, D.toDate = function() {
540
+ return w ? C : k.a(C);
541
+ }, O.daysInMonth = function() {
542
+ return this.endOf(l).$D;
543
+ }, O.$locale = function() {
544
+ return T[this.$L];
545
+ }, O.locale = function(M, I) {
546
+ if (!M) return this.$L;
547
+ var w = this.clone(), C = $(M, I, !0);
548
+ return C && (w.$L = C), w;
549
+ }, O.clone = function() {
550
+ return k.w(this.$d, this);
551
+ }, O.toDate = function() {
754
552
  return new Date(this.valueOf());
755
- }, D.toJSON = function() {
553
+ }, O.toJSON = function() {
756
554
  return this.isValid() ? this.toISOString() : null;
757
- }, D.toISOString = function() {
555
+ }, O.toISOString = function() {
758
556
  return this.$d.toISOString();
759
- }, D.toString = function() {
557
+ }, O.toString = function() {
760
558
  return this.$d.toUTCString();
761
- }, I;
762
- }(), ee = B.prototype;
763
- return d.prototype = ee, [["$ms", e], ["$s", l], ["$m", u], ["$H", p], ["$W", m], ["$M", a], ["$y", y], ["$D", h]].forEach(function(I) {
764
- ee[I[1]] = function(D) {
765
- return this.$g(D, I[0], I[1]);
559
+ }, E;
560
+ })(), A = W.prototype;
561
+ return m.prototype = A, [["$ms", t], ["$s", o], ["$m", i], ["$H", u], ["$W", c], ["$M", l], ["$y", b], ["$D", y]].forEach((function(E) {
562
+ A[E[1]] = function(O) {
563
+ return this.$g(O, E[0], E[1]);
766
564
  };
767
- }), d.extend = function(I, D) {
768
- return I.$i || (I(D, B, d), I.$i = !0), d;
769
- }, d.locale = $, d.isDayjs = W, d.unix = function(I) {
770
- return d(1e3 * I);
771
- }, d.en = k[L], d.Ls = k, d.p = {}, d;
772
- });
773
- }(be)), be.exports;
774
- }
775
- var $t = mt();
776
- const N = /* @__PURE__ */ ne($t);
777
- function gt(n, o, r, s) {
778
- if (!r.length)
779
- return { barMarginLeftAmount: 0, barWidthSize: 0 };
780
- const { tickUnit: i, unitPerTick: e } = K[s], l = r.reduce((f, S) => f + S.widthPx, 0), u = r[0].startDate, p = r[r.length - 1].startDate, m = N(p).add(e, i).diff(u), g = l / m, a = n.diff(u), c = o.diff(u), y = a * g, h = Math.max(c - a, 1) * g;
781
- return { barMarginLeftAmount: y, barWidthSize: h };
782
- }
783
- function vt(n) {
784
- let o = 1 / 0, r = -1 / 0;
785
- for (const { startDate: s, endDate: i } of Object.values(n)) {
786
- const e = N(s).valueOf(), l = N(i).valueOf();
787
- Number.isNaN(e) || (o = Math.min(o, e)), Number.isNaN(l) || (r = Math.max(r, l));
788
- }
789
- return { minDate: N(o), maxDate: N(r) };
565
+ })), m.extend = function(E, O) {
566
+ return E.$i || (E(O, W, m), E.$i = !0), m;
567
+ }, m.locale = $, m.isDayjs = g, m.unix = function(E) {
568
+ return m(1e3 * E);
569
+ }, m.en = T[R], m.Ls = T, m.p = {}, m;
570
+ }));
571
+ })(ot)), ot.exports;
790
572
  }
791
- function yt(n, o, r) {
792
- const { tickUnit: s, unitPerTick: i } = K[r];
793
- return {
794
- paddedMinDate: n.subtract(
795
- Be * i,
796
- s
797
- ),
798
- paddedMaxDate: o.add(Be * i, s)
799
- };
800
- }
801
- function Dt(n, o, r) {
802
- const { tickUnit: s, unitPerTick: i, basePxPerDragStep: e, dragStepUnit: l, dragStepAmount: u } = K[r], p = [];
803
- let m = n.startOf(s);
804
- for (; m.isBefore(o); ) {
805
- const g = N(m).add(i, s).diff(m, l) / u;
806
- p.push({
807
- startDate: m,
808
- widthPx: g * e
809
- }), m = m.add(i, s);
810
- }
811
- return p;
812
- }
813
- function ct(n, o) {
814
- const { labelUnit: r, formatHeaderLabel: s } = K[o], i = [];
815
- let e = null, l = "", u = 0, p = null;
816
- return n.forEach((m, g) => {
817
- const a = m.startDate.startOf(r), c = a.valueOf(), y = (s == null ? void 0 : s(a)) ?? a.format();
818
- c === e ? u += m.widthPx : (e !== null && i.push({
819
- label: l,
820
- widthPx: u,
821
- startDate: p
822
- }), e = c, l = y, u = m.widthPx, p = a), g === n.length - 1 && i.push({
823
- label: l,
824
- widthPx: u,
825
- startDate: p
826
- });
827
- }), i;
828
- }
829
- function St(n, o, r, s, i, e) {
830
- const { minDate: l, maxDate: u } = vt(n);
831
- r(l), s(u);
832
- const { paddedMinDate: p, paddedMaxDate: m } = yt(
833
- l,
834
- u,
835
- o
836
- ), g = Dt(
837
- p,
838
- m,
839
- o
840
- ), a = ct(g, o);
841
- i(g), e(a);
842
- }
843
- const xt = ({
844
- bottomRowCells: n,
845
- selectedScale: o,
846
- scrollRef: r
847
- }) => {
848
- var g;
849
- const s = K[o], [i, e] = oe(0), l = _e(
850
- () => ct(n, o),
851
- [n, o]
852
- ), u = _e(() => {
853
- const a = [];
854
- for (const c of l) {
855
- const y = a[a.length - 1];
856
- y && y.label === c.label ? y.widthPx += c.widthPx : a.push({ ...c });
857
- }
858
- return a;
859
- }, [l]), p = _e(() => {
860
- let a = 0;
861
- return u.map((c) => {
862
- const y = { ...c, left: a };
863
- return a += c.widthPx, y;
864
- });
865
- }, [u]);
866
- xe(() => {
867
- const a = r.current;
868
- if (!a) return;
869
- const c = () => {
870
- const y = a.scrollLeft;
871
- for (let h = p.length - 1; h >= 0; h--)
872
- if (y >= p[h].left) {
873
- e(h);
874
- break;
875
- }
876
- };
877
- return a.addEventListener("scroll", c), c(), () => a.removeEventListener("scroll", c);
878
- }, [p]);
879
- const m = ((g = p[i]) == null ? void 0 : g.label) ?? "";
880
- return /* @__PURE__ */ A.jsx(
881
- "div",
882
- {
883
- style: {
884
- position: "sticky",
885
- top: 0,
886
- zIndex: 30,
887
- backgroundColor: "#F0F1F2"
888
- },
889
- children: /* @__PURE__ */ A.jsxs(
890
- "div",
891
- {
892
- style: {
893
- display: "flex",
894
- minWidth: "max-content",
895
- flexDirection: "column"
896
- // backgroundColor: '#F0F1F2',
897
- },
898
- children: [
899
- /* @__PURE__ */ A.jsxs(
900
- "div",
901
- {
902
- style: {
903
- position: "relative",
904
- display: "flex",
905
- height: "32px"
906
- // backgroundColor: '#F0F1F2',
907
- },
908
- children: [
909
- /* @__PURE__ */ A.jsx(
910
- "div",
911
- {
912
- style: {
913
- position: "sticky",
914
- left: 0,
915
- zIndex: 40,
916
- display: "flex",
917
- width: "96px",
918
- flexShrink: 0,
919
- alignItems: "center",
920
- justifyContent: "center",
921
- backgroundColor: "#F0F1F2",
922
- // borderBottom: '1px solid #D6D6D8',
923
- fontSize: "0.875rem",
924
- fontWeight: "bold"
925
- },
926
- children: m
927
- }
928
- ),
929
- /* @__PURE__ */ A.jsx(
930
- "div",
931
- {
932
- style: {
933
- display: "flex"
934
- },
935
- children: p.map((a, c) => /* @__PURE__ */ A.jsx(
936
- "div",
937
- {
938
- style: {
939
- padding: "8px 16px",
940
- fontSize: "0.875rem",
941
- fontWeight: "bold",
942
- textAlign: "left",
943
- width: `${a.widthPx}px`,
944
- // borderBottom: '1px solid #D6D6D8',
945
- backgroundColor: "#F0F1F2"
946
- },
947
- children: /* @__PURE__ */ A.jsx(
948
- "p",
949
- {
950
- style: {
951
- margin: 0,
952
- padding: "0 16px"
953
- },
954
- children: c === 0 ? "" : a.label
955
- }
956
- )
957
- },
958
- c
959
- ))
960
- }
961
- )
962
- ]
963
- }
964
- ),
965
- /* @__PURE__ */ A.jsx(
966
- "div",
967
- {
968
- style: {
969
- borderTop: "1px solid #D6D6D8",
970
- display: "flex"
971
- },
972
- children: n.map((a, c) => {
973
- var h;
974
- const y = ((h = s.formatTickLabel) == null ? void 0 : h.call(s, a.startDate)) || "";
975
- return /* @__PURE__ */ A.jsx(
976
- "div",
977
- {
978
- style: {
979
- position: "relative",
980
- padding: "4px",
981
- textAlign: "center",
982
- fontSize: "0.75rem",
983
- width: `${a.widthPx}px`
984
- },
985
- children: y
986
- },
987
- c
988
- );
989
- })
990
- }
991
- )
992
- ]
573
+ var me = he();
574
+ const N = /* @__PURE__ */ j(me);
575
+ var at = { exports: {} }, $e = at.exports, Et;
576
+ function pe() {
577
+ return Et || (Et = 1, (function(r, a) {
578
+ (function(e, n) {
579
+ r.exports = n();
580
+ })($e, (function() {
581
+ var e, n, s = 1e3, t = 6e4, o = 36e5, i = 864e5, u = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, c = 31536e6, d = 2628e6, l = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, h = { years: c, months: d, days: i, hours: o, minutes: t, seconds: s, milliseconds: 1, weeks: 6048e5 }, b = function(T) {
582
+ return T instanceof z;
583
+ }, y = function(T, v, g) {
584
+ return new z(T, g, v.$l);
585
+ }, f = function(T) {
586
+ return n.p(T) + "s";
587
+ }, S = function(T) {
588
+ return T < 0;
589
+ }, D = function(T) {
590
+ return S(T) ? Math.ceil(T) : Math.floor(T);
591
+ }, x = function(T) {
592
+ return Math.abs(T);
593
+ }, p = function(T, v) {
594
+ return T ? S(T) ? { negative: !0, format: "" + x(T) + v } : { negative: !1, format: "" + T + v } : { negative: !1, format: "" };
595
+ }, z = (function() {
596
+ function T(g, $, m) {
597
+ var k = this;
598
+ if (this.$d = {}, this.$l = m, g === void 0 && (this.$ms = 0, this.parseFromMilliseconds()), $) return y(g * h[f($)], this);
599
+ if (typeof g == "number") return this.$ms = g, this.parseFromMilliseconds(), this;
600
+ if (typeof g == "object") return Object.keys(g).forEach((function(E) {
601
+ k.$d[f(E)] = g[E];
602
+ })), this.calMilliseconds(), this;
603
+ if (typeof g == "string") {
604
+ var W = g.match(l);
605
+ if (W) {
606
+ var A = W.slice(2).map((function(E) {
607
+ return E != null ? Number(E) : 0;
608
+ }));
609
+ return this.$d.years = A[0], this.$d.months = A[1], this.$d.weeks = A[2], this.$d.days = A[3], this.$d.hours = A[4], this.$d.minutes = A[5], this.$d.seconds = A[6], this.calMilliseconds(), this;
610
+ }
611
+ }
612
+ return this;
993
613
  }
994
- )
995
- }
996
- );
997
- };
998
- var we = { exports: {} }, bt = we.exports, Xe;
999
- function wt() {
1000
- return Xe || (Xe = 1, function(n, o) {
1001
- (function(r, s) {
1002
- n.exports = s();
1003
- })(bt, function() {
1004
- return function(r, s, i) {
1005
- s.prototype.isBetween = function(e, l, u, p) {
1006
- var m = i(e), g = i(l), a = (p = p || "()")[0] === "(", c = p[1] === ")";
1007
- return (a ? this.isAfter(m, u) : !this.isBefore(m, u)) && (c ? this.isBefore(g, u) : !this.isAfter(g, u)) || (a ? this.isBefore(m, u) : !this.isAfter(m, u)) && (c ? this.isAfter(g, u) : !this.isBefore(g, u));
614
+ var v = T.prototype;
615
+ return v.calMilliseconds = function() {
616
+ var g = this;
617
+ this.$ms = Object.keys(this.$d).reduce((function($, m) {
618
+ return $ + (g.$d[m] || 0) * h[m];
619
+ }), 0);
620
+ }, v.parseFromMilliseconds = function() {
621
+ var g = this.$ms;
622
+ this.$d.years = D(g / c), g %= c, this.$d.months = D(g / d), g %= d, this.$d.days = D(g / i), g %= i, this.$d.hours = D(g / o), g %= o, this.$d.minutes = D(g / t), g %= t, this.$d.seconds = D(g / s), g %= s, this.$d.milliseconds = g;
623
+ }, v.toISOString = function() {
624
+ var g = p(this.$d.years, "Y"), $ = p(this.$d.months, "M"), m = +this.$d.days || 0;
625
+ this.$d.weeks && (m += 7 * this.$d.weeks);
626
+ var k = p(m, "D"), W = p(this.$d.hours, "H"), A = p(this.$d.minutes, "M"), E = this.$d.seconds || 0;
627
+ this.$d.milliseconds && (E += this.$d.milliseconds / 1e3, E = Math.round(1e3 * E) / 1e3);
628
+ var O = p(E, "S"), M = g.negative || $.negative || k.negative || W.negative || A.negative || O.negative, I = W.format || A.format || O.format ? "T" : "", w = (M ? "-" : "") + "P" + g.format + $.format + k.format + I + W.format + A.format + O.format;
629
+ return w === "P" || w === "-P" ? "P0D" : w;
630
+ }, v.toJSON = function() {
631
+ return this.toISOString();
632
+ }, v.format = function(g) {
633
+ var $ = g || "YYYY-MM-DDTHH:mm:ss", m = { Y: this.$d.years, YY: n.s(this.$d.years, 2, "0"), YYYY: n.s(this.$d.years, 4, "0"), M: this.$d.months, MM: n.s(this.$d.months, 2, "0"), D: this.$d.days, DD: n.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: n.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: n.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: n.s(this.$d.seconds, 2, "0"), SSS: n.s(this.$d.milliseconds, 3, "0") };
634
+ return $.replace(u, (function(k, W) {
635
+ return W || String(m[k]);
636
+ }));
637
+ }, v.as = function(g) {
638
+ return this.$ms / h[f(g)];
639
+ }, v.get = function(g) {
640
+ var $ = this.$ms, m = f(g);
641
+ return m === "milliseconds" ? $ %= 1e3 : $ = m === "weeks" ? D($ / h[m]) : this.$d[m], $ || 0;
642
+ }, v.add = function(g, $, m) {
643
+ var k;
644
+ return k = $ ? g * h[f($)] : b(g) ? g.$ms : y(g, this).$ms, y(this.$ms + k * (m ? -1 : 1), this);
645
+ }, v.subtract = function(g, $) {
646
+ return this.add(g, $, !0);
647
+ }, v.locale = function(g) {
648
+ var $ = this.clone();
649
+ return $.$l = g, $;
650
+ }, v.clone = function() {
651
+ return y(this.$ms, this);
652
+ }, v.humanize = function(g) {
653
+ return e().add(this.$ms, "ms").locale(this.$l).fromNow(!g);
654
+ }, v.valueOf = function() {
655
+ return this.asMilliseconds();
656
+ }, v.milliseconds = function() {
657
+ return this.get("milliseconds");
658
+ }, v.asMilliseconds = function() {
659
+ return this.as("milliseconds");
660
+ }, v.seconds = function() {
661
+ return this.get("seconds");
662
+ }, v.asSeconds = function() {
663
+ return this.as("seconds");
664
+ }, v.minutes = function() {
665
+ return this.get("minutes");
666
+ }, v.asMinutes = function() {
667
+ return this.as("minutes");
668
+ }, v.hours = function() {
669
+ return this.get("hours");
670
+ }, v.asHours = function() {
671
+ return this.as("hours");
672
+ }, v.days = function() {
673
+ return this.get("days");
674
+ }, v.asDays = function() {
675
+ return this.as("days");
676
+ }, v.weeks = function() {
677
+ return this.get("weeks");
678
+ }, v.asWeeks = function() {
679
+ return this.as("weeks");
680
+ }, v.months = function() {
681
+ return this.get("months");
682
+ }, v.asMonths = function() {
683
+ return this.as("months");
684
+ }, v.years = function() {
685
+ return this.get("years");
686
+ }, v.asYears = function() {
687
+ return this.as("years");
688
+ }, T;
689
+ })(), R = function(T, v, g) {
690
+ return T.add(v.years() * g, "y").add(v.months() * g, "M").add(v.days() * g, "d").add(v.hours() * g, "h").add(v.minutes() * g, "m").add(v.seconds() * g, "s").add(v.milliseconds() * g, "ms");
691
+ };
692
+ return function(T, v, g) {
693
+ e = g, n = g().$utils(), g.duration = function(k, W) {
694
+ var A = g.locale();
695
+ return y(k, { $l: A }, W);
696
+ }, g.isDuration = b;
697
+ var $ = v.prototype.add, m = v.prototype.subtract;
698
+ v.prototype.add = function(k, W) {
699
+ return b(k) ? R(this, k, 1) : $.bind(this)(k, W);
700
+ }, v.prototype.subtract = function(k, W) {
701
+ return b(k) ? R(this, k, -1) : m.bind(this)(k, W);
1008
702
  };
1009
703
  };
1010
- });
1011
- }(we)), we.exports;
704
+ }));
705
+ })(at)), at.exports;
706
+ }
707
+ var ge = pe();
708
+ const ve = /* @__PURE__ */ j(ge);
709
+ var ut = { exports: {} }, ye = ut.exports, It;
710
+ function Se() {
711
+ return It || (It = 1, (function(r, a) {
712
+ (function(e, n) {
713
+ r.exports = n();
714
+ })(ye, (function() {
715
+ return function(e, n, s) {
716
+ n.prototype.isBetween = function(t, o, i, u) {
717
+ var c = s(t), d = s(o), l = (u = u || "()")[0] === "(", h = u[1] === ")";
718
+ return (l ? this.isAfter(c, i) : !this.isBefore(c, i)) && (h ? this.isBefore(d, i) : !this.isAfter(d, i)) || (l ? this.isBefore(c, i) : !this.isAfter(c, i)) && (h ? this.isAfter(d, i) : !this.isBefore(d, i));
719
+ };
720
+ };
721
+ }));
722
+ })(ut)), ut.exports;
1012
723
  }
1013
- var Tt = wt();
1014
- const kt = /* @__PURE__ */ ne(Tt);
1015
- var Te = { exports: {} }, Et = Te.exports, Ve;
1016
- function Mt() {
1017
- return Ve || (Ve = 1, function(n, o) {
1018
- (function(r, s) {
1019
- n.exports = s();
1020
- })(Et, function() {
1021
- var r = "day";
1022
- return function(s, i, e) {
1023
- var l = function(m) {
1024
- return m.add(4 - m.isoWeekday(), r);
1025
- }, u = i.prototype;
1026
- u.isoWeekYear = function() {
1027
- return l(this).year();
1028
- }, u.isoWeek = function(m) {
1029
- if (!this.$utils().u(m)) return this.add(7 * (m - this.isoWeek()), r);
1030
- var g, a, c, y, h = l(this), f = (g = this.isoWeekYear(), a = this.$u, c = (a ? e.utc : e)().year(g).startOf("year"), y = 4 - c.isoWeekday(), c.isoWeekday() > 4 && (y += 7), c.add(y, r));
1031
- return h.diff(f, "week") + 1;
1032
- }, u.isoWeekday = function(m) {
1033
- return this.$utils().u(m) ? this.day() || 7 : this.day(this.day() % 7 ? m : m - 7);
724
+ var be = Se();
725
+ const xe = /* @__PURE__ */ j(be);
726
+ var ct = { exports: {} }, Me = ct.exports, zt;
727
+ function we() {
728
+ return zt || (zt = 1, (function(r, a) {
729
+ (function(e, n) {
730
+ r.exports = n();
731
+ })(Me, (function() {
732
+ var e = "day";
733
+ return function(n, s, t) {
734
+ var o = function(c) {
735
+ return c.add(4 - c.isoWeekday(), e);
736
+ }, i = s.prototype;
737
+ i.isoWeekYear = function() {
738
+ return o(this).year();
739
+ }, i.isoWeek = function(c) {
740
+ if (!this.$utils().u(c)) return this.add(7 * (c - this.isoWeek()), e);
741
+ var d, l, h, b, y = o(this), f = (d = this.isoWeekYear(), l = this.$u, h = (l ? t.utc : t)().year(d).startOf("year"), b = 4 - h.isoWeekday(), h.isoWeekday() > 4 && (b += 7), h.add(b, e));
742
+ return y.diff(f, "week") + 1;
743
+ }, i.isoWeekday = function(c) {
744
+ return this.$utils().u(c) ? this.day() || 7 : this.day(this.day() % 7 ? c : c - 7);
1034
745
  };
1035
- var p = u.startOf;
1036
- u.startOf = function(m, g) {
1037
- var a = this.$utils(), c = !!a.u(g) || g;
1038
- return a.p(m) === "isoweek" ? c ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : p.bind(this)(m, g);
746
+ var u = i.startOf;
747
+ i.startOf = function(c, d) {
748
+ var l = this.$utils(), h = !!l.u(d) || d;
749
+ return l.p(c) === "isoweek" ? h ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : u.bind(this)(c, d);
1039
750
  };
1040
751
  };
1041
- });
1042
- }(Te)), Te.exports;
752
+ }));
753
+ })(ct)), ct.exports;
1043
754
  }
1044
- var It = Mt();
1045
- const Ot = /* @__PURE__ */ ne(It);
1046
- var ke = { exports: {} }, Rt = ke.exports, Je;
1047
- function Lt() {
1048
- return Je || (Je = 1, function(n, o) {
1049
- (function(r, s) {
1050
- n.exports = s();
1051
- })(Rt, function() {
1052
- return function(r, s) {
1053
- s.prototype.isSameOrAfter = function(i, e) {
1054
- return this.isSame(i, e) || this.isAfter(i, e);
755
+ var De = we();
756
+ const Oe = /* @__PURE__ */ j(De);
757
+ var lt = { exports: {} }, ke = lt.exports, Ct;
758
+ function Te() {
759
+ return Ct || (Ct = 1, (function(r, a) {
760
+ (function(e, n) {
761
+ r.exports = n();
762
+ })(ke, (function() {
763
+ return function(e, n) {
764
+ n.prototype.isSameOrAfter = function(s, t) {
765
+ return this.isSame(s, t) || this.isAfter(s, t);
1055
766
  };
1056
767
  };
1057
- });
1058
- }(ke)), ke.exports;
768
+ }));
769
+ })(lt)), lt.exports;
1059
770
  }
1060
- var Ft = Lt();
1061
- const jt = /* @__PURE__ */ ne(Ft);
1062
- var Ee = { exports: {} }, Zt = Ee.exports, Qe;
1063
- function _t() {
1064
- return Qe || (Qe = 1, function(n, o) {
1065
- (function(r, s) {
1066
- n.exports = s();
1067
- })(Zt, function() {
1068
- return function(r, s) {
1069
- s.prototype.isSameOrBefore = function(i, e) {
1070
- return this.isSame(i, e) || this.isBefore(i, e);
771
+ var Ee = Te();
772
+ const Ie = /* @__PURE__ */ j(Ee);
773
+ var ft = { exports: {} }, ze = ft.exports, Lt;
774
+ function Ce() {
775
+ return Lt || (Lt = 1, (function(r, a) {
776
+ (function(e, n) {
777
+ r.exports = n();
778
+ })(ze, (function() {
779
+ return function(e, n) {
780
+ n.prototype.isSameOrBefore = function(s, t) {
781
+ return this.isSame(s, t) || this.isBefore(s, t);
1071
782
  };
1072
783
  };
1073
- });
1074
- }(Ee)), Ee.exports;
784
+ }));
785
+ })(ft)), ft.exports;
1075
786
  }
1076
- var Pt = _t();
1077
- const Ct = /* @__PURE__ */ ne(Pt);
1078
- var Me = { exports: {} }, At = Me.exports, Ke;
1079
- function qt() {
1080
- return Ke || (Ke = 1, function(n, o) {
1081
- (function(r, s) {
1082
- n.exports = s();
1083
- })(At, function() {
1084
- return function(r, s, i) {
1085
- s.prototype.isToday = function() {
1086
- var e = "YYYY-MM-DD", l = i();
1087
- return this.format(e) === l.format(e);
787
+ var Le = Ce();
788
+ const Re = /* @__PURE__ */ j(Le);
789
+ var dt = { exports: {} }, _e = dt.exports, Rt;
790
+ function We() {
791
+ return Rt || (Rt = 1, (function(r, a) {
792
+ (function(e, n) {
793
+ r.exports = n();
794
+ })(_e, (function() {
795
+ return function(e, n, s) {
796
+ n.prototype.isToday = function() {
797
+ var t = "YYYY-MM-DD", o = s();
798
+ return this.format(t) === o.format(t);
1088
799
  };
1089
800
  };
1090
- });
1091
- }(Me)), Me.exports;
801
+ }));
802
+ })(dt)), dt.exports;
1092
803
  }
1093
- var Wt = qt();
1094
- const Nt = /* @__PURE__ */ ne(Wt);
1095
- var Ie = { exports: {} }, Ut = Ie.exports, et;
1096
- function Ht() {
1097
- return et || (et = 1, function(n, o) {
1098
- (function(r, s) {
1099
- n.exports = s();
1100
- })(Ut, function() {
1101
- return function(r, s, i) {
1102
- var e = s.prototype, l = function(a) {
1103
- return a && (a.indexOf ? a : a.s);
1104
- }, u = function(a, c, y, h, f) {
1105
- var S = a.name ? a : a.$locale(), E = l(S[c]), F = l(S[y]), M = E || F.map(function(L) {
1106
- return L.slice(0, h);
1107
- });
1108
- if (!f) return M;
1109
- var Z = S.weekStart;
1110
- return M.map(function(L, k) {
1111
- return M[(k + (Z || 0)) % 7];
1112
- });
1113
- }, p = function() {
1114
- return i.Ls[i.locale()];
1115
- }, m = function(a, c) {
1116
- return a.formats[c] || function(y) {
1117
- return y.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(h, f, S) {
804
+ var Pe = We();
805
+ const Ne = /* @__PURE__ */ j(Pe);
806
+ var ht = { exports: {} }, Fe = ht.exports, _t;
807
+ function He() {
808
+ return _t || (_t = 1, (function(r, a) {
809
+ (function(e, n) {
810
+ r.exports = n();
811
+ })(Fe, (function() {
812
+ return function(e, n, s) {
813
+ var t = n.prototype, o = function(l) {
814
+ return l && (l.indexOf ? l : l.s);
815
+ }, i = function(l, h, b, y, f) {
816
+ var S = l.name ? l : l.$locale(), D = o(S[h]), x = o(S[b]), p = D || x.map((function(R) {
817
+ return R.slice(0, y);
818
+ }));
819
+ if (!f) return p;
820
+ var z = S.weekStart;
821
+ return p.map((function(R, T) {
822
+ return p[(T + (z || 0)) % 7];
823
+ }));
824
+ }, u = function() {
825
+ return s.Ls[s.locale()];
826
+ }, c = function(l, h) {
827
+ return l.formats[h] || (function(b) {
828
+ return b.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(y, f, S) {
1118
829
  return f || S.slice(1);
1119
- });
1120
- }(a.formats[c.toUpperCase()]);
1121
- }, g = function() {
1122
- var a = this;
1123
- return { months: function(c) {
1124
- return c ? c.format("MMMM") : u(a, "months");
1125
- }, monthsShort: function(c) {
1126
- return c ? c.format("MMM") : u(a, "monthsShort", "months", 3);
830
+ }));
831
+ })(l.formats[h.toUpperCase()]);
832
+ }, d = function() {
833
+ var l = this;
834
+ return { months: function(h) {
835
+ return h ? h.format("MMMM") : i(l, "months");
836
+ }, monthsShort: function(h) {
837
+ return h ? h.format("MMM") : i(l, "monthsShort", "months", 3);
1127
838
  }, firstDayOfWeek: function() {
1128
- return a.$locale().weekStart || 0;
1129
- }, weekdays: function(c) {
1130
- return c ? c.format("dddd") : u(a, "weekdays");
1131
- }, weekdaysMin: function(c) {
1132
- return c ? c.format("dd") : u(a, "weekdaysMin", "weekdays", 2);
1133
- }, weekdaysShort: function(c) {
1134
- return c ? c.format("ddd") : u(a, "weekdaysShort", "weekdays", 3);
1135
- }, longDateFormat: function(c) {
1136
- return m(a.$locale(), c);
839
+ return l.$locale().weekStart || 0;
840
+ }, weekdays: function(h) {
841
+ return h ? h.format("dddd") : i(l, "weekdays");
842
+ }, weekdaysMin: function(h) {
843
+ return h ? h.format("dd") : i(l, "weekdaysMin", "weekdays", 2);
844
+ }, weekdaysShort: function(h) {
845
+ return h ? h.format("ddd") : i(l, "weekdaysShort", "weekdays", 3);
846
+ }, longDateFormat: function(h) {
847
+ return c(l.$locale(), h);
1137
848
  }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
1138
849
  };
1139
- e.localeData = function() {
1140
- return g.bind(this)();
1141
- }, i.localeData = function() {
1142
- var a = p();
850
+ t.localeData = function() {
851
+ return d.bind(this)();
852
+ }, s.localeData = function() {
853
+ var l = u();
1143
854
  return { firstDayOfWeek: function() {
1144
- return a.weekStart || 0;
855
+ return l.weekStart || 0;
1145
856
  }, weekdays: function() {
1146
- return i.weekdays();
857
+ return s.weekdays();
1147
858
  }, weekdaysShort: function() {
1148
- return i.weekdaysShort();
859
+ return s.weekdaysShort();
1149
860
  }, weekdaysMin: function() {
1150
- return i.weekdaysMin();
861
+ return s.weekdaysMin();
1151
862
  }, months: function() {
1152
- return i.months();
863
+ return s.months();
1153
864
  }, monthsShort: function() {
1154
- return i.monthsShort();
1155
- }, longDateFormat: function(c) {
1156
- return m(a, c);
1157
- }, meridiem: a.meridiem, ordinal: a.ordinal };
1158
- }, i.months = function() {
1159
- return u(p(), "months");
1160
- }, i.monthsShort = function() {
1161
- return u(p(), "monthsShort", "months", 3);
1162
- }, i.weekdays = function(a) {
1163
- return u(p(), "weekdays", null, null, a);
1164
- }, i.weekdaysShort = function(a) {
1165
- return u(p(), "weekdaysShort", "weekdays", 3, a);
1166
- }, i.weekdaysMin = function(a) {
1167
- return u(p(), "weekdaysMin", "weekdays", 2, a);
865
+ return s.monthsShort();
866
+ }, longDateFormat: function(h) {
867
+ return c(l, h);
868
+ }, meridiem: l.meridiem, ordinal: l.ordinal };
869
+ }, s.months = function() {
870
+ return i(u(), "months");
871
+ }, s.monthsShort = function() {
872
+ return i(u(), "monthsShort", "months", 3);
873
+ }, s.weekdays = function(l) {
874
+ return i(u(), "weekdays", null, null, l);
875
+ }, s.weekdaysShort = function(l) {
876
+ return i(u(), "weekdaysShort", "weekdays", 3, l);
877
+ }, s.weekdaysMin = function(l) {
878
+ return i(u(), "weekdaysMin", "weekdays", 2, l);
1168
879
  };
1169
880
  };
1170
- });
1171
- }(Ie)), Ie.exports;
881
+ }));
882
+ })(ht)), ht.exports;
883
+ }
884
+ var Ae = He();
885
+ const Ye = /* @__PURE__ */ j(Ae);
886
+ var mt = { exports: {} }, Ue = mt.exports, Wt;
887
+ function je() {
888
+ return Wt || (Wt = 1, (function(r, a) {
889
+ (function(e, n) {
890
+ r.exports = n();
891
+ })(Ue, (function() {
892
+ return function(e, n, s) {
893
+ var t = function(o, i) {
894
+ if (!i || !i.length || i.length === 1 && !i[0] || i.length === 1 && Array.isArray(i[0]) && !i[0].length) return null;
895
+ var u;
896
+ i.length === 1 && i[0].length > 0 && (i = i[0]), u = (i = i.filter((function(d) {
897
+ return d;
898
+ })))[0];
899
+ for (var c = 1; c < i.length; c += 1) i[c].isValid() && !i[c][o](u) || (u = i[c]);
900
+ return u;
901
+ };
902
+ s.max = function() {
903
+ var o = [].slice.call(arguments, 0);
904
+ return t("isAfter", o);
905
+ }, s.min = function() {
906
+ var o = [].slice.call(arguments, 0);
907
+ return t("isBefore", o);
908
+ };
909
+ };
910
+ }));
911
+ })(mt)), mt.exports;
1172
912
  }
1173
- var zt = Ht();
1174
- const Yt = /* @__PURE__ */ ne(zt);
1175
- var Oe = { exports: {} }, Bt = Oe.exports, tt;
1176
- function Gt() {
1177
- return tt || (tt = 1, function(n, o) {
1178
- (function(r, s) {
1179
- n.exports = s();
1180
- })(Bt, function() {
1181
- var r = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, s = {};
1182
- return function(i, e, l) {
1183
- var u, p = function(c, y, h) {
1184
- h === void 0 && (h = {});
1185
- var f = new Date(c), S = function(E, F) {
1186
- F === void 0 && (F = {});
1187
- var M = F.timeZoneName || "short", Z = E + "|" + M, L = s[Z];
1188
- return L || (L = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: E, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: M }), s[Z] = L), L;
1189
- }(y, h);
913
+ var Be = je();
914
+ const qe = /* @__PURE__ */ j(Be);
915
+ var $t = { exports: {} }, Ve = $t.exports, Pt;
916
+ function Ge() {
917
+ return Pt || (Pt = 1, (function(r, a) {
918
+ (function(e, n) {
919
+ r.exports = n();
920
+ })(Ve, (function() {
921
+ var e = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, n = {};
922
+ return function(s, t, o) {
923
+ var i, u = function(h, b, y) {
924
+ y === void 0 && (y = {});
925
+ var f = new Date(h), S = (function(D, x) {
926
+ x === void 0 && (x = {});
927
+ var p = x.timeZoneName || "short", z = D + "|" + p, R = n[z];
928
+ return R || (R = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: D, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: p }), n[z] = R), R;
929
+ })(b, y);
1190
930
  return S.formatToParts(f);
1191
- }, m = function(c, y) {
1192
- for (var h = p(c, y), f = [], S = 0; S < h.length; S += 1) {
1193
- var E = h[S], F = E.type, M = E.value, Z = r[F];
1194
- Z >= 0 && (f[Z] = parseInt(M, 10));
931
+ }, c = function(h, b) {
932
+ for (var y = u(h, b), f = [], S = 0; S < y.length; S += 1) {
933
+ var D = y[S], x = D.type, p = D.value, z = e[x];
934
+ z >= 0 && (f[z] = parseInt(p, 10));
1195
935
  }
1196
- var L = f[3], k = L === 24 ? 0 : L, P = f[0] + "-" + f[1] + "-" + f[2] + " " + k + ":" + f[4] + ":" + f[5] + ":000", W = +c;
1197
- return (l.utc(P).valueOf() - (W -= W % 1e3)) / 6e4;
1198
- }, g = e.prototype;
1199
- g.tz = function(c, y) {
1200
- c === void 0 && (c = u);
1201
- var h, f = this.utcOffset(), S = this.toDate(), E = S.toLocaleString("en-US", { timeZone: c }), F = Math.round((S - new Date(E)) / 1e3 / 60), M = 15 * -Math.round(S.getTimezoneOffset() / 15) - F;
1202
- if (!Number(M)) h = this.utcOffset(0, y);
1203
- else if (h = l(E, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(M, !0), y) {
1204
- var Z = h.utcOffset();
1205
- h = h.add(f - Z, "minute");
936
+ var R = f[3], T = R === 24 ? 0 : R, v = f[0] + "-" + f[1] + "-" + f[2] + " " + T + ":" + f[4] + ":" + f[5] + ":000", g = +h;
937
+ return (o.utc(v).valueOf() - (g -= g % 1e3)) / 6e4;
938
+ }, d = t.prototype;
939
+ d.tz = function(h, b) {
940
+ h === void 0 && (h = i);
941
+ var y, f = this.utcOffset(), S = this.toDate(), D = S.toLocaleString("en-US", { timeZone: h }), x = Math.round((S - new Date(D)) / 1e3 / 60), p = 15 * -Math.round(S.getTimezoneOffset() / 15) - x;
942
+ if (!Number(p)) y = this.utcOffset(0, b);
943
+ else if (y = o(D, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(p, !0), b) {
944
+ var z = y.utcOffset();
945
+ y = y.add(f - z, "minute");
1206
946
  }
1207
- return h.$x.$timezone = c, h;
1208
- }, g.offsetName = function(c) {
1209
- var y = this.$x.$timezone || l.tz.guess(), h = p(this.valueOf(), y, { timeZoneName: c }).find(function(f) {
947
+ return y.$x.$timezone = h, y;
948
+ }, d.offsetName = function(h) {
949
+ var b = this.$x.$timezone || o.tz.guess(), y = u(this.valueOf(), b, { timeZoneName: h }).find((function(f) {
1210
950
  return f.type.toLowerCase() === "timezonename";
1211
- });
1212
- return h && h.value;
951
+ }));
952
+ return y && y.value;
1213
953
  };
1214
- var a = g.startOf;
1215
- g.startOf = function(c, y) {
1216
- if (!this.$x || !this.$x.$timezone) return a.call(this, c, y);
1217
- var h = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
1218
- return a.call(h, c, y).tz(this.$x.$timezone, !0);
1219
- }, l.tz = function(c, y, h) {
1220
- var f = h && y, S = h || y || u, E = m(+l(), S);
1221
- if (typeof c != "string") return l(c).tz(S);
1222
- var F = function(k, P, W) {
1223
- var $ = k - 60 * P * 1e3, d = m($, W);
1224
- if (P === d) return [$, P];
1225
- var O = m($ -= 60 * (d - P) * 1e3, W);
1226
- return d === O ? [$, d] : [k - 60 * Math.min(d, O) * 1e3, Math.max(d, O)];
1227
- }(l.utc(c, f).valueOf(), E, S), M = F[0], Z = F[1], L = l(M).utcOffset(Z);
1228
- return L.$x.$timezone = S, L;
1229
- }, l.tz.guess = function() {
954
+ var l = d.startOf;
955
+ d.startOf = function(h, b) {
956
+ if (!this.$x || !this.$x.$timezone) return l.call(this, h, b);
957
+ var y = o(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
958
+ return l.call(y, h, b).tz(this.$x.$timezone, !0);
959
+ }, o.tz = function(h, b, y) {
960
+ var f = y && b, S = y || b || i, D = c(+o(), S);
961
+ if (typeof h != "string") return o(h).tz(S);
962
+ var x = (function(T, v, g) {
963
+ var $ = T - 60 * v * 1e3, m = c($, g);
964
+ if (v === m) return [$, v];
965
+ var k = c($ -= 60 * (m - v) * 1e3, g);
966
+ return m === k ? [$, m] : [T - 60 * Math.min(m, k) * 1e3, Math.max(m, k)];
967
+ })(o.utc(h, f).valueOf(), D, S), p = x[0], z = x[1], R = o(p).utcOffset(z);
968
+ return R.$x.$timezone = S, R;
969
+ }, o.tz.guess = function() {
1230
970
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
1231
- }, l.tz.setDefault = function(c) {
1232
- u = c;
971
+ }, o.tz.setDefault = function(h) {
972
+ i = h;
1233
973
  };
1234
974
  };
1235
- });
1236
- }(Oe)), Oe.exports;
975
+ }));
976
+ })($t)), $t.exports;
1237
977
  }
1238
- var Xt = Gt();
1239
- const Vt = /* @__PURE__ */ ne(Xt);
1240
- var Re = { exports: {} }, Jt = Re.exports, nt;
1241
- function Qt() {
1242
- return nt || (nt = 1, function(n, o) {
1243
- (function(r, s) {
1244
- n.exports = s();
1245
- })(Jt, function() {
1246
- return function(r, s, i) {
1247
- i.updateLocale = function(e, l) {
1248
- var u = i.Ls[e];
1249
- if (u) return (l ? Object.keys(l) : []).forEach(function(p) {
1250
- u[p] = l[p];
1251
- }), u;
978
+ var Xe = Ge();
979
+ const Ze = /* @__PURE__ */ j(Xe);
980
+ var pt = { exports: {} }, Je = pt.exports, Nt;
981
+ function Ke() {
982
+ return Nt || (Nt = 1, (function(r, a) {
983
+ (function(e, n) {
984
+ r.exports = n();
985
+ })(Je, (function() {
986
+ return function(e, n, s) {
987
+ s.updateLocale = function(t, o) {
988
+ var i = s.Ls[t];
989
+ if (i) return (o ? Object.keys(o) : []).forEach((function(u) {
990
+ i[u] = o[u];
991
+ })), i;
1252
992
  };
1253
993
  };
1254
- });
1255
- }(Re)), Re.exports;
994
+ }));
995
+ })(pt)), pt.exports;
1256
996
  }
1257
- var Kt = Qt();
1258
- const en = /* @__PURE__ */ ne(Kt);
1259
- var Le = { exports: {} }, tn = Le.exports, rt;
997
+ var Qe = Ke();
998
+ const tn = /* @__PURE__ */ j(Qe);
999
+ var gt = { exports: {} }, en = gt.exports, Ft;
1260
1000
  function nn() {
1261
- return rt || (rt = 1, function(n, o) {
1262
- (function(r, s) {
1263
- n.exports = s();
1264
- })(tn, function() {
1265
- var r = "minute", s = /[+-]\d\d(?::?\d\d)?/g, i = /([+-]|\d\d)/g;
1266
- return function(e, l, u) {
1267
- var p = l.prototype;
1268
- u.utc = function(f) {
1001
+ return Ft || (Ft = 1, (function(r, a) {
1002
+ (function(e, n) {
1003
+ r.exports = n();
1004
+ })(en, (function() {
1005
+ var e = "minute", n = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
1006
+ return function(t, o, i) {
1007
+ var u = o.prototype;
1008
+ i.utc = function(f) {
1269
1009
  var S = { date: f, utc: !0, args: arguments };
1270
- return new l(S);
1271
- }, p.utc = function(f) {
1272
- var S = u(this.toDate(), { locale: this.$L, utc: !0 });
1273
- return f ? S.add(this.utcOffset(), r) : S;
1274
- }, p.local = function() {
1275
- return u(this.toDate(), { locale: this.$L, utc: !1 });
1010
+ return new o(S);
1011
+ }, u.utc = function(f) {
1012
+ var S = i(this.toDate(), { locale: this.$L, utc: !0 });
1013
+ return f ? S.add(this.utcOffset(), e) : S;
1014
+ }, u.local = function() {
1015
+ return i(this.toDate(), { locale: this.$L, utc: !1 });
1276
1016
  };
1277
- var m = p.parse;
1278
- p.parse = function(f) {
1279
- f.utc && (this.$u = !0), this.$utils().u(f.$offset) || (this.$offset = f.$offset), m.call(this, f);
1017
+ var c = u.parse;
1018
+ u.parse = function(f) {
1019
+ f.utc && (this.$u = !0), this.$utils().u(f.$offset) || (this.$offset = f.$offset), c.call(this, f);
1280
1020
  };
1281
- var g = p.init;
1282
- p.init = function() {
1021
+ var d = u.init;
1022
+ u.init = function() {
1283
1023
  if (this.$u) {
1284
1024
  var f = this.$d;
1285
1025
  this.$y = f.getUTCFullYear(), this.$M = f.getUTCMonth(), this.$D = f.getUTCDate(), this.$W = f.getUTCDay(), this.$H = f.getUTCHours(), this.$m = f.getUTCMinutes(), this.$s = f.getUTCSeconds(), this.$ms = f.getUTCMilliseconds();
1286
- } else g.call(this);
1026
+ } else d.call(this);
1287
1027
  };
1288
- var a = p.utcOffset;
1289
- p.utcOffset = function(f, S) {
1290
- var E = this.$utils().u;
1291
- if (E(f)) return this.$u ? 0 : E(this.$offset) ? a.call(this) : this.$offset;
1292
- if (typeof f == "string" && (f = function(L) {
1293
- L === void 0 && (L = "");
1294
- var k = L.match(s);
1295
- if (!k) return null;
1296
- var P = ("" + k[0]).match(i) || ["-", 0, 0], W = P[0], $ = 60 * +P[1] + +P[2];
1297
- return $ === 0 ? 0 : W === "+" ? $ : -$;
1298
- }(f), f === null)) return this;
1299
- var F = Math.abs(f) <= 16 ? 60 * f : f, M = this;
1300
- if (S) return M.$offset = F, M.$u = f === 0, M;
1301
- if (f !== 0) {
1302
- var Z = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
1303
- (M = this.local().add(F + Z, r)).$offset = F, M.$x.$localOffset = Z;
1304
- } else M = this.utc();
1305
- return M;
1028
+ var l = u.utcOffset;
1029
+ u.utcOffset = function(f, S) {
1030
+ var D = this.$utils().u;
1031
+ if (D(f)) return this.$u ? 0 : D(this.$offset) ? l.call(this) : this.$offset;
1032
+ if (typeof f == "string" && (f = (function(R) {
1033
+ R === void 0 && (R = "");
1034
+ var T = R.match(n);
1035
+ if (!T) return null;
1036
+ var v = ("" + T[0]).match(s) || ["-", 0, 0], g = v[0], $ = 60 * +v[1] + +v[2];
1037
+ return $ === 0 ? 0 : g === "+" ? $ : -$;
1038
+ })(f), f === null)) return this;
1039
+ var x = Math.abs(f) <= 16 ? 60 * f : f;
1040
+ if (x === 0) return this.utc(S);
1041
+ var p = this.clone();
1042
+ if (S) return p.$offset = x, p.$u = !1, p;
1043
+ var z = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
1044
+ return (p = this.local().add(x + z, e)).$offset = x, p.$x.$localOffset = z, p;
1306
1045
  };
1307
- var c = p.format;
1308
- p.format = function(f) {
1046
+ var h = u.format;
1047
+ u.format = function(f) {
1309
1048
  var S = f || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
1310
- return c.call(this, S);
1311
- }, p.valueOf = function() {
1049
+ return h.call(this, S);
1050
+ }, u.valueOf = function() {
1312
1051
  var f = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
1313
1052
  return this.$d.valueOf() - 6e4 * f;
1314
- }, p.isUTC = function() {
1053
+ }, u.isUTC = function() {
1315
1054
  return !!this.$u;
1316
- }, p.toISOString = function() {
1055
+ }, u.toISOString = function() {
1317
1056
  return this.toDate().toISOString();
1318
- }, p.toString = function() {
1057
+ }, u.toString = function() {
1319
1058
  return this.toDate().toUTCString();
1320
1059
  };
1321
- var y = p.toDate;
1322
- p.toDate = function(f) {
1323
- return f === "s" && this.$offset ? u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : y.call(this);
1060
+ var b = u.toDate;
1061
+ u.toDate = function(f) {
1062
+ return f === "s" && this.$offset ? i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : b.call(this);
1324
1063
  };
1325
- var h = p.diff;
1326
- p.diff = function(f, S, E) {
1327
- if (f && this.$u === f.$u) return h.call(this, f, S, E);
1328
- var F = this.local(), M = u(f).local();
1329
- return h.call(F, M, S, E);
1064
+ var y = u.diff;
1065
+ u.diff = function(f, S, D) {
1066
+ if (f && this.$u === f.$u) return y.call(this, f, S, D);
1067
+ var x = this.local(), p = i(f).local();
1068
+ return y.call(x, p, S, D);
1330
1069
  };
1331
1070
  };
1332
- });
1333
- }(Le)), Le.exports;
1071
+ }));
1072
+ })(gt)), gt.exports;
1334
1073
  }
1335
1074
  var rn = nn();
1336
- const an = /* @__PURE__ */ ne(rn);
1337
- var Fe = { exports: {} }, on = Fe.exports, at;
1338
- function sn() {
1339
- return at || (at = 1, function(n, o) {
1340
- (function(r, s) {
1341
- n.exports = s();
1342
- })(on, function() {
1343
- return function(r, s) {
1344
- s.prototype.weekday = function(i) {
1345
- var e = this.$locale().weekStart || 0, l = this.$W, u = (l < e ? l + 7 : l) - e;
1346
- return this.$utils().u(i) ? u : this.subtract(u, "day").add(i, "day");
1075
+ const sn = /* @__PURE__ */ j(rn);
1076
+ var vt = { exports: {} }, on = vt.exports, Ht;
1077
+ function an() {
1078
+ return Ht || (Ht = 1, (function(r, a) {
1079
+ (function(e, n) {
1080
+ r.exports = n();
1081
+ })(on, (function() {
1082
+ return function(e, n) {
1083
+ n.prototype.weekday = function(s) {
1084
+ var t = this.$locale().weekStart || 0, o = this.$W, i = (o < t ? o + 7 : o) - t;
1085
+ return this.$utils().u(s) ? i : this.subtract(i, "day").add(s, "day");
1347
1086
  };
1348
1087
  };
1349
- });
1350
- }(Fe)), Fe.exports;
1088
+ }));
1089
+ })(vt)), vt.exports;
1351
1090
  }
1352
- var un = sn();
1353
- const cn = /* @__PURE__ */ ne(un);
1091
+ var un = an();
1092
+ const cn = /* @__PURE__ */ j(un);
1093
+ N.extend(qe);
1094
+ N.extend(ve);
1354
1095
  N.extend(cn);
1355
- N.extend(Nt);
1356
- N.extend(an);
1357
- N.extend(Vt);
1358
- N.extend(jt);
1359
- N.extend(Ct);
1360
- N.extend(kt);
1361
- N.extend(Yt);
1362
- N.extend(en);
1363
- N.extend(Ot);
1364
- function dn(n) {
1365
- return [...n].sort((o, r) => {
1366
- const s = o.sequence.split(".").map(Number), i = r.sequence.split(".").map(Number);
1367
- for (let e = 0; e < Math.max(s.length, i.length); e++) {
1368
- const l = s[e] || 0, u = i[e] || 0;
1369
- if (l !== u) return l - u;
1096
+ N.extend(Ne);
1097
+ N.extend(sn);
1098
+ N.extend(Ze);
1099
+ N.extend(Ie);
1100
+ N.extend(Re);
1101
+ N.extend(xe);
1102
+ N.extend(Ye);
1103
+ N.extend(tn);
1104
+ N.extend(Oe);
1105
+ const ln = {
1106
+ minute: 1,
1107
+ hour: 60,
1108
+ day: 1440,
1109
+ week: 1440 * 7,
1110
+ month: 1440 * 30
1111
+ }, fn = (r, a, e, n) => a === "left" ? Math.min(r, e - n) : a === "right" ? Math.max(r, -e + n) : r, dn = (r, a, e) => a === "left" && r < 0 ? Math.floor(r / e) * e : a === "right" && r > 0 ? Math.ceil(r / e) * e : r, hn = (r, a, e, n) => {
1112
+ const s = { offsetStartDate: e, offsetEndDate: n };
1113
+ switch (r) {
1114
+ case "bar":
1115
+ return { ...s, offsetX: a, offsetWidth: 0 };
1116
+ case "left":
1117
+ return { ...s, offsetX: a, offsetWidth: -a };
1118
+ case "right":
1119
+ return { ...s, offsetX: 0, offsetWidth: a };
1120
+ default:
1121
+ return { ...s, offsetX: 0, offsetWidth: 0 };
1122
+ }
1123
+ }, At = 8, mn = (r) => {
1124
+ const e = r.currentTarget.getBoundingClientRect(), n = r.clientX - e.left;
1125
+ return n <= At ? "left" : n >= e.width - At ? "right" : "bar";
1126
+ };
1127
+ function $n(r, a) {
1128
+ const {
1129
+ rawTasks: e,
1130
+ selectedScale: n,
1131
+ setCurrentTask: s,
1132
+ setDragOffset: t,
1133
+ clearDragOffset: o,
1134
+ setRawTasks: i
1135
+ } = Jt(), u = St(null), c = St(null), d = Z[n], { basePxPerDragStep: l, dragStepAmount: h, dragStepUnit: b } = d, y = h * ln[b] / l, f = (x) => {
1136
+ const p = u.current;
1137
+ if (!p) return;
1138
+ let z = x.clientX - p.initialClientX;
1139
+ z = fn(z, p.mode, r.barWidth, l), z = dn(z, p.mode, l);
1140
+ const R = Math.round(z / p.basePxPerDragStep);
1141
+ if (R === p.dragSteps) return;
1142
+ p.dragSteps = R;
1143
+ const T = R * p.basePxPerDragStep, v = T * p.minutesPerPixel, g = p.mode === "right" ? p.initialStartDate : p.initialStartDate.add(v, "minute"), $ = p.mode === "left" ? p.initialEndDate : p.initialEndDate.add(v, "minute");
1144
+ t(r.id, hn(p.mode, T, g, $));
1145
+ }, S = () => {
1146
+ var T;
1147
+ document.removeEventListener("pointermove", f), document.removeEventListener("pointerup", S), document.removeEventListener("pointercancel", S);
1148
+ const x = u.current;
1149
+ if (!x) return;
1150
+ const p = (v) => v.add(x.dragSteps * h, b).toISOString(), z = e.map((v) => {
1151
+ if (v.id !== r.id) return v;
1152
+ switch (x.mode) {
1153
+ case "bar":
1154
+ return {
1155
+ ...v,
1156
+ startDate: p(N(v.startDate)),
1157
+ endDate: p(N(v.endDate))
1158
+ };
1159
+ case "left":
1160
+ return { ...v, startDate: p(N(v.startDate)) };
1161
+ case "right":
1162
+ return { ...v, endDate: p(N(v.endDate)) };
1163
+ default:
1164
+ return v;
1165
+ }
1166
+ });
1167
+ i(z), a == null || a(z);
1168
+ const R = c.current;
1169
+ R !== null && ((T = document.getElementById(`task-${r.id}`)) == null || T.releasePointerCapture(R)), c.current = null, u.current = null, s(null), o(r.id);
1170
+ };
1171
+ return { onPointerDown: (x) => {
1172
+ const p = mn(x);
1173
+ u.current = {
1174
+ mode: p,
1175
+ initialClientX: x.clientX,
1176
+ initialStartDate: N(r.startDate),
1177
+ initialEndDate: N(r.endDate),
1178
+ dragSteps: 0,
1179
+ basePxPerDragStep: l,
1180
+ minutesPerPixel: y
1181
+ }, s(r), x.currentTarget.setPointerCapture(x.pointerId), c.current = x.pointerId, document.addEventListener("pointermove", f), document.addEventListener("pointerup", S), document.addEventListener("pointercancel", S);
1182
+ } };
1183
+ }
1184
+ const Yt = 8, pn = {
1185
+ day: "MMM D, h A",
1186
+ week: "MMM D",
1187
+ month: "MMM D",
1188
+ year: "MMM YYYY"
1189
+ };
1190
+ function gn({
1191
+ currentTask: r,
1192
+ onTasksChange: a
1193
+ }) {
1194
+ const e = St(null), { onPointerDown: n } = $n(r, a), [s, t] = Mt("grab"), o = rt((D) => D.dragOffsets[r.id]), i = rt((D) => {
1195
+ var x;
1196
+ return ((x = D.currentTask) == null ? void 0 : x.id) === r.id;
1197
+ }), u = rt((D) => D.selectedScale), c = (o == null ? void 0 : o.offsetX) ?? 0, d = (o == null ? void 0 : o.offsetWidth) ?? 0, l = r.barLeft + c, h = r.barWidth + d, b = Qt((D) => {
1198
+ const x = e.current;
1199
+ if (!x) return;
1200
+ const p = x.getBoundingClientRect(), z = D.clientX - p.left;
1201
+ z <= Yt || z >= p.width - Yt ? t("ew-resize") : t("grab");
1202
+ }, []), y = pn[u], f = o == null ? void 0 : o.offsetStartDate.format(y), S = o == null ? void 0 : o.offsetEndDate.format(y);
1203
+ return /* @__PURE__ */ X(
1204
+ "div",
1205
+ {
1206
+ ref: e,
1207
+ id: `task-${r.id}`,
1208
+ className: `gantt-task-bar ${i ? "dragging" : ""}`,
1209
+ onPointerDown: n,
1210
+ onMouseMove: b,
1211
+ onMouseLeave: () => t("grab"),
1212
+ style: {
1213
+ transform: `translateX(${l}px)`,
1214
+ width: h,
1215
+ height: bt / 2,
1216
+ cursor: i ? "grabbing" : s
1217
+ },
1218
+ role: "button",
1219
+ tabIndex: 0,
1220
+ "aria-label": `Task: ${r.name}`,
1221
+ children: [
1222
+ /* @__PURE__ */ P("span", { className: "gantt-task-name", children: r.name }),
1223
+ i && o && /* @__PURE__ */ X("div", { className: "gantt-bar-tooltip", role: "status", "aria-live": "polite", children: [
1224
+ f,
1225
+ " → ",
1226
+ S
1227
+ ] })
1228
+ ]
1229
+ }
1230
+ );
1231
+ }
1232
+ function vn(r) {
1233
+ const a = [];
1234
+ for (const e of r) {
1235
+ const n = a[a.length - 1];
1236
+ n && n.label === e.label ? n.widthPx += e.widthPx : a.push({ ...e });
1237
+ }
1238
+ return a;
1239
+ }
1240
+ function yn(r) {
1241
+ let a = 0;
1242
+ return r.map((e) => {
1243
+ const n = { ...e, left: a };
1244
+ return a += e.widthPx, n;
1245
+ });
1246
+ }
1247
+ function Sn(r) {
1248
+ const a = vn(r);
1249
+ return yn(a);
1250
+ }
1251
+ function Ut(r) {
1252
+ return r.split(".").map(Number);
1253
+ }
1254
+ function bn(r) {
1255
+ return [...r].sort((a, e) => {
1256
+ const n = Ut(a.sequence), s = Ut(e.sequence), t = Math.max(n.length, s.length);
1257
+ for (let o = 0; o < t; o++) {
1258
+ const i = n[o] || 0, u = s[o] || 0;
1259
+ if (i !== u) return i - u;
1370
1260
  }
1371
1261
  return 0;
1372
1262
  });
1373
1263
  }
1374
- function ln(n) {
1375
- return n.split(".").length - 1;
1264
+ function xn(r) {
1265
+ return r.split(".").length - 1;
1376
1266
  }
1377
- function Pe(n, o, r) {
1378
- const s = dn(n);
1379
- let i = 0;
1380
- return s.map((e) => {
1381
- i++;
1382
- const l = ln(e.sequence), { barMarginLeftAmount: u, barWidthSize: p } = gt(
1383
- N(e.startDate),
1384
- N(e.endDate),
1385
- o,
1386
- r
1267
+ function Mn(r, a, e) {
1268
+ return bn(r).map((s, t) => {
1269
+ const o = xn(s.sequence), i = t + 1, { barMarginLeftAmount: u, barWidthSize: c } = wn(
1270
+ N(s.startDate),
1271
+ N(s.endDate),
1272
+ a,
1273
+ e
1387
1274
  );
1388
1275
  return {
1389
- ...e,
1276
+ ...s,
1390
1277
  barLeft: u,
1391
- barWidth: p,
1392
- depth: l,
1278
+ barWidth: c,
1279
+ depth: o,
1393
1280
  order: i,
1394
1281
  originalOrder: i
1395
1282
  };
1396
1283
  });
1397
1284
  }
1398
- const ot = (n) => {
1399
- let o;
1400
- const r = /* @__PURE__ */ new Set(), s = (m, g) => {
1401
- const a = typeof m == "function" ? m(o) : m;
1402
- if (!Object.is(a, o)) {
1403
- const c = o;
1404
- o = g ?? (typeof a != "object" || a === null) ? a : Object.assign({}, o, a), r.forEach((y) => y(o, c));
1285
+ function wn(r, a, e, n) {
1286
+ if (!e.length)
1287
+ return { barMarginLeftAmount: 0, barWidthSize: 0 };
1288
+ const s = Z[n], { tickUnit: t, unitPerTick: o } = s;
1289
+ let i = 0, u = 0, c = !1;
1290
+ const d = r.valueOf(), l = a.valueOf();
1291
+ for (const h of e) {
1292
+ const b = h.startDate, y = b.add(o, t), f = h.widthPx, S = b.valueOf(), D = y.valueOf();
1293
+ if (D <= d) {
1294
+ i += f;
1295
+ continue;
1405
1296
  }
1406
- }, i = () => o, u = { setState: s, getState: i, getInitialState: () => p, subscribe: (m) => (r.add(m), () => r.delete(m)) }, p = o = n(s, i, u);
1407
- return u;
1408
- }, fn = (n) => n ? ot(n) : ot, pn = (n) => n;
1409
- function hn(n, o = pn) {
1410
- const r = Ce.useSyncExternalStore(
1411
- n.subscribe,
1412
- () => o(n.getState()),
1413
- () => o(n.getInitialState())
1414
- );
1415
- return Ce.useDebugValue(r), r;
1297
+ if (S >= l)
1298
+ break;
1299
+ const x = d > S ? r : b, p = l < D ? a : y, z = D - S, T = (p.valueOf() - x.valueOf()) / z;
1300
+ if (!c && x.valueOf() > S) {
1301
+ const v = (x.valueOf() - S) / z;
1302
+ i += v * f;
1303
+ }
1304
+ u += T * f, c = !0;
1305
+ }
1306
+ return {
1307
+ barMarginLeftAmount: i,
1308
+ barWidthSize: Math.max(u, 1)
1309
+ };
1416
1310
  }
1417
- const st = (n) => {
1418
- const o = fn(n), r = (s) => hn(o, s);
1419
- return Object.assign(r, o), r;
1420
- }, mn = (n) => n ? st(n) : st, ye = mn((n, o) => ({
1421
- rawTasks: [],
1422
- transformedTasks: [],
1423
- bottomRowCells: [],
1424
- topHeaderGroups: [],
1425
- selectedScale: "month",
1426
- minDate: N(),
1427
- maxDate: N(),
1428
- draggingTaskMeta: null,
1429
- setSelectedScale: (r) => {
1430
- const { rawTasks: s, bottomRowCells: i } = o(), e = Pe(s, i, r);
1431
- n({ selectedScale: r, transformedTasks: e });
1432
- },
1433
- setRawTasks: (r) => {
1434
- const { bottomRowCells: s, selectedScale: i } = o(), e = Pe(r, s, i);
1435
- n({ rawTasks: r, transformedTasks: e });
1436
- },
1437
- setBottomRowCells: (r) => {
1438
- const { rawTasks: s, selectedScale: i } = o(), e = Pe(s, r, i);
1439
- n({ bottomRowCells: r, transformedTasks: e });
1440
- },
1441
- setTopHeaderGroups: (r) => n({ topHeaderGroups: r }),
1442
- setMinDate: (r) => n({ minDate: r }),
1443
- setMaxDate: (r) => n({ maxDate: r }),
1444
- setDraggingTaskMeta: (r) => n({ draggingTaskMeta: r }),
1445
- clearDraggingTaskMeta: () => n({ draggingTaskMeta: null })
1446
- })), $n = [{ id: "1", name: "Project Kickoff", startDate: "2024-06-01T09:00:00Z", endDate: "2024-06-01T11:00:00Z", parentId: null, sequence: "1", dependencies: [] }, { id: "2", name: "Requirement Gathering", startDate: "2024-06-02T09:00:00Z", endDate: "2024-06-05T17:00:00Z", parentId: null, sequence: "2", dependencies: [{ targetId: "1", type: "FS" }] }, { id: "3", name: "Stakeholder Interviews", startDate: "2024-06-02T10:00:00Z", endDate: "2024-06-03T17:00:00Z", parentId: "2", sequence: "2.1", dependencies: [{ targetId: "1", type: "SF" }] }, { id: "4", name: "Market Analysis", startDate: "2024-06-06T09:00:00Z", endDate: "2024-06-07T17:00:00Z", parentId: null, sequence: "3", dependencies: [{ targetId: "2", type: "FS" }] }, { id: "5", name: "Design System Creation", startDate: "2024-06-08T09:00:00Z", endDate: "2024-06-12T17:00:00Z", parentId: null, sequence: "4", dependencies: [{ targetId: "2", type: "FS" }, { targetId: "3", type: "SS" }] }, { id: "6", name: "UI/UX Design", startDate: "2024-06-13T09:00:00Z", endDate: "2024-06-16T17:00:00Z", parentId: "5", sequence: "4.1", dependencies: [{ targetId: "5", type: "FS" }] }, { id: "7", name: "Prototyping", startDate: "2024-06-17T09:00:00Z", endDate: "2024-06-20T17:00:00Z", parentId: "6", sequence: "4.1.1", dependencies: [{ targetId: "6", type: "FS" }] }, { id: "8", name: "Frontend Development", startDate: "2024-06-21T09:00:00Z", endDate: "2024-06-30T17:00:00Z", parentId: null, sequence: "5", dependencies: [{ targetId: "7", type: "FS" }] }, { id: "9", name: "Backend Development", startDate: "2024-07-01T09:00:00Z", endDate: "2024-07-10T17:00:00Z", parentId: null, sequence: "6", dependencies: [{ targetId: "7", type: "FS" }] }, { id: "10", name: "API Integration", startDate: "2024-07-11T09:00:00Z", endDate: "2024-07-15T17:00:00Z", parentId: "9", sequence: "6.1", dependencies: [{ targetId: "9", type: "FS" }] }, { id: "11", name: "Module Development", startDate: "2024-07-16T09:00:00Z", endDate: "2024-07-20T17:00:00Z", parentId: "8", sequence: "5.1", dependencies: [{ targetId: "8", type: "FS" }] }, { id: "12", name: "Unit Testing", startDate: "2024-07-21T09:00:00Z", endDate: "2024-07-25T17:00:00Z", parentId: "8", sequence: "5.2", dependencies: [{ targetId: "8", type: "FS" }] }, { id: "13", name: "Integration Testing", startDate: "2024-07-26T09:00:00Z", endDate: "2024-07-30T17:00:00Z", parentId: "10", sequence: "6.1.1", dependencies: [{ targetId: "10", type: "FS" }] }, { id: "14", name: "Code Review", startDate: "2024-07-31T09:00:00Z", endDate: "2024-08-04T17:00:00Z", parentId: "10", sequence: "6.1.2", dependencies: [{ targetId: "13", type: "FS" }] }, { id: "15", name: "Community Feedback", startDate: "2024-08-05T09:00:00Z", endDate: "2024-08-08T17:00:00Z", parentId: null, sequence: "7", dependencies: [{ targetId: "14", type: "FS" }] }, { id: "16", name: "Documentation Drafting", startDate: "2024-08-09T09:00:00Z", endDate: "2024-08-12T17:00:00Z", parentId: null, sequence: "8", dependencies: [{ targetId: "14", type: "FS" }] }, { id: "17", name: "Documentation Finalization", startDate: "2024-08-13T09:00:00Z", endDate: "2024-08-16T17:00:00Z", parentId: "16", sequence: "8.1", dependencies: [{ targetId: "16", type: "FS" }] }, { id: "18", name: "Pre-release Demo", startDate: "2024-08-17T09:00:00Z", endDate: "2024-08-20T17:00:00Z", parentId: null, sequence: "9", dependencies: [{ targetId: "15", type: "FS" }] }, { id: "19", name: "Bug Fixing", startDate: "2024-08-21T09:00:00Z", endDate: "2024-08-25T17:00:00Z", parentId: null, sequence: "10", dependencies: [{ targetId: "15", type: "FS" }] }, { id: "20", name: "Release Candidate", startDate: "2024-08-26T09:00:00Z", endDate: "2024-08-30T17:00:00Z", parentId: null, sequence: "11", dependencies: [{ targetId: "18", type: "FS" }] }, { id: "21", name: "Final Release", startDate: "2024-08-31T09:00:00Z", endDate: "2024-09-02T17:00:00Z", parentId: null, sequence: "12", dependencies: [{ targetId: "20", type: "FS" }] }, { id: "22", name: "Post-release Monitoring", startDate: "2024-09-03T09:00:00Z", endDate: "2024-09-04T17:00:00Z", parentId: null, sequence: "13", dependencies: [{ targetId: "21", type: "FS" }] }, { id: "23", name: "Community Engagement", startDate: "2024-09-05T09:00:00Z", endDate: "2024-09-06T17:00:00Z", parentId: null, sequence: "14", dependencies: [{ targetId: "21", type: "FS" }] }, { id: "24", name: "Feature Iteration Planning", startDate: "2024-09-07T09:00:00Z", endDate: "2024-09-08T17:00:00Z", parentId: null, sequence: "15", dependencies: [{ targetId: "22", type: "FS" }] }, { id: "25", name: "Additional Module Development", startDate: "2024-09-09T09:00:00Z", endDate: "2024-09-10T17:00:00Z", parentId: "24", sequence: "15.1", dependencies: [{ targetId: "24", type: "FS" }] }, { id: "26", name: "Additional Testing", startDate: "2024-09-11T09:00:00Z", endDate: "2024-09-12T17:00:00Z", parentId: "25", sequence: "15.1.1", dependencies: [{ targetId: "25", type: "FS" }] }, { id: "27", name: "Code Refactoring", startDate: "2024-09-13T09:00:00Z", endDate: "2024-09-14T17:00:00Z", parentId: null, sequence: "16", dependencies: [{ targetId: "26", type: "FS" }] }, { id: "28", name: "Performance Optimization", startDate: "2024-09-15T09:00:00Z", endDate: "2024-09-16T17:00:00Z", parentId: "27", sequence: "16.1", dependencies: [{ targetId: "27", type: "FS" }] }, { id: "29", name: "Security Audit", startDate: "2024-09-17T09:00:00Z", endDate: "2024-09-18T17:00:00Z", parentId: null, sequence: "17", dependencies: [{ targetId: "28", type: "FS" }] }, { id: "30", name: "Final QA", startDate: "2024-09-19T09:00:00Z", endDate: "2024-09-20T17:00:00Z", parentId: null, sequence: "18", dependencies: [{ targetId: "29", type: "FS" }] }, { id: "31", name: "Launch Webinar", startDate: "2024-09-21T09:00:00Z", endDate: "2024-09-22T17:00:00Z", parentId: null, sequence: "19", dependencies: [{ targetId: "21", type: "SS" }] }, { id: "32", name: "Marketing Campaign", startDate: "2024-09-23T09:00:00Z", endDate: "2024-09-24T17:00:00Z", parentId: null, sequence: "20", dependencies: [{ targetId: "21", type: "SF" }] }, { id: "33", name: "Post-release Bug Fixing", startDate: "2024-09-25T09:00:00Z", endDate: "2024-09-26T17:00:00Z", parentId: null, sequence: "21", dependencies: [{ targetId: "22", type: "SS" }] }, { id: "34", name: "Version 1.1 Planning", startDate: "2024-09-27T09:00:00Z", endDate: "2024-09-28T17:00:00Z", parentId: null, sequence: "22", dependencies: [{ targetId: "24", type: "FS" }] }, { id: "35", name: "Feature Implementation", startDate: "2024-09-29T09:00:00Z", endDate: "2024-09-30T17:00:00Z", parentId: "34", sequence: "22.1", dependencies: [{ targetId: "34", type: "FS" }] }, { id: "36", name: "Beta Testing", startDate: "2024-10-01T09:00:00Z", endDate: "2024-10-02T17:00:00Z", parentId: "35", sequence: "22.1.1", dependencies: [{ targetId: "35", type: "FS" }] }, { id: "37", name: "Community Beta Feedback", startDate: "2024-10-03T09:00:00Z", endDate: "2024-10-04T17:00:00Z", parentId: "36", sequence: "22.1.2", dependencies: [{ targetId: "36", type: "FS" }] }, { id: "38", name: "Final Beta Fixes", startDate: "2024-10-05T09:00:00Z", endDate: "2024-10-06T17:00:00Z", parentId: "37", sequence: "22.1.3", dependencies: [{ targetId: "37", type: "FS" }] }, { id: "39", name: "Documentation Update", startDate: "2024-10-07T09:00:00Z", endDate: "2024-10-08T17:00:00Z", parentId: "17", sequence: "8.1.1", dependencies: [{ targetId: "17", type: "FS" }] }, { id: "40", name: "Final Release Version 1.1", startDate: "2024-10-09T09:00:00Z", endDate: "2024-10-10T17:00:00Z", parentId: null, sequence: "23", dependencies: [{ targetId: "38", type: "FS" }] }, { id: "41", name: "Project Retrospective", startDate: "2024-10-11T09:00:00Z", endDate: "2024-10-12T17:00:00Z", parentId: null, sequence: "24", dependencies: [{ targetId: "40", type: "FS" }] }], it = (n) => /* @__PURE__ */ Ue.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ Ue.createElement("path", { d: "M10.2 4L10.2 20L7.8 20L7.8 4L10.2 4ZM15 4L15 20L12.6 20L12.6 4L15 4ZM5.4 15.0999L5.4 7.8999L1.8 11.4999L5.4 15.0999ZM17.4 7.8999L17.4 15.0999L21 11.4999L17.4 7.8999Z" }));
1447
- function me(n, o) {
1448
- const { basePxPerDragStep: r } = K[o];
1449
- return Math.round(n / r);
1311
+ function Dn(r) {
1312
+ let a = 1 / 0, e = -1 / 0;
1313
+ for (const n of r) {
1314
+ const s = N(n.startDate).valueOf(), t = N(n.endDate).valueOf();
1315
+ Number.isNaN(s) || (a = Math.min(a, s)), Number.isNaN(t) || (e = Math.max(e, t));
1316
+ }
1317
+ return {
1318
+ minDate: N(a),
1319
+ maxDate: N(e)
1320
+ };
1450
1321
  }
1451
- function gn(n, o, r) {
1452
- const {
1453
- rawTasks: s,
1454
- selectedScale: i,
1455
- setRawTasks: e,
1456
- setDraggingTaskMeta: l,
1457
- clearDraggingTaskMeta: u
1458
- } = ye(), [p, m] = oe(o), g = V(o), a = V(null), c = V(o), y = V(n.startDate), h = V(n.endDate), f = (F) => {
1459
- a.current = F.clientX, c.current = o, y.current = n.startDate, h.current = n.endDate, m(o), g.current = o, l({ taskId: n.id, type: "bar" }), document.addEventListener("mousemove", S), document.addEventListener("mouseup", E);
1460
- }, S = (F) => {
1461
- if (a.current === null) return;
1462
- const M = F.clientX - a.current, L = me(M, i) * K[i].basePxPerDragStep, k = c.current + L;
1463
- m(k), g.current = k;
1464
- }, E = () => {
1465
- document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", E);
1466
- const F = g.current - c.current, M = me(F, i), { dragStepUnit: Z, dragStepAmount: L } = K[i], k = s.map(
1467
- (P) => P.id === n.id ? {
1468
- ...P,
1469
- startDate: N(y.current).add(M * L, Z).toISOString(),
1470
- endDate: N(h.current).add(M * L, Z).toISOString()
1471
- } : P
1472
- );
1473
- e(k), r == null || r(k), u(), a.current = null;
1322
+ function On(r, a, e) {
1323
+ const n = Z[e], { tickUnit: s, unitPerTick: t } = n, o = ee * t;
1324
+ return {
1325
+ paddedMinDate: r.subtract(o, s),
1326
+ paddedMaxDate: a.add(o, s)
1474
1327
  };
1475
- return { onDragStart: f, tempLeft: p };
1476
1328
  }
1477
- function vn(n, o, r, s) {
1478
- const {
1479
- rawTasks: i,
1480
- selectedScale: e,
1481
- setRawTasks: l,
1482
- setDraggingTaskMeta: u,
1483
- clearDraggingTaskMeta: p
1484
- } = ye(), [m, g] = oe(o), [a, c] = oe(r), y = V(o), h = V(r), f = V(null), S = V(o), E = V(r), F = V(n.startDate), M = (k) => {
1485
- k.stopPropagation(), f.current = k.clientX, S.current = o, E.current = r, F.current = n.startDate, g(o), c(r), y.current = o, h.current = r, u({ taskId: n.id, type: "left" }), document.addEventListener("mousemove", Z), document.addEventListener("mouseup", L);
1486
- }, Z = (k) => {
1487
- if (f.current == null) return;
1488
- const P = k.clientX - f.current, $ = me(P, e) * K[e].basePxPerDragStep, d = S.current + $, O = E.current - $;
1489
- O < 1 || (g(d), c(O), y.current = d, h.current = O);
1490
- }, L = () => {
1491
- document.removeEventListener("mousemove", Z), document.removeEventListener("mouseup", L);
1492
- const k = y.current - S.current, P = me(k, e), { dragStepUnit: W, dragStepAmount: $ } = K[e], d = i.map((O) => {
1493
- if (O.id !== n.id) return O;
1494
- const B = N(F.current).add(
1495
- P * $,
1496
- W
1497
- );
1498
- return B.isAfter(N(O.endDate)) ? O : { ...O, startDate: B.toISOString() };
1329
+ function kn(r, a, e) {
1330
+ const n = Z[e], {
1331
+ tickUnit: s,
1332
+ unitPerTick: t,
1333
+ basePxPerDragStep: o,
1334
+ dragStepUnit: i,
1335
+ dragStepAmount: u
1336
+ } = n, c = [];
1337
+ let d = r.startOf(s);
1338
+ const l = a.valueOf(), h = o / u;
1339
+ for (; d.valueOf() < l; ) {
1340
+ const b = d.add(t, s), f = b.diff(d, i) * h;
1341
+ c.push({
1342
+ startDate: d,
1343
+ widthPx: f
1344
+ }), d = b;
1345
+ }
1346
+ return c;
1347
+ }
1348
+ function Tn(r, a) {
1349
+ const e = Z[a], { labelUnit: n, formatHeaderLabel: s } = e;
1350
+ if (r.length === 0) return [];
1351
+ const t = [];
1352
+ let o = null;
1353
+ for (const i of r) {
1354
+ const u = i.startDate.startOf(n), c = u.valueOf(), d = (s == null ? void 0 : s(u)) ?? u.format();
1355
+ o && o.startDate.valueOf() === c ? o.widthPx += i.widthPx : (o && t.push(o), o = {
1356
+ label: d,
1357
+ widthPx: i.widthPx,
1358
+ startDate: u
1499
1359
  });
1500
- l(d), s == null || s(d), p(), f.current = null;
1501
- };
1502
- return { onDragStart: M, tempLeft: m, tempWidth: a };
1360
+ }
1361
+ return o && t.push(o), t;
1503
1362
  }
1504
- function yn(n, o, r) {
1505
- const {
1506
- rawTasks: s,
1507
- selectedScale: i,
1508
- setRawTasks: e,
1509
- setDraggingTaskMeta: l,
1510
- clearDraggingTaskMeta: u
1511
- } = ye(), [p, m] = oe(o), g = V(o), a = V(null), c = V(o), y = V(n.endDate), h = (E) => {
1512
- E.stopPropagation(), a.current = E.clientX, c.current = o, y.current = n.endDate, m(o), g.current = o, l({ taskId: n.id, type: "right" }), document.addEventListener("mousemove", f), document.addEventListener("mouseup", S);
1513
- }, f = (E) => {
1514
- if (a.current === null) return;
1515
- const F = E.clientX - a.current, Z = me(F, i) * K[i].basePxPerDragStep, L = c.current + Z;
1516
- L < 1 || (m(L), g.current = L);
1517
- }, S = () => {
1518
- document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", S);
1519
- const E = g.current - c.current, F = me(E, i), { dragStepUnit: M, dragStepAmount: Z } = K[i], L = s.map((k) => {
1520
- if (k.id !== n.id) return k;
1521
- const P = N(y.current).add(
1522
- F * Z,
1523
- M
1363
+ function En(r, a) {
1364
+ if (!r.length)
1365
+ return { bottomCells: [], transformedTasks: [] };
1366
+ const { minDate: e, maxDate: n } = Dn(r), { paddedMinDate: s, paddedMaxDate: t } = On(
1367
+ e,
1368
+ n,
1369
+ a
1370
+ ), o = kn(
1371
+ s,
1372
+ t,
1373
+ a
1374
+ ), i = Mn(r, o, a);
1375
+ return { bottomCells: o, transformedTasks: i };
1376
+ }
1377
+ function In({
1378
+ bottomRowCells: r,
1379
+ selectedScale: a,
1380
+ width: e,
1381
+ scrollRef: n
1382
+ }) {
1383
+ const s = Z[a], [t, o] = Mt(0), i = st(() => {
1384
+ const u = Tn(r, a);
1385
+ return Sn(u);
1386
+ }, [r, a]);
1387
+ return Q(() => {
1388
+ const u = n.current;
1389
+ if (!u) return;
1390
+ const c = () => {
1391
+ const d = u.scrollLeft;
1392
+ for (let l = i.length - 1; l >= 0; l--)
1393
+ if (d >= i[l].left) {
1394
+ o(l);
1395
+ break;
1396
+ }
1397
+ };
1398
+ return u.addEventListener("scroll", c), c(), () => u.removeEventListener("scroll", c);
1399
+ }, [i, n]), /* @__PURE__ */ P("header", { className: "gantt-header", style: { width: `${e}px` }, children: /* @__PURE__ */ X("div", { className: "gantt-header-content", children: [
1400
+ /* @__PURE__ */ P("div", { className: "gantt-top-header", children: /* @__PURE__ */ P("div", { className: "gantt-top-groups", children: i.map((u, c) => {
1401
+ const d = c === t;
1402
+ return /* @__PURE__ */ P(
1403
+ "div",
1404
+ {
1405
+ className: `gantt-top-group ${d ? "sticky" : ""}`,
1406
+ style: {
1407
+ width: `${u.widthPx}px`,
1408
+ ...d && { left: 0 }
1409
+ },
1410
+ children: /* @__PURE__ */ P("p", { className: "gantt-top-group-label", children: u.label })
1411
+ },
1412
+ `${u.label}-${c}`
1524
1413
  );
1525
- return P.isBefore(N(k.startDate)) ? k : { ...k, endDate: P.toISOString() };
1526
- });
1527
- e(L), r == null || r(L), u(), a.current = null;
1528
- };
1529
- return { onDragStart: h, tempWidth: p };
1414
+ }) }) }),
1415
+ /* @__PURE__ */ P("div", { className: "gantt-bottom-row", children: r.map((u, c) => {
1416
+ var l;
1417
+ const d = ((l = s.formatTickLabel) == null ? void 0 : l.call(s, u.startDate)) || "";
1418
+ return /* @__PURE__ */ P(
1419
+ "div",
1420
+ {
1421
+ className: "gantt-bottom-cell",
1422
+ style: { width: `${u.widthPx}px` },
1423
+ children: d
1424
+ },
1425
+ `bottom-${c}`
1426
+ );
1427
+ }) })
1428
+ ] }) });
1530
1429
  }
1531
- function Dn(n, o, r, s, i) {
1532
- if (r < 0 || i < 0)
1533
- return `M ${o} ${r} h ${(s - o) / 2}`;
1534
- const e = 7, l = 11, u = 25, p = 20, m = `M ${o} ${r}`, g = s - o, a = i - r, c = Math.abs(g), y = Math.abs(a), h = i <= r, f = i >= r, S = s >= o, E = s <= o, F = c > p, M = Math.abs(g / 2), Z = Math.abs(a / 2);
1535
- function L() {
1430
+ function zn(r, a, e, n, s) {
1431
+ if (e < 0 || s < 0)
1432
+ return `M ${a} ${e} h ${(n - a) / 2}`;
1433
+ const t = 7, o = 11, i = 25, u = 20, c = `M ${a} ${e}`, d = n - a, l = s - e, h = Math.abs(d), b = Math.abs(l), y = s <= e, f = s >= e, S = n >= a, D = n <= a, x = h > u, p = Math.abs(d / 2), z = Math.abs(l / 2);
1434
+ function R() {
1536
1435
  function $() {
1537
- return (S || E) && f && !F ? "downSmallHorizontal" : (S || E) && h && !F ? "upSmallHorizontal" : f && E ? "downLeft" : f && S ? "downRight" : h && E ? "upLeft" : h && S ? "upRight" : "";
1436
+ return (S || D) && f && !x ? "downSmallHorizontal" : (S || D) && y && !x ? "upSmallHorizontal" : f && D ? "downLeft" : f && S ? "downRight" : y && D ? "upLeft" : y && S ? "upRight" : "";
1538
1437
  }
1539
- let d = m;
1438
+ let m = c;
1540
1439
  switch ($()) {
1541
1440
  case "downRight": {
1542
- d += ` h ${M - e}`, d += ` a ${e} ${e} 0 0 1 ${e} ${e}`, d += ` v ${a - e * 2}`, d += ` a ${e} ${e} 0 0 0 ${e} ${e}`, d += ` h ${M - e}`;
1441
+ m += ` h ${p - t}`, m += ` a ${t} ${t} 0 0 1 ${t} ${t}`, m += ` v ${l - t * 2}`, m += ` a ${t} ${t} 0 0 0 ${t} ${t}`, m += ` h ${p - t}`;
1543
1442
  break;
1544
1443
  }
1545
1444
  case "upRight": {
1546
- d += ` h ${M - e}`, d += ` a ${e} ${e} 0 0 0 ${e} -${e}`, d += ` v -${y - e * 2}`, d += ` a ${e} ${e} 0 0 1 ${e} -${e}`, d += ` h ${M - e}`;
1445
+ m += ` h ${p - t}`, m += ` a ${t} ${t} 0 0 0 ${t} -${t}`, m += ` v -${b - t * 2}`, m += ` a ${t} ${t} 0 0 1 ${t} -${t}`, m += ` h ${p - t}`;
1547
1446
  break;
1548
1447
  }
1549
1448
  case "downLeft":
1550
1449
  case "downSmallHorizontal": {
1551
- const B = r + a / 2;
1552
- d += ` h ${l}`, d += ` a ${e} ${e} 0 0 1 ${e} ${e}`, d += ` v ${B - r - e * 2}`, d += ` a ${e} ${e} 0 0 1 -${e} ${e}`, d += ` h ${g - 2 * l}`, d += ` a ${e} ${e} 0 0 0 -${e} ${e}`, d += ` v ${B - r - e * 2}`, d += ` a ${e} ${e} 0 0 0 ${e} ${e}`, d += ` h ${l}`;
1450
+ const W = e + l / 2;
1451
+ m += ` h ${o}`, m += ` a ${t} ${t} 0 0 1 ${t} ${t}`, m += ` v ${W - e - t * 2}`, m += ` a ${t} ${t} 0 0 1 -${t} ${t}`, m += ` h ${d - 2 * o}`, m += ` a ${t} ${t} 0 0 0 -${t} ${t}`, m += ` v ${W - e - t * 2}`, m += ` a ${t} ${t} 0 0 0 ${t} ${t}`, m += ` h ${o}`;
1553
1452
  break;
1554
1453
  }
1555
1454
  case "upLeft":
1556
1455
  case "upSmallHorizontal": {
1557
- const B = r + a / 2;
1558
- d += ` h ${l}`, d += ` a ${e} ${e} 0 0 0 ${e} -${e}`, d += ` v -${r - B - e * 2}`, d += ` a ${e} ${e} 0 0 0 -${e} -${e}`, d += ` h ${g - 2 * l}`, d += ` a ${e} ${e} 0 0 1 -${e} -${e}`, d += ` v -${r - B - e * 2}`, d += ` a ${e} ${e} 0 0 1 ${e} -${e}`, d += ` h ${l}`;
1456
+ const W = e + l / 2;
1457
+ m += ` h ${o}`, m += ` a ${t} ${t} 0 0 0 ${t} -${t}`, m += ` v -${e - W - t * 2}`, m += ` a ${t} ${t} 0 0 0 -${t} -${t}`, m += ` h ${d - 2 * o}`, m += ` a ${t} ${t} 0 0 1 -${t} -${t}`, m += ` v -${e - W - t * 2}`, m += ` a ${t} ${t} 0 0 1 ${t} -${t}`, m += ` h ${o}`;
1559
1458
  break;
1560
1459
  }
1561
1460
  default:
1562
- return d;
1461
+ return m;
1563
1462
  }
1564
- return d;
1463
+ return m;
1565
1464
  }
1566
- function k() {
1567
- let $ = m;
1568
- return f && E ? ($ += ` h ${u - l}`, $ += ` a ${e} ${e} 0 0 1 ${e} ${e}`, $ += ` v ${a - e * 2}`, $ += ` a ${e} ${e} 0 0 1 -${e} ${e}`, $ += ` h ${g - e * 2}`) : f && S ? ($ += ` h ${g + u - l}`, $ += ` a ${e} ${e} 0 0 1 ${e} ${e}`, $ += ` v ${a - e * 2}`, $ += ` a ${e} ${e} 0 0 1 -${e} ${e}`, $ += ` h -${u - l}`) : h && E ? ($ += ` h ${u - l}`, $ += ` a ${e} ${e} 0 0 0 ${e} -${e}`, $ += ` v ${a + e * 2}`, $ += ` a ${e} ${e} 0 0 0 -${e} -${e}`, $ += ` h ${g - u + l}`) : h && S && ($ += ` h ${g + u - l}`, $ += ` a ${e} ${e} 0 0 0 ${e} -${e}`, $ += ` v ${a + e * 2}`, $ += ` a ${e} ${e} 0 0 0 -${e} -${e}`, $ += ` h -${u - l}`), $;
1465
+ function T() {
1466
+ let $ = c;
1467
+ return f && D ? ($ += ` h ${i - o}`, $ += ` a ${t} ${t} 0 0 1 ${t} ${t}`, $ += ` v ${l - t * 2}`, $ += ` a ${t} ${t} 0 0 1 -${t} ${t}`, $ += ` h ${d - t * 2}`) : f && S ? ($ += ` h ${d + i - o}`, $ += ` a ${t} ${t} 0 0 1 ${t} ${t}`, $ += ` v ${l - t * 2}`, $ += ` a ${t} ${t} 0 0 1 -${t} ${t}`, $ += ` h -${i - o}`) : y && D ? ($ += ` h ${i - o}`, $ += ` a ${t} ${t} 0 0 0 ${t} -${t}`, $ += ` v ${l + t * 2}`, $ += ` a ${t} ${t} 0 0 0 -${t} -${t}`, $ += ` h ${d - i + o}`) : y && S && ($ += ` h ${d + i - o}`, $ += ` a ${t} ${t} 0 0 0 ${t} -${t}`, $ += ` v ${l + t * 2}`, $ += ` a ${t} ${t} 0 0 0 -${t} -${t}`, $ += ` h -${i - o}`), $;
1569
1468
  }
1570
- function P() {
1469
+ function v() {
1571
1470
  function $() {
1572
- return (S || E) && f && !F ? "downSmallHorizontal" : (S || E) && h && !F ? "upSmallHorizontal" : f && E ? "downLeft" : f && S ? "downRight" : h && E ? "upLeft" : h && S ? "upRight" : "";
1471
+ return (S || D) && f && !x ? "downSmallHorizontal" : (S || D) && y && !x ? "upSmallHorizontal" : f && D ? "downLeft" : f && S ? "downRight" : y && D ? "upLeft" : y && S ? "upRight" : "";
1573
1472
  }
1574
- let d = m;
1473
+ let m = c;
1575
1474
  switch ($()) {
1576
1475
  case "downRight":
1577
1476
  case "downSmallHorizontal": {
1578
- d += " h -11", d += ` a ${e} ${e} 0 0 0 -${e} ${e}`, d += ` v ${Z - e * 2}`, d += ` a ${e} ${e} 0 0 0 ${e} ${e}`, d += ` h ${l * 2 + g}`, d += ` a ${e} ${e} 0 0 1 ${e} ${e}`, d += ` v ${Z - e * 2}`, d += ` a ${e} ${e} 0 0 1 -${e} ${e}`, d += " h -11";
1477
+ m += ` h ${-o}`, m += ` a ${t} ${t} 0 0 0 -${t} ${t}`, m += ` v ${z - t * 2}`, m += ` a ${t} ${t} 0 0 0 ${t} ${t}`, m += ` h ${o * 2 + d}`, m += ` a ${t} ${t} 0 0 1 ${t} ${t}`, m += ` v ${z - t * 2}`, m += ` a ${t} ${t} 0 0 1 -${t} ${t}`, m += ` h ${-o}`;
1579
1478
  break;
1580
1479
  }
1581
1480
  case "upRight":
1582
1481
  case "upSmallHorizontal": {
1583
- d += " h -11", d += ` a ${e} ${e} 0 0 1 -${e} -${e}`, d += ` v ${-(Z - e * 2)}`, d += ` a ${e} ${e} 0 0 1 ${e} -${e}`, d += ` h ${l * 2 + g}`, d += ` a ${e} ${e} 0 0 0 ${e} -${e}`, d += ` v ${-(Z - e * 2)}`, d += ` a ${e} ${e} 0 0 0 -${e} -${e}`, d += " h -11";
1482
+ m += ` h ${-o}`, m += ` a ${t} ${t} 0 0 1 -${t} -${t}`, m += ` v ${-(z - t * 2)}`, m += ` a ${t} ${t} 0 0 1 ${t} -${t}`, m += ` h ${o * 2 + d}`, m += ` a ${t} ${t} 0 0 0 ${t} -${t}`, m += ` v ${-(z - t * 2)}`, m += ` a ${t} ${t} 0 0 0 -${t} -${t}`, m += ` h ${-o}`;
1584
1483
  break;
1585
1484
  }
1586
1485
  case "downLeft": {
1587
- d += ` h ${-M + e}`, d += ` a ${e} ${e} 0 0 0 -${e} ${e}`, d += ` v ${y - e * 2}`, d += ` a ${e} ${e} 0 0 1 -${e} ${e}`, d += ` h ${-M + e}`;
1486
+ m += ` h ${-p + t}`, m += ` a ${t} ${t} 0 0 0 -${t} ${t}`, m += ` v ${b - t * 2}`, m += ` a ${t} ${t} 0 0 1 -${t} ${t}`, m += ` h ${-p + t}`;
1588
1487
  break;
1589
1488
  }
1590
1489
  case "upLeft": {
1591
- d += ` h ${-(M - e)}`, d += ` a ${e} ${e} 0 0 1 -${e} -${e}`, d += ` v ${-(y - e * 2)}`, d += ` a ${e} ${e} 0 0 0 -${e} -${e}`, d += ` h ${-M + e}`;
1490
+ m += ` h ${-(p - t)}`, m += ` a ${t} ${t} 0 0 1 -${t} -${t}`, m += ` v ${-(b - t * 2)}`, m += ` a ${t} ${t} 0 0 0 -${t} -${t}`, m += ` h ${-p + t}`;
1592
1491
  break;
1593
1492
  }
1594
1493
  default:
1595
- return d;
1494
+ return m;
1596
1495
  }
1597
- return d;
1496
+ return m;
1598
1497
  }
1599
- function W() {
1600
- let $ = m;
1601
- return f && E ? ($ += ` h ${g - u}`, $ += ` a ${e} ${e} 0 0 0 -${e} ${e}`, $ += ` v ${a - e * 2}`, $ += ` a ${e} ${e} 0 0 0 ${e} ${e}`, $ += ` h ${u}`) : f && S ? ($ += " h -25", $ += ` a ${e} ${e} 0 0 0 -${e} ${e}`, $ += ` v ${a - e * 2}`, $ += ` a ${e} ${e} 0 0 0 ${e} ${e}`, $ += ` h ${g + u}`) : h && E ? ($ += ` h ${g - u}`, $ += ` a ${e} ${e} 0 0 1 -${e} -${e}`, $ += ` v ${a + e * 2}`, $ += ` a ${e} ${e} 0 0 1 ${e} -${e}`, $ += ` h ${u}`) : h && S && ($ += " h -25", $ += ` a ${e} ${e} 0 0 1 -${e} -${e}`, $ += ` v ${a + e * 2}`, $ += ` a ${e} ${e} 0 0 1 ${e} -${e}`, $ += ` h ${g + u}`), $;
1498
+ function g() {
1499
+ let $ = c;
1500
+ return f && D ? ($ += ` h ${d - i}`, $ += ` a ${t} ${t} 0 0 0 -${t} ${t}`, $ += ` v ${l - t * 2}`, $ += ` a ${t} ${t} 0 0 0 ${t} ${t}`, $ += ` h ${i}`) : f && S ? ($ += ` h ${-i}`, $ += ` a ${t} ${t} 0 0 0 -${t} ${t}`, $ += ` v ${l - t * 2}`, $ += ` a ${t} ${t} 0 0 0 ${t} ${t}`, $ += ` h ${d + i}`) : y && D ? ($ += ` h ${d - i}`, $ += ` a ${t} ${t} 0 0 1 -${t} -${t}`, $ += ` v ${l + t * 2}`, $ += ` a ${t} ${t} 0 0 1 ${t} -${t}`, $ += ` h ${i}`) : y && S && ($ += ` h ${-i}`, $ += ` a ${t} ${t} 0 0 1 -${t} -${t}`, $ += ` v ${l + t * 2}`, $ += ` a ${t} ${t} 0 0 1 ${t} -${t}`, $ += ` h ${d + i}`), $;
1602
1501
  }
1603
- switch (n) {
1502
+ switch (r) {
1604
1503
  case "FS":
1605
- return L();
1504
+ return R();
1606
1505
  case "FF":
1607
- return k();
1506
+ return T();
1608
1507
  case "SF":
1609
- return P();
1508
+ return v();
1610
1509
  case "SS":
1611
- return W();
1510
+ return g();
1612
1511
  default:
1613
- return `${m} L ${s} ${i}`;
1512
+ return `${c} L ${n} ${s}`;
1614
1513
  }
1615
1514
  }
1616
- function Sn({ allTasks: n, currentTask: o, onTasksChange: r }) {
1617
- const [s, i] = oe(!1), [e, l] = oe(!1), { onDragStart: u, tempLeft: p } = gn(o, o.barLeft, r), {
1618
- onDragStart: m,
1619
- tempLeft: g,
1620
- tempWidth: a
1621
- } = vn(
1622
- o,
1623
- o.barLeft,
1624
- o.barWidth,
1625
- r
1626
- ), { onDragStart: c, tempWidth: y } = yn(
1627
- o,
1628
- o.barWidth,
1629
- r
1630
- ), { draggingTaskMeta: h } = ye(), f = (h == null ? void 0 : h.taskId) === o.id;
1631
- let S = !1, E = !1, F = !1;
1632
- f && ((h == null ? void 0 : h.type) === "left" ? S = !0 : (h == null ? void 0 : h.type) === "right" ? E = !0 : (h == null ? void 0 : h.type) === "bar" && (F = !0));
1633
- let M = o.barLeft, Z = o.barWidth;
1634
- S ? (M = g, Z = a) : E ? Z = y : F && (M = p);
1635
- const L = () => /* @__PURE__ */ A.jsx(
1636
- "button",
1515
+ function Cn(r, a, e, n) {
1516
+ const s = bt, t = r.order - 1, i = (a.order - 1) * s + s / 2 - 4, u = t * s + s / 2 + 4, c = a.barLeft, d = a.barLeft + a.barWidth, l = r.barLeft + e.offsetX, h = l + r.barWidth + e.offsetWidth, b = {
1517
+ FS: [d, l],
1518
+ SS: [c, l],
1519
+ FF: [d, h],
1520
+ SF: [c, h]
1521
+ }, [y, f] = b[n];
1522
+ return { fromX: y, fromY: i, toX: f, toY: u };
1523
+ }
1524
+ function Ln(r, a) {
1525
+ const e = [];
1526
+ for (const n of r) {
1527
+ const s = a[n.id] ?? { offsetX: 0, offsetWidth: 0 };
1528
+ for (const t of n.dependencies ?? []) {
1529
+ const o = r.find((l) => l.id === t.targetId);
1530
+ if (!o) continue;
1531
+ const { fromX: i, fromY: u, toX: c, toY: d } = Cn(
1532
+ n,
1533
+ o,
1534
+ s,
1535
+ t.type
1536
+ );
1537
+ e.push({ ...t, fromX: i, fromY: u, toX: c, toY: d });
1538
+ }
1539
+ }
1540
+ return e;
1541
+ }
1542
+ function Rn({
1543
+ transformedTasks: r
1544
+ }) {
1545
+ const a = rt((n) => n.dragOffsets), e = Ln(r, a);
1546
+ return /* @__PURE__ */ X(
1547
+ "svg",
1637
1548
  {
1638
- type: "button",
1639
- onMouseDown: m,
1640
- onMouseEnter: () => i(!0),
1641
- onMouseLeave: () => i(!1),
1549
+ className: "gantt-dependency-arrows",
1642
1550
  style: {
1643
- position: "absolute",
1644
- top: 0,
1645
- left: "-1.15rem",
1646
- width: "2rem",
1647
- height: "100%",
1648
- display: "flex",
1649
- alignItems: "center",
1650
- justifyContent: "center",
1651
- cursor: "w-resize",
1652
- background: "transparent",
1653
- border: "none",
1654
- padding: 0
1551
+ height: `${r.length * bt}px`
1655
1552
  },
1656
- children: /* @__PURE__ */ A.jsx(
1657
- it,
1658
- {
1659
- style: {
1660
- height: "1.5rem",
1661
- width: "1.5rem",
1662
- fill: "#919294",
1663
- opacity: s ? 1 : 0
1664
- // transition: 'opacity 50ms ease-in-out',
1553
+ children: [
1554
+ /* @__PURE__ */ P("defs", { children: /* @__PURE__ */ P(
1555
+ "marker",
1556
+ {
1557
+ id: "arrowhead",
1558
+ markerWidth: "8",
1559
+ markerHeight: "8",
1560
+ refX: "7",
1561
+ refY: "4",
1562
+ orient: "auto",
1563
+ children: /* @__PURE__ */ P(
1564
+ "polygon",
1565
+ {
1566
+ className: "gantt-dependency-arrow-head",
1567
+ points: "0 0, 8 4, 0 8"
1568
+ }
1569
+ )
1665
1570
  }
1666
- }
1667
- )
1571
+ ) }),
1572
+ e.map((n, s) => /* @__PURE__ */ P(
1573
+ "path",
1574
+ {
1575
+ className: "gantt-dependency-arrow",
1576
+ d: zn(
1577
+ n.type,
1578
+ n.fromX,
1579
+ n.fromY,
1580
+ n.toX,
1581
+ n.toY
1582
+ ),
1583
+ markerEnd: "url(#arrowhead)",
1584
+ fill: "none"
1585
+ },
1586
+ `arrow-${s}`
1587
+ ))
1588
+ ]
1668
1589
  }
1669
- ), k = () => /* @__PURE__ */ A.jsx(
1670
- "button",
1590
+ );
1591
+ }
1592
+ function _n({
1593
+ selectedScale: r,
1594
+ onScaleChange: a
1595
+ }) {
1596
+ return /* @__PURE__ */ P("div", { className: "gantt-scale-selector", children: /* @__PURE__ */ P(
1597
+ "select",
1671
1598
  {
1672
- type: "button",
1673
- onMouseDown: c,
1674
- onMouseEnter: () => l(!0),
1675
- onMouseLeave: () => l(!1),
1676
- style: {
1677
- position: "absolute",
1678
- top: 0,
1679
- right: "-1.15rem",
1680
- width: "2rem",
1681
- height: "100%",
1682
- display: "flex",
1683
- alignItems: "center",
1684
- justifyContent: "center",
1685
- cursor: "w-resize",
1686
- background: "transparent",
1687
- border: "none",
1688
- padding: 0
1599
+ className: "gantt-scale-select",
1600
+ value: r,
1601
+ onChange: (n) => {
1602
+ a(n.target.value);
1689
1603
  },
1690
- children: /* @__PURE__ */ A.jsx(
1691
- it,
1692
- {
1693
- style: {
1694
- height: "1.5rem",
1695
- width: "1.5rem",
1696
- fill: "#919294",
1697
- opacity: e ? 1 : 0
1698
- // transition: 'opacity 150ms ease-in-out',
1699
- }
1700
- }
1701
- )
1604
+ "aria-label": "타임라인 스케일 선택",
1605
+ children: Object.keys(Z).map((n) => /* @__PURE__ */ P("option", { value: n, children: n }, n))
1702
1606
  }
1703
- ), P = (o.dependencies || []).map((W) => {
1704
- const $ = n.find((D) => D.id === W.targetId);
1705
- if (!$) return null;
1706
- const d = ut, O = ($.order - 1) * d + d / 2, B = (o.order - 1) * d + d / 2;
1707
- let ee, I;
1708
- switch (W.type) {
1709
- case "FS":
1710
- ee = $.barLeft + $.barWidth, I = o.barLeft;
1711
- break;
1712
- case "SS":
1713
- ee = $.barLeft, I = o.barLeft;
1714
- break;
1715
- case "FF":
1716
- ee = $.barLeft + $.barWidth, I = o.barLeft + o.barWidth;
1717
- break;
1718
- case "SF":
1719
- ee = $.barLeft, I = o.barLeft + o.barWidth;
1720
- break;
1721
- default:
1722
- return console.warn(`Unknown dependency type: ${W.type}`), null;
1607
+ ) });
1608
+ }
1609
+ function Wn({
1610
+ bottomRowCells: r,
1611
+ height: a
1612
+ }) {
1613
+ const e = st(() => {
1614
+ if (r.length === 0) return null;
1615
+ const n = N();
1616
+ let s = 0;
1617
+ for (let t = 0; t < r.length; t++) {
1618
+ const o = r[t], i = o.startDate, u = r[t + 1], c = (u == null ? void 0 : u.startDate) ?? i.add(1, "day");
1619
+ if (n.isSameOrAfter(i) && n.isBefore(c)) {
1620
+ const d = c.diff(i), h = n.diff(i) / d;
1621
+ return s + h * o.widthPx;
1622
+ }
1623
+ s += o.widthPx;
1723
1624
  }
1724
- return {
1725
- ...W,
1726
- fromX: ee,
1727
- fromY: O,
1728
- toX: I,
1729
- toY: B
1625
+ return null;
1626
+ }, [r]);
1627
+ return e === null ? null : /* @__PURE__ */ P(
1628
+ "div",
1629
+ {
1630
+ className: "gantt-today-marker",
1631
+ style: { left: `${e}px`, height: `${a}px` },
1632
+ role: "presentation",
1633
+ "aria-label": "Today",
1634
+ children: /* @__PURE__ */ P("span", { className: "gantt-today-label", children: "Today" })
1635
+ }
1636
+ );
1637
+ }
1638
+ function K(r, a, e) {
1639
+ let n = e.initialDeps ?? [], s;
1640
+ function t() {
1641
+ var o, i, u, c;
1642
+ let d;
1643
+ e.key && ((o = e.debug) != null && o.call(e)) && (d = Date.now());
1644
+ const l = r();
1645
+ if (!(l.length !== n.length || l.some((y, f) => n[f] !== y)))
1646
+ return s;
1647
+ n = l;
1648
+ let b;
1649
+ if (e.key && ((i = e.debug) != null && i.call(e)) && (b = Date.now()), s = a(...l), e.key && ((u = e.debug) != null && u.call(e))) {
1650
+ const y = Math.round((Date.now() - d) * 100) / 100, f = Math.round((Date.now() - b) * 100) / 100, S = f / 16, D = (x, p) => {
1651
+ for (x = String(x); x.length < p; )
1652
+ x = " " + x;
1653
+ return x;
1654
+ };
1655
+ console.info(
1656
+ `%c⏱ ${D(f, 5)} /${D(y, 5)} ms`,
1657
+ `
1658
+ font-size: .6rem;
1659
+ font-weight: bold;
1660
+ color: hsl(${Math.max(
1661
+ 0,
1662
+ Math.min(120 - 120 * S, 120)
1663
+ )}deg 100% 31%);`,
1664
+ e == null ? void 0 : e.key
1665
+ );
1666
+ }
1667
+ return (c = e == null ? void 0 : e.onChange) == null || c.call(e, s), s;
1668
+ }
1669
+ return t.updateDeps = (o) => {
1670
+ n = o;
1671
+ }, t;
1672
+ }
1673
+ function jt(r, a) {
1674
+ if (r === void 0)
1675
+ throw new Error("Unexpected undefined");
1676
+ return r;
1677
+ }
1678
+ const Pn = (r, a) => Math.abs(r - a) < 1.01, Nn = (r, a, e) => {
1679
+ let n;
1680
+ return function(...s) {
1681
+ r.clearTimeout(n), n = r.setTimeout(() => a.apply(this, s), e);
1682
+ };
1683
+ }, Bt = (r) => {
1684
+ const { offsetWidth: a, offsetHeight: e } = r;
1685
+ return { width: a, height: e };
1686
+ }, Fn = (r) => r, Hn = (r) => {
1687
+ const a = Math.max(r.startIndex - r.overscan, 0), e = Math.min(r.endIndex + r.overscan, r.count - 1), n = [];
1688
+ for (let s = a; s <= e; s++)
1689
+ n.push(s);
1690
+ return n;
1691
+ }, An = (r, a) => {
1692
+ const e = r.scrollElement;
1693
+ if (!e)
1694
+ return;
1695
+ const n = r.targetWindow;
1696
+ if (!n)
1697
+ return;
1698
+ const s = (o) => {
1699
+ const { width: i, height: u } = o;
1700
+ a({ width: Math.round(i), height: Math.round(u) });
1701
+ };
1702
+ if (s(Bt(e)), !n.ResizeObserver)
1703
+ return () => {
1730
1704
  };
1731
- }).filter(Boolean);
1732
- return /* @__PURE__ */ A.jsxs(A.Fragment, { children: [
1733
- /* @__PURE__ */ A.jsxs(
1734
- "div",
1735
- {
1736
- role: "button",
1737
- tabIndex: 0,
1738
- onMouseDown: u,
1739
- style: {
1740
- position: "relative",
1741
- display: "flex",
1742
- alignItems: "center",
1743
- backgroundColor: "#D6D6D8",
1744
- marginLeft: `${M}px`,
1745
- width: `${Z}px`,
1746
- height: "1rem"
1705
+ const t = new n.ResizeObserver((o) => {
1706
+ const i = () => {
1707
+ const u = o[0];
1708
+ if (u != null && u.borderBoxSize) {
1709
+ const c = u.borderBoxSize[0];
1710
+ if (c) {
1711
+ s({ width: c.inlineSize, height: c.blockSize });
1712
+ return;
1713
+ }
1714
+ }
1715
+ s(Bt(e));
1716
+ };
1717
+ r.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(i) : i();
1718
+ });
1719
+ return t.observe(e, { box: "border-box" }), () => {
1720
+ t.unobserve(e);
1721
+ };
1722
+ }, qt = {
1723
+ passive: !0
1724
+ }, Vt = typeof window > "u" ? !0 : "onscrollend" in window, Yn = (r, a) => {
1725
+ const e = r.scrollElement;
1726
+ if (!e)
1727
+ return;
1728
+ const n = r.targetWindow;
1729
+ if (!n)
1730
+ return;
1731
+ let s = 0;
1732
+ const t = r.options.useScrollendEvent && Vt ? () => {
1733
+ } : Nn(
1734
+ n,
1735
+ () => {
1736
+ a(s, !1);
1737
+ },
1738
+ r.options.isScrollingResetDelay
1739
+ ), o = (d) => () => {
1740
+ const { horizontal: l, isRtl: h } = r.options;
1741
+ s = l ? e.scrollLeft * (h && -1 || 1) : e.scrollTop, t(), a(s, d);
1742
+ }, i = o(!0), u = o(!1);
1743
+ u(), e.addEventListener("scroll", i, qt);
1744
+ const c = r.options.useScrollendEvent && Vt;
1745
+ return c && e.addEventListener("scrollend", u, qt), () => {
1746
+ e.removeEventListener("scroll", i), c && e.removeEventListener("scrollend", u);
1747
+ };
1748
+ }, Un = (r, a, e) => {
1749
+ if (a != null && a.borderBoxSize) {
1750
+ const n = a.borderBoxSize[0];
1751
+ if (n)
1752
+ return Math.round(
1753
+ n[e.options.horizontal ? "inlineSize" : "blockSize"]
1754
+ );
1755
+ }
1756
+ return r[e.options.horizontal ? "offsetWidth" : "offsetHeight"];
1757
+ }, jn = (r, {
1758
+ adjustments: a = 0,
1759
+ behavior: e
1760
+ }, n) => {
1761
+ var s, t;
1762
+ const o = r + a;
1763
+ (t = (s = n.scrollElement) == null ? void 0 : s.scrollTo) == null || t.call(s, {
1764
+ [n.options.horizontal ? "left" : "top"]: o,
1765
+ behavior: e
1766
+ });
1767
+ };
1768
+ class Bn {
1769
+ constructor(a) {
1770
+ this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
1771
+ let e = null;
1772
+ const n = () => e || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : e = new this.targetWindow.ResizeObserver((s) => {
1773
+ s.forEach((t) => {
1774
+ const o = () => {
1775
+ this._measureElement(t.target, t);
1776
+ };
1777
+ this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(o) : o();
1778
+ });
1779
+ }));
1780
+ return {
1781
+ disconnect: () => {
1782
+ var s;
1783
+ (s = n()) == null || s.disconnect(), e = null;
1784
+ },
1785
+ observe: (s) => {
1786
+ var t;
1787
+ return (t = n()) == null ? void 0 : t.observe(s, { box: "border-box" });
1788
+ },
1789
+ unobserve: (s) => {
1790
+ var t;
1791
+ return (t = n()) == null ? void 0 : t.unobserve(s);
1792
+ }
1793
+ };
1794
+ })(), this.range = null, this.setOptions = (e) => {
1795
+ Object.entries(e).forEach(([n, s]) => {
1796
+ typeof s > "u" && delete e[n];
1797
+ }), this.options = {
1798
+ debug: !1,
1799
+ initialOffset: 0,
1800
+ overscan: 1,
1801
+ paddingStart: 0,
1802
+ paddingEnd: 0,
1803
+ scrollPaddingStart: 0,
1804
+ scrollPaddingEnd: 0,
1805
+ horizontal: !1,
1806
+ getItemKey: Fn,
1807
+ rangeExtractor: Hn,
1808
+ onChange: () => {
1747
1809
  },
1748
- children: [
1749
- L(),
1750
- k()
1810
+ measureElement: Un,
1811
+ initialRect: { width: 0, height: 0 },
1812
+ scrollMargin: 0,
1813
+ gap: 0,
1814
+ indexAttribute: "data-index",
1815
+ initialMeasurementsCache: [],
1816
+ lanes: 1,
1817
+ isScrollingResetDelay: 150,
1818
+ enabled: !0,
1819
+ isRtl: !1,
1820
+ useScrollendEvent: !1,
1821
+ useAnimationFrameWithResizeObserver: !1,
1822
+ ...e
1823
+ };
1824
+ }, this.notify = (e) => {
1825
+ var n, s;
1826
+ (s = (n = this.options).onChange) == null || s.call(n, this, e);
1827
+ }, this.maybeNotify = K(
1828
+ () => (this.calculateRange(), [
1829
+ this.isScrolling,
1830
+ this.range ? this.range.startIndex : null,
1831
+ this.range ? this.range.endIndex : null
1832
+ ]),
1833
+ (e) => {
1834
+ this.notify(e);
1835
+ },
1836
+ {
1837
+ key: process.env.NODE_ENV !== "production" && "maybeNotify",
1838
+ debug: () => this.options.debug,
1839
+ initialDeps: [
1840
+ this.isScrolling,
1841
+ this.range ? this.range.startIndex : null,
1842
+ this.range ? this.range.endIndex : null
1751
1843
  ]
1752
1844
  }
1753
- ),
1754
- /* @__PURE__ */ A.jsxs(
1755
- "svg",
1845
+ ), this.cleanup = () => {
1846
+ this.unsubs.filter(Boolean).forEach((e) => e()), this.unsubs = [], this.observer.disconnect(), this.scrollElement = null, this.targetWindow = null;
1847
+ }, this._didMount = () => () => {
1848
+ this.cleanup();
1849
+ }, this._willUpdate = () => {
1850
+ var e;
1851
+ const n = this.options.enabled ? this.options.getScrollElement() : null;
1852
+ if (this.scrollElement !== n) {
1853
+ if (this.cleanup(), !n) {
1854
+ this.maybeNotify();
1855
+ return;
1856
+ }
1857
+ this.scrollElement = n, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((e = this.scrollElement) == null ? void 0 : e.window) ?? null, this.elementsCache.forEach((s) => {
1858
+ this.observer.observe(s);
1859
+ }), this._scrollToOffset(this.getScrollOffset(), {
1860
+ adjustments: void 0,
1861
+ behavior: void 0
1862
+ }), this.unsubs.push(
1863
+ this.options.observeElementRect(this, (s) => {
1864
+ this.scrollRect = s, this.maybeNotify();
1865
+ })
1866
+ ), this.unsubs.push(
1867
+ this.options.observeElementOffset(this, (s, t) => {
1868
+ this.scrollAdjustments = 0, this.scrollDirection = t ? this.getScrollOffset() < s ? "forward" : "backward" : null, this.scrollOffset = s, this.isScrolling = t, this.maybeNotify();
1869
+ })
1870
+ );
1871
+ }
1872
+ }, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (e, n) => {
1873
+ const s = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
1874
+ for (let o = n - 1; o >= 0; o--) {
1875
+ const i = e[o];
1876
+ if (s.has(i.lane))
1877
+ continue;
1878
+ const u = t.get(
1879
+ i.lane
1880
+ );
1881
+ if (u == null || i.end > u.end ? t.set(i.lane, i) : i.end < u.end && s.set(i.lane, !0), s.size === this.options.lanes)
1882
+ break;
1883
+ }
1884
+ return t.size === this.options.lanes ? Array.from(t.values()).sort((o, i) => o.end === i.end ? o.index - i.index : o.end - i.end)[0] : void 0;
1885
+ }, this.getMeasurementOptions = K(
1886
+ () => [
1887
+ this.options.count,
1888
+ this.options.paddingStart,
1889
+ this.options.scrollMargin,
1890
+ this.options.getItemKey,
1891
+ this.options.enabled
1892
+ ],
1893
+ (e, n, s, t, o) => (this.pendingMeasuredCacheIndexes = [], {
1894
+ count: e,
1895
+ paddingStart: n,
1896
+ scrollMargin: s,
1897
+ getItemKey: t,
1898
+ enabled: o
1899
+ }),
1756
1900
  {
1757
- style: {
1758
- position: "absolute",
1759
- top: 0,
1760
- left: 0,
1761
- zIndex: 10,
1762
- width: "100%",
1763
- height: "100%",
1764
- pointerEvents: "none"
1765
- },
1766
- children: [
1767
- /* @__PURE__ */ A.jsx("defs", { children: /* @__PURE__ */ A.jsx(
1768
- "marker",
1769
- {
1770
- id: "arrowhead",
1771
- markerWidth: "6",
1772
- markerHeight: "6",
1773
- refX: "5.25",
1774
- refY: "3",
1775
- orient: "auto",
1776
- children: /* @__PURE__ */ A.jsx("polygon", { points: "0 0, 6 3, 0 6", fill: "#000" })
1777
- }
1778
- ) }),
1779
- P.map((W, $) => /* @__PURE__ */ A.jsx(
1780
- "path",
1781
- {
1782
- d: Dn(
1783
- W.type,
1784
- W.fromX,
1785
- W.fromY,
1786
- W.toX,
1787
- W.toY
1788
- ),
1789
- fill: "none",
1790
- markerEnd: "url(#arrowhead)",
1791
- style: { stroke: "#000", strokeWidth: 0.75 }
1792
- },
1793
- $
1794
- ))
1795
- ]
1901
+ key: !1
1902
+ }
1903
+ ), this.getMeasurements = K(
1904
+ () => [this.getMeasurementOptions(), this.itemSizeCache],
1905
+ ({ count: e, paddingStart: n, scrollMargin: s, getItemKey: t, enabled: o }, i) => {
1906
+ if (!o)
1907
+ return this.measurementsCache = [], this.itemSizeCache.clear(), [];
1908
+ this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((d) => {
1909
+ this.itemSizeCache.set(d.key, d.size);
1910
+ }));
1911
+ const u = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
1912
+ this.pendingMeasuredCacheIndexes = [];
1913
+ const c = this.measurementsCache.slice(0, u);
1914
+ for (let d = u; d < e; d++) {
1915
+ const l = t(d), h = this.options.lanes === 1 ? c[d - 1] : this.getFurthestMeasurement(c, d), b = h ? h.end + this.options.gap : n + s, y = i.get(l), f = typeof y == "number" ? y : this.options.estimateSize(d), S = b + f, D = h ? h.lane : d % this.options.lanes;
1916
+ c[d] = {
1917
+ index: d,
1918
+ start: b,
1919
+ size: f,
1920
+ end: S,
1921
+ key: l,
1922
+ lane: D
1923
+ };
1924
+ }
1925
+ return this.measurementsCache = c, c;
1926
+ },
1927
+ {
1928
+ key: process.env.NODE_ENV !== "production" && "getMeasurements",
1929
+ debug: () => this.options.debug
1930
+ }
1931
+ ), this.calculateRange = K(
1932
+ () => [
1933
+ this.getMeasurements(),
1934
+ this.getSize(),
1935
+ this.getScrollOffset(),
1936
+ this.options.lanes
1937
+ ],
1938
+ (e, n, s, t) => this.range = e.length > 0 && n > 0 ? qn({
1939
+ measurements: e,
1940
+ outerSize: n,
1941
+ scrollOffset: s,
1942
+ lanes: t
1943
+ }) : null,
1944
+ {
1945
+ key: process.env.NODE_ENV !== "production" && "calculateRange",
1946
+ debug: () => this.options.debug
1947
+ }
1948
+ ), this.getVirtualIndexes = K(
1949
+ () => {
1950
+ let e = null, n = null;
1951
+ const s = this.calculateRange();
1952
+ return s && (e = s.startIndex, n = s.endIndex), this.maybeNotify.updateDeps([this.isScrolling, e, n]), [
1953
+ this.options.rangeExtractor,
1954
+ this.options.overscan,
1955
+ this.options.count,
1956
+ e,
1957
+ n
1958
+ ];
1959
+ },
1960
+ (e, n, s, t, o) => t === null || o === null ? [] : e({
1961
+ startIndex: t,
1962
+ endIndex: o,
1963
+ overscan: n,
1964
+ count: s
1965
+ }),
1966
+ {
1967
+ key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
1968
+ debug: () => this.options.debug
1969
+ }
1970
+ ), this.indexFromElement = (e) => {
1971
+ const n = this.options.indexAttribute, s = e.getAttribute(n);
1972
+ return s ? parseInt(s, 10) : (console.warn(
1973
+ `Missing attribute name '${n}={index}' on measured element.`
1974
+ ), -1);
1975
+ }, this._measureElement = (e, n) => {
1976
+ const s = this.indexFromElement(e), t = this.measurementsCache[s];
1977
+ if (!t)
1978
+ return;
1979
+ const o = t.key, i = this.elementsCache.get(o);
1980
+ i !== e && (i && this.observer.unobserve(i), this.observer.observe(e), this.elementsCache.set(o, e)), e.isConnected && this.resizeItem(s, this.options.measureElement(e, n, this));
1981
+ }, this.resizeItem = (e, n) => {
1982
+ const s = this.measurementsCache[e];
1983
+ if (!s)
1984
+ return;
1985
+ const t = this.itemSizeCache.get(s.key) ?? s.size, o = n - t;
1986
+ o !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(s, o, this) : s.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", o), this._scrollToOffset(this.getScrollOffset(), {
1987
+ adjustments: this.scrollAdjustments += o,
1988
+ behavior: void 0
1989
+ })), this.pendingMeasuredCacheIndexes.push(s.index), this.itemSizeCache = new Map(this.itemSizeCache.set(s.key, n)), this.notify(!1));
1990
+ }, this.measureElement = (e) => {
1991
+ if (!e) {
1992
+ this.elementsCache.forEach((n, s) => {
1993
+ n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(s));
1994
+ });
1995
+ return;
1996
+ }
1997
+ this._measureElement(e, void 0);
1998
+ }, this.getVirtualItems = K(
1999
+ () => [this.getVirtualIndexes(), this.getMeasurements()],
2000
+ (e, n) => {
2001
+ const s = [];
2002
+ for (let t = 0, o = e.length; t < o; t++) {
2003
+ const i = e[t], u = n[i];
2004
+ s.push(u);
2005
+ }
2006
+ return s;
2007
+ },
2008
+ {
2009
+ key: process.env.NODE_ENV !== "production" && "getVirtualItems",
2010
+ debug: () => this.options.debug
2011
+ }
2012
+ ), this.getVirtualItemForOffset = (e) => {
2013
+ const n = this.getMeasurements();
2014
+ if (n.length !== 0)
2015
+ return jt(
2016
+ n[Kt(
2017
+ 0,
2018
+ n.length - 1,
2019
+ (s) => jt(n[s]).start,
2020
+ e
2021
+ )]
2022
+ );
2023
+ }, this.getOffsetForAlignment = (e, n, s = 0) => {
2024
+ const t = this.getSize(), o = this.getScrollOffset();
2025
+ n === "auto" && (n = e >= o + t ? "end" : "start"), n === "center" ? e += (s - t) / 2 : n === "end" && (e -= t);
2026
+ const i = this.getTotalSize() + this.options.scrollMargin - t;
2027
+ return Math.max(Math.min(i, e), 0);
2028
+ }, this.getOffsetForIndex = (e, n = "auto") => {
2029
+ e = Math.max(0, Math.min(e, this.options.count - 1));
2030
+ const s = this.measurementsCache[e];
2031
+ if (!s)
2032
+ return;
2033
+ const t = this.getSize(), o = this.getScrollOffset();
2034
+ if (n === "auto")
2035
+ if (s.end >= o + t - this.options.scrollPaddingEnd)
2036
+ n = "end";
2037
+ else if (s.start <= o + this.options.scrollPaddingStart)
2038
+ n = "start";
2039
+ else
2040
+ return [o, n];
2041
+ const i = n === "end" ? s.end + this.options.scrollPaddingEnd : s.start - this.options.scrollPaddingStart;
2042
+ return [
2043
+ this.getOffsetForAlignment(i, n, s.size),
2044
+ n
2045
+ ];
2046
+ }, this.isDynamicMode = () => this.elementsCache.size > 0, this.scrollToOffset = (e, { align: n = "start", behavior: s } = {}) => {
2047
+ s === "smooth" && this.isDynamicMode() && console.warn(
2048
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
2049
+ ), this._scrollToOffset(this.getOffsetForAlignment(e, n), {
2050
+ adjustments: void 0,
2051
+ behavior: s
2052
+ });
2053
+ }, this.scrollToIndex = (e, { align: n = "auto", behavior: s } = {}) => {
2054
+ s === "smooth" && this.isDynamicMode() && console.warn(
2055
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
2056
+ ), e = Math.max(0, Math.min(e, this.options.count - 1));
2057
+ let t = 0;
2058
+ const o = 10, i = (c) => {
2059
+ if (!this.targetWindow) return;
2060
+ const d = this.getOffsetForIndex(e, c);
2061
+ if (!d) {
2062
+ console.warn("Failed to get offset for index:", e);
2063
+ return;
2064
+ }
2065
+ const [l, h] = d;
2066
+ this._scrollToOffset(l, { adjustments: void 0, behavior: s }), this.targetWindow.requestAnimationFrame(() => {
2067
+ const b = this.getScrollOffset(), y = this.getOffsetForIndex(e, h);
2068
+ if (!y) {
2069
+ console.warn("Failed to get offset for index:", e);
2070
+ return;
2071
+ }
2072
+ Pn(y[0], b) || u(h);
2073
+ });
2074
+ }, u = (c) => {
2075
+ this.targetWindow && (t++, t < o ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", t, o), this.targetWindow.requestAnimationFrame(() => i(c))) : console.warn(
2076
+ `Failed to scroll to index ${e} after ${o} attempts.`
2077
+ ));
2078
+ };
2079
+ i(n);
2080
+ }, this.scrollBy = (e, { behavior: n } = {}) => {
2081
+ n === "smooth" && this.isDynamicMode() && console.warn(
2082
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
2083
+ ), this._scrollToOffset(this.getScrollOffset() + e, {
2084
+ adjustments: void 0,
2085
+ behavior: n
2086
+ });
2087
+ }, this.getTotalSize = () => {
2088
+ var e;
2089
+ const n = this.getMeasurements();
2090
+ let s;
2091
+ if (n.length === 0)
2092
+ s = this.options.paddingStart;
2093
+ else if (this.options.lanes === 1)
2094
+ s = ((e = n[n.length - 1]) == null ? void 0 : e.end) ?? 0;
2095
+ else {
2096
+ const t = Array(this.options.lanes).fill(null);
2097
+ let o = n.length - 1;
2098
+ for (; o >= 0 && t.some((i) => i === null); ) {
2099
+ const i = n[o];
2100
+ t[i.lane] === null && (t[i.lane] = i.end), o--;
2101
+ }
2102
+ s = Math.max(...t.filter((i) => i !== null));
1796
2103
  }
1797
- )
1798
- ] });
2104
+ return Math.max(
2105
+ s - this.options.scrollMargin + this.options.paddingEnd,
2106
+ 0
2107
+ );
2108
+ }, this._scrollToOffset = (e, {
2109
+ adjustments: n,
2110
+ behavior: s
2111
+ }) => {
2112
+ this.options.scrollToFn(e, { behavior: s, adjustments: n }, this);
2113
+ }, this.measure = () => {
2114
+ this.itemSizeCache = /* @__PURE__ */ new Map(), this.notify(!1);
2115
+ }, this.setOptions(a);
2116
+ }
1799
2117
  }
1800
- function bn({ tasks: n, onTasksChange: o, ganttHeight: r, columnWidth: s }) {
1801
- const [i, e] = oe(r || 500), [l, u] = oe(s || 1e3), [p, m] = oe(n || []), g = V(null), {
1802
- rawTasks: a,
1803
- transformedTasks: c,
1804
- selectedScale: y,
1805
- setSelectedScale: h,
1806
- bottomRowCells: f,
1807
- topHeaderGroups: S,
1808
- setRawTasks: E,
1809
- setBottomRowCells: F,
1810
- setTopHeaderGroups: M,
1811
- setMinDate: Z,
1812
- setMaxDate: L
1813
- } = ye();
1814
- return xe(() => {
1815
- n.length === 0 ? m($n) : m(n);
1816
- }, [n]), xe(() => {
1817
- if (!p.length) return;
1818
- const k = Object.fromEntries(
1819
- p.map((P) => [
1820
- P.id,
1821
- { startDate: P.startDate, endDate: P.endDate }
1822
- ])
1823
- );
1824
- St(
1825
- k,
1826
- y,
1827
- Z,
1828
- L,
1829
- F,
1830
- M
2118
+ const Kt = (r, a, e, n) => {
2119
+ for (; r <= a; ) {
2120
+ const s = (r + a) / 2 | 0, t = e(s);
2121
+ if (t < n)
2122
+ r = s + 1;
2123
+ else if (t > n)
2124
+ a = s - 1;
2125
+ else
2126
+ return s;
2127
+ }
2128
+ return r > 0 ? r - 1 : 0;
2129
+ };
2130
+ function qn({
2131
+ measurements: r,
2132
+ outerSize: a,
2133
+ scrollOffset: e,
2134
+ lanes: n
2135
+ }) {
2136
+ const s = r.length - 1, t = (u) => r[u].start;
2137
+ if (r.length <= n)
2138
+ return {
2139
+ startIndex: 0,
2140
+ endIndex: s
2141
+ };
2142
+ let o = Kt(
2143
+ 0,
2144
+ s,
2145
+ t,
2146
+ e
2147
+ ), i = o;
2148
+ if (n === 1)
2149
+ for (; i < s && r[i].end < e + a; )
2150
+ i++;
2151
+ else if (n > 1) {
2152
+ const u = Array(n).fill(0);
2153
+ for (; i < s && u.some((d) => d < e + a); ) {
2154
+ const d = r[i];
2155
+ u[d.lane] = d.end, i++;
2156
+ }
2157
+ const c = Array(n).fill(e + a);
2158
+ for (; o >= 0 && c.some((d) => d >= e); ) {
2159
+ const d = r[o];
2160
+ c[d.lane] = d.start, o--;
2161
+ }
2162
+ o = Math.max(0, o - o % n), i = Math.min(s, i + (n - 1 - i % n));
2163
+ }
2164
+ return { startIndex: o, endIndex: i };
2165
+ }
2166
+ const Gt = typeof document < "u" ? yt.useLayoutEffect : yt.useEffect;
2167
+ function Vn(r) {
2168
+ const a = yt.useReducer(() => ({}), {})[1], e = {
2169
+ ...r,
2170
+ onChange: (s, t) => {
2171
+ var o;
2172
+ t ? te(a) : a(), (o = r.onChange) == null || o.call(r, s, t);
2173
+ }
2174
+ }, [n] = yt.useState(
2175
+ () => new Bn(e)
2176
+ );
2177
+ return n.setOptions(e), Gt(() => n._didMount(), []), Gt(() => n._willUpdate()), n;
2178
+ }
2179
+ function Xt(r) {
2180
+ return Vn({
2181
+ observeElementRect: An,
2182
+ observeElementOffset: Yn,
2183
+ scrollToFn: jn,
2184
+ ...r
2185
+ });
2186
+ }
2187
+ function Gn({
2188
+ transformedTasks: r,
2189
+ bottomRowCells: a,
2190
+ scrollRef: e
2191
+ }) {
2192
+ var d;
2193
+ const n = Xt({
2194
+ count: r.length,
2195
+ getScrollElement: () => e.current,
2196
+ estimateSize: () => bt,
2197
+ overscan: 5
2198
+ }), s = Xt({
2199
+ horizontal: !0,
2200
+ count: a.length,
2201
+ getScrollElement: () => e.current,
2202
+ estimateSize: (l) => {
2203
+ var h;
2204
+ return ((h = a[l]) == null ? void 0 : h.widthPx) ?? 32;
2205
+ },
2206
+ overscan: 5
2207
+ }), t = s.getVirtualItems(), o = ((d = t[0]) == null ? void 0 : d.start) ?? 0, i = t[t.length - 1], u = i ? i.start + i.size : 0, c = st(() => (l, h) => l + h >= o && l <= u, [o, u]);
2208
+ return Q(() => {
2209
+ if (!a.length) return;
2210
+ const l = requestAnimationFrame(() => {
2211
+ s.measure();
2212
+ });
2213
+ return () => cancelAnimationFrame(l);
2214
+ }, [a, s]), {
2215
+ rowVirtualizer: n,
2216
+ columnVirtualizer: s,
2217
+ isBarVisible: c
2218
+ };
2219
+ }
2220
+ function Xn(r, a = "gantt-container") {
2221
+ const [e, n] = Mt(() => typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
2222
+ Q(() => {
2223
+ if (typeof window > "u") return;
2224
+ const i = window.matchMedia("(prefers-color-scheme: dark)"), u = (c) => {
2225
+ n(c.matches ? "dark" : "light");
2226
+ };
2227
+ return i.addEventListener("change", u), () => i.removeEventListener("change", u);
2228
+ }, []);
2229
+ const s = st(() => !r || r === "system" ? e : r, [r, e]), t = st(() => {
2230
+ const i = [a];
2231
+ return r && i.push(s), i.join(" ");
2232
+ }, [a, r, s]);
2233
+ return {
2234
+ resolvedTheme: s,
2235
+ containerClassName: t,
2236
+ dataTheme: r ? s : void 0
2237
+ };
2238
+ }
2239
+ const Zn = 600, Jn = "100%", Kn = "month";
2240
+ function nr({
2241
+ tasks: r = [],
2242
+ onTasksChange: a,
2243
+ height: e = Zn,
2244
+ width: n = Jn,
2245
+ theme: s,
2246
+ defaultScale: t = Kn,
2247
+ className: o
2248
+ }) {
2249
+ const {
2250
+ rawTasks: i,
2251
+ transformedTasks: u,
2252
+ bottomRowCells: c,
2253
+ selectedScale: d,
2254
+ setRawTasks: l,
2255
+ setTransformedTasks: h,
2256
+ setBottomRowCells: b,
2257
+ setSelectedScale: y,
2258
+ getTotalWidth: f
2259
+ } = Jt(), S = St(null), { rowVirtualizer: D, isBarVisible: x } = Gn({
2260
+ transformedTasks: u,
2261
+ bottomRowCells: c,
2262
+ scrollRef: S
2263
+ }), { containerClassName: p, dataTheme: z } = Xn(
2264
+ s,
2265
+ o ? `gantt-container ${o}` : "gantt-container"
2266
+ );
2267
+ Q(() => {
2268
+ t && t !== d && y(t);
2269
+ }, []), Q(() => {
2270
+ r.length > 0 && l(r);
2271
+ }, [r, l]), Q(() => {
2272
+ if (!i.length) return;
2273
+ const { bottomCells: g, transformedTasks: $ } = En(
2274
+ i,
2275
+ d
1831
2276
  );
1832
- }, [p, y]), xe(() => {
1833
- !f.length || !p.length || a.length === 0 && E(p);
1834
- }, [f, p]), /* @__PURE__ */ A.jsx(
2277
+ b(g), h($);
2278
+ }, [i, d, b, h]);
2279
+ const R = (g) => {
2280
+ y(g);
2281
+ }, T = f(), v = {
2282
+ height: typeof e == "number" ? `${e}px` : e,
2283
+ width: typeof n == "number" ? `${n}px` : n
2284
+ };
2285
+ return /* @__PURE__ */ P(
1835
2286
  "section",
1836
2287
  {
1837
- style: {
1838
- position: "relative",
1839
- overflow: "auto",
1840
- height: typeof r == "number" ? `${r}px` : r,
1841
- width: typeof s == "number" ? `${s}px` : s,
1842
- backgroundColor: "#FFF",
1843
- fontFamily: "Noto Sans, sans-serif"
1844
- },
1845
- children: /* @__PURE__ */ A.jsx(
1846
- "div",
1847
- {
1848
- style: {
1849
- width: "100%",
1850
- height: "100%",
1851
- overflow: "hidden",
1852
- backgroundColor: "#FFF"
1853
- },
1854
- children: /* @__PURE__ */ A.jsxs(
1855
- "section",
2288
+ className: p,
2289
+ "data-theme": z,
2290
+ style: v,
2291
+ children: /* @__PURE__ */ P("div", { className: "gantt-inner", children: /* @__PURE__ */ X("section", { className: "gantt-section", children: [
2292
+ /* @__PURE__ */ P(
2293
+ _n,
2294
+ {
2295
+ selectedScale: d,
2296
+ onScaleChange: R
2297
+ }
2298
+ ),
2299
+ /* @__PURE__ */ X("div", { ref: S, className: "gantt-list", children: [
2300
+ /* @__PURE__ */ P(
2301
+ In,
1856
2302
  {
2303
+ bottomRowCells: c,
2304
+ selectedScale: d,
2305
+ width: T,
2306
+ scrollRef: S
2307
+ }
2308
+ ),
2309
+ /* @__PURE__ */ X(
2310
+ "div",
2311
+ {
2312
+ className: "gantt-content",
1857
2313
  style: {
1858
- position: "relative",
1859
- display: "flex",
1860
- height: "100%",
1861
- width: "100%",
1862
- flexDirection: "column"
2314
+ height: `${D.getTotalSize()}px`,
2315
+ width: `${T}px`
1863
2316
  },
1864
2317
  children: [
1865
- /* @__PURE__ */ A.jsx(
1866
- "div",
2318
+ /* @__PURE__ */ P(
2319
+ Wn,
1867
2320
  {
1868
- style: {
1869
- position: "absolute",
1870
- top: "3px",
1871
- right: "16px",
1872
- zIndex: 50,
1873
- display: "flex",
1874
- justifyContent: "flex-end",
1875
- alignItems: "center"
1876
- // padding: '4px 8px',
1877
- // backgroundColor: '#FFF',
1878
- // borderBottom: '1px solid #E6E7E9',
1879
- },
1880
- children: /* @__PURE__ */ A.jsx(
1881
- "select",
1882
- {
1883
- style: {
1884
- // backgroundColor: '#FFF',
1885
- padding: "4px 8px",
1886
- fontSize: "0.875rem",
1887
- borderRadius: "6px",
1888
- border: "1px solid #E6E7E9"
1889
- },
1890
- value: y,
1891
- onChange: (k) => {
1892
- const P = k.target.value;
1893
- h(P);
1894
- },
1895
- children: Object.keys(K).map((k) => /* @__PURE__ */ A.jsx("option", { value: k, children: K[k].labelUnit }, k))
1896
- }
1897
- )
2321
+ bottomRowCells: c,
2322
+ height: D.getTotalSize()
1898
2323
  }
1899
2324
  ),
1900
- /* @__PURE__ */ A.jsx(
1901
- "div",
1902
- {
1903
- ref: g,
1904
- style: {
1905
- flexGrow: 1,
1906
- overflowX: "auto"
2325
+ /* @__PURE__ */ P(Rn, { transformedTasks: u }),
2326
+ D.getVirtualItems().map((g) => {
2327
+ const $ = u[g.index], m = $.barLeft ?? 0, k = $.barWidth ?? 0;
2328
+ return /* @__PURE__ */ P(
2329
+ "div",
2330
+ {
2331
+ className: "gantt-task-row",
2332
+ style: {
2333
+ height: `${g.size - 1}px`,
2334
+ transform: `translateY(${g.start}px)`
2335
+ },
2336
+ children: x(m, k) && /* @__PURE__ */ P(
2337
+ gn,
2338
+ {
2339
+ currentTask: $,
2340
+ onTasksChange: a
2341
+ }
2342
+ )
1907
2343
  },
1908
- children: /* @__PURE__ */ A.jsxs(
1909
- "div",
1910
- {
1911
- style: {
1912
- display: "flex",
1913
- minWidth: "max-content",
1914
- flexDirection: "column"
1915
- // backgroundColor: '#FFF',
1916
- },
1917
- children: [
1918
- /* @__PURE__ */ A.jsx(
1919
- xt,
1920
- {
1921
- topHeaderGroups: S,
1922
- bottomRowCells: f,
1923
- selectedScale: y,
1924
- scrollRef: g
1925
- }
1926
- ),
1927
- /* @__PURE__ */ A.jsx(
1928
- "div",
1929
- {
1930
- style: {
1931
- position: "relative",
1932
- display: "flex"
1933
- },
1934
- children: /* @__PURE__ */ A.jsx(
1935
- "div",
1936
- {
1937
- style: {
1938
- display: "flex",
1939
- flexGrow: 1,
1940
- flexDirection: "column"
1941
- },
1942
- children: c.map((k) => /* @__PURE__ */ A.jsx(
1943
- "div",
1944
- {
1945
- style: {
1946
- display: "flex",
1947
- width: "100%",
1948
- alignItems: "center",
1949
- borderBottom: "1px solid #E6E7E9",
1950
- height: `${ut}px`,
1951
- backgroundColor: "#FFF"
1952
- },
1953
- children: /* @__PURE__ */ A.jsx(
1954
- Sn,
1955
- {
1956
- allTasks: c,
1957
- currentTask: k,
1958
- onTasksChange: o
1959
- }
1960
- )
1961
- },
1962
- k.id
1963
- ))
1964
- }
1965
- )
1966
- }
1967
- )
1968
- ]
1969
- }
1970
- )
1971
- }
1972
- )
2344
+ $.id
2345
+ );
2346
+ })
1973
2347
  ]
1974
2348
  }
1975
2349
  )
1976
- }
1977
- )
2350
+ ] })
2351
+ ] }) })
1978
2352
  }
1979
2353
  );
1980
2354
  }
1981
2355
  export {
1982
- bn as ReactGanttChart
2356
+ nr as ReactGanttChart
1983
2357
  };