frappe-react-sdk 1.2.2 → 1.2.4
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 +379 -379
- package/dist/frappe-react-sdk.umd.js +9 -9
- package/dist/lib/index.d.ts +7 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Ms = Object.defineProperty;
|
|
2
2
|
var Ws = (n, e, t) => e in n ? Ms(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var Be = (n, e, t) => (Ws(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
-
import qe, { createContext as Ur, useContext as ee, useEffect as Xe, useLayoutEffect as Hs, useRef as Fe, useMemo as qr, useCallback as M, useDebugValue as Ys, useState as
|
|
5
|
-
var
|
|
4
|
+
import qe, { createContext as Ur, useContext as ee, useEffect as Xe, useLayoutEffect as Hs, useRef as Fe, useMemo as qr, useCallback as M, useDebugValue as Ys, useState as P } from "react";
|
|
5
|
+
var B = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Yt = {}, rt = {}, ft = {}, le = B && B.__assign || function() {
|
|
6
6
|
return le = Object.assign || function(n) {
|
|
7
7
|
for (var e, t = 1, r = arguments.length; t < r; t++) {
|
|
8
8
|
e = arguments[t];
|
|
@@ -11,33 +11,33 @@ var P = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : ty
|
|
|
11
11
|
}
|
|
12
12
|
return n;
|
|
13
13
|
}, le.apply(this, arguments);
|
|
14
|
-
}, wt =
|
|
14
|
+
}, wt = B && B.__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);
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
return new (t || (t = Promise))(function(i, o) {
|
|
21
|
-
function c(
|
|
21
|
+
function c(h) {
|
|
22
22
|
try {
|
|
23
|
-
a(r.next(
|
|
23
|
+
a(r.next(h));
|
|
24
24
|
} catch (l) {
|
|
25
25
|
o(l);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
function h
|
|
28
|
+
function f(h) {
|
|
29
29
|
try {
|
|
30
|
-
a(r.throw(
|
|
30
|
+
a(r.throw(h));
|
|
31
31
|
} catch (l) {
|
|
32
32
|
o(l);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
function a(
|
|
36
|
-
|
|
35
|
+
function a(h) {
|
|
36
|
+
h.done ? i(h.value) : s(h.value).then(c, f);
|
|
37
37
|
}
|
|
38
38
|
a((r = r.apply(n, e || [])).next());
|
|
39
39
|
});
|
|
40
|
-
}, Et =
|
|
40
|
+
}, Et = B && B.__generator || function(n, e) {
|
|
41
41
|
var t = { label: 0, sent: function() {
|
|
42
42
|
if (i[0] & 1)
|
|
43
43
|
throw i[1];
|
|
@@ -47,11 +47,11 @@ var P = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : ty
|
|
|
47
47
|
return this;
|
|
48
48
|
}), o;
|
|
49
49
|
function c(a) {
|
|
50
|
-
return function(
|
|
51
|
-
return
|
|
50
|
+
return function(h) {
|
|
51
|
+
return f([a, h]);
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function f(a) {
|
|
55
55
|
if (r)
|
|
56
56
|
throw new TypeError("Generator is already executing.");
|
|
57
57
|
for (; t; )
|
|
@@ -92,8 +92,8 @@ var P = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : ty
|
|
|
92
92
|
continue;
|
|
93
93
|
}
|
|
94
94
|
a = e.call(n, t);
|
|
95
|
-
} catch (
|
|
96
|
-
a = [6,
|
|
95
|
+
} catch (h) {
|
|
96
|
+
a = [6, h], s = 0;
|
|
97
97
|
} finally {
|
|
98
98
|
r = i = 0;
|
|
99
99
|
}
|
|
@@ -155,7 +155,7 @@ var Js = function() {
|
|
|
155
155
|
}, n;
|
|
156
156
|
}();
|
|
157
157
|
ft.FrappeCall = Js;
|
|
158
|
-
var ht = {}, z =
|
|
158
|
+
var ht = {}, z = B && B.__assign || function() {
|
|
159
159
|
return z = Object.assign || function(n) {
|
|
160
160
|
for (var e, t = 1, r = arguments.length; t < r; t++) {
|
|
161
161
|
e = arguments[t];
|
|
@@ -164,33 +164,33 @@ var ht = {}, z = P && P.__assign || function() {
|
|
|
164
164
|
}
|
|
165
165
|
return n;
|
|
166
166
|
}, z.apply(this, arguments);
|
|
167
|
-
}, Ie =
|
|
167
|
+
}, Ie = B && B.__awaiter || function(n, e, t, r) {
|
|
168
168
|
function s(i) {
|
|
169
169
|
return i instanceof t ? i : new t(function(o) {
|
|
170
170
|
o(i);
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
return new (t || (t = Promise))(function(i, o) {
|
|
174
|
-
function c(
|
|
174
|
+
function c(h) {
|
|
175
175
|
try {
|
|
176
|
-
a(r.next(
|
|
176
|
+
a(r.next(h));
|
|
177
177
|
} catch (l) {
|
|
178
178
|
o(l);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
function h
|
|
181
|
+
function f(h) {
|
|
182
182
|
try {
|
|
183
|
-
a(r.throw(
|
|
183
|
+
a(r.throw(h));
|
|
184
184
|
} catch (l) {
|
|
185
185
|
o(l);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
function a(
|
|
189
|
-
|
|
188
|
+
function a(h) {
|
|
189
|
+
h.done ? i(h.value) : s(h.value).then(c, f);
|
|
190
190
|
}
|
|
191
191
|
a((r = r.apply(n, e || [])).next());
|
|
192
192
|
});
|
|
193
|
-
}, Ue =
|
|
193
|
+
}, Ue = B && B.__generator || function(n, e) {
|
|
194
194
|
var t = { label: 0, sent: function() {
|
|
195
195
|
if (i[0] & 1)
|
|
196
196
|
throw i[1];
|
|
@@ -200,11 +200,11 @@ var ht = {}, z = P && P.__assign || function() {
|
|
|
200
200
|
return this;
|
|
201
201
|
}), o;
|
|
202
202
|
function c(a) {
|
|
203
|
-
return function(
|
|
204
|
-
return
|
|
203
|
+
return function(h) {
|
|
204
|
+
return f([a, h]);
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function f(a) {
|
|
208
208
|
if (r)
|
|
209
209
|
throw new TypeError("Generator is already executing.");
|
|
210
210
|
for (; t; )
|
|
@@ -245,8 +245,8 @@ var ht = {}, z = P && P.__assign || function() {
|
|
|
245
245
|
continue;
|
|
246
246
|
}
|
|
247
247
|
a = e.call(n, t);
|
|
248
|
-
} catch (
|
|
249
|
-
a = [6,
|
|
248
|
+
} catch (h) {
|
|
249
|
+
a = [6, h], s = 0;
|
|
250
250
|
} finally {
|
|
251
251
|
r = i = 0;
|
|
252
252
|
}
|
|
@@ -273,24 +273,24 @@ var zs = function() {
|
|
|
273
273
|
});
|
|
274
274
|
});
|
|
275
275
|
}, n.prototype.getDocList = function(e, t) {
|
|
276
|
-
var r
|
|
276
|
+
var r;
|
|
277
277
|
return Ie(this, void 0, void 0, function() {
|
|
278
|
-
var i, o, c,
|
|
279
|
-
return Ue(this, function(
|
|
280
|
-
return
|
|
281
|
-
fields:
|
|
282
|
-
filters:
|
|
283
|
-
or_filters:
|
|
284
|
-
order_by:
|
|
285
|
-
group_by:
|
|
286
|
-
limit:
|
|
287
|
-
limit_start:
|
|
288
|
-
as_dict:
|
|
289
|
-
}), [2, this.axios.get("/api/resource/".concat(e), { params:
|
|
290
|
-
return
|
|
291
|
-
}).catch(function(
|
|
292
|
-
var
|
|
293
|
-
throw z(z({},
|
|
278
|
+
var s, i, o, c, f, a, h, l, p, v, b;
|
|
279
|
+
return Ue(this, function(w) {
|
|
280
|
+
return s = {}, t && (i = t.fields, o = t.filters, c = t.orFilters, f = t.orderBy, a = t.limit, h = t.limit_start, l = t.groupBy, p = t.asDict, v = p === void 0 ? !0 : p, b = f ? "".concat(String(f == null ? void 0 : f.field), " ").concat((r = f == null ? void 0 : f.order) !== null && r !== void 0 ? r : "asc") : "", s = {
|
|
281
|
+
fields: i ? JSON.stringify(i) : void 0,
|
|
282
|
+
filters: o ? JSON.stringify(o) : void 0,
|
|
283
|
+
or_filters: c ? JSON.stringify(c) : void 0,
|
|
284
|
+
order_by: b,
|
|
285
|
+
group_by: l,
|
|
286
|
+
limit: a,
|
|
287
|
+
limit_start: h,
|
|
288
|
+
as_dict: v
|
|
289
|
+
}), [2, this.axios.get("/api/resource/".concat(e), { params: s }).then(function(x) {
|
|
290
|
+
return x.data.data;
|
|
291
|
+
}).catch(function(x) {
|
|
292
|
+
var g, T;
|
|
293
|
+
throw z(z({}, x.response.data), { httpStatus: x.response.status, httpStatusText: x.response.statusText, message: "There was an error while fetching the documents.", exception: (T = (g = x.response.data.exception) !== null && g !== void 0 ? g : x.response.data.exc_type) !== null && T !== void 0 ? T : "" });
|
|
294
294
|
})];
|
|
295
295
|
});
|
|
296
296
|
});
|
|
@@ -311,8 +311,8 @@ var zs = function() {
|
|
|
311
311
|
return [2, this.axios.put("/api/resource/".concat(e, "/").concat(t), z({}, r)).then(function(i) {
|
|
312
312
|
return i.data.data;
|
|
313
313
|
}).catch(function(i) {
|
|
314
|
-
var o, c,
|
|
315
|
-
throw z(z({}, i.response.data), { httpStatus: i.response.status, httpStatusText: i.response.statusText, message: (o = i.response.data.message) !== null && o !== void 0 ? o : "There was an error while updating the document.", exception: (
|
|
314
|
+
var o, c, f;
|
|
315
|
+
throw z(z({}, i.response.data), { httpStatus: i.response.status, httpStatusText: i.response.statusText, message: (o = i.response.data.message) !== null && o !== void 0 ? o : "There was an error while updating the document.", exception: (f = (c = i.response.data.exception) !== null && c !== void 0 ? c : i.response.data.exc_type) !== null && f !== void 0 ? f : "" });
|
|
316
316
|
})];
|
|
317
317
|
});
|
|
318
318
|
});
|
|
@@ -337,8 +337,8 @@ var zs = function() {
|
|
|
337
337
|
}, r && (i.cache = r), s && (i.debug = s), t && (i.filters = t ? JSON.stringify(t) : void 0), [2, this.axios.get("/api/method/frappe.client.get_count", { params: i }).then(function(c) {
|
|
338
338
|
return c.data.message;
|
|
339
339
|
}).catch(function(c) {
|
|
340
|
-
var
|
|
341
|
-
throw z(z({}, c.response.data), { httpStatus: c.response.status, httpStatusText: c.response.statusText, message: "There was an error while getting the count.", exception: (a = (
|
|
340
|
+
var f, a;
|
|
341
|
+
throw z(z({}, c.response.data), { httpStatus: c.response.status, httpStatusText: c.response.statusText, message: "There was an error while getting the count.", exception: (a = (f = c.response.data.exception) !== null && f !== void 0 ? f : c.response.data.exc_type) !== null && a !== void 0 ? a : "" });
|
|
342
342
|
})];
|
|
343
343
|
});
|
|
344
344
|
});
|
|
@@ -362,7 +362,7 @@ var zs = function() {
|
|
|
362
362
|
}, n;
|
|
363
363
|
}();
|
|
364
364
|
ht.FrappeDB = zs;
|
|
365
|
-
var dt = {}, Pt =
|
|
365
|
+
var dt = {}, Pt = B && B.__assign || function() {
|
|
366
366
|
return Pt = Object.assign || function(n) {
|
|
367
367
|
for (var e, t = 1, r = arguments.length; t < r; t++) {
|
|
368
368
|
e = arguments[t];
|
|
@@ -371,33 +371,33 @@ var dt = {}, Pt = P && P.__assign || function() {
|
|
|
371
371
|
}
|
|
372
372
|
return n;
|
|
373
373
|
}, Pt.apply(this, arguments);
|
|
374
|
-
}, Ks =
|
|
374
|
+
}, Ks = B && B.__awaiter || function(n, e, t, r) {
|
|
375
375
|
function s(i) {
|
|
376
376
|
return i instanceof t ? i : new t(function(o) {
|
|
377
377
|
o(i);
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
380
|
return new (t || (t = Promise))(function(i, o) {
|
|
381
|
-
function c(
|
|
381
|
+
function c(h) {
|
|
382
382
|
try {
|
|
383
|
-
a(r.next(
|
|
383
|
+
a(r.next(h));
|
|
384
384
|
} catch (l) {
|
|
385
385
|
o(l);
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
|
-
function h
|
|
388
|
+
function f(h) {
|
|
389
389
|
try {
|
|
390
|
-
a(r.throw(
|
|
390
|
+
a(r.throw(h));
|
|
391
391
|
} catch (l) {
|
|
392
392
|
o(l);
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
function a(
|
|
396
|
-
|
|
395
|
+
function a(h) {
|
|
396
|
+
h.done ? i(h.value) : s(h.value).then(c, f);
|
|
397
397
|
}
|
|
398
398
|
a((r = r.apply(n, e || [])).next());
|
|
399
399
|
});
|
|
400
|
-
}, Gs =
|
|
400
|
+
}, Gs = B && B.__generator || function(n, e) {
|
|
401
401
|
var t = { label: 0, sent: function() {
|
|
402
402
|
if (i[0] & 1)
|
|
403
403
|
throw i[1];
|
|
@@ -407,11 +407,11 @@ var dt = {}, Pt = P && P.__assign || function() {
|
|
|
407
407
|
return this;
|
|
408
408
|
}), o;
|
|
409
409
|
function c(a) {
|
|
410
|
-
return function(
|
|
411
|
-
return
|
|
410
|
+
return function(h) {
|
|
411
|
+
return f([a, h]);
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function f(a) {
|
|
415
415
|
if (r)
|
|
416
416
|
throw new TypeError("Generator is already executing.");
|
|
417
417
|
for (; t; )
|
|
@@ -452,8 +452,8 @@ var dt = {}, Pt = P && P.__assign || function() {
|
|
|
452
452
|
continue;
|
|
453
453
|
}
|
|
454
454
|
a = e.call(n, t);
|
|
455
|
-
} catch (
|
|
456
|
-
a = [6,
|
|
455
|
+
} catch (h) {
|
|
456
|
+
a = [6, h], s = 0;
|
|
457
457
|
} finally {
|
|
458
458
|
r = i = 0;
|
|
459
459
|
}
|
|
@@ -470,15 +470,15 @@ var Xs = function() {
|
|
|
470
470
|
}
|
|
471
471
|
return n.prototype.uploadFile = function(e, t, r) {
|
|
472
472
|
return Ks(this, void 0, void 0, function() {
|
|
473
|
-
var s, i, o, c,
|
|
473
|
+
var s, i, o, c, f, a, h;
|
|
474
474
|
return Gs(this, function(l) {
|
|
475
|
-
return s = new FormData(), e && s.append("file", e, e.name), i = t.isPrivate, o = t.folder, c = t.file_url,
|
|
476
|
-
onUploadProgress: function(
|
|
477
|
-
r && r(
|
|
475
|
+
return s = new FormData(), e && s.append("file", e, e.name), i = t.isPrivate, o = t.folder, c = t.file_url, f = t.doctype, a = t.docname, h = t.fieldname, i && s.append("is_private", "1"), o && s.append("folder", o), c && s.append("file_url", c), f && a && (s.append("doctype", f), s.append("docname", a), h && s.append("fieldname", h)), [2, this.axios.post("/api/method/upload_file", s, {
|
|
476
|
+
onUploadProgress: function(p) {
|
|
477
|
+
r && r(p.loaded, p.total);
|
|
478
478
|
}
|
|
479
|
-
}).catch(function(
|
|
480
|
-
var
|
|
481
|
-
throw Pt(Pt({},
|
|
479
|
+
}).catch(function(p) {
|
|
480
|
+
var v, b;
|
|
481
|
+
throw Pt(Pt({}, p.response.data), { httpStatus: p.response.status, httpStatusText: p.response.statusText, message: (v = p.response.data.message) !== null && v !== void 0 ? v : "There was an error while uploading the file.", exception: (b = p.response.data.exception) !== null && b !== void 0 ? b : "" });
|
|
482
482
|
})];
|
|
483
483
|
});
|
|
484
484
|
});
|
|
@@ -613,8 +613,8 @@ var Hr = function(e, t, r) {
|
|
|
613
613
|
s = t.toString();
|
|
614
614
|
else {
|
|
615
615
|
var i = [];
|
|
616
|
-
ze.forEach(t, function(
|
|
617
|
-
|
|
616
|
+
ze.forEach(t, function(f, a) {
|
|
617
|
+
f === null || typeof f > "u" || (ze.isArray(f) ? a = a + "[]" : f = [f], ze.forEach(f, function(l) {
|
|
618
618
|
ze.isDate(l) ? l = l.toISOString() : ze.isObject(l) && (l = JSON.stringify(l)), i.push(Kn(a) + "=" + Kn(l));
|
|
619
619
|
}));
|
|
620
620
|
}), s = i.join("&");
|
|
@@ -704,9 +704,9 @@ function gi() {
|
|
|
704
704
|
var n = oe;
|
|
705
705
|
return Kt = n.isStandardBrowserEnv() ? function() {
|
|
706
706
|
return {
|
|
707
|
-
write: function(r, s, i, o, c,
|
|
707
|
+
write: function(r, s, i, o, c, f) {
|
|
708
708
|
var a = [];
|
|
709
|
-
a.push(r + "=" + encodeURIComponent(s)), n.isNumber(i) && a.push("expires=" + new Date(i).toGMTString()), n.isString(o) && a.push("path=" + o), n.isString(c) && a.push("domain=" + c),
|
|
709
|
+
a.push(r + "=" + encodeURIComponent(s)), n.isNumber(i) && a.push("expires=" + new Date(i).toGMTString()), n.isString(o) && a.push("path=" + o), n.isString(c) && a.push("domain=" + c), f === !0 && a.push("secure"), document.cookie = a.join("; ");
|
|
710
710
|
},
|
|
711
711
|
read: function(r) {
|
|
712
712
|
var s = document.cookie.match(new RegExp("(^|;\\s*)(" + r + ")=([^;]*)"));
|
|
@@ -808,8 +808,8 @@ function Ri() {
|
|
|
808
808
|
};
|
|
809
809
|
}
|
|
810
810
|
return s = i(window.location.href), function(c) {
|
|
811
|
-
var
|
|
812
|
-
return
|
|
811
|
+
var f = n.isString(c) ? i(c) : c;
|
|
812
|
+
return f.protocol === s.protocol && f.host === s.host;
|
|
813
813
|
};
|
|
814
814
|
}() : function() {
|
|
815
815
|
return function() {
|
|
@@ -834,35 +834,35 @@ function or() {
|
|
|
834
834
|
if (ir)
|
|
835
835
|
return nn;
|
|
836
836
|
ir = 1;
|
|
837
|
-
var n = oe, e = yi(), t = gi(), r = Hr, s = wi(), i = Ei(), o = Ri(), c = zr(),
|
|
837
|
+
var n = oe, e = yi(), t = gi(), r = Hr, s = wi(), i = Ei(), o = Ri(), c = zr(), f = Jr, a = Ft();
|
|
838
838
|
return nn = function(l) {
|
|
839
|
-
return new Promise(function(
|
|
840
|
-
var w = l.data,
|
|
841
|
-
function
|
|
839
|
+
return new Promise(function(v, b) {
|
|
840
|
+
var w = l.data, x = l.headers, g = l.responseType, T;
|
|
841
|
+
function L() {
|
|
842
842
|
l.cancelToken && l.cancelToken.unsubscribe(T), l.signal && l.signal.removeEventListener("abort", T);
|
|
843
843
|
}
|
|
844
|
-
n.isFormData(w) && delete
|
|
844
|
+
n.isFormData(w) && delete x["Content-Type"];
|
|
845
845
|
var y = new XMLHttpRequest();
|
|
846
846
|
if (l.auth) {
|
|
847
847
|
var V = l.auth.username || "", U = l.auth.password ? unescape(encodeURIComponent(l.auth.password)) : "";
|
|
848
|
-
|
|
848
|
+
x.Authorization = "Basic " + btoa(V + ":" + U);
|
|
849
849
|
}
|
|
850
850
|
var k = s(l.baseURL, l.url);
|
|
851
851
|
y.open(l.method.toUpperCase(), r(k, l.params, l.paramsSerializer), !0), y.timeout = l.timeout;
|
|
852
852
|
function E() {
|
|
853
853
|
if (!!y) {
|
|
854
|
-
var
|
|
854
|
+
var D = "getAllResponseHeaders" in y ? i(y.getAllResponseHeaders()) : null, X = !g || g === "text" || g === "json" ? y.responseText : y.response, ne = {
|
|
855
855
|
data: X,
|
|
856
856
|
status: y.status,
|
|
857
857
|
statusText: y.statusText,
|
|
858
|
-
headers:
|
|
858
|
+
headers: D,
|
|
859
859
|
config: l,
|
|
860
860
|
request: y
|
|
861
861
|
};
|
|
862
862
|
e(function($) {
|
|
863
|
-
|
|
863
|
+
v($), L();
|
|
864
864
|
}, function($) {
|
|
865
|
-
b($),
|
|
865
|
+
b($), L();
|
|
866
866
|
}, ne), y = null;
|
|
867
867
|
}
|
|
868
868
|
}
|
|
@@ -873,7 +873,7 @@ function or() {
|
|
|
873
873
|
}, y.onerror = function() {
|
|
874
874
|
b(c("Network Error", l, null, y)), y = null;
|
|
875
875
|
}, y.ontimeout = function() {
|
|
876
|
-
var X = l.timeout ? "timeout of " + l.timeout + "ms exceeded" : "timeout exceeded", ne = l.transitional ||
|
|
876
|
+
var X = l.timeout ? "timeout of " + l.timeout + "ms exceeded" : "timeout exceeded", ne = l.transitional || f;
|
|
877
877
|
l.timeoutErrorMessage && (X = l.timeoutErrorMessage), b(c(
|
|
878
878
|
X,
|
|
879
879
|
l,
|
|
@@ -882,12 +882,12 @@ function or() {
|
|
|
882
882
|
)), y = null;
|
|
883
883
|
}, n.isStandardBrowserEnv()) {
|
|
884
884
|
var j = (l.withCredentials || o(k)) && l.xsrfCookieName ? t.read(l.xsrfCookieName) : void 0;
|
|
885
|
-
j && (
|
|
885
|
+
j && (x[l.xsrfHeaderName] = j);
|
|
886
886
|
}
|
|
887
|
-
"setRequestHeader" in y && n.forEach(
|
|
888
|
-
typeof w > "u" && ne.toLowerCase() === "content-type" ? delete
|
|
889
|
-
}), n.isUndefined(l.withCredentials) || (y.withCredentials = !!l.withCredentials), g && g !== "json" && (y.responseType = l.responseType), typeof l.onDownloadProgress == "function" && y.addEventListener("progress", l.onDownloadProgress), typeof l.onUploadProgress == "function" && y.upload && y.upload.addEventListener("progress", l.onUploadProgress), (l.cancelToken || l.signal) && (T = function(
|
|
890
|
-
!y || (b(!
|
|
887
|
+
"setRequestHeader" in y && n.forEach(x, function(X, ne) {
|
|
888
|
+
typeof w > "u" && ne.toLowerCase() === "content-type" ? delete x[ne] : y.setRequestHeader(ne, X);
|
|
889
|
+
}), n.isUndefined(l.withCredentials) || (y.withCredentials = !!l.withCredentials), g && g !== "json" && (y.responseType = l.responseType), typeof l.onDownloadProgress == "function" && y.addEventListener("progress", l.onDownloadProgress), typeof l.onUploadProgress == "function" && y.upload && y.upload.addEventListener("progress", l.onUploadProgress), (l.cancelToken || l.signal) && (T = function(D) {
|
|
890
|
+
!y || (b(!D || D && D.type ? new a("canceled") : D), y.abort(), y = null);
|
|
891
891
|
}, l.cancelToken && l.cancelToken.subscribe(T), l.signal && (l.signal.aborted ? T() : l.signal.addEventListener("abort", T))), w || (w = null), y.send(w);
|
|
892
892
|
});
|
|
893
893
|
}, nn;
|
|
@@ -1000,32 +1000,32 @@ var Bi = function(e) {
|
|
|
1000
1000
|
}, ae = oe, Gr = function(e, t) {
|
|
1001
1001
|
t = t || {};
|
|
1002
1002
|
var r = {};
|
|
1003
|
-
function s(
|
|
1004
|
-
return ae.isPlainObject(
|
|
1003
|
+
function s(h, l) {
|
|
1004
|
+
return ae.isPlainObject(h) && ae.isPlainObject(l) ? ae.merge(h, l) : ae.isPlainObject(l) ? ae.merge({}, l) : ae.isArray(l) ? l.slice() : l;
|
|
1005
1005
|
}
|
|
1006
|
-
function i(
|
|
1007
|
-
if (ae.isUndefined(t[
|
|
1008
|
-
if (!ae.isUndefined(e[
|
|
1009
|
-
return s(void 0, e[
|
|
1006
|
+
function i(h) {
|
|
1007
|
+
if (ae.isUndefined(t[h])) {
|
|
1008
|
+
if (!ae.isUndefined(e[h]))
|
|
1009
|
+
return s(void 0, e[h]);
|
|
1010
1010
|
} else
|
|
1011
|
-
return s(e[
|
|
1011
|
+
return s(e[h], t[h]);
|
|
1012
1012
|
}
|
|
1013
|
-
function o(
|
|
1014
|
-
if (!ae.isUndefined(t[
|
|
1015
|
-
return s(void 0, t[
|
|
1013
|
+
function o(h) {
|
|
1014
|
+
if (!ae.isUndefined(t[h]))
|
|
1015
|
+
return s(void 0, t[h]);
|
|
1016
1016
|
}
|
|
1017
|
-
function c(
|
|
1018
|
-
if (ae.isUndefined(t[
|
|
1019
|
-
if (!ae.isUndefined(e[
|
|
1020
|
-
return s(void 0, e[
|
|
1017
|
+
function c(h) {
|
|
1018
|
+
if (ae.isUndefined(t[h])) {
|
|
1019
|
+
if (!ae.isUndefined(e[h]))
|
|
1020
|
+
return s(void 0, e[h]);
|
|
1021
1021
|
} else
|
|
1022
|
-
return s(void 0, t[
|
|
1022
|
+
return s(void 0, t[h]);
|
|
1023
1023
|
}
|
|
1024
|
-
function h
|
|
1025
|
-
if (
|
|
1026
|
-
return s(e[
|
|
1027
|
-
if (
|
|
1028
|
-
return s(void 0, e[
|
|
1024
|
+
function f(h) {
|
|
1025
|
+
if (h in t)
|
|
1026
|
+
return s(e[h], t[h]);
|
|
1027
|
+
if (h in e)
|
|
1028
|
+
return s(void 0, e[h]);
|
|
1029
1029
|
}
|
|
1030
1030
|
var a = {
|
|
1031
1031
|
url: o,
|
|
@@ -1053,11 +1053,11 @@ var Bi = function(e) {
|
|
|
1053
1053
|
cancelToken: c,
|
|
1054
1054
|
socketPath: c,
|
|
1055
1055
|
responseEncoding: c,
|
|
1056
|
-
validateStatus:
|
|
1056
|
+
validateStatus: f
|
|
1057
1057
|
};
|
|
1058
1058
|
return ae.forEach(Object.keys(e).concat(Object.keys(t)), function(l) {
|
|
1059
|
-
var
|
|
1060
|
-
ae.isUndefined(
|
|
1059
|
+
var p = a[l] || i, v = p(l);
|
|
1060
|
+
ae.isUndefined(v) && p !== f || (r[l] = v);
|
|
1061
1061
|
}), r;
|
|
1062
1062
|
}, an, fr;
|
|
1063
1063
|
function Xr() {
|
|
@@ -1093,9 +1093,9 @@ function Ii(n, e, t) {
|
|
|
1093
1093
|
for (var r = Object.keys(n), s = r.length; s-- > 0; ) {
|
|
1094
1094
|
var i = r[s], o = e[i];
|
|
1095
1095
|
if (o) {
|
|
1096
|
-
var c = n[i],
|
|
1097
|
-
if (
|
|
1098
|
-
throw new TypeError("option " + i + " must be " +
|
|
1096
|
+
var c = n[i], f = c === void 0 || o(c, i, n);
|
|
1097
|
+
if (f !== !0)
|
|
1098
|
+
throw new TypeError("option " + i + " must be " + f);
|
|
1099
1099
|
continue;
|
|
1100
1100
|
}
|
|
1101
1101
|
if (t !== !0)
|
|
@@ -1121,33 +1121,33 @@ pt.prototype.request = function(e, t) {
|
|
|
1121
1121
|
clarifyTimeoutError: Ke.transitional(Ke.boolean)
|
|
1122
1122
|
}, !1);
|
|
1123
1123
|
var s = [], i = !0;
|
|
1124
|
-
this.interceptors.request.forEach(function(
|
|
1125
|
-
typeof
|
|
1124
|
+
this.interceptors.request.forEach(function(v) {
|
|
1125
|
+
typeof v.runWhen == "function" && v.runWhen(t) === !1 || (i = i && v.synchronous, s.unshift(v.fulfilled, v.rejected));
|
|
1126
1126
|
});
|
|
1127
1127
|
var o = [];
|
|
1128
|
-
this.interceptors.response.forEach(function(
|
|
1129
|
-
o.push(
|
|
1128
|
+
this.interceptors.response.forEach(function(v) {
|
|
1129
|
+
o.push(v.fulfilled, v.rejected);
|
|
1130
1130
|
});
|
|
1131
1131
|
var c;
|
|
1132
1132
|
if (!i) {
|
|
1133
|
-
var
|
|
1134
|
-
for (Array.prototype.unshift.apply(
|
|
1135
|
-
c = c.then(
|
|
1133
|
+
var f = [pr, void 0];
|
|
1134
|
+
for (Array.prototype.unshift.apply(f, s), f = f.concat(o), c = Promise.resolve(t); f.length; )
|
|
1135
|
+
c = c.then(f.shift(), f.shift());
|
|
1136
1136
|
return c;
|
|
1137
1137
|
}
|
|
1138
1138
|
for (var a = t; s.length; ) {
|
|
1139
|
-
var
|
|
1139
|
+
var h = s.shift(), l = s.shift();
|
|
1140
1140
|
try {
|
|
1141
|
-
a =
|
|
1142
|
-
} catch (
|
|
1143
|
-
l(
|
|
1141
|
+
a = h(a);
|
|
1142
|
+
} catch (p) {
|
|
1143
|
+
l(p);
|
|
1144
1144
|
break;
|
|
1145
1145
|
}
|
|
1146
1146
|
}
|
|
1147
1147
|
try {
|
|
1148
1148
|
c = pr(a);
|
|
1149
|
-
} catch (
|
|
1150
|
-
return Promise.reject(
|
|
1149
|
+
} catch (p) {
|
|
1150
|
+
return Promise.reject(p);
|
|
1151
1151
|
}
|
|
1152
1152
|
for (; o.length; )
|
|
1153
1153
|
c = c.then(o.shift(), o.shift());
|
|
@@ -1196,8 +1196,8 @@ function ji() {
|
|
|
1196
1196
|
s._listeners = null;
|
|
1197
1197
|
}
|
|
1198
1198
|
}), this.promise.then = function(i) {
|
|
1199
|
-
var o, c = new Promise(function(
|
|
1200
|
-
s.subscribe(
|
|
1199
|
+
var o, c = new Promise(function(f) {
|
|
1200
|
+
s.subscribe(f), o = f;
|
|
1201
1201
|
}).then(i);
|
|
1202
1202
|
return c.cancel = function() {
|
|
1203
1203
|
s.unsubscribe(o);
|
|
@@ -1297,9 +1297,9 @@ function Ki() {
|
|
|
1297
1297
|
return rt;
|
|
1298
1298
|
_r = 1, Object.defineProperty(rt, "__esModule", { value: !0 }), rt.FrappeApp = void 0;
|
|
1299
1299
|
var n = ns(), e = ft, t = ht, r = dt, s = Ge, i = function() {
|
|
1300
|
-
function o(c,
|
|
1301
|
-
var
|
|
1302
|
-
this.url = c, this.name = a != null ? a : "FrappeApp", this.useToken = (
|
|
1300
|
+
function o(c, f, a) {
|
|
1301
|
+
var h, l;
|
|
1302
|
+
this.url = c, this.name = a != null ? a : "FrappeApp", this.useToken = (h = f == null ? void 0 : f.useToken) !== null && h !== void 0 ? h : !1, this.token = f == null ? void 0 : f.token, this.tokenType = (l = f == null ? void 0 : f.type) !== null && l !== void 0 ? l : "Bearer", this.axios = (0, s.getAxiosClient)(this.url, this.useToken, this.token, this.tokenType);
|
|
1303
1303
|
}
|
|
1304
1304
|
return o.prototype.auth = function() {
|
|
1305
1305
|
return new n.FrappeAuth(this.url, this.axios, this.useToken, this.token, this.tokenType);
|
|
@@ -1313,7 +1313,7 @@ function Ki() {
|
|
|
1313
1313
|
}();
|
|
1314
1314
|
return rt.FrappeApp = i, rt;
|
|
1315
1315
|
}
|
|
1316
|
-
var qt = {}, ve =
|
|
1316
|
+
var qt = {}, ve = B && B.__assign || function() {
|
|
1317
1317
|
return ve = Object.assign || function(n) {
|
|
1318
1318
|
for (var e, t = 1, r = arguments.length; t < r; t++) {
|
|
1319
1319
|
e = arguments[t];
|
|
@@ -1322,33 +1322,33 @@ var qt = {}, ve = P && P.__assign || function() {
|
|
|
1322
1322
|
}
|
|
1323
1323
|
return n;
|
|
1324
1324
|
}, ve.apply(this, arguments);
|
|
1325
|
-
}, Rt =
|
|
1325
|
+
}, Rt = B && B.__awaiter || function(n, e, t, r) {
|
|
1326
1326
|
function s(i) {
|
|
1327
1327
|
return i instanceof t ? i : new t(function(o) {
|
|
1328
1328
|
o(i);
|
|
1329
1329
|
});
|
|
1330
1330
|
}
|
|
1331
1331
|
return new (t || (t = Promise))(function(i, o) {
|
|
1332
|
-
function c(
|
|
1332
|
+
function c(h) {
|
|
1333
1333
|
try {
|
|
1334
|
-
a(r.next(
|
|
1334
|
+
a(r.next(h));
|
|
1335
1335
|
} catch (l) {
|
|
1336
1336
|
o(l);
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
1339
|
-
function h
|
|
1339
|
+
function f(h) {
|
|
1340
1340
|
try {
|
|
1341
|
-
a(r.throw(
|
|
1341
|
+
a(r.throw(h));
|
|
1342
1342
|
} catch (l) {
|
|
1343
1343
|
o(l);
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
|
-
function a(
|
|
1347
|
-
|
|
1346
|
+
function a(h) {
|
|
1347
|
+
h.done ? i(h.value) : s(h.value).then(c, f);
|
|
1348
1348
|
}
|
|
1349
1349
|
a((r = r.apply(n, e || [])).next());
|
|
1350
1350
|
});
|
|
1351
|
-
}, St =
|
|
1351
|
+
}, St = B && B.__generator || function(n, e) {
|
|
1352
1352
|
var t = { label: 0, sent: function() {
|
|
1353
1353
|
if (i[0] & 1)
|
|
1354
1354
|
throw i[1];
|
|
@@ -1358,11 +1358,11 @@ var qt = {}, ve = P && P.__assign || function() {
|
|
|
1358
1358
|
return this;
|
|
1359
1359
|
}), o;
|
|
1360
1360
|
function c(a) {
|
|
1361
|
-
return function(
|
|
1362
|
-
return
|
|
1361
|
+
return function(h) {
|
|
1362
|
+
return f([a, h]);
|
|
1363
1363
|
};
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1365
|
+
function f(a) {
|
|
1366
1366
|
if (r)
|
|
1367
1367
|
throw new TypeError("Generator is already executing.");
|
|
1368
1368
|
for (; t; )
|
|
@@ -1403,8 +1403,8 @@ var qt = {}, ve = P && P.__assign || function() {
|
|
|
1403
1403
|
continue;
|
|
1404
1404
|
}
|
|
1405
1405
|
a = e.call(n, t);
|
|
1406
|
-
} catch (
|
|
1407
|
-
a = [6,
|
|
1406
|
+
} catch (h) {
|
|
1407
|
+
a = [6, h], s = 0;
|
|
1408
1408
|
} finally {
|
|
1409
1409
|
r = i = 0;
|
|
1410
1410
|
}
|
|
@@ -1430,8 +1430,8 @@ var Gi = function() {
|
|
|
1430
1430
|
}).then(function(o) {
|
|
1431
1431
|
return o.data;
|
|
1432
1432
|
}).catch(function(o) {
|
|
1433
|
-
var c,
|
|
1434
|
-
throw ve(ve({}, o.response.data), { httpStatus: o.response.status, httpStatusText: o.response.statusText, message: (c = o.response.data.message) !== null && c !== void 0 ? c : "There was an error while logging in", exception: (
|
|
1433
|
+
var c, f;
|
|
1434
|
+
throw ve(ve({}, o.response.data), { httpStatus: o.response.status, httpStatusText: o.response.statusText, message: (c = o.response.data.message) !== null && c !== void 0 ? c : "There was an error while logging in", exception: (f = o.response.data.exception) !== null && f !== void 0 ? f : "" });
|
|
1435
1435
|
})];
|
|
1436
1436
|
});
|
|
1437
1437
|
});
|
|
@@ -1475,7 +1475,7 @@ qt.FrappeAuth = Gi;
|
|
|
1475
1475
|
var br;
|
|
1476
1476
|
function ns() {
|
|
1477
1477
|
return br || (br = 1, function(n) {
|
|
1478
|
-
var e =
|
|
1478
|
+
var e = B && B.__createBinding || (Object.create ? function(r, s, i, o) {
|
|
1479
1479
|
o === void 0 && (o = i);
|
|
1480
1480
|
var c = Object.getOwnPropertyDescriptor(s, i);
|
|
1481
1481
|
(!c || ("get" in c ? !s.__esModule : c.writable || c.configurable)) && (c = { enumerable: !0, get: function() {
|
|
@@ -1483,7 +1483,7 @@ function ns() {
|
|
|
1483
1483
|
} }), Object.defineProperty(r, o, c);
|
|
1484
1484
|
} : function(r, s, i, o) {
|
|
1485
1485
|
o === void 0 && (o = i), r[o] = s[i];
|
|
1486
|
-
}), t =
|
|
1486
|
+
}), t = B && B.__exportStar || function(r, s) {
|
|
1487
1487
|
for (var i in r)
|
|
1488
1488
|
i !== "default" && !Object.prototype.hasOwnProperty.call(s, i) && e(s, r, i);
|
|
1489
1489
|
};
|
|
@@ -1506,35 +1506,35 @@ function Qi() {
|
|
|
1506
1506
|
return fn;
|
|
1507
1507
|
wr = 1;
|
|
1508
1508
|
var n = qe;
|
|
1509
|
-
function e(l,
|
|
1510
|
-
return l ===
|
|
1509
|
+
function e(l, p) {
|
|
1510
|
+
return l === p && (l !== 0 || 1 / l === 1 / p) || l !== l && p !== p;
|
|
1511
1511
|
}
|
|
1512
1512
|
var t = typeof Object.is == "function" ? Object.is : e, r = n.useState, s = n.useEffect, i = n.useLayoutEffect, o = n.useDebugValue;
|
|
1513
|
-
function c(l,
|
|
1514
|
-
var
|
|
1513
|
+
function c(l, p) {
|
|
1514
|
+
var v = p(), b = r({ inst: { value: v, getSnapshot: p } }), w = b[0].inst, x = b[1];
|
|
1515
1515
|
return i(function() {
|
|
1516
|
-
w.value =
|
|
1517
|
-
}, [l,
|
|
1518
|
-
return
|
|
1519
|
-
|
|
1516
|
+
w.value = v, w.getSnapshot = p, f(w) && x({ inst: w });
|
|
1517
|
+
}, [l, v, p]), s(function() {
|
|
1518
|
+
return f(w) && x({ inst: w }), l(function() {
|
|
1519
|
+
f(w) && x({ inst: w });
|
|
1520
1520
|
});
|
|
1521
|
-
}, [l]), o(
|
|
1521
|
+
}, [l]), o(v), v;
|
|
1522
1522
|
}
|
|
1523
|
-
function
|
|
1524
|
-
var
|
|
1523
|
+
function f(l) {
|
|
1524
|
+
var p = l.getSnapshot;
|
|
1525
1525
|
l = l.value;
|
|
1526
1526
|
try {
|
|
1527
|
-
var
|
|
1528
|
-
return !t(l,
|
|
1527
|
+
var v = p();
|
|
1528
|
+
return !t(l, v);
|
|
1529
1529
|
} catch {
|
|
1530
1530
|
return !0;
|
|
1531
1531
|
}
|
|
1532
1532
|
}
|
|
1533
|
-
function a(l,
|
|
1534
|
-
return
|
|
1533
|
+
function a(l, p) {
|
|
1534
|
+
return p();
|
|
1535
1535
|
}
|
|
1536
|
-
var
|
|
1537
|
-
return fn.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore :
|
|
1536
|
+
var h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : c;
|
|
1537
|
+
return fn.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : h, fn;
|
|
1538
1538
|
}
|
|
1539
1539
|
var hn = {};
|
|
1540
1540
|
/**
|
|
@@ -1551,29 +1551,29 @@ function Zi() {
|
|
|
1551
1551
|
return Er || (Er = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1552
1552
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
1553
1553
|
var n = qe, e = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1554
|
-
function t(
|
|
1554
|
+
function t(L) {
|
|
1555
1555
|
{
|
|
1556
1556
|
for (var y = arguments.length, V = new Array(y > 1 ? y - 1 : 0), U = 1; U < y; U++)
|
|
1557
1557
|
V[U - 1] = arguments[U];
|
|
1558
|
-
r("error",
|
|
1558
|
+
r("error", L, V);
|
|
1559
1559
|
}
|
|
1560
1560
|
}
|
|
1561
|
-
function r(
|
|
1561
|
+
function r(L, y, V) {
|
|
1562
1562
|
{
|
|
1563
1563
|
var U = e.ReactDebugCurrentFrame, k = U.getStackAddendum();
|
|
1564
1564
|
k !== "" && (y += "%s", V = V.concat([k]));
|
|
1565
1565
|
var E = V.map(function(j) {
|
|
1566
1566
|
return String(j);
|
|
1567
1567
|
});
|
|
1568
|
-
E.unshift("Warning: " + y), Function.prototype.apply.call(console[
|
|
1568
|
+
E.unshift("Warning: " + y), Function.prototype.apply.call(console[L], console, E);
|
|
1569
1569
|
}
|
|
1570
1570
|
}
|
|
1571
|
-
function s(
|
|
1572
|
-
return
|
|
1571
|
+
function s(L, y) {
|
|
1572
|
+
return L === y && (L !== 0 || 1 / L === 1 / y) || L !== L && y !== y;
|
|
1573
1573
|
}
|
|
1574
|
-
var i = typeof Object.is == "function" ? Object.is : s, o = n.useState, c = n.useEffect,
|
|
1575
|
-
function
|
|
1576
|
-
|
|
1574
|
+
var i = typeof Object.is == "function" ? Object.is : s, o = n.useState, c = n.useEffect, f = n.useLayoutEffect, a = n.useDebugValue, h = !1, l = !1;
|
|
1575
|
+
function p(L, y, V) {
|
|
1576
|
+
h || n.startTransition !== void 0 && (h = !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."));
|
|
1577
1577
|
var U = y();
|
|
1578
1578
|
if (!l) {
|
|
1579
1579
|
var k = y();
|
|
@@ -1584,25 +1584,25 @@ function Zi() {
|
|
|
1584
1584
|
value: U,
|
|
1585
1585
|
getSnapshot: y
|
|
1586
1586
|
}
|
|
1587
|
-
}), j = E[0].inst,
|
|
1588
|
-
return
|
|
1589
|
-
j.value = U, j.getSnapshot = y,
|
|
1587
|
+
}), j = E[0].inst, D = E[1];
|
|
1588
|
+
return f(function() {
|
|
1589
|
+
j.value = U, j.getSnapshot = y, v(j) && D({
|
|
1590
1590
|
inst: j
|
|
1591
1591
|
});
|
|
1592
|
-
}, [
|
|
1593
|
-
|
|
1592
|
+
}, [L, U, y]), c(function() {
|
|
1593
|
+
v(j) && D({
|
|
1594
1594
|
inst: j
|
|
1595
1595
|
});
|
|
1596
1596
|
var X = function() {
|
|
1597
|
-
|
|
1597
|
+
v(j) && D({
|
|
1598
1598
|
inst: j
|
|
1599
1599
|
});
|
|
1600
1600
|
};
|
|
1601
|
-
return
|
|
1602
|
-
}, [
|
|
1601
|
+
return L(X);
|
|
1602
|
+
}, [L]), a(U), U;
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1605
|
-
var y =
|
|
1604
|
+
function v(L) {
|
|
1605
|
+
var y = L.getSnapshot, V = L.value;
|
|
1606
1606
|
try {
|
|
1607
1607
|
var U = y();
|
|
1608
1608
|
return !i(V, U);
|
|
@@ -1610,10 +1610,10 @@ function Zi() {
|
|
|
1610
1610
|
return !0;
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
|
-
function b(
|
|
1613
|
+
function b(L, y, V) {
|
|
1614
1614
|
return y();
|
|
1615
1615
|
}
|
|
1616
|
-
var w = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u",
|
|
1616
|
+
var w = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", x = !w, g = x ? b : p, T = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : g;
|
|
1617
1617
|
hn.useSyncExternalStore = T, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
1618
1618
|
}()), hn;
|
|
1619
1619
|
}
|
|
@@ -1722,20 +1722,20 @@ async function us(...n) {
|
|
|
1722
1722
|
} : s || {});
|
|
1723
1723
|
let o = i.populateCache;
|
|
1724
1724
|
const c = i.rollbackOnError;
|
|
1725
|
-
let
|
|
1726
|
-
const a = i.revalidate !== !1,
|
|
1725
|
+
let f = i.optimisticData;
|
|
1726
|
+
const a = i.revalidate !== !1, h = (v) => typeof c == "function" ? c(v) : c !== !1, l = i.throwOnError;
|
|
1727
1727
|
if (xe(t)) {
|
|
1728
|
-
const
|
|
1729
|
-
for (const
|
|
1730
|
-
!/^\$(inf|sub)\$/.test(
|
|
1731
|
-
return Promise.all(b.map(
|
|
1732
|
-
}
|
|
1733
|
-
return
|
|
1734
|
-
async function v
|
|
1735
|
-
const [b] = In(
|
|
1728
|
+
const v = t, b = [], w = e.keys();
|
|
1729
|
+
for (const x of w)
|
|
1730
|
+
!/^\$(inf|sub)\$/.test(x) && v(e.get(x)._k) && b.push(x);
|
|
1731
|
+
return Promise.all(b.map(p));
|
|
1732
|
+
}
|
|
1733
|
+
return p(t);
|
|
1734
|
+
async function p(v) {
|
|
1735
|
+
const [b] = In(v);
|
|
1736
1736
|
if (!b)
|
|
1737
1737
|
return;
|
|
1738
|
-
const [w,
|
|
1738
|
+
const [w, x] = ss(e, b), [g, T, L, y] = Oe.get(e), V = g[b], U = () => a && (delete L[b], delete y[b], V && V[0]) ? V[0](as).then(() => w().data) : w().data;
|
|
1739
1739
|
if (n.length < 3)
|
|
1740
1740
|
return U();
|
|
1741
1741
|
let k = r, E;
|
|
@@ -1744,9 +1744,9 @@ async function us(...n) {
|
|
|
1744
1744
|
j,
|
|
1745
1745
|
0
|
|
1746
1746
|
];
|
|
1747
|
-
const
|
|
1748
|
-
if (
|
|
1749
|
-
data:
|
|
1747
|
+
const D = !C(f), X = w(), ne = X.data, Z = X._c, $ = C(Z) ? ne : Z;
|
|
1748
|
+
if (D && (f = xe(f) ? f($, ne) : f, x({
|
|
1749
|
+
data: f,
|
|
1750
1750
|
_c: $
|
|
1751
1751
|
})), xe(k))
|
|
1752
1752
|
try {
|
|
@@ -1762,17 +1762,17 @@ async function us(...n) {
|
|
|
1762
1762
|
throw E;
|
|
1763
1763
|
return k;
|
|
1764
1764
|
} else
|
|
1765
|
-
E &&
|
|
1765
|
+
E && D && h(E) && (o = !0, k = $, x({
|
|
1766
1766
|
data: k,
|
|
1767
1767
|
_c: fe
|
|
1768
1768
|
}));
|
|
1769
|
-
o && (E || (xe(o) && (k = o(k, $)),
|
|
1769
|
+
o && (E || (xe(o) && (k = o(k, $)), x({
|
|
1770
1770
|
data: k,
|
|
1771
1771
|
error: fe,
|
|
1772
1772
|
_c: fe
|
|
1773
1773
|
}))), T[b][1] = Sn();
|
|
1774
1774
|
const _e = await U();
|
|
1775
|
-
if (
|
|
1775
|
+
if (x({
|
|
1776
1776
|
_c: fe
|
|
1777
1777
|
}), E) {
|
|
1778
1778
|
if (l)
|
|
@@ -1789,15 +1789,15 @@ const Tr = (n, e) => {
|
|
|
1789
1789
|
if (!Oe.has(n)) {
|
|
1790
1790
|
const t = Le(uo, e), r = {}, s = us.bind(fe, n);
|
|
1791
1791
|
let i = Ae;
|
|
1792
|
-
const o = {}, c = (
|
|
1793
|
-
const
|
|
1794
|
-
return o[
|
|
1795
|
-
},
|
|
1796
|
-
n.set(
|
|
1797
|
-
const
|
|
1798
|
-
if (
|
|
1799
|
-
for (const b of
|
|
1800
|
-
b(l,
|
|
1792
|
+
const o = {}, c = (h, l) => {
|
|
1793
|
+
const p = o[h] || [];
|
|
1794
|
+
return o[h] = p, p.push(l), () => p.splice(p.indexOf(l), 1);
|
|
1795
|
+
}, f = (h, l, p) => {
|
|
1796
|
+
n.set(h, l);
|
|
1797
|
+
const v = o[h];
|
|
1798
|
+
if (v)
|
|
1799
|
+
for (const b of v)
|
|
1800
|
+
b(l, p);
|
|
1801
1801
|
}, a = () => {
|
|
1802
1802
|
if (!Oe.has(n) && (Oe.set(n, [
|
|
1803
1803
|
r,
|
|
@@ -1805,12 +1805,12 @@ const Tr = (n, e) => {
|
|
|
1805
1805
|
{},
|
|
1806
1806
|
{},
|
|
1807
1807
|
s,
|
|
1808
|
-
|
|
1808
|
+
f,
|
|
1809
1809
|
c
|
|
1810
1810
|
]), !lt)) {
|
|
1811
|
-
const
|
|
1811
|
+
const h = t.initFocus(setTimeout.bind(fe, Tr.bind(fe, r, is))), l = t.initReconnect(setTimeout.bind(fe, Tr.bind(fe, r, os)));
|
|
1812
1812
|
i = () => {
|
|
1813
|
-
|
|
1813
|
+
h && h(), l && l(), Oe.delete(n);
|
|
1814
1814
|
};
|
|
1815
1815
|
}
|
|
1816
1816
|
};
|
|
@@ -1868,15 +1868,15 @@ const Tr = (n, e) => {
|
|
|
1868
1868
|
null,
|
|
1869
1869
|
(n[1] === null ? n[2] : n[1]) || {}
|
|
1870
1870
|
], Ro = () => Le(yo, ee(_o)), So = (n) => (e, t, r) => n(e, t && ((...i) => {
|
|
1871
|
-
const [o] = In(e), [, , , c] = Oe.get(cs),
|
|
1872
|
-
return C(
|
|
1871
|
+
const [o] = In(e), [, , , c] = Oe.get(cs), f = c[o];
|
|
1872
|
+
return C(f) ? t(...i) : (delete c[o], f);
|
|
1873
1873
|
}), r), To = bo.concat(So), Oo = (n) => function(...t) {
|
|
1874
1874
|
const r = Ro(), [s, i, o] = Eo(t), c = go(r, o);
|
|
1875
|
-
let
|
|
1876
|
-
const { use: a } = c,
|
|
1877
|
-
for (let l =
|
|
1878
|
-
|
|
1879
|
-
return
|
|
1875
|
+
let f = n;
|
|
1876
|
+
const { use: a } = c, h = (a || []).concat(To);
|
|
1877
|
+
for (let l = h.length; l--; )
|
|
1878
|
+
f = h[l](f);
|
|
1879
|
+
return f(s, i || c.fetcher || null, c);
|
|
1880
1880
|
}, xo = (n, e, t) => {
|
|
1881
1881
|
const r = e[n] || (e[n] = []);
|
|
1882
1882
|
return r.push(t), () => {
|
|
@@ -1898,29 +1898,29 @@ const Or = qe.use || ((n) => {
|
|
|
1898
1898
|
}), yn = {
|
|
1899
1899
|
dedupe: !0
|
|
1900
1900
|
}, Co = (n, e, t) => {
|
|
1901
|
-
const { cache: r, compare: s, suspense: i, fallbackData: o, revalidateOnMount: c, revalidateIfStale:
|
|
1901
|
+
const { cache: r, compare: s, suspense: i, fallbackData: o, revalidateOnMount: c, revalidateIfStale: f, refreshInterval: a, refreshWhenHidden: h, refreshWhenOffline: l, keepPreviousData: p } = t, [v, b, w, x] = Oe.get(r), [g, T] = In(n), L = Fe(!1), y = Fe(!1), V = Fe(g), U = Fe(e), k = Fe(t), E = () => k.current, j = () => E().isVisible() && E().isOnline(), [D, X, ne, Z] = ss(r, g), $ = Fe({}).current, _e = C(o) ? t.fallback[g] : o, be = (N, F) => {
|
|
1902
1902
|
for (const G in $) {
|
|
1903
1903
|
const q = G;
|
|
1904
1904
|
if (q === "data") {
|
|
1905
|
-
if (!s(
|
|
1905
|
+
if (!s(N[q], F[q]) && (!C(N[q]) || !s(Ve, F[q])))
|
|
1906
1906
|
return !1;
|
|
1907
|
-
} else if (
|
|
1907
|
+
} else if (F[q] !== N[q])
|
|
1908
1908
|
return !1;
|
|
1909
1909
|
}
|
|
1910
1910
|
return !0;
|
|
1911
1911
|
}, Ze = qr(() => {
|
|
1912
|
-
const
|
|
1912
|
+
const N = (() => !g || !e ? !1 : C(c) ? E().isPaused() || i ? !1 : C(f) ? !0 : f : c)(), F = (Y) => {
|
|
1913
1913
|
const he = Le(Y);
|
|
1914
|
-
return delete he._k,
|
|
1914
|
+
return delete he._k, N ? {
|
|
1915
1915
|
isValidating: !0,
|
|
1916
1916
|
isLoading: !0,
|
|
1917
1917
|
...he
|
|
1918
1918
|
} : he;
|
|
1919
|
-
}, G =
|
|
1919
|
+
}, G = D(), q = Z(), re = F(G), Se = G === q ? re : F(q);
|
|
1920
1920
|
let H = re;
|
|
1921
1921
|
return [
|
|
1922
1922
|
() => {
|
|
1923
|
-
const Y =
|
|
1923
|
+
const Y = F(D());
|
|
1924
1924
|
return be(Y, H) ? (H.data = Y.data, H.isLoading = Y.isLoading, H.isValidating = Y.isValidating, H.error = Y.error, H) : (H = Y, Y);
|
|
1925
1925
|
},
|
|
1926
1926
|
() => Se
|
|
@@ -1929,20 +1929,20 @@ const Or = qe.use || ((n) => {
|
|
|
1929
1929
|
r,
|
|
1930
1930
|
g
|
|
1931
1931
|
]), we = rs.exports.useSyncExternalStore(M(
|
|
1932
|
-
(
|
|
1933
|
-
be(G,
|
|
1932
|
+
(N) => ne(g, (F, G) => {
|
|
1933
|
+
be(G, F) || N();
|
|
1934
1934
|
}),
|
|
1935
1935
|
[
|
|
1936
1936
|
r,
|
|
1937
1937
|
g
|
|
1938
1938
|
]
|
|
1939
|
-
), Ze[0], Ze[1]), et = !
|
|
1940
|
-
async (
|
|
1941
|
-
const
|
|
1942
|
-
if (!g || !
|
|
1939
|
+
), Ze[0], Ze[1]), et = !L.current, mt = v[g] && v[g].length > 0, Ee = we.data, Re = C(Ee) ? _e : Ee, Ne = we.error, yt = Fe(Re), Ve = p ? C(Ee) ? yt.current : Ee : Re, je = (() => mt && !C(Ne) ? !1 : et && !C(c) ? c : E().isPaused() ? !1 : i ? C(Re) ? !1 : f : C(Re) || f)(), $e = !!(g && e && et && je), Me = C(we.isValidating) ? $e : we.isValidating, tt = C(we.isLoading) ? $e : we.isLoading, pe = M(
|
|
1940
|
+
async (N) => {
|
|
1941
|
+
const F = U.current;
|
|
1942
|
+
if (!g || !F || y.current || E().isPaused())
|
|
1943
1943
|
return !1;
|
|
1944
1944
|
let G, q, re = !0;
|
|
1945
|
-
const Se =
|
|
1945
|
+
const Se = N || {}, H = !w[g] || !Se.dedupe, Y = () => Rr ? !y.current && g === V.current && L.current : g === V.current, he = {
|
|
1946
1946
|
isValidating: !1,
|
|
1947
1947
|
isLoading: !1
|
|
1948
1948
|
}, _t = () => {
|
|
@@ -1953,12 +1953,12 @@ const Or = qe.use || ((n) => {
|
|
|
1953
1953
|
}, bt = {
|
|
1954
1954
|
isValidating: !0
|
|
1955
1955
|
};
|
|
1956
|
-
C(
|
|
1956
|
+
C(D().data) && (bt.isLoading = !0);
|
|
1957
1957
|
try {
|
|
1958
|
-
if (H && (X(bt), t.loadingTimeout && C(
|
|
1958
|
+
if (H && (X(bt), t.loadingTimeout && C(D().data) && setTimeout(() => {
|
|
1959
1959
|
re && Y() && E().onLoadingSlow(g, t);
|
|
1960
1960
|
}, t.loadingTimeout), w[g] = [
|
|
1961
|
-
|
|
1961
|
+
F(T),
|
|
1962
1962
|
Sn()
|
|
1963
1963
|
]), [G, q] = w[g], G = await G, H && setTimeout(We, t.dedupingInterval), !w[g] || w[g][1] !== q)
|
|
1964
1964
|
return H && Y() && E().onDiscarded(g), !1;
|
|
@@ -1966,13 +1966,13 @@ const Or = qe.use || ((n) => {
|
|
|
1966
1966
|
const ie = b[g];
|
|
1967
1967
|
if (!C(ie) && (q <= ie[0] || q <= ie[1] || ie[1] === 0))
|
|
1968
1968
|
return _t(), H && Y() && E().onDiscarded(g), !1;
|
|
1969
|
-
const ue =
|
|
1969
|
+
const ue = D().data;
|
|
1970
1970
|
he.data = s(ue, G) ? ue : G, H && Y() && E().onSuccess(G, g, t);
|
|
1971
1971
|
} catch (ie) {
|
|
1972
1972
|
We();
|
|
1973
1973
|
const ue = E(), { shouldRetryOnError: He } = ue;
|
|
1974
1974
|
ue.isPaused() || (he.error = ie, H && Y() && (ue.onError(ie, g, ue), (He === !0 || xe(He) && He(ie)) && j() && ue.onErrorRetry(ie, g, ue, (Pe) => {
|
|
1975
|
-
const nt =
|
|
1975
|
+
const nt = v[g];
|
|
1976
1976
|
nt && nt[0] && nt[0](st.ERROR_REVALIDATE_EVENT, Pe);
|
|
1977
1977
|
}, {
|
|
1978
1978
|
retryCount: (Se.retryCount || 0) + 1,
|
|
@@ -1986,7 +1986,7 @@ const Or = qe.use || ((n) => {
|
|
|
1986
1986
|
r
|
|
1987
1987
|
]
|
|
1988
1988
|
), gt = M(
|
|
1989
|
-
(...
|
|
1989
|
+
(...N) => us(r, V.current, ...N),
|
|
1990
1990
|
[]
|
|
1991
1991
|
);
|
|
1992
1992
|
if (vn(() => {
|
|
@@ -1994,14 +1994,14 @@ const Or = qe.use || ((n) => {
|
|
|
1994
1994
|
}), vn(() => {
|
|
1995
1995
|
if (!g)
|
|
1996
1996
|
return;
|
|
1997
|
-
const
|
|
1998
|
-
let
|
|
1999
|
-
const q = xo(g,
|
|
1997
|
+
const N = pe.bind(fe, yn);
|
|
1998
|
+
let F = 0;
|
|
1999
|
+
const q = xo(g, v, (re, Se = {}) => {
|
|
2000
2000
|
if (re == st.FOCUS_EVENT) {
|
|
2001
2001
|
const H = Date.now();
|
|
2002
|
-
E().revalidateOnFocus && H >
|
|
2002
|
+
E().revalidateOnFocus && H > F && j() && (F = H + E().focusThrottleInterval, N());
|
|
2003
2003
|
} else if (re == st.RECONNECT_EVENT)
|
|
2004
|
-
E().revalidateOnReconnect && j() &&
|
|
2004
|
+
E().revalidateOnReconnect && j() && N();
|
|
2005
2005
|
else {
|
|
2006
2006
|
if (re == st.MUTATE_EVENT)
|
|
2007
2007
|
return pe();
|
|
@@ -2009,42 +2009,42 @@ const Or = qe.use || ((n) => {
|
|
|
2009
2009
|
return pe(Se);
|
|
2010
2010
|
}
|
|
2011
2011
|
});
|
|
2012
|
-
return y.current = !1, V.current = g,
|
|
2012
|
+
return y.current = !1, V.current = g, L.current = !0, X({
|
|
2013
2013
|
_k: T
|
|
2014
|
-
}), je && (C(Re) || lt ?
|
|
2014
|
+
}), je && (C(Re) || lt ? N() : co(N)), () => {
|
|
2015
2015
|
y.current = !0, q();
|
|
2016
2016
|
};
|
|
2017
2017
|
}, [
|
|
2018
2018
|
g
|
|
2019
2019
|
]), vn(() => {
|
|
2020
|
-
let
|
|
2021
|
-
function
|
|
2022
|
-
const q = xe(a) ? a(
|
|
2023
|
-
q &&
|
|
2020
|
+
let N;
|
|
2021
|
+
function F() {
|
|
2022
|
+
const q = xe(a) ? a(D().data) : a;
|
|
2023
|
+
q && N !== -1 && (N = setTimeout(G, q));
|
|
2024
2024
|
}
|
|
2025
2025
|
function G() {
|
|
2026
|
-
!
|
|
2026
|
+
!D().error && (h || E().isVisible()) && (l || E().isOnline()) ? pe(yn).then(F) : F();
|
|
2027
2027
|
}
|
|
2028
|
-
return
|
|
2029
|
-
|
|
2028
|
+
return F(), () => {
|
|
2029
|
+
N && (clearTimeout(N), N = -1);
|
|
2030
2030
|
};
|
|
2031
2031
|
}, [
|
|
2032
2032
|
a,
|
|
2033
|
-
|
|
2033
|
+
h,
|
|
2034
2034
|
l,
|
|
2035
2035
|
g
|
|
2036
2036
|
]), Ys(Ve), i && C(Re) && g) {
|
|
2037
2037
|
if (!Rr && lt)
|
|
2038
2038
|
throw new Error("Fallback data is required when using suspense in SSR.");
|
|
2039
2039
|
U.current = e, k.current = t, y.current = !1;
|
|
2040
|
-
const
|
|
2041
|
-
if (!C(
|
|
2042
|
-
const
|
|
2043
|
-
Or(
|
|
2040
|
+
const N = x[g];
|
|
2041
|
+
if (!C(N)) {
|
|
2042
|
+
const F = gt(N);
|
|
2043
|
+
Or(F);
|
|
2044
2044
|
}
|
|
2045
2045
|
if (C(Ne)) {
|
|
2046
|
-
const
|
|
2047
|
-
C(Ve) || (
|
|
2046
|
+
const F = pe(yn);
|
|
2047
|
+
C(Ve) || (F.status = "fulfilled", F.value = !0), Or(F);
|
|
2048
2048
|
} else
|
|
2049
2049
|
throw Ne;
|
|
2050
2050
|
}
|
|
@@ -2085,11 +2085,11 @@ const Ao = { type: "error", data: "parser error" }, ko = typeof Blob == "functio
|
|
|
2085
2085
|
for (let n = 0; n < Cr.length; n++)
|
|
2086
2086
|
ut[Cr.charCodeAt(n)] = n;
|
|
2087
2087
|
const No = (n) => {
|
|
2088
|
-
let e = n.length * 0.75, t = n.length, r, s = 0, i, o, c,
|
|
2088
|
+
let e = n.length * 0.75, t = n.length, r, s = 0, i, o, c, f;
|
|
2089
2089
|
n[n.length - 1] === "=" && (e--, n[n.length - 2] === "=" && e--);
|
|
2090
|
-
const a = new ArrayBuffer(e),
|
|
2090
|
+
const a = new ArrayBuffer(e), h = new Uint8Array(a);
|
|
2091
2091
|
for (r = 0; r < t; r += 4)
|
|
2092
|
-
i = ut[n.charCodeAt(r)], o = ut[n.charCodeAt(r + 1)], c = ut[n.charCodeAt(r + 2)],
|
|
2092
|
+
i = ut[n.charCodeAt(r)], o = ut[n.charCodeAt(r + 1)], c = ut[n.charCodeAt(r + 2)], f = ut[n.charCodeAt(r + 3)], h[s++] = i << 2 | o >> 4, h[s++] = (o & 15) << 4 | c >> 2, h[s++] = (c & 3) << 6 | f & 63;
|
|
2093
2093
|
return a;
|
|
2094
2094
|
}, Po = typeof ArrayBuffer == "function", hs = (n, e) => {
|
|
2095
2095
|
if (typeof n != "string")
|
|
@@ -2618,34 +2618,34 @@ class Ce extends K {
|
|
|
2618
2618
|
if (this.upgrading = !0, this.emitReserved("upgrading", t), !t)
|
|
2619
2619
|
return;
|
|
2620
2620
|
Ce.priorWebsocketSuccess = t.name === "websocket", this.transport.pause(() => {
|
|
2621
|
-
r || this.readyState !== "closed" && (
|
|
2621
|
+
r || this.readyState !== "closed" && (h(), this.setTransport(t), t.send([{ type: "upgrade" }]), this.emitReserved("upgrade", t), t = null, this.upgrading = !1, this.flush());
|
|
2622
2622
|
});
|
|
2623
2623
|
} else {
|
|
2624
|
-
const
|
|
2625
|
-
|
|
2624
|
+
const p = new Error("probe error");
|
|
2625
|
+
p.transport = t.name, this.emitReserved("upgradeError", p);
|
|
2626
2626
|
}
|
|
2627
2627
|
}));
|
|
2628
2628
|
};
|
|
2629
2629
|
function i() {
|
|
2630
|
-
r || (r = !0,
|
|
2630
|
+
r || (r = !0, h(), t.close(), t = null);
|
|
2631
2631
|
}
|
|
2632
2632
|
const o = (l) => {
|
|
2633
|
-
const
|
|
2634
|
-
|
|
2633
|
+
const p = new Error("probe error: " + l);
|
|
2634
|
+
p.transport = t.name, i(), this.emitReserved("upgradeError", p);
|
|
2635
2635
|
};
|
|
2636
2636
|
function c() {
|
|
2637
2637
|
o("transport closed");
|
|
2638
2638
|
}
|
|
2639
|
-
function
|
|
2639
|
+
function f() {
|
|
2640
2640
|
o("socket closed");
|
|
2641
2641
|
}
|
|
2642
2642
|
function a(l) {
|
|
2643
2643
|
t && l.name !== t.name && i();
|
|
2644
2644
|
}
|
|
2645
|
-
const
|
|
2646
|
-
t.removeListener("open", s), t.removeListener("error", o), t.removeListener("close", c), this.off("close",
|
|
2645
|
+
const h = () => {
|
|
2646
|
+
t.removeListener("open", s), t.removeListener("error", o), t.removeListener("close", c), this.off("close", f), this.off("upgrading", a);
|
|
2647
2647
|
};
|
|
2648
|
-
t.once("open", s), t.once("error", o), t.once("close", c), this.once("close",
|
|
2648
|
+
t.once("open", s), t.once("error", o), t.once("close", c), this.once("close", f), this.once("upgrading", a), t.open();
|
|
2649
2649
|
}
|
|
2650
2650
|
onOpen() {
|
|
2651
2651
|
if (this.readyState = "open", Ce.priorWebsocketSuccess = this.transport.name === "websocket", this.emitReserved("open"), this.flush(), this.readyState === "open" && this.opts.upgrade && this.transport.pause) {
|
|
@@ -3348,8 +3348,8 @@ const it = {};
|
|
|
3348
3348
|
function Nt(n, e) {
|
|
3349
3349
|
typeof n == "object" && (e = n, n = void 0), e = e || {};
|
|
3350
3350
|
const t = ia(n, e.path || "/socket.io"), r = t.source, s = t.id, i = t.path, o = it[s] && i in it[s].nsps, c = e.forceNew || e["force new connection"] || e.multiplex === !1 || o;
|
|
3351
|
-
let
|
|
3352
|
-
return c ?
|
|
3351
|
+
let f;
|
|
3352
|
+
return c ? f = new An(r, e) : (it[s] || (it[s] = new An(r, e)), f = it[s]), t.query && !e.query && (e.query = t.queryKey), f.socket(t.path, e);
|
|
3353
3353
|
}
|
|
3354
3354
|
Object.assign(Nt, {
|
|
3355
3355
|
Manager: An,
|
|
@@ -3385,15 +3385,15 @@ function _a() {
|
|
|
3385
3385
|
return ot;
|
|
3386
3386
|
Fr = 1;
|
|
3387
3387
|
var n = qe, 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 };
|
|
3388
|
-
function o(c,
|
|
3389
|
-
var
|
|
3390
|
-
a !== void 0 && (
|
|
3391
|
-
for (
|
|
3392
|
-
r.call(
|
|
3388
|
+
function o(c, f, a) {
|
|
3389
|
+
var h, l = {}, p = null, v = null;
|
|
3390
|
+
a !== void 0 && (p = "" + a), f.key !== void 0 && (p = "" + f.key), f.ref !== void 0 && (v = f.ref);
|
|
3391
|
+
for (h in f)
|
|
3392
|
+
r.call(f, h) && !i.hasOwnProperty(h) && (l[h] = f[h]);
|
|
3393
3393
|
if (c && c.defaultProps)
|
|
3394
|
-
for (
|
|
3395
|
-
l[
|
|
3396
|
-
return { $$typeof: e, type: c, key:
|
|
3394
|
+
for (h in f = c.defaultProps, f)
|
|
3395
|
+
l[h] === void 0 && (l[h] = f[h]);
|
|
3396
|
+
return { $$typeof: e, type: c, key: p, ref: v, props: l, _owner: s.current };
|
|
3397
3397
|
}
|
|
3398
3398
|
return ot.Fragment = t, ot.jsx = o, ot.jsxs = o, ot;
|
|
3399
3399
|
}
|
|
@@ -3410,8 +3410,8 @@ var at = {};
|
|
|
3410
3410
|
var Ir;
|
|
3411
3411
|
function ba() {
|
|
3412
3412
|
return Ir || (Ir = 1, process.env.NODE_ENV !== "production" && function() {
|
|
3413
|
-
var n = qe, 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"),
|
|
3414
|
-
function
|
|
3413
|
+
var n = qe, 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"), f = Symbol.for("react.forward_ref"), a = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), l = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), b = Symbol.iterator, w = "@@iterator";
|
|
3414
|
+
function x(u) {
|
|
3415
3415
|
if (u === null || typeof u != "object")
|
|
3416
3416
|
return null;
|
|
3417
3417
|
var d = b && u[b] || u[w];
|
|
@@ -3422,23 +3422,23 @@ function ba() {
|
|
|
3422
3422
|
{
|
|
3423
3423
|
for (var d = arguments.length, m = new Array(d > 1 ? d - 1 : 0), _ = 1; _ < d; _++)
|
|
3424
3424
|
m[_ - 1] = arguments[_];
|
|
3425
|
-
|
|
3425
|
+
L("error", u, m);
|
|
3426
3426
|
}
|
|
3427
3427
|
}
|
|
3428
|
-
function
|
|
3428
|
+
function L(u, d, m) {
|
|
3429
3429
|
{
|
|
3430
3430
|
var _ = g.ReactDebugCurrentFrame, A = _.getStackAddendum();
|
|
3431
3431
|
A !== "" && (d += "%s", m = m.concat([A]));
|
|
3432
|
-
var
|
|
3432
|
+
var I = m.map(function(O) {
|
|
3433
3433
|
return String(O);
|
|
3434
3434
|
});
|
|
3435
|
-
|
|
3435
|
+
I.unshift("Warning: " + d), Function.prototype.apply.call(console[u], console, I);
|
|
3436
3436
|
}
|
|
3437
3437
|
}
|
|
3438
3438
|
var y = !1, V = !1, U = !1, k = !1, E = !1, j;
|
|
3439
3439
|
j = Symbol.for("react.module.reference");
|
|
3440
|
-
function
|
|
3441
|
-
return !!(typeof u == "string" || typeof u == "function" || u === r || u === i || E || u === s || u === a || u ===
|
|
3440
|
+
function D(u) {
|
|
3441
|
+
return !!(typeof u == "string" || typeof u == "function" || u === r || u === i || E || u === s || u === a || u === h || k || u === v || y || V || U || typeof u == "object" && u !== null && (u.$$typeof === p || u.$$typeof === l || u.$$typeof === o || u.$$typeof === c || u.$$typeof === f || u.$$typeof === j || u.getModuleId !== void 0));
|
|
3442
3442
|
}
|
|
3443
3443
|
function X(u, d, m) {
|
|
3444
3444
|
var _ = u.displayName;
|
|
@@ -3468,7 +3468,7 @@ function ba() {
|
|
|
3468
3468
|
return "StrictMode";
|
|
3469
3469
|
case a:
|
|
3470
3470
|
return "Suspense";
|
|
3471
|
-
case
|
|
3471
|
+
case h:
|
|
3472
3472
|
return "SuspenseList";
|
|
3473
3473
|
}
|
|
3474
3474
|
if (typeof u == "object")
|
|
@@ -3479,15 +3479,15 @@ function ba() {
|
|
|
3479
3479
|
case o:
|
|
3480
3480
|
var m = u;
|
|
3481
3481
|
return ne(m._context) + ".Provider";
|
|
3482
|
-
case
|
|
3482
|
+
case f:
|
|
3483
3483
|
return X(u, u.render, "ForwardRef");
|
|
3484
3484
|
case l:
|
|
3485
3485
|
var _ = u.displayName || null;
|
|
3486
3486
|
return _ !== null ? _ : Z(u.type) || "Memo";
|
|
3487
|
-
case
|
|
3488
|
-
var A = u,
|
|
3487
|
+
case p: {
|
|
3488
|
+
var A = u, I = A._payload, O = A._init;
|
|
3489
3489
|
try {
|
|
3490
|
-
return Z(O(
|
|
3490
|
+
return Z(O(I));
|
|
3491
3491
|
} catch {
|
|
3492
3492
|
return null;
|
|
3493
3493
|
}
|
|
@@ -3576,7 +3576,7 @@ function ba() {
|
|
|
3576
3576
|
var gt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
3577
3577
|
pe = new gt();
|
|
3578
3578
|
}
|
|
3579
|
-
function
|
|
3579
|
+
function N(u, d) {
|
|
3580
3580
|
if (!u || tt)
|
|
3581
3581
|
return "";
|
|
3582
3582
|
{
|
|
@@ -3588,8 +3588,8 @@ function ba() {
|
|
|
3588
3588
|
tt = !0;
|
|
3589
3589
|
var A = Error.prepareStackTrace;
|
|
3590
3590
|
Error.prepareStackTrace = void 0;
|
|
3591
|
-
var
|
|
3592
|
-
|
|
3591
|
+
var I;
|
|
3592
|
+
I = je.current, je.current = null, yt();
|
|
3593
3593
|
try {
|
|
3594
3594
|
if (d) {
|
|
3595
3595
|
var O = function() {
|
|
@@ -3642,13 +3642,13 @@ function ba() {
|
|
|
3642
3642
|
}
|
|
3643
3643
|
}
|
|
3644
3644
|
} finally {
|
|
3645
|
-
tt = !1, je.current =
|
|
3645
|
+
tt = !1, je.current = I, Ve(), Error.prepareStackTrace = A;
|
|
3646
3646
|
}
|
|
3647
3647
|
var Je = u ? u.displayName || u.name : "", zn = Je ? Me(Je) : "";
|
|
3648
3648
|
return typeof u == "function" && pe.set(u, zn), zn;
|
|
3649
3649
|
}
|
|
3650
|
-
function
|
|
3651
|
-
return
|
|
3650
|
+
function F(u, d, m) {
|
|
3651
|
+
return N(u, !1);
|
|
3652
3652
|
}
|
|
3653
3653
|
function G(u) {
|
|
3654
3654
|
var d = u.prototype;
|
|
@@ -3658,25 +3658,25 @@ function ba() {
|
|
|
3658
3658
|
if (u == null)
|
|
3659
3659
|
return "";
|
|
3660
3660
|
if (typeof u == "function")
|
|
3661
|
-
return
|
|
3661
|
+
return N(u, G(u));
|
|
3662
3662
|
if (typeof u == "string")
|
|
3663
3663
|
return Me(u);
|
|
3664
3664
|
switch (u) {
|
|
3665
3665
|
case a:
|
|
3666
3666
|
return Me("Suspense");
|
|
3667
|
-
case
|
|
3667
|
+
case h:
|
|
3668
3668
|
return Me("SuspenseList");
|
|
3669
3669
|
}
|
|
3670
3670
|
if (typeof u == "object")
|
|
3671
3671
|
switch (u.$$typeof) {
|
|
3672
|
-
case
|
|
3673
|
-
return
|
|
3672
|
+
case f:
|
|
3673
|
+
return F(u.render);
|
|
3674
3674
|
case l:
|
|
3675
3675
|
return q(u.type, d, m);
|
|
3676
|
-
case
|
|
3677
|
-
var _ = u, A = _._payload,
|
|
3676
|
+
case p: {
|
|
3677
|
+
var _ = u, A = _._payload, I = _._init;
|
|
3678
3678
|
try {
|
|
3679
|
-
return q(
|
|
3679
|
+
return q(I(A), d, m);
|
|
3680
3680
|
} catch {
|
|
3681
3681
|
}
|
|
3682
3682
|
}
|
|
@@ -3693,9 +3693,9 @@ function ba() {
|
|
|
3693
3693
|
}
|
|
3694
3694
|
function he(u, d, m, _, A) {
|
|
3695
3695
|
{
|
|
3696
|
-
var
|
|
3696
|
+
var I = Function.call.bind(re);
|
|
3697
3697
|
for (var O in u)
|
|
3698
|
-
if (
|
|
3698
|
+
if (I(u, O)) {
|
|
3699
3699
|
var R = void 0;
|
|
3700
3700
|
try {
|
|
3701
3701
|
if (typeof u[O] != "function") {
|
|
@@ -3785,14 +3785,14 @@ function ba() {
|
|
|
3785
3785
|
});
|
|
3786
3786
|
}
|
|
3787
3787
|
}
|
|
3788
|
-
var Ns = function(u, d, m, _, A,
|
|
3788
|
+
var Ns = function(u, d, m, _, A, I, O) {
|
|
3789
3789
|
var R = {
|
|
3790
3790
|
$$typeof: e,
|
|
3791
3791
|
type: u,
|
|
3792
3792
|
key: d,
|
|
3793
3793
|
ref: m,
|
|
3794
3794
|
props: O,
|
|
3795
|
-
_owner:
|
|
3795
|
+
_owner: I
|
|
3796
3796
|
};
|
|
3797
3797
|
return R._store = {}, Object.defineProperty(R._store, "validated", {
|
|
3798
3798
|
configurable: !1,
|
|
@@ -3813,14 +3813,14 @@ function ba() {
|
|
|
3813
3813
|
};
|
|
3814
3814
|
function Ps(u, d, m, _, A) {
|
|
3815
3815
|
{
|
|
3816
|
-
var
|
|
3816
|
+
var I, O = {}, R = null, se = null;
|
|
3817
3817
|
m !== void 0 && (He(m), R = "" + m), As(d) && (He(d.key), R = "" + d.key), Cs(d) && (se = d.ref, ks(d, A));
|
|
3818
|
-
for (
|
|
3819
|
-
re.call(d,
|
|
3818
|
+
for (I in d)
|
|
3819
|
+
re.call(d, I) && !nt.hasOwnProperty(I) && (O[I] = d[I]);
|
|
3820
3820
|
if (u && u.defaultProps) {
|
|
3821
3821
|
var W = u.defaultProps;
|
|
3822
|
-
for (
|
|
3823
|
-
O[
|
|
3822
|
+
for (I in W)
|
|
3823
|
+
O[I] === void 0 && (O[I] = W[I]);
|
|
3824
3824
|
}
|
|
3825
3825
|
if (R || se) {
|
|
3826
3826
|
var J = typeof u == "function" ? u.displayName || u.name || "Unknown" : u;
|
|
@@ -3903,9 +3903,9 @@ Check the top-level render call using <` + m + ">.");
|
|
|
3903
3903
|
else if (Ht(u))
|
|
3904
3904
|
u._store && (u._store.validated = !0);
|
|
3905
3905
|
else if (u) {
|
|
3906
|
-
var A =
|
|
3906
|
+
var A = x(u);
|
|
3907
3907
|
if (typeof A == "function" && A !== u.entries)
|
|
3908
|
-
for (var
|
|
3908
|
+
for (var I = A.call(u), O; !(O = I.next()).done; )
|
|
3909
3909
|
Ht(O.value) && Hn(O.value, d);
|
|
3910
3910
|
}
|
|
3911
3911
|
}
|
|
@@ -3918,7 +3918,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
3918
3918
|
var m;
|
|
3919
3919
|
if (typeof d == "function")
|
|
3920
3920
|
m = d.propTypes;
|
|
3921
|
-
else if (typeof d == "object" && (d.$$typeof ===
|
|
3921
|
+
else if (typeof d == "object" && (d.$$typeof === f || d.$$typeof === l))
|
|
3922
3922
|
m = d.propTypes;
|
|
3923
3923
|
else
|
|
3924
3924
|
return;
|
|
@@ -3945,9 +3945,9 @@ Check the top-level render call using <` + m + ">.");
|
|
|
3945
3945
|
u.ref !== null && (Ye(u), T("Invalid attribute `ref` supplied to `React.Fragment`."), Ye(null));
|
|
3946
3946
|
}
|
|
3947
3947
|
}
|
|
3948
|
-
function Jn(u, d, m, _, A,
|
|
3948
|
+
function Jn(u, d, m, _, A, I) {
|
|
3949
3949
|
{
|
|
3950
|
-
var O =
|
|
3950
|
+
var O = D(u);
|
|
3951
3951
|
if (!O) {
|
|
3952
3952
|
var R = "";
|
|
3953
3953
|
(u === void 0 || typeof u == "object" && u !== null && Object.keys(u).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
@@ -3956,7 +3956,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
3956
3956
|
var W;
|
|
3957
3957
|
u === null ? W = "null" : We(u) ? W = "array" : u !== void 0 && u.$$typeof === e ? (W = "<" + (Z(u.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : W = typeof u, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, R);
|
|
3958
3958
|
}
|
|
3959
|
-
var J = Ps(u, d, m, A,
|
|
3959
|
+
var J = Ps(u, d, m, A, I);
|
|
3960
3960
|
if (J == null)
|
|
3961
3961
|
return J;
|
|
3962
3962
|
if (O) {
|
|
@@ -4016,7 +4016,7 @@ const wa = Ts.exports.jsx, te = Ur(null), xa = ({
|
|
|
4016
4016
|
url: e,
|
|
4017
4017
|
auth: t,
|
|
4018
4018
|
tokenParams: r
|
|
4019
|
-
} = ee(te), [s, i] =
|
|
4019
|
+
} = ee(te), [s, i] = P(), o = M(() => {
|
|
4020
4020
|
const b = document.cookie.split(";").find((w) => w.trim().startsWith("user_id="));
|
|
4021
4021
|
if (b) {
|
|
4022
4022
|
const w = b.split("=")[1];
|
|
@@ -4029,9 +4029,9 @@ const wa = Ts.exports.jsx, te = Ur(null), xa = ({
|
|
|
4029
4029
|
}, []);
|
|
4030
4030
|
const {
|
|
4031
4031
|
data: c,
|
|
4032
|
-
error:
|
|
4032
|
+
error: f,
|
|
4033
4033
|
isLoading: a,
|
|
4034
|
-
isValidating:
|
|
4034
|
+
isValidating: h,
|
|
4035
4035
|
mutate: l
|
|
4036
4036
|
} = vt(() => r && r.useToken || s ? `${e}/api/method/frappe.auth.get_logged_user` : null, () => t.getLoggedInUser(), {
|
|
4037
4037
|
onError: () => {
|
|
@@ -4040,19 +4040,19 @@ const wa = Ts.exports.jsx, te = Ur(null), xa = ({
|
|
|
4040
4040
|
shouldRetryOnError: !1,
|
|
4041
4041
|
revalidateOnFocus: !1,
|
|
4042
4042
|
...n
|
|
4043
|
-
}),
|
|
4043
|
+
}), p = M(async (b, w) => t.loginWithUsernamePassword({
|
|
4044
4044
|
username: b,
|
|
4045
4045
|
password: w
|
|
4046
|
-
}).then((
|
|
4046
|
+
}).then((x) => {
|
|
4047
4047
|
o();
|
|
4048
|
-
}), []),
|
|
4048
|
+
}), []), v = M(async () => t.logout().then(() => l(null)).then(() => i(null)), []);
|
|
4049
4049
|
return {
|
|
4050
4050
|
isLoading: s === void 0 || a,
|
|
4051
4051
|
currentUser: c,
|
|
4052
|
-
isValidating:
|
|
4053
|
-
error:
|
|
4054
|
-
login:
|
|
4055
|
-
logout:
|
|
4052
|
+
isValidating: h,
|
|
4053
|
+
error: f,
|
|
4054
|
+
login: p,
|
|
4055
|
+
logout: v,
|
|
4056
4056
|
updateCurrentUser: l,
|
|
4057
4057
|
getUserCookie: o
|
|
4058
4058
|
};
|
|
@@ -4086,11 +4086,11 @@ const wa = Ts.exports.jsx, te = Ur(null), xa = ({
|
|
|
4086
4086
|
}, La = () => {
|
|
4087
4087
|
const {
|
|
4088
4088
|
db: n
|
|
4089
|
-
} = ee(te), [e, t] =
|
|
4089
|
+
} = ee(te), [e, t] = P(!1), [r, s] = P(null), [i, o] = P(!1), c = M(() => {
|
|
4090
4090
|
t(!1), s(null), o(!1);
|
|
4091
4091
|
}, []);
|
|
4092
4092
|
return {
|
|
4093
|
-
createDoc: M(async (a,
|
|
4093
|
+
createDoc: M(async (a, h) => (s(null), o(!1), t(!0), n.createDoc(a, h).then((l) => (t(!1), o(!0), l)).catch((l) => {
|
|
4094
4094
|
throw t(!1), o(!1), s(l), l;
|
|
4095
4095
|
})), []),
|
|
4096
4096
|
loading: e,
|
|
@@ -4101,12 +4101,12 @@ const wa = Ts.exports.jsx, te = Ur(null), xa = ({
|
|
|
4101
4101
|
}, Da = () => {
|
|
4102
4102
|
const {
|
|
4103
4103
|
db: n
|
|
4104
|
-
} = ee(te), [e, t] =
|
|
4104
|
+
} = ee(te), [e, t] = P(!1), [r, s] = P(null), [i, o] = P(!1), c = M(() => {
|
|
4105
4105
|
t(!1), s(null), o(!1);
|
|
4106
4106
|
}, []);
|
|
4107
4107
|
return {
|
|
4108
|
-
updateDoc: M(async (a,
|
|
4109
|
-
throw t(!1), o(!1), s(
|
|
4108
|
+
updateDoc: M(async (a, h, l) => (s(null), o(!1), t(!0), n.updateDoc(a, h, l).then((p) => (t(!1), o(!0), p)).catch((p) => {
|
|
4109
|
+
throw t(!1), o(!1), s(p), p;
|
|
4110
4110
|
})), []),
|
|
4111
4111
|
loading: e,
|
|
4112
4112
|
error: r,
|
|
@@ -4116,11 +4116,11 @@ const wa = Ts.exports.jsx, te = Ur(null), xa = ({
|
|
|
4116
4116
|
}, Na = () => {
|
|
4117
4117
|
const {
|
|
4118
4118
|
db: n
|
|
4119
|
-
} = ee(te), [e, t] =
|
|
4119
|
+
} = ee(te), [e, t] = P(!1), [r, s] = P(null), [i, o] = P(!1), c = M(() => {
|
|
4120
4120
|
t(!1), s(null), o(!1);
|
|
4121
4121
|
}, []);
|
|
4122
4122
|
return {
|
|
4123
|
-
deleteDoc: M(async (a,
|
|
4123
|
+
deleteDoc: M(async (a, h) => (s(null), o(!1), t(!0), n.deleteDoc(a, h).then((l) => (t(!1), o(!0), l)).catch((l) => {
|
|
4124
4124
|
throw t(!1), o(!1), s(l), l;
|
|
4125
4125
|
})), []),
|
|
4126
4126
|
loading: e,
|
|
@@ -4142,7 +4142,7 @@ const Pa = (n, e, t = !1, r = !1, s, i) => {
|
|
|
4142
4142
|
} = ee(te);
|
|
4143
4143
|
return {
|
|
4144
4144
|
...vt(s === void 0 ? (() => {
|
|
4145
|
-
const
|
|
4145
|
+
const h = xs(t ? {
|
|
4146
4146
|
doctype: n,
|
|
4147
4147
|
filters: e != null ? e : [],
|
|
4148
4148
|
cache: t,
|
|
@@ -4152,7 +4152,7 @@ const Pa = (n, e, t = !1, r = !1, s, i) => {
|
|
|
4152
4152
|
filters: e != null ? e : [],
|
|
4153
4153
|
debug: r
|
|
4154
4154
|
});
|
|
4155
|
-
return `${o}/api/method/frappe.client.get_count?${
|
|
4155
|
+
return `${o}/api/method/frappe.client.get_count?${h}`;
|
|
4156
4156
|
})() : s, () => c.getCount(n, e, t, r), i)
|
|
4157
4157
|
};
|
|
4158
4158
|
}, Ra = (n, e, t, r) => {
|
|
@@ -4165,58 +4165,58 @@ const Pa = (n, e, t = !1, r = !1, s, i) => {
|
|
|
4165
4165
|
}, Ba = (n) => {
|
|
4166
4166
|
const {
|
|
4167
4167
|
call: e
|
|
4168
|
-
} = ee(te), [t, r] =
|
|
4168
|
+
} = ee(te), [t, r] = P(null), [s, i] = P(!1), [o, c] = P(null), [f, a] = P(!1), h = M(() => {
|
|
4169
4169
|
r(null), i(!1), c(null), a(!1);
|
|
4170
4170
|
}, []);
|
|
4171
4171
|
return {
|
|
4172
|
-
call: M(async (
|
|
4173
|
-
throw i(!1), a(!1), c(
|
|
4172
|
+
call: M(async (p) => (c(null), a(!1), i(!0), r(null), e.post(n, p).then((v) => (r(v), i(!1), a(!0), v)).catch((v) => {
|
|
4173
|
+
throw i(!1), a(!1), c(v), v;
|
|
4174
4174
|
})), []),
|
|
4175
4175
|
result: t,
|
|
4176
4176
|
loading: s,
|
|
4177
4177
|
error: o,
|
|
4178
|
-
reset:
|
|
4179
|
-
isCompleted:
|
|
4178
|
+
reset: h,
|
|
4179
|
+
isCompleted: f
|
|
4180
4180
|
};
|
|
4181
4181
|
}, Fa = (n) => {
|
|
4182
4182
|
const {
|
|
4183
4183
|
call: e
|
|
4184
|
-
} = ee(te), [t, r] =
|
|
4184
|
+
} = ee(te), [t, r] = P(null), [s, i] = P(!1), [o, c] = P(null), [f, a] = P(!1), h = M(() => {
|
|
4185
4185
|
r(null), i(!1), c(null), a(!1);
|
|
4186
4186
|
}, []);
|
|
4187
4187
|
return {
|
|
4188
|
-
call: M(async (
|
|
4189
|
-
throw i(!1), a(!1), c(
|
|
4188
|
+
call: M(async (p) => (c(null), a(!1), i(!0), r(null), e.put(n, p).then((v) => (r(v), i(!1), a(!0), v)).catch((v) => {
|
|
4189
|
+
throw i(!1), a(!1), c(v), v;
|
|
4190
4190
|
})), []),
|
|
4191
4191
|
result: t,
|
|
4192
4192
|
loading: s,
|
|
4193
4193
|
error: o,
|
|
4194
|
-
reset:
|
|
4195
|
-
isCompleted:
|
|
4194
|
+
reset: h,
|
|
4195
|
+
isCompleted: f
|
|
4196
4196
|
};
|
|
4197
4197
|
}, Ia = (n) => {
|
|
4198
4198
|
const {
|
|
4199
4199
|
call: e
|
|
4200
|
-
} = ee(te), [t, r] =
|
|
4200
|
+
} = ee(te), [t, r] = P(null), [s, i] = P(!1), [o, c] = P(null), [f, a] = P(!1), h = M(() => {
|
|
4201
4201
|
r(null), i(!1), c(null), a(!1);
|
|
4202
4202
|
}, []);
|
|
4203
4203
|
return {
|
|
4204
|
-
call: M(async (
|
|
4205
|
-
throw i(!1), a(!1), c(
|
|
4204
|
+
call: M(async (p) => (c(null), a(!1), i(!0), r(null), e.delete(n, p).then((v) => (r(v), i(!1), a(!0), v)).catch((v) => {
|
|
4205
|
+
throw i(!1), a(!1), c(v), v;
|
|
4206
4206
|
})), []),
|
|
4207
4207
|
result: t,
|
|
4208
4208
|
loading: s,
|
|
4209
4209
|
error: o,
|
|
4210
|
-
reset:
|
|
4211
|
-
isCompleted:
|
|
4210
|
+
reset: h,
|
|
4211
|
+
isCompleted: f
|
|
4212
4212
|
};
|
|
4213
4213
|
}, Ua = () => {
|
|
4214
4214
|
const {
|
|
4215
4215
|
file: n
|
|
4216
|
-
} = ee(te), [e, t] =
|
|
4217
|
-
throw console.error(
|
|
4218
|
-
})), []),
|
|
4219
|
-
t(0), s(!1), o(null),
|
|
4216
|
+
} = ee(te), [e, t] = P(0), [r, s] = P(!1), [i, o] = P(null), [c, f] = P(!1), a = M(async (l, p) => (h(), s(!0), n.uploadFile(l, p, (v, b) => t(Math.round(v / b * 100))).then((v) => (f(!0), t(100), s(!1), v.data.message)).catch((v) => {
|
|
4217
|
+
throw console.error(v), o(v), s(!1), v;
|
|
4218
|
+
})), []), h = M(() => {
|
|
4219
|
+
t(0), s(!1), o(null), f(!1);
|
|
4220
4220
|
}, []);
|
|
4221
4221
|
return {
|
|
4222
4222
|
upload: a,
|
|
@@ -4224,7 +4224,7 @@ const Pa = (n, e, t = !1, r = !1, s, i) => {
|
|
|
4224
4224
|
loading: r,
|
|
4225
4225
|
isCompleted: c,
|
|
4226
4226
|
error: i,
|
|
4227
|
-
reset:
|
|
4227
|
+
reset: h
|
|
4228
4228
|
};
|
|
4229
4229
|
}, qa = (n, e, t = [], r = 20, s = 250) => {
|
|
4230
4230
|
const i = Sa(e, s);
|
|
@@ -4235,7 +4235,7 @@ const Pa = (n, e, t = !1, r = !1, s, i) => {
|
|
|
4235
4235
|
filters: JSON.stringify(t != null ? t : [])
|
|
4236
4236
|
});
|
|
4237
4237
|
}, Sa = (n, e) => {
|
|
4238
|
-
const [t, r] =
|
|
4238
|
+
const [t, r] = P(n);
|
|
4239
4239
|
return Xe(() => {
|
|
4240
4240
|
const s = setTimeout(() => {
|
|
4241
4241
|
r(n);
|
|
@@ -4257,21 +4257,21 @@ const Pa = (n, e, t = !1, r = !1, s, i) => {
|
|
|
4257
4257
|
}, Va = (n, e, t = !0, r) => {
|
|
4258
4258
|
const {
|
|
4259
4259
|
socket: s
|
|
4260
|
-
} = ee(te), [i, o] =
|
|
4260
|
+
} = ee(te), [i, o] = P([]);
|
|
4261
4261
|
Xe(() => (s.emit("doc_subscribe", n, e), t && s.emit("doc_open", n, e), () => {
|
|
4262
4262
|
s.emit("doc_unsubscribe", n, e), t && s.emit("doc_close", n, e);
|
|
4263
4263
|
}), [n, e, t]), kn("doc_update", r);
|
|
4264
4264
|
const c = M(() => {
|
|
4265
4265
|
s.emit("doc_open", n, e);
|
|
4266
|
-
}, [n, e]),
|
|
4266
|
+
}, [n, e]), f = M(() => {
|
|
4267
4267
|
s.emit("doc_close", n, e);
|
|
4268
|
-
}, [n, e]), a = M((
|
|
4269
|
-
|
|
4268
|
+
}, [n, e]), a = M((h) => {
|
|
4269
|
+
h.doctype === n && h.docname === e && o(h.users);
|
|
4270
4270
|
}, [n, e]);
|
|
4271
4271
|
return kn("doc_viewers", a), {
|
|
4272
4272
|
viewers: i,
|
|
4273
4273
|
emitDocOpen: c,
|
|
4274
|
-
emitDocClose:
|
|
4274
|
+
emitDocClose: f
|
|
4275
4275
|
};
|
|
4276
4276
|
}, ja = (n, e) => {
|
|
4277
4277
|
const {
|