@cliquify.me/state 4.0.17 → 4.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -101,10 +101,10 @@ var Ar = function() {
101
101
  }
102
102
  else
103
103
  c.remove(this);
104
- var m = this.initialTeardown;
105
- if (Ct(m))
104
+ var h = this.initialTeardown;
105
+ if (Ct(h))
106
106
  try {
107
- m();
107
+ h();
108
108
  } catch (k) {
109
109
  o = k instanceof pn ? k.errors : [k];
110
110
  }
@@ -112,7 +112,7 @@ var Ar = function() {
112
112
  if (b) {
113
113
  this._finalizers = null;
114
114
  try {
115
- for (var h = kn(b), I = h.next(); !I.done; I = h.next()) {
115
+ for (var m = kn(b), I = m.next(); !I.done; I = m.next()) {
116
116
  var _ = I.value;
117
117
  try {
118
118
  Un(_);
@@ -124,7 +124,7 @@ var Ar = function() {
124
124
  n = { error: k };
125
125
  } finally {
126
126
  try {
127
- I && !I.done && (i = h.return) && i.call(h);
127
+ I && !I.done && (i = m.return) && i.call(m);
128
128
  } finally {
129
129
  if (n) throw n.error;
130
130
  }
@@ -492,15 +492,15 @@ function Cn(t) {
492
492
  var vr = { exports: {} };
493
493
  vr.exports;
494
494
  (function(t, r) {
495
- var e = 200, n = "__lodash_hash_undefined__", i = 1, o = 2, c = 9007199254740991, u = "[object Arguments]", d = "[object Array]", p = "[object AsyncFunction]", m = "[object Boolean]", b = "[object Date]", h = "[object Error]", I = "[object Function]", _ = "[object GeneratorFunction]", k = "[object Map]", w = "[object Number]", f = "[object Null]", y = "[object Object]", v = "[object Promise]", S = "[object Proxy]", A = "[object RegExp]", E = "[object Set]", T = "[object String]", H = "[object Symbol]", R = "[object Undefined]", V = "[object WeakMap]", x = "[object ArrayBuffer]", F = "[object DataView]", tt = "[object Float32Array]", Gt = "[object Float64Array]", Xt = "[object Int8Array]", Ie = "[object Int16Array]", be = "[object Int32Array]", ke = "[object Uint8Array]", ve = "[object Uint8ClampedArray]", z = "[object Uint16Array]", _e = "[object Uint32Array]", Se = /[\\^$.*+?()[\]{}|]/g, st = /^\[object .+?Constructor\]$/, Kt = /^(?:0|[1-9]\d*)$/, $ = {};
496
- $[tt] = $[Gt] = $[Xt] = $[Ie] = $[be] = $[ke] = $[ve] = $[z] = $[_e] = !0, $[u] = $[d] = $[x] = $[m] = $[F] = $[b] = $[h] = $[I] = $[k] = $[w] = $[y] = $[A] = $[E] = $[T] = $[V] = !1;
497
- var Vt = typeof dt == "object" && dt && dt.Object === Object && dt, we = typeof self == "object" && self && self.Object === Object && self, it = Vt || we || Function("return this")(), qt = r && !r.nodeType && r, Jt = qt && !0 && t && !t.nodeType && t, Rt = Jt && Jt.exports === qt, Pt = Rt && Vt.process, Zt = function() {
495
+ var e = 200, n = "__lodash_hash_undefined__", i = 1, o = 2, c = 9007199254740991, u = "[object Arguments]", d = "[object Array]", p = "[object AsyncFunction]", h = "[object Boolean]", b = "[object Date]", m = "[object Error]", I = "[object Function]", _ = "[object GeneratorFunction]", k = "[object Map]", w = "[object Number]", f = "[object Null]", y = "[object Object]", v = "[object Promise]", S = "[object Proxy]", A = "[object RegExp]", E = "[object Set]", T = "[object String]", H = "[object Symbol]", R = "[object Undefined]", V = "[object WeakMap]", x = "[object ArrayBuffer]", F = "[object DataView]", tt = "[object Float32Array]", Xt = "[object Float64Array]", Kt = "[object Int8Array]", Ie = "[object Int16Array]", be = "[object Int32Array]", ke = "[object Uint8Array]", ve = "[object Uint8ClampedArray]", z = "[object Uint16Array]", _e = "[object Uint32Array]", Se = /[\\^$.*+?()[\]{}|]/g, st = /^\[object .+?Constructor\]$/, Vt = /^(?:0|[1-9]\d*)$/, $ = {};
496
+ $[tt] = $[Xt] = $[Kt] = $[Ie] = $[be] = $[ke] = $[ve] = $[z] = $[_e] = !0, $[u] = $[d] = $[x] = $[h] = $[F] = $[b] = $[m] = $[I] = $[k] = $[w] = $[y] = $[A] = $[E] = $[T] = $[V] = !1;
497
+ var qt = typeof dt == "object" && dt && dt.Object === Object && dt, we = typeof self == "object" && self && self.Object === Object && self, it = qt || we || Function("return this")(), Jt = r && !r.nodeType && r, Zt = Jt && !0 && t && !t.nodeType && t, Rt = Zt && Zt.exports === Jt, Pt = Rt && qt.process, Qt = function() {
498
498
  try {
499
499
  return Pt && Pt.binding && Pt.binding("util");
500
500
  } catch {
501
501
  }
502
- }(), Dt = Zt && Zt.isTypedArray;
503
- function Qt(s, a) {
502
+ }(), Dt = Qt && Qt.isTypedArray;
503
+ function te(s, a) {
504
504
  for (var l = -1, g = s == null ? 0 : s.length, O = 0, M = []; ++l < g; ) {
505
505
  var D = s[l];
506
506
  a(D, l, s) && (M[O++] = D);
@@ -512,7 +512,7 @@ vr.exports;
512
512
  s[O + l] = a[l];
513
513
  return s;
514
514
  }
515
- function te(s, a) {
515
+ function ee(s, a) {
516
516
  for (var l = -1, g = s == null ? 0 : s.length; ++l < g; )
517
517
  if (a(s[l], l, s))
518
518
  return !0;
@@ -534,13 +534,13 @@ vr.exports;
534
534
  function $t(s, a) {
535
535
  return s == null ? void 0 : s[a];
536
536
  }
537
- function ee(s) {
537
+ function re(s) {
538
538
  var a = -1, l = Array(s.size);
539
539
  return s.forEach(function(g, O) {
540
540
  l[++a] = [O, g];
541
541
  }), l;
542
542
  }
543
- function re(s, a) {
543
+ function ne(s, a) {
544
544
  return function(l) {
545
545
  return s(a(l));
546
546
  };
@@ -551,13 +551,13 @@ vr.exports;
551
551
  l[++a] = g;
552
552
  }), l;
553
553
  }
554
- var St = Array.prototype, Ee = Function.prototype, gt = Object.prototype, wt = it["__core-js_shared__"], Ft = Ee.toString, et = gt.hasOwnProperty, ne = function() {
554
+ var St = Array.prototype, Ee = Function.prototype, gt = Object.prototype, wt = it["__core-js_shared__"], Ft = Ee.toString, et = gt.hasOwnProperty, se = function() {
555
555
  var s = /[^.]+$/.exec(wt && wt.keys && wt.keys.IE_PROTO || "");
556
556
  return s ? "Symbol(src)_1." + s : "";
557
- }(), se = gt.toString, Me = RegExp(
557
+ }(), ie = gt.toString, Me = RegExp(
558
558
  "^" + Ft.call(et).replace(Se, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
559
- ), Lt = Rt ? it.Buffer : void 0, Tt = it.Symbol, ie = it.Uint8Array, At = gt.propertyIsEnumerable, yt = St.splice, ht = Tt ? Tt.toStringTag : void 0, xe = Object.getOwnPropertySymbols, Fe = Lt ? Lt.isBuffer : void 0, ae = re(Object.keys, Object), Le = Mt(it, "DataView"), oe = Mt(it, "Map"), Ne = Mt(it, "Promise"), He = Mt(it, "Set"), Ue = Mt(it, "WeakMap"), Nt = Mt(Object, "create"), ar = rt(Le), Et = rt(oe), xr = rt(Ne), Or = rt(He), Cr = rt(Ue), or = Tt ? Tt.prototype : void 0, je = or ? or.valueOf : void 0;
560
- function Y(s) {
559
+ ), Lt = Rt ? it.Buffer : void 0, Tt = it.Symbol, ae = it.Uint8Array, At = gt.propertyIsEnumerable, yt = St.splice, ht = Tt ? Tt.toStringTag : void 0, xe = Object.getOwnPropertySymbols, Fe = Lt ? Lt.isBuffer : void 0, oe = ne(Object.keys, Object), Le = Mt(it, "DataView"), ce = Mt(it, "Map"), Ne = Mt(it, "Promise"), He = Mt(it, "Set"), Ue = Mt(it, "WeakMap"), Nt = Mt(Object, "create"), ar = rt(Le), Et = rt(ce), xr = rt(Ne), Or = rt(He), Cr = rt(Ue), or = Tt ? Tt.prototype : void 0, je = or ? or.valueOf : void 0;
560
+ function G(s) {
561
561
  var a = -1, l = s == null ? 0 : s.length;
562
562
  for (this.clear(); ++a < l; ) {
563
563
  var g = s[a];
@@ -587,7 +587,7 @@ vr.exports;
587
587
  var l = this.__data__;
588
588
  return this.size += this.has(s) ? 0 : 1, l[s] = Nt && a === void 0 ? n : a, this;
589
589
  }
590
- Y.prototype.clear = Rr, Y.prototype.delete = Pr, Y.prototype.get = Dr, Y.prototype.has = zr, Y.prototype.set = $r;
590
+ G.prototype.clear = Rr, G.prototype.delete = Pr, G.prototype.get = Dr, G.prototype.has = zr, G.prototype.set = $r;
591
591
  function q(s) {
592
592
  var a = -1, l = s == null ? 0 : s.length;
593
593
  for (this.clear(); ++a < l; ) {
@@ -626,9 +626,9 @@ vr.exports;
626
626
  }
627
627
  function jr() {
628
628
  this.size = 0, this.__data__ = {
629
- hash: new Y(),
630
- map: new (oe || q)(),
631
- string: new Y()
629
+ hash: new G(),
630
+ map: new (ce || q)(),
631
+ string: new G()
632
632
  };
633
633
  }
634
634
  function Wr(s) {
@@ -679,7 +679,7 @@ vr.exports;
679
679
  var l = this.__data__;
680
680
  if (l instanceof q) {
681
681
  var g = l.__data__;
682
- if (!oe || g.length < e - 1)
682
+ if (!ce || g.length < e - 1)
683
683
  return g.push([s, a]), this.size = ++l.size, this;
684
684
  l = this.__data__ = new at(g);
685
685
  }
@@ -706,11 +706,11 @@ vr.exports;
706
706
  var g = a(s);
707
707
  return Pe(s) ? g : zt(g, l(s));
708
708
  }
709
- function ce(s) {
709
+ function ue(s) {
710
710
  return s == null ? s === void 0 ? R : f : ht && ht in Object(s) ? xt(s) : dr(s);
711
711
  }
712
712
  function ur(s) {
713
- return kt(s) && ce(s) == u;
713
+ return kt(s) && ue(s) == u;
714
714
  }
715
715
  function lr(s, a, l, g, O) {
716
716
  return s === a ? !0 : s == null || a == null || !kt(s) && !kt(a) ? s !== s && a !== a : Zr(s, a, l, g, lr, O);
@@ -727,9 +727,9 @@ vr.exports;
727
727
  if (j && !J)
728
728
  return M || (M = new It()), D || gr(s) ? Ye(s, a, l, g, O, M) : rn(s, a, U, l, g, O, M);
729
729
  if (!(l & i)) {
730
- var Z = J && et.call(s, "__wrapped__"), G = ot && et.call(a, "__wrapped__");
731
- if (Z || G) {
732
- var Ht = Z ? s.value() : s, Ot = G ? a.value() : a;
730
+ var Z = J && et.call(s, "__wrapped__"), X = ot && et.call(a, "__wrapped__");
731
+ if (Z || X) {
732
+ var Ht = Z ? s.value() : s, Ot = X ? a.value() : a;
733
733
  return M || (M = new It()), O(Ht, Ot, l, g, M);
734
734
  }
735
735
  }
@@ -742,11 +742,11 @@ vr.exports;
742
742
  return a.test(rt(s));
743
743
  }
744
744
  function tn(s) {
745
- return kt(s) && Xe(s.length) && !!$[ce(s)];
745
+ return kt(s) && Xe(s.length) && !!$[ue(s)];
746
746
  }
747
747
  function en(s) {
748
748
  if (!un(s))
749
- return ae(s);
749
+ return oe(s);
750
750
  var a = [];
751
751
  for (var l in Object(s))
752
752
  et.call(s, l) && l != "constructor" && a.push(l);
@@ -761,9 +761,9 @@ vr.exports;
761
761
  return L == a;
762
762
  var J = -1, ot = !0, j = l & o ? new Oe() : void 0;
763
763
  for (M.set(s, a), M.set(a, s); ++J < P; ) {
764
- var Z = s[J], G = a[J];
764
+ var Z = s[J], X = a[J];
765
765
  if (g)
766
- var Ht = D ? g(G, Z, J, a, s, M) : g(Z, G, J, s, a, M);
766
+ var Ht = D ? g(X, Z, J, a, s, M) : g(Z, X, J, s, a, M);
767
767
  if (Ht !== void 0) {
768
768
  if (Ht)
769
769
  continue;
@@ -771,14 +771,14 @@ vr.exports;
771
771
  break;
772
772
  }
773
773
  if (j) {
774
- if (!te(a, function(Ot, le) {
775
- if (!_t(j, le) && (Z === Ot || O(Z, Ot, l, g, M)))
776
- return j.push(le);
774
+ if (!ee(a, function(Ot, de) {
775
+ if (!_t(j, de) && (Z === Ot || O(Z, Ot, l, g, M)))
776
+ return j.push(de);
777
777
  })) {
778
778
  ot = !1;
779
779
  break;
780
780
  }
781
- } else if (!(Z === G || O(Z, G, l, g, M))) {
781
+ } else if (!(Z === X || O(Z, X, l, g, M))) {
782
782
  ot = !1;
783
783
  break;
784
784
  }
@@ -792,18 +792,18 @@ vr.exports;
792
792
  return !1;
793
793
  s = s.buffer, a = a.buffer;
794
794
  case x:
795
- return !(s.byteLength != a.byteLength || !M(new ie(s), new ie(a)));
796
- case m:
795
+ return !(s.byteLength != a.byteLength || !M(new ae(s), new ae(a)));
796
+ case h:
797
797
  case b:
798
798
  case w:
799
799
  return fr(+s, +a);
800
- case h:
800
+ case m:
801
801
  return s.name == a.name && s.message == a.message;
802
802
  case A:
803
803
  case T:
804
804
  return s == a + "";
805
805
  case k:
806
- var P = ee;
806
+ var P = re;
807
807
  case E:
808
808
  var U = g & i;
809
809
  if (P || (P = ct), s.size != a.size && !U)
@@ -821,7 +821,7 @@ vr.exports;
821
821
  return !1;
822
822
  }
823
823
  function nn(s, a, l, g, O, M) {
824
- var D = l & i, P = ue(s), U = P.length, L = ue(a), J = L.length;
824
+ var D = l & i, P = le(s), U = P.length, L = le(a), J = L.length;
825
825
  if (U != J && !D)
826
826
  return !1;
827
827
  for (var ot = U; ot--; ) {
@@ -832,26 +832,26 @@ vr.exports;
832
832
  var Z = M.get(s);
833
833
  if (Z && M.get(a))
834
834
  return Z == a;
835
- var G = !0;
835
+ var X = !0;
836
836
  M.set(s, a), M.set(a, s);
837
837
  for (var Ht = D; ++ot < U; ) {
838
838
  j = P[ot];
839
- var Ot = s[j], le = a[j];
839
+ var Ot = s[j], de = a[j];
840
840
  if (g)
841
- var Hn = D ? g(le, Ot, j, a, s, M) : g(Ot, le, j, s, a, M);
842
- if (!(Hn === void 0 ? Ot === le || O(Ot, le, l, g, M) : Hn)) {
843
- G = !1;
841
+ var Hn = D ? g(de, Ot, j, a, s, M) : g(Ot, de, j, s, a, M);
842
+ if (!(Hn === void 0 ? Ot === de || O(Ot, de, l, g, M) : Hn)) {
843
+ X = !1;
844
844
  break;
845
845
  }
846
846
  Ht || (Ht = j == "constructor");
847
847
  }
848
- if (G && !Ht) {
848
+ if (X && !Ht) {
849
849
  var yr = s.constructor, Ir = a.constructor;
850
- yr != Ir && "constructor" in s && "constructor" in a && !(typeof yr == "function" && yr instanceof yr && typeof Ir == "function" && Ir instanceof Ir) && (G = !1);
850
+ yr != Ir && "constructor" in s && "constructor" in a && !(typeof yr == "function" && yr instanceof yr && typeof Ir == "function" && Ir instanceof Ir) && (X = !1);
851
851
  }
852
- return M.delete(s), M.delete(a), G;
852
+ return M.delete(s), M.delete(a), X;
853
853
  }
854
- function ue(s) {
854
+ function le(s) {
855
855
  return Be(s, Ke, sn);
856
856
  }
857
857
  function mt(s, a) {
@@ -869,16 +869,16 @@ vr.exports;
869
869
  var g = !0;
870
870
  } catch {
871
871
  }
872
- var O = se.call(s);
872
+ var O = ie.call(s);
873
873
  return g && (a ? s[ht] = l : delete s[ht]), O;
874
874
  }
875
875
  var sn = xe ? function(s) {
876
- return s == null ? [] : (s = Object(s), Qt(xe(s), function(a) {
876
+ return s == null ? [] : (s = Object(s), te(xe(s), function(a) {
877
877
  return At.call(s, a);
878
878
  }));
879
- } : dn, bt = ce;
880
- (Le && bt(new Le(new ArrayBuffer(1))) != F || oe && bt(new oe()) != k || Ne && bt(Ne.resolve()) != v || He && bt(new He()) != E || Ue && bt(new Ue()) != V) && (bt = function(s) {
881
- var a = ce(s), l = a == y ? s.constructor : void 0, g = l ? rt(l) : "";
879
+ } : dn, bt = ue;
880
+ (Le && bt(new Le(new ArrayBuffer(1))) != F || ce && bt(new ce()) != k || Ne && bt(Ne.resolve()) != v || He && bt(new He()) != E || Ue && bt(new Ue()) != V) && (bt = function(s) {
881
+ var a = ue(s), l = a == y ? s.constructor : void 0, g = l ? rt(l) : "";
882
882
  if (g)
883
883
  switch (g) {
884
884
  case ar:
@@ -895,21 +895,21 @@ vr.exports;
895
895
  return a;
896
896
  });
897
897
  function an(s, a) {
898
- return a = a ?? c, !!a && (typeof s == "number" || Kt.test(s)) && s > -1 && s % 1 == 0 && s < a;
898
+ return a = a ?? c, !!a && (typeof s == "number" || Vt.test(s)) && s > -1 && s % 1 == 0 && s < a;
899
899
  }
900
900
  function on(s) {
901
901
  var a = typeof s;
902
902
  return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? s !== "__proto__" : s === null;
903
903
  }
904
904
  function cn(s) {
905
- return !!ne && ne in s;
905
+ return !!se && se in s;
906
906
  }
907
907
  function un(s) {
908
908
  var a = s && s.constructor, l = typeof a == "function" && a.prototype || gt;
909
909
  return s === l;
910
910
  }
911
911
  function dr(s) {
912
- return se.call(s);
912
+ return ie.call(s);
913
913
  }
914
914
  function rt(s) {
915
915
  if (s != null) {
@@ -942,7 +942,7 @@ vr.exports;
942
942
  function hr(s) {
943
943
  if (!mr(s))
944
944
  return !1;
945
- var a = ce(s);
945
+ var a = ue(s);
946
946
  return a == I || a == _ || a == p || a == S;
947
947
  }
948
948
  function Xe(s) {
@@ -968,25 +968,25 @@ vr.exports;
968
968
  t.exports = ln;
969
969
  })(vr, vr.exports);
970
970
  var Zs = vr.exports;
971
- const W = /* @__PURE__ */ Cn(Zs), Io = "add", Qs = "track", ti = "trackItems", bo = `${Qs}:changed`, ko = `${ti}:changed`, ei = "state", vo = `${ei}:changed`, ri = "bulk", Xn = `${ri}:edit`, Rn = "design", ni = `${Rn}:load`, si = `${Rn}:resize`, N = "add", ii = `${N}:text`, ai = `${N}:video`, oi = `${N}:audio`, _o = `${N}:placeholder`, ci = `${N}:image`, ui = `${N}:illustration`, li = `${N}:shape`, So = `${N}:mask`, wo = `${N}:transition`, di = `${N}:animation`, fi = `${N}:caption`, pi = `${N}:template`, hi = `${N}:items`, mi = `${N}:composition`, gi = `${N}:progressBar`, yi = `${N}:progressFrame`, Ii = `${N}:radialAudioBars`, bi = `${N}:linealAudioBars`, ki = `${N}:progressSquare`, vi = `${N}:waveAudioBars`, _i = `${N}:hillAudioBars`, Si = `${N}:rect`, Yt = "edit", wi = `${Yt}:object`, Ti = `${Yt}:replaceMedia`, To = `${Yt}:text`, Ao = `${Yt}:shape`, Eo = `${Yt}:templateItem`, Mo = `${Yt}:deleteTemplateItem`, Ai = `${Yt}:backgroundEditor`, xo = "enterEditMode", ze = "active", Oo = `${ze}:set`, Co = `${ze}:delete`, Ei = `${ze}:paste`, Ro = `${ze}:clone`, Mi = `${ze}:split`, Q = "layer", Po = `${Q}:locked`, Do = `${Q}:hidden`, zo = `${Q}:move`, xi = `${Q}:select`, $o = `${Q}:selection`, Fo = `${Q}:sendTo`, Lo = `${Q}:rename`, No = `${Q}:editingName`, Oi = `${Q}:copy`, Ho = `${Q}:paste`, Ci = `${Q}:clone`, Uo = `${Q}:split`, jo = `${Q}:cut`, Ri = `${Q}:delete`, Pi = `${Q}:replace`, Er = "history", Di = `${Er}:undo`, zi = `${Er}:redo`, Wo = `${Er}:reset`, ds = "scale", $i = `${ds}:changed`;
971
+ const W = /* @__PURE__ */ Cn(Zs), Io = "add", Qs = "track", ti = "trackItems", bo = `${Qs}:changed`, ko = `${ti}:changed`, ei = "state", vo = `${ei}:changed`, ri = "bulk", Xn = `${ri}:edit`, Rn = "design", ni = `${Rn}:load`, si = `${Rn}:resize`, N = "add", ii = `${N}:text`, ai = `${N}:video`, oi = `${N}:audio`, _o = `${N}:placeholder`, ci = `${N}:image`, ui = `${N}:illustration`, li = `${N}:shape`, So = `${N}:mask`, wo = `${N}:transition`, di = `${N}:animation`, fi = `${N}:caption`, pi = `${N}:template`, hi = `${N}:items`, mi = `${N}:composition`, gi = `${N}:progressBar`, yi = `${N}:progressFrame`, Ii = `${N}:radialAudioBars`, bi = `${N}:linealAudioBars`, ki = `${N}:progressSquare`, vi = `${N}:waveAudioBars`, _i = `${N}:hillAudioBars`, Si = `${N}:rect`, Gt = "edit", wi = `${Gt}:object`, Ti = `${Gt}:replaceMedia`, To = `${Gt}:text`, Ao = `${Gt}:shape`, Eo = `${Gt}:templateItem`, Mo = `${Gt}:deleteTemplateItem`, Ai = `${Gt}:backgroundEditor`, xo = "enterEditMode", ze = "active", Oo = `${ze}:set`, Co = `${ze}:delete`, Ei = `${ze}:paste`, Ro = `${ze}:clone`, Mi = `${ze}:split`, Q = "layer", Po = `${Q}:locked`, Do = `${Q}:hidden`, zo = `${Q}:move`, xi = `${Q}:select`, $o = `${Q}:selection`, Fo = `${Q}:sendTo`, Lo = `${Q}:rename`, No = `${Q}:editingName`, Oi = `${Q}:copy`, Ho = `${Q}:paste`, Ci = `${Q}:clone`, Uo = `${Q}:split`, jo = `${Q}:cut`, Ri = `${Q}:delete`, Pi = `${Q}:replace`, Er = "history", Di = `${Er}:undo`, zi = `${Er}:redo`, Wo = `${Er}:reset`, ds = "scale", $i = `${ds}:changed`;
972
972
  var _r = { exports: {} };
973
973
  _r.exports;
974
974
  (function(t, r) {
975
- var e = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, o = "[object Arguments]", c = "[object Array]", u = "[object Boolean]", d = "[object Date]", p = "[object Error]", m = "[object Function]", b = "[object GeneratorFunction]", h = "[object Map]", I = "[object Number]", _ = "[object Object]", k = "[object Promise]", w = "[object RegExp]", f = "[object Set]", y = "[object String]", v = "[object Symbol]", S = "[object WeakMap]", A = "[object ArrayBuffer]", E = "[object DataView]", T = "[object Float32Array]", H = "[object Float64Array]", R = "[object Int8Array]", V = "[object Int16Array]", x = "[object Int32Array]", F = "[object Uint8Array]", tt = "[object Uint8ClampedArray]", Gt = "[object Uint16Array]", Xt = "[object Uint32Array]", Ie = /[\\^$.*+?()[\]{}|]/g, be = /\w*$/, ke = /^\[object .+?Constructor\]$/, ve = /^(?:0|[1-9]\d*)$/, z = {};
976
- z[o] = z[c] = z[A] = z[E] = z[u] = z[d] = z[T] = z[H] = z[R] = z[V] = z[x] = z[h] = z[I] = z[_] = z[w] = z[f] = z[y] = z[v] = z[F] = z[tt] = z[Gt] = z[Xt] = !0, z[p] = z[m] = z[S] = !1;
977
- var _e = typeof dt == "object" && dt && dt.Object === Object && dt, Se = typeof self == "object" && self && self.Object === Object && self, st = _e || Se || Function("return this")(), Kt = r && !r.nodeType && r, $ = Kt && !0 && t && !t.nodeType && t, Vt = $ && $.exports === Kt;
975
+ var e = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, o = "[object Arguments]", c = "[object Array]", u = "[object Boolean]", d = "[object Date]", p = "[object Error]", h = "[object Function]", b = "[object GeneratorFunction]", m = "[object Map]", I = "[object Number]", _ = "[object Object]", k = "[object Promise]", w = "[object RegExp]", f = "[object Set]", y = "[object String]", v = "[object Symbol]", S = "[object WeakMap]", A = "[object ArrayBuffer]", E = "[object DataView]", T = "[object Float32Array]", H = "[object Float64Array]", R = "[object Int8Array]", V = "[object Int16Array]", x = "[object Int32Array]", F = "[object Uint8Array]", tt = "[object Uint8ClampedArray]", Xt = "[object Uint16Array]", Kt = "[object Uint32Array]", Ie = /[\\^$.*+?()[\]{}|]/g, be = /\w*$/, ke = /^\[object .+?Constructor\]$/, ve = /^(?:0|[1-9]\d*)$/, z = {};
976
+ z[o] = z[c] = z[A] = z[E] = z[u] = z[d] = z[T] = z[H] = z[R] = z[V] = z[x] = z[m] = z[I] = z[_] = z[w] = z[f] = z[y] = z[v] = z[F] = z[tt] = z[Xt] = z[Kt] = !0, z[p] = z[h] = z[S] = !1;
977
+ var _e = typeof dt == "object" && dt && dt.Object === Object && dt, Se = typeof self == "object" && self && self.Object === Object && self, st = _e || Se || Function("return this")(), Vt = r && !r.nodeType && r, $ = Vt && !0 && t && !t.nodeType && t, qt = $ && $.exports === Vt;
978
978
  function we(s, a) {
979
979
  return s.set(a[0], a[1]), s;
980
980
  }
981
981
  function it(s, a) {
982
982
  return s.add(a), s;
983
983
  }
984
- function qt(s, a) {
984
+ function Jt(s, a) {
985
985
  for (var l = -1, g = s ? s.length : 0; ++l < g && a(s[l], l, s) !== !1; )
986
986
  ;
987
987
  return s;
988
988
  }
989
- function Jt(s, a) {
989
+ function Zt(s, a) {
990
990
  for (var l = -1, g = a.length, O = s.length; ++l < g; )
991
991
  s[O + l] = a[l];
992
992
  return s;
@@ -1001,7 +1001,7 @@ _r.exports;
1001
1001
  g[l] = a(l);
1002
1002
  return g;
1003
1003
  }
1004
- function Zt(s, a) {
1004
+ function Qt(s, a) {
1005
1005
  return s == null ? void 0 : s[a];
1006
1006
  }
1007
1007
  function Dt(s) {
@@ -1013,7 +1013,7 @@ _r.exports;
1013
1013
  }
1014
1014
  return a;
1015
1015
  }
1016
- function Qt(s) {
1016
+ function te(s) {
1017
1017
  var a = -1, l = Array(s.size);
1018
1018
  return s.forEach(function(g, O) {
1019
1019
  l[++a] = [O, g];
@@ -1024,18 +1024,18 @@ _r.exports;
1024
1024
  return s(a(l));
1025
1025
  };
1026
1026
  }
1027
- function te(s) {
1027
+ function ee(s) {
1028
1028
  var a = -1, l = Array(s.size);
1029
1029
  return s.forEach(function(g) {
1030
1030
  l[++a] = g;
1031
1031
  }), l;
1032
1032
  }
1033
- var Te = Array.prototype, Ae = Function.prototype, _t = Object.prototype, $t = st["__core-js_shared__"], ee = function() {
1033
+ var Te = Array.prototype, Ae = Function.prototype, _t = Object.prototype, $t = st["__core-js_shared__"], re = function() {
1034
1034
  var s = /[^.]+$/.exec($t && $t.keys && $t.keys.IE_PROTO || "");
1035
1035
  return s ? "Symbol(src)_1." + s : "";
1036
- }(), re = Ae.toString, ct = _t.hasOwnProperty, St = _t.toString, Ee = RegExp(
1037
- "^" + re.call(ct).replace(Ie, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1038
- ), gt = Vt ? st.Buffer : void 0, wt = st.Symbol, Ft = st.Uint8Array, et = zt(Object.getPrototypeOf, Object), ne = Object.create, se = _t.propertyIsEnumerable, Me = Te.splice, Lt = Object.getOwnPropertySymbols, Tt = gt ? gt.isBuffer : void 0, ie = zt(Object.keys, Object), At = mt(st, "DataView"), yt = mt(st, "Map"), ht = mt(st, "Promise"), xe = mt(st, "Set"), Fe = mt(st, "WeakMap"), ae = mt(Object, "create"), Le = rt(At), oe = rt(yt), Ne = rt(ht), He = rt(xe), Ue = rt(Fe), Nt = wt ? wt.prototype : void 0, ar = Nt ? Nt.valueOf : void 0;
1036
+ }(), ne = Ae.toString, ct = _t.hasOwnProperty, St = _t.toString, Ee = RegExp(
1037
+ "^" + ne.call(ct).replace(Ie, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1038
+ ), gt = qt ? st.Buffer : void 0, wt = st.Symbol, Ft = st.Uint8Array, et = zt(Object.getPrototypeOf, Object), se = Object.create, ie = _t.propertyIsEnumerable, Me = Te.splice, Lt = Object.getOwnPropertySymbols, Tt = gt ? gt.isBuffer : void 0, ae = zt(Object.keys, Object), At = mt(st, "DataView"), yt = mt(st, "Map"), ht = mt(st, "Promise"), xe = mt(st, "Set"), Fe = mt(st, "WeakMap"), oe = mt(Object, "create"), Le = rt(At), ce = rt(yt), Ne = rt(ht), He = rt(xe), Ue = rt(Fe), Nt = wt ? wt.prototype : void 0, ar = Nt ? Nt.valueOf : void 0;
1039
1039
  function Et(s) {
1040
1040
  var a = -1, l = s ? s.length : 0;
1041
1041
  for (this.clear(); ++a < l; ) {
@@ -1044,14 +1044,14 @@ _r.exports;
1044
1044
  }
1045
1045
  }
1046
1046
  function xr() {
1047
- this.__data__ = ae ? ae(null) : {};
1047
+ this.__data__ = oe ? oe(null) : {};
1048
1048
  }
1049
1049
  function Or(s) {
1050
1050
  return this.has(s) && delete this.__data__[s];
1051
1051
  }
1052
1052
  function Cr(s) {
1053
1053
  var a = this.__data__;
1054
- if (ae) {
1054
+ if (oe) {
1055
1055
  var l = a[s];
1056
1056
  return l === n ? void 0 : l;
1057
1057
  }
@@ -1059,14 +1059,14 @@ _r.exports;
1059
1059
  }
1060
1060
  function or(s) {
1061
1061
  var a = this.__data__;
1062
- return ae ? a[s] !== void 0 : ct.call(a, s);
1062
+ return oe ? a[s] !== void 0 : ct.call(a, s);
1063
1063
  }
1064
1064
  function je(s, a) {
1065
1065
  var l = this.__data__;
1066
- return l[s] = ae && a === void 0 ? n : a, this;
1066
+ return l[s] = oe && a === void 0 ? n : a, this;
1067
1067
  }
1068
1068
  Et.prototype.clear = xr, Et.prototype.delete = Or, Et.prototype.get = Cr, Et.prototype.has = or, Et.prototype.set = je;
1069
- function Y(s) {
1069
+ function G(s) {
1070
1070
  var a = -1, l = s ? s.length : 0;
1071
1071
  for (this.clear(); ++a < l; ) {
1072
1072
  var g = s[a];
@@ -1094,7 +1094,7 @@ _r.exports;
1094
1094
  var l = this.__data__, g = Ce(l, s);
1095
1095
  return g < 0 ? l.push([s, a]) : l[g][1] = a, this;
1096
1096
  }
1097
- Y.prototype.clear = Rr, Y.prototype.delete = Pr, Y.prototype.get = Dr, Y.prototype.has = zr, Y.prototype.set = $r;
1097
+ G.prototype.clear = Rr, G.prototype.delete = Pr, G.prototype.get = Dr, G.prototype.has = zr, G.prototype.set = $r;
1098
1098
  function q(s) {
1099
1099
  var a = -1, l = s ? s.length : 0;
1100
1100
  for (this.clear(); ++a < l; ) {
@@ -1105,28 +1105,28 @@ _r.exports;
1105
1105
  function Fr() {
1106
1106
  this.__data__ = {
1107
1107
  hash: new Et(),
1108
- map: new (yt || Y)(),
1108
+ map: new (yt || G)(),
1109
1109
  string: new Et()
1110
1110
  };
1111
1111
  }
1112
1112
  function Lr(s) {
1113
- return ue(this, s).delete(s);
1113
+ return le(this, s).delete(s);
1114
1114
  }
1115
1115
  function Nr(s) {
1116
- return ue(this, s).get(s);
1116
+ return le(this, s).get(s);
1117
1117
  }
1118
1118
  function Hr(s) {
1119
- return ue(this, s).has(s);
1119
+ return le(this, s).has(s);
1120
1120
  }
1121
1121
  function Ur(s, a) {
1122
- return ue(this, s).set(s, a), this;
1122
+ return le(this, s).set(s, a), this;
1123
1123
  }
1124
1124
  q.prototype.clear = Fr, q.prototype.delete = Lr, q.prototype.get = Nr, q.prototype.has = Hr, q.prototype.set = Ur;
1125
1125
  function at(s) {
1126
- this.__data__ = new Y(s);
1126
+ this.__data__ = new G(s);
1127
1127
  }
1128
1128
  function jr() {
1129
- this.__data__ = new Y();
1129
+ this.__data__ = new G();
1130
1130
  }
1131
1131
  function Wr(s) {
1132
1132
  return this.__data__.delete(s);
@@ -1139,7 +1139,7 @@ _r.exports;
1139
1139
  }
1140
1140
  function Gr(s, a) {
1141
1141
  var l = this.__data__;
1142
- if (l instanceof Y) {
1142
+ if (l instanceof G) {
1143
1143
  var g = l.__data__;
1144
1144
  if (!yt || g.length < e - 1)
1145
1145
  return g.push([s, a]), this;
@@ -1178,7 +1178,7 @@ _r.exports;
1178
1178
  if (P = sn(s), !a)
1179
1179
  return en(s, P);
1180
1180
  } else {
1181
- var L = xt(s), J = L == m || L == b;
1181
+ var L = xt(s), J = L == h || L == b;
1182
1182
  if (hr(s))
1183
1183
  return Re(s, a);
1184
1184
  if (L == _ || L == o || J && !M) {
@@ -1198,16 +1198,16 @@ _r.exports;
1198
1198
  return ot;
1199
1199
  if (D.set(s, P), !U)
1200
1200
  var j = l ? nn(s) : Ke(s);
1201
- return qt(j || s, function(Z, G) {
1202
- j && (G = Z, Z = s[G]), cr(P, G, We(Z, a, l, g, G, s, D));
1201
+ return Jt(j || s, function(Z, X) {
1202
+ j && (X = Z, Z = s[X]), cr(P, X, We(Z, a, l, g, X, s, D));
1203
1203
  }), P;
1204
1204
  }
1205
1205
  function Xr(s) {
1206
- return kt(s) ? ne(s) : {};
1206
+ return kt(s) ? se(s) : {};
1207
1207
  }
1208
1208
  function Kr(s, a, l) {
1209
1209
  var g = a(s);
1210
- return Ge(s) ? g : Jt(g, l(s));
1210
+ return Ge(s) ? g : Zt(g, l(s));
1211
1211
  }
1212
1212
  function Vr(s) {
1213
1213
  return St.call(s);
@@ -1220,7 +1220,7 @@ _r.exports;
1220
1220
  }
1221
1221
  function Jr(s) {
1222
1222
  if (!dr(s))
1223
- return ie(s);
1223
+ return ae(s);
1224
1224
  var a = [];
1225
1225
  for (var l in Object(s))
1226
1226
  ct.call(s, l) && l != "constructor" && a.push(l);
@@ -1236,12 +1236,12 @@ _r.exports;
1236
1236
  var a = new s.constructor(s.byteLength);
1237
1237
  return new Ft(a).set(new Ft(s)), a;
1238
1238
  }
1239
- function ce(s, a) {
1239
+ function ue(s, a) {
1240
1240
  var l = a ? Be(s.buffer) : s.buffer;
1241
1241
  return new s.constructor(l, s.byteOffset, s.byteLength);
1242
1242
  }
1243
1243
  function ur(s, a, l) {
1244
- var g = a ? l(Qt(s), !0) : Qt(s);
1244
+ var g = a ? l(te(s), !0) : te(s);
1245
1245
  return Rt(g, we, new s.constructor());
1246
1246
  }
1247
1247
  function lr(s) {
@@ -1249,7 +1249,7 @@ _r.exports;
1249
1249
  return a.lastIndex = s.lastIndex, a;
1250
1250
  }
1251
1251
  function Zr(s, a, l) {
1252
- var g = a ? l(te(s), !0) : te(s);
1252
+ var g = a ? l(ee(s), !0) : ee(s);
1253
1253
  return Rt(g, it, new s.constructor());
1254
1254
  }
1255
1255
  function Qr(s) {
@@ -1279,23 +1279,23 @@ _r.exports;
1279
1279
  function nn(s) {
1280
1280
  return Kr(s, Ke, Mt);
1281
1281
  }
1282
- function ue(s, a) {
1282
+ function le(s, a) {
1283
1283
  var l = s.__data__;
1284
1284
  return cn(a) ? l[typeof a == "string" ? "string" : "hash"] : l.map;
1285
1285
  }
1286
1286
  function mt(s, a) {
1287
- var l = Zt(s, a);
1287
+ var l = Qt(s, a);
1288
1288
  return qr(l) ? l : void 0;
1289
1289
  }
1290
1290
  var Mt = Lt ? zt(Lt, Object) : dn, xt = Vr;
1291
- (At && xt(new At(new ArrayBuffer(1))) != E || yt && xt(new yt()) != h || ht && xt(ht.resolve()) != k || xe && xt(new xe()) != f || Fe && xt(new Fe()) != S) && (xt = function(s) {
1291
+ (At && xt(new At(new ArrayBuffer(1))) != E || yt && xt(new yt()) != m || ht && xt(ht.resolve()) != k || xe && xt(new xe()) != f || Fe && xt(new Fe()) != S) && (xt = function(s) {
1292
1292
  var a = St.call(s), l = a == _ ? s.constructor : void 0, g = l ? rt(l) : void 0;
1293
1293
  if (g)
1294
1294
  switch (g) {
1295
1295
  case Le:
1296
1296
  return E;
1297
- case oe:
1298
- return h;
1297
+ case ce:
1298
+ return m;
1299
1299
  case Ne:
1300
1300
  return k;
1301
1301
  case He:
@@ -1321,7 +1321,7 @@ _r.exports;
1321
1321
  case d:
1322
1322
  return new O(+s);
1323
1323
  case E:
1324
- return ce(s, g);
1324
+ return ue(s, g);
1325
1325
  case T:
1326
1326
  case H:
1327
1327
  case R:
@@ -1329,10 +1329,10 @@ _r.exports;
1329
1329
  case x:
1330
1330
  case F:
1331
1331
  case tt:
1332
- case Gt:
1333
1332
  case Xt:
1333
+ case Kt:
1334
1334
  return tn(s, g);
1335
- case h:
1335
+ case m:
1336
1336
  return ur(s, g, l);
1337
1337
  case I:
1338
1338
  case y:
@@ -1353,7 +1353,7 @@ _r.exports;
1353
1353
  return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? s !== "__proto__" : s === null;
1354
1354
  }
1355
1355
  function un(s) {
1356
- return !!ee && ee in s;
1356
+ return !!re && re in s;
1357
1357
  }
1358
1358
  function dr(s) {
1359
1359
  var a = s && s.constructor, l = typeof a == "function" && a.prototype || _t;
@@ -1362,7 +1362,7 @@ _r.exports;
1362
1362
  function rt(s) {
1363
1363
  if (s != null) {
1364
1364
  try {
1365
- return re.call(s);
1365
+ return ne.call(s);
1366
1366
  } catch {
1367
1367
  }
1368
1368
  try {
@@ -1379,7 +1379,7 @@ _r.exports;
1379
1379
  return s === a || s !== s && a !== a;
1380
1380
  }
1381
1381
  function Pe(s) {
1382
- return ln(s) && ct.call(s, "callee") && (!se.call(s, "callee") || St.call(s) == o);
1382
+ return ln(s) && ct.call(s, "callee") && (!ie.call(s, "callee") || St.call(s) == o);
1383
1383
  }
1384
1384
  var Ge = Array.isArray;
1385
1385
  function De(s) {
@@ -1391,7 +1391,7 @@ _r.exports;
1391
1391
  var hr = Tt || fn;
1392
1392
  function Xe(s) {
1393
1393
  var a = kt(s) ? St.call(s) : "";
1394
- return a == m || a == b;
1394
+ return a == h || a == b;
1395
1395
  }
1396
1396
  function mr(s) {
1397
1397
  return typeof s == "number" && s > -1 && s % 1 == 0 && s <= i;
@@ -1424,7 +1424,7 @@ function Li(t, r) {
1424
1424
  return n;
1425
1425
  });
1426
1426
  }
1427
- const K = (t) => Object.keys(t).reduce((r, e) => {
1427
+ const Y = (t) => Object.keys(t).reduce((r, e) => {
1428
1428
  const { display: n } = t[e];
1429
1429
  return Math.max(r, n.to);
1430
1430
  }, 0);
@@ -1452,7 +1452,7 @@ function nt(t, r, e) {
1452
1452
  const b = i.sort(
1453
1453
  (I, _) => I.display.from - _.display.from
1454
1454
  ).map((I) => I.id);
1455
- let h = 0;
1455
+ let m = 0;
1456
1456
  b.forEach((I) => {
1457
1457
  const _ = [];
1458
1458
  let k = 0;
@@ -1463,9 +1463,9 @@ function nt(t, r, e) {
1463
1463
  }), r[I]) {
1464
1464
  const w = r[I].display.to - r[I].display.from;
1465
1465
  r[I].display = {
1466
- from: h - k,
1467
- to: h + w - k
1468
- }, h += w;
1466
+ from: m - k,
1467
+ to: m + w - k
1468
+ }, m += w;
1469
1469
  }
1470
1470
  });
1471
1471
  });
@@ -1485,7 +1485,7 @@ function Hi(t, r) {
1485
1485
  }
1486
1486
  );
1487
1487
  i.push(...o);
1488
- const c = {}, u = e.trackItemIds, d = e.transitionIds, p = C(e.tracks), m = C(e.structure);
1488
+ const c = {}, u = e.trackItemIds, d = e.transitionIds, p = C(e.tracks), h = C(e.structure);
1489
1489
  i.forEach((y) => {
1490
1490
  var S;
1491
1491
  const v = e.trackItemsMap[y] || e.transitionsMap[y];
@@ -1494,13 +1494,13 @@ function Hi(t, r) {
1494
1494
  (T) => T.id === v.id
1495
1495
  )) == null ? void 0 : S.items;
1496
1496
  i.push(...A);
1497
- const E = m.findIndex(
1497
+ const E = h.findIndex(
1498
1498
  (T) => T.id === v.id
1499
1499
  );
1500
- m.splice(E, 1);
1500
+ h.splice(E, 1);
1501
1501
  }
1502
1502
  }), i.forEach((y) => {
1503
- m.forEach((v) => {
1503
+ h.forEach((v) => {
1504
1504
  v.items.includes(y) && (v.items = v.items.filter((S) => S !== y));
1505
1505
  });
1506
1506
  });
@@ -1510,7 +1510,7 @@ function Hi(t, r) {
1510
1510
  d.forEach((y) => {
1511
1511
  n.includes(y) && n.length === 1 && (c[y] = C(e.transitionsMap[y]));
1512
1512
  });
1513
- const h = d.filter(
1513
+ const m = d.filter(
1514
1514
  (y) => !i.includes(y) && !n.includes(y)
1515
1515
  ), I = Object.fromEntries(
1516
1516
  Object.entries(e.transitionsMap).filter(
@@ -1529,7 +1529,7 @@ function Hi(t, r) {
1529
1529
  )
1530
1530
  ), w = p.filter((y) => y.magnetic);
1531
1531
  nt(w, k, []);
1532
- const f = K(k);
1532
+ const f = Y(k);
1533
1533
  return Object.keys(c).forEach((y) => {
1534
1534
  Ni(
1535
1535
  c[y],
@@ -1542,8 +1542,8 @@ function Hi(t, r) {
1542
1542
  trackItemsMap: k,
1543
1543
  tracks: _,
1544
1544
  duration: f,
1545
- structure: m,
1546
- transitionIds: h,
1545
+ structure: h,
1546
+ transitionIds: m,
1547
1547
  transitionsMap: I
1548
1548
  };
1549
1549
  }
@@ -1554,7 +1554,7 @@ let fs = (t = 21) => {
1554
1554
  r += Ui[e[t] & 63];
1555
1555
  return r;
1556
1556
  };
1557
- function pe(t = 16) {
1557
+ function Bt(t = 16) {
1558
1558
  const r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", e = r.charAt(Math.floor(Math.random() * r.length));
1559
1559
  let n = fs(t - 1);
1560
1560
  return n = n.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), e + n;
@@ -1570,29 +1570,34 @@ const rr = (t) => {
1570
1570
  });
1571
1571
  };
1572
1572
  async function ji(t) {
1573
- const r = localStorage.getItem("DesignComboTemp");
1573
+ let r = localStorage.getItem("DesignComboTemp");
1574
1574
  if (!r) return {};
1575
- const e = C(t), n = C(JSON.parse(r)), i = n.trackItemsMap, o = n.activeIds, c = [];
1576
- return o.forEach((u) => {
1577
- const d = i[u];
1578
- e.trackItemsMap[u] = d, e.trackItemIds.push(u);
1579
- const p = {
1580
- id: pe(),
1581
- type: d.type,
1582
- items: [u],
1575
+ const e = C(t), i = C(JSON.parse(r)).activeIds, o = i.map(() => Bt());
1576
+ i.forEach((p, h) => {
1577
+ r = r == null ? void 0 : r.split(p).join(o[h]);
1578
+ });
1579
+ const u = JSON.parse(r).trackItemsMap, d = [];
1580
+ return o.forEach((p) => {
1581
+ const h = u[p];
1582
+ e.trackItemsMap[p] = h, e.trackItemIds.push(p);
1583
+ const b = {
1584
+ id: Bt(),
1585
+ type: h.type,
1586
+ items: [p],
1583
1587
  magnetic: !1,
1584
1588
  static: !1
1585
1589
  };
1586
- c.push(p), (d.type === "text" || d.type === "caption") && rr([
1590
+ d.push(b), (h.type === "text" || h.type === "caption") && rr([
1587
1591
  {
1588
- fontFamily: d.details.fontFamily,
1589
- url: d.details.fontUrl
1592
+ fontFamily: h.details.fontFamily,
1593
+ url: h.details.fontUrl
1590
1594
  }
1591
1595
  ]);
1592
- }), e.tracks = [...c, ...e.tracks], {
1596
+ }), e.tracks = [...d, ...e.tracks], e.duration = Y(e.trackItemsMap), {
1593
1597
  tracks: e.tracks,
1594
1598
  trackItemIds: e.trackItemIds,
1595
- trackItemsMap: e.trackItemsMap
1599
+ trackItemsMap: e.trackItemsMap,
1600
+ duration: e.duration
1596
1601
  };
1597
1602
  }
1598
1603
  let Sr = {
@@ -1690,14 +1695,14 @@ async function Gi(t, r) {
1690
1695
  const e = { ...t }, n = Object.keys(r)[0], i = Object.values(r)[0], o = e.trackItemsMap[n], c = { ...e.trackItemsMap[n] }, u = o.details;
1691
1696
  if (!i.details.src) return {};
1692
1697
  if (o.type === "image") {
1693
- const d = await $e(i.details.src), { crop: p, newHeight: m, newWidth: b } = Kn(o, d);
1694
- i.details.crop = p, i.details.height = m, i.details.width = b;
1698
+ const d = await $e(i.details.src), { crop: p, newHeight: h, newWidth: b } = Kn(o, d);
1699
+ i.details.crop = p, i.details.height = h, i.details.width = b;
1695
1700
  } else if (o.type === "video") {
1696
- const d = await Dn(i.details.src), p = e.trackItemsMap[n], { display: m, duration: b, trim: h } = Vn(p, d), { crop: I, newHeight: _, newWidth: k } = Kn(o, d);
1697
- i.details.crop = I, i.details.height = _, i.details.width = k, c.display = m, c.duration = b, c.trim = h;
1701
+ const d = await Dn(i.details.src), p = e.trackItemsMap[n], { display: h, duration: b, trim: m } = Vn(p, d), { crop: I, newHeight: _, newWidth: k } = Kn(o, d);
1702
+ i.details.crop = I, i.details.height = _, i.details.width = k, c.display = h, c.duration = b, c.trim = m;
1698
1703
  } else if (o.type === "audio") {
1699
- const d = await ps(i.details.src), p = e.trackItemsMap[n], { display: m, duration: b, trim: h } = Vn(p, d);
1700
- c.display = m, c.duration = b, c.trim = h;
1704
+ const d = await ps(i.details.src), p = e.trackItemsMap[n], { display: h, duration: b, trim: m } = Vn(p, d);
1705
+ c.display = h, c.duration = b, c.trim = m;
1701
1706
  }
1702
1707
  return o.details = { ...u, ...i.details }, e.trackItemsMap[n] = { ...c }, {
1703
1708
  trackItemsMap: {
@@ -1710,17 +1715,17 @@ function Xi(t, r) {
1710
1715
  const e = C(t), n = {}, i = r && r.length ? r : e.activeIds;
1711
1716
  if (i.length === 0) return {};
1712
1717
  i.forEach((c) => {
1713
- const u = e.trackItemsMap[c], d = pe();
1718
+ const u = e.trackItemsMap[c], d = Bt();
1714
1719
  e.trackItemsMap[d] = {
1715
1720
  ...C(u),
1716
1721
  id: d
1717
1722
  }, e.trackItemIds.push(d);
1718
1723
  const p = e.tracks.find(
1719
- (m) => m.items.includes(c)
1724
+ (h) => h.items.includes(c)
1720
1725
  );
1721
1726
  n[p.id] ? n[p.id].items.push(d) : n[p.id] = {
1722
1727
  ...p,
1723
- id: pe(),
1728
+ id: Bt(),
1724
1729
  items: [d],
1725
1730
  static: !1,
1726
1731
  magnetic: !1
@@ -1749,7 +1754,7 @@ function Ki(t) {
1749
1754
  (c, u, d, p) => o(+u, +d, +p)
1750
1755
  ), t;
1751
1756
  }
1752
- function X(t) {
1757
+ function K(t) {
1753
1758
  return /^#[0-9a-fA-F]{3}$/.test(t) ? "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3] : t;
1754
1759
  }
1755
1760
  function ms(t, r) {
@@ -1785,7 +1790,7 @@ const Vi = (t) => {
1785
1790
  let i;
1786
1791
  for (; (i = n.exec(r)) !== null; ) {
1787
1792
  const o = i[1], c = i[2], u = {}, d = /fill\s*:\s*([^;]+);?/.exec(c), p = /stroke\s*:\s*([^;]+);?/.exec(c);
1788
- d && (u.fill = X(d[1].trim())), p && (u.stroke = X(p[1].trim())), e[o] = u;
1793
+ d && (u.fill = K(d[1].trim())), p && (u.stroke = K(p[1].trim())), e[o] = u;
1789
1794
  }
1790
1795
  return e;
1791
1796
  };
@@ -1812,62 +1817,62 @@ function qi(t, r, e = 300, n = 300) {
1812
1817
  if (hn(A)) return;
1813
1818
  ["fill", "stroke", "stop-color"].forEach((H) => {
1814
1819
  const R = A.getAttribute(H);
1815
- R && !["none", "transparent"].includes(R) && S.add(X(R));
1820
+ R && !["none", "transparent"].includes(R) && S.add(K(R));
1816
1821
  });
1817
1822
  const E = A.getAttribute("style");
1818
1823
  if (E) {
1819
1824
  const H = /fill\s*:\s*([^;]+);?/.exec(E), R = /stroke\s*:\s*([^;]+);?/.exec(E), V = /stop-color\s*:\s*([^;]+);?/.exec(E);
1820
1825
  if (H) {
1821
1826
  const x = H[1].trim();
1822
- x && !["none", "transparent"].includes(x) && Ve(X(x)) && S.add(X(x));
1827
+ x && !["none", "transparent"].includes(x) && Ve(K(x)) && S.add(K(x));
1823
1828
  }
1824
1829
  if (R) {
1825
1830
  const x = R[1].trim();
1826
- x && !["none", "transparent"].includes(x) && Ve(X(x)) && S.add(X(x));
1831
+ x && !["none", "transparent"].includes(x) && Ve(K(x)) && S.add(K(x));
1827
1832
  }
1828
1833
  if (V) {
1829
1834
  const x = V[1].trim();
1830
- x && !["none", "transparent"].includes(x) && Ve(X(x)) && S.add(X(x));
1835
+ x && !["none", "transparent"].includes(x) && Ve(K(x)) && S.add(K(x));
1831
1836
  }
1832
1837
  }
1833
1838
  const T = A.getAttribute("class");
1834
1839
  T && T.split(" ").forEach((H) => {
1835
1840
  const R = p[H];
1836
- R != null && R.fill && !["none", "transparent"].includes(R.fill) && S.add(X(R.fill)), R != null && R.stroke && !["none", "transparent"].includes(R.stroke) && S.add(X(R.stroke));
1841
+ R != null && R.fill && !["none", "transparent"].includes(R.fill) && S.add(K(R.fill)), R != null && R.stroke && !["none", "transparent"].includes(R.stroke) && S.add(K(R.stroke));
1837
1842
  });
1838
1843
  }), Array.from(S).forEach((A) => {
1839
1844
  Ve(A) && i.push(A);
1840
1845
  });
1841
1846
  });
1842
- const m = Array.from(c.querySelectorAll("*")), b = /* @__PURE__ */ new Set();
1843
- return m.forEach((k) => {
1847
+ const h = Array.from(c.querySelectorAll("*")), b = /* @__PURE__ */ new Set();
1848
+ return h.forEach((k) => {
1844
1849
  if (hn(k)) return;
1845
1850
  const w = k.getAttribute("class");
1846
1851
  if (w) {
1847
1852
  const y = w.split(" ").map((v) => `${r}-${v}`).join(" ");
1848
1853
  k.setAttribute("class", y), y.split(" ").forEach((v) => {
1849
1854
  const S = p[v];
1850
- S != null && S.fill && !["none", "transparent"].includes(S.fill) && b.add(X(S.fill)), S != null && S.stroke && !["none", "transparent"].includes(S.stroke) && b.add(X(S.stroke));
1855
+ S != null && S.fill && !["none", "transparent"].includes(S.fill) && b.add(K(S.fill)), S != null && S.stroke && !["none", "transparent"].includes(S.stroke) && b.add(K(S.stroke));
1851
1856
  });
1852
1857
  }
1853
1858
  ["fill", "stroke", "stop-color"].forEach((y) => {
1854
1859
  const v = k.getAttribute(y);
1855
- v && !["none", "transparent"].includes(v) && b.add(X(v));
1860
+ v && !["none", "transparent"].includes(v) && b.add(K(v));
1856
1861
  });
1857
1862
  const f = k.getAttribute("style");
1858
1863
  if (f) {
1859
1864
  const y = /fill\s*:\s*([^;]+);?/.exec(f), v = /stroke\s*:\s*([^;]+);?/.exec(f), S = /stop-color\s*:\s*([^;]+);?/.exec(f);
1860
1865
  if (y) {
1861
1866
  const A = y[1].trim();
1862
- A && !["none", "transparent"].includes(A) && b.add(X(A));
1867
+ A && !["none", "transparent"].includes(A) && b.add(K(A));
1863
1868
  }
1864
1869
  if (v) {
1865
1870
  const A = v[1].trim();
1866
- A && !["none", "transparent"].includes(A) && b.add(X(A));
1871
+ A && !["none", "transparent"].includes(A) && b.add(K(A));
1867
1872
  }
1868
1873
  if (S) {
1869
1874
  const A = S[1].trim();
1870
- A && !["none", "transparent"].includes(A) && b.add(X(A));
1875
+ A && !["none", "transparent"].includes(A) && b.add(K(A));
1871
1876
  }
1872
1877
  }
1873
1878
  }), b.forEach(
@@ -2247,11 +2252,11 @@ const bs = async (t, r) => {
2247
2252
  r.size.height / n.height
2248
2253
  ), o = ((b = t.details) == null ? void 0 : b.rotate) || 0, c = pt(r, n), u = t.display;
2249
2254
  let d = 1 / 0, p = 0;
2250
- e.forEach((h) => {
2251
- const I = t.trackItemsMap[h];
2255
+ e.forEach((m) => {
2256
+ const I = t.trackItemsMap[m];
2252
2257
  I.display.from < d && (d = I.display.from), I.display.to > p && (p = I.display.to);
2253
2258
  });
2254
- const m = t.trim || t.display || { from: d, to: p };
2259
+ const h = t.trim || t.display || { from: d, to: p };
2255
2260
  return {
2256
2261
  id: t.id,
2257
2262
  type: "template",
@@ -2265,23 +2270,23 @@ const bs = async (t, r) => {
2265
2270
  rotate: o,
2266
2271
  background: t.details.background || "transparent"
2267
2272
  },
2268
- trim: m,
2273
+ trim: h,
2269
2274
  display: u || { from: d, to: p },
2270
2275
  activeEdit: !1
2271
2276
  };
2272
2277
  }, ea = async (t, r) => {
2273
- var m;
2278
+ var h;
2274
2279
  const e = t.trackItemIds, n = t.size || {
2275
2280
  width: t.details.width,
2276
2281
  height: t.details.height
2277
2282
  }, i = Math.min(
2278
2283
  r.size.width / n.width,
2279
2284
  r.size.height / n.height
2280
- ), o = ((m = t.details) == null ? void 0 : m.rotate) || 0, c = pt(r, n), u = t.display;
2285
+ ), o = ((h = t.details) == null ? void 0 : h.rotate) || 0, c = pt(r, n), u = t.display;
2281
2286
  let d = 1 / 0, p = 0;
2282
2287
  return e.forEach((b) => {
2283
- const h = t.trackItemsMap[b];
2284
- h.display.from < d && (d = h.display.from), h.display.to > p && (p = h.display.to);
2288
+ const m = t.trackItemsMap[b];
2289
+ m.display.from < d && (d = m.display.from), m.display.to > p && (p = m.display.to);
2285
2290
  }), {
2286
2291
  id: t.id,
2287
2292
  type: "composition",
@@ -2300,12 +2305,12 @@ const bs = async (t, r) => {
2300
2305
  const e = t.details, n = $e(e.src), i = fetch(e.src), [o, c] = await Promise.all([
2301
2306
  n,
2302
2307
  i
2303
- ]), u = await c.text(), d = pt(r, o), { serializer: p, colors: m } = qi(
2308
+ ]), u = await c.text(), d = pt(r, o), { serializer: p, colors: h } = qi(
2304
2309
  Ki(u),
2305
2310
  t.id,
2306
2311
  Number(e.width || o.width),
2307
2312
  Number(e.height || o.height)
2308
- ), b = t.details.colorMap || Object.fromEntries(m.map((h) => [h, h]));
2313
+ ), b = t.details.colorMap || Object.fromEntries(h.map((m) => [m, m]));
2309
2314
  return {
2310
2315
  id: t.id,
2311
2316
  name: "illustration",
@@ -2615,7 +2620,7 @@ function Es(t, r) {
2615
2620
  );
2616
2621
  }
2617
2622
  const Ms = (t = [], r = []) => t.length === 0 ? r.map((n) => ({
2618
- id: pe(),
2623
+ id: Bt(),
2619
2624
  items: [n.id],
2620
2625
  type: n.type,
2621
2626
  accepts: ["text", "image", "video", "audio", "caption", "template"]
@@ -2626,70 +2631,70 @@ const Ms = (t = [], r = []) => t.length === 0 ? r.map((n) => ({
2626
2631
  type: e.type || "text",
2627
2632
  magnetic: e.magnetic || !1,
2628
2633
  static: e.static || !1,
2629
- id: e.id || pe()
2634
+ id: e.id || Bt()
2630
2635
  }));
2631
2636
  async function ia(t, r) {
2632
2637
  var c, u, d;
2633
2638
  const e = r.trackItemsMap, n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
2634
2639
  for (const p in e) {
2635
- const m = e[p];
2636
- if (m.type === "text" || m.type === "caption") {
2637
- if (m.details.fontUrl) {
2640
+ const h = e[p];
2641
+ if (h.type === "text" || h.type === "caption") {
2642
+ if (h.details.fontUrl) {
2638
2643
  const b = {
2639
- fontFamily: m.details.fontFamily,
2640
- url: m.details.fontUrl
2644
+ fontFamily: h.details.fontFamily,
2645
+ url: h.details.fontUrl
2641
2646
  };
2642
2647
  n.add(JSON.stringify(b));
2643
2648
  }
2644
- (c = m.animations) != null && c.in && m.animations.in.composition.forEach(
2649
+ (c = h.animations) != null && c.in && h.animations.in.composition.forEach(
2645
2650
  (b) => {
2646
- var h;
2647
- (h = b.details) != null && h.fonts && b.details.fonts.forEach(
2651
+ var m;
2652
+ (m = b.details) != null && m.fonts && b.details.fonts.forEach(
2648
2653
  (I) => {
2649
2654
  n.add(JSON.stringify(I));
2650
2655
  }
2651
2656
  );
2652
2657
  }
2653
- ), (u = m.animations) != null && u.loop && m.animations.loop.composition.forEach(
2658
+ ), (u = h.animations) != null && u.loop && h.animations.loop.composition.forEach(
2654
2659
  (b) => {
2655
- var h;
2656
- (h = b.details) != null && h.fonts && b.details.fonts.forEach(
2660
+ var m;
2661
+ (m = b.details) != null && m.fonts && b.details.fonts.forEach(
2657
2662
  (I) => {
2658
2663
  n.add(JSON.stringify(I));
2659
2664
  }
2660
2665
  );
2661
2666
  }
2662
- ), (d = m.animations) != null && d.out && m.animations.out.composition.forEach(
2667
+ ), (d = h.animations) != null && d.out && h.animations.out.composition.forEach(
2663
2668
  (b) => {
2664
- var h;
2665
- (h = b.details) != null && h.fonts && b.details.fonts.forEach(
2669
+ var m;
2670
+ (m = b.details) != null && m.fonts && b.details.fonts.forEach(
2666
2671
  (I) => {
2667
2672
  n.add(JSON.stringify(I));
2668
2673
  }
2669
2674
  );
2670
2675
  }
2671
2676
  );
2672
- } else m.type === "illustration" && i.set(p, {
2673
- trackItem: m,
2674
- details: m.details
2677
+ } else h.type === "illustration" && i.set(p, {
2678
+ trackItem: h,
2679
+ details: h.details
2675
2680
  });
2676
2681
  }
2677
2682
  n.size > 0 && await rr(
2678
2683
  Array.from(n).map((p) => JSON.parse(p))
2679
2684
  );
2680
- for (const [p, m] of i) {
2685
+ for (const [p, h] of i) {
2681
2686
  const b = await _s(
2682
- { ...m.trackItem, details: m.details },
2687
+ { ...h.trackItem, details: h.details },
2683
2688
  {
2684
- size: { width: m.details.width, height: m.details.height }
2689
+ size: { width: h.details.width, height: h.details.height }
2685
2690
  }
2686
- ), h = ms(
2691
+ ), m = ms(
2687
2692
  b.details.svgString,
2688
- m.details.colorMap
2693
+ h.details.colorMap
2689
2694
  );
2690
- b.details.svgString = h, e[p] = b;
2695
+ b.details.svgString = m, e[p] = b;
2691
2696
  }
2692
- const o = K(e);
2697
+ const o = Y(e);
2693
2698
  return {
2694
2699
  ...r,
2695
2700
  duration: o
@@ -2710,7 +2715,7 @@ function aa(t) {
2710
2715
  n.filter((d) => o.has(d.id) ? !1 : (o.add(d.id), !0)), i.tracks = Array.from(o);
2711
2716
  let u = JSON.stringify(i);
2712
2717
  e.forEach((d) => {
2713
- const p = pe();
2718
+ const p = Bt();
2714
2719
  u = u.split(d).join(p);
2715
2720
  }), localStorage.setItem("DesignComboTemp", u);
2716
2721
  }
@@ -2720,7 +2725,7 @@ function oa(t, r) {
2720
2725
  const n = e.activeIds[0], i = C(e.trackItemsMap[n]);
2721
2726
  if (r >= i.display.to || r <= i.display.from)
2722
2727
  return {};
2723
- const o = pe(), c = {
2728
+ const o = Bt(), c = {
2724
2729
  ...i,
2725
2730
  display: {
2726
2731
  from: i.display.from,
@@ -2734,52 +2739,52 @@ function oa(t, r) {
2734
2739
  to: i.display.to
2735
2740
  }
2736
2741
  }, d = Object.values(e.transitionsMap).find(
2737
- (m) => m.fromId === i.id && m.kind !== "none"
2742
+ (h) => h.fromId === i.id && h.kind !== "none"
2738
2743
  ), p = Object.values(e.transitionsMap).find(
2739
- (m) => m.toId === i.id && m.kind !== "none"
2744
+ (h) => h.toId === i.id && h.kind !== "none"
2740
2745
  );
2741
2746
  if (i.type === "video" || i.type === "audio") {
2742
- const m = r - c.display.from;
2747
+ const h = r - c.display.from;
2743
2748
  c.trim = {
2744
2749
  from: i.trim.from,
2745
- to: i.trim.from + m
2750
+ to: i.trim.from + h
2746
2751
  }, u.trim = {
2747
- from: i.trim.from + m,
2752
+ from: i.trim.from + h,
2748
2753
  to: i.trim.to
2749
2754
  };
2750
2755
  }
2751
2756
  if (p) {
2752
- const m = c.display.to - c.display.from;
2753
- if (p.duration / 2 > m) {
2757
+ const h = c.display.to - c.display.from;
2758
+ if (p.duration / 2 > h) {
2754
2759
  e.transitionIds = e.transitionIds.filter(
2755
- (h) => h !== p.id
2760
+ (m) => m !== p.id
2756
2761
  );
2757
2762
  const b = {};
2758
2763
  e.transitionIds.forEach(
2759
- (h) => b[h] = e.transitionsMap[h]
2764
+ (m) => b[m] = e.transitionsMap[m]
2760
2765
  ), e.transitionsMap = b;
2761
2766
  }
2762
2767
  }
2763
2768
  if (d) {
2764
- const m = u.display.to - u.display.from, b = {};
2765
- d.duration / 2 > m ? (e.transitionIds = e.transitionIds.filter(
2766
- (h) => h !== d.id
2769
+ const h = u.display.to - u.display.from, b = {};
2770
+ d.duration / 2 > h ? (e.transitionIds = e.transitionIds.filter(
2771
+ (m) => m !== d.id
2767
2772
  ), e.transitionIds.forEach(
2768
- (h) => b[h] = e.transitionsMap[h]
2769
- ), e.transitionsMap = b) : (e.transitionIds = e.transitionIds.map((h) => e.transitionsMap[h].fromId === c.id ? h.replace(c.id, o) : h), Object.keys(e.transitionsMap).forEach((h) => {
2770
- if (e.transitionsMap[h].fromId === c.id) {
2771
- const _ = h.replace(c.id, o);
2773
+ (m) => b[m] = e.transitionsMap[m]
2774
+ ), e.transitionsMap = b) : (e.transitionIds = e.transitionIds.map((m) => e.transitionsMap[m].fromId === c.id ? m.replace(c.id, o) : m), Object.keys(e.transitionsMap).forEach((m) => {
2775
+ if (e.transitionsMap[m].fromId === c.id) {
2776
+ const _ = m.replace(c.id, o);
2772
2777
  b[_] = {
2773
- ...e.transitionsMap[h],
2778
+ ...e.transitionsMap[m],
2774
2779
  id: _,
2775
2780
  fromId: o
2776
2781
  };
2777
2782
  } else
2778
- b[h] = e.transitionsMap[h];
2783
+ b[m] = e.transitionsMap[m];
2779
2784
  }), e.transitionsMap = b);
2780
2785
  }
2781
- return e.trackItemsMap[n] = c, e.trackItemsMap[o] = u, e.trackItemIds.push(o), e.tracks.forEach((m) => {
2782
- m.items.includes(n) && m.items.push(o);
2786
+ return e.trackItemsMap[n] = c, e.trackItemsMap[o] = u, e.trackItemIds.push(o), e.tracks.forEach((h) => {
2787
+ h.items.includes(n) && h.items.push(o);
2783
2788
  }), {
2784
2789
  tracks: e.tracks,
2785
2790
  trackItemIds: e.trackItemIds,
@@ -2807,9 +2812,9 @@ async function ca(t, r) {
2807
2812
  ...n[c].metadata,
2808
2813
  ...u.metadata
2809
2814
  } : n[c].metadata = u.metadata), u.display || u.playbackRate) {
2810
- const d = u.playbackRate, p = n[c].playbackRate || 1, m = n[c].display, I = (m.to - m.from) * p / d, _ = {
2811
- from: m.from,
2812
- to: m.from + I
2815
+ const d = u.playbackRate, p = n[c].playbackRate || 1, h = n[c].display, I = (h.to - h.from) * p / d, _ = {
2816
+ from: h.from,
2817
+ to: h.from + I
2813
2818
  };
2814
2819
  n[c].display = _, n[c].playbackRate = d;
2815
2820
  }
@@ -2825,7 +2830,7 @@ async function ca(t, r) {
2825
2830
  n[c].details.width = d.width, n[c].details.height = d.height;
2826
2831
  }
2827
2832
  }
2828
- const o = K(n);
2833
+ const o = Y(n);
2829
2834
  return {
2830
2835
  trackItemsMap: { ...n },
2831
2836
  duration: o
@@ -2836,24 +2841,24 @@ async function ua(t, r) {
2836
2841
  if (!i.details.src) return {};
2837
2842
  if (o.type === "image") {
2838
2843
  const u = await $e(i.details.src), d = o.details.width || 0, p = o.details.height || 0;
2839
- let m = u.width, b = u.height;
2840
- const h = u.width / u.height;
2841
- d / p > h ? (m = d, b = d / h) : (b = p, m = p * h), c.crop = {
2844
+ let h = u.width, b = u.height;
2845
+ const m = u.width / u.height;
2846
+ d / p > m ? (h = d, b = d / m) : (b = p, h = p * m), c.crop = {
2842
2847
  x: 0,
2843
2848
  y: 0,
2844
2849
  height: c.height,
2845
2850
  width: c.width
2846
- }, i.details.width = m, i.details.height = b;
2851
+ }, i.details.width = h, i.details.height = b;
2847
2852
  } else if (o.type === "video") {
2848
2853
  const u = await Dn(i.details.src), d = o.details.width || 0, p = o.details.height || 0;
2849
- let m = u.width, b = u.height;
2850
- const h = u.width / u.height;
2851
- d / p > h ? (m = d, b = d / h) : (b = p, m = p * h), c.crop = {
2854
+ let h = u.width, b = u.height;
2855
+ const m = u.width / u.height;
2856
+ d / p > m ? (h = d, b = d / m) : (b = p, h = p * m), c.crop = {
2852
2857
  x: 0,
2853
2858
  y: 0,
2854
2859
  height: c.height,
2855
2860
  width: c.width
2856
- }, i.details.width = m, i.details.height = b;
2861
+ }, i.details.width = h, i.details.height = b;
2857
2862
  }
2858
2863
  return i.details && (o.details = { ...c, ...i.details }, i.details = o.details), e.trackItemsMap[n] = {
2859
2864
  ...e.trackItemsMap[n],
@@ -2893,9 +2898,9 @@ async function da(t, r, e = {}) {
2893
2898
  };
2894
2899
  u.push(_);
2895
2900
  });
2896
- const p = [], m = {};
2901
+ const p = [], h = {};
2897
2902
  if (o.forEach((I) => {
2898
- p.push(I.id), m[I.id] = I;
2903
+ p.push(I.id), h[I.id] = I;
2899
2904
  }), Es(
2900
2905
  n.tracks,
2901
2906
  c
@@ -2918,13 +2923,13 @@ async function da(t, r, e = {}) {
2918
2923
  }
2919
2924
  n.trackItemsMap = {
2920
2925
  ...n.trackItemsMap,
2921
- ...m
2926
+ ...h
2922
2927
  }, n.trackItemIds = [
2923
2928
  ...n.trackItemIds,
2924
2929
  ...p
2925
2930
  ], n.structure = [...n.structure, ...u];
2926
- const h = n.tracks.filter((I) => I.magnetic);
2927
- return nt(h, n.trackItemsMap, d), n.duration = K(n.trackItemsMap), {
2931
+ const m = n.tracks.filter((I) => I.magnetic);
2932
+ return nt(m, n.trackItemsMap, d), n.duration = Y(n.trackItemsMap), {
2928
2933
  trackItemIds: n.trackItemIds,
2929
2934
  trackItemsMap: n.trackItemsMap,
2930
2935
  tracks: n.tracks,
@@ -2971,7 +2976,7 @@ async function fa(t, r, e = {}) {
2971
2976
  scaleAspectRatio: e.scaleAspectRatio
2972
2977
  })
2973
2978
  ], o = await Promise.all(i), c = o.map((p) => p.id), u = vt(n, o, e), d = u.tracks.filter((p) => p.magnetic);
2974
- return nt(d, u.trackItemsMap, c), u.duration = K(u.trackItemsMap), {
2979
+ return nt(d, u.trackItemsMap, c), u.duration = Y(u.trackItemsMap), {
2975
2980
  trackItemIds: u.trackItemIds,
2976
2981
  trackItemsMap: u.trackItemsMap,
2977
2982
  tracks: u.tracks,
@@ -2980,7 +2985,7 @@ async function fa(t, r, e = {}) {
2980
2985
  }
2981
2986
  async function pa(t, r, e = {}) {
2982
2987
  const n = C(t), i = [ks(r)], o = await Promise.all(i), c = o.map((p) => p.id), u = vt(n, o, e);
2983
- u.duration = K(u.trackItemsMap);
2988
+ u.duration = Y(u.trackItemsMap);
2984
2989
  const d = u.tracks.filter((p) => p.magnetic);
2985
2990
  return nt(d, u.trackItemsMap, c), {
2986
2991
  trackItemIds: u.trackItemIds,
@@ -2997,7 +3002,7 @@ async function ha(t, r, e = {}) {
2997
3002
  scaleAspectRatio: e.scaleAspectRatio
2998
3003
  })
2999
3004
  ], o = await Promise.all(i), c = o.map((p) => p.id), u = vt(n, o, e);
3000
- u.duration = K(u.trackItemsMap);
3005
+ u.duration = Y(u.trackItemsMap);
3001
3006
  const d = u.tracks.filter((p) => p.magnetic);
3002
3007
  return nt(d, u.trackItemsMap, c), {
3003
3008
  trackItemIds: u.trackItemIds,
@@ -3012,7 +3017,7 @@ async function ma(t, r, e = {}) {
3012
3017
  size: e.size
3013
3018
  })
3014
3019
  ], o = await Promise.all(i), c = o.map((p) => p.id), u = vt(n, o, e);
3015
- u.duration = K(u.trackItemsMap);
3020
+ u.duration = Y(u.trackItemsMap);
3016
3021
  const d = u.tracks.filter((p) => p.magnetic);
3017
3022
  return nt(d, u.trackItemsMap, c), {
3018
3023
  trackItemIds: u.trackItemIds,
@@ -3029,7 +3034,7 @@ async function ga(t, r, e = {}) {
3029
3034
  scaleAspectRatio: e.scaleAspectRatio
3030
3035
  })
3031
3036
  ], o = await Promise.all(i), c = o.map((p) => p.id), u = vt(n, o, e);
3032
- u.duration = K(u.trackItemsMap);
3037
+ u.duration = Y(u.trackItemsMap);
3033
3038
  const d = u.tracks.filter((p) => p.magnetic);
3034
3039
  return nt(d, u.trackItemsMap, c), {
3035
3040
  trackItemIds: u.trackItemIds,
@@ -3046,7 +3051,7 @@ async function ya(t, r, e = {}) {
3046
3051
  scaleAspectRatio: e.scaleAspectRatio
3047
3052
  })
3048
3053
  ], o = await Promise.all(i), c = o.map((p) => p.id), u = vt(n, o, e);
3049
- u.duration = K(u.trackItemsMap);
3054
+ u.duration = Y(u.trackItemsMap);
3050
3055
  const d = u.tracks.filter((p) => p.magnetic);
3051
3056
  return nt(d, u.trackItemsMap, c), {
3052
3057
  trackItemIds: u.trackItemIds,
@@ -3056,31 +3061,31 @@ async function ya(t, r, e = {}) {
3056
3061
  };
3057
3062
  }
3058
3063
  async function Ia(t, r, e = {}) {
3059
- const n = C(t), i = "composition", o = r.trackItemsMap, c = r.trackItemIds, u = r.tracks || [], d = r.trackItemDetailsMap, { details: p, ...m } = await ea(r, {
3064
+ const n = C(t), i = "composition", o = r.trackItemsMap, c = r.trackItemIds, u = r.tracks || [], d = r.trackItemDetailsMap, { details: p, ...h } = await ea(r, {
3060
3065
  size: n.size,
3061
3066
  scaleMode: e.scaleMode,
3062
3067
  scaleAspectRatio: e.scaleAspectRatio
3063
3068
  }), b = {
3064
- id: m.id,
3069
+ id: h.id,
3065
3070
  items: c,
3066
3071
  transitions: [],
3067
3072
  tracks: u
3068
3073
  }, I = [{
3069
- ...m,
3074
+ ...h,
3070
3075
  type: i,
3071
3076
  details: p
3072
3077
  }], _ = vt(n, I, e);
3073
3078
  _.trackItemsMap = {
3074
3079
  ..._.trackItemsMap,
3075
3080
  ...o,
3076
- [m.id]: {
3077
- ...m,
3081
+ [h.id]: {
3082
+ ...h,
3078
3083
  type: i,
3079
3084
  details: p
3080
3085
  }
3081
- }, _.structure = [..._.structure, b], _.duration = K(_.trackItemsMap);
3086
+ }, _.structure = [..._.structure, b], _.duration = Y(_.trackItemsMap);
3082
3087
  const k = _.tracks.filter((w) => w.magnetic);
3083
- return nt(k, _.trackItemsMap, [m.id]), d && Object.keys(d).forEach((w) => {
3088
+ return nt(k, _.trackItemsMap, [h.id]), d && Object.keys(d).forEach((w) => {
3084
3089
  _.trackItemsMap[w] = {
3085
3090
  ..._.trackItemsMap[w],
3086
3091
  details: {
@@ -3095,7 +3100,7 @@ async function Ia(t, r, e = {}) {
3095
3100
  structure: _.structure
3096
3101
  };
3097
3102
  }
3098
- async function de(t, r, e = {}, n) {
3103
+ async function fe(t, r, e = {}, n) {
3099
3104
  const i = C(t), o = (b) => b.display ? b.display : {
3100
3105
  from: 0,
3101
3106
  to: i.duration
@@ -3144,9 +3149,9 @@ async function de(t, r, e = {}, n) {
3144
3149
  })
3145
3150
  );
3146
3151
  const u = await Promise.all(c), d = u.map((b) => b.id), p = vt(i, u, e);
3147
- p.duration = K(p.trackItemsMap);
3148
- const m = p.tracks.filter((b) => b.magnetic);
3149
- return nt(m, p.trackItemsMap, d), {
3152
+ p.duration = Y(p.trackItemsMap);
3153
+ const h = p.tracks.filter((b) => b.magnetic);
3154
+ return nt(h, p.trackItemsMap, d), {
3150
3155
  trackItemIds: p.trackItemIds,
3151
3156
  trackItemsMap: p.trackItemsMap,
3152
3157
  tracks: p.tracks,
@@ -3154,17 +3159,17 @@ async function de(t, r, e = {}, n) {
3154
3159
  };
3155
3160
  }
3156
3161
  async function ba(t, r, e = {}) {
3157
- const n = C(t), i = "template", o = r.trackItemsMap, c = r.trackItemIds, u = r.transitionsMap, d = r.transitionIds || [], p = r.tracks || [], m = r.structure || [], { details: b, ...h } = await vs(r, {
3162
+ const n = C(t), i = "template", o = r.trackItemsMap, c = r.trackItemIds, u = r.transitionsMap, d = r.transitionIds || [], p = r.tracks || [], h = r.structure || [], { details: b, ...m } = await vs(r, {
3158
3163
  size: n.size,
3159
3164
  scaleMode: e.scaleMode,
3160
3165
  scaleAspectRatio: e.scaleAspectRatio
3161
3166
  }), I = {
3162
- id: h.id,
3167
+ id: m.id,
3163
3168
  items: c,
3164
3169
  transitions: d,
3165
3170
  tracks: p
3166
3171
  }, k = [{
3167
- ...h,
3172
+ ...m,
3168
3173
  type: i,
3169
3174
  details: b
3170
3175
  }], w = vt(n, k, e);
@@ -3177,18 +3182,18 @@ async function ba(t, r, e = {}) {
3177
3182
  }, w.trackItemsMap = {
3178
3183
  ...w.trackItemsMap,
3179
3184
  ...o,
3180
- [h.id]: {
3181
- ...h,
3185
+ [m.id]: {
3186
+ ...m,
3182
3187
  type: i,
3183
3188
  details: b
3184
3189
  }
3185
3190
  }, w.structure = [
3186
3191
  ...w.structure,
3187
3192
  I,
3188
- ...m
3189
- ], w.duration = K(w.trackItemsMap);
3193
+ ...h
3194
+ ], w.duration = Y(w.trackItemsMap);
3190
3195
  const f = w.tracks.filter((y) => y.magnetic);
3191
- return nt(f, w.trackItemsMap, [h.id]), {
3196
+ return nt(f, w.trackItemsMap, [m.id]), {
3192
3197
  trackItemIds: w.trackItemIds,
3193
3198
  trackItemsMap: w.trackItemsMap,
3194
3199
  tracks: w.tracks,
@@ -3211,15 +3216,15 @@ async function ka(t, r, e = {}) {
3211
3216
  o
3212
3217
  ), u = [], d = {};
3213
3218
  if (o.forEach((b) => {
3214
- const { details: h, ...I } = b;
3219
+ const { details: m, ...I } = b;
3215
3220
  u.push(b.id), d[b.id] = I;
3216
3221
  }), Es(
3217
3222
  n.tracks,
3218
3223
  c
3219
3224
  ))
3220
3225
  n.tracks.forEach((b) => {
3221
- c.forEach((h) => {
3222
- b.id === h.id && (b.magnetic && nt(
3226
+ c.forEach((m) => {
3227
+ b.id === m.id && (b.magnetic && nt(
3223
3228
  [b],
3224
3229
  n.trackItemsMap,
3225
3230
  u
@@ -3227,11 +3232,11 @@ async function ka(t, r, e = {}) {
3227
3232
  });
3228
3233
  });
3229
3234
  else {
3230
- const b = e.trackIndex || 0, h = Math.min(
3235
+ const b = e.trackIndex || 0, m = Math.min(
3231
3236
  Math.max(b, 0),
3232
3237
  n.tracks.length
3233
3238
  );
3234
- n.tracks.splice(h, 0, ...c);
3239
+ n.tracks.splice(m, 0, ...c);
3235
3240
  }
3236
3241
  n.trackItemsMap = {
3237
3242
  ...n.trackItemsMap,
@@ -3239,10 +3244,10 @@ async function ka(t, r, e = {}) {
3239
3244
  }, n.trackItemIds = [
3240
3245
  ...n.trackItemIds,
3241
3246
  ...u
3242
- ], n.duration = K(n.trackItemsMap);
3243
- const m = n.tracks.filter((b) => b.magnetic);
3247
+ ], n.duration = Y(n.trackItemsMap);
3248
+ const h = n.tracks.filter((b) => b.magnetic);
3244
3249
  return nt(
3245
- m,
3250
+ h,
3246
3251
  n.trackItemsMap,
3247
3252
  u
3248
3253
  ), {
@@ -3283,7 +3288,7 @@ async function _a(t, r, e = {}) {
3283
3288
  scaleAspectRatio: e.scaleAspectRatio
3284
3289
  })
3285
3290
  ], o = await Promise.all(i), c = o.map((p) => p.id), u = vt(n, o, e);
3286
- u.duration = K(u.trackItemsMap);
3291
+ u.duration = Y(u.trackItemsMap);
3287
3292
  const d = u.tracks.filter((p) => p.magnetic);
3288
3293
  return nt(d, u.trackItemsMap, c), {
3289
3294
  trackItemIds: u.trackItemIds,
@@ -3306,7 +3311,7 @@ function Sa(t) {
3306
3311
  ), c = jt.pipe(
3307
3312
  Wt(({ key: f }) => f.startsWith(ze))
3308
3313
  ), u = jt.pipe(
3309
- Wt(({ key: f }) => f.startsWith(Yt))
3314
+ Wt(({ key: f }) => f.startsWith(Gt))
3310
3315
  ), d = jt.pipe(
3311
3316
  Wt(({ key: f }) => f.startsWith(ds))
3312
3317
  ), p = r.subscribe(async (f) => {
@@ -3317,7 +3322,7 @@ function Sa(t) {
3317
3322
  Ns(S.type, S.payload && { payload: S.payload });
3318
3323
  });
3319
3324
  }
3320
- }), m = e.subscribe(async (f) => {
3325
+ }), h = e.subscribe(async (f) => {
3321
3326
  var y, v;
3322
3327
  if (f.key === ni) {
3323
3328
  const S = (y = f.value) == null ? void 0 : y.payload, A = await ia(t.getState(), S);
@@ -3341,7 +3346,7 @@ function Sa(t) {
3341
3346
  }), b = o.subscribe((f) => {
3342
3347
  if (f.key === Di) return t.undo();
3343
3348
  if (f.key === zi) return t.redo();
3344
- }), h = d.subscribe((f) => {
3349
+ }), m = d.subscribe((f) => {
3345
3350
  var y;
3346
3351
  if (f.key === $i) {
3347
3352
  const v = (y = f.value) == null ? void 0 : y.payload.scale;
@@ -3389,8 +3394,8 @@ function Sa(t) {
3389
3394
  });
3390
3395
  }
3391
3396
  }), _ = n.subscribe(async (f) => {
3392
- var H, R, V, x, F, tt, Gt, Xt, Ie, be, ke, ve, z, _e, Se, st, Kt, $, Vt, we, it, qt, Jt, Rt, Pt, Zt, Dt, Qt, zt, te, Te, Ae, _t, $t, ee, re, ct, St, Ee, gt, wt, Ft, et, ne, se, Me, Lt, Tt, ie, At, yt;
3393
- const y = C(t.getState()), v = ((R = (H = f.value) == null ? void 0 : H.options) == null ? void 0 : R.isSelected) || !1, S = (x = (V = f.value) == null ? void 0 : V.options) == null ? void 0 : x.scaleMode, A = (tt = (F = f.value) == null ? void 0 : F.options) == null ? void 0 : tt.scaleAspectRatio, E = (Xt = (Gt = f.value) == null ? void 0 : Gt.options) == null ? void 0 : Xt.trackIndex;
3397
+ var H, R, V, x, F, tt, Xt, Kt, Ie, be, ke, ve, z, _e, Se, st, Vt, $, qt, we, it, Jt, Zt, Rt, Pt, Qt, Dt, te, zt, ee, Te, Ae, _t, $t, re, ne, ct, St, Ee, gt, wt, Ft, et, se, ie, Me, Lt, Tt, ae, At, yt;
3398
+ const y = C(t.getState()), v = ((R = (H = f.value) == null ? void 0 : H.options) == null ? void 0 : R.isSelected) || !1, S = (x = (V = f.value) == null ? void 0 : V.options) == null ? void 0 : x.scaleMode, A = (tt = (F = f.value) == null ? void 0 : F.options) == null ? void 0 : tt.scaleAspectRatio, E = (Kt = (Xt = f.value) == null ? void 0 : Xt.options) == null ? void 0 : Kt.trackIndex;
3394
3399
  let T = {};
3395
3400
  f.key === di ? T = await va(y, (Ie = f.value) == null ? void 0 : Ie.payload) : f.key === hi ? T = await da(y, (be = f.value) == null ? void 0 : be.payload, {
3396
3401
  trackIndex: E
@@ -3405,12 +3410,12 @@ function Sa(t) {
3405
3410
  scaleAspectRatio: A,
3406
3411
  targetTrackIndex: E,
3407
3412
  targetTrackId: (st = (Se = f.value) == null ? void 0 : Se.options) == null ? void 0 : st.targetTrackId
3408
- }) : f.key === ui ? T = await ya(y, (Kt = f.value) == null ? void 0 : Kt.payload, {
3413
+ }) : f.key === ui ? T = await ya(y, (Vt = f.value) == null ? void 0 : Vt.payload, {
3409
3414
  scaleMode: S,
3410
3415
  scaleAspectRatio: A,
3411
3416
  targetTrackIndex: E,
3412
3417
  targetTrackId: ($ = f.value) == null ? void 0 : $.options.targetTrackId
3413
- }) : f.key === li ? T = await ga(y, (Vt = f.value) == null ? void 0 : Vt.payload, {
3418
+ }) : f.key === li ? T = await ga(y, (qt = f.value) == null ? void 0 : qt.payload, {
3414
3419
  scaleMode: S,
3415
3420
  scaleAspectRatio: A,
3416
3421
  targetTrackIndex: E,
@@ -3419,26 +3424,26 @@ function Sa(t) {
3419
3424
  scaleMode: S,
3420
3425
  scaleAspectRatio: A,
3421
3426
  targetTrackIndex: E,
3422
- targetTrackId: (qt = f.value) == null ? void 0 : qt.options.targetTrackId
3423
- }) : f.key === ci ? T = await fa(y, (Jt = f.value) == null ? void 0 : Jt.payload, {
3427
+ targetTrackId: (Jt = f.value) == null ? void 0 : Jt.options.targetTrackId
3428
+ }) : f.key === ci ? T = await fa(y, (Zt = f.value) == null ? void 0 : Zt.payload, {
3424
3429
  scaleMode: S,
3425
3430
  scaleAspectRatio: A,
3426
3431
  targetTrackIndex: E,
3427
3432
  targetTrackId: (Rt = f.value) == null ? void 0 : Rt.options.targetTrackId
3428
3433
  }) : f.key === oi ? T = await pa(y, (Pt = f.value) == null ? void 0 : Pt.payload, {
3429
3434
  targetTrackIndex: E,
3430
- targetTrackId: (Zt = f.value) == null ? void 0 : Zt.options.targetTrackId
3435
+ targetTrackId: (Qt = f.value) == null ? void 0 : Qt.options.targetTrackId
3431
3436
  }) : f.key === ai ? T = await ha(y, (Dt = f.value) == null ? void 0 : Dt.payload, {
3432
3437
  scaleMode: S,
3433
3438
  scaleAspectRatio: A,
3434
3439
  targetTrackIndex: E,
3435
- targetTrackId: (Qt = f.value) == null ? void 0 : Qt.options.targetTrackId
3440
+ targetTrackId: (te = f.value) == null ? void 0 : te.options.targetTrackId
3436
3441
  }) : f.key === mi ? T = await Ia(y, (zt = f.value) == null ? void 0 : zt.payload, {
3437
3442
  scaleMode: S,
3438
3443
  scaleAspectRatio: A,
3439
3444
  targetTrackIndex: E,
3440
- targetTrackId: (te = f.value) == null ? void 0 : te.options.targetTrackId
3441
- }) : f.key === gi ? T = await de(
3445
+ targetTrackId: (ee = f.value) == null ? void 0 : ee.options.targetTrackId
3446
+ }) : f.key === gi ? T = await fe(
3442
3447
  y,
3443
3448
  (Te = f.value) == null ? void 0 : Te.payload,
3444
3449
  {
@@ -3446,15 +3451,15 @@ function Sa(t) {
3446
3451
  targetTrackId: (_t = (Ae = f.value) == null ? void 0 : Ae.options) == null ? void 0 : _t.targetTrackId
3447
3452
  },
3448
3453
  "progress-bar"
3449
- ) : f.key === ki ? T = await de(
3454
+ ) : f.key === ki ? T = await fe(
3450
3455
  y,
3451
3456
  ($t = f.value) == null ? void 0 : $t.payload,
3452
3457
  {
3453
3458
  targetTrackIndex: E,
3454
- targetTrackId: (re = (ee = f.value) == null ? void 0 : ee.options) == null ? void 0 : re.targetTrackId
3459
+ targetTrackId: (ne = (re = f.value) == null ? void 0 : re.options) == null ? void 0 : ne.targetTrackId
3455
3460
  },
3456
3461
  "progress-square"
3457
- ) : f.key === yi ? T = await de(
3462
+ ) : f.key === yi ? T = await fe(
3458
3463
  y,
3459
3464
  (ct = f.value) == null ? void 0 : ct.payload,
3460
3465
  {
@@ -3462,7 +3467,7 @@ function Sa(t) {
3462
3467
  targetTrackId: (Ee = (St = f.value) == null ? void 0 : St.options) == null ? void 0 : Ee.targetTrackId
3463
3468
  },
3464
3469
  "progress-frame"
3465
- ) : f.key === Ii ? T = await de(
3470
+ ) : f.key === Ii ? T = await fe(
3466
3471
  y,
3467
3472
  (gt = f.value) == null ? void 0 : gt.payload,
3468
3473
  {
@@ -3470,15 +3475,15 @@ function Sa(t) {
3470
3475
  targetTrackId: (Ft = (wt = f.value) == null ? void 0 : wt.options) == null ? void 0 : Ft.targetTrackId
3471
3476
  },
3472
3477
  "radial-audio-bars"
3473
- ) : f.key === bi ? T = await de(
3478
+ ) : f.key === bi ? T = await fe(
3474
3479
  y,
3475
3480
  (et = f.value) == null ? void 0 : et.payload,
3476
3481
  {
3477
3482
  targetTrackIndex: E,
3478
- targetTrackId: (se = (ne = f.value) == null ? void 0 : ne.options) == null ? void 0 : se.targetTrackId
3483
+ targetTrackId: (ie = (se = f.value) == null ? void 0 : se.options) == null ? void 0 : ie.targetTrackId
3479
3484
  },
3480
3485
  "lineal-audio-bars"
3481
- ) : f.key === vi ? T = await de(
3486
+ ) : f.key === vi ? T = await fe(
3482
3487
  y,
3483
3488
  (Me = f.value) == null ? void 0 : Me.payload,
3484
3489
  {
@@ -3486,9 +3491,9 @@ function Sa(t) {
3486
3491
  targetTrackId: (Tt = (Lt = f.value) == null ? void 0 : Lt.options) == null ? void 0 : Tt.targetTrackId
3487
3492
  },
3488
3493
  "wave-audio-bars"
3489
- ) : f.key === _i && (T = await de(
3494
+ ) : f.key === _i && (T = await fe(
3490
3495
  y,
3491
- (ie = f.value) == null ? void 0 : ie.payload,
3496
+ (ae = f.value) == null ? void 0 : ae.payload,
3492
3497
  {
3493
3498
  targetTrackIndex: E,
3494
3499
  targetTrackId: (yt = (At = f.value) == null ? void 0 : At.options) == null ? void 0 : yt.targetTrackId
@@ -3546,7 +3551,7 @@ function Sa(t) {
3546
3551
  });
3547
3552
  return {
3548
3553
  unsubscribe: () => {
3549
- _.unsubscribe(), k.unsubscribe(), w.unsubscribe(), b.unsubscribe(), I.unsubscribe(), m.unsubscribe(), h.unsubscribe(), p.unsubscribe();
3554
+ _.unsubscribe(), k.unsubscribe(), w.unsubscribe(), b.unsubscribe(), I.unsubscribe(), h.unsubscribe(), m.unsubscribe(), p.unsubscribe();
3550
3555
  }
3551
3556
  };
3552
3557
  }
@@ -3556,7 +3561,7 @@ function xs(t, r, e = { cyclesFix: !0 }, n = []) {
3556
3561
  let i = [];
3557
3562
  const o = Array.isArray(t);
3558
3563
  for (const p in t) {
3559
- const m = t[p], b = o ? +p : p;
3564
+ const h = t[p], b = o ? +p : p;
3560
3565
  if (!(p in r)) {
3561
3566
  i.push({
3562
3567
  type: "REMOVE",
@@ -3565,13 +3570,13 @@ function xs(t, r, e = { cyclesFix: !0 }, n = []) {
3565
3570
  });
3566
3571
  continue;
3567
3572
  }
3568
- const h = r[p], I = typeof m == "object" && typeof h == "object" && Array.isArray(m) === Array.isArray(h);
3569
- m && h && I && !wa[(d = (u = Object.getPrototypeOf(m)) == null ? void 0 : u.constructor) == null ? void 0 : d.name] && (!e.cyclesFix || !n.includes(m)) ? i.push.apply(i, xs(m, h, e, e.cyclesFix ? n.concat([m]) : []).map((_) => (_.path.unshift(b), _))) : m !== h && // treat NaN values as equivalent
3570
- !(Number.isNaN(m) && Number.isNaN(h)) && !(I && (isNaN(m) ? m + "" == h + "" : +m == +h)) && i.push({
3573
+ const m = r[p], I = typeof h == "object" && typeof m == "object" && Array.isArray(h) === Array.isArray(m);
3574
+ h && m && I && !wa[(d = (u = Object.getPrototypeOf(h)) == null ? void 0 : u.constructor) == null ? void 0 : d.name] && (!e.cyclesFix || !n.includes(h)) ? i.push.apply(i, xs(h, m, e, e.cyclesFix ? n.concat([h]) : []).map((_) => (_.path.unshift(b), _))) : h !== m && // treat NaN values as equivalent
3575
+ !(Number.isNaN(h) && Number.isNaN(m)) && !(I && (isNaN(h) ? h + "" == m + "" : +h == +m)) && i.push({
3571
3576
  path: [b],
3572
3577
  type: "CHANGE",
3573
- value: h,
3574
- oldValue: m
3578
+ value: m,
3579
+ oldValue: h
3575
3580
  });
3576
3581
  }
3577
3582
  const c = Array.isArray(r);
@@ -3627,7 +3632,7 @@ var he = Object.getPrototypeOf;
3627
3632
  function me(t) {
3628
3633
  return !!t && !!t[ut];
3629
3634
  }
3630
- function Bt(t) {
3635
+ function Yt(t) {
3631
3636
  var r;
3632
3637
  return t ? Cs(t) || Array.isArray(t) || !!t[qe] || !!((r = t.constructor) != null && r[qe]) || sr(t) || ir(t) : !1;
3633
3638
  }
@@ -3669,7 +3674,7 @@ function sr(t) {
3669
3674
  function ir(t) {
3670
3675
  return t instanceof Set;
3671
3676
  }
3672
- function fe(t) {
3677
+ function pe(t) {
3673
3678
  return t.copy_ || t.base_;
3674
3679
  }
3675
3680
  function Tn(t, r) {
@@ -3704,7 +3709,7 @@ function Tn(t, r) {
3704
3709
  }
3705
3710
  }
3706
3711
  function $n(t, r = !1) {
3707
- return Mr(t) || me(t) || !Bt(t) || (ge(t) > 1 && (t.set = t.add = t.clear = t.delete = Ea), Object.freeze(t), r && Object.entries(t).forEach(([e, n]) => $n(n, !0))), t;
3712
+ return Mr(t) || me(t) || !Yt(t) || (ge(t) > 1 && (t.set = t.add = t.clear = t.delete = Ea), Object.freeze(t), r && Object.entries(t).forEach(([e, n]) => $n(n, !0))), t;
3708
3713
  }
3709
3714
  function Ea() {
3710
3715
  B(2);
@@ -3754,7 +3759,7 @@ function Oa(t) {
3754
3759
  function Zn(t, r) {
3755
3760
  r.unfinalizedDrafts_ = r.drafts_.length;
3756
3761
  const e = r.drafts_[0];
3757
- return t !== void 0 && t !== e ? (e[ut].modified_ && (En(r), B(4)), Bt(t) && (t = wr(r, t), r.parent_ || Tr(r, t)), r.patches_ && ye("Patches").generateReplacementPatches_(
3762
+ return t !== void 0 && t !== e ? (e[ut].modified_ && (En(r), B(4)), Yt(t) && (t = wr(r, t), r.parent_ || Tr(r, t)), r.patches_ && ye("Patches").generateReplacementPatches_(
3758
3763
  e[ut].base_,
3759
3764
  t,
3760
3765
  r.patches_,
@@ -3799,7 +3804,7 @@ function Qn(t, r, e, n, i, o, c) {
3799
3804
  else
3800
3805
  return;
3801
3806
  } else c && e.add(i);
3802
- if (Bt(i) && !Mr(i)) {
3807
+ if (Yt(i) && !Mr(i)) {
3803
3808
  if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
3804
3809
  return;
3805
3810
  wr(t, i), (!r || !r.scope_.parent_) && typeof n != "symbol" && Object.prototype.propertyIsEnumerable.call(e, n) && Tr(t, i);
@@ -3841,24 +3846,24 @@ var Fn = {
3841
3846
  get(t, r) {
3842
3847
  if (r === ut)
3843
3848
  return t;
3844
- const e = fe(t);
3849
+ const e = pe(t);
3845
3850
  if (!Ze(e, r))
3846
3851
  return Ra(t, e, r);
3847
3852
  const n = e[r];
3848
- return t.finalized_ || !Bt(n) ? n : n === yn(t.base_, r) ? (In(t), t.copy_[r] = On(n, t)) : n;
3853
+ return t.finalized_ || !Yt(n) ? n : n === yn(t.base_, r) ? (In(t), t.copy_[r] = On(n, t)) : n;
3849
3854
  },
3850
3855
  has(t, r) {
3851
- return r in fe(t);
3856
+ return r in pe(t);
3852
3857
  },
3853
3858
  ownKeys(t) {
3854
- return Reflect.ownKeys(fe(t));
3859
+ return Reflect.ownKeys(pe(t));
3855
3860
  },
3856
3861
  set(t, r, e) {
3857
- const n = Ds(fe(t), r);
3862
+ const n = Ds(pe(t), r);
3858
3863
  if (n != null && n.set)
3859
3864
  return n.set.call(t.draft_, e), !0;
3860
3865
  if (!t.modified_) {
3861
- const i = yn(fe(t), r), o = i == null ? void 0 : i[ut];
3866
+ const i = yn(pe(t), r), o = i == null ? void 0 : i[ut];
3862
3867
  if (o && o.base_ === e)
3863
3868
  return t.copy_[r] = e, t.assigned_[r] = !1, !0;
3864
3869
  if (Aa(e, i) && (e !== void 0 || Ze(t.base_, r)))
@@ -3875,7 +3880,7 @@ var Fn = {
3875
3880
  // Note: We never coerce `desc.value` into an Immer draft, because we can't make
3876
3881
  // the same guarantee in ES5 mode.
3877
3882
  getOwnPropertyDescriptor(t, r) {
3878
- const e = fe(t), n = Reflect.getOwnPropertyDescriptor(e, r);
3883
+ const e = pe(t), n = Reflect.getOwnPropertyDescriptor(e, r);
3879
3884
  return n && {
3880
3885
  writable: !0,
3881
3886
  configurable: t.type_ !== 1 || r !== "length",
@@ -3906,7 +3911,7 @@ tr.set = function(t, r, e) {
3906
3911
  };
3907
3912
  function yn(t, r) {
3908
3913
  const e = t[ut];
3909
- return (e ? fe(e) : t)[r];
3914
+ return (e ? pe(e) : t)[r];
3910
3915
  }
3911
3916
  function Ra(t, r, e) {
3912
3917
  var i;
@@ -3945,12 +3950,12 @@ var Pa = class {
3945
3950
  e = r;
3946
3951
  const c = this;
3947
3952
  return function(d = o, ...p) {
3948
- return c.produce(d, (m) => e.call(this, m, ...p));
3953
+ return c.produce(d, (h) => e.call(this, h, ...p));
3949
3954
  };
3950
3955
  }
3951
3956
  typeof e != "function" && B(6), n !== void 0 && typeof n != "function" && B(7);
3952
3957
  let i;
3953
- if (Bt(r)) {
3958
+ if (Yt(r)) {
3954
3959
  const o = Jn(this), c = On(r, void 0);
3955
3960
  let u = !0;
3956
3961
  try {
@@ -3977,7 +3982,7 @@ var Pa = class {
3977
3982
  }, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
3978
3983
  }
3979
3984
  createDraft(t) {
3980
- Bt(t) || B(8), me(t) && (t = Da(t));
3985
+ Yt(t) || B(8), me(t) && (t = Da(t));
3981
3986
  const r = Jn(this), e = On(t, void 0);
3982
3987
  return e[ut].isManual_ = !0, Mn(r), e;
3983
3988
  }
@@ -4028,7 +4033,7 @@ function Da(t) {
4028
4033
  return me(t) || B(10, t), zs(t);
4029
4034
  }
4030
4035
  function zs(t) {
4031
- if (!Bt(t) || Mr(t))
4036
+ if (!Yt(t) || Mr(t))
4032
4037
  return t;
4033
4038
  const r = t[ut];
4034
4039
  let e;
@@ -4045,38 +4050,38 @@ function zs(t) {
4045
4050
  function ts() {
4046
4051
  process.env.NODE_ENV !== "production" && Os.push(
4047
4052
  'Sets cannot have "replace" patches.',
4048
- function(h) {
4049
- return "Unsupported patch operation: " + h;
4053
+ function(m) {
4054
+ return "Unsupported patch operation: " + m;
4050
4055
  },
4051
- function(h) {
4052
- return "Cannot apply patch, path doesn't resolve: " + h;
4056
+ function(m) {
4057
+ return "Cannot apply patch, path doesn't resolve: " + m;
4053
4058
  },
4054
4059
  "Patching reserved attributes like __proto__, prototype and constructor is not allowed"
4055
4060
  );
4056
4061
  const r = "replace", e = "add", n = "remove";
4057
- function i(h, I, _, k) {
4058
- switch (h.type_) {
4062
+ function i(m, I, _, k) {
4063
+ switch (m.type_) {
4059
4064
  case 0:
4060
4065
  case 2:
4061
4066
  return c(
4062
- h,
4067
+ m,
4063
4068
  I,
4064
4069
  _,
4065
4070
  k
4066
4071
  );
4067
4072
  case 1:
4068
- return o(h, I, _, k);
4073
+ return o(m, I, _, k);
4069
4074
  case 3:
4070
4075
  return u(
4071
- h,
4076
+ m,
4072
4077
  I,
4073
4078
  _,
4074
4079
  k
4075
4080
  );
4076
4081
  }
4077
4082
  }
4078
- function o(h, I, _, k) {
4079
- let { base_: w, assigned_: f } = h, y = h.copy_;
4083
+ function o(m, I, _, k) {
4084
+ let { base_: w, assigned_: f } = m, y = m.copy_;
4080
4085
  y.length < w.length && ([w, y] = [y, w], [_, k] = [k, _]);
4081
4086
  for (let v = 0; v < w.length; v++)
4082
4087
  if (f[v] && y[v] !== w[v]) {
@@ -4111,9 +4116,9 @@ function ts() {
4111
4116
  });
4112
4117
  }
4113
4118
  }
4114
- function c(h, I, _, k) {
4115
- const { base_: w, copy_: f } = h;
4116
- Je(h.assigned_, (y, v) => {
4119
+ function c(m, I, _, k) {
4120
+ const { base_: w, copy_: f } = m;
4121
+ Je(m.assigned_, (y, v) => {
4117
4122
  const S = gn(w, y), A = gn(f, y), E = v ? Ze(w, y) ? r : e : n;
4118
4123
  if (S === A && E === r)
4119
4124
  return;
@@ -4123,8 +4128,8 @@ function ts() {
4123
4128
  );
4124
4129
  });
4125
4130
  }
4126
- function u(h, I, _, k) {
4127
- let { base_: w, copy_: f } = h, y = 0;
4131
+ function u(m, I, _, k) {
4132
+ let { base_: w, copy_: f } = m, y = 0;
4128
4133
  w.forEach((v) => {
4129
4134
  if (!f.has(v)) {
4130
4135
  const S = I.concat([y]);
@@ -4155,7 +4160,7 @@ function ts() {
4155
4160
  y++;
4156
4161
  });
4157
4162
  }
4158
- function d(h, I, _, k) {
4163
+ function d(m, I, _, k) {
4159
4164
  _.push({
4160
4165
  op: r,
4161
4166
  path: [],
@@ -4163,19 +4168,19 @@ function ts() {
4163
4168
  }), k.push({
4164
4169
  op: r,
4165
4170
  path: [],
4166
- value: h
4171
+ value: m
4167
4172
  });
4168
4173
  }
4169
- function p(h, I) {
4174
+ function p(m, I) {
4170
4175
  return I.forEach((_) => {
4171
4176
  const { path: k, op: w } = _;
4172
- let f = h;
4177
+ let f = m;
4173
4178
  for (let A = 0; A < k.length - 1; A++) {
4174
4179
  const E = ge(f);
4175
4180
  let T = k[A];
4176
4181
  typeof T != "string" && typeof T != "number" && (T = "" + T), (E === 0 || E === 1) && (T === "__proto__" || T === "constructor") && B(19), typeof f == "function" && T === "prototype" && B(19), f = gn(f, T), typeof f != "object" && B(18, k.join("/"));
4177
4182
  }
4178
- const y = ge(f), v = m(_.value), S = k[k.length - 1];
4183
+ const y = ge(f), v = h(_.value), S = k[k.length - 1];
4179
4184
  switch (w) {
4180
4185
  case r:
4181
4186
  switch (y) {
@@ -4211,26 +4216,26 @@ function ts() {
4211
4216
  default:
4212
4217
  B(17, w);
4213
4218
  }
4214
- }), h;
4215
- }
4216
- function m(h) {
4217
- if (!Bt(h))
4218
- return h;
4219
- if (Array.isArray(h))
4220
- return h.map(m);
4221
- if (sr(h))
4219
+ }), m;
4220
+ }
4221
+ function h(m) {
4222
+ if (!Yt(m))
4223
+ return m;
4224
+ if (Array.isArray(m))
4225
+ return m.map(h);
4226
+ if (sr(m))
4222
4227
  return new Map(
4223
- Array.from(h.entries()).map(([_, k]) => [_, m(k)])
4228
+ Array.from(m.entries()).map(([_, k]) => [_, h(k)])
4224
4229
  );
4225
- if (ir(h))
4226
- return new Set(Array.from(h).map(m));
4227
- const I = Object.create(he(h));
4228
- for (const _ in h)
4229
- I[_] = m(h[_]);
4230
- return Ze(h, qe) && (I[qe] = h[qe]), I;
4230
+ if (ir(m))
4231
+ return new Set(Array.from(m).map(h));
4232
+ const I = Object.create(he(m));
4233
+ for (const _ in m)
4234
+ I[_] = h(m[_]);
4235
+ return Ze(m, qe) && (I[qe] = m[qe]), I;
4231
4236
  }
4232
- function b(h) {
4233
- return me(h) ? m(h) : h;
4237
+ function b(m) {
4238
+ return me(m) ? h(m) : m;
4234
4239
  }
4235
4240
  Ma("Patches", {
4236
4241
  applyPatches_: p,
@@ -4563,14 +4568,14 @@ class Bo {
4563
4568
  transitionsMap: u,
4564
4569
  trackItemsMap: d,
4565
4570
  structure: p
4566
- } = this.getState(), m = C({
4571
+ } = this.getState(), h = C({
4567
4572
  trackItemIds: i,
4568
4573
  tracks: o,
4569
4574
  transitionIds: c,
4570
4575
  transitionsMap: u,
4571
4576
  trackItemsMap: d,
4572
4577
  structure: p
4573
- }), b = [], h = [], I = [], _ = [], k = [], w = [];
4578
+ }), b = [], m = [], I = [], _ = [], k = [], w = [];
4574
4579
  e.forEach((x) => {
4575
4580
  let F;
4576
4581
  const tt = x.path.slice(1);
@@ -4586,25 +4591,25 @@ class Bo {
4586
4591
  path: tt,
4587
4592
  op: "add",
4588
4593
  value: x.oldValue
4589
- }, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? h.push(F) : x.path.includes("trackItemsMap") ? k.push(F) : x.path.includes("transitionsMap") ? _.push(F) : x.path.includes("tracks") ? b.push(F) : x.path.includes("structure") && w.push(F);
4594
+ }, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? m.push(F) : x.path.includes("trackItemsMap") ? k.push(F) : x.path.includes("transitionsMap") ? _.push(F) : x.path.includes("tracks") ? b.push(F) : x.path.includes("structure") && w.push(F);
4590
4595
  });
4591
4596
  const f = this.applyPatch(
4592
- m.tracks,
4597
+ h.tracks,
4593
4598
  b
4594
4599
  ), y = this.applyPatch(
4595
- m.transitionIds,
4596
- h
4600
+ h.transitionIds,
4601
+ m
4597
4602
  ), v = this.applyPatch(
4598
- m.trackItemIds,
4603
+ h.trackItemIds,
4599
4604
  I
4600
4605
  ), S = this.applyPatch(
4601
- m.transitionsMap,
4606
+ h.transitionsMap,
4602
4607
  _
4603
4608
  ), A = this.applyPatch(
4604
- m.trackItemsMap,
4609
+ h.trackItemsMap,
4605
4610
  k
4606
4611
  ), E = this.applyPatch(
4607
- m.structure,
4612
+ h.structure,
4608
4613
  w
4609
4614
  ), T = C({
4610
4615
  tracks: f,
@@ -4615,7 +4620,7 @@ class Bo {
4615
4620
  structure: E
4616
4621
  }), H = C(this.getState()), R = { ...H, ...T };
4617
4622
  this.prevState = H, this.redos.push({ redos: e, type: n });
4618
- const V = K(R.trackItemsMap);
4623
+ const V = Y(R.trackItemsMap);
4619
4624
  this.stateSubject.next({ ...R, duration: V }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 }), this.updateState(R, { updateHistory: !1 });
4620
4625
  }
4621
4626
  applyPatch(r, e) {
@@ -4634,14 +4639,14 @@ class Bo {
4634
4639
  transitionsMap: u,
4635
4640
  trackItemsMap: d,
4636
4641
  structure: p
4637
- } = this.getState(), m = C({
4642
+ } = this.getState(), h = C({
4638
4643
  trackItemIds: i,
4639
4644
  tracks: o,
4640
4645
  transitionIds: c,
4641
4646
  transitionsMap: u,
4642
4647
  trackItemsMap: d,
4643
4648
  structure: p
4644
- }), b = [], h = [], I = [], _ = [], k = [], w = [];
4649
+ }), b = [], m = [], I = [], _ = [], k = [], w = [];
4645
4650
  e.forEach((x) => {
4646
4651
  let F;
4647
4652
  const tt = x.path.slice(1);
@@ -4657,25 +4662,25 @@ class Bo {
4657
4662
  path: tt,
4658
4663
  op: "remove",
4659
4664
  value: x.oldValue
4660
- }, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? h.push(F) : x.path.includes("trackItemsMap") ? k.push(F) : x.path.includes("transitionsMap") ? _.push(F) : x.path.includes("structure") ? w.push(F) : b.push(F);
4665
+ }, x.path.includes("trackItemIds") ? I.push(F) : x.path.includes("transitionIds") ? m.push(F) : x.path.includes("trackItemsMap") ? k.push(F) : x.path.includes("transitionsMap") ? _.push(F) : x.path.includes("structure") ? w.push(F) : b.push(F);
4661
4666
  });
4662
4667
  const f = this.applyPatch(
4663
- m.tracks,
4668
+ h.tracks,
4664
4669
  b
4665
4670
  ), y = this.applyPatch(
4666
- m.transitionIds,
4667
- h
4671
+ h.transitionIds,
4672
+ m
4668
4673
  ), v = this.applyPatch(
4669
- m.trackItemIds,
4674
+ h.trackItemIds,
4670
4675
  I
4671
4676
  ), S = this.applyPatch(
4672
- m.transitionsMap,
4677
+ h.transitionsMap,
4673
4678
  _
4674
4679
  ), A = this.applyPatch(
4675
- m.trackItemsMap,
4680
+ h.trackItemsMap,
4676
4681
  k
4677
4682
  ), E = this.applyPatch(
4678
- m.structure,
4683
+ h.structure,
4679
4684
  w
4680
4685
  ), T = C({
4681
4686
  tracks: f,
@@ -4686,7 +4691,7 @@ class Bo {
4686
4691
  structure: E
4687
4692
  }), H = C(this.getState()), R = { ...H, ...T };
4688
4693
  this.prevState = H, this.undos.push({ undos: e, type: n });
4689
- const V = K(R.trackItemsMap);
4694
+ const V = Y(R.trackItemsMap);
4690
4695
  this.stateSubject.next({ ...R, duration: V }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 }), this.updateState(R, { updateHistory: !1 });
4691
4696
  }
4692
4697
  toJSON() {
@@ -4749,7 +4754,7 @@ export {
4749
4754
  Ai as EDIT_BACKGROUND_EDITOR,
4750
4755
  Xn as EDIT_BULK,
4751
4756
  wi as EDIT_OBJECT,
4752
- Yt as EDIT_PREFIX,
4757
+ Gt as EDIT_PREFIX,
4753
4758
  Ao as EDIT_SHAPE,
4754
4759
  Eo as EDIT_TEMPLATE_ITEM,
4755
4760
  To as EDIT_TEXT,