@jaeungkim/gantt-chart 0.1.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/README.md +172 -0
- package/dist/index.cjs.js +31 -0
- package/dist/index.es.js +1729 -0
- package/dist/readmeImg.png +0 -0
- package/package.json +74 -0
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,1729 @@
|
|
|
1
|
+
import * as Ue from "react";
|
|
2
|
+
import Ne, { useState as he, useMemo as Pe, useEffect as xe, useRef as X } from "react";
|
|
3
|
+
function te(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 ze;
|
|
17
|
+
function lt() {
|
|
18
|
+
if (ze) return ge;
|
|
19
|
+
ze = 1;
|
|
20
|
+
var n = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
21
|
+
function r(u, 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 o in i)
|
|
26
|
+
o !== "key" && (e[o] = i[o]);
|
|
27
|
+
} else e = i;
|
|
28
|
+
return i = e.ref, {
|
|
29
|
+
$$typeof: n,
|
|
30
|
+
type: u,
|
|
31
|
+
key: l,
|
|
32
|
+
ref: i !== void 0 ? i : null,
|
|
33
|
+
props: e
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return ge.Fragment = s, 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 He;
|
|
49
|
+
function ft() {
|
|
50
|
+
return He || (He = 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 j:
|
|
58
|
+
return "Fragment";
|
|
59
|
+
case E:
|
|
60
|
+
return "Portal";
|
|
61
|
+
case Y:
|
|
62
|
+
return "Profiler";
|
|
63
|
+
case A:
|
|
64
|
+
return "StrictMode";
|
|
65
|
+
case B:
|
|
66
|
+
return "Suspense";
|
|
67
|
+
case fe:
|
|
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 g:
|
|
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 R:
|
|
82
|
+
return b = t.displayName || null, b !== null ? b : n(t.type) || "Memo";
|
|
83
|
+
case S:
|
|
84
|
+
b = t._payload, t = t._init;
|
|
85
|
+
try {
|
|
86
|
+
return n(t(b));
|
|
87
|
+
} catch {
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
function s(t) {
|
|
93
|
+
return "" + t;
|
|
94
|
+
}
|
|
95
|
+
function r(t) {
|
|
96
|
+
try {
|
|
97
|
+
s(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
|
+
), s(t);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function u() {
|
|
113
|
+
}
|
|
114
|
+
function i() {
|
|
115
|
+
if (H === 0) {
|
|
116
|
+
J = console.log, ae = console.info, ne = console.warn, ue = console.error, re = console.group, G = console.groupCollapsed, ee = console.groupEnd;
|
|
117
|
+
var t = {
|
|
118
|
+
configurable: !0,
|
|
119
|
+
enumerable: !0,
|
|
120
|
+
value: u,
|
|
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
|
+
H++;
|
|
134
|
+
}
|
|
135
|
+
function e() {
|
|
136
|
+
if (H--, H === 0) {
|
|
137
|
+
var t = { configurable: !0, enumerable: !0, writable: !0 };
|
|
138
|
+
Object.defineProperties(console, {
|
|
139
|
+
log: F({}, t, { value: J }),
|
|
140
|
+
info: F({}, t, { value: ae }),
|
|
141
|
+
warn: F({}, t, { value: ne }),
|
|
142
|
+
error: F({}, t, { value: ue }),
|
|
143
|
+
group: F({}, t, { value: re }),
|
|
144
|
+
groupCollapsed: F({}, t, { value: G }),
|
|
145
|
+
groupEnd: F({}, t, { value: ee })
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
0 > H && 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 (se === void 0)
|
|
154
|
+
try {
|
|
155
|
+
throw Error();
|
|
156
|
+
} catch (w) {
|
|
157
|
+
var b = w.stack.trim().match(/\n( *(at )?)/);
|
|
158
|
+
se = b && b[1] || "", de = -1 < w.stack.indexOf(`
|
|
159
|
+
at`) ? " (<anonymous>)" : -1 < w.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
160
|
+
}
|
|
161
|
+
return `
|
|
162
|
+
` + se + t + de;
|
|
163
|
+
}
|
|
164
|
+
function o(t, b) {
|
|
165
|
+
if (!t || Ze) return "";
|
|
166
|
+
var w = _e.get(t);
|
|
167
|
+
if (w !== void 0) return w;
|
|
168
|
+
Ze = !0, w = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
|
|
169
|
+
var q = null;
|
|
170
|
+
q = I.H, I.H = null, i();
|
|
171
|
+
try {
|
|
172
|
+
var V = {
|
|
173
|
+
DetermineComponentFrameRoot: function() {
|
|
174
|
+
try {
|
|
175
|
+
if (b) {
|
|
176
|
+
var ce = function() {
|
|
177
|
+
throw Error();
|
|
178
|
+
};
|
|
179
|
+
if (Object.defineProperty(ce.prototype, "props", {
|
|
180
|
+
set: function() {
|
|
181
|
+
throw Error();
|
|
182
|
+
}
|
|
183
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
184
|
+
try {
|
|
185
|
+
Reflect.construct(ce, []);
|
|
186
|
+
} catch (ie) {
|
|
187
|
+
var ye = ie;
|
|
188
|
+
}
|
|
189
|
+
Reflect.construct(t, [], ce);
|
|
190
|
+
} else {
|
|
191
|
+
try {
|
|
192
|
+
ce.call();
|
|
193
|
+
} catch (ie) {
|
|
194
|
+
ye = ie;
|
|
195
|
+
}
|
|
196
|
+
t.call(ce.prototype);
|
|
197
|
+
}
|
|
198
|
+
} else {
|
|
199
|
+
try {
|
|
200
|
+
throw Error();
|
|
201
|
+
} catch (ie) {
|
|
202
|
+
ye = ie;
|
|
203
|
+
}
|
|
204
|
+
(ce = t()) && typeof ce.catch == "function" && ce.catch(function() {
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
} catch (ie) {
|
|
208
|
+
if (ie && ye && typeof ie.stack == "string")
|
|
209
|
+
return [ie.stack, ye.stack];
|
|
210
|
+
}
|
|
211
|
+
return [null, null];
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
V.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
|
|
215
|
+
var U = Object.getOwnPropertyDescriptor(
|
|
216
|
+
V.DetermineComponentFrameRoot,
|
|
217
|
+
"name"
|
|
218
|
+
);
|
|
219
|
+
U && U.configurable && Object.defineProperty(
|
|
220
|
+
V.DetermineComponentFrameRoot,
|
|
221
|
+
"name",
|
|
222
|
+
{ value: "DetermineComponentFrameRoot" }
|
|
223
|
+
);
|
|
224
|
+
var P = V.DetermineComponentFrameRoot(), oe = P[0], me = P[1];
|
|
225
|
+
if (oe && me) {
|
|
226
|
+
var Q = oe.split(`
|
|
227
|
+
`), le = me.split(`
|
|
228
|
+
`);
|
|
229
|
+
for (P = U = 0; U < Q.length && !Q[U].includes(
|
|
230
|
+
"DetermineComponentFrameRoot"
|
|
231
|
+
); )
|
|
232
|
+
U++;
|
|
233
|
+
for (; P < le.length && !le[P].includes(
|
|
234
|
+
"DetermineComponentFrameRoot"
|
|
235
|
+
); )
|
|
236
|
+
P++;
|
|
237
|
+
if (U === Q.length || P === le.length)
|
|
238
|
+
for (U = Q.length - 1, P = le.length - 1; 1 <= U && 0 <= P && Q[U] !== le[P]; )
|
|
239
|
+
P--;
|
|
240
|
+
for (; 1 <= U && 0 <= P; U--, P--)
|
|
241
|
+
if (Q[U] !== le[P]) {
|
|
242
|
+
if (U !== 1 || P !== 1)
|
|
243
|
+
do
|
|
244
|
+
if (U--, P--, 0 > P || Q[U] !== le[P]) {
|
|
245
|
+
var $e = `
|
|
246
|
+
` + Q[U].replace(
|
|
247
|
+
" at new ",
|
|
248
|
+
" at "
|
|
249
|
+
);
|
|
250
|
+
return t.displayName && $e.includes("<anonymous>") && ($e = $e.replace("<anonymous>", t.displayName)), typeof t == "function" && _e.set(t, $e), $e;
|
|
251
|
+
}
|
|
252
|
+
while (1 <= U && 0 <= P);
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
} finally {
|
|
257
|
+
Ze = !1, I.H = q, e(), Error.prepareStackTrace = w;
|
|
258
|
+
}
|
|
259
|
+
return Q = (Q = t ? t.displayName || t.name : "") ? l(Q) : "", typeof t == "function" && _e.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 o(
|
|
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 fe:
|
|
275
|
+
return l("SuspenseList");
|
|
276
|
+
}
|
|
277
|
+
if (typeof t == "object")
|
|
278
|
+
switch (t.$$typeof) {
|
|
279
|
+
case O:
|
|
280
|
+
return t = o(t.render, !1), t;
|
|
281
|
+
case R:
|
|
282
|
+
return p(t.type);
|
|
283
|
+
case S:
|
|
284
|
+
b = t._payload, t = t._init;
|
|
285
|
+
try {
|
|
286
|
+
return p(t(b));
|
|
287
|
+
} catch {
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
return "";
|
|
291
|
+
}
|
|
292
|
+
function h() {
|
|
293
|
+
var t = I.A;
|
|
294
|
+
return t === null ? null : t.getOwner();
|
|
295
|
+
}
|
|
296
|
+
function m(t) {
|
|
297
|
+
if (Z.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, V, U) {
|
|
322
|
+
return w = U.ref, t = {
|
|
323
|
+
$$typeof: L,
|
|
324
|
+
type: t,
|
|
325
|
+
key: b,
|
|
326
|
+
props: U,
|
|
327
|
+
_owner: V
|
|
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 v(t, b, w, q, V, U) {
|
|
344
|
+
if (typeof t == "string" || typeof t == "function" || t === j || t === Y || t === A || t === B || t === fe || t === D || typeof t == "object" && t !== null && (t.$$typeof === S || t.$$typeof === R || t.$$typeof === d || t.$$typeof === g || t.$$typeof === O || t.$$typeof === W || t.getModuleId !== void 0)) {
|
|
345
|
+
var P = b.children;
|
|
346
|
+
if (P !== void 0)
|
|
347
|
+
if (q)
|
|
348
|
+
if (z(P)) {
|
|
349
|
+
for (q = 0; q < P.length; q++)
|
|
350
|
+
f(P[q], t);
|
|
351
|
+
Object.freeze && Object.freeze(P);
|
|
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(P, t);
|
|
357
|
+
} else
|
|
358
|
+
P = "", (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), t === null ? q = "null" : z(t) ? q = "array" : t !== void 0 && t.$$typeof === L ? (q = "<" + (n(t.type) || "Unknown") + " />", P = " 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
|
+
P
|
|
362
|
+
);
|
|
363
|
+
if (Z.call(b, "key")) {
|
|
364
|
+
P = n(t);
|
|
365
|
+
var oe = Object.keys(b).filter(function(Q) {
|
|
366
|
+
return Q !== "key";
|
|
367
|
+
});
|
|
368
|
+
q = 0 < oe.length ? "{key: someKey, " + oe.join(": ..., ") + ": ...}" : "{key: someKey}", Ce[P + q] || (oe = 0 < oe.length ? "{" + oe.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
|
+
P,
|
|
377
|
+
oe,
|
|
378
|
+
P
|
|
379
|
+
), Ce[P + q] = !0);
|
|
380
|
+
}
|
|
381
|
+
if (P = null, w !== void 0 && (r(w), P = "" + w), m(b) && (r(b.key), P = "" + b.key), "key" in b) {
|
|
382
|
+
w = {};
|
|
383
|
+
for (var me in b)
|
|
384
|
+
me !== "key" && (w[me] = b[me]);
|
|
385
|
+
} else w = b;
|
|
386
|
+
return P && a(
|
|
387
|
+
w,
|
|
388
|
+
typeof t == "function" ? t.displayName || t.name || "Unknown" : t
|
|
389
|
+
), y(t, P, U, V, h(), 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
|
+
$(q) && T(q, b);
|
|
397
|
+
}
|
|
398
|
+
else if ($(t))
|
|
399
|
+
t._store && (t._store.validated = 1);
|
|
400
|
+
else if (t === null || typeof t != "object" ? w = null : (w = k && t[k] || 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
|
+
$(t.value) && T(t.value, b);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
function $(t) {
|
|
406
|
+
return typeof t == "object" && t !== null && t.$$typeof === L;
|
|
407
|
+
}
|
|
408
|
+
function T(t, b) {
|
|
409
|
+
if (t._store && !t._store.validated && t.key == null && (t._store.validated = 1, b = _(b), !We[b])) {
|
|
410
|
+
We[b] = !0;
|
|
411
|
+
var w = "";
|
|
412
|
+
t && t._owner != null && t._owner !== h() && (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 = I.getCurrentStack;
|
|
414
|
+
I.getCurrentStack = function() {
|
|
415
|
+
var V = p(t.type);
|
|
416
|
+
return q && (V += q() || ""), V;
|
|
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
|
+
), I.getCurrentStack = q;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
function _(t) {
|
|
425
|
+
var b = "", w = h();
|
|
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 = Ne, L = Symbol.for("react.transitional.element"), E = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), A = Symbol.for("react.strict_mode"), Y = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), d = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), fe = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), D = Symbol.for("react.offscreen"), k = Symbol.iterator, x = Symbol.for("react.client.reference"), I = M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, F = Object.assign, W = Symbol.for("react.client.reference"), z = Array.isArray, H = 0, J, ae, ne, ue, re, G, ee;
|
|
433
|
+
u.__reactDisabledLog = !0;
|
|
434
|
+
var se, de, Ze = !1, _e = new (typeof WeakMap == "function" ? WeakMap : Map)(), dt = Symbol.for("react.client.reference"), Ae, qe = {}, Ce = {}, We = {};
|
|
435
|
+
ve.Fragment = j, ve.jsx = function(t, b, w, q, V) {
|
|
436
|
+
return v(t, b, w, !1, q, V);
|
|
437
|
+
}, ve.jsxs = function(t, b, w, q, V) {
|
|
438
|
+
return v(t, b, w, !0, q, V);
|
|
439
|
+
};
|
|
440
|
+
}()), ve;
|
|
441
|
+
}
|
|
442
|
+
var Ye;
|
|
443
|
+
function mt() {
|
|
444
|
+
return Ye || (Ye = 1, process.env.NODE_ENV === "production" ? Se.exports = lt() : Se.exports = ft()), Se.exports;
|
|
445
|
+
}
|
|
446
|
+
var N = mt();
|
|
447
|
+
const ut = 2.375 * 16, Be = 3, K = {
|
|
448
|
+
day: {
|
|
449
|
+
labelUnit: "day",
|
|
450
|
+
tickUnit: "hour",
|
|
451
|
+
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
|
|
459
|
+
},
|
|
460
|
+
week: {
|
|
461
|
+
labelUnit: "week",
|
|
462
|
+
tickUnit: "day",
|
|
463
|
+
unitPerTick: 1,
|
|
464
|
+
dragStepUnit: "hour",
|
|
465
|
+
dragStepAmount: 6,
|
|
466
|
+
basePxPerDragStep: 32,
|
|
467
|
+
formatTickLabel: (n) => n.format("D"),
|
|
468
|
+
// 1, 2, 3...
|
|
469
|
+
formatHeaderLabel: (n) => n.format("MMM")
|
|
470
|
+
// Jun
|
|
471
|
+
},
|
|
472
|
+
month: {
|
|
473
|
+
labelUnit: "month",
|
|
474
|
+
tickUnit: "day",
|
|
475
|
+
unitPerTick: 1,
|
|
476
|
+
dragStepUnit: "day",
|
|
477
|
+
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
|
|
483
|
+
},
|
|
484
|
+
year: {
|
|
485
|
+
labelUnit: "year",
|
|
486
|
+
tickUnit: "day",
|
|
487
|
+
unitPerTick: 7,
|
|
488
|
+
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
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
var be = { exports: {} }, ht = be.exports, Ge;
|
|
498
|
+
function pt() {
|
|
499
|
+
return Ge || (Ge = 1, function(n, s) {
|
|
500
|
+
(function(r, u) {
|
|
501
|
+
n.exports = u();
|
|
502
|
+
})(ht, function() {
|
|
503
|
+
var r = 1e3, u = 6e4, i = 36e5, e = "millisecond", l = "second", o = "minute", p = "hour", h = "day", m = "week", a = "month", c = "quarter", y = "year", v = "date", f = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, T = /\[([^\]]+)]|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, _ = { 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(R) {
|
|
504
|
+
var S = ["th", "st", "nd", "rd"], D = R % 100;
|
|
505
|
+
return "[" + R + (S[(D - 20) % 10] || S[D] || S[0]) + "]";
|
|
506
|
+
} }, M = function(R, S, D) {
|
|
507
|
+
var k = String(R);
|
|
508
|
+
return !k || k.length >= S ? R : "" + Array(S + 1 - k.length).join(D) + R;
|
|
509
|
+
}, L = { s: M, z: function(R) {
|
|
510
|
+
var S = -R.utcOffset(), D = Math.abs(S), k = Math.floor(D / 60), x = D % 60;
|
|
511
|
+
return (S <= 0 ? "+" : "-") + M(k, 2, "0") + ":" + M(x, 2, "0");
|
|
512
|
+
}, m: function R(S, D) {
|
|
513
|
+
if (S.date() < D.date()) return -R(D, S);
|
|
514
|
+
var k = 12 * (D.year() - S.year()) + (D.month() - S.month()), x = S.clone().add(k, a), I = D - x < 0, Z = S.clone().add(k + (I ? -1 : 1), a);
|
|
515
|
+
return +(-(k + (D - x) / (I ? x - Z : Z - x)) || 0);
|
|
516
|
+
}, a: function(R) {
|
|
517
|
+
return R < 0 ? Math.ceil(R) || 0 : Math.floor(R);
|
|
518
|
+
}, p: function(R) {
|
|
519
|
+
return { M: a, y, w: m, d: h, D: v, h: p, m: o, s: l, ms: e, Q: c }[R] || String(R || "").toLowerCase().replace(/s$/, "");
|
|
520
|
+
}, u: function(R) {
|
|
521
|
+
return R === void 0;
|
|
522
|
+
} }, E = "en", j = {};
|
|
523
|
+
j[E] = _;
|
|
524
|
+
var A = "$isDayjsObject", Y = function(R) {
|
|
525
|
+
return R instanceof B || !(!R || !R[A]);
|
|
526
|
+
}, g = function R(S, D, k) {
|
|
527
|
+
var x;
|
|
528
|
+
if (!S) return E;
|
|
529
|
+
if (typeof S == "string") {
|
|
530
|
+
var I = S.toLowerCase();
|
|
531
|
+
j[I] && (x = I), D && (j[I] = D, x = I);
|
|
532
|
+
var Z = S.split("-");
|
|
533
|
+
if (!x && Z.length > 1) return R(Z[0]);
|
|
534
|
+
} else {
|
|
535
|
+
var F = S.name;
|
|
536
|
+
j[F] = S, x = F;
|
|
537
|
+
}
|
|
538
|
+
return !k && x && (E = x), x || !k && E;
|
|
539
|
+
}, d = function(R, S) {
|
|
540
|
+
if (Y(R)) return R.clone();
|
|
541
|
+
var D = typeof S == "object" ? S : {};
|
|
542
|
+
return D.date = R, D.args = arguments, new B(D);
|
|
543
|
+
}, O = L;
|
|
544
|
+
O.l = g, O.i = Y, O.w = function(R, S) {
|
|
545
|
+
return d(R, { locale: S.$L, utc: S.$u, x: S.$x, $offset: S.$offset });
|
|
546
|
+
};
|
|
547
|
+
var B = function() {
|
|
548
|
+
function R(D) {
|
|
549
|
+
this.$L = g(D.locale, null, !0), this.parse(D), this.$x = this.$x || D.x || {}, this[A] = !0;
|
|
550
|
+
}
|
|
551
|
+
var S = R.prototype;
|
|
552
|
+
return S.parse = function(D) {
|
|
553
|
+
this.$d = function(k) {
|
|
554
|
+
var x = k.date, I = k.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 Z = x.match($);
|
|
560
|
+
if (Z) {
|
|
561
|
+
var F = Z[2] - 1 || 0, W = (Z[7] || "0").substring(0, 3);
|
|
562
|
+
return I ? new Date(Date.UTC(Z[1], F, Z[3] || 1, Z[4] || 0, Z[5] || 0, Z[6] || 0, W)) : new Date(Z[1], F, Z[3] || 1, Z[4] || 0, Z[5] || 0, Z[6] || 0, W);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
return new Date(x);
|
|
566
|
+
}(D), this.init();
|
|
567
|
+
}, S.init = function() {
|
|
568
|
+
var D = this.$d;
|
|
569
|
+
this.$y = D.getFullYear(), this.$M = D.getMonth(), this.$D = D.getDate(), this.$W = D.getDay(), this.$H = D.getHours(), this.$m = D.getMinutes(), this.$s = D.getSeconds(), this.$ms = D.getMilliseconds();
|
|
570
|
+
}, S.$utils = function() {
|
|
571
|
+
return O;
|
|
572
|
+
}, S.isValid = function() {
|
|
573
|
+
return this.$d.toString() !== f;
|
|
574
|
+
}, S.isSame = function(D, k) {
|
|
575
|
+
var x = d(D);
|
|
576
|
+
return this.startOf(k) <= x && x <= this.endOf(k);
|
|
577
|
+
}, S.isAfter = function(D, k) {
|
|
578
|
+
return d(D) < this.startOf(k);
|
|
579
|
+
}, S.isBefore = function(D, k) {
|
|
580
|
+
return this.endOf(k) < d(D);
|
|
581
|
+
}, S.$g = function(D, k, x) {
|
|
582
|
+
return O.u(D) ? this[k] : this.set(x, D);
|
|
583
|
+
}, S.unix = function() {
|
|
584
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
585
|
+
}, S.valueOf = function() {
|
|
586
|
+
return this.$d.getTime();
|
|
587
|
+
}, S.startOf = function(D, k) {
|
|
588
|
+
var x = this, I = !!O.u(k) || k, Z = O.p(D), F = function(re, G) {
|
|
589
|
+
var ee = O.w(x.$u ? Date.UTC(x.$y, G, re) : new Date(x.$y, G, re), x);
|
|
590
|
+
return I ? ee : ee.endOf(h);
|
|
591
|
+
}, W = function(re, G) {
|
|
592
|
+
return O.w(x.toDate()[re].apply(x.toDate("s"), (I ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(G)), x);
|
|
593
|
+
}, z = this.$W, H = this.$M, J = this.$D, ae = "set" + (this.$u ? "UTC" : "");
|
|
594
|
+
switch (Z) {
|
|
595
|
+
case y:
|
|
596
|
+
return I ? F(1, 0) : F(31, 11);
|
|
597
|
+
case a:
|
|
598
|
+
return I ? F(1, H) : F(0, H + 1);
|
|
599
|
+
case m:
|
|
600
|
+
var ne = this.$locale().weekStart || 0, ue = (z < ne ? z + 7 : z) - ne;
|
|
601
|
+
return F(I ? J - ue : J + (6 - ue), H);
|
|
602
|
+
case h:
|
|
603
|
+
case v:
|
|
604
|
+
return W(ae + "Hours", 0);
|
|
605
|
+
case p:
|
|
606
|
+
return W(ae + "Minutes", 1);
|
|
607
|
+
case o:
|
|
608
|
+
return W(ae + "Seconds", 2);
|
|
609
|
+
case l:
|
|
610
|
+
return W(ae + "Milliseconds", 3);
|
|
611
|
+
default:
|
|
612
|
+
return this.clone();
|
|
613
|
+
}
|
|
614
|
+
}, S.endOf = function(D) {
|
|
615
|
+
return this.startOf(D, !1);
|
|
616
|
+
}, S.$set = function(D, k) {
|
|
617
|
+
var x, I = O.p(D), Z = "set" + (this.$u ? "UTC" : ""), F = (x = {}, x[h] = Z + "Date", x[v] = Z + "Date", x[a] = Z + "Month", x[y] = Z + "FullYear", x[p] = Z + "Hours", x[o] = Z + "Minutes", x[l] = Z + "Seconds", x[e] = Z + "Milliseconds", x)[I], W = I === h ? this.$D + (k - this.$W) : k;
|
|
618
|
+
if (I === a || I === y) {
|
|
619
|
+
var z = this.clone().set(v, 1);
|
|
620
|
+
z.$d[F](W), z.init(), this.$d = z.set(v, Math.min(this.$D, z.daysInMonth())).$d;
|
|
621
|
+
} else F && this.$d[F](W);
|
|
622
|
+
return this.init(), this;
|
|
623
|
+
}, S.set = function(D, k) {
|
|
624
|
+
return this.clone().$set(D, k);
|
|
625
|
+
}, S.get = function(D) {
|
|
626
|
+
return this[O.p(D)]();
|
|
627
|
+
}, S.add = function(D, k) {
|
|
628
|
+
var x, I = this;
|
|
629
|
+
D = Number(D);
|
|
630
|
+
var Z = O.p(k), F = function(H) {
|
|
631
|
+
var J = d(I);
|
|
632
|
+
return O.w(J.date(J.date() + Math.round(H * D)), I);
|
|
633
|
+
};
|
|
634
|
+
if (Z === a) return this.set(a, this.$M + D);
|
|
635
|
+
if (Z === y) return this.set(y, this.$y + D);
|
|
636
|
+
if (Z === h) return F(1);
|
|
637
|
+
if (Z === m) return F(7);
|
|
638
|
+
var W = (x = {}, x[o] = u, x[p] = i, x[l] = r, x)[Z] || 1, z = this.$d.getTime() + D * W;
|
|
639
|
+
return O.w(z, this);
|
|
640
|
+
}, S.subtract = function(D, k) {
|
|
641
|
+
return this.add(-1 * D, k);
|
|
642
|
+
}, S.format = function(D) {
|
|
643
|
+
var k = this, x = this.$locale();
|
|
644
|
+
if (!this.isValid()) return x.invalidDate || f;
|
|
645
|
+
var I = D || "YYYY-MM-DDTHH:mm:ssZ", Z = O.z(this), F = this.$H, W = this.$m, z = this.$M, H = x.weekdays, J = x.months, ae = x.meridiem, ne = function(G, ee, se, de) {
|
|
646
|
+
return G && (G[ee] || G(k, I)) || se[ee].slice(0, de);
|
|
647
|
+
}, ue = function(G) {
|
|
648
|
+
return O.s(F % 12 || 12, G, "0");
|
|
649
|
+
}, re = ae || function(G, ee, se) {
|
|
650
|
+
var de = G < 12 ? "AM" : "PM";
|
|
651
|
+
return se ? de.toLowerCase() : de;
|
|
652
|
+
};
|
|
653
|
+
return I.replace(T, function(G, ee) {
|
|
654
|
+
return ee || function(se) {
|
|
655
|
+
switch (se) {
|
|
656
|
+
case "YY":
|
|
657
|
+
return String(k.$y).slice(-2);
|
|
658
|
+
case "YYYY":
|
|
659
|
+
return O.s(k.$y, 4, "0");
|
|
660
|
+
case "M":
|
|
661
|
+
return z + 1;
|
|
662
|
+
case "MM":
|
|
663
|
+
return O.s(z + 1, 2, "0");
|
|
664
|
+
case "MMM":
|
|
665
|
+
return ne(x.monthsShort, z, J, 3);
|
|
666
|
+
case "MMMM":
|
|
667
|
+
return ne(J, z);
|
|
668
|
+
case "D":
|
|
669
|
+
return k.$D;
|
|
670
|
+
case "DD":
|
|
671
|
+
return O.s(k.$D, 2, "0");
|
|
672
|
+
case "d":
|
|
673
|
+
return String(k.$W);
|
|
674
|
+
case "dd":
|
|
675
|
+
return ne(x.weekdaysMin, k.$W, H, 2);
|
|
676
|
+
case "ddd":
|
|
677
|
+
return ne(x.weekdaysShort, k.$W, H, 3);
|
|
678
|
+
case "dddd":
|
|
679
|
+
return H[k.$W];
|
|
680
|
+
case "H":
|
|
681
|
+
return String(F);
|
|
682
|
+
case "HH":
|
|
683
|
+
return O.s(F, 2, "0");
|
|
684
|
+
case "h":
|
|
685
|
+
return ue(1);
|
|
686
|
+
case "hh":
|
|
687
|
+
return ue(2);
|
|
688
|
+
case "a":
|
|
689
|
+
return re(F, W, !0);
|
|
690
|
+
case "A":
|
|
691
|
+
return re(F, W, !1);
|
|
692
|
+
case "m":
|
|
693
|
+
return String(W);
|
|
694
|
+
case "mm":
|
|
695
|
+
return O.s(W, 2, "0");
|
|
696
|
+
case "s":
|
|
697
|
+
return String(k.$s);
|
|
698
|
+
case "ss":
|
|
699
|
+
return O.s(k.$s, 2, "0");
|
|
700
|
+
case "SSS":
|
|
701
|
+
return O.s(k.$ms, 3, "0");
|
|
702
|
+
case "Z":
|
|
703
|
+
return Z;
|
|
704
|
+
}
|
|
705
|
+
return null;
|
|
706
|
+
}(G) || Z.replace(":", "");
|
|
707
|
+
});
|
|
708
|
+
}, S.utcOffset = function() {
|
|
709
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
710
|
+
}, S.diff = function(D, k, x) {
|
|
711
|
+
var I, Z = this, F = O.p(k), W = d(D), z = (W.utcOffset() - this.utcOffset()) * u, H = this - W, J = function() {
|
|
712
|
+
return O.m(Z, W);
|
|
713
|
+
};
|
|
714
|
+
switch (F) {
|
|
715
|
+
case y:
|
|
716
|
+
I = J() / 12;
|
|
717
|
+
break;
|
|
718
|
+
case a:
|
|
719
|
+
I = J();
|
|
720
|
+
break;
|
|
721
|
+
case c:
|
|
722
|
+
I = J() / 3;
|
|
723
|
+
break;
|
|
724
|
+
case m:
|
|
725
|
+
I = (H - z) / 6048e5;
|
|
726
|
+
break;
|
|
727
|
+
case h:
|
|
728
|
+
I = (H - z) / 864e5;
|
|
729
|
+
break;
|
|
730
|
+
case p:
|
|
731
|
+
I = H / i;
|
|
732
|
+
break;
|
|
733
|
+
case o:
|
|
734
|
+
I = H / u;
|
|
735
|
+
break;
|
|
736
|
+
case l:
|
|
737
|
+
I = H / r;
|
|
738
|
+
break;
|
|
739
|
+
default:
|
|
740
|
+
I = H;
|
|
741
|
+
}
|
|
742
|
+
return x ? I : O.a(I);
|
|
743
|
+
}, S.daysInMonth = function() {
|
|
744
|
+
return this.endOf(a).$D;
|
|
745
|
+
}, S.$locale = function() {
|
|
746
|
+
return j[this.$L];
|
|
747
|
+
}, S.locale = function(D, k) {
|
|
748
|
+
if (!D) return this.$L;
|
|
749
|
+
var x = this.clone(), I = g(D, k, !0);
|
|
750
|
+
return I && (x.$L = I), x;
|
|
751
|
+
}, S.clone = function() {
|
|
752
|
+
return O.w(this.$d, this);
|
|
753
|
+
}, S.toDate = function() {
|
|
754
|
+
return new Date(this.valueOf());
|
|
755
|
+
}, S.toJSON = function() {
|
|
756
|
+
return this.isValid() ? this.toISOString() : null;
|
|
757
|
+
}, S.toISOString = function() {
|
|
758
|
+
return this.$d.toISOString();
|
|
759
|
+
}, S.toString = function() {
|
|
760
|
+
return this.$d.toUTCString();
|
|
761
|
+
}, R;
|
|
762
|
+
}(), fe = B.prototype;
|
|
763
|
+
return d.prototype = fe, [["$ms", e], ["$s", l], ["$m", o], ["$H", p], ["$W", h], ["$M", a], ["$y", y], ["$D", v]].forEach(function(R) {
|
|
764
|
+
fe[R[1]] = function(S) {
|
|
765
|
+
return this.$g(S, R[0], R[1]);
|
|
766
|
+
};
|
|
767
|
+
}), d.extend = function(R, S) {
|
|
768
|
+
return R.$i || (R(S, B, d), R.$i = !0), d;
|
|
769
|
+
}, d.locale = g, d.isDayjs = Y, d.unix = function(R) {
|
|
770
|
+
return d(1e3 * R);
|
|
771
|
+
}, d.en = j[E], d.Ls = j, d.p = {}, d;
|
|
772
|
+
});
|
|
773
|
+
}(be)), be.exports;
|
|
774
|
+
}
|
|
775
|
+
var $t = pt();
|
|
776
|
+
const C = /* @__PURE__ */ te($t);
|
|
777
|
+
function gt(n, s, r, u) {
|
|
778
|
+
if (!r.length)
|
|
779
|
+
return { barMarginLeftAmount: 0, barWidthSize: 0 };
|
|
780
|
+
const { tickUnit: i, unitPerTick: e } = K[u], l = r.reduce((f, $) => f + $.widthPx, 0), o = r[0].startDate, p = r[r.length - 1].startDate, h = C(p).add(e, i).diff(o), m = l / h, a = n.diff(o), c = s.diff(o), y = a * m, v = Math.max(c - a, 1) * m;
|
|
781
|
+
return { barMarginLeftAmount: y, barWidthSize: v };
|
|
782
|
+
}
|
|
783
|
+
function vt(n) {
|
|
784
|
+
let s = 1 / 0, r = -1 / 0;
|
|
785
|
+
for (const { startDate: u, endDate: i } of Object.values(n)) {
|
|
786
|
+
const e = C(u).valueOf(), l = C(i).valueOf();
|
|
787
|
+
Number.isNaN(e) || (s = Math.min(s, e)), Number.isNaN(l) || (r = Math.max(r, l));
|
|
788
|
+
}
|
|
789
|
+
return { minDate: C(s), maxDate: C(r) };
|
|
790
|
+
}
|
|
791
|
+
function Dt(n, s, r) {
|
|
792
|
+
const { tickUnit: u, unitPerTick: i } = K[r];
|
|
793
|
+
return {
|
|
794
|
+
paddedMinDate: n.subtract(
|
|
795
|
+
Be * i,
|
|
796
|
+
u
|
|
797
|
+
),
|
|
798
|
+
paddedMaxDate: s.add(Be * i, u)
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
function yt(n, s, r) {
|
|
802
|
+
const { tickUnit: u, unitPerTick: i, basePxPerDragStep: e, dragStepUnit: l, dragStepAmount: o } = K[r], p = [];
|
|
803
|
+
let h = n.startOf(u);
|
|
804
|
+
for (; h.isBefore(s); ) {
|
|
805
|
+
const m = C(h).add(i, u).diff(h, l) / o;
|
|
806
|
+
p.push({
|
|
807
|
+
startDate: h,
|
|
808
|
+
widthPx: m * e
|
|
809
|
+
}), h = h.add(i, u);
|
|
810
|
+
}
|
|
811
|
+
return p;
|
|
812
|
+
}
|
|
813
|
+
function ct(n, s) {
|
|
814
|
+
const { labelUnit: r, formatHeaderLabel: u } = K[s], i = [];
|
|
815
|
+
let e = null, l = "", o = 0, p = null;
|
|
816
|
+
return n.forEach((h, m) => {
|
|
817
|
+
const a = h.startDate.startOf(r), c = a.valueOf(), y = (u == null ? void 0 : u(a)) ?? a.format();
|
|
818
|
+
c === e ? o += h.widthPx : (e !== null && i.push({
|
|
819
|
+
label: l,
|
|
820
|
+
widthPx: o,
|
|
821
|
+
startDate: p
|
|
822
|
+
}), e = c, l = y, o = h.widthPx, p = a), m === n.length - 1 && i.push({
|
|
823
|
+
label: l,
|
|
824
|
+
widthPx: o,
|
|
825
|
+
startDate: p
|
|
826
|
+
});
|
|
827
|
+
}), i;
|
|
828
|
+
}
|
|
829
|
+
function St(n, s, r, u, i, e) {
|
|
830
|
+
const { minDate: l, maxDate: o } = vt(n);
|
|
831
|
+
r(l), u(o);
|
|
832
|
+
const { paddedMinDate: p, paddedMaxDate: h } = Dt(
|
|
833
|
+
l,
|
|
834
|
+
o,
|
|
835
|
+
s
|
|
836
|
+
), m = yt(
|
|
837
|
+
p,
|
|
838
|
+
h,
|
|
839
|
+
s
|
|
840
|
+
), a = ct(m, s);
|
|
841
|
+
i(m), e(a);
|
|
842
|
+
}
|
|
843
|
+
const xt = ({
|
|
844
|
+
bottomRowCells: n,
|
|
845
|
+
selectedScale: s,
|
|
846
|
+
scrollRef: r
|
|
847
|
+
}) => {
|
|
848
|
+
var m;
|
|
849
|
+
const u = K[s], [i, e] = he(0), l = Pe(
|
|
850
|
+
() => ct(n, s),
|
|
851
|
+
[n, s]
|
|
852
|
+
), o = Pe(() => {
|
|
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 = Pe(() => {
|
|
860
|
+
let a = 0;
|
|
861
|
+
return o.map((c) => {
|
|
862
|
+
const y = { ...c, left: a };
|
|
863
|
+
return a += c.widthPx, y;
|
|
864
|
+
});
|
|
865
|
+
}, [o]);
|
|
866
|
+
xe(() => {
|
|
867
|
+
const a = r.current;
|
|
868
|
+
if (!a) return;
|
|
869
|
+
const c = () => {
|
|
870
|
+
const y = a.scrollLeft;
|
|
871
|
+
for (let v = p.length - 1; v >= 0; v--)
|
|
872
|
+
if (y >= p[v].left) {
|
|
873
|
+
e(v);
|
|
874
|
+
break;
|
|
875
|
+
}
|
|
876
|
+
};
|
|
877
|
+
return a.addEventListener("scroll", c), c(), () => a.removeEventListener("scroll", c);
|
|
878
|
+
}, [p]);
|
|
879
|
+
const h = ((m = p[i]) == null ? void 0 : m.label) ?? "";
|
|
880
|
+
return /* @__PURE__ */ N.jsx("div", { className: "bg-base-200 sticky top-0 z-30", children: /* @__PURE__ */ N.jsxs("div", { className: "flex min-w-max flex-col", children: [
|
|
881
|
+
/* @__PURE__ */ N.jsxs("div", { className: "relative flex h-8", children: [
|
|
882
|
+
/* @__PURE__ */ N.jsx("div", { className: "bg-base-200 border-base-400 sticky left-0 z-40 flex w-24 shrink-0 items-center justify-center border-b border-solid text-sm font-bold", children: h }),
|
|
883
|
+
/* @__PURE__ */ N.jsx("div", { className: "flex", children: p.map((a, c) => /* @__PURE__ */ N.jsx(
|
|
884
|
+
"div",
|
|
885
|
+
{
|
|
886
|
+
className: "border-base-400 bg-base-200 border-b border-solid py-2 pr-4 text-left text-sm font-bold",
|
|
887
|
+
style: { width: `${a.widthPx}px` },
|
|
888
|
+
children: /* @__PURE__ */ N.jsx("p", { className: "px-4", children: c === 0 ? "" : a.label })
|
|
889
|
+
},
|
|
890
|
+
c
|
|
891
|
+
)) })
|
|
892
|
+
] }),
|
|
893
|
+
/* @__PURE__ */ N.jsx("div", { className: "flex", children: n.map((a, c) => {
|
|
894
|
+
var v;
|
|
895
|
+
const y = ((v = u.formatTickLabel) == null ? void 0 : v.call(u, a.startDate)) || "";
|
|
896
|
+
return /* @__PURE__ */ N.jsx(
|
|
897
|
+
"div",
|
|
898
|
+
{
|
|
899
|
+
className: "relative p-1 text-center text-xs",
|
|
900
|
+
style: { width: `${a.widthPx}px` },
|
|
901
|
+
children: y
|
|
902
|
+
},
|
|
903
|
+
c
|
|
904
|
+
);
|
|
905
|
+
}) })
|
|
906
|
+
] }) });
|
|
907
|
+
};
|
|
908
|
+
var we = { exports: {} }, bt = we.exports, Ve;
|
|
909
|
+
function wt() {
|
|
910
|
+
return Ve || (Ve = 1, function(n, s) {
|
|
911
|
+
(function(r, u) {
|
|
912
|
+
n.exports = u();
|
|
913
|
+
})(bt, function() {
|
|
914
|
+
return function(r, u, i) {
|
|
915
|
+
u.prototype.isBetween = function(e, l, o, p) {
|
|
916
|
+
var h = i(e), m = i(l), a = (p = p || "()")[0] === "(", c = p[1] === ")";
|
|
917
|
+
return (a ? this.isAfter(h, o) : !this.isBefore(h, o)) && (c ? this.isBefore(m, o) : !this.isAfter(m, o)) || (a ? this.isBefore(h, o) : !this.isAfter(h, o)) && (c ? this.isAfter(m, o) : !this.isBefore(m, o));
|
|
918
|
+
};
|
|
919
|
+
};
|
|
920
|
+
});
|
|
921
|
+
}(we)), we.exports;
|
|
922
|
+
}
|
|
923
|
+
var Tt = wt();
|
|
924
|
+
const kt = /* @__PURE__ */ te(Tt);
|
|
925
|
+
var Te = { exports: {} }, Et = Te.exports, Xe;
|
|
926
|
+
function Mt() {
|
|
927
|
+
return Xe || (Xe = 1, function(n, s) {
|
|
928
|
+
(function(r, u) {
|
|
929
|
+
n.exports = u();
|
|
930
|
+
})(Et, function() {
|
|
931
|
+
var r = "day";
|
|
932
|
+
return function(u, i, e) {
|
|
933
|
+
var l = function(h) {
|
|
934
|
+
return h.add(4 - h.isoWeekday(), r);
|
|
935
|
+
}, o = i.prototype;
|
|
936
|
+
o.isoWeekYear = function() {
|
|
937
|
+
return l(this).year();
|
|
938
|
+
}, o.isoWeek = function(h) {
|
|
939
|
+
if (!this.$utils().u(h)) return this.add(7 * (h - this.isoWeek()), r);
|
|
940
|
+
var m, a, c, y, v = l(this), f = (m = this.isoWeekYear(), a = this.$u, c = (a ? e.utc : e)().year(m).startOf("year"), y = 4 - c.isoWeekday(), c.isoWeekday() > 4 && (y += 7), c.add(y, r));
|
|
941
|
+
return v.diff(f, "week") + 1;
|
|
942
|
+
}, o.isoWeekday = function(h) {
|
|
943
|
+
return this.$utils().u(h) ? this.day() || 7 : this.day(this.day() % 7 ? h : h - 7);
|
|
944
|
+
};
|
|
945
|
+
var p = o.startOf;
|
|
946
|
+
o.startOf = function(h, m) {
|
|
947
|
+
var a = this.$utils(), c = !!a.u(m) || m;
|
|
948
|
+
return a.p(h) === "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)(h, m);
|
|
949
|
+
};
|
|
950
|
+
};
|
|
951
|
+
});
|
|
952
|
+
}(Te)), Te.exports;
|
|
953
|
+
}
|
|
954
|
+
var Ot = Mt();
|
|
955
|
+
const It = /* @__PURE__ */ te(Ot);
|
|
956
|
+
var ke = { exports: {} }, Rt = ke.exports, Je;
|
|
957
|
+
function Lt() {
|
|
958
|
+
return Je || (Je = 1, function(n, s) {
|
|
959
|
+
(function(r, u) {
|
|
960
|
+
n.exports = u();
|
|
961
|
+
})(Rt, function() {
|
|
962
|
+
return function(r, u) {
|
|
963
|
+
u.prototype.isSameOrAfter = function(i, e) {
|
|
964
|
+
return this.isSame(i, e) || this.isAfter(i, e);
|
|
965
|
+
};
|
|
966
|
+
};
|
|
967
|
+
});
|
|
968
|
+
}(ke)), ke.exports;
|
|
969
|
+
}
|
|
970
|
+
var jt = Lt();
|
|
971
|
+
const Zt = /* @__PURE__ */ te(jt);
|
|
972
|
+
var Ee = { exports: {} }, _t = Ee.exports, Qe;
|
|
973
|
+
function Pt() {
|
|
974
|
+
return Qe || (Qe = 1, function(n, s) {
|
|
975
|
+
(function(r, u) {
|
|
976
|
+
n.exports = u();
|
|
977
|
+
})(_t, function() {
|
|
978
|
+
return function(r, u) {
|
|
979
|
+
u.prototype.isSameOrBefore = function(i, e) {
|
|
980
|
+
return this.isSame(i, e) || this.isBefore(i, e);
|
|
981
|
+
};
|
|
982
|
+
};
|
|
983
|
+
});
|
|
984
|
+
}(Ee)), Ee.exports;
|
|
985
|
+
}
|
|
986
|
+
var Ft = Pt();
|
|
987
|
+
const Nt = /* @__PURE__ */ te(Ft);
|
|
988
|
+
var Me = { exports: {} }, At = Me.exports, Ke;
|
|
989
|
+
function qt() {
|
|
990
|
+
return Ke || (Ke = 1, function(n, s) {
|
|
991
|
+
(function(r, u) {
|
|
992
|
+
n.exports = u();
|
|
993
|
+
})(At, function() {
|
|
994
|
+
return function(r, u, i) {
|
|
995
|
+
u.prototype.isToday = function() {
|
|
996
|
+
var e = "YYYY-MM-DD", l = i();
|
|
997
|
+
return this.format(e) === l.format(e);
|
|
998
|
+
};
|
|
999
|
+
};
|
|
1000
|
+
});
|
|
1001
|
+
}(Me)), Me.exports;
|
|
1002
|
+
}
|
|
1003
|
+
var Ct = qt();
|
|
1004
|
+
const Wt = /* @__PURE__ */ te(Ct);
|
|
1005
|
+
var Oe = { exports: {} }, Ut = Oe.exports, et;
|
|
1006
|
+
function zt() {
|
|
1007
|
+
return et || (et = 1, function(n, s) {
|
|
1008
|
+
(function(r, u) {
|
|
1009
|
+
n.exports = u();
|
|
1010
|
+
})(Ut, function() {
|
|
1011
|
+
return function(r, u, i) {
|
|
1012
|
+
var e = u.prototype, l = function(a) {
|
|
1013
|
+
return a && (a.indexOf ? a : a.s);
|
|
1014
|
+
}, o = function(a, c, y, v, f) {
|
|
1015
|
+
var $ = a.name ? a : a.$locale(), T = l($[c]), _ = l($[y]), M = T || _.map(function(E) {
|
|
1016
|
+
return E.slice(0, v);
|
|
1017
|
+
});
|
|
1018
|
+
if (!f) return M;
|
|
1019
|
+
var L = $.weekStart;
|
|
1020
|
+
return M.map(function(E, j) {
|
|
1021
|
+
return M[(j + (L || 0)) % 7];
|
|
1022
|
+
});
|
|
1023
|
+
}, p = function() {
|
|
1024
|
+
return i.Ls[i.locale()];
|
|
1025
|
+
}, h = function(a, c) {
|
|
1026
|
+
return a.formats[c] || function(y) {
|
|
1027
|
+
return y.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(v, f, $) {
|
|
1028
|
+
return f || $.slice(1);
|
|
1029
|
+
});
|
|
1030
|
+
}(a.formats[c.toUpperCase()]);
|
|
1031
|
+
}, m = function() {
|
|
1032
|
+
var a = this;
|
|
1033
|
+
return { months: function(c) {
|
|
1034
|
+
return c ? c.format("MMMM") : o(a, "months");
|
|
1035
|
+
}, monthsShort: function(c) {
|
|
1036
|
+
return c ? c.format("MMM") : o(a, "monthsShort", "months", 3);
|
|
1037
|
+
}, firstDayOfWeek: function() {
|
|
1038
|
+
return a.$locale().weekStart || 0;
|
|
1039
|
+
}, weekdays: function(c) {
|
|
1040
|
+
return c ? c.format("dddd") : o(a, "weekdays");
|
|
1041
|
+
}, weekdaysMin: function(c) {
|
|
1042
|
+
return c ? c.format("dd") : o(a, "weekdaysMin", "weekdays", 2);
|
|
1043
|
+
}, weekdaysShort: function(c) {
|
|
1044
|
+
return c ? c.format("ddd") : o(a, "weekdaysShort", "weekdays", 3);
|
|
1045
|
+
}, longDateFormat: function(c) {
|
|
1046
|
+
return h(a.$locale(), c);
|
|
1047
|
+
}, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
|
|
1048
|
+
};
|
|
1049
|
+
e.localeData = function() {
|
|
1050
|
+
return m.bind(this)();
|
|
1051
|
+
}, i.localeData = function() {
|
|
1052
|
+
var a = p();
|
|
1053
|
+
return { firstDayOfWeek: function() {
|
|
1054
|
+
return a.weekStart || 0;
|
|
1055
|
+
}, weekdays: function() {
|
|
1056
|
+
return i.weekdays();
|
|
1057
|
+
}, weekdaysShort: function() {
|
|
1058
|
+
return i.weekdaysShort();
|
|
1059
|
+
}, weekdaysMin: function() {
|
|
1060
|
+
return i.weekdaysMin();
|
|
1061
|
+
}, months: function() {
|
|
1062
|
+
return i.months();
|
|
1063
|
+
}, monthsShort: function() {
|
|
1064
|
+
return i.monthsShort();
|
|
1065
|
+
}, longDateFormat: function(c) {
|
|
1066
|
+
return h(a, c);
|
|
1067
|
+
}, meridiem: a.meridiem, ordinal: a.ordinal };
|
|
1068
|
+
}, i.months = function() {
|
|
1069
|
+
return o(p(), "months");
|
|
1070
|
+
}, i.monthsShort = function() {
|
|
1071
|
+
return o(p(), "monthsShort", "months", 3);
|
|
1072
|
+
}, i.weekdays = function(a) {
|
|
1073
|
+
return o(p(), "weekdays", null, null, a);
|
|
1074
|
+
}, i.weekdaysShort = function(a) {
|
|
1075
|
+
return o(p(), "weekdaysShort", "weekdays", 3, a);
|
|
1076
|
+
}, i.weekdaysMin = function(a) {
|
|
1077
|
+
return o(p(), "weekdaysMin", "weekdays", 2, a);
|
|
1078
|
+
};
|
|
1079
|
+
};
|
|
1080
|
+
});
|
|
1081
|
+
}(Oe)), Oe.exports;
|
|
1082
|
+
}
|
|
1083
|
+
var Ht = zt();
|
|
1084
|
+
const Yt = /* @__PURE__ */ te(Ht);
|
|
1085
|
+
var Ie = { exports: {} }, Bt = Ie.exports, tt;
|
|
1086
|
+
function Gt() {
|
|
1087
|
+
return tt || (tt = 1, function(n, s) {
|
|
1088
|
+
(function(r, u) {
|
|
1089
|
+
n.exports = u();
|
|
1090
|
+
})(Bt, function() {
|
|
1091
|
+
var r = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, u = {};
|
|
1092
|
+
return function(i, e, l) {
|
|
1093
|
+
var o, p = function(c, y, v) {
|
|
1094
|
+
v === void 0 && (v = {});
|
|
1095
|
+
var f = new Date(c), $ = function(T, _) {
|
|
1096
|
+
_ === void 0 && (_ = {});
|
|
1097
|
+
var M = _.timeZoneName || "short", L = T + "|" + M, E = u[L];
|
|
1098
|
+
return E || (E = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: T, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: M }), u[L] = E), E;
|
|
1099
|
+
}(y, v);
|
|
1100
|
+
return $.formatToParts(f);
|
|
1101
|
+
}, h = function(c, y) {
|
|
1102
|
+
for (var v = p(c, y), f = [], $ = 0; $ < v.length; $ += 1) {
|
|
1103
|
+
var T = v[$], _ = T.type, M = T.value, L = r[_];
|
|
1104
|
+
L >= 0 && (f[L] = parseInt(M, 10));
|
|
1105
|
+
}
|
|
1106
|
+
var E = f[3], j = E === 24 ? 0 : E, A = f[0] + "-" + f[1] + "-" + f[2] + " " + j + ":" + f[4] + ":" + f[5] + ":000", Y = +c;
|
|
1107
|
+
return (l.utc(A).valueOf() - (Y -= Y % 1e3)) / 6e4;
|
|
1108
|
+
}, m = e.prototype;
|
|
1109
|
+
m.tz = function(c, y) {
|
|
1110
|
+
c === void 0 && (c = o);
|
|
1111
|
+
var v, f = this.utcOffset(), $ = this.toDate(), T = $.toLocaleString("en-US", { timeZone: c }), _ = Math.round(($ - new Date(T)) / 1e3 / 60), M = 15 * -Math.round($.getTimezoneOffset() / 15) - _;
|
|
1112
|
+
if (!Number(M)) v = this.utcOffset(0, y);
|
|
1113
|
+
else if (v = l(T, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(M, !0), y) {
|
|
1114
|
+
var L = v.utcOffset();
|
|
1115
|
+
v = v.add(f - L, "minute");
|
|
1116
|
+
}
|
|
1117
|
+
return v.$x.$timezone = c, v;
|
|
1118
|
+
}, m.offsetName = function(c) {
|
|
1119
|
+
var y = this.$x.$timezone || l.tz.guess(), v = p(this.valueOf(), y, { timeZoneName: c }).find(function(f) {
|
|
1120
|
+
return f.type.toLowerCase() === "timezonename";
|
|
1121
|
+
});
|
|
1122
|
+
return v && v.value;
|
|
1123
|
+
};
|
|
1124
|
+
var a = m.startOf;
|
|
1125
|
+
m.startOf = function(c, y) {
|
|
1126
|
+
if (!this.$x || !this.$x.$timezone) return a.call(this, c, y);
|
|
1127
|
+
var v = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
1128
|
+
return a.call(v, c, y).tz(this.$x.$timezone, !0);
|
|
1129
|
+
}, l.tz = function(c, y, v) {
|
|
1130
|
+
var f = v && y, $ = v || y || o, T = h(+l(), $);
|
|
1131
|
+
if (typeof c != "string") return l(c).tz($);
|
|
1132
|
+
var _ = function(j, A, Y) {
|
|
1133
|
+
var g = j - 60 * A * 1e3, d = h(g, Y);
|
|
1134
|
+
if (A === d) return [g, A];
|
|
1135
|
+
var O = h(g -= 60 * (d - A) * 1e3, Y);
|
|
1136
|
+
return d === O ? [g, d] : [j - 60 * Math.min(d, O) * 1e3, Math.max(d, O)];
|
|
1137
|
+
}(l.utc(c, f).valueOf(), T, $), M = _[0], L = _[1], E = l(M).utcOffset(L);
|
|
1138
|
+
return E.$x.$timezone = $, E;
|
|
1139
|
+
}, l.tz.guess = function() {
|
|
1140
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1141
|
+
}, l.tz.setDefault = function(c) {
|
|
1142
|
+
o = c;
|
|
1143
|
+
};
|
|
1144
|
+
};
|
|
1145
|
+
});
|
|
1146
|
+
}(Ie)), Ie.exports;
|
|
1147
|
+
}
|
|
1148
|
+
var Vt = Gt();
|
|
1149
|
+
const Xt = /* @__PURE__ */ te(Vt);
|
|
1150
|
+
var Re = { exports: {} }, Jt = Re.exports, nt;
|
|
1151
|
+
function Qt() {
|
|
1152
|
+
return nt || (nt = 1, function(n, s) {
|
|
1153
|
+
(function(r, u) {
|
|
1154
|
+
n.exports = u();
|
|
1155
|
+
})(Jt, function() {
|
|
1156
|
+
return function(r, u, i) {
|
|
1157
|
+
i.updateLocale = function(e, l) {
|
|
1158
|
+
var o = i.Ls[e];
|
|
1159
|
+
if (o) return (l ? Object.keys(l) : []).forEach(function(p) {
|
|
1160
|
+
o[p] = l[p];
|
|
1161
|
+
}), o;
|
|
1162
|
+
};
|
|
1163
|
+
};
|
|
1164
|
+
});
|
|
1165
|
+
}(Re)), Re.exports;
|
|
1166
|
+
}
|
|
1167
|
+
var Kt = Qt();
|
|
1168
|
+
const en = /* @__PURE__ */ te(Kt);
|
|
1169
|
+
var Le = { exports: {} }, tn = Le.exports, rt;
|
|
1170
|
+
function nn() {
|
|
1171
|
+
return rt || (rt = 1, function(n, s) {
|
|
1172
|
+
(function(r, u) {
|
|
1173
|
+
n.exports = u();
|
|
1174
|
+
})(tn, function() {
|
|
1175
|
+
var r = "minute", u = /[+-]\d\d(?::?\d\d)?/g, i = /([+-]|\d\d)/g;
|
|
1176
|
+
return function(e, l, o) {
|
|
1177
|
+
var p = l.prototype;
|
|
1178
|
+
o.utc = function(f) {
|
|
1179
|
+
var $ = { date: f, utc: !0, args: arguments };
|
|
1180
|
+
return new l($);
|
|
1181
|
+
}, p.utc = function(f) {
|
|
1182
|
+
var $ = o(this.toDate(), { locale: this.$L, utc: !0 });
|
|
1183
|
+
return f ? $.add(this.utcOffset(), r) : $;
|
|
1184
|
+
}, p.local = function() {
|
|
1185
|
+
return o(this.toDate(), { locale: this.$L, utc: !1 });
|
|
1186
|
+
};
|
|
1187
|
+
var h = p.parse;
|
|
1188
|
+
p.parse = function(f) {
|
|
1189
|
+
f.utc && (this.$u = !0), this.$utils().u(f.$offset) || (this.$offset = f.$offset), h.call(this, f);
|
|
1190
|
+
};
|
|
1191
|
+
var m = p.init;
|
|
1192
|
+
p.init = function() {
|
|
1193
|
+
if (this.$u) {
|
|
1194
|
+
var f = this.$d;
|
|
1195
|
+
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();
|
|
1196
|
+
} else m.call(this);
|
|
1197
|
+
};
|
|
1198
|
+
var a = p.utcOffset;
|
|
1199
|
+
p.utcOffset = function(f, $) {
|
|
1200
|
+
var T = this.$utils().u;
|
|
1201
|
+
if (T(f)) return this.$u ? 0 : T(this.$offset) ? a.call(this) : this.$offset;
|
|
1202
|
+
if (typeof f == "string" && (f = function(E) {
|
|
1203
|
+
E === void 0 && (E = "");
|
|
1204
|
+
var j = E.match(u);
|
|
1205
|
+
if (!j) return null;
|
|
1206
|
+
var A = ("" + j[0]).match(i) || ["-", 0, 0], Y = A[0], g = 60 * +A[1] + +A[2];
|
|
1207
|
+
return g === 0 ? 0 : Y === "+" ? g : -g;
|
|
1208
|
+
}(f), f === null)) return this;
|
|
1209
|
+
var _ = Math.abs(f) <= 16 ? 60 * f : f, M = this;
|
|
1210
|
+
if ($) return M.$offset = _, M.$u = f === 0, M;
|
|
1211
|
+
if (f !== 0) {
|
|
1212
|
+
var L = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
1213
|
+
(M = this.local().add(_ + L, r)).$offset = _, M.$x.$localOffset = L;
|
|
1214
|
+
} else M = this.utc();
|
|
1215
|
+
return M;
|
|
1216
|
+
};
|
|
1217
|
+
var c = p.format;
|
|
1218
|
+
p.format = function(f) {
|
|
1219
|
+
var $ = f || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
1220
|
+
return c.call(this, $);
|
|
1221
|
+
}, p.valueOf = function() {
|
|
1222
|
+
var f = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
1223
|
+
return this.$d.valueOf() - 6e4 * f;
|
|
1224
|
+
}, p.isUTC = function() {
|
|
1225
|
+
return !!this.$u;
|
|
1226
|
+
}, p.toISOString = function() {
|
|
1227
|
+
return this.toDate().toISOString();
|
|
1228
|
+
}, p.toString = function() {
|
|
1229
|
+
return this.toDate().toUTCString();
|
|
1230
|
+
};
|
|
1231
|
+
var y = p.toDate;
|
|
1232
|
+
p.toDate = function(f) {
|
|
1233
|
+
return f === "s" && this.$offset ? o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : y.call(this);
|
|
1234
|
+
};
|
|
1235
|
+
var v = p.diff;
|
|
1236
|
+
p.diff = function(f, $, T) {
|
|
1237
|
+
if (f && this.$u === f.$u) return v.call(this, f, $, T);
|
|
1238
|
+
var _ = this.local(), M = o(f).local();
|
|
1239
|
+
return v.call(_, M, $, T);
|
|
1240
|
+
};
|
|
1241
|
+
};
|
|
1242
|
+
});
|
|
1243
|
+
}(Le)), Le.exports;
|
|
1244
|
+
}
|
|
1245
|
+
var rn = nn();
|
|
1246
|
+
const an = /* @__PURE__ */ te(rn);
|
|
1247
|
+
var je = { exports: {} }, sn = je.exports, at;
|
|
1248
|
+
function on() {
|
|
1249
|
+
return at || (at = 1, function(n, s) {
|
|
1250
|
+
(function(r, u) {
|
|
1251
|
+
n.exports = u();
|
|
1252
|
+
})(sn, function() {
|
|
1253
|
+
return function(r, u) {
|
|
1254
|
+
u.prototype.weekday = function(i) {
|
|
1255
|
+
var e = this.$locale().weekStart || 0, l = this.$W, o = (l < e ? l + 7 : l) - e;
|
|
1256
|
+
return this.$utils().u(i) ? o : this.subtract(o, "day").add(i, "day");
|
|
1257
|
+
};
|
|
1258
|
+
};
|
|
1259
|
+
});
|
|
1260
|
+
}(je)), je.exports;
|
|
1261
|
+
}
|
|
1262
|
+
var un = on();
|
|
1263
|
+
const cn = /* @__PURE__ */ te(un);
|
|
1264
|
+
C.extend(cn);
|
|
1265
|
+
C.extend(Wt);
|
|
1266
|
+
C.extend(an);
|
|
1267
|
+
C.extend(Xt);
|
|
1268
|
+
C.extend(Zt);
|
|
1269
|
+
C.extend(Nt);
|
|
1270
|
+
C.extend(kt);
|
|
1271
|
+
C.extend(Yt);
|
|
1272
|
+
C.extend(en);
|
|
1273
|
+
C.extend(It);
|
|
1274
|
+
function dn(n) {
|
|
1275
|
+
return [...n].sort((s, r) => {
|
|
1276
|
+
const u = s.sequence.split(".").map(Number), i = r.sequence.split(".").map(Number);
|
|
1277
|
+
for (let e = 0; e < Math.max(u.length, i.length); e++) {
|
|
1278
|
+
const l = u[e] || 0, o = i[e] || 0;
|
|
1279
|
+
if (l !== o) return l - o;
|
|
1280
|
+
}
|
|
1281
|
+
return 0;
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
function ln(n) {
|
|
1285
|
+
return n.split(".").length - 1;
|
|
1286
|
+
}
|
|
1287
|
+
function Fe(n, s, r) {
|
|
1288
|
+
const u = dn(n);
|
|
1289
|
+
let i = 0;
|
|
1290
|
+
return u.map((e) => {
|
|
1291
|
+
i++;
|
|
1292
|
+
const l = ln(e.sequence), { barMarginLeftAmount: o, barWidthSize: p } = gt(
|
|
1293
|
+
C(e.startDate),
|
|
1294
|
+
C(e.endDate),
|
|
1295
|
+
s,
|
|
1296
|
+
r
|
|
1297
|
+
);
|
|
1298
|
+
return {
|
|
1299
|
+
...e,
|
|
1300
|
+
barLeft: o,
|
|
1301
|
+
barWidth: p,
|
|
1302
|
+
depth: l,
|
|
1303
|
+
order: i,
|
|
1304
|
+
originalOrder: i
|
|
1305
|
+
};
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
const st = (n) => {
|
|
1309
|
+
let s;
|
|
1310
|
+
const r = /* @__PURE__ */ new Set(), u = (h, m) => {
|
|
1311
|
+
const a = typeof h == "function" ? h(s) : h;
|
|
1312
|
+
if (!Object.is(a, s)) {
|
|
1313
|
+
const c = s;
|
|
1314
|
+
s = m ?? (typeof a != "object" || a === null) ? a : Object.assign({}, s, a), r.forEach((y) => y(s, c));
|
|
1315
|
+
}
|
|
1316
|
+
}, i = () => s, o = { setState: u, getState: i, getInitialState: () => p, subscribe: (h) => (r.add(h), () => r.delete(h)) }, p = s = n(u, i, o);
|
|
1317
|
+
return o;
|
|
1318
|
+
}, fn = (n) => n ? st(n) : st, mn = (n) => n;
|
|
1319
|
+
function hn(n, s = mn) {
|
|
1320
|
+
const r = Ne.useSyncExternalStore(
|
|
1321
|
+
n.subscribe,
|
|
1322
|
+
() => s(n.getState()),
|
|
1323
|
+
() => s(n.getInitialState())
|
|
1324
|
+
);
|
|
1325
|
+
return Ne.useDebugValue(r), r;
|
|
1326
|
+
}
|
|
1327
|
+
const ot = (n) => {
|
|
1328
|
+
const s = fn(n), r = (u) => hn(s, u);
|
|
1329
|
+
return Object.assign(r, s), r;
|
|
1330
|
+
}, pn = (n) => n ? ot(n) : ot, De = pn((n, s) => ({
|
|
1331
|
+
rawTasks: [],
|
|
1332
|
+
transformedTasks: [],
|
|
1333
|
+
bottomRowCells: [],
|
|
1334
|
+
topHeaderGroups: [],
|
|
1335
|
+
selectedScale: "day",
|
|
1336
|
+
minDate: C(),
|
|
1337
|
+
maxDate: C(),
|
|
1338
|
+
draggingTaskMeta: null,
|
|
1339
|
+
setSelectedScale: (r) => {
|
|
1340
|
+
const { rawTasks: u, bottomRowCells: i } = s(), e = Fe(u, i, r);
|
|
1341
|
+
n({ selectedScale: r, transformedTasks: e });
|
|
1342
|
+
},
|
|
1343
|
+
setRawTasks: (r) => {
|
|
1344
|
+
const { bottomRowCells: u, selectedScale: i } = s(), e = Fe(r, u, i);
|
|
1345
|
+
n({ rawTasks: r, transformedTasks: e });
|
|
1346
|
+
},
|
|
1347
|
+
setBottomRowCells: (r) => {
|
|
1348
|
+
const { rawTasks: u, selectedScale: i } = s(), e = Fe(u, r, i);
|
|
1349
|
+
n({ bottomRowCells: r, transformedTasks: e });
|
|
1350
|
+
},
|
|
1351
|
+
setTopHeaderGroups: (r) => n({ topHeaderGroups: r }),
|
|
1352
|
+
setMinDate: (r) => n({ minDate: r }),
|
|
1353
|
+
setMaxDate: (r) => n({ maxDate: r }),
|
|
1354
|
+
setDraggingTaskMeta: (r) => n({ draggingTaskMeta: r }),
|
|
1355
|
+
clearDraggingTaskMeta: () => n({ draggingTaskMeta: null })
|
|
1356
|
+
})), $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" }));
|
|
1357
|
+
function pe(n, s) {
|
|
1358
|
+
const { basePxPerDragStep: r } = K[s];
|
|
1359
|
+
return Math.round(n / r);
|
|
1360
|
+
}
|
|
1361
|
+
function gn(n, s, r) {
|
|
1362
|
+
const {
|
|
1363
|
+
rawTasks: u,
|
|
1364
|
+
selectedScale: i,
|
|
1365
|
+
setRawTasks: e,
|
|
1366
|
+
setDraggingTaskMeta: l,
|
|
1367
|
+
clearDraggingTaskMeta: o
|
|
1368
|
+
} = De(), [p, h] = he(s), m = X(s), a = X(null), c = X(s), y = X(n.startDate), v = X(n.endDate), f = (_) => {
|
|
1369
|
+
a.current = _.clientX, c.current = s, y.current = n.startDate, v.current = n.endDate, h(s), m.current = s, l({ taskId: n.id, type: "bar" }), document.addEventListener("mousemove", $), document.addEventListener("mouseup", T);
|
|
1370
|
+
}, $ = (_) => {
|
|
1371
|
+
if (a.current === null) return;
|
|
1372
|
+
const M = _.clientX - a.current, E = pe(M, i) * K[i].basePxPerDragStep, j = c.current + E;
|
|
1373
|
+
h(j), m.current = j;
|
|
1374
|
+
}, T = () => {
|
|
1375
|
+
document.removeEventListener("mousemove", $), document.removeEventListener("mouseup", T);
|
|
1376
|
+
const _ = m.current - c.current, M = pe(_, i), { dragStepUnit: L, dragStepAmount: E } = K[i], j = u.map(
|
|
1377
|
+
(A) => A.id === n.id ? {
|
|
1378
|
+
...A,
|
|
1379
|
+
startDate: C(y.current).add(M * E, L).toISOString(),
|
|
1380
|
+
endDate: C(v.current).add(M * E, L).toISOString()
|
|
1381
|
+
} : A
|
|
1382
|
+
);
|
|
1383
|
+
e(j), r == null || r(j), o(), a.current = null;
|
|
1384
|
+
};
|
|
1385
|
+
return { onDragStart: f, tempLeft: p };
|
|
1386
|
+
}
|
|
1387
|
+
function vn(n, s, r, u) {
|
|
1388
|
+
const {
|
|
1389
|
+
rawTasks: i,
|
|
1390
|
+
selectedScale: e,
|
|
1391
|
+
setRawTasks: l,
|
|
1392
|
+
setDraggingTaskMeta: o,
|
|
1393
|
+
clearDraggingTaskMeta: p
|
|
1394
|
+
} = De(), [h, m] = he(s), [a, c] = he(r), y = X(s), v = X(r), f = X(null), $ = X(s), T = X(r), _ = X(n.startDate), M = (j) => {
|
|
1395
|
+
j.stopPropagation(), f.current = j.clientX, $.current = s, T.current = r, _.current = n.startDate, m(s), c(r), y.current = s, v.current = r, o({ taskId: n.id, type: "left" }), document.addEventListener("mousemove", L), document.addEventListener("mouseup", E);
|
|
1396
|
+
}, L = (j) => {
|
|
1397
|
+
if (f.current == null) return;
|
|
1398
|
+
const A = j.clientX - f.current, g = pe(A, e) * K[e].basePxPerDragStep, d = $.current + g, O = T.current - g;
|
|
1399
|
+
O < 1 || (m(d), c(O), y.current = d, v.current = O);
|
|
1400
|
+
}, E = () => {
|
|
1401
|
+
document.removeEventListener("mousemove", L), document.removeEventListener("mouseup", E);
|
|
1402
|
+
const j = y.current - $.current, A = pe(j, e), { dragStepUnit: Y, dragStepAmount: g } = K[e], d = i.map((O) => {
|
|
1403
|
+
if (O.id !== n.id) return O;
|
|
1404
|
+
const B = C(_.current).add(
|
|
1405
|
+
A * g,
|
|
1406
|
+
Y
|
|
1407
|
+
);
|
|
1408
|
+
return B.isAfter(C(O.endDate)) ? O : { ...O, startDate: B.toISOString() };
|
|
1409
|
+
});
|
|
1410
|
+
l(d), u == null || u(d), p(), f.current = null;
|
|
1411
|
+
};
|
|
1412
|
+
return { onDragStart: M, tempLeft: h, tempWidth: a };
|
|
1413
|
+
}
|
|
1414
|
+
function Dn(n, s, r) {
|
|
1415
|
+
const {
|
|
1416
|
+
rawTasks: u,
|
|
1417
|
+
selectedScale: i,
|
|
1418
|
+
setRawTasks: e,
|
|
1419
|
+
setDraggingTaskMeta: l,
|
|
1420
|
+
clearDraggingTaskMeta: o
|
|
1421
|
+
} = De(), [p, h] = he(s), m = X(s), a = X(null), c = X(s), y = X(n.endDate), v = (T) => {
|
|
1422
|
+
T.stopPropagation(), a.current = T.clientX, c.current = s, y.current = n.endDate, h(s), m.current = s, l({ taskId: n.id, type: "right" }), document.addEventListener("mousemove", f), document.addEventListener("mouseup", $);
|
|
1423
|
+
}, f = (T) => {
|
|
1424
|
+
if (a.current === null) return;
|
|
1425
|
+
const _ = T.clientX - a.current, L = pe(_, i) * K[i].basePxPerDragStep, E = c.current + L;
|
|
1426
|
+
E < 1 || (h(E), m.current = E);
|
|
1427
|
+
}, $ = () => {
|
|
1428
|
+
document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", $);
|
|
1429
|
+
const T = m.current - c.current, _ = pe(T, i), { dragStepUnit: M, dragStepAmount: L } = K[i], E = u.map((j) => {
|
|
1430
|
+
if (j.id !== n.id) return j;
|
|
1431
|
+
const A = C(y.current).add(
|
|
1432
|
+
_ * L,
|
|
1433
|
+
M
|
|
1434
|
+
);
|
|
1435
|
+
return A.isBefore(C(j.startDate)) ? j : { ...j, endDate: A.toISOString() };
|
|
1436
|
+
});
|
|
1437
|
+
e(E), r == null || r(E), o(), a.current = null;
|
|
1438
|
+
};
|
|
1439
|
+
return { onDragStart: v, tempWidth: p };
|
|
1440
|
+
}
|
|
1441
|
+
function yn(n, s, r, u, i) {
|
|
1442
|
+
if (r < 0 || i < 0)
|
|
1443
|
+
return `M ${s} ${r} h ${(u - s) / 2}`;
|
|
1444
|
+
const e = 7, l = 11, o = 25, p = 20, h = `M ${s} ${r}`, m = u - s, a = i - r, c = Math.abs(m), y = Math.abs(a), v = i <= r, f = i >= r, $ = u >= s, T = u <= s, _ = c > p, M = Math.abs(m / 2), L = Math.abs(a / 2);
|
|
1445
|
+
function E() {
|
|
1446
|
+
function g() {
|
|
1447
|
+
return ($ || T) && f && !_ ? "downSmallHorizontal" : ($ || T) && v && !_ ? "upSmallHorizontal" : f && T ? "downLeft" : f && $ ? "downRight" : v && T ? "upLeft" : v && $ ? "upRight" : "";
|
|
1448
|
+
}
|
|
1449
|
+
let d = h;
|
|
1450
|
+
switch (g()) {
|
|
1451
|
+
case "downRight": {
|
|
1452
|
+
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}`;
|
|
1453
|
+
break;
|
|
1454
|
+
}
|
|
1455
|
+
case "upRight": {
|
|
1456
|
+
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}`;
|
|
1457
|
+
break;
|
|
1458
|
+
}
|
|
1459
|
+
case "downLeft":
|
|
1460
|
+
case "downSmallHorizontal": {
|
|
1461
|
+
const B = r + a / 2;
|
|
1462
|
+
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 ${m - 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}`;
|
|
1463
|
+
break;
|
|
1464
|
+
}
|
|
1465
|
+
case "upLeft":
|
|
1466
|
+
case "upSmallHorizontal": {
|
|
1467
|
+
const B = r + a / 2;
|
|
1468
|
+
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 ${m - 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}`;
|
|
1469
|
+
break;
|
|
1470
|
+
}
|
|
1471
|
+
default:
|
|
1472
|
+
return d;
|
|
1473
|
+
}
|
|
1474
|
+
return d;
|
|
1475
|
+
}
|
|
1476
|
+
function j() {
|
|
1477
|
+
let g = h;
|
|
1478
|
+
return f && T ? (g += ` h ${o - l}`, g += ` a ${e} ${e} 0 0 1 ${e} ${e}`, g += ` v ${a - e * 2}`, g += ` a ${e} ${e} 0 0 1 -${e} ${e}`, g += ` h ${m - e * 2}`) : f && $ ? (g += ` h ${m + o - l}`, g += ` a ${e} ${e} 0 0 1 ${e} ${e}`, g += ` v ${a - e * 2}`, g += ` a ${e} ${e} 0 0 1 -${e} ${e}`, g += ` h -${o - l}`) : v && T ? (g += ` h ${o - l}`, g += ` a ${e} ${e} 0 0 0 ${e} -${e}`, g += ` v ${a + e * 2}`, g += ` a ${e} ${e} 0 0 0 -${e} -${e}`, g += ` h ${m - o + l}`) : v && $ && (g += ` h ${m + o - l}`, g += ` a ${e} ${e} 0 0 0 ${e} -${e}`, g += ` v ${a + e * 2}`, g += ` a ${e} ${e} 0 0 0 -${e} -${e}`, g += ` h -${o - l}`), g;
|
|
1479
|
+
}
|
|
1480
|
+
function A() {
|
|
1481
|
+
function g() {
|
|
1482
|
+
return ($ || T) && f && !_ ? "downSmallHorizontal" : ($ || T) && v && !_ ? "upSmallHorizontal" : f && T ? "downLeft" : f && $ ? "downRight" : v && T ? "upLeft" : v && $ ? "upRight" : "";
|
|
1483
|
+
}
|
|
1484
|
+
let d = h;
|
|
1485
|
+
switch (g()) {
|
|
1486
|
+
case "downRight":
|
|
1487
|
+
case "downSmallHorizontal": {
|
|
1488
|
+
d += " h -11", d += ` a ${e} ${e} 0 0 0 -${e} ${e}`, d += ` v ${L - e * 2}`, d += ` a ${e} ${e} 0 0 0 ${e} ${e}`, d += ` h ${l * 2 + m}`, d += ` a ${e} ${e} 0 0 1 ${e} ${e}`, d += ` v ${L - e * 2}`, d += ` a ${e} ${e} 0 0 1 -${e} ${e}`, d += " h -11";
|
|
1489
|
+
break;
|
|
1490
|
+
}
|
|
1491
|
+
case "upRight":
|
|
1492
|
+
case "upSmallHorizontal": {
|
|
1493
|
+
d += " h -11", d += ` a ${e} ${e} 0 0 1 -${e} -${e}`, d += ` v ${-(L - e * 2)}`, d += ` a ${e} ${e} 0 0 1 ${e} -${e}`, d += ` h ${l * 2 + m}`, d += ` a ${e} ${e} 0 0 0 ${e} -${e}`, d += ` v ${-(L - e * 2)}`, d += ` a ${e} ${e} 0 0 0 -${e} -${e}`, d += " h -11";
|
|
1494
|
+
break;
|
|
1495
|
+
}
|
|
1496
|
+
case "downLeft": {
|
|
1497
|
+
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}`;
|
|
1498
|
+
break;
|
|
1499
|
+
}
|
|
1500
|
+
case "upLeft": {
|
|
1501
|
+
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}`;
|
|
1502
|
+
break;
|
|
1503
|
+
}
|
|
1504
|
+
default:
|
|
1505
|
+
return d;
|
|
1506
|
+
}
|
|
1507
|
+
return d;
|
|
1508
|
+
}
|
|
1509
|
+
function Y() {
|
|
1510
|
+
let g = h;
|
|
1511
|
+
return f && T ? (g += ` h ${m - o}`, g += ` a ${e} ${e} 0 0 0 -${e} ${e}`, g += ` v ${a - e * 2}`, g += ` a ${e} ${e} 0 0 0 ${e} ${e}`, g += ` h ${o}`) : f && $ ? (g += " h -25", g += ` a ${e} ${e} 0 0 0 -${e} ${e}`, g += ` v ${a - e * 2}`, g += ` a ${e} ${e} 0 0 0 ${e} ${e}`, g += ` h ${m + o}`) : v && T ? (g += ` h ${m - o}`, g += ` a ${e} ${e} 0 0 1 -${e} -${e}`, g += ` v ${a + e * 2}`, g += ` a ${e} ${e} 0 0 1 ${e} -${e}`, g += ` h ${o}`) : v && $ && (g += " h -25", g += ` a ${e} ${e} 0 0 1 -${e} -${e}`, g += ` v ${a + e * 2}`, g += ` a ${e} ${e} 0 0 1 ${e} -${e}`, g += ` h ${m + o}`), g;
|
|
1512
|
+
}
|
|
1513
|
+
switch (n) {
|
|
1514
|
+
case "FS":
|
|
1515
|
+
return E();
|
|
1516
|
+
case "FF":
|
|
1517
|
+
return j();
|
|
1518
|
+
case "SF":
|
|
1519
|
+
return A();
|
|
1520
|
+
case "SS":
|
|
1521
|
+
return Y();
|
|
1522
|
+
default:
|
|
1523
|
+
return `${h} L ${u} ${i}`;
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
function Sn({ allTasks: n, currentTask: s, onTasksChange: r }) {
|
|
1527
|
+
const { onDragStart: u, tempLeft: i } = gn(s, s.barLeft, r), {
|
|
1528
|
+
onDragStart: e,
|
|
1529
|
+
tempLeft: l,
|
|
1530
|
+
tempWidth: o
|
|
1531
|
+
} = vn(
|
|
1532
|
+
s,
|
|
1533
|
+
s.barLeft,
|
|
1534
|
+
s.barWidth,
|
|
1535
|
+
r
|
|
1536
|
+
), { onDragStart: p, tempWidth: h } = Dn(
|
|
1537
|
+
s,
|
|
1538
|
+
s.barWidth,
|
|
1539
|
+
r
|
|
1540
|
+
), { draggingTaskMeta: m } = De(), a = (m == null ? void 0 : m.taskId) === s.id;
|
|
1541
|
+
let c = !1, y = !1, v = !1;
|
|
1542
|
+
a && ((m == null ? void 0 : m.type) === "left" ? c = !0 : (m == null ? void 0 : m.type) === "right" ? y = !0 : (m == null ? void 0 : m.type) === "bar" && (v = !0));
|
|
1543
|
+
let f = s.barLeft, $ = s.barWidth;
|
|
1544
|
+
c ? (f = l, $ = o) : y ? $ = h : v && (f = i);
|
|
1545
|
+
const T = () => /* @__PURE__ */ N.jsx(
|
|
1546
|
+
"button",
|
|
1547
|
+
{
|
|
1548
|
+
type: "button",
|
|
1549
|
+
onMouseDown: e,
|
|
1550
|
+
className: "absolute top-0 flex h-full cursor-w-resize items-center justify-center opacity-0 hover:opacity-100",
|
|
1551
|
+
style: {
|
|
1552
|
+
left: "-1.15rem",
|
|
1553
|
+
width: "2rem",
|
|
1554
|
+
height: "100%"
|
|
1555
|
+
},
|
|
1556
|
+
children: /* @__PURE__ */ N.jsx(it, { className: "fill-base-500 size-6" })
|
|
1557
|
+
}
|
|
1558
|
+
), _ = () => /* @__PURE__ */ N.jsx(
|
|
1559
|
+
"button",
|
|
1560
|
+
{
|
|
1561
|
+
type: "button",
|
|
1562
|
+
onMouseDown: p,
|
|
1563
|
+
className: "absolute top-0 flex h-full cursor-w-resize items-center justify-center opacity-0 hover:opacity-100",
|
|
1564
|
+
style: {
|
|
1565
|
+
right: "-1.15rem",
|
|
1566
|
+
width: "2rem",
|
|
1567
|
+
height: "100%"
|
|
1568
|
+
},
|
|
1569
|
+
children: /* @__PURE__ */ N.jsx(it, { className: "fill-base-500 size-6" })
|
|
1570
|
+
}
|
|
1571
|
+
), M = (s.dependencies || []).map((L) => {
|
|
1572
|
+
const E = n.find((O) => O.id === L.targetId);
|
|
1573
|
+
if (!E) return null;
|
|
1574
|
+
const j = ut, A = (E.order - 1) * j + j / 2, Y = (s.order - 1) * j + j / 2;
|
|
1575
|
+
let g, d;
|
|
1576
|
+
switch (L.type) {
|
|
1577
|
+
case "FS":
|
|
1578
|
+
g = E.barLeft + E.barWidth, d = s.barLeft;
|
|
1579
|
+
break;
|
|
1580
|
+
case "SS":
|
|
1581
|
+
g = E.barLeft, d = s.barLeft;
|
|
1582
|
+
break;
|
|
1583
|
+
case "FF":
|
|
1584
|
+
g = E.barLeft + E.barWidth, d = s.barLeft + s.barWidth;
|
|
1585
|
+
break;
|
|
1586
|
+
case "SF":
|
|
1587
|
+
g = E.barLeft, d = s.barLeft + s.barWidth;
|
|
1588
|
+
break;
|
|
1589
|
+
default:
|
|
1590
|
+
return console.warn(`Unknown dependency type: ${L.type}`), null;
|
|
1591
|
+
}
|
|
1592
|
+
return {
|
|
1593
|
+
...L,
|
|
1594
|
+
fromX: g,
|
|
1595
|
+
fromY: A,
|
|
1596
|
+
toX: d,
|
|
1597
|
+
toY: Y
|
|
1598
|
+
};
|
|
1599
|
+
}).filter(Boolean);
|
|
1600
|
+
return /* @__PURE__ */ N.jsxs(N.Fragment, { children: [
|
|
1601
|
+
/* @__PURE__ */ N.jsxs(
|
|
1602
|
+
"div",
|
|
1603
|
+
{
|
|
1604
|
+
role: "button",
|
|
1605
|
+
tabIndex: 0,
|
|
1606
|
+
className: "bg-base-400 relative flex items-center",
|
|
1607
|
+
onMouseDown: u,
|
|
1608
|
+
style: {
|
|
1609
|
+
marginLeft: `${f}px`,
|
|
1610
|
+
width: `${$}px`,
|
|
1611
|
+
height: "1rem"
|
|
1612
|
+
},
|
|
1613
|
+
children: [
|
|
1614
|
+
T(),
|
|
1615
|
+
_()
|
|
1616
|
+
]
|
|
1617
|
+
}
|
|
1618
|
+
),
|
|
1619
|
+
/* @__PURE__ */ N.jsxs("svg", { className: "pointer-events-none absolute top-0 left-0 z-10 size-full", children: [
|
|
1620
|
+
/* @__PURE__ */ N.jsx("defs", { children: /* @__PURE__ */ N.jsx(
|
|
1621
|
+
"marker",
|
|
1622
|
+
{
|
|
1623
|
+
id: "arrowhead",
|
|
1624
|
+
markerWidth: "6",
|
|
1625
|
+
markerHeight: "6",
|
|
1626
|
+
refX: "5.25",
|
|
1627
|
+
refY: "3",
|
|
1628
|
+
orient: "auto",
|
|
1629
|
+
children: /* @__PURE__ */ N.jsx("polygon", { points: "0 0, 6 3, 0 6", fill: "#000" })
|
|
1630
|
+
}
|
|
1631
|
+
) }),
|
|
1632
|
+
M.map((L, E) => /* @__PURE__ */ N.jsx(
|
|
1633
|
+
"path",
|
|
1634
|
+
{
|
|
1635
|
+
d: yn(
|
|
1636
|
+
L.type,
|
|
1637
|
+
L.fromX,
|
|
1638
|
+
L.fromY,
|
|
1639
|
+
L.toX,
|
|
1640
|
+
L.toY
|
|
1641
|
+
),
|
|
1642
|
+
fill: "none",
|
|
1643
|
+
markerEnd: "url(#arrowhead)",
|
|
1644
|
+
style: { stroke: "#000", strokeWidth: 0.75 }
|
|
1645
|
+
},
|
|
1646
|
+
E
|
|
1647
|
+
))
|
|
1648
|
+
] })
|
|
1649
|
+
] });
|
|
1650
|
+
}
|
|
1651
|
+
function bn({ tasks: n, onTasksChange: s }) {
|
|
1652
|
+
const [r, u] = he(n || []), i = X(null), {
|
|
1653
|
+
rawTasks: e,
|
|
1654
|
+
transformedTasks: l,
|
|
1655
|
+
selectedScale: o,
|
|
1656
|
+
setSelectedScale: p,
|
|
1657
|
+
bottomRowCells: h,
|
|
1658
|
+
topHeaderGroups: m,
|
|
1659
|
+
setRawTasks: a,
|
|
1660
|
+
setBottomRowCells: c,
|
|
1661
|
+
setTopHeaderGroups: y,
|
|
1662
|
+
setMinDate: v,
|
|
1663
|
+
setMaxDate: f
|
|
1664
|
+
} = De();
|
|
1665
|
+
return xe(() => {
|
|
1666
|
+
n.length === 0 ? u($n) : u(n);
|
|
1667
|
+
}, [n]), xe(() => {
|
|
1668
|
+
if (!r.length) return;
|
|
1669
|
+
const $ = Object.fromEntries(
|
|
1670
|
+
r.map((T) => [
|
|
1671
|
+
T.id,
|
|
1672
|
+
{ startDate: T.startDate, endDate: T.endDate }
|
|
1673
|
+
])
|
|
1674
|
+
);
|
|
1675
|
+
St(
|
|
1676
|
+
$,
|
|
1677
|
+
o,
|
|
1678
|
+
v,
|
|
1679
|
+
f,
|
|
1680
|
+
c,
|
|
1681
|
+
y
|
|
1682
|
+
);
|
|
1683
|
+
}, [r, o]), xe(() => {
|
|
1684
|
+
!h.length || !r.length || e.length === 0 && a(r);
|
|
1685
|
+
}, [h, r]), /* @__PURE__ */ N.jsx("div", { className: "bg-base-50 h-full w-full overflow-hidden", children: /* @__PURE__ */ N.jsxs("section", { className: "relative flex h-full w-full flex-col", children: [
|
|
1686
|
+
/* @__PURE__ */ N.jsx("div", { className: "fixed top-0.75 right-4 z-40", children: /* @__PURE__ */ N.jsx(
|
|
1687
|
+
"select",
|
|
1688
|
+
{
|
|
1689
|
+
className: "bg-base-50 rounded-md px-2 py-0.5 text-sm font-medium",
|
|
1690
|
+
value: o,
|
|
1691
|
+
onChange: ($) => {
|
|
1692
|
+
const T = $.target.value;
|
|
1693
|
+
p(T);
|
|
1694
|
+
},
|
|
1695
|
+
children: Object.keys(K).map(($) => /* @__PURE__ */ N.jsx("option", { value: $, children: K[$].labelUnit }, $))
|
|
1696
|
+
}
|
|
1697
|
+
) }),
|
|
1698
|
+
/* @__PURE__ */ N.jsx("div", { ref: i, className: "grow overflow-x-auto", children: /* @__PURE__ */ N.jsxs("div", { className: "flex min-w-max flex-col", children: [
|
|
1699
|
+
/* @__PURE__ */ N.jsx(
|
|
1700
|
+
xt,
|
|
1701
|
+
{
|
|
1702
|
+
topHeaderGroups: m,
|
|
1703
|
+
bottomRowCells: h,
|
|
1704
|
+
selectedScale: o,
|
|
1705
|
+
scrollRef: i
|
|
1706
|
+
}
|
|
1707
|
+
),
|
|
1708
|
+
/* @__PURE__ */ N.jsx("div", { className: "relative flex", children: /* @__PURE__ */ N.jsx("div", { className: "flex grow flex-col", children: l.map(($) => /* @__PURE__ */ N.jsx(
|
|
1709
|
+
"div",
|
|
1710
|
+
{
|
|
1711
|
+
className: "border-base-300 bg-base-100 flex w-full items-center border-b border-solid",
|
|
1712
|
+
style: { height: `${ut}px` },
|
|
1713
|
+
children: /* @__PURE__ */ N.jsx(
|
|
1714
|
+
Sn,
|
|
1715
|
+
{
|
|
1716
|
+
allTasks: l,
|
|
1717
|
+
currentTask: $,
|
|
1718
|
+
onTasksChange: s
|
|
1719
|
+
}
|
|
1720
|
+
)
|
|
1721
|
+
},
|
|
1722
|
+
$.id
|
|
1723
|
+
)) }) })
|
|
1724
|
+
] }) })
|
|
1725
|
+
] }) });
|
|
1726
|
+
}
|
|
1727
|
+
export {
|
|
1728
|
+
bn as ReactGanttChart
|
|
1729
|
+
};
|