@designcombo/state 0.1.18 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/constants/design.d.ts +3 -0
- package/dist/index.es.js +1069 -1057
- package/dist/index.umd.js +3 -3
- package/dist/state.d.ts +3 -0
- package/dist/utils/load-item.d.ts +5 -4
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
var fi = Object.defineProperty;
|
2
2
|
var pi = (t, r, n) => r in t ? fi(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
|
3
|
-
var
|
4
|
-
import { subject as $t, filter as Kt, DESIGN_PREFIX as di, ADD_PREFIX as hi, LAYER_PREFIX as yi, HISTORY_PREFIX as mi, ACTIVE_PREFIX as bi, EDIT_PREFIX as gi, DESIGN_LOAD as _i,
|
3
|
+
var Ot = (t, r, n) => pi(t, typeof r != "symbol" ? r + "" : r, n);
|
4
|
+
import { subject as $t, filter as Kt, DESIGN_PREFIX as di, ADD_PREFIX as hi, LAYER_PREFIX as yi, HISTORY_PREFIX as mi, ACTIVE_PREFIX as bi, EDIT_PREFIX as gi, DESIGN_LOAD as _i, DESIGN_RESIZE as vi, HISTORY_UNDO as Ii, HISTORY_REDO as Si, LAYER_DELETE as wi, ADD_CAPTION as Ti, ADD_TEXT as ki, ADD_IMAGE as Ei, ADD_AUDIO as Ai, ADD_VIDEO as Oi, ACTIVE_SPLIT as xi, ACTIVE_CLONE as Mi, ACTIVE_PASTE as Pi, EDIT_OBJECT as Di } from "@designcombo/events";
|
5
5
|
var nn = function(t, r) {
|
6
6
|
return nn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
7
7
|
n.__proto__ = i;
|
8
8
|
} || function(n, i) {
|
9
|
-
for (var
|
9
|
+
for (var s in i) Object.prototype.hasOwnProperty.call(i, s) && (n[s] = i[s]);
|
10
10
|
}, nn(t, r);
|
11
11
|
};
|
12
12
|
function be(t, r) {
|
@@ -31,14 +31,14 @@ function an(t) {
|
|
31
31
|
function sn(t, r) {
|
32
32
|
var n = typeof Symbol == "function" && t[Symbol.iterator];
|
33
33
|
if (!n) return t;
|
34
|
-
var i = n.call(t),
|
34
|
+
var i = n.call(t), s, c = [], f;
|
35
35
|
try {
|
36
|
-
for (; (r === void 0 || r-- > 0) && !(
|
36
|
+
for (; (r === void 0 || r-- > 0) && !(s = i.next()).done; ) c.push(s.value);
|
37
37
|
} catch (d) {
|
38
38
|
f = { error: d };
|
39
39
|
} finally {
|
40
40
|
try {
|
41
|
-
|
41
|
+
s && !s.done && (n = i.return) && n.call(i);
|
42
42
|
} finally {
|
43
43
|
if (f) throw f.error;
|
44
44
|
}
|
@@ -46,11 +46,11 @@ function sn(t, r) {
|
|
46
46
|
return c;
|
47
47
|
}
|
48
48
|
function on(t, r, n) {
|
49
|
-
if (n || arguments.length === 2) for (var i = 0,
|
49
|
+
if (n || arguments.length === 2) for (var i = 0, s = r.length, c; i < s; i++)
|
50
50
|
(c || !(i in r)) && (c || (c = Array.prototype.slice.call(r, 0, i)), c[i] = r[i]);
|
51
51
|
return t.concat(c || Array.prototype.slice.call(r));
|
52
52
|
}
|
53
|
-
function
|
53
|
+
function mt(t) {
|
54
54
|
return typeof t == "function";
|
55
55
|
}
|
56
56
|
function Yn(t) {
|
@@ -62,8 +62,8 @@ function Yn(t) {
|
|
62
62
|
var Zr = Yn(function(t) {
|
63
63
|
return function(n) {
|
64
64
|
t(this), this.message = n ? n.length + ` errors occurred during unsubscription:
|
65
|
-
` + n.map(function(i,
|
66
|
-
return
|
65
|
+
` + n.map(function(i, s) {
|
66
|
+
return s + 1 + ") " + i.toString();
|
67
67
|
}).join(`
|
68
68
|
`) : "", this.name = "UnsubscriptionError", this.errors = n;
|
69
69
|
};
|
@@ -79,32 +79,32 @@ var tr = function() {
|
|
79
79
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
80
80
|
}
|
81
81
|
return t.prototype.unsubscribe = function() {
|
82
|
-
var r, n, i,
|
82
|
+
var r, n, i, s, c;
|
83
83
|
if (!this.closed) {
|
84
84
|
this.closed = !0;
|
85
85
|
var f = this._parentage;
|
86
86
|
if (f)
|
87
87
|
if (this._parentage = null, Array.isArray(f))
|
88
88
|
try {
|
89
|
-
for (var d = an(f),
|
90
|
-
var
|
91
|
-
|
89
|
+
for (var d = an(f), x = d.next(); !x.done; x = d.next()) {
|
90
|
+
var F = x.value;
|
91
|
+
F.remove(this);
|
92
92
|
}
|
93
93
|
} catch (l) {
|
94
94
|
r = { error: l };
|
95
95
|
} finally {
|
96
96
|
try {
|
97
|
-
|
97
|
+
x && !x.done && (n = d.return) && n.call(d);
|
98
98
|
} finally {
|
99
99
|
if (r) throw r.error;
|
100
100
|
}
|
101
101
|
}
|
102
102
|
else
|
103
103
|
f.remove(this);
|
104
|
-
var
|
105
|
-
if (
|
104
|
+
var k = this.initialTeardown;
|
105
|
+
if (mt(k))
|
106
106
|
try {
|
107
|
-
|
107
|
+
k();
|
108
108
|
} catch (l) {
|
109
109
|
c = l instanceof Zr ? l.errors : [l];
|
110
110
|
}
|
@@ -112,7 +112,7 @@ var tr = function() {
|
|
112
112
|
if (H) {
|
113
113
|
this._finalizers = null;
|
114
114
|
try {
|
115
|
-
for (var
|
115
|
+
for (var b = an(H), p = b.next(); !p.done; p = b.next()) {
|
116
116
|
var h = p.value;
|
117
117
|
try {
|
118
118
|
kn(h);
|
@@ -124,7 +124,7 @@ var tr = function() {
|
|
124
124
|
i = { error: l };
|
125
125
|
} finally {
|
126
126
|
try {
|
127
|
-
p && !p.done && (
|
127
|
+
p && !p.done && (s = b.return) && s.call(b);
|
128
128
|
} finally {
|
129
129
|
if (i) throw i.error;
|
130
130
|
}
|
@@ -164,10 +164,10 @@ var tr = function() {
|
|
164
164
|
}(), t;
|
165
165
|
}(), Vn = tr.EMPTY;
|
166
166
|
function Xn(t) {
|
167
|
-
return t instanceof tr || t && "closed" in t &&
|
167
|
+
return t instanceof tr || t && "closed" in t && mt(t.remove) && mt(t.add) && mt(t.unsubscribe);
|
168
168
|
}
|
169
169
|
function kn(t) {
|
170
|
-
|
170
|
+
mt(t) ? t() : t.unsubscribe();
|
171
171
|
}
|
172
172
|
var qn = {
|
173
173
|
onUnhandledError: null,
|
@@ -187,12 +187,12 @@ var qn = {
|
|
187
187
|
},
|
188
188
|
delegate: void 0
|
189
189
|
};
|
190
|
-
function
|
190
|
+
function Ci(t) {
|
191
191
|
Jn.setTimeout(function() {
|
192
192
|
throw t;
|
193
193
|
});
|
194
194
|
}
|
195
|
-
function
|
195
|
+
function En() {
|
196
196
|
}
|
197
197
|
function Xe(t) {
|
198
198
|
t();
|
@@ -201,10 +201,10 @@ var Zn = function(t) {
|
|
201
201
|
be(r, t);
|
202
202
|
function r(n) {
|
203
203
|
var i = t.call(this) || this;
|
204
|
-
return i.isStopped = !1, n ? (i.destination = n, Xn(n) && n.add(i)) : i.destination =
|
204
|
+
return i.isStopped = !1, n ? (i.destination = n, Xn(n) && n.add(i)) : i.destination = zi, i;
|
205
205
|
}
|
206
|
-
return r.create = function(n, i,
|
207
|
-
return new un(n, i,
|
206
|
+
return r.create = function(n, i, s) {
|
207
|
+
return new un(n, i, s);
|
208
208
|
}, r.prototype.next = function(n) {
|
209
209
|
this.isStopped || this._next(n);
|
210
210
|
}, r.prototype.error = function(n) {
|
@@ -228,11 +228,11 @@ var Zn = function(t) {
|
|
228
228
|
this.unsubscribe();
|
229
229
|
}
|
230
230
|
}, r;
|
231
|
-
}(tr),
|
231
|
+
}(tr), ji = Function.prototype.bind;
|
232
232
|
function Qr(t, r) {
|
233
|
-
return
|
233
|
+
return ji.call(t, r);
|
234
234
|
}
|
235
|
-
var
|
235
|
+
var Ri = function() {
|
236
236
|
function t(r) {
|
237
237
|
this.partialObserver = r;
|
238
238
|
}
|
@@ -265,13 +265,13 @@ var ji = function() {
|
|
265
265
|
}, t;
|
266
266
|
}(), un = function(t) {
|
267
267
|
be(r, t);
|
268
|
-
function r(n, i,
|
268
|
+
function r(n, i, s) {
|
269
269
|
var c = t.call(this) || this, f;
|
270
|
-
if (
|
270
|
+
if (mt(n) || !n)
|
271
271
|
f = {
|
272
272
|
next: n ?? void 0,
|
273
273
|
error: i ?? void 0,
|
274
|
-
complete:
|
274
|
+
complete: s ?? void 0
|
275
275
|
};
|
276
276
|
else {
|
277
277
|
var d;
|
@@ -283,35 +283,35 @@ var ji = function() {
|
|
283
283
|
complete: n.complete && Qr(n.complete, d)
|
284
284
|
}) : f = n;
|
285
285
|
}
|
286
|
-
return c.destination = new
|
286
|
+
return c.destination = new Ri(f), c;
|
287
287
|
}
|
288
288
|
return r;
|
289
289
|
}(Zn);
|
290
290
|
function Ye(t) {
|
291
|
-
|
291
|
+
Ci(t);
|
292
292
|
}
|
293
|
-
function
|
293
|
+
function Fi(t) {
|
294
294
|
throw t;
|
295
295
|
}
|
296
|
-
var
|
296
|
+
var zi = {
|
297
297
|
closed: !0,
|
298
|
-
next:
|
299
|
-
error:
|
300
|
-
complete:
|
301
|
-
},
|
298
|
+
next: En,
|
299
|
+
error: Fi,
|
300
|
+
complete: En
|
301
|
+
}, Ni = function() {
|
302
302
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
303
303
|
}();
|
304
|
-
function
|
304
|
+
function Hi(t) {
|
305
305
|
return t;
|
306
306
|
}
|
307
|
-
function
|
308
|
-
return t.length === 0 ?
|
309
|
-
return t.reduce(function(i,
|
310
|
-
return
|
307
|
+
function Ui(t) {
|
308
|
+
return t.length === 0 ? Hi : t.length === 1 ? t[0] : function(n) {
|
309
|
+
return t.reduce(function(i, s) {
|
310
|
+
return s(i);
|
311
311
|
}, n);
|
312
312
|
};
|
313
313
|
}
|
314
|
-
var
|
314
|
+
var An = function() {
|
315
315
|
function t(r) {
|
316
316
|
r && (this._subscribe = r);
|
317
317
|
}
|
@@ -319,10 +319,10 @@ var En = function() {
|
|
319
319
|
var n = new t();
|
320
320
|
return n.source = this, n.operator = r, n;
|
321
321
|
}, t.prototype.subscribe = function(r, n, i) {
|
322
|
-
var
|
322
|
+
var s = this, c = Gi(r) ? r : new un(r, n, i);
|
323
323
|
return Xe(function() {
|
324
|
-
var f =
|
325
|
-
c.add(d ? d.call(c,
|
324
|
+
var f = s, d = f.operator, x = f.source;
|
325
|
+
c.add(d ? d.call(c, x) : x ? s._subscribe(c) : s._trySubscribe(c));
|
326
326
|
}), c;
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
328
328
|
try {
|
@@ -332,37 +332,37 @@ var En = function() {
|
|
332
332
|
}
|
333
333
|
}, t.prototype.forEach = function(r, n) {
|
334
334
|
var i = this;
|
335
|
-
return n = On(n), new n(function(
|
335
|
+
return n = On(n), new n(function(s, c) {
|
336
336
|
var f = new un({
|
337
337
|
next: function(d) {
|
338
338
|
try {
|
339
339
|
r(d);
|
340
|
-
} catch (
|
341
|
-
c(
|
340
|
+
} catch (x) {
|
341
|
+
c(x), f.unsubscribe();
|
342
342
|
}
|
343
343
|
},
|
344
344
|
error: c,
|
345
|
-
complete:
|
345
|
+
complete: s
|
346
346
|
});
|
347
347
|
i.subscribe(f);
|
348
348
|
});
|
349
349
|
}, t.prototype._subscribe = function(r) {
|
350
350
|
var n;
|
351
351
|
return (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r);
|
352
|
-
}, t.prototype[
|
352
|
+
}, t.prototype[Ni] = function() {
|
353
353
|
return this;
|
354
354
|
}, t.prototype.pipe = function() {
|
355
355
|
for (var r = [], n = 0; n < arguments.length; n++)
|
356
356
|
r[n] = arguments[n];
|
357
|
-
return
|
357
|
+
return Ui(r)(this);
|
358
358
|
}, t.prototype.toPromise = function(r) {
|
359
359
|
var n = this;
|
360
|
-
return r = On(r), new r(function(i,
|
360
|
+
return r = On(r), new r(function(i, s) {
|
361
361
|
var c;
|
362
362
|
n.subscribe(function(f) {
|
363
363
|
return c = f;
|
364
364
|
}, function(f) {
|
365
|
-
return
|
365
|
+
return s(f);
|
366
366
|
}, function() {
|
367
367
|
return i(c);
|
368
368
|
});
|
@@ -375,13 +375,13 @@ function On(t) {
|
|
375
375
|
var r;
|
376
376
|
return (r = t ?? qn.Promise) !== null && r !== void 0 ? r : Promise;
|
377
377
|
}
|
378
|
-
function Ui(t) {
|
379
|
-
return t && yt(t.next) && yt(t.error) && yt(t.complete);
|
380
|
-
}
|
381
378
|
function Li(t) {
|
382
|
-
return t && t
|
379
|
+
return t && mt(t.next) && mt(t.error) && mt(t.complete);
|
383
380
|
}
|
384
|
-
|
381
|
+
function Gi(t) {
|
382
|
+
return t && t instanceof Zn || Li(t) && Xn(t);
|
383
|
+
}
|
384
|
+
var Wi = Yn(function(t) {
|
385
385
|
return function() {
|
386
386
|
t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
387
387
|
};
|
@@ -396,25 +396,25 @@ var Gi = Yn(function(t) {
|
|
396
396
|
return i.operator = n, i;
|
397
397
|
}, r.prototype._throwIfClosed = function() {
|
398
398
|
if (this.closed)
|
399
|
-
throw new
|
399
|
+
throw new Wi();
|
400
400
|
}, r.prototype.next = function(n) {
|
401
401
|
var i = this;
|
402
402
|
Xe(function() {
|
403
|
-
var
|
403
|
+
var s, c;
|
404
404
|
if (i._throwIfClosed(), !i.isStopped) {
|
405
405
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
406
406
|
try {
|
407
407
|
for (var f = an(i.currentObservers), d = f.next(); !d.done; d = f.next()) {
|
408
|
-
var
|
409
|
-
|
408
|
+
var x = d.value;
|
409
|
+
x.next(n);
|
410
410
|
}
|
411
|
-
} catch (
|
412
|
-
|
411
|
+
} catch (F) {
|
412
|
+
s = { error: F };
|
413
413
|
} finally {
|
414
414
|
try {
|
415
415
|
d && !d.done && (c = f.return) && c.call(f);
|
416
416
|
} finally {
|
417
|
-
if (
|
417
|
+
if (s) throw s.error;
|
418
418
|
}
|
419
419
|
}
|
420
420
|
}
|
@@ -424,8 +424,8 @@ var Gi = Yn(function(t) {
|
|
424
424
|
Xe(function() {
|
425
425
|
if (i._throwIfClosed(), !i.isStopped) {
|
426
426
|
i.hasError = i.isStopped = !0, i.thrownError = n;
|
427
|
-
for (var
|
428
|
-
|
427
|
+
for (var s = i.observers; s.length; )
|
428
|
+
s.shift().error(n);
|
429
429
|
}
|
430
430
|
});
|
431
431
|
}, r.prototype.complete = function() {
|
@@ -451,37 +451,37 @@ var Gi = Yn(function(t) {
|
|
451
451
|
}, r.prototype._subscribe = function(n) {
|
452
452
|
return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
|
453
453
|
}, r.prototype._innerSubscribe = function(n) {
|
454
|
-
var i = this,
|
454
|
+
var i = this, s = this, c = s.hasError, f = s.isStopped, d = s.observers;
|
455
455
|
return c || f ? Vn : (this.currentObservers = null, d.push(n), new tr(function() {
|
456
456
|
i.currentObservers = null, cn(d, n);
|
457
457
|
}));
|
458
458
|
}, r.prototype._checkFinalizedStatuses = function(n) {
|
459
|
-
var i = this,
|
460
|
-
|
459
|
+
var i = this, s = i.hasError, c = i.thrownError, f = i.isStopped;
|
460
|
+
s ? n.error(c) : f && n.complete();
|
461
461
|
}, r.prototype.asObservable = function() {
|
462
|
-
var n = new
|
462
|
+
var n = new An();
|
463
463
|
return n.source = this, n;
|
464
464
|
}, r.create = function(n, i) {
|
465
465
|
return new xn(n, i);
|
466
466
|
}, r;
|
467
|
-
}(
|
467
|
+
}(An), xn = function(t) {
|
468
468
|
be(r, t);
|
469
469
|
function r(n, i) {
|
470
|
-
var
|
471
|
-
return
|
470
|
+
var s = t.call(this) || this;
|
471
|
+
return s.destination = n, s.source = i, s;
|
472
472
|
}
|
473
473
|
return r.prototype.next = function(n) {
|
474
|
-
var i,
|
475
|
-
(
|
474
|
+
var i, s;
|
475
|
+
(s = (i = this.destination) === null || i === void 0 ? void 0 : i.next) === null || s === void 0 || s.call(i, n);
|
476
476
|
}, r.prototype.error = function(n) {
|
477
|
-
var i,
|
478
|
-
(
|
477
|
+
var i, s;
|
478
|
+
(s = (i = this.destination) === null || i === void 0 ? void 0 : i.error) === null || s === void 0 || s.call(i, n);
|
479
479
|
}, r.prototype.complete = function() {
|
480
480
|
var n, i;
|
481
481
|
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.complete) === null || i === void 0 || i.call(n);
|
482
482
|
}, r.prototype._subscribe = function(n) {
|
483
|
-
var i,
|
484
|
-
return (
|
483
|
+
var i, s;
|
484
|
+
return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && s !== void 0 ? s : Vn;
|
485
485
|
}, r;
|
486
486
|
}(Qn), Mn = function(t) {
|
487
487
|
be(r, t);
|
@@ -499,49 +499,49 @@ var Gi = Yn(function(t) {
|
|
499
499
|
var i = t.prototype._subscribe.call(this, n);
|
500
500
|
return !i.closed && n.next(this._value), i;
|
501
501
|
}, r.prototype.getValue = function() {
|
502
|
-
var n = this, i = n.hasError,
|
502
|
+
var n = this, i = n.hasError, s = n.thrownError, c = n._value;
|
503
503
|
if (i)
|
504
|
-
throw
|
504
|
+
throw s;
|
505
505
|
return this._throwIfClosed(), c;
|
506
506
|
}, r.prototype.next = function(n) {
|
507
507
|
t.prototype.next.call(this, this._value = n);
|
508
508
|
}, r;
|
509
|
-
}(Qn),
|
509
|
+
}(Qn), nt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
510
510
|
function bn(t) {
|
511
511
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
512
512
|
}
|
513
513
|
var qe = { exports: {} };
|
514
514
|
qe.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__",
|
517
|
-
N[
|
518
|
-
var we = typeof
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, f = 9007199254740991, d = "[object Arguments]", x = "[object Array]", F = "[object AsyncFunction]", k = "[object Boolean]", H = "[object Date]", b = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", l = "[object Map]", g = "[object Number]", v = "[object Null]", _ = "[object Object]", y = "[object Promise]", m = "[object Proxy]", j = "[object RegExp]", E = "[object Set]", I = "[object String]", P = "[object Symbol]", S = "[object Undefined]", T = "[object WeakMap]", A = "[object ArrayBuffer]", M = "[object DataView]", $ = "[object Float32Array]", bt = "[object Float64Array]", Ie = "[object Int8Array]", ir = "[object Int16Array]", ar = "[object Int32Array]", sr = "[object Uint8Array]", or = "[object Uint8ClampedArray]", z = "[object Uint16Array]", cr = "[object Uint32Array]", ur = /[\\^$.*+?()[\]{}|]/g, it = /^\[object .+?Constructor\]$/, Se = /^(?:0|[1-9]\d*)$/, N = {};
|
517
|
+
N[$] = N[bt] = N[Ie] = N[ir] = N[ar] = N[sr] = N[or] = N[z] = N[cr] = !0, N[d] = N[x] = N[A] = N[k] = N[M] = N[H] = N[b] = N[p] = N[l] = N[g] = N[_] = N[j] = N[E] = N[I] = N[T] = !1;
|
518
|
+
var we = typeof nt == "object" && nt && nt.Object === Object && nt, lr = typeof self == "object" && self && self.Object === Object && self, at = we || lr || Function("return this")(), Te = r && !r.nodeType && r, ke = Te && !0 && t && !t.nodeType && t, Yt = ke && ke.exports === Te, Vt = Yt && we.process, Ee = function() {
|
519
519
|
try {
|
520
520
|
return Vt && Vt.binding && Vt.binding("util");
|
521
521
|
} catch {
|
522
522
|
}
|
523
|
-
}(), Xt =
|
524
|
-
function
|
525
|
-
for (var
|
526
|
-
var C = e[
|
527
|
-
a(C,
|
523
|
+
}(), Xt = Ee && Ee.isTypedArray;
|
524
|
+
function Ae(e, a) {
|
525
|
+
for (var o = -1, u = e == null ? 0 : e.length, O = 0, w = []; ++o < u; ) {
|
526
|
+
var C = e[o];
|
527
|
+
a(C, o, e) && (w[O++] = C);
|
528
528
|
}
|
529
|
-
return
|
529
|
+
return w;
|
530
530
|
}
|
531
531
|
function qt(e, a) {
|
532
|
-
for (var
|
533
|
-
e[O +
|
532
|
+
for (var o = -1, u = a.length, O = e.length; ++o < u; )
|
533
|
+
e[O + o] = a[o];
|
534
534
|
return e;
|
535
535
|
}
|
536
536
|
function Oe(e, a) {
|
537
|
-
for (var
|
538
|
-
if (a(e[
|
537
|
+
for (var o = -1, u = e == null ? 0 : e.length; ++o < u; )
|
538
|
+
if (a(e[o], o, e))
|
539
539
|
return !0;
|
540
540
|
return !1;
|
541
541
|
}
|
542
542
|
function fr(e, a) {
|
543
|
-
for (var
|
544
|
-
u[
|
543
|
+
for (var o = -1, u = Array(e); ++o < e; )
|
544
|
+
u[o] = a(o);
|
545
545
|
return u;
|
546
546
|
}
|
547
547
|
function pr(e) {
|
@@ -556,37 +556,37 @@ qe.exports;
|
|
556
556
|
return e == null ? void 0 : e[a];
|
557
557
|
}
|
558
558
|
function xe(e) {
|
559
|
-
var a = -1,
|
559
|
+
var a = -1, o = Array(e.size);
|
560
560
|
return e.forEach(function(u, O) {
|
561
|
-
|
562
|
-
}),
|
561
|
+
o[++a] = [O, u];
|
562
|
+
}), o;
|
563
563
|
}
|
564
564
|
function Me(e, a) {
|
565
|
-
return function(
|
566
|
-
return e(a(
|
565
|
+
return function(o) {
|
566
|
+
return e(a(o));
|
567
567
|
};
|
568
568
|
}
|
569
|
-
function
|
570
|
-
var a = -1,
|
569
|
+
function ct(e) {
|
570
|
+
var a = -1, o = Array(e.size);
|
571
571
|
return e.forEach(function(u) {
|
572
|
-
|
573
|
-
}),
|
572
|
+
o[++a] = u;
|
573
|
+
}), o;
|
574
574
|
}
|
575
|
-
var Rt = Array.prototype, dr = Function.prototype,
|
575
|
+
var Rt = Array.prototype, dr = Function.prototype, It = Object.prototype, Ft = at["__core-js_shared__"], Zt = dr.toString, et = It.hasOwnProperty, Pe = function() {
|
576
576
|
var e = /[^.]+$/.exec(Ft && Ft.keys && Ft.keys.IE_PROTO || "");
|
577
577
|
return e ? "Symbol(src)_1." + e : "";
|
578
|
-
}(), De =
|
579
|
-
"^" + Zt.call(
|
580
|
-
), Qt = Yt ?
|
578
|
+
}(), De = It.toString, hr = RegExp(
|
579
|
+
"^" + Zt.call(et).replace(ur, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
580
|
+
), Qt = Yt ? at.Buffer : void 0, zt = at.Symbol, Ce = at.Uint8Array, Nt = It.propertyIsEnumerable, St = Rt.splice, st = zt ? zt.toStringTag : void 0, Ht = Object.getOwnPropertySymbols, te = Qt ? Qt.isBuffer : void 0, wt = Me(Object.keys, Object), ee = dt(at, "DataView"), Tt = dt(at, "Map"), re = dt(at, "Promise"), ne = dt(at, "Set"), ie = dt(at, "WeakMap"), gt = dt(Object, "create"), je = X(ee), pt = X(Tt), yr = X(re), mr = X(ne), br = X(ie), Re = zt ? zt.prototype : void 0, ae = Re ? Re.valueOf : void 0;
|
581
581
|
function W(e) {
|
582
|
-
var a = -1,
|
583
|
-
for (this.clear(); ++a <
|
582
|
+
var a = -1, o = e == null ? 0 : e.length;
|
583
|
+
for (this.clear(); ++a < o; ) {
|
584
584
|
var u = e[a];
|
585
585
|
this.set(u[0], u[1]);
|
586
586
|
}
|
587
587
|
}
|
588
588
|
function gr() {
|
589
|
-
this.__data__ =
|
589
|
+
this.__data__ = gt ? gt(null) : {}, this.size = 0;
|
590
590
|
}
|
591
591
|
function _r(e) {
|
592
592
|
var a = this.has(e) && delete this.__data__[e];
|
@@ -594,24 +594,24 @@ qe.exports;
|
|
594
594
|
}
|
595
595
|
function vr(e) {
|
596
596
|
var a = this.__data__;
|
597
|
-
if (
|
598
|
-
var
|
599
|
-
return
|
597
|
+
if (gt) {
|
598
|
+
var o = a[e];
|
599
|
+
return o === i ? void 0 : o;
|
600
600
|
}
|
601
|
-
return
|
601
|
+
return et.call(a, e) ? a[e] : void 0;
|
602
602
|
}
|
603
603
|
function Ir(e) {
|
604
604
|
var a = this.__data__;
|
605
|
-
return
|
605
|
+
return gt ? a[e] !== void 0 : et.call(a, e);
|
606
606
|
}
|
607
607
|
function Sr(e, a) {
|
608
|
-
var
|
609
|
-
return this.size += this.has(e) ? 0 : 1,
|
608
|
+
var o = this.__data__;
|
609
|
+
return this.size += this.has(e) ? 0 : 1, o[e] = gt && a === void 0 ? i : a, this;
|
610
610
|
}
|
611
611
|
W.prototype.clear = gr, W.prototype.delete = _r, W.prototype.get = vr, W.prototype.has = Ir, W.prototype.set = Sr;
|
612
|
-
function
|
613
|
-
var a = -1,
|
614
|
-
for (this.clear(); ++a <
|
612
|
+
function K(e) {
|
613
|
+
var a = -1, o = e == null ? 0 : e.length;
|
614
|
+
for (this.clear(); ++a < o; ) {
|
615
615
|
var u = e[a];
|
616
616
|
this.set(u[0], u[1]);
|
617
617
|
}
|
@@ -620,27 +620,27 @@ qe.exports;
|
|
620
620
|
this.__data__ = [], this.size = 0;
|
621
621
|
}
|
622
622
|
function Tr(e) {
|
623
|
-
var a = this.__data__,
|
624
|
-
if (
|
623
|
+
var a = this.__data__, o = Gt(a, e);
|
624
|
+
if (o < 0)
|
625
625
|
return !1;
|
626
626
|
var u = a.length - 1;
|
627
|
-
return
|
627
|
+
return o == u ? a.pop() : St.call(a, o, 1), --this.size, !0;
|
628
628
|
}
|
629
629
|
function kr(e) {
|
630
|
-
var a = this.__data__,
|
631
|
-
return
|
630
|
+
var a = this.__data__, o = Gt(a, e);
|
631
|
+
return o < 0 ? void 0 : a[o][1];
|
632
632
|
}
|
633
|
-
function
|
633
|
+
function Er(e) {
|
634
634
|
return Gt(this.__data__, e) > -1;
|
635
635
|
}
|
636
|
-
function
|
637
|
-
var
|
638
|
-
return u < 0 ? (++this.size,
|
636
|
+
function Ar(e, a) {
|
637
|
+
var o = this.__data__, u = Gt(o, e);
|
638
|
+
return u < 0 ? (++this.size, o.push([e, a])) : o[u][1] = a, this;
|
639
639
|
}
|
640
|
-
|
641
|
-
function
|
642
|
-
var a = -1,
|
643
|
-
for (this.clear(); ++a <
|
640
|
+
K.prototype.clear = wr, K.prototype.delete = Tr, K.prototype.get = kr, K.prototype.has = Er, K.prototype.set = Ar;
|
641
|
+
function q(e) {
|
642
|
+
var a = -1, o = e == null ? 0 : e.length;
|
643
|
+
for (this.clear(); ++a < o; ) {
|
644
644
|
var u = e[a];
|
645
645
|
this.set(u[0], u[1]);
|
646
646
|
}
|
@@ -648,28 +648,28 @@ qe.exports;
|
|
648
648
|
function Or() {
|
649
649
|
this.size = 0, this.__data__ = {
|
650
650
|
hash: new W(),
|
651
|
-
map: new (
|
651
|
+
map: new (Tt || K)(),
|
652
652
|
string: new W()
|
653
653
|
};
|
654
654
|
}
|
655
655
|
function xr(e) {
|
656
|
-
var a =
|
656
|
+
var a = ot(this, e).delete(e);
|
657
657
|
return this.size -= a ? 1 : 0, a;
|
658
658
|
}
|
659
659
|
function Mr(e) {
|
660
|
-
return
|
660
|
+
return ot(this, e).get(e);
|
661
661
|
}
|
662
662
|
function Pr(e) {
|
663
|
-
return
|
663
|
+
return ot(this, e).has(e);
|
664
664
|
}
|
665
665
|
function Dr(e, a) {
|
666
|
-
var
|
667
|
-
return
|
666
|
+
var o = ot(this, e), u = o.size;
|
667
|
+
return o.set(e, a), this.size += o.size == u ? 0 : 1, this;
|
668
668
|
}
|
669
|
-
|
669
|
+
q.prototype.clear = Or, q.prototype.delete = xr, q.prototype.get = Mr, q.prototype.has = Pr, q.prototype.set = Dr;
|
670
670
|
function Ut(e) {
|
671
|
-
var a = -1,
|
672
|
-
for (this.__data__ = new
|
671
|
+
var a = -1, o = e == null ? 0 : e.length;
|
672
|
+
for (this.__data__ = new q(); ++a < o; )
|
673
673
|
this.add(e[a]);
|
674
674
|
}
|
675
675
|
function Fe(e) {
|
@@ -679,16 +679,16 @@ qe.exports;
|
|
679
679
|
return this.__data__.has(e);
|
680
680
|
}
|
681
681
|
Ut.prototype.add = Ut.prototype.push = Fe, Ut.prototype.has = Lt;
|
682
|
-
function
|
683
|
-
var a = this.__data__ = new
|
682
|
+
function ut(e) {
|
683
|
+
var a = this.__data__ = new K(e);
|
684
684
|
this.size = a.size;
|
685
685
|
}
|
686
686
|
function se() {
|
687
|
-
this.__data__ = new
|
687
|
+
this.__data__ = new K(), this.size = 0;
|
688
688
|
}
|
689
689
|
function Cr(e) {
|
690
|
-
var a = this.__data__,
|
691
|
-
return this.size = a.size,
|
690
|
+
var a = this.__data__, o = a.delete(e);
|
691
|
+
return this.size = a.size, o;
|
692
692
|
}
|
693
693
|
function jr(e) {
|
694
694
|
return this.__data__.get(e);
|
@@ -697,221 +697,221 @@ qe.exports;
|
|
697
697
|
return this.__data__.has(e);
|
698
698
|
}
|
699
699
|
function Fr(e, a) {
|
700
|
-
var
|
701
|
-
if (
|
702
|
-
var u =
|
703
|
-
if (!
|
704
|
-
return u.push([e, a]), this.size = ++
|
705
|
-
|
700
|
+
var o = this.__data__;
|
701
|
+
if (o instanceof K) {
|
702
|
+
var u = o.__data__;
|
703
|
+
if (!Tt || u.length < n - 1)
|
704
|
+
return u.push([e, a]), this.size = ++o.size, this;
|
705
|
+
o = this.__data__ = new q(u);
|
706
706
|
}
|
707
|
-
return
|
707
|
+
return o.set(e, a), this.size = o.size, this;
|
708
708
|
}
|
709
|
-
|
709
|
+
ut.prototype.clear = se, ut.prototype.delete = Cr, ut.prototype.get = jr, ut.prototype.has = Rr, ut.prototype.set = Fr;
|
710
710
|
function zr(e, a) {
|
711
|
-
var
|
712
|
-
for (var
|
713
|
-
|
714
|
-
(
|
715
|
-
O && (
|
716
|
-
|
717
|
-
$r(
|
711
|
+
var o = Wt(e), u = !o && Le(e), O = !o && !u && Bt(e), w = !o && !u && !O && Be(e), C = o || u || O || w, D = C ? fr(e.length, String) : [], U = D.length;
|
712
|
+
for (var R in e)
|
713
|
+
et.call(e, R) && !(C && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
|
+
(R == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
|
+
O && (R == "offset" || R == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
|
+
w && (R == "buffer" || R == "byteLength" || R == "byteOffset") || // Skip index properties.
|
717
|
+
$r(R, U))) && D.push(R);
|
718
718
|
return D;
|
719
719
|
}
|
720
720
|
function Gt(e, a) {
|
721
|
-
for (var
|
722
|
-
if (Ue(e[
|
723
|
-
return
|
721
|
+
for (var o = e.length; o--; )
|
722
|
+
if (Ue(e[o][0], a))
|
723
|
+
return o;
|
724
724
|
return -1;
|
725
725
|
}
|
726
|
-
function oe(e, a,
|
726
|
+
function oe(e, a, o) {
|
727
727
|
var u = a(e);
|
728
|
-
return Wt(e) ? u : qt(u,
|
728
|
+
return Wt(e) ? u : qt(u, o(e));
|
729
729
|
}
|
730
|
-
function
|
731
|
-
return e == null ? e === void 0 ? S : v :
|
730
|
+
function kt(e) {
|
731
|
+
return e == null ? e === void 0 ? S : v : st && st in Object(e) ? ht(e) : He(e);
|
732
732
|
}
|
733
733
|
function ze(e) {
|
734
|
-
return
|
734
|
+
return ft(e) && kt(e) == d;
|
735
735
|
}
|
736
|
-
function Ne(e, a,
|
737
|
-
return e === a ? !0 : e == null || a == null || !
|
736
|
+
function Ne(e, a, o, u, O) {
|
737
|
+
return e === a ? !0 : e == null || a == null || !ft(e) && !ft(a) ? e !== e && a !== a : Nr(e, a, o, u, Ne, O);
|
738
738
|
}
|
739
|
-
function Nr(e, a,
|
740
|
-
var C = Wt(e), D = Wt(a), U = C ?
|
741
|
-
U = U == d ?
|
742
|
-
var
|
739
|
+
function Nr(e, a, o, u, O, w) {
|
740
|
+
var C = Wt(e), D = Wt(a), U = C ? x : lt(e), R = D ? x : lt(a);
|
741
|
+
U = U == d ? _ : U, R = R == d ? _ : R;
|
742
|
+
var Y = U == _, J = R == _, L = U == R;
|
743
743
|
if (L && Bt(e)) {
|
744
744
|
if (!Bt(a))
|
745
745
|
return !1;
|
746
|
-
C = !0,
|
746
|
+
C = !0, Y = !1;
|
747
747
|
}
|
748
|
-
if (L && !
|
749
|
-
return
|
750
|
-
if (!(
|
751
|
-
var
|
752
|
-
if (
|
753
|
-
var
|
754
|
-
return
|
748
|
+
if (L && !Y)
|
749
|
+
return w || (w = new ut()), C || Be(e) ? ce(e, a, o, u, O, w) : Gr(e, a, U, o, u, O, w);
|
750
|
+
if (!(o & s)) {
|
751
|
+
var V = Y && et.call(e, "__wrapped__"), B = J && et.call(a, "__wrapped__");
|
752
|
+
if (V || B) {
|
753
|
+
var _t = V ? e.value() : e, yt = B ? a.value() : a;
|
754
|
+
return w || (w = new ut()), O(_t, yt, o, u, w);
|
755
755
|
}
|
756
756
|
}
|
757
|
-
return L ? (
|
757
|
+
return L ? (w || (w = new ut()), Wr(e, a, o, u, O, w)) : !1;
|
758
758
|
}
|
759
759
|
function Hr(e) {
|
760
760
|
if (!We(e) || Yr(e))
|
761
761
|
return !1;
|
762
|
-
var a = Ge(e) ? hr :
|
763
|
-
return a.test(
|
762
|
+
var a = Ge(e) ? hr : it;
|
763
|
+
return a.test(X(e));
|
764
764
|
}
|
765
765
|
function Ur(e) {
|
766
|
-
return
|
766
|
+
return ft(e) && le(e.length) && !!N[kt(e)];
|
767
767
|
}
|
768
768
|
function Lr(e) {
|
769
769
|
if (!Vr(e))
|
770
|
-
return
|
770
|
+
return wt(e);
|
771
771
|
var a = [];
|
772
|
-
for (var
|
773
|
-
|
772
|
+
for (var o in Object(e))
|
773
|
+
et.call(e, o) && o != "constructor" && a.push(o);
|
774
774
|
return a;
|
775
775
|
}
|
776
|
-
function ce(e, a,
|
777
|
-
var C =
|
776
|
+
function ce(e, a, o, u, O, w) {
|
777
|
+
var C = o & s, D = e.length, U = a.length;
|
778
778
|
if (D != U && !(C && U > D))
|
779
779
|
return !1;
|
780
|
-
var
|
781
|
-
if (
|
782
|
-
return
|
783
|
-
var
|
784
|
-
for (
|
785
|
-
var
|
780
|
+
var R = w.get(e);
|
781
|
+
if (R && w.get(a))
|
782
|
+
return R == a;
|
783
|
+
var Y = -1, J = !0, L = o & c ? new Ut() : void 0;
|
784
|
+
for (w.set(e, a), w.set(a, e); ++Y < D; ) {
|
785
|
+
var V = e[Y], B = a[Y];
|
786
786
|
if (u)
|
787
|
-
var
|
788
|
-
if (
|
789
|
-
if (
|
787
|
+
var _t = C ? u(B, V, Y, a, e, w) : u(V, B, Y, e, a, w);
|
788
|
+
if (_t !== void 0) {
|
789
|
+
if (_t)
|
790
790
|
continue;
|
791
|
-
|
791
|
+
J = !1;
|
792
792
|
break;
|
793
793
|
}
|
794
794
|
if (L) {
|
795
|
-
if (!Oe(a, function(
|
796
|
-
if (!jt(L,
|
797
|
-
return L.push(
|
795
|
+
if (!Oe(a, function(yt, At) {
|
796
|
+
if (!jt(L, At) && (V === yt || O(V, yt, o, u, w)))
|
797
|
+
return L.push(At);
|
798
798
|
})) {
|
799
|
-
|
799
|
+
J = !1;
|
800
800
|
break;
|
801
801
|
}
|
802
|
-
} else if (!(
|
803
|
-
|
802
|
+
} else if (!(V === B || O(V, B, o, u, w))) {
|
803
|
+
J = !1;
|
804
804
|
break;
|
805
805
|
}
|
806
806
|
}
|
807
|
-
return
|
807
|
+
return w.delete(e), w.delete(a), J;
|
808
808
|
}
|
809
|
-
function Gr(e, a,
|
810
|
-
switch (
|
811
|
-
case
|
809
|
+
function Gr(e, a, o, u, O, w, C) {
|
810
|
+
switch (o) {
|
811
|
+
case M:
|
812
812
|
if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
|
813
813
|
return !1;
|
814
814
|
e = e.buffer, a = a.buffer;
|
815
|
-
case
|
816
|
-
return !(e.byteLength != a.byteLength || !
|
817
|
-
case
|
815
|
+
case A:
|
816
|
+
return !(e.byteLength != a.byteLength || !w(new Ce(e), new Ce(a)));
|
817
|
+
case k:
|
818
818
|
case H:
|
819
|
-
case
|
819
|
+
case g:
|
820
820
|
return Ue(+e, +a);
|
821
|
-
case
|
821
|
+
case b:
|
822
822
|
return e.name == a.name && e.message == a.message;
|
823
|
-
case
|
824
|
-
case
|
823
|
+
case j:
|
824
|
+
case I:
|
825
825
|
return e == a + "";
|
826
826
|
case l:
|
827
827
|
var D = xe;
|
828
|
-
case
|
829
|
-
var U = u &
|
830
|
-
if (D || (D =
|
828
|
+
case E:
|
829
|
+
var U = u & s;
|
830
|
+
if (D || (D = ct), e.size != a.size && !U)
|
831
831
|
return !1;
|
832
|
-
var
|
833
|
-
if (
|
834
|
-
return
|
832
|
+
var R = C.get(e);
|
833
|
+
if (R)
|
834
|
+
return R == a;
|
835
835
|
u |= c, C.set(e, a);
|
836
|
-
var
|
837
|
-
return C.delete(e),
|
838
|
-
case
|
836
|
+
var Y = ce(D(e), D(a), u, O, w, C);
|
837
|
+
return C.delete(e), Y;
|
838
|
+
case P:
|
839
839
|
if (ae)
|
840
840
|
return ae.call(e) == ae.call(a);
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function Wr(e, a,
|
845
|
-
var C =
|
846
|
-
if (U !=
|
844
|
+
function Wr(e, a, o, u, O, w) {
|
845
|
+
var C = o & s, D = Et(e), U = D.length, R = Et(a), Y = R.length;
|
846
|
+
if (U != Y && !C)
|
847
847
|
return !1;
|
848
|
-
for (var
|
849
|
-
var L = D[
|
850
|
-
if (!(C ? L in a :
|
848
|
+
for (var J = U; J--; ) {
|
849
|
+
var L = D[J];
|
850
|
+
if (!(C ? L in a : et.call(a, L)))
|
851
851
|
return !1;
|
852
852
|
}
|
853
|
-
var
|
854
|
-
if (
|
855
|
-
return
|
853
|
+
var V = w.get(e);
|
854
|
+
if (V && w.get(a))
|
855
|
+
return V == a;
|
856
856
|
var B = !0;
|
857
|
-
|
858
|
-
for (var
|
859
|
-
L = D[
|
860
|
-
var
|
857
|
+
w.set(e, a), w.set(a, e);
|
858
|
+
for (var _t = C; ++J < U; ) {
|
859
|
+
L = D[J];
|
860
|
+
var yt = e[L], At = a[L];
|
861
861
|
if (u)
|
862
|
-
var Tn = C ? u(
|
863
|
-
if (!(Tn === void 0 ?
|
862
|
+
var Tn = C ? u(At, yt, L, a, e, w) : u(yt, At, L, e, a, w);
|
863
|
+
if (!(Tn === void 0 ? yt === At || O(yt, At, o, u, w) : Tn)) {
|
864
864
|
B = !1;
|
865
865
|
break;
|
866
866
|
}
|
867
|
-
|
867
|
+
_t || (_t = L == "constructor");
|
868
868
|
}
|
869
|
-
if (B && !
|
869
|
+
if (B && !_t) {
|
870
870
|
var $e = e.constructor, Ke = a.constructor;
|
871
871
|
$e != Ke && "constructor" in e && "constructor" in a && !(typeof $e == "function" && $e instanceof $e && typeof Ke == "function" && Ke instanceof Ke) && (B = !1);
|
872
872
|
}
|
873
|
-
return
|
873
|
+
return w.delete(e), w.delete(a), B;
|
874
874
|
}
|
875
|
-
function
|
875
|
+
function Et(e) {
|
876
876
|
return oe(e, fe, Br);
|
877
877
|
}
|
878
|
-
function
|
879
|
-
var
|
880
|
-
return Kr(a) ?
|
878
|
+
function ot(e, a) {
|
879
|
+
var o = e.__data__;
|
880
|
+
return Kr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
881
881
|
}
|
882
|
-
function
|
883
|
-
var
|
884
|
-
return Hr(
|
882
|
+
function dt(e, a) {
|
883
|
+
var o = Jt(e, a);
|
884
|
+
return Hr(o) ? o : void 0;
|
885
885
|
}
|
886
|
-
function
|
887
|
-
var a =
|
886
|
+
function ht(e) {
|
887
|
+
var a = et.call(e, st), o = e[st];
|
888
888
|
try {
|
889
|
-
e[
|
889
|
+
e[st] = void 0;
|
890
890
|
var u = !0;
|
891
891
|
} catch {
|
892
892
|
}
|
893
893
|
var O = De.call(e);
|
894
|
-
return u && (a ? e[
|
894
|
+
return u && (a ? e[st] = o : delete e[st]), O;
|
895
895
|
}
|
896
896
|
var Br = Ht ? function(e) {
|
897
|
-
return e == null ? [] : (e = Object(e),
|
897
|
+
return e == null ? [] : (e = Object(e), Ae(Ht(e), function(a) {
|
898
898
|
return Nt.call(e, a);
|
899
899
|
}));
|
900
|
-
} : qr,
|
901
|
-
(ee &&
|
902
|
-
var a =
|
900
|
+
} : qr, lt = kt;
|
901
|
+
(ee && lt(new ee(new ArrayBuffer(1))) != M || Tt && lt(new Tt()) != l || re && lt(re.resolve()) != y || ne && lt(new ne()) != E || ie && lt(new ie()) != T) && (lt = function(e) {
|
902
|
+
var a = kt(e), o = a == _ ? e.constructor : void 0, u = o ? X(o) : "";
|
903
903
|
if (u)
|
904
904
|
switch (u) {
|
905
905
|
case je:
|
906
|
-
return
|
907
|
-
case
|
906
|
+
return M;
|
907
|
+
case pt:
|
908
908
|
return l;
|
909
909
|
case yr:
|
910
|
-
return
|
910
|
+
return y;
|
911
911
|
case mr:
|
912
|
-
return w;
|
913
|
-
case br:
|
914
912
|
return E;
|
913
|
+
case br:
|
914
|
+
return T;
|
915
915
|
}
|
916
916
|
return a;
|
917
917
|
});
|
@@ -926,13 +926,13 @@ qe.exports;
|
|
926
926
|
return !!Pe && Pe in e;
|
927
927
|
}
|
928
928
|
function Vr(e) {
|
929
|
-
var a = e && e.constructor,
|
930
|
-
return e ===
|
929
|
+
var a = e && e.constructor, o = typeof a == "function" && a.prototype || It;
|
930
|
+
return e === o;
|
931
931
|
}
|
932
932
|
function He(e) {
|
933
933
|
return De.call(e);
|
934
934
|
}
|
935
|
-
function
|
935
|
+
function X(e) {
|
936
936
|
if (e != null) {
|
937
937
|
try {
|
938
938
|
return Zt.call(e);
|
@@ -951,7 +951,7 @@ qe.exports;
|
|
951
951
|
var Le = ze(/* @__PURE__ */ function() {
|
952
952
|
return arguments;
|
953
953
|
}()) ? ze : function(e) {
|
954
|
-
return
|
954
|
+
return ft(e) && et.call(e, "callee") && !Nt.call(e, "callee");
|
955
955
|
}, Wt = Array.isArray;
|
956
956
|
function ue(e) {
|
957
957
|
return e != null && le(e.length) && !Ge(e);
|
@@ -963,8 +963,8 @@ qe.exports;
|
|
963
963
|
function Ge(e) {
|
964
964
|
if (!We(e))
|
965
965
|
return !1;
|
966
|
-
var a =
|
967
|
-
return a == p || a == h || a ==
|
966
|
+
var a = kt(e);
|
967
|
+
return a == p || a == h || a == F || a == m;
|
968
968
|
}
|
969
969
|
function le(e) {
|
970
970
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= f;
|
@@ -973,7 +973,7 @@ qe.exports;
|
|
973
973
|
var a = typeof e;
|
974
974
|
return e != null && (a == "object" || a == "function");
|
975
975
|
}
|
976
|
-
function
|
976
|
+
function ft(e) {
|
977
977
|
return e != null && typeof e == "object";
|
978
978
|
}
|
979
979
|
var Be = Xt ? pr(Xt) : Ur;
|
@@ -988,41 +988,41 @@ qe.exports;
|
|
988
988
|
}
|
989
989
|
t.exports = Xr;
|
990
990
|
})(qe, qe.exports);
|
991
|
-
var
|
992
|
-
const
|
991
|
+
var Bi = qe.exports;
|
992
|
+
const rt = /* @__PURE__ */ bn(Bi);
|
993
993
|
var Je = { exports: {} };
|
994
994
|
Je.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__",
|
997
|
-
z[c] = z[f] = z[
|
998
|
-
var cr = typeof
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]", x = "[object Date]", F = "[object Error]", k = "[object Function]", H = "[object GeneratorFunction]", b = "[object Map]", p = "[object Number]", h = "[object Object]", l = "[object Promise]", g = "[object RegExp]", v = "[object Set]", _ = "[object String]", y = "[object Symbol]", m = "[object WeakMap]", j = "[object ArrayBuffer]", E = "[object DataView]", I = "[object Float32Array]", P = "[object Float64Array]", S = "[object Int8Array]", T = "[object Int16Array]", A = "[object Int32Array]", M = "[object Uint8Array]", $ = "[object Uint8ClampedArray]", bt = "[object Uint16Array]", Ie = "[object Uint32Array]", ir = /[\\^$.*+?()[\]{}|]/g, ar = /\w*$/, sr = /^\[object .+?Constructor\]$/, or = /^(?:0|[1-9]\d*)$/, z = {};
|
997
|
+
z[c] = z[f] = z[j] = z[E] = z[d] = z[x] = z[I] = z[P] = z[S] = z[T] = z[A] = z[b] = z[p] = z[h] = z[g] = z[v] = z[_] = z[y] = z[M] = z[$] = z[bt] = z[Ie] = !0, z[F] = z[k] = z[m] = !1;
|
998
|
+
var cr = typeof nt == "object" && nt && nt.Object === Object && nt, ur = typeof self == "object" && self && self.Object === Object && self, it = cr || ur || Function("return this")(), Se = r && !r.nodeType && r, N = Se && !0 && t && !t.nodeType && t, we = N && N.exports === Se;
|
999
999
|
function lr(e, a) {
|
1000
1000
|
return e.set(a[0], a[1]), e;
|
1001
1001
|
}
|
1002
|
-
function
|
1002
|
+
function at(e, a) {
|
1003
1003
|
return e.add(a), e;
|
1004
1004
|
}
|
1005
1005
|
function Te(e, a) {
|
1006
|
-
for (var
|
1006
|
+
for (var o = -1, u = e ? e.length : 0; ++o < u && a(e[o], o, e) !== !1; )
|
1007
1007
|
;
|
1008
1008
|
return e;
|
1009
1009
|
}
|
1010
1010
|
function ke(e, a) {
|
1011
|
-
for (var
|
1012
|
-
e[O +
|
1011
|
+
for (var o = -1, u = a.length, O = e.length; ++o < u; )
|
1012
|
+
e[O + o] = a[o];
|
1013
1013
|
return e;
|
1014
1014
|
}
|
1015
|
-
function Yt(e, a,
|
1016
|
-
for (var O = -1,
|
1017
|
-
|
1018
|
-
return
|
1015
|
+
function Yt(e, a, o, u) {
|
1016
|
+
for (var O = -1, w = e ? e.length : 0; ++O < w; )
|
1017
|
+
o = a(o, e[O], O, e);
|
1018
|
+
return o;
|
1019
1019
|
}
|
1020
1020
|
function Vt(e, a) {
|
1021
|
-
for (var
|
1022
|
-
u[
|
1021
|
+
for (var o = -1, u = Array(e); ++o < e; )
|
1022
|
+
u[o] = a(o);
|
1023
1023
|
return u;
|
1024
1024
|
}
|
1025
|
-
function
|
1025
|
+
function Ee(e, a) {
|
1026
1026
|
return e == null ? void 0 : e[a];
|
1027
1027
|
}
|
1028
1028
|
function Xt(e) {
|
@@ -1034,62 +1034,62 @@ Je.exports;
|
|
1034
1034
|
}
|
1035
1035
|
return a;
|
1036
1036
|
}
|
1037
|
-
function
|
1038
|
-
var a = -1,
|
1037
|
+
function Ae(e) {
|
1038
|
+
var a = -1, o = Array(e.size);
|
1039
1039
|
return e.forEach(function(u, O) {
|
1040
|
-
|
1041
|
-
}),
|
1040
|
+
o[++a] = [O, u];
|
1041
|
+
}), o;
|
1042
1042
|
}
|
1043
1043
|
function qt(e, a) {
|
1044
|
-
return function(
|
1045
|
-
return e(a(
|
1044
|
+
return function(o) {
|
1045
|
+
return e(a(o));
|
1046
1046
|
};
|
1047
1047
|
}
|
1048
1048
|
function Oe(e) {
|
1049
|
-
var a = -1,
|
1049
|
+
var a = -1, o = Array(e.size);
|
1050
1050
|
return e.forEach(function(u) {
|
1051
|
-
|
1052
|
-
}),
|
1051
|
+
o[++a] = u;
|
1052
|
+
}), o;
|
1053
1053
|
}
|
1054
|
-
var fr = Array.prototype, pr = Function.prototype, jt = Object.prototype, Jt =
|
1054
|
+
var fr = Array.prototype, pr = Function.prototype, jt = Object.prototype, Jt = it["__core-js_shared__"], xe = function() {
|
1055
1055
|
var e = /[^.]+$/.exec(Jt && Jt.keys && Jt.keys.IE_PROTO || "");
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
1057
|
-
}(), Me = pr.toString,
|
1058
|
-
"^" + Me.call(
|
1059
|
-
),
|
1060
|
-
function
|
1061
|
-
var a = -1,
|
1062
|
-
for (this.clear(); ++a <
|
1057
|
+
}(), Me = pr.toString, ct = jt.hasOwnProperty, Rt = jt.toString, dr = RegExp(
|
1058
|
+
"^" + Me.call(ct).replace(ir, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
1059
|
+
), It = we ? it.Buffer : void 0, Ft = it.Symbol, Zt = it.Uint8Array, et = qt(Object.getPrototypeOf, Object), Pe = Object.create, De = jt.propertyIsEnumerable, hr = fr.splice, Qt = Object.getOwnPropertySymbols, zt = It ? It.isBuffer : void 0, Ce = qt(Object.keys, Object), Nt = ot(it, "DataView"), St = ot(it, "Map"), st = ot(it, "Promise"), Ht = ot(it, "Set"), te = ot(it, "WeakMap"), wt = ot(Object, "create"), ee = X(Nt), Tt = X(St), re = X(st), ne = X(Ht), ie = X(te), gt = Ft ? Ft.prototype : void 0, je = gt ? gt.valueOf : void 0;
|
1060
|
+
function pt(e) {
|
1061
|
+
var a = -1, o = e ? e.length : 0;
|
1062
|
+
for (this.clear(); ++a < o; ) {
|
1063
1063
|
var u = e[a];
|
1064
1064
|
this.set(u[0], u[1]);
|
1065
1065
|
}
|
1066
1066
|
}
|
1067
1067
|
function yr() {
|
1068
|
-
this.__data__ =
|
1068
|
+
this.__data__ = wt ? wt(null) : {};
|
1069
1069
|
}
|
1070
1070
|
function mr(e) {
|
1071
1071
|
return this.has(e) && delete this.__data__[e];
|
1072
1072
|
}
|
1073
1073
|
function br(e) {
|
1074
1074
|
var a = this.__data__;
|
1075
|
-
if (
|
1076
|
-
var
|
1077
|
-
return
|
1075
|
+
if (wt) {
|
1076
|
+
var o = a[e];
|
1077
|
+
return o === i ? void 0 : o;
|
1078
1078
|
}
|
1079
|
-
return
|
1079
|
+
return ct.call(a, e) ? a[e] : void 0;
|
1080
1080
|
}
|
1081
1081
|
function Re(e) {
|
1082
1082
|
var a = this.__data__;
|
1083
|
-
return
|
1083
|
+
return wt ? a[e] !== void 0 : ct.call(a, e);
|
1084
1084
|
}
|
1085
1085
|
function ae(e, a) {
|
1086
|
-
var
|
1087
|
-
return
|
1086
|
+
var o = this.__data__;
|
1087
|
+
return o[e] = wt && a === void 0 ? i : a, this;
|
1088
1088
|
}
|
1089
|
-
|
1089
|
+
pt.prototype.clear = yr, pt.prototype.delete = mr, pt.prototype.get = br, pt.prototype.has = Re, pt.prototype.set = ae;
|
1090
1090
|
function W(e) {
|
1091
|
-
var a = -1,
|
1092
|
-
for (this.clear(); ++a <
|
1091
|
+
var a = -1, o = e ? e.length : 0;
|
1092
|
+
for (this.clear(); ++a < o; ) {
|
1093
1093
|
var u = e[a];
|
1094
1094
|
this.set(u[0], u[1]);
|
1095
1095
|
}
|
@@ -1098,52 +1098,52 @@ Je.exports;
|
|
1098
1098
|
this.__data__ = [];
|
1099
1099
|
}
|
1100
1100
|
function _r(e) {
|
1101
|
-
var a = this.__data__,
|
1102
|
-
if (
|
1101
|
+
var a = this.__data__, o = Lt(a, e);
|
1102
|
+
if (o < 0)
|
1103
1103
|
return !1;
|
1104
1104
|
var u = a.length - 1;
|
1105
|
-
return
|
1105
|
+
return o == u ? a.pop() : hr.call(a, o, 1), !0;
|
1106
1106
|
}
|
1107
1107
|
function vr(e) {
|
1108
|
-
var a = this.__data__,
|
1109
|
-
return
|
1108
|
+
var a = this.__data__, o = Lt(a, e);
|
1109
|
+
return o < 0 ? void 0 : a[o][1];
|
1110
1110
|
}
|
1111
1111
|
function Ir(e) {
|
1112
1112
|
return Lt(this.__data__, e) > -1;
|
1113
1113
|
}
|
1114
1114
|
function Sr(e, a) {
|
1115
|
-
var
|
1116
|
-
return u < 0 ?
|
1115
|
+
var o = this.__data__, u = Lt(o, e);
|
1116
|
+
return u < 0 ? o.push([e, a]) : o[u][1] = a, this;
|
1117
1117
|
}
|
1118
1118
|
W.prototype.clear = gr, W.prototype.delete = _r, W.prototype.get = vr, W.prototype.has = Ir, W.prototype.set = Sr;
|
1119
|
-
function
|
1120
|
-
var a = -1,
|
1121
|
-
for (this.clear(); ++a <
|
1119
|
+
function K(e) {
|
1120
|
+
var a = -1, o = e ? e.length : 0;
|
1121
|
+
for (this.clear(); ++a < o; ) {
|
1122
1122
|
var u = e[a];
|
1123
1123
|
this.set(u[0], u[1]);
|
1124
1124
|
}
|
1125
1125
|
}
|
1126
1126
|
function wr() {
|
1127
1127
|
this.__data__ = {
|
1128
|
-
hash: new
|
1129
|
-
map: new (
|
1130
|
-
string: new
|
1128
|
+
hash: new pt(),
|
1129
|
+
map: new (St || W)(),
|
1130
|
+
string: new pt()
|
1131
1131
|
};
|
1132
1132
|
}
|
1133
1133
|
function Tr(e) {
|
1134
|
-
return
|
1134
|
+
return Et(this, e).delete(e);
|
1135
1135
|
}
|
1136
1136
|
function kr(e) {
|
1137
|
-
return
|
1137
|
+
return Et(this, e).get(e);
|
1138
1138
|
}
|
1139
|
-
function
|
1140
|
-
return
|
1139
|
+
function Er(e) {
|
1140
|
+
return Et(this, e).has(e);
|
1141
1141
|
}
|
1142
|
-
function
|
1143
|
-
return
|
1142
|
+
function Ar(e, a) {
|
1143
|
+
return Et(this, e).set(e, a), this;
|
1144
1144
|
}
|
1145
|
-
|
1146
|
-
function
|
1145
|
+
K.prototype.clear = wr, K.prototype.delete = Tr, K.prototype.get = kr, K.prototype.has = Er, K.prototype.set = Ar;
|
1146
|
+
function q(e) {
|
1147
1147
|
this.__data__ = new W(e);
|
1148
1148
|
}
|
1149
1149
|
function Or() {
|
@@ -1159,215 +1159,215 @@ Je.exports;
|
|
1159
1159
|
return this.__data__.has(e);
|
1160
1160
|
}
|
1161
1161
|
function Dr(e, a) {
|
1162
|
-
var
|
1163
|
-
if (
|
1164
|
-
var u =
|
1165
|
-
if (!
|
1162
|
+
var o = this.__data__;
|
1163
|
+
if (o instanceof W) {
|
1164
|
+
var u = o.__data__;
|
1165
|
+
if (!St || u.length < n - 1)
|
1166
1166
|
return u.push([e, a]), this;
|
1167
|
-
|
1167
|
+
o = this.__data__ = new K(u);
|
1168
1168
|
}
|
1169
|
-
return
|
1169
|
+
return o.set(e, a), this;
|
1170
1170
|
}
|
1171
|
-
|
1171
|
+
q.prototype.clear = Or, q.prototype.delete = xr, q.prototype.get = Mr, q.prototype.has = Pr, q.prototype.set = Dr;
|
1172
1172
|
function Ut(e, a) {
|
1173
|
-
var
|
1174
|
-
for (var
|
1175
|
-
|
1176
|
-
return
|
1173
|
+
var o = ue(e) || Wt(e) ? Vt(e.length, String) : [], u = o.length, O = !!u;
|
1174
|
+
for (var w in e)
|
1175
|
+
ct.call(e, w) && !(O && (w == "length" || Kr(w, u))) && o.push(w);
|
1176
|
+
return o;
|
1177
1177
|
}
|
1178
|
-
function Fe(e, a,
|
1178
|
+
function Fe(e, a, o) {
|
1179
1179
|
var u = e[a];
|
1180
|
-
(!(
|
1180
|
+
(!(ct.call(e, a) && Le(u, o)) || o === void 0 && !(a in e)) && (e[a] = o);
|
1181
1181
|
}
|
1182
1182
|
function Lt(e, a) {
|
1183
|
-
for (var
|
1184
|
-
if (Le(e[
|
1185
|
-
return
|
1183
|
+
for (var o = e.length; o--; )
|
1184
|
+
if (Le(e[o][0], a))
|
1185
|
+
return o;
|
1186
1186
|
return -1;
|
1187
1187
|
}
|
1188
|
-
function
|
1188
|
+
function ut(e, a) {
|
1189
1189
|
return e && ce(a, fe(a), e);
|
1190
1190
|
}
|
1191
|
-
function se(e, a,
|
1191
|
+
function se(e, a, o, u, O, w, C) {
|
1192
1192
|
var D;
|
1193
|
-
if (u && (D =
|
1193
|
+
if (u && (D = w ? u(e, O, w, C) : u(e)), D !== void 0)
|
1194
1194
|
return D;
|
1195
|
-
if (!
|
1195
|
+
if (!ft(e))
|
1196
1196
|
return e;
|
1197
1197
|
var U = ue(e);
|
1198
1198
|
if (U) {
|
1199
1199
|
if (D = Br(e), !a)
|
1200
1200
|
return Lr(e, D);
|
1201
1201
|
} else {
|
1202
|
-
var
|
1202
|
+
var R = ht(e), Y = R == k || R == H;
|
1203
1203
|
if (Ge(e))
|
1204
1204
|
return Gt(e, a);
|
1205
|
-
if (
|
1205
|
+
if (R == h || R == c || Y && !w) {
|
1206
1206
|
if (Xt(e))
|
1207
|
-
return
|
1208
|
-
if (D =
|
1209
|
-
return Gr(e,
|
1207
|
+
return w ? e : {};
|
1208
|
+
if (D = lt(Y ? {} : e), !a)
|
1209
|
+
return Gr(e, ut(D, e));
|
1210
1210
|
} else {
|
1211
|
-
if (!z[
|
1212
|
-
return
|
1213
|
-
D = $r(e,
|
1211
|
+
if (!z[R])
|
1212
|
+
return w ? e : {};
|
1213
|
+
D = $r(e, R, se, a);
|
1214
1214
|
}
|
1215
1215
|
}
|
1216
|
-
C || (C = new
|
1217
|
-
var
|
1218
|
-
if (
|
1219
|
-
return
|
1216
|
+
C || (C = new q());
|
1217
|
+
var J = C.get(e);
|
1218
|
+
if (J)
|
1219
|
+
return J;
|
1220
1220
|
if (C.set(e, D), !U)
|
1221
|
-
var L =
|
1222
|
-
return Te(L || e, function(
|
1223
|
-
L && (B =
|
1221
|
+
var L = o ? Wr(e) : fe(e);
|
1222
|
+
return Te(L || e, function(V, B) {
|
1223
|
+
L && (B = V, V = e[B]), Fe(D, B, se(V, a, o, u, B, e, C));
|
1224
1224
|
}), D;
|
1225
1225
|
}
|
1226
1226
|
function Cr(e) {
|
1227
|
-
return
|
1227
|
+
return ft(e) ? Pe(e) : {};
|
1228
1228
|
}
|
1229
|
-
function jr(e, a,
|
1229
|
+
function jr(e, a, o) {
|
1230
1230
|
var u = a(e);
|
1231
|
-
return ue(e) ? u : ke(u,
|
1231
|
+
return ue(e) ? u : ke(u, o(e));
|
1232
1232
|
}
|
1233
1233
|
function Rr(e) {
|
1234
1234
|
return Rt.call(e);
|
1235
1235
|
}
|
1236
1236
|
function Fr(e) {
|
1237
|
-
if (!
|
1237
|
+
if (!ft(e) || Vr(e))
|
1238
1238
|
return !1;
|
1239
1239
|
var a = le(e) || Xt(e) ? dr : sr;
|
1240
|
-
return a.test(
|
1240
|
+
return a.test(X(e));
|
1241
1241
|
}
|
1242
1242
|
function zr(e) {
|
1243
1243
|
if (!He(e))
|
1244
1244
|
return Ce(e);
|
1245
1245
|
var a = [];
|
1246
|
-
for (var
|
1247
|
-
|
1246
|
+
for (var o in Object(e))
|
1247
|
+
ct.call(e, o) && o != "constructor" && a.push(o);
|
1248
1248
|
return a;
|
1249
1249
|
}
|
1250
1250
|
function Gt(e, a) {
|
1251
1251
|
if (a)
|
1252
1252
|
return e.slice();
|
1253
|
-
var
|
1254
|
-
return e.copy(
|
1253
|
+
var o = new e.constructor(e.length);
|
1254
|
+
return e.copy(o), o;
|
1255
1255
|
}
|
1256
1256
|
function oe(e) {
|
1257
1257
|
var a = new e.constructor(e.byteLength);
|
1258
1258
|
return new Zt(a).set(new Zt(e)), a;
|
1259
1259
|
}
|
1260
|
-
function
|
1261
|
-
var
|
1262
|
-
return new e.constructor(
|
1260
|
+
function kt(e, a) {
|
1261
|
+
var o = a ? oe(e.buffer) : e.buffer;
|
1262
|
+
return new e.constructor(o, e.byteOffset, e.byteLength);
|
1263
1263
|
}
|
1264
|
-
function ze(e, a,
|
1265
|
-
var u = a ?
|
1264
|
+
function ze(e, a, o) {
|
1265
|
+
var u = a ? o(Ae(e), !0) : Ae(e);
|
1266
1266
|
return Yt(u, lr, new e.constructor());
|
1267
1267
|
}
|
1268
1268
|
function Ne(e) {
|
1269
1269
|
var a = new e.constructor(e.source, ar.exec(e));
|
1270
1270
|
return a.lastIndex = e.lastIndex, a;
|
1271
1271
|
}
|
1272
|
-
function Nr(e, a,
|
1273
|
-
var u = a ?
|
1274
|
-
return Yt(u,
|
1272
|
+
function Nr(e, a, o) {
|
1273
|
+
var u = a ? o(Oe(e), !0) : Oe(e);
|
1274
|
+
return Yt(u, at, new e.constructor());
|
1275
1275
|
}
|
1276
1276
|
function Hr(e) {
|
1277
1277
|
return je ? Object(je.call(e)) : {};
|
1278
1278
|
}
|
1279
1279
|
function Ur(e, a) {
|
1280
|
-
var
|
1281
|
-
return new e.constructor(
|
1280
|
+
var o = a ? oe(e.buffer) : e.buffer;
|
1281
|
+
return new e.constructor(o, e.byteOffset, e.length);
|
1282
1282
|
}
|
1283
1283
|
function Lr(e, a) {
|
1284
|
-
var
|
1285
|
-
for (a || (a = Array(u)); ++
|
1286
|
-
a[
|
1284
|
+
var o = -1, u = e.length;
|
1285
|
+
for (a || (a = Array(u)); ++o < u; )
|
1286
|
+
a[o] = e[o];
|
1287
1287
|
return a;
|
1288
1288
|
}
|
1289
|
-
function ce(e, a,
|
1290
|
-
|
1291
|
-
for (var O = -1,
|
1289
|
+
function ce(e, a, o, u) {
|
1290
|
+
o || (o = {});
|
1291
|
+
for (var O = -1, w = a.length; ++O < w; ) {
|
1292
1292
|
var C = a[O], D = void 0;
|
1293
|
-
Fe(
|
1293
|
+
Fe(o, C, D === void 0 ? e[C] : D);
|
1294
1294
|
}
|
1295
|
-
return
|
1295
|
+
return o;
|
1296
1296
|
}
|
1297
1297
|
function Gr(e, a) {
|
1298
|
-
return ce(e,
|
1298
|
+
return ce(e, dt(e), a);
|
1299
1299
|
}
|
1300
1300
|
function Wr(e) {
|
1301
|
-
return jr(e, fe,
|
1301
|
+
return jr(e, fe, dt);
|
1302
1302
|
}
|
1303
|
-
function
|
1304
|
-
var
|
1305
|
-
return Yr(a) ?
|
1303
|
+
function Et(e, a) {
|
1304
|
+
var o = e.__data__;
|
1305
|
+
return Yr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
1306
1306
|
}
|
1307
|
-
function
|
1308
|
-
var
|
1309
|
-
return Fr(
|
1307
|
+
function ot(e, a) {
|
1308
|
+
var o = Ee(e, a);
|
1309
|
+
return Fr(o) ? o : void 0;
|
1310
1310
|
}
|
1311
|
-
var
|
1312
|
-
(Nt &&
|
1313
|
-
var a = Rt.call(e),
|
1311
|
+
var dt = Qt ? qt(Qt, Object) : qr, ht = Rr;
|
1312
|
+
(Nt && ht(new Nt(new ArrayBuffer(1))) != E || St && ht(new St()) != b || st && ht(st.resolve()) != l || Ht && ht(new Ht()) != v || te && ht(new te()) != m) && (ht = function(e) {
|
1313
|
+
var a = Rt.call(e), o = a == h ? e.constructor : void 0, u = o ? X(o) : void 0;
|
1314
1314
|
if (u)
|
1315
1315
|
switch (u) {
|
1316
1316
|
case ee:
|
1317
|
-
return
|
1318
|
-
case
|
1319
|
-
return
|
1317
|
+
return E;
|
1318
|
+
case Tt:
|
1319
|
+
return b;
|
1320
1320
|
case re:
|
1321
1321
|
return l;
|
1322
1322
|
case ne:
|
1323
1323
|
return v;
|
1324
1324
|
case ie:
|
1325
|
-
return
|
1325
|
+
return m;
|
1326
1326
|
}
|
1327
1327
|
return a;
|
1328
1328
|
});
|
1329
1329
|
function Br(e) {
|
1330
|
-
var a = e.length,
|
1331
|
-
return a && typeof e[0] == "string" &&
|
1330
|
+
var a = e.length, o = e.constructor(a);
|
1331
|
+
return a && typeof e[0] == "string" && ct.call(e, "index") && (o.index = e.index, o.input = e.input), o;
|
1332
1332
|
}
|
1333
|
-
function
|
1334
|
-
return typeof e.constructor == "function" && !He(e) ? Cr(
|
1333
|
+
function lt(e) {
|
1334
|
+
return typeof e.constructor == "function" && !He(e) ? Cr(et(e)) : {};
|
1335
1335
|
}
|
1336
|
-
function $r(e, a,
|
1336
|
+
function $r(e, a, o, u) {
|
1337
1337
|
var O = e.constructor;
|
1338
1338
|
switch (a) {
|
1339
|
-
case
|
1339
|
+
case j:
|
1340
1340
|
return oe(e);
|
1341
1341
|
case d:
|
1342
|
-
case M:
|
1343
|
-
return new O(+e);
|
1344
|
-
case w:
|
1345
|
-
return wt(e, u);
|
1346
|
-
case k:
|
1347
1342
|
case x:
|
1348
|
-
|
1343
|
+
return new O(+e);
|
1349
1344
|
case E:
|
1345
|
+
return kt(e, u);
|
1346
|
+
case I:
|
1350
1347
|
case P:
|
1351
|
-
case
|
1352
|
-
case
|
1353
|
-
case
|
1348
|
+
case S:
|
1349
|
+
case T:
|
1350
|
+
case A:
|
1351
|
+
case M:
|
1352
|
+
case $:
|
1353
|
+
case bt:
|
1354
1354
|
case Ie:
|
1355
1355
|
return Ur(e, u);
|
1356
|
-
case
|
1357
|
-
return ze(e, u,
|
1356
|
+
case b:
|
1357
|
+
return ze(e, u, o);
|
1358
1358
|
case p:
|
1359
|
-
case
|
1359
|
+
case _:
|
1360
1360
|
return new O(e);
|
1361
|
-
case
|
1361
|
+
case g:
|
1362
1362
|
return Ne(e);
|
1363
1363
|
case v:
|
1364
|
-
return Nr(e, u,
|
1365
|
-
case
|
1364
|
+
return Nr(e, u, o);
|
1365
|
+
case y:
|
1366
1366
|
return Hr(e);
|
1367
1367
|
}
|
1368
1368
|
}
|
1369
1369
|
function Kr(e, a) {
|
1370
|
-
return a = a ??
|
1370
|
+
return a = a ?? s, !!a && (typeof e == "number" || or.test(e)) && e > -1 && e % 1 == 0 && e < a;
|
1371
1371
|
}
|
1372
1372
|
function Yr(e) {
|
1373
1373
|
var a = typeof e;
|
@@ -1377,10 +1377,10 @@ Je.exports;
|
|
1377
1377
|
return !!xe && xe in e;
|
1378
1378
|
}
|
1379
1379
|
function He(e) {
|
1380
|
-
var a = e && e.constructor,
|
1381
|
-
return e ===
|
1380
|
+
var a = e && e.constructor, o = typeof a == "function" && a.prototype || jt;
|
1381
|
+
return e === o;
|
1382
1382
|
}
|
1383
|
-
function
|
1383
|
+
function X(e) {
|
1384
1384
|
if (e != null) {
|
1385
1385
|
try {
|
1386
1386
|
return Me.call(e);
|
@@ -1400,7 +1400,7 @@ Je.exports;
|
|
1400
1400
|
return e === a || e !== e && a !== a;
|
1401
1401
|
}
|
1402
1402
|
function Wt(e) {
|
1403
|
-
return Xr(e) &&
|
1403
|
+
return Xr(e) && ct.call(e, "callee") && (!De.call(e, "callee") || Rt.call(e) == c);
|
1404
1404
|
}
|
1405
1405
|
var ue = Array.isArray;
|
1406
1406
|
function Bt(e) {
|
@@ -1411,13 +1411,13 @@ Je.exports;
|
|
1411
1411
|
}
|
1412
1412
|
var Ge = zt || Jr;
|
1413
1413
|
function le(e) {
|
1414
|
-
var a =
|
1415
|
-
return a ==
|
1414
|
+
var a = ft(e) ? Rt.call(e) : "";
|
1415
|
+
return a == k || a == H;
|
1416
1416
|
}
|
1417
1417
|
function We(e) {
|
1418
|
-
return typeof e == "number" && e > -1 && e % 1 == 0 && e <=
|
1418
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= s;
|
1419
1419
|
}
|
1420
|
-
function
|
1420
|
+
function ft(e) {
|
1421
1421
|
var a = typeof e;
|
1422
1422
|
return !!e && (a == "object" || a == "function");
|
1423
1423
|
}
|
@@ -1435,46 +1435,46 @@ Je.exports;
|
|
1435
1435
|
}
|
1436
1436
|
t.exports = Ue;
|
1437
1437
|
})(Je, Je.exports);
|
1438
|
-
var
|
1439
|
-
const
|
1438
|
+
var $i = Je.exports;
|
1439
|
+
const Z = /* @__PURE__ */ bn($i), Ki = (t) => new Promise((r, n) => {
|
1440
1440
|
const i = new Image();
|
1441
1441
|
console.warn("update cdn config for cors?"), i.onload = () => {
|
1442
|
-
const
|
1443
|
-
r({ width:
|
1444
|
-
}, i.onerror = (
|
1445
|
-
n(
|
1442
|
+
const s = i.width, c = i.height;
|
1443
|
+
r({ width: s, height: c });
|
1444
|
+
}, i.onerror = (s) => {
|
1445
|
+
n(s);
|
1446
1446
|
}, i.crossOrigin = "anonymous", i.src = t;
|
1447
|
-
}),
|
1447
|
+
}), Yi = (t) => new Promise((r, n) => {
|
1448
1448
|
const i = new Audio();
|
1449
1449
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
1450
|
-
const
|
1451
|
-
r({ duration:
|
1452
|
-
}), i.addEventListener("error", (
|
1453
|
-
n(
|
1450
|
+
const s = i.duration * 1e3;
|
1451
|
+
r({ duration: s });
|
1452
|
+
}), i.addEventListener("error", (s) => {
|
1453
|
+
n(s);
|
1454
1454
|
}), i.src = t, i.crossOrigin = "anonymous", i.load();
|
1455
|
-
}),
|
1455
|
+
}), Vi = (t) => new Promise((r, n) => {
|
1456
1456
|
const i = document.createElement("video");
|
1457
1457
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
1458
|
-
const
|
1459
|
-
r({ duration:
|
1460
|
-
}), i.addEventListener("error", (
|
1461
|
-
n(
|
1458
|
+
const s = i.duration * 1e3, c = i.videoWidth, f = i.videoHeight;
|
1459
|
+
r({ duration: s, width: c, height: f });
|
1460
|
+
}), i.addEventListener("error", (s) => {
|
1461
|
+
n(s);
|
1462
1462
|
}), i.src = t, i.load();
|
1463
1463
|
}), ti = (t, r) => {
|
1464
1464
|
const n = document.createElement("div");
|
1465
|
-
Object.keys(r).forEach((
|
1466
|
-
|
1465
|
+
Object.keys(r).forEach((s) => {
|
1466
|
+
s !== "height" && (n.style[s] = r[s]);
|
1467
1467
|
}), 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";
|
1468
1468
|
const i = getComputedStyle(n).height;
|
1469
1469
|
return document.body.removeChild(n), parseFloat(i);
|
1470
1470
|
}, gn = (t) => {
|
1471
1471
|
const r = t.map((n) => new FontFace(n.fontFamily, `url(${n.url})`).load().catch((i) => i));
|
1472
1472
|
return r.length === 0 ? Promise.resolve(!0) : new Promise((n, i) => {
|
1473
|
-
Promise.all(r).then((
|
1474
|
-
|
1473
|
+
Promise.all(r).then((s) => {
|
1474
|
+
s.forEach((c) => {
|
1475
1475
|
c && c.family && (document.fonts.add(c), n(!0));
|
1476
1476
|
});
|
1477
|
-
}).catch((
|
1477
|
+
}).catch((s) => i(s));
|
1478
1478
|
});
|
1479
1479
|
}, er = {
|
1480
1480
|
color: "#000000",
|
@@ -1520,18 +1520,18 @@ function rr(t, r) {
|
|
1520
1520
|
const n = {
|
1521
1521
|
x: t.size.width / 2,
|
1522
1522
|
y: t.size.height / 2
|
1523
|
-
}, i = { x: r.width / 2, y: r.height / 2 },
|
1523
|
+
}, i = { x: r.width / 2, y: r.height / 2 }, s = Math.min(
|
1524
1524
|
t.size.width / r.width,
|
1525
1525
|
t.size.height / r.height
|
1526
1526
|
), c = n.x - i.x;
|
1527
1527
|
return {
|
1528
1528
|
top: `${n.y - i.y}px`,
|
1529
1529
|
left: `${c}px`,
|
1530
|
-
transform: `scale(${
|
1530
|
+
transform: `scale(${s})`
|
1531
1531
|
};
|
1532
1532
|
}
|
1533
1533
|
const Pn = async (t, r) => {
|
1534
|
-
const n = t.details.src, i = await
|
1534
|
+
const n = t.details.src, i = await Vi(n), s = rr(r, {
|
1535
1535
|
...i
|
1536
1536
|
}), c = ei(t.trim, { duration: i.duration }), f = {
|
1537
1537
|
width: i.width,
|
@@ -1548,16 +1548,17 @@ const Pn = async (t, r) => {
|
|
1548
1548
|
borderColor: t.details.borderColor || "#000000",
|
1549
1549
|
// Default border color
|
1550
1550
|
boxShadow: t.details.boxShadow || er,
|
1551
|
-
top:
|
1551
|
+
top: t.details.top || s.top || "0px",
|
1552
1552
|
// Default top
|
1553
|
-
left:
|
1553
|
+
left: t.details.left || s.left || "0px",
|
1554
1554
|
// Default left
|
1555
|
-
transform:
|
1555
|
+
transform: t.details.transform || s.transform,
|
1556
1556
|
// Default transform
|
1557
1557
|
blur: t.details.blur || 0,
|
1558
1558
|
brightness: t.details.brightness || 100,
|
1559
1559
|
flipX: t.details.flipX || !1,
|
1560
|
-
flipY: t.details.flipY || !1
|
1560
|
+
flipY: t.details.flipY || !1,
|
1561
|
+
rotate: t.details.rotate || "0deg"
|
1561
1562
|
};
|
1562
1563
|
return {
|
1563
1564
|
...t,
|
@@ -1569,24 +1570,24 @@ const Pn = async (t, r) => {
|
|
1569
1570
|
display: ge(t.display, { duration: i.duration, trim: c })
|
1570
1571
|
};
|
1571
1572
|
}, Dn = async (t) => {
|
1572
|
-
const r = t.id, n = t.details,
|
1573
|
+
const r = t.id, n = t.details, s = (await Yi(n.src)).duration, c = ei(t.trim, { duration: s });
|
1573
1574
|
return {
|
1574
1575
|
id: r,
|
1575
1576
|
name: "",
|
1576
1577
|
type: "audio",
|
1577
|
-
display: ge(t.display, { duration:
|
1578
|
+
display: ge(t.display, { duration: s, trim: c }),
|
1578
1579
|
trim: c,
|
1579
1580
|
playbackRate: t.playbackRate || 1,
|
1580
1581
|
details: {
|
1581
1582
|
src: n.src,
|
1582
|
-
duration:
|
1583
|
+
duration: s,
|
1583
1584
|
volume: n.volume ?? 100
|
1584
1585
|
// Default volume
|
1585
1586
|
},
|
1586
1587
|
metadata: { ...t.metadata }
|
1587
1588
|
};
|
1588
1589
|
}, Cn = async (t, r) => {
|
1589
|
-
const n = t.details, i = await
|
1590
|
+
const n = t.details, i = await Ki(n.src), s = rr(r, i);
|
1590
1591
|
return {
|
1591
1592
|
id: t.id,
|
1592
1593
|
type: "image",
|
@@ -1602,7 +1603,7 @@ const Pn = async (t, r) => {
|
|
1602
1603
|
// Default height
|
1603
1604
|
opacity: n.opacity ?? 100,
|
1604
1605
|
// Default opacity
|
1605
|
-
transform:
|
1606
|
+
transform: n.transform || s.transform,
|
1606
1607
|
// Default transform
|
1607
1608
|
border: n.border || "none",
|
1608
1609
|
// Default border
|
@@ -1610,9 +1611,9 @@ const Pn = async (t, r) => {
|
|
1610
1611
|
// Default border radius
|
1611
1612
|
boxShadow: n.boxShadow || er,
|
1612
1613
|
// Default box shadow
|
1613
|
-
top:
|
1614
|
+
top: n.top || s.top || "0px",
|
1614
1615
|
// Default top
|
1615
|
-
left:
|
1616
|
+
left: n.left || s.left || "0px",
|
1616
1617
|
// Default left
|
1617
1618
|
borderWidth: n.borderWidth ?? 0,
|
1618
1619
|
// Default border width
|
@@ -1621,7 +1622,8 @@ const Pn = async (t, r) => {
|
|
1621
1622
|
blur: n.blur || 0,
|
1622
1623
|
brightness: n.brightness || 100,
|
1623
1624
|
flipX: n.flipX || !1,
|
1624
|
-
flipY: n.flipY || !1
|
1625
|
+
flipY: n.flipY || !1,
|
1626
|
+
rotate: n.rotate || "0deg"
|
1625
1627
|
},
|
1626
1628
|
metadata: t.metadata || {}
|
1627
1629
|
};
|
@@ -1633,7 +1635,7 @@ const Pn = async (t, r) => {
|
|
1633
1635
|
url: n.details.fontUrl
|
1634
1636
|
}
|
1635
1637
|
]);
|
1636
|
-
const i = n.id,
|
1638
|
+
const i = n.id, s = n.details, c = ri(s), f = ti(n.details.text, c), d = rr(r, {
|
1637
1639
|
width: c.width,
|
1638
1640
|
height: f
|
1639
1641
|
});
|
@@ -1644,17 +1646,17 @@ const Pn = async (t, r) => {
|
|
1644
1646
|
display: ge(n.display),
|
1645
1647
|
details: {
|
1646
1648
|
...c,
|
1647
|
-
text:
|
1649
|
+
text: s.text || "",
|
1648
1650
|
// Default text content
|
1649
1651
|
height: f,
|
1650
1652
|
// Default height
|
1651
|
-
fontUrl:
|
1652
|
-
top: d.top,
|
1653
|
-
left: d.left,
|
1654
|
-
borderWidth:
|
1655
|
-
borderColor:
|
1656
|
-
boxShadow:
|
1657
|
-
words:
|
1653
|
+
fontUrl: s.fontUrl,
|
1654
|
+
top: c.top || d.top,
|
1655
|
+
left: c.left || d.left,
|
1656
|
+
borderWidth: s.borderWidth || 0,
|
1657
|
+
borderColor: s.borderColor || "#000000",
|
1658
|
+
boxShadow: s.boxShadow || er,
|
1659
|
+
words: s.words || []
|
1658
1660
|
},
|
1659
1661
|
metadata: {}
|
1660
1662
|
};
|
@@ -1665,8 +1667,8 @@ const Pn = async (t, r) => {
|
|
1665
1667
|
url: t.details.fontUrl
|
1666
1668
|
}
|
1667
1669
|
]);
|
1668
|
-
const n = t.id, i = t.details,
|
1669
|
-
width:
|
1670
|
+
const n = t.id, i = t.details, s = ri(i), c = ti(t.details.text, s), f = rr(r, {
|
1671
|
+
width: s.width,
|
1670
1672
|
height: c
|
1671
1673
|
});
|
1672
1674
|
return {
|
@@ -1675,14 +1677,14 @@ const Pn = async (t, r) => {
|
|
1675
1677
|
type: "text",
|
1676
1678
|
display: ge(t.display),
|
1677
1679
|
details: {
|
1678
|
-
...
|
1680
|
+
...s,
|
1679
1681
|
text: i.text || "",
|
1680
1682
|
// Default text content
|
1681
1683
|
height: c,
|
1682
1684
|
// Default height
|
1683
1685
|
fontUrl: i.fontUrl,
|
1684
|
-
top: f.top,
|
1685
|
-
left: f.left,
|
1686
|
+
top: s.top || f.top,
|
1687
|
+
left: s.left || f.left,
|
1686
1688
|
borderWidth: i.borderWidth || 0,
|
1687
1689
|
borderColor: i.borderColor || "#000000",
|
1688
1690
|
boxShadow: i.boxShadow || er
|
@@ -1729,18 +1731,19 @@ const Pn = async (t, r) => {
|
|
1729
1731
|
WebkitTextStrokeWidth: t.WebkitTextStrokeWidth || "0px",
|
1730
1732
|
top: t.top || "0px",
|
1731
1733
|
left: t.left || "0px",
|
1732
|
-
textTransform: t.textTransform || "none"
|
1733
|
-
|
1734
|
+
textTransform: t.textTransform || "none",
|
1735
|
+
transform: t.transform || "none"
|
1736
|
+
}), Xi = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
1734
1737
|
let ln = (t = 21) => {
|
1735
1738
|
let r = "", n = crypto.getRandomValues(new Uint8Array(t));
|
1736
1739
|
for (; t--; )
|
1737
|
-
r +=
|
1740
|
+
r += Xi[n[t] & 63];
|
1738
1741
|
return r;
|
1739
1742
|
};
|
1740
|
-
function
|
1743
|
+
function qi(t, r) {
|
1741
1744
|
return t.filter((i) => ({
|
1742
1745
|
...i,
|
1743
|
-
items: i.items.filter((
|
1746
|
+
items: i.items.filter((s) => !r.includes(s))
|
1744
1747
|
})).filter((i) => !i.items.length);
|
1745
1748
|
}
|
1746
1749
|
function Fn(t = 16) {
|
@@ -1749,205 +1752,204 @@ function Fn(t = 16) {
|
|
1749
1752
|
return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
|
1750
1753
|
}
|
1751
1754
|
const Ve = (t) => Object.keys(t).reduce((r, n) => {
|
1752
|
-
const { display: i, playbackRate:
|
1753
|
-
return Math.max(r, i.to / (
|
1755
|
+
const { display: i, playbackRate: s } = t[n];
|
1756
|
+
return Math.max(r, i.to / (s || 1));
|
1754
1757
|
}, 0);
|
1755
|
-
function
|
1758
|
+
function Ji(t) {
|
1756
1759
|
const r = $t.pipe(
|
1757
1760
|
Kt(({ key: p }) => p.startsWith(di))
|
1758
1761
|
), n = $t.pipe(
|
1759
1762
|
Kt(({ key: p }) => p.startsWith(hi))
|
1760
1763
|
), i = $t.pipe(
|
1761
1764
|
Kt(({ key: p }) => p.startsWith(yi))
|
1762
|
-
),
|
1765
|
+
), s = $t.pipe(
|
1763
1766
|
Kt(({ key: p }) => p.startsWith(mi))
|
1764
1767
|
), c = $t.pipe(
|
1765
1768
|
Kt(({ key: p }) => p.startsWith(bi))
|
1766
1769
|
), f = $t.pipe(
|
1767
1770
|
Kt(({ key: p }) => p.startsWith(gi))
|
1768
1771
|
), d = r.subscribe(async (p) => {
|
1769
|
-
var h;
|
1772
|
+
var h, l;
|
1770
1773
|
if (p.key === _i) {
|
1771
|
-
const
|
1774
|
+
const g = Z(t.getState()), v = (h = p.value) == null ? void 0 : h.payload, _ = v.trackItemIds, y = v.trackItemsMap, m = v.trackItemDetailsMap;
|
1772
1775
|
console.warn("IMPROVE FONTS LOADING");
|
1773
|
-
const
|
1776
|
+
const j = _.map(async (I) => {
|
1777
|
+
var P;
|
1774
1778
|
try {
|
1775
|
-
const
|
1776
|
-
if (
|
1777
|
-
const
|
1778
|
-
{ id:
|
1779
|
+
const S = m[I], T = y[I];
|
1780
|
+
if (S.type === "image") {
|
1781
|
+
const A = await Cn(
|
1782
|
+
{ id: I, details: S.details, ...T },
|
1779
1783
|
{
|
1780
|
-
size:
|
1781
|
-
width: 1080,
|
1782
|
-
height: 1920
|
1783
|
-
}
|
1784
|
+
size: g.size
|
1784
1785
|
}
|
1785
|
-
), { details:
|
1786
|
-
m[
|
1787
|
-
} else if (
|
1788
|
-
const
|
1789
|
-
|
1786
|
+
), { details: M, ...$ } = A;
|
1787
|
+
m[I] = { type: "image", details: M }, y[I] = $;
|
1788
|
+
} else if (S.type === "video") {
|
1789
|
+
const A = Z(
|
1790
|
+
(P = p.value) == null ? void 0 : P.payload.trackItemsMap[I]
|
1791
|
+
), M = await Pn(
|
1792
|
+
{ ...S, ...A, ...T },
|
1790
1793
|
{
|
1791
1794
|
size: {
|
1792
1795
|
width: 1080,
|
1793
1796
|
height: 1920
|
1794
1797
|
}
|
1795
1798
|
}
|
1796
|
-
), { details:
|
1797
|
-
m[
|
1798
|
-
} else if (
|
1799
|
-
const
|
1800
|
-
id:
|
1801
|
-
details:
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1799
|
+
), { details: $, ...bt } = M;
|
1800
|
+
m[I] = { type: "video", details: $ }, y[I] = bt;
|
1801
|
+
} else if (S.type === "audio") {
|
1802
|
+
const A = await Dn({
|
1803
|
+
id: I,
|
1804
|
+
details: S.details,
|
1805
|
+
...T
|
1806
|
+
}), { details: M, ...$ } = A;
|
1807
|
+
m[I] = { type: "audio", details: M }, y[I] = $;
|
1808
|
+
} else if (S.type === "caption") {
|
1809
|
+
const A = await jn(
|
1810
|
+
{ id: I, details: S.details, ...T },
|
1807
1811
|
{
|
1808
1812
|
size: {
|
1809
1813
|
width: 1080,
|
1810
1814
|
height: 1920
|
1811
1815
|
}
|
1812
1816
|
}
|
1813
|
-
), { details:
|
1814
|
-
m[
|
1815
|
-
} else if (
|
1816
|
-
const
|
1817
|
-
{ id:
|
1817
|
+
), { details: M, ...$ } = A;
|
1818
|
+
m[I] = { type: "caption", details: M }, y[I] = $;
|
1819
|
+
} else if (S.type === "text") {
|
1820
|
+
const A = await Rn(
|
1821
|
+
{ id: I, details: S.details, ...T },
|
1818
1822
|
{
|
1819
1823
|
size: {
|
1820
1824
|
width: 1080,
|
1821
1825
|
height: 1920
|
1822
1826
|
}
|
1823
1827
|
}
|
1824
|
-
), { details:
|
1825
|
-
m[
|
1828
|
+
), { details: M, ...$ } = A;
|
1829
|
+
m[I] = { type: "text", details: M }, y[I] = $;
|
1826
1830
|
}
|
1827
1831
|
return !0;
|
1828
1832
|
} catch {
|
1829
1833
|
return !1;
|
1830
1834
|
}
|
1831
1835
|
});
|
1832
|
-
await Promise.all(
|
1833
|
-
const
|
1836
|
+
await Promise.all(j);
|
1837
|
+
const E = Ve(y);
|
1838
|
+
t.updateState({
|
1839
|
+
...v,
|
1840
|
+
trackItemsMap: y,
|
1841
|
+
duration: E
|
1842
|
+
});
|
1843
|
+
}
|
1844
|
+
if (p.key === vi) {
|
1845
|
+
const g = (l = p.value) == null ? void 0 : l.payload;
|
1834
1846
|
t.updateState({
|
1835
|
-
|
1836
|
-
duration: _
|
1847
|
+
size: g
|
1837
1848
|
});
|
1838
1849
|
}
|
1839
|
-
}),
|
1840
|
-
if (p.key ===
|
1841
|
-
if (p.key ===
|
1842
|
-
}),
|
1843
|
-
var l,
|
1850
|
+
}), x = s.subscribe((p) => {
|
1851
|
+
if (p.key === Ii) return t.undo();
|
1852
|
+
if (p.key === Si) return t.redo();
|
1853
|
+
}), F = i.subscribe((p) => {
|
1854
|
+
var l, g, v;
|
1844
1855
|
const h = [];
|
1845
|
-
if ((l = p.value) != null && l.payload.trackItemIds && (h.push((
|
1846
|
-
const
|
1847
|
-
(
|
1848
|
-
),
|
1849
|
-
Object.entries(
|
1850
|
-
([
|
1856
|
+
if ((l = p.value) != null && l.payload.trackItemIds && (h.push((g = p.value) == null ? void 0 : g.payload.trackItemIds), t.updateState({ activeIds: h })), p.key === wi) {
|
1857
|
+
const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds, y = Z(t.getState()), m = _ && _.length ? _ : y.activeIds, j = y.trackItemIds, E = y.trackItemDetailsMap, I = j.filter(
|
1858
|
+
(M) => !m.includes(M)
|
1859
|
+
), P = Object.fromEntries(
|
1860
|
+
Object.entries(E).filter(
|
1861
|
+
([M]) => !m.includes(M)
|
1851
1862
|
)
|
1852
|
-
), S =
|
1853
|
-
|
1854
|
-
|
1855
|
-
),
|
1856
|
-
Object.entries(
|
1857
|
-
([
|
1863
|
+
), S = qi(
|
1864
|
+
y.tracks,
|
1865
|
+
m
|
1866
|
+
), T = Object.fromEntries(
|
1867
|
+
Object.entries(y.trackItemsMap).filter(
|
1868
|
+
([M]) => !m.includes(M)
|
1858
1869
|
)
|
1859
|
-
),
|
1870
|
+
), A = Ve(y.trackItemsMap);
|
1860
1871
|
t.updateState(
|
1861
1872
|
{
|
1862
|
-
trackItemIds:
|
1863
|
-
trackItemDetailsMap:
|
1873
|
+
trackItemIds: I,
|
1874
|
+
trackItemDetailsMap: P,
|
1864
1875
|
activeIds: [],
|
1865
|
-
trackItemsMap:
|
1876
|
+
trackItemsMap: T,
|
1866
1877
|
tracks: S,
|
1867
|
-
duration:
|
1878
|
+
duration: A
|
1868
1879
|
},
|
1869
1880
|
{ updateHistory: !0, kind: "remove" }
|
1870
1881
|
);
|
1871
1882
|
}
|
1872
|
-
}),
|
1873
|
-
var
|
1874
|
-
const h =
|
1875
|
-
let l = [],
|
1876
|
-
if (p.key ===
|
1877
|
-
|
1878
|
-
const
|
1879
|
-
for (const
|
1880
|
-
const
|
1881
|
-
size:
|
1882
|
-
width: 1080,
|
1883
|
-
height: 1920
|
1884
|
-
}
|
1883
|
+
}), k = n.subscribe(async (p) => {
|
1884
|
+
var _, y, m, j, E;
|
1885
|
+
const h = Z(t.getState());
|
1886
|
+
let l = [], g = "text";
|
1887
|
+
if (p.key === Ti) {
|
1888
|
+
g = "caption";
|
1889
|
+
const I = (_ = p.value) == null ? void 0 : _.payload, P = [];
|
1890
|
+
for (const A of I) {
|
1891
|
+
const M = jn(A, {
|
1892
|
+
size: h.size
|
1885
1893
|
});
|
1886
|
-
|
1894
|
+
P.push(M);
|
1887
1895
|
}
|
1888
|
-
const S = await Promise.all(
|
1889
|
-
for (const
|
1890
|
-
const
|
1891
|
-
|
1892
|
-
const { details:
|
1893
|
-
h.trackItemDetailsMap[
|
1894
|
-
type:
|
1895
|
-
details:
|
1896
|
-
}, h.trackItemsMap[
|
1896
|
+
const S = await Promise.all(P), T = [];
|
1897
|
+
for (const A of S) {
|
1898
|
+
const M = A.id;
|
1899
|
+
T.push(M);
|
1900
|
+
const { details: $, ...bt } = A;
|
1901
|
+
h.trackItemDetailsMap[M] = {
|
1902
|
+
type: g,
|
1903
|
+
details: $
|
1904
|
+
}, h.trackItemsMap[M] = bt, h.trackItemIds.push(M);
|
1897
1905
|
}
|
1898
|
-
l =
|
1906
|
+
l = T;
|
1899
1907
|
}
|
1900
|
-
if (p.key ===
|
1901
|
-
|
1902
|
-
const
|
1903
|
-
size:
|
1904
|
-
|
1905
|
-
height: 1920
|
1906
|
-
}
|
1907
|
-
}), { details: x, ...S } = k;
|
1908
|
+
if (p.key === ki) {
|
1909
|
+
g = "text";
|
1910
|
+
const I = await Rn((y = p.value) == null ? void 0 : y.payload, {
|
1911
|
+
size: h.size
|
1912
|
+
}), { details: P, ...S } = I;
|
1908
1913
|
h.trackItemDetailsMap[S.id] = {
|
1909
|
-
type:
|
1910
|
-
details:
|
1914
|
+
type: g,
|
1915
|
+
details: P
|
1911
1916
|
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
1912
1917
|
}
|
1913
|
-
if (p.key ===
|
1914
|
-
|
1915
|
-
const
|
1918
|
+
if (p.key === Ei) {
|
1919
|
+
g = "image";
|
1920
|
+
const I = await Cn((m = p.value) == null ? void 0 : m.payload, {
|
1916
1921
|
size: {
|
1917
1922
|
width: 1080,
|
1918
1923
|
height: 1920
|
1919
1924
|
}
|
1920
|
-
}), { details:
|
1925
|
+
}), { details: P, ...S } = I;
|
1921
1926
|
h.trackItemDetailsMap[S.id] = {
|
1922
|
-
type:
|
1923
|
-
details:
|
1927
|
+
type: g,
|
1928
|
+
details: P
|
1924
1929
|
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
1925
1930
|
}
|
1926
1931
|
if (p.key === Ai) {
|
1927
|
-
|
1928
|
-
const
|
1932
|
+
g = "audio";
|
1933
|
+
const I = await Dn((j = p.value) == null ? void 0 : j.payload), { details: P, ...S } = I;
|
1929
1934
|
h.trackItemDetailsMap[S.id] = {
|
1930
|
-
type:
|
1931
|
-
details:
|
1935
|
+
type: g,
|
1936
|
+
details: P
|
1932
1937
|
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
1933
1938
|
}
|
1934
|
-
if (p.key ===
|
1935
|
-
|
1936
|
-
const
|
1937
|
-
size:
|
1938
|
-
|
1939
|
-
height: 1920
|
1940
|
-
}
|
1941
|
-
}), { details: x, ...S } = k;
|
1939
|
+
if (p.key === Oi) {
|
1940
|
+
g = "video";
|
1941
|
+
const I = await Pn((E = p.value) == null ? void 0 : E.payload, {
|
1942
|
+
size: h.size
|
1943
|
+
}), { details: P, ...S } = I;
|
1942
1944
|
h.trackItemDetailsMap[S.id] = {
|
1943
|
-
type:
|
1944
|
-
details:
|
1945
|
+
type: g,
|
1946
|
+
details: P
|
1945
1947
|
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
1946
1948
|
}
|
1947
1949
|
h.tracks.unshift({
|
1948
1950
|
id: ln(),
|
1949
1951
|
accepts: ["text", "audio", "helper", "video", "image", "caption"],
|
1950
|
-
type:
|
1952
|
+
type: g,
|
1951
1953
|
items: l,
|
1952
1954
|
magnetic: !1,
|
1953
1955
|
static: !1
|
@@ -1968,26 +1970,26 @@ function qi(t) {
|
|
1968
1970
|
);
|
1969
1971
|
}), H = c.subscribe(async (p) => {
|
1970
1972
|
var h;
|
1971
|
-
if (p.key ===
|
1972
|
-
const l =
|
1973
|
+
if (p.key === xi) {
|
1974
|
+
const l = Z(t.getState()), g = (h = p.value) == null ? void 0 : h.options.time;
|
1973
1975
|
if (l.activeIds.length === 1) {
|
1974
|
-
const v = l.activeIds[0],
|
1975
|
-
if (
|
1976
|
+
const v = l.activeIds[0], _ = l.trackItemsMap[v];
|
1977
|
+
if (g >= _.display.to || g <= _.display.from)
|
1976
1978
|
return;
|
1977
|
-
const
|
1978
|
-
...
|
1979
|
-
id:
|
1979
|
+
const y = l.trackItemDetailsMap[v], m = Fn(), j = {
|
1980
|
+
..._,
|
1981
|
+
id: m,
|
1980
1982
|
display: {
|
1981
|
-
from:
|
1982
|
-
to:
|
1983
|
+
from: g,
|
1984
|
+
to: _.display.to
|
1983
1985
|
},
|
1984
1986
|
trim: {
|
1985
|
-
from:
|
1986
|
-
to:
|
1987
|
+
from: g,
|
1988
|
+
to: _.display.to
|
1987
1989
|
}
|
1988
1990
|
};
|
1989
|
-
l.trackItemsMap[v].display.to =
|
1990
|
-
|
1991
|
+
l.trackItemsMap[v].display.to = g, l.trackItemsMap[m] = j, l.trackItemIds.push(m), l.trackItemDetailsMap[m] = y, l.tracks.forEach((E) => {
|
1992
|
+
E.items.includes(v) && E.items.push(m);
|
1991
1993
|
}), t.updateState(
|
1992
1994
|
{
|
1993
1995
|
trackItemDetailsMap: l.trackItemDetailsMap,
|
@@ -2003,54 +2005,54 @@ function qi(t) {
|
|
2003
2005
|
}
|
2004
2006
|
return;
|
2005
2007
|
}
|
2006
|
-
if (p.key ===
|
2007
|
-
const l =
|
2008
|
+
if (p.key === Mi) {
|
2009
|
+
const l = Z(t.getState());
|
2008
2010
|
if (l.activeIds.length) {
|
2009
|
-
const
|
2010
|
-
activeIds:
|
2011
|
+
const g = l.activeIds, v = [], _ = {
|
2012
|
+
activeIds: g,
|
2011
2013
|
trackItemDetailsMap: {},
|
2012
2014
|
trackItemsMap: {},
|
2013
2015
|
tracks: []
|
2014
2016
|
};
|
2015
|
-
|
2016
|
-
|
2017
|
-
l.tracks.find((
|
2017
|
+
g.forEach((m) => {
|
2018
|
+
_.trackItemDetailsMap[m] = l.trackItemDetailsMap[m], _.trackItemsMap[m] = l.trackItemsMap[m], v.push(
|
2019
|
+
l.tracks.find((j) => j.items.includes(m))
|
2018
2020
|
);
|
2019
2021
|
});
|
2020
|
-
const
|
2021
|
-
v.filter((
|
2022
|
+
const y = /* @__PURE__ */ new Set();
|
2023
|
+
v.filter((m) => y.has(m.id) ? !1 : (y.add(m), !0)), _.tracks = Array.from(y.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
|
2022
2024
|
}
|
2023
2025
|
}
|
2024
|
-
if (p.key ===
|
2026
|
+
if (p.key === Pi) {
|
2025
2027
|
const l = localStorage.getItem("DesignComboTemp");
|
2026
2028
|
if (!l) return;
|
2027
|
-
const
|
2028
|
-
const S =
|
2029
|
+
const g = Z(t.getState()), v = JSON.parse(l), _ = {}, y = v.trackItemsMap, m = v.trackItemDetailsMap, j = v.tracks, E = [], I = v.activeIds.map(async (P) => {
|
2030
|
+
const S = m[P];
|
2029
2031
|
(S.type === "caption" || S.type === "text") && S.details.fontUrl && await gn([
|
2030
2032
|
{
|
2031
2033
|
fontFamily: S.details.fontFamily,
|
2032
2034
|
url: S.details.fontUrl
|
2033
2035
|
}
|
2034
2036
|
]);
|
2035
|
-
const
|
2036
|
-
return
|
2037
|
-
...
|
2038
|
-
id:
|
2039
|
-
},
|
2037
|
+
const T = Fn();
|
2038
|
+
return _[P] = T, g.trackItemsMap[T] = {
|
2039
|
+
...y[P],
|
2040
|
+
id: T
|
2041
|
+
}, g.trackItemDetailsMap[T] = S, g.trackItemIds.push(T), !0;
|
2040
2042
|
});
|
2041
|
-
await Promise.all(
|
2042
|
-
const S =
|
2043
|
-
...
|
2043
|
+
await Promise.all(I), j.forEach((P) => {
|
2044
|
+
const S = P.items.map((A) => _[A]), T = {
|
2045
|
+
...P,
|
2044
2046
|
items: S,
|
2045
2047
|
id: ln()
|
2046
2048
|
};
|
2047
|
-
|
2048
|
-
}),
|
2049
|
+
E.push(T);
|
2050
|
+
}), g.tracks = [...g.tracks, ...E], t.updateState(
|
2049
2051
|
{
|
2050
|
-
trackItemDetailsMap:
|
2051
|
-
tracks:
|
2052
|
-
trackItemIds:
|
2053
|
-
trackItemsMap:
|
2052
|
+
trackItemDetailsMap: g.trackItemDetailsMap,
|
2053
|
+
tracks: g.tracks,
|
2054
|
+
trackItemIds: g.trackItemIds,
|
2055
|
+
trackItemsMap: g.trackItemsMap
|
2054
2056
|
},
|
2055
2057
|
{
|
2056
2058
|
updateHistory: !0,
|
@@ -2058,24 +2060,24 @@ function qi(t) {
|
|
2058
2060
|
}
|
2059
2061
|
);
|
2060
2062
|
}
|
2061
|
-
}),
|
2063
|
+
}), b = f.subscribe((p) => {
|
2062
2064
|
var h, l;
|
2063
|
-
if (p.key ===
|
2064
|
-
const
|
2065
|
-
if (!
|
2066
|
-
const
|
2067
|
-
|
2068
|
-
|
2069
|
-
...v[
|
2070
|
-
...
|
2071
|
-
} :
|
2065
|
+
if (p.key === Di) {
|
2066
|
+
const g = Z(t.getState()), v = g.trackItemDetailsMap, _ = g.trackItemsMap, y = Object.keys((h = p.value) == null ? void 0 : h.payload);
|
2067
|
+
if (!y.length) return;
|
2068
|
+
const m = (l = p.value) == null ? void 0 : l.payload;
|
2069
|
+
y.forEach((E) => {
|
2070
|
+
m[E].details ? v[E].details = {
|
2071
|
+
...v[E].details,
|
2072
|
+
...m[E].details
|
2073
|
+
} : m[E].playbackRate && (_[E].playbackRate = m[E].playbackRate);
|
2072
2074
|
});
|
2073
|
-
const
|
2075
|
+
const j = Ve(_);
|
2074
2076
|
t.updateState(
|
2075
2077
|
{
|
2076
2078
|
trackItemDetailsMap: { ...v },
|
2077
|
-
trackItemsMap: { ...
|
2078
|
-
duration:
|
2079
|
+
trackItemsMap: { ..._ },
|
2080
|
+
duration: j
|
2079
2081
|
},
|
2080
2082
|
{
|
2081
2083
|
updateHistory: !0,
|
@@ -2086,47 +2088,47 @@ function qi(t) {
|
|
2086
2088
|
});
|
2087
2089
|
return {
|
2088
2090
|
unsubscribe: () => {
|
2089
|
-
|
2091
|
+
k.unsubscribe(), H.unsubscribe(), b.unsubscribe(), x.unsubscribe(), F.unsubscribe(), d.unsubscribe();
|
2090
2092
|
}
|
2091
2093
|
};
|
2092
2094
|
}
|
2093
|
-
const
|
2095
|
+
const Zi = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
2094
2096
|
function ni(t, r, n = { cyclesFix: !0 }, i = []) {
|
2095
|
-
var d,
|
2096
|
-
let
|
2097
|
+
var d, x;
|
2098
|
+
let s = [];
|
2097
2099
|
const c = Array.isArray(t);
|
2098
|
-
for (const
|
2099
|
-
const
|
2100
|
-
if (!(
|
2101
|
-
|
2100
|
+
for (const F in t) {
|
2101
|
+
const k = t[F], H = c ? +F : F;
|
2102
|
+
if (!(F in r)) {
|
2103
|
+
s.push({
|
2102
2104
|
type: "REMOVE",
|
2103
2105
|
path: [H],
|
2104
|
-
oldValue: t[
|
2106
|
+
oldValue: t[F]
|
2105
2107
|
});
|
2106
2108
|
continue;
|
2107
2109
|
}
|
2108
|
-
const
|
2109
|
-
if (
|
2110
|
-
const h = ni(
|
2111
|
-
|
2112
|
-
} else
|
2113
|
-
!(Number.isNaN(
|
2110
|
+
const b = r[F], p = typeof k == "object" && typeof b == "object" && Array.isArray(k) === Array.isArray(b);
|
2111
|
+
if (k && b && p && !Zi[(x = (d = Object.getPrototypeOf(k)) == null ? void 0 : d.constructor) == null ? void 0 : x.name] && (!n.cyclesFix || !i.includes(k))) {
|
2112
|
+
const h = ni(k, b, n, n.cyclesFix ? i.concat([k]) : []);
|
2113
|
+
s.push.apply(s, h.map((l) => (l.path.unshift(H), l)));
|
2114
|
+
} else k !== b && // treat NaN values as equivalent
|
2115
|
+
!(Number.isNaN(k) && Number.isNaN(b)) && !(p && (isNaN(k) ? k + "" == b + "" : +k == +b)) && s.push({
|
2114
2116
|
path: [H],
|
2115
2117
|
type: "CHANGE",
|
2116
|
-
value:
|
2117
|
-
oldValue:
|
2118
|
+
value: b,
|
2119
|
+
oldValue: k
|
2118
2120
|
});
|
2119
2121
|
}
|
2120
2122
|
const f = Array.isArray(r);
|
2121
|
-
for (const
|
2122
|
-
|
2123
|
+
for (const F in r)
|
2124
|
+
F in t || s.push({
|
2123
2125
|
type: "CREATE",
|
2124
|
-
path: [f ? +
|
2125
|
-
value: r[
|
2126
|
+
path: [f ? +F : F],
|
2127
|
+
value: r[F]
|
2126
2128
|
});
|
2127
|
-
return
|
2129
|
+
return s;
|
2128
2130
|
}
|
2129
|
-
var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"),
|
2131
|
+
var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"), Q = Symbol.for("immer-state"), ii = process.env.NODE_ENV !== "production" ? [
|
2130
2132
|
// All error codes, starting by 0:
|
2131
2133
|
function(t) {
|
2132
2134
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
@@ -2166,44 +2168,44 @@ function G(t, ...r) {
|
|
2166
2168
|
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
2167
2169
|
);
|
2168
2170
|
}
|
2169
|
-
var
|
2170
|
-
function
|
2171
|
-
return !!t && !!t[
|
2171
|
+
var Mt = Object.getPrototypeOf;
|
2172
|
+
function Pt(t) {
|
2173
|
+
return !!t && !!t[Q];
|
2172
2174
|
}
|
2173
|
-
function
|
2175
|
+
function vt(t) {
|
2174
2176
|
var r;
|
2175
2177
|
return t ? ai(t) || Array.isArray(t) || !!t[pe] || !!((r = t.constructor) != null && r[pe]) || _e(t) || ve(t) : !1;
|
2176
2178
|
}
|
2177
|
-
var
|
2179
|
+
var Qi = Object.prototype.constructor.toString();
|
2178
2180
|
function ai(t) {
|
2179
2181
|
if (!t || typeof t != "object")
|
2180
2182
|
return !1;
|
2181
|
-
const r =
|
2183
|
+
const r = Mt(t);
|
2182
2184
|
if (r === null)
|
2183
2185
|
return !0;
|
2184
2186
|
const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
2185
|
-
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) ===
|
2187
|
+
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === Qi;
|
2186
2188
|
}
|
2187
2189
|
function de(t, r) {
|
2188
|
-
|
2190
|
+
Dt(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
2189
2191
|
r(n, t[n], t);
|
2190
2192
|
}) : t.forEach((n, i) => r(i, n, t));
|
2191
2193
|
}
|
2192
|
-
function
|
2193
|
-
const r = t[
|
2194
|
+
function Dt(t) {
|
2195
|
+
const r = t[Q];
|
2194
2196
|
return r ? r.type_ : Array.isArray(t) ? 1 : _e(t) ? 2 : ve(t) ? 3 : 0;
|
2195
2197
|
}
|
2196
2198
|
function he(t, r) {
|
2197
|
-
return
|
2199
|
+
return Dt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
2198
2200
|
}
|
2199
2201
|
function tn(t, r) {
|
2200
|
-
return
|
2202
|
+
return Dt(t) === 2 ? t.get(r) : t[r];
|
2201
2203
|
}
|
2202
2204
|
function si(t, r, n) {
|
2203
|
-
const i =
|
2205
|
+
const i = Dt(t);
|
2204
2206
|
i === 2 ? t.set(r, n) : i === 3 ? t.add(n) : t[r] = n;
|
2205
2207
|
}
|
2206
|
-
function
|
2208
|
+
function ta(t, r) {
|
2207
2209
|
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
2208
2210
|
}
|
2209
2211
|
function _e(t) {
|
@@ -2212,7 +2214,7 @@ function _e(t) {
|
|
2212
2214
|
function ve(t) {
|
2213
2215
|
return t instanceof Set;
|
2214
2216
|
}
|
2215
|
-
function
|
2217
|
+
function xt(t) {
|
2216
2218
|
return t.copy_ || t.base_;
|
2217
2219
|
}
|
2218
2220
|
function fn(t, r) {
|
@@ -2225,10 +2227,10 @@ function fn(t, r) {
|
|
2225
2227
|
const n = ai(t);
|
2226
2228
|
if (r === !0 || r === "class_only" && !n) {
|
2227
2229
|
const i = Object.getOwnPropertyDescriptors(t);
|
2228
|
-
delete i[
|
2229
|
-
let
|
2230
|
-
for (let c = 0; c <
|
2231
|
-
const f =
|
2230
|
+
delete i[Q];
|
2231
|
+
let s = Reflect.ownKeys(i);
|
2232
|
+
for (let c = 0; c < s.length; c++) {
|
2233
|
+
const f = s[c], d = i[f];
|
2232
2234
|
d.writable === !1 && (d.writable = !0, d.configurable = !0), (d.get || d.set) && (i[f] = {
|
2233
2235
|
configurable: !0,
|
2234
2236
|
writable: !0,
|
@@ -2237,37 +2239,37 @@ function fn(t, r) {
|
|
2237
2239
|
value: t[f]
|
2238
2240
|
});
|
2239
2241
|
}
|
2240
|
-
return Object.create(
|
2242
|
+
return Object.create(Mt(t), i);
|
2241
2243
|
} else {
|
2242
|
-
const i =
|
2244
|
+
const i = Mt(t);
|
2243
2245
|
if (i !== null && n)
|
2244
2246
|
return { ...t };
|
2245
|
-
const
|
2246
|
-
return Object.assign(
|
2247
|
+
const s = Object.create(i);
|
2248
|
+
return Object.assign(s, t);
|
2247
2249
|
}
|
2248
2250
|
}
|
2249
2251
|
function vn(t, r = !1) {
|
2250
|
-
return nr(t) ||
|
2252
|
+
return nr(t) || Pt(t) || !vt(t) || (Dt(t) > 1 && (t.set = t.add = t.clear = t.delete = ea), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => vn(i, !0))), t;
|
2251
2253
|
}
|
2252
|
-
function
|
2254
|
+
function ea() {
|
2253
2255
|
G(2);
|
2254
2256
|
}
|
2255
2257
|
function nr(t) {
|
2256
2258
|
return Object.isFrozen(t);
|
2257
2259
|
}
|
2258
2260
|
var pn = {};
|
2259
|
-
function
|
2261
|
+
function Ct(t) {
|
2260
2262
|
const r = pn[t];
|
2261
2263
|
return r || G(0, t), r;
|
2262
2264
|
}
|
2263
|
-
function
|
2265
|
+
function ra(t, r) {
|
2264
2266
|
pn[t] || (pn[t] = r);
|
2265
2267
|
}
|
2266
2268
|
var ye;
|
2267
2269
|
function oi() {
|
2268
2270
|
return ye;
|
2269
2271
|
}
|
2270
|
-
function
|
2272
|
+
function na(t, r) {
|
2271
2273
|
return {
|
2272
2274
|
drafts_: [],
|
2273
2275
|
parent_: t,
|
@@ -2279,26 +2281,26 @@ function ra(t, r) {
|
|
2279
2281
|
};
|
2280
2282
|
}
|
2281
2283
|
function zn(t, r) {
|
2282
|
-
r && (
|
2284
|
+
r && (Ct("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
2283
2285
|
}
|
2284
2286
|
function dn(t) {
|
2285
|
-
hn(t), t.drafts_.forEach(
|
2287
|
+
hn(t), t.drafts_.forEach(ia), t.drafts_ = null;
|
2286
2288
|
}
|
2287
2289
|
function hn(t) {
|
2288
2290
|
t === ye && (ye = t.parent_);
|
2289
2291
|
}
|
2290
2292
|
function Nn(t) {
|
2291
|
-
return ye =
|
2293
|
+
return ye = na(ye, t);
|
2292
2294
|
}
|
2293
|
-
function
|
2294
|
-
const r = t[
|
2295
|
+
function ia(t) {
|
2296
|
+
const r = t[Q];
|
2295
2297
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
2296
2298
|
}
|
2297
2299
|
function Hn(t, r) {
|
2298
2300
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
2299
2301
|
const n = r.drafts_[0];
|
2300
|
-
return t !== void 0 && t !== n ? (n[
|
2301
|
-
n[
|
2302
|
+
return t !== void 0 && t !== n ? (n[Q].modified_ && (dn(r), G(4)), vt(t) && (t = Ze(r, t), r.parent_ || Qe(r, t)), r.patches_ && Ct("Patches").generateReplacementPatches_(
|
2303
|
+
n[Q].base_,
|
2302
2304
|
t,
|
2303
2305
|
r.patches_,
|
2304
2306
|
r.inversePatches_
|
@@ -2307,11 +2309,11 @@ function Hn(t, r) {
|
|
2307
2309
|
function Ze(t, r, n) {
|
2308
2310
|
if (nr(r))
|
2309
2311
|
return r;
|
2310
|
-
const i = r[
|
2312
|
+
const i = r[Q];
|
2311
2313
|
if (!i)
|
2312
2314
|
return de(
|
2313
2315
|
r,
|
2314
|
-
(
|
2316
|
+
(s, c) => Un(t, i, r, s, c, n)
|
2315
2317
|
), r;
|
2316
2318
|
if (i.scope_ !== t)
|
2317
2319
|
return r;
|
@@ -2319,12 +2321,12 @@ function Ze(t, r, n) {
|
|
2319
2321
|
return Qe(t, i.base_, !0), i.base_;
|
2320
2322
|
if (!i.finalized_) {
|
2321
2323
|
i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
|
2322
|
-
const
|
2323
|
-
let c =
|
2324
|
-
i.type_ === 3 && (c = new Set(
|
2324
|
+
const s = i.copy_;
|
2325
|
+
let c = s, f = !1;
|
2326
|
+
i.type_ === 3 && (c = new Set(s), s.clear(), f = !0), de(
|
2325
2327
|
c,
|
2326
|
-
(d,
|
2327
|
-
), Qe(t,
|
2328
|
+
(d, x) => Un(t, i, s, d, x, n, f)
|
2329
|
+
), Qe(t, s, !1), n && t.patches_ && Ct("Patches").generatePatches_(
|
2328
2330
|
i,
|
2329
2331
|
n,
|
2330
2332
|
t.patches_,
|
@@ -2333,25 +2335,25 @@ function Ze(t, r, n) {
|
|
2333
2335
|
}
|
2334
2336
|
return i.copy_;
|
2335
2337
|
}
|
2336
|
-
function Un(t, r, n, i,
|
2337
|
-
if (process.env.NODE_ENV !== "production" &&
|
2338
|
+
function Un(t, r, n, i, s, c, f) {
|
2339
|
+
if (process.env.NODE_ENV !== "production" && s === n && G(5), Pt(s)) {
|
2338
2340
|
const d = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2339
|
-
!he(r.assigned_, i) ? c.concat(i) : void 0,
|
2340
|
-
if (si(n, i,
|
2341
|
+
!he(r.assigned_, i) ? c.concat(i) : void 0, x = Ze(t, s, d);
|
2342
|
+
if (si(n, i, x), Pt(x))
|
2341
2343
|
t.canAutoFreeze_ = !1;
|
2342
2344
|
else
|
2343
2345
|
return;
|
2344
|
-
} else f && n.add(
|
2345
|
-
if (
|
2346
|
+
} else f && n.add(s);
|
2347
|
+
if (vt(s) && !nr(s)) {
|
2346
2348
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
2347
2349
|
return;
|
2348
|
-
Ze(t,
|
2350
|
+
Ze(t, s), (!r || !r.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(n, i) && Qe(t, s);
|
2349
2351
|
}
|
2350
2352
|
}
|
2351
2353
|
function Qe(t, r, n = !1) {
|
2352
2354
|
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && vn(r, n);
|
2353
2355
|
}
|
2354
|
-
function
|
2356
|
+
function aa(t, r) {
|
2355
2357
|
const n = Array.isArray(t), i = {
|
2356
2358
|
type_: n ? 1 : 0,
|
2357
2359
|
// Track which produce call this is associated with.
|
@@ -2375,36 +2377,36 @@ function ia(t, r) {
|
|
2375
2377
|
revoke_: null,
|
2376
2378
|
isManual_: !1
|
2377
2379
|
};
|
2378
|
-
let
|
2379
|
-
n && (
|
2380
|
-
const { revoke: f, proxy: d } = Proxy.revocable(
|
2380
|
+
let s = i, c = In;
|
2381
|
+
n && (s = [i], c = me);
|
2382
|
+
const { revoke: f, proxy: d } = Proxy.revocable(s, c);
|
2381
2383
|
return i.draft_ = d, i.revoke_ = f, d;
|
2382
2384
|
}
|
2383
2385
|
var In = {
|
2384
2386
|
get(t, r) {
|
2385
|
-
if (r ===
|
2387
|
+
if (r === Q)
|
2386
2388
|
return t;
|
2387
|
-
const n =
|
2389
|
+
const n = xt(t);
|
2388
2390
|
if (!he(n, r))
|
2389
|
-
return
|
2391
|
+
return sa(t, n, r);
|
2390
2392
|
const i = n[r];
|
2391
|
-
return t.finalized_ || !
|
2393
|
+
return t.finalized_ || !vt(i) ? i : i === en(t.base_, r) ? (rn(t), t.copy_[r] = mn(i, t)) : i;
|
2392
2394
|
},
|
2393
2395
|
has(t, r) {
|
2394
|
-
return r in
|
2396
|
+
return r in xt(t);
|
2395
2397
|
},
|
2396
2398
|
ownKeys(t) {
|
2397
|
-
return Reflect.ownKeys(
|
2399
|
+
return Reflect.ownKeys(xt(t));
|
2398
2400
|
},
|
2399
2401
|
set(t, r, n) {
|
2400
|
-
const i = ci(
|
2402
|
+
const i = ci(xt(t), r);
|
2401
2403
|
if (i != null && i.set)
|
2402
2404
|
return i.set.call(t.draft_, n), !0;
|
2403
2405
|
if (!t.modified_) {
|
2404
|
-
const
|
2406
|
+
const s = en(xt(t), r), c = s == null ? void 0 : s[Q];
|
2405
2407
|
if (c && c.base_ === n)
|
2406
2408
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2407
|
-
if (
|
2409
|
+
if (ta(n, s) && (n !== void 0 || he(t.base_, r)))
|
2408
2410
|
return !0;
|
2409
2411
|
rn(t), yn(t);
|
2410
2412
|
}
|
@@ -2418,7 +2420,7 @@ var In = {
|
|
2418
2420
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
2419
2421
|
// the same guarantee in ES5 mode.
|
2420
2422
|
getOwnPropertyDescriptor(t, r) {
|
2421
|
-
const n =
|
2423
|
+
const n = xt(t), i = Reflect.getOwnPropertyDescriptor(n, r);
|
2422
2424
|
return i && {
|
2423
2425
|
writable: !0,
|
2424
2426
|
configurable: t.type_ !== 1 || r !== "length",
|
@@ -2430,7 +2432,7 @@ var In = {
|
|
2430
2432
|
G(11);
|
2431
2433
|
},
|
2432
2434
|
getPrototypeOf(t) {
|
2433
|
-
return
|
2435
|
+
return Mt(t.base_);
|
2434
2436
|
},
|
2435
2437
|
setPrototypeOf() {
|
2436
2438
|
G(12);
|
@@ -2448,27 +2450,27 @@ me.set = function(t, r, n) {
|
|
2448
2450
|
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && G(14), In.set.call(this, t[0], r, n, t[0]);
|
2449
2451
|
};
|
2450
2452
|
function en(t, r) {
|
2451
|
-
const n = t[
|
2452
|
-
return (n ?
|
2453
|
+
const n = t[Q];
|
2454
|
+
return (n ? xt(n) : t)[r];
|
2453
2455
|
}
|
2454
|
-
function
|
2455
|
-
var
|
2456
|
+
function sa(t, r, n) {
|
2457
|
+
var s;
|
2456
2458
|
const i = ci(r, n);
|
2457
2459
|
return i ? "value" in i ? i.value : (
|
2458
2460
|
// This is a very special case, if the prop is a getter defined by the
|
2459
2461
|
// prototype, we should invoke it with the draft as context!
|
2460
|
-
(
|
2462
|
+
(s = i.get) == null ? void 0 : s.call(t.draft_)
|
2461
2463
|
) : void 0;
|
2462
2464
|
}
|
2463
2465
|
function ci(t, r) {
|
2464
2466
|
if (!(r in t))
|
2465
2467
|
return;
|
2466
|
-
let n =
|
2468
|
+
let n = Mt(t);
|
2467
2469
|
for (; n; ) {
|
2468
2470
|
const i = Object.getOwnPropertyDescriptor(n, r);
|
2469
2471
|
if (i)
|
2470
2472
|
return i;
|
2471
|
-
n =
|
2473
|
+
n = Mt(n);
|
2472
2474
|
}
|
2473
2475
|
}
|
2474
2476
|
function yn(t) {
|
@@ -2480,52 +2482,52 @@ function rn(t) {
|
|
2480
2482
|
t.scope_.immer_.useStrictShallowCopy_
|
2481
2483
|
));
|
2482
2484
|
}
|
2483
|
-
var
|
2485
|
+
var oa = class {
|
2484
2486
|
constructor(t) {
|
2485
2487
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, n, i) => {
|
2486
2488
|
if (typeof r == "function" && typeof n != "function") {
|
2487
2489
|
const c = n;
|
2488
2490
|
n = r;
|
2489
2491
|
const f = this;
|
2490
|
-
return function(
|
2491
|
-
return f.produce(
|
2492
|
+
return function(x = c, ...F) {
|
2493
|
+
return f.produce(x, (k) => n.call(this, k, ...F));
|
2492
2494
|
};
|
2493
2495
|
}
|
2494
2496
|
typeof n != "function" && G(6), i !== void 0 && typeof i != "function" && G(7);
|
2495
|
-
let
|
2496
|
-
if (
|
2497
|
+
let s;
|
2498
|
+
if (vt(r)) {
|
2497
2499
|
const c = Nn(this), f = mn(r, void 0);
|
2498
2500
|
let d = !0;
|
2499
2501
|
try {
|
2500
|
-
|
2502
|
+
s = n(f), d = !1;
|
2501
2503
|
} finally {
|
2502
2504
|
d ? dn(c) : hn(c);
|
2503
2505
|
}
|
2504
|
-
return zn(c, i), Hn(
|
2506
|
+
return zn(c, i), Hn(s, c);
|
2505
2507
|
} else if (!r || typeof r != "object") {
|
2506
|
-
if (
|
2508
|
+
if (s = n(r), s === void 0 && (s = r), s === _n && (s = void 0), this.autoFreeze_ && vn(s, !0), i) {
|
2507
2509
|
const c = [], f = [];
|
2508
|
-
|
2510
|
+
Ct("Patches").generateReplacementPatches_(r, s, c, f), i(c, f);
|
2509
2511
|
}
|
2510
|
-
return
|
2512
|
+
return s;
|
2511
2513
|
} else
|
2512
2514
|
G(1, r);
|
2513
2515
|
}, this.produceWithPatches = (r, n) => {
|
2514
2516
|
if (typeof r == "function")
|
2515
|
-
return (f, ...d) => this.produceWithPatches(f, (
|
2516
|
-
let i,
|
2517
|
+
return (f, ...d) => this.produceWithPatches(f, (x) => r(x, ...d));
|
2518
|
+
let i, s;
|
2517
2519
|
return [this.produce(r, n, (f, d) => {
|
2518
|
-
i = f,
|
2519
|
-
}), i,
|
2520
|
+
i = f, s = d;
|
2521
|
+
}), i, s];
|
2520
2522
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
2521
2523
|
}
|
2522
2524
|
createDraft(t) {
|
2523
|
-
|
2525
|
+
vt(t) || G(8), Pt(t) && (t = ca(t));
|
2524
2526
|
const r = Nn(this), n = mn(t, void 0);
|
2525
|
-
return n[
|
2527
|
+
return n[Q].isManual_ = !0, hn(r), n;
|
2526
2528
|
}
|
2527
2529
|
finishDraft(t, r) {
|
2528
|
-
const n = t && t[
|
2530
|
+
const n = t && t[Q];
|
2529
2531
|
(!n || !n.isManual_) && G(9);
|
2530
2532
|
const { scope_: i } = n;
|
2531
2533
|
return zn(i, r), Hn(void 0, i);
|
@@ -2549,31 +2551,31 @@ var sa = class {
|
|
2549
2551
|
applyPatches(t, r) {
|
2550
2552
|
let n;
|
2551
2553
|
for (n = r.length - 1; n >= 0; n--) {
|
2552
|
-
const
|
2553
|
-
if (
|
2554
|
-
t =
|
2554
|
+
const s = r[n];
|
2555
|
+
if (s.path.length === 0 && s.op === "replace") {
|
2556
|
+
t = s.value;
|
2555
2557
|
break;
|
2556
2558
|
}
|
2557
2559
|
}
|
2558
2560
|
n > -1 && (r = r.slice(n + 1));
|
2559
|
-
const i =
|
2560
|
-
return
|
2561
|
+
const i = Ct("Patches").applyPatches_;
|
2562
|
+
return Pt(t) ? i(t, r) : this.produce(
|
2561
2563
|
t,
|
2562
|
-
(
|
2564
|
+
(s) => i(s, r)
|
2563
2565
|
);
|
2564
2566
|
}
|
2565
2567
|
};
|
2566
2568
|
function mn(t, r) {
|
2567
|
-
const n = _e(t) ?
|
2569
|
+
const n = _e(t) ? Ct("MapSet").proxyMap_(t, r) : ve(t) ? Ct("MapSet").proxySet_(t, r) : aa(t, r);
|
2568
2570
|
return (r ? r.scope_ : oi()).drafts_.push(n), n;
|
2569
2571
|
}
|
2570
|
-
function
|
2571
|
-
return
|
2572
|
+
function ca(t) {
|
2573
|
+
return Pt(t) || G(10, t), ui(t);
|
2572
2574
|
}
|
2573
2575
|
function ui(t) {
|
2574
|
-
if (!
|
2576
|
+
if (!vt(t) || nr(t))
|
2575
2577
|
return t;
|
2576
|
-
const r = t[
|
2578
|
+
const r = t[Q];
|
2577
2579
|
let n;
|
2578
2580
|
if (r) {
|
2579
2581
|
if (!r.modified_)
|
@@ -2581,124 +2583,124 @@ function ui(t) {
|
|
2581
2583
|
r.finalized_ = !0, n = fn(t, r.scope_.immer_.useStrictShallowCopy_);
|
2582
2584
|
} else
|
2583
2585
|
n = fn(t, !0);
|
2584
|
-
return de(n, (i,
|
2585
|
-
si(n, i, ui(
|
2586
|
+
return de(n, (i, s) => {
|
2587
|
+
si(n, i, ui(s));
|
2586
2588
|
}), r && (r.finalized_ = !1), n;
|
2587
2589
|
}
|
2588
2590
|
function Ln() {
|
2589
2591
|
process.env.NODE_ENV !== "production" && ii.push(
|
2590
2592
|
'Sets cannot have "replace" patches.',
|
2591
|
-
function(
|
2592
|
-
return "Unsupported patch operation: " +
|
2593
|
+
function(b) {
|
2594
|
+
return "Unsupported patch operation: " + b;
|
2593
2595
|
},
|
2594
|
-
function(
|
2595
|
-
return "Cannot apply patch, path doesn't resolve: " +
|
2596
|
+
function(b) {
|
2597
|
+
return "Cannot apply patch, path doesn't resolve: " + b;
|
2596
2598
|
},
|
2597
2599
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
2598
2600
|
);
|
2599
2601
|
const r = "replace", n = "add", i = "remove";
|
2600
|
-
function
|
2601
|
-
switch (
|
2602
|
+
function s(b, p, h, l) {
|
2603
|
+
switch (b.type_) {
|
2602
2604
|
case 0:
|
2603
2605
|
case 2:
|
2604
2606
|
return f(
|
2605
|
-
|
2607
|
+
b,
|
2606
2608
|
p,
|
2607
2609
|
h,
|
2608
2610
|
l
|
2609
2611
|
);
|
2610
2612
|
case 1:
|
2611
|
-
return c(
|
2613
|
+
return c(b, p, h, l);
|
2612
2614
|
case 3:
|
2613
2615
|
return d(
|
2614
|
-
|
2616
|
+
b,
|
2615
2617
|
p,
|
2616
2618
|
h,
|
2617
2619
|
l
|
2618
2620
|
);
|
2619
2621
|
}
|
2620
2622
|
}
|
2621
|
-
function c(
|
2622
|
-
let { base_:
|
2623
|
-
|
2624
|
-
for (let
|
2625
|
-
if (v[
|
2626
|
-
const
|
2623
|
+
function c(b, p, h, l) {
|
2624
|
+
let { base_: g, assigned_: v } = b, _ = b.copy_;
|
2625
|
+
_.length < g.length && ([g, _] = [_, g], [h, l] = [l, h]);
|
2626
|
+
for (let y = 0; y < g.length; y++)
|
2627
|
+
if (v[y] && _[y] !== g[y]) {
|
2628
|
+
const m = p.concat([y]);
|
2627
2629
|
h.push({
|
2628
2630
|
op: r,
|
2629
|
-
path:
|
2631
|
+
path: m,
|
2630
2632
|
// Need to maybe clone it, as it can in fact be the original value
|
2631
2633
|
// due to the base/copy inversion at the start of this function
|
2632
|
-
value: H(
|
2634
|
+
value: H(_[y])
|
2633
2635
|
}), l.push({
|
2634
2636
|
op: r,
|
2635
|
-
path:
|
2636
|
-
value: H(
|
2637
|
+
path: m,
|
2638
|
+
value: H(g[y])
|
2637
2639
|
});
|
2638
2640
|
}
|
2639
|
-
for (let
|
2640
|
-
const
|
2641
|
+
for (let y = g.length; y < _.length; y++) {
|
2642
|
+
const m = p.concat([y]);
|
2641
2643
|
h.push({
|
2642
2644
|
op: n,
|
2643
|
-
path:
|
2645
|
+
path: m,
|
2644
2646
|
// Need to maybe clone it, as it can in fact be the original value
|
2645
2647
|
// due to the base/copy inversion at the start of this function
|
2646
|
-
value: H(
|
2648
|
+
value: H(_[y])
|
2647
2649
|
});
|
2648
2650
|
}
|
2649
|
-
for (let
|
2650
|
-
const
|
2651
|
+
for (let y = _.length - 1; g.length <= y; --y) {
|
2652
|
+
const m = p.concat([y]);
|
2651
2653
|
l.push({
|
2652
2654
|
op: i,
|
2653
|
-
path:
|
2655
|
+
path: m
|
2654
2656
|
});
|
2655
2657
|
}
|
2656
2658
|
}
|
2657
|
-
function f(
|
2658
|
-
const { base_:
|
2659
|
-
de(
|
2660
|
-
const
|
2661
|
-
if (
|
2659
|
+
function f(b, p, h, l) {
|
2660
|
+
const { base_: g, copy_: v } = b;
|
2661
|
+
de(b.assigned_, (_, y) => {
|
2662
|
+
const m = tn(g, _), j = tn(v, _), E = y ? he(g, _) ? r : n : i;
|
2663
|
+
if (m === j && E === r)
|
2662
2664
|
return;
|
2663
|
-
const
|
2664
|
-
h.push(
|
2665
|
-
|
2665
|
+
const I = p.concat(_);
|
2666
|
+
h.push(E === i ? { op: E, path: I } : { op: E, path: I, value: j }), l.push(
|
2667
|
+
E === n ? { op: i, path: I } : E === i ? { op: n, path: I, value: H(m) } : { op: r, path: I, value: H(m) }
|
2666
2668
|
);
|
2667
2669
|
});
|
2668
2670
|
}
|
2669
|
-
function d(
|
2670
|
-
let { base_:
|
2671
|
-
|
2672
|
-
if (!v.has(
|
2673
|
-
const
|
2671
|
+
function d(b, p, h, l) {
|
2672
|
+
let { base_: g, copy_: v } = b, _ = 0;
|
2673
|
+
g.forEach((y) => {
|
2674
|
+
if (!v.has(y)) {
|
2675
|
+
const m = p.concat([_]);
|
2674
2676
|
h.push({
|
2675
2677
|
op: i,
|
2676
|
-
path:
|
2677
|
-
value:
|
2678
|
+
path: m,
|
2679
|
+
value: y
|
2678
2680
|
}), l.unshift({
|
2679
2681
|
op: n,
|
2680
|
-
path:
|
2681
|
-
value:
|
2682
|
+
path: m,
|
2683
|
+
value: y
|
2682
2684
|
});
|
2683
2685
|
}
|
2684
|
-
|
2685
|
-
}),
|
2686
|
-
if (!
|
2687
|
-
const
|
2686
|
+
_++;
|
2687
|
+
}), _ = 0, v.forEach((y) => {
|
2688
|
+
if (!g.has(y)) {
|
2689
|
+
const m = p.concat([_]);
|
2688
2690
|
h.push({
|
2689
2691
|
op: n,
|
2690
|
-
path:
|
2691
|
-
value:
|
2692
|
+
path: m,
|
2693
|
+
value: y
|
2692
2694
|
}), l.unshift({
|
2693
2695
|
op: i,
|
2694
|
-
path:
|
2695
|
-
value:
|
2696
|
+
path: m,
|
2697
|
+
value: y
|
2696
2698
|
});
|
2697
2699
|
}
|
2698
|
-
|
2700
|
+
_++;
|
2699
2701
|
});
|
2700
2702
|
}
|
2701
|
-
function
|
2703
|
+
function x(b, p, h, l) {
|
2702
2704
|
h.push({
|
2703
2705
|
op: r,
|
2704
2706
|
path: [],
|
@@ -2706,92 +2708,92 @@ function Ln() {
|
|
2706
2708
|
}), l.push({
|
2707
2709
|
op: r,
|
2708
2710
|
path: [],
|
2709
|
-
value:
|
2711
|
+
value: b
|
2710
2712
|
});
|
2711
2713
|
}
|
2712
|
-
function
|
2714
|
+
function F(b, p) {
|
2713
2715
|
return p.forEach((h) => {
|
2714
|
-
const { path: l, op:
|
2715
|
-
let v =
|
2716
|
-
for (let
|
2717
|
-
const
|
2718
|
-
let
|
2719
|
-
typeof
|
2716
|
+
const { path: l, op: g } = h;
|
2717
|
+
let v = b;
|
2718
|
+
for (let j = 0; j < l.length - 1; j++) {
|
2719
|
+
const E = Dt(v);
|
2720
|
+
let I = l[j];
|
2721
|
+
typeof I != "string" && typeof I != "number" && (I = "" + I), (E === 0 || E === 1) && (I === "__proto__" || I === "constructor") && G(19), typeof v == "function" && I === "prototype" && G(19), v = tn(v, I), typeof v != "object" && G(18, l.join("/"));
|
2720
2722
|
}
|
2721
|
-
const
|
2722
|
-
switch (
|
2723
|
+
const _ = Dt(v), y = k(h.value), m = l[l.length - 1];
|
2724
|
+
switch (g) {
|
2723
2725
|
case r:
|
2724
|
-
switch (
|
2726
|
+
switch (_) {
|
2725
2727
|
case 2:
|
2726
|
-
return v.set(
|
2728
|
+
return v.set(m, y);
|
2727
2729
|
case 3:
|
2728
2730
|
G(16);
|
2729
2731
|
default:
|
2730
|
-
return v[
|
2732
|
+
return v[m] = y;
|
2731
2733
|
}
|
2732
2734
|
case n:
|
2733
|
-
switch (
|
2735
|
+
switch (_) {
|
2734
2736
|
case 1:
|
2735
|
-
return
|
2737
|
+
return m === "-" ? v.push(y) : v.splice(m, 0, y);
|
2736
2738
|
case 2:
|
2737
|
-
return v.set(
|
2739
|
+
return v.set(m, y);
|
2738
2740
|
case 3:
|
2739
|
-
return v.add(
|
2741
|
+
return v.add(y);
|
2740
2742
|
default:
|
2741
|
-
return v[
|
2743
|
+
return v[m] = y;
|
2742
2744
|
}
|
2743
2745
|
case i:
|
2744
|
-
switch (
|
2746
|
+
switch (_) {
|
2745
2747
|
case 1:
|
2746
|
-
return v.splice(
|
2748
|
+
return v.splice(m, 1);
|
2747
2749
|
case 2:
|
2748
|
-
return v.delete(
|
2750
|
+
return v.delete(m);
|
2749
2751
|
case 3:
|
2750
2752
|
return v.delete(h.value);
|
2751
2753
|
default:
|
2752
|
-
return delete v[
|
2754
|
+
return delete v[m];
|
2753
2755
|
}
|
2754
2756
|
default:
|
2755
|
-
G(17,
|
2757
|
+
G(17, g);
|
2756
2758
|
}
|
2757
|
-
}),
|
2758
|
-
}
|
2759
|
-
function
|
2760
|
-
if (!
|
2761
|
-
return
|
2762
|
-
if (Array.isArray(
|
2763
|
-
return
|
2764
|
-
if (_e(
|
2759
|
+
}), b;
|
2760
|
+
}
|
2761
|
+
function k(b) {
|
2762
|
+
if (!vt(b))
|
2763
|
+
return b;
|
2764
|
+
if (Array.isArray(b))
|
2765
|
+
return b.map(k);
|
2766
|
+
if (_e(b))
|
2765
2767
|
return new Map(
|
2766
|
-
Array.from(
|
2768
|
+
Array.from(b.entries()).map(([h, l]) => [h, k(l)])
|
2767
2769
|
);
|
2768
|
-
if (ve(
|
2769
|
-
return new Set(Array.from(
|
2770
|
-
const p = Object.create(
|
2771
|
-
for (const h in
|
2772
|
-
p[h] =
|
2773
|
-
return he(
|
2774
|
-
}
|
2775
|
-
function H(
|
2776
|
-
return
|
2777
|
-
}
|
2778
|
-
|
2779
|
-
applyPatches_:
|
2780
|
-
generatePatches_:
|
2781
|
-
generateReplacementPatches_:
|
2770
|
+
if (ve(b))
|
2771
|
+
return new Set(Array.from(b).map(k));
|
2772
|
+
const p = Object.create(Mt(b));
|
2773
|
+
for (const h in b)
|
2774
|
+
p[h] = k(b[h]);
|
2775
|
+
return he(b, pe) && (p[pe] = b[pe]), p;
|
2776
|
+
}
|
2777
|
+
function H(b) {
|
2778
|
+
return Pt(b) ? k(b) : b;
|
2779
|
+
}
|
2780
|
+
ra("Patches", {
|
2781
|
+
applyPatches_: F,
|
2782
|
+
generatePatches_: s,
|
2783
|
+
generateReplacementPatches_: x
|
2782
2784
|
});
|
2783
2785
|
}
|
2784
|
-
var
|
2785
|
-
|
2786
|
-
|
2786
|
+
var tt = new oa(), ua = tt.produce;
|
2787
|
+
tt.produceWithPatches.bind(
|
2788
|
+
tt
|
2787
2789
|
);
|
2788
|
-
|
2789
|
-
|
2790
|
-
var
|
2791
|
-
|
2792
|
-
|
2793
|
-
var
|
2794
|
-
function
|
2790
|
+
tt.setAutoFreeze.bind(tt);
|
2791
|
+
tt.setUseStrictShallowCopy.bind(tt);
|
2792
|
+
var la = tt.applyPatches.bind(tt);
|
2793
|
+
tt.createDraft.bind(tt);
|
2794
|
+
tt.finishDraft.bind(tt);
|
2795
|
+
var fa = 1 / 0, pa = 9007199254740991, da = "[object Arguments]", ha = "[object Function]", ya = "[object GeneratorFunction]", ma = "[object Symbol]", ba = typeof nt == "object" && nt && nt.Object === Object && nt, ga = typeof self == "object" && self && self.Object === Object && self, _a = ba || ga || Function("return this")();
|
2796
|
+
function va(t, r, n) {
|
2795
2797
|
switch (n.length) {
|
2796
2798
|
case 0:
|
2797
2799
|
return t.call(r);
|
@@ -2804,87 +2806,91 @@ function _a(t, r, n) {
|
|
2804
2806
|
}
|
2805
2807
|
return t.apply(r, n);
|
2806
2808
|
}
|
2807
|
-
function va(t, r) {
|
2808
|
-
for (var n = -1, i = t ? t.length : 0, o = Array(i); ++n < i; )
|
2809
|
-
o[n] = r(t[n], n, t);
|
2810
|
-
return o;
|
2811
|
-
}
|
2812
2809
|
function Ia(t, r) {
|
2813
|
-
for (var n = -1, i =
|
2814
|
-
|
2810
|
+
for (var n = -1, i = t ? t.length : 0, s = Array(i); ++n < i; )
|
2811
|
+
s[n] = r(t[n], n, t);
|
2812
|
+
return s;
|
2813
|
+
}
|
2814
|
+
function Sa(t, r) {
|
2815
|
+
for (var n = -1, i = r.length, s = t.length; ++n < i; )
|
2816
|
+
t[s + n] = r[n];
|
2815
2817
|
return t;
|
2816
2818
|
}
|
2817
|
-
var Sn = Object.prototype,
|
2818
|
-
function
|
2819
|
+
var Sn = Object.prototype, wa = Sn.hasOwnProperty, wn = Sn.toString, Gn = _a.Symbol, Ta = Sn.propertyIsEnumerable, Wn = Gn ? Gn.isConcatSpreadable : void 0, Bn = Math.max;
|
2820
|
+
function ka(t, r, n, i, s) {
|
2819
2821
|
var c = -1, f = t.length;
|
2820
|
-
for (n || (n =
|
2822
|
+
for (n || (n = xa), s || (s = []); ++c < f; ) {
|
2821
2823
|
var d = t[c];
|
2822
|
-
n(d) ?
|
2824
|
+
n(d) ? Sa(s, d) : s[s.length] = d;
|
2823
2825
|
}
|
2824
|
-
return
|
2826
|
+
return s;
|
2825
2827
|
}
|
2826
|
-
function
|
2828
|
+
function Ea(t, r) {
|
2827
2829
|
return t = Object(t), Aa(t, r, function(n, i) {
|
2828
2830
|
return i in t;
|
2829
2831
|
});
|
2830
2832
|
}
|
2831
2833
|
function Aa(t, r, n) {
|
2832
|
-
for (var i = -1,
|
2834
|
+
for (var i = -1, s = r.length, c = {}; ++i < s; ) {
|
2833
2835
|
var f = r[i], d = t[f];
|
2834
2836
|
n(d, f) && (c[f] = d);
|
2835
2837
|
}
|
2836
2838
|
return c;
|
2837
2839
|
}
|
2838
|
-
function
|
2840
|
+
function Oa(t, r) {
|
2839
2841
|
return r = Bn(r === void 0 ? t.length - 1 : r, 0), function() {
|
2840
|
-
for (var n = arguments, i = -1,
|
2842
|
+
for (var n = arguments, i = -1, s = Bn(n.length - r, 0), c = Array(s); ++i < s; )
|
2841
2843
|
c[i] = n[r + i];
|
2842
2844
|
i = -1;
|
2843
2845
|
for (var f = Array(r + 1); ++i < r; )
|
2844
2846
|
f[i] = n[i];
|
2845
|
-
return f[r] = c,
|
2847
|
+
return f[r] = c, va(t, this, f);
|
2846
2848
|
};
|
2847
2849
|
}
|
2848
|
-
function Oa(t) {
|
2849
|
-
return Pa(t) || Ma(t) || !!(Wn && t && t[Wn]);
|
2850
|
-
}
|
2851
2850
|
function xa(t) {
|
2852
|
-
|
2853
|
-
return t;
|
2854
|
-
var r = t + "";
|
2855
|
-
return r == "0" && 1 / t == -la ? "-0" : r;
|
2851
|
+
return Da(t) || Pa(t) || !!(Wn && t && t[Wn]);
|
2856
2852
|
}
|
2857
2853
|
function Ma(t) {
|
2858
|
-
|
2854
|
+
if (typeof t == "string" || Na(t))
|
2855
|
+
return t;
|
2856
|
+
var r = t + "";
|
2857
|
+
return r == "0" && 1 / t == -fa ? "-0" : r;
|
2859
2858
|
}
|
2860
|
-
|
2861
|
-
|
2862
|
-
return t != null && Ra(t.length) && !ja(t);
|
2859
|
+
function Pa(t) {
|
2860
|
+
return ja(t) && wa.call(t, "callee") && (!Ta.call(t, "callee") || wn.call(t) == da);
|
2863
2861
|
}
|
2862
|
+
var Da = Array.isArray;
|
2864
2863
|
function Ca(t) {
|
2865
|
-
return
|
2864
|
+
return t != null && Fa(t.length) && !Ra(t);
|
2866
2865
|
}
|
2867
2866
|
function ja(t) {
|
2868
|
-
|
2869
|
-
return r == da || r == ha;
|
2867
|
+
return li(t) && Ca(t);
|
2870
2868
|
}
|
2871
2869
|
function Ra(t) {
|
2872
|
-
|
2870
|
+
var r = za(t) ? wn.call(t) : "";
|
2871
|
+
return r == ha || r == ya;
|
2873
2872
|
}
|
2874
2873
|
function Fa(t) {
|
2874
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= pa;
|
2875
|
+
}
|
2876
|
+
function za(t) {
|
2875
2877
|
var r = typeof t;
|
2876
2878
|
return !!t && (r == "object" || r == "function");
|
2877
2879
|
}
|
2878
2880
|
function li(t) {
|
2879
2881
|
return !!t && typeof t == "object";
|
2880
2882
|
}
|
2881
|
-
function
|
2882
|
-
return typeof t == "symbol" || li(t) && wn.call(t) ==
|
2883
|
-
}
|
2884
|
-
var
|
2885
|
-
return t == null ? {} :
|
2886
|
-
}),
|
2887
|
-
const $n = /* @__PURE__ */ bn(
|
2883
|
+
function Na(t) {
|
2884
|
+
return typeof t == "symbol" || li(t) && wn.call(t) == ma;
|
2885
|
+
}
|
2886
|
+
var Ha = Oa(function(t, r) {
|
2887
|
+
return t == null ? {} : Ea(t, Ia(ka(r), Ma));
|
2888
|
+
}), Ua = Ha;
|
2889
|
+
const $n = /* @__PURE__ */ bn(Ua), La = {
|
2890
|
+
width: 1080,
|
2891
|
+
height: 1920
|
2892
|
+
}, Ga = {
|
2893
|
+
size: La,
|
2888
2894
|
tracks: [],
|
2889
2895
|
trackItemIds: [],
|
2890
2896
|
trackItemsMap: {},
|
@@ -2906,22 +2912,22 @@ const $n = /* @__PURE__ */ bn(Ha), Ua = {
|
|
2906
2912
|
"transitionsMap",
|
2907
2913
|
"trackItemIds"
|
2908
2914
|
];
|
2909
|
-
class
|
2915
|
+
class $a {
|
2910
2916
|
constructor(r) {
|
2911
|
-
|
2912
|
-
|
2913
|
-
|
2914
|
-
|
2915
|
-
|
2916
|
-
|
2917
|
-
const n = r ||
|
2917
|
+
Ot(this, "stateSubject");
|
2918
|
+
Ot(this, "stateHistorySubject");
|
2919
|
+
Ot(this, "prevState");
|
2920
|
+
Ot(this, "undos", []);
|
2921
|
+
Ot(this, "redos", []);
|
2922
|
+
Ot(this, "listener");
|
2923
|
+
const n = r || Ga;
|
2918
2924
|
this.stateSubject = new Mn(n), this.stateHistorySubject = new Mn({
|
2919
2925
|
handleRedo: !1,
|
2920
2926
|
handleUndo: !1
|
2921
2927
|
}), this.prevState = n, this.initListeners();
|
2922
2928
|
}
|
2923
2929
|
initListeners() {
|
2924
|
-
|
2930
|
+
Ji(this);
|
2925
2931
|
}
|
2926
2932
|
destroyListeners() {
|
2927
2933
|
this.listener && this.listener.unsubscribe();
|
@@ -2930,7 +2936,7 @@ class Wa {
|
|
2930
2936
|
this.destroyListeners();
|
2931
2937
|
}
|
2932
2938
|
updateHistory(r, n) {
|
2933
|
-
const i = $n(r, Kn),
|
2939
|
+
const i = $n(r, Kn), s = $n(this.getState(), Kn), c = ni(s, i);
|
2934
2940
|
c.length && (this.undos.push({ undos: c, type: n }), this.redos = []);
|
2935
2941
|
}
|
2936
2942
|
getStateHistory() {
|
@@ -2949,26 +2955,32 @@ class Wa {
|
|
2949
2955
|
}
|
2950
2956
|
// Update the state, emitting only if the part of the state has changed
|
2951
2957
|
updateState(r, n = { updateHistory: !1 }) {
|
2952
|
-
const i = this.getState(),
|
2958
|
+
const i = this.getState(), s = {
|
2953
2959
|
...i,
|
2954
2960
|
...r
|
2955
2961
|
};
|
2956
|
-
|
2962
|
+
rt(i, s) || (n.updateHistory && this.updateHistory(s, n.kind), this.prevState = i, this.stateSubject.next(s));
|
2963
|
+
}
|
2964
|
+
// emit changes for design size
|
2965
|
+
subscribeToSize(r) {
|
2966
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
2967
|
+
rt(n.size, this.prevState.size) || r({ size: n.size });
|
2968
|
+
});
|
2957
2969
|
}
|
2958
2970
|
// Selectively subscribe to scale changes
|
2959
2971
|
subscribeToScale(r) {
|
2960
2972
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2961
|
-
|
2973
|
+
rt(n.scale, this.prevState.scale) || r({ scale: n.scale });
|
2962
2974
|
});
|
2963
2975
|
}
|
2964
2976
|
subscribeToUpdateTrackItem(r) {
|
2965
2977
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2966
|
-
|
2978
|
+
rt(n.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: n.trackItemsMap });
|
2967
2979
|
});
|
2968
2980
|
}
|
2969
2981
|
subscribeToUpdateItemDetails(r) {
|
2970
2982
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2971
|
-
|
2983
|
+
rt(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
|
2972
2984
|
});
|
2973
2985
|
}
|
2974
2986
|
// Selectively subscribe to duration changes
|
@@ -2991,19 +3003,19 @@ class Wa {
|
|
2991
3003
|
}
|
2992
3004
|
subscribeToAddOrRemoveItems(r) {
|
2993
3005
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2994
|
-
|
3006
|
+
rt(n.trackItemIds, this.prevState.trackItemIds) || r({ trackItemIds: n.trackItemIds });
|
2995
3007
|
});
|
2996
3008
|
}
|
2997
3009
|
// Selectively subscribe to activeIds changes
|
2998
3010
|
subscribeToActiveIds(r) {
|
2999
3011
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3000
|
-
|
3012
|
+
rt(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
|
3001
3013
|
});
|
3002
3014
|
}
|
3003
3015
|
// Selectively subscribe to multiple track-related properties
|
3004
3016
|
subscribeToTracks(r) {
|
3005
3017
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3006
|
-
(!
|
3018
|
+
(!rt(n.tracks, this.prevState.tracks) || !rt(n.trackItemIds, this.prevState.trackItemIds) || !rt(n.trackItemsMap, this.prevState.trackItemsMap) || !rt(n.transitionIds, this.prevState.transitionIds) || !rt(n.transitionsMap, this.prevState.transitionsMap)) && r({
|
3007
3019
|
tracks: n.tracks,
|
3008
3020
|
trackItemIds: n.trackItemIds,
|
3009
3021
|
trackItemsMap: n.trackItemsMap,
|
@@ -3018,68 +3030,68 @@ class Wa {
|
|
3018
3030
|
if (!n || !i) return;
|
3019
3031
|
Ln();
|
3020
3032
|
const {
|
3021
|
-
trackItemDetailsMap:
|
3033
|
+
trackItemDetailsMap: s,
|
3022
3034
|
trackItemIds: c,
|
3023
3035
|
tracks: f,
|
3024
3036
|
transitionIds: d,
|
3025
|
-
transitionsMap:
|
3026
|
-
trackItemsMap:
|
3027
|
-
} = this.getState(),
|
3028
|
-
trackItemDetailsMap:
|
3037
|
+
transitionsMap: x,
|
3038
|
+
trackItemsMap: F
|
3039
|
+
} = this.getState(), k = Z({
|
3040
|
+
trackItemDetailsMap: s,
|
3029
3041
|
trackItemIds: c,
|
3030
3042
|
tracks: f,
|
3031
3043
|
transitionIds: d,
|
3032
|
-
transitionsMap:
|
3033
|
-
trackItemsMap:
|
3034
|
-
}), H = [],
|
3035
|
-
n.forEach((
|
3036
|
-
let
|
3037
|
-
const
|
3038
|
-
|
3039
|
-
path:
|
3044
|
+
transitionsMap: x,
|
3045
|
+
trackItemsMap: F
|
3046
|
+
}), H = [], b = [], p = [], h = [], l = [], g = [];
|
3047
|
+
n.forEach((T) => {
|
3048
|
+
let A;
|
3049
|
+
const M = T.path.slice(1);
|
3050
|
+
T.type === "CREATE" ? A = {
|
3051
|
+
path: M,
|
3040
3052
|
op: "remove",
|
3041
|
-
value:
|
3042
|
-
} :
|
3043
|
-
path:
|
3053
|
+
value: T.value
|
3054
|
+
} : T.type === "CHANGE" ? A = {
|
3055
|
+
path: M,
|
3044
3056
|
op: "replace",
|
3045
|
-
value:
|
3046
|
-
} :
|
3047
|
-
path:
|
3057
|
+
value: T.oldValue
|
3058
|
+
} : A = {
|
3059
|
+
path: M,
|
3048
3060
|
op: "add",
|
3049
|
-
value:
|
3050
|
-
},
|
3061
|
+
value: T.oldValue
|
3062
|
+
}, T.path.includes("trackItemIds") ? p.push(A) : T.path.includes("transitionIds") ? b.push(A) : T.path.includes("trackItemsMap") ? l.push(A) : T.path.includes("transitionsMap") ? h.push(A) : T.path.includes("tracks") ? H.push(A) : T.path.includes("trackItemDetailsMap") && g.push(A);
|
3051
3063
|
});
|
3052
3064
|
const v = this.applyPatch(
|
3053
|
-
|
3065
|
+
k.tracks,
|
3054
3066
|
H
|
3055
|
-
), m = this.applyPatch(
|
3056
|
-
T.transitionIds,
|
3057
|
-
y
|
3058
|
-
), g = this.applyPatch(
|
3059
|
-
T.trackItemIds,
|
3060
|
-
p
|
3061
3067
|
), _ = this.applyPatch(
|
3062
|
-
|
3068
|
+
k.transitionIds,
|
3069
|
+
b
|
3070
|
+
), y = this.applyPatch(
|
3071
|
+
k.trackItemIds,
|
3072
|
+
p
|
3073
|
+
), m = this.applyPatch(
|
3074
|
+
k.transitionsMap,
|
3063
3075
|
h
|
3064
|
-
),
|
3065
|
-
|
3076
|
+
), j = this.applyPatch(
|
3077
|
+
k.trackItemsMap,
|
3066
3078
|
l
|
3067
|
-
),
|
3068
|
-
|
3069
|
-
|
3070
|
-
),
|
3079
|
+
), E = this.applyPatch(
|
3080
|
+
k.trackItemDetailsMap,
|
3081
|
+
g
|
3082
|
+
), I = Z({
|
3071
3083
|
tracks: v,
|
3072
|
-
transitionIds:
|
3073
|
-
trackItemIds:
|
3074
|
-
transitionsMap:
|
3075
|
-
trackItemsMap:
|
3076
|
-
trackItemDetailsMap:
|
3077
|
-
}),
|
3078
|
-
this.prevState =
|
3084
|
+
transitionIds: _,
|
3085
|
+
trackItemIds: y,
|
3086
|
+
transitionsMap: m,
|
3087
|
+
trackItemsMap: j,
|
3088
|
+
trackItemDetailsMap: E
|
3089
|
+
}), P = Z(this.getState()), S = { ...P, ...I };
|
3090
|
+
this.prevState = P, this.redos.push({ redos: n, type: i }), this.stateSubject.next(S), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3079
3091
|
}
|
3080
3092
|
applyPatch(r, n) {
|
3081
|
-
return n.reverse().reduce((i,
|
3082
|
-
|
3093
|
+
return n.reverse().reduce((i, s) => ua(i, (c) => {
|
3094
|
+
la(c, [s]);
|
3083
3095
|
}), r);
|
3084
3096
|
}
|
3085
3097
|
redo() {
|
@@ -3087,66 +3099,66 @@ class Wa {
|
|
3087
3099
|
if (!n || !i) return;
|
3088
3100
|
Ln();
|
3089
3101
|
const {
|
3090
|
-
trackItemDetailsMap:
|
3102
|
+
trackItemDetailsMap: s,
|
3091
3103
|
trackItemIds: c,
|
3092
3104
|
tracks: f,
|
3093
3105
|
transitionIds: d,
|
3094
|
-
transitionsMap:
|
3095
|
-
trackItemsMap:
|
3096
|
-
} = this.getState(),
|
3097
|
-
trackItemDetailsMap:
|
3106
|
+
transitionsMap: x,
|
3107
|
+
trackItemsMap: F
|
3108
|
+
} = this.getState(), k = Z({
|
3109
|
+
trackItemDetailsMap: s,
|
3098
3110
|
trackItemIds: c,
|
3099
3111
|
tracks: f,
|
3100
3112
|
transitionIds: d,
|
3101
|
-
transitionsMap:
|
3102
|
-
trackItemsMap:
|
3103
|
-
}), H = [],
|
3104
|
-
n.forEach((
|
3105
|
-
let
|
3106
|
-
const
|
3107
|
-
|
3108
|
-
path:
|
3113
|
+
transitionsMap: x,
|
3114
|
+
trackItemsMap: F
|
3115
|
+
}), H = [], b = [], p = [], h = [], l = [], g = [];
|
3116
|
+
n.forEach((T) => {
|
3117
|
+
let A;
|
3118
|
+
const M = T.path.slice(1);
|
3119
|
+
T.type === "CREATE" ? A = {
|
3120
|
+
path: M,
|
3109
3121
|
op: "add",
|
3110
|
-
value:
|
3111
|
-
} :
|
3112
|
-
path:
|
3122
|
+
value: T.value
|
3123
|
+
} : T.type === "CHANGE" ? A = {
|
3124
|
+
path: M,
|
3113
3125
|
op: "replace",
|
3114
|
-
value:
|
3115
|
-
} :
|
3116
|
-
path:
|
3126
|
+
value: T.value
|
3127
|
+
} : A = {
|
3128
|
+
path: M,
|
3117
3129
|
op: "remove",
|
3118
|
-
value:
|
3119
|
-
},
|
3130
|
+
value: T.oldValue
|
3131
|
+
}, T.path.includes("trackItemIds") ? p.push(A) : T.path.includes("transitionIds") ? b.push(A) : T.path.includes("trackItemsMap") ? l.push(A) : T.path.includes("transitionsMap") ? h.push(A) : T.path.includes("trackItemDetailsMap") ? g.push(A) : H.push(A);
|
3120
3132
|
});
|
3121
3133
|
const v = this.applyPatch(
|
3122
|
-
|
3134
|
+
k.tracks,
|
3123
3135
|
H
|
3124
|
-
), m = this.applyPatch(
|
3125
|
-
T.transitionIds,
|
3126
|
-
y
|
3127
|
-
), g = this.applyPatch(
|
3128
|
-
T.trackItemIds,
|
3129
|
-
p
|
3130
3136
|
), _ = this.applyPatch(
|
3131
|
-
|
3137
|
+
k.transitionIds,
|
3138
|
+
b
|
3139
|
+
), y = this.applyPatch(
|
3140
|
+
k.trackItemIds,
|
3141
|
+
p
|
3142
|
+
), m = this.applyPatch(
|
3143
|
+
k.transitionsMap,
|
3132
3144
|
h
|
3133
|
-
),
|
3134
|
-
|
3145
|
+
), j = this.applyPatch(
|
3146
|
+
k.trackItemsMap,
|
3135
3147
|
l
|
3136
|
-
),
|
3137
|
-
|
3138
|
-
|
3139
|
-
),
|
3148
|
+
), E = this.applyPatch(
|
3149
|
+
k.trackItemDetailsMap,
|
3150
|
+
g
|
3151
|
+
), I = Z({
|
3140
3152
|
tracks: v,
|
3141
|
-
transitionIds:
|
3142
|
-
trackItemIds:
|
3143
|
-
transitionsMap:
|
3144
|
-
trackItemsMap:
|
3145
|
-
trackItemDetailsMap:
|
3146
|
-
}),
|
3147
|
-
this.prevState =
|
3153
|
+
transitionIds: _,
|
3154
|
+
trackItemIds: y,
|
3155
|
+
transitionsMap: m,
|
3156
|
+
trackItemsMap: j,
|
3157
|
+
trackItemDetailsMap: E
|
3158
|
+
}), P = Z(this.getState()), S = { ...P, ...I };
|
3159
|
+
this.prevState = P, this.undos.push({ undos: n, type: i }), this.stateSubject.next(S), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3148
3160
|
}
|
3149
3161
|
}
|
3150
3162
|
export {
|
3151
|
-
|
3163
|
+
$a as default
|
3152
3164
|
};
|