@designcombo/state 0.1.22 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +252 -251
- package/dist/index.umd.js +2 -2
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
@@ -112,7 +112,7 @@ var tr = function() {
|
|
112
112
|
if (H) {
|
113
113
|
this._finalizers = null;
|
114
114
|
try {
|
115
|
-
for (var
|
115
|
+
for (var m = an(H), p = m.next(); !p.done; p = m.next()) {
|
116
116
|
var h = p.value;
|
117
117
|
try {
|
118
118
|
kn(h);
|
@@ -124,7 +124,7 @@ var tr = function() {
|
|
124
124
|
i = { error: l };
|
125
125
|
} finally {
|
126
126
|
try {
|
127
|
-
p && !p.done && (s =
|
127
|
+
p && !p.done && (s = m.return) && s.call(m);
|
128
128
|
} finally {
|
129
129
|
if (i) throw i.error;
|
130
130
|
}
|
@@ -513,8 +513,8 @@ function bn(t) {
|
|
513
513
|
var qe = { exports: {} };
|
514
514
|
qe.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, f = 9007199254740991, d = "[object Arguments]", x = "[object Array]", F = "[object AsyncFunction]", k = "[object Boolean]", H = "[object Date]",
|
517
|
-
N[$] = N[bt] = N[Ie] = N[ir] = N[ar] = N[sr] = N[or] = N[z] = N[cr] = !0, N[d] = N[x] = N[
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, f = 9007199254740991, d = "[object Arguments]", x = "[object Array]", F = "[object AsyncFunction]", k = "[object Boolean]", H = "[object Date]", m = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", l = "[object Map]", b = "[object Number]", v = "[object Null]", _ = "[object Object]", y = "[object Promise]", g = "[object Proxy]", j = "[object RegExp]", O = "[object Set]", I = "[object String]", P = "[object Symbol]", S = "[object Undefined]", T = "[object WeakMap]", E = "[object ArrayBuffer]", M = "[object DataView]", $ = "[object Float32Array]", bt = "[object Float64Array]", Ie = "[object Int8Array]", ir = "[object Int16Array]", ar = "[object Int32Array]", sr = "[object Uint8Array]", or = "[object Uint8ClampedArray]", z = "[object Uint16Array]", cr = "[object Uint32Array]", ur = /[\\^$.*+?()[\]{}|]/g, it = /^\[object .+?Constructor\]$/, Se = /^(?:0|[1-9]\d*)$/, N = {};
|
517
|
+
N[$] = N[bt] = N[Ie] = N[ir] = N[ar] = N[sr] = N[or] = N[z] = N[cr] = !0, N[d] = N[x] = N[E] = N[k] = N[M] = N[H] = N[m] = N[p] = N[l] = N[b] = N[_] = N[j] = N[O] = N[I] = N[T] = !1;
|
518
518
|
var we = typeof nt == "object" && nt && nt.Object === Object && nt, lr = typeof self == "object" && self && self.Object === Object && self, at = we || lr || Function("return this")(), Te = r && !r.nodeType && r, ke = Te && !0 && t && !t.nodeType && t, Yt = ke && ke.exports === Te, Vt = Yt && we.process, Ee = function() {
|
519
519
|
try {
|
520
520
|
return Vt && Vt.binding && Vt.binding("util");
|
@@ -522,15 +522,15 @@ qe.exports;
|
|
522
522
|
}
|
523
523
|
}(), Xt = Ee && Ee.isTypedArray;
|
524
524
|
function Ae(e, a) {
|
525
|
-
for (var o = -1, u = e == null ? 0 : e.length,
|
525
|
+
for (var o = -1, u = e == null ? 0 : e.length, A = 0, w = []; ++o < u; ) {
|
526
526
|
var C = e[o];
|
527
|
-
a(C, o, e) && (w[
|
527
|
+
a(C, o, e) && (w[A++] = C);
|
528
528
|
}
|
529
529
|
return w;
|
530
530
|
}
|
531
531
|
function qt(e, a) {
|
532
|
-
for (var o = -1, u = a.length,
|
533
|
-
e[
|
532
|
+
for (var o = -1, u = a.length, A = e.length; ++o < u; )
|
533
|
+
e[A + o] = a[o];
|
534
534
|
return e;
|
535
535
|
}
|
536
536
|
function Oe(e, a) {
|
@@ -557,8 +557,8 @@ qe.exports;
|
|
557
557
|
}
|
558
558
|
function xe(e) {
|
559
559
|
var a = -1, o = Array(e.size);
|
560
|
-
return e.forEach(function(u,
|
561
|
-
o[++a] = [
|
560
|
+
return e.forEach(function(u, A) {
|
561
|
+
o[++a] = [A, u];
|
562
562
|
}), o;
|
563
563
|
}
|
564
564
|
function Me(e, a) {
|
@@ -708,11 +708,11 @@ qe.exports;
|
|
708
708
|
}
|
709
709
|
ut.prototype.clear = se, ut.prototype.delete = Cr, ut.prototype.get = jr, ut.prototype.has = Rr, ut.prototype.set = Fr;
|
710
710
|
function zr(e, a) {
|
711
|
-
var o = Wt(e), u = !o && Le(e),
|
711
|
+
var o = Wt(e), u = !o && Le(e), A = !o && !u && Bt(e), w = !o && !u && !A && Be(e), C = o || u || A || w, D = C ? fr(e.length, String) : [], U = D.length;
|
712
712
|
for (var R in e)
|
713
713
|
et.call(e, R) && !(C && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
714
|
(R == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
|
-
|
715
|
+
A && (R == "offset" || R == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
716
|
w && (R == "buffer" || R == "byteLength" || R == "byteOffset") || // Skip index properties.
|
717
717
|
$r(R, U))) && D.push(R);
|
718
718
|
return D;
|
@@ -733,10 +733,10 @@ qe.exports;
|
|
733
733
|
function ze(e) {
|
734
734
|
return ft(e) && kt(e) == d;
|
735
735
|
}
|
736
|
-
function Ne(e, a, o, u,
|
737
|
-
return e === a ? !0 : e == null || a == null || !ft(e) && !ft(a) ? e !== e && a !== a : Nr(e, a, o, u, Ne,
|
736
|
+
function Ne(e, a, o, u, A) {
|
737
|
+
return e === a ? !0 : e == null || a == null || !ft(e) && !ft(a) ? e !== e && a !== a : Nr(e, a, o, u, Ne, A);
|
738
738
|
}
|
739
|
-
function Nr(e, a, o, u,
|
739
|
+
function Nr(e, a, o, u, A, w) {
|
740
740
|
var C = Wt(e), D = Wt(a), U = C ? x : lt(e), R = D ? x : lt(a);
|
741
741
|
U = U == d ? _ : U, R = R == d ? _ : R;
|
742
742
|
var Y = U == _, J = R == _, L = U == R;
|
@@ -746,15 +746,15 @@ qe.exports;
|
|
746
746
|
C = !0, Y = !1;
|
747
747
|
}
|
748
748
|
if (L && !Y)
|
749
|
-
return w || (w = new ut()), C || Be(e) ? ce(e, a, o, u,
|
749
|
+
return w || (w = new ut()), C || Be(e) ? ce(e, a, o, u, A, w) : Gr(e, a, U, o, u, A, w);
|
750
750
|
if (!(o & s)) {
|
751
751
|
var V = Y && et.call(e, "__wrapped__"), B = J && et.call(a, "__wrapped__");
|
752
752
|
if (V || B) {
|
753
753
|
var _t = V ? e.value() : e, yt = B ? a.value() : a;
|
754
|
-
return w || (w = new ut()),
|
754
|
+
return w || (w = new ut()), A(_t, yt, o, u, w);
|
755
755
|
}
|
756
756
|
}
|
757
|
-
return L ? (w || (w = new ut()), Wr(e, a, o, u,
|
757
|
+
return L ? (w || (w = new ut()), Wr(e, a, o, u, A, w)) : !1;
|
758
758
|
}
|
759
759
|
function Hr(e) {
|
760
760
|
if (!We(e) || Yr(e))
|
@@ -773,7 +773,7 @@ qe.exports;
|
|
773
773
|
et.call(e, o) && o != "constructor" && a.push(o);
|
774
774
|
return a;
|
775
775
|
}
|
776
|
-
function ce(e, a, o, u,
|
776
|
+
function ce(e, a, o, u, A, w) {
|
777
777
|
var C = o & s, D = e.length, U = a.length;
|
778
778
|
if (D != U && !(C && U > D))
|
779
779
|
return !1;
|
@@ -793,39 +793,39 @@ qe.exports;
|
|
793
793
|
}
|
794
794
|
if (L) {
|
795
795
|
if (!Oe(a, function(yt, At) {
|
796
|
-
if (!jt(L, At) && (V === yt ||
|
796
|
+
if (!jt(L, At) && (V === yt || A(V, yt, o, u, w)))
|
797
797
|
return L.push(At);
|
798
798
|
})) {
|
799
799
|
J = !1;
|
800
800
|
break;
|
801
801
|
}
|
802
|
-
} else if (!(V === B ||
|
802
|
+
} else if (!(V === B || A(V, B, o, u, w))) {
|
803
803
|
J = !1;
|
804
804
|
break;
|
805
805
|
}
|
806
806
|
}
|
807
807
|
return w.delete(e), w.delete(a), J;
|
808
808
|
}
|
809
|
-
function Gr(e, a, o, u,
|
809
|
+
function Gr(e, a, o, u, A, w, C) {
|
810
810
|
switch (o) {
|
811
811
|
case M:
|
812
812
|
if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
|
813
813
|
return !1;
|
814
814
|
e = e.buffer, a = a.buffer;
|
815
|
-
case
|
815
|
+
case E:
|
816
816
|
return !(e.byteLength != a.byteLength || !w(new Ce(e), new Ce(a)));
|
817
817
|
case k:
|
818
818
|
case H:
|
819
|
-
case g:
|
820
|
-
return Ue(+e, +a);
|
821
819
|
case b:
|
820
|
+
return Ue(+e, +a);
|
821
|
+
case m:
|
822
822
|
return e.name == a.name && e.message == a.message;
|
823
823
|
case j:
|
824
824
|
case I:
|
825
825
|
return e == a + "";
|
826
826
|
case l:
|
827
827
|
var D = xe;
|
828
|
-
case
|
828
|
+
case O:
|
829
829
|
var U = u & s;
|
830
830
|
if (D || (D = ct), e.size != a.size && !U)
|
831
831
|
return !1;
|
@@ -833,7 +833,7 @@ qe.exports;
|
|
833
833
|
if (R)
|
834
834
|
return R == a;
|
835
835
|
u |= c, C.set(e, a);
|
836
|
-
var Y = ce(D(e), D(a), u,
|
836
|
+
var Y = ce(D(e), D(a), u, A, w, C);
|
837
837
|
return C.delete(e), Y;
|
838
838
|
case P:
|
839
839
|
if (ae)
|
@@ -841,7 +841,7 @@ qe.exports;
|
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function Wr(e, a, o, u,
|
844
|
+
function Wr(e, a, o, u, A, w) {
|
845
845
|
var C = o & s, D = Et(e), U = D.length, R = Et(a), Y = R.length;
|
846
846
|
if (U != Y && !C)
|
847
847
|
return !1;
|
@@ -860,7 +860,7 @@ qe.exports;
|
|
860
860
|
var yt = e[L], At = a[L];
|
861
861
|
if (u)
|
862
862
|
var Tn = C ? u(At, yt, L, a, e, w) : u(yt, At, L, e, a, w);
|
863
|
-
if (!(Tn === void 0 ? yt === At ||
|
863
|
+
if (!(Tn === void 0 ? yt === At || A(yt, At, o, u, w) : Tn)) {
|
864
864
|
B = !1;
|
865
865
|
break;
|
866
866
|
}
|
@@ -890,15 +890,15 @@ qe.exports;
|
|
890
890
|
var u = !0;
|
891
891
|
} catch {
|
892
892
|
}
|
893
|
-
var
|
894
|
-
return u && (a ? e[st] = o : delete e[st]),
|
893
|
+
var A = De.call(e);
|
894
|
+
return u && (a ? e[st] = o : delete e[st]), A;
|
895
895
|
}
|
896
896
|
var Br = Ht ? function(e) {
|
897
897
|
return e == null ? [] : (e = Object(e), Ae(Ht(e), function(a) {
|
898
898
|
return Nt.call(e, a);
|
899
899
|
}));
|
900
900
|
} : qr, lt = kt;
|
901
|
-
(ee && lt(new ee(new ArrayBuffer(1))) != M || Tt && lt(new Tt()) != l || re && lt(re.resolve()) != y || ne && lt(new ne()) !=
|
901
|
+
(ee && lt(new ee(new ArrayBuffer(1))) != M || Tt && lt(new Tt()) != l || re && lt(re.resolve()) != y || ne && lt(new ne()) != O || ie && lt(new ie()) != T) && (lt = function(e) {
|
902
902
|
var a = kt(e), o = a == _ ? e.constructor : void 0, u = o ? X(o) : "";
|
903
903
|
if (u)
|
904
904
|
switch (u) {
|
@@ -909,7 +909,7 @@ qe.exports;
|
|
909
909
|
case yr:
|
910
910
|
return y;
|
911
911
|
case mr:
|
912
|
-
return
|
912
|
+
return O;
|
913
913
|
case br:
|
914
914
|
return T;
|
915
915
|
}
|
@@ -964,7 +964,7 @@ qe.exports;
|
|
964
964
|
if (!We(e))
|
965
965
|
return !1;
|
966
966
|
var a = kt(e);
|
967
|
-
return a == p || a == h || a == F || a ==
|
967
|
+
return a == p || a == h || a == F || a == g;
|
968
968
|
}
|
969
969
|
function le(e) {
|
970
970
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= f;
|
@@ -993,8 +993,8 @@ const rt = /* @__PURE__ */ bn(Bi);
|
|
993
993
|
var Je = { exports: {} };
|
994
994
|
Je.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]", x = "[object Date]", F = "[object Error]", k = "[object Function]", H = "[object GeneratorFunction]",
|
997
|
-
z[c] = z[f] = z[j] = z[
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]", x = "[object Date]", F = "[object Error]", k = "[object Function]", H = "[object GeneratorFunction]", m = "[object Map]", p = "[object Number]", h = "[object Object]", l = "[object Promise]", b = "[object RegExp]", v = "[object Set]", _ = "[object String]", y = "[object Symbol]", g = "[object WeakMap]", j = "[object ArrayBuffer]", O = "[object DataView]", I = "[object Float32Array]", P = "[object Float64Array]", S = "[object Int8Array]", T = "[object Int16Array]", E = "[object Int32Array]", M = "[object Uint8Array]", $ = "[object Uint8ClampedArray]", bt = "[object Uint16Array]", Ie = "[object Uint32Array]", ir = /[\\^$.*+?()[\]{}|]/g, ar = /\w*$/, sr = /^\[object .+?Constructor\]$/, or = /^(?:0|[1-9]\d*)$/, z = {};
|
997
|
+
z[c] = z[f] = z[j] = z[O] = z[d] = z[x] = z[I] = z[P] = z[S] = z[T] = z[E] = z[m] = z[p] = z[h] = z[b] = z[v] = z[_] = z[y] = z[M] = z[$] = z[bt] = z[Ie] = !0, z[F] = z[k] = z[g] = !1;
|
998
998
|
var cr = typeof nt == "object" && nt && nt.Object === Object && nt, ur = typeof self == "object" && self && self.Object === Object && self, it = cr || ur || Function("return this")(), Se = r && !r.nodeType && r, N = Se && !0 && t && !t.nodeType && t, we = N && N.exports === Se;
|
999
999
|
function lr(e, a) {
|
1000
1000
|
return e.set(a[0], a[1]), e;
|
@@ -1008,13 +1008,13 @@ Je.exports;
|
|
1008
1008
|
return e;
|
1009
1009
|
}
|
1010
1010
|
function ke(e, a) {
|
1011
|
-
for (var o = -1, u = a.length,
|
1012
|
-
e[
|
1011
|
+
for (var o = -1, u = a.length, A = e.length; ++o < u; )
|
1012
|
+
e[A + o] = a[o];
|
1013
1013
|
return e;
|
1014
1014
|
}
|
1015
1015
|
function Yt(e, a, o, u) {
|
1016
|
-
for (var
|
1017
|
-
o = a(o, e[
|
1016
|
+
for (var A = -1, w = e ? e.length : 0; ++A < w; )
|
1017
|
+
o = a(o, e[A], A, e);
|
1018
1018
|
return o;
|
1019
1019
|
}
|
1020
1020
|
function Vt(e, a) {
|
@@ -1036,8 +1036,8 @@ Je.exports;
|
|
1036
1036
|
}
|
1037
1037
|
function Ae(e) {
|
1038
1038
|
var a = -1, o = Array(e.size);
|
1039
|
-
return e.forEach(function(u,
|
1040
|
-
o[++a] = [
|
1039
|
+
return e.forEach(function(u, A) {
|
1040
|
+
o[++a] = [A, u];
|
1041
1041
|
}), o;
|
1042
1042
|
}
|
1043
1043
|
function qt(e, a) {
|
@@ -1170,9 +1170,9 @@ Je.exports;
|
|
1170
1170
|
}
|
1171
1171
|
q.prototype.clear = Or, q.prototype.delete = xr, q.prototype.get = Mr, q.prototype.has = Pr, q.prototype.set = Dr;
|
1172
1172
|
function Ut(e, a) {
|
1173
|
-
var o = ue(e) || Wt(e) ? Vt(e.length, String) : [], u = o.length,
|
1173
|
+
var o = ue(e) || Wt(e) ? Vt(e.length, String) : [], u = o.length, A = !!u;
|
1174
1174
|
for (var w in e)
|
1175
|
-
ct.call(e, w) && !(
|
1175
|
+
ct.call(e, w) && !(A && (w == "length" || Kr(w, u))) && o.push(w);
|
1176
1176
|
return o;
|
1177
1177
|
}
|
1178
1178
|
function Fe(e, a, o) {
|
@@ -1188,9 +1188,9 @@ Je.exports;
|
|
1188
1188
|
function ut(e, a) {
|
1189
1189
|
return e && ce(a, fe(a), e);
|
1190
1190
|
}
|
1191
|
-
function se(e, a, o, u,
|
1191
|
+
function se(e, a, o, u, A, w, C) {
|
1192
1192
|
var D;
|
1193
|
-
if (u && (D = w ? u(e,
|
1193
|
+
if (u && (D = w ? u(e, A, w, C) : u(e)), D !== void 0)
|
1194
1194
|
return D;
|
1195
1195
|
if (!ft(e))
|
1196
1196
|
return e;
|
@@ -1288,8 +1288,8 @@ Je.exports;
|
|
1288
1288
|
}
|
1289
1289
|
function ce(e, a, o, u) {
|
1290
1290
|
o || (o = {});
|
1291
|
-
for (var
|
1292
|
-
var C = a[
|
1291
|
+
for (var A = -1, w = a.length; ++A < w; ) {
|
1292
|
+
var C = a[A], D = void 0;
|
1293
1293
|
Fe(o, C, D === void 0 ? e[C] : D);
|
1294
1294
|
}
|
1295
1295
|
return o;
|
@@ -1309,20 +1309,20 @@ Je.exports;
|
|
1309
1309
|
return Fr(o) ? o : void 0;
|
1310
1310
|
}
|
1311
1311
|
var dt = Qt ? qt(Qt, Object) : qr, ht = Rr;
|
1312
|
-
(Nt && ht(new Nt(new ArrayBuffer(1))) !=
|
1312
|
+
(Nt && ht(new Nt(new ArrayBuffer(1))) != O || St && ht(new St()) != m || st && ht(st.resolve()) != l || Ht && ht(new Ht()) != v || te && ht(new te()) != g) && (ht = function(e) {
|
1313
1313
|
var a = Rt.call(e), o = a == h ? e.constructor : void 0, u = o ? X(o) : void 0;
|
1314
1314
|
if (u)
|
1315
1315
|
switch (u) {
|
1316
1316
|
case ee:
|
1317
|
-
return
|
1317
|
+
return O;
|
1318
1318
|
case Tt:
|
1319
|
-
return
|
1319
|
+
return m;
|
1320
1320
|
case re:
|
1321
1321
|
return l;
|
1322
1322
|
case ne:
|
1323
1323
|
return v;
|
1324
1324
|
case ie:
|
1325
|
-
return
|
1325
|
+
return g;
|
1326
1326
|
}
|
1327
1327
|
return a;
|
1328
1328
|
});
|
@@ -1334,31 +1334,31 @@ Je.exports;
|
|
1334
1334
|
return typeof e.constructor == "function" && !He(e) ? Cr(et(e)) : {};
|
1335
1335
|
}
|
1336
1336
|
function $r(e, a, o, u) {
|
1337
|
-
var
|
1337
|
+
var A = e.constructor;
|
1338
1338
|
switch (a) {
|
1339
1339
|
case j:
|
1340
1340
|
return oe(e);
|
1341
1341
|
case d:
|
1342
1342
|
case x:
|
1343
|
-
return new
|
1344
|
-
case
|
1343
|
+
return new A(+e);
|
1344
|
+
case O:
|
1345
1345
|
return kt(e, u);
|
1346
1346
|
case I:
|
1347
1347
|
case P:
|
1348
1348
|
case S:
|
1349
1349
|
case T:
|
1350
|
-
case
|
1350
|
+
case E:
|
1351
1351
|
case M:
|
1352
1352
|
case $:
|
1353
1353
|
case bt:
|
1354
1354
|
case Ie:
|
1355
1355
|
return Ur(e, u);
|
1356
|
-
case
|
1356
|
+
case m:
|
1357
1357
|
return ze(e, u, o);
|
1358
1358
|
case p:
|
1359
1359
|
case _:
|
1360
|
-
return new
|
1361
|
-
case
|
1360
|
+
return new A(e);
|
1361
|
+
case b:
|
1362
1362
|
return Ne(e);
|
1363
1363
|
case v:
|
1364
1364
|
return Nr(e, u, o);
|
@@ -1773,25 +1773,25 @@ function Ji(t) {
|
|
1773
1773
|
), d = r.subscribe(async (p) => {
|
1774
1774
|
var h, l;
|
1775
1775
|
if (p.key === _i) {
|
1776
|
-
const
|
1776
|
+
const b = Z(t.getState()), v = (h = p.value) == null ? void 0 : h.payload, _ = v.trackItemIds, y = v.trackItemsMap, g = v.trackItemDetailsMap;
|
1777
1777
|
console.warn("IMPROVE FONTS LOADING");
|
1778
1778
|
const j = _.map(async (I) => {
|
1779
1779
|
var P;
|
1780
1780
|
try {
|
1781
|
-
const S =
|
1781
|
+
const S = g[I], T = y[I];
|
1782
1782
|
if (S.type === "image") {
|
1783
|
-
const
|
1783
|
+
const E = await Cn(
|
1784
1784
|
{ id: I, details: S.details, ...T },
|
1785
1785
|
{
|
1786
|
-
size:
|
1786
|
+
size: b.size
|
1787
1787
|
}
|
1788
|
-
), { details: M, ...$ } =
|
1789
|
-
|
1788
|
+
), { details: M, ...$ } = E;
|
1789
|
+
g[I] = { type: "image", details: M }, y[I] = $;
|
1790
1790
|
} else if (S.type === "video") {
|
1791
|
-
const
|
1791
|
+
const E = Z(
|
1792
1792
|
(P = p.value) == null ? void 0 : P.payload.trackItemsMap[I]
|
1793
1793
|
), M = await Pn(
|
1794
|
-
{ ...S, ...
|
1794
|
+
{ ...S, ...E, ...T },
|
1795
1795
|
{
|
1796
1796
|
size: {
|
1797
1797
|
width: 1080,
|
@@ -1799,16 +1799,16 @@ function Ji(t) {
|
|
1799
1799
|
}
|
1800
1800
|
}
|
1801
1801
|
), { details: $, ...bt } = M;
|
1802
|
-
|
1802
|
+
g[I] = { type: "video", details: $ }, y[I] = bt;
|
1803
1803
|
} else if (S.type === "audio") {
|
1804
|
-
const
|
1804
|
+
const E = await Dn({
|
1805
1805
|
id: I,
|
1806
1806
|
details: S.details,
|
1807
1807
|
...T
|
1808
|
-
}), { details: M, ...$ } =
|
1809
|
-
|
1808
|
+
}), { details: M, ...$ } = E;
|
1809
|
+
g[I] = { type: "audio", details: M }, y[I] = $;
|
1810
1810
|
} else if (S.type === "caption") {
|
1811
|
-
const
|
1811
|
+
const E = await jn(
|
1812
1812
|
{ id: I, details: S.details, ...T },
|
1813
1813
|
{
|
1814
1814
|
size: {
|
@@ -1816,10 +1816,10 @@ function Ji(t) {
|
|
1816
1816
|
height: 1920
|
1817
1817
|
}
|
1818
1818
|
}
|
1819
|
-
), { details: M, ...$ } =
|
1820
|
-
|
1819
|
+
), { details: M, ...$ } = E;
|
1820
|
+
g[I] = { type: "caption", details: M }, y[I] = $;
|
1821
1821
|
} else if (S.type === "text") {
|
1822
|
-
const
|
1822
|
+
const E = await Rn(
|
1823
1823
|
{ id: I, details: S.details, ...T },
|
1824
1824
|
{
|
1825
1825
|
size: {
|
@@ -1827,8 +1827,8 @@ function Ji(t) {
|
|
1827
1827
|
height: 1920
|
1828
1828
|
}
|
1829
1829
|
}
|
1830
|
-
), { details: M, ...$ } =
|
1831
|
-
|
1830
|
+
), { details: M, ...$ } = E;
|
1831
|
+
g[I] = { type: "text", details: M }, y[I] = $;
|
1832
1832
|
}
|
1833
1833
|
return !0;
|
1834
1834
|
} catch {
|
@@ -1836,40 +1836,40 @@ function Ji(t) {
|
|
1836
1836
|
}
|
1837
1837
|
});
|
1838
1838
|
await Promise.all(j);
|
1839
|
-
const
|
1839
|
+
const O = Ve(y);
|
1840
1840
|
t.updateState({
|
1841
1841
|
...v,
|
1842
1842
|
trackItemsMap: y,
|
1843
|
-
duration:
|
1843
|
+
duration: O
|
1844
1844
|
});
|
1845
1845
|
}
|
1846
1846
|
if (p.key === vi) {
|
1847
|
-
const
|
1847
|
+
const b = (l = p.value) == null ? void 0 : l.payload;
|
1848
1848
|
t.updateState({
|
1849
|
-
size:
|
1849
|
+
size: b
|
1850
1850
|
});
|
1851
1851
|
}
|
1852
1852
|
}), x = s.subscribe((p) => {
|
1853
1853
|
if (p.key === Ii) return t.undo();
|
1854
1854
|
if (p.key === Si) return t.redo();
|
1855
1855
|
}), F = i.subscribe((p) => {
|
1856
|
-
var l,
|
1856
|
+
var l, b, v;
|
1857
1857
|
const h = [];
|
1858
|
-
if ((l = p.value) != null && l.payload.trackItemIds && (h.push((
|
1859
|
-
const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds, y = Z(t.getState()),
|
1860
|
-
(M) => !
|
1858
|
+
if ((l = p.value) != null && l.payload.trackItemIds && (h.push((b = p.value) == null ? void 0 : b.payload.trackItemIds), t.updateState({ activeIds: h })), p.key === wi) {
|
1859
|
+
const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds, y = Z(t.getState()), g = _ && _.length ? _ : y.activeIds, j = y.trackItemIds, O = y.trackItemDetailsMap, I = j.filter(
|
1860
|
+
(M) => !g.includes(M)
|
1861
1861
|
), P = Object.fromEntries(
|
1862
|
-
Object.entries(
|
1863
|
-
([M]) => !
|
1862
|
+
Object.entries(O).filter(
|
1863
|
+
([M]) => !g.includes(M)
|
1864
1864
|
)
|
1865
1865
|
), S = qi(
|
1866
1866
|
y.tracks,
|
1867
|
-
|
1867
|
+
g
|
1868
1868
|
), T = Object.fromEntries(
|
1869
1869
|
Object.entries(y.trackItemsMap).filter(
|
1870
|
-
([M]) => !
|
1870
|
+
([M]) => !g.includes(M)
|
1871
1871
|
)
|
1872
|
-
),
|
1872
|
+
), E = Ve(y.trackItemsMap);
|
1873
1873
|
t.updateState(
|
1874
1874
|
{
|
1875
1875
|
trackItemIds: I,
|
@@ -1877,81 +1877,81 @@ function Ji(t) {
|
|
1877
1877
|
activeIds: [],
|
1878
1878
|
trackItemsMap: T,
|
1879
1879
|
tracks: S,
|
1880
|
-
duration:
|
1880
|
+
duration: E
|
1881
1881
|
},
|
1882
1882
|
{ updateHistory: !0, kind: "remove" }
|
1883
1883
|
);
|
1884
1884
|
}
|
1885
1885
|
}), k = n.subscribe(async (p) => {
|
1886
|
-
var _, y,
|
1886
|
+
var _, y, g, j, O;
|
1887
1887
|
const h = Z(t.getState());
|
1888
|
-
let l = [],
|
1888
|
+
let l = [], b = "text";
|
1889
1889
|
if (p.key === Ti) {
|
1890
|
-
|
1890
|
+
b = "caption";
|
1891
1891
|
const I = (_ = p.value) == null ? void 0 : _.payload, P = [];
|
1892
|
-
for (const
|
1893
|
-
const M = jn(
|
1892
|
+
for (const E of I) {
|
1893
|
+
const M = jn(E, {
|
1894
1894
|
size: h.size
|
1895
1895
|
});
|
1896
1896
|
P.push(M);
|
1897
1897
|
}
|
1898
1898
|
const S = await Promise.all(P), T = [];
|
1899
|
-
for (const
|
1900
|
-
const M =
|
1899
|
+
for (const E of S) {
|
1900
|
+
const M = E.id;
|
1901
1901
|
T.push(M);
|
1902
|
-
const { details: $, ...bt } =
|
1902
|
+
const { details: $, ...bt } = E;
|
1903
1903
|
h.trackItemDetailsMap[M] = {
|
1904
|
-
type:
|
1904
|
+
type: b,
|
1905
1905
|
details: $
|
1906
1906
|
}, h.trackItemsMap[M] = bt, h.trackItemIds.push(M);
|
1907
1907
|
}
|
1908
1908
|
l = T;
|
1909
1909
|
}
|
1910
1910
|
if (p.key === ki) {
|
1911
|
-
|
1911
|
+
b = "text";
|
1912
1912
|
const I = await Rn((y = p.value) == null ? void 0 : y.payload, {
|
1913
1913
|
size: h.size
|
1914
1914
|
}), { details: P, ...S } = I;
|
1915
1915
|
h.trackItemDetailsMap[S.id] = {
|
1916
|
-
type:
|
1916
|
+
type: b,
|
1917
1917
|
details: P
|
1918
1918
|
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
1919
1919
|
}
|
1920
1920
|
if (p.key === Ei) {
|
1921
|
-
|
1922
|
-
const I = await Cn((
|
1921
|
+
b = "image";
|
1922
|
+
const I = await Cn((g = p.value) == null ? void 0 : g.payload, {
|
1923
1923
|
size: {
|
1924
1924
|
width: 1080,
|
1925
1925
|
height: 1920
|
1926
1926
|
}
|
1927
1927
|
}), { details: P, ...S } = I;
|
1928
1928
|
h.trackItemDetailsMap[S.id] = {
|
1929
|
-
type:
|
1929
|
+
type: b,
|
1930
1930
|
details: P
|
1931
1931
|
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
1932
1932
|
}
|
1933
1933
|
if (p.key === Ai) {
|
1934
|
-
|
1934
|
+
b = "audio";
|
1935
1935
|
const I = await Dn((j = p.value) == null ? void 0 : j.payload), { details: P, ...S } = I;
|
1936
1936
|
h.trackItemDetailsMap[S.id] = {
|
1937
|
-
type:
|
1937
|
+
type: b,
|
1938
1938
|
details: P
|
1939
1939
|
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
1940
1940
|
}
|
1941
1941
|
if (p.key === Oi) {
|
1942
|
-
|
1943
|
-
const I = await Pn((
|
1942
|
+
b = "video";
|
1943
|
+
const I = await Pn((O = p.value) == null ? void 0 : O.payload, {
|
1944
1944
|
size: h.size
|
1945
1945
|
}), { details: P, ...S } = I;
|
1946
1946
|
h.trackItemDetailsMap[S.id] = {
|
1947
|
-
type:
|
1947
|
+
type: b,
|
1948
1948
|
details: P
|
1949
1949
|
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
1950
1950
|
}
|
1951
1951
|
h.tracks.unshift({
|
1952
1952
|
id: ln(),
|
1953
1953
|
accepts: ["text", "audio", "helper", "video", "image", "caption"],
|
1954
|
-
type:
|
1954
|
+
type: b,
|
1955
1955
|
items: l,
|
1956
1956
|
magnetic: !1,
|
1957
1957
|
static: !1
|
@@ -1973,25 +1973,25 @@ function Ji(t) {
|
|
1973
1973
|
}), H = c.subscribe(async (p) => {
|
1974
1974
|
var h;
|
1975
1975
|
if (p.key === xi) {
|
1976
|
-
const l = Z(t.getState()),
|
1976
|
+
const l = Z(t.getState()), b = (h = p.value) == null ? void 0 : h.options.time;
|
1977
1977
|
if (l.activeIds.length === 1) {
|
1978
1978
|
const v = l.activeIds[0], _ = l.trackItemsMap[v];
|
1979
|
-
if (
|
1979
|
+
if (b >= _.display.to || b <= _.display.from)
|
1980
1980
|
return;
|
1981
|
-
const y = l.trackItemDetailsMap[v],
|
1981
|
+
const y = l.trackItemDetailsMap[v], g = Fn(), j = {
|
1982
1982
|
..._,
|
1983
|
-
id:
|
1983
|
+
id: g,
|
1984
1984
|
display: {
|
1985
|
-
from:
|
1985
|
+
from: b,
|
1986
1986
|
to: _.display.to
|
1987
1987
|
},
|
1988
1988
|
trim: {
|
1989
|
-
from:
|
1989
|
+
from: b,
|
1990
1990
|
to: _.display.to
|
1991
1991
|
}
|
1992
1992
|
};
|
1993
|
-
l.trackItemsMap[v].display.to =
|
1994
|
-
|
1993
|
+
l.trackItemsMap[v].display.to = b, l.trackItemsMap[g] = j, l.trackItemIds.push(g), l.trackItemDetailsMap[g] = y, l.tracks.forEach((O) => {
|
1994
|
+
O.items.includes(v) && O.items.push(g);
|
1995
1995
|
}), t.updateState(
|
1996
1996
|
{
|
1997
1997
|
trackItemDetailsMap: l.trackItemDetailsMap,
|
@@ -2010,26 +2010,26 @@ function Ji(t) {
|
|
2010
2010
|
if (p.key === Mi) {
|
2011
2011
|
const l = Z(t.getState());
|
2012
2012
|
if (l.activeIds.length) {
|
2013
|
-
const
|
2014
|
-
activeIds:
|
2013
|
+
const b = l.activeIds, v = [], _ = {
|
2014
|
+
activeIds: b,
|
2015
2015
|
trackItemDetailsMap: {},
|
2016
2016
|
trackItemsMap: {},
|
2017
2017
|
tracks: []
|
2018
2018
|
};
|
2019
|
-
|
2020
|
-
_.trackItemDetailsMap[
|
2021
|
-
l.tracks.find((j) => j.items.includes(
|
2019
|
+
b.forEach((g) => {
|
2020
|
+
_.trackItemDetailsMap[g] = l.trackItemDetailsMap[g], _.trackItemsMap[g] = l.trackItemsMap[g], v.push(
|
2021
|
+
l.tracks.find((j) => j.items.includes(g))
|
2022
2022
|
);
|
2023
2023
|
});
|
2024
2024
|
const y = /* @__PURE__ */ new Set();
|
2025
|
-
v.filter((
|
2025
|
+
v.filter((g) => y.has(g.id) ? !1 : (y.add(g), !0)), _.tracks = Array.from(y.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
|
2026
2026
|
}
|
2027
2027
|
}
|
2028
2028
|
if (p.key === Pi) {
|
2029
2029
|
const l = localStorage.getItem("DesignComboTemp");
|
2030
2030
|
if (!l) return;
|
2031
|
-
const
|
2032
|
-
const S =
|
2031
|
+
const b = Z(t.getState()), v = JSON.parse(l), _ = {}, y = v.trackItemsMap, g = v.trackItemDetailsMap, j = v.tracks, O = [], I = v.activeIds.map(async (P) => {
|
2032
|
+
const S = g[P];
|
2033
2033
|
(S.type === "caption" || S.type === "text") && S.details.fontUrl && await gn([
|
2034
2034
|
{
|
2035
2035
|
fontFamily: S.details.fontFamily,
|
@@ -2037,24 +2037,24 @@ function Ji(t) {
|
|
2037
2037
|
}
|
2038
2038
|
]);
|
2039
2039
|
const T = Fn();
|
2040
|
-
return _[P] = T,
|
2040
|
+
return _[P] = T, b.trackItemsMap[T] = {
|
2041
2041
|
...y[P],
|
2042
2042
|
id: T
|
2043
|
-
},
|
2043
|
+
}, b.trackItemDetailsMap[T] = S, b.trackItemIds.push(T), !0;
|
2044
2044
|
});
|
2045
2045
|
await Promise.all(I), j.forEach((P) => {
|
2046
|
-
const S = P.items.map((
|
2046
|
+
const S = P.items.map((E) => _[E]), T = {
|
2047
2047
|
...P,
|
2048
2048
|
items: S,
|
2049
2049
|
id: ln()
|
2050
2050
|
};
|
2051
|
-
|
2052
|
-
}),
|
2051
|
+
O.push(T);
|
2052
|
+
}), b.tracks = [...b.tracks, ...O], t.updateState(
|
2053
2053
|
{
|
2054
|
-
trackItemDetailsMap:
|
2055
|
-
tracks:
|
2056
|
-
trackItemIds:
|
2057
|
-
trackItemsMap:
|
2054
|
+
trackItemDetailsMap: b.trackItemDetailsMap,
|
2055
|
+
tracks: b.tracks,
|
2056
|
+
trackItemIds: b.trackItemIds,
|
2057
|
+
trackItemsMap: b.trackItemsMap
|
2058
2058
|
},
|
2059
2059
|
{
|
2060
2060
|
updateHistory: !0,
|
@@ -2062,17 +2062,18 @@ function Ji(t) {
|
|
2062
2062
|
}
|
2063
2063
|
);
|
2064
2064
|
}
|
2065
|
-
}),
|
2065
|
+
}), m = f.subscribe((p) => {
|
2066
2066
|
var h, l;
|
2067
2067
|
if (p.key === Di) {
|
2068
|
-
const
|
2068
|
+
const b = Z(t.getState()), v = b.trackItemDetailsMap, _ = b.trackItemsMap, y = Object.keys((h = p.value) == null ? void 0 : h.payload);
|
2069
2069
|
if (!y.length) return;
|
2070
|
-
const
|
2071
|
-
y.forEach((
|
2072
|
-
|
2073
|
-
|
2074
|
-
...
|
2075
|
-
|
2070
|
+
const g = (l = p.value) == null ? void 0 : l.payload;
|
2071
|
+
y.forEach((O) => {
|
2072
|
+
const I = g[O];
|
2073
|
+
I.details ? v[O].details = {
|
2074
|
+
...v[O].details,
|
2075
|
+
...I.details
|
2076
|
+
} : I.playbackRate && (_[O].playbackRate = I.playbackRate);
|
2076
2077
|
});
|
2077
2078
|
const j = Ve(_);
|
2078
2079
|
t.updateState(
|
@@ -2090,7 +2091,7 @@ function Ji(t) {
|
|
2090
2091
|
});
|
2091
2092
|
return {
|
2092
2093
|
unsubscribe: () => {
|
2093
|
-
k.unsubscribe(), H.unsubscribe(),
|
2094
|
+
k.unsubscribe(), H.unsubscribe(), m.unsubscribe(), x.unsubscribe(), F.unsubscribe(), d.unsubscribe();
|
2094
2095
|
}
|
2095
2096
|
};
|
2096
2097
|
}
|
@@ -2109,15 +2110,15 @@ function ni(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2109
2110
|
});
|
2110
2111
|
continue;
|
2111
2112
|
}
|
2112
|
-
const
|
2113
|
-
if (k &&
|
2114
|
-
const h = ni(k,
|
2113
|
+
const m = r[F], p = typeof k == "object" && typeof m == "object" && Array.isArray(k) === Array.isArray(m);
|
2114
|
+
if (k && m && p && !Zi[(x = (d = Object.getPrototypeOf(k)) == null ? void 0 : d.constructor) == null ? void 0 : x.name] && (!n.cyclesFix || !i.includes(k))) {
|
2115
|
+
const h = ni(k, m, n, n.cyclesFix ? i.concat([k]) : []);
|
2115
2116
|
s.push.apply(s, h.map((l) => (l.path.unshift(H), l)));
|
2116
|
-
} else k !==
|
2117
|
-
!(Number.isNaN(k) && Number.isNaN(
|
2117
|
+
} else k !== m && // treat NaN values as equivalent
|
2118
|
+
!(Number.isNaN(k) && Number.isNaN(m)) && !(p && (isNaN(k) ? k + "" == m + "" : +k == +m)) && s.push({
|
2118
2119
|
path: [H],
|
2119
2120
|
type: "CHANGE",
|
2120
|
-
value:
|
2121
|
+
value: m,
|
2121
2122
|
oldValue: k
|
2122
2123
|
});
|
2123
2124
|
}
|
@@ -2592,117 +2593,117 @@ function ui(t) {
|
|
2592
2593
|
function Ln() {
|
2593
2594
|
process.env.NODE_ENV !== "production" && ii.push(
|
2594
2595
|
'Sets cannot have "replace" patches.',
|
2595
|
-
function(
|
2596
|
-
return "Unsupported patch operation: " +
|
2596
|
+
function(m) {
|
2597
|
+
return "Unsupported patch operation: " + m;
|
2597
2598
|
},
|
2598
|
-
function(
|
2599
|
-
return "Cannot apply patch, path doesn't resolve: " +
|
2599
|
+
function(m) {
|
2600
|
+
return "Cannot apply patch, path doesn't resolve: " + m;
|
2600
2601
|
},
|
2601
2602
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
2602
2603
|
);
|
2603
2604
|
const r = "replace", n = "add", i = "remove";
|
2604
|
-
function s(
|
2605
|
-
switch (
|
2605
|
+
function s(m, p, h, l) {
|
2606
|
+
switch (m.type_) {
|
2606
2607
|
case 0:
|
2607
2608
|
case 2:
|
2608
2609
|
return f(
|
2609
|
-
|
2610
|
+
m,
|
2610
2611
|
p,
|
2611
2612
|
h,
|
2612
2613
|
l
|
2613
2614
|
);
|
2614
2615
|
case 1:
|
2615
|
-
return c(
|
2616
|
+
return c(m, p, h, l);
|
2616
2617
|
case 3:
|
2617
2618
|
return d(
|
2618
|
-
|
2619
|
+
m,
|
2619
2620
|
p,
|
2620
2621
|
h,
|
2621
2622
|
l
|
2622
2623
|
);
|
2623
2624
|
}
|
2624
2625
|
}
|
2625
|
-
function c(
|
2626
|
-
let { base_:
|
2627
|
-
_.length <
|
2628
|
-
for (let y = 0; y <
|
2629
|
-
if (v[y] && _[y] !==
|
2630
|
-
const
|
2626
|
+
function c(m, p, h, l) {
|
2627
|
+
let { base_: b, assigned_: v } = m, _ = m.copy_;
|
2628
|
+
_.length < b.length && ([b, _] = [_, b], [h, l] = [l, h]);
|
2629
|
+
for (let y = 0; y < b.length; y++)
|
2630
|
+
if (v[y] && _[y] !== b[y]) {
|
2631
|
+
const g = p.concat([y]);
|
2631
2632
|
h.push({
|
2632
2633
|
op: r,
|
2633
|
-
path:
|
2634
|
+
path: g,
|
2634
2635
|
// Need to maybe clone it, as it can in fact be the original value
|
2635
2636
|
// due to the base/copy inversion at the start of this function
|
2636
2637
|
value: H(_[y])
|
2637
2638
|
}), l.push({
|
2638
2639
|
op: r,
|
2639
|
-
path:
|
2640
|
-
value: H(
|
2640
|
+
path: g,
|
2641
|
+
value: H(b[y])
|
2641
2642
|
});
|
2642
2643
|
}
|
2643
|
-
for (let y =
|
2644
|
-
const
|
2644
|
+
for (let y = b.length; y < _.length; y++) {
|
2645
|
+
const g = p.concat([y]);
|
2645
2646
|
h.push({
|
2646
2647
|
op: n,
|
2647
|
-
path:
|
2648
|
+
path: g,
|
2648
2649
|
// Need to maybe clone it, as it can in fact be the original value
|
2649
2650
|
// due to the base/copy inversion at the start of this function
|
2650
2651
|
value: H(_[y])
|
2651
2652
|
});
|
2652
2653
|
}
|
2653
|
-
for (let y = _.length - 1;
|
2654
|
-
const
|
2654
|
+
for (let y = _.length - 1; b.length <= y; --y) {
|
2655
|
+
const g = p.concat([y]);
|
2655
2656
|
l.push({
|
2656
2657
|
op: i,
|
2657
|
-
path:
|
2658
|
+
path: g
|
2658
2659
|
});
|
2659
2660
|
}
|
2660
2661
|
}
|
2661
|
-
function f(
|
2662
|
-
const { base_:
|
2663
|
-
de(
|
2664
|
-
const
|
2665
|
-
if (
|
2662
|
+
function f(m, p, h, l) {
|
2663
|
+
const { base_: b, copy_: v } = m;
|
2664
|
+
de(m.assigned_, (_, y) => {
|
2665
|
+
const g = tn(b, _), j = tn(v, _), O = y ? he(b, _) ? r : n : i;
|
2666
|
+
if (g === j && O === r)
|
2666
2667
|
return;
|
2667
2668
|
const I = p.concat(_);
|
2668
|
-
h.push(
|
2669
|
-
|
2669
|
+
h.push(O === i ? { op: O, path: I } : { op: O, path: I, value: j }), l.push(
|
2670
|
+
O === n ? { op: i, path: I } : O === i ? { op: n, path: I, value: H(g) } : { op: r, path: I, value: H(g) }
|
2670
2671
|
);
|
2671
2672
|
});
|
2672
2673
|
}
|
2673
|
-
function d(
|
2674
|
-
let { base_:
|
2675
|
-
|
2674
|
+
function d(m, p, h, l) {
|
2675
|
+
let { base_: b, copy_: v } = m, _ = 0;
|
2676
|
+
b.forEach((y) => {
|
2676
2677
|
if (!v.has(y)) {
|
2677
|
-
const
|
2678
|
+
const g = p.concat([_]);
|
2678
2679
|
h.push({
|
2679
2680
|
op: i,
|
2680
|
-
path:
|
2681
|
+
path: g,
|
2681
2682
|
value: y
|
2682
2683
|
}), l.unshift({
|
2683
2684
|
op: n,
|
2684
|
-
path:
|
2685
|
+
path: g,
|
2685
2686
|
value: y
|
2686
2687
|
});
|
2687
2688
|
}
|
2688
2689
|
_++;
|
2689
2690
|
}), _ = 0, v.forEach((y) => {
|
2690
|
-
if (!
|
2691
|
-
const
|
2691
|
+
if (!b.has(y)) {
|
2692
|
+
const g = p.concat([_]);
|
2692
2693
|
h.push({
|
2693
2694
|
op: n,
|
2694
|
-
path:
|
2695
|
+
path: g,
|
2695
2696
|
value: y
|
2696
2697
|
}), l.unshift({
|
2697
2698
|
op: i,
|
2698
|
-
path:
|
2699
|
+
path: g,
|
2699
2700
|
value: y
|
2700
2701
|
});
|
2701
2702
|
}
|
2702
2703
|
_++;
|
2703
2704
|
});
|
2704
2705
|
}
|
2705
|
-
function x(
|
2706
|
+
function x(m, p, h, l) {
|
2706
2707
|
h.push({
|
2707
2708
|
op: r,
|
2708
2709
|
path: [],
|
@@ -2710,74 +2711,74 @@ function Ln() {
|
|
2710
2711
|
}), l.push({
|
2711
2712
|
op: r,
|
2712
2713
|
path: [],
|
2713
|
-
value:
|
2714
|
+
value: m
|
2714
2715
|
});
|
2715
2716
|
}
|
2716
|
-
function F(
|
2717
|
+
function F(m, p) {
|
2717
2718
|
return p.forEach((h) => {
|
2718
|
-
const { path: l, op:
|
2719
|
-
let v =
|
2719
|
+
const { path: l, op: b } = h;
|
2720
|
+
let v = m;
|
2720
2721
|
for (let j = 0; j < l.length - 1; j++) {
|
2721
|
-
const
|
2722
|
+
const O = Dt(v);
|
2722
2723
|
let I = l[j];
|
2723
|
-
typeof I != "string" && typeof I != "number" && (I = "" + I), (
|
2724
|
+
typeof I != "string" && typeof I != "number" && (I = "" + I), (O === 0 || O === 1) && (I === "__proto__" || I === "constructor") && G(19), typeof v == "function" && I === "prototype" && G(19), v = tn(v, I), typeof v != "object" && G(18, l.join("/"));
|
2724
2725
|
}
|
2725
|
-
const _ = Dt(v), y = k(h.value),
|
2726
|
-
switch (
|
2726
|
+
const _ = Dt(v), y = k(h.value), g = l[l.length - 1];
|
2727
|
+
switch (b) {
|
2727
2728
|
case r:
|
2728
2729
|
switch (_) {
|
2729
2730
|
case 2:
|
2730
|
-
return v.set(
|
2731
|
+
return v.set(g, y);
|
2731
2732
|
case 3:
|
2732
2733
|
G(16);
|
2733
2734
|
default:
|
2734
|
-
return v[
|
2735
|
+
return v[g] = y;
|
2735
2736
|
}
|
2736
2737
|
case n:
|
2737
2738
|
switch (_) {
|
2738
2739
|
case 1:
|
2739
|
-
return
|
2740
|
+
return g === "-" ? v.push(y) : v.splice(g, 0, y);
|
2740
2741
|
case 2:
|
2741
|
-
return v.set(
|
2742
|
+
return v.set(g, y);
|
2742
2743
|
case 3:
|
2743
2744
|
return v.add(y);
|
2744
2745
|
default:
|
2745
|
-
return v[
|
2746
|
+
return v[g] = y;
|
2746
2747
|
}
|
2747
2748
|
case i:
|
2748
2749
|
switch (_) {
|
2749
2750
|
case 1:
|
2750
|
-
return v.splice(
|
2751
|
+
return v.splice(g, 1);
|
2751
2752
|
case 2:
|
2752
|
-
return v.delete(
|
2753
|
+
return v.delete(g);
|
2753
2754
|
case 3:
|
2754
2755
|
return v.delete(h.value);
|
2755
2756
|
default:
|
2756
|
-
return delete v[
|
2757
|
+
return delete v[g];
|
2757
2758
|
}
|
2758
2759
|
default:
|
2759
|
-
G(17,
|
2760
|
+
G(17, b);
|
2760
2761
|
}
|
2761
|
-
}),
|
2762
|
-
}
|
2763
|
-
function k(
|
2764
|
-
if (!vt(
|
2765
|
-
return
|
2766
|
-
if (Array.isArray(
|
2767
|
-
return
|
2768
|
-
if (_e(
|
2762
|
+
}), m;
|
2763
|
+
}
|
2764
|
+
function k(m) {
|
2765
|
+
if (!vt(m))
|
2766
|
+
return m;
|
2767
|
+
if (Array.isArray(m))
|
2768
|
+
return m.map(k);
|
2769
|
+
if (_e(m))
|
2769
2770
|
return new Map(
|
2770
|
-
Array.from(
|
2771
|
+
Array.from(m.entries()).map(([h, l]) => [h, k(l)])
|
2771
2772
|
);
|
2772
|
-
if (ve(
|
2773
|
-
return new Set(Array.from(
|
2774
|
-
const p = Object.create(Mt(
|
2775
|
-
for (const h in
|
2776
|
-
p[h] = k(
|
2777
|
-
return he(
|
2773
|
+
if (ve(m))
|
2774
|
+
return new Set(Array.from(m).map(k));
|
2775
|
+
const p = Object.create(Mt(m));
|
2776
|
+
for (const h in m)
|
2777
|
+
p[h] = k(m[h]);
|
2778
|
+
return he(m, pe) && (p[pe] = m[pe]), p;
|
2778
2779
|
}
|
2779
|
-
function H(
|
2780
|
-
return Pt(
|
2780
|
+
function H(m) {
|
2781
|
+
return Pt(m) ? k(m) : m;
|
2781
2782
|
}
|
2782
2783
|
ra("Patches", {
|
2783
2784
|
applyPatches_: F,
|
@@ -3045,49 +3046,49 @@ class $a {
|
|
3045
3046
|
transitionIds: d,
|
3046
3047
|
transitionsMap: x,
|
3047
3048
|
trackItemsMap: F
|
3048
|
-
}), H = [],
|
3049
|
+
}), H = [], m = [], p = [], h = [], l = [], b = [];
|
3049
3050
|
n.forEach((T) => {
|
3050
|
-
let
|
3051
|
+
let E;
|
3051
3052
|
const M = T.path.slice(1);
|
3052
|
-
T.type === "CREATE" ?
|
3053
|
+
T.type === "CREATE" ? E = {
|
3053
3054
|
path: M,
|
3054
3055
|
op: "remove",
|
3055
3056
|
value: T.value
|
3056
|
-
} : T.type === "CHANGE" ?
|
3057
|
+
} : T.type === "CHANGE" ? E = {
|
3057
3058
|
path: M,
|
3058
3059
|
op: "replace",
|
3059
3060
|
value: T.oldValue
|
3060
|
-
} :
|
3061
|
+
} : E = {
|
3061
3062
|
path: M,
|
3062
3063
|
op: "add",
|
3063
3064
|
value: T.oldValue
|
3064
|
-
}, T.path.includes("trackItemIds") ? p.push(
|
3065
|
+
}, T.path.includes("trackItemIds") ? p.push(E) : T.path.includes("transitionIds") ? m.push(E) : T.path.includes("trackItemsMap") ? l.push(E) : T.path.includes("transitionsMap") ? h.push(E) : T.path.includes("tracks") ? H.push(E) : T.path.includes("trackItemDetailsMap") && b.push(E);
|
3065
3066
|
});
|
3066
3067
|
const v = this.applyPatch(
|
3067
3068
|
k.tracks,
|
3068
3069
|
H
|
3069
3070
|
), _ = this.applyPatch(
|
3070
3071
|
k.transitionIds,
|
3071
|
-
|
3072
|
+
m
|
3072
3073
|
), y = this.applyPatch(
|
3073
3074
|
k.trackItemIds,
|
3074
3075
|
p
|
3075
|
-
),
|
3076
|
+
), g = this.applyPatch(
|
3076
3077
|
k.transitionsMap,
|
3077
3078
|
h
|
3078
3079
|
), j = this.applyPatch(
|
3079
3080
|
k.trackItemsMap,
|
3080
3081
|
l
|
3081
|
-
),
|
3082
|
+
), O = this.applyPatch(
|
3082
3083
|
k.trackItemDetailsMap,
|
3083
|
-
|
3084
|
+
b
|
3084
3085
|
), I = Z({
|
3085
3086
|
tracks: v,
|
3086
3087
|
transitionIds: _,
|
3087
3088
|
trackItemIds: y,
|
3088
|
-
transitionsMap:
|
3089
|
+
transitionsMap: g,
|
3089
3090
|
trackItemsMap: j,
|
3090
|
-
trackItemDetailsMap:
|
3091
|
+
trackItemDetailsMap: O
|
3091
3092
|
}), P = Z(this.getState()), S = { ...P, ...I };
|
3092
3093
|
this.prevState = P, this.redos.push({ redos: n, type: i }), this.stateSubject.next(S), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3093
3094
|
}
|
@@ -3114,49 +3115,49 @@ class $a {
|
|
3114
3115
|
transitionIds: d,
|
3115
3116
|
transitionsMap: x,
|
3116
3117
|
trackItemsMap: F
|
3117
|
-
}), H = [],
|
3118
|
+
}), H = [], m = [], p = [], h = [], l = [], b = [];
|
3118
3119
|
n.forEach((T) => {
|
3119
|
-
let
|
3120
|
+
let E;
|
3120
3121
|
const M = T.path.slice(1);
|
3121
|
-
T.type === "CREATE" ?
|
3122
|
+
T.type === "CREATE" ? E = {
|
3122
3123
|
path: M,
|
3123
3124
|
op: "add",
|
3124
3125
|
value: T.value
|
3125
|
-
} : T.type === "CHANGE" ?
|
3126
|
+
} : T.type === "CHANGE" ? E = {
|
3126
3127
|
path: M,
|
3127
3128
|
op: "replace",
|
3128
3129
|
value: T.value
|
3129
|
-
} :
|
3130
|
+
} : E = {
|
3130
3131
|
path: M,
|
3131
3132
|
op: "remove",
|
3132
3133
|
value: T.oldValue
|
3133
|
-
}, T.path.includes("trackItemIds") ? p.push(
|
3134
|
+
}, T.path.includes("trackItemIds") ? p.push(E) : T.path.includes("transitionIds") ? m.push(E) : T.path.includes("trackItemsMap") ? l.push(E) : T.path.includes("transitionsMap") ? h.push(E) : T.path.includes("trackItemDetailsMap") ? b.push(E) : H.push(E);
|
3134
3135
|
});
|
3135
3136
|
const v = this.applyPatch(
|
3136
3137
|
k.tracks,
|
3137
3138
|
H
|
3138
3139
|
), _ = this.applyPatch(
|
3139
3140
|
k.transitionIds,
|
3140
|
-
|
3141
|
+
m
|
3141
3142
|
), y = this.applyPatch(
|
3142
3143
|
k.trackItemIds,
|
3143
3144
|
p
|
3144
|
-
),
|
3145
|
+
), g = this.applyPatch(
|
3145
3146
|
k.transitionsMap,
|
3146
3147
|
h
|
3147
3148
|
), j = this.applyPatch(
|
3148
3149
|
k.trackItemsMap,
|
3149
3150
|
l
|
3150
|
-
),
|
3151
|
+
), O = this.applyPatch(
|
3151
3152
|
k.trackItemDetailsMap,
|
3152
|
-
|
3153
|
+
b
|
3153
3154
|
), I = Z({
|
3154
3155
|
tracks: v,
|
3155
3156
|
transitionIds: _,
|
3156
3157
|
trackItemIds: y,
|
3157
|
-
transitionsMap:
|
3158
|
+
transitionsMap: g,
|
3158
3159
|
trackItemsMap: j,
|
3159
|
-
trackItemDetailsMap:
|
3160
|
+
trackItemDetailsMap: O
|
3160
3161
|
}), P = Z(this.getState()), S = { ...P, ...I };
|
3161
3162
|
this.prevState = P, this.undos.push({ undos: n, type: i }), this.stateSubject.next(S), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3162
3163
|
}
|