@vidispine/vdt-react-timeline 23.3.0-pre.1 → 23.3.0-pre.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,140 +1,136 @@
1
- import { jsx as D, jsxs as te, Fragment as Fe } from "react/jsx-runtime";
2
- import { useState as re, useRef as U, createContext as Je, useMemo as We, useContext as Ke, useEffect as le, memo as Qe, Children as oe, cloneElement as Le } from "react";
1
+ import { jsx as D, jsxs as te, Fragment as Ze } from "react/jsx-runtime";
2
+ import { useState as re, useRef as U, createContext as Je, useMemo as We, useContext as Ke, useEffect as le, memo as Qe, Children as oe, cloneElement as _e } from "react";
3
3
  import ne from "lodash.clamp";
4
- import F from "clsx";
5
- import _e from "react-is";
6
- import { Rect as ee, Stage as ue, Layer as de, Group as Pe, Text as et, Line as tt } from "react-konva";
4
+ import Z from "clsx";
5
+ import Le from "react-is";
6
+ import { Rect as ee, Stage as ue, Layer as fe, Group as Oe, Text as et, Line as tt } from "react-konva";
7
7
  import rt from "lodash.sortby";
8
8
  import nt from "lodash.uniq";
9
- const M = (r, i, s, n, l) => r + (l - s) * (i - r) / (n - s), we = (r, i, s) => {
10
- process.env.NODE_ENV === "development" && console[s](`${r ? `${r}: ` : ""}${i}`);
9
+ const N = (t, i, s, n, l) => t + (l - s) * (i - t) / (n - s), xe = (t, i, s) => {
10
+ process.env.NODE_ENV === "development" && console[s](`${t ? `${t}: ` : ""}${i}`);
11
11
  }, J = {
12
- error: (...r) => we(...r, "error"),
13
- warn: (...r) => we(...r, "warn")
12
+ error: (...t) => xe(...t, "error"),
13
+ warn: (...t) => xe(...t, "warn")
14
14
  };
15
- function it(r, i) {
15
+ function it(t, i) {
16
16
  const s = [];
17
- for (let n = 0; n < r.length - 1; n += 1)
18
- s.push(i(r[n], r[n + 1]));
17
+ for (let n = 0; n < t.length - 1; n += 1)
18
+ s.push(i(t[n], t[n + 1]));
19
19
  return s;
20
20
  }
21
- function ae(...r) {
21
+ function ae(...t) {
22
22
  const i = getComputedStyle(document.body);
23
- return r.map((s) => i.getPropertyValue(s));
23
+ return t.map((s) => i.getPropertyValue(s));
24
24
  }
25
25
  function ot({
26
- uncontrolledDefaultState: r = void 0,
26
+ uncontrolledDefaultState: t = void 0,
27
27
  uncontrolledOnChange: i = void 0,
28
28
  controlledState: s = void 0,
29
29
  controlledOnChange: n = void 0,
30
30
  componentName: l,
31
31
  stateName: o
32
32
  }) {
33
- const [f, d] = re(r), y = U(null), h = (a) => {
34
- y.current !== null && y.current !== a && (a ? J.warn(l, `${o} changed from uncontrolled to controlled`) : J.warn(l, `${o} changed from controlled to uncontrolled`)), y.current = a;
33
+ const [d, f] = re(t), m = U(null), h = (a) => {
34
+ m.current !== null && m.current !== a && (a ? J.warn(l, `${o} changed from uncontrolled to controlled`) : J.warn(l, `${o} changed from controlled to uncontrolled`)), m.current = a;
35
35
  };
36
36
  return s !== void 0 ? (h(!0), [s, n]) : (h(!1), [
37
- f,
37
+ d,
38
38
  n ? (...a) => {
39
- i ? i(d, ...a) : d(...a), n(...a);
40
- } : i || d
39
+ i ? i(f, ...a) : f(...a), n(...a);
40
+ } : i || f
41
41
  ]);
42
42
  }
43
- function st(r, i, s) {
44
- const n = s.end - s.start < 100 && r === "in" ? 1 : 2;
45
- return r === "in" ? 1 / n : n;
43
+ function st(t, i, s) {
44
+ const n = s.end - s.start < 100 && t === "in" ? 1 : 2;
45
+ return t === "in" ? 1 / n : n;
46
46
  }
47
47
  function at({
48
- start: r,
48
+ start: t,
49
49
  end: i,
50
50
  defaultPerspective: s,
51
51
  perspective: n,
52
52
  onChangePerspective: l,
53
53
  zoomMultiplier: o = st
54
54
  }) {
55
- const [f, d] = ot({
55
+ const [d, f] = ot({
56
56
  uncontrolledDefaultState: s || {
57
- start: r,
57
+ start: t,
58
58
  end: i
59
59
  },
60
60
  controlledState: n,
61
61
  controlledOnChange: l,
62
62
  componentName: "VdtTimeline",
63
63
  stateName: "perspective"
64
- }), y = typeof o == "function" ? o : (c) => c === "in" ? 1 / o : o, h = (c, p) => {
65
- d({
66
- start: ne(Number(c), r, i),
67
- end: ne(Number(p), r, i)
64
+ }), m = typeof o == "function" ? o : (c) => c === "in" ? 1 / o : o, h = (c, p) => {
65
+ f({
66
+ start: ne(Number(c), t, i),
67
+ end: ne(Number(p), t, i)
68
68
  });
69
69
  };
70
70
  return {
71
- perspective: f,
71
+ perspective: d,
72
72
  setPerspective: h,
73
73
  zoom: (c, p) => {
74
- const b = f.end - f.start, E = (p - f.start) / b, g = y(c, p, f);
74
+ const b = d.end - d.start, E = (p - d.start) / b, g = m(c, p, d);
75
75
  if (g === 1)
76
76
  return;
77
- const w = (f.end - f.start) * g, W = p - E * w, V = p + (1 - E) * w, N = (() => r > W ? r - W : V > i ? i - V : 0)();
77
+ const w = (d.end - d.start) * g, W = p - E * w, V = p + (1 - E) * w, M = (() => t > W ? t - W : V > i ? i - V : 0)();
78
78
  h(
79
- W + N,
80
- V + N
79
+ W + M,
80
+ V + M
81
81
  );
82
82
  }
83
83
  };
84
84
  }
85
85
  const Ve = Je();
86
86
  function ct({
87
- start: r,
87
+ start: t,
88
88
  end: i,
89
89
  time: s,
90
90
  onChangeTime: n,
91
91
  timelineRef: l,
92
92
  children: o,
93
- perspective: f,
94
- onChangePerspective: d,
95
- defaultPerspective: y
93
+ perspective: d,
94
+ onChangePerspective: f,
95
+ defaultPerspective: m
96
96
  }) {
97
97
  const h = at({
98
- start: r,
98
+ start: t,
99
99
  end: i,
100
- perspective: f,
101
- onChangePerspective: d,
102
- defaultPerspective: y
100
+ perspective: d,
101
+ onChangePerspective: f,
102
+ defaultPerspective: m
103
103
  }), a = We(
104
104
  () => ({
105
105
  ...h,
106
- start: r,
106
+ start: t,
107
107
  end: i,
108
108
  time: s,
109
109
  onChangeTime: n,
110
110
  timelineRef: l
111
111
  }),
112
- [i, n, r, s, h, l]
112
+ [i, n, t, s, h, l]
113
113
  );
114
114
  return /* @__PURE__ */ D(Ve.Provider, { value: a, children: o });
115
115
  }
116
116
  function ie() {
117
117
  return Ke(Ve);
118
118
  }
119
- var e = {}, xe = {
120
- get exports() {
121
- return e;
122
- },
123
- set exports(r) {
124
- e = r;
125
- }
126
- };
119
+ function lt(t) {
120
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
121
+ }
122
+ var Pe = { exports: {} };
127
123
  /*
128
124
  object-assign
129
125
  (c) Sindre Sorhus
130
126
  @license MIT
131
127
  */
132
128
  var ve, Re;
133
- function lt() {
129
+ function ut() {
134
130
  if (Re)
135
131
  return ve;
136
132
  Re = 1;
137
- var r = Object.getOwnPropertySymbols, i = Object.prototype.hasOwnProperty, s = Object.prototype.propertyIsEnumerable;
133
+ var t = Object.getOwnPropertySymbols, i = Object.prototype.hasOwnProperty, s = Object.prototype.propertyIsEnumerable;
138
134
  function n(o) {
139
135
  if (o == null)
140
136
  throw new TypeError("Object.assign cannot be called with null or undefined");
@@ -147,12 +143,12 @@ function lt() {
147
143
  var o = new String("abc");
148
144
  if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
149
145
  return !1;
150
- for (var f = {}, d = 0; d < 10; d++)
151
- f["_" + String.fromCharCode(d)] = d;
152
- var y = Object.getOwnPropertyNames(f).map(function(a) {
153
- return f[a];
146
+ for (var d = {}, f = 0; f < 10; f++)
147
+ d["_" + String.fromCharCode(f)] = f;
148
+ var m = Object.getOwnPropertyNames(d).map(function(a) {
149
+ return d[a];
154
150
  });
155
- if (y.join("") !== "0123456789")
151
+ if (m.join("") !== "0123456789")
156
152
  return !1;
157
153
  var h = {};
158
154
  return "abcdefghijklmnopqrst".split("").forEach(function(a) {
@@ -162,51 +158,51 @@ function lt() {
162
158
  return !1;
163
159
  }
164
160
  }
165
- return ve = l() ? Object.assign : function(o, f) {
166
- for (var d, y = n(o), h, a = 1; a < arguments.length; a++) {
167
- d = Object(arguments[a]);
168
- for (var c in d)
169
- i.call(d, c) && (y[c] = d[c]);
170
- if (r) {
171
- h = r(d);
161
+ return ve = l() ? Object.assign : function(o, d) {
162
+ for (var f, m = n(o), h, a = 1; a < arguments.length; a++) {
163
+ f = Object(arguments[a]);
164
+ for (var c in f)
165
+ i.call(f, c) && (m[c] = f[c]);
166
+ if (t) {
167
+ h = t(f);
172
168
  for (var p = 0; p < h.length; p++)
173
- s.call(d, h[p]) && (y[h[p]] = d[h[p]]);
169
+ s.call(f, h[p]) && (m[h[p]] = f[h[p]]);
174
170
  }
175
171
  }
176
- return y;
172
+ return m;
177
173
  }, ve;
178
174
  }
179
- var he, ke;
180
- function Oe() {
181
- if (ke)
175
+ var he, je;
176
+ function Ee() {
177
+ if (je)
182
178
  return he;
183
- ke = 1;
184
- var r = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
185
- return he = r, he;
179
+ je = 1;
180
+ var t = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
181
+ return he = t, he;
186
182
  }
187
- var me, je;
188
- function Ne() {
189
- return je || (je = 1, me = Function.call.bind(Object.prototype.hasOwnProperty)), me;
183
+ var ye, ke;
184
+ function Me() {
185
+ return ke || (ke = 1, ye = Function.call.bind(Object.prototype.hasOwnProperty)), ye;
190
186
  }
191
- var ye, Ae;
192
- function ut() {
193
- if (Ae)
194
- return ye;
195
- Ae = 1;
196
- var r = function() {
187
+ var me, Ce;
188
+ function ft() {
189
+ if (Ce)
190
+ return me;
191
+ Ce = 1;
192
+ var t = function() {
197
193
  };
198
194
  if (process.env.NODE_ENV !== "production") {
199
- var i = Oe(), s = {}, n = Ne();
200
- r = function(o) {
201
- var f = "Warning: " + o;
202
- typeof console < "u" && console.error(f);
195
+ var i = Ee(), s = {}, n = Me();
196
+ t = function(o) {
197
+ var d = "Warning: " + o;
198
+ typeof console < "u" && console.error(d);
203
199
  try {
204
- throw new Error(f);
200
+ throw new Error(d);
205
201
  } catch {
206
202
  }
207
203
  };
208
204
  }
209
- function l(o, f, d, y, h) {
205
+ function l(o, d, f, m, h) {
210
206
  if (process.env.NODE_ENV !== "production") {
211
207
  for (var a in o)
212
208
  if (n(o, a)) {
@@ -214,21 +210,21 @@ function ut() {
214
210
  try {
215
211
  if (typeof o[a] != "function") {
216
212
  var p = Error(
217
- (y || "React class") + ": " + d + " type `" + a + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[a] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
213
+ (m || "React class") + ": " + f + " type `" + a + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[a] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
218
214
  );
219
215
  throw p.name = "Invariant Violation", p;
220
216
  }
221
- c = o[a](f, a, y, d, null, i);
217
+ c = o[a](d, a, m, f, null, i);
222
218
  } catch (E) {
223
219
  c = E;
224
220
  }
225
- if (c && !(c instanceof Error) && r(
226
- (y || "React class") + ": type specification of " + d + " `" + a + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof c + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
221
+ if (c && !(c instanceof Error) && t(
222
+ (m || "React class") + ": type specification of " + f + " `" + a + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof c + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
227
223
  ), c instanceof Error && !(c.message in s)) {
228
224
  s[c.message] = !0;
229
225
  var b = h ? h() : "";
230
- r(
231
- "Failed " + d + " type: " + c.message + (b ?? "")
226
+ t(
227
+ "Failed " + f + " type: " + c.message + (b ?? "")
232
228
  );
233
229
  }
234
230
  }
@@ -236,30 +232,30 @@ function ut() {
236
232
  }
237
233
  return l.resetWarningCache = function() {
238
234
  process.env.NODE_ENV !== "production" && (s = {});
239
- }, ye = l, ye;
235
+ }, me = l, me;
240
236
  }
241
- var ge, Ce;
237
+ var ge, Ae;
242
238
  function dt() {
243
- if (Ce)
239
+ if (Ae)
244
240
  return ge;
245
- Ce = 1;
246
- var r = _e, i = lt(), s = Oe(), n = Ne(), l = ut(), o = function() {
241
+ Ae = 1;
242
+ var t = Le, i = ut(), s = Ee(), n = Me(), l = ft(), o = function() {
247
243
  };
248
- process.env.NODE_ENV !== "production" && (o = function(d) {
249
- var y = "Warning: " + d;
250
- typeof console < "u" && console.error(y);
244
+ process.env.NODE_ENV !== "production" && (o = function(f) {
245
+ var m = "Warning: " + f;
246
+ typeof console < "u" && console.error(m);
251
247
  try {
252
- throw new Error(y);
248
+ throw new Error(m);
253
249
  } catch {
254
250
  }
255
251
  });
256
- function f() {
252
+ function d() {
257
253
  return null;
258
254
  }
259
- return ge = function(d, y) {
255
+ return ge = function(f, m) {
260
256
  var h = typeof Symbol == "function" && Symbol.iterator, a = "@@iterator";
261
- function c(t) {
262
- var u = t && (h && t[h] || t[a]);
257
+ function c(r) {
258
+ var u = r && (h && r[h] || r[a]);
263
259
  if (typeof u == "function")
264
260
  return u;
265
261
  }
@@ -273,30 +269,30 @@ function dt() {
273
269
  string: W("string"),
274
270
  symbol: W("symbol"),
275
271
  any: V(),
276
- arrayOf: N,
272
+ arrayOf: M,
277
273
  element: I(),
278
274
  elementType: x(),
279
275
  instanceOf: $,
280
- node: _(),
281
- objectOf: L,
276
+ node: L(),
277
+ objectOf: _,
282
278
  oneOf: H,
283
- oneOfType: C,
284
- shape: Z,
285
- exact: j
279
+ oneOfType: A,
280
+ shape: F,
281
+ exact: k
286
282
  };
287
- function E(t, u) {
288
- return t === u ? t !== 0 || 1 / t === 1 / u : t !== t && u !== u;
283
+ function E(r, u) {
284
+ return r === u ? r !== 0 || 1 / r === 1 / u : r !== r && u !== u;
289
285
  }
290
- function g(t, u) {
291
- this.message = t, this.data = u && typeof u == "object" ? u : {}, this.stack = "";
286
+ function g(r, u) {
287
+ this.message = r, this.data = u && typeof u == "object" ? u : {}, this.stack = "";
292
288
  }
293
289
  g.prototype = Error.prototype;
294
- function w(t) {
290
+ function w(r) {
295
291
  if (process.env.NODE_ENV !== "production")
296
292
  var u = {}, R = 0;
297
- function T(A, O, S, v, m, k, G) {
298
- if (v = v || p, k = k || S, G !== s) {
299
- if (y) {
293
+ function T(C, O, S, v, y, j, G) {
294
+ if (v = v || p, j = j || S, G !== s) {
295
+ if (m) {
300
296
  var z = new Error(
301
297
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
302
298
  );
@@ -305,23 +301,23 @@ function dt() {
305
301
  var Q = v + ":" + S;
306
302
  !u[Q] && // Avoid spamming the console because they are often not actionable except for lib authors
307
303
  R < 3 && (o(
308
- "You are manually calling a React.PropTypes validation function for the `" + k + "` prop on `" + v + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
304
+ "You are manually calling a React.PropTypes validation function for the `" + j + "` prop on `" + v + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
309
305
  ), u[Q] = !0, R++);
310
306
  }
311
307
  }
312
- return O[S] == null ? A ? O[S] === null ? new g("The " + m + " `" + k + "` is marked as required " + ("in `" + v + "`, but its value is `null`.")) : new g("The " + m + " `" + k + "` is marked as required in " + ("`" + v + "`, but its value is `undefined`.")) : null : t(O, S, v, m, k);
308
+ return O[S] == null ? C ? O[S] === null ? new g("The " + y + " `" + j + "` is marked as required " + ("in `" + v + "`, but its value is `null`.")) : new g("The " + y + " `" + j + "` is marked as required in " + ("`" + v + "`, but its value is `undefined`.")) : null : r(O, S, v, y, j);
313
309
  }
314
310
  var P = T.bind(null, !1);
315
311
  return P.isRequired = T.bind(null, !0), P;
316
312
  }
317
- function W(t) {
318
- function u(R, T, P, A, O, S) {
319
- var v = R[T], m = X(v);
320
- if (m !== t) {
321
- var k = K(v);
313
+ function W(r) {
314
+ function u(R, T, P, C, O, S) {
315
+ var v = R[T], y = X(v);
316
+ if (y !== r) {
317
+ var j = K(v);
322
318
  return new g(
323
- "Invalid " + A + " `" + O + "` of type " + ("`" + k + "` supplied to `" + P + "`, expected ") + ("`" + t + "`."),
324
- { expectedType: t }
319
+ "Invalid " + C + " `" + O + "` of type " + ("`" + j + "` supplied to `" + P + "`, expected ") + ("`" + r + "`."),
320
+ { expectedType: r }
325
321
  );
326
322
  }
327
323
  return null;
@@ -329,135 +325,135 @@ function dt() {
329
325
  return w(u);
330
326
  }
331
327
  function V() {
332
- return w(f);
328
+ return w(d);
333
329
  }
334
- function N(t) {
335
- function u(R, T, P, A, O) {
336
- if (typeof t != "function")
330
+ function M(r) {
331
+ function u(R, T, P, C, O) {
332
+ if (typeof r != "function")
337
333
  return new g("Property `" + O + "` of component `" + P + "` has invalid PropType notation inside arrayOf.");
338
334
  var S = R[T];
339
335
  if (!Array.isArray(S)) {
340
336
  var v = X(S);
341
- return new g("Invalid " + A + " `" + O + "` of type " + ("`" + v + "` supplied to `" + P + "`, expected an array."));
337
+ return new g("Invalid " + C + " `" + O + "` of type " + ("`" + v + "` supplied to `" + P + "`, expected an array."));
342
338
  }
343
- for (var m = 0; m < S.length; m++) {
344
- var k = t(S, m, P, A, O + "[" + m + "]", s);
345
- if (k instanceof Error)
346
- return k;
339
+ for (var y = 0; y < S.length; y++) {
340
+ var j = r(S, y, P, C, O + "[" + y + "]", s);
341
+ if (j instanceof Error)
342
+ return j;
347
343
  }
348
344
  return null;
349
345
  }
350
346
  return w(u);
351
347
  }
352
348
  function I() {
353
- function t(u, R, T, P, A) {
349
+ function r(u, R, T, P, C) {
354
350
  var O = u[R];
355
- if (!d(O)) {
351
+ if (!f(O)) {
356
352
  var S = X(O);
357
- return new g("Invalid " + P + " `" + A + "` of type " + ("`" + S + "` supplied to `" + T + "`, expected a single ReactElement."));
353
+ return new g("Invalid " + P + " `" + C + "` of type " + ("`" + S + "` supplied to `" + T + "`, expected a single ReactElement."));
358
354
  }
359
355
  return null;
360
356
  }
361
- return w(t);
357
+ return w(r);
362
358
  }
363
359
  function x() {
364
- function t(u, R, T, P, A) {
360
+ function r(u, R, T, P, C) {
365
361
  var O = u[R];
366
- if (!r.isValidElementType(O)) {
362
+ if (!t.isValidElementType(O)) {
367
363
  var S = X(O);
368
- return new g("Invalid " + P + " `" + A + "` of type " + ("`" + S + "` supplied to `" + T + "`, expected a single ReactElement type."));
364
+ return new g("Invalid " + P + " `" + C + "` of type " + ("`" + S + "` supplied to `" + T + "`, expected a single ReactElement type."));
369
365
  }
370
366
  return null;
371
367
  }
372
- return w(t);
368
+ return w(r);
373
369
  }
374
- function $(t) {
375
- function u(R, T, P, A, O) {
376
- if (!(R[T] instanceof t)) {
377
- var S = t.name || p, v = pe(R[T]);
378
- return new g("Invalid " + A + " `" + O + "` of type " + ("`" + v + "` supplied to `" + P + "`, expected ") + ("instance of `" + S + "`."));
370
+ function $(r) {
371
+ function u(R, T, P, C, O) {
372
+ if (!(R[T] instanceof r)) {
373
+ var S = r.name || p, v = pe(R[T]);
374
+ return new g("Invalid " + C + " `" + O + "` of type " + ("`" + v + "` supplied to `" + P + "`, expected ") + ("instance of `" + S + "`."));
379
375
  }
380
376
  return null;
381
377
  }
382
378
  return w(u);
383
379
  }
384
- function H(t) {
385
- if (!Array.isArray(t))
380
+ function H(r) {
381
+ if (!Array.isArray(r))
386
382
  return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
387
383
  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
388
- ) : o("Invalid argument supplied to oneOf, expected an array.")), f;
389
- function u(R, T, P, A, O) {
390
- for (var S = R[T], v = 0; v < t.length; v++)
391
- if (E(S, t[v]))
384
+ ) : o("Invalid argument supplied to oneOf, expected an array.")), d;
385
+ function u(R, T, P, C, O) {
386
+ for (var S = R[T], v = 0; v < r.length; v++)
387
+ if (E(S, r[v]))
392
388
  return null;
393
- var m = JSON.stringify(t, function(G, z) {
389
+ var y = JSON.stringify(r, function(G, z) {
394
390
  var Q = K(z);
395
391
  return Q === "symbol" ? String(z) : z;
396
392
  });
397
- return new g("Invalid " + A + " `" + O + "` of value `" + String(S) + "` " + ("supplied to `" + P + "`, expected one of " + m + "."));
393
+ return new g("Invalid " + C + " `" + O + "` of value `" + String(S) + "` " + ("supplied to `" + P + "`, expected one of " + y + "."));
398
394
  }
399
395
  return w(u);
400
396
  }
401
- function L(t) {
402
- function u(R, T, P, A, O) {
403
- if (typeof t != "function")
397
+ function _(r) {
398
+ function u(R, T, P, C, O) {
399
+ if (typeof r != "function")
404
400
  return new g("Property `" + O + "` of component `" + P + "` has invalid PropType notation inside objectOf.");
405
401
  var S = R[T], v = X(S);
406
402
  if (v !== "object")
407
- return new g("Invalid " + A + " `" + O + "` of type " + ("`" + v + "` supplied to `" + P + "`, expected an object."));
408
- for (var m in S)
409
- if (n(S, m)) {
410
- var k = t(S, m, P, A, O + "." + m, s);
411
- if (k instanceof Error)
412
- return k;
403
+ return new g("Invalid " + C + " `" + O + "` of type " + ("`" + v + "` supplied to `" + P + "`, expected an object."));
404
+ for (var y in S)
405
+ if (n(S, y)) {
406
+ var j = r(S, y, P, C, O + "." + y, s);
407
+ if (j instanceof Error)
408
+ return j;
413
409
  }
414
410
  return null;
415
411
  }
416
412
  return w(u);
417
413
  }
418
- function C(t) {
419
- if (!Array.isArray(t))
420
- return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), f;
421
- for (var u = 0; u < t.length; u++) {
422
- var R = t[u];
414
+ function A(r) {
415
+ if (!Array.isArray(r))
416
+ return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), d;
417
+ for (var u = 0; u < r.length; u++) {
418
+ var R = r[u];
423
419
  if (typeof R != "function")
424
420
  return o(
425
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + fe(R) + " at index " + u + "."
426
- ), f;
421
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + de(R) + " at index " + u + "."
422
+ ), d;
427
423
  }
428
- function T(P, A, O, S, v) {
429
- for (var m = [], k = 0; k < t.length; k++) {
430
- var G = t[k], z = G(P, A, O, S, v, s);
424
+ function T(P, C, O, S, v) {
425
+ for (var y = [], j = 0; j < r.length; j++) {
426
+ var G = r[j], z = G(P, C, O, S, v, s);
431
427
  if (z == null)
432
428
  return null;
433
- z.data && n(z.data, "expectedType") && m.push(z.data.expectedType);
429
+ z.data && n(z.data, "expectedType") && y.push(z.data.expectedType);
434
430
  }
435
- var Q = m.length > 0 ? ", expected one of type [" + m.join(", ") + "]" : "";
431
+ var Q = y.length > 0 ? ", expected one of type [" + y.join(", ") + "]" : "";
436
432
  return new g("Invalid " + S + " `" + v + "` supplied to " + ("`" + O + "`" + Q + "."));
437
433
  }
438
434
  return w(T);
439
435
  }
440
- function _() {
441
- function t(u, R, T, P, A) {
442
- return q(u[R]) ? null : new g("Invalid " + P + " `" + A + "` supplied to " + ("`" + T + "`, expected a ReactNode."));
436
+ function L() {
437
+ function r(u, R, T, P, C) {
438
+ return q(u[R]) ? null : new g("Invalid " + P + " `" + C + "` supplied to " + ("`" + T + "`, expected a ReactNode."));
443
439
  }
444
- return w(t);
440
+ return w(r);
445
441
  }
446
- function Y(t, u, R, T, P) {
442
+ function Y(r, u, R, T, P) {
447
443
  return new g(
448
- (t || "React class") + ": " + u + " type `" + R + "." + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + P + "`."
444
+ (r || "React class") + ": " + u + " type `" + R + "." + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + P + "`."
449
445
  );
450
446
  }
451
- function Z(t) {
452
- function u(R, T, P, A, O) {
447
+ function F(r) {
448
+ function u(R, T, P, C, O) {
453
449
  var S = R[T], v = X(S);
454
450
  if (v !== "object")
455
- return new g("Invalid " + A + " `" + O + "` of type `" + v + "` " + ("supplied to `" + P + "`, expected `object`."));
456
- for (var m in t) {
457
- var k = t[m];
458
- if (typeof k != "function")
459
- return Y(P, A, O, m, K(k));
460
- var G = k(S, m, P, A, O + "." + m, s);
451
+ return new g("Invalid " + C + " `" + O + "` of type `" + v + "` " + ("supplied to `" + P + "`, expected `object`."));
452
+ for (var y in r) {
453
+ var j = r[y];
454
+ if (typeof j != "function")
455
+ return Y(P, C, O, y, K(j));
456
+ var G = j(S, y, P, C, O + "." + y, s);
461
457
  if (G)
462
458
  return G;
463
459
  }
@@ -465,22 +461,22 @@ function dt() {
465
461
  }
466
462
  return w(u);
467
463
  }
468
- function j(t) {
469
- function u(R, T, P, A, O) {
464
+ function k(r) {
465
+ function u(R, T, P, C, O) {
470
466
  var S = R[T], v = X(S);
471
467
  if (v !== "object")
472
- return new g("Invalid " + A + " `" + O + "` of type `" + v + "` " + ("supplied to `" + P + "`, expected `object`."));
473
- var m = i({}, R[T], t);
474
- for (var k in m) {
475
- var G = t[k];
476
- if (n(t, k) && typeof G != "function")
477
- return Y(P, A, O, k, K(G));
468
+ return new g("Invalid " + C + " `" + O + "` of type `" + v + "` " + ("supplied to `" + P + "`, expected `object`."));
469
+ var y = i({}, R[T], r);
470
+ for (var j in y) {
471
+ var G = r[j];
472
+ if (n(r, j) && typeof G != "function")
473
+ return Y(P, C, O, j, K(G));
478
474
  if (!G)
479
475
  return new g(
480
- "Invalid " + A + " `" + O + "` key `" + k + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify(R[T], null, " ") + `
481
- Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
476
+ "Invalid " + C + " `" + O + "` key `" + j + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify(R[T], null, " ") + `
477
+ Valid keys: ` + JSON.stringify(Object.keys(r), null, " ")
482
478
  );
483
- var z = G(S, k, P, A, O + "." + k, s);
479
+ var z = G(S, j, P, C, O + "." + j, s);
484
480
  if (z)
485
481
  return z;
486
482
  }
@@ -488,23 +484,23 @@ Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
488
484
  }
489
485
  return w(u);
490
486
  }
491
- function q(t) {
492
- switch (typeof t) {
487
+ function q(r) {
488
+ switch (typeof r) {
493
489
  case "number":
494
490
  case "string":
495
491
  case "undefined":
496
492
  return !0;
497
493
  case "boolean":
498
- return !t;
494
+ return !r;
499
495
  case "object":
500
- if (Array.isArray(t))
501
- return t.every(q);
502
- if (t === null || d(t))
496
+ if (Array.isArray(r))
497
+ return r.every(q);
498
+ if (r === null || f(r))
503
499
  return !0;
504
- var u = c(t);
500
+ var u = c(r);
505
501
  if (u) {
506
- var R = u.call(t), T;
507
- if (u !== t.entries) {
502
+ var R = u.call(r), T;
503
+ if (u !== r.entries) {
508
504
  for (; !(T = R.next()).done; )
509
505
  if (!q(T.value))
510
506
  return !1;
@@ -521,27 +517,27 @@ Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
521
517
  return !1;
522
518
  }
523
519
  }
524
- function B(t, u) {
525
- return t === "symbol" ? !0 : u ? u["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && u instanceof Symbol : !1;
520
+ function B(r, u) {
521
+ return r === "symbol" ? !0 : u ? u["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && u instanceof Symbol : !1;
526
522
  }
527
- function X(t) {
528
- var u = typeof t;
529
- return Array.isArray(t) ? "array" : t instanceof RegExp ? "object" : B(u, t) ? "symbol" : u;
523
+ function X(r) {
524
+ var u = typeof r;
525
+ return Array.isArray(r) ? "array" : r instanceof RegExp ? "object" : B(u, r) ? "symbol" : u;
530
526
  }
531
- function K(t) {
532
- if (typeof t > "u" || t === null)
533
- return "" + t;
534
- var u = X(t);
527
+ function K(r) {
528
+ if (typeof r > "u" || r === null)
529
+ return "" + r;
530
+ var u = X(r);
535
531
  if (u === "object") {
536
- if (t instanceof Date)
532
+ if (r instanceof Date)
537
533
  return "date";
538
- if (t instanceof RegExp)
534
+ if (r instanceof RegExp)
539
535
  return "regexp";
540
536
  }
541
537
  return u;
542
538
  }
543
- function fe(t) {
544
- var u = K(t);
539
+ function de(r) {
540
+ var u = K(r);
545
541
  switch (u) {
546
542
  case "array":
547
543
  case "object":
@@ -554,25 +550,25 @@ Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
554
550
  return u;
555
551
  }
556
552
  }
557
- function pe(t) {
558
- return !t.constructor || !t.constructor.name ? p : t.constructor.name;
553
+ function pe(r) {
554
+ return !r.constructor || !r.constructor.name ? p : r.constructor.name;
559
555
  }
560
556
  return b.checkPropTypes = l, b.resetWarningCache = l.resetWarningCache, b.PropTypes = b, b;
561
557
  }, ge;
562
558
  }
563
559
  var Te, De;
564
- function ft() {
560
+ function pt() {
565
561
  if (De)
566
562
  return Te;
567
563
  De = 1;
568
- var r = Oe();
564
+ var t = Ee();
569
565
  function i() {
570
566
  }
571
567
  function s() {
572
568
  }
573
569
  return s.resetWarningCache = i, Te = function() {
574
- function n(f, d, y, h, a, c) {
575
- if (c !== r) {
570
+ function n(d, f, m, h, a, c) {
571
+ if (c !== t) {
576
572
  var p = new Error(
577
573
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
578
574
  );
@@ -610,20 +606,22 @@ function ft() {
610
606
  }, Te;
611
607
  }
612
608
  if (process.env.NODE_ENV !== "production") {
613
- var pt = _e, vt = !0;
614
- xe.exports = dt()(pt.isElement, vt);
609
+ var vt = Le, ht = !0;
610
+ Pe.exports = dt()(vt.isElement, ht);
615
611
  } else
616
- xe.exports = ft()();
617
- function Me({
618
- start: r,
612
+ Pe.exports = pt()();
613
+ var yt = Pe.exports;
614
+ const e = /* @__PURE__ */ lt(yt);
615
+ function Ne({
616
+ start: t,
619
617
  end: i,
620
618
  time: s,
621
619
  onChangeTime: n,
622
620
  children: l,
623
621
  className: o,
624
- perspective: f,
625
- onChangePerspective: d,
626
- defaultPerspective: y,
622
+ perspective: d,
623
+ onChangePerspective: f,
624
+ defaultPerspective: m,
627
625
  zoomMultiplier: h,
628
626
  ...a
629
627
  }) {
@@ -631,20 +629,20 @@ function Me({
631
629
  return /* @__PURE__ */ D(
632
630
  ct,
633
631
  {
634
- start: r,
632
+ start: t,
635
633
  end: i,
636
634
  time: s,
637
635
  onChangeTime: n,
638
636
  timelineRef: c,
639
- perspective: f,
640
- onChangePerspective: d,
641
- defaultPerspective: y,
637
+ perspective: d,
638
+ onChangePerspective: f,
639
+ defaultPerspective: m,
642
640
  zoomMultiplier: h,
643
- children: /* @__PURE__ */ D("div", { ref: c, className: F("VdtTimeline-root", o), ...a, children: l })
641
+ children: /* @__PURE__ */ D("div", { ref: c, className: Z("VdtTimeline-root", o), ...a, children: l })
644
642
  }
645
643
  );
646
644
  }
647
- Me.propTypes = {
645
+ Ne.propTypes = {
648
646
  /**
649
647
  * Start of timeline.
650
648
  */
@@ -686,7 +684,7 @@ Me.propTypes = {
686
684
  */
687
685
  className: e.string
688
686
  };
689
- Me.defaultProps = {
687
+ Ne.defaultProps = {
690
688
  time: void 0,
691
689
  children: void 0,
692
690
  onChangeTime: void 0,
@@ -697,21 +695,21 @@ Me.defaultProps = {
697
695
  className: void 0
698
696
  };
699
697
  const He = 15, qe = 100;
700
- const [ht] = ae("--vdt-timeline-palette-secondary"), ze = document.createElement("img");
698
+ const [mt] = ae("--vdt-timeline-palette-secondary"), ze = document.createElement("img");
701
699
  ze.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
702
700
  function $e({
703
- className: r,
701
+ className: t,
704
702
  perspective: i,
705
703
  time: s,
706
704
  lineWidth: n,
707
705
  headWidth: l,
708
706
  headHeight: o,
709
- style: f,
710
- onDrag: d,
711
- HeadProps: y,
707
+ style: d,
708
+ onDrag: f,
709
+ HeadProps: m,
712
710
  ...h
713
711
  }) {
714
- var L;
712
+ var _;
715
713
  const { perspective: a, time: c, onChangeTime: p } = ie() || {
716
714
  perspective: i,
717
715
  time: s
@@ -720,40 +718,40 @@ function $e({
720
718
  "VdtTimelinePlayhead",
721
719
  "missing 'perspective' prop. If the component is used outside a VdtTimelineContext, 'perspective' must be passed explicitly"
722
720
  );
723
- const b = U(), E = (L = b.current) == null ? void 0 : L.parentElement, g = (E == null ? void 0 : E.clientWidth) || 0, [w, W] = re(!1), [V, N] = re(c), I = M(0, g, a.start, a.end, V), x = (C) => C <= a.end && C >= a.start, $ = !x(V);
721
+ const b = U(), E = (_ = b.current) == null ? void 0 : _.parentElement, g = (E == null ? void 0 : E.clientWidth) || 0, [w, W] = re(!1), [V, M] = re(c), I = N(0, g, a.start, a.end, V), x = (A) => A <= a.end && A >= a.start, $ = !x(V);
724
722
  le(() => {
725
- c !== void 0 && !w && N(c);
723
+ c !== void 0 && !w && M(c);
726
724
  }, [c, w]);
727
- const H = d || p && ((C, ..._) => p(..._));
725
+ const H = f || p && ((A, ...L) => p(...L));
728
726
  return /* @__PURE__ */ D(
729
727
  "div",
730
728
  {
731
729
  ref: b,
732
- className: F("VdtTimelinePlayhead-root", r),
730
+ className: Z("VdtTimelinePlayhead-root", t),
733
731
  style: {
734
732
  width: n,
735
733
  left: I,
736
734
  display: $ && "none",
737
735
  zIndex: qe,
738
- ...f
736
+ ...d
739
737
  },
740
738
  draggable: !0,
741
- onDragStart: (C) => (W(!0), C.dataTransfer.setDragImage(ze, 0, 0), !1),
739
+ onDragStart: (A) => (W(!0), A.dataTransfer.setDragImage(ze, 0, 0), !1),
742
740
  onDragEnd: () => {
743
741
  W(!1), H != null && H.flush && H.flush();
744
742
  },
745
- onDrag: (C) => {
743
+ onDrag: (A) => {
746
744
  if (H) {
747
- const { x: _ } = b.current.parentElement.getBoundingClientRect(), Y = M(
745
+ const { x: L } = b.current.parentElement.getBoundingClientRect(), Y = N(
748
746
  a.start,
749
747
  a.end,
750
748
  0,
751
749
  g,
752
- C.clientX - _
750
+ A.clientX - L
753
751
  );
754
752
  if (x(Y)) {
755
- const Z = ne(Y, a.start, a.end);
756
- H(C, Z), N(Z);
753
+ const F = ne(Y, a.start, a.end);
754
+ H(A, F), M(F);
757
755
  }
758
756
  }
759
757
  },
@@ -766,12 +764,12 @@ function $e({
766
764
  position: "absolute",
767
765
  height: o,
768
766
  width: l,
769
- backgroundColor: ht,
767
+ backgroundColor: mt,
770
768
  left: -(l / 2 - n / 2),
771
769
  top: -o + 1,
772
770
  clipPath: "polygon(0% 0%, 0% 70%, 50% 100%, 100% 70%, 100% 0%)"
773
771
  },
774
- ...y
772
+ ...m
775
773
  }
776
774
  )
777
775
  }
@@ -823,24 +821,24 @@ $e.defaultProps = {
823
821
  HeadProps: {},
824
822
  className: void 0
825
823
  };
826
- function se(r) {
824
+ function se(t) {
827
825
  const [i, s] = re({}), n = U(
828
826
  new ResizeObserver((l) => {
829
- var f;
830
- const o = (f = l[0]) == null ? void 0 : f.contentRect;
827
+ var d;
828
+ const o = (d = l[0]) == null ? void 0 : d.contentRect;
831
829
  o && s(o);
832
830
  })
833
831
  );
834
832
  return le(() => {
835
- const l = n == null ? void 0 : n.current, o = r == null ? void 0 : r.current;
833
+ const l = n == null ? void 0 : n.current, o = t == null ? void 0 : t.current;
836
834
  return o && l.observe(o), () => {
837
835
  o && l.unobserve(o);
838
836
  };
839
- }, [r]), i;
837
+ }, [t]), i;
840
838
  }
841
- const [mt] = ae("--vdt-timeline-palette-primary"), yt = Qe(
842
- ({ amplitudeSegments: r, pxPerTimeUnit: i, start: s, height: n, ...l }) => r.map(({ amplitude: o, start: f, end: d }, y) => {
843
- const h = i * (d - f), a = (f - s) * i, c = n * o, p = (n - c) / 2;
839
+ const [gt] = ae("--vdt-timeline-palette-primary"), Tt = Qe(
840
+ ({ amplitudeSegments: t, pxPerTimeUnit: i, start: s, height: n, ...l }) => t.map(({ amplitude: o, start: d, end: f }, m) => {
841
+ const h = i * (f - d), a = (d - s) * i, c = n * o, p = (n - c) / 2;
844
842
  return /* @__PURE__ */ D(
845
843
  ee,
846
844
  {
@@ -848,23 +846,23 @@ const [mt] = ae("--vdt-timeline-palette-primary"), yt = Qe(
848
846
  y: p,
849
847
  height: c,
850
848
  width: h,
851
- fill: mt,
849
+ fill: gt,
852
850
  ...l
853
851
  },
854
- y
852
+ m
855
853
  );
856
854
  })
857
855
  );
858
856
  function Be({
859
- className: r,
857
+ className: t,
860
858
  waveform: i,
861
859
  start: s,
862
860
  end: n,
863
861
  perspective: l,
864
862
  StageProps: o,
865
- LayerProps: f,
866
- RectProps: d,
867
- WaveRectProps: y,
863
+ LayerProps: d,
864
+ RectProps: f,
865
+ WaveRectProps: m,
868
866
  ...h
869
867
  }) {
870
868
  const { start: a, end: c, perspective: p } = ie() || {
@@ -879,21 +877,21 @@ function Be({
879
877
  const b = U(), { width: E = 0, height: g = 0 } = se(b), w = We(
880
878
  () => i.map((I, x) => ({
881
879
  amplitude: I,
882
- start: M(a, c, 0, i.length - 1, x),
883
- end: M(a, c, 0, i.length - 1, x + 1)
880
+ start: N(a, c, 0, i.length - 1, x),
881
+ end: N(a, c, 0, i.length - 1, x + 1)
884
882
  })),
885
883
  [i, a, c]
886
- ), W = E / (c - a), V = (c - a) / (p.end - p.start), N = M(0, V * E, a, c, p.start);
887
- return /* @__PURE__ */ D("div", { ref: b, className: F("VdtTimelineWaveform-root", r), ...h, children: /* @__PURE__ */ D(ue, { height: g, width: E, x: -N, scaleX: V, ...o, children: /* @__PURE__ */ te(de, { listening: !1, ...f, children: [
888
- /* @__PURE__ */ D(ee, { x: 0, y: 0, width: E, height: g, ...d }),
884
+ ), W = E / (c - a), V = (c - a) / (p.end - p.start), M = N(0, V * E, a, c, p.start);
885
+ return /* @__PURE__ */ D("div", { ref: b, className: Z("VdtTimelineWaveform-root", t), ...h, children: /* @__PURE__ */ D(ue, { height: g, width: E, x: -M, scaleX: V, ...o, children: /* @__PURE__ */ te(fe, { listening: !1, ...d, children: [
886
+ /* @__PURE__ */ D(ee, { x: 0, y: 0, width: E, height: g, ...f }),
889
887
  /* @__PURE__ */ D(
890
- yt,
888
+ Tt,
891
889
  {
892
890
  amplitudeSegments: w,
893
891
  pxPerTimeUnit: W,
894
892
  start: a,
895
893
  height: g,
896
- ...y
894
+ ...m
897
895
  }
898
896
  )
899
897
  ] }) }) });
@@ -947,33 +945,33 @@ Be.defaultProps = {
947
945
  WaveRectProps: {},
948
946
  className: void 0
949
947
  };
950
- function ce({ hoverEffect: r = () => {
948
+ function ce({ hoverEffect: t = () => {
951
949
  } } = {}) {
952
950
  const [i, s] = re(!1), n = U(null);
953
951
  return {
954
952
  isHovering: i,
955
953
  onMouseEnter: (l) => {
956
- s(!0), n.current = r(l);
954
+ s(!0), n.current = t(l);
957
955
  },
958
956
  onMouseLeave: () => {
959
957
  s(!1), n.current && n.current(), n.current = null;
960
958
  }
961
959
  };
962
960
  }
963
- const [gt, Tt] = ae(
961
+ const [bt, Pt] = ae(
964
962
  "--vdt-timeline-palette-primary",
965
963
  "--vdt-timeline-palette-primary-dark"
966
964
  ), be = 5;
967
965
  function Ge({
968
- onClick: r,
966
+ onClick: t,
969
967
  x: i,
970
968
  width: s,
971
969
  y: n,
972
970
  height: l,
973
971
  padding: o,
974
- start: f,
975
- end: d,
976
- onHover: y,
972
+ start: d,
973
+ end: f,
974
+ onHover: m,
977
975
  onMove: h,
978
976
  onMoveStart: a,
979
977
  onMoveEnd: c,
@@ -982,42 +980,42 @@ function Ge({
982
980
  onResizeEnd: E,
983
981
  ...g
984
982
  }) {
985
- [i, s, n, l].some((j) => j === void 0) && J.error(
983
+ [i, s, n, l].some((k) => k === void 0) && J.error(
986
984
  "VdtTimelineEvent",
987
985
  "missing 'x', 'width', 'y', or 'height' props. If the component is not used as a direct child of VdtTimelineTrack, 'x', 'width', 'y', or 'height' must be passed explicitly"
988
986
  );
989
987
  const w = U(), { isHovering: W, ...V } = ce({
990
- hoverEffect: (j) => (y && y(j, !0), () => {
991
- y && y(j, !1);
988
+ hoverEffect: (k) => (m && m(k, !0), () => {
989
+ m && m(k, !1);
992
990
  })
993
- }), { isHovering: N, ...I } = ce({
994
- hoverEffect: (j) => (p && (j.target.getStage().container().style.cursor = "col-resize"), () => {
995
- p && (j.target.getStage().container().style.cursor = "default");
991
+ }), { isHovering: M, ...I } = ce({
992
+ hoverEffect: (k) => (p && (k.target.getStage().container().style.cursor = "col-resize"), () => {
993
+ p && (k.target.getStage().container().style.cursor = "default");
996
994
  })
997
- }), [x, $] = re(!1), H = !!r;
995
+ }), [x, $] = re(!1), H = !!t;
998
996
  le(() => {
999
997
  if (w.current) {
1000
- const j = (() => x ? "grabbing" : W && H ? "pointer" : "default")();
1001
- w.current.getStage().container().style.cursor = j;
998
+ const k = (() => x ? "grabbing" : W && H ? "pointer" : "default")();
999
+ w.current.getStage().container().style.cursor = k;
1002
1000
  }
1003
1001
  }, [x, W, H]);
1004
- const L = n + o, C = l - 2 * o, _ = {
1005
- y: L,
1006
- height: C,
1002
+ const _ = n + o, A = l - 2 * o, L = {
1003
+ y: _,
1004
+ height: A,
1007
1005
  x: i,
1008
1006
  width: s
1009
- }, Y = W || N ? {
1010
- fill: Tt
1011
- } : {}, Z = (j) => {
1012
- const q = j === "start" ? i : i + s - be;
1007
+ }, Y = W || M ? {
1008
+ fill: Pt
1009
+ } : {}, F = (k) => {
1010
+ const q = k === "start" ? i : i + s - be;
1013
1011
  return {
1014
1012
  onDragStart: () => {
1015
- b && b(j);
1013
+ b && b(k);
1016
1014
  },
1017
1015
  draggable: !!p,
1018
- dragBoundFunc: (B) => ({ x: B.x, y: L }),
1016
+ dragBoundFunc: (B) => ({ x: B.x, y: _ }),
1019
1017
  onDragEnd: () => {
1020
- E && E(j);
1018
+ E && E(k);
1021
1019
  },
1022
1020
  width: be,
1023
1021
  x: q,
@@ -1027,49 +1025,49 @@ function Ge({
1027
1025
  const { x: X } = B.target.position();
1028
1026
  B.target.x(q);
1029
1027
  const K = Math.floor(
1030
- M(
1031
- f,
1028
+ N(
1032
1029
  d,
1030
+ f,
1033
1031
  i,
1034
1032
  i + s,
1035
- X + (j === "start" ? 0 : be)
1033
+ X + (k === "start" ? 0 : be)
1036
1034
  )
1037
1035
  );
1038
- p(B, j, K);
1036
+ p(B, k, K);
1039
1037
  }
1040
1038
  };
1041
1039
  };
1042
- return /* @__PURE__ */ te(Fe, { children: [
1040
+ return /* @__PURE__ */ te(Ze, { children: [
1043
1041
  /* @__PURE__ */ D(
1044
1042
  ee,
1045
1043
  {
1046
1044
  ref: w,
1047
1045
  draggable: !!h,
1048
- dragBoundFunc: (j) => ({ x: j.x, y: L }),
1049
- onDragStart: (j) => {
1050
- h && ($(!0), a && a(j));
1046
+ dragBoundFunc: (k) => ({ x: k.x, y: _ }),
1047
+ onDragStart: (k) => {
1048
+ h && ($(!0), a && a(k));
1051
1049
  },
1052
- onDragEnd: (j) => {
1053
- h && ($(!1), c && c(j));
1050
+ onDragEnd: (k) => {
1051
+ h && ($(!1), c && c(k));
1054
1052
  },
1055
- onDragMove: (j) => {
1053
+ onDragMove: (k) => {
1056
1054
  if (!h)
1057
1055
  return;
1058
- const { x: q } = j.target.position();
1059
- j.target.x(i);
1060
- const B = Math.floor(M(f, d, i, i + s, q));
1061
- h(j, B);
1056
+ const { x: q } = k.target.position();
1057
+ k.target.x(i);
1058
+ const B = Math.floor(N(d, f, i, i + s, q));
1059
+ h(k, B);
1062
1060
  },
1063
- fill: gt,
1064
- onClick: r,
1065
- ..._,
1061
+ fill: bt,
1062
+ onClick: t,
1063
+ ...L,
1066
1064
  ...Y,
1067
1065
  ...V,
1068
1066
  ...g
1069
1067
  }
1070
1068
  ),
1071
- /* @__PURE__ */ D(ee, { ..._, ...I, ...Z("start") }),
1072
- /* @__PURE__ */ D(ee, { ..._, ...I, ...Z("end") })
1069
+ /* @__PURE__ */ D(ee, { ...L, ...I, ...F("start") }),
1070
+ /* @__PURE__ */ D(ee, { ...L, ...I, ...F("end") })
1073
1071
  ] });
1074
1072
  }
1075
1073
  Ge.propTypes = {
@@ -1155,15 +1153,15 @@ Ge.defaultProps = {
1155
1153
  className: void 0
1156
1154
  };
1157
1155
  function Xe({
1158
- className: r,
1156
+ className: t,
1159
1157
  children: i,
1160
1158
  perspective: s,
1161
1159
  onClick: n,
1162
1160
  style: l,
1163
1161
  onHover: o,
1164
- StageProps: f,
1165
- LayerProps: d,
1166
- GroupProps: y,
1162
+ StageProps: d,
1163
+ LayerProps: f,
1164
+ GroupProps: m,
1167
1165
  RectProps: h,
1168
1166
  ...a
1169
1167
  }) {
@@ -1177,25 +1175,25 @@ function Xe({
1177
1175
  const p = oe.toArray(i).filter(({ props: I = {} }) => !(I.start > c.end || I.end < c.start)), b = U(), { width: E = 0, height: g = 0 } = se(b), w = Math.max(...oe.map(i, ({ props: { y: I = 0, height: x = 0 } = {} }) => I + x)) || He, W = (I) => {
1178
1176
  const { start: x, end: $ } = I.props || {}, H = (() => {
1179
1177
  if (x !== void 0 && $ !== void 0) {
1180
- const L = M(
1178
+ const _ = N(
1181
1179
  0,
1182
1180
  E,
1183
1181
  c.start,
1184
1182
  c.end,
1185
1183
  x
1186
- ), C = M(0, E, c.start, c.end, $) - L;
1184
+ ), A = N(0, E, c.start, c.end, $) - _;
1187
1185
  return {
1188
- x: L,
1189
- width: C
1186
+ x: _,
1187
+ width: A
1190
1188
  };
1191
1189
  }
1192
1190
  return {};
1193
1191
  })();
1194
- return Le(I, {
1192
+ return _e(I, {
1195
1193
  ...I.props,
1196
1194
  ...H
1197
1195
  });
1198
- }, { isHovering: V, ...N } = ce({
1196
+ }, { isHovering: V, ...M } = ce({
1199
1197
  hoverEffect: (I) => {
1200
1198
  o && o(I, !0);
1201
1199
  const x = I.target.getStage().container();
@@ -1208,10 +1206,10 @@ function Xe({
1208
1206
  "div",
1209
1207
  {
1210
1208
  ref: b,
1211
- className: F("VdtTimelineTrack-root", r),
1209
+ className: Z("VdtTimelineTrack-root", t),
1212
1210
  style: { height: w, ...l },
1213
1211
  ...a,
1214
- children: /* @__PURE__ */ D(ue, { height: g, width: E, ...f, children: /* @__PURE__ */ D(de, { ...d, children: /* @__PURE__ */ te(Pe, { ...y, children: [
1212
+ children: /* @__PURE__ */ D(ue, { height: g, width: E, ...d, children: /* @__PURE__ */ D(fe, { ...f, children: /* @__PURE__ */ te(Oe, { ...m, children: [
1215
1213
  /* @__PURE__ */ D(
1216
1214
  ee,
1217
1215
  {
@@ -1220,7 +1218,7 @@ function Xe({
1220
1218
  width: E,
1221
1219
  height: g,
1222
1220
  onClick: n,
1223
- ...N,
1221
+ ...M,
1224
1222
  ...h
1225
1223
  }
1226
1224
  ),
@@ -1234,12 +1232,12 @@ Xe.propTypes = {
1234
1232
  * children are positioned within the track according to 'start' and 'end' props passed to them
1235
1233
  */
1236
1234
  // children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
1237
- children(r, i, s) {
1238
- const n = r[i];
1235
+ children(t, i, s) {
1236
+ const n = t[i];
1239
1237
  let l;
1240
1238
  return oe.forEach(n, (o) => {
1241
- const { props: { start: f, end: d } = {} } = o;
1242
- (f === void 0 || d === void 0) && (l = new Error(
1239
+ const { props: { start: d, end: f } = {} } = o;
1240
+ (d === void 0 || f === void 0) && (l = new Error(
1243
1241
  `children of ${s} must be passed a 'start' and 'end' prop. These props are used to position the child within the track.`
1244
1242
  ));
1245
1243
  }), l;
@@ -1293,8 +1291,8 @@ Xe.defaultProps = {
1293
1291
  RectProps: {},
1294
1292
  className: void 0
1295
1293
  };
1296
- function Ee({
1297
- className: r,
1294
+ function Se({
1295
+ className: t,
1298
1296
  children: i,
1299
1297
  label: s,
1300
1298
  LabelProps: n,
@@ -1304,7 +1302,7 @@ function Ee({
1304
1302
  return /* @__PURE__ */ te(
1305
1303
  "div",
1306
1304
  {
1307
- className: F("VdtTimelineRow-root", r, {
1305
+ className: Z("VdtTimelineRow-root", t, {
1308
1306
  "VdtTimelineRow-hasLabel": !!s
1309
1307
  }),
1310
1308
  ...o,
@@ -1315,7 +1313,7 @@ function Ee({
1315
1313
  }
1316
1314
  );
1317
1315
  }
1318
- Ee.propTypes = {
1316
+ Se.propTypes = {
1319
1317
  /**
1320
1318
  * Children components to render inside row content container.
1321
1319
  */
@@ -1341,7 +1339,7 @@ Ee.propTypes = {
1341
1339
  */
1342
1340
  style: e.instanceOf(Object)
1343
1341
  };
1344
- Ee.defaultProps = {
1342
+ Se.defaultProps = {
1345
1343
  children: void 0,
1346
1344
  label: void 0,
1347
1345
  LabelProps: {},
@@ -1349,25 +1347,25 @@ Ee.defaultProps = {
1349
1347
  className: void 0,
1350
1348
  style: {}
1351
1349
  };
1352
- const Ie = 2, [bt, Pt] = ae(
1350
+ const Ie = 2, [Ot, Et] = ae(
1353
1351
  "--vdt-timeline-palette-text-primary",
1354
1352
  "--vdt-timeline-palette-text-secondary"
1355
1353
  );
1356
- function Ot({ x: r, y: i, minX: s, maxX: n, label: l, TickGroupProps: o, TickTextProps: f, TickLineProps: d }) {
1357
- const y = l !== void 0, { color: h, tickWidth: a, tickSize: c } = y ? {
1358
- color: bt,
1354
+ function St({ x: t, y: i, minX: s, maxX: n, label: l, TickGroupProps: o, TickTextProps: d, TickLineProps: f }) {
1355
+ const m = l !== void 0, { color: h, tickWidth: a, tickSize: c } = m ? {
1356
+ color: Ot,
1359
1357
  tickWidth: 2,
1360
1358
  tickSize: 8
1361
1359
  } : {
1362
- color: Pt,
1360
+ color: Et,
1363
1361
  tickWidth: 1,
1364
1362
  tickSize: 4
1365
1363
  }, [p, b] = re(), E = U();
1366
1364
  le(() => {
1367
1365
  E.current && b(E.current.getTextWidth());
1368
1366
  }, []);
1369
- const g = ne(r - p / 2, s + Ie, n - p - Ie) || void 0;
1370
- return r < s || r > n ? null : /* @__PURE__ */ te(Pe, { ...o, children: [
1367
+ const g = ne(t - p / 2, s + Ie, n - p - Ie) || void 0;
1368
+ return t < s || t > n ? null : /* @__PURE__ */ te(Oe, { ...o, children: [
1371
1369
  /* @__PURE__ */ D(
1372
1370
  et,
1373
1371
  {
@@ -1379,44 +1377,44 @@ function Ot({ x: r, y: i, minX: s, maxX: n, label: l, TickGroupProps: o, TickTex
1379
1377
  fontStyle: "bold",
1380
1378
  fontSize: 10,
1381
1379
  fill: h,
1382
- ...f
1380
+ ...d
1383
1381
  }
1384
1382
  ),
1385
1383
  /* @__PURE__ */ D(
1386
1384
  tt,
1387
1385
  {
1388
- points: [r, i - c, r, i],
1386
+ points: [t, i - c, t, i],
1389
1387
  stroke: h,
1390
1388
  strokeWidth: a,
1391
- ...d
1389
+ ...f
1392
1390
  }
1393
1391
  )
1394
1392
  ] });
1395
1393
  }
1396
- function Ye({ width: r, perspective: i }) {
1397
- const s = Math.max(Math.floor(r / 90), 2), n = nt(
1394
+ function Ye({ width: t, perspective: i }) {
1395
+ const s = Math.max(Math.floor(t / 90), 2), n = nt(
1398
1396
  [...Array(s).keys()].map(
1399
- (o) => M(i.start, i.end, 0, s - 1, o)
1397
+ (o) => N(i.start, i.end, 0, s - 1, o)
1400
1398
  )
1401
1399
  ).map((o) => ({
1402
1400
  time: o,
1403
1401
  label: String(Math.round(o))
1404
- })), l = it(n, (o, f) => {
1405
- const d = (f.time - o.time) / 10;
1406
- return [...Array(9).keys()].map((y) => ({ time: o.time + (y + 1) * d }));
1402
+ })), l = it(n, (o, d) => {
1403
+ const f = (d.time - o.time) / 10;
1404
+ return [...Array(9).keys()].map((m) => ({ time: o.time + (m + 1) * f }));
1407
1405
  }).flat();
1408
1406
  return rt([...n, ...l], ["time"]);
1409
1407
  }
1410
1408
  function Ue({
1411
- className: r,
1409
+ className: t,
1412
1410
  children: i,
1413
1411
  ticks: s,
1414
1412
  onClick: n,
1415
1413
  onHover: l,
1416
1414
  onWheel: o,
1417
- onDrag: f,
1418
- start: d,
1419
- end: y,
1415
+ onDrag: d,
1416
+ start: f,
1417
+ end: m,
1420
1418
  perspective: h,
1421
1419
  timelineRef: a,
1422
1420
  StageProps: c,
@@ -1429,109 +1427,109 @@ function Ue({
1429
1427
  ...V
1430
1428
  }) {
1431
1429
  var O, S;
1432
- const { start: N, end: I, perspective: x, setPerspective: $, zoom: H, onChangeTime: L, timelineRef: C } = ie() || {
1433
- start: d,
1434
- end: y,
1430
+ const { start: M, end: I, perspective: x, setPerspective: $, zoom: H, onChangeTime: _, timelineRef: A } = ie() || {
1431
+ start: f,
1432
+ end: m,
1435
1433
  perspective: h,
1436
1434
  timelineRef: a
1437
1435
  };
1438
- (N === void 0 || I === void 0 || x === void 0) && J.error(
1436
+ (M === void 0 || I === void 0 || x === void 0) && J.error(
1439
1437
  "VdtTimelinePlayheadTrack",
1440
1438
  "missing 'start', 'end' or 'perspective' props. If the component is used outside a VdtTimelineContext, 'start', 'end' and 'perspective' must be passed explicitly"
1441
- ), C === void 0 && (i == null ? void 0 : i.length) > 0 && J.warn(
1439
+ ), A === void 0 && (i == null ? void 0 : i.length) > 0 && J.warn(
1442
1440
  "VdtTimelinePlayheadTrack",
1443
1441
  "missing 'timelineRef' prop. This ref is used to set the height of the playhead within the timeline."
1444
1442
  );
1445
- const _ = o || H && ((v, ...m) => H(...m)), Y = n || L && ((v, ...m) => L(...m)), Z = f || $ && ((v, ...m) => $(...m)), j = U(), { width: q = 0, height: B = 0 } = se(j), X = s || Ye, fe = (typeof X == "function" ? X({ start: N, end: I, width: q, perspective: x }) : X).map(({ label: v, time: m }) => ({
1446
- x: M(0, q, x.start, x.end, m),
1443
+ const L = o || H && ((v, ...y) => H(...y)), Y = n || _ && ((v, ...y) => _(...y)), F = d || $ && ((v, ...y) => $(...y)), k = U(), { width: q = 0, height: B = 0 } = se(k), X = s || Ye, de = (typeof X == "function" ? X({ start: M, end: I, width: q, perspective: x }) : X).map(({ label: v, time: y }) => ({
1444
+ x: N(0, q, x.start, x.end, y),
1447
1445
  label: v,
1448
- time: m
1449
- })), { height: pe } = se(C), t = (((O = j == null ? void 0 : j.current) == null ? void 0 : O.offsetTop) || 0) - (((S = C == null ? void 0 : C.current) == null ? void 0 : S.offsetTop) || 0), u = B, R = pe - B - t || void 0, T = U(), { isHovering: P, ...A } = ce({
1446
+ time: y
1447
+ })), { height: pe } = se(A), r = (((O = k == null ? void 0 : k.current) == null ? void 0 : O.offsetTop) || 0) - (((S = A == null ? void 0 : A.current) == null ? void 0 : S.offsetTop) || 0), u = B, R = pe - B - r || void 0, T = U(), { isHovering: P, ...C } = ce({
1450
1448
  hoverEffect: (v) => {
1451
1449
  l && l(v, !0);
1452
- const m = v.target.getStage().container();
1453
- return Y && (m.style.cursor = "pointer"), () => {
1454
- l && l(v, !1), Y && (m.style.cursor = "default");
1450
+ const y = v.target.getStage().container();
1451
+ return Y && (y.style.cursor = "pointer"), () => {
1452
+ l && l(v, !1), Y && (y.style.cursor = "default");
1455
1453
  };
1456
1454
  }
1457
1455
  });
1458
1456
  return /* @__PURE__ */ te(
1459
1457
  "div",
1460
1458
  {
1461
- ref: j,
1462
- className: F("VdtTimelinePlayheadTrack-root", r),
1459
+ ref: k,
1460
+ className: Z("VdtTimelinePlayheadTrack-root", t),
1463
1461
  ...V,
1464
1462
  children: [
1465
1463
  oe.map(
1466
1464
  i,
1467
- (v) => Le(v, {
1465
+ (v) => _e(v, {
1468
1466
  style: {
1469
1467
  top: u,
1470
1468
  height: R
1471
1469
  }
1472
1470
  })
1473
1471
  ),
1474
- /* @__PURE__ */ D(ue, { height: B, width: q, ...c, children: /* @__PURE__ */ D(de, { ...p, children: /* @__PURE__ */ te(
1475
- Pe,
1472
+ /* @__PURE__ */ D(ue, { height: B, width: q, ...c, children: /* @__PURE__ */ D(fe, { ...p, children: /* @__PURE__ */ te(
1473
+ Oe,
1476
1474
  {
1477
1475
  onClick: (v) => {
1478
1476
  if (T.current && Y) {
1479
- const { x: m } = T.current.getRelativePointerPosition();
1480
- Y(v, M(x.start, x.end, 0, q, m));
1477
+ const { x: y } = T.current.getRelativePointerPosition();
1478
+ Y(v, N(x.start, x.end, 0, q, y));
1481
1479
  }
1482
1480
  },
1483
1481
  onWheel: (v) => {
1484
- if (T.current && _) {
1485
- const { x: m } = T.current.getRelativePointerPosition();
1486
- _(
1482
+ if (T.current && L) {
1483
+ const { x: y } = T.current.getRelativePointerPosition();
1484
+ L(
1487
1485
  v,
1488
1486
  v.evt.deltaY < 0 ? "in" : "out",
1489
- M(x.start, x.end, 0, q, m)
1487
+ N(x.start, x.end, 0, q, y)
1490
1488
  );
1491
1489
  }
1492
1490
  },
1493
1491
  draggable: !0,
1494
1492
  dragBoundFunc: () => ({ x: 0, y: 0 }),
1495
1493
  onDragStart: (v) => {
1496
- const m = v.target.getStage().container();
1497
- m.style.cursor = "grabbing";
1494
+ const y = v.target.getStage().container();
1495
+ y.style.cursor = "grabbing";
1498
1496
  },
1499
1497
  onDragEnd: (v) => {
1500
- const m = v.target.getStage().container();
1501
- m.style.cursor = "pointer";
1498
+ const y = v.target.getStage().container();
1499
+ y.style.cursor = "pointer";
1502
1500
  },
1503
1501
  onDragMove: (v) => {
1504
- if (Z) {
1505
- const { movementX: m } = v.evt;
1506
- if (m === 0)
1502
+ if (F) {
1503
+ const { movementX: y } = v.evt;
1504
+ if (y === 0)
1507
1505
  return;
1508
- const k = M(
1506
+ const j = N(
1509
1507
  x.start,
1510
1508
  x.end,
1511
1509
  0,
1512
1510
  q,
1513
- -m
1514
- ), G = x.end - x.start, z = ne(k, N, I - G), Q = z + G;
1515
- Z(v, z, Q);
1511
+ -y
1512
+ ), G = x.end - x.start, z = ne(j, M, I - G), Q = z + G;
1513
+ F(v, z, Q);
1516
1514
  }
1517
1515
  },
1518
- ...A,
1516
+ ...C,
1519
1517
  ...b,
1520
1518
  children: [
1521
1519
  /* @__PURE__ */ D(ee, { ref: T, x: 0, y: 0, width: q, height: B, ...E }),
1522
- fe.map(({ x: v, label: m, time: k }) => /* @__PURE__ */ D(
1523
- Ot,
1520
+ de.map(({ x: v, label: y, time: j }) => /* @__PURE__ */ D(
1521
+ St,
1524
1522
  {
1525
1523
  minX: 0,
1526
1524
  maxX: q,
1527
1525
  x: v,
1528
- label: m,
1526
+ label: y,
1529
1527
  y: B,
1530
1528
  TickGroupProps: g,
1531
1529
  TickLineProps: W,
1532
1530
  TickTextProps: w
1533
1531
  },
1534
- k
1532
+ j
1535
1533
  ))
1536
1534
  ]
1537
1535
  }
@@ -1647,17 +1645,17 @@ Ue.defaultProps = {
1647
1645
  className: void 0,
1648
1646
  style: {}
1649
1647
  };
1650
- const [Et] = ae("--vdt-timeline-palette-secondary");
1651
- function Se({
1652
- className: r,
1648
+ const [wt] = ae("--vdt-timeline-palette-secondary");
1649
+ function we({
1650
+ className: t,
1653
1651
  onScroll: i,
1654
1652
  onClick: s,
1655
1653
  start: n,
1656
1654
  end: l,
1657
1655
  perspective: o,
1658
- style: f,
1659
- StageProps: d,
1660
- LayerProps: y,
1656
+ style: d,
1657
+ StageProps: f,
1658
+ LayerProps: m,
1661
1659
  RectProps: h,
1662
1660
  ...a
1663
1661
  }) {
@@ -1670,12 +1668,12 @@ function Se({
1670
1668
  "VdtTimelineScroll",
1671
1669
  "missing 'start', 'end' or 'perspective' props. If the component is used outside a VdtTimelineContext, 'start', 'end' and 'perspective' must be passed explicitly"
1672
1670
  );
1673
- const g = U(), { width: w = 0, height: W = 0 } = se(g), V = M(0, w, c, p, b.start), N = b.end - b.start, I = M(0, w, 0, p - c, N), x = i || E && ((L, ...C) => E(...C)), $ = s || E && ((L, ...C) => E(...C)), H = c !== b.start || p !== b.end;
1671
+ const g = U(), { width: w = 0, height: W = 0 } = se(g), V = N(0, w, c, p, b.start), M = b.end - b.start, I = N(0, w, 0, p - c, M), x = i || E && ((_, ...A) => E(...A)), $ = s || E && ((_, ...A) => E(...A)), H = c !== b.start || p !== b.end;
1674
1672
  return /* @__PURE__ */ D(
1675
1673
  "div",
1676
1674
  {
1677
- className: F("VdtTimelineScroll-root", r),
1678
- style: { display: !H && "none", zIndex: qe + 1, ...f },
1675
+ className: Z("VdtTimelineScroll-root", t),
1676
+ style: { display: !H && "none", zIndex: qe + 1, ...d },
1679
1677
  ref: g,
1680
1678
  ...a,
1681
1679
  children: /* @__PURE__ */ D(
@@ -1683,31 +1681,31 @@ function Se({
1683
1681
  {
1684
1682
  height: W,
1685
1683
  width: w,
1686
- onClick: (L) => {
1684
+ onClick: (_) => {
1687
1685
  if (!$)
1688
1686
  return;
1689
- const { x: C } = L.currentTarget.getRelativePointerPosition();
1690
- let _;
1691
- C > V + I ? _ = Math.floor(M(c, p, 0, w, C - I)) : C < V && (_ = Math.floor(M(c, p, 0, w, C))), _ !== void 0 && _ !== b.start && $(L, _, _ + N);
1687
+ const { x: A } = _.currentTarget.getRelativePointerPosition();
1688
+ let L;
1689
+ A > V + I ? L = Math.floor(N(c, p, 0, w, A - I)) : A < V && (L = Math.floor(N(c, p, 0, w, A))), L !== void 0 && L !== b.start && $(_, L, L + M);
1692
1690
  },
1693
- ...d,
1694
- children: /* @__PURE__ */ D(de, { ...y, children: /* @__PURE__ */ D(
1691
+ ...f,
1692
+ children: /* @__PURE__ */ D(fe, { ...m, children: /* @__PURE__ */ D(
1695
1693
  ee,
1696
1694
  {
1697
1695
  x: V,
1698
1696
  y: 0,
1699
1697
  width: I,
1700
1698
  height: W,
1701
- fill: Et,
1699
+ fill: wt,
1702
1700
  draggable: !0,
1703
- dragBoundFunc: (L) => ({ x: ne(L.x, 0, w - I), y: 0 }),
1704
- onDragMove: (L) => {
1701
+ dragBoundFunc: (_) => ({ x: ne(_.x, 0, w - I), y: 0 }),
1702
+ onDragMove: (_) => {
1705
1703
  if (!x)
1706
1704
  return;
1707
- const { x: C } = L.target.position();
1708
- L.target.x(V);
1709
- const _ = Math.floor(M(c, p, 0, w, C));
1710
- x(L, _, _ + N);
1705
+ const { x: A } = _.target.position();
1706
+ _.target.x(V);
1707
+ const L = Math.floor(N(c, p, 0, w, A));
1708
+ x(_, L, L + M);
1711
1709
  },
1712
1710
  ...h
1713
1711
  }
@@ -1717,7 +1715,7 @@ function Se({
1717
1715
  }
1718
1716
  );
1719
1717
  }
1720
- Se.propTypes = {
1718
+ we.propTypes = {
1721
1719
  /**
1722
1720
  * Callback to trigger on timeline component scroll.
1723
1721
  */
@@ -1759,7 +1757,7 @@ Se.propTypes = {
1759
1757
  */
1760
1758
  className: e.string
1761
1759
  };
1762
- Se.defaultProps = {
1760
+ we.defaultProps = {
1763
1761
  onScroll: void 0,
1764
1762
  onClick: void 0,
1765
1763
  start: void 0,
@@ -1771,37 +1769,37 @@ Se.defaultProps = {
1771
1769
  RectProps: {},
1772
1770
  className: void 0
1773
1771
  };
1774
- function St(r, { start: i, end: s }) {
1772
+ function xt(t, { start: i, end: s }) {
1775
1773
  return Math.floor(0.02 * (i - s));
1776
1774
  }
1777
- function Ze({
1778
- className: r,
1775
+ function Fe({
1776
+ className: t,
1779
1777
  children: i,
1780
1778
  getScrollDistance: s,
1781
1779
  RowProps: n,
1782
1780
  ScrollProps: l,
1783
1781
  ...o
1784
1782
  }) {
1785
- const { start: f, end: d, perspective: y, setPerspective: h } = ie();
1783
+ const { start: d, end: f, perspective: m, setPerspective: h } = ie();
1786
1784
  return /* @__PURE__ */ te(
1787
1785
  "div",
1788
1786
  {
1789
- className: F("VdtTimelineScrollContainer-root", r),
1787
+ className: Z("VdtTimelineScrollContainer-root", t),
1790
1788
  onWheel: (a) => {
1791
1789
  if (a.shiftKey) {
1792
- const c = s(a, { start: f, end: d, perspective: y }), p = y.start + (a.deltaY > 0 ? -c : c), b = y.end - y.start, E = p + b;
1793
- E > d ? h(d - b, d) : p < f ? h(f, b) : h(p, E);
1790
+ const c = s(a, { start: d, end: f, perspective: m }), p = m.start + (a.deltaY > 0 ? -c : c), b = m.end - m.start, E = p + b;
1791
+ E > f ? h(f - b, f) : p < d ? h(d, b) : h(p, E);
1794
1792
  }
1795
1793
  },
1796
1794
  ...o,
1797
1795
  children: [
1798
1796
  i,
1799
- /* @__PURE__ */ D(Ee, { className: F("VdtTimelineScrollContainer-timelineRow"), ...n, children: /* @__PURE__ */ D(Se, { ...l }) })
1797
+ /* @__PURE__ */ D(Se, { className: Z("VdtTimelineScrollContainer-timelineRow"), ...n, children: /* @__PURE__ */ D(we, { ...l }) })
1800
1798
  ]
1801
1799
  }
1802
1800
  );
1803
1801
  }
1804
- Ze.propTypes = {
1802
+ Fe.propTypes = {
1805
1803
  /**
1806
1804
  * Override styles with className
1807
1805
  */
@@ -1823,23 +1821,23 @@ Ze.propTypes = {
1823
1821
  */
1824
1822
  ScrollProps: e.instanceOf(Object)
1825
1823
  };
1826
- Ze.defaultProps = {
1824
+ Fe.defaultProps = {
1827
1825
  children: void 0,
1828
- getScrollDistance: St,
1826
+ getScrollDistance: xt,
1829
1827
  RowProps: {},
1830
1828
  ScrollProps: {},
1831
1829
  className: void 0
1832
1830
  };
1833
1831
  export {
1834
- Me as Timeline,
1832
+ Ne as Timeline,
1835
1833
  Ve as TimelineContext,
1836
1834
  Ge as TimelineEvent,
1837
1835
  $e as TimelinePlayhead,
1838
1836
  Ue as TimelinePlayheadTrack,
1839
1837
  ct as TimelineProvider,
1840
- Ee as TimelineRow,
1841
- Se as TimelineScroll,
1842
- Ze as TimelineScrollContainer,
1838
+ Se as TimelineRow,
1839
+ we as TimelineScroll,
1840
+ Fe as TimelineScrollContainer,
1843
1841
  Xe as TimelineTrack,
1844
1842
  Be as TimelineWaveform,
1845
1843
  ie as useTimeline