@kteneyck/cesium-timeline-react 0.2.0 → 0.4.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.
@@ -1,9 +1,9 @@
1
- import Be, { useRef as T, useState as ve, useEffect as $, forwardRef as He, useCallback as oe, useImperativeHandle as Ue, useLayoutEffect as qe, useMemo as Se } from "react";
2
- import * as C from "cesium";
3
- import { splitForDisplay as Ge, formatDateTime as ke, drawTimeline as Ve, hitTestSwimLane as Ke, hitTestLaneLabel as Ze, isInSwimLaneRegion as Qe, zoomRange as et, TICK_AREA_HEIGHT as ze, DEFAULT_LANE_HEIGHT as Le, LANE_GAP as Ie, SWIM_LANE_SCROLL_SPEED as tt, MIN_SPAN_MS as nt, MAX_SPAN_MS as rt, toJulianDate as ge, defaultTheme as ot, generateTicks as st, timeToPosition as ct, snapToTick as it } from "@kteneyck/cesium-timeline-core";
1
+ import Ue, { useRef as w, useState as ve, useEffect as X, forwardRef as qe, useCallback as se, useImperativeHandle as Ge, useLayoutEffect as Ve, useMemo as Le } from "react";
2
+ import * as j from "cesium";
3
+ import { splitForDisplay as Ke, getTimezoneAbbr as Ze, formatDateTime as Ie, drawTimeline as Qe, hitTestSwimLane as et, hitTestLaneLabel as tt, isInSwimLaneRegion as nt, zoomRange as rt, TICK_AREA_HEIGHT as $e, DEFAULT_LANE_HEIGHT as Fe, LANE_GAP as Oe, SWIM_LANE_SCROLL_SPEED as ot, MIN_SPAN_MS as st, MAX_SPAN_MS as ct, toJulianDate as ge, defaultTheme as it, generateTicks as ut, timeToPosition as at, snapToTick as lt } from "@kteneyck/cesium-timeline-core";
4
4
  export * from "@kteneyck/cesium-timeline-core";
5
- import { TICK_AREA_HEIGHT as Tt } from "@kteneyck/cesium-timeline-core";
6
- var Me = { exports: {} }, we = {};
5
+ import { TICK_AREA_HEIGHT as Mt } from "@kteneyck/cesium-timeline-core";
6
+ var Re = { exports: {} }, ye = {};
7
7
  /**
8
8
  * @license React
9
9
  * react-jsx-runtime.production.js
@@ -13,29 +13,29 @@ var Me = { exports: {} }, we = {};
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
- var Fe;
17
- function at() {
18
- if (Fe) return we;
19
- Fe = 1;
20
- var D = Symbol.for("react.transitional.element"), k = Symbol.for("react.fragment");
21
- function X(u, b, I) {
22
- var q = null;
23
- if (I !== void 0 && (q = "" + I), b.key !== void 0 && (q = "" + b.key), "key" in b) {
24
- I = {};
25
- for (var P in b)
26
- P !== "key" && (I[P] = b[P]);
27
- } else I = b;
28
- return b = I.ref, {
29
- $$typeof: D,
30
- type: u,
31
- key: q,
32
- ref: b !== void 0 ? b : null,
33
- props: I
16
+ var Pe;
17
+ function dt() {
18
+ if (Pe) return ye;
19
+ Pe = 1;
20
+ var C = Symbol.for("react.transitional.element"), k = Symbol.for("react.fragment");
21
+ function Y(a, T, R) {
22
+ var I = null;
23
+ if (R !== void 0 && (I = "" + R), T.key !== void 0 && (I = "" + T.key), "key" in T) {
24
+ R = {};
25
+ for (var O in T)
26
+ O !== "key" && (R[O] = T[O]);
27
+ } else R = T;
28
+ return T = R.ref, {
29
+ $$typeof: C,
30
+ type: a,
31
+ key: I,
32
+ ref: T !== void 0 ? T : null,
33
+ props: R
34
34
  };
35
35
  }
36
- return we.Fragment = k, we.jsx = X, we.jsxs = X, we;
36
+ return ye.Fragment = k, ye.jsx = Y, ye.jsxs = Y, ye;
37
37
  }
38
- var Te = {};
38
+ var Ee = {};
39
39
  /**
40
40
  * @license React
41
41
  * react-jsx-runtime.development.js
@@ -45,47 +45,47 @@ var Te = {};
45
45
  * This source code is licensed under the MIT license found in the
46
46
  * LICENSE file in the root directory of this source tree.
47
47
  */
48
- var Oe;
49
- function ut() {
50
- return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && (function() {
51
- function D(t) {
48
+ var Ne;
49
+ function ft() {
50
+ return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && (function() {
51
+ function C(t) {
52
52
  if (t == null) return null;
53
53
  if (typeof t == "function")
54
- return t.$$typeof === Y ? null : t.displayName || t.name || null;
54
+ return t.$$typeof === ce ? null : t.displayName || t.name || null;
55
55
  if (typeof t == "string") return t;
56
56
  switch (t) {
57
- case j:
57
+ case B:
58
58
  return "Fragment";
59
- case V:
59
+ case d:
60
60
  return "Profiler";
61
- case _:
61
+ case ee:
62
62
  return "StrictMode";
63
- case y:
63
+ case l:
64
64
  return "Suspense";
65
- case E:
65
+ case y:
66
66
  return "SuspenseList";
67
- case U:
67
+ case te:
68
68
  return "Activity";
69
69
  }
70
70
  if (typeof t == "object")
71
71
  switch (typeof t.tag == "number" && console.error(
72
72
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
73
73
  ), t.$$typeof) {
74
- case x:
74
+ case Q:
75
75
  return "Portal";
76
- case m:
76
+ case H:
77
77
  return t.displayName || "Context";
78
78
  case v:
79
79
  return (t._context.displayName || "Context") + ".Consumer";
80
- case g:
81
- var l = t.render;
82
- return t = t.displayName, t || (t = l.displayName || l.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
83
- case ae:
84
- return l = t.displayName || null, l !== null ? l : D(t.type) || "Memo";
85
- case N:
86
- l = t._payload, t = t._init;
80
+ case z:
81
+ var m = t.render;
82
+ return t = t.displayName, t || (t = m.displayName || m.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
83
+ case _:
84
+ return m = t.displayName || null, m !== null ? m : C(t.type) || "Memo";
85
+ case A:
86
+ m = t._payload, t = t._init;
87
87
  try {
88
- return D(t(l));
88
+ return C(t(m));
89
89
  } catch {
90
90
  }
91
91
  }
@@ -94,77 +94,77 @@ function ut() {
94
94
  function k(t) {
95
95
  return "" + t;
96
96
  }
97
- function X(t) {
97
+ function Y(t) {
98
98
  try {
99
99
  k(t);
100
- var l = !1;
100
+ var m = !1;
101
101
  } catch {
102
- l = !0;
102
+ m = !0;
103
103
  }
104
- if (l) {
105
- l = console;
106
- var w = l.error, A = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
107
- return w.call(
108
- l,
104
+ if (m) {
105
+ m = console;
106
+ var g = m.error, M = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
107
+ return g.call(
108
+ m,
109
109
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
110
- A
110
+ M
111
111
  ), k(t);
112
112
  }
113
113
  }
114
- function u(t) {
115
- if (t === j) return "<>";
116
- if (typeof t == "object" && t !== null && t.$$typeof === N)
114
+ function a(t) {
115
+ if (t === B) return "<>";
116
+ if (typeof t == "object" && t !== null && t.$$typeof === A)
117
117
  return "<...>";
118
118
  try {
119
- var l = D(t);
120
- return l ? "<" + l + ">" : "<...>";
119
+ var m = C(t);
120
+ return m ? "<" + m + ">" : "<...>";
121
121
  } catch {
122
122
  return "<...>";
123
123
  }
124
124
  }
125
- function b() {
126
- var t = L.A;
125
+ function T() {
126
+ var t = P.A;
127
127
  return t === null ? null : t.getOwner();
128
128
  }
129
- function I() {
129
+ function R() {
130
130
  return Error("react-stack-top-frame");
131
131
  }
132
- function q(t) {
133
- if (c.call(t, "key")) {
134
- var l = Object.getOwnPropertyDescriptor(t, "key").get;
135
- if (l && l.isReactWarning) return !1;
132
+ function I(t) {
133
+ if (q.call(t, "key")) {
134
+ var m = Object.getOwnPropertyDescriptor(t, "key").get;
135
+ if (m && m.isReactWarning) return !1;
136
136
  }
137
137
  return t.key !== void 0;
138
138
  }
139
- function P(t, l) {
140
- function w() {
141
- re || (re = !0, console.error(
139
+ function O(t, m) {
140
+ function g() {
141
+ i || (i = !0, console.error(
142
142
  "%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)",
143
- l
143
+ m
144
144
  ));
145
145
  }
146
- w.isReactWarning = !0, Object.defineProperty(t, "key", {
147
- get: w,
146
+ g.isReactWarning = !0, Object.defineProperty(t, "key", {
147
+ get: g,
148
148
  configurable: !0
149
149
  });
150
150
  }
151
- function B() {
152
- var t = D(this.type);
153
- return W[t] || (W[t] = !0, console.error(
151
+ function W() {
152
+ var t = C(this.type);
153
+ return L[t] || (L[t] = !0, console.error(
154
154
  "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."
155
155
  )), t = this.props.ref, t !== void 0 ? t : null;
156
156
  }
157
- function R(t, l, w, A, te, de) {
158
- var S = w.ref;
157
+ function D(t, m, g, M, ue, ae) {
158
+ var E = g.ref;
159
159
  return t = {
160
- $$typeof: G,
160
+ $$typeof: Z,
161
161
  type: t,
162
- key: l,
163
- props: w,
164
- _owner: A
165
- }, (S !== void 0 ? S : null) !== null ? Object.defineProperty(t, "ref", {
162
+ key: m,
163
+ props: g,
164
+ _owner: M
165
+ }, (E !== void 0 ? E : null) !== null ? Object.defineProperty(t, "ref", {
166
166
  enumerable: !1,
167
- get: B
167
+ get: W
168
168
  }) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
169
169
  configurable: !1,
170
170
  enumerable: !1,
@@ -179,141 +179,144 @@ function ut() {
179
179
  configurable: !1,
180
180
  enumerable: !1,
181
181
  writable: !0,
182
- value: te
182
+ value: ue
183
183
  }), Object.defineProperty(t, "_debugTask", {
184
184
  configurable: !1,
185
185
  enumerable: !1,
186
186
  writable: !0,
187
- value: de
187
+ value: ae
188
188
  }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
189
189
  }
190
- function H(t, l, w, A, te, de) {
191
- var S = l.children;
192
- if (S !== void 0)
193
- if (A)
194
- if (J(S)) {
195
- for (A = 0; A < S.length; A++)
196
- ne(S[A]);
197
- Object.freeze && Object.freeze(S);
190
+ function U(t, m, g, M, ue, ae) {
191
+ var E = m.children;
192
+ if (E !== void 0)
193
+ if (M)
194
+ if (N(E)) {
195
+ for (M = 0; M < E.length; M++)
196
+ $(E[M]);
197
+ Object.freeze && Object.freeze(E);
198
198
  } else
199
199
  console.error(
200
200
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
201
201
  );
202
- else ne(S);
203
- if (c.call(l, "key")) {
204
- S = D(t);
205
- var ue = Object.keys(l).filter(function(i) {
206
- return i !== "key";
202
+ else $(E);
203
+ if (q.call(m, "key")) {
204
+ E = C(t);
205
+ var ie = Object.keys(m).filter(function(be) {
206
+ return be !== "key";
207
207
  });
208
- A = 0 < ue.length ? "{key: someKey, " + ue.join(": ..., ") + ": ...}" : "{key: someKey}", le[S + A] || (ue = 0 < ue.length ? "{" + ue.join(": ..., ") + ": ...}" : "{}", console.error(
208
+ M = 0 < ie.length ? "{key: someKey, " + ie.join(": ..., ") + ": ...}" : "{key: someKey}", re[E + M] || (ie = 0 < ie.length ? "{" + ie.join(": ..., ") + ": ...}" : "{}", console.error(
209
209
  `A props object containing a "key" prop is being spread into JSX:
210
210
  let props = %s;
211
211
  <%s {...props} />
212
212
  React keys must be passed directly to JSX without using spread:
213
213
  let props = %s;
214
214
  <%s key={someKey} {...props} />`,
215
- A,
216
- S,
217
- ue,
218
- S
219
- ), le[S + A] = !0);
215
+ M,
216
+ E,
217
+ ie,
218
+ E
219
+ ), re[E + M] = !0);
220
220
  }
221
- if (S = null, w !== void 0 && (X(w), S = "" + w), q(l) && (X(l.key), S = "" + l.key), "key" in l) {
222
- w = {};
223
- for (var K in l)
224
- K !== "key" && (w[K] = l[K]);
225
- } else w = l;
226
- return S && P(
227
- w,
221
+ if (E = null, g !== void 0 && (Y(g), E = "" + g), I(m) && (Y(m.key), E = "" + m.key), "key" in m) {
222
+ g = {};
223
+ for (var le in m)
224
+ le !== "key" && (g[le] = m[le]);
225
+ } else g = m;
226
+ return E && O(
227
+ g,
228
228
  typeof t == "function" ? t.displayName || t.name || "Unknown" : t
229
- ), R(
229
+ ), D(
230
230
  t,
231
- S,
232
- w,
233
- b(),
234
- te,
235
- de
231
+ E,
232
+ g,
233
+ T(),
234
+ ue,
235
+ ae
236
236
  );
237
237
  }
238
- function ne(t) {
239
- Q(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === N && (t._payload.status === "fulfilled" ? Q(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
238
+ function $(t) {
239
+ oe(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === A && (t._payload.status === "fulfilled" ? oe(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
240
240
  }
241
- function Q(t) {
242
- return typeof t == "object" && t !== null && t.$$typeof === G;
241
+ function oe(t) {
242
+ return typeof t == "object" && t !== null && t.$$typeof === Z;
243
243
  }
244
- var ee = Be, G = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), V = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), m = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), ae = Symbol.for("react.memo"), N = Symbol.for("react.lazy"), U = Symbol.for("react.activity"), Y = Symbol.for("react.client.reference"), L = ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, c = Object.prototype.hasOwnProperty, J = Array.isArray, z = console.createTask ? console.createTask : function() {
244
+ var V = Ue, Z = Symbol.for("react.transitional.element"), Q = Symbol.for("react.portal"), B = Symbol.for("react.fragment"), ee = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), H = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), te = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), P = V.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, q = Object.prototype.hasOwnProperty, N = Array.isArray, b = console.createTask ? console.createTask : function() {
245
245
  return null;
246
246
  };
247
- ee = {
247
+ V = {
248
248
  react_stack_bottom_frame: function(t) {
249
249
  return t();
250
250
  }
251
251
  };
252
- var re, W = {}, F = ee.react_stack_bottom_frame.bind(
253
- ee,
254
- I
255
- )(), ce = z(u(I)), le = {};
256
- Te.Fragment = j, Te.jsx = function(t, l, w) {
257
- var A = 1e4 > L.recentlyCreatedOwnerStacks++;
258
- return H(
252
+ var i, L = {}, S = V.react_stack_bottom_frame.bind(
253
+ V,
254
+ R
255
+ )(), ne = b(a(R)), re = {};
256
+ Ee.Fragment = B, Ee.jsx = function(t, m, g) {
257
+ var M = 1e4 > P.recentlyCreatedOwnerStacks++;
258
+ return U(
259
259
  t,
260
- l,
261
- w,
260
+ m,
261
+ g,
262
262
  !1,
263
- A ? Error("react-stack-top-frame") : F,
264
- A ? z(u(t)) : ce
263
+ M ? Error("react-stack-top-frame") : S,
264
+ M ? b(a(t)) : ne
265
265
  );
266
- }, Te.jsxs = function(t, l, w) {
267
- var A = 1e4 > L.recentlyCreatedOwnerStacks++;
268
- return H(
266
+ }, Ee.jsxs = function(t, m, g) {
267
+ var M = 1e4 > P.recentlyCreatedOwnerStacks++;
268
+ return U(
269
269
  t,
270
- l,
271
- w,
270
+ m,
271
+ g,
272
272
  !0,
273
- A ? Error("react-stack-top-frame") : F,
274
- A ? z(u(t)) : ce
273
+ M ? Error("react-stack-top-frame") : S,
274
+ M ? b(a(t)) : ne
275
275
  );
276
276
  };
277
- })()), Te;
277
+ })()), Ee;
278
278
  }
279
- var Pe;
280
- function lt() {
281
- return Pe || (Pe = 1, process.env.NODE_ENV === "production" ? Me.exports = at() : Me.exports = ut()), Me.exports;
279
+ var Je;
280
+ function mt() {
281
+ return Je || (Je = 1, process.env.NODE_ENV === "production" ? Re.exports = dt() : Re.exports = ft()), Re.exports;
282
282
  }
283
- var a = lt();
284
- const dt = 520, ft = () => /* @__PURE__ */ a.jsxs("svg", { width: "14", height: "16", viewBox: "0 0 14 16", fill: "currentColor", "aria-hidden": "true", children: [
285
- /* @__PURE__ */ a.jsx("rect", { x: "1", y: "0", width: "4", height: "16", rx: "1" }),
286
- /* @__PURE__ */ a.jsx("rect", { x: "9", y: "0", width: "4", height: "16", rx: "1" })
287
- ] }), Je = () => /* @__PURE__ */ a.jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ a.jsx("polyline", { points: "3,5 7,9 11,5" }) }), Ne = () => /* @__PURE__ */ a.jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ a.jsx("polyline", { points: "3,9 7,5 11,9" }) }), mt = ({
288
- currentTime: D,
283
+ var c = mt();
284
+ const pt = 520, ht = () => /* @__PURE__ */ c.jsxs("svg", { width: "14", height: "16", viewBox: "0 0 14 16", fill: "currentColor", "aria-hidden": "true", children: [
285
+ /* @__PURE__ */ c.jsx("rect", { x: "1", y: "0", width: "4", height: "16", rx: "1" }),
286
+ /* @__PURE__ */ c.jsx("rect", { x: "9", y: "0", width: "4", height: "16", rx: "1" })
287
+ ] }), Xe = () => /* @__PURE__ */ c.jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ c.jsx("polyline", { points: "3,5 7,9 11,5" }) }), Ye = () => /* @__PURE__ */ c.jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ c.jsx("polyline", { points: "3,9 7,5 11,9" }) }), xt = ({
288
+ currentTime: C,
289
289
  isPlaying: k,
290
- multiplier: X,
291
- dateTimeFormat: u,
292
- isLive: b,
290
+ multiplier: Y,
291
+ dateTimeFormat: a,
292
+ timezone: T,
293
+ isLive: R,
293
294
  hasStartTime: I,
294
- hasEndTime: q,
295
- onPlayPause: P,
296
- onJumpToStart: B,
297
- onRewind: R,
298
- onFastForward: H,
299
- onJumpToEnd: ne,
295
+ hasEndTime: O,
296
+ showJumpToStart: W = !0,
297
+ showJumpToEnd: D = !0,
298
+ onPlayPause: U,
299
+ onJumpToStart: $,
300
+ onRewind: oe,
301
+ onFastForward: V,
302
+ onJumpToEnd: Z,
300
303
  onJumpToLive: Q,
301
- onResetSpeed: ee,
302
- onDateTimeClick: G,
303
- theme: x,
304
- swimLanesVisible: j,
305
- onToggleSwimLanes: _
304
+ onResetSpeed: B,
305
+ onDateTimeClick: ee,
306
+ theme: d,
307
+ swimLanesVisible: v,
308
+ onToggleSwimLanes: H
306
309
  }) => {
307
- const V = X < 0, v = X > 1, m = X === 1, g = Math.abs(X), y = T(null), [E, ae] = ve(!1);
308
- $(() => {
309
- const c = y.current;
310
- if (!c) return;
311
- const J = new ResizeObserver(([z]) => {
312
- ae(z.contentRect.width < dt);
310
+ const z = Y < 0, l = Y > 1, y = Y === 1, _ = Math.abs(Y), A = w(null), [te, ce] = ve(!1);
311
+ X(() => {
312
+ const i = A.current;
313
+ if (!i) return;
314
+ const L = new ResizeObserver(([S]) => {
315
+ ce(S.contentRect.width < pt);
313
316
  });
314
- return J.observe(c), () => J.disconnect();
317
+ return L.observe(i), () => L.disconnect();
315
318
  }, []);
316
- const N = {
319
+ const P = {
317
320
  background: "none",
318
321
  border: "1px solid transparent",
319
322
  cursor: "pointer",
@@ -330,64 +333,73 @@ const dt = 520, ft = () => /* @__PURE__ */ a.jsxs("svg", { width: "14", height:
330
333
  fontFamily: "system-ui, -apple-system, sans-serif",
331
334
  flexShrink: 0,
332
335
  lineHeight: 1
333
- }, U = (c) => ({
334
- ...N,
335
- color: c ? x.buttonActiveColor : x.buttonColor,
336
- borderColor: c ? `${x.buttonActiveColor}33` : "transparent"
337
- }), Y = (c, J) => {
338
- c.currentTarget.style.backgroundColor = J ? `${x.buttonActiveColor}22` : x.buttonHoverColor + "44";
339
- }, L = (c) => {
340
- c.currentTarget.style.backgroundColor = "transparent";
336
+ }, q = (i) => ({
337
+ ...P,
338
+ color: i ? d.buttonActiveColor : d.buttonColor,
339
+ borderColor: i ? `${d.buttonActiveColor}33` : "transparent"
340
+ }), N = (i, L) => {
341
+ i.currentTarget.style.backgroundColor = L ? `${d.buttonActiveColor}22` : d.buttonHoverColor + "44";
342
+ }, b = (i) => {
343
+ i.currentTarget.style.backgroundColor = "transparent";
341
344
  };
342
- return /* @__PURE__ */ a.jsxs(
345
+ return /* @__PURE__ */ c.jsxs(
343
346
  "div",
344
347
  {
345
- ref: y,
348
+ ref: A,
346
349
  style: {
347
- display: E ? "flex" : "grid",
348
- gridTemplateColumns: E ? void 0 : "1fr auto 1fr",
350
+ display: te ? "flex" : "grid",
351
+ gridTemplateColumns: te ? void 0 : "1fr auto 1fr",
349
352
  alignItems: "center",
350
353
  padding: "6px 16px",
351
- backgroundColor: x.controlBarBackground,
352
- borderBottom: `1px solid ${x.controlBarBorder}`,
354
+ backgroundColor: d.controlBarBackground,
355
+ borderBottom: `1px solid ${d.controlBarBorder}`,
353
356
  fontFamily: "system-ui, -apple-system, sans-serif"
354
357
  },
355
358
  children: [
356
- /* @__PURE__ */ a.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 }, children: [
357
- /* @__PURE__ */ a.jsx(
359
+ /* @__PURE__ */ c.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 }, children: [
360
+ /* @__PURE__ */ c.jsx(
358
361
  "div",
359
362
  {
360
- onClick: G,
361
- title: G ? "Click to jump to a date/time" : void 0,
363
+ onClick: ee,
364
+ title: ee ? "Click to jump to a date/time" : void 0,
362
365
  style: {
363
- color: x.labelColor,
366
+ color: d.labelColor,
364
367
  fontFamily: "monospace",
365
368
  lineHeight: 1.15,
366
- cursor: G ? "pointer" : "default",
369
+ cursor: ee ? "pointer" : "default",
367
370
  borderRadius: "4px",
368
371
  padding: "2px 4px",
369
372
  transition: "background 0.15s"
370
373
  },
371
- onMouseEnter: (c) => {
372
- G && (c.currentTarget.style.background = x.buttonHoverColor + "44");
374
+ onMouseEnter: (i) => {
375
+ ee && (i.currentTarget.style.background = d.buttonHoverColor + "44");
373
376
  },
374
- onMouseLeave: (c) => c.currentTarget.style.background = "transparent",
377
+ onMouseLeave: (i) => i.currentTarget.style.background = "transparent",
375
378
  children: (() => {
376
- const { timeFormat: c, dateFormat: J } = Ge(u);
377
- return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
378
- c && /* @__PURE__ */ a.jsx("div", { style: { fontSize: "2em", fontWeight: "bold", letterSpacing: "0.02em" }, children: ke(D, c) }),
379
- J && /* @__PURE__ */ a.jsx("div", { style: { fontSize: "1.15em", letterSpacing: "0.03em", color: x.buttonActiveColor }, children: ke(D, J) })
379
+ const { timeFormat: i, dateFormat: L } = Ke(a), S = Ze(C, T);
380
+ return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
381
+ i && /* @__PURE__ */ c.jsx("div", { style: { fontSize: "2em", fontWeight: "bold", letterSpacing: "0.02em" }, children: Ie(C, i, T) }),
382
+ L && /* @__PURE__ */ c.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
383
+ /* @__PURE__ */ c.jsx("span", { style: { fontSize: "1.15em", letterSpacing: "0.03em", color: d.buttonActiveColor }, children: Ie(C, L, T) }),
384
+ S && /* @__PURE__ */ c.jsx("span", { style: {
385
+ fontSize: "0.9em",
386
+ color: d.labelColor,
387
+ opacity: 0.7,
388
+ fontWeight: "bold",
389
+ letterSpacing: "0.04em"
390
+ }, children: S })
391
+ ] })
380
392
  ] });
381
393
  })()
382
394
  }
383
395
  ),
384
- /* @__PURE__ */ a.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "2px", justifyContent: "center" }, children: [
385
- /* @__PURE__ */ a.jsx(
396
+ /* @__PURE__ */ c.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "2px", justifyContent: "center" }, children: [
397
+ /* @__PURE__ */ c.jsx(
386
398
  "button",
387
399
  {
388
400
  onClick: Q,
389
401
  style: {
390
- ...N,
402
+ ...P,
391
403
  fontSize: "11px",
392
404
  fontWeight: "bold",
393
405
  letterSpacing: "0.05em",
@@ -395,301 +407,307 @@ const dt = 520, ft = () => /* @__PURE__ */ a.jsxs("svg", { width: "14", height:
395
407
  minWidth: "52px",
396
408
  height: "20px",
397
409
  borderRadius: "3px",
398
- color: b ? x.controlBarBackground : x.buttonActiveColor,
399
- backgroundColor: b ? x.buttonActiveColor : "transparent",
400
- borderColor: x.buttonActiveColor,
401
- opacity: b ? 1 : 0.55
410
+ color: R ? d.controlBarBackground : d.buttonActiveColor,
411
+ backgroundColor: R ? d.buttonActiveColor : "transparent",
412
+ borderColor: d.buttonActiveColor,
413
+ opacity: R ? 1 : 0.55
402
414
  },
403
- onMouseEnter: (c) => {
404
- c.currentTarget.style.opacity = "1";
415
+ onMouseEnter: (i) => {
416
+ i.currentTarget.style.opacity = "1";
405
417
  },
406
- onMouseLeave: (c) => {
407
- c.currentTarget.style.opacity = b ? "1" : "0.55";
418
+ onMouseLeave: (i) => {
419
+ i.currentTarget.style.opacity = R ? "1" : "0.55";
408
420
  },
409
- title: b ? "Currently live" : "Jump to live (now)",
410
- children: b ? "● LIVE" : "LIVE"
421
+ title: R ? "Currently live" : "Jump to live (now)",
422
+ children: R ? "● LIVE" : "LIVE"
411
423
  }
412
424
  ),
413
- /* @__PURE__ */ a.jsx("div", { style: { height: "20px", display: "flex", alignItems: "center" }, children: !m && /* @__PURE__ */ a.jsx(
425
+ /* @__PURE__ */ c.jsx("div", { style: { height: "20px", display: "flex", alignItems: "center" }, children: !y && /* @__PURE__ */ c.jsx(
414
426
  "button",
415
427
  {
416
- onClick: () => ee(),
428
+ onClick: () => B(),
417
429
  style: {
418
- ...N,
430
+ ...P,
419
431
  fontSize: "11px",
420
- color: x.buttonActiveColor,
421
- borderColor: `${x.buttonActiveColor}44`,
432
+ color: d.buttonActiveColor,
433
+ borderColor: `${d.buttonActiveColor}44`,
422
434
  width: "52px",
423
435
  minWidth: "52px",
424
436
  height: "20px"
425
437
  },
426
- onMouseEnter: (c) => Y(c, !0),
427
- onMouseLeave: L,
438
+ onMouseEnter: (i) => N(i, !0),
439
+ onMouseLeave: b,
428
440
  title: "Reset to 1× speed",
429
- children: V ? `◀ ${g}×` : `${g}× ▶`
441
+ children: z ? `◀ ${_}×` : `${_}× ▶`
430
442
  }
431
443
  ) })
432
444
  ] })
433
445
  ] }),
434
- /* @__PURE__ */ a.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "2px", ...E ? { flex: 1, justifyContent: "center" } : {} }, children: [
435
- I && /* @__PURE__ */ a.jsx(
446
+ /* @__PURE__ */ c.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "2px", ...te ? { flex: 1, justifyContent: "center" } : {} }, children: [
447
+ W && /* @__PURE__ */ c.jsx(
436
448
  "button",
437
449
  {
438
- onClick: B,
439
- style: U(!1),
440
- onMouseEnter: (c) => Y(c, !1),
441
- onMouseLeave: L,
442
- title: "Jump to start",
450
+ onClick: I ? $ : void 0,
451
+ disabled: !I,
452
+ style: { ...q(!1), opacity: I ? 1 : 0.3, cursor: I ? "pointer" : "default" },
453
+ onMouseEnter: I ? (i) => N(i, !1) : void 0,
454
+ onMouseLeave: I ? b : void 0,
455
+ title: I ? "Jump to start" : "No start time set",
443
456
  children: "⏮"
444
457
  }
445
458
  ),
446
- /* @__PURE__ */ a.jsx(
459
+ /* @__PURE__ */ c.jsx(
447
460
  "button",
448
461
  {
449
- onClick: R,
450
- style: { ...U(V), width: "64px", minWidth: "64px", gap: "3px" },
451
- onMouseEnter: (c) => Y(c, V),
452
- onMouseLeave: L,
453
- title: V ? `Reverse ${g}× — click to speed up, press play to stop` : "Rewind",
454
- children: V ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
455
- /* @__PURE__ */ a.jsxs("span", { style: { fontSize: "11px", fontWeight: "bold" }, children: [
456
- g,
462
+ onClick: oe,
463
+ style: { ...q(z), width: "64px", minWidth: "64px", gap: "3px" },
464
+ onMouseEnter: (i) => N(i, z),
465
+ onMouseLeave: b,
466
+ title: z ? `Reverse ${_}× — click to speed up, press play to stop` : "Rewind",
467
+ children: z ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
468
+ /* @__PURE__ */ c.jsxs("span", { style: { fontSize: "11px", fontWeight: "bold" }, children: [
469
+ _,
457
470
  "×"
458
471
  ] }),
459
472
  "◀◀"
460
473
  ] }) : "◀◀"
461
474
  }
462
475
  ),
463
- /* @__PURE__ */ a.jsx(
476
+ /* @__PURE__ */ c.jsx(
464
477
  "button",
465
478
  {
466
- onClick: () => P(!k),
479
+ onClick: () => U(!k),
467
480
  style: {
468
- ...N,
469
- color: x.buttonActiveColor,
481
+ ...P,
482
+ color: d.buttonActiveColor,
470
483
  fontSize: "18px",
471
484
  width: "40px",
472
485
  minWidth: "40px",
473
486
  height: "40px",
474
- borderColor: `${x.buttonActiveColor}55`,
487
+ borderColor: `${d.buttonActiveColor}55`,
475
488
  borderRadius: "50%",
476
489
  paddingLeft: k ? "0" : "2px"
477
490
  },
478
- onMouseEnter: (c) => Y(c, !0),
479
- onMouseLeave: L,
480
- title: k ? "Pause" : V ? "Play (reset to 1×)" : "Play",
481
- children: k ? /* @__PURE__ */ a.jsx(ft, {}) : "▶"
491
+ onMouseEnter: (i) => N(i, !0),
492
+ onMouseLeave: b,
493
+ title: k ? "Pause" : z ? "Play (reset to 1×)" : "Play",
494
+ children: k ? /* @__PURE__ */ c.jsx(ht, {}) : "▶"
482
495
  }
483
496
  ),
484
- /* @__PURE__ */ a.jsx(
497
+ /* @__PURE__ */ c.jsx(
485
498
  "button",
486
499
  {
487
- onClick: H,
488
- style: { ...U(v), width: "64px", minWidth: "64px", gap: "3px" },
489
- onMouseEnter: (c) => Y(c, v),
490
- onMouseLeave: L,
491
- title: v ? `${g}× speed — click to increase, click again at max to reset` : "Fast forward",
492
- children: v ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
500
+ onClick: V,
501
+ style: { ...q(l), width: "64px", minWidth: "64px", gap: "3px" },
502
+ onMouseEnter: (i) => N(i, l),
503
+ onMouseLeave: b,
504
+ title: l ? `${_}× speed — click to increase, click again at max to reset` : "Fast forward",
505
+ children: l ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
493
506
  "▶▶",
494
- /* @__PURE__ */ a.jsxs("span", { style: { fontSize: "11px", fontWeight: "bold" }, children: [
495
- g,
507
+ /* @__PURE__ */ c.jsxs("span", { style: { fontSize: "11px", fontWeight: "bold" }, children: [
508
+ _,
496
509
  "×"
497
510
  ] })
498
511
  ] }) : "▶▶"
499
512
  }
500
513
  ),
501
- q && /* @__PURE__ */ a.jsx(
514
+ D && /* @__PURE__ */ c.jsx(
502
515
  "button",
503
516
  {
504
- onClick: ne,
505
- style: U(!1),
506
- onMouseEnter: (c) => Y(c, !1),
507
- onMouseLeave: L,
508
- title: "Jump to end",
517
+ onClick: O ? Z : void 0,
518
+ disabled: !O,
519
+ style: { ...q(!1), opacity: O ? 1 : 0.3, cursor: O ? "pointer" : "default" },
520
+ onMouseEnter: O ? (i) => N(i, !1) : void 0,
521
+ onMouseLeave: O ? b : void 0,
522
+ title: O ? "Jump to end" : "No end time set",
509
523
  children: "⏭"
510
524
  }
511
525
  )
512
526
  ] }),
513
- !E && /* @__PURE__ */ a.jsx("div", { style: { display: "flex", justifyContent: "flex-end", alignItems: "center" }, children: _ != null && j != null && /* @__PURE__ */ a.jsx(
527
+ !te && /* @__PURE__ */ c.jsx("div", { style: { display: "flex", justifyContent: "flex-end", alignItems: "center" }, children: H != null && v != null && /* @__PURE__ */ c.jsx(
514
528
  "button",
515
529
  {
516
- onClick: _,
530
+ onClick: H,
517
531
  style: {
518
- ...N,
519
- color: x.buttonActiveColor,
520
- borderColor: `${x.buttonActiveColor}33`
532
+ ...P,
533
+ color: d.buttonActiveColor,
534
+ borderColor: `${d.buttonActiveColor}33`
521
535
  },
522
- onMouseEnter: (c) => Y(c, j),
523
- onMouseLeave: L,
524
- title: j ? "Collapse swim lanes" : "Expand swim lanes",
525
- children: j ? /* @__PURE__ */ a.jsx(Je, {}) : /* @__PURE__ */ a.jsx(Ne, {})
536
+ onMouseEnter: (i) => N(i, v),
537
+ onMouseLeave: b,
538
+ title: v ? "Collapse swim lanes" : "Expand swim lanes",
539
+ children: v ? /* @__PURE__ */ c.jsx(Xe, {}) : /* @__PURE__ */ c.jsx(Ye, {})
526
540
  }
527
541
  ) }),
528
- E && _ != null && j != null && /* @__PURE__ */ a.jsx(
542
+ te && H != null && v != null && /* @__PURE__ */ c.jsx(
529
543
  "button",
530
544
  {
531
- onClick: _,
545
+ onClick: H,
532
546
  style: {
533
- ...N,
534
- color: x.buttonActiveColor,
535
- borderColor: `${x.buttonActiveColor}33`,
547
+ ...P,
548
+ color: d.buttonActiveColor,
549
+ borderColor: `${d.buttonActiveColor}33`,
536
550
  marginLeft: "4px"
537
551
  },
538
- onMouseEnter: (c) => Y(c, j),
539
- onMouseLeave: L,
540
- title: j ? "Collapse swim lanes" : "Expand swim lanes",
541
- children: j ? /* @__PURE__ */ a.jsx(Je, {}) : /* @__PURE__ */ a.jsx(Ne, {})
552
+ onMouseEnter: (i) => N(i, v),
553
+ onMouseLeave: b,
554
+ title: v ? "Collapse swim lanes" : "Expand swim lanes",
555
+ children: v ? /* @__PURE__ */ c.jsx(Xe, {}) : /* @__PURE__ */ c.jsx(Ye, {})
542
556
  }
543
557
  )
544
558
  ]
545
559
  }
546
560
  );
547
- }, We = He(
548
- (D, k) => {
561
+ }, Be = qe(
562
+ (C, k) => {
549
563
  const {
550
- currentTime: X,
551
- defaultStartMs: u,
552
- defaultEndMs: b,
553
- theme: I,
554
- maxTicks: q,
555
- onTimeChange: P,
556
- onDragStart: B,
557
- onDragEnd: R,
558
- swimLanes: H,
559
- showSwimLanes: ne,
560
- onSwimLaneItemClick: Q,
561
- onSwimLaneItemHover: ee,
562
- onSwimLaneItemDoubleClick: G,
563
- onSwimLaneItemContextMenu: x,
564
- onSwimLaneReorder: j
565
- } = D, _ = T(null), V = T(I), v = T(q), m = T(u), g = T(b), y = T(C.JulianDate.toDate(X).getTime());
566
- $(() => {
567
- V.current = I;
568
- }, [I]), $(() => {
569
- v.current = q;
570
- }, [q]);
571
- const E = T(H ?? []), ae = T(ne ?? (H != null && H.length > 0)), N = T(0), U = T(null), Y = T(null), L = T(Q), c = T(ee), J = T(G), z = T(x), re = T(j);
572
- $(() => {
573
- L.current = Q;
574
- }, [Q]), $(() => {
575
- c.current = ee;
576
- }, [ee]), $(() => {
577
- J.current = G;
578
- }, [G]), $(() => {
579
- z.current = x;
580
- }, [x]), $(() => {
581
- re.current = j;
582
- }, [j]), $(() => {
583
- E.current = H ?? [], i();
584
- }, [H]), $(() => {
585
- ae.current = ne ?? (H != null && H.length > 0), i();
586
- }, [ne, H]);
587
- const W = T(null), F = T(null), ce = T(!1), le = T(0), t = T("none"), l = T(0), w = T(0), A = T(0), te = T("none"), de = T(0), S = T(0), ue = (e, n) => Math.hypot(n.clientX - e.clientX, n.clientY - e.clientY), K = oe(() => ({
588
- startMs: m.current,
589
- endMs: g.current,
590
- currentMs: y.current,
591
- theme: V.current,
592
- maxTicks: v.current,
593
- swimLanes: E.current,
594
- showSwimLanes: ae.current,
595
- scrollTop: N.current,
596
- reorderState: Y.current
564
+ currentTime: Y,
565
+ defaultStartMs: a,
566
+ defaultEndMs: T,
567
+ theme: R,
568
+ maxTicks: I,
569
+ timezone: O,
570
+ onTimeChange: W,
571
+ onDragStart: D,
572
+ onDragEnd: U,
573
+ swimLanes: $,
574
+ showSwimLanes: oe,
575
+ onSwimLaneItemClick: V,
576
+ onSwimLaneItemHover: Z,
577
+ onSwimLaneItemDoubleClick: Q,
578
+ onSwimLaneItemContextMenu: B,
579
+ onSwimLaneReorder: ee
580
+ } = C, d = w(null), v = w(R), H = w(I), z = w(O), l = w(a), y = w(T), _ = w(j.JulianDate.toDate(Y).getTime());
581
+ X(() => {
582
+ v.current = R;
583
+ }, [R]), X(() => {
584
+ H.current = I;
585
+ }, [I]), X(() => {
586
+ z.current = O, p();
587
+ }, [O]);
588
+ const A = w($ ?? []), te = w(oe ?? ($ != null && $.length > 0)), ce = w(0), P = w(null), q = w(null), N = w(V), b = w(Z), i = w(Q), L = w(B), S = w(ee);
589
+ X(() => {
590
+ N.current = V;
591
+ }, [V]), X(() => {
592
+ b.current = Z;
593
+ }, [Z]), X(() => {
594
+ i.current = Q;
595
+ }, [Q]), X(() => {
596
+ L.current = B;
597
+ }, [B]), X(() => {
598
+ S.current = ee;
599
+ }, [ee]), X(() => {
600
+ A.current = $ ?? [], p();
601
+ }, [$]), X(() => {
602
+ te.current = oe ?? ($ != null && $.length > 0), p();
603
+ }, [oe, $]);
604
+ const ne = w(null), re = w(null), t = w(!1), m = w(0), g = w("none"), M = w(0), ue = w(0), ae = w(0), E = w("none"), ie = w(0), le = w(0), be = (e, n) => Math.hypot(n.clientX - e.clientX, n.clientY - e.clientY), de = se(() => ({
605
+ startMs: l.current,
606
+ endMs: y.current,
607
+ currentMs: _.current,
608
+ theme: v.current,
609
+ maxTicks: H.current,
610
+ timezone: z.current,
611
+ swimLanes: A.current,
612
+ showSwimLanes: te.current,
613
+ scrollTop: ce.current,
614
+ reorderState: q.current
597
615
  }), []);
598
- Ue(k, () => ({
599
- zoomTo(e, n, r) {
600
- const s = Math.max(nt, Math.min(rt, n - e)), o = (e + n) / 2;
601
- m.current = o - s / 2, g.current = o + s / 2, r !== void 0 && (y.current = r), i();
616
+ Ge(k, () => ({
617
+ zoomTo(e, n, o) {
618
+ const s = Math.max(st, Math.min(ct, n - e)), r = (e + n) / 2;
619
+ l.current = r - s / 2, y.current = r + s / 2, o !== void 0 && (_.current = o), p();
602
620
  },
603
621
  getVisibleRange() {
604
- return { startMs: m.current, endMs: g.current };
622
+ return { startMs: l.current, endMs: y.current };
605
623
  },
606
624
  startFollow(e) {
607
- if (le.current = e, F.current !== null) return;
608
- ce.current = !0;
625
+ if (m.current = e, re.current !== null) return;
626
+ t.current = !0;
609
627
  let n = performance.now();
610
- const r = () => {
611
- const s = performance.now(), o = s - n;
628
+ const o = () => {
629
+ const s = performance.now(), r = s - n;
612
630
  n = s;
613
- const f = o * le.current;
614
- m.current += f, g.current += f, y.current += f, i(), F.current = requestAnimationFrame(r);
631
+ const u = r * m.current;
632
+ l.current += u, y.current += u, _.current += u, p(), re.current = requestAnimationFrame(o);
615
633
  };
616
- F.current = requestAnimationFrame(r);
634
+ re.current = requestAnimationFrame(o);
617
635
  },
618
636
  stopFollow() {
619
- ce.current = !1, F.current !== null && (cancelAnimationFrame(F.current), F.current = null);
637
+ t.current = !1, re.current !== null && (cancelAnimationFrame(re.current), re.current = null);
620
638
  },
621
639
  correctFollow(e) {
622
- if (!ce.current) return;
623
- const n = e - y.current;
624
- y.current = e, m.current += n, g.current += n;
640
+ if (!t.current) return;
641
+ const n = e - _.current;
642
+ _.current = e, l.current += n, y.current += n;
625
643
  },
626
644
  // ── Swim lane CRUD ──────────────────────────────────────────────
627
645
  appendSwimLane(e) {
628
- E.current = [...E.current, e], i();
646
+ A.current = [...A.current, e], p();
629
647
  },
630
648
  updateSwimLane(e, n) {
631
- E.current = E.current.map(
632
- (r) => r.id === e ? { ...r, ...n, id: r.id } : r
633
- ), i();
649
+ A.current = A.current.map(
650
+ (o) => o.id === e ? { ...o, ...n, id: o.id } : o
651
+ ), p();
634
652
  },
635
653
  removeSwimLane(e) {
636
- E.current = E.current.filter((n) => n.id !== e), i();
654
+ A.current = A.current.filter((n) => n.id !== e), p();
637
655
  },
638
656
  reorderSwimLanes(e) {
639
- const n = new Map(E.current.map((s) => [s.id, s])), r = [];
657
+ const n = new Map(A.current.map((s) => [s.id, s])), o = [];
640
658
  for (const s of e) {
641
- const o = n.get(s);
642
- o && r.push(o);
659
+ const r = n.get(s);
660
+ r && o.push(r);
643
661
  }
644
- E.current = r, i();
662
+ A.current = o, p();
645
663
  }
646
664
  }));
647
- const i = oe(() => {
648
- const e = _.current;
665
+ const p = se(() => {
666
+ const e = d.current;
649
667
  if (!e) return;
650
668
  const n = e.getContext("2d");
651
669
  if (!n) return;
652
- const r = e.getBoundingClientRect(), s = r.width, o = r.height;
653
- if (s === 0 || o === 0) return;
654
- const f = window.devicePixelRatio || 1, h = Math.round(s * f), p = Math.round(o * f);
655
- (e.width !== h || e.height !== p) && (e.width = h, e.height = p), n.save(), n.scale(f, f);
656
- const O = Ve(n, s, o, K());
657
- O !== N.current && (N.current = O), n.restore();
658
- }, [K]);
659
- qe(() => {
660
- i();
661
- const e = _.current;
670
+ const o = e.getBoundingClientRect(), s = o.width, r = o.height;
671
+ if (s === 0 || r === 0) return;
672
+ const u = window.devicePixelRatio || 1, h = Math.round(s * u), x = Math.round(r * u);
673
+ (e.width !== h || e.height !== x) && (e.width = h, e.height = x), n.save(), n.scale(u, u);
674
+ const F = Qe(n, s, r, de());
675
+ F !== ce.current && (ce.current = F), n.restore();
676
+ }, [de]);
677
+ Ve(() => {
678
+ p();
679
+ const e = d.current;
662
680
  if (!e) return;
663
- const n = new ResizeObserver(() => i());
681
+ const n = new ResizeObserver(() => p());
664
682
  return n.observe(e), () => n.disconnect();
665
- }, [i]), $(() => {
666
- if (ce.current) return;
667
- const e = C.JulianDate.toDate(X).getTime();
668
- y.current !== e && (y.current = e, i());
669
- }, [X, i]);
670
- const me = oe((e) => {
671
- if (W.current !== null) return;
683
+ }, [p]), X(() => {
684
+ if (t.current) return;
685
+ const e = j.JulianDate.toDate(Y).getTime();
686
+ _.current !== e && (_.current = e, p());
687
+ }, [Y, p]);
688
+ const J = se((e) => {
689
+ if (ne.current !== null) return;
672
690
  const n = () => {
673
- const r = _.current, s = g.current - m.current, o = e * s * 0.01;
674
- if (m.current += o, g.current += o, r) {
675
- const f = r.getBoundingClientRect(), h = Math.max(0, Math.min(f.width, w.current - f.left)), p = m.current + h / f.width * (g.current - m.current);
676
- y.current = p, P(C.JulianDate.fromDate(new Date(p)));
691
+ const o = d.current, s = y.current - l.current, r = e * s * 0.01;
692
+ if (l.current += r, y.current += r, o) {
693
+ const u = o.getBoundingClientRect(), h = Math.max(0, Math.min(u.width, ue.current - u.left)), x = l.current + h / u.width * (y.current - l.current);
694
+ _.current = x, W(j.JulianDate.fromDate(new Date(x)));
677
695
  }
678
- i(), W.current = requestAnimationFrame(n);
696
+ p(), ne.current = requestAnimationFrame(n);
679
697
  };
680
- W.current = requestAnimationFrame(n);
681
- }, [i, P]), ie = oe(() => {
682
- W.current !== null && (cancelAnimationFrame(W.current), W.current = null);
683
- }, []), se = oe((e, n, r, s) => Ke(e, n, r, s, K()), [K]), xe = oe((e, n, r) => Ze(e, n, r, K()), [K]), he = oe((e, n) => Qe(e, n, K()), [K]), Re = oe((e) => {
698
+ ne.current = requestAnimationFrame(n);
699
+ }, [p, W]), me = se(() => {
700
+ ne.current !== null && (cancelAnimationFrame(ne.current), ne.current = null);
701
+ }, []), K = se((e, n, o, s) => et(e, n, o, s, de()), [de]), pe = se((e, n, o) => tt(e, n, o, de()), [de]), he = se((e, n) => nt(e, n, de()), [de]), Ce = se((e) => {
684
702
  e.preventDefault();
685
- const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, s = e.clientY - n.top;
686
- if (e.button === 0 && re.current) {
687
- const o = xe(r, s, n.height);
688
- if (o) {
689
- const h = E.current.findIndex((p) => p.id === o.id);
690
- Y.current = {
703
+ const n = e.currentTarget.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top;
704
+ if (e.button === 0 && S.current) {
705
+ const r = pe(o, s, n.height);
706
+ if (r) {
707
+ const h = A.current.findIndex((x) => x.id === r.id);
708
+ q.current = {
691
709
  dragging: !0,
692
- dragLaneId: o.id,
710
+ dragLaneId: r.id,
693
711
  dragStartY: e.clientY,
694
712
  currentY: e.clientY,
695
713
  insertIndex: h
@@ -698,498 +716,505 @@ const dt = 520, ft = () => /* @__PURE__ */ a.jsxs("svg", { width: "14", height:
698
716
  }
699
717
  }
700
718
  if (e.button === 0 && he(s, n.height)) {
701
- const o = (y.current - m.current) / (g.current - m.current) * n.width;
702
- if (!(Math.abs(r - o) <= 10) && se(r, s, n.width, n.height)) {
703
- A.current = performance.now();
719
+ const r = (_.current - l.current) / (y.current - l.current) * n.width;
720
+ if (!(Math.abs(o - r) <= 10) && K(o, s, n.width, n.height)) {
721
+ ae.current = performance.now();
704
722
  return;
705
723
  }
706
724
  }
707
725
  if (e.button === 0) {
708
- t.current = "scrub", w.current = e.clientX, e.currentTarget.style.cursor = "grabbing", B == null || B();
709
- const o = m.current + r / n.width * (g.current - m.current);
710
- y.current = o, i(), P(C.JulianDate.fromDate(new Date(o)));
726
+ g.current = "scrub", ue.current = e.clientX, e.currentTarget.style.cursor = "grabbing", D == null || D();
727
+ const r = l.current + o / n.width * (y.current - l.current);
728
+ _.current = r, p(), W(j.JulianDate.fromDate(new Date(r)));
711
729
  } else if (e.button === 1)
712
- t.current = "slide", l.current = e.clientX;
730
+ g.current = "slide", M.current = e.clientX;
713
731
  else if (e.button === 2) {
714
- if (z.current && he(s, n.height))
732
+ if (L.current && he(s, n.height))
715
733
  return;
716
- t.current = "zoom", l.current = e.clientX;
734
+ g.current = "zoom", M.current = e.clientX;
717
735
  }
718
- }, [i, P, B, xe, he, se]);
719
- $(() => {
720
- const e = (r) => {
721
- const s = Y.current;
736
+ }, [p, W, D, pe, he, K]);
737
+ X(() => {
738
+ const e = (o) => {
739
+ const s = q.current;
722
740
  if (s && s.dragging) {
723
- s.currentY = r.clientY;
724
- const p = _.current;
725
- if (p) {
726
- const O = p.getBoundingClientRect(), Z = r.clientY - O.top;
727
- let Ee = -N.current;
728
- const _e = E.current;
729
- let je = _e.length;
730
- for (let ye = 0; ye < _e.length; ye++) {
731
- const Ae = _e[ye].height ?? Le, $e = Ee + Ae / 2;
732
- if (Z < $e) {
733
- je = ye;
741
+ s.currentY = o.clientY;
742
+ const x = d.current;
743
+ if (x) {
744
+ const F = x.getBoundingClientRect(), G = o.clientY - F.top;
745
+ let Te = -ce.current;
746
+ const Ae = A.current;
747
+ let Se = Ae.length;
748
+ for (let Me = 0; Me < Ae.length; Me++) {
749
+ const ke = Ae[Me].height ?? Fe, He = Te + ke / 2;
750
+ if (G < He) {
751
+ Se = Me;
734
752
  break;
735
753
  }
736
- Ee += Ae + Ie;
754
+ Te += ke + Oe;
737
755
  }
738
- s.insertIndex = je;
756
+ s.insertIndex = Se;
739
757
  }
740
- i();
758
+ p();
741
759
  return;
742
760
  }
743
- if (t.current === "none") return;
744
- const o = _.current;
745
- if (!o) return;
746
- const f = o.getBoundingClientRect(), h = f.width;
747
- if (t.current === "scrub") {
748
- w.current = r.clientX;
749
- const p = r.clientX - f.left, O = h * 0.08;
750
- p < O ? me(-1) : p > h - O ? me(1) : ie();
751
- const Z = Math.max(0, Math.min(h, p)), fe = m.current + Z / h * (g.current - m.current);
752
- y.current = fe, i(), P(C.JulianDate.fromDate(new Date(fe)));
753
- } else if (t.current === "slide") {
754
- const p = l.current - r.clientX;
755
- if (l.current = r.clientX, p !== 0) {
756
- const O = p / h * (g.current - m.current);
757
- m.current += O, g.current += O, i();
761
+ if (g.current === "none") return;
762
+ const r = d.current;
763
+ if (!r) return;
764
+ const u = r.getBoundingClientRect(), h = u.width;
765
+ if (g.current === "scrub") {
766
+ ue.current = o.clientX;
767
+ const x = o.clientX - u.left, F = h * 0.08;
768
+ x < F ? J(-1) : x > h - F ? J(1) : me();
769
+ const G = Math.max(0, Math.min(h, x)), fe = l.current + G / h * (y.current - l.current);
770
+ _.current = fe, p(), W(j.JulianDate.fromDate(new Date(fe)));
771
+ } else if (g.current === "slide") {
772
+ const x = M.current - o.clientX;
773
+ if (M.current = o.clientX, x !== 0) {
774
+ const F = x / h * (y.current - l.current);
775
+ l.current += F, y.current += F, p();
758
776
  }
759
- } else if (t.current === "zoom") {
760
- const p = l.current - r.clientX;
761
- l.current = r.clientX, p !== 0 && pe(Math.pow(1.01, p));
777
+ } else if (g.current === "zoom") {
778
+ const x = M.current - o.clientX;
779
+ M.current = o.clientX, x !== 0 && xe(Math.pow(1.01, x));
762
780
  }
763
781
  }, n = () => {
764
782
  var s;
765
- const r = Y.current;
766
- if (r && r.dragging) {
767
- const o = Math.abs(r.currentY - r.dragStartY), f = E.current, h = f.findIndex((p) => p.id === r.dragLaneId);
768
- if (o > 5 && h >= 0 && r.insertIndex !== h && r.insertIndex !== h + 1) {
769
- const p = [...f], [O] = p.splice(h, 1), Z = r.insertIndex > h ? r.insertIndex - 1 : r.insertIndex;
770
- p.splice(Z, 0, O), E.current = p, (s = re.current) == null || s.call(re, p.map((fe) => fe.id));
783
+ const o = q.current;
784
+ if (o && o.dragging) {
785
+ const r = Math.abs(o.currentY - o.dragStartY), u = A.current, h = u.findIndex((x) => x.id === o.dragLaneId);
786
+ if (r > 5 && h >= 0 && o.insertIndex !== h && o.insertIndex !== h + 1) {
787
+ const x = [...u], [F] = x.splice(h, 1), G = o.insertIndex > h ? o.insertIndex - 1 : o.insertIndex;
788
+ x.splice(G, 0, F), A.current = x, (s = S.current) == null || s.call(S, x.map((fe) => fe.id));
771
789
  }
772
- Y.current = null, _.current && (_.current.style.cursor = "default"), i();
790
+ q.current = null, d.current && (d.current.style.cursor = "default"), p();
773
791
  return;
774
792
  }
775
- ie(), t.current = "none", _.current && (_.current.style.cursor = "default"), R == null || R();
793
+ me(), g.current = "none", d.current && (d.current.style.cursor = "default"), U == null || U();
776
794
  };
777
795
  return document.addEventListener("mousemove", e), document.addEventListener("mouseup", n), () => {
778
796
  document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", n);
779
797
  };
780
- }, [i, P, R, me, ie]);
781
- const pe = oe((e) => {
782
- const n = et(m.current, g.current, e);
783
- m.current = n.startMs, g.current = n.endMs, i();
784
- }, [i]), be = oe((e) => {
798
+ }, [p, W, U, J, me]);
799
+ const xe = se((e) => {
800
+ const n = rt(l.current, y.current, e);
801
+ l.current = n.startMs, y.current = n.endMs, p();
802
+ }, [p]), we = se((e) => {
785
803
  e.preventDefault();
786
- const n = _.current;
804
+ const n = d.current;
787
805
  if (!n) return;
788
- const r = n.getBoundingClientRect(), s = e.clientY - r.top, o = ae.current, f = E.current;
789
- if (o && f.length > 0) {
790
- const h = Math.max(0, r.height - ze);
806
+ const o = n.getBoundingClientRect(), s = e.clientY - o.top, r = te.current, u = A.current;
807
+ if (r && u.length > 0) {
808
+ const h = Math.max(0, o.height - $e);
791
809
  if (s >= 0 && s < h) {
792
- let p = 0;
793
- for (const Z of f) p += (Z.height ?? Le) + Ie;
794
- const O = Math.max(0, p - h);
795
- if (O > 0) {
796
- N.current = Math.max(0, Math.min(O, N.current + e.deltaY * tt)), i();
810
+ let x = 0;
811
+ for (const G of u) x += (G.height ?? Fe) + Oe;
812
+ const F = Math.max(0, x - h);
813
+ if (F > 0) {
814
+ ce.current = Math.max(0, Math.min(F, ce.current + e.deltaY * ot)), p();
797
815
  return;
798
816
  }
799
817
  }
800
818
  }
801
- pe(Math.pow(1.05, e.deltaY > 0 ? -1 : 1));
802
- }, [pe, i]);
803
- $(() => {
804
- const e = _.current;
819
+ xe(Math.pow(1.05, e.deltaY > 0 ? -1 : 1));
820
+ }, [xe, p]);
821
+ X(() => {
822
+ const e = d.current;
805
823
  if (e)
806
- return e.addEventListener("wheel", be, { passive: !1 }), () => e.removeEventListener("wheel", be);
807
- }, [be]), $(() => {
808
- const e = _.current;
824
+ return e.addEventListener("wheel", we, { passive: !1 }), () => e.removeEventListener("wheel", we);
825
+ }, [we]), X(() => {
826
+ const e = d.current;
809
827
  if (!e) return;
810
- const n = (o) => {
811
- o.preventDefault();
812
- const f = e.getBoundingClientRect();
813
- if (o.touches.length === 1) {
814
- const h = o.touches[0].clientX - f.left, p = Math.max(0, Math.min(f.width, h)), O = m.current + p / f.width * (g.current - m.current);
815
- te.current = "scrub", de.current = o.touches[0].clientX, w.current = o.touches[0].clientX, y.current = O, i(), B == null || B(), P(C.JulianDate.fromDate(new Date(O)));
816
- } else o.touches.length >= 2 && (te.current = "pinch", S.current = ue(o.touches[0], o.touches[1]));
817
- }, r = (o) => {
818
- o.preventDefault();
819
- const f = e.getBoundingClientRect();
820
- if (te.current === "scrub" && o.touches.length >= 1) {
821
- const h = o.touches[0].clientX - f.left, p = f.width * 0.08;
822
- if (w.current = o.touches[0].clientX, h < p) me(-1);
823
- else if (h > f.width - p) me(1);
828
+ const n = (r) => {
829
+ r.preventDefault();
830
+ const u = e.getBoundingClientRect();
831
+ if (r.touches.length === 1) {
832
+ const h = r.touches[0].clientX - u.left, x = Math.max(0, Math.min(u.width, h)), F = l.current + x / u.width * (y.current - l.current);
833
+ E.current = "scrub", ie.current = r.touches[0].clientX, ue.current = r.touches[0].clientX, _.current = F, p(), D == null || D(), W(j.JulianDate.fromDate(new Date(F)));
834
+ } else r.touches.length >= 2 && (E.current = "pinch", le.current = be(r.touches[0], r.touches[1]));
835
+ }, o = (r) => {
836
+ r.preventDefault();
837
+ const u = e.getBoundingClientRect();
838
+ if (E.current === "scrub" && r.touches.length >= 1) {
839
+ const h = r.touches[0].clientX - u.left, x = u.width * 0.08;
840
+ if (ue.current = r.touches[0].clientX, h < x) J(-1);
841
+ else if (h > u.width - x) J(1);
824
842
  else {
825
- ie();
826
- const O = Math.max(0, Math.min(f.width, h)), Z = m.current + O / f.width * (g.current - m.current);
827
- y.current = Z, i(), P(C.JulianDate.fromDate(new Date(Z)));
843
+ me();
844
+ const F = Math.max(0, Math.min(u.width, h)), G = l.current + F / u.width * (y.current - l.current);
845
+ _.current = G, p(), W(j.JulianDate.fromDate(new Date(G)));
828
846
  }
829
- } else if (te.current === "slide" && o.touches.length >= 1) {
830
- const h = de.current - o.touches[0].clientX;
831
- if (de.current = o.touches[0].clientX, h !== 0) {
832
- const p = h / f.width * (g.current - m.current);
833
- m.current += p, g.current += p, i();
847
+ } else if (E.current === "slide" && r.touches.length >= 1) {
848
+ const h = ie.current - r.touches[0].clientX;
849
+ if (ie.current = r.touches[0].clientX, h !== 0) {
850
+ const x = h / u.width * (y.current - l.current);
851
+ l.current += x, y.current += x, p();
834
852
  }
835
- } else if (te.current === "pinch" && o.touches.length >= 2) {
836
- const h = ue(o.touches[0], o.touches[1]);
837
- h > 0 && S.current > 0 && pe(S.current / h), S.current = h;
853
+ } else if (E.current === "pinch" && r.touches.length >= 2) {
854
+ const h = be(r.touches[0], r.touches[1]);
855
+ h > 0 && le.current > 0 && xe(le.current / h), le.current = h;
838
856
  }
839
- }, s = (o) => {
840
- ie(), te.current === "scrub" && (R == null || R()), o.touches.length === 0 ? te.current = "none" : o.touches.length === 1 && (te.current = "slide", de.current = o.touches[0].clientX);
857
+ }, s = (r) => {
858
+ me(), E.current === "scrub" && (U == null || U()), r.touches.length === 0 ? E.current = "none" : r.touches.length === 1 && (E.current = "slide", ie.current = r.touches[0].clientX);
841
859
  };
842
- return e.addEventListener("touchstart", n, { passive: !1 }), e.addEventListener("touchmove", r, { passive: !1 }), e.addEventListener("touchend", s, { passive: !1 }), () => {
843
- e.removeEventListener("touchstart", n), e.removeEventListener("touchmove", r), e.removeEventListener("touchend", s);
860
+ return e.addEventListener("touchstart", n, { passive: !1 }), e.addEventListener("touchmove", o, { passive: !1 }), e.addEventListener("touchend", s, { passive: !1 }), () => {
861
+ e.removeEventListener("touchstart", n), e.removeEventListener("touchmove", o), e.removeEventListener("touchend", s);
844
862
  };
845
- }, [i, B, R, P, pe, me, ie]);
846
- const Ce = oe((e) => {
847
- var h, p, O;
848
- if (t.current !== "none") return;
849
- const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, s = e.clientY - n.top, o = (y.current - m.current) / (g.current - m.current) * n.width, f = Math.abs(r - o) <= 10;
863
+ }, [p, D, U, W, xe, J, me]);
864
+ const De = se((e) => {
865
+ var h, x, F;
866
+ if (g.current !== "none") return;
867
+ const n = e.currentTarget.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r = (_.current - l.current) / (y.current - l.current) * n.width, u = Math.abs(o - r) <= 10;
850
868
  if (he(s, n.height)) {
851
- const Z = se(r, s, n.width, n.height), fe = U.current;
852
- if (Z)
853
- e.currentTarget.style.cursor = f ? "grab" : "pointer", (!fe || fe.item.id !== Z.item.id || fe.lane.id !== Z.lane.id) && (U.current = Z, (h = c.current) == null || h.call(c, { laneId: Z.lane.id, item: Z.item, originalEvent: e.nativeEvent }), i());
854
- else if (fe && (U.current = null, (p = c.current) == null || p.call(c, null), i()), f)
869
+ const G = K(o, s, n.width, n.height), fe = P.current;
870
+ if (G)
871
+ e.currentTarget.style.cursor = u ? "grab" : "pointer", (!fe || fe.item.id !== G.item.id || fe.lane.id !== G.lane.id) && (P.current = G, (h = b.current) == null || h.call(b, { laneId: G.lane.id, item: G.item, originalEvent: e.nativeEvent }), p());
872
+ else if (fe && (P.current = null, (x = b.current) == null || x.call(b, null), p()), u)
855
873
  e.currentTarget.style.cursor = "grab";
856
874
  else {
857
- const Ee = xe(r, s, n.height);
858
- e.currentTarget.style.cursor = Ee && re.current ? "grab" : "default";
875
+ const Te = pe(o, s, n.height);
876
+ e.currentTarget.style.cursor = Te && S.current ? "grab" : "default";
859
877
  }
860
878
  return;
861
879
  }
862
- U.current && (U.current = null, (O = c.current) == null || O.call(c, null), i()), e.currentTarget.style.cursor = f ? "grab" : "default";
863
- }, [i, se, he, xe]), De = oe((e) => {
880
+ P.current && (P.current = null, (F = b.current) == null || F.call(b, null), p()), e.currentTarget.style.cursor = u ? "grab" : "default";
881
+ }, [p, K, he, pe]), _e = se((e) => {
864
882
  var h;
865
- if (performance.now() - A.current > 300) return;
866
- const r = e.currentTarget.getBoundingClientRect(), s = e.clientX - r.left, o = e.clientY - r.top, f = se(s, o, r.width, r.height);
867
- f && ((h = L.current) == null || h.call(L, { laneId: f.lane.id, item: f.item, originalEvent: e.nativeEvent }));
868
- }, [se]), d = oe((e) => {
869
- var f;
870
- const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, s = e.clientY - n.top, o = se(r, s, n.width, n.height);
871
- o && ((f = J.current) == null || f.call(J, { laneId: o.lane.id, item: o.item, originalEvent: e.nativeEvent }));
872
- }, [se]), M = oe((e) => {
873
- const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, s = e.clientY - n.top, o = se(r, s, n.width, n.height);
874
- o && z.current ? (e.preventDefault(), z.current({ laneId: o.lane.id, item: o.item, originalEvent: e.nativeEvent })) : e.preventDefault();
875
- }, [se]);
876
- return $(() => () => {
877
- W.current !== null && cancelAnimationFrame(W.current), F.current !== null && cancelAnimationFrame(F.current);
878
- }, []), /* @__PURE__ */ a.jsx(
883
+ if (performance.now() - ae.current > 300) return;
884
+ const o = e.currentTarget.getBoundingClientRect(), s = e.clientX - o.left, r = e.clientY - o.top, u = K(s, r, o.width, o.height);
885
+ u && ((h = N.current) == null || h.call(N, { laneId: u.lane.id, item: u.item, originalEvent: e.nativeEvent }));
886
+ }, [K]), je = se((e) => {
887
+ var u;
888
+ const n = e.currentTarget.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r = K(o, s, n.width, n.height);
889
+ r && ((u = i.current) == null || u.call(i, { laneId: r.lane.id, item: r.item, originalEvent: e.nativeEvent }));
890
+ }, [K]), f = se((e) => {
891
+ const n = e.currentTarget.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r = K(o, s, n.width, n.height);
892
+ r && L.current ? (e.preventDefault(), L.current({ laneId: r.lane.id, item: r.item, originalEvent: e.nativeEvent })) : e.preventDefault();
893
+ }, [K]);
894
+ return X(() => () => {
895
+ ne.current !== null && cancelAnimationFrame(ne.current), re.current !== null && cancelAnimationFrame(re.current);
896
+ }, []), /* @__PURE__ */ c.jsx(
879
897
  "canvas",
880
898
  {
881
- ref: _,
899
+ ref: d,
882
900
  style: { width: "100%", flex: 1, minHeight: 0, display: "block", cursor: "default" },
883
- onMouseDown: Re,
884
- onMouseMove: Ce,
885
- onClick: De,
886
- onDoubleClick: d,
901
+ onMouseDown: Ce,
902
+ onMouseMove: De,
903
+ onClick: _e,
904
+ onDoubleClick: je,
887
905
  onMouseLeave: () => {
888
906
  var e;
889
- U.current && (U.current = null, (e = c.current) == null || e.call(c, null), i()), t.current === "none" && _.current && (_.current.style.cursor = "default");
907
+ P.current && (P.current = null, (e = b.current) == null || e.call(b, null), p()), g.current === "none" && d.current && (d.current.style.cursor = "default");
890
908
  },
891
- onContextMenu: M
909
+ onContextMenu: f
892
910
  }
893
911
  );
894
912
  }
895
913
  );
896
- We.displayName = "TimelineCanvas";
897
- const Xe = [2, 4, 8, 16, 32, 100, 1], Ye = [1, 2, 4, 8, 16, 32, 100], xt = ({
898
- startTime: D,
914
+ Be.displayName = "TimelineCanvas";
915
+ const ze = [2, 4, 8, 16, 32, 100, 1], We = [1, 2, 4, 8, 16, 32, 100], bt = ({
916
+ startTime: C,
899
917
  endTime: k,
900
- currentTime: X,
901
- clock: u,
902
- onTimeChange: b,
903
- onPlayPause: I,
904
- onMultiplierChange: q,
905
- height: P,
906
- showControls: B = !0,
907
- enableDrag: R = !0,
908
- dateTimeFormat: H,
909
- onDateTimeClick: ne,
910
- jumpToTime: Q,
911
- maxTicks: ee,
912
- ffSpeeds: G = Xe,
913
- rwSpeeds: x = Ye,
914
- theme: j,
915
- className: _,
916
- swimLanes: V,
917
- showSwimLanes: v,
918
- onShowSwimLanesChange: m,
919
- swimLaneTransition: g = "animated",
920
- onSwimLaneItemClick: y,
921
- onSwimLaneItemHover: E,
922
- onSwimLaneItemDoubleClick: ae,
923
- onSwimLaneItemContextMenu: N,
924
- onSwimLaneReorder: U
918
+ currentTime: Y,
919
+ clock: a,
920
+ onTimeChange: T,
921
+ onPlayPause: R,
922
+ onMultiplierChange: I,
923
+ height: O,
924
+ showControls: W = !0,
925
+ showJumpToStart: D,
926
+ showJumpToEnd: U,
927
+ enableDrag: $ = !0,
928
+ dateTimeFormat: oe,
929
+ onDateTimeClick: V,
930
+ jumpToTime: Z,
931
+ maxTicks: Q,
932
+ ffSpeeds: B = ze,
933
+ rwSpeeds: ee = We,
934
+ theme: d,
935
+ className: v,
936
+ timezone: H,
937
+ swimLanes: z,
938
+ showSwimLanes: l,
939
+ onShowSwimLanesChange: y,
940
+ swimLaneTransition: _ = "animated",
941
+ onSwimLaneItemClick: A,
942
+ onSwimLaneItemHover: te,
943
+ onSwimLaneItemDoubleClick: ce,
944
+ onSwimLaneItemContextMenu: P,
945
+ onSwimLaneReorder: q
925
946
  }) => {
926
- const Y = () => Date.now(), L = D ? C.JulianDate.toDate(ge(D)).getTime() : Y() - 432e5, c = k ? C.JulianDate.toDate(ge(k)).getTime() : Y() + 12 * 3600 * 1e3, [J, z] = ve(
927
- () => ge(X ?? D ?? C.JulianDate.fromDate(/* @__PURE__ */ new Date()))
928
- ), [re, W] = ve((u == null ? void 0 : u.shouldAnimate) ?? !1), [F, ce] = ve((u == null ? void 0 : u.multiplier) ?? 1), [le, t] = ve(v ?? !0);
929
- $(() => {
930
- v != null && t(v);
931
- }, [v]);
932
- const l = () => {
933
- const d = !le;
934
- t(d), m == null || m(d);
935
- }, w = V != null && V.length > 0, A = T(null), [te, de] = ve(0);
936
- $(() => {
937
- const d = A.current;
938
- if (!d) return;
939
- const M = new ResizeObserver(([e]) => de(e.borderBoxSize[0].blockSize));
940
- return M.observe(d), () => M.disconnect();
941
- }, [B]);
942
- const ue = w && !le ? `${te + ze}px` : P != null ? `${P}px` : "100%", K = T(!1), i = T(null), me = { ...ot, ...j };
943
- $(() => {
944
- if (!u) return;
945
- const d = () => {
946
- if (!K.current) {
947
- const M = C.JulianDate.clone(u.currentTime);
948
- if (z(M), W(u.shouldAnimate), ce(u.multiplier), i.current) {
949
- const { startMs: e, endMs: n } = i.current.getVisibleRange(), r = n - e, s = C.JulianDate.toDate(M).getTime(), o = s - e;
950
- o <= r * 0.1 ? i.current.zoomTo(s - r * 0.1, s + r * 0.9, s) : o >= r * 0.9 && i.current.zoomTo(s - r * 0.9, s + r * 0.1, s);
947
+ const N = () => Date.now(), b = C ? j.JulianDate.toDate(ge(C)).getTime() : N() - 432e5, i = k ? j.JulianDate.toDate(ge(k)).getTime() : N() + 12 * 3600 * 1e3, [L, S] = ve(
948
+ () => ge(Y ?? C ?? j.JulianDate.fromDate(/* @__PURE__ */ new Date()))
949
+ ), [ne, re] = ve((a == null ? void 0 : a.shouldAnimate) ?? !1), [t, m] = ve((a == null ? void 0 : a.multiplier) ?? 1), [g, M] = ve(l ?? !0);
950
+ X(() => {
951
+ l != null && M(l);
952
+ }, [l]);
953
+ const ue = () => {
954
+ const f = !g;
955
+ M(f), y == null || y(f);
956
+ }, ae = z != null && z.length > 0, E = w(null), [ie, le] = ve(0);
957
+ X(() => {
958
+ const f = E.current;
959
+ if (!f) return;
960
+ const e = new ResizeObserver(([n]) => le(n.borderBoxSize[0].blockSize));
961
+ return e.observe(f), () => e.disconnect();
962
+ }, [W]);
963
+ const de = ae && !g ? `${ie + $e}px` : O != null ? `${O}px` : "100%", p = w(!1), J = w(null), me = { ...it, ...d };
964
+ X(() => {
965
+ if (!a) return;
966
+ const f = () => {
967
+ if (!p.current) {
968
+ const e = j.JulianDate.clone(a.currentTime);
969
+ if (S(e), re(a.shouldAnimate), m(a.multiplier), J.current) {
970
+ const { startMs: n, endMs: o } = J.current.getVisibleRange(), s = o - n, r = j.JulianDate.toDate(e).getTime(), u = r - n;
971
+ u <= s * 0.1 ? J.current.zoomTo(r - s * 0.1, r + s * 0.9, r) : u >= s * 0.9 && J.current.zoomTo(r - s * 0.9, r + s * 0.1, r);
951
972
  }
952
973
  }
953
974
  };
954
- return u.onTick.addEventListener(d), () => {
955
- u.onTick.removeEventListener(d);
975
+ return a.onTick.addEventListener(f), () => {
976
+ a.onTick.removeEventListener(f);
956
977
  };
957
- }, [u]), $(() => {
958
- if (u) return;
959
- const d = setInterval(() => {
960
- if (K.current) return;
961
- const M = C.JulianDate.fromDate(/* @__PURE__ */ new Date());
962
- if (z(M), i.current) {
963
- const { startMs: e, endMs: n } = i.current.getVisibleRange(), r = n - e, s = C.JulianDate.toDate(M).getTime(), o = s - e;
964
- o <= r * 0.1 ? i.current.zoomTo(s - r * 0.1, s + r * 0.9, s) : o >= r * 0.9 && i.current.zoomTo(s - r * 0.9, s + r * 0.1, s);
978
+ }, [a]), X(() => {
979
+ if (a) return;
980
+ const f = setInterval(() => {
981
+ if (p.current) return;
982
+ const e = j.JulianDate.fromDate(/* @__PURE__ */ new Date());
983
+ if (S(e), J.current) {
984
+ const { startMs: n, endMs: o } = J.current.getVisibleRange(), s = o - n, r = j.JulianDate.toDate(e).getTime(), u = r - n;
985
+ u <= s * 0.1 ? J.current.zoomTo(r - s * 0.1, r + s * 0.9, r) : u >= s * 0.9 && J.current.zoomTo(r - s * 0.9, r + s * 0.1, r);
965
986
  }
966
987
  }, 1e3);
967
- return () => clearInterval(d);
968
- }, [u]), $(() => {
969
- if (!Q) return;
970
- const d = ge(Q);
971
- if (se(d), i.current) {
972
- const { startMs: M, endMs: e } = i.current.getVisibleRange(), n = e - M, r = C.JulianDate.toDate(d).getTime();
973
- i.current.zoomTo(r - n / 2, r + n / 2);
988
+ return () => clearInterval(f);
989
+ }, [a]), X(() => {
990
+ if (!Z) return;
991
+ const f = ge(Z);
992
+ if (pe(f), J.current) {
993
+ const { startMs: e, endMs: n } = J.current.getVisibleRange(), o = n - e, s = j.JulianDate.toDate(f).getTime();
994
+ J.current.zoomTo(s - o / 2, s + o / 2);
974
995
  }
975
- }, [Q]);
976
- const ie = (d, M = !0) => {
977
- u && (u.multiplier = d, M && (u.shouldAnimate = !0)), ce(d), M && W(!0), q == null || q(d);
978
- }, se = (d) => {
979
- z(d), u && (u.currentTime = C.JulianDate.clone(d)), b == null || b(d);
980
- }, xe = (d) => {
981
- d && F < 0 && ie(1, !1), u && (u.shouldAnimate = d), W(d), I == null || I(d);
982
- }, he = () => {
983
- const d = G.length > 0 ? G : Xe, M = F > 1 ? F : 1, e = d.indexOf(M), n = d[e < 0 || e === d.length - 1 ? 0 : e + 1];
984
- ie(n);
985
- }, Re = () => {
986
- const d = x.length > 0 ? x : Ye, M = F < 0 ? Math.abs(F) : 0, e = d.indexOf(M), n = -d[e < 0 || e === d.length - 1 ? 0 : e + 1];
987
- ie(n);
988
- }, pe = () => {
989
- var M;
990
- const d = ge(D ?? C.JulianDate.fromDate(new Date(L)));
991
- u && (u.currentTime = C.JulianDate.clone(d)), z(d), (M = i.current) == null || M.zoomTo(L, c);
992
- }, be = () => {
993
- var M;
994
- const d = ge(k ?? C.JulianDate.fromDate(new Date(c)));
995
- u && (u.currentTime = C.JulianDate.clone(d)), z(d), (M = i.current) == null || M.zoomTo(L, c);
996
+ }, [Z]);
997
+ const K = (f, e = !0) => {
998
+ a && (a.multiplier = f, e && (a.shouldAnimate = !0)), m(f), e && re(!0), I == null || I(f);
999
+ }, pe = (f) => {
1000
+ S(f), a && (a.currentTime = j.JulianDate.clone(f)), T == null || T(f);
1001
+ }, he = (f) => {
1002
+ f && t < 0 && K(1, !1), a && (a.shouldAnimate = f), re(f), R == null || R(f);
996
1003
  }, Ce = () => {
1004
+ const f = B.length > 0 ? B : ze, e = t > 1 ? t : 1, n = f.indexOf(e), o = f[n < 0 || n === f.length - 1 ? 0 : n + 1];
1005
+ K(o);
1006
+ }, xe = () => {
1007
+ const f = ee.length > 0 ? ee : We, e = t < 0 ? Math.abs(t) : 0, n = f.indexOf(e), o = -f[n < 0 || n === f.length - 1 ? 0 : n + 1];
1008
+ K(o);
1009
+ }, we = () => {
1010
+ var e;
1011
+ const f = ge(C ?? j.JulianDate.fromDate(new Date(b)));
1012
+ a && (a.currentTime = j.JulianDate.clone(f)), S(f), (e = J.current) == null || e.zoomTo(b, i);
1013
+ }, De = () => {
997
1014
  var e;
998
- const d = C.JulianDate.fromDate(/* @__PURE__ */ new Date());
999
- u && (u.currentTime = C.JulianDate.clone(d)), z(d), ie(1);
1000
- const M = Date.now();
1001
- (e = i.current) == null || e.zoomTo(M - 12 * 3600 * 1e3, M + 12 * 3600 * 1e3);
1002
- }, De = Math.abs(C.JulianDate.toDate(J).getTime() - Date.now()) < 1e4;
1003
- return /* @__PURE__ */ a.jsxs(
1015
+ const f = ge(k ?? j.JulianDate.fromDate(new Date(i)));
1016
+ a && (a.currentTime = j.JulianDate.clone(f)), S(f), (e = J.current) == null || e.zoomTo(b, i);
1017
+ }, _e = () => {
1018
+ var n;
1019
+ const f = j.JulianDate.fromDate(/* @__PURE__ */ new Date());
1020
+ a && (a.currentTime = j.JulianDate.clone(f)), S(f), K(1);
1021
+ const e = Date.now();
1022
+ (n = J.current) == null || n.zoomTo(e - 12 * 3600 * 1e3, e + 12 * 3600 * 1e3);
1023
+ }, je = Math.abs(j.JulianDate.toDate(L).getTime() - Date.now()) < 1e4;
1024
+ return /* @__PURE__ */ c.jsxs(
1004
1025
  "div",
1005
1026
  {
1006
- className: _,
1027
+ className: v,
1007
1028
  style: {
1008
1029
  width: "100%",
1009
- height: ue,
1030
+ height: de,
1010
1031
  overflow: "hidden",
1011
1032
  display: "flex",
1012
1033
  flexDirection: "column",
1013
1034
  fontFamily: "system-ui, -apple-system, sans-serif",
1014
- transition: g === "animated" ? "height 0.2s ease" : void 0
1035
+ transition: _ === "animated" ? "height 0.2s ease" : void 0
1015
1036
  },
1016
1037
  children: [
1017
- B && /* @__PURE__ */ a.jsx("div", { ref: A, children: /* @__PURE__ */ a.jsx(
1018
- mt,
1038
+ W && /* @__PURE__ */ c.jsx("div", { ref: E, children: /* @__PURE__ */ c.jsx(
1039
+ xt,
1019
1040
  {
1020
- currentTime: J,
1021
- isPlaying: re,
1022
- multiplier: F,
1023
- isLive: De,
1024
- hasStartTime: D != null,
1041
+ currentTime: L,
1042
+ isPlaying: ne,
1043
+ multiplier: t,
1044
+ isLive: je,
1045
+ hasStartTime: C != null,
1025
1046
  hasEndTime: k != null,
1026
- onPlayPause: xe,
1027
- onJumpToStart: pe,
1028
- onRewind: Re,
1029
- onFastForward: he,
1030
- onJumpToEnd: be,
1031
- onJumpToLive: Ce,
1032
- onResetSpeed: () => ie(1),
1033
- onDateTimeClick: ne,
1034
- dateTimeFormat: H,
1047
+ showJumpToStart: D,
1048
+ showJumpToEnd: U,
1049
+ onPlayPause: he,
1050
+ onJumpToStart: we,
1051
+ onRewind: xe,
1052
+ onFastForward: Ce,
1053
+ onJumpToEnd: De,
1054
+ onJumpToLive: _e,
1055
+ onResetSpeed: () => K(1),
1056
+ onDateTimeClick: V,
1057
+ dateTimeFormat: oe,
1058
+ timezone: H,
1035
1059
  theme: me,
1036
- swimLanesVisible: w ? le : void 0,
1037
- onToggleSwimLanes: w ? l : void 0
1060
+ swimLanesVisible: ae ? g : void 0,
1061
+ onToggleSwimLanes: ae ? ue : void 0
1038
1062
  }
1039
1063
  ) }),
1040
- R !== !1 && /* @__PURE__ */ a.jsx(
1041
- We,
1064
+ $ !== !1 && /* @__PURE__ */ c.jsx(
1065
+ Be,
1042
1066
  {
1043
- ref: i,
1044
- currentTime: J,
1045
- defaultStartMs: L,
1046
- defaultEndMs: c,
1067
+ ref: J,
1068
+ currentTime: L,
1069
+ defaultStartMs: b,
1070
+ defaultEndMs: i,
1047
1071
  theme: me,
1048
- maxTicks: ee,
1049
- onTimeChange: se,
1072
+ maxTicks: Q,
1073
+ timezone: H,
1074
+ onTimeChange: pe,
1050
1075
  onDragStart: () => {
1051
- K.current = !0;
1076
+ p.current = !0;
1052
1077
  },
1053
1078
  onDragEnd: () => {
1054
- K.current = !1;
1079
+ p.current = !1;
1055
1080
  },
1056
- swimLanes: V,
1057
- showSwimLanes: le,
1058
- onSwimLaneItemClick: y,
1059
- onSwimLaneItemHover: E,
1060
- onSwimLaneItemDoubleClick: ae,
1061
- onSwimLaneItemContextMenu: N,
1062
- onSwimLaneReorder: U
1081
+ swimLanes: z,
1082
+ showSwimLanes: g,
1083
+ onSwimLaneItemClick: A,
1084
+ onSwimLaneItemHover: te,
1085
+ onSwimLaneItemDoubleClick: ce,
1086
+ onSwimLaneItemContextMenu: P,
1087
+ onSwimLaneReorder: q
1063
1088
  }
1064
1089
  )
1065
1090
  ]
1066
1091
  }
1067
1092
  );
1068
- }, gt = ({
1069
- startTime: D,
1093
+ }, wt = ({
1094
+ startTime: C,
1070
1095
  endTime: k,
1071
- currentTime: X,
1072
- width: u,
1073
- height: b,
1074
- tickInterval: I,
1075
- showLabels: q,
1076
- snapToTicks: P,
1077
- enableDrag: B,
1078
- theme: R,
1079
- onTimeChange: H,
1080
- onVisibleRangeChange: ne,
1081
- onDragStart: Q,
1082
- onDragEnd: ee
1096
+ currentTime: Y,
1097
+ width: a,
1098
+ height: T,
1099
+ tickInterval: R,
1100
+ showLabels: I,
1101
+ snapToTicks: O,
1102
+ enableDrag: W,
1103
+ theme: D,
1104
+ onTimeChange: U,
1105
+ onVisibleRangeChange: $,
1106
+ onDragStart: oe,
1107
+ onDragEnd: V
1083
1108
  }) => {
1084
- const G = Se(
1085
- () => st(D, k, I, u),
1086
- [D, k, I, u]
1087
- ), x = Se(
1088
- () => ct(X, D, k, u),
1089
- [X, D, k, u]
1090
- ), j = T(null), _ = (v) => {
1091
- if (!B) return;
1092
- const m = v.currentTarget.getBoundingClientRect(), g = v.clientX - m.left, y = Math.max(0, Math.min(u, g));
1093
- if (!(Math.abs(y - x) <= 10)) {
1094
- let W = y;
1095
- P && (W = it(y, G, 10));
1096
- const F = new Date(D).getTime(), ce = new Date(k).getTime();
1097
- H(C.JulianDate.fromDate(new Date(F + W / u * (ce - F))));
1109
+ const Z = Le(
1110
+ () => ut(C, k, R, a),
1111
+ [C, k, R, a]
1112
+ ), Q = Le(
1113
+ () => at(Y, C, k, a),
1114
+ [Y, C, k, a]
1115
+ ), B = w(null), ee = (v) => {
1116
+ if (!W) return;
1117
+ const H = v.currentTarget.getBoundingClientRect(), z = v.clientX - H.left, l = Math.max(0, Math.min(a, z));
1118
+ if (!(Math.abs(l - Q) <= 10)) {
1119
+ let L = l;
1120
+ O && (L = lt(l, Z, 10));
1121
+ const S = new Date(C).getTime(), ne = new Date(k).getTime();
1122
+ U(j.JulianDate.fromDate(new Date(S + L / a * (ne - S))));
1098
1123
  return;
1099
1124
  }
1100
- Q == null || Q();
1101
- const ae = v.clientX, N = new Date(X).getTime(), U = new Date(D).getTime(), L = (new Date(k).getTime() - U) / u;
1102
- let c = 0, J = !1;
1103
- const z = (W) => {
1104
- c = W.clientX - ae, J = !0, j.current || (j.current = requestAnimationFrame(() => {
1105
- if (J) {
1106
- const F = N + c * L;
1107
- H(C.JulianDate.fromDate(new Date(F))), J = !1;
1125
+ oe == null || oe();
1126
+ const _ = v.clientX, A = new Date(Y).getTime(), te = new Date(C).getTime(), P = (new Date(k).getTime() - te) / a;
1127
+ let q = 0, N = !1;
1128
+ const b = (L) => {
1129
+ q = L.clientX - _, N = !0, B.current || (B.current = requestAnimationFrame(() => {
1130
+ if (N) {
1131
+ const S = A + q * P;
1132
+ U(j.JulianDate.fromDate(new Date(S))), N = !1;
1108
1133
  }
1109
- j.current = null;
1134
+ B.current = null;
1110
1135
  }));
1111
- }, re = () => {
1112
- document.removeEventListener("mousemove", z), document.removeEventListener("mouseup", re), j.current !== null && (cancelAnimationFrame(j.current), j.current = null), ee == null || ee();
1136
+ }, i = () => {
1137
+ document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", i), B.current !== null && (cancelAnimationFrame(B.current), B.current = null), V == null || V();
1113
1138
  };
1114
- document.addEventListener("mousemove", z), document.addEventListener("mouseup", re);
1115
- }, V = (v) => {
1139
+ document.addEventListener("mousemove", b), document.addEventListener("mouseup", i);
1140
+ }, d = (v) => {
1116
1141
  v.preventDefault();
1117
- const m = v.shiftKey ? v.deltaY : v.deltaX !== 0 ? v.deltaX : v.deltaY;
1118
- if (Math.abs(m) < 1) return;
1119
- const g = new Date(D).getTime(), y = new Date(k).getTime(), E = m / u * (y - g) * 0.5;
1120
- ne == null || ne(
1121
- C.JulianDate.fromDate(new Date(g + E)),
1122
- C.JulianDate.fromDate(new Date(y + E))
1142
+ const H = v.shiftKey ? v.deltaY : v.deltaX !== 0 ? v.deltaX : v.deltaY;
1143
+ if (Math.abs(H) < 1) return;
1144
+ const z = new Date(C).getTime(), l = new Date(k).getTime(), y = H / a * (l - z) * 0.5;
1145
+ $ == null || $(
1146
+ j.JulianDate.fromDate(new Date(z + y)),
1147
+ j.JulianDate.fromDate(new Date(l + y))
1123
1148
  );
1124
1149
  };
1125
- return /* @__PURE__ */ a.jsxs(
1150
+ return /* @__PURE__ */ c.jsxs(
1126
1151
  "svg",
1127
1152
  {
1128
1153
  width: "100%",
1129
- height: b,
1130
- style: { backgroundColor: R.backgroundColor, display: "block", cursor: "default" },
1131
- onMouseDown: _,
1132
- onWheel: V,
1154
+ height: T,
1155
+ style: { backgroundColor: D.backgroundColor, display: "block", cursor: "default" },
1156
+ onMouseDown: ee,
1157
+ onWheel: d,
1133
1158
  children: [
1134
- /* @__PURE__ */ a.jsx("rect", { width: u, height: b, fill: R.backgroundColor }),
1135
- G.map((v, m) => /* @__PURE__ */ a.jsxs("g", { children: [
1136
- /* @__PURE__ */ a.jsx(
1159
+ /* @__PURE__ */ c.jsx("rect", { width: a, height: T, fill: D.backgroundColor }),
1160
+ Z.map((v, H) => /* @__PURE__ */ c.jsxs("g", { children: [
1161
+ /* @__PURE__ */ c.jsx(
1137
1162
  "line",
1138
1163
  {
1139
1164
  x1: v.position,
1140
- y1: b - (v.isMajor ? R.majorTickHeight : R.minorTickHeight),
1165
+ y1: T - (v.isMajor ? D.majorTickHeight : D.minorTickHeight),
1141
1166
  x2: v.position,
1142
- y2: b,
1143
- stroke: v.isMajor ? R.majorTickColor : R.tickColor,
1167
+ y2: T,
1168
+ stroke: v.isMajor ? D.majorTickColor : D.tickColor,
1144
1169
  strokeWidth: "1"
1145
1170
  }
1146
1171
  ),
1147
- q && v.isMajor && v.label && /* @__PURE__ */ a.jsx(
1172
+ I && v.isMajor && v.label && /* @__PURE__ */ c.jsx(
1148
1173
  "text",
1149
1174
  {
1150
1175
  x: v.position,
1151
- y: b - R.majorTickHeight - 5,
1176
+ y: T - D.majorTickHeight - 5,
1152
1177
  textAnchor: "middle",
1153
- fill: R.labelColor,
1154
- fontSize: R.fontSize,
1178
+ fill: D.labelColor,
1179
+ fontSize: D.fontSize,
1155
1180
  fontFamily: "monospace",
1156
1181
  children: v.label
1157
1182
  }
1158
1183
  )
1159
- ] }, m)),
1160
- /* @__PURE__ */ a.jsx(
1184
+ ] }, H)),
1185
+ /* @__PURE__ */ c.jsx(
1161
1186
  "line",
1162
1187
  {
1163
- x1: x,
1188
+ x1: Q,
1164
1189
  y1: 0,
1165
- x2: x,
1166
- y2: b,
1167
- stroke: R.indicatorColor,
1168
- strokeWidth: R.indicatorLineWidth,
1190
+ x2: Q,
1191
+ y2: T,
1192
+ stroke: D.indicatorColor,
1193
+ strokeWidth: D.indicatorLineWidth,
1169
1194
  pointerEvents: "none"
1170
1195
  }
1171
1196
  ),
1172
- B && /* @__PURE__ */ a.jsx(
1197
+ W && /* @__PURE__ */ c.jsx(
1173
1198
  "rect",
1174
1199
  {
1175
- x: Math.max(0, x - 10),
1200
+ x: Math.max(0, Q - 10),
1176
1201
  y: 0,
1177
1202
  width: 20,
1178
- height: b,
1203
+ height: T,
1179
1204
  fill: "transparent",
1180
1205
  style: { cursor: "ew-resize" },
1181
1206
  pointerEvents: "visiblePainted"
1182
1207
  }
1183
1208
  ),
1184
- /* @__PURE__ */ a.jsx("circle", { cx: x, cy: 5, r: 4, fill: R.indicatorColor, pointerEvents: "none" })
1209
+ /* @__PURE__ */ c.jsx("circle", { cx: Q, cy: 5, r: 4, fill: D.indicatorColor, pointerEvents: "none" })
1185
1210
  ]
1186
1211
  }
1187
1212
  );
1188
1213
  };
1189
1214
  export {
1190
- Tt as TICK_AREA_HEIGHT,
1191
- xt as Timeline,
1192
- We as TimelineCanvas,
1193
- mt as TimelineControls,
1194
- gt as TimelineSVG
1215
+ Mt as TICK_AREA_HEIGHT,
1216
+ bt as Timeline,
1217
+ Be as TimelineCanvas,
1218
+ xt as TimelineControls,
1219
+ wt as TimelineSVG
1195
1220
  };