zudoku 0.3.0-dev.33 → 0.3.0-dev.35

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.
Files changed (58) hide show
  1. package/dist/app/main.js +1 -2
  2. package/dist/app/main.js.map +1 -1
  3. package/dist/lib/components/index.d.ts +3 -0
  4. package/dist/lib/components/index.js +2 -0
  5. package/dist/lib/components/index.js.map +1 -1
  6. package/dist/vite/config.js +1 -1
  7. package/dist/vite/config.js.map +1 -1
  8. package/dist/vite/plugin-component.js +1 -1
  9. package/dist/vite/plugin-component.js.map +1 -1
  10. package/lib/{index.esm-CPEExBJE.js → AnchorLink-DCzimaMt.js} +166 -156
  11. package/lib/AnchorLink-DCzimaMt.js.map +1 -0
  12. package/lib/{DevPortalProvider-BlxLX6GG.js → DevPortalProvider-Demv4Ngx.js} +250 -230
  13. package/lib/DevPortalProvider-Demv4Ngx.js.map +1 -0
  14. package/lib/{Markdown-CL8KPvJN.js → Markdown-kde-UTpz.js} +3 -3
  15. package/lib/{Markdown-CL8KPvJN.js.map → Markdown-kde-UTpz.js.map} +1 -1
  16. package/lib/{MdxComponents-Ev_hBHb2.js → MdxComponents-BZ-Y_6jI.js} +8 -8
  17. package/lib/{MdxComponents-Ev_hBHb2.js.map → MdxComponents-BZ-Y_6jI.js.map} +1 -1
  18. package/lib/{MdxPage-Z3HKNTrj.js → MdxPage-CGTgSCJL.js} +82 -88
  19. package/lib/MdxPage-CGTgSCJL.js.map +1 -0
  20. package/lib/{OperationList-DfkWNe8Y.js → OperationList-BDAtLdf9.js} +1693 -1862
  21. package/lib/OperationList-BDAtLdf9.js.map +1 -0
  22. package/lib/{Route-Bf1_D_vC.js → Route-BqfQoDR2.js} +2 -2
  23. package/lib/{Route-Bf1_D_vC.js.map → Route-BqfQoDR2.js.map} +1 -1
  24. package/lib/Select-DIOQWPp3.js +4571 -0
  25. package/lib/Select-DIOQWPp3.js.map +1 -0
  26. package/lib/Spinner-B9MAj2Pw.js +182 -0
  27. package/lib/Spinner-B9MAj2Pw.js.map +1 -0
  28. package/lib/{hook-CTmJ6CWq.js → hook-D1DiFbcT.js} +3 -3
  29. package/lib/{hook-CTmJ6CWq.js.map → hook-D1DiFbcT.js.map} +1 -1
  30. package/lib/index-BB2EBBgh.js +412 -0
  31. package/lib/index-BB2EBBgh.js.map +1 -0
  32. package/lib/{index-BjSy8IQO.js → index-CdZQPXUQ.js} +6 -6
  33. package/lib/{index-BjSy8IQO.js.map → index-CdZQPXUQ.js.map} +1 -1
  34. package/lib/{jsx-runtime-CM0TzjGp.js → jsx-runtime-Bt86M5tA.js} +5 -5
  35. package/lib/{jsx-runtime-CM0TzjGp.js.map → jsx-runtime-Bt86M5tA.js.map} +1 -1
  36. package/lib/util-CYBrkBUo.js +41 -0
  37. package/lib/util-CYBrkBUo.js.map +1 -0
  38. package/lib/zudoku.auth-openid.js +1 -1
  39. package/lib/zudoku.components.js +548 -280
  40. package/lib/zudoku.components.js.map +1 -1
  41. package/lib/zudoku.plugin-api-keys.js +99 -111
  42. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  43. package/lib/zudoku.plugin-markdown.js +46 -2
  44. package/lib/zudoku.plugin-markdown.js.map +1 -1
  45. package/lib/zudoku.plugin-openapi.js +3 -3
  46. package/package.json +1 -1
  47. package/src/app/main.tsx +1 -2
  48. package/src/lib/components/index.ts +2 -0
  49. package/lib/DevPortalProvider-BlxLX6GG.js.map +0 -1
  50. package/lib/MdxPage-Z3HKNTrj.js.map +0 -1
  51. package/lib/OperationList-DfkWNe8Y.js.map +0 -1
  52. package/lib/Select-DSa3bN4t.js +0 -4770
  53. package/lib/Select-DSa3bN4t.js.map +0 -1
  54. package/lib/index-BdWBDosx.js +0 -74
  55. package/lib/index-BdWBDosx.js.map +0 -1
  56. package/lib/index.esm-CPEExBJE.js.map +0 -1
  57. package/lib/mutation-91kw0lHb.js +0 -208
  58. package/lib/mutation-91kw0lHb.js.map +0 -1
@@ -1,13 +1,13 @@
1
- var Tt = (e) => {
1
+ var At = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
- var ct = (e, t, s) => t.has(e) || Tt("Cannot " + s);
5
- var r = (e, t, s) => (ct(e, t, "read from private field"), s ? s.call(e) : t.get(e)), f = (e, t, s) => t.has(e) ? Tt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), h = (e, t, s, i) => (ct(e, t, "write to private field"), i ? i.call(e, s) : t.set(e, s), s), v = (e, t, s) => (ct(e, t, "access private method"), s);
6
- import * as U from "react";
7
- import { createContext as ee, useContext as se } from "react";
8
- import { j as re, c as ie } from "./jsx-runtime-CM0TzjGp.js";
9
- import { m as ne } from "./router-CcYTwKjf.js";
10
- var Et = class {
4
+ var ct = (e, t, s) => t.has(e) || At("Cannot " + s);
5
+ var r = (e, t, s) => (ct(e, t, "read from private field"), s ? s.call(e) : t.get(e)), f = (e, t, s) => t.has(e) ? At("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), h = (e, t, s, i) => (ct(e, t, "write to private field"), i ? i.call(e, s) : t.set(e, s), s), v = (e, t, s) => (ct(e, t, "access private method"), s);
6
+ import * as T from "react";
7
+ import { createContext as re, useContext as ie } from "react";
8
+ import { j as ne, u as ae } from "./jsx-runtime-Bt86M5tA.js";
9
+ import { m as oe } from "./router-CcYTwKjf.js";
10
+ var Dt = class {
11
11
  constructor() {
12
12
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
13
13
  }
@@ -26,22 +26,22 @@ var Et = class {
26
26
  }, st = typeof window > "u" || "Deno" in globalThis;
27
27
  function dt() {
28
28
  }
29
- function Me(e, t) {
29
+ function Ne(e, t) {
30
30
  return typeof e == "function" ? e(t) : e;
31
31
  }
32
32
  function ft(e) {
33
33
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
34
34
  }
35
- function _t(e, t) {
35
+ function Bt(e, t) {
36
36
  return Math.max(e + (t || 0) - Date.now(), 0);
37
37
  }
38
38
  function ut(e, t) {
39
39
  return typeof e == "function" ? e(t) : e;
40
40
  }
41
- function Q(e, t) {
41
+ function A(e, t) {
42
42
  return typeof e == "function" ? e(t) : e;
43
43
  }
44
- function Le(e, t) {
44
+ function Ke(e, t) {
45
45
  const {
46
46
  type: s = "all",
47
47
  exact: i,
@@ -52,9 +52,9 @@ function Le(e, t) {
52
52
  } = e;
53
53
  if (o) {
54
54
  if (i) {
55
- if (t.queryHash !== ae(o, t.options))
55
+ if (t.queryHash !== ue(o, t.options))
56
56
  return !1;
57
- } else if (!Dt(t.queryKey, o))
57
+ } else if (!Pt(t.queryKey, o))
58
58
  return !1;
59
59
  }
60
60
  if (s !== "all") {
@@ -64,7 +64,7 @@ function Le(e, t) {
64
64
  }
65
65
  return !(typeof l == "boolean" && t.isStale() !== l || n && n !== t.state.fetchStatus || c && !c(t));
66
66
  }
67
- function ke(e, t) {
67
+ function _e(e, t) {
68
68
  const { exact: s, status: i, predicate: n, mutationKey: c } = e;
69
69
  if (c) {
70
70
  if (!t.options.mutationKey)
@@ -72,12 +72,12 @@ function ke(e, t) {
72
72
  if (s) {
73
73
  if (yt(t.options.mutationKey) !== yt(c))
74
74
  return !1;
75
- } else if (!Dt(t.options.mutationKey, c))
75
+ } else if (!Pt(t.options.mutationKey, c))
76
76
  return !1;
77
77
  }
78
78
  return !(i && t.state.status !== i || n && !n(t));
79
79
  }
80
- function ae(e, t) {
80
+ function ue(e, t) {
81
81
  return ((t == null ? void 0 : t.queryKeyHashFn) || yt)(e);
82
82
  }
83
83
  function yt(e) {
@@ -86,10 +86,10 @@ function yt(e) {
86
86
  (t, s) => vt(s) ? Object.keys(s).sort().reduce((i, n) => (i[n] = s[n], i), {}) : s
87
87
  );
88
88
  }
89
- function Dt(e, t) {
90
- return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Dt(e[s], t[s])) : !1;
89
+ function Pt(e, t) {
90
+ return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Pt(e[s], t[s])) : !1;
91
91
  }
92
- function Bt(e, t) {
92
+ function Gt(e, t) {
93
93
  if (e === t)
94
94
  return e;
95
95
  const s = It(e) && It(t);
@@ -98,7 +98,7 @@ function Bt(e, t) {
98
98
  let b = 0;
99
99
  for (let R = 0; R < o; R++) {
100
100
  const m = s ? R : c[R];
101
- (!s && i.includes(m) || s) && e[m] === void 0 && t[m] === void 0 ? (l[m] = void 0, b++) : (l[m] = Bt(e[m], t[m]), l[m] === e[m] && e[m] !== void 0 && b++);
101
+ (!s && i.includes(m) || s) && e[m] === void 0 && t[m] === void 0 ? (l[m] = void 0, b++) : (l[m] = Gt(e[m], t[m]), l[m] === e[m] && e[m] !== void 0 && b++);
102
102
  }
103
103
  return n === o && b === n ? e : l;
104
104
  }
@@ -116,39 +116,39 @@ function It(e) {
116
116
  return Array.isArray(e) && e.length === Object.keys(e).length;
117
117
  }
118
118
  function vt(e) {
119
- if (!Qt(e))
119
+ if (!xt(e))
120
120
  return !1;
121
121
  const t = e.constructor;
122
122
  if (t === void 0)
123
123
  return !0;
124
124
  const s = t.prototype;
125
- return !(!Qt(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
125
+ return !(!xt(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
126
126
  }
127
- function Qt(e) {
127
+ function xt(e) {
128
128
  return Object.prototype.toString.call(e) === "[object Object]";
129
129
  }
130
- function oe(e) {
130
+ function he(e) {
131
131
  return new Promise((t) => {
132
132
  setTimeout(t, e);
133
133
  });
134
134
  }
135
135
  function mt(e, t, s) {
136
- return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? Bt(e, t) : t;
136
+ return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? Gt(e, t) : t;
137
137
  }
138
- function Ke(e, t, s = 0) {
138
+ function Be(e, t, s = 0) {
139
139
  const i = [...e, t];
140
140
  return s && i.length > s ? i.slice(1) : i;
141
141
  }
142
- function Ne(e, t, s = 0) {
142
+ function Ge(e, t, s = 0) {
143
143
  const i = [t, ...e];
144
144
  return s && i.length > s ? i.slice(0, -1) : i;
145
145
  }
146
- var qt = Symbol(), ue = (e, t) => (process.env.NODE_ENV !== "production" && e.queryFn === qt && console.error(
146
+ var bt = Symbol(), ce = (e, t) => (process.env.NODE_ENV !== "production" && e.queryFn === bt && console.error(
147
147
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
148
- ), !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn === qt ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn), K, M, z, Mt, he = (Mt = class extends Et {
148
+ ), !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn === bt ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn), N, M, z, kt, le = (kt = class extends Dt {
149
149
  constructor() {
150
150
  super();
151
- f(this, K);
151
+ f(this, N);
152
152
  f(this, M);
153
153
  f(this, z);
154
154
  h(this, z, (t) => {
@@ -174,7 +174,7 @@ var qt = Symbol(), ue = (e, t) => (process.env.NODE_ENV !== "production" && e.qu
174
174
  }));
175
175
  }
176
176
  setFocused(t) {
177
- r(this, K) !== t && (h(this, K, t), this.onFocus());
177
+ r(this, N) !== t && (h(this, N, t), this.onFocus());
178
178
  }
179
179
  onFocus() {
180
180
  const t = this.isFocused();
@@ -184,13 +184,13 @@ var qt = Symbol(), ue = (e, t) => (process.env.NODE_ENV !== "production" && e.qu
184
184
  }
185
185
  isFocused() {
186
186
  var t;
187
- return typeof r(this, K) == "boolean" ? r(this, K) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
187
+ return typeof r(this, N) == "boolean" ? r(this, N) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
188
188
  }
189
- }, K = new WeakMap(), M = new WeakMap(), z = new WeakMap(), Mt), Gt = new he(), $, L, W, Lt, ce = (Lt = class extends Et {
189
+ }, N = new WeakMap(), M = new WeakMap(), z = new WeakMap(), kt), Ht = new le(), $, k, W, Lt, de = (Lt = class extends Dt {
190
190
  constructor() {
191
191
  super();
192
192
  f(this, $, !0);
193
- f(this, L);
193
+ f(this, k);
194
194
  f(this, W);
195
195
  h(this, W, (t) => {
196
196
  if (!st && window.addEventListener) {
@@ -202,15 +202,15 @@ var qt = Symbol(), ue = (e, t) => (process.env.NODE_ENV !== "production" && e.qu
202
202
  });
203
203
  }
204
204
  onSubscribe() {
205
- r(this, L) || this.setEventListener(r(this, W));
205
+ r(this, k) || this.setEventListener(r(this, W));
206
206
  }
207
207
  onUnsubscribe() {
208
208
  var t;
209
- this.hasListeners() || ((t = r(this, L)) == null || t.call(this), h(this, L, void 0));
209
+ this.hasListeners() || ((t = r(this, k)) == null || t.call(this), h(this, k, void 0));
210
210
  }
211
211
  setEventListener(t) {
212
212
  var s;
213
- h(this, W, t), (s = r(this, L)) == null || s.call(this), h(this, L, t(this.setOnline.bind(this)));
213
+ h(this, W, t), (s = r(this, k)) == null || s.call(this), h(this, k, t(this.setOnline.bind(this)));
214
214
  }
215
215
  setOnline(t) {
216
216
  r(this, $) !== t && (h(this, $, t), this.listeners.forEach((i) => {
@@ -220,53 +220,53 @@ var qt = Symbol(), ue = (e, t) => (process.env.NODE_ENV !== "production" && e.qu
220
220
  isOnline() {
221
221
  return r(this, $);
222
222
  }
223
- }, $ = new WeakMap(), L = new WeakMap(), W = new WeakMap(), Lt), Ht = new ce();
224
- function le(e) {
223
+ }, $ = new WeakMap(), k = new WeakMap(), W = new WeakMap(), Lt), Vt = new de();
224
+ function fe(e) {
225
225
  return Math.min(1e3 * 2 ** e, 3e4);
226
226
  }
227
- function Vt(e) {
228
- return (e ?? "online") === "online" ? Ht.isOnline() : !0;
227
+ function zt(e) {
228
+ return (e ?? "online") === "online" ? Vt.isOnline() : !0;
229
229
  }
230
- var zt = class {
230
+ var $t = class {
231
231
  constructor(e) {
232
232
  this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
233
233
  }
234
234
  };
235
235
  function lt(e) {
236
- return e instanceof zt;
236
+ return e instanceof $t;
237
237
  }
238
- function de(e) {
238
+ function ye(e) {
239
239
  let t = !1, s = 0, i = !1, n, c, o;
240
- const l = new Promise((g, C) => {
241
- c = g, o = C;
240
+ const l = new Promise((g, S) => {
241
+ c = g, o = S;
242
242
  }), b = (g) => {
243
- var C;
244
- i || (O(new zt(g)), (C = e.abort) == null || C.call(e));
243
+ var S;
244
+ i || (O(new $t(g)), (S = e.abort) == null || S.call(e));
245
245
  }, R = () => {
246
246
  t = !0;
247
247
  }, m = () => {
248
248
  t = !1;
249
- }, a = () => Gt.isFocused() && (e.networkMode === "always" || Ht.isOnline()) && e.canRun(), u = () => Vt(e.networkMode) && e.canRun(), p = (g) => {
250
- var C;
251
- i || (i = !0, (C = e.onSuccess) == null || C.call(e, g), n == null || n(), c(g));
249
+ }, a = () => Ht.isFocused() && (e.networkMode === "always" || Vt.isOnline()) && e.canRun(), u = () => zt(e.networkMode) && e.canRun(), p = (g) => {
250
+ var S;
251
+ i || (i = !0, (S = e.onSuccess) == null || S.call(e, g), n == null || n(), c(g));
252
252
  }, O = (g) => {
253
- var C;
254
- i || (i = !0, (C = e.onError) == null || C.call(e, g), n == null || n(), o(g));
255
- }, A = () => new Promise((g) => {
256
- var C;
253
+ var S;
254
+ i || (i = !0, (S = e.onError) == null || S.call(e, g), n == null || n(), o(g));
255
+ }, U = () => new Promise((g) => {
256
+ var S;
257
257
  n = (D) => {
258
258
  (i || a()) && g(D);
259
- }, (C = e.onPause) == null || C.call(e);
259
+ }, (S = e.onPause) == null || S.call(e);
260
260
  }).then(() => {
261
261
  var g;
262
262
  n = void 0, i || (g = e.onContinue) == null || g.call(e);
263
- }), T = () => {
263
+ }), Q = () => {
264
264
  if (i)
265
265
  return;
266
266
  let g;
267
- const C = s === 0 ? e.initialPromise : void 0;
267
+ const S = s === 0 ? e.initialPromise : void 0;
268
268
  try {
269
- g = C ?? e.fn();
269
+ g = S ?? e.fn();
270
270
  } catch (D) {
271
271
  g = Promise.reject(D);
272
272
  }
@@ -274,13 +274,13 @@ function de(e) {
274
274
  var w;
275
275
  if (i)
276
276
  return;
277
- const j = e.retry ?? (st ? 0 : 3), V = e.retryDelay ?? le, At = typeof V == "function" ? V(s, D) : V, ot = j === !0 || typeof j == "number" && s < j || typeof j == "function" && j(s, D);
277
+ const j = e.retry ?? (st ? 0 : 3), V = e.retryDelay ?? fe, qt = typeof V == "function" ? V(s, D) : V, ot = j === !0 || typeof j == "number" && s < j || typeof j == "function" && j(s, D);
278
278
  if (t || !ot) {
279
279
  O(D);
280
280
  return;
281
281
  }
282
- s++, (w = e.onFail) == null || w.call(e, s, D), oe(At).then(() => a() ? void 0 : A()).then(() => {
283
- t ? O(D) : T();
282
+ s++, (w = e.onFail) == null || w.call(e, s, D), he(qt).then(() => a() ? void 0 : U()).then(() => {
283
+ t ? O(D) : Q();
284
284
  });
285
285
  });
286
286
  };
@@ -291,10 +291,10 @@ function de(e) {
291
291
  cancelRetry: R,
292
292
  continueRetry: m,
293
293
  canStart: u,
294
- start: () => (u() ? T() : A().then(T), l)
294
+ start: () => (u() ? Q() : U().then(Q), l)
295
295
  };
296
296
  }
297
- function fe() {
297
+ function pe() {
298
298
  let e = [], t = 0, s = (u) => {
299
299
  u();
300
300
  }, i = (u) => {
@@ -342,15 +342,15 @@ function fe() {
342
342
  setScheduler: c
343
343
  };
344
344
  }
345
- var Pt = fe(), N, kt, ye = (kt = class {
345
+ var Tt = pe(), K, Nt, ve = (Nt = class {
346
346
  constructor() {
347
- f(this, N);
347
+ f(this, K);
348
348
  }
349
349
  destroy() {
350
350
  this.clearGcTimeout();
351
351
  }
352
352
  scheduleGc() {
353
- this.clearGcTimeout(), ft(this.gcTime) && h(this, N, setTimeout(() => {
353
+ this.clearGcTimeout(), ft(this.gcTime) && h(this, K, setTimeout(() => {
354
354
  this.optionalRemove();
355
355
  }, this.gcTime));
356
356
  }
@@ -361,26 +361,26 @@ var Pt = fe(), N, kt, ye = (kt = class {
361
361
  );
362
362
  }
363
363
  clearGcTimeout() {
364
- r(this, N) && (clearTimeout(r(this, N)), h(this, N, void 0));
364
+ r(this, K) && (clearTimeout(r(this, K)), h(this, K, void 0));
365
365
  }
366
- }, N = new WeakMap(), kt), J, X, P, S, it, _, I, x, Kt, _e = (Kt = class extends ye {
366
+ }, K = new WeakMap(), Nt), J, X, P, C, it, _, q, x, Kt, He = (Kt = class extends ve {
367
367
  constructor(t) {
368
368
  super();
369
- f(this, I);
369
+ f(this, q);
370
370
  f(this, J);
371
371
  f(this, X);
372
372
  f(this, P);
373
- f(this, S);
373
+ f(this, C);
374
374
  f(this, it);
375
375
  f(this, _);
376
- h(this, _, !1), h(this, it, t.defaultOptions), this.setOptions(t.options), this.observers = [], h(this, P, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, h(this, J, t.state || pe(this.options)), this.state = r(this, J), this.scheduleGc();
376
+ h(this, _, !1), h(this, it, t.defaultOptions), this.setOptions(t.options), this.observers = [], h(this, P, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, h(this, J, t.state || me(this.options)), this.state = r(this, J), this.scheduleGc();
377
377
  }
378
378
  get meta() {
379
379
  return this.options.meta;
380
380
  }
381
381
  get promise() {
382
382
  var t;
383
- return (t = r(this, S)) == null ? void 0 : t.promise;
383
+ return (t = r(this, C)) == null ? void 0 : t.promise;
384
384
  }
385
385
  setOptions(t) {
386
386
  this.options = { ...r(this, it), ...t }, this.updateGcTime(this.options.gcTime);
@@ -390,7 +390,7 @@ var Pt = fe(), N, kt, ye = (kt = class {
390
390
  }
391
391
  setData(t, s) {
392
392
  const i = mt(this.state.data, t, this.options);
393
- return v(this, I, x).call(this, {
393
+ return v(this, q, x).call(this, {
394
394
  data: i,
395
395
  type: "success",
396
396
  dataUpdatedAt: s == null ? void 0 : s.updatedAt,
@@ -398,12 +398,12 @@ var Pt = fe(), N, kt, ye = (kt = class {
398
398
  }), i;
399
399
  }
400
400
  setState(t, s) {
401
- v(this, I, x).call(this, { type: "setState", state: t, setStateOptions: s });
401
+ v(this, q, x).call(this, { type: "setState", state: t, setStateOptions: s });
402
402
  }
403
403
  cancel(t) {
404
404
  var i, n;
405
- const s = (i = r(this, S)) == null ? void 0 : i.promise;
406
- return (n = r(this, S)) == null || n.cancel(t), s ? s.then(dt).catch(dt) : Promise.resolve();
405
+ const s = (i = r(this, C)) == null ? void 0 : i.promise;
406
+ return (n = r(this, C)) == null || n.cancel(t), s ? s.then(dt).catch(dt) : Promise.resolve();
407
407
  }
408
408
  destroy() {
409
409
  super.destroy(), this.cancel({ silent: !0 });
@@ -413,7 +413,7 @@ var Pt = fe(), N, kt, ye = (kt = class {
413
413
  }
414
414
  isActive() {
415
415
  return this.observers.some(
416
- (t) => Q(t.options.enabled, this) !== !1
416
+ (t) => A(t.options.enabled, this) !== !1
417
417
  );
418
418
  }
419
419
  isDisabled() {
@@ -425,37 +425,37 @@ var Pt = fe(), N, kt, ye = (kt = class {
425
425
  ) : this.state.data === void 0;
426
426
  }
427
427
  isStaleByTime(t = 0) {
428
- return this.state.isInvalidated || this.state.data === void 0 || !_t(this.state.dataUpdatedAt, t);
428
+ return this.state.isInvalidated || this.state.data === void 0 || !Bt(this.state.dataUpdatedAt, t);
429
429
  }
430
430
  onFocus() {
431
431
  var s;
432
432
  const t = this.observers.find((i) => i.shouldFetchOnWindowFocus());
433
- t == null || t.refetch({ cancelRefetch: !1 }), (s = r(this, S)) == null || s.continue();
433
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = r(this, C)) == null || s.continue();
434
434
  }
435
435
  onOnline() {
436
436
  var s;
437
437
  const t = this.observers.find((i) => i.shouldFetchOnReconnect());
438
- t == null || t.refetch({ cancelRefetch: !1 }), (s = r(this, S)) == null || s.continue();
438
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = r(this, C)) == null || s.continue();
439
439
  }
440
440
  addObserver(t) {
441
441
  this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), r(this, P).notify({ type: "observerAdded", query: this, observer: t }));
442
442
  }
443
443
  removeObserver(t) {
444
- this.observers.includes(t) && (this.observers = this.observers.filter((s) => s !== t), this.observers.length || (r(this, S) && (r(this, _) ? r(this, S).cancel({ revert: !0 }) : r(this, S).cancelRetry()), this.scheduleGc()), r(this, P).notify({ type: "observerRemoved", query: this, observer: t }));
444
+ this.observers.includes(t) && (this.observers = this.observers.filter((s) => s !== t), this.observers.length || (r(this, C) && (r(this, _) ? r(this, C).cancel({ revert: !0 }) : r(this, C).cancelRetry()), this.scheduleGc()), r(this, P).notify({ type: "observerRemoved", query: this, observer: t }));
445
445
  }
446
446
  getObserversCount() {
447
447
  return this.observers.length;
448
448
  }
449
449
  invalidate() {
450
- this.state.isInvalidated || v(this, I, x).call(this, { type: "invalidate" });
450
+ this.state.isInvalidated || v(this, q, x).call(this, { type: "invalidate" });
451
451
  }
452
452
  fetch(t, s) {
453
453
  var b, R, m;
454
454
  if (this.state.fetchStatus !== "idle") {
455
455
  if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
456
456
  this.cancel({ silent: !0 });
457
- else if (r(this, S))
458
- return r(this, S).continueRetry(), r(this, S).promise;
457
+ else if (r(this, C))
458
+ return r(this, C).continueRetry(), r(this, C).promise;
459
459
  }
460
460
  if (t && this.setOptions(t), !this.options.queryFn) {
461
461
  const a = this.observers.find((u) => u.options.queryFn);
@@ -470,7 +470,7 @@ var Pt = fe(), N, kt, ye = (kt = class {
470
470
  get: () => (h(this, _, !0), i.signal)
471
471
  });
472
472
  }, c = () => {
473
- const a = ue(this.options, s), u = {
473
+ const a = ce(this.options, s), u = {
474
474
  queryKey: this.queryKey,
475
475
  meta: this.meta
476
476
  };
@@ -489,36 +489,36 @@ var Pt = fe(), N, kt, ye = (kt = class {
489
489
  n(o), (b = this.options.behavior) == null || b.onFetch(
490
490
  o,
491
491
  this
492
- ), h(this, X, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((R = o.fetchOptions) == null ? void 0 : R.meta)) && v(this, I, x).call(this, { type: "fetch", meta: (m = o.fetchOptions) == null ? void 0 : m.meta });
492
+ ), h(this, X, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((R = o.fetchOptions) == null ? void 0 : R.meta)) && v(this, q, x).call(this, { type: "fetch", meta: (m = o.fetchOptions) == null ? void 0 : m.meta });
493
493
  const l = (a) => {
494
- var u, p, O, A;
495
- lt(a) && a.silent || v(this, I, x).call(this, {
494
+ var u, p, O, U;
495
+ lt(a) && a.silent || v(this, q, x).call(this, {
496
496
  type: "error",
497
497
  error: a
498
498
  }), lt(a) || ((p = (u = r(this, P).config).onError) == null || p.call(
499
499
  u,
500
500
  a,
501
501
  this
502
- ), (A = (O = r(this, P).config).onSettled) == null || A.call(
502
+ ), (U = (O = r(this, P).config).onSettled) == null || U.call(
503
503
  O,
504
504
  this.state.data,
505
505
  a,
506
506
  this
507
507
  )), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
508
508
  };
509
- return h(this, S, de({
509
+ return h(this, C, ye({
510
510
  initialPromise: s == null ? void 0 : s.initialPromise,
511
511
  fn: o.fetchFn,
512
512
  abort: i.abort.bind(i),
513
513
  onSuccess: (a) => {
514
- var u, p, O, A;
514
+ var u, p, O, U;
515
515
  if (a === void 0) {
516
516
  process.env.NODE_ENV !== "production" && console.error(
517
517
  `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
518
518
  ), l(new Error(`${this.queryHash} data is undefined`));
519
519
  return;
520
520
  }
521
- this.setData(a), (p = (u = r(this, P).config).onSuccess) == null || p.call(u, a, this), (A = (O = r(this, P).config).onSettled) == null || A.call(
521
+ this.setData(a), (p = (u = r(this, P).config).onSuccess) == null || p.call(u, a, this), (U = (O = r(this, P).config).onSettled) == null || U.call(
522
522
  O,
523
523
  a,
524
524
  this.state.error,
@@ -527,21 +527,21 @@ var Pt = fe(), N, kt, ye = (kt = class {
527
527
  },
528
528
  onError: l,
529
529
  onFail: (a, u) => {
530
- v(this, I, x).call(this, { type: "failed", failureCount: a, error: u });
530
+ v(this, q, x).call(this, { type: "failed", failureCount: a, error: u });
531
531
  },
532
532
  onPause: () => {
533
- v(this, I, x).call(this, { type: "pause" });
533
+ v(this, q, x).call(this, { type: "pause" });
534
534
  },
535
535
  onContinue: () => {
536
- v(this, I, x).call(this, { type: "continue" });
536
+ v(this, q, x).call(this, { type: "continue" });
537
537
  },
538
538
  retry: o.options.retry,
539
539
  retryDelay: o.options.retryDelay,
540
540
  networkMode: o.options.networkMode,
541
541
  canRun: () => !0
542
- })), r(this, S).start();
542
+ })), r(this, C).start();
543
543
  }
544
- }, J = new WeakMap(), X = new WeakMap(), P = new WeakMap(), S = new WeakMap(), it = new WeakMap(), _ = new WeakMap(), I = new WeakSet(), x = function(t) {
544
+ }, J = new WeakMap(), X = new WeakMap(), P = new WeakMap(), C = new WeakMap(), it = new WeakMap(), _ = new WeakMap(), q = new WeakSet(), x = function(t) {
545
545
  const s = (i) => {
546
546
  switch (t.type) {
547
547
  case "failed":
@@ -563,7 +563,7 @@ var Pt = fe(), N, kt, ye = (kt = class {
563
563
  case "fetch":
564
564
  return {
565
565
  ...i,
566
- ...$t(i.data, this.options),
566
+ ...Wt(i.data, this.options),
567
567
  fetchMeta: t.meta ?? null
568
568
  };
569
569
  case "success":
@@ -605,24 +605,24 @@ var Pt = fe(), N, kt, ye = (kt = class {
605
605
  };
606
606
  }
607
607
  };
608
- this.state = s(this.state), Pt.batch(() => {
608
+ this.state = s(this.state), Tt.batch(() => {
609
609
  this.observers.forEach((i) => {
610
610
  i.onQueryUpdate();
611
611
  }), r(this, P).notify({ query: this, type: "updated", action: t });
612
612
  });
613
613
  }, Kt);
614
- function $t(e, t) {
614
+ function Wt(e, t) {
615
615
  return {
616
616
  fetchFailureCount: 0,
617
617
  fetchFailureReason: null,
618
- fetchStatus: Vt(t.networkMode) ? "fetching" : "paused",
618
+ fetchStatus: zt(t.networkMode) ? "fetching" : "paused",
619
619
  ...e === void 0 && {
620
620
  error: null,
621
621
  status: "pending"
622
622
  }
623
623
  };
624
624
  }
625
- function pe(e) {
625
+ function me(e) {
626
626
  const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = t !== void 0, i = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
627
627
  return {
628
628
  data: t,
@@ -639,7 +639,7 @@ function pe(e) {
639
639
  fetchStatus: "idle"
640
640
  };
641
641
  }
642
- var E, d, nt, F, B, Y, q, at, Z, tt, G, H, k, et, y, rt, bt, gt, Rt, Ct, St, wt, Ft, Wt, Nt, ve = (Nt = class extends Et {
642
+ var E, d, nt, F, B, Y, I, at, Z, tt, G, H, L, et, y, rt, gt, Rt, St, Ct, wt, Ft, Ot, Xt, _t, Jt = (_t = class extends Dt {
643
643
  constructor(t, s) {
644
644
  super();
645
645
  f(this, y);
@@ -649,7 +649,7 @@ var E, d, nt, F, B, Y, q, at, Z, tt, G, H, k, et, y, rt, bt, gt, Rt, Ct, St, wt,
649
649
  f(this, F);
650
650
  f(this, B);
651
651
  f(this, Y);
652
- f(this, q);
652
+ f(this, I);
653
653
  f(this, at);
654
654
  f(this, Z);
655
655
  // This property keeps track of the last query with defined data.
@@ -657,60 +657,60 @@ var E, d, nt, F, B, Y, q, at, Z, tt, G, H, k, et, y, rt, bt, gt, Rt, Ct, St, wt,
657
657
  f(this, tt);
658
658
  f(this, G);
659
659
  f(this, H);
660
- f(this, k);
660
+ f(this, L);
661
661
  f(this, et, /* @__PURE__ */ new Set());
662
- this.options = s, h(this, E, t), h(this, q, null), this.bindMethods(), this.setOptions(s);
662
+ this.options = s, h(this, E, t), h(this, I, null), this.bindMethods(), this.setOptions(s);
663
663
  }
664
664
  bindMethods() {
665
665
  this.refetch = this.refetch.bind(this);
666
666
  }
667
667
  onSubscribe() {
668
- this.listeners.size === 1 && (r(this, d).addObserver(this), xt(r(this, d), this.options) ? v(this, y, rt).call(this) : this.updateResult(), v(this, y, Ct).call(this));
668
+ this.listeners.size === 1 && (r(this, d).addObserver(this), jt(r(this, d), this.options) ? v(this, y, rt).call(this) : this.updateResult(), v(this, y, Ct).call(this));
669
669
  }
670
670
  onUnsubscribe() {
671
671
  this.hasListeners() || this.destroy();
672
672
  }
673
673
  shouldFetchOnReconnect() {
674
- return Ot(
674
+ return Et(
675
675
  r(this, d),
676
676
  this.options,
677
677
  this.options.refetchOnReconnect
678
678
  );
679
679
  }
680
680
  shouldFetchOnWindowFocus() {
681
- return Ot(
681
+ return Et(
682
682
  r(this, d),
683
683
  this.options,
684
684
  this.options.refetchOnWindowFocus
685
685
  );
686
686
  }
687
687
  destroy() {
688
- this.listeners = /* @__PURE__ */ new Set(), v(this, y, St).call(this), v(this, y, wt).call(this), r(this, d).removeObserver(this);
688
+ this.listeners = /* @__PURE__ */ new Set(), v(this, y, wt).call(this), v(this, y, Ft).call(this), r(this, d).removeObserver(this);
689
689
  }
690
690
  setOptions(t, s) {
691
691
  const i = this.options, n = r(this, d);
692
- if (this.options = r(this, E).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof Q(this.options.enabled, r(this, d)) != "boolean")
692
+ if (this.options = r(this, E).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof A(this.options.enabled, r(this, d)) != "boolean")
693
693
  throw new Error(
694
694
  "Expected enabled to be a boolean or a callback that returns a boolean"
695
695
  );
696
- v(this, y, Ft).call(this), r(this, d).setOptions(this.options), i._defaulted && !pt(this.options, i) && r(this, E).getQueryCache().notify({
696
+ v(this, y, Ot).call(this), r(this, d).setOptions(this.options), i._defaulted && !pt(this.options, i) && r(this, E).getQueryCache().notify({
697
697
  type: "observerOptionsUpdated",
698
698
  query: r(this, d),
699
699
  observer: this
700
700
  });
701
701
  const c = this.hasListeners();
702
- c && jt(
702
+ c && Mt(
703
703
  r(this, d),
704
704
  n,
705
705
  this.options,
706
706
  i
707
- ) && v(this, y, rt).call(this), this.updateResult(s), c && (r(this, d) !== n || Q(this.options.enabled, r(this, d)) !== Q(i.enabled, r(this, d)) || ut(this.options.staleTime, r(this, d)) !== ut(i.staleTime, r(this, d))) && v(this, y, bt).call(this);
708
- const o = v(this, y, gt).call(this);
709
- c && (r(this, d) !== n || Q(this.options.enabled, r(this, d)) !== Q(i.enabled, r(this, d)) || o !== r(this, k)) && v(this, y, Rt).call(this, o);
707
+ ) && v(this, y, rt).call(this), this.updateResult(s), c && (r(this, d) !== n || A(this.options.enabled, r(this, d)) !== A(i.enabled, r(this, d)) || ut(this.options.staleTime, r(this, d)) !== ut(i.staleTime, r(this, d))) && v(this, y, gt).call(this);
708
+ const o = v(this, y, Rt).call(this);
709
+ c && (r(this, d) !== n || A(this.options.enabled, r(this, d)) !== A(i.enabled, r(this, d)) || o !== r(this, L)) && v(this, y, St).call(this, o);
710
710
  }
711
711
  getOptimisticResult(t) {
712
712
  const s = r(this, E).getQueryCache().build(r(this, E), t), i = this.createResult(s, t);
713
- return be(this, i) && (h(this, F, i), h(this, Y, this.options), h(this, B, r(this, d).state)), i;
713
+ return ge(this, i) && (h(this, F, i), h(this, Y, this.options), h(this, B, r(this, d).state)), i;
714
714
  }
715
715
  getCurrentResult() {
716
716
  return r(this, F);
@@ -751,25 +751,25 @@ var E, d, nt, F, B, Y, q, at, Z, tt, G, H, k, et, y, rt, bt, gt, Rt, Ct, St, wt,
751
751
  const i = r(this, d), n = this.options, c = r(this, F), o = r(this, B), l = r(this, Y), R = t !== i ? t.state : r(this, nt), { state: m } = t;
752
752
  let a = { ...m }, u = !1, p;
753
753
  if (s._optimisticResults) {
754
- const w = this.hasListeners(), ht = !w && xt(t, s), te = w && jt(t, i, s, n);
755
- (ht || te) && (a = {
754
+ const w = this.hasListeners(), ht = !w && jt(t, s), se = w && Mt(t, i, s, n);
755
+ (ht || se) && (a = {
756
756
  ...a,
757
- ...$t(m.data, t.options)
757
+ ...Wt(m.data, t.options)
758
758
  }), s._optimisticResults === "isRestoring" && (a.fetchStatus = "idle");
759
759
  }
760
- let { error: O, errorUpdatedAt: A, status: T } = a;
760
+ let { error: O, errorUpdatedAt: U, status: Q } = a;
761
761
  if (s.select && a.data !== void 0)
762
762
  if (c && a.data === (o == null ? void 0 : o.data) && s.select === r(this, at))
763
763
  p = r(this, Z);
764
764
  else
765
765
  try {
766
- h(this, at, s.select), p = s.select(a.data), p = mt(c == null ? void 0 : c.data, p, s), h(this, Z, p), h(this, q, null);
766
+ h(this, at, s.select), p = s.select(a.data), p = mt(c == null ? void 0 : c.data, p, s), h(this, Z, p), h(this, I, null);
767
767
  } catch (w) {
768
- h(this, q, w);
768
+ h(this, I, w);
769
769
  }
770
770
  else
771
771
  p = a.data;
772
- if (s.placeholderData !== void 0 && p === void 0 && T === "pending") {
772
+ if (s.placeholderData !== void 0 && p === void 0 && Q === "pending") {
773
773
  let w;
774
774
  if (c != null && c.isPlaceholderData && s.placeholderData === (l == null ? void 0 : l.placeholderData))
775
775
  w = c.data;
@@ -778,37 +778,37 @@ var E, d, nt, F, B, Y, q, at, Z, tt, G, H, k, et, y, rt, bt, gt, Rt, Ct, St, wt,
778
778
  r(this, tt)
779
779
  ) : s.placeholderData, s.select && w !== void 0)
780
780
  try {
781
- w = s.select(w), h(this, q, null);
781
+ w = s.select(w), h(this, I, null);
782
782
  } catch (ht) {
783
- h(this, q, ht);
783
+ h(this, I, ht);
784
784
  }
785
- w !== void 0 && (T = "success", p = mt(
785
+ w !== void 0 && (Q = "success", p = mt(
786
786
  c == null ? void 0 : c.data,
787
787
  w,
788
788
  s
789
789
  ), u = !0);
790
790
  }
791
- r(this, q) && (O = r(this, q), p = r(this, Z), A = Date.now(), T = "error");
792
- const g = a.fetchStatus === "fetching", C = T === "pending", D = T === "error", j = C && g, V = p !== void 0;
791
+ r(this, I) && (O = r(this, I), p = r(this, Z), U = Date.now(), Q = "error");
792
+ const g = a.fetchStatus === "fetching", S = Q === "pending", D = Q === "error", j = S && g, V = p !== void 0;
793
793
  return {
794
- status: T,
794
+ status: Q,
795
795
  fetchStatus: a.fetchStatus,
796
- isPending: C,
797
- isSuccess: T === "success",
796
+ isPending: S,
797
+ isSuccess: Q === "success",
798
798
  isError: D,
799
799
  isInitialLoading: j,
800
800
  isLoading: j,
801
801
  data: p,
802
802
  dataUpdatedAt: a.dataUpdatedAt,
803
803
  error: O,
804
- errorUpdatedAt: A,
804
+ errorUpdatedAt: U,
805
805
  failureCount: a.fetchFailureCount,
806
806
  failureReason: a.fetchFailureReason,
807
807
  errorUpdateCount: a.errorUpdateCount,
808
808
  isFetched: a.dataUpdateCount > 0 || a.errorUpdateCount > 0,
809
809
  isFetchedAfterMount: a.dataUpdateCount > R.dataUpdateCount || a.errorUpdateCount > R.errorUpdateCount,
810
810
  isFetching: g,
811
- isRefetching: g && !C,
811
+ isRefetching: g && !S,
812
812
  isLoadingError: D && !V,
813
813
  isPaused: a.fetchStatus === "paused",
814
814
  isPlaceholderData: u,
@@ -836,50 +836,50 @@ var E, d, nt, F, B, Y, q, at, Z, tt, G, H, k, et, y, rt, bt, gt, Rt, Ct, St, wt,
836
836
  return r(this, F)[m] !== s[m] && b.has(m);
837
837
  });
838
838
  };
839
- (t == null ? void 0 : t.listeners) !== !1 && c() && (n.listeners = !0), v(this, y, Wt).call(this, { ...n, ...t });
839
+ (t == null ? void 0 : t.listeners) !== !1 && c() && (n.listeners = !0), v(this, y, Xt).call(this, { ...n, ...t });
840
840
  }
841
841
  onQueryUpdate() {
842
842
  this.updateResult(), this.hasListeners() && v(this, y, Ct).call(this);
843
843
  }
844
- }, E = new WeakMap(), d = new WeakMap(), nt = new WeakMap(), F = new WeakMap(), B = new WeakMap(), Y = new WeakMap(), q = new WeakMap(), at = new WeakMap(), Z = new WeakMap(), tt = new WeakMap(), G = new WeakMap(), H = new WeakMap(), k = new WeakMap(), et = new WeakMap(), y = new WeakSet(), rt = function(t) {
845
- v(this, y, Ft).call(this);
844
+ }, E = new WeakMap(), d = new WeakMap(), nt = new WeakMap(), F = new WeakMap(), B = new WeakMap(), Y = new WeakMap(), I = new WeakMap(), at = new WeakMap(), Z = new WeakMap(), tt = new WeakMap(), G = new WeakMap(), H = new WeakMap(), L = new WeakMap(), et = new WeakMap(), y = new WeakSet(), rt = function(t) {
845
+ v(this, y, Ot).call(this);
846
846
  let s = r(this, d).fetch(
847
847
  this.options,
848
848
  t
849
849
  );
850
850
  return t != null && t.throwOnError || (s = s.catch(dt)), s;
851
- }, bt = function() {
852
- v(this, y, St).call(this);
851
+ }, gt = function() {
852
+ v(this, y, wt).call(this);
853
853
  const t = ut(
854
854
  this.options.staleTime,
855
855
  r(this, d)
856
856
  );
857
857
  if (st || r(this, F).isStale || !ft(t))
858
858
  return;
859
- const i = _t(r(this, F).dataUpdatedAt, t) + 1;
859
+ const i = Bt(r(this, F).dataUpdatedAt, t) + 1;
860
860
  h(this, G, setTimeout(() => {
861
861
  r(this, F).isStale || this.updateResult();
862
862
  }, i));
863
- }, gt = function() {
863
+ }, Rt = function() {
864
864
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(r(this, d)) : this.options.refetchInterval) ?? !1;
865
- }, Rt = function(t) {
866
- v(this, y, wt).call(this), h(this, k, t), !(st || Q(this.options.enabled, r(this, d)) === !1 || !ft(r(this, k)) || r(this, k) === 0) && h(this, H, setInterval(() => {
867
- (this.options.refetchIntervalInBackground || Gt.isFocused()) && v(this, y, rt).call(this);
868
- }, r(this, k)));
865
+ }, St = function(t) {
866
+ v(this, y, Ft).call(this), h(this, L, t), !(st || A(this.options.enabled, r(this, d)) === !1 || !ft(r(this, L)) || r(this, L) === 0) && h(this, H, setInterval(() => {
867
+ (this.options.refetchIntervalInBackground || Ht.isFocused()) && v(this, y, rt).call(this);
868
+ }, r(this, L)));
869
869
  }, Ct = function() {
870
- v(this, y, bt).call(this), v(this, y, Rt).call(this, v(this, y, gt).call(this));
871
- }, St = function() {
872
- r(this, G) && (clearTimeout(r(this, G)), h(this, G, void 0));
870
+ v(this, y, gt).call(this), v(this, y, St).call(this, v(this, y, Rt).call(this));
873
871
  }, wt = function() {
874
- r(this, H) && (clearInterval(r(this, H)), h(this, H, void 0));
872
+ r(this, G) && (clearTimeout(r(this, G)), h(this, G, void 0));
875
873
  }, Ft = function() {
874
+ r(this, H) && (clearInterval(r(this, H)), h(this, H, void 0));
875
+ }, Ot = function() {
876
876
  const t = r(this, E).getQueryCache().build(r(this, E), this.options);
877
877
  if (t === r(this, d))
878
878
  return;
879
879
  const s = r(this, d);
880
880
  h(this, d, t), h(this, nt, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
881
- }, Wt = function(t) {
882
- Pt.batch(() => {
881
+ }, Xt = function(t) {
882
+ Tt.batch(() => {
883
883
  t.listeners && this.listeners.forEach((s) => {
884
884
  s(r(this, F));
885
885
  }), r(this, E).getQueryCache().notify({
@@ -887,43 +887,43 @@ var E, d, nt, F, B, Y, q, at, Z, tt, G, H, k, et, y, rt, bt, gt, Rt, Ct, St, wt,
887
887
  type: "observerResultsUpdated"
888
888
  });
889
889
  });
890
- }, Nt);
891
- function me(e, t) {
892
- return Q(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
890
+ }, _t);
891
+ function be(e, t) {
892
+ return A(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
893
893
  }
894
- function xt(e, t) {
895
- return me(e, t) || e.state.data !== void 0 && Ot(e, t, t.refetchOnMount);
894
+ function jt(e, t) {
895
+ return be(e, t) || e.state.data !== void 0 && Et(e, t, t.refetchOnMount);
896
896
  }
897
- function Ot(e, t, s) {
898
- if (Q(t.enabled, e) !== !1) {
897
+ function Et(e, t, s) {
898
+ if (A(t.enabled, e) !== !1) {
899
899
  const i = typeof s == "function" ? s(e) : s;
900
900
  return i === "always" || i !== !1 && Ut(e, t);
901
901
  }
902
902
  return !1;
903
903
  }
904
- function jt(e, t, s, i) {
905
- return (e !== t || Q(i.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && Ut(e, s);
904
+ function Mt(e, t, s, i) {
905
+ return (e !== t || A(i.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && Ut(e, s);
906
906
  }
907
907
  function Ut(e, t) {
908
- return Q(t.enabled, e) !== !1 && e.isStaleByTime(ut(t.staleTime, e));
908
+ return A(t.enabled, e) !== !1 && e.isStaleByTime(ut(t.staleTime, e));
909
909
  }
910
- function be(e, t) {
910
+ function ge(e, t) {
911
911
  return !pt(e.getCurrentResult(), t);
912
912
  }
913
- var Jt = U.createContext(
913
+ var Yt = T.createContext(
914
914
  void 0
915
- ), ge = (e) => {
916
- const t = U.useContext(Jt);
915
+ ), Re = (e) => {
916
+ const t = T.useContext(Yt);
917
917
  if (!t)
918
918
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
919
919
  return t;
920
- }, Be = ({
920
+ }, Ve = ({
921
921
  client: e,
922
922
  children: t
923
- }) => (U.useEffect(() => (e.mount(), () => {
923
+ }) => (T.useEffect(() => (e.mount(), () => {
924
924
  e.unmount();
925
- }), [e]), /* @__PURE__ */ re.jsx(Jt.Provider, { value: e, children: t })), Xt = U.createContext(!1), Re = () => U.useContext(Xt);
926
- Xt.Provider;
925
+ }), [e]), /* @__PURE__ */ ne.jsx(Yt.Provider, { value: e, children: t })), Zt = T.createContext(!1), Se = () => T.useContext(Zt);
926
+ Zt.Provider;
927
927
  function Ce() {
928
928
  let e = !1;
929
929
  return {
@@ -936,61 +936,61 @@ function Ce() {
936
936
  isReset: () => e
937
937
  };
938
938
  }
939
- var Se = U.createContext(Ce()), we = () => U.useContext(Se);
940
- function Fe(e, t) {
939
+ var we = T.createContext(Ce()), Fe = () => T.useContext(we);
940
+ function Oe(e, t) {
941
941
  return typeof e == "function" ? e(...t) : !!e;
942
942
  }
943
- function Ge() {
943
+ function ze() {
944
944
  }
945
- var Oe = (e, t) => {
945
+ var Ee = (e, t) => {
946
946
  (e.suspense || e.throwOnError) && (t.isReset() || (e.retryOnMount = !1));
947
- }, Ee = (e) => {
948
- U.useEffect(() => {
947
+ }, De = (e) => {
948
+ T.useEffect(() => {
949
949
  e.clearReset();
950
950
  }, [e]);
951
- }, De = ({
951
+ }, Pe = ({
952
952
  result: e,
953
953
  errorResetBoundary: t,
954
954
  throwOnError: s,
955
955
  query: i
956
- }) => e.isError && !t.isReset() && !e.isFetching && i && Fe(s, [e.error, i]), He = (e, t) => t.state.data === void 0, Pe = (e) => {
956
+ }) => e.isError && !t.isReset() && !e.isFetching && i && Oe(s, [e.error, i]), Te = (e, t) => t.state.data === void 0, Ue = (e) => {
957
957
  e.suspense && typeof e.staleTime != "number" && (e.staleTime = 1e3);
958
- }, Ue = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, Ae = (e, t, s) => t.fetchOptimistic(e).catch(() => {
958
+ }, Qe = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, qe = (e, t, s) => t.fetchOptimistic(e).catch(() => {
959
959
  s.clearReset();
960
960
  });
961
- function Te(e, t, s) {
961
+ function te(e, t, s) {
962
962
  var R, m, a, u;
963
963
  if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
964
964
  throw new Error(
965
965
  'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
966
966
  );
967
- const i = ge(), n = Re(), c = we(), o = i.defaultQueryOptions(e);
967
+ const i = Re(), n = Se(), c = Fe(), o = i.defaultQueryOptions(e);
968
968
  (m = (R = i.getDefaultOptions().queries) == null ? void 0 : R._experimental_beforeQuery) == null || m.call(
969
969
  R,
970
970
  o
971
- ), o._optimisticResults = n ? "isRestoring" : "optimistic", Pe(o), Oe(o, c), Ee(c);
972
- const [l] = U.useState(
971
+ ), o._optimisticResults = n ? "isRestoring" : "optimistic", Ue(o), Ee(o, c), De(c);
972
+ const [l] = T.useState(
973
973
  () => new t(
974
974
  i,
975
975
  o
976
976
  )
977
977
  ), b = l.getOptimisticResult(o);
978
- if (U.useSyncExternalStore(
979
- U.useCallback(
978
+ if (T.useSyncExternalStore(
979
+ T.useCallback(
980
980
  (p) => {
981
981
  const O = n ? () => {
982
- } : l.subscribe(Pt.batchCalls(p));
982
+ } : l.subscribe(Tt.batchCalls(p));
983
983
  return l.updateResult(), O;
984
984
  },
985
985
  [l, n]
986
986
  ),
987
987
  () => l.getCurrentResult(),
988
988
  () => l.getCurrentResult()
989
- ), U.useEffect(() => {
989
+ ), T.useEffect(() => {
990
990
  l.setOptions(o, { listeners: !1 });
991
- }, [o, l]), Ue(o, b))
992
- throw Ae(o, l, c);
993
- if (De({
991
+ }, [o, l]), Qe(o, b))
992
+ throw qe(o, l, c);
993
+ if (Pe({
994
994
  result: b,
995
995
  errorResetBoundary: c,
996
996
  throwOnError: o.throwOnError,
@@ -1003,59 +1003,79 @@ function Te(e, t, s) {
1003
1003
  b
1004
1004
  ), o.notifyOnChangeProps ? b : l.trackResult(b);
1005
1005
  }
1006
+ function Ae(e, t) {
1007
+ return te(e, Jt);
1008
+ }
1006
1009
  function Ie(e, t) {
1007
- return Te(e, ve);
1010
+ return process.env.NODE_ENV !== "production" && e.queryFn === bt && console.error("skipToken is not allowed for useSuspenseQuery"), te(
1011
+ {
1012
+ ...e,
1013
+ enabled: !0,
1014
+ suspense: !0,
1015
+ throwOnError: Te,
1016
+ placeholderData: void 0
1017
+ },
1018
+ Jt
1019
+ );
1008
1020
  }
1009
- const Yt = ee(
1021
+ const ee = re(
1010
1022
  void 0
1011
- ), Ve = Yt.Provider, Zt = () => {
1012
- const e = se(Yt);
1023
+ ), $e = ee.Provider, Qt = () => {
1024
+ const e = ie(ee);
1013
1025
  if (!e)
1014
1026
  throw new Error("useDevPortal must be used within a DevPortalProvider.");
1015
1027
  return e;
1016
- }, ze = () => {
1017
- const { getApiIdentities: e } = Zt();
1018
- return Ie({
1028
+ }, We = () => {
1029
+ const { getApiIdentities: e } = Qt();
1030
+ return Ae({
1019
1031
  queryFn: e,
1020
1032
  queryKey: ["api-identities"]
1021
1033
  });
1022
- }, $e = () => {
1023
- const { navigation: e } = Zt(), t = ie();
1034
+ }, xe = () => {
1035
+ const { navigation: e } = Qt(), t = ae();
1024
1036
  return e.find(
1025
- (s) => ne({ path: s.path, end: !1 }, t.pathname)
1037
+ (s) => oe({ path: s.path, end: !1 }, t.pathname)
1026
1038
  );
1039
+ }, Je = () => {
1040
+ const { getNavigation: e } = Qt(), t = xe(), s = (t == null ? void 0 : t.path) ?? "";
1041
+ return Ie({
1042
+ queryFn: async () => ({
1043
+ items: [...(t == null ? void 0 : t.categories) ?? [], ...await e(s)],
1044
+ currentTopNavItem: t
1045
+ }),
1046
+ queryKey: ["navigation", s]
1047
+ });
1027
1048
  };
1028
1049
  export {
1029
- de as A,
1030
- Ve as D,
1031
- _e as Q,
1032
- ye as R,
1033
- Et as S,
1034
- ke as a,
1050
+ $e as D,
1051
+ He as Q,
1052
+ ve as R,
1053
+ Dt as S,
1054
+ _e as a,
1035
1055
  dt as b,
1036
- Ne as c,
1037
- Ke as d,
1038
- ue as e,
1039
- Gt as f,
1040
- Me as g,
1041
- ae as h,
1056
+ Ge as c,
1057
+ Be as d,
1058
+ ce as e,
1059
+ Ht as f,
1060
+ Ne as g,
1061
+ ue as h,
1042
1062
  yt as i,
1043
- Be as j,
1044
- Te as k,
1045
- He as l,
1046
- Le as m,
1047
- Pt as n,
1048
- Ht as o,
1049
- Dt as p,
1050
- ve as q,
1063
+ Ve as j,
1064
+ xe as k,
1065
+ Je as l,
1066
+ Ke as m,
1067
+ Tt as n,
1068
+ Vt as o,
1069
+ Pt as p,
1070
+ Re as q,
1051
1071
  ut as r,
1052
- qt as s,
1053
- ge as t,
1054
- Zt as u,
1055
- $e as v,
1056
- ze as w,
1057
- pt as x,
1058
- Ge as y,
1059
- Fe as z
1072
+ bt as s,
1073
+ Ie as t,
1074
+ Qt as u,
1075
+ We as v,
1076
+ pt as w,
1077
+ ze as x,
1078
+ Oe as y,
1079
+ ye as z
1060
1080
  };
1061
- //# sourceMappingURL=DevPortalProvider-BlxLX6GG.js.map
1081
+ //# sourceMappingURL=DevPortalProvider-Demv4Ngx.js.map