@cliquify.me/state 4.0.18 → 4.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -101,10 +101,10 @@ var Ar = function() {
101
101
  }
102
102
  else
103
103
  c.remove(this);
104
- var h = this.initialTeardown;
105
- if (Ct(h))
104
+ var m = this.initialTeardown;
105
+ if (Ct(m))
106
106
  try {
107
- h();
107
+ m();
108
108
  } catch (k) {
109
109
  o = k instanceof pn ? k.errors : [k];
110
110
  }
@@ -112,10 +112,10 @@ var Ar = function() {
112
112
  if (b) {
113
113
  this._finalizers = null;
114
114
  try {
115
- for (var m = kn(b), I = m.next(); !I.done; I = m.next()) {
116
- var _ = I.value;
115
+ for (var h = kn(b), I = h.next(); !I.done; I = h.next()) {
116
+ var v = I.value;
117
117
  try {
118
- Un(_);
118
+ Un(v);
119
119
  } catch (k) {
120
120
  o = o ?? [], k instanceof pn ? o = _n(_n([], vn(o)), vn(k.errors)) : o.push(k);
121
121
  }
@@ -124,7 +124,7 @@ var Ar = function() {
124
124
  n = { error: k };
125
125
  } finally {
126
126
  try {
127
- I && !I.done && (i = m.return) && i.call(m);
127
+ I && !I.done && (i = h.return) && i.call(h);
128
128
  } finally {
129
129
  if (n) throw n.error;
130
130
  }
@@ -492,8 +492,8 @@ function Cn(t) {
492
492
  var vr = { exports: {} };
493
493
  vr.exports;
494
494
  (function(t, r) {
495
- var e = 200, n = "__lodash_hash_undefined__", i = 1, o = 2, c = 9007199254740991, u = "[object Arguments]", d = "[object Array]", p = "[object AsyncFunction]", h = "[object Boolean]", b = "[object Date]", m = "[object Error]", I = "[object Function]", _ = "[object GeneratorFunction]", k = "[object Map]", w = "[object Number]", f = "[object Null]", y = "[object Object]", v = "[object Promise]", S = "[object Proxy]", A = "[object RegExp]", E = "[object Set]", T = "[object String]", H = "[object Symbol]", R = "[object Undefined]", V = "[object WeakMap]", x = "[object ArrayBuffer]", F = "[object DataView]", tt = "[object Float32Array]", Xt = "[object Float64Array]", Kt = "[object Int8Array]", Ie = "[object Int16Array]", be = "[object Int32Array]", ke = "[object Uint8Array]", ve = "[object Uint8ClampedArray]", z = "[object Uint16Array]", _e = "[object Uint32Array]", Se = /[\\^$.*+?()[\]{}|]/g, st = /^\[object .+?Constructor\]$/, Vt = /^(?:0|[1-9]\d*)$/, $ = {};
496
- $[tt] = $[Xt] = $[Kt] = $[Ie] = $[be] = $[ke] = $[ve] = $[z] = $[_e] = !0, $[u] = $[d] = $[x] = $[h] = $[F] = $[b] = $[m] = $[I] = $[k] = $[w] = $[y] = $[A] = $[E] = $[T] = $[V] = !1;
495
+ var e = 200, n = "__lodash_hash_undefined__", i = 1, o = 2, c = 9007199254740991, u = "[object Arguments]", d = "[object Array]", p = "[object AsyncFunction]", m = "[object Boolean]", b = "[object Date]", h = "[object Error]", I = "[object Function]", v = "[object GeneratorFunction]", k = "[object Map]", w = "[object Number]", f = "[object Null]", y = "[object Object]", _ = "[object Promise]", S = "[object Proxy]", A = "[object RegExp]", E = "[object Set]", T = "[object String]", H = "[object Symbol]", R = "[object Undefined]", V = "[object WeakMap]", x = "[object ArrayBuffer]", F = "[object DataView]", tt = "[object Float32Array]", Xt = "[object Float64Array]", Kt = "[object Int8Array]", Ie = "[object Int16Array]", be = "[object Int32Array]", ke = "[object Uint8Array]", ve = "[object Uint8ClampedArray]", z = "[object Uint16Array]", _e = "[object Uint32Array]", Se = /[\\^$.*+?()[\]{}|]/g, st = /^\[object .+?Constructor\]$/, Vt = /^(?:0|[1-9]\d*)$/, $ = {};
496
+ $[tt] = $[Xt] = $[Kt] = $[Ie] = $[be] = $[ke] = $[ve] = $[z] = $[_e] = !0, $[u] = $[d] = $[x] = $[m] = $[F] = $[b] = $[h] = $[I] = $[k] = $[w] = $[y] = $[A] = $[E] = $[T] = $[V] = !1;
497
497
  var qt = typeof dt == "object" && dt && dt.Object === Object && dt, we = typeof self == "object" && self && self.Object === Object && self, it = qt || we || Function("return this")(), Jt = r && !r.nodeType && r, Zt = Jt && !0 && t && !t.nodeType && t, Rt = Zt && Zt.exports === Jt, Pt = Rt && qt.process, Qt = function() {
498
498
  try {
499
499
  return Pt && Pt.binding && Pt.binding("util");
@@ -793,11 +793,11 @@ vr.exports;
793
793
  s = s.buffer, a = a.buffer;
794
794
  case x:
795
795
  return !(s.byteLength != a.byteLength || !M(new ae(s), new ae(a)));
796
- case h:
796
+ case m:
797
797
  case b:
798
798
  case w:
799
799
  return fr(+s, +a);
800
- case m:
800
+ case h:
801
801
  return s.name == a.name && s.message == a.message;
802
802
  case A:
803
803
  case T:
@@ -877,7 +877,7 @@ vr.exports;
877
877
  return At.call(s, a);
878
878
  }));
879
879
  } : dn, bt = ue;
880
- (Le && bt(new Le(new ArrayBuffer(1))) != F || ce && bt(new ce()) != k || Ne && bt(Ne.resolve()) != v || He && bt(new He()) != E || Ue && bt(new Ue()) != V) && (bt = function(s) {
880
+ (Le && bt(new Le(new ArrayBuffer(1))) != F || ce && bt(new ce()) != k || Ne && bt(Ne.resolve()) != _ || He && bt(new He()) != E || Ue && bt(new Ue()) != V) && (bt = function(s) {
881
881
  var a = ue(s), l = a == y ? s.constructor : void 0, g = l ? rt(l) : "";
882
882
  if (g)
883
883
  switch (g) {
@@ -886,7 +886,7 @@ vr.exports;
886
886
  case Et:
887
887
  return k;
888
888
  case xr:
889
- return v;
889
+ return _;
890
890
  case Or:
891
891
  return E;
892
892
  case Cr:
@@ -943,7 +943,7 @@ vr.exports;
943
943
  if (!mr(s))
944
944
  return !1;
945
945
  var a = ue(s);
946
- return a == I || a == _ || a == p || a == S;
946
+ return a == I || a == v || a == p || a == S;
947
947
  }
948
948
  function Xe(s) {
949
949
  return typeof s == "number" && s > -1 && s % 1 == 0 && s <= c;
@@ -972,8 +972,8 @@ const W = /* @__PURE__ */ Cn(Zs), Io = "add", Qs = "track", ti = "trackItems", b
972
972
  var _r = { exports: {} };
973
973
  _r.exports;
974
974
  (function(t, r) {
975
- var e = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, o = "[object Arguments]", c = "[object Array]", u = "[object Boolean]", d = "[object Date]", p = "[object Error]", h = "[object Function]", b = "[object GeneratorFunction]", m = "[object Map]", I = "[object Number]", _ = "[object Object]", k = "[object Promise]", w = "[object RegExp]", f = "[object Set]", y = "[object String]", v = "[object Symbol]", S = "[object WeakMap]", A = "[object ArrayBuffer]", E = "[object DataView]", T = "[object Float32Array]", H = "[object Float64Array]", R = "[object Int8Array]", V = "[object Int16Array]", x = "[object Int32Array]", F = "[object Uint8Array]", tt = "[object Uint8ClampedArray]", Xt = "[object Uint16Array]", Kt = "[object Uint32Array]", Ie = /[\\^$.*+?()[\]{}|]/g, be = /\w*$/, ke = /^\[object .+?Constructor\]$/, ve = /^(?:0|[1-9]\d*)$/, z = {};
976
- z[o] = z[c] = z[A] = z[E] = z[u] = z[d] = z[T] = z[H] = z[R] = z[V] = z[x] = z[m] = z[I] = z[_] = z[w] = z[f] = z[y] = z[v] = z[F] = z[tt] = z[Xt] = z[Kt] = !0, z[p] = z[h] = z[S] = !1;
975
+ var e = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, o = "[object Arguments]", c = "[object Array]", u = "[object Boolean]", d = "[object Date]", p = "[object Error]", m = "[object Function]", b = "[object GeneratorFunction]", h = "[object Map]", I = "[object Number]", v = "[object Object]", k = "[object Promise]", w = "[object RegExp]", f = "[object Set]", y = "[object String]", _ = "[object Symbol]", S = "[object WeakMap]", A = "[object ArrayBuffer]", E = "[object DataView]", T = "[object Float32Array]", H = "[object Float64Array]", R = "[object Int8Array]", V = "[object Int16Array]", x = "[object Int32Array]", F = "[object Uint8Array]", tt = "[object Uint8ClampedArray]", Xt = "[object Uint16Array]", Kt = "[object Uint32Array]", Ie = /[\\^$.*+?()[\]{}|]/g, be = /\w*$/, ke = /^\[object .+?Constructor\]$/, ve = /^(?:0|[1-9]\d*)$/, z = {};
976
+ z[o] = z[c] = z[A] = z[E] = z[u] = z[d] = z[T] = z[H] = z[R] = z[V] = z[x] = z[h] = z[I] = z[v] = z[w] = z[f] = z[y] = z[_] = z[F] = z[tt] = z[Xt] = z[Kt] = !0, z[p] = z[m] = z[S] = !1;
977
977
  var _e = typeof dt == "object" && dt && dt.Object === Object && dt, Se = typeof self == "object" && self && self.Object === Object && self, st = _e || Se || Function("return this")(), Vt = r && !r.nodeType && r, $ = Vt && !0 && t && !t.nodeType && t, qt = $ && $.exports === Vt;
978
978
  function we(s, a) {
979
979
  return s.set(a[0], a[1]), s;
@@ -1178,10 +1178,10 @@ _r.exports;
1178
1178
  if (P = sn(s), !a)
1179
1179
  return en(s, P);
1180
1180
  } else {
1181
- var L = xt(s), J = L == h || L == b;
1181
+ var L = xt(s), J = L == m || L == b;
1182
1182
  if (hr(s))
1183
1183
  return Re(s, a);
1184
- if (L == _ || L == o || J && !M) {
1184
+ if (L == v || L == o || J && !M) {
1185
1185
  if (Dt(s))
1186
1186
  return M ? s : {};
1187
1187
  if (P = bt(J ? {} : s), !a)
@@ -1288,14 +1288,14 @@ _r.exports;
1288
1288
  return qr(l) ? l : void 0;
1289
1289
  }
1290
1290
  var Mt = Lt ? zt(Lt, Object) : dn, xt = Vr;
1291
- (At && xt(new At(new ArrayBuffer(1))) != E || yt && xt(new yt()) != m || ht && xt(ht.resolve()) != k || xe && xt(new xe()) != f || Fe && xt(new Fe()) != S) && (xt = function(s) {
1292
- var a = St.call(s), l = a == _ ? s.constructor : void 0, g = l ? rt(l) : void 0;
1291
+ (At && xt(new At(new ArrayBuffer(1))) != E || yt && xt(new yt()) != h || ht && xt(ht.resolve()) != k || xe && xt(new xe()) != f || Fe && xt(new Fe()) != S) && (xt = function(s) {
1292
+ var a = St.call(s), l = a == v ? s.constructor : void 0, g = l ? rt(l) : void 0;
1293
1293
  if (g)
1294
1294
  switch (g) {
1295
1295
  case Le:
1296
1296
  return E;
1297
1297
  case ce:
1298
- return m;
1298
+ return h;
1299
1299
  case Ne:
1300
1300
  return k;
1301
1301
  case He:
@@ -1332,7 +1332,7 @@ _r.exports;
1332
1332
  case Xt:
1333
1333
  case Kt:
1334
1334
  return tn(s, g);
1335
- case m:
1335
+ case h:
1336
1336
  return ur(s, g, l);
1337
1337
  case I:
1338
1338
  case y:
@@ -1341,7 +1341,7 @@ _r.exports;
1341
1341
  return lr(s);
1342
1342
  case f:
1343
1343
  return Zr(s, g, l);
1344
- case v:
1344
+ case _:
1345
1345
  return Qr(s);
1346
1346
  }
1347
1347
  }
@@ -1391,7 +1391,7 @@ _r.exports;
1391
1391
  var hr = Tt || fn;
1392
1392
  function Xe(s) {
1393
1393
  var a = kt(s) ? St.call(s) : "";
1394
- return a == h || a == b;
1394
+ return a == m || a == b;
1395
1395
  }
1396
1396
  function mr(s) {
1397
1397
  return typeof s == "number" && s > -1 && s % 1 == 0 && s <= i;
@@ -1435,37 +1435,37 @@ function nt(t, r, e) {
1435
1435
  ), c = i.filter(
1436
1436
  (I) => !e.includes(I.id)
1437
1437
  ).sort(
1438
- (I, _) => I.display.from - _.display.from
1438
+ (I, v) => I.display.from - v.display.from
1439
1439
  ), u = i.sort(
1440
- (I, _) => I.display.from - _.display.from
1440
+ (I, v) => I.display.from - v.display.from
1441
1441
  ), d = c[c.length - 1];
1442
1442
  let p = (d == null ? void 0 : d.display.to) || 0;
1443
1443
  u.forEach((I) => {
1444
1444
  if (e.includes(I.id)) {
1445
- const _ = I.display.to - I.display.from;
1445
+ const v = I.display.to - I.display.from;
1446
1446
  I.display = {
1447
1447
  from: p,
1448
- to: p + _
1449
- }, p = p + _;
1448
+ to: p + v
1449
+ }, p = p + v;
1450
1450
  }
1451
1451
  });
1452
1452
  const b = i.sort(
1453
- (I, _) => I.display.from - _.display.from
1453
+ (I, v) => I.display.from - v.display.from
1454
1454
  ).map((I) => I.id);
1455
- let m = 0;
1455
+ let h = 0;
1456
1456
  b.forEach((I) => {
1457
- const _ = [];
1457
+ const v = [];
1458
1458
  let k = 0;
1459
- if (_.forEach((w) => {
1459
+ if (v.forEach((w) => {
1460
1460
  w.forEach((f) => {
1461
1461
  f.type === "transition" && (k += f.duration);
1462
1462
  });
1463
1463
  }), r[I]) {
1464
1464
  const w = r[I].display.to - r[I].display.from;
1465
1465
  r[I].display = {
1466
- from: m - k,
1467
- to: m + w - k
1468
- }, m += w;
1466
+ from: h - k,
1467
+ to: h + w - k
1468
+ }, h += w;
1469
1469
  }
1470
1470
  });
1471
1471
  });
@@ -1480,28 +1480,28 @@ function Ni(t, r, e) {
1480
1480
  function Hi(t, r) {
1481
1481
  const e = C(t), n = r && r.length ? r : e.activeIds, i = n.map((y) => e.trackItemsMap[y]).filter((y) => !!y).map((y) => y.id), o = e.transitionIds.filter(
1482
1482
  (y) => {
1483
- const v = e.transitionsMap[y];
1484
- return i.includes(v.fromId) || i.includes(v.toId);
1483
+ const _ = e.transitionsMap[y];
1484
+ return i.includes(_.fromId) || i.includes(_.toId);
1485
1485
  }
1486
1486
  );
1487
1487
  i.push(...o);
1488
- const c = {}, u = e.trackItemIds, d = e.transitionIds, p = C(e.tracks), h = C(e.structure);
1488
+ const c = {}, u = e.trackItemIds, d = e.transitionIds, p = C(e.tracks), m = C(e.structure);
1489
1489
  i.forEach((y) => {
1490
1490
  var S;
1491
- const v = e.trackItemsMap[y] || e.transitionsMap[y];
1492
- if (v.type === "template" || v.type === "composition") {
1491
+ const _ = e.trackItemsMap[y] || e.transitionsMap[y];
1492
+ if (_.type === "template" || _.type === "composition") {
1493
1493
  const A = (S = e.structure.find(
1494
- (T) => T.id === v.id
1494
+ (T) => T.id === _.id
1495
1495
  )) == null ? void 0 : S.items;
1496
1496
  i.push(...A);
1497
- const E = h.findIndex(
1498
- (T) => T.id === v.id
1497
+ const E = m.findIndex(
1498
+ (T) => T.id === _.id
1499
1499
  );
1500
- h.splice(E, 1);
1500
+ m.splice(E, 1);
1501
1501
  }
1502
1502
  }), i.forEach((y) => {
1503
- h.forEach((v) => {
1504
- v.items.includes(y) && (v.items = v.items.filter((S) => S !== y));
1503
+ m.forEach((_) => {
1504
+ _.items.includes(y) && (_.items = _.items.filter((S) => S !== y));
1505
1505
  });
1506
1506
  });
1507
1507
  const b = u.filter(
@@ -1510,7 +1510,7 @@ function Hi(t, r) {
1510
1510
  d.forEach((y) => {
1511
1511
  n.includes(y) && n.length === 1 && (c[y] = C(e.transitionsMap[y]));
1512
1512
  });
1513
- const m = d.filter(
1513
+ const h = d.filter(
1514
1514
  (y) => !i.includes(y) && !n.includes(y)
1515
1515
  ), I = Object.fromEntries(
1516
1516
  Object.entries(e.transitionsMap).filter(
@@ -1520,7 +1520,7 @@ function Hi(t, r) {
1520
1520
  Object.keys(I).forEach((y) => {
1521
1521
  n.includes(y) && (I[y].kind = "none");
1522
1522
  });
1523
- const _ = Li(
1523
+ const v = Li(
1524
1524
  e.tracks,
1525
1525
  i
1526
1526
  ), k = Object.fromEntries(
@@ -1533,17 +1533,17 @@ function Hi(t, r) {
1533
1533
  return Object.keys(c).forEach((y) => {
1534
1534
  Ni(
1535
1535
  c[y],
1536
- _,
1536
+ v,
1537
1537
  k
1538
1538
  );
1539
1539
  }), {
1540
1540
  trackItemIds: b,
1541
1541
  activeIds: [],
1542
1542
  trackItemsMap: k,
1543
- tracks: _,
1543
+ tracks: v,
1544
1544
  duration: f,
1545
- structure: h,
1546
- transitionIds: m,
1545
+ structure: m,
1546
+ transitionIds: h,
1547
1547
  transitionsMap: I
1548
1548
  };
1549
1549
  }
@@ -1573,24 +1573,24 @@ async function ji(t) {
1573
1573
  let r = localStorage.getItem("DesignComboTemp");
1574
1574
  if (!r) return {};
1575
1575
  const e = C(t), i = C(JSON.parse(r)).activeIds, o = i.map(() => Bt());
1576
- i.forEach((p, h) => {
1577
- r = r == null ? void 0 : r.split(p).join(o[h]);
1576
+ i.forEach((p, m) => {
1577
+ r = r == null ? void 0 : r.split(p).join(o[m]);
1578
1578
  });
1579
1579
  const u = JSON.parse(r).trackItemsMap, d = [];
1580
1580
  return o.forEach((p) => {
1581
- const h = u[p];
1582
- e.trackItemsMap[p] = h, e.trackItemIds.push(p);
1581
+ const m = u[p];
1582
+ e.trackItemsMap[p] = m, e.trackItemIds.push(p);
1583
1583
  const b = {
1584
1584
  id: Bt(),
1585
- type: h.type,
1585
+ type: m.type,
1586
1586
  items: [p],
1587
1587
  magnetic: !1,
1588
1588
  static: !1
1589
1589
  };
1590
- d.push(b), (h.type === "text" || h.type === "caption") && rr([
1590
+ d.push(b), (m.type === "text" || m.type === "caption") && rr([
1591
1591
  {
1592
- fontFamily: h.details.fontFamily,
1593
- url: h.details.fontUrl
1592
+ fontFamily: m.details.fontFamily,
1593
+ url: m.details.fontUrl
1594
1594
  }
1595
1595
  ]);
1596
1596
  }), e.tracks = [...d, ...e.tracks], e.duration = Y(e.trackItemsMap), {
@@ -1695,14 +1695,14 @@ async function Gi(t, r) {
1695
1695
  const e = { ...t }, n = Object.keys(r)[0], i = Object.values(r)[0], o = e.trackItemsMap[n], c = { ...e.trackItemsMap[n] }, u = o.details;
1696
1696
  if (!i.details.src) return {};
1697
1697
  if (o.type === "image") {
1698
- const d = await $e(i.details.src), { crop: p, newHeight: h, newWidth: b } = Kn(o, d);
1699
- i.details.crop = p, i.details.height = h, i.details.width = b;
1698
+ const d = await $e(i.details.src), { crop: p, newHeight: m, newWidth: b } = Kn(o, d);
1699
+ i.details.crop = p, i.details.height = m, i.details.width = b;
1700
1700
  } else if (o.type === "video") {
1701
- const d = await Dn(i.details.src), p = e.trackItemsMap[n], { display: h, duration: b, trim: m } = Vn(p, d), { crop: I, newHeight: _, newWidth: k } = Kn(o, d);
1702
- i.details.crop = I, i.details.height = _, i.details.width = k, c.display = h, c.duration = b, c.trim = m;
1701
+ const d = await Dn(i.details.src), p = e.trackItemsMap[n], { display: m, duration: b, trim: h } = Vn(p, d), { crop: I, newHeight: v, newWidth: k } = Kn(o, d);
1702
+ i.details.crop = I, i.details.height = v, i.details.width = k, c.display = m, c.duration = b, c.trim = h;
1703
1703
  } else if (o.type === "audio") {
1704
- const d = await ps(i.details.src), p = e.trackItemsMap[n], { display: h, duration: b, trim: m } = Vn(p, d);
1705
- c.display = h, c.duration = b, c.trim = m;
1704
+ const d = await ps(i.details.src), p = e.trackItemsMap[n], { display: m, duration: b, trim: h } = Vn(p, d);
1705
+ c.display = m, c.duration = b, c.trim = h;
1706
1706
  }
1707
1707
  return o.details = { ...u, ...i.details }, e.trackItemsMap[n] = { ...c }, {
1708
1708
  trackItemsMap: {
@@ -1721,7 +1721,7 @@ function Xi(t, r) {
1721
1721
  id: d
1722
1722
  }, e.trackItemIds.push(d);
1723
1723
  const p = e.tracks.find(
1724
- (h) => h.items.includes(c)
1724
+ (m) => m.items.includes(c)
1725
1725
  );
1726
1726
  n[p.id] ? n[p.id].items.push(d) : n[p.id] = {
1727
1727
  ...p,
@@ -1812,8 +1812,8 @@ function qi(t, r, e = 300, n = 300) {
1812
1812
  Object.assign(p, f);
1813
1813
  const y = w.replace(/\.(st[\w-]+)/g, `.${r}-$1`).replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`);
1814
1814
  k.textContent = y;
1815
- const v = Array.from(c.querySelectorAll("*")), S = /* @__PURE__ */ new Set();
1816
- v.forEach((A) => {
1815
+ const _ = Array.from(c.querySelectorAll("*")), S = /* @__PURE__ */ new Set();
1816
+ _.forEach((A) => {
1817
1817
  if (hn(A)) return;
1818
1818
  ["fill", "stroke", "stop-color"].forEach((H) => {
1819
1819
  const R = A.getAttribute(H);
@@ -1844,30 +1844,30 @@ function qi(t, r, e = 300, n = 300) {
1844
1844
  Ve(A) && i.push(A);
1845
1845
  });
1846
1846
  });
1847
- const h = Array.from(c.querySelectorAll("*")), b = /* @__PURE__ */ new Set();
1848
- return h.forEach((k) => {
1847
+ const m = Array.from(c.querySelectorAll("*")), b = /* @__PURE__ */ new Set();
1848
+ return m.forEach((k) => {
1849
1849
  if (hn(k)) return;
1850
1850
  const w = k.getAttribute("class");
1851
1851
  if (w) {
1852
- const y = w.split(" ").map((v) => `${r}-${v}`).join(" ");
1853
- k.setAttribute("class", y), y.split(" ").forEach((v) => {
1854
- const S = p[v];
1852
+ const y = w.split(" ").map((_) => `${r}-${_}`).join(" ");
1853
+ k.setAttribute("class", y), y.split(" ").forEach((_) => {
1854
+ const S = p[_];
1855
1855
  S != null && S.fill && !["none", "transparent"].includes(S.fill) && b.add(K(S.fill)), S != null && S.stroke && !["none", "transparent"].includes(S.stroke) && b.add(K(S.stroke));
1856
1856
  });
1857
1857
  }
1858
1858
  ["fill", "stroke", "stop-color"].forEach((y) => {
1859
- const v = k.getAttribute(y);
1860
- v && !["none", "transparent"].includes(v) && b.add(K(v));
1859
+ const _ = k.getAttribute(y);
1860
+ _ && !["none", "transparent"].includes(_) && b.add(K(_));
1861
1861
  });
1862
1862
  const f = k.getAttribute("style");
1863
1863
  if (f) {
1864
- const y = /fill\s*:\s*([^;]+);?/.exec(f), v = /stroke\s*:\s*([^;]+);?/.exec(f), S = /stop-color\s*:\s*([^;]+);?/.exec(f);
1864
+ const y = /fill\s*:\s*([^;]+);?/.exec(f), _ = /stroke\s*:\s*([^;]+);?/.exec(f), S = /stop-color\s*:\s*([^;]+);?/.exec(f);
1865
1865
  if (y) {
1866
1866
  const A = y[1].trim();
1867
1867
  A && !["none", "transparent"].includes(A) && b.add(K(A));
1868
1868
  }
1869
- if (v) {
1870
- const A = v[1].trim();
1869
+ if (_) {
1870
+ const A = _[1].trim();
1871
1871
  A && !["none", "transparent"].includes(A) && b.add(K(A));
1872
1872
  }
1873
1873
  if (S) {
@@ -2252,11 +2252,11 @@ const bs = async (t, r) => {
2252
2252
  r.size.height / n.height
2253
2253
  ), o = ((b = t.details) == null ? void 0 : b.rotate) || 0, c = pt(r, n), u = t.display;
2254
2254
  let d = 1 / 0, p = 0;
2255
- e.forEach((m) => {
2256
- const I = t.trackItemsMap[m];
2255
+ e.forEach((h) => {
2256
+ const I = t.trackItemsMap[h];
2257
2257
  I.display.from < d && (d = I.display.from), I.display.to > p && (p = I.display.to);
2258
2258
  });
2259
- const h = t.trim || t.display || { from: d, to: p };
2259
+ const m = t.trim || t.display || { from: d, to: p };
2260
2260
  return {
2261
2261
  id: t.id,
2262
2262
  type: "template",
@@ -2270,23 +2270,23 @@ const bs = async (t, r) => {
2270
2270
  rotate: o,
2271
2271
  background: t.details.background || "transparent"
2272
2272
  },
2273
- trim: h,
2273
+ trim: m,
2274
2274
  display: u || { from: d, to: p },
2275
2275
  activeEdit: !1
2276
2276
  };
2277
2277
  }, ea = async (t, r) => {
2278
- var h;
2278
+ var m;
2279
2279
  const e = t.trackItemIds, n = t.size || {
2280
2280
  width: t.details.width,
2281
2281
  height: t.details.height
2282
2282
  }, i = Math.min(
2283
2283
  r.size.width / n.width,
2284
2284
  r.size.height / n.height
2285
- ), o = ((h = t.details) == null ? void 0 : h.rotate) || 0, c = pt(r, n), u = t.display;
2285
+ ), o = ((m = t.details) == null ? void 0 : m.rotate) || 0, c = pt(r, n), u = t.display;
2286
2286
  let d = 1 / 0, p = 0;
2287
2287
  return e.forEach((b) => {
2288
- const m = t.trackItemsMap[b];
2289
- m.display.from < d && (d = m.display.from), m.display.to > p && (p = m.display.to);
2288
+ const h = t.trackItemsMap[b];
2289
+ h.display.from < d && (d = h.display.from), h.display.to > p && (p = h.display.to);
2290
2290
  }), {
2291
2291
  id: t.id,
2292
2292
  type: "composition",
@@ -2305,12 +2305,12 @@ const bs = async (t, r) => {
2305
2305
  const e = t.details, n = $e(e.src), i = fetch(e.src), [o, c] = await Promise.all([
2306
2306
  n,
2307
2307
  i
2308
- ]), u = await c.text(), d = pt(r, o), { serializer: p, colors: h } = qi(
2308
+ ]), u = await c.text(), d = pt(r, o), { serializer: p, colors: m } = qi(
2309
2309
  Ki(u),
2310
2310
  t.id,
2311
2311
  Number(e.width || o.width),
2312
2312
  Number(e.height || o.height)
2313
- ), b = t.details.colorMap || Object.fromEntries(h.map((m) => [m, m]));
2313
+ ), b = t.details.colorMap || Object.fromEntries(m.map((h) => [h, h]));
2314
2314
  return {
2315
2315
  id: t.id,
2316
2316
  name: "illustration",
@@ -2637,62 +2637,62 @@ async function ia(t, r) {
2637
2637
  var c, u, d;
2638
2638
  const e = r.trackItemsMap, n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
2639
2639
  for (const p in e) {
2640
- const h = e[p];
2641
- if (h.type === "text" || h.type === "caption") {
2642
- if (h.details.fontUrl) {
2640
+ const m = e[p];
2641
+ if (m.type === "text" || m.type === "caption") {
2642
+ if (m.details.fontUrl) {
2643
2643
  const b = {
2644
- fontFamily: h.details.fontFamily,
2645
- url: h.details.fontUrl
2644
+ fontFamily: m.details.fontFamily,
2645
+ url: m.details.fontUrl
2646
2646
  };
2647
2647
  n.add(JSON.stringify(b));
2648
2648
  }
2649
- (c = h.animations) != null && c.in && h.animations.in.composition.forEach(
2649
+ (c = m.animations) != null && c.in && m.animations.in.composition.forEach(
2650
2650
  (b) => {
2651
- var m;
2652
- (m = b.details) != null && m.fonts && b.details.fonts.forEach(
2651
+ var h;
2652
+ (h = b.details) != null && h.fonts && b.details.fonts.forEach(
2653
2653
  (I) => {
2654
2654
  n.add(JSON.stringify(I));
2655
2655
  }
2656
2656
  );
2657
2657
  }
2658
- ), (u = h.animations) != null && u.loop && h.animations.loop.composition.forEach(
2658
+ ), (u = m.animations) != null && u.loop && m.animations.loop.composition.forEach(
2659
2659
  (b) => {
2660
- var m;
2661
- (m = b.details) != null && m.fonts && b.details.fonts.forEach(
2660
+ var h;
2661
+ (h = b.details) != null && h.fonts && b.details.fonts.forEach(
2662
2662
  (I) => {
2663
2663
  n.add(JSON.stringify(I));
2664
2664
  }
2665
2665
  );
2666
2666
  }
2667
- ), (d = h.animations) != null && d.out && h.animations.out.composition.forEach(
2667
+ ), (d = m.animations) != null && d.out && m.animations.out.composition.forEach(
2668
2668
  (b) => {
2669
- var m;
2670
- (m = b.details) != null && m.fonts && b.details.fonts.forEach(
2669
+ var h;
2670
+ (h = b.details) != null && h.fonts && b.details.fonts.forEach(
2671
2671
  (I) => {
2672
2672
  n.add(JSON.stringify(I));
2673
2673
  }
2674
2674
  );
2675
2675
  }
2676
2676
  );
2677
- } else h.type === "illustration" && i.set(p, {
2678
- trackItem: h,
2679
- details: h.details
2677
+ } else m.type === "illustration" && i.set(p, {
2678
+ trackItem: m,
2679
+ details: m.details
2680
2680
  });
2681
2681
  }
2682
2682
  n.size > 0 && await rr(
2683
2683
  Array.from(n).map((p) => JSON.parse(p))
2684
2684
  );
2685
- for (const [p, h] of i) {
2685
+ for (const [p, m] of i) {
2686
2686
  const b = await _s(
2687
- { ...h.trackItem, details: h.details },
2687
+ { ...m.trackItem, details: m.details },
2688
2688
  {
2689
- size: { width: h.details.width, height: h.details.height }
2689
+ size: { width: m.details.width, height: m.details.height }
2690
2690
  }
2691
- ), m = ms(
2691
+ ), h = ms(
2692
2692
  b.details.svgString,
2693
- h.details.colorMap
2693
+ m.details.colorMap
2694
2694
  );
2695
- b.details.svgString = m, e[p] = b;
2695
+ b.details.svgString = h, e[p] = b;
2696
2696
  }
2697
2697
  const o = Y(e);
2698
2698
  return {
@@ -2739,52 +2739,52 @@ function oa(t, r) {
2739
2739
  to: i.display.to
2740
2740
  }
2741
2741
  }, d = Object.values(e.transitionsMap).find(
2742
- (h) => h.fromId === i.id && h.kind !== "none"
2742
+ (m) => m.fromId === i.id && m.kind !== "none"
2743
2743
  ), p = Object.values(e.transitionsMap).find(
2744
- (h) => h.toId === i.id && h.kind !== "none"
2744
+ (m) => m.toId === i.id && m.kind !== "none"
2745
2745
  );
2746
2746
  if (i.type === "video" || i.type === "audio") {
2747
- const h = r - c.display.from;
2747
+ const m = r - c.display.from;
2748
2748
  c.trim = {
2749
2749
  from: i.trim.from,
2750
- to: i.trim.from + h
2750
+ to: i.trim.from + m
2751
2751
  }, u.trim = {
2752
- from: i.trim.from + h,
2752
+ from: i.trim.from + m,
2753
2753
  to: i.trim.to
2754
2754
  };
2755
2755
  }
2756
2756
  if (p) {
2757
- const h = c.display.to - c.display.from;
2758
- if (p.duration / 2 > h) {
2757
+ const m = c.display.to - c.display.from;
2758
+ if (p.duration / 2 > m) {
2759
2759
  e.transitionIds = e.transitionIds.filter(
2760
- (m) => m !== p.id
2760
+ (h) => h !== p.id
2761
2761
  );
2762
2762
  const b = {};
2763
2763
  e.transitionIds.forEach(
2764
- (m) => b[m] = e.transitionsMap[m]
2764
+ (h) => b[h] = e.transitionsMap[h]
2765
2765
  ), e.transitionsMap = b;
2766
2766
  }
2767
2767
  }
2768
2768
  if (d) {
2769
- const h = u.display.to - u.display.from, b = {};
2770
- d.duration / 2 > h ? (e.transitionIds = e.transitionIds.filter(
2771
- (m) => m !== d.id
2769
+ const m = u.display.to - u.display.from, b = {};
2770
+ d.duration / 2 > m ? (e.transitionIds = e.transitionIds.filter(
2771
+ (h) => h !== d.id
2772
2772
  ), e.transitionIds.forEach(
2773
- (m) => b[m] = e.transitionsMap[m]
2774
- ), e.transitionsMap = b) : (e.transitionIds = e.transitionIds.map((m) => e.transitionsMap[m].fromId === c.id ? m.replace(c.id, o) : m), Object.keys(e.transitionsMap).forEach((m) => {
2775
- if (e.transitionsMap[m].fromId === c.id) {
2776
- const _ = m.replace(c.id, o);
2777
- b[_] = {
2778
- ...e.transitionsMap[m],
2779
- id: _,
2773
+ (h) => b[h] = e.transitionsMap[h]
2774
+ ), e.transitionsMap = b) : (e.transitionIds = e.transitionIds.map((h) => e.transitionsMap[h].fromId === c.id ? h.replace(c.id, o) : h), Object.keys(e.transitionsMap).forEach((h) => {
2775
+ if (e.transitionsMap[h].fromId === c.id) {
2776
+ const v = h.replace(c.id, o);
2777
+ b[v] = {
2778
+ ...e.transitionsMap[h],
2779
+ id: v,
2780
2780
  fromId: o
2781
2781
  };
2782
2782
  } else
2783
- b[m] = e.transitionsMap[m];
2783
+ b[h] = e.transitionsMap[h];
2784
2784
  }), e.transitionsMap = b);
2785
2785
  }
2786
- return e.trackItemsMap[n] = c, e.trackItemsMap[o] = u, e.trackItemIds.push(o), e.tracks.forEach((h) => {
2787
- h.items.includes(n) && h.items.push(o);
2786
+ return e.trackItemsMap[n] = c, e.trackItemsMap[o] = u, e.trackItemIds.push(o), e.tracks.forEach((m) => {
2787
+ m.items.includes(n) && m.items.push(o);
2788
2788
  }), {
2789
2789
  tracks: e.tracks,
2790
2790
  trackItemIds: e.trackItemIds,
@@ -2812,11 +2812,11 @@ async function ca(t, r) {
2812
2812
  ...n[c].metadata,
2813
2813
  ...u.metadata
2814
2814
  } : n[c].metadata = u.metadata), u.display || u.playbackRate) {
2815
- const d = u.playbackRate, p = n[c].playbackRate || 1, h = n[c].display, I = (h.to - h.from) * p / d, _ = {
2816
- from: h.from,
2817
- to: h.from + I
2815
+ const d = u.playbackRate, p = n[c].playbackRate || 1, m = n[c].display, I = (m.to - m.from) * p / d, v = {
2816
+ from: m.from,
2817
+ to: m.from + I
2818
2818
  };
2819
- n[c].display = _, n[c].playbackRate = d;
2819
+ n[c].display = v, n[c].playbackRate = d;
2820
2820
  }
2821
2821
  u.animations && (n[c].animations = {
2822
2822
  ...n[c].animations,
@@ -2841,24 +2841,24 @@ async function ua(t, r) {
2841
2841
  if (!i.details.src) return {};
2842
2842
  if (o.type === "image") {
2843
2843
  const u = await $e(i.details.src), d = o.details.width || 0, p = o.details.height || 0;
2844
- let h = u.width, b = u.height;
2845
- const m = u.width / u.height;
2846
- d / p > m ? (h = d, b = d / m) : (b = p, h = p * m), c.crop = {
2844
+ let m = u.width, b = u.height;
2845
+ const h = u.width / u.height;
2846
+ d / p > h ? (m = d, b = d / h) : (b = p, m = p * h), c.crop = {
2847
2847
  x: 0,
2848
2848
  y: 0,
2849
2849
  height: c.height,
2850
2850
  width: c.width
2851
- }, i.details.width = h, i.details.height = b;
2851
+ }, i.details.width = m, i.details.height = b;
2852
2852
  } else if (o.type === "video") {
2853
2853
  const u = await Dn(i.details.src), d = o.details.width || 0, p = o.details.height || 0;
2854
- let h = u.width, b = u.height;
2855
- const m = u.width / u.height;
2856
- d / p > m ? (h = d, b = d / m) : (b = p, h = p * m), c.crop = {
2854
+ let m = u.width, b = u.height;
2855
+ const h = u.width / u.height;
2856
+ d / p > h ? (m = d, b = d / h) : (b = p, m = p * h), c.crop = {
2857
2857
  x: 0,
2858
2858
  y: 0,
2859
2859
  height: c.height,
2860
2860
  width: c.width
2861
- }, i.details.width = h, i.details.height = b;
2861
+ }, i.details.width = m, i.details.height = b;
2862
2862
  }
2863
2863
  return i.details && (o.details = { ...c, ...i.details }, i.details = o.details), e.trackItemsMap[n] = {
2864
2864
  ...e.trackItemsMap[n],
@@ -2890,24 +2890,24 @@ async function da(t, r, e = {}) {
2890
2890
  ...n.transitionsMap,
2891
2891
  ...I.transitionsMap
2892
2892
  };
2893
- const _ = {
2893
+ const v = {
2894
2894
  id: I.id,
2895
2895
  items: I.trackItemIds,
2896
2896
  transitions: I.transitionsIds || [],
2897
2897
  tracks: I.tracks
2898
2898
  };
2899
- u.push(_);
2899
+ u.push(v);
2900
2900
  });
2901
- const p = [], h = {};
2901
+ const p = [], m = {};
2902
2902
  if (o.forEach((I) => {
2903
- p.push(I.id), h[I.id] = I;
2903
+ p.push(I.id), m[I.id] = I;
2904
2904
  }), Es(
2905
2905
  n.tracks,
2906
2906
  c
2907
2907
  ))
2908
2908
  n.tracks.forEach((I) => {
2909
- c.forEach((_) => {
2910
- I.id === _.id && (I.magnetic && nt(
2909
+ c.forEach((v) => {
2910
+ I.id === v.id && (I.magnetic && nt(
2911
2911
  [I],
2912
2912
  n.trackItemsMap,
2913
2913
  d
@@ -2915,21 +2915,21 @@ async function da(t, r, e = {}) {
2915
2915
  });
2916
2916
  });
2917
2917
  else {
2918
- const I = e.trackIndex || 0, _ = Math.min(
2918
+ const I = e.trackIndex || 0, v = Math.min(
2919
2919
  Math.max(I, 0),
2920
2920
  n.tracks.length
2921
2921
  );
2922
- n.tracks.splice(_, 0, ...c);
2922
+ n.tracks.splice(v, 0, ...c);
2923
2923
  }
2924
2924
  n.trackItemsMap = {
2925
2925
  ...n.trackItemsMap,
2926
- ...h
2926
+ ...m
2927
2927
  }, n.trackItemIds = [
2928
2928
  ...n.trackItemIds,
2929
2929
  ...p
2930
2930
  ], n.structure = [...n.structure, ...u];
2931
- const m = n.tracks.filter((I) => I.magnetic);
2932
- return nt(m, n.trackItemsMap, d), n.duration = Y(n.trackItemsMap), {
2931
+ const h = n.tracks.filter((I) => I.magnetic);
2932
+ return nt(h, n.trackItemsMap, d), n.duration = Y(n.trackItemsMap), {
2933
2933
  trackItemIds: n.trackItemIds,
2934
2934
  trackItemsMap: n.trackItemsMap,
2935
2935
  tracks: n.tracks,
@@ -3061,43 +3061,43 @@ async function ya(t, r, e = {}) {
3061
3061
  };
3062
3062
  }
3063
3063
  async function Ia(t, r, e = {}) {
3064
- const n = C(t), i = "composition", o = r.trackItemsMap, c = r.trackItemIds, u = r.tracks || [], d = r.trackItemDetailsMap, { details: p, ...h } = await ea(r, {
3064
+ const n = C(t), i = "composition", o = r.trackItemsMap, c = r.trackItemIds, u = r.tracks || [], d = r.trackItemDetailsMap, { details: p, ...m } = await ea(r, {
3065
3065
  size: n.size,
3066
3066
  scaleMode: e.scaleMode,
3067
3067
  scaleAspectRatio: e.scaleAspectRatio
3068
3068
  }), b = {
3069
- id: h.id,
3069
+ id: m.id,
3070
3070
  items: c,
3071
3071
  transitions: [],
3072
3072
  tracks: u
3073
3073
  }, I = [{
3074
- ...h,
3074
+ ...m,
3075
3075
  type: i,
3076
3076
  details: p
3077
- }], _ = vt(n, I, e);
3078
- _.trackItemsMap = {
3079
- ..._.trackItemsMap,
3077
+ }], v = vt(n, I, e);
3078
+ v.trackItemsMap = {
3079
+ ...v.trackItemsMap,
3080
3080
  ...o,
3081
- [h.id]: {
3082
- ...h,
3081
+ [m.id]: {
3082
+ ...m,
3083
3083
  type: i,
3084
3084
  details: p
3085
3085
  }
3086
- }, _.structure = [..._.structure, b], _.duration = Y(_.trackItemsMap);
3087
- const k = _.tracks.filter((w) => w.magnetic);
3088
- return nt(k, _.trackItemsMap, [h.id]), d && Object.keys(d).forEach((w) => {
3089
- _.trackItemsMap[w] = {
3090
- ..._.trackItemsMap[w],
3086
+ }, v.structure = [...v.structure, b], v.duration = Y(v.trackItemsMap);
3087
+ const k = v.tracks.filter((w) => w.magnetic);
3088
+ return nt(k, v.trackItemsMap, [m.id]), d && Object.keys(d).forEach((w) => {
3089
+ v.trackItemsMap[w] = {
3090
+ ...v.trackItemsMap[w],
3091
3091
  details: {
3092
3092
  ...d[w].details
3093
3093
  }
3094
3094
  };
3095
3095
  }), {
3096
- trackItemIds: _.trackItemIds,
3097
- trackItemsMap: _.trackItemsMap,
3098
- tracks: _.tracks,
3099
- duration: _.duration,
3100
- structure: _.structure
3096
+ trackItemIds: v.trackItemIds,
3097
+ trackItemsMap: v.trackItemsMap,
3098
+ tracks: v.tracks,
3099
+ duration: v.duration,
3100
+ structure: v.structure
3101
3101
  };
3102
3102
  }
3103
3103
  async function fe(t, r, e = {}, n) {
@@ -3150,8 +3150,8 @@ async function fe(t, r, e = {}, n) {
3150
3150
  );
3151
3151
  const u = await Promise.all(c), d = u.map((b) => b.id), p = vt(i, u, e);
3152
3152
  p.duration = Y(p.trackItemsMap);
3153
- const h = p.tracks.filter((b) => b.magnetic);
3154
- return nt(h, p.trackItemsMap, d), {
3153
+ const m = p.tracks.filter((b) => b.magnetic);
3154
+ return nt(m, p.trackItemsMap, d), {
3155
3155
  trackItemIds: p.trackItemIds,
3156
3156
  trackItemsMap: p.trackItemsMap,
3157
3157
  tracks: p.tracks,
@@ -3159,17 +3159,17 @@ async function fe(t, r, e = {}, n) {
3159
3159
  };
3160
3160
  }
3161
3161
  async function ba(t, r, e = {}) {
3162
- const n = C(t), i = "template", o = r.trackItemsMap, c = r.trackItemIds, u = r.transitionsMap, d = r.transitionIds || [], p = r.tracks || [], h = r.structure || [], { details: b, ...m } = await vs(r, {
3162
+ const n = C(t), i = "template", o = r.trackItemsMap, c = r.trackItemIds, u = r.transitionsMap, d = r.transitionIds || [], p = r.tracks || [], m = r.structure || [], { details: b, ...h } = await vs(r, {
3163
3163
  size: n.size,
3164
3164
  scaleMode: e.scaleMode,
3165
3165
  scaleAspectRatio: e.scaleAspectRatio
3166
3166
  }), I = {
3167
- id: m.id,
3167
+ id: h.id,
3168
3168
  items: c,
3169
3169
  transitions: d,
3170
3170
  tracks: p
3171
3171
  }, k = [{
3172
- ...m,
3172
+ ...h,
3173
3173
  type: i,
3174
3174
  details: b
3175
3175
  }], w = vt(n, k, e);
@@ -3182,18 +3182,18 @@ async function ba(t, r, e = {}) {
3182
3182
  }, w.trackItemsMap = {
3183
3183
  ...w.trackItemsMap,
3184
3184
  ...o,
3185
- [m.id]: {
3186
- ...m,
3185
+ [h.id]: {
3186
+ ...h,
3187
3187
  type: i,
3188
3188
  details: b
3189
3189
  }
3190
3190
  }, w.structure = [
3191
3191
  ...w.structure,
3192
3192
  I,
3193
- ...h
3193
+ ...m
3194
3194
  ], w.duration = Y(w.trackItemsMap);
3195
3195
  const f = w.tracks.filter((y) => y.magnetic);
3196
- return nt(f, w.trackItemsMap, [m.id]), {
3196
+ return nt(f, w.trackItemsMap, [h.id]), {
3197
3197
  trackItemIds: w.trackItemIds,
3198
3198
  trackItemsMap: w.trackItemsMap,
3199
3199
  tracks: w.tracks,
@@ -3216,15 +3216,21 @@ async function ka(t, r, e = {}) {
3216
3216
  o
3217
3217
  ), u = [], d = {};
3218
3218
  if (o.forEach((b) => {
3219
- const { details: m, ...I } = b;
3220
- u.push(b.id), d[b.id] = I;
3219
+ const { details: h, metadata: I, ...v } = b;
3220
+ u.push(b.id), d[b.id] = {
3221
+ ...v,
3222
+ details: {
3223
+ ...h,
3224
+ ...I
3225
+ }
3226
+ };
3221
3227
  }), Es(
3222
3228
  n.tracks,
3223
3229
  c
3224
3230
  ))
3225
3231
  n.tracks.forEach((b) => {
3226
- c.forEach((m) => {
3227
- b.id === m.id && (b.magnetic && nt(
3232
+ c.forEach((h) => {
3233
+ b.id === h.id && (b.magnetic && nt(
3228
3234
  [b],
3229
3235
  n.trackItemsMap,
3230
3236
  u
@@ -3232,11 +3238,11 @@ async function ka(t, r, e = {}) {
3232
3238
  });
3233
3239
  });
3234
3240
  else {
3235
- const b = e.trackIndex || 0, m = Math.min(
3241
+ const b = e.trackIndex || 0, h = Math.min(
3236
3242
  Math.max(b, 0),
3237
3243
  n.tracks.length
3238
3244
  );
3239
- n.tracks.splice(m, 0, ...c);
3245
+ n.tracks.splice(h, 0, ...c);
3240
3246
  }
3241
3247
  n.trackItemsMap = {
3242
3248
  ...n.trackItemsMap,
@@ -3245,9 +3251,9 @@ async function ka(t, r, e = {}) {
3245
3251
  ...n.trackItemIds,
3246
3252
  ...u
3247
3253
  ], n.duration = Y(n.trackItemsMap);
3248
- const h = n.tracks.filter((b) => b.magnetic);
3254
+ const m = n.tracks.filter((b) => b.magnetic);
3249
3255
  return nt(
3250
- h,
3256
+ m,
3251
3257
  n.trackItemsMap,
3252
3258
  u
3253
3259
  ), {
@@ -3317,13 +3323,13 @@ function Sa(t) {
3317
3323
  ), p = r.subscribe(async (f) => {
3318
3324
  var y;
3319
3325
  if (f.key === Xn) {
3320
- const { actions: v } = (y = f.value) == null ? void 0 : y.payload;
3321
- v.forEach((S) => {
3326
+ const { actions: _ } = (y = f.value) == null ? void 0 : y.payload;
3327
+ _.forEach((S) => {
3322
3328
  Ns(S.type, S.payload && { payload: S.payload });
3323
3329
  });
3324
3330
  }
3325
- }), h = e.subscribe(async (f) => {
3326
- var y, v;
3331
+ }), m = e.subscribe(async (f) => {
3332
+ var y, _;
3327
3333
  if (f.key === ni) {
3328
3334
  const S = (y = f.value) == null ? void 0 : y.payload, A = await ia(t.getState(), S);
3329
3335
  t.updateState(A, {
@@ -3332,7 +3338,7 @@ function Sa(t) {
3332
3338
  });
3333
3339
  }
3334
3340
  if (f.key === si) {
3335
- const S = (v = f.value) == null ? void 0 : v.payload;
3341
+ const S = (_ = f.value) == null ? void 0 : _.payload;
3336
3342
  t.updateState(
3337
3343
  {
3338
3344
  size: S
@@ -3346,13 +3352,13 @@ function Sa(t) {
3346
3352
  }), b = o.subscribe((f) => {
3347
3353
  if (f.key === Di) return t.undo();
3348
3354
  if (f.key === zi) return t.redo();
3349
- }), m = d.subscribe((f) => {
3355
+ }), h = d.subscribe((f) => {
3350
3356
  var y;
3351
3357
  if (f.key === $i) {
3352
- const v = (y = f.value) == null ? void 0 : y.payload.scale;
3358
+ const _ = (y = f.value) == null ? void 0 : y.payload.scale;
3353
3359
  t.updateState(
3354
3360
  {
3355
- scale: v
3361
+ scale: _
3356
3362
  },
3357
3363
  {
3358
3364
  kind: "update",
@@ -3361,7 +3367,7 @@ function Sa(t) {
3361
3367
  );
3362
3368
  }
3363
3369
  }), I = i.subscribe(async (f) => {
3364
- var y, v, S, A;
3370
+ var y, _, S, A;
3365
3371
  if (f.key === xi) {
3366
3372
  const E = ((y = f.value) == null ? void 0 : y.payload.trackItemIds) || [];
3367
3373
  t.updateState(
@@ -3373,7 +3379,7 @@ function Sa(t) {
3373
3379
  );
3374
3380
  }
3375
3381
  if (f.key === Oi && aa(t.getState()), f.key === Ri) {
3376
- const E = (v = f.value) == null ? void 0 : v.payload.trackItemIds, T = Hi(t.getState(), E);
3382
+ const E = (_ = f.value) == null ? void 0 : _.payload.trackItemIds, T = Hi(t.getState(), E);
3377
3383
  t.updateState(T, { updateHistory: !0, kind: "remove" });
3378
3384
  }
3379
3385
  if (f.key === Ci) {
@@ -3393,9 +3399,9 @@ function Sa(t) {
3393
3399
  kind: "update:details"
3394
3400
  });
3395
3401
  }
3396
- }), _ = n.subscribe(async (f) => {
3402
+ }), v = n.subscribe(async (f) => {
3397
3403
  var H, R, V, x, F, tt, Xt, Kt, Ie, be, ke, ve, z, _e, Se, st, Vt, $, qt, we, it, Jt, Zt, Rt, Pt, Qt, Dt, te, zt, ee, Te, Ae, _t, $t, re, ne, ct, St, Ee, gt, wt, Ft, et, se, ie, Me, Lt, Tt, ae, At, yt;
3398
- const y = C(t.getState()), v = ((R = (H = f.value) == null ? void 0 : H.options) == null ? void 0 : R.isSelected) || !1, S = (x = (V = f.value) == null ? void 0 : V.options) == null ? void 0 : x.scaleMode, A = (tt = (F = f.value) == null ? void 0 : F.options) == null ? void 0 : tt.scaleAspectRatio, E = (Kt = (Xt = f.value) == null ? void 0 : Xt.options) == null ? void 0 : Kt.trackIndex;
3404
+ const y = C(t.getState()), _ = ((R = (H = f.value) == null ? void 0 : H.options) == null ? void 0 : R.isSelected) || !1, S = (x = (V = f.value) == null ? void 0 : V.options) == null ? void 0 : x.scaleMode, A = (tt = (F = f.value) == null ? void 0 : F.options) == null ? void 0 : tt.scaleAspectRatio, E = (Kt = (Xt = f.value) == null ? void 0 : Xt.options) == null ? void 0 : Kt.trackIndex;
3399
3405
  let T = {};
3400
3406
  f.key === di ? T = await va(y, (Ie = f.value) == null ? void 0 : Ie.payload) : f.key === hi ? T = await da(y, (be = f.value) == null ? void 0 : be.payload, {
3401
3407
  trackIndex: E
@@ -3499,28 +3505,28 @@ function Sa(t) {
3499
3505
  targetTrackId: (yt = (At = f.value) == null ? void 0 : At.options) == null ? void 0 : yt.targetTrackId
3500
3506
  },
3501
3507
  "hill-audio-bars"
3502
- )), v && T.trackItemIds && (T.activeIds = T.trackItemIds), t.updateState(T, {
3508
+ )), _ && T.trackItemIds && (T.activeIds = T.trackItemIds), t.updateState(T, {
3503
3509
  updateHistory: !0,
3504
3510
  kind: "add"
3505
3511
  });
3506
3512
  }), k = c.subscribe(async (f) => {
3507
3513
  var y;
3508
3514
  if (f.key === Mi) {
3509
- const v = (y = f.value) == null ? void 0 : y.options.time, S = oa(t.getState(), v);
3515
+ const _ = (y = f.value) == null ? void 0 : y.options.time, S = oa(t.getState(), _);
3510
3516
  Object.keys(S).length > 0 && t.updateState(S, {
3511
3517
  updateHistory: !0,
3512
3518
  kind: "update"
3513
3519
  });
3514
3520
  }
3515
3521
  if (f.key === Ei) {
3516
- const v = await ji(t.getState());
3517
- t.updateState(v, {
3522
+ const _ = await ji(t.getState());
3523
+ t.updateState(_, {
3518
3524
  updateHistory: !0,
3519
3525
  kind: "update"
3520
3526
  });
3521
3527
  }
3522
3528
  }), w = u.subscribe(async (f) => {
3523
- var y, v, S;
3529
+ var y, _, S;
3524
3530
  if (f.key === wi) {
3525
3531
  const A = await ca(
3526
3532
  t.getState(),
@@ -3534,7 +3540,7 @@ function Sa(t) {
3534
3540
  if (f.key === Ti) {
3535
3541
  const A = await ua(
3536
3542
  t.getState(),
3537
- (v = f.value) == null ? void 0 : v.payload
3543
+ (_ = f.value) == null ? void 0 : _.payload
3538
3544
  );
3539
3545
  t.updateState(A, {
3540
3546
  updateHistory: !0,
@@ -3551,7 +3557,7 @@ function Sa(t) {
3551
3557
  });
3552
3558
  return {
3553
3559
  unsubscribe: () => {
3554
- _.unsubscribe(), k.unsubscribe(), w.unsubscribe(), b.unsubscribe(), I.unsubscribe(), h.unsubscribe(), m.unsubscribe(), p.unsubscribe();
3560
+ v.unsubscribe(), k.unsubscribe(), w.unsubscribe(), b.unsubscribe(), I.unsubscribe(), m.unsubscribe(), h.unsubscribe(), p.unsubscribe();
3555
3561
  }
3556
3562
  };
3557
3563
  }
@@ -3561,7 +3567,7 @@ function xs(t, r, e = { cyclesFix: !0 }, n = []) {
3561
3567
  let i = [];
3562
3568
  const o = Array.isArray(t);
3563
3569
  for (const p in t) {
3564
- const h = t[p], b = o ? +p : p;
3570
+ const m = t[p], b = o ? +p : p;
3565
3571
  if (!(p in r)) {
3566
3572
  i.push({
3567
3573
  type: "REMOVE",
@@ -3570,13 +3576,13 @@ function xs(t, r, e = { cyclesFix: !0 }, n = []) {
3570
3576
  });
3571
3577
  continue;
3572
3578
  }
3573
- const m = r[p], I = typeof h == "object" && typeof m == "object" && Array.isArray(h) === Array.isArray(m);
3574
- h && m && I && !wa[(d = (u = Object.getPrototypeOf(h)) == null ? void 0 : u.constructor) == null ? void 0 : d.name] && (!e.cyclesFix || !n.includes(h)) ? i.push.apply(i, xs(h, m, e, e.cyclesFix ? n.concat([h]) : []).map((_) => (_.path.unshift(b), _))) : h !== m && // treat NaN values as equivalent
3575
- !(Number.isNaN(h) && Number.isNaN(m)) && !(I && (isNaN(h) ? h + "" == m + "" : +h == +m)) && i.push({
3579
+ const h = r[p], I = typeof m == "object" && typeof h == "object" && Array.isArray(m) === Array.isArray(h);
3580
+ m && h && I && !wa[(d = (u = Object.getPrototypeOf(m)) == null ? void 0 : u.constructor) == null ? void 0 : d.name] && (!e.cyclesFix || !n.includes(m)) ? i.push.apply(i, xs(m, h, e, e.cyclesFix ? n.concat([m]) : []).map((v) => (v.path.unshift(b), v))) : m !== h && // treat NaN values as equivalent
3581
+ !(Number.isNaN(m) && Number.isNaN(h)) && !(I && (isNaN(m) ? m + "" == h + "" : +m == +h)) && i.push({
3576
3582
  path: [b],
3577
3583
  type: "CHANGE",
3578
- value: m,
3579
- oldValue: h
3584
+ value: h,
3585
+ oldValue: m
3580
3586
  });
3581
3587
  }
3582
3588
  const c = Array.isArray(r);
@@ -3950,7 +3956,7 @@ var Pa = class {
3950
3956
  e = r;
3951
3957
  const c = this;
3952
3958
  return function(d = o, ...p) {
3953
- return c.produce(d, (h) => e.call(this, h, ...p));
3959
+ return c.produce(d, (m) => e.call(this, m, ...p));
3954
3960
  };
3955
3961
  }
3956
3962
  typeof e != "function" && B(6), n !== void 0 && typeof n != "function" && B(7);
@@ -4050,157 +4056,157 @@ function zs(t) {
4050
4056
  function ts() {
4051
4057
  process.env.NODE_ENV !== "production" && Os.push(
4052
4058
  'Sets cannot have "replace" patches.',
4053
- function(m) {
4054
- return "Unsupported patch operation: " + m;
4059
+ function(h) {
4060
+ return "Unsupported patch operation: " + h;
4055
4061
  },
4056
- function(m) {
4057
- return "Cannot apply patch, path doesn't resolve: " + m;
4062
+ function(h) {
4063
+ return "Cannot apply patch, path doesn't resolve: " + h;
4058
4064
  },
4059
4065
  "Patching reserved attributes like __proto__, prototype and constructor is not allowed"
4060
4066
  );
4061
4067
  const r = "replace", e = "add", n = "remove";
4062
- function i(m, I, _, k) {
4063
- switch (m.type_) {
4068
+ function i(h, I, v, k) {
4069
+ switch (h.type_) {
4064
4070
  case 0:
4065
4071
  case 2:
4066
4072
  return c(
4067
- m,
4073
+ h,
4068
4074
  I,
4069
- _,
4075
+ v,
4070
4076
  k
4071
4077
  );
4072
4078
  case 1:
4073
- return o(m, I, _, k);
4079
+ return o(h, I, v, k);
4074
4080
  case 3:
4075
4081
  return u(
4076
- m,
4082
+ h,
4077
4083
  I,
4078
- _,
4084
+ v,
4079
4085
  k
4080
4086
  );
4081
4087
  }
4082
4088
  }
4083
- function o(m, I, _, k) {
4084
- let { base_: w, assigned_: f } = m, y = m.copy_;
4085
- y.length < w.length && ([w, y] = [y, w], [_, k] = [k, _]);
4086
- for (let v = 0; v < w.length; v++)
4087
- if (f[v] && y[v] !== w[v]) {
4088
- const S = I.concat([v]);
4089
- _.push({
4089
+ function o(h, I, v, k) {
4090
+ let { base_: w, assigned_: f } = h, y = h.copy_;
4091
+ y.length < w.length && ([w, y] = [y, w], [v, k] = [k, v]);
4092
+ for (let _ = 0; _ < w.length; _++)
4093
+ if (f[_] && y[_] !== w[_]) {
4094
+ const S = I.concat([_]);
4095
+ v.push({
4090
4096
  op: r,
4091
4097
  path: S,
4092
4098
  // Need to maybe clone it, as it can in fact be the original value
4093
4099
  // due to the base/copy inversion at the start of this function
4094
- value: b(y[v])
4100
+ value: b(y[_])
4095
4101
  }), k.push({
4096
4102
  op: r,
4097
4103
  path: S,
4098
- value: b(w[v])
4104
+ value: b(w[_])
4099
4105
  });
4100
4106
  }
4101
- for (let v = w.length; v < y.length; v++) {
4102
- const S = I.concat([v]);
4103
- _.push({
4107
+ for (let _ = w.length; _ < y.length; _++) {
4108
+ const S = I.concat([_]);
4109
+ v.push({
4104
4110
  op: e,
4105
4111
  path: S,
4106
4112
  // Need to maybe clone it, as it can in fact be the original value
4107
4113
  // due to the base/copy inversion at the start of this function
4108
- value: b(y[v])
4114
+ value: b(y[_])
4109
4115
  });
4110
4116
  }
4111
- for (let v = y.length - 1; w.length <= v; --v) {
4112
- const S = I.concat([v]);
4117
+ for (let _ = y.length - 1; w.length <= _; --_) {
4118
+ const S = I.concat([_]);
4113
4119
  k.push({
4114
4120
  op: n,
4115
4121
  path: S
4116
4122
  });
4117
4123
  }
4118
4124
  }
4119
- function c(m, I, _, k) {
4120
- const { base_: w, copy_: f } = m;
4121
- Je(m.assigned_, (y, v) => {
4122
- const S = gn(w, y), A = gn(f, y), E = v ? Ze(w, y) ? r : e : n;
4125
+ function c(h, I, v, k) {
4126
+ const { base_: w, copy_: f } = h;
4127
+ Je(h.assigned_, (y, _) => {
4128
+ const S = gn(w, y), A = gn(f, y), E = _ ? Ze(w, y) ? r : e : n;
4123
4129
  if (S === A && E === r)
4124
4130
  return;
4125
4131
  const T = I.concat(y);
4126
- _.push(E === n ? { op: E, path: T } : { op: E, path: T, value: A }), k.push(
4132
+ v.push(E === n ? { op: E, path: T } : { op: E, path: T, value: A }), k.push(
4127
4133
  E === e ? { op: n, path: T } : E === n ? { op: e, path: T, value: b(S) } : { op: r, path: T, value: b(S) }
4128
4134
  );
4129
4135
  });
4130
4136
  }
4131
- function u(m, I, _, k) {
4132
- let { base_: w, copy_: f } = m, y = 0;
4133
- w.forEach((v) => {
4134
- if (!f.has(v)) {
4137
+ function u(h, I, v, k) {
4138
+ let { base_: w, copy_: f } = h, y = 0;
4139
+ w.forEach((_) => {
4140
+ if (!f.has(_)) {
4135
4141
  const S = I.concat([y]);
4136
- _.push({
4142
+ v.push({
4137
4143
  op: n,
4138
4144
  path: S,
4139
- value: v
4145
+ value: _
4140
4146
  }), k.unshift({
4141
4147
  op: e,
4142
4148
  path: S,
4143
- value: v
4149
+ value: _
4144
4150
  });
4145
4151
  }
4146
4152
  y++;
4147
- }), y = 0, f.forEach((v) => {
4148
- if (!w.has(v)) {
4153
+ }), y = 0, f.forEach((_) => {
4154
+ if (!w.has(_)) {
4149
4155
  const S = I.concat([y]);
4150
- _.push({
4156
+ v.push({
4151
4157
  op: e,
4152
4158
  path: S,
4153
- value: v
4159
+ value: _
4154
4160
  }), k.unshift({
4155
4161
  op: n,
4156
4162
  path: S,
4157
- value: v
4163
+ value: _
4158
4164
  });
4159
4165
  }
4160
4166
  y++;
4161
4167
  });
4162
4168
  }
4163
- function d(m, I, _, k) {
4164
- _.push({
4169
+ function d(h, I, v, k) {
4170
+ v.push({
4165
4171
  op: r,
4166
4172
  path: [],
4167
4173
  value: I === zn ? void 0 : I
4168
4174
  }), k.push({
4169
4175
  op: r,
4170
4176
  path: [],
4171
- value: m
4177
+ value: h
4172
4178
  });
4173
4179
  }
4174
- function p(m, I) {
4175
- return I.forEach((_) => {
4176
- const { path: k, op: w } = _;
4177
- let f = m;
4180
+ function p(h, I) {
4181
+ return I.forEach((v) => {
4182
+ const { path: k, op: w } = v;
4183
+ let f = h;
4178
4184
  for (let A = 0; A < k.length - 1; A++) {
4179
4185
  const E = ge(f);
4180
4186
  let T = k[A];
4181
4187
  typeof T != "string" && typeof T != "number" && (T = "" + T), (E === 0 || E === 1) && (T === "__proto__" || T === "constructor") && B(19), typeof f == "function" && T === "prototype" && B(19), f = gn(f, T), typeof f != "object" && B(18, k.join("/"));
4182
4188
  }
4183
- const y = ge(f), v = h(_.value), S = k[k.length - 1];
4189
+ const y = ge(f), _ = m(v.value), S = k[k.length - 1];
4184
4190
  switch (w) {
4185
4191
  case r:
4186
4192
  switch (y) {
4187
4193
  case 2:
4188
- return f.set(S, v);
4194
+ return f.set(S, _);
4189
4195
  case 3:
4190
4196
  B(16);
4191
4197
  default:
4192
- return f[S] = v;
4198
+ return f[S] = _;
4193
4199
  }
4194
4200
  case e:
4195
4201
  switch (y) {
4196
4202
  case 1:
4197
- return S === "-" ? f.push(v) : f.splice(S, 0, v);
4203
+ return S === "-" ? f.push(_) : f.splice(S, 0, _);
4198
4204
  case 2:
4199
- return f.set(S, v);
4205
+ return f.set(S, _);
4200
4206
  case 3:
4201
- return f.add(v);
4207
+ return f.add(_);
4202
4208
  default:
4203
- return f[S] = v;
4209
+ return f[S] = _;
4204
4210
  }
4205
4211
  case n:
4206
4212
  switch (y) {
@@ -4209,33 +4215,33 @@ function ts() {
4209
4215
  case 2:
4210
4216
  return f.delete(S);
4211
4217
  case 3:
4212
- return f.delete(_.value);
4218
+ return f.delete(v.value);
4213
4219
  default:
4214
4220
  return delete f[S];
4215
4221
  }
4216
4222
  default:
4217
4223
  B(17, w);
4218
4224
  }
4219
- }), m;
4220
- }
4221
- function h(m) {
4222
- if (!Yt(m))
4223
- return m;
4224
- if (Array.isArray(m))
4225
- return m.map(h);
4226
- if (sr(m))
4225
+ }), h;
4226
+ }
4227
+ function m(h) {
4228
+ if (!Yt(h))
4229
+ return h;
4230
+ if (Array.isArray(h))
4231
+ return h.map(m);
4232
+ if (sr(h))
4227
4233
  return new Map(
4228
- Array.from(m.entries()).map(([_, k]) => [_, h(k)])
4234
+ Array.from(h.entries()).map(([v, k]) => [v, m(k)])
4229
4235
  );
4230
- if (ir(m))
4231
- return new Set(Array.from(m).map(h));
4232
- const I = Object.create(he(m));
4233
- for (const _ in m)
4234
- I[_] = h(m[_]);
4235
- return Ze(m, qe) && (I[qe] = m[qe]), I;
4236
+ if (ir(h))
4237
+ return new Set(Array.from(h).map(m));
4238
+ const I = Object.create(he(h));
4239
+ for (const v in h)
4240
+ I[v] = m(h[v]);
4241
+ return Ze(h, qe) && (I[qe] = h[qe]), I;
4236
4242
  }
4237
- function b(m) {
4238
- return me(m) ? h(m) : m;
4243
+ function b(h) {
4244
+ return me(h) ? m(h) : h;
4239
4245
  }
4240
4246
  Ma("Patches", {
4241
4247
  applyPatches_: p,
@@ -4568,14 +4574,14 @@ class Bo {
4568
4574
  transitionsMap: u,
4569
4575
  trackItemsMap: d,
4570
4576
  structure: p
4571
- } = this.getState(), h = C({
4577
+ } = this.getState(), m = C({
4572
4578
  trackItemIds: i,
4573
4579
  tracks: o,
4574
4580
  transitionIds: c,
4575
4581
  transitionsMap: u,
4576
4582
  trackItemsMap: d,
4577
4583
  structure: p
4578
- }), b = [], m = [], I = [], _ = [], k = [], w = [];
4584
+ }), b = [], h = [], I = [], v = [], k = [], w = [];
4579
4585
  e.forEach((x) => {
4580
4586
  let F;
4581
4587
  const tt = x.path.slice(1);
@@ -4591,30 +4597,30 @@ class Bo {
4591
4597
  path: tt,
4592
4598
  op: "add",
4593
4599
  value: x.oldValue
4594
- }, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? m.push(F) : x.path.includes("trackItemsMap") ? k.push(F) : x.path.includes("transitionsMap") ? _.push(F) : x.path.includes("tracks") ? b.push(F) : x.path.includes("structure") && w.push(F);
4600
+ }, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? h.push(F) : x.path.includes("trackItemsMap") ? k.push(F) : x.path.includes("transitionsMap") ? v.push(F) : x.path.includes("tracks") ? b.push(F) : x.path.includes("structure") && w.push(F);
4595
4601
  });
4596
4602
  const f = this.applyPatch(
4597
- h.tracks,
4603
+ m.tracks,
4598
4604
  b
4599
4605
  ), y = this.applyPatch(
4600
- h.transitionIds,
4601
- m
4602
- ), v = this.applyPatch(
4603
- h.trackItemIds,
4606
+ m.transitionIds,
4607
+ h
4608
+ ), _ = this.applyPatch(
4609
+ m.trackItemIds,
4604
4610
  I
4605
4611
  ), S = this.applyPatch(
4606
- h.transitionsMap,
4607
- _
4612
+ m.transitionsMap,
4613
+ v
4608
4614
  ), A = this.applyPatch(
4609
- h.trackItemsMap,
4615
+ m.trackItemsMap,
4610
4616
  k
4611
4617
  ), E = this.applyPatch(
4612
- h.structure,
4618
+ m.structure,
4613
4619
  w
4614
4620
  ), T = C({
4615
4621
  tracks: f,
4616
4622
  transitionIds: y,
4617
- trackItemIds: v,
4623
+ trackItemIds: _,
4618
4624
  transitionsMap: S,
4619
4625
  trackItemsMap: A,
4620
4626
  structure: E
@@ -4639,14 +4645,14 @@ class Bo {
4639
4645
  transitionsMap: u,
4640
4646
  trackItemsMap: d,
4641
4647
  structure: p
4642
- } = this.getState(), h = C({
4648
+ } = this.getState(), m = C({
4643
4649
  trackItemIds: i,
4644
4650
  tracks: o,
4645
4651
  transitionIds: c,
4646
4652
  transitionsMap: u,
4647
4653
  trackItemsMap: d,
4648
4654
  structure: p
4649
- }), b = [], m = [], I = [], _ = [], k = [], w = [];
4655
+ }), b = [], h = [], I = [], v = [], k = [], w = [];
4650
4656
  e.forEach((x) => {
4651
4657
  let F;
4652
4658
  const tt = x.path.slice(1);
@@ -4662,30 +4668,30 @@ class Bo {
4662
4668
  path: tt,
4663
4669
  op: "remove",
4664
4670
  value: x.oldValue
4665
- }, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? m.push(F) : x.path.includes("trackItemsMap") ? k.push(F) : x.path.includes("transitionsMap") ? _.push(F) : x.path.includes("structure") ? w.push(F) : b.push(F);
4671
+ }, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? h.push(F) : x.path.includes("trackItemsMap") ? k.push(F) : x.path.includes("transitionsMap") ? v.push(F) : x.path.includes("structure") ? w.push(F) : b.push(F);
4666
4672
  });
4667
4673
  const f = this.applyPatch(
4668
- h.tracks,
4674
+ m.tracks,
4669
4675
  b
4670
4676
  ), y = this.applyPatch(
4671
- h.transitionIds,
4672
- m
4673
- ), v = this.applyPatch(
4674
- h.trackItemIds,
4677
+ m.transitionIds,
4678
+ h
4679
+ ), _ = this.applyPatch(
4680
+ m.trackItemIds,
4675
4681
  I
4676
4682
  ), S = this.applyPatch(
4677
- h.transitionsMap,
4678
- _
4683
+ m.transitionsMap,
4684
+ v
4679
4685
  ), A = this.applyPatch(
4680
- h.trackItemsMap,
4686
+ m.trackItemsMap,
4681
4687
  k
4682
4688
  ), E = this.applyPatch(
4683
- h.structure,
4689
+ m.structure,
4684
4690
  w
4685
4691
  ), T = C({
4686
4692
  tracks: f,
4687
4693
  transitionIds: y,
4688
- trackItemIds: v,
4694
+ trackItemIds: _,
4689
4695
  transitionsMap: S,
4690
4696
  trackItemsMap: A,
4691
4697
  structure: E