@e7w/easy-model 0.1.6 → 0.1.8
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/LICENSE.md +9 -9
- package/README.md +233 -533
- package/dist/index.d.ts +5 -6
- package/dist/index.es.js +345 -274
- package/dist/index.umd.js +4 -4
- package/package.json +32 -22
package/dist/index.es.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var g = (e, r, n) =>
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
let
|
|
7
|
-
const
|
|
1
|
+
var xe = Object.defineProperty;
|
|
2
|
+
var Ae = (e, r, n) => r in e ? xe(e, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[r] = n;
|
|
3
|
+
var g = (e, r, n) => Ae(e, typeof r != "symbol" ? r + "" : r, n);
|
|
4
|
+
import Ce, { useReducer as Me, useEffect as ue, Children as Ne } from "react";
|
|
5
|
+
const V = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), fe = Symbol("origin");
|
|
6
|
+
let m = null;
|
|
7
|
+
const q = ["includes", "indexOf", "lastIndexOf"], Le = [Promise, RegExp, Date, WeakMap, WeakSet, Map, Set];
|
|
8
8
|
function C(e) {
|
|
9
|
-
if (e =
|
|
10
|
-
if (
|
|
9
|
+
if (e = p(e), !e || Le.some((i) => e instanceof i)) return e;
|
|
10
|
+
if (V.has(e)) return V.get(e);
|
|
11
11
|
const r = {}, n = {}, a = new Proxy(e, {
|
|
12
12
|
get(i, o, c) {
|
|
13
|
-
if (o ===
|
|
14
|
-
let s =
|
|
15
|
-
return s || (s = Reflect.get(i, o, c), typeof s == "function" ? (n[o] || (n[o] = s.bind(C(i))), s = n[o]) : typeof s == "object" && s !== null && (r[o] || (r[o] =
|
|
13
|
+
if (o === fe) return i;
|
|
14
|
+
let s = de(i, o);
|
|
15
|
+
return s || (s = Reflect.get(i, o, c), typeof s == "function" ? (n[o] || (n[o] = s.bind(C(i))), s = n[o]) : typeof s == "object" && s !== null && (r[o] || (r[o] = I(s, re(e, o))), s = C(s)), s);
|
|
16
16
|
},
|
|
17
17
|
set(i, o, c, s) {
|
|
18
18
|
let f = Reflect.get(i, o, s);
|
|
19
|
-
if (f =
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
r[o] && (r[o](), delete r[o]), typeof c == "object" && c !== null && (r[o] =
|
|
23
|
-
const b =
|
|
24
|
-
|
|
19
|
+
if (f = p(f), c = p(c), f === c) return !0;
|
|
20
|
+
const u = Reflect.set(i, o, c, s);
|
|
21
|
+
if (u) {
|
|
22
|
+
r[o] && (r[o](), delete r[o]), typeof c == "object" && c !== null && (r[o] = I(c, re(e, o))), n[o] && delete n[o];
|
|
23
|
+
const b = m;
|
|
24
|
+
m = /* @__PURE__ */ new WeakSet(), B(i, [o], f, c), m = b;
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return u;
|
|
27
27
|
},
|
|
28
28
|
deleteProperty(i, o) {
|
|
29
29
|
let c = Reflect.get(i, o);
|
|
30
|
-
c =
|
|
30
|
+
c = p(c);
|
|
31
31
|
const s = Reflect.deleteProperty(i, o);
|
|
32
|
-
return s && (r[o] && (r[o](), delete r[o]), n[o] && delete n[o],
|
|
32
|
+
return s && (r[o] && (r[o](), delete r[o]), n[o] && delete n[o], B(i, [o], c, void 0)), s;
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
|
-
return
|
|
35
|
+
return V.set(e, a), a;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
e =
|
|
39
|
-
const n =
|
|
37
|
+
function I(e, r) {
|
|
38
|
+
e = p(e), W.has(e) || W.set(e, /* @__PURE__ */ new Map());
|
|
39
|
+
const n = W.get(e), a = Symbol();
|
|
40
40
|
return n.set(a, r), function() {
|
|
41
41
|
n.delete(a);
|
|
42
42
|
};
|
|
@@ -44,13 +44,13 @@ function q(e, r) {
|
|
|
44
44
|
function re(e, r) {
|
|
45
45
|
return function(...n) {
|
|
46
46
|
const [a, ...i] = n;
|
|
47
|
-
|
|
47
|
+
B(e, [r, ...a], ...i);
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
if (e =
|
|
52
|
-
|
|
53
|
-
const n =
|
|
50
|
+
function B(e, ...r) {
|
|
51
|
+
if (e = p(e), m != null && m.has(e)) return;
|
|
52
|
+
m == null || m.add(e);
|
|
53
|
+
const n = W.get(e);
|
|
54
54
|
if (!n) return;
|
|
55
55
|
[...n.values()].forEach((i) => {
|
|
56
56
|
const o = new EventTarget(), c = new Event("__trigger__");
|
|
@@ -60,111 +60,126 @@ function J(e, ...r) {
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
return typeof e != "object" || e === null ? e : e[
|
|
63
|
+
function p(e) {
|
|
64
|
+
return typeof e != "object" || e === null ? e : e[fe] ?? e;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
if (e =
|
|
66
|
+
function de(e, r) {
|
|
67
|
+
if (e = p(e), ["constructor", "__proto__"].includes(r))
|
|
68
68
|
return Reflect.get(e, r);
|
|
69
69
|
if (r === "hasOwnProperty")
|
|
70
70
|
return function(n) {
|
|
71
|
-
return Object.prototype.hasOwnProperty.call(
|
|
71
|
+
return Object.prototype.hasOwnProperty.call(p(this), n);
|
|
72
72
|
};
|
|
73
|
-
if (Array.isArray(e) &&
|
|
73
|
+
if (Array.isArray(e) && q.includes(r))
|
|
74
74
|
return function(...n) {
|
|
75
|
-
const a =
|
|
76
|
-
return a === -1 || a === !1 ?
|
|
75
|
+
const a = q[r].apply(p(this), n);
|
|
76
|
+
return a === -1 || a === !1 ? q[r].apply(p(this), n.map(p)) : a;
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
const
|
|
80
|
-
function
|
|
79
|
+
const w = Symbol("instance"), N = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakSet(), J = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap();
|
|
80
|
+
function $(e) {
|
|
81
81
|
if (ne.has(e))
|
|
82
82
|
return e;
|
|
83
|
-
if (
|
|
84
|
-
return
|
|
83
|
+
if (N.has(e))
|
|
84
|
+
return N.get(e);
|
|
85
85
|
const r = {};
|
|
86
|
-
o.prototype = new Proxy(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
get(c, s, f) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return l.apply(C(this), b);
|
|
96
|
-
}), r[s]);
|
|
97
|
-
}
|
|
86
|
+
o.prototype = new Proxy({
|
|
87
|
+
constructor: e,
|
|
88
|
+
__proto__: e.prototype
|
|
89
|
+
}, {
|
|
90
|
+
get(c, s, f) {
|
|
91
|
+
let u = de(c, s);
|
|
92
|
+
return u || (u = Reflect.get(c, s, f), typeof s == "symbol" || ["constructor", "__proto__"].includes(s) || typeof u != "function") ? u : (r[s] || (r[s] = function(...b) {
|
|
93
|
+
return u.apply(C(this), b);
|
|
94
|
+
}), r[s]);
|
|
98
95
|
}
|
|
99
|
-
);
|
|
100
|
-
const n = /* @__PURE__ */ new Map(), a = new FinalizationRegistry(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
});
|
|
97
|
+
const n = /* @__PURE__ */ new Map(), a = new FinalizationRegistry(({
|
|
98
|
+
args: c,
|
|
99
|
+
token: s
|
|
100
|
+
}) => {
|
|
101
|
+
var f;
|
|
102
|
+
be(n, c), (f = X.get(s)) == null || f(), a.unregister(s);
|
|
103
|
+
}), i = new Proxy(e, {
|
|
106
104
|
apply(c, s, f) {
|
|
107
|
-
var b,
|
|
108
|
-
let
|
|
109
|
-
for (let
|
|
110
|
-
|
|
111
|
-
if (!
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
a.register(
|
|
105
|
+
var b, E, R, v;
|
|
106
|
+
let u = n;
|
|
107
|
+
for (let y = 0; y < f.length; y++)
|
|
108
|
+
u.has(f[y]) || u.set(f[y], /* @__PURE__ */ new Map()), u = u.get(f[y]);
|
|
109
|
+
if (!u.has(w) || u.get(w) !== void 0 && !((E = (b = u.get(w)) == null ? void 0 : b.deref) != null && E.call(b))) {
|
|
110
|
+
u.set(w, void 0);
|
|
111
|
+
const y = C(Reflect.construct(c, f, o));
|
|
112
|
+
u.set(w, new WeakRef(y));
|
|
113
|
+
const k = _e(y);
|
|
114
|
+
a.register(y, {
|
|
115
|
+
args: f,
|
|
116
|
+
token: k
|
|
117
|
+
}, k);
|
|
117
118
|
}
|
|
118
|
-
return (
|
|
119
|
+
return (v = (R = u.get(w)) == null ? void 0 : R.deref) == null ? void 0 : v.call(R);
|
|
119
120
|
}
|
|
120
121
|
});
|
|
121
|
-
return
|
|
122
|
+
return N.set(e, i), ne.add(i), N.get(e);
|
|
122
123
|
function o() {
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
|
-
function
|
|
126
|
-
if (r.length === 0) return e.delete(
|
|
126
|
+
function be(e, r) {
|
|
127
|
+
if (r.length === 0) return e.delete(w);
|
|
127
128
|
const [n, ...a] = r, i = e.get(n);
|
|
128
|
-
if (!(i instanceof Map && (
|
|
129
|
+
if (!(i instanceof Map && (be(i, a), i.size > 0)))
|
|
129
130
|
return e.delete(n);
|
|
130
131
|
}
|
|
131
|
-
function
|
|
132
|
-
const r = C(e), n =
|
|
132
|
+
function Ze(e) {
|
|
133
|
+
const r = C(e), n = _e(r);
|
|
133
134
|
return {
|
|
134
135
|
register(a) {
|
|
135
|
-
n &&
|
|
136
|
+
n && X.set(n, a);
|
|
136
137
|
},
|
|
137
138
|
unregister() {
|
|
138
|
-
n &&
|
|
139
|
+
n && X.delete(n);
|
|
139
140
|
}
|
|
140
141
|
};
|
|
141
142
|
}
|
|
142
|
-
function
|
|
143
|
-
return
|
|
143
|
+
function _e(e) {
|
|
144
|
+
return J.has(e) || J.set(e, {}), J.get(e);
|
|
145
|
+
}
|
|
146
|
+
const We = /* @__PURE__ */ Object.create(null);
|
|
147
|
+
function Qe(e, r) {
|
|
148
|
+
const n = $(e), a = r ? n(...r) : We;
|
|
149
|
+
return he(a);
|
|
144
150
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
return de(a);
|
|
151
|
+
function he(e) {
|
|
152
|
+
const [, r] = Me((n) => (n + 1) % 100, 0);
|
|
153
|
+
return ue(() => (r(), I(e, () => r())), [e]), e;
|
|
149
154
|
}
|
|
150
|
-
function
|
|
151
|
-
|
|
152
|
-
return je(() => (r(), q(e, () => r())), [e]), e;
|
|
155
|
+
function Ke(...e) {
|
|
156
|
+
ue(() => I(...e), e);
|
|
153
157
|
}
|
|
154
|
-
|
|
158
|
+
const Ie = Promise.withResolvers ? () => Promise.withResolvers() : () => {
|
|
159
|
+
let e, r;
|
|
160
|
+
return {
|
|
161
|
+
promise: new Promise((a, i) => {
|
|
162
|
+
e = a, r = i;
|
|
163
|
+
}),
|
|
164
|
+
resolve: e,
|
|
165
|
+
reject: r
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
class $e {
|
|
155
169
|
constructor(r, ...n) {
|
|
156
170
|
g(this, "symbol", Symbol());
|
|
157
171
|
g(this, "args");
|
|
158
172
|
this.target = r, this.args = n;
|
|
159
173
|
}
|
|
160
174
|
}
|
|
161
|
-
const
|
|
162
|
-
class
|
|
175
|
+
const Fe = $($e);
|
|
176
|
+
class Ye {
|
|
163
177
|
constructor() {
|
|
164
178
|
g(this, "loading", {});
|
|
165
179
|
g(this, "globalLoading", 0);
|
|
166
180
|
g(this, "onceTokens", /* @__PURE__ */ new WeakMap());
|
|
167
181
|
g(this, "oncePool", {});
|
|
182
|
+
g(this, "loadingTokens", /* @__PURE__ */ new WeakMap());
|
|
168
183
|
}
|
|
169
184
|
addGlobalLoading() {
|
|
170
185
|
this.globalLoading++;
|
|
@@ -173,46 +188,67 @@ class Le {
|
|
|
173
188
|
this.globalLoading--;
|
|
174
189
|
}
|
|
175
190
|
load(r = !1) {
|
|
176
|
-
return (n, {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
191
|
+
return (n, {
|
|
192
|
+
name: a
|
|
193
|
+
}) => {
|
|
194
|
+
const {
|
|
195
|
+
loading: i,
|
|
196
|
+
addGlobalLoading: o,
|
|
197
|
+
subGlobalLoading: c,
|
|
198
|
+
loadingTokens: s
|
|
199
|
+
} = this;
|
|
200
|
+
return async function(...f) {
|
|
201
|
+
const u = Reflect.get(this, a), b = Fe(u, ...f);
|
|
202
|
+
if (s.set(u, b.symbol), !!i[b.symbol]) return i[b.symbol];
|
|
203
|
+
const {
|
|
204
|
+
promise: R,
|
|
205
|
+
resolve: v,
|
|
206
|
+
reject: y
|
|
207
|
+
} = Ie();
|
|
208
|
+
i[b.symbol] = R, r && o();
|
|
183
209
|
try {
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
} catch (
|
|
187
|
-
|
|
210
|
+
const k = await n.apply(this, f);
|
|
211
|
+
v(k);
|
|
212
|
+
} catch (k) {
|
|
213
|
+
y(k);
|
|
188
214
|
}
|
|
189
|
-
return Reflect.deleteProperty(i,
|
|
215
|
+
return Reflect.deleteProperty(i, b.symbol), r && c(), s.delete(u), R;
|
|
190
216
|
};
|
|
191
217
|
};
|
|
192
218
|
}
|
|
193
|
-
once(r, {
|
|
194
|
-
|
|
219
|
+
once(r, {
|
|
220
|
+
name: n
|
|
221
|
+
}) {
|
|
222
|
+
const {
|
|
223
|
+
oncePool: a,
|
|
224
|
+
onceTokens: i
|
|
225
|
+
} = this;
|
|
195
226
|
return function(...o) {
|
|
196
227
|
const c = Reflect.get(this, n);
|
|
197
228
|
i.has(c) || i.set(c, Symbol());
|
|
198
229
|
const s = i.get(c);
|
|
199
|
-
return !!a[s] || (a[s] = r.apply(this, o).catch((
|
|
230
|
+
return !!a[s] || (a[s] = r.apply(this, o).catch((u) => (Reflect.deleteProperty(a, s), Promise.reject(u)))), a[s];
|
|
200
231
|
};
|
|
201
232
|
}
|
|
202
233
|
isLoading(r) {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
);
|
|
234
|
+
const n = this.loadingTokens.get(r);
|
|
235
|
+
return n ? !!this.loading[n] : !1;
|
|
206
236
|
}
|
|
207
237
|
get isGlobalLoading() {
|
|
208
238
|
return this.globalLoading > 0;
|
|
209
239
|
}
|
|
210
240
|
}
|
|
211
|
-
const
|
|
212
|
-
const {
|
|
213
|
-
|
|
241
|
+
const ze = $(Ye)(), et = () => {
|
|
242
|
+
const {
|
|
243
|
+
isGlobalLoading: e,
|
|
244
|
+
isLoading: r
|
|
245
|
+
} = he(ze);
|
|
246
|
+
return {
|
|
247
|
+
isGlobalLoading: e,
|
|
248
|
+
isLoading: r
|
|
249
|
+
};
|
|
214
250
|
};
|
|
215
|
-
var
|
|
251
|
+
var L = { exports: {} }, x = {};
|
|
216
252
|
/**
|
|
217
253
|
* @license React
|
|
218
254
|
* react-jsx-runtime.production.js
|
|
@@ -223,7 +259,7 @@ var N = { exports: {} }, x = {};
|
|
|
223
259
|
* LICENSE file in the root directory of this source tree.
|
|
224
260
|
*/
|
|
225
261
|
var oe;
|
|
226
|
-
function
|
|
262
|
+
function De() {
|
|
227
263
|
if (oe) return x;
|
|
228
264
|
oe = 1;
|
|
229
265
|
var e = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
|
|
@@ -255,46 +291,46 @@ var A = {};
|
|
|
255
291
|
* LICENSE file in the root directory of this source tree.
|
|
256
292
|
*/
|
|
257
293
|
var se;
|
|
258
|
-
function
|
|
259
|
-
return se || (se = 1, process.env.NODE_ENV !== "production" && function() {
|
|
294
|
+
function Ge() {
|
|
295
|
+
return se || (se = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
260
296
|
function e(t) {
|
|
261
297
|
if (t == null) return null;
|
|
262
298
|
if (typeof t == "function")
|
|
263
|
-
return t.$$typeof ===
|
|
299
|
+
return t.$$typeof === je ? null : t.displayName || t.name || null;
|
|
264
300
|
if (typeof t == "string") return t;
|
|
265
301
|
switch (t) {
|
|
266
|
-
case
|
|
302
|
+
case F:
|
|
267
303
|
return "Fragment";
|
|
268
|
-
case
|
|
304
|
+
case pe:
|
|
269
305
|
return "Profiler";
|
|
270
|
-
case
|
|
306
|
+
case Re:
|
|
271
307
|
return "StrictMode";
|
|
272
|
-
case
|
|
308
|
+
case ge:
|
|
273
309
|
return "Suspense";
|
|
274
|
-
case
|
|
310
|
+
case we:
|
|
275
311
|
return "SuspenseList";
|
|
276
|
-
case
|
|
312
|
+
case Pe:
|
|
277
313
|
return "Activity";
|
|
278
314
|
}
|
|
279
315
|
if (typeof t == "object")
|
|
280
316
|
switch (typeof t.tag == "number" && console.error(
|
|
281
317
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
282
318
|
), t.$$typeof) {
|
|
283
|
-
case
|
|
319
|
+
case k:
|
|
284
320
|
return "Portal";
|
|
321
|
+
case me:
|
|
322
|
+
return t.displayName || "Context";
|
|
285
323
|
case Ee:
|
|
286
|
-
return (t.displayName || "Context") + ".Provider";
|
|
287
|
-
case Re:
|
|
288
324
|
return (t._context.displayName || "Context") + ".Consumer";
|
|
289
|
-
case
|
|
290
|
-
var
|
|
291
|
-
return t = t.displayName, t || (t =
|
|
292
|
-
case
|
|
293
|
-
return
|
|
294
|
-
case
|
|
295
|
-
|
|
325
|
+
case ke:
|
|
326
|
+
var l = t.render;
|
|
327
|
+
return t = t.displayName, t || (t = l.displayName || l.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
|
|
328
|
+
case Te:
|
|
329
|
+
return l = t.displayName || null, l !== null ? l : e(t.type) || "Memo";
|
|
330
|
+
case Y:
|
|
331
|
+
l = t._payload, t = t._init;
|
|
296
332
|
try {
|
|
297
|
-
return e(t(
|
|
333
|
+
return e(t(l));
|
|
298
334
|
} catch {
|
|
299
335
|
}
|
|
300
336
|
}
|
|
@@ -306,33 +342,33 @@ function Ye() {
|
|
|
306
342
|
function n(t) {
|
|
307
343
|
try {
|
|
308
344
|
r(t);
|
|
309
|
-
var
|
|
345
|
+
var l = !1;
|
|
310
346
|
} catch {
|
|
311
|
-
|
|
347
|
+
l = !0;
|
|
312
348
|
}
|
|
313
|
-
if (
|
|
314
|
-
|
|
315
|
-
var d =
|
|
349
|
+
if (l) {
|
|
350
|
+
l = console;
|
|
351
|
+
var d = l.error, _ = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
316
352
|
return d.call(
|
|
317
|
-
|
|
353
|
+
l,
|
|
318
354
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
319
|
-
|
|
355
|
+
_
|
|
320
356
|
), r(t);
|
|
321
357
|
}
|
|
322
358
|
}
|
|
323
359
|
function a(t) {
|
|
324
|
-
if (t ===
|
|
325
|
-
if (typeof t == "object" && t !== null && t.$$typeof ===
|
|
360
|
+
if (t === F) return "<>";
|
|
361
|
+
if (typeof t == "object" && t !== null && t.$$typeof === Y)
|
|
326
362
|
return "<...>";
|
|
327
363
|
try {
|
|
328
|
-
var
|
|
329
|
-
return
|
|
364
|
+
var l = e(t);
|
|
365
|
+
return l ? "<" + l + ">" : "<...>";
|
|
330
366
|
} catch {
|
|
331
367
|
return "<...>";
|
|
332
368
|
}
|
|
333
369
|
}
|
|
334
370
|
function i() {
|
|
335
|
-
var t =
|
|
371
|
+
var t = z.A;
|
|
336
372
|
return t === null ? null : t.getOwner();
|
|
337
373
|
}
|
|
338
374
|
function o() {
|
|
@@ -340,16 +376,16 @@ function Ye() {
|
|
|
340
376
|
}
|
|
341
377
|
function c(t) {
|
|
342
378
|
if (H.call(t, "key")) {
|
|
343
|
-
var
|
|
344
|
-
if (
|
|
379
|
+
var l = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
380
|
+
if (l && l.isReactWarning) return !1;
|
|
345
381
|
}
|
|
346
382
|
return t.key !== void 0;
|
|
347
383
|
}
|
|
348
|
-
function s(t,
|
|
384
|
+
function s(t, l) {
|
|
349
385
|
function d() {
|
|
350
386
|
Z || (Z = !0, console.error(
|
|
351
387
|
"%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)",
|
|
352
|
-
|
|
388
|
+
l
|
|
353
389
|
));
|
|
354
390
|
}
|
|
355
391
|
d.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
@@ -363,14 +399,15 @@ function Ye() {
|
|
|
363
399
|
"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."
|
|
364
400
|
)), t = this.props.ref, t !== void 0 ? t : null;
|
|
365
401
|
}
|
|
366
|
-
function
|
|
367
|
-
|
|
368
|
-
|
|
402
|
+
function u(t, l, d, _, M, G) {
|
|
403
|
+
var h = d.ref;
|
|
404
|
+
return t = {
|
|
405
|
+
$$typeof: y,
|
|
369
406
|
type: t,
|
|
370
|
-
key:
|
|
371
|
-
props:
|
|
372
|
-
_owner:
|
|
373
|
-
}, (
|
|
407
|
+
key: l,
|
|
408
|
+
props: d,
|
|
409
|
+
_owner: _
|
|
410
|
+
}, (h !== void 0 ? h : null) !== null ? Object.defineProperty(t, "ref", {
|
|
374
411
|
enumerable: !1,
|
|
375
412
|
get: f
|
|
376
413
|
}) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
|
|
@@ -387,181 +424,215 @@ function Ye() {
|
|
|
387
424
|
configurable: !1,
|
|
388
425
|
enumerable: !1,
|
|
389
426
|
writable: !0,
|
|
390
|
-
value:
|
|
427
|
+
value: M
|
|
391
428
|
}), Object.defineProperty(t, "_debugTask", {
|
|
392
429
|
configurable: !1,
|
|
393
430
|
enumerable: !1,
|
|
394
431
|
writable: !0,
|
|
395
|
-
value:
|
|
432
|
+
value: G
|
|
396
433
|
}), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
|
|
397
434
|
}
|
|
398
|
-
function b(t,
|
|
399
|
-
var
|
|
400
|
-
if (
|
|
401
|
-
if (
|
|
402
|
-
if (
|
|
403
|
-
for (
|
|
404
|
-
h
|
|
405
|
-
Object.freeze && Object.freeze(
|
|
435
|
+
function b(t, l, d, _, M, G) {
|
|
436
|
+
var h = l.children;
|
|
437
|
+
if (h !== void 0)
|
|
438
|
+
if (_)
|
|
439
|
+
if (Oe(h)) {
|
|
440
|
+
for (_ = 0; _ < h.length; _++)
|
|
441
|
+
E(h[_]);
|
|
442
|
+
Object.freeze && Object.freeze(h);
|
|
406
443
|
} else
|
|
407
444
|
console.error(
|
|
408
445
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
409
446
|
);
|
|
410
|
-
else h
|
|
411
|
-
if (H.call(
|
|
412
|
-
|
|
413
|
-
var
|
|
414
|
-
return
|
|
447
|
+
else E(h);
|
|
448
|
+
if (H.call(l, "key")) {
|
|
449
|
+
h = e(t);
|
|
450
|
+
var P = Object.keys(l).filter(function(Se) {
|
|
451
|
+
return Se !== "key";
|
|
415
452
|
});
|
|
416
|
-
|
|
453
|
+
_ = 0 < P.length ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}", te[h + _] || (P = 0 < P.length ? "{" + P.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
417
454
|
`A props object containing a "key" prop is being spread into JSX:
|
|
418
455
|
let props = %s;
|
|
419
456
|
<%s {...props} />
|
|
420
457
|
React keys must be passed directly to JSX without using spread:
|
|
421
458
|
let props = %s;
|
|
422
459
|
<%s key={someKey} {...props} />`,
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
), te[
|
|
460
|
+
_,
|
|
461
|
+
h,
|
|
462
|
+
P,
|
|
463
|
+
h
|
|
464
|
+
), te[h + _] = !0);
|
|
428
465
|
}
|
|
429
|
-
if (
|
|
466
|
+
if (h = null, d !== void 0 && (n(d), h = "" + d), c(l) && (n(l.key), h = "" + l.key), "key" in l) {
|
|
430
467
|
d = {};
|
|
431
|
-
for (var
|
|
432
|
-
|
|
433
|
-
} else d =
|
|
434
|
-
return
|
|
468
|
+
for (var U in l)
|
|
469
|
+
U !== "key" && (d[U] = l[U]);
|
|
470
|
+
} else d = l;
|
|
471
|
+
return h && s(
|
|
435
472
|
d,
|
|
436
473
|
typeof t == "function" ? t.displayName || t.name || "Unknown" : t
|
|
437
|
-
),
|
|
474
|
+
), u(
|
|
438
475
|
t,
|
|
439
|
-
|
|
440
|
-
y,
|
|
441
|
-
k,
|
|
442
|
-
i(),
|
|
476
|
+
h,
|
|
443
477
|
d,
|
|
444
|
-
|
|
445
|
-
|
|
478
|
+
i(),
|
|
479
|
+
M,
|
|
480
|
+
G
|
|
446
481
|
);
|
|
447
482
|
}
|
|
448
|
-
function
|
|
449
|
-
typeof t == "object" && t !== null && t.$$typeof ===
|
|
483
|
+
function E(t) {
|
|
484
|
+
R(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === Y && (t._payload.status === "fulfilled" ? R(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
|
|
485
|
+
}
|
|
486
|
+
function R(t) {
|
|
487
|
+
return typeof t == "object" && t !== null && t.$$typeof === y;
|
|
450
488
|
}
|
|
451
|
-
var
|
|
489
|
+
var v = Ce, y = Symbol.for("react.transitional.element"), k = Symbol.for("react.portal"), F = Symbol.for("react.fragment"), Re = Symbol.for("react.strict_mode"), pe = Symbol.for("react.profiler"), Ee = Symbol.for("react.consumer"), me = Symbol.for("react.context"), ke = Symbol.for("react.forward_ref"), ge = Symbol.for("react.suspense"), we = Symbol.for("react.suspense_list"), Te = Symbol.for("react.memo"), Y = Symbol.for("react.lazy"), Pe = Symbol.for("react.activity"), je = Symbol.for("react.client.reference"), z = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, H = Object.prototype.hasOwnProperty, Oe = Array.isArray, D = console.createTask ? console.createTask : function() {
|
|
452
490
|
return null;
|
|
453
491
|
};
|
|
454
|
-
|
|
455
|
-
|
|
492
|
+
v = {
|
|
493
|
+
react_stack_bottom_frame: function(t) {
|
|
456
494
|
return t();
|
|
457
495
|
}
|
|
458
496
|
};
|
|
459
|
-
var Z, Q = {}, K =
|
|
460
|
-
|
|
497
|
+
var Z, Q = {}, K = v.react_stack_bottom_frame.bind(
|
|
498
|
+
v,
|
|
461
499
|
o
|
|
462
|
-
)(), ee =
|
|
463
|
-
A.Fragment =
|
|
464
|
-
var
|
|
500
|
+
)(), ee = D(a(o)), te = {};
|
|
501
|
+
A.Fragment = F, A.jsx = function(t, l, d) {
|
|
502
|
+
var _ = 1e4 > z.recentlyCreatedOwnerStacks++;
|
|
465
503
|
return b(
|
|
466
504
|
t,
|
|
467
|
-
|
|
505
|
+
l,
|
|
468
506
|
d,
|
|
469
507
|
!1,
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
y ? Error("react-stack-top-frame") : K,
|
|
473
|
-
y ? Y(a(t)) : ee
|
|
508
|
+
_ ? Error("react-stack-top-frame") : K,
|
|
509
|
+
_ ? D(a(t)) : ee
|
|
474
510
|
);
|
|
475
|
-
}, A.jsxs = function(t,
|
|
476
|
-
var
|
|
511
|
+
}, A.jsxs = function(t, l, d) {
|
|
512
|
+
var _ = 1e4 > z.recentlyCreatedOwnerStacks++;
|
|
477
513
|
return b(
|
|
478
514
|
t,
|
|
479
|
-
|
|
515
|
+
l,
|
|
480
516
|
d,
|
|
481
517
|
!0,
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
y ? Error("react-stack-top-frame") : K,
|
|
485
|
-
y ? Y(a(t)) : ee
|
|
518
|
+
_ ? Error("react-stack-top-frame") : K,
|
|
519
|
+
_ ? D(a(t)) : ee
|
|
486
520
|
);
|
|
487
521
|
};
|
|
488
|
-
}()), A;
|
|
522
|
+
})()), A;
|
|
489
523
|
}
|
|
490
524
|
var ie;
|
|
491
|
-
function
|
|
492
|
-
return ie || (ie = 1, process.env.NODE_ENV === "production" ?
|
|
525
|
+
function Ue() {
|
|
526
|
+
return ie || (ie = 1, process.env.NODE_ENV === "production" ? L.exports = De() : L.exports = Ge()), L.exports;
|
|
493
527
|
}
|
|
494
|
-
var
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
|
|
528
|
+
var ae = Ue();
|
|
529
|
+
const O = {}, S = {}, j = /* @__PURE__ */ new WeakMap();
|
|
530
|
+
let T = "";
|
|
531
|
+
function ve(e) {
|
|
532
|
+
return O[e] || (O[e] = /* @__PURE__ */ new Map()), O[e];
|
|
498
533
|
}
|
|
499
|
-
function
|
|
500
|
-
return
|
|
534
|
+
function ye(e) {
|
|
535
|
+
return S[e] || (S[e] = /* @__PURE__ */ new Map()), S[e];
|
|
501
536
|
}
|
|
502
|
-
const
|
|
503
|
-
children: e
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
537
|
+
const ce = ({
|
|
538
|
+
children: e
|
|
539
|
+
}) => /* @__PURE__ */ ae.jsx(ae.Fragment, { children: e });
|
|
540
|
+
function Ve({
|
|
541
|
+
schema: e,
|
|
542
|
+
ctor: r
|
|
543
|
+
}) {
|
|
544
|
+
return ye(T).delete(e), ve(T).set(e, r), null;
|
|
509
545
|
}
|
|
510
|
-
function
|
|
546
|
+
function qe({
|
|
511
547
|
schema: e,
|
|
512
548
|
val: r
|
|
513
549
|
}) {
|
|
514
|
-
|
|
515
|
-
return Ge(n).set(e, r), null;
|
|
550
|
+
return ve(T).delete(e), ye(T).set(e, r), null;
|
|
516
551
|
}
|
|
517
|
-
function
|
|
518
|
-
return (n, {
|
|
552
|
+
function tt(e, r = "") {
|
|
553
|
+
return (n, {
|
|
554
|
+
static: a,
|
|
555
|
+
kind: i,
|
|
556
|
+
name: o,
|
|
557
|
+
addInitializer: c
|
|
558
|
+
}) => {
|
|
519
559
|
if (i !== "field")
|
|
520
|
-
throw new Error("inject 装饰器只能用于类的属性字段");
|
|
560
|
+
throw new Error("[IoC] - inject 装饰器只能用于类的属性字段");
|
|
521
561
|
if (a)
|
|
522
|
-
throw new Error("inject 装饰器不能用于静态属性");
|
|
523
|
-
return function(
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
562
|
+
throw new Error("[IoC] - inject 装饰器不能用于静态属性");
|
|
563
|
+
return c(function() {
|
|
564
|
+
Object.defineProperty(this, o, {
|
|
565
|
+
get() {
|
|
566
|
+
var R;
|
|
567
|
+
j.has(this) || j.set(this, {});
|
|
568
|
+
const s = j.get(this);
|
|
569
|
+
s[o] || (s[o] = {
|
|
570
|
+
initialized: !1,
|
|
571
|
+
val: void 0
|
|
572
|
+
});
|
|
573
|
+
const f = s[o];
|
|
574
|
+
if (f.initialized) return f.val;
|
|
575
|
+
if (!Je(e, r))
|
|
576
|
+
return console.error(`[IoC] 依赖注入失败 - namespace: ${r || "默认"}, schema: ${e.description || e.type || "unknown"}`, "未注册"), f.val;
|
|
577
|
+
let u;
|
|
578
|
+
const b = (R = O[r]) == null ? void 0 : R.get(e);
|
|
579
|
+
if (b)
|
|
580
|
+
u = $(b)();
|
|
581
|
+
else {
|
|
582
|
+
const v = S[r];
|
|
583
|
+
v != null && v.has(e) && (u = v.get(e));
|
|
584
|
+
}
|
|
585
|
+
const E = e.safeParse(u);
|
|
586
|
+
return E.success ? (f.initialized = !0, f.val = u, u) : (console.error(`[IoC] 依赖注入失败 - namespace: "${r}", schema: ${e.description || "unknown"}`, E.error.issues), u);
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
}), function(s) {
|
|
590
|
+
j.has(this) || j.set(this, {});
|
|
591
|
+
const f = j.get(this);
|
|
592
|
+
return f[o] || (f[o] = {
|
|
593
|
+
initialized: !1,
|
|
594
|
+
val: s
|
|
595
|
+
}), s;
|
|
543
596
|
};
|
|
544
597
|
};
|
|
545
598
|
}
|
|
546
|
-
function
|
|
547
|
-
delete
|
|
599
|
+
function rt(e) {
|
|
600
|
+
delete O[e], delete S[e];
|
|
601
|
+
}
|
|
602
|
+
function Je(e, r = "") {
|
|
603
|
+
const n = O[r], a = S[r];
|
|
604
|
+
return !!(n != null && n.has(e) || a != null && a.has(e));
|
|
548
605
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
606
|
+
const Be = [qe, Ve];
|
|
607
|
+
function le(e) {
|
|
608
|
+
if (!e || typeof e != "object" || !("type" in e))
|
|
609
|
+
return;
|
|
610
|
+
const {
|
|
611
|
+
type: r,
|
|
612
|
+
props: n
|
|
613
|
+
} = e;
|
|
614
|
+
if (!Be.includes(r)) {
|
|
615
|
+
const i = T;
|
|
616
|
+
r === ce && (T = n.namespace || ""), Ne.toArray(n == null ? void 0 : n.children).forEach((c) => le(c)), r === ce && (T = i);
|
|
617
|
+
return;
|
|
618
|
+
}
|
|
619
|
+
const a = r(n);
|
|
620
|
+
le(a);
|
|
552
621
|
}
|
|
553
622
|
export {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
623
|
+
Ve as CInjection,
|
|
624
|
+
ce as Container,
|
|
625
|
+
qe as VInjection,
|
|
626
|
+
rt as clearNamespace,
|
|
627
|
+
le as config,
|
|
628
|
+
Ze as finalizationRegistry,
|
|
629
|
+
tt as inject,
|
|
630
|
+
Je as isRegistered,
|
|
631
|
+
ze as loader,
|
|
632
|
+
$ as provide,
|
|
633
|
+
he as useInstance,
|
|
634
|
+
et as useLoader,
|
|
635
|
+
Qe as useModel,
|
|
636
|
+
Ke as useWatcher,
|
|
637
|
+
I as watch
|
|
567
638
|
};
|