react-state-custom 1.0.27 → 1.0.28

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 CHANGED
@@ -1,6 +1,6 @@
1
- import M, { useRef as P, useMemo as D, useEffect as g, useState as R, useCallback as Z, Fragment as x, useContext as ee } from "react";
2
- import { jsx as v, Fragment as $, jsxs as T } from "react/jsx-runtime";
3
- var L = { exports: {} }, U = {};
1
+ import D, { useRef as P, useMemo as x, useEffect as w, useState as N, useCallback as ee, Fragment as te, useContext as se } from "react";
2
+ import { jsx as v, Fragment as $, jsxs as R } from "react/jsx-runtime";
3
+ var j = { exports: {} }, A = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-compiler-runtime.production.js
@@ -10,16 +10,16 @@ var L = { exports: {} }, U = {};
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var H;
14
- function te() {
15
- if (H) return U;
16
- H = 1;
17
- var s = M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
18
- return U.c = function(e) {
19
- return s.H.useMemoCache(e);
20
- }, U;
13
+ var B;
14
+ function ne() {
15
+ if (B) return A;
16
+ B = 1;
17
+ var n = D.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
18
+ return A.c = function(e) {
19
+ return n.H.useMemoCache(e);
20
+ }, A;
21
21
  }
22
- var V = {};
22
+ var K = {};
23
23
  /**
24
24
  * @license React
25
25
  * react-compiler-runtime.development.js
@@ -29,12 +29,12 @@ var V = {};
29
29
  * This source code is licensed under the MIT license found in the
30
30
  * LICENSE file in the root directory of this source tree.
31
31
  */
32
- var F;
33
- function ne() {
34
- return F || (F = 1, process.env.NODE_ENV !== "production" && function() {
35
- var s = M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
36
- V.c = function(e) {
37
- var t = s.H;
32
+ var V;
33
+ function ie() {
34
+ return V || (V = 1, process.env.NODE_ENV !== "production" && function() {
35
+ var n = D.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
36
+ K.c = function(e) {
37
+ var t = n.H;
38
38
  return t === null && console.error(
39
39
  `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
40
40
  1. You might have mismatching versions of React and the renderer (such as React DOM)
@@ -43,50 +43,50 @@ function ne() {
43
43
  See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
44
44
  ), t.useMemoCache(e);
45
45
  };
46
- }()), V;
46
+ }()), K;
47
47
  }
48
- var G;
49
- function se() {
50
- return G || (G = 1, process.env.NODE_ENV === "production" ? L.exports = te() : L.exports = ne()), L.exports;
48
+ var I;
49
+ function re() {
50
+ return I || (I = 1, process.env.NODE_ENV === "production" ? j.exports = ne() : j.exports = ie()), j.exports;
51
51
  }
52
- var C = se();
53
- function k(s, e) {
54
- let t = null, n = function(...a) {
52
+ var _ = re();
53
+ function H(n, e) {
54
+ let t = null, s = function(...r) {
55
55
  t && clearTimeout(t), t = setTimeout(() => {
56
- s(...a);
56
+ n(...r);
57
57
  }, e);
58
58
  };
59
- return n.cancel = () => clearTimeout(t), n;
59
+ return s.cancel = () => clearTimeout(t), s;
60
60
  }
61
- function re(s) {
62
- const e = /* @__PURE__ */ new Map(), t = function(...n) {
63
- const a = JSON.stringify(n);
64
- if (e.has(a))
65
- return e.get(a);
66
- const r = s(...n);
67
- return e.set(a, r), r;
61
+ function oe(n) {
62
+ const e = /* @__PURE__ */ new Map(), t = function(...s) {
63
+ const r = JSON.stringify(s);
64
+ if (e.has(r))
65
+ return e.get(r);
66
+ const i = n(...s);
67
+ return e.set(r, i), i;
68
68
  };
69
69
  return t.cache = e, t;
70
70
  }
71
- const q = () => Math.random().toString().slice(2), oe = (s) => {
71
+ const F = () => Math.random().toString().slice(2), ae = (n) => {
72
72
  const e = P({
73
73
  values: [],
74
- id: q()
74
+ id: F()
75
75
  });
76
76
  let t = !1;
77
- return t = t || !s != !e.current.values, t = t || s?.length != e.current.values?.length, t = t || s?.some((n, a) => n != e.current.values[a]), t && (e.current.values = s, e.current.id = q()), e.current.id;
78
- }, I = "@--change-event";
79
- class ae extends Event {
77
+ return t = t || !n != !e.current.values, t = t || n?.length != e.current.values?.length, t = t || n?.some((s, r) => s != e.current.values[r]), t && (e.current.values = n, e.current.id = F()), e.current.id;
78
+ }, M = "@--change-event";
79
+ class le extends Event {
80
80
  constructor(e, t) {
81
81
  super(String(e)), this.event = e, this.value = t;
82
82
  }
83
83
  }
84
- class J extends Event {
84
+ class G extends Event {
85
85
  constructor(e) {
86
- super(I, e), this.value = e;
86
+ super(M, e), this.value = e;
87
87
  }
88
88
  }
89
- class ie extends EventTarget {
89
+ class ce extends EventTarget {
90
90
  /**
91
91
  * Create a new Context instance.
92
92
  * @param name - The name of the context (for debugging).
@@ -111,8 +111,8 @@ class ie extends EventTarget {
111
111
  publish(e, t) {
112
112
  if (t != this.data[e]) {
113
113
  this.data[e] = t;
114
- let n = new ae(e, t);
115
- this.dispatchEvent(n), this.dispatchEvent(new J(n));
114
+ let s = new le(e, t);
115
+ this.dispatchEvent(s), this.dispatchEvent(new G(s));
116
116
  }
117
117
  }
118
118
  /**
@@ -122,249 +122,249 @@ class ie extends EventTarget {
122
122
  * @returns Unsubscribe function.
123
123
  */
124
124
  subscribe(e, t) {
125
- const n = ({
126
- event: a,
127
- value: r
125
+ const s = ({
126
+ event: r,
127
+ value: i
128
128
  }) => {
129
- t(r);
129
+ t(i);
130
130
  };
131
- return this.addEventListener(String(e), n), e in this.data && t(this.data[e]), () => this.removeEventListener(String(e), n);
131
+ return this.addEventListener(String(e), s), e in this.data && t(this.data[e]), () => this.removeEventListener(String(e), s);
132
132
  }
133
133
  subscribeAll(e) {
134
- const t = (n) => {
135
- if (n instanceof J) {
134
+ const t = (s) => {
135
+ if (s instanceof G) {
136
136
  const {
137
- value: a
138
- } = n;
139
- e(a.event, this.data);
137
+ value: r
138
+ } = s;
139
+ e(r.event, this.data);
140
140
  }
141
141
  };
142
- return this.addEventListener(String(I), t), () => this.removeEventListener(String(I), t);
142
+ return this.addEventListener(String(M), t), () => this.removeEventListener(String(M), t);
143
143
  }
144
144
  }
145
- const A = re((s) => new ie(s)), w = (s = "noname") => {
146
- const e = D(() => A(s), [s]);
147
- return g(() => (e.useCounter += 1, () => {
145
+ const k = oe((n) => new ce(n)), z = (n = "noname") => {
146
+ const e = x(() => k(n), [n]);
147
+ return w(() => (e.useCounter += 1, () => {
148
148
  e.useCounter -= 1, e.useCounter <= 0 && setTimeout(() => {
149
- e.useCounter <= 0 && A.cache.delete(JSON.stringify([s]));
149
+ e.useCounter <= 0 && k.cache.delete(JSON.stringify([n]));
150
150
  }, 100);
151
151
  }), [e]), e;
152
- }, W = (s, ...e) => {
153
- const t = C.c(6), n = e;
152
+ }, Y = (n, ...e) => {
153
+ const t = _.c(6), s = e;
154
154
  new Error("[ctx] useRegistryChecker failed " + JSON.stringify({
155
- names: n,
156
- ctx: s?.name ?? "undefined"
155
+ names: s,
156
+ ctx: n?.name ?? "undefined"
157
157
  }));
158
- let a;
159
- t[0] !== s || t[1] !== n ? (a = () => {
160
- if (s)
161
- return n.some((l) => s.registry.has(l)), n.forEach((l) => s.registry.add(l)), () => {
162
- n.forEach((l) => s.registry.delete(l));
163
- };
164
- }, t[0] = s, t[1] = n, t[2] = a) : a = t[2];
165
- let r;
166
- t[3] !== s || t[4] !== n.length ? (r = [s, n.length], t[3] = s, t[4] = n.length, t[5] = r) : r = t[5], g(a, r);
167
- }, ke = (s, e, t) => {
168
- const n = C.c(5);
169
- let a, r;
170
- n[0] !== s || n[1] !== e || n[2] !== t ? (a = () => {
171
- s && s.data[e] != t && s.publish(e, t);
172
- }, r = [e, t, s], n[0] = s, n[1] = e, n[2] = t, n[3] = a, n[4] = r) : (a = n[3], r = n[4]), g(a, r), W(s, e);
173
- }, le = (s, e, t) => {
174
- const n = C.c(11), a = t === void 0 ? 0 : t;
175
158
  let r;
176
- n[0] !== s?.data || n[1] !== e ? (r = () => ({
177
- value: s?.data?.[e]
178
- }), n[0] = s?.data, n[1] = e, n[2] = r) : r = n[2];
179
- const [l, i] = R(r), {
159
+ t[0] !== n || t[1] !== s ? (r = () => {
160
+ if (n)
161
+ return s.some((l) => n.registry.has(l)), s.forEach((l) => n.registry.add(l)), () => {
162
+ s.forEach((l) => n.registry.delete(l));
163
+ };
164
+ }, t[0] = n, t[1] = s, t[2] = r) : r = t[2];
165
+ let i;
166
+ t[3] !== n || t[4] !== s.length ? (i = [n, s.length], t[3] = n, t[4] = s.length, t[5] = i) : i = t[5], w(r, i);
167
+ }, ke = (n, e, t) => {
168
+ const s = _.c(5);
169
+ let r, i;
170
+ s[0] !== n || s[1] !== e || s[2] !== t ? (r = () => {
171
+ n && n.data[e] != t && n.publish(e, t);
172
+ }, i = [e, t, n], s[0] = n, s[1] = e, s[2] = t, s[3] = r, s[4] = i) : (r = s[3], i = s[4]), w(r, i), Y(n, e);
173
+ }, ue = (n, e, t) => {
174
+ const s = _.c(11), r = t === void 0 ? 0 : t;
175
+ let i;
176
+ s[0] !== n?.data || s[1] !== e ? (i = () => ({
177
+ value: n?.data?.[e]
178
+ }), s[0] = n?.data, s[1] = e, s[2] = i) : i = s[2];
179
+ const [l, a] = N(i), {
180
180
  value: o
181
181
  } = l;
182
182
  let u;
183
- n[3] !== s || n[4] !== a || n[5] !== e || n[6] !== o ? (u = () => {
184
- if (s) {
185
- const d = a == 0 ? (m) => i({
183
+ s[3] !== n || s[4] !== r || s[5] !== e || s[6] !== o ? (u = () => {
184
+ if (n) {
185
+ const d = r == 0 ? (m) => a({
186
186
  value: m
187
- }) : k((m) => i({
187
+ }) : H((m) => a({
188
188
  value: m
189
- }), a), f = s.subscribe(e, d);
190
- return o != s.data[e] && i({
191
- value: s.data[e]
189
+ }), r), f = n.subscribe(e, d);
190
+ return o != n.data[e] && a({
191
+ value: n.data[e]
192
192
  }), () => {
193
193
  f();
194
194
  };
195
195
  }
196
- }, n[3] = s, n[4] = a, n[5] = e, n[6] = o, n[7] = u) : u = n[7];
196
+ }, s[3] = n, s[4] = r, s[5] = e, s[6] = o, s[7] = u) : u = s[7];
197
197
  let c;
198
- return n[8] !== s || n[9] !== e ? (c = [e, s], n[8] = s, n[9] = e, n[10] = c) : c = n[10], g(u, c), s?.data[e];
199
- }, Oe = (s, e, t) => {
200
- const [, n] = R(0), a = D(() => t(s?.data[e]), [t, s?.data[e]]);
201
- return g(() => {
202
- if (s) {
203
- let r = a, l = () => {
204
- let o = t(s.data[e]);
205
- o != r && (r = o, n((u) => u + 1));
206
- }, i = s.subscribe(e, l);
207
- return l(), () => i();
198
+ return s[8] !== n || s[9] !== e ? (c = [e, n], s[8] = n, s[9] = e, s[10] = c) : c = s[10], w(u, c), n?.data[e];
199
+ }, We = (n, e, t) => {
200
+ const [, s] = N(0), r = x(() => t(n?.data[e]), [t, n?.data[e]]);
201
+ return w(() => {
202
+ if (n) {
203
+ let i = r, l = () => {
204
+ let o = t(n.data[e]);
205
+ o != i && (i = o, s((u) => u + 1));
206
+ }, a = n.subscribe(e, l);
207
+ return l(), () => a();
208
208
  }
209
- }, [e, s]), a;
210
- }, Y = (s, ...e) => {
211
- g(() => {
212
- if (s)
213
- for (let [t, n] of e)
214
- s.data[t] != n && s.publish(t, n);
215
- }, [s, oe(e.flat())]), W(s, ...e.map((t) => t[0]));
216
- }, Ae = (s, ...e) => {
217
- const t = C.c(18), n = e, [, a] = R(0);
218
- let r;
219
- if (t[0] !== s?.data || t[1] !== n) {
209
+ }, [e, n]), r;
210
+ }, q = (n, ...e) => {
211
+ w(() => {
212
+ if (n)
213
+ for (let [t, s] of e)
214
+ n.data[t] != s && n.publish(t, s);
215
+ }, [n, ae(e.flat())]), Y(n, ...e.map((t) => t[0]));
216
+ }, je = (n, ...e) => {
217
+ const t = _.c(18), s = e, [, r] = N(0);
218
+ let i;
219
+ if (t[0] !== n?.data || t[1] !== s) {
220
220
  let c;
221
- t[3] !== s?.data ? (c = (d) => s?.data?.[d], t[3] = s?.data, t[4] = c) : c = t[4], r = n.map(c), t[0] = s?.data, t[1] = n, t[2] = r;
221
+ t[3] !== n?.data ? (c = (d) => n?.data?.[d], t[3] = n?.data, t[4] = c) : c = t[4], i = s.map(c), t[0] = n?.data, t[1] = s, t[2] = i;
222
222
  } else
223
- r = t[2];
224
- const l = r;
225
- let i;
226
- t[5] !== s || t[6] !== n || t[7] !== l || t[8] !== a ? (i = () => {
227
- if (s) {
223
+ i = t[2];
224
+ const l = i;
225
+ let a;
226
+ t[5] !== n || t[6] !== s || t[7] !== l || t[8] !== r ? (a = () => {
227
+ if (n) {
228
228
  let c = l;
229
- const d = k(() => {
230
- const p = n.map((h) => s?.data?.[h]);
231
- n.some((h, b) => c[b] != p[b]) && (c = p, a(ce));
232
- }, 1), f = n.map((p) => s.subscribe(p, d)), m = setTimeout(d, 1);
229
+ const d = H(() => {
230
+ const g = s.map((h) => n?.data?.[h]);
231
+ s.some((h, p) => c[p] != g[p]) && (c = g, r(he));
232
+ }, 1), f = s.map((g) => n.subscribe(g, d)), m = setTimeout(d, 1);
233
233
  return () => {
234
- clearTimeout(m), d.cancel(), f.forEach(ue);
234
+ clearTimeout(m), d.cancel(), f.forEach(de);
235
235
  };
236
236
  }
237
- }, t[5] = s, t[6] = n, t[7] = l, t[8] = a, t[9] = i) : i = t[9];
237
+ }, t[5] = n, t[6] = s, t[7] = l, t[8] = r, t[9] = a) : a = t[9];
238
238
  let o;
239
- t[10] !== s || t[11] !== n ? (o = [s, ...n], t[10] = s, t[11] = n, t[12] = o) : o = t[12], g(i, o);
239
+ t[10] !== n || t[11] !== s ? (o = [n, ...s], t[10] = n, t[11] = s, t[12] = o) : o = t[12], w(a, o);
240
240
  let u;
241
- if (t[13] !== n || t[14] !== l) {
241
+ if (t[13] !== s || t[14] !== l) {
242
242
  let c;
243
- t[16] !== l ? (c = (d, f) => [d, l[f]], t[16] = l, t[17] = c) : c = t[17], u = Object.fromEntries(n.map(c)), t[13] = n, t[14] = l, t[15] = u;
243
+ t[16] !== l ? (c = (d, f) => [d, l[f]], t[16] = l, t[17] = c) : c = t[17], u = Object.fromEntries(s.map(c)), t[13] = s, t[14] = l, t[15] = u;
244
244
  } else
245
245
  u = t[15];
246
246
  return u;
247
- }, Ke = (s, e, ...t) => {
248
- const n = C.c(14), a = e === void 0 ? 50 : e, r = t, [, l] = R(0);
249
- let i;
250
- if (n[0] !== s?.data || n[1] !== r) {
247
+ }, Le = (n, e, ...t) => {
248
+ const s = _.c(14), r = e === void 0 ? 50 : e, i = t, [, l] = N(0);
249
+ let a;
250
+ if (s[0] !== n?.data || s[1] !== i) {
251
251
  let d;
252
- n[3] !== s?.data ? (d = (f) => s?.data?.[f], n[3] = s?.data, n[4] = d) : d = n[4], i = r.map(d), n[0] = s?.data, n[1] = r, n[2] = i;
252
+ s[3] !== n?.data ? (d = (f) => n?.data?.[f], s[3] = n?.data, s[4] = d) : d = s[4], a = i.map(d), s[0] = n?.data, s[1] = i, s[2] = a;
253
253
  } else
254
- i = n[2];
255
- const o = i;
254
+ a = s[2];
255
+ const o = a;
256
256
  let u;
257
- n[5] !== s || n[6] !== a || n[7] !== r || n[8] !== o || n[9] !== l ? (u = () => {
258
- if (s) {
257
+ s[5] !== n || s[6] !== r || s[7] !== i || s[8] !== o || s[9] !== l ? (u = () => {
258
+ if (n) {
259
259
  let d = o;
260
- const f = k(() => {
261
- const h = r.map((b) => s?.data?.[b]);
262
- r.some((b, S) => d[S] != h[S]) && (d = h, l(fe));
263
- }, a), m = r.map((h) => s.subscribe(h, f)), p = setTimeout(f, 1);
260
+ const f = H(() => {
261
+ const h = i.map((p) => n?.data?.[p]);
262
+ i.some((p, b) => d[b] != h[b]) && (d = h, l(fe));
263
+ }, r), m = i.map((h) => n.subscribe(h, f)), g = setTimeout(f, 1);
264
264
  return () => {
265
- clearTimeout(p), f.cancel(), m.forEach(de);
265
+ clearTimeout(g), f.cancel(), m.forEach(pe);
266
266
  };
267
267
  }
268
- }, n[5] = s, n[6] = a, n[7] = r, n[8] = o, n[9] = l, n[10] = u) : u = n[10];
268
+ }, s[5] = n, s[6] = r, s[7] = i, s[8] = o, s[9] = l, s[10] = u) : u = s[10];
269
269
  let c;
270
- return n[11] !== s || n[12] !== r ? (c = [s, ...r], n[11] = s, n[12] = r, n[13] = c) : c = n[13], g(u, c), o;
270
+ return s[11] !== n || s[12] !== i ? (c = [n, ...i], s[11] = n, s[12] = i, s[13] = c) : c = s[13], w(u, c), o;
271
271
  };
272
- function ce(s) {
273
- return s + 1;
272
+ function he(n) {
273
+ return n + 1;
274
274
  }
275
- function ue(s) {
276
- return s();
275
+ function de(n) {
276
+ return n();
277
277
  }
278
- function fe(s) {
279
- return s + 1;
278
+ function fe(n) {
279
+ return n + 1;
280
280
  }
281
- function de(s) {
282
- return s();
281
+ function pe(n) {
282
+ return n();
283
283
  }
284
- const B = (s = void 0) => Object.keys(s ?? {}).sort().map((e) => {
285
- const t = s?.[e];
284
+ const J = (n = void 0) => Object.keys(n ?? {}).sort().map((e) => {
285
+ const t = n?.[e];
286
286
  if (t !== null && (typeof t == "object" || typeof t == "function"))
287
287
  throw new Error(`Parameter "${e}" must be a primitive value (string, number, bigint, null, or undefined), but received ${typeof t}`);
288
288
  return e + "=" + t;
289
- }).join("&"), Le = (s, e) => {
290
- const t = (i) => [s, B(i)].filter(Boolean).join("?"), n = /* @__PURE__ */ new Set(), a = (i) => {
291
- const o = C.c(5), u = e(i), c = t(i), d = w(c);
289
+ }).join("&"), Ae = (n, e) => {
290
+ const t = (a) => [n, J(a)].filter(Boolean).join("?"), s = /* @__PURE__ */ new Set(), r = (a) => {
291
+ const o = _.c(5), u = e(a), c = t(a), d = z(c);
292
292
  let f;
293
293
  o[0] === Symbol.for("react.memo_cache_sentinel") ? (f = new Error(), o[0] = f) : f = o[0];
294
294
  const m = f.stack;
295
- let p;
296
- o[1] !== u ? (p = Object.entries(u), o[1] = u, o[2] = p) : p = o[2], Y(d, ...p);
295
+ let g;
296
+ o[1] !== u ? (g = Object.entries(u), o[1] = u, o[2] = g) : g = o[2], q(d, ...g);
297
297
  let h;
298
298
  return o[3] !== c ? (h = () => {
299
- if (n.has(c)) {
300
- const b = new Error("RootContext " + c + " are mounted more than once");
301
- throw b.stack = m, b;
299
+ if (s.has(c)) {
300
+ const p = new Error("RootContext " + c + " are mounted more than once");
301
+ throw p.stack = m, p;
302
302
  }
303
- return n.add(c), () => {
304
- n.delete(c);
303
+ return s.add(c), () => {
304
+ s.delete(c);
305
305
  };
306
- }, o[3] = c, o[4] = h) : h = o[4], g(h), u;
307
- }, r = (i) => {
308
- const o = C.c(1);
306
+ }, o[3] = c, o[4] = h) : h = o[4], w(h), u;
307
+ }, i = (a) => {
308
+ const o = _.c(1);
309
309
  let u;
310
310
  return o[0] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ v($, {}), o[0] = u) : u = o[0], u;
311
- }, l = (i) => {
312
- const o = C.c(3), u = a(i);
311
+ }, l = (a) => {
312
+ const o = _.c(3), u = r(a);
313
313
  let c;
314
- return o[0] !== i || o[1] !== u ? (c = /* @__PURE__ */ v(r, { ...i, ...u }), o[0] = i, o[1] = u, o[2] = c) : c = o[2], c;
314
+ return o[0] !== a || o[1] !== u ? (c = /* @__PURE__ */ v(i, { ...a, ...u }), o[0] = a, o[1] = u, o[2] = c) : c = o[2], c;
315
315
  };
316
- return a.displayName = `useState[${s}]`, l.displayName = `StateContainer[${s}]`, r.displayName = `Debug[${s}]`, {
317
- name: s,
316
+ return r.displayName = `useState[${n}]`, l.displayName = `StateContainer[${n}]`, i.displayName = `Debug[${n}]`, {
317
+ name: n,
318
318
  getCtxName: t,
319
- useRootState: a,
319
+ useRootState: r,
320
320
  Root: l,
321
321
  /**
322
322
  * Strict consumer: throws if the corresponding Root for these props isn't mounted.
323
323
  * Use in development/tests to fail fast when wiring is incorrect.
324
324
  */
325
- useCtxStateStrict: (i) => {
326
- const o = t(i), u = D(() => new Error().stack, []);
327
- return g(() => {
328
- if (!n.has(o)) {
325
+ useCtxStateStrict: (a) => {
326
+ const o = t(a), u = x(() => new Error().stack, []);
327
+ return w(() => {
328
+ if (!s.has(o)) {
329
329
  const c = new Error("RootContext [" + o + "] is not mounted");
330
330
  throw c.stack = u, c;
331
331
  }
332
- }, [o]), w(o);
332
+ }, [o]), z(o);
333
333
  },
334
334
  /**
335
335
  * Lenient consumer: schedules a console.error if the Root isn't mounted instead of throwing.
336
336
  * Useful in production to avoid hard crashes while still surfacing misconfiguration.
337
337
  */
338
- useCtxState: (i) => {
339
- const o = t(i), u = D(() => new Error().stack, []);
340
- return g(() => {
341
- if (!n.has(o)) {
338
+ useCtxState: (a) => {
339
+ const o = t(a), u = x(() => new Error().stack, []);
340
+ return w(() => {
341
+ if (!s.has(o)) {
342
342
  const c = new Error("RootContext [" + o + "] is not mounted");
343
343
  c.stack = u;
344
344
  let d = setTimeout(() => console.error(c), 1e3);
345
345
  return () => clearTimeout(d);
346
346
  }
347
- }, [n.has(o)]), w(o);
347
+ }, [s.has(o)]), z(o);
348
348
  }
349
349
  };
350
- }, he = (s) => {
351
- const e = C.c(1);
350
+ }, me = (n) => {
351
+ const e = _.c(1);
352
352
  let t;
353
353
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ v($, {}), e[0] = t) : t = e[0], t;
354
- }, me = ({
355
- useStateFn: s,
354
+ }, ge = ({
355
+ useStateFn: n,
356
356
  params: e,
357
357
  debugging: t
358
358
  }) => {
359
- const n = s(e);
360
- return t ? /* @__PURE__ */ v(he, { ...n }) : /* @__PURE__ */ v($, {});
361
- }, je = ({
362
- Wrapper: s = x,
359
+ const s = n(e);
360
+ return t ? /* @__PURE__ */ v(me, { ...s }) : /* @__PURE__ */ v($, {});
361
+ }, Ke = ({
362
+ Wrapper: n = te,
363
363
  debugging: e = !1
364
364
  }) => {
365
- const t = w("auto-ctx"), [n, a] = R({}), r = Z((i, o, u, c = 0) => {
366
- const d = [i, B(u)].filter(Boolean).join("?");
367
- return a((f) => ({
365
+ const t = z("auto-ctx"), [s, r] = N({}), i = ee((a, o, u, c = 0) => {
366
+ const d = [a, J(u)].filter(Boolean).join("?");
367
+ return r((f) => ({
368
368
  ...f,
369
369
  [d]: {
370
370
  ...f[d] ?? {
@@ -375,7 +375,7 @@ const B = (s = void 0) => Object.keys(s ?? {}).sort().map((e) => {
375
375
  keepUntil: void 0,
376
376
  useStateFn: o
377
377
  }
378
- })), () => a(({
378
+ })), () => r(({
379
379
  [d]: f,
380
380
  ...m
381
381
  }) => ({
@@ -388,23 +388,23 @@ const B = (s = void 0) => Object.keys(s ?? {}).sort().map((e) => {
388
388
  }
389
389
  } : {}
390
390
  }));
391
- }, []), l = D(() => Object.entries(n).filter(([, {
392
- counter: i,
391
+ }, []), l = x(() => Object.entries(s).filter(([, {
392
+ counter: a,
393
393
  keepUntil: o
394
- }]) => i <= 0 && o).toSorted(([, {
395
- keepUntil: i = 0
394
+ }]) => a <= 0 && o).toSorted(([, {
395
+ keepUntil: a = 0
396
396
  }], [, {
397
397
  keepUntil: o = 0
398
- }]) => i - o)?.at(0), [n]);
399
- return g(() => {
398
+ }]) => a - o)?.at(0), [s]);
399
+ return w(() => {
400
400
  if (l) {
401
- const [i, {
401
+ const [a, {
402
402
  keepUntil: o
403
403
  }] = l;
404
404
  if (typeof o > "u") throw new Error("Invalid state mgr");
405
405
  let u = setTimeout(() => {
406
- a(({
407
- [i]: c,
406
+ r(({
407
+ [a]: c,
408
408
  ...d
409
409
  }) => d);
410
410
  }, Math.max(0, o - Date.now()));
@@ -412,46 +412,46 @@ const B = (s = void 0) => Object.keys(s ?? {}).sort().map((e) => {
412
412
  clearTimeout(u);
413
413
  };
414
414
  }
415
- }, [l]), Y(t, ["subscribe", r], ["state", n]), /* @__PURE__ */ v($, { children: Object.entries(n).filter(([, {
416
- counter: i,
415
+ }, [l]), q(t, ["subscribe", i], ["state", s]), /* @__PURE__ */ v($, { children: Object.entries(s).filter(([, {
416
+ counter: a,
417
417
  keepUntil: o = 0
418
- }]) => i > 0 || o >= Date.now()).map(([i, {
418
+ }]) => a > 0 || o >= Date.now()).map(([a, {
419
419
  useStateFn: o,
420
420
  params: u
421
- }]) => /* @__PURE__ */ v(s, { children: /* @__PURE__ */ v(me, { params: u, useStateFn: o, debugging: e }, i) }, i)) });
422
- }, Ue = ({
423
- useRootState: s,
421
+ }]) => /* @__PURE__ */ v(n, { children: /* @__PURE__ */ v(ge, { params: u, useStateFn: o, debugging: e }, a) }, a)) });
422
+ }, Me = ({
423
+ useRootState: n,
424
424
  getCtxName: e,
425
425
  name: t
426
- }, n = 0) => ({
427
- useCtxState: (a) => {
428
- const r = e(a), l = le(w("auto-ctx"), "subscribe");
429
- return g(() => l?.(t, s, a, n), [s, l, t, r, n]), w(r);
426
+ }, s = 0) => ({
427
+ useCtxState: (r) => {
428
+ const i = e(r), l = ue(z("auto-ctx"), "subscribe");
429
+ return w(() => l?.(t, n, r, s), [n, l, t, i, s]), z(i);
430
430
  }
431
- }), Ve = (s) => {
432
- const [, e] = R(0), {
431
+ }), Ue = (n) => {
432
+ const [, e] = N(0), {
433
433
  proxy: t,
434
- finalGetter: n,
435
- openGetter: a,
436
- clean: r
437
- } = D(() => {
438
- const l = /* @__PURE__ */ new Set(), i = {}, o = /* @__PURE__ */ new Map(), u = new Proxy(s?.data, {
439
- get(h, b) {
434
+ finalGetter: s,
435
+ openGetter: r,
436
+ clean: i
437
+ } = x(() => {
438
+ const l = /* @__PURE__ */ new Set(), a = {}, o = /* @__PURE__ */ new Map(), u = new Proxy(n?.data, {
439
+ get(h, p) {
440
440
  if (c)
441
- return l.add(b), i[b] = h[b];
441
+ return l.add(p), a[p] = h[p];
442
442
  throw new Error("useQuickSubscribe: Cannot access context data outside render phase. Destructure needed properties immediately during render.");
443
443
  },
444
444
  ownKeys(h) {
445
445
  return console.warn("useQuickSubscribe: Rest object operations aren't recommended as they bypass selective subscription and may cause performance issues"), Reflect.ownKeys(h);
446
446
  }
447
447
  });
448
- let c = !0, d = k(() => {
449
- [...l.values()].some((h) => i[h] != s?.data?.[h]) && e((h) => h + 1);
448
+ let c = !0, d = H(() => {
449
+ [...l.values()].some((h) => a[h] != n?.data?.[h]) && e((h) => h + 1);
450
450
  }, 0), f = () => {
451
451
  c = !0, l.clear();
452
452
  }, m = () => {
453
453
  c = !1, [...l.values()].filter((h) => !o.has(h)).forEach((h) => {
454
- o.set(h, s?.subscribe(h, d));
454
+ o.set(h, n?.subscribe(h, d));
455
455
  }), [...o.keys()].filter((h) => !l.has(h)).forEach((h) => {
456
456
  o.get(h)?.(), o.delete(h);
457
457
  });
@@ -464,239 +464,373 @@ const B = (s = void 0) => Object.keys(s ?? {}).sort().map((e) => {
464
464
  f(), m(), e((h) => h + 1);
465
465
  }
466
466
  };
467
- }, [s]);
468
- return a(), setTimeout(n, 0), g(() => () => r(), [r]), t;
467
+ }, [n]);
468
+ return r(), setTimeout(s, 0), w(() => () => i(), [i]), t;
469
469
  };
470
- function pe(s) {
471
- const e = C.c(4);
470
+ function ve(n) {
471
+ const e = _.c(4);
472
472
  let t;
473
- e[0] !== s ? (t = s ? ve(s.trim().toLowerCase().split(" "), "gi") : void 0, e[0] = s, e[1] = t) : t = e[1];
474
- const n = t;
475
- let a;
476
- return e[2] !== n ? (a = {
477
- highlight: n
478
- }, e[2] = n, e[3] = a) : a = e[3], a;
473
+ e[0] !== n ? (t = n ? Se(n.trim().toLowerCase().split(" "), "gi") : void 0, e[0] = n, e[1] = t) : t = e[1];
474
+ const s = t;
475
+ let r;
476
+ return e[2] !== s ? (r = {
477
+ highlight: s
478
+ }, e[2] = s, e[3] = r) : r = e[3], r;
479
479
  }
480
- function be(s) {
481
- return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
480
+ function be(n) {
481
+ return n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
482
482
  }
483
- function ve(s, e = "gi") {
484
- const t = s.map(be).join("|");
483
+ function Se(n, e = "gi") {
484
+ const t = n.map(be).join("|");
485
485
  return new RegExp(`(${t})`, e);
486
486
  }
487
- function ge(s, e) {
487
+ function Ce(n, e) {
488
488
  const t = [];
489
- let n = 0;
490
- for (const a of s.matchAll(e)) {
491
- const [r] = a, l = a.index;
492
- l > n && t.push(s.slice(n, l)), t.push(/* @__PURE__ */ v("mark", { children: r }, l)), n = l + r.length;
489
+ let s = 0;
490
+ for (const r of n.matchAll(e)) {
491
+ const [i] = r, l = r.index;
492
+ l > s && t.push(n.slice(s, l)), t.push(/* @__PURE__ */ v("mark", { children: i }, l)), s = l + i.length;
493
493
  }
494
- return n < s.length && t.push(s.slice(n)), t;
494
+ return s < n.length && t.push(n.slice(s)), t;
495
495
  }
496
- const Q = M.createContext({
496
+ const X = D.createContext({
497
497
  highlight: void 0
498
- }), Ce = (s) => {
499
- const e = C.c(3), {
498
+ }), Ee = (n) => {
499
+ const e = _.c(3), {
500
500
  children: t,
501
- highlight: n
502
- } = s, a = pe(n);
503
- let r;
504
- return e[0] !== t || e[1] !== a ? (r = /* @__PURE__ */ v(Q.Provider, { value: a, children: t }), e[0] = t, e[1] = a, e[2] = r) : r = e[2], r;
505
- }, Se = (s) => {
506
- const e = C.c(5), {
501
+ highlight: s
502
+ } = n, r = ve(s);
503
+ let i;
504
+ return e[0] !== t || e[1] !== r ? (i = /* @__PURE__ */ v(X.Provider, { value: r, children: t }), e[0] = t, e[1] = r, e[2] = i) : i = e[2], i;
505
+ }, we = (n) => {
506
+ const e = _.c(5), {
507
507
  text: t
508
- } = s, {
509
- highlight: n
510
- } = ee(Q);
511
- let a;
512
- e[0] !== n || e[1] !== t ? (a = n ? ge(t, n) : t, e[0] = n, e[1] = t, e[2] = a) : a = e[2];
513
- const r = a;
508
+ } = n, {
509
+ highlight: s
510
+ } = se(X);
511
+ let r;
512
+ e[0] !== s || e[1] !== t ? (r = s ? Ce(t, s) : t, e[0] = s, e[1] = t, e[2] = r) : r = e[2];
513
+ const i = r;
514
514
  let l;
515
- return e[3] !== r ? (l = /* @__PURE__ */ v($, { children: r }), e[3] = r, e[4] = l) : l = e[4], l;
516
- }, z = (s) => {
517
- const e = C.c(5), {
515
+ return e[3] !== i ? (l = /* @__PURE__ */ v($, { children: i }), e[3] = i, e[4] = l) : l = e[4], l;
516
+ }, Q = (n) => {
517
+ const e = _.c(5), {
518
518
  name: t,
519
- value: n
520
- } = s;
521
- let a;
519
+ value: s
520
+ } = n;
521
+ let r;
522
522
  try {
523
- let i;
524
- e[0] !== t || e[1] !== n ? (i = JSON.stringify({
525
- [t]: n
526
- }, null, 2), e[0] = t, e[1] = n, e[2] = i) : i = e[2], a = i;
527
- } catch (i) {
528
- a = String(i);
523
+ let a;
524
+ e[0] !== t || e[1] !== s ? (a = JSON.stringify({
525
+ [t]: s
526
+ }, null, 2), e[0] = t, e[1] = s, e[2] = a) : a = e[2], r = a;
527
+ } catch (a) {
528
+ r = String(a);
529
529
  }
530
- const r = a;
530
+ const i = r;
531
531
  let l;
532
- return e[3] !== r ? (l = /* @__PURE__ */ v("pre", { children: r }), e[3] = r, e[4] = l) : l = e[4], l;
533
- }, _e = (s) => {
534
- const e = C.c(26);
535
- let t, n, a, r;
536
- if (e[0] !== s) {
532
+ return e[3] !== i ? (l = /* @__PURE__ */ v("pre", { children: i }), e[3] = i, e[4] = l) : l = e[4], l;
533
+ }, _e = (n) => {
534
+ const e = _.c(26);
535
+ let t, s, r, i;
536
+ if (e[0] !== n) {
537
537
  const {
538
- selectedKey: E,
539
- setKey: y,
540
- currentKey: N,
538
+ selectedKey: S,
539
+ setKey: C,
540
+ currentKey: E,
541
541
  highlight: O,
542
- ..._
543
- } = s;
544
- a = E, r = y, t = N, n = _, e[0] = s, e[1] = t, e[2] = n, e[3] = a, e[4] = r;
542
+ ...y
543
+ } = n;
544
+ r = S, i = C, t = E, s = y, e[0] = n, e[1] = t, e[2] = s, e[3] = r, e[4] = i;
545
545
  } else
546
- t = e[1], n = e[2], a = e[3], r = e[4];
546
+ t = e[1], s = e[2], r = e[3], i = e[4];
547
547
  let l;
548
- e[5] !== t ? (l = A(t), e[5] = t, e[6] = l) : l = e[6];
549
- const i = l, o = P(void 0);
548
+ e[5] !== t ? (l = k(t), e[5] = t, e[6] = l) : l = e[6];
549
+ const a = l, o = P(void 0);
550
550
  let u, c;
551
- e[7] !== i ? (u = () => {
551
+ e[7] !== a ? (u = () => {
552
552
  if (o.current) {
553
- const E = k(() => {
553
+ const S = H(() => {
554
554
  o.current && (o.current?.classList.add("state-key-updated"), requestAnimationFrame(() => o.current?.classList.remove("state-key-updated")));
555
555
  }, 5);
556
- return i.subscribeAll(E);
556
+ return a.subscribeAll(S);
557
557
  }
558
- }, c = [i, o], e[7] = i, e[8] = u, e[9] = c) : (u = e[8], c = e[9]), g(u, c);
559
- const d = t == a;
558
+ }, c = [a, o], e[7] = a, e[8] = u, e[9] = c) : (u = e[8], c = e[9]), w(u, c);
559
+ const d = t == r;
560
560
  let f;
561
- e[10] !== t || e[11] !== r ? (f = () => r(t), e[10] = t, e[11] = r, e[12] = f) : f = e[12];
561
+ e[10] !== t || e[11] !== i ? (f = () => i(t), e[10] = t, e[11] = i, e[12] = f) : f = e[12];
562
562
  const m = String(t);
563
- let p;
564
- e[13] !== m ? (p = /* @__PURE__ */ v("div", { className: "state-key-name", children: /* @__PURE__ */ v(Se, { text: m }) }), e[13] = m, e[14] = p) : p = e[14];
563
+ let g;
564
+ e[13] !== m ? (g = /* @__PURE__ */ v("div", { className: "state-key-name", children: /* @__PURE__ */ v(we, { text: m }) }), e[13] = m, e[14] = g) : g = e[14];
565
565
  let h;
566
- e[15] !== i.data ? (h = Object.keys(i.data), e[15] = i.data, e[16] = h) : h = e[16];
567
- let b;
568
- e[17] !== h.length ? (b = /* @__PURE__ */ T("div", { className: "state-key-meta", children: [
566
+ e[15] !== a.data ? (h = Object.keys(a.data), e[15] = a.data, e[16] = h) : h = e[16];
567
+ let p;
568
+ e[17] !== h.length ? (p = /* @__PURE__ */ R("div", { className: "state-key-meta", children: [
569
569
  h.length,
570
570
  " items"
571
- ] }), e[17] = h.length, e[18] = b) : b = e[18];
572
- let S;
573
- return e[19] !== t || e[20] !== n || e[21] !== d || e[22] !== f || e[23] !== p || e[24] !== b ? (S = /* @__PURE__ */ T("div", { ref: o, className: "state-key", title: t, "data-active": d, onClick: f, ...n, children: [
574
- p,
575
- b
576
- ] }), e[19] = t, e[20] = n, e[21] = d, e[22] = f, e[23] = p, e[24] = b, e[25] = S) : S = e[25], S;
577
- }, j = A.cache, Re = (s) => {
578
- const e = C.c(27), {
571
+ ] }), e[17] = h.length, e[18] = p) : p = e[18];
572
+ let b;
573
+ return e[19] !== t || e[20] !== s || e[21] !== d || e[22] !== f || e[23] !== g || e[24] !== p ? (b = /* @__PURE__ */ R("div", { ref: o, className: "state-key", title: t, "data-active": d, onClick: f, ...s, children: [
574
+ g,
575
+ p
576
+ ] }), e[19] = t, e[20] = s, e[21] = d, e[22] = f, e[23] = g, e[24] = p, e[25] = b) : b = e[25], b;
577
+ };
578
+ function T() {
579
+ return T = Object.assign ? Object.assign.bind() : function(n) {
580
+ for (var e = 1; e < arguments.length; e++) {
581
+ var t = arguments[e];
582
+ for (var s in t) ({}).hasOwnProperty.call(t, s) && (n[s] = t[s]);
583
+ }
584
+ return n;
585
+ }, T.apply(null, arguments);
586
+ }
587
+ function ye(n, e) {
588
+ if (n == null) return {};
589
+ var t = {};
590
+ for (var s in n) if ({}.hasOwnProperty.call(n, s)) {
591
+ if (e.indexOf(s) !== -1) continue;
592
+ t[s] = n[s];
593
+ }
594
+ return t;
595
+ }
596
+ var Ne = ["prefixCls", "className", "children", "mode", "visiable", "visible", "renderBar", "lineBar", "disable", "onDragEnd", "onDragging"];
597
+ class U extends D.Component {
598
+ constructor(e) {
599
+ super(e), this.state = {
600
+ dragging: !1
601
+ }, this.warpper = void 0, this.paneNumber = void 0, this.startX = void 0, this.startY = void 0, this.move = void 0, this.target = void 0, this.boxWidth = void 0, this.boxHeight = void 0, this.preWidth = void 0, this.nextWidth = void 0, this.preHeight = void 0, this.nextHeight = void 0, this.preSize = void 0, this.nextSize = void 0, this.onDragEnd = this.onDragEnd.bind(this), this.onDragging = this.onDragging.bind(this);
602
+ }
603
+ componentWillUnmount() {
604
+ this.removeEvent();
605
+ }
606
+ removeEvent() {
607
+ window.removeEventListener("mousemove", this.onDragging, !1), window.removeEventListener("mouseup", this.onDragEnd, !1);
608
+ }
609
+ onMouseDown(e, t) {
610
+ if (!(!t.target || !this.warpper)) {
611
+ this.paneNumber = e, this.startX = t.clientX, this.startY = t.clientY, this.move = !0, this.target = t.target.parentNode;
612
+ var s = this.target.previousElementSibling, r = this.target.nextElementSibling;
613
+ this.boxWidth = this.warpper.clientWidth, this.boxHeight = this.warpper.clientHeight, s && (this.preWidth = s.clientWidth, this.preHeight = s.clientHeight), r && (this.nextWidth = r.clientWidth, this.nextHeight = r.clientHeight), window.addEventListener("mousemove", this.onDragging), window.addEventListener("mouseup", this.onDragEnd, !1), this.setState({
614
+ dragging: !0
615
+ });
616
+ }
617
+ }
618
+ onDragging(e) {
619
+ if (this.move) {
620
+ this.state.dragging || this.setState({
621
+ dragging: !0
622
+ });
623
+ var {
624
+ mode: t,
625
+ onDragging: s
626
+ } = this.props, r = this.target.nextElementSibling, i = this.target.previousElementSibling, l = e.clientX - this.startX, a = e.clientY - this.startY;
627
+ if (this.preSize = 0, this.nextSize = 0, t === "horizontal") {
628
+ if (this.preSize = this.preWidth + l > -1 ? this.preWidth + l : 0, this.nextSize = this.nextWidth - l > -1 ? this.nextWidth - l : 0, this.preSize === 0 || this.nextSize === 0)
629
+ return;
630
+ this.preSize = (this.preSize / this.boxWidth >= 1 ? 1 : this.preSize / this.boxWidth) * 100, this.nextSize = (this.nextSize / this.boxWidth >= 1 ? 1 : this.nextSize / this.boxWidth) * 100, i && r && (i.style.width = this.preSize + "%", r.style.width = this.nextSize + "%");
631
+ }
632
+ if (t === "vertical" && this.preHeight + a > -1 && this.nextHeight - a > -1) {
633
+ if (this.preSize = this.preHeight + a > -1 ? this.preHeight + a : 0, this.nextSize = this.nextHeight - a > -1 ? this.nextHeight - a : 0, this.preSize = (this.preSize / this.boxHeight >= 1 ? 1 : this.preSize / this.boxHeight) * 100, this.nextSize = (this.nextSize / this.boxHeight >= 1 ? 1 : this.nextSize / this.boxHeight) * 100, this.preSize === 0 || this.nextSize === 0)
634
+ return;
635
+ i && r && (i.style.height = this.preSize + "%", r.style.height = this.nextSize + "%");
636
+ }
637
+ s && s(this.preSize, this.nextSize, this.paneNumber);
638
+ }
639
+ }
640
+ onDragEnd() {
641
+ var {
642
+ onDragEnd: e
643
+ } = this.props;
644
+ this.move = !1, e && e(this.preSize, this.nextSize, this.paneNumber), this.removeEvent(), this.setState({
645
+ dragging: !1
646
+ });
647
+ }
648
+ render() {
649
+ var e, t = this.props, {
650
+ prefixCls: s,
651
+ className: r,
652
+ children: i,
653
+ mode: l,
654
+ visible: a = (e = this.props.visible) != null ? e : this.props.visiable,
655
+ renderBar: o,
656
+ lineBar: u,
657
+ disable: c
658
+ } = t, d = ye(t, Ne), {
659
+ dragging: f
660
+ } = this.state, m = [s, r, s + "-" + l, f ? "dragging" : null].filter(Boolean).join(" ").trim(), g = D.Children.toArray(i);
661
+ return /* @__PURE__ */ v("div", T({
662
+ className: m
663
+ }, d, {
664
+ ref: (h) => this.warpper = h,
665
+ children: D.Children.map(g, (h, p) => {
666
+ var b = Object.assign({}, h.props, {
667
+ className: [s + "-pane", h.props.className].filter(Boolean).join(" ").trim(),
668
+ style: T({}, h.props.style)
669
+ }), S = a === !0 || a && a.includes(p + 1) || !1, C = {
670
+ className: [s + "-bar", u ? s + "-line-bar" : null, u ? null : s + "-large-bar"].filter(Boolean).join(" ").trim()
671
+ };
672
+ (c === !0 || c && c.includes(p + 1)) && (C.className = [C.className, c ? "disable" : null].filter(Boolean).join(" ").trim());
673
+ var E = null;
674
+ return p !== 0 && S && o ? E = o(T({}, C, {
675
+ onMouseDown: this.onMouseDown.bind(this, p + 1)
676
+ })) : p !== 0 && S && (E = /* @__PURE__ */ D.createElement("div", T({}, C), /* @__PURE__ */ v("div", {
677
+ onMouseDown: this.onMouseDown.bind(this, p + 1)
678
+ }))), /* @__PURE__ */ R(D.Fragment, {
679
+ children: [E, /* @__PURE__ */ D.cloneElement(h, T({}, b))]
680
+ }, p);
681
+ })
682
+ }));
683
+ }
684
+ }
685
+ U.defaultProps = {
686
+ prefixCls: "w-split",
687
+ visiable: !0,
688
+ mode: "horizontal"
689
+ };
690
+ const L = k.cache, De = (n) => {
691
+ const e = _.c(27), {
579
692
  Component: t
580
- } = s, [n, a] = R(ye), [r, l] = R(""), [i, o] = R("");
693
+ } = n, [s, r] = N(Te), [i, l] = N(""), [a, o] = N("");
581
694
  let u, c;
582
695
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (u = () => {
583
- const _ = setInterval(() => {
584
- a(Ne);
696
+ const y = setInterval(() => {
697
+ r(ze);
585
698
  }, 50);
586
- return () => clearInterval(_);
587
- }, c = [j], e[0] = u, e[1] = c) : (u = e[0], c = e[1]), g(u, c);
699
+ return () => clearInterval(y);
700
+ }, c = [L], e[0] = u, e[1] = c) : (u = e[0], c = e[1]), w(u, c);
588
701
  let d;
589
- e[2] !== r ? (d = r.toLowerCase().split(" "), e[2] = r, e[3] = d) : d = e[3];
702
+ e[2] !== i ? (d = i.toLowerCase().split(" "), e[2] = i, e[3] = d) : d = e[3];
590
703
  const f = d;
591
704
  let m;
592
- e[4] !== f ? (m = (_) => {
593
- const K = _.toLowerCase();
594
- return f.every((X) => K.includes(X));
705
+ e[4] !== f ? (m = (y) => {
706
+ const W = y.toLowerCase();
707
+ return f.every((Z) => W.includes(Z));
595
708
  }, e[4] = f, e[5] = m) : m = e[5];
596
- const p = m;
709
+ const g = m;
597
710
  let h;
598
- e[6] === Symbol.for("react.memo_cache_sentinel") ? (h = (_) => l(_.target.value), e[6] = h) : h = e[6];
711
+ e[6] === Symbol.for("react.memo_cache_sentinel") ? (h = (y) => l(y.target.value), e[6] = h) : h = e[6];
712
+ let p;
713
+ e[7] !== i ? (p = /* @__PURE__ */ v("input", { placeholder: "Type to Filter ...", className: "state-filter", value: i, onChange: h }), e[7] = i, e[8] = p) : p = e[8];
599
714
  let b;
600
- e[7] !== r ? (b = /* @__PURE__ */ v("input", { placeholder: "Type to Filter ...", className: "state-filter", value: r, onChange: h }), e[7] = r, e[8] = b) : b = e[8];
601
- let S;
602
- if (e[9] !== n || e[10] !== p || e[11] !== i) {
603
- let _;
604
- e[13] !== i ? (_ = (K) => /* @__PURE__ */ v(_e, { selectedKey: i, setKey: o, currentKey: K }, K), e[13] = i, e[14] = _) : _ = e[14], S = n.map(we).filter(De).filter(p).map(_), e[9] = n, e[10] = p, e[11] = i, e[12] = S;
715
+ if (e[9] !== s || e[10] !== g || e[11] !== a) {
716
+ let y;
717
+ e[13] !== a ? (y = (W) => /* @__PURE__ */ v(_e, { selectedKey: a, setKey: o, currentKey: W }, W), e[13] = a, e[14] = y) : y = e[14], b = s.map(xe).filter($e).filter(g).map(y), e[9] = s, e[10] = g, e[11] = a, e[12] = b;
605
718
  } else
606
- S = e[12];
719
+ b = e[12];
720
+ let S;
721
+ e[15] !== i || e[16] !== b ? (S = /* @__PURE__ */ v(Ee, { highlight: i, children: b }), e[15] = i, e[16] = b, e[17] = S) : S = e[17];
722
+ let C;
723
+ e[18] !== p || e[19] !== S ? (C = /* @__PURE__ */ R("div", { className: "state-list", children: [
724
+ p,
725
+ S
726
+ ] }), e[18] = p, e[19] = S, e[20] = C) : C = e[20];
607
727
  let E;
608
- e[15] !== r || e[16] !== S ? (E = /* @__PURE__ */ v(Ce, { highlight: r, children: S }), e[15] = r, e[16] = S, e[17] = E) : E = e[17];
609
- let y;
610
- e[18] !== b || e[19] !== E ? (y = /* @__PURE__ */ T("div", { className: "state-list", children: [
611
- b,
612
- E
613
- ] }), e[18] = b, e[19] = E, e[20] = y) : y = e[20];
614
- let N;
615
- e[21] !== t || e[22] !== i ? (N = /* @__PURE__ */ v("div", { className: "state-view", children: /* @__PURE__ */ v(Ee, { dataKey: i, Component: t }, i) }), e[21] = t, e[22] = i, e[23] = N) : N = e[23];
728
+ e[21] !== t || e[22] !== a ? (E = /* @__PURE__ */ v("div", { className: "state-view", children: /* @__PURE__ */ v(Re, { dataKey: a, Component: t }, a) }), e[21] = t, e[22] = a, e[23] = E) : E = e[23];
616
729
  let O;
617
- return e[24] !== N || e[25] !== y ? (O = /* @__PURE__ */ T("div", { className: "main-panel", children: [
618
- y,
619
- N
620
- ] }), e[24] = N, e[25] = y, e[26] = O) : O = e[26], O;
621
- }, Ee = (s) => {
622
- const e = C.c(11), {
730
+ return e[24] !== E || e[25] !== C ? (O = /* @__PURE__ */ R(U, { mode: "horizontal", className: "main-panel", children: [
731
+ C,
732
+ E
733
+ ] }), e[24] = E, e[25] = C, e[26] = O) : O = e[26], O;
734
+ }, Re = (n) => {
735
+ const e = _.c(11), {
623
736
  dataKey: t,
624
- Component: n
625
- } = s, a = n === void 0 ? z : n;
626
- let r;
627
- e[0] !== t ? (r = A(t), e[0] = t, e[1] = r) : r = e[1];
628
- const l = r, i = l?.data;
737
+ Component: s
738
+ } = n, r = s === void 0 ? Q : s;
739
+ let i;
740
+ e[0] !== t ? (i = k(t), e[0] = t, e[1] = i) : i = e[1];
741
+ const l = i, a = l?.data;
629
742
  let o;
630
- e[2] !== i ? (o = {
631
- ...i
632
- }, e[2] = i, e[3] = o) : o = e[3];
633
- const [u, c] = R(o);
743
+ e[2] !== a ? (o = {
744
+ ...a
745
+ }, e[2] = a, e[3] = o) : o = e[3];
746
+ const [u, c] = N(o);
634
747
  let d, f;
635
748
  e[4] !== l ? (d = () => {
636
- const p = k(c, 5);
637
- return l.subscribeAll((h, b) => p({
638
- ...b
749
+ const g = H(c, 5);
750
+ return l.subscribeAll((h, p) => g({
751
+ ...p
639
752
  }));
640
- }, f = [l], e[4] = l, e[5] = d, e[6] = f) : (d = e[5], f = e[6]), g(d, f);
753
+ }, f = [l], e[4] = l, e[5] = d, e[6] = f) : (d = e[5], f = e[6]), w(d, f);
641
754
  let m;
642
- return e[7] !== a || e[8] !== u || e[9] !== t ? (m = /* @__PURE__ */ v(a, { value: u, name: t }), e[7] = a, e[8] = u, e[9] = t, e[10] = m) : m = e[10], m;
755
+ return e[7] !== r || e[8] !== u || e[9] !== t ? (m = /* @__PURE__ */ v(r, { value: u, name: t }), e[7] = r, e[8] = u, e[9] = t, e[10] = m) : m = e[10], m;
643
756
  };
644
- function ye() {
645
- return [...j.keys()];
757
+ function Te() {
758
+ return [...L.keys()];
646
759
  }
647
- function Ne(s) {
648
- return s.length != j.size ? [...j.keys()] : s;
760
+ function ze(n) {
761
+ return n.length != L.size ? [...L.keys()] : n;
649
762
  }
650
- function we(s) {
651
- return JSON.parse(s)?.[0];
763
+ function xe(n) {
764
+ return JSON.parse(n)?.[0];
652
765
  }
653
- function De(s) {
654
- return s != "auto-ctx" && s;
766
+ function $e(n) {
767
+ return n != "auto-ctx" && n;
655
768
  }
656
- const Ie = (s) => {
657
- const e = C.c(19);
658
- let t, n, a;
659
- e[0] !== s ? ({
660
- toggleButton: n,
661
- Component: a,
769
+ const Be = (n) => {
770
+ const e = _.c(29);
771
+ let t, s, r;
772
+ e[0] !== n ? ({
773
+ toggleButton: s,
774
+ Component: r,
662
775
  ...t
663
- } = s, e[0] = s, e[1] = t, e[2] = n, e[3] = a) : (t = e[1], n = e[2], a = e[3]);
664
- const r = a === void 0 ? z : a, [l, i] = R(!1);
776
+ } = n, e[0] = n, e[1] = t, e[2] = s, e[3] = r) : (t = e[1], s = e[2], r = e[3]);
777
+ const i = r === void 0 ? Q : r, [l, a] = N(!1);
665
778
  let o;
666
- e[4] === Symbol.for("react.memo_cache_sentinel") ? (o = () => i(!0), e[4] = o) : o = e[4];
779
+ e[4] === Symbol.for("react.memo_cache_sentinel") ? (o = () => a(!0), e[4] = o) : o = e[4];
667
780
  const u = t?.children ?? "Toggle Dev Tool";
668
781
  let c;
669
782
  e[5] !== l || e[6] !== t || e[7] !== u ? (c = /* @__PURE__ */ v("button", { className: "react-state-dev-btn", "data-active": l, onClick: o, ...t, children: u }), e[5] = l, e[6] = t, e[7] = u, e[8] = c) : c = e[8];
670
783
  let d;
671
- e[9] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ v("button", { className: "close-btn", onClick: () => i(!1), children: "[x]" }), e[9] = d) : d = e[9];
672
- let f;
673
- e[10] !== r || e[11] !== l ? (f = l && /* @__PURE__ */ v(Re, { Component: r }), e[10] = r, e[11] = l, e[12] = f) : f = e[12];
784
+ e[9] === Symbol.for("react.memo_cache_sentinel") ? (d = {
785
+ height: "100%"
786
+ }, e[9] = d) : d = e[9];
787
+ const f = l ? "66.66%" : "100%";
674
788
  let m;
675
- e[13] !== l || e[14] !== f ? (m = /* @__PURE__ */ T("div", { className: "react-state-dev-container", "data-active": l, children: [
676
- d,
677
- f
678
- ] }), e[13] = l, e[14] = f, e[15] = m) : m = e[15];
789
+ e[10] !== f ? (m = /* @__PURE__ */ v("div", { style: {
790
+ height: f
791
+ } }), e[10] = f, e[11] = m) : m = e[11];
792
+ const g = l ? "33.33%" : "0";
793
+ let h;
794
+ e[12] !== g ? (h = {
795
+ height: g,
796
+ backgroundColor: "var(--rs-bg-color)",
797
+ position: "relative"
798
+ }, e[12] = g, e[13] = h) : h = e[13];
679
799
  let p;
680
- return e[16] !== c || e[17] !== m ? (p = /* @__PURE__ */ T($, { children: [
800
+ e[14] !== l ? (p = l && /* @__PURE__ */ v("button", { className: "close-btn", onClick: () => a(!1), children: "[x]" }), e[14] = l, e[15] = p) : p = e[15];
801
+ let b;
802
+ e[16] !== i || e[17] !== l ? (b = l && /* @__PURE__ */ v(De, { Component: i }), e[16] = i, e[17] = l, e[18] = b) : b = e[18];
803
+ let S;
804
+ e[19] !== h || e[20] !== p || e[21] !== b ? (S = /* @__PURE__ */ R("div", { className: "react-state-dev-panel", style: h, children: [
805
+ p,
806
+ b
807
+ ] }), e[19] = h, e[20] = p, e[21] = b, e[22] = S) : S = e[22];
808
+ let C;
809
+ e[23] !== S || e[24] !== m ? (C = /* @__PURE__ */ v("div", { className: "react-state-dev-container", children: /* @__PURE__ */ R(U, { mode: "vertical", style: d, children: [
810
+ m,
811
+ S
812
+ ] }) }), e[23] = S, e[24] = m, e[25] = C) : C = e[25];
813
+ let E;
814
+ return e[26] !== C || e[27] !== c ? (E = /* @__PURE__ */ R($, { children: [
681
815
  c,
682
- m
683
- ] }), e[16] = c, e[17] = m, e[18] = p) : p = e[18], p;
816
+ C
817
+ ] }), e[26] = C, e[27] = c, e[28] = E) : E = e[28], E;
684
818
  };
685
819
  export {
686
- je as AutoRootCtx,
687
- ie as Context,
688
- Ie as DevToolContainer,
689
- Ue as createAutoCtx,
690
- Le as createRootCtx,
691
- A as getContext,
692
- oe as useArrayChangeId,
693
- w as useDataContext,
820
+ Ke as AutoRootCtx,
821
+ ce as Context,
822
+ Be as DevToolContainer,
823
+ Me as createAutoCtx,
824
+ Ae as createRootCtx,
825
+ k as getContext,
826
+ ae as useArrayChangeId,
827
+ z as useDataContext,
694
828
  ke as useDataSource,
695
- Y as useDataSourceMultiple,
696
- le as useDataSubscribe,
697
- Ae as useDataSubscribeMultiple,
698
- Ke as useDataSubscribeMultipleWithDebounce,
699
- Oe as useDataSubscribeWithTransform,
700
- Ve as useQuickSubscribe
829
+ q as useDataSourceMultiple,
830
+ ue as useDataSubscribe,
831
+ je as useDataSubscribeMultiple,
832
+ Le as useDataSubscribeMultipleWithDebounce,
833
+ We as useDataSubscribeWithTransform,
834
+ Ue as useQuickSubscribe
701
835
  };
702
836
  //# sourceMappingURL=index.es.js.map