xmirror-components 1.0.7 → 1.0.9
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/build/dist/index.cjs +31 -0
- package/build/dist/index.mjs +1382 -0
- package/build/es/components/IconButton/index.js +1 -1
- package/build/es/hooks/useRequest/index.js +1 -1
- package/build/es/index.d.ts +3 -1
- package/build/es/index.js +3 -1
- package/build/lib/components/IconButton/index.js +1 -1
- package/build/lib/hooks/useRequest/index.js +1 -1
- package/build/lib/index.js +7 -3
- package/build/package.json +2 -1
- package/package.json +2 -1
- package/build/dist/xmirror-components.css +0 -1
- package/build/dist/xmirror-components.js +0 -1563
- package/build/dist/xmirror-components.umd.cjs +0 -35
|
@@ -0,0 +1,1382 @@
|
|
|
1
|
+
import { message as Nr, notification as kr, Modal as qr, App as Mr, Checkbox as Wr, Switch as $r } from "antd";
|
|
2
|
+
import Fr, { forwardRef as Ir, useRef as _, useMemo as pr, useEffect as X, useState as Lr, useCallback as Yr } from "react";
|
|
3
|
+
let Er = Nr, Gr = kr, Ur = qr;
|
|
4
|
+
function Wt({ children: r }) {
|
|
5
|
+
const e = Mr.useApp();
|
|
6
|
+
return Er = e.message, Ur = e.modal, Gr = e.notification, r;
|
|
7
|
+
}
|
|
8
|
+
var fe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
9
|
+
function Tr(r) {
|
|
10
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
11
|
+
}
|
|
12
|
+
var se = { exports: {} }, re = {};
|
|
13
|
+
/**
|
|
14
|
+
* @license React
|
|
15
|
+
* react-jsx-runtime.production.js
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the MIT license found in the
|
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
var er;
|
|
23
|
+
function Br() {
|
|
24
|
+
if (er) return re;
|
|
25
|
+
er = 1;
|
|
26
|
+
var r = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
27
|
+
function n(a, i, o) {
|
|
28
|
+
var c = null;
|
|
29
|
+
if (o !== void 0 && (c = "" + o), i.key !== void 0 && (c = "" + i.key), "key" in i) {
|
|
30
|
+
o = {};
|
|
31
|
+
for (var f in i)
|
|
32
|
+
f !== "key" && (o[f] = i[f]);
|
|
33
|
+
} else o = i;
|
|
34
|
+
return i = o.ref, {
|
|
35
|
+
$$typeof: r,
|
|
36
|
+
type: a,
|
|
37
|
+
key: c,
|
|
38
|
+
ref: i !== void 0 ? i : null,
|
|
39
|
+
props: o
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return re.Fragment = e, re.jsx = n, re.jsxs = n, re;
|
|
43
|
+
}
|
|
44
|
+
var te = {};
|
|
45
|
+
/**
|
|
46
|
+
* @license React
|
|
47
|
+
* react-jsx-runtime.development.js
|
|
48
|
+
*
|
|
49
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the MIT license found in the
|
|
52
|
+
* LICENSE file in the root directory of this source tree.
|
|
53
|
+
*/
|
|
54
|
+
var rr;
|
|
55
|
+
function Hr() {
|
|
56
|
+
return rr || (rr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
57
|
+
function r(t) {
|
|
58
|
+
if (t == null) return null;
|
|
59
|
+
if (typeof t == "function")
|
|
60
|
+
return t.$$typeof === Pr ? null : t.displayName || t.name || null;
|
|
61
|
+
if (typeof t == "string") return t;
|
|
62
|
+
switch (t) {
|
|
63
|
+
case L:
|
|
64
|
+
return "Fragment";
|
|
65
|
+
case G:
|
|
66
|
+
return "Portal";
|
|
67
|
+
case P:
|
|
68
|
+
return "Profiler";
|
|
69
|
+
case W:
|
|
70
|
+
return "StrictMode";
|
|
71
|
+
case U:
|
|
72
|
+
return "Suspense";
|
|
73
|
+
case T:
|
|
74
|
+
return "SuspenseList";
|
|
75
|
+
}
|
|
76
|
+
if (typeof t == "object")
|
|
77
|
+
switch (typeof t.tag == "number" && console.error(
|
|
78
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
79
|
+
), t.$$typeof) {
|
|
80
|
+
case oe:
|
|
81
|
+
return (t.displayName || "Context") + ".Provider";
|
|
82
|
+
case Z:
|
|
83
|
+
return (t._context.displayName || "Context") + ".Consumer";
|
|
84
|
+
case Q:
|
|
85
|
+
var l = t.render;
|
|
86
|
+
return t = t.displayName, t || (t = l.displayName || l.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
|
|
87
|
+
case C:
|
|
88
|
+
return l = t.displayName || null, l !== null ? l : r(t.type) || "Memo";
|
|
89
|
+
case $:
|
|
90
|
+
l = t._payload, t = t._init;
|
|
91
|
+
try {
|
|
92
|
+
return r(t(l));
|
|
93
|
+
} catch {
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
function e(t) {
|
|
99
|
+
return "" + t;
|
|
100
|
+
}
|
|
101
|
+
function n(t) {
|
|
102
|
+
try {
|
|
103
|
+
e(t);
|
|
104
|
+
var l = !1;
|
|
105
|
+
} catch {
|
|
106
|
+
l = !0;
|
|
107
|
+
}
|
|
108
|
+
if (l) {
|
|
109
|
+
l = console;
|
|
110
|
+
var d = l.error, y = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
111
|
+
return d.call(
|
|
112
|
+
l,
|
|
113
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
114
|
+
y
|
|
115
|
+
), e(t);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
function a() {
|
|
119
|
+
}
|
|
120
|
+
function i() {
|
|
121
|
+
if (K === 0) {
|
|
122
|
+
Ge = console.log, Ue = console.info, Be = console.warn, He = console.error, ze = console.group, De = console.groupCollapsed, Ve = console.groupEnd;
|
|
123
|
+
var t = {
|
|
124
|
+
configurable: !0,
|
|
125
|
+
enumerable: !0,
|
|
126
|
+
value: a,
|
|
127
|
+
writable: !0
|
|
128
|
+
};
|
|
129
|
+
Object.defineProperties(console, {
|
|
130
|
+
info: t,
|
|
131
|
+
log: t,
|
|
132
|
+
warn: t,
|
|
133
|
+
error: t,
|
|
134
|
+
group: t,
|
|
135
|
+
groupCollapsed: t,
|
|
136
|
+
groupEnd: t
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
K++;
|
|
140
|
+
}
|
|
141
|
+
function o() {
|
|
142
|
+
if (K--, K === 0) {
|
|
143
|
+
var t = { configurable: !0, enumerable: !0, writable: !0 };
|
|
144
|
+
Object.defineProperties(console, {
|
|
145
|
+
log: H({}, t, { value: Ge }),
|
|
146
|
+
info: H({}, t, { value: Ue }),
|
|
147
|
+
warn: H({}, t, { value: Be }),
|
|
148
|
+
error: H({}, t, { value: He }),
|
|
149
|
+
group: H({}, t, { value: ze }),
|
|
150
|
+
groupCollapsed: H({}, t, { value: De }),
|
|
151
|
+
groupEnd: H({}, t, { value: Ve })
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
0 > K && console.error(
|
|
155
|
+
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
function c(t) {
|
|
159
|
+
if (he === void 0)
|
|
160
|
+
try {
|
|
161
|
+
throw Error();
|
|
162
|
+
} catch (d) {
|
|
163
|
+
var l = d.stack.trim().match(/\n( *(at )?)/);
|
|
164
|
+
he = l && l[1] || "", Je = -1 < d.stack.indexOf(`
|
|
165
|
+
at`) ? " (<anonymous>)" : -1 < d.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
166
|
+
}
|
|
167
|
+
return `
|
|
168
|
+
` + he + t + Je;
|
|
169
|
+
}
|
|
170
|
+
function f(t, l) {
|
|
171
|
+
if (!t || ye) return "";
|
|
172
|
+
var d = pe.get(t);
|
|
173
|
+
if (d !== void 0) return d;
|
|
174
|
+
ye = !0, d = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
|
|
175
|
+
var y = null;
|
|
176
|
+
y = B.H, B.H = null, i();
|
|
177
|
+
try {
|
|
178
|
+
var j = {
|
|
179
|
+
DetermineComponentFrameRoot: function() {
|
|
180
|
+
try {
|
|
181
|
+
if (l) {
|
|
182
|
+
var Y = function() {
|
|
183
|
+
throw Error();
|
|
184
|
+
};
|
|
185
|
+
if (Object.defineProperty(Y.prototype, "props", {
|
|
186
|
+
set: function() {
|
|
187
|
+
throw Error();
|
|
188
|
+
}
|
|
189
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
190
|
+
try {
|
|
191
|
+
Reflect.construct(Y, []);
|
|
192
|
+
} catch (I) {
|
|
193
|
+
var ce = I;
|
|
194
|
+
}
|
|
195
|
+
Reflect.construct(t, [], Y);
|
|
196
|
+
} else {
|
|
197
|
+
try {
|
|
198
|
+
Y.call();
|
|
199
|
+
} catch (I) {
|
|
200
|
+
ce = I;
|
|
201
|
+
}
|
|
202
|
+
t.call(Y.prototype);
|
|
203
|
+
}
|
|
204
|
+
} else {
|
|
205
|
+
try {
|
|
206
|
+
throw Error();
|
|
207
|
+
} catch (I) {
|
|
208
|
+
ce = I;
|
|
209
|
+
}
|
|
210
|
+
(Y = t()) && typeof Y.catch == "function" && Y.catch(function() {
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
} catch (I) {
|
|
214
|
+
if (I && ce && typeof I.stack == "string")
|
|
215
|
+
return [I.stack, ce.stack];
|
|
216
|
+
}
|
|
217
|
+
return [null, null];
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
j.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
|
|
221
|
+
var w = Object.getOwnPropertyDescriptor(
|
|
222
|
+
j.DetermineComponentFrameRoot,
|
|
223
|
+
"name"
|
|
224
|
+
);
|
|
225
|
+
w && w.configurable && Object.defineProperty(
|
|
226
|
+
j.DetermineComponentFrameRoot,
|
|
227
|
+
"name",
|
|
228
|
+
{ value: "DetermineComponentFrameRoot" }
|
|
229
|
+
);
|
|
230
|
+
var h = j.DetermineComponentFrameRoot(), F = h[0], V = h[1];
|
|
231
|
+
if (F && V) {
|
|
232
|
+
var S = F.split(`
|
|
233
|
+
`), z = V.split(`
|
|
234
|
+
`);
|
|
235
|
+
for (h = w = 0; w < S.length && !S[w].includes(
|
|
236
|
+
"DetermineComponentFrameRoot"
|
|
237
|
+
); )
|
|
238
|
+
w++;
|
|
239
|
+
for (; h < z.length && !z[h].includes(
|
|
240
|
+
"DetermineComponentFrameRoot"
|
|
241
|
+
); )
|
|
242
|
+
h++;
|
|
243
|
+
if (w === S.length || h === z.length)
|
|
244
|
+
for (w = S.length - 1, h = z.length - 1; 1 <= w && 0 <= h && S[w] !== z[h]; )
|
|
245
|
+
h--;
|
|
246
|
+
for (; 1 <= w && 0 <= h; w--, h--)
|
|
247
|
+
if (S[w] !== z[h]) {
|
|
248
|
+
if (w !== 1 || h !== 1)
|
|
249
|
+
do
|
|
250
|
+
if (w--, h--, 0 > h || S[w] !== z[h]) {
|
|
251
|
+
var ee = `
|
|
252
|
+
` + S[w].replace(
|
|
253
|
+
" at new ",
|
|
254
|
+
" at "
|
|
255
|
+
);
|
|
256
|
+
return t.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", t.displayName)), typeof t == "function" && pe.set(t, ee), ee;
|
|
257
|
+
}
|
|
258
|
+
while (1 <= w && 0 <= h);
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
} finally {
|
|
263
|
+
ye = !1, B.H = y, o(), Error.prepareStackTrace = d;
|
|
264
|
+
}
|
|
265
|
+
return S = (S = t ? t.displayName || t.name : "") ? c(S) : "", typeof t == "function" && pe.set(t, S), S;
|
|
266
|
+
}
|
|
267
|
+
function s(t) {
|
|
268
|
+
if (t == null) return "";
|
|
269
|
+
if (typeof t == "function") {
|
|
270
|
+
var l = t.prototype;
|
|
271
|
+
return f(
|
|
272
|
+
t,
|
|
273
|
+
!(!l || !l.isReactComponent)
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
if (typeof t == "string") return c(t);
|
|
277
|
+
switch (t) {
|
|
278
|
+
case U:
|
|
279
|
+
return c("Suspense");
|
|
280
|
+
case T:
|
|
281
|
+
return c("SuspenseList");
|
|
282
|
+
}
|
|
283
|
+
if (typeof t == "object")
|
|
284
|
+
switch (t.$$typeof) {
|
|
285
|
+
case Q:
|
|
286
|
+
return t = f(t.render, !1), t;
|
|
287
|
+
case C:
|
|
288
|
+
return s(t.type);
|
|
289
|
+
case $:
|
|
290
|
+
l = t._payload, t = t._init;
|
|
291
|
+
try {
|
|
292
|
+
return s(t(l));
|
|
293
|
+
} catch {
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
return "";
|
|
297
|
+
}
|
|
298
|
+
function u() {
|
|
299
|
+
var t = B.A;
|
|
300
|
+
return t === null ? null : t.getOwner();
|
|
301
|
+
}
|
|
302
|
+
function m(t) {
|
|
303
|
+
if (Ye.call(t, "key")) {
|
|
304
|
+
var l = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
305
|
+
if (l && l.isReactWarning) return !1;
|
|
306
|
+
}
|
|
307
|
+
return t.key !== void 0;
|
|
308
|
+
}
|
|
309
|
+
function v(t, l) {
|
|
310
|
+
function d() {
|
|
311
|
+
Xe || (Xe = !0, console.error(
|
|
312
|
+
"%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://react.dev/link/special-props)",
|
|
313
|
+
l
|
|
314
|
+
));
|
|
315
|
+
}
|
|
316
|
+
d.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
317
|
+
get: d,
|
|
318
|
+
configurable: !0
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
function p() {
|
|
322
|
+
var t = r(this.type);
|
|
323
|
+
return Ze[t] || (Ze[t] = !0, console.error(
|
|
324
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
325
|
+
)), t = this.props.ref, t !== void 0 ? t : null;
|
|
326
|
+
}
|
|
327
|
+
function g(t, l, d, y, j, w) {
|
|
328
|
+
return d = w.ref, t = {
|
|
329
|
+
$$typeof: k,
|
|
330
|
+
type: t,
|
|
331
|
+
key: l,
|
|
332
|
+
props: w,
|
|
333
|
+
_owner: j
|
|
334
|
+
}, (d !== void 0 ? d : null) !== null ? Object.defineProperty(t, "ref", {
|
|
335
|
+
enumerable: !1,
|
|
336
|
+
get: p
|
|
337
|
+
}) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
|
|
338
|
+
configurable: !1,
|
|
339
|
+
enumerable: !1,
|
|
340
|
+
writable: !0,
|
|
341
|
+
value: 0
|
|
342
|
+
}), Object.defineProperty(t, "_debugInfo", {
|
|
343
|
+
configurable: !1,
|
|
344
|
+
enumerable: !1,
|
|
345
|
+
writable: !0,
|
|
346
|
+
value: null
|
|
347
|
+
}), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
|
|
348
|
+
}
|
|
349
|
+
function b(t, l, d, y, j, w) {
|
|
350
|
+
if (typeof t == "string" || typeof t == "function" || t === L || t === P || t === W || t === U || t === T || t === ue || typeof t == "object" && t !== null && (t.$$typeof === $ || t.$$typeof === C || t.$$typeof === oe || t.$$typeof === Z || t.$$typeof === Q || t.$$typeof === Cr || t.getModuleId !== void 0)) {
|
|
351
|
+
var h = l.children;
|
|
352
|
+
if (h !== void 0)
|
|
353
|
+
if (y)
|
|
354
|
+
if (ge(h)) {
|
|
355
|
+
for (y = 0; y < h.length; y++)
|
|
356
|
+
E(h[y], t);
|
|
357
|
+
Object.freeze && Object.freeze(h);
|
|
358
|
+
} else
|
|
359
|
+
console.error(
|
|
360
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
361
|
+
);
|
|
362
|
+
else E(h, t);
|
|
363
|
+
} else
|
|
364
|
+
h = "", (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (h += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), t === null ? y = "null" : ge(t) ? y = "array" : t !== void 0 && t.$$typeof === k ? (y = "<" + (r(t.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : y = typeof t, console.error(
|
|
365
|
+
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
|
|
366
|
+
y,
|
|
367
|
+
h
|
|
368
|
+
);
|
|
369
|
+
if (Ye.call(l, "key")) {
|
|
370
|
+
h = r(t);
|
|
371
|
+
var F = Object.keys(l).filter(function(S) {
|
|
372
|
+
return S !== "key";
|
|
373
|
+
});
|
|
374
|
+
y = 0 < F.length ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}", Qe[h + y] || (F = 0 < F.length ? "{" + F.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
375
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
376
|
+
let props = %s;
|
|
377
|
+
<%s {...props} />
|
|
378
|
+
React keys must be passed directly to JSX without using spread:
|
|
379
|
+
let props = %s;
|
|
380
|
+
<%s key={someKey} {...props} />`,
|
|
381
|
+
y,
|
|
382
|
+
h,
|
|
383
|
+
F,
|
|
384
|
+
h
|
|
385
|
+
), Qe[h + y] = !0);
|
|
386
|
+
}
|
|
387
|
+
if (h = null, d !== void 0 && (n(d), h = "" + d), m(l) && (n(l.key), h = "" + l.key), "key" in l) {
|
|
388
|
+
d = {};
|
|
389
|
+
for (var V in l)
|
|
390
|
+
V !== "key" && (d[V] = l[V]);
|
|
391
|
+
} else d = l;
|
|
392
|
+
return h && v(
|
|
393
|
+
d,
|
|
394
|
+
typeof t == "function" ? t.displayName || t.name || "Unknown" : t
|
|
395
|
+
), g(t, h, w, j, u(), d);
|
|
396
|
+
}
|
|
397
|
+
function E(t, l) {
|
|
398
|
+
if (typeof t == "object" && t && t.$$typeof !== Ar) {
|
|
399
|
+
if (ge(t))
|
|
400
|
+
for (var d = 0; d < t.length; d++) {
|
|
401
|
+
var y = t[d];
|
|
402
|
+
x(y) && q(y, l);
|
|
403
|
+
}
|
|
404
|
+
else if (x(t))
|
|
405
|
+
t._store && (t._store.validated = 1);
|
|
406
|
+
else if (t === null || typeof t != "object" ? d = null : (d = Le && t[Le] || t["@@iterator"], d = typeof d == "function" ? d : null), typeof d == "function" && d !== t.entries && (d = d.call(t), d !== t))
|
|
407
|
+
for (; !(t = d.next()).done; )
|
|
408
|
+
x(t.value) && q(t.value, l);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
function x(t) {
|
|
412
|
+
return typeof t == "object" && t !== null && t.$$typeof === k;
|
|
413
|
+
}
|
|
414
|
+
function q(t, l) {
|
|
415
|
+
if (t._store && !t._store.validated && t.key == null && (t._store.validated = 1, l = N(l), !Ke[l])) {
|
|
416
|
+
Ke[l] = !0;
|
|
417
|
+
var d = "";
|
|
418
|
+
t && t._owner != null && t._owner !== u() && (d = null, typeof t._owner.tag == "number" ? d = r(t._owner.type) : typeof t._owner.name == "string" && (d = t._owner.name), d = " It was passed a child from " + d + ".");
|
|
419
|
+
var y = B.getCurrentStack;
|
|
420
|
+
B.getCurrentStack = function() {
|
|
421
|
+
var j = s(t.type);
|
|
422
|
+
return y && (j += y() || ""), j;
|
|
423
|
+
}, console.error(
|
|
424
|
+
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
|
425
|
+
l,
|
|
426
|
+
d
|
|
427
|
+
), B.getCurrentStack = y;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
function N(t) {
|
|
431
|
+
var l = "", d = u();
|
|
432
|
+
return d && (d = r(d.type)) && (l = `
|
|
433
|
+
|
|
434
|
+
Check the render method of \`` + d + "`."), l || (t = r(t)) && (l = `
|
|
435
|
+
|
|
436
|
+
Check the top-level render call using <` + t + ">."), l;
|
|
437
|
+
}
|
|
438
|
+
var M = Fr, k = Symbol.for("react.transitional.element"), G = Symbol.for("react.portal"), L = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), Z = Symbol.for("react.consumer"), oe = Symbol.for("react.context"), Q = Symbol.for("react.forward_ref"), U = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), ue = Symbol.for("react.offscreen"), Le = Symbol.iterator, Pr = Symbol.for("react.client.reference"), B = M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Ye = Object.prototype.hasOwnProperty, H = Object.assign, Cr = Symbol.for("react.client.reference"), ge = Array.isArray, K = 0, Ge, Ue, Be, He, ze, De, Ve;
|
|
439
|
+
a.__reactDisabledLog = !0;
|
|
440
|
+
var he, Je, ye = !1, pe = new (typeof WeakMap == "function" ? WeakMap : Map)(), Ar = Symbol.for("react.client.reference"), Xe, Ze = {}, Qe = {}, Ke = {};
|
|
441
|
+
te.Fragment = L, te.jsx = function(t, l, d, y, j) {
|
|
442
|
+
return b(t, l, d, !1, y, j);
|
|
443
|
+
}, te.jsxs = function(t, l, d, y, j) {
|
|
444
|
+
return b(t, l, d, !0, y, j);
|
|
445
|
+
};
|
|
446
|
+
}()), te;
|
|
447
|
+
}
|
|
448
|
+
var tr;
|
|
449
|
+
function zr() {
|
|
450
|
+
return tr || (tr = 1, process.env.NODE_ENV === "production" ? se.exports = Br() : se.exports = Hr()), se.exports;
|
|
451
|
+
}
|
|
452
|
+
var ne = zr();
|
|
453
|
+
const $t = Ir(
|
|
454
|
+
({ type: r = "", className: e = "", symbol: n = !1, ...a }, i) => n ? /* @__PURE__ */ ne.jsx(
|
|
455
|
+
"svg",
|
|
456
|
+
{
|
|
457
|
+
className: `iconfont-symbol ${r} ${e}`,
|
|
458
|
+
"aria-hidden": "true",
|
|
459
|
+
ref: i,
|
|
460
|
+
...a,
|
|
461
|
+
children: /* @__PURE__ */ ne.jsx("use", { xlinkHref: `#${r}` })
|
|
462
|
+
}
|
|
463
|
+
) : /* @__PURE__ */ ne.jsx(
|
|
464
|
+
"i",
|
|
465
|
+
{
|
|
466
|
+
className: `iconfont ${r} ${e}`,
|
|
467
|
+
ref: i,
|
|
468
|
+
...a
|
|
469
|
+
}
|
|
470
|
+
)
|
|
471
|
+
), Ft = ({
|
|
472
|
+
checked: r,
|
|
473
|
+
onChange: e,
|
|
474
|
+
trueValue: n = !0,
|
|
475
|
+
falseValue: a = !1,
|
|
476
|
+
trueLabel: i = "",
|
|
477
|
+
falseLabel: o = "",
|
|
478
|
+
children: c,
|
|
479
|
+
...f
|
|
480
|
+
}) => {
|
|
481
|
+
const s = r === n, u = (m) => {
|
|
482
|
+
e == null || e(m.target.checked ? n : a, m);
|
|
483
|
+
};
|
|
484
|
+
return /* @__PURE__ */ ne.jsx(
|
|
485
|
+
Wr,
|
|
486
|
+
{
|
|
487
|
+
checked: s,
|
|
488
|
+
onChange: u,
|
|
489
|
+
...f,
|
|
490
|
+
children: c || (s ? i : o)
|
|
491
|
+
}
|
|
492
|
+
);
|
|
493
|
+
}, It = ({
|
|
494
|
+
checked: r,
|
|
495
|
+
onChange: e,
|
|
496
|
+
trueValue: n = !0,
|
|
497
|
+
falseValue: a = !1,
|
|
498
|
+
...i
|
|
499
|
+
}) => {
|
|
500
|
+
const o = r === n, c = (f, s) => {
|
|
501
|
+
e == null || e(f ? n : a, s);
|
|
502
|
+
};
|
|
503
|
+
return /* @__PURE__ */ ne.jsx(
|
|
504
|
+
$r,
|
|
505
|
+
{
|
|
506
|
+
checked: o,
|
|
507
|
+
onChange: c,
|
|
508
|
+
...i
|
|
509
|
+
}
|
|
510
|
+
);
|
|
511
|
+
};
|
|
512
|
+
var Dr = function(r) {
|
|
513
|
+
return function(e, n) {
|
|
514
|
+
var a = _(!1);
|
|
515
|
+
r(function() {
|
|
516
|
+
return function() {
|
|
517
|
+
a.current = !1;
|
|
518
|
+
};
|
|
519
|
+
}, []), r(function() {
|
|
520
|
+
if (!a.current)
|
|
521
|
+
a.current = !0;
|
|
522
|
+
else
|
|
523
|
+
return e();
|
|
524
|
+
}, n);
|
|
525
|
+
};
|
|
526
|
+
}, A = function() {
|
|
527
|
+
return A = Object.assign || function(e) {
|
|
528
|
+
for (var n, a = 1, i = arguments.length; a < i; a++) {
|
|
529
|
+
n = arguments[a];
|
|
530
|
+
for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
|
|
531
|
+
}
|
|
532
|
+
return e;
|
|
533
|
+
}, A.apply(this, arguments);
|
|
534
|
+
};
|
|
535
|
+
function wr(r, e) {
|
|
536
|
+
var n = {};
|
|
537
|
+
for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && e.indexOf(a) < 0 && (n[a] = r[a]);
|
|
538
|
+
if (r != null && typeof Object.getOwnPropertySymbols == "function")
|
|
539
|
+
for (var i = 0, a = Object.getOwnPropertySymbols(r); i < a.length; i++)
|
|
540
|
+
e.indexOf(a[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, a[i]) && (n[a[i]] = r[a[i]]);
|
|
541
|
+
return n;
|
|
542
|
+
}
|
|
543
|
+
function Vr(r, e, n, a) {
|
|
544
|
+
function i(o) {
|
|
545
|
+
return o instanceof n ? o : new n(function(c) {
|
|
546
|
+
c(o);
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
return new (n || (n = Promise))(function(o, c) {
|
|
550
|
+
function f(m) {
|
|
551
|
+
try {
|
|
552
|
+
u(a.next(m));
|
|
553
|
+
} catch (v) {
|
|
554
|
+
c(v);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
function s(m) {
|
|
558
|
+
try {
|
|
559
|
+
u(a.throw(m));
|
|
560
|
+
} catch (v) {
|
|
561
|
+
c(v);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
function u(m) {
|
|
565
|
+
m.done ? o(m.value) : i(m.value).then(f, s);
|
|
566
|
+
}
|
|
567
|
+
u((a = a.apply(r, e || [])).next());
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
function Jr(r, e) {
|
|
571
|
+
var n = { label: 0, sent: function() {
|
|
572
|
+
if (o[0] & 1) throw o[1];
|
|
573
|
+
return o[1];
|
|
574
|
+
}, trys: [], ops: [] }, a, i, o, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
575
|
+
return c.next = f(0), c.throw = f(1), c.return = f(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
576
|
+
return this;
|
|
577
|
+
}), c;
|
|
578
|
+
function f(u) {
|
|
579
|
+
return function(m) {
|
|
580
|
+
return s([u, m]);
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
function s(u) {
|
|
584
|
+
if (a) throw new TypeError("Generator is already executing.");
|
|
585
|
+
for (; c && (c = 0, u[0] && (n = 0)), n; ) try {
|
|
586
|
+
if (a = 1, i && (o = u[0] & 2 ? i.return : u[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, u[1])).done) return o;
|
|
587
|
+
switch (i = 0, o && (u = [u[0] & 2, o.value]), u[0]) {
|
|
588
|
+
case 0:
|
|
589
|
+
case 1:
|
|
590
|
+
o = u;
|
|
591
|
+
break;
|
|
592
|
+
case 4:
|
|
593
|
+
return n.label++, { value: u[1], done: !1 };
|
|
594
|
+
case 5:
|
|
595
|
+
n.label++, i = u[1], u = [0];
|
|
596
|
+
continue;
|
|
597
|
+
case 7:
|
|
598
|
+
u = n.ops.pop(), n.trys.pop();
|
|
599
|
+
continue;
|
|
600
|
+
default:
|
|
601
|
+
if (o = n.trys, !(o = o.length > 0 && o[o.length - 1]) && (u[0] === 6 || u[0] === 2)) {
|
|
602
|
+
n = 0;
|
|
603
|
+
continue;
|
|
604
|
+
}
|
|
605
|
+
if (u[0] === 3 && (!o || u[1] > o[0] && u[1] < o[3])) {
|
|
606
|
+
n.label = u[1];
|
|
607
|
+
break;
|
|
608
|
+
}
|
|
609
|
+
if (u[0] === 6 && n.label < o[1]) {
|
|
610
|
+
n.label = o[1], o = u;
|
|
611
|
+
break;
|
|
612
|
+
}
|
|
613
|
+
if (o && n.label < o[2]) {
|
|
614
|
+
n.label = o[2], n.ops.push(u);
|
|
615
|
+
break;
|
|
616
|
+
}
|
|
617
|
+
o[2] && n.ops.pop(), n.trys.pop();
|
|
618
|
+
continue;
|
|
619
|
+
}
|
|
620
|
+
u = e.call(r, n);
|
|
621
|
+
} catch (m) {
|
|
622
|
+
u = [6, m], i = 0;
|
|
623
|
+
} finally {
|
|
624
|
+
a = o = 0;
|
|
625
|
+
}
|
|
626
|
+
if (u[0] & 5) throw u[1];
|
|
627
|
+
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
function R(r, e) {
|
|
631
|
+
var n = typeof Symbol == "function" && r[Symbol.iterator];
|
|
632
|
+
if (!n) return r;
|
|
633
|
+
var a = n.call(r), i, o = [], c;
|
|
634
|
+
try {
|
|
635
|
+
for (; (e === void 0 || e-- > 0) && !(i = a.next()).done; ) o.push(i.value);
|
|
636
|
+
} catch (f) {
|
|
637
|
+
c = { error: f };
|
|
638
|
+
} finally {
|
|
639
|
+
try {
|
|
640
|
+
i && !i.done && (n = a.return) && n.call(a);
|
|
641
|
+
} finally {
|
|
642
|
+
if (c) throw c.error;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
return o;
|
|
646
|
+
}
|
|
647
|
+
function O(r, e, n) {
|
|
648
|
+
if (n || arguments.length === 2) for (var a = 0, i = e.length, o; a < i; a++)
|
|
649
|
+
(o || !(a in e)) && (o || (o = Array.prototype.slice.call(e, 0, a)), o[a] = e[a]);
|
|
650
|
+
return r.concat(o || Array.prototype.slice.call(e));
|
|
651
|
+
}
|
|
652
|
+
var ve = function(r) {
|
|
653
|
+
return typeof r == "function";
|
|
654
|
+
}, me = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
|
|
655
|
+
function J(r) {
|
|
656
|
+
me && (ve(r) || console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof r)));
|
|
657
|
+
var e = _(r);
|
|
658
|
+
e.current = pr(function() {
|
|
659
|
+
return r;
|
|
660
|
+
}, [r]);
|
|
661
|
+
var n = _();
|
|
662
|
+
return n.current || (n.current = function() {
|
|
663
|
+
for (var a = [], i = 0; i < arguments.length; i++)
|
|
664
|
+
a[i] = arguments[i];
|
|
665
|
+
return e.current.apply(this, a);
|
|
666
|
+
}), n.current;
|
|
667
|
+
}
|
|
668
|
+
const We = Dr(X);
|
|
669
|
+
var _r = function(r, e) {
|
|
670
|
+
var n = e.manual, a = e.ready, i = a === void 0 ? !0 : a, o = e.defaultParams, c = o === void 0 ? [] : o, f = e.refreshDeps, s = f === void 0 ? [] : f, u = e.refreshDepsAction, m = _(!1);
|
|
671
|
+
return m.current = !1, We(function() {
|
|
672
|
+
!n && i && (m.current = !0, r.run.apply(r, O([], R(c), !1)));
|
|
673
|
+
}, [i]), We(function() {
|
|
674
|
+
m.current || n || (m.current = !0, u ? u() : r.refresh());
|
|
675
|
+
}, O([], R(s), !1)), {
|
|
676
|
+
onBefore: function() {
|
|
677
|
+
if (!i)
|
|
678
|
+
return {
|
|
679
|
+
stopNow: !0
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
_r.onInit = function(r) {
|
|
685
|
+
var e = r.ready, n = e === void 0 ? !0 : e, a = r.manual;
|
|
686
|
+
return {
|
|
687
|
+
loading: !a && n
|
|
688
|
+
};
|
|
689
|
+
};
|
|
690
|
+
function Xr(r, e) {
|
|
691
|
+
if (r === e) return !0;
|
|
692
|
+
for (var n = 0; n < r.length; n++)
|
|
693
|
+
if (!Object.is(r[n], e[n])) return !1;
|
|
694
|
+
return !0;
|
|
695
|
+
}
|
|
696
|
+
function jr(r, e) {
|
|
697
|
+
var n = _({
|
|
698
|
+
deps: e,
|
|
699
|
+
obj: void 0,
|
|
700
|
+
initialized: !1
|
|
701
|
+
}).current;
|
|
702
|
+
return (n.initialized === !1 || !Xr(n.deps, e)) && (n.deps = e, n.obj = r(), n.initialized = !0), n.obj;
|
|
703
|
+
}
|
|
704
|
+
function Rr(r) {
|
|
705
|
+
var e = _(r);
|
|
706
|
+
return e.current = r, e;
|
|
707
|
+
}
|
|
708
|
+
var $e = function(r) {
|
|
709
|
+
me && (ve(r) || console.error("useUnmount expected parameter is a function, got ".concat(typeof r)));
|
|
710
|
+
var e = Rr(r);
|
|
711
|
+
X(function() {
|
|
712
|
+
return function() {
|
|
713
|
+
e.current();
|
|
714
|
+
};
|
|
715
|
+
}, []);
|
|
716
|
+
}, le = /* @__PURE__ */ new Map(), Zr = function(r, e, n) {
|
|
717
|
+
var a = le.get(r);
|
|
718
|
+
a != null && a.timer && clearTimeout(a.timer);
|
|
719
|
+
var i = void 0;
|
|
720
|
+
e > -1 && (i = setTimeout(function() {
|
|
721
|
+
le.delete(r);
|
|
722
|
+
}, e)), le.set(r, A(A({}, n), {
|
|
723
|
+
timer: i
|
|
724
|
+
}));
|
|
725
|
+
}, Qr = function(r) {
|
|
726
|
+
return le.get(r);
|
|
727
|
+
}, de = /* @__PURE__ */ new Map(), Kr = function(r) {
|
|
728
|
+
return de.get(r);
|
|
729
|
+
}, et = function(r, e) {
|
|
730
|
+
de.set(r, e), e.then(function(n) {
|
|
731
|
+
return de.delete(r), n;
|
|
732
|
+
}).catch(function() {
|
|
733
|
+
de.delete(r);
|
|
734
|
+
});
|
|
735
|
+
}, D = {}, rt = function(r, e) {
|
|
736
|
+
D[r] && D[r].forEach(function(n) {
|
|
737
|
+
return n(e);
|
|
738
|
+
});
|
|
739
|
+
}, Ee = function(r, e) {
|
|
740
|
+
return D[r] || (D[r] = []), D[r].push(e), function() {
|
|
741
|
+
var a = D[r].indexOf(e);
|
|
742
|
+
D[r].splice(a, 1);
|
|
743
|
+
};
|
|
744
|
+
}, tt = function(r, e) {
|
|
745
|
+
var n = e.cacheKey, a = e.cacheTime, i = a === void 0 ? 5 * 60 * 1e3 : a, o = e.staleTime, c = o === void 0 ? 0 : o, f = e.setCache, s = e.getCache, u = _(), m = _(), v = function(g, b) {
|
|
746
|
+
f ? f(b) : Zr(g, i, b), rt(g, b.data);
|
|
747
|
+
}, p = function(g, b) {
|
|
748
|
+
return b === void 0 && (b = []), s ? s(b) : Qr(g);
|
|
749
|
+
};
|
|
750
|
+
return jr(function() {
|
|
751
|
+
if (n) {
|
|
752
|
+
var g = p(n);
|
|
753
|
+
g && Object.hasOwnProperty.call(g, "data") && (r.state.data = g.data, r.state.params = g.params, (c === -1 || (/* @__PURE__ */ new Date()).getTime() - g.time <= c) && (r.state.loading = !1)), u.current = Ee(n, function(b) {
|
|
754
|
+
r.setState({
|
|
755
|
+
data: b
|
|
756
|
+
});
|
|
757
|
+
});
|
|
758
|
+
}
|
|
759
|
+
}, []), $e(function() {
|
|
760
|
+
var g;
|
|
761
|
+
(g = u.current) === null || g === void 0 || g.call(u);
|
|
762
|
+
}), n ? {
|
|
763
|
+
onBefore: function(g) {
|
|
764
|
+
var b = p(n, g);
|
|
765
|
+
return !b || !Object.hasOwnProperty.call(b, "data") ? {} : c === -1 || (/* @__PURE__ */ new Date()).getTime() - b.time <= c ? {
|
|
766
|
+
loading: !1,
|
|
767
|
+
data: b == null ? void 0 : b.data,
|
|
768
|
+
error: void 0,
|
|
769
|
+
returnNow: !0
|
|
770
|
+
} : {
|
|
771
|
+
data: b == null ? void 0 : b.data,
|
|
772
|
+
error: void 0
|
|
773
|
+
};
|
|
774
|
+
},
|
|
775
|
+
onRequest: function(g, b) {
|
|
776
|
+
var E = Kr(n);
|
|
777
|
+
return E && E !== m.current ? {
|
|
778
|
+
servicePromise: E
|
|
779
|
+
} : (E = g.apply(void 0, O([], R(b), !1)), m.current = E, et(n, E), {
|
|
780
|
+
servicePromise: E
|
|
781
|
+
});
|
|
782
|
+
},
|
|
783
|
+
onSuccess: function(g, b) {
|
|
784
|
+
var E;
|
|
785
|
+
n && ((E = u.current) === null || E === void 0 || E.call(u), v(n, {
|
|
786
|
+
data: g,
|
|
787
|
+
params: b,
|
|
788
|
+
time: (/* @__PURE__ */ new Date()).getTime()
|
|
789
|
+
}), u.current = Ee(n, function(x) {
|
|
790
|
+
r.setState({
|
|
791
|
+
data: x
|
|
792
|
+
});
|
|
793
|
+
}));
|
|
794
|
+
},
|
|
795
|
+
onMutate: function(g) {
|
|
796
|
+
var b;
|
|
797
|
+
n && ((b = u.current) === null || b === void 0 || b.call(u), v(n, {
|
|
798
|
+
data: g,
|
|
799
|
+
params: r.state.params,
|
|
800
|
+
time: (/* @__PURE__ */ new Date()).getTime()
|
|
801
|
+
}), u.current = Ee(n, function(E) {
|
|
802
|
+
r.setState({
|
|
803
|
+
data: E
|
|
804
|
+
});
|
|
805
|
+
}));
|
|
806
|
+
}
|
|
807
|
+
} : {};
|
|
808
|
+
}, Te, nr;
|
|
809
|
+
function Fe() {
|
|
810
|
+
if (nr) return Te;
|
|
811
|
+
nr = 1;
|
|
812
|
+
function r(e) {
|
|
813
|
+
var n = typeof e;
|
|
814
|
+
return e != null && (n == "object" || n == "function");
|
|
815
|
+
}
|
|
816
|
+
return Te = r, Te;
|
|
817
|
+
}
|
|
818
|
+
var we, ar;
|
|
819
|
+
function nt() {
|
|
820
|
+
if (ar) return we;
|
|
821
|
+
ar = 1;
|
|
822
|
+
var r = typeof fe == "object" && fe && fe.Object === Object && fe;
|
|
823
|
+
return we = r, we;
|
|
824
|
+
}
|
|
825
|
+
var _e, ir;
|
|
826
|
+
function Or() {
|
|
827
|
+
if (ir) return _e;
|
|
828
|
+
ir = 1;
|
|
829
|
+
var r = nt(), e = typeof self == "object" && self && self.Object === Object && self, n = r || e || Function("return this")();
|
|
830
|
+
return _e = n, _e;
|
|
831
|
+
}
|
|
832
|
+
var je, or;
|
|
833
|
+
function at() {
|
|
834
|
+
if (or) return je;
|
|
835
|
+
or = 1;
|
|
836
|
+
var r = Or(), e = function() {
|
|
837
|
+
return r.Date.now();
|
|
838
|
+
};
|
|
839
|
+
return je = e, je;
|
|
840
|
+
}
|
|
841
|
+
var Re, ur;
|
|
842
|
+
function it() {
|
|
843
|
+
if (ur) return Re;
|
|
844
|
+
ur = 1;
|
|
845
|
+
var r = /\s/;
|
|
846
|
+
function e(n) {
|
|
847
|
+
for (var a = n.length; a-- && r.test(n.charAt(a)); )
|
|
848
|
+
;
|
|
849
|
+
return a;
|
|
850
|
+
}
|
|
851
|
+
return Re = e, Re;
|
|
852
|
+
}
|
|
853
|
+
var Oe, cr;
|
|
854
|
+
function ot() {
|
|
855
|
+
if (cr) return Oe;
|
|
856
|
+
cr = 1;
|
|
857
|
+
var r = it(), e = /^\s+/;
|
|
858
|
+
function n(a) {
|
|
859
|
+
return a && a.slice(0, r(a) + 1).replace(e, "");
|
|
860
|
+
}
|
|
861
|
+
return Oe = n, Oe;
|
|
862
|
+
}
|
|
863
|
+
var Se, fr;
|
|
864
|
+
function Sr() {
|
|
865
|
+
if (fr) return Se;
|
|
866
|
+
fr = 1;
|
|
867
|
+
var r = Or(), e = r.Symbol;
|
|
868
|
+
return Se = e, Se;
|
|
869
|
+
}
|
|
870
|
+
var xe, sr;
|
|
871
|
+
function ut() {
|
|
872
|
+
if (sr) return xe;
|
|
873
|
+
sr = 1;
|
|
874
|
+
var r = Sr(), e = Object.prototype, n = e.hasOwnProperty, a = e.toString, i = r ? r.toStringTag : void 0;
|
|
875
|
+
function o(c) {
|
|
876
|
+
var f = n.call(c, i), s = c[i];
|
|
877
|
+
try {
|
|
878
|
+
c[i] = void 0;
|
|
879
|
+
var u = !0;
|
|
880
|
+
} catch {
|
|
881
|
+
}
|
|
882
|
+
var m = a.call(c);
|
|
883
|
+
return u && (f ? c[i] = s : delete c[i]), m;
|
|
884
|
+
}
|
|
885
|
+
return xe = o, xe;
|
|
886
|
+
}
|
|
887
|
+
var Pe, lr;
|
|
888
|
+
function ct() {
|
|
889
|
+
if (lr) return Pe;
|
|
890
|
+
lr = 1;
|
|
891
|
+
var r = Object.prototype, e = r.toString;
|
|
892
|
+
function n(a) {
|
|
893
|
+
return e.call(a);
|
|
894
|
+
}
|
|
895
|
+
return Pe = n, Pe;
|
|
896
|
+
}
|
|
897
|
+
var Ce, dr;
|
|
898
|
+
function ft() {
|
|
899
|
+
if (dr) return Ce;
|
|
900
|
+
dr = 1;
|
|
901
|
+
var r = Sr(), e = ut(), n = ct(), a = "[object Null]", i = "[object Undefined]", o = r ? r.toStringTag : void 0;
|
|
902
|
+
function c(f) {
|
|
903
|
+
return f == null ? f === void 0 ? i : a : o && o in Object(f) ? e(f) : n(f);
|
|
904
|
+
}
|
|
905
|
+
return Ce = c, Ce;
|
|
906
|
+
}
|
|
907
|
+
var Ae, vr;
|
|
908
|
+
function st() {
|
|
909
|
+
if (vr) return Ae;
|
|
910
|
+
vr = 1;
|
|
911
|
+
function r(e) {
|
|
912
|
+
return e != null && typeof e == "object";
|
|
913
|
+
}
|
|
914
|
+
return Ae = r, Ae;
|
|
915
|
+
}
|
|
916
|
+
var Ne, mr;
|
|
917
|
+
function lt() {
|
|
918
|
+
if (mr) return Ne;
|
|
919
|
+
mr = 1;
|
|
920
|
+
var r = ft(), e = st(), n = "[object Symbol]";
|
|
921
|
+
function a(i) {
|
|
922
|
+
return typeof i == "symbol" || e(i) && r(i) == n;
|
|
923
|
+
}
|
|
924
|
+
return Ne = a, Ne;
|
|
925
|
+
}
|
|
926
|
+
var ke, br;
|
|
927
|
+
function dt() {
|
|
928
|
+
if (br) return ke;
|
|
929
|
+
br = 1;
|
|
930
|
+
var r = ot(), e = Fe(), n = lt(), a = NaN, i = /^[-+]0x[0-9a-f]+$/i, o = /^0b[01]+$/i, c = /^0o[0-7]+$/i, f = parseInt;
|
|
931
|
+
function s(u) {
|
|
932
|
+
if (typeof u == "number")
|
|
933
|
+
return u;
|
|
934
|
+
if (n(u))
|
|
935
|
+
return a;
|
|
936
|
+
if (e(u)) {
|
|
937
|
+
var m = typeof u.valueOf == "function" ? u.valueOf() : u;
|
|
938
|
+
u = e(m) ? m + "" : m;
|
|
939
|
+
}
|
|
940
|
+
if (typeof u != "string")
|
|
941
|
+
return u === 0 ? u : +u;
|
|
942
|
+
u = r(u);
|
|
943
|
+
var v = o.test(u);
|
|
944
|
+
return v || c.test(u) ? f(u.slice(2), v ? 2 : 8) : i.test(u) ? a : +u;
|
|
945
|
+
}
|
|
946
|
+
return ke = s, ke;
|
|
947
|
+
}
|
|
948
|
+
var qe, gr;
|
|
949
|
+
function xr() {
|
|
950
|
+
if (gr) return qe;
|
|
951
|
+
gr = 1;
|
|
952
|
+
var r = Fe(), e = at(), n = dt(), a = "Expected a function", i = Math.max, o = Math.min;
|
|
953
|
+
function c(f, s, u) {
|
|
954
|
+
var m, v, p, g, b, E, x = 0, q = !1, N = !1, M = !0;
|
|
955
|
+
if (typeof f != "function")
|
|
956
|
+
throw new TypeError(a);
|
|
957
|
+
s = n(s) || 0, r(u) && (q = !!u.leading, N = "maxWait" in u, p = N ? i(n(u.maxWait) || 0, s) : p, M = "trailing" in u ? !!u.trailing : M);
|
|
958
|
+
function k(T) {
|
|
959
|
+
var C = m, $ = v;
|
|
960
|
+
return m = v = void 0, x = T, g = f.apply($, C), g;
|
|
961
|
+
}
|
|
962
|
+
function G(T) {
|
|
963
|
+
return x = T, b = setTimeout(P, s), q ? k(T) : g;
|
|
964
|
+
}
|
|
965
|
+
function L(T) {
|
|
966
|
+
var C = T - E, $ = T - x, ue = s - C;
|
|
967
|
+
return N ? o(ue, p - $) : ue;
|
|
968
|
+
}
|
|
969
|
+
function W(T) {
|
|
970
|
+
var C = T - E, $ = T - x;
|
|
971
|
+
return E === void 0 || C >= s || C < 0 || N && $ >= p;
|
|
972
|
+
}
|
|
973
|
+
function P() {
|
|
974
|
+
var T = e();
|
|
975
|
+
if (W(T))
|
|
976
|
+
return Z(T);
|
|
977
|
+
b = setTimeout(P, L(T));
|
|
978
|
+
}
|
|
979
|
+
function Z(T) {
|
|
980
|
+
return b = void 0, M && m ? k(T) : (m = v = void 0, g);
|
|
981
|
+
}
|
|
982
|
+
function oe() {
|
|
983
|
+
b !== void 0 && clearTimeout(b), x = 0, m = E = v = b = void 0;
|
|
984
|
+
}
|
|
985
|
+
function Q() {
|
|
986
|
+
return b === void 0 ? g : Z(e());
|
|
987
|
+
}
|
|
988
|
+
function U() {
|
|
989
|
+
var T = e(), C = W(T);
|
|
990
|
+
if (m = arguments, v = this, E = T, C) {
|
|
991
|
+
if (b === void 0)
|
|
992
|
+
return G(E);
|
|
993
|
+
if (N)
|
|
994
|
+
return clearTimeout(b), b = setTimeout(P, s), k(E);
|
|
995
|
+
}
|
|
996
|
+
return b === void 0 && (b = setTimeout(P, s)), g;
|
|
997
|
+
}
|
|
998
|
+
return U.cancel = oe, U.flush = Q, U;
|
|
999
|
+
}
|
|
1000
|
+
return qe = c, qe;
|
|
1001
|
+
}
|
|
1002
|
+
var vt = xr();
|
|
1003
|
+
const mt = /* @__PURE__ */ Tr(vt);
|
|
1004
|
+
var bt = function(r, e) {
|
|
1005
|
+
var n = e.debounceWait, a = e.debounceLeading, i = e.debounceTrailing, o = e.debounceMaxWait, c = _(), f = pr(function() {
|
|
1006
|
+
var s = {};
|
|
1007
|
+
return a !== void 0 && (s.leading = a), i !== void 0 && (s.trailing = i), o !== void 0 && (s.maxWait = o), s;
|
|
1008
|
+
}, [a, i, o]);
|
|
1009
|
+
return X(function() {
|
|
1010
|
+
if (n) {
|
|
1011
|
+
var s = r.runAsync.bind(r);
|
|
1012
|
+
return c.current = mt(function(u) {
|
|
1013
|
+
u();
|
|
1014
|
+
}, n, f), r.runAsync = function() {
|
|
1015
|
+
for (var u = [], m = 0; m < arguments.length; m++)
|
|
1016
|
+
u[m] = arguments[m];
|
|
1017
|
+
return new Promise(function(v, p) {
|
|
1018
|
+
var g;
|
|
1019
|
+
(g = c.current) === null || g === void 0 || g.call(c, function() {
|
|
1020
|
+
s.apply(void 0, O([], R(u), !1)).then(v).catch(p);
|
|
1021
|
+
});
|
|
1022
|
+
});
|
|
1023
|
+
}, function() {
|
|
1024
|
+
var u;
|
|
1025
|
+
(u = c.current) === null || u === void 0 || u.cancel(), r.runAsync = s;
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
}, [n, f]), n ? {
|
|
1029
|
+
onCancel: function() {
|
|
1030
|
+
var s;
|
|
1031
|
+
(s = c.current) === null || s === void 0 || s.cancel();
|
|
1032
|
+
}
|
|
1033
|
+
} : {};
|
|
1034
|
+
}, gt = function(r, e) {
|
|
1035
|
+
var n = e.loadingDelay, a = e.ready, i = _();
|
|
1036
|
+
if (!n)
|
|
1037
|
+
return {};
|
|
1038
|
+
var o = function() {
|
|
1039
|
+
i.current && clearTimeout(i.current);
|
|
1040
|
+
};
|
|
1041
|
+
return {
|
|
1042
|
+
onBefore: function() {
|
|
1043
|
+
return o(), a !== !1 && (i.current = setTimeout(function() {
|
|
1044
|
+
r.setState({
|
|
1045
|
+
loading: !0
|
|
1046
|
+
});
|
|
1047
|
+
}, n)), {
|
|
1048
|
+
loading: !1
|
|
1049
|
+
};
|
|
1050
|
+
},
|
|
1051
|
+
onFinally: function() {
|
|
1052
|
+
o();
|
|
1053
|
+
},
|
|
1054
|
+
onCancel: function() {
|
|
1055
|
+
o();
|
|
1056
|
+
}
|
|
1057
|
+
};
|
|
1058
|
+
}, be = !!(typeof window < "u" && window.document && window.document.createElement);
|
|
1059
|
+
function Ie() {
|
|
1060
|
+
return be ? document.visibilityState !== "hidden" : !0;
|
|
1061
|
+
}
|
|
1062
|
+
var ae = [];
|
|
1063
|
+
function ht(r) {
|
|
1064
|
+
return ae.push(r), function() {
|
|
1065
|
+
var n = ae.indexOf(r);
|
|
1066
|
+
ae.splice(n, 1);
|
|
1067
|
+
};
|
|
1068
|
+
}
|
|
1069
|
+
if (be) {
|
|
1070
|
+
var yt = function() {
|
|
1071
|
+
if (Ie())
|
|
1072
|
+
for (var r = 0; r < ae.length; r++) {
|
|
1073
|
+
var e = ae[r];
|
|
1074
|
+
e();
|
|
1075
|
+
}
|
|
1076
|
+
};
|
|
1077
|
+
window.addEventListener("visibilitychange", yt, !1);
|
|
1078
|
+
}
|
|
1079
|
+
var pt = function(r, e) {
|
|
1080
|
+
var n = e.pollingInterval, a = e.pollingWhenHidden, i = a === void 0 ? !0 : a, o = e.pollingErrorRetryCount, c = o === void 0 ? -1 : o, f = _(), s = _(), u = _(0), m = function() {
|
|
1081
|
+
var v;
|
|
1082
|
+
f.current && clearTimeout(f.current), (v = s.current) === null || v === void 0 || v.call(s);
|
|
1083
|
+
};
|
|
1084
|
+
return We(function() {
|
|
1085
|
+
n || m();
|
|
1086
|
+
}, [n]), n ? {
|
|
1087
|
+
onBefore: function() {
|
|
1088
|
+
m();
|
|
1089
|
+
},
|
|
1090
|
+
onError: function() {
|
|
1091
|
+
u.current += 1;
|
|
1092
|
+
},
|
|
1093
|
+
onSuccess: function() {
|
|
1094
|
+
u.current = 0;
|
|
1095
|
+
},
|
|
1096
|
+
onFinally: function() {
|
|
1097
|
+
c === -1 || // When an error occurs, the request is not repeated after pollingErrorRetryCount retries
|
|
1098
|
+
c !== -1 && u.current <= c ? f.current = setTimeout(function() {
|
|
1099
|
+
!i && !Ie() ? s.current = ht(function() {
|
|
1100
|
+
r.refresh();
|
|
1101
|
+
}) : r.refresh();
|
|
1102
|
+
}, n) : u.current = 0;
|
|
1103
|
+
},
|
|
1104
|
+
onCancel: function() {
|
|
1105
|
+
m();
|
|
1106
|
+
}
|
|
1107
|
+
} : {};
|
|
1108
|
+
};
|
|
1109
|
+
function Et(r, e) {
|
|
1110
|
+
var n = !1;
|
|
1111
|
+
return function() {
|
|
1112
|
+
for (var a = [], i = 0; i < arguments.length; i++)
|
|
1113
|
+
a[i] = arguments[i];
|
|
1114
|
+
n || (n = !0, r.apply(void 0, O([], R(a), !1)), setTimeout(function() {
|
|
1115
|
+
n = !1;
|
|
1116
|
+
}, e));
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
function Tt() {
|
|
1120
|
+
return be && typeof navigator.onLine < "u" ? navigator.onLine : !0;
|
|
1121
|
+
}
|
|
1122
|
+
var ie = [];
|
|
1123
|
+
function wt(r) {
|
|
1124
|
+
return ie.push(r), function() {
|
|
1125
|
+
var n = ie.indexOf(r);
|
|
1126
|
+
n > -1 && ie.splice(n, 1);
|
|
1127
|
+
};
|
|
1128
|
+
}
|
|
1129
|
+
if (be) {
|
|
1130
|
+
var hr = function() {
|
|
1131
|
+
if (!(!Ie() || !Tt()))
|
|
1132
|
+
for (var r = 0; r < ie.length; r++) {
|
|
1133
|
+
var e = ie[r];
|
|
1134
|
+
e();
|
|
1135
|
+
}
|
|
1136
|
+
};
|
|
1137
|
+
window.addEventListener("visibilitychange", hr, !1), window.addEventListener("focus", hr, !1);
|
|
1138
|
+
}
|
|
1139
|
+
var _t = function(r, e) {
|
|
1140
|
+
var n = e.refreshOnWindowFocus, a = e.focusTimespan, i = a === void 0 ? 5e3 : a, o = _(), c = function() {
|
|
1141
|
+
var f;
|
|
1142
|
+
(f = o.current) === null || f === void 0 || f.call(o);
|
|
1143
|
+
};
|
|
1144
|
+
return X(function() {
|
|
1145
|
+
if (n) {
|
|
1146
|
+
var f = Et(r.refresh.bind(r), i);
|
|
1147
|
+
o.current = wt(function() {
|
|
1148
|
+
f();
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
return function() {
|
|
1152
|
+
c();
|
|
1153
|
+
};
|
|
1154
|
+
}, [n, i]), $e(function() {
|
|
1155
|
+
c();
|
|
1156
|
+
}), {};
|
|
1157
|
+
}, jt = function(r, e) {
|
|
1158
|
+
var n = e.retryInterval, a = e.retryCount, i = _(), o = _(0), c = _(!1);
|
|
1159
|
+
return a ? {
|
|
1160
|
+
onBefore: function() {
|
|
1161
|
+
c.current || (o.current = 0), c.current = !1, i.current && clearTimeout(i.current);
|
|
1162
|
+
},
|
|
1163
|
+
onSuccess: function() {
|
|
1164
|
+
o.current = 0;
|
|
1165
|
+
},
|
|
1166
|
+
onError: function() {
|
|
1167
|
+
if (o.current += 1, a === -1 || o.current <= a) {
|
|
1168
|
+
var f = n ?? Math.min(1e3 * Math.pow(2, o.current), 3e4);
|
|
1169
|
+
i.current = setTimeout(function() {
|
|
1170
|
+
c.current = !0, r.refresh();
|
|
1171
|
+
}, f);
|
|
1172
|
+
} else
|
|
1173
|
+
o.current = 0;
|
|
1174
|
+
},
|
|
1175
|
+
onCancel: function() {
|
|
1176
|
+
o.current = 0, i.current && clearTimeout(i.current);
|
|
1177
|
+
}
|
|
1178
|
+
} : {};
|
|
1179
|
+
}, Me, yr;
|
|
1180
|
+
function Rt() {
|
|
1181
|
+
if (yr) return Me;
|
|
1182
|
+
yr = 1;
|
|
1183
|
+
var r = xr(), e = Fe(), n = "Expected a function";
|
|
1184
|
+
function a(i, o, c) {
|
|
1185
|
+
var f = !0, s = !0;
|
|
1186
|
+
if (typeof i != "function")
|
|
1187
|
+
throw new TypeError(n);
|
|
1188
|
+
return e(c) && (f = "leading" in c ? !!c.leading : f, s = "trailing" in c ? !!c.trailing : s), r(i, o, {
|
|
1189
|
+
leading: f,
|
|
1190
|
+
maxWait: o,
|
|
1191
|
+
trailing: s
|
|
1192
|
+
});
|
|
1193
|
+
}
|
|
1194
|
+
return Me = a, Me;
|
|
1195
|
+
}
|
|
1196
|
+
var Ot = Rt();
|
|
1197
|
+
const St = /* @__PURE__ */ Tr(Ot);
|
|
1198
|
+
var xt = function(r, e) {
|
|
1199
|
+
var n = e.throttleWait, a = e.throttleLeading, i = e.throttleTrailing, o = _(), c = {};
|
|
1200
|
+
return a !== void 0 && (c.leading = a), i !== void 0 && (c.trailing = i), X(function() {
|
|
1201
|
+
if (n) {
|
|
1202
|
+
var f = r.runAsync.bind(r);
|
|
1203
|
+
return o.current = St(function(s) {
|
|
1204
|
+
s();
|
|
1205
|
+
}, n, c), r.runAsync = function() {
|
|
1206
|
+
for (var s = [], u = 0; u < arguments.length; u++)
|
|
1207
|
+
s[u] = arguments[u];
|
|
1208
|
+
return new Promise(function(m, v) {
|
|
1209
|
+
var p;
|
|
1210
|
+
(p = o.current) === null || p === void 0 || p.call(o, function() {
|
|
1211
|
+
f.apply(void 0, O([], R(s), !1)).then(m).catch(v);
|
|
1212
|
+
});
|
|
1213
|
+
});
|
|
1214
|
+
}, function() {
|
|
1215
|
+
var s;
|
|
1216
|
+
r.runAsync = f, (s = o.current) === null || s === void 0 || s.cancel();
|
|
1217
|
+
};
|
|
1218
|
+
}
|
|
1219
|
+
}, [n, a, i]), n ? {
|
|
1220
|
+
onCancel: function() {
|
|
1221
|
+
var f;
|
|
1222
|
+
(f = o.current) === null || f === void 0 || f.cancel();
|
|
1223
|
+
}
|
|
1224
|
+
} : {};
|
|
1225
|
+
}, Pt = function(r) {
|
|
1226
|
+
me && (ve(r) || console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof r, '".'))), X(function() {
|
|
1227
|
+
r == null || r();
|
|
1228
|
+
}, []);
|
|
1229
|
+
}, Ct = function() {
|
|
1230
|
+
var r = R(Lr({}), 2), e = r[1];
|
|
1231
|
+
return Yr(function() {
|
|
1232
|
+
return e({});
|
|
1233
|
+
}, []);
|
|
1234
|
+
}, At = (
|
|
1235
|
+
/** @class */
|
|
1236
|
+
function() {
|
|
1237
|
+
function r(e, n, a, i) {
|
|
1238
|
+
i === void 0 && (i = {}), this.serviceRef = e, this.options = n, this.subscribe = a, this.initState = i, this.count = 0, this.state = {
|
|
1239
|
+
loading: !1,
|
|
1240
|
+
params: void 0,
|
|
1241
|
+
data: void 0,
|
|
1242
|
+
error: void 0
|
|
1243
|
+
}, this.state = A(A(A({}, this.state), {
|
|
1244
|
+
loading: !n.manual
|
|
1245
|
+
}), i);
|
|
1246
|
+
}
|
|
1247
|
+
return r.prototype.setState = function(e) {
|
|
1248
|
+
e === void 0 && (e = {}), this.state = A(A({}, this.state), e), this.subscribe();
|
|
1249
|
+
}, r.prototype.runPluginHandler = function(e) {
|
|
1250
|
+
for (var n = [], a = 1; a < arguments.length; a++)
|
|
1251
|
+
n[a - 1] = arguments[a];
|
|
1252
|
+
var i = this.pluginImpls.map(function(o) {
|
|
1253
|
+
var c;
|
|
1254
|
+
return (c = o[e]) === null || c === void 0 ? void 0 : c.call.apply(c, O([o], R(n), !1));
|
|
1255
|
+
}).filter(Boolean);
|
|
1256
|
+
return Object.assign.apply(Object, O([{}], R(i), !1));
|
|
1257
|
+
}, r.prototype.runAsync = function() {
|
|
1258
|
+
for (var e = [], n = 0; n < arguments.length; n++)
|
|
1259
|
+
e[n] = arguments[n];
|
|
1260
|
+
return Vr(this, void 0, void 0, function() {
|
|
1261
|
+
var a, i, o, c, f, s, u, m, v, p, g, b, E, x, q, N, M, k, G, L, W;
|
|
1262
|
+
return Jr(this, function(P) {
|
|
1263
|
+
switch (P.label) {
|
|
1264
|
+
case 0:
|
|
1265
|
+
if (this.count += 1, a = this.count, i = this.runPluginHandler("onBefore", e), o = i.stopNow, c = o === void 0 ? !1 : o, f = i.returnNow, s = f === void 0 ? !1 : f, u = wr(i, ["stopNow", "returnNow"]), c)
|
|
1266
|
+
return [2, new Promise(function() {
|
|
1267
|
+
})];
|
|
1268
|
+
if (this.setState(A({
|
|
1269
|
+
loading: !0,
|
|
1270
|
+
params: e
|
|
1271
|
+
}, u)), s)
|
|
1272
|
+
return [2, Promise.resolve(u.data)];
|
|
1273
|
+
(E = (b = this.options).onBefore) === null || E === void 0 || E.call(b, e), P.label = 1;
|
|
1274
|
+
case 1:
|
|
1275
|
+
return P.trys.push([1, 3, , 4]), m = this.runPluginHandler("onRequest", this.serviceRef.current, e).servicePromise, m || (m = (g = this.serviceRef).current.apply(g, O([], R(e), !1))), [4, m];
|
|
1276
|
+
case 2:
|
|
1277
|
+
return v = P.sent(), a !== this.count ? [2, new Promise(function() {
|
|
1278
|
+
})] : (this.setState({
|
|
1279
|
+
data: v,
|
|
1280
|
+
error: void 0,
|
|
1281
|
+
loading: !1
|
|
1282
|
+
}), (q = (x = this.options).onSuccess) === null || q === void 0 || q.call(x, v, e), this.runPluginHandler("onSuccess", v, e), (M = (N = this.options).onFinally) === null || M === void 0 || M.call(N, e, v, void 0), a === this.count && this.runPluginHandler("onFinally", e, v, void 0), [2, v]);
|
|
1283
|
+
case 3:
|
|
1284
|
+
if (p = P.sent(), a !== this.count)
|
|
1285
|
+
return [2, new Promise(function() {
|
|
1286
|
+
})];
|
|
1287
|
+
throw this.setState({
|
|
1288
|
+
error: p,
|
|
1289
|
+
loading: !1
|
|
1290
|
+
}), (G = (k = this.options).onError) === null || G === void 0 || G.call(k, p, e), this.runPluginHandler("onError", p, e), (W = (L = this.options).onFinally) === null || W === void 0 || W.call(L, e, void 0, p), a === this.count && this.runPluginHandler("onFinally", e, void 0, p), p;
|
|
1291
|
+
case 4:
|
|
1292
|
+
return [
|
|
1293
|
+
2
|
|
1294
|
+
/*return*/
|
|
1295
|
+
];
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
});
|
|
1299
|
+
}, r.prototype.run = function() {
|
|
1300
|
+
for (var e = this, n = [], a = 0; a < arguments.length; a++)
|
|
1301
|
+
n[a] = arguments[a];
|
|
1302
|
+
this.runAsync.apply(this, O([], R(n), !1)).catch(function(i) {
|
|
1303
|
+
e.options.onError || console.error(i);
|
|
1304
|
+
});
|
|
1305
|
+
}, r.prototype.cancel = function() {
|
|
1306
|
+
this.count += 1, this.setState({
|
|
1307
|
+
loading: !1
|
|
1308
|
+
}), this.runPluginHandler("onCancel");
|
|
1309
|
+
}, r.prototype.refresh = function() {
|
|
1310
|
+
this.run.apply(this, O([], R(this.state.params || []), !1));
|
|
1311
|
+
}, r.prototype.refreshAsync = function() {
|
|
1312
|
+
return this.runAsync.apply(this, O([], R(this.state.params || []), !1));
|
|
1313
|
+
}, r.prototype.mutate = function(e) {
|
|
1314
|
+
var n = ve(e) ? e(this.state.data) : e;
|
|
1315
|
+
this.runPluginHandler("onMutate", n), this.setState({
|
|
1316
|
+
data: n
|
|
1317
|
+
});
|
|
1318
|
+
}, r;
|
|
1319
|
+
}()
|
|
1320
|
+
);
|
|
1321
|
+
function Nt(r, e, n) {
|
|
1322
|
+
e === void 0 && (e = {}), n === void 0 && (n = []);
|
|
1323
|
+
var a = e.manual, i = a === void 0 ? !1 : a, o = e.ready, c = o === void 0 ? !0 : o, f = wr(e, ["manual", "ready"]);
|
|
1324
|
+
me && e.defaultParams && !Array.isArray(e.defaultParams) && console.warn("expected defaultParams is array, got ".concat(typeof e.defaultParams));
|
|
1325
|
+
var s = A({
|
|
1326
|
+
manual: i,
|
|
1327
|
+
ready: c
|
|
1328
|
+
}, f), u = Rr(r), m = Ct(), v = jr(function() {
|
|
1329
|
+
var p = n.map(function(g) {
|
|
1330
|
+
var b;
|
|
1331
|
+
return (b = g == null ? void 0 : g.onInit) === null || b === void 0 ? void 0 : b.call(g, s);
|
|
1332
|
+
}).filter(Boolean);
|
|
1333
|
+
return new At(u, s, m, Object.assign.apply(Object, O([{}], R(p), !1)));
|
|
1334
|
+
}, []);
|
|
1335
|
+
return v.options = s, v.pluginImpls = n.map(function(p) {
|
|
1336
|
+
return p(v, s);
|
|
1337
|
+
}), Pt(function() {
|
|
1338
|
+
if (!i && c) {
|
|
1339
|
+
var p = v.state.params || e.defaultParams || [];
|
|
1340
|
+
v.run.apply(v, O([], R(p), !1));
|
|
1341
|
+
}
|
|
1342
|
+
}), $e(function() {
|
|
1343
|
+
v.cancel();
|
|
1344
|
+
}), {
|
|
1345
|
+
loading: v.state.loading,
|
|
1346
|
+
data: v.state.data,
|
|
1347
|
+
error: v.state.error,
|
|
1348
|
+
params: v.state.params || [],
|
|
1349
|
+
cancel: J(v.cancel.bind(v)),
|
|
1350
|
+
refresh: J(v.refresh.bind(v)),
|
|
1351
|
+
refreshAsync: J(v.refreshAsync.bind(v)),
|
|
1352
|
+
run: J(v.run.bind(v)),
|
|
1353
|
+
runAsync: J(v.runAsync.bind(v)),
|
|
1354
|
+
mutate: J(v.mutate.bind(v))
|
|
1355
|
+
};
|
|
1356
|
+
}
|
|
1357
|
+
function kt(r, e, n) {
|
|
1358
|
+
return Nt(r, e, O(O([], R(n || []), !1), [bt, gt, pt, _t, xt, _r, tt, jt], !1));
|
|
1359
|
+
}
|
|
1360
|
+
function Lt(r, e, n) {
|
|
1361
|
+
const a = kt(r, {
|
|
1362
|
+
...e,
|
|
1363
|
+
onError(o, c) {
|
|
1364
|
+
var f;
|
|
1365
|
+
((e == null ? void 0 : e.errorMessage) ?? !0) && Er.error(o.message), (f = e == null ? void 0 : e.onError) == null || f.call(e, o, c);
|
|
1366
|
+
}
|
|
1367
|
+
}, n), i = a.data && typeof a.data == "object" && "data" in a.data ? a.data.data : a.data;
|
|
1368
|
+
return {
|
|
1369
|
+
...a,
|
|
1370
|
+
data: i
|
|
1371
|
+
};
|
|
1372
|
+
}
|
|
1373
|
+
export {
|
|
1374
|
+
Wt as App,
|
|
1375
|
+
Ft as CheckboxValue,
|
|
1376
|
+
$t as IconFont,
|
|
1377
|
+
It as SwitchValue,
|
|
1378
|
+
Er as message,
|
|
1379
|
+
Ur as modal,
|
|
1380
|
+
Gr as notification,
|
|
1381
|
+
Lt as useRequest
|
|
1382
|
+
};
|