@designcombo/state 0.1.11 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.es.js CHANGED
@@ -1,24 +1,24 @@
1
1
  var si = Object.defineProperty;
2
2
  var oi = (t, r, n) => r in t ? si(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
3
- var Et = (t, r, n) => oi(t, typeof r != "symbol" ? r + "" : r, n);
4
- import { subject as $t, filter as Kt, DESIGN_PREFIX as ci, ADD_PREFIX as ui, LAYER_PREFIX as fi, HISTORY_PREFIX as li, ACTIVE_PREFIX as pi, EDIT_PREFIX as di, DESIGN_LOAD as hi, HISTORY_UNDO as yi, HISTORY_REDO as mi, LAYER_DELETE as bi, ADD_CAPTION as gi, ADD_TEXT as _i, ADD_IMAGE as vi, ADD_AUDIO as Ii, ADD_VIDEO as Si, ACTIVE_SPLIT as wi, ACTIVE_CLONE as Ti, ACTIVE_PASTE as Ai, EDIT_OBJECT as Ei } from "@designcombo/events";
5
- var nn = function(t, r) {
6
- return nn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
3
+ var At = (t, r, n) => oi(t, typeof r != "symbol" ? r + "" : r, n);
4
+ import { subject as $t, filter as Kt, DESIGN_PREFIX as ci, ADD_PREFIX as ui, LAYER_PREFIX as li, HISTORY_PREFIX as fi, ACTIVE_PREFIX as pi, EDIT_PREFIX as di, DESIGN_LOAD as hi, HISTORY_UNDO as yi, HISTORY_REDO as mi, LAYER_DELETE as bi, ADD_CAPTION as gi, ADD_TEXT as _i, ADD_IMAGE as vi, ADD_AUDIO as Ii, ADD_VIDEO as Si, ACTIVE_SPLIT as wi, ACTIVE_CLONE as Ti, ACTIVE_PASTE as ki, EDIT_OBJECT as Ai } from "@designcombo/events";
5
+ var an = function(t, r) {
6
+ return an = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
7
7
  n.__proto__ = i;
8
8
  } || function(n, i) {
9
9
  for (var o in i) Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o]);
10
- }, nn(t, r);
10
+ }, an(t, r);
11
11
  };
12
12
  function be(t, r) {
13
13
  if (typeof r != "function" && r !== null)
14
14
  throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
15
- nn(t, r);
15
+ an(t, r);
16
16
  function n() {
17
17
  this.constructor = t;
18
18
  }
19
19
  t.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype, new n());
20
20
  }
21
- function an(t) {
21
+ function sn(t) {
22
22
  var r = typeof Symbol == "function" && Symbol.iterator, n = r && t[r], i = 0;
23
23
  if (n) return n.call(t);
24
24
  if (t && typeof t.length == "number") return {
@@ -28,24 +28,24 @@ function an(t) {
28
28
  };
29
29
  throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
30
30
  }
31
- function sn(t, r) {
31
+ function on(t, r) {
32
32
  var n = typeof Symbol == "function" && t[Symbol.iterator];
33
33
  if (!n) return t;
34
- var i = n.call(t), o, c = [], l;
34
+ var i = n.call(t), o, c = [], f;
35
35
  try {
36
36
  for (; (r === void 0 || r-- > 0) && !(o = i.next()).done; ) c.push(o.value);
37
37
  } catch (d) {
38
- l = { error: d };
38
+ f = { error: d };
39
39
  } finally {
40
40
  try {
41
41
  o && !o.done && (n = i.return) && n.call(i);
42
42
  } finally {
43
- if (l) throw l.error;
43
+ if (f) throw f.error;
44
44
  }
45
45
  }
46
46
  return c;
47
47
  }
48
- function on(t, r, n) {
48
+ function cn(t, r, n) {
49
49
  if (n || arguments.length === 2) for (var i = 0, o = r.length, c; i < o; i++)
50
50
  (c || !(i in r)) && (c || (c = Array.prototype.slice.call(r, 0, i)), c[i] = r[i]);
51
51
  return t.concat(c || Array.prototype.slice.call(r));
@@ -68,7 +68,7 @@ var Zr = Gn(function(t) {
68
68
  `) : "", this.name = "UnsubscriptionError", this.errors = n;
69
69
  };
70
70
  });
71
- function cn(t, r) {
71
+ function un(t, r) {
72
72
  if (t) {
73
73
  var n = t.indexOf(r);
74
74
  0 <= n && t.splice(n, 1);
@@ -82,16 +82,16 @@ var tr = function() {
82
82
  var r, n, i, o, c;
83
83
  if (!this.closed) {
84
84
  this.closed = !0;
85
- var l = this._parentage;
86
- if (l)
87
- if (this._parentage = null, Array.isArray(l))
85
+ var f = this._parentage;
86
+ if (f)
87
+ if (this._parentage = null, Array.isArray(f))
88
88
  try {
89
- for (var d = an(l), E = d.next(); !E.done; E = d.next()) {
89
+ for (var d = sn(f), E = d.next(); !E.done; E = d.next()) {
90
90
  var j = E.value;
91
91
  j.remove(this);
92
92
  }
93
- } catch (f) {
94
- r = { error: f };
93
+ } catch (l) {
94
+ r = { error: l };
95
95
  } finally {
96
96
  try {
97
97
  E && !E.done && (n = d.return) && n.call(d);
@@ -100,31 +100,31 @@ var tr = function() {
100
100
  }
101
101
  }
102
102
  else
103
- l.remove(this);
103
+ f.remove(this);
104
104
  var S = this.initialTeardown;
105
105
  if (yt(S))
106
106
  try {
107
107
  S();
108
- } catch (f) {
109
- c = f instanceof Zr ? f.errors : [f];
108
+ } catch (l) {
109
+ c = l instanceof Zr ? l.errors : [l];
110
110
  }
111
111
  var N = this._finalizers;
112
112
  if (N) {
113
113
  this._finalizers = null;
114
114
  try {
115
- for (var y = an(N), p = y.next(); !p.done; p = y.next()) {
115
+ for (var m = sn(N), p = m.next(); !p.done; p = m.next()) {
116
116
  var h = p.value;
117
117
  try {
118
- Tn(h);
119
- } catch (f) {
120
- c = c ?? [], f instanceof Zr ? c = on(on([], sn(c)), sn(f.errors)) : c.push(f);
118
+ kn(h);
119
+ } catch (l) {
120
+ c = c ?? [], l instanceof Zr ? c = cn(cn([], on(c)), on(l.errors)) : c.push(l);
121
121
  }
122
122
  }
123
- } catch (f) {
124
- i = { error: f };
123
+ } catch (l) {
124
+ i = { error: l };
125
125
  } finally {
126
126
  try {
127
- p && !p.done && (o = y.return) && o.call(y);
127
+ p && !p.done && (o = m.return) && o.call(m);
128
128
  } finally {
129
129
  if (i) throw i.error;
130
130
  }
@@ -137,7 +137,7 @@ var tr = function() {
137
137
  var n;
138
138
  if (r && r !== this)
139
139
  if (this.closed)
140
- Tn(r);
140
+ kn(r);
141
141
  else {
142
142
  if (r instanceof t) {
143
143
  if (r.closed || r._hasParent(this))
@@ -154,10 +154,10 @@ var tr = function() {
154
154
  this._parentage = Array.isArray(n) ? (n.push(r), n) : n ? [n, r] : r;
155
155
  }, t.prototype._removeParent = function(r) {
156
156
  var n = this._parentage;
157
- n === r ? this._parentage = null : Array.isArray(n) && cn(n, r);
157
+ n === r ? this._parentage = null : Array.isArray(n) && un(n, r);
158
158
  }, t.prototype.remove = function(r) {
159
159
  var n = this._finalizers;
160
- n && cn(n, r), r instanceof t && r._removeParent(this);
160
+ n && un(n, r), r instanceof t && r._removeParent(this);
161
161
  }, t.EMPTY = function() {
162
162
  var r = new t();
163
163
  return r.closed = !0, r;
@@ -166,7 +166,7 @@ var tr = function() {
166
166
  function Bn(t) {
167
167
  return t instanceof tr || t && "closed" in t && yt(t.remove) && yt(t.add) && yt(t.unsubscribe);
168
168
  }
169
- function Tn(t) {
169
+ function kn(t) {
170
170
  yt(t) ? t() : t.unsubscribe();
171
171
  }
172
172
  var $n = {
@@ -179,7 +179,7 @@ var $n = {
179
179
  setTimeout: function(t, r) {
180
180
  for (var n = [], i = 2; i < arguments.length; i++)
181
181
  n[i - 2] = arguments[i];
182
- return setTimeout.apply(void 0, on([t, r], sn(n)));
182
+ return setTimeout.apply(void 0, cn([t, r], on(n)));
183
183
  },
184
184
  clearTimeout: function(t) {
185
185
  var r = Kn.delegate;
@@ -187,7 +187,7 @@ var $n = {
187
187
  },
188
188
  delegate: void 0
189
189
  };
190
- function ki(t) {
190
+ function Ei(t) {
191
191
  Kn.setTimeout(function() {
192
192
  throw t;
193
193
  });
@@ -204,7 +204,7 @@ var Yn = function(t) {
204
204
  return i.isStopped = !1, n ? (i.destination = n, Bn(n) && n.add(i)) : i.destination = Pi, i;
205
205
  }
206
206
  return r.create = function(n, i, o) {
207
- return new un(n, i, o);
207
+ return new ln(n, i, o);
208
208
  }, r.prototype.next = function(n) {
209
209
  this.isStopped || this._next(n);
210
210
  }, r.prototype.error = function(n) {
@@ -263,12 +263,12 @@ var xi = function() {
263
263
  Ye(n);
264
264
  }
265
265
  }, t;
266
- }(), un = function(t) {
266
+ }(), ln = function(t) {
267
267
  be(r, t);
268
268
  function r(n, i, o) {
269
- var c = t.call(this) || this, l;
269
+ var c = t.call(this) || this, f;
270
270
  if (yt(n) || !n)
271
- l = {
271
+ f = {
272
272
  next: n ?? void 0,
273
273
  error: i ?? void 0,
274
274
  complete: o ?? void 0
@@ -277,18 +277,18 @@ var xi = function() {
277
277
  var d;
278
278
  c && $n.useDeprecatedNextContext ? (d = Object.create(n), d.unsubscribe = function() {
279
279
  return c.unsubscribe();
280
- }, l = {
280
+ }, f = {
281
281
  next: n.next && Qr(n.next, d),
282
282
  error: n.error && Qr(n.error, d),
283
283
  complete: n.complete && Qr(n.complete, d)
284
- }) : l = n;
284
+ }) : f = n;
285
285
  }
286
- return c.destination = new xi(l), c;
286
+ return c.destination = new xi(f), c;
287
287
  }
288
288
  return r;
289
289
  }(Yn);
290
290
  function Ye(t) {
291
- ki(t);
291
+ Ei(t);
292
292
  }
293
293
  function Mi(t) {
294
294
  throw t;
@@ -319,9 +319,9 @@ var En = function() {
319
319
  var n = new t();
320
320
  return n.source = this, n.operator = r, n;
321
321
  }, t.prototype.subscribe = function(r, n, i) {
322
- var o = this, c = Ri(r) ? r : new un(r, n, i);
322
+ var o = this, c = Fi(r) ? r : new ln(r, n, i);
323
323
  return Ve(function() {
324
- var l = o, d = l.operator, E = l.source;
324
+ var f = o, d = f.operator, E = f.source;
325
325
  c.add(d ? d.call(c, E) : E ? o._subscribe(c) : o._trySubscribe(c));
326
326
  }), c;
327
327
  }, t.prototype._trySubscribe = function(r) {
@@ -332,19 +332,19 @@ var En = function() {
332
332
  }
333
333
  }, t.prototype.forEach = function(r, n) {
334
334
  var i = this;
335
- return n = kn(n), new n(function(o, c) {
336
- var l = new un({
335
+ return n = On(n), new n(function(o, c) {
336
+ var f = new ln({
337
337
  next: function(d) {
338
338
  try {
339
339
  r(d);
340
340
  } catch (E) {
341
- c(E), l.unsubscribe();
341
+ c(E), f.unsubscribe();
342
342
  }
343
343
  },
344
344
  error: c,
345
345
  complete: o
346
346
  });
347
- i.subscribe(l);
347
+ i.subscribe(f);
348
348
  });
349
349
  }, t.prototype._subscribe = function(r) {
350
350
  var n;
@@ -357,12 +357,12 @@ var En = function() {
357
357
  return ji(r)(this);
358
358
  }, t.prototype.toPromise = function(r) {
359
359
  var n = this;
360
- return r = kn(r), new r(function(i, o) {
360
+ return r = On(r), new r(function(i, o) {
361
361
  var c;
362
- n.subscribe(function(l) {
363
- return c = l;
364
- }, function(l) {
365
- return o(l);
362
+ n.subscribe(function(f) {
363
+ return c = f;
364
+ }, function(f) {
365
+ return o(f);
366
366
  }, function() {
367
367
  return i(c);
368
368
  });
@@ -371,15 +371,15 @@ var En = function() {
371
371
  return new t(r);
372
372
  }, t;
373
373
  }();
374
- function kn(t) {
374
+ function On(t) {
375
375
  var r;
376
376
  return (r = t ?? $n.Promise) !== null && r !== void 0 ? r : Promise;
377
377
  }
378
- function Fi(t) {
378
+ function Ri(t) {
379
379
  return t && yt(t.next) && yt(t.error) && yt(t.complete);
380
380
  }
381
- function Ri(t) {
382
- return t && t instanceof Yn || Fi(t) && Bn(t);
381
+ function Fi(t) {
382
+ return t && t instanceof Yn || Ri(t) && Bn(t);
383
383
  }
384
384
  var zi = Gn(function(t) {
385
385
  return function() {
@@ -392,7 +392,7 @@ var zi = Gn(function(t) {
392
392
  return n.closed = !1, n.currentObservers = null, n.observers = [], n.isStopped = !1, n.hasError = !1, n.thrownError = null, n;
393
393
  }
394
394
  return r.prototype.lift = function(n) {
395
- var i = new On(this, this);
395
+ var i = new xn(this, this);
396
396
  return i.operator = n, i;
397
397
  }, r.prototype._throwIfClosed = function() {
398
398
  if (this.closed)
@@ -404,7 +404,7 @@ var zi = Gn(function(t) {
404
404
  if (i._throwIfClosed(), !i.isStopped) {
405
405
  i.currentObservers || (i.currentObservers = Array.from(i.observers));
406
406
  try {
407
- for (var l = an(i.currentObservers), d = l.next(); !d.done; d = l.next()) {
407
+ for (var f = sn(i.currentObservers), d = f.next(); !d.done; d = f.next()) {
408
408
  var E = d.value;
409
409
  E.next(n);
410
410
  }
@@ -412,7 +412,7 @@ var zi = Gn(function(t) {
412
412
  o = { error: j };
413
413
  } finally {
414
414
  try {
415
- d && !d.done && (c = l.return) && c.call(l);
415
+ d && !d.done && (c = f.return) && c.call(f);
416
416
  } finally {
417
417
  if (o) throw o.error;
418
418
  }
@@ -451,20 +451,20 @@ var zi = Gn(function(t) {
451
451
  }, r.prototype._subscribe = function(n) {
452
452
  return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
453
453
  }, r.prototype._innerSubscribe = function(n) {
454
- var i = this, o = this, c = o.hasError, l = o.isStopped, d = o.observers;
455
- return c || l ? Wn : (this.currentObservers = null, d.push(n), new tr(function() {
456
- i.currentObservers = null, cn(d, n);
454
+ var i = this, o = this, c = o.hasError, f = o.isStopped, d = o.observers;
455
+ return c || f ? Wn : (this.currentObservers = null, d.push(n), new tr(function() {
456
+ i.currentObservers = null, un(d, n);
457
457
  }));
458
458
  }, r.prototype._checkFinalizedStatuses = function(n) {
459
- var i = this, o = i.hasError, c = i.thrownError, l = i.isStopped;
460
- o ? n.error(c) : l && n.complete();
459
+ var i = this, o = i.hasError, c = i.thrownError, f = i.isStopped;
460
+ o ? n.error(c) : f && n.complete();
461
461
  }, r.prototype.asObservable = function() {
462
462
  var n = new En();
463
463
  return n.source = this, n;
464
464
  }, r.create = function(n, i) {
465
- return new On(n, i);
465
+ return new xn(n, i);
466
466
  }, r;
467
- }(En), On = function(t) {
467
+ }(En), xn = function(t) {
468
468
  be(r, t);
469
469
  function r(n, i) {
470
470
  var o = t.call(this) || this;
@@ -483,7 +483,7 @@ var zi = Gn(function(t) {
483
483
  var i, o;
484
484
  return (o = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && o !== void 0 ? o : Wn;
485
485
  }, r;
486
- }(Vn), xn = function(t) {
486
+ }(Vn), Mn = function(t) {
487
487
  be(r, t);
488
488
  function r(n) {
489
489
  var i = t.call(this) || this;
@@ -507,30 +507,30 @@ var zi = Gn(function(t) {
507
507
  t.prototype.next.call(this, this._value = n);
508
508
  }, r;
509
509
  }(Vn), et = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
510
- function bn(t) {
510
+ function gn(t) {
511
511
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
512
512
  }
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, l = 9007199254740991, d = "[object Arguments]", E = "[object Array]", j = "[object AsyncFunction]", S = "[object Boolean]", N = "[object Date]", y = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", f = "[object Map]", g = "[object Number]", v = "[object Null]", _ = "[object Object]", b = "[object Promise]", m = "[object Proxy]", H = "[object RegExp]", O = "[object Set]", k = "[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]", R = "[object Uint16Array]", cr = "[object Uint32Array]", ur = /[\\^$.*+?()[\]{}|]/g, rt = /^\[object .+?Constructor\]$/, Se = /^(?:0|[1-9]\d*)$/, z = {};
517
- z[Dt] = z[Ct] = z[Ie] = z[ir] = z[ar] = z[sr] = z[or] = z[R] = z[cr] = !0, z[d] = z[E] = z[x] = z[S] = z[F] = z[N] = z[y] = z[p] = z[f] = z[g] = z[_] = z[H] = z[O] = z[k] = z[T] = !1;
518
- var we = typeof et == "object" && et && et.Object === Object && et, fr = typeof self == "object" && self && self.Object === Object && self, nt = we || fr || Function("return this")(), Te = r && !r.nodeType && r, Ae = Te && !0 && t && !t.nodeType && t, Yt = Ae && Ae.exports === Te, Vt = Yt && we.process, Ee = function() {
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]", N = "[object Date]", m = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", l = "[object Map]", g = "[object Number]", v = "[object Null]", _ = "[object Object]", b = "[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*)$/, H = {};
517
+ H[Dt] = H[Ct] = H[Ie] = H[ir] = H[ar] = H[sr] = H[or] = H[z] = H[cr] = !0, H[d] = H[E] = H[x] = H[S] = H[F] = H[N] = H[m] = H[p] = H[l] = H[g] = H[_] = H[R] = H[A] = H[O] = H[T] = !1;
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");
521
521
  } catch {
522
522
  }
523
- }(), Xt = Ee && Ee.isTypedArray;
524
- function ke(e, a) {
525
- for (var s = -1, u = e == null ? 0 : e.length, A = 0, I = []; ++s < u; ) {
523
+ }(), Xt = Ae && Ae.isTypedArray;
524
+ function Ee(e, a) {
525
+ for (var s = -1, u = e == null ? 0 : e.length, k = 0, I = []; ++s < u; ) {
526
526
  var P = e[s];
527
- a(P, s, e) && (I[A++] = P);
527
+ a(P, s, e) && (I[k++] = P);
528
528
  }
529
529
  return I;
530
530
  }
531
531
  function qt(e, a) {
532
- for (var s = -1, u = a.length, A = e.length; ++s < u; )
533
- e[A + s] = a[s];
532
+ for (var s = -1, u = a.length, k = e.length; ++s < u; )
533
+ e[k + s] = a[s];
534
534
  return e;
535
535
  }
536
536
  function Oe(e, a) {
@@ -539,7 +539,7 @@ Xe.exports;
539
539
  return !0;
540
540
  return !1;
541
541
  }
542
- function lr(e, a) {
542
+ function fr(e, a) {
543
543
  for (var s = -1, u = Array(e); ++s < e; )
544
544
  u[s] = a(s);
545
545
  return u;
@@ -557,8 +557,8 @@ Xe.exports;
557
557
  }
558
558
  function xe(e) {
559
559
  var a = -1, s = Array(e.size);
560
- return e.forEach(function(u, A) {
561
- s[++a] = [A, u];
560
+ return e.forEach(function(u, k) {
561
+ s[++a] = [k, u];
562
562
  }), s;
563
563
  }
564
564
  function Me(e, a) {
@@ -566,18 +566,18 @@ Xe.exports;
566
566
  return e(a(s));
567
567
  };
568
568
  }
569
- function st(e) {
569
+ function ot(e) {
570
570
  var a = -1, s = Array(e.size);
571
571
  return e.forEach(function(u) {
572
572
  s[++a] = u;
573
573
  }), s;
574
574
  }
575
- var Ft = Array.prototype, dr = Function.prototype, _t = Object.prototype, Rt = nt["__core-js_shared__"], Zt = dr.toString, Q = _t.hasOwnProperty, Pe = function() {
576
- var e = /[^.]+$/.exec(Rt && Rt.keys && Rt.keys.IE_PROTO || "");
575
+ var Rt = Array.prototype, dr = Function.prototype, _t = Object.prototype, Ft = nt["__core-js_shared__"], Zt = dr.toString, Q = _t.hasOwnProperty, Pe = function() {
576
+ var e = /[^.]+$/.exec(Ft && Ft.keys && Ft.keys.IE_PROTO || "");
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, Ht = _t.propertyIsEnumerable, vt = Ft.splice, it = zt ? zt.toStringTag : void 0, Nt = 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), lt = V(St), yr = V(re), mr = V(ne), br = V(ie), Fe = zt ? zt.prototype : void 0, ae = Fe ? Fe.valueOf : void 0;
580
+ ), Qt = Yt ? nt.Buffer : void 0, zt = nt.Symbol, Ce = nt.Uint8Array, Ht = _t.propertyIsEnumerable, vt = Rt.splice, it = zt ? zt.toStringTag : void 0, Nt = 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; ) {
@@ -626,18 +626,18 @@ Xe.exports;
626
626
  var u = a.length - 1;
627
627
  return s == u ? a.pop() : vt.call(a, s, 1), --this.size, !0;
628
628
  }
629
- function Ar(e) {
629
+ function kr(e) {
630
630
  var a = this.__data__, s = Gt(a, e);
631
631
  return s < 0 ? void 0 : a[s][1];
632
632
  }
633
- function Er(e) {
633
+ function Ar(e) {
634
634
  return Gt(this.__data__, e) > -1;
635
635
  }
636
- function kr(e, a) {
636
+ function Er(e, a) {
637
637
  var s = this.__data__, u = Gt(s, e);
638
638
  return u < 0 ? (++this.size, s.push([e, a])) : s[u][1] = a, this;
639
639
  }
640
- $.prototype.clear = wr, $.prototype.delete = Tr, $.prototype.get = Ar, $.prototype.has = Er, $.prototype.set = kr;
640
+ $.prototype.clear = wr, $.prototype.delete = Tr, $.prototype.get = kr, $.prototype.has = Ar, $.prototype.set = Er;
641
641
  function X(e) {
642
642
  var a = -1, s = e == null ? 0 : e.length;
643
643
  for (this.clear(); ++a < s; ) {
@@ -672,14 +672,14 @@ Xe.exports;
672
672
  for (this.__data__ = new X(); ++a < s; )
673
673
  this.add(e[a]);
674
674
  }
675
- function Re(e) {
675
+ function Fe(e) {
676
676
  return this.__data__.set(e, i), this;
677
677
  }
678
678
  function Lt(e) {
679
679
  return this.__data__.has(e);
680
680
  }
681
- Ut.prototype.add = Ut.prototype.push = Re, Ut.prototype.has = Lt;
682
- function ot(e) {
681
+ Ut.prototype.add = Ut.prototype.push = Fe, Ut.prototype.has = Lt;
682
+ function ct(e) {
683
683
  var a = this.__data__ = new $(e);
684
684
  this.size = a.size;
685
685
  }
@@ -693,10 +693,10 @@ Xe.exports;
693
693
  function jr(e) {
694
694
  return this.__data__.get(e);
695
695
  }
696
- function Fr(e) {
696
+ function Rr(e) {
697
697
  return this.__data__.has(e);
698
698
  }
699
- function Rr(e, a) {
699
+ function Fr(e, a) {
700
700
  var s = this.__data__;
701
701
  if (s instanceof $) {
702
702
  var u = s.__data__;
@@ -706,13 +706,13 @@ Xe.exports;
706
706
  }
707
707
  return s.set(e, a), this.size = s.size, this;
708
708
  }
709
- ot.prototype.clear = se, ot.prototype.delete = Cr, ot.prototype.get = jr, ot.prototype.has = Fr, ot.prototype.set = Rr;
709
+ ct.prototype.clear = se, ct.prototype.delete = Cr, ct.prototype.get = jr, ct.prototype.has = Rr, ct.prototype.set = Fr;
710
710
  function zr(e, a) {
711
- var s = Wt(e), u = !s && Le(e), A = !s && !u && Bt(e), I = !s && !u && !A && Be(e), P = s || u || A || I, M = P ? lr(e.length, String) : [], U = M.length;
711
+ var s = Wt(e), u = !s && Le(e), k = !s && !u && Bt(e), I = !s && !u && !k && Be(e), P = s || u || k || I, M = P ? fr(e.length, String) : [], U = M.length;
712
712
  for (var C in e)
713
713
  Q.call(e, C) && !(P && // Safari 9 has enumerable `arguments.length` in strict mode.
714
714
  (C == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
715
- A && (C == "offset" || C == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
715
+ k && (C == "offset" || C == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
716
716
  I && (C == "buffer" || C == "byteLength" || C == "byteOffset") || // Skip index properties.
717
717
  $r(C, U))) && M.push(C);
718
718
  return M;
@@ -731,13 +731,13 @@ Xe.exports;
731
731
  return e == null ? e === void 0 ? w : v : it && it in Object(e) ? dt(e) : Ne(e);
732
732
  }
733
733
  function ze(e) {
734
- return ut(e) && wt(e) == d;
734
+ return lt(e) && wt(e) == d;
735
735
  }
736
- function He(e, a, s, u, A) {
737
- return e === a ? !0 : e == null || a == null || !ut(e) && !ut(a) ? e !== e && a !== a : Hr(e, a, s, u, He, A);
736
+ function He(e, a, s, u, k) {
737
+ return e === a ? !0 : e == null || a == null || !lt(e) && !lt(a) ? e !== e && a !== a : Hr(e, a, s, u, He, k);
738
738
  }
739
- function Hr(e, a, s, u, A, I) {
740
- var P = Wt(e), M = Wt(a), U = P ? E : ct(e), C = M ? E : ct(a);
739
+ function Hr(e, a, s, u, k, I) {
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;
743
743
  if (L && Bt(e)) {
@@ -746,15 +746,15 @@ Xe.exports;
746
746
  P = !0, K = !1;
747
747
  }
748
748
  if (L && !K)
749
- return I || (I = new ot()), P || Be(e) ? ce(e, a, s, u, A, I) : Gr(e, a, U, s, u, A, I);
749
+ return I || (I = new ct()), P || Be(e) ? ce(e, a, s, u, k, I) : Gr(e, a, U, s, u, k, I);
750
750
  if (!(s & o)) {
751
751
  var Y = K && Q.call(e, "__wrapped__"), B = q && Q.call(a, "__wrapped__");
752
752
  if (Y || B) {
753
753
  var bt = Y ? e.value() : e, ht = B ? a.value() : a;
754
- return I || (I = new ot()), A(bt, ht, s, u, I);
754
+ return I || (I = new ct()), k(bt, ht, s, u, I);
755
755
  }
756
756
  }
757
- return L ? (I || (I = new ot()), Wr(e, a, s, u, A, I)) : !1;
757
+ return L ? (I || (I = new ct()), Wr(e, a, s, u, k, I)) : !1;
758
758
  }
759
759
  function Nr(e) {
760
760
  if (!We(e) || Yr(e))
@@ -763,7 +763,7 @@ Xe.exports;
763
763
  return a.test(V(e));
764
764
  }
765
765
  function Ur(e) {
766
- return ut(e) && fe(e.length) && !!z[wt(e)];
766
+ return lt(e) && le(e.length) && !!H[wt(e)];
767
767
  }
768
768
  function Lr(e) {
769
769
  if (!Vr(e))
@@ -773,7 +773,7 @@ Xe.exports;
773
773
  Q.call(e, s) && s != "constructor" && a.push(s);
774
774
  return a;
775
775
  }
776
- function ce(e, a, s, u, A, I) {
776
+ function ce(e, a, s, u, k, I) {
777
777
  var P = s & o, M = e.length, U = a.length;
778
778
  if (M != U && !(P && U > M))
779
779
  return !1;
@@ -792,21 +792,21 @@ Xe.exports;
792
792
  break;
793
793
  }
794
794
  if (L) {
795
- if (!Oe(a, function(ht, At) {
796
- if (!jt(L, At) && (Y === ht || A(Y, ht, s, u, I)))
797
- return L.push(At);
795
+ if (!Oe(a, function(ht, kt) {
796
+ if (!jt(L, kt) && (Y === ht || k(Y, ht, s, u, I)))
797
+ return L.push(kt);
798
798
  })) {
799
799
  q = !1;
800
800
  break;
801
801
  }
802
- } else if (!(Y === B || A(Y, B, s, u, I))) {
802
+ } else if (!(Y === B || k(Y, B, s, u, I))) {
803
803
  q = !1;
804
804
  break;
805
805
  }
806
806
  }
807
807
  return I.delete(e), I.delete(a), q;
808
808
  }
809
- function Gr(e, a, s, u, A, I, P) {
809
+ function Gr(e, a, s, u, k, I, P) {
810
810
  switch (s) {
811
811
  case F:
812
812
  if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
@@ -818,22 +818,22 @@ Xe.exports;
818
818
  case N:
819
819
  case g:
820
820
  return Ue(+e, +a);
821
- case y:
821
+ case m:
822
822
  return e.name == a.name && e.message == a.message;
823
- case H:
824
- case k:
823
+ case R:
824
+ case O:
825
825
  return e == a + "";
826
- case f:
826
+ case l:
827
827
  var M = xe;
828
- case O:
828
+ case A:
829
829
  var U = u & o;
830
- if (M || (M = st), e.size != a.size && !U)
830
+ if (M || (M = ot), e.size != a.size && !U)
831
831
  return !1;
832
832
  var C = P.get(e);
833
833
  if (C)
834
834
  return C == a;
835
835
  u |= c, P.set(e, a);
836
- var K = ce(M(e), M(a), u, A, I, P);
836
+ var K = ce(M(e), M(a), u, k, I, P);
837
837
  return P.delete(e), K;
838
838
  case D:
839
839
  if (ae)
@@ -841,7 +841,7 @@ Xe.exports;
841
841
  }
842
842
  return !1;
843
843
  }
844
- function Wr(e, a, s, u, A, I) {
844
+ function Wr(e, a, s, u, k, I) {
845
845
  var P = s & o, M = Tt(e), U = M.length, C = Tt(a), K = C.length;
846
846
  if (U != K && !P)
847
847
  return !1;
@@ -857,10 +857,10 @@ Xe.exports;
857
857
  I.set(e, a), I.set(a, e);
858
858
  for (var bt = P; ++q < U; ) {
859
859
  L = M[q];
860
- var ht = e[L], At = a[L];
860
+ var ht = e[L], kt = a[L];
861
861
  if (u)
862
- var wn = P ? u(At, ht, L, a, e, I) : u(ht, At, L, e, a, I);
863
- if (!(wn === void 0 ? ht === At || A(ht, At, s, u, I) : wn)) {
862
+ var Tn = P ? u(kt, ht, L, a, e, I) : u(ht, kt, L, e, a, I);
863
+ if (!(Tn === void 0 ? ht === kt || k(ht, kt, s, u, I) : Tn)) {
864
864
  B = !1;
865
865
  break;
866
866
  }
@@ -873,7 +873,7 @@ Xe.exports;
873
873
  return I.delete(e), I.delete(a), B;
874
874
  }
875
875
  function Tt(e) {
876
- return oe(e, le, Br);
876
+ return oe(e, fe, Br);
877
877
  }
878
878
  function at(e, a) {
879
879
  var s = e.__data__;
@@ -890,33 +890,33 @@ Xe.exports;
890
890
  var u = !0;
891
891
  } catch {
892
892
  }
893
- var A = De.call(e);
894
- return u && (a ? e[it] = s : delete e[it]), A;
893
+ var k = De.call(e);
894
+ return u && (a ? e[it] = s : delete e[it]), k;
895
895
  }
896
896
  var Br = Nt ? function(e) {
897
- return e == null ? [] : (e = Object(e), ke(Nt(e), function(a) {
897
+ return e == null ? [] : (e = Object(e), Ee(Nt(e), function(a) {
898
898
  return Ht.call(e, a);
899
899
  }));
900
- } : qr, ct = wt;
901
- (ee && ct(new ee(new ArrayBuffer(1))) != F || St && ct(new St()) != f || re && ct(re.resolve()) != b || ne && ct(new ne()) != O || ie && ct(new ie()) != T) && (ct = function(e) {
900
+ } : qr, ut = wt;
901
+ (ee && ut(new ee(new ArrayBuffer(1))) != F || St && ut(new St()) != l || re && ut(re.resolve()) != b || 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) {
905
905
  case je:
906
906
  return F;
907
- case lt:
908
- return f;
907
+ case ft:
908
+ return l;
909
909
  case yr:
910
910
  return b;
911
911
  case mr:
912
- return O;
912
+ return A;
913
913
  case br:
914
914
  return T;
915
915
  }
916
916
  return a;
917
917
  });
918
918
  function $r(e, a) {
919
- return a = a ?? l, !!a && (typeof e == "number" || Se.test(e)) && e > -1 && e % 1 == 0 && e < a;
919
+ return a = a ?? f, !!a && (typeof e == "number" || Se.test(e)) && e > -1 && e % 1 == 0 && e < a;
920
920
  }
921
921
  function Kr(e) {
922
922
  var a = typeof e;
@@ -951,10 +951,10 @@ Xe.exports;
951
951
  var Le = ze(/* @__PURE__ */ function() {
952
952
  return arguments;
953
953
  }()) ? ze : function(e) {
954
- return ut(e) && Q.call(e, "callee") && !Ht.call(e, "callee");
954
+ return lt(e) && Q.call(e, "callee") && !Ht.call(e, "callee");
955
955
  }, Wt = Array.isArray;
956
956
  function ue(e) {
957
- return e != null && fe(e.length) && !Ge(e);
957
+ return e != null && le(e.length) && !Ge(e);
958
958
  }
959
959
  var Bt = te || Jr;
960
960
  function Xr(e, a) {
@@ -964,20 +964,20 @@ Xe.exports;
964
964
  if (!We(e))
965
965
  return !1;
966
966
  var a = wt(e);
967
- return a == p || a == h || a == j || a == m;
967
+ return a == p || a == h || a == j || a == y;
968
968
  }
969
- function fe(e) {
970
- return typeof e == "number" && e > -1 && e % 1 == 0 && e <= l;
969
+ function le(e) {
970
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= f;
971
971
  }
972
972
  function We(e) {
973
973
  var a = typeof e;
974
974
  return e != null && (a == "object" || a == "function");
975
975
  }
976
- function ut(e) {
976
+ function lt(e) {
977
977
  return e != null && typeof e == "object";
978
978
  }
979
979
  var Be = Xt ? pr(Xt) : Ur;
980
- function le(e) {
980
+ function fe(e) {
981
981
  return ue(e) ? zr(e) : Lr(e);
982
982
  }
983
983
  function qr() {
@@ -989,14 +989,14 @@ Xe.exports;
989
989
  t.exports = Xr;
990
990
  })(Xe, Xe.exports);
991
991
  var Hi = Xe.exports;
992
- const ft = /* @__PURE__ */ bn(Hi);
992
+ const st = /* @__PURE__ */ gn(Hi);
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]", l = "[object Array]", d = "[object Boolean]", E = "[object Date]", j = "[object Error]", S = "[object Function]", N = "[object GeneratorFunction]", y = "[object Map]", p = "[object Number]", h = "[object Object]", f = "[object Promise]", g = "[object RegExp]", v = "[object Set]", _ = "[object String]", b = "[object Symbol]", m = "[object WeakMap]", H = "[object ArrayBuffer]", O = "[object DataView]", k = "[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*)$/, R = {};
997
- R[c] = R[l] = R[H] = R[O] = R[d] = R[E] = R[k] = R[D] = R[w] = R[T] = R[x] = R[y] = R[p] = R[h] = R[g] = R[v] = R[_] = R[b] = R[F] = R[Dt] = R[Ct] = R[Ie] = !0, R[j] = R[S] = R[m] = !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, z = Se && !0 && t && !t.nodeType && t, we = z && z.exports === Se;
999
- function fr(e, a) {
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]", N = "[object GeneratorFunction]", m = "[object Map]", p = "[object Number]", h = "[object Object]", l = "[object Promise]", g = "[object RegExp]", v = "[object Set]", _ = "[object String]", b = "[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[g] = z[v] = z[_] = z[b] = 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, H = Se && !0 && t && !t.nodeType && t, we = H && H.exports === Se;
999
+ function lr(e, a) {
1000
1000
  return e.set(a[0], a[1]), e;
1001
1001
  }
1002
1002
  function nt(e, a) {
@@ -1007,14 +1007,14 @@ qe.exports;
1007
1007
  ;
1008
1008
  return e;
1009
1009
  }
1010
- function Ae(e, a) {
1011
- for (var s = -1, u = a.length, A = e.length; ++s < u; )
1012
- e[A + s] = a[s];
1010
+ function ke(e, a) {
1011
+ for (var s = -1, u = a.length, k = e.length; ++s < u; )
1012
+ e[k + s] = a[s];
1013
1013
  return e;
1014
1014
  }
1015
1015
  function Yt(e, a, s, u) {
1016
- for (var A = -1, I = e ? e.length : 0; ++A < I; )
1017
- s = a(s, e[A], A, e);
1016
+ for (var k = -1, I = e ? e.length : 0; ++k < I; )
1017
+ s = a(s, e[k], k, e);
1018
1018
  return s;
1019
1019
  }
1020
1020
  function Vt(e, a) {
@@ -1022,7 +1022,7 @@ qe.exports;
1022
1022
  u[s] = a(s);
1023
1023
  return u;
1024
1024
  }
1025
- function Ee(e, a) {
1025
+ function Ae(e, a) {
1026
1026
  return e == null ? void 0 : e[a];
1027
1027
  }
1028
1028
  function Xt(e) {
@@ -1034,10 +1034,10 @@ qe.exports;
1034
1034
  }
1035
1035
  return a;
1036
1036
  }
1037
- function ke(e) {
1037
+ function Ee(e) {
1038
1038
  var a = -1, s = Array(e.size);
1039
- return e.forEach(function(u, A) {
1040
- s[++a] = [A, u];
1039
+ return e.forEach(function(u, k) {
1040
+ s[++a] = [k, u];
1041
1041
  }), s;
1042
1042
  }
1043
1043
  function qt(e, a) {
@@ -1051,13 +1051,13 @@ qe.exports;
1051
1051
  s[++a] = u;
1052
1052
  }), s;
1053
1053
  }
1054
- var lr = Array.prototype, pr = Function.prototype, jt = Object.prototype, Jt = rt["__core-js_shared__"], xe = function() {
1054
+ var fr = Array.prototype, pr = Function.prototype, jt = Object.prototype, Jt = rt["__core-js_shared__"], xe = function() {
1055
1055
  var e = /[^.]+$/.exec(Jt && Jt.keys && Jt.keys.IE_PROTO || "");
1056
1056
  return e ? "Symbol(src)_1." + e : "";
1057
- }(), Me = pr.toString, st = jt.hasOwnProperty, Ft = jt.toString, dr = RegExp(
1058
- "^" + Me.call(st).replace(ir, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1059
- ), _t = we ? rt.Buffer : void 0, Rt = rt.Symbol, Zt = rt.Uint8Array, Q = qt(Object.getPrototypeOf, Object), Pe = Object.create, De = jt.propertyIsEnumerable, hr = lr.splice, Qt = Object.getOwnPropertySymbols, zt = _t ? _t.isBuffer : void 0, Ce = qt(Object.keys, Object), Ht = at(rt, "DataView"), vt = at(rt, "Map"), it = at(rt, "Promise"), Nt = at(rt, "Set"), te = at(rt, "WeakMap"), It = at(Object, "create"), ee = V(Ht), St = V(vt), re = V(it), ne = V(Nt), ie = V(te), mt = Rt ? Rt.prototype : void 0, je = mt ? mt.valueOf : void 0;
1060
- function lt(e) {
1057
+ }(), Me = pr.toString, ot = jt.hasOwnProperty, Rt = jt.toString, dr = RegExp(
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), Ht = at(rt, "DataView"), vt = at(rt, "Map"), it = at(rt, "Promise"), Nt = at(rt, "Set"), te = at(rt, "WeakMap"), It = at(Object, "create"), ee = V(Ht), St = V(vt), re = V(it), ne = V(Nt), ie = V(te), mt = Ft ? Ft.prototype : void 0, je = mt ? mt.valueOf : void 0;
1060
+ function ft(e) {
1061
1061
  var a = -1, s = e ? e.length : 0;
1062
1062
  for (this.clear(); ++a < s; ) {
1063
1063
  var u = e[a];
@@ -1076,17 +1076,17 @@ qe.exports;
1076
1076
  var s = a[e];
1077
1077
  return s === i ? void 0 : s;
1078
1078
  }
1079
- return st.call(a, e) ? a[e] : void 0;
1079
+ return ot.call(a, e) ? a[e] : void 0;
1080
1080
  }
1081
- function Fe(e) {
1081
+ function Re(e) {
1082
1082
  var a = this.__data__;
1083
- return It ? a[e] !== void 0 : st.call(a, e);
1083
+ return It ? a[e] !== void 0 : ot.call(a, e);
1084
1084
  }
1085
1085
  function ae(e, a) {
1086
1086
  var s = this.__data__;
1087
1087
  return s[e] = It && a === void 0 ? i : a, this;
1088
1088
  }
1089
- lt.prototype.clear = yr, lt.prototype.delete = mr, lt.prototype.get = br, lt.prototype.has = Fe, lt.prototype.set = ae;
1089
+ ft.prototype.clear = yr, ft.prototype.delete = mr, ft.prototype.get = br, ft.prototype.has = Re, ft.prototype.set = ae;
1090
1090
  function W(e) {
1091
1091
  var a = -1, s = e ? e.length : 0;
1092
1092
  for (this.clear(); ++a < s; ) {
@@ -1125,24 +1125,24 @@ qe.exports;
1125
1125
  }
1126
1126
  function wr() {
1127
1127
  this.__data__ = {
1128
- hash: new lt(),
1128
+ hash: new ft(),
1129
1129
  map: new (vt || W)(),
1130
- string: new lt()
1130
+ string: new ft()
1131
1131
  };
1132
1132
  }
1133
1133
  function Tr(e) {
1134
1134
  return Tt(this, e).delete(e);
1135
1135
  }
1136
- function Ar(e) {
1136
+ function kr(e) {
1137
1137
  return Tt(this, e).get(e);
1138
1138
  }
1139
- function Er(e) {
1139
+ function Ar(e) {
1140
1140
  return Tt(this, e).has(e);
1141
1141
  }
1142
- function kr(e, a) {
1142
+ function Er(e, a) {
1143
1143
  return Tt(this, e).set(e, a), this;
1144
1144
  }
1145
- $.prototype.clear = wr, $.prototype.delete = Tr, $.prototype.get = Ar, $.prototype.has = Er, $.prototype.set = kr;
1145
+ $.prototype.clear = wr, $.prototype.delete = Tr, $.prototype.get = kr, $.prototype.has = Ar, $.prototype.set = Er;
1146
1146
  function X(e) {
1147
1147
  this.__data__ = new W(e);
1148
1148
  }
@@ -1170,14 +1170,14 @@ qe.exports;
1170
1170
  }
1171
1171
  X.prototype.clear = Or, X.prototype.delete = xr, X.prototype.get = Mr, X.prototype.has = Pr, X.prototype.set = Dr;
1172
1172
  function Ut(e, a) {
1173
- var s = ue(e) || Wt(e) ? Vt(e.length, String) : [], u = s.length, A = !!u;
1173
+ var s = ue(e) || Wt(e) ? Vt(e.length, String) : [], u = s.length, k = !!u;
1174
1174
  for (var I in e)
1175
- st.call(e, I) && !(A && (I == "length" || Kr(I, u))) && s.push(I);
1175
+ ot.call(e, I) && !(k && (I == "length" || Kr(I, u))) && s.push(I);
1176
1176
  return s;
1177
1177
  }
1178
- function Re(e, a, s) {
1178
+ function Fe(e, a, s) {
1179
1179
  var u = e[a];
1180
- (!(st.call(e, a) && Le(u, s)) || s === void 0 && !(a in e)) && (e[a] = s);
1180
+ (!(ot.call(e, a) && Le(u, s)) || s === void 0 && !(a in e)) && (e[a] = s);
1181
1181
  }
1182
1182
  function Lt(e, a) {
1183
1183
  for (var s = e.length; s--; )
@@ -1185,14 +1185,14 @@ qe.exports;
1185
1185
  return s;
1186
1186
  return -1;
1187
1187
  }
1188
- function ot(e, a) {
1189
- return e && ce(a, le(a), e);
1188
+ function ct(e, a) {
1189
+ return e && ce(a, fe(a), e);
1190
1190
  }
1191
- function se(e, a, s, u, A, I, P) {
1191
+ function se(e, a, s, u, k, I, P) {
1192
1192
  var M;
1193
- if (u && (M = I ? u(e, A, I, P) : u(e)), M !== void 0)
1193
+ if (u && (M = I ? u(e, k, I, P) : u(e)), M !== void 0)
1194
1194
  return M;
1195
- if (!ut(e))
1195
+ if (!lt(e))
1196
1196
  return e;
1197
1197
  var U = ue(e);
1198
1198
  if (U) {
@@ -1205,10 +1205,10 @@ qe.exports;
1205
1205
  if (C == h || C == c || K && !I) {
1206
1206
  if (Xt(e))
1207
1207
  return I ? e : {};
1208
- if (M = ct(K ? {} : e), !a)
1209
- return Gr(e, ot(M, e));
1208
+ if (M = ut(K ? {} : e), !a)
1209
+ return Gr(e, ct(M, e));
1210
1210
  } else {
1211
- if (!R[C])
1211
+ if (!z[C])
1212
1212
  return I ? e : {};
1213
1213
  M = $r(e, C, se, a);
1214
1214
  }
@@ -1218,25 +1218,25 @@ qe.exports;
1218
1218
  if (q)
1219
1219
  return q;
1220
1220
  if (P.set(e, M), !U)
1221
- var L = s ? Wr(e) : le(e);
1221
+ var L = s ? Wr(e) : fe(e);
1222
1222
  return Te(L || e, function(Y, B) {
1223
- L && (B = Y, Y = e[B]), Re(M, B, se(Y, a, s, u, B, e, P));
1223
+ L && (B = Y, Y = e[B]), Fe(M, B, se(Y, a, s, u, B, e, P));
1224
1224
  }), M;
1225
1225
  }
1226
1226
  function Cr(e) {
1227
- return ut(e) ? Pe(e) : {};
1227
+ return lt(e) ? Pe(e) : {};
1228
1228
  }
1229
1229
  function jr(e, a, s) {
1230
1230
  var u = a(e);
1231
- return ue(e) ? u : Ae(u, s(e));
1232
- }
1233
- function Fr(e) {
1234
- return Ft.call(e);
1231
+ return ue(e) ? u : ke(u, s(e));
1235
1232
  }
1236
1233
  function Rr(e) {
1237
- if (!ut(e) || Vr(e))
1234
+ return Rt.call(e);
1235
+ }
1236
+ function Fr(e) {
1237
+ if (!lt(e) || Vr(e))
1238
1238
  return !1;
1239
- var a = fe(e) || Xt(e) ? dr : sr;
1239
+ var a = le(e) || Xt(e) ? dr : sr;
1240
1240
  return a.test(V(e));
1241
1241
  }
1242
1242
  function zr(e) {
@@ -1244,7 +1244,7 @@ qe.exports;
1244
1244
  return Ce(e);
1245
1245
  var a = [];
1246
1246
  for (var s in Object(e))
1247
- st.call(e, s) && s != "constructor" && a.push(s);
1247
+ ot.call(e, s) && s != "constructor" && a.push(s);
1248
1248
  return a;
1249
1249
  }
1250
1250
  function Gt(e, a) {
@@ -1262,8 +1262,8 @@ qe.exports;
1262
1262
  return new e.constructor(s, e.byteOffset, e.byteLength);
1263
1263
  }
1264
1264
  function ze(e, a, s) {
1265
- var u = a ? s(ke(e), !0) : ke(e);
1266
- return Yt(u, fr, new e.constructor());
1265
+ var u = a ? s(Ee(e), !0) : Ee(e);
1266
+ return Yt(u, lr, new e.constructor());
1267
1267
  }
1268
1268
  function He(e) {
1269
1269
  var a = new e.constructor(e.source, ar.exec(e));
@@ -1288,9 +1288,9 @@ qe.exports;
1288
1288
  }
1289
1289
  function ce(e, a, s, u) {
1290
1290
  s || (s = {});
1291
- for (var A = -1, I = a.length; ++A < I; ) {
1292
- var P = a[A], M = void 0;
1293
- Re(s, P, M === void 0 ? e[P] : M);
1291
+ for (var k = -1, I = a.length; ++k < I; ) {
1292
+ var P = a[k], M = void 0;
1293
+ Fe(s, P, M === void 0 ? e[P] : M);
1294
1294
  }
1295
1295
  return s;
1296
1296
  }
@@ -1298,52 +1298,52 @@ qe.exports;
1298
1298
  return ce(e, pt(e), a);
1299
1299
  }
1300
1300
  function Wr(e) {
1301
- return jr(e, le, pt);
1301
+ return jr(e, fe, pt);
1302
1302
  }
1303
1303
  function Tt(e, a) {
1304
1304
  var s = e.__data__;
1305
1305
  return Yr(a) ? s[typeof a == "string" ? "string" : "hash"] : s.map;
1306
1306
  }
1307
1307
  function at(e, a) {
1308
- var s = Ee(e, a);
1309
- return Rr(s) ? s : void 0;
1308
+ var s = Ae(e, a);
1309
+ return Fr(s) ? s : void 0;
1310
1310
  }
1311
- var pt = Qt ? qt(Qt, Object) : qr, dt = Fr;
1312
- (Ht && dt(new Ht(new ArrayBuffer(1))) != O || vt && dt(new vt()) != y || it && dt(it.resolve()) != f || Nt && dt(new Nt()) != v || te && dt(new te()) != m) && (dt = function(e) {
1313
- var a = Ft.call(e), s = a == h ? e.constructor : void 0, u = s ? V(s) : void 0;
1311
+ var pt = Qt ? qt(Qt, Object) : qr, dt = Rr;
1312
+ (Ht && dt(new Ht(new ArrayBuffer(1))) != A || vt && dt(new vt()) != m || it && dt(it.resolve()) != l || Nt && dt(new Nt()) != v || te && dt(new te()) != y) && (dt = function(e) {
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) {
1316
1316
  case ee:
1317
- return O;
1317
+ return A;
1318
1318
  case St:
1319
- return y;
1319
+ return m;
1320
1320
  case re:
1321
- return f;
1321
+ return l;
1322
1322
  case ne:
1323
1323
  return v;
1324
1324
  case ie:
1325
- return m;
1325
+ return y;
1326
1326
  }
1327
1327
  return a;
1328
1328
  });
1329
1329
  function Br(e) {
1330
1330
  var a = e.length, s = e.constructor(a);
1331
- return a && typeof e[0] == "string" && st.call(e, "index") && (s.index = e.index, s.input = e.input), s;
1331
+ return a && typeof e[0] == "string" && ot.call(e, "index") && (s.index = e.index, s.input = e.input), s;
1332
1332
  }
1333
- function ct(e) {
1333
+ function ut(e) {
1334
1334
  return typeof e.constructor == "function" && !Ne(e) ? Cr(Q(e)) : {};
1335
1335
  }
1336
1336
  function $r(e, a, s, u) {
1337
- var A = e.constructor;
1337
+ var k = e.constructor;
1338
1338
  switch (a) {
1339
- case H:
1339
+ case R:
1340
1340
  return oe(e);
1341
1341
  case d:
1342
1342
  case E:
1343
- return new A(+e);
1344
- case O:
1343
+ return new k(+e);
1344
+ case A:
1345
1345
  return wt(e, u);
1346
- case k:
1346
+ case O:
1347
1347
  case D:
1348
1348
  case w:
1349
1349
  case T:
@@ -1353,11 +1353,11 @@ qe.exports;
1353
1353
  case Ct:
1354
1354
  case Ie:
1355
1355
  return Ur(e, u);
1356
- case y:
1356
+ case m:
1357
1357
  return ze(e, u, s);
1358
1358
  case p:
1359
1359
  case _:
1360
- return new A(e);
1360
+ return new k(e);
1361
1361
  case g:
1362
1362
  return He(e);
1363
1363
  case v:
@@ -1400,31 +1400,31 @@ qe.exports;
1400
1400
  return e === a || e !== e && a !== a;
1401
1401
  }
1402
1402
  function Wt(e) {
1403
- return Xr(e) && st.call(e, "callee") && (!De.call(e, "callee") || Ft.call(e) == c);
1403
+ return Xr(e) && ot.call(e, "callee") && (!De.call(e, "callee") || Rt.call(e) == c);
1404
1404
  }
1405
1405
  var ue = Array.isArray;
1406
1406
  function Bt(e) {
1407
- return e != null && We(e.length) && !fe(e);
1407
+ return e != null && We(e.length) && !le(e);
1408
1408
  }
1409
1409
  function Xr(e) {
1410
1410
  return Be(e) && Bt(e);
1411
1411
  }
1412
1412
  var Ge = zt || Jr;
1413
- function fe(e) {
1414
- var a = ut(e) ? Ft.call(e) : "";
1413
+ function le(e) {
1414
+ var a = lt(e) ? Rt.call(e) : "";
1415
1415
  return a == S || a == N;
1416
1416
  }
1417
1417
  function We(e) {
1418
1418
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= o;
1419
1419
  }
1420
- function ut(e) {
1420
+ function lt(e) {
1421
1421
  var a = typeof e;
1422
1422
  return !!e && (a == "object" || a == "function");
1423
1423
  }
1424
1424
  function Be(e) {
1425
1425
  return !!e && typeof e == "object";
1426
1426
  }
1427
- function le(e) {
1427
+ function fe(e) {
1428
1428
  return Bt(e) ? Ut(e) : zr(e);
1429
1429
  }
1430
1430
  function qr() {
@@ -1436,7 +1436,7 @@ qe.exports;
1436
1436
  t.exports = Ue;
1437
1437
  })(qe, qe.exports);
1438
1438
  var Ni = qe.exports;
1439
- const tt = /* @__PURE__ */ bn(Ni), Ui = (t) => new Promise((r, n) => {
1439
+ const tt = /* @__PURE__ */ gn(Ni), 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;
@@ -1455,8 +1455,8 @@ const tt = /* @__PURE__ */ bn(Ni), Ui = (t) => new Promise((r, n) => {
1455
1455
  }), Gi = (t) => new Promise((r, n) => {
1456
1456
  const i = document.createElement("video");
1457
1457
  i.preload = "auto", i.addEventListener("loadedmetadata", () => {
1458
- const o = i.duration * 1e3, c = i.videoWidth, l = i.videoHeight;
1459
- r({ duration: o, width: c, height: l });
1458
+ const o = i.duration * 1e3, c = i.videoWidth, f = i.videoHeight;
1459
+ r({ duration: o, width: c, height: f });
1460
1460
  }), i.addEventListener("error", (o) => {
1461
1461
  n(o);
1462
1462
  }), i.src = t, i.load();
@@ -1533,7 +1533,7 @@ function rr(t, r) {
1533
1533
  const Wi = async (t, r) => {
1534
1534
  const n = t.details.src, i = await Gi(n), o = rr(r, {
1535
1535
  ...i
1536
- }), c = qn(t.trim, { duration: i.duration }), l = {
1536
+ }), c = qn(t.trim, { duration: i.duration }), f = {
1537
1537
  width: i.width,
1538
1538
  height: i.height,
1539
1539
  duration: i.duration,
@@ -1564,7 +1564,8 @@ const Wi = async (t, r) => {
1564
1564
  trim: c,
1565
1565
  type: "video",
1566
1566
  name: "video",
1567
- details: l,
1567
+ details: f,
1568
+ playbackRate: t.playbackRate || 1,
1568
1569
  display: ge(t.display, { duration: i.duration, trim: c })
1569
1570
  };
1570
1571
  }, Bi = async (t) => {
@@ -1575,6 +1576,7 @@ const Wi = async (t, r) => {
1575
1576
  type: "audio",
1576
1577
  display: ge(t.display, { duration: o, trim: c }),
1577
1578
  trim: c,
1579
+ playbackRate: t.playbackRate || 1,
1578
1580
  details: {
1579
1581
  src: n.src,
1580
1582
  duration: o,
@@ -1590,6 +1592,7 @@ const Wi = async (t, r) => {
1590
1592
  type: "image",
1591
1593
  name: "image",
1592
1594
  display: ge(t.display),
1595
+ playbackRate: t.playbackRate || 1,
1593
1596
  details: {
1594
1597
  src: n.src || "",
1595
1598
  // Default source URL
@@ -1629,7 +1632,7 @@ const Wi = async (t, r) => {
1629
1632
  url: t.details.fontUrl
1630
1633
  }
1631
1634
  ]);
1632
- const n = t.id, i = t.details, o = Jn(i), c = Xn(t.details.text, o), l = rr(r, {
1635
+ const n = t.id, i = t.details, o = Jn(i), c = Xn(t.details.text, o), f = rr(r, {
1633
1636
  width: o.width,
1634
1637
  height: c
1635
1638
  });
@@ -1638,6 +1641,7 @@ const Wi = async (t, r) => {
1638
1641
  name: "caption",
1639
1642
  type: "caption",
1640
1643
  display: ge(t.display),
1644
+ playbackRate: t.playbackRate || 1,
1641
1645
  details: {
1642
1646
  ...o,
1643
1647
  text: i.text || "",
@@ -1645,8 +1649,8 @@ const Wi = async (t, r) => {
1645
1649
  height: c,
1646
1650
  // Default height
1647
1651
  fontUrl: i.fontUrl,
1648
- top: l.top,
1649
- left: l.left,
1652
+ top: f.top,
1653
+ left: f.left,
1650
1654
  borderWidth: i.borderWidth || 0,
1651
1655
  borderColor: i.borderColor || "#000000",
1652
1656
  boxShadow: i.boxShadow || er
@@ -1660,7 +1664,7 @@ const Wi = async (t, r) => {
1660
1664
  url: t.details.fontUrl
1661
1665
  }
1662
1666
  ]);
1663
- const n = t.id, i = t.details, o = Jn(i), c = Xn(t.details.text, o), l = rr(r, {
1667
+ const n = t.id, i = t.details, o = Jn(i), c = Xn(t.details.text, o), f = rr(r, {
1664
1668
  width: o.width,
1665
1669
  height: c
1666
1670
  });
@@ -1669,6 +1673,7 @@ const Wi = async (t, r) => {
1669
1673
  name: "text",
1670
1674
  type: "text",
1671
1675
  display: ge(t.display),
1676
+ playbackRate: t.playbackRate || 1,
1672
1677
  details: {
1673
1678
  ...o,
1674
1679
  text: i.text || "",
@@ -1676,8 +1681,8 @@ const Wi = async (t, r) => {
1676
1681
  height: c,
1677
1682
  // Default height
1678
1683
  fontUrl: i.fontUrl,
1679
- top: l.top,
1680
- left: l.left,
1684
+ top: f.top,
1685
+ left: f.left,
1681
1686
  borderWidth: i.borderWidth || 0,
1682
1687
  borderColor: i.borderColor || "#000000",
1683
1688
  boxShadow: i.boxShadow || er
@@ -1738,12 +1743,12 @@ function Xi(t, r) {
1738
1743
  items: i.items.filter((o) => !r.includes(o))
1739
1744
  })).filter((i) => !i.items.length);
1740
1745
  }
1741
- function Mn(t = 16) {
1746
+ function Pn(t = 16) {
1742
1747
  const r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n = r.charAt(Math.floor(Math.random() * r.length));
1743
1748
  let i = fn(t - 1);
1744
1749
  return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
1745
1750
  }
1746
- const Pn = (t) => Object.keys(t).reduce((r, n) => {
1751
+ const tn = (t) => Object.keys(t).reduce((r, n) => {
1747
1752
  const { display: i } = t[n];
1748
1753
  return Math.max(r, i.to);
1749
1754
  }, 0);
@@ -1753,53 +1758,53 @@ function qi(t) {
1753
1758
  ), n = $t.pipe(
1754
1759
  Kt(({ key: p }) => p.startsWith(ui))
1755
1760
  ), i = $t.pipe(
1756
- Kt(({ key: p }) => p.startsWith(fi))
1757
- ), o = $t.pipe(
1758
1761
  Kt(({ key: p }) => p.startsWith(li))
1762
+ ), o = $t.pipe(
1763
+ Kt(({ key: p }) => p.startsWith(fi))
1759
1764
  ), c = $t.pipe(
1760
1765
  Kt(({ key: p }) => p.startsWith(pi))
1761
- ), l = $t.pipe(
1766
+ ), f = $t.pipe(
1762
1767
  Kt(({ key: p }) => p.startsWith(di))
1763
1768
  ), d = r.subscribe(async (p) => {
1764
1769
  var h;
1765
1770
  if (p.key === hi) {
1766
- const f = (h = p.value) == null ? void 0 : h.payload, g = f.trackItemIds, v = f.trackItemDetailsMap, _ = g.map(async (b) => {
1767
- const m = v[b];
1768
- return (m.type === "caption" || m.type === "text") && await Je([
1771
+ const l = (h = p.value) == null ? void 0 : h.payload, g = l.trackItemIds, v = l.trackItemDetailsMap, _ = g.map(async (b) => {
1772
+ const y = v[b];
1773
+ return (y.type === "caption" || y.type === "text") && await Je([
1769
1774
  {
1770
- fontFamily: m.details.fontFamily,
1771
- url: m.details.fontUrl
1775
+ fontFamily: y.details.fontFamily,
1776
+ url: y.details.fontUrl
1772
1777
  }
1773
1778
  ]), !0;
1774
1779
  });
1775
1780
  await Promise.all(_), t.updateState({
1776
- ...f
1781
+ ...l
1777
1782
  });
1778
1783
  }
1779
1784
  }), E = o.subscribe((p) => {
1780
1785
  if (p.key === yi) return t.undo();
1781
1786
  if (p.key === mi) return t.redo();
1782
1787
  }), j = i.subscribe((p) => {
1783
- var f, g, v;
1788
+ var l, g, v;
1784
1789
  const h = [];
1785
- 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 === bi) {
1786
- const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds, b = tt(t.getState()), m = _ && _.length ? _ : b.activeIds, H = b.trackItemIds, O = b.trackItemDetailsMap, k = H.filter(
1787
- (F) => !m.includes(F)
1790
+ if ((l = p.value) != null && l.payload.trackItemIds && (h.push((g = p.value) == null ? void 0 : g.payload.trackItemIds), t.updateState({ activeIds: h })), p.key === bi) {
1791
+ const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds, b = tt(t.getState()), y = _ && _.length ? _ : b.activeIds, R = b.trackItemIds, A = b.trackItemDetailsMap, O = R.filter(
1792
+ (F) => !y.includes(F)
1788
1793
  ), D = Object.fromEntries(
1789
- Object.entries(O).filter(
1790
- ([F]) => !m.includes(F)
1794
+ Object.entries(A).filter(
1795
+ ([F]) => !y.includes(F)
1791
1796
  )
1792
1797
  ), w = Xi(
1793
1798
  b.tracks,
1794
- m
1799
+ y
1795
1800
  ), T = Object.fromEntries(
1796
1801
  Object.entries(b.trackItemsMap).filter(
1797
- ([F]) => !m.includes(F)
1802
+ ([F]) => !y.includes(F)
1798
1803
  )
1799
- ), x = Pn(b.trackItemsMap);
1804
+ ), x = tn(b.trackItemsMap);
1800
1805
  t.updateState(
1801
1806
  {
1802
- trackItemIds: k,
1807
+ trackItemIds: O,
1803
1808
  trackItemDetailsMap: D,
1804
1809
  activeIds: [],
1805
1810
  trackItemsMap: T,
@@ -1810,12 +1815,12 @@ function qi(t) {
1810
1815
  );
1811
1816
  }
1812
1817
  }), S = n.subscribe(async (p) => {
1813
- var _, b, m, H, O;
1818
+ var _, b, y, R, A;
1814
1819
  const h = tt(t.getState());
1815
- let f = [], g = "text";
1820
+ let l = [], g = "text";
1816
1821
  if (p.key === gi) {
1817
- const k = (_ = p.value) == null ? void 0 : _.payload, D = [];
1818
- for (const x of k) {
1822
+ const O = (_ = p.value) == null ? void 0 : _.payload, D = [];
1823
+ for (const x of O) {
1819
1824
  const F = Ki(x, {
1820
1825
  size: {
1821
1826
  width: 1080,
@@ -1834,64 +1839,64 @@ function qi(t) {
1834
1839
  details: Dt
1835
1840
  }, h.trackItemsMap[F] = Ct, h.trackItemIds.push(F);
1836
1841
  }
1837
- f = T;
1842
+ l = T;
1838
1843
  }
1839
1844
  if (p.key === _i) {
1840
1845
  g = "text";
1841
- const k = await Yi((b = p.value) == null ? void 0 : b.payload, {
1846
+ const O = await Yi((b = p.value) == null ? void 0 : b.payload, {
1842
1847
  size: {
1843
1848
  width: 1080,
1844
1849
  height: 1920
1845
1850
  }
1846
- }), { details: D, ...w } = k;
1851
+ }), { details: D, ...w } = O;
1847
1852
  h.trackItemDetailsMap[w.id] = {
1848
1853
  type: g,
1849
1854
  details: D
1850
- }, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), f = [w.id];
1855
+ }, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
1851
1856
  }
1852
1857
  if (p.key === vi) {
1853
1858
  g = "image";
1854
- const k = await $i((m = p.value) == null ? void 0 : m.payload, {
1859
+ const O = await $i((y = p.value) == null ? void 0 : y.payload, {
1855
1860
  size: {
1856
1861
  width: 1080,
1857
1862
  height: 1920
1858
1863
  }
1859
- }), { details: D, ...w } = k;
1864
+ }), { details: D, ...w } = O;
1860
1865
  h.trackItemDetailsMap[w.id] = {
1861
1866
  type: g,
1862
1867
  details: D
1863
- }, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), f = [w.id];
1868
+ }, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
1864
1869
  }
1865
1870
  if (p.key === Ii) {
1866
1871
  g = "audio";
1867
- const k = await Bi((H = p.value) == null ? void 0 : H.payload), { details: D, ...w } = k;
1872
+ const O = await Bi((R = p.value) == null ? void 0 : R.payload), { details: D, ...w } = O;
1868
1873
  h.trackItemDetailsMap[w.id] = {
1869
1874
  type: g,
1870
1875
  details: D
1871
- }, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), f = [w.id];
1876
+ }, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
1872
1877
  }
1873
1878
  if (p.key === Si) {
1874
1879
  g = "video";
1875
- const k = await Wi((O = p.value) == null ? void 0 : O.payload, {
1880
+ const O = await Wi((A = p.value) == null ? void 0 : A.payload, {
1876
1881
  size: {
1877
1882
  width: 1080,
1878
1883
  height: 1920
1879
1884
  }
1880
- }), { details: D, ...w } = k;
1885
+ }), { details: D, ...w } = O;
1881
1886
  h.trackItemDetailsMap[w.id] = {
1882
1887
  type: g,
1883
1888
  details: D
1884
- }, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), f = [w.id];
1889
+ }, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
1885
1890
  }
1886
1891
  h.tracks.unshift({
1887
1892
  id: fn(),
1888
1893
  accepts: ["text", "audio", "helper", "video", "image", "caption"],
1889
1894
  type: g,
1890
- items: f,
1895
+ items: l,
1891
1896
  magnetic: !1,
1892
1897
  static: !1
1893
1898
  });
1894
- const v = Pn(h.trackItemsMap);
1899
+ const v = tn(h.trackItemsMap);
1895
1900
  t.updateState(
1896
1901
  {
1897
1902
  trackItemIds: h.trackItemIds,
@@ -1908,27 +1913,31 @@ function qi(t) {
1908
1913
  }), N = c.subscribe(async (p) => {
1909
1914
  var h;
1910
1915
  if (p.key === wi) {
1911
- const f = tt(t.getState()), g = (h = p.value) == null ? void 0 : h.options.time;
1912
- if (f.activeIds.length === 1) {
1913
- const v = f.activeIds[0], _ = f.trackItemsMap[v];
1916
+ const l = tt(t.getState()), g = (h = p.value) == null ? void 0 : h.options.time;
1917
+ if (l.activeIds.length === 1) {
1918
+ const v = l.activeIds[0], _ = l.trackItemsMap[v];
1914
1919
  if (g >= _.display.to || g <= _.display.from)
1915
1920
  return;
1916
- const b = f.trackItemDetailsMap[v], m = Mn(), H = {
1921
+ const b = l.trackItemDetailsMap[v], y = Pn(), R = {
1917
1922
  ..._,
1918
- id: m,
1923
+ id: y,
1919
1924
  display: {
1920
1925
  from: g,
1921
1926
  to: _.display.to
1927
+ },
1928
+ trim: {
1929
+ from: g,
1930
+ to: _.display.to
1922
1931
  }
1923
1932
  };
1924
- f.trackItemsMap[v].display.to = g, f.trackItemsMap[m] = H, f.trackItemIds.push(m), f.trackItemDetailsMap[m] = b, f.tracks.forEach((O) => {
1925
- O.items.includes(v) && O.items.push(m);
1933
+ l.trackItemsMap[v].display.to = g, l.trackItemsMap[y] = R, l.trackItemIds.push(y), l.trackItemDetailsMap[y] = b, l.tracks.forEach((A) => {
1934
+ A.items.includes(v) && A.items.push(y);
1926
1935
  }), t.updateState(
1927
1936
  {
1928
- trackItemDetailsMap: f.trackItemDetailsMap,
1929
- tracks: f.tracks,
1930
- trackItemIds: f.trackItemIds,
1931
- trackItemsMap: f.trackItemsMap
1937
+ trackItemDetailsMap: l.trackItemDetailsMap,
1938
+ tracks: l.tracks,
1939
+ trackItemIds: l.trackItemIds,
1940
+ trackItemsMap: l.trackItemsMap
1932
1941
  },
1933
1942
  {
1934
1943
  updateHistory: !0,
@@ -1939,48 +1948,48 @@ function qi(t) {
1939
1948
  return;
1940
1949
  }
1941
1950
  if (p.key === Ti) {
1942
- const f = tt(t.getState());
1943
- if (f.activeIds.length) {
1944
- const g = f.activeIds, v = [], _ = {
1951
+ const l = tt(t.getState());
1952
+ if (l.activeIds.length) {
1953
+ const g = l.activeIds, v = [], _ = {
1945
1954
  activeIds: g,
1946
1955
  trackItemDetailsMap: {},
1947
1956
  trackItemsMap: {},
1948
1957
  tracks: []
1949
1958
  };
1950
- g.forEach((m) => {
1951
- _.trackItemDetailsMap[m] = f.trackItemDetailsMap[m], _.trackItemsMap[m] = f.trackItemsMap[m], v.push(
1952
- f.tracks.find((H) => H.items.includes(m))
1959
+ g.forEach((y) => {
1960
+ _.trackItemDetailsMap[y] = l.trackItemDetailsMap[y], _.trackItemsMap[y] = l.trackItemsMap[y], v.push(
1961
+ l.tracks.find((R) => R.items.includes(y))
1953
1962
  );
1954
1963
  });
1955
1964
  const b = /* @__PURE__ */ new Set();
1956
- v.filter((m) => b.has(m.id) ? !1 : (b.add(m), !0)), _.tracks = Array.from(b.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
1965
+ v.filter((y) => b.has(y.id) ? !1 : (b.add(y), !0)), _.tracks = Array.from(b.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
1957
1966
  }
1958
1967
  }
1959
- if (p.key === Ai) {
1960
- const f = localStorage.getItem("DesignComboTemp");
1961
- if (!f) return;
1962
- const g = tt(t.getState()), v = JSON.parse(f), _ = {}, b = v.trackItemsMap, m = v.trackItemDetailsMap, H = v.tracks, O = [], k = v.activeIds.map(async (D) => {
1963
- const w = m[D];
1968
+ if (p.key === ki) {
1969
+ const l = localStorage.getItem("DesignComboTemp");
1970
+ if (!l) return;
1971
+ const g = tt(t.getState()), v = JSON.parse(l), _ = {}, b = v.trackItemsMap, y = v.trackItemDetailsMap, R = v.tracks, A = [], O = v.activeIds.map(async (D) => {
1972
+ const w = y[D];
1964
1973
  (w.type === "caption" || w.type === "text") && await Je([
1965
1974
  {
1966
1975
  fontFamily: w.details.fontFamily,
1967
1976
  url: w.details.fontUrl
1968
1977
  }
1969
1978
  ]);
1970
- const T = Mn();
1979
+ const T = Pn();
1971
1980
  return _[D] = T, g.trackItemsMap[T] = {
1972
1981
  ...b[D],
1973
1982
  id: T
1974
1983
  }, g.trackItemDetailsMap[T] = w, g.trackItemIds.push(T), !0;
1975
1984
  });
1976
- await Promise.all(k), H.forEach((D) => {
1985
+ await Promise.all(O), R.forEach((D) => {
1977
1986
  const w = D.items.map((x) => _[x]), T = {
1978
1987
  ...D,
1979
1988
  items: w,
1980
1989
  id: fn()
1981
1990
  };
1982
- O.push(T);
1983
- }), g.tracks = [...g.tracks, ...O], t.updateState(
1991
+ A.push(T);
1992
+ }), g.tracks = [...g.tracks, ...A], t.updateState(
1984
1993
  {
1985
1994
  trackItemDetailsMap: g.trackItemDetailsMap,
1986
1995
  tracks: g.tracks,
@@ -1993,20 +2002,24 @@ function qi(t) {
1993
2002
  }
1994
2003
  );
1995
2004
  }
1996
- }), y = l.subscribe((p) => {
1997
- var h, f;
1998
- if (p.key === Ei) {
1999
- const g = t.getState(), v = tt(g.trackItemDetailsMap), _ = Object.keys((h = p.value) == null ? void 0 : h.payload);
2000
- if (!_.length) return;
2001
- const b = (f = p.value) == null ? void 0 : f.payload;
2002
- _.forEach((m) => {
2003
- v[m].details = {
2004
- ...v[m].details,
2005
- ...b[m].details
2006
- };
2007
- }), t.updateState(
2005
+ }), m = f.subscribe((p) => {
2006
+ var h, l;
2007
+ if (p.key === Ai) {
2008
+ const g = tt(t.getState()), v = g.trackItemDetailsMap, _ = g.trackItemsMap, b = Object.keys((h = p.value) == null ? void 0 : h.payload);
2009
+ if (!b.length) return;
2010
+ const y = (l = p.value) == null ? void 0 : l.payload;
2011
+ b.forEach((A) => {
2012
+ y[A].details ? v[A].details = {
2013
+ ...v[A].details,
2014
+ ...y[A].details
2015
+ } : y[A].playbackRate && (_[A].playbackRate = y[A].playbackRate);
2016
+ });
2017
+ const R = tn(_);
2018
+ t.updateState(
2008
2019
  {
2009
- trackItemDetailsMap: { ...v }
2020
+ trackItemDetailsMap: { ...v },
2021
+ trackItemsMap: { ..._ },
2022
+ duration: R
2010
2023
  },
2011
2024
  {
2012
2025
  updateHistory: !0,
@@ -2017,7 +2030,7 @@ function qi(t) {
2017
2030
  });
2018
2031
  return {
2019
2032
  unsubscribe: () => {
2020
- S.unsubscribe(), N.unsubscribe(), y.unsubscribe(), E.unsubscribe(), j.unsubscribe(), d.unsubscribe();
2033
+ S.unsubscribe(), N.unsubscribe(), m.unsubscribe(), E.unsubscribe(), j.unsubscribe(), d.unsubscribe();
2021
2034
  }
2022
2035
  };
2023
2036
  }
@@ -2036,28 +2049,28 @@ function Zn(t, r, n = { cyclesFix: !0 }, i = []) {
2036
2049
  });
2037
2050
  continue;
2038
2051
  }
2039
- const y = r[j], p = typeof S == "object" && typeof y == "object" && Array.isArray(S) === Array.isArray(y);
2040
- if (S && y && p && !Ji[(E = (d = Object.getPrototypeOf(S)) == null ? void 0 : d.constructor) == null ? void 0 : E.name] && (!n.cyclesFix || !i.includes(S))) {
2041
- const h = Zn(S, y, n, n.cyclesFix ? i.concat([S]) : []);
2042
- o.push.apply(o, h.map((f) => (f.path.unshift(N), f)));
2043
- } else S !== y && // treat NaN values as equivalent
2044
- !(Number.isNaN(S) && Number.isNaN(y)) && !(p && (isNaN(S) ? S + "" == y + "" : +S == +y)) && o.push({
2052
+ const m = r[j], p = typeof S == "object" && typeof m == "object" && Array.isArray(S) === Array.isArray(m);
2053
+ 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))) {
2054
+ const h = Zn(S, m, n, n.cyclesFix ? i.concat([S]) : []);
2055
+ o.push.apply(o, h.map((l) => (l.path.unshift(N), l)));
2056
+ } else S !== m && // treat NaN values as equivalent
2057
+ !(Number.isNaN(S) && Number.isNaN(m)) && !(p && (isNaN(S) ? S + "" == m + "" : +S == +m)) && o.push({
2045
2058
  path: [N],
2046
2059
  type: "CHANGE",
2047
- value: y,
2060
+ value: m,
2048
2061
  oldValue: S
2049
2062
  });
2050
2063
  }
2051
- const l = Array.isArray(r);
2064
+ const f = Array.isArray(r);
2052
2065
  for (const j in r)
2053
2066
  j in t || o.push({
2054
2067
  type: "CREATE",
2055
- path: [l ? +j : j],
2068
+ path: [f ? +j : j],
2056
2069
  value: r[j]
2057
2070
  });
2058
2071
  return o;
2059
2072
  }
2060
- var gn = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"), J = Symbol.for("immer-state"), Qn = process.env.NODE_ENV !== "production" ? [
2073
+ var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"), J = Symbol.for("immer-state"), Qn = process.env.NODE_ENV !== "production" ? [
2061
2074
  // All error codes, starting by 0:
2062
2075
  function(t) {
2063
2076
  return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
@@ -2127,7 +2140,7 @@ function Mt(t) {
2127
2140
  function he(t, r) {
2128
2141
  return Mt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
2129
2142
  }
2130
- function tn(t, r) {
2143
+ function en(t, r) {
2131
2144
  return Mt(t) === 2 ? t.get(r) : t[r];
2132
2145
  }
2133
2146
  function ei(t, r, n) {
@@ -2143,10 +2156,10 @@ function _e(t) {
2143
2156
  function ve(t) {
2144
2157
  return t instanceof Set;
2145
2158
  }
2146
- function kt(t) {
2159
+ function Et(t) {
2147
2160
  return t.copy_ || t.base_;
2148
2161
  }
2149
- function ln(t, r) {
2162
+ function pn(t, r) {
2150
2163
  if (_e(t))
2151
2164
  return new Map(t);
2152
2165
  if (ve(t))
@@ -2159,13 +2172,13 @@ function ln(t, r) {
2159
2172
  delete i[J];
2160
2173
  let o = Reflect.ownKeys(i);
2161
2174
  for (let c = 0; c < o.length; c++) {
2162
- const l = o[c], d = i[l];
2163
- d.writable === !1 && (d.writable = !0, d.configurable = !0), (d.get || d.set) && (i[l] = {
2175
+ const f = o[c], d = i[f];
2176
+ d.writable === !1 && (d.writable = !0, d.configurable = !0), (d.get || d.set) && (i[f] = {
2164
2177
  configurable: !0,
2165
2178
  writable: !0,
2166
2179
  // could live with !!desc.set as well here...
2167
2180
  enumerable: d.enumerable,
2168
- value: t[l]
2181
+ value: t[f]
2169
2182
  });
2170
2183
  }
2171
2184
  return Object.create(Ot(t), i);
@@ -2177,8 +2190,8 @@ function ln(t, r) {
2177
2190
  return Object.assign(o, t);
2178
2191
  }
2179
2192
  }
2180
- function _n(t, r = !1) {
2181
- return nr(t) || xt(t) || !gt(t) || (Mt(t) > 1 && (t.set = t.add = t.clear = t.delete = ta), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => _n(i, !0))), t;
2193
+ function vn(t, r = !1) {
2194
+ return nr(t) || xt(t) || !gt(t) || (Mt(t) > 1 && (t.set = t.add = t.clear = t.delete = ta), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => vn(i, !0))), t;
2182
2195
  }
2183
2196
  function ta() {
2184
2197
  G(2);
@@ -2186,13 +2199,13 @@ function ta() {
2186
2199
  function nr(t) {
2187
2200
  return Object.isFrozen(t);
2188
2201
  }
2189
- var pn = {};
2202
+ var dn = {};
2190
2203
  function Pt(t) {
2191
- const r = pn[t];
2204
+ const r = dn[t];
2192
2205
  return r || G(0, t), r;
2193
2206
  }
2194
2207
  function ea(t, r) {
2195
- pn[t] || (pn[t] = r);
2208
+ dn[t] || (dn[t] = r);
2196
2209
  }
2197
2210
  var ye;
2198
2211
  function ri() {
@@ -2212,10 +2225,10 @@ function ra(t, r) {
2212
2225
  function Dn(t, r) {
2213
2226
  r && (Pt("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
2214
2227
  }
2215
- function dn(t) {
2216
- hn(t), t.drafts_.forEach(na), t.drafts_ = null;
2217
- }
2218
2228
  function hn(t) {
2229
+ yn(t), t.drafts_.forEach(na), t.drafts_ = null;
2230
+ }
2231
+ function yn(t) {
2219
2232
  t === ye && (ye = t.parent_);
2220
2233
  }
2221
2234
  function Cn(t) {
@@ -2228,12 +2241,12 @@ function na(t) {
2228
2241
  function jn(t, r) {
2229
2242
  r.unfinalizedDrafts_ = r.drafts_.length;
2230
2243
  const n = r.drafts_[0];
2231
- return t !== void 0 && t !== n ? (n[J].modified_ && (dn(r), G(4)), gt(t) && (t = Ze(r, t), r.parent_ || Qe(r, t)), r.patches_ && Pt("Patches").generateReplacementPatches_(
2244
+ return t !== void 0 && t !== n ? (n[J].modified_ && (hn(r), G(4)), gt(t) && (t = Ze(r, t), r.parent_ || Qe(r, t)), r.patches_ && Pt("Patches").generateReplacementPatches_(
2232
2245
  n[J].base_,
2233
2246
  t,
2234
2247
  r.patches_,
2235
2248
  r.inversePatches_
2236
- )) : t = Ze(r, n, []), dn(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== gn ? t : void 0;
2249
+ )) : t = Ze(r, n, []), hn(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== _n ? t : void 0;
2237
2250
  }
2238
2251
  function Ze(t, r, n) {
2239
2252
  if (nr(r))
@@ -2242,7 +2255,7 @@ function Ze(t, r, n) {
2242
2255
  if (!i)
2243
2256
  return de(
2244
2257
  r,
2245
- (o, c) => Fn(t, i, r, o, c, n)
2258
+ (o, c) => Rn(t, i, r, o, c, n)
2246
2259
  ), r;
2247
2260
  if (i.scope_ !== t)
2248
2261
  return r;
@@ -2251,10 +2264,10 @@ function Ze(t, r, n) {
2251
2264
  if (!i.finalized_) {
2252
2265
  i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
2253
2266
  const o = i.copy_;
2254
- let c = o, l = !1;
2255
- i.type_ === 3 && (c = new Set(o), o.clear(), l = !0), de(
2267
+ let c = o, f = !1;
2268
+ i.type_ === 3 && (c = new Set(o), o.clear(), f = !0), de(
2256
2269
  c,
2257
- (d, E) => Fn(t, i, o, d, E, n, l)
2270
+ (d, E) => Rn(t, i, o, d, E, n, f)
2258
2271
  ), Qe(t, o, !1), n && t.patches_ && Pt("Patches").generatePatches_(
2259
2272
  i,
2260
2273
  n,
@@ -2264,7 +2277,7 @@ function Ze(t, r, n) {
2264
2277
  }
2265
2278
  return i.copy_;
2266
2279
  }
2267
- function Fn(t, r, n, i, o, c, l) {
2280
+ function Rn(t, r, n, i, o, c, f) {
2268
2281
  if (process.env.NODE_ENV !== "production" && o === n && G(5), xt(o)) {
2269
2282
  const d = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
2270
2283
  !he(r.assigned_, i) ? c.concat(i) : void 0, E = Ze(t, o, d);
@@ -2272,7 +2285,7 @@ function Fn(t, r, n, i, o, c, l) {
2272
2285
  t.canAutoFreeze_ = !1;
2273
2286
  else
2274
2287
  return;
2275
- } else l && n.add(o);
2288
+ } else f && n.add(o);
2276
2289
  if (gt(o) && !nr(o)) {
2277
2290
  if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
2278
2291
  return;
@@ -2280,7 +2293,7 @@ function Fn(t, r, n, i, o, c, l) {
2280
2293
  }
2281
2294
  }
2282
2295
  function Qe(t, r, n = !1) {
2283
- !t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && _n(r, n);
2296
+ !t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && vn(r, n);
2284
2297
  }
2285
2298
  function ia(t, r) {
2286
2299
  const n = Array.isArray(t), i = {
@@ -2306,50 +2319,50 @@ function ia(t, r) {
2306
2319
  revoke_: null,
2307
2320
  isManual_: !1
2308
2321
  };
2309
- let o = i, c = vn;
2322
+ let o = i, c = In;
2310
2323
  n && (o = [i], c = me);
2311
- const { revoke: l, proxy: d } = Proxy.revocable(o, c);
2312
- return i.draft_ = d, i.revoke_ = l, d;
2324
+ const { revoke: f, proxy: d } = Proxy.revocable(o, c);
2325
+ return i.draft_ = d, i.revoke_ = f, d;
2313
2326
  }
2314
- var vn = {
2327
+ var In = {
2315
2328
  get(t, r) {
2316
2329
  if (r === J)
2317
2330
  return t;
2318
- const n = kt(t);
2331
+ const n = Et(t);
2319
2332
  if (!he(n, r))
2320
2333
  return aa(t, n, r);
2321
2334
  const i = n[r];
2322
- return t.finalized_ || !gt(i) ? i : i === en(t.base_, r) ? (rn(t), t.copy_[r] = mn(i, t)) : i;
2335
+ return t.finalized_ || !gt(i) ? i : i === rn(t.base_, r) ? (nn(t), t.copy_[r] = bn(i, t)) : i;
2323
2336
  },
2324
2337
  has(t, r) {
2325
- return r in kt(t);
2338
+ return r in Et(t);
2326
2339
  },
2327
2340
  ownKeys(t) {
2328
- return Reflect.ownKeys(kt(t));
2341
+ return Reflect.ownKeys(Et(t));
2329
2342
  },
2330
2343
  set(t, r, n) {
2331
- const i = ni(kt(t), r);
2344
+ const i = ni(Et(t), r);
2332
2345
  if (i != null && i.set)
2333
2346
  return i.set.call(t.draft_, n), !0;
2334
2347
  if (!t.modified_) {
2335
- const o = en(kt(t), r), c = o == null ? void 0 : o[J];
2348
+ const o = rn(Et(t), r), c = o == null ? void 0 : o[J];
2336
2349
  if (c && c.base_ === n)
2337
2350
  return t.copy_[r] = n, t.assigned_[r] = !1, !0;
2338
2351
  if (Qi(n, o) && (n !== void 0 || he(t.base_, r)))
2339
2352
  return !0;
2340
- rn(t), yn(t);
2353
+ nn(t), mn(t);
2341
2354
  }
2342
2355
  return t.copy_[r] === n && // special case: handle new props with value 'undefined'
2343
2356
  (n !== void 0 || r in t.copy_) || // special case: NaN
2344
2357
  Number.isNaN(n) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = n, t.assigned_[r] = !0), !0;
2345
2358
  },
2346
2359
  deleteProperty(t, r) {
2347
- return en(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, rn(t), yn(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
2360
+ return rn(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, nn(t), mn(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
2348
2361
  },
2349
2362
  // Note: We never coerce `desc.value` into an Immer draft, because we can't make
2350
2363
  // the same guarantee in ES5 mode.
2351
2364
  getOwnPropertyDescriptor(t, r) {
2352
- const n = kt(t), i = Reflect.getOwnPropertyDescriptor(n, r);
2365
+ const n = Et(t), i = Reflect.getOwnPropertyDescriptor(n, r);
2353
2366
  return i && {
2354
2367
  writable: !0,
2355
2368
  configurable: t.type_ !== 1 || r !== "length",
@@ -2367,7 +2380,7 @@ var vn = {
2367
2380
  G(12);
2368
2381
  }
2369
2382
  }, me = {};
2370
- de(vn, (t, r) => {
2383
+ de(In, (t, r) => {
2371
2384
  me[t] = function() {
2372
2385
  return arguments[0] = arguments[0][0], r.apply(this, arguments);
2373
2386
  };
@@ -2376,11 +2389,11 @@ me.deleteProperty = function(t, r) {
2376
2389
  return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && G(13), me.set.call(this, t, r, void 0);
2377
2390
  };
2378
2391
  me.set = function(t, r, n) {
2379
- return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && G(14), vn.set.call(this, t[0], r, n, t[0]);
2392
+ return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && G(14), In.set.call(this, t[0], r, n, t[0]);
2380
2393
  };
2381
- function en(t, r) {
2394
+ function rn(t, r) {
2382
2395
  const n = t[J];
2383
- return (n ? kt(n) : t)[r];
2396
+ return (n ? Et(n) : t)[r];
2384
2397
  }
2385
2398
  function aa(t, r, n) {
2386
2399
  var o;
@@ -2402,11 +2415,11 @@ function ni(t, r) {
2402
2415
  n = Ot(n);
2403
2416
  }
2404
2417
  }
2405
- function yn(t) {
2406
- t.modified_ || (t.modified_ = !0, t.parent_ && yn(t.parent_));
2418
+ function mn(t) {
2419
+ t.modified_ || (t.modified_ = !0, t.parent_ && mn(t.parent_));
2407
2420
  }
2408
- function rn(t) {
2409
- t.copy_ || (t.copy_ = ln(
2421
+ function nn(t) {
2422
+ t.copy_ || (t.copy_ = pn(
2410
2423
  t.base_,
2411
2424
  t.scope_.immer_.useStrictShallowCopy_
2412
2425
  ));
@@ -2417,43 +2430,43 @@ var sa = class {
2417
2430
  if (typeof r == "function" && typeof n != "function") {
2418
2431
  const c = n;
2419
2432
  n = r;
2420
- const l = this;
2433
+ const f = this;
2421
2434
  return function(E = c, ...j) {
2422
- return l.produce(E, (S) => n.call(this, S, ...j));
2435
+ return f.produce(E, (S) => n.call(this, S, ...j));
2423
2436
  };
2424
2437
  }
2425
2438
  typeof n != "function" && G(6), i !== void 0 && typeof i != "function" && G(7);
2426
2439
  let o;
2427
2440
  if (gt(r)) {
2428
- const c = Cn(this), l = mn(r, void 0);
2441
+ const c = Cn(this), f = bn(r, void 0);
2429
2442
  let d = !0;
2430
2443
  try {
2431
- o = n(l), d = !1;
2444
+ o = n(f), d = !1;
2432
2445
  } finally {
2433
- d ? dn(c) : hn(c);
2446
+ d ? hn(c) : yn(c);
2434
2447
  }
2435
2448
  return Dn(c, i), jn(o, c);
2436
2449
  } else if (!r || typeof r != "object") {
2437
- if (o = n(r), o === void 0 && (o = r), o === gn && (o = void 0), this.autoFreeze_ && _n(o, !0), i) {
2438
- const c = [], l = [];
2439
- Pt("Patches").generateReplacementPatches_(r, o, c, l), i(c, l);
2450
+ if (o = n(r), o === void 0 && (o = r), o === _n && (o = void 0), this.autoFreeze_ && vn(o, !0), i) {
2451
+ const c = [], f = [];
2452
+ Pt("Patches").generateReplacementPatches_(r, o, c, f), i(c, f);
2440
2453
  }
2441
2454
  return o;
2442
2455
  } else
2443
2456
  G(1, r);
2444
2457
  }, this.produceWithPatches = (r, n) => {
2445
2458
  if (typeof r == "function")
2446
- return (l, ...d) => this.produceWithPatches(l, (E) => r(E, ...d));
2459
+ return (f, ...d) => this.produceWithPatches(f, (E) => r(E, ...d));
2447
2460
  let i, o;
2448
- return [this.produce(r, n, (l, d) => {
2449
- i = l, o = d;
2461
+ return [this.produce(r, n, (f, d) => {
2462
+ i = f, o = d;
2450
2463
  }), i, o];
2451
2464
  }, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
2452
2465
  }
2453
2466
  createDraft(t) {
2454
2467
  gt(t) || G(8), xt(t) && (t = oa(t));
2455
- const r = Cn(this), n = mn(t, void 0);
2456
- return n[J].isManual_ = !0, hn(r), n;
2468
+ const r = Cn(this), n = bn(t, void 0);
2469
+ return n[J].isManual_ = !0, yn(r), n;
2457
2470
  }
2458
2471
  finishDraft(t, r) {
2459
2472
  const n = t && t[J];
@@ -2494,7 +2507,7 @@ var sa = class {
2494
2507
  );
2495
2508
  }
2496
2509
  };
2497
- function mn(t, r) {
2510
+ function bn(t, r) {
2498
2511
  const n = _e(t) ? Pt("MapSet").proxyMap_(t, r) : ve(t) ? Pt("MapSet").proxySet_(t, r) : ia(t, r);
2499
2512
  return (r ? r.scope_ : ri()).drafts_.push(n), n;
2500
2513
  }
@@ -2509,202 +2522,202 @@ function ii(t) {
2509
2522
  if (r) {
2510
2523
  if (!r.modified_)
2511
2524
  return r.base_;
2512
- r.finalized_ = !0, n = ln(t, r.scope_.immer_.useStrictShallowCopy_);
2525
+ r.finalized_ = !0, n = pn(t, r.scope_.immer_.useStrictShallowCopy_);
2513
2526
  } else
2514
- n = ln(t, !0);
2527
+ n = pn(t, !0);
2515
2528
  return de(n, (i, o) => {
2516
2529
  ei(n, i, ii(o));
2517
2530
  }), r && (r.finalized_ = !1), n;
2518
2531
  }
2519
- function Rn() {
2532
+ function Fn() {
2520
2533
  process.env.NODE_ENV !== "production" && Qn.push(
2521
2534
  'Sets cannot have "replace" patches.',
2522
- function(y) {
2523
- return "Unsupported patch operation: " + y;
2535
+ function(m) {
2536
+ return "Unsupported patch operation: " + m;
2524
2537
  },
2525
- function(y) {
2526
- return "Cannot apply patch, path doesn't resolve: " + y;
2538
+ function(m) {
2539
+ return "Cannot apply patch, path doesn't resolve: " + m;
2527
2540
  },
2528
2541
  "Patching reserved attributes like __proto__, prototype and constructor is not allowed"
2529
2542
  );
2530
2543
  const r = "replace", n = "add", i = "remove";
2531
- function o(y, p, h, f) {
2532
- switch (y.type_) {
2544
+ function o(m, p, h, l) {
2545
+ switch (m.type_) {
2533
2546
  case 0:
2534
2547
  case 2:
2535
- return l(
2536
- y,
2548
+ return f(
2549
+ m,
2537
2550
  p,
2538
2551
  h,
2539
- f
2552
+ l
2540
2553
  );
2541
2554
  case 1:
2542
- return c(y, p, h, f);
2555
+ return c(m, p, h, l);
2543
2556
  case 3:
2544
2557
  return d(
2545
- y,
2558
+ m,
2546
2559
  p,
2547
2560
  h,
2548
- f
2561
+ l
2549
2562
  );
2550
2563
  }
2551
2564
  }
2552
- function c(y, p, h, f) {
2553
- let { base_: g, assigned_: v } = y, _ = y.copy_;
2554
- _.length < g.length && ([g, _] = [_, g], [h, f] = [f, h]);
2565
+ function c(m, p, h, l) {
2566
+ let { base_: g, assigned_: v } = m, _ = m.copy_;
2567
+ _.length < g.length && ([g, _] = [_, g], [h, l] = [l, h]);
2555
2568
  for (let b = 0; b < g.length; b++)
2556
2569
  if (v[b] && _[b] !== g[b]) {
2557
- const m = p.concat([b]);
2570
+ const y = p.concat([b]);
2558
2571
  h.push({
2559
2572
  op: r,
2560
- path: m,
2573
+ path: y,
2561
2574
  // Need to maybe clone it, as it can in fact be the original value
2562
2575
  // due to the base/copy inversion at the start of this function
2563
2576
  value: N(_[b])
2564
- }), f.push({
2577
+ }), l.push({
2565
2578
  op: r,
2566
- path: m,
2579
+ path: y,
2567
2580
  value: N(g[b])
2568
2581
  });
2569
2582
  }
2570
2583
  for (let b = g.length; b < _.length; b++) {
2571
- const m = p.concat([b]);
2584
+ const y = p.concat([b]);
2572
2585
  h.push({
2573
2586
  op: n,
2574
- path: m,
2587
+ path: y,
2575
2588
  // Need to maybe clone it, as it can in fact be the original value
2576
2589
  // due to the base/copy inversion at the start of this function
2577
2590
  value: N(_[b])
2578
2591
  });
2579
2592
  }
2580
2593
  for (let b = _.length - 1; g.length <= b; --b) {
2581
- const m = p.concat([b]);
2582
- f.push({
2594
+ const y = p.concat([b]);
2595
+ l.push({
2583
2596
  op: i,
2584
- path: m
2597
+ path: y
2585
2598
  });
2586
2599
  }
2587
2600
  }
2588
- function l(y, p, h, f) {
2589
- const { base_: g, copy_: v } = y;
2590
- de(y.assigned_, (_, b) => {
2591
- const m = tn(g, _), H = tn(v, _), O = b ? he(g, _) ? r : n : i;
2592
- if (m === H && O === r)
2601
+ function f(m, p, h, l) {
2602
+ const { base_: g, copy_: v } = m;
2603
+ de(m.assigned_, (_, b) => {
2604
+ const y = en(g, _), R = en(v, _), A = b ? he(g, _) ? r : n : i;
2605
+ if (y === R && A === r)
2593
2606
  return;
2594
- const k = p.concat(_);
2595
- h.push(O === i ? { op: O, path: k } : { op: O, path: k, value: H }), f.push(
2596
- O === n ? { op: i, path: k } : O === i ? { op: n, path: k, value: N(m) } : { op: r, path: k, value: N(m) }
2607
+ const O = p.concat(_);
2608
+ h.push(A === i ? { op: A, path: O } : { op: A, path: O, value: R }), l.push(
2609
+ A === n ? { op: i, path: O } : A === i ? { op: n, path: O, value: N(y) } : { op: r, path: O, value: N(y) }
2597
2610
  );
2598
2611
  });
2599
2612
  }
2600
- function d(y, p, h, f) {
2601
- let { base_: g, copy_: v } = y, _ = 0;
2613
+ function d(m, p, h, l) {
2614
+ let { base_: g, copy_: v } = m, _ = 0;
2602
2615
  g.forEach((b) => {
2603
2616
  if (!v.has(b)) {
2604
- const m = p.concat([_]);
2617
+ const y = p.concat([_]);
2605
2618
  h.push({
2606
2619
  op: i,
2607
- path: m,
2620
+ path: y,
2608
2621
  value: b
2609
- }), f.unshift({
2622
+ }), l.unshift({
2610
2623
  op: n,
2611
- path: m,
2624
+ path: y,
2612
2625
  value: b
2613
2626
  });
2614
2627
  }
2615
2628
  _++;
2616
2629
  }), _ = 0, v.forEach((b) => {
2617
2630
  if (!g.has(b)) {
2618
- const m = p.concat([_]);
2631
+ const y = p.concat([_]);
2619
2632
  h.push({
2620
2633
  op: n,
2621
- path: m,
2634
+ path: y,
2622
2635
  value: b
2623
- }), f.unshift({
2636
+ }), l.unshift({
2624
2637
  op: i,
2625
- path: m,
2638
+ path: y,
2626
2639
  value: b
2627
2640
  });
2628
2641
  }
2629
2642
  _++;
2630
2643
  });
2631
2644
  }
2632
- function E(y, p, h, f) {
2645
+ function E(m, p, h, l) {
2633
2646
  h.push({
2634
2647
  op: r,
2635
2648
  path: [],
2636
- value: p === gn ? void 0 : p
2637
- }), f.push({
2649
+ value: p === _n ? void 0 : p
2650
+ }), l.push({
2638
2651
  op: r,
2639
2652
  path: [],
2640
- value: y
2653
+ value: m
2641
2654
  });
2642
2655
  }
2643
- function j(y, p) {
2656
+ function j(m, p) {
2644
2657
  return p.forEach((h) => {
2645
- const { path: f, op: g } = h;
2646
- let v = y;
2647
- for (let H = 0; H < f.length - 1; H++) {
2648
- const O = Mt(v);
2649
- let k = f[H];
2650
- typeof k != "string" && typeof k != "number" && (k = "" + k), (O === 0 || O === 1) && (k === "__proto__" || k === "constructor") && G(19), typeof v == "function" && k === "prototype" && G(19), v = tn(v, k), typeof v != "object" && G(18, f.join("/"));
2658
+ const { path: l, op: g } = h;
2659
+ let v = m;
2660
+ for (let R = 0; R < l.length - 1; R++) {
2661
+ const A = Mt(v);
2662
+ let O = l[R];
2663
+ 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("/"));
2651
2664
  }
2652
- const _ = Mt(v), b = S(h.value), m = f[f.length - 1];
2665
+ const _ = Mt(v), b = S(h.value), y = l[l.length - 1];
2653
2666
  switch (g) {
2654
2667
  case r:
2655
2668
  switch (_) {
2656
2669
  case 2:
2657
- return v.set(m, b);
2670
+ return v.set(y, b);
2658
2671
  case 3:
2659
2672
  G(16);
2660
2673
  default:
2661
- return v[m] = b;
2674
+ return v[y] = b;
2662
2675
  }
2663
2676
  case n:
2664
2677
  switch (_) {
2665
2678
  case 1:
2666
- return m === "-" ? v.push(b) : v.splice(m, 0, b);
2679
+ return y === "-" ? v.push(b) : v.splice(y, 0, b);
2667
2680
  case 2:
2668
- return v.set(m, b);
2681
+ return v.set(y, b);
2669
2682
  case 3:
2670
2683
  return v.add(b);
2671
2684
  default:
2672
- return v[m] = b;
2685
+ return v[y] = b;
2673
2686
  }
2674
2687
  case i:
2675
2688
  switch (_) {
2676
2689
  case 1:
2677
- return v.splice(m, 1);
2690
+ return v.splice(y, 1);
2678
2691
  case 2:
2679
- return v.delete(m);
2692
+ return v.delete(y);
2680
2693
  case 3:
2681
2694
  return v.delete(h.value);
2682
2695
  default:
2683
- return delete v[m];
2696
+ return delete v[y];
2684
2697
  }
2685
2698
  default:
2686
2699
  G(17, g);
2687
2700
  }
2688
- }), y;
2689
- }
2690
- function S(y) {
2691
- if (!gt(y))
2692
- return y;
2693
- if (Array.isArray(y))
2694
- return y.map(S);
2695
- if (_e(y))
2701
+ }), m;
2702
+ }
2703
+ function S(m) {
2704
+ if (!gt(m))
2705
+ return m;
2706
+ if (Array.isArray(m))
2707
+ return m.map(S);
2708
+ if (_e(m))
2696
2709
  return new Map(
2697
- Array.from(y.entries()).map(([h, f]) => [h, S(f)])
2710
+ Array.from(m.entries()).map(([h, l]) => [h, S(l)])
2698
2711
  );
2699
- if (ve(y))
2700
- return new Set(Array.from(y).map(S));
2701
- const p = Object.create(Ot(y));
2702
- for (const h in y)
2703
- p[h] = S(y[h]);
2704
- return he(y, pe) && (p[pe] = y[pe]), p;
2712
+ if (ve(m))
2713
+ return new Set(Array.from(m).map(S));
2714
+ const p = Object.create(Ot(m));
2715
+ for (const h in m)
2716
+ p[h] = S(m[h]);
2717
+ return he(m, pe) && (p[pe] = m[pe]), p;
2705
2718
  }
2706
- function N(y) {
2707
- return xt(y) ? S(y) : y;
2719
+ function N(m) {
2720
+ return xt(m) ? S(m) : m;
2708
2721
  }
2709
2722
  ea("Patches", {
2710
2723
  applyPatches_: j,
@@ -2721,7 +2734,7 @@ Z.setUseStrictShallowCopy.bind(Z);
2721
2734
  var ua = Z.applyPatches.bind(Z);
2722
2735
  Z.createDraft.bind(Z);
2723
2736
  Z.finishDraft.bind(Z);
2724
- var fa = 1 / 0, la = 9007199254740991, pa = "[object Arguments]", da = "[object Function]", ha = "[object GeneratorFunction]", ya = "[object Symbol]", ma = typeof et == "object" && et && et.Object === Object && et, ba = typeof self == "object" && self && self.Object === Object && self, ga = ma || ba || Function("return this")();
2737
+ var la = 1 / 0, fa = 9007199254740991, pa = "[object Arguments]", da = "[object Function]", ha = "[object GeneratorFunction]", ya = "[object Symbol]", ma = typeof et == "object" && et && et.Object === Object && et, ba = typeof self == "object" && self && self.Object === Object && self, ga = ma || ba || Function("return this")();
2725
2738
  function _a(t, r, n) {
2726
2739
  switch (n.length) {
2727
2740
  case 0:
@@ -2745,35 +2758,35 @@ function Ia(t, r) {
2745
2758
  t[o + n] = r[n];
2746
2759
  return t;
2747
2760
  }
2748
- var In = Object.prototype, Sa = In.hasOwnProperty, Sn = In.toString, zn = ga.Symbol, wa = In.propertyIsEnumerable, Hn = zn ? zn.isConcatSpreadable : void 0, Nn = Math.max;
2761
+ var Sn = Object.prototype, Sa = Sn.hasOwnProperty, wn = Sn.toString, zn = ga.Symbol, wa = Sn.propertyIsEnumerable, Hn = zn ? zn.isConcatSpreadable : void 0, Nn = Math.max;
2749
2762
  function Ta(t, r, n, i, o) {
2750
- var c = -1, l = t.length;
2751
- for (n || (n = Oa), o || (o = []); ++c < l; ) {
2763
+ var c = -1, f = t.length;
2764
+ for (n || (n = Oa), o || (o = []); ++c < f; ) {
2752
2765
  var d = t[c];
2753
2766
  n(d) ? Ia(o, d) : o[o.length] = d;
2754
2767
  }
2755
2768
  return o;
2756
2769
  }
2757
- function Aa(t, r) {
2758
- return t = Object(t), Ea(t, r, function(n, i) {
2770
+ function ka(t, r) {
2771
+ return t = Object(t), Aa(t, r, function(n, i) {
2759
2772
  return i in t;
2760
2773
  });
2761
2774
  }
2762
- function Ea(t, r, n) {
2775
+ function Aa(t, r, n) {
2763
2776
  for (var i = -1, o = r.length, c = {}; ++i < o; ) {
2764
- var l = r[i], d = t[l];
2765
- n(d, l) && (c[l] = d);
2777
+ var f = r[i], d = t[f];
2778
+ n(d, f) && (c[f] = d);
2766
2779
  }
2767
2780
  return c;
2768
2781
  }
2769
- function ka(t, r) {
2782
+ function Ea(t, r) {
2770
2783
  return r = Nn(r === void 0 ? t.length - 1 : r, 0), function() {
2771
2784
  for (var n = arguments, i = -1, o = Nn(n.length - r, 0), c = Array(o); ++i < o; )
2772
2785
  c[i] = n[r + i];
2773
2786
  i = -1;
2774
- for (var l = Array(r + 1); ++i < r; )
2775
- l[i] = n[i];
2776
- return l[r] = c, _a(t, this, l);
2787
+ for (var f = Array(r + 1); ++i < r; )
2788
+ f[i] = n[i];
2789
+ return f[r] = c, _a(t, this, f);
2777
2790
  };
2778
2791
  }
2779
2792
  function Oa(t) {
@@ -2783,26 +2796,26 @@ function xa(t) {
2783
2796
  if (typeof t == "string" || za(t))
2784
2797
  return t;
2785
2798
  var r = t + "";
2786
- return r == "0" && 1 / t == -fa ? "-0" : r;
2799
+ return r == "0" && 1 / t == -la ? "-0" : r;
2787
2800
  }
2788
2801
  function Ma(t) {
2789
- return Ca(t) && Sa.call(t, "callee") && (!wa.call(t, "callee") || Sn.call(t) == pa);
2802
+ return Ca(t) && Sa.call(t, "callee") && (!wa.call(t, "callee") || wn.call(t) == pa);
2790
2803
  }
2791
2804
  var Pa = Array.isArray;
2792
2805
  function Da(t) {
2793
- return t != null && Fa(t.length) && !ja(t);
2806
+ return t != null && Ra(t.length) && !ja(t);
2794
2807
  }
2795
2808
  function Ca(t) {
2796
2809
  return ai(t) && Da(t);
2797
2810
  }
2798
2811
  function ja(t) {
2799
- var r = Ra(t) ? Sn.call(t) : "";
2812
+ var r = Fa(t) ? wn.call(t) : "";
2800
2813
  return r == da || r == ha;
2801
2814
  }
2802
- function Fa(t) {
2803
- return typeof t == "number" && t > -1 && t % 1 == 0 && t <= la;
2804
- }
2805
2815
  function Ra(t) {
2816
+ return typeof t == "number" && t > -1 && t % 1 == 0 && t <= fa;
2817
+ }
2818
+ function Fa(t) {
2806
2819
  var r = typeof t;
2807
2820
  return !!t && (r == "object" || r == "function");
2808
2821
  }
@@ -2810,12 +2823,12 @@ function ai(t) {
2810
2823
  return !!t && typeof t == "object";
2811
2824
  }
2812
2825
  function za(t) {
2813
- return typeof t == "symbol" || ai(t) && Sn.call(t) == ya;
2826
+ return typeof t == "symbol" || ai(t) && wn.call(t) == ya;
2814
2827
  }
2815
- var Ha = ka(function(t, r) {
2816
- return t == null ? {} : Aa(t, va(Ta(r), xa));
2828
+ var Ha = Ea(function(t, r) {
2829
+ return t == null ? {} : ka(t, va(Ta(r), xa));
2817
2830
  }), Na = Ha;
2818
- const Un = /* @__PURE__ */ bn(Na), Ua = {
2831
+ const Un = /* @__PURE__ */ gn(Na), Ua = {
2819
2832
  tracks: [],
2820
2833
  trackItemIds: [],
2821
2834
  trackItemsMap: {},
@@ -2839,14 +2852,14 @@ const Un = /* @__PURE__ */ bn(Na), Ua = {
2839
2852
  ];
2840
2853
  class Wa {
2841
2854
  constructor(r) {
2842
- Et(this, "stateSubject");
2843
- Et(this, "stateHistorySubject");
2844
- Et(this, "prevState");
2845
- Et(this, "undos", []);
2846
- Et(this, "redos", []);
2847
- Et(this, "listener");
2855
+ At(this, "stateSubject");
2856
+ At(this, "stateHistorySubject");
2857
+ At(this, "prevState");
2858
+ At(this, "undos", []);
2859
+ At(this, "redos", []);
2860
+ At(this, "listener");
2848
2861
  const n = r || Ua;
2849
- this.stateSubject = new xn(n), this.stateHistorySubject = new xn({
2862
+ this.stateSubject = new Mn(n), this.stateHistorySubject = new Mn({
2850
2863
  handleRedo: !1,
2851
2864
  handleUndo: !1
2852
2865
  }), this.prevState = n, this.initListeners();
@@ -2884,17 +2897,22 @@ class Wa {
2884
2897
  ...i,
2885
2898
  ...r
2886
2899
  };
2887
- ft(i, o) || (n.updateHistory && this.updateHistory(o, n.kind), this.prevState = i, this.stateSubject.next(o));
2900
+ st(i, o) || (n.updateHistory && this.updateHistory(o, n.kind), this.prevState = i, this.stateSubject.next(o));
2888
2901
  }
2889
2902
  // Selectively subscribe to scale changes
2890
2903
  subscribeToScale(r) {
2891
2904
  return this.stateSubject.asObservable().subscribe((n) => {
2892
- ft(n.scale, this.prevState.scale) || r({ scale: n.scale });
2905
+ st(n.scale, this.prevState.scale) || r({ scale: n.scale });
2906
+ });
2907
+ }
2908
+ subscribeToUpdateTrackItem(r) {
2909
+ return this.stateSubject.asObservable().subscribe((n) => {
2910
+ st(n.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: n.trackItemsMap });
2893
2911
  });
2894
2912
  }
2895
2913
  subscribeToUpdateItemDetails(r) {
2896
2914
  return this.stateSubject.asObservable().subscribe((n) => {
2897
- ft(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
2915
+ st(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
2898
2916
  });
2899
2917
  }
2900
2918
  // Selectively subscribe to duration changes
@@ -2917,19 +2935,19 @@ class Wa {
2917
2935
  }
2918
2936
  subscribeToAddOrRemoveItems(r) {
2919
2937
  return this.stateSubject.asObservable().subscribe((n) => {
2920
- ft(n.trackItemIds, this.prevState.trackItemIds) || r({ trackItemIds: n.trackItemIds });
2938
+ st(n.trackItemIds, this.prevState.trackItemIds) || r({ trackItemIds: n.trackItemIds });
2921
2939
  });
2922
2940
  }
2923
2941
  // Selectively subscribe to activeIds changes
2924
2942
  subscribeToActiveIds(r) {
2925
2943
  return this.stateSubject.asObservable().subscribe((n) => {
2926
- ft(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
2944
+ st(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
2927
2945
  });
2928
2946
  }
2929
2947
  // Selectively subscribe to multiple track-related properties
2930
2948
  subscribeToTracks(r) {
2931
2949
  return this.stateSubject.asObservable().subscribe((n) => {
2932
- (!ft(n.tracks, this.prevState.tracks) || !ft(n.trackItemIds, this.prevState.trackItemIds) || !ft(n.trackItemsMap, this.prevState.trackItemsMap) || !ft(n.transitionIds, this.prevState.transitionIds) || !ft(n.transitionsMap, this.prevState.transitionsMap)) && r({
2950
+ (!st(n.tracks, this.prevState.tracks) || !st(n.trackItemIds, this.prevState.trackItemIds) || !st(n.trackItemsMap, this.prevState.trackItemsMap) || !st(n.transitionIds, this.prevState.transitionIds) || !st(n.transitionsMap, this.prevState.transitionsMap)) && r({
2933
2951
  tracks: n.tracks,
2934
2952
  trackItemIds: n.trackItemIds,
2935
2953
  trackItemsMap: n.trackItemsMap,
@@ -2942,22 +2960,22 @@ class Wa {
2942
2960
  undo() {
2943
2961
  const r = this.undos.pop(), n = r == null ? void 0 : r.undos, i = r == null ? void 0 : r.type;
2944
2962
  if (!n || !i) return;
2945
- Rn();
2963
+ Fn();
2946
2964
  const {
2947
2965
  trackItemDetailsMap: o,
2948
2966
  trackItemIds: c,
2949
- tracks: l,
2967
+ tracks: f,
2950
2968
  transitionIds: d,
2951
2969
  transitionsMap: E,
2952
2970
  trackItemsMap: j
2953
2971
  } = this.getState(), S = tt({
2954
2972
  trackItemDetailsMap: o,
2955
2973
  trackItemIds: c,
2956
- tracks: l,
2974
+ tracks: f,
2957
2975
  transitionIds: d,
2958
2976
  transitionsMap: E,
2959
2977
  trackItemsMap: j
2960
- }), N = [], y = [], p = [], h = [], f = [], g = [];
2978
+ }), N = [], m = [], p = [], h = [], l = [], g = [];
2961
2979
  n.forEach((T) => {
2962
2980
  let x;
2963
2981
  const F = T.path.slice(1);
@@ -2973,34 +2991,34 @@ class Wa {
2973
2991
  path: F,
2974
2992
  op: "add",
2975
2993
  value: T.oldValue
2976
- }, T.path.includes("trackItemIds") ? p.push(x) : T.path.includes("transitionIds") ? y.push(x) : T.path.includes("trackItemsMap") ? f.push(x) : T.path.includes("transitionsMap") ? h.push(x) : T.path.includes("tracks") ? N.push(x) : T.path.includes("trackItemDetailsMap") && g.push(x);
2994
+ }, 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") ? N.push(x) : T.path.includes("trackItemDetailsMap") && g.push(x);
2977
2995
  });
2978
2996
  const v = this.applyPatch(
2979
2997
  S.tracks,
2980
2998
  N
2981
2999
  ), _ = this.applyPatch(
2982
3000
  S.transitionIds,
2983
- y
3001
+ m
2984
3002
  ), b = this.applyPatch(
2985
3003
  S.trackItemIds,
2986
3004
  p
2987
- ), m = this.applyPatch(
3005
+ ), y = this.applyPatch(
2988
3006
  S.transitionsMap,
2989
3007
  h
2990
- ), H = this.applyPatch(
3008
+ ), R = this.applyPatch(
2991
3009
  S.trackItemsMap,
2992
- f
2993
- ), O = this.applyPatch(
3010
+ l
3011
+ ), A = this.applyPatch(
2994
3012
  S.trackItemDetailsMap,
2995
3013
  g
2996
- ), k = tt({
3014
+ ), O = tt({
2997
3015
  tracks: v,
2998
3016
  transitionIds: _,
2999
3017
  trackItemIds: b,
3000
- transitionsMap: m,
3001
- trackItemsMap: H,
3002
- trackItemDetailsMap: O
3003
- }), D = tt(this.getState()), w = { ...D, ...k };
3018
+ transitionsMap: y,
3019
+ trackItemsMap: R,
3020
+ trackItemDetailsMap: A
3021
+ }), D = tt(this.getState()), w = { ...D, ...O };
3004
3022
  this.prevState = D, this.redos.push({ redos: n, type: i }), this.stateSubject.next(w), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
3005
3023
  }
3006
3024
  applyPatch(r, n) {
@@ -3011,22 +3029,22 @@ class Wa {
3011
3029
  redo() {
3012
3030
  const r = this.redos.pop(), n = r == null ? void 0 : r.redos, i = r == null ? void 0 : r.type;
3013
3031
  if (!n || !i) return;
3014
- Rn();
3032
+ Fn();
3015
3033
  const {
3016
3034
  trackItemDetailsMap: o,
3017
3035
  trackItemIds: c,
3018
- tracks: l,
3036
+ tracks: f,
3019
3037
  transitionIds: d,
3020
3038
  transitionsMap: E,
3021
3039
  trackItemsMap: j
3022
3040
  } = this.getState(), S = tt({
3023
3041
  trackItemDetailsMap: o,
3024
3042
  trackItemIds: c,
3025
- tracks: l,
3043
+ tracks: f,
3026
3044
  transitionIds: d,
3027
3045
  transitionsMap: E,
3028
3046
  trackItemsMap: j
3029
- }), N = [], y = [], p = [], h = [], f = [], g = [];
3047
+ }), N = [], m = [], p = [], h = [], l = [], g = [];
3030
3048
  n.forEach((T) => {
3031
3049
  let x;
3032
3050
  const F = T.path.slice(1);
@@ -3042,34 +3060,34 @@ class Wa {
3042
3060
  path: F,
3043
3061
  op: "remove",
3044
3062
  value: T.oldValue
3045
- }, T.path.includes("trackItemIds") ? p.push(x) : T.path.includes("transitionIds") ? y.push(x) : T.path.includes("trackItemsMap") ? f.push(x) : T.path.includes("transitionsMap") ? h.push(x) : T.path.includes("trackItemDetailsMap") ? g.push(x) : N.push(x);
3063
+ }, 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") ? g.push(x) : N.push(x);
3046
3064
  });
3047
3065
  const v = this.applyPatch(
3048
3066
  S.tracks,
3049
3067
  N
3050
3068
  ), _ = this.applyPatch(
3051
3069
  S.transitionIds,
3052
- y
3070
+ m
3053
3071
  ), b = this.applyPatch(
3054
3072
  S.trackItemIds,
3055
3073
  p
3056
- ), m = this.applyPatch(
3074
+ ), y = this.applyPatch(
3057
3075
  S.transitionsMap,
3058
3076
  h
3059
- ), H = this.applyPatch(
3077
+ ), R = this.applyPatch(
3060
3078
  S.trackItemsMap,
3061
- f
3062
- ), O = this.applyPatch(
3079
+ l
3080
+ ), A = this.applyPatch(
3063
3081
  S.trackItemDetailsMap,
3064
3082
  g
3065
- ), k = tt({
3083
+ ), O = tt({
3066
3084
  tracks: v,
3067
3085
  transitionIds: _,
3068
3086
  trackItemIds: b,
3069
- transitionsMap: m,
3070
- trackItemsMap: H,
3071
- trackItemDetailsMap: O
3072
- }), D = tt(this.getState()), w = { ...D, ...k };
3087
+ transitionsMap: y,
3088
+ trackItemsMap: R,
3089
+ trackItemDetailsMap: A
3090
+ }), D = tt(this.getState()), w = { ...D, ...O };
3073
3091
  this.prevState = D, this.undos.push({ undos: n, type: i }), this.stateSubject.next(w), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
3074
3092
  }
3075
3093
  }