@designcombo/state 1.0.8 → 2.0.1
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 +1056 -1024
- package/dist/index.umd.js +2 -2
- package/dist/state.d.ts +2 -2
- package/dist/utils/load-item.d.ts +0 -4
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
var vi = Object.defineProperty;
|
2
2
|
var Si = (t, r, n) => r in t ? vi(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
|
3
|
-
var
|
4
|
-
import { subject as
|
3
|
+
var re = (t, r, n) => Si(t, typeof r != "symbol" ? r + "" : r, n);
|
4
|
+
import { subject as ne, filter as ie } from "@designcombo/events";
|
5
5
|
var dn = function(t, r) {
|
6
6
|
return dn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
7
7
|
n.__proto__ = i;
|
@@ -50,7 +50,7 @@ function mn(t, r, n) {
|
|
50
50
|
(c || !(i in r)) && (c || (c = Array.prototype.slice.call(r, 0, i)), c[i] = r[i]);
|
51
51
|
return t.concat(c || Array.prototype.slice.call(r));
|
52
52
|
}
|
53
|
-
function
|
53
|
+
function zt(t) {
|
54
54
|
return typeof t == "function";
|
55
55
|
}
|
56
56
|
function Vn(t) {
|
@@ -86,36 +86,36 @@ var yr = function() {
|
|
86
86
|
if (d)
|
87
87
|
if (this._parentage = null, Array.isArray(d))
|
88
88
|
try {
|
89
|
-
for (var p = pn(d),
|
90
|
-
var
|
91
|
-
|
89
|
+
for (var p = pn(d), S = p.next(); !S.done; S = p.next()) {
|
90
|
+
var F = S.value;
|
91
|
+
F.remove(this);
|
92
92
|
}
|
93
93
|
} catch (u) {
|
94
94
|
r = { error: u };
|
95
95
|
} finally {
|
96
96
|
try {
|
97
|
-
|
97
|
+
S && !S.done && (n = p.return) && n.call(p);
|
98
98
|
} finally {
|
99
99
|
if (r) throw r.error;
|
100
100
|
}
|
101
101
|
}
|
102
102
|
else
|
103
103
|
d.remove(this);
|
104
|
-
var
|
105
|
-
if (
|
104
|
+
var T = this.initialTeardown;
|
105
|
+
if (zt(T))
|
106
106
|
try {
|
107
|
-
|
107
|
+
T();
|
108
108
|
} catch (u) {
|
109
109
|
c = u instanceof on ? u.errors : [u];
|
110
110
|
}
|
111
|
-
var
|
112
|
-
if (
|
111
|
+
var E = this._finalizers;
|
112
|
+
if (E) {
|
113
113
|
this._finalizers = null;
|
114
114
|
try {
|
115
|
-
for (var
|
116
|
-
var
|
115
|
+
for (var y = pn(E), w = y.next(); !w.done; w = y.next()) {
|
116
|
+
var x = w.value;
|
117
117
|
try {
|
118
|
-
Cn(
|
118
|
+
Cn(x);
|
119
119
|
} catch (u) {
|
120
120
|
c = c ?? [], u instanceof on ? c = mn(mn([], hn(c)), hn(u.errors)) : c.push(u);
|
121
121
|
}
|
@@ -124,7 +124,7 @@ var yr = function() {
|
|
124
124
|
i = { error: u };
|
125
125
|
} finally {
|
126
126
|
try {
|
127
|
-
|
127
|
+
w && !w.done && (a = y.return) && a.call(y);
|
128
128
|
} finally {
|
129
129
|
if (i) throw i.error;
|
130
130
|
}
|
@@ -164,10 +164,10 @@ var yr = function() {
|
|
164
164
|
}(), t;
|
165
165
|
}(), qn = yr.EMPTY;
|
166
166
|
function Jn(t) {
|
167
|
-
return t instanceof yr || t && "closed" in t &&
|
167
|
+
return t instanceof yr || t && "closed" in t && zt(t.remove) && zt(t.add) && zt(t.unsubscribe);
|
168
168
|
}
|
169
169
|
function Cn(t) {
|
170
|
-
|
170
|
+
zt(t) ? t() : t.unsubscribe();
|
171
171
|
}
|
172
172
|
var Zn = {
|
173
173
|
onUnhandledError: null,
|
@@ -204,7 +204,7 @@ var ti = function(t) {
|
|
204
204
|
return i.isStopped = !1, n ? (i.destination = n, Jn(n) && n.add(i)) : i.destination = Mi, i;
|
205
205
|
}
|
206
206
|
return r.create = function(n, i, a) {
|
207
|
-
return new
|
207
|
+
return new In(n, i, a);
|
208
208
|
}, r.prototype.next = function(n) {
|
209
209
|
this.isStopped || this._next(n);
|
210
210
|
}, r.prototype.error = function(n) {
|
@@ -263,11 +263,11 @@ var Ti = function() {
|
|
263
263
|
cr(n);
|
264
264
|
}
|
265
265
|
}, t;
|
266
|
-
}(),
|
266
|
+
}(), In = function(t) {
|
267
267
|
Ue(r, t);
|
268
268
|
function r(n, i, a) {
|
269
269
|
var c = t.call(this) || this, d;
|
270
|
-
if (
|
270
|
+
if (zt(n) || !n)
|
271
271
|
d = {
|
272
272
|
next: n ?? void 0,
|
273
273
|
error: i ?? void 0,
|
@@ -304,7 +304,7 @@ var Mi = {
|
|
304
304
|
function xi(t) {
|
305
305
|
return t;
|
306
306
|
}
|
307
|
-
function
|
307
|
+
function Di(t) {
|
308
308
|
return t.length === 0 ? xi : t.length === 1 ? t[0] : function(n) {
|
309
309
|
return t.reduce(function(i, a) {
|
310
310
|
return a(i);
|
@@ -319,10 +319,10 @@ var Fn = function() {
|
|
319
319
|
var n = new t();
|
320
320
|
return n.source = this, n.operator = r, n;
|
321
321
|
}, t.prototype.subscribe = function(r, n, i) {
|
322
|
-
var a = this, c = Pi(r) ? r : new
|
322
|
+
var a = this, c = Pi(r) ? r : new In(r, n, i);
|
323
323
|
return ur(function() {
|
324
|
-
var d = a, p = d.operator,
|
325
|
-
c.add(p ? p.call(c,
|
324
|
+
var d = a, p = d.operator, S = d.source;
|
325
|
+
c.add(p ? p.call(c, S) : S ? a._subscribe(c) : a._trySubscribe(c));
|
326
326
|
}), c;
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
328
328
|
try {
|
@@ -333,12 +333,12 @@ var Fn = function() {
|
|
333
333
|
}, t.prototype.forEach = function(r, n) {
|
334
334
|
var i = this;
|
335
335
|
return n = jn(n), new n(function(a, c) {
|
336
|
-
var d = new
|
336
|
+
var d = new In({
|
337
337
|
next: function(p) {
|
338
338
|
try {
|
339
339
|
r(p);
|
340
|
-
} catch (
|
341
|
-
c(
|
340
|
+
} catch (S) {
|
341
|
+
c(S), d.unsubscribe();
|
342
342
|
}
|
343
343
|
},
|
344
344
|
error: c,
|
@@ -354,7 +354,7 @@ var Fn = function() {
|
|
354
354
|
}, t.prototype.pipe = function() {
|
355
355
|
for (var r = [], n = 0; n < arguments.length; n++)
|
356
356
|
r[n] = arguments[n];
|
357
|
-
return
|
357
|
+
return Di(r)(this);
|
358
358
|
}, t.prototype.toPromise = function(r) {
|
359
359
|
var n = this;
|
360
360
|
return r = jn(r), new r(function(i, a) {
|
@@ -375,11 +375,11 @@ function jn(t) {
|
|
375
375
|
var r;
|
376
376
|
return (r = t ?? Zn.Promise) !== null && r !== void 0 ? r : Promise;
|
377
377
|
}
|
378
|
-
function
|
379
|
-
return t &&
|
378
|
+
function Oi(t) {
|
379
|
+
return t && zt(t.next) && zt(t.error) && zt(t.complete);
|
380
380
|
}
|
381
381
|
function Pi(t) {
|
382
|
-
return t && t instanceof ti ||
|
382
|
+
return t && t instanceof ti || Oi(t) && Jn(t);
|
383
383
|
}
|
384
384
|
var Ci = Vn(function(t) {
|
385
385
|
return function() {
|
@@ -405,11 +405,11 @@ var Ci = Vn(function(t) {
|
|
405
405
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
406
406
|
try {
|
407
407
|
for (var d = pn(i.currentObservers), p = d.next(); !p.done; p = d.next()) {
|
408
|
-
var
|
409
|
-
|
408
|
+
var S = p.value;
|
409
|
+
S.next(n);
|
410
410
|
}
|
411
|
-
} catch (
|
412
|
-
a = { error:
|
411
|
+
} catch (F) {
|
412
|
+
a = { error: F };
|
413
413
|
} finally {
|
414
414
|
try {
|
415
415
|
p && !p.done && (c = d.return) && c.call(d);
|
@@ -483,7 +483,7 @@ var Ci = Vn(function(t) {
|
|
483
483
|
var i, a;
|
484
484
|
return (a = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && a !== void 0 ? a : qn;
|
485
485
|
}, r;
|
486
|
-
}(ei),
|
486
|
+
}(ei), Nn = function(t) {
|
487
487
|
Ue(r, t);
|
488
488
|
function r(n) {
|
489
489
|
var i = t.call(this) || this;
|
@@ -513,55 +513,55 @@ function Tn(t) {
|
|
513
513
|
var fr = { exports: {} };
|
514
514
|
fr.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__", a = 1, c = 2, d = 9007199254740991, p = "[object Arguments]",
|
517
|
-
|
518
|
-
var
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", a = 1, c = 2, d = 9007199254740991, p = "[object Arguments]", S = "[object Array]", F = "[object AsyncFunction]", T = "[object Boolean]", E = "[object Date]", y = "[object Error]", w = "[object Function]", x = "[object GeneratorFunction]", u = "[object Map]", f = "[object Number]", g = "[object Null]", b = "[object Object]", m = "[object Promise]", h = "[object Proxy]", _ = "[object RegExp]", I = "[object Set]", v = "[object String]", U = "[object Symbol]", D = "[object Undefined]", j = "[object WeakMap]", z = "[object ArrayBuffer]", R = "[object DataView]", W = "[object Float32Array]", M = "[object Float64Array]", C = "[object Int8Array]", nt = "[object Int16Array]", Nt = "[object Int32Array]", Lt = "[object Uint8Array]", $t = "[object Uint8ClampedArray]", L = "[object Uint16Array]", yt = "[object Uint32Array]", Bt = /[\\^$.*+?()[\]{}|]/g, it = /^\[object .+?Constructor\]$/, O = /^(?:0|[1-9]\d*)$/, A = {};
|
517
|
+
A[W] = A[M] = A[C] = A[nt] = A[Nt] = A[Lt] = A[$t] = A[L] = A[yt] = !0, A[p] = A[S] = A[z] = A[T] = A[R] = A[E] = A[y] = A[w] = A[u] = A[f] = A[b] = A[_] = A[I] = A[v] = A[j] = !1;
|
518
|
+
var Q = typeof St == "object" && St && St.Object === Object && St, wt = typeof self == "object" && self && self.Object === Object && self, st = Q || wt || Function("return this")(), Tt = r && !r.nodeType && r, Kt = Tt && !0 && t && !t.nodeType && t, Y = Kt && Kt.exports === Tt, B = Y && Q.process, N = function() {
|
519
519
|
try {
|
520
|
-
return
|
520
|
+
return B && B.binding && B.binding("util");
|
521
521
|
} catch {
|
522
522
|
}
|
523
|
-
}(),
|
524
|
-
function
|
525
|
-
for (var o = -1, l = e == null ? 0 : e.length,
|
526
|
-
var
|
527
|
-
s(
|
523
|
+
}(), pt = N && N.isTypedArray;
|
524
|
+
function lt(e, s) {
|
525
|
+
for (var o = -1, l = e == null ? 0 : e.length, P = 0, k = []; ++o < l; ) {
|
526
|
+
var H = e[o];
|
527
|
+
s(H, o, e) && (k[P++] = H);
|
528
528
|
}
|
529
|
-
return
|
529
|
+
return k;
|
530
530
|
}
|
531
|
-
function
|
532
|
-
for (var o = -1, l = s.length,
|
533
|
-
e[
|
531
|
+
function tt(e, s) {
|
532
|
+
for (var o = -1, l = s.length, P = e.length; ++o < l; )
|
533
|
+
e[P + o] = s[o];
|
534
534
|
return e;
|
535
535
|
}
|
536
|
-
function
|
536
|
+
function It(e, s) {
|
537
537
|
for (var o = -1, l = e == null ? 0 : e.length; ++o < l; )
|
538
538
|
if (s(e[o], o, e))
|
539
539
|
return !0;
|
540
540
|
return !1;
|
541
541
|
}
|
542
|
-
function
|
542
|
+
function at(e, s) {
|
543
543
|
for (var o = -1, l = Array(e); ++o < e; )
|
544
544
|
l[o] = s(o);
|
545
545
|
return l;
|
546
546
|
}
|
547
|
-
function
|
547
|
+
function Xt(e) {
|
548
548
|
return function(s) {
|
549
549
|
return e(s);
|
550
550
|
};
|
551
551
|
}
|
552
|
-
function
|
552
|
+
function Ht(e, s) {
|
553
553
|
return e.has(s);
|
554
554
|
}
|
555
|
-
function
|
555
|
+
function X(e, s) {
|
556
556
|
return e == null ? void 0 : e[s];
|
557
557
|
}
|
558
|
-
function
|
558
|
+
function Et(e) {
|
559
559
|
var s = -1, o = Array(e.size);
|
560
|
-
return e.forEach(function(l,
|
561
|
-
o[++s] = [
|
560
|
+
return e.forEach(function(l, P) {
|
561
|
+
o[++s] = [P, l];
|
562
562
|
}), o;
|
563
563
|
}
|
564
|
-
function
|
564
|
+
function Ut(e, s) {
|
565
565
|
return function(o) {
|
566
566
|
return e(s(o));
|
567
567
|
};
|
@@ -572,13 +572,13 @@ fr.exports;
|
|
572
572
|
o[++s] = l;
|
573
573
|
}), o;
|
574
574
|
}
|
575
|
-
var
|
575
|
+
var xt = Array.prototype, vr = Function.prototype, Vt = Object.prototype, de = st["__core-js_shared__"], ke = vr.toString, vt = Vt.hasOwnProperty, Be = function() {
|
576
576
|
var e = /[^.]+$/.exec(de && de.keys && de.keys.IE_PROTO || "");
|
577
577
|
return e ? "Symbol(src)_1." + e : "";
|
578
|
-
}(), Ke =
|
579
|
-
"^" + ke.call(vt).replace(
|
580
|
-
), we =
|
581
|
-
function
|
578
|
+
}(), Ke = Vt.toString, Sr = RegExp(
|
579
|
+
"^" + ke.call(vt).replace(Bt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
580
|
+
), we = Y ? st.Buffer : void 0, pe = st.Symbol, Xe = st.Uint8Array, he = Vt.propertyIsEnumerable, qt = xt.splice, Mt = pe ? pe.toStringTag : void 0, me = Object.getOwnPropertySymbols, Te = we ? we.isBuffer : void 0, Jt = Ut(Object.keys, Object), Ee = Rt(st, "DataView"), Zt = Rt(st, "Map"), Me = Rt(st, "Promise"), Ae = Rt(st, "Set"), xe = Rt(st, "WeakMap"), Gt = Rt(Object, "create"), Ve = ft(Ee), Ct = ft(Zt), kr = ft(Me), wr = ft(Ae), Tr = ft(xe), qe = pe ? pe.prototype : void 0, De = qe ? qe.valueOf : void 0;
|
581
|
+
function et(e) {
|
582
582
|
var s = -1, o = e == null ? 0 : e.length;
|
583
583
|
for (this.clear(); ++s < o; ) {
|
584
584
|
var l = e[s];
|
@@ -586,7 +586,7 @@ fr.exports;
|
|
586
586
|
}
|
587
587
|
}
|
588
588
|
function Er() {
|
589
|
-
this.__data__ =
|
589
|
+
this.__data__ = Gt ? Gt(null) : {}, this.size = 0;
|
590
590
|
}
|
591
591
|
function Mr(e) {
|
592
592
|
var s = this.has(e) && delete this.__data__[e];
|
@@ -594,7 +594,7 @@ fr.exports;
|
|
594
594
|
}
|
595
595
|
function Ar(e) {
|
596
596
|
var s = this.__data__;
|
597
|
-
if (
|
597
|
+
if (Gt) {
|
598
598
|
var o = s[e];
|
599
599
|
return o === i ? void 0 : o;
|
600
600
|
}
|
@@ -602,43 +602,43 @@ fr.exports;
|
|
602
602
|
}
|
603
603
|
function xr(e) {
|
604
604
|
var s = this.__data__;
|
605
|
-
return
|
605
|
+
return Gt ? s[e] !== void 0 : vt.call(s, e);
|
606
606
|
}
|
607
|
-
function
|
607
|
+
function Dr(e, s) {
|
608
608
|
var o = this.__data__;
|
609
|
-
return this.size += this.has(e) ? 0 : 1, o[e] =
|
609
|
+
return this.size += this.has(e) ? 0 : 1, o[e] = Gt && s === void 0 ? i : s, this;
|
610
610
|
}
|
611
|
-
|
612
|
-
function
|
611
|
+
et.prototype.clear = Er, et.prototype.delete = Mr, et.prototype.get = Ar, et.prototype.has = xr, et.prototype.set = Dr;
|
612
|
+
function ot(e) {
|
613
613
|
var s = -1, o = e == null ? 0 : e.length;
|
614
614
|
for (this.clear(); ++s < o; ) {
|
615
615
|
var l = e[s];
|
616
616
|
this.set(l[0], l[1]);
|
617
617
|
}
|
618
618
|
}
|
619
|
-
function
|
619
|
+
function Or() {
|
620
620
|
this.__data__ = [], this.size = 0;
|
621
621
|
}
|
622
622
|
function Pr(e) {
|
623
|
-
var s = this.__data__, o =
|
623
|
+
var s = this.__data__, o = ge(s, e);
|
624
624
|
if (o < 0)
|
625
625
|
return !1;
|
626
626
|
var l = s.length - 1;
|
627
|
-
return o == l ? s.pop() :
|
627
|
+
return o == l ? s.pop() : qt.call(s, o, 1), --this.size, !0;
|
628
628
|
}
|
629
629
|
function Cr(e) {
|
630
|
-
var s = this.__data__, o =
|
630
|
+
var s = this.__data__, o = ge(s, e);
|
631
631
|
return o < 0 ? void 0 : s[o][1];
|
632
632
|
}
|
633
633
|
function Rr(e) {
|
634
|
-
return
|
634
|
+
return ge(this.__data__, e) > -1;
|
635
635
|
}
|
636
636
|
function Fr(e, s) {
|
637
|
-
var o = this.__data__, l =
|
637
|
+
var o = this.__data__, l = ge(o, e);
|
638
638
|
return l < 0 ? (++this.size, o.push([e, s])) : o[l][1] = s, this;
|
639
639
|
}
|
640
|
-
|
641
|
-
function
|
640
|
+
ot.prototype.clear = Or, ot.prototype.delete = Pr, ot.prototype.get = Cr, ot.prototype.has = Rr, ot.prototype.set = Fr;
|
641
|
+
function ht(e) {
|
642
642
|
var s = -1, o = e == null ? 0 : e.length;
|
643
643
|
for (this.clear(); ++s < o; ) {
|
644
644
|
var l = e[s];
|
@@ -647,77 +647,77 @@ fr.exports;
|
|
647
647
|
}
|
648
648
|
function jr() {
|
649
649
|
this.size = 0, this.__data__ = {
|
650
|
-
hash: new
|
651
|
-
map: new (
|
652
|
-
string: new
|
650
|
+
hash: new et(),
|
651
|
+
map: new (Zt || ot)(),
|
652
|
+
string: new et()
|
653
653
|
};
|
654
654
|
}
|
655
655
|
function zr(e) {
|
656
|
-
var s =
|
656
|
+
var s = At(this, e).delete(e);
|
657
657
|
return this.size -= s ? 1 : 0, s;
|
658
658
|
}
|
659
|
-
function Hr(e) {
|
660
|
-
return Mt(this, e).get(e);
|
661
|
-
}
|
662
659
|
function Nr(e) {
|
663
|
-
return
|
660
|
+
return At(this, e).get(e);
|
664
661
|
}
|
665
|
-
function Lr(e
|
666
|
-
|
662
|
+
function Lr(e) {
|
663
|
+
return At(this, e).has(e);
|
664
|
+
}
|
665
|
+
function $r(e, s) {
|
666
|
+
var o = At(this, e), l = o.size;
|
667
667
|
return o.set(e, s), this.size += o.size == l ? 0 : 1, this;
|
668
668
|
}
|
669
|
-
|
669
|
+
ht.prototype.clear = jr, ht.prototype.delete = zr, ht.prototype.get = Nr, ht.prototype.has = Lr, ht.prototype.set = $r;
|
670
670
|
function ye(e) {
|
671
671
|
var s = -1, o = e == null ? 0 : e.length;
|
672
|
-
for (this.__data__ = new
|
672
|
+
for (this.__data__ = new ht(); ++s < o; )
|
673
673
|
this.add(e[s]);
|
674
674
|
}
|
675
675
|
function Je(e) {
|
676
676
|
return this.__data__.set(e, i), this;
|
677
677
|
}
|
678
|
-
function
|
678
|
+
function Ie(e) {
|
679
679
|
return this.__data__.has(e);
|
680
680
|
}
|
681
|
-
ye.prototype.add = ye.prototype.push = Je, ye.prototype.has =
|
682
|
-
function
|
683
|
-
var s = this.__data__ = new
|
681
|
+
ye.prototype.add = ye.prototype.push = Je, ye.prototype.has = Ie;
|
682
|
+
function Dt(e) {
|
683
|
+
var s = this.__data__ = new ot(e);
|
684
684
|
this.size = s.size;
|
685
685
|
}
|
686
|
-
function
|
687
|
-
this.__data__ = new
|
686
|
+
function Oe() {
|
687
|
+
this.__data__ = new ot(), this.size = 0;
|
688
688
|
}
|
689
|
-
function
|
689
|
+
function Hr(e) {
|
690
690
|
var s = this.__data__, o = s.delete(e);
|
691
691
|
return this.size = s.size, o;
|
692
692
|
}
|
693
693
|
function Ur(e) {
|
694
694
|
return this.__data__.get(e);
|
695
695
|
}
|
696
|
-
function
|
696
|
+
function Gr(e) {
|
697
697
|
return this.__data__.has(e);
|
698
698
|
}
|
699
|
-
function
|
699
|
+
function Wr(e, s) {
|
700
700
|
var o = this.__data__;
|
701
|
-
if (o instanceof
|
701
|
+
if (o instanceof ot) {
|
702
702
|
var l = o.__data__;
|
703
|
-
if (!
|
703
|
+
if (!Zt || l.length < n - 1)
|
704
704
|
return l.push([e, s]), this.size = ++o.size, this;
|
705
|
-
o = this.__data__ = new
|
705
|
+
o = this.__data__ = new ht(l);
|
706
706
|
}
|
707
707
|
return o.set(e, s), this.size = o.size, this;
|
708
708
|
}
|
709
|
-
|
709
|
+
Dt.prototype.clear = Oe, Dt.prototype.delete = Hr, Dt.prototype.get = Ur, Dt.prototype.has = Gr, Dt.prototype.set = Wr;
|
710
710
|
function Yr(e, s) {
|
711
|
-
var o = be(e), l = !o && rr(e),
|
712
|
-
for (var
|
713
|
-
vt.call(e,
|
714
|
-
(
|
715
|
-
|
716
|
-
|
717
|
-
Qr(
|
718
|
-
return
|
711
|
+
var o = be(e), l = !o && rr(e), P = !o && !l && _e(e), k = !o && !l && !P && sr(e), H = o || l || P || k, $ = H ? at(e.length, String) : [], V = $.length;
|
712
|
+
for (var G in e)
|
713
|
+
vt.call(e, G) && !(H && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
|
+
(G == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
|
+
P && (G == "offset" || G == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
|
+
k && (G == "buffer" || G == "byteLength" || G == "byteOffset") || // Skip index properties.
|
717
|
+
Qr(G, V))) && $.push(G);
|
718
|
+
return $;
|
719
719
|
}
|
720
|
-
function
|
720
|
+
function ge(e, s) {
|
721
721
|
for (var o = e.length; o--; )
|
722
722
|
if (er(e[o][0], s))
|
723
723
|
return o;
|
@@ -725,198 +725,198 @@ fr.exports;
|
|
725
725
|
}
|
726
726
|
function Pe(e, s, o) {
|
727
727
|
var l = s(e);
|
728
|
-
return be(e) ? l :
|
728
|
+
return be(e) ? l : tt(l, o(e));
|
729
729
|
}
|
730
|
-
function
|
731
|
-
return e == null ? e === void 0 ?
|
730
|
+
function Qt(e) {
|
731
|
+
return e == null ? e === void 0 ? D : g : Mt && Mt in Object(e) ? Ft(e) : tr(e);
|
732
732
|
}
|
733
733
|
function Ze(e) {
|
734
|
-
return
|
734
|
+
return Pt(e) && Qt(e) == p;
|
735
735
|
}
|
736
|
-
function Qe(e, s, o, l,
|
737
|
-
return e === s ? !0 : e == null || s == null || !
|
736
|
+
function Qe(e, s, o, l, P) {
|
737
|
+
return e === s ? !0 : e == null || s == null || !Pt(e) && !Pt(s) ? e !== e && s !== s : Br(e, s, o, l, Qe, P);
|
738
738
|
}
|
739
|
-
function Br(e, s, o, l,
|
740
|
-
var
|
741
|
-
|
742
|
-
var
|
739
|
+
function Br(e, s, o, l, P, k) {
|
740
|
+
var H = be(e), $ = be(s), V = H ? S : Ot(e), G = $ ? S : Ot(s);
|
741
|
+
V = V == p ? b : V, G = G == p ? b : G;
|
742
|
+
var ct = V == b, mt = G == b, q = V == G;
|
743
743
|
if (q && _e(e)) {
|
744
744
|
if (!_e(s))
|
745
745
|
return !1;
|
746
|
-
|
746
|
+
H = !0, ct = !1;
|
747
747
|
}
|
748
|
-
if (q && !
|
749
|
-
return
|
748
|
+
if (q && !ct)
|
749
|
+
return k || (k = new Dt()), H || sr(e) ? Ce(e, s, o, l, P, k) : qr(e, s, V, o, l, P, k);
|
750
750
|
if (!(o & a)) {
|
751
|
-
var
|
752
|
-
if (
|
753
|
-
var
|
754
|
-
return
|
751
|
+
var ut = ct && vt.call(e, "__wrapped__"), rt = mt && vt.call(s, "__wrapped__");
|
752
|
+
if (ut || rt) {
|
753
|
+
var Wt = ut ? e.value() : e, jt = rt ? s.value() : s;
|
754
|
+
return k || (k = new Dt()), P(Wt, jt, o, l, k);
|
755
755
|
}
|
756
756
|
}
|
757
|
-
return q ? (
|
757
|
+
return q ? (k || (k = new Dt()), Jr(e, s, o, l, P, k)) : !1;
|
758
758
|
}
|
759
759
|
function Kr(e) {
|
760
760
|
if (!ir(e) || en(e))
|
761
761
|
return !1;
|
762
|
-
var s = nr(e) ? Sr :
|
763
|
-
return s.test(
|
762
|
+
var s = nr(e) ? Sr : it;
|
763
|
+
return s.test(ft(e));
|
764
764
|
}
|
765
765
|
function Xr(e) {
|
766
|
-
return
|
766
|
+
return Pt(e) && Fe(e.length) && !!A[Qt(e)];
|
767
767
|
}
|
768
768
|
function Vr(e) {
|
769
769
|
if (!rn(e))
|
770
|
-
return
|
770
|
+
return Jt(e);
|
771
771
|
var s = [];
|
772
772
|
for (var o in Object(e))
|
773
773
|
vt.call(e, o) && o != "constructor" && s.push(o);
|
774
774
|
return s;
|
775
775
|
}
|
776
|
-
function Ce(e, s, o, l,
|
777
|
-
var
|
778
|
-
if (
|
776
|
+
function Ce(e, s, o, l, P, k) {
|
777
|
+
var H = o & a, $ = e.length, V = s.length;
|
778
|
+
if ($ != V && !(H && V > $))
|
779
779
|
return !1;
|
780
|
-
var
|
781
|
-
if (
|
782
|
-
return
|
783
|
-
var
|
784
|
-
for (
|
785
|
-
var
|
780
|
+
var G = k.get(e);
|
781
|
+
if (G && k.get(s))
|
782
|
+
return G == s;
|
783
|
+
var ct = -1, mt = !0, q = o & c ? new ye() : void 0;
|
784
|
+
for (k.set(e, s), k.set(s, e); ++ct < $; ) {
|
785
|
+
var ut = e[ct], rt = s[ct];
|
786
786
|
if (l)
|
787
|
-
var
|
788
|
-
if (
|
789
|
-
if (
|
787
|
+
var Wt = H ? l(rt, ut, ct, s, e, k) : l(ut, rt, ct, e, s, k);
|
788
|
+
if (Wt !== void 0) {
|
789
|
+
if (Wt)
|
790
790
|
continue;
|
791
|
-
|
791
|
+
mt = !1;
|
792
792
|
break;
|
793
793
|
}
|
794
794
|
if (q) {
|
795
|
-
if (!
|
796
|
-
if (!
|
797
|
-
return q.push(
|
795
|
+
if (!It(s, function(jt, ee) {
|
796
|
+
if (!Ht(q, ee) && (ut === jt || P(ut, jt, o, l, k)))
|
797
|
+
return q.push(ee);
|
798
798
|
})) {
|
799
|
-
|
799
|
+
mt = !1;
|
800
800
|
break;
|
801
801
|
}
|
802
|
-
} else if (!(
|
803
|
-
|
802
|
+
} else if (!(ut === rt || P(ut, rt, o, l, k))) {
|
803
|
+
mt = !1;
|
804
804
|
break;
|
805
805
|
}
|
806
806
|
}
|
807
|
-
return
|
807
|
+
return k.delete(e), k.delete(s), mt;
|
808
808
|
}
|
809
|
-
function qr(e, s, o, l,
|
809
|
+
function qr(e, s, o, l, P, k, H) {
|
810
810
|
switch (o) {
|
811
|
-
case
|
811
|
+
case R:
|
812
812
|
if (e.byteLength != s.byteLength || e.byteOffset != s.byteOffset)
|
813
813
|
return !1;
|
814
814
|
e = e.buffer, s = s.buffer;
|
815
|
+
case z:
|
816
|
+
return !(e.byteLength != s.byteLength || !k(new Xe(e), new Xe(s)));
|
815
817
|
case T:
|
816
|
-
|
817
|
-
case S:
|
818
|
-
case P:
|
818
|
+
case E:
|
819
819
|
case f:
|
820
820
|
return er(+e, +s);
|
821
|
-
case
|
821
|
+
case y:
|
822
822
|
return e.name == s.name && e.message == s.message;
|
823
823
|
case _:
|
824
824
|
case v:
|
825
825
|
return e == s + "";
|
826
826
|
case u:
|
827
|
-
var
|
828
|
-
case
|
829
|
-
var
|
830
|
-
if (
|
827
|
+
var $ = Et;
|
828
|
+
case I:
|
829
|
+
var V = l & a;
|
830
|
+
if ($ || ($ = _t), e.size != s.size && !V)
|
831
831
|
return !1;
|
832
|
-
var
|
833
|
-
if (
|
834
|
-
return
|
835
|
-
l |= c,
|
836
|
-
var
|
837
|
-
return
|
832
|
+
var G = H.get(e);
|
833
|
+
if (G)
|
834
|
+
return G == s;
|
835
|
+
l |= c, H.set(e, s);
|
836
|
+
var ct = Ce($(e), $(s), l, P, k, H);
|
837
|
+
return H.delete(e), ct;
|
838
838
|
case U:
|
839
|
-
if (
|
840
|
-
return
|
839
|
+
if (De)
|
840
|
+
return De.call(e) == De.call(s);
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function Jr(e, s, o, l,
|
845
|
-
var
|
846
|
-
if (
|
844
|
+
function Jr(e, s, o, l, P, k) {
|
845
|
+
var H = o & a, $ = te(e), V = $.length, G = te(s), ct = G.length;
|
846
|
+
if (V != ct && !H)
|
847
847
|
return !1;
|
848
|
-
for (var
|
849
|
-
var q =
|
850
|
-
if (!(
|
848
|
+
for (var mt = V; mt--; ) {
|
849
|
+
var q = $[mt];
|
850
|
+
if (!(H ? q in s : vt.call(s, q)))
|
851
851
|
return !1;
|
852
852
|
}
|
853
|
-
var
|
854
|
-
if (
|
855
|
-
return
|
856
|
-
var
|
857
|
-
|
858
|
-
for (var
|
859
|
-
q =
|
860
|
-
var
|
853
|
+
var ut = k.get(e);
|
854
|
+
if (ut && k.get(s))
|
855
|
+
return ut == s;
|
856
|
+
var rt = !0;
|
857
|
+
k.set(e, s), k.set(s, e);
|
858
|
+
for (var Wt = H; ++mt < V; ) {
|
859
|
+
q = $[mt];
|
860
|
+
var jt = e[q], ee = s[q];
|
861
861
|
if (l)
|
862
|
-
var Pn =
|
863
|
-
if (!(Pn === void 0 ?
|
864
|
-
|
862
|
+
var Pn = H ? l(ee, jt, q, s, e, k) : l(jt, ee, q, e, s, k);
|
863
|
+
if (!(Pn === void 0 ? jt === ee || P(jt, ee, o, l, k) : Pn)) {
|
864
|
+
rt = !1;
|
865
865
|
break;
|
866
866
|
}
|
867
|
-
|
867
|
+
Wt || (Wt = q == "constructor");
|
868
868
|
}
|
869
|
-
if (
|
869
|
+
if (rt && !Wt) {
|
870
870
|
var ar = e.constructor, or = s.constructor;
|
871
|
-
ar != or && "constructor" in e && "constructor" in s && !(typeof ar == "function" && ar instanceof ar && typeof or == "function" && or instanceof or) && (
|
871
|
+
ar != or && "constructor" in e && "constructor" in s && !(typeof ar == "function" && ar instanceof ar && typeof or == "function" && or instanceof or) && (rt = !1);
|
872
872
|
}
|
873
|
-
return
|
873
|
+
return k.delete(e), k.delete(s), rt;
|
874
874
|
}
|
875
|
-
function
|
875
|
+
function te(e) {
|
876
876
|
return Pe(e, je, Zr);
|
877
877
|
}
|
878
|
-
function
|
878
|
+
function At(e, s) {
|
879
879
|
var o = e.__data__;
|
880
880
|
return tn(s) ? o[typeof s == "string" ? "string" : "hash"] : o.map;
|
881
881
|
}
|
882
|
-
function
|
883
|
-
var o =
|
882
|
+
function Rt(e, s) {
|
883
|
+
var o = X(e, s);
|
884
884
|
return Kr(o) ? o : void 0;
|
885
885
|
}
|
886
|
-
function
|
887
|
-
var s = vt.call(e,
|
886
|
+
function Ft(e) {
|
887
|
+
var s = vt.call(e, Mt), o = e[Mt];
|
888
888
|
try {
|
889
|
-
e[
|
889
|
+
e[Mt] = void 0;
|
890
890
|
var l = !0;
|
891
891
|
} catch {
|
892
892
|
}
|
893
|
-
var
|
894
|
-
return l && (s ? e[
|
893
|
+
var P = Ke.call(e);
|
894
|
+
return l && (s ? e[Mt] = o : delete e[Mt]), P;
|
895
895
|
}
|
896
896
|
var Zr = me ? function(e) {
|
897
|
-
return e == null ? [] : (e = Object(e),
|
897
|
+
return e == null ? [] : (e = Object(e), lt(me(e), function(s) {
|
898
898
|
return he.call(e, s);
|
899
899
|
}));
|
900
|
-
} : sn, Ot =
|
901
|
-
(Ee && Ot(new Ee(new ArrayBuffer(1))) !=
|
902
|
-
var s =
|
900
|
+
} : sn, Ot = Qt;
|
901
|
+
(Ee && Ot(new Ee(new ArrayBuffer(1))) != R || Zt && Ot(new Zt()) != u || Me && Ot(Me.resolve()) != m || Ae && Ot(new Ae()) != I || xe && Ot(new xe()) != j) && (Ot = function(e) {
|
902
|
+
var s = Qt(e), o = s == b ? e.constructor : void 0, l = o ? ft(o) : "";
|
903
903
|
if (l)
|
904
904
|
switch (l) {
|
905
905
|
case Ve:
|
906
|
-
return
|
907
|
-
case
|
906
|
+
return R;
|
907
|
+
case Ct:
|
908
908
|
return u;
|
909
909
|
case kr:
|
910
|
-
return
|
910
|
+
return m;
|
911
911
|
case wr:
|
912
|
-
return
|
912
|
+
return I;
|
913
913
|
case Tr:
|
914
|
-
return
|
914
|
+
return j;
|
915
915
|
}
|
916
916
|
return s;
|
917
917
|
});
|
918
918
|
function Qr(e, s) {
|
919
|
-
return s = s ?? d, !!s && (typeof e == "number" ||
|
919
|
+
return s = s ?? d, !!s && (typeof e == "number" || O.test(e)) && e > -1 && e % 1 == 0 && e < s;
|
920
920
|
}
|
921
921
|
function tn(e) {
|
922
922
|
var s = typeof e;
|
@@ -926,13 +926,13 @@ fr.exports;
|
|
926
926
|
return !!Be && Be in e;
|
927
927
|
}
|
928
928
|
function rn(e) {
|
929
|
-
var s = e && e.constructor, o = typeof s == "function" && s.prototype ||
|
929
|
+
var s = e && e.constructor, o = typeof s == "function" && s.prototype || Vt;
|
930
930
|
return e === o;
|
931
931
|
}
|
932
932
|
function tr(e) {
|
933
933
|
return Ke.call(e);
|
934
934
|
}
|
935
|
-
function
|
935
|
+
function ft(e) {
|
936
936
|
if (e != null) {
|
937
937
|
try {
|
938
938
|
return ke.call(e);
|
@@ -951,7 +951,7 @@ fr.exports;
|
|
951
951
|
var rr = Ze(/* @__PURE__ */ function() {
|
952
952
|
return arguments;
|
953
953
|
}()) ? Ze : function(e) {
|
954
|
-
return
|
954
|
+
return Pt(e) && vt.call(e, "callee") && !he.call(e, "callee");
|
955
955
|
}, be = Array.isArray;
|
956
956
|
function Re(e) {
|
957
957
|
return e != null && Fe(e.length) && !nr(e);
|
@@ -963,8 +963,8 @@ fr.exports;
|
|
963
963
|
function nr(e) {
|
964
964
|
if (!ir(e))
|
965
965
|
return !1;
|
966
|
-
var s =
|
967
|
-
return s ==
|
966
|
+
var s = Qt(e);
|
967
|
+
return s == w || s == x || s == F || s == h;
|
968
968
|
}
|
969
969
|
function Fe(e) {
|
970
970
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= d;
|
@@ -973,10 +973,10 @@ fr.exports;
|
|
973
973
|
var s = typeof e;
|
974
974
|
return e != null && (s == "object" || s == "function");
|
975
975
|
}
|
976
|
-
function
|
976
|
+
function Pt(e) {
|
977
977
|
return e != null && typeof e == "object";
|
978
978
|
}
|
979
|
-
var sr =
|
979
|
+
var sr = pt ? Xt(pt) : Xr;
|
980
980
|
function je(e) {
|
981
981
|
return Re(e) ? Yr(e) : Vr(e);
|
982
982
|
}
|
@@ -989,43 +989,43 @@ fr.exports;
|
|
989
989
|
t.exports = nn;
|
990
990
|
})(fr, fr.exports);
|
991
991
|
var Ri = fr.exports;
|
992
|
-
const
|
992
|
+
const Z = /* @__PURE__ */ Tn(Ri), ca = "add", Fi = "track", ji = "trackItems", ua = `${Fi}:changed`, la = `${ji}:changed`, zi = "state", fa = `${zi}:changed`, En = "design", Ni = `${En}:load`, Li = `${En}:resize`, kt = "add", $i = `${kt}:text`, Hi = `${kt}:video`, Ui = `${kt}:audio`, da = `${kt}:placeholder`, Gi = `${kt}:image`, pa = `${kt}:mask`, ha = `${kt}:transition`, ma = `${kt}:animation`, Wi = `${kt}:caption`, Yi = `${kt}:template`, Bi = `${kt}:items`, fe = "edit", Ki = `${fe}:object`, Xi = `${fe}:replaceMedia`, ya = `${fe}:text`, Ia = `${fe}:shape`, ga = `${fe}:templateItem`, ba = `${fe}:deleteTemplateItem`, _a = "enterEditMode", Se = "active", va = `${Se}:set`, Sa = `${Se}:delete`, Vi = `${Se}:paste`, qi = `${Se}:clone`, Ji = `${Se}:split`, dt = "layer", ka = `${dt}:locked`, wa = `${dt}:hidden`, Ta = `${dt}:move`, Ea = `${dt}:select`, Ma = `${dt}:selection`, Aa = `${dt}:sendTo`, xa = `${dt}:rename`, Da = `${dt}:editingName`, Oa = `${dt}:copy`, Pa = `${dt}:paste`, Zi = `${dt}:clone`, Ca = `${dt}:split`, Ra = `${dt}:cut`, Qi = `${dt}:delete`, Ir = "history", ts = `${Ir}:undo`, es = `${Ir}:redo`, Fa = `${Ir}:reset`, ri = "scale", rs = `${ri}:changed`;
|
993
993
|
var dr = { exports: {} };
|
994
994
|
dr.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__", a = 9007199254740991, c = "[object Arguments]", d = "[object Array]", p = "[object Boolean]",
|
997
|
-
|
998
|
-
var
|
999
|
-
function
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", a = 9007199254740991, c = "[object Arguments]", d = "[object Array]", p = "[object Boolean]", S = "[object Date]", F = "[object Error]", T = "[object Function]", E = "[object GeneratorFunction]", y = "[object Map]", w = "[object Number]", x = "[object Object]", u = "[object Promise]", f = "[object RegExp]", g = "[object Set]", b = "[object String]", m = "[object Symbol]", h = "[object WeakMap]", _ = "[object ArrayBuffer]", I = "[object DataView]", v = "[object Float32Array]", U = "[object Float64Array]", D = "[object Int8Array]", j = "[object Int16Array]", z = "[object Int32Array]", R = "[object Uint8Array]", W = "[object Uint8ClampedArray]", M = "[object Uint16Array]", C = "[object Uint32Array]", nt = /[\\^$.*+?()[\]{}|]/g, Nt = /\w*$/, Lt = /^\[object .+?Constructor\]$/, $t = /^(?:0|[1-9]\d*)$/, L = {};
|
997
|
+
L[c] = L[d] = L[_] = L[I] = L[p] = L[S] = L[v] = L[U] = L[D] = L[j] = L[z] = L[y] = L[w] = L[x] = L[f] = L[g] = L[b] = L[m] = L[R] = L[W] = L[M] = L[C] = !0, L[F] = L[T] = L[h] = !1;
|
998
|
+
var yt = typeof St == "object" && St && St.Object === Object && St, Bt = typeof self == "object" && self && self.Object === Object && self, it = yt || Bt || Function("return this")(), O = r && !r.nodeType && r, A = O && !0 && t && !t.nodeType && t, Q = A && A.exports === O;
|
999
|
+
function wt(e, s) {
|
1000
1000
|
return e.set(s[0], s[1]), e;
|
1001
1001
|
}
|
1002
|
-
function
|
1002
|
+
function st(e, s) {
|
1003
1003
|
return e.add(s), e;
|
1004
1004
|
}
|
1005
|
-
function
|
1005
|
+
function Tt(e, s) {
|
1006
1006
|
for (var o = -1, l = e ? e.length : 0; ++o < l && s(e[o], o, e) !== !1; )
|
1007
1007
|
;
|
1008
1008
|
return e;
|
1009
1009
|
}
|
1010
|
-
function
|
1011
|
-
for (var o = -1, l = s.length,
|
1012
|
-
e[
|
1010
|
+
function Kt(e, s) {
|
1011
|
+
for (var o = -1, l = s.length, P = e.length; ++o < l; )
|
1012
|
+
e[P + o] = s[o];
|
1013
1013
|
return e;
|
1014
1014
|
}
|
1015
|
-
function
|
1016
|
-
for (var
|
1017
|
-
o = s(o, e[
|
1015
|
+
function Y(e, s, o, l) {
|
1016
|
+
for (var P = -1, k = e ? e.length : 0; ++P < k; )
|
1017
|
+
o = s(o, e[P], P, e);
|
1018
1018
|
return o;
|
1019
1019
|
}
|
1020
|
-
function
|
1020
|
+
function B(e, s) {
|
1021
1021
|
for (var o = -1, l = Array(e); ++o < e; )
|
1022
1022
|
l[o] = s(o);
|
1023
1023
|
return l;
|
1024
1024
|
}
|
1025
|
-
function
|
1025
|
+
function N(e, s) {
|
1026
1026
|
return e == null ? void 0 : e[s];
|
1027
1027
|
}
|
1028
|
-
function
|
1028
|
+
function pt(e) {
|
1029
1029
|
var s = !1;
|
1030
1030
|
if (e != null && typeof e.toString != "function")
|
1031
1031
|
try {
|
@@ -1034,30 +1034,30 @@ dr.exports;
|
|
1034
1034
|
}
|
1035
1035
|
return s;
|
1036
1036
|
}
|
1037
|
-
function
|
1037
|
+
function lt(e) {
|
1038
1038
|
var s = -1, o = Array(e.size);
|
1039
|
-
return e.forEach(function(l,
|
1040
|
-
o[++s] = [
|
1039
|
+
return e.forEach(function(l, P) {
|
1040
|
+
o[++s] = [P, l];
|
1041
1041
|
}), o;
|
1042
1042
|
}
|
1043
|
-
function
|
1043
|
+
function tt(e, s) {
|
1044
1044
|
return function(o) {
|
1045
1045
|
return e(s(o));
|
1046
1046
|
};
|
1047
1047
|
}
|
1048
|
-
function
|
1048
|
+
function It(e) {
|
1049
1049
|
var s = -1, o = Array(e.size);
|
1050
1050
|
return e.forEach(function(l) {
|
1051
1051
|
o[++s] = l;
|
1052
1052
|
}), o;
|
1053
1053
|
}
|
1054
|
-
var
|
1055
|
-
var e = /[^.]+$/.exec(
|
1054
|
+
var at = Array.prototype, Xt = Function.prototype, Ht = Object.prototype, X = it["__core-js_shared__"], Et = function() {
|
1055
|
+
var e = /[^.]+$/.exec(X && X.keys && X.keys.IE_PROTO || "");
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
1057
|
-
}(),
|
1058
|
-
"^" +
|
1059
|
-
),
|
1060
|
-
function
|
1057
|
+
}(), Ut = Xt.toString, _t = Ht.hasOwnProperty, xt = Ht.toString, vr = RegExp(
|
1058
|
+
"^" + Ut.call(_t).replace(nt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
1059
|
+
), Vt = Q ? it.Buffer : void 0, de = it.Symbol, ke = it.Uint8Array, vt = tt(Object.getPrototypeOf, Object), Be = Object.create, Ke = Ht.propertyIsEnumerable, Sr = at.splice, we = Object.getOwnPropertySymbols, pe = Vt ? Vt.isBuffer : void 0, Xe = tt(Object.keys, Object), he = At(it, "DataView"), qt = At(it, "Map"), Mt = At(it, "Promise"), me = At(it, "Set"), Te = At(it, "WeakMap"), Jt = At(Object, "create"), Ee = ft(he), Zt = ft(qt), Me = ft(Mt), Ae = ft(me), xe = ft(Te), Gt = de ? de.prototype : void 0, Ve = Gt ? Gt.valueOf : void 0;
|
1060
|
+
function Ct(e) {
|
1061
1061
|
var s = -1, o = e ? e.length : 0;
|
1062
1062
|
for (this.clear(); ++s < o; ) {
|
1063
1063
|
var l = e[s];
|
@@ -1065,14 +1065,14 @@ dr.exports;
|
|
1065
1065
|
}
|
1066
1066
|
}
|
1067
1067
|
function kr() {
|
1068
|
-
this.__data__ =
|
1068
|
+
this.__data__ = Jt ? Jt(null) : {};
|
1069
1069
|
}
|
1070
1070
|
function wr(e) {
|
1071
1071
|
return this.has(e) && delete this.__data__[e];
|
1072
1072
|
}
|
1073
1073
|
function Tr(e) {
|
1074
1074
|
var s = this.__data__;
|
1075
|
-
if (
|
1075
|
+
if (Jt) {
|
1076
1076
|
var o = s[e];
|
1077
1077
|
return o === i ? void 0 : o;
|
1078
1078
|
}
|
@@ -1080,14 +1080,14 @@ dr.exports;
|
|
1080
1080
|
}
|
1081
1081
|
function qe(e) {
|
1082
1082
|
var s = this.__data__;
|
1083
|
-
return
|
1083
|
+
return Jt ? s[e] !== void 0 : _t.call(s, e);
|
1084
1084
|
}
|
1085
|
-
function
|
1085
|
+
function De(e, s) {
|
1086
1086
|
var o = this.__data__;
|
1087
|
-
return o[e] =
|
1087
|
+
return o[e] = Jt && s === void 0 ? i : s, this;
|
1088
1088
|
}
|
1089
|
-
|
1090
|
-
function
|
1089
|
+
Ct.prototype.clear = kr, Ct.prototype.delete = wr, Ct.prototype.get = Tr, Ct.prototype.has = qe, Ct.prototype.set = De;
|
1090
|
+
function et(e) {
|
1091
1091
|
var s = -1, o = e ? e.length : 0;
|
1092
1092
|
for (this.clear(); ++s < o; ) {
|
1093
1093
|
var l = e[s];
|
@@ -1098,146 +1098,146 @@ dr.exports;
|
|
1098
1098
|
this.__data__ = [];
|
1099
1099
|
}
|
1100
1100
|
function Mr(e) {
|
1101
|
-
var s = this.__data__, o =
|
1101
|
+
var s = this.__data__, o = Ie(s, e);
|
1102
1102
|
if (o < 0)
|
1103
1103
|
return !1;
|
1104
1104
|
var l = s.length - 1;
|
1105
1105
|
return o == l ? s.pop() : Sr.call(s, o, 1), !0;
|
1106
1106
|
}
|
1107
1107
|
function Ar(e) {
|
1108
|
-
var s = this.__data__, o =
|
1108
|
+
var s = this.__data__, o = Ie(s, e);
|
1109
1109
|
return o < 0 ? void 0 : s[o][1];
|
1110
1110
|
}
|
1111
1111
|
function xr(e) {
|
1112
|
-
return
|
1112
|
+
return Ie(this.__data__, e) > -1;
|
1113
1113
|
}
|
1114
|
-
function
|
1115
|
-
var o = this.__data__, l =
|
1114
|
+
function Dr(e, s) {
|
1115
|
+
var o = this.__data__, l = Ie(o, e);
|
1116
1116
|
return l < 0 ? o.push([e, s]) : o[l][1] = s, this;
|
1117
1117
|
}
|
1118
|
-
|
1119
|
-
function
|
1118
|
+
et.prototype.clear = Er, et.prototype.delete = Mr, et.prototype.get = Ar, et.prototype.has = xr, et.prototype.set = Dr;
|
1119
|
+
function ot(e) {
|
1120
1120
|
var s = -1, o = e ? e.length : 0;
|
1121
1121
|
for (this.clear(); ++s < o; ) {
|
1122
1122
|
var l = e[s];
|
1123
1123
|
this.set(l[0], l[1]);
|
1124
1124
|
}
|
1125
1125
|
}
|
1126
|
-
function
|
1126
|
+
function Or() {
|
1127
1127
|
this.__data__ = {
|
1128
|
-
hash: new
|
1129
|
-
map: new (
|
1130
|
-
string: new
|
1128
|
+
hash: new Ct(),
|
1129
|
+
map: new (qt || et)(),
|
1130
|
+
string: new Ct()
|
1131
1131
|
};
|
1132
1132
|
}
|
1133
1133
|
function Pr(e) {
|
1134
|
-
return
|
1134
|
+
return te(this, e).delete(e);
|
1135
1135
|
}
|
1136
1136
|
function Cr(e) {
|
1137
|
-
return
|
1137
|
+
return te(this, e).get(e);
|
1138
1138
|
}
|
1139
1139
|
function Rr(e) {
|
1140
|
-
return
|
1140
|
+
return te(this, e).has(e);
|
1141
1141
|
}
|
1142
1142
|
function Fr(e, s) {
|
1143
|
-
return
|
1143
|
+
return te(this, e).set(e, s), this;
|
1144
1144
|
}
|
1145
|
-
|
1146
|
-
function
|
1147
|
-
this.__data__ = new
|
1145
|
+
ot.prototype.clear = Or, ot.prototype.delete = Pr, ot.prototype.get = Cr, ot.prototype.has = Rr, ot.prototype.set = Fr;
|
1146
|
+
function ht(e) {
|
1147
|
+
this.__data__ = new et(e);
|
1148
1148
|
}
|
1149
1149
|
function jr() {
|
1150
|
-
this.__data__ = new
|
1150
|
+
this.__data__ = new et();
|
1151
1151
|
}
|
1152
1152
|
function zr(e) {
|
1153
1153
|
return this.__data__.delete(e);
|
1154
1154
|
}
|
1155
|
-
function
|
1155
|
+
function Nr(e) {
|
1156
1156
|
return this.__data__.get(e);
|
1157
1157
|
}
|
1158
|
-
function
|
1158
|
+
function Lr(e) {
|
1159
1159
|
return this.__data__.has(e);
|
1160
1160
|
}
|
1161
|
-
function
|
1161
|
+
function $r(e, s) {
|
1162
1162
|
var o = this.__data__;
|
1163
|
-
if (o instanceof
|
1163
|
+
if (o instanceof et) {
|
1164
1164
|
var l = o.__data__;
|
1165
|
-
if (!
|
1165
|
+
if (!qt || l.length < n - 1)
|
1166
1166
|
return l.push([e, s]), this;
|
1167
|
-
o = this.__data__ = new
|
1167
|
+
o = this.__data__ = new ot(l);
|
1168
1168
|
}
|
1169
1169
|
return o.set(e, s), this;
|
1170
1170
|
}
|
1171
|
-
|
1171
|
+
ht.prototype.clear = jr, ht.prototype.delete = zr, ht.prototype.get = Nr, ht.prototype.has = Lr, ht.prototype.set = $r;
|
1172
1172
|
function ye(e, s) {
|
1173
|
-
var o = Re(e) || be(e) ?
|
1174
|
-
for (var
|
1175
|
-
_t.call(e,
|
1173
|
+
var o = Re(e) || be(e) ? B(e.length, String) : [], l = o.length, P = !!l;
|
1174
|
+
for (var k in e)
|
1175
|
+
_t.call(e, k) && !(P && (k == "length" || tn(k, l))) && o.push(k);
|
1176
1176
|
return o;
|
1177
1177
|
}
|
1178
1178
|
function Je(e, s, o) {
|
1179
1179
|
var l = e[s];
|
1180
1180
|
(!(_t.call(e, s) && rr(l, o)) || o === void 0 && !(s in e)) && (e[s] = o);
|
1181
1181
|
}
|
1182
|
-
function
|
1182
|
+
function Ie(e, s) {
|
1183
1183
|
for (var o = e.length; o--; )
|
1184
1184
|
if (rr(e[o][0], s))
|
1185
1185
|
return o;
|
1186
1186
|
return -1;
|
1187
1187
|
}
|
1188
|
-
function
|
1188
|
+
function Dt(e, s) {
|
1189
1189
|
return e && Ce(s, je(s), e);
|
1190
1190
|
}
|
1191
|
-
function
|
1192
|
-
var
|
1193
|
-
if (l && (
|
1194
|
-
return
|
1195
|
-
if (!
|
1191
|
+
function Oe(e, s, o, l, P, k, H) {
|
1192
|
+
var $;
|
1193
|
+
if (l && ($ = k ? l(e, P, k, H) : l(e)), $ !== void 0)
|
1194
|
+
return $;
|
1195
|
+
if (!Pt(e))
|
1196
1196
|
return e;
|
1197
|
-
var
|
1198
|
-
if (
|
1199
|
-
if (
|
1200
|
-
return Vr(e,
|
1197
|
+
var V = Re(e);
|
1198
|
+
if (V) {
|
1199
|
+
if ($ = Zr(e), !s)
|
1200
|
+
return Vr(e, $);
|
1201
1201
|
} else {
|
1202
|
-
var
|
1202
|
+
var G = Ft(e), ct = G == T || G == E;
|
1203
1203
|
if (nr(e))
|
1204
|
-
return
|
1205
|
-
if (
|
1206
|
-
if (
|
1207
|
-
return
|
1208
|
-
if (
|
1209
|
-
return qr(e,
|
1204
|
+
return ge(e, s);
|
1205
|
+
if (G == x || G == c || ct && !k) {
|
1206
|
+
if (pt(e))
|
1207
|
+
return k ? e : {};
|
1208
|
+
if ($ = Ot(ct ? {} : e), !s)
|
1209
|
+
return qr(e, Dt($, e));
|
1210
1210
|
} else {
|
1211
|
-
if (!
|
1212
|
-
return
|
1213
|
-
|
1211
|
+
if (!L[G])
|
1212
|
+
return k ? e : {};
|
1213
|
+
$ = Qr(e, G, Oe, s);
|
1214
1214
|
}
|
1215
1215
|
}
|
1216
|
-
|
1217
|
-
var
|
1218
|
-
if (
|
1219
|
-
return
|
1220
|
-
if (
|
1216
|
+
H || (H = new ht());
|
1217
|
+
var mt = H.get(e);
|
1218
|
+
if (mt)
|
1219
|
+
return mt;
|
1220
|
+
if (H.set(e, $), !V)
|
1221
1221
|
var q = o ? Jr(e) : je(e);
|
1222
|
-
return
|
1223
|
-
q && (
|
1224
|
-
}),
|
1222
|
+
return Tt(q || e, function(ut, rt) {
|
1223
|
+
q && (rt = ut, ut = e[rt]), Je($, rt, Oe(ut, s, o, l, rt, e, H));
|
1224
|
+
}), $;
|
1225
1225
|
}
|
1226
|
-
function
|
1227
|
-
return
|
1226
|
+
function Hr(e) {
|
1227
|
+
return Pt(e) ? Be(e) : {};
|
1228
1228
|
}
|
1229
1229
|
function Ur(e, s, o) {
|
1230
1230
|
var l = s(e);
|
1231
|
-
return Re(e) ? l :
|
1232
|
-
}
|
1233
|
-
function Wr(e) {
|
1234
|
-
return At.call(e);
|
1231
|
+
return Re(e) ? l : Kt(l, o(e));
|
1235
1232
|
}
|
1236
1233
|
function Gr(e) {
|
1237
|
-
|
1234
|
+
return xt.call(e);
|
1235
|
+
}
|
1236
|
+
function Wr(e) {
|
1237
|
+
if (!Pt(e) || rn(e))
|
1238
1238
|
return !1;
|
1239
|
-
var s = Fe(e) ||
|
1240
|
-
return s.test(
|
1239
|
+
var s = Fe(e) || pt(e) ? vr : Lt;
|
1240
|
+
return s.test(ft(e));
|
1241
1241
|
}
|
1242
1242
|
function Yr(e) {
|
1243
1243
|
if (!tr(e))
|
@@ -1247,7 +1247,7 @@ dr.exports;
|
|
1247
1247
|
_t.call(e, o) && o != "constructor" && s.push(o);
|
1248
1248
|
return s;
|
1249
1249
|
}
|
1250
|
-
function
|
1250
|
+
function ge(e, s) {
|
1251
1251
|
if (s)
|
1252
1252
|
return e.slice();
|
1253
1253
|
var o = new e.constructor(e.length);
|
@@ -1257,21 +1257,21 @@ dr.exports;
|
|
1257
1257
|
var s = new e.constructor(e.byteLength);
|
1258
1258
|
return new ke(s).set(new ke(e)), s;
|
1259
1259
|
}
|
1260
|
-
function
|
1260
|
+
function Qt(e, s) {
|
1261
1261
|
var o = s ? Pe(e.buffer) : e.buffer;
|
1262
1262
|
return new e.constructor(o, e.byteOffset, e.byteLength);
|
1263
1263
|
}
|
1264
1264
|
function Ze(e, s, o) {
|
1265
|
-
var l = s ? o(
|
1266
|
-
return
|
1265
|
+
var l = s ? o(lt(e), !0) : lt(e);
|
1266
|
+
return Y(l, wt, new e.constructor());
|
1267
1267
|
}
|
1268
1268
|
function Qe(e) {
|
1269
|
-
var s = new e.constructor(e.source,
|
1269
|
+
var s = new e.constructor(e.source, Nt.exec(e));
|
1270
1270
|
return s.lastIndex = e.lastIndex, s;
|
1271
1271
|
}
|
1272
1272
|
function Br(e, s, o) {
|
1273
|
-
var l = s ? o(
|
1274
|
-
return
|
1273
|
+
var l = s ? o(It(e), !0) : It(e);
|
1274
|
+
return Y(l, st, new e.constructor());
|
1275
1275
|
}
|
1276
1276
|
function Kr(e) {
|
1277
1277
|
return Ve ? Object(Ve.call(e)) : {};
|
@@ -1288,39 +1288,39 @@ dr.exports;
|
|
1288
1288
|
}
|
1289
1289
|
function Ce(e, s, o, l) {
|
1290
1290
|
o || (o = {});
|
1291
|
-
for (var
|
1292
|
-
var
|
1293
|
-
Je(o,
|
1291
|
+
for (var P = -1, k = s.length; ++P < k; ) {
|
1292
|
+
var H = s[P], $ = void 0;
|
1293
|
+
Je(o, H, $ === void 0 ? e[H] : $);
|
1294
1294
|
}
|
1295
1295
|
return o;
|
1296
1296
|
}
|
1297
1297
|
function qr(e, s) {
|
1298
|
-
return Ce(e,
|
1298
|
+
return Ce(e, Rt(e), s);
|
1299
1299
|
}
|
1300
1300
|
function Jr(e) {
|
1301
|
-
return Ur(e, je,
|
1301
|
+
return Ur(e, je, Rt);
|
1302
1302
|
}
|
1303
|
-
function
|
1303
|
+
function te(e, s) {
|
1304
1304
|
var o = e.__data__;
|
1305
1305
|
return en(s) ? o[typeof s == "string" ? "string" : "hash"] : o.map;
|
1306
1306
|
}
|
1307
|
-
function
|
1308
|
-
var o =
|
1309
|
-
return
|
1307
|
+
function At(e, s) {
|
1308
|
+
var o = N(e, s);
|
1309
|
+
return Wr(o) ? o : void 0;
|
1310
1310
|
}
|
1311
|
-
var
|
1312
|
-
(he &&
|
1313
|
-
var s =
|
1311
|
+
var Rt = we ? tt(we, Object) : sn, Ft = Gr;
|
1312
|
+
(he && Ft(new he(new ArrayBuffer(1))) != I || qt && Ft(new qt()) != y || Mt && Ft(Mt.resolve()) != u || me && Ft(new me()) != g || Te && Ft(new Te()) != h) && (Ft = function(e) {
|
1313
|
+
var s = xt.call(e), o = s == x ? e.constructor : void 0, l = o ? ft(o) : void 0;
|
1314
1314
|
if (l)
|
1315
1315
|
switch (l) {
|
1316
1316
|
case Ee:
|
1317
|
-
return
|
1318
|
-
case
|
1319
|
-
return
|
1317
|
+
return I;
|
1318
|
+
case Zt:
|
1319
|
+
return y;
|
1320
1320
|
case Me:
|
1321
1321
|
return u;
|
1322
1322
|
case Ae:
|
1323
|
-
return
|
1323
|
+
return g;
|
1324
1324
|
case xe:
|
1325
1325
|
return h;
|
1326
1326
|
}
|
@@ -1331,59 +1331,59 @@ dr.exports;
|
|
1331
1331
|
return s && typeof e[0] == "string" && _t.call(e, "index") && (o.index = e.index, o.input = e.input), o;
|
1332
1332
|
}
|
1333
1333
|
function Ot(e) {
|
1334
|
-
return typeof e.constructor == "function" && !tr(e) ?
|
1334
|
+
return typeof e.constructor == "function" && !tr(e) ? Hr(vt(e)) : {};
|
1335
1335
|
}
|
1336
1336
|
function Qr(e, s, o, l) {
|
1337
|
-
var
|
1337
|
+
var P = e.constructor;
|
1338
1338
|
switch (s) {
|
1339
1339
|
case _:
|
1340
1340
|
return Pe(e);
|
1341
1341
|
case p:
|
1342
|
-
case
|
1343
|
-
return new
|
1344
|
-
case
|
1345
|
-
return
|
1342
|
+
case S:
|
1343
|
+
return new P(+e);
|
1344
|
+
case I:
|
1345
|
+
return Qt(e, l);
|
1346
1346
|
case v:
|
1347
1347
|
case U:
|
1348
|
-
case C:
|
1349
1348
|
case D:
|
1350
|
-
case
|
1351
|
-
case
|
1352
|
-
case
|
1353
|
-
case
|
1354
|
-
case
|
1349
|
+
case j:
|
1350
|
+
case z:
|
1351
|
+
case R:
|
1352
|
+
case W:
|
1353
|
+
case M:
|
1354
|
+
case C:
|
1355
1355
|
return Xr(e, l);
|
1356
|
-
case
|
1356
|
+
case y:
|
1357
1357
|
return Ze(e, l, o);
|
1358
|
-
case
|
1358
|
+
case w:
|
1359
1359
|
case b:
|
1360
|
-
return new
|
1360
|
+
return new P(e);
|
1361
1361
|
case f:
|
1362
1362
|
return Qe(e);
|
1363
|
-
case
|
1363
|
+
case g:
|
1364
1364
|
return Br(e, l, o);
|
1365
|
-
case
|
1365
|
+
case m:
|
1366
1366
|
return Kr(e);
|
1367
1367
|
}
|
1368
1368
|
}
|
1369
1369
|
function tn(e, s) {
|
1370
|
-
return s = s ?? a, !!s && (typeof e == "number" ||
|
1370
|
+
return s = s ?? a, !!s && (typeof e == "number" || $t.test(e)) && e > -1 && e % 1 == 0 && e < s;
|
1371
1371
|
}
|
1372
1372
|
function en(e) {
|
1373
1373
|
var s = typeof e;
|
1374
1374
|
return s == "string" || s == "number" || s == "symbol" || s == "boolean" ? e !== "__proto__" : e === null;
|
1375
1375
|
}
|
1376
1376
|
function rn(e) {
|
1377
|
-
return !!
|
1377
|
+
return !!Et && Et in e;
|
1378
1378
|
}
|
1379
1379
|
function tr(e) {
|
1380
|
-
var s = e && e.constructor, o = typeof s == "function" && s.prototype ||
|
1380
|
+
var s = e && e.constructor, o = typeof s == "function" && s.prototype || Ht;
|
1381
1381
|
return e === o;
|
1382
1382
|
}
|
1383
|
-
function
|
1383
|
+
function ft(e) {
|
1384
1384
|
if (e != null) {
|
1385
1385
|
try {
|
1386
|
-
return
|
1386
|
+
return Ut.call(e);
|
1387
1387
|
} catch {
|
1388
1388
|
}
|
1389
1389
|
try {
|
@@ -1394,13 +1394,13 @@ dr.exports;
|
|
1394
1394
|
return "";
|
1395
1395
|
}
|
1396
1396
|
function er(e) {
|
1397
|
-
return
|
1397
|
+
return Oe(e, !0, !0);
|
1398
1398
|
}
|
1399
1399
|
function rr(e, s) {
|
1400
1400
|
return e === s || e !== e && s !== s;
|
1401
1401
|
}
|
1402
1402
|
function be(e) {
|
1403
|
-
return nn(e) && _t.call(e, "callee") && (!Ke.call(e, "callee") ||
|
1403
|
+
return nn(e) && _t.call(e, "callee") && (!Ke.call(e, "callee") || xt.call(e) == c);
|
1404
1404
|
}
|
1405
1405
|
var Re = Array.isArray;
|
1406
1406
|
function _e(e) {
|
@@ -1411,13 +1411,13 @@ dr.exports;
|
|
1411
1411
|
}
|
1412
1412
|
var nr = pe || an;
|
1413
1413
|
function Fe(e) {
|
1414
|
-
var s =
|
1415
|
-
return s ==
|
1414
|
+
var s = Pt(e) ? xt.call(e) : "";
|
1415
|
+
return s == T || s == E;
|
1416
1416
|
}
|
1417
1417
|
function ir(e) {
|
1418
1418
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= a;
|
1419
1419
|
}
|
1420
|
-
function
|
1420
|
+
function Pt(e) {
|
1421
1421
|
var s = typeof e;
|
1422
1422
|
return !!e && (s == "object" || s == "function");
|
1423
1423
|
}
|
@@ -1436,7 +1436,7 @@ dr.exports;
|
|
1436
1436
|
t.exports = er;
|
1437
1437
|
})(dr, dr.exports);
|
1438
1438
|
var ns = dr.exports;
|
1439
|
-
const
|
1439
|
+
const K = /* @__PURE__ */ Tn(ns), ni = (t) => new Promise((r, n) => {
|
1440
1440
|
const i = new Image();
|
1441
1441
|
console.warn("update cdn config for cors?"), i.onload = () => {
|
1442
1442
|
const a = i.width, c = i.height;
|
@@ -1488,12 +1488,12 @@ function ve(t = 16) {
|
|
1488
1488
|
let i = lr(t - 1);
|
1489
1489
|
return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
|
1490
1490
|
}
|
1491
|
-
const
|
1491
|
+
const gr = {
|
1492
1492
|
color: "#000000",
|
1493
1493
|
x: 0,
|
1494
1494
|
y: 0,
|
1495
1495
|
blur: 0
|
1496
|
-
},
|
1496
|
+
}, Ge = (t, r) => {
|
1497
1497
|
let n = r != null && r.trim ? r.trim.to - r.trim.from : (r == null ? void 0 : r.duration) || 5e3;
|
1498
1498
|
const i = {
|
1499
1499
|
from: 0,
|
@@ -1564,7 +1564,7 @@ const oi = async (t, r) => {
|
|
1564
1564
|
// Default border width
|
1565
1565
|
borderColor: t.details.borderColor || "#000000",
|
1566
1566
|
// Default border color
|
1567
|
-
boxShadow: t.details.boxShadow ||
|
1567
|
+
boxShadow: t.details.boxShadow || gr,
|
1568
1568
|
top: t.details.top || a.top || "0px",
|
1569
1569
|
// Default top
|
1570
1570
|
left: t.details.left || a.left || "0px",
|
@@ -1576,9 +1576,7 @@ const oi = async (t, r) => {
|
|
1576
1576
|
flipX: t.details.flipX || !1,
|
1577
1577
|
flipY: t.details.flipY || !1,
|
1578
1578
|
rotate: t.details.rotate || "0deg",
|
1579
|
-
visibility: t.details.visibility || "visible"
|
1580
|
-
mediaWidth: t.details.mediaWidth || i.width || 100,
|
1581
|
-
mediaHeight: t.details.mediaHeight || i.height || 100
|
1579
|
+
visibility: t.details.visibility || "visible"
|
1582
1580
|
};
|
1583
1581
|
return {
|
1584
1582
|
...t,
|
@@ -1587,7 +1585,7 @@ const oi = async (t, r) => {
|
|
1587
1585
|
name: "video",
|
1588
1586
|
details: d,
|
1589
1587
|
playbackRate: t.playbackRate || 1,
|
1590
|
-
display:
|
1588
|
+
display: Ge(t.display, { duration: i.duration, trim: c }),
|
1591
1589
|
duration: i.duration
|
1592
1590
|
};
|
1593
1591
|
}, ci = async (t) => {
|
@@ -1596,7 +1594,7 @@ const oi = async (t, r) => {
|
|
1596
1594
|
id: r,
|
1597
1595
|
name: "",
|
1598
1596
|
type: "audio",
|
1599
|
-
display:
|
1597
|
+
display: Ge(t.display, { duration: a, trim: c }),
|
1600
1598
|
trim: c,
|
1601
1599
|
playbackRate: t.playbackRate || 1,
|
1602
1600
|
details: {
|
@@ -1608,21 +1606,21 @@ const oi = async (t, r) => {
|
|
1608
1606
|
duration: a
|
1609
1607
|
};
|
1610
1608
|
}, as = async (t, r) => {
|
1611
|
-
var
|
1609
|
+
var E, y, w;
|
1612
1610
|
const n = t.trackItemIds, i = t.size || {
|
1613
1611
|
width: t.details.width,
|
1614
1612
|
height: t.details.height
|
1615
1613
|
}, a = Math.min(
|
1616
1614
|
r.size.width / i.width,
|
1617
1615
|
r.size.height / i.height
|
1618
|
-
), c = ((
|
1619
|
-
top: ((
|
1620
|
-
left: ((
|
1621
|
-
}, p = t.display,
|
1622
|
-
let
|
1623
|
-
return n.forEach((
|
1624
|
-
const u = t.trackItemsMap[
|
1625
|
-
u.display.from <
|
1616
|
+
), c = ((E = t.details) == null ? void 0 : E.rotate) || 0, d = {
|
1617
|
+
top: ((y = t.details) == null ? void 0 : y.top) || 0,
|
1618
|
+
left: ((w = t.details) == null ? void 0 : w.left) || 0
|
1619
|
+
}, p = t.display, S = t.trim || t.display;
|
1620
|
+
let F = 1 / 0, T = 0;
|
1621
|
+
return n.forEach((x) => {
|
1622
|
+
const u = t.trackItemsMap[x];
|
1623
|
+
u.display.from < F && (F = u.display.from), u.display.to > T && (T = u.display.to);
|
1626
1624
|
}), {
|
1627
1625
|
id: t.id,
|
1628
1626
|
details: {
|
@@ -1632,8 +1630,8 @@ const oi = async (t, r) => {
|
|
1632
1630
|
scale: a,
|
1633
1631
|
rotate: c
|
1634
1632
|
},
|
1635
|
-
trim:
|
1636
|
-
display: p || { from:
|
1633
|
+
trim: S,
|
1634
|
+
display: p || { from: F, to: T },
|
1637
1635
|
activeEdit: !1
|
1638
1636
|
};
|
1639
1637
|
}, ui = async (t, r) => {
|
@@ -1642,7 +1640,7 @@ const oi = async (t, r) => {
|
|
1642
1640
|
id: t.id,
|
1643
1641
|
type: "image",
|
1644
1642
|
name: "image",
|
1645
|
-
display:
|
1643
|
+
display: Ge(t.display),
|
1646
1644
|
playbackRate: t.playbackRate || 1,
|
1647
1645
|
details: {
|
1648
1646
|
src: n.src || "",
|
@@ -1659,7 +1657,7 @@ const oi = async (t, r) => {
|
|
1659
1657
|
// Default border
|
1660
1658
|
borderRadius: n.borderRadius || 0,
|
1661
1659
|
// Default border radius
|
1662
|
-
boxShadow: n.boxShadow ||
|
1660
|
+
boxShadow: n.boxShadow || gr,
|
1663
1661
|
// Default box shadow
|
1664
1662
|
top: n.top || a.top || "0px",
|
1665
1663
|
// Default top
|
@@ -1674,9 +1672,7 @@ const oi = async (t, r) => {
|
|
1674
1672
|
flipX: n.flipX || !1,
|
1675
1673
|
flipY: n.flipY || !1,
|
1676
1674
|
rotate: n.rotate || "0deg",
|
1677
|
-
visibility: n.visibility || "visible"
|
1678
|
-
mediaWidth: n.mediaWidth || n.width || i.width || 100,
|
1679
|
-
mediaHeight: n.mediaHeight || n.height || i.height || 100
|
1675
|
+
visibility: n.visibility || "visible"
|
1680
1676
|
},
|
1681
1677
|
metadata: t.metadata || {}
|
1682
1678
|
};
|
@@ -1696,7 +1692,7 @@ const oi = async (t, r) => {
|
|
1696
1692
|
id: i,
|
1697
1693
|
name: "caption",
|
1698
1694
|
type: "caption",
|
1699
|
-
display:
|
1695
|
+
display: Ge(n.display),
|
1700
1696
|
details: {
|
1701
1697
|
...c,
|
1702
1698
|
text: a.text || "",
|
@@ -1708,7 +1704,7 @@ const oi = async (t, r) => {
|
|
1708
1704
|
left: c.left || p.left,
|
1709
1705
|
borderWidth: a.borderWidth || 0,
|
1710
1706
|
borderColor: a.borderColor || "#000000",
|
1711
|
-
boxShadow: a.boxShadow ||
|
1707
|
+
boxShadow: a.boxShadow || gr,
|
1712
1708
|
words: a.words || []
|
1713
1709
|
},
|
1714
1710
|
metadata: t.metadata || {}
|
@@ -1728,7 +1724,7 @@ const oi = async (t, r) => {
|
|
1728
1724
|
id: n,
|
1729
1725
|
name: "text",
|
1730
1726
|
type: "text",
|
1731
|
-
display:
|
1727
|
+
display: Ge(t.display),
|
1732
1728
|
details: {
|
1733
1729
|
...a,
|
1734
1730
|
text: i.text || "",
|
@@ -1740,7 +1736,7 @@ const oi = async (t, r) => {
|
|
1740
1736
|
left: a.left || d.left,
|
1741
1737
|
borderWidth: i.borderWidth || 0,
|
1742
1738
|
borderColor: i.borderColor || "#000000",
|
1743
|
-
boxShadow: i.boxShadow ||
|
1739
|
+
boxShadow: i.boxShadow || gr
|
1744
1740
|
},
|
1745
1741
|
metadata: {}
|
1746
1742
|
};
|
@@ -1831,28 +1827,28 @@ function ls(t, r) {
|
|
1831
1827
|
return i;
|
1832
1828
|
});
|
1833
1829
|
}
|
1834
|
-
const
|
1830
|
+
const ae = (t) => Object.keys(t).reduce((r, n) => {
|
1835
1831
|
const { display: i, playbackRate: a } = t[n];
|
1836
1832
|
return Math.max(r, i.to / (a || 1));
|
1837
1833
|
}, 0);
|
1838
|
-
function
|
1834
|
+
function gn(t, r, n) {
|
1839
1835
|
return Math.min(Math.max(t, r), n);
|
1840
1836
|
}
|
1841
1837
|
const fs = (t, r, n, i, a) => {
|
1842
1838
|
if (i === void 0 && a === void 0)
|
1843
1839
|
return { trackId: void 0, trackIndex: void 0 };
|
1844
|
-
const c = a !== void 0 ? r[
|
1840
|
+
const c = a !== void 0 ? r[gn(a, 0, r.length)] : r.find((S) => S.id === i);
|
1845
1841
|
if (!c)
|
1846
1842
|
return {
|
1847
1843
|
trackId: void 0,
|
1848
|
-
trackIndex: a !== void 0 ?
|
1844
|
+
trackIndex: a !== void 0 ? gn(a, 0, r.length) : void 0
|
1849
1845
|
};
|
1850
|
-
const d = c.items.map((
|
1851
|
-
for (const
|
1852
|
-
const
|
1853
|
-
for (const
|
1854
|
-
const
|
1855
|
-
if (!(
|
1846
|
+
const d = c.items.map((S) => n[S]), p = t.map((S) => n[S]);
|
1847
|
+
for (const S of d) {
|
1848
|
+
const F = S.display.from, T = S.display.to;
|
1849
|
+
for (const E of p) {
|
1850
|
+
const y = E.display.from;
|
1851
|
+
if (!(E.display.to <= F || y >= T))
|
1856
1852
|
return {
|
1857
1853
|
trackId: void 0,
|
1858
1854
|
trackIndex: r.indexOf(c)
|
@@ -1875,59 +1871,66 @@ function ds(t, r) {
|
|
1875
1871
|
});
|
1876
1872
|
}
|
1877
1873
|
function ps(t) {
|
1878
|
-
const r = t, n = r.tracks, i = r.trackItemsMap, a = [], c = {};
|
1879
|
-
return n.forEach((
|
1880
|
-
var
|
1881
|
-
const
|
1882
|
-
for (let
|
1883
|
-
const
|
1884
|
-
if (Math.abs(
|
1885
|
-
const
|
1886
|
-
if ((
|
1887
|
-
c[
|
1874
|
+
const r = t, n = r.tracks, i = r.trackItemsMap, a = [], c = {}, d = r.structure;
|
1875
|
+
return n.forEach((p) => {
|
1876
|
+
var F;
|
1877
|
+
const S = p.items.map((T) => i[T]).sort((T, E) => T.display.from - E.display.from);
|
1878
|
+
for (let T = 0; T < S.length - 1; T++) {
|
1879
|
+
const E = S[T], y = S[T + 1];
|
1880
|
+
if (Math.abs(E.display.to - y.display.from) <= 1) {
|
1881
|
+
const w = `${E.id}-${y.id}`;
|
1882
|
+
if ((F = r.transitionIds) == null ? void 0 : F.includes(w))
|
1883
|
+
c[w] = r.transitionsMap[w];
|
1888
1884
|
else {
|
1889
|
-
const
|
1890
|
-
id:
|
1885
|
+
const u = {
|
1886
|
+
id: w,
|
1891
1887
|
duration: 1500,
|
1892
|
-
fromId:
|
1893
|
-
toId:
|
1888
|
+
fromId: E.id,
|
1889
|
+
toId: y.id,
|
1894
1890
|
kind: "none",
|
1895
|
-
trackId:
|
1891
|
+
trackId: p.id,
|
1896
1892
|
type: "transition"
|
1897
1893
|
};
|
1898
|
-
c[
|
1894
|
+
c[w] = u;
|
1899
1895
|
}
|
1900
|
-
a.push(
|
1896
|
+
a.push(w);
|
1901
1897
|
}
|
1902
1898
|
}
|
1899
|
+
}), d.forEach((p) => {
|
1900
|
+
p.transitions.forEach((S) => {
|
1901
|
+
c[S] = {
|
1902
|
+
...r.transitionsMap[S],
|
1903
|
+
trackId: p.id
|
1904
|
+
};
|
1905
|
+
});
|
1903
1906
|
}), r.transitionIds = a, r.transitionsMap = c, {
|
1904
1907
|
transitionIds: a,
|
1905
1908
|
transitionsMap: c
|
1906
1909
|
};
|
1907
1910
|
}
|
1908
1911
|
function hs(t) {
|
1909
|
-
const r =
|
1910
|
-
|
1911
|
-
), n =
|
1912
|
-
|
1913
|
-
), i =
|
1914
|
-
|
1915
|
-
), a =
|
1916
|
-
|
1917
|
-
), c =
|
1918
|
-
|
1919
|
-
), d =
|
1920
|
-
|
1921
|
-
), p =
|
1922
|
-
|
1923
|
-
),
|
1924
|
-
var f,
|
1925
|
-
if (u.key ===
|
1926
|
-
const b = (f = u.value) == null ? void 0 : f.payload,
|
1912
|
+
const r = ne.pipe(
|
1913
|
+
ie(({ key: u }) => u.startsWith(En))
|
1914
|
+
), n = ne.pipe(
|
1915
|
+
ie(({ key: u }) => u.startsWith(kt))
|
1916
|
+
), i = ne.pipe(
|
1917
|
+
ie(({ key: u }) => u.startsWith(dt))
|
1918
|
+
), a = ne.pipe(
|
1919
|
+
ie(({ key: u }) => u.startsWith(Ir))
|
1920
|
+
), c = ne.pipe(
|
1921
|
+
ie(({ key: u }) => u.startsWith(Se))
|
1922
|
+
), d = ne.pipe(
|
1923
|
+
ie(({ key: u }) => u.startsWith(fe))
|
1924
|
+
), p = ne.pipe(
|
1925
|
+
ie(({ key: u }) => u.startsWith(ri))
|
1926
|
+
), S = r.subscribe(async (u) => {
|
1927
|
+
var f, g;
|
1928
|
+
if (u.key === Ni) {
|
1929
|
+
const b = (f = u.value) == null ? void 0 : f.payload, m = b.trackItemsMap, h = b.trackItemDetailsMap;
|
1927
1930
|
console.warn("IMPROVE FONTS LOADING");
|
1928
|
-
for (const
|
1929
|
-
if (h[
|
1930
|
-
const v = h[
|
1931
|
+
for (const I in h)
|
1932
|
+
if (h[I].type === "text" || h[I].type === "caption") {
|
1933
|
+
const v = h[I].details;
|
1931
1934
|
await pr([
|
1932
1935
|
{
|
1933
1936
|
fontFamily: v.fontFamily,
|
@@ -1935,7 +1938,7 @@ function hs(t) {
|
|
1935
1938
|
}
|
1936
1939
|
]);
|
1937
1940
|
}
|
1938
|
-
const _ =
|
1941
|
+
const _ = ae(m);
|
1939
1942
|
t.updateState(
|
1940
1943
|
{
|
1941
1944
|
...b,
|
@@ -1947,8 +1950,8 @@ function hs(t) {
|
|
1947
1950
|
}
|
1948
1951
|
);
|
1949
1952
|
}
|
1950
|
-
if (u.key ===
|
1951
|
-
const b = (
|
1953
|
+
if (u.key === Li) {
|
1954
|
+
const b = (g = u.value) == null ? void 0 : g.payload;
|
1952
1955
|
t.updateState(
|
1953
1956
|
{
|
1954
1957
|
size: b
|
@@ -1959,16 +1962,16 @@ function hs(t) {
|
|
1959
1962
|
}
|
1960
1963
|
);
|
1961
1964
|
}
|
1962
|
-
}),
|
1965
|
+
}), F = a.subscribe((u) => {
|
1963
1966
|
if (u.key === ts) return t.undo();
|
1964
1967
|
if (u.key === es) return t.redo();
|
1965
|
-
}),
|
1968
|
+
}), T = p.subscribe((u) => {
|
1966
1969
|
var f;
|
1967
1970
|
if (u.key === rs) {
|
1968
|
-
const
|
1971
|
+
const g = (f = u.value) == null ? void 0 : f.payload.scale;
|
1969
1972
|
t.updateState(
|
1970
1973
|
{
|
1971
|
-
scale:
|
1974
|
+
scale: g
|
1972
1975
|
},
|
1973
1976
|
{
|
1974
1977
|
kind: "update",
|
@@ -1976,106 +1979,113 @@ function hs(t) {
|
|
1976
1979
|
}
|
1977
1980
|
);
|
1978
1981
|
}
|
1979
|
-
}),
|
1980
|
-
var
|
1982
|
+
}), E = i.subscribe((u) => {
|
1983
|
+
var g, b, m, h;
|
1981
1984
|
const f = [];
|
1982
|
-
if ((
|
1985
|
+
if ((g = u.value) != null && g.payload.trackItemIds && (f.push((b = u.value) == null ? void 0 : b.payload.trackItemIds), t.updateState(
|
1983
1986
|
{ activeIds: f },
|
1984
1987
|
{
|
1985
1988
|
kind: "update",
|
1986
1989
|
updateHistory: !1
|
1987
1990
|
}
|
1988
1991
|
)), u.key === Qi) {
|
1989
|
-
const _ = (
|
1990
|
-
|
1991
|
-
|
1992
|
-
|
1993
|
-
|
1994
|
-
|
1995
|
-
|
1996
|
-
|
1997
|
-
|
1998
|
-
|
1999
|
-
|
1992
|
+
const _ = (m = u.value) == null ? void 0 : m.payload.trackItemIds, I = K(t.getState()), v = _ && _.length ? _ : I.activeIds, U = v.map((O) => I.transitionsMap[O]).filter((O) => !!O).map((O) => O.id), D = v.map((O) => I.trackItemsMap[O]).filter((O) => !!O).map((O) => O.id), j = I.transitionIds.filter(
|
1993
|
+
(O) => {
|
1994
|
+
const A = I.transitionsMap[O];
|
1995
|
+
return D.includes(A.fromId) || D.includes(A.toId);
|
1996
|
+
}
|
1997
|
+
);
|
1998
|
+
D.push(...j, ...U);
|
1999
|
+
const z = I.trackItemIds, R = I.transitionIds, W = I.trackItemDetailsMap, M = K(I.tracks), C = K(I.structure);
|
2000
|
+
D.forEach((O) => {
|
2001
|
+
var Q;
|
2002
|
+
const A = I.trackItemsMap[O] || I.transitionsMap[O];
|
2003
|
+
if (A.type === "template") {
|
2004
|
+
const wt = (Q = I.structure.find(
|
2005
|
+
(Tt) => Tt.id === A.id
|
2006
|
+
)) == null ? void 0 : Q.items;
|
2007
|
+
D.push(...wt);
|
2008
|
+
const st = C.findIndex(
|
2009
|
+
(Tt) => Tt.id === A.id
|
2000
2010
|
);
|
2001
|
-
|
2011
|
+
C.splice(st, 1);
|
2002
2012
|
}
|
2003
|
-
}),
|
2004
|
-
|
2005
|
-
|
2013
|
+
}), D.forEach((O) => {
|
2014
|
+
C.forEach((A) => {
|
2015
|
+
A.items.includes(O) && (A.items = A.items.filter((Q) => Q !== O));
|
2006
2016
|
});
|
2007
2017
|
});
|
2008
|
-
const
|
2009
|
-
(
|
2010
|
-
),
|
2011
|
-
(
|
2012
|
-
),
|
2013
|
-
Object.entries(
|
2014
|
-
([
|
2018
|
+
const nt = z.filter(
|
2019
|
+
(O) => !D.includes(O)
|
2020
|
+
), Nt = R.filter(
|
2021
|
+
(O) => !D.includes(O)
|
2022
|
+
), Lt = Object.fromEntries(
|
2023
|
+
Object.entries(W).filter(
|
2024
|
+
([O]) => !D.includes(O)
|
2015
2025
|
)
|
2016
|
-
),
|
2017
|
-
Object.entries(
|
2018
|
-
([
|
2026
|
+
), $t = Object.fromEntries(
|
2027
|
+
Object.entries(I.transitionsMap).filter(
|
2028
|
+
([O]) => !D.includes(O)
|
2019
2029
|
)
|
2020
|
-
),
|
2021
|
-
|
2022
|
-
|
2023
|
-
),
|
2024
|
-
Object.entries(
|
2025
|
-
([
|
2030
|
+
), L = ls(
|
2031
|
+
I.tracks,
|
2032
|
+
D
|
2033
|
+
), yt = Object.fromEntries(
|
2034
|
+
Object.entries(I.trackItemsMap).filter(
|
2035
|
+
([O]) => !D.includes(O)
|
2026
2036
|
)
|
2027
2037
|
);
|
2028
|
-
|
2029
|
-
let
|
2030
|
-
|
2031
|
-
if (
|
2032
|
-
const
|
2033
|
-
|
2034
|
-
from:
|
2035
|
-
to:
|
2036
|
-
},
|
2038
|
+
M.filter((O) => O.magnetic).forEach((O) => {
|
2039
|
+
let A = 0;
|
2040
|
+
O == null || O.items.forEach((Q) => {
|
2041
|
+
if (yt[Q]) {
|
2042
|
+
const wt = yt[Q].display.to - yt[Q].display.from;
|
2043
|
+
yt[Q].display = {
|
2044
|
+
from: A,
|
2045
|
+
to: A + wt
|
2046
|
+
}, A += wt;
|
2037
2047
|
}
|
2038
2048
|
});
|
2039
2049
|
});
|
2040
|
-
const
|
2050
|
+
const it = ae(yt);
|
2041
2051
|
t.updateState(
|
2042
2052
|
{
|
2043
|
-
trackItemIds:
|
2044
|
-
trackItemDetailsMap:
|
2053
|
+
trackItemIds: nt,
|
2054
|
+
trackItemDetailsMap: Lt,
|
2045
2055
|
activeIds: [],
|
2046
|
-
trackItemsMap:
|
2047
|
-
tracks:
|
2048
|
-
duration:
|
2049
|
-
structure:
|
2050
|
-
transitionIds:
|
2051
|
-
transitionsMap:
|
2056
|
+
trackItemsMap: yt,
|
2057
|
+
tracks: L,
|
2058
|
+
duration: it,
|
2059
|
+
structure: C,
|
2060
|
+
transitionIds: Nt,
|
2061
|
+
transitionsMap: $t
|
2052
2062
|
},
|
2053
2063
|
{ updateHistory: !0, kind: "remove" }
|
2054
2064
|
);
|
2055
2065
|
}
|
2056
2066
|
if (u.key === Zi) {
|
2057
|
-
const _ =
|
2067
|
+
const _ = K(t.getState()), I = {}, v = ((h = u.value) == null ? void 0 : h.payload.trackItemIds) || _.activeIds;
|
2058
2068
|
if (v.length === 0) return;
|
2059
|
-
v.forEach((
|
2060
|
-
const
|
2061
|
-
_.trackItemsMap[
|
2062
|
-
...
|
2063
|
-
id:
|
2064
|
-
}, _.trackItemDetailsMap[
|
2065
|
-
...
|
2066
|
-
}, _.trackItemIds.push(
|
2067
|
-
const
|
2068
|
-
(
|
2069
|
+
v.forEach((D) => {
|
2070
|
+
const j = _.trackItemsMap[D], z = _.trackItemDetailsMap[D], R = ve();
|
2071
|
+
_.trackItemsMap[R] = {
|
2072
|
+
...K(j),
|
2073
|
+
id: R
|
2074
|
+
}, _.trackItemDetailsMap[R] = {
|
2075
|
+
...K(z)
|
2076
|
+
}, _.trackItemIds.push(R);
|
2077
|
+
const W = _.tracks.find(
|
2078
|
+
(M) => M.items.includes(D)
|
2069
2079
|
);
|
2070
|
-
|
2071
|
-
...
|
2080
|
+
I[W.id] ? I[W.id].items.push(R) : I[W.id] = {
|
2081
|
+
...W,
|
2072
2082
|
id: ve(),
|
2073
|
-
items: [
|
2083
|
+
items: [R],
|
2074
2084
|
static: !1,
|
2075
2085
|
magnetic: !1
|
2076
2086
|
};
|
2077
2087
|
});
|
2078
|
-
const U = Object.values(
|
2088
|
+
const U = Object.values(I);
|
2079
2089
|
_.tracks = [...U, ..._.tracks], t.updateState(
|
2080
2090
|
{
|
2081
2091
|
trackItemDetailsMap: _.trackItemDetailsMap,
|
@@ -2089,63 +2099,63 @@ function hs(t) {
|
|
2089
2099
|
}
|
2090
2100
|
);
|
2091
2101
|
}
|
2092
|
-
}),
|
2093
|
-
var U,
|
2094
|
-
const f =
|
2095
|
-
let
|
2096
|
-
const _ = (
|
2097
|
-
let
|
2102
|
+
}), y = n.subscribe(async (u) => {
|
2103
|
+
var U, D, j, z, R, W, M, C, nt, Nt, Lt, $t, L, yt, Bt, it, O, A, Q, wt, st, Tt, Kt;
|
2104
|
+
const f = K(t.getState()), g = ((D = (U = u.value) == null ? void 0 : U.options) == null ? void 0 : D.isSelected) || !1, b = (z = (j = u.value) == null ? void 0 : j.options) == null ? void 0 : z.scaleMode;
|
2105
|
+
let m = [], h = "text";
|
2106
|
+
const _ = (W = (R = u.value) == null ? void 0 : R.options) == null ? void 0 : W.trackId;
|
2107
|
+
let I = (C = (M = u.value) == null ? void 0 : M.options) == null ? void 0 : C.trackIndex;
|
2098
2108
|
if (u.key === Bi) {
|
2099
|
-
const
|
2100
|
-
(
|
2109
|
+
const Y = (nt = u.value) == null ? void 0 : nt.payload, B = Y.trackItems.map(
|
2110
|
+
(X) => os(X, {
|
2101
2111
|
size: f.size
|
2102
2112
|
})
|
2103
|
-
),
|
2104
|
-
if (
|
2105
|
-
const { details:
|
2106
|
-
|
2107
|
-
type:
|
2108
|
-
details:
|
2109
|
-
},
|
2113
|
+
), N = await Promise.all(B), pt = us(Y.tracks, Y.trackItems), lt = [], tt = {}, It = {};
|
2114
|
+
if (N.forEach((X) => {
|
2115
|
+
const { details: Et, ...Ut } = X;
|
2116
|
+
lt.push(X.id), tt[X.id] = {
|
2117
|
+
type: X.type,
|
2118
|
+
details: Et
|
2119
|
+
}, It[X.id] = Ut;
|
2110
2120
|
}), cs(
|
2111
2121
|
f.tracks,
|
2112
|
-
|
2122
|
+
pt
|
2113
2123
|
))
|
2114
|
-
f.tracks.forEach((
|
2115
|
-
|
2116
|
-
if (
|
2117
|
-
if (
|
2118
|
-
const
|
2119
|
-
(
|
2124
|
+
f.tracks.forEach((X) => {
|
2125
|
+
pt.forEach((Et) => {
|
2126
|
+
if (X.id === Et.id) {
|
2127
|
+
if (X.magnetic) {
|
2128
|
+
const Ut = Et.items.map((xt) => It[xt]), _t = X.items.map(
|
2129
|
+
(xt) => f.trackItemsMap[xt]
|
2120
2130
|
);
|
2121
2131
|
ds(
|
2122
|
-
|
2132
|
+
Ut,
|
2123
2133
|
_t
|
2124
2134
|
);
|
2125
2135
|
}
|
2126
|
-
|
2136
|
+
X.items.push(...lt);
|
2127
2137
|
}
|
2128
2138
|
});
|
2129
2139
|
});
|
2130
2140
|
else {
|
2131
|
-
const
|
2132
|
-
|
2141
|
+
const X = ((Lt = (Nt = u.value) == null ? void 0 : Nt.options) == null ? void 0 : Lt.trackIndex) || 0, Et = gn(
|
2142
|
+
X,
|
2133
2143
|
0,
|
2134
2144
|
f.tracks.length
|
2135
2145
|
);
|
2136
|
-
f.tracks.splice(
|
2146
|
+
f.tracks.splice(Et, 0, ...pt);
|
2137
2147
|
}
|
2138
2148
|
f.trackItemDetailsMap = {
|
2139
2149
|
...f.trackItemDetailsMap,
|
2140
|
-
...
|
2150
|
+
...tt
|
2141
2151
|
}, f.trackItemsMap = {
|
2142
2152
|
...f.trackItemsMap,
|
2143
|
-
...
|
2153
|
+
...It
|
2144
2154
|
}, f.trackItemIds = [
|
2145
2155
|
...f.trackItemIds,
|
2146
|
-
...
|
2147
|
-
], f.duration =
|
2148
|
-
const { transitionIds:
|
2156
|
+
...lt
|
2157
|
+
], f.duration = ae(f.trackItemsMap);
|
2158
|
+
const { transitionIds: Xt, transitionsMap: Ht } = ps(
|
2149
2159
|
f
|
2150
2160
|
);
|
2151
2161
|
t.updateState(
|
@@ -2155,8 +2165,8 @@ function hs(t) {
|
|
2155
2165
|
trackItemsMap: f.trackItemsMap,
|
2156
2166
|
tracks: f.tracks,
|
2157
2167
|
duration: f.duration,
|
2158
|
-
transitionIds:
|
2159
|
-
transitionsMap:
|
2168
|
+
transitionIds: Xt,
|
2169
|
+
transitionsMap: Ht
|
2160
2170
|
},
|
2161
2171
|
{
|
2162
2172
|
updateHistory: !0,
|
@@ -2165,114 +2175,114 @@ function hs(t) {
|
|
2165
2175
|
);
|
2166
2176
|
return;
|
2167
2177
|
}
|
2168
|
-
if (u.key ===
|
2178
|
+
if (u.key === Wi) {
|
2169
2179
|
h = "caption";
|
2170
|
-
const
|
2171
|
-
for (const
|
2172
|
-
const
|
2180
|
+
const Y = ($t = u.value) == null ? void 0 : $t.payload, B = [];
|
2181
|
+
for (const lt of Y) {
|
2182
|
+
const tt = li(lt, {
|
2173
2183
|
size: f.size
|
2174
2184
|
});
|
2175
|
-
|
2185
|
+
B.push(tt);
|
2176
2186
|
}
|
2177
|
-
const
|
2178
|
-
for (const
|
2179
|
-
const
|
2180
|
-
|
2181
|
-
const { details:
|
2182
|
-
f.trackItemDetailsMap[
|
2187
|
+
const N = await Promise.all(B), pt = [];
|
2188
|
+
for (const lt of N) {
|
2189
|
+
const tt = lt.id;
|
2190
|
+
pt.push(tt);
|
2191
|
+
const { details: It, ...at } = lt;
|
2192
|
+
f.trackItemDetailsMap[tt] = {
|
2183
2193
|
type: h,
|
2184
|
-
details:
|
2185
|
-
}, f.trackItemsMap[
|
2194
|
+
details: It
|
2195
|
+
}, f.trackItemsMap[tt] = at, f.trackItemIds.push(tt);
|
2186
2196
|
}
|
2187
|
-
|
2197
|
+
m = pt;
|
2188
2198
|
}
|
2189
|
-
if (u.key ===
|
2199
|
+
if (u.key === $i) {
|
2190
2200
|
h = "text";
|
2191
|
-
const
|
2201
|
+
const Y = await fi((L = u.value) == null ? void 0 : L.payload, {
|
2192
2202
|
size: f.size
|
2193
|
-
}), { details:
|
2194
|
-
f.trackItemDetailsMap[
|
2203
|
+
}), { details: B, ...N } = Y;
|
2204
|
+
f.trackItemDetailsMap[N.id] = {
|
2195
2205
|
type: h,
|
2196
|
-
details:
|
2197
|
-
}, f.trackItemsMap[
|
2206
|
+
details: B
|
2207
|
+
}, f.trackItemsMap[N.id] = N, f.trackItemIds.push(N.id), m = [N.id];
|
2198
2208
|
}
|
2199
2209
|
if (u.key === Yi) {
|
2200
2210
|
h = "template";
|
2201
|
-
const
|
2211
|
+
const Y = (yt = u.value) == null ? void 0 : yt.payload.trackItemsMap, B = (Bt = u.value) == null ? void 0 : Bt.payload.trackItemDetailsMap, N = (it = u.value) == null ? void 0 : it.payload.transitionsMap, pt = ((O = u.value) == null ? void 0 : O.payload.transitionIds) || [], lt = (A = u.value) == null ? void 0 : A.payload.trackItemIds, tt = ((Q = u.value) == null ? void 0 : Q.payload.tracks) || [], { details: It, ...at } = await as((wt = u.value) == null ? void 0 : wt.payload, {
|
2202
2212
|
size: f.size
|
2203
|
-
}),
|
2204
|
-
id:
|
2205
|
-
items:
|
2206
|
-
transitions:
|
2207
|
-
tracks:
|
2213
|
+
}), Xt = {
|
2214
|
+
id: at.id,
|
2215
|
+
items: lt,
|
2216
|
+
transitions: pt,
|
2217
|
+
tracks: tt
|
2208
2218
|
};
|
2209
|
-
f.trackItemDetailsMap[
|
2219
|
+
f.trackItemDetailsMap[at.id] = {
|
2210
2220
|
type: h,
|
2211
|
-
details:
|
2212
|
-
}, f.trackItemsMap[
|
2221
|
+
details: It
|
2222
|
+
}, f.trackItemsMap[at.id] = at, f.trackItemIds.push(at.id), m = [at.id], f.trackItemsMap = {
|
2213
2223
|
...f.trackItemsMap,
|
2214
|
-
...
|
2215
|
-
[
|
2224
|
+
...Y,
|
2225
|
+
[at.id]: {
|
2216
2226
|
type: "template",
|
2217
|
-
...
|
2227
|
+
...at
|
2218
2228
|
}
|
2219
2229
|
}, f.trackItemDetailsMap = {
|
2220
2230
|
...f.trackItemDetailsMap,
|
2221
|
-
...
|
2222
|
-
[
|
2231
|
+
...B,
|
2232
|
+
[at.id]: {
|
2223
2233
|
type: "template",
|
2224
|
-
details:
|
2234
|
+
details: It
|
2225
2235
|
}
|
2226
2236
|
}, f.transitionsMap = {
|
2227
2237
|
...f.transitionsMap,
|
2228
|
-
...
|
2229
|
-
}, f.structure = [...f.structure,
|
2238
|
+
...N
|
2239
|
+
}, f.structure = [...f.structure, Xt];
|
2230
2240
|
}
|
2231
|
-
if (u.key ===
|
2241
|
+
if (u.key === Gi) {
|
2232
2242
|
h = "image";
|
2233
|
-
const
|
2243
|
+
const Y = await ui((st = u.value) == null ? void 0 : st.payload, {
|
2234
2244
|
size: f.size,
|
2235
2245
|
scaleMode: b
|
2236
|
-
}), { details:
|
2237
|
-
f.trackItemDetailsMap[
|
2246
|
+
}), { details: B, ...N } = Y;
|
2247
|
+
f.trackItemDetailsMap[N.id] = {
|
2238
2248
|
type: h,
|
2239
|
-
details:
|
2240
|
-
}, f.trackItemsMap[
|
2249
|
+
details: B
|
2250
|
+
}, f.trackItemsMap[N.id] = N, f.trackItemIds.push(N.id), m = [N.id];
|
2241
2251
|
}
|
2242
2252
|
if (u.key === Ui) {
|
2243
2253
|
h = "audio";
|
2244
|
-
const
|
2245
|
-
f.trackItemDetailsMap[
|
2254
|
+
const Y = await ci((Tt = u.value) == null ? void 0 : Tt.payload), { details: B, ...N } = Y;
|
2255
|
+
f.trackItemDetailsMap[N.id] = {
|
2246
2256
|
type: h,
|
2247
|
-
details:
|
2248
|
-
}, f.trackItemsMap[
|
2257
|
+
details: B
|
2258
|
+
}, f.trackItemsMap[N.id] = N, f.trackItemIds.push(N.id), m = [N.id];
|
2249
2259
|
}
|
2250
|
-
if (u.key ===
|
2260
|
+
if (u.key === Hi) {
|
2251
2261
|
h = "video";
|
2252
|
-
const
|
2262
|
+
const Y = await oi((Kt = u.value) == null ? void 0 : Kt.payload, {
|
2253
2263
|
size: f.size,
|
2254
2264
|
scaleMode: b
|
2255
|
-
}), { details:
|
2256
|
-
f.trackItemDetailsMap[
|
2265
|
+
}), { details: B, ...N } = Y;
|
2266
|
+
f.trackItemDetailsMap[N.id] = {
|
2257
2267
|
type: h,
|
2258
|
-
details:
|
2259
|
-
metadata:
|
2260
|
-
}, f.trackItemsMap[
|
2268
|
+
details: B,
|
2269
|
+
metadata: N.metadata
|
2270
|
+
}, f.trackItemsMap[N.id] = N, f.trackItemIds.push(N.id), m = [N.id];
|
2261
2271
|
}
|
2262
2272
|
const v = fs(
|
2263
|
-
|
2273
|
+
m,
|
2264
2274
|
f.tracks,
|
2265
2275
|
f.trackItemsMap,
|
2266
2276
|
_,
|
2267
|
-
|
2277
|
+
I
|
2268
2278
|
);
|
2269
2279
|
if (v.trackId) {
|
2270
|
-
const
|
2271
|
-
(
|
2280
|
+
const Y = f.tracks.find(
|
2281
|
+
(B) => B.id === v.trackId
|
2272
2282
|
);
|
2273
|
-
|
2283
|
+
Y && Y.items.push(...m);
|
2274
2284
|
} else if (v.trackIndex !== void 0) {
|
2275
|
-
const
|
2285
|
+
const Y = {
|
2276
2286
|
id: lr(),
|
2277
2287
|
accepts: [
|
2278
2288
|
"text",
|
@@ -2284,11 +2294,11 @@ function hs(t) {
|
|
2284
2294
|
"template"
|
2285
2295
|
],
|
2286
2296
|
type: h,
|
2287
|
-
items:
|
2297
|
+
items: m,
|
2288
2298
|
magnetic: !1,
|
2289
2299
|
static: !1
|
2290
2300
|
};
|
2291
|
-
f.tracks.splice(v.trackIndex, 0,
|
2301
|
+
f.tracks.splice(v.trackIndex, 0, Y);
|
2292
2302
|
} else
|
2293
2303
|
f.tracks.unshift({
|
2294
2304
|
id: lr(),
|
@@ -2302,11 +2312,11 @@ function hs(t) {
|
|
2302
2312
|
"template"
|
2303
2313
|
],
|
2304
2314
|
type: h,
|
2305
|
-
items:
|
2315
|
+
items: m,
|
2306
2316
|
magnetic: !1,
|
2307
2317
|
static: !1
|
2308
2318
|
});
|
2309
|
-
|
2319
|
+
g && (f.activeIds = m), f.duration = ae(f.trackItemsMap), t.updateState(
|
2310
2320
|
{
|
2311
2321
|
activeIds: f.activeIds,
|
2312
2322
|
trackItemIds: f.trackItemIds,
|
@@ -2322,46 +2332,46 @@ function hs(t) {
|
|
2322
2332
|
kind: "add"
|
2323
2333
|
}
|
2324
2334
|
);
|
2325
|
-
}),
|
2335
|
+
}), w = c.subscribe(async (u) => {
|
2326
2336
|
var f;
|
2327
2337
|
if (u.key === Ji) {
|
2328
|
-
const
|
2329
|
-
if (
|
2330
|
-
const
|
2338
|
+
const g = K(t.getState()), b = (f = u.value) == null ? void 0 : f.options.time;
|
2339
|
+
if (g.activeIds.length === 1) {
|
2340
|
+
const m = g.activeIds[0], h = K(g.trackItemsMap[m]);
|
2331
2341
|
if (b >= h.display.to || b <= h.display.from)
|
2332
2342
|
return;
|
2333
|
-
const _ =
|
2343
|
+
const _ = K(g.trackItemDetailsMap[m]), I = ve(), v = K({
|
2334
2344
|
...h,
|
2335
2345
|
display: {
|
2336
2346
|
from: h.display.from,
|
2337
2347
|
to: b
|
2338
2348
|
}
|
2339
|
-
}), U =
|
2349
|
+
}), U = K({
|
2340
2350
|
...h,
|
2341
|
-
id:
|
2351
|
+
id: I,
|
2342
2352
|
display: {
|
2343
2353
|
from: b,
|
2344
2354
|
to: h.display.to
|
2345
2355
|
}
|
2346
2356
|
});
|
2347
2357
|
if (h.type === "video" || h.type === "audio") {
|
2348
|
-
const
|
2358
|
+
const D = b - v.display.from;
|
2349
2359
|
v.trim = {
|
2350
2360
|
from: h.trim.from,
|
2351
|
-
to: h.trim.from +
|
2361
|
+
to: h.trim.from + D
|
2352
2362
|
}, U.trim = {
|
2353
|
-
from: h.trim.from +
|
2363
|
+
from: h.trim.from + D,
|
2354
2364
|
to: h.trim.to
|
2355
2365
|
};
|
2356
2366
|
}
|
2357
|
-
|
2358
|
-
|
2367
|
+
g.trackItemsMap[m] = v, g.trackItemsMap[I] = U, g.trackItemIds.push(I), g.trackItemDetailsMap[I] = _, g.tracks.forEach((D) => {
|
2368
|
+
D.items.includes(m) && D.items.push(I);
|
2359
2369
|
}), t.updateState(
|
2360
2370
|
{
|
2361
|
-
trackItemDetailsMap:
|
2362
|
-
tracks:
|
2363
|
-
trackItemIds:
|
2364
|
-
trackItemsMap:
|
2371
|
+
trackItemDetailsMap: g.trackItemDetailsMap,
|
2372
|
+
tracks: g.tracks,
|
2373
|
+
trackItemIds: g.trackItemIds,
|
2374
|
+
trackItemsMap: g.trackItemsMap
|
2365
2375
|
},
|
2366
2376
|
{
|
2367
2377
|
updateHistory: !0,
|
@@ -2372,47 +2382,47 @@ function hs(t) {
|
|
2372
2382
|
return;
|
2373
2383
|
}
|
2374
2384
|
if (u.key === qi) {
|
2375
|
-
const
|
2376
|
-
if (
|
2377
|
-
const b =
|
2385
|
+
const g = K(t.getState());
|
2386
|
+
if (g.activeIds.length) {
|
2387
|
+
const b = g.activeIds, m = [], h = {
|
2378
2388
|
activeIds: b,
|
2379
2389
|
trackItemDetailsMap: {},
|
2380
2390
|
trackItemsMap: {},
|
2381
2391
|
tracks: []
|
2382
2392
|
};
|
2383
|
-
b.forEach((
|
2384
|
-
h.trackItemDetailsMap[
|
2385
|
-
|
2393
|
+
b.forEach((I) => {
|
2394
|
+
h.trackItemDetailsMap[I] = g.trackItemDetailsMap[I], h.trackItemsMap[I] = g.trackItemsMap[I], m.push(
|
2395
|
+
g.tracks.find((v) => v.items.includes(I))
|
2386
2396
|
);
|
2387
2397
|
});
|
2388
2398
|
const _ = /* @__PURE__ */ new Set();
|
2389
|
-
|
2399
|
+
m.filter((I) => _.has(I.id) ? !1 : (_.add(I), !0)), h.tracks = Array.from(_.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(h));
|
2390
2400
|
}
|
2391
2401
|
}
|
2392
2402
|
if (u.key === Vi) {
|
2393
|
-
const
|
2394
|
-
if (!
|
2395
|
-
const b =
|
2396
|
-
const
|
2397
|
-
(
|
2403
|
+
const g = localStorage.getItem("DesignComboTemp");
|
2404
|
+
if (!g) return;
|
2405
|
+
const b = K(t.getState()), m = JSON.parse(g), h = {}, _ = m.trackItemsMap, I = m.trackItemDetailsMap, v = m.tracks, U = [], D = m.activeIds.map(async (j) => {
|
2406
|
+
const z = I[j];
|
2407
|
+
(z.type === "caption" || z.type === "text") && z.details.fontUrl && await pr([
|
2398
2408
|
{
|
2399
|
-
fontFamily:
|
2400
|
-
url:
|
2409
|
+
fontFamily: z.details.fontFamily,
|
2410
|
+
url: z.details.fontUrl
|
2401
2411
|
}
|
2402
2412
|
]);
|
2403
|
-
const
|
2404
|
-
return h[
|
2405
|
-
..._[
|
2406
|
-
id:
|
2407
|
-
}, b.trackItemDetailsMap[
|
2413
|
+
const R = ve();
|
2414
|
+
return h[j] = R, b.trackItemsMap[R] = {
|
2415
|
+
..._[j],
|
2416
|
+
id: R
|
2417
|
+
}, b.trackItemDetailsMap[R] = z, b.trackItemIds.push(R), !0;
|
2408
2418
|
});
|
2409
|
-
await Promise.all(
|
2410
|
-
const
|
2411
|
-
...
|
2412
|
-
items:
|
2419
|
+
await Promise.all(D), v.forEach((j) => {
|
2420
|
+
const z = j.items.map((W) => h[W]), R = {
|
2421
|
+
...j,
|
2422
|
+
items: z,
|
2413
2423
|
id: lr()
|
2414
2424
|
};
|
2415
|
-
U.push(
|
2425
|
+
U.push(R);
|
2416
2426
|
}), b.tracks = [...b.tracks, ...U], t.updateState(
|
2417
2427
|
{
|
2418
2428
|
trackItemDetailsMap: b.trackItemDetailsMap,
|
@@ -2426,20 +2436,20 @@ function hs(t) {
|
|
2426
2436
|
}
|
2427
2437
|
);
|
2428
2438
|
}
|
2429
|
-
}),
|
2430
|
-
var f,
|
2439
|
+
}), x = d.subscribe(async (u) => {
|
2440
|
+
var f, g, b;
|
2431
2441
|
if (u.key === Ki) {
|
2432
|
-
const
|
2433
|
-
if (!
|
2434
|
-
const v = (
|
2435
|
-
|
2436
|
-
const
|
2437
|
-
|
2438
|
-
...h[
|
2439
|
-
...
|
2440
|
-
} : v[
|
2442
|
+
const m = K(t.getState()), h = m.trackItemDetailsMap, _ = m.trackItemsMap, I = Object.keys((f = u.value) == null ? void 0 : f.payload);
|
2443
|
+
if (!I.length) return;
|
2444
|
+
const v = (g = u.value) == null ? void 0 : g.payload;
|
2445
|
+
I.forEach((D) => {
|
2446
|
+
const j = v[D];
|
2447
|
+
j.details ? h[D].details = {
|
2448
|
+
...h[D].details,
|
2449
|
+
...j.details
|
2450
|
+
} : v[D].playbackRate && (_[D].playbackRate = v[D].playbackRate);
|
2441
2451
|
});
|
2442
|
-
const U =
|
2452
|
+
const U = ae(_);
|
2443
2453
|
t.updateState(
|
2444
2454
|
{
|
2445
2455
|
trackItemDetailsMap: { ...h },
|
@@ -2453,34 +2463,43 @@ function hs(t) {
|
|
2453
2463
|
);
|
2454
2464
|
}
|
2455
2465
|
if (u.key === Xi) {
|
2456
|
-
const
|
2466
|
+
const m = (b = u.value) == null ? void 0 : b.payload, h = Object.keys(m)[0], _ = Object.values(m)[0], I = K(t.getState()), v = I.trackItemDetailsMap[h], U = v.details;
|
2457
2467
|
if (_.details) {
|
2458
2468
|
if (_.type === "image" && _.details.src) {
|
2459
|
-
const
|
2460
|
-
let
|
2461
|
-
const
|
2462
|
-
|
2469
|
+
const j = await ni(_.details.src), z = v.details.width || 0, R = v.details.height || 0;
|
2470
|
+
let W = j.width, M = j.height;
|
2471
|
+
const C = j.width / j.height;
|
2472
|
+
z / R > C ? (W = z, M = z / C) : (M = R, W = R * C), U.crop = {
|
2473
|
+
x: 0,
|
2474
|
+
y: 0,
|
2475
|
+
height: U.height,
|
2476
|
+
width: U.width
|
2477
|
+
}, _.details.width = W, _.details.height = M;
|
2463
2478
|
}
|
2464
2479
|
if (_.type === "video" && _.details.src) {
|
2465
|
-
const
|
2466
|
-
let
|
2467
|
-
const
|
2468
|
-
|
2480
|
+
const j = await ii(_.details.src), z = v.details.width || 0, R = v.details.height || 0;
|
2481
|
+
let W = j.width, M = j.height;
|
2482
|
+
const C = j.width / j.height;
|
2483
|
+
z / R > C ? (W = z, M = z / C) : (M = R, W = R * C), U.crop = {
|
2484
|
+
x: 0,
|
2485
|
+
y: 0,
|
2486
|
+
height: U.height,
|
2487
|
+
width: U.width
|
2488
|
+
}, _.details.width = W, _.details.height = M;
|
2469
2489
|
}
|
2470
|
-
|
2471
|
-
v.details = { ...C, ..._.details }, _.details = v.details;
|
2490
|
+
v.details = { ...U, ..._.details }, _.details = v.details;
|
2472
2491
|
}
|
2473
|
-
const
|
2474
|
-
|
2475
|
-
...
|
2492
|
+
const D = { ...v, ..._ };
|
2493
|
+
I.trackItemDetailsMap[h] = D, I.trackItemsMap[h] = {
|
2494
|
+
...I.trackItemsMap[h],
|
2476
2495
|
type: _.type
|
2477
2496
|
}, t.updateState(
|
2478
2497
|
{
|
2479
2498
|
trackItemDetailsMap: {
|
2480
|
-
...
|
2499
|
+
...I.trackItemDetailsMap
|
2481
2500
|
},
|
2482
2501
|
trackItemsMap: {
|
2483
|
-
...
|
2502
|
+
...I.trackItemsMap
|
2484
2503
|
}
|
2485
2504
|
},
|
2486
2505
|
{
|
@@ -2492,43 +2511,43 @@ function hs(t) {
|
|
2492
2511
|
});
|
2493
2512
|
return {
|
2494
2513
|
unsubscribe: () => {
|
2495
|
-
|
2514
|
+
y.unsubscribe(), w.unsubscribe(), x.unsubscribe(), F.unsubscribe(), E.unsubscribe(), S.unsubscribe(), T.unsubscribe();
|
2496
2515
|
}
|
2497
2516
|
};
|
2498
2517
|
}
|
2499
2518
|
const ms = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
2500
2519
|
function pi(t, r, n = { cyclesFix: !0 }, i = []) {
|
2501
|
-
var p,
|
2520
|
+
var p, S;
|
2502
2521
|
let a = [];
|
2503
2522
|
const c = Array.isArray(t);
|
2504
|
-
for (const
|
2505
|
-
const
|
2506
|
-
if (!(
|
2523
|
+
for (const F in t) {
|
2524
|
+
const T = t[F], E = c ? +F : F;
|
2525
|
+
if (!(F in r)) {
|
2507
2526
|
a.push({
|
2508
2527
|
type: "REMOVE",
|
2509
|
-
path: [
|
2510
|
-
oldValue: t[
|
2528
|
+
path: [E],
|
2529
|
+
oldValue: t[F]
|
2511
2530
|
});
|
2512
2531
|
continue;
|
2513
2532
|
}
|
2514
|
-
const
|
2515
|
-
if (
|
2516
|
-
const
|
2517
|
-
a.push.apply(a,
|
2518
|
-
} else
|
2519
|
-
!(Number.isNaN(
|
2520
|
-
path: [
|
2533
|
+
const y = r[F], w = typeof T == "object" && typeof y == "object" && Array.isArray(T) === Array.isArray(y);
|
2534
|
+
if (T && y && w && !ms[(S = (p = Object.getPrototypeOf(T)) == null ? void 0 : p.constructor) == null ? void 0 : S.name] && (!n.cyclesFix || !i.includes(T))) {
|
2535
|
+
const x = pi(T, y, n, n.cyclesFix ? i.concat([T]) : []);
|
2536
|
+
a.push.apply(a, x.map((u) => (u.path.unshift(E), u)));
|
2537
|
+
} else T !== y && // treat NaN values as equivalent
|
2538
|
+
!(Number.isNaN(T) && Number.isNaN(y)) && !(w && (isNaN(T) ? T + "" == y + "" : +T == +y)) && a.push({
|
2539
|
+
path: [E],
|
2521
2540
|
type: "CHANGE",
|
2522
|
-
value:
|
2523
|
-
oldValue:
|
2541
|
+
value: y,
|
2542
|
+
oldValue: T
|
2524
2543
|
});
|
2525
2544
|
}
|
2526
2545
|
const d = Array.isArray(r);
|
2527
|
-
for (const
|
2528
|
-
|
2546
|
+
for (const F in r)
|
2547
|
+
F in t || a.push({
|
2529
2548
|
type: "CREATE",
|
2530
|
-
path: [d ? +
|
2531
|
-
value: r[
|
2549
|
+
path: [d ? +F : F],
|
2550
|
+
value: r[F]
|
2532
2551
|
});
|
2533
2552
|
return a;
|
2534
2553
|
}
|
@@ -2572,57 +2591,57 @@ function J(t, ...r) {
|
|
2572
2591
|
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
2573
2592
|
);
|
2574
2593
|
}
|
2575
|
-
var
|
2576
|
-
function
|
2594
|
+
var oe = Object.getPrototypeOf;
|
2595
|
+
function ce(t) {
|
2577
2596
|
return !!t && !!t[gt];
|
2578
2597
|
}
|
2579
|
-
function
|
2598
|
+
function Yt(t) {
|
2580
2599
|
var r;
|
2581
|
-
return t ? mi(t) || Array.isArray(t) || !!t[ze] || !!((r = t.constructor) != null && r[ze]) ||
|
2600
|
+
return t ? mi(t) || Array.isArray(t) || !!t[ze] || !!((r = t.constructor) != null && r[ze]) || We(t) || Ye(t) : !1;
|
2582
2601
|
}
|
2583
2602
|
var ys = Object.prototype.constructor.toString();
|
2584
2603
|
function mi(t) {
|
2585
2604
|
if (!t || typeof t != "object")
|
2586
2605
|
return !1;
|
2587
|
-
const r =
|
2606
|
+
const r = oe(t);
|
2588
2607
|
if (r === null)
|
2589
2608
|
return !0;
|
2590
2609
|
const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
2591
2610
|
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === ys;
|
2592
2611
|
}
|
2593
|
-
function
|
2594
|
-
|
2612
|
+
function Ne(t, r) {
|
2613
|
+
ue(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
2595
2614
|
r(n, t[n], t);
|
2596
2615
|
}) : t.forEach((n, i) => r(i, n, t));
|
2597
2616
|
}
|
2598
|
-
function
|
2617
|
+
function ue(t) {
|
2599
2618
|
const r = t[gt];
|
2600
|
-
return r ? r.type_ : Array.isArray(t) ? 1 :
|
2619
|
+
return r ? r.type_ : Array.isArray(t) ? 1 : We(t) ? 2 : Ye(t) ? 3 : 0;
|
2601
2620
|
}
|
2602
|
-
function
|
2603
|
-
return
|
2621
|
+
function Le(t, r) {
|
2622
|
+
return ue(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
2604
2623
|
}
|
2605
2624
|
function un(t, r) {
|
2606
|
-
return
|
2625
|
+
return ue(t) === 2 ? t.get(r) : t[r];
|
2607
2626
|
}
|
2608
2627
|
function yi(t, r, n) {
|
2609
|
-
const i =
|
2628
|
+
const i = ue(t);
|
2610
2629
|
i === 2 ? t.set(r, n) : i === 3 ? t.add(n) : t[r] = n;
|
2611
2630
|
}
|
2612
|
-
function
|
2631
|
+
function Is(t, r) {
|
2613
2632
|
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
2614
2633
|
}
|
2615
|
-
function
|
2634
|
+
function We(t) {
|
2616
2635
|
return t instanceof Map;
|
2617
2636
|
}
|
2618
2637
|
function Ye(t) {
|
2619
2638
|
return t instanceof Set;
|
2620
2639
|
}
|
2621
|
-
function
|
2640
|
+
function se(t) {
|
2622
2641
|
return t.copy_ || t.base_;
|
2623
2642
|
}
|
2624
2643
|
function bn(t, r) {
|
2625
|
-
if (
|
2644
|
+
if (We(t))
|
2626
2645
|
return new Map(t);
|
2627
2646
|
if (Ye(t))
|
2628
2647
|
return new Set(t);
|
@@ -2643,9 +2662,9 @@ function bn(t, r) {
|
|
2643
2662
|
value: t[d]
|
2644
2663
|
});
|
2645
2664
|
}
|
2646
|
-
return Object.create(
|
2665
|
+
return Object.create(oe(t), i);
|
2647
2666
|
} else {
|
2648
|
-
const i =
|
2667
|
+
const i = oe(t);
|
2649
2668
|
if (i !== null && n)
|
2650
2669
|
return { ...t };
|
2651
2670
|
const a = Object.create(i);
|
@@ -2653,25 +2672,25 @@ function bn(t, r) {
|
|
2653
2672
|
}
|
2654
2673
|
}
|
2655
2674
|
function An(t, r = !1) {
|
2656
|
-
return _r(t) ||
|
2675
|
+
return _r(t) || ce(t) || !Yt(t) || (ue(t) > 1 && (t.set = t.add = t.clear = t.delete = gs), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => An(i, !0))), t;
|
2657
2676
|
}
|
2658
|
-
function
|
2677
|
+
function gs() {
|
2659
2678
|
J(2);
|
2660
2679
|
}
|
2661
2680
|
function _r(t) {
|
2662
2681
|
return Object.isFrozen(t);
|
2663
2682
|
}
|
2664
2683
|
var _n = {};
|
2665
|
-
function
|
2684
|
+
function le(t) {
|
2666
2685
|
const r = _n[t];
|
2667
2686
|
return r || J(0, t), r;
|
2668
2687
|
}
|
2669
2688
|
function bs(t, r) {
|
2670
2689
|
_n[t] || (_n[t] = r);
|
2671
2690
|
}
|
2672
|
-
var
|
2673
|
-
function
|
2674
|
-
return
|
2691
|
+
var $e;
|
2692
|
+
function Ii() {
|
2693
|
+
return $e;
|
2675
2694
|
}
|
2676
2695
|
function _s(t, r) {
|
2677
2696
|
return {
|
@@ -2684,26 +2703,26 @@ function _s(t, r) {
|
|
2684
2703
|
unfinalizedDrafts_: 0
|
2685
2704
|
};
|
2686
2705
|
}
|
2687
|
-
function
|
2688
|
-
r && (
|
2706
|
+
function Ln(t, r) {
|
2707
|
+
r && (le("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
2689
2708
|
}
|
2690
2709
|
function vn(t) {
|
2691
2710
|
Sn(t), t.drafts_.forEach(vs), t.drafts_ = null;
|
2692
2711
|
}
|
2693
2712
|
function Sn(t) {
|
2694
|
-
t ===
|
2713
|
+
t === $e && ($e = t.parent_);
|
2695
2714
|
}
|
2696
|
-
function
|
2697
|
-
return
|
2715
|
+
function $n(t) {
|
2716
|
+
return $e = _s($e, t);
|
2698
2717
|
}
|
2699
2718
|
function vs(t) {
|
2700
2719
|
const r = t[gt];
|
2701
2720
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
2702
2721
|
}
|
2703
|
-
function
|
2722
|
+
function Hn(t, r) {
|
2704
2723
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
2705
2724
|
const n = r.drafts_[0];
|
2706
|
-
return t !== void 0 && t !== n ? (n[gt].modified_ && (vn(r), J(4)),
|
2725
|
+
return t !== void 0 && t !== n ? (n[gt].modified_ && (vn(r), J(4)), Yt(t) && (t = hr(r, t), r.parent_ || mr(r, t)), r.patches_ && le("Patches").generateReplacementPatches_(
|
2707
2726
|
n[gt].base_,
|
2708
2727
|
t,
|
2709
2728
|
r.patches_,
|
@@ -2715,7 +2734,7 @@ function hr(t, r, n) {
|
|
2715
2734
|
return r;
|
2716
2735
|
const i = r[gt];
|
2717
2736
|
if (!i)
|
2718
|
-
return
|
2737
|
+
return Ne(
|
2719
2738
|
r,
|
2720
2739
|
(a, c) => Un(t, i, r, a, c, n)
|
2721
2740
|
), r;
|
@@ -2727,10 +2746,10 @@ function hr(t, r, n) {
|
|
2727
2746
|
i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
|
2728
2747
|
const a = i.copy_;
|
2729
2748
|
let c = a, d = !1;
|
2730
|
-
i.type_ === 3 && (c = new Set(a), a.clear(), d = !0),
|
2749
|
+
i.type_ === 3 && (c = new Set(a), a.clear(), d = !0), Ne(
|
2731
2750
|
c,
|
2732
|
-
(p,
|
2733
|
-
), mr(t, a, !1), n && t.patches_ &&
|
2751
|
+
(p, S) => Un(t, i, a, p, S, n, d)
|
2752
|
+
), mr(t, a, !1), n && t.patches_ && le("Patches").generatePatches_(
|
2734
2753
|
i,
|
2735
2754
|
n,
|
2736
2755
|
t.patches_,
|
@@ -2740,15 +2759,15 @@ function hr(t, r, n) {
|
|
2740
2759
|
return i.copy_;
|
2741
2760
|
}
|
2742
2761
|
function Un(t, r, n, i, a, c, d) {
|
2743
|
-
if (process.env.NODE_ENV !== "production" && a === n && J(5),
|
2762
|
+
if (process.env.NODE_ENV !== "production" && a === n && J(5), ce(a)) {
|
2744
2763
|
const p = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2745
|
-
!
|
2746
|
-
if (yi(n, i,
|
2764
|
+
!Le(r.assigned_, i) ? c.concat(i) : void 0, S = hr(t, a, p);
|
2765
|
+
if (yi(n, i, S), ce(S))
|
2747
2766
|
t.canAutoFreeze_ = !1;
|
2748
2767
|
else
|
2749
2768
|
return;
|
2750
2769
|
} else d && n.add(a);
|
2751
|
-
if (
|
2770
|
+
if (Yt(a) && !_r(a)) {
|
2752
2771
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
2753
2772
|
return;
|
2754
2773
|
hr(t, a), (!r || !r.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(n, i) && mr(t, a);
|
@@ -2761,7 +2780,7 @@ function Ss(t, r) {
|
|
2761
2780
|
const n = Array.isArray(t), i = {
|
2762
2781
|
type_: n ? 1 : 0,
|
2763
2782
|
// Track which produce call this is associated with.
|
2764
|
-
scope_: r ? r.scope_ :
|
2783
|
+
scope_: r ? r.scope_ : Ii(),
|
2765
2784
|
// True for both shallow and deep changes.
|
2766
2785
|
modified_: !1,
|
2767
2786
|
// Used during finalization.
|
@@ -2782,7 +2801,7 @@ function Ss(t, r) {
|
|
2782
2801
|
isManual_: !1
|
2783
2802
|
};
|
2784
2803
|
let a = i, c = xn;
|
2785
|
-
n && (a = [i], c =
|
2804
|
+
n && (a = [i], c = He);
|
2786
2805
|
const { revoke: d, proxy: p } = Proxy.revocable(a, c);
|
2787
2806
|
return i.draft_ = p, i.revoke_ = d, p;
|
2788
2807
|
}
|
@@ -2790,27 +2809,27 @@ var xn = {
|
|
2790
2809
|
get(t, r) {
|
2791
2810
|
if (r === gt)
|
2792
2811
|
return t;
|
2793
|
-
const n =
|
2794
|
-
if (!
|
2812
|
+
const n = se(t);
|
2813
|
+
if (!Le(n, r))
|
2795
2814
|
return ks(t, n, r);
|
2796
2815
|
const i = n[r];
|
2797
|
-
return t.finalized_ || !
|
2816
|
+
return t.finalized_ || !Yt(i) ? i : i === ln(t.base_, r) ? (fn(t), t.copy_[r] = wn(i, t)) : i;
|
2798
2817
|
},
|
2799
2818
|
has(t, r) {
|
2800
|
-
return r in
|
2819
|
+
return r in se(t);
|
2801
2820
|
},
|
2802
2821
|
ownKeys(t) {
|
2803
|
-
return Reflect.ownKeys(
|
2822
|
+
return Reflect.ownKeys(se(t));
|
2804
2823
|
},
|
2805
2824
|
set(t, r, n) {
|
2806
|
-
const i =
|
2825
|
+
const i = gi(se(t), r);
|
2807
2826
|
if (i != null && i.set)
|
2808
2827
|
return i.set.call(t.draft_, n), !0;
|
2809
2828
|
if (!t.modified_) {
|
2810
|
-
const a = ln(
|
2829
|
+
const a = ln(se(t), r), c = a == null ? void 0 : a[gt];
|
2811
2830
|
if (c && c.base_ === n)
|
2812
2831
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2813
|
-
if (
|
2832
|
+
if (Is(n, a) && (n !== void 0 || Le(t.base_, r)))
|
2814
2833
|
return !0;
|
2815
2834
|
fn(t), kn(t);
|
2816
2835
|
}
|
@@ -2824,7 +2843,7 @@ var xn = {
|
|
2824
2843
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
2825
2844
|
// the same guarantee in ES5 mode.
|
2826
2845
|
getOwnPropertyDescriptor(t, r) {
|
2827
|
-
const n =
|
2846
|
+
const n = se(t), i = Reflect.getOwnPropertyDescriptor(n, r);
|
2828
2847
|
return i && {
|
2829
2848
|
writable: !0,
|
2830
2849
|
configurable: t.type_ !== 1 || r !== "length",
|
@@ -2836,45 +2855,45 @@ var xn = {
|
|
2836
2855
|
J(11);
|
2837
2856
|
},
|
2838
2857
|
getPrototypeOf(t) {
|
2839
|
-
return
|
2858
|
+
return oe(t.base_);
|
2840
2859
|
},
|
2841
2860
|
setPrototypeOf() {
|
2842
2861
|
J(12);
|
2843
2862
|
}
|
2844
|
-
},
|
2845
|
-
|
2846
|
-
|
2863
|
+
}, He = {};
|
2864
|
+
Ne(xn, (t, r) => {
|
2865
|
+
He[t] = function() {
|
2847
2866
|
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
2848
2867
|
};
|
2849
2868
|
});
|
2850
|
-
|
2851
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && J(13),
|
2869
|
+
He.deleteProperty = function(t, r) {
|
2870
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && J(13), He.set.call(this, t, r, void 0);
|
2852
2871
|
};
|
2853
|
-
|
2872
|
+
He.set = function(t, r, n) {
|
2854
2873
|
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && J(14), xn.set.call(this, t[0], r, n, t[0]);
|
2855
2874
|
};
|
2856
2875
|
function ln(t, r) {
|
2857
2876
|
const n = t[gt];
|
2858
|
-
return (n ?
|
2877
|
+
return (n ? se(n) : t)[r];
|
2859
2878
|
}
|
2860
2879
|
function ks(t, r, n) {
|
2861
2880
|
var a;
|
2862
|
-
const i =
|
2881
|
+
const i = gi(r, n);
|
2863
2882
|
return i ? "value" in i ? i.value : (
|
2864
2883
|
// This is a very special case, if the prop is a getter defined by the
|
2865
2884
|
// prototype, we should invoke it with the draft as context!
|
2866
2885
|
(a = i.get) == null ? void 0 : a.call(t.draft_)
|
2867
2886
|
) : void 0;
|
2868
2887
|
}
|
2869
|
-
function
|
2888
|
+
function gi(t, r) {
|
2870
2889
|
if (!(r in t))
|
2871
2890
|
return;
|
2872
|
-
let n =
|
2891
|
+
let n = oe(t);
|
2873
2892
|
for (; n; ) {
|
2874
2893
|
const i = Object.getOwnPropertyDescriptor(n, r);
|
2875
2894
|
if (i)
|
2876
2895
|
return i;
|
2877
|
-
n =
|
2896
|
+
n = oe(n);
|
2878
2897
|
}
|
2879
2898
|
}
|
2880
2899
|
function kn(t) {
|
@@ -2893,32 +2912,32 @@ var ws = class {
|
|
2893
2912
|
const c = n;
|
2894
2913
|
n = r;
|
2895
2914
|
const d = this;
|
2896
|
-
return function(
|
2897
|
-
return d.produce(
|
2915
|
+
return function(S = c, ...F) {
|
2916
|
+
return d.produce(S, (T) => n.call(this, T, ...F));
|
2898
2917
|
};
|
2899
2918
|
}
|
2900
2919
|
typeof n != "function" && J(6), i !== void 0 && typeof i != "function" && J(7);
|
2901
2920
|
let a;
|
2902
|
-
if (
|
2903
|
-
const c =
|
2921
|
+
if (Yt(r)) {
|
2922
|
+
const c = $n(this), d = wn(r, void 0);
|
2904
2923
|
let p = !0;
|
2905
2924
|
try {
|
2906
2925
|
a = n(d), p = !1;
|
2907
2926
|
} finally {
|
2908
2927
|
p ? vn(c) : Sn(c);
|
2909
2928
|
}
|
2910
|
-
return
|
2929
|
+
return Ln(c, i), Hn(a, c);
|
2911
2930
|
} else if (!r || typeof r != "object") {
|
2912
2931
|
if (a = n(r), a === void 0 && (a = r), a === Mn && (a = void 0), this.autoFreeze_ && An(a, !0), i) {
|
2913
2932
|
const c = [], d = [];
|
2914
|
-
|
2933
|
+
le("Patches").generateReplacementPatches_(r, a, c, d), i(c, d);
|
2915
2934
|
}
|
2916
2935
|
return a;
|
2917
2936
|
} else
|
2918
2937
|
J(1, r);
|
2919
2938
|
}, this.produceWithPatches = (r, n) => {
|
2920
2939
|
if (typeof r == "function")
|
2921
|
-
return (d, ...p) => this.produceWithPatches(d, (
|
2940
|
+
return (d, ...p) => this.produceWithPatches(d, (S) => r(S, ...p));
|
2922
2941
|
let i, a;
|
2923
2942
|
return [this.produce(r, n, (d, p) => {
|
2924
2943
|
i = d, a = p;
|
@@ -2926,15 +2945,15 @@ var ws = class {
|
|
2926
2945
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
2927
2946
|
}
|
2928
2947
|
createDraft(t) {
|
2929
|
-
|
2930
|
-
const r =
|
2948
|
+
Yt(t) || J(8), ce(t) && (t = Ts(t));
|
2949
|
+
const r = $n(this), n = wn(t, void 0);
|
2931
2950
|
return n[gt].isManual_ = !0, Sn(r), n;
|
2932
2951
|
}
|
2933
2952
|
finishDraft(t, r) {
|
2934
2953
|
const n = t && t[gt];
|
2935
2954
|
(!n || !n.isManual_) && J(9);
|
2936
2955
|
const { scope_: i } = n;
|
2937
|
-
return
|
2956
|
+
return Ln(i, r), Hn(void 0, i);
|
2938
2957
|
}
|
2939
2958
|
/**
|
2940
2959
|
* Pass true to automatically freeze all copies created by Immer.
|
@@ -2962,22 +2981,22 @@ var ws = class {
|
|
2962
2981
|
}
|
2963
2982
|
}
|
2964
2983
|
n > -1 && (r = r.slice(n + 1));
|
2965
|
-
const i =
|
2966
|
-
return
|
2984
|
+
const i = le("Patches").applyPatches_;
|
2985
|
+
return ce(t) ? i(t, r) : this.produce(
|
2967
2986
|
t,
|
2968
2987
|
(a) => i(a, r)
|
2969
2988
|
);
|
2970
2989
|
}
|
2971
2990
|
};
|
2972
2991
|
function wn(t, r) {
|
2973
|
-
const n =
|
2974
|
-
return (r ? r.scope_ :
|
2992
|
+
const n = We(t) ? le("MapSet").proxyMap_(t, r) : Ye(t) ? le("MapSet").proxySet_(t, r) : Ss(t, r);
|
2993
|
+
return (r ? r.scope_ : Ii()).drafts_.push(n), n;
|
2975
2994
|
}
|
2976
2995
|
function Ts(t) {
|
2977
|
-
return
|
2996
|
+
return ce(t) || J(10, t), bi(t);
|
2978
2997
|
}
|
2979
2998
|
function bi(t) {
|
2980
|
-
if (!
|
2999
|
+
if (!Yt(t) || _r(t))
|
2981
3000
|
return t;
|
2982
3001
|
const r = t[gt];
|
2983
3002
|
let n;
|
@@ -2987,216 +3006,216 @@ function bi(t) {
|
|
2987
3006
|
r.finalized_ = !0, n = bn(t, r.scope_.immer_.useStrictShallowCopy_);
|
2988
3007
|
} else
|
2989
3008
|
n = bn(t, !0);
|
2990
|
-
return
|
3009
|
+
return Ne(n, (i, a) => {
|
2991
3010
|
yi(n, i, bi(a));
|
2992
3011
|
}), r && (r.finalized_ = !1), n;
|
2993
3012
|
}
|
2994
|
-
function
|
3013
|
+
function Gn() {
|
2995
3014
|
process.env.NODE_ENV !== "production" && hi.push(
|
2996
3015
|
'Sets cannot have "replace" patches.',
|
2997
|
-
function(
|
2998
|
-
return "Unsupported patch operation: " +
|
3016
|
+
function(y) {
|
3017
|
+
return "Unsupported patch operation: " + y;
|
2999
3018
|
},
|
3000
|
-
function(
|
3001
|
-
return "Cannot apply patch, path doesn't resolve: " +
|
3019
|
+
function(y) {
|
3020
|
+
return "Cannot apply patch, path doesn't resolve: " + y;
|
3002
3021
|
},
|
3003
3022
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
3004
3023
|
);
|
3005
3024
|
const r = "replace", n = "add", i = "remove";
|
3006
|
-
function a(
|
3007
|
-
switch (
|
3025
|
+
function a(y, w, x, u) {
|
3026
|
+
switch (y.type_) {
|
3008
3027
|
case 0:
|
3009
3028
|
case 2:
|
3010
3029
|
return d(
|
3011
|
-
|
3012
|
-
|
3013
|
-
|
3030
|
+
y,
|
3031
|
+
w,
|
3032
|
+
x,
|
3014
3033
|
u
|
3015
3034
|
);
|
3016
3035
|
case 1:
|
3017
|
-
return c(
|
3036
|
+
return c(y, w, x, u);
|
3018
3037
|
case 3:
|
3019
3038
|
return p(
|
3020
|
-
|
3021
|
-
|
3022
|
-
|
3039
|
+
y,
|
3040
|
+
w,
|
3041
|
+
x,
|
3023
3042
|
u
|
3024
3043
|
);
|
3025
3044
|
}
|
3026
3045
|
}
|
3027
|
-
function c(
|
3028
|
-
let { base_: f, assigned_:
|
3029
|
-
b.length < f.length && ([f, b] = [b, f], [
|
3030
|
-
for (let
|
3031
|
-
if (
|
3032
|
-
const h =
|
3033
|
-
|
3046
|
+
function c(y, w, x, u) {
|
3047
|
+
let { base_: f, assigned_: g } = y, b = y.copy_;
|
3048
|
+
b.length < f.length && ([f, b] = [b, f], [x, u] = [u, x]);
|
3049
|
+
for (let m = 0; m < f.length; m++)
|
3050
|
+
if (g[m] && b[m] !== f[m]) {
|
3051
|
+
const h = w.concat([m]);
|
3052
|
+
x.push({
|
3034
3053
|
op: r,
|
3035
3054
|
path: h,
|
3036
3055
|
// Need to maybe clone it, as it can in fact be the original value
|
3037
3056
|
// due to the base/copy inversion at the start of this function
|
3038
|
-
value:
|
3057
|
+
value: E(b[m])
|
3039
3058
|
}), u.push({
|
3040
3059
|
op: r,
|
3041
3060
|
path: h,
|
3042
|
-
value:
|
3061
|
+
value: E(f[m])
|
3043
3062
|
});
|
3044
3063
|
}
|
3045
|
-
for (let
|
3046
|
-
const h =
|
3047
|
-
|
3064
|
+
for (let m = f.length; m < b.length; m++) {
|
3065
|
+
const h = w.concat([m]);
|
3066
|
+
x.push({
|
3048
3067
|
op: n,
|
3049
3068
|
path: h,
|
3050
3069
|
// Need to maybe clone it, as it can in fact be the original value
|
3051
3070
|
// due to the base/copy inversion at the start of this function
|
3052
|
-
value:
|
3071
|
+
value: E(b[m])
|
3053
3072
|
});
|
3054
3073
|
}
|
3055
|
-
for (let
|
3056
|
-
const h =
|
3074
|
+
for (let m = b.length - 1; f.length <= m; --m) {
|
3075
|
+
const h = w.concat([m]);
|
3057
3076
|
u.push({
|
3058
3077
|
op: i,
|
3059
3078
|
path: h
|
3060
3079
|
});
|
3061
3080
|
}
|
3062
3081
|
}
|
3063
|
-
function d(
|
3064
|
-
const { base_: f, copy_:
|
3065
|
-
|
3066
|
-
const h = un(f, b), _ = un(
|
3067
|
-
if (h === _ &&
|
3082
|
+
function d(y, w, x, u) {
|
3083
|
+
const { base_: f, copy_: g } = y;
|
3084
|
+
Ne(y.assigned_, (b, m) => {
|
3085
|
+
const h = un(f, b), _ = un(g, b), I = m ? Le(f, b) ? r : n : i;
|
3086
|
+
if (h === _ && I === r)
|
3068
3087
|
return;
|
3069
|
-
const v =
|
3070
|
-
|
3071
|
-
|
3088
|
+
const v = w.concat(b);
|
3089
|
+
x.push(I === i ? { op: I, path: v } : { op: I, path: v, value: _ }), u.push(
|
3090
|
+
I === n ? { op: i, path: v } : I === i ? { op: n, path: v, value: E(h) } : { op: r, path: v, value: E(h) }
|
3072
3091
|
);
|
3073
3092
|
});
|
3074
3093
|
}
|
3075
|
-
function p(
|
3076
|
-
let { base_: f, copy_:
|
3077
|
-
f.forEach((
|
3078
|
-
if (!
|
3079
|
-
const h =
|
3080
|
-
|
3094
|
+
function p(y, w, x, u) {
|
3095
|
+
let { base_: f, copy_: g } = y, b = 0;
|
3096
|
+
f.forEach((m) => {
|
3097
|
+
if (!g.has(m)) {
|
3098
|
+
const h = w.concat([b]);
|
3099
|
+
x.push({
|
3081
3100
|
op: i,
|
3082
3101
|
path: h,
|
3083
|
-
value:
|
3102
|
+
value: m
|
3084
3103
|
}), u.unshift({
|
3085
3104
|
op: n,
|
3086
3105
|
path: h,
|
3087
|
-
value:
|
3106
|
+
value: m
|
3088
3107
|
});
|
3089
3108
|
}
|
3090
3109
|
b++;
|
3091
|
-
}), b = 0,
|
3092
|
-
if (!f.has(
|
3093
|
-
const h =
|
3094
|
-
|
3110
|
+
}), b = 0, g.forEach((m) => {
|
3111
|
+
if (!f.has(m)) {
|
3112
|
+
const h = w.concat([b]);
|
3113
|
+
x.push({
|
3095
3114
|
op: n,
|
3096
3115
|
path: h,
|
3097
|
-
value:
|
3116
|
+
value: m
|
3098
3117
|
}), u.unshift({
|
3099
3118
|
op: i,
|
3100
3119
|
path: h,
|
3101
|
-
value:
|
3120
|
+
value: m
|
3102
3121
|
});
|
3103
3122
|
}
|
3104
3123
|
b++;
|
3105
3124
|
});
|
3106
3125
|
}
|
3107
|
-
function
|
3108
|
-
|
3126
|
+
function S(y, w, x, u) {
|
3127
|
+
x.push({
|
3109
3128
|
op: r,
|
3110
3129
|
path: [],
|
3111
|
-
value:
|
3130
|
+
value: w === Mn ? void 0 : w
|
3112
3131
|
}), u.push({
|
3113
3132
|
op: r,
|
3114
3133
|
path: [],
|
3115
|
-
value:
|
3134
|
+
value: y
|
3116
3135
|
});
|
3117
3136
|
}
|
3118
|
-
function
|
3119
|
-
return
|
3120
|
-
const { path: u, op: f } =
|
3121
|
-
let
|
3137
|
+
function F(y, w) {
|
3138
|
+
return w.forEach((x) => {
|
3139
|
+
const { path: u, op: f } = x;
|
3140
|
+
let g = y;
|
3122
3141
|
for (let _ = 0; _ < u.length - 1; _++) {
|
3123
|
-
const
|
3142
|
+
const I = ue(g);
|
3124
3143
|
let v = u[_];
|
3125
|
-
typeof v != "string" && typeof v != "number" && (v = "" + v), (
|
3144
|
+
typeof v != "string" && typeof v != "number" && (v = "" + v), (I === 0 || I === 1) && (v === "__proto__" || v === "constructor") && J(19), typeof g == "function" && v === "prototype" && J(19), g = un(g, v), typeof g != "object" && J(18, u.join("/"));
|
3126
3145
|
}
|
3127
|
-
const b =
|
3146
|
+
const b = ue(g), m = T(x.value), h = u[u.length - 1];
|
3128
3147
|
switch (f) {
|
3129
3148
|
case r:
|
3130
3149
|
switch (b) {
|
3131
3150
|
case 2:
|
3132
|
-
return
|
3151
|
+
return g.set(h, m);
|
3133
3152
|
case 3:
|
3134
3153
|
J(16);
|
3135
3154
|
default:
|
3136
|
-
return
|
3155
|
+
return g[h] = m;
|
3137
3156
|
}
|
3138
3157
|
case n:
|
3139
3158
|
switch (b) {
|
3140
3159
|
case 1:
|
3141
|
-
return h === "-" ?
|
3160
|
+
return h === "-" ? g.push(m) : g.splice(h, 0, m);
|
3142
3161
|
case 2:
|
3143
|
-
return
|
3162
|
+
return g.set(h, m);
|
3144
3163
|
case 3:
|
3145
|
-
return
|
3164
|
+
return g.add(m);
|
3146
3165
|
default:
|
3147
|
-
return
|
3166
|
+
return g[h] = m;
|
3148
3167
|
}
|
3149
3168
|
case i:
|
3150
3169
|
switch (b) {
|
3151
3170
|
case 1:
|
3152
|
-
return
|
3171
|
+
return g.splice(h, 1);
|
3153
3172
|
case 2:
|
3154
|
-
return
|
3173
|
+
return g.delete(h);
|
3155
3174
|
case 3:
|
3156
|
-
return
|
3175
|
+
return g.delete(x.value);
|
3157
3176
|
default:
|
3158
|
-
return delete
|
3177
|
+
return delete g[h];
|
3159
3178
|
}
|
3160
3179
|
default:
|
3161
3180
|
J(17, f);
|
3162
3181
|
}
|
3163
|
-
}),
|
3164
|
-
}
|
3165
|
-
function
|
3166
|
-
if (!
|
3167
|
-
return
|
3168
|
-
if (Array.isArray(
|
3169
|
-
return
|
3170
|
-
if (
|
3182
|
+
}), y;
|
3183
|
+
}
|
3184
|
+
function T(y) {
|
3185
|
+
if (!Yt(y))
|
3186
|
+
return y;
|
3187
|
+
if (Array.isArray(y))
|
3188
|
+
return y.map(T);
|
3189
|
+
if (We(y))
|
3171
3190
|
return new Map(
|
3172
|
-
Array.from(
|
3191
|
+
Array.from(y.entries()).map(([x, u]) => [x, T(u)])
|
3173
3192
|
);
|
3174
|
-
if (Ye(
|
3175
|
-
return new Set(Array.from(
|
3176
|
-
const
|
3177
|
-
for (const
|
3178
|
-
|
3179
|
-
return
|
3193
|
+
if (Ye(y))
|
3194
|
+
return new Set(Array.from(y).map(T));
|
3195
|
+
const w = Object.create(oe(y));
|
3196
|
+
for (const x in y)
|
3197
|
+
w[x] = T(y[x]);
|
3198
|
+
return Le(y, ze) && (w[ze] = y[ze]), w;
|
3180
3199
|
}
|
3181
|
-
function
|
3182
|
-
return
|
3200
|
+
function E(y) {
|
3201
|
+
return ce(y) ? T(y) : y;
|
3183
3202
|
}
|
3184
3203
|
bs("Patches", {
|
3185
|
-
applyPatches_:
|
3204
|
+
applyPatches_: F,
|
3186
3205
|
generatePatches_: a,
|
3187
|
-
generateReplacementPatches_:
|
3206
|
+
generateReplacementPatches_: S
|
3188
3207
|
});
|
3189
3208
|
}
|
3190
|
-
var
|
3191
|
-
|
3192
|
-
|
3209
|
+
var bt = new ws(), Es = bt.produce;
|
3210
|
+
bt.produceWithPatches.bind(
|
3211
|
+
bt
|
3193
3212
|
);
|
3194
|
-
|
3195
|
-
|
3196
|
-
var Ms =
|
3197
|
-
|
3198
|
-
|
3199
|
-
var As = 1 / 0, xs = 9007199254740991,
|
3213
|
+
bt.setAutoFreeze.bind(bt);
|
3214
|
+
bt.setUseStrictShallowCopy.bind(bt);
|
3215
|
+
var Ms = bt.applyPatches.bind(bt);
|
3216
|
+
bt.createDraft.bind(bt);
|
3217
|
+
bt.finishDraft.bind(bt);
|
3218
|
+
var As = 1 / 0, xs = 9007199254740991, Ds = "[object Arguments]", Os = "[object Function]", Ps = "[object GeneratorFunction]", Cs = "[object Symbol]", Rs = typeof St == "object" && St && St.Object === Object && St, Fs = typeof self == "object" && self && self.Object === Object && self, js = Rs || Fs || Function("return this")();
|
3200
3219
|
function zs(t, r, n) {
|
3201
3220
|
switch (n.length) {
|
3202
3221
|
case 0:
|
@@ -3210,31 +3229,31 @@ function zs(t, r, n) {
|
|
3210
3229
|
}
|
3211
3230
|
return t.apply(r, n);
|
3212
3231
|
}
|
3213
|
-
function
|
3232
|
+
function Ns(t, r) {
|
3214
3233
|
for (var n = -1, i = t ? t.length : 0, a = Array(i); ++n < i; )
|
3215
3234
|
a[n] = r(t[n], n, t);
|
3216
3235
|
return a;
|
3217
3236
|
}
|
3218
|
-
function
|
3237
|
+
function Ls(t, r) {
|
3219
3238
|
for (var n = -1, i = r.length, a = t.length; ++n < i; )
|
3220
3239
|
t[a + n] = r[n];
|
3221
3240
|
return t;
|
3222
3241
|
}
|
3223
|
-
var
|
3242
|
+
var Dn = Object.prototype, $s = Dn.hasOwnProperty, On = Dn.toString, Wn = js.Symbol, Hs = Dn.propertyIsEnumerable, Yn = Wn ? Wn.isConcatSpreadable : void 0, Bn = Math.max;
|
3224
3243
|
function Us(t, r, n, i, a) {
|
3225
3244
|
var c = -1, d = t.length;
|
3226
3245
|
for (n || (n = Bs), a || (a = []); ++c < d; ) {
|
3227
3246
|
var p = t[c];
|
3228
|
-
n(p) ?
|
3247
|
+
n(p) ? Ls(a, p) : a[a.length] = p;
|
3229
3248
|
}
|
3230
3249
|
return a;
|
3231
3250
|
}
|
3232
|
-
function
|
3233
|
-
return t = Object(t),
|
3251
|
+
function Gs(t, r) {
|
3252
|
+
return t = Object(t), Ws(t, r, function(n, i) {
|
3234
3253
|
return i in t;
|
3235
3254
|
});
|
3236
3255
|
}
|
3237
|
-
function
|
3256
|
+
function Ws(t, r, n) {
|
3238
3257
|
for (var i = -1, a = r.length, c = {}; ++i < a; ) {
|
3239
3258
|
var d = r[i], p = t[d];
|
3240
3259
|
n(p, d) && (c[d] = p);
|
@@ -3261,7 +3280,7 @@ function Ks(t) {
|
|
3261
3280
|
return r == "0" && 1 / t == -As ? "-0" : r;
|
3262
3281
|
}
|
3263
3282
|
function Xs(t) {
|
3264
|
-
return Js(t) &&
|
3283
|
+
return Js(t) && $s.call(t, "callee") && (!Hs.call(t, "callee") || On.call(t) == Ds);
|
3265
3284
|
}
|
3266
3285
|
var Vs = Array.isArray;
|
3267
3286
|
function qs(t) {
|
@@ -3271,8 +3290,8 @@ function Js(t) {
|
|
3271
3290
|
return _i(t) && qs(t);
|
3272
3291
|
}
|
3273
3292
|
function Zs(t) {
|
3274
|
-
var r = ta(t) ?
|
3275
|
-
return r ==
|
3293
|
+
var r = ta(t) ? On.call(t) : "";
|
3294
|
+
return r == Os || r == Ps;
|
3276
3295
|
}
|
3277
3296
|
function Qs(t) {
|
3278
3297
|
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= xs;
|
@@ -3285,10 +3304,10 @@ function _i(t) {
|
|
3285
3304
|
return !!t && typeof t == "object";
|
3286
3305
|
}
|
3287
3306
|
function ea(t) {
|
3288
|
-
return typeof t == "symbol" || _i(t) &&
|
3307
|
+
return typeof t == "symbol" || _i(t) && On.call(t) == Cs;
|
3289
3308
|
}
|
3290
3309
|
var ra = Ys(function(t, r) {
|
3291
|
-
return t == null ? {} :
|
3310
|
+
return t == null ? {} : Gs(t, Ns(Us(r), Ks));
|
3292
3311
|
}), na = ra;
|
3293
3312
|
const Kn = /* @__PURE__ */ Tn(na), ia = {
|
3294
3313
|
width: 1080,
|
@@ -3316,18 +3335,19 @@ const Kn = /* @__PURE__ */ Tn(na), ia = {
|
|
3316
3335
|
"trackItemDetailsMap",
|
3317
3336
|
"transitionIds",
|
3318
3337
|
"transitionsMap",
|
3319
|
-
"trackItemIds"
|
3338
|
+
"trackItemIds",
|
3339
|
+
"structure"
|
3320
3340
|
];
|
3321
3341
|
class ja {
|
3322
3342
|
constructor(r) {
|
3323
|
-
|
3324
|
-
|
3325
|
-
|
3326
|
-
|
3327
|
-
|
3328
|
-
|
3343
|
+
re(this, "stateSubject");
|
3344
|
+
re(this, "stateHistorySubject");
|
3345
|
+
re(this, "prevState");
|
3346
|
+
re(this, "undos", []);
|
3347
|
+
re(this, "redos", []);
|
3348
|
+
re(this, "listener");
|
3329
3349
|
const n = Object.assign({}, sa, r);
|
3330
|
-
this.stateSubject = new
|
3350
|
+
this.stateSubject = new Nn(n), this.stateHistorySubject = new Nn({
|
3331
3351
|
handleRedo: !1,
|
3332
3352
|
handleUndo: !1
|
3333
3353
|
}), this.prevState = n, this.initListeners();
|
@@ -3365,31 +3385,31 @@ class ja {
|
|
3365
3385
|
...i,
|
3366
3386
|
...r
|
3367
3387
|
};
|
3368
|
-
|
3388
|
+
Z(i, a) || (n.updateHistory && this.updateHistory(a, n.kind), this.prevState = i, this.stateSubject.next(a));
|
3369
3389
|
}
|
3370
3390
|
// emit changes for design size
|
3371
3391
|
subscribeToSize(r) {
|
3372
3392
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3373
|
-
|
3393
|
+
Z(n.size, this.prevState.size) || r({ size: n.size });
|
3374
3394
|
});
|
3375
3395
|
}
|
3376
3396
|
// Selectively subscribe to scale changes
|
3377
3397
|
subscribeToScale(r) {
|
3378
3398
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3379
|
-
|
3399
|
+
Z(n.scale, this.prevState.scale) || r({ scale: n.scale });
|
3380
3400
|
});
|
3381
3401
|
}
|
3382
3402
|
subscribeToUpdateTrackItem(r) {
|
3383
3403
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3384
|
-
|
3404
|
+
Z(n.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: n.trackItemsMap });
|
3385
3405
|
});
|
3386
3406
|
}
|
3387
3407
|
subscribeToUpdateTrackItemTrim(r) {
|
3388
3408
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3389
|
-
if (!
|
3409
|
+
if (!Z(n.trackItemsMap, this.prevState.trackItemsMap)) {
|
3390
3410
|
const i = Object.keys(n.trackItemsMap).filter((a) => {
|
3391
3411
|
const c = this.prevState.trackItemsMap[a], d = n.trackItemsMap[a];
|
3392
|
-
return c && d && !
|
3412
|
+
return c && d && !Z(c.trim, d.trim);
|
3393
3413
|
});
|
3394
3414
|
r({
|
3395
3415
|
trackItemsMap: n.trackItemsMap,
|
@@ -3400,7 +3420,7 @@ class ja {
|
|
3400
3420
|
}
|
3401
3421
|
subscribeToUpdateItemDetails(r) {
|
3402
3422
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3403
|
-
|
3423
|
+
Z(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
|
3404
3424
|
});
|
3405
3425
|
}
|
3406
3426
|
// Selectively subscribe to duration changes
|
@@ -3413,32 +3433,32 @@ class ja {
|
|
3413
3433
|
return this.stateHistorySubject.asObservable().subscribe((n) => {
|
3414
3434
|
if (n.handleRedo) {
|
3415
3435
|
const i = this.undos[this.undos.length - 1].type;
|
3416
|
-
|
3436
|
+
r({ ...this.getState(), type: i }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !1 });
|
3417
3437
|
}
|
3418
3438
|
if (n.handleUndo) {
|
3419
3439
|
const i = this.redos[this.redos.length - 1].type;
|
3420
|
-
|
3440
|
+
r({ ...this.getState(), type: i }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !1 });
|
3421
3441
|
}
|
3422
3442
|
});
|
3423
3443
|
}
|
3424
3444
|
subscribeToAddOrRemoveItems(r) {
|
3425
3445
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3426
|
-
(!
|
3446
|
+
(!Z(n.trackItemIds, this.prevState.trackItemIds) || !Z(n.tracks, this.prevState.tracks) || !Z(n.transitionIds, this.prevState.transitionIds)) && r({ trackItemIds: n.trackItemIds });
|
3427
3447
|
});
|
3428
3448
|
}
|
3429
3449
|
// Selectively subscribe to activeIds changes
|
3430
3450
|
subscribeToActiveIds(r) {
|
3431
3451
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3432
|
-
|
3452
|
+
Z(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
|
3433
3453
|
});
|
3434
3454
|
}
|
3435
3455
|
// Selectively subscribe to multiple track-related properties
|
3436
3456
|
subscribeToTracks(r) {
|
3437
3457
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3438
|
-
(!
|
3458
|
+
(!Z(n.tracks, this.prevState.tracks) || !Z(n.trackItemIds, this.prevState.trackItemIds) || !Z(n.trackItemsMap, this.prevState.trackItemsMap) || !Z(n.transitionIds, this.prevState.transitionIds) || !Z(n.transitionsMap, this.prevState.transitionsMap) || !Z(
|
3439
3459
|
n.trackItemDetailsMap,
|
3440
3460
|
this.prevState.trackItemDetailsMap
|
3441
|
-
) || !
|
3461
|
+
) || !Z(n.structure, this.prevState.structure)) && r({
|
3442
3462
|
tracks: n.tracks,
|
3443
3463
|
trackItemIds: n.trackItemIds,
|
3444
3464
|
trackItemsMap: n.trackItemsMap,
|
@@ -3452,68 +3472,74 @@ class ja {
|
|
3452
3472
|
undo() {
|
3453
3473
|
const r = this.undos.pop(), n = r == null ? void 0 : r.undos, i = r == null ? void 0 : r.type;
|
3454
3474
|
if (!n || !i) return;
|
3455
|
-
|
3475
|
+
Gn();
|
3456
3476
|
const {
|
3457
3477
|
trackItemDetailsMap: a,
|
3458
3478
|
trackItemIds: c,
|
3459
3479
|
tracks: d,
|
3460
3480
|
transitionIds: p,
|
3461
|
-
transitionsMap:
|
3462
|
-
trackItemsMap:
|
3463
|
-
|
3481
|
+
transitionsMap: S,
|
3482
|
+
trackItemsMap: F,
|
3483
|
+
structure: T
|
3484
|
+
} = this.getState(), E = K({
|
3464
3485
|
trackItemDetailsMap: a,
|
3465
3486
|
trackItemIds: c,
|
3466
3487
|
tracks: d,
|
3467
3488
|
transitionIds: p,
|
3468
|
-
transitionsMap:
|
3469
|
-
trackItemsMap:
|
3470
|
-
|
3471
|
-
|
3472
|
-
|
3473
|
-
|
3474
|
-
|
3475
|
-
|
3489
|
+
transitionsMap: S,
|
3490
|
+
trackItemsMap: F,
|
3491
|
+
structure: T
|
3492
|
+
}), y = [], w = [], x = [], u = [], f = [], g = [], b = [];
|
3493
|
+
n.forEach((M) => {
|
3494
|
+
let C;
|
3495
|
+
const nt = M.path.slice(1);
|
3496
|
+
M.type === "CREATE" ? C = {
|
3497
|
+
path: nt,
|
3476
3498
|
op: "remove",
|
3477
|
-
value:
|
3478
|
-
} :
|
3479
|
-
path:
|
3499
|
+
value: M.value
|
3500
|
+
} : M.type === "CHANGE" ? C = {
|
3501
|
+
path: nt,
|
3480
3502
|
op: "replace",
|
3481
|
-
value:
|
3482
|
-
} :
|
3483
|
-
path:
|
3503
|
+
value: M.oldValue
|
3504
|
+
} : C = {
|
3505
|
+
path: nt,
|
3484
3506
|
op: "add",
|
3485
|
-
value:
|
3486
|
-
},
|
3507
|
+
value: M.oldValue
|
3508
|
+
}, M.path.includes("trackItemIds") ? x.push(C) : M.path.includes("transitionIds") ? w.push(C) : M.path.includes("trackItemsMap") ? f.push(C) : M.path.includes("transitionsMap") ? u.push(C) : M.path.includes("tracks") ? y.push(C) : M.path.includes("trackItemDetailsMap") ? g.push(C) : M.path.includes("structure") && b.push(C);
|
3487
3509
|
});
|
3488
|
-
const
|
3489
|
-
|
3490
|
-
|
3491
|
-
), b = this.applyPatch(
|
3492
|
-
S.transitionIds,
|
3493
|
-
m
|
3494
|
-
), y = this.applyPatch(
|
3495
|
-
S.trackItemIds,
|
3496
|
-
M
|
3510
|
+
const m = this.applyPatch(
|
3511
|
+
E.tracks,
|
3512
|
+
y
|
3497
3513
|
), h = this.applyPatch(
|
3498
|
-
|
3499
|
-
|
3514
|
+
E.transitionIds,
|
3515
|
+
w
|
3500
3516
|
), _ = this.applyPatch(
|
3501
|
-
|
3517
|
+
E.trackItemIds,
|
3518
|
+
x
|
3519
|
+
), I = this.applyPatch(
|
3520
|
+
E.transitionsMap,
|
3502
3521
|
u
|
3503
|
-
),
|
3504
|
-
|
3522
|
+
), v = this.applyPatch(
|
3523
|
+
E.trackItemsMap,
|
3505
3524
|
f
|
3506
|
-
),
|
3507
|
-
|
3508
|
-
|
3509
|
-
|
3510
|
-
|
3511
|
-
|
3512
|
-
|
3513
|
-
|
3514
|
-
|
3515
|
-
|
3516
|
-
|
3525
|
+
), U = this.applyPatch(
|
3526
|
+
E.trackItemDetailsMap,
|
3527
|
+
g
|
3528
|
+
), D = this.applyPatch(
|
3529
|
+
E.structure,
|
3530
|
+
b
|
3531
|
+
), j = K({
|
3532
|
+
tracks: m,
|
3533
|
+
transitionIds: h,
|
3534
|
+
trackItemIds: _,
|
3535
|
+
transitionsMap: I,
|
3536
|
+
trackItemsMap: v,
|
3537
|
+
trackItemDetailsMap: U,
|
3538
|
+
structure: D
|
3539
|
+
}), z = K(this.getState()), R = { ...z, ...j };
|
3540
|
+
this.prevState = z, this.redos.push({ redos: n, type: i });
|
3541
|
+
const W = ae(R.trackItemsMap);
|
3542
|
+
this.stateSubject.next({ ...R, duration: W }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3517
3543
|
}
|
3518
3544
|
applyPatch(r, n) {
|
3519
3545
|
return n.reverse().reduce((i, a) => Es(i, (c) => {
|
@@ -3523,68 +3549,74 @@ class ja {
|
|
3523
3549
|
redo() {
|
3524
3550
|
const r = this.redos.pop(), n = r == null ? void 0 : r.redos, i = r == null ? void 0 : r.type;
|
3525
3551
|
if (!n || !i) return;
|
3526
|
-
|
3552
|
+
Gn();
|
3527
3553
|
const {
|
3528
3554
|
trackItemDetailsMap: a,
|
3529
3555
|
trackItemIds: c,
|
3530
3556
|
tracks: d,
|
3531
3557
|
transitionIds: p,
|
3532
|
-
transitionsMap:
|
3533
|
-
trackItemsMap:
|
3534
|
-
|
3558
|
+
transitionsMap: S,
|
3559
|
+
trackItemsMap: F,
|
3560
|
+
structure: T
|
3561
|
+
} = this.getState(), E = K({
|
3535
3562
|
trackItemDetailsMap: a,
|
3536
3563
|
trackItemIds: c,
|
3537
3564
|
tracks: d,
|
3538
3565
|
transitionIds: p,
|
3539
|
-
transitionsMap:
|
3540
|
-
trackItemsMap:
|
3541
|
-
|
3542
|
-
|
3543
|
-
|
3544
|
-
|
3545
|
-
|
3546
|
-
|
3566
|
+
transitionsMap: S,
|
3567
|
+
trackItemsMap: F,
|
3568
|
+
structure: T
|
3569
|
+
}), y = [], w = [], x = [], u = [], f = [], g = [], b = [];
|
3570
|
+
n.forEach((M) => {
|
3571
|
+
let C;
|
3572
|
+
const nt = M.path.slice(1);
|
3573
|
+
M.type === "CREATE" ? C = {
|
3574
|
+
path: nt,
|
3547
3575
|
op: "add",
|
3548
|
-
value:
|
3549
|
-
} :
|
3550
|
-
path:
|
3576
|
+
value: M.value
|
3577
|
+
} : M.type === "CHANGE" ? C = {
|
3578
|
+
path: nt,
|
3551
3579
|
op: "replace",
|
3552
|
-
value:
|
3553
|
-
} :
|
3554
|
-
path:
|
3580
|
+
value: M.value
|
3581
|
+
} : C = {
|
3582
|
+
path: nt,
|
3555
3583
|
op: "remove",
|
3556
|
-
value:
|
3557
|
-
},
|
3584
|
+
value: M.oldValue
|
3585
|
+
}, M.path.includes("trackItemIds") ? x.push(C) : M.path.includes("transitionIds") ? w.push(C) : M.path.includes("trackItemsMap") ? f.push(C) : M.path.includes("transitionsMap") ? u.push(C) : M.path.includes("trackItemDetailsMap") ? g.push(C) : M.path.includes("structure") ? b.push(C) : y.push(C);
|
3558
3586
|
});
|
3559
|
-
const
|
3560
|
-
|
3561
|
-
|
3562
|
-
), b = this.applyPatch(
|
3563
|
-
S.transitionIds,
|
3564
|
-
m
|
3565
|
-
), y = this.applyPatch(
|
3566
|
-
S.trackItemIds,
|
3567
|
-
M
|
3587
|
+
const m = this.applyPatch(
|
3588
|
+
E.tracks,
|
3589
|
+
y
|
3568
3590
|
), h = this.applyPatch(
|
3569
|
-
|
3570
|
-
|
3591
|
+
E.transitionIds,
|
3592
|
+
w
|
3571
3593
|
), _ = this.applyPatch(
|
3572
|
-
|
3594
|
+
E.trackItemIds,
|
3595
|
+
x
|
3596
|
+
), I = this.applyPatch(
|
3597
|
+
E.transitionsMap,
|
3573
3598
|
u
|
3574
|
-
),
|
3575
|
-
|
3599
|
+
), v = this.applyPatch(
|
3600
|
+
E.trackItemsMap,
|
3576
3601
|
f
|
3577
|
-
),
|
3578
|
-
|
3579
|
-
|
3580
|
-
|
3581
|
-
|
3582
|
-
|
3583
|
-
|
3584
|
-
|
3585
|
-
|
3586
|
-
|
3587
|
-
|
3602
|
+
), U = this.applyPatch(
|
3603
|
+
E.trackItemDetailsMap,
|
3604
|
+
g
|
3605
|
+
), D = this.applyPatch(
|
3606
|
+
E.structure,
|
3607
|
+
b
|
3608
|
+
), j = K({
|
3609
|
+
tracks: m,
|
3610
|
+
transitionIds: h,
|
3611
|
+
trackItemIds: _,
|
3612
|
+
transitionsMap: I,
|
3613
|
+
trackItemsMap: v,
|
3614
|
+
trackItemDetailsMap: U,
|
3615
|
+
structure: D
|
3616
|
+
}), z = K(this.getState()), R = { ...z, ...j };
|
3617
|
+
this.prevState = z, this.undos.push({ undos: n, type: i });
|
3618
|
+
const W = ae(R.trackItemsMap);
|
3619
|
+
this.stateSubject.next({ ...R, duration: W }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3588
3620
|
}
|
3589
3621
|
}
|
3590
3622
|
export {
|
@@ -3596,41 +3628,41 @@ export {
|
|
3596
3628
|
Ji as ACTIVE_SPLIT,
|
3597
3629
|
ma as ADD_ANIMATION,
|
3598
3630
|
Ui as ADD_AUDIO,
|
3599
|
-
|
3600
|
-
|
3631
|
+
Wi as ADD_CAPTION,
|
3632
|
+
Gi as ADD_IMAGE,
|
3601
3633
|
Bi as ADD_ITEMS,
|
3602
3634
|
pa as ADD_MASK,
|
3603
3635
|
da as ADD_PLACEHOLDER,
|
3604
3636
|
kt as ADD_PREFIX,
|
3605
3637
|
ca as ADD_SUFFIX,
|
3606
3638
|
Yi as ADD_TEMPLATE,
|
3607
|
-
|
3639
|
+
$i as ADD_TEXT,
|
3608
3640
|
ha as ADD_TRANSITION,
|
3609
|
-
|
3641
|
+
Hi as ADD_VIDEO,
|
3610
3642
|
ba as DELETE_TEMPLATE_ITEM,
|
3611
|
-
|
3643
|
+
Ni as DESIGN_LOAD,
|
3612
3644
|
En as DESIGN_PREFIX,
|
3613
|
-
|
3645
|
+
Li as DESIGN_RESIZE,
|
3614
3646
|
Ki as EDIT_OBJECT,
|
3615
|
-
|
3616
|
-
|
3617
|
-
|
3647
|
+
fe as EDIT_PREFIX,
|
3648
|
+
Ia as EDIT_SHAPE,
|
3649
|
+
ga as EDIT_TEMPLATE_ITEM,
|
3618
3650
|
ya as EDIT_TEXT,
|
3619
3651
|
_a as ENTER_EDIT_MODE,
|
3620
|
-
|
3652
|
+
Ir as HISTORY_PREFIX,
|
3621
3653
|
es as HISTORY_REDO,
|
3622
3654
|
Fa as HISTORY_RESET,
|
3623
3655
|
ts as HISTORY_UNDO,
|
3624
3656
|
Zi as LAYER_CLONE,
|
3625
|
-
|
3657
|
+
Oa as LAYER_COPY,
|
3626
3658
|
Ra as LAYER_CUT,
|
3627
3659
|
Qi as LAYER_DELETE,
|
3628
|
-
|
3660
|
+
Da as LAYER_EDITING_NAME,
|
3629
3661
|
wa as LAYER_HIDDEN,
|
3630
3662
|
ka as LAYER_LOCKED,
|
3631
3663
|
Ta as LAYER_MOVE,
|
3632
3664
|
Pa as LAYER_PASTE,
|
3633
|
-
|
3665
|
+
dt as LAYER_PREFIX,
|
3634
3666
|
xa as LAYER_RENAME,
|
3635
3667
|
Ea as LAYER_SELECT,
|
3636
3668
|
Ma as LAYER_SELECTION,
|