@designcombo/state 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,57 +1,2852 @@
1
- var o = Object.defineProperty;
2
- var I = (r, t, a) => t in r ? o(r, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : r[t] = a;
3
- var e = (r, t, a) => I(r, typeof t != "symbol" ? t + "" : t, a);
4
- import { dispatch as i, STATE_CHANGED as m, LAYER_SELECTION as l } from "@designcombo/events";
5
- class p {
6
- constructor() {
7
- e(this, "tracks", []);
8
- e(this, "trackItemsMap", {});
9
- e(this, "trackItemIds", []);
10
- e(this, "transitionIds", []);
11
- e(this, "transitionsMap", {});
12
- e(this, "scale");
13
- e(this, "duration");
14
- e(this, "activeIds", []);
15
- e(this, "targetIds", []);
16
- }
17
- notify() {
18
- i(m, {
19
- payload: {
20
- tracks: this.tracks,
21
- trackItemIds: this.trackItemIds,
22
- trackItemsMap: this.trackItemsMap,
23
- transitionIds: this.transitionIds,
24
- transitionsMap: this.transitionsMap,
25
- scale: this.scale,
26
- duration: this.duration
27
- }
28
- });
29
- }
30
- selectItem() {
31
- const t = this.getTargetIds();
32
- this.targetIds = t, i(l, {
33
- payload: {
34
- activeIds: this.activeIds,
35
- targetIds: t
36
- }
37
- });
38
- }
39
- getCurrentTime() {
40
- const t = document.getElementById("video-current-time");
41
- return (t ? parseFloat(t.getAttribute("data-current-time")) : 0) * 1e3;
42
- }
43
- getTargetIds() {
44
- const t = this.getCurrentTime();
45
- return this.activeIds.filter(
46
- (s) => this.trackItemIds.includes(s)
47
- ).map(
48
- (s) => this.trackItemsMap[s]
49
- ).filter((s) => {
50
- const n = s.display.from, d = s.display.to;
51
- return n <= t && d >= t;
52
- }).map((s) => s.id);
1
+ var ei = Object.defineProperty;
2
+ var ri = (t, r, n) => r in t ? ei(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
3
+ var Et = (t, r, n) => ri(t, typeof r != "symbol" ? r + "" : r, n);
4
+ import { subject as $e, filter as We, ADD_PREFIX as ni, HISTORY_PREFIX as ii, ACTIVE_PREFIX as oi, EDIT_PREFIX as si, HISTORY_UNDO as ai, HISTORY_REDO as ci, ADD_TEXT as ui, ADD_IMAGE as fi, ADD_AUDIO as li, ADD_VIDEO as pi, ACTIVE_DELETE as di, EDIT_OBJECT as hi } from "@designcombo/events";
5
+ var tn = function(t, r) {
6
+ return tn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, o) {
7
+ n.__proto__ = o;
8
+ } || function(n, o) {
9
+ for (var a in o) Object.prototype.hasOwnProperty.call(o, a) && (n[a] = o[a]);
10
+ }, tn(t, r);
11
+ };
12
+ function de(t, r) {
13
+ if (typeof r != "function" && r !== null)
14
+ throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
15
+ tn(t, r);
16
+ function n() {
17
+ this.constructor = t;
18
+ }
19
+ t.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype, new n());
20
+ }
21
+ function en(t) {
22
+ var r = typeof Symbol == "function" && Symbol.iterator, n = r && t[r], o = 0;
23
+ if (n) return n.call(t);
24
+ if (t && typeof t.length == "number") return {
25
+ next: function() {
26
+ return t && o >= t.length && (t = void 0), { value: t && t[o++], done: !t };
27
+ }
28
+ };
29
+ throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
30
+ }
31
+ function rn(t, r) {
32
+ var n = typeof Symbol == "function" && t[Symbol.iterator];
33
+ if (!n) return t;
34
+ var o = n.call(t), a, u = [], f;
35
+ try {
36
+ for (; (r === void 0 || r-- > 0) && !(a = o.next()).done; ) u.push(a.value);
37
+ } catch (p) {
38
+ f = { error: p };
39
+ } finally {
40
+ try {
41
+ a && !a.done && (n = o.return) && n.call(o);
42
+ } finally {
43
+ if (f) throw f.error;
44
+ }
45
+ }
46
+ return u;
47
+ }
48
+ function nn(t, r, n) {
49
+ if (n || arguments.length === 2) for (var o = 0, a = r.length, u; o < a; o++)
50
+ (u || !(o in r)) && (u || (u = Array.prototype.slice.call(r, 0, o)), u[o] = r[o]);
51
+ return t.concat(u || Array.prototype.slice.call(r));
52
+ }
53
+ function ht(t) {
54
+ return typeof t == "function";
55
+ }
56
+ function Nn(t) {
57
+ var r = function(o) {
58
+ Error.call(o), o.stack = new Error().stack;
59
+ }, n = t(r);
60
+ return n.prototype = Object.create(Error.prototype), n.prototype.constructor = n, n;
61
+ }
62
+ var Xr = Nn(function(t) {
63
+ return function(n) {
64
+ t(this), this.message = n ? n.length + ` errors occurred during unsubscription:
65
+ ` + n.map(function(o, a) {
66
+ return a + 1 + ") " + o.toString();
67
+ }).join(`
68
+ `) : "", this.name = "UnsubscriptionError", this.errors = n;
69
+ };
70
+ });
71
+ function on(t, r) {
72
+ if (t) {
73
+ var n = t.indexOf(r);
74
+ 0 <= n && t.splice(n, 1);
75
+ }
76
+ }
77
+ var Ze = function() {
78
+ function t(r) {
79
+ this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
80
+ }
81
+ return t.prototype.unsubscribe = function() {
82
+ var r, n, o, a, u;
83
+ if (!this.closed) {
84
+ this.closed = !0;
85
+ var f = this._parentage;
86
+ if (f)
87
+ if (this._parentage = null, Array.isArray(f))
88
+ try {
89
+ for (var p = en(f), T = p.next(); !T.done; T = p.next()) {
90
+ var _ = T.value;
91
+ _.remove(this);
92
+ }
93
+ } catch (y) {
94
+ r = { error: y };
95
+ } finally {
96
+ try {
97
+ T && !T.done && (n = p.return) && n.call(p);
98
+ } finally {
99
+ if (r) throw r.error;
100
+ }
101
+ }
102
+ else
103
+ f.remove(this);
104
+ var d = this.initialTeardown;
105
+ if (ht(d))
106
+ try {
107
+ d();
108
+ } catch (y) {
109
+ u = y instanceof Xr ? y.errors : [y];
110
+ }
111
+ var E = this._finalizers;
112
+ if (E) {
113
+ this._finalizers = null;
114
+ try {
115
+ for (var l = en(E), g = l.next(); !g.done; g = l.next()) {
116
+ var m = g.value;
117
+ try {
118
+ In(m);
119
+ } catch (y) {
120
+ u = u ?? [], y instanceof Xr ? u = nn(nn([], rn(u)), rn(y.errors)) : u.push(y);
121
+ }
122
+ }
123
+ } catch (y) {
124
+ o = { error: y };
125
+ } finally {
126
+ try {
127
+ g && !g.done && (a = l.return) && a.call(l);
128
+ } finally {
129
+ if (o) throw o.error;
130
+ }
131
+ }
132
+ }
133
+ if (u)
134
+ throw new Xr(u);
135
+ }
136
+ }, t.prototype.add = function(r) {
137
+ var n;
138
+ if (r && r !== this)
139
+ if (this.closed)
140
+ In(r);
141
+ else {
142
+ if (r instanceof t) {
143
+ if (r.closed || r._hasParent(this))
144
+ return;
145
+ r._addParent(this);
146
+ }
147
+ (this._finalizers = (n = this._finalizers) !== null && n !== void 0 ? n : []).push(r);
148
+ }
149
+ }, t.prototype._hasParent = function(r) {
150
+ var n = this._parentage;
151
+ return n === r || Array.isArray(n) && n.includes(r);
152
+ }, t.prototype._addParent = function(r) {
153
+ var n = this._parentage;
154
+ this._parentage = Array.isArray(n) ? (n.push(r), n) : n ? [n, r] : r;
155
+ }, t.prototype._removeParent = function(r) {
156
+ var n = this._parentage;
157
+ n === r ? this._parentage = null : Array.isArray(n) && on(n, r);
158
+ }, t.prototype.remove = function(r) {
159
+ var n = this._finalizers;
160
+ n && on(n, r), r instanceof t && r._removeParent(this);
161
+ }, t.EMPTY = function() {
162
+ var r = new t();
163
+ return r.closed = !0, r;
164
+ }(), t;
165
+ }(), Un = Ze.EMPTY;
166
+ function Ln(t) {
167
+ return t instanceof Ze || t && "closed" in t && ht(t.remove) && ht(t.add) && ht(t.unsubscribe);
168
+ }
169
+ function In(t) {
170
+ ht(t) ? t() : t.unsubscribe();
171
+ }
172
+ var Gn = {
173
+ onUnhandledError: null,
174
+ onStoppedNotification: null,
175
+ Promise: void 0,
176
+ useDeprecatedSynchronousErrorHandling: !1,
177
+ useDeprecatedNextContext: !1
178
+ }, Bn = {
179
+ setTimeout: function(t, r) {
180
+ for (var n = [], o = 2; o < arguments.length; o++)
181
+ n[o - 2] = arguments[o];
182
+ return setTimeout.apply(void 0, nn([t, r], rn(n)));
183
+ },
184
+ clearTimeout: function(t) {
185
+ var r = Bn.delegate;
186
+ return ((r == null ? void 0 : r.clearTimeout) || clearTimeout)(t);
187
+ },
188
+ delegate: void 0
189
+ };
190
+ function yi(t) {
191
+ Bn.setTimeout(function() {
192
+ throw t;
193
+ });
194
+ }
195
+ function wn() {
196
+ }
197
+ function Ve(t) {
198
+ t();
199
+ }
200
+ var $n = function(t) {
201
+ de(r, t);
202
+ function r(n) {
203
+ var o = t.call(this) || this;
204
+ return o.isStopped = !1, n ? (o.destination = n, Ln(n) && n.add(o)) : o.destination = mi, o;
205
+ }
206
+ return r.create = function(n, o, a) {
207
+ return new sn(n, o, a);
208
+ }, r.prototype.next = function(n) {
209
+ this.isStopped || this._next(n);
210
+ }, r.prototype.error = function(n) {
211
+ this.isStopped || (this.isStopped = !0, this._error(n));
212
+ }, r.prototype.complete = function() {
213
+ this.isStopped || (this.isStopped = !0, this._complete());
214
+ }, r.prototype.unsubscribe = function() {
215
+ this.closed || (this.isStopped = !0, t.prototype.unsubscribe.call(this), this.destination = null);
216
+ }, r.prototype._next = function(n) {
217
+ this.destination.next(n);
218
+ }, r.prototype._error = function(n) {
219
+ try {
220
+ this.destination.error(n);
221
+ } finally {
222
+ this.unsubscribe();
223
+ }
224
+ }, r.prototype._complete = function() {
225
+ try {
226
+ this.destination.complete();
227
+ } finally {
228
+ this.unsubscribe();
229
+ }
230
+ }, r;
231
+ }(Ze), bi = Function.prototype.bind;
232
+ function qr(t, r) {
233
+ return bi.call(t, r);
234
+ }
235
+ var _i = function() {
236
+ function t(r) {
237
+ this.partialObserver = r;
238
+ }
239
+ return t.prototype.next = function(r) {
240
+ var n = this.partialObserver;
241
+ if (n.next)
242
+ try {
243
+ n.next(r);
244
+ } catch (o) {
245
+ Ke(o);
246
+ }
247
+ }, t.prototype.error = function(r) {
248
+ var n = this.partialObserver;
249
+ if (n.error)
250
+ try {
251
+ n.error(r);
252
+ } catch (o) {
253
+ Ke(o);
254
+ }
255
+ else
256
+ Ke(r);
257
+ }, t.prototype.complete = function() {
258
+ var r = this.partialObserver;
259
+ if (r.complete)
260
+ try {
261
+ r.complete();
262
+ } catch (n) {
263
+ Ke(n);
264
+ }
265
+ }, t;
266
+ }(), sn = function(t) {
267
+ de(r, t);
268
+ function r(n, o, a) {
269
+ var u = t.call(this) || this, f;
270
+ if (ht(n) || !n)
271
+ f = {
272
+ next: n ?? void 0,
273
+ error: o ?? void 0,
274
+ complete: a ?? void 0
275
+ };
276
+ else {
277
+ var p;
278
+ u && Gn.useDeprecatedNextContext ? (p = Object.create(n), p.unsubscribe = function() {
279
+ return u.unsubscribe();
280
+ }, f = {
281
+ next: n.next && qr(n.next, p),
282
+ error: n.error && qr(n.error, p),
283
+ complete: n.complete && qr(n.complete, p)
284
+ }) : f = n;
285
+ }
286
+ return u.destination = new _i(f), u;
287
+ }
288
+ return r;
289
+ }($n);
290
+ function Ke(t) {
291
+ yi(t);
292
+ }
293
+ function gi(t) {
294
+ throw t;
295
+ }
296
+ var mi = {
297
+ closed: !0,
298
+ next: wn,
299
+ error: gi,
300
+ complete: wn
301
+ }, vi = function() {
302
+ return typeof Symbol == "function" && Symbol.observable || "@@observable";
303
+ }();
304
+ function Si(t) {
305
+ return t;
306
+ }
307
+ function Ii(t) {
308
+ return t.length === 0 ? Si : t.length === 1 ? t[0] : function(n) {
309
+ return t.reduce(function(o, a) {
310
+ return a(o);
311
+ }, n);
312
+ };
313
+ }
314
+ var Tn = function() {
315
+ function t(r) {
316
+ r && (this._subscribe = r);
317
+ }
318
+ return t.prototype.lift = function(r) {
319
+ var n = new t();
320
+ return n.source = this, n.operator = r, n;
321
+ }, t.prototype.subscribe = function(r, n, o) {
322
+ var a = this, u = Ti(r) ? r : new sn(r, n, o);
323
+ return Ve(function() {
324
+ var f = a, p = f.operator, T = f.source;
325
+ u.add(p ? p.call(u, T) : T ? a._subscribe(u) : a._trySubscribe(u));
326
+ }), u;
327
+ }, t.prototype._trySubscribe = function(r) {
328
+ try {
329
+ return this._subscribe(r);
330
+ } catch (n) {
331
+ r.error(n);
332
+ }
333
+ }, t.prototype.forEach = function(r, n) {
334
+ var o = this;
335
+ return n = An(n), new n(function(a, u) {
336
+ var f = new sn({
337
+ next: function(p) {
338
+ try {
339
+ r(p);
340
+ } catch (T) {
341
+ u(T), f.unsubscribe();
342
+ }
343
+ },
344
+ error: u,
345
+ complete: a
346
+ });
347
+ o.subscribe(f);
348
+ });
349
+ }, t.prototype._subscribe = function(r) {
350
+ var n;
351
+ return (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r);
352
+ }, t.prototype[vi] = function() {
353
+ return this;
354
+ }, t.prototype.pipe = function() {
355
+ for (var r = [], n = 0; n < arguments.length; n++)
356
+ r[n] = arguments[n];
357
+ return Ii(r)(this);
358
+ }, t.prototype.toPromise = function(r) {
359
+ var n = this;
360
+ return r = An(r), new r(function(o, a) {
361
+ var u;
362
+ n.subscribe(function(f) {
363
+ return u = f;
364
+ }, function(f) {
365
+ return a(f);
366
+ }, function() {
367
+ return o(u);
368
+ });
369
+ });
370
+ }, t.create = function(r) {
371
+ return new t(r);
372
+ }, t;
373
+ }();
374
+ function An(t) {
375
+ var r;
376
+ return (r = t ?? Gn.Promise) !== null && r !== void 0 ? r : Promise;
377
+ }
378
+ function wi(t) {
379
+ return t && ht(t.next) && ht(t.error) && ht(t.complete);
380
+ }
381
+ function Ti(t) {
382
+ return t && t instanceof $n || wi(t) && Ln(t);
383
+ }
384
+ var Ai = Nn(function(t) {
385
+ return function() {
386
+ t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
387
+ };
388
+ }), Wn = function(t) {
389
+ de(r, t);
390
+ function r() {
391
+ var n = t.call(this) || this;
392
+ return n.closed = !1, n.currentObservers = null, n.observers = [], n.isStopped = !1, n.hasError = !1, n.thrownError = null, n;
393
+ }
394
+ return r.prototype.lift = function(n) {
395
+ var o = new En(this, this);
396
+ return o.operator = n, o;
397
+ }, r.prototype._throwIfClosed = function() {
398
+ if (this.closed)
399
+ throw new Ai();
400
+ }, r.prototype.next = function(n) {
401
+ var o = this;
402
+ Ve(function() {
403
+ var a, u;
404
+ if (o._throwIfClosed(), !o.isStopped) {
405
+ o.currentObservers || (o.currentObservers = Array.from(o.observers));
406
+ try {
407
+ for (var f = en(o.currentObservers), p = f.next(); !p.done; p = f.next()) {
408
+ var T = p.value;
409
+ T.next(n);
410
+ }
411
+ } catch (_) {
412
+ a = { error: _ };
413
+ } finally {
414
+ try {
415
+ p && !p.done && (u = f.return) && u.call(f);
416
+ } finally {
417
+ if (a) throw a.error;
418
+ }
419
+ }
420
+ }
421
+ });
422
+ }, r.prototype.error = function(n) {
423
+ var o = this;
424
+ Ve(function() {
425
+ if (o._throwIfClosed(), !o.isStopped) {
426
+ o.hasError = o.isStopped = !0, o.thrownError = n;
427
+ for (var a = o.observers; a.length; )
428
+ a.shift().error(n);
429
+ }
430
+ });
431
+ }, r.prototype.complete = function() {
432
+ var n = this;
433
+ Ve(function() {
434
+ if (n._throwIfClosed(), !n.isStopped) {
435
+ n.isStopped = !0;
436
+ for (var o = n.observers; o.length; )
437
+ o.shift().complete();
438
+ }
439
+ });
440
+ }, r.prototype.unsubscribe = function() {
441
+ this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
442
+ }, Object.defineProperty(r.prototype, "observed", {
443
+ get: function() {
444
+ var n;
445
+ return ((n = this.observers) === null || n === void 0 ? void 0 : n.length) > 0;
446
+ },
447
+ enumerable: !1,
448
+ configurable: !0
449
+ }), r.prototype._trySubscribe = function(n) {
450
+ return this._throwIfClosed(), t.prototype._trySubscribe.call(this, n);
451
+ }, r.prototype._subscribe = function(n) {
452
+ return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
453
+ }, r.prototype._innerSubscribe = function(n) {
454
+ var o = this, a = this, u = a.hasError, f = a.isStopped, p = a.observers;
455
+ return u || f ? Un : (this.currentObservers = null, p.push(n), new Ze(function() {
456
+ o.currentObservers = null, on(p, n);
457
+ }));
458
+ }, r.prototype._checkFinalizedStatuses = function(n) {
459
+ var o = this, a = o.hasError, u = o.thrownError, f = o.isStopped;
460
+ a ? n.error(u) : f && n.complete();
461
+ }, r.prototype.asObservable = function() {
462
+ var n = new Tn();
463
+ return n.source = this, n;
464
+ }, r.create = function(n, o) {
465
+ return new En(n, o);
466
+ }, r;
467
+ }(Tn), En = function(t) {
468
+ de(r, t);
469
+ function r(n, o) {
470
+ var a = t.call(this) || this;
471
+ return a.destination = n, a.source = o, a;
472
+ }
473
+ return r.prototype.next = function(n) {
474
+ var o, a;
475
+ (a = (o = this.destination) === null || o === void 0 ? void 0 : o.next) === null || a === void 0 || a.call(o, n);
476
+ }, r.prototype.error = function(n) {
477
+ var o, a;
478
+ (a = (o = this.destination) === null || o === void 0 ? void 0 : o.error) === null || a === void 0 || a.call(o, n);
479
+ }, r.prototype.complete = function() {
480
+ var n, o;
481
+ (o = (n = this.destination) === null || n === void 0 ? void 0 : n.complete) === null || o === void 0 || o.call(n);
482
+ }, r.prototype._subscribe = function(n) {
483
+ var o, a;
484
+ return (a = (o = this.source) === null || o === void 0 ? void 0 : o.subscribe(n)) !== null && a !== void 0 ? a : Un;
485
+ }, r;
486
+ }(Wn), On = function(t) {
487
+ de(r, t);
488
+ function r(n) {
489
+ var o = t.call(this) || this;
490
+ return o._value = n, o;
491
+ }
492
+ return Object.defineProperty(r.prototype, "value", {
493
+ get: function() {
494
+ return this.getValue();
495
+ },
496
+ enumerable: !1,
497
+ configurable: !0
498
+ }), r.prototype._subscribe = function(n) {
499
+ var o = t.prototype._subscribe.call(this, n);
500
+ return !o.closed && n.next(this._value), o;
501
+ }, r.prototype.getValue = function() {
502
+ var n = this, o = n.hasError, a = n.thrownError, u = n._value;
503
+ if (o)
504
+ throw a;
505
+ return this._throwIfClosed(), u;
506
+ }, r.prototype.next = function(n) {
507
+ t.prototype.next.call(this, this._value = n);
508
+ }, r;
509
+ }(Wn), Z = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
510
+ function dn(t) {
511
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
512
+ }
513
+ var Ye = { exports: {} };
514
+ Ye.exports;
515
+ (function(t, r) {
516
+ var n = 200, o = "__lodash_hash_undefined__", a = 1, u = 2, f = 9007199254740991, p = "[object Arguments]", T = "[object Array]", _ = "[object AsyncFunction]", d = "[object Boolean]", E = "[object Date]", l = "[object Error]", g = "[object Function]", m = "[object GeneratorFunction]", y = "[object Map]", I = "[object Number]", v = "[object Null]", h = "[object Object]", S = "[object Promise]", A = "[object Proxy]", L = "[object RegExp]", F = "[object Set]", j = "[object String]", nt = "[object Symbol]", yt = "[object Undefined]", P = "[object WeakMap]", k = "[object ArrayBuffer]", W = "[object DataView]", be = "[object Float32Array]", _e = "[object Float64Array]", ge = "[object Int8Array]", er = "[object Int16Array]", rr = "[object Int32Array]", nr = "[object Uint8Array]", ir = "[object Uint8ClampedArray]", C = "[object Uint16Array]", or = "[object Uint32Array]", sr = /[\\^$.*+?()[\]{}|]/g, Q = /^\[object .+?Constructor\]$/, me = /^(?:0|[1-9]\d*)$/, D = {};
517
+ D[be] = D[_e] = D[ge] = D[er] = D[rr] = D[nr] = D[ir] = D[C] = D[or] = !0, D[p] = D[T] = D[k] = D[d] = D[W] = D[E] = D[l] = D[g] = D[y] = D[I] = D[h] = D[L] = D[F] = D[j] = D[P] = !1;
518
+ var ve = typeof Z == "object" && Z && Z.Object === Object && Z, ar = typeof self == "object" && self && self.Object === Object && self, tt = ve || ar || Function("return this")(), Se = r && !r.nodeType && r, Ie = Se && !0 && t && !t.nodeType && t, Bt = Ie && Ie.exports === Se, $t = Bt && ve.process, we = function() {
519
+ try {
520
+ return $t && $t.binding && $t.binding("util");
521
+ } catch {
522
+ }
523
+ }(), Wt = we && we.isTypedArray;
524
+ function Te(e, i) {
525
+ for (var s = -1, c = e == null ? 0 : e.length, w = 0, b = []; ++s < c; ) {
526
+ var x = e[s];
527
+ i(x, s, e) && (b[w++] = x);
528
+ }
529
+ return b;
530
+ }
531
+ function Kt(e, i) {
532
+ for (var s = -1, c = i.length, w = e.length; ++s < c; )
533
+ e[w + s] = i[s];
534
+ return e;
535
+ }
536
+ function Ae(e, i) {
537
+ for (var s = -1, c = e == null ? 0 : e.length; ++s < c; )
538
+ if (i(e[s], s, e))
539
+ return !0;
540
+ return !1;
541
+ }
542
+ function cr(e, i) {
543
+ for (var s = -1, c = Array(e); ++s < e; )
544
+ c[s] = i(s);
545
+ return c;
546
+ }
547
+ function ur(e) {
548
+ return function(i) {
549
+ return e(i);
550
+ };
551
+ }
552
+ function Dt(e, i) {
553
+ return e.has(i);
554
+ }
555
+ function Vt(e, i) {
556
+ return e == null ? void 0 : e[i];
557
+ }
558
+ function Ee(e) {
559
+ var i = -1, s = Array(e.size);
560
+ return e.forEach(function(c, w) {
561
+ s[++i] = [w, c];
562
+ }), s;
563
+ }
564
+ function Oe(e, i) {
565
+ return function(s) {
566
+ return e(i(s));
567
+ };
568
+ }
569
+ function it(e) {
570
+ var i = -1, s = Array(e.size);
571
+ return e.forEach(function(c) {
572
+ s[++i] = c;
573
+ }), s;
574
+ }
575
+ var kt = Array.prototype, fr = Function.prototype, mt = Object.prototype, jt = tt["__core-js_shared__"], Yt = fr.toString, J = mt.hasOwnProperty, xe = function() {
576
+ var e = /[^.]+$/.exec(jt && jt.keys && jt.keys.IE_PROTO || "");
577
+ return e ? "Symbol(src)_1." + e : "";
578
+ }(), Pe = mt.toString, lr = RegExp(
579
+ "^" + Yt.call(J).replace(sr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
580
+ ), Xt = Bt ? tt.Buffer : void 0, Ft = tt.Symbol, Me = tt.Uint8Array, Rt = mt.propertyIsEnumerable, vt = kt.splice, et = Ft ? Ft.toStringTag : void 0, zt = Object.getOwnPropertySymbols, qt = Xt ? Xt.isBuffer : void 0, St = Oe(Object.keys, Object), Jt = ft(tt, "DataView"), It = ft(tt, "Map"), Zt = ft(tt, "Promise"), Qt = ft(tt, "Set"), te = ft(tt, "WeakMap"), bt = ft(Object, "create"), Ce = K(Jt), ut = K(It), pr = K(Zt), dr = K(Qt), hr = K(te), De = Ft ? Ft.prototype : void 0, ee = De ? De.valueOf : void 0;
581
+ function N(e) {
582
+ var i = -1, s = e == null ? 0 : e.length;
583
+ for (this.clear(); ++i < s; ) {
584
+ var c = e[i];
585
+ this.set(c[0], c[1]);
586
+ }
587
+ }
588
+ function yr() {
589
+ this.__data__ = bt ? bt(null) : {}, this.size = 0;
590
+ }
591
+ function br(e) {
592
+ var i = this.has(e) && delete this.__data__[e];
593
+ return this.size -= i ? 1 : 0, i;
594
+ }
595
+ function _r(e) {
596
+ var i = this.__data__;
597
+ if (bt) {
598
+ var s = i[e];
599
+ return s === o ? void 0 : s;
600
+ }
601
+ return J.call(i, e) ? i[e] : void 0;
602
+ }
603
+ function gr(e) {
604
+ var i = this.__data__;
605
+ return bt ? i[e] !== void 0 : J.call(i, e);
606
+ }
607
+ function mr(e, i) {
608
+ var s = this.__data__;
609
+ return this.size += this.has(e) ? 0 : 1, s[e] = bt && i === void 0 ? o : i, this;
610
+ }
611
+ N.prototype.clear = yr, N.prototype.delete = br, N.prototype.get = _r, N.prototype.has = gr, N.prototype.set = mr;
612
+ function G(e) {
613
+ var i = -1, s = e == null ? 0 : e.length;
614
+ for (this.clear(); ++i < s; ) {
615
+ var c = e[i];
616
+ this.set(c[0], c[1]);
617
+ }
618
+ }
619
+ function vr() {
620
+ this.__data__ = [], this.size = 0;
621
+ }
622
+ function Sr(e) {
623
+ var i = this.__data__, s = Ut(i, e);
624
+ if (s < 0)
625
+ return !1;
626
+ var c = i.length - 1;
627
+ return s == c ? i.pop() : vt.call(i, s, 1), --this.size, !0;
628
+ }
629
+ function Ir(e) {
630
+ var i = this.__data__, s = Ut(i, e);
631
+ return s < 0 ? void 0 : i[s][1];
632
+ }
633
+ function wr(e) {
634
+ return Ut(this.__data__, e) > -1;
635
+ }
636
+ function Tr(e, i) {
637
+ var s = this.__data__, c = Ut(s, e);
638
+ return c < 0 ? (++this.size, s.push([e, i])) : s[c][1] = i, this;
639
+ }
640
+ G.prototype.clear = vr, G.prototype.delete = Sr, G.prototype.get = Ir, G.prototype.has = wr, G.prototype.set = Tr;
641
+ function V(e) {
642
+ var i = -1, s = e == null ? 0 : e.length;
643
+ for (this.clear(); ++i < s; ) {
644
+ var c = e[i];
645
+ this.set(c[0], c[1]);
646
+ }
647
+ }
648
+ function Ar() {
649
+ this.size = 0, this.__data__ = {
650
+ hash: new N(),
651
+ map: new (It || G)(),
652
+ string: new N()
653
+ };
654
+ }
655
+ function Er(e) {
656
+ var i = rt(this, e).delete(e);
657
+ return this.size -= i ? 1 : 0, i;
658
+ }
659
+ function Or(e) {
660
+ return rt(this, e).get(e);
661
+ }
662
+ function xr(e) {
663
+ return rt(this, e).has(e);
664
+ }
665
+ function Pr(e, i) {
666
+ var s = rt(this, e), c = s.size;
667
+ return s.set(e, i), this.size += s.size == c ? 0 : 1, this;
668
+ }
669
+ V.prototype.clear = Ar, V.prototype.delete = Er, V.prototype.get = Or, V.prototype.has = xr, V.prototype.set = Pr;
670
+ function Ht(e) {
671
+ var i = -1, s = e == null ? 0 : e.length;
672
+ for (this.__data__ = new V(); ++i < s; )
673
+ this.add(e[i]);
674
+ }
675
+ function ke(e) {
676
+ return this.__data__.set(e, o), this;
677
+ }
678
+ function Nt(e) {
679
+ return this.__data__.has(e);
680
+ }
681
+ Ht.prototype.add = Ht.prototype.push = ke, Ht.prototype.has = Nt;
682
+ function ot(e) {
683
+ var i = this.__data__ = new G(e);
684
+ this.size = i.size;
685
+ }
686
+ function re() {
687
+ this.__data__ = new G(), this.size = 0;
688
+ }
689
+ function Mr(e) {
690
+ var i = this.__data__, s = i.delete(e);
691
+ return this.size = i.size, s;
692
+ }
693
+ function Cr(e) {
694
+ return this.__data__.get(e);
695
+ }
696
+ function Dr(e) {
697
+ return this.__data__.has(e);
698
+ }
699
+ function kr(e, i) {
700
+ var s = this.__data__;
701
+ if (s instanceof G) {
702
+ var c = s.__data__;
703
+ if (!It || c.length < n - 1)
704
+ return c.push([e, i]), this.size = ++s.size, this;
705
+ s = this.__data__ = new V(c);
706
+ }
707
+ return s.set(e, i), this.size = s.size, this;
708
+ }
709
+ ot.prototype.clear = re, ot.prototype.delete = Mr, ot.prototype.get = Cr, ot.prototype.has = Dr, ot.prototype.set = kr;
710
+ function jr(e, i) {
711
+ var s = Lt(e), c = !s && He(e), w = !s && !c && Gt(e), b = !s && !c && !w && Le(e), x = s || c || w || b, O = x ? cr(e.length, String) : [], R = O.length;
712
+ for (var M in e)
713
+ J.call(e, M) && !(x && // Safari 9 has enumerable `arguments.length` in strict mode.
714
+ (M == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
715
+ w && (M == "offset" || M == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
716
+ b && (M == "buffer" || M == "byteLength" || M == "byteOffset") || // Skip index properties.
717
+ Gr(M, R))) && O.push(M);
718
+ return O;
719
+ }
720
+ function Ut(e, i) {
721
+ for (var s = e.length; s--; )
722
+ if (ze(e[s][0], i))
723
+ return s;
724
+ return -1;
725
+ }
726
+ function ne(e, i, s) {
727
+ var c = i(e);
728
+ return Lt(e) ? c : Kt(c, s(e));
729
+ }
730
+ function wt(e) {
731
+ return e == null ? e === void 0 ? yt : v : et && et in Object(e) ? lt(e) : Re(e);
732
+ }
733
+ function je(e) {
734
+ return at(e) && wt(e) == p;
735
+ }
736
+ function Fe(e, i, s, c, w) {
737
+ return e === i ? !0 : e == null || i == null || !at(e) && !at(i) ? e !== e && i !== i : Fr(e, i, s, c, Fe, w);
738
+ }
739
+ function Fr(e, i, s, c, w, b) {
740
+ var x = Lt(e), O = Lt(i), R = x ? T : st(e), M = O ? T : st(i);
741
+ R = R == p ? h : R, M = M == p ? h : M;
742
+ var B = R == h, Y = M == h, z = R == M;
743
+ if (z && Gt(e)) {
744
+ if (!Gt(i))
745
+ return !1;
746
+ x = !0, B = !1;
747
+ }
748
+ if (z && !B)
749
+ return b || (b = new ot()), x || Le(e) ? ie(e, i, s, c, w, b) : Nr(e, i, R, s, c, w, b);
750
+ if (!(s & a)) {
751
+ var $ = B && J.call(e, "__wrapped__"), U = Y && J.call(i, "__wrapped__");
752
+ if ($ || U) {
753
+ var _t = $ ? e.value() : e, pt = U ? i.value() : i;
754
+ return b || (b = new ot()), w(_t, pt, s, c, b);
755
+ }
756
+ }
757
+ return z ? (b || (b = new ot()), Ur(e, i, s, c, w, b)) : !1;
758
+ }
759
+ function Rr(e) {
760
+ if (!Ue(e) || $r(e))
761
+ return !1;
762
+ var i = Ne(e) ? lr : Q;
763
+ return i.test(K(e));
764
+ }
765
+ function zr(e) {
766
+ return at(e) && se(e.length) && !!D[wt(e)];
767
+ }
768
+ function Hr(e) {
769
+ if (!Wr(e))
770
+ return St(e);
771
+ var i = [];
772
+ for (var s in Object(e))
773
+ J.call(e, s) && s != "constructor" && i.push(s);
774
+ return i;
775
+ }
776
+ function ie(e, i, s, c, w, b) {
777
+ var x = s & a, O = e.length, R = i.length;
778
+ if (O != R && !(x && R > O))
779
+ return !1;
780
+ var M = b.get(e);
781
+ if (M && b.get(i))
782
+ return M == i;
783
+ var B = -1, Y = !0, z = s & u ? new Ht() : void 0;
784
+ for (b.set(e, i), b.set(i, e); ++B < O; ) {
785
+ var $ = e[B], U = i[B];
786
+ if (c)
787
+ var _t = x ? c(U, $, B, i, e, b) : c($, U, B, e, i, b);
788
+ if (_t !== void 0) {
789
+ if (_t)
790
+ continue;
791
+ Y = !1;
792
+ break;
793
+ }
794
+ if (z) {
795
+ if (!Ae(i, function(pt, At) {
796
+ if (!Dt(z, At) && ($ === pt || w($, pt, s, c, b)))
797
+ return z.push(At);
798
+ })) {
799
+ Y = !1;
800
+ break;
801
+ }
802
+ } else if (!($ === U || w($, U, s, c, b))) {
803
+ Y = !1;
804
+ break;
805
+ }
806
+ }
807
+ return b.delete(e), b.delete(i), Y;
808
+ }
809
+ function Nr(e, i, s, c, w, b, x) {
810
+ switch (s) {
811
+ case W:
812
+ if (e.byteLength != i.byteLength || e.byteOffset != i.byteOffset)
813
+ return !1;
814
+ e = e.buffer, i = i.buffer;
815
+ case k:
816
+ return !(e.byteLength != i.byteLength || !b(new Me(e), new Me(i)));
817
+ case d:
818
+ case E:
819
+ case I:
820
+ return ze(+e, +i);
821
+ case l:
822
+ return e.name == i.name && e.message == i.message;
823
+ case L:
824
+ case j:
825
+ return e == i + "";
826
+ case y:
827
+ var O = Ee;
828
+ case F:
829
+ var R = c & a;
830
+ if (O || (O = it), e.size != i.size && !R)
831
+ return !1;
832
+ var M = x.get(e);
833
+ if (M)
834
+ return M == i;
835
+ c |= u, x.set(e, i);
836
+ var B = ie(O(e), O(i), c, w, b, x);
837
+ return x.delete(e), B;
838
+ case nt:
839
+ if (ee)
840
+ return ee.call(e) == ee.call(i);
841
+ }
842
+ return !1;
843
+ }
844
+ function Ur(e, i, s, c, w, b) {
845
+ var x = s & a, O = Tt(e), R = O.length, M = Tt(i), B = M.length;
846
+ if (R != B && !x)
847
+ return !1;
848
+ for (var Y = R; Y--; ) {
849
+ var z = O[Y];
850
+ if (!(x ? z in i : J.call(i, z)))
851
+ return !1;
852
+ }
853
+ var $ = b.get(e);
854
+ if ($ && b.get(i))
855
+ return $ == i;
856
+ var U = !0;
857
+ b.set(e, i), b.set(i, e);
858
+ for (var _t = x; ++Y < R; ) {
859
+ z = O[Y];
860
+ var pt = e[z], At = i[z];
861
+ if (c)
862
+ var Sn = x ? c(At, pt, z, i, e, b) : c(pt, At, z, e, i, b);
863
+ if (!(Sn === void 0 ? pt === At || w(pt, At, s, c, b) : Sn)) {
864
+ U = !1;
865
+ break;
866
+ }
867
+ _t || (_t = z == "constructor");
868
+ }
869
+ if (U && !_t) {
870
+ var Ge = e.constructor, Be = i.constructor;
871
+ Ge != Be && "constructor" in e && "constructor" in i && !(typeof Ge == "function" && Ge instanceof Ge && typeof Be == "function" && Be instanceof Be) && (U = !1);
872
+ }
873
+ return b.delete(e), b.delete(i), U;
874
+ }
875
+ function Tt(e) {
876
+ return ne(e, ae, Lr);
877
+ }
878
+ function rt(e, i) {
879
+ var s = e.__data__;
880
+ return Br(i) ? s[typeof i == "string" ? "string" : "hash"] : s.map;
881
+ }
882
+ function ft(e, i) {
883
+ var s = Vt(e, i);
884
+ return Rr(s) ? s : void 0;
885
+ }
886
+ function lt(e) {
887
+ var i = J.call(e, et), s = e[et];
888
+ try {
889
+ e[et] = void 0;
890
+ var c = !0;
891
+ } catch {
892
+ }
893
+ var w = Pe.call(e);
894
+ return c && (i ? e[et] = s : delete e[et]), w;
895
+ }
896
+ var Lr = zt ? function(e) {
897
+ return e == null ? [] : (e = Object(e), Te(zt(e), function(i) {
898
+ return Rt.call(e, i);
899
+ }));
900
+ } : Vr, st = wt;
901
+ (Jt && st(new Jt(new ArrayBuffer(1))) != W || It && st(new It()) != y || Zt && st(Zt.resolve()) != S || Qt && st(new Qt()) != F || te && st(new te()) != P) && (st = function(e) {
902
+ var i = wt(e), s = i == h ? e.constructor : void 0, c = s ? K(s) : "";
903
+ if (c)
904
+ switch (c) {
905
+ case Ce:
906
+ return W;
907
+ case ut:
908
+ return y;
909
+ case pr:
910
+ return S;
911
+ case dr:
912
+ return F;
913
+ case hr:
914
+ return P;
915
+ }
916
+ return i;
917
+ });
918
+ function Gr(e, i) {
919
+ return i = i ?? f, !!i && (typeof e == "number" || me.test(e)) && e > -1 && e % 1 == 0 && e < i;
920
+ }
921
+ function Br(e) {
922
+ var i = typeof e;
923
+ return i == "string" || i == "number" || i == "symbol" || i == "boolean" ? e !== "__proto__" : e === null;
924
+ }
925
+ function $r(e) {
926
+ return !!xe && xe in e;
927
+ }
928
+ function Wr(e) {
929
+ var i = e && e.constructor, s = typeof i == "function" && i.prototype || mt;
930
+ return e === s;
931
+ }
932
+ function Re(e) {
933
+ return Pe.call(e);
934
+ }
935
+ function K(e) {
936
+ if (e != null) {
937
+ try {
938
+ return Yt.call(e);
939
+ } catch {
940
+ }
941
+ try {
942
+ return e + "";
943
+ } catch {
944
+ }
945
+ }
946
+ return "";
947
+ }
948
+ function ze(e, i) {
949
+ return e === i || e !== e && i !== i;
950
+ }
951
+ var He = je(/* @__PURE__ */ function() {
952
+ return arguments;
953
+ }()) ? je : function(e) {
954
+ return at(e) && J.call(e, "callee") && !Rt.call(e, "callee");
955
+ }, Lt = Array.isArray;
956
+ function oe(e) {
957
+ return e != null && se(e.length) && !Ne(e);
958
+ }
959
+ var Gt = qt || Yr;
960
+ function Kr(e, i) {
961
+ return Fe(e, i);
962
+ }
963
+ function Ne(e) {
964
+ if (!Ue(e))
965
+ return !1;
966
+ var i = wt(e);
967
+ return i == g || i == m || i == _ || i == A;
968
+ }
969
+ function se(e) {
970
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= f;
971
+ }
972
+ function Ue(e) {
973
+ var i = typeof e;
974
+ return e != null && (i == "object" || i == "function");
975
+ }
976
+ function at(e) {
977
+ return e != null && typeof e == "object";
978
+ }
979
+ var Le = Wt ? ur(Wt) : zr;
980
+ function ae(e) {
981
+ return oe(e) ? jr(e) : Hr(e);
982
+ }
983
+ function Vr() {
984
+ return [];
985
+ }
986
+ function Yr() {
987
+ return !1;
988
+ }
989
+ t.exports = Kr;
990
+ })(Ye, Ye.exports);
991
+ var Ei = Ye.exports;
992
+ const ct = /* @__PURE__ */ dn(Ei);
993
+ var Xe = { exports: {} };
994
+ Xe.exports;
995
+ (function(t, r) {
996
+ var n = 200, o = "__lodash_hash_undefined__", a = 9007199254740991, u = "[object Arguments]", f = "[object Array]", p = "[object Boolean]", T = "[object Date]", _ = "[object Error]", d = "[object Function]", E = "[object GeneratorFunction]", l = "[object Map]", g = "[object Number]", m = "[object Object]", y = "[object Promise]", I = "[object RegExp]", v = "[object Set]", h = "[object String]", S = "[object Symbol]", A = "[object WeakMap]", L = "[object ArrayBuffer]", F = "[object DataView]", j = "[object Float32Array]", nt = "[object Float64Array]", yt = "[object Int8Array]", P = "[object Int16Array]", k = "[object Int32Array]", W = "[object Uint8Array]", be = "[object Uint8ClampedArray]", _e = "[object Uint16Array]", ge = "[object Uint32Array]", er = /[\\^$.*+?()[\]{}|]/g, rr = /\w*$/, nr = /^\[object .+?Constructor\]$/, ir = /^(?:0|[1-9]\d*)$/, C = {};
997
+ C[u] = C[f] = C[L] = C[F] = C[p] = C[T] = C[j] = C[nt] = C[yt] = C[P] = C[k] = C[l] = C[g] = C[m] = C[I] = C[v] = C[h] = C[S] = C[W] = C[be] = C[_e] = C[ge] = !0, C[_] = C[d] = C[A] = !1;
998
+ var or = typeof Z == "object" && Z && Z.Object === Object && Z, sr = typeof self == "object" && self && self.Object === Object && self, Q = or || sr || Function("return this")(), me = r && !r.nodeType && r, D = me && !0 && t && !t.nodeType && t, ve = D && D.exports === me;
999
+ function ar(e, i) {
1000
+ return e.set(i[0], i[1]), e;
1001
+ }
1002
+ function tt(e, i) {
1003
+ return e.add(i), e;
1004
+ }
1005
+ function Se(e, i) {
1006
+ for (var s = -1, c = e ? e.length : 0; ++s < c && i(e[s], s, e) !== !1; )
1007
+ ;
1008
+ return e;
1009
+ }
1010
+ function Ie(e, i) {
1011
+ for (var s = -1, c = i.length, w = e.length; ++s < c; )
1012
+ e[w + s] = i[s];
1013
+ return e;
1014
+ }
1015
+ function Bt(e, i, s, c) {
1016
+ for (var w = -1, b = e ? e.length : 0; ++w < b; )
1017
+ s = i(s, e[w], w, e);
1018
+ return s;
1019
+ }
1020
+ function $t(e, i) {
1021
+ for (var s = -1, c = Array(e); ++s < e; )
1022
+ c[s] = i(s);
1023
+ return c;
1024
+ }
1025
+ function we(e, i) {
1026
+ return e == null ? void 0 : e[i];
1027
+ }
1028
+ function Wt(e) {
1029
+ var i = !1;
1030
+ if (e != null && typeof e.toString != "function")
1031
+ try {
1032
+ i = !!(e + "");
1033
+ } catch {
1034
+ }
1035
+ return i;
1036
+ }
1037
+ function Te(e) {
1038
+ var i = -1, s = Array(e.size);
1039
+ return e.forEach(function(c, w) {
1040
+ s[++i] = [w, c];
1041
+ }), s;
1042
+ }
1043
+ function Kt(e, i) {
1044
+ return function(s) {
1045
+ return e(i(s));
1046
+ };
1047
+ }
1048
+ function Ae(e) {
1049
+ var i = -1, s = Array(e.size);
1050
+ return e.forEach(function(c) {
1051
+ s[++i] = c;
1052
+ }), s;
1053
+ }
1054
+ var cr = Array.prototype, ur = Function.prototype, Dt = Object.prototype, Vt = Q["__core-js_shared__"], Ee = function() {
1055
+ var e = /[^.]+$/.exec(Vt && Vt.keys && Vt.keys.IE_PROTO || "");
1056
+ return e ? "Symbol(src)_1." + e : "";
1057
+ }(), Oe = ur.toString, it = Dt.hasOwnProperty, kt = Dt.toString, fr = RegExp(
1058
+ "^" + Oe.call(it).replace(er, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1059
+ ), mt = ve ? Q.Buffer : void 0, jt = Q.Symbol, Yt = Q.Uint8Array, J = Kt(Object.getPrototypeOf, Object), xe = Object.create, Pe = Dt.propertyIsEnumerable, lr = cr.splice, Xt = Object.getOwnPropertySymbols, Ft = mt ? mt.isBuffer : void 0, Me = Kt(Object.keys, Object), Rt = rt(Q, "DataView"), vt = rt(Q, "Map"), et = rt(Q, "Promise"), zt = rt(Q, "Set"), qt = rt(Q, "WeakMap"), St = rt(Object, "create"), Jt = K(Rt), It = K(vt), Zt = K(et), Qt = K(zt), te = K(qt), bt = jt ? jt.prototype : void 0, Ce = bt ? bt.valueOf : void 0;
1060
+ function ut(e) {
1061
+ var i = -1, s = e ? e.length : 0;
1062
+ for (this.clear(); ++i < s; ) {
1063
+ var c = e[i];
1064
+ this.set(c[0], c[1]);
1065
+ }
1066
+ }
1067
+ function pr() {
1068
+ this.__data__ = St ? St(null) : {};
1069
+ }
1070
+ function dr(e) {
1071
+ return this.has(e) && delete this.__data__[e];
1072
+ }
1073
+ function hr(e) {
1074
+ var i = this.__data__;
1075
+ if (St) {
1076
+ var s = i[e];
1077
+ return s === o ? void 0 : s;
1078
+ }
1079
+ return it.call(i, e) ? i[e] : void 0;
1080
+ }
1081
+ function De(e) {
1082
+ var i = this.__data__;
1083
+ return St ? i[e] !== void 0 : it.call(i, e);
1084
+ }
1085
+ function ee(e, i) {
1086
+ var s = this.__data__;
1087
+ return s[e] = St && i === void 0 ? o : i, this;
1088
+ }
1089
+ ut.prototype.clear = pr, ut.prototype.delete = dr, ut.prototype.get = hr, ut.prototype.has = De, ut.prototype.set = ee;
1090
+ function N(e) {
1091
+ var i = -1, s = e ? e.length : 0;
1092
+ for (this.clear(); ++i < s; ) {
1093
+ var c = e[i];
1094
+ this.set(c[0], c[1]);
1095
+ }
1096
+ }
1097
+ function yr() {
1098
+ this.__data__ = [];
1099
+ }
1100
+ function br(e) {
1101
+ var i = this.__data__, s = Nt(i, e);
1102
+ if (s < 0)
1103
+ return !1;
1104
+ var c = i.length - 1;
1105
+ return s == c ? i.pop() : lr.call(i, s, 1), !0;
1106
+ }
1107
+ function _r(e) {
1108
+ var i = this.__data__, s = Nt(i, e);
1109
+ return s < 0 ? void 0 : i[s][1];
1110
+ }
1111
+ function gr(e) {
1112
+ return Nt(this.__data__, e) > -1;
1113
+ }
1114
+ function mr(e, i) {
1115
+ var s = this.__data__, c = Nt(s, e);
1116
+ return c < 0 ? s.push([e, i]) : s[c][1] = i, this;
1117
+ }
1118
+ N.prototype.clear = yr, N.prototype.delete = br, N.prototype.get = _r, N.prototype.has = gr, N.prototype.set = mr;
1119
+ function G(e) {
1120
+ var i = -1, s = e ? e.length : 0;
1121
+ for (this.clear(); ++i < s; ) {
1122
+ var c = e[i];
1123
+ this.set(c[0], c[1]);
1124
+ }
1125
+ }
1126
+ function vr() {
1127
+ this.__data__ = {
1128
+ hash: new ut(),
1129
+ map: new (vt || N)(),
1130
+ string: new ut()
1131
+ };
1132
+ }
1133
+ function Sr(e) {
1134
+ return Tt(this, e).delete(e);
1135
+ }
1136
+ function Ir(e) {
1137
+ return Tt(this, e).get(e);
1138
+ }
1139
+ function wr(e) {
1140
+ return Tt(this, e).has(e);
1141
+ }
1142
+ function Tr(e, i) {
1143
+ return Tt(this, e).set(e, i), this;
1144
+ }
1145
+ G.prototype.clear = vr, G.prototype.delete = Sr, G.prototype.get = Ir, G.prototype.has = wr, G.prototype.set = Tr;
1146
+ function V(e) {
1147
+ this.__data__ = new N(e);
1148
+ }
1149
+ function Ar() {
1150
+ this.__data__ = new N();
1151
+ }
1152
+ function Er(e) {
1153
+ return this.__data__.delete(e);
1154
+ }
1155
+ function Or(e) {
1156
+ return this.__data__.get(e);
1157
+ }
1158
+ function xr(e) {
1159
+ return this.__data__.has(e);
1160
+ }
1161
+ function Pr(e, i) {
1162
+ var s = this.__data__;
1163
+ if (s instanceof N) {
1164
+ var c = s.__data__;
1165
+ if (!vt || c.length < n - 1)
1166
+ return c.push([e, i]), this;
1167
+ s = this.__data__ = new G(c);
1168
+ }
1169
+ return s.set(e, i), this;
1170
+ }
1171
+ V.prototype.clear = Ar, V.prototype.delete = Er, V.prototype.get = Or, V.prototype.has = xr, V.prototype.set = Pr;
1172
+ function Ht(e, i) {
1173
+ var s = oe(e) || Lt(e) ? $t(e.length, String) : [], c = s.length, w = !!c;
1174
+ for (var b in e)
1175
+ it.call(e, b) && !(w && (b == "length" || Br(b, c))) && s.push(b);
1176
+ return s;
1177
+ }
1178
+ function ke(e, i, s) {
1179
+ var c = e[i];
1180
+ (!(it.call(e, i) && He(c, s)) || s === void 0 && !(i in e)) && (e[i] = s);
1181
+ }
1182
+ function Nt(e, i) {
1183
+ for (var s = e.length; s--; )
1184
+ if (He(e[s][0], i))
1185
+ return s;
1186
+ return -1;
1187
+ }
1188
+ function ot(e, i) {
1189
+ return e && ie(i, ae(i), e);
1190
+ }
1191
+ function re(e, i, s, c, w, b, x) {
1192
+ var O;
1193
+ if (c && (O = b ? c(e, w, b, x) : c(e)), O !== void 0)
1194
+ return O;
1195
+ if (!at(e))
1196
+ return e;
1197
+ var R = oe(e);
1198
+ if (R) {
1199
+ if (O = Lr(e), !i)
1200
+ return Hr(e, O);
1201
+ } else {
1202
+ var M = lt(e), B = M == d || M == E;
1203
+ if (Ne(e))
1204
+ return Ut(e, i);
1205
+ if (M == m || M == u || B && !b) {
1206
+ if (Wt(e))
1207
+ return b ? e : {};
1208
+ if (O = st(B ? {} : e), !i)
1209
+ return Nr(e, ot(O, e));
1210
+ } else {
1211
+ if (!C[M])
1212
+ return b ? e : {};
1213
+ O = Gr(e, M, re, i);
1214
+ }
1215
+ }
1216
+ x || (x = new V());
1217
+ var Y = x.get(e);
1218
+ if (Y)
1219
+ return Y;
1220
+ if (x.set(e, O), !R)
1221
+ var z = s ? Ur(e) : ae(e);
1222
+ return Se(z || e, function($, U) {
1223
+ z && (U = $, $ = e[U]), ke(O, U, re($, i, s, c, U, e, x));
1224
+ }), O;
1225
+ }
1226
+ function Mr(e) {
1227
+ return at(e) ? xe(e) : {};
1228
+ }
1229
+ function Cr(e, i, s) {
1230
+ var c = i(e);
1231
+ return oe(e) ? c : Ie(c, s(e));
1232
+ }
1233
+ function Dr(e) {
1234
+ return kt.call(e);
1235
+ }
1236
+ function kr(e) {
1237
+ if (!at(e) || Wr(e))
1238
+ return !1;
1239
+ var i = se(e) || Wt(e) ? fr : nr;
1240
+ return i.test(K(e));
1241
+ }
1242
+ function jr(e) {
1243
+ if (!Re(e))
1244
+ return Me(e);
1245
+ var i = [];
1246
+ for (var s in Object(e))
1247
+ it.call(e, s) && s != "constructor" && i.push(s);
1248
+ return i;
1249
+ }
1250
+ function Ut(e, i) {
1251
+ if (i)
1252
+ return e.slice();
1253
+ var s = new e.constructor(e.length);
1254
+ return e.copy(s), s;
1255
+ }
1256
+ function ne(e) {
1257
+ var i = new e.constructor(e.byteLength);
1258
+ return new Yt(i).set(new Yt(e)), i;
1259
+ }
1260
+ function wt(e, i) {
1261
+ var s = i ? ne(e.buffer) : e.buffer;
1262
+ return new e.constructor(s, e.byteOffset, e.byteLength);
1263
+ }
1264
+ function je(e, i, s) {
1265
+ var c = i ? s(Te(e), !0) : Te(e);
1266
+ return Bt(c, ar, new e.constructor());
1267
+ }
1268
+ function Fe(e) {
1269
+ var i = new e.constructor(e.source, rr.exec(e));
1270
+ return i.lastIndex = e.lastIndex, i;
1271
+ }
1272
+ function Fr(e, i, s) {
1273
+ var c = i ? s(Ae(e), !0) : Ae(e);
1274
+ return Bt(c, tt, new e.constructor());
1275
+ }
1276
+ function Rr(e) {
1277
+ return Ce ? Object(Ce.call(e)) : {};
1278
+ }
1279
+ function zr(e, i) {
1280
+ var s = i ? ne(e.buffer) : e.buffer;
1281
+ return new e.constructor(s, e.byteOffset, e.length);
1282
+ }
1283
+ function Hr(e, i) {
1284
+ var s = -1, c = e.length;
1285
+ for (i || (i = Array(c)); ++s < c; )
1286
+ i[s] = e[s];
1287
+ return i;
1288
+ }
1289
+ function ie(e, i, s, c) {
1290
+ s || (s = {});
1291
+ for (var w = -1, b = i.length; ++w < b; ) {
1292
+ var x = i[w], O = void 0;
1293
+ ke(s, x, O === void 0 ? e[x] : O);
1294
+ }
1295
+ return s;
1296
+ }
1297
+ function Nr(e, i) {
1298
+ return ie(e, ft(e), i);
1299
+ }
1300
+ function Ur(e) {
1301
+ return Cr(e, ae, ft);
1302
+ }
1303
+ function Tt(e, i) {
1304
+ var s = e.__data__;
1305
+ return $r(i) ? s[typeof i == "string" ? "string" : "hash"] : s.map;
1306
+ }
1307
+ function rt(e, i) {
1308
+ var s = we(e, i);
1309
+ return kr(s) ? s : void 0;
1310
+ }
1311
+ var ft = Xt ? Kt(Xt, Object) : Vr, lt = Dr;
1312
+ (Rt && lt(new Rt(new ArrayBuffer(1))) != F || vt && lt(new vt()) != l || et && lt(et.resolve()) != y || zt && lt(new zt()) != v || qt && lt(new qt()) != A) && (lt = function(e) {
1313
+ var i = kt.call(e), s = i == m ? e.constructor : void 0, c = s ? K(s) : void 0;
1314
+ if (c)
1315
+ switch (c) {
1316
+ case Jt:
1317
+ return F;
1318
+ case It:
1319
+ return l;
1320
+ case Zt:
1321
+ return y;
1322
+ case Qt:
1323
+ return v;
1324
+ case te:
1325
+ return A;
1326
+ }
1327
+ return i;
1328
+ });
1329
+ function Lr(e) {
1330
+ var i = e.length, s = e.constructor(i);
1331
+ return i && typeof e[0] == "string" && it.call(e, "index") && (s.index = e.index, s.input = e.input), s;
1332
+ }
1333
+ function st(e) {
1334
+ return typeof e.constructor == "function" && !Re(e) ? Mr(J(e)) : {};
1335
+ }
1336
+ function Gr(e, i, s, c) {
1337
+ var w = e.constructor;
1338
+ switch (i) {
1339
+ case L:
1340
+ return ne(e);
1341
+ case p:
1342
+ case T:
1343
+ return new w(+e);
1344
+ case F:
1345
+ return wt(e, c);
1346
+ case j:
1347
+ case nt:
1348
+ case yt:
1349
+ case P:
1350
+ case k:
1351
+ case W:
1352
+ case be:
1353
+ case _e:
1354
+ case ge:
1355
+ return zr(e, c);
1356
+ case l:
1357
+ return je(e, c, s);
1358
+ case g:
1359
+ case h:
1360
+ return new w(e);
1361
+ case I:
1362
+ return Fe(e);
1363
+ case v:
1364
+ return Fr(e, c, s);
1365
+ case S:
1366
+ return Rr(e);
1367
+ }
1368
+ }
1369
+ function Br(e, i) {
1370
+ return i = i ?? a, !!i && (typeof e == "number" || ir.test(e)) && e > -1 && e % 1 == 0 && e < i;
1371
+ }
1372
+ function $r(e) {
1373
+ var i = typeof e;
1374
+ return i == "string" || i == "number" || i == "symbol" || i == "boolean" ? e !== "__proto__" : e === null;
1375
+ }
1376
+ function Wr(e) {
1377
+ return !!Ee && Ee in e;
1378
+ }
1379
+ function Re(e) {
1380
+ var i = e && e.constructor, s = typeof i == "function" && i.prototype || Dt;
1381
+ return e === s;
1382
+ }
1383
+ function K(e) {
1384
+ if (e != null) {
1385
+ try {
1386
+ return Oe.call(e);
1387
+ } catch {
1388
+ }
1389
+ try {
1390
+ return e + "";
1391
+ } catch {
1392
+ }
1393
+ }
1394
+ return "";
1395
+ }
1396
+ function ze(e) {
1397
+ return re(e, !0, !0);
1398
+ }
1399
+ function He(e, i) {
1400
+ return e === i || e !== e && i !== i;
1401
+ }
1402
+ function Lt(e) {
1403
+ return Kr(e) && it.call(e, "callee") && (!Pe.call(e, "callee") || kt.call(e) == u);
1404
+ }
1405
+ var oe = Array.isArray;
1406
+ function Gt(e) {
1407
+ return e != null && Ue(e.length) && !se(e);
1408
+ }
1409
+ function Kr(e) {
1410
+ return Le(e) && Gt(e);
1411
+ }
1412
+ var Ne = Ft || Yr;
1413
+ function se(e) {
1414
+ var i = at(e) ? kt.call(e) : "";
1415
+ return i == d || i == E;
1416
+ }
1417
+ function Ue(e) {
1418
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= a;
1419
+ }
1420
+ function at(e) {
1421
+ var i = typeof e;
1422
+ return !!e && (i == "object" || i == "function");
1423
+ }
1424
+ function Le(e) {
1425
+ return !!e && typeof e == "object";
1426
+ }
1427
+ function ae(e) {
1428
+ return Gt(e) ? Ht(e) : jr(e);
1429
+ }
1430
+ function Vr() {
1431
+ return [];
1432
+ }
1433
+ function Yr() {
1434
+ return !1;
1435
+ }
1436
+ t.exports = ze;
1437
+ })(Xe, Xe.exports);
1438
+ var Oi = Xe.exports;
1439
+ const dt = /* @__PURE__ */ dn(Oi), xi = (t) => {
1440
+ const r = t.map((n) => new FontFace(n.fontFamily, `url(${n.url})`).load().catch((o) => o));
1441
+ return r.length === 0 ? Promise.resolve(!0) : new Promise((n, o) => {
1442
+ Promise.all(r).then((a) => {
1443
+ a.forEach((u) => {
1444
+ u && u.family && (document.fonts.add(u), n(!0));
1445
+ });
1446
+ }).catch((a) => o(a));
1447
+ });
1448
+ }, Pi = (t) => new Promise((r, n) => {
1449
+ const o = new Image();
1450
+ console.warn("update cdn config for cors?"), o.onload = () => {
1451
+ const a = o.width, u = o.height;
1452
+ r({ width: a, height: u });
1453
+ }, o.onerror = (a) => {
1454
+ n(a);
1455
+ }, o.crossOrigin = "anonymous", o.src = t;
1456
+ }), Mi = (t) => new Promise((r, n) => {
1457
+ const o = new Audio();
1458
+ o.preload = "auto", o.addEventListener("loadedmetadata", () => {
1459
+ const a = o.duration * 1e3;
1460
+ r({ duration: a });
1461
+ }), o.addEventListener("error", (a) => {
1462
+ n(a);
1463
+ }), o.src = t, o.crossOrigin = "anonymous", o.load();
1464
+ }), Ci = (t) => new Promise((r, n) => {
1465
+ const o = document.createElement("video");
1466
+ o.preload = "auto", o.addEventListener("loadedmetadata", () => {
1467
+ const a = o.duration * 1e3, u = o.videoWidth, f = o.videoHeight;
1468
+ r({ duration: a, width: u, height: f });
1469
+ }), o.addEventListener("error", (a) => {
1470
+ n(a);
1471
+ }), o.src = t, o.load();
1472
+ }), Di = (t, r) => {
1473
+ const n = document.createElement("div");
1474
+ Object.keys(r).forEach((a) => {
1475
+ a !== "height" && (n.style[a] = r[a]);
1476
+ }), document.body.appendChild(n), n.textContent = t, n.style.whiteSpace = "normal", n.style.position = "absolute", n.style.visibility = "hidden", n.style.display = "inline-block", n.style.width = r.width + "px", n.style.fontSize = r.fontSize + "px";
1477
+ const o = getComputedStyle(n).height;
1478
+ return document.body.removeChild(n), parseFloat(o);
1479
+ }, hn = {
1480
+ color: "#000000",
1481
+ x: 0,
1482
+ y: 0,
1483
+ blur: 0
1484
+ }, Qe = (t, r) => t ? t.from && !t.to ? {
1485
+ from: t.from,
1486
+ to: t.from + ((r == null ? void 0 : r.duration) || 5e3)
1487
+ } : t : {
1488
+ from: 0,
1489
+ to: (r == null ? void 0 : r.duration) || 5e3
1490
+ }, Kn = (t, r) => t ? t.from && !t.to ? {
1491
+ from: t.from,
1492
+ to: r.duration
1493
+ } : t : {
1494
+ from: 0,
1495
+ to: r.duration
1496
+ };
1497
+ function yn(t, r) {
1498
+ const n = {
1499
+ x: t.size.width / 2,
1500
+ y: t.size.height / 2
1501
+ }, o = { x: r.width / 2, y: r.height / 2 }, a = Math.min(
1502
+ t.size.width / r.width,
1503
+ t.size.height / r.height
1504
+ ), u = n.x - o.x;
1505
+ return {
1506
+ top: `${n.y - o.y}px`,
1507
+ left: `${u}px`,
1508
+ transform: `scale(${a})`
1509
+ };
1510
+ }
1511
+ const ki = async (t, r) => {
1512
+ const n = t.details.src, o = await Ci(n), a = yn(r, {
1513
+ ...o
1514
+ }), u = {
1515
+ width: o.width,
1516
+ height: o.height,
1517
+ duration: o.duration,
1518
+ opacity: 100,
1519
+ src: n,
1520
+ volume: t.details.volume ?? 100,
1521
+ // Default volume
1522
+ borderRadius: t.details.borderRadius ?? 0,
1523
+ // Default border radius
1524
+ borderWidth: t.details.borderWidth ?? 0,
1525
+ // Default border width
1526
+ borderColor: t.details.borderColor || "#000000",
1527
+ // Default border color
1528
+ boxShadow: t.details.boxShadow || hn,
1529
+ top: a.top || "0px",
1530
+ // Default top
1531
+ left: a.left || "0px",
1532
+ // Default left
1533
+ transform: a.transform
1534
+ // Default transform
1535
+ };
1536
+ return {
1537
+ ...t,
1538
+ trim: Kn(t.trim, { duration: o.duration }),
1539
+ type: "video",
1540
+ name: "video",
1541
+ details: u,
1542
+ display: Qe(t.display, { duration: o.duration })
1543
+ };
1544
+ }, ji = async (t) => {
1545
+ const r = t.id, n = t.details, a = (await Mi(n.src)).duration;
1546
+ return {
1547
+ id: r,
1548
+ name: "",
1549
+ type: "audio",
1550
+ display: Qe(t.display, { duration: a }),
1551
+ trim: Kn(t.trim, { duration: a }),
1552
+ details: {
1553
+ src: n.src,
1554
+ duration: a,
1555
+ volume: n.volume ?? 100
1556
+ // Default volume
1557
+ },
1558
+ metadata: { ...t.metadata }
1559
+ };
1560
+ }, Fi = async (t, r) => {
1561
+ const n = t.details, o = await Pi(n.src), a = yn(r, o);
1562
+ return {
1563
+ id: t.id,
1564
+ type: "image",
1565
+ name: "image",
1566
+ display: Qe(t.display),
1567
+ details: {
1568
+ src: n.src || "",
1569
+ // Default source URL
1570
+ width: n.width || o.width || 100,
1571
+ // Default width
1572
+ height: n.height || o.height || 100,
1573
+ // Default height
1574
+ opacity: n.opacity ?? 100,
1575
+ // Default opacity
1576
+ transform: a.transform,
1577
+ // Default transform
1578
+ border: n.border || "none",
1579
+ // Default border
1580
+ borderRadius: n.borderRadius || 0,
1581
+ // Default border radius
1582
+ boxShadow: n.boxShadow || hn,
1583
+ // Default box shadow
1584
+ top: a.top || "0px",
1585
+ // Default top
1586
+ left: a.left || "0px",
1587
+ // Default left
1588
+ borderWidth: n.borderWidth ?? 0,
1589
+ // Default border width
1590
+ borderColor: n.borderColor || "#000000"
1591
+ // Default border color
1592
+ },
1593
+ metadata: t.metadata || {}
1594
+ };
1595
+ }, Ri = async (t, r) => {
1596
+ const n = t.id;
1597
+ await xi([
1598
+ {
1599
+ fontFamily: t.details.fontFamily,
1600
+ url: t.details.fontUrl
1601
+ }
1602
+ ]);
1603
+ const o = t.details, a = zi(o), u = Di(t.details.text, a), f = yn(r, {
1604
+ width: a.width,
1605
+ height: u
1606
+ });
1607
+ return {
1608
+ id: n,
1609
+ name: "text",
1610
+ type: "text",
1611
+ display: Qe(t.display),
1612
+ details: {
1613
+ ...a,
1614
+ text: o.text || "",
1615
+ // Default text content
1616
+ height: u,
1617
+ // Default height
1618
+ fontUrl: o.fontUrl,
1619
+ top: f.top,
1620
+ left: f.left,
1621
+ borderWidth: o.borderWidth || 0,
1622
+ borderColor: o.borderColor || "#000000",
1623
+ boxShadow: o.boxShadow || hn
1624
+ },
1625
+ metadata: {}
1626
+ };
1627
+ }, zi = (t) => ({
1628
+ fontFamily: t.fontFamily || "Arial",
1629
+ // Default font family
1630
+ fontSize: t.fontSize || "16px",
1631
+ // Default font size
1632
+ fontWeight: t.fontWeight || "normal",
1633
+ // Default font weight
1634
+ fontStyle: t.fontStyle || "normal",
1635
+ // Default font style
1636
+ textDecoration: t.textDecoration || "none",
1637
+ // Default text decoration
1638
+ textAlign: t.textAlign || "left",
1639
+ // Default text alignment
1640
+ lineHeight: t.lineHeight || "normal",
1641
+ // Default line height
1642
+ letterSpacing: t.letterSpacing || "normal",
1643
+ // Default letter spacing
1644
+ wordSpacing: t.wordSpacing || "normal",
1645
+ // Default word spacing
1646
+ color: t.color || "#ffffff",
1647
+ // Default text color (black)
1648
+ backgroundColor: t.backgroundColor || "transparent",
1649
+ // Default background color
1650
+ border: t.border || "none",
1651
+ // Default border
1652
+ textShadow: t.textShadow || "none",
1653
+ // Default text shadow
1654
+ text: t.text || "",
1655
+ // Default text content
1656
+ opacity: t.opacity ?? 100,
1657
+ // Default opacity
1658
+ width: t.width || 300,
1659
+ wordWrap: t.wordWrap || "normal",
1660
+ //'break-word'
1661
+ wordBreak: t.wordBreak || "normal",
1662
+ //'break-all',
1663
+ WebkitTextStrokeColor: t.WebkitTextStrokeColor || "#ffffff",
1664
+ WebkitTextStrokeWidth: t.WebkitTextStrokeWidth || "0px",
1665
+ top: t.top || "0px",
1666
+ left: t.left || "0px"
1667
+ }), xn = (t) => Object.keys(t).reduce((r, n) => {
1668
+ const { display: o } = t[n];
1669
+ return Math.max(r, o.to);
1670
+ }, 0);
1671
+ function Hi(t, r) {
1672
+ return t.map((n) => ({
1673
+ ...n,
1674
+ items: n.items.filter((o) => !r.includes(o))
1675
+ }));
1676
+ }
1677
+ function Ni(t) {
1678
+ const r = $e.pipe(
1679
+ We(({ key: _ }) => _.startsWith(ni))
1680
+ ), n = $e.pipe(
1681
+ We(({ key: _ }) => _.startsWith(ii))
1682
+ ), o = $e.pipe(
1683
+ We(({ key: _ }) => _.startsWith(oi))
1684
+ ), a = $e.pipe(
1685
+ We(({ key: _ }) => _.startsWith(si))
1686
+ ), u = n.subscribe((_) => {
1687
+ if (_.key === ai) return t.undo();
1688
+ if (_.key === ci) return t.redo();
1689
+ }), f = r.subscribe(async (_) => {
1690
+ var l, g, m, y;
1691
+ const d = dt(t.getState());
1692
+ if (_.key === ui) {
1693
+ const I = await Ri((l = _.value) == null ? void 0 : l.payload, {
1694
+ size: {
1695
+ width: 1080,
1696
+ height: 1920
1697
+ }
1698
+ }), { details: v, ...h } = I;
1699
+ d.trackItemDetailsMap[h.id] = {
1700
+ type: "text",
1701
+ details: v
1702
+ }, d.trackItemsMap[h.id] = h, d.trackItemIds.push(h.id);
1703
+ }
1704
+ if (_.key === fi) {
1705
+ const I = await Fi((g = _.value) == null ? void 0 : g.payload, {
1706
+ size: {
1707
+ width: 1080,
1708
+ height: 1920
1709
+ }
1710
+ }), { details: v, ...h } = I;
1711
+ d.trackItemDetailsMap[h.id] = {
1712
+ type: "image",
1713
+ details: v
1714
+ }, d.trackItemsMap[h.id] = h, d.trackItemIds.push(h.id);
1715
+ }
1716
+ if (_.key === li) {
1717
+ const I = await ji((m = _.value) == null ? void 0 : m.payload), { details: v, ...h } = I;
1718
+ d.trackItemDetailsMap[h.id] = {
1719
+ type: "audio",
1720
+ details: v
1721
+ }, d.trackItemsMap[h.id] = h, d.trackItemIds.push(h.id);
1722
+ }
1723
+ if (_.key === pi) {
1724
+ const I = await ki((y = _.value) == null ? void 0 : y.payload, {
1725
+ size: {
1726
+ width: 1080,
1727
+ height: 1920
1728
+ }
1729
+ }), { details: v, ...h } = I;
1730
+ d.trackItemDetailsMap[h.id] = {
1731
+ type: "video",
1732
+ details: v
1733
+ }, d.trackItemsMap[h.id] = h, d.trackItemIds.push(h.id);
1734
+ }
1735
+ const E = xn(d.trackItemsMap);
1736
+ t.updateState(
1737
+ {
1738
+ trackItemIds: d.trackItemIds,
1739
+ trackItemDetailsMap: { ...d.trackItemDetailsMap },
1740
+ trackItemsMap: { ...d.trackItemsMap },
1741
+ duration: E
1742
+ },
1743
+ {
1744
+ updateHistory: !0,
1745
+ kind: "add"
1746
+ }
1747
+ );
1748
+ }), p = o.subscribe((_) => {
1749
+ if (_.key === di) {
1750
+ const d = dt(t.getState()), E = d.activeIds, l = d.trackItemIds, g = d.trackItemDetailsMap, m = l.filter(
1751
+ (h) => !E.includes(h)
1752
+ ), y = Object.fromEntries(
1753
+ Object.entries(g).filter(
1754
+ ([h]) => !E.includes(h)
1755
+ )
1756
+ ), I = Hi(
1757
+ d.tracks,
1758
+ E
1759
+ ), v = xn(d.trackItemsMap);
1760
+ t.updateState(
1761
+ {
1762
+ trackItemIds: m,
1763
+ trackItemDetailsMap: y,
1764
+ activeIds: [],
1765
+ tracks: I,
1766
+ duration: v
1767
+ },
1768
+ { updateHistory: !0, kind: "remove" }
1769
+ );
1770
+ }
1771
+ }), T = a.subscribe((_) => {
1772
+ var d, E;
1773
+ if (_.key === hi) {
1774
+ const l = t.getState(), g = dt(l.trackItemDetailsMap), m = Object.keys((d = _.value) == null ? void 0 : d.payload);
1775
+ if (!m.length) return;
1776
+ const y = (E = _.value) == null ? void 0 : E.payload;
1777
+ m.forEach((I) => {
1778
+ g[I].details = {
1779
+ ...g[I].details,
1780
+ ...y[I].details
1781
+ };
1782
+ }), t.updateState(
1783
+ {
1784
+ trackItemDetailsMap: { ...g }
1785
+ },
1786
+ {
1787
+ updateHistory: !0,
1788
+ kind: "update:details"
1789
+ }
1790
+ );
1791
+ }
1792
+ });
1793
+ return {
1794
+ unsubscribe: () => {
1795
+ f.unsubscribe(), p.unsubscribe(), T.unsubscribe(), u.unsubscribe();
1796
+ }
1797
+ };
1798
+ }
1799
+ const Ui = { Date: !0, RegExp: !0, String: !0, Number: !0 };
1800
+ function Vn(t, r, n = { cyclesFix: !0 }, o = []) {
1801
+ var p, T;
1802
+ let a = [];
1803
+ const u = Array.isArray(t);
1804
+ for (const _ in t) {
1805
+ const d = t[_], E = u ? +_ : _;
1806
+ if (!(_ in r)) {
1807
+ a.push({
1808
+ type: "REMOVE",
1809
+ path: [E],
1810
+ oldValue: t[_]
1811
+ });
1812
+ continue;
1813
+ }
1814
+ const l = r[_], g = typeof d == "object" && typeof l == "object" && Array.isArray(d) === Array.isArray(l);
1815
+ if (d && l && g && !Ui[(T = (p = Object.getPrototypeOf(d)) == null ? void 0 : p.constructor) == null ? void 0 : T.name] && (!n.cyclesFix || !o.includes(d))) {
1816
+ const m = Vn(d, l, n, n.cyclesFix ? o.concat([d]) : []);
1817
+ a.push.apply(a, m.map((y) => (y.path.unshift(E), y)));
1818
+ } else d !== l && // treat NaN values as equivalent
1819
+ !(Number.isNaN(d) && Number.isNaN(l)) && !(g && (isNaN(d) ? d + "" == l + "" : +d == +l)) && a.push({
1820
+ path: [E],
1821
+ type: "CHANGE",
1822
+ value: l,
1823
+ oldValue: d
1824
+ });
1825
+ }
1826
+ const f = Array.isArray(r);
1827
+ for (const _ in r)
1828
+ _ in t || a.push({
1829
+ type: "CREATE",
1830
+ path: [f ? +_ : _],
1831
+ value: r[_]
1832
+ });
1833
+ return a;
1834
+ }
1835
+ var bn = Symbol.for("immer-nothing"), ce = Symbol.for("immer-draftable"), X = Symbol.for("immer-state"), Yn = process.env.NODE_ENV !== "production" ? [
1836
+ // All error codes, starting by 0:
1837
+ function(t) {
1838
+ return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
1839
+ },
1840
+ function(t) {
1841
+ return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`;
1842
+ },
1843
+ "This object has been frozen and should not be mutated",
1844
+ function(t) {
1845
+ return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + t;
1846
+ },
1847
+ "An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",
1848
+ "Immer forbids circular references",
1849
+ "The first or second argument to `produce` must be a function",
1850
+ "The third argument to `produce` must be a function or undefined",
1851
+ "First argument to `createDraft` must be a plain object, an array, or an immerable object",
1852
+ "First argument to `finishDraft` must be a draft returned by `createDraft`",
1853
+ function(t) {
1854
+ return `'current' expects a draft, got: ${t}`;
1855
+ },
1856
+ "Object.defineProperty() cannot be used on an Immer draft",
1857
+ "Object.setPrototypeOf() cannot be used on an Immer draft",
1858
+ "Immer only supports deleting array indices",
1859
+ "Immer only supports setting array indices and the 'length' property",
1860
+ function(t) {
1861
+ return `'original' expects a draft, got: ${t}`;
1862
+ }
1863
+ // Note: if more errors are added, the errorOffset in Patches.ts should be increased
1864
+ // See Patches.ts for additional errors
1865
+ ] : [];
1866
+ function H(t, ...r) {
1867
+ if (process.env.NODE_ENV !== "production") {
1868
+ const n = Yn[t], o = typeof n == "function" ? n.apply(null, r) : n;
1869
+ throw new Error(`[Immer] ${o}`);
1870
+ }
1871
+ throw new Error(
1872
+ `[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
1873
+ );
1874
+ }
1875
+ var xt = Object.getPrototypeOf;
1876
+ function Pt(t) {
1877
+ return !!t && !!t[X];
1878
+ }
1879
+ function gt(t) {
1880
+ var r;
1881
+ return t ? Xn(t) || Array.isArray(t) || !!t[ce] || !!((r = t.constructor) != null && r[ce]) || he(t) || ye(t) : !1;
1882
+ }
1883
+ var Li = Object.prototype.constructor.toString();
1884
+ function Xn(t) {
1885
+ if (!t || typeof t != "object")
1886
+ return !1;
1887
+ const r = xt(t);
1888
+ if (r === null)
1889
+ return !0;
1890
+ const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
1891
+ return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === Li;
1892
+ }
1893
+ function ue(t, r) {
1894
+ Mt(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
1895
+ r(n, t[n], t);
1896
+ }) : t.forEach((n, o) => r(o, n, t));
1897
+ }
1898
+ function Mt(t) {
1899
+ const r = t[X];
1900
+ return r ? r.type_ : Array.isArray(t) ? 1 : he(t) ? 2 : ye(t) ? 3 : 0;
1901
+ }
1902
+ function fe(t, r) {
1903
+ return Mt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
1904
+ }
1905
+ function Jr(t, r) {
1906
+ return Mt(t) === 2 ? t.get(r) : t[r];
1907
+ }
1908
+ function qn(t, r, n) {
1909
+ const o = Mt(t);
1910
+ o === 2 ? t.set(r, n) : o === 3 ? t.add(n) : t[r] = n;
1911
+ }
1912
+ function Gi(t, r) {
1913
+ return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
1914
+ }
1915
+ function he(t) {
1916
+ return t instanceof Map;
1917
+ }
1918
+ function ye(t) {
1919
+ return t instanceof Set;
1920
+ }
1921
+ function Ot(t) {
1922
+ return t.copy_ || t.base_;
1923
+ }
1924
+ function an(t, r) {
1925
+ if (he(t))
1926
+ return new Map(t);
1927
+ if (ye(t))
1928
+ return new Set(t);
1929
+ if (Array.isArray(t))
1930
+ return Array.prototype.slice.call(t);
1931
+ const n = Xn(t);
1932
+ if (r === !0 || r === "class_only" && !n) {
1933
+ const o = Object.getOwnPropertyDescriptors(t);
1934
+ delete o[X];
1935
+ let a = Reflect.ownKeys(o);
1936
+ for (let u = 0; u < a.length; u++) {
1937
+ const f = a[u], p = o[f];
1938
+ p.writable === !1 && (p.writable = !0, p.configurable = !0), (p.get || p.set) && (o[f] = {
1939
+ configurable: !0,
1940
+ writable: !0,
1941
+ // could live with !!desc.set as well here...
1942
+ enumerable: p.enumerable,
1943
+ value: t[f]
1944
+ });
1945
+ }
1946
+ return Object.create(xt(t), o);
1947
+ } else {
1948
+ const o = xt(t);
1949
+ if (o !== null && n)
1950
+ return { ...t };
1951
+ const a = Object.create(o);
1952
+ return Object.assign(a, t);
1953
+ }
1954
+ }
1955
+ function _n(t, r = !1) {
1956
+ return tr(t) || Pt(t) || !gt(t) || (Mt(t) > 1 && (t.set = t.add = t.clear = t.delete = Bi), Object.freeze(t), r && Object.entries(t).forEach(([n, o]) => _n(o, !0))), t;
1957
+ }
1958
+ function Bi() {
1959
+ H(2);
1960
+ }
1961
+ function tr(t) {
1962
+ return Object.isFrozen(t);
1963
+ }
1964
+ var cn = {};
1965
+ function Ct(t) {
1966
+ const r = cn[t];
1967
+ return r || H(0, t), r;
1968
+ }
1969
+ function $i(t, r) {
1970
+ cn[t] || (cn[t] = r);
1971
+ }
1972
+ var le;
1973
+ function Jn() {
1974
+ return le;
1975
+ }
1976
+ function Wi(t, r) {
1977
+ return {
1978
+ drafts_: [],
1979
+ parent_: t,
1980
+ immer_: r,
1981
+ // Whenever the modified draft contains a draft from another scope, we
1982
+ // need to prevent auto-freezing so the unowned draft can be finalized.
1983
+ canAutoFreeze_: !0,
1984
+ unfinalizedDrafts_: 0
1985
+ };
1986
+ }
1987
+ function Pn(t, r) {
1988
+ r && (Ct("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
1989
+ }
1990
+ function un(t) {
1991
+ fn(t), t.drafts_.forEach(Ki), t.drafts_ = null;
1992
+ }
1993
+ function fn(t) {
1994
+ t === le && (le = t.parent_);
1995
+ }
1996
+ function Mn(t) {
1997
+ return le = Wi(le, t);
1998
+ }
1999
+ function Ki(t) {
2000
+ const r = t[X];
2001
+ r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
2002
+ }
2003
+ function Cn(t, r) {
2004
+ r.unfinalizedDrafts_ = r.drafts_.length;
2005
+ const n = r.drafts_[0];
2006
+ return t !== void 0 && t !== n ? (n[X].modified_ && (un(r), H(4)), gt(t) && (t = qe(r, t), r.parent_ || Je(r, t)), r.patches_ && Ct("Patches").generateReplacementPatches_(
2007
+ n[X].base_,
2008
+ t,
2009
+ r.patches_,
2010
+ r.inversePatches_
2011
+ )) : t = qe(r, n, []), un(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== bn ? t : void 0;
2012
+ }
2013
+ function qe(t, r, n) {
2014
+ if (tr(r))
2015
+ return r;
2016
+ const o = r[X];
2017
+ if (!o)
2018
+ return ue(
2019
+ r,
2020
+ (a, u) => Dn(t, o, r, a, u, n)
2021
+ ), r;
2022
+ if (o.scope_ !== t)
2023
+ return r;
2024
+ if (!o.modified_)
2025
+ return Je(t, o.base_, !0), o.base_;
2026
+ if (!o.finalized_) {
2027
+ o.finalized_ = !0, o.scope_.unfinalizedDrafts_--;
2028
+ const a = o.copy_;
2029
+ let u = a, f = !1;
2030
+ o.type_ === 3 && (u = new Set(a), a.clear(), f = !0), ue(
2031
+ u,
2032
+ (p, T) => Dn(t, o, a, p, T, n, f)
2033
+ ), Je(t, a, !1), n && t.patches_ && Ct("Patches").generatePatches_(
2034
+ o,
2035
+ n,
2036
+ t.patches_,
2037
+ t.inversePatches_
2038
+ );
2039
+ }
2040
+ return o.copy_;
2041
+ }
2042
+ function Dn(t, r, n, o, a, u, f) {
2043
+ if (process.env.NODE_ENV !== "production" && a === n && H(5), Pt(a)) {
2044
+ const p = u && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
2045
+ !fe(r.assigned_, o) ? u.concat(o) : void 0, T = qe(t, a, p);
2046
+ if (qn(n, o, T), Pt(T))
2047
+ t.canAutoFreeze_ = !1;
2048
+ else
2049
+ return;
2050
+ } else f && n.add(a);
2051
+ if (gt(a) && !tr(a)) {
2052
+ if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
2053
+ return;
2054
+ qe(t, a), (!r || !r.scope_.parent_) && typeof o != "symbol" && Object.prototype.propertyIsEnumerable.call(n, o) && Je(t, a);
2055
+ }
2056
+ }
2057
+ function Je(t, r, n = !1) {
2058
+ !t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && _n(r, n);
2059
+ }
2060
+ function Vi(t, r) {
2061
+ const n = Array.isArray(t), o = {
2062
+ type_: n ? 1 : 0,
2063
+ // Track which produce call this is associated with.
2064
+ scope_: r ? r.scope_ : Jn(),
2065
+ // True for both shallow and deep changes.
2066
+ modified_: !1,
2067
+ // Used during finalization.
2068
+ finalized_: !1,
2069
+ // Track which properties have been assigned (true) or deleted (false).
2070
+ assigned_: {},
2071
+ // The parent draft state.
2072
+ parent_: r,
2073
+ // The base state.
2074
+ base_: t,
2075
+ // The base proxy.
2076
+ draft_: null,
2077
+ // set below
2078
+ // The base copy with any updated values.
2079
+ copy_: null,
2080
+ // Called by the `produce` function.
2081
+ revoke_: null,
2082
+ isManual_: !1
2083
+ };
2084
+ let a = o, u = gn;
2085
+ n && (a = [o], u = pe);
2086
+ const { revoke: f, proxy: p } = Proxy.revocable(a, u);
2087
+ return o.draft_ = p, o.revoke_ = f, p;
2088
+ }
2089
+ var gn = {
2090
+ get(t, r) {
2091
+ if (r === X)
2092
+ return t;
2093
+ const n = Ot(t);
2094
+ if (!fe(n, r))
2095
+ return Yi(t, n, r);
2096
+ const o = n[r];
2097
+ return t.finalized_ || !gt(o) ? o : o === Zr(t.base_, r) ? (Qr(t), t.copy_[r] = pn(o, t)) : o;
2098
+ },
2099
+ has(t, r) {
2100
+ return r in Ot(t);
2101
+ },
2102
+ ownKeys(t) {
2103
+ return Reflect.ownKeys(Ot(t));
2104
+ },
2105
+ set(t, r, n) {
2106
+ const o = Zn(Ot(t), r);
2107
+ if (o != null && o.set)
2108
+ return o.set.call(t.draft_, n), !0;
2109
+ if (!t.modified_) {
2110
+ const a = Zr(Ot(t), r), u = a == null ? void 0 : a[X];
2111
+ if (u && u.base_ === n)
2112
+ return t.copy_[r] = n, t.assigned_[r] = !1, !0;
2113
+ if (Gi(n, a) && (n !== void 0 || fe(t.base_, r)))
2114
+ return !0;
2115
+ Qr(t), ln(t);
2116
+ }
2117
+ return t.copy_[r] === n && // special case: handle new props with value 'undefined'
2118
+ (n !== void 0 || r in t.copy_) || // special case: NaN
2119
+ Number.isNaN(n) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = n, t.assigned_[r] = !0), !0;
2120
+ },
2121
+ deleteProperty(t, r) {
2122
+ return Zr(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, Qr(t), ln(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
2123
+ },
2124
+ // Note: We never coerce `desc.value` into an Immer draft, because we can't make
2125
+ // the same guarantee in ES5 mode.
2126
+ getOwnPropertyDescriptor(t, r) {
2127
+ const n = Ot(t), o = Reflect.getOwnPropertyDescriptor(n, r);
2128
+ return o && {
2129
+ writable: !0,
2130
+ configurable: t.type_ !== 1 || r !== "length",
2131
+ enumerable: o.enumerable,
2132
+ value: n[r]
2133
+ };
2134
+ },
2135
+ defineProperty() {
2136
+ H(11);
2137
+ },
2138
+ getPrototypeOf(t) {
2139
+ return xt(t.base_);
2140
+ },
2141
+ setPrototypeOf() {
2142
+ H(12);
2143
+ }
2144
+ }, pe = {};
2145
+ ue(gn, (t, r) => {
2146
+ pe[t] = function() {
2147
+ return arguments[0] = arguments[0][0], r.apply(this, arguments);
2148
+ };
2149
+ });
2150
+ pe.deleteProperty = function(t, r) {
2151
+ return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && H(13), pe.set.call(this, t, r, void 0);
2152
+ };
2153
+ pe.set = function(t, r, n) {
2154
+ return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && H(14), gn.set.call(this, t[0], r, n, t[0]);
2155
+ };
2156
+ function Zr(t, r) {
2157
+ const n = t[X];
2158
+ return (n ? Ot(n) : t)[r];
2159
+ }
2160
+ function Yi(t, r, n) {
2161
+ var a;
2162
+ const o = Zn(r, n);
2163
+ return o ? "value" in o ? o.value : (
2164
+ // This is a very special case, if the prop is a getter defined by the
2165
+ // prototype, we should invoke it with the draft as context!
2166
+ (a = o.get) == null ? void 0 : a.call(t.draft_)
2167
+ ) : void 0;
2168
+ }
2169
+ function Zn(t, r) {
2170
+ if (!(r in t))
2171
+ return;
2172
+ let n = xt(t);
2173
+ for (; n; ) {
2174
+ const o = Object.getOwnPropertyDescriptor(n, r);
2175
+ if (o)
2176
+ return o;
2177
+ n = xt(n);
2178
+ }
2179
+ }
2180
+ function ln(t) {
2181
+ t.modified_ || (t.modified_ = !0, t.parent_ && ln(t.parent_));
2182
+ }
2183
+ function Qr(t) {
2184
+ t.copy_ || (t.copy_ = an(
2185
+ t.base_,
2186
+ t.scope_.immer_.useStrictShallowCopy_
2187
+ ));
2188
+ }
2189
+ var Xi = class {
2190
+ constructor(t) {
2191
+ this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, n, o) => {
2192
+ if (typeof r == "function" && typeof n != "function") {
2193
+ const u = n;
2194
+ n = r;
2195
+ const f = this;
2196
+ return function(T = u, ..._) {
2197
+ return f.produce(T, (d) => n.call(this, d, ..._));
2198
+ };
2199
+ }
2200
+ typeof n != "function" && H(6), o !== void 0 && typeof o != "function" && H(7);
2201
+ let a;
2202
+ if (gt(r)) {
2203
+ const u = Mn(this), f = pn(r, void 0);
2204
+ let p = !0;
2205
+ try {
2206
+ a = n(f), p = !1;
2207
+ } finally {
2208
+ p ? un(u) : fn(u);
2209
+ }
2210
+ return Pn(u, o), Cn(a, u);
2211
+ } else if (!r || typeof r != "object") {
2212
+ if (a = n(r), a === void 0 && (a = r), a === bn && (a = void 0), this.autoFreeze_ && _n(a, !0), o) {
2213
+ const u = [], f = [];
2214
+ Ct("Patches").generateReplacementPatches_(r, a, u, f), o(u, f);
2215
+ }
2216
+ return a;
2217
+ } else
2218
+ H(1, r);
2219
+ }, this.produceWithPatches = (r, n) => {
2220
+ if (typeof r == "function")
2221
+ return (f, ...p) => this.produceWithPatches(f, (T) => r(T, ...p));
2222
+ let o, a;
2223
+ return [this.produce(r, n, (f, p) => {
2224
+ o = f, a = p;
2225
+ }), o, a];
2226
+ }, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
2227
+ }
2228
+ createDraft(t) {
2229
+ gt(t) || H(8), Pt(t) && (t = qi(t));
2230
+ const r = Mn(this), n = pn(t, void 0);
2231
+ return n[X].isManual_ = !0, fn(r), n;
2232
+ }
2233
+ finishDraft(t, r) {
2234
+ const n = t && t[X];
2235
+ (!n || !n.isManual_) && H(9);
2236
+ const { scope_: o } = n;
2237
+ return Pn(o, r), Cn(void 0, o);
2238
+ }
2239
+ /**
2240
+ * Pass true to automatically freeze all copies created by Immer.
2241
+ *
2242
+ * By default, auto-freezing is enabled.
2243
+ */
2244
+ setAutoFreeze(t) {
2245
+ this.autoFreeze_ = t;
2246
+ }
2247
+ /**
2248
+ * Pass true to enable strict shallow copy.
2249
+ *
2250
+ * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
2251
+ */
2252
+ setUseStrictShallowCopy(t) {
2253
+ this.useStrictShallowCopy_ = t;
2254
+ }
2255
+ applyPatches(t, r) {
2256
+ let n;
2257
+ for (n = r.length - 1; n >= 0; n--) {
2258
+ const a = r[n];
2259
+ if (a.path.length === 0 && a.op === "replace") {
2260
+ t = a.value;
2261
+ break;
2262
+ }
2263
+ }
2264
+ n > -1 && (r = r.slice(n + 1));
2265
+ const o = Ct("Patches").applyPatches_;
2266
+ return Pt(t) ? o(t, r) : this.produce(
2267
+ t,
2268
+ (a) => o(a, r)
2269
+ );
2270
+ }
2271
+ };
2272
+ function pn(t, r) {
2273
+ const n = he(t) ? Ct("MapSet").proxyMap_(t, r) : ye(t) ? Ct("MapSet").proxySet_(t, r) : Vi(t, r);
2274
+ return (r ? r.scope_ : Jn()).drafts_.push(n), n;
2275
+ }
2276
+ function qi(t) {
2277
+ return Pt(t) || H(10, t), Qn(t);
2278
+ }
2279
+ function Qn(t) {
2280
+ if (!gt(t) || tr(t))
2281
+ return t;
2282
+ const r = t[X];
2283
+ let n;
2284
+ if (r) {
2285
+ if (!r.modified_)
2286
+ return r.base_;
2287
+ r.finalized_ = !0, n = an(t, r.scope_.immer_.useStrictShallowCopy_);
2288
+ } else
2289
+ n = an(t, !0);
2290
+ return ue(n, (o, a) => {
2291
+ qn(n, o, Qn(a));
2292
+ }), r && (r.finalized_ = !1), n;
2293
+ }
2294
+ function kn() {
2295
+ process.env.NODE_ENV !== "production" && Yn.push(
2296
+ 'Sets cannot have "replace" patches.',
2297
+ function(l) {
2298
+ return "Unsupported patch operation: " + l;
2299
+ },
2300
+ function(l) {
2301
+ return "Cannot apply patch, path doesn't resolve: " + l;
2302
+ },
2303
+ "Patching reserved attributes like __proto__, prototype and constructor is not allowed"
2304
+ );
2305
+ const r = "replace", n = "add", o = "remove";
2306
+ function a(l, g, m, y) {
2307
+ switch (l.type_) {
2308
+ case 0:
2309
+ case 2:
2310
+ return f(
2311
+ l,
2312
+ g,
2313
+ m,
2314
+ y
2315
+ );
2316
+ case 1:
2317
+ return u(l, g, m, y);
2318
+ case 3:
2319
+ return p(
2320
+ l,
2321
+ g,
2322
+ m,
2323
+ y
2324
+ );
2325
+ }
2326
+ }
2327
+ function u(l, g, m, y) {
2328
+ let { base_: I, assigned_: v } = l, h = l.copy_;
2329
+ h.length < I.length && ([I, h] = [h, I], [m, y] = [y, m]);
2330
+ for (let S = 0; S < I.length; S++)
2331
+ if (v[S] && h[S] !== I[S]) {
2332
+ const A = g.concat([S]);
2333
+ m.push({
2334
+ op: r,
2335
+ path: A,
2336
+ // Need to maybe clone it, as it can in fact be the original value
2337
+ // due to the base/copy inversion at the start of this function
2338
+ value: E(h[S])
2339
+ }), y.push({
2340
+ op: r,
2341
+ path: A,
2342
+ value: E(I[S])
2343
+ });
2344
+ }
2345
+ for (let S = I.length; S < h.length; S++) {
2346
+ const A = g.concat([S]);
2347
+ m.push({
2348
+ op: n,
2349
+ path: A,
2350
+ // Need to maybe clone it, as it can in fact be the original value
2351
+ // due to the base/copy inversion at the start of this function
2352
+ value: E(h[S])
2353
+ });
2354
+ }
2355
+ for (let S = h.length - 1; I.length <= S; --S) {
2356
+ const A = g.concat([S]);
2357
+ y.push({
2358
+ op: o,
2359
+ path: A
2360
+ });
2361
+ }
2362
+ }
2363
+ function f(l, g, m, y) {
2364
+ const { base_: I, copy_: v } = l;
2365
+ ue(l.assigned_, (h, S) => {
2366
+ const A = Jr(I, h), L = Jr(v, h), F = S ? fe(I, h) ? r : n : o;
2367
+ if (A === L && F === r)
2368
+ return;
2369
+ const j = g.concat(h);
2370
+ m.push(F === o ? { op: F, path: j } : { op: F, path: j, value: L }), y.push(
2371
+ F === n ? { op: o, path: j } : F === o ? { op: n, path: j, value: E(A) } : { op: r, path: j, value: E(A) }
2372
+ );
2373
+ });
2374
+ }
2375
+ function p(l, g, m, y) {
2376
+ let { base_: I, copy_: v } = l, h = 0;
2377
+ I.forEach((S) => {
2378
+ if (!v.has(S)) {
2379
+ const A = g.concat([h]);
2380
+ m.push({
2381
+ op: o,
2382
+ path: A,
2383
+ value: S
2384
+ }), y.unshift({
2385
+ op: n,
2386
+ path: A,
2387
+ value: S
2388
+ });
2389
+ }
2390
+ h++;
2391
+ }), h = 0, v.forEach((S) => {
2392
+ if (!I.has(S)) {
2393
+ const A = g.concat([h]);
2394
+ m.push({
2395
+ op: n,
2396
+ path: A,
2397
+ value: S
2398
+ }), y.unshift({
2399
+ op: o,
2400
+ path: A,
2401
+ value: S
2402
+ });
2403
+ }
2404
+ h++;
2405
+ });
2406
+ }
2407
+ function T(l, g, m, y) {
2408
+ m.push({
2409
+ op: r,
2410
+ path: [],
2411
+ value: g === bn ? void 0 : g
2412
+ }), y.push({
2413
+ op: r,
2414
+ path: [],
2415
+ value: l
2416
+ });
2417
+ }
2418
+ function _(l, g) {
2419
+ return g.forEach((m) => {
2420
+ const { path: y, op: I } = m;
2421
+ let v = l;
2422
+ for (let L = 0; L < y.length - 1; L++) {
2423
+ const F = Mt(v);
2424
+ let j = y[L];
2425
+ typeof j != "string" && typeof j != "number" && (j = "" + j), (F === 0 || F === 1) && (j === "__proto__" || j === "constructor") && H(19), typeof v == "function" && j === "prototype" && H(19), v = Jr(v, j), typeof v != "object" && H(18, y.join("/"));
2426
+ }
2427
+ const h = Mt(v), S = d(m.value), A = y[y.length - 1];
2428
+ switch (I) {
2429
+ case r:
2430
+ switch (h) {
2431
+ case 2:
2432
+ return v.set(A, S);
2433
+ case 3:
2434
+ H(16);
2435
+ default:
2436
+ return v[A] = S;
2437
+ }
2438
+ case n:
2439
+ switch (h) {
2440
+ case 1:
2441
+ return A === "-" ? v.push(S) : v.splice(A, 0, S);
2442
+ case 2:
2443
+ return v.set(A, S);
2444
+ case 3:
2445
+ return v.add(S);
2446
+ default:
2447
+ return v[A] = S;
2448
+ }
2449
+ case o:
2450
+ switch (h) {
2451
+ case 1:
2452
+ return v.splice(A, 1);
2453
+ case 2:
2454
+ return v.delete(A);
2455
+ case 3:
2456
+ return v.delete(m.value);
2457
+ default:
2458
+ return delete v[A];
2459
+ }
2460
+ default:
2461
+ H(17, I);
2462
+ }
2463
+ }), l;
2464
+ }
2465
+ function d(l) {
2466
+ if (!gt(l))
2467
+ return l;
2468
+ if (Array.isArray(l))
2469
+ return l.map(d);
2470
+ if (he(l))
2471
+ return new Map(
2472
+ Array.from(l.entries()).map(([m, y]) => [m, d(y)])
2473
+ );
2474
+ if (ye(l))
2475
+ return new Set(Array.from(l).map(d));
2476
+ const g = Object.create(xt(l));
2477
+ for (const m in l)
2478
+ g[m] = d(l[m]);
2479
+ return fe(l, ce) && (g[ce] = l[ce]), g;
2480
+ }
2481
+ function E(l) {
2482
+ return Pt(l) ? d(l) : l;
2483
+ }
2484
+ $i("Patches", {
2485
+ applyPatches_: _,
2486
+ generatePatches_: a,
2487
+ generateReplacementPatches_: T
2488
+ });
2489
+ }
2490
+ var q = new Xi(), Ji = q.produce;
2491
+ q.produceWithPatches.bind(
2492
+ q
2493
+ );
2494
+ q.setAutoFreeze.bind(q);
2495
+ q.setUseStrictShallowCopy.bind(q);
2496
+ var Zi = q.applyPatches.bind(q);
2497
+ q.createDraft.bind(q);
2498
+ q.finishDraft.bind(q);
2499
+ var Qi = 1 / 0, to = 9007199254740991, eo = "[object Arguments]", ro = "[object Function]", no = "[object GeneratorFunction]", io = "[object Symbol]", oo = typeof Z == "object" && Z && Z.Object === Object && Z, so = typeof self == "object" && self && self.Object === Object && self, ao = oo || so || Function("return this")();
2500
+ function co(t, r, n) {
2501
+ switch (n.length) {
2502
+ case 0:
2503
+ return t.call(r);
2504
+ case 1:
2505
+ return t.call(r, n[0]);
2506
+ case 2:
2507
+ return t.call(r, n[0], n[1]);
2508
+ case 3:
2509
+ return t.call(r, n[0], n[1], n[2]);
2510
+ }
2511
+ return t.apply(r, n);
2512
+ }
2513
+ function uo(t, r) {
2514
+ for (var n = -1, o = t ? t.length : 0, a = Array(o); ++n < o; )
2515
+ a[n] = r(t[n], n, t);
2516
+ return a;
2517
+ }
2518
+ function fo(t, r) {
2519
+ for (var n = -1, o = r.length, a = t.length; ++n < o; )
2520
+ t[a + n] = r[n];
2521
+ return t;
2522
+ }
2523
+ var mn = Object.prototype, lo = mn.hasOwnProperty, vn = mn.toString, jn = ao.Symbol, po = mn.propertyIsEnumerable, Fn = jn ? jn.isConcatSpreadable : void 0, Rn = Math.max;
2524
+ function ho(t, r, n, o, a) {
2525
+ var u = -1, f = t.length;
2526
+ for (n || (n = go), a || (a = []); ++u < f; ) {
2527
+ var p = t[u];
2528
+ n(p) ? fo(a, p) : a[a.length] = p;
2529
+ }
2530
+ return a;
2531
+ }
2532
+ function yo(t, r) {
2533
+ return t = Object(t), bo(t, r, function(n, o) {
2534
+ return o in t;
2535
+ });
2536
+ }
2537
+ function bo(t, r, n) {
2538
+ for (var o = -1, a = r.length, u = {}; ++o < a; ) {
2539
+ var f = r[o], p = t[f];
2540
+ n(p, f) && (u[f] = p);
2541
+ }
2542
+ return u;
2543
+ }
2544
+ function _o(t, r) {
2545
+ return r = Rn(r === void 0 ? t.length - 1 : r, 0), function() {
2546
+ for (var n = arguments, o = -1, a = Rn(n.length - r, 0), u = Array(a); ++o < a; )
2547
+ u[o] = n[r + o];
2548
+ o = -1;
2549
+ for (var f = Array(r + 1); ++o < r; )
2550
+ f[o] = n[o];
2551
+ return f[r] = u, co(t, this, f);
2552
+ };
2553
+ }
2554
+ function go(t) {
2555
+ return So(t) || vo(t) || !!(Fn && t && t[Fn]);
2556
+ }
2557
+ function mo(t) {
2558
+ if (typeof t == "string" || Oo(t))
2559
+ return t;
2560
+ var r = t + "";
2561
+ return r == "0" && 1 / t == -Qi ? "-0" : r;
2562
+ }
2563
+ function vo(t) {
2564
+ return wo(t) && lo.call(t, "callee") && (!po.call(t, "callee") || vn.call(t) == eo);
2565
+ }
2566
+ var So = Array.isArray;
2567
+ function Io(t) {
2568
+ return t != null && Ao(t.length) && !To(t);
2569
+ }
2570
+ function wo(t) {
2571
+ return ti(t) && Io(t);
2572
+ }
2573
+ function To(t) {
2574
+ var r = Eo(t) ? vn.call(t) : "";
2575
+ return r == ro || r == no;
2576
+ }
2577
+ function Ao(t) {
2578
+ return typeof t == "number" && t > -1 && t % 1 == 0 && t <= to;
2579
+ }
2580
+ function Eo(t) {
2581
+ var r = typeof t;
2582
+ return !!t && (r == "object" || r == "function");
2583
+ }
2584
+ function ti(t) {
2585
+ return !!t && typeof t == "object";
2586
+ }
2587
+ function Oo(t) {
2588
+ return typeof t == "symbol" || ti(t) && vn.call(t) == io;
2589
+ }
2590
+ var xo = _o(function(t, r) {
2591
+ return t == null ? {} : yo(t, uo(ho(r), mo));
2592
+ }), Po = xo;
2593
+ const zn = /* @__PURE__ */ dn(Po), Mo = {
2594
+ tracks: [],
2595
+ trackItemIds: [],
2596
+ trackItemsMap: {},
2597
+ transitionIds: [],
2598
+ transitionsMap: {},
2599
+ scale: {
2600
+ unit: 1,
2601
+ zoom: 1,
2602
+ segments: 1
2603
+ },
2604
+ duration: 0,
2605
+ activeIds: [],
2606
+ trackItemDetailsMap: {}
2607
+ }, Hn = [
2608
+ "tracks",
2609
+ "trackItemsMap",
2610
+ "trackItemDetailsMap",
2611
+ "transitionIds",
2612
+ "transitionsMap",
2613
+ "trackItemIds"
2614
+ ];
2615
+ class ko {
2616
+ constructor(r) {
2617
+ Et(this, "stateSubject");
2618
+ Et(this, "stateHistorySubject");
2619
+ Et(this, "prevState");
2620
+ Et(this, "undos", []);
2621
+ Et(this, "redos", []);
2622
+ Et(this, "listener");
2623
+ const n = r || Mo;
2624
+ this.stateSubject = new On(n), this.stateHistorySubject = new On({
2625
+ handleRedo: !1,
2626
+ handleUndo: !1
2627
+ }), this.prevState = n, this.initListeners();
2628
+ }
2629
+ initListeners() {
2630
+ Ni(this);
2631
+ }
2632
+ destroyListeners() {
2633
+ this.listener && this.listener.unsubscribe();
2634
+ }
2635
+ purge() {
2636
+ this.destroyListeners();
2637
+ }
2638
+ updateHistory(r, n) {
2639
+ const o = zn(r, Hn), a = zn(this.getState(), Hn), u = Vn(a, o);
2640
+ u.length && (this.undos.push({ undos: u, type: n }), this.redos = []);
2641
+ }
2642
+ getStateHistory() {
2643
+ return this.stateHistorySubject.getValue();
2644
+ }
2645
+ subscribeHistory(r) {
2646
+ return this.stateHistorySubject.subscribe(r);
2647
+ }
2648
+ // Get the current state
2649
+ getState() {
2650
+ return this.stateSubject.getValue();
2651
+ }
2652
+ // Subscribe to state changes
2653
+ subscribe(r) {
2654
+ return this.stateSubject.subscribe(r);
2655
+ }
2656
+ // Update the state, emitting only if the part of the state has changed
2657
+ updateState(r, n = { updateHistory: !1 }) {
2658
+ const o = this.getState(), a = {
2659
+ ...o,
2660
+ ...r
2661
+ };
2662
+ ct(o, a) || (n.updateHistory && this.updateHistory(a, n.kind), this.prevState = o, this.stateSubject.next(a));
2663
+ }
2664
+ // Selectively subscribe to scale changes
2665
+ subscribeToScale(r) {
2666
+ return this.stateSubject.asObservable().subscribe((n) => {
2667
+ ct(n.scale, this.prevState.scale) || r({ scale: n.scale });
2668
+ });
2669
+ }
2670
+ subscribeToUpdateItemDetails(r) {
2671
+ return this.stateSubject.asObservable().subscribe((n) => {
2672
+ ct(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
2673
+ });
2674
+ }
2675
+ // Selectively subscribe to duration changes
2676
+ subscribeToDuration(r) {
2677
+ return this.stateSubject.asObservable().subscribe((n) => {
2678
+ n.duration !== this.prevState.duration && r({ duration: n.duration });
2679
+ });
2680
+ }
2681
+ subscribeToHistory(r) {
2682
+ return this.stateHistorySubject.asObservable().subscribe((n) => {
2683
+ if (n.handleRedo) {
2684
+ const o = this.undos[this.undos.length - 1].type;
2685
+ o === "update" && r({ ...this.getState(), type: o }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !1 });
2686
+ }
2687
+ if (n.handleUndo) {
2688
+ const o = this.redos[this.redos.length - 1].type;
2689
+ o === "update" && r({ ...this.getState(), type: o }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !1 });
2690
+ }
2691
+ });
2692
+ }
2693
+ subscribeToAddOrRemoveItems(r) {
2694
+ return this.stateSubject.asObservable().subscribe((n) => {
2695
+ ct(n.trackItemIds, this.prevState.trackItemIds) || r({ trackItemIds: n.trackItemIds });
2696
+ });
2697
+ }
2698
+ // Selectively subscribe to activeIds changes
2699
+ subscribeToActiveIds(r) {
2700
+ return this.stateSubject.asObservable().subscribe((n) => {
2701
+ ct(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
2702
+ });
2703
+ }
2704
+ // Selectively subscribe to multiple track-related properties
2705
+ subscribeToTracks(r) {
2706
+ return this.stateSubject.asObservable().subscribe((n) => {
2707
+ (!ct(n.tracks, this.prevState.tracks) || !ct(n.trackItemIds, this.prevState.trackItemIds) || !ct(n.trackItemsMap, this.prevState.trackItemsMap) || !ct(n.transitionIds, this.prevState.transitionIds) || !ct(n.transitionsMap, this.prevState.transitionsMap)) && r({
2708
+ tracks: n.tracks,
2709
+ trackItemIds: n.trackItemIds,
2710
+ trackItemsMap: n.trackItemsMap,
2711
+ transitionIds: n.transitionIds,
2712
+ transitionsMap: n.transitionsMap
2713
+ });
2714
+ });
2715
+ }
2716
+ undo() {
2717
+ const r = this.undos.pop(), n = r == null ? void 0 : r.undos, o = r == null ? void 0 : r.type;
2718
+ if (!n || !o) return;
2719
+ kn();
2720
+ const {
2721
+ trackItemDetailsMap: a,
2722
+ trackItemIds: u,
2723
+ tracks: f,
2724
+ transitionIds: p,
2725
+ transitionsMap: T,
2726
+ trackItemsMap: _
2727
+ } = this.getState(), d = dt({
2728
+ trackItemDetailsMap: a,
2729
+ trackItemIds: u,
2730
+ tracks: f,
2731
+ transitionIds: p,
2732
+ transitionsMap: T,
2733
+ trackItemsMap: _
2734
+ }), E = [], l = [], g = [], m = [], y = [], I = [];
2735
+ n.forEach((P) => {
2736
+ let k;
2737
+ const W = P.path.slice(1);
2738
+ P.type === "CREATE" ? k = {
2739
+ path: W,
2740
+ op: "remove",
2741
+ value: P.value
2742
+ } : P.type === "CHANGE" ? k = {
2743
+ path: W,
2744
+ op: "replace",
2745
+ value: P.oldValue
2746
+ } : k = {
2747
+ path: W,
2748
+ op: "add",
2749
+ value: P.oldValue
2750
+ }, P.path.includes("trackItemIds") ? g.push(k) : P.path.includes("transitionIds") ? l.push(k) : P.path.includes("trackItemsMap") ? y.push(k) : P.path.includes("transitionsMap") ? m.push(k) : P.path.includes("tracks") ? E.push(k) : P.path.includes("trackItemDetailsMap") && I.push(k);
2751
+ });
2752
+ const v = this.applyPatch(
2753
+ d.tracks,
2754
+ E
2755
+ ), h = this.applyPatch(
2756
+ d.transitionIds,
2757
+ l
2758
+ ), S = this.applyPatch(
2759
+ d.trackItemIds,
2760
+ g
2761
+ ), A = this.applyPatch(
2762
+ d.transitionsMap,
2763
+ m
2764
+ ), L = this.applyPatch(
2765
+ d.trackItemsMap,
2766
+ y
2767
+ ), F = this.applyPatch(
2768
+ d.trackItemDetailsMap,
2769
+ I
2770
+ ), j = dt({
2771
+ tracks: v,
2772
+ transitionIds: h,
2773
+ trackItemIds: S,
2774
+ transitionsMap: A,
2775
+ trackItemsMap: L,
2776
+ trackItemDetailsMap: F
2777
+ }), nt = dt(this.getState()), yt = { ...nt, ...j };
2778
+ this.prevState = nt, this.redos.push({ redos: n, type: o }), this.stateSubject.next(yt), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
2779
+ }
2780
+ applyPatch(r, n) {
2781
+ return n.reverse().reduce((o, a) => Ji(o, (u) => {
2782
+ Zi(u, [a]);
2783
+ }), r);
2784
+ }
2785
+ redo() {
2786
+ const r = this.redos.pop(), n = r == null ? void 0 : r.redos, o = r == null ? void 0 : r.type;
2787
+ if (!n || !o) return;
2788
+ kn();
2789
+ const {
2790
+ trackItemDetailsMap: a,
2791
+ trackItemIds: u,
2792
+ tracks: f,
2793
+ transitionIds: p,
2794
+ transitionsMap: T,
2795
+ trackItemsMap: _
2796
+ } = this.getState(), d = dt({
2797
+ trackItemDetailsMap: a,
2798
+ trackItemIds: u,
2799
+ tracks: f,
2800
+ transitionIds: p,
2801
+ transitionsMap: T,
2802
+ trackItemsMap: _
2803
+ }), E = [], l = [], g = [], m = [], y = [], I = [];
2804
+ n.forEach((P) => {
2805
+ let k;
2806
+ const W = P.path.slice(1);
2807
+ P.type === "CREATE" ? k = {
2808
+ path: W,
2809
+ op: "add",
2810
+ value: P.value
2811
+ } : P.type === "CHANGE" ? k = {
2812
+ path: W,
2813
+ op: "replace",
2814
+ value: P.value
2815
+ } : k = {
2816
+ path: W,
2817
+ op: "remove",
2818
+ value: P.oldValue
2819
+ }, P.path.includes("trackItemIds") ? g.push(k) : P.path.includes("transitionIds") ? l.push(k) : P.path.includes("trackItemsMap") ? y.push(k) : P.path.includes("transitionsMap") ? m.push(k) : P.path.includes("trackItemDetailsMap") ? I.push(k) : E.push(k);
2820
+ });
2821
+ const v = this.applyPatch(
2822
+ d.tracks,
2823
+ E
2824
+ ), h = this.applyPatch(
2825
+ d.transitionIds,
2826
+ l
2827
+ ), S = this.applyPatch(
2828
+ d.trackItemIds,
2829
+ g
2830
+ ), A = this.applyPatch(
2831
+ d.transitionsMap,
2832
+ m
2833
+ ), L = this.applyPatch(
2834
+ d.trackItemsMap,
2835
+ y
2836
+ ), F = this.applyPatch(
2837
+ d.trackItemDetailsMap,
2838
+ I
2839
+ ), j = dt({
2840
+ tracks: v,
2841
+ transitionIds: h,
2842
+ trackItemIds: S,
2843
+ transitionsMap: A,
2844
+ trackItemsMap: L,
2845
+ trackItemDetailsMap: F
2846
+ }), nt = dt(this.getState()), yt = { ...nt, ...j };
2847
+ this.prevState = nt, this.undos.push({ undos: n, type: o }), this.stateSubject.next(yt), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
53
2848
  }
54
2849
  }
55
2850
  export {
56
- p as default
2851
+ ko as default
57
2852
  };