frappe-react-sdk 1.8.0 → 1.9.0
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/frappe-react-sdk.es.js +980 -970
- package/dist/frappe-react-sdk.umd.js +15 -15
- package/dist/lib/index.d.ts +3 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Ye = (n, e, t) => (
|
|
4
|
-
import et, { createContext as
|
|
5
|
-
var
|
|
1
|
+
var bi = Object.defineProperty;
|
|
2
|
+
var _i = (n, e, t) => e in n ? bi(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var Ye = (n, e, t) => (_i(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import et, { createContext as rs, useContext as he, useMemo as Ot, useRef as fe, createElement as Ei, useEffect as mt, useLayoutEffect as Ri, useCallback as W, useDebugValue as ss, useState as K } from "react";
|
|
5
|
+
var H = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, vn = {}, wt = {}, At = {}, Oe = H && H.__assign || function() {
|
|
6
6
|
return Oe = Object.assign || function(n) {
|
|
7
7
|
for (var e, t = 1, r = arguments.length; t < r; t++) {
|
|
8
8
|
e = arguments[t];
|
|
@@ -11,7 +11,7 @@ var z = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : ty
|
|
|
11
11
|
}
|
|
12
12
|
return n;
|
|
13
13
|
}, Oe.apply(this, arguments);
|
|
14
|
-
}, Pt =
|
|
14
|
+
}, Pt = H && H.__awaiter || function(n, e, t, r) {
|
|
15
15
|
function s(i) {
|
|
16
16
|
return i instanceof t ? i : new t(function(o) {
|
|
17
17
|
o(i);
|
|
@@ -37,7 +37,7 @@ var z = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : ty
|
|
|
37
37
|
}
|
|
38
38
|
a((r = r.apply(n, e || [])).next());
|
|
39
39
|
});
|
|
40
|
-
}, Ft =
|
|
40
|
+
}, Ft = H && H.__generator || function(n, e) {
|
|
41
41
|
var t = { label: 0, sent: function() {
|
|
42
42
|
if (i[0] & 1)
|
|
43
43
|
throw i[1];
|
|
@@ -104,7 +104,7 @@ var z = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : ty
|
|
|
104
104
|
};
|
|
105
105
|
Object.defineProperty(At, "__esModule", { value: !0 });
|
|
106
106
|
At.FrappeCall = void 0;
|
|
107
|
-
var
|
|
107
|
+
var Si = function() {
|
|
108
108
|
function n(e, t, r, s, i) {
|
|
109
109
|
this.appURL = e, this.axios = t, this.useToken = r != null ? r : !1, this.token = s, this.tokenType = i;
|
|
110
110
|
}
|
|
@@ -163,8 +163,8 @@ var Ri = function() {
|
|
|
163
163
|
});
|
|
164
164
|
}, n;
|
|
165
165
|
}();
|
|
166
|
-
At.FrappeCall =
|
|
167
|
-
var Dt = {}, oe =
|
|
166
|
+
At.FrappeCall = Si;
|
|
167
|
+
var Dt = {}, oe = H && H.__assign || function() {
|
|
168
168
|
return oe = Object.assign || function(n) {
|
|
169
169
|
for (var e, t = 1, r = arguments.length; t < r; t++) {
|
|
170
170
|
e = arguments[t];
|
|
@@ -173,7 +173,7 @@ var Dt = {}, oe = z && z.__assign || function() {
|
|
|
173
173
|
}
|
|
174
174
|
return n;
|
|
175
175
|
}, oe.apply(this, arguments);
|
|
176
|
-
}, it =
|
|
176
|
+
}, it = H && H.__awaiter || function(n, e, t, r) {
|
|
177
177
|
function s(i) {
|
|
178
178
|
return i instanceof t ? i : new t(function(o) {
|
|
179
179
|
o(i);
|
|
@@ -199,7 +199,7 @@ var Dt = {}, oe = z && z.__assign || function() {
|
|
|
199
199
|
}
|
|
200
200
|
a((r = r.apply(n, e || [])).next());
|
|
201
201
|
});
|
|
202
|
-
}, ot =
|
|
202
|
+
}, ot = H && H.__generator || function(n, e) {
|
|
203
203
|
var t = { label: 0, sent: function() {
|
|
204
204
|
if (i[0] & 1)
|
|
205
205
|
throw i[1];
|
|
@@ -266,7 +266,7 @@ var Dt = {}, oe = z && z.__assign || function() {
|
|
|
266
266
|
};
|
|
267
267
|
Object.defineProperty(Dt, "__esModule", { value: !0 });
|
|
268
268
|
Dt.FrappeDB = void 0;
|
|
269
|
-
var
|
|
269
|
+
var Ti = function() {
|
|
270
270
|
function n(e, t, r, s, i) {
|
|
271
271
|
this.appURL = e, this.axios = t, this.useToken = r != null ? r : !1, this.token = s, this.tokenType = i;
|
|
272
272
|
}
|
|
@@ -284,9 +284,9 @@ var Si = function() {
|
|
|
284
284
|
}, n.prototype.getDocList = function(e, t) {
|
|
285
285
|
var r;
|
|
286
286
|
return it(this, void 0, void 0, function() {
|
|
287
|
-
var s, i, o, c, u, a, f, h,
|
|
288
|
-
return ot(this, function(
|
|
289
|
-
return s = {}, t && (i = t.fields, o = t.filters, c = t.orFilters, u = t.orderBy, a = t.limit, f = t.limit_start, h = t.groupBy,
|
|
287
|
+
var s, i, o, c, u, a, f, h, g, p, y;
|
|
288
|
+
return ot(this, function(v) {
|
|
289
|
+
return s = {}, t && (i = t.fields, o = t.filters, c = t.orFilters, u = t.orderBy, a = t.limit, f = t.limit_start, h = t.groupBy, g = t.asDict, p = g === void 0 ? !0 : g, y = u ? "".concat(String(u == null ? void 0 : u.field), " ").concat((r = u == null ? void 0 : u.order) !== null && r !== void 0 ? r : "asc") : "", s = {
|
|
290
290
|
fields: i ? JSON.stringify(i) : void 0,
|
|
291
291
|
filters: o ? JSON.stringify(o) : void 0,
|
|
292
292
|
or_filters: c ? JSON.stringify(c) : void 0,
|
|
@@ -370,34 +370,34 @@ var Si = function() {
|
|
|
370
370
|
});
|
|
371
371
|
}, n;
|
|
372
372
|
}();
|
|
373
|
-
Dt.FrappeDB =
|
|
373
|
+
Dt.FrappeDB = Ti;
|
|
374
374
|
var Lt = {}, ct = {};
|
|
375
|
-
function
|
|
375
|
+
function is(n, e) {
|
|
376
376
|
return function() {
|
|
377
377
|
return n.apply(e, arguments);
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
|
-
const { toString:
|
|
381
|
-
const t =
|
|
380
|
+
const { toString: Oi } = Object.prototype, { getPrototypeOf: Xn } = Object, nn = ((n) => (e) => {
|
|
381
|
+
const t = Oi.call(e);
|
|
382
382
|
return n[t] || (n[t] = t.slice(8, -1).toLowerCase());
|
|
383
|
-
})(/* @__PURE__ */ Object.create(null)), Ne = (n) => (n = n.toLowerCase(), (e) =>
|
|
384
|
-
function
|
|
383
|
+
})(/* @__PURE__ */ Object.create(null)), Ne = (n) => (n = n.toLowerCase(), (e) => nn(e) === n), rn = (n) => (e) => typeof e === n, { isArray: yt } = Array, xt = rn("undefined");
|
|
384
|
+
function xi(n) {
|
|
385
385
|
return n !== null && !xt(n) && n.constructor !== null && !xt(n.constructor) && Ee(n.constructor.isBuffer) && n.constructor.isBuffer(n);
|
|
386
386
|
}
|
|
387
|
-
const
|
|
388
|
-
function
|
|
387
|
+
const os = Ne("ArrayBuffer");
|
|
388
|
+
function Ci(n) {
|
|
389
389
|
let e;
|
|
390
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(n) : e = n && n.buffer &&
|
|
390
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(n) : e = n && n.buffer && os(n.buffer), e;
|
|
391
391
|
}
|
|
392
|
-
const
|
|
393
|
-
if (
|
|
392
|
+
const Ai = rn("string"), Ee = rn("function"), as = rn("number"), sn = (n) => n !== null && typeof n == "object", Di = (n) => n === !0 || n === !1, Wt = (n) => {
|
|
393
|
+
if (nn(n) !== "object")
|
|
394
394
|
return !1;
|
|
395
|
-
const e =
|
|
395
|
+
const e = Xn(n);
|
|
396
396
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in n) && !(Symbol.iterator in n);
|
|
397
|
-
},
|
|
397
|
+
}, Li = Ne("Date"), ki = Ne("File"), Ni = Ne("Blob"), Pi = Ne("FileList"), Fi = (n) => sn(n) && Ee(n.pipe), Bi = (n) => {
|
|
398
398
|
let e;
|
|
399
|
-
return n && (typeof FormData == "function" && n instanceof FormData || Ee(n.append) && ((e =
|
|
400
|
-
},
|
|
399
|
+
return n && (typeof FormData == "function" && n instanceof FormData || Ee(n.append) && ((e = nn(n)) === "formdata" || e === "object" && Ee(n.toString) && n.toString() === "[object FormData]"));
|
|
400
|
+
}, Ii = Ne("URLSearchParams"), [Ui, qi, Vi, ji] = ["ReadableStream", "Request", "Response", "Headers"].map(Ne), Mi = (n) => n.trim ? n.trim() : n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
401
401
|
function kt(n, e, { allOwnKeys: t = !1 } = {}) {
|
|
402
402
|
if (n === null || typeof n > "u")
|
|
403
403
|
return;
|
|
@@ -412,7 +412,7 @@ function kt(n, e, { allOwnKeys: t = !1 } = {}) {
|
|
|
412
412
|
c = i[r], e.call(null, n[c], c, n);
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function cs(n, e) {
|
|
416
416
|
e = e.toLowerCase();
|
|
417
417
|
const t = Object.keys(n);
|
|
418
418
|
let r = t.length, s;
|
|
@@ -421,23 +421,23 @@ function as(n, e) {
|
|
|
421
421
|
return s;
|
|
422
422
|
return null;
|
|
423
423
|
}
|
|
424
|
-
const at = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window :
|
|
425
|
-
function
|
|
426
|
-
const { caseless: n } =
|
|
427
|
-
const i = n &&
|
|
428
|
-
Wt(e[i]) && Wt(r) ? e[i] =
|
|
424
|
+
const at = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : H)(), us = (n) => !xt(n) && n !== at;
|
|
425
|
+
function kn() {
|
|
426
|
+
const { caseless: n } = us(this) && this || {}, e = {}, t = (r, s) => {
|
|
427
|
+
const i = n && cs(e, s) || s;
|
|
428
|
+
Wt(e[i]) && Wt(r) ? e[i] = kn(e[i], r) : Wt(r) ? e[i] = kn({}, r) : yt(r) ? e[i] = r.slice() : e[i] = r;
|
|
429
429
|
};
|
|
430
430
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
431
431
|
arguments[r] && kt(arguments[r], t);
|
|
432
432
|
return e;
|
|
433
433
|
}
|
|
434
|
-
const
|
|
435
|
-
t && Ee(s) ? n[i] =
|
|
436
|
-
}, { allOwnKeys: r }), n),
|
|
434
|
+
const $i = (n, e, t, { allOwnKeys: r } = {}) => (kt(e, (s, i) => {
|
|
435
|
+
t && Ee(s) ? n[i] = is(s, t) : n[i] = s;
|
|
436
|
+
}, { allOwnKeys: r }), n), Wi = (n) => (n.charCodeAt(0) === 65279 && (n = n.slice(1)), n), Hi = (n, e, t, r) => {
|
|
437
437
|
n.prototype = Object.create(e.prototype, r), n.prototype.constructor = n, Object.defineProperty(n, "super", {
|
|
438
438
|
value: e.prototype
|
|
439
439
|
}), t && Object.assign(n.prototype, t);
|
|
440
|
-
},
|
|
440
|
+
}, zi = (n, e, t, r) => {
|
|
441
441
|
let s, i, o;
|
|
442
442
|
const c = {};
|
|
443
443
|
if (e = e || {}, n == null)
|
|
@@ -445,51 +445,51 @@ const Mi = (n, e, t, { allOwnKeys: r } = {}) => (kt(e, (s, i) => {
|
|
|
445
445
|
do {
|
|
446
446
|
for (s = Object.getOwnPropertyNames(n), i = s.length; i-- > 0; )
|
|
447
447
|
o = s[i], (!r || r(o, n, e)) && !c[o] && (e[o] = n[o], c[o] = !0);
|
|
448
|
-
n = t !== !1 &&
|
|
448
|
+
n = t !== !1 && Xn(n);
|
|
449
449
|
} while (n && (!t || t(n, e)) && n !== Object.prototype);
|
|
450
450
|
return e;
|
|
451
|
-
},
|
|
451
|
+
}, Ji = (n, e, t) => {
|
|
452
452
|
n = String(n), (t === void 0 || t > n.length) && (t = n.length), t -= e.length;
|
|
453
453
|
const r = n.indexOf(e, t);
|
|
454
454
|
return r !== -1 && r === t;
|
|
455
|
-
},
|
|
455
|
+
}, Ki = (n) => {
|
|
456
456
|
if (!n)
|
|
457
457
|
return null;
|
|
458
458
|
if (yt(n))
|
|
459
459
|
return n;
|
|
460
460
|
let e = n.length;
|
|
461
|
-
if (!
|
|
461
|
+
if (!as(e))
|
|
462
462
|
return null;
|
|
463
463
|
const t = new Array(e);
|
|
464
464
|
for (; e-- > 0; )
|
|
465
465
|
t[e] = n[e];
|
|
466
466
|
return t;
|
|
467
|
-
},
|
|
467
|
+
}, Yi = ((n) => (e) => n && e instanceof n)(typeof Uint8Array < "u" && Xn(Uint8Array)), Gi = (n, e) => {
|
|
468
468
|
const r = (n && n[Symbol.iterator]).call(n);
|
|
469
469
|
let s;
|
|
470
470
|
for (; (s = r.next()) && !s.done; ) {
|
|
471
471
|
const i = s.value;
|
|
472
472
|
e.call(n, i[0], i[1]);
|
|
473
473
|
}
|
|
474
|
-
},
|
|
474
|
+
}, Xi = (n, e) => {
|
|
475
475
|
let t;
|
|
476
476
|
const r = [];
|
|
477
477
|
for (; (t = n.exec(e)) !== null; )
|
|
478
478
|
r.push(t);
|
|
479
479
|
return r;
|
|
480
|
-
},
|
|
480
|
+
}, Qi = Ne("HTMLFormElement"), Zi = (n) => n.toLowerCase().replace(
|
|
481
481
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
482
482
|
function(t, r, s) {
|
|
483
483
|
return r.toUpperCase() + s;
|
|
484
484
|
}
|
|
485
|
-
),
|
|
485
|
+
), Er = (({ hasOwnProperty: n }) => (e, t) => n.call(e, t))(Object.prototype), eo = Ne("RegExp"), ls = (n, e) => {
|
|
486
486
|
const t = Object.getOwnPropertyDescriptors(n), r = {};
|
|
487
487
|
kt(t, (s, i) => {
|
|
488
488
|
let o;
|
|
489
489
|
(o = e(s, i, n)) !== !1 && (r[i] = o || s);
|
|
490
490
|
}), Object.defineProperties(n, r);
|
|
491
|
-
},
|
|
492
|
-
|
|
491
|
+
}, to = (n) => {
|
|
492
|
+
ls(n, (e, t) => {
|
|
493
493
|
if (Ee(n) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
|
|
494
494
|
return !1;
|
|
495
495
|
const r = n[t];
|
|
@@ -503,31 +503,31 @@ const Mi = (n, e, t, { allOwnKeys: r } = {}) => (kt(e, (s, i) => {
|
|
|
503
503
|
});
|
|
504
504
|
}
|
|
505
505
|
});
|
|
506
|
-
},
|
|
506
|
+
}, no = (n, e) => {
|
|
507
507
|
const t = {}, r = (s) => {
|
|
508
508
|
s.forEach((i) => {
|
|
509
509
|
t[i] = !0;
|
|
510
510
|
});
|
|
511
511
|
};
|
|
512
512
|
return yt(n) ? r(n) : r(String(n).split(e)), t;
|
|
513
|
-
},
|
|
514
|
-
},
|
|
515
|
-
DIGIT:
|
|
516
|
-
ALPHA:
|
|
517
|
-
ALPHA_DIGIT:
|
|
518
|
-
},
|
|
513
|
+
}, ro = () => {
|
|
514
|
+
}, so = (n, e) => n != null && Number.isFinite(n = +n) ? n : e, wn = "abcdefghijklmnopqrstuvwxyz", Rr = "0123456789", fs = {
|
|
515
|
+
DIGIT: Rr,
|
|
516
|
+
ALPHA: wn,
|
|
517
|
+
ALPHA_DIGIT: wn + wn.toUpperCase() + Rr
|
|
518
|
+
}, io = (n = 16, e = fs.ALPHA_DIGIT) => {
|
|
519
519
|
let t = "";
|
|
520
520
|
const { length: r } = e;
|
|
521
521
|
for (; n--; )
|
|
522
522
|
t += e[Math.random() * r | 0];
|
|
523
523
|
return t;
|
|
524
524
|
};
|
|
525
|
-
function
|
|
525
|
+
function oo(n) {
|
|
526
526
|
return !!(n && Ee(n.append) && n[Symbol.toStringTag] === "FormData" && n[Symbol.iterator]);
|
|
527
527
|
}
|
|
528
|
-
const
|
|
528
|
+
const ao = (n) => {
|
|
529
529
|
const e = new Array(10), t = (r, s) => {
|
|
530
|
-
if (
|
|
530
|
+
if (sn(r)) {
|
|
531
531
|
if (e.indexOf(r) >= 0)
|
|
532
532
|
return;
|
|
533
533
|
if (!("toJSON" in r)) {
|
|
@@ -542,72 +542,72 @@ const oo = (n) => {
|
|
|
542
542
|
return r;
|
|
543
543
|
};
|
|
544
544
|
return t(n, 0);
|
|
545
|
-
},
|
|
545
|
+
}, co = Ne("AsyncFunction"), uo = (n) => n && (sn(n) || Ee(n)) && Ee(n.then) && Ee(n.catch), hs = ((n, e) => n ? setImmediate : e ? ((t, r) => (at.addEventListener("message", ({ source: s, data: i }) => {
|
|
546
546
|
s === at && i === t && r.length && r.shift()();
|
|
547
547
|
}, !1), (s) => {
|
|
548
548
|
r.push(s), at.postMessage(t, "*");
|
|
549
549
|
}))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(
|
|
550
550
|
typeof setImmediate == "function",
|
|
551
551
|
Ee(at.postMessage)
|
|
552
|
-
),
|
|
552
|
+
), lo = typeof queueMicrotask < "u" ? queueMicrotask.bind(at) : typeof process < "u" && process.nextTick || hs;
|
|
553
553
|
var d = {
|
|
554
554
|
isArray: yt,
|
|
555
|
-
isArrayBuffer:
|
|
556
|
-
isBuffer:
|
|
557
|
-
isFormData:
|
|
558
|
-
isArrayBufferView:
|
|
559
|
-
isString:
|
|
560
|
-
isNumber:
|
|
561
|
-
isBoolean:
|
|
562
|
-
isObject:
|
|
555
|
+
isArrayBuffer: os,
|
|
556
|
+
isBuffer: xi,
|
|
557
|
+
isFormData: Bi,
|
|
558
|
+
isArrayBufferView: Ci,
|
|
559
|
+
isString: Ai,
|
|
560
|
+
isNumber: as,
|
|
561
|
+
isBoolean: Di,
|
|
562
|
+
isObject: sn,
|
|
563
563
|
isPlainObject: Wt,
|
|
564
564
|
isReadableStream: Ui,
|
|
565
|
-
isRequest:
|
|
566
|
-
isResponse:
|
|
567
|
-
isHeaders:
|
|
565
|
+
isRequest: qi,
|
|
566
|
+
isResponse: Vi,
|
|
567
|
+
isHeaders: ji,
|
|
568
568
|
isUndefined: xt,
|
|
569
|
-
isDate:
|
|
570
|
-
isFile:
|
|
571
|
-
isBlob:
|
|
572
|
-
isRegExp:
|
|
569
|
+
isDate: Li,
|
|
570
|
+
isFile: ki,
|
|
571
|
+
isBlob: Ni,
|
|
572
|
+
isRegExp: eo,
|
|
573
573
|
isFunction: Ee,
|
|
574
|
-
isStream:
|
|
575
|
-
isURLSearchParams:
|
|
576
|
-
isTypedArray:
|
|
577
|
-
isFileList:
|
|
574
|
+
isStream: Fi,
|
|
575
|
+
isURLSearchParams: Ii,
|
|
576
|
+
isTypedArray: Yi,
|
|
577
|
+
isFileList: Pi,
|
|
578
578
|
forEach: kt,
|
|
579
|
-
merge:
|
|
580
|
-
extend:
|
|
581
|
-
trim:
|
|
582
|
-
stripBOM:
|
|
583
|
-
inherits:
|
|
584
|
-
toFlatObject:
|
|
585
|
-
kindOf:
|
|
579
|
+
merge: kn,
|
|
580
|
+
extend: $i,
|
|
581
|
+
trim: Mi,
|
|
582
|
+
stripBOM: Wi,
|
|
583
|
+
inherits: Hi,
|
|
584
|
+
toFlatObject: zi,
|
|
585
|
+
kindOf: nn,
|
|
586
586
|
kindOfTest: Ne,
|
|
587
|
-
endsWith:
|
|
588
|
-
toArray:
|
|
589
|
-
forEachEntry:
|
|
590
|
-
matchAll:
|
|
591
|
-
isHTMLForm:
|
|
592
|
-
hasOwnProperty:
|
|
593
|
-
hasOwnProp:
|
|
594
|
-
reduceDescriptors:
|
|
595
|
-
freezeMethods:
|
|
596
|
-
toObjectSet:
|
|
597
|
-
toCamelCase:
|
|
598
|
-
noop:
|
|
599
|
-
toFiniteNumber:
|
|
600
|
-
findKey:
|
|
587
|
+
endsWith: Ji,
|
|
588
|
+
toArray: Ki,
|
|
589
|
+
forEachEntry: Gi,
|
|
590
|
+
matchAll: Xi,
|
|
591
|
+
isHTMLForm: Qi,
|
|
592
|
+
hasOwnProperty: Er,
|
|
593
|
+
hasOwnProp: Er,
|
|
594
|
+
reduceDescriptors: ls,
|
|
595
|
+
freezeMethods: to,
|
|
596
|
+
toObjectSet: no,
|
|
597
|
+
toCamelCase: Zi,
|
|
598
|
+
noop: ro,
|
|
599
|
+
toFiniteNumber: so,
|
|
600
|
+
findKey: cs,
|
|
601
601
|
global: at,
|
|
602
|
-
isContextDefined:
|
|
603
|
-
ALPHABET:
|
|
604
|
-
generateString:
|
|
605
|
-
isSpecCompliantForm:
|
|
606
|
-
toJSONObject:
|
|
607
|
-
isAsyncFn:
|
|
608
|
-
isThenable:
|
|
609
|
-
setImmediate:
|
|
610
|
-
asap:
|
|
602
|
+
isContextDefined: us,
|
|
603
|
+
ALPHABET: fs,
|
|
604
|
+
generateString: io,
|
|
605
|
+
isSpecCompliantForm: oo,
|
|
606
|
+
toJSONObject: ao,
|
|
607
|
+
isAsyncFn: co,
|
|
608
|
+
isThenable: uo,
|
|
609
|
+
setImmediate: hs,
|
|
610
|
+
asap: lo
|
|
611
611
|
};
|
|
612
612
|
function P(n, e, t, r, s) {
|
|
613
613
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = n, this.name = "AxiosError", e && (this.code = e), t && (this.config = t), r && (this.request = r), s && (this.response = s);
|
|
@@ -629,7 +629,7 @@ d.inherits(P, Error, {
|
|
|
629
629
|
};
|
|
630
630
|
}
|
|
631
631
|
});
|
|
632
|
-
const
|
|
632
|
+
const ds = P.prototype, ps = {};
|
|
633
633
|
[
|
|
634
634
|
"ERR_BAD_OPTION_VALUE",
|
|
635
635
|
"ERR_BAD_OPTION",
|
|
@@ -644,43 +644,43 @@ const hs = P.prototype, ds = {};
|
|
|
644
644
|
"ERR_NOT_SUPPORT",
|
|
645
645
|
"ERR_INVALID_URL"
|
|
646
646
|
].forEach((n) => {
|
|
647
|
-
|
|
647
|
+
ps[n] = { value: n };
|
|
648
648
|
});
|
|
649
|
-
Object.defineProperties(P,
|
|
650
|
-
Object.defineProperty(
|
|
649
|
+
Object.defineProperties(P, ps);
|
|
650
|
+
Object.defineProperty(ds, "isAxiosError", { value: !0 });
|
|
651
651
|
P.from = (n, e, t, r, s, i) => {
|
|
652
|
-
const o = Object.create(
|
|
652
|
+
const o = Object.create(ds);
|
|
653
653
|
return d.toFlatObject(n, o, function(u) {
|
|
654
654
|
return u !== Error.prototype;
|
|
655
655
|
}, (c) => c !== "isAxiosError"), P.call(o, n.message, e, t, r, s), o.cause = n, o.name = n.name, i && Object.assign(o, i), o;
|
|
656
656
|
};
|
|
657
|
-
var
|
|
658
|
-
function
|
|
657
|
+
var fo = null;
|
|
658
|
+
function Nn(n) {
|
|
659
659
|
return d.isPlainObject(n) || d.isArray(n);
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function ms(n) {
|
|
662
662
|
return d.endsWith(n, "[]") ? n.slice(0, -2) : n;
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function Sr(n, e, t) {
|
|
665
665
|
return n ? n.concat(e).map(function(s, i) {
|
|
666
|
-
return s =
|
|
666
|
+
return s = ms(s), !t && i ? "[" + s + "]" : s;
|
|
667
667
|
}).join(t ? "." : "") : e;
|
|
668
668
|
}
|
|
669
|
-
function
|
|
670
|
-
return d.isArray(n) && !n.some(
|
|
669
|
+
function ho(n) {
|
|
670
|
+
return d.isArray(n) && !n.some(Nn);
|
|
671
671
|
}
|
|
672
|
-
const
|
|
672
|
+
const po = d.toFlatObject(d, {}, null, function(e) {
|
|
673
673
|
return /^is[A-Z]/.test(e);
|
|
674
674
|
});
|
|
675
|
-
function
|
|
675
|
+
function on(n, e, t) {
|
|
676
676
|
if (!d.isObject(n))
|
|
677
677
|
throw new TypeError("target must be an object");
|
|
678
678
|
e = e || new FormData(), t = d.toFlatObject(t, {
|
|
679
679
|
metaTokens: !0,
|
|
680
680
|
dots: !1,
|
|
681
681
|
indexes: !1
|
|
682
|
-
}, !1, function(
|
|
683
|
-
return !d.isUndefined(b[
|
|
682
|
+
}, !1, function(v, b) {
|
|
683
|
+
return !d.isUndefined(b[v]);
|
|
684
684
|
});
|
|
685
685
|
const r = t.metaTokens, s = t.visitor || f, i = t.dots, o = t.indexes, u = (t.Blob || typeof Blob < "u" && Blob) && d.isSpecCompliantForm(e);
|
|
686
686
|
if (!d.isFunction(s))
|
|
@@ -694,38 +694,38 @@ function sn(n, e, t) {
|
|
|
694
694
|
throw new P("Blob is not supported. Use a Buffer instead.");
|
|
695
695
|
return d.isArrayBuffer(y) || d.isTypedArray(y) ? u && typeof Blob == "function" ? new Blob([y]) : Buffer.from(y) : y;
|
|
696
696
|
}
|
|
697
|
-
function f(y,
|
|
697
|
+
function f(y, v, b) {
|
|
698
698
|
let m = y;
|
|
699
699
|
if (y && !b && typeof y == "object") {
|
|
700
|
-
if (d.endsWith(
|
|
701
|
-
|
|
702
|
-
else if (d.isArray(y) &&
|
|
703
|
-
return
|
|
700
|
+
if (d.endsWith(v, "{}"))
|
|
701
|
+
v = r ? v : v.slice(0, -2), y = JSON.stringify(y);
|
|
702
|
+
else if (d.isArray(y) && ho(y) || (d.isFileList(y) || d.endsWith(v, "[]")) && (m = d.toArray(y)))
|
|
703
|
+
return v = ms(v), m.forEach(function(R, x) {
|
|
704
704
|
!(d.isUndefined(R) || R === null) && e.append(
|
|
705
|
-
o === !0 ?
|
|
705
|
+
o === !0 ? Sr([v], x, i) : o === null ? v : v + "[]",
|
|
706
706
|
a(R)
|
|
707
707
|
);
|
|
708
708
|
}), !1;
|
|
709
709
|
}
|
|
710
|
-
return
|
|
710
|
+
return Nn(y) ? !0 : (e.append(Sr(b, v, i), a(y)), !1);
|
|
711
711
|
}
|
|
712
|
-
const h = [],
|
|
712
|
+
const h = [], g = Object.assign(po, {
|
|
713
713
|
defaultVisitor: f,
|
|
714
714
|
convertValue: a,
|
|
715
|
-
isVisitable:
|
|
715
|
+
isVisitable: Nn
|
|
716
716
|
});
|
|
717
|
-
function p(y,
|
|
717
|
+
function p(y, v) {
|
|
718
718
|
if (!d.isUndefined(y)) {
|
|
719
719
|
if (h.indexOf(y) !== -1)
|
|
720
|
-
throw Error("Circular reference detected in " +
|
|
720
|
+
throw Error("Circular reference detected in " + v.join("."));
|
|
721
721
|
h.push(y), d.forEach(y, function(m, A) {
|
|
722
722
|
(!(d.isUndefined(m) || m === null) && s.call(
|
|
723
723
|
e,
|
|
724
724
|
m,
|
|
725
725
|
d.isString(A) ? A.trim() : A,
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
)) === !0 && p(m,
|
|
726
|
+
v,
|
|
727
|
+
g
|
|
728
|
+
)) === !0 && p(m, v ? v.concat(A) : [A]);
|
|
729
729
|
}), h.pop();
|
|
730
730
|
}
|
|
731
731
|
}
|
|
@@ -733,7 +733,7 @@ function sn(n, e, t) {
|
|
|
733
733
|
throw new TypeError("data must be an object");
|
|
734
734
|
return p(n), e;
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function Tr(n) {
|
|
737
737
|
const e = {
|
|
738
738
|
"!": "%21",
|
|
739
739
|
"'": "%27",
|
|
@@ -747,36 +747,36 @@ function Sr(n) {
|
|
|
747
747
|
return e[r];
|
|
748
748
|
});
|
|
749
749
|
}
|
|
750
|
-
function
|
|
751
|
-
this._pairs = [], n &&
|
|
750
|
+
function Qn(n, e) {
|
|
751
|
+
this._pairs = [], n && on(n, this, e);
|
|
752
752
|
}
|
|
753
|
-
const
|
|
754
|
-
|
|
753
|
+
const ys = Qn.prototype;
|
|
754
|
+
ys.append = function(e, t) {
|
|
755
755
|
this._pairs.push([e, t]);
|
|
756
756
|
};
|
|
757
|
-
|
|
757
|
+
ys.toString = function(e) {
|
|
758
758
|
const t = e ? function(r) {
|
|
759
|
-
return e.call(this, r,
|
|
760
|
-
} :
|
|
759
|
+
return e.call(this, r, Tr);
|
|
760
|
+
} : Tr;
|
|
761
761
|
return this._pairs.map(function(s) {
|
|
762
762
|
return t(s[0]) + "=" + t(s[1]);
|
|
763
763
|
}, "").join("&");
|
|
764
764
|
};
|
|
765
|
-
function
|
|
765
|
+
function mo(n) {
|
|
766
766
|
return encodeURIComponent(n).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function gs(n, e, t) {
|
|
769
769
|
if (!e)
|
|
770
770
|
return n;
|
|
771
|
-
const r = t && t.encode ||
|
|
771
|
+
const r = t && t.encode || mo, s = t && t.serialize;
|
|
772
772
|
let i;
|
|
773
|
-
if (s ? i = s(e, t) : i = d.isURLSearchParams(e) ? e.toString() : new
|
|
773
|
+
if (s ? i = s(e, t) : i = d.isURLSearchParams(e) ? e.toString() : new Qn(e, t).toString(r), i) {
|
|
774
774
|
const o = n.indexOf("#");
|
|
775
775
|
o !== -1 && (n = n.slice(0, o)), n += (n.indexOf("?") === -1 ? "?" : "&") + i;
|
|
776
776
|
}
|
|
777
777
|
return n;
|
|
778
778
|
}
|
|
779
|
-
class
|
|
779
|
+
class yo {
|
|
780
780
|
constructor() {
|
|
781
781
|
this.handlers = [];
|
|
782
782
|
}
|
|
@@ -800,41 +800,41 @@ class mo {
|
|
|
800
800
|
});
|
|
801
801
|
}
|
|
802
802
|
}
|
|
803
|
-
var
|
|
803
|
+
var Or = yo, vs = {
|
|
804
804
|
silentJSONParsing: !0,
|
|
805
805
|
forcedJSONParsing: !0,
|
|
806
806
|
clarifyTimeoutError: !1
|
|
807
|
-
},
|
|
807
|
+
}, go = typeof URLSearchParams < "u" ? URLSearchParams : Qn, vo = typeof FormData < "u" ? FormData : null, wo = typeof Blob < "u" ? Blob : null, bo = {
|
|
808
808
|
isBrowser: !0,
|
|
809
809
|
classes: {
|
|
810
|
-
URLSearchParams:
|
|
811
|
-
FormData:
|
|
812
|
-
Blob:
|
|
810
|
+
URLSearchParams: go,
|
|
811
|
+
FormData: vo,
|
|
812
|
+
Blob: wo
|
|
813
813
|
},
|
|
814
814
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
815
815
|
};
|
|
816
|
-
const
|
|
817
|
-
var
|
|
816
|
+
const Zn = typeof window < "u" && typeof document < "u", _o = ((n) => Zn && ["ReactNative", "NativeScript", "NS"].indexOf(n) < 0)(typeof navigator < "u" && navigator.product), Eo = (() => typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), Ro = Zn && window.location.href || "http://localhost";
|
|
817
|
+
var So = /* @__PURE__ */ Object.freeze({
|
|
818
818
|
__proto__: null,
|
|
819
|
-
hasBrowserEnv:
|
|
820
|
-
hasStandardBrowserWebWorkerEnv:
|
|
821
|
-
hasStandardBrowserEnv:
|
|
822
|
-
origin:
|
|
819
|
+
hasBrowserEnv: Zn,
|
|
820
|
+
hasStandardBrowserWebWorkerEnv: Eo,
|
|
821
|
+
hasStandardBrowserEnv: _o,
|
|
822
|
+
origin: Ro
|
|
823
823
|
}), Le = {
|
|
824
|
-
...
|
|
825
|
-
...
|
|
824
|
+
...So,
|
|
825
|
+
...bo
|
|
826
826
|
};
|
|
827
|
-
function
|
|
828
|
-
return
|
|
827
|
+
function To(n, e) {
|
|
828
|
+
return on(n, new Le.classes.URLSearchParams(), Object.assign({
|
|
829
829
|
visitor: function(t, r, s, i) {
|
|
830
830
|
return Le.isNode && d.isBuffer(t) ? (this.append(r, t.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
831
831
|
}
|
|
832
832
|
}, e));
|
|
833
833
|
}
|
|
834
|
-
function
|
|
834
|
+
function Oo(n) {
|
|
835
835
|
return d.matchAll(/\w+|\[(\w*)]/g, n).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function xo(n) {
|
|
838
838
|
const e = {}, t = Object.keys(n);
|
|
839
839
|
let r;
|
|
840
840
|
const s = t.length;
|
|
@@ -843,23 +843,23 @@ function Oo(n) {
|
|
|
843
843
|
i = t[r], e[i] = n[i];
|
|
844
844
|
return e;
|
|
845
845
|
}
|
|
846
|
-
function
|
|
846
|
+
function ws(n) {
|
|
847
847
|
function e(t, r, s, i) {
|
|
848
848
|
let o = t[i++];
|
|
849
849
|
if (o === "__proto__")
|
|
850
850
|
return !0;
|
|
851
851
|
const c = Number.isFinite(+o), u = i >= t.length;
|
|
852
|
-
return o = !o && d.isArray(s) ? s.length : o, u ? (d.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !d.isObject(s[o])) && (s[o] = []), e(t, r, s[o], i) && d.isArray(s[o]) && (s[o] =
|
|
852
|
+
return o = !o && d.isArray(s) ? s.length : o, u ? (d.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !d.isObject(s[o])) && (s[o] = []), e(t, r, s[o], i) && d.isArray(s[o]) && (s[o] = xo(s[o])), !c);
|
|
853
853
|
}
|
|
854
854
|
if (d.isFormData(n) && d.isFunction(n.entries)) {
|
|
855
855
|
const t = {};
|
|
856
856
|
return d.forEachEntry(n, (r, s) => {
|
|
857
|
-
e(
|
|
857
|
+
e(Oo(r), s, t, 0);
|
|
858
858
|
}), t;
|
|
859
859
|
}
|
|
860
860
|
return null;
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function Co(n, e, t) {
|
|
863
863
|
if (d.isString(n))
|
|
864
864
|
try {
|
|
865
865
|
return (e || JSON.parse)(n), d.trim(n);
|
|
@@ -869,13 +869,13 @@ function xo(n, e, t) {
|
|
|
869
869
|
}
|
|
870
870
|
return (t || JSON.stringify)(n);
|
|
871
871
|
}
|
|
872
|
-
const
|
|
873
|
-
transitional:
|
|
872
|
+
const er = {
|
|
873
|
+
transitional: vs,
|
|
874
874
|
adapter: ["xhr", "http", "fetch"],
|
|
875
875
|
transformRequest: [function(e, t) {
|
|
876
876
|
const r = t.getContentType() || "", s = r.indexOf("application/json") > -1, i = d.isObject(e);
|
|
877
877
|
if (i && d.isHTMLForm(e) && (e = new FormData(e)), d.isFormData(e))
|
|
878
|
-
return s ? JSON.stringify(
|
|
878
|
+
return s ? JSON.stringify(ws(e)) : e;
|
|
879
879
|
if (d.isArrayBuffer(e) || d.isBuffer(e) || d.isStream(e) || d.isFile(e) || d.isBlob(e) || d.isReadableStream(e))
|
|
880
880
|
return e;
|
|
881
881
|
if (d.isArrayBufferView(e))
|
|
@@ -885,20 +885,20 @@ const Zn = {
|
|
|
885
885
|
let c;
|
|
886
886
|
if (i) {
|
|
887
887
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
888
|
-
return
|
|
888
|
+
return To(e, this.formSerializer).toString();
|
|
889
889
|
if ((c = d.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
|
|
890
890
|
const u = this.env && this.env.FormData;
|
|
891
|
-
return
|
|
891
|
+
return on(
|
|
892
892
|
c ? { "files[]": e } : e,
|
|
893
893
|
u && new u(),
|
|
894
894
|
this.formSerializer
|
|
895
895
|
);
|
|
896
896
|
}
|
|
897
897
|
}
|
|
898
|
-
return i || s ? (t.setContentType("application/json", !1),
|
|
898
|
+
return i || s ? (t.setContentType("application/json", !1), Co(e)) : e;
|
|
899
899
|
}],
|
|
900
900
|
transformResponse: [function(e) {
|
|
901
|
-
const t = this.transitional ||
|
|
901
|
+
const t = this.transitional || er.transitional, r = t && t.forcedJSONParsing, s = this.responseType === "json";
|
|
902
902
|
if (d.isResponse(e) || d.isReadableStream(e))
|
|
903
903
|
return e;
|
|
904
904
|
if (e && d.isString(e) && (r && !this.responseType || s)) {
|
|
@@ -932,10 +932,10 @@ const Zn = {
|
|
|
932
932
|
}
|
|
933
933
|
};
|
|
934
934
|
d.forEach(["delete", "get", "head", "post", "put", "patch"], (n) => {
|
|
935
|
-
|
|
935
|
+
er.headers[n] = {};
|
|
936
936
|
});
|
|
937
|
-
var
|
|
938
|
-
const
|
|
937
|
+
var tr = er;
|
|
938
|
+
const Ao = d.toObjectSet([
|
|
939
939
|
"age",
|
|
940
940
|
"authorization",
|
|
941
941
|
"content-length",
|
|
@@ -954,30 +954,30 @@ const Co = d.toObjectSet([
|
|
|
954
954
|
"retry-after",
|
|
955
955
|
"user-agent"
|
|
956
956
|
]);
|
|
957
|
-
var
|
|
957
|
+
var Do = (n) => {
|
|
958
958
|
const e = {};
|
|
959
959
|
let t, r, s;
|
|
960
960
|
return n && n.split(`
|
|
961
961
|
`).forEach(function(o) {
|
|
962
|
-
s = o.indexOf(":"), t = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!t || e[t] &&
|
|
962
|
+
s = o.indexOf(":"), t = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!t || e[t] && Ao[t]) && (t === "set-cookie" ? e[t] ? e[t].push(r) : e[t] = [r] : e[t] = e[t] ? e[t] + ", " + r : r);
|
|
963
963
|
}), e;
|
|
964
964
|
};
|
|
965
|
-
const
|
|
965
|
+
const xr = Symbol("internals");
|
|
966
966
|
function bt(n) {
|
|
967
967
|
return n && String(n).trim().toLowerCase();
|
|
968
968
|
}
|
|
969
969
|
function Ht(n) {
|
|
970
970
|
return n === !1 || n == null ? n : d.isArray(n) ? n.map(Ht) : String(n);
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function Lo(n) {
|
|
973
973
|
const e = /* @__PURE__ */ Object.create(null), t = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
974
974
|
let r;
|
|
975
975
|
for (; r = t.exec(n); )
|
|
976
976
|
e[r[1]] = r[2];
|
|
977
977
|
return e;
|
|
978
978
|
}
|
|
979
|
-
const
|
|
980
|
-
function
|
|
979
|
+
const ko = (n) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());
|
|
980
|
+
function bn(n, e, t, r, s) {
|
|
981
981
|
if (d.isFunction(r))
|
|
982
982
|
return r.call(this, e, t);
|
|
983
983
|
if (s && (e = t), !!d.isString(e)) {
|
|
@@ -987,10 +987,10 @@ function wn(n, e, t, r, s) {
|
|
|
987
987
|
return r.test(e);
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function No(n) {
|
|
991
991
|
return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, r) => t.toUpperCase() + r);
|
|
992
992
|
}
|
|
993
|
-
function
|
|
993
|
+
function Po(n, e) {
|
|
994
994
|
const t = d.toCamelCase(" " + e);
|
|
995
995
|
["get", "set", "has"].forEach((r) => {
|
|
996
996
|
Object.defineProperty(n, r + t, {
|
|
@@ -1001,7 +1001,7 @@ function No(n, e) {
|
|
|
1001
1001
|
});
|
|
1002
1002
|
});
|
|
1003
1003
|
}
|
|
1004
|
-
class
|
|
1004
|
+
class an {
|
|
1005
1005
|
constructor(e) {
|
|
1006
1006
|
e && this.set(e);
|
|
1007
1007
|
}
|
|
@@ -1017,8 +1017,8 @@ class on {
|
|
|
1017
1017
|
const o = (c, u) => d.forEach(c, (a, f) => i(a, f, u));
|
|
1018
1018
|
if (d.isPlainObject(e) || e instanceof this.constructor)
|
|
1019
1019
|
o(e, t);
|
|
1020
|
-
else if (d.isString(e) && (e = e.trim()) && !
|
|
1021
|
-
o(
|
|
1020
|
+
else if (d.isString(e) && (e = e.trim()) && !ko(e))
|
|
1021
|
+
o(Do(e), t);
|
|
1022
1022
|
else if (d.isHeaders(e))
|
|
1023
1023
|
for (const [c, u] of e.entries())
|
|
1024
1024
|
i(u, c, r);
|
|
@@ -1034,7 +1034,7 @@ class on {
|
|
|
1034
1034
|
if (!t)
|
|
1035
1035
|
return s;
|
|
1036
1036
|
if (t === !0)
|
|
1037
|
-
return
|
|
1037
|
+
return Lo(s);
|
|
1038
1038
|
if (d.isFunction(t))
|
|
1039
1039
|
return t.call(this, s, r);
|
|
1040
1040
|
if (d.isRegExp(t))
|
|
@@ -1046,7 +1046,7 @@ class on {
|
|
|
1046
1046
|
has(e, t) {
|
|
1047
1047
|
if (e = bt(e), e) {
|
|
1048
1048
|
const r = d.findKey(this, e);
|
|
1049
|
-
return !!(r && this[r] !== void 0 && (!t ||
|
|
1049
|
+
return !!(r && this[r] !== void 0 && (!t || bn(this, this[r], r, t)));
|
|
1050
1050
|
}
|
|
1051
1051
|
return !1;
|
|
1052
1052
|
}
|
|
@@ -1056,7 +1056,7 @@ class on {
|
|
|
1056
1056
|
function i(o) {
|
|
1057
1057
|
if (o = bt(o), o) {
|
|
1058
1058
|
const c = d.findKey(r, o);
|
|
1059
|
-
c && (!t ||
|
|
1059
|
+
c && (!t || bn(r, r[c], c, t)) && (delete r[c], s = !0);
|
|
1060
1060
|
}
|
|
1061
1061
|
}
|
|
1062
1062
|
return d.isArray(e) ? e.forEach(i) : i(e), s;
|
|
@@ -1066,7 +1066,7 @@ class on {
|
|
|
1066
1066
|
let r = t.length, s = !1;
|
|
1067
1067
|
for (; r--; ) {
|
|
1068
1068
|
const i = t[r];
|
|
1069
|
-
(!e ||
|
|
1069
|
+
(!e || bn(this, this[i], i, e, !0)) && (delete this[i], s = !0);
|
|
1070
1070
|
}
|
|
1071
1071
|
return s;
|
|
1072
1072
|
}
|
|
@@ -1078,7 +1078,7 @@ class on {
|
|
|
1078
1078
|
t[o] = Ht(s), delete t[i];
|
|
1079
1079
|
return;
|
|
1080
1080
|
}
|
|
1081
|
-
const c = e ?
|
|
1081
|
+
const c = e ? No(i) : String(i).trim();
|
|
1082
1082
|
c !== i && delete t[i], t[c] = Ht(s), r[c] = !0;
|
|
1083
1083
|
}), this;
|
|
1084
1084
|
}
|
|
@@ -1109,18 +1109,18 @@ class on {
|
|
|
1109
1109
|
return t.forEach((s) => r.set(s)), r;
|
|
1110
1110
|
}
|
|
1111
1111
|
static accessor(e) {
|
|
1112
|
-
const r = (this[
|
|
1112
|
+
const r = (this[xr] = this[xr] = {
|
|
1113
1113
|
accessors: {}
|
|
1114
1114
|
}).accessors, s = this.prototype;
|
|
1115
1115
|
function i(o) {
|
|
1116
1116
|
const c = bt(o);
|
|
1117
|
-
r[c] || (
|
|
1117
|
+
r[c] || (Po(s, o), r[c] = !0);
|
|
1118
1118
|
}
|
|
1119
1119
|
return d.isArray(e) ? e.forEach(i) : i(e), this;
|
|
1120
1120
|
}
|
|
1121
1121
|
}
|
|
1122
|
-
|
|
1123
|
-
d.reduceDescriptors(
|
|
1122
|
+
an.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1123
|
+
d.reduceDescriptors(an.prototype, ({ value: n }, e) => {
|
|
1124
1124
|
let t = e[0].toUpperCase() + e.slice(1);
|
|
1125
1125
|
return {
|
|
1126
1126
|
get: () => n,
|
|
@@ -1129,16 +1129,16 @@ d.reduceDescriptors(on.prototype, ({ value: n }, e) => {
|
|
|
1129
1129
|
}
|
|
1130
1130
|
};
|
|
1131
1131
|
});
|
|
1132
|
-
d.freezeMethods(
|
|
1133
|
-
var ke =
|
|
1134
|
-
function
|
|
1135
|
-
const t = this ||
|
|
1132
|
+
d.freezeMethods(an);
|
|
1133
|
+
var ke = an;
|
|
1134
|
+
function _n(n, e) {
|
|
1135
|
+
const t = this || tr, r = e || t, s = ke.from(r.headers);
|
|
1136
1136
|
let i = r.data;
|
|
1137
1137
|
return d.forEach(n, function(c) {
|
|
1138
1138
|
i = c.call(t, i, s.normalize(), e ? e.status : void 0);
|
|
1139
1139
|
}), s.normalize(), i;
|
|
1140
1140
|
}
|
|
1141
|
-
function
|
|
1141
|
+
function bs(n) {
|
|
1142
1142
|
return !!(n && n.__CANCEL__);
|
|
1143
1143
|
}
|
|
1144
1144
|
function gt(n, e, t) {
|
|
@@ -1147,7 +1147,7 @@ function gt(n, e, t) {
|
|
|
1147
1147
|
d.inherits(gt, P, {
|
|
1148
1148
|
__CANCEL__: !0
|
|
1149
1149
|
});
|
|
1150
|
-
function
|
|
1150
|
+
function _s(n, e, t) {
|
|
1151
1151
|
const r = t.config.validateStatus;
|
|
1152
1152
|
!t.status || !r || r(t.status) ? n(t) : e(new P(
|
|
1153
1153
|
"Request failed with status code " + t.status,
|
|
@@ -1157,27 +1157,27 @@ function bs(n, e, t) {
|
|
|
1157
1157
|
t
|
|
1158
1158
|
));
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1160
|
+
function Fo(n) {
|
|
1161
1161
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(n);
|
|
1162
1162
|
return e && e[1] || "";
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function Bo(n, e) {
|
|
1165
1165
|
n = n || 10;
|
|
1166
1166
|
const t = new Array(n), r = new Array(n);
|
|
1167
1167
|
let s = 0, i = 0, o;
|
|
1168
1168
|
return e = e !== void 0 ? e : 1e3, function(u) {
|
|
1169
1169
|
const a = Date.now(), f = r[i];
|
|
1170
1170
|
o || (o = a), t[s] = u, r[s] = a;
|
|
1171
|
-
let h = i,
|
|
1171
|
+
let h = i, g = 0;
|
|
1172
1172
|
for (; h !== s; )
|
|
1173
|
-
|
|
1173
|
+
g += t[h++], h = h % n;
|
|
1174
1174
|
if (s = (s + 1) % n, s === i && (i = (i + 1) % n), a - o < e)
|
|
1175
1175
|
return;
|
|
1176
1176
|
const p = f && a - f;
|
|
1177
|
-
return p ? Math.round(
|
|
1177
|
+
return p ? Math.round(g * 1e3 / p) : void 0;
|
|
1178
1178
|
};
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1180
|
+
function Io(n, e) {
|
|
1181
1181
|
let t = 0, r = 1e3 / e, s, i;
|
|
1182
1182
|
const o = (a, f = Date.now()) => {
|
|
1183
1183
|
t = f, s = null, i && (clearTimeout(i), i = null), n.apply(null, a);
|
|
@@ -1191,8 +1191,8 @@ function Bo(n, e) {
|
|
|
1191
1191
|
}
|
|
1192
1192
|
const Gt = (n, e, t = 3) => {
|
|
1193
1193
|
let r = 0;
|
|
1194
|
-
const s =
|
|
1195
|
-
return
|
|
1194
|
+
const s = Bo(50, 250);
|
|
1195
|
+
return Io((i) => {
|
|
1196
1196
|
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, u = o - r, a = s(u), f = o <= c;
|
|
1197
1197
|
r = o;
|
|
1198
1198
|
const h = {
|
|
@@ -1208,14 +1208,14 @@ const Gt = (n, e, t = 3) => {
|
|
|
1208
1208
|
};
|
|
1209
1209
|
n(h);
|
|
1210
1210
|
}, t);
|
|
1211
|
-
},
|
|
1211
|
+
}, Cr = (n, e) => {
|
|
1212
1212
|
const t = n != null;
|
|
1213
1213
|
return [(r) => e[0]({
|
|
1214
1214
|
lengthComputable: t,
|
|
1215
1215
|
total: n,
|
|
1216
1216
|
loaded: r
|
|
1217
1217
|
}), e[1]];
|
|
1218
|
-
},
|
|
1218
|
+
}, Ar = (n) => (...e) => d.asap(() => n(...e));
|
|
1219
1219
|
var Uo = Le.hasStandardBrowserEnv ? function() {
|
|
1220
1220
|
const e = /(msie|trident)/i.test(navigator.userAgent), t = document.createElement("a");
|
|
1221
1221
|
let r;
|
|
@@ -1240,7 +1240,7 @@ var Uo = Le.hasStandardBrowserEnv ? function() {
|
|
|
1240
1240
|
return function() {
|
|
1241
1241
|
return !0;
|
|
1242
1242
|
};
|
|
1243
|
-
}(),
|
|
1243
|
+
}(), qo = Le.hasStandardBrowserEnv ? {
|
|
1244
1244
|
write(n, e, t, r, s, i) {
|
|
1245
1245
|
const o = [n + "=" + encodeURIComponent(e)];
|
|
1246
1246
|
d.isNumber(t) && o.push("expires=" + new Date(t).toGMTString()), d.isString(r) && o.push("path=" + r), d.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
@@ -1261,16 +1261,16 @@ var Uo = Le.hasStandardBrowserEnv ? function() {
|
|
|
1261
1261
|
remove() {
|
|
1262
1262
|
}
|
|
1263
1263
|
};
|
|
1264
|
-
function
|
|
1264
|
+
function Vo(n) {
|
|
1265
1265
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(n);
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1267
|
+
function jo(n, e) {
|
|
1268
1268
|
return e ? n.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : n;
|
|
1269
1269
|
}
|
|
1270
|
-
function
|
|
1271
|
-
return n && !
|
|
1270
|
+
function Es(n, e) {
|
|
1271
|
+
return n && !Vo(e) ? jo(n, e) : e;
|
|
1272
1272
|
}
|
|
1273
|
-
const
|
|
1273
|
+
const Dr = (n) => n instanceof ke ? { ...n } : n;
|
|
1274
1274
|
function ut(n, e) {
|
|
1275
1275
|
e = e || {};
|
|
1276
1276
|
const t = {};
|
|
@@ -1330,17 +1330,17 @@ function ut(n, e) {
|
|
|
1330
1330
|
socketPath: o,
|
|
1331
1331
|
responseEncoding: o,
|
|
1332
1332
|
validateStatus: c,
|
|
1333
|
-
headers: (a, f) => s(
|
|
1333
|
+
headers: (a, f) => s(Dr(a), Dr(f), !0)
|
|
1334
1334
|
};
|
|
1335
1335
|
return d.forEach(Object.keys(Object.assign({}, n, e)), function(f) {
|
|
1336
|
-
const h = u[f] || s,
|
|
1337
|
-
d.isUndefined(
|
|
1336
|
+
const h = u[f] || s, g = h(n[f], e[f], f);
|
|
1337
|
+
d.isUndefined(g) && h !== c || (t[f] = g);
|
|
1338
1338
|
}), t;
|
|
1339
1339
|
}
|
|
1340
|
-
var
|
|
1340
|
+
var Rs = (n) => {
|
|
1341
1341
|
const e = ut({}, n);
|
|
1342
1342
|
let { data: t, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = e;
|
|
1343
|
-
e.headers = o = ke.from(o), e.url =
|
|
1343
|
+
e.headers = o = ke.from(o), e.url = gs(Es(e.baseURL, e.url), n.params, n.paramsSerializer), c && o.set(
|
|
1344
1344
|
"Authorization",
|
|
1345
1345
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1346
1346
|
);
|
|
@@ -1354,19 +1354,19 @@ var Es = (n) => {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
1356
|
if (Le.hasStandardBrowserEnv && (r && d.isFunction(r) && (r = r(e)), r || r !== !1 && Uo(e.url))) {
|
|
1357
|
-
const a = s && i &&
|
|
1357
|
+
const a = s && i && qo.read(i);
|
|
1358
1358
|
a && o.set(s, a);
|
|
1359
1359
|
}
|
|
1360
1360
|
return e;
|
|
1361
1361
|
};
|
|
1362
|
-
const
|
|
1363
|
-
var
|
|
1362
|
+
const Mo = typeof XMLHttpRequest < "u";
|
|
1363
|
+
var $o = Mo && function(n) {
|
|
1364
1364
|
return new Promise(function(t, r) {
|
|
1365
|
-
const s =
|
|
1365
|
+
const s = Rs(n);
|
|
1366
1366
|
let i = s.data;
|
|
1367
1367
|
const o = ke.from(s.headers).normalize();
|
|
1368
|
-
let { responseType: c, onUploadProgress: u, onDownloadProgress: a } = s, f, h,
|
|
1369
|
-
function
|
|
1368
|
+
let { responseType: c, onUploadProgress: u, onDownloadProgress: a } = s, f, h, g, p, y;
|
|
1369
|
+
function v() {
|
|
1370
1370
|
p && p(), y && y(), s.cancelToken && s.cancelToken.unsubscribe(f), s.signal && s.signal.removeEventListener("abort", f);
|
|
1371
1371
|
}
|
|
1372
1372
|
let b = new XMLHttpRequest();
|
|
@@ -1384,10 +1384,10 @@ var Mo = jo && function(n) {
|
|
|
1384
1384
|
config: n,
|
|
1385
1385
|
request: b
|
|
1386
1386
|
};
|
|
1387
|
-
|
|
1388
|
-
t(M),
|
|
1387
|
+
_s(function(M) {
|
|
1388
|
+
t(M), v();
|
|
1389
1389
|
}, function(M) {
|
|
1390
|
-
r(M),
|
|
1390
|
+
r(M), v();
|
|
1391
1391
|
}, D), b = null;
|
|
1392
1392
|
}
|
|
1393
1393
|
"onloadend" in b ? b.onloadend = m : b.onreadystatechange = function() {
|
|
@@ -1398,7 +1398,7 @@ var Mo = jo && function(n) {
|
|
|
1398
1398
|
r(new P("Network Error", P.ERR_NETWORK, n, b)), b = null;
|
|
1399
1399
|
}, b.ontimeout = function() {
|
|
1400
1400
|
let x = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1401
|
-
const D = s.transitional ||
|
|
1401
|
+
const D = s.transitional || vs;
|
|
1402
1402
|
s.timeoutErrorMessage && (x = s.timeoutErrorMessage), r(new P(
|
|
1403
1403
|
x,
|
|
1404
1404
|
D.clarifyTimeoutError ? P.ETIMEDOUT : P.ECONNABORTED,
|
|
@@ -1407,10 +1407,10 @@ var Mo = jo && function(n) {
|
|
|
1407
1407
|
)), b = null;
|
|
1408
1408
|
}, i === void 0 && o.setContentType(null), "setRequestHeader" in b && d.forEach(o.toJSON(), function(x, D) {
|
|
1409
1409
|
b.setRequestHeader(D, x);
|
|
1410
|
-
}), d.isUndefined(s.withCredentials) || (b.withCredentials = !!s.withCredentials), c && c !== "json" && (b.responseType = s.responseType), a && ([
|
|
1410
|
+
}), d.isUndefined(s.withCredentials) || (b.withCredentials = !!s.withCredentials), c && c !== "json" && (b.responseType = s.responseType), a && ([g, y] = Gt(a, !0), b.addEventListener("progress", g)), u && b.upload && ([h, p] = Gt(u), b.upload.addEventListener("progress", h), b.upload.addEventListener("loadend", p)), (s.cancelToken || s.signal) && (f = (R) => {
|
|
1411
1411
|
!b || (r(!R || R.type ? new gt(null, n, b) : R), b.abort(), b = null);
|
|
1412
1412
|
}, s.cancelToken && s.cancelToken.subscribe(f), s.signal && (s.signal.aborted ? f() : s.signal.addEventListener("abort", f)));
|
|
1413
|
-
const A =
|
|
1413
|
+
const A = Fo(s.url);
|
|
1414
1414
|
if (A && Le.protocols.indexOf(A) === -1) {
|
|
1415
1415
|
r(new P("Unsupported protocol " + A + ":", P.ERR_BAD_REQUEST, n));
|
|
1416
1416
|
return;
|
|
@@ -1418,7 +1418,7 @@ var Mo = jo && function(n) {
|
|
|
1418
1418
|
b.send(i || null);
|
|
1419
1419
|
});
|
|
1420
1420
|
};
|
|
1421
|
-
const
|
|
1421
|
+
const Wo = (n, e) => {
|
|
1422
1422
|
let t = new AbortController(), r;
|
|
1423
1423
|
const s = function(u) {
|
|
1424
1424
|
if (!r) {
|
|
@@ -1441,8 +1441,8 @@ const $o = (n, e) => {
|
|
|
1441
1441
|
i && clearTimeout(i), i = null;
|
|
1442
1442
|
}];
|
|
1443
1443
|
};
|
|
1444
|
-
var
|
|
1445
|
-
const
|
|
1444
|
+
var Ho = Wo;
|
|
1445
|
+
const zo = function* (n, e) {
|
|
1446
1446
|
let t = n.byteLength;
|
|
1447
1447
|
if (!e || t < e) {
|
|
1448
1448
|
yield n;
|
|
@@ -1451,11 +1451,11 @@ const Ho = function* (n, e) {
|
|
|
1451
1451
|
let r = 0, s;
|
|
1452
1452
|
for (; r < t; )
|
|
1453
1453
|
s = r + e, yield n.slice(r, s), r = s;
|
|
1454
|
-
},
|
|
1454
|
+
}, Jo = async function* (n, e, t) {
|
|
1455
1455
|
for await (const r of n)
|
|
1456
|
-
yield*
|
|
1457
|
-
},
|
|
1458
|
-
const i =
|
|
1456
|
+
yield* zo(ArrayBuffer.isView(r) ? r : await t(String(r)), e);
|
|
1457
|
+
}, Lr = (n, e, t, r, s) => {
|
|
1458
|
+
const i = Jo(n, e, s);
|
|
1459
1459
|
let o = 0, c, u = (a) => {
|
|
1460
1460
|
c || (c = !0, r && r(a));
|
|
1461
1461
|
};
|
|
@@ -1467,9 +1467,9 @@ const Ho = function* (n, e) {
|
|
|
1467
1467
|
u(), a.close();
|
|
1468
1468
|
return;
|
|
1469
1469
|
}
|
|
1470
|
-
let
|
|
1470
|
+
let g = h.byteLength;
|
|
1471
1471
|
if (t) {
|
|
1472
|
-
let p = o +=
|
|
1472
|
+
let p = o += g;
|
|
1473
1473
|
t(p);
|
|
1474
1474
|
}
|
|
1475
1475
|
a.enqueue(new Uint8Array(h));
|
|
@@ -1483,13 +1483,13 @@ const Ho = function* (n, e) {
|
|
|
1483
1483
|
}, {
|
|
1484
1484
|
highWaterMark: 2
|
|
1485
1485
|
});
|
|
1486
|
-
},
|
|
1486
|
+
}, cn = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ss = cn && typeof ReadableStream == "function", Pn = cn && (typeof TextEncoder == "function" ? ((n) => (e) => n.encode(e))(new TextEncoder()) : async (n) => new Uint8Array(await new Response(n).arrayBuffer())), Ts = (n, ...e) => {
|
|
1487
1487
|
try {
|
|
1488
1488
|
return !!n(...e);
|
|
1489
1489
|
} catch {
|
|
1490
1490
|
return !1;
|
|
1491
1491
|
}
|
|
1492
|
-
},
|
|
1492
|
+
}, Ko = Ss && Ts(() => {
|
|
1493
1493
|
let n = !1;
|
|
1494
1494
|
const e = new Request(Le.origin, {
|
|
1495
1495
|
body: new ReadableStream(),
|
|
@@ -1499,17 +1499,17 @@ const Ho = function* (n, e) {
|
|
|
1499
1499
|
}
|
|
1500
1500
|
}).headers.has("Content-Type");
|
|
1501
1501
|
return n && !e;
|
|
1502
|
-
}),
|
|
1503
|
-
stream:
|
|
1502
|
+
}), kr = 64 * 1024, Fn = Ss && Ts(() => d.isReadableStream(new Response("").body)), Xt = {
|
|
1503
|
+
stream: Fn && ((n) => n.body)
|
|
1504
1504
|
};
|
|
1505
|
-
|
|
1505
|
+
cn && ((n) => {
|
|
1506
1506
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
|
|
1507
1507
|
!Xt[e] && (Xt[e] = d.isFunction(n[e]) ? (t) => t[e]() : (t, r) => {
|
|
1508
1508
|
throw new P(`Response type '${e}' is not supported`, P.ERR_NOT_SUPPORT, r);
|
|
1509
1509
|
});
|
|
1510
1510
|
});
|
|
1511
1511
|
})(new Response());
|
|
1512
|
-
const
|
|
1512
|
+
const Yo = async (n) => {
|
|
1513
1513
|
if (n == null)
|
|
1514
1514
|
return 0;
|
|
1515
1515
|
if (d.isBlob(n))
|
|
@@ -1519,12 +1519,12 @@ const Ko = async (n) => {
|
|
|
1519
1519
|
if (d.isArrayBufferView(n) || d.isArrayBuffer(n))
|
|
1520
1520
|
return n.byteLength;
|
|
1521
1521
|
if (d.isURLSearchParams(n) && (n = n + ""), d.isString(n))
|
|
1522
|
-
return (await
|
|
1523
|
-
},
|
|
1522
|
+
return (await Pn(n)).byteLength;
|
|
1523
|
+
}, Go = async (n, e) => {
|
|
1524
1524
|
const t = d.toFiniteNumber(n.getContentLength());
|
|
1525
|
-
return t == null ?
|
|
1525
|
+
return t == null ? Yo(e) : t;
|
|
1526
1526
|
};
|
|
1527
|
-
var
|
|
1527
|
+
var Xo = cn && (async (n) => {
|
|
1528
1528
|
let {
|
|
1529
1529
|
url: e,
|
|
1530
1530
|
method: t,
|
|
@@ -1537,33 +1537,33 @@ var Go = an && (async (n) => {
|
|
|
1537
1537
|
responseType: a,
|
|
1538
1538
|
headers: f,
|
|
1539
1539
|
withCredentials: h = "same-origin",
|
|
1540
|
-
fetchOptions:
|
|
1541
|
-
} =
|
|
1540
|
+
fetchOptions: g
|
|
1541
|
+
} = Rs(n);
|
|
1542
1542
|
a = a ? (a + "").toLowerCase() : "text";
|
|
1543
|
-
let [p, y] = s || i || o ?
|
|
1543
|
+
let [p, y] = s || i || o ? Ho([s, i], o) : [], v, b;
|
|
1544
1544
|
const m = () => {
|
|
1545
|
-
!
|
|
1545
|
+
!v && setTimeout(() => {
|
|
1546
1546
|
p && p.unsubscribe();
|
|
1547
|
-
}),
|
|
1547
|
+
}), v = !0;
|
|
1548
1548
|
};
|
|
1549
1549
|
let A;
|
|
1550
1550
|
try {
|
|
1551
|
-
if (u &&
|
|
1551
|
+
if (u && Ko && t !== "get" && t !== "head" && (A = await Go(f, r)) !== 0) {
|
|
1552
1552
|
let C = new Request(e, {
|
|
1553
1553
|
method: "POST",
|
|
1554
1554
|
body: r,
|
|
1555
1555
|
duplex: "half"
|
|
1556
1556
|
}), M;
|
|
1557
1557
|
if (d.isFormData(r) && (M = C.headers.get("content-type")) && f.setContentType(M), C.body) {
|
|
1558
|
-
const [E, B] =
|
|
1558
|
+
const [E, B] = Cr(
|
|
1559
1559
|
A,
|
|
1560
|
-
Gt(
|
|
1560
|
+
Gt(Ar(u))
|
|
1561
1561
|
);
|
|
1562
|
-
r =
|
|
1562
|
+
r = Lr(C.body, kr, E, B, Pn);
|
|
1563
1563
|
}
|
|
1564
1564
|
}
|
|
1565
1565
|
d.isString(h) || (h = h ? "include" : "omit"), b = new Request(e, {
|
|
1566
|
-
...
|
|
1566
|
+
...g,
|
|
1567
1567
|
signal: p,
|
|
1568
1568
|
method: t.toUpperCase(),
|
|
1569
1569
|
headers: f.normalize().toJSON(),
|
|
@@ -1572,27 +1572,27 @@ var Go = an && (async (n) => {
|
|
|
1572
1572
|
credentials: h
|
|
1573
1573
|
});
|
|
1574
1574
|
let R = await fetch(b);
|
|
1575
|
-
const x =
|
|
1576
|
-
if (
|
|
1575
|
+
const x = Fn && (a === "stream" || a === "response");
|
|
1576
|
+
if (Fn && (c || x)) {
|
|
1577
1577
|
const C = {};
|
|
1578
1578
|
["status", "statusText", "headers"].forEach((N) => {
|
|
1579
1579
|
C[N] = R[N];
|
|
1580
1580
|
});
|
|
1581
|
-
const M = d.toFiniteNumber(R.headers.get("content-length")), [E, B] = c &&
|
|
1581
|
+
const M = d.toFiniteNumber(R.headers.get("content-length")), [E, B] = c && Cr(
|
|
1582
1582
|
M,
|
|
1583
|
-
Gt(
|
|
1583
|
+
Gt(Ar(c), !0)
|
|
1584
1584
|
) || [];
|
|
1585
1585
|
R = new Response(
|
|
1586
|
-
|
|
1586
|
+
Lr(R.body, kr, E, () => {
|
|
1587
1587
|
B && B(), x && m();
|
|
1588
|
-
},
|
|
1588
|
+
}, Pn),
|
|
1589
1589
|
C
|
|
1590
1590
|
);
|
|
1591
1591
|
}
|
|
1592
1592
|
a = a || "text";
|
|
1593
1593
|
let D = await Xt[d.findKey(Xt, a) || "text"](R, n);
|
|
1594
1594
|
return !x && m(), y && y(), await new Promise((C, M) => {
|
|
1595
|
-
|
|
1595
|
+
_s(C, M, {
|
|
1596
1596
|
data: D,
|
|
1597
1597
|
headers: ke.from(R.headers),
|
|
1598
1598
|
status: R.status,
|
|
@@ -1610,12 +1610,12 @@ var Go = an && (async (n) => {
|
|
|
1610
1610
|
) : P.from(R, R && R.code, n, b);
|
|
1611
1611
|
}
|
|
1612
1612
|
});
|
|
1613
|
-
const
|
|
1614
|
-
http:
|
|
1615
|
-
xhr:
|
|
1616
|
-
fetch:
|
|
1613
|
+
const Bn = {
|
|
1614
|
+
http: fo,
|
|
1615
|
+
xhr: $o,
|
|
1616
|
+
fetch: Xo
|
|
1617
1617
|
};
|
|
1618
|
-
d.forEach(
|
|
1618
|
+
d.forEach(Bn, (n, e) => {
|
|
1619
1619
|
if (n) {
|
|
1620
1620
|
try {
|
|
1621
1621
|
Object.defineProperty(n, "name", { value: e });
|
|
@@ -1624,8 +1624,8 @@ d.forEach(Fn, (n, e) => {
|
|
|
1624
1624
|
Object.defineProperty(n, "adapterName", { value: e });
|
|
1625
1625
|
}
|
|
1626
1626
|
});
|
|
1627
|
-
const
|
|
1628
|
-
var
|
|
1627
|
+
const Nr = (n) => `- ${n}`, Qo = (n) => d.isFunction(n) || n === null || n === !1;
|
|
1628
|
+
var Os = {
|
|
1629
1629
|
getAdapter: (n) => {
|
|
1630
1630
|
n = d.isArray(n) ? n : [n];
|
|
1631
1631
|
const { length: e } = n;
|
|
@@ -1634,7 +1634,7 @@ var Ts = {
|
|
|
1634
1634
|
for (let i = 0; i < e; i++) {
|
|
1635
1635
|
t = n[i];
|
|
1636
1636
|
let o;
|
|
1637
|
-
if (r = t, !
|
|
1637
|
+
if (r = t, !Qo(t) && (r = Bn[(o = String(t)).toLowerCase()], r === void 0))
|
|
1638
1638
|
throw new P(`Unknown adapter '${o}'`);
|
|
1639
1639
|
if (r)
|
|
1640
1640
|
break;
|
|
@@ -1645,8 +1645,8 @@ var Ts = {
|
|
|
1645
1645
|
([c, u]) => `adapter ${c} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1646
1646
|
);
|
|
1647
1647
|
let o = e ? i.length > 1 ? `since :
|
|
1648
|
-
` + i.map(
|
|
1649
|
-
`) : " " +
|
|
1648
|
+
` + i.map(Nr).join(`
|
|
1649
|
+
`) : " " + Nr(i[0]) : "as no adapter specified";
|
|
1650
1650
|
throw new P(
|
|
1651
1651
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1652
1652
|
"ERR_NOT_SUPPORT"
|
|
@@ -1654,40 +1654,40 @@ var Ts = {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
return r;
|
|
1656
1656
|
},
|
|
1657
|
-
adapters:
|
|
1657
|
+
adapters: Bn
|
|
1658
1658
|
};
|
|
1659
|
-
function
|
|
1659
|
+
function En(n) {
|
|
1660
1660
|
if (n.cancelToken && n.cancelToken.throwIfRequested(), n.signal && n.signal.aborted)
|
|
1661
1661
|
throw new gt(null, n);
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1664
|
-
return
|
|
1663
|
+
function Pr(n) {
|
|
1664
|
+
return En(n), n.headers = ke.from(n.headers), n.data = _n.call(
|
|
1665
1665
|
n,
|
|
1666
1666
|
n.transformRequest
|
|
1667
|
-
), ["post", "put", "patch"].indexOf(n.method) !== -1 && n.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1668
|
-
return
|
|
1667
|
+
), ["post", "put", "patch"].indexOf(n.method) !== -1 && n.headers.setContentType("application/x-www-form-urlencoded", !1), Os.getAdapter(n.adapter || tr.adapter)(n).then(function(r) {
|
|
1668
|
+
return En(n), r.data = _n.call(
|
|
1669
1669
|
n,
|
|
1670
1670
|
n.transformResponse,
|
|
1671
1671
|
r
|
|
1672
1672
|
), r.headers = ke.from(r.headers), r;
|
|
1673
1673
|
}, function(r) {
|
|
1674
|
-
return
|
|
1674
|
+
return bs(r) || (En(n), r && r.response && (r.response.data = _n.call(
|
|
1675
1675
|
n,
|
|
1676
1676
|
n.transformResponse,
|
|
1677
1677
|
r.response
|
|
1678
1678
|
), r.response.headers = ke.from(r.response.headers))), Promise.reject(r);
|
|
1679
1679
|
});
|
|
1680
1680
|
}
|
|
1681
|
-
const
|
|
1681
|
+
const xs = "1.7.4", nr = {};
|
|
1682
1682
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((n, e) => {
|
|
1683
|
-
|
|
1683
|
+
nr[n] = function(r) {
|
|
1684
1684
|
return typeof r === n || "a" + (e < 1 ? "n " : " ") + n;
|
|
1685
1685
|
};
|
|
1686
1686
|
});
|
|
1687
|
-
const
|
|
1688
|
-
|
|
1687
|
+
const Fr = {};
|
|
1688
|
+
nr.transitional = function(e, t, r) {
|
|
1689
1689
|
function s(i, o) {
|
|
1690
|
-
return "[Axios v" +
|
|
1690
|
+
return "[Axios v" + xs + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1691
1691
|
}
|
|
1692
1692
|
return (i, o, c) => {
|
|
1693
1693
|
if (e === !1)
|
|
@@ -1695,7 +1695,7 @@ tr.transitional = function(e, t, r) {
|
|
|
1695
1695
|
s(o, " has been removed" + (t ? " in " + t : "")),
|
|
1696
1696
|
P.ERR_DEPRECATED
|
|
1697
1697
|
);
|
|
1698
|
-
return t && !
|
|
1698
|
+
return t && !Fr[o] && (Fr[o] = !0, console.warn(
|
|
1699
1699
|
s(
|
|
1700
1700
|
o,
|
|
1701
1701
|
" has been deprecated since v" + t + " and will be removed in the near future"
|
|
@@ -1703,7 +1703,7 @@ tr.transitional = function(e, t, r) {
|
|
|
1703
1703
|
)), e ? e(i, o, c) : !0;
|
|
1704
1704
|
};
|
|
1705
1705
|
};
|
|
1706
|
-
function
|
|
1706
|
+
function Zo(n, e, t) {
|
|
1707
1707
|
if (typeof n != "object")
|
|
1708
1708
|
throw new P("options must be an object", P.ERR_BAD_OPTION_VALUE);
|
|
1709
1709
|
const r = Object.keys(n);
|
|
@@ -1720,16 +1720,16 @@ function Qo(n, e, t) {
|
|
|
1720
1720
|
throw new P("Unknown option " + i, P.ERR_BAD_OPTION);
|
|
1721
1721
|
}
|
|
1722
1722
|
}
|
|
1723
|
-
var
|
|
1724
|
-
assertOptions:
|
|
1725
|
-
validators:
|
|
1723
|
+
var In = {
|
|
1724
|
+
assertOptions: Zo,
|
|
1725
|
+
validators: nr
|
|
1726
1726
|
};
|
|
1727
|
-
const Ge =
|
|
1727
|
+
const Ge = In.validators;
|
|
1728
1728
|
class Qt {
|
|
1729
1729
|
constructor(e) {
|
|
1730
1730
|
this.defaults = e, this.interceptors = {
|
|
1731
|
-
request: new
|
|
1732
|
-
response: new
|
|
1731
|
+
request: new Or(),
|
|
1732
|
+
response: new Or()
|
|
1733
1733
|
};
|
|
1734
1734
|
}
|
|
1735
1735
|
async request(e, t) {
|
|
@@ -1752,13 +1752,13 @@ class Qt {
|
|
|
1752
1752
|
_request(e, t) {
|
|
1753
1753
|
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t = ut(this.defaults, t);
|
|
1754
1754
|
const { transitional: r, paramsSerializer: s, headers: i } = t;
|
|
1755
|
-
r !== void 0 &&
|
|
1755
|
+
r !== void 0 && In.assertOptions(r, {
|
|
1756
1756
|
silentJSONParsing: Ge.transitional(Ge.boolean),
|
|
1757
1757
|
forcedJSONParsing: Ge.transitional(Ge.boolean),
|
|
1758
1758
|
clarifyTimeoutError: Ge.transitional(Ge.boolean)
|
|
1759
1759
|
}, !1), s != null && (d.isFunction(s) ? t.paramsSerializer = {
|
|
1760
1760
|
serialize: s
|
|
1761
|
-
} :
|
|
1761
|
+
} : In.assertOptions(s, {
|
|
1762
1762
|
encode: Ge.function,
|
|
1763
1763
|
serialize: Ge.function
|
|
1764
1764
|
}, !0)), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1774,44 +1774,44 @@ class Qt {
|
|
|
1774
1774
|
), t.headers = ke.concat(o, i);
|
|
1775
1775
|
const c = [];
|
|
1776
1776
|
let u = !0;
|
|
1777
|
-
this.interceptors.request.forEach(function(
|
|
1778
|
-
typeof
|
|
1777
|
+
this.interceptors.request.forEach(function(v) {
|
|
1778
|
+
typeof v.runWhen == "function" && v.runWhen(t) === !1 || (u = u && v.synchronous, c.unshift(v.fulfilled, v.rejected));
|
|
1779
1779
|
});
|
|
1780
1780
|
const a = [];
|
|
1781
|
-
this.interceptors.response.forEach(function(
|
|
1782
|
-
a.push(
|
|
1781
|
+
this.interceptors.response.forEach(function(v) {
|
|
1782
|
+
a.push(v.fulfilled, v.rejected);
|
|
1783
1783
|
});
|
|
1784
|
-
let f, h = 0,
|
|
1784
|
+
let f, h = 0, g;
|
|
1785
1785
|
if (!u) {
|
|
1786
|
-
const y = [
|
|
1787
|
-
for (y.unshift.apply(y, c), y.push.apply(y, a),
|
|
1786
|
+
const y = [Pr.bind(this), void 0];
|
|
1787
|
+
for (y.unshift.apply(y, c), y.push.apply(y, a), g = y.length, f = Promise.resolve(t); h < g; )
|
|
1788
1788
|
f = f.then(y[h++], y[h++]);
|
|
1789
1789
|
return f;
|
|
1790
1790
|
}
|
|
1791
|
-
|
|
1791
|
+
g = c.length;
|
|
1792
1792
|
let p = t;
|
|
1793
|
-
for (h = 0; h <
|
|
1794
|
-
const y = c[h++],
|
|
1793
|
+
for (h = 0; h < g; ) {
|
|
1794
|
+
const y = c[h++], v = c[h++];
|
|
1795
1795
|
try {
|
|
1796
1796
|
p = y(p);
|
|
1797
1797
|
} catch (b) {
|
|
1798
|
-
|
|
1798
|
+
v.call(this, b);
|
|
1799
1799
|
break;
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
1802
1802
|
try {
|
|
1803
|
-
f =
|
|
1803
|
+
f = Pr.call(this, p);
|
|
1804
1804
|
} catch (y) {
|
|
1805
1805
|
return Promise.reject(y);
|
|
1806
1806
|
}
|
|
1807
|
-
for (h = 0,
|
|
1807
|
+
for (h = 0, g = a.length; h < g; )
|
|
1808
1808
|
f = f.then(a[h++], a[h++]);
|
|
1809
1809
|
return f;
|
|
1810
1810
|
}
|
|
1811
1811
|
getUri(e) {
|
|
1812
1812
|
e = ut(this.defaults, e);
|
|
1813
|
-
const t =
|
|
1814
|
-
return
|
|
1813
|
+
const t = Es(e.baseURL, e.url);
|
|
1814
|
+
return gs(t, e.params, e.paramsSerializer);
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
1817
|
d.forEach(["delete", "get", "head", "options"], function(e) {
|
|
@@ -1839,7 +1839,7 @@ d.forEach(["post", "put", "patch"], function(e) {
|
|
|
1839
1839
|
Qt.prototype[e] = t(), Qt.prototype[e + "Form"] = t(!0);
|
|
1840
1840
|
});
|
|
1841
1841
|
var zt = Qt;
|
|
1842
|
-
class
|
|
1842
|
+
class rr {
|
|
1843
1843
|
constructor(e) {
|
|
1844
1844
|
if (typeof e != "function")
|
|
1845
1845
|
throw new TypeError("executor must be a function.");
|
|
@@ -1887,20 +1887,20 @@ class nr {
|
|
|
1887
1887
|
static source() {
|
|
1888
1888
|
let e;
|
|
1889
1889
|
return {
|
|
1890
|
-
token: new
|
|
1890
|
+
token: new rr(function(s) {
|
|
1891
1891
|
e = s;
|
|
1892
1892
|
}),
|
|
1893
1893
|
cancel: e
|
|
1894
1894
|
};
|
|
1895
1895
|
}
|
|
1896
1896
|
}
|
|
1897
|
-
var
|
|
1898
|
-
function
|
|
1897
|
+
var ea = rr;
|
|
1898
|
+
function ta(n) {
|
|
1899
1899
|
return function(t) {
|
|
1900
1900
|
return n.apply(null, t);
|
|
1901
1901
|
};
|
|
1902
1902
|
}
|
|
1903
|
-
function
|
|
1903
|
+
function na(n) {
|
|
1904
1904
|
return d.isObject(n) && n.isAxiosError === !0;
|
|
1905
1905
|
}
|
|
1906
1906
|
const Un = {
|
|
@@ -1971,55 +1971,64 @@ const Un = {
|
|
|
1971
1971
|
Object.entries(Un).forEach(([n, e]) => {
|
|
1972
1972
|
Un[e] = n;
|
|
1973
1973
|
});
|
|
1974
|
-
var
|
|
1975
|
-
function
|
|
1976
|
-
const e = new zt(n), t =
|
|
1974
|
+
var ra = Un;
|
|
1975
|
+
function Cs(n) {
|
|
1976
|
+
const e = new zt(n), t = is(zt.prototype.request, e);
|
|
1977
1977
|
return d.extend(t, zt.prototype, e, { allOwnKeys: !0 }), d.extend(t, e, null, { allOwnKeys: !0 }), t.create = function(s) {
|
|
1978
|
-
return
|
|
1978
|
+
return Cs(ut(n, s));
|
|
1979
1979
|
}, t;
|
|
1980
1980
|
}
|
|
1981
|
-
const ue =
|
|
1981
|
+
const ue = Cs(tr);
|
|
1982
1982
|
ue.Axios = zt;
|
|
1983
1983
|
ue.CanceledError = gt;
|
|
1984
|
-
ue.CancelToken =
|
|
1985
|
-
ue.isCancel =
|
|
1986
|
-
ue.VERSION =
|
|
1987
|
-
ue.toFormData =
|
|
1984
|
+
ue.CancelToken = ea;
|
|
1985
|
+
ue.isCancel = bs;
|
|
1986
|
+
ue.VERSION = xs;
|
|
1987
|
+
ue.toFormData = on;
|
|
1988
1988
|
ue.AxiosError = P;
|
|
1989
1989
|
ue.Cancel = ue.CanceledError;
|
|
1990
1990
|
ue.all = function(e) {
|
|
1991
1991
|
return Promise.all(e);
|
|
1992
1992
|
};
|
|
1993
|
-
ue.spread =
|
|
1994
|
-
ue.isAxiosError =
|
|
1993
|
+
ue.spread = ta;
|
|
1994
|
+
ue.isAxiosError = na;
|
|
1995
1995
|
ue.mergeConfig = ut;
|
|
1996
1996
|
ue.AxiosHeaders = ke;
|
|
1997
|
-
ue.formToJSON = (n) =>
|
|
1998
|
-
ue.getAdapter =
|
|
1999
|
-
ue.HttpStatusCode =
|
|
1997
|
+
ue.formToJSON = (n) => ws(d.isHTMLForm(n) ? new FormData(n) : n);
|
|
1998
|
+
ue.getAdapter = Os.getAdapter;
|
|
1999
|
+
ue.HttpStatusCode = ra;
|
|
2000
2000
|
ue.default = ue;
|
|
2001
|
-
var
|
|
2001
|
+
var sa = ue, Zt = H && H.__assign || function() {
|
|
2002
|
+
return Zt = Object.assign || function(n) {
|
|
2003
|
+
for (var e, t = 1, r = arguments.length; t < r; t++) {
|
|
2004
|
+
e = arguments[t];
|
|
2005
|
+
for (var s in e)
|
|
2006
|
+
Object.prototype.hasOwnProperty.call(e, s) && (n[s] = e[s]);
|
|
2007
|
+
}
|
|
2008
|
+
return n;
|
|
2009
|
+
}, Zt.apply(this, arguments);
|
|
2010
|
+
};
|
|
2002
2011
|
Object.defineProperty(ct, "__esModule", { value: !0 });
|
|
2003
2012
|
ct.getRequestHeaders = ct.getAxiosClient = void 0;
|
|
2004
|
-
var
|
|
2005
|
-
function
|
|
2006
|
-
return
|
|
2013
|
+
var ia = sa;
|
|
2014
|
+
function oa(n, e, t, r, s) {
|
|
2015
|
+
return ia.default.create({
|
|
2007
2016
|
baseURL: n,
|
|
2008
|
-
headers:
|
|
2017
|
+
headers: As(e, r, t, n, s),
|
|
2009
2018
|
withCredentials: !0
|
|
2010
2019
|
});
|
|
2011
2020
|
}
|
|
2012
|
-
ct.getAxiosClient =
|
|
2013
|
-
function
|
|
2021
|
+
ct.getAxiosClient = oa;
|
|
2022
|
+
function As(n, e, t, r, s) {
|
|
2014
2023
|
n === void 0 && (n = !1);
|
|
2015
|
-
var
|
|
2024
|
+
var i = {
|
|
2016
2025
|
Accept: "application/json",
|
|
2017
2026
|
"Content-Type": "application/json; charset=utf-8"
|
|
2018
2027
|
};
|
|
2019
|
-
return n && e && t && (
|
|
2028
|
+
return n && e && t && (i.Authorization = "".concat(e, " ").concat(t())), typeof window < "u" && typeof document < "u" && (window.location && (r && r !== window.location.origin || (i["X-Frappe-Site-Name"] = window.location.hostname)), window.csrf_token && window.csrf_token !== "{{ csrf_token }}" && (i["X-Frappe-CSRF-Token"] = window.csrf_token)), Zt(Zt({}, i), s != null ? s : {});
|
|
2020
2029
|
}
|
|
2021
|
-
ct.getRequestHeaders =
|
|
2022
|
-
var pt =
|
|
2030
|
+
ct.getRequestHeaders = As;
|
|
2031
|
+
var pt = H && H.__assign || function() {
|
|
2023
2032
|
return pt = Object.assign || function(n) {
|
|
2024
2033
|
for (var e, t = 1, r = arguments.length; t < r; t++) {
|
|
2025
2034
|
e = arguments[t];
|
|
@@ -2028,7 +2037,7 @@ var pt = z && z.__assign || function() {
|
|
|
2028
2037
|
}
|
|
2029
2038
|
return n;
|
|
2030
2039
|
}, pt.apply(this, arguments);
|
|
2031
|
-
},
|
|
2040
|
+
}, aa = H && H.__awaiter || function(n, e, t, r) {
|
|
2032
2041
|
function s(i) {
|
|
2033
2042
|
return i instanceof t ? i : new t(function(o) {
|
|
2034
2043
|
o(i);
|
|
@@ -2054,7 +2063,7 @@ var pt = z && z.__assign || function() {
|
|
|
2054
2063
|
}
|
|
2055
2064
|
a((r = r.apply(n, e || [])).next());
|
|
2056
2065
|
});
|
|
2057
|
-
},
|
|
2066
|
+
}, ca = H && H.__generator || function(n, e) {
|
|
2058
2067
|
var t = { label: 0, sent: function() {
|
|
2059
2068
|
if (i[0] & 1)
|
|
2060
2069
|
throw i[1];
|
|
@@ -2121,54 +2130,54 @@ var pt = z && z.__assign || function() {
|
|
|
2121
2130
|
};
|
|
2122
2131
|
Object.defineProperty(Lt, "__esModule", { value: !0 });
|
|
2123
2132
|
Lt.FrappeFileUpload = void 0;
|
|
2124
|
-
var
|
|
2125
|
-
function n(e, t, r, s, i) {
|
|
2126
|
-
this.appURL = e, this.axios = t, this.useToken = r != null ? r : !1, this.token = s, this.tokenType = i;
|
|
2133
|
+
var ua = ct, la = function() {
|
|
2134
|
+
function n(e, t, r, s, i, o) {
|
|
2135
|
+
this.appURL = e, this.axios = t, this.useToken = r != null ? r : !1, this.token = s, this.tokenType = i, this.customHeaders = o;
|
|
2127
2136
|
}
|
|
2128
2137
|
return n.prototype.uploadFile = function(e, t, r, s) {
|
|
2129
|
-
return s === void 0 && (s = "upload_file"),
|
|
2130
|
-
var i, o, c, u, a, f, h,
|
|
2131
|
-
return
|
|
2132
|
-
return i = new FormData(), e && i.append("file", e, e.name), o = t.isPrivate, c = t.folder, u = t.file_url, a = t.doctype, f = t.docname, h = t.fieldname,
|
|
2133
|
-
var
|
|
2134
|
-
i.append(y,
|
|
2138
|
+
return s === void 0 && (s = "upload_file"), aa(this, void 0, void 0, function() {
|
|
2139
|
+
var i, o, c, u, a, f, h, g;
|
|
2140
|
+
return ca(this, function(p) {
|
|
2141
|
+
return i = new FormData(), e && i.append("file", e, e.name), o = t.isPrivate, c = t.folder, u = t.file_url, a = t.doctype, f = t.docname, h = t.fieldname, g = t.otherData, o && i.append("is_private", "1"), c && i.append("folder", c), u && i.append("file_url", u), a && f && (i.append("doctype", a), i.append("docname", f), h && i.append("fieldname", h)), g && Object.keys(g).forEach(function(y) {
|
|
2142
|
+
var v = g[y];
|
|
2143
|
+
i.append(y, v);
|
|
2135
2144
|
}), [2, this.axios.post("/api/method/".concat(s), i, {
|
|
2136
2145
|
onUploadProgress: function(y) {
|
|
2137
2146
|
r && r(y.loaded, y.total, y);
|
|
2138
2147
|
},
|
|
2139
|
-
headers: pt(pt({}, (0,
|
|
2148
|
+
headers: pt(pt({}, (0, ua.getRequestHeaders)(this.useToken, this.tokenType, this.token, this.appURL, this.customHeaders)), { "Content-Type": "multipart/form-data" })
|
|
2140
2149
|
}).catch(function(y) {
|
|
2141
|
-
var
|
|
2142
|
-
throw pt(pt({}, y.response.data), { httpStatus: y.response.status, httpStatusText: y.response.statusText, message: (
|
|
2150
|
+
var v, b;
|
|
2151
|
+
throw pt(pt({}, y.response.data), { httpStatus: y.response.status, httpStatusText: y.response.statusText, message: (v = y.response.data.message) !== null && v !== void 0 ? v : "There was an error while uploading the file.", exception: (b = y.response.data.exception) !== null && b !== void 0 ? b : "" });
|
|
2143
2152
|
})];
|
|
2144
2153
|
});
|
|
2145
2154
|
});
|
|
2146
2155
|
}, n;
|
|
2147
2156
|
}();
|
|
2148
|
-
Lt.FrappeFileUpload =
|
|
2149
|
-
var
|
|
2150
|
-
function
|
|
2151
|
-
if (
|
|
2157
|
+
Lt.FrappeFileUpload = la;
|
|
2158
|
+
var Br;
|
|
2159
|
+
function fa() {
|
|
2160
|
+
if (Br)
|
|
2152
2161
|
return wt;
|
|
2153
|
-
|
|
2154
|
-
var n =
|
|
2155
|
-
function o(c, u, a) {
|
|
2156
|
-
var
|
|
2157
|
-
this.url = c, this.name = a != null ? a : "FrappeApp", this.useToken = (
|
|
2162
|
+
Br = 1, Object.defineProperty(wt, "__esModule", { value: !0 }), wt.FrappeApp = void 0;
|
|
2163
|
+
var n = Ds(), e = At, t = Dt, r = Lt, s = ct, i = function() {
|
|
2164
|
+
function o(c, u, a, f) {
|
|
2165
|
+
var h, g;
|
|
2166
|
+
this.url = c, this.name = a != null ? a : "FrappeApp", this.useToken = (h = u == null ? void 0 : u.useToken) !== null && h !== void 0 ? h : !1, this.token = u == null ? void 0 : u.token, this.tokenType = (g = u == null ? void 0 : u.type) !== null && g !== void 0 ? g : "Bearer", this.customHeaders = f, this.axios = (0, s.getAxiosClient)(this.url, this.useToken, this.token, this.tokenType, this.customHeaders);
|
|
2158
2167
|
}
|
|
2159
2168
|
return o.prototype.auth = function() {
|
|
2160
2169
|
return new n.FrappeAuth(this.url, this.axios, this.useToken, this.token, this.tokenType);
|
|
2161
2170
|
}, o.prototype.db = function() {
|
|
2162
2171
|
return new t.FrappeDB(this.url, this.axios, this.useToken, this.token, this.tokenType);
|
|
2163
2172
|
}, o.prototype.file = function() {
|
|
2164
|
-
return new r.FrappeFileUpload(this.url, this.axios, this.useToken, this.token, this.tokenType);
|
|
2173
|
+
return new r.FrappeFileUpload(this.url, this.axios, this.useToken, this.token, this.tokenType, this.customHeaders);
|
|
2165
2174
|
}, o.prototype.call = function() {
|
|
2166
2175
|
return new e.FrappeCall(this.url, this.axios, this.useToken, this.token, this.tokenType);
|
|
2167
2176
|
}, o;
|
|
2168
2177
|
}();
|
|
2169
2178
|
return wt.FrappeApp = i, wt;
|
|
2170
2179
|
}
|
|
2171
|
-
var
|
|
2180
|
+
var un = {}, Be = H && H.__assign || function() {
|
|
2172
2181
|
return Be = Object.assign || function(n) {
|
|
2173
2182
|
for (var e, t = 1, r = arguments.length; t < r; t++) {
|
|
2174
2183
|
e = arguments[t];
|
|
@@ -2177,7 +2186,7 @@ var cn = {}, Be = z && z.__assign || function() {
|
|
|
2177
2186
|
}
|
|
2178
2187
|
return n;
|
|
2179
2188
|
}, Be.apply(this, arguments);
|
|
2180
|
-
}, Bt =
|
|
2189
|
+
}, Bt = H && H.__awaiter || function(n, e, t, r) {
|
|
2181
2190
|
function s(i) {
|
|
2182
2191
|
return i instanceof t ? i : new t(function(o) {
|
|
2183
2192
|
o(i);
|
|
@@ -2203,7 +2212,7 @@ var cn = {}, Be = z && z.__assign || function() {
|
|
|
2203
2212
|
}
|
|
2204
2213
|
a((r = r.apply(n, e || [])).next());
|
|
2205
2214
|
});
|
|
2206
|
-
},
|
|
2215
|
+
}, It = H && H.__generator || function(n, e) {
|
|
2207
2216
|
var t = { label: 0, sent: function() {
|
|
2208
2217
|
if (i[0] & 1)
|
|
2209
2218
|
throw i[1];
|
|
@@ -2268,15 +2277,15 @@ var cn = {}, Be = z && z.__assign || function() {
|
|
|
2268
2277
|
return { value: a[0] ? a[1] : void 0, done: !0 };
|
|
2269
2278
|
}
|
|
2270
2279
|
};
|
|
2271
|
-
Object.defineProperty(
|
|
2272
|
-
|
|
2273
|
-
var
|
|
2280
|
+
Object.defineProperty(un, "__esModule", { value: !0 });
|
|
2281
|
+
un.FrappeAuth = void 0;
|
|
2282
|
+
var ha = function() {
|
|
2274
2283
|
function n(e, t, r, s, i) {
|
|
2275
2284
|
this.appURL = e, this.axios = t, this.useToken = r != null ? r : !1, this.token = s, this.tokenType = i;
|
|
2276
2285
|
}
|
|
2277
2286
|
return n.prototype.loginWithUsernamePassword = function(e) {
|
|
2278
2287
|
return Bt(this, void 0, void 0, function() {
|
|
2279
|
-
return
|
|
2288
|
+
return It(this, function(t) {
|
|
2280
2289
|
return [2, this.axios.post("/api/method/login", {
|
|
2281
2290
|
usr: e.username,
|
|
2282
2291
|
pwd: e.password,
|
|
@@ -2293,7 +2302,7 @@ var fa = function() {
|
|
|
2293
2302
|
});
|
|
2294
2303
|
}, n.prototype.getLoggedInUser = function() {
|
|
2295
2304
|
return Bt(this, void 0, void 0, function() {
|
|
2296
|
-
return
|
|
2305
|
+
return It(this, function(e) {
|
|
2297
2306
|
return [2, this.axios.get("/api/method/frappe.auth.get_logged_user").then(function(t) {
|
|
2298
2307
|
return t.data.message;
|
|
2299
2308
|
}).catch(function(t) {
|
|
@@ -2304,7 +2313,7 @@ var fa = function() {
|
|
|
2304
2313
|
});
|
|
2305
2314
|
}, n.prototype.logout = function() {
|
|
2306
2315
|
return Bt(this, void 0, void 0, function() {
|
|
2307
|
-
return
|
|
2316
|
+
return It(this, function(e) {
|
|
2308
2317
|
return [2, this.axios.post("/api/method/logout", {}).then(function() {
|
|
2309
2318
|
}).catch(function(t) {
|
|
2310
2319
|
var r, s;
|
|
@@ -2314,7 +2323,7 @@ var fa = function() {
|
|
|
2314
2323
|
});
|
|
2315
2324
|
}, n.prototype.forgetPassword = function(e) {
|
|
2316
2325
|
return Bt(this, void 0, void 0, function() {
|
|
2317
|
-
return
|
|
2326
|
+
return It(this, function(t) {
|
|
2318
2327
|
return [2, this.axios.post("/", {
|
|
2319
2328
|
cmd: "frappe.core.doctype.user.user.reset_password",
|
|
2320
2329
|
user: e
|
|
@@ -2327,11 +2336,11 @@ var fa = function() {
|
|
|
2327
2336
|
});
|
|
2328
2337
|
}, n;
|
|
2329
2338
|
}();
|
|
2330
|
-
|
|
2331
|
-
var
|
|
2332
|
-
function
|
|
2333
|
-
return
|
|
2334
|
-
var e =
|
|
2339
|
+
un.FrappeAuth = ha;
|
|
2340
|
+
var Ir;
|
|
2341
|
+
function Ds() {
|
|
2342
|
+
return Ir || (Ir = 1, function(n) {
|
|
2343
|
+
var e = H && H.__createBinding || (Object.create ? function(r, s, i, o) {
|
|
2335
2344
|
o === void 0 && (o = i);
|
|
2336
2345
|
var c = Object.getOwnPropertyDescriptor(s, i);
|
|
2337
2346
|
(!c || ("get" in c ? !s.__esModule : c.writable || c.configurable)) && (c = { enumerable: !0, get: function() {
|
|
@@ -2339,14 +2348,14 @@ function As() {
|
|
|
2339
2348
|
} }), Object.defineProperty(r, o, c);
|
|
2340
2349
|
} : function(r, s, i, o) {
|
|
2341
2350
|
o === void 0 && (o = i), r[o] = s[i];
|
|
2342
|
-
}), t =
|
|
2351
|
+
}), t = H && H.__exportStar || function(r, s) {
|
|
2343
2352
|
for (var i in r)
|
|
2344
2353
|
i !== "default" && !Object.prototype.hasOwnProperty.call(s, i) && e(s, r, i);
|
|
2345
2354
|
};
|
|
2346
|
-
Object.defineProperty(n, "__esModule", { value: !0 }), t(
|
|
2347
|
-
}(
|
|
2355
|
+
Object.defineProperty(n, "__esModule", { value: !0 }), t(fa(), n), t(un, n), t(Dt, n), t(Lt, n), t(At, n);
|
|
2356
|
+
}(vn)), vn;
|
|
2348
2357
|
}
|
|
2349
|
-
var
|
|
2358
|
+
var da = Ds(), ln = { exports: {} }, Rn = {};
|
|
2350
2359
|
/**
|
|
2351
2360
|
* @license React
|
|
2352
2361
|
* use-sync-external-store-shim.production.min.js
|
|
@@ -2357,42 +2366,42 @@ var ha = As(), un = { exports: {} }, En = {};
|
|
|
2357
2366
|
* LICENSE file in the root directory of this source tree.
|
|
2358
2367
|
*/
|
|
2359
2368
|
var Ur;
|
|
2360
|
-
function
|
|
2369
|
+
function pa() {
|
|
2361
2370
|
if (Ur)
|
|
2362
|
-
return
|
|
2371
|
+
return Rn;
|
|
2363
2372
|
Ur = 1;
|
|
2364
2373
|
var n = et;
|
|
2365
|
-
function e(h,
|
|
2366
|
-
return h ===
|
|
2374
|
+
function e(h, g) {
|
|
2375
|
+
return h === g && (h !== 0 || 1 / h === 1 / g) || h !== h && g !== g;
|
|
2367
2376
|
}
|
|
2368
2377
|
var t = typeof Object.is == "function" ? Object.is : e, r = n.useState, s = n.useEffect, i = n.useLayoutEffect, o = n.useDebugValue;
|
|
2369
|
-
function c(h,
|
|
2370
|
-
var p =
|
|
2378
|
+
function c(h, g) {
|
|
2379
|
+
var p = g(), y = r({ inst: { value: p, getSnapshot: g } }), v = y[0].inst, b = y[1];
|
|
2371
2380
|
return i(function() {
|
|
2372
|
-
|
|
2373
|
-
}, [h, p,
|
|
2374
|
-
return u(
|
|
2375
|
-
u(
|
|
2381
|
+
v.value = p, v.getSnapshot = g, u(v) && b({ inst: v });
|
|
2382
|
+
}, [h, p, g]), s(function() {
|
|
2383
|
+
return u(v) && b({ inst: v }), h(function() {
|
|
2384
|
+
u(v) && b({ inst: v });
|
|
2376
2385
|
});
|
|
2377
2386
|
}, [h]), o(p), p;
|
|
2378
2387
|
}
|
|
2379
2388
|
function u(h) {
|
|
2380
|
-
var
|
|
2389
|
+
var g = h.getSnapshot;
|
|
2381
2390
|
h = h.value;
|
|
2382
2391
|
try {
|
|
2383
|
-
var p =
|
|
2392
|
+
var p = g();
|
|
2384
2393
|
return !t(h, p);
|
|
2385
2394
|
} catch {
|
|
2386
2395
|
return !0;
|
|
2387
2396
|
}
|
|
2388
2397
|
}
|
|
2389
|
-
function a(h,
|
|
2390
|
-
return
|
|
2398
|
+
function a(h, g) {
|
|
2399
|
+
return g();
|
|
2391
2400
|
}
|
|
2392
2401
|
var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : c;
|
|
2393
|
-
return
|
|
2402
|
+
return Rn.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : f, Rn;
|
|
2394
2403
|
}
|
|
2395
|
-
var
|
|
2404
|
+
var Sn = {};
|
|
2396
2405
|
/**
|
|
2397
2406
|
* @license React
|
|
2398
2407
|
* use-sync-external-store-shim.development.js
|
|
@@ -2402,9 +2411,9 @@ var Rn = {};
|
|
|
2402
2411
|
* This source code is licensed under the MIT license found in the
|
|
2403
2412
|
* LICENSE file in the root directory of this source tree.
|
|
2404
2413
|
*/
|
|
2405
|
-
var
|
|
2406
|
-
function
|
|
2407
|
-
return
|
|
2414
|
+
var qr;
|
|
2415
|
+
function ma() {
|
|
2416
|
+
return qr || (qr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
2408
2417
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
2409
2418
|
var n = et, e = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
2410
2419
|
function t(R) {
|
|
@@ -2428,7 +2437,7 @@ function pa() {
|
|
|
2428
2437
|
return R === x && (R !== 0 || 1 / R === 1 / x) || R !== R && x !== x;
|
|
2429
2438
|
}
|
|
2430
2439
|
var i = typeof Object.is == "function" ? Object.is : s, o = n.useState, c = n.useEffect, u = n.useLayoutEffect, a = n.useDebugValue, f = !1, h = !1;
|
|
2431
|
-
function
|
|
2440
|
+
function g(R, x, D) {
|
|
2432
2441
|
f || n.startTransition !== void 0 && (f = !0, t("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
2433
2442
|
var C = x();
|
|
2434
2443
|
if (!h) {
|
|
@@ -2469,85 +2478,85 @@ function pa() {
|
|
|
2469
2478
|
function y(R, x, D) {
|
|
2470
2479
|
return x();
|
|
2471
2480
|
}
|
|
2472
|
-
var
|
|
2473
|
-
|
|
2474
|
-
}()),
|
|
2481
|
+
var v = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", b = !v, m = b ? y : g, A = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : m;
|
|
2482
|
+
Sn.useSyncExternalStore = A, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
2483
|
+
}()), Sn;
|
|
2475
2484
|
}
|
|
2476
2485
|
(function(n) {
|
|
2477
|
-
process.env.NODE_ENV === "production" ? n.exports =
|
|
2478
|
-
})(
|
|
2486
|
+
process.env.NODE_ENV === "production" ? n.exports = pa() : n.exports = ma();
|
|
2487
|
+
})(ln);
|
|
2479
2488
|
const Qe = () => {
|
|
2480
2489
|
}, ae = Qe(), Tt = Object, S = (n) => n === ae, be = (n) => typeof n == "function", qe = (n, e) => ({
|
|
2481
2490
|
...n,
|
|
2482
2491
|
...e
|
|
2483
|
-
}),
|
|
2484
|
-
let
|
|
2492
|
+
}), ya = (n) => be(n.then), Ut = /* @__PURE__ */ new WeakMap();
|
|
2493
|
+
let ga = 0;
|
|
2485
2494
|
const Ct = (n) => {
|
|
2486
2495
|
const e = typeof n, t = n && n.constructor, r = t == Date;
|
|
2487
2496
|
let s, i;
|
|
2488
2497
|
if (Tt(n) === n && !r && t != RegExp) {
|
|
2489
|
-
if (s =
|
|
2498
|
+
if (s = Ut.get(n), s)
|
|
2490
2499
|
return s;
|
|
2491
|
-
if (s = ++
|
|
2500
|
+
if (s = ++ga + "~", Ut.set(n, s), t == Array) {
|
|
2492
2501
|
for (s = "@", i = 0; i < n.length; i++)
|
|
2493
2502
|
s += Ct(n[i]) + ",";
|
|
2494
|
-
|
|
2503
|
+
Ut.set(n, s);
|
|
2495
2504
|
}
|
|
2496
2505
|
if (t == Tt) {
|
|
2497
2506
|
s = "#";
|
|
2498
2507
|
const o = Tt.keys(n).sort();
|
|
2499
2508
|
for (; !S(i = o.pop()); )
|
|
2500
2509
|
S(n[i]) || (s += i + ":" + Ct(n[i]) + ",");
|
|
2501
|
-
|
|
2510
|
+
Ut.set(n, s);
|
|
2502
2511
|
}
|
|
2503
2512
|
} else
|
|
2504
2513
|
s = r ? n.toJSON() : e == "symbol" ? n.toString() : e == "string" ? JSON.stringify(n) : "" + n;
|
|
2505
2514
|
return s;
|
|
2506
|
-
}, De = /* @__PURE__ */ new WeakMap(),
|
|
2515
|
+
}, De = /* @__PURE__ */ new WeakMap(), Tn = {}, qt = {}, sr = "undefined", fn = typeof window != sr, qn = typeof document != sr, va = () => fn && typeof window.requestAnimationFrame != sr, ze = (n, e) => {
|
|
2507
2516
|
const t = De.get(n);
|
|
2508
2517
|
return [
|
|
2509
|
-
() => !S(e) && n.get(e) ||
|
|
2518
|
+
() => !S(e) && n.get(e) || Tn,
|
|
2510
2519
|
(r) => {
|
|
2511
2520
|
if (!S(e)) {
|
|
2512
2521
|
const s = n.get(e);
|
|
2513
|
-
e in qt || (qt[e] = s), t[5](e, qe(s, r), s ||
|
|
2522
|
+
e in qt || (qt[e] = s), t[5](e, qe(s, r), s || Tn);
|
|
2514
2523
|
}
|
|
2515
2524
|
},
|
|
2516
2525
|
t[6],
|
|
2517
|
-
() => !S(e) && e in qt ? qt[e] : !S(e) && n.get(e) ||
|
|
2526
|
+
() => !S(e) && e in qt ? qt[e] : !S(e) && n.get(e) || Tn
|
|
2518
2527
|
];
|
|
2519
2528
|
};
|
|
2520
|
-
let
|
|
2521
|
-
const
|
|
2529
|
+
let Vn = !0;
|
|
2530
|
+
const wa = () => Vn, [jn, Mn] = fn && window.addEventListener ? [
|
|
2522
2531
|
window.addEventListener.bind(window),
|
|
2523
2532
|
window.removeEventListener.bind(window)
|
|
2524
2533
|
] : [
|
|
2525
2534
|
Qe,
|
|
2526
2535
|
Qe
|
|
2527
|
-
],
|
|
2528
|
-
const n =
|
|
2536
|
+
], ba = () => {
|
|
2537
|
+
const n = qn && document.visibilityState;
|
|
2529
2538
|
return S(n) || n !== "hidden";
|
|
2530
|
-
},
|
|
2531
|
-
|
|
2532
|
-
}),
|
|
2539
|
+
}, _a = (n) => (qn && document.addEventListener("visibilitychange", n), jn("focus", n), () => {
|
|
2540
|
+
qn && document.removeEventListener("visibilitychange", n), Mn("focus", n);
|
|
2541
|
+
}), Ea = (n) => {
|
|
2533
2542
|
const e = () => {
|
|
2534
|
-
|
|
2543
|
+
Vn = !0, n();
|
|
2535
2544
|
}, t = () => {
|
|
2536
|
-
|
|
2545
|
+
Vn = !1;
|
|
2537
2546
|
};
|
|
2538
|
-
return
|
|
2539
|
-
|
|
2547
|
+
return jn("online", e), jn("offline", t), () => {
|
|
2548
|
+
Mn("online", e), Mn("offline", t);
|
|
2540
2549
|
};
|
|
2541
|
-
}, Ea = {
|
|
2542
|
-
isOnline: va,
|
|
2543
|
-
isVisible: wa
|
|
2544
2550
|
}, Ra = {
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
},
|
|
2551
|
+
isOnline: wa,
|
|
2552
|
+
isVisible: ba
|
|
2553
|
+
}, Sa = {
|
|
2554
|
+
initFocus: _a,
|
|
2555
|
+
initReconnect: Ea
|
|
2556
|
+
}, en = !et.useId, lt = !fn || "Deno" in window, Ls = (n) => va() ? window.requestAnimationFrame(n) : setTimeout(n, 1), Ze = lt ? mt : Ri, On = typeof navigator < "u" && navigator.connection, Vr = !lt && On && ([
|
|
2548
2557
|
"slow-2g",
|
|
2549
2558
|
"2g"
|
|
2550
|
-
].includes(
|
|
2559
|
+
].includes(On.effectiveType) || On.saveData), ft = (n) => {
|
|
2551
2560
|
if (be(n))
|
|
2552
2561
|
try {
|
|
2553
2562
|
n = n();
|
|
@@ -2560,16 +2569,16 @@ const va = () => qn, [Vn, jn] = ln && window.addEventListener ? [
|
|
|
2560
2569
|
e
|
|
2561
2570
|
];
|
|
2562
2571
|
};
|
|
2563
|
-
let
|
|
2564
|
-
const
|
|
2565
|
-
var
|
|
2572
|
+
let Ta = 0;
|
|
2573
|
+
const tn = () => ++Ta, ks = 0, Ns = 1, Ps = 2, Oa = 3;
|
|
2574
|
+
var Ie = {
|
|
2566
2575
|
__proto__: null,
|
|
2567
|
-
ERROR_REVALIDATE_EVENT:
|
|
2568
|
-
FOCUS_EVENT:
|
|
2569
|
-
MUTATE_EVENT:
|
|
2570
|
-
RECONNECT_EVENT:
|
|
2576
|
+
ERROR_REVALIDATE_EVENT: Oa,
|
|
2577
|
+
FOCUS_EVENT: ks,
|
|
2578
|
+
MUTATE_EVENT: Ps,
|
|
2579
|
+
RECONNECT_EVENT: Ns
|
|
2571
2580
|
};
|
|
2572
|
-
async function
|
|
2581
|
+
async function ir(...n) {
|
|
2573
2582
|
const [e, t, r, s] = n, i = qe({
|
|
2574
2583
|
populateCache: !0,
|
|
2575
2584
|
throwOnError: !0
|
|
@@ -2579,32 +2588,32 @@ async function sr(...n) {
|
|
|
2579
2588
|
let o = i.populateCache;
|
|
2580
2589
|
const c = i.rollbackOnError;
|
|
2581
2590
|
let u = i.optimisticData;
|
|
2582
|
-
const a = (
|
|
2591
|
+
const a = (g) => typeof c == "function" ? c(g) : c !== !1, f = i.throwOnError;
|
|
2583
2592
|
if (be(t)) {
|
|
2584
|
-
const
|
|
2585
|
-
for (const
|
|
2586
|
-
!/^\$(inf|sub)\$/.test(
|
|
2593
|
+
const g = t, p = [], y = e.keys();
|
|
2594
|
+
for (const v of y)
|
|
2595
|
+
!/^\$(inf|sub)\$/.test(v) && g(e.get(v)._k) && p.push(v);
|
|
2587
2596
|
return Promise.all(p.map(h));
|
|
2588
2597
|
}
|
|
2589
2598
|
return h(t);
|
|
2590
|
-
async function h(
|
|
2591
|
-
const [p] = ft(
|
|
2599
|
+
async function h(g) {
|
|
2600
|
+
const [p] = ft(g);
|
|
2592
2601
|
if (!p)
|
|
2593
2602
|
return;
|
|
2594
|
-
const [y,
|
|
2603
|
+
const [y, v] = ze(e, p), [b, m, A, R] = De.get(e), x = () => {
|
|
2595
2604
|
const J = b[p];
|
|
2596
|
-
return (be(i.revalidate) ? i.revalidate(y().data,
|
|
2605
|
+
return (be(i.revalidate) ? i.revalidate(y().data, g) : i.revalidate !== !1) && (delete A[p], delete R[p], J && J[0]) ? J[0](Ps).then(() => y().data) : y().data;
|
|
2597
2606
|
};
|
|
2598
2607
|
if (n.length < 3)
|
|
2599
2608
|
return x();
|
|
2600
2609
|
let D = r, C;
|
|
2601
|
-
const M =
|
|
2610
|
+
const M = tn();
|
|
2602
2611
|
m[p] = [
|
|
2603
2612
|
M,
|
|
2604
2613
|
0
|
|
2605
2614
|
];
|
|
2606
2615
|
const E = !S(u), B = y(), N = B.data, Z = B._c, de = S(Z) ? N : Z;
|
|
2607
|
-
if (E && (u = be(u) ? u(de, N) : u,
|
|
2616
|
+
if (E && (u = be(u) ? u(de, N) : u, v({
|
|
2608
2617
|
data: u,
|
|
2609
2618
|
_c: de
|
|
2610
2619
|
})), be(D))
|
|
@@ -2613,7 +2622,7 @@ async function sr(...n) {
|
|
|
2613
2622
|
} catch (J) {
|
|
2614
2623
|
C = J;
|
|
2615
2624
|
}
|
|
2616
|
-
if (D &&
|
|
2625
|
+
if (D && ya(D))
|
|
2617
2626
|
if (D = await D.catch((J) => {
|
|
2618
2627
|
C = J;
|
|
2619
2628
|
}), M !== m[p][0]) {
|
|
@@ -2621,26 +2630,26 @@ async function sr(...n) {
|
|
|
2621
2630
|
throw C;
|
|
2622
2631
|
return D;
|
|
2623
2632
|
} else
|
|
2624
|
-
C && E && a(C) && (o = !0,
|
|
2633
|
+
C && E && a(C) && (o = !0, v({
|
|
2625
2634
|
data: de,
|
|
2626
2635
|
_c: ae
|
|
2627
2636
|
}));
|
|
2628
2637
|
if (o && !C)
|
|
2629
2638
|
if (be(o)) {
|
|
2630
2639
|
const J = o(D, de);
|
|
2631
|
-
|
|
2640
|
+
v({
|
|
2632
2641
|
data: J,
|
|
2633
2642
|
error: ae,
|
|
2634
2643
|
_c: ae
|
|
2635
2644
|
});
|
|
2636
2645
|
} else
|
|
2637
|
-
|
|
2646
|
+
v({
|
|
2638
2647
|
data: D,
|
|
2639
2648
|
error: ae,
|
|
2640
2649
|
_c: ae
|
|
2641
2650
|
});
|
|
2642
|
-
if (m[p][1] =
|
|
2643
|
-
|
|
2651
|
+
if (m[p][1] = tn(), Promise.resolve(x()).then(() => {
|
|
2652
|
+
v({
|
|
2644
2653
|
_c: ae
|
|
2645
2654
|
});
|
|
2646
2655
|
}), C) {
|
|
@@ -2651,22 +2660,22 @@ async function sr(...n) {
|
|
|
2651
2660
|
return D;
|
|
2652
2661
|
}
|
|
2653
2662
|
}
|
|
2654
|
-
const
|
|
2663
|
+
const jr = (n, e) => {
|
|
2655
2664
|
for (const t in n)
|
|
2656
2665
|
n[t][0] && n[t][0](e);
|
|
2657
|
-
},
|
|
2666
|
+
}, Fs = (n, e) => {
|
|
2658
2667
|
if (!De.has(n)) {
|
|
2659
|
-
const t = qe(
|
|
2668
|
+
const t = qe(Sa, e), r = {}, s = ir.bind(ae, n);
|
|
2660
2669
|
let i = Qe;
|
|
2661
2670
|
const o = {}, c = (f, h) => {
|
|
2662
|
-
const
|
|
2663
|
-
return o[f] =
|
|
2664
|
-
}, u = (f, h,
|
|
2671
|
+
const g = o[f] || [];
|
|
2672
|
+
return o[f] = g, g.push(h), () => g.splice(g.indexOf(h), 1);
|
|
2673
|
+
}, u = (f, h, g) => {
|
|
2665
2674
|
n.set(f, h);
|
|
2666
2675
|
const p = o[f];
|
|
2667
2676
|
if (p)
|
|
2668
2677
|
for (const y of p)
|
|
2669
|
-
y(h,
|
|
2678
|
+
y(h, g);
|
|
2670
2679
|
}, a = () => {
|
|
2671
2680
|
if (!De.has(n) && (De.set(n, [
|
|
2672
2681
|
r,
|
|
@@ -2677,7 +2686,7 @@ const Vr = (n, e) => {
|
|
|
2677
2686
|
u,
|
|
2678
2687
|
c
|
|
2679
2688
|
]), !lt)) {
|
|
2680
|
-
const f = t.initFocus(setTimeout.bind(ae,
|
|
2689
|
+
const f = t.initFocus(setTimeout.bind(ae, jr.bind(ae, r, ks))), h = t.initReconnect(setTimeout.bind(ae, jr.bind(ae, r, Ns)));
|
|
2681
2690
|
i = () => {
|
|
2682
2691
|
f && f(), h && h(), De.delete(n);
|
|
2683
2692
|
};
|
|
@@ -2694,59 +2703,59 @@ const Vr = (n, e) => {
|
|
|
2694
2703
|
n,
|
|
2695
2704
|
De.get(n)[4]
|
|
2696
2705
|
];
|
|
2697
|
-
},
|
|
2706
|
+
}, xa = (n, e, t, r, s) => {
|
|
2698
2707
|
const i = t.errorRetryCount, o = s.retryCount, c = ~~((Math.random() + 0.5) * (1 << (o < 8 ? o : 8))) * t.errorRetryInterval;
|
|
2699
2708
|
!S(i) && o > i || setTimeout(r, c, s);
|
|
2700
|
-
},
|
|
2709
|
+
}, Ca = (n, e) => Ct(n) == Ct(e), [hn, Aa] = Fs(/* @__PURE__ */ new Map()), or = qe(
|
|
2701
2710
|
{
|
|
2702
2711
|
onLoadingSlow: Qe,
|
|
2703
2712
|
onSuccess: Qe,
|
|
2704
2713
|
onError: Qe,
|
|
2705
|
-
onErrorRetry:
|
|
2714
|
+
onErrorRetry: xa,
|
|
2706
2715
|
onDiscarded: Qe,
|
|
2707
2716
|
revalidateOnFocus: !0,
|
|
2708
2717
|
revalidateOnReconnect: !0,
|
|
2709
2718
|
revalidateIfStale: !0,
|
|
2710
2719
|
shouldRetryOnError: !0,
|
|
2711
|
-
errorRetryInterval:
|
|
2720
|
+
errorRetryInterval: Vr ? 1e4 : 5e3,
|
|
2712
2721
|
focusThrottleInterval: 5 * 1e3,
|
|
2713
2722
|
dedupingInterval: 2 * 1e3,
|
|
2714
|
-
loadingTimeout:
|
|
2715
|
-
compare:
|
|
2723
|
+
loadingTimeout: Vr ? 5e3 : 3e3,
|
|
2724
|
+
compare: Ca,
|
|
2716
2725
|
isPaused: () => !1,
|
|
2717
|
-
cache:
|
|
2718
|
-
mutate:
|
|
2726
|
+
cache: hn,
|
|
2727
|
+
mutate: Aa,
|
|
2719
2728
|
fallback: {}
|
|
2720
2729
|
},
|
|
2721
|
-
|
|
2722
|
-
),
|
|
2730
|
+
Ra
|
|
2731
|
+
), Bs = (n, e) => {
|
|
2723
2732
|
const t = qe(n, e);
|
|
2724
2733
|
if (e) {
|
|
2725
2734
|
const { use: r, fallback: s } = n, { use: i, fallback: o } = e;
|
|
2726
2735
|
r && i && (t.use = r.concat(i)), s && o && (t.fallback = qe(s, o));
|
|
2727
2736
|
}
|
|
2728
2737
|
return t;
|
|
2729
|
-
},
|
|
2730
|
-
const { value: e } = n, t = he(
|
|
2738
|
+
}, $n = rs({}), Is = (n) => {
|
|
2739
|
+
const { value: e } = n, t = he($n), r = be(e), s = Ot(() => r ? e(t) : e, [
|
|
2731
2740
|
r,
|
|
2732
2741
|
t,
|
|
2733
2742
|
e
|
|
2734
|
-
]), i = Ot(() => r ? s :
|
|
2743
|
+
]), i = Ot(() => r ? s : Bs(t, s), [
|
|
2735
2744
|
r,
|
|
2736
2745
|
t,
|
|
2737
2746
|
s
|
|
2738
2747
|
]), o = s && s.provider, c = fe(ae);
|
|
2739
|
-
o && !c.current && (c.current =
|
|
2748
|
+
o && !c.current && (c.current = Fs(o(i.cache || hn), s));
|
|
2740
2749
|
const u = c.current;
|
|
2741
2750
|
return u && (i.cache = u[0], i.mutate = u[1]), Ze(() => {
|
|
2742
2751
|
if (u)
|
|
2743
2752
|
return u[2] && u[2](), u[3];
|
|
2744
|
-
}, []),
|
|
2753
|
+
}, []), Ei($n.Provider, qe(n, {
|
|
2745
2754
|
value: i
|
|
2746
2755
|
}));
|
|
2747
|
-
}, Us = "$inf$",
|
|
2748
|
-
|
|
2749
|
-
},
|
|
2756
|
+
}, Us = "$inf$", qs = fn && window.__SWR_DEVTOOLS_USE__, Da = qs ? window.__SWR_DEVTOOLS_USE__ : [], La = () => {
|
|
2757
|
+
qs && (window.__SWR_DEVTOOLS_REACT__ = et);
|
|
2758
|
+
}, Vs = (n) => be(n[1]) ? [
|
|
2750
2759
|
n[0],
|
|
2751
2760
|
n[1],
|
|
2752
2761
|
n[2] || {}
|
|
@@ -2754,34 +2763,34 @@ const Vr = (n, e) => {
|
|
|
2754
2763
|
n[0],
|
|
2755
2764
|
null,
|
|
2756
2765
|
(n[1] === null ? n[2] : n[1]) || {}
|
|
2757
|
-
],
|
|
2758
|
-
const [o] = ft(e), [, , , c] = De.get(
|
|
2766
|
+
], ka = () => qe(or, he($n)), Na = (n) => (e, t, r) => n(e, t && ((...i) => {
|
|
2767
|
+
const [o] = ft(e), [, , , c] = De.get(hn);
|
|
2759
2768
|
if (o.startsWith(Us))
|
|
2760
2769
|
return t(...i);
|
|
2761
2770
|
const u = c[o];
|
|
2762
2771
|
return S(u) ? t(...i) : (delete c[o], u);
|
|
2763
|
-
}), r),
|
|
2764
|
-
const r =
|
|
2772
|
+
}), r), Pa = Da.concat(Na), js = (n) => function(...t) {
|
|
2773
|
+
const r = ka(), [s, i, o] = Vs(t), c = Bs(r, o);
|
|
2765
2774
|
let u = n;
|
|
2766
|
-
const { use: a } = c, f = (a || []).concat(
|
|
2775
|
+
const { use: a } = c, f = (a || []).concat(Pa);
|
|
2767
2776
|
for (let h = f.length; h--; )
|
|
2768
2777
|
u = f[h](u);
|
|
2769
2778
|
return u(s, i || c.fetcher || null, c);
|
|
2770
|
-
},
|
|
2779
|
+
}, Ms = (n, e, t) => {
|
|
2771
2780
|
const r = e[n] || (e[n] = []);
|
|
2772
2781
|
return r.push(t), () => {
|
|
2773
2782
|
const s = r.indexOf(t);
|
|
2774
2783
|
s >= 0 && (r[s] = r[r.length - 1], r.pop());
|
|
2775
2784
|
};
|
|
2776
|
-
},
|
|
2777
|
-
const [r, s, i] =
|
|
2785
|
+
}, Fa = (n, e) => (...t) => {
|
|
2786
|
+
const [r, s, i] = Vs(t), o = (i.use || []).concat(e);
|
|
2778
2787
|
return n(r, s, {
|
|
2779
2788
|
...i,
|
|
2780
2789
|
use: o
|
|
2781
2790
|
});
|
|
2782
2791
|
};
|
|
2783
|
-
|
|
2784
|
-
const
|
|
2792
|
+
La();
|
|
2793
|
+
const Mr = et.use || ((n) => {
|
|
2785
2794
|
if (n.status === "pending")
|
|
2786
2795
|
throw n;
|
|
2787
2796
|
if (n.status === "fulfilled")
|
|
@@ -2791,11 +2800,11 @@ const jr = et.use || ((n) => {
|
|
|
2791
2800
|
}, (e) => {
|
|
2792
2801
|
n.status = "rejected", n.reason = e;
|
|
2793
2802
|
}), n);
|
|
2794
|
-
}),
|
|
2803
|
+
}), xn = {
|
|
2795
2804
|
dedupe: !0
|
|
2796
|
-
},
|
|
2797
|
-
const { cache: r, compare: s, suspense: i, fallbackData: o, revalidateOnMount: c, revalidateIfStale: u, refreshInterval: a, refreshWhenHidden: f, refreshWhenOffline: h, keepPreviousData:
|
|
2798
|
-
for (const q in
|
|
2805
|
+
}, Ba = (n, e, t) => {
|
|
2806
|
+
const { cache: r, compare: s, suspense: i, fallbackData: o, revalidateOnMount: c, revalidateIfStale: u, refreshInterval: a, refreshWhenHidden: f, refreshWhenOffline: h, keepPreviousData: g } = t, [p, y, v, b] = De.get(r), [m, A] = ft(n), R = fe(!1), x = fe(!1), D = fe(m), C = fe(e), M = fe(t), E = () => M.current, B = () => E().isVisible() && E().isOnline(), [N, Z, de, J] = ze(r, m), z = fe({}).current, ge = S(o) ? t.fallback[m] : o, _e = (T, O) => {
|
|
2807
|
+
for (const q in z) {
|
|
2799
2808
|
const L = q;
|
|
2800
2809
|
if (L === "data") {
|
|
2801
2810
|
if (!s(T[L], O[L]) && (!S(T[L]) || !s(Se, O[L])))
|
|
@@ -2805,8 +2814,8 @@ const jr = et.use || ((n) => {
|
|
|
2805
2814
|
}
|
|
2806
2815
|
return !0;
|
|
2807
2816
|
}, ee = Ot(() => {
|
|
2808
|
-
const T = (() => !m || !e ? !1 : S(c) ? E().isPaused() || i ? !1 : S(u) ? !0 : u : c)(), O = (
|
|
2809
|
-
const re = qe(
|
|
2817
|
+
const T = (() => !m || !e ? !1 : S(c) ? E().isPaused() || i ? !1 : S(u) ? !0 : u : c)(), O = (I) => {
|
|
2818
|
+
const re = qe(I);
|
|
2810
2819
|
return delete re._k, T ? {
|
|
2811
2820
|
isValidating: !0,
|
|
2812
2821
|
isLoading: !0,
|
|
@@ -2816,15 +2825,15 @@ const jr = et.use || ((n) => {
|
|
|
2816
2825
|
let F = Q;
|
|
2817
2826
|
return [
|
|
2818
2827
|
() => {
|
|
2819
|
-
const
|
|
2820
|
-
return _e(
|
|
2828
|
+
const I = O(N());
|
|
2829
|
+
return _e(I, F) ? (F.data = I.data, F.isLoading = I.isLoading, F.isValidating = I.isValidating, F.error = I.error, F) : (F = I, I);
|
|
2821
2830
|
},
|
|
2822
2831
|
() => me
|
|
2823
2832
|
];
|
|
2824
2833
|
}, [
|
|
2825
2834
|
r,
|
|
2826
2835
|
m
|
|
2827
|
-
]), te =
|
|
2836
|
+
]), te = ln.exports.useSyncExternalStore(W(
|
|
2828
2837
|
(T) => de(m, (O, q) => {
|
|
2829
2838
|
_e(q, O) || T();
|
|
2830
2839
|
}),
|
|
@@ -2832,44 +2841,44 @@ const jr = et.use || ((n) => {
|
|
|
2832
2841
|
r,
|
|
2833
2842
|
m
|
|
2834
2843
|
]
|
|
2835
|
-
), ee[0], ee[1]), Re = !R.current, Je = p[m] && p[m].length > 0, le = te.data, X = S(le) ? ge : le, we = te.error, Pe = fe(X), Se =
|
|
2844
|
+
), ee[0], ee[1]), Re = !R.current, Je = p[m] && p[m].length > 0, le = te.data, X = S(le) ? ge : le, we = te.error, Pe = fe(X), Se = g ? S(le) ? Pe.current : le : X, Ce = (() => Je && !S(we) ? !1 : Re && !S(c) ? c : E().isPaused() ? !1 : i ? S(X) ? !1 : u : S(X) || u)(), je = !!(m && e && Re && Ce), Ke = S(te.isValidating) ? je : te.isValidating, tt = S(te.isLoading) ? je : te.isLoading, pe = W(
|
|
2836
2845
|
async (T) => {
|
|
2837
2846
|
const O = C.current;
|
|
2838
2847
|
if (!m || !O || x.current || E().isPaused())
|
|
2839
2848
|
return !1;
|
|
2840
2849
|
let q, L, Q = !0;
|
|
2841
|
-
const me = T || {}, F = !
|
|
2850
|
+
const me = T || {}, F = !v[m] || !me.dedupe, I = () => en ? !x.current && m === D.current && R.current : m === D.current, re = {
|
|
2842
2851
|
isValidating: !1,
|
|
2843
2852
|
isLoading: !1
|
|
2844
2853
|
}, rt = () => {
|
|
2845
2854
|
Z(re);
|
|
2846
2855
|
}, Me = () => {
|
|
2847
|
-
const Y =
|
|
2848
|
-
Y && Y[1] === L && delete
|
|
2856
|
+
const Y = v[m];
|
|
2857
|
+
Y && Y[1] === L && delete v[m];
|
|
2849
2858
|
}, st = {
|
|
2850
2859
|
isValidating: !0
|
|
2851
2860
|
};
|
|
2852
2861
|
S(N().data) && (st.isLoading = !0);
|
|
2853
2862
|
try {
|
|
2854
2863
|
if (F && (Z(st), t.loadingTimeout && S(N().data) && setTimeout(() => {
|
|
2855
|
-
Q &&
|
|
2856
|
-
}, t.loadingTimeout),
|
|
2864
|
+
Q && I() && E().onLoadingSlow(m, t);
|
|
2865
|
+
}, t.loadingTimeout), v[m] = [
|
|
2857
2866
|
O(A),
|
|
2858
|
-
|
|
2859
|
-
]), [q, L] =
|
|
2860
|
-
return F &&
|
|
2867
|
+
tn()
|
|
2868
|
+
]), [q, L] = v[m], q = await q, F && setTimeout(Me, t.dedupingInterval), !v[m] || v[m][1] !== L)
|
|
2869
|
+
return F && I() && E().onDiscarded(m), !1;
|
|
2861
2870
|
re.error = ae;
|
|
2862
2871
|
const Y = y[m];
|
|
2863
2872
|
if (!S(Y) && (L <= Y[0] || L <= Y[1] || Y[1] === 0))
|
|
2864
|
-
return rt(), F &&
|
|
2873
|
+
return rt(), F && I() && E().onDiscarded(m), !1;
|
|
2865
2874
|
const ne = N().data;
|
|
2866
|
-
re.data = s(ne, q) ? ne : q, F &&
|
|
2875
|
+
re.data = s(ne, q) ? ne : q, F && I() && E().onSuccess(q, m, t);
|
|
2867
2876
|
} catch (Y) {
|
|
2868
2877
|
Me();
|
|
2869
2878
|
const ne = E(), { shouldRetryOnError: Fe } = ne;
|
|
2870
|
-
ne.isPaused() || (re.error = Y, F &&
|
|
2879
|
+
ne.isPaused() || (re.error = Y, F && I() && (ne.onError(Y, m, ne), (Fe === !0 || be(Fe) && Fe(Y)) && (!E().revalidateOnFocus || !E().revalidateOnReconnect || B()) && ne.onErrorRetry(Y, m, ne, ($e) => {
|
|
2871
2880
|
const We = p[m];
|
|
2872
|
-
We && We[0] && We[0](
|
|
2881
|
+
We && We[0] && We[0](Ie.ERROR_REVALIDATE_EVENT, $e);
|
|
2873
2882
|
}, {
|
|
2874
2883
|
retryCount: (me.retryCount || 0) + 1,
|
|
2875
2884
|
dedupe: !0
|
|
@@ -2882,7 +2891,7 @@ const jr = et.use || ((n) => {
|
|
|
2882
2891
|
r
|
|
2883
2892
|
]
|
|
2884
2893
|
), nt = W(
|
|
2885
|
-
(...T) =>
|
|
2894
|
+
(...T) => ir(r, D.current, ...T),
|
|
2886
2895
|
[]
|
|
2887
2896
|
);
|
|
2888
2897
|
if (Ze(() => {
|
|
@@ -2890,24 +2899,24 @@ const jr = et.use || ((n) => {
|
|
|
2890
2899
|
}), Ze(() => {
|
|
2891
2900
|
if (!m)
|
|
2892
2901
|
return;
|
|
2893
|
-
const T = pe.bind(ae,
|
|
2902
|
+
const T = pe.bind(ae, xn);
|
|
2894
2903
|
let O = 0;
|
|
2895
|
-
const L =
|
|
2896
|
-
if (Q ==
|
|
2904
|
+
const L = Ms(m, p, (Q, me = {}) => {
|
|
2905
|
+
if (Q == Ie.FOCUS_EVENT) {
|
|
2897
2906
|
const F = Date.now();
|
|
2898
2907
|
E().revalidateOnFocus && F > O && B() && (O = F + E().focusThrottleInterval, T());
|
|
2899
|
-
} else if (Q ==
|
|
2908
|
+
} else if (Q == Ie.RECONNECT_EVENT)
|
|
2900
2909
|
E().revalidateOnReconnect && B() && T();
|
|
2901
2910
|
else {
|
|
2902
|
-
if (Q ==
|
|
2911
|
+
if (Q == Ie.MUTATE_EVENT)
|
|
2903
2912
|
return pe();
|
|
2904
|
-
if (Q ==
|
|
2913
|
+
if (Q == Ie.ERROR_REVALIDATE_EVENT)
|
|
2905
2914
|
return pe(me);
|
|
2906
2915
|
}
|
|
2907
2916
|
});
|
|
2908
2917
|
return x.current = !1, D.current = m, R.current = !0, Z({
|
|
2909
2918
|
_k: A
|
|
2910
|
-
}), Ce && (S(X) || lt ? T() :
|
|
2919
|
+
}), Ce && (S(X) || lt ? T() : Ls(T)), () => {
|
|
2911
2920
|
x.current = !0, L();
|
|
2912
2921
|
};
|
|
2913
2922
|
}, [
|
|
@@ -2919,7 +2928,7 @@ const jr = et.use || ((n) => {
|
|
|
2919
2928
|
L && T !== -1 && (T = setTimeout(q, L));
|
|
2920
2929
|
}
|
|
2921
2930
|
function q() {
|
|
2922
|
-
!N().error && (f || E().isVisible()) && (h || E().isOnline()) ? pe(
|
|
2931
|
+
!N().error && (f || E().isVisible()) && (h || E().isOnline()) ? pe(xn).then(O) : O();
|
|
2923
2932
|
}
|
|
2924
2933
|
return O(), () => {
|
|
2925
2934
|
T && (clearTimeout(T), T = -1);
|
|
@@ -2929,39 +2938,39 @@ const jr = et.use || ((n) => {
|
|
|
2929
2938
|
f,
|
|
2930
2939
|
h,
|
|
2931
2940
|
m
|
|
2932
|
-
]),
|
|
2933
|
-
if (!
|
|
2941
|
+
]), ss(Se), i && S(X) && m) {
|
|
2942
|
+
if (!en && lt)
|
|
2934
2943
|
throw new Error("Fallback data is required when using suspense in SSR.");
|
|
2935
2944
|
C.current = e, M.current = t, x.current = !1;
|
|
2936
2945
|
const T = b[m];
|
|
2937
2946
|
if (!S(T)) {
|
|
2938
2947
|
const O = nt(T);
|
|
2939
|
-
|
|
2948
|
+
Mr(O);
|
|
2940
2949
|
}
|
|
2941
2950
|
if (S(we)) {
|
|
2942
|
-
const O = pe(
|
|
2943
|
-
S(Se) || (O.status = "fulfilled", O.value = !0),
|
|
2951
|
+
const O = pe(xn);
|
|
2952
|
+
S(Se) || (O.status = "fulfilled", O.value = !0), Mr(O);
|
|
2944
2953
|
} else
|
|
2945
2954
|
throw we;
|
|
2946
2955
|
}
|
|
2947
2956
|
return {
|
|
2948
2957
|
mutate: nt,
|
|
2949
2958
|
get data() {
|
|
2950
|
-
return
|
|
2959
|
+
return z.data = !0, Se;
|
|
2951
2960
|
},
|
|
2952
2961
|
get error() {
|
|
2953
|
-
return
|
|
2962
|
+
return z.error = !0, we;
|
|
2954
2963
|
},
|
|
2955
2964
|
get isValidating() {
|
|
2956
|
-
return
|
|
2965
|
+
return z.isValidating = !0, Ke;
|
|
2957
2966
|
},
|
|
2958
2967
|
get isLoading() {
|
|
2959
|
-
return
|
|
2968
|
+
return z.isLoading = !0, tt;
|
|
2960
2969
|
}
|
|
2961
2970
|
};
|
|
2962
|
-
},
|
|
2963
|
-
value:
|
|
2964
|
-
}), Nt =
|
|
2971
|
+
}, Ia = Tt.defineProperty(Is, "defaultValue", {
|
|
2972
|
+
value: or
|
|
2973
|
+
}), Nt = js(Ba), $r = et.use || ((n) => {
|
|
2965
2974
|
if (n.status === "pending")
|
|
2966
2975
|
throw n;
|
|
2967
2976
|
if (n.status === "fulfilled")
|
|
@@ -2971,11 +2980,11 @@ const jr = et.use || ((n) => {
|
|
|
2971
2980
|
}, (e) => {
|
|
2972
2981
|
n.status = "rejected", n.reason = e;
|
|
2973
2982
|
}), n);
|
|
2974
|
-
}),
|
|
2983
|
+
}), Cn = {
|
|
2975
2984
|
dedupe: !0
|
|
2976
2985
|
}, Ua = (n, e, t) => {
|
|
2977
|
-
const { cache: r, compare: s, suspense: i, fallbackData: o, revalidateOnMount: c, revalidateIfStale: u, refreshInterval: a, refreshWhenHidden: f, refreshWhenOffline: h, keepPreviousData:
|
|
2978
|
-
for (const q in
|
|
2986
|
+
const { cache: r, compare: s, suspense: i, fallbackData: o, revalidateOnMount: c, revalidateIfStale: u, refreshInterval: a, refreshWhenHidden: f, refreshWhenOffline: h, keepPreviousData: g } = t, [p, y, v, b] = De.get(r), [m, A] = ft(n), R = fe(!1), x = fe(!1), D = fe(m), C = fe(e), M = fe(t), E = () => M.current, B = () => E().isVisible() && E().isOnline(), [N, Z, de, J] = ze(r, m), z = fe({}).current, ge = S(o) ? t.fallback[m] : o, _e = (T, O) => {
|
|
2987
|
+
for (const q in z) {
|
|
2979
2988
|
const L = q;
|
|
2980
2989
|
if (L === "data") {
|
|
2981
2990
|
if (!s(T[L], O[L]) && (!S(T[L]) || !s(Se, O[L])))
|
|
@@ -2985,8 +2994,8 @@ const jr = et.use || ((n) => {
|
|
|
2985
2994
|
}
|
|
2986
2995
|
return !0;
|
|
2987
2996
|
}, ee = Ot(() => {
|
|
2988
|
-
const T = (() => !m || !e ? !1 : S(c) ? E().isPaused() || i ? !1 : S(u) ? !0 : u : c)(), O = (
|
|
2989
|
-
const re = qe(
|
|
2997
|
+
const T = (() => !m || !e ? !1 : S(c) ? E().isPaused() || i ? !1 : S(u) ? !0 : u : c)(), O = (I) => {
|
|
2998
|
+
const re = qe(I);
|
|
2990
2999
|
return delete re._k, T ? {
|
|
2991
3000
|
isValidating: !0,
|
|
2992
3001
|
isLoading: !0,
|
|
@@ -2996,15 +3005,15 @@ const jr = et.use || ((n) => {
|
|
|
2996
3005
|
let F = Q;
|
|
2997
3006
|
return [
|
|
2998
3007
|
() => {
|
|
2999
|
-
const
|
|
3000
|
-
return _e(
|
|
3008
|
+
const I = O(N());
|
|
3009
|
+
return _e(I, F) ? (F.data = I.data, F.isLoading = I.isLoading, F.isValidating = I.isValidating, F.error = I.error, F) : (F = I, I);
|
|
3001
3010
|
},
|
|
3002
3011
|
() => me
|
|
3003
3012
|
];
|
|
3004
3013
|
}, [
|
|
3005
3014
|
r,
|
|
3006
3015
|
m
|
|
3007
|
-
]), te =
|
|
3016
|
+
]), te = ln.exports.useSyncExternalStore(W(
|
|
3008
3017
|
(T) => de(m, (O, q) => {
|
|
3009
3018
|
_e(q, O) || T();
|
|
3010
3019
|
}),
|
|
@@ -3012,44 +3021,44 @@ const jr = et.use || ((n) => {
|
|
|
3012
3021
|
r,
|
|
3013
3022
|
m
|
|
3014
3023
|
]
|
|
3015
|
-
), ee[0], ee[1]), Re = !R.current, Je = p[m] && p[m].length > 0, le = te.data, X = S(le) ? ge : le, we = te.error, Pe = fe(X), Se =
|
|
3024
|
+
), ee[0], ee[1]), Re = !R.current, Je = p[m] && p[m].length > 0, le = te.data, X = S(le) ? ge : le, we = te.error, Pe = fe(X), Se = g ? S(le) ? Pe.current : le : X, Ce = (() => Je && !S(we) ? !1 : Re && !S(c) ? c : E().isPaused() ? !1 : i ? S(X) ? !1 : u : S(X) || u)(), je = !!(m && e && Re && Ce), Ke = S(te.isValidating) ? je : te.isValidating, tt = S(te.isLoading) ? je : te.isLoading, pe = W(
|
|
3016
3025
|
async (T) => {
|
|
3017
3026
|
const O = C.current;
|
|
3018
3027
|
if (!m || !O || x.current || E().isPaused())
|
|
3019
3028
|
return !1;
|
|
3020
3029
|
let q, L, Q = !0;
|
|
3021
|
-
const me = T || {}, F = !
|
|
3030
|
+
const me = T || {}, F = !v[m] || !me.dedupe, I = () => en ? !x.current && m === D.current && R.current : m === D.current, re = {
|
|
3022
3031
|
isValidating: !1,
|
|
3023
3032
|
isLoading: !1
|
|
3024
3033
|
}, rt = () => {
|
|
3025
3034
|
Z(re);
|
|
3026
3035
|
}, Me = () => {
|
|
3027
|
-
const Y =
|
|
3028
|
-
Y && Y[1] === L && delete
|
|
3036
|
+
const Y = v[m];
|
|
3037
|
+
Y && Y[1] === L && delete v[m];
|
|
3029
3038
|
}, st = {
|
|
3030
3039
|
isValidating: !0
|
|
3031
3040
|
};
|
|
3032
3041
|
S(N().data) && (st.isLoading = !0);
|
|
3033
3042
|
try {
|
|
3034
3043
|
if (F && (Z(st), t.loadingTimeout && S(N().data) && setTimeout(() => {
|
|
3035
|
-
Q &&
|
|
3036
|
-
}, t.loadingTimeout),
|
|
3044
|
+
Q && I() && E().onLoadingSlow(m, t);
|
|
3045
|
+
}, t.loadingTimeout), v[m] = [
|
|
3037
3046
|
O(A),
|
|
3038
|
-
|
|
3039
|
-
]), [q, L] =
|
|
3040
|
-
return F &&
|
|
3047
|
+
tn()
|
|
3048
|
+
]), [q, L] = v[m], q = await q, F && setTimeout(Me, t.dedupingInterval), !v[m] || v[m][1] !== L)
|
|
3049
|
+
return F && I() && E().onDiscarded(m), !1;
|
|
3041
3050
|
re.error = ae;
|
|
3042
3051
|
const Y = y[m];
|
|
3043
3052
|
if (!S(Y) && (L <= Y[0] || L <= Y[1] || Y[1] === 0))
|
|
3044
|
-
return rt(), F &&
|
|
3053
|
+
return rt(), F && I() && E().onDiscarded(m), !1;
|
|
3045
3054
|
const ne = N().data;
|
|
3046
|
-
re.data = s(ne, q) ? ne : q, F &&
|
|
3055
|
+
re.data = s(ne, q) ? ne : q, F && I() && E().onSuccess(q, m, t);
|
|
3047
3056
|
} catch (Y) {
|
|
3048
3057
|
Me();
|
|
3049
3058
|
const ne = E(), { shouldRetryOnError: Fe } = ne;
|
|
3050
|
-
ne.isPaused() || (re.error = Y, F &&
|
|
3059
|
+
ne.isPaused() || (re.error = Y, F && I() && (ne.onError(Y, m, ne), (Fe === !0 || be(Fe) && Fe(Y)) && (!E().revalidateOnFocus || !E().revalidateOnReconnect || B()) && ne.onErrorRetry(Y, m, ne, ($e) => {
|
|
3051
3060
|
const We = p[m];
|
|
3052
|
-
We && We[0] && We[0](
|
|
3061
|
+
We && We[0] && We[0](Ie.ERROR_REVALIDATE_EVENT, $e);
|
|
3053
3062
|
}, {
|
|
3054
3063
|
retryCount: (me.retryCount || 0) + 1,
|
|
3055
3064
|
dedupe: !0
|
|
@@ -3062,7 +3071,7 @@ const jr = et.use || ((n) => {
|
|
|
3062
3071
|
r
|
|
3063
3072
|
]
|
|
3064
3073
|
), nt = W(
|
|
3065
|
-
(...T) =>
|
|
3074
|
+
(...T) => ir(r, D.current, ...T),
|
|
3066
3075
|
[]
|
|
3067
3076
|
);
|
|
3068
3077
|
if (Ze(() => {
|
|
@@ -3070,24 +3079,24 @@ const jr = et.use || ((n) => {
|
|
|
3070
3079
|
}), Ze(() => {
|
|
3071
3080
|
if (!m)
|
|
3072
3081
|
return;
|
|
3073
|
-
const T = pe.bind(ae,
|
|
3082
|
+
const T = pe.bind(ae, Cn);
|
|
3074
3083
|
let O = 0;
|
|
3075
|
-
const L =
|
|
3076
|
-
if (Q ==
|
|
3084
|
+
const L = Ms(m, p, (Q, me = {}) => {
|
|
3085
|
+
if (Q == Ie.FOCUS_EVENT) {
|
|
3077
3086
|
const F = Date.now();
|
|
3078
3087
|
E().revalidateOnFocus && F > O && B() && (O = F + E().focusThrottleInterval, T());
|
|
3079
|
-
} else if (Q ==
|
|
3088
|
+
} else if (Q == Ie.RECONNECT_EVENT)
|
|
3080
3089
|
E().revalidateOnReconnect && B() && T();
|
|
3081
3090
|
else {
|
|
3082
|
-
if (Q ==
|
|
3091
|
+
if (Q == Ie.MUTATE_EVENT)
|
|
3083
3092
|
return pe();
|
|
3084
|
-
if (Q ==
|
|
3093
|
+
if (Q == Ie.ERROR_REVALIDATE_EVENT)
|
|
3085
3094
|
return pe(me);
|
|
3086
3095
|
}
|
|
3087
3096
|
});
|
|
3088
3097
|
return x.current = !1, D.current = m, R.current = !0, Z({
|
|
3089
3098
|
_k: A
|
|
3090
|
-
}), Ce && (S(X) || lt ? T() :
|
|
3099
|
+
}), Ce && (S(X) || lt ? T() : Ls(T)), () => {
|
|
3091
3100
|
x.current = !0, L();
|
|
3092
3101
|
};
|
|
3093
3102
|
}, [
|
|
@@ -3099,7 +3108,7 @@ const jr = et.use || ((n) => {
|
|
|
3099
3108
|
L && T !== -1 && (T = setTimeout(q, L));
|
|
3100
3109
|
}
|
|
3101
3110
|
function q() {
|
|
3102
|
-
!N().error && (f || E().isVisible()) && (h || E().isOnline()) ? pe(
|
|
3111
|
+
!N().error && (f || E().isVisible()) && (h || E().isOnline()) ? pe(Cn).then(O) : O();
|
|
3103
3112
|
}
|
|
3104
3113
|
return O(), () => {
|
|
3105
3114
|
T && (clearTimeout(T), T = -1);
|
|
@@ -3109,53 +3118,53 @@ const jr = et.use || ((n) => {
|
|
|
3109
3118
|
f,
|
|
3110
3119
|
h,
|
|
3111
3120
|
m
|
|
3112
|
-
]),
|
|
3113
|
-
if (!
|
|
3121
|
+
]), ss(Se), i && S(X) && m) {
|
|
3122
|
+
if (!en && lt)
|
|
3114
3123
|
throw new Error("Fallback data is required when using suspense in SSR.");
|
|
3115
3124
|
C.current = e, M.current = t, x.current = !1;
|
|
3116
3125
|
const T = b[m];
|
|
3117
3126
|
if (!S(T)) {
|
|
3118
3127
|
const O = nt(T);
|
|
3119
|
-
|
|
3128
|
+
$r(O);
|
|
3120
3129
|
}
|
|
3121
3130
|
if (S(we)) {
|
|
3122
|
-
const O = pe(
|
|
3123
|
-
S(Se) || (O.status = "fulfilled", O.value = !0),
|
|
3131
|
+
const O = pe(Cn);
|
|
3132
|
+
S(Se) || (O.status = "fulfilled", O.value = !0), $r(O);
|
|
3124
3133
|
} else
|
|
3125
3134
|
throw we;
|
|
3126
3135
|
}
|
|
3127
3136
|
return {
|
|
3128
3137
|
mutate: nt,
|
|
3129
3138
|
get data() {
|
|
3130
|
-
return
|
|
3139
|
+
return z.data = !0, Se;
|
|
3131
3140
|
},
|
|
3132
3141
|
get error() {
|
|
3133
|
-
return
|
|
3142
|
+
return z.error = !0, we;
|
|
3134
3143
|
},
|
|
3135
3144
|
get isValidating() {
|
|
3136
|
-
return
|
|
3145
|
+
return z.isValidating = !0, Ke;
|
|
3137
3146
|
},
|
|
3138
3147
|
get isLoading() {
|
|
3139
|
-
return
|
|
3148
|
+
return z.isLoading = !0, tt;
|
|
3140
3149
|
}
|
|
3141
3150
|
};
|
|
3142
3151
|
};
|
|
3143
|
-
Tt.defineProperty(
|
|
3144
|
-
value:
|
|
3152
|
+
Tt.defineProperty(Is, "defaultValue", {
|
|
3153
|
+
value: or
|
|
3145
3154
|
});
|
|
3146
|
-
const
|
|
3147
|
-
const s = fe(!1), { cache: i, initialSize: o = 1, revalidateAll: c = !1, persistSize: u = !1, revalidateFirstPage: a = !0, revalidateOnMount: f = !1, parallel: h = !1 } = r, [, , ,
|
|
3155
|
+
const qa = js(Ua), Va = (n) => ft(n ? n(0, null) : null)[0], An = Promise.resolve(), ja = (n) => (e, t, r) => {
|
|
3156
|
+
const s = fe(!1), { cache: i, initialSize: o = 1, revalidateAll: c = !1, persistSize: u = !1, revalidateFirstPage: a = !0, revalidateOnMount: f = !1, parallel: h = !1 } = r, [, , , g] = De.get(hn);
|
|
3148
3157
|
let p;
|
|
3149
3158
|
try {
|
|
3150
|
-
p =
|
|
3159
|
+
p = Va(e), p && (p = Us + p);
|
|
3151
3160
|
} catch {
|
|
3152
3161
|
}
|
|
3153
|
-
const [y,
|
|
3162
|
+
const [y, v, b] = ze(i, p), m = W(() => S(y()._l) ? o : y()._l, [
|
|
3154
3163
|
i,
|
|
3155
3164
|
p,
|
|
3156
3165
|
o
|
|
3157
3166
|
]);
|
|
3158
|
-
|
|
3167
|
+
ln.exports.useSyncExternalStore(W(
|
|
3159
3168
|
(E) => p ? b(p, () => {
|
|
3160
3169
|
E();
|
|
3161
3170
|
}) : () => {
|
|
@@ -3177,7 +3186,7 @@ const Ia = Vs(Ua), qa = (n) => ft(n ? n(0, null) : null)[0], Cn = Promise.resolv
|
|
|
3177
3186
|
s.current = !0;
|
|
3178
3187
|
return;
|
|
3179
3188
|
}
|
|
3180
|
-
p &&
|
|
3189
|
+
p && v({
|
|
3181
3190
|
_l: u ? R.current : A()
|
|
3182
3191
|
});
|
|
3183
3192
|
}, [
|
|
@@ -3186,10 +3195,10 @@ const Ia = Vs(Ua), qa = (n) => ft(n ? n(0, null) : null)[0], Cn = Promise.resolv
|
|
|
3186
3195
|
]);
|
|
3187
3196
|
const x = f && !s.current, D = n(p, async (E) => {
|
|
3188
3197
|
const B = y()._i, N = y()._r;
|
|
3189
|
-
|
|
3198
|
+
v({
|
|
3190
3199
|
_r: ae
|
|
3191
3200
|
});
|
|
3192
|
-
const Z = [], de = A(), [J] = ze(i, E),
|
|
3201
|
+
const Z = [], de = A(), [J] = ze(i, E), z = J().data, ge = [];
|
|
3193
3202
|
let _e = null;
|
|
3194
3203
|
for (let ee = 0; ee < de; ++ee) {
|
|
3195
3204
|
const [te, Re] = ft(e(ee, h ? null : _e));
|
|
@@ -3197,14 +3206,14 @@ const Ia = Vs(Ua), qa = (n) => ft(n ? n(0, null) : null)[0], Cn = Promise.resolv
|
|
|
3197
3206
|
break;
|
|
3198
3207
|
const [Je, le] = ze(i, te);
|
|
3199
3208
|
let X = Je().data;
|
|
3200
|
-
const we = c || B || S(X) || a && !ee && !S(
|
|
3209
|
+
const we = c || B || S(X) || a && !ee && !S(z) || x || z && !S(z[ee]) && !r.compare(z[ee], X);
|
|
3201
3210
|
if (t && (typeof N == "function" ? N(X, Re) : we)) {
|
|
3202
3211
|
const Pe = async () => {
|
|
3203
|
-
if (!(te in
|
|
3212
|
+
if (!(te in g))
|
|
3204
3213
|
X = await t(Re);
|
|
3205
3214
|
else {
|
|
3206
|
-
const Ce =
|
|
3207
|
-
delete
|
|
3215
|
+
const Ce = g[te];
|
|
3216
|
+
delete g[te], X = await Ce;
|
|
3208
3217
|
}
|
|
3209
3218
|
le({
|
|
3210
3219
|
data: X,
|
|
@@ -3216,7 +3225,7 @@ const Ia = Vs(Ua), qa = (n) => ft(n ? n(0, null) : null)[0], Cn = Promise.resolv
|
|
|
3216
3225
|
Z[ee] = X;
|
|
3217
3226
|
h || (_e = X);
|
|
3218
3227
|
}
|
|
3219
|
-
return h && await Promise.all(ge.map((ee) => ee())),
|
|
3228
|
+
return h && await Promise.all(ge.map((ee) => ee())), v({
|
|
3220
3229
|
_i: ae
|
|
3221
3230
|
}), Z;
|
|
3222
3231
|
}, r), C = W(
|
|
@@ -3224,16 +3233,16 @@ const Ia = Vs(Ua), qa = (n) => ft(n ? n(0, null) : null)[0], Cn = Promise.resolv
|
|
|
3224
3233
|
const N = typeof B == "boolean" ? {
|
|
3225
3234
|
revalidate: B
|
|
3226
3235
|
} : B || {}, Z = N.revalidate !== !1;
|
|
3227
|
-
return p ? (Z && (S(E) ?
|
|
3236
|
+
return p ? (Z && (S(E) ? v({
|
|
3228
3237
|
_i: !0,
|
|
3229
3238
|
_r: N.revalidate
|
|
3230
|
-
}) :
|
|
3239
|
+
}) : v({
|
|
3231
3240
|
_i: !1,
|
|
3232
3241
|
_r: N.revalidate
|
|
3233
3242
|
})), arguments.length ? D.mutate(E, {
|
|
3234
3243
|
...N,
|
|
3235
3244
|
revalidate: Z
|
|
3236
|
-
}) : D.mutate()) :
|
|
3245
|
+
}) : D.mutate()) : An;
|
|
3237
3246
|
},
|
|
3238
3247
|
[
|
|
3239
3248
|
p,
|
|
@@ -3242,18 +3251,18 @@ const Ia = Vs(Ua), qa = (n) => ft(n ? n(0, null) : null)[0], Cn = Promise.resolv
|
|
|
3242
3251
|
), M = W(
|
|
3243
3252
|
(E) => {
|
|
3244
3253
|
if (!p)
|
|
3245
|
-
return
|
|
3254
|
+
return An;
|
|
3246
3255
|
const [, B] = ze(i, p);
|
|
3247
3256
|
let N;
|
|
3248
3257
|
if (be(E) ? N = E(A()) : typeof E == "number" && (N = E), typeof N != "number")
|
|
3249
|
-
return
|
|
3258
|
+
return An;
|
|
3250
3259
|
B({
|
|
3251
3260
|
_l: N
|
|
3252
3261
|
}), R.current = N;
|
|
3253
3262
|
const Z = [], [de] = ze(i, p);
|
|
3254
3263
|
let J = null;
|
|
3255
|
-
for (let
|
|
3256
|
-
const [ge] = ft(e(
|
|
3264
|
+
for (let z = 0; z < N; ++z) {
|
|
3265
|
+
const [ge] = ft(e(z, J)), [_e] = ze(i, ge), ee = ge ? _e().data : ae;
|
|
3257
3266
|
if (S(ee))
|
|
3258
3267
|
return C(de().data);
|
|
3259
3268
|
Z.push(ee), J = ee;
|
|
@@ -3284,7 +3293,7 @@ const Ia = Vs(Ua), qa = (n) => ft(n ? n(0, null) : null)[0], Cn = Promise.resolv
|
|
|
3284
3293
|
return D.isLoading;
|
|
3285
3294
|
}
|
|
3286
3295
|
};
|
|
3287
|
-
},
|
|
3296
|
+
}, qc = Fa(qa, ja), Ve = /* @__PURE__ */ Object.create(null);
|
|
3288
3297
|
Ve.open = "0";
|
|
3289
3298
|
Ve.close = "1";
|
|
3290
3299
|
Ve.ping = "2";
|
|
@@ -3296,59 +3305,59 @@ const Jt = /* @__PURE__ */ Object.create(null);
|
|
|
3296
3305
|
Object.keys(Ve).forEach((n) => {
|
|
3297
3306
|
Jt[Ve[n]] = n;
|
|
3298
3307
|
});
|
|
3299
|
-
const
|
|
3308
|
+
const Wn = { type: "error", data: "parser error" }, $s = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", Ws = typeof ArrayBuffer == "function", Hs = (n) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(n) : n && n.buffer instanceof ArrayBuffer, ar = ({ type: n, data: e }, t, r) => $s && e instanceof Blob ? t ? r(e) : Wr(e, r) : Ws && (e instanceof ArrayBuffer || Hs(e)) ? t ? r(e) : Wr(new Blob([e]), r) : r(Ve[n] + (e || "")), Wr = (n, e) => {
|
|
3300
3309
|
const t = new FileReader();
|
|
3301
3310
|
return t.onload = function() {
|
|
3302
3311
|
const r = t.result.split(",")[1];
|
|
3303
3312
|
e("b" + (r || ""));
|
|
3304
3313
|
}, t.readAsDataURL(n);
|
|
3305
3314
|
};
|
|
3306
|
-
function
|
|
3315
|
+
function Hr(n) {
|
|
3307
3316
|
return n instanceof Uint8Array ? n : n instanceof ArrayBuffer ? new Uint8Array(n) : new Uint8Array(n.buffer, n.byteOffset, n.byteLength);
|
|
3308
3317
|
}
|
|
3309
|
-
let
|
|
3310
|
-
function
|
|
3311
|
-
if (
|
|
3312
|
-
return n.data.arrayBuffer().then(
|
|
3313
|
-
if (
|
|
3314
|
-
return e(
|
|
3315
|
-
|
|
3316
|
-
|
|
3318
|
+
let Dn;
|
|
3319
|
+
function Ma(n, e) {
|
|
3320
|
+
if ($s && n.data instanceof Blob)
|
|
3321
|
+
return n.data.arrayBuffer().then(Hr).then(e);
|
|
3322
|
+
if (Ws && (n.data instanceof ArrayBuffer || Hs(n.data)))
|
|
3323
|
+
return e(Hr(n.data));
|
|
3324
|
+
ar(n, !1, (t) => {
|
|
3325
|
+
Dn || (Dn = new TextEncoder()), e(Dn.encode(t));
|
|
3317
3326
|
});
|
|
3318
3327
|
}
|
|
3319
|
-
const
|
|
3320
|
-
for (let n = 0; n <
|
|
3321
|
-
St[
|
|
3322
|
-
const
|
|
3328
|
+
const zr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", St = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
|
|
3329
|
+
for (let n = 0; n < zr.length; n++)
|
|
3330
|
+
St[zr.charCodeAt(n)] = n;
|
|
3331
|
+
const $a = (n) => {
|
|
3323
3332
|
let e = n.length * 0.75, t = n.length, r, s = 0, i, o, c, u;
|
|
3324
3333
|
n[n.length - 1] === "=" && (e--, n[n.length - 2] === "=" && e--);
|
|
3325
3334
|
const a = new ArrayBuffer(e), f = new Uint8Array(a);
|
|
3326
3335
|
for (r = 0; r < t; r += 4)
|
|
3327
3336
|
i = St[n.charCodeAt(r)], o = St[n.charCodeAt(r + 1)], c = St[n.charCodeAt(r + 2)], u = St[n.charCodeAt(r + 3)], f[s++] = i << 2 | o >> 4, f[s++] = (o & 15) << 4 | c >> 2, f[s++] = (c & 3) << 6 | u & 63;
|
|
3328
3337
|
return a;
|
|
3329
|
-
},
|
|
3338
|
+
}, Wa = typeof ArrayBuffer == "function", cr = (n, e) => {
|
|
3330
3339
|
if (typeof n != "string")
|
|
3331
3340
|
return {
|
|
3332
3341
|
type: "message",
|
|
3333
|
-
data:
|
|
3342
|
+
data: zs(n, e)
|
|
3334
3343
|
};
|
|
3335
3344
|
const t = n.charAt(0);
|
|
3336
3345
|
return t === "b" ? {
|
|
3337
3346
|
type: "message",
|
|
3338
|
-
data:
|
|
3347
|
+
data: Ha(n.substring(1), e)
|
|
3339
3348
|
} : Jt[t] ? n.length > 1 ? {
|
|
3340
3349
|
type: Jt[t],
|
|
3341
3350
|
data: n.substring(1)
|
|
3342
3351
|
} : {
|
|
3343
3352
|
type: Jt[t]
|
|
3344
|
-
} :
|
|
3345
|
-
},
|
|
3346
|
-
if (
|
|
3347
|
-
const t =
|
|
3348
|
-
return
|
|
3353
|
+
} : Wn;
|
|
3354
|
+
}, Ha = (n, e) => {
|
|
3355
|
+
if (Wa) {
|
|
3356
|
+
const t = $a(n);
|
|
3357
|
+
return zs(t, e);
|
|
3349
3358
|
} else
|
|
3350
3359
|
return { base64: !0, data: n };
|
|
3351
|
-
},
|
|
3360
|
+
}, zs = (n, e) => {
|
|
3352
3361
|
switch (e) {
|
|
3353
3362
|
case "blob":
|
|
3354
3363
|
return n instanceof Blob ? n : new Blob([n]);
|
|
@@ -3356,27 +3365,27 @@ const Ma = (n) => {
|
|
|
3356
3365
|
default:
|
|
3357
3366
|
return n instanceof ArrayBuffer ? n : n.buffer;
|
|
3358
3367
|
}
|
|
3359
|
-
},
|
|
3368
|
+
}, Js = String.fromCharCode(30), za = (n, e) => {
|
|
3360
3369
|
const t = n.length, r = new Array(t);
|
|
3361
3370
|
let s = 0;
|
|
3362
3371
|
n.forEach((i, o) => {
|
|
3363
|
-
|
|
3364
|
-
r[o] = c, ++s === t && e(r.join(
|
|
3372
|
+
ar(i, !1, (c) => {
|
|
3373
|
+
r[o] = c, ++s === t && e(r.join(Js));
|
|
3365
3374
|
});
|
|
3366
3375
|
});
|
|
3367
|
-
},
|
|
3368
|
-
const t = n.split(
|
|
3376
|
+
}, Ja = (n, e) => {
|
|
3377
|
+
const t = n.split(Js), r = [];
|
|
3369
3378
|
for (let s = 0; s < t.length; s++) {
|
|
3370
|
-
const i =
|
|
3379
|
+
const i = cr(t[s], e);
|
|
3371
3380
|
if (r.push(i), i.type === "error")
|
|
3372
3381
|
break;
|
|
3373
3382
|
}
|
|
3374
3383
|
return r;
|
|
3375
3384
|
};
|
|
3376
|
-
function
|
|
3385
|
+
function Ka() {
|
|
3377
3386
|
return new TransformStream({
|
|
3378
3387
|
transform(n, e) {
|
|
3379
|
-
|
|
3388
|
+
Ma(n, (t) => {
|
|
3380
3389
|
const r = t.length;
|
|
3381
3390
|
let s;
|
|
3382
3391
|
if (r < 126)
|
|
@@ -3395,7 +3404,7 @@ function Ja() {
|
|
|
3395
3404
|
}
|
|
3396
3405
|
});
|
|
3397
3406
|
}
|
|
3398
|
-
let
|
|
3407
|
+
let Ln;
|
|
3399
3408
|
function Vt(n) {
|
|
3400
3409
|
return n.reduce((e, t) => e + t.length, 0);
|
|
3401
3410
|
}
|
|
@@ -3408,8 +3417,8 @@ function jt(n, e) {
|
|
|
3408
3417
|
t[s] = n[0][r++], r === n[0].length && (n.shift(), r = 0);
|
|
3409
3418
|
return n.length && r < n[0].length && (n[0] = n[0].slice(r)), t;
|
|
3410
3419
|
}
|
|
3411
|
-
function
|
|
3412
|
-
|
|
3420
|
+
function Ya(n, e) {
|
|
3421
|
+
Ln || (Ln = new TextDecoder());
|
|
3413
3422
|
const t = [];
|
|
3414
3423
|
let r = 0, s = -1, i = !1;
|
|
3415
3424
|
return new TransformStream({
|
|
@@ -3430,7 +3439,7 @@ function Ka(n, e) {
|
|
|
3430
3439
|
break;
|
|
3431
3440
|
const u = jt(t, 8), a = new DataView(u.buffer, u.byteOffset, u.length), f = a.getUint32(0);
|
|
3432
3441
|
if (f > Math.pow(2, 53 - 32) - 1) {
|
|
3433
|
-
c.enqueue(
|
|
3442
|
+
c.enqueue(Wn);
|
|
3434
3443
|
break;
|
|
3435
3444
|
}
|
|
3436
3445
|
s = f * Math.pow(2, 32) + a.getUint32(4), r = 3;
|
|
@@ -3438,22 +3447,22 @@ function Ka(n, e) {
|
|
|
3438
3447
|
if (Vt(t) < s)
|
|
3439
3448
|
break;
|
|
3440
3449
|
const u = jt(t, s);
|
|
3441
|
-
c.enqueue(
|
|
3450
|
+
c.enqueue(cr(i ? u : Ln.decode(u), e)), r = 0;
|
|
3442
3451
|
}
|
|
3443
3452
|
if (s === 0 || s > n) {
|
|
3444
|
-
c.enqueue(
|
|
3453
|
+
c.enqueue(Wn);
|
|
3445
3454
|
break;
|
|
3446
3455
|
}
|
|
3447
3456
|
}
|
|
3448
3457
|
}
|
|
3449
3458
|
});
|
|
3450
3459
|
}
|
|
3451
|
-
const
|
|
3460
|
+
const Ks = 4;
|
|
3452
3461
|
function ce(n) {
|
|
3453
3462
|
if (n)
|
|
3454
|
-
return
|
|
3463
|
+
return Ga(n);
|
|
3455
3464
|
}
|
|
3456
|
-
function
|
|
3465
|
+
function Ga(n) {
|
|
3457
3466
|
for (var e in ce.prototype)
|
|
3458
3467
|
n[e] = ce.prototype[e];
|
|
3459
3468
|
return n;
|
|
@@ -3501,30 +3510,30 @@ ce.prototype.hasListeners = function(n) {
|
|
|
3501
3510
|
return !!this.listeners(n).length;
|
|
3502
3511
|
};
|
|
3503
3512
|
const xe = (() => typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")())();
|
|
3504
|
-
function
|
|
3513
|
+
function Ys(n, ...e) {
|
|
3505
3514
|
return e.reduce((t, r) => (n.hasOwnProperty(r) && (t[r] = n[r]), t), {});
|
|
3506
3515
|
}
|
|
3507
|
-
const
|
|
3508
|
-
function
|
|
3509
|
-
e.useNativeTimers ? (n.setTimeoutFn =
|
|
3510
|
-
}
|
|
3511
|
-
const Qa = 1.33;
|
|
3512
|
-
function Za(n) {
|
|
3513
|
-
return typeof n == "string" ? ec(n) : Math.ceil((n.byteLength || n.size) * Qa);
|
|
3516
|
+
const Xa = xe.setTimeout, Qa = xe.clearTimeout;
|
|
3517
|
+
function dn(n, e) {
|
|
3518
|
+
e.useNativeTimers ? (n.setTimeoutFn = Xa.bind(xe), n.clearTimeoutFn = Qa.bind(xe)) : (n.setTimeoutFn = xe.setTimeout.bind(xe), n.clearTimeoutFn = xe.clearTimeout.bind(xe));
|
|
3514
3519
|
}
|
|
3520
|
+
const Za = 1.33;
|
|
3515
3521
|
function ec(n) {
|
|
3522
|
+
return typeof n == "string" ? tc(n) : Math.ceil((n.byteLength || n.size) * Za);
|
|
3523
|
+
}
|
|
3524
|
+
function tc(n) {
|
|
3516
3525
|
let e = 0, t = 0;
|
|
3517
3526
|
for (let r = 0, s = n.length; r < s; r++)
|
|
3518
3527
|
e = n.charCodeAt(r), e < 128 ? t += 1 : e < 2048 ? t += 2 : e < 55296 || e >= 57344 ? t += 3 : (r++, t += 4);
|
|
3519
3528
|
return t;
|
|
3520
3529
|
}
|
|
3521
|
-
function
|
|
3530
|
+
function nc(n) {
|
|
3522
3531
|
let e = "";
|
|
3523
3532
|
for (let t in n)
|
|
3524
3533
|
n.hasOwnProperty(t) && (e.length && (e += "&"), e += encodeURIComponent(t) + "=" + encodeURIComponent(n[t]));
|
|
3525
3534
|
return e;
|
|
3526
3535
|
}
|
|
3527
|
-
function
|
|
3536
|
+
function rc(n) {
|
|
3528
3537
|
let e = {}, t = n.split("&");
|
|
3529
3538
|
for (let r = 0, s = t.length; r < s; r++) {
|
|
3530
3539
|
let i = t[r].split("=");
|
|
@@ -3532,17 +3541,17 @@ function nc(n) {
|
|
|
3532
3541
|
}
|
|
3533
3542
|
return e;
|
|
3534
3543
|
}
|
|
3535
|
-
class
|
|
3544
|
+
class sc extends Error {
|
|
3536
3545
|
constructor(e, t, r) {
|
|
3537
3546
|
super(e), this.description = t, this.context = r, this.type = "TransportError";
|
|
3538
3547
|
}
|
|
3539
3548
|
}
|
|
3540
|
-
class
|
|
3549
|
+
class ur extends ce {
|
|
3541
3550
|
constructor(e) {
|
|
3542
|
-
super(), this.writable = !1,
|
|
3551
|
+
super(), this.writable = !1, dn(this, e), this.opts = e, this.query = e.query, this.socket = e.socket;
|
|
3543
3552
|
}
|
|
3544
3553
|
onError(e, t, r) {
|
|
3545
|
-
return super.emitReserved("error", new
|
|
3554
|
+
return super.emitReserved("error", new sc(e, t, r)), this;
|
|
3546
3555
|
}
|
|
3547
3556
|
open() {
|
|
3548
3557
|
return this.readyState = "opening", this.doOpen(), this;
|
|
@@ -3557,7 +3566,7 @@ class cr extends ce {
|
|
|
3557
3566
|
this.readyState = "open", this.writable = !0, super.emitReserved("open");
|
|
3558
3567
|
}
|
|
3559
3568
|
onData(e) {
|
|
3560
|
-
const t =
|
|
3569
|
+
const t = cr(e, this.socket.binaryType);
|
|
3561
3570
|
this.onPacket(t);
|
|
3562
3571
|
}
|
|
3563
3572
|
onPacket(e) {
|
|
@@ -3579,35 +3588,35 @@ class cr extends ce {
|
|
|
3579
3588
|
return this.opts.port && (this.opts.secure && Number(this.opts.port !== 443) || !this.opts.secure && Number(this.opts.port) !== 80) ? ":" + this.opts.port : "";
|
|
3580
3589
|
}
|
|
3581
3590
|
_query(e) {
|
|
3582
|
-
const t =
|
|
3591
|
+
const t = nc(e);
|
|
3583
3592
|
return t.length ? "?" + t : "";
|
|
3584
3593
|
}
|
|
3585
3594
|
}
|
|
3586
|
-
const
|
|
3587
|
-
let
|
|
3588
|
-
function
|
|
3595
|
+
const Gs = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), Hn = 64, ic = {};
|
|
3596
|
+
let Jr = 0, Mt = 0, Kr;
|
|
3597
|
+
function Yr(n) {
|
|
3589
3598
|
let e = "";
|
|
3590
3599
|
do
|
|
3591
|
-
e =
|
|
3600
|
+
e = Gs[n % Hn] + e, n = Math.floor(n / Hn);
|
|
3592
3601
|
while (n > 0);
|
|
3593
3602
|
return e;
|
|
3594
3603
|
}
|
|
3595
|
-
function
|
|
3596
|
-
const n =
|
|
3597
|
-
return n !==
|
|
3604
|
+
function Xs() {
|
|
3605
|
+
const n = Yr(+new Date());
|
|
3606
|
+
return n !== Kr ? (Jr = 0, Kr = n) : n + "." + Yr(Jr++);
|
|
3598
3607
|
}
|
|
3599
|
-
for (; Mt <
|
|
3600
|
-
|
|
3601
|
-
let
|
|
3608
|
+
for (; Mt < Hn; Mt++)
|
|
3609
|
+
ic[Gs[Mt]] = Mt;
|
|
3610
|
+
let Qs = !1;
|
|
3602
3611
|
try {
|
|
3603
|
-
|
|
3612
|
+
Qs = typeof XMLHttpRequest < "u" && "withCredentials" in new XMLHttpRequest();
|
|
3604
3613
|
} catch {
|
|
3605
3614
|
}
|
|
3606
|
-
const
|
|
3607
|
-
function
|
|
3615
|
+
const oc = Qs;
|
|
3616
|
+
function Zs(n) {
|
|
3608
3617
|
const e = n.xdomain;
|
|
3609
3618
|
try {
|
|
3610
|
-
if (typeof XMLHttpRequest < "u" && (!e ||
|
|
3619
|
+
if (typeof XMLHttpRequest < "u" && (!e || oc))
|
|
3611
3620
|
return new XMLHttpRequest();
|
|
3612
3621
|
} catch {
|
|
3613
3622
|
}
|
|
@@ -3617,14 +3626,14 @@ function Qs(n) {
|
|
|
3617
3626
|
} catch {
|
|
3618
3627
|
}
|
|
3619
3628
|
}
|
|
3620
|
-
function
|
|
3629
|
+
function ac() {
|
|
3621
3630
|
}
|
|
3622
|
-
const
|
|
3623
|
-
return new
|
|
3631
|
+
const cc = function() {
|
|
3632
|
+
return new Zs({
|
|
3624
3633
|
xdomain: !1
|
|
3625
3634
|
}).responseType != null;
|
|
3626
3635
|
}();
|
|
3627
|
-
class
|
|
3636
|
+
class uc extends ur {
|
|
3628
3637
|
constructor(e) {
|
|
3629
3638
|
if (super(e), this.polling = !1, typeof location < "u") {
|
|
3630
3639
|
const r = location.protocol === "https:";
|
|
@@ -3632,7 +3641,7 @@ class cc extends cr {
|
|
|
3632
3641
|
s || (s = r ? "443" : "80"), this.xd = typeof location < "u" && e.hostname !== location.hostname || s !== e.port;
|
|
3633
3642
|
}
|
|
3634
3643
|
const t = e && e.forceBase64;
|
|
3635
|
-
this.supportsBinary =
|
|
3644
|
+
this.supportsBinary = cc && !t, this.opts.withCredentials && (this.cookieJar = void 0);
|
|
3636
3645
|
}
|
|
3637
3646
|
get name() {
|
|
3638
3647
|
return "polling";
|
|
@@ -3664,7 +3673,7 @@ class cc extends cr {
|
|
|
3664
3673
|
return this.onClose({ description: "transport closed by the server" }), !1;
|
|
3665
3674
|
this.onPacket(r);
|
|
3666
3675
|
};
|
|
3667
|
-
|
|
3676
|
+
Ja(e, this.socket.binaryType).forEach(t), this.readyState !== "closed" && (this.polling = !1, this.emitReserved("pollComplete"), this.readyState === "open" && this.poll());
|
|
3668
3677
|
}
|
|
3669
3678
|
doClose() {
|
|
3670
3679
|
const e = () => {
|
|
@@ -3673,7 +3682,7 @@ class cc extends cr {
|
|
|
3673
3682
|
this.readyState === "open" ? e() : this.once("open", e);
|
|
3674
3683
|
}
|
|
3675
3684
|
write(e) {
|
|
3676
|
-
this.writable = !1,
|
|
3685
|
+
this.writable = !1, za(e, (t) => {
|
|
3677
3686
|
this.doWrite(t, () => {
|
|
3678
3687
|
this.writable = !0, this.emitReserved("drain");
|
|
3679
3688
|
});
|
|
@@ -3681,10 +3690,10 @@ class cc extends cr {
|
|
|
3681
3690
|
}
|
|
3682
3691
|
uri() {
|
|
3683
3692
|
const e = this.opts.secure ? "https" : "http", t = this.query || {};
|
|
3684
|
-
return this.opts.timestampRequests !== !1 && (t[this.opts.timestampParam] =
|
|
3693
|
+
return this.opts.timestampRequests !== !1 && (t[this.opts.timestampParam] = Xs()), !this.supportsBinary && !t.sid && (t.b64 = 1), this.createUri(e, t);
|
|
3685
3694
|
}
|
|
3686
3695
|
request(e = {}) {
|
|
3687
|
-
return Object.assign(e, { xd: this.xd, cookieJar: this.cookieJar }, this.opts), new
|
|
3696
|
+
return Object.assign(e, { xd: this.xd, cookieJar: this.cookieJar }, this.opts), new Ue(this.uri(), e);
|
|
3688
3697
|
}
|
|
3689
3698
|
doWrite(e, t) {
|
|
3690
3699
|
const r = this.request({
|
|
@@ -3702,15 +3711,15 @@ class cc extends cr {
|
|
|
3702
3711
|
}), this.pollXhr = e;
|
|
3703
3712
|
}
|
|
3704
3713
|
}
|
|
3705
|
-
class
|
|
3714
|
+
class Ue extends ce {
|
|
3706
3715
|
constructor(e, t) {
|
|
3707
|
-
super(),
|
|
3716
|
+
super(), dn(this, t), this.opts = t, this.method = t.method || "GET", this.uri = e, this.data = t.data !== void 0 ? t.data : null, this.create();
|
|
3708
3717
|
}
|
|
3709
3718
|
create() {
|
|
3710
3719
|
var e;
|
|
3711
|
-
const t =
|
|
3720
|
+
const t = Ys(this.opts, "agent", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "autoUnref");
|
|
3712
3721
|
t.xdomain = !!this.opts.xd;
|
|
3713
|
-
const r = this.xhr = new
|
|
3722
|
+
const r = this.xhr = new Zs(t);
|
|
3714
3723
|
try {
|
|
3715
3724
|
r.open(this.method, this.uri, !0);
|
|
3716
3725
|
try {
|
|
@@ -3742,19 +3751,19 @@ class Ie extends ce {
|
|
|
3742
3751
|
}, 0);
|
|
3743
3752
|
return;
|
|
3744
3753
|
}
|
|
3745
|
-
typeof document < "u" && (this.index =
|
|
3754
|
+
typeof document < "u" && (this.index = Ue.requestsCount++, Ue.requests[this.index] = this);
|
|
3746
3755
|
}
|
|
3747
3756
|
onError(e) {
|
|
3748
3757
|
this.emitReserved("error", e, this.xhr), this.cleanup(!0);
|
|
3749
3758
|
}
|
|
3750
3759
|
cleanup(e) {
|
|
3751
3760
|
if (!(typeof this.xhr > "u" || this.xhr === null)) {
|
|
3752
|
-
if (this.xhr.onreadystatechange =
|
|
3761
|
+
if (this.xhr.onreadystatechange = ac, e)
|
|
3753
3762
|
try {
|
|
3754
3763
|
this.xhr.abort();
|
|
3755
3764
|
} catch {
|
|
3756
3765
|
}
|
|
3757
|
-
typeof document < "u" && delete
|
|
3766
|
+
typeof document < "u" && delete Ue.requests[this.index], this.xhr = null;
|
|
3758
3767
|
}
|
|
3759
3768
|
}
|
|
3760
3769
|
onLoad() {
|
|
@@ -3765,22 +3774,22 @@ class Ie extends ce {
|
|
|
3765
3774
|
this.cleanup();
|
|
3766
3775
|
}
|
|
3767
3776
|
}
|
|
3768
|
-
|
|
3769
|
-
|
|
3777
|
+
Ue.requestsCount = 0;
|
|
3778
|
+
Ue.requests = {};
|
|
3770
3779
|
if (typeof document < "u") {
|
|
3771
3780
|
if (typeof attachEvent == "function")
|
|
3772
|
-
attachEvent("onunload",
|
|
3781
|
+
attachEvent("onunload", Gr);
|
|
3773
3782
|
else if (typeof addEventListener == "function") {
|
|
3774
3783
|
const n = "onpagehide" in xe ? "pagehide" : "unload";
|
|
3775
|
-
addEventListener(n,
|
|
3784
|
+
addEventListener(n, Gr, !1);
|
|
3776
3785
|
}
|
|
3777
3786
|
}
|
|
3778
|
-
function
|
|
3779
|
-
for (let n in
|
|
3780
|
-
|
|
3787
|
+
function Gr() {
|
|
3788
|
+
for (let n in Ue.requests)
|
|
3789
|
+
Ue.requests.hasOwnProperty(n) && Ue.requests[n].abort();
|
|
3781
3790
|
}
|
|
3782
|
-
const
|
|
3783
|
-
class
|
|
3791
|
+
const lr = (() => typeof Promise == "function" && typeof Promise.resolve == "function" ? (e) => Promise.resolve().then(e) : (e, t) => t(e, 0))(), $t = xe.WebSocket || xe.MozWebSocket, Xr = !0, lc = "arraybuffer", Qr = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
|
|
3792
|
+
class fc extends ur {
|
|
3784
3793
|
constructor(e) {
|
|
3785
3794
|
super(e), this.supportsBinary = !e.forceBase64;
|
|
3786
3795
|
}
|
|
@@ -3790,10 +3799,10 @@ class lc extends cr {
|
|
|
3790
3799
|
doOpen() {
|
|
3791
3800
|
if (!this.check())
|
|
3792
3801
|
return;
|
|
3793
|
-
const e = this.uri(), t = this.opts.protocols, r =
|
|
3802
|
+
const e = this.uri(), t = this.opts.protocols, r = Qr ? {} : Ys(this.opts, "agent", "perMessageDeflate", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress", "protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity");
|
|
3794
3803
|
this.opts.extraHeaders && (r.headers = this.opts.extraHeaders);
|
|
3795
3804
|
try {
|
|
3796
|
-
this.ws =
|
|
3805
|
+
this.ws = Xr && !Qr ? t ? new $t(e, t) : new $t(e) : new $t(e, t, r);
|
|
3797
3806
|
} catch (s) {
|
|
3798
3807
|
return this.emitReserved("error", s);
|
|
3799
3808
|
}
|
|
@@ -3811,13 +3820,13 @@ class lc extends cr {
|
|
|
3811
3820
|
this.writable = !1;
|
|
3812
3821
|
for (let t = 0; t < e.length; t++) {
|
|
3813
3822
|
const r = e[t], s = t === e.length - 1;
|
|
3814
|
-
|
|
3823
|
+
ar(r, this.supportsBinary, (i) => {
|
|
3815
3824
|
const o = {};
|
|
3816
3825
|
try {
|
|
3817
|
-
|
|
3826
|
+
Xr && this.ws.send(i);
|
|
3818
3827
|
} catch {
|
|
3819
3828
|
}
|
|
3820
|
-
s &&
|
|
3829
|
+
s && lr(() => {
|
|
3821
3830
|
this.writable = !0, this.emitReserved("drain");
|
|
3822
3831
|
}, this.setTimeoutFn);
|
|
3823
3832
|
});
|
|
@@ -3828,13 +3837,13 @@ class lc extends cr {
|
|
|
3828
3837
|
}
|
|
3829
3838
|
uri() {
|
|
3830
3839
|
const e = this.opts.secure ? "wss" : "ws", t = this.query || {};
|
|
3831
|
-
return this.opts.timestampRequests && (t[this.opts.timestampParam] =
|
|
3840
|
+
return this.opts.timestampRequests && (t[this.opts.timestampParam] = Xs()), this.supportsBinary || (t.b64 = 1), this.createUri(e, t);
|
|
3832
3841
|
}
|
|
3833
3842
|
check() {
|
|
3834
3843
|
return !!$t;
|
|
3835
3844
|
}
|
|
3836
3845
|
}
|
|
3837
|
-
class
|
|
3846
|
+
class hc extends ur {
|
|
3838
3847
|
get name() {
|
|
3839
3848
|
return "webtransport";
|
|
3840
3849
|
}
|
|
@@ -3845,7 +3854,7 @@ class fc extends cr {
|
|
|
3845
3854
|
this.onError("webtransport error", e);
|
|
3846
3855
|
}), this.transport.ready.then(() => {
|
|
3847
3856
|
this.transport.createBidirectionalStream().then((e) => {
|
|
3848
|
-
const t =
|
|
3857
|
+
const t = Ya(Number.MAX_SAFE_INTEGER, this.socket.binaryType), r = e.readable.pipeThrough(t).getReader(), s = Ka();
|
|
3849
3858
|
s.readable.pipeTo(e.writable), this.writer = s.writable.getWriter();
|
|
3850
3859
|
const i = () => {
|
|
3851
3860
|
r.read().then(({ done: c, value: u }) => {
|
|
@@ -3864,7 +3873,7 @@ class fc extends cr {
|
|
|
3864
3873
|
for (let t = 0; t < e.length; t++) {
|
|
3865
3874
|
const r = e[t], s = t === e.length - 1;
|
|
3866
3875
|
this.writer.write(r).then(() => {
|
|
3867
|
-
s &&
|
|
3876
|
+
s && lr(() => {
|
|
3868
3877
|
this.writable = !0, this.emitReserved("drain");
|
|
3869
3878
|
}, this.setTimeoutFn);
|
|
3870
3879
|
});
|
|
@@ -3875,11 +3884,11 @@ class fc extends cr {
|
|
|
3875
3884
|
(e = this.transport) === null || e === void 0 || e.close();
|
|
3876
3885
|
}
|
|
3877
3886
|
}
|
|
3878
|
-
const
|
|
3879
|
-
websocket:
|
|
3880
|
-
webtransport:
|
|
3881
|
-
polling:
|
|
3882
|
-
},
|
|
3887
|
+
const dc = {
|
|
3888
|
+
websocket: fc,
|
|
3889
|
+
webtransport: hc,
|
|
3890
|
+
polling: uc
|
|
3891
|
+
}, pc = /^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, mc = [
|
|
3883
3892
|
"source",
|
|
3884
3893
|
"protocol",
|
|
3885
3894
|
"authority",
|
|
@@ -3895,21 +3904,21 @@ const hc = {
|
|
|
3895
3904
|
"query",
|
|
3896
3905
|
"anchor"
|
|
3897
3906
|
];
|
|
3898
|
-
function
|
|
3907
|
+
function zn(n) {
|
|
3899
3908
|
if (n.length > 2e3)
|
|
3900
3909
|
throw "URI too long";
|
|
3901
3910
|
const e = n, t = n.indexOf("["), r = n.indexOf("]");
|
|
3902
3911
|
t != -1 && r != -1 && (n = n.substring(0, t) + n.substring(t, r).replace(/:/g, ";") + n.substring(r, n.length));
|
|
3903
|
-
let s =
|
|
3912
|
+
let s = pc.exec(n || ""), i = {}, o = 14;
|
|
3904
3913
|
for (; o--; )
|
|
3905
|
-
i[
|
|
3906
|
-
return t != -1 && r != -1 && (i.source = e, i.host = i.host.substring(1, i.host.length - 1).replace(/;/g, ":"), i.authority = i.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), i.ipv6uri = !0), i.pathNames =
|
|
3914
|
+
i[mc[o]] = s[o] || "";
|
|
3915
|
+
return t != -1 && r != -1 && (i.source = e, i.host = i.host.substring(1, i.host.length - 1).replace(/;/g, ":"), i.authority = i.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), i.ipv6uri = !0), i.pathNames = yc(i, i.path), i.queryKey = gc(i, i.query), i;
|
|
3907
3916
|
}
|
|
3908
|
-
function
|
|
3917
|
+
function yc(n, e) {
|
|
3909
3918
|
const t = /\/{2,9}/g, r = e.replace(t, "/").split("/");
|
|
3910
3919
|
return (e.slice(0, 1) == "/" || e.length === 0) && r.splice(0, 1), e.slice(-1) == "/" && r.splice(r.length - 1, 1), r;
|
|
3911
3920
|
}
|
|
3912
|
-
function
|
|
3921
|
+
function gc(n, e) {
|
|
3913
3922
|
const t = {};
|
|
3914
3923
|
return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function(r, s, i) {
|
|
3915
3924
|
s && (t[s] = i);
|
|
@@ -3917,7 +3926,7 @@ function yc(n, e) {
|
|
|
3917
3926
|
}
|
|
3918
3927
|
class Xe extends ce {
|
|
3919
3928
|
constructor(e, t = {}) {
|
|
3920
|
-
super(), this.binaryType =
|
|
3929
|
+
super(), this.binaryType = lc, this.writeBuffer = [], e && typeof e == "object" && (t = e, e = null), e ? (e = zn(e), t.hostname = e.host, t.secure = e.protocol === "https" || e.protocol === "wss", t.port = e.port, e.query && (t.query = e.query)) : t.host && (t.hostname = zn(t.host).host), dn(this, t), this.secure = t.secure != null ? t.secure : typeof location < "u" && location.protocol === "https:", t.hostname && !t.port && (t.port = this.secure ? "443" : "80"), this.hostname = t.hostname || (typeof location < "u" ? location.hostname : "localhost"), this.port = t.port || (typeof location < "u" && location.port ? location.port : this.secure ? "443" : "80"), this.transports = t.transports || [
|
|
3921
3930
|
"polling",
|
|
3922
3931
|
"websocket",
|
|
3923
3932
|
"webtransport"
|
|
@@ -3935,7 +3944,7 @@ class Xe extends ce {
|
|
|
3935
3944
|
},
|
|
3936
3945
|
transportOptions: {},
|
|
3937
3946
|
closeOnBeforeunload: !1
|
|
3938
|
-
}, t), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query =
|
|
3947
|
+
}, t), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query = rc(this.opts.query)), this.id = null, this.upgrades = null, this.pingInterval = null, this.pingTimeout = null, this.pingTimeoutTimer = null, typeof addEventListener == "function" && (this.opts.closeOnBeforeunload && (this.beforeunloadEventListener = () => {
|
|
3939
3948
|
this.transport && (this.transport.removeAllListeners(), this.transport.close());
|
|
3940
3949
|
}, addEventListener("beforeunload", this.beforeunloadEventListener, !1)), this.hostname !== "localhost" && (this.offlineEventListener = () => {
|
|
3941
3950
|
this.onClose("transport close", {
|
|
@@ -3945,7 +3954,7 @@ class Xe extends ce {
|
|
|
3945
3954
|
}
|
|
3946
3955
|
createTransport(e) {
|
|
3947
3956
|
const t = Object.assign({}, this.opts.query);
|
|
3948
|
-
t.EIO =
|
|
3957
|
+
t.EIO = Ks, t.transport = e, this.id && (t.sid = this.id);
|
|
3949
3958
|
const r = Object.assign({}, this.opts, {
|
|
3950
3959
|
query: t,
|
|
3951
3960
|
socket: this,
|
|
@@ -3953,7 +3962,7 @@ class Xe extends ce {
|
|
|
3953
3962
|
secure: this.secure,
|
|
3954
3963
|
port: this.port
|
|
3955
3964
|
}, this.opts.transportOptions[e]);
|
|
3956
|
-
return new
|
|
3965
|
+
return new dc[e](r);
|
|
3957
3966
|
}
|
|
3958
3967
|
open() {
|
|
3959
3968
|
let e;
|
|
@@ -3991,8 +4000,8 @@ class Xe extends ce {
|
|
|
3991
4000
|
r || this.readyState !== "closed" && (f(), this.setTransport(t), t.send([{ type: "upgrade" }]), this.emitReserved("upgrade", t), t = null, this.upgrading = !1, this.flush());
|
|
3992
4001
|
});
|
|
3993
4002
|
} else {
|
|
3994
|
-
const
|
|
3995
|
-
|
|
4003
|
+
const g = new Error("probe error");
|
|
4004
|
+
g.transport = t.name, this.emitReserved("upgradeError", g);
|
|
3996
4005
|
}
|
|
3997
4006
|
}));
|
|
3998
4007
|
};
|
|
@@ -4000,8 +4009,8 @@ class Xe extends ce {
|
|
|
4000
4009
|
r || (r = !0, f(), t.close(), t = null);
|
|
4001
4010
|
}
|
|
4002
4011
|
const o = (h) => {
|
|
4003
|
-
const
|
|
4004
|
-
|
|
4012
|
+
const g = new Error("probe error: " + h);
|
|
4013
|
+
g.transport = t.name, i(), this.emitReserved("upgradeError", g);
|
|
4005
4014
|
};
|
|
4006
4015
|
function c() {
|
|
4007
4016
|
o("transport closed");
|
|
@@ -4068,7 +4077,7 @@ class Xe extends ce {
|
|
|
4068
4077
|
let t = 1;
|
|
4069
4078
|
for (let r = 0; r < this.writeBuffer.length; r++) {
|
|
4070
4079
|
const s = this.writeBuffer[r].data;
|
|
4071
|
-
if (s && (t +=
|
|
4080
|
+
if (s && (t += ec(s)), r > 0 && t > this.maxPayload)
|
|
4072
4081
|
return this.writeBuffer.slice(0, r);
|
|
4073
4082
|
t += 2;
|
|
4074
4083
|
}
|
|
@@ -4118,16 +4127,16 @@ class Xe extends ce {
|
|
|
4118
4127
|
return t;
|
|
4119
4128
|
}
|
|
4120
4129
|
}
|
|
4121
|
-
Xe.protocol =
|
|
4122
|
-
function
|
|
4130
|
+
Xe.protocol = Ks;
|
|
4131
|
+
function vc(n, e = "", t) {
|
|
4123
4132
|
let r = n;
|
|
4124
|
-
t = t || typeof location < "u" && location, n == null && (n = t.protocol + "//" + t.host), typeof n == "string" && (n.charAt(0) === "/" && (n.charAt(1) === "/" ? n = t.protocol + n : n = t.host + n), /^(https?|wss?):\/\//.test(n) || (typeof t < "u" ? n = t.protocol + "//" + n : n = "https://" + n), r =
|
|
4133
|
+
t = t || typeof location < "u" && location, n == null && (n = t.protocol + "//" + t.host), typeof n == "string" && (n.charAt(0) === "/" && (n.charAt(1) === "/" ? n = t.protocol + n : n = t.host + n), /^(https?|wss?):\/\//.test(n) || (typeof t < "u" ? n = t.protocol + "//" + n : n = "https://" + n), r = zn(n)), r.port || (/^(http|ws)$/.test(r.protocol) ? r.port = "80" : /^(http|ws)s$/.test(r.protocol) && (r.port = "443")), r.path = r.path || "/";
|
|
4125
4134
|
const i = r.host.indexOf(":") !== -1 ? "[" + r.host + "]" : r.host;
|
|
4126
4135
|
return r.id = r.protocol + "://" + i + ":" + r.port + e, r.href = r.protocol + "://" + i + (t && t.port === r.port ? "" : ":" + r.port), r;
|
|
4127
4136
|
}
|
|
4128
|
-
const
|
|
4129
|
-
function
|
|
4130
|
-
return
|
|
4137
|
+
const wc = typeof ArrayBuffer == "function", bc = (n) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(n) : n.buffer instanceof ArrayBuffer, ei = Object.prototype.toString, _c = typeof Blob == "function" || typeof Blob < "u" && ei.call(Blob) === "[object BlobConstructor]", Ec = typeof File == "function" || typeof File < "u" && ei.call(File) === "[object FileConstructor]";
|
|
4138
|
+
function fr(n) {
|
|
4139
|
+
return wc && (n instanceof ArrayBuffer || bc(n)) || _c && n instanceof Blob || Ec && n instanceof File;
|
|
4131
4140
|
}
|
|
4132
4141
|
function Kt(n, e) {
|
|
4133
4142
|
if (!n || typeof n != "object")
|
|
@@ -4138,7 +4147,7 @@ function Kt(n, e) {
|
|
|
4138
4147
|
return !0;
|
|
4139
4148
|
return !1;
|
|
4140
4149
|
}
|
|
4141
|
-
if (
|
|
4150
|
+
if (fr(n))
|
|
4142
4151
|
return !0;
|
|
4143
4152
|
if (n.toJSON && typeof n.toJSON == "function" && arguments.length === 1)
|
|
4144
4153
|
return Kt(n.toJSON(), !0);
|
|
@@ -4147,33 +4156,33 @@ function Kt(n, e) {
|
|
|
4147
4156
|
return !0;
|
|
4148
4157
|
return !1;
|
|
4149
4158
|
}
|
|
4150
|
-
function
|
|
4159
|
+
function Rc(n) {
|
|
4151
4160
|
const e = [], t = n.data, r = n;
|
|
4152
|
-
return r.data =
|
|
4161
|
+
return r.data = Jn(t, e), r.attachments = e.length, { packet: r, buffers: e };
|
|
4153
4162
|
}
|
|
4154
|
-
function
|
|
4163
|
+
function Jn(n, e) {
|
|
4155
4164
|
if (!n)
|
|
4156
4165
|
return n;
|
|
4157
|
-
if (
|
|
4166
|
+
if (fr(n)) {
|
|
4158
4167
|
const t = { _placeholder: !0, num: e.length };
|
|
4159
4168
|
return e.push(n), t;
|
|
4160
4169
|
} else if (Array.isArray(n)) {
|
|
4161
4170
|
const t = new Array(n.length);
|
|
4162
4171
|
for (let r = 0; r < n.length; r++)
|
|
4163
|
-
t[r] =
|
|
4172
|
+
t[r] = Jn(n[r], e);
|
|
4164
4173
|
return t;
|
|
4165
4174
|
} else if (typeof n == "object" && !(n instanceof Date)) {
|
|
4166
4175
|
const t = {};
|
|
4167
4176
|
for (const r in n)
|
|
4168
|
-
Object.prototype.hasOwnProperty.call(n, r) && (t[r] =
|
|
4177
|
+
Object.prototype.hasOwnProperty.call(n, r) && (t[r] = Jn(n[r], e));
|
|
4169
4178
|
return t;
|
|
4170
4179
|
}
|
|
4171
4180
|
return n;
|
|
4172
4181
|
}
|
|
4173
|
-
function
|
|
4174
|
-
return n.data =
|
|
4182
|
+
function Sc(n, e) {
|
|
4183
|
+
return n.data = Kn(n.data, e), delete n.attachments, n;
|
|
4175
4184
|
}
|
|
4176
|
-
function
|
|
4185
|
+
function Kn(n, e) {
|
|
4177
4186
|
if (!n)
|
|
4178
4187
|
return n;
|
|
4179
4188
|
if (n && n._placeholder === !0) {
|
|
@@ -4182,25 +4191,25 @@ function Jn(n, e) {
|
|
|
4182
4191
|
throw new Error("illegal attachments");
|
|
4183
4192
|
} else if (Array.isArray(n))
|
|
4184
4193
|
for (let t = 0; t < n.length; t++)
|
|
4185
|
-
n[t] =
|
|
4194
|
+
n[t] = Kn(n[t], e);
|
|
4186
4195
|
else if (typeof n == "object")
|
|
4187
4196
|
for (const t in n)
|
|
4188
|
-
Object.prototype.hasOwnProperty.call(n, t) && (n[t] =
|
|
4197
|
+
Object.prototype.hasOwnProperty.call(n, t) && (n[t] = Kn(n[t], e));
|
|
4189
4198
|
return n;
|
|
4190
4199
|
}
|
|
4191
|
-
const
|
|
4200
|
+
const Tc = [
|
|
4192
4201
|
"connect",
|
|
4193
4202
|
"connect_error",
|
|
4194
4203
|
"disconnect",
|
|
4195
4204
|
"disconnecting",
|
|
4196
4205
|
"newListener",
|
|
4197
4206
|
"removeListener"
|
|
4198
|
-
],
|
|
4207
|
+
], Oc = 5;
|
|
4199
4208
|
var V;
|
|
4200
4209
|
(function(n) {
|
|
4201
4210
|
n[n.CONNECT = 0] = "CONNECT", n[n.DISCONNECT = 1] = "DISCONNECT", n[n.EVENT = 2] = "EVENT", n[n.ACK = 3] = "ACK", n[n.CONNECT_ERROR = 4] = "CONNECT_ERROR", n[n.BINARY_EVENT = 5] = "BINARY_EVENT", n[n.BINARY_ACK = 6] = "BINARY_ACK";
|
|
4202
4211
|
})(V || (V = {}));
|
|
4203
|
-
class
|
|
4212
|
+
class xc {
|
|
4204
4213
|
constructor(e) {
|
|
4205
4214
|
this.replacer = e;
|
|
4206
4215
|
}
|
|
@@ -4217,14 +4226,14 @@ class Oc {
|
|
|
4217
4226
|
return (e.type === V.BINARY_EVENT || e.type === V.BINARY_ACK) && (t += e.attachments + "-"), e.nsp && e.nsp !== "/" && (t += e.nsp + ","), e.id != null && (t += e.id), e.data != null && (t += JSON.stringify(e.data, this.replacer)), t;
|
|
4218
4227
|
}
|
|
4219
4228
|
encodeAsBinary(e) {
|
|
4220
|
-
const t =
|
|
4229
|
+
const t = Rc(e), r = this.encodeAsString(t.packet), s = t.buffers;
|
|
4221
4230
|
return s.unshift(r), s;
|
|
4222
4231
|
}
|
|
4223
4232
|
}
|
|
4224
|
-
function
|
|
4233
|
+
function Zr(n) {
|
|
4225
4234
|
return Object.prototype.toString.call(n) === "[object Object]";
|
|
4226
4235
|
}
|
|
4227
|
-
class
|
|
4236
|
+
class hr extends ce {
|
|
4228
4237
|
constructor(e) {
|
|
4229
4238
|
super(), this.reviver = e;
|
|
4230
4239
|
}
|
|
@@ -4235,8 +4244,8 @@ class fr extends ce {
|
|
|
4235
4244
|
throw new Error("got plaintext data when reconstructing a packet");
|
|
4236
4245
|
t = this.decodeString(e);
|
|
4237
4246
|
const r = t.type === V.BINARY_EVENT;
|
|
4238
|
-
r || t.type === V.BINARY_ACK ? (t.type = r ? V.EVENT : V.ACK, this.reconstructor = new
|
|
4239
|
-
} else if (
|
|
4247
|
+
r || t.type === V.BINARY_ACK ? (t.type = r ? V.EVENT : V.ACK, this.reconstructor = new Cc(t), t.attachments === 0 && super.emitReserved("decoded", t)) : super.emitReserved("decoded", t);
|
|
4248
|
+
} else if (fr(e) || e.base64)
|
|
4240
4249
|
if (this.reconstructor)
|
|
4241
4250
|
t = this.reconstructor.takeBinaryData(e), t && (this.reconstructor = null, super.emitReserved("decoded", t));
|
|
4242
4251
|
else
|
|
@@ -4283,7 +4292,7 @@ class fr extends ce {
|
|
|
4283
4292
|
}
|
|
4284
4293
|
if (e.charAt(++t)) {
|
|
4285
4294
|
const i = this.tryParse(e.substr(t));
|
|
4286
|
-
if (
|
|
4295
|
+
if (hr.isPayloadValid(r.type, i))
|
|
4287
4296
|
r.data = i;
|
|
4288
4297
|
else
|
|
4289
4298
|
throw new Error("invalid payload");
|
|
@@ -4300,14 +4309,14 @@ class fr extends ce {
|
|
|
4300
4309
|
static isPayloadValid(e, t) {
|
|
4301
4310
|
switch (e) {
|
|
4302
4311
|
case V.CONNECT:
|
|
4303
|
-
return
|
|
4312
|
+
return Zr(t);
|
|
4304
4313
|
case V.DISCONNECT:
|
|
4305
4314
|
return t === void 0;
|
|
4306
4315
|
case V.CONNECT_ERROR:
|
|
4307
|
-
return typeof t == "string" ||
|
|
4316
|
+
return typeof t == "string" || Zr(t);
|
|
4308
4317
|
case V.EVENT:
|
|
4309
4318
|
case V.BINARY_EVENT:
|
|
4310
|
-
return Array.isArray(t) && (typeof t[0] == "number" || typeof t[0] == "string" &&
|
|
4319
|
+
return Array.isArray(t) && (typeof t[0] == "number" || typeof t[0] == "string" && Tc.indexOf(t[0]) === -1);
|
|
4311
4320
|
case V.ACK:
|
|
4312
4321
|
case V.BINARY_ACK:
|
|
4313
4322
|
return Array.isArray(t);
|
|
@@ -4317,13 +4326,13 @@ class fr extends ce {
|
|
|
4317
4326
|
this.reconstructor && (this.reconstructor.finishedReconstruction(), this.reconstructor = null);
|
|
4318
4327
|
}
|
|
4319
4328
|
}
|
|
4320
|
-
class
|
|
4329
|
+
class Cc {
|
|
4321
4330
|
constructor(e) {
|
|
4322
4331
|
this.packet = e, this.buffers = [], this.reconPack = e;
|
|
4323
4332
|
}
|
|
4324
4333
|
takeBinaryData(e) {
|
|
4325
4334
|
if (this.buffers.push(e), this.buffers.length === this.reconPack.attachments) {
|
|
4326
|
-
const t =
|
|
4335
|
+
const t = Sc(this.reconPack, this.buffers);
|
|
4327
4336
|
return this.finishedReconstruction(), t;
|
|
4328
4337
|
}
|
|
4329
4338
|
return null;
|
|
@@ -4332,21 +4341,21 @@ class xc {
|
|
|
4332
4341
|
this.reconPack = null, this.buffers = [];
|
|
4333
4342
|
}
|
|
4334
4343
|
}
|
|
4335
|
-
const
|
|
4344
|
+
const Ac = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4336
4345
|
__proto__: null,
|
|
4337
|
-
protocol:
|
|
4346
|
+
protocol: Oc,
|
|
4338
4347
|
get PacketType() {
|
|
4339
4348
|
return V;
|
|
4340
4349
|
},
|
|
4341
|
-
Encoder:
|
|
4342
|
-
Decoder:
|
|
4350
|
+
Encoder: xc,
|
|
4351
|
+
Decoder: hr
|
|
4343
4352
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4344
4353
|
function Ae(n, e, t) {
|
|
4345
4354
|
return n.on(e, t), function() {
|
|
4346
4355
|
n.off(e, t);
|
|
4347
4356
|
};
|
|
4348
4357
|
}
|
|
4349
|
-
const
|
|
4358
|
+
const Dc = Object.freeze({
|
|
4350
4359
|
connect: 1,
|
|
4351
4360
|
connect_error: 1,
|
|
4352
4361
|
disconnect: 1,
|
|
@@ -4354,7 +4363,7 @@ const Ac = Object.freeze({
|
|
|
4354
4363
|
newListener: 1,
|
|
4355
4364
|
removeListener: 1
|
|
4356
4365
|
});
|
|
4357
|
-
class
|
|
4366
|
+
class ti extends ce {
|
|
4358
4367
|
constructor(e, t, r) {
|
|
4359
4368
|
super(), this.connected = !1, this.recovered = !1, this.receiveBuffer = [], this.sendBuffer = [], this._queue = [], this._queueSeq = 0, this.ids = 0, this.acks = {}, this.flags = {}, this.io = e, this.nsp = t, r && r.auth && (this.auth = r.auth), this._opts = Object.assign({}, r), this.io._autoConnect && this.open();
|
|
4360
4369
|
}
|
|
@@ -4385,7 +4394,7 @@ class ei extends ce {
|
|
|
4385
4394
|
return e.unshift("message"), this.emit.apply(this, e), this;
|
|
4386
4395
|
}
|
|
4387
4396
|
emit(e, ...t) {
|
|
4388
|
-
if (
|
|
4397
|
+
if (Dc.hasOwnProperty(e))
|
|
4389
4398
|
throw new Error('"' + e.toString() + '" is a reserved event name');
|
|
4390
4399
|
if (t.unshift(e), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile)
|
|
4391
4400
|
return this._addToQueue(t), this;
|
|
@@ -4614,15 +4623,15 @@ vt.prototype.setMax = function(n) {
|
|
|
4614
4623
|
vt.prototype.setJitter = function(n) {
|
|
4615
4624
|
this.jitter = n;
|
|
4616
4625
|
};
|
|
4617
|
-
class
|
|
4626
|
+
class Yn extends ce {
|
|
4618
4627
|
constructor(e, t) {
|
|
4619
4628
|
var r;
|
|
4620
|
-
super(), this.nsps = {}, this.subs = [], e && typeof e == "object" && (t = e, e = void 0), t = t || {}, t.path = t.path || "/socket.io", this.opts = t,
|
|
4629
|
+
super(), this.nsps = {}, this.subs = [], e && typeof e == "object" && (t = e, e = void 0), t = t || {}, t.path = t.path || "/socket.io", this.opts = t, dn(this, t), this.reconnection(t.reconnection !== !1), this.reconnectionAttempts(t.reconnectionAttempts || 1 / 0), this.reconnectionDelay(t.reconnectionDelay || 1e3), this.reconnectionDelayMax(t.reconnectionDelayMax || 5e3), this.randomizationFactor((r = t.randomizationFactor) !== null && r !== void 0 ? r : 0.5), this.backoff = new vt({
|
|
4621
4630
|
min: this.reconnectionDelay(),
|
|
4622
4631
|
max: this.reconnectionDelayMax(),
|
|
4623
4632
|
jitter: this.randomizationFactor()
|
|
4624
4633
|
}), this.timeout(t.timeout == null ? 2e4 : t.timeout), this._readyState = "closed", this.uri = e;
|
|
4625
|
-
const s = t.parser ||
|
|
4634
|
+
const s = t.parser || Ac;
|
|
4626
4635
|
this.encoder = new s.Encoder(), this.decoder = new s.Decoder(), this._autoConnect = t.autoConnect !== !1, this._autoConnect && this.open();
|
|
4627
4636
|
}
|
|
4628
4637
|
reconnection(e) {
|
|
@@ -4689,7 +4698,7 @@ class Kn extends ce {
|
|
|
4689
4698
|
}
|
|
4690
4699
|
}
|
|
4691
4700
|
ondecoded(e) {
|
|
4692
|
-
|
|
4701
|
+
lr(() => {
|
|
4693
4702
|
this.emitReserved("packet", e);
|
|
4694
4703
|
}, this.setTimeoutFn);
|
|
4695
4704
|
}
|
|
@@ -4698,7 +4707,7 @@ class Kn extends ce {
|
|
|
4698
4707
|
}
|
|
4699
4708
|
socket(e, t) {
|
|
4700
4709
|
let r = this.nsps[e];
|
|
4701
|
-
return r ? this._autoConnect && !r.active && r.connect() : (r = new
|
|
4710
|
+
return r ? this._autoConnect && !r.active && r.connect() : (r = new ti(this, e, t), this.nsps[e] = r), r;
|
|
4702
4711
|
}
|
|
4703
4712
|
_destroy(e) {
|
|
4704
4713
|
const t = Object.keys(this.nsps);
|
|
@@ -4751,17 +4760,17 @@ class Kn extends ce {
|
|
|
4751
4760
|
const _t = {};
|
|
4752
4761
|
function Yt(n, e) {
|
|
4753
4762
|
typeof n == "object" && (e = n, n = void 0), e = e || {};
|
|
4754
|
-
const t =
|
|
4763
|
+
const t = vc(n, e.path || "/socket.io"), r = t.source, s = t.id, i = t.path, o = _t[s] && i in _t[s].nsps, c = e.forceNew || e["force new connection"] || e.multiplex === !1 || o;
|
|
4755
4764
|
let u;
|
|
4756
|
-
return c ? u = new
|
|
4765
|
+
return c ? u = new Yn(r, e) : (_t[s] || (_t[s] = new Yn(r, e)), u = _t[s]), t.query && !e.query && (e.query = t.queryKey), u.socket(t.path, e);
|
|
4757
4766
|
}
|
|
4758
4767
|
Object.assign(Yt, {
|
|
4759
|
-
Manager:
|
|
4760
|
-
Socket:
|
|
4768
|
+
Manager: Yn,
|
|
4769
|
+
Socket: ti,
|
|
4761
4770
|
io: Yt,
|
|
4762
4771
|
connect: Yt
|
|
4763
4772
|
});
|
|
4764
|
-
class
|
|
4773
|
+
class Lc {
|
|
4765
4774
|
constructor(e, t, r, s) {
|
|
4766
4775
|
Ye(this, "socket_port");
|
|
4767
4776
|
Ye(this, "host");
|
|
@@ -4785,7 +4794,7 @@ class Dc {
|
|
|
4785
4794
|
});
|
|
4786
4795
|
}
|
|
4787
4796
|
}
|
|
4788
|
-
var
|
|
4797
|
+
var ni = { exports: {} }, Et = {};
|
|
4789
4798
|
/**
|
|
4790
4799
|
* @license React
|
|
4791
4800
|
* react-jsx-runtime.production.min.js
|
|
@@ -4795,21 +4804,21 @@ var ti = { exports: {} }, Et = {};
|
|
|
4795
4804
|
* This source code is licensed under the MIT license found in the
|
|
4796
4805
|
* LICENSE file in the root directory of this source tree.
|
|
4797
4806
|
*/
|
|
4798
|
-
var
|
|
4799
|
-
function
|
|
4800
|
-
if (
|
|
4807
|
+
var es;
|
|
4808
|
+
function kc() {
|
|
4809
|
+
if (es)
|
|
4801
4810
|
return Et;
|
|
4802
|
-
|
|
4811
|
+
es = 1;
|
|
4803
4812
|
var n = et, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, s = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
4804
4813
|
function o(c, u, a) {
|
|
4805
|
-
var f, h = {},
|
|
4806
|
-
a !== void 0 && (
|
|
4814
|
+
var f, h = {}, g = null, p = null;
|
|
4815
|
+
a !== void 0 && (g = "" + a), u.key !== void 0 && (g = "" + u.key), u.ref !== void 0 && (p = u.ref);
|
|
4807
4816
|
for (f in u)
|
|
4808
4817
|
r.call(u, f) && !i.hasOwnProperty(f) && (h[f] = u[f]);
|
|
4809
4818
|
if (c && c.defaultProps)
|
|
4810
4819
|
for (f in u = c.defaultProps, u)
|
|
4811
4820
|
h[f] === void 0 && (h[f] = u[f]);
|
|
4812
|
-
return { $$typeof: e, type: c, key:
|
|
4821
|
+
return { $$typeof: e, type: c, key: g, ref: p, props: h, _owner: s.current };
|
|
4813
4822
|
}
|
|
4814
4823
|
return Et.Fragment = t, Et.jsx = o, Et.jsxs = o, Et;
|
|
4815
4824
|
}
|
|
@@ -4823,14 +4832,14 @@ var Rt = {};
|
|
|
4823
4832
|
* This source code is licensed under the MIT license found in the
|
|
4824
4833
|
* LICENSE file in the root directory of this source tree.
|
|
4825
4834
|
*/
|
|
4826
|
-
var
|
|
4827
|
-
function
|
|
4828
|
-
return
|
|
4829
|
-
var n = et, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), a = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"),
|
|
4835
|
+
var ts;
|
|
4836
|
+
function Nc() {
|
|
4837
|
+
return ts || (ts = 1, process.env.NODE_ENV !== "production" && function() {
|
|
4838
|
+
var n = et, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), a = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), y = Symbol.iterator, v = "@@iterator";
|
|
4830
4839
|
function b(l) {
|
|
4831
4840
|
if (l === null || typeof l != "object")
|
|
4832
4841
|
return null;
|
|
4833
|
-
var w = y && l[y] || l[
|
|
4842
|
+
var w = y && l[y] || l[v];
|
|
4834
4843
|
return typeof w == "function" ? w : null;
|
|
4835
4844
|
}
|
|
4836
4845
|
var m = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
@@ -4854,7 +4863,7 @@ function kc() {
|
|
|
4854
4863
|
var x = !1, D = !1, C = !1, M = !1, E = !1, B;
|
|
4855
4864
|
B = Symbol.for("react.module.reference");
|
|
4856
4865
|
function N(l) {
|
|
4857
|
-
return !!(typeof l == "string" || typeof l == "function" || l === r || l === i || E || l === s || l === a || l === f || M || l === p || x || D || C || typeof l == "object" && l !== null && (l.$$typeof ===
|
|
4866
|
+
return !!(typeof l == "string" || typeof l == "function" || l === r || l === i || E || l === s || l === a || l === f || M || l === p || x || D || C || typeof l == "object" && l !== null && (l.$$typeof === g || l.$$typeof === h || l.$$typeof === o || l.$$typeof === c || l.$$typeof === u || l.$$typeof === B || l.getModuleId !== void 0));
|
|
4858
4867
|
}
|
|
4859
4868
|
function Z(l, w, _) {
|
|
4860
4869
|
var k = l.displayName;
|
|
@@ -4900,7 +4909,7 @@ function kc() {
|
|
|
4900
4909
|
case h:
|
|
4901
4910
|
var k = l.displayName || null;
|
|
4902
4911
|
return k !== null ? k : J(l.type) || "Memo";
|
|
4903
|
-
case
|
|
4912
|
+
case g: {
|
|
4904
4913
|
var $ = l, G = $._payload, j = $._init;
|
|
4905
4914
|
try {
|
|
4906
4915
|
return J(j(G));
|
|
@@ -4911,7 +4920,7 @@ function kc() {
|
|
|
4911
4920
|
}
|
|
4912
4921
|
return null;
|
|
4913
4922
|
}
|
|
4914
|
-
var
|
|
4923
|
+
var z = Object.assign, ge = 0, _e, ee, te, Re, Je, le, X;
|
|
4915
4924
|
function we() {
|
|
4916
4925
|
}
|
|
4917
4926
|
we.__reactDisabledLog = !0;
|
|
@@ -4947,25 +4956,25 @@ function kc() {
|
|
|
4947
4956
|
writable: !0
|
|
4948
4957
|
};
|
|
4949
4958
|
Object.defineProperties(console, {
|
|
4950
|
-
log:
|
|
4959
|
+
log: z({}, l, {
|
|
4951
4960
|
value: _e
|
|
4952
4961
|
}),
|
|
4953
|
-
info:
|
|
4962
|
+
info: z({}, l, {
|
|
4954
4963
|
value: ee
|
|
4955
4964
|
}),
|
|
4956
|
-
warn:
|
|
4965
|
+
warn: z({}, l, {
|
|
4957
4966
|
value: te
|
|
4958
4967
|
}),
|
|
4959
|
-
error:
|
|
4968
|
+
error: z({}, l, {
|
|
4960
4969
|
value: Re
|
|
4961
4970
|
}),
|
|
4962
|
-
group:
|
|
4971
|
+
group: z({}, l, {
|
|
4963
4972
|
value: Je
|
|
4964
4973
|
}),
|
|
4965
|
-
groupCollapsed:
|
|
4974
|
+
groupCollapsed: z({}, l, {
|
|
4966
4975
|
value: le
|
|
4967
4976
|
}),
|
|
4968
|
-
groupEnd:
|
|
4977
|
+
groupEnd: z({}, l, {
|
|
4969
4978
|
value: X
|
|
4970
4979
|
})
|
|
4971
4980
|
});
|
|
@@ -5040,17 +5049,17 @@ function kc() {
|
|
|
5040
5049
|
}
|
|
5041
5050
|
} catch (He) {
|
|
5042
5051
|
if (He && k && typeof He.stack == "string") {
|
|
5043
|
-
for (var
|
|
5052
|
+
for (var U = He.stack.split(`
|
|
5044
5053
|
`), ve = k.stack.split(`
|
|
5045
|
-
`), se =
|
|
5054
|
+
`), se = U.length - 1, ie = ve.length - 1; se >= 1 && ie >= 0 && U[se] !== ve[ie]; )
|
|
5046
5055
|
ie--;
|
|
5047
5056
|
for (; se >= 1 && ie >= 0; se--, ie--)
|
|
5048
|
-
if (
|
|
5057
|
+
if (U[se] !== ve[ie]) {
|
|
5049
5058
|
if (se !== 1 || ie !== 1)
|
|
5050
5059
|
do
|
|
5051
|
-
if (se--, ie--, ie < 0 ||
|
|
5060
|
+
if (se--, ie--, ie < 0 || U[se] !== ve[ie]) {
|
|
5052
5061
|
var Te = `
|
|
5053
|
-
` +
|
|
5062
|
+
` + U[se].replace(" at new ", " at ");
|
|
5054
5063
|
return l.displayName && Te.includes("<anonymous>") && (Te = Te.replace("<anonymous>", l.displayName)), typeof l == "function" && pe.set(l, Te), Te;
|
|
5055
5064
|
}
|
|
5056
5065
|
while (se >= 1 && ie >= 0);
|
|
@@ -5060,8 +5069,8 @@ function kc() {
|
|
|
5060
5069
|
} finally {
|
|
5061
5070
|
tt = !1, Ce.current = G, Se(), Error.prepareStackTrace = $;
|
|
5062
5071
|
}
|
|
5063
|
-
var dt = l ? l.displayName || l.name : "",
|
|
5064
|
-
return typeof l == "function" && pe.set(l,
|
|
5072
|
+
var dt = l ? l.displayName || l.name : "", _r = dt ? Ke(dt) : "";
|
|
5073
|
+
return typeof l == "function" && pe.set(l, _r), _r;
|
|
5065
5074
|
}
|
|
5066
5075
|
function O(l, w, _) {
|
|
5067
5076
|
return T(l, !1);
|
|
@@ -5089,7 +5098,7 @@ function kc() {
|
|
|
5089
5098
|
return O(l.render);
|
|
5090
5099
|
case h:
|
|
5091
5100
|
return L(l.type, w, _);
|
|
5092
|
-
case
|
|
5101
|
+
case g: {
|
|
5093
5102
|
var k = l, $ = k._payload, G = k._init;
|
|
5094
5103
|
try {
|
|
5095
5104
|
return L(G($), w, _);
|
|
@@ -5100,7 +5109,7 @@ function kc() {
|
|
|
5100
5109
|
return "";
|
|
5101
5110
|
}
|
|
5102
5111
|
var Q = Object.prototype.hasOwnProperty, me = {}, F = m.ReactDebugCurrentFrame;
|
|
5103
|
-
function
|
|
5112
|
+
function I(l) {
|
|
5104
5113
|
if (l) {
|
|
5105
5114
|
var w = l._owner, _ = L(l.type, l._source, w ? w.type : null);
|
|
5106
5115
|
F.setExtraStackFrame(_);
|
|
@@ -5112,17 +5121,17 @@ function kc() {
|
|
|
5112
5121
|
var G = Function.call.bind(Q);
|
|
5113
5122
|
for (var j in l)
|
|
5114
5123
|
if (G(l, j)) {
|
|
5115
|
-
var
|
|
5124
|
+
var U = void 0;
|
|
5116
5125
|
try {
|
|
5117
5126
|
if (typeof l[j] != "function") {
|
|
5118
5127
|
var ve = Error((k || "React class") + ": " + _ + " type `" + j + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof l[j] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
5119
5128
|
throw ve.name = "Invariant Violation", ve;
|
|
5120
5129
|
}
|
|
5121
|
-
|
|
5130
|
+
U = l[j](w, j, k, _, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
5122
5131
|
} catch (se) {
|
|
5123
|
-
|
|
5132
|
+
U = se;
|
|
5124
5133
|
}
|
|
5125
|
-
|
|
5134
|
+
U && !(U instanceof Error) && (I($), A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", k || "React class", _, j, typeof U), I(null)), U instanceof Error && !(U.message in me) && (me[U.message] = !0, I($), A("Failed %s type: %s", _, U.message), I(null));
|
|
5126
5135
|
}
|
|
5127
5136
|
}
|
|
5128
5137
|
}
|
|
@@ -5155,9 +5164,9 @@ function kc() {
|
|
|
5155
5164
|
ref: !0,
|
|
5156
5165
|
__self: !0,
|
|
5157
5166
|
__source: !0
|
|
5158
|
-
},
|
|
5159
|
-
|
|
5160
|
-
function
|
|
5167
|
+
}, dr, pr, pn;
|
|
5168
|
+
pn = {};
|
|
5169
|
+
function ii(l) {
|
|
5161
5170
|
if (Q.call(l, "ref")) {
|
|
5162
5171
|
var w = Object.getOwnPropertyDescriptor(l, "ref").get;
|
|
5163
5172
|
if (w && w.isReactWarning)
|
|
@@ -5165,7 +5174,7 @@ function kc() {
|
|
|
5165
5174
|
}
|
|
5166
5175
|
return l.ref !== void 0;
|
|
5167
5176
|
}
|
|
5168
|
-
function
|
|
5177
|
+
function oi(l) {
|
|
5169
5178
|
if (Q.call(l, "key")) {
|
|
5170
5179
|
var w = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
5171
5180
|
if (w && w.isReactWarning)
|
|
@@ -5173,16 +5182,16 @@ function kc() {
|
|
|
5173
5182
|
}
|
|
5174
5183
|
return l.key !== void 0;
|
|
5175
5184
|
}
|
|
5176
|
-
function
|
|
5185
|
+
function ai(l, w) {
|
|
5177
5186
|
if (typeof l.ref == "string" && $e.current && w && $e.current.stateNode !== w) {
|
|
5178
5187
|
var _ = J($e.current.type);
|
|
5179
|
-
|
|
5188
|
+
pn[_] || (A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', J($e.current.type), l.ref), pn[_] = !0);
|
|
5180
5189
|
}
|
|
5181
5190
|
}
|
|
5182
|
-
function
|
|
5191
|
+
function ci(l, w) {
|
|
5183
5192
|
{
|
|
5184
5193
|
var _ = function() {
|
|
5185
|
-
|
|
5194
|
+
dr || (dr = !0, A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", w));
|
|
5186
5195
|
};
|
|
5187
5196
|
_.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
5188
5197
|
get: _,
|
|
@@ -5190,10 +5199,10 @@ function kc() {
|
|
|
5190
5199
|
});
|
|
5191
5200
|
}
|
|
5192
5201
|
}
|
|
5193
|
-
function
|
|
5202
|
+
function ui(l, w) {
|
|
5194
5203
|
{
|
|
5195
5204
|
var _ = function() {
|
|
5196
|
-
|
|
5205
|
+
pr || (pr = !0, A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", w));
|
|
5197
5206
|
};
|
|
5198
5207
|
_.isReactWarning = !0, Object.defineProperty(l, "ref", {
|
|
5199
5208
|
get: _,
|
|
@@ -5201,8 +5210,8 @@ function kc() {
|
|
|
5201
5210
|
});
|
|
5202
5211
|
}
|
|
5203
5212
|
}
|
|
5204
|
-
var
|
|
5205
|
-
var
|
|
5213
|
+
var li = function(l, w, _, k, $, G, j) {
|
|
5214
|
+
var U = {
|
|
5206
5215
|
$$typeof: e,
|
|
5207
5216
|
type: l,
|
|
5208
5217
|
key: w,
|
|
@@ -5210,27 +5219,27 @@ function kc() {
|
|
|
5210
5219
|
props: j,
|
|
5211
5220
|
_owner: G
|
|
5212
5221
|
};
|
|
5213
|
-
return
|
|
5222
|
+
return U._store = {}, Object.defineProperty(U._store, "validated", {
|
|
5214
5223
|
configurable: !1,
|
|
5215
5224
|
enumerable: !1,
|
|
5216
5225
|
writable: !0,
|
|
5217
5226
|
value: !1
|
|
5218
|
-
}), Object.defineProperty(
|
|
5227
|
+
}), Object.defineProperty(U, "_self", {
|
|
5219
5228
|
configurable: !1,
|
|
5220
5229
|
enumerable: !1,
|
|
5221
5230
|
writable: !1,
|
|
5222
5231
|
value: k
|
|
5223
|
-
}), Object.defineProperty(
|
|
5232
|
+
}), Object.defineProperty(U, "_source", {
|
|
5224
5233
|
configurable: !1,
|
|
5225
5234
|
enumerable: !1,
|
|
5226
5235
|
writable: !1,
|
|
5227
5236
|
value: $
|
|
5228
|
-
}), Object.freeze && (Object.freeze(
|
|
5237
|
+
}), Object.freeze && (Object.freeze(U.props), Object.freeze(U)), U;
|
|
5229
5238
|
};
|
|
5230
|
-
function
|
|
5239
|
+
function fi(l, w, _, k, $) {
|
|
5231
5240
|
{
|
|
5232
|
-
var G, j = {},
|
|
5233
|
-
_ !== void 0 && (Fe(_),
|
|
5241
|
+
var G, j = {}, U = null, ve = null;
|
|
5242
|
+
_ !== void 0 && (Fe(_), U = "" + _), oi(w) && (Fe(w.key), U = "" + w.key), ii(w) && (ve = w.ref, ai(w, $));
|
|
5234
5243
|
for (G in w)
|
|
5235
5244
|
Q.call(w, G) && !We.hasOwnProperty(G) && (j[G] = w[G]);
|
|
5236
5245
|
if (l && l.defaultProps) {
|
|
@@ -5238,30 +5247,30 @@ function kc() {
|
|
|
5238
5247
|
for (G in se)
|
|
5239
5248
|
j[G] === void 0 && (j[G] = se[G]);
|
|
5240
5249
|
}
|
|
5241
|
-
if (
|
|
5250
|
+
if (U || ve) {
|
|
5242
5251
|
var ie = typeof l == "function" ? l.displayName || l.name || "Unknown" : l;
|
|
5243
|
-
|
|
5252
|
+
U && ci(j, ie), ve && ui(j, ie);
|
|
5244
5253
|
}
|
|
5245
|
-
return
|
|
5254
|
+
return li(l, U, ve, $, k, $e.current, j);
|
|
5246
5255
|
}
|
|
5247
5256
|
}
|
|
5248
|
-
var
|
|
5257
|
+
var mn = m.ReactCurrentOwner, mr = m.ReactDebugCurrentFrame;
|
|
5249
5258
|
function ht(l) {
|
|
5250
5259
|
if (l) {
|
|
5251
5260
|
var w = l._owner, _ = L(l.type, l._source, w ? w.type : null);
|
|
5252
|
-
|
|
5261
|
+
mr.setExtraStackFrame(_);
|
|
5253
5262
|
} else
|
|
5254
|
-
|
|
5263
|
+
mr.setExtraStackFrame(null);
|
|
5255
5264
|
}
|
|
5256
|
-
var
|
|
5257
|
-
|
|
5258
|
-
function
|
|
5265
|
+
var yn;
|
|
5266
|
+
yn = !1;
|
|
5267
|
+
function gn(l) {
|
|
5259
5268
|
return typeof l == "object" && l !== null && l.$$typeof === e;
|
|
5260
5269
|
}
|
|
5261
|
-
function
|
|
5270
|
+
function yr() {
|
|
5262
5271
|
{
|
|
5263
|
-
if (
|
|
5264
|
-
var l = J(
|
|
5272
|
+
if (mn.current) {
|
|
5273
|
+
var l = J(mn.current.type);
|
|
5265
5274
|
if (l)
|
|
5266
5275
|
return `
|
|
5267
5276
|
|
|
@@ -5270,7 +5279,7 @@ Check the render method of \`` + l + "`.";
|
|
|
5270
5279
|
return "";
|
|
5271
5280
|
}
|
|
5272
5281
|
}
|
|
5273
|
-
function
|
|
5282
|
+
function hi(l) {
|
|
5274
5283
|
{
|
|
5275
5284
|
if (l !== void 0) {
|
|
5276
5285
|
var w = l.fileName.replace(/^.*[\\\/]/, ""), _ = l.lineNumber;
|
|
@@ -5281,10 +5290,10 @@ Check your code at ` + w + ":" + _ + ".";
|
|
|
5281
5290
|
return "";
|
|
5282
5291
|
}
|
|
5283
5292
|
}
|
|
5284
|
-
var
|
|
5285
|
-
function
|
|
5293
|
+
var gr = {};
|
|
5294
|
+
function di(l) {
|
|
5286
5295
|
{
|
|
5287
|
-
var w =
|
|
5296
|
+
var w = yr();
|
|
5288
5297
|
if (!w) {
|
|
5289
5298
|
var _ = typeof l == "string" ? l : l.displayName || l.name;
|
|
5290
5299
|
_ && (w = `
|
|
@@ -5294,39 +5303,39 @@ Check the top-level render call using <` + _ + ">.");
|
|
|
5294
5303
|
return w;
|
|
5295
5304
|
}
|
|
5296
5305
|
}
|
|
5297
|
-
function
|
|
5306
|
+
function vr(l, w) {
|
|
5298
5307
|
{
|
|
5299
5308
|
if (!l._store || l._store.validated || l.key != null)
|
|
5300
5309
|
return;
|
|
5301
5310
|
l._store.validated = !0;
|
|
5302
|
-
var _ =
|
|
5303
|
-
if (
|
|
5311
|
+
var _ = di(w);
|
|
5312
|
+
if (gr[_])
|
|
5304
5313
|
return;
|
|
5305
|
-
|
|
5314
|
+
gr[_] = !0;
|
|
5306
5315
|
var k = "";
|
|
5307
|
-
l && l._owner && l._owner !==
|
|
5316
|
+
l && l._owner && l._owner !== mn.current && (k = " It was passed a child from " + J(l._owner.type) + "."), ht(l), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', _, k), ht(null);
|
|
5308
5317
|
}
|
|
5309
5318
|
}
|
|
5310
|
-
function
|
|
5319
|
+
function wr(l, w) {
|
|
5311
5320
|
{
|
|
5312
5321
|
if (typeof l != "object")
|
|
5313
5322
|
return;
|
|
5314
5323
|
if (Me(l))
|
|
5315
5324
|
for (var _ = 0; _ < l.length; _++) {
|
|
5316
5325
|
var k = l[_];
|
|
5317
|
-
|
|
5326
|
+
gn(k) && vr(k, w);
|
|
5318
5327
|
}
|
|
5319
|
-
else if (
|
|
5328
|
+
else if (gn(l))
|
|
5320
5329
|
l._store && (l._store.validated = !0);
|
|
5321
5330
|
else if (l) {
|
|
5322
5331
|
var $ = b(l);
|
|
5323
5332
|
if (typeof $ == "function" && $ !== l.entries)
|
|
5324
5333
|
for (var G = $.call(l), j; !(j = G.next()).done; )
|
|
5325
|
-
|
|
5334
|
+
gn(j.value) && vr(j.value, w);
|
|
5326
5335
|
}
|
|
5327
5336
|
}
|
|
5328
5337
|
}
|
|
5329
|
-
function
|
|
5338
|
+
function pi(l) {
|
|
5330
5339
|
{
|
|
5331
5340
|
var w = l.type;
|
|
5332
5341
|
if (w == null || typeof w == "string")
|
|
@@ -5341,15 +5350,15 @@ Check the top-level render call using <` + _ + ">.");
|
|
|
5341
5350
|
if (_) {
|
|
5342
5351
|
var k = J(w);
|
|
5343
5352
|
re(_, l.props, "prop", k, l);
|
|
5344
|
-
} else if (w.PropTypes !== void 0 && !
|
|
5345
|
-
|
|
5353
|
+
} else if (w.PropTypes !== void 0 && !yn) {
|
|
5354
|
+
yn = !0;
|
|
5346
5355
|
var $ = J(w);
|
|
5347
5356
|
A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", $ || "Unknown");
|
|
5348
5357
|
}
|
|
5349
5358
|
typeof w.getDefaultProps == "function" && !w.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
5350
5359
|
}
|
|
5351
5360
|
}
|
|
5352
|
-
function
|
|
5361
|
+
function mi(l) {
|
|
5353
5362
|
{
|
|
5354
5363
|
for (var w = Object.keys(l.props), _ = 0; _ < w.length; _++) {
|
|
5355
5364
|
var k = w[_];
|
|
@@ -5361,18 +5370,18 @@ Check the top-level render call using <` + _ + ">.");
|
|
|
5361
5370
|
l.ref !== null && (ht(l), A("Invalid attribute `ref` supplied to `React.Fragment`."), ht(null));
|
|
5362
5371
|
}
|
|
5363
5372
|
}
|
|
5364
|
-
function
|
|
5373
|
+
function br(l, w, _, k, $, G) {
|
|
5365
5374
|
{
|
|
5366
5375
|
var j = N(l);
|
|
5367
5376
|
if (!j) {
|
|
5368
|
-
var
|
|
5369
|
-
(l === void 0 || typeof l == "object" && l !== null && Object.keys(l).length === 0) && (
|
|
5370
|
-
var ve =
|
|
5371
|
-
ve ?
|
|
5377
|
+
var U = "";
|
|
5378
|
+
(l === void 0 || typeof l == "object" && l !== null && Object.keys(l).length === 0) && (U += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
5379
|
+
var ve = hi($);
|
|
5380
|
+
ve ? U += ve : U += yr();
|
|
5372
5381
|
var se;
|
|
5373
|
-
l === null ? se = "null" : Me(l) ? se = "array" : l !== void 0 && l.$$typeof === e ? (se = "<" + (J(l.type) || "Unknown") + " />",
|
|
5382
|
+
l === null ? se = "null" : Me(l) ? se = "array" : l !== void 0 && l.$$typeof === e ? (se = "<" + (J(l.type) || "Unknown") + " />", U = " Did you accidentally export a JSX literal instead of a component?") : se = typeof l, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", se, U);
|
|
5374
5383
|
}
|
|
5375
|
-
var ie =
|
|
5384
|
+
var ie = fi(l, w, _, $, G);
|
|
5376
5385
|
if (ie == null)
|
|
5377
5386
|
return ie;
|
|
5378
5387
|
if (j) {
|
|
@@ -5381,70 +5390,71 @@ Check the top-level render call using <` + _ + ">.");
|
|
|
5381
5390
|
if (k)
|
|
5382
5391
|
if (Me(Te)) {
|
|
5383
5392
|
for (var dt = 0; dt < Te.length; dt++)
|
|
5384
|
-
|
|
5393
|
+
wr(Te[dt], l);
|
|
5385
5394
|
Object.freeze && Object.freeze(Te);
|
|
5386
5395
|
} else
|
|
5387
5396
|
A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
5388
5397
|
else
|
|
5389
|
-
|
|
5398
|
+
wr(Te, l);
|
|
5390
5399
|
}
|
|
5391
|
-
return l === r ?
|
|
5400
|
+
return l === r ? mi(ie) : pi(ie), ie;
|
|
5392
5401
|
}
|
|
5393
5402
|
}
|
|
5394
|
-
function mi(l, w, _) {
|
|
5395
|
-
return wr(l, w, _, !0);
|
|
5396
|
-
}
|
|
5397
5403
|
function yi(l, w, _) {
|
|
5398
|
-
return
|
|
5404
|
+
return br(l, w, _, !0);
|
|
5405
|
+
}
|
|
5406
|
+
function gi(l, w, _) {
|
|
5407
|
+
return br(l, w, _, !1);
|
|
5399
5408
|
}
|
|
5400
|
-
var
|
|
5401
|
-
Rt.Fragment = r, Rt.jsx =
|
|
5409
|
+
var vi = gi, wi = yi;
|
|
5410
|
+
Rt.Fragment = r, Rt.jsx = vi, Rt.jsxs = wi;
|
|
5402
5411
|
}()), Rt;
|
|
5403
5412
|
}
|
|
5404
5413
|
(function(n) {
|
|
5405
|
-
process.env.NODE_ENV === "production" ? n.exports =
|
|
5406
|
-
})(
|
|
5407
|
-
const
|
|
5414
|
+
process.env.NODE_ENV === "production" ? n.exports = kc() : n.exports = Nc();
|
|
5415
|
+
})(ni);
|
|
5416
|
+
const ns = ni.exports.jsx, ye = rs(null), Vc = ({
|
|
5408
5417
|
url: n = "",
|
|
5409
5418
|
tokenParams: e,
|
|
5410
5419
|
socketPort: t,
|
|
5411
5420
|
swrConfig: r,
|
|
5412
5421
|
siteName: s,
|
|
5413
5422
|
enableSocket: i = !0,
|
|
5414
|
-
children: o
|
|
5423
|
+
children: o,
|
|
5424
|
+
customHeaders: c
|
|
5415
5425
|
}) => {
|
|
5416
|
-
const
|
|
5417
|
-
const
|
|
5426
|
+
const u = Ot(() => {
|
|
5427
|
+
const a = new da.FrappeApp(n, e, void 0, c);
|
|
5418
5428
|
return {
|
|
5419
5429
|
url: n,
|
|
5420
5430
|
tokenParams: e,
|
|
5421
|
-
app:
|
|
5422
|
-
auth:
|
|
5423
|
-
db:
|
|
5424
|
-
call:
|
|
5425
|
-
file:
|
|
5426
|
-
socket: i ? new
|
|
5431
|
+
app: a,
|
|
5432
|
+
auth: a.auth(),
|
|
5433
|
+
db: a.db(),
|
|
5434
|
+
call: a.call(),
|
|
5435
|
+
file: a.file(),
|
|
5436
|
+
socket: i ? new Lc(n, s, t, e).socket : void 0,
|
|
5427
5437
|
enableSocket: i,
|
|
5428
5438
|
socketPort: t
|
|
5429
5439
|
};
|
|
5430
|
-
}, [n, e, t, i]);
|
|
5431
|
-
return /* @__PURE__ */
|
|
5432
|
-
value:
|
|
5433
|
-
children: /* @__PURE__ */
|
|
5440
|
+
}, [n, e, t, i, c]);
|
|
5441
|
+
return /* @__PURE__ */ ns(ye.Provider, {
|
|
5442
|
+
value: u,
|
|
5443
|
+
children: /* @__PURE__ */ ns(Ia, {
|
|
5434
5444
|
value: r,
|
|
5435
5445
|
children: o
|
|
5436
5446
|
})
|
|
5437
5447
|
});
|
|
5438
|
-
},
|
|
5448
|
+
}, jc = (n) => {
|
|
5439
5449
|
const {
|
|
5440
5450
|
url: e,
|
|
5441
5451
|
auth: t,
|
|
5442
5452
|
tokenParams: r
|
|
5443
5453
|
} = he(ye), [s, i] = K(), o = W(() => {
|
|
5444
|
-
const y = document.cookie.split(";").find((
|
|
5454
|
+
const y = document.cookie.split(";").find((v) => v.trim().startsWith("user_id="));
|
|
5445
5455
|
if (y) {
|
|
5446
|
-
const
|
|
5447
|
-
i(
|
|
5456
|
+
const v = y.split("=")[1];
|
|
5457
|
+
i(v && v !== "Guest" ? v : null);
|
|
5448
5458
|
} else
|
|
5449
5459
|
i(null);
|
|
5450
5460
|
}, []);
|
|
@@ -5464,29 +5474,29 @@ const ts = ti.exports.jsx, ye = ns(null), qc = ({
|
|
|
5464
5474
|
shouldRetryOnError: !1,
|
|
5465
5475
|
revalidateOnFocus: !1,
|
|
5466
5476
|
...n
|
|
5467
|
-
}),
|
|
5477
|
+
}), g = W(async (y) => t.loginWithUsernamePassword(y).then((v) => (o(), v)), []), p = W(async () => t.logout().then(() => h(null)).then(() => i(null)), []);
|
|
5468
5478
|
return {
|
|
5469
5479
|
isLoading: s === void 0 || a,
|
|
5470
5480
|
currentUser: c,
|
|
5471
5481
|
isValidating: f,
|
|
5472
5482
|
error: u,
|
|
5473
|
-
login:
|
|
5483
|
+
login: g,
|
|
5474
5484
|
logout: p,
|
|
5475
5485
|
updateCurrentUser: h,
|
|
5476
5486
|
getUserCookie: o
|
|
5477
5487
|
};
|
|
5478
|
-
},
|
|
5488
|
+
}, ri = (n, e, t) => {
|
|
5479
5489
|
let r = `${e}/api/resource/`;
|
|
5480
5490
|
return t ? r += `${n}/${t}` : r += `${n}`, r;
|
|
5481
|
-
},
|
|
5491
|
+
}, Mc = (n, e, t, r) => {
|
|
5482
5492
|
const {
|
|
5483
5493
|
url: s,
|
|
5484
5494
|
db: i
|
|
5485
5495
|
} = he(ye);
|
|
5486
5496
|
return {
|
|
5487
|
-
...Nt(t === void 0 ?
|
|
5497
|
+
...Nt(t === void 0 ? ri(n, s, e) : t, () => i.getDoc(n, e), r)
|
|
5488
5498
|
};
|
|
5489
|
-
},
|
|
5499
|
+
}, Pc = (n) => {
|
|
5490
5500
|
var t, r, s;
|
|
5491
5501
|
let e = "";
|
|
5492
5502
|
if (n != null && n.fields && (e += "fields=" + JSON.stringify(n == null ? void 0 : n.fields) + "&"), n != null && n.filters && (e += "filters=" + JSON.stringify(n == null ? void 0 : n.filters) + "&"), n != null && n.orFilters && (e += "or_filters=" + JSON.stringify(n == null ? void 0 : n.orFilters) + "&"), n != null && n.limit_start && (e += "limit_start=" + JSON.stringify(n == null ? void 0 : n.limit_start) + "&"), n != null && n.limit && (e += "limit=" + JSON.stringify(n == null ? void 0 : n.limit) + "&"), n != null && n.groupBy && (e += "group_by=" + String(n.groupBy) + "&"), n != null && n.orderBy) {
|
|
@@ -5494,15 +5504,15 @@ const ts = ti.exports.jsx, ye = ns(null), qc = ({
|
|
|
5494
5504
|
e += "order_by=" + i + "&";
|
|
5495
5505
|
}
|
|
5496
5506
|
return n != null && n.asDict && (e += "as_dict=" + n.asDict), e;
|
|
5497
|
-
},
|
|
5507
|
+
}, $c = (n, e, t, r) => {
|
|
5498
5508
|
const {
|
|
5499
5509
|
url: s,
|
|
5500
5510
|
db: i
|
|
5501
5511
|
} = he(ye);
|
|
5502
5512
|
return {
|
|
5503
|
-
...Nt(t === void 0 ? `${
|
|
5513
|
+
...Nt(t === void 0 ? `${ri(n, s)}?${Pc(e)}` : t, () => i.getDocList(n, e), r)
|
|
5504
5514
|
};
|
|
5505
|
-
},
|
|
5515
|
+
}, Wc = () => {
|
|
5506
5516
|
const {
|
|
5507
5517
|
db: n
|
|
5508
5518
|
} = he(ye), [e, t] = K(!1), [r, s] = K(null), [i, o] = K(!1), c = W(() => {
|
|
@@ -5517,22 +5527,22 @@ const ts = ti.exports.jsx, ye = ns(null), qc = ({
|
|
|
5517
5527
|
isCompleted: i,
|
|
5518
5528
|
reset: c
|
|
5519
5529
|
};
|
|
5520
|
-
},
|
|
5530
|
+
}, Hc = () => {
|
|
5521
5531
|
const {
|
|
5522
5532
|
db: n
|
|
5523
5533
|
} = he(ye), [e, t] = K(!1), [r, s] = K(null), [i, o] = K(!1), c = W(() => {
|
|
5524
5534
|
t(!1), s(null), o(!1);
|
|
5525
5535
|
}, []);
|
|
5526
5536
|
return {
|
|
5527
|
-
updateDoc: W(async (a, f, h) => (s(null), o(!1), t(!0), n.updateDoc(a, f, h).then((
|
|
5528
|
-
throw t(!1), o(!1), s(
|
|
5537
|
+
updateDoc: W(async (a, f, h) => (s(null), o(!1), t(!0), n.updateDoc(a, f, h).then((g) => (t(!1), o(!0), g)).catch((g) => {
|
|
5538
|
+
throw t(!1), o(!1), s(g), g;
|
|
5529
5539
|
})), []),
|
|
5530
5540
|
loading: e,
|
|
5531
5541
|
error: r,
|
|
5532
5542
|
reset: c,
|
|
5533
5543
|
isCompleted: i
|
|
5534
5544
|
};
|
|
5535
|
-
},
|
|
5545
|
+
}, zc = () => {
|
|
5536
5546
|
const {
|
|
5537
5547
|
db: n
|
|
5538
5548
|
} = he(ye), [e, t] = K(!1), [r, s] = K(null), [i, o] = K(!1), c = W(() => {
|
|
@@ -5548,20 +5558,20 @@ const ts = ti.exports.jsx, ye = ns(null), qc = ({
|
|
|
5548
5558
|
isCompleted: i
|
|
5549
5559
|
};
|
|
5550
5560
|
};
|
|
5551
|
-
function
|
|
5561
|
+
function si(n) {
|
|
5552
5562
|
const e = [];
|
|
5553
5563
|
for (let t in n)
|
|
5554
5564
|
e.push(encodeURIComponent(t) + "=" + encodeURIComponent(n[t]));
|
|
5555
5565
|
return e.join("&");
|
|
5556
5566
|
}
|
|
5557
|
-
const
|
|
5567
|
+
const Jc = (n, e, t = !1, r = !1, s, i) => {
|
|
5558
5568
|
const {
|
|
5559
5569
|
url: o,
|
|
5560
5570
|
db: c
|
|
5561
5571
|
} = he(ye);
|
|
5562
5572
|
return {
|
|
5563
5573
|
...Nt(s === void 0 ? (() => {
|
|
5564
|
-
const f =
|
|
5574
|
+
const f = si(t ? {
|
|
5565
5575
|
doctype: n,
|
|
5566
5576
|
filters: e != null ? e : [],
|
|
5567
5577
|
cache: t,
|
|
@@ -5574,21 +5584,21 @@ const zc = (n, e, t = !1, r = !1, s, i) => {
|
|
|
5574
5584
|
return `${o}/api/method/frappe.client.get_count?${f}`;
|
|
5575
5585
|
})() : s, () => c.getCount(n, e, t, r), i)
|
|
5576
5586
|
};
|
|
5577
|
-
},
|
|
5587
|
+
}, Fc = (n, e, t, r) => {
|
|
5578
5588
|
const {
|
|
5579
5589
|
call: s
|
|
5580
|
-
} = he(ye), i =
|
|
5590
|
+
} = he(ye), i = si(e != null ? e : {}), o = `${n}?${i}`;
|
|
5581
5591
|
return {
|
|
5582
5592
|
...Nt(t === void 0 ? o : t, () => s.get(n, e), r)
|
|
5583
5593
|
};
|
|
5584
|
-
},
|
|
5594
|
+
}, Kc = (n) => {
|
|
5585
5595
|
const {
|
|
5586
5596
|
call: e
|
|
5587
5597
|
} = he(ye), [t, r] = K(null), [s, i] = K(!1), [o, c] = K(null), [u, a] = K(!1), f = W(() => {
|
|
5588
5598
|
r(null), i(!1), c(null), a(!1);
|
|
5589
5599
|
}, []);
|
|
5590
5600
|
return {
|
|
5591
|
-
call: W(async (
|
|
5601
|
+
call: W(async (g) => (c(null), a(!1), i(!0), r(null), e.post(n, g).then((p) => (r(p), i(!1), a(!0), p)).catch((p) => {
|
|
5592
5602
|
throw i(!1), a(!1), c(p), p;
|
|
5593
5603
|
})), []),
|
|
5594
5604
|
result: t,
|
|
@@ -5597,14 +5607,14 @@ const zc = (n, e, t = !1, r = !1, s, i) => {
|
|
|
5597
5607
|
reset: f,
|
|
5598
5608
|
isCompleted: u
|
|
5599
5609
|
};
|
|
5600
|
-
},
|
|
5610
|
+
}, Yc = (n) => {
|
|
5601
5611
|
const {
|
|
5602
5612
|
call: e
|
|
5603
5613
|
} = he(ye), [t, r] = K(null), [s, i] = K(!1), [o, c] = K(null), [u, a] = K(!1), f = W(() => {
|
|
5604
5614
|
r(null), i(!1), c(null), a(!1);
|
|
5605
5615
|
}, []);
|
|
5606
5616
|
return {
|
|
5607
|
-
call: W(async (
|
|
5617
|
+
call: W(async (g) => (c(null), a(!1), i(!0), r(null), e.put(n, g).then((p) => (r(p), i(!1), a(!0), p)).catch((p) => {
|
|
5608
5618
|
throw i(!1), a(!1), c(p), p;
|
|
5609
5619
|
})), []),
|
|
5610
5620
|
result: t,
|
|
@@ -5613,14 +5623,14 @@ const zc = (n, e, t = !1, r = !1, s, i) => {
|
|
|
5613
5623
|
reset: f,
|
|
5614
5624
|
isCompleted: u
|
|
5615
5625
|
};
|
|
5616
|
-
},
|
|
5626
|
+
}, Gc = (n) => {
|
|
5617
5627
|
const {
|
|
5618
5628
|
call: e
|
|
5619
5629
|
} = he(ye), [t, r] = K(null), [s, i] = K(!1), [o, c] = K(null), [u, a] = K(!1), f = W(() => {
|
|
5620
5630
|
r(null), i(!1), c(null), a(!1);
|
|
5621
5631
|
}, []);
|
|
5622
5632
|
return {
|
|
5623
|
-
call: W(async (
|
|
5633
|
+
call: W(async (g) => (c(null), a(!1), i(!0), r(null), e.delete(n, g).then((p) => (r(p), i(!1), a(!0), p)).catch((p) => {
|
|
5624
5634
|
throw i(!1), a(!1), c(p), p;
|
|
5625
5635
|
})), []),
|
|
5626
5636
|
result: t,
|
|
@@ -5629,11 +5639,11 @@ const zc = (n, e, t = !1, r = !1, s, i) => {
|
|
|
5629
5639
|
reset: f,
|
|
5630
5640
|
isCompleted: u
|
|
5631
5641
|
};
|
|
5632
|
-
},
|
|
5642
|
+
}, Xc = () => {
|
|
5633
5643
|
const {
|
|
5634
5644
|
file: n
|
|
5635
|
-
} = he(ye), [e, t] = K(0), [r, s] = K(!1), [i, o] = K(null), [c, u] = K(!1), a = W(async (h,
|
|
5636
|
-
|
|
5645
|
+
} = he(ye), [e, t] = K(0), [r, s] = K(!1), [i, o] = K(null), [c, u] = K(!1), a = W(async (h, g, p) => (f(), s(!0), n.uploadFile(h, g, (y, v) => {
|
|
5646
|
+
v && t(Math.round(y / v * 100));
|
|
5637
5647
|
}, p).then((y) => (u(!0), t(100), s(!1), y.data.message)).catch((y) => {
|
|
5638
5648
|
throw console.error(y), o(y), s(!1), y;
|
|
5639
5649
|
})), []), f = W(() => {
|
|
@@ -5647,15 +5657,15 @@ const zc = (n, e, t = !1, r = !1, s, i) => {
|
|
|
5647
5657
|
error: i,
|
|
5648
5658
|
reset: f
|
|
5649
5659
|
};
|
|
5650
|
-
},
|
|
5651
|
-
const i =
|
|
5652
|
-
return
|
|
5660
|
+
}, Qc = (n, e, t = [], r = 20, s = 250) => {
|
|
5661
|
+
const i = Bc(e, s);
|
|
5662
|
+
return Fc("frappe.desk.search.search_link", {
|
|
5653
5663
|
doctype: n,
|
|
5654
5664
|
page_length: r,
|
|
5655
5665
|
txt: i,
|
|
5656
5666
|
filters: JSON.stringify(t != null ? t : [])
|
|
5657
5667
|
});
|
|
5658
|
-
},
|
|
5668
|
+
}, Bc = (n, e) => {
|
|
5659
5669
|
const [t, r] = K(n);
|
|
5660
5670
|
return mt(() => {
|
|
5661
5671
|
const s = setTimeout(() => {
|
|
@@ -5665,7 +5675,7 @@ const zc = (n, e, t = !1, r = !1, s, i) => {
|
|
|
5665
5675
|
clearTimeout(s);
|
|
5666
5676
|
};
|
|
5667
5677
|
}, [n, e]), t;
|
|
5668
|
-
},
|
|
5678
|
+
}, Gn = (n, e) => {
|
|
5669
5679
|
const {
|
|
5670
5680
|
socket: t
|
|
5671
5681
|
} = he(ye);
|
|
@@ -5676,7 +5686,7 @@ const zc = (n, e, t = !1, r = !1, s, i) => {
|
|
|
5676
5686
|
r == null || r.off(n);
|
|
5677
5687
|
};
|
|
5678
5688
|
}, [n, e]);
|
|
5679
|
-
},
|
|
5689
|
+
}, Zc = (n, e, t, r = !0) => {
|
|
5680
5690
|
const {
|
|
5681
5691
|
socket: s
|
|
5682
5692
|
} = he(ye), [i, o] = K([]);
|
|
@@ -5684,7 +5694,7 @@ const zc = (n, e, t = !1, r = !1, s, i) => {
|
|
|
5684
5694
|
s == null || s.emit("doc_subscribe", n, e);
|
|
5685
5695
|
}), r && (s == null || s.emit("doc_open", n, e)), () => {
|
|
5686
5696
|
s == null || s.emit("doc_unsubscribe", n, e), r && (s == null || s.emit("doc_close", n, e));
|
|
5687
|
-
}), [n, e, r]),
|
|
5697
|
+
}), [n, e, r]), Gn("doc_update", t);
|
|
5688
5698
|
const c = W(() => {
|
|
5689
5699
|
s == null || s.emit("doc_open", n, e);
|
|
5690
5700
|
}, [n, e]), u = W(() => {
|
|
@@ -5692,12 +5702,12 @@ const zc = (n, e, t = !1, r = !1, s, i) => {
|
|
|
5692
5702
|
}, [n, e]), a = W((f) => {
|
|
5693
5703
|
f.doctype === n && f.docname === e && o(f.users);
|
|
5694
5704
|
}, [n, e]);
|
|
5695
|
-
return
|
|
5705
|
+
return Gn("doc_viewers", a), {
|
|
5696
5706
|
viewers: i,
|
|
5697
5707
|
emitDocOpen: c,
|
|
5698
5708
|
emitDocClose: u
|
|
5699
5709
|
};
|
|
5700
|
-
},
|
|
5710
|
+
}, eu = (n, e) => {
|
|
5701
5711
|
const {
|
|
5702
5712
|
socket: t
|
|
5703
5713
|
} = he(ye);
|
|
@@ -5705,30 +5715,30 @@ const zc = (n, e, t = !1, r = !1, s, i) => {
|
|
|
5705
5715
|
t == null || t.emit("doctype_subscribe", n);
|
|
5706
5716
|
}), () => {
|
|
5707
5717
|
t == null || t.emit("doctype_unsubscribe", n);
|
|
5708
|
-
}), [n]),
|
|
5718
|
+
}), [n]), Gn("list_update", e);
|
|
5709
5719
|
};
|
|
5710
5720
|
export {
|
|
5711
5721
|
ye as FrappeContext,
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5722
|
+
Vc as FrappeProvider,
|
|
5723
|
+
Pc as getDocListQueryString,
|
|
5724
|
+
ri as getRequestURL,
|
|
5725
|
+
jc as useFrappeAuth,
|
|
5726
|
+
Wc as useFrappeCreateDoc,
|
|
5727
|
+
Gc as useFrappeDeleteCall,
|
|
5728
|
+
zc as useFrappeDeleteDoc,
|
|
5729
|
+
eu as useFrappeDocTypeEventListener,
|
|
5730
|
+
Zc as useFrappeDocumentEventListener,
|
|
5731
|
+
Gn as useFrappeEventListener,
|
|
5732
|
+
Xc as useFrappeFileUpload,
|
|
5733
|
+
Fc as useFrappeGetCall,
|
|
5734
|
+
Mc as useFrappeGetDoc,
|
|
5735
|
+
Jc as useFrappeGetDocCount,
|
|
5736
|
+
$c as useFrappeGetDocList,
|
|
5737
|
+
Kc as useFrappePostCall,
|
|
5738
|
+
Yc as useFrappePutCall,
|
|
5739
|
+
Hc as useFrappeUpdateDoc,
|
|
5730
5740
|
Nt as useSWR,
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5741
|
+
ka as useSWRConfig,
|
|
5742
|
+
qc as useSWRInfinite,
|
|
5743
|
+
Qc as useSearch
|
|
5734
5744
|
};
|