@designcombo/state 0.1.14 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +171 -166
- package/dist/index.umd.js +1 -1
- package/dist/utils/load-item.d.ts +3 -2
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
@@ -108,11 +108,11 @@ var tr = function() {
|
|
108
108
|
} catch (l) {
|
109
109
|
c = l instanceof Zr ? l.errors : [l];
|
110
110
|
}
|
111
|
-
var
|
112
|
-
if (
|
111
|
+
var H = this._finalizers;
|
112
|
+
if (H) {
|
113
113
|
this._finalizers = null;
|
114
114
|
try {
|
115
|
-
for (var m = sn(
|
115
|
+
for (var m = sn(H), p = m.next(); !p.done; p = m.next()) {
|
116
116
|
var h = p.value;
|
117
117
|
try {
|
118
118
|
kn(h);
|
@@ -513,8 +513,8 @@ function gn(t) {
|
|
513
513
|
var Xe = { exports: {} };
|
514
514
|
Xe.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__", o = 1, c = 2, f = 9007199254740991, d = "[object Arguments]", E = "[object Array]", j = "[object AsyncFunction]", S = "[object Boolean]",
|
517
|
-
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", o = 1, c = 2, f = 9007199254740991, d = "[object Arguments]", E = "[object Array]", j = "[object AsyncFunction]", S = "[object Boolean]", H = "[object Date]", m = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", l = "[object Map]", b = "[object Number]", v = "[object Null]", _ = "[object Object]", g = "[object Promise]", y = "[object Proxy]", R = "[object RegExp]", A = "[object Set]", O = "[object String]", D = "[object Symbol]", w = "[object Undefined]", T = "[object WeakMap]", x = "[object ArrayBuffer]", F = "[object DataView]", Dt = "[object Float32Array]", Ct = "[object Float64Array]", Ie = "[object Int8Array]", ir = "[object Int16Array]", ar = "[object Int32Array]", sr = "[object Uint8Array]", or = "[object Uint8ClampedArray]", z = "[object Uint16Array]", cr = "[object Uint32Array]", ur = /[\\^$.*+?()[\]{}|]/g, rt = /^\[object .+?Constructor\]$/, Se = /^(?:0|[1-9]\d*)$/, N = {};
|
517
|
+
N[Dt] = N[Ct] = N[Ie] = N[ir] = N[ar] = N[sr] = N[or] = N[z] = N[cr] = !0, N[d] = N[E] = N[x] = N[S] = N[F] = N[H] = N[m] = N[p] = N[l] = N[b] = N[_] = N[R] = N[A] = N[O] = N[T] = !1;
|
518
518
|
var we = typeof et == "object" && et && et.Object === Object && et, lr = typeof self == "object" && self && self.Object === Object && self, nt = we || lr || Function("return this")(), Te = r && !r.nodeType && r, ke = Te && !0 && t && !t.nodeType && t, Yt = ke && ke.exports === Te, Vt = Yt && we.process, Ae = function() {
|
519
519
|
try {
|
520
520
|
return Vt && Vt.binding && Vt.binding("util");
|
@@ -577,7 +577,7 @@ Xe.exports;
|
|
577
577
|
return e ? "Symbol(src)_1." + e : "";
|
578
578
|
}(), De = _t.toString, hr = RegExp(
|
579
579
|
"^" + Zt.call(Q).replace(ur, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
580
|
-
), Qt = Yt ? nt.Buffer : void 0, zt = nt.Symbol, Ce = nt.Uint8Array,
|
580
|
+
), Qt = Yt ? nt.Buffer : void 0, zt = nt.Symbol, Ce = nt.Uint8Array, Nt = _t.propertyIsEnumerable, vt = Rt.splice, it = zt ? zt.toStringTag : void 0, Ht = Object.getOwnPropertySymbols, te = Qt ? Qt.isBuffer : void 0, It = Me(Object.keys, Object), ee = pt(nt, "DataView"), St = pt(nt, "Map"), re = pt(nt, "Promise"), ne = pt(nt, "Set"), ie = pt(nt, "WeakMap"), mt = pt(Object, "create"), je = V(ee), ft = V(St), yr = V(re), mr = V(ne), br = V(ie), Re = zt ? zt.prototype : void 0, ae = Re ? Re.valueOf : void 0;
|
581
581
|
function W(e) {
|
582
582
|
var a = -1, s = e == null ? 0 : e.length;
|
583
583
|
for (this.clear(); ++a < s; ) {
|
@@ -728,15 +728,15 @@ Xe.exports;
|
|
728
728
|
return Wt(e) ? u : qt(u, s(e));
|
729
729
|
}
|
730
730
|
function wt(e) {
|
731
|
-
return e == null ? e === void 0 ? w : v : it && it in Object(e) ? dt(e) :
|
731
|
+
return e == null ? e === void 0 ? w : v : it && it in Object(e) ? dt(e) : He(e);
|
732
732
|
}
|
733
733
|
function ze(e) {
|
734
734
|
return lt(e) && wt(e) == d;
|
735
735
|
}
|
736
|
-
function
|
737
|
-
return e === a ? !0 : e == null || a == null || !lt(e) && !lt(a) ? e !== e && a !== a :
|
736
|
+
function Ne(e, a, s, u, k) {
|
737
|
+
return e === a ? !0 : e == null || a == null || !lt(e) && !lt(a) ? e !== e && a !== a : Nr(e, a, s, u, Ne, k);
|
738
738
|
}
|
739
|
-
function
|
739
|
+
function Nr(e, a, s, u, k, I) {
|
740
740
|
var P = Wt(e), M = Wt(a), U = P ? E : ut(e), C = M ? E : ut(a);
|
741
741
|
U = U == d ? _ : U, C = C == d ? _ : C;
|
742
742
|
var K = U == _, q = C == _, L = U == C;
|
@@ -756,14 +756,14 @@ Xe.exports;
|
|
756
756
|
}
|
757
757
|
return L ? (I || (I = new ct()), Wr(e, a, s, u, k, I)) : !1;
|
758
758
|
}
|
759
|
-
function
|
759
|
+
function Hr(e) {
|
760
760
|
if (!We(e) || Yr(e))
|
761
761
|
return !1;
|
762
762
|
var a = Ge(e) ? hr : rt;
|
763
763
|
return a.test(V(e));
|
764
764
|
}
|
765
765
|
function Ur(e) {
|
766
|
-
return lt(e) && le(e.length) && !!
|
766
|
+
return lt(e) && le(e.length) && !!N[wt(e)];
|
767
767
|
}
|
768
768
|
function Lr(e) {
|
769
769
|
if (!Vr(e))
|
@@ -815,8 +815,8 @@ Xe.exports;
|
|
815
815
|
case x:
|
816
816
|
return !(e.byteLength != a.byteLength || !I(new Ce(e), new Ce(a)));
|
817
817
|
case S:
|
818
|
-
case
|
819
|
-
case
|
818
|
+
case H:
|
819
|
+
case b:
|
820
820
|
return Ue(+e, +a);
|
821
821
|
case m:
|
822
822
|
return e.name == a.name && e.message == a.message;
|
@@ -881,7 +881,7 @@ Xe.exports;
|
|
881
881
|
}
|
882
882
|
function pt(e, a) {
|
883
883
|
var s = Jt(e, a);
|
884
|
-
return
|
884
|
+
return Hr(s) ? s : void 0;
|
885
885
|
}
|
886
886
|
function dt(e) {
|
887
887
|
var a = Q.call(e, it), s = e[it];
|
@@ -893,12 +893,12 @@ Xe.exports;
|
|
893
893
|
var k = De.call(e);
|
894
894
|
return u && (a ? e[it] = s : delete e[it]), k;
|
895
895
|
}
|
896
|
-
var Br =
|
897
|
-
return e == null ? [] : (e = Object(e), Ee(
|
898
|
-
return
|
896
|
+
var Br = Ht ? function(e) {
|
897
|
+
return e == null ? [] : (e = Object(e), Ee(Ht(e), function(a) {
|
898
|
+
return Nt.call(e, a);
|
899
899
|
}));
|
900
900
|
} : qr, ut = wt;
|
901
|
-
(ee && ut(new ee(new ArrayBuffer(1))) != F || St && ut(new St()) != l || re && ut(re.resolve()) !=
|
901
|
+
(ee && ut(new ee(new ArrayBuffer(1))) != F || St && ut(new St()) != l || re && ut(re.resolve()) != g || ne && ut(new ne()) != A || ie && ut(new ie()) != T) && (ut = function(e) {
|
902
902
|
var a = wt(e), s = a == _ ? e.constructor : void 0, u = s ? V(s) : "";
|
903
903
|
if (u)
|
904
904
|
switch (u) {
|
@@ -907,7 +907,7 @@ Xe.exports;
|
|
907
907
|
case ft:
|
908
908
|
return l;
|
909
909
|
case yr:
|
910
|
-
return
|
910
|
+
return g;
|
911
911
|
case mr:
|
912
912
|
return A;
|
913
913
|
case br:
|
@@ -929,7 +929,7 @@ Xe.exports;
|
|
929
929
|
var a = e && e.constructor, s = typeof a == "function" && a.prototype || _t;
|
930
930
|
return e === s;
|
931
931
|
}
|
932
|
-
function
|
932
|
+
function He(e) {
|
933
933
|
return De.call(e);
|
934
934
|
}
|
935
935
|
function V(e) {
|
@@ -951,14 +951,14 @@ Xe.exports;
|
|
951
951
|
var Le = ze(/* @__PURE__ */ function() {
|
952
952
|
return arguments;
|
953
953
|
}()) ? ze : function(e) {
|
954
|
-
return lt(e) && Q.call(e, "callee") && !
|
954
|
+
return lt(e) && Q.call(e, "callee") && !Nt.call(e, "callee");
|
955
955
|
}, Wt = Array.isArray;
|
956
956
|
function ue(e) {
|
957
957
|
return e != null && le(e.length) && !Ge(e);
|
958
958
|
}
|
959
959
|
var Bt = te || Jr;
|
960
960
|
function Xr(e, a) {
|
961
|
-
return
|
961
|
+
return Ne(e, a);
|
962
962
|
}
|
963
963
|
function Ge(e) {
|
964
964
|
if (!We(e))
|
@@ -988,14 +988,14 @@ Xe.exports;
|
|
988
988
|
}
|
989
989
|
t.exports = Xr;
|
990
990
|
})(Xe, Xe.exports);
|
991
|
-
var
|
992
|
-
const st = /* @__PURE__ */ gn(
|
991
|
+
var Ni = Xe.exports;
|
992
|
+
const st = /* @__PURE__ */ gn(Ni);
|
993
993
|
var qe = { exports: {} };
|
994
994
|
qe.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__", o = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]", E = "[object Date]", j = "[object Error]", S = "[object Function]",
|
997
|
-
z[c] = z[f] = z[R] = z[A] = z[d] = z[E] = z[O] = z[D] = z[w] = z[T] = z[x] = z[m] = z[p] = z[h] = z[
|
998
|
-
var cr = typeof et == "object" && et && et.Object === Object && et, ur = typeof self == "object" && self && self.Object === Object && self, rt = cr || ur || Function("return this")(), Se = r && !r.nodeType && r,
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", o = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]", E = "[object Date]", j = "[object Error]", S = "[object Function]", H = "[object GeneratorFunction]", m = "[object Map]", p = "[object Number]", h = "[object Object]", l = "[object Promise]", b = "[object RegExp]", v = "[object Set]", _ = "[object String]", g = "[object Symbol]", y = "[object WeakMap]", R = "[object ArrayBuffer]", A = "[object DataView]", O = "[object Float32Array]", D = "[object Float64Array]", w = "[object Int8Array]", T = "[object Int16Array]", x = "[object Int32Array]", F = "[object Uint8Array]", Dt = "[object Uint8ClampedArray]", Ct = "[object Uint16Array]", Ie = "[object Uint32Array]", ir = /[\\^$.*+?()[\]{}|]/g, ar = /\w*$/, sr = /^\[object .+?Constructor\]$/, or = /^(?:0|[1-9]\d*)$/, z = {};
|
997
|
+
z[c] = z[f] = z[R] = z[A] = z[d] = z[E] = z[O] = z[D] = z[w] = z[T] = z[x] = z[m] = z[p] = z[h] = z[b] = z[v] = z[_] = z[g] = z[F] = z[Dt] = z[Ct] = z[Ie] = !0, z[j] = z[S] = z[y] = !1;
|
998
|
+
var cr = typeof et == "object" && et && et.Object === Object && et, ur = typeof self == "object" && self && self.Object === Object && self, rt = cr || ur || Function("return this")(), Se = r && !r.nodeType && r, N = Se && !0 && t && !t.nodeType && t, we = N && N.exports === Se;
|
999
999
|
function lr(e, a) {
|
1000
1000
|
return e.set(a[0], a[1]), e;
|
1001
1001
|
}
|
@@ -1056,7 +1056,7 @@ qe.exports;
|
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
1057
1057
|
}(), Me = pr.toString, ot = jt.hasOwnProperty, Rt = jt.toString, dr = RegExp(
|
1058
1058
|
"^" + Me.call(ot).replace(ir, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
1059
|
-
), _t = we ? rt.Buffer : void 0, Ft = rt.Symbol, Zt = rt.Uint8Array, Q = qt(Object.getPrototypeOf, Object), Pe = Object.create, De = jt.propertyIsEnumerable, hr = fr.splice, Qt = Object.getOwnPropertySymbols, zt = _t ? _t.isBuffer : void 0, Ce = qt(Object.keys, Object),
|
1059
|
+
), _t = we ? rt.Buffer : void 0, Ft = rt.Symbol, Zt = rt.Uint8Array, Q = qt(Object.getPrototypeOf, Object), Pe = Object.create, De = jt.propertyIsEnumerable, hr = fr.splice, Qt = Object.getOwnPropertySymbols, zt = _t ? _t.isBuffer : void 0, Ce = qt(Object.keys, Object), Nt = at(rt, "DataView"), vt = at(rt, "Map"), it = at(rt, "Promise"), Ht = at(rt, "Set"), te = at(rt, "WeakMap"), It = at(Object, "create"), ee = V(Nt), St = V(vt), re = V(it), ne = V(Ht), ie = V(te), mt = Ft ? Ft.prototype : void 0, je = mt ? mt.valueOf : void 0;
|
1060
1060
|
function ft(e) {
|
1061
1061
|
var a = -1, s = e ? e.length : 0;
|
1062
1062
|
for (this.clear(); ++a < s; ) {
|
@@ -1199,7 +1199,7 @@ qe.exports;
|
|
1199
1199
|
if (M = Br(e), !a)
|
1200
1200
|
return Lr(e, M);
|
1201
1201
|
} else {
|
1202
|
-
var C = dt(e), K = C == S || C ==
|
1202
|
+
var C = dt(e), K = C == S || C == H;
|
1203
1203
|
if (Ge(e))
|
1204
1204
|
return Gt(e, a);
|
1205
1205
|
if (C == h || C == c || K && !I) {
|
@@ -1240,7 +1240,7 @@ qe.exports;
|
|
1240
1240
|
return a.test(V(e));
|
1241
1241
|
}
|
1242
1242
|
function zr(e) {
|
1243
|
-
if (!
|
1243
|
+
if (!He(e))
|
1244
1244
|
return Ce(e);
|
1245
1245
|
var a = [];
|
1246
1246
|
for (var s in Object(e))
|
@@ -1265,15 +1265,15 @@ qe.exports;
|
|
1265
1265
|
var u = a ? s(Ee(e), !0) : Ee(e);
|
1266
1266
|
return Yt(u, lr, new e.constructor());
|
1267
1267
|
}
|
1268
|
-
function
|
1268
|
+
function Ne(e) {
|
1269
1269
|
var a = new e.constructor(e.source, ar.exec(e));
|
1270
1270
|
return a.lastIndex = e.lastIndex, a;
|
1271
1271
|
}
|
1272
|
-
function
|
1272
|
+
function Nr(e, a, s) {
|
1273
1273
|
var u = a ? s(Oe(e), !0) : Oe(e);
|
1274
1274
|
return Yt(u, nt, new e.constructor());
|
1275
1275
|
}
|
1276
|
-
function
|
1276
|
+
function Hr(e) {
|
1277
1277
|
return je ? Object(je.call(e)) : {};
|
1278
1278
|
}
|
1279
1279
|
function Ur(e, a) {
|
@@ -1309,7 +1309,7 @@ qe.exports;
|
|
1309
1309
|
return Fr(s) ? s : void 0;
|
1310
1310
|
}
|
1311
1311
|
var pt = Qt ? qt(Qt, Object) : qr, dt = Rr;
|
1312
|
-
(
|
1312
|
+
(Nt && dt(new Nt(new ArrayBuffer(1))) != A || vt && dt(new vt()) != m || it && dt(it.resolve()) != l || Ht && dt(new Ht()) != v || te && dt(new te()) != y) && (dt = function(e) {
|
1313
1313
|
var a = Rt.call(e), s = a == h ? e.constructor : void 0, u = s ? V(s) : void 0;
|
1314
1314
|
if (u)
|
1315
1315
|
switch (u) {
|
@@ -1331,7 +1331,7 @@ qe.exports;
|
|
1331
1331
|
return a && typeof e[0] == "string" && ot.call(e, "index") && (s.index = e.index, s.input = e.input), s;
|
1332
1332
|
}
|
1333
1333
|
function ut(e) {
|
1334
|
-
return typeof e.constructor == "function" && !
|
1334
|
+
return typeof e.constructor == "function" && !He(e) ? Cr(Q(e)) : {};
|
1335
1335
|
}
|
1336
1336
|
function $r(e, a, s, u) {
|
1337
1337
|
var k = e.constructor;
|
@@ -1358,12 +1358,12 @@ qe.exports;
|
|
1358
1358
|
case p:
|
1359
1359
|
case _:
|
1360
1360
|
return new k(e);
|
1361
|
-
case g:
|
1362
|
-
return He(e);
|
1363
|
-
case v:
|
1364
|
-
return Hr(e, u, s);
|
1365
1361
|
case b:
|
1366
|
-
return
|
1362
|
+
return Ne(e);
|
1363
|
+
case v:
|
1364
|
+
return Nr(e, u, s);
|
1365
|
+
case g:
|
1366
|
+
return Hr(e);
|
1367
1367
|
}
|
1368
1368
|
}
|
1369
1369
|
function Kr(e, a) {
|
@@ -1376,7 +1376,7 @@ qe.exports;
|
|
1376
1376
|
function Vr(e) {
|
1377
1377
|
return !!xe && xe in e;
|
1378
1378
|
}
|
1379
|
-
function
|
1379
|
+
function He(e) {
|
1380
1380
|
var a = e && e.constructor, s = typeof a == "function" && a.prototype || jt;
|
1381
1381
|
return e === s;
|
1382
1382
|
}
|
@@ -1412,7 +1412,7 @@ qe.exports;
|
|
1412
1412
|
var Ge = zt || Jr;
|
1413
1413
|
function le(e) {
|
1414
1414
|
var a = lt(e) ? Rt.call(e) : "";
|
1415
|
-
return a == S || a ==
|
1415
|
+
return a == S || a == H;
|
1416
1416
|
}
|
1417
1417
|
function We(e) {
|
1418
1418
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= o;
|
@@ -1435,8 +1435,8 @@ qe.exports;
|
|
1435
1435
|
}
|
1436
1436
|
t.exports = Ue;
|
1437
1437
|
})(qe, qe.exports);
|
1438
|
-
var
|
1439
|
-
const tt = /* @__PURE__ */ gn(
|
1438
|
+
var Hi = qe.exports;
|
1439
|
+
const tt = /* @__PURE__ */ gn(Hi), Ui = (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 o = i.width, c = i.height;
|
@@ -1626,33 +1626,35 @@ const Wi = async (t, r) => {
|
|
1626
1626
|
metadata: t.metadata || {}
|
1627
1627
|
};
|
1628
1628
|
}, Ki = async (t, r) => {
|
1629
|
+
const n = t;
|
1629
1630
|
await Je([
|
1630
1631
|
{
|
1631
|
-
fontFamily:
|
1632
|
-
url:
|
1632
|
+
fontFamily: n.details.fontFamily,
|
1633
|
+
url: n.details.fontUrl
|
1633
1634
|
}
|
1634
1635
|
]);
|
1635
|
-
const
|
1636
|
-
width:
|
1637
|
-
height:
|
1636
|
+
const i = n.id, o = n.details, c = Jn(o), f = Xn(n.details.text, c), d = rr(r, {
|
1637
|
+
width: c.width,
|
1638
|
+
height: f
|
1638
1639
|
});
|
1639
1640
|
return {
|
1640
|
-
id:
|
1641
|
+
id: i,
|
1641
1642
|
name: "caption",
|
1642
1643
|
type: "caption",
|
1643
|
-
display: ge(
|
1644
|
+
display: ge(n.display),
|
1644
1645
|
details: {
|
1645
|
-
...
|
1646
|
-
text:
|
1646
|
+
...c,
|
1647
|
+
text: o.text || "",
|
1647
1648
|
// Default text content
|
1648
|
-
height:
|
1649
|
+
height: f,
|
1649
1650
|
// Default height
|
1650
|
-
fontUrl:
|
1651
|
-
top:
|
1652
|
-
left:
|
1653
|
-
borderWidth:
|
1654
|
-
borderColor:
|
1655
|
-
boxShadow:
|
1651
|
+
fontUrl: o.fontUrl,
|
1652
|
+
top: d.top,
|
1653
|
+
left: d.left,
|
1654
|
+
borderWidth: o.borderWidth || 0,
|
1655
|
+
borderColor: o.borderColor || "#000000",
|
1656
|
+
boxShadow: o.boxShadow || er,
|
1657
|
+
words: o.words || []
|
1656
1658
|
},
|
1657
1659
|
metadata: {}
|
1658
1660
|
};
|
@@ -1766,8 +1768,10 @@ function qi(t) {
|
|
1766
1768
|
), d = r.subscribe(async (p) => {
|
1767
1769
|
var h;
|
1768
1770
|
if (p.key === hi) {
|
1769
|
-
const l = (h = p.value) == null ? void 0 : h.payload,
|
1770
|
-
|
1771
|
+
const l = (h = p.value) == null ? void 0 : h.payload, b = l.trackItemIds, v = l.trackItemDetailsMap;
|
1772
|
+
console.warn("IMPROVE FONTS LOADING");
|
1773
|
+
const _ = b.map(async (g) => {
|
1774
|
+
const y = v[g];
|
1771
1775
|
return (y.type === "caption" || y.type === "text") && await Je([
|
1772
1776
|
{
|
1773
1777
|
fontFamily: y.details.fontFamily,
|
@@ -1783,23 +1787,23 @@ function qi(t) {
|
|
1783
1787
|
if (p.key === yi) return t.undo();
|
1784
1788
|
if (p.key === mi) return t.redo();
|
1785
1789
|
}), j = i.subscribe((p) => {
|
1786
|
-
var l,
|
1790
|
+
var l, b, v;
|
1787
1791
|
const h = [];
|
1788
|
-
if ((l = p.value) != null && l.payload.trackItemIds && (h.push((
|
1789
|
-
const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds,
|
1792
|
+
if ((l = p.value) != null && l.payload.trackItemIds && (h.push((b = p.value) == null ? void 0 : b.payload.trackItemIds), t.updateState({ activeIds: h })), p.key === bi) {
|
1793
|
+
const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds, g = tt(t.getState()), y = _ && _.length ? _ : g.activeIds, R = g.trackItemIds, A = g.trackItemDetailsMap, O = R.filter(
|
1790
1794
|
(F) => !y.includes(F)
|
1791
1795
|
), D = Object.fromEntries(
|
1792
1796
|
Object.entries(A).filter(
|
1793
1797
|
([F]) => !y.includes(F)
|
1794
1798
|
)
|
1795
1799
|
), w = Xi(
|
1796
|
-
|
1800
|
+
g.tracks,
|
1797
1801
|
y
|
1798
1802
|
), T = Object.fromEntries(
|
1799
|
-
Object.entries(
|
1803
|
+
Object.entries(g.trackItemsMap).filter(
|
1800
1804
|
([F]) => !y.includes(F)
|
1801
1805
|
)
|
1802
|
-
), x = tn(
|
1806
|
+
), x = tn(g.trackItemsMap);
|
1803
1807
|
t.updateState(
|
1804
1808
|
{
|
1805
1809
|
trackItemIds: O,
|
@@ -1813,10 +1817,11 @@ function qi(t) {
|
|
1813
1817
|
);
|
1814
1818
|
}
|
1815
1819
|
}), S = n.subscribe(async (p) => {
|
1816
|
-
var _,
|
1820
|
+
var _, g, y, R, A;
|
1817
1821
|
const h = tt(t.getState());
|
1818
|
-
let l = [],
|
1822
|
+
let l = [], b = "text";
|
1819
1823
|
if (p.key === gi) {
|
1824
|
+
b = "caption";
|
1820
1825
|
const O = (_ = p.value) == null ? void 0 : _.payload, D = [];
|
1821
1826
|
for (const x of O) {
|
1822
1827
|
const F = Ki(x, {
|
@@ -1833,27 +1838,27 @@ function qi(t) {
|
|
1833
1838
|
T.push(F);
|
1834
1839
|
const { details: Dt, ...Ct } = x;
|
1835
1840
|
h.trackItemDetailsMap[F] = {
|
1836
|
-
type:
|
1841
|
+
type: b,
|
1837
1842
|
details: Dt
|
1838
1843
|
}, h.trackItemsMap[F] = Ct, h.trackItemIds.push(F);
|
1839
1844
|
}
|
1840
1845
|
l = T;
|
1841
1846
|
}
|
1842
1847
|
if (p.key === _i) {
|
1843
|
-
|
1844
|
-
const O = await Yi((
|
1848
|
+
b = "text";
|
1849
|
+
const O = await Yi((g = p.value) == null ? void 0 : g.payload, {
|
1845
1850
|
size: {
|
1846
1851
|
width: 1080,
|
1847
1852
|
height: 1920
|
1848
1853
|
}
|
1849
1854
|
}), { details: D, ...w } = O;
|
1850
1855
|
h.trackItemDetailsMap[w.id] = {
|
1851
|
-
type:
|
1856
|
+
type: b,
|
1852
1857
|
details: D
|
1853
1858
|
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
|
1854
1859
|
}
|
1855
1860
|
if (p.key === vi) {
|
1856
|
-
|
1861
|
+
b = "image";
|
1857
1862
|
const O = await $i((y = p.value) == null ? void 0 : y.payload, {
|
1858
1863
|
size: {
|
1859
1864
|
width: 1080,
|
@@ -1861,20 +1866,20 @@ function qi(t) {
|
|
1861
1866
|
}
|
1862
1867
|
}), { details: D, ...w } = O;
|
1863
1868
|
h.trackItemDetailsMap[w.id] = {
|
1864
|
-
type:
|
1869
|
+
type: b,
|
1865
1870
|
details: D
|
1866
1871
|
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
|
1867
1872
|
}
|
1868
1873
|
if (p.key === Ii) {
|
1869
|
-
|
1874
|
+
b = "audio";
|
1870
1875
|
const O = await Bi((R = p.value) == null ? void 0 : R.payload), { details: D, ...w } = O;
|
1871
1876
|
h.trackItemDetailsMap[w.id] = {
|
1872
|
-
type:
|
1877
|
+
type: b,
|
1873
1878
|
details: D
|
1874
1879
|
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
|
1875
1880
|
}
|
1876
1881
|
if (p.key === Si) {
|
1877
|
-
|
1882
|
+
b = "video";
|
1878
1883
|
const O = await Wi((A = p.value) == null ? void 0 : A.payload, {
|
1879
1884
|
size: {
|
1880
1885
|
width: 1080,
|
@@ -1882,14 +1887,14 @@ function qi(t) {
|
|
1882
1887
|
}
|
1883
1888
|
}), { details: D, ...w } = O;
|
1884
1889
|
h.trackItemDetailsMap[w.id] = {
|
1885
|
-
type:
|
1890
|
+
type: b,
|
1886
1891
|
details: D
|
1887
1892
|
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
|
1888
1893
|
}
|
1889
1894
|
h.tracks.unshift({
|
1890
1895
|
id: fn(),
|
1891
1896
|
accepts: ["text", "audio", "helper", "video", "image", "caption"],
|
1892
|
-
type:
|
1897
|
+
type: b,
|
1893
1898
|
items: l,
|
1894
1899
|
magnetic: !1,
|
1895
1900
|
static: !1
|
@@ -1908,27 +1913,27 @@ function qi(t) {
|
|
1908
1913
|
kind: "add"
|
1909
1914
|
}
|
1910
1915
|
);
|
1911
|
-
}),
|
1916
|
+
}), H = c.subscribe(async (p) => {
|
1912
1917
|
var h;
|
1913
1918
|
if (p.key === wi) {
|
1914
|
-
const l = tt(t.getState()),
|
1919
|
+
const l = tt(t.getState()), b = (h = p.value) == null ? void 0 : h.options.time;
|
1915
1920
|
if (l.activeIds.length === 1) {
|
1916
1921
|
const v = l.activeIds[0], _ = l.trackItemsMap[v];
|
1917
|
-
if (
|
1922
|
+
if (b >= _.display.to || b <= _.display.from)
|
1918
1923
|
return;
|
1919
|
-
const
|
1924
|
+
const g = l.trackItemDetailsMap[v], y = Pn(), R = {
|
1920
1925
|
..._,
|
1921
1926
|
id: y,
|
1922
1927
|
display: {
|
1923
|
-
from:
|
1928
|
+
from: b,
|
1924
1929
|
to: _.display.to
|
1925
1930
|
},
|
1926
1931
|
trim: {
|
1927
|
-
from:
|
1932
|
+
from: b,
|
1928
1933
|
to: _.display.to
|
1929
1934
|
}
|
1930
1935
|
};
|
1931
|
-
l.trackItemsMap[v].display.to =
|
1936
|
+
l.trackItemsMap[v].display.to = b, l.trackItemsMap[y] = R, l.trackItemIds.push(y), l.trackItemDetailsMap[y] = g, l.tracks.forEach((A) => {
|
1932
1937
|
A.items.includes(v) && A.items.push(y);
|
1933
1938
|
}), t.updateState(
|
1934
1939
|
{
|
@@ -1948,25 +1953,25 @@ function qi(t) {
|
|
1948
1953
|
if (p.key === Ti) {
|
1949
1954
|
const l = tt(t.getState());
|
1950
1955
|
if (l.activeIds.length) {
|
1951
|
-
const
|
1952
|
-
activeIds:
|
1956
|
+
const b = l.activeIds, v = [], _ = {
|
1957
|
+
activeIds: b,
|
1953
1958
|
trackItemDetailsMap: {},
|
1954
1959
|
trackItemsMap: {},
|
1955
1960
|
tracks: []
|
1956
1961
|
};
|
1957
|
-
|
1962
|
+
b.forEach((y) => {
|
1958
1963
|
_.trackItemDetailsMap[y] = l.trackItemDetailsMap[y], _.trackItemsMap[y] = l.trackItemsMap[y], v.push(
|
1959
1964
|
l.tracks.find((R) => R.items.includes(y))
|
1960
1965
|
);
|
1961
1966
|
});
|
1962
|
-
const
|
1963
|
-
v.filter((y) =>
|
1967
|
+
const g = /* @__PURE__ */ new Set();
|
1968
|
+
v.filter((y) => g.has(y.id) ? !1 : (g.add(y), !0)), _.tracks = Array.from(g.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
|
1964
1969
|
}
|
1965
1970
|
}
|
1966
1971
|
if (p.key === ki) {
|
1967
1972
|
const l = localStorage.getItem("DesignComboTemp");
|
1968
1973
|
if (!l) return;
|
1969
|
-
const
|
1974
|
+
const b = tt(t.getState()), v = JSON.parse(l), _ = {}, g = v.trackItemsMap, y = v.trackItemDetailsMap, R = v.tracks, A = [], O = v.activeIds.map(async (D) => {
|
1970
1975
|
const w = y[D];
|
1971
1976
|
(w.type === "caption" || w.type === "text") && await Je([
|
1972
1977
|
{
|
@@ -1975,10 +1980,10 @@ function qi(t) {
|
|
1975
1980
|
}
|
1976
1981
|
]);
|
1977
1982
|
const T = Pn();
|
1978
|
-
return _[D] = T,
|
1979
|
-
...
|
1983
|
+
return _[D] = T, b.trackItemsMap[T] = {
|
1984
|
+
...g[D],
|
1980
1985
|
id: T
|
1981
|
-
},
|
1986
|
+
}, b.trackItemDetailsMap[T] = w, b.trackItemIds.push(T), !0;
|
1982
1987
|
});
|
1983
1988
|
await Promise.all(O), R.forEach((D) => {
|
1984
1989
|
const w = D.items.map((x) => _[x]), T = {
|
@@ -1987,12 +1992,12 @@ function qi(t) {
|
|
1987
1992
|
id: fn()
|
1988
1993
|
};
|
1989
1994
|
A.push(T);
|
1990
|
-
}),
|
1995
|
+
}), b.tracks = [...b.tracks, ...A], t.updateState(
|
1991
1996
|
{
|
1992
|
-
trackItemDetailsMap:
|
1993
|
-
tracks:
|
1994
|
-
trackItemIds:
|
1995
|
-
trackItemsMap:
|
1997
|
+
trackItemDetailsMap: b.trackItemDetailsMap,
|
1998
|
+
tracks: b.tracks,
|
1999
|
+
trackItemIds: b.trackItemIds,
|
2000
|
+
trackItemsMap: b.trackItemsMap
|
1996
2001
|
},
|
1997
2002
|
{
|
1998
2003
|
updateHistory: !0,
|
@@ -2003,10 +2008,10 @@ function qi(t) {
|
|
2003
2008
|
}), m = f.subscribe((p) => {
|
2004
2009
|
var h, l;
|
2005
2010
|
if (p.key === Ai) {
|
2006
|
-
const
|
2007
|
-
if (!
|
2011
|
+
const b = tt(t.getState()), v = b.trackItemDetailsMap, _ = b.trackItemsMap, g = Object.keys((h = p.value) == null ? void 0 : h.payload);
|
2012
|
+
if (!g.length) return;
|
2008
2013
|
const y = (l = p.value) == null ? void 0 : l.payload;
|
2009
|
-
|
2014
|
+
g.forEach((A) => {
|
2010
2015
|
y[A].details ? v[A].details = {
|
2011
2016
|
...v[A].details,
|
2012
2017
|
...y[A].details
|
@@ -2028,7 +2033,7 @@ function qi(t) {
|
|
2028
2033
|
});
|
2029
2034
|
return {
|
2030
2035
|
unsubscribe: () => {
|
2031
|
-
S.unsubscribe(),
|
2036
|
+
S.unsubscribe(), H.unsubscribe(), m.unsubscribe(), E.unsubscribe(), j.unsubscribe(), d.unsubscribe();
|
2032
2037
|
}
|
2033
2038
|
};
|
2034
2039
|
}
|
@@ -2038,11 +2043,11 @@ function Zn(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2038
2043
|
let o = [];
|
2039
2044
|
const c = Array.isArray(t);
|
2040
2045
|
for (const j in t) {
|
2041
|
-
const S = t[j],
|
2046
|
+
const S = t[j], H = c ? +j : j;
|
2042
2047
|
if (!(j in r)) {
|
2043
2048
|
o.push({
|
2044
2049
|
type: "REMOVE",
|
2045
|
-
path: [
|
2050
|
+
path: [H],
|
2046
2051
|
oldValue: t[j]
|
2047
2052
|
});
|
2048
2053
|
continue;
|
@@ -2050,10 +2055,10 @@ function Zn(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2050
2055
|
const m = r[j], p = typeof S == "object" && typeof m == "object" && Array.isArray(S) === Array.isArray(m);
|
2051
2056
|
if (S && m && p && !Ji[(E = (d = Object.getPrototypeOf(S)) == null ? void 0 : d.constructor) == null ? void 0 : E.name] && (!n.cyclesFix || !i.includes(S))) {
|
2052
2057
|
const h = Zn(S, m, n, n.cyclesFix ? i.concat([S]) : []);
|
2053
|
-
o.push.apply(o, h.map((l) => (l.path.unshift(
|
2058
|
+
o.push.apply(o, h.map((l) => (l.path.unshift(H), l)));
|
2054
2059
|
} else S !== m && // treat NaN values as equivalent
|
2055
2060
|
!(Number.isNaN(S) && Number.isNaN(m)) && !(p && (isNaN(S) ? S + "" == m + "" : +S == +m)) && o.push({
|
2056
|
-
path: [
|
2061
|
+
path: [H],
|
2057
2062
|
type: "CHANGE",
|
2058
2063
|
value: m,
|
2059
2064
|
oldValue: S
|
@@ -2561,35 +2566,35 @@ function Fn() {
|
|
2561
2566
|
}
|
2562
2567
|
}
|
2563
2568
|
function c(m, p, h, l) {
|
2564
|
-
let { base_:
|
2565
|
-
_.length <
|
2566
|
-
for (let
|
2567
|
-
if (v[
|
2568
|
-
const y = p.concat([
|
2569
|
+
let { base_: b, assigned_: v } = m, _ = m.copy_;
|
2570
|
+
_.length < b.length && ([b, _] = [_, b], [h, l] = [l, h]);
|
2571
|
+
for (let g = 0; g < b.length; g++)
|
2572
|
+
if (v[g] && _[g] !== b[g]) {
|
2573
|
+
const y = p.concat([g]);
|
2569
2574
|
h.push({
|
2570
2575
|
op: r,
|
2571
2576
|
path: y,
|
2572
2577
|
// Need to maybe clone it, as it can in fact be the original value
|
2573
2578
|
// due to the base/copy inversion at the start of this function
|
2574
|
-
value:
|
2579
|
+
value: H(_[g])
|
2575
2580
|
}), l.push({
|
2576
2581
|
op: r,
|
2577
2582
|
path: y,
|
2578
|
-
value:
|
2583
|
+
value: H(b[g])
|
2579
2584
|
});
|
2580
2585
|
}
|
2581
|
-
for (let
|
2582
|
-
const y = p.concat([
|
2586
|
+
for (let g = b.length; g < _.length; g++) {
|
2587
|
+
const y = p.concat([g]);
|
2583
2588
|
h.push({
|
2584
2589
|
op: n,
|
2585
2590
|
path: y,
|
2586
2591
|
// Need to maybe clone it, as it can in fact be the original value
|
2587
2592
|
// due to the base/copy inversion at the start of this function
|
2588
|
-
value:
|
2593
|
+
value: H(_[g])
|
2589
2594
|
});
|
2590
2595
|
}
|
2591
|
-
for (let
|
2592
|
-
const y = p.concat([
|
2596
|
+
for (let g = _.length - 1; b.length <= g; --g) {
|
2597
|
+
const y = p.concat([g]);
|
2593
2598
|
l.push({
|
2594
2599
|
op: i,
|
2595
2600
|
path: y
|
@@ -2597,44 +2602,44 @@ function Fn() {
|
|
2597
2602
|
}
|
2598
2603
|
}
|
2599
2604
|
function f(m, p, h, l) {
|
2600
|
-
const { base_:
|
2601
|
-
de(m.assigned_, (_,
|
2602
|
-
const y = en(
|
2605
|
+
const { base_: b, copy_: v } = m;
|
2606
|
+
de(m.assigned_, (_, g) => {
|
2607
|
+
const y = en(b, _), R = en(v, _), A = g ? he(b, _) ? r : n : i;
|
2603
2608
|
if (y === R && A === r)
|
2604
2609
|
return;
|
2605
2610
|
const O = p.concat(_);
|
2606
2611
|
h.push(A === i ? { op: A, path: O } : { op: A, path: O, value: R }), l.push(
|
2607
|
-
A === n ? { op: i, path: O } : A === i ? { op: n, path: O, value:
|
2612
|
+
A === n ? { op: i, path: O } : A === i ? { op: n, path: O, value: H(y) } : { op: r, path: O, value: H(y) }
|
2608
2613
|
);
|
2609
2614
|
});
|
2610
2615
|
}
|
2611
2616
|
function d(m, p, h, l) {
|
2612
|
-
let { base_:
|
2613
|
-
|
2614
|
-
if (!v.has(
|
2617
|
+
let { base_: b, copy_: v } = m, _ = 0;
|
2618
|
+
b.forEach((g) => {
|
2619
|
+
if (!v.has(g)) {
|
2615
2620
|
const y = p.concat([_]);
|
2616
2621
|
h.push({
|
2617
2622
|
op: i,
|
2618
2623
|
path: y,
|
2619
|
-
value:
|
2624
|
+
value: g
|
2620
2625
|
}), l.unshift({
|
2621
2626
|
op: n,
|
2622
2627
|
path: y,
|
2623
|
-
value:
|
2628
|
+
value: g
|
2624
2629
|
});
|
2625
2630
|
}
|
2626
2631
|
_++;
|
2627
|
-
}), _ = 0, v.forEach((
|
2628
|
-
if (!
|
2632
|
+
}), _ = 0, v.forEach((g) => {
|
2633
|
+
if (!b.has(g)) {
|
2629
2634
|
const y = p.concat([_]);
|
2630
2635
|
h.push({
|
2631
2636
|
op: n,
|
2632
2637
|
path: y,
|
2633
|
-
value:
|
2638
|
+
value: g
|
2634
2639
|
}), l.unshift({
|
2635
2640
|
op: i,
|
2636
2641
|
path: y,
|
2637
|
-
value:
|
2642
|
+
value: g
|
2638
2643
|
});
|
2639
2644
|
}
|
2640
2645
|
_++;
|
@@ -2653,34 +2658,34 @@ function Fn() {
|
|
2653
2658
|
}
|
2654
2659
|
function j(m, p) {
|
2655
2660
|
return p.forEach((h) => {
|
2656
|
-
const { path: l, op:
|
2661
|
+
const { path: l, op: b } = h;
|
2657
2662
|
let v = m;
|
2658
2663
|
for (let R = 0; R < l.length - 1; R++) {
|
2659
2664
|
const A = Mt(v);
|
2660
2665
|
let O = l[R];
|
2661
2666
|
typeof O != "string" && typeof O != "number" && (O = "" + O), (A === 0 || A === 1) && (O === "__proto__" || O === "constructor") && G(19), typeof v == "function" && O === "prototype" && G(19), v = en(v, O), typeof v != "object" && G(18, l.join("/"));
|
2662
2667
|
}
|
2663
|
-
const _ = Mt(v),
|
2664
|
-
switch (
|
2668
|
+
const _ = Mt(v), g = S(h.value), y = l[l.length - 1];
|
2669
|
+
switch (b) {
|
2665
2670
|
case r:
|
2666
2671
|
switch (_) {
|
2667
2672
|
case 2:
|
2668
|
-
return v.set(y,
|
2673
|
+
return v.set(y, g);
|
2669
2674
|
case 3:
|
2670
2675
|
G(16);
|
2671
2676
|
default:
|
2672
|
-
return v[y] =
|
2677
|
+
return v[y] = g;
|
2673
2678
|
}
|
2674
2679
|
case n:
|
2675
2680
|
switch (_) {
|
2676
2681
|
case 1:
|
2677
|
-
return y === "-" ? v.push(
|
2682
|
+
return y === "-" ? v.push(g) : v.splice(y, 0, g);
|
2678
2683
|
case 2:
|
2679
|
-
return v.set(y,
|
2684
|
+
return v.set(y, g);
|
2680
2685
|
case 3:
|
2681
|
-
return v.add(
|
2686
|
+
return v.add(g);
|
2682
2687
|
default:
|
2683
|
-
return v[y] =
|
2688
|
+
return v[y] = g;
|
2684
2689
|
}
|
2685
2690
|
case i:
|
2686
2691
|
switch (_) {
|
@@ -2694,7 +2699,7 @@ function Fn() {
|
|
2694
2699
|
return delete v[y];
|
2695
2700
|
}
|
2696
2701
|
default:
|
2697
|
-
G(17,
|
2702
|
+
G(17, b);
|
2698
2703
|
}
|
2699
2704
|
}), m;
|
2700
2705
|
}
|
@@ -2714,7 +2719,7 @@ function Fn() {
|
|
2714
2719
|
p[h] = S(m[h]);
|
2715
2720
|
return he(m, pe) && (p[pe] = m[pe]), p;
|
2716
2721
|
}
|
2717
|
-
function
|
2722
|
+
function H(m) {
|
2718
2723
|
return xt(m) ? S(m) : m;
|
2719
2724
|
}
|
2720
2725
|
ea("Patches", {
|
@@ -2756,7 +2761,7 @@ function Ia(t, r) {
|
|
2756
2761
|
t[o + n] = r[n];
|
2757
2762
|
return t;
|
2758
2763
|
}
|
2759
|
-
var Sn = Object.prototype, Sa = Sn.hasOwnProperty, wn = Sn.toString, zn = ga.Symbol, wa = Sn.propertyIsEnumerable,
|
2764
|
+
var Sn = Object.prototype, Sa = Sn.hasOwnProperty, wn = Sn.toString, zn = ga.Symbol, wa = Sn.propertyIsEnumerable, Nn = zn ? zn.isConcatSpreadable : void 0, Hn = Math.max;
|
2760
2765
|
function Ta(t, r, n, i, o) {
|
2761
2766
|
var c = -1, f = t.length;
|
2762
2767
|
for (n || (n = Oa), o || (o = []); ++c < f; ) {
|
@@ -2778,8 +2783,8 @@ function Aa(t, r, n) {
|
|
2778
2783
|
return c;
|
2779
2784
|
}
|
2780
2785
|
function Ea(t, r) {
|
2781
|
-
return r =
|
2782
|
-
for (var n = arguments, i = -1, o =
|
2786
|
+
return r = Hn(r === void 0 ? t.length - 1 : r, 0), function() {
|
2787
|
+
for (var n = arguments, i = -1, o = Hn(n.length - r, 0), c = Array(o); ++i < o; )
|
2783
2788
|
c[i] = n[r + i];
|
2784
2789
|
i = -1;
|
2785
2790
|
for (var f = Array(r + 1); ++i < r; )
|
@@ -2788,7 +2793,7 @@ function Ea(t, r) {
|
|
2788
2793
|
};
|
2789
2794
|
}
|
2790
2795
|
function Oa(t) {
|
2791
|
-
return Pa(t) || Ma(t) || !!(
|
2796
|
+
return Pa(t) || Ma(t) || !!(Nn && t && t[Nn]);
|
2792
2797
|
}
|
2793
2798
|
function xa(t) {
|
2794
2799
|
if (typeof t == "string" || za(t))
|
@@ -2823,10 +2828,10 @@ function ai(t) {
|
|
2823
2828
|
function za(t) {
|
2824
2829
|
return typeof t == "symbol" || ai(t) && wn.call(t) == ya;
|
2825
2830
|
}
|
2826
|
-
var
|
2831
|
+
var Na = Ea(function(t, r) {
|
2827
2832
|
return t == null ? {} : ka(t, va(Ta(r), xa));
|
2828
|
-
}),
|
2829
|
-
const Un = /* @__PURE__ */ gn(
|
2833
|
+
}), Ha = Na;
|
2834
|
+
const Un = /* @__PURE__ */ gn(Ha), Ua = {
|
2830
2835
|
tracks: [],
|
2831
2836
|
trackItemIds: [],
|
2832
2837
|
trackItemsMap: {},
|
@@ -2973,7 +2978,7 @@ class Wa {
|
|
2973
2978
|
transitionIds: d,
|
2974
2979
|
transitionsMap: E,
|
2975
2980
|
trackItemsMap: j
|
2976
|
-
}),
|
2981
|
+
}), H = [], m = [], p = [], h = [], l = [], b = [];
|
2977
2982
|
n.forEach((T) => {
|
2978
2983
|
let x;
|
2979
2984
|
const F = T.path.slice(1);
|
@@ -2989,15 +2994,15 @@ class Wa {
|
|
2989
2994
|
path: F,
|
2990
2995
|
op: "add",
|
2991
2996
|
value: T.oldValue
|
2992
|
-
}, T.path.includes("trackItemIds") ? p.push(x) : T.path.includes("transitionIds") ? m.push(x) : T.path.includes("trackItemsMap") ? l.push(x) : T.path.includes("transitionsMap") ? h.push(x) : T.path.includes("tracks") ?
|
2997
|
+
}, T.path.includes("trackItemIds") ? p.push(x) : T.path.includes("transitionIds") ? m.push(x) : T.path.includes("trackItemsMap") ? l.push(x) : T.path.includes("transitionsMap") ? h.push(x) : T.path.includes("tracks") ? H.push(x) : T.path.includes("trackItemDetailsMap") && b.push(x);
|
2993
2998
|
});
|
2994
2999
|
const v = this.applyPatch(
|
2995
3000
|
S.tracks,
|
2996
|
-
|
3001
|
+
H
|
2997
3002
|
), _ = this.applyPatch(
|
2998
3003
|
S.transitionIds,
|
2999
3004
|
m
|
3000
|
-
),
|
3005
|
+
), g = this.applyPatch(
|
3001
3006
|
S.trackItemIds,
|
3002
3007
|
p
|
3003
3008
|
), y = this.applyPatch(
|
@@ -3008,11 +3013,11 @@ class Wa {
|
|
3008
3013
|
l
|
3009
3014
|
), A = this.applyPatch(
|
3010
3015
|
S.trackItemDetailsMap,
|
3011
|
-
|
3016
|
+
b
|
3012
3017
|
), O = tt({
|
3013
3018
|
tracks: v,
|
3014
3019
|
transitionIds: _,
|
3015
|
-
trackItemIds:
|
3020
|
+
trackItemIds: g,
|
3016
3021
|
transitionsMap: y,
|
3017
3022
|
trackItemsMap: R,
|
3018
3023
|
trackItemDetailsMap: A
|
@@ -3042,7 +3047,7 @@ class Wa {
|
|
3042
3047
|
transitionIds: d,
|
3043
3048
|
transitionsMap: E,
|
3044
3049
|
trackItemsMap: j
|
3045
|
-
}),
|
3050
|
+
}), H = [], m = [], p = [], h = [], l = [], b = [];
|
3046
3051
|
n.forEach((T) => {
|
3047
3052
|
let x;
|
3048
3053
|
const F = T.path.slice(1);
|
@@ -3058,15 +3063,15 @@ class Wa {
|
|
3058
3063
|
path: F,
|
3059
3064
|
op: "remove",
|
3060
3065
|
value: T.oldValue
|
3061
|
-
}, T.path.includes("trackItemIds") ? p.push(x) : T.path.includes("transitionIds") ? m.push(x) : T.path.includes("trackItemsMap") ? l.push(x) : T.path.includes("transitionsMap") ? h.push(x) : T.path.includes("trackItemDetailsMap") ?
|
3066
|
+
}, T.path.includes("trackItemIds") ? p.push(x) : T.path.includes("transitionIds") ? m.push(x) : T.path.includes("trackItemsMap") ? l.push(x) : T.path.includes("transitionsMap") ? h.push(x) : T.path.includes("trackItemDetailsMap") ? b.push(x) : H.push(x);
|
3062
3067
|
});
|
3063
3068
|
const v = this.applyPatch(
|
3064
3069
|
S.tracks,
|
3065
|
-
|
3070
|
+
H
|
3066
3071
|
), _ = this.applyPatch(
|
3067
3072
|
S.transitionIds,
|
3068
3073
|
m
|
3069
|
-
),
|
3074
|
+
), g = this.applyPatch(
|
3070
3075
|
S.trackItemIds,
|
3071
3076
|
p
|
3072
3077
|
), y = this.applyPatch(
|
@@ -3077,11 +3082,11 @@ class Wa {
|
|
3077
3082
|
l
|
3078
3083
|
), A = this.applyPatch(
|
3079
3084
|
S.trackItemDetailsMap,
|
3080
|
-
|
3085
|
+
b
|
3081
3086
|
), O = tt({
|
3082
3087
|
tracks: v,
|
3083
3088
|
transitionIds: _,
|
3084
|
-
trackItemIds:
|
3089
|
+
trackItemIds: g,
|
3085
3090
|
transitionsMap: y,
|
3086
3091
|
trackItemsMap: R,
|
3087
3092
|
trackItemDetailsMap: A
|
package/dist/index.umd.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
(function(A,X){typeof exports=="object"&&typeof module<"u"?module.exports=X(require("@designcombo/events")):typeof define=="function"&&define.amd?define(["@designcombo/events"],X):(A=typeof globalThis<"u"?globalThis:A||self,A.events=X(A.events))})(this,function(A){"use strict";var va=Object.defineProperty;var Ia=(A,X,ut)=>X in A?va(A,X,{enumerable:!0,configurable:!0,writable:!0,value:ut}):A[X]=ut;var jt=(A,X,ut)=>Ia(A,typeof X!="symbol"?X+"":X,ut);var X=function(t,r){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},X(t,r)};function ut(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");X(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}function ir(t){var r=typeof Symbol=="function"&&Symbol.iterator,n=r&&t[r],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function ar(t,r){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),o,c=[],l;try{for(;(r===void 0||r-- >0)&&!(o=i.next()).done;)c.push(o.value)}catch(d){l={error:d}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(l)throw l.error}}return c}function sr(t,r,n){if(n||arguments.length===2)for(var i=0,o=r.length,c;i<o;i++)(c||!(i in r))&&(c||(c=Array.prototype.slice.call(r,0,i)),c[i]=r[i]);return t.concat(c||Array.prototype.slice.call(r))}typeof SuppressedError=="function"&&SuppressedError;function ht(t){return typeof t=="function"}function wn(t){var r=function(i){Error.call(i),i.stack=new Error().stack},n=t(r);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var or=wn(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
2
2
|
`+n.map(function(i,o){return o+1+") "+i.toString()}).join(`
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function cr(t,r){if(t){var n=t.indexOf(r);0<=n&&t.splice(n,1)}}var Ie=function(){function t(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var r,n,i,o,c;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var d=ir(l),O=d.next();!O.done;O=d.next()){var R=O.value;R.remove(this)}}catch(f){r={error:f}}finally{try{O&&!O.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}else l.remove(this);var S=this.initialTeardown;if(ht(S))try{S()}catch(f){c=f instanceof or?f.errors:[f]}var U=this._finalizers;if(U){this._finalizers=null;try{for(var m=ir(U),p=m.next();!p.done;p=m.next()){var h=p.value;try{An(h)}catch(f){c=c??[],f instanceof or?c=sr(sr([],ar(c)),ar(f.errors)):c.push(f)}}}catch(f){i={error:f}}finally{try{p&&!p.done&&(o=m.return)&&o.call(m)}finally{if(i)throw i.error}}}if(c)throw new or(c)}},t.prototype.add=function(r){var n;if(r&&r!==this)if(this.closed)An(r);else{if(r instanceof t){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(r)}},t.prototype._hasParent=function(r){var n=this._parentage;return n===r||Array.isArray(n)&&n.includes(r)},t.prototype._addParent=function(r){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(r),n):n?[n,r]:r},t.prototype._removeParent=function(r){var n=this._parentage;n===r?this._parentage=null:Array.isArray(n)&&cr(n,r)},t.prototype.remove=function(r){var n=this._finalizers;n&&cr(n,r),r instanceof t&&r._removeParent(this)},t.EMPTY=function(){var r=new t;return r.closed=!0,r}(),t}(),Tn=Ie.EMPTY;function kn(t){return t instanceof Ie||t&&"closed"in t&&ht(t.remove)&&ht(t.add)&&ht(t.unsubscribe)}function An(t){ht(t)?t():t.unsubscribe()}var En={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},On={setTimeout:function(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return setTimeout.apply(void 0,sr([t,r],ar(n)))},clearTimeout:function(t){var r=On.delegate;return((r==null?void 0:r.clearTimeout)||clearTimeout)(t)},delegate:void 0};function ai(t){On.setTimeout(function(){throw t})}function xn(){}function Se(t){t()}var Mn=function(t){ut(r,t);function r(n){var i=t.call(this)||this;return i.isStopped=!1,n?(i.destination=n,kn(n)&&n.add(i)):i.destination=ui,i}return r.create=function(n,i,o){return new fr(n,i,o)},r.prototype.next=function(n){this.isStopped||this._next(n)},r.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(n){this.destination.next(n)},r.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(Ie),si=Function.prototype.bind;function ur(t,r){return si.call(t,r)}var oi=function(){function t(r){this.partialObserver=r}return t.prototype.next=function(r){var n=this.partialObserver;if(n.next)try{n.next(r)}catch(i){we(i)}},t.prototype.error=function(r){var n=this.partialObserver;if(n.error)try{n.error(r)}catch(i){we(i)}else we(r)},t.prototype.complete=function(){var r=this.partialObserver;if(r.complete)try{r.complete()}catch(n){we(n)}},t}(),fr=function(t){ut(r,t);function r(n,i,o){var c=t.call(this)||this,l;if(ht(n)||!n)l={next:n??void 0,error:i??void 0,complete:o??void 0};else{var d;c&&En.useDeprecatedNextContext?(d=Object.create(n),d.unsubscribe=function(){return c.unsubscribe()},l={next:n.next&&ur(n.next,d),error:n.error&&ur(n.error,d),complete:n.complete&&ur(n.complete,d)}):l=n}return c.destination=new oi(l),c}return r}(Mn);function we(t){ai(t)}function ci(t){throw t}var ui={closed:!0,next:xn,error:ci,complete:xn},fi=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function li(t){return t}function pi(t){return t.length===0?li:t.length===1?t[0]:function(n){return t.reduce(function(i,o){return o(i)},n)}}var Pn=function(){function t(r){r&&(this._subscribe=r)}return t.prototype.lift=function(r){var n=new t;return n.source=this,n.operator=r,n},t.prototype.subscribe=function(r,n,i){var o=this,c=hi(r)?r:new fr(r,n,i);return Se(function(){var l=o,d=l.operator,O=l.source;c.add(d?d.call(c,O):O?o._subscribe(c):o._trySubscribe(c))}),c},t.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(n){r.error(n)}},t.prototype.forEach=function(r,n){var i=this;return n=Dn(n),new n(function(o,c){var l=new fr({next:function(d){try{r(d)}catch(O){c(O),l.unsubscribe()}},error:c,complete:o});i.subscribe(l)})},t.prototype._subscribe=function(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)},t.prototype[fi]=function(){return this},t.prototype.pipe=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return pi(r)(this)},t.prototype.toPromise=function(r){var n=this;return r=Dn(r),new r(function(i,o){var c;n.subscribe(function(l){return c=l},function(l){return o(l)},function(){return i(c)})})},t.create=function(r){return new t(r)},t}();function Dn(t){var r;return(r=t??En.Promise)!==null&&r!==void 0?r:Promise}function di(t){return t&&ht(t.next)&&ht(t.error)&&ht(t.complete)}function hi(t){return t&&t instanceof Mn||di(t)&&kn(t)}var yi=wn(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Cn=function(t){ut(r,t);function r(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return r.prototype.lift=function(n){var i=new jn(this,this);return i.operator=n,i},r.prototype._throwIfClosed=function(){if(this.closed)throw new yi},r.prototype.next=function(n){var i=this;Se(function(){var o,c;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var l=ir(i.currentObservers),d=l.next();!d.done;d=l.next()){var O=d.value;O.next(n)}}catch(R){o={error:R}}finally{try{d&&!d.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}}})},r.prototype.error=function(n){var i=this;Se(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=n;for(var o=i.observers;o.length;)o.shift().error(n)}})},r.prototype.complete=function(){var n=this;Se(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var i=n.observers;i.length;)i.shift().complete()}})},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},r.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},r.prototype._innerSubscribe=function(n){var i=this,o=this,c=o.hasError,l=o.isStopped,d=o.observers;return c||l?Tn:(this.currentObservers=null,d.push(n),new Ie(function(){i.currentObservers=null,cr(d,n)}))},r.prototype._checkFinalizedStatuses=function(n){var i=this,o=i.hasError,c=i.thrownError,l=i.isStopped;o?n.error(c):l&&n.complete()},r.prototype.asObservable=function(){var n=new Pn;return n.source=this,n},r.create=function(n,i){return new jn(n,i)},r}(Pn),jn=function(t){ut(r,t);function r(n,i){var o=t.call(this)||this;return o.destination=n,o.source=i,o}return r.prototype.next=function(n){var i,o;(o=(i=this.destination)===null||i===void 0?void 0:i.next)===null||o===void 0||o.call(i,n)},r.prototype.error=function(n){var i,o;(o=(i=this.destination)===null||i===void 0?void 0:i.error)===null||o===void 0||o.call(i,n)},r.prototype.complete=function(){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||i===void 0||i.call(n)},r.prototype._subscribe=function(n){var i,o;return(o=(i=this.source)===null||i===void 0?void 0:i.subscribe(n))!==null&&o!==void 0?o:Tn},r}(Cn),Rn=function(t){ut(r,t);function r(n){var i=t.call(this)||this;return i._value=n,i}return Object.defineProperty(r.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),r.prototype._subscribe=function(n){var i=t.prototype._subscribe.call(this,n);return!i.closed&&n.next(this._value),i},r.prototype.getValue=function(){var n=this,i=n.hasError,o=n.thrownError,c=n._value;if(i)throw o;return this._throwIfClosed(),c},r.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},r}(Cn),et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Te={exports:{}};Te.exports,function(t,r){var n=200,i="__lodash_hash_undefined__",o=1,c=2,l=9007199254740991,d="[object Arguments]",O="[object Array]",R="[object AsyncFunction]",S="[object Boolean]",U="[object Date]",m="[object Error]",p="[object Function]",h="[object GeneratorFunction]",f="[object Map]",g="[object Number]",v="[object Null]",_="[object Object]",b="[object Promise]",y="[object Proxy]",F="[object RegExp]",E="[object Set]",x="[object String]",C="[object Symbol]",w="[object Undefined]",T="[object WeakMap]",M="[object ArrayBuffer]",z="[object DataView]",Rt="[object Float32Array]",Ft="[object Float64Array]",De="[object Int8Array]",Or="[object Int16Array]",xr="[object Int32Array]",Mr="[object Uint8Array]",Pr="[object Uint8ClampedArray]",H="[object Uint16Array]",Dr="[object Uint32Array]",Cr=/[\\^$.*+?()[\]{}|]/g,at=/^\[object .+?Constructor\]$/,Ce=/^(?:0|[1-9]\d*)$/,N={};N[Rt]=N[Ft]=N[De]=N[Or]=N[xr]=N[Mr]=N[Pr]=N[H]=N[Dr]=!0,N[d]=N[O]=N[M]=N[S]=N[z]=N[U]=N[m]=N[p]=N[f]=N[g]=N[_]=N[F]=N[E]=N[x]=N[T]=!1;var je=typeof et=="object"&&et&&et.Object===Object&&et,jr=typeof self=="object"&&self&&self.Object===Object&&self,st=je||jr||Function("return this")(),Re=r&&!r.nodeType&&r,Fe=Re&&!0&&t&&!t.nodeType&&t,re=Fe&&Fe.exports===Re,ne=re&&je.process,ze=function(){try{return ne&&ne.binding&&ne.binding("util")}catch{}}(),ie=ze&&ze.isTypedArray;function He(e,a){for(var s=-1,u=e==null?0:e.length,k=0,I=[];++s<u;){var D=e[s];a(D,s,e)&&(I[k++]=D)}return I}function ae(e,a){for(var s=-1,u=a.length,k=e.length;++s<u;)e[k+s]=a[s];return e}function Ne(e,a){for(var s=-1,u=e==null?0:e.length;++s<u;)if(a(e[s],s,e))return!0;return!1}function Rr(e,a){for(var s=-1,u=Array(e);++s<e;)u[s]=a(s);return u}function Fr(e){return function(a){return e(a)}}function zt(e,a){return e.has(a)}function se(e,a){return e==null?void 0:e[a]}function Ue(e){var a=-1,s=Array(e.size);return e.forEach(function(u,k){s[++a]=[k,u]}),s}function Le(e,a){return function(s){return e(a(s))}}function ft(e){var a=-1,s=Array(e.size);return e.forEach(function(u){s[++a]=u}),s}var Ht=Array.prototype,zr=Function.prototype,Et=Object.prototype,Nt=st["__core-js_shared__"],oe=zr.toString,nt=Et.hasOwnProperty,Ge=function(){var e=/[^.]+$/.exec(Nt&&Nt.keys&&Nt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),We=Et.toString,Hr=RegExp("^"+oe.call(nt).replace(Cr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ce=re?st.Buffer:void 0,Ut=st.Symbol,Be=st.Uint8Array,Lt=Et.propertyIsEnumerable,Ot=Ht.splice,ot=Ut?Ut.toStringTag:void 0,Gt=Object.getOwnPropertySymbols,ue=ce?ce.isBuffer:void 0,xt=Le(Object.keys,Object),fe=mt(st,"DataView"),Mt=mt(st,"Map"),le=mt(st,"Promise"),pe=mt(st,"Set"),de=mt(st,"WeakMap"),vt=mt(Object,"create"),$e=q(fe),yt=q(Mt),Nr=q(le),Ur=q(pe),Lr=q(de),Ke=Ut?Ut.prototype:void 0,he=Ke?Ke.valueOf:void 0;function B(e){var a=-1,s=e==null?0:e.length;for(this.clear();++a<s;){var u=e[a];this.set(u[0],u[1])}}function Gr(){this.__data__=vt?vt(null):{},this.size=0}function Wr(e){var a=this.has(e)&&delete this.__data__[e];return this.size-=a?1:0,a}function Br(e){var a=this.__data__;if(vt){var s=a[e];return s===i?void 0:s}return nt.call(a,e)?a[e]:void 0}function $r(e){var a=this.__data__;return vt?a[e]!==void 0:nt.call(a,e)}function Kr(e,a){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=vt&&a===void 0?i:a,this}B.prototype.clear=Gr,B.prototype.delete=Wr,B.prototype.get=Br,B.prototype.has=$r,B.prototype.set=Kr;function K(e){var a=-1,s=e==null?0:e.length;for(this.clear();++a<s;){var u=e[a];this.set(u[0],u[1])}}function Yr(){this.__data__=[],this.size=0}function Vr(e){var a=this.__data__,s=$t(a,e);if(s<0)return!1;var u=a.length-1;return s==u?a.pop():Ot.call(a,s,1),--this.size,!0}function Xr(e){var a=this.__data__,s=$t(a,e);return s<0?void 0:a[s][1]}function qr(e){return $t(this.__data__,e)>-1}function Jr(e,a){var s=this.__data__,u=$t(s,e);return u<0?(++this.size,s.push([e,a])):s[u][1]=a,this}K.prototype.clear=Yr,K.prototype.delete=Vr,K.prototype.get=Xr,K.prototype.has=qr,K.prototype.set=Jr;function J(e){var a=-1,s=e==null?0:e.length;for(this.clear();++a<s;){var u=e[a];this.set(u[0],u[1])}}function Zr(){this.size=0,this.__data__={hash:new B,map:new(Mt||K),string:new B}}function Qr(e){var a=ct(this,e).delete(e);return this.size-=a?1:0,a}function tn(e){return ct(this,e).get(e)}function en(e){return ct(this,e).has(e)}function rn(e,a){var s=ct(this,e),u=s.size;return s.set(e,a),this.size+=s.size==u?0:1,this}J.prototype.clear=Zr,J.prototype.delete=Qr,J.prototype.get=tn,J.prototype.has=en,J.prototype.set=rn;function Wt(e){var a=-1,s=e==null?0:e.length;for(this.__data__=new J;++a<s;)this.add(e[a])}function Ye(e){return this.__data__.set(e,i),this}function Bt(e){return this.__data__.has(e)}Wt.prototype.add=Wt.prototype.push=Ye,Wt.prototype.has=Bt;function lt(e){var a=this.__data__=new K(e);this.size=a.size}function ye(){this.__data__=new K,this.size=0}function nn(e){var a=this.__data__,s=a.delete(e);return this.size=a.size,s}function an(e){return this.__data__.get(e)}function sn(e){return this.__data__.has(e)}function on(e,a){var s=this.__data__;if(s instanceof K){var u=s.__data__;if(!Mt||u.length<n-1)return u.push([e,a]),this.size=++s.size,this;s=this.__data__=new J(u)}return s.set(e,a),this.size=s.size,this}lt.prototype.clear=ye,lt.prototype.delete=nn,lt.prototype.get=an,lt.prototype.has=sn,lt.prototype.set=on;function cn(e,a){var s=Kt(e),u=!s&&Ze(e),k=!s&&!u&&Yt(e),I=!s&&!u&&!k&&er(e),D=s||u||k||I,P=D?Rr(e.length,String):[],L=P.length;for(var j in e)nt.call(e,j)&&!(D&&(j=="length"||k&&(j=="offset"||j=="parent")||I&&(j=="buffer"||j=="byteLength"||j=="byteOffset")||mn(j,L)))&&P.push(j);return P}function $t(e,a){for(var s=e.length;s--;)if(Je(e[s][0],a))return s;return-1}function me(e,a,s){var u=a(e);return Kt(e)?u:ae(u,s(e))}function Pt(e){return e==null?e===void 0?w:v:ot&&ot in Object(e)?bt(e):qe(e)}function Ve(e){return dt(e)&&Pt(e)==d}function Xe(e,a,s,u,k){return e===a?!0:e==null||a==null||!dt(e)&&!dt(a)?e!==e&&a!==a:un(e,a,s,u,Xe,k)}function un(e,a,s,u,k,I){var D=Kt(e),P=Kt(a),L=D?O:pt(e),j=P?O:pt(a);L=L==d?_:L,j=j==d?_:j;var Y=L==_,Z=j==_,W=L==j;if(W&&Yt(e)){if(!Yt(a))return!1;D=!0,Y=!1}if(W&&!Y)return I||(I=new lt),D||er(e)?be(e,a,s,u,k,I):dn(e,a,L,s,u,k,I);if(!(s&o)){var V=Y&&nt.call(e,"__wrapped__"),$=Z&&nt.call(a,"__wrapped__");if(V||$){var It=V?e.value():e,gt=$?a.value():a;return I||(I=new lt),k(It,gt,s,u,I)}}return W?(I||(I=new lt),hn(e,a,s,u,k,I)):!1}function fn(e){if(!tr(e)||gn(e))return!1;var a=Qe(e)?Hr:at;return a.test(q(e))}function ln(e){return dt(e)&&_e(e.length)&&!!N[Pt(e)]}function pn(e){if(!_n(e))return xt(e);var a=[];for(var s in Object(e))nt.call(e,s)&&s!="constructor"&&a.push(s);return a}function be(e,a,s,u,k,I){var D=s&o,P=e.length,L=a.length;if(P!=L&&!(D&&L>P))return!1;var j=I.get(e);if(j&&I.get(a))return j==a;var Y=-1,Z=!0,W=s&c?new Wt:void 0;for(I.set(e,a),I.set(a,e);++Y<P;){var V=e[Y],$=a[Y];if(u)var It=D?u($,V,Y,a,e,I):u(V,$,Y,e,a,I);if(It!==void 0){if(It)continue;Z=!1;break}if(W){if(!Ne(a,function(gt,Ct){if(!zt(W,Ct)&&(V===gt||k(V,gt,s,u,I)))return W.push(Ct)})){Z=!1;break}}else if(!(V===$||k(V,$,s,u,I))){Z=!1;break}}return I.delete(e),I.delete(a),Z}function dn(e,a,s,u,k,I,D){switch(s){case z:if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case M:return!(e.byteLength!=a.byteLength||!I(new Be(e),new Be(a)));case S:case U:case g:return Je(+e,+a);case m:return e.name==a.name&&e.message==a.message;case F:case x:return e==a+"";case f:var P=Ue;case E:var L=u&o;if(P||(P=ft),e.size!=a.size&&!L)return!1;var j=D.get(e);if(j)return j==a;u|=c,D.set(e,a);var Y=be(P(e),P(a),u,k,I,D);return D.delete(e),Y;case C:if(he)return he.call(e)==he.call(a)}return!1}function hn(e,a,s,u,k,I){var D=s&o,P=Dt(e),L=P.length,j=Dt(a),Y=j.length;if(L!=Y&&!D)return!1;for(var Z=L;Z--;){var W=P[Z];if(!(D?W in a:nt.call(a,W)))return!1}var V=I.get(e);if(V&&I.get(a))return V==a;var $=!0;I.set(e,a),I.set(a,e);for(var It=D;++Z<L;){W=P[Z];var gt=e[W],Ct=a[W];if(u)var ii=D?u(Ct,gt,W,a,e,I):u(gt,Ct,W,e,a,I);if(!(ii===void 0?gt===Ct||k(gt,Ct,s,u,I):ii)){$=!1;break}It||(It=W=="constructor")}if($&&!It){var rr=e.constructor,nr=a.constructor;rr!=nr&&"constructor"in e&&"constructor"in a&&!(typeof rr=="function"&&rr instanceof rr&&typeof nr=="function"&&nr instanceof nr)&&($=!1)}return I.delete(e),I.delete(a),$}function Dt(e){return me(e,ve,yn)}function ct(e,a){var s=e.__data__;return bn(a)?s[typeof a=="string"?"string":"hash"]:s.map}function mt(e,a){var s=se(e,a);return fn(s)?s:void 0}function bt(e){var a=nt.call(e,ot),s=e[ot];try{e[ot]=void 0;var u=!0}catch{}var k=We.call(e);return u&&(a?e[ot]=s:delete e[ot]),k}var yn=Gt?function(e){return e==null?[]:(e=Object(e),He(Gt(e),function(a){return Lt.call(e,a)}))}:In,pt=Pt;(fe&&pt(new fe(new ArrayBuffer(1)))!=z||Mt&&pt(new Mt)!=f||le&&pt(le.resolve())!=b||pe&&pt(new pe)!=E||de&&pt(new de)!=T)&&(pt=function(e){var a=Pt(e),s=a==_?e.constructor:void 0,u=s?q(s):"";if(u)switch(u){case $e:return z;case yt:return f;case Nr:return b;case Ur:return E;case Lr:return T}return a});function mn(e,a){return a=a??l,!!a&&(typeof e=="number"||Ce.test(e))&&e>-1&&e%1==0&&e<a}function bn(e){var a=typeof e;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?e!=="__proto__":e===null}function gn(e){return!!Ge&&Ge in e}function _n(e){var a=e&&e.constructor,s=typeof a=="function"&&a.prototype||Et;return e===s}function qe(e){return We.call(e)}function q(e){if(e!=null){try{return oe.call(e)}catch{}try{return e+""}catch{}}return""}function Je(e,a){return e===a||e!==e&&a!==a}var Ze=Ve(function(){return arguments}())?Ve:function(e){return dt(e)&&nt.call(e,"callee")&&!Lt.call(e,"callee")},Kt=Array.isArray;function ge(e){return e!=null&&_e(e.length)&&!Qe(e)}var Yt=ue||Sn;function vn(e,a){return Xe(e,a)}function Qe(e){if(!tr(e))return!1;var a=Pt(e);return a==p||a==h||a==R||a==y}function _e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=l}function tr(e){var a=typeof e;return e!=null&&(a=="object"||a=="function")}function dt(e){return e!=null&&typeof e=="object"}var er=ie?Fr(ie):ln;function ve(e){return ge(e)?cn(e):pn(e)}function In(){return[]}function Sn(){return!1}t.exports=vn}(Te,Te.exports);var mi=Te.exports;const it=lr(mi);var ke={exports:{}};ke.exports,function(t,r){var n=200,i="__lodash_hash_undefined__",o=9007199254740991,c="[object Arguments]",l="[object Array]",d="[object Boolean]",O="[object Date]",R="[object Error]",S="[object Function]",U="[object GeneratorFunction]",m="[object Map]",p="[object Number]",h="[object Object]",f="[object Promise]",g="[object RegExp]",v="[object Set]",_="[object String]",b="[object Symbol]",y="[object WeakMap]",F="[object ArrayBuffer]",E="[object DataView]",x="[object Float32Array]",C="[object Float64Array]",w="[object Int8Array]",T="[object Int16Array]",M="[object Int32Array]",z="[object Uint8Array]",Rt="[object Uint8ClampedArray]",Ft="[object Uint16Array]",De="[object Uint32Array]",Or=/[\\^$.*+?()[\]{}|]/g,xr=/\w*$/,Mr=/^\[object .+?Constructor\]$/,Pr=/^(?:0|[1-9]\d*)$/,H={};H[c]=H[l]=H[F]=H[E]=H[d]=H[O]=H[x]=H[C]=H[w]=H[T]=H[M]=H[m]=H[p]=H[h]=H[g]=H[v]=H[_]=H[b]=H[z]=H[Rt]=H[Ft]=H[De]=!0,H[R]=H[S]=H[y]=!1;var Dr=typeof et=="object"&&et&&et.Object===Object&&et,Cr=typeof self=="object"&&self&&self.Object===Object&&self,at=Dr||Cr||Function("return this")(),Ce=r&&!r.nodeType&&r,N=Ce&&!0&&t&&!t.nodeType&&t,je=N&&N.exports===Ce;function jr(e,a){return e.set(a[0],a[1]),e}function st(e,a){return e.add(a),e}function Re(e,a){for(var s=-1,u=e?e.length:0;++s<u&&a(e[s],s,e)!==!1;);return e}function Fe(e,a){for(var s=-1,u=a.length,k=e.length;++s<u;)e[k+s]=a[s];return e}function re(e,a,s,u){for(var k=-1,I=e?e.length:0;++k<I;)s=a(s,e[k],k,e);return s}function ne(e,a){for(var s=-1,u=Array(e);++s<e;)u[s]=a(s);return u}function ze(e,a){return e==null?void 0:e[a]}function ie(e){var a=!1;if(e!=null&&typeof e.toString!="function")try{a=!!(e+"")}catch{}return a}function He(e){var a=-1,s=Array(e.size);return e.forEach(function(u,k){s[++a]=[k,u]}),s}function ae(e,a){return function(s){return e(a(s))}}function Ne(e){var a=-1,s=Array(e.size);return e.forEach(function(u){s[++a]=u}),s}var Rr=Array.prototype,Fr=Function.prototype,zt=Object.prototype,se=at["__core-js_shared__"],Ue=function(){var e=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Le=Fr.toString,ft=zt.hasOwnProperty,Ht=zt.toString,zr=RegExp("^"+Le.call(ft).replace(Or,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Et=je?at.Buffer:void 0,Nt=at.Symbol,oe=at.Uint8Array,nt=ae(Object.getPrototypeOf,Object),Ge=Object.create,We=zt.propertyIsEnumerable,Hr=Rr.splice,ce=Object.getOwnPropertySymbols,Ut=Et?Et.isBuffer:void 0,Be=ae(Object.keys,Object),Lt=ct(at,"DataView"),Ot=ct(at,"Map"),ot=ct(at,"Promise"),Gt=ct(at,"Set"),ue=ct(at,"WeakMap"),xt=ct(Object,"create"),fe=q(Lt),Mt=q(Ot),le=q(ot),pe=q(Gt),de=q(ue),vt=Nt?Nt.prototype:void 0,$e=vt?vt.valueOf:void 0;function yt(e){var a=-1,s=e?e.length:0;for(this.clear();++a<s;){var u=e[a];this.set(u[0],u[1])}}function Nr(){this.__data__=xt?xt(null):{}}function Ur(e){return this.has(e)&&delete this.__data__[e]}function Lr(e){var a=this.__data__;if(xt){var s=a[e];return s===i?void 0:s}return ft.call(a,e)?a[e]:void 0}function Ke(e){var a=this.__data__;return xt?a[e]!==void 0:ft.call(a,e)}function he(e,a){var s=this.__data__;return s[e]=xt&&a===void 0?i:a,this}yt.prototype.clear=Nr,yt.prototype.delete=Ur,yt.prototype.get=Lr,yt.prototype.has=Ke,yt.prototype.set=he;function B(e){var a=-1,s=e?e.length:0;for(this.clear();++a<s;){var u=e[a];this.set(u[0],u[1])}}function Gr(){this.__data__=[]}function Wr(e){var a=this.__data__,s=Bt(a,e);if(s<0)return!1;var u=a.length-1;return s==u?a.pop():Hr.call(a,s,1),!0}function Br(e){var a=this.__data__,s=Bt(a,e);return s<0?void 0:a[s][1]}function $r(e){return Bt(this.__data__,e)>-1}function Kr(e,a){var s=this.__data__,u=Bt(s,e);return u<0?s.push([e,a]):s[u][1]=a,this}B.prototype.clear=Gr,B.prototype.delete=Wr,B.prototype.get=Br,B.prototype.has=$r,B.prototype.set=Kr;function K(e){var a=-1,s=e?e.length:0;for(this.clear();++a<s;){var u=e[a];this.set(u[0],u[1])}}function Yr(){this.__data__={hash:new yt,map:new(Ot||B),string:new yt}}function Vr(e){return Dt(this,e).delete(e)}function Xr(e){return Dt(this,e).get(e)}function qr(e){return Dt(this,e).has(e)}function Jr(e,a){return Dt(this,e).set(e,a),this}K.prototype.clear=Yr,K.prototype.delete=Vr,K.prototype.get=Xr,K.prototype.has=qr,K.prototype.set=Jr;function J(e){this.__data__=new B(e)}function Zr(){this.__data__=new B}function Qr(e){return this.__data__.delete(e)}function tn(e){return this.__data__.get(e)}function en(e){return this.__data__.has(e)}function rn(e,a){var s=this.__data__;if(s instanceof B){var u=s.__data__;if(!Ot||u.length<n-1)return u.push([e,a]),this;s=this.__data__=new K(u)}return s.set(e,a),this}J.prototype.clear=Zr,J.prototype.delete=Qr,J.prototype.get=tn,J.prototype.has=en,J.prototype.set=rn;function Wt(e,a){var s=ge(e)||Kt(e)?ne(e.length,String):[],u=s.length,k=!!u;for(var I in e)ft.call(e,I)&&!(k&&(I=="length"||bn(I,u)))&&s.push(I);return s}function Ye(e,a,s){var u=e[a];(!(ft.call(e,a)&&Ze(u,s))||s===void 0&&!(a in e))&&(e[a]=s)}function Bt(e,a){for(var s=e.length;s--;)if(Ze(e[s][0],a))return s;return-1}function lt(e,a){return e&&be(a,ve(a),e)}function ye(e,a,s,u,k,I,D){var P;if(u&&(P=I?u(e,k,I,D):u(e)),P!==void 0)return P;if(!dt(e))return e;var L=ge(e);if(L){if(P=yn(e),!a)return pn(e,P)}else{var j=bt(e),Y=j==S||j==U;if(Qe(e))return $t(e,a);if(j==h||j==c||Y&&!I){if(ie(e))return I?e:{};if(P=pt(Y?{}:e),!a)return dn(e,lt(P,e))}else{if(!H[j])return I?e:{};P=mn(e,j,ye,a)}}D||(D=new J);var Z=D.get(e);if(Z)return Z;if(D.set(e,P),!L)var W=s?hn(e):ve(e);return Re(W||e,function(V,$){W&&($=V,V=e[$]),Ye(P,$,ye(V,a,s,u,$,e,D))}),P}function nn(e){return dt(e)?Ge(e):{}}function an(e,a,s){var u=a(e);return ge(e)?u:Fe(u,s(e))}function sn(e){return Ht.call(e)}function on(e){if(!dt(e)||_n(e))return!1;var a=_e(e)||ie(e)?zr:Mr;return a.test(q(e))}function cn(e){if(!qe(e))return Be(e);var a=[];for(var s in Object(e))ft.call(e,s)&&s!="constructor"&&a.push(s);return a}function $t(e,a){if(a)return e.slice();var s=new e.constructor(e.length);return e.copy(s),s}function me(e){var a=new e.constructor(e.byteLength);return new oe(a).set(new oe(e)),a}function Pt(e,a){var s=a?me(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function Ve(e,a,s){var u=a?s(He(e),!0):He(e);return re(u,jr,new e.constructor)}function Xe(e){var a=new e.constructor(e.source,xr.exec(e));return a.lastIndex=e.lastIndex,a}function un(e,a,s){var u=a?s(Ne(e),!0):Ne(e);return re(u,st,new e.constructor)}function fn(e){return $e?Object($e.call(e)):{}}function ln(e,a){var s=a?me(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function pn(e,a){var s=-1,u=e.length;for(a||(a=Array(u));++s<u;)a[s]=e[s];return a}function be(e,a,s,u){s||(s={});for(var k=-1,I=a.length;++k<I;){var D=a[k],P=void 0;Ye(s,D,P===void 0?e[D]:P)}return s}function dn(e,a){return be(e,mt(e),a)}function hn(e){return an(e,ve,mt)}function Dt(e,a){var s=e.__data__;return gn(a)?s[typeof a=="string"?"string":"hash"]:s.map}function ct(e,a){var s=ze(e,a);return on(s)?s:void 0}var mt=ce?ae(ce,Object):In,bt=sn;(Lt&&bt(new Lt(new ArrayBuffer(1)))!=E||Ot&&bt(new Ot)!=m||ot&&bt(ot.resolve())!=f||Gt&&bt(new Gt)!=v||ue&&bt(new ue)!=y)&&(bt=function(e){var a=Ht.call(e),s=a==h?e.constructor:void 0,u=s?q(s):void 0;if(u)switch(u){case fe:return E;case Mt:return m;case le:return f;case pe:return v;case de:return y}return a});function yn(e){var a=e.length,s=e.constructor(a);return a&&typeof e[0]=="string"&&ft.call(e,"index")&&(s.index=e.index,s.input=e.input),s}function pt(e){return typeof e.constructor=="function"&&!qe(e)?nn(nt(e)):{}}function mn(e,a,s,u){var k=e.constructor;switch(a){case F:return me(e);case d:case O:return new k(+e);case E:return Pt(e,u);case x:case C:case w:case T:case M:case z:case Rt:case Ft:case De:return ln(e,u);case m:return Ve(e,u,s);case p:case _:return new k(e);case g:return Xe(e);case v:return un(e,u,s);case b:return fn(e)}}function bn(e,a){return a=a??o,!!a&&(typeof e=="number"||Pr.test(e))&&e>-1&&e%1==0&&e<a}function gn(e){var a=typeof e;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?e!=="__proto__":e===null}function _n(e){return!!Ue&&Ue in e}function qe(e){var a=e&&e.constructor,s=typeof a=="function"&&a.prototype||zt;return e===s}function q(e){if(e!=null){try{return Le.call(e)}catch{}try{return e+""}catch{}}return""}function Je(e){return ye(e,!0,!0)}function Ze(e,a){return e===a||e!==e&&a!==a}function Kt(e){return vn(e)&&ft.call(e,"callee")&&(!We.call(e,"callee")||Ht.call(e)==c)}var ge=Array.isArray;function Yt(e){return e!=null&&tr(e.length)&&!_e(e)}function vn(e){return er(e)&&Yt(e)}var Qe=Ut||Sn;function _e(e){var a=dt(e)?Ht.call(e):"";return a==S||a==U}function tr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=o}function dt(e){var a=typeof e;return!!e&&(a=="object"||a=="function")}function er(e){return!!e&&typeof e=="object"}function ve(e){return Yt(e)?Wt(e):cn(e)}function In(){return[]}function Sn(){return!1}t.exports=Je}(ke,ke.exports);var bi=ke.exports;const rt=lr(bi),gi=t=>new Promise((r,n)=>{const i=new Image;console.warn("update cdn config for cors?"),i.onload=()=>{const o=i.width,c=i.height;r({width:o,height:c})},i.onerror=o=>{n(o)},i.crossOrigin="anonymous",i.src=t}),_i=t=>new Promise((r,n)=>{const i=new Audio;i.preload="auto",i.addEventListener("loadedmetadata",()=>{const o=i.duration*1e3;r({duration:o})}),i.addEventListener("error",o=>{n(o)}),i.src=t,i.crossOrigin="anonymous",i.load()}),vi=t=>new Promise((r,n)=>{const i=document.createElement("video");i.preload="auto",i.addEventListener("loadedmetadata",()=>{const o=i.duration*1e3,c=i.videoWidth,l=i.videoHeight;r({duration:o,width:c,height:l})}),i.addEventListener("error",o=>{n(o)}),i.src=t,i.load()}),Fn=(t,r)=>{const n=document.createElement("div");Object.keys(r).forEach(o=>{o!=="height"&&(n.style[o]=r[o])}),document.body.appendChild(n),n.textContent=t,n.style.whiteSpace="normal",n.style.position="absolute",n.style.visibility="hidden",n.style.display="inline-block",n.style.width=r.width+"px",n.style.fontSize=r.fontSize+"px";const i=getComputedStyle(n).height;return document.body.removeChild(n),parseFloat(i)},Ae=t=>{const r=t.map(n=>new FontFace(n.fontFamily,`url(${n.url})`).load().catch(i=>i));return r.length===0?Promise.resolve(!0):new Promise((n,i)=>{Promise.all(r).then(o=>{o.forEach(c=>{c&&c.family&&(document.fonts.add(c),n(!0))})}).catch(o=>i(o))})},Ee={color:"#000000",x:0,y:0,blur:0},Vt=(t,r)=>{let n=r!=null&&r.trim?r.trim.to-r.trim.from:(r==null?void 0:r.duration)||5e3;const i={from:0,to:n};if(!t)return i;if(t.from<0)return console.error("'from' must be a non-negative number. Returning default display."),i;if(t.from!==void 0&&t.to===void 0)return{from:t.from,to:t.from+n};if(t.to!==void 0){if(t.to<0)return console.error("'to' must be a non-negative number. Returning default display."),i;if(t.to<t.from)return console.error("'to' must be greater than or equal to 'from'. Returning default display."),i}return t},zn=(t,r)=>t?t.from&&!t.to?{from:t.from,to:r.duration}:t:{from:0,to:r.duration};function Oe(t,r){const n={x:t.size.width/2,y:t.size.height/2},i={x:r.width/2,y:r.height/2},o=Math.min(t.size.width/r.width,t.size.height/r.height),c=n.x-i.x;return{top:`${n.y-i.y}px`,left:`${c}px`,transform:`scale(${o})`}}const Ii=async(t,r)=>{const n=t.details.src,i=await vi(n),o=Oe(r,{...i}),c=zn(t.trim,{duration:i.duration}),l={width:i.width,height:i.height,duration:i.duration,opacity:100,src:n,volume:t.details.volume??100,borderRadius:t.details.borderRadius??0,borderWidth:t.details.borderWidth??0,borderColor:t.details.borderColor||"#000000",boxShadow:t.details.boxShadow||Ee,top:o.top||"0px",left:o.left||"0px",transform:o.transform,blur:t.details.blur||0,brightness:t.details.brightness||100,flipX:t.details.flipX||!1,flipY:t.details.flipY||!1};return{...t,trim:c,type:"video",name:"video",details:l,playbackRate:t.playbackRate||1,display:Vt(t.display,{duration:i.duration,trim:c})}},Si=async t=>{const r=t.id,n=t.details,o=(await _i(n.src)).duration,c=zn(t.trim,{duration:o});return{id:r,name:"",type:"audio",display:Vt(t.display,{duration:o,trim:c}),trim:c,playbackRate:t.playbackRate||1,details:{src:n.src,duration:o,volume:n.volume??100},metadata:{...t.metadata}}},wi=async(t,r)=>{const n=t.details,i=await gi(n.src),o=Oe(r,i);return{id:t.id,type:"image",name:"image",display:Vt(t.display),playbackRate:t.playbackRate||1,details:{src:n.src||"",width:n.width||i.width||100,height:n.height||i.height||100,opacity:n.opacity??100,transform:o.transform,border:n.border||"none",borderRadius:n.borderRadius||0,boxShadow:n.boxShadow||Ee,top:o.top||"0px",left:o.left||"0px",borderWidth:n.borderWidth??0,borderColor:n.borderColor||"#000000",blur:n.blur||0,brightness:n.brightness||100,flipX:n.flipX||!1,flipY:n.flipY||!1},metadata:t.metadata||{}}},Ti=async(t,r)=>{await Ae([{fontFamily:t.details.fontFamily,url:t.details.fontUrl}]);const n=t.id,i=t.details,o=Hn(i),c=Fn(t.details.text,o),l=Oe(r,{width:o.width,height:c});return{id:n,name:"caption",type:"caption",display:Vt(t.display),details:{...o,text:i.text||"",height:c,fontUrl:i.fontUrl,top:l.top,left:l.left,borderWidth:i.borderWidth||0,borderColor:i.borderColor||"#000000",boxShadow:i.boxShadow||Ee},metadata:{}}},ki=async(t,r)=>{await Ae([{fontFamily:t.details.fontFamily,url:t.details.fontUrl}]);const n=t.id,i=t.details,o=Hn(i),c=Fn(t.details.text,o),l=Oe(r,{width:o.width,height:c});return{id:n,name:"text",type:"text",display:Vt(t.display),details:{...o,text:i.text||"",height:c,fontUrl:i.fontUrl,top:l.top,left:l.left,borderWidth:i.borderWidth||0,borderColor:i.borderColor||"#000000",boxShadow:i.boxShadow||Ee},metadata:{}}},Hn=t=>({fontFamily:t.fontFamily||"Arial",fontSize:t.fontSize||"16px",fontWeight:t.fontWeight||"normal",fontStyle:t.fontStyle||"normal",textDecoration:t.textDecoration||"none",textAlign:t.textAlign||"left",lineHeight:t.lineHeight||"normal",letterSpacing:t.letterSpacing||"normal",wordSpacing:t.wordSpacing||"normal",color:t.color||"#ffffff",backgroundColor:t.backgroundColor||"transparent",border:t.border||"none",textShadow:t.textShadow||"none",text:t.text||"",opacity:t.opacity??100,width:t.width||300,wordWrap:t.wordWrap||"normal",wordBreak:t.wordBreak||"normal",WebkitTextStrokeColor:t.WebkitTextStrokeColor||"#ffffff",WebkitTextStrokeWidth:t.WebkitTextStrokeWidth||"0px",top:t.top||"0px",left:t.left||"0px",textTransform:t.textTransform||"none"}),Ai="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let pr=(t=21)=>{let r="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)r+=Ai[n[t]&63];return r};function Ei(t,r){return t.filter(i=>({...i,items:i.items.filter(o=>!r.includes(o))})).filter(i=>!i.items.length)}function Nn(t=16){const r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=r.charAt(Math.floor(Math.random()*r.length));let i=pr(t-1);return i=i.replace(/[^a-zA-Z0-9]/g,"").slice(0,t-1),n+i}const dr=t=>Object.keys(t).reduce((r,n)=>{const{display:i,playbackRate:o}=t[n];return Math.max(r,i.to/(o||1))},0);function Oi(t){const r=A.subject.pipe(A.filter(({key:p})=>p.startsWith(A.DESIGN_PREFIX))),n=A.subject.pipe(A.filter(({key:p})=>p.startsWith(A.ADD_PREFIX))),i=A.subject.pipe(A.filter(({key:p})=>p.startsWith(A.LAYER_PREFIX))),o=A.subject.pipe(A.filter(({key:p})=>p.startsWith(A.HISTORY_PREFIX))),c=A.subject.pipe(A.filter(({key:p})=>p.startsWith(A.ACTIVE_PREFIX))),l=A.subject.pipe(A.filter(({key:p})=>p.startsWith(A.EDIT_PREFIX))),d=r.subscribe(async p=>{var h;if(p.key===A.DESIGN_LOAD){const f=(h=p.value)==null?void 0:h.payload,g=f.trackItemIds,v=f.trackItemDetailsMap,_=g.map(async b=>{const y=v[b];return(y.type==="caption"||y.type==="text")&&await Ae([{fontFamily:y.details.fontFamily,url:y.details.fontUrl}]),!0});await Promise.all(_),t.updateState({...f})}}),O=o.subscribe(p=>{if(p.key===A.HISTORY_UNDO)return t.undo();if(p.key===A.HISTORY_REDO)return t.redo()}),R=i.subscribe(p=>{var f,g,v;const h=[];if((f=p.value)!=null&&f.payload.trackItemIds&&(h.push((g=p.value)==null?void 0:g.payload.trackItemIds),t.updateState({activeIds:h})),p.key===A.LAYER_DELETE){const _=(v=p.value)==null?void 0:v.payload.trackItemIds,b=rt(t.getState()),y=_&&_.length?_:b.activeIds,F=b.trackItemIds,E=b.trackItemDetailsMap,x=F.filter(z=>!y.includes(z)),C=Object.fromEntries(Object.entries(E).filter(([z])=>!y.includes(z))),w=Ei(b.tracks,y),T=Object.fromEntries(Object.entries(b.trackItemsMap).filter(([z])=>!y.includes(z))),M=dr(b.trackItemsMap);t.updateState({trackItemIds:x,trackItemDetailsMap:C,activeIds:[],trackItemsMap:T,tracks:w,duration:M},{updateHistory:!0,kind:"remove"})}}),S=n.subscribe(async p=>{var _,b,y,F,E;const h=rt(t.getState());let f=[],g="text";if(p.key===A.ADD_CAPTION){const x=(_=p.value)==null?void 0:_.payload,C=[];for(const M of x){const z=Ti(M,{size:{width:1080,height:1920}});C.push(z)}const w=await Promise.all(C),T=[];for(const M of w){const z=M.id;T.push(z);const{details:Rt,...Ft}=M;h.trackItemDetailsMap[z]={type:g,details:Rt},h.trackItemsMap[z]=Ft,h.trackItemIds.push(z)}f=T}if(p.key===A.ADD_TEXT){g="text";const x=await ki((b=p.value)==null?void 0:b.payload,{size:{width:1080,height:1920}}),{details:C,...w}=x;h.trackItemDetailsMap[w.id]={type:g,details:C},h.trackItemsMap[w.id]=w,h.trackItemIds.push(w.id),f=[w.id]}if(p.key===A.ADD_IMAGE){g="image";const x=await wi((y=p.value)==null?void 0:y.payload,{size:{width:1080,height:1920}}),{details:C,...w}=x;h.trackItemDetailsMap[w.id]={type:g,details:C},h.trackItemsMap[w.id]=w,h.trackItemIds.push(w.id),f=[w.id]}if(p.key===A.ADD_AUDIO){g="audio";const x=await Si((F=p.value)==null?void 0:F.payload),{details:C,...w}=x;h.trackItemDetailsMap[w.id]={type:g,details:C},h.trackItemsMap[w.id]=w,h.trackItemIds.push(w.id),f=[w.id]}if(p.key===A.ADD_VIDEO){g="video";const x=await Ii((E=p.value)==null?void 0:E.payload,{size:{width:1080,height:1920}}),{details:C,...w}=x;h.trackItemDetailsMap[w.id]={type:g,details:C},h.trackItemsMap[w.id]=w,h.trackItemIds.push(w.id),f=[w.id]}h.tracks.unshift({id:pr(),accepts:["text","audio","helper","video","image","caption"],type:g,items:f,magnetic:!1,static:!1});const v=dr(h.trackItemsMap);t.updateState({trackItemIds:h.trackItemIds,trackItemDetailsMap:h.trackItemDetailsMap,trackItemsMap:h.trackItemsMap,tracks:h.tracks,duration:v},{updateHistory:!0,kind:"add"})}),U=c.subscribe(async p=>{var h;if(p.key===A.ACTIVE_SPLIT){const f=rt(t.getState()),g=(h=p.value)==null?void 0:h.options.time;if(f.activeIds.length===1){const v=f.activeIds[0],_=f.trackItemsMap[v];if(g>=_.display.to||g<=_.display.from)return;const b=f.trackItemDetailsMap[v],y=Nn(),F={..._,id:y,display:{from:g,to:_.display.to},trim:{from:g,to:_.display.to}};f.trackItemsMap[v].display.to=g,f.trackItemsMap[y]=F,f.trackItemIds.push(y),f.trackItemDetailsMap[y]=b,f.tracks.forEach(E=>{E.items.includes(v)&&E.items.push(y)}),t.updateState({trackItemDetailsMap:f.trackItemDetailsMap,tracks:f.tracks,trackItemIds:f.trackItemIds,trackItemsMap:f.trackItemsMap},{updateHistory:!0,kind:"update"})}return}if(p.key===A.ACTIVE_CLONE){const f=rt(t.getState());if(f.activeIds.length){const g=f.activeIds,v=[],_={activeIds:g,trackItemDetailsMap:{},trackItemsMap:{},tracks:[]};g.forEach(y=>{_.trackItemDetailsMap[y]=f.trackItemDetailsMap[y],_.trackItemsMap[y]=f.trackItemsMap[y],v.push(f.tracks.find(F=>F.items.includes(y)))});const b=new Set;v.filter(y=>b.has(y.id)?!1:(b.add(y),!0)),_.tracks=Array.from(b.keys()),localStorage.setItem("DesignComboTemp",JSON.stringify(_))}}if(p.key===A.ACTIVE_PASTE){const f=localStorage.getItem("DesignComboTemp");if(!f)return;const g=rt(t.getState()),v=JSON.parse(f),_={},b=v.trackItemsMap,y=v.trackItemDetailsMap,F=v.tracks,E=[],x=v.activeIds.map(async C=>{const w=y[C];(w.type==="caption"||w.type==="text")&&await Ae([{fontFamily:w.details.fontFamily,url:w.details.fontUrl}]);const T=Nn();return _[C]=T,g.trackItemsMap[T]={...b[C],id:T},g.trackItemDetailsMap[T]=w,g.trackItemIds.push(T),!0});await Promise.all(x),F.forEach(C=>{const w=C.items.map(M=>_[M]),T={...C,items:w,id:pr()};E.push(T)}),g.tracks=[...g.tracks,...E],t.updateState({trackItemDetailsMap:g.trackItemDetailsMap,tracks:g.tracks,trackItemIds:g.trackItemIds,trackItemsMap:g.trackItemsMap},{updateHistory:!0,kind:"update"})}}),m=l.subscribe(p=>{var h,f;if(p.key===A.EDIT_OBJECT){const g=rt(t.getState()),v=g.trackItemDetailsMap,_=g.trackItemsMap,b=Object.keys((h=p.value)==null?void 0:h.payload);if(!b.length)return;const y=(f=p.value)==null?void 0:f.payload;b.forEach(E=>{y[E].details?v[E].details={...v[E].details,...y[E].details}:y[E].playbackRate&&(_[E].playbackRate=y[E].playbackRate)});const F=dr(_);t.updateState({trackItemDetailsMap:{...v},trackItemsMap:{..._},duration:F},{updateHistory:!0,kind:"update:details"})}});return{unsubscribe:()=>{S.unsubscribe(),U.unsubscribe(),m.unsubscribe(),O.unsubscribe(),R.unsubscribe(),d.unsubscribe()}}}const xi={Date:!0,RegExp:!0,String:!0,Number:!0};function Un(t,r,n={cyclesFix:!0},i=[]){var d,O;let o=[];const c=Array.isArray(t);for(const R in t){const S=t[R],U=c?+R:R;if(!(R in r)){o.push({type:"REMOVE",path:[U],oldValue:t[R]});continue}const m=r[R],p=typeof S=="object"&&typeof m=="object"&&Array.isArray(S)===Array.isArray(m);if(S&&m&&p&&!xi[(O=(d=Object.getPrototypeOf(S))==null?void 0:d.constructor)==null?void 0:O.name]&&(!n.cyclesFix||!i.includes(S))){const h=Un(S,m,n,n.cyclesFix?i.concat([S]):[]);o.push.apply(o,h.map(f=>(f.path.unshift(U),f)))}else S!==m&&!(Number.isNaN(S)&&Number.isNaN(m))&&!(p&&(isNaN(S)?S+""==m+"":+S==+m))&&o.push({path:[U],type:"CHANGE",value:m,oldValue:S})}const l=Array.isArray(r);for(const R in r)R in t||o.push({type:"CREATE",path:[l?+R:R],value:r[R]});return o}var hr=Symbol.for("immer-nothing"),Xt=Symbol.for("immer-draftable"),Q=Symbol.for("immer-state"),Ln=process.env.NODE_ENV!=="production"?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(t){return`'current' expects a draft, got: ${t}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(t){return`'original' expects a draft, got: ${t}`}]:[];function G(t,...r){if(process.env.NODE_ENV!=="production"){const n=Ln[t],i=typeof n=="function"?n.apply(null,r):n;throw new Error(`[Immer] ${i}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var St=Object.getPrototypeOf;function wt(t){return!!t&&!!t[Q]}function _t(t){var r;return t?Gn(t)||Array.isArray(t)||!!t[Xt]||!!((r=t.constructor)!=null&&r[Xt])||Zt(t)||Qt(t):!1}var Mi=Object.prototype.constructor.toString();function Gn(t){if(!t||typeof t!="object")return!1;const r=St(t);if(r===null)return!0;const n=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Mi}function qt(t,r){Tt(t)===0?Reflect.ownKeys(t).forEach(n=>{r(n,t[n],t)}):t.forEach((n,i)=>r(i,n,t))}function Tt(t){const r=t[Q];return r?r.type_:Array.isArray(t)?1:Zt(t)?2:Qt(t)?3:0}function Jt(t,r){return Tt(t)===2?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function yr(t,r){return Tt(t)===2?t.get(r):t[r]}function Wn(t,r,n){const i=Tt(t);i===2?t.set(r,n):i===3?t.add(n):t[r]=n}function Pi(t,r){return t===r?t!==0||1/t===1/r:t!==t&&r!==r}function Zt(t){return t instanceof Map}function Qt(t){return t instanceof Set}function kt(t){return t.copy_||t.base_}function mr(t,r){if(Zt(t))return new Map(t);if(Qt(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Gn(t);if(r===!0||r==="class_only"&&!n){const i=Object.getOwnPropertyDescriptors(t);delete i[Q];let o=Reflect.ownKeys(i);for(let c=0;c<o.length;c++){const l=o[c],d=i[l];d.writable===!1&&(d.writable=!0,d.configurable=!0),(d.get||d.set)&&(i[l]={configurable:!0,writable:!0,enumerable:d.enumerable,value:t[l]})}return Object.create(St(t),i)}else{const i=St(t);if(i!==null&&n)return{...t};const o=Object.create(i);return Object.assign(o,t)}}function br(t,r=!1){return xe(t)||wt(t)||!_t(t)||(Tt(t)>1&&(t.set=t.add=t.clear=t.delete=Di),Object.freeze(t),r&&Object.entries(t).forEach(([n,i])=>br(i,!0))),t}function Di(){G(2)}function xe(t){return Object.isFrozen(t)}var gr={};function At(t){const r=gr[t];return r||G(0,t),r}function Ci(t,r){gr[t]||(gr[t]=r)}var te;function Bn(){return te}function ji(t,r){return{drafts_:[],parent_:t,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function $n(t,r){r&&(At("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=r)}function _r(t){vr(t),t.drafts_.forEach(Ri),t.drafts_=null}function vr(t){t===te&&(te=t.parent_)}function Kn(t){return te=ji(te,t)}function Ri(t){const r=t[Q];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Yn(t,r){r.unfinalizedDrafts_=r.drafts_.length;const n=r.drafts_[0];return t!==void 0&&t!==n?(n[Q].modified_&&(_r(r),G(4)),_t(t)&&(t=Me(r,t),r.parent_||Pe(r,t)),r.patches_&&At("Patches").generateReplacementPatches_(n[Q].base_,t,r.patches_,r.inversePatches_)):t=Me(r,n,[]),_r(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),t!==hr?t:void 0}function Me(t,r,n){if(xe(r))return r;const i=r[Q];if(!i)return qt(r,(o,c)=>Vn(t,i,r,o,c,n)),r;if(i.scope_!==t)return r;if(!i.modified_)return Pe(t,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let c=o,l=!1;i.type_===3&&(c=new Set(o),o.clear(),l=!0),qt(c,(d,O)=>Vn(t,i,o,d,O,n,l)),Pe(t,o,!1),n&&t.patches_&&At("Patches").generatePatches_(i,n,t.patches_,t.inversePatches_)}return i.copy_}function Vn(t,r,n,i,o,c,l){if(process.env.NODE_ENV!=="production"&&o===n&&G(5),wt(o)){const d=c&&r&&r.type_!==3&&!Jt(r.assigned_,i)?c.concat(i):void 0,O=Me(t,o,d);if(Wn(n,i,O),wt(O))t.canAutoFreeze_=!1;else return}else l&&n.add(o);if(_t(o)&&!xe(o)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Me(t,o),(!r||!r.scope_.parent_)&&typeof i!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,i)&&Pe(t,o)}}function Pe(t,r,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&br(r,n)}function Fi(t,r){const n=Array.isArray(t),i={type_:n?1:0,scope_:r?r.scope_:Bn(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=i,c=Ir;n&&(o=[i],c=ee);const{revoke:l,proxy:d}=Proxy.revocable(o,c);return i.draft_=d,i.revoke_=l,d}var Ir={get(t,r){if(r===Q)return t;const n=kt(t);if(!Jt(n,r))return zi(t,n,r);const i=n[r];return t.finalized_||!_t(i)?i:i===Sr(t.base_,r)?(Tr(t),t.copy_[r]=kr(i,t)):i},has(t,r){return r in kt(t)},ownKeys(t){return Reflect.ownKeys(kt(t))},set(t,r,n){const i=Xn(kt(t),r);if(i!=null&&i.set)return i.set.call(t.draft_,n),!0;if(!t.modified_){const o=Sr(kt(t),r),c=o==null?void 0:o[Q];if(c&&c.base_===n)return t.copy_[r]=n,t.assigned_[r]=!1,!0;if(Pi(n,o)&&(n!==void 0||Jt(t.base_,r)))return!0;Tr(t),wr(t)}return t.copy_[r]===n&&(n!==void 0||r in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[r])||(t.copy_[r]=n,t.assigned_[r]=!0),!0},deleteProperty(t,r){return Sr(t.base_,r)!==void 0||r in t.base_?(t.assigned_[r]=!1,Tr(t),wr(t)):delete t.assigned_[r],t.copy_&&delete t.copy_[r],!0},getOwnPropertyDescriptor(t,r){const n=kt(t),i=Reflect.getOwnPropertyDescriptor(n,r);return i&&{writable:!0,configurable:t.type_!==1||r!=="length",enumerable:i.enumerable,value:n[r]}},defineProperty(){G(11)},getPrototypeOf(t){return St(t.base_)},setPrototypeOf(){G(12)}},ee={};qt(Ir,(t,r)=>{ee[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),ee.deleteProperty=function(t,r){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(r))&&G(13),ee.set.call(this,t,r,void 0)},ee.set=function(t,r,n){return process.env.NODE_ENV!=="production"&&r!=="length"&&isNaN(parseInt(r))&&G(14),Ir.set.call(this,t[0],r,n,t[0])};function Sr(t,r){const n=t[Q];return(n?kt(n):t)[r]}function zi(t,r,n){var o;const i=Xn(r,n);return i?"value"in i?i.value:(o=i.get)==null?void 0:o.call(t.draft_):void 0}function Xn(t,r){if(!(r in t))return;let n=St(t);for(;n;){const i=Object.getOwnPropertyDescriptor(n,r);if(i)return i;n=St(n)}}function wr(t){t.modified_||(t.modified_=!0,t.parent_&&wr(t.parent_))}function Tr(t){t.copy_||(t.copy_=mr(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Hi=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,n,i)=>{if(typeof r=="function"&&typeof n!="function"){const c=n;n=r;const l=this;return function(O=c,...R){return l.produce(O,S=>n.call(this,S,...R))}}typeof n!="function"&&G(6),i!==void 0&&typeof i!="function"&&G(7);let o;if(_t(r)){const c=Kn(this),l=kr(r,void 0);let d=!0;try{o=n(l),d=!1}finally{d?_r(c):vr(c)}return $n(c,i),Yn(o,c)}else if(!r||typeof r!="object"){if(o=n(r),o===void 0&&(o=r),o===hr&&(o=void 0),this.autoFreeze_&&br(o,!0),i){const c=[],l=[];At("Patches").generateReplacementPatches_(r,o,c,l),i(c,l)}return o}else G(1,r)},this.produceWithPatches=(r,n)=>{if(typeof r=="function")return(l,...d)=>this.produceWithPatches(l,O=>r(O,...d));let i,o;return[this.produce(r,n,(l,d)=>{i=l,o=d}),i,o]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){_t(t)||G(8),wt(t)&&(t=Ni(t));const r=Kn(this),n=kr(t,void 0);return n[Q].isManual_=!0,vr(r),n}finishDraft(t,r){const n=t&&t[Q];(!n||!n.isManual_)&&G(9);const{scope_:i}=n;return $n(i,r),Yn(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const i=At("Patches").applyPatches_;return wt(t)?i(t,r):this.produce(t,o=>i(o,r))}};function kr(t,r){const n=Zt(t)?At("MapSet").proxyMap_(t,r):Qt(t)?At("MapSet").proxySet_(t,r):Fi(t,r);return(r?r.scope_:Bn()).drafts_.push(n),n}function Ni(t){return wt(t)||G(10,t),qn(t)}function qn(t){if(!_t(t)||xe(t))return t;const r=t[Q];let n;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=mr(t,r.scope_.immer_.useStrictShallowCopy_)}else n=mr(t,!0);return qt(n,(i,o)=>{Wn(n,i,qn(o))}),r&&(r.finalized_=!1),n}function Jn(){process.env.NODE_ENV!=="production"&&Ln.push('Sets cannot have "replace" patches.',function(m){return"Unsupported patch operation: "+m},function(m){return"Cannot apply patch, path doesn't resolve: "+m},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");const r="replace",n="add",i="remove";function o(m,p,h,f){switch(m.type_){case 0:case 2:return l(m,p,h,f);case 1:return c(m,p,h,f);case 3:return d(m,p,h,f)}}function c(m,p,h,f){let{base_:g,assigned_:v}=m,_=m.copy_;_.length<g.length&&([g,_]=[_,g],[h,f]=[f,h]);for(let b=0;b<g.length;b++)if(v[b]&&_[b]!==g[b]){const y=p.concat([b]);h.push({op:r,path:y,value:U(_[b])}),f.push({op:r,path:y,value:U(g[b])})}for(let b=g.length;b<_.length;b++){const y=p.concat([b]);h.push({op:n,path:y,value:U(_[b])})}for(let b=_.length-1;g.length<=b;--b){const y=p.concat([b]);f.push({op:i,path:y})}}function l(m,p,h,f){const{base_:g,copy_:v}=m;qt(m.assigned_,(_,b)=>{const y=yr(g,_),F=yr(v,_),E=b?Jt(g,_)?r:n:i;if(y===F&&E===r)return;const x=p.concat(_);h.push(E===i?{op:E,path:x}:{op:E,path:x,value:F}),f.push(E===n?{op:i,path:x}:E===i?{op:n,path:x,value:U(y)}:{op:r,path:x,value:U(y)})})}function d(m,p,h,f){let{base_:g,copy_:v}=m,_=0;g.forEach(b=>{if(!v.has(b)){const y=p.concat([_]);h.push({op:i,path:y,value:b}),f.unshift({op:n,path:y,value:b})}_++}),_=0,v.forEach(b=>{if(!g.has(b)){const y=p.concat([_]);h.push({op:n,path:y,value:b}),f.unshift({op:i,path:y,value:b})}_++})}function O(m,p,h,f){h.push({op:r,path:[],value:p===hr?void 0:p}),f.push({op:r,path:[],value:m})}function R(m,p){return p.forEach(h=>{const{path:f,op:g}=h;let v=m;for(let F=0;F<f.length-1;F++){const E=Tt(v);let x=f[F];typeof x!="string"&&typeof x!="number"&&(x=""+x),(E===0||E===1)&&(x==="__proto__"||x==="constructor")&&G(19),typeof v=="function"&&x==="prototype"&&G(19),v=yr(v,x),typeof v!="object"&&G(18,f.join("/"))}const _=Tt(v),b=S(h.value),y=f[f.length-1];switch(g){case r:switch(_){case 2:return v.set(y,b);case 3:G(16);default:return v[y]=b}case n:switch(_){case 1:return y==="-"?v.push(b):v.splice(y,0,b);case 2:return v.set(y,b);case 3:return v.add(b);default:return v[y]=b}case i:switch(_){case 1:return v.splice(y,1);case 2:return v.delete(y);case 3:return v.delete(h.value);default:return delete v[y]}default:G(17,g)}}),m}function S(m){if(!_t(m))return m;if(Array.isArray(m))return m.map(S);if(Zt(m))return new Map(Array.from(m.entries()).map(([h,f])=>[h,S(f)]));if(Qt(m))return new Set(Array.from(m).map(S));const p=Object.create(St(m));for(const h in m)p[h]=S(m[h]);return Jt(m,Xt)&&(p[Xt]=m[Xt]),p}function U(m){return wt(m)?S(m):m}Ci("Patches",{applyPatches_:R,generatePatches_:o,generateReplacementPatches_:O})}var tt=new Hi,Ui=tt.produce;tt.produceWithPatches.bind(tt),tt.setAutoFreeze.bind(tt),tt.setUseStrictShallowCopy.bind(tt);var Li=tt.applyPatches.bind(tt);tt.createDraft.bind(tt),tt.finishDraft.bind(tt);var Gi=1/0,Wi=9007199254740991,Bi="[object Arguments]",$i="[object Function]",Ki="[object GeneratorFunction]",Yi="[object Symbol]",Vi=typeof et=="object"&&et&&et.Object===Object&&et,Xi=typeof self=="object"&&self&&self.Object===Object&&self,qi=Vi||Xi||Function("return this")();function Ji(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}function Zi(t,r){for(var n=-1,i=t?t.length:0,o=Array(i);++n<i;)o[n]=r(t[n],n,t);return o}function Qi(t,r){for(var n=-1,i=r.length,o=t.length;++n<i;)t[o+n]=r[n];return t}var Ar=Object.prototype,ta=Ar.hasOwnProperty,Er=Ar.toString,Zn=qi.Symbol,ea=Ar.propertyIsEnumerable,Qn=Zn?Zn.isConcatSpreadable:void 0,ti=Math.max;function ra(t,r,n,i,o){var c=-1,l=t.length;for(n||(n=sa),o||(o=[]);++c<l;){var d=t[c];n(d)?Qi(o,d):o[o.length]=d}return o}function na(t,r){return t=Object(t),ia(t,r,function(n,i){return i in t})}function ia(t,r,n){for(var i=-1,o=r.length,c={};++i<o;){var l=r[i],d=t[l];n(d,l)&&(c[l]=d)}return c}function aa(t,r){return r=ti(r===void 0?t.length-1:r,0),function(){for(var n=arguments,i=-1,o=ti(n.length-r,0),c=Array(o);++i<o;)c[i]=n[r+i];i=-1;for(var l=Array(r+1);++i<r;)l[i]=n[i];return l[r]=c,Ji(t,this,l)}}function sa(t){return ua(t)||ca(t)||!!(Qn&&t&&t[Qn])}function oa(t){if(typeof t=="string"||ya(t))return t;var r=t+"";return r=="0"&&1/t==-Gi?"-0":r}function ca(t){return la(t)&&ta.call(t,"callee")&&(!ea.call(t,"callee")||Er.call(t)==Bi)}var ua=Array.isArray;function fa(t){return t!=null&&da(t.length)&&!pa(t)}function la(t){return ei(t)&&fa(t)}function pa(t){var r=ha(t)?Er.call(t):"";return r==$i||r==Ki}function da(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Wi}function ha(t){var r=typeof t;return!!t&&(r=="object"||r=="function")}function ei(t){return!!t&&typeof t=="object"}function ya(t){return typeof t=="symbol"||ei(t)&&Er.call(t)==Yi}var ma=aa(function(t,r){return t==null?{}:na(t,Zi(ra(r),oa))}),ba=ma;const ri=lr(ba),ga={tracks:[],trackItemIds:[],trackItemsMap:{},transitionIds:[],transitionsMap:{},scale:{unit:1,zoom:1,segments:1},duration:0,activeIds:[],trackItemDetailsMap:{}},ni=["tracks","trackItemsMap","trackItemDetailsMap","transitionIds","transitionsMap","trackItemIds"];class _a{constructor(r){jt(this,"stateSubject");jt(this,"stateHistorySubject");jt(this,"prevState");jt(this,"undos",[]);jt(this,"redos",[]);jt(this,"listener");const n=r||ga;this.stateSubject=new Rn(n),this.stateHistorySubject=new Rn({handleRedo:!1,handleUndo:!1}),this.prevState=n,this.initListeners()}initListeners(){Oi(this)}destroyListeners(){this.listener&&this.listener.unsubscribe()}purge(){this.destroyListeners()}updateHistory(r,n){const i=ri(r,ni),o=ri(this.getState(),ni),c=Un(o,i);c.length&&(this.undos.push({undos:c,type:n}),this.redos=[])}getStateHistory(){return this.stateHistorySubject.getValue()}subscribeHistory(r){return this.stateHistorySubject.subscribe(r)}getState(){return this.stateSubject.getValue()}subscribe(r){return this.stateSubject.subscribe(r)}updateState(r,n={updateHistory:!1}){const i=this.getState(),o={...i,...r};it(i,o)||(n.updateHistory&&this.updateHistory(o,n.kind),this.prevState=i,this.stateSubject.next(o))}subscribeToScale(r){return this.stateSubject.asObservable().subscribe(n=>{it(n.scale,this.prevState.scale)||r({scale:n.scale})})}subscribeToUpdateTrackItem(r){return this.stateSubject.asObservable().subscribe(n=>{it(n.trackItemsMap,this.prevState.trackItemsMap)||r({trackItemsMap:n.trackItemsMap})})}subscribeToUpdateItemDetails(r){return this.stateSubject.asObservable().subscribe(n=>{it(n.trackItemDetailsMap,this.prevState.trackItemDetailsMap)||r({trackItemDetailsMap:n.trackItemDetailsMap})})}subscribeToDuration(r){return this.stateSubject.asObservable().subscribe(n=>{n.duration!==this.prevState.duration&&r({duration:n.duration})})}subscribeToHistory(r){return this.stateHistorySubject.asObservable().subscribe(n=>{if(n.handleRedo){const i=this.undos[this.undos.length-1].type;i==="update"&&r({...this.getState(),type:i}),this.stateHistorySubject.next({handleRedo:!1,handleUndo:!1})}if(n.handleUndo){const i=this.redos[this.redos.length-1].type;i==="update"&&r({...this.getState(),type:i}),this.stateHistorySubject.next({handleRedo:!1,handleUndo:!1})}})}subscribeToAddOrRemoveItems(r){return this.stateSubject.asObservable().subscribe(n=>{it(n.trackItemIds,this.prevState.trackItemIds)||r({trackItemIds:n.trackItemIds})})}subscribeToActiveIds(r){return this.stateSubject.asObservable().subscribe(n=>{it(n.activeIds,this.prevState.activeIds)||r({activeIds:n.activeIds})})}subscribeToTracks(r){return this.stateSubject.asObservable().subscribe(n=>{(!it(n.tracks,this.prevState.tracks)||!it(n.trackItemIds,this.prevState.trackItemIds)||!it(n.trackItemsMap,this.prevState.trackItemsMap)||!it(n.transitionIds,this.prevState.transitionIds)||!it(n.transitionsMap,this.prevState.transitionsMap))&&r({tracks:n.tracks,trackItemIds:n.trackItemIds,trackItemsMap:n.trackItemsMap,transitionIds:n.transitionIds,transitionsMap:n.transitionsMap,trackItemDetailsMap:n.trackItemDetailsMap})})}undo(){const r=this.undos.pop(),n=r==null?void 0:r.undos,i=r==null?void 0:r.type;if(!n||!i)return;Jn();const{trackItemDetailsMap:o,trackItemIds:c,tracks:l,transitionIds:d,transitionsMap:O,trackItemsMap:R}=this.getState(),S=rt({trackItemDetailsMap:o,trackItemIds:c,tracks:l,transitionIds:d,transitionsMap:O,trackItemsMap:R}),U=[],m=[],p=[],h=[],f=[],g=[];n.forEach(T=>{let M;const z=T.path.slice(1);T.type==="CREATE"?M={path:z,op:"remove",value:T.value}:T.type==="CHANGE"?M={path:z,op:"replace",value:T.oldValue}:M={path:z,op:"add",value:T.oldValue},T.path.includes("trackItemIds")?p.push(M):T.path.includes("transitionIds")?m.push(M):T.path.includes("trackItemsMap")?f.push(M):T.path.includes("transitionsMap")?h.push(M):T.path.includes("tracks")?U.push(M):T.path.includes("trackItemDetailsMap")&&g.push(M)});const v=this.applyPatch(S.tracks,U),_=this.applyPatch(S.transitionIds,m),b=this.applyPatch(S.trackItemIds,p),y=this.applyPatch(S.transitionsMap,h),F=this.applyPatch(S.trackItemsMap,f),E=this.applyPatch(S.trackItemDetailsMap,g),x=rt({tracks:v,transitionIds:_,trackItemIds:b,transitionsMap:y,trackItemsMap:F,trackItemDetailsMap:E}),C=rt(this.getState()),w={...C,...x};this.prevState=C,this.redos.push({redos:n,type:i}),this.stateSubject.next(w),this.stateHistorySubject.next({handleRedo:!1,handleUndo:!0})}applyPatch(r,n){return n.reverse().reduce((i,o)=>Ui(i,c=>{Li(c,[o])}),r)}redo(){const r=this.redos.pop(),n=r==null?void 0:r.redos,i=r==null?void 0:r.type;if(!n||!i)return;Jn();const{trackItemDetailsMap:o,trackItemIds:c,tracks:l,transitionIds:d,transitionsMap:O,trackItemsMap:R}=this.getState(),S=rt({trackItemDetailsMap:o,trackItemIds:c,tracks:l,transitionIds:d,transitionsMap:O,trackItemsMap:R}),U=[],m=[],p=[],h=[],f=[],g=[];n.forEach(T=>{let M;const z=T.path.slice(1);T.type==="CREATE"?M={path:z,op:"add",value:T.value}:T.type==="CHANGE"?M={path:z,op:"replace",value:T.value}:M={path:z,op:"remove",value:T.oldValue},T.path.includes("trackItemIds")?p.push(M):T.path.includes("transitionIds")?m.push(M):T.path.includes("trackItemsMap")?f.push(M):T.path.includes("transitionsMap")?h.push(M):T.path.includes("trackItemDetailsMap")?g.push(M):U.push(M)});const v=this.applyPatch(S.tracks,U),_=this.applyPatch(S.transitionIds,m),b=this.applyPatch(S.trackItemIds,p),y=this.applyPatch(S.transitionsMap,h),F=this.applyPatch(S.trackItemsMap,f),E=this.applyPatch(S.trackItemDetailsMap,g),x=rt({tracks:v,transitionIds:_,trackItemIds:b,transitionsMap:y,trackItemsMap:F,trackItemDetailsMap:E}),C=rt(this.getState()),w={...C,...x};this.prevState=C,this.undos.push({undos:n,type:i}),this.stateSubject.next(w),this.stateHistorySubject.next({handleRedo:!0,handleUndo:!1})}}return _a});
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function cr(t,r){if(t){var n=t.indexOf(r);0<=n&&t.splice(n,1)}}var Ie=function(){function t(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var r,n,i,o,c;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var d=ir(l),O=d.next();!O.done;O=d.next()){var R=O.value;R.remove(this)}}catch(f){r={error:f}}finally{try{O&&!O.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}else l.remove(this);var S=this.initialTeardown;if(ht(S))try{S()}catch(f){c=f instanceof or?f.errors:[f]}var U=this._finalizers;if(U){this._finalizers=null;try{for(var m=ir(U),p=m.next();!p.done;p=m.next()){var h=p.value;try{An(h)}catch(f){c=c??[],f instanceof or?c=sr(sr([],ar(c)),ar(f.errors)):c.push(f)}}}catch(f){i={error:f}}finally{try{p&&!p.done&&(o=m.return)&&o.call(m)}finally{if(i)throw i.error}}}if(c)throw new or(c)}},t.prototype.add=function(r){var n;if(r&&r!==this)if(this.closed)An(r);else{if(r instanceof t){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(r)}},t.prototype._hasParent=function(r){var n=this._parentage;return n===r||Array.isArray(n)&&n.includes(r)},t.prototype._addParent=function(r){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(r),n):n?[n,r]:r},t.prototype._removeParent=function(r){var n=this._parentage;n===r?this._parentage=null:Array.isArray(n)&&cr(n,r)},t.prototype.remove=function(r){var n=this._finalizers;n&&cr(n,r),r instanceof t&&r._removeParent(this)},t.EMPTY=function(){var r=new t;return r.closed=!0,r}(),t}(),Tn=Ie.EMPTY;function kn(t){return t instanceof Ie||t&&"closed"in t&&ht(t.remove)&&ht(t.add)&&ht(t.unsubscribe)}function An(t){ht(t)?t():t.unsubscribe()}var En={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},On={setTimeout:function(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return setTimeout.apply(void 0,sr([t,r],ar(n)))},clearTimeout:function(t){var r=On.delegate;return((r==null?void 0:r.clearTimeout)||clearTimeout)(t)},delegate:void 0};function ai(t){On.setTimeout(function(){throw t})}function xn(){}function Se(t){t()}var Mn=function(t){ut(r,t);function r(n){var i=t.call(this)||this;return i.isStopped=!1,n?(i.destination=n,kn(n)&&n.add(i)):i.destination=ui,i}return r.create=function(n,i,o){return new fr(n,i,o)},r.prototype.next=function(n){this.isStopped||this._next(n)},r.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(n){this.destination.next(n)},r.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(Ie),si=Function.prototype.bind;function ur(t,r){return si.call(t,r)}var oi=function(){function t(r){this.partialObserver=r}return t.prototype.next=function(r){var n=this.partialObserver;if(n.next)try{n.next(r)}catch(i){we(i)}},t.prototype.error=function(r){var n=this.partialObserver;if(n.error)try{n.error(r)}catch(i){we(i)}else we(r)},t.prototype.complete=function(){var r=this.partialObserver;if(r.complete)try{r.complete()}catch(n){we(n)}},t}(),fr=function(t){ut(r,t);function r(n,i,o){var c=t.call(this)||this,l;if(ht(n)||!n)l={next:n??void 0,error:i??void 0,complete:o??void 0};else{var d;c&&En.useDeprecatedNextContext?(d=Object.create(n),d.unsubscribe=function(){return c.unsubscribe()},l={next:n.next&&ur(n.next,d),error:n.error&&ur(n.error,d),complete:n.complete&&ur(n.complete,d)}):l=n}return c.destination=new oi(l),c}return r}(Mn);function we(t){ai(t)}function ci(t){throw t}var ui={closed:!0,next:xn,error:ci,complete:xn},fi=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function li(t){return t}function pi(t){return t.length===0?li:t.length===1?t[0]:function(n){return t.reduce(function(i,o){return o(i)},n)}}var Pn=function(){function t(r){r&&(this._subscribe=r)}return t.prototype.lift=function(r){var n=new t;return n.source=this,n.operator=r,n},t.prototype.subscribe=function(r,n,i){var o=this,c=hi(r)?r:new fr(r,n,i);return Se(function(){var l=o,d=l.operator,O=l.source;c.add(d?d.call(c,O):O?o._subscribe(c):o._trySubscribe(c))}),c},t.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(n){r.error(n)}},t.prototype.forEach=function(r,n){var i=this;return n=Dn(n),new n(function(o,c){var l=new fr({next:function(d){try{r(d)}catch(O){c(O),l.unsubscribe()}},error:c,complete:o});i.subscribe(l)})},t.prototype._subscribe=function(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)},t.prototype[fi]=function(){return this},t.prototype.pipe=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return pi(r)(this)},t.prototype.toPromise=function(r){var n=this;return r=Dn(r),new r(function(i,o){var c;n.subscribe(function(l){return c=l},function(l){return o(l)},function(){return i(c)})})},t.create=function(r){return new t(r)},t}();function Dn(t){var r;return(r=t??En.Promise)!==null&&r!==void 0?r:Promise}function di(t){return t&&ht(t.next)&&ht(t.error)&&ht(t.complete)}function hi(t){return t&&t instanceof Mn||di(t)&&kn(t)}var yi=wn(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Cn=function(t){ut(r,t);function r(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return r.prototype.lift=function(n){var i=new jn(this,this);return i.operator=n,i},r.prototype._throwIfClosed=function(){if(this.closed)throw new yi},r.prototype.next=function(n){var i=this;Se(function(){var o,c;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var l=ir(i.currentObservers),d=l.next();!d.done;d=l.next()){var O=d.value;O.next(n)}}catch(R){o={error:R}}finally{try{d&&!d.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}}})},r.prototype.error=function(n){var i=this;Se(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=n;for(var o=i.observers;o.length;)o.shift().error(n)}})},r.prototype.complete=function(){var n=this;Se(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var i=n.observers;i.length;)i.shift().complete()}})},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},r.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},r.prototype._innerSubscribe=function(n){var i=this,o=this,c=o.hasError,l=o.isStopped,d=o.observers;return c||l?Tn:(this.currentObservers=null,d.push(n),new Ie(function(){i.currentObservers=null,cr(d,n)}))},r.prototype._checkFinalizedStatuses=function(n){var i=this,o=i.hasError,c=i.thrownError,l=i.isStopped;o?n.error(c):l&&n.complete()},r.prototype.asObservable=function(){var n=new Pn;return n.source=this,n},r.create=function(n,i){return new jn(n,i)},r}(Pn),jn=function(t){ut(r,t);function r(n,i){var o=t.call(this)||this;return o.destination=n,o.source=i,o}return r.prototype.next=function(n){var i,o;(o=(i=this.destination)===null||i===void 0?void 0:i.next)===null||o===void 0||o.call(i,n)},r.prototype.error=function(n){var i,o;(o=(i=this.destination)===null||i===void 0?void 0:i.error)===null||o===void 0||o.call(i,n)},r.prototype.complete=function(){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||i===void 0||i.call(n)},r.prototype._subscribe=function(n){var i,o;return(o=(i=this.source)===null||i===void 0?void 0:i.subscribe(n))!==null&&o!==void 0?o:Tn},r}(Cn),Rn=function(t){ut(r,t);function r(n){var i=t.call(this)||this;return i._value=n,i}return Object.defineProperty(r.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),r.prototype._subscribe=function(n){var i=t.prototype._subscribe.call(this,n);return!i.closed&&n.next(this._value),i},r.prototype.getValue=function(){var n=this,i=n.hasError,o=n.thrownError,c=n._value;if(i)throw o;return this._throwIfClosed(),c},r.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},r}(Cn),et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Te={exports:{}};Te.exports,function(t,r){var n=200,i="__lodash_hash_undefined__",o=1,c=2,l=9007199254740991,d="[object Arguments]",O="[object Array]",R="[object AsyncFunction]",S="[object Boolean]",U="[object Date]",m="[object Error]",p="[object Function]",h="[object GeneratorFunction]",f="[object Map]",b="[object Number]",v="[object Null]",_="[object Object]",g="[object Promise]",y="[object Proxy]",F="[object RegExp]",E="[object Set]",x="[object String]",C="[object Symbol]",w="[object Undefined]",T="[object WeakMap]",M="[object ArrayBuffer]",z="[object DataView]",Rt="[object Float32Array]",Ft="[object Float64Array]",De="[object Int8Array]",Or="[object Int16Array]",xr="[object Int32Array]",Mr="[object Uint8Array]",Pr="[object Uint8ClampedArray]",N="[object Uint16Array]",Dr="[object Uint32Array]",Cr=/[\\^$.*+?()[\]{}|]/g,at=/^\[object .+?Constructor\]$/,Ce=/^(?:0|[1-9]\d*)$/,H={};H[Rt]=H[Ft]=H[De]=H[Or]=H[xr]=H[Mr]=H[Pr]=H[N]=H[Dr]=!0,H[d]=H[O]=H[M]=H[S]=H[z]=H[U]=H[m]=H[p]=H[f]=H[b]=H[_]=H[F]=H[E]=H[x]=H[T]=!1;var je=typeof et=="object"&&et&&et.Object===Object&&et,jr=typeof self=="object"&&self&&self.Object===Object&&self,st=je||jr||Function("return this")(),Re=r&&!r.nodeType&&r,Fe=Re&&!0&&t&&!t.nodeType&&t,re=Fe&&Fe.exports===Re,ne=re&&je.process,ze=function(){try{return ne&&ne.binding&&ne.binding("util")}catch{}}(),ie=ze&&ze.isTypedArray;function Ne(e,a){for(var s=-1,u=e==null?0:e.length,k=0,I=[];++s<u;){var D=e[s];a(D,s,e)&&(I[k++]=D)}return I}function ae(e,a){for(var s=-1,u=a.length,k=e.length;++s<u;)e[k+s]=a[s];return e}function He(e,a){for(var s=-1,u=e==null?0:e.length;++s<u;)if(a(e[s],s,e))return!0;return!1}function Rr(e,a){for(var s=-1,u=Array(e);++s<e;)u[s]=a(s);return u}function Fr(e){return function(a){return e(a)}}function zt(e,a){return e.has(a)}function se(e,a){return e==null?void 0:e[a]}function Ue(e){var a=-1,s=Array(e.size);return e.forEach(function(u,k){s[++a]=[k,u]}),s}function Le(e,a){return function(s){return e(a(s))}}function ft(e){var a=-1,s=Array(e.size);return e.forEach(function(u){s[++a]=u}),s}var Nt=Array.prototype,zr=Function.prototype,Et=Object.prototype,Ht=st["__core-js_shared__"],oe=zr.toString,nt=Et.hasOwnProperty,Ge=function(){var e=/[^.]+$/.exec(Ht&&Ht.keys&&Ht.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),We=Et.toString,Nr=RegExp("^"+oe.call(nt).replace(Cr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ce=re?st.Buffer:void 0,Ut=st.Symbol,Be=st.Uint8Array,Lt=Et.propertyIsEnumerable,Ot=Nt.splice,ot=Ut?Ut.toStringTag:void 0,Gt=Object.getOwnPropertySymbols,ue=ce?ce.isBuffer:void 0,xt=Le(Object.keys,Object),fe=mt(st,"DataView"),Mt=mt(st,"Map"),le=mt(st,"Promise"),pe=mt(st,"Set"),de=mt(st,"WeakMap"),vt=mt(Object,"create"),$e=q(fe),yt=q(Mt),Hr=q(le),Ur=q(pe),Lr=q(de),Ke=Ut?Ut.prototype:void 0,he=Ke?Ke.valueOf:void 0;function B(e){var a=-1,s=e==null?0:e.length;for(this.clear();++a<s;){var u=e[a];this.set(u[0],u[1])}}function Gr(){this.__data__=vt?vt(null):{},this.size=0}function Wr(e){var a=this.has(e)&&delete this.__data__[e];return this.size-=a?1:0,a}function Br(e){var a=this.__data__;if(vt){var s=a[e];return s===i?void 0:s}return nt.call(a,e)?a[e]:void 0}function $r(e){var a=this.__data__;return vt?a[e]!==void 0:nt.call(a,e)}function Kr(e,a){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=vt&&a===void 0?i:a,this}B.prototype.clear=Gr,B.prototype.delete=Wr,B.prototype.get=Br,B.prototype.has=$r,B.prototype.set=Kr;function K(e){var a=-1,s=e==null?0:e.length;for(this.clear();++a<s;){var u=e[a];this.set(u[0],u[1])}}function Yr(){this.__data__=[],this.size=0}function Vr(e){var a=this.__data__,s=$t(a,e);if(s<0)return!1;var u=a.length-1;return s==u?a.pop():Ot.call(a,s,1),--this.size,!0}function Xr(e){var a=this.__data__,s=$t(a,e);return s<0?void 0:a[s][1]}function qr(e){return $t(this.__data__,e)>-1}function Jr(e,a){var s=this.__data__,u=$t(s,e);return u<0?(++this.size,s.push([e,a])):s[u][1]=a,this}K.prototype.clear=Yr,K.prototype.delete=Vr,K.prototype.get=Xr,K.prototype.has=qr,K.prototype.set=Jr;function J(e){var a=-1,s=e==null?0:e.length;for(this.clear();++a<s;){var u=e[a];this.set(u[0],u[1])}}function Zr(){this.size=0,this.__data__={hash:new B,map:new(Mt||K),string:new B}}function Qr(e){var a=ct(this,e).delete(e);return this.size-=a?1:0,a}function tn(e){return ct(this,e).get(e)}function en(e){return ct(this,e).has(e)}function rn(e,a){var s=ct(this,e),u=s.size;return s.set(e,a),this.size+=s.size==u?0:1,this}J.prototype.clear=Zr,J.prototype.delete=Qr,J.prototype.get=tn,J.prototype.has=en,J.prototype.set=rn;function Wt(e){var a=-1,s=e==null?0:e.length;for(this.__data__=new J;++a<s;)this.add(e[a])}function Ye(e){return this.__data__.set(e,i),this}function Bt(e){return this.__data__.has(e)}Wt.prototype.add=Wt.prototype.push=Ye,Wt.prototype.has=Bt;function lt(e){var a=this.__data__=new K(e);this.size=a.size}function ye(){this.__data__=new K,this.size=0}function nn(e){var a=this.__data__,s=a.delete(e);return this.size=a.size,s}function an(e){return this.__data__.get(e)}function sn(e){return this.__data__.has(e)}function on(e,a){var s=this.__data__;if(s instanceof K){var u=s.__data__;if(!Mt||u.length<n-1)return u.push([e,a]),this.size=++s.size,this;s=this.__data__=new J(u)}return s.set(e,a),this.size=s.size,this}lt.prototype.clear=ye,lt.prototype.delete=nn,lt.prototype.get=an,lt.prototype.has=sn,lt.prototype.set=on;function cn(e,a){var s=Kt(e),u=!s&&Ze(e),k=!s&&!u&&Yt(e),I=!s&&!u&&!k&&er(e),D=s||u||k||I,P=D?Rr(e.length,String):[],L=P.length;for(var j in e)nt.call(e,j)&&!(D&&(j=="length"||k&&(j=="offset"||j=="parent")||I&&(j=="buffer"||j=="byteLength"||j=="byteOffset")||mn(j,L)))&&P.push(j);return P}function $t(e,a){for(var s=e.length;s--;)if(Je(e[s][0],a))return s;return-1}function me(e,a,s){var u=a(e);return Kt(e)?u:ae(u,s(e))}function Pt(e){return e==null?e===void 0?w:v:ot&&ot in Object(e)?bt(e):qe(e)}function Ve(e){return dt(e)&&Pt(e)==d}function Xe(e,a,s,u,k){return e===a?!0:e==null||a==null||!dt(e)&&!dt(a)?e!==e&&a!==a:un(e,a,s,u,Xe,k)}function un(e,a,s,u,k,I){var D=Kt(e),P=Kt(a),L=D?O:pt(e),j=P?O:pt(a);L=L==d?_:L,j=j==d?_:j;var Y=L==_,Z=j==_,W=L==j;if(W&&Yt(e)){if(!Yt(a))return!1;D=!0,Y=!1}if(W&&!Y)return I||(I=new lt),D||er(e)?be(e,a,s,u,k,I):dn(e,a,L,s,u,k,I);if(!(s&o)){var V=Y&&nt.call(e,"__wrapped__"),$=Z&&nt.call(a,"__wrapped__");if(V||$){var It=V?e.value():e,gt=$?a.value():a;return I||(I=new lt),k(It,gt,s,u,I)}}return W?(I||(I=new lt),hn(e,a,s,u,k,I)):!1}function fn(e){if(!tr(e)||gn(e))return!1;var a=Qe(e)?Nr:at;return a.test(q(e))}function ln(e){return dt(e)&&_e(e.length)&&!!H[Pt(e)]}function pn(e){if(!_n(e))return xt(e);var a=[];for(var s in Object(e))nt.call(e,s)&&s!="constructor"&&a.push(s);return a}function be(e,a,s,u,k,I){var D=s&o,P=e.length,L=a.length;if(P!=L&&!(D&&L>P))return!1;var j=I.get(e);if(j&&I.get(a))return j==a;var Y=-1,Z=!0,W=s&c?new Wt:void 0;for(I.set(e,a),I.set(a,e);++Y<P;){var V=e[Y],$=a[Y];if(u)var It=D?u($,V,Y,a,e,I):u(V,$,Y,e,a,I);if(It!==void 0){if(It)continue;Z=!1;break}if(W){if(!He(a,function(gt,Ct){if(!zt(W,Ct)&&(V===gt||k(V,gt,s,u,I)))return W.push(Ct)})){Z=!1;break}}else if(!(V===$||k(V,$,s,u,I))){Z=!1;break}}return I.delete(e),I.delete(a),Z}function dn(e,a,s,u,k,I,D){switch(s){case z:if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case M:return!(e.byteLength!=a.byteLength||!I(new Be(e),new Be(a)));case S:case U:case b:return Je(+e,+a);case m:return e.name==a.name&&e.message==a.message;case F:case x:return e==a+"";case f:var P=Ue;case E:var L=u&o;if(P||(P=ft),e.size!=a.size&&!L)return!1;var j=D.get(e);if(j)return j==a;u|=c,D.set(e,a);var Y=be(P(e),P(a),u,k,I,D);return D.delete(e),Y;case C:if(he)return he.call(e)==he.call(a)}return!1}function hn(e,a,s,u,k,I){var D=s&o,P=Dt(e),L=P.length,j=Dt(a),Y=j.length;if(L!=Y&&!D)return!1;for(var Z=L;Z--;){var W=P[Z];if(!(D?W in a:nt.call(a,W)))return!1}var V=I.get(e);if(V&&I.get(a))return V==a;var $=!0;I.set(e,a),I.set(a,e);for(var It=D;++Z<L;){W=P[Z];var gt=e[W],Ct=a[W];if(u)var ii=D?u(Ct,gt,W,a,e,I):u(gt,Ct,W,e,a,I);if(!(ii===void 0?gt===Ct||k(gt,Ct,s,u,I):ii)){$=!1;break}It||(It=W=="constructor")}if($&&!It){var rr=e.constructor,nr=a.constructor;rr!=nr&&"constructor"in e&&"constructor"in a&&!(typeof rr=="function"&&rr instanceof rr&&typeof nr=="function"&&nr instanceof nr)&&($=!1)}return I.delete(e),I.delete(a),$}function Dt(e){return me(e,ve,yn)}function ct(e,a){var s=e.__data__;return bn(a)?s[typeof a=="string"?"string":"hash"]:s.map}function mt(e,a){var s=se(e,a);return fn(s)?s:void 0}function bt(e){var a=nt.call(e,ot),s=e[ot];try{e[ot]=void 0;var u=!0}catch{}var k=We.call(e);return u&&(a?e[ot]=s:delete e[ot]),k}var yn=Gt?function(e){return e==null?[]:(e=Object(e),Ne(Gt(e),function(a){return Lt.call(e,a)}))}:In,pt=Pt;(fe&&pt(new fe(new ArrayBuffer(1)))!=z||Mt&&pt(new Mt)!=f||le&&pt(le.resolve())!=g||pe&&pt(new pe)!=E||de&&pt(new de)!=T)&&(pt=function(e){var a=Pt(e),s=a==_?e.constructor:void 0,u=s?q(s):"";if(u)switch(u){case $e:return z;case yt:return f;case Hr:return g;case Ur:return E;case Lr:return T}return a});function mn(e,a){return a=a??l,!!a&&(typeof e=="number"||Ce.test(e))&&e>-1&&e%1==0&&e<a}function bn(e){var a=typeof e;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?e!=="__proto__":e===null}function gn(e){return!!Ge&&Ge in e}function _n(e){var a=e&&e.constructor,s=typeof a=="function"&&a.prototype||Et;return e===s}function qe(e){return We.call(e)}function q(e){if(e!=null){try{return oe.call(e)}catch{}try{return e+""}catch{}}return""}function Je(e,a){return e===a||e!==e&&a!==a}var Ze=Ve(function(){return arguments}())?Ve:function(e){return dt(e)&&nt.call(e,"callee")&&!Lt.call(e,"callee")},Kt=Array.isArray;function ge(e){return e!=null&&_e(e.length)&&!Qe(e)}var Yt=ue||Sn;function vn(e,a){return Xe(e,a)}function Qe(e){if(!tr(e))return!1;var a=Pt(e);return a==p||a==h||a==R||a==y}function _e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=l}function tr(e){var a=typeof e;return e!=null&&(a=="object"||a=="function")}function dt(e){return e!=null&&typeof e=="object"}var er=ie?Fr(ie):ln;function ve(e){return ge(e)?cn(e):pn(e)}function In(){return[]}function Sn(){return!1}t.exports=vn}(Te,Te.exports);var mi=Te.exports;const it=lr(mi);var ke={exports:{}};ke.exports,function(t,r){var n=200,i="__lodash_hash_undefined__",o=9007199254740991,c="[object Arguments]",l="[object Array]",d="[object Boolean]",O="[object Date]",R="[object Error]",S="[object Function]",U="[object GeneratorFunction]",m="[object Map]",p="[object Number]",h="[object Object]",f="[object Promise]",b="[object RegExp]",v="[object Set]",_="[object String]",g="[object Symbol]",y="[object WeakMap]",F="[object ArrayBuffer]",E="[object DataView]",x="[object Float32Array]",C="[object Float64Array]",w="[object Int8Array]",T="[object Int16Array]",M="[object Int32Array]",z="[object Uint8Array]",Rt="[object Uint8ClampedArray]",Ft="[object Uint16Array]",De="[object Uint32Array]",Or=/[\\^$.*+?()[\]{}|]/g,xr=/\w*$/,Mr=/^\[object .+?Constructor\]$/,Pr=/^(?:0|[1-9]\d*)$/,N={};N[c]=N[l]=N[F]=N[E]=N[d]=N[O]=N[x]=N[C]=N[w]=N[T]=N[M]=N[m]=N[p]=N[h]=N[b]=N[v]=N[_]=N[g]=N[z]=N[Rt]=N[Ft]=N[De]=!0,N[R]=N[S]=N[y]=!1;var Dr=typeof et=="object"&&et&&et.Object===Object&&et,Cr=typeof self=="object"&&self&&self.Object===Object&&self,at=Dr||Cr||Function("return this")(),Ce=r&&!r.nodeType&&r,H=Ce&&!0&&t&&!t.nodeType&&t,je=H&&H.exports===Ce;function jr(e,a){return e.set(a[0],a[1]),e}function st(e,a){return e.add(a),e}function Re(e,a){for(var s=-1,u=e?e.length:0;++s<u&&a(e[s],s,e)!==!1;);return e}function Fe(e,a){for(var s=-1,u=a.length,k=e.length;++s<u;)e[k+s]=a[s];return e}function re(e,a,s,u){for(var k=-1,I=e?e.length:0;++k<I;)s=a(s,e[k],k,e);return s}function ne(e,a){for(var s=-1,u=Array(e);++s<e;)u[s]=a(s);return u}function ze(e,a){return e==null?void 0:e[a]}function ie(e){var a=!1;if(e!=null&&typeof e.toString!="function")try{a=!!(e+"")}catch{}return a}function Ne(e){var a=-1,s=Array(e.size);return e.forEach(function(u,k){s[++a]=[k,u]}),s}function ae(e,a){return function(s){return e(a(s))}}function He(e){var a=-1,s=Array(e.size);return e.forEach(function(u){s[++a]=u}),s}var Rr=Array.prototype,Fr=Function.prototype,zt=Object.prototype,se=at["__core-js_shared__"],Ue=function(){var e=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Le=Fr.toString,ft=zt.hasOwnProperty,Nt=zt.toString,zr=RegExp("^"+Le.call(ft).replace(Or,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Et=je?at.Buffer:void 0,Ht=at.Symbol,oe=at.Uint8Array,nt=ae(Object.getPrototypeOf,Object),Ge=Object.create,We=zt.propertyIsEnumerable,Nr=Rr.splice,ce=Object.getOwnPropertySymbols,Ut=Et?Et.isBuffer:void 0,Be=ae(Object.keys,Object),Lt=ct(at,"DataView"),Ot=ct(at,"Map"),ot=ct(at,"Promise"),Gt=ct(at,"Set"),ue=ct(at,"WeakMap"),xt=ct(Object,"create"),fe=q(Lt),Mt=q(Ot),le=q(ot),pe=q(Gt),de=q(ue),vt=Ht?Ht.prototype:void 0,$e=vt?vt.valueOf:void 0;function yt(e){var a=-1,s=e?e.length:0;for(this.clear();++a<s;){var u=e[a];this.set(u[0],u[1])}}function Hr(){this.__data__=xt?xt(null):{}}function Ur(e){return this.has(e)&&delete this.__data__[e]}function Lr(e){var a=this.__data__;if(xt){var s=a[e];return s===i?void 0:s}return ft.call(a,e)?a[e]:void 0}function Ke(e){var a=this.__data__;return xt?a[e]!==void 0:ft.call(a,e)}function he(e,a){var s=this.__data__;return s[e]=xt&&a===void 0?i:a,this}yt.prototype.clear=Hr,yt.prototype.delete=Ur,yt.prototype.get=Lr,yt.prototype.has=Ke,yt.prototype.set=he;function B(e){var a=-1,s=e?e.length:0;for(this.clear();++a<s;){var u=e[a];this.set(u[0],u[1])}}function Gr(){this.__data__=[]}function Wr(e){var a=this.__data__,s=Bt(a,e);if(s<0)return!1;var u=a.length-1;return s==u?a.pop():Nr.call(a,s,1),!0}function Br(e){var a=this.__data__,s=Bt(a,e);return s<0?void 0:a[s][1]}function $r(e){return Bt(this.__data__,e)>-1}function Kr(e,a){var s=this.__data__,u=Bt(s,e);return u<0?s.push([e,a]):s[u][1]=a,this}B.prototype.clear=Gr,B.prototype.delete=Wr,B.prototype.get=Br,B.prototype.has=$r,B.prototype.set=Kr;function K(e){var a=-1,s=e?e.length:0;for(this.clear();++a<s;){var u=e[a];this.set(u[0],u[1])}}function Yr(){this.__data__={hash:new yt,map:new(Ot||B),string:new yt}}function Vr(e){return Dt(this,e).delete(e)}function Xr(e){return Dt(this,e).get(e)}function qr(e){return Dt(this,e).has(e)}function Jr(e,a){return Dt(this,e).set(e,a),this}K.prototype.clear=Yr,K.prototype.delete=Vr,K.prototype.get=Xr,K.prototype.has=qr,K.prototype.set=Jr;function J(e){this.__data__=new B(e)}function Zr(){this.__data__=new B}function Qr(e){return this.__data__.delete(e)}function tn(e){return this.__data__.get(e)}function en(e){return this.__data__.has(e)}function rn(e,a){var s=this.__data__;if(s instanceof B){var u=s.__data__;if(!Ot||u.length<n-1)return u.push([e,a]),this;s=this.__data__=new K(u)}return s.set(e,a),this}J.prototype.clear=Zr,J.prototype.delete=Qr,J.prototype.get=tn,J.prototype.has=en,J.prototype.set=rn;function Wt(e,a){var s=ge(e)||Kt(e)?ne(e.length,String):[],u=s.length,k=!!u;for(var I in e)ft.call(e,I)&&!(k&&(I=="length"||bn(I,u)))&&s.push(I);return s}function Ye(e,a,s){var u=e[a];(!(ft.call(e,a)&&Ze(u,s))||s===void 0&&!(a in e))&&(e[a]=s)}function Bt(e,a){for(var s=e.length;s--;)if(Ze(e[s][0],a))return s;return-1}function lt(e,a){return e&&be(a,ve(a),e)}function ye(e,a,s,u,k,I,D){var P;if(u&&(P=I?u(e,k,I,D):u(e)),P!==void 0)return P;if(!dt(e))return e;var L=ge(e);if(L){if(P=yn(e),!a)return pn(e,P)}else{var j=bt(e),Y=j==S||j==U;if(Qe(e))return $t(e,a);if(j==h||j==c||Y&&!I){if(ie(e))return I?e:{};if(P=pt(Y?{}:e),!a)return dn(e,lt(P,e))}else{if(!N[j])return I?e:{};P=mn(e,j,ye,a)}}D||(D=new J);var Z=D.get(e);if(Z)return Z;if(D.set(e,P),!L)var W=s?hn(e):ve(e);return Re(W||e,function(V,$){W&&($=V,V=e[$]),Ye(P,$,ye(V,a,s,u,$,e,D))}),P}function nn(e){return dt(e)?Ge(e):{}}function an(e,a,s){var u=a(e);return ge(e)?u:Fe(u,s(e))}function sn(e){return Nt.call(e)}function on(e){if(!dt(e)||_n(e))return!1;var a=_e(e)||ie(e)?zr:Mr;return a.test(q(e))}function cn(e){if(!qe(e))return Be(e);var a=[];for(var s in Object(e))ft.call(e,s)&&s!="constructor"&&a.push(s);return a}function $t(e,a){if(a)return e.slice();var s=new e.constructor(e.length);return e.copy(s),s}function me(e){var a=new e.constructor(e.byteLength);return new oe(a).set(new oe(e)),a}function Pt(e,a){var s=a?me(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function Ve(e,a,s){var u=a?s(Ne(e),!0):Ne(e);return re(u,jr,new e.constructor)}function Xe(e){var a=new e.constructor(e.source,xr.exec(e));return a.lastIndex=e.lastIndex,a}function un(e,a,s){var u=a?s(He(e),!0):He(e);return re(u,st,new e.constructor)}function fn(e){return $e?Object($e.call(e)):{}}function ln(e,a){var s=a?me(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function pn(e,a){var s=-1,u=e.length;for(a||(a=Array(u));++s<u;)a[s]=e[s];return a}function be(e,a,s,u){s||(s={});for(var k=-1,I=a.length;++k<I;){var D=a[k],P=void 0;Ye(s,D,P===void 0?e[D]:P)}return s}function dn(e,a){return be(e,mt(e),a)}function hn(e){return an(e,ve,mt)}function Dt(e,a){var s=e.__data__;return gn(a)?s[typeof a=="string"?"string":"hash"]:s.map}function ct(e,a){var s=ze(e,a);return on(s)?s:void 0}var mt=ce?ae(ce,Object):In,bt=sn;(Lt&&bt(new Lt(new ArrayBuffer(1)))!=E||Ot&&bt(new Ot)!=m||ot&&bt(ot.resolve())!=f||Gt&&bt(new Gt)!=v||ue&&bt(new ue)!=y)&&(bt=function(e){var a=Nt.call(e),s=a==h?e.constructor:void 0,u=s?q(s):void 0;if(u)switch(u){case fe:return E;case Mt:return m;case le:return f;case pe:return v;case de:return y}return a});function yn(e){var a=e.length,s=e.constructor(a);return a&&typeof e[0]=="string"&&ft.call(e,"index")&&(s.index=e.index,s.input=e.input),s}function pt(e){return typeof e.constructor=="function"&&!qe(e)?nn(nt(e)):{}}function mn(e,a,s,u){var k=e.constructor;switch(a){case F:return me(e);case d:case O:return new k(+e);case E:return Pt(e,u);case x:case C:case w:case T:case M:case z:case Rt:case Ft:case De:return ln(e,u);case m:return Ve(e,u,s);case p:case _:return new k(e);case b:return Xe(e);case v:return un(e,u,s);case g:return fn(e)}}function bn(e,a){return a=a??o,!!a&&(typeof e=="number"||Pr.test(e))&&e>-1&&e%1==0&&e<a}function gn(e){var a=typeof e;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?e!=="__proto__":e===null}function _n(e){return!!Ue&&Ue in e}function qe(e){var a=e&&e.constructor,s=typeof a=="function"&&a.prototype||zt;return e===s}function q(e){if(e!=null){try{return Le.call(e)}catch{}try{return e+""}catch{}}return""}function Je(e){return ye(e,!0,!0)}function Ze(e,a){return e===a||e!==e&&a!==a}function Kt(e){return vn(e)&&ft.call(e,"callee")&&(!We.call(e,"callee")||Nt.call(e)==c)}var ge=Array.isArray;function Yt(e){return e!=null&&tr(e.length)&&!_e(e)}function vn(e){return er(e)&&Yt(e)}var Qe=Ut||Sn;function _e(e){var a=dt(e)?Nt.call(e):"";return a==S||a==U}function tr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=o}function dt(e){var a=typeof e;return!!e&&(a=="object"||a=="function")}function er(e){return!!e&&typeof e=="object"}function ve(e){return Yt(e)?Wt(e):cn(e)}function In(){return[]}function Sn(){return!1}t.exports=Je}(ke,ke.exports);var bi=ke.exports;const rt=lr(bi),gi=t=>new Promise((r,n)=>{const i=new Image;console.warn("update cdn config for cors?"),i.onload=()=>{const o=i.width,c=i.height;r({width:o,height:c})},i.onerror=o=>{n(o)},i.crossOrigin="anonymous",i.src=t}),_i=t=>new Promise((r,n)=>{const i=new Audio;i.preload="auto",i.addEventListener("loadedmetadata",()=>{const o=i.duration*1e3;r({duration:o})}),i.addEventListener("error",o=>{n(o)}),i.src=t,i.crossOrigin="anonymous",i.load()}),vi=t=>new Promise((r,n)=>{const i=document.createElement("video");i.preload="auto",i.addEventListener("loadedmetadata",()=>{const o=i.duration*1e3,c=i.videoWidth,l=i.videoHeight;r({duration:o,width:c,height:l})}),i.addEventListener("error",o=>{n(o)}),i.src=t,i.load()}),Fn=(t,r)=>{const n=document.createElement("div");Object.keys(r).forEach(o=>{o!=="height"&&(n.style[o]=r[o])}),document.body.appendChild(n),n.textContent=t,n.style.whiteSpace="normal",n.style.position="absolute",n.style.visibility="hidden",n.style.display="inline-block",n.style.width=r.width+"px",n.style.fontSize=r.fontSize+"px";const i=getComputedStyle(n).height;return document.body.removeChild(n),parseFloat(i)},Ae=t=>{const r=t.map(n=>new FontFace(n.fontFamily,`url(${n.url})`).load().catch(i=>i));return r.length===0?Promise.resolve(!0):new Promise((n,i)=>{Promise.all(r).then(o=>{o.forEach(c=>{c&&c.family&&(document.fonts.add(c),n(!0))})}).catch(o=>i(o))})},Ee={color:"#000000",x:0,y:0,blur:0},Vt=(t,r)=>{let n=r!=null&&r.trim?r.trim.to-r.trim.from:(r==null?void 0:r.duration)||5e3;const i={from:0,to:n};if(!t)return i;if(t.from<0)return console.error("'from' must be a non-negative number. Returning default display."),i;if(t.from!==void 0&&t.to===void 0)return{from:t.from,to:t.from+n};if(t.to!==void 0){if(t.to<0)return console.error("'to' must be a non-negative number. Returning default display."),i;if(t.to<t.from)return console.error("'to' must be greater than or equal to 'from'. Returning default display."),i}return t},zn=(t,r)=>t?t.from&&!t.to?{from:t.from,to:r.duration}:t:{from:0,to:r.duration};function Oe(t,r){const n={x:t.size.width/2,y:t.size.height/2},i={x:r.width/2,y:r.height/2},o=Math.min(t.size.width/r.width,t.size.height/r.height),c=n.x-i.x;return{top:`${n.y-i.y}px`,left:`${c}px`,transform:`scale(${o})`}}const Ii=async(t,r)=>{const n=t.details.src,i=await vi(n),o=Oe(r,{...i}),c=zn(t.trim,{duration:i.duration}),l={width:i.width,height:i.height,duration:i.duration,opacity:100,src:n,volume:t.details.volume??100,borderRadius:t.details.borderRadius??0,borderWidth:t.details.borderWidth??0,borderColor:t.details.borderColor||"#000000",boxShadow:t.details.boxShadow||Ee,top:o.top||"0px",left:o.left||"0px",transform:o.transform,blur:t.details.blur||0,brightness:t.details.brightness||100,flipX:t.details.flipX||!1,flipY:t.details.flipY||!1};return{...t,trim:c,type:"video",name:"video",details:l,playbackRate:t.playbackRate||1,display:Vt(t.display,{duration:i.duration,trim:c})}},Si=async t=>{const r=t.id,n=t.details,o=(await _i(n.src)).duration,c=zn(t.trim,{duration:o});return{id:r,name:"",type:"audio",display:Vt(t.display,{duration:o,trim:c}),trim:c,playbackRate:t.playbackRate||1,details:{src:n.src,duration:o,volume:n.volume??100},metadata:{...t.metadata}}},wi=async(t,r)=>{const n=t.details,i=await gi(n.src),o=Oe(r,i);return{id:t.id,type:"image",name:"image",display:Vt(t.display),playbackRate:t.playbackRate||1,details:{src:n.src||"",width:n.width||i.width||100,height:n.height||i.height||100,opacity:n.opacity??100,transform:o.transform,border:n.border||"none",borderRadius:n.borderRadius||0,boxShadow:n.boxShadow||Ee,top:o.top||"0px",left:o.left||"0px",borderWidth:n.borderWidth??0,borderColor:n.borderColor||"#000000",blur:n.blur||0,brightness:n.brightness||100,flipX:n.flipX||!1,flipY:n.flipY||!1},metadata:t.metadata||{}}},Ti=async(t,r)=>{const n=t;await Ae([{fontFamily:n.details.fontFamily,url:n.details.fontUrl}]);const i=n.id,o=n.details,c=Nn(o),l=Fn(n.details.text,c),d=Oe(r,{width:c.width,height:l});return{id:i,name:"caption",type:"caption",display:Vt(n.display),details:{...c,text:o.text||"",height:l,fontUrl:o.fontUrl,top:d.top,left:d.left,borderWidth:o.borderWidth||0,borderColor:o.borderColor||"#000000",boxShadow:o.boxShadow||Ee,words:o.words||[]},metadata:{}}},ki=async(t,r)=>{await Ae([{fontFamily:t.details.fontFamily,url:t.details.fontUrl}]);const n=t.id,i=t.details,o=Nn(i),c=Fn(t.details.text,o),l=Oe(r,{width:o.width,height:c});return{id:n,name:"text",type:"text",display:Vt(t.display),details:{...o,text:i.text||"",height:c,fontUrl:i.fontUrl,top:l.top,left:l.left,borderWidth:i.borderWidth||0,borderColor:i.borderColor||"#000000",boxShadow:i.boxShadow||Ee},metadata:{}}},Nn=t=>({fontFamily:t.fontFamily||"Arial",fontSize:t.fontSize||"16px",fontWeight:t.fontWeight||"normal",fontStyle:t.fontStyle||"normal",textDecoration:t.textDecoration||"none",textAlign:t.textAlign||"left",lineHeight:t.lineHeight||"normal",letterSpacing:t.letterSpacing||"normal",wordSpacing:t.wordSpacing||"normal",color:t.color||"#ffffff",backgroundColor:t.backgroundColor||"transparent",border:t.border||"none",textShadow:t.textShadow||"none",text:t.text||"",opacity:t.opacity??100,width:t.width||300,wordWrap:t.wordWrap||"normal",wordBreak:t.wordBreak||"normal",WebkitTextStrokeColor:t.WebkitTextStrokeColor||"#ffffff",WebkitTextStrokeWidth:t.WebkitTextStrokeWidth||"0px",top:t.top||"0px",left:t.left||"0px",textTransform:t.textTransform||"none"}),Ai="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let pr=(t=21)=>{let r="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)r+=Ai[n[t]&63];return r};function Ei(t,r){return t.filter(i=>({...i,items:i.items.filter(o=>!r.includes(o))})).filter(i=>!i.items.length)}function Hn(t=16){const r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=r.charAt(Math.floor(Math.random()*r.length));let i=pr(t-1);return i=i.replace(/[^a-zA-Z0-9]/g,"").slice(0,t-1),n+i}const dr=t=>Object.keys(t).reduce((r,n)=>{const{display:i,playbackRate:o}=t[n];return Math.max(r,i.to/(o||1))},0);function Oi(t){const r=A.subject.pipe(A.filter(({key:p})=>p.startsWith(A.DESIGN_PREFIX))),n=A.subject.pipe(A.filter(({key:p})=>p.startsWith(A.ADD_PREFIX))),i=A.subject.pipe(A.filter(({key:p})=>p.startsWith(A.LAYER_PREFIX))),o=A.subject.pipe(A.filter(({key:p})=>p.startsWith(A.HISTORY_PREFIX))),c=A.subject.pipe(A.filter(({key:p})=>p.startsWith(A.ACTIVE_PREFIX))),l=A.subject.pipe(A.filter(({key:p})=>p.startsWith(A.EDIT_PREFIX))),d=r.subscribe(async p=>{var h;if(p.key===A.DESIGN_LOAD){const f=(h=p.value)==null?void 0:h.payload,b=f.trackItemIds,v=f.trackItemDetailsMap;console.warn("IMPROVE FONTS LOADING");const _=b.map(async g=>{const y=v[g];return(y.type==="caption"||y.type==="text")&&await Ae([{fontFamily:y.details.fontFamily,url:y.details.fontUrl}]),!0});await Promise.all(_),t.updateState({...f})}}),O=o.subscribe(p=>{if(p.key===A.HISTORY_UNDO)return t.undo();if(p.key===A.HISTORY_REDO)return t.redo()}),R=i.subscribe(p=>{var f,b,v;const h=[];if((f=p.value)!=null&&f.payload.trackItemIds&&(h.push((b=p.value)==null?void 0:b.payload.trackItemIds),t.updateState({activeIds:h})),p.key===A.LAYER_DELETE){const _=(v=p.value)==null?void 0:v.payload.trackItemIds,g=rt(t.getState()),y=_&&_.length?_:g.activeIds,F=g.trackItemIds,E=g.trackItemDetailsMap,x=F.filter(z=>!y.includes(z)),C=Object.fromEntries(Object.entries(E).filter(([z])=>!y.includes(z))),w=Ei(g.tracks,y),T=Object.fromEntries(Object.entries(g.trackItemsMap).filter(([z])=>!y.includes(z))),M=dr(g.trackItemsMap);t.updateState({trackItemIds:x,trackItemDetailsMap:C,activeIds:[],trackItemsMap:T,tracks:w,duration:M},{updateHistory:!0,kind:"remove"})}}),S=n.subscribe(async p=>{var _,g,y,F,E;const h=rt(t.getState());let f=[],b="text";if(p.key===A.ADD_CAPTION){b="caption";const x=(_=p.value)==null?void 0:_.payload,C=[];for(const M of x){const z=Ti(M,{size:{width:1080,height:1920}});C.push(z)}const w=await Promise.all(C),T=[];for(const M of w){const z=M.id;T.push(z);const{details:Rt,...Ft}=M;h.trackItemDetailsMap[z]={type:b,details:Rt},h.trackItemsMap[z]=Ft,h.trackItemIds.push(z)}f=T}if(p.key===A.ADD_TEXT){b="text";const x=await ki((g=p.value)==null?void 0:g.payload,{size:{width:1080,height:1920}}),{details:C,...w}=x;h.trackItemDetailsMap[w.id]={type:b,details:C},h.trackItemsMap[w.id]=w,h.trackItemIds.push(w.id),f=[w.id]}if(p.key===A.ADD_IMAGE){b="image";const x=await wi((y=p.value)==null?void 0:y.payload,{size:{width:1080,height:1920}}),{details:C,...w}=x;h.trackItemDetailsMap[w.id]={type:b,details:C},h.trackItemsMap[w.id]=w,h.trackItemIds.push(w.id),f=[w.id]}if(p.key===A.ADD_AUDIO){b="audio";const x=await Si((F=p.value)==null?void 0:F.payload),{details:C,...w}=x;h.trackItemDetailsMap[w.id]={type:b,details:C},h.trackItemsMap[w.id]=w,h.trackItemIds.push(w.id),f=[w.id]}if(p.key===A.ADD_VIDEO){b="video";const x=await Ii((E=p.value)==null?void 0:E.payload,{size:{width:1080,height:1920}}),{details:C,...w}=x;h.trackItemDetailsMap[w.id]={type:b,details:C},h.trackItemsMap[w.id]=w,h.trackItemIds.push(w.id),f=[w.id]}h.tracks.unshift({id:pr(),accepts:["text","audio","helper","video","image","caption"],type:b,items:f,magnetic:!1,static:!1});const v=dr(h.trackItemsMap);t.updateState({trackItemIds:h.trackItemIds,trackItemDetailsMap:h.trackItemDetailsMap,trackItemsMap:h.trackItemsMap,tracks:h.tracks,duration:v},{updateHistory:!0,kind:"add"})}),U=c.subscribe(async p=>{var h;if(p.key===A.ACTIVE_SPLIT){const f=rt(t.getState()),b=(h=p.value)==null?void 0:h.options.time;if(f.activeIds.length===1){const v=f.activeIds[0],_=f.trackItemsMap[v];if(b>=_.display.to||b<=_.display.from)return;const g=f.trackItemDetailsMap[v],y=Hn(),F={..._,id:y,display:{from:b,to:_.display.to},trim:{from:b,to:_.display.to}};f.trackItemsMap[v].display.to=b,f.trackItemsMap[y]=F,f.trackItemIds.push(y),f.trackItemDetailsMap[y]=g,f.tracks.forEach(E=>{E.items.includes(v)&&E.items.push(y)}),t.updateState({trackItemDetailsMap:f.trackItemDetailsMap,tracks:f.tracks,trackItemIds:f.trackItemIds,trackItemsMap:f.trackItemsMap},{updateHistory:!0,kind:"update"})}return}if(p.key===A.ACTIVE_CLONE){const f=rt(t.getState());if(f.activeIds.length){const b=f.activeIds,v=[],_={activeIds:b,trackItemDetailsMap:{},trackItemsMap:{},tracks:[]};b.forEach(y=>{_.trackItemDetailsMap[y]=f.trackItemDetailsMap[y],_.trackItemsMap[y]=f.trackItemsMap[y],v.push(f.tracks.find(F=>F.items.includes(y)))});const g=new Set;v.filter(y=>g.has(y.id)?!1:(g.add(y),!0)),_.tracks=Array.from(g.keys()),localStorage.setItem("DesignComboTemp",JSON.stringify(_))}}if(p.key===A.ACTIVE_PASTE){const f=localStorage.getItem("DesignComboTemp");if(!f)return;const b=rt(t.getState()),v=JSON.parse(f),_={},g=v.trackItemsMap,y=v.trackItemDetailsMap,F=v.tracks,E=[],x=v.activeIds.map(async C=>{const w=y[C];(w.type==="caption"||w.type==="text")&&await Ae([{fontFamily:w.details.fontFamily,url:w.details.fontUrl}]);const T=Hn();return _[C]=T,b.trackItemsMap[T]={...g[C],id:T},b.trackItemDetailsMap[T]=w,b.trackItemIds.push(T),!0});await Promise.all(x),F.forEach(C=>{const w=C.items.map(M=>_[M]),T={...C,items:w,id:pr()};E.push(T)}),b.tracks=[...b.tracks,...E],t.updateState({trackItemDetailsMap:b.trackItemDetailsMap,tracks:b.tracks,trackItemIds:b.trackItemIds,trackItemsMap:b.trackItemsMap},{updateHistory:!0,kind:"update"})}}),m=l.subscribe(p=>{var h,f;if(p.key===A.EDIT_OBJECT){const b=rt(t.getState()),v=b.trackItemDetailsMap,_=b.trackItemsMap,g=Object.keys((h=p.value)==null?void 0:h.payload);if(!g.length)return;const y=(f=p.value)==null?void 0:f.payload;g.forEach(E=>{y[E].details?v[E].details={...v[E].details,...y[E].details}:y[E].playbackRate&&(_[E].playbackRate=y[E].playbackRate)});const F=dr(_);t.updateState({trackItemDetailsMap:{...v},trackItemsMap:{..._},duration:F},{updateHistory:!0,kind:"update:details"})}});return{unsubscribe:()=>{S.unsubscribe(),U.unsubscribe(),m.unsubscribe(),O.unsubscribe(),R.unsubscribe(),d.unsubscribe()}}}const xi={Date:!0,RegExp:!0,String:!0,Number:!0};function Un(t,r,n={cyclesFix:!0},i=[]){var d,O;let o=[];const c=Array.isArray(t);for(const R in t){const S=t[R],U=c?+R:R;if(!(R in r)){o.push({type:"REMOVE",path:[U],oldValue:t[R]});continue}const m=r[R],p=typeof S=="object"&&typeof m=="object"&&Array.isArray(S)===Array.isArray(m);if(S&&m&&p&&!xi[(O=(d=Object.getPrototypeOf(S))==null?void 0:d.constructor)==null?void 0:O.name]&&(!n.cyclesFix||!i.includes(S))){const h=Un(S,m,n,n.cyclesFix?i.concat([S]):[]);o.push.apply(o,h.map(f=>(f.path.unshift(U),f)))}else S!==m&&!(Number.isNaN(S)&&Number.isNaN(m))&&!(p&&(isNaN(S)?S+""==m+"":+S==+m))&&o.push({path:[U],type:"CHANGE",value:m,oldValue:S})}const l=Array.isArray(r);for(const R in r)R in t||o.push({type:"CREATE",path:[l?+R:R],value:r[R]});return o}var hr=Symbol.for("immer-nothing"),Xt=Symbol.for("immer-draftable"),Q=Symbol.for("immer-state"),Ln=process.env.NODE_ENV!=="production"?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(t){return`'current' expects a draft, got: ${t}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(t){return`'original' expects a draft, got: ${t}`}]:[];function G(t,...r){if(process.env.NODE_ENV!=="production"){const n=Ln[t],i=typeof n=="function"?n.apply(null,r):n;throw new Error(`[Immer] ${i}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var St=Object.getPrototypeOf;function wt(t){return!!t&&!!t[Q]}function _t(t){var r;return t?Gn(t)||Array.isArray(t)||!!t[Xt]||!!((r=t.constructor)!=null&&r[Xt])||Zt(t)||Qt(t):!1}var Mi=Object.prototype.constructor.toString();function Gn(t){if(!t||typeof t!="object")return!1;const r=St(t);if(r===null)return!0;const n=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Mi}function qt(t,r){Tt(t)===0?Reflect.ownKeys(t).forEach(n=>{r(n,t[n],t)}):t.forEach((n,i)=>r(i,n,t))}function Tt(t){const r=t[Q];return r?r.type_:Array.isArray(t)?1:Zt(t)?2:Qt(t)?3:0}function Jt(t,r){return Tt(t)===2?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function yr(t,r){return Tt(t)===2?t.get(r):t[r]}function Wn(t,r,n){const i=Tt(t);i===2?t.set(r,n):i===3?t.add(n):t[r]=n}function Pi(t,r){return t===r?t!==0||1/t===1/r:t!==t&&r!==r}function Zt(t){return t instanceof Map}function Qt(t){return t instanceof Set}function kt(t){return t.copy_||t.base_}function mr(t,r){if(Zt(t))return new Map(t);if(Qt(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Gn(t);if(r===!0||r==="class_only"&&!n){const i=Object.getOwnPropertyDescriptors(t);delete i[Q];let o=Reflect.ownKeys(i);for(let c=0;c<o.length;c++){const l=o[c],d=i[l];d.writable===!1&&(d.writable=!0,d.configurable=!0),(d.get||d.set)&&(i[l]={configurable:!0,writable:!0,enumerable:d.enumerable,value:t[l]})}return Object.create(St(t),i)}else{const i=St(t);if(i!==null&&n)return{...t};const o=Object.create(i);return Object.assign(o,t)}}function br(t,r=!1){return xe(t)||wt(t)||!_t(t)||(Tt(t)>1&&(t.set=t.add=t.clear=t.delete=Di),Object.freeze(t),r&&Object.entries(t).forEach(([n,i])=>br(i,!0))),t}function Di(){G(2)}function xe(t){return Object.isFrozen(t)}var gr={};function At(t){const r=gr[t];return r||G(0,t),r}function Ci(t,r){gr[t]||(gr[t]=r)}var te;function Bn(){return te}function ji(t,r){return{drafts_:[],parent_:t,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function $n(t,r){r&&(At("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=r)}function _r(t){vr(t),t.drafts_.forEach(Ri),t.drafts_=null}function vr(t){t===te&&(te=t.parent_)}function Kn(t){return te=ji(te,t)}function Ri(t){const r=t[Q];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Yn(t,r){r.unfinalizedDrafts_=r.drafts_.length;const n=r.drafts_[0];return t!==void 0&&t!==n?(n[Q].modified_&&(_r(r),G(4)),_t(t)&&(t=Me(r,t),r.parent_||Pe(r,t)),r.patches_&&At("Patches").generateReplacementPatches_(n[Q].base_,t,r.patches_,r.inversePatches_)):t=Me(r,n,[]),_r(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),t!==hr?t:void 0}function Me(t,r,n){if(xe(r))return r;const i=r[Q];if(!i)return qt(r,(o,c)=>Vn(t,i,r,o,c,n)),r;if(i.scope_!==t)return r;if(!i.modified_)return Pe(t,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let c=o,l=!1;i.type_===3&&(c=new Set(o),o.clear(),l=!0),qt(c,(d,O)=>Vn(t,i,o,d,O,n,l)),Pe(t,o,!1),n&&t.patches_&&At("Patches").generatePatches_(i,n,t.patches_,t.inversePatches_)}return i.copy_}function Vn(t,r,n,i,o,c,l){if(process.env.NODE_ENV!=="production"&&o===n&&G(5),wt(o)){const d=c&&r&&r.type_!==3&&!Jt(r.assigned_,i)?c.concat(i):void 0,O=Me(t,o,d);if(Wn(n,i,O),wt(O))t.canAutoFreeze_=!1;else return}else l&&n.add(o);if(_t(o)&&!xe(o)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Me(t,o),(!r||!r.scope_.parent_)&&typeof i!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,i)&&Pe(t,o)}}function Pe(t,r,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&br(r,n)}function Fi(t,r){const n=Array.isArray(t),i={type_:n?1:0,scope_:r?r.scope_:Bn(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=i,c=Ir;n&&(o=[i],c=ee);const{revoke:l,proxy:d}=Proxy.revocable(o,c);return i.draft_=d,i.revoke_=l,d}var Ir={get(t,r){if(r===Q)return t;const n=kt(t);if(!Jt(n,r))return zi(t,n,r);const i=n[r];return t.finalized_||!_t(i)?i:i===Sr(t.base_,r)?(Tr(t),t.copy_[r]=kr(i,t)):i},has(t,r){return r in kt(t)},ownKeys(t){return Reflect.ownKeys(kt(t))},set(t,r,n){const i=Xn(kt(t),r);if(i!=null&&i.set)return i.set.call(t.draft_,n),!0;if(!t.modified_){const o=Sr(kt(t),r),c=o==null?void 0:o[Q];if(c&&c.base_===n)return t.copy_[r]=n,t.assigned_[r]=!1,!0;if(Pi(n,o)&&(n!==void 0||Jt(t.base_,r)))return!0;Tr(t),wr(t)}return t.copy_[r]===n&&(n!==void 0||r in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[r])||(t.copy_[r]=n,t.assigned_[r]=!0),!0},deleteProperty(t,r){return Sr(t.base_,r)!==void 0||r in t.base_?(t.assigned_[r]=!1,Tr(t),wr(t)):delete t.assigned_[r],t.copy_&&delete t.copy_[r],!0},getOwnPropertyDescriptor(t,r){const n=kt(t),i=Reflect.getOwnPropertyDescriptor(n,r);return i&&{writable:!0,configurable:t.type_!==1||r!=="length",enumerable:i.enumerable,value:n[r]}},defineProperty(){G(11)},getPrototypeOf(t){return St(t.base_)},setPrototypeOf(){G(12)}},ee={};qt(Ir,(t,r)=>{ee[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),ee.deleteProperty=function(t,r){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(r))&&G(13),ee.set.call(this,t,r,void 0)},ee.set=function(t,r,n){return process.env.NODE_ENV!=="production"&&r!=="length"&&isNaN(parseInt(r))&&G(14),Ir.set.call(this,t[0],r,n,t[0])};function Sr(t,r){const n=t[Q];return(n?kt(n):t)[r]}function zi(t,r,n){var o;const i=Xn(r,n);return i?"value"in i?i.value:(o=i.get)==null?void 0:o.call(t.draft_):void 0}function Xn(t,r){if(!(r in t))return;let n=St(t);for(;n;){const i=Object.getOwnPropertyDescriptor(n,r);if(i)return i;n=St(n)}}function wr(t){t.modified_||(t.modified_=!0,t.parent_&&wr(t.parent_))}function Tr(t){t.copy_||(t.copy_=mr(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Ni=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,n,i)=>{if(typeof r=="function"&&typeof n!="function"){const c=n;n=r;const l=this;return function(O=c,...R){return l.produce(O,S=>n.call(this,S,...R))}}typeof n!="function"&&G(6),i!==void 0&&typeof i!="function"&&G(7);let o;if(_t(r)){const c=Kn(this),l=kr(r,void 0);let d=!0;try{o=n(l),d=!1}finally{d?_r(c):vr(c)}return $n(c,i),Yn(o,c)}else if(!r||typeof r!="object"){if(o=n(r),o===void 0&&(o=r),o===hr&&(o=void 0),this.autoFreeze_&&br(o,!0),i){const c=[],l=[];At("Patches").generateReplacementPatches_(r,o,c,l),i(c,l)}return o}else G(1,r)},this.produceWithPatches=(r,n)=>{if(typeof r=="function")return(l,...d)=>this.produceWithPatches(l,O=>r(O,...d));let i,o;return[this.produce(r,n,(l,d)=>{i=l,o=d}),i,o]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){_t(t)||G(8),wt(t)&&(t=Hi(t));const r=Kn(this),n=kr(t,void 0);return n[Q].isManual_=!0,vr(r),n}finishDraft(t,r){const n=t&&t[Q];(!n||!n.isManual_)&&G(9);const{scope_:i}=n;return $n(i,r),Yn(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const i=At("Patches").applyPatches_;return wt(t)?i(t,r):this.produce(t,o=>i(o,r))}};function kr(t,r){const n=Zt(t)?At("MapSet").proxyMap_(t,r):Qt(t)?At("MapSet").proxySet_(t,r):Fi(t,r);return(r?r.scope_:Bn()).drafts_.push(n),n}function Hi(t){return wt(t)||G(10,t),qn(t)}function qn(t){if(!_t(t)||xe(t))return t;const r=t[Q];let n;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=mr(t,r.scope_.immer_.useStrictShallowCopy_)}else n=mr(t,!0);return qt(n,(i,o)=>{Wn(n,i,qn(o))}),r&&(r.finalized_=!1),n}function Jn(){process.env.NODE_ENV!=="production"&&Ln.push('Sets cannot have "replace" patches.',function(m){return"Unsupported patch operation: "+m},function(m){return"Cannot apply patch, path doesn't resolve: "+m},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");const r="replace",n="add",i="remove";function o(m,p,h,f){switch(m.type_){case 0:case 2:return l(m,p,h,f);case 1:return c(m,p,h,f);case 3:return d(m,p,h,f)}}function c(m,p,h,f){let{base_:b,assigned_:v}=m,_=m.copy_;_.length<b.length&&([b,_]=[_,b],[h,f]=[f,h]);for(let g=0;g<b.length;g++)if(v[g]&&_[g]!==b[g]){const y=p.concat([g]);h.push({op:r,path:y,value:U(_[g])}),f.push({op:r,path:y,value:U(b[g])})}for(let g=b.length;g<_.length;g++){const y=p.concat([g]);h.push({op:n,path:y,value:U(_[g])})}for(let g=_.length-1;b.length<=g;--g){const y=p.concat([g]);f.push({op:i,path:y})}}function l(m,p,h,f){const{base_:b,copy_:v}=m;qt(m.assigned_,(_,g)=>{const y=yr(b,_),F=yr(v,_),E=g?Jt(b,_)?r:n:i;if(y===F&&E===r)return;const x=p.concat(_);h.push(E===i?{op:E,path:x}:{op:E,path:x,value:F}),f.push(E===n?{op:i,path:x}:E===i?{op:n,path:x,value:U(y)}:{op:r,path:x,value:U(y)})})}function d(m,p,h,f){let{base_:b,copy_:v}=m,_=0;b.forEach(g=>{if(!v.has(g)){const y=p.concat([_]);h.push({op:i,path:y,value:g}),f.unshift({op:n,path:y,value:g})}_++}),_=0,v.forEach(g=>{if(!b.has(g)){const y=p.concat([_]);h.push({op:n,path:y,value:g}),f.unshift({op:i,path:y,value:g})}_++})}function O(m,p,h,f){h.push({op:r,path:[],value:p===hr?void 0:p}),f.push({op:r,path:[],value:m})}function R(m,p){return p.forEach(h=>{const{path:f,op:b}=h;let v=m;for(let F=0;F<f.length-1;F++){const E=Tt(v);let x=f[F];typeof x!="string"&&typeof x!="number"&&(x=""+x),(E===0||E===1)&&(x==="__proto__"||x==="constructor")&&G(19),typeof v=="function"&&x==="prototype"&&G(19),v=yr(v,x),typeof v!="object"&&G(18,f.join("/"))}const _=Tt(v),g=S(h.value),y=f[f.length-1];switch(b){case r:switch(_){case 2:return v.set(y,g);case 3:G(16);default:return v[y]=g}case n:switch(_){case 1:return y==="-"?v.push(g):v.splice(y,0,g);case 2:return v.set(y,g);case 3:return v.add(g);default:return v[y]=g}case i:switch(_){case 1:return v.splice(y,1);case 2:return v.delete(y);case 3:return v.delete(h.value);default:return delete v[y]}default:G(17,b)}}),m}function S(m){if(!_t(m))return m;if(Array.isArray(m))return m.map(S);if(Zt(m))return new Map(Array.from(m.entries()).map(([h,f])=>[h,S(f)]));if(Qt(m))return new Set(Array.from(m).map(S));const p=Object.create(St(m));for(const h in m)p[h]=S(m[h]);return Jt(m,Xt)&&(p[Xt]=m[Xt]),p}function U(m){return wt(m)?S(m):m}Ci("Patches",{applyPatches_:R,generatePatches_:o,generateReplacementPatches_:O})}var tt=new Ni,Ui=tt.produce;tt.produceWithPatches.bind(tt),tt.setAutoFreeze.bind(tt),tt.setUseStrictShallowCopy.bind(tt);var Li=tt.applyPatches.bind(tt);tt.createDraft.bind(tt),tt.finishDraft.bind(tt);var Gi=1/0,Wi=9007199254740991,Bi="[object Arguments]",$i="[object Function]",Ki="[object GeneratorFunction]",Yi="[object Symbol]",Vi=typeof et=="object"&&et&&et.Object===Object&&et,Xi=typeof self=="object"&&self&&self.Object===Object&&self,qi=Vi||Xi||Function("return this")();function Ji(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}function Zi(t,r){for(var n=-1,i=t?t.length:0,o=Array(i);++n<i;)o[n]=r(t[n],n,t);return o}function Qi(t,r){for(var n=-1,i=r.length,o=t.length;++n<i;)t[o+n]=r[n];return t}var Ar=Object.prototype,ta=Ar.hasOwnProperty,Er=Ar.toString,Zn=qi.Symbol,ea=Ar.propertyIsEnumerable,Qn=Zn?Zn.isConcatSpreadable:void 0,ti=Math.max;function ra(t,r,n,i,o){var c=-1,l=t.length;for(n||(n=sa),o||(o=[]);++c<l;){var d=t[c];n(d)?Qi(o,d):o[o.length]=d}return o}function na(t,r){return t=Object(t),ia(t,r,function(n,i){return i in t})}function ia(t,r,n){for(var i=-1,o=r.length,c={};++i<o;){var l=r[i],d=t[l];n(d,l)&&(c[l]=d)}return c}function aa(t,r){return r=ti(r===void 0?t.length-1:r,0),function(){for(var n=arguments,i=-1,o=ti(n.length-r,0),c=Array(o);++i<o;)c[i]=n[r+i];i=-1;for(var l=Array(r+1);++i<r;)l[i]=n[i];return l[r]=c,Ji(t,this,l)}}function sa(t){return ua(t)||ca(t)||!!(Qn&&t&&t[Qn])}function oa(t){if(typeof t=="string"||ya(t))return t;var r=t+"";return r=="0"&&1/t==-Gi?"-0":r}function ca(t){return la(t)&&ta.call(t,"callee")&&(!ea.call(t,"callee")||Er.call(t)==Bi)}var ua=Array.isArray;function fa(t){return t!=null&&da(t.length)&&!pa(t)}function la(t){return ei(t)&&fa(t)}function pa(t){var r=ha(t)?Er.call(t):"";return r==$i||r==Ki}function da(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Wi}function ha(t){var r=typeof t;return!!t&&(r=="object"||r=="function")}function ei(t){return!!t&&typeof t=="object"}function ya(t){return typeof t=="symbol"||ei(t)&&Er.call(t)==Yi}var ma=aa(function(t,r){return t==null?{}:na(t,Zi(ra(r),oa))}),ba=ma;const ri=lr(ba),ga={tracks:[],trackItemIds:[],trackItemsMap:{},transitionIds:[],transitionsMap:{},scale:{unit:1,zoom:1,segments:1},duration:0,activeIds:[],trackItemDetailsMap:{}},ni=["tracks","trackItemsMap","trackItemDetailsMap","transitionIds","transitionsMap","trackItemIds"];class _a{constructor(r){jt(this,"stateSubject");jt(this,"stateHistorySubject");jt(this,"prevState");jt(this,"undos",[]);jt(this,"redos",[]);jt(this,"listener");const n=r||ga;this.stateSubject=new Rn(n),this.stateHistorySubject=new Rn({handleRedo:!1,handleUndo:!1}),this.prevState=n,this.initListeners()}initListeners(){Oi(this)}destroyListeners(){this.listener&&this.listener.unsubscribe()}purge(){this.destroyListeners()}updateHistory(r,n){const i=ri(r,ni),o=ri(this.getState(),ni),c=Un(o,i);c.length&&(this.undos.push({undos:c,type:n}),this.redos=[])}getStateHistory(){return this.stateHistorySubject.getValue()}subscribeHistory(r){return this.stateHistorySubject.subscribe(r)}getState(){return this.stateSubject.getValue()}subscribe(r){return this.stateSubject.subscribe(r)}updateState(r,n={updateHistory:!1}){const i=this.getState(),o={...i,...r};it(i,o)||(n.updateHistory&&this.updateHistory(o,n.kind),this.prevState=i,this.stateSubject.next(o))}subscribeToScale(r){return this.stateSubject.asObservable().subscribe(n=>{it(n.scale,this.prevState.scale)||r({scale:n.scale})})}subscribeToUpdateTrackItem(r){return this.stateSubject.asObservable().subscribe(n=>{it(n.trackItemsMap,this.prevState.trackItemsMap)||r({trackItemsMap:n.trackItemsMap})})}subscribeToUpdateItemDetails(r){return this.stateSubject.asObservable().subscribe(n=>{it(n.trackItemDetailsMap,this.prevState.trackItemDetailsMap)||r({trackItemDetailsMap:n.trackItemDetailsMap})})}subscribeToDuration(r){return this.stateSubject.asObservable().subscribe(n=>{n.duration!==this.prevState.duration&&r({duration:n.duration})})}subscribeToHistory(r){return this.stateHistorySubject.asObservable().subscribe(n=>{if(n.handleRedo){const i=this.undos[this.undos.length-1].type;i==="update"&&r({...this.getState(),type:i}),this.stateHistorySubject.next({handleRedo:!1,handleUndo:!1})}if(n.handleUndo){const i=this.redos[this.redos.length-1].type;i==="update"&&r({...this.getState(),type:i}),this.stateHistorySubject.next({handleRedo:!1,handleUndo:!1})}})}subscribeToAddOrRemoveItems(r){return this.stateSubject.asObservable().subscribe(n=>{it(n.trackItemIds,this.prevState.trackItemIds)||r({trackItemIds:n.trackItemIds})})}subscribeToActiveIds(r){return this.stateSubject.asObservable().subscribe(n=>{it(n.activeIds,this.prevState.activeIds)||r({activeIds:n.activeIds})})}subscribeToTracks(r){return this.stateSubject.asObservable().subscribe(n=>{(!it(n.tracks,this.prevState.tracks)||!it(n.trackItemIds,this.prevState.trackItemIds)||!it(n.trackItemsMap,this.prevState.trackItemsMap)||!it(n.transitionIds,this.prevState.transitionIds)||!it(n.transitionsMap,this.prevState.transitionsMap))&&r({tracks:n.tracks,trackItemIds:n.trackItemIds,trackItemsMap:n.trackItemsMap,transitionIds:n.transitionIds,transitionsMap:n.transitionsMap,trackItemDetailsMap:n.trackItemDetailsMap})})}undo(){const r=this.undos.pop(),n=r==null?void 0:r.undos,i=r==null?void 0:r.type;if(!n||!i)return;Jn();const{trackItemDetailsMap:o,trackItemIds:c,tracks:l,transitionIds:d,transitionsMap:O,trackItemsMap:R}=this.getState(),S=rt({trackItemDetailsMap:o,trackItemIds:c,tracks:l,transitionIds:d,transitionsMap:O,trackItemsMap:R}),U=[],m=[],p=[],h=[],f=[],b=[];n.forEach(T=>{let M;const z=T.path.slice(1);T.type==="CREATE"?M={path:z,op:"remove",value:T.value}:T.type==="CHANGE"?M={path:z,op:"replace",value:T.oldValue}:M={path:z,op:"add",value:T.oldValue},T.path.includes("trackItemIds")?p.push(M):T.path.includes("transitionIds")?m.push(M):T.path.includes("trackItemsMap")?f.push(M):T.path.includes("transitionsMap")?h.push(M):T.path.includes("tracks")?U.push(M):T.path.includes("trackItemDetailsMap")&&b.push(M)});const v=this.applyPatch(S.tracks,U),_=this.applyPatch(S.transitionIds,m),g=this.applyPatch(S.trackItemIds,p),y=this.applyPatch(S.transitionsMap,h),F=this.applyPatch(S.trackItemsMap,f),E=this.applyPatch(S.trackItemDetailsMap,b),x=rt({tracks:v,transitionIds:_,trackItemIds:g,transitionsMap:y,trackItemsMap:F,trackItemDetailsMap:E}),C=rt(this.getState()),w={...C,...x};this.prevState=C,this.redos.push({redos:n,type:i}),this.stateSubject.next(w),this.stateHistorySubject.next({handleRedo:!1,handleUndo:!0})}applyPatch(r,n){return n.reverse().reduce((i,o)=>Ui(i,c=>{Li(c,[o])}),r)}redo(){const r=this.redos.pop(),n=r==null?void 0:r.redos,i=r==null?void 0:r.type;if(!n||!i)return;Jn();const{trackItemDetailsMap:o,trackItemIds:c,tracks:l,transitionIds:d,transitionsMap:O,trackItemsMap:R}=this.getState(),S=rt({trackItemDetailsMap:o,trackItemIds:c,tracks:l,transitionIds:d,transitionsMap:O,trackItemsMap:R}),U=[],m=[],p=[],h=[],f=[],b=[];n.forEach(T=>{let M;const z=T.path.slice(1);T.type==="CREATE"?M={path:z,op:"add",value:T.value}:T.type==="CHANGE"?M={path:z,op:"replace",value:T.value}:M={path:z,op:"remove",value:T.oldValue},T.path.includes("trackItemIds")?p.push(M):T.path.includes("transitionIds")?m.push(M):T.path.includes("trackItemsMap")?f.push(M):T.path.includes("transitionsMap")?h.push(M):T.path.includes("trackItemDetailsMap")?b.push(M):U.push(M)});const v=this.applyPatch(S.tracks,U),_=this.applyPatch(S.transitionIds,m),g=this.applyPatch(S.trackItemIds,p),y=this.applyPatch(S.transitionsMap,h),F=this.applyPatch(S.trackItemsMap,f),E=this.applyPatch(S.trackItemDetailsMap,b),x=rt({tracks:v,transitionIds:_,trackItemIds:g,transitionsMap:y,trackItemsMap:F,trackItemDetailsMap:E}),C=rt(this.getState()),w={...C,...x};this.prevState=C,this.undos.push({undos:n,type:i}),this.stateSubject.next(w),this.stateHistorySubject.next({handleRedo:!0,handleUndo:!1})}}return _a});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { IAudio, IBoxShadow,
|
1
|
+
import { IAudio, IBoxShadow, IDisplay, IImage, IText, ITrackItem, ITrim, IVideo, IVideoDetails } from '@designcombo/types';
|
2
2
|
|
3
3
|
type OptionsType = {
|
4
4
|
size: {
|
@@ -69,7 +69,7 @@ export declare const loadImageItem: (payload: ITrackItem & IImage, options: {
|
|
69
69
|
};
|
70
70
|
metadata: Record<string, any>;
|
71
71
|
}>;
|
72
|
-
export declare const loadCaptionItem: (
|
72
|
+
export declare const loadCaptionItem: (trackItem: ITrackItem, options: {
|
73
73
|
origin?: number;
|
74
74
|
size?: {
|
75
75
|
width: number;
|
@@ -94,6 +94,7 @@ export declare const loadCaptionItem: (payload: ITrackItem & ICaption, options:
|
|
94
94
|
y: number;
|
95
95
|
blur: number;
|
96
96
|
};
|
97
|
+
words: import('@designcombo/types').ICaptionWord[];
|
97
98
|
fontSize: number;
|
98
99
|
fontFamily: string;
|
99
100
|
color: string;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@designcombo/state",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.16",
|
4
4
|
"private": false,
|
5
5
|
"files": [
|
6
6
|
"dist"
|
@@ -24,9 +24,9 @@
|
|
24
24
|
"typescript": "^5.3.3",
|
25
25
|
"vite": "^5.2.0",
|
26
26
|
"vite-plugin-dts": "^3.9.1",
|
27
|
-
"@designcombo/events": "0.1.
|
28
|
-
"@designcombo/
|
29
|
-
"@designcombo/
|
27
|
+
"@designcombo/events": "0.1.16",
|
28
|
+
"@designcombo/types": "0.1.16",
|
29
|
+
"@designcombo/typescript-config": "0.0.0"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
32
|
"immer": "^10.1.1",
|
@@ -38,8 +38,8 @@
|
|
38
38
|
"nanoid": "^5.0.7"
|
39
39
|
},
|
40
40
|
"peerDependencies": {
|
41
|
-
"@designcombo/events": "0.1.
|
42
|
-
"@designcombo/types": "0.1.
|
41
|
+
"@designcombo/events": "0.1.16",
|
42
|
+
"@designcombo/types": "0.1.16"
|
43
43
|
},
|
44
44
|
"scripts": {
|
45
45
|
"dev": "vite",
|