@hostlink/light 2.3.2 → 2.3.3
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/light.js +331 -320
- package/dist/light.umd.cjs +13 -13
- package/package.json +1 -1
package/dist/light.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var w = (e, t, r) =>
|
|
1
|
+
var Yt = Object.defineProperty;
|
|
2
|
+
var Zt = (e, t, r) => t in e ? Yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var w = (e, t, r) => Zt(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import { jsonToGraphQLQuery as Dt, VariableType as W } from "json-to-graphql-query";
|
|
5
|
-
import
|
|
5
|
+
import kt from "axios";
|
|
6
6
|
function Nt(e) {
|
|
7
7
|
const t = "==".slice(0, (4 - e.length % 4) % 4), r = e.replace(/-/g, "+").replace(/_/g, "/") + t, n = atob(r), i = new ArrayBuffer(n.length), s = new Uint8Array(i);
|
|
8
8
|
for (let o = 0; o < n.length; o++)
|
|
@@ -20,13 +20,13 @@ function Bt(e) {
|
|
|
20
20
|
).replace(/=/g, "");
|
|
21
21
|
}
|
|
22
22
|
var l = "copy", A = "convert";
|
|
23
|
-
function
|
|
23
|
+
function P(e, t, r) {
|
|
24
24
|
if (t === l)
|
|
25
25
|
return r;
|
|
26
26
|
if (t === A)
|
|
27
27
|
return e(r);
|
|
28
28
|
if (t instanceof Array)
|
|
29
|
-
return r.map((n) =>
|
|
29
|
+
return r.map((n) => P(e, t[0], n));
|
|
30
30
|
if (t instanceof Object) {
|
|
31
31
|
const n = {};
|
|
32
32
|
for (const [i, s] of Object.entries(t)) {
|
|
@@ -43,7 +43,7 @@ function C(e, t, r) {
|
|
|
43
43
|
n[i] = null;
|
|
44
44
|
continue;
|
|
45
45
|
}
|
|
46
|
-
n[i] =
|
|
46
|
+
n[i] = P(
|
|
47
47
|
e,
|
|
48
48
|
s.schema,
|
|
49
49
|
r[i]
|
|
@@ -83,7 +83,7 @@ var qt = {
|
|
|
83
83
|
appid: b(l),
|
|
84
84
|
appidExclude: b(l),
|
|
85
85
|
credProps: b(l)
|
|
86
|
-
},
|
|
86
|
+
}, tr = {
|
|
87
87
|
publicKey: h({
|
|
88
88
|
rp: h(l),
|
|
89
89
|
user: h({
|
|
@@ -100,7 +100,7 @@ var qt = {
|
|
|
100
100
|
extensions: b(xt)
|
|
101
101
|
}),
|
|
102
102
|
signal: b(l)
|
|
103
|
-
},
|
|
103
|
+
}, rr = {
|
|
104
104
|
type: h(l),
|
|
105
105
|
id: h(l),
|
|
106
106
|
rawId: h(A),
|
|
@@ -120,7 +120,7 @@ var qt = {
|
|
|
120
120
|
Kt,
|
|
121
121
|
(e) => e.getClientExtensionResults()
|
|
122
122
|
)
|
|
123
|
-
},
|
|
123
|
+
}, er = {
|
|
124
124
|
mediation: b(l),
|
|
125
125
|
publicKey: h({
|
|
126
126
|
challenge: h(A),
|
|
@@ -131,7 +131,7 @@ var qt = {
|
|
|
131
131
|
extensions: b(xt)
|
|
132
132
|
}),
|
|
133
133
|
signal: b(l)
|
|
134
|
-
},
|
|
134
|
+
}, nr = {
|
|
135
135
|
type: h(l),
|
|
136
136
|
id: h(l),
|
|
137
137
|
rawId: h(A),
|
|
@@ -147,39 +147,39 @@ var qt = {
|
|
|
147
147
|
(e) => e.getClientExtensionResults()
|
|
148
148
|
)
|
|
149
149
|
};
|
|
150
|
-
function nr(e) {
|
|
151
|
-
return C(Nt, kt, e);
|
|
152
|
-
}
|
|
153
150
|
function ir(e) {
|
|
154
|
-
return
|
|
151
|
+
return P(Nt, tr, e);
|
|
152
|
+
}
|
|
153
|
+
function sr(e) {
|
|
154
|
+
return P(
|
|
155
155
|
Bt,
|
|
156
|
-
|
|
156
|
+
rr,
|
|
157
157
|
e
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
|
-
function sr(e) {
|
|
161
|
-
return C(Nt, rr, e);
|
|
162
|
-
}
|
|
163
160
|
function or(e) {
|
|
164
|
-
return
|
|
161
|
+
return P(Nt, er, e);
|
|
162
|
+
}
|
|
163
|
+
function ar(e) {
|
|
164
|
+
return P(
|
|
165
165
|
Bt,
|
|
166
|
-
|
|
166
|
+
nr,
|
|
167
167
|
e
|
|
168
168
|
);
|
|
169
169
|
}
|
|
170
|
-
async function
|
|
170
|
+
async function ur(e) {
|
|
171
171
|
const t = await navigator.credentials.create(
|
|
172
172
|
e
|
|
173
173
|
);
|
|
174
|
-
return t.toJSON = () =>
|
|
174
|
+
return t.toJSON = () => sr(t), t;
|
|
175
175
|
}
|
|
176
|
-
async function
|
|
176
|
+
async function cr(e) {
|
|
177
177
|
const t = await navigator.credentials.get(
|
|
178
178
|
e
|
|
179
179
|
);
|
|
180
|
-
return t.toJSON = () =>
|
|
180
|
+
return t.toJSON = () => ar(t), t;
|
|
181
181
|
}
|
|
182
|
-
const
|
|
182
|
+
const fr = (e) => ({
|
|
183
183
|
login: async (t) => {
|
|
184
184
|
const n = (await O(e, {
|
|
185
185
|
webAuthnRequestOptions: {
|
|
@@ -187,24 +187,24 @@ const cr = (e) => ({
|
|
|
187
187
|
username: t
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
})).webAuthnRequestOptions, i =
|
|
190
|
+
})).webAuthnRequestOptions, i = or({
|
|
191
191
|
publicKey: n
|
|
192
|
-
}), s = await
|
|
192
|
+
}), s = await cr(i);
|
|
193
193
|
await y(e, "webAuthnAssertion", {
|
|
194
194
|
username: t,
|
|
195
195
|
assertion: s.toJSON()
|
|
196
196
|
});
|
|
197
197
|
},
|
|
198
198
|
register: async () => {
|
|
199
|
-
const t = await O(e, { webAuthnCreationOptions: !0 }), r =
|
|
199
|
+
const t = await O(e, { webAuthnCreationOptions: !0 }), r = ir({
|
|
200
200
|
publicKey: t.webAuthnCreationOptions
|
|
201
|
-
}), n = await
|
|
201
|
+
}), n = await ur(r);
|
|
202
202
|
await y(e, "webAuthnRegister", {
|
|
203
203
|
registration: n.toJSON()
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
-
}),
|
|
207
|
-
WebAuthn:
|
|
206
|
+
}), lr = (e) => ({
|
|
207
|
+
WebAuthn: fr(e),
|
|
208
208
|
facebookLogin: (t) => y(e, "facebookLogin", {
|
|
209
209
|
access_token: t
|
|
210
210
|
}),
|
|
@@ -319,7 +319,7 @@ const cr = (e) => ({
|
|
|
319
319
|
}
|
|
320
320
|
};
|
|
321
321
|
};
|
|
322
|
-
function
|
|
322
|
+
function hr(e) {
|
|
323
323
|
e = "<~" + e + "~>";
|
|
324
324
|
var t, r, n, i, s, o = String, u = 255;
|
|
325
325
|
for (e.slice(0, 2) === "<~" && e.slice(-2), e = e.slice(2, -2).replace(/\s/g, "").replace("z", "!!!!!"), t = "uuuuu".slice(e.length % 5 || 5), e += t, n = [], i = 0, s = e.length; s > i; i += 5) r = 52200625 * (e.charCodeAt(i) - 33) + 614125 * (e.charCodeAt(i + 1) - 33) + 7225 * (e.charCodeAt(i + 2) - 33) + 85 * (e.charCodeAt(i + 3) - 33) + (e.charCodeAt(i + 4) - 33), n.push(u & r >> 24, u & r >> 16, u & r >> 8, u & r);
|
|
@@ -347,7 +347,7 @@ const R = (e = "") => {
|
|
|
347
347
|
}
|
|
348
348
|
};
|
|
349
349
|
}, fo = {
|
|
350
|
-
fromBase85: (e) => R(
|
|
350
|
+
fromBase85: (e) => R(hr(e)),
|
|
351
351
|
fromBase64: (e) => R(atob(e)),
|
|
352
352
|
fromString: (e) => R(e)
|
|
353
353
|
}, G = (e) => {
|
|
@@ -376,13 +376,13 @@ const R = (e = "") => {
|
|
|
376
376
|
throw new Error(n.data.errors[0].message);
|
|
377
377
|
return n.data.data;
|
|
378
378
|
};
|
|
379
|
-
function
|
|
379
|
+
function pr(e) {
|
|
380
380
|
for (let t = 0; t < e.length; t++)
|
|
381
381
|
if (e[t] instanceof File)
|
|
382
382
|
return !0;
|
|
383
383
|
return !1;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function yr(e) {
|
|
386
386
|
for (let t in e)
|
|
387
387
|
if (e[t] instanceof File)
|
|
388
388
|
return !0;
|
|
@@ -398,14 +398,14 @@ const y = async (e, t, r = null, n = []) => {
|
|
|
398
398
|
const c = {}, p = {}, v = {};
|
|
399
399
|
let f = 0;
|
|
400
400
|
Object.entries(r).forEach(([m, g]) => {
|
|
401
|
-
if (g instanceof Array &&
|
|
401
|
+
if (g instanceof Array && pr(g)) {
|
|
402
402
|
o = !0;
|
|
403
403
|
let E = 0;
|
|
404
|
-
g.forEach((
|
|
405
|
-
|
|
404
|
+
g.forEach((C) => {
|
|
405
|
+
C instanceof File && (c[m] = new W(m), p[f] = ["variables." + m + "." + E], s.append(f.toString(), C), f++);
|
|
406
406
|
}), v[m] = "[Upload!]!";
|
|
407
|
-
} else g instanceof File ? (o = !0, c[m] = new W(m), p[f] = ["variables." + m], s.append(f.toString(), g), v[m] = "Upload!", f++) : g instanceof Object &&
|
|
408
|
-
|
|
407
|
+
} else g instanceof File ? (o = !0, c[m] = new W(m), p[f] = ["variables." + m], s.append(f.toString(), g), v[m] = "Upload!", f++) : g instanceof Object && yr(g) ? (o = !0, c[m] = {}, Object.entries(g).forEach(([E, C]) => {
|
|
408
|
+
C instanceof File ? (c[m][E] = new W(E), p[f] = ["variables." + E], s.append(f.toString(), C), v[E] = "Upload!", f++) : c[m][E] = C;
|
|
409
409
|
})) : g !== void 0 && (c[m] = g);
|
|
410
410
|
}), i[t].__args = c, i.__variables = v, o && s.append("map", JSON.stringify(p));
|
|
411
411
|
}
|
|
@@ -421,7 +421,7 @@ const y = async (e, t, r = null, n = []) => {
|
|
|
421
421
|
}), u.data.errors)
|
|
422
422
|
throw new Error(u.data.errors[0].message);
|
|
423
423
|
return u.data.data[t];
|
|
424
|
-
},
|
|
424
|
+
}, mr = (e) => ({
|
|
425
425
|
uploadTempFile: (t) => y(e, "fsUploadTempFile", {
|
|
426
426
|
file: t
|
|
427
427
|
}, {
|
|
@@ -477,7 +477,7 @@ const y = async (e, t, r = null, n = []) => {
|
|
|
477
477
|
rename: (t, r) => y(e, "fsRenameFile", { path: t, name: r }),
|
|
478
478
|
move: (t, r) => y(e, "fsMoveFile", { source: t, target: r })
|
|
479
479
|
}
|
|
480
|
-
}),
|
|
480
|
+
}), dr = (e) => ({
|
|
481
481
|
get: async (t) => (await e({
|
|
482
482
|
config: {
|
|
483
483
|
__args: {
|
|
@@ -485,13 +485,13 @@ const y = async (e, t, r = null, n = []) => {
|
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
})).config
|
|
488
|
-
}),
|
|
488
|
+
}), vr = (e) => ({
|
|
489
489
|
send: (t, r, n) => y(e, "sendMail", {
|
|
490
490
|
email: t,
|
|
491
491
|
subject: r,
|
|
492
492
|
message: n
|
|
493
493
|
})
|
|
494
|
-
}),
|
|
494
|
+
}), br = (e) => ({
|
|
495
495
|
list: async () => (await O(e, {
|
|
496
496
|
listUser: {
|
|
497
497
|
data: {
|
|
@@ -503,7 +503,7 @@ const y = async (e, t, r = null, n = []) => {
|
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
})).listUser.data
|
|
506
|
-
}),
|
|
506
|
+
}), gr = () => {
|
|
507
507
|
const e = {};
|
|
508
508
|
return {
|
|
509
509
|
create(t, r) {
|
|
@@ -533,17 +533,17 @@ const y = async (e, t, r = null, n = []) => {
|
|
|
533
533
|
return e[t];
|
|
534
534
|
}
|
|
535
535
|
};
|
|
536
|
-
},
|
|
536
|
+
}, wr = (e) => ({
|
|
537
537
|
list: async () => (await O(e, {
|
|
538
538
|
listRole: {
|
|
539
539
|
name: !0
|
|
540
540
|
}
|
|
541
541
|
})).listRole
|
|
542
542
|
});
|
|
543
|
-
function
|
|
543
|
+
function Ar(e) {
|
|
544
544
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
545
545
|
}
|
|
546
|
-
var Ut = { exports: {} },
|
|
546
|
+
var Ut = { exports: {} }, _r = function() {
|
|
547
547
|
var t = this, r = -1;
|
|
548
548
|
return {
|
|
549
549
|
next: function() {
|
|
@@ -553,7 +553,7 @@ var Ut = { exports: {} }, Ar = function() {
|
|
|
553
553
|
};
|
|
554
554
|
}
|
|
555
555
|
};
|
|
556
|
-
},
|
|
556
|
+
}, Or = function() {
|
|
557
557
|
return this.items;
|
|
558
558
|
};
|
|
559
559
|
function Q(e) {
|
|
@@ -583,9 +583,9 @@ var d = {
|
|
|
583
583
|
isFunction: function(t) {
|
|
584
584
|
return typeof t == "function";
|
|
585
585
|
}
|
|
586
|
-
},
|
|
587
|
-
return t === void 0 ? this.sum() / this.items.length :
|
|
588
|
-
},
|
|
586
|
+
}, Sr = d, $r = Sr.isFunction, Wt = function(t) {
|
|
587
|
+
return t === void 0 ? this.sum() / this.items.length : $r(t) ? new this.constructor(this.items).sum(t) / this.items.length : new this.constructor(this.items).pluck(t).sum() / this.items.length;
|
|
588
|
+
}, jr = Wt, Er = jr;
|
|
589
589
|
function z(e) {
|
|
590
590
|
"@babel/helpers - typeof";
|
|
591
591
|
return z = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
@@ -594,7 +594,7 @@ function z(e) {
|
|
|
594
594
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
595
595
|
}, z(e);
|
|
596
596
|
}
|
|
597
|
-
var
|
|
597
|
+
var Ir = function(t) {
|
|
598
598
|
var r = this, n = [], i = 0;
|
|
599
599
|
if (Array.isArray(this.items))
|
|
600
600
|
do {
|
|
@@ -615,8 +615,8 @@ var Er = function(t) {
|
|
|
615
615
|
n.push(new this.constructor([this.items]));
|
|
616
616
|
return new this.constructor(n);
|
|
617
617
|
};
|
|
618
|
-
function
|
|
619
|
-
return
|
|
618
|
+
function Cr(e) {
|
|
619
|
+
return Dr(e) || Fr(e) || Pr(e) || Tr();
|
|
620
620
|
}
|
|
621
621
|
function Tr() {
|
|
622
622
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
@@ -630,10 +630,10 @@ function Pr(e, t) {
|
|
|
630
630
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return X(e, t);
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function Fr(e) {
|
|
634
634
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function Dr(e) {
|
|
637
637
|
if (Array.isArray(e)) return X(e);
|
|
638
638
|
}
|
|
639
639
|
function X(e, t) {
|
|
@@ -642,18 +642,18 @@ function X(e, t) {
|
|
|
642
642
|
n[r] = e[r];
|
|
643
643
|
return n;
|
|
644
644
|
}
|
|
645
|
-
var
|
|
645
|
+
var Nr = function() {
|
|
646
646
|
var t;
|
|
647
|
-
return new this.constructor((t = []).concat.apply(t,
|
|
647
|
+
return new this.constructor((t = []).concat.apply(t, Cr(this.items)));
|
|
648
648
|
};
|
|
649
|
-
function
|
|
650
|
-
return
|
|
649
|
+
function Br(e, t) {
|
|
650
|
+
return Ur(e) || Kr(e, t) || xr(e, t) || qr();
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function qr() {
|
|
653
653
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
654
654
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function xr(e, t) {
|
|
657
657
|
if (e) {
|
|
658
658
|
if (typeof e == "string") return yt(e, t);
|
|
659
659
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -667,7 +667,7 @@ function yt(e, t) {
|
|
|
667
667
|
n[r] = e[r];
|
|
668
668
|
return n;
|
|
669
669
|
}
|
|
670
|
-
function
|
|
670
|
+
function Kr(e, t) {
|
|
671
671
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
672
672
|
if (r != null) {
|
|
673
673
|
var n = [], i = !0, s = !1, o, u;
|
|
@@ -686,7 +686,7 @@ function xr(e, t) {
|
|
|
686
686
|
return n;
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function Ur(e) {
|
|
690
690
|
if (Array.isArray(e)) return e;
|
|
691
691
|
}
|
|
692
692
|
function B(e) {
|
|
@@ -697,7 +697,7 @@ function B(e) {
|
|
|
697
697
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
698
698
|
}, B(e);
|
|
699
699
|
}
|
|
700
|
-
var
|
|
700
|
+
var Wr = function(t) {
|
|
701
701
|
var r = this, n = t;
|
|
702
702
|
n instanceof this.constructor && (n = t.all());
|
|
703
703
|
var i = {};
|
|
@@ -712,19 +712,19 @@ var Ur = function(t) {
|
|
|
712
712
|
else if (Array.isArray(this.items))
|
|
713
713
|
i[this.items[0]] = n;
|
|
714
714
|
else if (typeof this.items == "string" && Array.isArray(n)) {
|
|
715
|
-
var s = n, o =
|
|
715
|
+
var s = n, o = Br(s, 1);
|
|
716
716
|
i[this.items] = o[0];
|
|
717
717
|
} else typeof this.items == "string" && (i[this.items] = n);
|
|
718
718
|
return new this.constructor(i);
|
|
719
719
|
};
|
|
720
|
-
function
|
|
721
|
-
return
|
|
720
|
+
function Rr(e) {
|
|
721
|
+
return Lr(e) || Vr(e) || Mr(e) || Jr();
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function Jr() {
|
|
724
724
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
725
725
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function Mr(e, t) {
|
|
728
728
|
if (e) {
|
|
729
729
|
if (typeof e == "string") return Y(e, t);
|
|
730
730
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -732,10 +732,10 @@ function Jr(e, t) {
|
|
|
732
732
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Y(e, t);
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
|
-
function
|
|
735
|
+
function Vr(e) {
|
|
736
736
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function Lr(e) {
|
|
739
739
|
if (Array.isArray(e)) return Y(e);
|
|
740
740
|
}
|
|
741
741
|
function Y(e, t) {
|
|
@@ -748,7 +748,7 @@ var Rt = function(t) {
|
|
|
748
748
|
var r;
|
|
749
749
|
if (Array.isArray(t)) {
|
|
750
750
|
var n;
|
|
751
|
-
r = [], (n = r).push.apply(n,
|
|
751
|
+
r = [], (n = r).push.apply(n, Rr(t));
|
|
752
752
|
} else
|
|
753
753
|
r = {}, Object.keys(t).forEach(function(i) {
|
|
754
754
|
r[i] = t[i];
|
|
@@ -763,12 +763,12 @@ function q(e) {
|
|
|
763
763
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
764
764
|
}, q(e);
|
|
765
765
|
}
|
|
766
|
-
var
|
|
766
|
+
var Hr = Rt, Gr = function(t) {
|
|
767
767
|
var r = t;
|
|
768
768
|
t instanceof this.constructor ? r = t.all() : q(t) === "object" && (r = [], Object.keys(t).forEach(function(i) {
|
|
769
769
|
r.push(t[i]);
|
|
770
770
|
}));
|
|
771
|
-
var n =
|
|
771
|
+
var n = Hr(this.items);
|
|
772
772
|
return r.forEach(function(i) {
|
|
773
773
|
q(i) === "object" ? Object.keys(i).forEach(function(s) {
|
|
774
774
|
return n.push(i[s]);
|
|
@@ -776,13 +776,13 @@ var Lr = Rt, Hr = function(t) {
|
|
|
776
776
|
}), new this.constructor(n);
|
|
777
777
|
};
|
|
778
778
|
function mt(e) {
|
|
779
|
-
return
|
|
779
|
+
return Yr(e) || Xr(e) || zr(e) || Qr();
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function Qr() {
|
|
782
782
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
783
783
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function zr(e, t) {
|
|
786
786
|
if (e) {
|
|
787
787
|
if (typeof e == "string") return Z(e, t);
|
|
788
788
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -790,10 +790,10 @@ function Qr(e, t) {
|
|
|
790
790
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Z(e, t);
|
|
791
791
|
}
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function Xr(e) {
|
|
794
794
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Yr(e) {
|
|
797
797
|
if (Array.isArray(e)) return Z(e);
|
|
798
798
|
}
|
|
799
799
|
function Z(e, t) {
|
|
@@ -808,14 +808,14 @@ var $ = function(t) {
|
|
|
808
808
|
return r.push(t[n]);
|
|
809
809
|
}), r;
|
|
810
810
|
};
|
|
811
|
-
function
|
|
812
|
-
return
|
|
811
|
+
function Zr(e) {
|
|
812
|
+
return ee(e) || re(e) || te(e) || kr();
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function kr() {
|
|
815
815
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
816
816
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function te(e, t) {
|
|
819
819
|
if (e) {
|
|
820
820
|
if (typeof e == "string") return k(e, t);
|
|
821
821
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -823,10 +823,10 @@ function kr(e, t) {
|
|
|
823
823
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return k(e, t);
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function re(e) {
|
|
827
827
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function ee(e) {
|
|
830
830
|
if (Array.isArray(e)) return k(e);
|
|
831
831
|
}
|
|
832
832
|
function k(e, t) {
|
|
@@ -835,32 +835,32 @@ function k(e, t) {
|
|
|
835
835
|
n[r] = e[r];
|
|
836
836
|
return n;
|
|
837
837
|
}
|
|
838
|
-
var
|
|
838
|
+
var ne = $, ie = d, se = ie.isFunction, Jt = function(t, r) {
|
|
839
839
|
if (r !== void 0)
|
|
840
840
|
return Array.isArray(this.items) ? this.items.filter(function(i) {
|
|
841
841
|
return i[t] !== void 0 && i[t] === r;
|
|
842
842
|
}).length > 0 : this.items[t] !== void 0 && this.items[t] === r;
|
|
843
|
-
if (
|
|
843
|
+
if (se(t))
|
|
844
844
|
return this.items.filter(function(i, s) {
|
|
845
845
|
return t(i, s);
|
|
846
846
|
}).length > 0;
|
|
847
847
|
if (Array.isArray(this.items))
|
|
848
848
|
return this.items.indexOf(t) !== -1;
|
|
849
|
-
var n =
|
|
850
|
-
return n.push.apply(n,
|
|
851
|
-
}, se = function() {
|
|
852
|
-
return this.count() === 1;
|
|
849
|
+
var n = ne(this.items);
|
|
850
|
+
return n.push.apply(n, Zr(Object.keys(this.items))), n.indexOf(t) !== -1;
|
|
853
851
|
}, oe = function() {
|
|
852
|
+
return this.count() === 1;
|
|
853
|
+
}, ae = function() {
|
|
854
854
|
var t = 0;
|
|
855
855
|
return Array.isArray(this.items) && (t = this.items.length), Math.max(Object.keys(this.items).length, t);
|
|
856
|
-
},
|
|
856
|
+
}, ue = function() {
|
|
857
857
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(r) {
|
|
858
858
|
return r;
|
|
859
859
|
};
|
|
860
860
|
return new this.constructor(this.items).groupBy(t).map(function(r) {
|
|
861
861
|
return r.count();
|
|
862
862
|
});
|
|
863
|
-
},
|
|
863
|
+
}, ce = function() {
|
|
864
864
|
function t(s, o, u) {
|
|
865
865
|
var a = u[0];
|
|
866
866
|
a instanceof o && (a = a.all());
|
|
@@ -873,39 +873,39 @@ var ee = $, ne = d, ie = ne.isFunction, Jt = function(t, r) {
|
|
|
873
873
|
for (var r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
874
874
|
n[i] = arguments[i];
|
|
875
875
|
return new this.constructor(t([], this.constructor, [].concat([this.items], n)));
|
|
876
|
-
},
|
|
876
|
+
}, fe = function() {
|
|
877
877
|
this.dump(), typeof process < "u" && process.exit(1);
|
|
878
|
-
},
|
|
878
|
+
}, le = function(t) {
|
|
879
879
|
var r;
|
|
880
880
|
t instanceof this.constructor ? r = t.all() : r = t;
|
|
881
881
|
var n = this.items.filter(function(i) {
|
|
882
882
|
return r.indexOf(i) === -1;
|
|
883
883
|
});
|
|
884
884
|
return new this.constructor(n);
|
|
885
|
-
},
|
|
885
|
+
}, he = function(t) {
|
|
886
886
|
var r = this, n = t;
|
|
887
887
|
t instanceof this.constructor && (n = t.all());
|
|
888
888
|
var i = {};
|
|
889
889
|
return Object.keys(this.items).forEach(function(s) {
|
|
890
890
|
(n[s] === void 0 || n[s] !== r.items[s]) && (i[s] = r.items[s]);
|
|
891
891
|
}), new this.constructor(i);
|
|
892
|
-
},
|
|
892
|
+
}, pe = function(t) {
|
|
893
893
|
var r;
|
|
894
894
|
t instanceof this.constructor ? r = t.all() : r = t;
|
|
895
895
|
var n = Object.keys(r), i = Object.keys(this.items).filter(function(s) {
|
|
896
896
|
return n.indexOf(s) === -1;
|
|
897
897
|
});
|
|
898
898
|
return new this.constructor(this.items).only(i);
|
|
899
|
-
},
|
|
899
|
+
}, ye = function(t, r) {
|
|
900
900
|
var n = this.items.filter(function(i) {
|
|
901
901
|
return !(t && t.some(function(s) {
|
|
902
902
|
return r(i, s) === 0;
|
|
903
903
|
}));
|
|
904
904
|
});
|
|
905
905
|
return new this.constructor(n);
|
|
906
|
-
},
|
|
906
|
+
}, me = function(t, r) {
|
|
907
907
|
return !this.contains(t, r);
|
|
908
|
-
},
|
|
908
|
+
}, de = function() {
|
|
909
909
|
return console.log(this), this;
|
|
910
910
|
};
|
|
911
911
|
function x(e) {
|
|
@@ -916,7 +916,7 @@ function x(e) {
|
|
|
916
916
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
917
917
|
}, x(e);
|
|
918
918
|
}
|
|
919
|
-
var
|
|
919
|
+
var ve = function() {
|
|
920
920
|
var t = this, r = [], n = {}, i = function(o) {
|
|
921
921
|
return Array.isArray(o) || x(o) === "object" ? JSON.stringify(o) : o;
|
|
922
922
|
};
|
|
@@ -927,7 +927,7 @@ var de = function() {
|
|
|
927
927
|
var o = i(t.items[s]);
|
|
928
928
|
r.indexOf(o) === -1 ? r.push(o) : n[s] = t.items[s];
|
|
929
929
|
}), new this.constructor(n);
|
|
930
|
-
},
|
|
930
|
+
}, be = function(t) {
|
|
931
931
|
var r = !1;
|
|
932
932
|
if (Array.isArray(this.items))
|
|
933
933
|
for (var n = this.items.length, i = 0; i < n && !r; i += 1)
|
|
@@ -939,14 +939,14 @@ var de = function() {
|
|
|
939
939
|
}
|
|
940
940
|
return this;
|
|
941
941
|
};
|
|
942
|
-
function
|
|
943
|
-
return
|
|
942
|
+
function ge(e) {
|
|
943
|
+
return Oe(e) || _e(e) || Ae(e) || we();
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function we() {
|
|
946
946
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
947
947
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function Ae(e, t) {
|
|
950
950
|
if (e) {
|
|
951
951
|
if (typeof e == "string") return tt(e, t);
|
|
952
952
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -954,10 +954,10 @@ function we(e, t) {
|
|
|
954
954
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return tt(e, t);
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function _e(e) {
|
|
958
958
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
959
959
|
}
|
|
960
|
-
function
|
|
960
|
+
function Oe(e) {
|
|
961
961
|
if (Array.isArray(e)) return tt(e);
|
|
962
962
|
}
|
|
963
963
|
function tt(e, t) {
|
|
@@ -966,19 +966,19 @@ function tt(e, t) {
|
|
|
966
966
|
n[r] = e[r];
|
|
967
967
|
return n;
|
|
968
968
|
}
|
|
969
|
-
var
|
|
969
|
+
var Se = function(t) {
|
|
970
970
|
return this.each(function(r, n) {
|
|
971
|
-
t.apply(void 0,
|
|
971
|
+
t.apply(void 0, ge(r).concat([n]));
|
|
972
972
|
}), this;
|
|
973
|
-
},
|
|
974
|
-
var r =
|
|
973
|
+
}, $e = $, je = function(t) {
|
|
974
|
+
var r = $e(this.items);
|
|
975
975
|
return r.every(t);
|
|
976
976
|
}, U = function(t) {
|
|
977
977
|
return Array.isArray(t[0]) ? t[0] : t;
|
|
978
|
-
},
|
|
978
|
+
}, Ee = U, Ie = function() {
|
|
979
979
|
for (var t = this, r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
980
980
|
n[i] = arguments[i];
|
|
981
|
-
var s =
|
|
981
|
+
var s = Ee(n);
|
|
982
982
|
if (Array.isArray(this.items)) {
|
|
983
983
|
var o = this.items.filter(function(a) {
|
|
984
984
|
return s.indexOf(a) === -1;
|
|
@@ -1009,7 +1009,7 @@ function Mt(e) {
|
|
|
1009
1009
|
return !1;
|
|
1010
1010
|
return !0;
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function Ce(e, t) {
|
|
1013
1013
|
var r = {};
|
|
1014
1014
|
return Object.keys(t).forEach(function(n) {
|
|
1015
1015
|
e ? e(t[n], n) && (r[n] = t[n]) : Mt(t[n]) || (r[n] = t[n]);
|
|
@@ -1026,8 +1026,8 @@ function Te(e, t) {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
var Pe = function(t) {
|
|
1028
1028
|
var r = t || !1, n = null;
|
|
1029
|
-
return Array.isArray(this.items) ? n = Te(r, this.items) : n =
|
|
1030
|
-
},
|
|
1029
|
+
return Array.isArray(this.items) ? n = Te(r, this.items) : n = Ce(r, this.items), new this.constructor(n);
|
|
1030
|
+
}, Fe = d, J = Fe.isFunction, De = function(t, r) {
|
|
1031
1031
|
if (J(t)) {
|
|
1032
1032
|
for (var n = Object.keys(this.items), i = 0; i < n.length; i += 1) {
|
|
1033
1033
|
var s = n[i], o = this.items[s];
|
|
@@ -1043,8 +1043,8 @@ var Pe = function(t) {
|
|
|
1043
1043
|
return this.items[u];
|
|
1044
1044
|
}
|
|
1045
1045
|
return J(r) ? r() : r;
|
|
1046
|
-
},
|
|
1047
|
-
if (
|
|
1046
|
+
}, Ne = d, Be = Ne.isFunction, qe = function(t, r, n) {
|
|
1047
|
+
if (Be(t))
|
|
1048
1048
|
return this.first(t, function() {
|
|
1049
1049
|
throw new Error("Item not found.");
|
|
1050
1050
|
});
|
|
@@ -1052,11 +1052,11 @@ var Pe = function(t) {
|
|
|
1052
1052
|
if (i.isEmpty())
|
|
1053
1053
|
throw new Error("Item not found.");
|
|
1054
1054
|
return i.first();
|
|
1055
|
-
},
|
|
1055
|
+
}, xe = function(t, r, n) {
|
|
1056
1056
|
return this.where(t, r, n).first() || null;
|
|
1057
|
-
},
|
|
1057
|
+
}, Ke = function(t) {
|
|
1058
1058
|
return this.map(t).collapse();
|
|
1059
|
-
}, Vt = d, M = Vt.isArray, V = Vt.isObject,
|
|
1059
|
+
}, Vt = d, M = Vt.isArray, V = Vt.isObject, Ue = function(t) {
|
|
1060
1060
|
var r = t || 1 / 0, n = !1, i = [], s = function(u) {
|
|
1061
1061
|
i = [], M(u) ? u.forEach(function(a) {
|
|
1062
1062
|
M(a) ? i = i.concat(a) : V(a) ? Object.keys(a).forEach(function(c) {
|
|
@@ -1073,23 +1073,23 @@ var Pe = function(t) {
|
|
|
1073
1073
|
for (s(this.items); !n && r > 0; )
|
|
1074
1074
|
s(i);
|
|
1075
1075
|
return new this.constructor(i);
|
|
1076
|
-
},
|
|
1076
|
+
}, We = function() {
|
|
1077
1077
|
var t = this, r = {};
|
|
1078
1078
|
return Array.isArray(this.items) ? Object.keys(this.items).forEach(function(n) {
|
|
1079
1079
|
r[t.items[n]] = Number(n);
|
|
1080
1080
|
}) : Object.keys(this.items).forEach(function(n) {
|
|
1081
1081
|
r[t.items[n]] = n;
|
|
1082
1082
|
}), new this.constructor(r);
|
|
1083
|
-
},
|
|
1083
|
+
}, Re = function(t, r) {
|
|
1084
1084
|
var n = this, i = {};
|
|
1085
1085
|
return Array.isArray(this.items) ? i = this.items.slice(t * r - r, t * r) : Object.keys(this.items).slice(t * r - r, t * r).forEach(function(s) {
|
|
1086
1086
|
i[s] = n.items[s];
|
|
1087
1087
|
}), new this.constructor(i);
|
|
1088
|
-
},
|
|
1088
|
+
}, Je = function(t) {
|
|
1089
1089
|
return Array.isArray(this.items) ? this.items.splice(t, 1) : delete this.items[t], this;
|
|
1090
|
-
},
|
|
1090
|
+
}, Me = d, Ve = Me.isFunction, Le = function(t) {
|
|
1091
1091
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
1092
|
-
return this.items[t] !== void 0 ? this.items[t] :
|
|
1092
|
+
return this.items[t] !== void 0 ? this.items[t] : Ve(r) ? r() : r !== null ? r : null;
|
|
1093
1093
|
}, j = function(t, r) {
|
|
1094
1094
|
try {
|
|
1095
1095
|
return r.split(".").reduce(function(n, i) {
|
|
@@ -1098,40 +1098,40 @@ var Pe = function(t) {
|
|
|
1098
1098
|
} catch {
|
|
1099
1099
|
return t;
|
|
1100
1100
|
}
|
|
1101
|
-
}, L = j,
|
|
1101
|
+
}, L = j, He = d, Ge = He.isFunction, Qe = function(t) {
|
|
1102
1102
|
var r = this, n = {};
|
|
1103
1103
|
return this.items.forEach(function(i, s) {
|
|
1104
1104
|
var o;
|
|
1105
|
-
|
|
1105
|
+
Ge(t) ? o = t(i, s) : L(i, t) || L(i, t) === 0 ? o = L(i, t) : o = "", n[o] === void 0 && (n[o] = new r.constructor([])), n[o].push(i);
|
|
1106
1106
|
}), new this.constructor(n);
|
|
1107
|
-
},
|
|
1107
|
+
}, ze = U, Xe = function() {
|
|
1108
1108
|
for (var t = this, r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
1109
1109
|
n[i] = arguments[i];
|
|
1110
|
-
var s =
|
|
1110
|
+
var s = ze(n);
|
|
1111
1111
|
return s.filter(function(o) {
|
|
1112
1112
|
return Object.hasOwnProperty.call(t.items, o);
|
|
1113
1113
|
}).length === s.length;
|
|
1114
|
-
},
|
|
1114
|
+
}, Ye = function(t, r) {
|
|
1115
1115
|
return r === void 0 ? this.items.join(t) : new this.constructor(this.items).pluck(t).all().join(r);
|
|
1116
|
-
},
|
|
1116
|
+
}, Ze = function(t) {
|
|
1117
1117
|
var r = t;
|
|
1118
1118
|
t instanceof this.constructor && (r = t.all());
|
|
1119
1119
|
var n = this.items.filter(function(i) {
|
|
1120
1120
|
return r.indexOf(i) !== -1;
|
|
1121
1121
|
});
|
|
1122
1122
|
return new this.constructor(n);
|
|
1123
|
-
},
|
|
1123
|
+
}, ke = function(t) {
|
|
1124
1124
|
var r = this, n = Object.keys(t);
|
|
1125
1125
|
t instanceof this.constructor && (n = Object.keys(t.all()));
|
|
1126
1126
|
var i = {};
|
|
1127
1127
|
return Object.keys(this.items).forEach(function(s) {
|
|
1128
1128
|
n.indexOf(s) !== -1 && (i[s] = r.items[s]);
|
|
1129
1129
|
}), new this.constructor(i);
|
|
1130
|
-
}, ke = function() {
|
|
1131
|
-
return Array.isArray(this.items) ? !this.items.length : !Object.keys(this.items).length;
|
|
1132
1130
|
}, tn = function() {
|
|
1131
|
+
return Array.isArray(this.items) ? !this.items.length : !Object.keys(this.items).length;
|
|
1132
|
+
}, rn = function() {
|
|
1133
1133
|
return !this.isEmpty();
|
|
1134
|
-
},
|
|
1134
|
+
}, en = function(t, r) {
|
|
1135
1135
|
var n = this.values();
|
|
1136
1136
|
if (r === void 0)
|
|
1137
1137
|
return n.implode(t);
|
|
@@ -1142,18 +1142,18 @@ var Pe = function(t) {
|
|
|
1142
1142
|
return n.last();
|
|
1143
1143
|
var s = n.pop();
|
|
1144
1144
|
return n.implode(t) + r + s;
|
|
1145
|
-
},
|
|
1145
|
+
}, nn = j, sn = d, on = sn.isFunction, an = function(t) {
|
|
1146
1146
|
var r = {};
|
|
1147
|
-
return
|
|
1147
|
+
return on(t) ? this.items.forEach(function(n) {
|
|
1148
1148
|
r[t(n)] = n;
|
|
1149
1149
|
}) : this.items.forEach(function(n) {
|
|
1150
|
-
var i =
|
|
1150
|
+
var i = nn(n, t);
|
|
1151
1151
|
r[i || ""] = n;
|
|
1152
1152
|
}), new this.constructor(r);
|
|
1153
|
-
},
|
|
1153
|
+
}, un = function() {
|
|
1154
1154
|
var t = Object.keys(this.items);
|
|
1155
1155
|
return Array.isArray(this.items) && (t = t.map(Number)), new this.constructor(t);
|
|
1156
|
-
},
|
|
1156
|
+
}, cn = d, dt = cn.isFunction, fn = function(t, r) {
|
|
1157
1157
|
var n = this.items;
|
|
1158
1158
|
if (dt(t) && (n = this.filter(t).all()), Array.isArray(n) && !n.length || !Object.keys(n).length)
|
|
1159
1159
|
return dt(r) ? r() : r;
|
|
@@ -1161,12 +1161,12 @@ var Pe = function(t) {
|
|
|
1161
1161
|
return n[n.length - 1];
|
|
1162
1162
|
var i = Object.keys(n);
|
|
1163
1163
|
return n[i[i.length - 1]];
|
|
1164
|
-
},
|
|
1164
|
+
}, ln = function(t, r) {
|
|
1165
1165
|
this.constructor.prototype[t] = r;
|
|
1166
|
-
},
|
|
1166
|
+
}, hn = function() {
|
|
1167
1167
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
1168
1168
|
return new this.constructor(t);
|
|
1169
|
-
},
|
|
1169
|
+
}, pn = function(t) {
|
|
1170
1170
|
var r = this;
|
|
1171
1171
|
if (Array.isArray(this.items))
|
|
1172
1172
|
return new this.constructor(this.items.map(t));
|
|
@@ -1175,14 +1175,14 @@ var Pe = function(t) {
|
|
|
1175
1175
|
n[i] = t(r.items[i], i);
|
|
1176
1176
|
}), new this.constructor(n);
|
|
1177
1177
|
};
|
|
1178
|
-
function
|
|
1179
|
-
return
|
|
1178
|
+
function yn(e) {
|
|
1179
|
+
return bn(e) || vn(e) || dn(e) || mn();
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function mn() {
|
|
1182
1182
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1183
1183
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1185
|
+
function dn(e, t) {
|
|
1186
1186
|
if (e) {
|
|
1187
1187
|
if (typeof e == "string") return et(e, t);
|
|
1188
1188
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1190,10 +1190,10 @@ function mn(e, t) {
|
|
|
1190
1190
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return et(e, t);
|
|
1191
1191
|
}
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function vn(e) {
|
|
1194
1194
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function bn(e) {
|
|
1197
1197
|
if (Array.isArray(e)) return et(e);
|
|
1198
1198
|
}
|
|
1199
1199
|
function et(e, t) {
|
|
@@ -1202,19 +1202,19 @@ function et(e, t) {
|
|
|
1202
1202
|
n[r] = e[r];
|
|
1203
1203
|
return n;
|
|
1204
1204
|
}
|
|
1205
|
-
var
|
|
1205
|
+
var gn = function(t) {
|
|
1206
1206
|
return this.map(function(r, n) {
|
|
1207
|
-
return t.apply(void 0,
|
|
1207
|
+
return t.apply(void 0, yn(r).concat([n]));
|
|
1208
1208
|
});
|
|
1209
1209
|
};
|
|
1210
|
-
function
|
|
1211
|
-
return
|
|
1210
|
+
function wn(e, t) {
|
|
1211
|
+
return Sn(e) || On(e, t) || _n(e, t) || An();
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1213
|
+
function An() {
|
|
1214
1214
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1215
1215
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function _n(e, t) {
|
|
1218
1218
|
if (e) {
|
|
1219
1219
|
if (typeof e == "string") return vt(e, t);
|
|
1220
1220
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1228,7 +1228,7 @@ function vt(e, t) {
|
|
|
1228
1228
|
n[r] = e[r];
|
|
1229
1229
|
return n;
|
|
1230
1230
|
}
|
|
1231
|
-
function
|
|
1231
|
+
function On(e, t) {
|
|
1232
1232
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1233
1233
|
if (r != null) {
|
|
1234
1234
|
var n = [], i = !0, s = !1, o, u;
|
|
@@ -1247,28 +1247,28 @@ function _n(e, t) {
|
|
|
1247
1247
|
return n;
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function Sn(e) {
|
|
1251
1251
|
if (Array.isArray(e)) return e;
|
|
1252
1252
|
}
|
|
1253
|
-
var
|
|
1253
|
+
var $n = function(t) {
|
|
1254
1254
|
var r = {};
|
|
1255
1255
|
return this.items.forEach(function(n, i) {
|
|
1256
|
-
var s = t(n, i), o =
|
|
1256
|
+
var s = t(n, i), o = wn(s, 2), u = o[0], a = o[1];
|
|
1257
1257
|
r[u] === void 0 ? r[u] = [a] : r[u].push(a);
|
|
1258
1258
|
}), new this.constructor(r);
|
|
1259
|
-
},
|
|
1259
|
+
}, jn = function(t) {
|
|
1260
1260
|
return this.map(function(r, n) {
|
|
1261
1261
|
return new t(r, n);
|
|
1262
1262
|
});
|
|
1263
1263
|
};
|
|
1264
|
-
function
|
|
1265
|
-
return Pn(e) || Tn(e, t) ||
|
|
1264
|
+
function En(e, t) {
|
|
1265
|
+
return Pn(e) || Tn(e, t) || Cn(e, t) || In();
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1267
|
+
function In() {
|
|
1268
1268
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1269
1269
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1271
|
+
function Cn(e, t) {
|
|
1272
1272
|
if (e) {
|
|
1273
1273
|
if (typeof e == "string") return bt(e, t);
|
|
1274
1274
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1304,21 +1304,21 @@ function Tn(e, t) {
|
|
|
1304
1304
|
function Pn(e) {
|
|
1305
1305
|
if (Array.isArray(e)) return e;
|
|
1306
1306
|
}
|
|
1307
|
-
var
|
|
1307
|
+
var Fn = function(t) {
|
|
1308
1308
|
var r = {};
|
|
1309
1309
|
return this.items.forEach(function(n, i) {
|
|
1310
|
-
var s = t(n, i), o =
|
|
1310
|
+
var s = t(n, i), o = En(s, 2), u = o[0], a = o[1];
|
|
1311
1311
|
r[u] === void 0 ? r[u] = [a] : r[u].push(a);
|
|
1312
1312
|
}), new this.constructor(r);
|
|
1313
1313
|
};
|
|
1314
1314
|
function gt(e, t) {
|
|
1315
|
-
return
|
|
1315
|
+
return qn(e) || Bn(e, t) || Nn(e, t) || Dn();
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1317
|
+
function Dn() {
|
|
1318
1318
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1319
1319
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function Nn(e, t) {
|
|
1322
1322
|
if (e) {
|
|
1323
1323
|
if (typeof e == "string") return wt(e, t);
|
|
1324
1324
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1332,7 +1332,7 @@ function wt(e, t) {
|
|
|
1332
1332
|
n[r] = e[r];
|
|
1333
1333
|
return n;
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1335
|
+
function Bn(e, t) {
|
|
1336
1336
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1337
1337
|
if (r != null) {
|
|
1338
1338
|
var n = [], i = !0, s = !1, o, u;
|
|
@@ -1351,10 +1351,10 @@ function Nn(e, t) {
|
|
|
1351
1351
|
return n;
|
|
1352
1352
|
}
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1354
|
+
function qn(e) {
|
|
1355
1355
|
if (Array.isArray(e)) return e;
|
|
1356
1356
|
}
|
|
1357
|
-
var
|
|
1357
|
+
var xn = function(t) {
|
|
1358
1358
|
var r = this, n = {};
|
|
1359
1359
|
return Array.isArray(this.items) ? this.items.forEach(function(i, s) {
|
|
1360
1360
|
var o = t(i, s), u = gt(o, 2), a = u[0], c = u[1];
|
|
@@ -1365,13 +1365,13 @@ var qn = function(t) {
|
|
|
1365
1365
|
}), new this.constructor(n);
|
|
1366
1366
|
};
|
|
1367
1367
|
function At(e) {
|
|
1368
|
-
return
|
|
1368
|
+
return Rn(e) || Wn(e) || Un(e) || Kn();
|
|
1369
1369
|
}
|
|
1370
|
-
function
|
|
1370
|
+
function Kn() {
|
|
1371
1371
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1372
1372
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1374
|
+
function Un(e, t) {
|
|
1375
1375
|
if (e) {
|
|
1376
1376
|
if (typeof e == "string") return nt(e, t);
|
|
1377
1377
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1379,10 +1379,10 @@ function Kn(e, t) {
|
|
|
1379
1379
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return nt(e, t);
|
|
1380
1380
|
}
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1382
|
+
function Wn(e) {
|
|
1383
1383
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1384
1384
|
}
|
|
1385
|
-
function
|
|
1385
|
+
function Rn(e) {
|
|
1386
1386
|
if (Array.isArray(e)) return nt(e);
|
|
1387
1387
|
}
|
|
1388
1388
|
function nt(e, t) {
|
|
@@ -1391,7 +1391,7 @@ function nt(e, t) {
|
|
|
1391
1391
|
n[r] = e[r];
|
|
1392
1392
|
return n;
|
|
1393
1393
|
}
|
|
1394
|
-
var
|
|
1394
|
+
var Jn = function(t) {
|
|
1395
1395
|
if (typeof t == "string") {
|
|
1396
1396
|
var r = this.items.filter(function(n) {
|
|
1397
1397
|
return n[t] !== void 0;
|
|
@@ -1401,10 +1401,10 @@ var Rn = function(t) {
|
|
|
1401
1401
|
})));
|
|
1402
1402
|
}
|
|
1403
1403
|
return Math.max.apply(Math, At(this.items));
|
|
1404
|
-
},
|
|
1404
|
+
}, Mn = function(t) {
|
|
1405
1405
|
var r = this.items.length;
|
|
1406
1406
|
return t === void 0 ? r % 2 === 0 ? (this.items[r / 2 - 1] + this.items[r / 2]) / 2 : this.items[Math.floor(r / 2)] : r % 2 === 0 ? (this.items[r / 2 - 1][t] + this.items[r / 2][t]) / 2 : this.items[Math.floor(r / 2)][t];
|
|
1407
|
-
},
|
|
1407
|
+
}, Vn = function(t) {
|
|
1408
1408
|
var r = t;
|
|
1409
1409
|
if (typeof r == "string" && (r = [r]), Array.isArray(this.items) && Array.isArray(r))
|
|
1410
1410
|
return new this.constructor(this.items.concat(r));
|
|
@@ -1435,17 +1435,17 @@ function Ot(e) {
|
|
|
1435
1435
|
for (var t = 1; t < arguments.length; t++) {
|
|
1436
1436
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1437
1437
|
t % 2 ? _t(Object(r), !0).forEach(function(n) {
|
|
1438
|
-
|
|
1438
|
+
Ln(e, n, r[n]);
|
|
1439
1439
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : _t(Object(r)).forEach(function(n) {
|
|
1440
1440
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1441
1441
|
});
|
|
1442
1442
|
}
|
|
1443
1443
|
return e;
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1445
|
+
function Ln(e, t, r) {
|
|
1446
1446
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1447
1447
|
}
|
|
1448
|
-
var
|
|
1448
|
+
var Hn = function(t) {
|
|
1449
1449
|
var r = function n(i, s) {
|
|
1450
1450
|
var o = {}, u = Object.keys(Ot(Ot({}, i), s));
|
|
1451
1451
|
return u.forEach(function(a) {
|
|
@@ -1455,13 +1455,13 @@ var Ln = function(t) {
|
|
|
1455
1455
|
return t ? t.constructor.name === "Collection" ? new this.constructor(r(this.items, t.all())) : new this.constructor(r(this.items, t)) : this;
|
|
1456
1456
|
};
|
|
1457
1457
|
function St(e) {
|
|
1458
|
-
return
|
|
1458
|
+
return Xn(e) || zn(e) || Qn(e) || Gn();
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1460
|
+
function Gn() {
|
|
1461
1461
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1462
1462
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1464
|
+
function Qn(e, t) {
|
|
1465
1465
|
if (e) {
|
|
1466
1466
|
if (typeof e == "string") return it(e, t);
|
|
1467
1467
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1469,10 +1469,10 @@ function Gn(e, t) {
|
|
|
1469
1469
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return it(e, t);
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function zn(e) {
|
|
1473
1473
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1474
1474
|
}
|
|
1475
|
-
function
|
|
1475
|
+
function Xn(e) {
|
|
1476
1476
|
if (Array.isArray(e)) return it(e);
|
|
1477
1477
|
}
|
|
1478
1478
|
function it(e, t) {
|
|
@@ -1481,7 +1481,7 @@ function it(e, t) {
|
|
|
1481
1481
|
n[r] = e[r];
|
|
1482
1482
|
return n;
|
|
1483
1483
|
}
|
|
1484
|
-
var
|
|
1484
|
+
var Yn = function(t) {
|
|
1485
1485
|
if (t !== void 0) {
|
|
1486
1486
|
var r = this.items.filter(function(n) {
|
|
1487
1487
|
return n[t] !== void 0;
|
|
@@ -1491,7 +1491,7 @@ var Xn = function(t) {
|
|
|
1491
1491
|
})));
|
|
1492
1492
|
}
|
|
1493
1493
|
return Math.min.apply(Math, St(this.items));
|
|
1494
|
-
},
|
|
1494
|
+
}, Zn = function(t) {
|
|
1495
1495
|
var r = [], n = 1;
|
|
1496
1496
|
return this.items.length ? (this.items.forEach(function(i) {
|
|
1497
1497
|
var s = r.filter(function(u) {
|
|
@@ -1515,15 +1515,15 @@ var Xn = function(t) {
|
|
|
1515
1515
|
}).map(function(i) {
|
|
1516
1516
|
return i.key;
|
|
1517
1517
|
})) : null;
|
|
1518
|
-
},
|
|
1519
|
-
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n =
|
|
1518
|
+
}, kn = $, ti = function(t) {
|
|
1519
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = kn(this.items), i = n.slice(r).filter(function(s, o) {
|
|
1520
1520
|
return o % t === 0;
|
|
1521
1521
|
});
|
|
1522
1522
|
return new this.constructor(i);
|
|
1523
|
-
},
|
|
1523
|
+
}, ri = U, ei = function() {
|
|
1524
1524
|
for (var t = this, r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
1525
1525
|
n[i] = arguments[i];
|
|
1526
|
-
var s =
|
|
1526
|
+
var s = ri(n);
|
|
1527
1527
|
if (Array.isArray(this.items)) {
|
|
1528
1528
|
var o = this.items.filter(function(a) {
|
|
1529
1529
|
return s.indexOf(a) !== -1;
|
|
@@ -1534,14 +1534,14 @@ var Xn = function(t) {
|
|
|
1534
1534
|
return Object.keys(this.items).forEach(function(a) {
|
|
1535
1535
|
s.indexOf(a) !== -1 && (u[a] = t.items[a]);
|
|
1536
1536
|
}), new this.constructor(u);
|
|
1537
|
-
},
|
|
1537
|
+
}, ni = Rt, ii = function(t, r) {
|
|
1538
1538
|
var n = Math.abs(t), i = this.count();
|
|
1539
1539
|
if (n <= i)
|
|
1540
1540
|
return this;
|
|
1541
|
-
for (var s = n - i, o =
|
|
1541
|
+
for (var s = n - i, o = ni(this.items), u = Array.isArray(this.items), a = t < 0, c = 0; c < s; )
|
|
1542
1542
|
u ? a ? o.unshift(r) : o.push(r) : o[c] !== void 0 ? s += 1 : o[c] = r, c += 1;
|
|
1543
1543
|
return new this.constructor(o);
|
|
1544
|
-
},
|
|
1544
|
+
}, si = function(t) {
|
|
1545
1545
|
var r = this, n;
|
|
1546
1546
|
return Array.isArray(this.items) ? (n = [new this.constructor([]), new this.constructor([])], this.items.forEach(function(i) {
|
|
1547
1547
|
t(i) === !0 ? n[0].push(i) : n[1].push(i);
|
|
@@ -1549,23 +1549,23 @@ var Xn = function(t) {
|
|
|
1549
1549
|
var s = r.items[i];
|
|
1550
1550
|
t(s) === !0 ? n[0].put(i, s) : n[1].put(i, s);
|
|
1551
1551
|
})), new this.constructor(n);
|
|
1552
|
-
},
|
|
1552
|
+
}, oi = function(t) {
|
|
1553
1553
|
return t(this);
|
|
1554
|
-
}, Lt = d,
|
|
1554
|
+
}, Lt = d, ai = Lt.isArray, ui = Lt.isObject, F = j, ci = function(t) {
|
|
1555
1555
|
var r = {};
|
|
1556
1556
|
return t.forEach(function(n, i) {
|
|
1557
1557
|
function s(o, u) {
|
|
1558
|
-
|
|
1558
|
+
ui(o) ? Object.keys(o).forEach(function(a) {
|
|
1559
1559
|
s(o[a], "".concat(u, ".").concat(a));
|
|
1560
|
-
}) :
|
|
1560
|
+
}) : ai(o) && o.forEach(function(a, c) {
|
|
1561
1561
|
s(a, "".concat(u, ".").concat(c));
|
|
1562
1562
|
}), r[u] = o;
|
|
1563
1563
|
}
|
|
1564
1564
|
s(n, i);
|
|
1565
1565
|
}), r;
|
|
1566
|
-
},
|
|
1566
|
+
}, fi = function(t, r) {
|
|
1567
1567
|
if (t.indexOf("*") !== -1) {
|
|
1568
|
-
var n =
|
|
1568
|
+
var n = ci(this.items), i = [];
|
|
1569
1569
|
if (r !== void 0) {
|
|
1570
1570
|
var s = new RegExp("0.".concat(r), "g"), o = "0.".concat(r).split(".").length;
|
|
1571
1571
|
Object.keys(n).forEach(function(f) {
|
|
@@ -1600,19 +1600,19 @@ var Xn = function(t) {
|
|
|
1600
1600
|
return this.map(function(f) {
|
|
1601
1601
|
return F(f, t) !== void 0 ? F(f, t) : null;
|
|
1602
1602
|
});
|
|
1603
|
-
},
|
|
1603
|
+
}, li = U, Ht = function(t) {
|
|
1604
1604
|
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
1605
1605
|
n[i - 1] = arguments[i];
|
|
1606
|
-
|
|
1606
|
+
li(n).forEach(function(s) {
|
|
1607
1607
|
delete t[s];
|
|
1608
1608
|
});
|
|
1609
|
-
}, Gt = d,
|
|
1609
|
+
}, Gt = d, hi = Gt.isArray, pi = Gt.isObject, $t = Ht, yi = function() {
|
|
1610
1610
|
var t = this, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
|
|
1611
1611
|
if (this.isEmpty())
|
|
1612
1612
|
return null;
|
|
1613
|
-
if (
|
|
1613
|
+
if (hi(this.items))
|
|
1614
1614
|
return r === 1 ? this.items.pop() : new this.constructor(this.items.splice(-r));
|
|
1615
|
-
if (
|
|
1615
|
+
if (pi(this.items)) {
|
|
1616
1616
|
var n = Object.keys(this.items);
|
|
1617
1617
|
if (r === 1) {
|
|
1618
1618
|
var i = n[n.length - 1], s = this.items[i];
|
|
@@ -1624,27 +1624,27 @@ var Xn = function(t) {
|
|
|
1624
1624
|
return $t(this.items, o), new this.constructor(u);
|
|
1625
1625
|
}
|
|
1626
1626
|
return null;
|
|
1627
|
-
},
|
|
1627
|
+
}, mi = function(t, r) {
|
|
1628
1628
|
return r !== void 0 ? this.put(r, t) : (this.items.unshift(t), this);
|
|
1629
|
-
},
|
|
1629
|
+
}, di = d, vi = di.isFunction, bi = function(t, r) {
|
|
1630
1630
|
var n = this.items[t] || null;
|
|
1631
|
-
return !n && r !== void 0 && (
|
|
1632
|
-
},
|
|
1631
|
+
return !n && r !== void 0 && (vi(r) ? n = r() : n = r), delete this.items[t], n;
|
|
1632
|
+
}, gi = function() {
|
|
1633
1633
|
var t;
|
|
1634
1634
|
return (t = this.items).push.apply(t, arguments), this;
|
|
1635
|
-
},
|
|
1635
|
+
}, wi = function(t, r) {
|
|
1636
1636
|
return this.items[t] = r, this;
|
|
1637
|
-
},
|
|
1638
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, r =
|
|
1637
|
+
}, Ai = $, _i = function() {
|
|
1638
|
+
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, r = Ai(this.items), n = new this.constructor(r).shuffle();
|
|
1639
1639
|
return t !== parseInt(t, 10) ? n.first() : n.take(t);
|
|
1640
|
-
},
|
|
1640
|
+
}, Oi = function(t, r) {
|
|
1641
1641
|
var n = this, i = null;
|
|
1642
1642
|
return r !== void 0 && (i = r), Array.isArray(this.items) ? this.items.forEach(function(s) {
|
|
1643
1643
|
i = t(i, s);
|
|
1644
1644
|
}) : Object.keys(this.items).forEach(function(s) {
|
|
1645
1645
|
i = t(i, n.items[s], s);
|
|
1646
1646
|
}), i;
|
|
1647
|
-
},
|
|
1647
|
+
}, Si = function(t) {
|
|
1648
1648
|
return new this.constructor(this.items).filter(function(r) {
|
|
1649
1649
|
return !t(r);
|
|
1650
1650
|
});
|
|
@@ -1663,17 +1663,17 @@ function D(e) {
|
|
|
1663
1663
|
for (var t = 1; t < arguments.length; t++) {
|
|
1664
1664
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1665
1665
|
t % 2 ? jt(Object(r), !0).forEach(function(n) {
|
|
1666
|
-
|
|
1666
|
+
$i(e, n, r[n]);
|
|
1667
1667
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : jt(Object(r)).forEach(function(n) {
|
|
1668
1668
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1669
1669
|
});
|
|
1670
1670
|
}
|
|
1671
1671
|
return e;
|
|
1672
1672
|
}
|
|
1673
|
-
function
|
|
1673
|
+
function $i(e, t, r) {
|
|
1674
1674
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1675
1675
|
}
|
|
1676
|
-
var
|
|
1676
|
+
var ji = function(t) {
|
|
1677
1677
|
if (!t)
|
|
1678
1678
|
return this;
|
|
1679
1679
|
if (Array.isArray(t)) {
|
|
@@ -1707,45 +1707,45 @@ function Et(e, t) {
|
|
|
1707
1707
|
}
|
|
1708
1708
|
return r;
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1710
|
+
function T(e) {
|
|
1711
1711
|
for (var t = 1; t < arguments.length; t++) {
|
|
1712
1712
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1713
1713
|
t % 2 ? Et(Object(r), !0).forEach(function(n) {
|
|
1714
|
-
|
|
1714
|
+
Ei(e, n, r[n]);
|
|
1715
1715
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Et(Object(r)).forEach(function(n) {
|
|
1716
1716
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1717
1717
|
});
|
|
1718
1718
|
}
|
|
1719
1719
|
return e;
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1721
|
+
function Ei(e, t, r) {
|
|
1722
1722
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1723
1723
|
}
|
|
1724
|
-
var
|
|
1724
|
+
var Ii = function(t) {
|
|
1725
1725
|
var r = function n(i, s) {
|
|
1726
|
-
var o =
|
|
1726
|
+
var o = T({}, i), u = Object.keys(T(T({}, i), s));
|
|
1727
1727
|
return u.forEach(function(a) {
|
|
1728
|
-
!Array.isArray(s[a]) && I(s[a]) === "object" ? o[a] = n(i[a], s[a]) : i[a] === void 0 && s[a] !== void 0 ? I(i[a]) === "object" ? o[a] =
|
|
1728
|
+
!Array.isArray(s[a]) && I(s[a]) === "object" ? o[a] = n(i[a], s[a]) : i[a] === void 0 && s[a] !== void 0 ? I(i[a]) === "object" ? o[a] = T({}, s[a]) : o[a] = s[a] : i[a] !== void 0 && s[a] === void 0 ? I(i[a]) === "object" ? o[a] = T({}, i[a]) : o[a] = i[a] : i[a] !== void 0 && s[a] !== void 0 && (I(s[a]) === "object" ? o[a] = T({}, s[a]) : o[a] = s[a]);
|
|
1729
1729
|
}), o;
|
|
1730
1730
|
};
|
|
1731
1731
|
return t ? !Array.isArray(t) && I(t) !== "object" ? new this.constructor(r(this.items, [t])) : t.constructor.name === "Collection" ? new this.constructor(r(this.items, t.all())) : new this.constructor(r(this.items, t)) : this;
|
|
1732
|
-
},
|
|
1732
|
+
}, Ci = function() {
|
|
1733
1733
|
var t = [].concat(this.items).reverse();
|
|
1734
1734
|
return new this.constructor(t);
|
|
1735
|
-
}, ut = d, Ti = ut.isArray, Pi = ut.isObject,
|
|
1735
|
+
}, ut = d, Ti = ut.isArray, Pi = ut.isObject, Fi = ut.isFunction, Di = function(t, r) {
|
|
1736
1736
|
var n = this, i, s = function(u, a) {
|
|
1737
|
-
return
|
|
1737
|
+
return Fi(t) ? t(n.items[a], a) : r ? n.items[a] === t : n.items[a] == t;
|
|
1738
1738
|
};
|
|
1739
1739
|
return Ti(this.items) ? i = this.items.findIndex(s) : Pi(this.items) && (i = Object.keys(this.items).find(function(o) {
|
|
1740
1740
|
return s(n.items[o], o);
|
|
1741
1741
|
})), i === void 0 || i < 0 ? !1 : i;
|
|
1742
|
-
}, Qt = d,
|
|
1742
|
+
}, Qt = d, Ni = Qt.isArray, Bi = Qt.isObject, qi = Ht, xi = function() {
|
|
1743
1743
|
var t = this, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
|
|
1744
1744
|
if (this.isEmpty())
|
|
1745
1745
|
return null;
|
|
1746
|
-
if (
|
|
1746
|
+
if (Ni(this.items))
|
|
1747
1747
|
return r === 1 ? this.items.shift() : new this.constructor(this.items.splice(0, r));
|
|
1748
|
-
if (
|
|
1748
|
+
if (Bi(this.items)) {
|
|
1749
1749
|
if (r === 1) {
|
|
1750
1750
|
var n = Object.keys(this.items)[0], i = this.items[n];
|
|
1751
1751
|
return delete this.items[n], i;
|
|
@@ -1753,92 +1753,92 @@ var Ei = function(t) {
|
|
|
1753
1753
|
var s = Object.keys(this.items), o = s.slice(0, r), u = o.reduce(function(a, c) {
|
|
1754
1754
|
return a[c] = t.items[c], a;
|
|
1755
1755
|
}, {});
|
|
1756
|
-
return
|
|
1756
|
+
return qi(this.items, o), new this.constructor(u);
|
|
1757
1757
|
}
|
|
1758
1758
|
return null;
|
|
1759
|
-
},
|
|
1760
|
-
var t =
|
|
1759
|
+
}, Ki = $, Ui = function() {
|
|
1760
|
+
var t = Ki(this.items), r, n, i;
|
|
1761
1761
|
for (i = t.length; i; i -= 1)
|
|
1762
1762
|
r = Math.floor(Math.random() * i), n = t[i - 1], t[i - 1] = t[r], t[r] = n;
|
|
1763
1763
|
return this.items = t, this;
|
|
1764
|
-
},
|
|
1764
|
+
}, Wi = d, Ri = Wi.isObject, Ji = function(t) {
|
|
1765
1765
|
var r = this;
|
|
1766
|
-
return
|
|
1766
|
+
return Ri(this.items) ? new this.constructor(Object.keys(this.items).reduce(function(n, i, s) {
|
|
1767
1767
|
return s + 1 > t && (n[i] = r.items[i]), n;
|
|
1768
1768
|
}, {})) : new this.constructor(this.items.slice(t));
|
|
1769
|
-
}, ct = d,
|
|
1769
|
+
}, ct = d, Mi = ct.isArray, Vi = ct.isObject, Li = ct.isFunction, Hi = function(t) {
|
|
1770
1770
|
var r = this, n = null, i, s = function(u) {
|
|
1771
1771
|
return u === t;
|
|
1772
1772
|
};
|
|
1773
|
-
return
|
|
1773
|
+
return Li(t) && (s = t), Mi(this.items) && (i = this.items.filter(function(o) {
|
|
1774
1774
|
return n !== !0 && (n = s(o)), n;
|
|
1775
|
-
})),
|
|
1775
|
+
})), Vi(this.items) && (i = Object.keys(this.items).reduce(function(o, u) {
|
|
1776
1776
|
return n !== !0 && (n = s(r.items[u])), n !== !1 && (o[u] = r.items[u]), o;
|
|
1777
1777
|
}, {})), new this.constructor(i);
|
|
1778
|
-
}, ft = d,
|
|
1778
|
+
}, ft = d, Gi = ft.isArray, Qi = ft.isObject, zi = ft.isFunction, Xi = function(t) {
|
|
1779
1779
|
var r = this, n = null, i, s = function(u) {
|
|
1780
1780
|
return u === t;
|
|
1781
1781
|
};
|
|
1782
|
-
return
|
|
1782
|
+
return zi(t) && (s = t), Gi(this.items) && (i = this.items.filter(function(o) {
|
|
1783
1783
|
return n !== !0 && (n = !s(o)), n;
|
|
1784
|
-
})),
|
|
1784
|
+
})), Qi(this.items) && (i = Object.keys(this.items).reduce(function(o, u) {
|
|
1785
1785
|
return n !== !0 && (n = !s(r.items[u])), n !== !1 && (o[u] = r.items[u]), o;
|
|
1786
1786
|
}, {})), new this.constructor(i);
|
|
1787
|
-
},
|
|
1787
|
+
}, Yi = function(t, r) {
|
|
1788
1788
|
var n = this.items.slice(t);
|
|
1789
1789
|
return r !== void 0 && (n = n.slice(0, r)), new this.constructor(n);
|
|
1790
|
-
},
|
|
1790
|
+
}, Zi = d, ki = Zi.isFunction, ts = function(t, r, n) {
|
|
1791
1791
|
var i;
|
|
1792
|
-
if (
|
|
1792
|
+
if (ki(t) ? i = this.filter(t) : i = this.where(t, r, n), i.isEmpty())
|
|
1793
1793
|
throw new Error("Item not found.");
|
|
1794
1794
|
if (i.count() > 1)
|
|
1795
1795
|
throw new Error("Multiple items found.");
|
|
1796
1796
|
return i.first();
|
|
1797
|
-
},
|
|
1797
|
+
}, rs = Jt, es = rs, ns = function(t) {
|
|
1798
1798
|
var r = [].concat(this.items);
|
|
1799
1799
|
return t === void 0 ? this.every(function(n) {
|
|
1800
1800
|
return typeof n == "number";
|
|
1801
1801
|
}) ? r.sort(function(n, i) {
|
|
1802
1802
|
return n - i;
|
|
1803
1803
|
}) : r.sort() : r.sort(t), new this.constructor(r);
|
|
1804
|
-
},
|
|
1804
|
+
}, is = function() {
|
|
1805
1805
|
return this.sort().reverse();
|
|
1806
|
-
},
|
|
1806
|
+
}, ss = j, os = d, as = os.isFunction, us = function(t) {
|
|
1807
1807
|
var r = [].concat(this.items), n = function(s) {
|
|
1808
|
-
return
|
|
1808
|
+
return as(t) ? t(s) : ss(s, t);
|
|
1809
1809
|
};
|
|
1810
1810
|
return r.sort(function(i, s) {
|
|
1811
1811
|
var o = n(i), u = n(s);
|
|
1812
1812
|
return o == null ? 1 : u == null || o < u ? -1 : o > u ? 1 : 0;
|
|
1813
1813
|
}), new this.constructor(r);
|
|
1814
|
-
},
|
|
1814
|
+
}, cs = function(t) {
|
|
1815
1815
|
return this.sortBy(t).reverse();
|
|
1816
|
-
},
|
|
1816
|
+
}, fs = function() {
|
|
1817
1817
|
var t = this, r = {};
|
|
1818
1818
|
return Object.keys(this.items).sort().forEach(function(n) {
|
|
1819
1819
|
r[n] = t.items[n];
|
|
1820
1820
|
}), new this.constructor(r);
|
|
1821
|
-
},
|
|
1821
|
+
}, ls = function() {
|
|
1822
1822
|
var t = this, r = {};
|
|
1823
1823
|
return Object.keys(this.items).sort().reverse().forEach(function(n) {
|
|
1824
1824
|
r[n] = t.items[n];
|
|
1825
1825
|
}), new this.constructor(r);
|
|
1826
|
-
},
|
|
1826
|
+
}, hs = function(t, r, n) {
|
|
1827
1827
|
var i = this.slice(t, r);
|
|
1828
1828
|
if (this.items = this.diff(i.all()).all(), Array.isArray(n))
|
|
1829
1829
|
for (var s = 0, o = n.length; s < o; s += 1)
|
|
1830
1830
|
this.items.splice(t + s, 0, n[s]);
|
|
1831
1831
|
return i;
|
|
1832
|
-
},
|
|
1832
|
+
}, ps = function(t) {
|
|
1833
1833
|
for (var r = Math.round(this.items.length / t), n = JSON.parse(JSON.stringify(this.items)), i = [], s = 0; s < t; s += 1)
|
|
1834
1834
|
i.push(new this.constructor(n.splice(0, r)));
|
|
1835
1835
|
return new this.constructor(i);
|
|
1836
|
-
},
|
|
1837
|
-
var r =
|
|
1836
|
+
}, ys = $, ms = d, ds = ms.isFunction, vs = function(t) {
|
|
1837
|
+
var r = ys(this.items), n = 0;
|
|
1838
1838
|
if (t === void 0)
|
|
1839
1839
|
for (var i = 0, s = r.length; i < s; i += 1)
|
|
1840
1840
|
n += parseFloat(r[i]);
|
|
1841
|
-
else if (
|
|
1841
|
+
else if (ds(t))
|
|
1842
1842
|
for (var o = 0, u = r.length; o < u; o += 1)
|
|
1843
1843
|
n += parseFloat(t(r[o]));
|
|
1844
1844
|
else
|
|
@@ -1854,7 +1854,7 @@ function st(e) {
|
|
|
1854
1854
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1855
1855
|
}, st(e);
|
|
1856
1856
|
}
|
|
1857
|
-
var
|
|
1857
|
+
var bs = function(t) {
|
|
1858
1858
|
var r = this;
|
|
1859
1859
|
if (!Array.isArray(this.items) && st(this.items) === "object") {
|
|
1860
1860
|
var n = Object.keys(this.items), i;
|
|
@@ -1865,31 +1865,31 @@ var vs = function(t) {
|
|
|
1865
1865
|
}), new this.constructor(s);
|
|
1866
1866
|
}
|
|
1867
1867
|
return t < 0 ? new this.constructor(this.items.slice(t)) : new this.constructor(this.items.slice(0, t));
|
|
1868
|
-
}, lt = d,
|
|
1868
|
+
}, lt = d, gs = lt.isArray, ws = lt.isObject, As = lt.isFunction, _s = function(t) {
|
|
1869
1869
|
var r = this, n = null, i, s = function(u) {
|
|
1870
1870
|
return u === t;
|
|
1871
1871
|
};
|
|
1872
|
-
return
|
|
1872
|
+
return As(t) && (s = t), gs(this.items) && (i = this.items.filter(function(o) {
|
|
1873
1873
|
return n !== !1 && (n = !s(o)), n;
|
|
1874
|
-
})),
|
|
1874
|
+
})), ws(this.items) && (i = Object.keys(this.items).reduce(function(o, u) {
|
|
1875
1875
|
return n !== !1 && (n = !s(r.items[u])), n !== !1 && (o[u] = r.items[u]), o;
|
|
1876
1876
|
}, {})), new this.constructor(i);
|
|
1877
|
-
}, ht = d,
|
|
1877
|
+
}, ht = d, Os = ht.isArray, Ss = ht.isObject, $s = ht.isFunction, js = function(t) {
|
|
1878
1878
|
var r = this, n = null, i, s = function(u) {
|
|
1879
1879
|
return u === t;
|
|
1880
1880
|
};
|
|
1881
|
-
return
|
|
1881
|
+
return $s(t) && (s = t), Os(this.items) && (i = this.items.filter(function(o) {
|
|
1882
1882
|
return n !== !1 && (n = s(o)), n;
|
|
1883
|
-
})),
|
|
1883
|
+
})), Ss(this.items) && (i = Object.keys(this.items).reduce(function(o, u) {
|
|
1884
1884
|
return n !== !1 && (n = s(r.items[u])), n !== !1 && (o[u] = r.items[u]), o;
|
|
1885
1885
|
}, {})), new this.constructor(i);
|
|
1886
|
-
},
|
|
1886
|
+
}, Es = function(t) {
|
|
1887
1887
|
return t(this), this;
|
|
1888
|
-
},
|
|
1888
|
+
}, Is = function(t, r) {
|
|
1889
1889
|
for (var n = 1; n <= t; n += 1)
|
|
1890
1890
|
this.items.push(r(n));
|
|
1891
1891
|
return this;
|
|
1892
|
-
},
|
|
1892
|
+
}, Cs = function() {
|
|
1893
1893
|
var t = this.constructor;
|
|
1894
1894
|
function r(i, s) {
|
|
1895
1895
|
var o = [];
|
|
@@ -1939,21 +1939,21 @@ function It(e, t) {
|
|
|
1939
1939
|
}
|
|
1940
1940
|
return r;
|
|
1941
1941
|
}
|
|
1942
|
-
function
|
|
1942
|
+
function Ct(e) {
|
|
1943
1943
|
for (var t = 1; t < arguments.length; t++) {
|
|
1944
1944
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1945
1945
|
t % 2 ? It(Object(r), !0).forEach(function(n) {
|
|
1946
|
-
|
|
1946
|
+
Fs(e, n, r[n]);
|
|
1947
1947
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : It(Object(r)).forEach(function(n) {
|
|
1948
1948
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1949
1949
|
});
|
|
1950
1950
|
}
|
|
1951
1951
|
return e;
|
|
1952
1952
|
}
|
|
1953
|
-
function
|
|
1953
|
+
function Fs(e, t, r) {
|
|
1954
1954
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1955
1955
|
}
|
|
1956
|
-
var
|
|
1956
|
+
var Ds = function() {
|
|
1957
1957
|
var t = this;
|
|
1958
1958
|
if (Array.isArray(this.items))
|
|
1959
1959
|
return this;
|
|
@@ -1963,13 +1963,13 @@ var Fs = function() {
|
|
|
1963
1963
|
var i = r;
|
|
1964
1964
|
n.split(".").reduce(function(s, o, u, a) {
|
|
1965
1965
|
return s[o] || (s[o] = {}), u === a.length - 1 && (s[o] = t.items[n]), s[o];
|
|
1966
|
-
}, i), r =
|
|
1966
|
+
}, i), r = Ct(Ct({}, r), i);
|
|
1967
1967
|
} else
|
|
1968
1968
|
r[n] = t.items[n];
|
|
1969
1969
|
}), new this.constructor(r);
|
|
1970
|
-
},
|
|
1970
|
+
}, Ns = function(t, r, n) {
|
|
1971
1971
|
t ? n(this) : r(this);
|
|
1972
|
-
},
|
|
1972
|
+
}, Tt = function(t, r) {
|
|
1973
1973
|
if (Array.isArray(this.items) && this.items.length)
|
|
1974
1974
|
return t(this);
|
|
1975
1975
|
if (Object.keys(this.items).length)
|
|
@@ -1981,7 +1981,7 @@ var Fs = function() {
|
|
|
1981
1981
|
return r(this);
|
|
1982
1982
|
}
|
|
1983
1983
|
return this;
|
|
1984
|
-
},
|
|
1984
|
+
}, Pt = function(t, r) {
|
|
1985
1985
|
if (Array.isArray(this.items) && !this.items.length)
|
|
1986
1986
|
return t(this);
|
|
1987
1987
|
if (!Object.keys(this.items).length)
|
|
@@ -1993,12 +1993,12 @@ var Fs = function() {
|
|
|
1993
1993
|
return r(this);
|
|
1994
1994
|
}
|
|
1995
1995
|
return this;
|
|
1996
|
-
},
|
|
1996
|
+
}, Bs = function(t) {
|
|
1997
1997
|
var r = this, n = JSON.parse(JSON.stringify(this.items));
|
|
1998
1998
|
return Object.keys(t).forEach(function(i) {
|
|
1999
1999
|
r.items[i] === void 0 && (n[i] = t[i]);
|
|
2000
2000
|
}), new this.constructor(n);
|
|
2001
|
-
},
|
|
2001
|
+
}, qs = d, xs = qs.isFunction, Ks = function(t) {
|
|
2002
2002
|
var r;
|
|
2003
2003
|
if (t === void 0)
|
|
2004
2004
|
r = this.items.filter(function(u, a, c) {
|
|
@@ -2008,18 +2008,18 @@ var Fs = function() {
|
|
|
2008
2008
|
r = [];
|
|
2009
2009
|
for (var n = [], i = 0, s = this.items.length; i < s; i += 1) {
|
|
2010
2010
|
var o = void 0;
|
|
2011
|
-
|
|
2011
|
+
xs(t) ? o = t(this.items[i]) : o = this.items[i][t], n.indexOf(o) === -1 && (r.push(this.items[i]), n.push(o));
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
2014
2014
|
return new this.constructor(r);
|
|
2015
|
-
},
|
|
2015
|
+
}, Us = function(t) {
|
|
2016
2016
|
return t instanceof this.constructor ? t.all() : t;
|
|
2017
|
-
},
|
|
2018
|
-
return new this.constructor(
|
|
2019
|
-
},
|
|
2017
|
+
}, Ws = $, Rs = function() {
|
|
2018
|
+
return new this.constructor(Ws(this.items));
|
|
2019
|
+
}, Js = function(t, r, n) {
|
|
2020
2020
|
return t ? r(this, t) : n ? n(this, t) : this;
|
|
2021
|
-
},
|
|
2022
|
-
var i = r, s = n, o =
|
|
2021
|
+
}, Ms = $, _ = j, Vs = function(t, r, n) {
|
|
2022
|
+
var i = r, s = n, o = Ms(this.items);
|
|
2023
2023
|
if (r === void 0 || r === !0)
|
|
2024
2024
|
return new this.constructor(o.filter(function(a) {
|
|
2025
2025
|
return _(a, t);
|
|
@@ -2052,30 +2052,30 @@ var Fs = function() {
|
|
|
2052
2052
|
}
|
|
2053
2053
|
});
|
|
2054
2054
|
return new this.constructor(u);
|
|
2055
|
-
},
|
|
2055
|
+
}, Ls = function(t, r) {
|
|
2056
2056
|
return this.where(t, ">=", r[0]).where(t, "<=", r[r.length - 1]);
|
|
2057
|
-
},
|
|
2058
|
-
var n =
|
|
2059
|
-
return n.indexOf(
|
|
2057
|
+
}, Hs = $, Gs = j, Qs = function(t, r) {
|
|
2058
|
+
var n = Hs(r), i = this.items.filter(function(s) {
|
|
2059
|
+
return n.indexOf(Gs(s, t)) !== -1;
|
|
2060
2060
|
});
|
|
2061
2061
|
return new this.constructor(i);
|
|
2062
|
-
},
|
|
2062
|
+
}, zs = function(t) {
|
|
2063
2063
|
return this.filter(function(r) {
|
|
2064
2064
|
return r instanceof t;
|
|
2065
2065
|
});
|
|
2066
|
-
}, Ft = j,
|
|
2066
|
+
}, Ft = j, Xs = function(t, r) {
|
|
2067
2067
|
return this.filter(function(n) {
|
|
2068
2068
|
return Ft(n, t) < r[0] || Ft(n, t) > r[r.length - 1];
|
|
2069
2069
|
});
|
|
2070
|
-
},
|
|
2071
|
-
var n =
|
|
2072
|
-
return n.indexOf(
|
|
2070
|
+
}, Ys = $, Zs = j, ks = function(t, r) {
|
|
2071
|
+
var n = Ys(r), i = this.items.filter(function(s) {
|
|
2072
|
+
return n.indexOf(Zs(s, t)) === -1;
|
|
2073
2073
|
});
|
|
2074
2074
|
return new this.constructor(i);
|
|
2075
|
-
},
|
|
2075
|
+
}, to = function() {
|
|
2076
2076
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
2077
2077
|
return this.where(t, "===", null);
|
|
2078
|
-
},
|
|
2078
|
+
}, ro = function() {
|
|
2079
2079
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
2080
2080
|
return this.where(t, "!==", null);
|
|
2081
2081
|
};
|
|
@@ -2087,9 +2087,9 @@ function at(e) {
|
|
|
2087
2087
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2088
2088
|
}, at(e);
|
|
2089
2089
|
}
|
|
2090
|
-
var
|
|
2090
|
+
var eo = function(t) {
|
|
2091
2091
|
return t instanceof this.constructor ? t : at(t) === "object" ? new this.constructor(t) : new this.constructor([t]);
|
|
2092
|
-
},
|
|
2092
|
+
}, no = function(t) {
|
|
2093
2093
|
var r = this, n = t;
|
|
2094
2094
|
n instanceof this.constructor && (n = n.all());
|
|
2095
2095
|
var i = this.items.map(function(s, o) {
|
|
@@ -2109,17 +2109,17 @@ var ro = function(t) {
|
|
|
2109
2109
|
function r(s) {
|
|
2110
2110
|
s !== void 0 && !Array.isArray(s) && t(s) !== "object" ? this.items = [s] : s instanceof this.constructor ? this.items = s.all() : this.items = s || [];
|
|
2111
2111
|
}
|
|
2112
|
-
var n =
|
|
2112
|
+
var n = _r;
|
|
2113
2113
|
typeof Symbol < "u" && (r.prototype[Symbol.iterator] = n), r.prototype.toJSON = function() {
|
|
2114
2114
|
return this.items;
|
|
2115
|
-
}, r.prototype.all =
|
|
2115
|
+
}, r.prototype.all = Or, r.prototype.average = Wt, r.prototype.avg = Er, r.prototype.chunk = Ir, r.prototype.collapse = Nr, r.prototype.combine = Wr, r.prototype.concat = Gr, r.prototype.contains = Jt, r.prototype.containsOneItem = oe, r.prototype.count = ae, r.prototype.countBy = ue, r.prototype.crossJoin = ce, r.prototype.dd = fe, r.prototype.diff = le, r.prototype.diffAssoc = he, r.prototype.diffKeys = pe, r.prototype.diffUsing = ye, r.prototype.doesntContain = me, r.prototype.dump = de, r.prototype.duplicates = ve, r.prototype.each = be, r.prototype.eachSpread = Se, r.prototype.every = je, r.prototype.except = Ie, r.prototype.filter = Pe, r.prototype.first = De, r.prototype.firstOrFail = qe, r.prototype.firstWhere = xe, r.prototype.flatMap = Ke, r.prototype.flatten = Ue, r.prototype.flip = We, r.prototype.forPage = Re, r.prototype.forget = Je, r.prototype.get = Le, r.prototype.groupBy = Qe, r.prototype.has = Xe, r.prototype.implode = Ye, r.prototype.intersect = Ze, r.prototype.intersectByKeys = ke, r.prototype.isEmpty = tn, r.prototype.isNotEmpty = rn, r.prototype.join = en, r.prototype.keyBy = an, r.prototype.keys = un, r.prototype.last = fn, r.prototype.macro = ln, r.prototype.make = hn, r.prototype.map = pn, r.prototype.mapSpread = gn, r.prototype.mapToDictionary = $n, r.prototype.mapInto = jn, r.prototype.mapToGroups = Fn, r.prototype.mapWithKeys = xn, r.prototype.max = Jn, r.prototype.median = Mn, r.prototype.merge = Vn, r.prototype.mergeRecursive = Hn, r.prototype.min = Yn, r.prototype.mode = Zn, r.prototype.nth = ti, r.prototype.only = ei, r.prototype.pad = ii, r.prototype.partition = si, r.prototype.pipe = oi, r.prototype.pluck = fi, r.prototype.pop = yi, r.prototype.prepend = mi, r.prototype.pull = bi, r.prototype.push = gi, r.prototype.put = wi, r.prototype.random = _i, r.prototype.reduce = Oi, r.prototype.reject = Si, r.prototype.replace = ji, r.prototype.replaceRecursive = Ii, r.prototype.reverse = Ci, r.prototype.search = Di, r.prototype.shift = xi, r.prototype.shuffle = Ui, r.prototype.skip = Ji, r.prototype.skipUntil = Hi, r.prototype.skipWhile = Xi, r.prototype.slice = Yi, r.prototype.sole = ts, r.prototype.some = es, r.prototype.sort = ns, r.prototype.sortDesc = is, r.prototype.sortBy = us, r.prototype.sortByDesc = cs, r.prototype.sortKeys = fs, r.prototype.sortKeysDesc = ls, r.prototype.splice = hs, r.prototype.split = ps, r.prototype.sum = vs, r.prototype.take = bs, r.prototype.takeUntil = _s, r.prototype.takeWhile = js, r.prototype.tap = Es, r.prototype.times = Is, r.prototype.toArray = Cs, r.prototype.toJson = Ts, r.prototype.transform = Ps, r.prototype.undot = Ds, r.prototype.unless = Ns, r.prototype.unlessEmpty = Tt, r.prototype.unlessNotEmpty = Pt, r.prototype.union = Bs, r.prototype.unique = Ks, r.prototype.unwrap = Us, r.prototype.values = Rs, r.prototype.when = Js, r.prototype.whenEmpty = Pt, r.prototype.whenNotEmpty = Tt, r.prototype.where = Vs, r.prototype.whereBetween = Ls, r.prototype.whereIn = Qs, r.prototype.whereInstanceOf = zs, r.prototype.whereNotBetween = Xs, r.prototype.whereNotIn = ks, r.prototype.whereNull = to, r.prototype.whereNotNull = ro, r.prototype.wrap = eo, r.prototype.zip = no;
|
|
2116
2116
|
var i = function(o) {
|
|
2117
2117
|
return new r(o);
|
|
2118
2118
|
};
|
|
2119
2119
|
e.exports = i, e.exports.collect = i, e.exports.default = i, e.exports.Collection = r;
|
|
2120
2120
|
})(Ut);
|
|
2121
|
-
var
|
|
2122
|
-
const
|
|
2121
|
+
var io = Ut.exports;
|
|
2122
|
+
const zt = /* @__PURE__ */ Ar(io), Xt = [
|
|
2123
2123
|
"chunk",
|
|
2124
2124
|
"shuffle",
|
|
2125
2125
|
"splice",
|
|
@@ -2138,7 +2138,7 @@ const io = /* @__PURE__ */ wr(no), zt = [
|
|
|
2138
2138
|
"takeUntil",
|
|
2139
2139
|
"takeWhile",
|
|
2140
2140
|
"unique"
|
|
2141
|
-
], so = ["forPage", "sortByDesc", "sortBy", "skip", "take", "splice", "whereBetween", "whereIn", "whereNotBetween", "whereNotIn", "first"], oo = [
|
|
2141
|
+
], so = ["forPage", "sortByDesc", "sortBy", "skip", "take", "splice", "whereBetween", "whereIn", "whereNotBetween", "whereNotIn", "first", "where", "whereContains"], oo = [
|
|
2142
2142
|
"avg",
|
|
2143
2143
|
"count",
|
|
2144
2144
|
"countBy",
|
|
@@ -2191,6 +2191,9 @@ S.prototype.clone = function() {
|
|
|
2191
2191
|
const e = Object.create(this);
|
|
2192
2192
|
return e.steps = [...this.steps], e;
|
|
2193
2193
|
};
|
|
2194
|
+
zt().macro("whereContains", function(e, t) {
|
|
2195
|
+
return this.filter((r) => r[e].toLowerCase().includes(t.toLowerCase()));
|
|
2196
|
+
});
|
|
2194
2197
|
S.prototype.fetchData = async function() {
|
|
2195
2198
|
let e = {
|
|
2196
2199
|
meta: {
|
|
@@ -2212,23 +2215,31 @@ S.prototype.fetchData = async function() {
|
|
|
2212
2215
|
let o = await O(this.axios, r);
|
|
2213
2216
|
for (const u of t)
|
|
2214
2217
|
o = o[u];
|
|
2215
|
-
return this.meta = o.meta,
|
|
2218
|
+
return this.meta = o.meta, zt(o.data);
|
|
2216
2219
|
};
|
|
2217
2220
|
S.prototype.processData = async function() {
|
|
2218
2221
|
let e = null;
|
|
2219
2222
|
for (const t of this.steps) {
|
|
2220
|
-
if (
|
|
2223
|
+
if (Xt.includes(t.type)) {
|
|
2221
2224
|
e || (e = await this.fetchData()), e = e[t.type](...t.args);
|
|
2222
2225
|
continue;
|
|
2223
2226
|
}
|
|
2224
|
-
t.type === "forPage" && (e ? e = e.forPage(t.args[0], t.args[1]) : this.already_limit || this.already_offset ? (e = await this.fetchData(), e = e.forPage(t.args[0], t.args[1])) : (this.offset = (t.args[0] - 1) * t.args[1], this.limit = t.args[1]), this.already_limit = !0, this.already_offset = !0), t.type === "where"
|
|
2227
|
+
if (t.type === "forPage" && (e ? e = e.forPage(t.args[0], t.args[1]) : this.already_limit || this.already_offset ? (e = await this.fetchData(), e = e.forPage(t.args[0], t.args[1])) : (this.offset = (t.args[0] - 1) * t.args[1], this.limit = t.args[1]), this.already_limit = !0, this.already_offset = !0), t.type === "where")
|
|
2228
|
+
if (e)
|
|
2229
|
+
e = e.where(...t.args);
|
|
2230
|
+
else {
|
|
2231
|
+
const r = t.args[0];
|
|
2232
|
+
let n = "==", i = null;
|
|
2233
|
+
t.args.length == 2 && (i = t.args[1]), t.args.length == 3 && (n = t.args[1], i = t.args[2]), n === "==" && (this.filters[r] = i), n === "<" && (this.filters[r] = { lt: i }), n === "<=" && (this.filters[r] = { lte: i }), n === ">" && (this.filters[r] = { gt: i }), n === ">=" && (this.filters[r] = { gte: i }), n === "!==" && (this.filters[r] = { ne: i });
|
|
2234
|
+
}
|
|
2235
|
+
t.type === "whereContains" && (e ? e = e.whereContains(...t.args) : this.filters[t.args[0]] = { contains: t.args[1] }), t.type === "whereIn" && (e ? e = e.whereIn(...t.args) : this.filters[t.args[0]] = { in: t.args[1] }), t.type === "whereNotBetween" && (e ? e = e.whereNotBetween(...t.args) : this.filters[t.args[0]] = { notBetween: t.args[1] }), t.type === "whereNotIn" && (e ? e = e.whereNotIn(...t.args) : this.filters[t.args[0]] = { notIn: t.args[1] }), t.type == "whereBetween" && (e ? e = e.whereBetween(...t.args) : this.filters[t.args[0]] = { between: t.args[1] }), t.type === "sortByDesc" && (e ? e = e.sortByDesc(t.args[0]) : this.already_limit || this.already_offset ? (e = await this.fetchData(), e = e.sortByDesc(t.args[0])) : (this._sort = t.args[0], this._sortDesc = !0)), t.type === "sortBy" && (e ? e = e.sortBy(t.args[0]) : this.already_limit || this.already_offset ? (e = await this.fetchData(), e = e.sortBy(t.args[0])) : this._sort = t.args[0]), t.type === "skip" && (e ? e = e.skip(t.args[0]) : this.already_offset || this.already_limit ? (e = await this.fetchData(), e = e.skip(t.args[0])) : this.offset = t.args[0], this.already_offset = !0), t.type === "take" && (e ? e = e.take(...t.args) : this.already_offset || this.already_limit ? (e = await this.fetchData(), e = e.take(t.args[0])) : this.limit = t.args[0], this.already_limit = !0), t.type === "splice" && (e ? e = e.splice(...t.args) : (this.offset = t.args[0], this.limit = t.args[1]), this.already_limit = !0, this.already_offset = !0);
|
|
2225
2236
|
}
|
|
2226
2237
|
return e || (e = await this.fetchData()), e;
|
|
2227
2238
|
};
|
|
2228
2239
|
S.prototype.all = async function() {
|
|
2229
2240
|
return (await this.processData()).all();
|
|
2230
2241
|
};
|
|
2231
|
-
for (const e of [...
|
|
2242
|
+
for (const e of [...Xt, ...so])
|
|
2232
2243
|
S.prototype[e] = function(...t) {
|
|
2233
2244
|
const r = this.clone();
|
|
2234
2245
|
return r.steps.push({ type: e, args: t }), r;
|
|
@@ -2242,25 +2253,25 @@ S.prototype.first = async function() {
|
|
|
2242
2253
|
return this.take(1), (await this.processData()).first();
|
|
2243
2254
|
};
|
|
2244
2255
|
const lo = (e) => {
|
|
2245
|
-
const t =
|
|
2256
|
+
const t = kt.create({
|
|
2246
2257
|
baseURL: e,
|
|
2247
2258
|
withCredentials: !0
|
|
2248
|
-
}), r = (s, o = null, u = []) => y(t, s, o, u), n = (s) => O(t, s), i =
|
|
2259
|
+
}), r = (s, o = null, u = []) => y(t, s, o, u), n = (s) => O(t, s), i = gr();
|
|
2249
2260
|
return {
|
|
2250
2261
|
baseURL: e,
|
|
2251
2262
|
axios: t,
|
|
2252
|
-
auth:
|
|
2263
|
+
auth: lr(t),
|
|
2253
2264
|
mutation: r,
|
|
2254
2265
|
query: n,
|
|
2255
|
-
config:
|
|
2256
|
-
mail:
|
|
2257
|
-
users:
|
|
2258
|
-
fs:
|
|
2266
|
+
config: dr(n),
|
|
2267
|
+
mail: vr(t),
|
|
2268
|
+
users: br(t),
|
|
2269
|
+
fs: mr(t),
|
|
2259
2270
|
models: i,
|
|
2260
2271
|
model(s) {
|
|
2261
2272
|
return pt(t, s, i.get(s));
|
|
2262
2273
|
},
|
|
2263
|
-
roles:
|
|
2274
|
+
roles: wr(t),
|
|
2264
2275
|
collect: (s, o) => {
|
|
2265
2276
|
const u = pt(t, s, i.get(s)).getDataPath();
|
|
2266
2277
|
return new S(u, o, t);
|