cogsbox-state 0.5.370 → 0.5.372
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/CogsState.jsx +395 -395
- package/dist/CogsState.jsx.map +1 -1
- package/package.json +1 -1
- package/src/CogsState.tsx +25 -16
package/dist/CogsState.jsx
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { transformStateFunc as
|
|
5
|
-
import { pushFunc as
|
|
6
|
-
import
|
|
7
|
-
import { v4 as
|
|
2
|
+
import { jsx as ye } from "react/jsx-runtime";
|
|
3
|
+
import { useState as Q, useRef as Z, useEffect as oe, useLayoutEffect as ce, useMemo as pe, createElement as le, useSyncExternalStore as Ge, startTransition as Le, useCallback as Ae } from "react";
|
|
4
|
+
import { transformStateFunc as Re, isDeepEqual as q, isFunction as K, getNestedValue as J, getDifferences as Ee, debounce as De } from "./utility.js";
|
|
5
|
+
import { pushFunc as ve, updateFn as ie, cutFunc as fe, ValidationWrapper as Ue, FormControlComponent as je } from "./Functions.jsx";
|
|
6
|
+
import He from "superjson";
|
|
7
|
+
import { v4 as we } from "uuid";
|
|
8
8
|
import "zod";
|
|
9
|
-
import { getGlobalStore as r, formRefStore as
|
|
10
|
-
import { useCogsConfig as
|
|
11
|
-
import { applyPatch as
|
|
12
|
-
import
|
|
13
|
-
function
|
|
9
|
+
import { getGlobalStore as r, formRefStore as Ne } from "./store.js";
|
|
10
|
+
import { useCogsConfig as xe } from "./CogsStateClient.jsx";
|
|
11
|
+
import { applyPatch as Fe } from "fast-json-patch";
|
|
12
|
+
import Be from "react-use-measure";
|
|
13
|
+
function Ce(e, i) {
|
|
14
14
|
const m = r.getState().getInitialOptions, g = r.getState().setInitialStateOptions, T = m(e) || {};
|
|
15
15
|
g(e, {
|
|
16
16
|
...T,
|
|
17
17
|
...i
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function $e({
|
|
21
21
|
stateKey: e,
|
|
22
22
|
options: i,
|
|
23
23
|
initialOptionsPart: m
|
|
24
24
|
}) {
|
|
25
|
-
const g = re(e) || {}, T = m[e] || {},
|
|
25
|
+
const g = re(e) || {}, T = m[e] || {}, C = r.getState().setInitialStateOptions, p = { ...T, ...g };
|
|
26
26
|
let v = !1;
|
|
27
27
|
if (i)
|
|
28
28
|
for (const a in i)
|
|
29
29
|
p.hasOwnProperty(a) ? (a == "localStorage" && i[a] && p[a].key !== i[a]?.key && (v = !0, p[a] = i[a]), a == "initialState" && i[a] && p[a] !== i[a] && // Different references
|
|
30
|
-
!
|
|
31
|
-
v &&
|
|
30
|
+
!q(p[a], i[a]) && (v = !0, p[a] = i[a])) : (v = !0, p[a] = i[a]);
|
|
31
|
+
v && C(e, p);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function gt(e, { formElements: i, validation: m }) {
|
|
34
34
|
return { initialState: e, formElements: i, validation: m };
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const ft = (e, i) => {
|
|
37
37
|
let m = e;
|
|
38
|
-
const [g, T] =
|
|
38
|
+
const [g, T] = Re(m);
|
|
39
39
|
(Object.keys(T).length > 0 || i && Object.keys(i).length > 0) && Object.keys(T).forEach((v) => {
|
|
40
40
|
T[v] = T[v] || {}, T[v].formElements = {
|
|
41
41
|
...i?.formElements,
|
|
@@ -45,14 +45,14 @@ const ut = (e, i) => {
|
|
|
45
45
|
// State-specific overrides
|
|
46
46
|
}, re(v) || r.getState().setInitialStateOptions(v, T[v]);
|
|
47
47
|
}), r.getState().setInitialStates(g), r.getState().setCreatedState(g);
|
|
48
|
-
const
|
|
49
|
-
const [h] =
|
|
50
|
-
|
|
48
|
+
const C = (v, a) => {
|
|
49
|
+
const [h] = Q(a?.componentId ?? we());
|
|
50
|
+
$e({
|
|
51
51
|
stateKey: v,
|
|
52
52
|
options: a,
|
|
53
53
|
initialOptionsPart: T
|
|
54
54
|
});
|
|
55
|
-
const n = r.getState().cogsStateStore[v] || g[v], S = a?.modifyState ? a.modifyState(n) : n, [H,
|
|
55
|
+
const n = r.getState().cogsStateStore[v] || g[v], S = a?.modifyState ? a.modifyState(n) : n, [H, G] = Xe(
|
|
56
56
|
S,
|
|
57
57
|
{
|
|
58
58
|
stateKey: v,
|
|
@@ -68,49 +68,49 @@ const ut = (e, i) => {
|
|
|
68
68
|
serverState: a?.serverState
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
|
-
return
|
|
71
|
+
return G;
|
|
72
72
|
};
|
|
73
73
|
function p(v, a) {
|
|
74
|
-
|
|
74
|
+
$e({ stateKey: v, options: a, initialOptionsPart: T }), a.localStorage && Ye(v, a), he(v);
|
|
75
75
|
}
|
|
76
|
-
return { useCogsState:
|
|
76
|
+
return { useCogsState: C, setCogsOptions: p };
|
|
77
77
|
}, {
|
|
78
|
-
setUpdaterState:
|
|
79
|
-
setState:
|
|
78
|
+
setUpdaterState: Se,
|
|
79
|
+
setState: ne,
|
|
80
80
|
getInitialOptions: re,
|
|
81
|
-
getKeyState:
|
|
82
|
-
getValidationErrors:
|
|
83
|
-
setStateLog:
|
|
84
|
-
updateInitialStateGlobal:
|
|
85
|
-
addValidationError:
|
|
86
|
-
removeValidationError:
|
|
87
|
-
setServerSyncActions:
|
|
88
|
-
} = r.getState(),
|
|
81
|
+
getKeyState: Me,
|
|
82
|
+
getValidationErrors: We,
|
|
83
|
+
setStateLog: ze,
|
|
84
|
+
updateInitialStateGlobal: _e,
|
|
85
|
+
addValidationError: qe,
|
|
86
|
+
removeValidationError: X,
|
|
87
|
+
setServerSyncActions: Je
|
|
88
|
+
} = r.getState(), ke = (e, i, m, g, T) => {
|
|
89
89
|
m?.log && console.log(
|
|
90
90
|
"saving to localstorage",
|
|
91
91
|
i,
|
|
92
92
|
m.localStorage?.key,
|
|
93
93
|
g
|
|
94
94
|
);
|
|
95
|
-
const
|
|
96
|
-
if (
|
|
97
|
-
const p = `${g}-${i}-${
|
|
95
|
+
const C = K(m?.localStorage?.key) ? m.localStorage?.key(e) : m?.localStorage?.key;
|
|
96
|
+
if (C && g) {
|
|
97
|
+
const p = `${g}-${i}-${C}`;
|
|
98
98
|
let v;
|
|
99
99
|
try {
|
|
100
|
-
v =
|
|
100
|
+
v = Ie(p)?.lastSyncedWithServer;
|
|
101
101
|
} catch {
|
|
102
102
|
}
|
|
103
103
|
const a = {
|
|
104
104
|
state: e,
|
|
105
105
|
lastUpdated: Date.now(),
|
|
106
106
|
lastSyncedWithServer: T ?? v
|
|
107
|
-
}, h =
|
|
107
|
+
}, h = He.serialize(a);
|
|
108
108
|
window.localStorage.setItem(
|
|
109
109
|
p,
|
|
110
110
|
JSON.stringify(h.json)
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
|
-
},
|
|
113
|
+
}, Ie = (e) => {
|
|
114
114
|
if (!e) return null;
|
|
115
115
|
try {
|
|
116
116
|
const i = window.localStorage.getItem(e);
|
|
@@ -118,29 +118,29 @@ const ut = (e, i) => {
|
|
|
118
118
|
} catch (i) {
|
|
119
119
|
return console.error("Error loading from localStorage:", i), null;
|
|
120
120
|
}
|
|
121
|
-
},
|
|
122
|
-
const m = r.getState().cogsStateStore[e], { sessionId: g } =
|
|
121
|
+
}, Ye = (e, i) => {
|
|
122
|
+
const m = r.getState().cogsStateStore[e], { sessionId: g } = xe(), T = K(i?.localStorage?.key) ? i.localStorage.key(m) : i?.localStorage?.key;
|
|
123
123
|
if (T && g) {
|
|
124
|
-
const
|
|
124
|
+
const C = Ie(
|
|
125
125
|
`${g}-${e}-${T}`
|
|
126
126
|
);
|
|
127
|
-
if (
|
|
128
|
-
return
|
|
127
|
+
if (C && C.lastUpdated > (C.lastSyncedWithServer || 0))
|
|
128
|
+
return ne(e, C.state), he(e), !0;
|
|
129
129
|
}
|
|
130
130
|
return !1;
|
|
131
|
-
},
|
|
131
|
+
}, Pe = (e, i, m, g, T, C) => {
|
|
132
132
|
const p = {
|
|
133
133
|
initialState: i,
|
|
134
|
-
updaterState:
|
|
134
|
+
updaterState: me(
|
|
135
135
|
e,
|
|
136
136
|
g,
|
|
137
137
|
T,
|
|
138
|
-
|
|
138
|
+
C
|
|
139
139
|
),
|
|
140
140
|
state: m
|
|
141
141
|
};
|
|
142
|
-
|
|
143
|
-
},
|
|
142
|
+
_e(e, p.initialState), Se(e, p.updaterState), ne(e, p.state);
|
|
143
|
+
}, he = (e) => {
|
|
144
144
|
const i = r.getState().stateComponents.get(e);
|
|
145
145
|
if (!i) return;
|
|
146
146
|
const m = /* @__PURE__ */ new Set();
|
|
@@ -149,7 +149,7 @@ const ut = (e, i) => {
|
|
|
149
149
|
}), queueMicrotask(() => {
|
|
150
150
|
m.forEach((g) => g());
|
|
151
151
|
});
|
|
152
|
-
},
|
|
152
|
+
}, St = (e, i) => {
|
|
153
153
|
const m = r.getState().stateComponents.get(e);
|
|
154
154
|
if (m) {
|
|
155
155
|
const g = `${e}////${i}`, T = m.components.get(g);
|
|
@@ -157,22 +157,22 @@ const ut = (e, i) => {
|
|
|
157
157
|
return;
|
|
158
158
|
T && T.forceUpdate();
|
|
159
159
|
}
|
|
160
|
-
},
|
|
160
|
+
}, Ze = (e, i, m, g) => {
|
|
161
161
|
switch (e) {
|
|
162
162
|
case "update":
|
|
163
163
|
return {
|
|
164
|
-
oldValue:
|
|
165
|
-
newValue:
|
|
164
|
+
oldValue: J(i, g),
|
|
165
|
+
newValue: J(m, g)
|
|
166
166
|
};
|
|
167
167
|
case "insert":
|
|
168
168
|
return {
|
|
169
169
|
oldValue: null,
|
|
170
170
|
// or undefined
|
|
171
|
-
newValue:
|
|
171
|
+
newValue: J(m, g)
|
|
172
172
|
};
|
|
173
173
|
case "cut":
|
|
174
174
|
return {
|
|
175
|
-
oldValue:
|
|
175
|
+
oldValue: J(i, g),
|
|
176
176
|
newValue: null
|
|
177
177
|
// or undefined
|
|
178
178
|
};
|
|
@@ -180,12 +180,12 @@ const ut = (e, i) => {
|
|
|
180
180
|
return { oldValue: null, newValue: null };
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
|
-
function
|
|
183
|
+
function Xe(e, {
|
|
184
184
|
stateKey: i,
|
|
185
185
|
serverSync: m,
|
|
186
186
|
localStorage: g,
|
|
187
187
|
formElements: T,
|
|
188
|
-
reactiveDeps:
|
|
188
|
+
reactiveDeps: C,
|
|
189
189
|
reactiveType: p,
|
|
190
190
|
componentId: v,
|
|
191
191
|
initialState: a,
|
|
@@ -193,14 +193,14 @@ function Ye(e, {
|
|
|
193
193
|
dependencies: n,
|
|
194
194
|
serverState: S
|
|
195
195
|
} = {}) {
|
|
196
|
-
const [H,
|
|
196
|
+
const [H, G] = Q({}), { sessionId: L } = xe();
|
|
197
197
|
let F = !i;
|
|
198
|
-
const [I] =
|
|
198
|
+
const [I] = Q(i ?? we()), l = r.getState().stateLog[I], de = Z(/* @__PURE__ */ new Set()), ee = Z(v ?? we()), P = Z(
|
|
199
199
|
null
|
|
200
200
|
);
|
|
201
201
|
P.current = re(I) ?? null, oe(() => {
|
|
202
202
|
if (h && h.stateKey === I && h.path?.[0]) {
|
|
203
|
-
|
|
203
|
+
ne(I, (o) => ({
|
|
204
204
|
...o,
|
|
205
205
|
[h.path[0]]: h.newValue
|
|
206
206
|
}));
|
|
@@ -212,33 +212,33 @@ function Ye(e, {
|
|
|
212
212
|
}
|
|
213
213
|
}, [h]), oe(() => {
|
|
214
214
|
if (a) {
|
|
215
|
-
|
|
215
|
+
Ce(I, {
|
|
216
216
|
initialState: a
|
|
217
217
|
});
|
|
218
218
|
const t = P.current, s = t?.serverState?.id !== void 0 && t?.serverState?.status === "success" && t?.serverState?.data, c = r.getState().initialStateGlobal[I];
|
|
219
|
-
if (!(c && !
|
|
219
|
+
if (!(c && !q(c, a) || !c) && !s)
|
|
220
220
|
return;
|
|
221
221
|
let u = null;
|
|
222
|
-
const E =
|
|
223
|
-
E &&
|
|
224
|
-
let
|
|
225
|
-
const
|
|
226
|
-
s &&
|
|
222
|
+
const E = K(t?.localStorage?.key) ? t?.localStorage?.key(a) : t?.localStorage?.key;
|
|
223
|
+
E && L && (u = Ie(`${L}-${I}-${E}`));
|
|
224
|
+
let y = a, O = !1;
|
|
225
|
+
const k = s ? Date.now() : 0, A = u?.lastUpdated || 0, x = u?.lastSyncedWithServer || 0;
|
|
226
|
+
s && k > A ? (y = t.serverState.data, O = !0) : u && A > x && (y = u.state, t?.localStorage?.onChange && t?.localStorage?.onChange(y)), r.getState().initializeShadowState(I, a), Pe(
|
|
227
227
|
I,
|
|
228
228
|
a,
|
|
229
|
-
|
|
229
|
+
y,
|
|
230
230
|
ae,
|
|
231
231
|
ee.current,
|
|
232
|
-
|
|
233
|
-
),
|
|
232
|
+
L
|
|
233
|
+
), O && E && L && ke(y, I, t, L, Date.now()), he(I), (Array.isArray(p) ? p : [p || "component"]).includes("none") || G({});
|
|
234
234
|
}
|
|
235
235
|
}, [
|
|
236
236
|
a,
|
|
237
237
|
S?.status,
|
|
238
238
|
S?.data,
|
|
239
239
|
...n || []
|
|
240
|
-
]),
|
|
241
|
-
F &&
|
|
240
|
+
]), ce(() => {
|
|
241
|
+
F && Ce(I, {
|
|
242
242
|
serverSync: m,
|
|
243
243
|
formElements: T,
|
|
244
244
|
initialState: a,
|
|
@@ -249,133 +249,133 @@ function Ye(e, {
|
|
|
249
249
|
components: /* @__PURE__ */ new Map()
|
|
250
250
|
};
|
|
251
251
|
return o.components.set(t, {
|
|
252
|
-
forceUpdate: () =>
|
|
252
|
+
forceUpdate: () => G({}),
|
|
253
253
|
paths: /* @__PURE__ */ new Set(),
|
|
254
254
|
deps: [],
|
|
255
|
-
depsFunction:
|
|
255
|
+
depsFunction: C || void 0,
|
|
256
256
|
reactiveType: p ?? ["component", "deps"]
|
|
257
|
-
}), r.getState().stateComponents.set(I, o),
|
|
257
|
+
}), r.getState().stateComponents.set(I, o), G({}), () => {
|
|
258
258
|
o && (o.components.delete(t), o.components.size === 0 && r.getState().stateComponents.delete(I));
|
|
259
259
|
};
|
|
260
260
|
}, []);
|
|
261
261
|
const ae = (t, o, s, c) => {
|
|
262
262
|
if (Array.isArray(o)) {
|
|
263
263
|
const u = `${I}-${o.join(".")}`;
|
|
264
|
-
|
|
264
|
+
de.current.add(u);
|
|
265
265
|
}
|
|
266
266
|
const f = r.getState();
|
|
267
|
-
|
|
268
|
-
const E =
|
|
269
|
-
if (
|
|
270
|
-
let M = !1,
|
|
271
|
-
if ((!
|
|
272
|
-
const
|
|
273
|
-
if (Array.isArray(
|
|
267
|
+
ne(I, (u) => {
|
|
268
|
+
const E = K(t) ? t(u) : t, y = `${I}-${o.join(".")}`;
|
|
269
|
+
if (y) {
|
|
270
|
+
let M = !1, N = f.signalDomElements.get(y);
|
|
271
|
+
if ((!N || N.size === 0) && (s.updateType === "insert" || s.updateType === "cut")) {
|
|
272
|
+
const _ = o.slice(0, -1), j = J(E, _);
|
|
273
|
+
if (Array.isArray(j)) {
|
|
274
274
|
M = !0;
|
|
275
|
-
const
|
|
276
|
-
|
|
275
|
+
const w = `${I}-${_.join(".")}`;
|
|
276
|
+
N = f.signalDomElements.get(w);
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
|
-
if (
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
const
|
|
283
|
-
`[data-parent-id="${
|
|
279
|
+
if (N) {
|
|
280
|
+
const _ = M ? J(E, o.slice(0, -1)) : J(E, o);
|
|
281
|
+
N.forEach(({ parentId: j, position: w, effect: R }) => {
|
|
282
|
+
const V = document.querySelector(
|
|
283
|
+
`[data-parent-id="${j}"]`
|
|
284
284
|
);
|
|
285
|
-
if (
|
|
286
|
-
const
|
|
287
|
-
if (
|
|
288
|
-
const
|
|
289
|
-
|
|
285
|
+
if (V) {
|
|
286
|
+
const W = Array.from(V.childNodes);
|
|
287
|
+
if (W[w]) {
|
|
288
|
+
const D = R ? new Function("state", `return (${R})(state)`)(_) : _;
|
|
289
|
+
W[w].textContent = String(D);
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
console.log("shadowState", f.shadowStateStore), s.updateType === "update" && (c || P.current?.validation?.key) && o &&
|
|
295
|
+
console.log("shadowState", f.shadowStateStore), s.updateType === "update" && (c || P.current?.validation?.key) && o && X(
|
|
296
296
|
(c || P.current?.validation?.key) + "." + o.join(".")
|
|
297
297
|
);
|
|
298
|
-
const
|
|
299
|
-
s.updateType === "cut" && P.current?.validation?.key &&
|
|
300
|
-
P.current?.validation?.key + "." +
|
|
301
|
-
), s.updateType === "insert" && P.current?.validation?.key &&
|
|
302
|
-
P.current?.validation?.key + "." +
|
|
303
|
-
).filter(([
|
|
304
|
-
let
|
|
305
|
-
if (
|
|
306
|
-
let
|
|
307
|
-
|
|
298
|
+
const O = o.slice(0, o.length - 1);
|
|
299
|
+
s.updateType === "cut" && P.current?.validation?.key && X(
|
|
300
|
+
P.current?.validation?.key + "." + O.join(".")
|
|
301
|
+
), s.updateType === "insert" && P.current?.validation?.key && We(
|
|
302
|
+
P.current?.validation?.key + "." + O.join(".")
|
|
303
|
+
).filter(([N, _]) => {
|
|
304
|
+
let j = N?.split(".").length;
|
|
305
|
+
if (N == O.join(".") && j == O.length - 1) {
|
|
306
|
+
let w = N + "." + O;
|
|
307
|
+
X(N), qe(w, _);
|
|
308
308
|
}
|
|
309
309
|
});
|
|
310
|
-
const
|
|
311
|
-
if (console.log("stateEntry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",
|
|
312
|
-
const M =
|
|
310
|
+
const k = f.stateComponents.get(I);
|
|
311
|
+
if (console.log("stateEntry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", k), k) {
|
|
312
|
+
const M = Ee(u, E), N = new Set(M), _ = s.updateType === "update" ? o.join(".") : o.slice(0, -1).join(".") || "";
|
|
313
313
|
for (const [
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
] of
|
|
317
|
-
let
|
|
318
|
-
const
|
|
319
|
-
if (console.log("component",
|
|
320
|
-
if (
|
|
321
|
-
|
|
314
|
+
j,
|
|
315
|
+
w
|
|
316
|
+
] of k.components.entries()) {
|
|
317
|
+
let R = !1;
|
|
318
|
+
const V = Array.isArray(w.reactiveType) ? w.reactiveType : [w.reactiveType || "component"];
|
|
319
|
+
if (console.log("component", w), !V.includes("none")) {
|
|
320
|
+
if (V.includes("all")) {
|
|
321
|
+
w.forceUpdate();
|
|
322
322
|
continue;
|
|
323
323
|
}
|
|
324
|
-
if (
|
|
325
|
-
for (const
|
|
326
|
-
let
|
|
324
|
+
if (V.includes("component") && ((w.paths.has(_) || w.paths.has("")) && (R = !0), !R))
|
|
325
|
+
for (const W of N) {
|
|
326
|
+
let D = W;
|
|
327
327
|
for (; ; ) {
|
|
328
|
-
if (
|
|
329
|
-
|
|
328
|
+
if (w.paths.has(D)) {
|
|
329
|
+
R = !0;
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
|
-
const
|
|
333
|
-
if (
|
|
334
|
-
const
|
|
332
|
+
const $ = D.lastIndexOf(".");
|
|
333
|
+
if ($ !== -1) {
|
|
334
|
+
const b = D.substring(
|
|
335
335
|
0,
|
|
336
|
-
|
|
336
|
+
$
|
|
337
337
|
);
|
|
338
338
|
if (!isNaN(
|
|
339
|
-
Number(
|
|
340
|
-
) &&
|
|
341
|
-
|
|
339
|
+
Number(D.substring($ + 1))
|
|
340
|
+
) && w.paths.has(b)) {
|
|
341
|
+
R = !0;
|
|
342
342
|
break;
|
|
343
343
|
}
|
|
344
|
-
|
|
344
|
+
D = b;
|
|
345
345
|
} else
|
|
346
|
-
|
|
347
|
-
if (
|
|
346
|
+
D = "";
|
|
347
|
+
if (D === "")
|
|
348
348
|
break;
|
|
349
349
|
}
|
|
350
|
-
if (
|
|
350
|
+
if (R) break;
|
|
351
351
|
}
|
|
352
|
-
if (!
|
|
353
|
-
const
|
|
354
|
-
let
|
|
355
|
-
typeof
|
|
352
|
+
if (!R && V.includes("deps") && w.depsFunction) {
|
|
353
|
+
const W = w.depsFunction(E);
|
|
354
|
+
let D = !1;
|
|
355
|
+
typeof W == "boolean" ? W && (D = !0) : q(w.deps, W) || (w.deps = W, D = !0), D && (R = !0);
|
|
356
356
|
}
|
|
357
|
-
|
|
357
|
+
R && w.forceUpdate();
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
const
|
|
362
|
-
o = o.map((M,
|
|
363
|
-
const
|
|
364
|
-
return
|
|
361
|
+
const A = Date.now();
|
|
362
|
+
o = o.map((M, N) => {
|
|
363
|
+
const _ = o.slice(0, -1), j = J(E, _);
|
|
364
|
+
return N === o.length - 1 && ["insert", "cut"].includes(s.updateType) ? (j.length - 1).toString() : M;
|
|
365
365
|
});
|
|
366
|
-
const { oldValue: x, newValue:
|
|
366
|
+
const { oldValue: x, newValue: U } = Ze(
|
|
367
367
|
s.updateType,
|
|
368
368
|
u,
|
|
369
369
|
E,
|
|
370
370
|
o
|
|
371
|
-
),
|
|
372
|
-
timeStamp:
|
|
371
|
+
), Y = {
|
|
372
|
+
timeStamp: A,
|
|
373
373
|
stateKey: I,
|
|
374
374
|
path: o,
|
|
375
375
|
updateType: s.updateType,
|
|
376
376
|
status: "new",
|
|
377
377
|
oldValue: x,
|
|
378
|
-
newValue:
|
|
378
|
+
newValue: U
|
|
379
379
|
};
|
|
380
380
|
switch (s.updateType) {
|
|
381
381
|
case "update":
|
|
@@ -383,90 +383,90 @@ function Ye(e, {
|
|
|
383
383
|
break;
|
|
384
384
|
case "insert":
|
|
385
385
|
const M = o.slice(0, -1);
|
|
386
|
-
f.insertShadowArrayElement(I, M,
|
|
386
|
+
f.insertShadowArrayElement(I, M, U);
|
|
387
387
|
break;
|
|
388
388
|
case "cut":
|
|
389
|
-
const
|
|
390
|
-
f.removeShadowArrayElement(I,
|
|
389
|
+
const N = o.slice(0, -1), _ = parseInt(o[o.length - 1]);
|
|
390
|
+
f.removeShadowArrayElement(I, N, _);
|
|
391
391
|
break;
|
|
392
392
|
}
|
|
393
|
-
if (
|
|
394
|
-
const
|
|
395
|
-
const
|
|
396
|
-
return
|
|
393
|
+
if (ze(I, (M) => {
|
|
394
|
+
const _ = [...M ?? [], Y].reduce((j, w) => {
|
|
395
|
+
const R = `${w.stateKey}:${JSON.stringify(w.path)}`, V = j.get(R);
|
|
396
|
+
return V ? (V.timeStamp = Math.max(V.timeStamp, w.timeStamp), V.newValue = w.newValue, V.oldValue = V.oldValue ?? w.oldValue, V.updateType = w.updateType) : j.set(R, { ...w }), j;
|
|
397
397
|
}, /* @__PURE__ */ new Map());
|
|
398
|
-
return Array.from(
|
|
399
|
-
}),
|
|
398
|
+
return Array.from(_.values());
|
|
399
|
+
}), ke(
|
|
400
400
|
E,
|
|
401
401
|
I,
|
|
402
402
|
P.current,
|
|
403
|
-
|
|
403
|
+
L
|
|
404
404
|
), P.current?.middleware && P.current.middleware({
|
|
405
405
|
updateLog: l,
|
|
406
|
-
update:
|
|
406
|
+
update: Y
|
|
407
407
|
}), P.current?.serverSync) {
|
|
408
|
-
const M = f.serverState[I],
|
|
409
|
-
|
|
410
|
-
syncKey: typeof
|
|
408
|
+
const M = f.serverState[I], N = P.current?.serverSync;
|
|
409
|
+
Je(I, {
|
|
410
|
+
syncKey: typeof N.syncKey == "string" ? N.syncKey : N.syncKey({ state: E }),
|
|
411
411
|
rollBackState: M,
|
|
412
|
-
actionTimeStamp: Date.now() + (
|
|
412
|
+
actionTimeStamp: Date.now() + (N.debounce ?? 3e3),
|
|
413
413
|
status: "waiting"
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
416
|
return E;
|
|
417
417
|
});
|
|
418
418
|
};
|
|
419
|
-
r.getState().updaterState[I] || (
|
|
419
|
+
r.getState().updaterState[I] || (Se(
|
|
420
420
|
I,
|
|
421
|
-
|
|
421
|
+
me(
|
|
422
422
|
I,
|
|
423
423
|
ae,
|
|
424
424
|
ee.current,
|
|
425
|
-
|
|
425
|
+
L
|
|
426
426
|
)
|
|
427
|
-
), r.getState().cogsStateStore[I] ||
|
|
428
|
-
const d =
|
|
427
|
+
), r.getState().cogsStateStore[I] || ne(I, e), r.getState().initialStateGlobal[I] || _e(I, e));
|
|
428
|
+
const d = pe(() => me(
|
|
429
429
|
I,
|
|
430
430
|
ae,
|
|
431
431
|
ee.current,
|
|
432
|
-
|
|
433
|
-
), [I,
|
|
434
|
-
return [
|
|
432
|
+
L
|
|
433
|
+
), [I, L]);
|
|
434
|
+
return [Me(I), d];
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function me(e, i, m, g) {
|
|
437
437
|
const T = /* @__PURE__ */ new Map();
|
|
438
|
-
let
|
|
438
|
+
let C = 0;
|
|
439
439
|
const p = (h) => {
|
|
440
440
|
const n = h.join(".");
|
|
441
441
|
for (const [S] of T)
|
|
442
442
|
(S === n || S.startsWith(n + ".")) && T.delete(S);
|
|
443
|
-
|
|
443
|
+
C++;
|
|
444
444
|
}, v = {
|
|
445
445
|
removeValidation: (h) => {
|
|
446
|
-
h?.validationKey &&
|
|
446
|
+
h?.validationKey && X(h.validationKey);
|
|
447
447
|
},
|
|
448
448
|
revertToInitialState: (h) => {
|
|
449
449
|
const n = r.getState().getInitialOptions(e)?.validation;
|
|
450
|
-
n?.key &&
|
|
450
|
+
n?.key && X(n?.key), h?.validationKey && X(h.validationKey);
|
|
451
451
|
const S = r.getState().initialStateGlobal[e];
|
|
452
|
-
r.getState().clearSelectedIndexesForState(e), T.clear(),
|
|
453
|
-
const H = a(S, []),
|
|
454
|
-
F && localStorage.removeItem(F),
|
|
452
|
+
r.getState().clearSelectedIndexesForState(e), T.clear(), C++;
|
|
453
|
+
const H = a(S, []), G = re(e), L = K(G?.localStorage?.key) ? G?.localStorage?.key(S) : G?.localStorage?.key, F = `${g}-${e}-${L}`;
|
|
454
|
+
F && localStorage.removeItem(F), Se(e, H), ne(e, S);
|
|
455
455
|
const I = r.getState().stateComponents.get(e);
|
|
456
456
|
return I && I.components.forEach((l) => {
|
|
457
457
|
l.forceUpdate();
|
|
458
458
|
}), S;
|
|
459
459
|
},
|
|
460
460
|
updateInitialState: (h) => {
|
|
461
|
-
T.clear(),
|
|
462
|
-
const n =
|
|
461
|
+
T.clear(), C++;
|
|
462
|
+
const n = me(
|
|
463
463
|
e,
|
|
464
464
|
i,
|
|
465
465
|
m,
|
|
466
466
|
g
|
|
467
|
-
), S = r.getState().initialStateGlobal[e], H = re(e),
|
|
468
|
-
return localStorage.getItem(
|
|
469
|
-
|
|
467
|
+
), S = r.getState().initialStateGlobal[e], H = re(e), G = K(H?.localStorage?.key) ? H?.localStorage?.key(S) : H?.localStorage?.key, L = `${g}-${e}-${G}`;
|
|
468
|
+
return localStorage.getItem(L) && localStorage.removeItem(L), Le(() => {
|
|
469
|
+
_e(e, h), r.getState().initializeShadowState(e, h), Se(e, n), ne(e, h);
|
|
470
470
|
const F = r.getState().stateComponents.get(e);
|
|
471
471
|
F && F.components.forEach((I) => {
|
|
472
472
|
I.forceUpdate();
|
|
@@ -480,27 +480,27 @@ function Se(e, i, m, g) {
|
|
|
480
480
|
_isLoading: r.getState().isLoadingGlobal[e],
|
|
481
481
|
_isServerSynced: () => {
|
|
482
482
|
const h = r.getState().serverState[e];
|
|
483
|
-
return !!(h &&
|
|
483
|
+
return !!(h && q(h, Me(e)));
|
|
484
484
|
}
|
|
485
485
|
};
|
|
486
486
|
function a(h, n = [], S) {
|
|
487
487
|
const H = n.map(String).join(".");
|
|
488
488
|
T.get(H);
|
|
489
|
-
const
|
|
489
|
+
const G = function() {
|
|
490
490
|
return r().getNestedState(e, n);
|
|
491
491
|
};
|
|
492
492
|
Object.keys(v).forEach((I) => {
|
|
493
|
-
|
|
493
|
+
G[I] = v[I];
|
|
494
494
|
});
|
|
495
|
-
const
|
|
496
|
-
apply(I, l,
|
|
495
|
+
const L = {
|
|
496
|
+
apply(I, l, de) {
|
|
497
497
|
return console.log(
|
|
498
498
|
`PROXY APPLY TRAP HIT: stateKey=${e}, path=${n.join(".")}`
|
|
499
499
|
), console.trace("Apply trap stack trace"), r().getNestedState(e, n);
|
|
500
500
|
},
|
|
501
501
|
get(I, l) {
|
|
502
502
|
S?.validIndices && !Array.isArray(h) && (S = { ...S, validIndices: void 0 });
|
|
503
|
-
const
|
|
503
|
+
const de = /* @__PURE__ */ new Set([
|
|
504
504
|
"insert",
|
|
505
505
|
"cut",
|
|
506
506
|
"cutByValue",
|
|
@@ -523,7 +523,7 @@ function Se(e, i, m, g) {
|
|
|
523
523
|
"_stateKey",
|
|
524
524
|
"getComponents"
|
|
525
525
|
]);
|
|
526
|
-
if (l !== "then" && !l.startsWith("$") && l !== "stateMapNoRender" && !
|
|
526
|
+
if (l !== "then" && !l.startsWith("$") && l !== "stateMapNoRender" && !de.has(l)) {
|
|
527
527
|
const d = `${e}////${m}`, t = r.getState().stateComponents.get(e);
|
|
528
528
|
if (t) {
|
|
529
529
|
const o = t.components.get(d);
|
|
@@ -540,7 +540,7 @@ function Se(e, i, m, g) {
|
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
if (l === "getDifferences")
|
|
543
|
-
return () =>
|
|
543
|
+
return () => Ee(
|
|
544
544
|
r.getState().cogsStateStore[e],
|
|
545
545
|
r.getState().initialStateGlobal[e]
|
|
546
546
|
);
|
|
@@ -568,20 +568,20 @@ function Se(e, i, m, g) {
|
|
|
568
568
|
}
|
|
569
569
|
};
|
|
570
570
|
if (l === "_status") {
|
|
571
|
-
const d = r.getState().getNestedState(e, n), t = r.getState().initialStateGlobal[e], o =
|
|
572
|
-
return
|
|
571
|
+
const d = r.getState().getNestedState(e, n), t = r.getState().initialStateGlobal[e], o = J(t, n);
|
|
572
|
+
return q(d, o) ? "fresh" : "stale";
|
|
573
573
|
}
|
|
574
574
|
if (l === "getStatus")
|
|
575
575
|
return function() {
|
|
576
576
|
const d = r().getNestedState(
|
|
577
577
|
e,
|
|
578
578
|
n
|
|
579
|
-
), t = r.getState().initialStateGlobal[e], o =
|
|
580
|
-
return
|
|
579
|
+
), t = r.getState().initialStateGlobal[e], o = J(t, n);
|
|
580
|
+
return q(d, o) ? "fresh" : "stale";
|
|
581
581
|
};
|
|
582
582
|
if (l === "removeStorage")
|
|
583
583
|
return () => {
|
|
584
|
-
const d = r.getState().initialStateGlobal[e], t = re(e), o =
|
|
584
|
+
const d = r.getState().initialStateGlobal[e], t = re(e), o = K(t?.localStorage?.key) ? t?.localStorage?.key(d) : t?.localStorage?.key, s = `${g}-${e}-${o}`;
|
|
585
585
|
s && localStorage.removeItem(s);
|
|
586
586
|
};
|
|
587
587
|
if (l === "showValidationErrors")
|
|
@@ -622,157 +622,157 @@ function Se(e, i, m, g) {
|
|
|
622
622
|
overscan: s = 6,
|
|
623
623
|
stickToBottom: c = !1,
|
|
624
624
|
dependencies: f = []
|
|
625
|
-
} = t, u =
|
|
625
|
+
} = t, u = Z(!1), E = Z(null), [y, O] = Q({
|
|
626
626
|
startIndex: 0,
|
|
627
627
|
endIndex: 10
|
|
628
|
-
}), [
|
|
628
|
+
}), [k, A] = Q("IDLE_AT_TOP"), x = Z(0), U = Z(f), [Y, M] = Q(0);
|
|
629
629
|
oe(() => r.getState().subscribeToShadowState(e, () => {
|
|
630
|
-
|
|
630
|
+
M((b) => b + 1);
|
|
631
631
|
}), [e]);
|
|
632
|
-
const
|
|
632
|
+
const N = r().getNestedState(
|
|
633
633
|
e,
|
|
634
634
|
n
|
|
635
|
-
),
|
|
636
|
-
const
|
|
637
|
-
let
|
|
638
|
-
const
|
|
639
|
-
for (let
|
|
640
|
-
|
|
641
|
-
const
|
|
642
|
-
|
|
635
|
+
), _ = N.length, { totalHeight: j, positions: w } = pe(() => {
|
|
636
|
+
const $ = r.getState().getShadowMetadata(e, n) || [];
|
|
637
|
+
let b = 0;
|
|
638
|
+
const z = [];
|
|
639
|
+
for (let B = 0; B < _; B++) {
|
|
640
|
+
z[B] = b;
|
|
641
|
+
const te = $[B]?.virtualizer?.itemHeight;
|
|
642
|
+
b += te || o;
|
|
643
643
|
}
|
|
644
|
-
return { totalHeight:
|
|
644
|
+
return { totalHeight: b, positions: z };
|
|
645
645
|
}, [
|
|
646
|
-
|
|
646
|
+
_,
|
|
647
647
|
e,
|
|
648
648
|
n.join("."),
|
|
649
649
|
o,
|
|
650
|
-
|
|
651
|
-
]),
|
|
652
|
-
const
|
|
653
|
-
{ length:
|
|
654
|
-
(
|
|
655
|
-
),
|
|
656
|
-
return a(
|
|
650
|
+
Y
|
|
651
|
+
]), R = pe(() => {
|
|
652
|
+
const $ = Math.max(0, y.startIndex), b = Math.min(_, y.endIndex), z = Array.from(
|
|
653
|
+
{ length: b - $ },
|
|
654
|
+
(te, se) => $ + se
|
|
655
|
+
), B = z.map((te) => N[te]);
|
|
656
|
+
return a(B, n, {
|
|
657
657
|
...S,
|
|
658
|
-
validIndices:
|
|
658
|
+
validIndices: z
|
|
659
659
|
});
|
|
660
|
-
}, [
|
|
661
|
-
|
|
662
|
-
const
|
|
660
|
+
}, [y.startIndex, y.endIndex, N, _]);
|
|
661
|
+
ce(() => {
|
|
662
|
+
const $ = !q(
|
|
663
663
|
f,
|
|
664
|
-
|
|
665
|
-
),
|
|
666
|
-
if (
|
|
667
|
-
console.log("TRANSITION: Deps changed -> IDLE_AT_TOP"),
|
|
664
|
+
U.current
|
|
665
|
+
), b = _ > x.current;
|
|
666
|
+
if ($) {
|
|
667
|
+
console.log("TRANSITION: Deps changed -> IDLE_AT_TOP"), A("IDLE_AT_TOP");
|
|
668
668
|
return;
|
|
669
669
|
}
|
|
670
|
-
|
|
670
|
+
b && k === "LOCKED_AT_BOTTOM" && c && (console.log(
|
|
671
671
|
"TRANSITION: New items arrived while locked -> GETTING_HEIGHTS"
|
|
672
|
-
),
|
|
673
|
-
}, [
|
|
674
|
-
const
|
|
675
|
-
if (
|
|
676
|
-
let
|
|
677
|
-
if (
|
|
672
|
+
), A("GETTING_HEIGHTS")), x.current = _, U.current = f;
|
|
673
|
+
}, [_, ...f]), ce(() => {
|
|
674
|
+
const $ = E.current;
|
|
675
|
+
if (!$) return;
|
|
676
|
+
let b;
|
|
677
|
+
if (k === "IDLE_AT_TOP" && c && _ > 0)
|
|
678
678
|
console.log(
|
|
679
679
|
"ACTION (IDLE_AT_TOP): Data has arrived -> GETTING_HEIGHTS"
|
|
680
|
-
),
|
|
681
|
-
else if (
|
|
680
|
+
), A("GETTING_HEIGHTS");
|
|
681
|
+
else if (k === "GETTING_HEIGHTS")
|
|
682
682
|
console.log(
|
|
683
683
|
"ACTION (GETTING_HEIGHTS): Setting range to end and starting loop."
|
|
684
|
-
),
|
|
685
|
-
startIndex: Math.max(0,
|
|
686
|
-
endIndex:
|
|
687
|
-
}),
|
|
688
|
-
const
|
|
689
|
-
((r.getState().getShadowMetadata(e, n) || [])[
|
|
684
|
+
), O({
|
|
685
|
+
startIndex: Math.max(0, _ - 10 - s),
|
|
686
|
+
endIndex: _
|
|
687
|
+
}), b = setInterval(() => {
|
|
688
|
+
const z = _ - 1;
|
|
689
|
+
((r.getState().getShadowMetadata(e, n) || [])[z]?.virtualizer?.itemHeight || 0) > 0 && (clearInterval(b), u.current || (console.log(
|
|
690
690
|
"ACTION (GETTING_HEIGHTS): Measurement success -> SCROLLING_TO_BOTTOM"
|
|
691
|
-
),
|
|
691
|
+
), A("SCROLLING_TO_BOTTOM")));
|
|
692
692
|
}, 100);
|
|
693
|
-
else if (
|
|
693
|
+
else if (k === "SCROLLING_TO_BOTTOM") {
|
|
694
694
|
console.log(
|
|
695
695
|
"ACTION (SCROLLING_TO_BOTTOM): Executing scroll."
|
|
696
696
|
);
|
|
697
|
-
const
|
|
698
|
-
|
|
699
|
-
top:
|
|
700
|
-
behavior:
|
|
697
|
+
const z = x.current === 0 ? "auto" : "smooth";
|
|
698
|
+
$.scrollTo({
|
|
699
|
+
top: $.scrollHeight,
|
|
700
|
+
behavior: z
|
|
701
701
|
});
|
|
702
|
-
const
|
|
702
|
+
const B = setTimeout(
|
|
703
703
|
() => {
|
|
704
704
|
console.log(
|
|
705
705
|
"ACTION (SCROLLING_TO_BOTTOM): Scroll finished -> LOCKED_AT_BOTTOM"
|
|
706
|
-
),
|
|
706
|
+
), u.current = !1, A("LOCKED_AT_BOTTOM");
|
|
707
707
|
},
|
|
708
|
-
|
|
708
|
+
z === "smooth" ? 500 : 50
|
|
709
709
|
);
|
|
710
|
-
return () => clearTimeout(
|
|
710
|
+
return () => clearTimeout(B);
|
|
711
711
|
}
|
|
712
712
|
return () => {
|
|
713
|
-
|
|
713
|
+
b && clearInterval(b);
|
|
714
714
|
};
|
|
715
|
-
}, [
|
|
716
|
-
const
|
|
717
|
-
if (
|
|
718
|
-
const
|
|
719
|
-
|
|
715
|
+
}, [k, _, w]), oe(() => {
|
|
716
|
+
const $ = E.current;
|
|
717
|
+
if (!$) return;
|
|
718
|
+
const b = () => {
|
|
719
|
+
$.scrollHeight - $.scrollTop - $.clientHeight < 1 ? u.current = !1 : (console.log(
|
|
720
720
|
"USER ACTION: Scrolled up -> IDLE_NOT_AT_BOTTOM"
|
|
721
|
-
),
|
|
722
|
-
const { scrollTop:
|
|
723
|
-
let
|
|
724
|
-
for (;
|
|
725
|
-
const
|
|
726
|
-
|
|
721
|
+
), A("IDLE_NOT_AT_BOTTOM"));
|
|
722
|
+
const { scrollTop: B, clientHeight: te } = $;
|
|
723
|
+
let se = 0, ue = _ - 1;
|
|
724
|
+
for (; se <= ue; ) {
|
|
725
|
+
const Te = Math.floor((se + ue) / 2);
|
|
726
|
+
w[Te] < B ? se = Te + 1 : ue = Te - 1;
|
|
727
727
|
}
|
|
728
|
-
const
|
|
729
|
-
let
|
|
730
|
-
const
|
|
731
|
-
for (;
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
startIndex:
|
|
735
|
-
endIndex: Math.min(
|
|
728
|
+
const Oe = Math.max(0, ue - s);
|
|
729
|
+
let ge = Oe;
|
|
730
|
+
const Ve = B + te;
|
|
731
|
+
for (; ge < _ && w[ge] < Ve; )
|
|
732
|
+
ge++;
|
|
733
|
+
O({
|
|
734
|
+
startIndex: Oe,
|
|
735
|
+
endIndex: Math.min(_, ge + s)
|
|
736
736
|
});
|
|
737
737
|
};
|
|
738
|
-
return
|
|
738
|
+
return $.addEventListener("scroll", b, {
|
|
739
739
|
passive: !0
|
|
740
|
-
}), () =>
|
|
741
|
-
}, [
|
|
742
|
-
const
|
|
740
|
+
}), () => $.removeEventListener("scroll", b);
|
|
741
|
+
}, [_, w, k]);
|
|
742
|
+
const V = Ae(() => {
|
|
743
743
|
console.log(
|
|
744
744
|
"USER ACTION: Clicked scroll button -> SCROLLING_TO_BOTTOM"
|
|
745
|
-
),
|
|
746
|
-
}, []),
|
|
747
|
-
(
|
|
748
|
-
|
|
749
|
-
top:
|
|
750
|
-
behavior:
|
|
745
|
+
), A("SCROLLING_TO_BOTTOM");
|
|
746
|
+
}, []), W = Ae(
|
|
747
|
+
($, b = "smooth") => {
|
|
748
|
+
E.current && w[$] !== void 0 && (A("IDLE_NOT_AT_BOTTOM"), E.current.scrollTo({
|
|
749
|
+
top: w[$],
|
|
750
|
+
behavior: b
|
|
751
751
|
}));
|
|
752
752
|
},
|
|
753
|
-
[
|
|
754
|
-
),
|
|
753
|
+
[w]
|
|
754
|
+
), D = {
|
|
755
755
|
outer: {
|
|
756
|
-
ref:
|
|
756
|
+
ref: E,
|
|
757
757
|
style: { overflowY: "auto", height: "100%" }
|
|
758
758
|
},
|
|
759
759
|
inner: {
|
|
760
760
|
style: {
|
|
761
|
-
height: `${
|
|
761
|
+
height: `${j}px`,
|
|
762
762
|
position: "relative"
|
|
763
763
|
}
|
|
764
764
|
},
|
|
765
765
|
list: {
|
|
766
766
|
style: {
|
|
767
|
-
transform: `translateY(${
|
|
767
|
+
transform: `translateY(${w[y.startIndex] || 0}px)`
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
770
|
};
|
|
771
771
|
return {
|
|
772
|
-
virtualState:
|
|
773
|
-
virtualizerProps:
|
|
774
|
-
scrollToBottom:
|
|
775
|
-
scrollToIndex:
|
|
772
|
+
virtualState: R,
|
|
773
|
+
virtualizerProps: D,
|
|
774
|
+
scrollToBottom: V,
|
|
775
|
+
scrollToIndex: W
|
|
776
776
|
};
|
|
777
777
|
};
|
|
778
778
|
if (l === "stateSort")
|
|
@@ -803,22 +803,22 @@ function Se(e, i, m, g) {
|
|
|
803
803
|
return (t) => {
|
|
804
804
|
const o = r.getState().getNestedState(e, n);
|
|
805
805
|
return Array.isArray(o) ? (S?.validIndices || Array.from({ length: o.length }, (c, f) => f)).map((c, f) => {
|
|
806
|
-
const u = o[c], E = [...n, c.toString()],
|
|
807
|
-
return t(u,
|
|
806
|
+
const u = o[c], E = [...n, c.toString()], y = a(u, E, S);
|
|
807
|
+
return t(u, y, {
|
|
808
808
|
register: () => {
|
|
809
|
-
const [,
|
|
810
|
-
|
|
811
|
-
const x = `${e}////${
|
|
809
|
+
const [, k] = Q({}), A = `${m}-${n.join(".")}-${c}`;
|
|
810
|
+
ce(() => {
|
|
811
|
+
const x = `${e}////${A}`, U = r.getState().stateComponents.get(e) || {
|
|
812
812
|
components: /* @__PURE__ */ new Map()
|
|
813
813
|
};
|
|
814
|
-
return
|
|
815
|
-
forceUpdate: () =>
|
|
814
|
+
return U.components.set(x, {
|
|
815
|
+
forceUpdate: () => k({}),
|
|
816
816
|
paths: /* @__PURE__ */ new Set([E.join(".")])
|
|
817
|
-
}), r.getState().stateComponents.set(e,
|
|
818
|
-
const
|
|
819
|
-
|
|
817
|
+
}), r.getState().stateComponents.set(e, U), () => {
|
|
818
|
+
const Y = r.getState().stateComponents.get(e);
|
|
819
|
+
Y && Y.components.delete(x);
|
|
820
820
|
};
|
|
821
|
-
}, [e,
|
|
821
|
+
}, [e, A]);
|
|
822
822
|
},
|
|
823
823
|
index: f,
|
|
824
824
|
originalIndex: c
|
|
@@ -842,7 +842,7 @@ function Se(e, i, m, g) {
|
|
|
842
842
|
);
|
|
843
843
|
});
|
|
844
844
|
if (l === "$stateMap")
|
|
845
|
-
return (t) =>
|
|
845
|
+
return (t) => le(Qe, {
|
|
846
846
|
proxy: {
|
|
847
847
|
_stateKey: e,
|
|
848
848
|
_path: n,
|
|
@@ -855,15 +855,15 @@ function Se(e, i, m, g) {
|
|
|
855
855
|
return (t) => {
|
|
856
856
|
const o = r.getState().getNestedState(e, n);
|
|
857
857
|
return Array.isArray(o) ? (S?.validIndices || Array.from({ length: o.length }, (c, f) => f)).map((c, f) => {
|
|
858
|
-
const u = o[c], E = [...n, c.toString()],
|
|
859
|
-
return
|
|
858
|
+
const u = o[c], E = [...n, c.toString()], y = a(u, E, S), O = `${m}-${n.join(".")}-${c}`;
|
|
859
|
+
return le(et, {
|
|
860
860
|
key: c,
|
|
861
861
|
stateKey: e,
|
|
862
|
-
itemComponentId:
|
|
862
|
+
itemComponentId: O,
|
|
863
863
|
itemPath: E,
|
|
864
864
|
children: t(
|
|
865
865
|
u,
|
|
866
|
-
|
|
866
|
+
y,
|
|
867
867
|
f,
|
|
868
868
|
o,
|
|
869
869
|
a(o, n, S)
|
|
@@ -876,7 +876,7 @@ function Se(e, i, m, g) {
|
|
|
876
876
|
if (l === "stateFlattenOn")
|
|
877
877
|
return (t) => {
|
|
878
878
|
const o = h;
|
|
879
|
-
T.clear(),
|
|
879
|
+
T.clear(), C++;
|
|
880
880
|
const s = o.flatMap(
|
|
881
881
|
(c) => c[t] ?? []
|
|
882
882
|
);
|
|
@@ -899,36 +899,36 @@ function Se(e, i, m, g) {
|
|
|
899
899
|
return a(s, c);
|
|
900
900
|
};
|
|
901
901
|
if (l === "insert")
|
|
902
|
-
return (t) => (p(n),
|
|
902
|
+
return (t) => (p(n), ve(i, t, n, e), a(
|
|
903
903
|
r.getState().getNestedState(e, n),
|
|
904
904
|
n
|
|
905
905
|
));
|
|
906
906
|
if (l === "uniqueInsert")
|
|
907
907
|
return (t, o, s) => {
|
|
908
|
-
const c = r.getState().getNestedState(e, n), f =
|
|
908
|
+
const c = r.getState().getNestedState(e, n), f = K(t) ? t(c) : t;
|
|
909
909
|
let u = null;
|
|
910
|
-
if (!c.some((
|
|
910
|
+
if (!c.some((y) => {
|
|
911
911
|
if (o) {
|
|
912
|
-
const
|
|
913
|
-
(
|
|
912
|
+
const k = o.every(
|
|
913
|
+
(A) => q(y[A], f[A])
|
|
914
914
|
);
|
|
915
|
-
return
|
|
915
|
+
return k && (u = y), k;
|
|
916
916
|
}
|
|
917
|
-
const
|
|
918
|
-
return
|
|
917
|
+
const O = q(y, f);
|
|
918
|
+
return O && (u = y), O;
|
|
919
919
|
}))
|
|
920
|
-
p(n),
|
|
920
|
+
p(n), ve(i, f, n, e);
|
|
921
921
|
else if (s && u) {
|
|
922
|
-
const
|
|
923
|
-
(
|
|
922
|
+
const y = s(u), O = c.map(
|
|
923
|
+
(k) => q(k, u) ? y : k
|
|
924
924
|
);
|
|
925
|
-
p(n),
|
|
925
|
+
p(n), ie(i, O, n);
|
|
926
926
|
}
|
|
927
927
|
};
|
|
928
928
|
if (l === "cut")
|
|
929
929
|
return (t, o) => {
|
|
930
930
|
if (!o?.waitForSync)
|
|
931
|
-
return p(n),
|
|
931
|
+
return p(n), fe(i, n, e, t), a(
|
|
932
932
|
r.getState().getNestedState(e, n),
|
|
933
933
|
n
|
|
934
934
|
);
|
|
@@ -936,12 +936,12 @@ function Se(e, i, m, g) {
|
|
|
936
936
|
if (l === "cutByValue")
|
|
937
937
|
return (t) => {
|
|
938
938
|
for (let o = 0; o < h.length; o++)
|
|
939
|
-
h[o] === t &&
|
|
939
|
+
h[o] === t && fe(i, n, e, o);
|
|
940
940
|
};
|
|
941
941
|
if (l === "toggleByValue")
|
|
942
942
|
return (t) => {
|
|
943
943
|
const o = h.findIndex((s) => s === t);
|
|
944
|
-
o > -1 ?
|
|
944
|
+
o > -1 ? fe(i, n, e, o) : ve(i, t, n, e);
|
|
945
945
|
};
|
|
946
946
|
if (l === "stateFind")
|
|
947
947
|
return (t) => {
|
|
@@ -966,7 +966,7 @@ function Se(e, i, m, g) {
|
|
|
966
966
|
if (!isNaN(Number(ee))) {
|
|
967
967
|
const d = n.slice(0, -1), t = r.getState().getNestedState(e, d);
|
|
968
968
|
if (Array.isArray(t) && l === "cut")
|
|
969
|
-
return () =>
|
|
969
|
+
return () => fe(
|
|
970
970
|
i,
|
|
971
971
|
d,
|
|
972
972
|
e,
|
|
@@ -982,13 +982,13 @@ function Se(e, i, m, g) {
|
|
|
982
982
|
return r.getState().getNestedState(e, n);
|
|
983
983
|
};
|
|
984
984
|
if (l === "$derive")
|
|
985
|
-
return (d) =>
|
|
985
|
+
return (d) => be({
|
|
986
986
|
_stateKey: e,
|
|
987
987
|
_path: n,
|
|
988
988
|
_effect: d.toString()
|
|
989
989
|
});
|
|
990
990
|
if (l === "$get")
|
|
991
|
-
return () =>
|
|
991
|
+
return () => be({
|
|
992
992
|
_stateKey: e,
|
|
993
993
|
_path: n
|
|
994
994
|
});
|
|
@@ -997,7 +997,7 @@ function Se(e, i, m, g) {
|
|
|
997
997
|
return r.getState().getSyncInfo(d);
|
|
998
998
|
}
|
|
999
999
|
if (l == "getLocalStorage")
|
|
1000
|
-
return (d) =>
|
|
1000
|
+
return (d) => Ie(g + "-" + e + "-" + d);
|
|
1001
1001
|
if (l === "_selected") {
|
|
1002
1002
|
const d = n.slice(0, -1), t = d.join("."), o = r.getState().getNestedState(e, d);
|
|
1003
1003
|
return Array.isArray(o) ? Number(n[n.length - 1]) === r.getState().getSelectedIndex(e, t) : void 0;
|
|
@@ -1007,7 +1007,7 @@ function Se(e, i, m, g) {
|
|
|
1007
1007
|
const t = n.slice(0, -1), o = Number(n[n.length - 1]), s = t.join(".");
|
|
1008
1008
|
d ? r.getState().setSelectedIndex(e, s, o) : r.getState().setSelectedIndex(e, s, void 0);
|
|
1009
1009
|
const c = r.getState().getNestedState(e, [...t]);
|
|
1010
|
-
|
|
1010
|
+
ie(i, c, t), p(t);
|
|
1011
1011
|
};
|
|
1012
1012
|
if (l === "toggleSelected")
|
|
1013
1013
|
return () => {
|
|
@@ -1018,13 +1018,13 @@ function Se(e, i, m, g) {
|
|
|
1018
1018
|
s === t ? void 0 : t
|
|
1019
1019
|
);
|
|
1020
1020
|
const c = r.getState().getNestedState(e, [...d]);
|
|
1021
|
-
|
|
1021
|
+
ie(i, c, d), p(d);
|
|
1022
1022
|
};
|
|
1023
1023
|
if (n.length == 0) {
|
|
1024
1024
|
if (l === "applyJsonPatch")
|
|
1025
1025
|
return (d) => {
|
|
1026
|
-
const t = r.getState().cogsStateStore[e], s =
|
|
1027
|
-
|
|
1026
|
+
const t = r.getState().cogsStateStore[e], s = Fe(t, d).newDocument;
|
|
1027
|
+
Pe(
|
|
1028
1028
|
e,
|
|
1029
1029
|
r.getState().initialStateGlobal[e],
|
|
1030
1030
|
s,
|
|
@@ -1034,57 +1034,57 @@ function Se(e, i, m, g) {
|
|
|
1034
1034
|
);
|
|
1035
1035
|
const c = r.getState().stateComponents.get(e);
|
|
1036
1036
|
if (c) {
|
|
1037
|
-
const f =
|
|
1037
|
+
const f = Ee(t, s), u = new Set(f);
|
|
1038
1038
|
for (const [
|
|
1039
1039
|
E,
|
|
1040
|
-
|
|
1040
|
+
y
|
|
1041
1041
|
] of c.components.entries()) {
|
|
1042
|
-
let
|
|
1043
|
-
const
|
|
1044
|
-
if (!
|
|
1045
|
-
if (
|
|
1046
|
-
|
|
1042
|
+
let O = !1;
|
|
1043
|
+
const k = Array.isArray(y.reactiveType) ? y.reactiveType : [y.reactiveType || "component"];
|
|
1044
|
+
if (!k.includes("none")) {
|
|
1045
|
+
if (k.includes("all")) {
|
|
1046
|
+
y.forceUpdate();
|
|
1047
1047
|
continue;
|
|
1048
1048
|
}
|
|
1049
|
-
if (
|
|
1050
|
-
for (const
|
|
1051
|
-
if (
|
|
1052
|
-
|
|
1049
|
+
if (k.includes("component") && (y.paths.has("") && (O = !0), !O))
|
|
1050
|
+
for (const A of u) {
|
|
1051
|
+
if (y.paths.has(A)) {
|
|
1052
|
+
O = !0;
|
|
1053
1053
|
break;
|
|
1054
1054
|
}
|
|
1055
|
-
let x =
|
|
1055
|
+
let x = A.lastIndexOf(".");
|
|
1056
1056
|
for (; x !== -1; ) {
|
|
1057
|
-
const
|
|
1058
|
-
if (
|
|
1059
|
-
|
|
1057
|
+
const U = A.substring(0, x);
|
|
1058
|
+
if (y.paths.has(U)) {
|
|
1059
|
+
O = !0;
|
|
1060
1060
|
break;
|
|
1061
1061
|
}
|
|
1062
|
-
const
|
|
1062
|
+
const Y = A.substring(
|
|
1063
1063
|
x + 1
|
|
1064
1064
|
);
|
|
1065
|
-
if (!isNaN(Number(
|
|
1066
|
-
const M =
|
|
1065
|
+
if (!isNaN(Number(Y))) {
|
|
1066
|
+
const M = U.lastIndexOf(".");
|
|
1067
1067
|
if (M !== -1) {
|
|
1068
|
-
const
|
|
1068
|
+
const N = U.substring(
|
|
1069
1069
|
0,
|
|
1070
1070
|
M
|
|
1071
1071
|
);
|
|
1072
|
-
if (
|
|
1073
|
-
|
|
1072
|
+
if (y.paths.has(N)) {
|
|
1073
|
+
O = !0;
|
|
1074
1074
|
break;
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
|
-
x =
|
|
1078
|
+
x = U.lastIndexOf(".");
|
|
1079
1079
|
}
|
|
1080
|
-
if (
|
|
1080
|
+
if (O) break;
|
|
1081
1081
|
}
|
|
1082
|
-
if (!
|
|
1083
|
-
const
|
|
1082
|
+
if (!O && k.includes("deps") && y.depsFunction) {
|
|
1083
|
+
const A = y.depsFunction(s);
|
|
1084
1084
|
let x = !1;
|
|
1085
|
-
typeof
|
|
1085
|
+
typeof A == "boolean" ? A && (x = !0) : q(y.deps, A) || (y.deps = A, x = !0), x && (O = !0);
|
|
1086
1086
|
}
|
|
1087
|
-
|
|
1087
|
+
O && y.forceUpdate();
|
|
1088
1088
|
}
|
|
1089
1089
|
}
|
|
1090
1090
|
}
|
|
@@ -1096,18 +1096,18 @@ function Se(e, i, m, g) {
|
|
|
1096
1096
|
throw new Error("Zod schema not found");
|
|
1097
1097
|
if (!d?.key)
|
|
1098
1098
|
throw new Error("Validation key not found");
|
|
1099
|
-
|
|
1099
|
+
X(d.key);
|
|
1100
1100
|
const o = r.getState().cogsStateStore[e];
|
|
1101
1101
|
try {
|
|
1102
1102
|
const s = r.getState().getValidationErrors(d.key);
|
|
1103
1103
|
s && s.length > 0 && s.forEach(([f]) => {
|
|
1104
|
-
f && f.startsWith(d.key) &&
|
|
1104
|
+
f && f.startsWith(d.key) && X(f);
|
|
1105
1105
|
});
|
|
1106
1106
|
const c = d.zodSchema.safeParse(o);
|
|
1107
1107
|
return c.success ? !0 : (c.error.errors.forEach((u) => {
|
|
1108
|
-
const E = u.path,
|
|
1109
|
-
t(
|
|
1110
|
-
}),
|
|
1108
|
+
const E = u.path, y = u.message, O = [d.key, ...E].join(".");
|
|
1109
|
+
t(O, y);
|
|
1110
|
+
}), he(e), !1);
|
|
1111
1111
|
} catch (s) {
|
|
1112
1112
|
return console.error("Zod schema validation failed", s), !1;
|
|
1113
1113
|
}
|
|
@@ -1116,7 +1116,7 @@ function Se(e, i, m, g) {
|
|
|
1116
1116
|
if (l === "getComponents")
|
|
1117
1117
|
return () => r().stateComponents.get(e);
|
|
1118
1118
|
if (l === "getAllFormRefs")
|
|
1119
|
-
return () =>
|
|
1119
|
+
return () => Ne.getState().getFormRefsByStateKey(e);
|
|
1120
1120
|
if (l === "_initialState")
|
|
1121
1121
|
return r.getState().initialStateGlobal[e];
|
|
1122
1122
|
if (l === "_serverState")
|
|
@@ -1129,13 +1129,13 @@ function Se(e, i, m, g) {
|
|
|
1129
1129
|
if (l === "removeValidation") return v.removeValidation;
|
|
1130
1130
|
}
|
|
1131
1131
|
if (l === "getFormRef")
|
|
1132
|
-
return () =>
|
|
1132
|
+
return () => Ne.getState().getFormRef(e + "." + n.join("."));
|
|
1133
1133
|
if (l === "validationWrapper")
|
|
1134
1134
|
return ({
|
|
1135
1135
|
children: d,
|
|
1136
1136
|
hideMessage: t
|
|
1137
|
-
}) => /* @__PURE__ */
|
|
1138
|
-
|
|
1137
|
+
}) => /* @__PURE__ */ ye(
|
|
1138
|
+
Ue,
|
|
1139
1139
|
{
|
|
1140
1140
|
formOpts: t ? { validation: { message: "" } } : void 0,
|
|
1141
1141
|
path: n,
|
|
@@ -1151,21 +1151,21 @@ function Se(e, i, m, g) {
|
|
|
1151
1151
|
if (l === "update")
|
|
1152
1152
|
return (d, t) => {
|
|
1153
1153
|
if (t?.debounce)
|
|
1154
|
-
|
|
1155
|
-
|
|
1154
|
+
De(() => {
|
|
1155
|
+
ie(i, d, n, "");
|
|
1156
1156
|
const o = r.getState().getNestedState(e, n);
|
|
1157
1157
|
t?.afterUpdate && t.afterUpdate(o);
|
|
1158
1158
|
}, t.debounce);
|
|
1159
1159
|
else {
|
|
1160
|
-
|
|
1160
|
+
ie(i, d, n, "");
|
|
1161
1161
|
const o = r.getState().getNestedState(e, n);
|
|
1162
1162
|
t?.afterUpdate && t.afterUpdate(o);
|
|
1163
1163
|
}
|
|
1164
1164
|
p(n);
|
|
1165
1165
|
};
|
|
1166
1166
|
if (l === "formElement")
|
|
1167
|
-
return (d, t) => /* @__PURE__ */
|
|
1168
|
-
|
|
1167
|
+
return (d, t) => /* @__PURE__ */ ye(
|
|
1168
|
+
je,
|
|
1169
1169
|
{
|
|
1170
1170
|
setState: i,
|
|
1171
1171
|
stateKey: e,
|
|
@@ -1177,20 +1177,20 @@ function Se(e, i, m, g) {
|
|
|
1177
1177
|
const P = [...n, l], ae = r.getState().getNestedState(e, P);
|
|
1178
1178
|
return a(ae, P, S);
|
|
1179
1179
|
}
|
|
1180
|
-
}, F = new Proxy(
|
|
1180
|
+
}, F = new Proxy(G, L);
|
|
1181
1181
|
return T.set(H, {
|
|
1182
1182
|
proxy: F,
|
|
1183
|
-
stateVersion:
|
|
1183
|
+
stateVersion: C
|
|
1184
1184
|
}), F;
|
|
1185
1185
|
}
|
|
1186
1186
|
return a(
|
|
1187
1187
|
r.getState().getNestedState(e, [])
|
|
1188
1188
|
);
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1191
|
-
return
|
|
1190
|
+
function be(e) {
|
|
1191
|
+
return le(Ke, { proxy: e });
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function Qe({
|
|
1194
1194
|
proxy: e,
|
|
1195
1195
|
rebuildStateShape: i
|
|
1196
1196
|
}) {
|
|
@@ -1199,13 +1199,13 @@ function Ze({
|
|
|
1199
1199
|
m,
|
|
1200
1200
|
e._path
|
|
1201
1201
|
).stateMapNoRender(
|
|
1202
|
-
(T,
|
|
1202
|
+
(T, C, p, v, a) => e._mapFn(T, C, p, v, a)
|
|
1203
1203
|
) : null;
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function Ke({
|
|
1206
1206
|
proxy: e
|
|
1207
1207
|
}) {
|
|
1208
|
-
const i =
|
|
1208
|
+
const i = Z(null), m = `${e._stateKey}-${e._path.join(".")}`;
|
|
1209
1209
|
return oe(() => {
|
|
1210
1210
|
const g = i.current;
|
|
1211
1211
|
if (!g || !g.parentElement) return;
|
|
@@ -1227,22 +1227,22 @@ function Xe({
|
|
|
1227
1227
|
"state",
|
|
1228
1228
|
`return (${e._effect})(state)`
|
|
1229
1229
|
)(n);
|
|
1230
|
-
} catch (
|
|
1231
|
-
console.error("Error evaluating effect function during mount:",
|
|
1230
|
+
} catch (G) {
|
|
1231
|
+
console.error("Error evaluating effect function during mount:", G), S = n;
|
|
1232
1232
|
}
|
|
1233
1233
|
else
|
|
1234
1234
|
S = n;
|
|
1235
1235
|
S !== null && typeof S == "object" && (S = JSON.stringify(S));
|
|
1236
1236
|
const H = document.createTextNode(String(S));
|
|
1237
1237
|
g.replaceWith(H);
|
|
1238
|
-
}, [e._stateKey, e._path.join("."), e._effect]),
|
|
1238
|
+
}, [e._stateKey, e._path.join("."), e._effect]), le("span", {
|
|
1239
1239
|
ref: i,
|
|
1240
1240
|
style: { display: "none" },
|
|
1241
1241
|
"data-signal-id": m
|
|
1242
1242
|
});
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1245
|
-
const i =
|
|
1244
|
+
function mt(e) {
|
|
1245
|
+
const i = Ge(
|
|
1246
1246
|
(m) => {
|
|
1247
1247
|
const g = r.getState().stateComponents.get(e._stateKey) || {
|
|
1248
1248
|
components: /* @__PURE__ */ new Map()
|
|
@@ -1254,22 +1254,22 @@ function ft(e) {
|
|
|
1254
1254
|
},
|
|
1255
1255
|
() => r.getState().getNestedState(e._stateKey, e._path)
|
|
1256
1256
|
);
|
|
1257
|
-
return
|
|
1257
|
+
return le("text", {}, String(i));
|
|
1258
1258
|
}
|
|
1259
|
-
function
|
|
1259
|
+
function et({
|
|
1260
1260
|
stateKey: e,
|
|
1261
1261
|
itemComponentId: i,
|
|
1262
1262
|
itemPath: m,
|
|
1263
1263
|
children: g
|
|
1264
1264
|
}) {
|
|
1265
|
-
const [, T] =
|
|
1265
|
+
const [, T] = Q({}), [C, p] = Be(), v = Z(null);
|
|
1266
1266
|
return oe(() => {
|
|
1267
1267
|
p.height > 0 && p.height !== v.current && (v.current = p.height, r.getState().setShadowMetadata(e, m, {
|
|
1268
1268
|
virtualizer: {
|
|
1269
1269
|
itemHeight: p.height
|
|
1270
1270
|
}
|
|
1271
1271
|
}));
|
|
1272
|
-
}, [p.height, e, m]),
|
|
1272
|
+
}, [p.height, e, m]), ce(() => {
|
|
1273
1273
|
const a = `${e}////${i}`, h = r.getState().stateComponents.get(e) || {
|
|
1274
1274
|
components: /* @__PURE__ */ new Map()
|
|
1275
1275
|
};
|
|
@@ -1280,14 +1280,14 @@ function Qe({
|
|
|
1280
1280
|
const n = r.getState().stateComponents.get(e);
|
|
1281
1281
|
n && n.components.delete(a);
|
|
1282
1282
|
};
|
|
1283
|
-
}, [e, i, m.join(".")]), /* @__PURE__ */
|
|
1283
|
+
}, [e, i, m.join(".")]), /* @__PURE__ */ ye("div", { ref: C, children: g });
|
|
1284
1284
|
}
|
|
1285
1285
|
export {
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1286
|
+
be as $cogsSignal,
|
|
1287
|
+
mt as $cogsSignalStore,
|
|
1288
|
+
gt as addStateOptions,
|
|
1289
|
+
ft as createCogsState,
|
|
1290
|
+
St as notifyComponent,
|
|
1291
|
+
Xe as useCogsStateFn
|
|
1292
1292
|
};
|
|
1293
1293
|
//# sourceMappingURL=CogsState.jsx.map
|