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