@ahoo-wang/fetcher-react 3.6.0 → 3.6.1

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,262 +1,262 @@
1
1
  var B = Object.defineProperty;
2
- var l = (r, e) => B(r, "name", { value: e, configurable: !0 });
2
+ var s = (r, e) => B(r, "name", { value: e, configurable: !0 });
3
3
  import { c as w } from "react/compiler-runtime";
4
- import { useRef as I, useEffect as $, useState as D, useCallback as _, useMemo as M, useReducer as H, useSyncExternalStore as X, createContext as Z, useContext as ee } from "react";
4
+ import { useRef as O, useEffect as I, useState as D, useCallback as _, useMemo as T, useReducer as H, useSyncExternalStore as X, createContext as Z, useContext as ee } from "react";
5
5
  import { jsx as N, Fragment as te } from "react/jsx-runtime";
6
6
  import { nameGenerator as re } from "@ahoo-wang/fetcher-eventbus";
7
7
  import { produce as ne } from "immer";
8
- import { fetcherRegistrar as ce, getFetcher as se, JsonResultExtractor as oe } from "@ahoo-wang/fetcher";
9
- import { JsonEventStreamResultExtractor as ue } from "@ahoo-wang/fetcher-eventstream";
10
- function L(r) {
11
- const e = I(r);
8
+ import { fetcherRegistrar as ce, getFetcher as se, JsonResultExtractor as ue } from "@ahoo-wang/fetcher";
9
+ import { JsonEventStreamResultExtractor as oe } from "@ahoo-wang/fetcher-eventstream";
10
+ function $(r) {
11
+ const e = O(r);
12
12
  return e.current = r, e;
13
13
  }
14
- l(L, "useLatest");
15
- function T(r, e) {
14
+ s($, "useLatest");
15
+ function M(r, e) {
16
16
  const t = w(19);
17
17
  if (e.leading === !1 && e.trailing === !1)
18
18
  throw new Error("useDebouncedCallback: at least one of leading or trailing must be true");
19
- const n = I(void 0), o = I(null), c = I(null), s = L(r), u = L(e);
19
+ const n = O(void 0), o = O(null), l = O(null), c = $(r), u = $(e);
20
20
  let i;
21
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ l(() => {
21
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ s(() => {
22
22
  n.current !== void 0 && (clearTimeout(n.current), n.current = void 0);
23
23
  }, "t0"), t[0] = i) : i = t[0];
24
- const m = i;
25
- let a;
26
- t[1] !== u ? (a = /* @__PURE__ */ l((F) => c.current ? F - c.current >= u.current.delay : !0, "t1"), t[1] = u, t[2] = a) : a = t[2];
27
- const f = a;
24
+ const y = i;
25
+ let f;
26
+ t[1] !== u ? (f = /* @__PURE__ */ s((F) => l.current ? F - l.current >= u.current.delay : !0, "t1"), t[1] = u, t[2] = f) : f = t[2];
27
+ const a = f;
28
28
  let d;
29
- t[3] !== s ? (d = /* @__PURE__ */ l((F, C) => {
30
- c.current = F, s.current(...C);
31
- }, "t2"), t[3] = s, t[4] = d) : d = t[4];
32
- const b = d;
33
- let y;
34
- t[5] !== b || t[6] !== u ? (y = /* @__PURE__ */ l(() => {
29
+ t[3] !== c ? (d = /* @__PURE__ */ s((F, p) => {
30
+ l.current = F, c.current(...p);
31
+ }, "t2"), t[3] = c, t[4] = d) : d = t[4];
32
+ const m = d;
33
+ let b;
34
+ t[5] !== m || t[6] !== u ? (b = /* @__PURE__ */ s(() => {
35
35
  n.current = setTimeout(() => {
36
36
  if (o.current) {
37
37
  const F = Date.now();
38
- b(F, o.current);
38
+ m(F, o.current);
39
39
  }
40
40
  n.current = void 0;
41
41
  }, u.current.delay);
42
- }, "t3"), t[5] = b, t[6] = u, t[7] = y) : y = t[7];
43
- const h = y;
42
+ }, "t3"), t[5] = m, t[6] = u, t[7] = b) : b = t[7];
43
+ const x = b;
44
44
  let g;
45
- t[8] !== b || t[9] !== u || t[10] !== h || t[11] !== f ? (g = /* @__PURE__ */ l((...F) => {
46
- const C = F;
47
- m();
45
+ t[8] !== m || t[9] !== u || t[10] !== x || t[11] !== a ? (g = /* @__PURE__ */ s((...F) => {
46
+ const p = F;
47
+ y();
48
48
  const {
49
- leading: q,
49
+ leading: U,
50
50
  trailing: k
51
- } = u.current, z = q === void 0 ? !1 : q, G = k === void 0 ? !0 : k;
52
- if (o.current = C, G && !z) {
53
- h();
51
+ } = u.current, z = U === void 0 ? !1 : U, G = k === void 0 ? !0 : k;
52
+ if (o.current = p, G && !z) {
53
+ x();
54
54
  return;
55
55
  }
56
56
  const K = Date.now();
57
- if (z && f(K)) {
58
- b(K, C);
57
+ if (z && a(K)) {
58
+ m(K, p);
59
59
  return;
60
60
  }
61
- G && h();
62
- }, "t4"), t[8] = b, t[9] = u, t[10] = h, t[11] = f, t[12] = g) : g = t[12];
63
- const x = g;
61
+ G && x();
62
+ }, "t4"), t[8] = m, t[9] = u, t[10] = x, t[11] = a, t[12] = g) : g = t[12];
63
+ const h = g;
64
+ let E;
65
+ t[13] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ s(() => {
66
+ y(), o.current = null;
67
+ }, "t5"), t[13] = E) : E = t[13];
68
+ const v = E;
64
69
  let S;
65
- t[13] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ l(() => {
66
- m(), o.current = null;
67
- }, "t5"), t[13] = S) : S = t[13];
68
- const E = S;
69
- let Q;
70
- t[14] === Symbol.for("react.memo_cache_sentinel") ? (Q = /* @__PURE__ */ l(() => n.current !== void 0, "t6"), t[14] = Q) : Q = t[14];
71
- const v = Q;
72
- let R, O;
73
- t[15] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ l(() => () => {
74
- E();
75
- }, "t7"), O = [E], t[15] = R, t[16] = O) : (R = t[15], O = t[16]), $(R, O);
76
- let p;
77
- return t[17] !== x ? (p = {
78
- run: x,
79
- cancel: E,
80
- isPending: v
81
- }, t[17] = x, t[18] = p) : p = t[18], p;
82
- }
83
- l(T, "useDebouncedCallback");
84
- function V() {
85
- const r = w(3), e = I(!1);
70
+ t[14] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ s(() => n.current !== void 0, "t6"), t[14] = S) : S = t[14];
71
+ const Q = S;
72
+ let R, C;
73
+ t[15] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ s(() => () => {
74
+ v();
75
+ }, "t7"), C = [v], t[15] = R, t[16] = C) : (R = t[15], C = t[16]), I(R, C);
76
+ let L;
77
+ return t[17] !== h ? (L = {
78
+ run: h,
79
+ cancel: v,
80
+ isPending: Q
81
+ }, t[17] = h, t[18] = L) : L = t[18], L;
82
+ }
83
+ s(M, "useDebouncedCallback");
84
+ function W() {
85
+ const r = w(3), e = O(!1);
86
86
  let t;
87
- r[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ l(() => e.current, "t0"), r[0] = t) : t = r[0];
87
+ r[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ s(() => e.current, "t0"), r[0] = t) : t = r[0];
88
88
  const n = t;
89
- let o, c;
90
- return r[1] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ l(() => (e.current = !0, () => {
89
+ let o, l;
90
+ return r[1] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ s(() => (e.current = !0, () => {
91
91
  e.current = !1;
92
- }), "t1"), c = [], r[1] = o, r[2] = c) : (o = r[1], c = r[2]), $(o, c), n;
92
+ }), "t1"), l = [], r[1] = o, r[2] = l) : (o = r[1], l = r[2]), I(o, l), n;
93
93
  }
94
- l(V, "useMounted");
94
+ s(W, "useMounted");
95
95
  var le = /* @__PURE__ */ ((r) => (r.IDLE = "idle", r.LOADING = "loading", r.SUCCESS = "success", r.ERROR = "error", r))(le || {});
96
96
  function ie(r) {
97
97
  const [e, t] = D(
98
98
  r?.initialStatus ?? "idle"
99
99
  /* IDLE */
100
- ), [n, o] = D(void 0), [c, s] = D(void 0), u = V(), i = L(r), m = _(() => {
100
+ ), [n, o] = D(void 0), [l, c] = D(void 0), u = W(), i = $(r), y = _(() => {
101
101
  u() && (t(
102
102
  "loading"
103
103
  /* LOADING */
104
- ), s(void 0));
105
- }, [u]), a = _(async (b) => {
104
+ ), c(void 0));
105
+ }, [u]), f = _(async (m) => {
106
106
  if (u()) {
107
- o(b), t(
107
+ o(m), t(
108
108
  "success"
109
109
  /* SUCCESS */
110
- ), s(void 0);
110
+ ), c(void 0);
111
111
  try {
112
- await i.current?.onSuccess?.(b);
113
- } catch (y) {
114
- console.warn("PromiseState onSuccess callback error:", y);
112
+ await i.current?.onSuccess?.(m);
113
+ } catch (b) {
114
+ console.warn("PromiseState onSuccess callback error:", b);
115
115
  }
116
116
  }
117
- }, [u, i]), f = _(async (b) => {
117
+ }, [u, i]), a = _(async (m) => {
118
118
  if (u()) {
119
- s(b), t(
119
+ c(m), t(
120
120
  "error"
121
121
  /* ERROR */
122
122
  ), o(void 0);
123
123
  try {
124
- await i.current?.onError?.(b);
125
- } catch (y) {
126
- console.warn("PromiseState onError callback error:", y);
124
+ await i.current?.onError?.(m);
125
+ } catch (b) {
126
+ console.warn("PromiseState onError callback error:", b);
127
127
  }
128
128
  }
129
129
  }, [u, i]), d = _(() => {
130
130
  u() && (t(
131
131
  "idle"
132
132
  /* IDLE */
133
- ), s(void 0), o(void 0));
133
+ ), c(void 0), o(void 0));
134
134
  }, [u]);
135
- return M(() => ({
135
+ return T(() => ({
136
136
  status: e,
137
137
  loading: e === "loading",
138
138
  result: n,
139
- error: c,
140
- setLoading: m,
141
- setSuccess: a,
142
- setError: f,
139
+ error: l,
140
+ setLoading: y,
141
+ setSuccess: f,
142
+ setError: a,
143
143
  setIdle: d
144
- }), [e, n, c, m, a, f, d]);
144
+ }), [e, n, l, y, f, a, d]);
145
145
  }
146
- l(ie, "usePromiseState");
146
+ s(ie, "usePromiseState");
147
147
  function ae() {
148
- const r = w(6), e = I(0);
148
+ const r = w(6), e = O(0);
149
149
  let t;
150
- r[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ l(() => e.current = e.current + 1, "t0"), r[0] = t) : t = r[0];
150
+ r[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ s(() => e.current = e.current + 1, "t0"), r[0] = t) : t = r[0];
151
151
  const n = t;
152
152
  let o;
153
- r[1] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ l(() => e.current, "t1"), r[1] = o) : o = r[1];
154
- const c = o;
155
- let s;
156
- r[2] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ l((b) => b === e.current, "t2"), r[2] = s) : s = r[2];
157
- const u = s;
153
+ r[1] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ s(() => e.current, "t1"), r[1] = o) : o = r[1];
154
+ const l = o;
155
+ let c;
156
+ r[2] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ s((m) => m === e.current, "t2"), r[2] = c) : c = r[2];
157
+ const u = c;
158
158
  let i;
159
- r[3] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ l(() => {
159
+ r[3] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ s(() => {
160
160
  e.current = e.current + 1;
161
161
  }, "t3"), r[3] = i) : i = r[3];
162
- const m = i;
163
- let a;
164
- r[4] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ l(() => {
162
+ const y = i;
163
+ let f;
164
+ r[4] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ s(() => {
165
165
  e.current = 0;
166
- }, "t4"), r[4] = a) : a = r[4];
167
- const f = a;
166
+ }, "t4"), r[4] = f) : f = r[4];
167
+ const a = f;
168
168
  let d;
169
169
  return r[5] === Symbol.for("react.memo_cache_sentinel") ? (d = {
170
170
  generate: n,
171
- current: c,
171
+ current: l,
172
172
  isLatest: u,
173
- invalidate: m,
174
- reset: f
173
+ invalidate: y,
174
+ reset: a
175
175
  }, r[5] = d) : d = r[5], d;
176
176
  }
177
- l(ae, "useRequestId");
178
- function U(r) {
177
+ s(ae, "useRequestId");
178
+ function q(r) {
179
179
  const {
180
180
  loading: e,
181
181
  result: t,
182
182
  error: n,
183
183
  status: o,
184
- setLoading: c,
185
- setSuccess: s,
184
+ setLoading: l,
185
+ setSuccess: c,
186
186
  setError: u,
187
187
  setIdle: i
188
- } = ie(r), m = V(), a = ae(), f = I(void 0), d = r?.propagateError, b = L(r?.onAbort), y = _(async () => {
188
+ } = ie(r), y = W(), f = ae(), a = O(void 0), d = r?.propagateError, m = $(r?.onAbort), b = _(async () => {
189
189
  try {
190
- await b.current?.();
191
- } catch (S) {
192
- console.warn("useExecutePromise onAbort callback error:", S);
190
+ await m.current?.();
191
+ } catch (E) {
192
+ console.warn("useExecutePromise onAbort callback error:", E);
193
193
  }
194
- }, [b]), h = _(async (S) => {
195
- f.current && (f.current.abort(), await y());
196
- const E = new AbortController();
197
- f.current = E;
198
- const Q = a.generate();
199
- c();
194
+ }, [m]), x = _(async (E) => {
195
+ a.current && (a.current.abort(), await b());
196
+ const v = new AbortController();
197
+ a.current = v;
198
+ const S = f.generate();
199
+ l();
200
200
  try {
201
- const v = await S(E);
202
- m() && a.isLatest(Q) && await s(v);
203
- } catch (v) {
204
- if (v instanceof Error && v.name === "AbortError") {
205
- m() && i();
201
+ const Q = await E(v);
202
+ y() && f.isLatest(S) && await c(Q);
203
+ } catch (Q) {
204
+ if (Q instanceof Error && Q.name === "AbortError") {
205
+ y() && i();
206
206
  return;
207
207
  }
208
- if (m() && a.isLatest(Q) && await u(v), d)
209
- throw v;
208
+ if (y() && f.isLatest(S) && await u(Q), d)
209
+ throw Q;
210
210
  } finally {
211
- f.current === E && (f.current = void 0);
211
+ a.current === v && (a.current = void 0);
212
212
  }
213
- }, [c, s, u, i, m, a, d, y]), g = _(() => {
214
- m() && i();
215
- }, [i, m]), x = _(async () => {
216
- g(), f.current && (f.current.abort(), f.current = void 0, await y());
217
- }, [g, y]);
218
- return $(() => () => {
219
- x();
220
- }, [x]), M(() => ({
213
+ }, [l, c, u, i, y, f, d, b]), g = _(() => {
214
+ y() && i();
215
+ }, [i, y]), h = _(async () => {
216
+ g(), a.current && (a.current.abort(), a.current = void 0, await b());
217
+ }, [g, b]);
218
+ return I(() => () => {
219
+ h();
220
+ }, [h]), T(() => ({
221
221
  loading: e,
222
222
  result: t,
223
223
  error: n,
224
224
  status: o,
225
- execute: h,
225
+ execute: x,
226
226
  reset: g,
227
- abort: x
228
- }), [e, t, n, o, h, g, x]);
227
+ abort: h
228
+ }), [e, t, n, o, x, g, h]);
229
229
  }
230
- l(U, "useExecutePromise");
231
- function we(r) {
230
+ s(q, "useExecutePromise");
231
+ function Re(r) {
232
232
  const e = w(10), {
233
233
  loading: t,
234
234
  result: n,
235
235
  error: o,
236
- execute: c,
237
- reset: s,
236
+ execute: l,
237
+ reset: c,
238
238
  abort: u,
239
239
  status: i
240
- } = U(r), {
241
- run: m,
242
- cancel: a,
243
- isPending: f
244
- } = T(c, r.debounce);
240
+ } = q(r), {
241
+ run: y,
242
+ cancel: f,
243
+ isPending: a
244
+ } = M(l, r.debounce);
245
245
  let d;
246
- return e[0] !== u || e[1] !== a || e[2] !== o || e[3] !== f || e[4] !== t || e[5] !== s || e[6] !== n || e[7] !== m || e[8] !== i ? (d = {
246
+ return e[0] !== u || e[1] !== f || e[2] !== o || e[3] !== a || e[4] !== t || e[5] !== c || e[6] !== n || e[7] !== y || e[8] !== i ? (d = {
247
247
  loading: t,
248
248
  result: n,
249
249
  error: o,
250
250
  status: i,
251
- reset: s,
251
+ reset: c,
252
252
  abort: u,
253
- run: m,
254
- cancel: a,
255
- isPending: f
256
- }, e[0] = u, e[1] = a, e[2] = o, e[3] = f, e[4] = t, e[5] = s, e[6] = n, e[7] = m, e[8] = i, e[9] = d) : d = e[9], d;
253
+ run: y,
254
+ cancel: f,
255
+ isPending: a
256
+ }, e[0] = u, e[1] = f, e[2] = o, e[3] = a, e[4] = t, e[5] = c, e[6] = n, e[7] = y, e[8] = i, e[9] = d) : d = e[9], d;
257
257
  }
258
- l(we, "useDebouncedExecutePromise");
259
- function Re(r) {
258
+ s(Re, "useDebouncedExecutePromise");
259
+ function Fe(r) {
260
260
  const e = w(22), t = r.autoExecute;
261
261
  let n;
262
262
  e[0] !== r ? (n = {
@@ -264,205 +264,225 @@ function Re(r) {
264
264
  autoExecute: !1
265
265
  }, e[0] = r, e[1] = n) : n = e[1];
266
266
  const o = n, {
267
- loading: c,
268
- result: s,
267
+ loading: l,
268
+ result: c,
269
269
  error: u,
270
270
  status: i,
271
- execute: m,
272
- reset: a,
273
- abort: f,
271
+ execute: y,
272
+ reset: f,
273
+ abort: a,
274
274
  getQuery: d,
275
- setQuery: b
275
+ setQuery: m
276
276
  } = P(o), {
277
- run: y,
278
- cancel: h,
277
+ run: b,
278
+ cancel: x,
279
279
  isPending: g
280
- } = T(m, r.debounce);
281
- let x;
282
- e[2] !== t || e[3] !== y || e[4] !== b ? (x = /* @__PURE__ */ l((R) => {
283
- b(R), t && y();
284
- }, "t1"), e[2] = t, e[3] = y, e[4] = b, e[5] = x) : x = e[5];
285
- const S = x;
286
- let E, Q;
287
- e[6] !== t || e[7] !== y ? (E = /* @__PURE__ */ l(() => {
288
- t && y();
289
- }, "t2"), Q = [y, t], e[6] = t, e[7] = y, e[8] = E, e[9] = Q) : (E = e[8], Q = e[9]), $(E, Q);
290
- let v;
291
- return e[10] !== f || e[11] !== h || e[12] !== u || e[13] !== d || e[14] !== g || e[15] !== c || e[16] !== a || e[17] !== s || e[18] !== y || e[19] !== S || e[20] !== i ? (v = {
292
- loading: c,
293
- result: s,
280
+ } = M(y, r.debounce);
281
+ let h;
282
+ e[2] !== t || e[3] !== b || e[4] !== m ? (h = /* @__PURE__ */ s((R) => {
283
+ m(R), t && b();
284
+ }, "t1"), e[2] = t, e[3] = b, e[4] = m, e[5] = h) : h = e[5];
285
+ const E = h;
286
+ let v, S;
287
+ e[6] !== t || e[7] !== b ? (v = /* @__PURE__ */ s(() => {
288
+ t && b();
289
+ }, "t2"), S = [b, t], e[6] = t, e[7] = b, e[8] = v, e[9] = S) : (v = e[8], S = e[9]), I(v, S);
290
+ let Q;
291
+ return e[10] !== a || e[11] !== x || e[12] !== u || e[13] !== d || e[14] !== g || e[15] !== l || e[16] !== f || e[17] !== c || e[18] !== b || e[19] !== E || e[20] !== i ? (Q = {
292
+ loading: l,
293
+ result: c,
294
294
  error: u,
295
295
  status: i,
296
- reset: a,
297
- abort: f,
296
+ reset: f,
297
+ abort: a,
298
298
  getQuery: d,
299
- setQuery: S,
300
- run: y,
301
- cancel: h,
299
+ setQuery: E,
300
+ run: b,
301
+ cancel: x,
302
302
  isPending: g
303
- }, e[10] = f, e[11] = h, e[12] = u, e[13] = d, e[14] = g, e[15] = c, e[16] = a, e[17] = s, e[18] = y, e[19] = S, e[20] = i, e[21] = v) : v = e[21], v;
303
+ }, e[10] = a, e[11] = x, e[12] = u, e[13] = d, e[14] = g, e[15] = l, e[16] = f, e[17] = c, e[18] = b, e[19] = E, e[20] = i, e[21] = Q) : Q = e[21], Q;
304
304
  }
305
- l(Re, "useDebouncedQuery");
306
- function Fe() {
307
- const r = I(/* @__PURE__ */ new Map()), e = _((f) => r.current.get(f), []), t = _((f, d) => r.current.set(f, d), []), n = _((f) => r.current.has(f), []), o = _((f) => r.current.delete(f), []), c = _(() => r.current.clear(), []), s = _(() => r.current.keys(), []), u = _(() => r.current.values(), []), i = _(() => r.current.entries(), []), m = _(() => r.current[Symbol.iterator](), []), a = _((f) => (d) => {
308
- d ? r.current.set(f, d) : r.current.delete(f);
305
+ s(Fe, "useDebouncedQuery");
306
+ function pe() {
307
+ const r = O(/* @__PURE__ */ new Map()), e = _((a) => r.current.get(a), []), t = _((a, d) => r.current.set(a, d), []), n = _((a) => r.current.has(a), []), o = _((a) => r.current.delete(a), []), l = _(() => r.current.clear(), []), c = _(() => r.current.keys(), []), u = _(() => r.current.values(), []), i = _(() => r.current.entries(), []), y = _(() => r.current[Symbol.iterator](), []), f = _((a) => (d) => {
308
+ d ? r.current.set(a, d) : r.current.delete(a);
309
309
  }, []);
310
- return $(() => () => {
310
+ return I(() => () => {
311
311
  r.current.clear();
312
- }, []), M(() => ({
313
- register: a,
312
+ }, []), T(() => ({
313
+ register: f,
314
314
  get: e,
315
315
  set: t,
316
316
  has: n,
317
317
  delete: o,
318
- clear: c,
319
- keys: s,
318
+ clear: l,
319
+ keys: c,
320
320
  values: u,
321
321
  entries: i,
322
322
  get size() {
323
323
  return r.current.size;
324
324
  },
325
- [Symbol.iterator]: m
326
- }), [a, e, t, n, o, c, s, u, i, m]);
325
+ [Symbol.iterator]: y
326
+ }), [f, e, t, n, o, l, c, u, i, y]);
327
327
  }
328
- l(Fe, "useRefs");
328
+ s(pe, "useRefs");
329
329
  function Ce() {
330
330
  const [, r] = H(fe, 0);
331
331
  return r;
332
332
  }
333
- l(Ce, "useForceUpdate");
333
+ s(Ce, "useForceUpdate");
334
334
  function fe(r) {
335
335
  return r + 1;
336
336
  }
337
- l(fe, "_temp");
337
+ s(fe, "_temp");
338
+ const de = [];
338
339
  function j(r) {
339
- const e = w(10), {
340
+ const e = w(13), {
340
341
  initialQuery: t,
341
342
  autoExecute: n,
342
- execute: o
343
- } = r, c = n ?? !0, s = I(t);
344
- let u;
345
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ l(() => s.current, "t0"), e[0] = u) : u = e[0];
346
- const i = u;
343
+ execute: o,
344
+ deps: l
345
+ } = r, c = n === void 0 ? !0 : n, u = l === void 0 ? de : l, i = O(t);
346
+ let y;
347
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ s(() => i.current, "t2"), e[0] = y) : y = e[0];
348
+ const f = y;
349
+ let a;
350
+ e[1] !== c || e[2] !== o ? (a = /* @__PURE__ */ s(() => {
351
+ c && o(f());
352
+ }, "t3"), e[1] = c, e[2] = o, e[3] = a) : a = e[3];
353
+ const d = a;
347
354
  let m;
348
- e[1] !== c || e[2] !== o ? (m = /* @__PURE__ */ l((y) => {
349
- s.current = y, c && o(y);
350
- }, "t1"), e[1] = c, e[2] = o, e[3] = m) : m = e[3];
351
- const a = m;
352
- let f, d;
353
- e[4] !== c || e[5] !== o ? (f = /* @__PURE__ */ l(() => {
354
- c && o(s.current);
355
- }, "t2"), d = [c, o], e[4] = c, e[5] = o, e[6] = f, e[7] = d) : (f = e[6], d = e[7]), $(f, d);
356
- let b;
357
- return e[8] !== a ? (b = {
358
- getQuery: i,
359
- setQuery: a
360
- }, e[8] = a, e[9] = b) : b = e[9], b;
355
+ e[4] !== d ? (m = /* @__PURE__ */ s((E) => {
356
+ i.current = E, d();
357
+ }, "t4"), e[4] = d, e[5] = m) : m = e[5];
358
+ const b = m;
359
+ let x;
360
+ e[6] !== d ? (x = /* @__PURE__ */ s(() => {
361
+ d();
362
+ }, "t5"), e[6] = d, e[7] = x) : x = e[7];
363
+ let g;
364
+ e[8] !== u || e[9] !== d ? (g = [d, ...u], e[8] = u, e[9] = d, e[10] = g) : g = e[10], I(x, g);
365
+ let h;
366
+ return e[11] !== b ? (h = {
367
+ getQuery: f,
368
+ setQuery: b
369
+ }, e[11] = b, e[12] = h) : h = e[12], h;
361
370
  }
362
- l(j, "useQueryState");
371
+ s(j, "useQueryState");
363
372
  function P(r) {
364
- const e = L(r), {
365
- loading: t,
366
- result: n,
367
- error: o,
373
+ const e = w(21), t = $(r), {
374
+ loading: n,
375
+ result: o,
376
+ error: l,
368
377
  status: c,
369
- execute: s,
370
- reset: u,
371
- abort: i
372
- } = U(e.current), m = _((b) => s(/* @__PURE__ */ l(async (h) => e.current.execute(b, e.current.attributes, h), "queryExecutor")), [s, e]), {
373
- getQuery: a,
374
- setQuery: f
375
- } = j({
378
+ execute: u,
379
+ reset: i,
380
+ abort: y
381
+ } = q(r);
382
+ let f;
383
+ e[0] !== t || e[1] !== u ? (f = /* @__PURE__ */ s((E) => u(/* @__PURE__ */ s(async (S) => t.current.execute(E, t.current.attributes, S), "queryExecutor")), "t0"), e[0] = t, e[1] = u, e[2] = f) : f = e[2];
384
+ const a = f;
385
+ let d;
386
+ e[3] !== a || e[4] !== r.autoExecute || e[5] !== r.deps || e[6] !== r.initialQuery ? (d = {
376
387
  initialQuery: r.initialQuery,
377
- autoExecute: e.current.autoExecute,
378
- execute: m
379
- }), d = _(() => m(a()), [m, a]);
380
- return M(() => ({
381
- loading: t,
382
- result: n,
383
- error: o,
388
+ autoExecute: r.autoExecute,
389
+ execute: a,
390
+ deps: r.deps
391
+ }, e[3] = a, e[4] = r.autoExecute, e[5] = r.deps, e[6] = r.initialQuery, e[7] = d) : d = e[7];
392
+ const {
393
+ getQuery: m,
394
+ setQuery: b
395
+ } = j(d);
396
+ let x;
397
+ e[8] !== a || e[9] !== m ? (x = /* @__PURE__ */ s(() => a(m()), "t2"), e[8] = a, e[9] = m, e[10] = x) : x = e[10];
398
+ const g = x;
399
+ let h;
400
+ return e[11] !== y || e[12] !== l || e[13] !== g || e[14] !== m || e[15] !== n || e[16] !== i || e[17] !== o || e[18] !== b || e[19] !== c ? (h = {
401
+ loading: n,
402
+ result: o,
403
+ error: l,
384
404
  status: c,
385
- execute: d,
386
- reset: u,
387
- abort: i,
388
- getQuery: a,
389
- setQuery: f
390
- }), [t, n, o, c, d, u, i, a, f]);
391
- }
392
- l(P, "useQuery");
405
+ execute: g,
406
+ reset: i,
407
+ abort: y,
408
+ getQuery: m,
409
+ setQuery: b
410
+ }, e[11] = y, e[12] = l, e[13] = g, e[14] = m, e[15] = n, e[16] = i, e[17] = o, e[18] = b, e[19] = c, e[20] = h) : h = e[20], h;
411
+ }
412
+ s(P, "useQuery");
393
413
  function J(r, e) {
394
414
  const t = w(13);
395
415
  let n;
396
- t[0] !== r ? (n = /* @__PURE__ */ l((b) => r.addListener({
416
+ t[0] !== r ? (n = /* @__PURE__ */ s((m) => r.addListener({
397
417
  name: re.generate("useKeyStorage"),
398
- handle: b
418
+ handle: m
399
419
  }), "t0"), t[0] = r, t[1] = n) : n = t[1];
400
420
  const o = n;
401
- let c;
402
- t[2] !== e || t[3] !== r ? (c = /* @__PURE__ */ l(() => {
403
- const b = r.get();
404
- return b !== null ? b : e ?? null;
405
- }, "t1"), t[2] = e, t[3] = r, t[4] = c) : c = t[4];
406
- const s = c, u = X(o, s, s);
421
+ let l;
422
+ t[2] !== e || t[3] !== r ? (l = /* @__PURE__ */ s(() => {
423
+ const m = r.get();
424
+ return m !== null ? m : e ?? null;
425
+ }, "t1"), t[2] = e, t[3] = r, t[4] = l) : l = t[4];
426
+ const c = l, u = X(o, c, c);
407
427
  let i;
408
- t[5] !== r ? (i = /* @__PURE__ */ l((b) => r.set(b), "t2"), t[5] = r, t[6] = i) : i = t[6];
409
- const m = i;
410
- let a;
411
- t[7] !== r ? (a = /* @__PURE__ */ l(() => r.remove(), "t3"), t[7] = r, t[8] = a) : a = t[8];
412
- const f = a;
428
+ t[5] !== r ? (i = /* @__PURE__ */ s((m) => r.set(m), "t2"), t[5] = r, t[6] = i) : i = t[6];
429
+ const y = i;
430
+ let f;
431
+ t[7] !== r ? (f = /* @__PURE__ */ s(() => r.remove(), "t3"), t[7] = r, t[8] = f) : f = t[8];
432
+ const a = f;
413
433
  let d;
414
- return t[9] !== f || t[10] !== m || t[11] !== u ? (d = [u, m, f], t[9] = f, t[10] = m, t[11] = u, t[12] = d) : d = t[12], d;
434
+ return t[9] !== a || t[10] !== y || t[11] !== u ? (d = [u, y, a], t[9] = a, t[10] = y, t[11] = u, t[12] = d) : d = t[12], d;
415
435
  }
416
- l(J, "useKeyStorage");
436
+ s(J, "useKeyStorage");
417
437
  function Oe(r, e) {
418
- const t = w(8), [n, o, c] = J(r, e);
419
- let s;
420
- t[0] !== c || t[1] !== o || t[2] !== n ? (s = /* @__PURE__ */ l((m) => {
421
- const a = ne(n, m);
422
- if (a === null) {
423
- c();
438
+ const t = w(8), [n, o, l] = J(r, e);
439
+ let c;
440
+ t[0] !== l || t[1] !== o || t[2] !== n ? (c = /* @__PURE__ */ s((y) => {
441
+ const f = ne(n, y);
442
+ if (f === null) {
443
+ l();
424
444
  return;
425
445
  }
426
- return o(a);
427
- }, "t0"), t[0] = c, t[1] = o, t[2] = n, t[3] = s) : s = t[3];
428
- const u = s;
446
+ return o(f);
447
+ }, "t0"), t[0] = l, t[1] = o, t[2] = n, t[3] = c) : c = t[3];
448
+ const u = c;
429
449
  let i;
430
- return t[4] !== c || t[5] !== u || t[6] !== n ? (i = [n, u, c], t[4] = c, t[5] = u, t[6] = n, t[7] = i) : i = t[7], i;
450
+ return t[4] !== l || t[5] !== u || t[6] !== n ? (i = [n, u, l], t[4] = l, t[5] = u, t[6] = n, t[7] = i) : i = t[7], i;
431
451
  }
432
- l(Oe, "useImmerKeyStorage");
433
- const de = {
452
+ s(Oe, "useImmerKeyStorage");
453
+ const me = {
434
454
  jti: "",
435
455
  sub: "anonymous",
436
456
  iat: 0,
437
457
  exp: 0
438
458
  };
439
- function me(r, e) {
459
+ function ye(r, e) {
440
460
  const t = w(13);
441
461
  let n;
442
462
  t[0] !== e ? (n = e === void 0 ? {} : e, t[0] = e, t[1] = n) : n = t[1];
443
- const o = n, [c, , s] = J(r), u = L(o);
463
+ const o = n, [l, , c] = J(r), u = $(o);
444
464
  let i;
445
- t[2] !== u || t[3] !== r ? (i = /* @__PURE__ */ l(async (h) => {
446
- const g = typeof h == "function" ? await h() : h;
465
+ t[2] !== u || t[3] !== r ? (i = /* @__PURE__ */ s(async (x) => {
466
+ const g = typeof x == "function" ? await x() : x;
447
467
  r.signIn(g), u.current.onSignIn?.();
448
468
  }, "t2"), t[2] = u, t[3] = r, t[4] = i) : i = t[4];
449
- const m = i;
450
- let a;
451
- t[5] !== u || t[6] !== s ? (a = /* @__PURE__ */ l(() => {
452
- s(), u.current.onSignOut?.();
453
- }, "t3"), t[5] = u, t[6] = s, t[7] = a) : a = t[7];
454
- const f = a, d = c?.access?.payload ?? de, b = c?.authenticated ?? !1;
455
- let y;
456
- return t[8] !== m || t[9] !== f || t[10] !== d || t[11] !== b ? (y = {
469
+ const y = i;
470
+ let f;
471
+ t[5] !== u || t[6] !== c ? (f = /* @__PURE__ */ s(() => {
472
+ c(), u.current.onSignOut?.();
473
+ }, "t3"), t[5] = u, t[6] = c, t[7] = f) : f = t[7];
474
+ const a = f, d = l?.access?.payload ?? me, m = l?.authenticated ?? !1;
475
+ let b;
476
+ return t[8] !== y || t[9] !== a || t[10] !== d || t[11] !== m ? (b = {
457
477
  currentUser: d,
458
- authenticated: b,
459
- signIn: m,
460
- signOut: f
461
- }, t[8] = m, t[9] = f, t[10] = d, t[11] = b, t[12] = y) : y = t[12], y;
478
+ authenticated: m,
479
+ signIn: y,
480
+ signOut: a
481
+ }, t[8] = y, t[9] = a, t[10] = d, t[11] = m, t[12] = b) : b = t[12], b;
462
482
  }
463
- l(me, "useSecurity");
464
- const W = Z(void 0);
465
- function Ie(r) {
483
+ s(ye, "useSecurity");
484
+ const V = Z(void 0);
485
+ function $e(r) {
466
486
  const e = w(7);
467
487
  let t, n, o;
468
488
  e[0] !== r ? ({
@@ -470,33 +490,33 @@ function Ie(r) {
470
490
  children: t,
471
491
  ...o
472
492
  } = r, e[0] = r, e[1] = t, e[2] = n, e[3] = o) : (t = e[1], n = e[2], o = e[3]);
473
- const c = me(n, o);
474
- let s;
475
- return e[4] !== t || e[5] !== c ? (s = /* @__PURE__ */ N(W.Provider, { value: c, children: t }), e[4] = t, e[5] = c, e[6] = s) : s = e[6], s;
493
+ const l = ye(n, o);
494
+ let c;
495
+ return e[4] !== t || e[5] !== l ? (c = /* @__PURE__ */ N(V.Provider, { value: l, children: t }), e[4] = t, e[5] = l, e[6] = c) : c = e[6], c;
476
496
  }
477
- l(Ie, "SecurityProvider");
497
+ s($e, "SecurityProvider");
478
498
  function be() {
479
- const r = ee(W);
499
+ const r = ee(V);
480
500
  if (!r)
481
501
  throw new Error("useSecurityContext must be used within a SecurityProvider");
482
502
  return r;
483
503
  }
484
- l(be, "useSecurityContext");
485
- function Le(r) {
504
+ s(be, "useSecurityContext");
505
+ function Ie(r) {
486
506
  const e = w(2), {
487
507
  children: t,
488
508
  fallback: n,
489
509
  onUnauthorized: o
490
510
  } = r, {
491
- authenticated: c
511
+ authenticated: l
492
512
  } = be();
493
- if (c) {
494
- let s;
495
- return e[0] !== t ? (s = /* @__PURE__ */ N(te, { children: t }), e[0] = t, e[1] = s) : s = e[1], s;
513
+ if (l) {
514
+ let c;
515
+ return e[0] !== t ? (c = /* @__PURE__ */ N(te, { children: t }), e[0] = t, e[1] = c) : c = e[1], c;
496
516
  }
497
517
  return o && o(), n;
498
518
  }
499
- l(Le, "RouteGuard");
519
+ s(Ie, "RouteGuard");
500
520
  function Y(r) {
501
521
  const e = w(21);
502
522
  let t;
@@ -504,85 +524,85 @@ function Y(r) {
504
524
  const {
505
525
  fetcher: n
506
526
  } = t, o = n === void 0 ? ce.default : n, {
507
- loading: c,
508
- result: s,
527
+ loading: l,
528
+ result: c,
509
529
  error: u,
510
530
  status: i,
511
- execute: m,
512
- reset: a,
513
- abort: f
514
- } = U(r), [d, b] = D(void 0), y = L(r);
515
- let h;
516
- e[2] !== o ? (h = se(o), e[2] = o, e[3] = h) : h = e[3];
517
- const g = h;
531
+ execute: y,
532
+ reset: f,
533
+ abort: a
534
+ } = q(r), [d, m] = D(void 0), b = $(r);
518
535
  let x;
519
- e[4] !== g || e[5] !== y || e[6] !== m ? (x = /* @__PURE__ */ l(async (p) => {
536
+ e[2] !== o ? (x = se(o), e[2] = o, e[3] = x) : x = e[3];
537
+ const g = x;
538
+ let h;
539
+ e[4] !== g || e[5] !== b || e[6] !== y ? (h = /* @__PURE__ */ s(async (L) => {
520
540
  try {
521
- await m(async (F) => {
522
- p.abortController = F;
523
- const C = await g.exchange(p, y.current);
524
- return b(C), await C.extractResult();
541
+ await y(async (F) => {
542
+ L.abortController = F;
543
+ const p = await g.exchange(L, b.current);
544
+ return m(p), await p.extractResult();
525
545
  });
526
546
  } catch (F) {
527
- const C = F;
528
- throw b(void 0), C;
547
+ const p = F;
548
+ throw m(void 0), p;
529
549
  }
530
- }, "t3"), e[4] = g, e[5] = y, e[6] = m, e[7] = x) : x = e[7];
531
- const S = x;
532
- let E;
533
- e[8] !== a ? (E = /* @__PURE__ */ l(() => {
534
- a(), b(void 0);
535
- }, "t4"), e[8] = a, e[9] = E) : E = e[9];
536
- const Q = E;
550
+ }, "t3"), e[4] = g, e[5] = b, e[6] = y, e[7] = h) : h = e[7];
551
+ const E = h;
537
552
  let v;
538
- e[10] !== f ? (v = /* @__PURE__ */ l(() => {
539
- f(), b(void 0);
540
- }, "t5"), e[10] = f, e[11] = v) : v = e[11];
541
- const R = v;
542
- let O;
543
- return e[12] !== R || e[13] !== u || e[14] !== d || e[15] !== S || e[16] !== c || e[17] !== Q || e[18] !== s || e[19] !== i ? (O = {
544
- loading: c,
545
- result: s,
553
+ e[8] !== f ? (v = /* @__PURE__ */ s(() => {
554
+ f(), m(void 0);
555
+ }, "t4"), e[8] = f, e[9] = v) : v = e[9];
556
+ const S = v;
557
+ let Q;
558
+ e[10] !== a ? (Q = /* @__PURE__ */ s(() => {
559
+ a(), m(void 0);
560
+ }, "t5"), e[10] = a, e[11] = Q) : Q = e[11];
561
+ const R = Q;
562
+ let C;
563
+ return e[12] !== R || e[13] !== u || e[14] !== d || e[15] !== E || e[16] !== l || e[17] !== S || e[18] !== c || e[19] !== i ? (C = {
564
+ loading: l,
565
+ result: c,
546
566
  error: u,
547
567
  status: i,
548
568
  exchange: d,
549
- execute: S,
550
- reset: Q,
569
+ execute: E,
570
+ reset: S,
551
571
  abort: R
552
- }, e[12] = R, e[13] = u, e[14] = d, e[15] = S, e[16] = c, e[17] = Q, e[18] = s, e[19] = i, e[20] = O) : O = e[20], O;
572
+ }, e[12] = R, e[13] = u, e[14] = d, e[15] = E, e[16] = l, e[17] = S, e[18] = c, e[19] = i, e[20] = C) : C = e[20], C;
553
573
  }
554
- l(Y, "useFetcher");
555
- function $e(r) {
574
+ s(Y, "useFetcher");
575
+ function Le(r) {
556
576
  const e = w(11), {
557
577
  loading: t,
558
578
  result: n,
559
579
  error: o,
560
- status: c,
561
- exchange: s,
580
+ status: l,
581
+ exchange: c,
562
582
  execute: u,
563
583
  reset: i,
564
- abort: m
584
+ abort: y
565
585
  } = Y(r), {
566
- run: a,
567
- cancel: f,
586
+ run: f,
587
+ cancel: a,
568
588
  isPending: d
569
- } = T(u, r.debounce);
570
- let b;
571
- return e[0] !== m || e[1] !== f || e[2] !== o || e[3] !== s || e[4] !== d || e[5] !== t || e[6] !== i || e[7] !== n || e[8] !== a || e[9] !== c ? (b = {
589
+ } = M(u, r.debounce);
590
+ let m;
591
+ return e[0] !== y || e[1] !== a || e[2] !== o || e[3] !== c || e[4] !== d || e[5] !== t || e[6] !== i || e[7] !== n || e[8] !== f || e[9] !== l ? (m = {
572
592
  loading: t,
573
593
  result: n,
574
594
  error: o,
575
- status: c,
576
- exchange: s,
595
+ status: l,
596
+ exchange: c,
577
597
  reset: i,
578
- abort: m,
579
- run: a,
580
- cancel: f,
598
+ abort: y,
599
+ run: f,
600
+ cancel: a,
581
601
  isPending: d
582
- }, e[0] = m, e[1] = f, e[2] = o, e[3] = s, e[4] = d, e[5] = t, e[6] = i, e[7] = n, e[8] = a, e[9] = c, e[10] = b) : b = e[10], b;
602
+ }, e[0] = y, e[1] = a, e[2] = o, e[3] = c, e[4] = d, e[5] = t, e[6] = i, e[7] = n, e[8] = f, e[9] = l, e[10] = m) : m = e[10], m;
583
603
  }
584
- l($e, "useDebouncedFetcher");
585
- function pe(r) {
604
+ s(Le, "useDebouncedFetcher");
605
+ function Pe(r) {
586
606
  const e = w(22), t = r.autoExecute;
587
607
  let n;
588
608
  e[0] !== r ? (n = {
@@ -590,201 +610,202 @@ function pe(r) {
590
610
  autoExecute: !1
591
611
  }, e[0] = r, e[1] = n) : n = e[1];
592
612
  const o = n, {
593
- loading: c,
594
- result: s,
613
+ loading: l,
614
+ result: c,
595
615
  error: u,
596
616
  status: i,
597
- execute: m,
598
- reset: a,
599
- abort: f,
617
+ execute: y,
618
+ reset: f,
619
+ abort: a,
600
620
  getQuery: d,
601
- setQuery: b
621
+ setQuery: m
602
622
  } = A(o), {
603
- run: y,
604
- cancel: h,
623
+ run: b,
624
+ cancel: x,
605
625
  isPending: g
606
- } = T(m, r.debounce);
607
- let x;
608
- e[2] !== t || e[3] !== y || e[4] !== b ? (x = /* @__PURE__ */ l((R) => {
609
- b(R), t && y();
610
- }, "t1"), e[2] = t, e[3] = y, e[4] = b, e[5] = x) : x = e[5];
611
- const S = x;
612
- let E, Q;
613
- e[6] !== t || e[7] !== y ? (E = /* @__PURE__ */ l(() => {
614
- t && y();
615
- }, "t2"), Q = [y, t], e[6] = t, e[7] = y, e[8] = E, e[9] = Q) : (E = e[8], Q = e[9]), $(E, Q);
616
- let v;
617
- return e[10] !== f || e[11] !== h || e[12] !== u || e[13] !== d || e[14] !== g || e[15] !== c || e[16] !== a || e[17] !== s || e[18] !== y || e[19] !== S || e[20] !== i ? (v = {
618
- loading: c,
619
- result: s,
626
+ } = M(y, r.debounce);
627
+ let h;
628
+ e[2] !== t || e[3] !== b || e[4] !== m ? (h = /* @__PURE__ */ s((R) => {
629
+ m(R), t && b();
630
+ }, "t1"), e[2] = t, e[3] = b, e[4] = m, e[5] = h) : h = e[5];
631
+ const E = h;
632
+ let v, S;
633
+ e[6] !== t || e[7] !== b ? (v = /* @__PURE__ */ s(() => {
634
+ t && b();
635
+ }, "t2"), S = [b, t], e[6] = t, e[7] = b, e[8] = v, e[9] = S) : (v = e[8], S = e[9]), I(v, S);
636
+ let Q;
637
+ return e[10] !== a || e[11] !== x || e[12] !== u || e[13] !== d || e[14] !== g || e[15] !== l || e[16] !== f || e[17] !== c || e[18] !== b || e[19] !== E || e[20] !== i ? (Q = {
638
+ loading: l,
639
+ result: c,
620
640
  error: u,
621
641
  status: i,
622
- reset: a,
623
- abort: f,
642
+ reset: f,
643
+ abort: a,
624
644
  getQuery: d,
625
- setQuery: S,
626
- run: y,
627
- cancel: h,
645
+ setQuery: E,
646
+ run: b,
647
+ cancel: x,
628
648
  isPending: g
629
- }, e[10] = f, e[11] = h, e[12] = u, e[13] = d, e[14] = g, e[15] = c, e[16] = a, e[17] = s, e[18] = y, e[19] = S, e[20] = i, e[21] = v) : v = e[21], v;
649
+ }, e[10] = a, e[11] = x, e[12] = u, e[13] = d, e[14] = g, e[15] = l, e[16] = f, e[17] = c, e[18] = b, e[19] = E, e[20] = i, e[21] = Q) : Q = e[21], Q;
630
650
  }
631
- l(pe, "useDebouncedFetcherQuery");
651
+ s(Pe, "useDebouncedFetcherQuery");
632
652
  function A(r) {
633
- const e = w(22);
653
+ const e = w(23);
634
654
  let t;
635
655
  e[0] !== r ? (t = {
636
- resultExtractor: oe,
656
+ resultExtractor: ue,
637
657
  ...r
638
658
  }, e[0] = r, e[1] = t) : t = e[1];
639
- const n = t, o = L(n), {
640
- loading: c,
641
- result: s,
659
+ const n = t, o = $(n), {
660
+ loading: l,
661
+ result: c,
642
662
  error: u,
643
663
  status: i,
644
- execute: m,
645
- reset: a,
646
- abort: f
664
+ execute: y,
665
+ reset: f,
666
+ abort: a
647
667
  } = Y(n);
648
668
  let d;
649
- e[2] !== m || e[3] !== o ? (d = /* @__PURE__ */ l((Q) => {
650
- const v = {
669
+ e[2] !== y || e[3] !== o ? (d = /* @__PURE__ */ s((S) => {
670
+ const Q = {
651
671
  url: o.current.url,
652
672
  method: "POST",
653
- body: Q
673
+ body: S
654
674
  };
655
- return m(v);
656
- }, "t1"), e[2] = m, e[3] = o, e[4] = d) : d = e[4];
657
- const b = d;
658
- let y;
659
- e[5] !== b || e[6] !== n.autoExecute || e[7] !== n.initialQuery ? (y = {
675
+ return y(Q);
676
+ }, "t1"), e[2] = y, e[3] = o, e[4] = d) : d = e[4];
677
+ const m = d;
678
+ let b;
679
+ e[5] !== m || e[6] !== n.autoExecute || e[7] !== n.deps || e[8] !== n.initialQuery ? (b = {
660
680
  initialQuery: n.initialQuery,
661
681
  autoExecute: n.autoExecute,
662
- execute: b
663
- }, e[5] = b, e[6] = n.autoExecute, e[7] = n.initialQuery, e[8] = y) : y = e[8];
682
+ execute: m,
683
+ deps: n.deps
684
+ }, e[5] = m, e[6] = n.autoExecute, e[7] = n.deps, e[8] = n.initialQuery, e[9] = b) : b = e[9];
664
685
  const {
665
- getQuery: h,
686
+ getQuery: x,
666
687
  setQuery: g
667
- } = j(y);
668
- let x;
669
- e[9] !== b || e[10] !== h ? (x = /* @__PURE__ */ l(() => b(h()), "t3"), e[9] = b, e[10] = h, e[11] = x) : x = e[11];
670
- const S = x;
671
- let E;
672
- return e[12] !== f || e[13] !== u || e[14] !== S || e[15] !== h || e[16] !== c || e[17] !== a || e[18] !== s || e[19] !== g || e[20] !== i ? (E = {
673
- loading: c,
674
- result: s,
688
+ } = j(b);
689
+ let h;
690
+ e[10] !== m || e[11] !== x ? (h = /* @__PURE__ */ s(() => m(x()), "t3"), e[10] = m, e[11] = x, e[12] = h) : h = e[12];
691
+ const E = h;
692
+ let v;
693
+ return e[13] !== a || e[14] !== u || e[15] !== E || e[16] !== x || e[17] !== l || e[18] !== f || e[19] !== c || e[20] !== g || e[21] !== i ? (v = {
694
+ loading: l,
695
+ result: c,
675
696
  error: u,
676
697
  status: i,
677
- execute: S,
678
- reset: a,
679
- abort: f,
680
- getQuery: h,
698
+ execute: E,
699
+ reset: f,
700
+ abort: a,
701
+ getQuery: x,
681
702
  setQuery: g
682
- }, e[12] = f, e[13] = u, e[14] = S, e[15] = h, e[16] = c, e[17] = a, e[18] = s, e[19] = g, e[20] = i, e[21] = E) : E = e[21], E;
703
+ }, e[13] = a, e[14] = u, e[15] = E, e[16] = x, e[17] = l, e[18] = f, e[19] = c, e[20] = g, e[21] = i, e[22] = v) : v = e[22], v;
683
704
  }
684
- l(A, "useFetcherQuery");
685
- function Pe(r) {
686
- return A(r);
687
- }
688
- l(Pe, "useFetcherCountQuery");
705
+ s(A, "useFetcherQuery");
689
706
  function Ae(r) {
690
707
  return A(r);
691
708
  }
692
- l(Ae, "useFetcherListQuery");
709
+ s(Ae, "useFetcherCountQuery");
693
710
  function De(r) {
711
+ return A(r);
712
+ }
713
+ s(De, "useFetcherListQuery");
714
+ function Me(r) {
694
715
  const e = w(2);
695
716
  let t;
696
717
  return e[0] !== r ? (t = {
697
718
  ...r,
698
- resultExtractor: ue
719
+ resultExtractor: oe
699
720
  }, e[0] = r, e[1] = t) : t = e[1], A(t);
700
721
  }
701
- l(De, "useFetcherListStreamQuery");
702
- function Me(r) {
722
+ s(Me, "useFetcherListStreamQuery");
723
+ function Te(r) {
703
724
  return A(r);
704
725
  }
705
- l(Me, "useFetcherPagedQuery");
706
- function Te(r) {
726
+ s(Te, "useFetcherPagedQuery");
727
+ function qe(r) {
707
728
  return A(r);
708
729
  }
709
- l(Te, "useFetcherSingleQuery");
730
+ s(qe, "useFetcherSingleQuery");
710
731
  function Ue(r) {
711
732
  return P(r);
712
733
  }
713
- l(Ue, "useCountQuery");
714
- function qe(r) {
715
- return P(r);
716
- }
717
- l(qe, "useListQuery");
734
+ s(Ue, "useCountQuery");
718
735
  function ke(r) {
719
736
  return P(r);
720
737
  }
721
- l(ke, "useListStreamQuery");
738
+ s(ke, "useListQuery");
722
739
  function ze(r) {
723
740
  return P(r);
724
741
  }
725
- l(ze, "usePagedQuery");
742
+ s(ze, "useListStreamQuery");
726
743
  function Ge(r) {
727
744
  return P(r);
728
745
  }
729
- l(Ge, "useSingleQuery");
746
+ s(Ge, "usePagedQuery");
730
747
  function Ke(r) {
748
+ return P(r);
749
+ }
750
+ s(Ke, "useSingleQuery");
751
+ function Ne(r) {
731
752
  const e = w(13), {
732
753
  bus: t,
733
754
  handler: n
734
755
  } = r;
735
756
  let o;
736
- e[0] !== t || e[1] !== n ? (o = /* @__PURE__ */ l(() => t.on(n), "t0"), e[0] = t, e[1] = n, e[2] = o) : o = e[2];
737
- const c = o;
738
- let s;
739
- e[3] !== t || e[4] !== n.name ? (s = /* @__PURE__ */ l(() => t.off(n.name), "t1"), e[3] = t, e[4] = n.name, e[5] = s) : s = e[5];
740
- const u = s;
741
- let i, m;
742
- e[6] !== t || e[7] !== n ? (i = /* @__PURE__ */ l(() => (t.on(n) || console.warn(`Failed to subscribe to event bus with handler: ${n.name}`), () => {
757
+ e[0] !== t || e[1] !== n ? (o = /* @__PURE__ */ s(() => t.on(n), "t0"), e[0] = t, e[1] = n, e[2] = o) : o = e[2];
758
+ const l = o;
759
+ let c;
760
+ e[3] !== t || e[4] !== n.name ? (c = /* @__PURE__ */ s(() => t.off(n.name), "t1"), e[3] = t, e[4] = n.name, e[5] = c) : c = e[5];
761
+ const u = c;
762
+ let i, y;
763
+ e[6] !== t || e[7] !== n ? (i = /* @__PURE__ */ s(() => (t.on(n) || console.warn(`Failed to subscribe to event bus with handler: ${n.name}`), () => {
743
764
  t.off(n.name);
744
- }), "t2"), m = [t, n], e[6] = t, e[7] = n, e[8] = i, e[9] = m) : (i = e[8], m = e[9]), $(i, m);
745
- let a;
746
- return e[10] !== c || e[11] !== u ? (a = {
747
- subscribe: c,
765
+ }), "t2"), y = [t, n], e[6] = t, e[7] = n, e[8] = i, e[9] = y) : (i = e[8], y = e[9]), I(i, y);
766
+ let f;
767
+ return e[10] !== l || e[11] !== u ? (f = {
768
+ subscribe: l,
748
769
  unsubscribe: u
749
- }, e[10] = c, e[11] = u, e[12] = a) : a = e[12], a;
770
+ }, e[10] = l, e[11] = u, e[12] = f) : f = e[12], f;
750
771
  }
751
- l(Ke, "useEventSubscription");
772
+ s(Ne, "useEventSubscription");
752
773
  export {
753
- de as ANONYMOUS_USER,
774
+ me as ANONYMOUS_USER,
754
775
  le as PromiseStatus,
755
- Le as RouteGuard,
756
- W as SecurityContext,
757
- Ie as SecurityProvider,
776
+ Ie as RouteGuard,
777
+ V as SecurityContext,
778
+ $e as SecurityProvider,
758
779
  Ue as useCountQuery,
759
- T as useDebouncedCallback,
760
- we as useDebouncedExecutePromise,
761
- $e as useDebouncedFetcher,
762
- pe as useDebouncedFetcherQuery,
763
- Re as useDebouncedQuery,
764
- Ke as useEventSubscription,
765
- U as useExecutePromise,
780
+ M as useDebouncedCallback,
781
+ Re as useDebouncedExecutePromise,
782
+ Le as useDebouncedFetcher,
783
+ Pe as useDebouncedFetcherQuery,
784
+ Fe as useDebouncedQuery,
785
+ Ne as useEventSubscription,
786
+ q as useExecutePromise,
766
787
  Y as useFetcher,
767
- Pe as useFetcherCountQuery,
768
- Ae as useFetcherListQuery,
769
- De as useFetcherListStreamQuery,
770
- Me as useFetcherPagedQuery,
788
+ Ae as useFetcherCountQuery,
789
+ De as useFetcherListQuery,
790
+ Me as useFetcherListStreamQuery,
791
+ Te as useFetcherPagedQuery,
771
792
  A as useFetcherQuery,
772
- Te as useFetcherSingleQuery,
793
+ qe as useFetcherSingleQuery,
773
794
  Ce as useForceUpdate,
774
795
  Oe as useImmerKeyStorage,
775
796
  J as useKeyStorage,
776
- L as useLatest,
777
- qe as useListQuery,
778
- ke as useListStreamQuery,
779
- V as useMounted,
780
- ze as usePagedQuery,
797
+ $ as useLatest,
798
+ ke as useListQuery,
799
+ ze as useListStreamQuery,
800
+ W as useMounted,
801
+ Ge as usePagedQuery,
781
802
  ie as usePromiseState,
782
803
  P as useQuery,
783
804
  j as useQueryState,
784
- Fe as useRefs,
805
+ pe as useRefs,
785
806
  ae as useRequestId,
786
- me as useSecurity,
807
+ ye as useSecurity,
787
808
  be as useSecurityContext,
788
- Ge as useSingleQuery
809
+ Ke as useSingleQuery
789
810
  };
790
811
  //# sourceMappingURL=index.es.js.map