@video-editor/ui 0.0.1-beta.11 → 0.0.1-beta.13

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,4 +1,4 @@
1
- import { defineComponent as pe, createElementBlock as b, openBlock as k, withModifiers as le, normalizeStyle as D, createStaticVNode as Se, createElementVNode as c, Fragment as ge, renderList as he, normalizeClass as $e, createCommentVNode as ee, toDisplayString as G, renderSlot as V, computed as M, ref as z, watch as fe, toRef as Re, onMounted as Pe, onBeforeUnmount as Ge, createVNode as ye, withDirectives as Ve, unref as K, vShow as Le } from "vue";
1
+ import { defineComponent as pe, createElementBlock as k, openBlock as _, withModifiers as le, normalizeStyle as D, createStaticVNode as Se, createElementVNode as c, Fragment as ge, renderList as he, normalizeClass as $e, createCommentVNode as ee, toDisplayString as G, renderSlot as V, computed as M, ref as z, watch as fe, toRef as Re, onMounted as Pe, onBeforeUnmount as Ge, createVNode as ye, withDirectives as Ve, unref as K, vShow as Le } from "vue";
2
2
  const Ne = /* @__PURE__ */ pe({
3
3
  name: "TimelinePlayhead",
4
4
  __name: "TimelinePlayhead",
@@ -8,10 +8,10 @@ const Ne = /* @__PURE__ */ pe({
8
8
  emits: ["dragStart"],
9
9
  setup(l, { emit: f }) {
10
10
  const s = f;
11
- return (o, i) => (k(), b("div", {
11
+ return (o, i) => (_(), k("div", {
12
12
  class: "ve-playhead",
13
13
  style: D({ left: `${l.left}px` }),
14
- onMousedown: i[0] || (i[0] = le((_) => s("dragStart", _), ["stop", "prevent"]))
14
+ onMousedown: i[0] || (i[0] = le((b) => s("dragStart", b), ["stop", "prevent"]))
15
15
  }, [...i[1] || (i[1] = [
16
16
  Se('<svg class="ve-playhead__icon" width="12" height="18" viewBox="0 0 12 18" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-601eb0b9><g filter="url(#ve_playhead_drop_shadow)" data-v-601eb0b9><path d="M2 3C2 1.89543 2.89543 1 4 1H8C9.10457 1 10 1.89543 10 3V11.0925C10 11.6692 9.75104 12.2178 9.31701 12.5976L7.31701 14.3476C6.56296 15.0074 5.43704 15.0074 4.68299 14.3476L2.68299 12.5976C2.24896 12.2178 2 11.6692 2 11.0925V3Z" fill="white" data-v-601eb0b9></path><path d="M4 1.5H8C8.82843 1.5 9.5 2.17157 9.5 3V11.0928C9.49991 11.5252 9.31275 11.9369 8.9873 12.2217L6.9873 13.9717C6.42191 14.466 5.57809 14.466 5.0127 13.9717L3.0127 12.2217C2.68725 11.9369 2.50009 11.5252 2.5 11.0928V3C2.5 2.17157 3.17157 1.5 4 1.5Z" stroke="currentColor" data-v-601eb0b9></path></g><defs data-v-601eb0b9><filter id="ve_playhead_drop_shadow" x="0" y="0" width="12" height="17.8428" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB" data-v-601eb0b9><feFlood flood-opacity="0" result="BackgroundImageFix" data-v-601eb0b9></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" data-v-601eb0b9></feColorMatrix><feOffset dy="1" data-v-601eb0b9></feOffset><feGaussianBlur stdDeviation="1" data-v-601eb0b9></feGaussianBlur><feComposite in2="hardAlpha" operator="out" data-v-601eb0b9></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0" data-v-601eb0b9></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow" data-v-601eb0b9></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape" data-v-601eb0b9></feBlend></filter></defs></svg><div class="ve-playhead__line" data-v-601eb0b9></div>', 2)
17
17
  ])], 36));
@@ -31,9 +31,9 @@ const Ne = /* @__PURE__ */ pe({
31
31
  ticks: {}
32
32
  },
33
33
  setup(l) {
34
- return (f, s) => (k(), b("div", Ye, [
34
+ return (f, s) => (_(), k("div", Ye, [
35
35
  c("div", He, [
36
- (k(!0), b(ge, null, he(l.ticks, (o) => (k(), b("div", {
36
+ (_(!0), k(ge, null, he(l.ticks, (o) => (_(), k("div", {
37
37
  key: o.timeMs,
38
38
  class: $e(["ve-ruler__tick", { "ve-ruler__tick--major": o.isMajor }]),
39
39
  style: D({
@@ -42,7 +42,7 @@ const Ne = /* @__PURE__ */ pe({
42
42
  })
43
43
  }, [
44
44
  s[0] || (s[0] = c("div", { class: "ve-ruler__line" }, null, -1)),
45
- o.isMajor && o.label ? (k(), b("div", We, G(o.label), 1)) : ee("", !0)
45
+ o.isMajor && o.label ? (_(), k("div", We, G(o.label), 1)) : ee("", !0)
46
46
  ], 6))), 128))
47
47
  ])
48
48
  ]));
@@ -61,14 +61,14 @@ const Ne = /* @__PURE__ */ pe({
61
61
  emits: ["zoomIn", "zoomOut"],
62
62
  setup(l, { emit: f }) {
63
63
  const s = f;
64
- return (o, i) => (k(), b("div", Ue, [
64
+ return (o, i) => (_(), k("div", Ue, [
65
65
  c("div", Ke, [
66
66
  V(o.$slots, "left-actions", {}, () => [
67
67
  c("button", {
68
68
  class: "ve-btn",
69
69
  type: "button",
70
70
  disabled: l.zoom <= l.minZoom,
71
- onClick: i[0] || (i[0] = (_) => s("zoomOut"))
71
+ onClick: i[0] || (i[0] = (b) => s("zoomOut"))
72
72
  }, " - ", 8, qe)
73
73
  ], !0)
74
74
  ]),
@@ -83,7 +83,7 @@ const Ne = /* @__PURE__ */ pe({
83
83
  class: "ve-btn",
84
84
  type: "button",
85
85
  disabled: l.zoom >= l.maxZoom,
86
- onClick: i[1] || (i[1] = (_) => s("zoomIn"))
86
+ onClick: i[1] || (i[1] = (b) => s("zoomIn"))
87
87
  }, " + ", 8, tt)
88
88
  ], !0)
89
89
  ]),
@@ -108,13 +108,13 @@ function lt(l, f, s, o) {
108
108
  if (I < p / 2)
109
109
  return { isGap: !0, insertIndex: 0 };
110
110
  for (let g = 0; g < f.value.length; g++) {
111
- const u = (g + 1) * r - p / 2, te = (g + 1) * r + p / 2;
112
- if (I >= u && I < te)
111
+ const d = (g + 1) * r - p / 2, te = (g + 1) * r + p / 2;
112
+ if (I >= d && I < te)
113
113
  return { isGap: !0, insertIndex: g + 1 };
114
114
  }
115
115
  return null;
116
116
  }
117
- function _(Z) {
117
+ function b(Z) {
118
118
  if (!l.value || !f.value.length)
119
119
  return -1;
120
120
  const h = l.value.getBoundingClientRect(), I = Z - h.top, r = s.value + o.value;
@@ -125,7 +125,7 @@ function lt(l, f, s, o) {
125
125
  }
126
126
  return {
127
127
  detectTrackGap: i,
128
- resolveTrackIndexFromClientY: _
128
+ resolveTrackIndexFromClientY: b
129
129
  };
130
130
  }
131
131
  function ot(l, f, s) {
@@ -133,10 +133,10 @@ function ot(l, f, s) {
133
133
  snapGuides: M(() => {
134
134
  if (!l.value)
135
135
  return [];
136
- const i = /* @__PURE__ */ new Set(), _ = l.value.startTime, Z = l.value.endTime, h = 100;
136
+ const i = /* @__PURE__ */ new Set(), b = l.value.startTime, Z = l.value.endTime, h = 100;
137
137
  return ("value" in f ? f.value : f).forEach((r) => {
138
138
  r.segments.forEach((p) => {
139
- p.id !== l.value?.segment.id && (Math.abs(p.start - _) < h && i.add(p.start), Math.abs(p.end - _) < h && i.add(p.end), Math.abs(p.start - Z) < h && i.add(p.start), Math.abs(p.end - Z) < h && i.add(p.end));
139
+ p.id !== l.value?.segment.id && (Math.abs(p.start - b) < h && i.add(p.start), Math.abs(p.end - b) < h && i.add(p.end), Math.abs(p.start - Z) < h && i.add(p.start), Math.abs(p.end - Z) < h && i.add(p.end));
140
140
  });
141
141
  }), Array.from(i).map((r) => ({
142
142
  time: r,
@@ -151,21 +151,21 @@ function it(l) {
151
151
  tracksRef: s,
152
152
  trackHeightPx: o,
153
153
  trackGapPx: i,
154
- pixelsPerMs: _,
154
+ pixelsPerMs: b,
155
155
  disableInteraction: Z,
156
156
  snap: h,
157
157
  onDragStart: I,
158
158
  onDrag: r,
159
159
  onDragEnd: p
160
- } = l, g = z(null), u = z(null), { detectTrackGap: te, resolveTrackIndexFromClientY: be } = lt(
160
+ } = l, g = z(null), d = z(null), { detectTrackGap: te, resolveTrackIndexFromClientY: ke } = lt(
161
161
  s,
162
162
  f,
163
163
  o,
164
164
  i
165
165
  ), { snapGuides: oe } = ot(
166
- u,
166
+ d,
167
167
  f,
168
- _
168
+ b
169
169
  );
170
170
  function ie(v, q) {
171
171
  Z.value || (g.value = {
@@ -176,41 +176,41 @@ function it(l) {
176
176
  });
177
177
  }
178
178
  function re(v, q, F, $) {
179
- const { layout: d, initialX: ke, initialY: _e } = v, de = q - ke, O = F - _e, Y = Math.abs(de) > 5 || Math.abs(O) > 5;
179
+ const { layout: u, initialX: _e, initialY: be } = v, ue = q - _e, O = F - be, Y = Math.abs(ue) > 5 || Math.abs(O) > 5;
180
180
  if (!v.moved && Y) {
181
181
  v.moved = !0;
182
182
  const E = {
183
- segment: d.segment,
184
- track: d.track,
185
- trackIndex: d.trackIndex,
186
- segmentIndex: d.segmentIndex,
187
- startTime: d.segment.start,
188
- endTime: d.segment.end,
189
- targetTrackIndex: d.trackIndex,
190
- targetTrackId: d.track.id,
183
+ segment: u.segment,
184
+ track: u.track,
185
+ trackIndex: u.trackIndex,
186
+ segmentIndex: u.segmentIndex,
187
+ startTime: u.segment.start,
188
+ endTime: u.segment.end,
189
+ targetTrackIndex: u.trackIndex,
190
+ targetTrackId: u.track.id,
191
191
  isNewTrack: !1,
192
- visualTrackIndex: d.trackIndex,
192
+ visualTrackIndex: u.trackIndex,
193
193
  isValidTarget: !0,
194
194
  mouseDeltaY: 0
195
195
  };
196
196
  I(E);
197
197
  }
198
- const H = d.segment.end - d.segment.start, W = d.segment.type || d.track.type, J = be(F), w = J >= 0 ? J : d.trackIndex, L = f.value[w];
198
+ const H = u.segment.end - u.segment.start, W = u.segment.type || u.track.type, J = ke(F), w = J >= 0 ? J : u.trackIndex, L = f.value[w];
199
199
  let x, Q, A, B = !1, ne, R = !0;
200
200
  if (L && L.type === W) {
201
201
  const E = te(F);
202
- E ? (B = !0, ne = E.insertIndex, x = E.insertIndex, Q = E.insertIndex, A = d.track.id, R = !0) : (x = w, Q = w, A = L.id, R = !0);
202
+ E ? (B = !0, ne = E.insertIndex, x = E.insertIndex, Q = E.insertIndex, A = u.track.id, R = !0) : (x = w, Q = w, A = L.id, R = !0);
203
203
  } else if (!s.value)
204
- x = d.trackIndex, Q = w, A = d.track.id, R = !1;
204
+ x = u.trackIndex, Q = w, A = u.track.id, R = !1;
205
205
  else {
206
- const E = s.value.getBoundingClientRect(), ue = F - E.top, ce = o.value + i.value, me = w * ce + o.value / 2, ve = ue < me;
207
- B = !0, ne = ve ? w : w + 1, x = ne, Q = w, A = d.track.id, R = !0;
206
+ const E = s.value.getBoundingClientRect(), de = F - E.top, ce = o.value + i.value, me = w * ce + o.value / 2, ve = de < me;
207
+ B = !0, ne = ve ? w : w + 1, x = ne, Q = w, A = u.track.id, R = !0;
208
208
  }
209
- const Te = h(d.segment.start + de / Math.max(_.value, 1e-4)), j = Math.max(0, Te), Ie = j + H, se = {
210
- segment: d.segment,
211
- track: d.track,
212
- trackIndex: d.trackIndex,
213
- segmentIndex: d.segmentIndex,
209
+ const Te = h(u.segment.start + ue / Math.max(b.value, 1e-4)), j = Math.max(0, Te), Ie = j + H, se = {
210
+ segment: u.segment,
211
+ track: u.track,
212
+ trackIndex: u.trackIndex,
213
+ segmentIndex: u.segmentIndex,
214
214
  startTime: j,
215
215
  endTime: Ie,
216
216
  targetTrackIndex: x,
@@ -221,18 +221,18 @@ function it(l) {
221
221
  isValidTarget: R,
222
222
  mouseDeltaY: O
223
223
  };
224
- v.moved && (u.value = se, $ === "drag" ? r(se) : $ === "end" && p(se));
224
+ v.moved && (d.value = se, $ === "drag" ? r(se) : $ === "end" && p(se));
225
225
  }
226
226
  function S(v) {
227
227
  g.value && re(g.value, v.clientX, v.clientY, "drag");
228
228
  }
229
229
  function T(v) {
230
- g.value && (re(g.value, v.clientX, v.clientY, "end"), g.value = null, u.value = null);
230
+ g.value && (re(g.value, v.clientX, v.clientY, "end"), g.value = null, d.value = null);
231
231
  }
232
232
  return {
233
233
  // State
234
234
  draggingState: g,
235
- dragPreview: u,
235
+ dragPreview: d,
236
236
  snapGuides: oe,
237
237
  // Methods
238
238
  startDrag: ie,
@@ -240,10 +240,10 @@ function it(l) {
240
240
  handleDragEnd: T
241
241
  };
242
242
  }
243
- const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["onMousedown", "onClick"], ct = { class: "ve-segment__content" }, mt = { class: "ve-segment__title" }, vt = { class: "ve-segment__time" }, ft = {
243
+ const rt = { class: "ve-timeline" }, ut = { class: "ve-track__body" }, dt = ["onMousedown", "onClick"], ct = { class: "ve-segment__content" }, mt = { class: "ve-segment__title" }, vt = { class: "ve-segment__time" }, ft = {
244
244
  key: 0,
245
245
  class: "ve-segment__selection"
246
- }, gt = ["onMousedown"], ht = ["onMousedown"], pt = { class: "ve-segment__content" }, xt = { class: "ve-segment__title" }, bt = { class: "ve-segment__time" }, kt = 120, Ee = 10, _t = /* @__PURE__ */ pe({
246
+ }, gt = ["onMousedown"], ht = ["onMousedown"], pt = { class: "ve-segment__content" }, xt = { class: "ve-segment__title" }, kt = { class: "ve-segment__time" }, _t = 120, Ee = 10, bt = /* @__PURE__ */ pe({
247
247
  name: "VideoTimeline",
248
248
  __name: "index",
249
249
  props: {
@@ -264,7 +264,7 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
264
264
  },
265
265
  emits: ["update:currentTime", "update:zoom", "segmentClick", "segmentDragStart", "segmentDrag", "segmentDragEnd", "segmentResizeStart", "segmentResize", "segmentResizeEnd", "backgroundClick"],
266
266
  setup(l, { emit: f }) {
267
- const s = l, o = f, i = z(null), _ = z(null), Z = z(null), h = z(0);
267
+ const s = l, o = f, i = z(null), b = z(null), Z = z(null), h = z(0);
268
268
  let I = null;
269
269
  const r = z(B(s.zoom ?? s.minZoom)), p = z(!1);
270
270
  fe(() => s.zoom, (e) => {
@@ -285,20 +285,20 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
285
285
  const n = B(t * e / h.value);
286
286
  Math.abs(n - r.value) > 1e-6 && (r.value = n);
287
287
  });
288
- const u = M(() => {
288
+ const d = M(() => {
289
289
  const e = Math.max(g.value, 1);
290
290
  return Math.max(h.value, 1) * r.value / e;
291
291
  }), te = M(() => {
292
- const e = g.value * u.value, a = Number.isFinite(e) ? Math.max(e, 0) : 0;
292
+ const e = g.value * d.value, a = Number.isFinite(e) ? Math.max(e, 0) : 0;
293
293
  return Math.max(Math.ceil(a), Math.ceil(h.value || 0));
294
- }), be = M(() => {
295
- const e = Math.max(u.value, 1e-4), t = (te.value || h.value || 0) / e;
294
+ }), ke = M(() => {
295
+ const e = Math.max(d.value, 1e-4), t = (te.value || h.value || 0) / e;
296
296
  return Math.max(g.value, t);
297
- }), oe = M(() => s.currentTime * u.value), ie = M(() => Te(be.value, u.value)), re = M(() => 1e3 / Math.max(s.fps || 30, 1)), S = M(() => s.trackHeight), T = M(() => s.trackGap), v = M(() => s.rulerHeight), q = M(() => s.tracks.map((e, a) => ({
297
+ }), oe = M(() => s.currentTime * d.value), ie = M(() => Te(ke.value, d.value)), re = M(() => 1e3 / Math.max(s.fps || 30, 1)), S = M(() => s.trackHeight), T = M(() => s.trackGap), v = M(() => s.rulerHeight), q = M(() => s.tracks.map((e, a) => ({
298
298
  track: e,
299
299
  trackIndex: a,
300
300
  segments: e.segments.map((t, n) => {
301
- const m = Math.max((t.end - t.start) * u.value, 6), C = t.start * u.value;
301
+ const m = Math.max((t.end - t.start) * d.value, 6), C = t.start * d.value;
302
302
  return {
303
303
  track: e,
304
304
  trackIndex: a,
@@ -312,16 +312,16 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
312
312
  }))), {
313
313
  draggingState: F,
314
314
  dragPreview: $,
315
- snapGuides: d,
316
- startDrag: ke,
317
- handleDragMove: _e,
318
- handleDragEnd: de
315
+ snapGuides: u,
316
+ startDrag: _e,
317
+ handleDragMove: be,
318
+ handleDragEnd: ue
319
319
  } = it({
320
320
  tracks: Re(s, "tracks"),
321
321
  tracksRef: Z,
322
322
  trackHeightPx: S,
323
323
  trackGapPx: T,
324
- pixelsPerMs: u,
324
+ pixelsPerMs: d,
325
325
  disableInteraction: Re(s, "disableInteraction"),
326
326
  snap: j,
327
327
  onDragStart: (e) => {
@@ -339,7 +339,7 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
339
339
  const e = $.value, t = q.value.find((y) => y.track.id === e.track.id)?.segments.find((y) => y.segment.id === e.segment.id);
340
340
  if (!t)
341
341
  return null;
342
- const n = (e.startTime - e.segment.start) * u.value, C = v.value + e.trackIndex * (S.value + T.value) + T.value + e.mouseDeltaY;
342
+ const n = (e.startTime - e.segment.start) * d.value, C = v.value + e.trackIndex * (S.value + T.value) + T.value + e.mouseDeltaY;
343
343
  return {
344
344
  ...t,
345
345
  left: t.left + n,
@@ -365,7 +365,7 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
365
365
  const e = i.value;
366
366
  if (!e)
367
367
  return;
368
- const a = e.clientWidth / 2, t = s.currentTime * u.value - a;
368
+ const a = e.clientWidth / 2, t = s.currentTime * d.value - a;
369
369
  e.scrollLeft = Math.max(0, t);
370
370
  }
371
371
  function B(e) {
@@ -411,25 +411,25 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
411
411
  return Math.max(Math.round(e / t) * t, 0);
412
412
  }
413
413
  function Ie(e) {
414
- if (!_.value)
414
+ if (!b.value)
415
415
  return;
416
416
  if (L.value) {
417
417
  L.value = !1;
418
418
  return;
419
419
  }
420
- const a = _.value.getBoundingClientRect(), t = e.clientX - a.left, n = j(t / Math.max(u.value, 1e-4));
420
+ const a = b.value.getBoundingClientRect(), t = e.clientX - a.left, n = j(t / Math.max(d.value, 1e-4));
421
421
  o("update:currentTime", n), o("backgroundClick", e), w.value = !0;
422
422
  }
423
423
  function se(e) {
424
424
  s.disableInteraction || (e.preventDefault(), J.value = !0, w.value = !0, E(e.clientX), A());
425
425
  }
426
426
  function E(e) {
427
- if (!_.value)
427
+ if (!b.value)
428
428
  return;
429
- const a = _.value.getBoundingClientRect(), t = e - a.left, n = j(t / Math.max(u.value, 1e-4));
429
+ const a = b.value.getBoundingClientRect(), t = e - a.left, n = j(t / Math.max(d.value, 1e-4));
430
430
  o("update:currentTime", n);
431
431
  }
432
- function ue(e, a, t) {
432
+ function de(e, a, t) {
433
433
  if (s.disableInteraction)
434
434
  return;
435
435
  t.stopPropagation(), t.preventDefault(), W.value = {
@@ -449,7 +449,7 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
449
449
  O.value = n, o("segmentResizeStart", n);
450
450
  }
451
451
  function ce(e, a, t) {
452
- const { layout: n, edge: m, initialX: C } = e, X = (a - C) / Math.max(u.value, 1e-4), P = Math.max(s.minSegmentDuration, 10);
452
+ const { layout: n, edge: m, initialX: C } = e, X = (a - C) / Math.max(d.value, 1e-4), P = Math.max(s.minSegmentDuration, 10);
453
453
  let N = n.segment.start, U = n.segment.end;
454
454
  m === "start" ? (N = j(Math.max(0, n.segment.start + X)), n.segment.end - N < P && (N = n.segment.end - P)) : U = j(Math.max(n.segment.start + P, n.segment.end + X));
455
455
  const ae = {
@@ -475,7 +475,7 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
475
475
  ce(W.value, e.clientX, "drag");
476
476
  return;
477
477
  }
478
- _e(e);
478
+ be(e);
479
479
  }
480
480
  function ve(e) {
481
481
  if (J.value) {
@@ -493,7 +493,7 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
493
493
  const { layout: a } = F.value;
494
494
  we(a, e);
495
495
  }
496
- de(e), w.value = !1;
496
+ ue(e), w.value = !1;
497
497
  }
498
498
  function Ce() {
499
499
  r.value = B(r.value * 1.25);
@@ -508,7 +508,7 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
508
508
  const ae = U.mainMs * e;
509
509
  if (ae < Ee)
510
510
  continue;
511
- const ze = Math.abs(ae - kt);
511
+ const ze = Math.abs(ae - _t);
512
512
  ze < N && (P = U, N = ze);
513
513
  }
514
514
  return P || X[X.length - 1] || y[y.length - 1];
@@ -553,7 +553,7 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
553
553
  }
554
554
  return Me(e);
555
555
  }
556
- return (e, a) => (k(), b("div", rt, [
556
+ return (e, a) => (_(), k("div", rt, [
557
557
  V(e.$slots, "toolbar", {
558
558
  zoom: r.value,
559
559
  canZoomIn: r.value < l.maxZoom,
@@ -583,13 +583,13 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
583
583
  }, [
584
584
  c("div", {
585
585
  ref_key: "contentRef",
586
- ref: _,
586
+ ref: b,
587
587
  class: "ve-timeline__content",
588
588
  style: D({ width: `${te.value}px` })
589
589
  }, [
590
590
  V(e.$slots, "ruler", {
591
591
  ticks: ie.value,
592
- pixelsPerMs: u.value
592
+ pixelsPerMs: d.value
593
593
  }, () => [
594
594
  ye(je, {
595
595
  ticks: ie.value,
@@ -612,7 +612,7 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
612
612
  class: "ve-timeline__tracks",
613
613
  style: D({ gap: `${T.value}px`, paddingTop: `${T.value}px` })
614
614
  }, [
615
- (k(!0), b(ge, null, he(q.value, (t) => (k(), b("div", {
615
+ (_(!0), k(ge, null, he(q.value, (t) => (_(), k("div", {
616
616
  key: t.track.id,
617
617
  class: $e(["ve-track", { "ve-track--main": t.track.isMain }]),
618
618
  style: D({ height: `${S.value}px` })
@@ -621,11 +621,11 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
621
621
  track: t.track,
622
622
  index: t.trackIndex,
623
623
  segments: t.segments,
624
- pixelsPerMs: u.value,
624
+ pixelsPerMs: d.value,
625
625
  height: S.value
626
626
  }, () => [
627
- c("div", dt, [
628
- (k(!0), b(ge, null, he(t.segments, (n) => Ve((k(), b("div", {
627
+ c("div", ut, [
628
+ (_(!0), k(ge, null, he(t.segments, (n) => Ve((_(), k("div", {
629
629
  key: n.segment.id,
630
630
  class: $e(["ve-segment", {
631
631
  "ve-segment--selected": n.isSelected
@@ -635,7 +635,7 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
635
635
  width: `${n.width}px`,
636
636
  backgroundColor: n.segment.color || t.track.color || "var(--ve-primary)"
637
637
  }),
638
- onMousedown: le((m) => K(ke)(n, m), ["prevent", "stop"]),
638
+ onMousedown: le((m) => K(_e)(n, m), ["prevent", "stop"]),
639
639
  onClick: le((m) => we(n, m), ["stop"])
640
640
  }, [
641
641
  V(e.$slots, "segment", {
@@ -649,28 +649,28 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
649
649
  c("div", vt, G(R(n.segment.start)) + " - " + G(R(n.segment.end)), 1)
650
650
  ])
651
651
  ], !0),
652
- n.isSelected ? (k(), b("div", ft, [
652
+ n.isSelected ? (_(), k("div", ft, [
653
653
  c("div", {
654
654
  class: "ve-segment__handle ve-segment__handle--left",
655
- onMousedown: le((m) => ue(n, "start", m), ["stop"])
655
+ onMousedown: le((m) => de(n, "start", m), ["stop"])
656
656
  }, [...a[0] || (a[0] = [
657
- Se('<div class="ve-segment__handle-dots" data-v-dedc3cbb><div class="ve-segment__handle-dot" data-v-dedc3cbb></div><div class="ve-segment__handle-dot" data-v-dedc3cbb></div><div class="ve-segment__handle-dot" data-v-dedc3cbb></div><div class="ve-segment__handle-dot" data-v-dedc3cbb></div></div>', 1)
657
+ Se('<div class="ve-segment__handle-dots" data-v-547cac41><div class="ve-segment__handle-dot" data-v-547cac41></div><div class="ve-segment__handle-dot" data-v-547cac41></div><div class="ve-segment__handle-dot" data-v-547cac41></div><div class="ve-segment__handle-dot" data-v-547cac41></div></div>', 1)
658
658
  ])], 40, gt),
659
659
  c("div", {
660
660
  class: "ve-segment__handle ve-segment__handle--right",
661
- onMousedown: le((m) => ue(n, "end", m), ["stop"])
661
+ onMousedown: le((m) => de(n, "end", m), ["stop"])
662
662
  }, [...a[1] || (a[1] = [
663
- Se('<div class="ve-segment__handle-dots" data-v-dedc3cbb><div class="ve-segment__handle-dot" data-v-dedc3cbb></div><div class="ve-segment__handle-dot" data-v-dedc3cbb></div><div class="ve-segment__handle-dot" data-v-dedc3cbb></div><div class="ve-segment__handle-dot" data-v-dedc3cbb></div></div>', 1)
663
+ Se('<div class="ve-segment__handle-dots" data-v-547cac41><div class="ve-segment__handle-dot" data-v-547cac41></div><div class="ve-segment__handle-dot" data-v-547cac41></div><div class="ve-segment__handle-dot" data-v-547cac41></div><div class="ve-segment__handle-dot" data-v-547cac41></div></div>', 1)
664
664
  ])], 40, ht)
665
665
  ])) : ee("", !0)
666
- ], 46, ut)), [
666
+ ], 46, dt)), [
667
667
  [Le, K($)?.segment.id !== n.segment.id && O.value?.segment.id !== n.segment.id]
668
668
  ])), 128))
669
669
  ])
670
670
  ], !0)
671
671
  ], 6))), 128))
672
672
  ], 4),
673
- x.value ? (k(), b("div", {
673
+ x.value ? (_(), k("div", {
674
674
  key: 0,
675
675
  class: "ve-segment ve-segment--dragging",
676
676
  style: D({
@@ -689,16 +689,16 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
689
689
  }, () => [
690
690
  c("div", pt, [
691
691
  c("div", xt, G(x.value.segment.type || "segment"), 1),
692
- c("div", bt, G(R(x.value.segment.start)) + " - " + G(R(x.value.segment.end)), 1)
692
+ c("div", kt, G(R(x.value.segment.start)) + " - " + G(R(x.value.segment.end)), 1)
693
693
  ])
694
694
  ], !0)
695
695
  ], 4)) : ee("", !0),
696
- Y.value && !Y.value.isNewTrack ? (k(), b("div", {
696
+ Y.value && !Y.value.isNewTrack ? (_(), k("div", {
697
697
  key: 1,
698
698
  class: "ve-segment ve-segment--placeholder",
699
699
  style: D({
700
- left: `${Y.value.startTime * u.value}px`,
701
- width: `${(Y.value.endTime - Y.value.startTime) * u.value}px`,
700
+ left: `${Y.value.startTime * d.value}px`,
701
+ width: `${(Y.value.endTime - Y.value.startTime) * d.value}px`,
702
702
  top: `${Q.value}px`,
703
703
  height: `${S.value}px`
704
704
  })
@@ -710,18 +710,18 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
710
710
  })
711
711
  }, null, 4)
712
712
  ], 4)) : ee("", !0),
713
- H.value ? (k(), b("div", {
713
+ H.value ? (_(), k("div", {
714
714
  key: 2,
715
715
  class: "ve-segment ve-segment--preview",
716
716
  style: D({
717
- left: `${H.value.startTime * u.value}px`,
718
- width: `${(H.value.endTime - H.value.startTime) * u.value}px`,
717
+ left: `${H.value.startTime * d.value}px`,
718
+ width: `${(H.value.endTime - H.value.startTime) * d.value}px`,
719
719
  top: `${v.value + H.value.trackIndex * (S.value + T.value) + T.value}px`,
720
720
  height: `${S.value}px`,
721
721
  backgroundColor: H.value.segment.color || "var(--ve-primary)"
722
722
  })
723
723
  }, null, 4)) : ee("", !0),
724
- K($) && K(d).length ? (k(!0), b(ge, { key: 3 }, he(K(d), (t) => (k(), b("div", {
724
+ K($) && K(u).length ? (_(!0), k(ge, { key: 3 }, he(K(u), (t) => (_(), k("div", {
725
725
  key: `snap-${t.time}`,
726
726
  class: "ve-snap-guide",
727
727
  style: D({
@@ -730,7 +730,7 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
730
730
  height: `calc(100% - ${v.value}px)`
731
731
  })
732
732
  }, null, 4))), 128)) : ee("", !0),
733
- K($) && K($).isNewTrack ? (k(), b("div", {
733
+ K($) && K($).isNewTrack ? (_(), k("div", {
734
734
  key: 4,
735
735
  class: "ve-new-track-line",
736
736
  style: D({
@@ -743,7 +743,7 @@ const rt = { class: "ve-timeline" }, dt = { class: "ve-track__body" }, ut = ["on
743
743
  ], 512)
744
744
  ]));
745
745
  }
746
- }), Tt = /* @__PURE__ */ xe(_t, [["__scopeId", "data-v-dedc3cbb"]]);
746
+ }), Tt = /* @__PURE__ */ xe(bt, [["__scopeId", "data-v-547cac41"]]);
747
747
  export {
748
748
  Tt as V,
749
749
  xe as _