react-state-custom 1.0.7 → 1.0.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/dist/index.es.js +148 -148
- package/dist/index.umd.js +3 -3
- package/package.json +1 -1
- package/src/state-utils/ctx.ts +1 -1
package/dist/index.es.js
CHANGED
|
@@ -9,8 +9,8 @@ var Z = { exports: {} }, be;
|
|
|
9
9
|
function xe() {
|
|
10
10
|
if (be) return Z.exports;
|
|
11
11
|
be = 1;
|
|
12
|
-
var e = typeof Reflect == "object" ? Reflect : null, t = e && typeof e.apply == "function" ? e.apply : function(a, o,
|
|
13
|
-
return Function.prototype.apply.call(a, o,
|
|
12
|
+
var e = typeof Reflect == "object" ? Reflect : null, t = e && typeof e.apply == "function" ? e.apply : function(a, o, f) {
|
|
13
|
+
return Function.prototype.apply.call(a, o, f);
|
|
14
14
|
}, r;
|
|
15
15
|
e && typeof e.ownKeys == "function" ? r = e.ownKeys : Object.getOwnPropertySymbols ? r = function(a) {
|
|
16
16
|
return Object.getOwnPropertyNames(a).concat(Object.getOwnPropertySymbols(a));
|
|
@@ -20,7 +20,7 @@ function xe() {
|
|
|
20
20
|
function u(s) {
|
|
21
21
|
console && console.warn && console.warn(s);
|
|
22
22
|
}
|
|
23
|
-
var
|
|
23
|
+
var l = Number.isNaN || function(a) {
|
|
24
24
|
return a !== a;
|
|
25
25
|
};
|
|
26
26
|
function n() {
|
|
@@ -38,14 +38,14 @@ function xe() {
|
|
|
38
38
|
return c;
|
|
39
39
|
},
|
|
40
40
|
set: function(s) {
|
|
41
|
-
if (typeof s != "number" || s < 0 ||
|
|
41
|
+
if (typeof s != "number" || s < 0 || l(s))
|
|
42
42
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + s + ".");
|
|
43
43
|
c = s;
|
|
44
44
|
}
|
|
45
45
|
}), n.init = function() {
|
|
46
46
|
(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;
|
|
47
47
|
}, n.prototype.setMaxListeners = function(a) {
|
|
48
|
-
if (typeof a != "number" || a < 0 ||
|
|
48
|
+
if (typeof a != "number" || a < 0 || l(a))
|
|
49
49
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + a + ".");
|
|
50
50
|
return this._maxListeners = a, this;
|
|
51
51
|
};
|
|
@@ -55,7 +55,7 @@ function xe() {
|
|
|
55
55
|
n.prototype.getMaxListeners = function() {
|
|
56
56
|
return p(this);
|
|
57
57
|
}, n.prototype.emit = function(a) {
|
|
58
|
-
for (var o = [],
|
|
58
|
+
for (var o = [], f = 1; f < arguments.length; f++) o.push(arguments[f]);
|
|
59
59
|
var d = a === "error", _ = this._events;
|
|
60
60
|
if (_ !== void 0)
|
|
61
61
|
d = d && _.error === void 0;
|
|
@@ -74,11 +74,11 @@ function xe() {
|
|
|
74
74
|
if (typeof A == "function")
|
|
75
75
|
t(A, this, o);
|
|
76
76
|
else
|
|
77
|
-
for (var B = A.length, H = M(A, B),
|
|
78
|
-
t(H[
|
|
77
|
+
for (var B = A.length, H = M(A, B), f = 0; f < B; ++f)
|
|
78
|
+
t(H[f], this, o);
|
|
79
79
|
return !0;
|
|
80
80
|
};
|
|
81
|
-
function v(s, a, o,
|
|
81
|
+
function v(s, a, o, f) {
|
|
82
82
|
var d, _, b;
|
|
83
83
|
if (h(o), _ = s._events, _ === void 0 ? (_ = s._events = /* @__PURE__ */ Object.create(null), s._eventsCount = 0) : (_.newListener !== void 0 && (s.emit(
|
|
84
84
|
"newListener",
|
|
@@ -86,7 +86,7 @@ function xe() {
|
|
|
86
86
|
o.listener ? o.listener : o
|
|
87
87
|
), _ = s._events), b = _[a]), b === void 0)
|
|
88
88
|
b = _[a] = o, ++s._eventsCount;
|
|
89
|
-
else if (typeof b == "function" ? b = _[a] =
|
|
89
|
+
else if (typeof b == "function" ? b = _[a] = f ? [o, b] : [b, o] : f ? b.unshift(o) : b.push(o), d = p(s), d > 0 && b.length > d && !b.warned) {
|
|
90
90
|
b.warned = !0;
|
|
91
91
|
var j = new Error("Possible EventEmitter memory leak detected. " + b.length + " " + String(a) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
92
92
|
j.name = "MaxListenersExceededWarning", j.emitter = s, j.type = a, j.count = b.length, u(j);
|
|
@@ -102,46 +102,46 @@ function xe() {
|
|
|
102
102
|
if (!this.fired)
|
|
103
103
|
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
104
|
}
|
|
105
|
-
function
|
|
106
|
-
var
|
|
107
|
-
return d.listener = o,
|
|
105
|
+
function E(s, a, o) {
|
|
106
|
+
var f = { fired: !1, wrapFn: void 0, target: s, type: a, listener: o }, d = g.bind(f);
|
|
107
|
+
return d.listener = o, f.wrapFn = d, d;
|
|
108
108
|
}
|
|
109
109
|
n.prototype.once = function(a, o) {
|
|
110
|
-
return h(o), this.on(a,
|
|
110
|
+
return h(o), this.on(a, E(this, a, o)), this;
|
|
111
111
|
}, n.prototype.prependOnceListener = function(a, o) {
|
|
112
|
-
return h(o), this.prependListener(a,
|
|
112
|
+
return h(o), this.prependListener(a, E(this, a, o)), this;
|
|
113
113
|
}, n.prototype.removeListener = function(a, o) {
|
|
114
|
-
var
|
|
114
|
+
var f, d, _, b, j;
|
|
115
115
|
if (h(o), d = this._events, d === void 0)
|
|
116
116
|
return this;
|
|
117
|
-
if (
|
|
117
|
+
if (f = d[a], f === void 0)
|
|
118
118
|
return this;
|
|
119
|
-
if (
|
|
120
|
-
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete d[a], d.removeListener && this.emit("removeListener", a,
|
|
121
|
-
else if (typeof
|
|
122
|
-
for (_ = -1, b =
|
|
123
|
-
if (
|
|
124
|
-
j =
|
|
119
|
+
if (f === o || f.listener === o)
|
|
120
|
+
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete d[a], d.removeListener && this.emit("removeListener", a, f.listener || o));
|
|
121
|
+
else if (typeof f != "function") {
|
|
122
|
+
for (_ = -1, b = f.length - 1; b >= 0; b--)
|
|
123
|
+
if (f[b] === o || f[b].listener === o) {
|
|
124
|
+
j = f[b].listener, _ = b;
|
|
125
125
|
break;
|
|
126
126
|
}
|
|
127
127
|
if (_ < 0)
|
|
128
128
|
return this;
|
|
129
|
-
_ === 0 ?
|
|
129
|
+
_ === 0 ? f.shift() : y(f, _), f.length === 1 && (d[a] = f[0]), d.removeListener !== void 0 && this.emit("removeListener", a, j || o);
|
|
130
130
|
}
|
|
131
131
|
return this;
|
|
132
132
|
}, n.prototype.off = n.prototype.removeListener, n.prototype.removeAllListeners = function(a) {
|
|
133
|
-
var o,
|
|
134
|
-
if (
|
|
133
|
+
var o, f, d;
|
|
134
|
+
if (f = this._events, f === void 0)
|
|
135
135
|
return this;
|
|
136
|
-
if (
|
|
137
|
-
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) :
|
|
136
|
+
if (f.removeListener === void 0)
|
|
137
|
+
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : f[a] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete f[a]), this;
|
|
138
138
|
if (arguments.length === 0) {
|
|
139
|
-
var _ = Object.keys(
|
|
139
|
+
var _ = Object.keys(f), b;
|
|
140
140
|
for (d = 0; d < _.length; ++d)
|
|
141
141
|
b = _[d], b !== "removeListener" && this.removeAllListeners(b);
|
|
142
142
|
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
143
143
|
}
|
|
144
|
-
if (o =
|
|
144
|
+
if (o = f[a], typeof o == "function")
|
|
145
145
|
this.removeListener(a, o);
|
|
146
146
|
else if (o !== void 0)
|
|
147
147
|
for (d = o.length - 1; d >= 0; d--)
|
|
@@ -149,10 +149,10 @@ function xe() {
|
|
|
149
149
|
return this;
|
|
150
150
|
};
|
|
151
151
|
function T(s, a, o) {
|
|
152
|
-
var
|
|
153
|
-
if (
|
|
152
|
+
var f = s._events;
|
|
153
|
+
if (f === void 0)
|
|
154
154
|
return [];
|
|
155
|
-
var d =
|
|
155
|
+
var d = f[a];
|
|
156
156
|
return d === void 0 ? [] : typeof d == "function" ? o ? [d.listener || d] : [d] : o ? O(d) : M(d, d.length);
|
|
157
157
|
}
|
|
158
158
|
n.prototype.listeners = function(a) {
|
|
@@ -177,11 +177,11 @@ function xe() {
|
|
|
177
177
|
return this._eventsCount > 0 ? r(this._events) : [];
|
|
178
178
|
};
|
|
179
179
|
function M(s, a) {
|
|
180
|
-
for (var o = new Array(a),
|
|
181
|
-
o[
|
|
180
|
+
for (var o = new Array(a), f = 0; f < a; ++f)
|
|
181
|
+
o[f] = s[f];
|
|
182
182
|
return o;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function y(s, a) {
|
|
185
185
|
for (; a + 1 < s.length; a++)
|
|
186
186
|
s[a] = s[a + 1];
|
|
187
187
|
s.pop();
|
|
@@ -192,9 +192,9 @@ function xe() {
|
|
|
192
192
|
return a;
|
|
193
193
|
}
|
|
194
194
|
function N(s, a) {
|
|
195
|
-
return new Promise(function(o,
|
|
195
|
+
return new Promise(function(o, f) {
|
|
196
196
|
function d(b) {
|
|
197
|
-
s.removeListener(a, _),
|
|
197
|
+
s.removeListener(a, _), f(b);
|
|
198
198
|
}
|
|
199
199
|
function _() {
|
|
200
200
|
typeof s.removeListener == "function" && s.removeListener("error", d), o([].slice.call(arguments));
|
|
@@ -205,12 +205,12 @@ function xe() {
|
|
|
205
205
|
function x(s, a, o) {
|
|
206
206
|
typeof s.on == "function" && D(s, "error", a, o);
|
|
207
207
|
}
|
|
208
|
-
function D(s, a, o,
|
|
208
|
+
function D(s, a, o, f) {
|
|
209
209
|
if (typeof s.on == "function")
|
|
210
|
-
|
|
210
|
+
f.once ? s.once(a, o) : s.on(a, o);
|
|
211
211
|
else if (typeof s.addEventListener == "function")
|
|
212
212
|
s.addEventListener(a, function d(_) {
|
|
213
|
-
|
|
213
|
+
f.once && s.removeEventListener(a, d), o(_);
|
|
214
214
|
});
|
|
215
215
|
else
|
|
216
216
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof s);
|
|
@@ -227,8 +227,8 @@ function Ue(e) {
|
|
|
227
227
|
var u = !0;
|
|
228
228
|
} catch {
|
|
229
229
|
}
|
|
230
|
-
var
|
|
231
|
-
return u && (t ? e[q] = r : delete e[q]),
|
|
230
|
+
var l = Ge.call(e);
|
|
231
|
+
return u && (t ? e[q] = r : delete e[q]), l;
|
|
232
232
|
}
|
|
233
233
|
var Ve = Object.prototype, He = Ve.toString;
|
|
234
234
|
function qe(e) {
|
|
@@ -260,7 +260,7 @@ function G(e) {
|
|
|
260
260
|
return e != null && (t == "object" || t == "function");
|
|
261
261
|
}
|
|
262
262
|
var _e = NaN, nt = /^[-+]0x[0-9a-f]+$/i, ot = /^0b[01]+$/i, at = /^0o[0-7]+$/i, it = parseInt;
|
|
263
|
-
function
|
|
263
|
+
function ye(e) {
|
|
264
264
|
if (typeof e == "number")
|
|
265
265
|
return e;
|
|
266
266
|
if (Qe(e))
|
|
@@ -275,19 +275,19 @@ function Ee(e) {
|
|
|
275
275
|
var r = ot.test(e);
|
|
276
276
|
return r || at.test(e) ? it(e.slice(2), r ? 2 : 8) : nt.test(e) ? _e : +e;
|
|
277
277
|
}
|
|
278
|
-
var st = "[object AsyncFunction]", ut = "[object Function]", ct = "[object GeneratorFunction]",
|
|
279
|
-
function
|
|
278
|
+
var st = "[object AsyncFunction]", ut = "[object Function]", ct = "[object GeneratorFunction]", ft = "[object Proxy]";
|
|
279
|
+
function lt(e) {
|
|
280
280
|
if (!G(e))
|
|
281
281
|
return !1;
|
|
282
282
|
var t = Se(e);
|
|
283
|
-
return t == ut || t == ct || t == st || t ==
|
|
283
|
+
return t == ut || t == ct || t == st || t == ft;
|
|
284
284
|
}
|
|
285
|
-
var ce = re["__core-js_shared__"],
|
|
285
|
+
var ce = re["__core-js_shared__"], Ee = function() {
|
|
286
286
|
var e = /[^.]+$/.exec(ce && ce.keys && ce.keys.IE_PROTO || "");
|
|
287
287
|
return e ? "Symbol(src)_1." + e : "";
|
|
288
288
|
}();
|
|
289
289
|
function dt(e) {
|
|
290
|
-
return !!
|
|
290
|
+
return !!Ee && Ee in e;
|
|
291
291
|
}
|
|
292
292
|
var ht = Function.prototype, pt = ht.toString;
|
|
293
293
|
function vt(e) {
|
|
@@ -303,13 +303,13 @@ function vt(e) {
|
|
|
303
303
|
}
|
|
304
304
|
return "";
|
|
305
305
|
}
|
|
306
|
-
var mt = /[\\^$.*+?()[\]{}|]/g, bt = /^\[object .+?Constructor\]$/, gt = Function.prototype, _t = Object.prototype,
|
|
307
|
-
"^" +
|
|
306
|
+
var mt = /[\\^$.*+?()[\]{}|]/g, bt = /^\[object .+?Constructor\]$/, gt = Function.prototype, _t = Object.prototype, yt = gt.toString, Et = _t.hasOwnProperty, wt = RegExp(
|
|
307
|
+
"^" + yt.call(Et).replace(mt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
308
308
|
);
|
|
309
309
|
function Tt(e) {
|
|
310
310
|
if (!G(e) || dt(e))
|
|
311
311
|
return !1;
|
|
312
|
-
var t =
|
|
312
|
+
var t = lt(e) ? wt : bt;
|
|
313
313
|
return t.test(vt(e));
|
|
314
314
|
}
|
|
315
315
|
function Ot(e, t) {
|
|
@@ -444,63 +444,63 @@ I.prototype.get = Jt;
|
|
|
444
444
|
I.prototype.has = Xt;
|
|
445
445
|
I.prototype.set = Kt;
|
|
446
446
|
var Bt = "Expected a function";
|
|
447
|
-
function
|
|
447
|
+
function le(e, t) {
|
|
448
448
|
if (typeof e != "function" || t != null && typeof t != "function")
|
|
449
449
|
throw new TypeError(Bt);
|
|
450
450
|
var r = function() {
|
|
451
|
-
var u = arguments,
|
|
452
|
-
if (n.has(
|
|
453
|
-
return n.get(
|
|
451
|
+
var u = arguments, l = t ? t.apply(this, u) : u[0], n = r.cache;
|
|
452
|
+
if (n.has(l))
|
|
453
|
+
return n.get(l);
|
|
454
454
|
var c = e.apply(this, u);
|
|
455
|
-
return r.cache = n.set(
|
|
455
|
+
return r.cache = n.set(l, c) || n, c;
|
|
456
456
|
};
|
|
457
|
-
return r.cache = new (
|
|
457
|
+
return r.cache = new (le.Cache || I)(), r;
|
|
458
458
|
}
|
|
459
|
-
|
|
460
|
-
var
|
|
459
|
+
le.Cache = I;
|
|
460
|
+
var fe = function() {
|
|
461
461
|
return re.Date.now();
|
|
462
462
|
}, Qt = "Expected a function", Zt = Math.max, er = Math.min;
|
|
463
463
|
function ae(e, t, r) {
|
|
464
|
-
var u,
|
|
464
|
+
var u, l, n, c, h, p, v = 0, g = !1, E = !1, T = !0;
|
|
465
465
|
if (typeof e != "function")
|
|
466
466
|
throw new TypeError(Qt);
|
|
467
|
-
t =
|
|
467
|
+
t = ye(t) || 0, G(r) && (g = !!r.leading, E = "maxWait" in r, n = E ? Zt(ye(r.maxWait) || 0, t) : n, T = "trailing" in r ? !!r.trailing : T);
|
|
468
468
|
function C(o) {
|
|
469
|
-
var
|
|
470
|
-
return u =
|
|
469
|
+
var f = u, d = l;
|
|
470
|
+
return u = l = void 0, v = o, c = e.apply(d, f), c;
|
|
471
471
|
}
|
|
472
472
|
function M(o) {
|
|
473
473
|
return v = o, h = setTimeout(N, t), g ? C(o) : c;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
476
|
-
var
|
|
477
|
-
return
|
|
475
|
+
function y(o) {
|
|
476
|
+
var f = o - p, d = o - v, _ = t - f;
|
|
477
|
+
return E ? er(_, n - d) : _;
|
|
478
478
|
}
|
|
479
479
|
function O(o) {
|
|
480
|
-
var
|
|
481
|
-
return p === void 0 ||
|
|
480
|
+
var f = o - p, d = o - v;
|
|
481
|
+
return p === void 0 || f >= t || f < 0 || E && d >= n;
|
|
482
482
|
}
|
|
483
483
|
function N() {
|
|
484
|
-
var o =
|
|
484
|
+
var o = fe();
|
|
485
485
|
if (O(o))
|
|
486
486
|
return x(o);
|
|
487
|
-
h = setTimeout(N,
|
|
487
|
+
h = setTimeout(N, y(o));
|
|
488
488
|
}
|
|
489
489
|
function x(o) {
|
|
490
|
-
return h = void 0, T && u ? C(o) : (u =
|
|
490
|
+
return h = void 0, T && u ? C(o) : (u = l = void 0, c);
|
|
491
491
|
}
|
|
492
492
|
function D() {
|
|
493
|
-
h !== void 0 && clearTimeout(h), v = 0, u = p =
|
|
493
|
+
h !== void 0 && clearTimeout(h), v = 0, u = p = l = h = void 0;
|
|
494
494
|
}
|
|
495
495
|
function s() {
|
|
496
|
-
return h === void 0 ? c : x(
|
|
496
|
+
return h === void 0 ? c : x(fe());
|
|
497
497
|
}
|
|
498
498
|
function a() {
|
|
499
|
-
var o =
|
|
500
|
-
if (u = arguments,
|
|
499
|
+
var o = fe(), f = O(o);
|
|
500
|
+
if (u = arguments, l = this, p = o, f) {
|
|
501
501
|
if (h === void 0)
|
|
502
502
|
return M(p);
|
|
503
|
-
if (
|
|
503
|
+
if (E)
|
|
504
504
|
return clearTimeout(h), h = setTimeout(N, t), C(p);
|
|
505
505
|
}
|
|
506
506
|
return h === void 0 && (h = setTimeout(N, t)), c;
|
|
@@ -509,13 +509,13 @@ function ae(e, t, r) {
|
|
|
509
509
|
}
|
|
510
510
|
var tr = "Expected a function";
|
|
511
511
|
function rr(e, t, r) {
|
|
512
|
-
var u = !0,
|
|
512
|
+
var u = !0, l = !0;
|
|
513
513
|
if (typeof e != "function")
|
|
514
514
|
throw new TypeError(tr);
|
|
515
|
-
return G(r) && (u = "leading" in r ? !!r.leading : u,
|
|
515
|
+
return G(r) && (u = "leading" in r ? !!r.leading : u, l = "trailing" in r ? !!r.trailing : l), ae(e, t, {
|
|
516
516
|
leading: u,
|
|
517
517
|
maxWait: t,
|
|
518
|
-
trailing:
|
|
518
|
+
trailing: l
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
521
|
class nr {
|
|
@@ -550,13 +550,13 @@ class nr {
|
|
|
550
550
|
* @returns Unsubscribe function.
|
|
551
551
|
*/
|
|
552
552
|
subscribe(t, r) {
|
|
553
|
-
const u = ({ value:
|
|
554
|
-
r(
|
|
553
|
+
const u = ({ value: l }) => {
|
|
554
|
+
r(l);
|
|
555
555
|
};
|
|
556
|
-
return this.event.addListener(String(t), u),
|
|
556
|
+
return this.event.addListener(String(t), u), t in this.data && r(this.data[t]), () => (this.event.removeListener(String(t), u), void 0);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
const or =
|
|
559
|
+
const or = le((e) => new nr(e)), Y = (e = "noname") => z(() => or(e), [e]), Ce = (e, ...t) => {
|
|
560
560
|
const r = new Error("[ctx] useRegistryChecker failed " + JSON.stringify({ names: t, ctx: (e == null ? void 0 : e.name) ?? "undefined" }));
|
|
561
561
|
L(
|
|
562
562
|
() => {
|
|
@@ -572,32 +572,32 @@ const or = fe((e) => new nr(e)), Y = (e = "noname") => z(() => or(e), [e]), Ce =
|
|
|
572
572
|
e && e.data[t] != r && e.publish(t, r);
|
|
573
573
|
}, [t, r, e]), Ce(e, t);
|
|
574
574
|
}, ar = (e, t, r = 0) => {
|
|
575
|
-
const [{ value: u },
|
|
575
|
+
const [{ value: u }, l] = U(() => {
|
|
576
576
|
var n;
|
|
577
577
|
return { value: (n = e == null ? void 0 : e.data) == null ? void 0 : n[t] };
|
|
578
578
|
});
|
|
579
579
|
return L(() => {
|
|
580
580
|
if (e) {
|
|
581
|
-
let n = r == 0 ? (h) =>
|
|
582
|
-
return u != e.data[t] &&
|
|
581
|
+
let n = r == 0 ? (h) => l({ value: h }) : ae((h) => l({ value: h }), r), c = e.subscribe(t, n);
|
|
582
|
+
return u != e.data[t] && l({ value: e.data[t] }), () => {
|
|
583
583
|
c();
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
586
|
}, [t, e]), e == null ? void 0 : e.data[t];
|
|
587
587
|
}, pr = (e, t, r) => {
|
|
588
|
-
const [, u] = U(0),
|
|
588
|
+
const [, u] = U(0), l = z(
|
|
589
589
|
() => r(e == null ? void 0 : e.data[t]),
|
|
590
590
|
[r, e == null ? void 0 : e.data[t]]
|
|
591
591
|
);
|
|
592
592
|
return L(() => {
|
|
593
593
|
if (e) {
|
|
594
|
-
let n =
|
|
594
|
+
let n = l, c = () => {
|
|
595
595
|
let p = r(e.data[t]);
|
|
596
596
|
p != n && (n = p, u((v) => v + 1));
|
|
597
597
|
}, h = e.subscribe(t, c);
|
|
598
598
|
return c(), () => h();
|
|
599
599
|
}
|
|
600
|
-
}, [t, e]),
|
|
600
|
+
}, [t, e]), l;
|
|
601
601
|
}, Le = (e, ...t) => {
|
|
602
602
|
L(() => {
|
|
603
603
|
if (e)
|
|
@@ -605,47 +605,47 @@ const or = fe((e) => new nr(e)), Y = (e = "noname") => z(() => or(e), [e]), Ce =
|
|
|
605
605
|
e.data[r] != u && e.publish(r, u);
|
|
606
606
|
}, [e, ...t.flat()]), Ce(e, ...t.map((r) => r[0]));
|
|
607
607
|
}, vr = (e, ...t) => {
|
|
608
|
-
const [, r] = U(0), u = t.map((
|
|
608
|
+
const [, r] = U(0), u = t.map((l) => {
|
|
609
609
|
var n;
|
|
610
|
-
return (n = e == null ? void 0 : e.data) == null ? void 0 : n[
|
|
610
|
+
return (n = e == null ? void 0 : e.data) == null ? void 0 : n[l];
|
|
611
611
|
});
|
|
612
612
|
return L(() => {
|
|
613
613
|
if (e) {
|
|
614
|
-
let
|
|
614
|
+
let l = u;
|
|
615
615
|
const n = ae(() => {
|
|
616
616
|
let p = t.map((v) => {
|
|
617
617
|
var g;
|
|
618
618
|
return (g = e == null ? void 0 : e.data) == null ? void 0 : g[v];
|
|
619
619
|
});
|
|
620
|
-
t.some((v, g) =>
|
|
620
|
+
t.some((v, g) => l[g] != p[g]) && (l = p, r((v) => v + 1));
|
|
621
621
|
}, 1);
|
|
622
622
|
let c = t.map((p) => e.subscribe(p, n)), h = setTimeout(n, 1);
|
|
623
623
|
return () => {
|
|
624
624
|
clearTimeout(h), n.cancel(), c.forEach((p) => p());
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
|
-
}, [e, ...t]), Object.fromEntries(t.map((
|
|
627
|
+
}, [e, ...t]), Object.fromEntries(t.map((l, n) => [l, u[n]]));
|
|
628
628
|
}, mr = (e, t = 100, ...r) => {
|
|
629
|
-
const [, u] = U(0),
|
|
629
|
+
const [, u] = U(0), l = r.map((n) => {
|
|
630
630
|
var c;
|
|
631
631
|
return (c = e == null ? void 0 : e.data) == null ? void 0 : c[n];
|
|
632
632
|
});
|
|
633
633
|
return L(() => {
|
|
634
634
|
if (e) {
|
|
635
|
-
let n =
|
|
635
|
+
let n = l;
|
|
636
636
|
const c = rr(() => {
|
|
637
637
|
let v = r.map((g) => {
|
|
638
|
-
var
|
|
639
|
-
return (
|
|
638
|
+
var E;
|
|
639
|
+
return (E = e == null ? void 0 : e.data) == null ? void 0 : E[g];
|
|
640
640
|
});
|
|
641
|
-
r.some((g,
|
|
641
|
+
r.some((g, E) => n[E] != v[E]) && (n = v, u((g) => g + 1));
|
|
642
642
|
}, t);
|
|
643
643
|
let h = r.map((v) => e.subscribe(v, c)), p = setTimeout(c, 1);
|
|
644
644
|
return () => {
|
|
645
645
|
clearTimeout(p), c.cancel(), h.forEach((v) => v());
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
|
-
}, [e, ...r]),
|
|
648
|
+
}, [e, ...r]), l;
|
|
649
649
|
};
|
|
650
650
|
var ee = { exports: {} }, J = {};
|
|
651
651
|
/**
|
|
@@ -662,18 +662,18 @@ function ir() {
|
|
|
662
662
|
if (we) return J;
|
|
663
663
|
we = 1;
|
|
664
664
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
665
|
-
function r(u,
|
|
665
|
+
function r(u, l, n) {
|
|
666
666
|
var c = null;
|
|
667
|
-
if (n !== void 0 && (c = "" + n),
|
|
667
|
+
if (n !== void 0 && (c = "" + n), l.key !== void 0 && (c = "" + l.key), "key" in l) {
|
|
668
668
|
n = {};
|
|
669
|
-
for (var h in
|
|
670
|
-
h !== "key" && (n[h] =
|
|
671
|
-
} else n =
|
|
672
|
-
return
|
|
669
|
+
for (var h in l)
|
|
670
|
+
h !== "key" && (n[h] = l[h]);
|
|
671
|
+
} else n = l;
|
|
672
|
+
return l = n.ref, {
|
|
673
673
|
$$typeof: e,
|
|
674
674
|
type: u,
|
|
675
675
|
key: c,
|
|
676
|
-
ref:
|
|
676
|
+
ref: l !== void 0 ? l : null,
|
|
677
677
|
props: n
|
|
678
678
|
};
|
|
679
679
|
}
|
|
@@ -698,7 +698,7 @@ function sr() {
|
|
|
698
698
|
return i.$$typeof === b ? null : i.displayName || i.name || null;
|
|
699
699
|
if (typeof i == "string") return i;
|
|
700
700
|
switch (i) {
|
|
701
|
-
case
|
|
701
|
+
case y:
|
|
702
702
|
return "Fragment";
|
|
703
703
|
case N:
|
|
704
704
|
return "Profiler";
|
|
@@ -724,7 +724,7 @@ function sr() {
|
|
|
724
724
|
case s:
|
|
725
725
|
var m = i.render;
|
|
726
726
|
return i = i.displayName, i || (i = m.displayName || m.name || "", i = i !== "" ? "ForwardRef(" + i + ")" : "ForwardRef"), i;
|
|
727
|
-
case
|
|
727
|
+
case f:
|
|
728
728
|
return m = i.displayName || null, m !== null ? m : e(i.type) || "Memo";
|
|
729
729
|
case d:
|
|
730
730
|
m = i._payload, i = i._init;
|
|
@@ -756,7 +756,7 @@ function sr() {
|
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
758
|
function u(i) {
|
|
759
|
-
if (i ===
|
|
759
|
+
if (i === y) return "<>";
|
|
760
760
|
if (typeof i == "object" && i !== null && i.$$typeof === d)
|
|
761
761
|
return "<...>";
|
|
762
762
|
try {
|
|
@@ -766,7 +766,7 @@ function sr() {
|
|
|
766
766
|
return "<...>";
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function l() {
|
|
770
770
|
var i = j.A;
|
|
771
771
|
return i === null ? null : i.getOwner();
|
|
772
772
|
}
|
|
@@ -836,13 +836,13 @@ function sr() {
|
|
|
836
836
|
if (R)
|
|
837
837
|
if (B(S)) {
|
|
838
838
|
for (R = 0; R < S.length; R++)
|
|
839
|
-
|
|
839
|
+
E(S[R]);
|
|
840
840
|
Object.freeze && Object.freeze(S);
|
|
841
841
|
} else
|
|
842
842
|
console.error(
|
|
843
843
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
844
844
|
);
|
|
845
|
-
else
|
|
845
|
+
else E(S);
|
|
846
846
|
if (A.call(m, "key")) {
|
|
847
847
|
S = e(i);
|
|
848
848
|
var F = Object.keys(m).filter(function(Pe) {
|
|
@@ -874,16 +874,16 @@ React keys must be passed directly to JSX without using spread:
|
|
|
874
874
|
S,
|
|
875
875
|
P,
|
|
876
876
|
k,
|
|
877
|
-
|
|
877
|
+
l(),
|
|
878
878
|
w,
|
|
879
879
|
ie,
|
|
880
880
|
se
|
|
881
881
|
);
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function E(i) {
|
|
884
884
|
typeof i == "object" && i !== null && i.$$typeof === C && i._store && (i._store.validated = 1);
|
|
885
885
|
}
|
|
886
|
-
var T = ke, C = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"),
|
|
886
|
+
var T = ke, 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"), s = Symbol.for("react.forward_ref"), a = Symbol.for("react.suspense"), o = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), _ = 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, H = console.createTask ? console.createTask : function() {
|
|
887
887
|
return null;
|
|
888
888
|
};
|
|
889
889
|
T = {
|
|
@@ -895,7 +895,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
895
895
|
T,
|
|
896
896
|
n
|
|
897
897
|
)(), ve = H(u(n)), me = {};
|
|
898
|
-
X.Fragment =
|
|
898
|
+
X.Fragment = y, X.jsx = function(i, m, w, R, k) {
|
|
899
899
|
var P = 1e4 > j.recentlyCreatedOwnerStacks++;
|
|
900
900
|
return g(
|
|
901
901
|
i,
|
|
@@ -933,7 +933,7 @@ const br = (e, t) => {
|
|
|
933
933
|
...Object.entries(n ?? {}).sort((c, h) => c[0].localeCompare(h[0])).flat()
|
|
934
934
|
].join("-");
|
|
935
935
|
let u = /* @__PURE__ */ new Set();
|
|
936
|
-
const
|
|
936
|
+
const l = (n) => {
|
|
937
937
|
const c = r(n), h = Y(c), p = t(n), v = z(() => new Error().stack, []);
|
|
938
938
|
return Le(
|
|
939
939
|
h,
|
|
@@ -948,9 +948,9 @@ const br = (e, t) => {
|
|
|
948
948
|
};
|
|
949
949
|
}), /* @__PURE__ */ W.jsx(W.Fragment, {});
|
|
950
950
|
};
|
|
951
|
-
return
|
|
951
|
+
return l.displayName = `State[${(t == null ? void 0 : t.name) ?? "??"}]`, {
|
|
952
952
|
resolveCtxName: r,
|
|
953
|
-
Root:
|
|
953
|
+
Root: l,
|
|
954
954
|
useCtxStateStrict: (n) => {
|
|
955
955
|
const c = r(n), h = z(() => new Error().stack, []);
|
|
956
956
|
return L(() => {
|
|
@@ -978,18 +978,18 @@ const br = (e, t) => {
|
|
|
978
978
|
let r = e.get(t);
|
|
979
979
|
return r || e.set(t, r = ((t == null ? void 0 : t.name) ?? "") + Math.random().toString()), r;
|
|
980
980
|
};
|
|
981
|
-
}(),
|
|
981
|
+
}(), fr = (e) => [
|
|
982
982
|
...Object.entries(e ?? {}).sort((t, r) => t[0].localeCompare(r[0])).flat()
|
|
983
983
|
].join("-"), gr = ({ Wrapper: e = $e }) => {
|
|
984
|
-
const t = Y("auto-ctx"), [r, u] = U({}),
|
|
984
|
+
const t = Y("auto-ctx"), [r, u] = U({}), l = Me(
|
|
985
985
|
(n, c) => {
|
|
986
|
-
const h = cr(n), p =
|
|
986
|
+
const h = cr(n), p = fr(c);
|
|
987
987
|
return u(({
|
|
988
988
|
[h]: {
|
|
989
989
|
Component: v = n,
|
|
990
990
|
subState: {
|
|
991
991
|
[p]: g = { params: c, counter: 0 },
|
|
992
|
-
...
|
|
992
|
+
...E
|
|
993
993
|
} = {}
|
|
994
994
|
} = {},
|
|
995
995
|
...T
|
|
@@ -998,7 +998,7 @@ const br = (e, t) => {
|
|
|
998
998
|
[h]: {
|
|
999
999
|
Component: v,
|
|
1000
1000
|
subState: {
|
|
1001
|
-
...
|
|
1001
|
+
...E,
|
|
1002
1002
|
[p]: {
|
|
1003
1003
|
...g,
|
|
1004
1004
|
counter: g.counter + 1
|
|
@@ -1010,7 +1010,7 @@ const br = (e, t) => {
|
|
|
1010
1010
|
Component: v = n,
|
|
1011
1011
|
subState: {
|
|
1012
1012
|
[p]: g = { params: c, counter: 0 },
|
|
1013
|
-
...
|
|
1013
|
+
...E
|
|
1014
1014
|
} = {}
|
|
1015
1015
|
} = {},
|
|
1016
1016
|
...T
|
|
@@ -1019,7 +1019,7 @@ const br = (e, t) => {
|
|
|
1019
1019
|
[h]: {
|
|
1020
1020
|
Component: v,
|
|
1021
1021
|
subState: {
|
|
1022
|
-
...
|
|
1022
|
+
...E,
|
|
1023
1023
|
...g.counter > 1 ? {
|
|
1024
1024
|
[p]: {
|
|
1025
1025
|
...g,
|
|
@@ -1034,51 +1034,51 @@ const br = (e, t) => {
|
|
|
1034
1034
|
);
|
|
1035
1035
|
return Le(
|
|
1036
1036
|
t,
|
|
1037
|
-
["subscribe",
|
|
1037
|
+
["subscribe", l],
|
|
1038
1038
|
["state", r]
|
|
1039
1039
|
), /* @__PURE__ */ W.jsx(W.Fragment, { children: Object.entries(r).flatMap(
|
|
1040
1040
|
([n, { Component: c, subState: h }]) => Object.entries(h).map(([p, { counter: v, params: g }]) => ({ key: n + p, Component: c, params: g, counter: v })).filter((p) => p.counter > 0).map(({ key: p, params: v, Component: g }) => /* @__PURE__ */ W.jsx(e, { children: /* @__PURE__ */ W.jsx(g, { ...v }) }, p))
|
|
1041
1041
|
) });
|
|
1042
1042
|
}, _r = ({ Root: e, useCtxState: t, useCtxStateStrict: r, resolveCtxName: u }) => ({
|
|
1043
|
-
useCtxState: (
|
|
1044
|
-
const n = u(
|
|
1045
|
-
return L(() => c == null ? void 0 : c(e,
|
|
1043
|
+
useCtxState: (l) => {
|
|
1044
|
+
const n = u(l), c = ar(Y("auto-ctx"), "subscribe");
|
|
1045
|
+
return L(() => c == null ? void 0 : c(e, l), [c, n]), Y(n);
|
|
1046
1046
|
}
|
|
1047
|
-
}),
|
|
1048
|
-
const [, t] = U(0), { proxy: r, finalGetter: u, openGetter:
|
|
1047
|
+
}), yr = (e) => {
|
|
1048
|
+
const [, t] = U(0), { proxy: r, finalGetter: u, openGetter: l, clean: n } = z(
|
|
1049
1049
|
() => {
|
|
1050
1050
|
const c = /* @__PURE__ */ new Set(), h = {}, p = /* @__PURE__ */ new Map(), v = new Proxy(
|
|
1051
1051
|
e == null ? void 0 : e.data,
|
|
1052
1052
|
{
|
|
1053
|
-
get(
|
|
1053
|
+
get(y, O) {
|
|
1054
1054
|
if (g)
|
|
1055
|
-
return c.add(O), h[O] =
|
|
1055
|
+
return c.add(O), h[O] = y[O];
|
|
1056
1056
|
throw new Error("now allow here");
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
1059
|
);
|
|
1060
|
-
let g = !0,
|
|
1061
|
-
[...c.values()].some((
|
|
1060
|
+
let g = !0, E = ae(() => {
|
|
1061
|
+
[...c.values()].some((y) => {
|
|
1062
1062
|
var O;
|
|
1063
|
-
return h[
|
|
1064
|
-
}) && t((
|
|
1063
|
+
return h[y] != ((O = e == null ? void 0 : e.data) == null ? void 0 : O[y]);
|
|
1064
|
+
}) && t((y) => y + 1);
|
|
1065
1065
|
}, 0), T = () => {
|
|
1066
1066
|
g = !0, c.clear();
|
|
1067
1067
|
}, C = () => {
|
|
1068
|
-
g = !1, [...c.values()].filter((
|
|
1069
|
-
p.set(
|
|
1070
|
-
}), [...p.keys()].filter((
|
|
1071
|
-
let O = p.get(
|
|
1072
|
-
O == null || O(), p.delete(
|
|
1068
|
+
g = !1, [...c.values()].filter((y) => !p.has(y)).forEach((y) => {
|
|
1069
|
+
p.set(y, e == null ? void 0 : e.subscribe(y, E));
|
|
1070
|
+
}), [...p.keys()].filter((y) => !c.has(y)).forEach((y) => {
|
|
1071
|
+
let O = p.get(y);
|
|
1072
|
+
O == null || O(), p.delete(y);
|
|
1073
1073
|
});
|
|
1074
1074
|
};
|
|
1075
1075
|
return { proxy: v, finalGetter: C, openGetter: T, clean: () => {
|
|
1076
|
-
T(), C(), t((
|
|
1076
|
+
T(), C(), t((y) => y + 1);
|
|
1077
1077
|
} };
|
|
1078
1078
|
},
|
|
1079
1079
|
[e]
|
|
1080
1080
|
);
|
|
1081
|
-
return
|
|
1081
|
+
return l(), setTimeout(u, 0), L(
|
|
1082
1082
|
() => () => n(),
|
|
1083
1083
|
[n]
|
|
1084
1084
|
), r;
|
|
@@ -1096,5 +1096,5 @@ export {
|
|
|
1096
1096
|
vr as useDataSubscribeMultiple,
|
|
1097
1097
|
mr as useDataSubscribeMultipleWithDebounce,
|
|
1098
1098
|
pr as useDataSubscribeWithTransform,
|
|
1099
|
-
|
|
1099
|
+
yr as useQuickSubscribe
|
|
1100
1100
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(S,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],v):(S=typeof globalThis<"u"?globalThis:S||self,v(S.RState={},S.React))})(this,function(S,v){"use strict";var pn=Object.defineProperty;var vn=(S,v,W)=>v in S?pn(S,v,{enumerable:!0,configurable:!0,writable:!0,value:W}):S[v]=W;var ae=(S,v,W)=>vn(S,typeof v!="symbol"?v+"":v,W);function W(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Z={exports:{}},he;function Me(){if(he)return Z.exports;he=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(a,o,f){return Function.prototype.apply.call(a,o,f)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(a){return Object.getOwnPropertyNames(a).concat(Object.getOwnPropertySymbols(a))}:n=function(a){return Object.getOwnPropertyNames(a)};function u(i){console&&console.warn&&console.warn(i)}var l=Number.isNaN||function(a){return a!==a};function r(){r.init.call(this)}Z.exports=r,Z.exports.once=A,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var c=10;function h(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(i){if(typeof i!="number"||i<0||l(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");c=i}}),r.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(a){if(typeof a!="number"||a<0||l(a))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+a+".");return this._maxListeners=a,this};function p(i){return i._maxListeners===void 0?r.defaultMaxListeners:i._maxListeners}r.prototype.getMaxListeners=function(){return p(this)},r.prototype.emit=function(a){for(var o=[],f=1;f<arguments.length;f++)o.push(arguments[f]);var d=a==="error",E=this._events;if(E!==void 0)d=d&&E.error===void 0;else if(!d)return!1;if(d){var g;if(o.length>0&&(g=o[0]),g instanceof Error)throw g;var L=new Error("Unhandled error."+(g?" ("+g.message+")":""));throw L.context=g,L}var M=E[a];if(M===void 0)return!1;if(typeof M=="function")t(M,this,o);else for(var oe=M.length,Q=F(M,oe),f=0;f<oe;++f)t(Q[f],this,o);return!0};function m(i,a,o,f){var d,E,g;if(h(o),E=i._events,E===void 0?(E=i._events=Object.create(null),i._eventsCount=0):(E.newListener!==void 0&&(i.emit("newListener",a,o.listener?o.listener:o),E=i._events),g=E[a]),g===void 0)g=E[a]=o,++i._eventsCount;else if(typeof g=="function"?g=E[a]=f?[o,g]:[g,o]:f?g.unshift(o):g.push(o),d=p(i),d>0&&g.length>d&&!g.warned){g.warned=!0;var L=new Error("Possible EventEmitter memory leak detected. "+g.length+" "+String(a)+" listeners added. Use emitter.setMaxListeners() to increase limit");L.name="MaxListenersExceededWarning",L.emitter=i,L.type=a,L.count=g.length,u(L)}return i}r.prototype.addListener=function(a,o){return m(this,a,o,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(a,o){return m(this,a,o,!0)};function _(){if(!this.fired)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)}function T(i,a,o){var f={fired:!1,wrapFn:void 0,target:i,type:a,listener:o},d=_.bind(f);return d.listener=o,f.wrapFn=d,d}r.prototype.once=function(a,o){return h(o),this.on(a,T(this,a,o)),this},r.prototype.prependOnceListener=function(a,o){return h(o),this.prependListener(a,T(this,a,o)),this},r.prototype.removeListener=function(a,o){var f,d,E,g,L;if(h(o),d=this._events,d===void 0)return this;if(f=d[a],f===void 0)return this;if(f===o||f.listener===o)--this._eventsCount===0?this._events=Object.create(null):(delete d[a],d.removeListener&&this.emit("removeListener",a,f.listener||o));else if(typeof f!="function"){for(E=-1,g=f.length-1;g>=0;g--)if(f[g]===o||f[g].listener===o){L=f[g].listener,E=g;break}if(E<0)return this;E===0?f.shift():y(f,E),f.length===1&&(d[a]=f[0]),d.removeListener!==void 0&&this.emit("removeListener",a,L||o)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(a){var o,f,d;if(f=this._events,f===void 0)return this;if(f.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):f[a]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete f[a]),this;if(arguments.length===0){var E=Object.keys(f),g;for(d=0;d<E.length;++d)g=E[d],g!=="removeListener"&&this.removeAllListeners(g);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(o=f[a],typeof o=="function")this.removeListener(a,o);else if(o!==void 0)for(d=o.length-1;d>=0;d--)this.removeListener(a,o[d]);return this};function O(i,a,o){var f=i._events;if(f===void 0)return[];var d=f[a];return d===void 0?[]:typeof d=="function"?o?[d.listener||d]:[d]:o?R(d):F(d,d.length)}r.prototype.listeners=function(a){return O(this,a,!0)},r.prototype.rawListeners=function(a){return O(this,a,!1)},r.listenerCount=function(i,a){return typeof i.listenerCount=="function"?i.listenerCount(a):P.call(i,a)},r.prototype.listenerCount=P;function P(i){var a=this._events;if(a!==void 0){var o=a[i];if(typeof o=="function")return 1;if(o!==void 0)return o.length}return 0}r.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function F(i,a){for(var o=new Array(a),f=0;f<a;++f)o[f]=i[f];return o}function y(i,a){for(;a+1<i.length;a++)i[a]=i[a+1];i.pop()}function R(i){for(var a=new Array(i.length),o=0;o<a.length;++o)a[o]=i[o].listener||i[o];return a}function A(i,a){return new Promise(function(o,f){function d(g){i.removeListener(a,E),f(g)}function E(){typeof i.removeListener=="function"&&i.removeListener("error",d),o([].slice.call(arguments))}V(i,a,E,{once:!0}),a!=="error"&&U(i,d,{once:!0})})}function U(i,a,o){typeof i.on=="function"&&V(i,"error",a,o)}function V(i,a,o,f){if(typeof i.on=="function")f.once?i.once(a,o):i.on(a,o);else if(typeof i.addEventListener=="function")i.addEventListener(a,function d(E){f.once&&i.removeEventListener(a,d),o(E)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i)}return Z.exports}var ke=Me();const De=W(ke);var Ie=typeof global=="object"&&global&&global.Object===Object&&global,xe=typeof self=="object"&&self&&self.Object===Object&&self,$=Ie||xe||Function("return this")(),q=$.Symbol,pe=Object.prototype,Fe=pe.hasOwnProperty,We=pe.toString,J=q?q.toStringTag:void 0;function ze(e){var t=Fe.call(e,J),n=e[J];try{e[J]=void 0;var u=!0}catch{}var l=We.call(e);return u&&(t?e[J]=n:delete e[J]),l}var Ye=Object.prototype,Ge=Ye.toString;function Ue(e){return Ge.call(e)}var Ve="[object Null]",He="[object Undefined]",ve=q?q.toStringTag:void 0;function me(e){return e==null?e===void 0?He:Ve:ve&&ve in Object(e)?ze(e):Ue(e)}function Je(e){return e!=null&&typeof e=="object"}var Xe="[object Symbol]";function Ke(e){return typeof e=="symbol"||Je(e)&&me(e)==Xe}var Be=/\s/;function Qe(e){for(var t=e.length;t--&&Be.test(e.charAt(t)););return t}var Ze=/^\s+/;function $e(e){return e&&e.slice(0,Qe(e)+1).replace(Ze,"")}function z(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var be=NaN,qe=/^[-+]0x[0-9a-f]+$/i,et=/^0b[01]+$/i,tt=/^0o[0-7]+$/i,nt=parseInt;function ge(e){if(typeof e=="number")return e;if(Ke(e))return be;if(z(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=z(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=$e(e);var n=et.test(e);return n||tt.test(e)?nt(e.slice(2),n?2:8):qe.test(e)?be:+e}var rt="[object AsyncFunction]",ot="[object Function]",at="[object GeneratorFunction]",st="[object Proxy]";function it(e){if(!z(e))return!1;var t=me(e);return t==ot||t==at||t==rt||t==st}var se=$["__core-js_shared__"],_e=function(){var e=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ut(e){return!!_e&&_e in e}var ct=Function.prototype,ft=ct.toString;function lt(e){if(e!=null){try{return ft.call(e)}catch{}try{return e+""}catch{}}return""}var dt=/[\\^$.*+?()[\]{}|]/g,ht=/^\[object .+?Constructor\]$/,pt=Function.prototype,vt=Object.prototype,mt=pt.toString,bt=vt.hasOwnProperty,gt=RegExp("^"+mt.call(bt).replace(dt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _t(e){if(!z(e)||ut(e))return!1;var t=it(e)?gt:ht;return t.test(lt(e))}function Et(e,t){return e==null?void 0:e[t]}function Ee(e,t){var n=Et(e,t);return _t(n)?n:void 0}function yt(e,t){return e===t||e!==e&&t!==t}var X=Ee(Object,"create");function St(){this.__data__=X?X(null):{},this.size=0}function Tt(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var wt="__lodash_hash_undefined__",Ot=Object.prototype,Rt=Ot.hasOwnProperty;function Ct(e){var t=this.__data__;if(X){var n=t[e];return n===wt?void 0:n}return Rt.call(t,e)?t[e]:void 0}var jt=Object.prototype,Lt=jt.hasOwnProperty;function Pt(e){var t=this.__data__;return X?t[e]!==void 0:Lt.call(t,e)}var Nt="__lodash_hash_undefined__";function At(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=X&&t===void 0?Nt:t,this}function D(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var u=e[t];this.set(u[0],u[1])}}D.prototype.clear=St,D.prototype.delete=Tt,D.prototype.get=Ct,D.prototype.has=Pt,D.prototype.set=At;function Mt(){this.__data__=[],this.size=0}function ee(e,t){for(var n=e.length;n--;)if(yt(e[n][0],t))return n;return-1}var kt=Array.prototype,Dt=kt.splice;function It(e){var t=this.__data__,n=ee(t,e);if(n<0)return!1;var u=t.length-1;return n==u?t.pop():Dt.call(t,n,1),--this.size,!0}function xt(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]}function Ft(e){return ee(this.__data__,e)>-1}function Wt(e,t){var n=this.__data__,u=ee(n,e);return u<0?(++this.size,n.push([e,t])):n[u][1]=t,this}function Y(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var u=e[t];this.set(u[0],u[1])}}Y.prototype.clear=Mt,Y.prototype.delete=It,Y.prototype.get=xt,Y.prototype.has=Ft,Y.prototype.set=Wt;var zt=Ee($,"Map");function Yt(){this.size=0,this.__data__={hash:new D,map:new(zt||Y),string:new D}}function Gt(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function te(e,t){var n=e.__data__;return Gt(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Ut(e){var t=te(this,e).delete(e);return this.size-=t?1:0,t}function Vt(e){return te(this,e).get(e)}function Ht(e){return te(this,e).has(e)}function Jt(e,t){var n=te(this,e),u=n.size;return n.set(e,t),this.size+=n.size==u?0:1,this}function I(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var u=e[t];this.set(u[0],u[1])}}I.prototype.clear=Yt,I.prototype.delete=Ut,I.prototype.get=Vt,I.prototype.has=Ht,I.prototype.set=Jt;var Xt="Expected a function";function ie(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Xt);var n=function(){var u=arguments,l=t?t.apply(this,u):u[0],r=n.cache;if(r.has(l))return r.get(l);var c=e.apply(this,u);return n.cache=r.set(l,c)||r,c};return n.cache=new(ie.Cache||I),n}ie.Cache=I;var ue=function(){return $.Date.now()},Kt="Expected a function",Bt=Math.max,Qt=Math.min;function ne(e,t,n){var u,l,r,c,h,p,m=0,_=!1,T=!1,O=!0;if(typeof e!="function")throw new TypeError(Kt);t=ge(t)||0,z(n)&&(_=!!n.leading,T="maxWait"in n,r=T?Bt(ge(n.maxWait)||0,t):r,O="trailing"in n?!!n.trailing:O);function P(o){var f=u,d=l;return u=l=void 0,m=o,c=e.apply(d,f),c}function F(o){return m=o,h=setTimeout(A,t),_?P(o):c}function y(o){var f=o-p,d=o-m,E=t-f;return T?Qt(E,r-d):E}function R(o){var f=o-p,d=o-m;return p===void 0||f>=t||f<0||T&&d>=r}function A(){var o=ue();if(R(o))return U(o);h=setTimeout(A,y(o))}function U(o){return h=void 0,O&&u?P(o):(u=l=void 0,c)}function V(){h!==void 0&&clearTimeout(h),m=0,u=p=l=h=void 0}function i(){return h===void 0?c:U(ue())}function a(){var o=ue(),f=R(o);if(u=arguments,l=this,p=o,f){if(h===void 0)return F(p);if(T)return clearTimeout(h),h=setTimeout(A,t),P(p)}return h===void 0&&(h=setTimeout(A,t)),c}return a.cancel=V,a.flush=i,a}var Zt="Expected a function";function $t(e,t,n){var u=!0,l=!0;if(typeof e!="function")throw new TypeError(Zt);return z(n)&&(u="leading"in n?!!n.leading:u,l="trailing"in n?!!n.trailing:l),ne(e,t,{leading:u,maxWait:t,trailing:l})}class ye{constructor(t){ae(this,"event",new De.EventEmitter);ae(this,"data",{});ae(this,"registry",new Set);this.name=t,console.log("[CONTEXT] %s",t),this.event.setMaxListeners(100)}publish(t,n){n!=this.data[t]&&(this.data[t]=n,this.event.emit(String(t),{value:n}))}subscribe(t,n){const u=({value:l})=>{n(l)};return this.event.addListener(String(t),u),console.log("listenerCount:",String(t),this.event.listenerCount(String(t))),t in this.data&&n(this.data[t]),()=>(this.event.removeListener(String(t),u),void 0)}}const Se=ie(e=>new ye(e)),x=(e="noname")=>v.useMemo(()=>Se(e),[e]),Te=(e,...t)=>{const n=new Error("[ctx] useRegistryChecker failed "+JSON.stringify({names:t,ctx:(e==null?void 0:e.name)??"undefined"}));v.useEffect(()=>{if(e)return t.some(u=>e.registry.has(u))&&console.error(n),t.forEach(u=>e.registry.add(u)),()=>{t.forEach(u=>e.registry.delete(u))}},[e,t.length])},qt=(e,t,n)=>{v.useEffect(()=>{e&&e.data[t]!=n&&e.publish(t,n)},[t,n,e]),Te(e,t)},we=(e,t,n=0)=>{const[{value:u},l]=v.useState(()=>{var r;return{value:(r=e==null?void 0:e.data)==null?void 0:r[t]}});return v.useEffect(()=>{if(e){let r=n==0?h=>l({value:h}):ne(h=>l({value:h}),n),c=e.subscribe(t,r);return u!=e.data[t]&&l({value:e.data[t]}),()=>{c()}}},[t,e]),e==null?void 0:e.data[t]},en=(e,t,n)=>{const[,u]=v.useState(0),l=v.useMemo(()=>n(e==null?void 0:e.data[t]),[n,e==null?void 0:e.data[t]]);return v.useEffect(()=>{if(e){let r=l,c=()=>{let p=n(e.data[t]);p!=r&&(r=p,u(m=>m+1))},h=e.subscribe(t,c);return c(),()=>h()}},[t,e]),l},ce=(e,...t)=>{v.useEffect(()=>{if(e)for(let[n,u]of t)e.data[n]!=u&&e.publish(n,u)},[e,...t.flat()]),Te(e,...t.map(n=>n[0]))},tn=(e,...t)=>{const[,n]=v.useState(0),u=t.map(l=>{var r;return(r=e==null?void 0:e.data)==null?void 0:r[l]});return v.useEffect(()=>{if(e){let l=u;const r=ne(()=>{let p=t.map(m=>{var _;return(_=e==null?void 0:e.data)==null?void 0:_[m]});t.some((m,_)=>l[_]!=p[_])&&(l=p,n(m=>m+1))},1);let c=t.map(p=>e.subscribe(p,r)),h=setTimeout(r,1);return()=>{clearTimeout(h),r.cancel(),c.forEach(p=>p())}}},[e,...t]),Object.fromEntries(t.map((l,r)=>[l,u[r]]))},nn=(e,t=100,...n)=>{const[,u]=v.useState(0),l=n.map(r=>{var c;return(c=e==null?void 0:e.data)==null?void 0:c[r]});return v.useEffect(()=>{if(e){let r=l;const c=$t(()=>{let m=n.map(_=>{var T;return(T=e==null?void 0:e.data)==null?void 0:T[_]});n.some((_,T)=>r[T]!=m[T])&&(r=m,u(_=>_+1))},t);let h=n.map(m=>e.subscribe(m,c)),p=setTimeout(c,1);return()=>{clearTimeout(p),c.cancel(),h.forEach(m=>m())}}},[e,...n]),l};var re={exports:{}},K={};/**
|
|
1
|
+
(function(T,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],v):(T=typeof globalThis<"u"?globalThis:T||self,v(T.RState={},T.React))})(this,function(T,v){"use strict";var pn=Object.defineProperty;var vn=(T,v,W)=>v in T?pn(T,v,{enumerable:!0,configurable:!0,writable:!0,value:W}):T[v]=W;var ae=(T,v,W)=>vn(T,typeof v!="symbol"?v+"":v,W);function W(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Z={exports:{}},he;function Me(){if(he)return Z.exports;he=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(a,o,f){return Function.prototype.apply.call(a,o,f)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(a){return Object.getOwnPropertyNames(a).concat(Object.getOwnPropertySymbols(a))}:n=function(a){return Object.getOwnPropertyNames(a)};function u(i){console&&console.warn&&console.warn(i)}var l=Number.isNaN||function(a){return a!==a};function r(){r.init.call(this)}Z.exports=r,Z.exports.once=A,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var c=10;function h(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(i){if(typeof i!="number"||i<0||l(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");c=i}}),r.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(a){if(typeof a!="number"||a<0||l(a))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+a+".");return this._maxListeners=a,this};function p(i){return i._maxListeners===void 0?r.defaultMaxListeners:i._maxListeners}r.prototype.getMaxListeners=function(){return p(this)},r.prototype.emit=function(a){for(var o=[],f=1;f<arguments.length;f++)o.push(arguments[f]);var d=a==="error",E=this._events;if(E!==void 0)d=d&&E.error===void 0;else if(!d)return!1;if(d){var g;if(o.length>0&&(g=o[0]),g instanceof Error)throw g;var L=new Error("Unhandled error."+(g?" ("+g.message+")":""));throw L.context=g,L}var M=E[a];if(M===void 0)return!1;if(typeof M=="function")t(M,this,o);else for(var oe=M.length,Q=F(M,oe),f=0;f<oe;++f)t(Q[f],this,o);return!0};function m(i,a,o,f){var d,E,g;if(h(o),E=i._events,E===void 0?(E=i._events=Object.create(null),i._eventsCount=0):(E.newListener!==void 0&&(i.emit("newListener",a,o.listener?o.listener:o),E=i._events),g=E[a]),g===void 0)g=E[a]=o,++i._eventsCount;else if(typeof g=="function"?g=E[a]=f?[o,g]:[g,o]:f?g.unshift(o):g.push(o),d=p(i),d>0&&g.length>d&&!g.warned){g.warned=!0;var L=new Error("Possible EventEmitter memory leak detected. "+g.length+" "+String(a)+" listeners added. Use emitter.setMaxListeners() to increase limit");L.name="MaxListenersExceededWarning",L.emitter=i,L.type=a,L.count=g.length,u(L)}return i}r.prototype.addListener=function(a,o){return m(this,a,o,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(a,o){return m(this,a,o,!0)};function _(){if(!this.fired)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)}function S(i,a,o){var f={fired:!1,wrapFn:void 0,target:i,type:a,listener:o},d=_.bind(f);return d.listener=o,f.wrapFn=d,d}r.prototype.once=function(a,o){return h(o),this.on(a,S(this,a,o)),this},r.prototype.prependOnceListener=function(a,o){return h(o),this.prependListener(a,S(this,a,o)),this},r.prototype.removeListener=function(a,o){var f,d,E,g,L;if(h(o),d=this._events,d===void 0)return this;if(f=d[a],f===void 0)return this;if(f===o||f.listener===o)--this._eventsCount===0?this._events=Object.create(null):(delete d[a],d.removeListener&&this.emit("removeListener",a,f.listener||o));else if(typeof f!="function"){for(E=-1,g=f.length-1;g>=0;g--)if(f[g]===o||f[g].listener===o){L=f[g].listener,E=g;break}if(E<0)return this;E===0?f.shift():y(f,E),f.length===1&&(d[a]=f[0]),d.removeListener!==void 0&&this.emit("removeListener",a,L||o)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(a){var o,f,d;if(f=this._events,f===void 0)return this;if(f.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):f[a]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete f[a]),this;if(arguments.length===0){var E=Object.keys(f),g;for(d=0;d<E.length;++d)g=E[d],g!=="removeListener"&&this.removeAllListeners(g);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(o=f[a],typeof o=="function")this.removeListener(a,o);else if(o!==void 0)for(d=o.length-1;d>=0;d--)this.removeListener(a,o[d]);return this};function O(i,a,o){var f=i._events;if(f===void 0)return[];var d=f[a];return d===void 0?[]:typeof d=="function"?o?[d.listener||d]:[d]:o?R(d):F(d,d.length)}r.prototype.listeners=function(a){return O(this,a,!0)},r.prototype.rawListeners=function(a){return O(this,a,!1)},r.listenerCount=function(i,a){return typeof i.listenerCount=="function"?i.listenerCount(a):P.call(i,a)},r.prototype.listenerCount=P;function P(i){var a=this._events;if(a!==void 0){var o=a[i];if(typeof o=="function")return 1;if(o!==void 0)return o.length}return 0}r.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function F(i,a){for(var o=new Array(a),f=0;f<a;++f)o[f]=i[f];return o}function y(i,a){for(;a+1<i.length;a++)i[a]=i[a+1];i.pop()}function R(i){for(var a=new Array(i.length),o=0;o<a.length;++o)a[o]=i[o].listener||i[o];return a}function A(i,a){return new Promise(function(o,f){function d(g){i.removeListener(a,E),f(g)}function E(){typeof i.removeListener=="function"&&i.removeListener("error",d),o([].slice.call(arguments))}V(i,a,E,{once:!0}),a!=="error"&&U(i,d,{once:!0})})}function U(i,a,o){typeof i.on=="function"&&V(i,"error",a,o)}function V(i,a,o,f){if(typeof i.on=="function")f.once?i.once(a,o):i.on(a,o);else if(typeof i.addEventListener=="function")i.addEventListener(a,function d(E){f.once&&i.removeEventListener(a,d),o(E)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i)}return Z.exports}var ke=Me();const De=W(ke);var Ie=typeof global=="object"&&global&&global.Object===Object&&global,xe=typeof self=="object"&&self&&self.Object===Object&&self,$=Ie||xe||Function("return this")(),q=$.Symbol,pe=Object.prototype,Fe=pe.hasOwnProperty,We=pe.toString,J=q?q.toStringTag:void 0;function ze(e){var t=Fe.call(e,J),n=e[J];try{e[J]=void 0;var u=!0}catch{}var l=We.call(e);return u&&(t?e[J]=n:delete e[J]),l}var Ye=Object.prototype,Ge=Ye.toString;function Ue(e){return Ge.call(e)}var Ve="[object Null]",He="[object Undefined]",ve=q?q.toStringTag:void 0;function me(e){return e==null?e===void 0?He:Ve:ve&&ve in Object(e)?ze(e):Ue(e)}function Je(e){return e!=null&&typeof e=="object"}var Xe="[object Symbol]";function Ke(e){return typeof e=="symbol"||Je(e)&&me(e)==Xe}var Be=/\s/;function Qe(e){for(var t=e.length;t--&&Be.test(e.charAt(t)););return t}var Ze=/^\s+/;function $e(e){return e&&e.slice(0,Qe(e)+1).replace(Ze,"")}function z(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var be=NaN,qe=/^[-+]0x[0-9a-f]+$/i,et=/^0b[01]+$/i,tt=/^0o[0-7]+$/i,nt=parseInt;function ge(e){if(typeof e=="number")return e;if(Ke(e))return be;if(z(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=z(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=$e(e);var n=et.test(e);return n||tt.test(e)?nt(e.slice(2),n?2:8):qe.test(e)?be:+e}var rt="[object AsyncFunction]",ot="[object Function]",at="[object GeneratorFunction]",st="[object Proxy]";function it(e){if(!z(e))return!1;var t=me(e);return t==ot||t==at||t==rt||t==st}var se=$["__core-js_shared__"],_e=function(){var e=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ut(e){return!!_e&&_e in e}var ct=Function.prototype,ft=ct.toString;function lt(e){if(e!=null){try{return ft.call(e)}catch{}try{return e+""}catch{}}return""}var dt=/[\\^$.*+?()[\]{}|]/g,ht=/^\[object .+?Constructor\]$/,pt=Function.prototype,vt=Object.prototype,mt=pt.toString,bt=vt.hasOwnProperty,gt=RegExp("^"+mt.call(bt).replace(dt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _t(e){if(!z(e)||ut(e))return!1;var t=it(e)?gt:ht;return t.test(lt(e))}function Et(e,t){return e==null?void 0:e[t]}function Ee(e,t){var n=Et(e,t);return _t(n)?n:void 0}function yt(e,t){return e===t||e!==e&&t!==t}var X=Ee(Object,"create");function Tt(){this.__data__=X?X(null):{},this.size=0}function St(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var wt="__lodash_hash_undefined__",Ot=Object.prototype,Rt=Ot.hasOwnProperty;function Ct(e){var t=this.__data__;if(X){var n=t[e];return n===wt?void 0:n}return Rt.call(t,e)?t[e]:void 0}var jt=Object.prototype,Lt=jt.hasOwnProperty;function Pt(e){var t=this.__data__;return X?t[e]!==void 0:Lt.call(t,e)}var Nt="__lodash_hash_undefined__";function At(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=X&&t===void 0?Nt:t,this}function D(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var u=e[t];this.set(u[0],u[1])}}D.prototype.clear=Tt,D.prototype.delete=St,D.prototype.get=Ct,D.prototype.has=Pt,D.prototype.set=At;function Mt(){this.__data__=[],this.size=0}function ee(e,t){for(var n=e.length;n--;)if(yt(e[n][0],t))return n;return-1}var kt=Array.prototype,Dt=kt.splice;function It(e){var t=this.__data__,n=ee(t,e);if(n<0)return!1;var u=t.length-1;return n==u?t.pop():Dt.call(t,n,1),--this.size,!0}function xt(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]}function Ft(e){return ee(this.__data__,e)>-1}function Wt(e,t){var n=this.__data__,u=ee(n,e);return u<0?(++this.size,n.push([e,t])):n[u][1]=t,this}function Y(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var u=e[t];this.set(u[0],u[1])}}Y.prototype.clear=Mt,Y.prototype.delete=It,Y.prototype.get=xt,Y.prototype.has=Ft,Y.prototype.set=Wt;var zt=Ee($,"Map");function Yt(){this.size=0,this.__data__={hash:new D,map:new(zt||Y),string:new D}}function Gt(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function te(e,t){var n=e.__data__;return Gt(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Ut(e){var t=te(this,e).delete(e);return this.size-=t?1:0,t}function Vt(e){return te(this,e).get(e)}function Ht(e){return te(this,e).has(e)}function Jt(e,t){var n=te(this,e),u=n.size;return n.set(e,t),this.size+=n.size==u?0:1,this}function I(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var u=e[t];this.set(u[0],u[1])}}I.prototype.clear=Yt,I.prototype.delete=Ut,I.prototype.get=Vt,I.prototype.has=Ht,I.prototype.set=Jt;var Xt="Expected a function";function ie(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Xt);var n=function(){var u=arguments,l=t?t.apply(this,u):u[0],r=n.cache;if(r.has(l))return r.get(l);var c=e.apply(this,u);return n.cache=r.set(l,c)||r,c};return n.cache=new(ie.Cache||I),n}ie.Cache=I;var ue=function(){return $.Date.now()},Kt="Expected a function",Bt=Math.max,Qt=Math.min;function ne(e,t,n){var u,l,r,c,h,p,m=0,_=!1,S=!1,O=!0;if(typeof e!="function")throw new TypeError(Kt);t=ge(t)||0,z(n)&&(_=!!n.leading,S="maxWait"in n,r=S?Bt(ge(n.maxWait)||0,t):r,O="trailing"in n?!!n.trailing:O);function P(o){var f=u,d=l;return u=l=void 0,m=o,c=e.apply(d,f),c}function F(o){return m=o,h=setTimeout(A,t),_?P(o):c}function y(o){var f=o-p,d=o-m,E=t-f;return S?Qt(E,r-d):E}function R(o){var f=o-p,d=o-m;return p===void 0||f>=t||f<0||S&&d>=r}function A(){var o=ue();if(R(o))return U(o);h=setTimeout(A,y(o))}function U(o){return h=void 0,O&&u?P(o):(u=l=void 0,c)}function V(){h!==void 0&&clearTimeout(h),m=0,u=p=l=h=void 0}function i(){return h===void 0?c:U(ue())}function a(){var o=ue(),f=R(o);if(u=arguments,l=this,p=o,f){if(h===void 0)return F(p);if(S)return clearTimeout(h),h=setTimeout(A,t),P(p)}return h===void 0&&(h=setTimeout(A,t)),c}return a.cancel=V,a.flush=i,a}var Zt="Expected a function";function $t(e,t,n){var u=!0,l=!0;if(typeof e!="function")throw new TypeError(Zt);return z(n)&&(u="leading"in n?!!n.leading:u,l="trailing"in n?!!n.trailing:l),ne(e,t,{leading:u,maxWait:t,trailing:l})}class ye{constructor(t){ae(this,"event",new De.EventEmitter);ae(this,"data",{});ae(this,"registry",new Set);this.name=t,console.log("[CONTEXT] %s",t),this.event.setMaxListeners(100)}publish(t,n){n!=this.data[t]&&(this.data[t]=n,this.event.emit(String(t),{value:n}))}subscribe(t,n){const u=({value:l})=>{n(l)};return this.event.addListener(String(t),u),t in this.data&&n(this.data[t]),()=>(this.event.removeListener(String(t),u),void 0)}}const Te=ie(e=>new ye(e)),x=(e="noname")=>v.useMemo(()=>Te(e),[e]),Se=(e,...t)=>{const n=new Error("[ctx] useRegistryChecker failed "+JSON.stringify({names:t,ctx:(e==null?void 0:e.name)??"undefined"}));v.useEffect(()=>{if(e)return t.some(u=>e.registry.has(u))&&console.error(n),t.forEach(u=>e.registry.add(u)),()=>{t.forEach(u=>e.registry.delete(u))}},[e,t.length])},qt=(e,t,n)=>{v.useEffect(()=>{e&&e.data[t]!=n&&e.publish(t,n)},[t,n,e]),Se(e,t)},we=(e,t,n=0)=>{const[{value:u},l]=v.useState(()=>{var r;return{value:(r=e==null?void 0:e.data)==null?void 0:r[t]}});return v.useEffect(()=>{if(e){let r=n==0?h=>l({value:h}):ne(h=>l({value:h}),n),c=e.subscribe(t,r);return u!=e.data[t]&&l({value:e.data[t]}),()=>{c()}}},[t,e]),e==null?void 0:e.data[t]},en=(e,t,n)=>{const[,u]=v.useState(0),l=v.useMemo(()=>n(e==null?void 0:e.data[t]),[n,e==null?void 0:e.data[t]]);return v.useEffect(()=>{if(e){let r=l,c=()=>{let p=n(e.data[t]);p!=r&&(r=p,u(m=>m+1))},h=e.subscribe(t,c);return c(),()=>h()}},[t,e]),l},ce=(e,...t)=>{v.useEffect(()=>{if(e)for(let[n,u]of t)e.data[n]!=u&&e.publish(n,u)},[e,...t.flat()]),Se(e,...t.map(n=>n[0]))},tn=(e,...t)=>{const[,n]=v.useState(0),u=t.map(l=>{var r;return(r=e==null?void 0:e.data)==null?void 0:r[l]});return v.useEffect(()=>{if(e){let l=u;const r=ne(()=>{let p=t.map(m=>{var _;return(_=e==null?void 0:e.data)==null?void 0:_[m]});t.some((m,_)=>l[_]!=p[_])&&(l=p,n(m=>m+1))},1);let c=t.map(p=>e.subscribe(p,r)),h=setTimeout(r,1);return()=>{clearTimeout(h),r.cancel(),c.forEach(p=>p())}}},[e,...t]),Object.fromEntries(t.map((l,r)=>[l,u[r]]))},nn=(e,t=100,...n)=>{const[,u]=v.useState(0),l=n.map(r=>{var c;return(c=e==null?void 0:e.data)==null?void 0:c[r]});return v.useEffect(()=>{if(e){let r=l;const c=$t(()=>{let m=n.map(_=>{var S;return(S=e==null?void 0:e.data)==null?void 0:S[_]});n.some((_,S)=>r[S]!=m[S])&&(r=m,u(_=>_+1))},t);let h=n.map(m=>e.subscribe(m,c)),p=setTimeout(c,1);return()=>{clearTimeout(p),c.cancel(),h.forEach(m=>m())}}},[e,...n]),l};var re={exports:{}},K={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Re;function on(){return Re||(Re=1,process.env.NODE_ENV!=="production"&&function(){function e(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===g?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case y:return"Fragment";case A:return"Profiler";case R:return"StrictMode";case a:return"Suspense";case o:return"SuspenseList";case E:return"Activity"}if(typeof s=="object")switch(typeof s.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case F:return"Portal";case V:return(s.displayName||"Context")+".Provider";case U:return(s._context.displayName||"Context")+".Consumer";case i:var b=s.render;return s=s.displayName,s||(s=b.displayName||b.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case f:return b=s.displayName||null,b!==null?b:e(s.type)||"Memo";case d:b=s._payload,s=s._init;try{return e(s(b))}catch{}}return null}function t(s){return""+s}function n(s){try{t(s);var b=!1}catch{b=!0}if(b){b=console;var w=b.error,C=typeof Symbol=="function"&&Symbol.toStringTag&&s[Symbol.toStringTag]||s.constructor.name||"Object";return w.call(b,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",C),t(s)}}function u(s){if(s===y)return"<>";if(typeof s=="object"&&s!==null&&s.$$typeof===d)return"<...>";try{var b=e(s);return b?"<"+b+">":"<...>"}catch{return"<...>"}}function l(){var s=L.A;return s===null?null:s.getOwner()}function r(){return Error("react-stack-top-frame")}function c(s){if(M.call(s,"key")){var b=Object.getOwnPropertyDescriptor(s,"key").get;if(b&&b.isReactWarning)return!1}return s.key!==void 0}function h(s,b){function w(){je||(je=!0,console.error("%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)",b))}w.isReactWarning=!0,Object.defineProperty(s,"key",{get:w,configurable:!0})}function p(){var s=e(this.type);return Le[s]||(Le[s]=!0,console.error("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.")),s=this.props.ref,s!==void 0?s:null}function m(s,b,w,C,k,N,fe,le){return w=N.ref,s={$$typeof:P,type:s,key:b,props:N,_owner:k},(w!==void 0?w:null)!==null?Object.defineProperty(s,"ref",{enumerable:!1,get:p}):Object.defineProperty(s,"ref",{enumerable:!1,value:null}),s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(s,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(s,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:fe}),Object.defineProperty(s,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}function _(s,b,w,C,k,N,fe,le){var j=b.children;if(j!==void 0)if(C)if(oe(j)){for(C=0;C<j.length;C++)
|
|
17
|
+
*/var Re;function on(){return Re||(Re=1,process.env.NODE_ENV!=="production"&&function(){function e(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===g?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case y:return"Fragment";case A:return"Profiler";case R:return"StrictMode";case a:return"Suspense";case o:return"SuspenseList";case E:return"Activity"}if(typeof s=="object")switch(typeof s.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case F:return"Portal";case V:return(s.displayName||"Context")+".Provider";case U:return(s._context.displayName||"Context")+".Consumer";case i:var b=s.render;return s=s.displayName,s||(s=b.displayName||b.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case f:return b=s.displayName||null,b!==null?b:e(s.type)||"Memo";case d:b=s._payload,s=s._init;try{return e(s(b))}catch{}}return null}function t(s){return""+s}function n(s){try{t(s);var b=!1}catch{b=!0}if(b){b=console;var w=b.error,C=typeof Symbol=="function"&&Symbol.toStringTag&&s[Symbol.toStringTag]||s.constructor.name||"Object";return w.call(b,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",C),t(s)}}function u(s){if(s===y)return"<>";if(typeof s=="object"&&s!==null&&s.$$typeof===d)return"<...>";try{var b=e(s);return b?"<"+b+">":"<...>"}catch{return"<...>"}}function l(){var s=L.A;return s===null?null:s.getOwner()}function r(){return Error("react-stack-top-frame")}function c(s){if(M.call(s,"key")){var b=Object.getOwnPropertyDescriptor(s,"key").get;if(b&&b.isReactWarning)return!1}return s.key!==void 0}function h(s,b){function w(){je||(je=!0,console.error("%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)",b))}w.isReactWarning=!0,Object.defineProperty(s,"key",{get:w,configurable:!0})}function p(){var s=e(this.type);return Le[s]||(Le[s]=!0,console.error("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.")),s=this.props.ref,s!==void 0?s:null}function m(s,b,w,C,k,N,fe,le){return w=N.ref,s={$$typeof:P,type:s,key:b,props:N,_owner:k},(w!==void 0?w:null)!==null?Object.defineProperty(s,"ref",{enumerable:!1,get:p}):Object.defineProperty(s,"ref",{enumerable:!1,value:null}),s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(s,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(s,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:fe}),Object.defineProperty(s,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}function _(s,b,w,C,k,N,fe,le){var j=b.children;if(j!==void 0)if(C)if(oe(j)){for(C=0;C<j.length;C++)S(j[C]);Object.freeze&&Object.freeze(j)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else S(j);if(M.call(b,"key")){j=e(s);var H=Object.keys(b).filter(function(hn){return hn!=="key"});C=0<H.length?"{key: someKey, "+H.join(": ..., ")+": ...}":"{key: someKey}",Ae[j+C]||(H=0<H.length?"{"+H.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,C,j,H,j),Ae[j+C]=!0)}if(j=null,w!==void 0&&(n(w),j=""+w),c(b)&&(n(b.key),j=""+b.key),"key"in b){w={};for(var de in b)de!=="key"&&(w[de]=b[de])}else w=b;return j&&h(w,typeof s=="function"?s.displayName||s.name||"Unknown":s),m(s,j,N,k,l(),w,fe,le)}function
|
|
22
|
+
<%s key={someKey} {...props} />`,C,j,H,j),Ae[j+C]=!0)}if(j=null,w!==void 0&&(n(w),j=""+w),c(b)&&(n(b.key),j=""+b.key),"key"in b){w={};for(var de in b)de!=="key"&&(w[de]=b[de])}else w=b;return j&&h(w,typeof s=="function"?s.displayName||s.name||"Unknown":s),m(s,j,N,k,l(),w,fe,le)}function S(s){typeof s=="object"&&s!==null&&s.$$typeof===P&&s._store&&(s._store.validated=1)}var O=v,P=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),V=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),o=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),g=Symbol.for("react.client.reference"),L=O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,oe=Array.isArray,Q=console.createTask?console.createTask:function(){return null};O={"react-stack-bottom-frame":function(s){return s()}};var je,Le={},Pe=O["react-stack-bottom-frame"].bind(O,r)(),Ne=Q(u(r)),Ae={};B.Fragment=y,B.jsx=function(s,b,w,C,k){var N=1e4>L.recentlyCreatedOwnerStacks++;return _(s,b,w,!1,C,k,N?Error("react-stack-top-frame"):Pe,N?Q(u(s)):Ne)},B.jsxs=function(s,b,w,C,k){var N=1e4>L.recentlyCreatedOwnerStacks++;return _(s,b,w,!0,C,k,N?Error("react-stack-top-frame"):Pe,N?Q(u(s)):Ne)}}()),B}var Ce;function an(){return Ce||(Ce=1,process.env.NODE_ENV==="production"?re.exports=rn():re.exports=on()),re.exports}var G=an();const sn=(e,t)=>{const n=r=>[e,...Object.entries(r??{}).sort((c,h)=>c[0].localeCompare(h[0])).flat()].join("-");let u=new Set;const l=r=>{const c=n(r),h=x(c),p=t(r),m=v.useMemo(()=>new Error().stack,[]);return ce(h,...Object.entries(p)),v.useEffect(()=>{if(u.has(c)){const _=new Error("RootContext "+c+" are mounted more than once");throw _.stack=m,_}return u.add(c),()=>{u.delete(c)}}),G.jsx(G.Fragment,{})};return l.displayName=`State[${(t==null?void 0:t.name)??"??"}]`,{resolveCtxName:n,Root:l,useCtxStateStrict:r=>{const c=n(r),h=v.useMemo(()=>new Error().stack,[]);return v.useEffect(()=>{if(!u.has(c)){const p=new Error("RootContext ["+c+"] is not mounted");throw p.stack=h,p}},[c]),x(c)},useCtxState:r=>{const c=n(r),h=v.useMemo(()=>new Error().stack,[]);return v.useEffect(()=>{if(!u.has(c)){const p=new Error("RootContext ["+c+"] is not mounted");p.stack=h;let m=setTimeout(()=>console.error(p),1e3);return()=>clearTimeout(m)}},[u.has(c)]),x(c)}}},un=function(){const e=new WeakMap;return t=>{let n=e.get(t);return n||e.set(t,n=((t==null?void 0:t.name)??"")+Math.random().toString()),n}}(),cn=e=>[...Object.entries(e??{}).sort((t,n)=>t[0].localeCompare(n[0])).flat()].join("-"),fn=({Wrapper:e=v.Fragment})=>{const t=x("auto-ctx"),[n,u]=v.useState({}),l=v.useCallback((r,c)=>{const h=un(r),p=cn(c);return u(({[h]:{Component:m=r,subState:{[p]:_={params:c,counter:0},...S}={}}={},...O})=>({...O,[h]:{Component:m,subState:{...S,[p]:{..._,counter:_.counter+1}}}})),()=>u(({[h]:{Component:m=r,subState:{[p]:_={params:c,counter:0},...S}={}}={},...O})=>({...O,[h]:{Component:m,subState:{...S,..._.counter>1?{[p]:{..._,counter:_.counter-1}}:{}}}}))},[]);return ce(t,["subscribe",l],["state",n]),G.jsx(G.Fragment,{children:Object.entries(n).flatMap(([r,{Component:c,subState:h}])=>Object.entries(h).map(([p,{counter:m,params:_}])=>({key:r+p,Component:c,params:_,counter:m})).filter(p=>p.counter>0).map(({key:p,params:m,Component:_})=>G.jsx(e,{children:G.jsx(_,{...m})},p)))})},ln=({Root:e,useCtxState:t,useCtxStateStrict:n,resolveCtxName:u})=>({useCtxState:l=>{const r=u(l),c=we(x("auto-ctx"),"subscribe");return v.useEffect(()=>c==null?void 0:c(e,l),[c,r]),x(r)}}),dn=e=>{const[,t]=v.useState(0),{proxy:n,finalGetter:u,openGetter:l,clean:r}=v.useMemo(()=>{const c=new Set,h={},p=new Map,m=new Proxy(e==null?void 0:e.data,{get(y,R){if(_)return c.add(R),h[R]=y[R];throw new Error("now allow here")}});let _=!0,S=ne(()=>{[...c.values()].some(y=>{var R;return h[y]!=((R=e==null?void 0:e.data)==null?void 0:R[y])})&&t(y=>y+1)},0),O=()=>{_=!0,c.clear()},P=()=>{_=!1,[...c.values()].filter(y=>!p.has(y)).forEach(y=>{p.set(y,e==null?void 0:e.subscribe(y,S))}),[...p.keys()].filter(y=>!c.has(y)).forEach(y=>{let R=p.get(y);R==null||R(),p.delete(y)})};return{proxy:m,finalGetter:P,openGetter:O,clean:()=>{O(),P(),t(y=>y+1)}}},[e]);return l(),setTimeout(u,0),v.useEffect(()=>()=>r(),[r]),n};T.AutoRootCtx=fn,T.Context=ye,T.createAutoCtx=ln,T.createRootCtx=sn,T.getContext=Te,T.useDataContext=x,T.useDataSource=qt,T.useDataSourceMultiple=ce,T.useDataSubscribe=we,T.useDataSubscribeMultiple=tn,T.useDataSubscribeMultipleWithDebounce=nn,T.useDataSubscribeWithTransform=en,T.useQuickSubscribe=dn,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
package/src/state-utils/ctx.ts
CHANGED
|
@@ -54,7 +54,7 @@ export class Context<D> {
|
|
|
54
54
|
listender(value)
|
|
55
55
|
}
|
|
56
56
|
this.event.addListener(String(key), listener)
|
|
57
|
-
console.log("listenerCount:", String(key), this.event.listenerCount(String(key)))
|
|
57
|
+
// console.log("listenerCount:", String(key), this.event.listenerCount(String(key)))
|
|
58
58
|
|
|
59
59
|
if (key in this.data) listender(this.data[key])
|
|
60
60
|
|