@cliquify.me/state 3.1.22 → 3.1.23
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 +144 -142
- package/dist/index.umd.js +1 -1
- package/dist/utils/load-item.d.ts +2 -0
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -87,8 +87,8 @@ var kr = function() {
|
|
|
87
87
|
if (this._parentage = null, Array.isArray(l))
|
|
88
88
|
try {
|
|
89
89
|
for (var f = yn(l), I = f.next(); !I.done; I = f.next()) {
|
|
90
|
-
var
|
|
91
|
-
|
|
90
|
+
var S = I.value;
|
|
91
|
+
S.remove(this);
|
|
92
92
|
}
|
|
93
93
|
} catch (u) {
|
|
94
94
|
e = { error: u };
|
|
@@ -387,8 +387,8 @@ var Us = ss(function(t) {
|
|
|
387
387
|
var I = f.value;
|
|
388
388
|
I.next(r);
|
|
389
389
|
}
|
|
390
|
-
} catch (
|
|
391
|
-
a = { error:
|
|
390
|
+
} catch (S) {
|
|
391
|
+
a = { error: S };
|
|
392
392
|
} finally {
|
|
393
393
|
try {
|
|
394
394
|
f && !f.done && (c = l.return) && c.call(l);
|
|
@@ -492,8 +492,8 @@ function xn(t) {
|
|
|
492
492
|
var gr = { exports: {} };
|
|
493
493
|
gr.exports;
|
|
494
494
|
(function(t, e) {
|
|
495
|
-
var r = 200, s = "__lodash_hash_undefined__", a = 1, c = 2, l = 9007199254740991, f = "[object Arguments]", I = "[object Array]",
|
|
496
|
-
A[L] = A[R] = A[$] = A[V] = A[St] = A[xt] = A[Dt] = A[U] = A[Rt] = !0, A[f] = A[I] = A[x] = A[M] = A[H] = A[E] = A[y] = A[T] = A[u] = A[d] = A[
|
|
495
|
+
var r = 200, s = "__lodash_hash_undefined__", a = 1, c = 2, l = 9007199254740991, f = "[object Arguments]", I = "[object Array]", S = "[object AsyncFunction]", M = "[object Boolean]", E = "[object Date]", y = "[object Error]", T = "[object Function]", C = "[object GeneratorFunction]", u = "[object Map]", d = "[object Number]", w = "[object Null]", k = "[object Object]", b = "[object Promise]", m = "[object Proxy]", v = "[object RegExp]", h = "[object Set]", _ = "[object String]", D = "[object Symbol]", g = "[object Undefined]", O = "[object WeakMap]", x = "[object ArrayBuffer]", H = "[object DataView]", L = "[object Float32Array]", R = "[object Float64Array]", $ = "[object Int8Array]", V = "[object Int16Array]", St = "[object Int32Array]", xt = "[object Uint8Array]", Dt = "[object Uint8ClampedArray]", U = "[object Uint16Array]", Rt = "[object Uint32Array]", Mt = /[\\^$.*+?()[\]{}|]/g, ot = /^\[object .+?Constructor\]$/, zt = /^(?:0|[1-9]\d*)$/, A = {};
|
|
496
|
+
A[L] = A[R] = A[$] = A[V] = A[St] = A[xt] = A[Dt] = A[U] = A[Rt] = !0, A[f] = A[I] = A[x] = A[M] = A[H] = A[E] = A[y] = A[T] = A[u] = A[d] = A[k] = A[v] = A[h] = A[_] = A[O] = !1;
|
|
497
497
|
var Z = typeof wt == "object" && wt && wt.Object === Object && wt, Et = typeof self == "object" && self && self.Object === Object && self, ct = Z || Et || Function("return this")(), Ft = e && !e.nodeType && e, Tt = Ft && !0 && t && !t.nodeType && t, Yt = Tt && Tt.exports === Ft, Bt = Yt && Z.process, ee = function() {
|
|
498
498
|
try {
|
|
499
499
|
return Bt && Bt.binding && Bt.binding("util");
|
|
@@ -717,8 +717,8 @@ gr.exports;
|
|
|
717
717
|
}
|
|
718
718
|
function Vr(n, i, o, p, N, P) {
|
|
719
719
|
var B = De(n), G = De(i), J = B ? I : Ct(n), X = G ? I : Ct(i);
|
|
720
|
-
J = J == f ?
|
|
721
|
-
var dt = J ==
|
|
720
|
+
J = J == f ? k : J, X = X == f ? k : X;
|
|
721
|
+
var dt = J == k, bt = X == k, Q = J == X;
|
|
722
722
|
if (Q && Oe(n)) {
|
|
723
723
|
if (!Oe(i))
|
|
724
724
|
return !1;
|
|
@@ -878,7 +878,7 @@ gr.exports;
|
|
|
878
878
|
}));
|
|
879
879
|
} : cn, Ct = ue;
|
|
880
880
|
(ze && Ct(new ze(new ArrayBuffer(1))) != H || ce && Ct(new ce()) != u || Fe && Ct(Fe.resolve()) != b || $e && Ct(new $e()) != h || Ne && Ct(new Ne()) != O) && (Ct = function(n) {
|
|
881
|
-
var i = ue(n), o = i ==
|
|
881
|
+
var i = ue(n), o = i == k ? n.constructor : void 0, p = o ? mt(o) : "";
|
|
882
882
|
if (p)
|
|
883
883
|
switch (p) {
|
|
884
884
|
case rr:
|
|
@@ -943,7 +943,7 @@ gr.exports;
|
|
|
943
943
|
if (!dr(n))
|
|
944
944
|
return !1;
|
|
945
945
|
var i = ue(n);
|
|
946
|
-
return i == T || i == C || i ==
|
|
946
|
+
return i == T || i == C || i == S || i == m;
|
|
947
947
|
}
|
|
948
948
|
function Ge(n) {
|
|
949
949
|
return typeof n == "number" && n > -1 && n % 1 == 0 && n <= l;
|
|
@@ -972,8 +972,8 @@ const tt = /* @__PURE__ */ xn(Ws), Aa = "add", Gs = "track", Ys = "trackItems",
|
|
|
972
972
|
var Ir = { exports: {} };
|
|
973
973
|
Ir.exports;
|
|
974
974
|
(function(t, e) {
|
|
975
|
-
var r = 200, s = "__lodash_hash_undefined__", a = 9007199254740991, c = "[object Arguments]", l = "[object Array]", f = "[object Boolean]", I = "[object Date]",
|
|
976
|
-
U[c] = U[l] = U[v] = U[h] = U[f] = U[I] = U[_] = U[D] = U[g] = U[O] = U[x] = U[y] = U[T] = U[C] = U[d] = U[w] = U[
|
|
975
|
+
var r = 200, s = "__lodash_hash_undefined__", a = 9007199254740991, c = "[object Arguments]", l = "[object Array]", f = "[object Boolean]", I = "[object Date]", S = "[object Error]", M = "[object Function]", E = "[object GeneratorFunction]", y = "[object Map]", T = "[object Number]", C = "[object Object]", u = "[object Promise]", d = "[object RegExp]", w = "[object Set]", k = "[object String]", b = "[object Symbol]", m = "[object WeakMap]", v = "[object ArrayBuffer]", h = "[object DataView]", _ = "[object Float32Array]", D = "[object Float64Array]", g = "[object Int8Array]", O = "[object Int16Array]", x = "[object Int32Array]", H = "[object Uint8Array]", L = "[object Uint8ClampedArray]", R = "[object Uint16Array]", $ = "[object Uint32Array]", V = /[\\^$.*+?()[\]{}|]/g, St = /\w*$/, xt = /^\[object .+?Constructor\]$/, Dt = /^(?:0|[1-9]\d*)$/, U = {};
|
|
976
|
+
U[c] = U[l] = U[v] = U[h] = U[f] = U[I] = U[_] = U[D] = U[g] = U[O] = U[x] = U[y] = U[T] = U[C] = U[d] = U[w] = U[k] = U[b] = U[H] = U[L] = U[R] = U[$] = !0, U[S] = U[M] = U[m] = !1;
|
|
977
977
|
var Rt = typeof wt == "object" && wt && wt.Object === Object && wt, Mt = typeof self == "object" && self && self.Object === Object && self, ot = Rt || Mt || Function("return this")(), zt = e && !e.nodeType && e, A = zt && !0 && t && !t.nodeType && t, Z = A && A.exports === zt;
|
|
978
978
|
function Et(n, i) {
|
|
979
979
|
return n.set(i[0], i[1]), n;
|
|
@@ -1335,7 +1335,7 @@ Ir.exports;
|
|
|
1335
1335
|
case y:
|
|
1336
1336
|
return ir(n, p, o);
|
|
1337
1337
|
case T:
|
|
1338
|
-
case
|
|
1338
|
+
case k:
|
|
1339
1339
|
return new N(n);
|
|
1340
1340
|
case d:
|
|
1341
1341
|
return ar(n);
|
|
@@ -1481,10 +1481,10 @@ function vi(t) {
|
|
|
1481
1481
|
}
|
|
1482
1482
|
return t = t.replace(e, (l, f) => a(f)), t = t.replace(
|
|
1483
1483
|
r,
|
|
1484
|
-
(l, f, I,
|
|
1484
|
+
(l, f, I, S) => c(+f, +I, +S)
|
|
1485
1485
|
), t = t.replace(
|
|
1486
1486
|
s,
|
|
1487
|
-
(l, f, I,
|
|
1487
|
+
(l, f, I, S) => c(+f, +I, +S)
|
|
1488
1488
|
), t;
|
|
1489
1489
|
}
|
|
1490
1490
|
function at(t) {
|
|
@@ -1522,8 +1522,8 @@ const _i = (t) => {
|
|
|
1522
1522
|
const e = `.${t.split(".").filter((c) => c.includes("fill:")).join(".")}`, r = {}, s = /\.([\w-]+)\s*\{\s*([^}]+)\s*\}/g;
|
|
1523
1523
|
let a;
|
|
1524
1524
|
for (; (a = s.exec(e)) !== null; ) {
|
|
1525
|
-
const c = a[1], l = a[2], f = {}, I = /fill\s*:\s*([^;]+);?/.exec(l),
|
|
1526
|
-
I && (f.fill = at(I[1].trim())),
|
|
1525
|
+
const c = a[1], l = a[2], f = {}, I = /fill\s*:\s*([^;]+);?/.exec(l), S = /stroke\s*:\s*([^;]+);?/.exec(l);
|
|
1526
|
+
I && (f.fill = at(I[1].trim())), S && (f.stroke = at(S[1].trim())), r[c] = f;
|
|
1527
1527
|
}
|
|
1528
1528
|
return r;
|
|
1529
1529
|
};
|
|
@@ -1539,12 +1539,12 @@ function dn(t) {
|
|
|
1539
1539
|
function ki(t, e, r = 300, s = 300) {
|
|
1540
1540
|
const a = [], l = new DOMParser().parseFromString(t, "image/svg+xml"), f = l.documentElement;
|
|
1541
1541
|
f.setAttribute("width", `${r}`), f.setAttribute("height", `${s}`);
|
|
1542
|
-
const I = f.querySelectorAll("style"),
|
|
1542
|
+
const I = f.querySelectorAll("style"), S = {};
|
|
1543
1543
|
I.forEach((u) => {
|
|
1544
1544
|
const d = u.textContent || "", w = _i(d);
|
|
1545
|
-
Object.assign(
|
|
1546
|
-
const
|
|
1547
|
-
u.textContent =
|
|
1545
|
+
Object.assign(S, w);
|
|
1546
|
+
const k = d.replace(/\.(st[\w-]+)/g, `.${e}-$1`).replace(/url\(#(.*?)\)/g, `url(#${e}-$1)`);
|
|
1547
|
+
u.textContent = k;
|
|
1548
1548
|
const b = Array.from(l.querySelectorAll("*")), m = /* @__PURE__ */ new Set();
|
|
1549
1549
|
b.forEach((v) => {
|
|
1550
1550
|
if (dn(v)) return;
|
|
@@ -1570,7 +1570,7 @@ function ki(t, e, r = 300, s = 300) {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
const _ = v.getAttribute("class");
|
|
1572
1572
|
_ && _.split(" ").forEach((D) => {
|
|
1573
|
-
const g =
|
|
1573
|
+
const g = S[D];
|
|
1574
1574
|
g != null && g.fill && !["none", "transparent"].includes(g.fill) && m.add(at(g.fill)), g != null && g.stroke && !["none", "transparent"].includes(g.stroke) && m.add(at(g.stroke));
|
|
1575
1575
|
});
|
|
1576
1576
|
}), Array.from(m).forEach((v) => {
|
|
@@ -1582,21 +1582,21 @@ function ki(t, e, r = 300, s = 300) {
|
|
|
1582
1582
|
if (dn(u)) return;
|
|
1583
1583
|
const d = u.getAttribute("class");
|
|
1584
1584
|
if (d) {
|
|
1585
|
-
const
|
|
1586
|
-
u.setAttribute("class",
|
|
1587
|
-
const m =
|
|
1585
|
+
const k = d.split(" ").map((b) => `${e}-${b}`).join(" ");
|
|
1586
|
+
u.setAttribute("class", k), k.split(" ").forEach((b) => {
|
|
1587
|
+
const m = S[b];
|
|
1588
1588
|
m != null && m.fill && !["none", "transparent"].includes(m.fill) && E.add(at(m.fill)), m != null && m.stroke && !["none", "transparent"].includes(m.stroke) && E.add(at(m.stroke));
|
|
1589
1589
|
});
|
|
1590
1590
|
}
|
|
1591
|
-
["fill", "stroke", "stop-color"].forEach((
|
|
1592
|
-
const b = u.getAttribute(
|
|
1591
|
+
["fill", "stroke", "stop-color"].forEach((k) => {
|
|
1592
|
+
const b = u.getAttribute(k);
|
|
1593
1593
|
b && !["none", "transparent"].includes(b) && E.add(at(b));
|
|
1594
1594
|
});
|
|
1595
1595
|
const w = u.getAttribute("style");
|
|
1596
1596
|
if (w) {
|
|
1597
|
-
const
|
|
1598
|
-
if (
|
|
1599
|
-
const v =
|
|
1597
|
+
const k = /fill\s*:\s*([^;]+);?/.exec(w), b = /stroke\s*:\s*([^;]+);?/.exec(w), m = /stop-color\s*:\s*([^;]+);?/.exec(w);
|
|
1598
|
+
if (k) {
|
|
1599
|
+
const v = k[1].trim();
|
|
1600
1600
|
v && !["none", "transparent"].includes(v) && E.add(at(v));
|
|
1601
1601
|
}
|
|
1602
1602
|
if (b) {
|
|
@@ -1770,12 +1770,12 @@ const hs = async (t, e) => {
|
|
|
1770
1770
|
e.size.width / s.width,
|
|
1771
1771
|
e.size.height / s.height
|
|
1772
1772
|
), c = ((E = t.details) == null ? void 0 : E.rotate) || 0, l = te(e, s), f = t.display;
|
|
1773
|
-
let I = 1 / 0,
|
|
1773
|
+
let I = 1 / 0, S = 0;
|
|
1774
1774
|
r.forEach((y) => {
|
|
1775
1775
|
const T = t.trackItemsMap[y];
|
|
1776
|
-
T.display.from < I && (I = T.display.from), T.display.to >
|
|
1776
|
+
T.display.from < I && (I = T.display.from), T.display.to > S && (S = T.display.to);
|
|
1777
1777
|
});
|
|
1778
|
-
const M = t.trim || t.display || { from: I, to:
|
|
1778
|
+
const M = t.trim || t.display || { from: I, to: S };
|
|
1779
1779
|
return {
|
|
1780
1780
|
id: t.id,
|
|
1781
1781
|
type: "template",
|
|
@@ -1789,7 +1789,7 @@ const hs = async (t, e) => {
|
|
|
1789
1789
|
rotate: c
|
|
1790
1790
|
},
|
|
1791
1791
|
trim: M,
|
|
1792
|
-
display: f || { from: I, to:
|
|
1792
|
+
display: f || { from: I, to: S },
|
|
1793
1793
|
activeEdit: !1
|
|
1794
1794
|
};
|
|
1795
1795
|
}, Si = async (t, e) => {
|
|
@@ -1801,10 +1801,10 @@ const hs = async (t, e) => {
|
|
|
1801
1801
|
e.size.width / s.width,
|
|
1802
1802
|
e.size.height / s.height
|
|
1803
1803
|
), c = ((M = t.details) == null ? void 0 : M.rotate) || 0, l = te(e, s), f = t.display;
|
|
1804
|
-
let I = 1 / 0,
|
|
1804
|
+
let I = 1 / 0, S = 0;
|
|
1805
1805
|
return r.forEach((E) => {
|
|
1806
1806
|
const y = t.trackItemsMap[E];
|
|
1807
|
-
y.display.from < I && (I = y.display.from), y.display.to >
|
|
1807
|
+
y.display.from < I && (I = y.display.from), y.display.to > S && (S = y.display.to);
|
|
1808
1808
|
}), {
|
|
1809
1809
|
id: t.id,
|
|
1810
1810
|
type: "composition",
|
|
@@ -1817,13 +1817,13 @@ const hs = async (t, e) => {
|
|
|
1817
1817
|
scale: a,
|
|
1818
1818
|
rotate: c
|
|
1819
1819
|
},
|
|
1820
|
-
display: f || { from: I, to:
|
|
1820
|
+
display: f || { from: I, to: S }
|
|
1821
1821
|
};
|
|
1822
1822
|
}, Gn = async (t, e) => {
|
|
1823
1823
|
const r = t.details, s = Pe(r.src), a = fetch(r.src), [c, l] = await Promise.all([
|
|
1824
1824
|
s,
|
|
1825
1825
|
a
|
|
1826
|
-
]), f = await l.text(), I = te(e, c), { serializer:
|
|
1826
|
+
]), f = await l.text(), I = te(e, c), { serializer: S, colors: M } = ki(
|
|
1827
1827
|
vi(f),
|
|
1828
1828
|
t.id,
|
|
1829
1829
|
parseFloat(r.width || c.width),
|
|
@@ -1862,8 +1862,8 @@ const hs = async (t, e) => {
|
|
|
1862
1862
|
flipY: r.flipY || !1,
|
|
1863
1863
|
rotate: r.rotate || "0deg",
|
|
1864
1864
|
visibility: r.visibility || "visible",
|
|
1865
|
-
svgString:
|
|
1866
|
-
initialSvgString: K(
|
|
1865
|
+
svgString: S,
|
|
1866
|
+
initialSvgString: K(S),
|
|
1867
1867
|
colorMap: E
|
|
1868
1868
|
},
|
|
1869
1869
|
metadata: t.metadata || {}
|
|
@@ -2125,10 +2125,10 @@ const xi = (t, e, r, s, a) => {
|
|
|
2125
2125
|
};
|
|
2126
2126
|
const l = c.items.map((I) => r[I]), f = t.map((I) => r[I]);
|
|
2127
2127
|
for (const I of l) {
|
|
2128
|
-
const
|
|
2128
|
+
const S = I.display.from, M = I.display.to;
|
|
2129
2129
|
for (const E of f) {
|
|
2130
2130
|
const y = E.display.from;
|
|
2131
|
-
if (!(E.display.to <=
|
|
2131
|
+
if (!(E.display.to <= S || y >= M))
|
|
2132
2132
|
return {
|
|
2133
2133
|
trackId: void 0,
|
|
2134
2134
|
trackIndex: e.indexOf(c)
|
|
@@ -2163,14 +2163,14 @@ const xi = (t, e, r, s, a) => {
|
|
|
2163
2163
|
};
|
|
2164
2164
|
}, Di = (t) => {
|
|
2165
2165
|
const { trackItemIds: e, transitionsMap: r, trackItemsMap: s } = t, a = /* @__PURE__ */ new Map();
|
|
2166
|
-
Object.values(r).forEach((
|
|
2166
|
+
Object.values(r).forEach((S) => {
|
|
2167
2167
|
var T, C;
|
|
2168
|
-
const { fromId: M, toId: E, kind: y } =
|
|
2169
|
-
y !== "none" && (a.has(M) || a.set(M, []), a.has(E) || a.set(E, []), (T = a.get(M)) == null || T.push(
|
|
2168
|
+
const { fromId: M, toId: E, kind: y } = S;
|
|
2169
|
+
y !== "none" && (a.has(M) || a.set(M, []), a.has(E) || a.set(E, []), (T = a.get(M)) == null || T.push(S), (C = a.get(E)) == null || C.push(S));
|
|
2170
2170
|
});
|
|
2171
|
-
const c = [], l = /* @__PURE__ */ new Set(), f = (
|
|
2171
|
+
const c = [], l = /* @__PURE__ */ new Set(), f = (S) => {
|
|
2172
2172
|
const M = [];
|
|
2173
|
-
let E =
|
|
2173
|
+
let E = S;
|
|
2174
2174
|
for (; E && !l.has(E); ) {
|
|
2175
2175
|
l.add(E);
|
|
2176
2176
|
const y = s[E];
|
|
@@ -2184,35 +2184,35 @@ const xi = (t, e, r, s, a) => {
|
|
|
2184
2184
|
}
|
|
2185
2185
|
return M;
|
|
2186
2186
|
}, I = Object.values(r).filter(
|
|
2187
|
-
(
|
|
2187
|
+
(S) => S.kind !== "none"
|
|
2188
2188
|
);
|
|
2189
|
-
for (const
|
|
2190
|
-
if (!l.has(
|
|
2191
|
-
const M = f(
|
|
2189
|
+
for (const S of e)
|
|
2190
|
+
if (!l.has(S) && (!a.has(S) || !I.some((M) => M.toId === S))) {
|
|
2191
|
+
const M = f(S);
|
|
2192
2192
|
M.length > 0 && c.push(M);
|
|
2193
2193
|
}
|
|
2194
|
-
return c.forEach((
|
|
2195
|
-
|
|
2196
|
-
}), c.filter((
|
|
2194
|
+
return c.forEach((S) => {
|
|
2195
|
+
S.sort((M, E) => "display" in M && "display" in E ? M.display.from - E.display.from : 0);
|
|
2196
|
+
}), c.filter((S) => S.filter((E) => E !== void 0).length > 0);
|
|
2197
2197
|
};
|
|
2198
2198
|
function Xn(t, e, r) {
|
|
2199
2199
|
t.forEach((s) => {
|
|
2200
2200
|
const l = Object.values(e).filter(
|
|
2201
|
-
(
|
|
2201
|
+
(S) => s.items.includes(S.id)
|
|
2202
2202
|
).sort(
|
|
2203
|
-
(
|
|
2204
|
-
).map((
|
|
2203
|
+
(S, M) => S.display.from - M.display.from
|
|
2204
|
+
).map((S) => S.id), f = Di({
|
|
2205
2205
|
trackItemIds: l,
|
|
2206
2206
|
transitionsMap: r,
|
|
2207
2207
|
trackItemsMap: e
|
|
2208
2208
|
});
|
|
2209
2209
|
let I = 0;
|
|
2210
|
-
l.forEach((
|
|
2210
|
+
l.forEach((S) => {
|
|
2211
2211
|
const M = [];
|
|
2212
2212
|
for (const y of f)
|
|
2213
|
-
if (y.find((T) => T.id ===
|
|
2213
|
+
if (y.find((T) => T.id === S)) {
|
|
2214
2214
|
const T = f.findIndex(
|
|
2215
|
-
(C) => C.find((u) => u.id ===
|
|
2215
|
+
(C) => C.find((u) => u.id === S)
|
|
2216
2216
|
);
|
|
2217
2217
|
if (T - 1 >= 0)
|
|
2218
2218
|
for (let C = T - 1; C >= 0; C--) {
|
|
@@ -2225,9 +2225,9 @@ function Xn(t, e, r) {
|
|
|
2225
2225
|
y.forEach((T) => {
|
|
2226
2226
|
T.type === "transition" && (E += T.duration);
|
|
2227
2227
|
});
|
|
2228
|
-
}), e[
|
|
2229
|
-
const y = e[
|
|
2230
|
-
e[
|
|
2228
|
+
}), e[S]) {
|
|
2229
|
+
const y = e[S].display.to - e[S].display.from;
|
|
2230
|
+
e[S].display = {
|
|
2231
2231
|
from: I - E,
|
|
2232
2232
|
to: I + y - E
|
|
2233
2233
|
}, I += y;
|
|
@@ -2248,13 +2248,13 @@ function Oi(t, e) {
|
|
|
2248
2248
|
function Ci(t) {
|
|
2249
2249
|
const e = t, r = e.tracks, s = e.trackItemsMap, a = [], c = {}, l = e.structure;
|
|
2250
2250
|
return r.forEach((f) => {
|
|
2251
|
-
var
|
|
2251
|
+
var S;
|
|
2252
2252
|
const I = f.items.map((M) => s[M]).sort((M, E) => M.display.from - E.display.from);
|
|
2253
2253
|
for (let M = 0; M < I.length - 1; M++) {
|
|
2254
2254
|
const E = I[M], y = I[M + 1];
|
|
2255
2255
|
if (Math.abs(E.display.to - y.display.from) <= 1) {
|
|
2256
2256
|
const T = `${E.id}-${y.id}`;
|
|
2257
|
-
if ((
|
|
2257
|
+
if ((S = e.transitionIds) == null ? void 0 : S.includes(T))
|
|
2258
2258
|
c[T] = e.transitionsMap[T];
|
|
2259
2259
|
else {
|
|
2260
2260
|
const u = {
|
|
@@ -2308,7 +2308,7 @@ function Ri(t) {
|
|
|
2308
2308
|
), I = e.subscribe(async (u) => {
|
|
2309
2309
|
var d, w;
|
|
2310
2310
|
if (u.key === Xs) {
|
|
2311
|
-
const
|
|
2311
|
+
const k = (d = u.value) == null ? void 0 : d.payload, b = k.trackItemsMap, m = k.trackItemDetailsMap;
|
|
2312
2312
|
console.warn("IMPROVE FONTS LOADING");
|
|
2313
2313
|
for (const h in m)
|
|
2314
2314
|
if (m[h].type === "text" || m[h].type === "caption") {
|
|
@@ -2334,7 +2334,7 @@ function Ri(t) {
|
|
|
2334
2334
|
const v = ye(b);
|
|
2335
2335
|
t.updateState(
|
|
2336
2336
|
{
|
|
2337
|
-
...
|
|
2337
|
+
...k,
|
|
2338
2338
|
duration: v
|
|
2339
2339
|
},
|
|
2340
2340
|
{
|
|
@@ -2344,10 +2344,10 @@ function Ri(t) {
|
|
|
2344
2344
|
);
|
|
2345
2345
|
}
|
|
2346
2346
|
if (u.key === Ks) {
|
|
2347
|
-
const
|
|
2347
|
+
const k = (w = u.value) == null ? void 0 : w.payload;
|
|
2348
2348
|
t.updateState(
|
|
2349
2349
|
{
|
|
2350
|
-
size:
|
|
2350
|
+
size: k
|
|
2351
2351
|
},
|
|
2352
2352
|
{
|
|
2353
2353
|
kind: "design:resize",
|
|
@@ -2355,7 +2355,7 @@ function Ri(t) {
|
|
|
2355
2355
|
}
|
|
2356
2356
|
);
|
|
2357
2357
|
}
|
|
2358
|
-
}),
|
|
2358
|
+
}), S = a.subscribe((u) => {
|
|
2359
2359
|
if (u.key === hi) return t.undo();
|
|
2360
2360
|
if (u.key === mi) return t.redo();
|
|
2361
2361
|
}), M = f.subscribe((u) => {
|
|
@@ -2373,9 +2373,9 @@ function Ri(t) {
|
|
|
2373
2373
|
);
|
|
2374
2374
|
}
|
|
2375
2375
|
}), E = s.subscribe(async (u) => {
|
|
2376
|
-
var w,
|
|
2376
|
+
var w, k, b, m, v;
|
|
2377
2377
|
const d = [];
|
|
2378
|
-
if ((w = u.value) != null && w.payload.trackItemIds && (d.push((
|
|
2378
|
+
if ((w = u.value) != null && w.payload.trackItemIds && (d.push((k = u.value) == null ? void 0 : k.payload.trackItemIds), t.updateState(
|
|
2379
2379
|
{ activeIds: d },
|
|
2380
2380
|
{
|
|
2381
2381
|
kind: "update",
|
|
@@ -2531,7 +2531,7 @@ function Ri(t) {
|
|
|
2531
2531
|
}
|
|
2532
2532
|
}), y = r.subscribe(async (u) => {
|
|
2533
2533
|
var O, x, H, L, R, $, V, St, xt, Dt, U, Rt, Mt, ot, zt, A, Z, Et, ct, Ft, Tt, Yt, Bt, ee, Xt, re, Kt, ne, Se, we, $t, Vt, se, ie, vt;
|
|
2534
|
-
const d = K(t.getState()), w = ((x = (O = u.value) == null ? void 0 : O.options) == null ? void 0 : x.isSelected) || !1,
|
|
2534
|
+
const d = K(t.getState()), w = ((x = (O = u.value) == null ? void 0 : O.options) == null ? void 0 : x.isSelected) || !1, k = (L = (H = u.value) == null ? void 0 : H.options) == null ? void 0 : L.scaleMode, b = ($ = (R = u.value) == null ? void 0 : R.options) == null ? void 0 : $.scaleAspectRatio, m = (St = (V = u.value) == null ? void 0 : V.options) == null ? void 0 : St.isNewTrack;
|
|
2535
2535
|
let v = [], h = "text";
|
|
2536
2536
|
const _ = (Dt = (xt = u.value) == null ? void 0 : xt.options) == null ? void 0 : Dt.trackId;
|
|
2537
2537
|
let D = (Rt = (U = u.value) == null ? void 0 : U.options) == null ? void 0 : Rt.trackIndex;
|
|
@@ -2543,7 +2543,9 @@ function Ri(t) {
|
|
|
2543
2543
|
if (u.key === si) {
|
|
2544
2544
|
const F = (ot = u.value) == null ? void 0 : ot.payload, j = F.trackItems.map(
|
|
2545
2545
|
(Y) => Mi(Y, {
|
|
2546
|
-
size: d.size
|
|
2546
|
+
size: d.size,
|
|
2547
|
+
scaleMode: k,
|
|
2548
|
+
scaleAspectRatio: b
|
|
2547
2549
|
})
|
|
2548
2550
|
), z = await Promise.all(j), nt = Ti(F.tracks, F.trackItems), rt = [];
|
|
2549
2551
|
F.trackItems.forEach((Y) => {
|
|
@@ -2671,7 +2673,7 @@ function Ri(t) {
|
|
|
2671
2673
|
h = "template";
|
|
2672
2674
|
const F = (ct = u.value) == null ? void 0 : ct.payload.trackItemsMap, j = (Ft = u.value) == null ? void 0 : Ft.payload.trackItemDetailsMap, z = (Tt = u.value) == null ? void 0 : Tt.payload.transitionsMap, nt = ((Yt = u.value) == null ? void 0 : Yt.payload.transitionIds) || [], rt = (Bt = u.value) == null ? void 0 : Bt.payload.trackItemIds, W = ((ee = u.value) == null ? void 0 : ee.payload.tracks) || [], { details: gt, ...q } = await ys((Xt = u.value) == null ? void 0 : Xt.payload, {
|
|
2673
2675
|
size: d.size,
|
|
2674
|
-
scaleMode:
|
|
2676
|
+
scaleMode: k,
|
|
2675
2677
|
scaleAspectRatio: b
|
|
2676
2678
|
}), Me = {
|
|
2677
2679
|
id: q.id,
|
|
@@ -2704,7 +2706,7 @@ function Ri(t) {
|
|
|
2704
2706
|
h = "illustration";
|
|
2705
2707
|
const F = await Gn((re = u.value) == null ? void 0 : re.payload, {
|
|
2706
2708
|
size: d.size,
|
|
2707
|
-
scaleMode:
|
|
2709
|
+
scaleMode: k,
|
|
2708
2710
|
scaleAspectRatio: b
|
|
2709
2711
|
}), { details: j, ...z } = F;
|
|
2710
2712
|
d.trackItemDetailsMap[z.id] = {
|
|
@@ -2716,7 +2718,7 @@ function Ri(t) {
|
|
|
2716
2718
|
h = "shape";
|
|
2717
2719
|
const F = await wi((Kt = u.value) == null ? void 0 : Kt.payload, {
|
|
2718
2720
|
size: d.size,
|
|
2719
|
-
scaleMode:
|
|
2721
|
+
scaleMode: k,
|
|
2720
2722
|
scaleAspectRatio: b
|
|
2721
2723
|
}), { details: j, ...z } = F;
|
|
2722
2724
|
d.trackItemDetailsMap[z.id] = {
|
|
@@ -2728,7 +2730,7 @@ function Ri(t) {
|
|
|
2728
2730
|
h = "image";
|
|
2729
2731
|
const F = await gs((ne = u.value) == null ? void 0 : ne.payload, {
|
|
2730
2732
|
size: d.size,
|
|
2731
|
-
scaleMode:
|
|
2733
|
+
scaleMode: k,
|
|
2732
2734
|
scaleAspectRatio: b
|
|
2733
2735
|
}), { details: j, ...z } = F;
|
|
2734
2736
|
d.trackItemDetailsMap[z.id] = {
|
|
@@ -2748,7 +2750,7 @@ function Ri(t) {
|
|
|
2748
2750
|
h = "video";
|
|
2749
2751
|
const F = await hs((we = u.value) == null ? void 0 : we.payload, {
|
|
2750
2752
|
size: d.size,
|
|
2751
|
-
scaleMode:
|
|
2753
|
+
scaleMode: k,
|
|
2752
2754
|
scaleAspectRatio: b
|
|
2753
2755
|
}), { details: j, ...z } = F;
|
|
2754
2756
|
d.trackItemDetailsMap[z.id] = {
|
|
@@ -2763,7 +2765,7 @@ function Ri(t) {
|
|
|
2763
2765
|
(vt = u.value) == null ? void 0 : vt.payload,
|
|
2764
2766
|
{
|
|
2765
2767
|
size: d.size,
|
|
2766
|
-
scaleMode:
|
|
2768
|
+
scaleMode: k,
|
|
2767
2769
|
scaleAspectRatio: b
|
|
2768
2770
|
}
|
|
2769
2771
|
), gt = {
|
|
@@ -2876,27 +2878,27 @@ function Ri(t) {
|
|
|
2876
2878
|
}), T = c.subscribe(async (u) => {
|
|
2877
2879
|
var d;
|
|
2878
2880
|
if (u.key === li) {
|
|
2879
|
-
const w = K(t.getState()),
|
|
2881
|
+
const w = K(t.getState()), k = (d = u.value) == null ? void 0 : d.options.time;
|
|
2880
2882
|
if (w.activeIds.length === 1) {
|
|
2881
2883
|
const b = w.activeIds[0], m = K(w.trackItemsMap[b]);
|
|
2882
|
-
if (
|
|
2884
|
+
if (k >= m.display.to || k <= m.display.from)
|
|
2883
2885
|
return;
|
|
2884
2886
|
const v = K(w.trackItemDetailsMap[b]), h = Ce(), _ = K({
|
|
2885
2887
|
...m,
|
|
2886
2888
|
display: {
|
|
2887
2889
|
from: m.display.from,
|
|
2888
|
-
to:
|
|
2890
|
+
to: k
|
|
2889
2891
|
}
|
|
2890
2892
|
}), D = K({
|
|
2891
2893
|
...m,
|
|
2892
2894
|
id: h,
|
|
2893
2895
|
display: {
|
|
2894
|
-
from:
|
|
2896
|
+
from: k,
|
|
2895
2897
|
to: m.display.to
|
|
2896
2898
|
}
|
|
2897
2899
|
});
|
|
2898
2900
|
if (m.type === "video" || m.type === "audio") {
|
|
2899
|
-
const g =
|
|
2901
|
+
const g = k - _.display.from;
|
|
2900
2902
|
_.trim = {
|
|
2901
2903
|
from: m.trim.from,
|
|
2902
2904
|
to: m.trim.from + g
|
|
@@ -2925,13 +2927,13 @@ function Ri(t) {
|
|
|
2925
2927
|
if (u.key === ui) {
|
|
2926
2928
|
const w = K(t.getState());
|
|
2927
2929
|
if (w.activeIds.length) {
|
|
2928
|
-
const
|
|
2929
|
-
activeIds:
|
|
2930
|
+
const k = w.activeIds, b = [], m = {
|
|
2931
|
+
activeIds: k,
|
|
2930
2932
|
trackItemDetailsMap: {},
|
|
2931
2933
|
trackItemsMap: {},
|
|
2932
2934
|
tracks: []
|
|
2933
2935
|
};
|
|
2934
|
-
|
|
2936
|
+
k.forEach((h) => {
|
|
2935
2937
|
m.trackItemDetailsMap[h] = w.trackItemDetailsMap[h], m.trackItemsMap[h] = w.trackItemsMap[h], b.push(
|
|
2936
2938
|
w.tracks.find((_) => _.items.includes(h))
|
|
2937
2939
|
);
|
|
@@ -2943,7 +2945,7 @@ function Ri(t) {
|
|
|
2943
2945
|
if (u.key === ci) {
|
|
2944
2946
|
const w = localStorage.getItem("DesignComboTemp");
|
|
2945
2947
|
if (!w) return;
|
|
2946
|
-
const
|
|
2948
|
+
const k = K(t.getState()), b = JSON.parse(w), m = {}, v = b.trackItemsMap, h = b.trackItemDetailsMap, _ = b.tracks, D = [], g = b.activeIds.map(async (O) => {
|
|
2947
2949
|
const x = h[O];
|
|
2948
2950
|
(x.type === "caption" || x.type === "text") && x.details.fontUrl && await br([
|
|
2949
2951
|
{
|
|
@@ -2952,10 +2954,10 @@ function Ri(t) {
|
|
|
2952
2954
|
}
|
|
2953
2955
|
]);
|
|
2954
2956
|
const H = Ce();
|
|
2955
|
-
return m[O] = H,
|
|
2957
|
+
return m[O] = H, k.trackItemsMap[H] = {
|
|
2956
2958
|
...v[O],
|
|
2957
2959
|
id: H
|
|
2958
|
-
},
|
|
2960
|
+
}, k.trackItemDetailsMap[H] = x, k.trackItemIds.push(H), !0;
|
|
2959
2961
|
});
|
|
2960
2962
|
await Promise.all(g), _.forEach((O) => {
|
|
2961
2963
|
const x = O.items.map((L) => m[L]), H = {
|
|
@@ -2966,12 +2968,12 @@ function Ri(t) {
|
|
|
2966
2968
|
id: Xe()
|
|
2967
2969
|
};
|
|
2968
2970
|
D.push(H);
|
|
2969
|
-
}),
|
|
2971
|
+
}), k.tracks = [...D, ...k.tracks], t.updateState(
|
|
2970
2972
|
{
|
|
2971
|
-
trackItemDetailsMap:
|
|
2972
|
-
tracks:
|
|
2973
|
-
trackItemIds:
|
|
2974
|
-
trackItemsMap:
|
|
2973
|
+
trackItemDetailsMap: k.trackItemDetailsMap,
|
|
2974
|
+
tracks: k.tracks,
|
|
2975
|
+
trackItemIds: k.trackItemIds,
|
|
2976
|
+
trackItemsMap: k.trackItemsMap
|
|
2975
2977
|
},
|
|
2976
2978
|
{
|
|
2977
2979
|
updateHistory: !0,
|
|
@@ -2980,7 +2982,7 @@ function Ri(t) {
|
|
|
2980
2982
|
);
|
|
2981
2983
|
}
|
|
2982
2984
|
}), C = l.subscribe(async (u) => {
|
|
2983
|
-
var d, w,
|
|
2985
|
+
var d, w, k;
|
|
2984
2986
|
if (u.key === ai) {
|
|
2985
2987
|
const b = K(t.getState()), m = b.trackItemDetailsMap, v = b.trackItemsMap, h = Object.keys((d = u.value) == null ? void 0 : d.payload);
|
|
2986
2988
|
if (!h.length) return;
|
|
@@ -3025,7 +3027,7 @@ function Ri(t) {
|
|
|
3025
3027
|
);
|
|
3026
3028
|
}
|
|
3027
3029
|
if (u.key === oi) {
|
|
3028
|
-
const b = (
|
|
3030
|
+
const b = (k = u.value) == null ? void 0 : k.payload, m = Object.keys(b)[0], v = Object.values(b)[0], h = K(t.getState()), _ = h.trackItemDetailsMap[m], D = _.details;
|
|
3029
3031
|
if (v.details) {
|
|
3030
3032
|
if (v.type === "image" && v.details.src) {
|
|
3031
3033
|
const O = await Pe(v.details.src), x = _.details.width || 0, H = _.details.height || 0;
|
|
@@ -3073,7 +3075,7 @@ function Ri(t) {
|
|
|
3073
3075
|
});
|
|
3074
3076
|
return {
|
|
3075
3077
|
unsubscribe: () => {
|
|
3076
|
-
y.unsubscribe(), T.unsubscribe(), C.unsubscribe(),
|
|
3078
|
+
y.unsubscribe(), T.unsubscribe(), C.unsubscribe(), S.unsubscribe(), E.unsubscribe(), I.unsubscribe(), M.unsubscribe();
|
|
3077
3079
|
}
|
|
3078
3080
|
};
|
|
3079
3081
|
}
|
|
@@ -3082,17 +3084,17 @@ function _s(t, e, r = { cyclesFix: !0 }, s = []) {
|
|
|
3082
3084
|
var f, I;
|
|
3083
3085
|
let a = [];
|
|
3084
3086
|
const c = Array.isArray(t);
|
|
3085
|
-
for (const
|
|
3086
|
-
const M = t[
|
|
3087
|
-
if (!(
|
|
3087
|
+
for (const S in t) {
|
|
3088
|
+
const M = t[S], E = c ? +S : S;
|
|
3089
|
+
if (!(S in e)) {
|
|
3088
3090
|
a.push({
|
|
3089
3091
|
type: "REMOVE",
|
|
3090
3092
|
path: [E],
|
|
3091
|
-
oldValue: t[
|
|
3093
|
+
oldValue: t[S]
|
|
3092
3094
|
});
|
|
3093
3095
|
continue;
|
|
3094
3096
|
}
|
|
3095
|
-
const y = e[
|
|
3097
|
+
const y = e[S], T = typeof M == "object" && typeof y == "object" && Array.isArray(M) === Array.isArray(y);
|
|
3096
3098
|
M && y && T && !zi[(I = (f = Object.getPrototypeOf(M)) == null ? void 0 : f.constructor) == null ? void 0 : I.name] && (!r.cyclesFix || !s.includes(M)) ? a.push.apply(a, _s(M, y, r, r.cyclesFix ? s.concat([M]) : []).map((C) => (C.path.unshift(E), C))) : M !== y && // treat NaN values as equivalent
|
|
3097
3099
|
!(Number.isNaN(M) && Number.isNaN(y)) && !(T && (isNaN(M) ? M + "" == y + "" : +M == +y)) && a.push({
|
|
3098
3100
|
path: [E],
|
|
@@ -3102,11 +3104,11 @@ function _s(t, e, r = { cyclesFix: !0 }, s = []) {
|
|
|
3102
3104
|
});
|
|
3103
3105
|
}
|
|
3104
3106
|
const l = Array.isArray(e);
|
|
3105
|
-
for (const
|
|
3106
|
-
|
|
3107
|
+
for (const S in e)
|
|
3108
|
+
S in t || a.push({
|
|
3107
3109
|
type: "CREATE",
|
|
3108
|
-
path: [l ? +
|
|
3109
|
-
value: e[
|
|
3110
|
+
path: [l ? +S : S],
|
|
3111
|
+
value: e[S]
|
|
3110
3112
|
});
|
|
3111
3113
|
return a;
|
|
3112
3114
|
}
|
|
@@ -3471,8 +3473,8 @@ var Gi = class {
|
|
|
3471
3473
|
const c = r;
|
|
3472
3474
|
r = e;
|
|
3473
3475
|
const l = this;
|
|
3474
|
-
return function(I = c, ...
|
|
3475
|
-
return l.produce(I, (M) => r.call(this, M, ...
|
|
3476
|
+
return function(I = c, ...S) {
|
|
3477
|
+
return l.produce(I, (M) => r.call(this, M, ...S));
|
|
3476
3478
|
};
|
|
3477
3479
|
}
|
|
3478
3480
|
typeof r != "function" && et(6), s !== void 0 && typeof s != "function" && et(7);
|
|
@@ -3603,34 +3605,34 @@ function Zn() {
|
|
|
3603
3605
|
}
|
|
3604
3606
|
}
|
|
3605
3607
|
function c(y, T, C, u) {
|
|
3606
|
-
let { base_: d, assigned_: w } = y,
|
|
3607
|
-
|
|
3608
|
+
let { base_: d, assigned_: w } = y, k = y.copy_;
|
|
3609
|
+
k.length < d.length && ([d, k] = [k, d], [C, u] = [u, C]);
|
|
3608
3610
|
for (let b = 0; b < d.length; b++)
|
|
3609
|
-
if (w[b] &&
|
|
3611
|
+
if (w[b] && k[b] !== d[b]) {
|
|
3610
3612
|
const m = T.concat([b]);
|
|
3611
3613
|
C.push({
|
|
3612
3614
|
op: e,
|
|
3613
3615
|
path: m,
|
|
3614
3616
|
// Need to maybe clone it, as it can in fact be the original value
|
|
3615
3617
|
// due to the base/copy inversion at the start of this function
|
|
3616
|
-
value: E(
|
|
3618
|
+
value: E(k[b])
|
|
3617
3619
|
}), u.push({
|
|
3618
3620
|
op: e,
|
|
3619
3621
|
path: m,
|
|
3620
3622
|
value: E(d[b])
|
|
3621
3623
|
});
|
|
3622
3624
|
}
|
|
3623
|
-
for (let b = d.length; b <
|
|
3625
|
+
for (let b = d.length; b < k.length; b++) {
|
|
3624
3626
|
const m = T.concat([b]);
|
|
3625
3627
|
C.push({
|
|
3626
3628
|
op: r,
|
|
3627
3629
|
path: m,
|
|
3628
3630
|
// Need to maybe clone it, as it can in fact be the original value
|
|
3629
3631
|
// due to the base/copy inversion at the start of this function
|
|
3630
|
-
value: E(
|
|
3632
|
+
value: E(k[b])
|
|
3631
3633
|
});
|
|
3632
3634
|
}
|
|
3633
|
-
for (let b =
|
|
3635
|
+
for (let b = k.length - 1; d.length <= b; --b) {
|
|
3634
3636
|
const m = T.concat([b]);
|
|
3635
3637
|
u.push({
|
|
3636
3638
|
op: s,
|
|
@@ -3640,21 +3642,21 @@ function Zn() {
|
|
|
3640
3642
|
}
|
|
3641
3643
|
function l(y, T, C, u) {
|
|
3642
3644
|
const { base_: d, copy_: w } = y;
|
|
3643
|
-
Ve(y.assigned_, (
|
|
3644
|
-
const m = fn(d,
|
|
3645
|
+
Ve(y.assigned_, (k, b) => {
|
|
3646
|
+
const m = fn(d, k), v = fn(w, k), h = b ? qe(d, k) ? e : r : s;
|
|
3645
3647
|
if (m === v && h === e)
|
|
3646
3648
|
return;
|
|
3647
|
-
const _ = T.concat(
|
|
3649
|
+
const _ = T.concat(k);
|
|
3648
3650
|
C.push(h === s ? { op: h, path: _ } : { op: h, path: _, value: v }), u.push(
|
|
3649
3651
|
h === r ? { op: s, path: _ } : h === s ? { op: r, path: _, value: E(m) } : { op: e, path: _, value: E(m) }
|
|
3650
3652
|
);
|
|
3651
3653
|
});
|
|
3652
3654
|
}
|
|
3653
3655
|
function f(y, T, C, u) {
|
|
3654
|
-
let { base_: d, copy_: w } = y,
|
|
3656
|
+
let { base_: d, copy_: w } = y, k = 0;
|
|
3655
3657
|
d.forEach((b) => {
|
|
3656
3658
|
if (!w.has(b)) {
|
|
3657
|
-
const m = T.concat([
|
|
3659
|
+
const m = T.concat([k]);
|
|
3658
3660
|
C.push({
|
|
3659
3661
|
op: s,
|
|
3660
3662
|
path: m,
|
|
@@ -3665,10 +3667,10 @@ function Zn() {
|
|
|
3665
3667
|
value: b
|
|
3666
3668
|
});
|
|
3667
3669
|
}
|
|
3668
|
-
|
|
3669
|
-
}),
|
|
3670
|
+
k++;
|
|
3671
|
+
}), k = 0, w.forEach((b) => {
|
|
3670
3672
|
if (!d.has(b)) {
|
|
3671
|
-
const m = T.concat([
|
|
3673
|
+
const m = T.concat([k]);
|
|
3672
3674
|
C.push({
|
|
3673
3675
|
op: r,
|
|
3674
3676
|
path: m,
|
|
@@ -3679,7 +3681,7 @@ function Zn() {
|
|
|
3679
3681
|
value: b
|
|
3680
3682
|
});
|
|
3681
3683
|
}
|
|
3682
|
-
|
|
3684
|
+
k++;
|
|
3683
3685
|
});
|
|
3684
3686
|
}
|
|
3685
3687
|
function I(y, T, C, u) {
|
|
@@ -3693,7 +3695,7 @@ function Zn() {
|
|
|
3693
3695
|
value: y
|
|
3694
3696
|
});
|
|
3695
3697
|
}
|
|
3696
|
-
function
|
|
3698
|
+
function S(y, T) {
|
|
3697
3699
|
return T.forEach((C) => {
|
|
3698
3700
|
const { path: u, op: d } = C;
|
|
3699
3701
|
let w = y;
|
|
@@ -3702,10 +3704,10 @@ function Zn() {
|
|
|
3702
3704
|
let _ = u[v];
|
|
3703
3705
|
typeof _ != "string" && typeof _ != "number" && (_ = "" + _), (h === 0 || h === 1) && (_ === "__proto__" || _ === "constructor") && et(19), typeof w == "function" && _ === "prototype" && et(19), w = fn(w, _), typeof w != "object" && et(18, u.join("/"));
|
|
3704
3706
|
}
|
|
3705
|
-
const
|
|
3707
|
+
const k = be(w), b = M(C.value), m = u[u.length - 1];
|
|
3706
3708
|
switch (d) {
|
|
3707
3709
|
case e:
|
|
3708
|
-
switch (
|
|
3710
|
+
switch (k) {
|
|
3709
3711
|
case 2:
|
|
3710
3712
|
return w.set(m, b);
|
|
3711
3713
|
case 3:
|
|
@@ -3714,7 +3716,7 @@ function Zn() {
|
|
|
3714
3716
|
return w[m] = b;
|
|
3715
3717
|
}
|
|
3716
3718
|
case r:
|
|
3717
|
-
switch (
|
|
3719
|
+
switch (k) {
|
|
3718
3720
|
case 1:
|
|
3719
3721
|
return m === "-" ? w.push(b) : w.splice(m, 0, b);
|
|
3720
3722
|
case 2:
|
|
@@ -3725,7 +3727,7 @@ function Zn() {
|
|
|
3725
3727
|
return w[m] = b;
|
|
3726
3728
|
}
|
|
3727
3729
|
case s:
|
|
3728
|
-
switch (
|
|
3730
|
+
switch (k) {
|
|
3729
3731
|
case 1:
|
|
3730
3732
|
return w.splice(m, 1);
|
|
3731
3733
|
case 2:
|
|
@@ -3760,7 +3762,7 @@ function Zn() {
|
|
|
3760
3762
|
return Ie(y) ? M(y) : y;
|
|
3761
3763
|
}
|
|
3762
3764
|
Hi("Patches", {
|
|
3763
|
-
applyPatches_:
|
|
3765
|
+
applyPatches_: S,
|
|
3764
3766
|
generatePatches_: a,
|
|
3765
3767
|
generateReplacementPatches_: I
|
|
3766
3768
|
});
|
|
@@ -4074,7 +4076,7 @@ class eo {
|
|
|
4074
4076
|
tracks: l,
|
|
4075
4077
|
transitionIds: f,
|
|
4076
4078
|
transitionsMap: I,
|
|
4077
|
-
trackItemsMap:
|
|
4079
|
+
trackItemsMap: S,
|
|
4078
4080
|
structure: M
|
|
4079
4081
|
} = this.getState(), E = K({
|
|
4080
4082
|
trackItemDetailsMap: a,
|
|
@@ -4082,9 +4084,9 @@ class eo {
|
|
|
4082
4084
|
tracks: l,
|
|
4083
4085
|
transitionIds: f,
|
|
4084
4086
|
transitionsMap: I,
|
|
4085
|
-
trackItemsMap:
|
|
4087
|
+
trackItemsMap: S,
|
|
4086
4088
|
structure: M
|
|
4087
|
-
}), y = [], T = [], C = [], u = [], d = [], w = [],
|
|
4089
|
+
}), y = [], T = [], C = [], u = [], d = [], w = [], k = [];
|
|
4088
4090
|
r.forEach((R) => {
|
|
4089
4091
|
let $;
|
|
4090
4092
|
const V = R.path.slice(1);
|
|
@@ -4100,7 +4102,7 @@ class eo {
|
|
|
4100
4102
|
path: V,
|
|
4101
4103
|
op: "add",
|
|
4102
4104
|
value: R.oldValue
|
|
4103
|
-
}, R.path.includes("trackItemIds") ? C.push($) : R.path.includes("transitionIds") ? T.push($) : R.path.includes("trackItemsMap") ? d.push($) : R.path.includes("transitionsMap") ? u.push($) : R.path.includes("tracks") ? y.push($) : R.path.includes("trackItemDetailsMap") ? w.push($) : R.path.includes("structure") &&
|
|
4105
|
+
}, R.path.includes("trackItemIds") ? C.push($) : R.path.includes("transitionIds") ? T.push($) : R.path.includes("trackItemsMap") ? d.push($) : R.path.includes("transitionsMap") ? u.push($) : R.path.includes("tracks") ? y.push($) : R.path.includes("trackItemDetailsMap") ? w.push($) : R.path.includes("structure") && k.push($);
|
|
4104
4106
|
});
|
|
4105
4107
|
const b = this.applyPatch(
|
|
4106
4108
|
E.tracks,
|
|
@@ -4122,7 +4124,7 @@ class eo {
|
|
|
4122
4124
|
w
|
|
4123
4125
|
), g = this.applyPatch(
|
|
4124
4126
|
E.structure,
|
|
4125
|
-
|
|
4127
|
+
k
|
|
4126
4128
|
), O = K({
|
|
4127
4129
|
tracks: b,
|
|
4128
4130
|
transitionIds: m,
|
|
@@ -4151,7 +4153,7 @@ class eo {
|
|
|
4151
4153
|
tracks: l,
|
|
4152
4154
|
transitionIds: f,
|
|
4153
4155
|
transitionsMap: I,
|
|
4154
|
-
trackItemsMap:
|
|
4156
|
+
trackItemsMap: S,
|
|
4155
4157
|
structure: M
|
|
4156
4158
|
} = this.getState(), E = K({
|
|
4157
4159
|
trackItemDetailsMap: a,
|
|
@@ -4159,9 +4161,9 @@ class eo {
|
|
|
4159
4161
|
tracks: l,
|
|
4160
4162
|
transitionIds: f,
|
|
4161
4163
|
transitionsMap: I,
|
|
4162
|
-
trackItemsMap:
|
|
4164
|
+
trackItemsMap: S,
|
|
4163
4165
|
structure: M
|
|
4164
|
-
}), y = [], T = [], C = [], u = [], d = [], w = [],
|
|
4166
|
+
}), y = [], T = [], C = [], u = [], d = [], w = [], k = [];
|
|
4165
4167
|
r.forEach((R) => {
|
|
4166
4168
|
let $;
|
|
4167
4169
|
const V = R.path.slice(1);
|
|
@@ -4177,7 +4179,7 @@ class eo {
|
|
|
4177
4179
|
path: V,
|
|
4178
4180
|
op: "remove",
|
|
4179
4181
|
value: R.oldValue
|
|
4180
|
-
}, R.path.includes("trackItemIds") ? C.push($) : R.path.includes("transitionIds") ? T.push($) : R.path.includes("trackItemsMap") ? d.push($) : R.path.includes("transitionsMap") ? u.push($) : R.path.includes("trackItemDetailsMap") ? w.push($) : R.path.includes("structure") ?
|
|
4182
|
+
}, R.path.includes("trackItemIds") ? C.push($) : R.path.includes("transitionIds") ? T.push($) : R.path.includes("trackItemsMap") ? d.push($) : R.path.includes("transitionsMap") ? u.push($) : R.path.includes("trackItemDetailsMap") ? w.push($) : R.path.includes("structure") ? k.push($) : y.push($);
|
|
4181
4183
|
});
|
|
4182
4184
|
const b = this.applyPatch(
|
|
4183
4185
|
E.tracks,
|
|
@@ -4199,7 +4201,7 @@ class eo {
|
|
|
4199
4201
|
w
|
|
4200
4202
|
), g = this.applyPatch(
|
|
4201
4203
|
E.structure,
|
|
4202
|
-
|
|
4204
|
+
k
|
|
4203
4205
|
), O = K({
|
|
4204
4206
|
tracks: b,
|
|
4205
4207
|
transitionIds: m,
|