@ahoo-wang/fetcher-react 3.6.8 → 3.8.0

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