@designcombo/state 0.1.31 → 0.1.33
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +1211 -1164
- package/dist/index.umd.js +2 -2
- package/dist/utils/find-track.d.ts +6 -0
- package/dist/utils/math.d.ts +8 -0
- package/package.json +6 -6
- package/dist/utils/validateColision.d.ts +0 -3
package/dist/index.es.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
import { subject as
|
1
|
+
var hi = Object.defineProperty;
|
2
|
+
var mi = (t, r, n) => r in t ? hi(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
|
3
|
+
var Pt = (t, r, n) => mi(t, typeof r != "symbol" ? r + "" : r, n);
|
4
|
+
import { subject as qt, filter as Jt, DESIGN_PREFIX as yi, ADD_PREFIX as bi, LAYER_PREFIX as gi, HISTORY_PREFIX as _i, ACTIVE_PREFIX as Ii, EDIT_PREFIX as vi, DESIGN_LOAD as Si, DESIGN_RESIZE as wi, HISTORY_UNDO as ki, HISTORY_REDO as Ti, LAYER_DELETE as Ei, LAYER_CLONE as Mi, ADD_CAPTION as Ai, ADD_TEXT as Oi, ADD_TEMPLATE as xi, ADD_IMAGE as Di, ADD_AUDIO as Pi, ADD_VIDEO as Ci, ACTIVE_SPLIT as Ri, ACTIVE_CLONE as Fi, ACTIVE_PASTE as ji, DELETE_TEMPLATE_ITEM as zi, EDIT_OBJECT as Hi, EDIT_TEMPLATE_ITEM as Ni, CLOSE_EDIT_TEMPLATE as Li } from "@designcombo/events";
|
5
5
|
var sn = function(t, r) {
|
6
6
|
return sn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
7
7
|
n.__proto__ = i;
|
@@ -9,7 +9,7 @@ var sn = function(t, r) {
|
|
9
9
|
for (var s in i) Object.prototype.hasOwnProperty.call(i, s) && (n[s] = i[s]);
|
10
10
|
}, sn(t, r);
|
11
11
|
};
|
12
|
-
function
|
12
|
+
function Te(t, r) {
|
13
13
|
if (typeof r != "function" && r !== null)
|
14
14
|
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
15
15
|
sn(t, r);
|
@@ -34,8 +34,8 @@ function cn(t, r) {
|
|
34
34
|
var i = n.call(t), s, c = [], h;
|
35
35
|
try {
|
36
36
|
for (; (r === void 0 || r-- > 0) && !(s = i.next()).done; ) c.push(s.value);
|
37
|
-
} catch (
|
38
|
-
h = { error:
|
37
|
+
} catch (y) {
|
38
|
+
h = { error: y };
|
39
39
|
} finally {
|
40
40
|
try {
|
41
41
|
s && !s.done && (n = i.return) && n.call(i);
|
@@ -53,13 +53,13 @@ function un(t, r, n) {
|
|
53
53
|
function It(t) {
|
54
54
|
return typeof t == "function";
|
55
55
|
}
|
56
|
-
function
|
56
|
+
function Vn(t) {
|
57
57
|
var r = function(i) {
|
58
58
|
Error.call(i), i.stack = new Error().stack;
|
59
59
|
}, n = t(r);
|
60
60
|
return n.prototype = Object.create(Error.prototype), n.prototype.constructor = n, n;
|
61
61
|
}
|
62
|
-
var Qr =
|
62
|
+
var Qr = Vn(function(t) {
|
63
63
|
return function(n) {
|
64
64
|
t(this), this.message = n ? n.length + ` errors occurred during unsubscription:
|
65
65
|
` + n.map(function(i, s) {
|
@@ -74,7 +74,7 @@ function ln(t, r) {
|
|
74
74
|
0 <= n && t.splice(n, 1);
|
75
75
|
}
|
76
76
|
}
|
77
|
-
var
|
77
|
+
var sr = function() {
|
78
78
|
function t(r) {
|
79
79
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
80
80
|
}
|
@@ -86,25 +86,25 @@ var ar = function() {
|
|
86
86
|
if (h)
|
87
87
|
if (this._parentage = null, Array.isArray(h))
|
88
88
|
try {
|
89
|
-
for (var
|
90
|
-
var F =
|
89
|
+
for (var y = on(h), A = y.next(); !A.done; A = y.next()) {
|
90
|
+
var F = A.value;
|
91
91
|
F.remove(this);
|
92
92
|
}
|
93
93
|
} catch (p) {
|
94
94
|
r = { error: p };
|
95
95
|
} finally {
|
96
96
|
try {
|
97
|
-
|
97
|
+
A && !A.done && (n = y.return) && n.call(y);
|
98
98
|
} finally {
|
99
99
|
if (r) throw r.error;
|
100
100
|
}
|
101
101
|
}
|
102
102
|
else
|
103
103
|
h.remove(this);
|
104
|
-
var
|
105
|
-
if (It(
|
104
|
+
var T = this.initialTeardown;
|
105
|
+
if (It(T))
|
106
106
|
try {
|
107
|
-
|
107
|
+
T();
|
108
108
|
} catch (p) {
|
109
109
|
c = p instanceof Qr ? p.errors : [p];
|
110
110
|
}
|
@@ -112,10 +112,10 @@ var ar = function() {
|
|
112
112
|
if (N) {
|
113
113
|
this._finalizers = null;
|
114
114
|
try {
|
115
|
-
for (var
|
116
|
-
var
|
115
|
+
for (var g = on(N), f = g.next(); !f.done; f = g.next()) {
|
116
|
+
var d = f.value;
|
117
117
|
try {
|
118
|
-
Dn(
|
118
|
+
Dn(d);
|
119
119
|
} catch (p) {
|
120
120
|
c = c ?? [], p instanceof Qr ? c = un(un([], cn(c)), cn(p.errors)) : c.push(p);
|
121
121
|
}
|
@@ -124,7 +124,7 @@ var ar = function() {
|
|
124
124
|
i = { error: p };
|
125
125
|
} finally {
|
126
126
|
try {
|
127
|
-
|
127
|
+
f && !f.done && (s = g.return) && s.call(g);
|
128
128
|
} finally {
|
129
129
|
if (i) throw i.error;
|
130
130
|
}
|
@@ -162,46 +162,46 @@ var ar = function() {
|
|
162
162
|
var r = new t();
|
163
163
|
return r.closed = !0, r;
|
164
164
|
}(), t;
|
165
|
-
}(),
|
166
|
-
function
|
167
|
-
return t instanceof
|
165
|
+
}(), Xn = sr.EMPTY;
|
166
|
+
function qn(t) {
|
167
|
+
return t instanceof sr || t && "closed" in t && It(t.remove) && It(t.add) && It(t.unsubscribe);
|
168
168
|
}
|
169
169
|
function Dn(t) {
|
170
170
|
It(t) ? t() : t.unsubscribe();
|
171
171
|
}
|
172
|
-
var
|
172
|
+
var Jn = {
|
173
173
|
onUnhandledError: null,
|
174
174
|
onStoppedNotification: null,
|
175
175
|
Promise: void 0,
|
176
176
|
useDeprecatedSynchronousErrorHandling: !1,
|
177
177
|
useDeprecatedNextContext: !1
|
178
|
-
},
|
178
|
+
}, Zn = {
|
179
179
|
setTimeout: function(t, r) {
|
180
180
|
for (var n = [], i = 2; i < arguments.length; i++)
|
181
181
|
n[i - 2] = arguments[i];
|
182
182
|
return setTimeout.apply(void 0, un([t, r], cn(n)));
|
183
183
|
},
|
184
184
|
clearTimeout: function(t) {
|
185
|
-
var r =
|
185
|
+
var r = Zn.delegate;
|
186
186
|
return ((r == null ? void 0 : r.clearTimeout) || clearTimeout)(t);
|
187
187
|
},
|
188
188
|
delegate: void 0
|
189
189
|
};
|
190
|
-
function
|
191
|
-
|
190
|
+
function Ui(t) {
|
191
|
+
Zn.setTimeout(function() {
|
192
192
|
throw t;
|
193
193
|
});
|
194
194
|
}
|
195
195
|
function Pn() {
|
196
196
|
}
|
197
|
-
function
|
197
|
+
function er(t) {
|
198
198
|
t();
|
199
199
|
}
|
200
|
-
var
|
201
|
-
|
200
|
+
var Qn = function(t) {
|
201
|
+
Te(r, t);
|
202
202
|
function r(n) {
|
203
203
|
var i = t.call(this) || this;
|
204
|
-
return i.isStopped = !1, n ? (i.destination = n,
|
204
|
+
return i.isStopped = !1, n ? (i.destination = n, qn(n) && n.add(i)) : i.destination = $i, i;
|
205
205
|
}
|
206
206
|
return r.create = function(n, i, s) {
|
207
207
|
return new fn(n, i, s);
|
@@ -228,11 +228,11 @@ var Zn = function(t) {
|
|
228
228
|
this.unsubscribe();
|
229
229
|
}
|
230
230
|
}, r;
|
231
|
-
}(
|
231
|
+
}(sr), Wi = Function.prototype.bind;
|
232
232
|
function tn(t, r) {
|
233
|
-
return
|
233
|
+
return Wi.call(t, r);
|
234
234
|
}
|
235
|
-
var
|
235
|
+
var Gi = function() {
|
236
236
|
function t(r) {
|
237
237
|
this.partialObserver = r;
|
238
238
|
}
|
@@ -242,7 +242,7 @@ var Wi = function() {
|
|
242
242
|
try {
|
243
243
|
n.next(r);
|
244
244
|
} catch (i) {
|
245
|
-
|
245
|
+
tr(i);
|
246
246
|
}
|
247
247
|
}, t.prototype.error = function(r) {
|
248
248
|
var n = this.partialObserver;
|
@@ -250,21 +250,21 @@ var Wi = function() {
|
|
250
250
|
try {
|
251
251
|
n.error(r);
|
252
252
|
} catch (i) {
|
253
|
-
|
253
|
+
tr(i);
|
254
254
|
}
|
255
255
|
else
|
256
|
-
|
256
|
+
tr(r);
|
257
257
|
}, t.prototype.complete = function() {
|
258
258
|
var r = this.partialObserver;
|
259
259
|
if (r.complete)
|
260
260
|
try {
|
261
261
|
r.complete();
|
262
262
|
} catch (n) {
|
263
|
-
|
263
|
+
tr(n);
|
264
264
|
}
|
265
265
|
}, t;
|
266
266
|
}(), fn = function(t) {
|
267
|
-
|
267
|
+
Te(r, t);
|
268
268
|
function r(n, i, s) {
|
269
269
|
var c = t.call(this) || this, h;
|
270
270
|
if (It(n) || !n)
|
@@ -274,38 +274,38 @@ var Wi = function() {
|
|
274
274
|
complete: s ?? void 0
|
275
275
|
};
|
276
276
|
else {
|
277
|
-
var
|
278
|
-
c &&
|
277
|
+
var y;
|
278
|
+
c && Jn.useDeprecatedNextContext ? (y = Object.create(n), y.unsubscribe = function() {
|
279
279
|
return c.unsubscribe();
|
280
280
|
}, h = {
|
281
|
-
next: n.next && tn(n.next,
|
282
|
-
error: n.error && tn(n.error,
|
283
|
-
complete: n.complete && tn(n.complete,
|
281
|
+
next: n.next && tn(n.next, y),
|
282
|
+
error: n.error && tn(n.error, y),
|
283
|
+
complete: n.complete && tn(n.complete, y)
|
284
284
|
}) : h = n;
|
285
285
|
}
|
286
|
-
return c.destination = new
|
286
|
+
return c.destination = new Gi(h), c;
|
287
287
|
}
|
288
288
|
return r;
|
289
|
-
}(
|
290
|
-
function
|
291
|
-
|
289
|
+
}(Qn);
|
290
|
+
function tr(t) {
|
291
|
+
Ui(t);
|
292
292
|
}
|
293
|
-
function
|
293
|
+
function Bi(t) {
|
294
294
|
throw t;
|
295
295
|
}
|
296
|
-
var
|
296
|
+
var $i = {
|
297
297
|
closed: !0,
|
298
298
|
next: Pn,
|
299
|
-
error:
|
299
|
+
error: Bi,
|
300
300
|
complete: Pn
|
301
|
-
},
|
301
|
+
}, Ki = function() {
|
302
302
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
303
303
|
}();
|
304
|
-
function
|
304
|
+
function Yi(t) {
|
305
305
|
return t;
|
306
306
|
}
|
307
|
-
function
|
308
|
-
return t.length === 0 ?
|
307
|
+
function Vi(t) {
|
308
|
+
return t.length === 0 ? Yi : t.length === 1 ? t[0] : function(n) {
|
309
309
|
return t.reduce(function(i, s) {
|
310
310
|
return s(i);
|
311
311
|
}, n);
|
@@ -319,10 +319,10 @@ var Cn = 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 s = this, c =
|
323
|
-
return
|
324
|
-
var h = s,
|
325
|
-
c.add(
|
322
|
+
var s = this, c = qi(r) ? r : new fn(r, n, i);
|
323
|
+
return er(function() {
|
324
|
+
var h = s, y = h.operator, A = h.source;
|
325
|
+
c.add(y ? y.call(c, A) : A ? s._subscribe(c) : s._trySubscribe(c));
|
326
326
|
}), c;
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
328
328
|
try {
|
@@ -334,11 +334,11 @@ var Cn = function() {
|
|
334
334
|
var i = this;
|
335
335
|
return n = Rn(n), new n(function(s, c) {
|
336
336
|
var h = new fn({
|
337
|
-
next: function(
|
337
|
+
next: function(y) {
|
338
338
|
try {
|
339
|
-
r(
|
340
|
-
} catch (
|
341
|
-
c(
|
339
|
+
r(y);
|
340
|
+
} catch (A) {
|
341
|
+
c(A), h.unsubscribe();
|
342
342
|
}
|
343
343
|
},
|
344
344
|
error: c,
|
@@ -349,12 +349,12 @@ var Cn = function() {
|
|
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[Ki] = 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 Vi(r)(this);
|
358
358
|
}, t.prototype.toPromise = function(r) {
|
359
359
|
var n = this;
|
360
360
|
return r = Rn(r), new r(function(i, s) {
|
@@ -373,20 +373,20 @@ var Cn = function() {
|
|
373
373
|
}();
|
374
374
|
function Rn(t) {
|
375
375
|
var r;
|
376
|
-
return (r = t ??
|
376
|
+
return (r = t ?? Jn.Promise) !== null && r !== void 0 ? r : Promise;
|
377
377
|
}
|
378
|
-
function
|
378
|
+
function Xi(t) {
|
379
379
|
return t && It(t.next) && It(t.error) && It(t.complete);
|
380
380
|
}
|
381
|
-
function
|
382
|
-
return t && t instanceof
|
381
|
+
function qi(t) {
|
382
|
+
return t && t instanceof Qn || Xi(t) && qn(t);
|
383
383
|
}
|
384
|
-
var
|
384
|
+
var Ji = Vn(function(t) {
|
385
385
|
return function() {
|
386
386
|
t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
387
387
|
};
|
388
|
-
}),
|
389
|
-
|
388
|
+
}), ti = function(t) {
|
389
|
+
Te(r, t);
|
390
390
|
function r() {
|
391
391
|
var n = t.call(this) || this;
|
392
392
|
return n.closed = !1, n.currentObservers = null, n.observers = [], n.isStopped = !1, n.hasError = !1, n.thrownError = null, n;
|
@@ -396,23 +396,23 @@ var qi = 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 Ji();
|
400
400
|
}, r.prototype.next = function(n) {
|
401
401
|
var i = this;
|
402
|
-
|
402
|
+
er(function() {
|
403
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
|
-
for (var h = on(i.currentObservers),
|
408
|
-
var
|
409
|
-
|
407
|
+
for (var h = on(i.currentObservers), y = h.next(); !y.done; y = h.next()) {
|
408
|
+
var A = y.value;
|
409
|
+
A.next(n);
|
410
410
|
}
|
411
411
|
} catch (F) {
|
412
412
|
s = { error: F };
|
413
413
|
} finally {
|
414
414
|
try {
|
415
|
-
|
415
|
+
y && !y.done && (c = h.return) && c.call(h);
|
416
416
|
} finally {
|
417
417
|
if (s) throw s.error;
|
418
418
|
}
|
@@ -421,7 +421,7 @@ var qi = Yn(function(t) {
|
|
421
421
|
});
|
422
422
|
}, r.prototype.error = function(n) {
|
423
423
|
var i = this;
|
424
|
-
|
424
|
+
er(function() {
|
425
425
|
if (i._throwIfClosed(), !i.isStopped) {
|
426
426
|
i.hasError = i.isStopped = !0, i.thrownError = n;
|
427
427
|
for (var s = i.observers; s.length; )
|
@@ -430,7 +430,7 @@ var qi = Yn(function(t) {
|
|
430
430
|
});
|
431
431
|
}, r.prototype.complete = function() {
|
432
432
|
var n = this;
|
433
|
-
|
433
|
+
er(function() {
|
434
434
|
if (n._throwIfClosed(), !n.isStopped) {
|
435
435
|
n.isStopped = !0;
|
436
436
|
for (var i = n.observers; i.length; )
|
@@ -451,9 +451,9 @@ var qi = 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, s = this, c = s.hasError, h = s.isStopped,
|
455
|
-
return c || h ?
|
456
|
-
i.currentObservers = null, ln(
|
454
|
+
var i = this, s = this, c = s.hasError, h = s.isStopped, y = s.observers;
|
455
|
+
return c || h ? Xn : (this.currentObservers = null, y.push(n), new sr(function() {
|
456
|
+
i.currentObservers = null, ln(y, n);
|
457
457
|
}));
|
458
458
|
}, r.prototype._checkFinalizedStatuses = function(n) {
|
459
459
|
var i = this, s = i.hasError, c = i.thrownError, h = i.isStopped;
|
@@ -465,7 +465,7 @@ var qi = Yn(function(t) {
|
|
465
465
|
return new Fn(n, i);
|
466
466
|
}, r;
|
467
467
|
}(Cn), Fn = function(t) {
|
468
|
-
|
468
|
+
Te(r, t);
|
469
469
|
function r(n, i) {
|
470
470
|
var s = t.call(this) || this;
|
471
471
|
return s.destination = n, s.source = i, s;
|
@@ -481,10 +481,10 @@ var qi = Yn(function(t) {
|
|
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
483
|
var i, s;
|
484
|
-
return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && s !== void 0 ? s :
|
484
|
+
return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && s !== void 0 ? s : Xn;
|
485
485
|
}, r;
|
486
|
-
}(
|
487
|
-
|
486
|
+
}(ti), jn = function(t) {
|
487
|
+
Te(r, t);
|
488
488
|
function r(n) {
|
489
489
|
var i = t.call(this) || this;
|
490
490
|
return i._value = n, i;
|
@@ -506,34 +506,34 @@ var qi = Yn(function(t) {
|
|
506
506
|
}, r.prototype.next = function(n) {
|
507
507
|
t.prototype.next.call(this, this._value = n);
|
508
508
|
}, r;
|
509
|
-
}(
|
509
|
+
}(ti), st = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
510
510
|
function wn(t) {
|
511
511
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
512
512
|
}
|
513
|
-
var
|
514
|
-
|
513
|
+
var rr = { exports: {} };
|
514
|
+
rr.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, h = 9007199254740991,
|
517
|
-
|
518
|
-
var
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, h = 9007199254740991, y = "[object Arguments]", A = "[object Array]", F = "[object AsyncFunction]", T = "[object Boolean]", N = "[object Date]", g = "[object Error]", f = "[object Function]", d = "[object GeneratorFunction]", p = "[object Map]", b = "[object Number]", v = "[object Null]", _ = "[object Object]", m = "[object Promise]", l = "[object Proxy]", O = "[object RegExp]", E = "[object Set]", I = "[object String]", D = "[object Symbol]", S = "[object Undefined]", x = "[object WeakMap]", w = "[object ArrayBuffer]", M = "[object DataView]", j = "[object Float32Array]", R = "[object Float64Array]", G = "[object Int8Array]", C = "[object Int16Array]", Ht = "[object Int32Array]", vt = "[object Uint8Array]", ft = "[object Uint8ClampedArray]", L = "[object Uint16Array]", Qt = "[object Uint32Array]", lr = /[\\^$.*+?()[\]{}|]/g, ot = /^\[object .+?Constructor\]$/, Oe = /^(?:0|[1-9]\d*)$/, W = {};
|
517
|
+
W[j] = W[R] = W[G] = W[C] = W[Ht] = W[vt] = W[ft] = W[L] = W[Qt] = !0, W[y] = W[A] = W[w] = W[T] = W[M] = W[N] = W[g] = W[f] = W[p] = W[b] = W[_] = W[O] = W[E] = W[I] = W[x] = !1;
|
518
|
+
var xe = typeof st == "object" && st && st.Object === Object && st, fr = typeof self == "object" && self && self.Object === Object && self, ct = xe || fr || Function("return this")(), De = r && !r.nodeType && r, Pe = De && !0 && t && !t.nodeType && t, te = Pe && Pe.exports === De, ee = te && xe.process, Ce = function() {
|
519
519
|
try {
|
520
|
-
return
|
520
|
+
return ee && ee.binding && ee.binding("util");
|
521
521
|
} catch {
|
522
522
|
}
|
523
|
-
}(),
|
524
|
-
function
|
525
|
-
for (var o = -1, u = e == null ? 0 : e.length,
|
526
|
-
var
|
527
|
-
a(
|
523
|
+
}(), re = Ce && Ce.isTypedArray;
|
524
|
+
function Re(e, a) {
|
525
|
+
for (var o = -1, u = e == null ? 0 : e.length, P = 0, k = []; ++o < u; ) {
|
526
|
+
var H = e[o];
|
527
|
+
a(H, o, e) && (k[P++] = H);
|
528
528
|
}
|
529
|
-
return
|
529
|
+
return k;
|
530
530
|
}
|
531
|
-
function
|
532
|
-
for (var o = -1, u = a.length,
|
533
|
-
e[
|
531
|
+
function ne(e, a) {
|
532
|
+
for (var o = -1, u = a.length, P = e.length; ++o < u; )
|
533
|
+
e[P + o] = a[o];
|
534
534
|
return e;
|
535
535
|
}
|
536
|
-
function
|
536
|
+
function Fe(e, a) {
|
537
537
|
for (var o = -1, u = e == null ? 0 : e.length; ++o < u; )
|
538
538
|
if (a(e[o], o, e))
|
539
539
|
return !0;
|
@@ -549,19 +549,19 @@ er.exports;
|
|
549
549
|
return e(a);
|
550
550
|
};
|
551
551
|
}
|
552
|
-
function
|
552
|
+
function Nt(e, a) {
|
553
553
|
return e.has(a);
|
554
554
|
}
|
555
|
-
function
|
555
|
+
function ie(e, a) {
|
556
556
|
return e == null ? void 0 : e[a];
|
557
557
|
}
|
558
|
-
function
|
558
|
+
function je(e) {
|
559
559
|
var a = -1, o = Array(e.size);
|
560
|
-
return e.forEach(function(u,
|
561
|
-
o[++a] = [
|
560
|
+
return e.forEach(function(u, P) {
|
561
|
+
o[++a] = [P, u];
|
562
562
|
}), o;
|
563
563
|
}
|
564
|
-
function
|
564
|
+
function ze(e, a) {
|
565
565
|
return function(o) {
|
566
566
|
return e(a(o));
|
567
567
|
};
|
@@ -572,13 +572,13 @@ er.exports;
|
|
572
572
|
o[++a] = u;
|
573
573
|
}), o;
|
574
574
|
}
|
575
|
-
var
|
576
|
-
var e = /[^.]+$/.exec(
|
575
|
+
var Lt = Array.prototype, hr = Function.prototype, Tt = Object.prototype, Ut = ct["__core-js_shared__"], ae = hr.toString, at = Tt.hasOwnProperty, He = function() {
|
576
|
+
var e = /[^.]+$/.exec(Ut && Ut.keys && Ut.keys.IE_PROTO || "");
|
577
577
|
return e ? "Symbol(src)_1." + e : "";
|
578
|
-
}(),
|
579
|
-
"^" +
|
580
|
-
),
|
581
|
-
function
|
578
|
+
}(), Ne = Tt.toString, mr = RegExp(
|
579
|
+
"^" + ae.call(at).replace(lr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
580
|
+
), se = te ? ct.Buffer : void 0, Wt = ct.Symbol, Le = ct.Uint8Array, Gt = Tt.propertyIsEnumerable, Et = Lt.splice, ut = Wt ? Wt.toStringTag : void 0, Bt = Object.getOwnPropertySymbols, oe = se ? se.isBuffer : void 0, Mt = ze(Object.keys, Object), ce = bt(ct, "DataView"), At = bt(ct, "Map"), ue = bt(ct, "Promise"), le = bt(ct, "Set"), fe = bt(ct, "WeakMap"), St = bt(Object, "create"), Ue = Q(ce), yt = Q(At), yr = Q(ue), br = Q(le), gr = Q(fe), We = Wt ? Wt.prototype : void 0, de = We ? We.valueOf : void 0;
|
581
|
+
function V(e) {
|
582
582
|
var a = -1, o = e == null ? 0 : e.length;
|
583
583
|
for (this.clear(); ++a < o; ) {
|
584
584
|
var u = e[a];
|
@@ -586,7 +586,7 @@ er.exports;
|
|
586
586
|
}
|
587
587
|
}
|
588
588
|
function _r() {
|
589
|
-
this.__data__ =
|
589
|
+
this.__data__ = St ? St(null) : {}, this.size = 0;
|
590
590
|
}
|
591
591
|
function Ir(e) {
|
592
592
|
var a = this.has(e) && delete this.__data__[e];
|
@@ -594,7 +594,7 @@ er.exports;
|
|
594
594
|
}
|
595
595
|
function vr(e) {
|
596
596
|
var a = this.__data__;
|
597
|
-
if (
|
597
|
+
if (St) {
|
598
598
|
var o = a[e];
|
599
599
|
return o === i ? void 0 : o;
|
600
600
|
}
|
@@ -602,14 +602,14 @@ er.exports;
|
|
602
602
|
}
|
603
603
|
function Sr(e) {
|
604
604
|
var a = this.__data__;
|
605
|
-
return
|
605
|
+
return St ? a[e] !== void 0 : at.call(a, e);
|
606
606
|
}
|
607
607
|
function wr(e, a) {
|
608
608
|
var o = this.__data__;
|
609
|
-
return this.size += this.has(e) ? 0 : 1, o[e] =
|
609
|
+
return this.size += this.has(e) ? 0 : 1, o[e] = St && a === void 0 ? i : a, this;
|
610
610
|
}
|
611
|
-
|
612
|
-
function
|
611
|
+
V.prototype.clear = _r, V.prototype.delete = Ir, V.prototype.get = vr, V.prototype.has = Sr, V.prototype.set = wr;
|
612
|
+
function q(e) {
|
613
613
|
var a = -1, o = e == null ? 0 : e.length;
|
614
614
|
for (this.clear(); ++a < o; ) {
|
615
615
|
var u = e[a];
|
@@ -620,24 +620,24 @@ er.exports;
|
|
620
620
|
this.__data__ = [], this.size = 0;
|
621
621
|
}
|
622
622
|
function Tr(e) {
|
623
|
-
var a = this.__data__, o =
|
623
|
+
var a = this.__data__, o = Yt(a, e);
|
624
624
|
if (o < 0)
|
625
625
|
return !1;
|
626
626
|
var u = a.length - 1;
|
627
|
-
return o == u ? a.pop() :
|
627
|
+
return o == u ? a.pop() : Et.call(a, o, 1), --this.size, !0;
|
628
628
|
}
|
629
629
|
function Er(e) {
|
630
|
-
var a = this.__data__, o =
|
630
|
+
var a = this.__data__, o = Yt(a, e);
|
631
631
|
return o < 0 ? void 0 : a[o][1];
|
632
632
|
}
|
633
633
|
function Mr(e) {
|
634
|
-
return
|
634
|
+
return Yt(this.__data__, e) > -1;
|
635
635
|
}
|
636
636
|
function Ar(e, a) {
|
637
|
-
var o = this.__data__, u =
|
637
|
+
var o = this.__data__, u = Yt(o, e);
|
638
638
|
return u < 0 ? (++this.size, o.push([e, a])) : o[u][1] = a, this;
|
639
639
|
}
|
640
|
-
|
640
|
+
q.prototype.clear = kr, q.prototype.delete = Tr, q.prototype.get = Er, q.prototype.has = Mr, q.prototype.set = Ar;
|
641
641
|
function tt(e) {
|
642
642
|
var a = -1, o = e == null ? 0 : e.length;
|
643
643
|
for (this.clear(); ++a < o; ) {
|
@@ -647,9 +647,9 @@ er.exports;
|
|
647
647
|
}
|
648
648
|
function Or() {
|
649
649
|
this.size = 0, this.__data__ = {
|
650
|
-
hash: new
|
651
|
-
map: new (
|
652
|
-
string: new
|
650
|
+
hash: new V(),
|
651
|
+
map: new (At || q)(),
|
652
|
+
string: new V()
|
653
653
|
};
|
654
654
|
}
|
655
655
|
function xr(e) {
|
@@ -667,24 +667,24 @@ er.exports;
|
|
667
667
|
return o.set(e, a), this.size += o.size == u ? 0 : 1, this;
|
668
668
|
}
|
669
669
|
tt.prototype.clear = Or, tt.prototype.delete = xr, tt.prototype.get = Dr, tt.prototype.has = Pr, tt.prototype.set = Cr;
|
670
|
-
function
|
670
|
+
function $t(e) {
|
671
671
|
var a = -1, o = e == null ? 0 : e.length;
|
672
672
|
for (this.__data__ = new tt(); ++a < o; )
|
673
673
|
this.add(e[a]);
|
674
674
|
}
|
675
|
-
function
|
675
|
+
function Ge(e) {
|
676
676
|
return this.__data__.set(e, i), this;
|
677
677
|
}
|
678
|
-
function
|
678
|
+
function Kt(e) {
|
679
679
|
return this.__data__.has(e);
|
680
680
|
}
|
681
|
-
|
681
|
+
$t.prototype.add = $t.prototype.push = Ge, $t.prototype.has = Kt;
|
682
682
|
function pt(e) {
|
683
|
-
var a = this.__data__ = new
|
683
|
+
var a = this.__data__ = new q(e);
|
684
684
|
this.size = a.size;
|
685
685
|
}
|
686
|
-
function
|
687
|
-
this.__data__ = new
|
686
|
+
function pe() {
|
687
|
+
this.__data__ = new q(), this.size = 0;
|
688
688
|
}
|
689
689
|
function Rr(e) {
|
690
690
|
var a = this.__data__, o = a.delete(e);
|
@@ -698,189 +698,189 @@ er.exports;
|
|
698
698
|
}
|
699
699
|
function zr(e, a) {
|
700
700
|
var o = this.__data__;
|
701
|
-
if (o instanceof
|
701
|
+
if (o instanceof q) {
|
702
702
|
var u = o.__data__;
|
703
|
-
if (!
|
703
|
+
if (!At || u.length < n - 1)
|
704
704
|
return u.push([e, a]), this.size = ++o.size, this;
|
705
705
|
o = this.__data__ = new tt(u);
|
706
706
|
}
|
707
707
|
return o.set(e, a), this.size = o.size, this;
|
708
708
|
}
|
709
|
-
pt.prototype.clear =
|
709
|
+
pt.prototype.clear = pe, pt.prototype.delete = Rr, pt.prototype.get = Fr, pt.prototype.has = jr, pt.prototype.set = zr;
|
710
710
|
function Hr(e, a) {
|
711
|
-
var o =
|
712
|
-
for (var
|
713
|
-
at.call(e,
|
714
|
-
(
|
715
|
-
|
716
|
-
|
717
|
-
Kr(
|
718
|
-
return
|
719
|
-
}
|
720
|
-
function
|
711
|
+
var o = Vt(e), u = !o && Ve(e), P = !o && !u && Xt(e), k = !o && !u && !P && Je(e), H = o || u || P || k, z = H ? dr(e.length, String) : [], B = z.length;
|
712
|
+
for (var U in e)
|
713
|
+
at.call(e, U) && !(H && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
|
+
(U == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
|
+
P && (U == "offset" || U == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
|
+
k && (U == "buffer" || U == "byteLength" || U == "byteOffset") || // Skip index properties.
|
717
|
+
Kr(U, B))) && z.push(U);
|
718
|
+
return z;
|
719
|
+
}
|
720
|
+
function Yt(e, a) {
|
721
721
|
for (var o = e.length; o--; )
|
722
|
-
if (
|
722
|
+
if (Ye(e[o][0], a))
|
723
723
|
return o;
|
724
724
|
return -1;
|
725
725
|
}
|
726
|
-
function
|
726
|
+
function he(e, a, o) {
|
727
727
|
var u = a(e);
|
728
|
-
return
|
728
|
+
return Vt(e) ? u : ne(u, o(e));
|
729
729
|
}
|
730
|
-
function
|
731
|
-
return e == null ? e === void 0 ?
|
730
|
+
function Ot(e) {
|
731
|
+
return e == null ? e === void 0 ? S : v : ut && ut in Object(e) ? gt(e) : Ke(e);
|
732
732
|
}
|
733
|
-
function
|
734
|
-
return mt(e) &&
|
733
|
+
function Be(e) {
|
734
|
+
return mt(e) && Ot(e) == y;
|
735
735
|
}
|
736
|
-
function
|
737
|
-
return e === a ? !0 : e == null || a == null || !mt(e) && !mt(a) ? e !== e && a !== a : Nr(e, a, o, u,
|
736
|
+
function $e(e, a, o, u, P) {
|
737
|
+
return e === a ? !0 : e == null || a == null || !mt(e) && !mt(a) ? e !== e && a !== a : Nr(e, a, o, u, $e, P);
|
738
738
|
}
|
739
|
-
function Nr(e, a, o, u,
|
740
|
-
var
|
741
|
-
|
742
|
-
var
|
743
|
-
if (
|
744
|
-
if (!
|
739
|
+
function Nr(e, a, o, u, P, k) {
|
740
|
+
var H = Vt(e), z = Vt(a), B = H ? A : ht(e), U = z ? A : ht(a);
|
741
|
+
B = B == y ? _ : B, U = U == y ? _ : U;
|
742
|
+
var J = B == _, et = U == _, $ = B == U;
|
743
|
+
if ($ && Xt(e)) {
|
744
|
+
if (!Xt(a))
|
745
745
|
return !1;
|
746
|
-
|
746
|
+
H = !0, J = !1;
|
747
747
|
}
|
748
|
-
if (
|
749
|
-
return
|
748
|
+
if ($ && !J)
|
749
|
+
return k || (k = new pt()), H || Je(e) ? me(e, a, o, u, P, k) : Gr(e, a, B, o, u, P, k);
|
750
750
|
if (!(o & s)) {
|
751
|
-
var
|
752
|
-
if (
|
753
|
-
var
|
754
|
-
return
|
751
|
+
var Z = J && at.call(e, "__wrapped__"), X = et && at.call(a, "__wrapped__");
|
752
|
+
if (Z || X) {
|
753
|
+
var wt = Z ? e.value() : e, _t = X ? a.value() : a;
|
754
|
+
return k || (k = new pt()), P(wt, _t, o, u, k);
|
755
755
|
}
|
756
756
|
}
|
757
|
-
return
|
757
|
+
return $ ? (k || (k = new pt()), Br(e, a, o, u, P, k)) : !1;
|
758
758
|
}
|
759
759
|
function Lr(e) {
|
760
|
-
if (!
|
760
|
+
if (!qe(e) || Vr(e))
|
761
761
|
return !1;
|
762
|
-
var a =
|
762
|
+
var a = Xe(e) ? mr : ot;
|
763
763
|
return a.test(Q(e));
|
764
764
|
}
|
765
765
|
function Ur(e) {
|
766
|
-
return mt(e) &&
|
766
|
+
return mt(e) && be(e.length) && !!W[Ot(e)];
|
767
767
|
}
|
768
768
|
function Wr(e) {
|
769
769
|
if (!Xr(e))
|
770
|
-
return
|
770
|
+
return Mt(e);
|
771
771
|
var a = [];
|
772
772
|
for (var o in Object(e))
|
773
773
|
at.call(e, o) && o != "constructor" && a.push(o);
|
774
774
|
return a;
|
775
775
|
}
|
776
|
-
function
|
777
|
-
var
|
778
|
-
if (
|
776
|
+
function me(e, a, o, u, P, k) {
|
777
|
+
var H = o & s, z = e.length, B = a.length;
|
778
|
+
if (z != B && !(H && B > z))
|
779
779
|
return !1;
|
780
|
-
var
|
781
|
-
if (
|
782
|
-
return
|
783
|
-
var
|
784
|
-
for (
|
785
|
-
var
|
780
|
+
var U = k.get(e);
|
781
|
+
if (U && k.get(a))
|
782
|
+
return U == a;
|
783
|
+
var J = -1, et = !0, $ = o & c ? new $t() : void 0;
|
784
|
+
for (k.set(e, a), k.set(a, e); ++J < z; ) {
|
785
|
+
var Z = e[J], X = a[J];
|
786
786
|
if (u)
|
787
|
-
var
|
788
|
-
if (
|
789
|
-
if (
|
787
|
+
var wt = H ? u(X, Z, J, a, e, k) : u(Z, X, J, e, a, k);
|
788
|
+
if (wt !== void 0) {
|
789
|
+
if (wt)
|
790
790
|
continue;
|
791
791
|
et = !1;
|
792
792
|
break;
|
793
793
|
}
|
794
|
-
if (
|
795
|
-
if (!
|
796
|
-
if (!
|
797
|
-
return
|
794
|
+
if ($) {
|
795
|
+
if (!Fe(a, function(_t, Dt) {
|
796
|
+
if (!Nt($, Dt) && (Z === _t || P(Z, _t, o, u, k)))
|
797
|
+
return $.push(Dt);
|
798
798
|
})) {
|
799
799
|
et = !1;
|
800
800
|
break;
|
801
801
|
}
|
802
|
-
} else if (!(
|
802
|
+
} else if (!(Z === X || P(Z, X, o, u, k))) {
|
803
803
|
et = !1;
|
804
804
|
break;
|
805
805
|
}
|
806
806
|
}
|
807
|
-
return
|
807
|
+
return k.delete(e), k.delete(a), et;
|
808
808
|
}
|
809
|
-
function Gr(e, a, o, u,
|
809
|
+
function Gr(e, a, o, u, P, k, H) {
|
810
810
|
switch (o) {
|
811
|
-
case
|
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 w:
|
816
|
+
return !(e.byteLength != a.byteLength || !k(new Le(e), new Le(a)));
|
817
|
+
case T:
|
818
818
|
case N:
|
819
|
-
case g:
|
820
|
-
return $e(+e, +a);
|
821
819
|
case b:
|
820
|
+
return Ye(+e, +a);
|
821
|
+
case g:
|
822
822
|
return e.name == a.name && e.message == a.message;
|
823
|
-
case
|
823
|
+
case O:
|
824
824
|
case I:
|
825
825
|
return e == a + "";
|
826
826
|
case p:
|
827
|
-
var
|
828
|
-
case
|
829
|
-
var
|
830
|
-
if (
|
827
|
+
var z = je;
|
828
|
+
case E:
|
829
|
+
var B = u & s;
|
830
|
+
if (z || (z = dt), e.size != a.size && !B)
|
831
831
|
return !1;
|
832
|
-
var
|
833
|
-
if (
|
834
|
-
return
|
835
|
-
u |= c,
|
836
|
-
var
|
837
|
-
return
|
838
|
-
case
|
839
|
-
if (
|
840
|
-
return
|
832
|
+
var U = H.get(e);
|
833
|
+
if (U)
|
834
|
+
return U == a;
|
835
|
+
u |= c, H.set(e, a);
|
836
|
+
var J = me(z(e), z(a), u, P, k, H);
|
837
|
+
return H.delete(e), J;
|
838
|
+
case D:
|
839
|
+
if (de)
|
840
|
+
return de.call(e) == de.call(a);
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function Br(e, a, o, u,
|
845
|
-
var
|
846
|
-
if (
|
844
|
+
function Br(e, a, o, u, P, k) {
|
845
|
+
var H = o & s, z = xt(e), B = z.length, U = xt(a), J = U.length;
|
846
|
+
if (B != J && !H)
|
847
847
|
return !1;
|
848
|
-
for (var et =
|
849
|
-
var
|
850
|
-
if (!(
|
848
|
+
for (var et = B; et--; ) {
|
849
|
+
var $ = z[et];
|
850
|
+
if (!(H ? $ in a : at.call(a, $)))
|
851
851
|
return !1;
|
852
852
|
}
|
853
|
-
var
|
854
|
-
if (
|
855
|
-
return
|
856
|
-
var
|
857
|
-
|
858
|
-
for (var
|
859
|
-
|
860
|
-
var _t = e[
|
853
|
+
var Z = k.get(e);
|
854
|
+
if (Z && k.get(a))
|
855
|
+
return Z == a;
|
856
|
+
var X = !0;
|
857
|
+
k.set(e, a), k.set(a, e);
|
858
|
+
for (var wt = H; ++et < B; ) {
|
859
|
+
$ = z[et];
|
860
|
+
var _t = e[$], Dt = a[$];
|
861
861
|
if (u)
|
862
|
-
var xn =
|
863
|
-
if (!(xn === void 0 ? _t ===
|
864
|
-
|
862
|
+
var xn = H ? u(Dt, _t, $, a, e, k) : u(_t, Dt, $, e, a, k);
|
863
|
+
if (!(xn === void 0 ? _t === Dt || P(_t, Dt, o, u, k) : xn)) {
|
864
|
+
X = !1;
|
865
865
|
break;
|
866
866
|
}
|
867
|
-
|
867
|
+
wt || (wt = $ == "constructor");
|
868
868
|
}
|
869
|
-
if (
|
870
|
-
var
|
871
|
-
|
869
|
+
if (X && !wt) {
|
870
|
+
var Ze = e.constructor, Qe = a.constructor;
|
871
|
+
Ze != Qe && "constructor" in e && "constructor" in a && !(typeof Ze == "function" && Ze instanceof Ze && typeof Qe == "function" && Qe instanceof Qe) && (X = !1);
|
872
872
|
}
|
873
|
-
return
|
873
|
+
return k.delete(e), k.delete(a), X;
|
874
874
|
}
|
875
|
-
function
|
876
|
-
return
|
875
|
+
function xt(e) {
|
876
|
+
return he(e, ge, $r);
|
877
877
|
}
|
878
878
|
function lt(e, a) {
|
879
879
|
var o = e.__data__;
|
880
880
|
return Yr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
881
881
|
}
|
882
882
|
function bt(e, a) {
|
883
|
-
var o =
|
883
|
+
var o = ie(e, a);
|
884
884
|
return Lr(o) ? o : void 0;
|
885
885
|
}
|
886
886
|
function gt(e) {
|
@@ -890,52 +890,52 @@ er.exports;
|
|
890
890
|
var u = !0;
|
891
891
|
} catch {
|
892
892
|
}
|
893
|
-
var
|
894
|
-
return u && (a ? e[ut] = o : delete e[ut]),
|
893
|
+
var P = Ne.call(e);
|
894
|
+
return u && (a ? e[ut] = o : delete e[ut]), P;
|
895
895
|
}
|
896
|
-
var $r =
|
897
|
-
return e == null ? [] : (e = Object(e),
|
898
|
-
return
|
896
|
+
var $r = Bt ? function(e) {
|
897
|
+
return e == null ? [] : (e = Object(e), Re(Bt(e), function(a) {
|
898
|
+
return Gt.call(e, a);
|
899
899
|
}));
|
900
|
-
} : Jr, ht =
|
901
|
-
(
|
902
|
-
var a =
|
900
|
+
} : Jr, ht = Ot;
|
901
|
+
(ce && ht(new ce(new ArrayBuffer(1))) != M || At && ht(new At()) != p || ue && ht(ue.resolve()) != m || le && ht(new le()) != E || fe && ht(new fe()) != x) && (ht = function(e) {
|
902
|
+
var a = Ot(e), o = a == _ ? e.constructor : void 0, u = o ? Q(o) : "";
|
903
903
|
if (u)
|
904
904
|
switch (u) {
|
905
|
-
case
|
906
|
-
return
|
905
|
+
case Ue:
|
906
|
+
return M;
|
907
907
|
case yt:
|
908
908
|
return p;
|
909
909
|
case yr:
|
910
|
-
return
|
910
|
+
return m;
|
911
911
|
case br:
|
912
|
-
return
|
912
|
+
return E;
|
913
913
|
case gr:
|
914
|
-
return
|
914
|
+
return x;
|
915
915
|
}
|
916
916
|
return a;
|
917
917
|
});
|
918
918
|
function Kr(e, a) {
|
919
|
-
return a = a ?? h, !!a && (typeof e == "number" ||
|
919
|
+
return a = a ?? h, !!a && (typeof e == "number" || Oe.test(e)) && e > -1 && e % 1 == 0 && e < a;
|
920
920
|
}
|
921
921
|
function Yr(e) {
|
922
922
|
var a = typeof e;
|
923
923
|
return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? e !== "__proto__" : e === null;
|
924
924
|
}
|
925
925
|
function Vr(e) {
|
926
|
-
return !!
|
926
|
+
return !!He && He in e;
|
927
927
|
}
|
928
928
|
function Xr(e) {
|
929
|
-
var a = e && e.constructor, o = typeof a == "function" && a.prototype ||
|
929
|
+
var a = e && e.constructor, o = typeof a == "function" && a.prototype || Tt;
|
930
930
|
return e === o;
|
931
931
|
}
|
932
|
-
function
|
933
|
-
return
|
932
|
+
function Ke(e) {
|
933
|
+
return Ne.call(e);
|
934
934
|
}
|
935
935
|
function Q(e) {
|
936
936
|
if (e != null) {
|
937
937
|
try {
|
938
|
-
return
|
938
|
+
return ae.call(e);
|
939
939
|
} catch {
|
940
940
|
}
|
941
941
|
try {
|
@@ -945,40 +945,40 @@ er.exports;
|
|
945
945
|
}
|
946
946
|
return "";
|
947
947
|
}
|
948
|
-
function
|
948
|
+
function Ye(e, a) {
|
949
949
|
return e === a || e !== e && a !== a;
|
950
950
|
}
|
951
|
-
var
|
951
|
+
var Ve = Be(/* @__PURE__ */ function() {
|
952
952
|
return arguments;
|
953
|
-
}()) ?
|
954
|
-
return mt(e) && at.call(e, "callee") && !
|
955
|
-
},
|
956
|
-
function
|
957
|
-
return e != null &&
|
953
|
+
}()) ? Be : function(e) {
|
954
|
+
return mt(e) && at.call(e, "callee") && !Gt.call(e, "callee");
|
955
|
+
}, Vt = Array.isArray;
|
956
|
+
function ye(e) {
|
957
|
+
return e != null && be(e.length) && !Xe(e);
|
958
958
|
}
|
959
|
-
var
|
959
|
+
var Xt = oe || Zr;
|
960
960
|
function qr(e, a) {
|
961
|
-
return
|
961
|
+
return $e(e, a);
|
962
962
|
}
|
963
|
-
function
|
964
|
-
if (!
|
963
|
+
function Xe(e) {
|
964
|
+
if (!qe(e))
|
965
965
|
return !1;
|
966
|
-
var a =
|
967
|
-
return a ==
|
966
|
+
var a = Ot(e);
|
967
|
+
return a == f || a == d || a == F || a == l;
|
968
968
|
}
|
969
|
-
function
|
969
|
+
function be(e) {
|
970
970
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= h;
|
971
971
|
}
|
972
|
-
function
|
972
|
+
function qe(e) {
|
973
973
|
var a = typeof e;
|
974
974
|
return e != null && (a == "object" || a == "function");
|
975
975
|
}
|
976
976
|
function mt(e) {
|
977
977
|
return e != null && typeof e == "object";
|
978
978
|
}
|
979
|
-
var
|
980
|
-
function
|
981
|
-
return
|
979
|
+
var Je = re ? pr(re) : Ur;
|
980
|
+
function ge(e) {
|
981
|
+
return ye(e) ? Hr(e) : Wr(e);
|
982
982
|
}
|
983
983
|
function Jr() {
|
984
984
|
return [];
|
@@ -987,45 +987,45 @@ er.exports;
|
|
987
987
|
return !1;
|
988
988
|
}
|
989
989
|
t.exports = qr;
|
990
|
-
})(
|
991
|
-
var
|
992
|
-
const rt = /* @__PURE__ */ wn(
|
993
|
-
var
|
994
|
-
|
990
|
+
})(rr, rr.exports);
|
991
|
+
var Zi = rr.exports;
|
992
|
+
const rt = /* @__PURE__ */ wn(Zi);
|
993
|
+
var nr = { exports: {} };
|
994
|
+
nr.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", h = "[object Array]",
|
997
|
-
L[c] = L[h] = L[
|
998
|
-
var
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", h = "[object Array]", y = "[object Boolean]", A = "[object Date]", F = "[object Error]", T = "[object Function]", N = "[object GeneratorFunction]", g = "[object Map]", f = "[object Number]", d = "[object Object]", p = "[object Promise]", b = "[object RegExp]", v = "[object Set]", _ = "[object String]", m = "[object Symbol]", l = "[object WeakMap]", O = "[object ArrayBuffer]", E = "[object DataView]", I = "[object Float32Array]", D = "[object Float64Array]", S = "[object Int8Array]", x = "[object Int16Array]", w = "[object Int32Array]", M = "[object Uint8Array]", j = "[object Uint8ClampedArray]", R = "[object Uint16Array]", G = "[object Uint32Array]", C = /[\\^$.*+?()[\]{}|]/g, Ht = /\w*$/, vt = /^\[object .+?Constructor\]$/, ft = /^(?:0|[1-9]\d*)$/, L = {};
|
997
|
+
L[c] = L[h] = L[O] = L[E] = L[y] = L[A] = L[I] = L[D] = L[S] = L[x] = L[w] = L[g] = L[f] = L[d] = L[b] = L[v] = L[_] = L[m] = L[M] = L[j] = L[R] = L[G] = !0, L[F] = L[T] = L[l] = !1;
|
998
|
+
var Qt = typeof st == "object" && st && st.Object === Object && st, lr = typeof self == "object" && self && self.Object === Object && self, ot = Qt || lr || Function("return this")(), Oe = r && !r.nodeType && r, W = Oe && !0 && t && !t.nodeType && t, xe = W && W.exports === Oe;
|
999
999
|
function fr(e, a) {
|
1000
1000
|
return e.set(a[0], a[1]), e;
|
1001
1001
|
}
|
1002
1002
|
function ct(e, a) {
|
1003
1003
|
return e.add(a), e;
|
1004
1004
|
}
|
1005
|
-
function
|
1005
|
+
function De(e, a) {
|
1006
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
|
-
function
|
1011
|
-
for (var o = -1, u = a.length,
|
1012
|
-
e[
|
1010
|
+
function Pe(e, a) {
|
1011
|
+
for (var o = -1, u = a.length, P = e.length; ++o < u; )
|
1012
|
+
e[P + o] = a[o];
|
1013
1013
|
return e;
|
1014
1014
|
}
|
1015
|
-
function
|
1016
|
-
for (var
|
1017
|
-
o = a(o, e[
|
1015
|
+
function te(e, a, o, u) {
|
1016
|
+
for (var P = -1, k = e ? e.length : 0; ++P < k; )
|
1017
|
+
o = a(o, e[P], P, e);
|
1018
1018
|
return o;
|
1019
1019
|
}
|
1020
|
-
function
|
1020
|
+
function ee(e, a) {
|
1021
1021
|
for (var o = -1, u = Array(e); ++o < e; )
|
1022
1022
|
u[o] = a(o);
|
1023
1023
|
return u;
|
1024
1024
|
}
|
1025
|
-
function
|
1025
|
+
function Ce(e, a) {
|
1026
1026
|
return e == null ? void 0 : e[a];
|
1027
1027
|
}
|
1028
|
-
function
|
1028
|
+
function re(e) {
|
1029
1029
|
var a = !1;
|
1030
1030
|
if (e != null && typeof e.toString != "function")
|
1031
1031
|
try {
|
@@ -1034,29 +1034,29 @@ rr.exports;
|
|
1034
1034
|
}
|
1035
1035
|
return a;
|
1036
1036
|
}
|
1037
|
-
function
|
1037
|
+
function Re(e) {
|
1038
1038
|
var a = -1, o = Array(e.size);
|
1039
|
-
return e.forEach(function(u,
|
1040
|
-
o[++a] = [
|
1039
|
+
return e.forEach(function(u, P) {
|
1040
|
+
o[++a] = [P, u];
|
1041
1041
|
}), o;
|
1042
1042
|
}
|
1043
|
-
function
|
1043
|
+
function ne(e, a) {
|
1044
1044
|
return function(o) {
|
1045
1045
|
return e(a(o));
|
1046
1046
|
};
|
1047
1047
|
}
|
1048
|
-
function
|
1048
|
+
function Fe(e) {
|
1049
1049
|
var a = -1, o = Array(e.size);
|
1050
1050
|
return e.forEach(function(u) {
|
1051
1051
|
o[++a] = u;
|
1052
1052
|
}), o;
|
1053
1053
|
}
|
1054
|
-
var dr = Array.prototype, pr = Function.prototype,
|
1055
|
-
var e = /[^.]+$/.exec(
|
1054
|
+
var dr = Array.prototype, pr = Function.prototype, Nt = Object.prototype, ie = ot["__core-js_shared__"], je = function() {
|
1055
|
+
var e = /[^.]+$/.exec(ie && ie.keys && ie.keys.IE_PROTO || "");
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
1057
|
-
}(),
|
1058
|
-
"^" +
|
1059
|
-
),
|
1057
|
+
}(), ze = pr.toString, dt = Nt.hasOwnProperty, Lt = Nt.toString, hr = RegExp(
|
1058
|
+
"^" + ze.call(dt).replace(C, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
1059
|
+
), Tt = xe ? ot.Buffer : void 0, Ut = ot.Symbol, ae = ot.Uint8Array, at = ne(Object.getPrototypeOf, Object), He = Object.create, Ne = Nt.propertyIsEnumerable, mr = dr.splice, se = Object.getOwnPropertySymbols, Wt = Tt ? Tt.isBuffer : void 0, Le = ne(Object.keys, Object), Gt = lt(ot, "DataView"), Et = lt(ot, "Map"), ut = lt(ot, "Promise"), Bt = lt(ot, "Set"), oe = lt(ot, "WeakMap"), Mt = lt(Object, "create"), ce = Q(Gt), At = Q(Et), ue = Q(ut), le = Q(Bt), fe = Q(oe), St = Ut ? Ut.prototype : void 0, Ue = St ? St.valueOf : void 0;
|
1060
1060
|
function yt(e) {
|
1061
1061
|
var a = -1, o = e ? e.length : 0;
|
1062
1062
|
for (this.clear(); ++a < o; ) {
|
@@ -1065,29 +1065,29 @@ rr.exports;
|
|
1065
1065
|
}
|
1066
1066
|
}
|
1067
1067
|
function yr() {
|
1068
|
-
this.__data__ =
|
1068
|
+
this.__data__ = Mt ? Mt(null) : {};
|
1069
1069
|
}
|
1070
1070
|
function br(e) {
|
1071
1071
|
return this.has(e) && delete this.__data__[e];
|
1072
1072
|
}
|
1073
1073
|
function gr(e) {
|
1074
1074
|
var a = this.__data__;
|
1075
|
-
if (
|
1075
|
+
if (Mt) {
|
1076
1076
|
var o = a[e];
|
1077
1077
|
return o === i ? void 0 : o;
|
1078
1078
|
}
|
1079
1079
|
return dt.call(a, e) ? a[e] : void 0;
|
1080
1080
|
}
|
1081
|
-
function
|
1081
|
+
function We(e) {
|
1082
1082
|
var a = this.__data__;
|
1083
|
-
return
|
1083
|
+
return Mt ? a[e] !== void 0 : dt.call(a, e);
|
1084
1084
|
}
|
1085
|
-
function
|
1085
|
+
function de(e, a) {
|
1086
1086
|
var o = this.__data__;
|
1087
|
-
return o[e] =
|
1087
|
+
return o[e] = Mt && a === void 0 ? i : a, this;
|
1088
1088
|
}
|
1089
|
-
yt.prototype.clear = yr, yt.prototype.delete = br, yt.prototype.get = gr, yt.prototype.has =
|
1090
|
-
function
|
1089
|
+
yt.prototype.clear = yr, yt.prototype.delete = br, yt.prototype.get = gr, yt.prototype.has = We, yt.prototype.set = de;
|
1090
|
+
function V(e) {
|
1091
1091
|
var a = -1, o = e ? e.length : 0;
|
1092
1092
|
for (this.clear(); ++a < o; ) {
|
1093
1093
|
var u = e[a];
|
@@ -1098,25 +1098,25 @@ rr.exports;
|
|
1098
1098
|
this.__data__ = [];
|
1099
1099
|
}
|
1100
1100
|
function Ir(e) {
|
1101
|
-
var a = this.__data__, o =
|
1101
|
+
var a = this.__data__, o = Kt(a, e);
|
1102
1102
|
if (o < 0)
|
1103
1103
|
return !1;
|
1104
1104
|
var u = a.length - 1;
|
1105
1105
|
return o == u ? a.pop() : mr.call(a, o, 1), !0;
|
1106
1106
|
}
|
1107
1107
|
function vr(e) {
|
1108
|
-
var a = this.__data__, o =
|
1108
|
+
var a = this.__data__, o = Kt(a, e);
|
1109
1109
|
return o < 0 ? void 0 : a[o][1];
|
1110
1110
|
}
|
1111
1111
|
function Sr(e) {
|
1112
|
-
return
|
1112
|
+
return Kt(this.__data__, e) > -1;
|
1113
1113
|
}
|
1114
1114
|
function wr(e, a) {
|
1115
|
-
var o = this.__data__, u =
|
1115
|
+
var o = this.__data__, u = Kt(o, e);
|
1116
1116
|
return u < 0 ? o.push([e, a]) : o[u][1] = a, this;
|
1117
1117
|
}
|
1118
|
-
|
1119
|
-
function
|
1118
|
+
V.prototype.clear = _r, V.prototype.delete = Ir, V.prototype.get = vr, V.prototype.has = Sr, V.prototype.set = wr;
|
1119
|
+
function q(e) {
|
1120
1120
|
var a = -1, o = e ? e.length : 0;
|
1121
1121
|
for (this.clear(); ++a < o; ) {
|
1122
1122
|
var u = e[a];
|
@@ -1126,28 +1126,28 @@ rr.exports;
|
|
1126
1126
|
function kr() {
|
1127
1127
|
this.__data__ = {
|
1128
1128
|
hash: new yt(),
|
1129
|
-
map: new (
|
1129
|
+
map: new (Et || V)(),
|
1130
1130
|
string: new yt()
|
1131
1131
|
};
|
1132
1132
|
}
|
1133
1133
|
function Tr(e) {
|
1134
|
-
return
|
1134
|
+
return xt(this, e).delete(e);
|
1135
1135
|
}
|
1136
1136
|
function Er(e) {
|
1137
|
-
return
|
1137
|
+
return xt(this, e).get(e);
|
1138
1138
|
}
|
1139
1139
|
function Mr(e) {
|
1140
|
-
return
|
1140
|
+
return xt(this, e).has(e);
|
1141
1141
|
}
|
1142
1142
|
function Ar(e, a) {
|
1143
|
-
return
|
1143
|
+
return xt(this, e).set(e, a), this;
|
1144
1144
|
}
|
1145
|
-
|
1145
|
+
q.prototype.clear = kr, q.prototype.delete = Tr, q.prototype.get = Er, q.prototype.has = Mr, q.prototype.set = Ar;
|
1146
1146
|
function tt(e) {
|
1147
|
-
this.__data__ = new
|
1147
|
+
this.__data__ = new V(e);
|
1148
1148
|
}
|
1149
1149
|
function Or() {
|
1150
|
-
this.__data__ = new
|
1150
|
+
this.__data__ = new V();
|
1151
1151
|
}
|
1152
1152
|
function xr(e) {
|
1153
1153
|
return this.__data__.delete(e);
|
@@ -1160,124 +1160,124 @@ rr.exports;
|
|
1160
1160
|
}
|
1161
1161
|
function Cr(e, a) {
|
1162
1162
|
var o = this.__data__;
|
1163
|
-
if (o instanceof
|
1163
|
+
if (o instanceof V) {
|
1164
1164
|
var u = o.__data__;
|
1165
|
-
if (!
|
1165
|
+
if (!Et || u.length < n - 1)
|
1166
1166
|
return u.push([e, a]), this;
|
1167
|
-
o = this.__data__ = new
|
1167
|
+
o = this.__data__ = new q(u);
|
1168
1168
|
}
|
1169
1169
|
return o.set(e, a), this;
|
1170
1170
|
}
|
1171
1171
|
tt.prototype.clear = Or, tt.prototype.delete = xr, tt.prototype.get = Dr, tt.prototype.has = Pr, tt.prototype.set = Cr;
|
1172
|
-
function
|
1173
|
-
var o =
|
1174
|
-
for (var
|
1175
|
-
dt.call(e,
|
1172
|
+
function $t(e, a) {
|
1173
|
+
var o = ye(e) || Vt(e) ? ee(e.length, String) : [], u = o.length, P = !!u;
|
1174
|
+
for (var k in e)
|
1175
|
+
dt.call(e, k) && !(P && (k == "length" || Yr(k, u))) && o.push(k);
|
1176
1176
|
return o;
|
1177
1177
|
}
|
1178
|
-
function
|
1178
|
+
function Ge(e, a, o) {
|
1179
1179
|
var u = e[a];
|
1180
|
-
(!(dt.call(e, a) &&
|
1180
|
+
(!(dt.call(e, a) && Ve(u, o)) || o === void 0 && !(a in e)) && (e[a] = o);
|
1181
1181
|
}
|
1182
|
-
function
|
1182
|
+
function Kt(e, a) {
|
1183
1183
|
for (var o = e.length; o--; )
|
1184
|
-
if (
|
1184
|
+
if (Ve(e[o][0], a))
|
1185
1185
|
return o;
|
1186
1186
|
return -1;
|
1187
1187
|
}
|
1188
1188
|
function pt(e, a) {
|
1189
|
-
return e &&
|
1189
|
+
return e && me(a, ge(a), e);
|
1190
1190
|
}
|
1191
|
-
function
|
1192
|
-
var
|
1193
|
-
if (u && (
|
1194
|
-
return
|
1191
|
+
function pe(e, a, o, u, P, k, H) {
|
1192
|
+
var z;
|
1193
|
+
if (u && (z = k ? u(e, P, k, H) : u(e)), z !== void 0)
|
1194
|
+
return z;
|
1195
1195
|
if (!mt(e))
|
1196
1196
|
return e;
|
1197
|
-
var
|
1198
|
-
if (
|
1199
|
-
if (
|
1200
|
-
return Wr(e,
|
1197
|
+
var B = ye(e);
|
1198
|
+
if (B) {
|
1199
|
+
if (z = $r(e), !a)
|
1200
|
+
return Wr(e, z);
|
1201
1201
|
} else {
|
1202
|
-
var
|
1203
|
-
if (
|
1204
|
-
return
|
1205
|
-
if (
|
1206
|
-
if (
|
1207
|
-
return
|
1208
|
-
if (
|
1209
|
-
return Gr(e, pt(
|
1202
|
+
var U = gt(e), J = U == T || U == N;
|
1203
|
+
if (Xe(e))
|
1204
|
+
return Yt(e, a);
|
1205
|
+
if (U == d || U == c || J && !k) {
|
1206
|
+
if (re(e))
|
1207
|
+
return k ? e : {};
|
1208
|
+
if (z = ht(J ? {} : e), !a)
|
1209
|
+
return Gr(e, pt(z, e));
|
1210
1210
|
} else {
|
1211
|
-
if (!L[
|
1212
|
-
return
|
1213
|
-
|
1211
|
+
if (!L[U])
|
1212
|
+
return k ? e : {};
|
1213
|
+
z = Kr(e, U, pe, a);
|
1214
1214
|
}
|
1215
1215
|
}
|
1216
|
-
|
1217
|
-
var et =
|
1216
|
+
H || (H = new tt());
|
1217
|
+
var et = H.get(e);
|
1218
1218
|
if (et)
|
1219
1219
|
return et;
|
1220
|
-
if (
|
1221
|
-
var
|
1222
|
-
return
|
1223
|
-
|
1224
|
-
}),
|
1220
|
+
if (H.set(e, z), !B)
|
1221
|
+
var $ = o ? Br(e) : ge(e);
|
1222
|
+
return De($ || e, function(Z, X) {
|
1223
|
+
$ && (X = Z, Z = e[X]), Ge(z, X, pe(Z, a, o, u, X, e, H));
|
1224
|
+
}), z;
|
1225
1225
|
}
|
1226
1226
|
function Rr(e) {
|
1227
|
-
return mt(e) ?
|
1227
|
+
return mt(e) ? He(e) : {};
|
1228
1228
|
}
|
1229
1229
|
function Fr(e, a, o) {
|
1230
1230
|
var u = a(e);
|
1231
|
-
return
|
1231
|
+
return ye(e) ? u : Pe(u, o(e));
|
1232
1232
|
}
|
1233
1233
|
function jr(e) {
|
1234
|
-
return
|
1234
|
+
return Lt.call(e);
|
1235
1235
|
}
|
1236
1236
|
function zr(e) {
|
1237
1237
|
if (!mt(e) || Xr(e))
|
1238
1238
|
return !1;
|
1239
|
-
var a =
|
1239
|
+
var a = be(e) || re(e) ? hr : vt;
|
1240
1240
|
return a.test(Q(e));
|
1241
1241
|
}
|
1242
1242
|
function Hr(e) {
|
1243
|
-
if (!
|
1244
|
-
return
|
1243
|
+
if (!Ke(e))
|
1244
|
+
return Le(e);
|
1245
1245
|
var a = [];
|
1246
1246
|
for (var o in Object(e))
|
1247
1247
|
dt.call(e, o) && o != "constructor" && a.push(o);
|
1248
1248
|
return a;
|
1249
1249
|
}
|
1250
|
-
function
|
1250
|
+
function Yt(e, a) {
|
1251
1251
|
if (a)
|
1252
1252
|
return e.slice();
|
1253
1253
|
var o = new e.constructor(e.length);
|
1254
1254
|
return e.copy(o), o;
|
1255
1255
|
}
|
1256
|
-
function
|
1256
|
+
function he(e) {
|
1257
1257
|
var a = new e.constructor(e.byteLength);
|
1258
|
-
return new
|
1258
|
+
return new ae(a).set(new ae(e)), a;
|
1259
1259
|
}
|
1260
|
-
function
|
1261
|
-
var o = a ?
|
1260
|
+
function Ot(e, a) {
|
1261
|
+
var o = a ? he(e.buffer) : e.buffer;
|
1262
1262
|
return new e.constructor(o, e.byteOffset, e.byteLength);
|
1263
1263
|
}
|
1264
|
-
function
|
1265
|
-
var u = a ? o(
|
1266
|
-
return
|
1264
|
+
function Be(e, a, o) {
|
1265
|
+
var u = a ? o(Re(e), !0) : Re(e);
|
1266
|
+
return te(u, fr, new e.constructor());
|
1267
1267
|
}
|
1268
|
-
function
|
1269
|
-
var a = new e.constructor(e.source,
|
1268
|
+
function $e(e) {
|
1269
|
+
var a = new e.constructor(e.source, Ht.exec(e));
|
1270
1270
|
return a.lastIndex = e.lastIndex, a;
|
1271
1271
|
}
|
1272
1272
|
function Nr(e, a, o) {
|
1273
|
-
var u = a ? o(
|
1274
|
-
return
|
1273
|
+
var u = a ? o(Fe(e), !0) : Fe(e);
|
1274
|
+
return te(u, ct, new e.constructor());
|
1275
1275
|
}
|
1276
1276
|
function Lr(e) {
|
1277
|
-
return
|
1277
|
+
return Ue ? Object(Ue.call(e)) : {};
|
1278
1278
|
}
|
1279
1279
|
function Ur(e, a) {
|
1280
|
-
var o = a ?
|
1280
|
+
var o = a ? he(e.buffer) : e.buffer;
|
1281
1281
|
return new e.constructor(o, e.byteOffset, e.length);
|
1282
1282
|
}
|
1283
1283
|
function Wr(e, a) {
|
@@ -1286,42 +1286,42 @@ rr.exports;
|
|
1286
1286
|
a[o] = e[o];
|
1287
1287
|
return a;
|
1288
1288
|
}
|
1289
|
-
function
|
1289
|
+
function me(e, a, o, u) {
|
1290
1290
|
o || (o = {});
|
1291
|
-
for (var
|
1292
|
-
var
|
1293
|
-
|
1291
|
+
for (var P = -1, k = a.length; ++P < k; ) {
|
1292
|
+
var H = a[P], z = void 0;
|
1293
|
+
Ge(o, H, z === void 0 ? e[H] : z);
|
1294
1294
|
}
|
1295
1295
|
return o;
|
1296
1296
|
}
|
1297
1297
|
function Gr(e, a) {
|
1298
|
-
return
|
1298
|
+
return me(e, bt(e), a);
|
1299
1299
|
}
|
1300
1300
|
function Br(e) {
|
1301
|
-
return Fr(e,
|
1301
|
+
return Fr(e, ge, bt);
|
1302
1302
|
}
|
1303
|
-
function
|
1303
|
+
function xt(e, a) {
|
1304
1304
|
var o = e.__data__;
|
1305
1305
|
return Vr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
1306
1306
|
}
|
1307
1307
|
function lt(e, a) {
|
1308
|
-
var o =
|
1308
|
+
var o = Ce(e, a);
|
1309
1309
|
return zr(o) ? o : void 0;
|
1310
1310
|
}
|
1311
|
-
var bt =
|
1312
|
-
(
|
1313
|
-
var a =
|
1311
|
+
var bt = se ? ne(se, Object) : Jr, gt = jr;
|
1312
|
+
(Gt && gt(new Gt(new ArrayBuffer(1))) != E || Et && gt(new Et()) != g || ut && gt(ut.resolve()) != p || Bt && gt(new Bt()) != v || oe && gt(new oe()) != l) && (gt = function(e) {
|
1313
|
+
var a = Lt.call(e), o = a == d ? e.constructor : void 0, u = o ? Q(o) : void 0;
|
1314
1314
|
if (u)
|
1315
1315
|
switch (u) {
|
1316
|
-
case oe:
|
1317
|
-
return M;
|
1318
|
-
case Mt:
|
1319
|
-
return b;
|
1320
1316
|
case ce:
|
1321
|
-
return
|
1317
|
+
return E;
|
1318
|
+
case At:
|
1319
|
+
return g;
|
1322
1320
|
case ue:
|
1323
|
-
return
|
1321
|
+
return p;
|
1324
1322
|
case le:
|
1323
|
+
return v;
|
1324
|
+
case fe:
|
1325
1325
|
return l;
|
1326
1326
|
}
|
1327
1327
|
return a;
|
@@ -1331,59 +1331,59 @@ rr.exports;
|
|
1331
1331
|
return a && typeof e[0] == "string" && dt.call(e, "index") && (o.index = e.index, o.input = e.input), o;
|
1332
1332
|
}
|
1333
1333
|
function ht(e) {
|
1334
|
-
return typeof e.constructor == "function" && !
|
1334
|
+
return typeof e.constructor == "function" && !Ke(e) ? Rr(at(e)) : {};
|
1335
1335
|
}
|
1336
1336
|
function Kr(e, a, o, u) {
|
1337
|
-
var
|
1337
|
+
var P = e.constructor;
|
1338
1338
|
switch (a) {
|
1339
|
-
case
|
1340
|
-
return
|
1341
|
-
case
|
1342
|
-
case
|
1343
|
-
return new
|
1344
|
-
case
|
1345
|
-
return
|
1339
|
+
case O:
|
1340
|
+
return he(e);
|
1341
|
+
case y:
|
1342
|
+
case A:
|
1343
|
+
return new P(+e);
|
1344
|
+
case E:
|
1345
|
+
return Ot(e, u);
|
1346
1346
|
case I:
|
1347
|
-
case C:
|
1348
|
-
case w:
|
1349
1347
|
case D:
|
1350
|
-
case k:
|
1351
1348
|
case S:
|
1352
|
-
case
|
1353
|
-
case
|
1354
|
-
case
|
1349
|
+
case x:
|
1350
|
+
case w:
|
1351
|
+
case M:
|
1352
|
+
case j:
|
1353
|
+
case R:
|
1354
|
+
case G:
|
1355
1355
|
return Ur(e, u);
|
1356
|
-
case b:
|
1357
|
-
return We(e, u, o);
|
1358
|
-
case d:
|
1359
|
-
case _:
|
1360
|
-
return new R(e);
|
1361
1356
|
case g:
|
1362
|
-
return
|
1357
|
+
return Be(e, u, o);
|
1358
|
+
case f:
|
1359
|
+
case _:
|
1360
|
+
return new P(e);
|
1361
|
+
case b:
|
1362
|
+
return $e(e);
|
1363
1363
|
case v:
|
1364
1364
|
return Nr(e, u, o);
|
1365
|
-
case
|
1365
|
+
case m:
|
1366
1366
|
return Lr(e);
|
1367
1367
|
}
|
1368
1368
|
}
|
1369
1369
|
function Yr(e, a) {
|
1370
|
-
return a = a ?? s, !!a && (typeof e == "number" ||
|
1370
|
+
return a = a ?? s, !!a && (typeof e == "number" || ft.test(e)) && e > -1 && e % 1 == 0 && e < a;
|
1371
1371
|
}
|
1372
1372
|
function Vr(e) {
|
1373
1373
|
var a = typeof e;
|
1374
1374
|
return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? e !== "__proto__" : e === null;
|
1375
1375
|
}
|
1376
1376
|
function Xr(e) {
|
1377
|
-
return !!
|
1377
|
+
return !!je && je in e;
|
1378
1378
|
}
|
1379
|
-
function
|
1380
|
-
var a = e && e.constructor, o = typeof a == "function" && a.prototype ||
|
1379
|
+
function Ke(e) {
|
1380
|
+
var a = e && e.constructor, o = typeof a == "function" && a.prototype || Nt;
|
1381
1381
|
return e === o;
|
1382
1382
|
}
|
1383
1383
|
function Q(e) {
|
1384
1384
|
if (e != null) {
|
1385
1385
|
try {
|
1386
|
-
return
|
1386
|
+
return ze.call(e);
|
1387
1387
|
} catch {
|
1388
1388
|
}
|
1389
1389
|
try {
|
@@ -1393,39 +1393,39 @@ rr.exports;
|
|
1393
1393
|
}
|
1394
1394
|
return "";
|
1395
1395
|
}
|
1396
|
-
function
|
1397
|
-
return
|
1396
|
+
function Ye(e) {
|
1397
|
+
return pe(e, !0, !0);
|
1398
1398
|
}
|
1399
|
-
function
|
1399
|
+
function Ve(e, a) {
|
1400
1400
|
return e === a || e !== e && a !== a;
|
1401
1401
|
}
|
1402
|
-
function
|
1403
|
-
return qr(e) && dt.call(e, "callee") && (!
|
1402
|
+
function Vt(e) {
|
1403
|
+
return qr(e) && dt.call(e, "callee") && (!Ne.call(e, "callee") || Lt.call(e) == c);
|
1404
1404
|
}
|
1405
|
-
var
|
1406
|
-
function
|
1407
|
-
return e != null &&
|
1405
|
+
var ye = Array.isArray;
|
1406
|
+
function Xt(e) {
|
1407
|
+
return e != null && qe(e.length) && !be(e);
|
1408
1408
|
}
|
1409
1409
|
function qr(e) {
|
1410
|
-
return
|
1410
|
+
return Je(e) && Xt(e);
|
1411
1411
|
}
|
1412
|
-
var
|
1413
|
-
function
|
1414
|
-
var a = mt(e) ?
|
1415
|
-
return a ==
|
1412
|
+
var Xe = Wt || Zr;
|
1413
|
+
function be(e) {
|
1414
|
+
var a = mt(e) ? Lt.call(e) : "";
|
1415
|
+
return a == T || a == N;
|
1416
1416
|
}
|
1417
|
-
function
|
1417
|
+
function qe(e) {
|
1418
1418
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= s;
|
1419
1419
|
}
|
1420
1420
|
function mt(e) {
|
1421
1421
|
var a = typeof e;
|
1422
1422
|
return !!e && (a == "object" || a == "function");
|
1423
1423
|
}
|
1424
|
-
function
|
1424
|
+
function Je(e) {
|
1425
1425
|
return !!e && typeof e == "object";
|
1426
1426
|
}
|
1427
|
-
function
|
1428
|
-
return
|
1427
|
+
function ge(e) {
|
1428
|
+
return Xt(e) ? $t(e) : Hr(e);
|
1429
1429
|
}
|
1430
1430
|
function Jr() {
|
1431
1431
|
return [];
|
@@ -1433,10 +1433,10 @@ rr.exports;
|
|
1433
1433
|
function Zr() {
|
1434
1434
|
return !1;
|
1435
1435
|
}
|
1436
|
-
t.exports =
|
1437
|
-
})(
|
1438
|
-
var
|
1439
|
-
const
|
1436
|
+
t.exports = Ye;
|
1437
|
+
})(nr, nr.exports);
|
1438
|
+
var Qi = nr.exports;
|
1439
|
+
const K = /* @__PURE__ */ wn(Qi), ei = (t) => new Promise((r, n) => {
|
1440
1440
|
const i = new Image();
|
1441
1441
|
console.warn("update cdn config for cors?"), i.onload = () => {
|
1442
1442
|
const s = i.width, c = i.height;
|
@@ -1444,7 +1444,7 @@ const B = /* @__PURE__ */ wn(Zi), ti = (t) => new Promise((r, n) => {
|
|
1444
1444
|
}, i.onerror = (s) => {
|
1445
1445
|
n(s);
|
1446
1446
|
}, i.crossOrigin = "anonymous", i.src = t;
|
1447
|
-
}),
|
1447
|
+
}), ta = (t) => new Promise((r, n) => {
|
1448
1448
|
const i = new Audio();
|
1449
1449
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
1450
1450
|
const s = i.duration * 1e3;
|
@@ -1452,7 +1452,7 @@ const B = /* @__PURE__ */ wn(Zi), ti = (t) => new Promise((r, n) => {
|
|
1452
1452
|
}), i.addEventListener("error", (s) => {
|
1453
1453
|
n(s);
|
1454
1454
|
}), i.src = t, i.crossOrigin = "anonymous", i.load();
|
1455
|
-
}),
|
1455
|
+
}), ri = (t) => new Promise((r, n) => {
|
1456
1456
|
const i = document.createElement("video");
|
1457
1457
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
1458
1458
|
const s = i.duration * 1e3, c = i.videoWidth, h = i.videoHeight;
|
@@ -1460,7 +1460,7 @@ const B = /* @__PURE__ */ wn(Zi), ti = (t) => new Promise((r, n) => {
|
|
1460
1460
|
}), i.addEventListener("error", (s) => {
|
1461
1461
|
n(s);
|
1462
1462
|
}), i.src = t, i.load();
|
1463
|
-
}),
|
1463
|
+
}), ni = (t, r) => {
|
1464
1464
|
const n = document.createElement("div");
|
1465
1465
|
Object.keys(r).forEach((s) => {
|
1466
1466
|
s !== "height" && (n.style[s] = r[s]);
|
@@ -1476,12 +1476,12 @@ const B = /* @__PURE__ */ wn(Zi), ti = (t) => new Promise((r, n) => {
|
|
1476
1476
|
});
|
1477
1477
|
}).catch((s) => i(s));
|
1478
1478
|
});
|
1479
|
-
},
|
1479
|
+
}, or = {
|
1480
1480
|
color: "#000000",
|
1481
1481
|
x: 0,
|
1482
1482
|
y: 0,
|
1483
1483
|
blur: 0
|
1484
|
-
},
|
1484
|
+
}, Ee = (t, r) => {
|
1485
1485
|
let n = r != null && r.trim ? r.trim.to - r.trim.from : (r == null ? void 0 : r.duration) || 5e3;
|
1486
1486
|
const i = {
|
1487
1487
|
from: 0,
|
@@ -1509,14 +1509,14 @@ const B = /* @__PURE__ */ wn(Zi), ti = (t) => new Promise((r, n) => {
|
|
1509
1509
|
), i;
|
1510
1510
|
}
|
1511
1511
|
return t;
|
1512
|
-
},
|
1512
|
+
}, ii = (t, r) => t ? t.from && !t.to ? {
|
1513
1513
|
from: t.from,
|
1514
1514
|
to: r.duration
|
1515
1515
|
} : t : {
|
1516
1516
|
from: 0,
|
1517
1517
|
to: r.duration
|
1518
1518
|
};
|
1519
|
-
function
|
1519
|
+
function cr(t, r) {
|
1520
1520
|
const n = {
|
1521
1521
|
x: t.size.width / 2,
|
1522
1522
|
y: t.size.height / 2
|
@@ -1531,9 +1531,9 @@ function or(t, r) {
|
|
1531
1531
|
};
|
1532
1532
|
}
|
1533
1533
|
const dn = async (t, r) => {
|
1534
|
-
const n = t.details.src, i = await
|
1534
|
+
const n = t.details.src, i = await ri(n), s = cr(r, {
|
1535
1535
|
...i
|
1536
|
-
}), c =
|
1536
|
+
}), c = ii(t.trim, { duration: i.duration }), h = {
|
1537
1537
|
width: i.width,
|
1538
1538
|
height: i.height,
|
1539
1539
|
opacity: 100,
|
@@ -1546,7 +1546,7 @@ const dn = async (t, r) => {
|
|
1546
1546
|
// Default border width
|
1547
1547
|
borderColor: t.details.borderColor || "#000000",
|
1548
1548
|
// Default border color
|
1549
|
-
boxShadow: t.details.boxShadow ||
|
1549
|
+
boxShadow: t.details.boxShadow || or,
|
1550
1550
|
top: t.details.top || s.top || "0px",
|
1551
1551
|
// Default top
|
1552
1552
|
left: t.details.left || s.left || "0px",
|
@@ -1569,19 +1569,19 @@ const dn = async (t, r) => {
|
|
1569
1569
|
name: "video",
|
1570
1570
|
details: h,
|
1571
1571
|
playbackRate: t.playbackRate || 1,
|
1572
|
-
display:
|
1572
|
+
display: Ee(t.display, { duration: i.duration, trim: c }),
|
1573
1573
|
duration: i.duration
|
1574
1574
|
};
|
1575
1575
|
}, pn = async (t) => {
|
1576
1576
|
console.log({ payload: t });
|
1577
|
-
const r = t.id, n = t.details, i = await
|
1577
|
+
const r = t.id, n = t.details, i = await ta(n.src);
|
1578
1578
|
console.log({ audioData: i });
|
1579
|
-
const s = i.duration, c =
|
1579
|
+
const s = i.duration, c = ii(t.trim, { duration: s });
|
1580
1580
|
return {
|
1581
1581
|
id: r,
|
1582
1582
|
name: "",
|
1583
1583
|
type: "audio",
|
1584
|
-
display:
|
1584
|
+
display: Ee(t.display, { duration: s, trim: c }),
|
1585
1585
|
trim: c,
|
1586
1586
|
playbackRate: t.playbackRate || 1,
|
1587
1587
|
details: {
|
@@ -1592,61 +1592,61 @@ const dn = async (t, r) => {
|
|
1592
1592
|
metadata: { ...t.metadata },
|
1593
1593
|
duration: s
|
1594
1594
|
};
|
1595
|
-
},
|
1595
|
+
}, ea = async (t, r) => {
|
1596
1596
|
const n = t.trackItemsIds, i = t.size, s = Math.min(
|
1597
1597
|
r.size.width / i.width,
|
1598
1598
|
r.size.height / i.height
|
1599
|
-
), c = t.rotate || 0, h = t.position,
|
1600
|
-
let F = 1 / 0,
|
1601
|
-
const N = n.map((
|
1602
|
-
const
|
1603
|
-
if (
|
1599
|
+
), c = t.rotate || 0, h = t.position, y = t.display, A = t.trim || t.display;
|
1600
|
+
let F = 1 / 0, T = 0;
|
1601
|
+
const N = n.map((f) => {
|
1602
|
+
const d = t.trackItemsMap[f], p = t.trackItemsDetails[f];
|
1603
|
+
if (d.display.from < F && (F = d.display.from), d.display.to > T && (T = d.display.to), d.type === "text")
|
1604
1604
|
return yn(
|
1605
|
-
{ ...
|
1605
|
+
{ ...d, details: p.details },
|
1606
1606
|
{ size: i }
|
1607
1607
|
);
|
1608
|
-
if (
|
1608
|
+
if (d.type === "image")
|
1609
1609
|
return hn(
|
1610
|
-
{ ...
|
1610
|
+
{ ...d, details: p.details },
|
1611
1611
|
{ size: i }
|
1612
1612
|
);
|
1613
|
-
if (
|
1613
|
+
if (d.type === "video")
|
1614
1614
|
return dn(
|
1615
|
-
{ ...
|
1615
|
+
{ ...d, details: p.details },
|
1616
1616
|
{ size: i }
|
1617
1617
|
);
|
1618
|
-
if (
|
1618
|
+
if (d.type === "audio")
|
1619
1619
|
return pn({
|
1620
|
-
...
|
1620
|
+
...d,
|
1621
1621
|
details: p.details
|
1622
1622
|
});
|
1623
|
-
if (
|
1623
|
+
if (d.type === "caption")
|
1624
1624
|
return mn(
|
1625
|
-
{ ...
|
1625
|
+
{ ...d, details: p.details },
|
1626
1626
|
{ size: i }
|
1627
1627
|
);
|
1628
|
-
}),
|
1628
|
+
}), g = await Promise.all(N);
|
1629
1629
|
return {
|
1630
1630
|
id: t.id,
|
1631
|
-
details:
|
1631
|
+
details: g,
|
1632
1632
|
size: i,
|
1633
1633
|
position: {
|
1634
1634
|
top: h.top || 0,
|
1635
1635
|
left: h.left || 0
|
1636
1636
|
},
|
1637
|
-
trim:
|
1637
|
+
trim: A,
|
1638
1638
|
scale: s,
|
1639
|
-
display:
|
1639
|
+
display: y || { from: F, to: T },
|
1640
1640
|
rotate: c,
|
1641
1641
|
activeEdit: !1
|
1642
1642
|
};
|
1643
1643
|
}, hn = async (t, r) => {
|
1644
|
-
const n = t.details, i = await
|
1644
|
+
const n = t.details, i = await ei(n.src), s = cr(r, i);
|
1645
1645
|
return {
|
1646
1646
|
id: t.id,
|
1647
1647
|
type: "image",
|
1648
1648
|
name: "image",
|
1649
|
-
display:
|
1649
|
+
display: Ee(t.display),
|
1650
1650
|
playbackRate: t.playbackRate || 1,
|
1651
1651
|
details: {
|
1652
1652
|
src: n.src || "",
|
@@ -1663,7 +1663,7 @@ const dn = async (t, r) => {
|
|
1663
1663
|
// Default border
|
1664
1664
|
borderRadius: n.borderRadius || 0,
|
1665
1665
|
// Default border radius
|
1666
|
-
boxShadow: n.boxShadow ||
|
1666
|
+
boxShadow: n.boxShadow || or,
|
1667
1667
|
// Default box shadow
|
1668
1668
|
top: n.top || s.top || "0px",
|
1669
1669
|
// Default top
|
@@ -1692,7 +1692,7 @@ const dn = async (t, r) => {
|
|
1692
1692
|
url: n.details.fontUrl
|
1693
1693
|
}
|
1694
1694
|
]);
|
1695
|
-
const i = n.id, s = n.details, c =
|
1695
|
+
const i = n.id, s = n.details, c = ai(s), h = ni(n.details.text, c), y = cr(r, {
|
1696
1696
|
width: c.width,
|
1697
1697
|
height: h
|
1698
1698
|
});
|
@@ -1700,7 +1700,7 @@ const dn = async (t, r) => {
|
|
1700
1700
|
id: i,
|
1701
1701
|
name: "caption",
|
1702
1702
|
type: "caption",
|
1703
|
-
display:
|
1703
|
+
display: Ee(n.display),
|
1704
1704
|
details: {
|
1705
1705
|
...c,
|
1706
1706
|
text: s.text || "",
|
@@ -1708,11 +1708,11 @@ const dn = async (t, r) => {
|
|
1708
1708
|
height: h,
|
1709
1709
|
// Default height
|
1710
1710
|
fontUrl: s.fontUrl,
|
1711
|
-
top: c.top ||
|
1712
|
-
left: c.left ||
|
1711
|
+
top: c.top || y.top,
|
1712
|
+
left: c.left || y.left,
|
1713
1713
|
borderWidth: s.borderWidth || 0,
|
1714
1714
|
borderColor: s.borderColor || "#000000",
|
1715
|
-
boxShadow: s.boxShadow ||
|
1715
|
+
boxShadow: s.boxShadow || or,
|
1716
1716
|
words: s.words || []
|
1717
1717
|
},
|
1718
1718
|
metadata: {}
|
@@ -1724,7 +1724,7 @@ const dn = async (t, r) => {
|
|
1724
1724
|
url: t.details.fontUrl
|
1725
1725
|
}
|
1726
1726
|
]);
|
1727
|
-
const n = t.id, i = t.details, s =
|
1727
|
+
const n = t.id, i = t.details, s = ai(i), c = ni(t.details.text, s), h = cr(r, {
|
1728
1728
|
width: s.width,
|
1729
1729
|
height: c
|
1730
1730
|
});
|
@@ -1732,7 +1732,7 @@ const dn = async (t, r) => {
|
|
1732
1732
|
id: n,
|
1733
1733
|
name: "text",
|
1734
1734
|
type: "text",
|
1735
|
-
display:
|
1735
|
+
display: Ee(t.display),
|
1736
1736
|
details: {
|
1737
1737
|
...s,
|
1738
1738
|
text: i.text || "",
|
@@ -1744,11 +1744,11 @@ const dn = async (t, r) => {
|
|
1744
1744
|
left: s.left || h.left,
|
1745
1745
|
borderWidth: i.borderWidth || 0,
|
1746
1746
|
borderColor: i.borderColor || "#000000",
|
1747
|
-
boxShadow: i.boxShadow ||
|
1747
|
+
boxShadow: i.boxShadow || or
|
1748
1748
|
},
|
1749
1749
|
metadata: {}
|
1750
1750
|
};
|
1751
|
-
},
|
1751
|
+
}, ai = (t) => ({
|
1752
1752
|
fontFamily: t.fontFamily || "Arial",
|
1753
1753
|
// Default font family
|
1754
1754
|
fontSize: t.fontSize || "16px",
|
@@ -1790,14 +1790,14 @@ const dn = async (t, r) => {
|
|
1790
1790
|
left: t.left,
|
1791
1791
|
textTransform: t.textTransform || "none",
|
1792
1792
|
transform: t.transform || "none"
|
1793
|
-
}),
|
1794
|
-
let
|
1793
|
+
}), ra = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
1794
|
+
let _e = (t = 21) => {
|
1795
1795
|
let r = "", n = crypto.getRandomValues(new Uint8Array(t));
|
1796
1796
|
for (; t--; )
|
1797
|
-
r +=
|
1797
|
+
r += ra[n[t] & 63];
|
1798
1798
|
return r;
|
1799
1799
|
};
|
1800
|
-
function
|
1800
|
+
function na(t, r) {
|
1801
1801
|
return t.filter((i) => {
|
1802
1802
|
if (r.forEach((s) => {
|
1803
1803
|
i.items.includes(s) && (i.items = i.items.filter((c) => c !== s));
|
@@ -1807,174 +1807,187 @@ function ra(t, r) {
|
|
1807
1807
|
}
|
1808
1808
|
function en(t = 16) {
|
1809
1809
|
const r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n = r.charAt(Math.floor(Math.random() * r.length));
|
1810
|
-
let i =
|
1810
|
+
let i = _e(t - 1);
|
1811
1811
|
return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
|
1812
1812
|
}
|
1813
|
-
const
|
1813
|
+
const Zt = (t) => Object.keys(t).reduce((r, n) => {
|
1814
1814
|
const { display: i, playbackRate: s } = t[n];
|
1815
1815
|
return Math.max(r, i.to / (s || 1));
|
1816
|
-
}, 0)
|
1817
|
-
|
1818
|
-
return
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1816
|
+
}, 0);
|
1817
|
+
function zn(t, r, n) {
|
1818
|
+
return Math.min(Math.max(t, r), n);
|
1819
|
+
}
|
1820
|
+
const ia = (t, r, n, i, s) => {
|
1821
|
+
if (i === void 0 && s === void 0)
|
1822
|
+
return { trackId: void 0, trackIndex: void 0 };
|
1823
|
+
const c = s !== void 0 ? r[zn(s, 0, r.length)] : r.find((A) => A.id === i);
|
1824
|
+
if (!c)
|
1825
|
+
return {
|
1826
|
+
trackId: void 0,
|
1827
|
+
trackIndex: s !== void 0 ? zn(s, 0, r.length) : void 0
|
1828
|
+
};
|
1829
|
+
const h = c.items.map((A) => n[A]), y = t.map((A) => n[A]);
|
1830
|
+
for (const A of h) {
|
1831
|
+
const F = A.display.from, T = A.display.to;
|
1832
|
+
for (const N of y) {
|
1833
|
+
const g = N.display.from;
|
1834
|
+
if (!(N.display.to <= F || g >= T))
|
1835
|
+
return {
|
1836
|
+
trackId: void 0,
|
1837
|
+
trackIndex: r.indexOf(c)
|
1838
|
+
};
|
1830
1839
|
}
|
1831
|
-
}
|
1840
|
+
}
|
1841
|
+
return {
|
1842
|
+
trackId: c.id,
|
1843
|
+
trackIndex: r.indexOf(c)
|
1844
|
+
};
|
1832
1845
|
};
|
1833
|
-
function
|
1834
|
-
const r =
|
1835
|
-
|
1836
|
-
), n =
|
1837
|
-
|
1838
|
-
), i =
|
1839
|
-
|
1840
|
-
), s =
|
1841
|
-
|
1842
|
-
), c =
|
1843
|
-
|
1844
|
-
), h =
|
1845
|
-
|
1846
|
-
),
|
1847
|
-
var
|
1848
|
-
if (
|
1849
|
-
const
|
1846
|
+
function aa(t) {
|
1847
|
+
const r = qt.pipe(
|
1848
|
+
Jt(({ key: f }) => f.startsWith(yi))
|
1849
|
+
), n = qt.pipe(
|
1850
|
+
Jt(({ key: f }) => f.startsWith(bi))
|
1851
|
+
), i = qt.pipe(
|
1852
|
+
Jt(({ key: f }) => f.startsWith(gi))
|
1853
|
+
), s = qt.pipe(
|
1854
|
+
Jt(({ key: f }) => f.startsWith(_i))
|
1855
|
+
), c = qt.pipe(
|
1856
|
+
Jt(({ key: f }) => f.startsWith(Ii))
|
1857
|
+
), h = qt.pipe(
|
1858
|
+
Jt(({ key: f }) => f.startsWith(vi))
|
1859
|
+
), y = r.subscribe(async (f) => {
|
1860
|
+
var d, p;
|
1861
|
+
if (f.key === Si) {
|
1862
|
+
const b = (d = f.value) == null ? void 0 : d.payload, v = b.size, _ = b.trackItemIds, m = b.trackItemsMap, l = b.trackItemDetailsMap;
|
1850
1863
|
console.warn("IMPROVE FONTS LOADING");
|
1851
|
-
const
|
1852
|
-
var
|
1864
|
+
const O = _.map(async (I) => {
|
1865
|
+
var D;
|
1853
1866
|
try {
|
1854
|
-
const
|
1855
|
-
if (
|
1856
|
-
const
|
1857
|
-
{ id: I, details:
|
1867
|
+
const S = l[I], x = m[I];
|
1868
|
+
if (S.type === "image") {
|
1869
|
+
const w = await hn(
|
1870
|
+
{ id: I, details: S.details, ...x },
|
1858
1871
|
{
|
1859
1872
|
size: v
|
1860
1873
|
}
|
1861
|
-
), { details:
|
1862
|
-
l[I] = { type: "image", details:
|
1863
|
-
} else if (
|
1864
|
-
const
|
1865
|
-
(
|
1866
|
-
),
|
1867
|
-
{ ...
|
1874
|
+
), { details: M, ...j } = w;
|
1875
|
+
l[I] = { type: "image", details: M }, m[I] = j;
|
1876
|
+
} else if (S.type === "video") {
|
1877
|
+
const w = K(
|
1878
|
+
(D = f.value) == null ? void 0 : D.payload.trackItemsMap[I]
|
1879
|
+
), M = await dn(
|
1880
|
+
{ ...S, ...w, ...x },
|
1868
1881
|
{
|
1869
1882
|
size: v
|
1870
1883
|
}
|
1871
|
-
), { details:
|
1872
|
-
l[I] = { type: "video", details:
|
1873
|
-
} else if (
|
1874
|
-
const
|
1884
|
+
), { details: j, ...R } = M;
|
1885
|
+
l[I] = { type: "video", details: j }, m[I] = R;
|
1886
|
+
} else if (S.type === "audio") {
|
1887
|
+
const w = await pn({
|
1875
1888
|
id: I,
|
1876
|
-
details:
|
1877
|
-
...
|
1878
|
-
}), { details:
|
1879
|
-
l[I] = { type: "audio", details:
|
1880
|
-
} else if (
|
1881
|
-
const
|
1882
|
-
{ id: I, details:
|
1889
|
+
details: S.details,
|
1890
|
+
...x
|
1891
|
+
}), { details: M, ...j } = w;
|
1892
|
+
l[I] = { type: "audio", details: M }, m[I] = j;
|
1893
|
+
} else if (S.type === "caption") {
|
1894
|
+
const w = await mn(
|
1895
|
+
{ id: I, details: S.details, ...x },
|
1883
1896
|
{
|
1884
1897
|
size: v
|
1885
1898
|
}
|
1886
|
-
), { details:
|
1887
|
-
l[I] = { type: "caption", details:
|
1888
|
-
} else if (
|
1889
|
-
const
|
1890
|
-
{ id: I, details:
|
1899
|
+
), { details: M, ...j } = w;
|
1900
|
+
l[I] = { type: "caption", details: M }, m[I] = j;
|
1901
|
+
} else if (S.type === "text") {
|
1902
|
+
const w = await yn(
|
1903
|
+
{ id: I, details: S.details, ...x },
|
1891
1904
|
{
|
1892
1905
|
size: v
|
1893
1906
|
}
|
1894
|
-
), { details:
|
1895
|
-
l[I] = { type: "text", details:
|
1907
|
+
), { details: M, ...j } = w;
|
1908
|
+
l[I] = { type: "text", details: M }, m[I] = j;
|
1896
1909
|
}
|
1897
1910
|
return !0;
|
1898
1911
|
} catch {
|
1899
1912
|
return !1;
|
1900
1913
|
}
|
1901
1914
|
});
|
1902
|
-
await Promise.all(
|
1903
|
-
const
|
1915
|
+
await Promise.all(O);
|
1916
|
+
const E = Zt(m);
|
1904
1917
|
t.updateState({
|
1905
|
-
...
|
1906
|
-
trackItemsMap:
|
1907
|
-
duration:
|
1918
|
+
...b,
|
1919
|
+
trackItemsMap: m,
|
1920
|
+
duration: E
|
1908
1921
|
});
|
1909
1922
|
}
|
1910
|
-
if (
|
1911
|
-
const
|
1923
|
+
if (f.key === wi) {
|
1924
|
+
const b = (p = f.value) == null ? void 0 : p.payload;
|
1912
1925
|
t.updateState({
|
1913
|
-
size:
|
1926
|
+
size: b
|
1914
1927
|
});
|
1915
1928
|
}
|
1916
|
-
}),
|
1917
|
-
if (
|
1918
|
-
if (
|
1919
|
-
}), F = i.subscribe((
|
1920
|
-
var
|
1921
|
-
const
|
1922
|
-
if ((
|
1923
|
-
const l = (_ =
|
1924
|
-
(
|
1925
|
-
),
|
1926
|
-
Object.entries(
|
1927
|
-
([
|
1929
|
+
}), A = s.subscribe((f) => {
|
1930
|
+
if (f.key === ki) return t.undo();
|
1931
|
+
if (f.key === Ti) return t.redo();
|
1932
|
+
}), F = i.subscribe((f) => {
|
1933
|
+
var b, v, _, m;
|
1934
|
+
const d = [], p = [];
|
1935
|
+
if ((b = f.value) != null && b.payload.trackItemIds && (d.push((v = f.value) == null ? void 0 : v.payload.trackItemIds), t.updateState({ activeIds: d })), f.key === Ei) {
|
1936
|
+
const l = (_ = f.value) == null ? void 0 : _.payload.trackItemIds, O = K(t.getState()), E = l && l.length ? l : O.activeIds, I = O.trackItemIds, D = O.trackItemDetailsMap, S = I.filter(
|
1937
|
+
(R) => !E.includes(R)
|
1938
|
+
), x = Object.fromEntries(
|
1939
|
+
Object.entries(D).filter(
|
1940
|
+
([R]) => !E.includes(R)
|
1928
1941
|
)
|
1929
|
-
),
|
1930
|
-
|
1931
|
-
|
1932
|
-
),
|
1933
|
-
Object.entries(
|
1934
|
-
([
|
1942
|
+
), w = na(
|
1943
|
+
O.tracks,
|
1944
|
+
E
|
1945
|
+
), M = Object.fromEntries(
|
1946
|
+
Object.entries(O.trackItemsMap).filter(
|
1947
|
+
([R]) => !E.includes(R)
|
1935
1948
|
)
|
1936
|
-
),
|
1949
|
+
), j = Zt(M);
|
1937
1950
|
t.updateState(
|
1938
1951
|
{
|
1939
|
-
trackItemIds:
|
1940
|
-
trackItemDetailsMap:
|
1952
|
+
trackItemIds: S,
|
1953
|
+
trackItemDetailsMap: x,
|
1941
1954
|
activeIds: [],
|
1942
|
-
trackItemsMap:
|
1943
|
-
tracks:
|
1944
|
-
duration:
|
1955
|
+
trackItemsMap: M,
|
1956
|
+
tracks: w,
|
1957
|
+
duration: j
|
1945
1958
|
},
|
1946
1959
|
{ updateHistory: !0, kind: "remove" }
|
1947
1960
|
);
|
1948
1961
|
}
|
1949
|
-
if (
|
1950
|
-
const l =
|
1951
|
-
if (
|
1952
|
-
|
1953
|
-
const
|
1954
|
-
p.push(
|
1962
|
+
if (f.key === Mi) {
|
1963
|
+
const l = K(t.getState()), O = ((m = f.value) == null ? void 0 : m.payload.trackItemIds) || l.activeIds;
|
1964
|
+
if (O.length === 0) return;
|
1965
|
+
O.forEach((I) => {
|
1966
|
+
const D = l.trackItemsMap[I], S = l.trackItemDetailsMap[I], x = en();
|
1967
|
+
p.push(x), l.trackItemsMap = {
|
1955
1968
|
...l.trackItemsMap,
|
1956
|
-
[
|
1969
|
+
[x]: { ...K(D), id: x }
|
1957
1970
|
}, l.trackItemDetailsMap = {
|
1958
1971
|
...l.trackItemDetailsMap,
|
1959
|
-
[
|
1960
|
-
...
|
1972
|
+
[x]: {
|
1973
|
+
...K(S)
|
1961
1974
|
}
|
1962
|
-
}, l.trackItemIds.push(
|
1975
|
+
}, l.trackItemIds.push(x);
|
1963
1976
|
});
|
1964
|
-
const
|
1977
|
+
const E = [];
|
1965
1978
|
l.tracks.forEach((I) => {
|
1966
|
-
const
|
1979
|
+
const D = {
|
1967
1980
|
...I,
|
1968
1981
|
items: [],
|
1969
|
-
id:
|
1982
|
+
id: _e()
|
1970
1983
|
};
|
1971
|
-
I.items.forEach((
|
1972
|
-
if (
|
1973
|
-
const
|
1974
|
-
|
1984
|
+
I.items.forEach((S) => {
|
1985
|
+
if (O.includes(S)) {
|
1986
|
+
const x = O.indexOf(S);
|
1987
|
+
D.items.push(p[x]);
|
1975
1988
|
}
|
1976
|
-
}),
|
1977
|
-
}),
|
1989
|
+
}), E.push(D);
|
1990
|
+
}), E.forEach((I) => {
|
1978
1991
|
I.items.length !== 0 && l.tracks.unshift(I);
|
1979
1992
|
}), t.updateState(
|
1980
1993
|
{
|
@@ -1989,132 +2002,166 @@ function ia(t) {
|
|
1989
2002
|
}
|
1990
2003
|
);
|
1991
2004
|
}
|
1992
|
-
}),
|
1993
|
-
var l,
|
1994
|
-
const
|
1995
|
-
let p = [],
|
1996
|
-
const v = (l =
|
1997
|
-
|
1998
|
-
|
1999
|
-
|
2000
|
-
|
2001
|
-
|
2002
|
-
|
2005
|
+
}), T = n.subscribe(async (f) => {
|
2006
|
+
var l, O, E, I, D, S, x, w, M, j;
|
2007
|
+
const d = K(t.getState());
|
2008
|
+
let p = [], b = "text";
|
2009
|
+
const v = (O = (l = f.value) == null ? void 0 : l.options) == null ? void 0 : O.trackId;
|
2010
|
+
let _ = (I = (E = f.value) == null ? void 0 : E.options) == null ? void 0 : I.trackIndex;
|
2011
|
+
if (f.key === Ai) {
|
2012
|
+
b = "caption";
|
2013
|
+
const R = (D = f.value) == null ? void 0 : D.payload, G = [];
|
2014
|
+
for (const vt of R) {
|
2015
|
+
const ft = mn(vt, {
|
2016
|
+
size: d.size
|
2003
2017
|
});
|
2004
|
-
|
2018
|
+
G.push(ft);
|
2005
2019
|
}
|
2006
|
-
const
|
2007
|
-
for (const
|
2008
|
-
const ft =
|
2009
|
-
|
2010
|
-
const { details:
|
2011
|
-
|
2012
|
-
type:
|
2013
|
-
details:
|
2014
|
-
},
|
2020
|
+
const C = await Promise.all(G), Ht = [];
|
2021
|
+
for (const vt of C) {
|
2022
|
+
const ft = vt.id;
|
2023
|
+
Ht.push(ft);
|
2024
|
+
const { details: L, ...Qt } = vt;
|
2025
|
+
d.trackItemDetailsMap[ft] = {
|
2026
|
+
type: b,
|
2027
|
+
details: L
|
2028
|
+
}, d.trackItemsMap[ft] = Qt, d.trackItemIds.push(ft);
|
2015
2029
|
}
|
2016
|
-
p =
|
2030
|
+
p = Ht;
|
2017
2031
|
}
|
2018
|
-
if (
|
2019
|
-
|
2020
|
-
const
|
2021
|
-
size:
|
2022
|
-
}), { details:
|
2023
|
-
|
2024
|
-
type:
|
2025
|
-
details:
|
2026
|
-
},
|
2032
|
+
if (f.key === Oi) {
|
2033
|
+
b = "text";
|
2034
|
+
const R = await yn((S = f.value) == null ? void 0 : S.payload, {
|
2035
|
+
size: d.size
|
2036
|
+
}), { details: G, ...C } = R;
|
2037
|
+
d.trackItemDetailsMap[C.id] = {
|
2038
|
+
type: b,
|
2039
|
+
details: G
|
2040
|
+
}, d.trackItemsMap[C.id] = C, d.trackItemIds.push(C.id), p = [C.id];
|
2027
2041
|
}
|
2028
|
-
if (
|
2029
|
-
|
2030
|
-
const
|
2031
|
-
size:
|
2032
|
-
}), { details:
|
2033
|
-
|
2034
|
-
...
|
2042
|
+
if (f.key === xi) {
|
2043
|
+
b = "template";
|
2044
|
+
const R = await ea((x = f.value) == null ? void 0 : x.payload, {
|
2045
|
+
size: d.size
|
2046
|
+
}), { details: G, ...C } = R;
|
2047
|
+
d.trackItemsMap[R.id] = {
|
2048
|
+
...C,
|
2035
2049
|
type: "template"
|
2036
|
-
},
|
2050
|
+
}, d.trackItemIds.push(C.id), d.trackItemDetailsMap[C.id] = {
|
2037
2051
|
type: "template",
|
2038
|
-
details:
|
2039
|
-
}, p = [
|
2052
|
+
details: G
|
2053
|
+
}, p = [C.id];
|
2040
2054
|
}
|
2041
|
-
if (
|
2042
|
-
|
2043
|
-
const
|
2044
|
-
size:
|
2045
|
-
}), { details:
|
2046
|
-
|
2047
|
-
type:
|
2048
|
-
details:
|
2049
|
-
},
|
2055
|
+
if (f.key === Di) {
|
2056
|
+
b = "image";
|
2057
|
+
const R = await hn((w = f.value) == null ? void 0 : w.payload, {
|
2058
|
+
size: d.size
|
2059
|
+
}), { details: G, ...C } = R;
|
2060
|
+
d.trackItemDetailsMap[C.id] = {
|
2061
|
+
type: b,
|
2062
|
+
details: G
|
2063
|
+
}, d.trackItemsMap[C.id] = C, d.trackItemIds.push(C.id), p = [C.id];
|
2050
2064
|
}
|
2051
|
-
if (
|
2052
|
-
|
2053
|
-
const
|
2054
|
-
|
2055
|
-
type:
|
2056
|
-
details:
|
2057
|
-
},
|
2065
|
+
if (f.key === Pi) {
|
2066
|
+
b = "audio";
|
2067
|
+
const R = await pn((M = f.value) == null ? void 0 : M.payload), { details: G, ...C } = R;
|
2068
|
+
d.trackItemDetailsMap[C.id] = {
|
2069
|
+
type: b,
|
2070
|
+
details: G
|
2071
|
+
}, d.trackItemsMap[C.id] = C, d.trackItemIds.push(C.id), p = [C.id];
|
2058
2072
|
}
|
2059
|
-
if (
|
2060
|
-
|
2061
|
-
const
|
2062
|
-
size:
|
2063
|
-
}), { details:
|
2064
|
-
|
2065
|
-
type:
|
2066
|
-
details:
|
2067
|
-
},
|
2073
|
+
if (f.key === Ci) {
|
2074
|
+
b = "video";
|
2075
|
+
const R = await dn((j = f.value) == null ? void 0 : j.payload, {
|
2076
|
+
size: d.size
|
2077
|
+
}), { details: G, ...C } = R;
|
2078
|
+
d.trackItemDetailsMap[C.id] = {
|
2079
|
+
type: b,
|
2080
|
+
details: G
|
2081
|
+
}, d.trackItemsMap[C.id] = C, d.trackItemIds.push(C.id), p = [C.id];
|
2068
2082
|
}
|
2069
|
-
const
|
2083
|
+
const m = ia(
|
2070
2084
|
p,
|
2071
|
-
|
2072
|
-
|
2085
|
+
d.tracks,
|
2086
|
+
d.trackItemsMap,
|
2073
2087
|
v,
|
2074
2088
|
_
|
2075
2089
|
);
|
2076
|
-
|
2077
|
-
|
2078
|
-
|
2079
|
-
|
2080
|
-
items
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2090
|
+
if (m.trackId) {
|
2091
|
+
const R = d.tracks.find(
|
2092
|
+
(G) => G.id === m.trackId
|
2093
|
+
);
|
2094
|
+
R && R.items.push(...p);
|
2095
|
+
} else if (m.trackIndex !== void 0) {
|
2096
|
+
const R = {
|
2097
|
+
id: _e(),
|
2098
|
+
accepts: [
|
2099
|
+
"text",
|
2100
|
+
"audio",
|
2101
|
+
"helper",
|
2102
|
+
"video",
|
2103
|
+
"image",
|
2104
|
+
"caption",
|
2105
|
+
"template"
|
2106
|
+
],
|
2107
|
+
type: b,
|
2108
|
+
items: p,
|
2109
|
+
magnetic: !1,
|
2110
|
+
static: !1
|
2111
|
+
};
|
2112
|
+
d.tracks.splice(m.trackIndex, 0, R);
|
2113
|
+
} else
|
2114
|
+
d.tracks.unshift({
|
2115
|
+
id: _e(),
|
2116
|
+
accepts: [
|
2117
|
+
"text",
|
2118
|
+
"audio",
|
2119
|
+
"helper",
|
2120
|
+
"video",
|
2121
|
+
"image",
|
2122
|
+
"caption",
|
2123
|
+
"template"
|
2124
|
+
],
|
2125
|
+
type: b,
|
2126
|
+
items: p,
|
2127
|
+
magnetic: !1,
|
2128
|
+
static: !1
|
2129
|
+
});
|
2130
|
+
d.duration = Zt(d.trackItemsMap), t.updateState(
|
2084
2131
|
{
|
2085
|
-
trackItemIds:
|
2086
|
-
trackItemDetailsMap:
|
2087
|
-
trackItemsMap:
|
2088
|
-
tracks:
|
2089
|
-
duration:
|
2132
|
+
trackItemIds: d.trackItemIds,
|
2133
|
+
trackItemDetailsMap: d.trackItemDetailsMap,
|
2134
|
+
trackItemsMap: d.trackItemsMap,
|
2135
|
+
tracks: d.tracks,
|
2136
|
+
duration: d.duration
|
2090
2137
|
},
|
2091
2138
|
{
|
2092
2139
|
updateHistory: !0,
|
2093
2140
|
kind: "add"
|
2094
2141
|
}
|
2095
2142
|
);
|
2096
|
-
}), N = c.subscribe(async (
|
2097
|
-
var
|
2098
|
-
if (
|
2099
|
-
const p =
|
2143
|
+
}), N = c.subscribe(async (f) => {
|
2144
|
+
var d;
|
2145
|
+
if (f.key === Ri) {
|
2146
|
+
const p = K(t.getState()), b = (d = f.value) == null ? void 0 : d.options.time;
|
2100
2147
|
if (p.activeIds.length === 1) {
|
2101
2148
|
const v = p.activeIds[0], _ = p.trackItemsMap[v];
|
2102
|
-
if (
|
2149
|
+
if (b >= _.display.to || b <= _.display.from)
|
2103
2150
|
return;
|
2104
|
-
const
|
2151
|
+
const m = p.trackItemDetailsMap[v], l = en(), O = {
|
2105
2152
|
..._,
|
2106
2153
|
id: l,
|
2107
2154
|
display: {
|
2108
|
-
from:
|
2155
|
+
from: b,
|
2109
2156
|
to: _.display.to
|
2110
2157
|
},
|
2111
2158
|
trim: {
|
2112
|
-
from:
|
2159
|
+
from: b,
|
2113
2160
|
to: _.display.to
|
2114
2161
|
}
|
2115
2162
|
};
|
2116
|
-
p.trackItemsMap[v].display.to =
|
2117
|
-
|
2163
|
+
p.trackItemsMap[v].display.to = b, p.trackItemsMap[l] = O, p.trackItemIds.push(l), p.trackItemDetailsMap[l] = m, p.tracks.forEach((E) => {
|
2164
|
+
E.items.includes(v) && E.items.push(l);
|
2118
2165
|
}), t.updateState(
|
2119
2166
|
{
|
2120
2167
|
trackItemDetailsMap: p.trackItemDetailsMap,
|
@@ -2130,54 +2177,54 @@ function ia(t) {
|
|
2130
2177
|
}
|
2131
2178
|
return;
|
2132
2179
|
}
|
2133
|
-
if (
|
2134
|
-
const p =
|
2180
|
+
if (f.key === Fi) {
|
2181
|
+
const p = K(t.getState());
|
2135
2182
|
if (p.activeIds.length) {
|
2136
|
-
const
|
2137
|
-
activeIds:
|
2183
|
+
const b = p.activeIds, v = [], _ = {
|
2184
|
+
activeIds: b,
|
2138
2185
|
trackItemDetailsMap: {},
|
2139
2186
|
trackItemsMap: {},
|
2140
2187
|
tracks: []
|
2141
2188
|
};
|
2142
|
-
|
2189
|
+
b.forEach((l) => {
|
2143
2190
|
_.trackItemDetailsMap[l] = p.trackItemDetailsMap[l], _.trackItemsMap[l] = p.trackItemsMap[l], v.push(
|
2144
|
-
p.tracks.find((
|
2191
|
+
p.tracks.find((O) => O.items.includes(l))
|
2145
2192
|
);
|
2146
2193
|
});
|
2147
|
-
const
|
2148
|
-
v.filter((l) =>
|
2194
|
+
const m = /* @__PURE__ */ new Set();
|
2195
|
+
v.filter((l) => m.has(l.id) ? !1 : (m.add(l), !0)), _.tracks = Array.from(m.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
|
2149
2196
|
}
|
2150
2197
|
}
|
2151
|
-
if (
|
2198
|
+
if (f.key === ji) {
|
2152
2199
|
const p = localStorage.getItem("DesignComboTemp");
|
2153
2200
|
if (!p) return;
|
2154
|
-
const
|
2155
|
-
const
|
2156
|
-
(
|
2201
|
+
const b = K(t.getState()), v = JSON.parse(p), _ = {}, m = v.trackItemsMap, l = v.trackItemDetailsMap, O = v.tracks, E = [], I = v.activeIds.map(async (D) => {
|
2202
|
+
const S = l[D];
|
2203
|
+
(S.type === "caption" || S.type === "text") && S.details.fontUrl && await kn([
|
2157
2204
|
{
|
2158
|
-
fontFamily:
|
2159
|
-
url:
|
2205
|
+
fontFamily: S.details.fontFamily,
|
2206
|
+
url: S.details.fontUrl
|
2160
2207
|
}
|
2161
2208
|
]);
|
2162
|
-
const
|
2163
|
-
return _[
|
2164
|
-
...
|
2165
|
-
id:
|
2166
|
-
},
|
2209
|
+
const x = en();
|
2210
|
+
return _[D] = x, b.trackItemsMap[x] = {
|
2211
|
+
...m[D],
|
2212
|
+
id: x
|
2213
|
+
}, b.trackItemDetailsMap[x] = S, b.trackItemIds.push(x), !0;
|
2167
2214
|
});
|
2168
|
-
await Promise.all(I),
|
2169
|
-
const
|
2170
|
-
...
|
2171
|
-
items:
|
2172
|
-
id:
|
2215
|
+
await Promise.all(I), O.forEach((D) => {
|
2216
|
+
const S = D.items.map((w) => _[w]), x = {
|
2217
|
+
...D,
|
2218
|
+
items: S,
|
2219
|
+
id: _e()
|
2173
2220
|
};
|
2174
|
-
|
2175
|
-
}),
|
2221
|
+
E.push(x);
|
2222
|
+
}), b.tracks = [...b.tracks, ...E], t.updateState(
|
2176
2223
|
{
|
2177
|
-
trackItemDetailsMap:
|
2178
|
-
tracks:
|
2179
|
-
trackItemIds:
|
2180
|
-
trackItemsMap:
|
2224
|
+
trackItemDetailsMap: b.trackItemDetailsMap,
|
2225
|
+
tracks: b.tracks,
|
2226
|
+
trackItemIds: b.trackItemIds,
|
2227
|
+
trackItemsMap: b.trackItemsMap
|
2181
2228
|
},
|
2182
2229
|
{
|
2183
2230
|
updateHistory: !0,
|
@@ -2185,17 +2232,17 @@ function ia(t) {
|
|
2185
2232
|
}
|
2186
2233
|
);
|
2187
2234
|
}
|
2188
|
-
}),
|
2189
|
-
var
|
2190
|
-
if (
|
2191
|
-
const _ =
|
2192
|
-
_.trackItemIds.forEach((
|
2193
|
-
const I = l[
|
2194
|
-
if (I.type === "template" && I.details.map((
|
2195
|
-
const
|
2196
|
-
(
|
2235
|
+
}), g = h.subscribe(async (f) => {
|
2236
|
+
var d, p, b, v;
|
2237
|
+
if (f.key === zi) {
|
2238
|
+
const _ = K(t.getState()), [m] = (d = f.value) == null ? void 0 : d.payload.trackItemIds, l = _.trackItemDetailsMap;
|
2239
|
+
_.trackItemIds.forEach((E) => {
|
2240
|
+
const I = l[E];
|
2241
|
+
if (I.type === "template" && I.details.map((S) => S.id).includes(m)) {
|
2242
|
+
const S = I.details.filter(
|
2243
|
+
(x) => x.id !== m
|
2197
2244
|
);
|
2198
|
-
I.details =
|
2245
|
+
I.details = S;
|
2199
2246
|
}
|
2200
2247
|
}), t.updateState(
|
2201
2248
|
{
|
@@ -2207,24 +2254,24 @@ function ia(t) {
|
|
2207
2254
|
}
|
2208
2255
|
);
|
2209
2256
|
}
|
2210
|
-
if (
|
2211
|
-
const _ =
|
2212
|
-
if (!
|
2213
|
-
const
|
2214
|
-
|
2215
|
-
const
|
2216
|
-
|
2217
|
-
...
|
2218
|
-
...
|
2219
|
-
} :
|
2220
|
-
...l[
|
2221
|
-
...
|
2257
|
+
if (f.key === Hi) {
|
2258
|
+
const _ = K(t.getState()), m = _.trackItemDetailsMap, l = _.trackItemsMap, O = Object.keys((p = f.value) == null ? void 0 : p.payload);
|
2259
|
+
if (!O.length) return;
|
2260
|
+
const E = (b = f.value) == null ? void 0 : b.payload;
|
2261
|
+
O.forEach((D) => {
|
2262
|
+
const S = E[D];
|
2263
|
+
S.details ? m[D].details = {
|
2264
|
+
...m[D].details,
|
2265
|
+
...S.details
|
2266
|
+
} : E[D].playbackRate ? l[D].playbackRate = E[D].playbackRate : m[D].type === "template" && (l[D] = {
|
2267
|
+
...l[D],
|
2268
|
+
...E[D]
|
2222
2269
|
});
|
2223
2270
|
});
|
2224
|
-
const I =
|
2271
|
+
const I = Zt(l);
|
2225
2272
|
t.updateState(
|
2226
2273
|
{
|
2227
|
-
trackItemDetailsMap: { ...
|
2274
|
+
trackItemDetailsMap: { ...m },
|
2228
2275
|
trackItemsMap: { ...l },
|
2229
2276
|
duration: I
|
2230
2277
|
},
|
@@ -2234,38 +2281,38 @@ function ia(t) {
|
|
2234
2281
|
}
|
2235
2282
|
);
|
2236
2283
|
}
|
2237
|
-
if (
|
2238
|
-
const _ = (v =
|
2239
|
-
for (const
|
2240
|
-
if (
|
2241
|
-
const I =
|
2242
|
-
if (I.details.map((
|
2243
|
-
for (let
|
2244
|
-
if (
|
2284
|
+
if (f.key === Ni) {
|
2285
|
+
const _ = (v = f.value) == null ? void 0 : v.payload, m = Object.keys(_)[0], l = Object.values(_)[0], O = K(t.getState());
|
2286
|
+
for (const E of O.trackItemIds)
|
2287
|
+
if (O.trackItemsMap[E].type === "template") {
|
2288
|
+
const I = O.trackItemDetailsMap[E];
|
2289
|
+
if (I.details.map((S) => S.id).includes(m)) {
|
2290
|
+
for (let S of I.details)
|
2291
|
+
if (S.id === m) {
|
2245
2292
|
if (l.details) {
|
2246
2293
|
if (l.type === "image" && l.details.src) {
|
2247
|
-
const
|
2248
|
-
let
|
2249
|
-
const
|
2250
|
-
|
2294
|
+
const w = await ei(l.details.src), M = S.details.width, j = S.details.height;
|
2295
|
+
let R = w.width, G = w.height;
|
2296
|
+
const C = w.width / w.height;
|
2297
|
+
M / j > C ? (R = M, G = M / C) : (G = j, R = j * C), l.details.mediaWidth = R, l.details.mediaHeight = G;
|
2251
2298
|
}
|
2252
2299
|
if (l.type === "video" && l.details.src) {
|
2253
|
-
const
|
2254
|
-
let
|
2255
|
-
const
|
2256
|
-
|
2300
|
+
const w = await ri(l.details.src), M = S.details.width, j = S.details.height;
|
2301
|
+
let R = w.width, G = w.height;
|
2302
|
+
const C = w.width / w.height;
|
2303
|
+
M / j > C ? (R = M, G = M / C) : (G = j, R = j * C), l.details.mediaWidth = R, l.details.mediaHeight = G;
|
2257
2304
|
}
|
2258
|
-
const
|
2259
|
-
|
2305
|
+
const x = S.details;
|
2306
|
+
S.details = { ...x, ...l.details }, l.details = S.details;
|
2260
2307
|
}
|
2261
|
-
|
2308
|
+
S = { ...S, ...l }, O.trackItemDetailsMap[E].details = I.details.map((x) => x.id === m ? S : x);
|
2262
2309
|
}
|
2263
2310
|
}
|
2264
2311
|
}
|
2265
2312
|
t.updateState(
|
2266
2313
|
{
|
2267
2314
|
trackItemDetailsMap: {
|
2268
|
-
...
|
2315
|
+
...O.trackItemDetailsMap
|
2269
2316
|
}
|
2270
2317
|
},
|
2271
2318
|
{
|
@@ -2274,14 +2321,14 @@ function ia(t) {
|
|
2274
2321
|
}
|
2275
2322
|
);
|
2276
2323
|
}
|
2277
|
-
if (
|
2278
|
-
const _ =
|
2279
|
-
_.trackItemIds.forEach((
|
2280
|
-
const l = _.trackItemsMap[
|
2324
|
+
if (f.key === Li) {
|
2325
|
+
const _ = K(t.getState());
|
2326
|
+
_.trackItemIds.forEach((m) => {
|
2327
|
+
const l = _.trackItemsMap[m];
|
2281
2328
|
l.type === "template" && (l.activeEdit = !1, t.updateState({
|
2282
2329
|
trackItemsMap: {
|
2283
2330
|
..._.trackItemsMap,
|
2284
|
-
[
|
2331
|
+
[m]: l
|
2285
2332
|
},
|
2286
2333
|
activeIds: []
|
2287
2334
|
}));
|
@@ -2290,17 +2337,17 @@ function ia(t) {
|
|
2290
2337
|
});
|
2291
2338
|
return {
|
2292
2339
|
unsubscribe: () => {
|
2293
|
-
|
2340
|
+
T.unsubscribe(), N.unsubscribe(), g.unsubscribe(), A.unsubscribe(), F.unsubscribe(), y.unsubscribe();
|
2294
2341
|
}
|
2295
2342
|
};
|
2296
2343
|
}
|
2297
|
-
const
|
2298
|
-
function
|
2299
|
-
var
|
2344
|
+
const sa = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
2345
|
+
function si(t, r, n = { cyclesFix: !0 }, i = []) {
|
2346
|
+
var y, A;
|
2300
2347
|
let s = [];
|
2301
2348
|
const c = Array.isArray(t);
|
2302
2349
|
for (const F in t) {
|
2303
|
-
const
|
2350
|
+
const T = t[F], N = c ? +F : F;
|
2304
2351
|
if (!(F in r)) {
|
2305
2352
|
s.push({
|
2306
2353
|
type: "REMOVE",
|
@@ -2309,16 +2356,16 @@ function ai(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2309
2356
|
});
|
2310
2357
|
continue;
|
2311
2358
|
}
|
2312
|
-
const
|
2313
|
-
if (
|
2314
|
-
const
|
2315
|
-
s.push.apply(s,
|
2316
|
-
} else
|
2317
|
-
!(Number.isNaN(
|
2359
|
+
const g = r[F], f = typeof T == "object" && typeof g == "object" && Array.isArray(T) === Array.isArray(g);
|
2360
|
+
if (T && g && f && !sa[(A = (y = Object.getPrototypeOf(T)) == null ? void 0 : y.constructor) == null ? void 0 : A.name] && (!n.cyclesFix || !i.includes(T))) {
|
2361
|
+
const d = si(T, g, n, n.cyclesFix ? i.concat([T]) : []);
|
2362
|
+
s.push.apply(s, d.map((p) => (p.path.unshift(N), p)));
|
2363
|
+
} else T !== g && // treat NaN values as equivalent
|
2364
|
+
!(Number.isNaN(T) && Number.isNaN(g)) && !(f && (isNaN(T) ? T + "" == g + "" : +T == +g)) && s.push({
|
2318
2365
|
path: [N],
|
2319
2366
|
type: "CHANGE",
|
2320
|
-
value:
|
2321
|
-
oldValue:
|
2367
|
+
value: g,
|
2368
|
+
oldValue: T
|
2322
2369
|
});
|
2323
2370
|
}
|
2324
2371
|
const h = Array.isArray(r);
|
@@ -2330,7 +2377,7 @@ function ai(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2330
2377
|
});
|
2331
2378
|
return s;
|
2332
2379
|
}
|
2333
|
-
var Tn = Symbol.for("immer-nothing"),
|
2380
|
+
var Tn = Symbol.for("immer-nothing"), Ie = Symbol.for("immer-draftable"), nt = Symbol.for("immer-state"), oi = process.env.NODE_ENV !== "production" ? [
|
2334
2381
|
// All error codes, starting by 0:
|
2335
2382
|
function(t) {
|
2336
2383
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
@@ -2361,89 +2408,89 @@ var Tn = Symbol.for("immer-nothing"), ge = Symbol.for("immer-draftable"), nt = S
|
|
2361
2408
|
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
|
2362
2409
|
// See Patches.ts for additional errors
|
2363
2410
|
] : [];
|
2364
|
-
function
|
2411
|
+
function Y(t, ...r) {
|
2365
2412
|
if (process.env.NODE_ENV !== "production") {
|
2366
|
-
const n =
|
2413
|
+
const n = oi[t], i = typeof n == "function" ? n.apply(null, r) : n;
|
2367
2414
|
throw new Error(`[Immer] ${i}`);
|
2368
2415
|
}
|
2369
2416
|
throw new Error(
|
2370
2417
|
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
2371
2418
|
);
|
2372
2419
|
}
|
2373
|
-
var
|
2374
|
-
function
|
2420
|
+
var Rt = Object.getPrototypeOf;
|
2421
|
+
function Ft(t) {
|
2375
2422
|
return !!t && !!t[nt];
|
2376
2423
|
}
|
2377
|
-
function
|
2424
|
+
function kt(t) {
|
2378
2425
|
var r;
|
2379
|
-
return t ?
|
2426
|
+
return t ? ci(t) || Array.isArray(t) || !!t[Ie] || !!((r = t.constructor) != null && r[Ie]) || Me(t) || Ae(t) : !1;
|
2380
2427
|
}
|
2381
|
-
var
|
2382
|
-
function
|
2428
|
+
var oa = Object.prototype.constructor.toString();
|
2429
|
+
function ci(t) {
|
2383
2430
|
if (!t || typeof t != "object")
|
2384
2431
|
return !1;
|
2385
|
-
const r =
|
2432
|
+
const r = Rt(t);
|
2386
2433
|
if (r === null)
|
2387
2434
|
return !0;
|
2388
2435
|
const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
2389
|
-
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) ===
|
2436
|
+
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === oa;
|
2390
2437
|
}
|
2391
|
-
function
|
2392
|
-
|
2438
|
+
function ve(t, r) {
|
2439
|
+
jt(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
2393
2440
|
r(n, t[n], t);
|
2394
2441
|
}) : t.forEach((n, i) => r(i, n, t));
|
2395
2442
|
}
|
2396
|
-
function
|
2443
|
+
function jt(t) {
|
2397
2444
|
const r = t[nt];
|
2398
|
-
return r ? r.type_ : Array.isArray(t) ? 1 :
|
2445
|
+
return r ? r.type_ : Array.isArray(t) ? 1 : Me(t) ? 2 : Ae(t) ? 3 : 0;
|
2399
2446
|
}
|
2400
|
-
function
|
2401
|
-
return
|
2447
|
+
function Se(t, r) {
|
2448
|
+
return jt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
2402
2449
|
}
|
2403
2450
|
function rn(t, r) {
|
2404
|
-
return
|
2451
|
+
return jt(t) === 2 ? t.get(r) : t[r];
|
2405
2452
|
}
|
2406
|
-
function
|
2407
|
-
const i =
|
2453
|
+
function ui(t, r, n) {
|
2454
|
+
const i = jt(t);
|
2408
2455
|
i === 2 ? t.set(r, n) : i === 3 ? t.add(n) : t[r] = n;
|
2409
2456
|
}
|
2410
|
-
function
|
2457
|
+
function ca(t, r) {
|
2411
2458
|
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
2412
2459
|
}
|
2413
|
-
function
|
2460
|
+
function Me(t) {
|
2414
2461
|
return t instanceof Map;
|
2415
2462
|
}
|
2416
|
-
function
|
2463
|
+
function Ae(t) {
|
2417
2464
|
return t instanceof Set;
|
2418
2465
|
}
|
2419
|
-
function
|
2466
|
+
function Ct(t) {
|
2420
2467
|
return t.copy_ || t.base_;
|
2421
2468
|
}
|
2422
2469
|
function bn(t, r) {
|
2423
|
-
if (
|
2470
|
+
if (Me(t))
|
2424
2471
|
return new Map(t);
|
2425
|
-
if (
|
2472
|
+
if (Ae(t))
|
2426
2473
|
return new Set(t);
|
2427
2474
|
if (Array.isArray(t))
|
2428
2475
|
return Array.prototype.slice.call(t);
|
2429
|
-
const n =
|
2476
|
+
const n = ci(t);
|
2430
2477
|
if (r === !0 || r === "class_only" && !n) {
|
2431
2478
|
const i = Object.getOwnPropertyDescriptors(t);
|
2432
2479
|
delete i[nt];
|
2433
2480
|
let s = Reflect.ownKeys(i);
|
2434
2481
|
for (let c = 0; c < s.length; c++) {
|
2435
|
-
const h = s[c],
|
2436
|
-
|
2482
|
+
const h = s[c], y = i[h];
|
2483
|
+
y.writable === !1 && (y.writable = !0, y.configurable = !0), (y.get || y.set) && (i[h] = {
|
2437
2484
|
configurable: !0,
|
2438
2485
|
writable: !0,
|
2439
2486
|
// could live with !!desc.set as well here...
|
2440
|
-
enumerable:
|
2487
|
+
enumerable: y.enumerable,
|
2441
2488
|
value: t[h]
|
2442
2489
|
});
|
2443
2490
|
}
|
2444
|
-
return Object.create(
|
2491
|
+
return Object.create(Rt(t), i);
|
2445
2492
|
} else {
|
2446
|
-
const i =
|
2493
|
+
const i = Rt(t);
|
2447
2494
|
if (i !== null && n)
|
2448
2495
|
return { ...t };
|
2449
2496
|
const s = Object.create(i);
|
@@ -2451,27 +2498,27 @@ function bn(t, r) {
|
|
2451
2498
|
}
|
2452
2499
|
}
|
2453
2500
|
function En(t, r = !1) {
|
2454
|
-
return
|
2501
|
+
return ur(t) || Ft(t) || !kt(t) || (jt(t) > 1 && (t.set = t.add = t.clear = t.delete = ua), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => En(i, !0))), t;
|
2455
2502
|
}
|
2456
|
-
function
|
2457
|
-
|
2503
|
+
function ua() {
|
2504
|
+
Y(2);
|
2458
2505
|
}
|
2459
|
-
function
|
2506
|
+
function ur(t) {
|
2460
2507
|
return Object.isFrozen(t);
|
2461
2508
|
}
|
2462
2509
|
var gn = {};
|
2463
|
-
function
|
2510
|
+
function zt(t) {
|
2464
2511
|
const r = gn[t];
|
2465
|
-
return r ||
|
2512
|
+
return r || Y(0, t), r;
|
2466
2513
|
}
|
2467
|
-
function
|
2514
|
+
function la(t, r) {
|
2468
2515
|
gn[t] || (gn[t] = r);
|
2469
2516
|
}
|
2470
|
-
var
|
2471
|
-
function
|
2472
|
-
return
|
2517
|
+
var we;
|
2518
|
+
function li() {
|
2519
|
+
return we;
|
2473
2520
|
}
|
2474
|
-
function
|
2521
|
+
function fa(t, r) {
|
2475
2522
|
return {
|
2476
2523
|
drafts_: [],
|
2477
2524
|
parent_: t,
|
@@ -2482,53 +2529,53 @@ function la(t, r) {
|
|
2482
2529
|
unfinalizedDrafts_: 0
|
2483
2530
|
};
|
2484
2531
|
}
|
2485
|
-
function
|
2486
|
-
r && (
|
2532
|
+
function Hn(t, r) {
|
2533
|
+
r && (zt("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
2487
2534
|
}
|
2488
2535
|
function _n(t) {
|
2489
|
-
In(t), t.drafts_.forEach(
|
2536
|
+
In(t), t.drafts_.forEach(da), t.drafts_ = null;
|
2490
2537
|
}
|
2491
2538
|
function In(t) {
|
2492
|
-
t ===
|
2539
|
+
t === we && (we = t.parent_);
|
2493
2540
|
}
|
2494
|
-
function
|
2495
|
-
return
|
2541
|
+
function Nn(t) {
|
2542
|
+
return we = fa(we, t);
|
2496
2543
|
}
|
2497
|
-
function
|
2544
|
+
function da(t) {
|
2498
2545
|
const r = t[nt];
|
2499
2546
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
2500
2547
|
}
|
2501
|
-
function
|
2548
|
+
function Ln(t, r) {
|
2502
2549
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
2503
2550
|
const n = r.drafts_[0];
|
2504
|
-
return t !== void 0 && t !== n ? (n[nt].modified_ && (_n(r),
|
2551
|
+
return t !== void 0 && t !== n ? (n[nt].modified_ && (_n(r), Y(4)), kt(t) && (t = ir(r, t), r.parent_ || ar(r, t)), r.patches_ && zt("Patches").generateReplacementPatches_(
|
2505
2552
|
n[nt].base_,
|
2506
2553
|
t,
|
2507
2554
|
r.patches_,
|
2508
2555
|
r.inversePatches_
|
2509
|
-
)) : t =
|
2556
|
+
)) : t = ir(r, n, []), _n(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== Tn ? t : void 0;
|
2510
2557
|
}
|
2511
|
-
function
|
2512
|
-
if (
|
2558
|
+
function ir(t, r, n) {
|
2559
|
+
if (ur(r))
|
2513
2560
|
return r;
|
2514
2561
|
const i = r[nt];
|
2515
2562
|
if (!i)
|
2516
|
-
return
|
2563
|
+
return ve(
|
2517
2564
|
r,
|
2518
|
-
(s, c) =>
|
2565
|
+
(s, c) => Un(t, i, r, s, c, n)
|
2519
2566
|
), r;
|
2520
2567
|
if (i.scope_ !== t)
|
2521
2568
|
return r;
|
2522
2569
|
if (!i.modified_)
|
2523
|
-
return
|
2570
|
+
return ar(t, i.base_, !0), i.base_;
|
2524
2571
|
if (!i.finalized_) {
|
2525
2572
|
i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
|
2526
2573
|
const s = i.copy_;
|
2527
2574
|
let c = s, h = !1;
|
2528
|
-
i.type_ === 3 && (c = new Set(s), s.clear(), h = !0),
|
2575
|
+
i.type_ === 3 && (c = new Set(s), s.clear(), h = !0), ve(
|
2529
2576
|
c,
|
2530
|
-
(
|
2531
|
-
),
|
2577
|
+
(y, A) => Un(t, i, s, y, A, n, h)
|
2578
|
+
), ar(t, s, !1), n && t.patches_ && zt("Patches").generatePatches_(
|
2532
2579
|
i,
|
2533
2580
|
n,
|
2534
2581
|
t.patches_,
|
@@ -2537,29 +2584,29 @@ function nr(t, r, n) {
|
|
2537
2584
|
}
|
2538
2585
|
return i.copy_;
|
2539
2586
|
}
|
2540
|
-
function
|
2541
|
-
if (process.env.NODE_ENV !== "production" && s === n &&
|
2542
|
-
const
|
2543
|
-
!
|
2544
|
-
if (
|
2587
|
+
function Un(t, r, n, i, s, c, h) {
|
2588
|
+
if (process.env.NODE_ENV !== "production" && s === n && Y(5), Ft(s)) {
|
2589
|
+
const y = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2590
|
+
!Se(r.assigned_, i) ? c.concat(i) : void 0, A = ir(t, s, y);
|
2591
|
+
if (ui(n, i, A), Ft(A))
|
2545
2592
|
t.canAutoFreeze_ = !1;
|
2546
2593
|
else
|
2547
2594
|
return;
|
2548
2595
|
} else h && n.add(s);
|
2549
|
-
if (
|
2596
|
+
if (kt(s) && !ur(s)) {
|
2550
2597
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
2551
2598
|
return;
|
2552
|
-
|
2599
|
+
ir(t, s), (!r || !r.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(n, i) && ar(t, s);
|
2553
2600
|
}
|
2554
2601
|
}
|
2555
|
-
function
|
2602
|
+
function ar(t, r, n = !1) {
|
2556
2603
|
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && En(r, n);
|
2557
2604
|
}
|
2558
|
-
function
|
2605
|
+
function pa(t, r) {
|
2559
2606
|
const n = Array.isArray(t), i = {
|
2560
2607
|
type_: n ? 1 : 0,
|
2561
2608
|
// Track which produce call this is associated with.
|
2562
|
-
scope_: r ? r.scope_ :
|
2609
|
+
scope_: r ? r.scope_ : li(),
|
2563
2610
|
// True for both shallow and deep changes.
|
2564
2611
|
modified_: !1,
|
2565
2612
|
// Used during finalization.
|
@@ -2580,35 +2627,35 @@ function da(t, r) {
|
|
2580
2627
|
isManual_: !1
|
2581
2628
|
};
|
2582
2629
|
let s = i, c = Mn;
|
2583
|
-
n && (s = [i], c =
|
2584
|
-
const { revoke: h, proxy:
|
2585
|
-
return i.draft_ =
|
2630
|
+
n && (s = [i], c = ke);
|
2631
|
+
const { revoke: h, proxy: y } = Proxy.revocable(s, c);
|
2632
|
+
return i.draft_ = y, i.revoke_ = h, y;
|
2586
2633
|
}
|
2587
2634
|
var Mn = {
|
2588
2635
|
get(t, r) {
|
2589
2636
|
if (r === nt)
|
2590
2637
|
return t;
|
2591
|
-
const n =
|
2592
|
-
if (!
|
2593
|
-
return
|
2638
|
+
const n = Ct(t);
|
2639
|
+
if (!Se(n, r))
|
2640
|
+
return ha(t, n, r);
|
2594
2641
|
const i = n[r];
|
2595
|
-
return t.finalized_ || !
|
2642
|
+
return t.finalized_ || !kt(i) ? i : i === nn(t.base_, r) ? (an(t), t.copy_[r] = Sn(i, t)) : i;
|
2596
2643
|
},
|
2597
2644
|
has(t, r) {
|
2598
|
-
return r in
|
2645
|
+
return r in Ct(t);
|
2599
2646
|
},
|
2600
2647
|
ownKeys(t) {
|
2601
|
-
return Reflect.ownKeys(
|
2648
|
+
return Reflect.ownKeys(Ct(t));
|
2602
2649
|
},
|
2603
2650
|
set(t, r, n) {
|
2604
|
-
const i =
|
2651
|
+
const i = fi(Ct(t), r);
|
2605
2652
|
if (i != null && i.set)
|
2606
2653
|
return i.set.call(t.draft_, n), !0;
|
2607
2654
|
if (!t.modified_) {
|
2608
|
-
const s = nn(
|
2655
|
+
const s = nn(Ct(t), r), c = s == null ? void 0 : s[nt];
|
2609
2656
|
if (c && c.base_ === n)
|
2610
2657
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2611
|
-
if (
|
2658
|
+
if (ca(n, s) && (n !== void 0 || Se(t.base_, r)))
|
2612
2659
|
return !0;
|
2613
2660
|
an(t), vn(t);
|
2614
2661
|
}
|
@@ -2622,7 +2669,7 @@ var Mn = {
|
|
2622
2669
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
2623
2670
|
// the same guarantee in ES5 mode.
|
2624
2671
|
getOwnPropertyDescriptor(t, r) {
|
2625
|
-
const n =
|
2672
|
+
const n = Ct(t), i = Reflect.getOwnPropertyDescriptor(n, r);
|
2626
2673
|
return i && {
|
2627
2674
|
writable: !0,
|
2628
2675
|
configurable: t.type_ !== 1 || r !== "length",
|
@@ -2631,48 +2678,48 @@ var Mn = {
|
|
2631
2678
|
};
|
2632
2679
|
},
|
2633
2680
|
defineProperty() {
|
2634
|
-
|
2681
|
+
Y(11);
|
2635
2682
|
},
|
2636
2683
|
getPrototypeOf(t) {
|
2637
|
-
return
|
2684
|
+
return Rt(t.base_);
|
2638
2685
|
},
|
2639
2686
|
setPrototypeOf() {
|
2640
|
-
|
2687
|
+
Y(12);
|
2641
2688
|
}
|
2642
|
-
},
|
2643
|
-
|
2644
|
-
|
2689
|
+
}, ke = {};
|
2690
|
+
ve(Mn, (t, r) => {
|
2691
|
+
ke[t] = function() {
|
2645
2692
|
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
2646
2693
|
};
|
2647
2694
|
});
|
2648
|
-
|
2649
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) &&
|
2695
|
+
ke.deleteProperty = function(t, r) {
|
2696
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && Y(13), ke.set.call(this, t, r, void 0);
|
2650
2697
|
};
|
2651
|
-
|
2652
|
-
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) &&
|
2698
|
+
ke.set = function(t, r, n) {
|
2699
|
+
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && Y(14), Mn.set.call(this, t[0], r, n, t[0]);
|
2653
2700
|
};
|
2654
2701
|
function nn(t, r) {
|
2655
2702
|
const n = t[nt];
|
2656
|
-
return (n ?
|
2703
|
+
return (n ? Ct(n) : t)[r];
|
2657
2704
|
}
|
2658
|
-
function
|
2705
|
+
function ha(t, r, n) {
|
2659
2706
|
var s;
|
2660
|
-
const i =
|
2707
|
+
const i = fi(r, n);
|
2661
2708
|
return i ? "value" in i ? i.value : (
|
2662
2709
|
// This is a very special case, if the prop is a getter defined by the
|
2663
2710
|
// prototype, we should invoke it with the draft as context!
|
2664
2711
|
(s = i.get) == null ? void 0 : s.call(t.draft_)
|
2665
2712
|
) : void 0;
|
2666
2713
|
}
|
2667
|
-
function
|
2714
|
+
function fi(t, r) {
|
2668
2715
|
if (!(r in t))
|
2669
2716
|
return;
|
2670
|
-
let n =
|
2717
|
+
let n = Rt(t);
|
2671
2718
|
for (; n; ) {
|
2672
2719
|
const i = Object.getOwnPropertyDescriptor(n, r);
|
2673
2720
|
if (i)
|
2674
2721
|
return i;
|
2675
|
-
n =
|
2722
|
+
n = Rt(n);
|
2676
2723
|
}
|
2677
2724
|
}
|
2678
2725
|
function vn(t) {
|
@@ -2684,55 +2731,55 @@ function an(t) {
|
|
2684
2731
|
t.scope_.immer_.useStrictShallowCopy_
|
2685
2732
|
));
|
2686
2733
|
}
|
2687
|
-
var
|
2734
|
+
var ma = class {
|
2688
2735
|
constructor(t) {
|
2689
2736
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, n, i) => {
|
2690
2737
|
if (typeof r == "function" && typeof n != "function") {
|
2691
2738
|
const c = n;
|
2692
2739
|
n = r;
|
2693
2740
|
const h = this;
|
2694
|
-
return function(
|
2695
|
-
return h.produce(
|
2741
|
+
return function(A = c, ...F) {
|
2742
|
+
return h.produce(A, (T) => n.call(this, T, ...F));
|
2696
2743
|
};
|
2697
2744
|
}
|
2698
|
-
typeof n != "function" &&
|
2745
|
+
typeof n != "function" && Y(6), i !== void 0 && typeof i != "function" && Y(7);
|
2699
2746
|
let s;
|
2700
|
-
if (
|
2701
|
-
const c =
|
2702
|
-
let
|
2747
|
+
if (kt(r)) {
|
2748
|
+
const c = Nn(this), h = Sn(r, void 0);
|
2749
|
+
let y = !0;
|
2703
2750
|
try {
|
2704
|
-
s = n(h),
|
2751
|
+
s = n(h), y = !1;
|
2705
2752
|
} finally {
|
2706
|
-
|
2753
|
+
y ? _n(c) : In(c);
|
2707
2754
|
}
|
2708
|
-
return
|
2755
|
+
return Hn(c, i), Ln(s, c);
|
2709
2756
|
} else if (!r || typeof r != "object") {
|
2710
2757
|
if (s = n(r), s === void 0 && (s = r), s === Tn && (s = void 0), this.autoFreeze_ && En(s, !0), i) {
|
2711
2758
|
const c = [], h = [];
|
2712
|
-
|
2759
|
+
zt("Patches").generateReplacementPatches_(r, s, c, h), i(c, h);
|
2713
2760
|
}
|
2714
2761
|
return s;
|
2715
2762
|
} else
|
2716
|
-
|
2763
|
+
Y(1, r);
|
2717
2764
|
}, this.produceWithPatches = (r, n) => {
|
2718
2765
|
if (typeof r == "function")
|
2719
|
-
return (h, ...
|
2766
|
+
return (h, ...y) => this.produceWithPatches(h, (A) => r(A, ...y));
|
2720
2767
|
let i, s;
|
2721
|
-
return [this.produce(r, n, (h,
|
2722
|
-
i = h, s =
|
2768
|
+
return [this.produce(r, n, (h, y) => {
|
2769
|
+
i = h, s = y;
|
2723
2770
|
}), i, s];
|
2724
2771
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
2725
2772
|
}
|
2726
2773
|
createDraft(t) {
|
2727
|
-
|
2728
|
-
const r =
|
2774
|
+
kt(t) || Y(8), Ft(t) && (t = ya(t));
|
2775
|
+
const r = Nn(this), n = Sn(t, void 0);
|
2729
2776
|
return n[nt].isManual_ = !0, In(r), n;
|
2730
2777
|
}
|
2731
2778
|
finishDraft(t, r) {
|
2732
2779
|
const n = t && t[nt];
|
2733
|
-
(!n || !n.isManual_) &&
|
2780
|
+
(!n || !n.isManual_) && Y(9);
|
2734
2781
|
const { scope_: i } = n;
|
2735
|
-
return
|
2782
|
+
return Hn(i, r), Ln(void 0, i);
|
2736
2783
|
}
|
2737
2784
|
/**
|
2738
2785
|
* Pass true to automatically freeze all copies created by Immer.
|
@@ -2760,22 +2807,22 @@ var ha = class {
|
|
2760
2807
|
}
|
2761
2808
|
}
|
2762
2809
|
n > -1 && (r = r.slice(n + 1));
|
2763
|
-
const i =
|
2764
|
-
return
|
2810
|
+
const i = zt("Patches").applyPatches_;
|
2811
|
+
return Ft(t) ? i(t, r) : this.produce(
|
2765
2812
|
t,
|
2766
2813
|
(s) => i(s, r)
|
2767
2814
|
);
|
2768
2815
|
}
|
2769
2816
|
};
|
2770
2817
|
function Sn(t, r) {
|
2771
|
-
const n =
|
2772
|
-
return (r ? r.scope_ :
|
2818
|
+
const n = Me(t) ? zt("MapSet").proxyMap_(t, r) : Ae(t) ? zt("MapSet").proxySet_(t, r) : pa(t, r);
|
2819
|
+
return (r ? r.scope_ : li()).drafts_.push(n), n;
|
2773
2820
|
}
|
2774
|
-
function
|
2775
|
-
return
|
2821
|
+
function ya(t) {
|
2822
|
+
return Ft(t) || Y(10, t), di(t);
|
2776
2823
|
}
|
2777
|
-
function
|
2778
|
-
if (!
|
2824
|
+
function di(t) {
|
2825
|
+
if (!kt(t) || ur(t))
|
2779
2826
|
return t;
|
2780
2827
|
const r = t[nt];
|
2781
2828
|
let n;
|
@@ -2785,164 +2832,164 @@ function fi(t) {
|
|
2785
2832
|
r.finalized_ = !0, n = bn(t, r.scope_.immer_.useStrictShallowCopy_);
|
2786
2833
|
} else
|
2787
2834
|
n = bn(t, !0);
|
2788
|
-
return
|
2789
|
-
|
2835
|
+
return ve(n, (i, s) => {
|
2836
|
+
ui(n, i, di(s));
|
2790
2837
|
}), r && (r.finalized_ = !1), n;
|
2791
2838
|
}
|
2792
|
-
function
|
2793
|
-
process.env.NODE_ENV !== "production" &&
|
2839
|
+
function Wn() {
|
2840
|
+
process.env.NODE_ENV !== "production" && oi.push(
|
2794
2841
|
'Sets cannot have "replace" patches.',
|
2795
|
-
function(
|
2796
|
-
return "Unsupported patch operation: " +
|
2842
|
+
function(g) {
|
2843
|
+
return "Unsupported patch operation: " + g;
|
2797
2844
|
},
|
2798
|
-
function(
|
2799
|
-
return "Cannot apply patch, path doesn't resolve: " +
|
2845
|
+
function(g) {
|
2846
|
+
return "Cannot apply patch, path doesn't resolve: " + g;
|
2800
2847
|
},
|
2801
2848
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
2802
2849
|
);
|
2803
2850
|
const r = "replace", n = "add", i = "remove";
|
2804
|
-
function s(
|
2805
|
-
switch (
|
2851
|
+
function s(g, f, d, p) {
|
2852
|
+
switch (g.type_) {
|
2806
2853
|
case 0:
|
2807
2854
|
case 2:
|
2808
2855
|
return h(
|
2809
|
-
|
2810
|
-
d,
|
2856
|
+
g,
|
2811
2857
|
f,
|
2858
|
+
d,
|
2812
2859
|
p
|
2813
2860
|
);
|
2814
2861
|
case 1:
|
2815
|
-
return c(
|
2862
|
+
return c(g, f, d, p);
|
2816
2863
|
case 3:
|
2817
|
-
return
|
2818
|
-
|
2819
|
-
d,
|
2864
|
+
return y(
|
2865
|
+
g,
|
2820
2866
|
f,
|
2867
|
+
d,
|
2821
2868
|
p
|
2822
2869
|
);
|
2823
2870
|
}
|
2824
2871
|
}
|
2825
|
-
function c(
|
2826
|
-
let { base_:
|
2827
|
-
_.length <
|
2828
|
-
for (let
|
2829
|
-
if (v[
|
2830
|
-
const l =
|
2831
|
-
|
2872
|
+
function c(g, f, d, p) {
|
2873
|
+
let { base_: b, assigned_: v } = g, _ = g.copy_;
|
2874
|
+
_.length < b.length && ([b, _] = [_, b], [d, p] = [p, d]);
|
2875
|
+
for (let m = 0; m < b.length; m++)
|
2876
|
+
if (v[m] && _[m] !== b[m]) {
|
2877
|
+
const l = f.concat([m]);
|
2878
|
+
d.push({
|
2832
2879
|
op: r,
|
2833
2880
|
path: l,
|
2834
2881
|
// Need to maybe clone it, as it can in fact be the original value
|
2835
2882
|
// due to the base/copy inversion at the start of this function
|
2836
|
-
value: N(_[
|
2883
|
+
value: N(_[m])
|
2837
2884
|
}), p.push({
|
2838
2885
|
op: r,
|
2839
2886
|
path: l,
|
2840
|
-
value: N(
|
2887
|
+
value: N(b[m])
|
2841
2888
|
});
|
2842
2889
|
}
|
2843
|
-
for (let
|
2844
|
-
const l =
|
2845
|
-
|
2890
|
+
for (let m = b.length; m < _.length; m++) {
|
2891
|
+
const l = f.concat([m]);
|
2892
|
+
d.push({
|
2846
2893
|
op: n,
|
2847
2894
|
path: l,
|
2848
2895
|
// Need to maybe clone it, as it can in fact be the original value
|
2849
2896
|
// due to the base/copy inversion at the start of this function
|
2850
|
-
value: N(_[
|
2897
|
+
value: N(_[m])
|
2851
2898
|
});
|
2852
2899
|
}
|
2853
|
-
for (let
|
2854
|
-
const l =
|
2900
|
+
for (let m = _.length - 1; b.length <= m; --m) {
|
2901
|
+
const l = f.concat([m]);
|
2855
2902
|
p.push({
|
2856
2903
|
op: i,
|
2857
2904
|
path: l
|
2858
2905
|
});
|
2859
2906
|
}
|
2860
2907
|
}
|
2861
|
-
function h(
|
2862
|
-
const { base_:
|
2863
|
-
|
2864
|
-
const l = rn(
|
2865
|
-
if (l ===
|
2908
|
+
function h(g, f, d, p) {
|
2909
|
+
const { base_: b, copy_: v } = g;
|
2910
|
+
ve(g.assigned_, (_, m) => {
|
2911
|
+
const l = rn(b, _), O = rn(v, _), E = m ? Se(b, _) ? r : n : i;
|
2912
|
+
if (l === O && E === r)
|
2866
2913
|
return;
|
2867
|
-
const I =
|
2868
|
-
|
2869
|
-
|
2914
|
+
const I = f.concat(_);
|
2915
|
+
d.push(E === i ? { op: E, path: I } : { op: E, path: I, value: O }), p.push(
|
2916
|
+
E === n ? { op: i, path: I } : E === i ? { op: n, path: I, value: N(l) } : { op: r, path: I, value: N(l) }
|
2870
2917
|
);
|
2871
2918
|
});
|
2872
2919
|
}
|
2873
|
-
function
|
2874
|
-
let { base_:
|
2875
|
-
|
2876
|
-
if (!v.has(
|
2877
|
-
const l =
|
2878
|
-
|
2920
|
+
function y(g, f, d, p) {
|
2921
|
+
let { base_: b, copy_: v } = g, _ = 0;
|
2922
|
+
b.forEach((m) => {
|
2923
|
+
if (!v.has(m)) {
|
2924
|
+
const l = f.concat([_]);
|
2925
|
+
d.push({
|
2879
2926
|
op: i,
|
2880
2927
|
path: l,
|
2881
|
-
value:
|
2928
|
+
value: m
|
2882
2929
|
}), p.unshift({
|
2883
2930
|
op: n,
|
2884
2931
|
path: l,
|
2885
|
-
value:
|
2932
|
+
value: m
|
2886
2933
|
});
|
2887
2934
|
}
|
2888
2935
|
_++;
|
2889
|
-
}), _ = 0, v.forEach((
|
2890
|
-
if (!
|
2891
|
-
const l =
|
2892
|
-
|
2936
|
+
}), _ = 0, v.forEach((m) => {
|
2937
|
+
if (!b.has(m)) {
|
2938
|
+
const l = f.concat([_]);
|
2939
|
+
d.push({
|
2893
2940
|
op: n,
|
2894
2941
|
path: l,
|
2895
|
-
value:
|
2942
|
+
value: m
|
2896
2943
|
}), p.unshift({
|
2897
2944
|
op: i,
|
2898
2945
|
path: l,
|
2899
|
-
value:
|
2946
|
+
value: m
|
2900
2947
|
});
|
2901
2948
|
}
|
2902
2949
|
_++;
|
2903
2950
|
});
|
2904
2951
|
}
|
2905
|
-
function
|
2906
|
-
|
2952
|
+
function A(g, f, d, p) {
|
2953
|
+
d.push({
|
2907
2954
|
op: r,
|
2908
2955
|
path: [],
|
2909
|
-
value:
|
2956
|
+
value: f === Tn ? void 0 : f
|
2910
2957
|
}), p.push({
|
2911
2958
|
op: r,
|
2912
2959
|
path: [],
|
2913
|
-
value:
|
2960
|
+
value: g
|
2914
2961
|
});
|
2915
2962
|
}
|
2916
|
-
function F(
|
2917
|
-
return
|
2918
|
-
const { path: p, op:
|
2919
|
-
let v =
|
2920
|
-
for (let
|
2921
|
-
const
|
2922
|
-
let I = p[
|
2923
|
-
typeof I != "string" && typeof I != "number" && (I = "" + I), (
|
2963
|
+
function F(g, f) {
|
2964
|
+
return f.forEach((d) => {
|
2965
|
+
const { path: p, op: b } = d;
|
2966
|
+
let v = g;
|
2967
|
+
for (let O = 0; O < p.length - 1; O++) {
|
2968
|
+
const E = jt(v);
|
2969
|
+
let I = p[O];
|
2970
|
+
typeof I != "string" && typeof I != "number" && (I = "" + I), (E === 0 || E === 1) && (I === "__proto__" || I === "constructor") && Y(19), typeof v == "function" && I === "prototype" && Y(19), v = rn(v, I), typeof v != "object" && Y(18, p.join("/"));
|
2924
2971
|
}
|
2925
|
-
const _ =
|
2926
|
-
switch (
|
2972
|
+
const _ = jt(v), m = T(d.value), l = p[p.length - 1];
|
2973
|
+
switch (b) {
|
2927
2974
|
case r:
|
2928
2975
|
switch (_) {
|
2929
2976
|
case 2:
|
2930
|
-
return v.set(l,
|
2977
|
+
return v.set(l, m);
|
2931
2978
|
case 3:
|
2932
|
-
|
2979
|
+
Y(16);
|
2933
2980
|
default:
|
2934
|
-
return v[l] =
|
2981
|
+
return v[l] = m;
|
2935
2982
|
}
|
2936
2983
|
case n:
|
2937
2984
|
switch (_) {
|
2938
2985
|
case 1:
|
2939
|
-
return l === "-" ? v.push(
|
2986
|
+
return l === "-" ? v.push(m) : v.splice(l, 0, m);
|
2940
2987
|
case 2:
|
2941
|
-
return v.set(l,
|
2988
|
+
return v.set(l, m);
|
2942
2989
|
case 3:
|
2943
|
-
return v.add(
|
2990
|
+
return v.add(m);
|
2944
2991
|
default:
|
2945
|
-
return v[l] =
|
2992
|
+
return v[l] = m;
|
2946
2993
|
}
|
2947
2994
|
case i:
|
2948
2995
|
switch (_) {
|
@@ -2951,51 +2998,51 @@ function Un() {
|
|
2951
2998
|
case 2:
|
2952
2999
|
return v.delete(l);
|
2953
3000
|
case 3:
|
2954
|
-
return v.delete(
|
3001
|
+
return v.delete(d.value);
|
2955
3002
|
default:
|
2956
3003
|
return delete v[l];
|
2957
3004
|
}
|
2958
3005
|
default:
|
2959
|
-
|
3006
|
+
Y(17, b);
|
2960
3007
|
}
|
2961
|
-
}),
|
2962
|
-
}
|
2963
|
-
function
|
2964
|
-
if (!
|
2965
|
-
return
|
2966
|
-
if (Array.isArray(
|
2967
|
-
return
|
2968
|
-
if (
|
3008
|
+
}), g;
|
3009
|
+
}
|
3010
|
+
function T(g) {
|
3011
|
+
if (!kt(g))
|
3012
|
+
return g;
|
3013
|
+
if (Array.isArray(g))
|
3014
|
+
return g.map(T);
|
3015
|
+
if (Me(g))
|
2969
3016
|
return new Map(
|
2970
|
-
Array.from(
|
3017
|
+
Array.from(g.entries()).map(([d, p]) => [d, T(p)])
|
2971
3018
|
);
|
2972
|
-
if (
|
2973
|
-
return new Set(Array.from(
|
2974
|
-
const
|
2975
|
-
for (const
|
2976
|
-
d
|
2977
|
-
return
|
3019
|
+
if (Ae(g))
|
3020
|
+
return new Set(Array.from(g).map(T));
|
3021
|
+
const f = Object.create(Rt(g));
|
3022
|
+
for (const d in g)
|
3023
|
+
f[d] = T(g[d]);
|
3024
|
+
return Se(g, Ie) && (f[Ie] = g[Ie]), f;
|
2978
3025
|
}
|
2979
|
-
function N(
|
2980
|
-
return
|
3026
|
+
function N(g) {
|
3027
|
+
return Ft(g) ? T(g) : g;
|
2981
3028
|
}
|
2982
|
-
|
3029
|
+
la("Patches", {
|
2983
3030
|
applyPatches_: F,
|
2984
3031
|
generatePatches_: s,
|
2985
|
-
generateReplacementPatches_:
|
3032
|
+
generateReplacementPatches_: A
|
2986
3033
|
});
|
2987
3034
|
}
|
2988
|
-
var it = new
|
3035
|
+
var it = new ma(), ba = it.produce;
|
2989
3036
|
it.produceWithPatches.bind(
|
2990
3037
|
it
|
2991
3038
|
);
|
2992
3039
|
it.setAutoFreeze.bind(it);
|
2993
3040
|
it.setUseStrictShallowCopy.bind(it);
|
2994
|
-
var
|
3041
|
+
var ga = it.applyPatches.bind(it);
|
2995
3042
|
it.createDraft.bind(it);
|
2996
3043
|
it.finishDraft.bind(it);
|
2997
|
-
var
|
2998
|
-
function
|
3044
|
+
var _a = 1 / 0, Ia = 9007199254740991, va = "[object Arguments]", Sa = "[object Function]", wa = "[object GeneratorFunction]", ka = "[object Symbol]", Ta = typeof st == "object" && st && st.Object === Object && st, Ea = typeof self == "object" && self && self.Object === Object && self, Ma = Ta || Ea || Function("return this")();
|
3045
|
+
function Aa(t, r, n) {
|
2999
3046
|
switch (n.length) {
|
3000
3047
|
case 0:
|
3001
3048
|
return t.call(r);
|
@@ -3008,91 +3055,91 @@ function Ma(t, r, n) {
|
|
3008
3055
|
}
|
3009
3056
|
return t.apply(r, n);
|
3010
3057
|
}
|
3011
|
-
function
|
3058
|
+
function Oa(t, r) {
|
3012
3059
|
for (var n = -1, i = t ? t.length : 0, s = Array(i); ++n < i; )
|
3013
3060
|
s[n] = r(t[n], n, t);
|
3014
3061
|
return s;
|
3015
3062
|
}
|
3016
|
-
function
|
3063
|
+
function xa(t, r) {
|
3017
3064
|
for (var n = -1, i = r.length, s = t.length; ++n < i; )
|
3018
3065
|
t[s + n] = r[n];
|
3019
3066
|
return t;
|
3020
3067
|
}
|
3021
|
-
var An = Object.prototype,
|
3022
|
-
function
|
3068
|
+
var An = Object.prototype, Da = An.hasOwnProperty, On = An.toString, Gn = Ma.Symbol, Pa = An.propertyIsEnumerable, Bn = Gn ? Gn.isConcatSpreadable : void 0, $n = Math.max;
|
3069
|
+
function Ca(t, r, n, i, s) {
|
3023
3070
|
var c = -1, h = t.length;
|
3024
|
-
for (n || (n =
|
3025
|
-
var
|
3026
|
-
n(
|
3071
|
+
for (n || (n = za), s || (s = []); ++c < h; ) {
|
3072
|
+
var y = t[c];
|
3073
|
+
n(y) ? xa(s, y) : s[s.length] = y;
|
3027
3074
|
}
|
3028
3075
|
return s;
|
3029
3076
|
}
|
3030
|
-
function
|
3031
|
-
return t = Object(t),
|
3077
|
+
function Ra(t, r) {
|
3078
|
+
return t = Object(t), Fa(t, r, function(n, i) {
|
3032
3079
|
return i in t;
|
3033
3080
|
});
|
3034
3081
|
}
|
3035
|
-
function
|
3082
|
+
function Fa(t, r, n) {
|
3036
3083
|
for (var i = -1, s = r.length, c = {}; ++i < s; ) {
|
3037
|
-
var h = r[i],
|
3038
|
-
n(
|
3084
|
+
var h = r[i], y = t[h];
|
3085
|
+
n(y, h) && (c[h] = y);
|
3039
3086
|
}
|
3040
3087
|
return c;
|
3041
3088
|
}
|
3042
|
-
function
|
3043
|
-
return r =
|
3044
|
-
for (var n = arguments, i = -1, s =
|
3089
|
+
function ja(t, r) {
|
3090
|
+
return r = $n(r === void 0 ? t.length - 1 : r, 0), function() {
|
3091
|
+
for (var n = arguments, i = -1, s = $n(n.length - r, 0), c = Array(s); ++i < s; )
|
3045
3092
|
c[i] = n[r + i];
|
3046
3093
|
i = -1;
|
3047
3094
|
for (var h = Array(r + 1); ++i < r; )
|
3048
3095
|
h[i] = n[i];
|
3049
|
-
return h[r] = c,
|
3096
|
+
return h[r] = c, Aa(t, this, h);
|
3050
3097
|
};
|
3051
3098
|
}
|
3052
|
-
function ja(t) {
|
3053
|
-
return Na(t) || Ha(t) || !!(Gn && t && t[Gn]);
|
3054
|
-
}
|
3055
3099
|
function za(t) {
|
3056
|
-
|
3057
|
-
return t;
|
3058
|
-
var r = t + "";
|
3059
|
-
return r == "0" && 1 / t == -ga ? "-0" : r;
|
3100
|
+
return La(t) || Na(t) || !!(Bn && t && t[Bn]);
|
3060
3101
|
}
|
3061
3102
|
function Ha(t) {
|
3062
|
-
|
3103
|
+
if (typeof t == "string" || Ka(t))
|
3104
|
+
return t;
|
3105
|
+
var r = t + "";
|
3106
|
+
return r == "0" && 1 / t == -_a ? "-0" : r;
|
3063
3107
|
}
|
3064
|
-
|
3065
|
-
|
3066
|
-
return t != null && Ga(t.length) && !Wa(t);
|
3108
|
+
function Na(t) {
|
3109
|
+
return Wa(t) && Da.call(t, "callee") && (!Pa.call(t, "callee") || On.call(t) == va);
|
3067
3110
|
}
|
3111
|
+
var La = Array.isArray;
|
3068
3112
|
function Ua(t) {
|
3069
|
-
return
|
3113
|
+
return t != null && Ba(t.length) && !Ga(t);
|
3070
3114
|
}
|
3071
3115
|
function Wa(t) {
|
3072
|
-
|
3073
|
-
return r == va || r == Sa;
|
3116
|
+
return pi(t) && Ua(t);
|
3074
3117
|
}
|
3075
3118
|
function Ga(t) {
|
3076
|
-
|
3119
|
+
var r = $a(t) ? On.call(t) : "";
|
3120
|
+
return r == Sa || r == wa;
|
3077
3121
|
}
|
3078
3122
|
function Ba(t) {
|
3123
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= Ia;
|
3124
|
+
}
|
3125
|
+
function $a(t) {
|
3079
3126
|
var r = typeof t;
|
3080
3127
|
return !!t && (r == "object" || r == "function");
|
3081
3128
|
}
|
3082
|
-
function
|
3129
|
+
function pi(t) {
|
3083
3130
|
return !!t && typeof t == "object";
|
3084
3131
|
}
|
3085
|
-
function
|
3086
|
-
return typeof t == "symbol" ||
|
3132
|
+
function Ka(t) {
|
3133
|
+
return typeof t == "symbol" || pi(t) && On.call(t) == ka;
|
3087
3134
|
}
|
3088
|
-
var
|
3089
|
-
return t == null ? {} :
|
3090
|
-
}),
|
3091
|
-
const
|
3135
|
+
var Ya = ja(function(t, r) {
|
3136
|
+
return t == null ? {} : Ra(t, Oa(Ca(r), Ha));
|
3137
|
+
}), Va = Ya;
|
3138
|
+
const Kn = /* @__PURE__ */ wn(Va), Xa = {
|
3092
3139
|
width: 1080,
|
3093
3140
|
height: 1920
|
3094
|
-
},
|
3095
|
-
size:
|
3141
|
+
}, qa = {
|
3142
|
+
size: Xa,
|
3096
3143
|
tracks: [],
|
3097
3144
|
trackItemIds: [],
|
3098
3145
|
trackItemsMap: {},
|
@@ -3107,7 +3154,7 @@ const $n = /* @__PURE__ */ wn(Ya), Va = {
|
|
3107
3154
|
duration: 0,
|
3108
3155
|
activeIds: [],
|
3109
3156
|
trackItemDetailsMap: {}
|
3110
|
-
},
|
3157
|
+
}, Yn = [
|
3111
3158
|
"tracks",
|
3112
3159
|
"trackItemsMap",
|
3113
3160
|
"trackItemDetailsMap",
|
@@ -3115,22 +3162,22 @@ const $n = /* @__PURE__ */ wn(Ya), Va = {
|
|
3115
3162
|
"transitionsMap",
|
3116
3163
|
"trackItemIds"
|
3117
3164
|
];
|
3118
|
-
class
|
3165
|
+
class Qa {
|
3119
3166
|
constructor(r) {
|
3120
|
-
|
3121
|
-
|
3122
|
-
|
3123
|
-
|
3124
|
-
|
3125
|
-
|
3126
|
-
const n = r ||
|
3167
|
+
Pt(this, "stateSubject");
|
3168
|
+
Pt(this, "stateHistorySubject");
|
3169
|
+
Pt(this, "prevState");
|
3170
|
+
Pt(this, "undos", []);
|
3171
|
+
Pt(this, "redos", []);
|
3172
|
+
Pt(this, "listener");
|
3173
|
+
const n = r || qa;
|
3127
3174
|
this.stateSubject = new jn(n), this.stateHistorySubject = new jn({
|
3128
3175
|
handleRedo: !1,
|
3129
3176
|
handleUndo: !1
|
3130
3177
|
}), this.prevState = n, this.initListeners();
|
3131
3178
|
}
|
3132
3179
|
initListeners() {
|
3133
|
-
|
3180
|
+
aa(this);
|
3134
3181
|
}
|
3135
3182
|
destroyListeners() {
|
3136
3183
|
this.listener && this.listener.unsubscribe();
|
@@ -3139,7 +3186,7 @@ class Za {
|
|
3139
3186
|
this.destroyListeners();
|
3140
3187
|
}
|
3141
3188
|
updateHistory(r, n) {
|
3142
|
-
const i =
|
3189
|
+
const i = Kn(r, Yn), s = Kn(this.getState(), Yn), c = si(s, i);
|
3143
3190
|
c.length && (this.undos.push({ undos: c, type: n }), this.redos = []);
|
3144
3191
|
}
|
3145
3192
|
getStateHistory() {
|
@@ -3231,141 +3278,141 @@ class Za {
|
|
3231
3278
|
undo() {
|
3232
3279
|
const r = this.undos.pop(), n = r == null ? void 0 : r.undos, i = r == null ? void 0 : r.type;
|
3233
3280
|
if (!n || !i) return;
|
3234
|
-
|
3281
|
+
Wn();
|
3235
3282
|
const {
|
3236
3283
|
trackItemDetailsMap: s,
|
3237
3284
|
trackItemIds: c,
|
3238
3285
|
tracks: h,
|
3239
|
-
transitionIds:
|
3240
|
-
transitionsMap:
|
3286
|
+
transitionIds: y,
|
3287
|
+
transitionsMap: A,
|
3241
3288
|
trackItemsMap: F
|
3242
|
-
} = this.getState(),
|
3289
|
+
} = this.getState(), T = K({
|
3243
3290
|
trackItemDetailsMap: s,
|
3244
3291
|
trackItemIds: c,
|
3245
3292
|
tracks: h,
|
3246
|
-
transitionIds:
|
3247
|
-
transitionsMap:
|
3293
|
+
transitionIds: y,
|
3294
|
+
transitionsMap: A,
|
3248
3295
|
trackItemsMap: F
|
3249
|
-
}), N = [],
|
3250
|
-
n.forEach((
|
3251
|
-
let
|
3252
|
-
const
|
3253
|
-
|
3254
|
-
path:
|
3296
|
+
}), N = [], g = [], f = [], d = [], p = [], b = [];
|
3297
|
+
n.forEach((w) => {
|
3298
|
+
let M;
|
3299
|
+
const j = w.path.slice(1);
|
3300
|
+
w.type === "CREATE" ? M = {
|
3301
|
+
path: j,
|
3255
3302
|
op: "remove",
|
3256
|
-
value:
|
3257
|
-
} :
|
3258
|
-
path:
|
3303
|
+
value: w.value
|
3304
|
+
} : w.type === "CHANGE" ? M = {
|
3305
|
+
path: j,
|
3259
3306
|
op: "replace",
|
3260
|
-
value:
|
3261
|
-
} :
|
3262
|
-
path:
|
3307
|
+
value: w.oldValue
|
3308
|
+
} : M = {
|
3309
|
+
path: j,
|
3263
3310
|
op: "add",
|
3264
|
-
value:
|
3265
|
-
},
|
3311
|
+
value: w.oldValue
|
3312
|
+
}, w.path.includes("trackItemIds") ? f.push(M) : w.path.includes("transitionIds") ? g.push(M) : w.path.includes("trackItemsMap") ? p.push(M) : w.path.includes("transitionsMap") ? d.push(M) : w.path.includes("tracks") ? N.push(M) : w.path.includes("trackItemDetailsMap") && b.push(M);
|
3266
3313
|
});
|
3267
3314
|
const v = this.applyPatch(
|
3268
|
-
|
3315
|
+
T.tracks,
|
3269
3316
|
N
|
3270
3317
|
), _ = this.applyPatch(
|
3271
|
-
|
3272
|
-
|
3273
|
-
),
|
3274
|
-
|
3275
|
-
d
|
3276
|
-
), l = this.applyPatch(
|
3277
|
-
E.transitionsMap,
|
3318
|
+
T.transitionIds,
|
3319
|
+
g
|
3320
|
+
), m = this.applyPatch(
|
3321
|
+
T.trackItemIds,
|
3278
3322
|
f
|
3279
|
-
),
|
3280
|
-
|
3323
|
+
), l = this.applyPatch(
|
3324
|
+
T.transitionsMap,
|
3325
|
+
d
|
3326
|
+
), O = this.applyPatch(
|
3327
|
+
T.trackItemsMap,
|
3281
3328
|
p
|
3282
|
-
),
|
3283
|
-
|
3284
|
-
|
3285
|
-
), I =
|
3329
|
+
), E = this.applyPatch(
|
3330
|
+
T.trackItemDetailsMap,
|
3331
|
+
b
|
3332
|
+
), I = K({
|
3286
3333
|
tracks: v,
|
3287
3334
|
transitionIds: _,
|
3288
|
-
trackItemIds:
|
3335
|
+
trackItemIds: m,
|
3289
3336
|
transitionsMap: l,
|
3290
|
-
trackItemsMap:
|
3291
|
-
trackItemDetailsMap:
|
3292
|
-
}),
|
3293
|
-
this.prevState =
|
3294
|
-
const
|
3295
|
-
this.stateSubject.next({ ...
|
3337
|
+
trackItemsMap: O,
|
3338
|
+
trackItemDetailsMap: E
|
3339
|
+
}), D = K(this.getState()), S = { ...D, ...I };
|
3340
|
+
this.prevState = D, this.redos.push({ redos: n, type: i });
|
3341
|
+
const x = Zt(S.trackItemsMap);
|
3342
|
+
this.stateSubject.next({ ...S, duration: x }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3296
3343
|
}
|
3297
3344
|
applyPatch(r, n) {
|
3298
|
-
return n.reverse().reduce((i, s) =>
|
3299
|
-
|
3345
|
+
return n.reverse().reduce((i, s) => ba(i, (c) => {
|
3346
|
+
ga(c, [s]);
|
3300
3347
|
}), r);
|
3301
3348
|
}
|
3302
3349
|
redo() {
|
3303
3350
|
const r = this.redos.pop(), n = r == null ? void 0 : r.redos, i = r == null ? void 0 : r.type;
|
3304
3351
|
if (!n || !i) return;
|
3305
|
-
|
3352
|
+
Wn();
|
3306
3353
|
const {
|
3307
3354
|
trackItemDetailsMap: s,
|
3308
3355
|
trackItemIds: c,
|
3309
3356
|
tracks: h,
|
3310
|
-
transitionIds:
|
3311
|
-
transitionsMap:
|
3357
|
+
transitionIds: y,
|
3358
|
+
transitionsMap: A,
|
3312
3359
|
trackItemsMap: F
|
3313
|
-
} = this.getState(),
|
3360
|
+
} = this.getState(), T = K({
|
3314
3361
|
trackItemDetailsMap: s,
|
3315
3362
|
trackItemIds: c,
|
3316
3363
|
tracks: h,
|
3317
|
-
transitionIds:
|
3318
|
-
transitionsMap:
|
3364
|
+
transitionIds: y,
|
3365
|
+
transitionsMap: A,
|
3319
3366
|
trackItemsMap: F
|
3320
|
-
}), N = [],
|
3321
|
-
n.forEach((
|
3322
|
-
let
|
3323
|
-
const
|
3324
|
-
|
3325
|
-
path:
|
3367
|
+
}), N = [], g = [], f = [], d = [], p = [], b = [];
|
3368
|
+
n.forEach((w) => {
|
3369
|
+
let M;
|
3370
|
+
const j = w.path.slice(1);
|
3371
|
+
w.type === "CREATE" ? M = {
|
3372
|
+
path: j,
|
3326
3373
|
op: "add",
|
3327
|
-
value:
|
3328
|
-
} :
|
3329
|
-
path:
|
3374
|
+
value: w.value
|
3375
|
+
} : w.type === "CHANGE" ? M = {
|
3376
|
+
path: j,
|
3330
3377
|
op: "replace",
|
3331
|
-
value:
|
3332
|
-
} :
|
3333
|
-
path:
|
3378
|
+
value: w.value
|
3379
|
+
} : M = {
|
3380
|
+
path: j,
|
3334
3381
|
op: "remove",
|
3335
|
-
value:
|
3336
|
-
},
|
3382
|
+
value: w.oldValue
|
3383
|
+
}, w.path.includes("trackItemIds") ? f.push(M) : w.path.includes("transitionIds") ? g.push(M) : w.path.includes("trackItemsMap") ? p.push(M) : w.path.includes("transitionsMap") ? d.push(M) : w.path.includes("trackItemDetailsMap") ? b.push(M) : N.push(M);
|
3337
3384
|
});
|
3338
3385
|
const v = this.applyPatch(
|
3339
|
-
|
3386
|
+
T.tracks,
|
3340
3387
|
N
|
3341
3388
|
), _ = this.applyPatch(
|
3342
|
-
|
3343
|
-
|
3344
|
-
),
|
3345
|
-
|
3346
|
-
d
|
3347
|
-
), l = this.applyPatch(
|
3348
|
-
E.transitionsMap,
|
3389
|
+
T.transitionIds,
|
3390
|
+
g
|
3391
|
+
), m = this.applyPatch(
|
3392
|
+
T.trackItemIds,
|
3349
3393
|
f
|
3350
|
-
),
|
3351
|
-
|
3394
|
+
), l = this.applyPatch(
|
3395
|
+
T.transitionsMap,
|
3396
|
+
d
|
3397
|
+
), O = this.applyPatch(
|
3398
|
+
T.trackItemsMap,
|
3352
3399
|
p
|
3353
|
-
),
|
3354
|
-
|
3355
|
-
|
3356
|
-
), I =
|
3400
|
+
), E = this.applyPatch(
|
3401
|
+
T.trackItemDetailsMap,
|
3402
|
+
b
|
3403
|
+
), I = K({
|
3357
3404
|
tracks: v,
|
3358
3405
|
transitionIds: _,
|
3359
|
-
trackItemIds:
|
3406
|
+
trackItemIds: m,
|
3360
3407
|
transitionsMap: l,
|
3361
|
-
trackItemsMap:
|
3362
|
-
trackItemDetailsMap:
|
3363
|
-
}),
|
3364
|
-
this.prevState =
|
3365
|
-
const
|
3366
|
-
this.stateSubject.next({ ...
|
3408
|
+
trackItemsMap: O,
|
3409
|
+
trackItemDetailsMap: E
|
3410
|
+
}), D = K(this.getState()), S = { ...D, ...I };
|
3411
|
+
this.prevState = D, this.undos.push({ undos: n, type: i });
|
3412
|
+
const x = Zt(S.trackItemsMap);
|
3413
|
+
this.stateSubject.next({ ...S, duration: x }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3367
3414
|
}
|
3368
3415
|
}
|
3369
3416
|
export {
|
3370
|
-
|
3417
|
+
Qa as default
|
3371
3418
|
};
|