react-state-custom 1.0.9 → 1.0.11
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/index.d.ts +2 -1
- package/dist/index.es.js +336 -335
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +5 -4
- package/dist/index.umd.js.map +1 -0
- package/dist/state-utils/createAutoCtx.d.ts +47 -0
- package/dist/state-utils/createRootCtx.d.ts +37 -0
- package/dist/state-utils/ctx.d.ts +1 -1
- package/dist/state-utils/useArrayHash.d.ts +15 -0
- package/dist/state-utils/useObjectHash.d.ts +15 -1
- package/dist/state-utils/useQuickSubscribe.d.ts +17 -0
- package/package.json +6 -4
- package/src/index.ts +2 -1
- package/src/state-utils/createAutoCtx.tsx +51 -2
- package/src/state-utils/createRootCtx.tsx +38 -1
- package/src/state-utils/ctx.ts +11 -9
- package/src/state-utils/useArrayHash.ts +53 -0
- package/src/state-utils/useObjectHash.ts +24 -1
- package/src/state-utils/useQuickSubscribe.ts +60 -65
- package/vite.config.ts +8 -2
- package/dist/components/MyComponent.d.ts +0 -7
- package/dist/state-utils/useQuickSubscribeV2.d.ts +0 -2
- package/src/components/MyComponent.tsx +0 -17
- package/src/state-utils/useQuickSubscribeV2.ts +0 -93
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
var Ae = Object.defineProperty;
|
|
2
2
|
var ke = (e, t, r) => t in e ? Ae(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var Q = (e, t, r) => ke(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import Me, { useRef as
|
|
5
|
-
function De(e) {
|
|
6
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
|
-
}
|
|
4
|
+
import Me, { useRef as Ie, useMemo as z, useEffect as L, useState as G, useCallback as $e, Fragment as xe } from "react";
|
|
8
5
|
var Z = { exports: {} }, be;
|
|
9
|
-
function
|
|
6
|
+
function De() {
|
|
10
7
|
if (be) return Z.exports;
|
|
11
8
|
be = 1;
|
|
12
9
|
var e = typeof Reflect == "object" ? Reflect : null, t = e && typeof e.apply == "function" ? e.apply : function(a, o, l) {
|
|
@@ -17,8 +14,8 @@ function Fe() {
|
|
|
17
14
|
} : r = function(a) {
|
|
18
15
|
return Object.getOwnPropertyNames(a);
|
|
19
16
|
};
|
|
20
|
-
function u(
|
|
21
|
-
console && console.warn && console.warn(
|
|
17
|
+
function u(i) {
|
|
18
|
+
console && console.warn && console.warn(i);
|
|
22
19
|
}
|
|
23
20
|
var f = Number.isNaN || function(a) {
|
|
24
21
|
return a !== a;
|
|
@@ -28,19 +25,19 @@ function Fe() {
|
|
|
28
25
|
}
|
|
29
26
|
Z.exports = n, Z.exports.once = N, n.EventEmitter = n, n.prototype._events = void 0, n.prototype._eventsCount = 0, n.prototype._maxListeners = void 0;
|
|
30
27
|
var c = 10;
|
|
31
|
-
function d(
|
|
32
|
-
if (typeof
|
|
33
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof
|
|
28
|
+
function d(i) {
|
|
29
|
+
if (typeof i != "function")
|
|
30
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof i);
|
|
34
31
|
}
|
|
35
32
|
Object.defineProperty(n, "defaultMaxListeners", {
|
|
36
33
|
enumerable: !0,
|
|
37
34
|
get: function() {
|
|
38
35
|
return c;
|
|
39
36
|
},
|
|
40
|
-
set: function(
|
|
41
|
-
if (typeof
|
|
42
|
-
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' +
|
|
43
|
-
c =
|
|
37
|
+
set: function(i) {
|
|
38
|
+
if (typeof i != "number" || i < 0 || f(i))
|
|
39
|
+
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + i + ".");
|
|
40
|
+
c = i;
|
|
44
41
|
}
|
|
45
42
|
}), n.init = function() {
|
|
46
43
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
@@ -49,16 +46,16 @@ function Fe() {
|
|
|
49
46
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + a + ".");
|
|
50
47
|
return this._maxListeners = a, this;
|
|
51
48
|
};
|
|
52
|
-
function p(
|
|
53
|
-
return
|
|
49
|
+
function p(i) {
|
|
50
|
+
return i._maxListeners === void 0 ? n.defaultMaxListeners : i._maxListeners;
|
|
54
51
|
}
|
|
55
52
|
n.prototype.getMaxListeners = function() {
|
|
56
53
|
return p(this);
|
|
57
54
|
}, n.prototype.emit = function(a) {
|
|
58
55
|
for (var o = [], l = 1; l < arguments.length; l++) o.push(arguments[l]);
|
|
59
|
-
var h = a === "error",
|
|
60
|
-
if (
|
|
61
|
-
h = h &&
|
|
56
|
+
var h = a === "error", g = this._events;
|
|
57
|
+
if (g !== void 0)
|
|
58
|
+
h = h && g.error === void 0;
|
|
62
59
|
else if (!h)
|
|
63
60
|
return !1;
|
|
64
61
|
if (h) {
|
|
@@ -68,42 +65,42 @@ function Fe() {
|
|
|
68
65
|
var j = new Error("Unhandled error." + (b ? " (" + b.message + ")" : ""));
|
|
69
66
|
throw j.context = b, j;
|
|
70
67
|
}
|
|
71
|
-
var A =
|
|
68
|
+
var A = g[a];
|
|
72
69
|
if (A === void 0)
|
|
73
70
|
return !1;
|
|
74
71
|
if (typeof A == "function")
|
|
75
72
|
t(A, this, o);
|
|
76
73
|
else
|
|
77
|
-
for (var B = A.length,
|
|
78
|
-
t(
|
|
74
|
+
for (var B = A.length, U = M(A, B), l = 0; l < B; ++l)
|
|
75
|
+
t(U[l], this, o);
|
|
79
76
|
return !0;
|
|
80
77
|
};
|
|
81
|
-
function v(
|
|
82
|
-
var h,
|
|
83
|
-
if (d(o),
|
|
78
|
+
function v(i, a, o, l) {
|
|
79
|
+
var h, g, b;
|
|
80
|
+
if (d(o), g = i._events, g === void 0 ? (g = i._events = /* @__PURE__ */ Object.create(null), i._eventsCount = 0) : (g.newListener !== void 0 && (i.emit(
|
|
84
81
|
"newListener",
|
|
85
82
|
a,
|
|
86
83
|
o.listener ? o.listener : o
|
|
87
|
-
),
|
|
88
|
-
b =
|
|
89
|
-
else if (typeof b == "function" ? b =
|
|
84
|
+
), g = i._events), b = g[a]), b === void 0)
|
|
85
|
+
b = g[a] = o, ++i._eventsCount;
|
|
86
|
+
else if (typeof b == "function" ? b = g[a] = l ? [o, b] : [b, o] : l ? b.unshift(o) : b.push(o), h = p(i), h > 0 && b.length > h && !b.warned) {
|
|
90
87
|
b.warned = !0;
|
|
91
88
|
var j = new Error("Possible EventEmitter memory leak detected. " + b.length + " " + String(a) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
92
|
-
j.name = "MaxListenersExceededWarning", j.emitter =
|
|
89
|
+
j.name = "MaxListenersExceededWarning", j.emitter = i, j.type = a, j.count = b.length, u(j);
|
|
93
90
|
}
|
|
94
|
-
return
|
|
91
|
+
return i;
|
|
95
92
|
}
|
|
96
93
|
n.prototype.addListener = function(a, o) {
|
|
97
94
|
return v(this, a, o, !1);
|
|
98
95
|
}, n.prototype.on = n.prototype.addListener, n.prototype.prependListener = function(a, o) {
|
|
99
96
|
return v(this, a, o, !0);
|
|
100
97
|
};
|
|
101
|
-
function
|
|
98
|
+
function _() {
|
|
102
99
|
if (!this.fired)
|
|
103
100
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
104
101
|
}
|
|
105
|
-
function E(
|
|
106
|
-
var l = { fired: !1, wrapFn: void 0, target:
|
|
102
|
+
function E(i, a, o) {
|
|
103
|
+
var l = { fired: !1, wrapFn: void 0, target: i, type: a, listener: o }, h = _.bind(l);
|
|
107
104
|
return h.listener = o, l.wrapFn = h, h;
|
|
108
105
|
}
|
|
109
106
|
n.prototype.once = function(a, o) {
|
|
@@ -111,7 +108,7 @@ function Fe() {
|
|
|
111
108
|
}, n.prototype.prependOnceListener = function(a, o) {
|
|
112
109
|
return d(o), this.prependListener(a, E(this, a, o)), this;
|
|
113
110
|
}, n.prototype.removeListener = function(a, o) {
|
|
114
|
-
var l, h,
|
|
111
|
+
var l, h, g, b, j;
|
|
115
112
|
if (d(o), h = this._events, h === void 0)
|
|
116
113
|
return this;
|
|
117
114
|
if (l = h[a], l === void 0)
|
|
@@ -119,14 +116,14 @@ function Fe() {
|
|
|
119
116
|
if (l === o || l.listener === o)
|
|
120
117
|
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete h[a], h.removeListener && this.emit("removeListener", a, l.listener || o));
|
|
121
118
|
else if (typeof l != "function") {
|
|
122
|
-
for (
|
|
119
|
+
for (g = -1, b = l.length - 1; b >= 0; b--)
|
|
123
120
|
if (l[b] === o || l[b].listener === o) {
|
|
124
|
-
j = l[b].listener,
|
|
121
|
+
j = l[b].listener, g = b;
|
|
125
122
|
break;
|
|
126
123
|
}
|
|
127
|
-
if (
|
|
124
|
+
if (g < 0)
|
|
128
125
|
return this;
|
|
129
|
-
|
|
126
|
+
g === 0 ? l.shift() : y(l, g), l.length === 1 && (h[a] = l[0]), h.removeListener !== void 0 && this.emit("removeListener", a, j || o);
|
|
130
127
|
}
|
|
131
128
|
return this;
|
|
132
129
|
}, n.prototype.off = n.prototype.removeListener, n.prototype.removeAllListeners = function(a) {
|
|
@@ -136,9 +133,9 @@ function Fe() {
|
|
|
136
133
|
if (l.removeListener === void 0)
|
|
137
134
|
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : l[a] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete l[a]), this;
|
|
138
135
|
if (arguments.length === 0) {
|
|
139
|
-
var
|
|
140
|
-
for (h = 0; h <
|
|
141
|
-
b =
|
|
136
|
+
var g = Object.keys(l), b;
|
|
137
|
+
for (h = 0; h < g.length; ++h)
|
|
138
|
+
b = g[h], b !== "removeListener" && this.removeAllListeners(b);
|
|
142
139
|
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
143
140
|
}
|
|
144
141
|
if (o = l[a], typeof o == "function")
|
|
@@ -148,8 +145,8 @@ function Fe() {
|
|
|
148
145
|
this.removeListener(a, o[h]);
|
|
149
146
|
return this;
|
|
150
147
|
};
|
|
151
|
-
function T(
|
|
152
|
-
var l =
|
|
148
|
+
function T(i, a, o) {
|
|
149
|
+
var l = i._events;
|
|
153
150
|
if (l === void 0)
|
|
154
151
|
return [];
|
|
155
152
|
var h = l[a];
|
|
@@ -159,13 +156,13 @@ function Fe() {
|
|
|
159
156
|
return T(this, a, !0);
|
|
160
157
|
}, n.prototype.rawListeners = function(a) {
|
|
161
158
|
return T(this, a, !1);
|
|
162
|
-
}, n.listenerCount = function(
|
|
163
|
-
return typeof
|
|
159
|
+
}, n.listenerCount = function(i, a) {
|
|
160
|
+
return typeof i.listenerCount == "function" ? i.listenerCount(a) : C.call(i, a);
|
|
164
161
|
}, n.prototype.listenerCount = C;
|
|
165
|
-
function C(
|
|
162
|
+
function C(i) {
|
|
166
163
|
var a = this._events;
|
|
167
164
|
if (a !== void 0) {
|
|
168
|
-
var o = a[
|
|
165
|
+
var o = a[i];
|
|
169
166
|
if (typeof o == "function")
|
|
170
167
|
return 1;
|
|
171
168
|
if (o !== void 0)
|
|
@@ -176,124 +173,122 @@ function Fe() {
|
|
|
176
173
|
n.prototype.eventNames = function() {
|
|
177
174
|
return this._eventsCount > 0 ? r(this._events) : [];
|
|
178
175
|
};
|
|
179
|
-
function M(
|
|
176
|
+
function M(i, a) {
|
|
180
177
|
for (var o = new Array(a), l = 0; l < a; ++l)
|
|
181
|
-
o[l] =
|
|
178
|
+
o[l] = i[l];
|
|
182
179
|
return o;
|
|
183
180
|
}
|
|
184
|
-
function y(
|
|
185
|
-
for (; a + 1 <
|
|
186
|
-
|
|
187
|
-
|
|
181
|
+
function y(i, a) {
|
|
182
|
+
for (; a + 1 < i.length; a++)
|
|
183
|
+
i[a] = i[a + 1];
|
|
184
|
+
i.pop();
|
|
188
185
|
}
|
|
189
|
-
function O(
|
|
190
|
-
for (var a = new Array(
|
|
191
|
-
a[o] =
|
|
186
|
+
function O(i) {
|
|
187
|
+
for (var a = new Array(i.length), o = 0; o < a.length; ++o)
|
|
188
|
+
a[o] = i[o].listener || i[o];
|
|
192
189
|
return a;
|
|
193
190
|
}
|
|
194
|
-
function N(
|
|
191
|
+
function N(i, a) {
|
|
195
192
|
return new Promise(function(o, l) {
|
|
196
193
|
function h(b) {
|
|
197
|
-
|
|
194
|
+
i.removeListener(a, g), l(b);
|
|
198
195
|
}
|
|
199
|
-
function
|
|
200
|
-
typeof
|
|
196
|
+
function g() {
|
|
197
|
+
typeof i.removeListener == "function" && i.removeListener("error", h), o([].slice.call(arguments));
|
|
201
198
|
}
|
|
202
|
-
D(
|
|
199
|
+
D(i, a, g, { once: !0 }), a !== "error" && x(i, h, { once: !0 });
|
|
203
200
|
});
|
|
204
201
|
}
|
|
205
|
-
function x(
|
|
206
|
-
typeof
|
|
202
|
+
function x(i, a, o) {
|
|
203
|
+
typeof i.on == "function" && D(i, "error", a, o);
|
|
207
204
|
}
|
|
208
|
-
function D(
|
|
209
|
-
if (typeof
|
|
210
|
-
l.once ?
|
|
211
|
-
else if (typeof
|
|
212
|
-
|
|
213
|
-
l.once &&
|
|
205
|
+
function D(i, a, o, l) {
|
|
206
|
+
if (typeof i.on == "function")
|
|
207
|
+
l.once ? i.once(a, o) : i.on(a, o);
|
|
208
|
+
else if (typeof i.addEventListener == "function")
|
|
209
|
+
i.addEventListener(a, function h(g) {
|
|
210
|
+
l.once && i.removeEventListener(a, h), o(g);
|
|
214
211
|
});
|
|
215
212
|
else
|
|
216
|
-
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof
|
|
213
|
+
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof i);
|
|
217
214
|
}
|
|
218
215
|
return Z.exports;
|
|
219
216
|
}
|
|
220
|
-
var We =
|
|
221
|
-
|
|
222
|
-
var
|
|
223
|
-
function Ve(e) {
|
|
224
|
-
var t = Ue.call(e, q), r = e[q];
|
|
217
|
+
var Fe = De(), We = typeof global == "object" && global && global.Object === Object && global, ze = typeof self == "object" && self && self.Object === Object && self, re = We || ze || Function("return this")(), te = re.Symbol, Se = Object.prototype, Ye = Se.hasOwnProperty, Ge = Se.toString, V = te ? te.toStringTag : void 0;
|
|
218
|
+
function He(e) {
|
|
219
|
+
var t = Ye.call(e, V), r = e[V];
|
|
225
220
|
try {
|
|
226
|
-
e[
|
|
221
|
+
e[V] = void 0;
|
|
227
222
|
var u = !0;
|
|
228
223
|
} catch {
|
|
229
224
|
}
|
|
230
|
-
var f =
|
|
231
|
-
return u && (t ? e[
|
|
225
|
+
var f = Ge.call(e);
|
|
226
|
+
return u && (t ? e[V] = r : delete e[V]), f;
|
|
232
227
|
}
|
|
233
|
-
var
|
|
234
|
-
function
|
|
235
|
-
return
|
|
228
|
+
var Ue = Object.prototype, Ve = Ue.toString;
|
|
229
|
+
function qe(e) {
|
|
230
|
+
return Ve.call(e);
|
|
236
231
|
}
|
|
237
|
-
var
|
|
232
|
+
var Je = "[object Null]", Xe = "[object Undefined]", _e = te ? te.toStringTag : void 0;
|
|
238
233
|
function je(e) {
|
|
239
|
-
return e == null ? e === void 0 ?
|
|
234
|
+
return e == null ? e === void 0 ? Xe : Je : _e && _e in Object(e) ? He(e) : qe(e);
|
|
240
235
|
}
|
|
241
|
-
function
|
|
236
|
+
function Ke(e) {
|
|
242
237
|
return e != null && typeof e == "object";
|
|
243
238
|
}
|
|
244
|
-
var
|
|
245
|
-
function
|
|
246
|
-
return typeof e == "symbol" ||
|
|
239
|
+
var Be = "[object Symbol]";
|
|
240
|
+
function Qe(e) {
|
|
241
|
+
return typeof e == "symbol" || Ke(e) && je(e) == Be;
|
|
247
242
|
}
|
|
248
|
-
var
|
|
249
|
-
function
|
|
250
|
-
for (var t = e.length; t-- &&
|
|
243
|
+
var Ze = /\s/;
|
|
244
|
+
function et(e) {
|
|
245
|
+
for (var t = e.length; t-- && Ze.test(e.charAt(t)); )
|
|
251
246
|
;
|
|
252
247
|
return t;
|
|
253
248
|
}
|
|
254
|
-
var
|
|
255
|
-
function
|
|
256
|
-
return e && e.slice(0,
|
|
249
|
+
var tt = /^\s+/;
|
|
250
|
+
function rt(e) {
|
|
251
|
+
return e && e.slice(0, et(e) + 1).replace(tt, "");
|
|
257
252
|
}
|
|
258
|
-
function
|
|
253
|
+
function X(e) {
|
|
259
254
|
var t = typeof e;
|
|
260
255
|
return e != null && (t == "object" || t == "function");
|
|
261
256
|
}
|
|
262
|
-
var
|
|
257
|
+
var ge = NaN, nt = /^[-+]0x[0-9a-f]+$/i, ot = /^0b[01]+$/i, at = /^0o[0-7]+$/i, st = parseInt;
|
|
263
258
|
function ye(e) {
|
|
264
259
|
if (typeof e == "number")
|
|
265
260
|
return e;
|
|
266
|
-
if (
|
|
267
|
-
return
|
|
268
|
-
if (
|
|
261
|
+
if (Qe(e))
|
|
262
|
+
return ge;
|
|
263
|
+
if (X(e)) {
|
|
269
264
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
270
|
-
e =
|
|
265
|
+
e = X(t) ? t + "" : t;
|
|
271
266
|
}
|
|
272
267
|
if (typeof e != "string")
|
|
273
268
|
return e === 0 ? e : +e;
|
|
274
|
-
e =
|
|
275
|
-
var r =
|
|
276
|
-
return r ||
|
|
269
|
+
e = rt(e);
|
|
270
|
+
var r = ot.test(e);
|
|
271
|
+
return r || at.test(e) ? st(e.slice(2), r ? 2 : 8) : nt.test(e) ? ge : +e;
|
|
277
272
|
}
|
|
278
|
-
var
|
|
279
|
-
function
|
|
280
|
-
if (!
|
|
273
|
+
var it = "[object AsyncFunction]", ut = "[object Function]", ct = "[object GeneratorFunction]", ft = "[object Proxy]";
|
|
274
|
+
function lt(e) {
|
|
275
|
+
if (!X(e))
|
|
281
276
|
return !1;
|
|
282
277
|
var t = je(e);
|
|
283
|
-
return t ==
|
|
278
|
+
return t == ut || t == ct || t == it || t == ft;
|
|
284
279
|
}
|
|
285
280
|
var ce = re["__core-js_shared__"], Ee = function() {
|
|
286
281
|
var e = /[^.]+$/.exec(ce && ce.keys && ce.keys.IE_PROTO || "");
|
|
287
282
|
return e ? "Symbol(src)_1." + e : "";
|
|
288
283
|
}();
|
|
289
|
-
function
|
|
284
|
+
function dt(e) {
|
|
290
285
|
return !!Ee && Ee in e;
|
|
291
286
|
}
|
|
292
|
-
var
|
|
293
|
-
function
|
|
287
|
+
var ht = Function.prototype, pt = ht.toString;
|
|
288
|
+
function vt(e) {
|
|
294
289
|
if (e != null) {
|
|
295
290
|
try {
|
|
296
|
-
return
|
|
291
|
+
return pt.call(e);
|
|
297
292
|
} catch {
|
|
298
293
|
}
|
|
299
294
|
try {
|
|
@@ -303,89 +298,89 @@ function bt(e) {
|
|
|
303
298
|
}
|
|
304
299
|
return "";
|
|
305
300
|
}
|
|
306
|
-
var
|
|
307
|
-
"^" +
|
|
301
|
+
var mt = /[\\^$.*+?()[\]{}|]/g, bt = /^\[object .+?Constructor\]$/, _t = Function.prototype, gt = Object.prototype, yt = _t.toString, Et = gt.hasOwnProperty, wt = RegExp(
|
|
302
|
+
"^" + yt.call(Et).replace(mt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
308
303
|
);
|
|
309
|
-
function
|
|
310
|
-
if (!
|
|
304
|
+
function Tt(e) {
|
|
305
|
+
if (!X(e) || dt(e))
|
|
311
306
|
return !1;
|
|
312
|
-
var t =
|
|
313
|
-
return t.test(
|
|
307
|
+
var t = lt(e) ? wt : bt;
|
|
308
|
+
return t.test(vt(e));
|
|
314
309
|
}
|
|
315
|
-
function
|
|
310
|
+
function Ot(e, t) {
|
|
316
311
|
return e == null ? void 0 : e[t];
|
|
317
312
|
}
|
|
318
313
|
function Ce(e, t) {
|
|
319
|
-
var r =
|
|
320
|
-
return
|
|
314
|
+
var r = Ot(e, t);
|
|
315
|
+
return Tt(r) ? r : void 0;
|
|
321
316
|
}
|
|
322
|
-
function
|
|
317
|
+
function Rt(e, t) {
|
|
323
318
|
return e === t || e !== e && t !== t;
|
|
324
319
|
}
|
|
325
320
|
var K = Ce(Object, "create");
|
|
326
|
-
function
|
|
321
|
+
function St() {
|
|
327
322
|
this.__data__ = K ? K(null) : {}, this.size = 0;
|
|
328
323
|
}
|
|
329
|
-
function
|
|
324
|
+
function jt(e) {
|
|
330
325
|
var t = this.has(e) && delete this.__data__[e];
|
|
331
326
|
return this.size -= t ? 1 : 0, t;
|
|
332
327
|
}
|
|
333
|
-
var
|
|
334
|
-
function
|
|
328
|
+
var Ct = "__lodash_hash_undefined__", Lt = Object.prototype, Pt = Lt.hasOwnProperty;
|
|
329
|
+
function Nt(e) {
|
|
335
330
|
var t = this.__data__;
|
|
336
331
|
if (K) {
|
|
337
332
|
var r = t[e];
|
|
338
|
-
return r ===
|
|
333
|
+
return r === Ct ? void 0 : r;
|
|
339
334
|
}
|
|
340
|
-
return
|
|
335
|
+
return Pt.call(t, e) ? t[e] : void 0;
|
|
341
336
|
}
|
|
342
|
-
var
|
|
343
|
-
function
|
|
337
|
+
var At = Object.prototype, kt = At.hasOwnProperty;
|
|
338
|
+
function Mt(e) {
|
|
344
339
|
var t = this.__data__;
|
|
345
|
-
return K ? t[e] !== void 0 :
|
|
340
|
+
return K ? t[e] !== void 0 : kt.call(t, e);
|
|
346
341
|
}
|
|
347
|
-
var
|
|
348
|
-
function
|
|
342
|
+
var It = "__lodash_hash_undefined__";
|
|
343
|
+
function $t(e, t) {
|
|
349
344
|
var r = this.__data__;
|
|
350
|
-
return this.size += this.has(e) ? 0 : 1, r[e] = K && t === void 0 ?
|
|
345
|
+
return this.size += this.has(e) ? 0 : 1, r[e] = K && t === void 0 ? It : t, this;
|
|
351
346
|
}
|
|
352
|
-
function
|
|
347
|
+
function I(e) {
|
|
353
348
|
var t = -1, r = e == null ? 0 : e.length;
|
|
354
349
|
for (this.clear(); ++t < r; ) {
|
|
355
350
|
var u = e[t];
|
|
356
351
|
this.set(u[0], u[1]);
|
|
357
352
|
}
|
|
358
353
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
function
|
|
354
|
+
I.prototype.clear = St;
|
|
355
|
+
I.prototype.delete = jt;
|
|
356
|
+
I.prototype.get = Nt;
|
|
357
|
+
I.prototype.has = Mt;
|
|
358
|
+
I.prototype.set = $t;
|
|
359
|
+
function xt() {
|
|
365
360
|
this.__data__ = [], this.size = 0;
|
|
366
361
|
}
|
|
367
362
|
function ne(e, t) {
|
|
368
363
|
for (var r = e.length; r--; )
|
|
369
|
-
if (
|
|
364
|
+
if (Rt(e[r][0], t))
|
|
370
365
|
return r;
|
|
371
366
|
return -1;
|
|
372
367
|
}
|
|
373
|
-
var
|
|
374
|
-
function
|
|
368
|
+
var Dt = Array.prototype, Ft = Dt.splice;
|
|
369
|
+
function Wt(e) {
|
|
375
370
|
var t = this.__data__, r = ne(t, e);
|
|
376
371
|
if (r < 0)
|
|
377
372
|
return !1;
|
|
378
373
|
var u = t.length - 1;
|
|
379
|
-
return r == u ? t.pop() :
|
|
374
|
+
return r == u ? t.pop() : Ft.call(t, r, 1), --this.size, !0;
|
|
380
375
|
}
|
|
381
|
-
function
|
|
376
|
+
function zt(e) {
|
|
382
377
|
var t = this.__data__, r = ne(t, e);
|
|
383
378
|
return r < 0 ? void 0 : t[r][1];
|
|
384
379
|
}
|
|
385
|
-
function
|
|
380
|
+
function Yt(e) {
|
|
386
381
|
return ne(this.__data__, e) > -1;
|
|
387
382
|
}
|
|
388
|
-
function
|
|
383
|
+
function Gt(e, t) {
|
|
389
384
|
var r = this.__data__, u = ne(r, e);
|
|
390
385
|
return u < 0 ? (++this.size, r.push([e, t])) : r[u][1] = t, this;
|
|
391
386
|
}
|
|
@@ -396,57 +391,57 @@ function H(e) {
|
|
|
396
391
|
this.set(u[0], u[1]);
|
|
397
392
|
}
|
|
398
393
|
}
|
|
399
|
-
H.prototype.clear =
|
|
400
|
-
H.prototype.delete =
|
|
401
|
-
H.prototype.get =
|
|
402
|
-
H.prototype.has =
|
|
403
|
-
H.prototype.set =
|
|
404
|
-
var
|
|
405
|
-
function
|
|
394
|
+
H.prototype.clear = xt;
|
|
395
|
+
H.prototype.delete = Wt;
|
|
396
|
+
H.prototype.get = zt;
|
|
397
|
+
H.prototype.has = Yt;
|
|
398
|
+
H.prototype.set = Gt;
|
|
399
|
+
var Ht = Ce(re, "Map");
|
|
400
|
+
function Ut() {
|
|
406
401
|
this.size = 0, this.__data__ = {
|
|
407
|
-
hash: new
|
|
408
|
-
map: new (
|
|
409
|
-
string: new
|
|
402
|
+
hash: new I(),
|
|
403
|
+
map: new (Ht || H)(),
|
|
404
|
+
string: new I()
|
|
410
405
|
};
|
|
411
406
|
}
|
|
412
|
-
function
|
|
407
|
+
function Vt(e) {
|
|
413
408
|
var t = typeof e;
|
|
414
409
|
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
|
415
410
|
}
|
|
416
411
|
function oe(e, t) {
|
|
417
412
|
var r = e.__data__;
|
|
418
|
-
return
|
|
413
|
+
return Vt(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
|
|
419
414
|
}
|
|
420
|
-
function
|
|
415
|
+
function qt(e) {
|
|
421
416
|
var t = oe(this, e).delete(e);
|
|
422
417
|
return this.size -= t ? 1 : 0, t;
|
|
423
418
|
}
|
|
424
|
-
function
|
|
419
|
+
function Jt(e) {
|
|
425
420
|
return oe(this, e).get(e);
|
|
426
421
|
}
|
|
427
|
-
function
|
|
422
|
+
function Xt(e) {
|
|
428
423
|
return oe(this, e).has(e);
|
|
429
424
|
}
|
|
430
|
-
function
|
|
425
|
+
function Kt(e, t) {
|
|
431
426
|
var r = oe(this, e), u = r.size;
|
|
432
427
|
return r.set(e, t), this.size += r.size == u ? 0 : 1, this;
|
|
433
428
|
}
|
|
434
|
-
function
|
|
429
|
+
function $(e) {
|
|
435
430
|
var t = -1, r = e == null ? 0 : e.length;
|
|
436
431
|
for (this.clear(); ++t < r; ) {
|
|
437
432
|
var u = e[t];
|
|
438
433
|
this.set(u[0], u[1]);
|
|
439
434
|
}
|
|
440
435
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
var
|
|
436
|
+
$.prototype.clear = Ut;
|
|
437
|
+
$.prototype.delete = qt;
|
|
438
|
+
$.prototype.get = Jt;
|
|
439
|
+
$.prototype.has = Xt;
|
|
440
|
+
$.prototype.set = Kt;
|
|
441
|
+
var Bt = "Expected a function";
|
|
447
442
|
function le(e, t) {
|
|
448
443
|
if (typeof e != "function" || t != null && typeof t != "function")
|
|
449
|
-
throw new TypeError(
|
|
444
|
+
throw new TypeError(Bt);
|
|
450
445
|
var r = function() {
|
|
451
446
|
var u = arguments, f = t ? t.apply(this, u) : u[0], n = r.cache;
|
|
452
447
|
if (n.has(f))
|
|
@@ -454,27 +449,27 @@ function le(e, t) {
|
|
|
454
449
|
var c = e.apply(this, u);
|
|
455
450
|
return r.cache = n.set(f, c) || n, c;
|
|
456
451
|
};
|
|
457
|
-
return r.cache = new (le.Cache ||
|
|
452
|
+
return r.cache = new (le.Cache || $)(), r;
|
|
458
453
|
}
|
|
459
|
-
le.Cache =
|
|
454
|
+
le.Cache = $;
|
|
460
455
|
var fe = function() {
|
|
461
456
|
return re.Date.now();
|
|
462
|
-
},
|
|
457
|
+
}, Qt = "Expected a function", Zt = Math.max, er = Math.min;
|
|
463
458
|
function ae(e, t, r) {
|
|
464
|
-
var u, f, n, c, d, p, v = 0,
|
|
459
|
+
var u, f, n, c, d, p, v = 0, _ = !1, E = !1, T = !0;
|
|
465
460
|
if (typeof e != "function")
|
|
466
|
-
throw new TypeError(
|
|
467
|
-
t = ye(t) || 0,
|
|
461
|
+
throw new TypeError(Qt);
|
|
462
|
+
t = ye(t) || 0, X(r) && (_ = !!r.leading, E = "maxWait" in r, n = E ? Zt(ye(r.maxWait) || 0, t) : n, T = "trailing" in r ? !!r.trailing : T);
|
|
468
463
|
function C(o) {
|
|
469
464
|
var l = u, h = f;
|
|
470
465
|
return u = f = void 0, v = o, c = e.apply(h, l), c;
|
|
471
466
|
}
|
|
472
467
|
function M(o) {
|
|
473
|
-
return v = o, d = setTimeout(N, t),
|
|
468
|
+
return v = o, d = setTimeout(N, t), _ ? C(o) : c;
|
|
474
469
|
}
|
|
475
470
|
function y(o) {
|
|
476
|
-
var l = o - p, h = o - v,
|
|
477
|
-
return E ?
|
|
471
|
+
var l = o - p, h = o - v, g = t - l;
|
|
472
|
+
return E ? er(g, n - h) : g;
|
|
478
473
|
}
|
|
479
474
|
function O(o) {
|
|
480
475
|
var l = o - p, h = o - v;
|
|
@@ -492,7 +487,7 @@ function ae(e, t, r) {
|
|
|
492
487
|
function D() {
|
|
493
488
|
d !== void 0 && clearTimeout(d), v = 0, u = p = f = d = void 0;
|
|
494
489
|
}
|
|
495
|
-
function
|
|
490
|
+
function i() {
|
|
496
491
|
return d === void 0 ? c : x(fe());
|
|
497
492
|
}
|
|
498
493
|
function a() {
|
|
@@ -505,21 +500,17 @@ function ae(e, t, r) {
|
|
|
505
500
|
}
|
|
506
501
|
return d === void 0 && (d = setTimeout(N, t)), c;
|
|
507
502
|
}
|
|
508
|
-
return a.cancel = D, a.flush =
|
|
509
|
-
}
|
|
510
|
-
var nr = "Expected a function";
|
|
511
|
-
function or(e, t, r) {
|
|
512
|
-
var u = !0, f = !0;
|
|
513
|
-
if (typeof e != "function")
|
|
514
|
-
throw new TypeError(nr);
|
|
515
|
-
return G(r) && (u = "leading" in r ? !!r.leading : u, f = "trailing" in r ? !!r.trailing : f), ae(e, t, {
|
|
516
|
-
leading: u,
|
|
517
|
-
maxWait: t,
|
|
518
|
-
trailing: f
|
|
519
|
-
});
|
|
503
|
+
return a.cancel = D, a.flush = i, a;
|
|
520
504
|
}
|
|
521
|
-
const we = () => Math.random().toString().slice(2),
|
|
522
|
-
const { current: { computedHash: t } } =
|
|
505
|
+
const we = () => Math.random().toString().slice(2), tr = (e) => {
|
|
506
|
+
const { current: { computedHash: t } } = Ie({
|
|
507
|
+
/**
|
|
508
|
+
* Getter for the computed hash function.
|
|
509
|
+
*
|
|
510
|
+
* - Initializes with an empty array and a random hash.
|
|
511
|
+
* - Returns a function that compares the current array to the previous one.
|
|
512
|
+
* - Updates the hash if any difference is detected.
|
|
513
|
+
*/
|
|
523
514
|
get computedHash() {
|
|
524
515
|
let r = [], u = we();
|
|
525
516
|
return (f) => {
|
|
@@ -530,13 +521,13 @@ const we = () => Math.random().toString().slice(2), ar = (e) => {
|
|
|
530
521
|
});
|
|
531
522
|
return t(e);
|
|
532
523
|
};
|
|
533
|
-
class
|
|
524
|
+
class rr {
|
|
534
525
|
/**
|
|
535
526
|
* Create a new Context instance.
|
|
536
527
|
* @param name - The name of the context (for debugging).
|
|
537
528
|
*/
|
|
538
529
|
constructor(t) {
|
|
539
|
-
Q(this, "event", new
|
|
530
|
+
Q(this, "event", new Fe.EventEmitter());
|
|
540
531
|
/**
|
|
541
532
|
* The current data held by the context.
|
|
542
533
|
*/
|
|
@@ -568,7 +559,7 @@ class ir {
|
|
|
568
559
|
return this.event.addListener(String(t), u), t in this.data && r(this.data[t]), () => (this.event.removeListener(String(t), u), void 0);
|
|
569
560
|
}
|
|
570
561
|
}
|
|
571
|
-
const
|
|
562
|
+
const nr = le((e) => new rr(e)), Y = (e = "noname") => z(() => nr(e), [e]), Le = (e, ...t) => {
|
|
572
563
|
const r = new Error("[ctx] useRegistryChecker failed " + JSON.stringify({ names: t, ctx: (e == null ? void 0 : e.name) ?? "undefined" }));
|
|
573
564
|
L(
|
|
574
565
|
() => {
|
|
@@ -579,12 +570,12 @@ const sr = le((e) => new ir(e)), Y = (e = "noname") => z(() => sr(e), [e]), Le =
|
|
|
579
570
|
},
|
|
580
571
|
[e, t.length]
|
|
581
572
|
);
|
|
582
|
-
},
|
|
573
|
+
}, dr = (e, t, r) => {
|
|
583
574
|
L(() => {
|
|
584
575
|
e && e.data[t] != r && e.publish(t, r);
|
|
585
576
|
}, [t, r, e]), Le(e, t);
|
|
586
|
-
},
|
|
587
|
-
const [{ value: u }, f] =
|
|
577
|
+
}, or = (e, t, r = 0) => {
|
|
578
|
+
const [{ value: u }, f] = G(() => {
|
|
588
579
|
var n;
|
|
589
580
|
return { value: (n = e == null ? void 0 : e.data) == null ? void 0 : n[t] };
|
|
590
581
|
});
|
|
@@ -596,8 +587,8 @@ const sr = le((e) => new ir(e)), Y = (e = "noname") => z(() => sr(e), [e]), Le =
|
|
|
596
587
|
};
|
|
597
588
|
}
|
|
598
589
|
}, [t, e]), e == null ? void 0 : e.data[t];
|
|
599
|
-
},
|
|
600
|
-
const [, u] =
|
|
590
|
+
}, hr = (e, t, r) => {
|
|
591
|
+
const [, u] = G(0), f = z(
|
|
601
592
|
() => r(e == null ? void 0 : e.data[t]),
|
|
602
593
|
[r, e == null ? void 0 : e.data[t]]
|
|
603
594
|
);
|
|
@@ -615,9 +606,9 @@ const sr = le((e) => new ir(e)), Y = (e = "noname") => z(() => sr(e), [e]), Le =
|
|
|
615
606
|
if (e)
|
|
616
607
|
for (let [r, u] of t)
|
|
617
608
|
e.data[r] != u && e.publish(r, u);
|
|
618
|
-
}, [e,
|
|
619
|
-
},
|
|
620
|
-
const [, r] =
|
|
609
|
+
}, [e, tr(t.flat())]), Le(e, ...t.map((r) => r[0]));
|
|
610
|
+
}, pr = (e, ...t) => {
|
|
611
|
+
const [, r] = G(0), u = t.map((f) => {
|
|
621
612
|
var n;
|
|
622
613
|
return (n = e == null ? void 0 : e.data) == null ? void 0 : n[f];
|
|
623
614
|
});
|
|
@@ -626,10 +617,10 @@ const sr = le((e) => new ir(e)), Y = (e = "noname") => z(() => sr(e), [e]), Le =
|
|
|
626
617
|
let f = u;
|
|
627
618
|
const n = ae(() => {
|
|
628
619
|
let p = t.map((v) => {
|
|
629
|
-
var
|
|
630
|
-
return (
|
|
620
|
+
var _;
|
|
621
|
+
return (_ = e == null ? void 0 : e.data) == null ? void 0 : _[v];
|
|
631
622
|
});
|
|
632
|
-
t.some((v,
|
|
623
|
+
t.some((v, _) => f[_] != p[_]) && (f = p, r((v) => v + 1));
|
|
633
624
|
}, 1);
|
|
634
625
|
let c = t.map((p) => e.subscribe(p, n)), d = setTimeout(n, 1);
|
|
635
626
|
return () => {
|
|
@@ -637,20 +628,20 @@ const sr = le((e) => new ir(e)), Y = (e = "noname") => z(() => sr(e), [e]), Le =
|
|
|
637
628
|
};
|
|
638
629
|
}
|
|
639
630
|
}, [e, ...t]), Object.fromEntries(t.map((f, n) => [f, u[n]]));
|
|
640
|
-
},
|
|
641
|
-
const [, u] =
|
|
631
|
+
}, vr = (e, t = 50, ...r) => {
|
|
632
|
+
const [, u] = G(0), f = r.map((n) => {
|
|
642
633
|
var c;
|
|
643
634
|
return (c = e == null ? void 0 : e.data) == null ? void 0 : c[n];
|
|
644
635
|
});
|
|
645
636
|
return L(() => {
|
|
646
637
|
if (e) {
|
|
647
638
|
let n = f;
|
|
648
|
-
const c =
|
|
649
|
-
let v = r.map((
|
|
639
|
+
const c = ae(() => {
|
|
640
|
+
let v = r.map((_) => {
|
|
650
641
|
var E;
|
|
651
|
-
return (E = e == null ? void 0 : e.data) == null ? void 0 : E[
|
|
642
|
+
return (E = e == null ? void 0 : e.data) == null ? void 0 : E[_];
|
|
652
643
|
});
|
|
653
|
-
r.some((
|
|
644
|
+
r.some((_, E) => n[E] != v[E]) && (n = v, u((_) => _ + 1));
|
|
654
645
|
}, t);
|
|
655
646
|
let d = r.map((v) => e.subscribe(v, c)), p = setTimeout(c, 1);
|
|
656
647
|
return () => {
|
|
@@ -659,7 +650,7 @@ const sr = le((e) => new ir(e)), Y = (e = "noname") => z(() => sr(e), [e]), Le =
|
|
|
659
650
|
}
|
|
660
651
|
}, [e, ...r]), f;
|
|
661
652
|
};
|
|
662
|
-
var ee = { exports: {} },
|
|
653
|
+
var ee = { exports: {} }, q = {};
|
|
663
654
|
/**
|
|
664
655
|
* @license React
|
|
665
656
|
* react-jsx-runtime.production.js
|
|
@@ -670,8 +661,8 @@ var ee = { exports: {} }, J = {};
|
|
|
670
661
|
* LICENSE file in the root directory of this source tree.
|
|
671
662
|
*/
|
|
672
663
|
var Te;
|
|
673
|
-
function
|
|
674
|
-
if (Te) return
|
|
664
|
+
function ar() {
|
|
665
|
+
if (Te) return q;
|
|
675
666
|
Te = 1;
|
|
676
667
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
677
668
|
function r(u, f, n) {
|
|
@@ -689,9 +680,9 @@ function cr() {
|
|
|
689
680
|
props: n
|
|
690
681
|
};
|
|
691
682
|
}
|
|
692
|
-
return
|
|
683
|
+
return q.Fragment = t, q.jsx = r, q.jsxs = r, q;
|
|
693
684
|
}
|
|
694
|
-
var
|
|
685
|
+
var J = {};
|
|
695
686
|
/**
|
|
696
687
|
* @license React
|
|
697
688
|
* react-jsx-runtime.development.js
|
|
@@ -702,14 +693,14 @@ var X = {};
|
|
|
702
693
|
* LICENSE file in the root directory of this source tree.
|
|
703
694
|
*/
|
|
704
695
|
var Oe;
|
|
705
|
-
function
|
|
696
|
+
function sr() {
|
|
706
697
|
return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
707
|
-
function e(
|
|
708
|
-
if (
|
|
709
|
-
if (typeof
|
|
710
|
-
return
|
|
711
|
-
if (typeof
|
|
712
|
-
switch (
|
|
698
|
+
function e(s) {
|
|
699
|
+
if (s == null) return null;
|
|
700
|
+
if (typeof s == "function")
|
|
701
|
+
return s.$$typeof === b ? null : s.displayName || s.name || null;
|
|
702
|
+
if (typeof s == "string") return s;
|
|
703
|
+
switch (s) {
|
|
713
704
|
case y:
|
|
714
705
|
return "Fragment";
|
|
715
706
|
case N:
|
|
@@ -720,129 +711,129 @@ function fr() {
|
|
|
720
711
|
return "Suspense";
|
|
721
712
|
case o:
|
|
722
713
|
return "SuspenseList";
|
|
723
|
-
case
|
|
714
|
+
case g:
|
|
724
715
|
return "Activity";
|
|
725
716
|
}
|
|
726
|
-
if (typeof
|
|
727
|
-
switch (typeof
|
|
717
|
+
if (typeof s == "object")
|
|
718
|
+
switch (typeof s.tag == "number" && console.error(
|
|
728
719
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
729
|
-
),
|
|
720
|
+
), s.$$typeof) {
|
|
730
721
|
case M:
|
|
731
722
|
return "Portal";
|
|
732
723
|
case D:
|
|
733
|
-
return (
|
|
724
|
+
return (s.displayName || "Context") + ".Provider";
|
|
734
725
|
case x:
|
|
735
|
-
return (
|
|
736
|
-
case
|
|
737
|
-
var m =
|
|
738
|
-
return
|
|
726
|
+
return (s._context.displayName || "Context") + ".Consumer";
|
|
727
|
+
case i:
|
|
728
|
+
var m = s.render;
|
|
729
|
+
return s = s.displayName, s || (s = m.displayName || m.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
|
|
739
730
|
case l:
|
|
740
|
-
return m =
|
|
731
|
+
return m = s.displayName || null, m !== null ? m : e(s.type) || "Memo";
|
|
741
732
|
case h:
|
|
742
|
-
m =
|
|
733
|
+
m = s._payload, s = s._init;
|
|
743
734
|
try {
|
|
744
|
-
return e(
|
|
735
|
+
return e(s(m));
|
|
745
736
|
} catch {
|
|
746
737
|
}
|
|
747
738
|
}
|
|
748
739
|
return null;
|
|
749
740
|
}
|
|
750
|
-
function t(
|
|
751
|
-
return "" +
|
|
741
|
+
function t(s) {
|
|
742
|
+
return "" + s;
|
|
752
743
|
}
|
|
753
|
-
function r(
|
|
744
|
+
function r(s) {
|
|
754
745
|
try {
|
|
755
|
-
t(
|
|
746
|
+
t(s);
|
|
756
747
|
var m = !1;
|
|
757
748
|
} catch {
|
|
758
749
|
m = !0;
|
|
759
750
|
}
|
|
760
751
|
if (m) {
|
|
761
752
|
m = console;
|
|
762
|
-
var w = m.error, R = typeof Symbol == "function" && Symbol.toStringTag &&
|
|
753
|
+
var w = m.error, R = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
763
754
|
return w.call(
|
|
764
755
|
m,
|
|
765
756
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
766
757
|
R
|
|
767
|
-
), t(
|
|
758
|
+
), t(s);
|
|
768
759
|
}
|
|
769
760
|
}
|
|
770
|
-
function u(
|
|
771
|
-
if (
|
|
772
|
-
if (typeof
|
|
761
|
+
function u(s) {
|
|
762
|
+
if (s === y) return "<>";
|
|
763
|
+
if (typeof s == "object" && s !== null && s.$$typeof === h)
|
|
773
764
|
return "<...>";
|
|
774
765
|
try {
|
|
775
|
-
var m = e(
|
|
766
|
+
var m = e(s);
|
|
776
767
|
return m ? "<" + m + ">" : "<...>";
|
|
777
768
|
} catch {
|
|
778
769
|
return "<...>";
|
|
779
770
|
}
|
|
780
771
|
}
|
|
781
772
|
function f() {
|
|
782
|
-
var
|
|
783
|
-
return
|
|
773
|
+
var s = j.A;
|
|
774
|
+
return s === null ? null : s.getOwner();
|
|
784
775
|
}
|
|
785
776
|
function n() {
|
|
786
777
|
return Error("react-stack-top-frame");
|
|
787
778
|
}
|
|
788
|
-
function c(
|
|
789
|
-
if (A.call(
|
|
790
|
-
var m = Object.getOwnPropertyDescriptor(
|
|
779
|
+
function c(s) {
|
|
780
|
+
if (A.call(s, "key")) {
|
|
781
|
+
var m = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
791
782
|
if (m && m.isReactWarning) return !1;
|
|
792
783
|
}
|
|
793
|
-
return
|
|
784
|
+
return s.key !== void 0;
|
|
794
785
|
}
|
|
795
|
-
function d(
|
|
786
|
+
function d(s, m) {
|
|
796
787
|
function w() {
|
|
797
788
|
de || (de = !0, console.error(
|
|
798
789
|
"%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)",
|
|
799
790
|
m
|
|
800
791
|
));
|
|
801
792
|
}
|
|
802
|
-
w.isReactWarning = !0, Object.defineProperty(
|
|
793
|
+
w.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
803
794
|
get: w,
|
|
804
795
|
configurable: !0
|
|
805
796
|
});
|
|
806
797
|
}
|
|
807
798
|
function p() {
|
|
808
|
-
var
|
|
809
|
-
return he[
|
|
799
|
+
var s = e(this.type);
|
|
800
|
+
return he[s] || (he[s] = !0, console.error(
|
|
810
801
|
"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."
|
|
811
|
-
)),
|
|
802
|
+
)), s = this.props.ref, s !== void 0 ? s : null;
|
|
812
803
|
}
|
|
813
|
-
function v(
|
|
814
|
-
return w = P.ref,
|
|
804
|
+
function v(s, m, w, R, k, P, se, ie) {
|
|
805
|
+
return w = P.ref, s = {
|
|
815
806
|
$$typeof: C,
|
|
816
|
-
type:
|
|
807
|
+
type: s,
|
|
817
808
|
key: m,
|
|
818
809
|
props: P,
|
|
819
810
|
_owner: k
|
|
820
|
-
}, (w !== void 0 ? w : null) !== null ? Object.defineProperty(
|
|
811
|
+
}, (w !== void 0 ? w : null) !== null ? Object.defineProperty(s, "ref", {
|
|
821
812
|
enumerable: !1,
|
|
822
813
|
get: p
|
|
823
|
-
}) : Object.defineProperty(
|
|
814
|
+
}) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
824
815
|
configurable: !1,
|
|
825
816
|
enumerable: !1,
|
|
826
817
|
writable: !0,
|
|
827
818
|
value: 0
|
|
828
|
-
}), Object.defineProperty(
|
|
819
|
+
}), Object.defineProperty(s, "_debugInfo", {
|
|
829
820
|
configurable: !1,
|
|
830
821
|
enumerable: !1,
|
|
831
822
|
writable: !0,
|
|
832
823
|
value: null
|
|
833
|
-
}), Object.defineProperty(
|
|
824
|
+
}), Object.defineProperty(s, "_debugStack", {
|
|
834
825
|
configurable: !1,
|
|
835
826
|
enumerable: !1,
|
|
836
827
|
writable: !0,
|
|
837
|
-
value:
|
|
838
|
-
}), Object.defineProperty(
|
|
828
|
+
value: se
|
|
829
|
+
}), Object.defineProperty(s, "_debugTask", {
|
|
839
830
|
configurable: !1,
|
|
840
831
|
enumerable: !1,
|
|
841
832
|
writable: !0,
|
|
842
|
-
value:
|
|
843
|
-
}), Object.freeze && (Object.freeze(
|
|
833
|
+
value: ie
|
|
834
|
+
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
844
835
|
}
|
|
845
|
-
function
|
|
836
|
+
function _(s, m, w, R, k, P, se, ie) {
|
|
846
837
|
var S = m.children;
|
|
847
838
|
if (S !== void 0)
|
|
848
839
|
if (R)
|
|
@@ -856,7 +847,7 @@ function fr() {
|
|
|
856
847
|
);
|
|
857
848
|
else E(S);
|
|
858
849
|
if (A.call(m, "key")) {
|
|
859
|
-
S = e(
|
|
850
|
+
S = e(s);
|
|
860
851
|
var F = Object.keys(m).filter(function(Ne) {
|
|
861
852
|
return Ne !== "key";
|
|
862
853
|
});
|
|
@@ -880,89 +871,93 @@ React keys must be passed directly to JSX without using spread:
|
|
|
880
871
|
} else w = m;
|
|
881
872
|
return S && d(
|
|
882
873
|
w,
|
|
883
|
-
typeof
|
|
874
|
+
typeof s == "function" ? s.displayName || s.name || "Unknown" : s
|
|
884
875
|
), v(
|
|
885
|
-
|
|
876
|
+
s,
|
|
886
877
|
S,
|
|
887
878
|
P,
|
|
888
879
|
k,
|
|
889
880
|
f(),
|
|
890
881
|
w,
|
|
891
|
-
|
|
892
|
-
|
|
882
|
+
se,
|
|
883
|
+
ie
|
|
893
884
|
);
|
|
894
885
|
}
|
|
895
|
-
function E(
|
|
896
|
-
typeof
|
|
886
|
+
function E(s) {
|
|
887
|
+
typeof s == "object" && s !== null && s.$$typeof === C && s._store && (s._store.validated = 1);
|
|
897
888
|
}
|
|
898
|
-
var T = Me, C = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), O = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), D = Symbol.for("react.context"),
|
|
889
|
+
var T = Me, C = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), O = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), D = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), a = Symbol.for("react.suspense"), o = Symbol.for("react.suspense_list"), l = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), g = Symbol.for("react.activity"), b = Symbol.for("react.client.reference"), j = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, B = Array.isArray, U = console.createTask ? console.createTask : function() {
|
|
899
890
|
return null;
|
|
900
891
|
};
|
|
901
892
|
T = {
|
|
902
|
-
"react-stack-bottom-frame": function(
|
|
903
|
-
return
|
|
893
|
+
"react-stack-bottom-frame": function(s) {
|
|
894
|
+
return s();
|
|
904
895
|
}
|
|
905
896
|
};
|
|
906
897
|
var de, he = {}, pe = T["react-stack-bottom-frame"].bind(
|
|
907
898
|
T,
|
|
908
899
|
n
|
|
909
|
-
)(), ve =
|
|
910
|
-
|
|
900
|
+
)(), ve = U(u(n)), me = {};
|
|
901
|
+
J.Fragment = y, J.jsx = function(s, m, w, R, k) {
|
|
911
902
|
var P = 1e4 > j.recentlyCreatedOwnerStacks++;
|
|
912
|
-
return
|
|
913
|
-
|
|
903
|
+
return _(
|
|
904
|
+
s,
|
|
914
905
|
m,
|
|
915
906
|
w,
|
|
916
907
|
!1,
|
|
917
908
|
R,
|
|
918
909
|
k,
|
|
919
910
|
P ? Error("react-stack-top-frame") : pe,
|
|
920
|
-
P ?
|
|
911
|
+
P ? U(u(s)) : ve
|
|
921
912
|
);
|
|
922
|
-
},
|
|
913
|
+
}, J.jsxs = function(s, m, w, R, k) {
|
|
923
914
|
var P = 1e4 > j.recentlyCreatedOwnerStacks++;
|
|
924
|
-
return
|
|
925
|
-
|
|
915
|
+
return _(
|
|
916
|
+
s,
|
|
926
917
|
m,
|
|
927
918
|
w,
|
|
928
919
|
!0,
|
|
929
920
|
R,
|
|
930
921
|
k,
|
|
931
922
|
P ? Error("react-stack-top-frame") : pe,
|
|
932
|
-
P ?
|
|
923
|
+
P ? U(u(s)) : ve
|
|
933
924
|
);
|
|
934
925
|
};
|
|
935
|
-
}()),
|
|
926
|
+
}()), J;
|
|
936
927
|
}
|
|
937
928
|
var Re;
|
|
938
|
-
function
|
|
939
|
-
return Re || (Re = 1, process.env.NODE_ENV === "production" ? ee.exports =
|
|
929
|
+
function ir() {
|
|
930
|
+
return Re || (Re = 1, process.env.NODE_ENV === "production" ? ee.exports = ar() : ee.exports = sr()), ee.exports;
|
|
940
931
|
}
|
|
941
|
-
var W =
|
|
942
|
-
const
|
|
932
|
+
var W = ir();
|
|
933
|
+
const mr = (e, t) => {
|
|
943
934
|
const r = (n) => [
|
|
944
935
|
e,
|
|
945
936
|
...Object.entries(n ?? {}).sort((c, d) => c[0].localeCompare(d[0])).flat()
|
|
946
937
|
].join("-");
|
|
947
938
|
let u = /* @__PURE__ */ new Set();
|
|
948
939
|
const f = (n) => {
|
|
949
|
-
const c =
|
|
940
|
+
const c = t(n), d = r(n), p = Y(d), v = z(() => new Error().stack, []);
|
|
950
941
|
return Pe(
|
|
951
|
-
|
|
952
|
-
...Object.entries(
|
|
942
|
+
p,
|
|
943
|
+
...Object.entries(c)
|
|
953
944
|
), L(() => {
|
|
954
|
-
if (u.has(
|
|
955
|
-
const
|
|
956
|
-
throw
|
|
945
|
+
if (u.has(d)) {
|
|
946
|
+
const _ = new Error("RootContext " + d + " are mounted more than once");
|
|
947
|
+
throw _.stack = v, _;
|
|
957
948
|
}
|
|
958
|
-
return u.add(
|
|
959
|
-
u.delete(
|
|
949
|
+
return u.add(d), () => {
|
|
950
|
+
u.delete(d);
|
|
960
951
|
};
|
|
961
952
|
}), /* @__PURE__ */ W.jsx(W.Fragment, {});
|
|
962
953
|
};
|
|
963
954
|
return f.displayName = `State[${(t == null ? void 0 : t.name) ?? "??"}]`, {
|
|
964
955
|
resolveCtxName: r,
|
|
965
956
|
Root: f,
|
|
957
|
+
/**
|
|
958
|
+
* Strict consumer: throws if the corresponding Root for these props isn't mounted.
|
|
959
|
+
* Use in development/tests to fail fast when wiring is incorrect.
|
|
960
|
+
*/
|
|
966
961
|
useCtxStateStrict: (n) => {
|
|
967
962
|
const c = r(n), d = z(() => new Error().stack, []);
|
|
968
963
|
return L(() => {
|
|
@@ -972,6 +967,10 @@ const yr = (e, t) => {
|
|
|
972
967
|
}
|
|
973
968
|
}, [c]), Y(c);
|
|
974
969
|
},
|
|
970
|
+
/**
|
|
971
|
+
* Lenient consumer: schedules a console.error if the Root isn't mounted instead of throwing.
|
|
972
|
+
* Useful in production to avoid hard crashes while still surfacing misconfiguration.
|
|
973
|
+
*/
|
|
975
974
|
useCtxState: (n) => {
|
|
976
975
|
const c = r(n), d = z(() => new Error().stack, []);
|
|
977
976
|
return L(() => {
|
|
@@ -984,23 +983,23 @@ const yr = (e, t) => {
|
|
|
984
983
|
}, [u.has(c)]), Y(c);
|
|
985
984
|
}
|
|
986
985
|
};
|
|
987
|
-
},
|
|
986
|
+
}, ur = /* @__PURE__ */ function() {
|
|
988
987
|
const e = /* @__PURE__ */ new WeakMap();
|
|
989
988
|
return (t) => {
|
|
990
989
|
let r = e.get(t);
|
|
991
990
|
return r || e.set(t, r = ((t == null ? void 0 : t.name) ?? "") + Math.random().toString()), r;
|
|
992
991
|
};
|
|
993
|
-
}(),
|
|
992
|
+
}(), cr = (e) => [
|
|
994
993
|
...Object.entries(e ?? {}).sort((t, r) => t[0].localeCompare(r[0])).flat()
|
|
995
|
-
].join("-"),
|
|
996
|
-
const t = Y("auto-ctx"), [r, u] =
|
|
994
|
+
].join("-"), br = ({ Wrapper: e = xe }) => {
|
|
995
|
+
const t = Y("auto-ctx"), [r, u] = G({}), f = $e(
|
|
997
996
|
(n, c) => {
|
|
998
|
-
const d =
|
|
997
|
+
const d = ur(n), p = cr(c);
|
|
999
998
|
return u(({
|
|
1000
999
|
[d]: {
|
|
1001
1000
|
Component: v = n,
|
|
1002
1001
|
subState: {
|
|
1003
|
-
[p]:
|
|
1002
|
+
[p]: _ = { params: c, counter: 0 },
|
|
1004
1003
|
...E
|
|
1005
1004
|
} = {}
|
|
1006
1005
|
} = {},
|
|
@@ -1012,8 +1011,8 @@ const yr = (e, t) => {
|
|
|
1012
1011
|
subState: {
|
|
1013
1012
|
...E,
|
|
1014
1013
|
[p]: {
|
|
1015
|
-
...
|
|
1016
|
-
counter:
|
|
1014
|
+
..._,
|
|
1015
|
+
counter: _.counter + 1
|
|
1017
1016
|
}
|
|
1018
1017
|
}
|
|
1019
1018
|
}
|
|
@@ -1021,7 +1020,7 @@ const yr = (e, t) => {
|
|
|
1021
1020
|
[d]: {
|
|
1022
1021
|
Component: v = n,
|
|
1023
1022
|
subState: {
|
|
1024
|
-
[p]:
|
|
1023
|
+
[p]: _ = { params: c, counter: 0 },
|
|
1025
1024
|
...E
|
|
1026
1025
|
} = {}
|
|
1027
1026
|
} = {},
|
|
@@ -1032,10 +1031,10 @@ const yr = (e, t) => {
|
|
|
1032
1031
|
Component: v,
|
|
1033
1032
|
subState: {
|
|
1034
1033
|
...E,
|
|
1035
|
-
...
|
|
1034
|
+
..._.counter > 1 ? {
|
|
1036
1035
|
[p]: {
|
|
1037
|
-
...
|
|
1038
|
-
counter:
|
|
1036
|
+
..._,
|
|
1037
|
+
counter: _.counter - 1
|
|
1039
1038
|
}
|
|
1040
1039
|
} : {}
|
|
1041
1040
|
}
|
|
@@ -1049,35 +1048,35 @@ const yr = (e, t) => {
|
|
|
1049
1048
|
["subscribe", f],
|
|
1050
1049
|
["state", r]
|
|
1051
1050
|
), /* @__PURE__ */ W.jsx(W.Fragment, { children: Object.entries(r).flatMap(
|
|
1052
|
-
([n, { Component: c, subState: d }]) => Object.entries(d).map(([p, { counter: v, params:
|
|
1051
|
+
([n, { Component: c, subState: d }]) => Object.entries(d).map(([p, { counter: v, params: _ }]) => ({ key: n + p, Component: c, params: _, counter: v })).filter((p) => p.counter > 0).map(({ key: p, params: v, Component: _ }) => /* @__PURE__ */ W.jsx(e, { children: /* @__PURE__ */ W.jsx(_, { ...v }) }, p))
|
|
1053
1052
|
) });
|
|
1054
|
-
},
|
|
1053
|
+
}, _r = ({ Root: e, useCtxState: t, useCtxStateStrict: r, resolveCtxName: u }) => ({
|
|
1055
1054
|
useCtxState: (f) => {
|
|
1056
|
-
const n = u(f), c =
|
|
1055
|
+
const n = u(f), c = or(Y("auto-ctx"), "subscribe");
|
|
1057
1056
|
return L(() => c == null ? void 0 : c(e, f), [c, n]), Y(n);
|
|
1058
1057
|
}
|
|
1059
|
-
}),
|
|
1060
|
-
const [, t] =
|
|
1058
|
+
}), gr = (e) => {
|
|
1059
|
+
const [, t] = G(0), { proxy: r, finalGetter: u, openGetter: f, clean: n } = z(
|
|
1061
1060
|
() => {
|
|
1062
1061
|
const c = /* @__PURE__ */ new Set(), d = {}, p = /* @__PURE__ */ new Map(), v = new Proxy(
|
|
1063
1062
|
e == null ? void 0 : e.data,
|
|
1064
1063
|
{
|
|
1065
1064
|
get(y, O) {
|
|
1066
|
-
if (
|
|
1065
|
+
if (_)
|
|
1067
1066
|
return c.add(O), d[O] = y[O];
|
|
1068
1067
|
throw new Error("now allow here");
|
|
1069
1068
|
}
|
|
1070
1069
|
}
|
|
1071
1070
|
);
|
|
1072
|
-
let
|
|
1071
|
+
let _ = !0, E = ae(() => {
|
|
1073
1072
|
[...c.values()].some((y) => {
|
|
1074
1073
|
var O;
|
|
1075
1074
|
return d[y] != ((O = e == null ? void 0 : e.data) == null ? void 0 : O[y]);
|
|
1076
1075
|
}) && t((y) => y + 1);
|
|
1077
1076
|
}, 0), T = () => {
|
|
1078
|
-
|
|
1077
|
+
_ = !0, c.clear();
|
|
1079
1078
|
}, C = () => {
|
|
1080
|
-
|
|
1079
|
+
_ = !1, [...c.values()].filter((y) => !p.has(y)).forEach((y) => {
|
|
1081
1080
|
p.set(y, e == null ? void 0 : e.subscribe(y, E));
|
|
1082
1081
|
}), [...p.keys()].filter((y) => !c.has(y)).forEach((y) => {
|
|
1083
1082
|
let O = p.get(y);
|
|
@@ -1096,17 +1095,19 @@ const yr = (e, t) => {
|
|
|
1096
1095
|
), r;
|
|
1097
1096
|
};
|
|
1098
1097
|
export {
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1098
|
+
br as AutoRootCtx,
|
|
1099
|
+
rr as Context,
|
|
1100
|
+
_r as createAutoCtx,
|
|
1101
|
+
mr as createRootCtx,
|
|
1102
|
+
nr as getContext,
|
|
1103
|
+
tr as useArrayHash,
|
|
1104
1104
|
Y as useDataContext,
|
|
1105
|
-
|
|
1105
|
+
dr as useDataSource,
|
|
1106
1106
|
Pe as useDataSourceMultiple,
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1107
|
+
or as useDataSubscribe,
|
|
1108
|
+
pr as useDataSubscribeMultiple,
|
|
1109
|
+
vr as useDataSubscribeMultipleWithDebounce,
|
|
1110
|
+
hr as useDataSubscribeWithTransform,
|
|
1111
|
+
gr as useQuickSubscribe
|
|
1112
1112
|
};
|
|
1113
|
+
//# sourceMappingURL=index.es.js.map
|