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