@cliquify.me/state 5.0.14 → 5.0.16
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 +373 -365
- package/dist/index.umd.js +1 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Kt = (t, r, e) =>
|
|
1
|
+
var js = Object.defineProperty;
|
|
2
|
+
var Ws = (t, r, e) => r in t ? js(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
|
|
3
|
+
var Kt = (t, r, e) => Ws(t, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { subject as Vt, filter as qt, dispatch as Bs } from "@designcombo/events";
|
|
5
5
|
var bn = function(t, r) {
|
|
6
6
|
return bn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
|
|
@@ -87,8 +87,8 @@ var Mr = function() {
|
|
|
87
87
|
if (this._parentage = null, Array.isArray(u))
|
|
88
88
|
try {
|
|
89
89
|
for (var c = kn(u), d = c.next(); !d.done; d = c.next()) {
|
|
90
|
-
var
|
|
91
|
-
|
|
90
|
+
var f = d.value;
|
|
91
|
+
f.remove(this);
|
|
92
92
|
}
|
|
93
93
|
} catch (v) {
|
|
94
94
|
r = { error: v };
|
|
@@ -115,7 +115,7 @@ var Mr = function() {
|
|
|
115
115
|
for (var m = kn(y), I = m.next(); !I.done; I = m.next()) {
|
|
116
116
|
var b = I.value;
|
|
117
117
|
try {
|
|
118
|
-
|
|
118
|
+
Wn(b);
|
|
119
119
|
} catch (v) {
|
|
120
120
|
a = a ?? [], v instanceof pn ? a = _n(_n([], vn(a)), vn(v.errors)) : a.push(v);
|
|
121
121
|
}
|
|
@@ -137,7 +137,7 @@ var Mr = function() {
|
|
|
137
137
|
var e;
|
|
138
138
|
if (r && r !== this)
|
|
139
139
|
if (this.closed)
|
|
140
|
-
|
|
140
|
+
Wn(r);
|
|
141
141
|
else {
|
|
142
142
|
if (r instanceof t) {
|
|
143
143
|
if (r.closed || r._hasParent(this))
|
|
@@ -166,7 +166,7 @@ var Mr = function() {
|
|
|
166
166
|
function ds(t) {
|
|
167
167
|
return t instanceof Mr || t && "closed" in t && Pt(t.remove) && Pt(t.add) && Pt(t.unsubscribe);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Wn(t) {
|
|
170
170
|
Pt(t) ? t() : t.unsubscribe();
|
|
171
171
|
}
|
|
172
172
|
var Ys = {
|
|
@@ -387,8 +387,8 @@ var ri = us(function(t) {
|
|
|
387
387
|
var d = c.value;
|
|
388
388
|
d.next(e);
|
|
389
389
|
}
|
|
390
|
-
} catch (
|
|
391
|
-
s = { error:
|
|
390
|
+
} catch (f) {
|
|
391
|
+
s = { error: f };
|
|
392
392
|
} finally {
|
|
393
393
|
try {
|
|
394
394
|
c && !c.done && (a = u.return) && a.call(u);
|
|
@@ -492,7 +492,7 @@ function Rn(t) {
|
|
|
492
492
|
var vr = { exports: {} };
|
|
493
493
|
vr.exports;
|
|
494
494
|
(function(t, r) {
|
|
495
|
-
var e = 200, n = "__lodash_hash_undefined__", s = 1, a = 2, u = 9007199254740991, c = "[object Arguments]", d = "[object Array]",
|
|
495
|
+
var e = 200, n = "__lodash_hash_undefined__", s = 1, a = 2, u = 9007199254740991, c = "[object Arguments]", d = "[object Array]", f = "[object AsyncFunction]", h = "[object Boolean]", y = "[object Date]", m = "[object Error]", I = "[object Function]", b = "[object GeneratorFunction]", v = "[object Map]", S = "[object Number]", p = "[object Null]", k = "[object Object]", T = "[object Promise]", w = "[object Proxy]", E = "[object RegExp]", _ = "[object Set]", M = "[object String]", L = "[object Symbol]", R = "[object Undefined]", G = "[object WeakMap]", x = "[object ArrayBuffer]", F = "[object DataView]", et = "[object Float32Array]", Zt = "[object Float64Array]", Qt = "[object Int8Array]", ve = "[object Int16Array]", _e = "[object Int32Array]", Se = "[object Uint8Array]", we = "[object Uint8ClampedArray]", z = "[object Uint16Array]", Te = "[object Uint32Array]", Me = /[\\^$.*+?()[\]{}|]/g, st = /^\[object .+?Constructor\]$/, te = /^(?:0|[1-9]\d*)$/, $ = {};
|
|
496
496
|
$[et] = $[Zt] = $[Qt] = $[ve] = $[_e] = $[Se] = $[we] = $[z] = $[Te] = !0, $[c] = $[d] = $[x] = $[h] = $[F] = $[y] = $[m] = $[I] = $[v] = $[S] = $[k] = $[E] = $[_] = $[M] = $[G] = !1;
|
|
497
497
|
var ee = typeof dt == "object" && dt && dt.Object === Object && dt, Ee = typeof self == "object" && self && self.Object === Object && self, it = ee || Ee || Function("return this")(), re = r && !r.nodeType && r, ne = re && !0 && t && !t.nodeType && t, zt = ne && ne.exports === re, $t = zt && ee.process, se = function() {
|
|
498
498
|
try {
|
|
@@ -556,7 +556,7 @@ vr.exports;
|
|
|
556
556
|
return i ? "Symbol(src)_1." + i : "";
|
|
557
557
|
}(), le = mt.toString, Ce = RegExp(
|
|
558
558
|
"^" + Ht.call(rt).replace(Me, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
559
|
-
), Ut = zt ? it.Buffer : void 0, Mt = it.Symbol, de = it.Uint8Array, Et = mt.propertyIsEnumerable, yt = wt.splice, at = Mt ? Mt.toStringTag : void 0, At = Object.getOwnPropertySymbols,
|
|
559
|
+
), Ut = zt ? it.Buffer : void 0, Mt = it.Symbol, de = it.Uint8Array, Et = mt.propertyIsEnumerable, yt = wt.splice, at = Mt ? Mt.toStringTag : void 0, At = Object.getOwnPropertySymbols, jt = Ut ? Ut.isBuffer : void 0, gt = ce(Object.keys, Object), Wt = Ot(it, "DataView"), It = Ot(it, "Map"), Bt = Ot(it, "Promise"), Yt = Ot(it, "Set"), je = Ot(it, "WeakMap"), Gt = Ot(Object, "create"), ir = nt(Wt), xt = nt(It), xr = nt(Bt), Or = nt(Yt), Cr = nt(je), ar = Mt ? Mt.prototype : void 0, We = ar ? ar.valueOf : void 0;
|
|
560
560
|
function X(i) {
|
|
561
561
|
var o = -1, l = i == null ? 0 : i.length;
|
|
562
562
|
for (this.clear(); ++o < l; ) {
|
|
@@ -624,14 +624,14 @@ vr.exports;
|
|
|
624
624
|
this.set(g[0], g[1]);
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function jr() {
|
|
628
628
|
this.size = 0, this.__data__ = {
|
|
629
629
|
hash: new X(),
|
|
630
630
|
map: new (It || J)(),
|
|
631
631
|
string: new X()
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function Wr(i) {
|
|
635
635
|
var o = ht(this, i).delete(i);
|
|
636
636
|
return this.size -= o ? 1 : 0, o;
|
|
637
637
|
}
|
|
@@ -645,7 +645,7 @@ vr.exports;
|
|
|
645
645
|
var l = ht(this, i), g = l.size;
|
|
646
646
|
return l.set(i, o), this.size += l.size == g ? 0 : 1, this;
|
|
647
647
|
}
|
|
648
|
-
ot.prototype.clear =
|
|
648
|
+
ot.prototype.clear = jr, ot.prototype.delete = Wr, ot.prototype.get = Br, ot.prototype.has = Yr, ot.prototype.set = Gr;
|
|
649
649
|
function Re(i) {
|
|
650
650
|
var o = -1, l = i == null ? 0 : i.length;
|
|
651
651
|
for (this.__data__ = new ot(); ++o < l; )
|
|
@@ -707,7 +707,7 @@ vr.exports;
|
|
|
707
707
|
return ze(i) ? g : Nt(g, l(i));
|
|
708
708
|
}
|
|
709
709
|
function fe(i) {
|
|
710
|
-
return i == null ? i === void 0 ? R :
|
|
710
|
+
return i == null ? i === void 0 ? R : p : at && at in Object(i) ? Ct(i) : lr(i);
|
|
711
711
|
}
|
|
712
712
|
function cr(i) {
|
|
713
713
|
return vt(i) && fe(i) == c;
|
|
@@ -815,8 +815,8 @@ vr.exports;
|
|
|
815
815
|
var Z = Ge(P(i), P(o), g, O, A, D);
|
|
816
816
|
return D.delete(i), Z;
|
|
817
817
|
case L:
|
|
818
|
-
if (
|
|
819
|
-
return
|
|
818
|
+
if (We)
|
|
819
|
+
return We.call(i) == We.call(o);
|
|
820
820
|
}
|
|
821
821
|
return !1;
|
|
822
822
|
}
|
|
@@ -838,8 +838,8 @@ vr.exports;
|
|
|
838
838
|
B = P[ct];
|
|
839
839
|
var Rt = i[B], he = o[B];
|
|
840
840
|
if (g)
|
|
841
|
-
var
|
|
842
|
-
if (!(
|
|
841
|
+
var jn = D ? g(he, Rt, B, o, i, A) : g(Rt, he, B, i, o, A);
|
|
842
|
+
if (!(jn === void 0 ? Rt === he || O(Rt, he, l, g, A) : jn)) {
|
|
843
843
|
K = !1;
|
|
844
844
|
break;
|
|
845
845
|
}
|
|
@@ -877,7 +877,7 @@ vr.exports;
|
|
|
877
877
|
return Et.call(i, o);
|
|
878
878
|
}));
|
|
879
879
|
} : dn, kt = fe;
|
|
880
|
-
(
|
|
880
|
+
(Wt && kt(new Wt(new ArrayBuffer(1))) != F || It && kt(new It()) != v || Bt && kt(Bt.resolve()) != T || Yt && kt(new Yt()) != _ || je && kt(new je()) != G) && (kt = function(i) {
|
|
881
881
|
var o = fe(i), l = o == k ? i.constructor : void 0, g = l ? nt(l) : "";
|
|
882
882
|
if (g)
|
|
883
883
|
switch (g) {
|
|
@@ -935,7 +935,7 @@ vr.exports;
|
|
|
935
935
|
function Xe(i) {
|
|
936
936
|
return i != null && Ke(i.length) && !pr(i);
|
|
937
937
|
}
|
|
938
|
-
var $e =
|
|
938
|
+
var $e = jt || fn;
|
|
939
939
|
function ln(i, o) {
|
|
940
940
|
return ur(i, o);
|
|
941
941
|
}
|
|
@@ -943,7 +943,7 @@ vr.exports;
|
|
|
943
943
|
if (!hr(i))
|
|
944
944
|
return !1;
|
|
945
945
|
var o = fe(i);
|
|
946
|
-
return o == I || o == b || o ==
|
|
946
|
+
return o == I || o == b || o == f || o == w;
|
|
947
947
|
}
|
|
948
948
|
function Ke(i) {
|
|
949
949
|
return typeof i == "number" && i > -1 && i % 1 == 0 && i <= u;
|
|
@@ -968,12 +968,12 @@ vr.exports;
|
|
|
968
968
|
t.exports = ln;
|
|
969
969
|
})(vr, vr.exports);
|
|
970
970
|
var ni = vr.exports;
|
|
971
|
-
const
|
|
971
|
+
const j = /* @__PURE__ */ Rn(ni), To = "add", si = "track", ii = "trackItems", Mo = `${si}:changed`, Eo = `${ii}:changed`, ai = "state", Ao = `${ai}:changed`, oi = "bulk", Vn = `${oi}:edit`, Pn = "design", ci = `${Pn}:load`, ui = `${Pn}:resize`, H = "add", li = `${H}:text`, di = `${H}:video`, fi = `${H}:audio`, xo = `${H}:placeholder`, pi = `${H}:image`, hi = `${H}:illustration`, mi = `${H}:shape`, Oo = `${H}:mask`, Co = `${H}:transition`, yi = `${H}:animation`, gi = `${H}:caption`, Ii = `${H}:template`, bi = `${H}:items`, ki = `${H}:composition`, vi = `${H}:progressBar`, _i = `${H}:progressFrame`, Si = `${H}:radialAudioBars`, wi = `${H}:linealAudioBars`, Ti = `${H}:progressSquare`, Mi = `${H}:waveAudioBars`, Ei = `${H}:hillAudioBars`, Ai = `${H}:rect`, Dt = "edit", xi = `${Dt}:object`, Oi = `${Dt}:replaceMedia`, Ro = `${Dt}:text`, Po = `${Dt}:shape`, Do = `${Dt}:templateItem`, zo = `${Dt}:deleteTemplateItem`, Ci = `${Dt}:backgroundEditor`, Ri = `${Dt}:track`, $o = "enterEditMode", Ne = "active", Fo = `${Ne}:set`, No = `${Ne}:delete`, Pi = `${Ne}:paste`, Lo = `${Ne}:clone`, Di = `${Ne}:split`, tt = "layer", Ho = `${tt}:locked`, Uo = `${tt}:hidden`, jo = `${tt}:move`, zi = `${tt}:select`, Wo = `${tt}:selection`, Bo = `${tt}:sendTo`, Yo = `${tt}:rename`, Go = `${tt}:editingName`, $i = `${tt}:copy`, Xo = `${tt}:paste`, Fi = `${tt}:clone`, Ko = `${tt}:split`, Vo = `${tt}:cut`, Ni = `${tt}:delete`, Li = `${tt}:replace`, Er = "history", Hi = `${Er}:undo`, Ui = `${Er}:redo`, qo = `${Er}:reset`, hs = "scale", ji = `${hs}:changed`;
|
|
972
972
|
var _r = { exports: {} };
|
|
973
973
|
_r.exports;
|
|
974
974
|
(function(t, r) {
|
|
975
|
-
var e = 200, n = "__lodash_hash_undefined__", s = 9007199254740991, a = "[object Arguments]", u = "[object Array]", c = "[object Boolean]", d = "[object Date]",
|
|
976
|
-
z[a] = z[u] = z[E] = z[_] = z[c] = z[d] = z[M] = z[L] = z[R] = z[G] = z[x] = z[m] = z[I] = z[b] = z[S] = z[
|
|
975
|
+
var e = 200, n = "__lodash_hash_undefined__", s = 9007199254740991, a = "[object Arguments]", u = "[object Array]", c = "[object Boolean]", d = "[object Date]", f = "[object Error]", h = "[object Function]", y = "[object GeneratorFunction]", m = "[object Map]", I = "[object Number]", b = "[object Object]", v = "[object Promise]", S = "[object RegExp]", p = "[object Set]", k = "[object String]", T = "[object Symbol]", w = "[object WeakMap]", E = "[object ArrayBuffer]", _ = "[object DataView]", M = "[object Float32Array]", L = "[object Float64Array]", R = "[object Int8Array]", G = "[object Int16Array]", x = "[object Int32Array]", F = "[object Uint8Array]", et = "[object Uint8ClampedArray]", Zt = "[object Uint16Array]", Qt = "[object Uint32Array]", ve = /[\\^$.*+?()[\]{}|]/g, _e = /\w*$/, Se = /^\[object .+?Constructor\]$/, we = /^(?:0|[1-9]\d*)$/, z = {};
|
|
976
|
+
z[a] = z[u] = z[E] = z[_] = z[c] = z[d] = z[M] = z[L] = z[R] = z[G] = z[x] = z[m] = z[I] = z[b] = z[S] = z[p] = z[k] = z[T] = z[F] = z[et] = z[Zt] = z[Qt] = !0, z[f] = z[h] = z[w] = !1;
|
|
977
977
|
var Te = typeof dt == "object" && dt && dt.Object === Object && dt, Me = typeof self == "object" && self && self.Object === Object && self, st = Te || Me || Function("return this")(), te = r && !r.nodeType && r, $ = te && !0 && t && !t.nodeType && t, ee = $ && $.exports === te;
|
|
978
978
|
function Ee(i, o) {
|
|
979
979
|
return i.set(o[0], o[1]), i;
|
|
@@ -1035,7 +1035,7 @@ _r.exports;
|
|
|
1035
1035
|
return i ? "Symbol(src)_1." + i : "";
|
|
1036
1036
|
}(), ce = xe.toString, ut = St.hasOwnProperty, wt = St.toString, Oe = RegExp(
|
|
1037
1037
|
"^" + ce.call(ut).replace(ve, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1038
|
-
), mt = ee ? st.Buffer : void 0, Tt = st.Symbol, Ht = st.Uint8Array, rt = Nt(Object.getPrototypeOf, Object), ue = Object.create, le = St.propertyIsEnumerable, Ce = Ae.splice, Ut = Object.getOwnPropertySymbols, Mt = mt ? mt.isBuffer : void 0, de = Nt(Object.keys, Object), Et = ht(st, "DataView"), yt = ht(st, "Map"), at = ht(st, "Promise"), At = ht(st, "Set"),
|
|
1038
|
+
), mt = ee ? st.Buffer : void 0, Tt = st.Symbol, Ht = st.Uint8Array, rt = Nt(Object.getPrototypeOf, Object), ue = Object.create, le = St.propertyIsEnumerable, Ce = Ae.splice, Ut = Object.getOwnPropertySymbols, Mt = mt ? mt.isBuffer : void 0, de = Nt(Object.keys, Object), Et = ht(st, "DataView"), yt = ht(st, "Map"), at = ht(st, "Promise"), At = ht(st, "Set"), jt = ht(st, "WeakMap"), gt = ht(Object, "create"), Wt = nt(Et), It = nt(yt), Bt = nt(at), Yt = nt(At), je = nt(jt), Gt = Tt ? Tt.prototype : void 0, ir = Gt ? Gt.valueOf : void 0;
|
|
1039
1039
|
function xt(i) {
|
|
1040
1040
|
var o = -1, l = i ? i.length : 0;
|
|
1041
1041
|
for (this.clear(); ++o < l; ) {
|
|
@@ -1061,11 +1061,11 @@ _r.exports;
|
|
|
1061
1061
|
var o = this.__data__;
|
|
1062
1062
|
return gt ? o[i] !== void 0 : ut.call(o, i);
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function We(i, o) {
|
|
1065
1065
|
var l = this.__data__;
|
|
1066
1066
|
return l[i] = gt && o === void 0 ? n : o, this;
|
|
1067
1067
|
}
|
|
1068
|
-
xt.prototype.clear = xr, xt.prototype.delete = Or, xt.prototype.get = Cr, xt.prototype.has = ar, xt.prototype.set =
|
|
1068
|
+
xt.prototype.clear = xr, xt.prototype.delete = Or, xt.prototype.get = Cr, xt.prototype.has = ar, xt.prototype.set = We;
|
|
1069
1069
|
function X(i) {
|
|
1070
1070
|
var o = -1, l = i ? i.length : 0;
|
|
1071
1071
|
for (this.clear(); ++o < l; ) {
|
|
@@ -1125,10 +1125,10 @@ _r.exports;
|
|
|
1125
1125
|
function ot(i) {
|
|
1126
1126
|
this.__data__ = new X(i);
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1128
|
+
function jr() {
|
|
1129
1129
|
this.__data__ = new X();
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function Wr(i) {
|
|
1132
1132
|
return this.__data__.delete(i);
|
|
1133
1133
|
}
|
|
1134
1134
|
function Br(i) {
|
|
@@ -1147,7 +1147,7 @@ _r.exports;
|
|
|
1147
1147
|
}
|
|
1148
1148
|
return l.set(i, o), this;
|
|
1149
1149
|
}
|
|
1150
|
-
ot.prototype.clear =
|
|
1150
|
+
ot.prototype.clear = jr, ot.prototype.delete = Wr, ot.prototype.get = Br, ot.prototype.has = Yr, ot.prototype.set = Gr;
|
|
1151
1151
|
function Re(i, o) {
|
|
1152
1152
|
var l = Xe(i) || ze(i) ? $t(i.length, String) : [], g = l.length, O = !!g;
|
|
1153
1153
|
for (var A in i)
|
|
@@ -1288,19 +1288,19 @@ _r.exports;
|
|
|
1288
1288
|
return qr(l) ? l : void 0;
|
|
1289
1289
|
}
|
|
1290
1290
|
var Ot = Ut ? Nt(Ut, Object) : dn, Ct = Vr;
|
|
1291
|
-
(Et && Ct(new Et(new ArrayBuffer(1))) != _ || yt && Ct(new yt()) != m || at && Ct(at.resolve()) != v || At && Ct(new At()) !=
|
|
1291
|
+
(Et && Ct(new Et(new ArrayBuffer(1))) != _ || yt && Ct(new yt()) != m || at && Ct(at.resolve()) != v || At && Ct(new At()) != p || jt && Ct(new jt()) != w) && (Ct = function(i) {
|
|
1292
1292
|
var o = wt.call(i), l = o == b ? i.constructor : void 0, g = l ? nt(l) : void 0;
|
|
1293
1293
|
if (g)
|
|
1294
1294
|
switch (g) {
|
|
1295
|
-
case
|
|
1295
|
+
case Wt:
|
|
1296
1296
|
return _;
|
|
1297
1297
|
case It:
|
|
1298
1298
|
return m;
|
|
1299
1299
|
case Bt:
|
|
1300
1300
|
return v;
|
|
1301
1301
|
case Yt:
|
|
1302
|
-
return
|
|
1303
|
-
case
|
|
1302
|
+
return p;
|
|
1303
|
+
case je:
|
|
1304
1304
|
return w;
|
|
1305
1305
|
}
|
|
1306
1306
|
return o;
|
|
@@ -1339,7 +1339,7 @@ _r.exports;
|
|
|
1339
1339
|
return new O(i);
|
|
1340
1340
|
case S:
|
|
1341
1341
|
return ur(i);
|
|
1342
|
-
case
|
|
1342
|
+
case p:
|
|
1343
1343
|
return Zr(i, g, l);
|
|
1344
1344
|
case T:
|
|
1345
1345
|
return Qr(i);
|
|
@@ -1414,8 +1414,8 @@ _r.exports;
|
|
|
1414
1414
|
}
|
|
1415
1415
|
t.exports = dr;
|
|
1416
1416
|
})(_r, _r.exports);
|
|
1417
|
-
var
|
|
1418
|
-
const C = /* @__PURE__ */ Rn(
|
|
1417
|
+
var Wi = _r.exports;
|
|
1418
|
+
const C = /* @__PURE__ */ Rn(Wi);
|
|
1419
1419
|
function Bi(t, r) {
|
|
1420
1420
|
return t.filter((n) => {
|
|
1421
1421
|
if (r.forEach((s) => {
|
|
@@ -1427,7 +1427,7 @@ function Bi(t, r) {
|
|
|
1427
1427
|
return n;
|
|
1428
1428
|
});
|
|
1429
1429
|
}
|
|
1430
|
-
const
|
|
1430
|
+
const W = (t) => Object.keys(t).reduce((r, e) => {
|
|
1431
1431
|
const { display: n } = t[e];
|
|
1432
1432
|
return Math.max(r, n.to);
|
|
1433
1433
|
}, 0);
|
|
@@ -1441,8 +1441,8 @@ function q(t, r, e) {
|
|
|
1441
1441
|
(b, v) => b.display.from - v.display.from
|
|
1442
1442
|
), d = a.sort(
|
|
1443
1443
|
(b, v) => b.display.from - v.display.from
|
|
1444
|
-
),
|
|
1445
|
-
let h = (
|
|
1444
|
+
), f = c[c.length - 1];
|
|
1445
|
+
let h = (f == null ? void 0 : f.display.to) || 0;
|
|
1446
1446
|
d.forEach((b) => {
|
|
1447
1447
|
if (e.includes(String(b.id))) {
|
|
1448
1448
|
const v = b.playbackRate || 1;
|
|
@@ -1460,14 +1460,14 @@ function q(t, r, e) {
|
|
|
1460
1460
|
m.forEach((b) => {
|
|
1461
1461
|
const v = [];
|
|
1462
1462
|
let S = 0;
|
|
1463
|
-
if (v.forEach((
|
|
1464
|
-
|
|
1463
|
+
if (v.forEach((p) => {
|
|
1464
|
+
p.forEach((k) => {
|
|
1465
1465
|
k.type === "transition" && (S += k.duration);
|
|
1466
1466
|
});
|
|
1467
1467
|
}), r[String(b)]) {
|
|
1468
|
-
const
|
|
1468
|
+
const p = r[String(b)], k = p.playbackRate || 1;
|
|
1469
1469
|
let T;
|
|
1470
|
-
(
|
|
1470
|
+
(p.type === "video" || p.type === "audio") && p.trim ? T = (p.trim.to - p.trim.from) / k : T = p.display.to - p.display.from, r[String(b)].display = {
|
|
1471
1471
|
from: I - S,
|
|
1472
1472
|
to: I + T - S
|
|
1473
1473
|
}, I += T;
|
|
@@ -1476,17 +1476,24 @@ function q(t, r, e) {
|
|
|
1476
1476
|
});
|
|
1477
1477
|
}
|
|
1478
1478
|
function ms(t, r, e, n, s, a) {
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1479
|
+
const u = Object.keys(e);
|
|
1480
|
+
return r.forEach((c) => {
|
|
1481
|
+
if (!t.includes(c) && (s[c] = e[c], e[c].type === "composition" || e[c].type === "template")) {
|
|
1482
|
+
const d = n.find((f) => f.id === c);
|
|
1483
|
+
if (d) {
|
|
1484
|
+
a.push(d);
|
|
1485
|
+
const f = d.items.filter(
|
|
1486
|
+
(h) => u.includes(h)
|
|
1487
|
+
);
|
|
1488
|
+
ms(
|
|
1489
|
+
t,
|
|
1490
|
+
f,
|
|
1491
|
+
e,
|
|
1492
|
+
n,
|
|
1493
|
+
s,
|
|
1494
|
+
a
|
|
1495
|
+
);
|
|
1496
|
+
}
|
|
1490
1497
|
}
|
|
1491
1498
|
}), { updatedTrackItems: s, updatedStructure: a };
|
|
1492
1499
|
}
|
|
@@ -1498,7 +1505,7 @@ function Yi(t, r) {
|
|
|
1498
1505
|
}
|
|
1499
1506
|
);
|
|
1500
1507
|
s.push(...a);
|
|
1501
|
-
const u = e.trackItemIds, c = e.transitionIds, d = C(e.tracks),
|
|
1508
|
+
const u = e.trackItemIds, c = e.transitionIds, d = C(e.tracks), f = C(e.structure);
|
|
1502
1509
|
s.forEach((_) => {
|
|
1503
1510
|
var L;
|
|
1504
1511
|
const M = e.trackItemsMap[_] || e.transitionsMap[_];
|
|
@@ -1507,13 +1514,13 @@ function Yi(t, r) {
|
|
|
1507
1514
|
(x) => x.id === M.id
|
|
1508
1515
|
)) == null ? void 0 : L.items;
|
|
1509
1516
|
s.push(...R);
|
|
1510
|
-
const G =
|
|
1517
|
+
const G = f.findIndex(
|
|
1511
1518
|
(x) => x.id === M.id
|
|
1512
1519
|
);
|
|
1513
|
-
|
|
1520
|
+
f.splice(G, 1);
|
|
1514
1521
|
}
|
|
1515
1522
|
}), s.forEach((_) => {
|
|
1516
|
-
|
|
1523
|
+
f.forEach((M) => {
|
|
1517
1524
|
M.items.includes(_) && (M.items = M.items.filter((L) => L !== _));
|
|
1518
1525
|
});
|
|
1519
1526
|
});
|
|
@@ -1544,14 +1551,14 @@ function Yi(t, r) {
|
|
|
1544
1551
|
)
|
|
1545
1552
|
), S = d.filter((_) => _.magnetic);
|
|
1546
1553
|
q(S, v, []);
|
|
1547
|
-
const
|
|
1554
|
+
const p = {}, k = [], { updatedTrackItems: T, updatedStructure: w } = ms(
|
|
1548
1555
|
s,
|
|
1549
1556
|
I,
|
|
1550
1557
|
e.trackItemsMap,
|
|
1551
1558
|
e.structure,
|
|
1552
|
-
|
|
1559
|
+
p,
|
|
1553
1560
|
k
|
|
1554
|
-
), E =
|
|
1561
|
+
), E = W(T);
|
|
1555
1562
|
return {
|
|
1556
1563
|
trackItemIds: h,
|
|
1557
1564
|
activeIds: [],
|
|
@@ -1620,19 +1627,19 @@ async function Ki(t) {
|
|
|
1620
1627
|
url: S.details.fontUrl
|
|
1621
1628
|
}
|
|
1622
1629
|
]), S.type === "composition" || S.type === "template") {
|
|
1623
|
-
const
|
|
1630
|
+
const p = ys(
|
|
1624
1631
|
u,
|
|
1625
1632
|
v,
|
|
1626
1633
|
a
|
|
1627
1634
|
);
|
|
1628
|
-
s.push(...
|
|
1635
|
+
s.push(...p);
|
|
1629
1636
|
}
|
|
1630
1637
|
});
|
|
1631
|
-
const c = Xi(s, r), d = C(JSON.parse(c)),
|
|
1638
|
+
const c = Xi(s, r), d = C(JSON.parse(c)), f = e.tracks;
|
|
1632
1639
|
d.activeIds.forEach((v) => {
|
|
1633
1640
|
const S = d.trackItemsMap[v];
|
|
1634
1641
|
e.trackItemsMap[v] = S, e.trackItemIds.push(v);
|
|
1635
|
-
const
|
|
1642
|
+
const p = {
|
|
1636
1643
|
id: ge(),
|
|
1637
1644
|
type: S.type,
|
|
1638
1645
|
items: [v],
|
|
@@ -1640,7 +1647,7 @@ async function Ki(t) {
|
|
|
1640
1647
|
static: !1,
|
|
1641
1648
|
muted: !1
|
|
1642
1649
|
};
|
|
1643
|
-
|
|
1650
|
+
f.unshift(p);
|
|
1644
1651
|
});
|
|
1645
1652
|
const h = [...d.structure, ...e.structure], y = e.trackItemIds, m = {
|
|
1646
1653
|
...d.trackItemsMap,
|
|
@@ -1649,8 +1656,8 @@ async function Ki(t) {
|
|
|
1649
1656
|
structure: h,
|
|
1650
1657
|
trackItemIds: y,
|
|
1651
1658
|
trackItemsMap: m,
|
|
1652
|
-
tracks:
|
|
1653
|
-
}, b =
|
|
1659
|
+
tracks: f
|
|
1660
|
+
}, b = W(I.trackItemsMap);
|
|
1654
1661
|
return {
|
|
1655
1662
|
trackItemIds: I.trackItemIds,
|
|
1656
1663
|
trackItemsMap: I.trackItemsMap,
|
|
@@ -1728,8 +1735,8 @@ const Vi = (t) => {
|
|
|
1728
1735
|
const n = getComputedStyle(e).height;
|
|
1729
1736
|
return document.body.removeChild(e), parseFloat(n);
|
|
1730
1737
|
}, qn = (t, r) => {
|
|
1731
|
-
var
|
|
1732
|
-
const e = ((
|
|
1738
|
+
var f, h;
|
|
1739
|
+
const e = ((f = t.details.crop) == null ? void 0 : f.width) || t.details.width || 0, n = ((h = t.details.crop) == null ? void 0 : h.height) || t.details.height || 0;
|
|
1733
1740
|
let s = r.width, a = r.height;
|
|
1734
1741
|
const u = r.width / r.height;
|
|
1735
1742
|
e / n > u ? (s = e, a = e / u) : (a = n, s = n * u);
|
|
@@ -1758,14 +1765,14 @@ async function Ji(t, r) {
|
|
|
1758
1765
|
if (!s || !((c = n == null ? void 0 : n.details) != null && c.src)) return {};
|
|
1759
1766
|
const a = C(s), u = a.details;
|
|
1760
1767
|
if (s.type === "image") {
|
|
1761
|
-
const d = await He(n.details.src), { crop:
|
|
1762
|
-
u.crop =
|
|
1768
|
+
const d = await He(n.details.src), { crop: f, newHeight: h, newWidth: y } = qn(s, d);
|
|
1769
|
+
u.crop = f, u.width = y, u.height = h, u.src = n.details.src;
|
|
1763
1770
|
} else if (s.type === "video") {
|
|
1764
|
-
const d = await $n(n.details.src), { display:
|
|
1765
|
-
u.crop = m, u.width = b, u.height = I, u.src = n.details.src, a.display =
|
|
1771
|
+
const d = await $n(n.details.src), { display: f, duration: h, trim: y } = Jn(s, d), { crop: m, newHeight: I, newWidth: b } = qn(s, d);
|
|
1772
|
+
u.crop = m, u.width = b, u.height = I, u.src = n.details.src, a.display = f, a.duration = h, a.trim = y;
|
|
1766
1773
|
} else if (s.type === "audio") {
|
|
1767
|
-
const d = await Is(n.details.src), { display:
|
|
1768
|
-
u.src = n.details.src, a.display =
|
|
1774
|
+
const d = await Is(n.details.src), { display: f, duration: h, trim: y } = Jn(s, d);
|
|
1775
|
+
u.src = n.details.src, a.display = f, a.duration = h, a.trim = y;
|
|
1769
1776
|
}
|
|
1770
1777
|
return n.metadata && (a.metadata = {
|
|
1771
1778
|
...s.metadata || {},
|
|
@@ -1786,11 +1793,11 @@ function Zi(t, r) {
|
|
|
1786
1793
|
...C(c),
|
|
1787
1794
|
id: d
|
|
1788
1795
|
}, e.trackItemIds.push(d);
|
|
1789
|
-
const
|
|
1796
|
+
const f = e.tracks.find(
|
|
1790
1797
|
(h) => h.items.includes(u)
|
|
1791
1798
|
);
|
|
1792
|
-
n[
|
|
1793
|
-
...
|
|
1799
|
+
n[f.id] ? n[f.id].items.push(d) : n[f.id] = {
|
|
1800
|
+
...f,
|
|
1794
1801
|
id: ge(),
|
|
1795
1802
|
items: [d],
|
|
1796
1803
|
static: !1,
|
|
@@ -1814,10 +1821,10 @@ function Qi(t) {
|
|
|
1814
1821
|
}
|
|
1815
1822
|
return t = t.replace(r, (u, c) => s(c)), t = t.replace(
|
|
1816
1823
|
e,
|
|
1817
|
-
(u, c, d,
|
|
1824
|
+
(u, c, d, f) => a(+c, +d, +f)
|
|
1818
1825
|
), t = t.replace(
|
|
1819
1826
|
n,
|
|
1820
|
-
(u, c, d,
|
|
1827
|
+
(u, c, d, f) => a(+c, +d, +f)
|
|
1821
1828
|
), t;
|
|
1822
1829
|
}
|
|
1823
1830
|
function V(t) {
|
|
@@ -1855,8 +1862,8 @@ const ta = (t) => {
|
|
|
1855
1862
|
const r = `.${t.split(".").filter((a) => a.includes("fill:")).join(".")}`, e = {}, n = /\.([\w-]+)\s*\{\s*([^}]+)\s*\}/g;
|
|
1856
1863
|
let s;
|
|
1857
1864
|
for (; (s = n.exec(r)) !== null; ) {
|
|
1858
|
-
const a = s[1], u = s[2], c = {}, d = /fill\s*:\s*([^;]+);?/.exec(u),
|
|
1859
|
-
d && (c.fill = V(d[1].trim())),
|
|
1865
|
+
const a = s[1], u = s[2], c = {}, d = /fill\s*:\s*([^;]+);?/.exec(u), f = /stroke\s*:\s*([^;]+);?/.exec(u);
|
|
1866
|
+
d && (c.fill = V(d[1].trim())), f && (c.stroke = V(f[1].trim())), e[a] = c;
|
|
1860
1867
|
}
|
|
1861
1868
|
return e;
|
|
1862
1869
|
};
|
|
@@ -1872,10 +1879,10 @@ function hn(t) {
|
|
|
1872
1879
|
function ea(t, r, e = 300, n = 300) {
|
|
1873
1880
|
const s = [], u = new DOMParser().parseFromString(t, "image/svg+xml"), c = u.documentElement;
|
|
1874
1881
|
c.setAttribute("width", `${e}`), c.setAttribute("height", `${n}`);
|
|
1875
|
-
const d = c.querySelectorAll("style"),
|
|
1882
|
+
const d = c.querySelectorAll("style"), f = {};
|
|
1876
1883
|
d.forEach((v) => {
|
|
1877
|
-
const S = v.textContent || "",
|
|
1878
|
-
Object.assign(
|
|
1884
|
+
const S = v.textContent || "", p = ta(S);
|
|
1885
|
+
Object.assign(f, p);
|
|
1879
1886
|
const k = S.replace(/\.(st[\w-]+)/g, `.${r}-$1`).replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`);
|
|
1880
1887
|
v.textContent = k;
|
|
1881
1888
|
const T = Array.from(u.querySelectorAll("*")), w = /* @__PURE__ */ new Set();
|
|
@@ -1903,7 +1910,7 @@ function ea(t, r, e = 300, n = 300) {
|
|
|
1903
1910
|
}
|
|
1904
1911
|
const M = E.getAttribute("class");
|
|
1905
1912
|
M && M.split(" ").forEach((L) => {
|
|
1906
|
-
const R =
|
|
1913
|
+
const R = f[L];
|
|
1907
1914
|
R != null && R.fill && !["none", "transparent"].includes(R.fill) && w.add(V(R.fill)), R != null && R.stroke && !["none", "transparent"].includes(R.stroke) && w.add(V(R.stroke));
|
|
1908
1915
|
});
|
|
1909
1916
|
}), Array.from(w).forEach((E) => {
|
|
@@ -1917,7 +1924,7 @@ function ea(t, r, e = 300, n = 300) {
|
|
|
1917
1924
|
if (S) {
|
|
1918
1925
|
const k = S.split(" ").map((T) => `${r}-${T}`).join(" ");
|
|
1919
1926
|
v.setAttribute("class", k), k.split(" ").forEach((T) => {
|
|
1920
|
-
const w =
|
|
1927
|
+
const w = f[T];
|
|
1921
1928
|
w != null && w.fill && !["none", "transparent"].includes(w.fill) && y.add(V(w.fill)), w != null && w.stroke && !["none", "transparent"].includes(w.stroke) && y.add(V(w.stroke));
|
|
1922
1929
|
});
|
|
1923
1930
|
}
|
|
@@ -1925,9 +1932,9 @@ function ea(t, r, e = 300, n = 300) {
|
|
|
1925
1932
|
const T = v.getAttribute(k);
|
|
1926
1933
|
T && !["none", "transparent"].includes(T) && y.add(V(T));
|
|
1927
1934
|
});
|
|
1928
|
-
const
|
|
1929
|
-
if (
|
|
1930
|
-
const k = /fill\s*:\s*([^;]+);?/.exec(
|
|
1935
|
+
const p = v.getAttribute("style");
|
|
1936
|
+
if (p) {
|
|
1937
|
+
const k = /fill\s*:\s*([^;]+);?/.exec(p), T = /stroke\s*:\s*([^;]+);?/.exec(p), w = /stop-color\s*:\s*([^;]+);?/.exec(p);
|
|
1931
1938
|
if (k) {
|
|
1932
1939
|
const E = k[1].trim();
|
|
1933
1940
|
E && !["none", "transparent"].includes(E) && y.add(V(E));
|
|
@@ -1950,10 +1957,10 @@ function ea(t, r, e = 300, n = 300) {
|
|
|
1950
1957
|
}
|
|
1951
1958
|
if (["fill", "stroke", "stop-color", "filter", "clip-path", "mask"].forEach(
|
|
1952
1959
|
(S) => {
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1960
|
+
const p = v.getAttribute(S);
|
|
1961
|
+
p && p.includes("url(#") && v.setAttribute(
|
|
1955
1962
|
S,
|
|
1956
|
-
|
|
1963
|
+
p.replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`)
|
|
1957
1964
|
);
|
|
1958
1965
|
}
|
|
1959
1966
|
), v.hasAttribute("style")) {
|
|
@@ -2317,12 +2324,12 @@ const ws = async (t, r) => {
|
|
|
2317
2324
|
r.size.width / n.width,
|
|
2318
2325
|
r.size.height / n.height
|
|
2319
2326
|
), a = ((y = t.details) == null ? void 0 : y.rotate) || 0, u = pt(r, n), c = t.display;
|
|
2320
|
-
let d = 1 / 0,
|
|
2327
|
+
let d = 1 / 0, f = 0;
|
|
2321
2328
|
e.forEach((m) => {
|
|
2322
2329
|
const I = t.trackItemsMap[m];
|
|
2323
|
-
I.display.from < d && (d = I.display.from), I.display.to >
|
|
2330
|
+
I.display.from < d && (d = I.display.from), I.display.to > f && (f = I.display.to);
|
|
2324
2331
|
});
|
|
2325
|
-
const h = t.trim || t.display || { from: d, to:
|
|
2332
|
+
const h = t.trim || t.display || { from: d, to: f };
|
|
2326
2333
|
return {
|
|
2327
2334
|
id: t.id,
|
|
2328
2335
|
type: "template",
|
|
@@ -2337,7 +2344,7 @@ const ws = async (t, r) => {
|
|
|
2337
2344
|
background: t.details.background || "transparent"
|
|
2338
2345
|
},
|
|
2339
2346
|
trim: h,
|
|
2340
|
-
display: c || { from: d, to:
|
|
2347
|
+
display: c || { from: d, to: f },
|
|
2341
2348
|
activeEdit: !1
|
|
2342
2349
|
};
|
|
2343
2350
|
}, aa = async (t, r) => {
|
|
@@ -2349,10 +2356,10 @@ const ws = async (t, r) => {
|
|
|
2349
2356
|
r.size.width / n.width,
|
|
2350
2357
|
r.size.height / n.height
|
|
2351
2358
|
), a = ((h = t.details) == null ? void 0 : h.rotate) || 0, u = pt(r, n), c = t.display;
|
|
2352
|
-
let d = 1 / 0,
|
|
2359
|
+
let d = 1 / 0, f = 0;
|
|
2353
2360
|
return e.forEach((y) => {
|
|
2354
2361
|
const m = t.trackItemsMap[y];
|
|
2355
|
-
m.display.from < d && (d = m.display.from), m.display.to >
|
|
2362
|
+
m.display.from < d && (d = m.display.from), m.display.to > f && (f = m.display.to);
|
|
2356
2363
|
}), {
|
|
2357
2364
|
id: t.id,
|
|
2358
2365
|
type: "composition",
|
|
@@ -2365,13 +2372,13 @@ const ws = async (t, r) => {
|
|
|
2365
2372
|
scale: s,
|
|
2366
2373
|
rotate: a
|
|
2367
2374
|
},
|
|
2368
|
-
display: c || { from: d, to:
|
|
2375
|
+
display: c || { from: d, to: f }
|
|
2369
2376
|
};
|
|
2370
2377
|
}, Es = async (t, r) => {
|
|
2371
2378
|
const e = t.details, n = He(e.src), s = fetch(e.src), [a, u] = await Promise.all([
|
|
2372
2379
|
n,
|
|
2373
2380
|
s
|
|
2374
|
-
]), c = await u.text(), d = pt(r, a), { serializer:
|
|
2381
|
+
]), c = await u.text(), d = pt(r, a), { serializer: f, colors: h } = ea(
|
|
2375
2382
|
Qi(c),
|
|
2376
2383
|
t.id,
|
|
2377
2384
|
Number(e.width || a.width),
|
|
@@ -2410,8 +2417,8 @@ const ws = async (t, r) => {
|
|
|
2410
2417
|
flipY: e.flipY || !1,
|
|
2411
2418
|
rotate: e.rotate || "0deg",
|
|
2412
2419
|
visibility: e.visibility || "visible",
|
|
2413
|
-
svgString:
|
|
2414
|
-
initialSvgString: C(
|
|
2420
|
+
svgString: f,
|
|
2421
|
+
initialSvgString: C(f),
|
|
2415
2422
|
colorMap: y
|
|
2416
2423
|
},
|
|
2417
2424
|
metadata: t.metadata || {}
|
|
@@ -2707,8 +2714,8 @@ const Ps = (t = [], r = []) => t.length === 0 ? r.map((n) => ({
|
|
|
2707
2714
|
async function la(t, r) {
|
|
2708
2715
|
var u, c, d;
|
|
2709
2716
|
const e = r.trackItemsMap, n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map();
|
|
2710
|
-
for (const
|
|
2711
|
-
const h = e[
|
|
2717
|
+
for (const f in e) {
|
|
2718
|
+
const h = e[f];
|
|
2712
2719
|
if (h.type === "text" || h.type === "caption") {
|
|
2713
2720
|
if (h.details.fontUrl) {
|
|
2714
2721
|
const y = {
|
|
@@ -2745,15 +2752,15 @@ async function la(t, r) {
|
|
|
2745
2752
|
);
|
|
2746
2753
|
}
|
|
2747
2754
|
);
|
|
2748
|
-
} else h.type === "illustration" && s.set(
|
|
2755
|
+
} else h.type === "illustration" && s.set(f, {
|
|
2749
2756
|
trackItem: h,
|
|
2750
2757
|
details: h.details
|
|
2751
2758
|
});
|
|
2752
2759
|
}
|
|
2753
2760
|
n.size > 0 && await Le(
|
|
2754
|
-
Array.from(n).map((
|
|
2761
|
+
Array.from(n).map((f) => JSON.parse(f))
|
|
2755
2762
|
);
|
|
2756
|
-
for (const [
|
|
2763
|
+
for (const [f, h] of s) {
|
|
2757
2764
|
const y = await Es(
|
|
2758
2765
|
{ ...h.trackItem, details: h.details },
|
|
2759
2766
|
{
|
|
@@ -2763,9 +2770,9 @@ async function la(t, r) {
|
|
|
2763
2770
|
y.details.svgString,
|
|
2764
2771
|
h.details.colorMap
|
|
2765
2772
|
);
|
|
2766
|
-
y.details.svgString = m, e[
|
|
2773
|
+
y.details.svgString = m, e[f] = y;
|
|
2767
2774
|
}
|
|
2768
|
-
const a =
|
|
2775
|
+
const a = W(e);
|
|
2769
2776
|
return {
|
|
2770
2777
|
...r,
|
|
2771
2778
|
duration: a
|
|
@@ -2781,15 +2788,15 @@ function da(t) {
|
|
|
2781
2788
|
structure: []
|
|
2782
2789
|
};
|
|
2783
2790
|
e.forEach((d) => {
|
|
2784
|
-
s.trackItemsMap[d] = r.trackItemsMap[d], n.push(r.tracks.find((
|
|
2791
|
+
s.trackItemsMap[d] = r.trackItemsMap[d], n.push(r.tracks.find((f) => f.items.includes(d)));
|
|
2785
2792
|
});
|
|
2786
2793
|
const a = /* @__PURE__ */ new Set();
|
|
2787
2794
|
n.filter((d) => a.has(d.id) ? !1 : (a.add(d.id), !0)), s.tracks = Array.from(a), s.activeIds.forEach((d) => {
|
|
2788
2795
|
if (s.trackItemsMap[d].type === "composition" || s.trackItemsMap[d].type === "template") {
|
|
2789
|
-
const
|
|
2796
|
+
const f = r.structure.find(
|
|
2790
2797
|
(h) => h.id === d
|
|
2791
2798
|
);
|
|
2792
|
-
|
|
2799
|
+
f && (s.structure.push(f), f.items.forEach((h) => {
|
|
2793
2800
|
s.trackItemsMap[h] = r.trackItemsMap[h];
|
|
2794
2801
|
}));
|
|
2795
2802
|
}
|
|
@@ -2818,7 +2825,7 @@ function fa(t, r) {
|
|
|
2818
2825
|
}
|
|
2819
2826
|
}, d = Object.values(e.transitionsMap).find(
|
|
2820
2827
|
(h) => h.fromId === s.id && h.kind !== "none"
|
|
2821
|
-
),
|
|
2828
|
+
), f = Object.values(e.transitionsMap).find(
|
|
2822
2829
|
(h) => h.toId === s.id && h.kind !== "none"
|
|
2823
2830
|
);
|
|
2824
2831
|
if (s.type === "video" || s.type === "audio") {
|
|
@@ -2831,11 +2838,11 @@ function fa(t, r) {
|
|
|
2831
2838
|
to: s.trim.to
|
|
2832
2839
|
};
|
|
2833
2840
|
}
|
|
2834
|
-
if (
|
|
2841
|
+
if (f) {
|
|
2835
2842
|
const h = u.display.to - u.display.from;
|
|
2836
|
-
if (
|
|
2843
|
+
if (f.duration / 2 > h) {
|
|
2837
2844
|
e.transitionIds = e.transitionIds.filter(
|
|
2838
|
-
(m) => m !==
|
|
2845
|
+
(m) => m !== f.id
|
|
2839
2846
|
);
|
|
2840
2847
|
const y = {};
|
|
2841
2848
|
e.transitionIds.forEach(
|
|
@@ -2880,8 +2887,8 @@ async function pa(t, r) {
|
|
|
2880
2887
|
...n[c].details,
|
|
2881
2888
|
...d.details
|
|
2882
2889
|
}, d.details.colorMap)) {
|
|
2883
|
-
const
|
|
2884
|
-
|
|
2890
|
+
const f = n[c].details.initialSvgString, h = ks(
|
|
2891
|
+
f,
|
|
2885
2892
|
d.details.colorMap
|
|
2886
2893
|
);
|
|
2887
2894
|
n[c].details.svgString = h;
|
|
@@ -2890,11 +2897,11 @@ async function pa(t, r) {
|
|
|
2890
2897
|
...n[c].metadata,
|
|
2891
2898
|
...d.metadata
|
|
2892
2899
|
} : n[c].metadata = d.metadata), d.display || d.playbackRate) {
|
|
2893
|
-
const
|
|
2900
|
+
const f = d.playbackRate, h = n[c].playbackRate || 1, y = n[c].display, b = (y.to - y.from) * h / f, v = {
|
|
2894
2901
|
from: y.from,
|
|
2895
2902
|
to: y.from + b
|
|
2896
2903
|
};
|
|
2897
|
-
n[c].display = v, n[c].playbackRate =
|
|
2904
|
+
n[c].display = v, n[c].playbackRate = f;
|
|
2898
2905
|
}
|
|
2899
2906
|
d.trim && (n[c].trim = d.trim), d.animations && (n[c].animations = {
|
|
2900
2907
|
...n[c].animations,
|
|
@@ -2904,8 +2911,8 @@ async function pa(t, r) {
|
|
|
2904
2911
|
for (const c of s) {
|
|
2905
2912
|
const d = r[c];
|
|
2906
2913
|
if (n[c].type === "shape" && d.details.src) {
|
|
2907
|
-
const
|
|
2908
|
-
n[c].details.width =
|
|
2914
|
+
const f = await He(d.details.src);
|
|
2915
|
+
n[c].details.width = f.width, n[c].details.height = f.height;
|
|
2909
2916
|
}
|
|
2910
2917
|
}
|
|
2911
2918
|
if (s.some((c) => {
|
|
@@ -2914,7 +2921,7 @@ async function pa(t, r) {
|
|
|
2914
2921
|
})) {
|
|
2915
2922
|
const c = e.tracks.filter((h) => h.magnetic);
|
|
2916
2923
|
s.filter((h) => c.some((y) => y.items.includes(h))).length > 0 && q(c, n, []);
|
|
2917
|
-
const
|
|
2924
|
+
const f = [];
|
|
2918
2925
|
for (const h of s) {
|
|
2919
2926
|
const y = r[h];
|
|
2920
2927
|
if (y.playbackRate === void 0 && y.display === void 0)
|
|
@@ -2933,11 +2940,11 @@ async function pa(t, r) {
|
|
|
2933
2940
|
).forEach((k) => {
|
|
2934
2941
|
const T = n[k.fromId], w = n[k.toId];
|
|
2935
2942
|
if (!T || !w) {
|
|
2936
|
-
|
|
2943
|
+
f.push(k.id);
|
|
2937
2944
|
return;
|
|
2938
2945
|
}
|
|
2939
2946
|
const E = T.display, _ = w.display, M = E.to, L = _.from;
|
|
2940
|
-
Math.abs(M - L) <= 1 ||
|
|
2947
|
+
Math.abs(M - L) <= 1 || f.push(k.id);
|
|
2941
2948
|
}), I.items.map((k) => n[k]).filter((k) => k && k.id !== h).some((k) => {
|
|
2942
2949
|
const T = k.display.from, w = k.display.to, E = b.from;
|
|
2943
2950
|
return !(b.to <= T || E >= w);
|
|
@@ -2960,13 +2967,13 @@ async function pa(t, r) {
|
|
|
2960
2967
|
e.tracks.splice(w, 0, T);
|
|
2961
2968
|
}
|
|
2962
2969
|
}
|
|
2963
|
-
|
|
2964
|
-
(h) => !
|
|
2965
|
-
),
|
|
2970
|
+
f.length > 0 && (e.transitionIds = e.transitionIds.filter(
|
|
2971
|
+
(h) => !f.includes(h)
|
|
2972
|
+
), f.forEach((h) => {
|
|
2966
2973
|
delete e.transitionsMap[h];
|
|
2967
2974
|
}));
|
|
2968
2975
|
}
|
|
2969
|
-
const u =
|
|
2976
|
+
const u = W(n);
|
|
2970
2977
|
return {
|
|
2971
2978
|
trackItemsMap: { ...n },
|
|
2972
2979
|
tracks: e.tracks,
|
|
@@ -2979,9 +2986,9 @@ async function ha(t, r) {
|
|
|
2979
2986
|
const e = C(t), n = Object.keys(r)[0], s = Object.values(r)[0], a = e.trackItemsMap[n], u = a.details;
|
|
2980
2987
|
if (!s.details.src) return {};
|
|
2981
2988
|
if (a.type === "image") {
|
|
2982
|
-
const
|
|
2983
|
-
let m =
|
|
2984
|
-
const b =
|
|
2989
|
+
const f = await He(s.details.src), h = a.details.width || 0, y = a.details.height || 0;
|
|
2990
|
+
let m = f.width, I = f.height;
|
|
2991
|
+
const b = f.width / f.height;
|
|
2985
2992
|
h / y > b ? (m = h, I = h / b) : (I = y, m = y * b), u.crop = {
|
|
2986
2993
|
x: 0,
|
|
2987
2994
|
y: 0,
|
|
@@ -2989,22 +2996,22 @@ async function ha(t, r) {
|
|
|
2989
2996
|
width: u.width
|
|
2990
2997
|
}, s.details.width = m, s.details.height = I;
|
|
2991
2998
|
} else if (a.type === "video") {
|
|
2992
|
-
const
|
|
2993
|
-
let m =
|
|
2994
|
-
const b =
|
|
2999
|
+
const f = await $n(s.details.src), h = a.details.width || 0, y = a.details.height || 0;
|
|
3000
|
+
let m = f.width, I = f.height;
|
|
3001
|
+
const b = f.width / f.height;
|
|
2995
3002
|
h / y > b ? (m = h, I = h / b) : (I = y, m = y * b), u.crop = {
|
|
2996
3003
|
x: 0,
|
|
2997
3004
|
y: 0,
|
|
2998
3005
|
height: u.height,
|
|
2999
3006
|
width: u.width
|
|
3000
|
-
}, s.details.width = m, s.details.height = I, a.duration =
|
|
3007
|
+
}, s.details.width = m, s.details.height = I, a.duration = f.duration, a.trim = {
|
|
3001
3008
|
from: 0,
|
|
3002
|
-
to:
|
|
3009
|
+
to: f.duration
|
|
3003
3010
|
};
|
|
3004
|
-
const v = a.playbackRate || 1, S =
|
|
3011
|
+
const v = a.playbackRate || 1, S = f.duration / v, p = a.display.from + S;
|
|
3005
3012
|
a.display = {
|
|
3006
3013
|
from: a.display.from,
|
|
3007
|
-
to: (a.duration || 0) >=
|
|
3014
|
+
to: (a.duration || 0) >= f.duration ? a.display.to : p
|
|
3008
3015
|
};
|
|
3009
3016
|
}
|
|
3010
3017
|
s.details && (a.details = { ...u, ...s.details }, s.details = a.details), e.trackItemsMap[n] = {
|
|
@@ -3012,13 +3019,13 @@ async function ha(t, r) {
|
|
|
3012
3019
|
type: s.type
|
|
3013
3020
|
}, a.type === "video" && (e.trackItemsMap[n].display = a.display, e.trackItemsMap[n].duration = a.duration, e.trackItemsMap[n].trim = a.trim);
|
|
3014
3021
|
const c = e.tracks.find(
|
|
3015
|
-
(
|
|
3022
|
+
(f) => f.items.includes(n)
|
|
3016
3023
|
);
|
|
3017
3024
|
if (c && c.magnetic && a.type === "video") {
|
|
3018
|
-
const
|
|
3019
|
-
q(
|
|
3025
|
+
const f = e.tracks.filter((h) => h.magnetic);
|
|
3026
|
+
q(f, e.trackItemsMap, []);
|
|
3020
3027
|
}
|
|
3021
|
-
const d =
|
|
3028
|
+
const d = W(e.trackItemsMap);
|
|
3022
3029
|
return {
|
|
3023
3030
|
trackItemsMap: {
|
|
3024
3031
|
...e.trackItemsMap
|
|
@@ -3038,17 +3045,17 @@ function ya(t, { idTrack: r, idItems: e }, n) {
|
|
|
3038
3045
|
if (!s || !s.magnetic) return;
|
|
3039
3046
|
let u = s.items.reduce(
|
|
3040
3047
|
(c, d) => {
|
|
3041
|
-
const
|
|
3042
|
-
return
|
|
3048
|
+
const f = n.trackItemsMap[d];
|
|
3049
|
+
return f.display.to > c.display.to ? f : c;
|
|
3043
3050
|
},
|
|
3044
3051
|
{ display: { to: 0 } }
|
|
3045
3052
|
).display.to;
|
|
3046
3053
|
e.forEach((c) => {
|
|
3047
3054
|
const d = t.find((y) => String(y.id) === String(c));
|
|
3048
3055
|
if (!d) return;
|
|
3049
|
-
const
|
|
3056
|
+
const f = d.playbackRate || 1;
|
|
3050
3057
|
let h;
|
|
3051
|
-
(d.type === "video" || d.type === "audio") && d.trim ? h = (d.trim.to - d.trim.from) /
|
|
3058
|
+
(d.type === "video" || d.type === "audio") && d.trim ? h = (d.trim.to - d.trim.from) / f : h = d.display.to - d.display.from, d.display.from = u, d.display.to = u + h, u = u + h;
|
|
3052
3059
|
});
|
|
3053
3060
|
}
|
|
3054
3061
|
async function ga(t, r, e = {}) {
|
|
@@ -3083,9 +3090,9 @@ async function ga(t, r, e = {}) {
|
|
|
3083
3090
|
};
|
|
3084
3091
|
c.push(b);
|
|
3085
3092
|
});
|
|
3086
|
-
const
|
|
3093
|
+
const f = [], h = {};
|
|
3087
3094
|
return a.forEach((I) => {
|
|
3088
|
-
|
|
3095
|
+
f.push(I.id), h[I.id] = I;
|
|
3089
3096
|
}), u.map((I) => Rs(n.tracks, [I]) ? I : null).forEach((I, b) => {
|
|
3090
3097
|
if (I)
|
|
3091
3098
|
n.tracks.forEach((v) => {
|
|
@@ -3096,19 +3103,19 @@ async function ga(t, r, e = {}) {
|
|
|
3096
3103
|
));
|
|
3097
3104
|
});
|
|
3098
3105
|
else {
|
|
3099
|
-
const v = e.trackIndex || 0, S = u[b],
|
|
3106
|
+
const v = e.trackIndex || 0, S = u[b], p = Math.min(
|
|
3100
3107
|
Math.max(v, 0),
|
|
3101
3108
|
n.tracks.length
|
|
3102
3109
|
);
|
|
3103
|
-
n.tracks.splice(
|
|
3110
|
+
n.tracks.splice(p, 0, S);
|
|
3104
3111
|
}
|
|
3105
3112
|
}), n.trackItemsMap = {
|
|
3106
3113
|
...n.trackItemsMap,
|
|
3107
3114
|
...h
|
|
3108
3115
|
}, n.trackItemIds = [
|
|
3109
3116
|
...n.trackItemIds,
|
|
3110
|
-
...
|
|
3111
|
-
], n.structure = [...n.structure, ...c], n.duration =
|
|
3117
|
+
...f
|
|
3118
|
+
], n.structure = [...n.structure, ...c], n.duration = W(n.trackItemsMap), {
|
|
3112
3119
|
trackItemIds: n.trackItemIds,
|
|
3113
3120
|
trackItemsMap: n.trackItemsMap,
|
|
3114
3121
|
tracks: n.tracks,
|
|
@@ -3127,7 +3134,7 @@ function _t(t, r, e = {
|
|
|
3127
3134
|
}), (e.targetTrackIndex !== void 0 || e.targetTrackId) && !e.isNewTrack) {
|
|
3128
3135
|
const u = e.targetTrackIndex || 0, c = e.targetTrackId;
|
|
3129
3136
|
let d = t.tracks[u];
|
|
3130
|
-
if (c && (d = t.tracks.find((
|
|
3137
|
+
if (c && (d = t.tracks.find((f) => f.id === c)), !d)
|
|
3131
3138
|
throw new Error("Target track not found");
|
|
3132
3139
|
d.items.push(...s);
|
|
3133
3140
|
} else {
|
|
@@ -3157,8 +3164,8 @@ async function Ia(t, r, e = {}) {
|
|
|
3157
3164
|
scaleMode: e.scaleMode,
|
|
3158
3165
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3159
3166
|
})
|
|
3160
|
-
], a = await Promise.all(s), u = a.map((
|
|
3161
|
-
return q(d, c.trackItemsMap, u), c.duration =
|
|
3167
|
+
], a = await Promise.all(s), u = a.map((f) => f.id), c = _t(n, a, e), d = c.tracks.filter((f) => f.magnetic);
|
|
3168
|
+
return q(d, c.trackItemsMap, u), c.duration = W(c.trackItemsMap), {
|
|
3162
3169
|
trackItemIds: c.trackItemIds,
|
|
3163
3170
|
trackItemsMap: c.trackItemsMap,
|
|
3164
3171
|
tracks: c.tracks,
|
|
@@ -3166,9 +3173,9 @@ async function Ia(t, r, e = {}) {
|
|
|
3166
3173
|
};
|
|
3167
3174
|
}
|
|
3168
3175
|
async function ba(t, r, e = {}) {
|
|
3169
|
-
const n = C(t), s = [Ts(r)], a = await Promise.all(s), u = a.map((
|
|
3170
|
-
c.duration =
|
|
3171
|
-
const d = c.tracks.filter((
|
|
3176
|
+
const n = C(t), s = [Ts(r)], a = await Promise.all(s), u = a.map((f) => f.id), c = _t(n, a, e);
|
|
3177
|
+
c.duration = W(c.trackItemsMap);
|
|
3178
|
+
const d = c.tracks.filter((f) => f.magnetic);
|
|
3172
3179
|
return q(d, c.trackItemsMap, u), {
|
|
3173
3180
|
trackItemIds: c.trackItemIds,
|
|
3174
3181
|
trackItemsMap: c.trackItemsMap,
|
|
@@ -3183,9 +3190,9 @@ async function ka(t, r, e = {}) {
|
|
|
3183
3190
|
scaleMode: e.scaleMode,
|
|
3184
3191
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3185
3192
|
})
|
|
3186
|
-
], a = await Promise.all(s), u = a.map((
|
|
3187
|
-
c.duration =
|
|
3188
|
-
const d = c.tracks.filter((
|
|
3193
|
+
], a = await Promise.all(s), u = a.map((f) => f.id), c = _t(n, a, e);
|
|
3194
|
+
c.duration = W(c.trackItemsMap);
|
|
3195
|
+
const d = c.tracks.filter((f) => f.magnetic);
|
|
3189
3196
|
return q(d, c.trackItemsMap, u), {
|
|
3190
3197
|
trackItemIds: c.trackItemIds,
|
|
3191
3198
|
trackItemsMap: c.trackItemsMap,
|
|
@@ -3198,9 +3205,9 @@ async function va(t, r, e = {}) {
|
|
|
3198
3205
|
Os(r, {
|
|
3199
3206
|
size: e.size
|
|
3200
3207
|
})
|
|
3201
|
-
], a = await Promise.all(s), u = a.map((
|
|
3202
|
-
c.duration =
|
|
3203
|
-
const d = c.tracks.filter((
|
|
3208
|
+
], a = await Promise.all(s), u = a.map((f) => f.id), c = _t(n, a, e);
|
|
3209
|
+
c.duration = W(c.trackItemsMap);
|
|
3210
|
+
const d = c.tracks.filter((f) => f.magnetic);
|
|
3204
3211
|
return q(d, c.trackItemsMap, u), {
|
|
3205
3212
|
trackItemIds: c.trackItemIds,
|
|
3206
3213
|
trackItemsMap: c.trackItemsMap,
|
|
@@ -3215,9 +3222,9 @@ async function _a(t, r, e = {}) {
|
|
|
3215
3222
|
scaleMode: e.scaleMode,
|
|
3216
3223
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3217
3224
|
})
|
|
3218
|
-
], a = await Promise.all(s), u = a.map((
|
|
3219
|
-
c.duration =
|
|
3220
|
-
const d = c.tracks.filter((
|
|
3225
|
+
], a = await Promise.all(s), u = a.map((f) => f.id), c = _t(n, a, e);
|
|
3226
|
+
c.duration = W(c.trackItemsMap);
|
|
3227
|
+
const d = c.tracks.filter((f) => f.magnetic);
|
|
3221
3228
|
return q(d, c.trackItemsMap, u), {
|
|
3222
3229
|
trackItemIds: c.trackItemIds,
|
|
3223
3230
|
trackItemsMap: c.trackItemsMap,
|
|
@@ -3232,9 +3239,9 @@ async function Sa(t, r, e = {}) {
|
|
|
3232
3239
|
scaleMode: e.scaleMode,
|
|
3233
3240
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3234
3241
|
})
|
|
3235
|
-
], a = await Promise.all(s), u = a.map((
|
|
3236
|
-
c.duration =
|
|
3237
|
-
const d = c.tracks.filter((
|
|
3242
|
+
], a = await Promise.all(s), u = a.map((f) => f.id), c = _t(n, a, e);
|
|
3243
|
+
c.duration = W(c.trackItemsMap);
|
|
3244
|
+
const d = c.tracks.filter((f) => f.magnetic);
|
|
3238
3245
|
return q(d, c.trackItemsMap, u), {
|
|
3239
3246
|
trackItemIds: c.trackItemIds,
|
|
3240
3247
|
trackItemsMap: c.trackItemsMap,
|
|
@@ -3243,7 +3250,7 @@ async function Sa(t, r, e = {}) {
|
|
|
3243
3250
|
};
|
|
3244
3251
|
}
|
|
3245
3252
|
async function wa(t, r, e = {}) {
|
|
3246
|
-
const n = C(t), s = "composition", a = r.trackItemsMap, u = r.trackItemIds, c = r.tracks || [], d = r.trackItemDetailsMap, { details:
|
|
3253
|
+
const n = C(t), s = "composition", a = r.trackItemsMap, u = r.trackItemIds, c = r.tracks || [], d = r.trackItemDetailsMap, { details: f, ...h } = await aa(r, {
|
|
3247
3254
|
size: n.size,
|
|
3248
3255
|
scaleMode: e.scaleMode,
|
|
3249
3256
|
scaleAspectRatio: e.scaleAspectRatio
|
|
@@ -3255,7 +3262,7 @@ async function wa(t, r, e = {}) {
|
|
|
3255
3262
|
}, I = [{
|
|
3256
3263
|
...h,
|
|
3257
3264
|
type: s,
|
|
3258
|
-
details:
|
|
3265
|
+
details: f
|
|
3259
3266
|
}], b = _t(n, I, e);
|
|
3260
3267
|
b.trackItemsMap = {
|
|
3261
3268
|
...b.trackItemsMap,
|
|
@@ -3263,9 +3270,9 @@ async function wa(t, r, e = {}) {
|
|
|
3263
3270
|
[h.id]: {
|
|
3264
3271
|
...h,
|
|
3265
3272
|
type: s,
|
|
3266
|
-
details:
|
|
3273
|
+
details: f
|
|
3267
3274
|
}
|
|
3268
|
-
}, b.structure = [...b.structure, y], b.duration =
|
|
3275
|
+
}, b.structure = [...b.structure, y], b.duration = W(b.trackItemsMap);
|
|
3269
3276
|
const v = b.tracks.filter((S) => S.magnetic);
|
|
3270
3277
|
return q(v, b.trackItemsMap, [h.id]), d && Object.keys(d).forEach((S) => {
|
|
3271
3278
|
b.trackItemsMap[S] = {
|
|
@@ -3330,18 +3337,18 @@ async function me(t, r, e = {}, n) {
|
|
|
3330
3337
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3331
3338
|
})
|
|
3332
3339
|
);
|
|
3333
|
-
const c = await Promise.all(u), d = c.map((y) => y.id),
|
|
3334
|
-
|
|
3335
|
-
const h =
|
|
3336
|
-
return q(h,
|
|
3337
|
-
trackItemIds:
|
|
3338
|
-
trackItemsMap:
|
|
3339
|
-
tracks:
|
|
3340
|
-
duration:
|
|
3340
|
+
const c = await Promise.all(u), d = c.map((y) => y.id), f = _t(s, c, e);
|
|
3341
|
+
f.duration = W(f.trackItemsMap);
|
|
3342
|
+
const h = f.tracks.filter((y) => y.magnetic);
|
|
3343
|
+
return q(h, f.trackItemsMap, d), {
|
|
3344
|
+
trackItemIds: f.trackItemIds,
|
|
3345
|
+
trackItemsMap: f.trackItemsMap,
|
|
3346
|
+
tracks: f.tracks,
|
|
3347
|
+
duration: f.duration
|
|
3341
3348
|
};
|
|
3342
3349
|
}
|
|
3343
3350
|
async function Ta(t, r, e = {}) {
|
|
3344
|
-
const n = C(t), s = "template", a = r.trackItemsMap, u = r.trackItemIds, c = r.transitionsMap, d = r.transitionIds || [],
|
|
3351
|
+
const n = C(t), s = "template", a = r.trackItemsMap, u = r.trackItemIds, c = r.transitionsMap, d = r.transitionIds || [], f = r.tracks || [], h = r.structure || [], { details: y, ...m } = await Ms(r, {
|
|
3345
3352
|
size: n.size,
|
|
3346
3353
|
scaleMode: e.scaleMode,
|
|
3347
3354
|
scaleAspectRatio: e.scaleAspectRatio
|
|
@@ -3349,7 +3356,7 @@ async function Ta(t, r, e = {}) {
|
|
|
3349
3356
|
id: m.id,
|
|
3350
3357
|
items: u,
|
|
3351
3358
|
transitions: d,
|
|
3352
|
-
tracks:
|
|
3359
|
+
tracks: f
|
|
3353
3360
|
}, v = [{
|
|
3354
3361
|
...m,
|
|
3355
3362
|
type: s,
|
|
@@ -3373,9 +3380,9 @@ async function Ta(t, r, e = {}) {
|
|
|
3373
3380
|
...S.structure,
|
|
3374
3381
|
I,
|
|
3375
3382
|
...h
|
|
3376
|
-
], S.duration =
|
|
3377
|
-
const
|
|
3378
|
-
return q(
|
|
3383
|
+
], S.duration = W(S.trackItemsMap);
|
|
3384
|
+
const p = S.tracks.filter((k) => k.magnetic);
|
|
3385
|
+
return q(p, S.trackItemsMap, [m.id]), {
|
|
3379
3386
|
trackItemIds: S.trackItemIds,
|
|
3380
3387
|
trackItemsMap: S.trackItemsMap,
|
|
3381
3388
|
tracks: S.tracks,
|
|
@@ -3432,7 +3439,7 @@ async function Ma(t, r, e = {}) {
|
|
|
3432
3439
|
}, n.trackItemIds = [
|
|
3433
3440
|
...n.trackItemIds,
|
|
3434
3441
|
...c
|
|
3435
|
-
], n.duration =
|
|
3442
|
+
], n.duration = W(n.trackItemsMap);
|
|
3436
3443
|
const h = n.tracks.filter((y) => y.magnetic);
|
|
3437
3444
|
return q(
|
|
3438
3445
|
h,
|
|
@@ -3480,9 +3487,9 @@ async function Aa(t, r, e = {}) {
|
|
|
3480
3487
|
scaleMode: e.scaleMode,
|
|
3481
3488
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3482
3489
|
})
|
|
3483
|
-
], a = await Promise.all(s), u = a.map((
|
|
3484
|
-
c.duration =
|
|
3485
|
-
const d = c.tracks.filter((
|
|
3490
|
+
], a = await Promise.all(s), u = a.map((f) => f.id), c = _t(n, a, e);
|
|
3491
|
+
c.duration = W(c.trackItemsMap);
|
|
3492
|
+
const d = c.tracks.filter((f) => f.magnetic);
|
|
3486
3493
|
return q(d, c.trackItemsMap, u), {
|
|
3487
3494
|
trackItemIds: c.trackItemIds,
|
|
3488
3495
|
trackItemsMap: c.trackItemsMap,
|
|
@@ -3509,7 +3516,7 @@ async function xa(t, r) {
|
|
|
3509
3516
|
const u = e.tracks.filter((c) => c.magnetic);
|
|
3510
3517
|
q(u, e.trackItemsMap, []);
|
|
3511
3518
|
}
|
|
3512
|
-
const a =
|
|
3519
|
+
const a = W(e.trackItemsMap);
|
|
3513
3520
|
return {
|
|
3514
3521
|
...e,
|
|
3515
3522
|
duration: a
|
|
@@ -3517,40 +3524,40 @@ async function xa(t, r) {
|
|
|
3517
3524
|
}
|
|
3518
3525
|
function Oa(t) {
|
|
3519
3526
|
const r = Vt.pipe(
|
|
3520
|
-
qt(({ key:
|
|
3527
|
+
qt(({ key: p }) => p.startsWith(Vn))
|
|
3521
3528
|
), e = Vt.pipe(
|
|
3522
|
-
qt(({ key:
|
|
3529
|
+
qt(({ key: p }) => p.startsWith(Pn))
|
|
3523
3530
|
), n = Vt.pipe(
|
|
3524
|
-
qt(({ key:
|
|
3531
|
+
qt(({ key: p }) => p.startsWith(H))
|
|
3525
3532
|
), s = Vt.pipe(
|
|
3526
|
-
qt(({ key:
|
|
3533
|
+
qt(({ key: p }) => p.startsWith(tt))
|
|
3527
3534
|
), a = Vt.pipe(
|
|
3528
|
-
qt(({ key:
|
|
3535
|
+
qt(({ key: p }) => p.startsWith(Er))
|
|
3529
3536
|
), u = Vt.pipe(
|
|
3530
|
-
qt(({ key:
|
|
3537
|
+
qt(({ key: p }) => p.startsWith(Ne))
|
|
3531
3538
|
), c = Vt.pipe(
|
|
3532
|
-
qt(({ key:
|
|
3539
|
+
qt(({ key: p }) => p.startsWith(Dt))
|
|
3533
3540
|
), d = Vt.pipe(
|
|
3534
|
-
qt(({ key:
|
|
3535
|
-
),
|
|
3541
|
+
qt(({ key: p }) => p.startsWith(hs))
|
|
3542
|
+
), f = r.subscribe(async (p) => {
|
|
3536
3543
|
var k;
|
|
3537
|
-
if (
|
|
3538
|
-
const { actions: T } = (k =
|
|
3544
|
+
if (p.key === Vn) {
|
|
3545
|
+
const { actions: T } = (k = p.value) == null ? void 0 : k.payload;
|
|
3539
3546
|
T.forEach((w) => {
|
|
3540
3547
|
Bs(w.type, w.payload && { payload: w.payload });
|
|
3541
3548
|
});
|
|
3542
3549
|
}
|
|
3543
|
-
}), h = e.subscribe(async (
|
|
3550
|
+
}), h = e.subscribe(async (p) => {
|
|
3544
3551
|
var k, T;
|
|
3545
|
-
if (
|
|
3546
|
-
const w = (k =
|
|
3552
|
+
if (p.key === ci) {
|
|
3553
|
+
const w = (k = p.value) == null ? void 0 : k.payload, E = await la(t.getState(), w);
|
|
3547
3554
|
t.updateState(E, {
|
|
3548
3555
|
kind: "design:load",
|
|
3549
3556
|
updateHistory: !1
|
|
3550
3557
|
});
|
|
3551
3558
|
}
|
|
3552
|
-
if (
|
|
3553
|
-
const w = (T =
|
|
3559
|
+
if (p.key === ui) {
|
|
3560
|
+
const w = (T = p.value) == null ? void 0 : T.payload;
|
|
3554
3561
|
t.updateState(
|
|
3555
3562
|
{
|
|
3556
3563
|
size: w
|
|
@@ -3561,13 +3568,13 @@ function Oa(t) {
|
|
|
3561
3568
|
}
|
|
3562
3569
|
);
|
|
3563
3570
|
}
|
|
3564
|
-
}), y = a.subscribe((
|
|
3565
|
-
if (
|
|
3566
|
-
if (
|
|
3567
|
-
}), m = d.subscribe((
|
|
3571
|
+
}), y = a.subscribe((p) => {
|
|
3572
|
+
if (p.key === Hi) return t.undo();
|
|
3573
|
+
if (p.key === Ui) return t.redo();
|
|
3574
|
+
}), m = d.subscribe((p) => {
|
|
3568
3575
|
var k;
|
|
3569
|
-
if (
|
|
3570
|
-
const T = (k =
|
|
3576
|
+
if (p.key === ji) {
|
|
3577
|
+
const T = (k = p.value) == null ? void 0 : k.payload.scale;
|
|
3571
3578
|
t.updateState(
|
|
3572
3579
|
{
|
|
3573
3580
|
scale: T
|
|
@@ -3578,10 +3585,10 @@ function Oa(t) {
|
|
|
3578
3585
|
}
|
|
3579
3586
|
);
|
|
3580
3587
|
}
|
|
3581
|
-
}), I = s.subscribe(async (
|
|
3588
|
+
}), I = s.subscribe(async (p) => {
|
|
3582
3589
|
var k, T, w, E;
|
|
3583
|
-
if (
|
|
3584
|
-
const _ = ((k =
|
|
3590
|
+
if (p.key === zi) {
|
|
3591
|
+
const _ = ((k = p.value) == null ? void 0 : k.payload.trackItemIds) || [];
|
|
3585
3592
|
t.updateState(
|
|
3586
3593
|
{ activeIds: _ },
|
|
3587
3594
|
{
|
|
@@ -3590,191 +3597,191 @@ function Oa(t) {
|
|
|
3590
3597
|
}
|
|
3591
3598
|
);
|
|
3592
3599
|
}
|
|
3593
|
-
if (
|
|
3594
|
-
const _ = (T =
|
|
3600
|
+
if (p.key === $i && da(t.getState()), p.key === Ni) {
|
|
3601
|
+
const _ = (T = p.value) == null ? void 0 : T.payload.trackItemIds, M = Yi(t.getState(), _);
|
|
3595
3602
|
t.updateState(M, { updateHistory: !0, kind: "remove" });
|
|
3596
3603
|
}
|
|
3597
|
-
if (
|
|
3604
|
+
if (p.key === Fi) {
|
|
3598
3605
|
const _ = Zi(
|
|
3599
3606
|
t.getState(),
|
|
3600
|
-
(w =
|
|
3607
|
+
(w = p.value) == null ? void 0 : w.payload.trackItemIds
|
|
3601
3608
|
);
|
|
3602
3609
|
t.updateState(_, {
|
|
3603
3610
|
updateHistory: !0,
|
|
3604
3611
|
kind: "update"
|
|
3605
3612
|
});
|
|
3606
3613
|
}
|
|
3607
|
-
if (
|
|
3608
|
-
const _ = (E =
|
|
3614
|
+
if (p.key === Li) {
|
|
3615
|
+
const _ = (E = p.value) == null ? void 0 : E.payload, M = await Ji(t.getState(), _);
|
|
3609
3616
|
t.updateState(M, {
|
|
3610
3617
|
updateHistory: !0,
|
|
3611
3618
|
kind: "update:details"
|
|
3612
3619
|
});
|
|
3613
3620
|
}
|
|
3614
|
-
}), b = n.subscribe(async (
|
|
3615
|
-
var L, R, G, x, F, et, Zt, Qt, ve, _e, Se, we, z, Te, Me, st, te, $, ee, Ee, it, re, ne, zt, $t, se, Ft, ie, Nt, ae, Ae, xe, St, Lt, oe, ce, ut, wt, Oe, mt, Tt, Ht, rt, ue, le, Ce, Ut, Mt, de, Et, yt, at, At,
|
|
3616
|
-
const k = C(t.getState()), T = ((R = (L =
|
|
3621
|
+
}), b = n.subscribe(async (p) => {
|
|
3622
|
+
var L, R, G, x, F, et, Zt, Qt, ve, _e, Se, we, z, Te, Me, st, te, $, ee, Ee, it, re, ne, zt, $t, se, Ft, ie, Nt, ae, Ae, xe, St, Lt, oe, ce, ut, wt, Oe, mt, Tt, Ht, rt, ue, le, Ce, Ut, Mt, de, Et, yt, at, At, jt, gt, Wt, It, Bt, Yt;
|
|
3623
|
+
const k = C(t.getState()), T = ((R = (L = p.value) == null ? void 0 : L.options) == null ? void 0 : R.isSelected) || !1, w = (x = (G = p.value) == null ? void 0 : G.options) == null ? void 0 : x.scaleMode, E = (et = (F = p.value) == null ? void 0 : F.options) == null ? void 0 : et.scaleAspectRatio, _ = (Qt = (Zt = p.value) == null ? void 0 : Zt.options) == null ? void 0 : Qt.trackIndex;
|
|
3617
3624
|
let M = {};
|
|
3618
|
-
|
|
3625
|
+
p.key === yi ? M = await Ea(k, (ve = p.value) == null ? void 0 : ve.payload) : p.key === bi ? M = await ga(k, (_e = p.value) == null ? void 0 : _e.payload, {
|
|
3619
3626
|
trackIndex: _
|
|
3620
|
-
}) :
|
|
3627
|
+
}) : p.key === gi ? M = await Ma(k, (Se = p.value) == null ? void 0 : Se.payload, {
|
|
3621
3628
|
size: k.size
|
|
3622
|
-
}) :
|
|
3629
|
+
}) : p.key === li ? M = await va(k, (we = p.value) == null ? void 0 : we.payload, {
|
|
3623
3630
|
targetTrackIndex: _,
|
|
3624
|
-
targetTrackId: (z =
|
|
3631
|
+
targetTrackId: (z = p.value) == null ? void 0 : z.options.targetTrackId,
|
|
3625
3632
|
size: k.size,
|
|
3626
|
-
isNewTrack: (Me = (Te =
|
|
3627
|
-
}) :
|
|
3633
|
+
isNewTrack: (Me = (Te = p.value) == null ? void 0 : Te.options) == null ? void 0 : Me.isNewTrack
|
|
3634
|
+
}) : p.key === Ii ? M = await Ta(k, (st = p.value) == null ? void 0 : st.payload, {
|
|
3628
3635
|
scaleMode: w,
|
|
3629
3636
|
scaleAspectRatio: E,
|
|
3630
3637
|
targetTrackIndex: _,
|
|
3631
|
-
targetTrackId: ($ = (te =
|
|
3632
|
-
}) :
|
|
3638
|
+
targetTrackId: ($ = (te = p.value) == null ? void 0 : te.options) == null ? void 0 : $.targetTrackId
|
|
3639
|
+
}) : p.key === hi ? M = await Sa(k, (ee = p.value) == null ? void 0 : ee.payload, {
|
|
3633
3640
|
scaleMode: w,
|
|
3634
3641
|
scaleAspectRatio: E,
|
|
3635
3642
|
targetTrackIndex: _,
|
|
3636
|
-
targetTrackId: (Ee =
|
|
3637
|
-
}) :
|
|
3643
|
+
targetTrackId: (Ee = p.value) == null ? void 0 : Ee.options.targetTrackId
|
|
3644
|
+
}) : p.key === mi ? M = await _a(k, (it = p.value) == null ? void 0 : it.payload, {
|
|
3638
3645
|
scaleMode: w,
|
|
3639
3646
|
scaleAspectRatio: E,
|
|
3640
3647
|
targetTrackIndex: _,
|
|
3641
|
-
targetTrackId: (re =
|
|
3642
|
-
}) :
|
|
3648
|
+
targetTrackId: (re = p.value) == null ? void 0 : re.options.targetTrackId
|
|
3649
|
+
}) : p.key === Ai ? M = await Aa(k, (ne = p.value) == null ? void 0 : ne.payload, {
|
|
3643
3650
|
scaleMode: w,
|
|
3644
3651
|
scaleAspectRatio: E,
|
|
3645
3652
|
targetTrackIndex: _,
|
|
3646
|
-
targetTrackId: (zt =
|
|
3647
|
-
}) :
|
|
3653
|
+
targetTrackId: (zt = p.value) == null ? void 0 : zt.options.targetTrackId
|
|
3654
|
+
}) : p.key === pi ? M = await Ia(k, ($t = p.value) == null ? void 0 : $t.payload, {
|
|
3648
3655
|
scaleMode: w,
|
|
3649
3656
|
scaleAspectRatio: E,
|
|
3650
3657
|
targetTrackIndex: _,
|
|
3651
|
-
targetTrackId: (se =
|
|
3652
|
-
isNewTrack: (ie = (Ft =
|
|
3653
|
-
}) :
|
|
3658
|
+
targetTrackId: (se = p.value) == null ? void 0 : se.options.targetTrackId,
|
|
3659
|
+
isNewTrack: (ie = (Ft = p.value) == null ? void 0 : Ft.options) == null ? void 0 : ie.isNewTrack
|
|
3660
|
+
}) : p.key === fi ? M = await ba(k, (Nt = p.value) == null ? void 0 : Nt.payload, {
|
|
3654
3661
|
targetTrackIndex: _,
|
|
3655
|
-
targetTrackId: (ae =
|
|
3656
|
-
isNewTrack: (xe = (Ae =
|
|
3657
|
-
}) :
|
|
3662
|
+
targetTrackId: (ae = p.value) == null ? void 0 : ae.options.targetTrackId,
|
|
3663
|
+
isNewTrack: (xe = (Ae = p.value) == null ? void 0 : Ae.options) == null ? void 0 : xe.isNewTrack
|
|
3664
|
+
}) : p.key === di ? M = await ka(k, (St = p.value) == null ? void 0 : St.payload, {
|
|
3658
3665
|
scaleMode: w,
|
|
3659
3666
|
scaleAspectRatio: E,
|
|
3660
3667
|
targetTrackIndex: _,
|
|
3661
|
-
targetTrackId: (Lt =
|
|
3662
|
-
isNewTrack: (ce = (oe =
|
|
3663
|
-
}) :
|
|
3668
|
+
targetTrackId: (Lt = p.value) == null ? void 0 : Lt.options.targetTrackId,
|
|
3669
|
+
isNewTrack: (ce = (oe = p.value) == null ? void 0 : oe.options) == null ? void 0 : ce.isNewTrack
|
|
3670
|
+
}) : p.key === ki ? M = await wa(k, (ut = p.value) == null ? void 0 : ut.payload, {
|
|
3664
3671
|
scaleMode: w,
|
|
3665
3672
|
scaleAspectRatio: E,
|
|
3666
3673
|
targetTrackIndex: _,
|
|
3667
|
-
targetTrackId: (wt =
|
|
3668
|
-
}) :
|
|
3674
|
+
targetTrackId: (wt = p.value) == null ? void 0 : wt.options.targetTrackId
|
|
3675
|
+
}) : p.key === vi ? M = await me(
|
|
3669
3676
|
k,
|
|
3670
|
-
(Oe =
|
|
3677
|
+
(Oe = p.value) == null ? void 0 : Oe.payload,
|
|
3671
3678
|
{
|
|
3672
3679
|
targetTrackIndex: _,
|
|
3673
|
-
targetTrackId: (Tt = (mt =
|
|
3680
|
+
targetTrackId: (Tt = (mt = p.value) == null ? void 0 : mt.options) == null ? void 0 : Tt.targetTrackId
|
|
3674
3681
|
},
|
|
3675
3682
|
"progress-bar"
|
|
3676
|
-
) :
|
|
3683
|
+
) : p.key === Ti ? M = await me(
|
|
3677
3684
|
k,
|
|
3678
|
-
(Ht =
|
|
3685
|
+
(Ht = p.value) == null ? void 0 : Ht.payload,
|
|
3679
3686
|
{
|
|
3680
3687
|
targetTrackIndex: _,
|
|
3681
|
-
targetTrackId: (ue = (rt =
|
|
3688
|
+
targetTrackId: (ue = (rt = p.value) == null ? void 0 : rt.options) == null ? void 0 : ue.targetTrackId
|
|
3682
3689
|
},
|
|
3683
3690
|
"progress-square"
|
|
3684
|
-
) :
|
|
3691
|
+
) : p.key === _i ? M = await me(
|
|
3685
3692
|
k,
|
|
3686
|
-
(le =
|
|
3693
|
+
(le = p.value) == null ? void 0 : le.payload,
|
|
3687
3694
|
{
|
|
3688
3695
|
targetTrackIndex: _,
|
|
3689
|
-
targetTrackId: (Ut = (Ce =
|
|
3696
|
+
targetTrackId: (Ut = (Ce = p.value) == null ? void 0 : Ce.options) == null ? void 0 : Ut.targetTrackId
|
|
3690
3697
|
},
|
|
3691
3698
|
"progress-frame"
|
|
3692
|
-
) :
|
|
3699
|
+
) : p.key === Si ? M = await me(
|
|
3693
3700
|
k,
|
|
3694
|
-
(Mt =
|
|
3701
|
+
(Mt = p.value) == null ? void 0 : Mt.payload,
|
|
3695
3702
|
{
|
|
3696
3703
|
targetTrackIndex: _,
|
|
3697
|
-
targetTrackId: (Et = (de =
|
|
3704
|
+
targetTrackId: (Et = (de = p.value) == null ? void 0 : de.options) == null ? void 0 : Et.targetTrackId
|
|
3698
3705
|
},
|
|
3699
3706
|
"radial-audio-bars"
|
|
3700
|
-
) :
|
|
3707
|
+
) : p.key === wi ? M = await me(
|
|
3701
3708
|
k,
|
|
3702
|
-
(yt =
|
|
3709
|
+
(yt = p.value) == null ? void 0 : yt.payload,
|
|
3703
3710
|
{
|
|
3704
3711
|
targetTrackIndex: _,
|
|
3705
|
-
targetTrackId: (At = (at =
|
|
3712
|
+
targetTrackId: (At = (at = p.value) == null ? void 0 : at.options) == null ? void 0 : At.targetTrackId
|
|
3706
3713
|
},
|
|
3707
3714
|
"lineal-audio-bars"
|
|
3708
|
-
) :
|
|
3715
|
+
) : p.key === Mi ? M = await me(
|
|
3709
3716
|
k,
|
|
3710
|
-
(
|
|
3717
|
+
(jt = p.value) == null ? void 0 : jt.payload,
|
|
3711
3718
|
{
|
|
3712
3719
|
targetTrackIndex: _,
|
|
3713
|
-
targetTrackId: (
|
|
3720
|
+
targetTrackId: (Wt = (gt = p.value) == null ? void 0 : gt.options) == null ? void 0 : Wt.targetTrackId
|
|
3714
3721
|
},
|
|
3715
3722
|
"wave-audio-bars"
|
|
3716
|
-
) :
|
|
3723
|
+
) : p.key === Ei && (M = await me(
|
|
3717
3724
|
k,
|
|
3718
|
-
(It =
|
|
3725
|
+
(It = p.value) == null ? void 0 : It.payload,
|
|
3719
3726
|
{
|
|
3720
3727
|
targetTrackIndex: _,
|
|
3721
|
-
targetTrackId: (Yt = (Bt =
|
|
3728
|
+
targetTrackId: (Yt = (Bt = p.value) == null ? void 0 : Bt.options) == null ? void 0 : Yt.targetTrackId
|
|
3722
3729
|
},
|
|
3723
3730
|
"hill-audio-bars"
|
|
3724
3731
|
)), T && M.trackItemIds && (M.activeIds = M.trackItemIds), t.updateState(M, {
|
|
3725
3732
|
updateHistory: !0,
|
|
3726
3733
|
kind: "add"
|
|
3727
3734
|
});
|
|
3728
|
-
}), v = u.subscribe(async (
|
|
3735
|
+
}), v = u.subscribe(async (p) => {
|
|
3729
3736
|
var k;
|
|
3730
|
-
if (
|
|
3731
|
-
const T = (k =
|
|
3737
|
+
if (p.key === Di) {
|
|
3738
|
+
const T = (k = p.value) == null ? void 0 : k.options.time, w = fa(t.getState(), T);
|
|
3732
3739
|
Object.keys(w).length > 0 && t.updateState(w, {
|
|
3733
3740
|
updateHistory: !0,
|
|
3734
3741
|
kind: "update"
|
|
3735
3742
|
});
|
|
3736
3743
|
}
|
|
3737
|
-
if (
|
|
3744
|
+
if (p.key === Pi) {
|
|
3738
3745
|
const T = await Ki(t.getState());
|
|
3739
3746
|
t.updateState(T, {
|
|
3740
3747
|
updateHistory: !0,
|
|
3741
3748
|
kind: "update"
|
|
3742
3749
|
});
|
|
3743
3750
|
}
|
|
3744
|
-
}), S = c.subscribe(async (
|
|
3751
|
+
}), S = c.subscribe(async (p) => {
|
|
3745
3752
|
var k, T, w, E;
|
|
3746
|
-
if (
|
|
3753
|
+
if (p.key === xi) {
|
|
3747
3754
|
const _ = await pa(
|
|
3748
3755
|
t.getState(),
|
|
3749
|
-
(k =
|
|
3756
|
+
(k = p.value) == null ? void 0 : k.payload
|
|
3750
3757
|
);
|
|
3751
3758
|
t.updateState(_, {
|
|
3752
3759
|
updateHistory: !0,
|
|
3753
3760
|
kind: "update:details"
|
|
3754
3761
|
});
|
|
3755
3762
|
}
|
|
3756
|
-
if (
|
|
3763
|
+
if (p.key === Ri) {
|
|
3757
3764
|
const _ = await xa(
|
|
3758
3765
|
t.getState(),
|
|
3759
|
-
(T =
|
|
3766
|
+
(T = p.value) == null ? void 0 : T.payload
|
|
3760
3767
|
);
|
|
3761
3768
|
t.updateState(_, {
|
|
3762
3769
|
updateHistory: !0,
|
|
3763
3770
|
kind: "edit:track"
|
|
3764
3771
|
});
|
|
3765
3772
|
}
|
|
3766
|
-
if (
|
|
3773
|
+
if (p.key === Oi) {
|
|
3767
3774
|
const _ = await ha(
|
|
3768
3775
|
t.getState(),
|
|
3769
|
-
(w =
|
|
3776
|
+
(w = p.value) == null ? void 0 : w.payload
|
|
3770
3777
|
);
|
|
3771
3778
|
t.updateState(_, {
|
|
3772
3779
|
updateHistory: !0,
|
|
3773
3780
|
kind: "update:details"
|
|
3774
3781
|
});
|
|
3775
3782
|
}
|
|
3776
|
-
if (
|
|
3777
|
-
const _ = ma(t.getState(), (E =
|
|
3783
|
+
if (p.key === Ci) {
|
|
3784
|
+
const _ = ma(t.getState(), (E = p.value) == null ? void 0 : E.payload);
|
|
3778
3785
|
t.updateState(_, {
|
|
3779
3786
|
updateHistory: !0,
|
|
3780
3787
|
kind: "update:details"
|
|
@@ -3783,7 +3790,7 @@ function Oa(t) {
|
|
|
3783
3790
|
});
|
|
3784
3791
|
return {
|
|
3785
3792
|
unsubscribe: () => {
|
|
3786
|
-
b.unsubscribe(), v.unsubscribe(), S.unsubscribe(), y.unsubscribe(), I.unsubscribe(), h.unsubscribe(), m.unsubscribe(),
|
|
3793
|
+
b.unsubscribe(), v.unsubscribe(), S.unsubscribe(), y.unsubscribe(), I.unsubscribe(), h.unsubscribe(), m.unsubscribe(), f.unsubscribe();
|
|
3787
3794
|
}
|
|
3788
3795
|
};
|
|
3789
3796
|
}
|
|
@@ -3792,17 +3799,17 @@ function Ds(t, r, e = { cyclesFix: !0 }, n = []) {
|
|
|
3792
3799
|
var c, d;
|
|
3793
3800
|
let s = [];
|
|
3794
3801
|
const a = Array.isArray(t);
|
|
3795
|
-
for (const
|
|
3796
|
-
const h = t[
|
|
3797
|
-
if (!(
|
|
3802
|
+
for (const f in t) {
|
|
3803
|
+
const h = t[f], y = a ? +f : f;
|
|
3804
|
+
if (!(f in r)) {
|
|
3798
3805
|
s.push({
|
|
3799
3806
|
type: "REMOVE",
|
|
3800
3807
|
path: [y],
|
|
3801
|
-
oldValue: t[
|
|
3808
|
+
oldValue: t[f]
|
|
3802
3809
|
});
|
|
3803
3810
|
continue;
|
|
3804
3811
|
}
|
|
3805
|
-
const m = r[
|
|
3812
|
+
const m = r[f], I = typeof h == "object" && typeof m == "object" && Array.isArray(h) === Array.isArray(m);
|
|
3806
3813
|
h && m && I && !Ca[(d = (c = Object.getPrototypeOf(h)) == null ? void 0 : c.constructor) == null ? void 0 : d.name] && (!e.cyclesFix || !n.includes(h)) ? s.push.apply(s, Ds(h, m, e, e.cyclesFix ? n.concat([h]) : []).map((b) => (b.path.unshift(y), b))) : h !== m && // treat NaN values as equivalent
|
|
3807
3814
|
!(Number.isNaN(h) && Number.isNaN(m)) && !(I && (isNaN(h) ? h + "" == m + "" : +h == +m)) && s.push({
|
|
3808
3815
|
path: [y],
|
|
@@ -3812,11 +3819,11 @@ function Ds(t, r, e = { cyclesFix: !0 }, n = []) {
|
|
|
3812
3819
|
});
|
|
3813
3820
|
}
|
|
3814
3821
|
const u = Array.isArray(r);
|
|
3815
|
-
for (const
|
|
3816
|
-
|
|
3822
|
+
for (const f in r)
|
|
3823
|
+
f in t || s.push({
|
|
3817
3824
|
type: "CREATE",
|
|
3818
|
-
path: [u ? +
|
|
3819
|
-
value: r[
|
|
3825
|
+
path: [u ? +f : f],
|
|
3826
|
+
value: r[f]
|
|
3820
3827
|
});
|
|
3821
3828
|
return s;
|
|
3822
3829
|
}
|
|
@@ -4031,12 +4038,12 @@ function wr(t, r, e) {
|
|
|
4031
4038
|
let u = a, c = !1;
|
|
4032
4039
|
s.type_ === 3 && (u = new Set(a), a.clear(), c = !0), Ze(
|
|
4033
4040
|
u,
|
|
4034
|
-
(d,
|
|
4041
|
+
(d, f) => rs(
|
|
4035
4042
|
t,
|
|
4036
4043
|
s,
|
|
4037
4044
|
a,
|
|
4038
4045
|
d,
|
|
4039
|
-
|
|
4046
|
+
f,
|
|
4040
4047
|
e,
|
|
4041
4048
|
c
|
|
4042
4049
|
),
|
|
@@ -4057,8 +4064,8 @@ function rs(t, r, e, n, s, a, u) {
|
|
|
4057
4064
|
if (!(c && !u)) {
|
|
4058
4065
|
if (process.env.NODE_ENV !== "production" && s === e && Y(5), Ie(s)) {
|
|
4059
4066
|
const d = a && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
|
4060
|
-
!Qe(r.assigned_, n) ? a.concat(n) : void 0,
|
|
4061
|
-
if (Fs(e, n,
|
|
4067
|
+
!Qe(r.assigned_, n) ? a.concat(n) : void 0, f = wr(t, s, d);
|
|
4068
|
+
if (Fs(e, n, f), Ie(f))
|
|
4062
4069
|
t.canAutoFreeze_ = !1;
|
|
4063
4070
|
else
|
|
4064
4071
|
return;
|
|
@@ -4209,8 +4216,8 @@ var Ha = class {
|
|
|
4209
4216
|
const a = e;
|
|
4210
4217
|
e = r;
|
|
4211
4218
|
const u = this;
|
|
4212
|
-
return function(d = a, ...
|
|
4213
|
-
return u.produce(d, (h) => e.call(this, h, ...
|
|
4219
|
+
return function(d = a, ...f) {
|
|
4220
|
+
return u.produce(d, (h) => e.call(this, h, ...f));
|
|
4214
4221
|
};
|
|
4215
4222
|
}
|
|
4216
4223
|
typeof e != "function" && Y(6), n !== void 0 && typeof n != "function" && Y(7);
|
|
@@ -4357,10 +4364,10 @@ function ns() {
|
|
|
4357
4364
|
}
|
|
4358
4365
|
}
|
|
4359
4366
|
function a(m, I, b, v) {
|
|
4360
|
-
let { base_: S, assigned_:
|
|
4367
|
+
let { base_: S, assigned_: p } = m, k = m.copy_;
|
|
4361
4368
|
k.length < S.length && ([S, k] = [k, S], [b, v] = [v, b]);
|
|
4362
4369
|
for (let T = 0; T < S.length; T++)
|
|
4363
|
-
if (
|
|
4370
|
+
if (p[T] && k[T] !== S[T]) {
|
|
4364
4371
|
const w = I.concat([T]);
|
|
4365
4372
|
b.push({
|
|
4366
4373
|
op: r,
|
|
@@ -4393,9 +4400,9 @@ function ns() {
|
|
|
4393
4400
|
}
|
|
4394
4401
|
}
|
|
4395
4402
|
function u(m, I, b, v) {
|
|
4396
|
-
const { base_: S, copy_:
|
|
4403
|
+
const { base_: S, copy_: p } = m;
|
|
4397
4404
|
Ze(m.assigned_, (k, T) => {
|
|
4398
|
-
const w = yn(S, k), E = yn(
|
|
4405
|
+
const w = yn(S, k), E = yn(p, k), _ = T ? Qe(S, k) ? r : e : n;
|
|
4399
4406
|
if (w === E && _ === r)
|
|
4400
4407
|
return;
|
|
4401
4408
|
const M = I.concat(k);
|
|
@@ -4405,9 +4412,9 @@ function ns() {
|
|
|
4405
4412
|
});
|
|
4406
4413
|
}
|
|
4407
4414
|
function c(m, I, b, v) {
|
|
4408
|
-
let { base_: S, copy_:
|
|
4415
|
+
let { base_: S, copy_: p } = m, k = 0;
|
|
4409
4416
|
S.forEach((T) => {
|
|
4410
|
-
if (!
|
|
4417
|
+
if (!p.has(T)) {
|
|
4411
4418
|
const w = I.concat([k]);
|
|
4412
4419
|
b.push({
|
|
4413
4420
|
op: n,
|
|
@@ -4420,7 +4427,7 @@ function ns() {
|
|
|
4420
4427
|
});
|
|
4421
4428
|
}
|
|
4422
4429
|
k++;
|
|
4423
|
-
}), k = 0,
|
|
4430
|
+
}), k = 0, p.forEach((T) => {
|
|
4424
4431
|
if (!S.has(T)) {
|
|
4425
4432
|
const w = I.concat([k]);
|
|
4426
4433
|
b.push({
|
|
@@ -4447,47 +4454,47 @@ function ns() {
|
|
|
4447
4454
|
value: m
|
|
4448
4455
|
});
|
|
4449
4456
|
}
|
|
4450
|
-
function
|
|
4457
|
+
function f(m, I) {
|
|
4451
4458
|
return I.forEach((b) => {
|
|
4452
4459
|
const { path: v, op: S } = b;
|
|
4453
|
-
let
|
|
4460
|
+
let p = m;
|
|
4454
4461
|
for (let E = 0; E < v.length - 1; E++) {
|
|
4455
|
-
const _ = be(
|
|
4462
|
+
const _ = be(p);
|
|
4456
4463
|
let M = v[E];
|
|
4457
|
-
typeof M != "string" && typeof M != "number" && (M = "" + M), (_ === 0 || _ === 1) && (M === "__proto__" || M === "constructor") && Y(19), typeof
|
|
4464
|
+
typeof M != "string" && typeof M != "number" && (M = "" + M), (_ === 0 || _ === 1) && (M === "__proto__" || M === "constructor") && Y(19), typeof p == "function" && M === "prototype" && Y(19), p = yn(p, M), typeof p != "object" && Y(18, v.join("/"));
|
|
4458
4465
|
}
|
|
4459
|
-
const k = be(
|
|
4466
|
+
const k = be(p), T = h(b.value), w = v[v.length - 1];
|
|
4460
4467
|
switch (S) {
|
|
4461
4468
|
case r:
|
|
4462
4469
|
switch (k) {
|
|
4463
4470
|
case 2:
|
|
4464
|
-
return
|
|
4471
|
+
return p.set(w, T);
|
|
4465
4472
|
case 3:
|
|
4466
4473
|
Y(16);
|
|
4467
4474
|
default:
|
|
4468
|
-
return
|
|
4475
|
+
return p[w] = T;
|
|
4469
4476
|
}
|
|
4470
4477
|
case e:
|
|
4471
4478
|
switch (k) {
|
|
4472
4479
|
case 1:
|
|
4473
|
-
return w === "-" ?
|
|
4480
|
+
return w === "-" ? p.push(T) : p.splice(w, 0, T);
|
|
4474
4481
|
case 2:
|
|
4475
|
-
return
|
|
4482
|
+
return p.set(w, T);
|
|
4476
4483
|
case 3:
|
|
4477
|
-
return
|
|
4484
|
+
return p.add(T);
|
|
4478
4485
|
default:
|
|
4479
|
-
return
|
|
4486
|
+
return p[w] = T;
|
|
4480
4487
|
}
|
|
4481
4488
|
case n:
|
|
4482
4489
|
switch (k) {
|
|
4483
4490
|
case 1:
|
|
4484
|
-
return
|
|
4491
|
+
return p.splice(w, 1);
|
|
4485
4492
|
case 2:
|
|
4486
|
-
return
|
|
4493
|
+
return p.delete(w);
|
|
4487
4494
|
case 3:
|
|
4488
|
-
return
|
|
4495
|
+
return p.delete(b.value);
|
|
4489
4496
|
default:
|
|
4490
|
-
return delete
|
|
4497
|
+
return delete p[w];
|
|
4491
4498
|
}
|
|
4492
4499
|
default:
|
|
4493
4500
|
Y(17, S);
|
|
@@ -4514,12 +4521,12 @@ function ns() {
|
|
|
4514
4521
|
return Ie(m) ? h(m) : m;
|
|
4515
4522
|
}
|
|
4516
4523
|
za("Patches", {
|
|
4517
|
-
applyPatches_:
|
|
4524
|
+
applyPatches_: f,
|
|
4518
4525
|
generatePatches_: s,
|
|
4519
4526
|
generateReplacementPatches_: d
|
|
4520
4527
|
});
|
|
4521
4528
|
}
|
|
4522
|
-
var Cn = new Ha(),
|
|
4529
|
+
var Cn = new Ha(), ja = Cn.produce, Wa = /* @__PURE__ */ Cn.applyPatches.bind(Cn), Ba = 9007199254740991, Ya = "[object Arguments]", Ga = "[object Function]", Xa = "[object GeneratorFunction]", Ka = "[object Symbol]", Va = typeof dt == "object" && dt && dt.Object === Object && dt, qa = typeof self == "object" && self && self.Object === Object && self, Ja = Va || qa || Function("return this")();
|
|
4523
4530
|
function Za(t, r, e) {
|
|
4524
4531
|
switch (e.length) {
|
|
4525
4532
|
case 0:
|
|
@@ -4703,12 +4710,12 @@ class Jo {
|
|
|
4703
4710
|
...C(n),
|
|
4704
4711
|
...C(r)
|
|
4705
4712
|
};
|
|
4706
|
-
|
|
4713
|
+
j(n, s) || (e.updateHistory && this.updateHistory(s, e.kind), this.prevState = n, this.stateSubject.next(s));
|
|
4707
4714
|
}
|
|
4708
4715
|
// emit changes for design size
|
|
4709
4716
|
subscribeToUpdateStateDetails(r) {
|
|
4710
4717
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4711
|
-
(!
|
|
4718
|
+
(!j(e.size, this.prevState.size) || !j(e.background, this.prevState.background)) && r({
|
|
4712
4719
|
size: e.size,
|
|
4713
4720
|
background: e.background
|
|
4714
4721
|
});
|
|
@@ -4717,7 +4724,7 @@ class Jo {
|
|
|
4717
4724
|
// Selectively subscribe to scale changes
|
|
4718
4725
|
subscribeToScale(r) {
|
|
4719
4726
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4720
|
-
|
|
4727
|
+
j(e.scale, this.prevState.scale) || r({ scale: e.scale });
|
|
4721
4728
|
});
|
|
4722
4729
|
}
|
|
4723
4730
|
// Selectively subscribe to fps changes
|
|
@@ -4728,7 +4735,7 @@ class Jo {
|
|
|
4728
4735
|
}
|
|
4729
4736
|
subscribeToUpdateTrackItem(r) {
|
|
4730
4737
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4731
|
-
|
|
4738
|
+
j(e.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: e.trackItemsMap });
|
|
4732
4739
|
});
|
|
4733
4740
|
}
|
|
4734
4741
|
subscribeToUpdateAnimations(r) {
|
|
@@ -4736,7 +4743,7 @@ class Jo {
|
|
|
4736
4743
|
const n = Object.keys(e.trackItemsMap).filter(
|
|
4737
4744
|
(s) => {
|
|
4738
4745
|
const a = this.prevState.trackItemsMap[s], u = e.trackItemsMap[s];
|
|
4739
|
-
return a && u && !
|
|
4746
|
+
return a && u && !j(a.animations, u.animations);
|
|
4740
4747
|
}
|
|
4741
4748
|
);
|
|
4742
4749
|
r({ trackItemsMap: e.trackItemsMap, changedAnimationIds: n });
|
|
@@ -4744,14 +4751,14 @@ class Jo {
|
|
|
4744
4751
|
}
|
|
4745
4752
|
subscribeToUpdateTrackItemTiming(r) {
|
|
4746
4753
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4747
|
-
if (!
|
|
4754
|
+
if (!j(e.trackItemsMap, this.prevState.trackItemsMap)) {
|
|
4748
4755
|
const n = Object.keys(e.trackItemsMap).filter((a) => {
|
|
4749
4756
|
const u = this.prevState.trackItemsMap[a], c = e.trackItemsMap[a];
|
|
4750
|
-
return u && c && !
|
|
4757
|
+
return u && c && !j(u.trim, c.trim);
|
|
4751
4758
|
}), s = Object.keys(e.trackItemsMap).filter(
|
|
4752
4759
|
(a) => {
|
|
4753
4760
|
const u = this.prevState.trackItemsMap[a], c = e.trackItemsMap[a];
|
|
4754
|
-
return u && c && !
|
|
4761
|
+
return u && c && !j(u.display, c.display);
|
|
4755
4762
|
}
|
|
4756
4763
|
);
|
|
4757
4764
|
r({
|
|
@@ -4766,7 +4773,7 @@ class Jo {
|
|
|
4766
4773
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4767
4774
|
Object.keys(e.trackItemsMap).some((s) => {
|
|
4768
4775
|
const a = this.prevState.trackItemsMap[s], u = e.trackItemsMap[s];
|
|
4769
|
-
return a && u && !
|
|
4776
|
+
return a && u && !j(a.details, u.details);
|
|
4770
4777
|
}) && r({ trackItemsMap: e.trackItemsMap });
|
|
4771
4778
|
});
|
|
4772
4779
|
}
|
|
@@ -4791,13 +4798,13 @@ class Jo {
|
|
|
4791
4798
|
subscribeToAddOrRemoveItems(r) {
|
|
4792
4799
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4793
4800
|
const n = [...e.trackItemIds].sort(), s = [...this.prevState.trackItemIds].sort(), a = [...e.transitionIds].sort(), u = [...this.prevState.transitionIds].sort();
|
|
4794
|
-
(!
|
|
4801
|
+
(!j(n, s) || !j(a, u)) && r({ trackItemIds: e.trackItemIds });
|
|
4795
4802
|
});
|
|
4796
4803
|
}
|
|
4797
4804
|
// Selectively subscribe to activeIds changes
|
|
4798
4805
|
subscribeToActiveIds(r) {
|
|
4799
4806
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4800
|
-
|
|
4807
|
+
j(e.activeIds, this.prevState.activeIds) || r({ activeIds: e.activeIds });
|
|
4801
4808
|
});
|
|
4802
4809
|
}
|
|
4803
4810
|
subscribeToTracks(r) {
|
|
@@ -4813,7 +4820,7 @@ class Jo {
|
|
|
4813
4820
|
}
|
|
4814
4821
|
subscribeToUpdateTracks(r) {
|
|
4815
4822
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4816
|
-
|
|
4823
|
+
j(e.tracks, this.prevState.tracks) || r({
|
|
4817
4824
|
tracks: e.tracks,
|
|
4818
4825
|
duration: e.duration,
|
|
4819
4826
|
trackItemsMap: e.trackItemsMap
|
|
@@ -4822,14 +4829,15 @@ class Jo {
|
|
|
4822
4829
|
}
|
|
4823
4830
|
// Selectively subscribe to multiple track-related properties
|
|
4824
4831
|
subscribeToState(r) {
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4832
|
+
let e = this.getState();
|
|
4833
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
4834
|
+
(!j(n.tracks, e.tracks) || !j(n.trackItemIds, e.trackItemIds) || !j(n.trackItemsMap, e.trackItemsMap) || !j(n.transitionIds, e.transitionIds) || !j(n.transitionsMap, e.transitionsMap) || !j(n.structure, e.structure)) && r({
|
|
4835
|
+
tracks: n.tracks,
|
|
4836
|
+
trackItemIds: n.trackItemIds,
|
|
4837
|
+
trackItemsMap: n.trackItemsMap,
|
|
4838
|
+
transitionIds: n.transitionIds,
|
|
4839
|
+
transitionsMap: n.transitionsMap,
|
|
4840
|
+
structure: n.structure
|
|
4833
4841
|
});
|
|
4834
4842
|
});
|
|
4835
4843
|
}
|
|
@@ -4843,14 +4851,14 @@ class Jo {
|
|
|
4843
4851
|
transitionIds: u,
|
|
4844
4852
|
transitionsMap: c,
|
|
4845
4853
|
trackItemsMap: d,
|
|
4846
|
-
structure:
|
|
4854
|
+
structure: f
|
|
4847
4855
|
} = this.getState(), h = C({
|
|
4848
4856
|
trackItemIds: s,
|
|
4849
4857
|
tracks: a,
|
|
4850
4858
|
transitionIds: u,
|
|
4851
4859
|
transitionsMap: c,
|
|
4852
4860
|
trackItemsMap: d,
|
|
4853
|
-
structure:
|
|
4861
|
+
structure: f
|
|
4854
4862
|
}), y = [], m = [], I = [], b = [], v = [], S = [];
|
|
4855
4863
|
e.forEach((x) => {
|
|
4856
4864
|
let F;
|
|
@@ -4869,7 +4877,7 @@ class Jo {
|
|
|
4869
4877
|
value: x.oldValue
|
|
4870
4878
|
}, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? m.push(F) : x.path.includes("trackItemsMap") ? v.push(F) : x.path.includes("transitionsMap") ? b.push(F) : x.path.includes("tracks") ? y.push(F) : x.path.includes("structure") && S.push(F);
|
|
4871
4879
|
});
|
|
4872
|
-
const
|
|
4880
|
+
const p = this.applyPatch(
|
|
4873
4881
|
h.tracks,
|
|
4874
4882
|
y
|
|
4875
4883
|
), k = this.applyPatch(
|
|
@@ -4888,7 +4896,7 @@ class Jo {
|
|
|
4888
4896
|
h.structure,
|
|
4889
4897
|
S
|
|
4890
4898
|
), M = C({
|
|
4891
|
-
tracks:
|
|
4899
|
+
tracks: p,
|
|
4892
4900
|
transitionIds: k,
|
|
4893
4901
|
trackItemIds: T,
|
|
4894
4902
|
transitionsMap: w,
|
|
@@ -4896,12 +4904,12 @@ class Jo {
|
|
|
4896
4904
|
structure: _
|
|
4897
4905
|
}), L = C(this.getState()), R = { ...L, ...M };
|
|
4898
4906
|
this.prevState = L, this.redos.push({ redos: e, type: n });
|
|
4899
|
-
const G =
|
|
4907
|
+
const G = W(R.trackItemsMap);
|
|
4900
4908
|
this.stateSubject.next({ ...R, duration: G }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 }), this.updateState(R, { updateHistory: !1 });
|
|
4901
4909
|
}
|
|
4902
4910
|
applyPatch(r, e) {
|
|
4903
|
-
return e.reverse().reduce((n, s) =>
|
|
4904
|
-
|
|
4911
|
+
return e.reverse().reduce((n, s) => ja(n, (a) => {
|
|
4912
|
+
Wa(a, [s]);
|
|
4905
4913
|
}), r);
|
|
4906
4914
|
}
|
|
4907
4915
|
redo() {
|
|
@@ -4914,14 +4922,14 @@ class Jo {
|
|
|
4914
4922
|
transitionIds: u,
|
|
4915
4923
|
transitionsMap: c,
|
|
4916
4924
|
trackItemsMap: d,
|
|
4917
|
-
structure:
|
|
4925
|
+
structure: f
|
|
4918
4926
|
} = this.getState(), h = C({
|
|
4919
4927
|
trackItemIds: s,
|
|
4920
4928
|
tracks: a,
|
|
4921
4929
|
transitionIds: u,
|
|
4922
4930
|
transitionsMap: c,
|
|
4923
4931
|
trackItemsMap: d,
|
|
4924
|
-
structure:
|
|
4932
|
+
structure: f
|
|
4925
4933
|
}), y = [], m = [], I = [], b = [], v = [], S = [];
|
|
4926
4934
|
e.forEach((x) => {
|
|
4927
4935
|
let F;
|
|
@@ -4940,7 +4948,7 @@ class Jo {
|
|
|
4940
4948
|
value: x.oldValue
|
|
4941
4949
|
}, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? m.push(F) : x.path.includes("trackItemsMap") ? v.push(F) : x.path.includes("transitionsMap") ? b.push(F) : x.path.includes("structure") ? S.push(F) : y.push(F);
|
|
4942
4950
|
});
|
|
4943
|
-
const
|
|
4951
|
+
const p = this.applyPatch(
|
|
4944
4952
|
h.tracks,
|
|
4945
4953
|
y
|
|
4946
4954
|
), k = this.applyPatch(
|
|
@@ -4959,7 +4967,7 @@ class Jo {
|
|
|
4959
4967
|
h.structure,
|
|
4960
4968
|
S
|
|
4961
4969
|
), M = C({
|
|
4962
|
-
tracks:
|
|
4970
|
+
tracks: p,
|
|
4963
4971
|
transitionIds: k,
|
|
4964
4972
|
trackItemIds: T,
|
|
4965
4973
|
transitionsMap: w,
|
|
@@ -4967,7 +4975,7 @@ class Jo {
|
|
|
4967
4975
|
structure: _
|
|
4968
4976
|
}), L = C(this.getState()), R = { ...L, ...M };
|
|
4969
4977
|
this.prevState = L, this.undos.push({ undos: e, type: n });
|
|
4970
|
-
const G =
|
|
4978
|
+
const G = W(R.trackItemsMap);
|
|
4971
4979
|
this.stateSubject.next({ ...R, duration: G }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 }), this.updateState(R, { updateHistory: !1 });
|
|
4972
4980
|
}
|
|
4973
4981
|
toJSON() {
|
|
@@ -5047,19 +5055,19 @@ export {
|
|
|
5047
5055
|
Go as LAYER_EDITING_NAME,
|
|
5048
5056
|
Uo as LAYER_HIDDEN,
|
|
5049
5057
|
Ho as LAYER_LOCKED,
|
|
5050
|
-
|
|
5058
|
+
jo as LAYER_MOVE,
|
|
5051
5059
|
Xo as LAYER_PASTE,
|
|
5052
5060
|
tt as LAYER_PREFIX,
|
|
5053
5061
|
Yo as LAYER_RENAME,
|
|
5054
5062
|
Li as LAYER_REPLACE,
|
|
5055
5063
|
zi as LAYER_SELECT,
|
|
5056
|
-
|
|
5064
|
+
Wo as LAYER_SELECTION,
|
|
5057
5065
|
Bo as LAYER_SEND_TO,
|
|
5058
5066
|
Ko as LAYER_SPLIT,
|
|
5059
5067
|
Oi as REPLACE_MEDIA,
|
|
5060
5068
|
Ao as STATE_CHANGED,
|
|
5061
5069
|
ai as STATE_PREFIX,
|
|
5062
|
-
|
|
5070
|
+
ji as TIMELINE_SCALE_CHANGED,
|
|
5063
5071
|
hs as TIMELINE_SCALE_PREFIX,
|
|
5064
5072
|
Mo as TRACKS_CHANGED,
|
|
5065
5073
|
Eo as TRACK_ITEMS_CHANGED,
|