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