@shiftengineering/folio 0.1.14 → 0.1.15

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.
@@ -1,9 +1,9 @@
1
- var Xr = (t) => {
1
+ var Jr = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var Yt = (t, e, r) => e.has(t) || Xr("Cannot " + r);
5
- var o = (t, e, r) => (Yt(t, e, "read from private field"), r ? r.call(t) : e.get(t)), E = (t, e, r) => e.has(t) ? Xr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), b = (t, e, r, n) => (Yt(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r), P = (t, e, r) => (Yt(t, e, "access private method"), r);
6
- var Dt = (t, e, r, n) => ({
4
+ var Yt = (t, e, r) => e.has(t) || Jr("Cannot " + r);
5
+ var o = (t, e, r) => (Yt(t, e, "read from private field"), r ? r.call(t) : e.get(t)), E = (t, e, r) => e.has(t) ? Jr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), b = (t, e, r, n) => (Yt(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r), P = (t, e, r) => (Yt(t, e, "access private method"), r);
6
+ var _t = (t, e, r, n) => ({
7
7
  set _(s) {
8
8
  b(t, e, s, r);
9
9
  },
@@ -11,9 +11,9 @@ var Dt = (t, e, r, n) => ({
11
11
  return o(t, e, n);
12
12
  }
13
13
  });
14
- import * as z from "react";
15
- import Nn, { createContext as Ws, useState as Hs, useMemo as Bs, useEffect as Zr, useContext as Gs } from "react";
16
- var nr = { exports: {} }, ht = {};
14
+ import * as $ from "react";
15
+ import Nn, { createContext as Ws, useState as Hs, useMemo as Bs, useEffect as Xr, useContext as Gs } from "react";
16
+ var rr = { exports: {} }, dt = {};
17
17
  /**
18
18
  * @license React
19
19
  * react-jsx-runtime.production.min.js
@@ -23,10 +23,10 @@ var nr = { exports: {} }, ht = {};
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
25
  */
26
- var en;
26
+ var Zr;
27
27
  function Ys() {
28
- if (en) return ht;
29
- en = 1;
28
+ if (Zr) return dt;
29
+ Zr = 1;
30
30
  var t = Nn, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
31
31
  function u(l, c, d) {
32
32
  var f, h = {}, y = null, m = null;
@@ -35,9 +35,9 @@ function Ys() {
35
35
  if (l && l.defaultProps) for (f in c = l.defaultProps, c) h[f] === void 0 && (h[f] = c[f]);
36
36
  return { $$typeof: e, type: l, key: y, ref: m, props: h, _owner: s.current };
37
37
  }
38
- return ht.Fragment = r, ht.jsx = u, ht.jsxs = u, ht;
38
+ return dt.Fragment = r, dt.jsx = u, dt.jsxs = u, dt;
39
39
  }
40
- var dt = {};
40
+ var yt = {};
41
41
  /**
42
42
  * @license React
43
43
  * react-jsx-runtime.development.js
@@ -47,9 +47,9 @@ var dt = {};
47
47
  * This source code is licensed under the MIT license found in the
48
48
  * LICENSE file in the root directory of this source tree.
49
49
  */
50
- var tn;
50
+ var en;
51
51
  function Js() {
52
- return tn || (tn = 1, process.env.NODE_ENV !== "production" && function() {
52
+ return en || (en = 1, process.env.NODE_ENV !== "production" && function() {
53
53
  var t = Nn, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), R = Symbol.iterator, g = "@@iterator";
54
54
  function w(i) {
55
55
  if (i === null || typeof i != "object")
@@ -57,7 +57,7 @@ function Js() {
57
57
  var p = R && i[R] || i[g];
58
58
  return typeof p == "function" ? p : null;
59
59
  }
60
- var C = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
60
+ var A = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
61
61
  function S(i) {
62
62
  {
63
63
  for (var p = arguments.length, v = new Array(p > 1 ? p - 1 : 0), O = 1; O < p; O++)
@@ -67,24 +67,24 @@ function Js() {
67
67
  }
68
68
  function j(i, p, v) {
69
69
  {
70
- var O = C.ReactDebugCurrentFrame, D = O.getStackAddendum();
70
+ var O = A.ReactDebugCurrentFrame, D = O.getStackAddendum();
71
71
  D !== "" && (p += "%s", v = v.concat([D]));
72
- var q = v.map(function(A) {
73
- return String(A);
72
+ var I = v.map(function(F) {
73
+ return String(F);
74
74
  });
75
- q.unshift("Warning: " + p), Function.prototype.apply.call(console[i], console, q);
75
+ I.unshift("Warning: " + p), Function.prototype.apply.call(console[i], console, I);
76
76
  }
77
77
  }
78
- var L = !1, V = !1, U = !1, M = !1, I = !1, k;
78
+ var Q = !1, z = !1, X = !1, K = !1, q = !1, k;
79
79
  k = Symbol.for("react.module.reference");
80
- function re(i) {
81
- return !!(typeof i == "string" || typeof i == "function" || i === n || i === a || I || i === s || i === d || i === f || M || i === m || L || V || U || typeof i == "object" && i !== null && (i.$$typeof === y || i.$$typeof === h || i.$$typeof === u || i.$$typeof === l || i.$$typeof === c || // This needs to include all possible module reference object
80
+ function ye(i) {
81
+ return !!(typeof i == "string" || typeof i == "function" || i === n || i === a || q || i === s || i === d || i === f || K || i === m || Q || z || X || typeof i == "object" && i !== null && (i.$$typeof === y || i.$$typeof === h || i.$$typeof === u || i.$$typeof === l || i.$$typeof === c || // This needs to include all possible module reference object
82
82
  // types supported by any Flight configuration anywhere since
83
83
  // we don't know which Flight build this will end up being used
84
84
  // with.
85
85
  i.$$typeof === k || i.getModuleId !== void 0));
86
86
  }
87
- function oe(i, p, v) {
87
+ function pe(i, p, v) {
88
88
  var O = i.displayName;
89
89
  if (O)
90
90
  return O;
@@ -124,14 +124,14 @@ function Js() {
124
124
  var v = i;
125
125
  return Fe(v._context) + ".Provider";
126
126
  case c:
127
- return oe(i, i.render, "ForwardRef");
127
+ return pe(i, i.render, "ForwardRef");
128
128
  case h:
129
129
  var O = i.displayName || null;
130
130
  return O !== null ? O : me(i.type) || "Memo";
131
131
  case y: {
132
- var D = i, q = D._payload, A = D._init;
132
+ var D = i, I = D._payload, F = D._init;
133
133
  try {
134
- return me(A(q));
134
+ return me(F(I));
135
135
  } catch {
136
136
  return null;
137
137
  }
@@ -139,18 +139,18 @@ function Js() {
139
139
  }
140
140
  return null;
141
141
  }
142
- var Ae = Object.assign, lt = 0, Fr, Ar, kr, Dr, _r, Ir, jr;
143
- function qr() {
142
+ var Ae = Object.assign, ft = 0, xr, Fr, Ar, Dr, _r, Ir, kr;
143
+ function jr() {
144
144
  }
145
- qr.__reactDisabledLog = !0;
145
+ jr.__reactDisabledLog = !0;
146
146
  function vs() {
147
147
  {
148
- if (lt === 0) {
149
- Fr = console.log, Ar = console.info, kr = console.warn, Dr = console.error, _r = console.group, Ir = console.groupCollapsed, jr = console.groupEnd;
148
+ if (ft === 0) {
149
+ xr = console.log, Fr = console.info, Ar = console.warn, Dr = console.error, _r = console.group, Ir = console.groupCollapsed, kr = console.groupEnd;
150
150
  var i = {
151
151
  configurable: !0,
152
152
  enumerable: !0,
153
- value: qr,
153
+ value: jr,
154
154
  writable: !0
155
155
  };
156
156
  Object.defineProperties(console, {
@@ -163,12 +163,12 @@ function Js() {
163
163
  groupEnd: i
164
164
  });
165
165
  }
166
- lt++;
166
+ ft++;
167
167
  }
168
168
  }
169
169
  function ws() {
170
170
  {
171
- if (lt--, lt === 0) {
171
+ if (ft--, ft === 0) {
172
172
  var i = {
173
173
  configurable: !0,
174
174
  enumerable: !0,
@@ -176,13 +176,13 @@ function Js() {
176
176
  };
177
177
  Object.defineProperties(console, {
178
178
  log: Ae({}, i, {
179
- value: Fr
179
+ value: xr
180
180
  }),
181
181
  info: Ae({}, i, {
182
- value: Ar
182
+ value: Fr
183
183
  }),
184
184
  warn: Ae({}, i, {
185
- value: kr
185
+ value: Ar
186
186
  }),
187
187
  error: Ae({}, i, {
188
188
  value: Dr
@@ -194,14 +194,14 @@ function Js() {
194
194
  value: Ir
195
195
  }),
196
196
  groupEnd: Ae({}, i, {
197
- value: jr
197
+ value: kr
198
198
  })
199
199
  });
200
200
  }
201
- lt < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
201
+ ft < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
202
202
  }
203
203
  }
204
- var $t = C.ReactCurrentDispatcher, Kt;
204
+ var $t = A.ReactCurrentDispatcher, Kt;
205
205
  function xt(i, p, v) {
206
206
  {
207
207
  if (Kt === void 0)
@@ -220,7 +220,7 @@ function Js() {
220
220
  var Es = typeof WeakMap == "function" ? WeakMap : Map;
221
221
  Ft = new Es();
222
222
  }
223
- function Mr(i, p) {
223
+ function qr(i, p) {
224
224
  if (!i || Vt)
225
225
  return "";
226
226
  {
@@ -232,67 +232,67 @@ function Js() {
232
232
  Vt = !0;
233
233
  var D = Error.prepareStackTrace;
234
234
  Error.prepareStackTrace = void 0;
235
- var q;
236
- q = $t.current, $t.current = null, vs();
235
+ var I;
236
+ I = $t.current, $t.current = null, vs();
237
237
  try {
238
238
  if (p) {
239
- var A = function() {
239
+ var F = function() {
240
240
  throw Error();
241
241
  };
242
- if (Object.defineProperty(A.prototype, "props", {
242
+ if (Object.defineProperty(F.prototype, "props", {
243
243
  set: function() {
244
244
  throw Error();
245
245
  }
246
246
  }), typeof Reflect == "object" && Reflect.construct) {
247
247
  try {
248
- Reflect.construct(A, []);
249
- } catch (Y) {
250
- O = Y;
248
+ Reflect.construct(F, []);
249
+ } catch (G) {
250
+ O = G;
251
251
  }
252
- Reflect.construct(i, [], A);
252
+ Reflect.construct(i, [], F);
253
253
  } else {
254
254
  try {
255
- A.call();
256
- } catch (Y) {
257
- O = Y;
255
+ F.call();
256
+ } catch (G) {
257
+ O = G;
258
258
  }
259
- i.call(A.prototype);
259
+ i.call(F.prototype);
260
260
  }
261
261
  } else {
262
262
  try {
263
263
  throw Error();
264
- } catch (Y) {
265
- O = Y;
264
+ } catch (G) {
265
+ O = G;
266
266
  }
267
267
  i();
268
268
  }
269
- } catch (Y) {
270
- if (Y && O && typeof Y.stack == "string") {
271
- for (var T = Y.stack.split(`
272
- `), H = O.stack.split(`
273
- `), Q = T.length - 1, $ = H.length - 1; Q >= 1 && $ >= 0 && T[Q] !== H[$]; )
274
- $--;
275
- for (; Q >= 1 && $ >= 0; Q--, $--)
276
- if (T[Q] !== H[$]) {
277
- if (Q !== 1 || $ !== 1)
269
+ } catch (G) {
270
+ if (G && O && typeof G.stack == "string") {
271
+ for (var C = G.stack.split(`
272
+ `), W = O.stack.split(`
273
+ `), U = C.length - 1, N = W.length - 1; U >= 1 && N >= 0 && C[U] !== W[N]; )
274
+ N--;
275
+ for (; U >= 1 && N >= 0; U--, N--)
276
+ if (C[U] !== W[N]) {
277
+ if (U !== 1 || N !== 1)
278
278
  do
279
- if (Q--, $--, $ < 0 || T[Q] !== H[$]) {
279
+ if (U--, N--, N < 0 || C[U] !== W[N]) {
280
280
  var Z = `
281
- ` + T[Q].replace(" at new ", " at ");
281
+ ` + C[U].replace(" at new ", " at ");
282
282
  return i.displayName && Z.includes("<anonymous>") && (Z = Z.replace("<anonymous>", i.displayName)), typeof i == "function" && Ft.set(i, Z), Z;
283
283
  }
284
- while (Q >= 1 && $ >= 0);
284
+ while (U >= 1 && N >= 0);
285
285
  break;
286
286
  }
287
287
  }
288
288
  } finally {
289
- Vt = !1, $t.current = q, ws(), Error.prepareStackTrace = D;
289
+ Vt = !1, $t.current = I, ws(), Error.prepareStackTrace = D;
290
290
  }
291
- var Ve = i ? i.displayName || i.name : "", ke = Ve ? xt(Ve) : "";
292
- return typeof i == "function" && Ft.set(i, ke), ke;
291
+ var Ve = i ? i.displayName || i.name : "", De = Ve ? xt(Ve) : "";
292
+ return typeof i == "function" && Ft.set(i, De), De;
293
293
  }
294
294
  function Rs(i, p, v) {
295
- return Mr(i, !1);
295
+ return qr(i, !1);
296
296
  }
297
297
  function Os(i) {
298
298
  var p = i.prototype;
@@ -302,7 +302,7 @@ function Js() {
302
302
  if (i == null)
303
303
  return "";
304
304
  if (typeof i == "function")
305
- return Mr(i, Os(i));
305
+ return qr(i, Os(i));
306
306
  if (typeof i == "string")
307
307
  return xt(i);
308
308
  switch (i) {
@@ -318,39 +318,39 @@ function Js() {
318
318
  case h:
319
319
  return At(i.type, p, v);
320
320
  case y: {
321
- var O = i, D = O._payload, q = O._init;
321
+ var O = i, D = O._payload, I = O._init;
322
322
  try {
323
- return At(q(D), p, v);
323
+ return At(I(D), p, v);
324
324
  } catch {
325
325
  }
326
326
  }
327
327
  }
328
328
  return "";
329
329
  }
330
- var ft = Object.prototype.hasOwnProperty, Ur = {}, Nr = C.ReactDebugCurrentFrame;
331
- function kt(i) {
330
+ var ht = Object.prototype.hasOwnProperty, Mr = {}, Ur = A.ReactDebugCurrentFrame;
331
+ function Dt(i) {
332
332
  if (i) {
333
333
  var p = i._owner, v = At(i.type, i._source, p ? p.type : null);
334
- Nr.setExtraStackFrame(v);
334
+ Ur.setExtraStackFrame(v);
335
335
  } else
336
- Nr.setExtraStackFrame(null);
336
+ Ur.setExtraStackFrame(null);
337
337
  }
338
338
  function Ps(i, p, v, O, D) {
339
339
  {
340
- var q = Function.call.bind(ft);
341
- for (var A in i)
342
- if (q(i, A)) {
343
- var T = void 0;
340
+ var I = Function.call.bind(ht);
341
+ for (var F in i)
342
+ if (I(i, F)) {
343
+ var C = void 0;
344
344
  try {
345
- if (typeof i[A] != "function") {
346
- var H = Error((O || "React class") + ": " + v + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
347
- throw H.name = "Invariant Violation", H;
345
+ if (typeof i[F] != "function") {
346
+ var W = Error((O || "React class") + ": " + v + " type `" + F + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[F] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
347
+ throw W.name = "Invariant Violation", W;
348
348
  }
349
- T = i[A](p, A, O, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
350
- } catch (Q) {
351
- T = Q;
349
+ C = i[F](p, F, O, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
350
+ } catch (U) {
351
+ C = U;
352
352
  }
353
- T && !(T instanceof Error) && (kt(D), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", O || "React class", v, A, typeof T), kt(null)), T instanceof Error && !(T.message in Ur) && (Ur[T.message] = !0, kt(D), S("Failed %s type: %s", v, T.message), kt(null));
353
+ C && !(C instanceof Error) && (Dt(D), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", O || "React class", v, F, typeof C), Dt(null)), C instanceof Error && !(C.message in Mr) && (Mr[C.message] = !0, Dt(D), S("Failed %s type: %s", v, C.message), Dt(null));
354
354
  }
355
355
  }
356
356
  }
@@ -366,26 +366,26 @@ function Js() {
366
366
  }
367
367
  function Ts(i) {
368
368
  try {
369
- return Lr(i), !1;
369
+ return Nr(i), !1;
370
370
  } catch {
371
371
  return !0;
372
372
  }
373
373
  }
374
- function Lr(i) {
374
+ function Nr(i) {
375
375
  return "" + i;
376
376
  }
377
- function Qr(i) {
377
+ function Lr(i) {
378
378
  if (Ts(i))
379
- return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Cs(i)), Lr(i);
379
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Cs(i)), Nr(i);
380
380
  }
381
- var $r = C.ReactCurrentOwner, xs = {
381
+ var Qr = A.ReactCurrentOwner, xs = {
382
382
  key: !0,
383
383
  ref: !0,
384
384
  __self: !0,
385
385
  __source: !0
386
- }, Kr, Vr;
386
+ }, $r, Kr;
387
387
  function Fs(i) {
388
- if (ft.call(i, "ref")) {
388
+ if (ht.call(i, "ref")) {
389
389
  var p = Object.getOwnPropertyDescriptor(i, "ref").get;
390
390
  if (p && p.isReactWarning)
391
391
  return !1;
@@ -393,20 +393,20 @@ function Js() {
393
393
  return i.ref !== void 0;
394
394
  }
395
395
  function As(i) {
396
- if (ft.call(i, "key")) {
396
+ if (ht.call(i, "key")) {
397
397
  var p = Object.getOwnPropertyDescriptor(i, "key").get;
398
398
  if (p && p.isReactWarning)
399
399
  return !1;
400
400
  }
401
401
  return i.key !== void 0;
402
402
  }
403
- function ks(i, p) {
404
- typeof i.ref == "string" && $r.current;
405
- }
406
403
  function Ds(i, p) {
404
+ typeof i.ref == "string" && Qr.current;
405
+ }
406
+ function _s(i, p) {
407
407
  {
408
408
  var v = function() {
409
- Kr || (Kr = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
409
+ $r || ($r = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
410
410
  };
411
411
  v.isReactWarning = !0, Object.defineProperty(i, "key", {
412
412
  get: v,
@@ -414,10 +414,10 @@ function Js() {
414
414
  });
415
415
  }
416
416
  }
417
- function _s(i, p) {
417
+ function Is(i, p) {
418
418
  {
419
419
  var v = function() {
420
- Vr || (Vr = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
420
+ Kr || (Kr = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
421
421
  };
422
422
  v.isReactWarning = !0, Object.defineProperty(i, "ref", {
423
423
  get: v,
@@ -425,67 +425,67 @@ function Js() {
425
425
  });
426
426
  }
427
427
  }
428
- var Is = function(i, p, v, O, D, q, A) {
429
- var T = {
428
+ var ks = function(i, p, v, O, D, I, F) {
429
+ var C = {
430
430
  // This tag allows us to uniquely identify this as a React Element
431
431
  $$typeof: e,
432
432
  // Built-in properties that belong on the element
433
433
  type: i,
434
434
  key: p,
435
435
  ref: v,
436
- props: A,
436
+ props: F,
437
437
  // Record the component responsible for creating this element.
438
- _owner: q
438
+ _owner: I
439
439
  };
440
- return T._store = {}, Object.defineProperty(T._store, "validated", {
440
+ return C._store = {}, Object.defineProperty(C._store, "validated", {
441
441
  configurable: !1,
442
442
  enumerable: !1,
443
443
  writable: !0,
444
444
  value: !1
445
- }), Object.defineProperty(T, "_self", {
445
+ }), Object.defineProperty(C, "_self", {
446
446
  configurable: !1,
447
447
  enumerable: !1,
448
448
  writable: !1,
449
449
  value: O
450
- }), Object.defineProperty(T, "_source", {
450
+ }), Object.defineProperty(C, "_source", {
451
451
  configurable: !1,
452
452
  enumerable: !1,
453
453
  writable: !1,
454
454
  value: D
455
- }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
455
+ }), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
456
456
  };
457
457
  function js(i, p, v, O, D) {
458
458
  {
459
- var q, A = {}, T = null, H = null;
460
- v !== void 0 && (Qr(v), T = "" + v), As(p) && (Qr(p.key), T = "" + p.key), Fs(p) && (H = p.ref, ks(p, D));
461
- for (q in p)
462
- ft.call(p, q) && !xs.hasOwnProperty(q) && (A[q] = p[q]);
459
+ var I, F = {}, C = null, W = null;
460
+ v !== void 0 && (Lr(v), C = "" + v), As(p) && (Lr(p.key), C = "" + p.key), Fs(p) && (W = p.ref, Ds(p, D));
461
+ for (I in p)
462
+ ht.call(p, I) && !xs.hasOwnProperty(I) && (F[I] = p[I]);
463
463
  if (i && i.defaultProps) {
464
- var Q = i.defaultProps;
465
- for (q in Q)
466
- A[q] === void 0 && (A[q] = Q[q]);
464
+ var U = i.defaultProps;
465
+ for (I in U)
466
+ F[I] === void 0 && (F[I] = U[I]);
467
467
  }
468
- if (T || H) {
469
- var $ = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
470
- T && Ds(A, $), H && _s(A, $);
468
+ if (C || W) {
469
+ var N = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
470
+ C && _s(F, N), W && Is(F, N);
471
471
  }
472
- return Is(i, T, H, D, O, $r.current, A);
472
+ return ks(i, C, W, D, O, Qr.current, F);
473
473
  }
474
474
  }
475
- var Wt = C.ReactCurrentOwner, zr = C.ReactDebugCurrentFrame;
475
+ var Wt = A.ReactCurrentOwner, Vr = A.ReactDebugCurrentFrame;
476
476
  function Ke(i) {
477
477
  if (i) {
478
478
  var p = i._owner, v = At(i.type, i._source, p ? p.type : null);
479
- zr.setExtraStackFrame(v);
479
+ Vr.setExtraStackFrame(v);
480
480
  } else
481
- zr.setExtraStackFrame(null);
481
+ Vr.setExtraStackFrame(null);
482
482
  }
483
483
  var Ht;
484
484
  Ht = !1;
485
485
  function Bt(i) {
486
486
  return typeof i == "object" && i !== null && i.$$typeof === e;
487
487
  }
488
- function Wr() {
488
+ function zr() {
489
489
  {
490
490
  if (Wt.current) {
491
491
  var i = me(Wt.current.type);
@@ -500,10 +500,10 @@ Check the render method of \`` + i + "`.";
500
500
  function qs(i) {
501
501
  return "";
502
502
  }
503
- var Hr = {};
503
+ var Wr = {};
504
504
  function Ms(i) {
505
505
  {
506
- var p = Wr();
506
+ var p = zr();
507
507
  if (!p) {
508
508
  var v = typeof i == "string" ? i : i.displayName || i.name;
509
509
  v && (p = `
@@ -513,35 +513,35 @@ Check the top-level render call using <` + v + ">.");
513
513
  return p;
514
514
  }
515
515
  }
516
- function Br(i, p) {
516
+ function Hr(i, p) {
517
517
  {
518
518
  if (!i._store || i._store.validated || i.key != null)
519
519
  return;
520
520
  i._store.validated = !0;
521
521
  var v = Ms(p);
522
- if (Hr[v])
522
+ if (Wr[v])
523
523
  return;
524
- Hr[v] = !0;
524
+ Wr[v] = !0;
525
525
  var O = "";
526
526
  i && i._owner && i._owner !== Wt.current && (O = " It was passed a child from " + me(i._owner.type) + "."), Ke(i), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', v, O), Ke(null);
527
527
  }
528
528
  }
529
- function Gr(i, p) {
529
+ function Br(i, p) {
530
530
  {
531
531
  if (typeof i != "object")
532
532
  return;
533
533
  if (zt(i))
534
534
  for (var v = 0; v < i.length; v++) {
535
535
  var O = i[v];
536
- Bt(O) && Br(O, p);
536
+ Bt(O) && Hr(O, p);
537
537
  }
538
538
  else if (Bt(i))
539
539
  i._store && (i._store.validated = !0);
540
540
  else if (i) {
541
541
  var D = w(i);
542
542
  if (typeof D == "function" && D !== i.entries)
543
- for (var q = D.call(i), A; !(A = q.next()).done; )
544
- Bt(A.value) && Br(A.value, p);
543
+ for (var I = D.call(i), F; !(F = I.next()).done; )
544
+ Bt(F.value) && Hr(F.value, p);
545
545
  }
546
546
  }
547
547
  }
@@ -582,64 +582,64 @@ Check the top-level render call using <` + v + ">.");
582
582
  i.ref !== null && (Ke(i), S("Invalid attribute `ref` supplied to `React.Fragment`."), Ke(null));
583
583
  }
584
584
  }
585
- var Yr = {};
586
- function Jr(i, p, v, O, D, q) {
585
+ var Gr = {};
586
+ function Yr(i, p, v, O, D, I) {
587
587
  {
588
- var A = re(i);
589
- if (!A) {
590
- var T = "";
591
- (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
592
- var H = qs();
593
- H ? T += H : T += Wr();
594
- var Q;
595
- i === null ? Q = "null" : zt(i) ? Q = "array" : i !== void 0 && i.$$typeof === e ? (Q = "<" + (me(i.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : Q = typeof i, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Q, T);
588
+ var F = ye(i);
589
+ if (!F) {
590
+ var C = "";
591
+ (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
592
+ var W = qs();
593
+ W ? C += W : C += zr();
594
+ var U;
595
+ i === null ? U = "null" : zt(i) ? U = "array" : i !== void 0 && i.$$typeof === e ? (U = "<" + (me(i.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : U = typeof i, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, C);
596
596
  }
597
- var $ = js(i, p, v, D, q);
598
- if ($ == null)
599
- return $;
600
- if (A) {
597
+ var N = js(i, p, v, D, I);
598
+ if (N == null)
599
+ return N;
600
+ if (F) {
601
601
  var Z = p.children;
602
602
  if (Z !== void 0)
603
603
  if (O)
604
604
  if (zt(Z)) {
605
605
  for (var Ve = 0; Ve < Z.length; Ve++)
606
- Gr(Z[Ve], i);
606
+ Br(Z[Ve], i);
607
607
  Object.freeze && Object.freeze(Z);
608
608
  } else
609
609
  S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
610
610
  else
611
- Gr(Z, i);
611
+ Br(Z, i);
612
612
  }
613
- if (ft.call(p, "key")) {
614
- var ke = me(i), Y = Object.keys(p).filter(function(zs) {
613
+ if (ht.call(p, "key")) {
614
+ var De = me(i), G = Object.keys(p).filter(function(zs) {
615
615
  return zs !== "key";
616
- }), Gt = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
617
- if (!Yr[ke + Gt]) {
618
- var Vs = Y.length > 0 ? "{" + Y.join(": ..., ") + ": ...}" : "{}";
616
+ }), Gt = G.length > 0 ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}";
617
+ if (!Gr[De + Gt]) {
618
+ var Vs = G.length > 0 ? "{" + G.join(": ..., ") + ": ...}" : "{}";
619
619
  S(`A props object containing a "key" prop is being spread into JSX:
620
620
  let props = %s;
621
621
  <%s {...props} />
622
622
  React keys must be passed directly to JSX without using spread:
623
623
  let props = %s;
624
- <%s key={someKey} {...props} />`, Gt, ke, Vs, ke), Yr[ke + Gt] = !0;
624
+ <%s key={someKey} {...props} />`, Gt, De, Vs, De), Gr[De + Gt] = !0;
625
625
  }
626
626
  }
627
- return i === n ? Ns($) : Us($), $;
627
+ return i === n ? Ns(N) : Us(N), N;
628
628
  }
629
629
  }
630
630
  function Ls(i, p, v) {
631
- return Jr(i, p, v, !0);
631
+ return Yr(i, p, v, !0);
632
632
  }
633
633
  function Qs(i, p, v) {
634
- return Jr(i, p, v, !1);
634
+ return Yr(i, p, v, !1);
635
635
  }
636
636
  var $s = Qs, Ks = Ls;
637
- dt.Fragment = n, dt.jsx = $s, dt.jsxs = Ks;
638
- }()), dt;
637
+ yt.Fragment = n, yt.jsx = $s, yt.jsxs = Ks;
638
+ }()), yt;
639
639
  }
640
- process.env.NODE_ENV === "production" ? nr.exports = Ys() : nr.exports = Js();
641
- var gt = nr.exports, sr = /* @__PURE__ */ ((t) => (t.NOT_CHUNKED = "NOT_CHUNKED", t.PROCESSING = "PROCESSING", t.CHUNKED = "CHUNKED", t.ERROR_CHUNKING = "ERROR_CHUNKING", t))(sr || {}), Pr = /* @__PURE__ */ ((t) => (t.PDF = "application/pdf", t.TXT = "text/plain", t.CSV = "text/csv", t.DIRECTORY = "inode/directory", t.DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", t))(Pr || {});
642
- const yt = 4e3 * 1024 * 1024, Xs = [
640
+ process.env.NODE_ENV === "production" ? rr.exports = Ys() : rr.exports = Js();
641
+ var We = rr.exports, nr = /* @__PURE__ */ ((t) => (t.NOT_CHUNKED = "NOT_CHUNKED", t.PROCESSING = "PROCESSING", t.CHUNKED = "CHUNKED", t.ERROR_CHUNKING = "ERROR_CHUNKING", t))(nr || {}), Or = /* @__PURE__ */ ((t) => (t.PDF = "application/pdf", t.TXT = "text/plain", t.CSV = "text/csv", t.DIRECTORY = "inode/directory", t.DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", t))(Or || {});
642
+ const pt = 4e3 * 1024 * 1024, Xs = [
643
643
  ".txt",
644
644
  ".json",
645
645
  ".py",
@@ -648,23 +648,23 @@ const yt = 4e3 * 1024 * 1024, Xs = [
648
648
  ], Ln = {
649
649
  "application/pdf": {
650
650
  extensions: [".pdf"],
651
- maxSize: yt
651
+ maxSize: pt
652
652
  },
653
653
  "text/plain": {
654
654
  extensions: Xs,
655
- maxSize: yt
655
+ maxSize: pt
656
656
  },
657
657
  "text/csv": {
658
658
  extensions: [".csv"],
659
- maxSize: yt
659
+ maxSize: pt
660
660
  },
661
661
  "inode/directory": {
662
662
  extensions: [],
663
- maxSize: yt
663
+ maxSize: pt
664
664
  },
665
665
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
666
666
  extensions: [".docx"],
667
- maxSize: yt
667
+ maxSize: pt
668
668
  }
669
669
  };
670
670
  Object.entries(Ln).reduce(
@@ -674,8 +674,8 @@ Object.entries(Ln).reduce(
674
674
  }),
675
675
  {}
676
676
  );
677
- const Zs = new Set(Object.values(Pr));
678
- var at = class {
677
+ const Zs = new Set(Object.values(Or));
678
+ var ut = class {
679
679
  constructor() {
680
680
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
681
681
  }
@@ -697,19 +697,19 @@ function te() {
697
697
  function ei(t, e) {
698
698
  return typeof t == "function" ? t(e) : t;
699
699
  }
700
- function ir(t) {
700
+ function sr(t) {
701
701
  return typeof t == "number" && t >= 0 && t !== 1 / 0;
702
702
  }
703
703
  function Qn(t, e) {
704
704
  return Math.max(t + (e || 0) - Date.now(), 0);
705
705
  }
706
- function We(t, e) {
706
+ function He(t, e) {
707
707
  return typeof t == "function" ? t(e) : t;
708
708
  }
709
- function ie(t, e) {
709
+ function se(t, e) {
710
710
  return typeof t == "function" ? t(e) : t;
711
711
  }
712
- function rn(t, e) {
712
+ function tn(t, e) {
713
713
  const {
714
714
  type: r = "all",
715
715
  exact: n,
@@ -720,7 +720,7 @@ function rn(t, e) {
720
720
  } = t;
721
721
  if (u) {
722
722
  if (n) {
723
- if (e.queryHash !== Sr(u, e.options))
723
+ if (e.queryHash !== Pr(u, e.options))
724
724
  return !1;
725
725
  } else if (!bt(e.queryKey, u))
726
726
  return !1;
@@ -732,7 +732,7 @@ function rn(t, e) {
732
732
  }
733
733
  return !(typeof l == "boolean" && e.isStale() !== l || s && s !== e.state.fetchStatus || a && !a(e));
734
734
  }
735
- function nn(t, e) {
735
+ function rn(t, e) {
736
736
  const { exact: r, status: n, predicate: s, mutationKey: a } = t;
737
737
  if (a) {
738
738
  if (!e.options.mutationKey)
@@ -745,28 +745,28 @@ function nn(t, e) {
745
745
  }
746
746
  return !(n && e.state.status !== n || s && !s(e));
747
747
  }
748
- function Sr(t, e) {
748
+ function Pr(t, e) {
749
749
  return ((e == null ? void 0 : e.queryKeyHashFn) || $e)(t);
750
750
  }
751
751
  function $e(t) {
752
752
  return JSON.stringify(
753
753
  t,
754
- (e, r) => ar(r) ? Object.keys(r).sort().reduce((n, s) => (n[s] = r[s], n), {}) : r
754
+ (e, r) => or(r) ? Object.keys(r).sort().reduce((n, s) => (n[s] = r[s], n), {}) : r
755
755
  );
756
756
  }
757
757
  function bt(t, e) {
758
758
  return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((r) => !bt(t[r], e[r])) : !1;
759
759
  }
760
- function or(t, e) {
760
+ function ir(t, e) {
761
761
  if (t === e)
762
762
  return t;
763
- const r = sn(t) && sn(e);
764
- if (r || ar(t) && ar(e)) {
763
+ const r = nn(t) && nn(e);
764
+ if (r || or(t) && or(e)) {
765
765
  const n = r ? t : Object.keys(t), s = n.length, a = r ? e : Object.keys(e), u = a.length, l = r ? [] : {};
766
766
  let c = 0;
767
767
  for (let d = 0; d < u; d++) {
768
768
  const f = r ? d : a[d];
769
- (!r && n.includes(f) || r) && t[f] === void 0 && e[f] === void 0 ? (l[f] = void 0, c++) : (l[f] = or(t[f], e[f]), l[f] === t[f] && t[f] !== void 0 && c++);
769
+ (!r && n.includes(f) || r) && t[f] === void 0 && e[f] === void 0 ? (l[f] = void 0, c++) : (l[f] = ir(t[f], e[f]), l[f] === t[f] && t[f] !== void 0 && c++);
770
770
  }
771
771
  return s === u && c === s ? t : l;
772
772
  }
@@ -780,19 +780,19 @@ function Mt(t, e) {
780
780
  return !1;
781
781
  return !0;
782
782
  }
783
- function sn(t) {
783
+ function nn(t) {
784
784
  return Array.isArray(t) && t.length === Object.keys(t).length;
785
785
  }
786
- function ar(t) {
787
- if (!on(t))
786
+ function or(t) {
787
+ if (!sn(t))
788
788
  return !1;
789
789
  const e = t.constructor;
790
790
  if (e === void 0)
791
791
  return !0;
792
792
  const r = e.prototype;
793
- return !(!on(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
793
+ return !(!sn(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
794
794
  }
795
- function on(t) {
795
+ function sn(t) {
796
796
  return Object.prototype.toString.call(t) === "[object Object]";
797
797
  }
798
798
  function ti(t) {
@@ -800,19 +800,19 @@ function ti(t) {
800
800
  setTimeout(e, t);
801
801
  });
802
802
  }
803
- function ur(t, e, r) {
803
+ function ar(t, e, r) {
804
804
  if (typeof r.structuralSharing == "function")
805
805
  return r.structuralSharing(t, e);
806
806
  if (r.structuralSharing !== !1) {
807
807
  if (process.env.NODE_ENV !== "production")
808
808
  try {
809
- return or(t, e);
809
+ return ir(t, e);
810
810
  } catch (n) {
811
811
  console.error(
812
812
  `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`
813
813
  );
814
814
  }
815
- return or(t, e);
815
+ return ir(t, e);
816
816
  }
817
817
  return e;
818
818
  }
@@ -830,13 +830,13 @@ function $n(t, e) {
830
830
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
831
831
  ), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === Ut ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
832
832
  }
833
- var _e, be, He, On, si = (On = class extends at {
833
+ var Ie, be, Be, On, si = (On = class extends ut {
834
834
  constructor() {
835
835
  super();
836
- E(this, _e);
836
+ E(this, Ie);
837
837
  E(this, be);
838
- E(this, He);
839
- b(this, He, (e) => {
838
+ E(this, Be);
839
+ b(this, Be, (e) => {
840
840
  if (!Qe && window.addEventListener) {
841
841
  const r = () => e();
842
842
  return window.addEventListener("visibilitychange", r, !1), () => {
@@ -846,7 +846,7 @@ var _e, be, He, On, si = (On = class extends at {
846
846
  });
847
847
  }
848
848
  onSubscribe() {
849
- o(this, be) || this.setEventListener(o(this, He));
849
+ o(this, be) || this.setEventListener(o(this, Be));
850
850
  }
851
851
  onUnsubscribe() {
852
852
  var e;
@@ -854,12 +854,12 @@ var _e, be, He, On, si = (On = class extends at {
854
854
  }
855
855
  setEventListener(e) {
856
856
  var r;
857
- b(this, He, e), (r = o(this, be)) == null || r.call(this), b(this, be, e((n) => {
857
+ b(this, Be, e), (r = o(this, be)) == null || r.call(this), b(this, be, e((n) => {
858
858
  typeof n == "boolean" ? this.setFocused(n) : this.onFocus();
859
859
  }));
860
860
  }
861
861
  setFocused(e) {
862
- o(this, _e) !== e && (b(this, _e, e), this.onFocus());
862
+ o(this, Ie) !== e && (b(this, Ie, e), this.onFocus());
863
863
  }
864
864
  onFocus() {
865
865
  const e = this.isFocused();
@@ -869,15 +869,15 @@ var _e, be, He, On, si = (On = class extends at {
869
869
  }
870
870
  isFocused() {
871
871
  var e;
872
- return typeof o(this, _e) == "boolean" ? o(this, _e) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
872
+ return typeof o(this, Ie) == "boolean" ? o(this, Ie) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
873
873
  }
874
- }, _e = new WeakMap(), be = new WeakMap(), He = new WeakMap(), On), Cr = new si(), Be, ve, Ge, Pn, ii = (Pn = class extends at {
874
+ }, Ie = new WeakMap(), be = new WeakMap(), Be = new WeakMap(), On), Sr = new si(), Ge, ve, Ye, Pn, ii = (Pn = class extends ut {
875
875
  constructor() {
876
876
  super();
877
- E(this, Be, !0);
877
+ E(this, Ge, !0);
878
878
  E(this, ve);
879
- E(this, Ge);
880
- b(this, Ge, (e) => {
879
+ E(this, Ye);
880
+ b(this, Ye, (e) => {
881
881
  if (!Qe && window.addEventListener) {
882
882
  const r = () => e(!0), n = () => e(!1);
883
883
  return window.addEventListener("online", r, !1), window.addEventListener("offline", n, !1), () => {
@@ -887,7 +887,7 @@ var _e, be, He, On, si = (On = class extends at {
887
887
  });
888
888
  }
889
889
  onSubscribe() {
890
- o(this, ve) || this.setEventListener(o(this, Ge));
890
+ o(this, ve) || this.setEventListener(o(this, Ye));
891
891
  }
892
892
  onUnsubscribe() {
893
893
  var e;
@@ -895,18 +895,18 @@ var _e, be, He, On, si = (On = class extends at {
895
895
  }
896
896
  setEventListener(e) {
897
897
  var r;
898
- b(this, Ge, e), (r = o(this, ve)) == null || r.call(this), b(this, ve, e(this.setOnline.bind(this)));
898
+ b(this, Ye, e), (r = o(this, ve)) == null || r.call(this), b(this, ve, e(this.setOnline.bind(this)));
899
899
  }
900
900
  setOnline(e) {
901
- o(this, Be) !== e && (b(this, Be, e), this.listeners.forEach((n) => {
901
+ o(this, Ge) !== e && (b(this, Ge, e), this.listeners.forEach((n) => {
902
902
  n(e);
903
903
  }));
904
904
  }
905
905
  isOnline() {
906
- return o(this, Be);
906
+ return o(this, Ge);
907
907
  }
908
- }, Be = new WeakMap(), ve = new WeakMap(), Ge = new WeakMap(), Pn), Nt = new ii();
909
- function cr() {
908
+ }, Ge = new WeakMap(), ve = new WeakMap(), Ye = new WeakMap(), Pn), Nt = new ii();
909
+ function ur() {
910
910
  let t, e;
911
911
  const r = new Promise((s, a) => {
912
912
  t = s, e = a;
@@ -944,14 +944,14 @@ function Jt(t) {
944
944
  }
945
945
  function zn(t) {
946
946
  let e = !1, r = 0, n = !1, s;
947
- const a = cr(), u = (g) => {
947
+ const a = ur(), u = (g) => {
948
948
  var w;
949
949
  n || (y(new Vn(g)), (w = t.abort) == null || w.call(t));
950
950
  }, l = () => {
951
951
  e = !0;
952
952
  }, c = () => {
953
953
  e = !1;
954
- }, d = () => Cr.isFocused() && (t.networkMode === "always" || Nt.isOnline()) && t.canRun(), f = () => Kn(t.networkMode) && t.canRun(), h = (g) => {
954
+ }, d = () => Sr.isFocused() && (t.networkMode === "always" || Nt.isOnline()) && t.canRun(), f = () => Kn(t.networkMode) && t.canRun(), h = (g) => {
955
955
  var w;
956
956
  n || (n = !0, (w = t.onSuccess) == null || w.call(t, g), s == null || s(), a.resolve(g));
957
957
  }, y = (g) => {
@@ -959,8 +959,8 @@ function zn(t) {
959
959
  n || (n = !0, (w = t.onError) == null || w.call(t, g), s == null || s(), a.reject(g));
960
960
  }, m = () => new Promise((g) => {
961
961
  var w;
962
- s = (C) => {
963
- (n || d()) && g(C);
962
+ s = (A) => {
963
+ (n || d()) && g(A);
964
964
  }, (w = t.onPause) == null || w.call(t);
965
965
  }).then(() => {
966
966
  var g;
@@ -972,20 +972,20 @@ function zn(t) {
972
972
  const w = r === 0 ? t.initialPromise : void 0;
973
973
  try {
974
974
  g = w ?? t.fn();
975
- } catch (C) {
976
- g = Promise.reject(C);
975
+ } catch (A) {
976
+ g = Promise.reject(A);
977
977
  }
978
- Promise.resolve(g).then(h).catch((C) => {
979
- var U;
978
+ Promise.resolve(g).then(h).catch((A) => {
979
+ var X;
980
980
  if (n)
981
981
  return;
982
- const S = t.retry ?? (Qe ? 0 : 3), j = t.retryDelay ?? oi, L = typeof j == "function" ? j(r, C) : j, V = S === !0 || typeof S == "number" && r < S || typeof S == "function" && S(r, C);
983
- if (e || !V) {
984
- y(C);
982
+ const S = t.retry ?? (Qe ? 0 : 3), j = t.retryDelay ?? oi, Q = typeof j == "function" ? j(r, A) : j, z = S === !0 || typeof S == "number" && r < S || typeof S == "function" && S(r, A);
983
+ if (e || !z) {
984
+ y(A);
985
985
  return;
986
986
  }
987
- r++, (U = t.onFail) == null || U.call(t, r, C), ti(L).then(() => d() ? void 0 : m()).then(() => {
988
- e ? y(C) : R();
987
+ r++, (X = t.onFail) == null || X.call(t, r, A), ti(Q).then(() => d() ? void 0 : m()).then(() => {
988
+ e ? y(A) : R();
989
989
  });
990
990
  });
991
991
  };
@@ -1058,15 +1058,15 @@ function ai() {
1058
1058
  }
1059
1059
  };
1060
1060
  }
1061
- var K = ai(), Ie, Sn, Wn = (Sn = class {
1061
+ var L = ai(), ke, Sn, Wn = (Sn = class {
1062
1062
  constructor() {
1063
- E(this, Ie);
1063
+ E(this, ke);
1064
1064
  }
1065
1065
  destroy() {
1066
1066
  this.clearGcTimeout();
1067
1067
  }
1068
1068
  scheduleGc() {
1069
- this.clearGcTimeout(), ir(this.gcTime) && b(this, Ie, setTimeout(() => {
1069
+ this.clearGcTimeout(), sr(this.gcTime) && b(this, ke, setTimeout(() => {
1070
1070
  this.optionalRemove();
1071
1071
  }, this.gcTime));
1072
1072
  }
@@ -1077,27 +1077,27 @@ var K = ai(), Ie, Sn, Wn = (Sn = class {
1077
1077
  );
1078
1078
  }
1079
1079
  clearGcTimeout() {
1080
- o(this, Ie) && (clearTimeout(o(this, Ie)), b(this, Ie, void 0));
1080
+ o(this, ke) && (clearTimeout(o(this, ke)), b(this, ke, void 0));
1081
1081
  }
1082
- }, Ie = new WeakMap(), Sn), Ye, Je, ee, je, W, Ot, qe, ne, he, Cn, ui = (Cn = class extends Wn {
1082
+ }, ke = new WeakMap(), Sn), Je, Xe, ee, je, V, Ot, qe, re, le, Cn, ui = (Cn = class extends Wn {
1083
1083
  constructor(e) {
1084
1084
  super();
1085
- E(this, ne);
1086
- E(this, Ye);
1085
+ E(this, re);
1087
1086
  E(this, Je);
1087
+ E(this, Xe);
1088
1088
  E(this, ee);
1089
1089
  E(this, je);
1090
- E(this, W);
1090
+ E(this, V);
1091
1091
  E(this, Ot);
1092
1092
  E(this, qe);
1093
- b(this, qe, !1), b(this, Ot, e.defaultOptions), this.setOptions(e.options), this.observers = [], b(this, je, e.client), b(this, ee, o(this, je).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, b(this, Ye, ci(this.options)), this.state = e.state ?? o(this, Ye), this.scheduleGc();
1093
+ b(this, qe, !1), b(this, Ot, e.defaultOptions), this.setOptions(e.options), this.observers = [], b(this, je, e.client), b(this, ee, o(this, je).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, b(this, Je, ci(this.options)), this.state = e.state ?? o(this, Je), this.scheduleGc();
1094
1094
  }
1095
1095
  get meta() {
1096
1096
  return this.options.meta;
1097
1097
  }
1098
1098
  get promise() {
1099
1099
  var e;
1100
- return (e = o(this, W)) == null ? void 0 : e.promise;
1100
+ return (e = o(this, V)) == null ? void 0 : e.promise;
1101
1101
  }
1102
1102
  setOptions(e) {
1103
1103
  this.options = { ...o(this, Ot), ...e }, this.updateGcTime(this.options.gcTime);
@@ -1106,8 +1106,8 @@ var K = ai(), Ie, Sn, Wn = (Sn = class {
1106
1106
  !this.observers.length && this.state.fetchStatus === "idle" && o(this, ee).remove(this);
1107
1107
  }
1108
1108
  setData(e, r) {
1109
- const n = ur(this.state.data, e, this.options);
1110
- return P(this, ne, he).call(this, {
1109
+ const n = ar(this.state.data, e, this.options);
1110
+ return P(this, re, le).call(this, {
1111
1111
  data: n,
1112
1112
  type: "success",
1113
1113
  dataUpdatedAt: r == null ? void 0 : r.updatedAt,
@@ -1115,22 +1115,22 @@ var K = ai(), Ie, Sn, Wn = (Sn = class {
1115
1115
  }), n;
1116
1116
  }
1117
1117
  setState(e, r) {
1118
- P(this, ne, he).call(this, { type: "setState", state: e, setStateOptions: r });
1118
+ P(this, re, le).call(this, { type: "setState", state: e, setStateOptions: r });
1119
1119
  }
1120
1120
  cancel(e) {
1121
1121
  var n, s;
1122
- const r = (n = o(this, W)) == null ? void 0 : n.promise;
1123
- return (s = o(this, W)) == null || s.cancel(e), r ? r.then(te).catch(te) : Promise.resolve();
1122
+ const r = (n = o(this, V)) == null ? void 0 : n.promise;
1123
+ return (s = o(this, V)) == null || s.cancel(e), r ? r.then(te).catch(te) : Promise.resolve();
1124
1124
  }
1125
1125
  destroy() {
1126
1126
  super.destroy(), this.cancel({ silent: !0 });
1127
1127
  }
1128
1128
  reset() {
1129
- this.destroy(), this.setState(o(this, Ye));
1129
+ this.destroy(), this.setState(o(this, Je));
1130
1130
  }
1131
1131
  isActive() {
1132
1132
  return this.observers.some(
1133
- (e) => ie(e.options.enabled, this) !== !1
1133
+ (e) => se(e.options.enabled, this) !== !1
1134
1134
  );
1135
1135
  }
1136
1136
  isDisabled() {
@@ -1147,32 +1147,32 @@ var K = ai(), Ie, Sn, Wn = (Sn = class {
1147
1147
  onFocus() {
1148
1148
  var r;
1149
1149
  const e = this.observers.find((n) => n.shouldFetchOnWindowFocus());
1150
- e == null || e.refetch({ cancelRefetch: !1 }), (r = o(this, W)) == null || r.continue();
1150
+ e == null || e.refetch({ cancelRefetch: !1 }), (r = o(this, V)) == null || r.continue();
1151
1151
  }
1152
1152
  onOnline() {
1153
1153
  var r;
1154
1154
  const e = this.observers.find((n) => n.shouldFetchOnReconnect());
1155
- e == null || e.refetch({ cancelRefetch: !1 }), (r = o(this, W)) == null || r.continue();
1155
+ e == null || e.refetch({ cancelRefetch: !1 }), (r = o(this, V)) == null || r.continue();
1156
1156
  }
1157
1157
  addObserver(e) {
1158
1158
  this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), o(this, ee).notify({ type: "observerAdded", query: this, observer: e }));
1159
1159
  }
1160
1160
  removeObserver(e) {
1161
- this.observers.includes(e) && (this.observers = this.observers.filter((r) => r !== e), this.observers.length || (o(this, W) && (o(this, qe) ? o(this, W).cancel({ revert: !0 }) : o(this, W).cancelRetry()), this.scheduleGc()), o(this, ee).notify({ type: "observerRemoved", query: this, observer: e }));
1161
+ this.observers.includes(e) && (this.observers = this.observers.filter((r) => r !== e), this.observers.length || (o(this, V) && (o(this, qe) ? o(this, V).cancel({ revert: !0 }) : o(this, V).cancelRetry()), this.scheduleGc()), o(this, ee).notify({ type: "observerRemoved", query: this, observer: e }));
1162
1162
  }
1163
1163
  getObserversCount() {
1164
1164
  return this.observers.length;
1165
1165
  }
1166
1166
  invalidate() {
1167
- this.state.isInvalidated || P(this, ne, he).call(this, { type: "invalidate" });
1167
+ this.state.isInvalidated || P(this, re, le).call(this, { type: "invalidate" });
1168
1168
  }
1169
1169
  fetch(e, r) {
1170
1170
  var c, d, f;
1171
1171
  if (this.state.fetchStatus !== "idle") {
1172
1172
  if (this.state.data !== void 0 && (r != null && r.cancelRefetch))
1173
1173
  this.cancel({ silent: !0 });
1174
- else if (o(this, W))
1175
- return o(this, W).continueRetry(), o(this, W).promise;
1174
+ else if (o(this, V))
1175
+ return o(this, V).continueRetry(), o(this, V).promise;
1176
1176
  }
1177
1177
  if (e && this.setOptions(e), !this.options.queryFn) {
1178
1178
  const h = this.observers.find((y) => y.options.queryFn);
@@ -1208,10 +1208,10 @@ var K = ai(), Ie, Sn, Wn = (Sn = class {
1208
1208
  s(u), (c = this.options.behavior) == null || c.onFetch(
1209
1209
  u,
1210
1210
  this
1211
- ), b(this, Je, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((d = u.fetchOptions) == null ? void 0 : d.meta)) && P(this, ne, he).call(this, { type: "fetch", meta: (f = u.fetchOptions) == null ? void 0 : f.meta });
1211
+ ), b(this, Xe, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((d = u.fetchOptions) == null ? void 0 : d.meta)) && P(this, re, le).call(this, { type: "fetch", meta: (f = u.fetchOptions) == null ? void 0 : f.meta });
1212
1212
  const l = (h) => {
1213
1213
  var y, m, R, g;
1214
- Jt(h) && h.silent || P(this, ne, he).call(this, {
1214
+ Jt(h) && h.silent || P(this, re, le).call(this, {
1215
1215
  type: "error",
1216
1216
  error: h
1217
1217
  }), Jt(h) || ((m = (y = o(this, ee).config).onError) == null || m.call(
@@ -1225,7 +1225,7 @@ var K = ai(), Ie, Sn, Wn = (Sn = class {
1225
1225
  this
1226
1226
  )), this.scheduleGc();
1227
1227
  };
1228
- return b(this, W, zn({
1228
+ return b(this, V, zn({
1229
1229
  initialPromise: r == null ? void 0 : r.initialPromise,
1230
1230
  fn: u.fetchFn,
1231
1231
  abort: n.abort.bind(n),
@@ -1252,21 +1252,21 @@ var K = ai(), Ie, Sn, Wn = (Sn = class {
1252
1252
  },
1253
1253
  onError: l,
1254
1254
  onFail: (h, y) => {
1255
- P(this, ne, he).call(this, { type: "failed", failureCount: h, error: y });
1255
+ P(this, re, le).call(this, { type: "failed", failureCount: h, error: y });
1256
1256
  },
1257
1257
  onPause: () => {
1258
- P(this, ne, he).call(this, { type: "pause" });
1258
+ P(this, re, le).call(this, { type: "pause" });
1259
1259
  },
1260
1260
  onContinue: () => {
1261
- P(this, ne, he).call(this, { type: "continue" });
1261
+ P(this, re, le).call(this, { type: "continue" });
1262
1262
  },
1263
1263
  retry: u.options.retry,
1264
1264
  retryDelay: u.options.retryDelay,
1265
1265
  networkMode: u.options.networkMode,
1266
1266
  canRun: () => !0
1267
- })), o(this, W).start();
1267
+ })), o(this, V).start();
1268
1268
  }
1269
- }, Ye = new WeakMap(), Je = new WeakMap(), ee = new WeakMap(), je = new WeakMap(), W = new WeakMap(), Ot = new WeakMap(), qe = new WeakMap(), ne = new WeakSet(), he = function(e) {
1269
+ }, Je = new WeakMap(), Xe = new WeakMap(), ee = new WeakMap(), je = new WeakMap(), V = new WeakMap(), Ot = new WeakMap(), qe = new WeakMap(), re = new WeakSet(), le = function(e) {
1270
1270
  const r = (n) => {
1271
1271
  switch (e.type) {
1272
1272
  case "failed":
@@ -1308,7 +1308,7 @@ var K = ai(), Ie, Sn, Wn = (Sn = class {
1308
1308
  };
1309
1309
  case "error":
1310
1310
  const s = e.error;
1311
- return Jt(s) && s.revert && o(this, Je) ? { ...o(this, Je), fetchStatus: "idle" } : {
1311
+ return Jt(s) && s.revert && o(this, Xe) ? { ...o(this, Xe), fetchStatus: "idle" } : {
1312
1312
  ...n,
1313
1313
  error: s,
1314
1314
  errorUpdateCount: n.errorUpdateCount + 1,
@@ -1330,7 +1330,7 @@ var K = ai(), Ie, Sn, Wn = (Sn = class {
1330
1330
  };
1331
1331
  }
1332
1332
  };
1333
- this.state = r(this.state), K.batch(() => {
1333
+ this.state = r(this.state), L.batch(() => {
1334
1334
  this.observers.forEach((n) => {
1335
1335
  n.onQueryUpdate();
1336
1336
  }), o(this, ee).notify({ query: this, type: "updated", action: e });
@@ -1364,14 +1364,14 @@ function ci(t) {
1364
1364
  fetchStatus: "idle"
1365
1365
  };
1366
1366
  }
1367
- var ue, Tn, li = (Tn = class extends at {
1367
+ var oe, Tn, li = (Tn = class extends ut {
1368
1368
  constructor(e = {}) {
1369
1369
  super();
1370
- E(this, ue);
1371
- this.config = e, b(this, ue, /* @__PURE__ */ new Map());
1370
+ E(this, oe);
1371
+ this.config = e, b(this, oe, /* @__PURE__ */ new Map());
1372
1372
  }
1373
1373
  build(e, r, n) {
1374
- const s = r.queryKey, a = r.queryHash ?? Sr(s, r);
1374
+ const s = r.queryKey, a = r.queryHash ?? Pr(s, r);
1375
1375
  let u = this.get(a);
1376
1376
  return u || (u = new ui({
1377
1377
  client: e,
@@ -1383,67 +1383,67 @@ var ue, Tn, li = (Tn = class extends at {
1383
1383
  }), this.add(u)), u;
1384
1384
  }
1385
1385
  add(e) {
1386
- o(this, ue).has(e.queryHash) || (o(this, ue).set(e.queryHash, e), this.notify({
1386
+ o(this, oe).has(e.queryHash) || (o(this, oe).set(e.queryHash, e), this.notify({
1387
1387
  type: "added",
1388
1388
  query: e
1389
1389
  }));
1390
1390
  }
1391
1391
  remove(e) {
1392
- const r = o(this, ue).get(e.queryHash);
1393
- r && (e.destroy(), r === e && o(this, ue).delete(e.queryHash), this.notify({ type: "removed", query: e }));
1392
+ const r = o(this, oe).get(e.queryHash);
1393
+ r && (e.destroy(), r === e && o(this, oe).delete(e.queryHash), this.notify({ type: "removed", query: e }));
1394
1394
  }
1395
1395
  clear() {
1396
- K.batch(() => {
1396
+ L.batch(() => {
1397
1397
  this.getAll().forEach((e) => {
1398
1398
  this.remove(e);
1399
1399
  });
1400
1400
  });
1401
1401
  }
1402
1402
  get(e) {
1403
- return o(this, ue).get(e);
1403
+ return o(this, oe).get(e);
1404
1404
  }
1405
1405
  getAll() {
1406
- return [...o(this, ue).values()];
1406
+ return [...o(this, oe).values()];
1407
1407
  }
1408
1408
  find(e) {
1409
1409
  const r = { exact: !0, ...e };
1410
1410
  return this.getAll().find(
1411
- (n) => rn(r, n)
1411
+ (n) => tn(r, n)
1412
1412
  );
1413
1413
  }
1414
1414
  findAll(e = {}) {
1415
1415
  const r = this.getAll();
1416
- return Object.keys(e).length > 0 ? r.filter((n) => rn(e, n)) : r;
1416
+ return Object.keys(e).length > 0 ? r.filter((n) => tn(e, n)) : r;
1417
1417
  }
1418
1418
  notify(e) {
1419
- K.batch(() => {
1419
+ L.batch(() => {
1420
1420
  this.listeners.forEach((r) => {
1421
1421
  r(e);
1422
1422
  });
1423
1423
  });
1424
1424
  }
1425
1425
  onFocus() {
1426
- K.batch(() => {
1426
+ L.batch(() => {
1427
1427
  this.getAll().forEach((e) => {
1428
1428
  e.onFocus();
1429
1429
  });
1430
1430
  });
1431
1431
  }
1432
1432
  onOnline() {
1433
- K.batch(() => {
1433
+ L.batch(() => {
1434
1434
  this.getAll().forEach((e) => {
1435
1435
  e.onOnline();
1436
1436
  });
1437
1437
  });
1438
1438
  }
1439
- }, ue = new WeakMap(), Tn), ce, B, Me, le, ge, xn, fi = (xn = class extends Wn {
1439
+ }, oe = new WeakMap(), Tn), ae, H, Me, ue, ge, xn, fi = (xn = class extends Wn {
1440
1440
  constructor(e) {
1441
1441
  super();
1442
- E(this, le);
1443
- E(this, ce);
1444
- E(this, B);
1442
+ E(this, ue);
1443
+ E(this, ae);
1444
+ E(this, H);
1445
1445
  E(this, Me);
1446
- this.mutationId = e.mutationId, b(this, B, e.mutationCache), b(this, ce, []), this.state = e.state || Bn(), this.setOptions(e.options), this.scheduleGc();
1446
+ this.mutationId = e.mutationId, b(this, H, e.mutationCache), b(this, ae, []), this.state = e.state || Bn(), this.setOptions(e.options), this.scheduleGc();
1447
1447
  }
1448
1448
  setOptions(e) {
1449
1449
  this.options = e, this.updateGcTime(this.options.gcTime);
@@ -1452,21 +1452,21 @@ var ue, Tn, li = (Tn = class extends at {
1452
1452
  return this.options.meta;
1453
1453
  }
1454
1454
  addObserver(e) {
1455
- o(this, ce).includes(e) || (o(this, ce).push(e), this.clearGcTimeout(), o(this, B).notify({
1455
+ o(this, ae).includes(e) || (o(this, ae).push(e), this.clearGcTimeout(), o(this, H).notify({
1456
1456
  type: "observerAdded",
1457
1457
  mutation: this,
1458
1458
  observer: e
1459
1459
  }));
1460
1460
  }
1461
1461
  removeObserver(e) {
1462
- b(this, ce, o(this, ce).filter((r) => r !== e)), this.scheduleGc(), o(this, B).notify({
1462
+ b(this, ae, o(this, ae).filter((r) => r !== e)), this.scheduleGc(), o(this, H).notify({
1463
1463
  type: "observerRemoved",
1464
1464
  mutation: this,
1465
1465
  observer: e
1466
1466
  });
1467
1467
  }
1468
1468
  optionalRemove() {
1469
- o(this, ce).length || (this.state.status === "pending" ? this.scheduleGc() : o(this, B).remove(this));
1469
+ o(this, ae).length || (this.state.status === "pending" ? this.scheduleGc() : o(this, H).remove(this));
1470
1470
  }
1471
1471
  continue() {
1472
1472
  var e;
@@ -1474,89 +1474,89 @@ var ue, Tn, li = (Tn = class extends at {
1474
1474
  this.execute(this.state.variables);
1475
1475
  }
1476
1476
  async execute(e) {
1477
- var s, a, u, l, c, d, f, h, y, m, R, g, w, C, S, j, L, V, U, M;
1477
+ var s, a, u, l, c, d, f, h, y, m, R, g, w, A, S, j, Q, z, X, K;
1478
1478
  b(this, Me, zn({
1479
1479
  fn: () => this.options.mutationFn ? this.options.mutationFn(e) : Promise.reject(new Error("No mutationFn found")),
1480
- onFail: (I, k) => {
1481
- P(this, le, ge).call(this, { type: "failed", failureCount: I, error: k });
1480
+ onFail: (q, k) => {
1481
+ P(this, ue, ge).call(this, { type: "failed", failureCount: q, error: k });
1482
1482
  },
1483
1483
  onPause: () => {
1484
- P(this, le, ge).call(this, { type: "pause" });
1484
+ P(this, ue, ge).call(this, { type: "pause" });
1485
1485
  },
1486
1486
  onContinue: () => {
1487
- P(this, le, ge).call(this, { type: "continue" });
1487
+ P(this, ue, ge).call(this, { type: "continue" });
1488
1488
  },
1489
1489
  retry: this.options.retry ?? 0,
1490
1490
  retryDelay: this.options.retryDelay,
1491
1491
  networkMode: this.options.networkMode,
1492
- canRun: () => o(this, B).canRun(this)
1492
+ canRun: () => o(this, H).canRun(this)
1493
1493
  }));
1494
1494
  const r = this.state.status === "pending", n = !o(this, Me).canStart();
1495
1495
  try {
1496
1496
  if (!r) {
1497
- P(this, le, ge).call(this, { type: "pending", variables: e, isPaused: n }), await ((a = (s = o(this, B).config).onMutate) == null ? void 0 : a.call(
1497
+ P(this, ue, ge).call(this, { type: "pending", variables: e, isPaused: n }), await ((a = (s = o(this, H).config).onMutate) == null ? void 0 : a.call(
1498
1498
  s,
1499
1499
  e,
1500
1500
  this
1501
1501
  ));
1502
1502
  const k = await ((l = (u = this.options).onMutate) == null ? void 0 : l.call(u, e));
1503
- k !== this.state.context && P(this, le, ge).call(this, {
1503
+ k !== this.state.context && P(this, ue, ge).call(this, {
1504
1504
  type: "pending",
1505
1505
  context: k,
1506
1506
  variables: e,
1507
1507
  isPaused: n
1508
1508
  });
1509
1509
  }
1510
- const I = await o(this, Me).start();
1511
- return await ((d = (c = o(this, B).config).onSuccess) == null ? void 0 : d.call(
1510
+ const q = await o(this, Me).start();
1511
+ return await ((d = (c = o(this, H).config).onSuccess) == null ? void 0 : d.call(
1512
1512
  c,
1513
- I,
1513
+ q,
1514
1514
  e,
1515
1515
  this.state.context,
1516
1516
  this
1517
- )), await ((h = (f = this.options).onSuccess) == null ? void 0 : h.call(f, I, e, this.state.context)), await ((m = (y = o(this, B).config).onSettled) == null ? void 0 : m.call(
1517
+ )), await ((h = (f = this.options).onSuccess) == null ? void 0 : h.call(f, q, e, this.state.context)), await ((m = (y = o(this, H).config).onSettled) == null ? void 0 : m.call(
1518
1518
  y,
1519
- I,
1519
+ q,
1520
1520
  null,
1521
1521
  this.state.variables,
1522
1522
  this.state.context,
1523
1523
  this
1524
- )), await ((g = (R = this.options).onSettled) == null ? void 0 : g.call(R, I, null, e, this.state.context)), P(this, le, ge).call(this, { type: "success", data: I }), I;
1525
- } catch (I) {
1524
+ )), await ((g = (R = this.options).onSettled) == null ? void 0 : g.call(R, q, null, e, this.state.context)), P(this, ue, ge).call(this, { type: "success", data: q }), q;
1525
+ } catch (q) {
1526
1526
  try {
1527
- throw await ((C = (w = o(this, B).config).onError) == null ? void 0 : C.call(
1527
+ throw await ((A = (w = o(this, H).config).onError) == null ? void 0 : A.call(
1528
1528
  w,
1529
- I,
1529
+ q,
1530
1530
  e,
1531
1531
  this.state.context,
1532
1532
  this
1533
1533
  )), await ((j = (S = this.options).onError) == null ? void 0 : j.call(
1534
1534
  S,
1535
- I,
1535
+ q,
1536
1536
  e,
1537
1537
  this.state.context
1538
- )), await ((V = (L = o(this, B).config).onSettled) == null ? void 0 : V.call(
1539
- L,
1538
+ )), await ((z = (Q = o(this, H).config).onSettled) == null ? void 0 : z.call(
1539
+ Q,
1540
1540
  void 0,
1541
- I,
1541
+ q,
1542
1542
  this.state.variables,
1543
1543
  this.state.context,
1544
1544
  this
1545
- )), await ((M = (U = this.options).onSettled) == null ? void 0 : M.call(
1546
- U,
1545
+ )), await ((K = (X = this.options).onSettled) == null ? void 0 : K.call(
1546
+ X,
1547
1547
  void 0,
1548
- I,
1548
+ q,
1549
1549
  e,
1550
1550
  this.state.context
1551
- )), I;
1551
+ )), q;
1552
1552
  } finally {
1553
- P(this, le, ge).call(this, { type: "error", error: I });
1553
+ P(this, ue, ge).call(this, { type: "error", error: q });
1554
1554
  }
1555
1555
  } finally {
1556
- o(this, B).runNext(this);
1556
+ o(this, H).runNext(this);
1557
1557
  }
1558
1558
  }
1559
- }, ce = new WeakMap(), B = new WeakMap(), Me = new WeakMap(), le = new WeakSet(), ge = function(e) {
1559
+ }, ae = new WeakMap(), H = new WeakMap(), Me = new WeakMap(), ue = new WeakSet(), ge = function(e) {
1560
1560
  const r = (n) => {
1561
1561
  switch (e.type) {
1562
1562
  case "failed":
@@ -1610,10 +1610,10 @@ var ue, Tn, li = (Tn = class extends at {
1610
1610
  };
1611
1611
  }
1612
1612
  };
1613
- this.state = r(this.state), K.batch(() => {
1614
- o(this, ce).forEach((n) => {
1613
+ this.state = r(this.state), L.batch(() => {
1614
+ o(this, ae).forEach((n) => {
1615
1615
  n.onMutationUpdate(e);
1616
- }), o(this, B).notify({
1616
+ }), o(this, H).notify({
1617
1617
  mutation: this,
1618
1618
  type: "updated",
1619
1619
  action: e
@@ -1633,50 +1633,50 @@ function Bn() {
1633
1633
  submittedAt: 0
1634
1634
  };
1635
1635
  }
1636
- var de, se, Pt, Fn, hi = (Fn = class extends at {
1636
+ var fe, ne, Pt, Fn, hi = (Fn = class extends ut {
1637
1637
  constructor(e = {}) {
1638
1638
  super();
1639
- E(this, de);
1640
- E(this, se);
1639
+ E(this, fe);
1640
+ E(this, ne);
1641
1641
  E(this, Pt);
1642
- this.config = e, b(this, de, /* @__PURE__ */ new Set()), b(this, se, /* @__PURE__ */ new Map()), b(this, Pt, 0);
1642
+ this.config = e, b(this, fe, /* @__PURE__ */ new Set()), b(this, ne, /* @__PURE__ */ new Map()), b(this, Pt, 0);
1643
1643
  }
1644
1644
  build(e, r, n) {
1645
1645
  const s = new fi({
1646
1646
  mutationCache: this,
1647
- mutationId: ++Dt(this, Pt)._,
1647
+ mutationId: ++_t(this, Pt)._,
1648
1648
  options: e.defaultMutationOptions(r),
1649
1649
  state: n
1650
1650
  });
1651
1651
  return this.add(s), s;
1652
1652
  }
1653
1653
  add(e) {
1654
- o(this, de).add(e);
1655
- const r = _t(e);
1654
+ o(this, fe).add(e);
1655
+ const r = It(e);
1656
1656
  if (typeof r == "string") {
1657
- const n = o(this, se).get(r);
1658
- n ? n.push(e) : o(this, se).set(r, [e]);
1657
+ const n = o(this, ne).get(r);
1658
+ n ? n.push(e) : o(this, ne).set(r, [e]);
1659
1659
  }
1660
1660
  this.notify({ type: "added", mutation: e });
1661
1661
  }
1662
1662
  remove(e) {
1663
- if (o(this, de).delete(e)) {
1664
- const r = _t(e);
1663
+ if (o(this, fe).delete(e)) {
1664
+ const r = It(e);
1665
1665
  if (typeof r == "string") {
1666
- const n = o(this, se).get(r);
1666
+ const n = o(this, ne).get(r);
1667
1667
  if (n)
1668
1668
  if (n.length > 1) {
1669
1669
  const s = n.indexOf(e);
1670
1670
  s !== -1 && n.splice(s, 1);
1671
- } else n[0] === e && o(this, se).delete(r);
1671
+ } else n[0] === e && o(this, ne).delete(r);
1672
1672
  }
1673
1673
  }
1674
1674
  this.notify({ type: "removed", mutation: e });
1675
1675
  }
1676
1676
  canRun(e) {
1677
- const r = _t(e);
1677
+ const r = It(e);
1678
1678
  if (typeof r == "string") {
1679
- const n = o(this, se).get(r), s = n == null ? void 0 : n.find(
1679
+ const n = o(this, ne).get(r), s = n == null ? void 0 : n.find(
1680
1680
  (a) => a.state.status === "pending"
1681
1681
  );
1682
1682
  return !s || s === e;
@@ -1685,34 +1685,34 @@ var de, se, Pt, Fn, hi = (Fn = class extends at {
1685
1685
  }
1686
1686
  runNext(e) {
1687
1687
  var n;
1688
- const r = _t(e);
1688
+ const r = It(e);
1689
1689
  if (typeof r == "string") {
1690
- const s = (n = o(this, se).get(r)) == null ? void 0 : n.find((a) => a !== e && a.state.isPaused);
1690
+ const s = (n = o(this, ne).get(r)) == null ? void 0 : n.find((a) => a !== e && a.state.isPaused);
1691
1691
  return (s == null ? void 0 : s.continue()) ?? Promise.resolve();
1692
1692
  } else
1693
1693
  return Promise.resolve();
1694
1694
  }
1695
1695
  clear() {
1696
- K.batch(() => {
1697
- o(this, de).forEach((e) => {
1696
+ L.batch(() => {
1697
+ o(this, fe).forEach((e) => {
1698
1698
  this.notify({ type: "removed", mutation: e });
1699
- }), o(this, de).clear(), o(this, se).clear();
1699
+ }), o(this, fe).clear(), o(this, ne).clear();
1700
1700
  });
1701
1701
  }
1702
1702
  getAll() {
1703
- return Array.from(o(this, de));
1703
+ return Array.from(o(this, fe));
1704
1704
  }
1705
1705
  find(e) {
1706
1706
  const r = { exact: !0, ...e };
1707
1707
  return this.getAll().find(
1708
- (n) => nn(r, n)
1708
+ (n) => rn(r, n)
1709
1709
  );
1710
1710
  }
1711
1711
  findAll(e = {}) {
1712
- return this.getAll().filter((r) => nn(e, r));
1712
+ return this.getAll().filter((r) => rn(e, r));
1713
1713
  }
1714
1714
  notify(e) {
1715
- K.batch(() => {
1715
+ L.batch(() => {
1716
1716
  this.listeners.forEach((r) => {
1717
1717
  r(e);
1718
1718
  });
@@ -1720,18 +1720,18 @@ var de, se, Pt, Fn, hi = (Fn = class extends at {
1720
1720
  }
1721
1721
  resumePausedMutations() {
1722
1722
  const e = this.getAll().filter((r) => r.state.isPaused);
1723
- return K.batch(
1723
+ return L.batch(
1724
1724
  () => Promise.all(
1725
1725
  e.map((r) => r.continue().catch(te))
1726
1726
  )
1727
1727
  );
1728
1728
  }
1729
- }, de = new WeakMap(), se = new WeakMap(), Pt = new WeakMap(), Fn);
1730
- function _t(t) {
1729
+ }, fe = new WeakMap(), ne = new WeakMap(), Pt = new WeakMap(), Fn);
1730
+ function It(t) {
1731
1731
  var e;
1732
1732
  return (e = t.options.scope) == null ? void 0 : e.id;
1733
1733
  }
1734
- function an(t) {
1734
+ function on(t) {
1735
1735
  return {
1736
1736
  onFetch: (e, r) => {
1737
1737
  var f, h, y, m, R;
@@ -1746,40 +1746,40 @@ function an(t) {
1746
1746
  g = !0;
1747
1747
  }), e.signal)
1748
1748
  });
1749
- }, C = $n(e.options, e.fetchOptions), S = async (j, L, V) => {
1749
+ }, A = $n(e.options, e.fetchOptions), S = async (j, Q, z) => {
1750
1750
  if (g)
1751
1751
  return Promise.reject();
1752
- if (L == null && j.pages.length)
1752
+ if (Q == null && j.pages.length)
1753
1753
  return Promise.resolve(j);
1754
- const U = {
1754
+ const X = {
1755
1755
  client: e.client,
1756
1756
  queryKey: e.queryKey,
1757
- pageParam: L,
1758
- direction: V ? "backward" : "forward",
1757
+ pageParam: Q,
1758
+ direction: z ? "backward" : "forward",
1759
1759
  meta: e.options.meta
1760
1760
  };
1761
- w(U);
1762
- const M = await C(
1763
- U
1764
- ), { maxPages: I } = e.options, k = V ? ni : ri;
1761
+ w(X);
1762
+ const K = await A(
1763
+ X
1764
+ ), { maxPages: q } = e.options, k = z ? ni : ri;
1765
1765
  return {
1766
- pages: k(j.pages, M, I),
1767
- pageParams: k(j.pageParams, L, I)
1766
+ pages: k(j.pages, K, q),
1767
+ pageParams: k(j.pageParams, Q, q)
1768
1768
  };
1769
1769
  };
1770
1770
  if (s && a.length) {
1771
- const j = s === "backward", L = j ? di : un, V = {
1771
+ const j = s === "backward", Q = j ? di : an, z = {
1772
1772
  pages: a,
1773
1773
  pageParams: u
1774
- }, U = L(n, V);
1775
- l = await S(V, U, j);
1774
+ }, X = Q(n, z);
1775
+ l = await S(z, X, j);
1776
1776
  } else {
1777
1777
  const j = t ?? a.length;
1778
1778
  do {
1779
- const L = c === 0 ? u[0] ?? n.initialPageParam : un(n, l);
1780
- if (c > 0 && L == null)
1779
+ const Q = c === 0 ? u[0] ?? n.initialPageParam : an(n, l);
1780
+ if (c > 0 && Q == null)
1781
1781
  break;
1782
- l = await S(l, L), c++;
1782
+ l = await S(l, Q), c++;
1783
1783
  } while (c < j);
1784
1784
  }
1785
1785
  return l;
@@ -1801,7 +1801,7 @@ function an(t) {
1801
1801
  }
1802
1802
  };
1803
1803
  }
1804
- function un(t, { pages: e, pageParams: r }) {
1804
+ function an(t, { pages: e, pageParams: r }) {
1805
1805
  const n = e.length - 1;
1806
1806
  return e.length > 0 ? t.getNextPageParam(
1807
1807
  e[n],
@@ -1814,31 +1814,31 @@ function di(t, { pages: e, pageParams: r }) {
1814
1814
  var n;
1815
1815
  return e.length > 0 ? (n = t.getPreviousPageParam) == null ? void 0 : n.call(t, e[0], e, r[0], r) : void 0;
1816
1816
  }
1817
- var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
1817
+ var M, we, Ee, Ze, et, Re, tt, rt, An, yi = (An = class {
1818
1818
  constructor(t = {}) {
1819
- E(this, N);
1819
+ E(this, M);
1820
1820
  E(this, we);
1821
1821
  E(this, Ee);
1822
- E(this, Xe);
1823
1822
  E(this, Ze);
1824
- E(this, Re);
1825
1823
  E(this, et);
1824
+ E(this, Re);
1826
1825
  E(this, tt);
1827
- b(this, N, t.queryCache || new li()), b(this, we, t.mutationCache || new hi()), b(this, Ee, t.defaultOptions || {}), b(this, Xe, /* @__PURE__ */ new Map()), b(this, Ze, /* @__PURE__ */ new Map()), b(this, Re, 0);
1826
+ E(this, rt);
1827
+ b(this, M, t.queryCache || new li()), b(this, we, t.mutationCache || new hi()), b(this, Ee, t.defaultOptions || {}), b(this, Ze, /* @__PURE__ */ new Map()), b(this, et, /* @__PURE__ */ new Map()), b(this, Re, 0);
1828
1828
  }
1829
1829
  mount() {
1830
- Dt(this, Re)._++, o(this, Re) === 1 && (b(this, et, Cr.subscribe(async (t) => {
1831
- t && (await this.resumePausedMutations(), o(this, N).onFocus());
1832
- })), b(this, tt, Nt.subscribe(async (t) => {
1833
- t && (await this.resumePausedMutations(), o(this, N).onOnline());
1830
+ _t(this, Re)._++, o(this, Re) === 1 && (b(this, tt, Sr.subscribe(async (t) => {
1831
+ t && (await this.resumePausedMutations(), o(this, M).onFocus());
1832
+ })), b(this, rt, Nt.subscribe(async (t) => {
1833
+ t && (await this.resumePausedMutations(), o(this, M).onOnline());
1834
1834
  })));
1835
1835
  }
1836
1836
  unmount() {
1837
1837
  var t, e;
1838
- Dt(this, Re)._--, o(this, Re) === 0 && ((t = o(this, et)) == null || t.call(this), b(this, et, void 0), (e = o(this, tt)) == null || e.call(this), b(this, tt, void 0));
1838
+ _t(this, Re)._--, o(this, Re) === 0 && ((t = o(this, tt)) == null || t.call(this), b(this, tt, void 0), (e = o(this, rt)) == null || e.call(this), b(this, rt, void 0));
1839
1839
  }
1840
1840
  isFetching(t) {
1841
- return o(this, N).findAll({ ...t, fetchStatus: "fetching" }).length;
1841
+ return o(this, M).findAll({ ...t, fetchStatus: "fetching" }).length;
1842
1842
  }
1843
1843
  isMutating(t) {
1844
1844
  return o(this, we).findAll({ ...t, status: "pending" }).length;
@@ -1846,28 +1846,28 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
1846
1846
  getQueryData(t) {
1847
1847
  var r;
1848
1848
  const e = this.defaultQueryOptions({ queryKey: t });
1849
- return (r = o(this, N).get(e.queryHash)) == null ? void 0 : r.state.data;
1849
+ return (r = o(this, M).get(e.queryHash)) == null ? void 0 : r.state.data;
1850
1850
  }
1851
1851
  ensureQueryData(t) {
1852
- const e = this.defaultQueryOptions(t), r = o(this, N).build(this, e), n = r.state.data;
1853
- return n === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && r.isStaleByTime(We(e.staleTime, r)) && this.prefetchQuery(e), Promise.resolve(n));
1852
+ const e = this.defaultQueryOptions(t), r = o(this, M).build(this, e), n = r.state.data;
1853
+ return n === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && r.isStaleByTime(He(e.staleTime, r)) && this.prefetchQuery(e), Promise.resolve(n));
1854
1854
  }
1855
1855
  getQueriesData(t) {
1856
- return o(this, N).findAll(t).map(({ queryKey: e, state: r }) => {
1856
+ return o(this, M).findAll(t).map(({ queryKey: e, state: r }) => {
1857
1857
  const n = r.data;
1858
1858
  return [e, n];
1859
1859
  });
1860
1860
  }
1861
1861
  setQueryData(t, e, r) {
1862
- const n = this.defaultQueryOptions({ queryKey: t }), s = o(this, N).get(
1862
+ const n = this.defaultQueryOptions({ queryKey: t }), s = o(this, M).get(
1863
1863
  n.queryHash
1864
1864
  ), a = s == null ? void 0 : s.state.data, u = ei(e, a);
1865
1865
  if (u !== void 0)
1866
- return o(this, N).build(this, n).setData(u, { ...r, manual: !0 });
1866
+ return o(this, M).build(this, n).setData(u, { ...r, manual: !0 });
1867
1867
  }
1868
1868
  setQueriesData(t, e, r) {
1869
- return K.batch(
1870
- () => o(this, N).findAll(t).map(({ queryKey: n }) => [
1869
+ return L.batch(
1870
+ () => o(this, M).findAll(t).map(({ queryKey: n }) => [
1871
1871
  n,
1872
1872
  this.setQueryData(n, e, r)
1873
1873
  ])
@@ -1876,21 +1876,21 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
1876
1876
  getQueryState(t) {
1877
1877
  var r;
1878
1878
  const e = this.defaultQueryOptions({ queryKey: t });
1879
- return (r = o(this, N).get(
1879
+ return (r = o(this, M).get(
1880
1880
  e.queryHash
1881
1881
  )) == null ? void 0 : r.state;
1882
1882
  }
1883
1883
  removeQueries(t) {
1884
- const e = o(this, N);
1885
- K.batch(() => {
1884
+ const e = o(this, M);
1885
+ L.batch(() => {
1886
1886
  e.findAll(t).forEach((r) => {
1887
1887
  e.remove(r);
1888
1888
  });
1889
1889
  });
1890
1890
  }
1891
1891
  resetQueries(t, e) {
1892
- const r = o(this, N);
1893
- return K.batch(() => (r.findAll(t).forEach((n) => {
1892
+ const r = o(this, M);
1893
+ return L.batch(() => (r.findAll(t).forEach((n) => {
1894
1894
  n.reset();
1895
1895
  }), this.refetchQueries(
1896
1896
  {
@@ -1901,13 +1901,13 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
1901
1901
  )));
1902
1902
  }
1903
1903
  cancelQueries(t, e = {}) {
1904
- const r = { revert: !0, ...e }, n = K.batch(
1905
- () => o(this, N).findAll(t).map((s) => s.cancel(r))
1904
+ const r = { revert: !0, ...e }, n = L.batch(
1905
+ () => o(this, M).findAll(t).map((s) => s.cancel(r))
1906
1906
  );
1907
1907
  return Promise.all(n).then(te).catch(te);
1908
1908
  }
1909
1909
  invalidateQueries(t, e = {}) {
1910
- return K.batch(() => (o(this, N).findAll(t).forEach((r) => {
1910
+ return L.batch(() => (o(this, M).findAll(t).forEach((r) => {
1911
1911
  r.invalidate();
1912
1912
  }), (t == null ? void 0 : t.refetchType) === "none" ? Promise.resolve() : this.refetchQueries(
1913
1913
  {
@@ -1921,8 +1921,8 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
1921
1921
  const r = {
1922
1922
  ...e,
1923
1923
  cancelRefetch: e.cancelRefetch ?? !0
1924
- }, n = K.batch(
1925
- () => o(this, N).findAll(t).filter((s) => !s.isDisabled()).map((s) => {
1924
+ }, n = L.batch(
1925
+ () => o(this, M).findAll(t).filter((s) => !s.isDisabled()).map((s) => {
1926
1926
  let a = s.fetch(void 0, r);
1927
1927
  return r.throwOnError || (a = a.catch(te)), s.state.fetchStatus === "paused" ? Promise.resolve() : a;
1928
1928
  })
@@ -1932,28 +1932,28 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
1932
1932
  fetchQuery(t) {
1933
1933
  const e = this.defaultQueryOptions(t);
1934
1934
  e.retry === void 0 && (e.retry = !1);
1935
- const r = o(this, N).build(this, e);
1935
+ const r = o(this, M).build(this, e);
1936
1936
  return r.isStaleByTime(
1937
- We(e.staleTime, r)
1937
+ He(e.staleTime, r)
1938
1938
  ) ? r.fetch(e) : Promise.resolve(r.state.data);
1939
1939
  }
1940
1940
  prefetchQuery(t) {
1941
1941
  return this.fetchQuery(t).then(te).catch(te);
1942
1942
  }
1943
1943
  fetchInfiniteQuery(t) {
1944
- return t.behavior = an(t.pages), this.fetchQuery(t);
1944
+ return t.behavior = on(t.pages), this.fetchQuery(t);
1945
1945
  }
1946
1946
  prefetchInfiniteQuery(t) {
1947
1947
  return this.fetchInfiniteQuery(t).then(te).catch(te);
1948
1948
  }
1949
1949
  ensureInfiniteQueryData(t) {
1950
- return t.behavior = an(t.pages), this.ensureQueryData(t);
1950
+ return t.behavior = on(t.pages), this.ensureQueryData(t);
1951
1951
  }
1952
1952
  resumePausedMutations() {
1953
1953
  return Nt.isOnline() ? o(this, we).resumePausedMutations() : Promise.resolve();
1954
1954
  }
1955
1955
  getQueryCache() {
1956
- return o(this, N);
1956
+ return o(this, M);
1957
1957
  }
1958
1958
  getMutationCache() {
1959
1959
  return o(this, we);
@@ -1965,25 +1965,25 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
1965
1965
  b(this, Ee, t);
1966
1966
  }
1967
1967
  setQueryDefaults(t, e) {
1968
- o(this, Xe).set($e(t), {
1968
+ o(this, Ze).set($e(t), {
1969
1969
  queryKey: t,
1970
1970
  defaultOptions: e
1971
1971
  });
1972
1972
  }
1973
1973
  getQueryDefaults(t) {
1974
- const e = [...o(this, Xe).values()], r = {};
1974
+ const e = [...o(this, Ze).values()], r = {};
1975
1975
  return e.forEach((n) => {
1976
1976
  bt(t, n.queryKey) && Object.assign(r, n.defaultOptions);
1977
1977
  }), r;
1978
1978
  }
1979
1979
  setMutationDefaults(t, e) {
1980
- o(this, Ze).set($e(t), {
1980
+ o(this, et).set($e(t), {
1981
1981
  mutationKey: t,
1982
1982
  defaultOptions: e
1983
1983
  });
1984
1984
  }
1985
1985
  getMutationDefaults(t) {
1986
- const e = [...o(this, Ze).values()], r = {};
1986
+ const e = [...o(this, et).values()], r = {};
1987
1987
  return e.forEach((n) => {
1988
1988
  bt(t, n.mutationKey) && Object.assign(r, n.defaultOptions);
1989
1989
  }), r;
@@ -1997,7 +1997,7 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
1997
1997
  ...t,
1998
1998
  _defaulted: !0
1999
1999
  };
2000
- return e.queryHash || (e.queryHash = Sr(
2000
+ return e.queryHash || (e.queryHash = Pr(
2001
2001
  e.queryKey,
2002
2002
  e
2003
2003
  )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.queryFn === Ut && (e.enabled = !1), e;
@@ -2011,30 +2011,30 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
2011
2011
  };
2012
2012
  }
2013
2013
  clear() {
2014
- o(this, N).clear(), o(this, we).clear();
2014
+ o(this, M).clear(), o(this, we).clear();
2015
2015
  }
2016
- }, N = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Re = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), An), J, x, St, G, Ue, rt, Oe, fe, Ct, nt, st, Ne, Le, Pe, it, _, pt, lr, fr, hr, dr, yr, pr, mr, Gn, kn, pi = (kn = class extends at {
2016
+ }, M = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(), Ze = new WeakMap(), et = new WeakMap(), Re = new WeakMap(), tt = new WeakMap(), rt = new WeakMap(), An), Y, T, St, B, Ue, nt, Oe, ce, Ct, st, it, Ne, Le, Pe, ot, _, mt, cr, lr, fr, hr, dr, yr, pr, Gn, Dn, pi = (Dn = class extends ut {
2017
2017
  constructor(e, r) {
2018
2018
  super();
2019
2019
  E(this, _);
2020
- E(this, J);
2021
- E(this, x);
2020
+ E(this, Y);
2021
+ E(this, T);
2022
2022
  E(this, St);
2023
- E(this, G);
2023
+ E(this, B);
2024
2024
  E(this, Ue);
2025
- E(this, rt);
2025
+ E(this, nt);
2026
2026
  E(this, Oe);
2027
- E(this, fe);
2027
+ E(this, ce);
2028
2028
  E(this, Ct);
2029
- E(this, nt);
2029
+ E(this, st);
2030
2030
  // This property keeps track of the last query with defined data.
2031
2031
  // It will be used to pass the previous data and query to the placeholder function between renders.
2032
- E(this, st);
2032
+ E(this, it);
2033
2033
  E(this, Ne);
2034
2034
  E(this, Le);
2035
2035
  E(this, Pe);
2036
- E(this, it, /* @__PURE__ */ new Set());
2037
- this.options = r, b(this, J, e), b(this, fe, null), b(this, Oe, cr()), this.options.experimental_prefetchInRender || o(this, Oe).reject(
2036
+ E(this, ot, /* @__PURE__ */ new Set());
2037
+ this.options = r, b(this, Y, e), b(this, ce, null), b(this, Oe, ur()), this.options.experimental_prefetchInRender || o(this, Oe).reject(
2038
2038
  new Error("experimental_prefetchInRender feature flag is not enabled")
2039
2039
  ), this.bindMethods(), this.setOptions(r);
2040
2040
  }
@@ -2042,55 +2042,55 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
2042
2042
  this.refetch = this.refetch.bind(this);
2043
2043
  }
2044
2044
  onSubscribe() {
2045
- this.listeners.size === 1 && (o(this, x).addObserver(this), cn(o(this, x), this.options) ? P(this, _, pt).call(this) : this.updateResult(), P(this, _, dr).call(this));
2045
+ this.listeners.size === 1 && (o(this, T).addObserver(this), un(o(this, T), this.options) ? P(this, _, mt).call(this) : this.updateResult(), P(this, _, hr).call(this));
2046
2046
  }
2047
2047
  onUnsubscribe() {
2048
2048
  this.hasListeners() || this.destroy();
2049
2049
  }
2050
2050
  shouldFetchOnReconnect() {
2051
- return gr(
2052
- o(this, x),
2051
+ return mr(
2052
+ o(this, T),
2053
2053
  this.options,
2054
2054
  this.options.refetchOnReconnect
2055
2055
  );
2056
2056
  }
2057
2057
  shouldFetchOnWindowFocus() {
2058
- return gr(
2059
- o(this, x),
2058
+ return mr(
2059
+ o(this, T),
2060
2060
  this.options,
2061
2061
  this.options.refetchOnWindowFocus
2062
2062
  );
2063
2063
  }
2064
2064
  destroy() {
2065
- this.listeners = /* @__PURE__ */ new Set(), P(this, _, yr).call(this), P(this, _, pr).call(this), o(this, x).removeObserver(this);
2065
+ this.listeners = /* @__PURE__ */ new Set(), P(this, _, dr).call(this), P(this, _, yr).call(this), o(this, T).removeObserver(this);
2066
2066
  }
2067
2067
  setOptions(e, r) {
2068
- const n = this.options, s = o(this, x);
2069
- if (this.options = o(this, J).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof ie(this.options.enabled, o(this, x)) != "boolean")
2068
+ const n = this.options, s = o(this, T);
2069
+ if (this.options = o(this, Y).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof se(this.options.enabled, o(this, T)) != "boolean")
2070
2070
  throw new Error(
2071
2071
  "Expected enabled to be a boolean or a callback that returns a boolean"
2072
2072
  );
2073
- P(this, _, mr).call(this), o(this, x).setOptions(this.options), n._defaulted && !Mt(this.options, n) && o(this, J).getQueryCache().notify({
2073
+ P(this, _, pr).call(this), o(this, T).setOptions(this.options), n._defaulted && !Mt(this.options, n) && o(this, Y).getQueryCache().notify({
2074
2074
  type: "observerOptionsUpdated",
2075
- query: o(this, x),
2075
+ query: o(this, T),
2076
2076
  observer: this
2077
2077
  });
2078
2078
  const a = this.hasListeners();
2079
- a && ln(
2080
- o(this, x),
2079
+ a && cn(
2080
+ o(this, T),
2081
2081
  s,
2082
2082
  this.options,
2083
2083
  n
2084
- ) && P(this, _, pt).call(this), this.updateResult(r), a && (o(this, x) !== s || ie(this.options.enabled, o(this, x)) !== ie(n.enabled, o(this, x)) || We(this.options.staleTime, o(this, x)) !== We(n.staleTime, o(this, x))) && P(this, _, lr).call(this);
2085
- const u = P(this, _, fr).call(this);
2086
- a && (o(this, x) !== s || ie(this.options.enabled, o(this, x)) !== ie(n.enabled, o(this, x)) || u !== o(this, Pe)) && P(this, _, hr).call(this, u);
2084
+ ) && P(this, _, mt).call(this), this.updateResult(r), a && (o(this, T) !== s || se(this.options.enabled, o(this, T)) !== se(n.enabled, o(this, T)) || He(this.options.staleTime, o(this, T)) !== He(n.staleTime, o(this, T))) && P(this, _, cr).call(this);
2085
+ const u = P(this, _, lr).call(this);
2086
+ a && (o(this, T) !== s || se(this.options.enabled, o(this, T)) !== se(n.enabled, o(this, T)) || u !== o(this, Pe)) && P(this, _, fr).call(this, u);
2087
2087
  }
2088
2088
  getOptimisticResult(e) {
2089
- const r = o(this, J).getQueryCache().build(o(this, J), e), n = this.createResult(r, e);
2090
- return gi(this, n) && (b(this, G, n), b(this, rt, this.options), b(this, Ue, o(this, x).state)), n;
2089
+ const r = o(this, Y).getQueryCache().build(o(this, Y), e), n = this.createResult(r, e);
2090
+ return gi(this, n) && (b(this, B, n), b(this, nt, this.options), b(this, Ue, o(this, T).state)), n;
2091
2091
  }
2092
2092
  getCurrentResult() {
2093
- return o(this, G);
2093
+ return o(this, B);
2094
2094
  }
2095
2095
  trackResult(e, r) {
2096
2096
  const n = {};
@@ -2103,10 +2103,10 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
2103
2103
  }), n;
2104
2104
  }
2105
2105
  trackProp(e) {
2106
- o(this, it).add(e);
2106
+ o(this, ot).add(e);
2107
2107
  }
2108
2108
  getCurrentQuery() {
2109
- return o(this, x);
2109
+ return o(this, T);
2110
2110
  }
2111
2111
  refetch({ ...e } = {}) {
2112
2112
  return this.fetch({
@@ -2114,22 +2114,22 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
2114
2114
  });
2115
2115
  }
2116
2116
  fetchOptimistic(e) {
2117
- const r = o(this, J).defaultQueryOptions(e), n = o(this, J).getQueryCache().build(o(this, J), r);
2117
+ const r = o(this, Y).defaultQueryOptions(e), n = o(this, Y).getQueryCache().build(o(this, Y), r);
2118
2118
  return n.fetch().then(() => this.createResult(n, r));
2119
2119
  }
2120
2120
  fetch(e) {
2121
- return P(this, _, pt).call(this, {
2121
+ return P(this, _, mt).call(this, {
2122
2122
  ...e,
2123
2123
  cancelRefetch: e.cancelRefetch ?? !0
2124
- }).then(() => (this.updateResult(), o(this, G)));
2124
+ }).then(() => (this.updateResult(), o(this, B)));
2125
2125
  }
2126
2126
  createResult(e, r) {
2127
- var I;
2128
- const n = o(this, x), s = this.options, a = o(this, G), u = o(this, Ue), l = o(this, rt), d = e !== n ? e.state : o(this, St), { state: f } = e;
2127
+ var q;
2128
+ const n = o(this, T), s = this.options, a = o(this, B), u = o(this, Ue), l = o(this, nt), d = e !== n ? e.state : o(this, St), { state: f } = e;
2129
2129
  let h = { ...f }, y = !1, m;
2130
2130
  if (r._optimisticResults) {
2131
- const k = this.hasListeners(), re = !k && cn(e, r), oe = k && ln(e, n, r, s);
2132
- (re || oe) && (h = {
2131
+ const k = this.hasListeners(), ye = !k && un(e, r), pe = k && cn(e, n, r, s);
2132
+ (ye || pe) && (h = {
2133
2133
  ...h,
2134
2134
  ...Hn(f.data, e.options)
2135
2135
  }), r._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
@@ -2137,12 +2137,12 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
2137
2137
  let { error: R, errorUpdatedAt: g, status: w } = h;
2138
2138
  if (r.select && h.data !== void 0)
2139
2139
  if (a && h.data === (u == null ? void 0 : u.data) && r.select === o(this, Ct))
2140
- m = o(this, nt);
2140
+ m = o(this, st);
2141
2141
  else
2142
2142
  try {
2143
- b(this, Ct, r.select), m = r.select(h.data), m = ur(a == null ? void 0 : a.data, m, r), b(this, nt, m), b(this, fe, null);
2143
+ b(this, Ct, r.select), m = r.select(h.data), m = ar(a == null ? void 0 : a.data, m, r), b(this, st, m), b(this, ce, null);
2144
2144
  } catch (k) {
2145
- b(this, fe, k);
2145
+ b(this, ce, k);
2146
2146
  }
2147
2147
  else
2148
2148
  m = h.data;
@@ -2151,29 +2151,29 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
2151
2151
  if (a != null && a.isPlaceholderData && r.placeholderData === (l == null ? void 0 : l.placeholderData))
2152
2152
  k = a.data;
2153
2153
  else if (k = typeof r.placeholderData == "function" ? r.placeholderData(
2154
- (I = o(this, st)) == null ? void 0 : I.state.data,
2155
- o(this, st)
2154
+ (q = o(this, it)) == null ? void 0 : q.state.data,
2155
+ o(this, it)
2156
2156
  ) : r.placeholderData, r.select && k !== void 0)
2157
2157
  try {
2158
- k = r.select(k), b(this, fe, null);
2159
- } catch (re) {
2160
- b(this, fe, re);
2158
+ k = r.select(k), b(this, ce, null);
2159
+ } catch (ye) {
2160
+ b(this, ce, ye);
2161
2161
  }
2162
- k !== void 0 && (w = "success", m = ur(
2162
+ k !== void 0 && (w = "success", m = ar(
2163
2163
  a == null ? void 0 : a.data,
2164
2164
  k,
2165
2165
  r
2166
2166
  ), y = !0);
2167
2167
  }
2168
- o(this, fe) && (R = o(this, fe), m = o(this, nt), g = Date.now(), w = "error");
2169
- const C = h.fetchStatus === "fetching", S = w === "pending", j = w === "error", L = S && C, V = m !== void 0, M = {
2168
+ o(this, ce) && (R = o(this, ce), m = o(this, st), g = Date.now(), w = "error");
2169
+ const A = h.fetchStatus === "fetching", S = w === "pending", j = w === "error", Q = S && A, z = m !== void 0, K = {
2170
2170
  status: w,
2171
2171
  fetchStatus: h.fetchStatus,
2172
2172
  isPending: S,
2173
2173
  isSuccess: w === "success",
2174
2174
  isError: j,
2175
- isInitialLoading: L,
2176
- isLoading: L,
2175
+ isInitialLoading: Q,
2176
+ isLoading: Q,
2177
2177
  data: m,
2178
2178
  dataUpdatedAt: h.dataUpdatedAt,
2179
2179
  error: R,
@@ -2183,139 +2183,139 @@ var N, we, Ee, Xe, Ze, Re, et, tt, An, yi = (An = class {
2183
2183
  errorUpdateCount: h.errorUpdateCount,
2184
2184
  isFetched: h.dataUpdateCount > 0 || h.errorUpdateCount > 0,
2185
2185
  isFetchedAfterMount: h.dataUpdateCount > d.dataUpdateCount || h.errorUpdateCount > d.errorUpdateCount,
2186
- isFetching: C,
2187
- isRefetching: C && !S,
2188
- isLoadingError: j && !V,
2186
+ isFetching: A,
2187
+ isRefetching: A && !S,
2188
+ isLoadingError: j && !z,
2189
2189
  isPaused: h.fetchStatus === "paused",
2190
2190
  isPlaceholderData: y,
2191
- isRefetchError: j && V,
2192
- isStale: Tr(e, r),
2191
+ isRefetchError: j && z,
2192
+ isStale: Cr(e, r),
2193
2193
  refetch: this.refetch,
2194
2194
  promise: o(this, Oe)
2195
2195
  };
2196
2196
  if (this.options.experimental_prefetchInRender) {
2197
2197
  const k = (Fe) => {
2198
- M.status === "error" ? Fe.reject(M.error) : M.data !== void 0 && Fe.resolve(M.data);
2199
- }, re = () => {
2200
- const Fe = b(this, Oe, M.promise = cr());
2198
+ K.status === "error" ? Fe.reject(K.error) : K.data !== void 0 && Fe.resolve(K.data);
2199
+ }, ye = () => {
2200
+ const Fe = b(this, Oe, K.promise = ur());
2201
2201
  k(Fe);
2202
- }, oe = o(this, Oe);
2203
- switch (oe.status) {
2202
+ }, pe = o(this, Oe);
2203
+ switch (pe.status) {
2204
2204
  case "pending":
2205
- e.queryHash === n.queryHash && k(oe);
2205
+ e.queryHash === n.queryHash && k(pe);
2206
2206
  break;
2207
2207
  case "fulfilled":
2208
- (M.status === "error" || M.data !== oe.value) && re();
2208
+ (K.status === "error" || K.data !== pe.value) && ye();
2209
2209
  break;
2210
2210
  case "rejected":
2211
- (M.status !== "error" || M.error !== oe.reason) && re();
2211
+ (K.status !== "error" || K.error !== pe.reason) && ye();
2212
2212
  break;
2213
2213
  }
2214
2214
  }
2215
- return M;
2215
+ return K;
2216
2216
  }
2217
2217
  updateResult(e) {
2218
- const r = o(this, G), n = this.createResult(o(this, x), this.options);
2219
- if (b(this, Ue, o(this, x).state), b(this, rt, this.options), o(this, Ue).data !== void 0 && b(this, st, o(this, x)), Mt(n, r))
2218
+ const r = o(this, B), n = this.createResult(o(this, T), this.options);
2219
+ if (b(this, Ue, o(this, T).state), b(this, nt, this.options), o(this, Ue).data !== void 0 && b(this, it, o(this, T)), Mt(n, r))
2220
2220
  return;
2221
- b(this, G, n);
2221
+ b(this, B, n);
2222
2222
  const s = {}, a = () => {
2223
2223
  if (!r)
2224
2224
  return !0;
2225
2225
  const { notifyOnChangeProps: u } = this.options, l = typeof u == "function" ? u() : u;
2226
- if (l === "all" || !l && !o(this, it).size)
2226
+ if (l === "all" || !l && !o(this, ot).size)
2227
2227
  return !0;
2228
2228
  const c = new Set(
2229
- l ?? o(this, it)
2229
+ l ?? o(this, ot)
2230
2230
  );
2231
- return this.options.throwOnError && c.add("error"), Object.keys(o(this, G)).some((d) => {
2231
+ return this.options.throwOnError && c.add("error"), Object.keys(o(this, B)).some((d) => {
2232
2232
  const f = d;
2233
- return o(this, G)[f] !== r[f] && c.has(f);
2233
+ return o(this, B)[f] !== r[f] && c.has(f);
2234
2234
  });
2235
2235
  };
2236
2236
  (e == null ? void 0 : e.listeners) !== !1 && a() && (s.listeners = !0), P(this, _, Gn).call(this, { ...s, ...e });
2237
2237
  }
2238
2238
  onQueryUpdate() {
2239
- this.updateResult(), this.hasListeners() && P(this, _, dr).call(this);
2239
+ this.updateResult(), this.hasListeners() && P(this, _, hr).call(this);
2240
2240
  }
2241
- }, J = new WeakMap(), x = new WeakMap(), St = new WeakMap(), G = new WeakMap(), Ue = new WeakMap(), rt = new WeakMap(), Oe = new WeakMap(), fe = new WeakMap(), Ct = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), Ne = new WeakMap(), Le = new WeakMap(), Pe = new WeakMap(), it = new WeakMap(), _ = new WeakSet(), pt = function(e) {
2242
- P(this, _, mr).call(this);
2243
- let r = o(this, x).fetch(
2241
+ }, Y = new WeakMap(), T = new WeakMap(), St = new WeakMap(), B = new WeakMap(), Ue = new WeakMap(), nt = new WeakMap(), Oe = new WeakMap(), ce = new WeakMap(), Ct = new WeakMap(), st = new WeakMap(), it = new WeakMap(), Ne = new WeakMap(), Le = new WeakMap(), Pe = new WeakMap(), ot = new WeakMap(), _ = new WeakSet(), mt = function(e) {
2242
+ P(this, _, pr).call(this);
2243
+ let r = o(this, T).fetch(
2244
2244
  this.options,
2245
2245
  e
2246
2246
  );
2247
2247
  return e != null && e.throwOnError || (r = r.catch(te)), r;
2248
- }, lr = function() {
2249
- P(this, _, yr).call(this);
2250
- const e = We(
2248
+ }, cr = function() {
2249
+ P(this, _, dr).call(this);
2250
+ const e = He(
2251
2251
  this.options.staleTime,
2252
- o(this, x)
2252
+ o(this, T)
2253
2253
  );
2254
- if (Qe || o(this, G).isStale || !ir(e))
2254
+ if (Qe || o(this, B).isStale || !sr(e))
2255
2255
  return;
2256
- const n = Qn(o(this, G).dataUpdatedAt, e) + 1;
2256
+ const n = Qn(o(this, B).dataUpdatedAt, e) + 1;
2257
2257
  b(this, Ne, setTimeout(() => {
2258
- o(this, G).isStale || this.updateResult();
2258
+ o(this, B).isStale || this.updateResult();
2259
2259
  }, n));
2260
- }, fr = function() {
2261
- return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(o(this, x)) : this.options.refetchInterval) ?? !1;
2262
- }, hr = function(e) {
2263
- P(this, _, pr).call(this), b(this, Pe, e), !(Qe || ie(this.options.enabled, o(this, x)) === !1 || !ir(o(this, Pe)) || o(this, Pe) === 0) && b(this, Le, setInterval(() => {
2264
- (this.options.refetchIntervalInBackground || Cr.isFocused()) && P(this, _, pt).call(this);
2260
+ }, lr = function() {
2261
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(o(this, T)) : this.options.refetchInterval) ?? !1;
2262
+ }, fr = function(e) {
2263
+ P(this, _, yr).call(this), b(this, Pe, e), !(Qe || se(this.options.enabled, o(this, T)) === !1 || !sr(o(this, Pe)) || o(this, Pe) === 0) && b(this, Le, setInterval(() => {
2264
+ (this.options.refetchIntervalInBackground || Sr.isFocused()) && P(this, _, mt).call(this);
2265
2265
  }, o(this, Pe)));
2266
+ }, hr = function() {
2267
+ P(this, _, cr).call(this), P(this, _, fr).call(this, P(this, _, lr).call(this));
2266
2268
  }, dr = function() {
2267
- P(this, _, lr).call(this), P(this, _, hr).call(this, P(this, _, fr).call(this));
2268
- }, yr = function() {
2269
2269
  o(this, Ne) && (clearTimeout(o(this, Ne)), b(this, Ne, void 0));
2270
- }, pr = function() {
2270
+ }, yr = function() {
2271
2271
  o(this, Le) && (clearInterval(o(this, Le)), b(this, Le, void 0));
2272
- }, mr = function() {
2273
- const e = o(this, J).getQueryCache().build(o(this, J), this.options);
2274
- if (e === o(this, x))
2272
+ }, pr = function() {
2273
+ const e = o(this, Y).getQueryCache().build(o(this, Y), this.options);
2274
+ if (e === o(this, T))
2275
2275
  return;
2276
- const r = o(this, x);
2277
- b(this, x, e), b(this, St, e.state), this.hasListeners() && (r == null || r.removeObserver(this), e.addObserver(this));
2276
+ const r = o(this, T);
2277
+ b(this, T, e), b(this, St, e.state), this.hasListeners() && (r == null || r.removeObserver(this), e.addObserver(this));
2278
2278
  }, Gn = function(e) {
2279
- K.batch(() => {
2279
+ L.batch(() => {
2280
2280
  e.listeners && this.listeners.forEach((r) => {
2281
- r(o(this, G));
2282
- }), o(this, J).getQueryCache().notify({
2283
- query: o(this, x),
2281
+ r(o(this, B));
2282
+ }), o(this, Y).getQueryCache().notify({
2283
+ query: o(this, T),
2284
2284
  type: "observerResultsUpdated"
2285
2285
  });
2286
2286
  });
2287
- }, kn);
2287
+ }, Dn);
2288
2288
  function mi(t, e) {
2289
- return ie(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
2289
+ return se(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
2290
2290
  }
2291
- function cn(t, e) {
2292
- return mi(t, e) || t.state.data !== void 0 && gr(t, e, e.refetchOnMount);
2291
+ function un(t, e) {
2292
+ return mi(t, e) || t.state.data !== void 0 && mr(t, e, e.refetchOnMount);
2293
2293
  }
2294
- function gr(t, e, r) {
2295
- if (ie(e.enabled, t) !== !1) {
2294
+ function mr(t, e, r) {
2295
+ if (se(e.enabled, t) !== !1) {
2296
2296
  const n = typeof r == "function" ? r(t) : r;
2297
- return n === "always" || n !== !1 && Tr(t, e);
2297
+ return n === "always" || n !== !1 && Cr(t, e);
2298
2298
  }
2299
2299
  return !1;
2300
2300
  }
2301
- function ln(t, e, r, n) {
2302
- return (t !== e || ie(n.enabled, t) === !1) && (!r.suspense || t.state.status !== "error") && Tr(t, r);
2301
+ function cn(t, e, r, n) {
2302
+ return (t !== e || se(n.enabled, t) === !1) && (!r.suspense || t.state.status !== "error") && Cr(t, r);
2303
2303
  }
2304
- function Tr(t, e) {
2305
- return ie(e.enabled, t) !== !1 && t.isStaleByTime(We(e.staleTime, t));
2304
+ function Cr(t, e) {
2305
+ return se(e.enabled, t) !== !1 && t.isStaleByTime(He(e.staleTime, t));
2306
2306
  }
2307
2307
  function gi(t, e) {
2308
2308
  return !Mt(t.getCurrentResult(), e);
2309
2309
  }
2310
- var Se, Ce, X, ye, pe, jt, br, Dn, bi = (Dn = class extends at {
2310
+ var Se, Ce, J, he, de, jt, gr, _n, bi = (_n = class extends ut {
2311
2311
  constructor(e, r) {
2312
2312
  super();
2313
- E(this, pe);
2313
+ E(this, de);
2314
2314
  E(this, Se);
2315
2315
  E(this, Ce);
2316
- E(this, X);
2317
- E(this, ye);
2318
- b(this, Se, e), this.setOptions(r), this.bindMethods(), P(this, pe, jt).call(this);
2316
+ E(this, J);
2317
+ E(this, he);
2318
+ b(this, Se, e), this.setOptions(r), this.bindMethods(), P(this, de, jt).call(this);
2319
2319
  }
2320
2320
  bindMethods() {
2321
2321
  this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
@@ -2325,31 +2325,31 @@ var Se, Ce, X, ye, pe, jt, br, Dn, bi = (Dn = class extends at {
2325
2325
  const r = this.options;
2326
2326
  this.options = o(this, Se).defaultMutationOptions(e), Mt(this.options, r) || o(this, Se).getMutationCache().notify({
2327
2327
  type: "observerOptionsUpdated",
2328
- mutation: o(this, X),
2328
+ mutation: o(this, J),
2329
2329
  observer: this
2330
- }), r != null && r.mutationKey && this.options.mutationKey && $e(r.mutationKey) !== $e(this.options.mutationKey) ? this.reset() : ((n = o(this, X)) == null ? void 0 : n.state.status) === "pending" && o(this, X).setOptions(this.options);
2330
+ }), r != null && r.mutationKey && this.options.mutationKey && $e(r.mutationKey) !== $e(this.options.mutationKey) ? this.reset() : ((n = o(this, J)) == null ? void 0 : n.state.status) === "pending" && o(this, J).setOptions(this.options);
2331
2331
  }
2332
2332
  onUnsubscribe() {
2333
2333
  var e;
2334
- this.hasListeners() || (e = o(this, X)) == null || e.removeObserver(this);
2334
+ this.hasListeners() || (e = o(this, J)) == null || e.removeObserver(this);
2335
2335
  }
2336
2336
  onMutationUpdate(e) {
2337
- P(this, pe, jt).call(this), P(this, pe, br).call(this, e);
2337
+ P(this, de, jt).call(this), P(this, de, gr).call(this, e);
2338
2338
  }
2339
2339
  getCurrentResult() {
2340
2340
  return o(this, Ce);
2341
2341
  }
2342
2342
  reset() {
2343
2343
  var e;
2344
- (e = o(this, X)) == null || e.removeObserver(this), b(this, X, void 0), P(this, pe, jt).call(this), P(this, pe, br).call(this);
2344
+ (e = o(this, J)) == null || e.removeObserver(this), b(this, J, void 0), P(this, de, jt).call(this), P(this, de, gr).call(this);
2345
2345
  }
2346
2346
  mutate(e, r) {
2347
2347
  var n;
2348
- return b(this, ye, r), (n = o(this, X)) == null || n.removeObserver(this), b(this, X, o(this, Se).getMutationCache().build(o(this, Se), this.options)), o(this, X).addObserver(this), o(this, X).execute(e);
2348
+ return b(this, he, r), (n = o(this, J)) == null || n.removeObserver(this), b(this, J, o(this, Se).getMutationCache().build(o(this, Se), this.options)), o(this, J).addObserver(this), o(this, J).execute(e);
2349
2349
  }
2350
- }, Se = new WeakMap(), Ce = new WeakMap(), X = new WeakMap(), ye = new WeakMap(), pe = new WeakSet(), jt = function() {
2350
+ }, Se = new WeakMap(), Ce = new WeakMap(), J = new WeakMap(), he = new WeakMap(), de = new WeakSet(), jt = function() {
2351
2351
  var r;
2352
- const e = ((r = o(this, X)) == null ? void 0 : r.state) ?? Bn();
2352
+ const e = ((r = o(this, J)) == null ? void 0 : r.state) ?? Bn();
2353
2353
  b(this, Ce, {
2354
2354
  ...e,
2355
2355
  isPending: e.status === "pending",
@@ -2359,12 +2359,12 @@ var Se, Ce, X, ye, pe, jt, br, Dn, bi = (Dn = class extends at {
2359
2359
  mutate: this.mutate,
2360
2360
  reset: this.reset
2361
2361
  });
2362
- }, br = function(e) {
2363
- K.batch(() => {
2362
+ }, gr = function(e) {
2363
+ L.batch(() => {
2364
2364
  var r, n, s, a, u, l, c, d;
2365
- if (o(this, ye) && this.hasListeners()) {
2365
+ if (o(this, he) && this.hasListeners()) {
2366
2366
  const f = o(this, Ce).variables, h = o(this, Ce).context;
2367
- (e == null ? void 0 : e.type) === "success" ? ((n = (r = o(this, ye)).onSuccess) == null || n.call(r, e.data, f, h), (a = (s = o(this, ye)).onSettled) == null || a.call(s, e.data, null, f, h)) : (e == null ? void 0 : e.type) === "error" && ((l = (u = o(this, ye)).onError) == null || l.call(u, e.error, f, h), (d = (c = o(this, ye)).onSettled) == null || d.call(
2367
+ (e == null ? void 0 : e.type) === "success" ? ((n = (r = o(this, he)).onSuccess) == null || n.call(r, e.data, f, h), (a = (s = o(this, he)).onSettled) == null || a.call(s, e.data, null, f, h)) : (e == null ? void 0 : e.type) === "error" && ((l = (u = o(this, he)).onError) == null || l.call(u, e.error, f, h), (d = (c = o(this, he)).onSettled) == null || d.call(
2368
2368
  c,
2369
2369
  void 0,
2370
2370
  e.error,
@@ -2376,19 +2376,19 @@ var Se, Ce, X, ye, pe, jt, br, Dn, bi = (Dn = class extends at {
2376
2376
  f(o(this, Ce));
2377
2377
  });
2378
2378
  });
2379
- }, Dn), Yn = z.createContext(
2379
+ }, _n), Yn = $.createContext(
2380
2380
  void 0
2381
2381
  ), Tt = (t) => {
2382
- const e = z.useContext(Yn);
2382
+ const e = $.useContext(Yn);
2383
2383
  if (!e)
2384
2384
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
2385
2385
  return e;
2386
2386
  }, vi = ({
2387
2387
  client: t,
2388
2388
  children: e
2389
- }) => (z.useEffect(() => (t.mount(), () => {
2389
+ }) => ($.useEffect(() => (t.mount(), () => {
2390
2390
  t.unmount();
2391
- }), [t]), /* @__PURE__ */ gt.jsx(Yn.Provider, { value: t, children: e })), Jn = z.createContext(!1), wi = () => z.useContext(Jn);
2391
+ }), [t]), /* @__PURE__ */ We.jsx(Yn.Provider, { value: t, children: e })), Jn = $.createContext(!1), wi = () => $.useContext(Jn);
2392
2392
  Jn.Provider;
2393
2393
  function Ei() {
2394
2394
  let t = !1;
@@ -2402,16 +2402,16 @@ function Ei() {
2402
2402
  isReset: () => t
2403
2403
  };
2404
2404
  }
2405
- var Ri = z.createContext(Ei()), Oi = () => z.useContext(Ri);
2405
+ var Ri = $.createContext(Ei()), Oi = () => $.useContext(Ri);
2406
2406
  function Xn(t, e) {
2407
2407
  return typeof t == "function" ? t(...e) : !!t;
2408
2408
  }
2409
- function vr() {
2409
+ function br() {
2410
2410
  }
2411
2411
  var Pi = (t, e) => {
2412
2412
  (t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
2413
2413
  }, Si = (t) => {
2414
- z.useEffect(() => {
2414
+ $.useEffect(() => {
2415
2415
  t.clearReset();
2416
2416
  }, [t]);
2417
2417
  }, Ci = ({
@@ -2423,7 +2423,7 @@ var Pi = (t, e) => {
2423
2423
  }) => t.isError && !e.isReset() && !t.isFetching && n && (s && t.data === void 0 || Xn(r, [t.error, n])), Ti = (t) => {
2424
2424
  const e = t.staleTime;
2425
2425
  t.suspense && (t.staleTime = typeof e == "function" ? (...r) => Math.max(e(...r), 1e3) : Math.max(e ?? 1e3, 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
2426
- }, xi = (t, e) => t.isLoading && t.isFetching && !e, Fi = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, fn = (t, e, r) => e.fetchOptimistic(t).catch(() => {
2426
+ }, xi = (t, e) => t.isLoading && t.isFetching && !e, Fi = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, ln = (t, e, r) => e.fetchOptimistic(t).catch(() => {
2427
2427
  r.clearReset();
2428
2428
  });
2429
2429
  function Ai(t, e, r) {
@@ -2439,26 +2439,26 @@ function Ai(t, e, r) {
2439
2439
  ), process.env.NODE_ENV !== "production" && (u.queryFn || console.error(
2440
2440
  `[${u.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
2441
2441
  )), u._optimisticResults = s ? "isRestoring" : "optimistic", Ti(u), Pi(u, a), Si(a);
2442
- const l = !n.getQueryCache().get(u.queryHash), [c] = z.useState(
2442
+ const l = !n.getQueryCache().get(u.queryHash), [c] = $.useState(
2443
2443
  () => new e(
2444
2444
  n,
2445
2445
  u
2446
2446
  )
2447
2447
  ), d = c.getOptimisticResult(u), f = !s && t.subscribed !== !1;
2448
- if (z.useSyncExternalStore(
2449
- z.useCallback(
2448
+ if ($.useSyncExternalStore(
2449
+ $.useCallback(
2450
2450
  (w) => {
2451
- const C = f ? c.subscribe(K.batchCalls(w)) : vr;
2452
- return c.updateResult(), C;
2451
+ const A = f ? c.subscribe(L.batchCalls(w)) : br;
2452
+ return c.updateResult(), A;
2453
2453
  },
2454
2454
  [c, f]
2455
2455
  ),
2456
2456
  () => c.getCurrentResult(),
2457
2457
  () => c.getCurrentResult()
2458
- ), z.useEffect(() => {
2458
+ ), $.useEffect(() => {
2459
2459
  c.setOptions(u, { listeners: !1 });
2460
2460
  }, [u, c]), Fi(u, d))
2461
- throw fn(u, c, a);
2461
+ throw ln(u, c, a);
2462
2462
  if (Ci({
2463
2463
  result: d,
2464
2464
  errorResetBoundary: a,
@@ -2474,12 +2474,12 @@ function Ai(t, e, r) {
2474
2474
  ), u.experimental_prefetchInRender && !Qe && xi(d, s)) {
2475
2475
  const w = l ? (
2476
2476
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
2477
- fn(u, c, a)
2477
+ ln(u, c, a)
2478
2478
  ) : (
2479
2479
  // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
2480
2480
  (g = n.getQueryCache().get(u.queryHash)) == null ? void 0 : g.promise
2481
2481
  );
2482
- w == null || w.catch(vr).finally(() => {
2482
+ w == null || w.catch(br).finally(() => {
2483
2483
  c.updateResult();
2484
2484
  });
2485
2485
  }
@@ -2488,26 +2488,26 @@ function Ai(t, e, r) {
2488
2488
  function Zn(t, e) {
2489
2489
  return Ai(t, pi);
2490
2490
  }
2491
- function xr(t, e) {
2492
- const r = Tt(), [n] = z.useState(
2491
+ function Tr(t, e) {
2492
+ const r = Tt(), [n] = $.useState(
2493
2493
  () => new bi(
2494
2494
  r,
2495
2495
  t
2496
2496
  )
2497
2497
  );
2498
- z.useEffect(() => {
2498
+ $.useEffect(() => {
2499
2499
  n.setOptions(t);
2500
2500
  }, [n, t]);
2501
- const s = z.useSyncExternalStore(
2502
- z.useCallback(
2503
- (u) => n.subscribe(K.batchCalls(u)),
2501
+ const s = $.useSyncExternalStore(
2502
+ $.useCallback(
2503
+ (u) => n.subscribe(L.batchCalls(u)),
2504
2504
  [n]
2505
2505
  ),
2506
2506
  () => n.getCurrentResult(),
2507
2507
  () => n.getCurrentResult()
2508
- ), a = z.useCallback(
2508
+ ), a = $.useCallback(
2509
2509
  (u, l) => {
2510
- n.mutate(u, l).catch(vr);
2510
+ n.mutate(u, l).catch(br);
2511
2511
  },
2512
2512
  [n]
2513
2513
  );
@@ -2515,7 +2515,7 @@ function xr(t, e) {
2515
2515
  throw s.error;
2516
2516
  return { ...s, mutate: a, mutateAsync: s.mutate };
2517
2517
  }
2518
- function ut(t) {
2518
+ function ct(t) {
2519
2519
  const e = {
2520
2520
  subscribe(r) {
2521
2521
  let n = null, s = !1, a = !1, u = !1;
@@ -2544,15 +2544,15 @@ function ut(t) {
2544
2544
  };
2545
2545
  },
2546
2546
  pipe(...r) {
2547
- return r.reduce(ki, e);
2547
+ return r.reduce(Di, e);
2548
2548
  }
2549
2549
  };
2550
2550
  return e;
2551
2551
  }
2552
- function ki(t, e) {
2552
+ function Di(t, e) {
2553
2553
  return e(t);
2554
2554
  }
2555
- function Di(t) {
2555
+ function _i(t) {
2556
2556
  const e = new AbortController();
2557
2557
  return new Promise((n, s) => {
2558
2558
  let a = !1;
@@ -2575,7 +2575,7 @@ function Di(t) {
2575
2575
  });
2576
2576
  });
2577
2577
  }
2578
- function _i(t) {
2578
+ function Ii(t) {
2579
2579
  return (e) => {
2580
2580
  let r = 0, n = null;
2581
2581
  const s = [];
@@ -2604,7 +2604,7 @@ function _i(t) {
2604
2604
  n = null, l.unsubscribe();
2605
2605
  }
2606
2606
  }
2607
- return ut((l) => (r++, s.push(l), a(), {
2607
+ return ct((l) => (r++, s.push(l), a(), {
2608
2608
  unsubscribe() {
2609
2609
  r--, u();
2610
2610
  const c = s.findIndex((d) => d === l);
@@ -2613,8 +2613,8 @@ function _i(t) {
2613
2613
  }));
2614
2614
  };
2615
2615
  }
2616
- function Ii(t) {
2617
- return (e) => ut((r) => e.subscribe({
2616
+ function ki(t) {
2617
+ return (e) => ct((r) => e.subscribe({
2618
2618
  next(n) {
2619
2619
  var s;
2620
2620
  (s = t.next) == null || s.call(t, n), r.next(n);
@@ -2635,7 +2635,7 @@ function ji(t) {
2635
2635
  e !== void 0 && u.next(e), r.push(u);
2636
2636
  }, s = (u) => {
2637
2637
  r.splice(r.indexOf(u), 1);
2638
- }, a = ut((u) => (n(u), () => {
2638
+ }, a = ct((u) => (n(u), () => {
2639
2639
  s(u);
2640
2640
  }));
2641
2641
  return a.next = (u) => {
@@ -2647,7 +2647,7 @@ function ji(t) {
2647
2647
  }, a.get = () => e, a;
2648
2648
  }
2649
2649
  function qi(t) {
2650
- return ut((e) => {
2650
+ return ct((e) => {
2651
2651
  function r(s = 0, a = t.op) {
2652
2652
  const u = t.links[s];
2653
2653
  if (!u)
@@ -2663,7 +2663,7 @@ function qi(t) {
2663
2663
  });
2664
2664
  }
2665
2665
  const es = () => {
2666
- }, hn = (t) => {
2666
+ }, fn = (t) => {
2667
2667
  Object.freeze && Object.freeze(t);
2668
2668
  };
2669
2669
  function ts(t, e, r) {
@@ -2691,7 +2691,7 @@ function ts(t, e, r) {
2691
2691
  } : d === "apply" && (f = {
2692
2692
  args: c.length >= 2 ? c[1] : [],
2693
2693
  path: e.slice(0, -1)
2694
- }), hn(f.args), hn(f.path), t(f);
2694
+ }), fn(f.args), fn(f.path), t(f);
2695
2695
  }
2696
2696
  })), r[a];
2697
2697
  }
@@ -2744,13 +2744,13 @@ function Li(t, e) {
2744
2744
  throw new Xt();
2745
2745
  return r;
2746
2746
  }
2747
- var dn, yn;
2748
- (dn = Symbol).dispose ?? (dn.dispose = Symbol());
2749
- (yn = Symbol).asyncDispose ?? (yn.asyncDispose = Symbol());
2750
- var _n, In, jn, qn, Mn, Un;
2747
+ var hn, dn;
2748
+ (hn = Symbol).dispose ?? (hn.dispose = Symbol());
2749
+ (dn = Symbol).asyncDispose ?? (dn.asyncDispose = Symbol());
2750
+ var In, kn, jn, qn, Mn, Un;
2751
2751
  typeof window > "u" || "Deno" in window || // eslint-disable-next-line @typescript-eslint/dot-notation
2752
- ((In = (_n = globalThis.process) == null ? void 0 : _n.env) == null ? void 0 : In.NODE_ENV) === "test" || (qn = (jn = globalThis.process) == null ? void 0 : jn.env) != null && qn.JEST_WORKER_ID || (Un = (Mn = globalThis.process) == null ? void 0 : Mn.env) != null && Un.VITEST_WORKER_ID;
2753
- function It(t, e, r) {
2752
+ ((kn = (In = globalThis.process) == null ? void 0 : In.env) == null ? void 0 : kn.NODE_ENV) === "test" || (qn = (jn = globalThis.process) == null ? void 0 : jn.env) != null && qn.JEST_WORKER_ID || (Un = (Mn = globalThis.process) == null ? void 0 : Mn.env) != null && Un.VITEST_WORKER_ID;
2753
+ function kt(t, e, r) {
2754
2754
  return e in t ? Object.defineProperty(t, e, {
2755
2755
  value: r,
2756
2756
  enumerable: !0,
@@ -2792,11 +2792,11 @@ class Te extends Error {
2792
2792
  cause: n
2793
2793
  }), // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2794
2794
  // @ts-ignore override doesn't work in all environments due to "This member cannot have an 'override' modifier because it is not declared in the base class 'Error'"
2795
- It(this, "cause", void 0), It(this, "shape", void 0), It(this, "data", void 0), /**
2795
+ kt(this, "cause", void 0), kt(this, "shape", void 0), kt(this, "data", void 0), /**
2796
2796
  * Additional meta data about the error
2797
2797
  * In the case of HTTP-errors, we'll have `response` and potentially `responseJSON` here
2798
2798
  */
2799
- It(this, "meta", void 0), this.meta = r == null ? void 0 : r.meta, this.cause = n, this.shape = (s = r == null ? void 0 : r.result) == null ? void 0 : s.error, this.data = (a = r == null ? void 0 : r.result) == null ? void 0 : a.error.data, this.name = "TRPCClientError", Object.setPrototypeOf(this, Te.prototype);
2799
+ kt(this, "meta", void 0), this.meta = r == null ? void 0 : r.meta, this.cause = n, this.shape = (s = r == null ? void 0 : r.result) == null ? void 0 : s.error, this.data = (a = r == null ? void 0 : r.result) == null ? void 0 : a.error.data, this.name = "TRPCClientError", Object.setPrototypeOf(this, Te.prototype);
2800
2800
  }
2801
2801
  }
2802
2802
  function Zt(t, e, r) {
@@ -2816,12 +2816,12 @@ class Vi {
2816
2816
  context: e.context ?? {},
2817
2817
  id: ++this.requestId
2818
2818
  }
2819
- }).pipe(_i());
2819
+ }).pipe(Ii());
2820
2820
  }
2821
2821
  async requestAsPromise(e) {
2822
2822
  try {
2823
2823
  const r = this.$request(e);
2824
- return (await Di(r)).result.data;
2824
+ return (await _i(r)).result.data;
2825
2825
  } catch (r) {
2826
2826
  throw Te.from(r);
2827
2827
  }
@@ -2908,20 +2908,20 @@ function Gi(t) {
2908
2908
  const e = new Vi(t);
2909
2909
  return Bi(e);
2910
2910
  }
2911
- const pn = (t) => typeof t == "function";
2911
+ const yn = (t) => typeof t == "function";
2912
2912
  function Yi(t) {
2913
2913
  if (t)
2914
2914
  return t;
2915
- if (typeof window < "u" && pn(window.fetch))
2915
+ if (typeof window < "u" && yn(window.fetch))
2916
2916
  return window.fetch;
2917
- if (typeof globalThis < "u" && pn(globalThis.fetch))
2917
+ if (typeof globalThis < "u" && yn(globalThis.fetch))
2918
2918
  return globalThis.fetch;
2919
2919
  throw new Error("No fetch implementation found");
2920
2920
  }
2921
- const mn = () => {
2921
+ const pn = () => {
2922
2922
  throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new");
2923
2923
  };
2924
- function gn(t) {
2924
+ function mn(t) {
2925
2925
  let e = null, r = null;
2926
2926
  const n = () => {
2927
2927
  clearTimeout(r), r = null, e = null;
@@ -2967,13 +2967,13 @@ function gn(t) {
2967
2967
  t.fetch(d.items.map((h) => h.key)).then(async (h) => {
2968
2968
  var y;
2969
2969
  await Promise.all(h.map(async (m, R) => {
2970
- var w, C;
2970
+ var w, A;
2971
2971
  const g = d.items[R];
2972
2972
  try {
2973
2973
  const S = await Promise.resolve(m);
2974
2974
  (w = g.resolve) == null || w.call(g, S);
2975
2975
  } catch (S) {
2976
- (C = g.reject) == null || C.call(g, S);
2976
+ (A = g.reject) == null || A.call(g, S);
2977
2977
  }
2978
2978
  g.batch = null, g.reject = null, g.resolve = null;
2979
2979
  }));
@@ -2991,8 +2991,8 @@ function gn(t) {
2991
2991
  aborted: !1,
2992
2992
  key: l,
2993
2993
  batch: null,
2994
- resolve: mn,
2995
- reject: mn
2994
+ resolve: pn,
2995
+ reject: pn
2996
2996
  }, d = new Promise((f, h) => {
2997
2997
  c.reject = h, c.resolve = f, e || (e = []), e.push(c);
2998
2998
  });
@@ -3149,11 +3149,11 @@ function uo(t) {
3149
3149
  json: g
3150
3150
  }));
3151
3151
  }
3152
- }), s = gn(n("query")), a = gn(n("mutation")), u = {
3152
+ }), s = mn(n("query")), a = mn(n("mutation")), u = {
3153
3153
  query: s,
3154
3154
  mutation: a
3155
3155
  };
3156
- return ({ op: l }) => ut((c) => {
3156
+ return ({ op: l }) => ct((c) => {
3157
3157
  /* istanbul ignore if -- @preserve */
3158
3158
  if (l.type === "subscription")
3159
3159
  throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");
@@ -3282,7 +3282,7 @@ function ho(t = {}) {
3282
3282
  colorMode: r,
3283
3283
  withContext: n
3284
3284
  }) } = t;
3285
- return () => ({ op: a, next: u }) => ut((l) => {
3285
+ return () => ({ op: a, next: u }) => ct((l) => {
3286
3286
  e({
3287
3287
  ...a,
3288
3288
  direction: "up"
@@ -3304,7 +3304,7 @@ function ho(t = {}) {
3304
3304
  result: f
3305
3305
  });
3306
3306
  }
3307
- return u(a).pipe(Ii({
3307
+ return u(a).pipe(ki({
3308
3308
  next(f) {
3309
3309
  d(f);
3310
3310
  },
@@ -3331,7 +3331,7 @@ async function mo(t) {
3331
3331
  const n = `${e.includes("?") ? "&" : "?"}connectionParams=1`;
3332
3332
  return e + n;
3333
3333
  }
3334
- function De(t, e, r) {
3334
+ function _e(t, e, r) {
3335
3335
  return e in t ? Object.defineProperty(t, e, {
3336
3336
  value: r,
3337
3337
  enumerable: !0,
@@ -3413,12 +3413,12 @@ class Lt {
3413
3413
  }
3414
3414
  }
3415
3415
  constructor(e) {
3416
- if (De(this, "id", ++Lt.connectCount), De(this, "WebSocketPonyfill", void 0), De(this, "urlOptions", void 0), De(this, "keepAliveOpts", void 0), De(this, "wsObservable", ji(null)), De(this, "openPromise", null), this.WebSocketPonyfill = e.WebSocketPonyfill ?? WebSocket, !this.WebSocketPonyfill)
3416
+ if (_e(this, "id", ++Lt.connectCount), _e(this, "WebSocketPonyfill", void 0), _e(this, "urlOptions", void 0), _e(this, "keepAliveOpts", void 0), _e(this, "wsObservable", ji(null)), _e(this, "openPromise", null), this.WebSocketPonyfill = e.WebSocketPonyfill ?? WebSocket, !this.WebSocketPonyfill)
3417
3417
  throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");
3418
3418
  this.urlOptions = e.urlOptions, this.keepAliveOpts = e.keepAlive;
3419
3419
  }
3420
3420
  }
3421
- De(Lt, "connectCount", 0);
3421
+ _e(Lt, "connectCount", 0);
3422
3422
  class vo {
3423
3423
  constructor() {
3424
3424
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
@@ -3483,13 +3483,13 @@ function Ro(t, e) {
3483
3483
  return a;
3484
3484
  }
3485
3485
  }
3486
- function ot(t, e) {
3486
+ function at(t, e) {
3487
3487
  Object.entries(t).forEach(([r, n]) => e(n, r));
3488
3488
  }
3489
3489
  function qt(t, e) {
3490
3490
  return t.indexOf(e) !== -1;
3491
3491
  }
3492
- function bn(t, e) {
3492
+ function gn(t, e) {
3493
3493
  for (let r = 0; r < t.length; r++) {
3494
3494
  const n = t[r];
3495
3495
  if (e(n))
@@ -3510,7 +3510,7 @@ class Oo {
3510
3510
  return this.transfomers[e];
3511
3511
  }
3512
3512
  }
3513
- const Po = (t) => Object.prototype.toString.call(t).slice(8, -1), is = (t) => typeof t > "u", So = (t) => t === null, wt = (t) => typeof t != "object" || t === null || t === Object.prototype ? !1 : Object.getPrototypeOf(t) === null ? !0 : Object.getPrototypeOf(t) === Object.prototype, wr = (t) => wt(t) && Object.keys(t).length === 0, xe = (t) => Array.isArray(t), Co = (t) => typeof t == "string", To = (t) => typeof t == "number" && !isNaN(t), xo = (t) => typeof t == "boolean", Fo = (t) => t instanceof RegExp, Et = (t) => t instanceof Map, Rt = (t) => t instanceof Set, os = (t) => Po(t) === "Symbol", Ao = (t) => t instanceof Date && !isNaN(t.valueOf()), ko = (t) => t instanceof Error, vn = (t) => typeof t == "number" && isNaN(t), Do = (t) => xo(t) || So(t) || is(t) || To(t) || Co(t) || os(t), _o = (t) => typeof t == "bigint", Io = (t) => t === 1 / 0 || t === -1 / 0, jo = (t) => ArrayBuffer.isView(t) && !(t instanceof DataView), qo = (t) => t instanceof URL, as = (t) => t.replace(/\./g, "\\."), tr = (t) => t.map(String).map(as).join("."), mt = (t) => {
3513
+ const Po = (t) => Object.prototype.toString.call(t).slice(8, -1), is = (t) => typeof t > "u", So = (t) => t === null, wt = (t) => typeof t != "object" || t === null || t === Object.prototype ? !1 : Object.getPrototypeOf(t) === null ? !0 : Object.getPrototypeOf(t) === Object.prototype, vr = (t) => wt(t) && Object.keys(t).length === 0, xe = (t) => Array.isArray(t), Co = (t) => typeof t == "string", To = (t) => typeof t == "number" && !isNaN(t), xo = (t) => typeof t == "boolean", Fo = (t) => t instanceof RegExp, Et = (t) => t instanceof Map, Rt = (t) => t instanceof Set, os = (t) => Po(t) === "Symbol", Ao = (t) => t instanceof Date && !isNaN(t.valueOf()), Do = (t) => t instanceof Error, bn = (t) => typeof t == "number" && isNaN(t), _o = (t) => xo(t) || So(t) || is(t) || To(t) || Co(t) || os(t), Io = (t) => typeof t == "bigint", ko = (t) => t === 1 / 0 || t === -1 / 0, jo = (t) => ArrayBuffer.isView(t) && !(t instanceof DataView), qo = (t) => t instanceof URL, as = (t) => t.replace(/\./g, "\\."), tr = (t) => t.map(String).map(as).join("."), gt = (t) => {
3514
3514
  const e = [];
3515
3515
  let r = "";
3516
3516
  for (let s = 0; s < t.length; s++) {
@@ -3528,7 +3528,7 @@ const Po = (t) => Object.prototype.toString.call(t).slice(8, -1), is = (t) => ty
3528
3528
  const n = r;
3529
3529
  return e.push(n), e;
3530
3530
  };
3531
- function ae(t, e, r, n) {
3531
+ function ie(t, e, r, n) {
3532
3532
  return {
3533
3533
  isApplicable: t,
3534
3534
  annotation: e,
@@ -3537,11 +3537,11 @@ function ae(t, e, r, n) {
3537
3537
  };
3538
3538
  }
3539
3539
  const us = [
3540
- ae(is, "undefined", () => null, () => {
3540
+ ie(is, "undefined", () => null, () => {
3541
3541
  }),
3542
- ae(_o, "bigint", (t) => t.toString(), (t) => typeof BigInt < "u" ? BigInt(t) : (console.error("Please add a BigInt polyfill."), t)),
3543
- ae(Ao, "Date", (t) => t.toISOString(), (t) => new Date(t)),
3544
- ae(ko, "Error", (t, e) => {
3542
+ ie(Io, "bigint", (t) => t.toString(), (t) => typeof BigInt < "u" ? BigInt(t) : (console.error("Please add a BigInt polyfill."), t)),
3543
+ ie(Ao, "Date", (t) => t.toISOString(), (t) => new Date(t)),
3544
+ ie(Do, "Error", (t, e) => {
3545
3545
  const r = {
3546
3546
  name: t.name,
3547
3547
  message: t.message
@@ -3555,11 +3555,11 @@ const us = [
3555
3555
  r[n] = t[n];
3556
3556
  }), r;
3557
3557
  }),
3558
- ae(Fo, "regexp", (t) => "" + t, (t) => {
3558
+ ie(Fo, "regexp", (t) => "" + t, (t) => {
3559
3559
  const e = t.slice(1, t.lastIndexOf("/")), r = t.slice(t.lastIndexOf("/") + 1);
3560
3560
  return new RegExp(e, r);
3561
3561
  }),
3562
- ae(
3562
+ ie(
3563
3563
  Rt,
3564
3564
  "set",
3565
3565
  // (sets only exist in es6+)
@@ -3567,10 +3567,10 @@ const us = [
3567
3567
  (t) => [...t.values()],
3568
3568
  (t) => new Set(t)
3569
3569
  ),
3570
- ae(Et, "map", (t) => [...t.entries()], (t) => new Map(t)),
3571
- ae((t) => vn(t) || Io(t), "number", (t) => vn(t) ? "NaN" : t > 0 ? "Infinity" : "-Infinity", Number),
3572
- ae((t) => t === 0 && 1 / t === -1 / 0, "number", () => "-0", Number),
3573
- ae(qo, "URL", (t) => t.toString(), (t) => new URL(t))
3570
+ ie(Et, "map", (t) => [...t.entries()], (t) => new Map(t)),
3571
+ ie((t) => bn(t) || ko(t), "number", (t) => bn(t) ? "NaN" : t > 0 ? "Infinity" : "-Infinity", Number),
3572
+ ie((t) => t === 0 && 1 / t === -1 / 0, "number", () => "-0", Number),
3573
+ ie(qo, "URL", (t) => t.toString(), (t) => new URL(t))
3574
3574
  ];
3575
3575
  function Qt(t, e, r, n) {
3576
3576
  return {
@@ -3622,14 +3622,14 @@ const hs = Qt(fs, (t, e) => ["class", e.classRegistry.getIdentifier(t.constructo
3622
3622
  if (!n)
3623
3623
  throw new Error("Trying to deserialize unknown custom value");
3624
3624
  return n.deserialize(t);
3625
- }), Uo = [hs, cs, ds, ls], wn = (t, e) => {
3626
- const r = bn(Uo, (s) => s.isApplicable(t, e));
3625
+ }), Uo = [hs, cs, ds, ls], vn = (t, e) => {
3626
+ const r = gn(Uo, (s) => s.isApplicable(t, e));
3627
3627
  if (r)
3628
3628
  return {
3629
3629
  value: r.transform(t, e),
3630
3630
  type: r.annotation(t, e)
3631
3631
  };
3632
- const n = bn(us, (s) => s.isApplicable(t, e));
3632
+ const n = gn(us, (s) => s.isApplicable(t, e));
3633
3633
  if (n)
3634
3634
  return {
3635
3635
  value: n.transform(t, e),
@@ -3695,7 +3695,7 @@ const Lo = (t, e) => {
3695
3695
  t = t[n];
3696
3696
  }
3697
3697
  return t;
3698
- }, Er = (t, e, r) => {
3698
+ }, wr = (t, e, r) => {
3699
3699
  if (ps(e), e.length === 0)
3700
3700
  return r(t);
3701
3701
  let n = t;
@@ -3744,37 +3744,37 @@ const Lo = (t, e) => {
3744
3744
  }
3745
3745
  return t;
3746
3746
  };
3747
- function Rr(t, e, r = []) {
3747
+ function Er(t, e, r = []) {
3748
3748
  if (!t)
3749
3749
  return;
3750
3750
  if (!xe(t)) {
3751
- ot(t, (a, u) => Rr(a, e, [...r, ...mt(u)]));
3751
+ at(t, (a, u) => Er(a, e, [...r, ...gt(u)]));
3752
3752
  return;
3753
3753
  }
3754
3754
  const [n, s] = t;
3755
- s && ot(s, (a, u) => {
3756
- Rr(a, e, [...r, ...mt(u)]);
3755
+ s && at(s, (a, u) => {
3756
+ Er(a, e, [...r, ...gt(u)]);
3757
3757
  }), e(n, r);
3758
3758
  }
3759
3759
  function Qo(t, e, r) {
3760
- return Rr(e, (n, s) => {
3761
- t = Er(t, s, (a) => No(a, n, r));
3760
+ return Er(e, (n, s) => {
3761
+ t = wr(t, s, (a) => No(a, n, r));
3762
3762
  }), t;
3763
3763
  }
3764
3764
  function $o(t, e) {
3765
3765
  function r(n, s) {
3766
- const a = Lo(t, mt(s));
3767
- n.map(mt).forEach((u) => {
3768
- t = Er(t, u, () => a);
3766
+ const a = Lo(t, gt(s));
3767
+ n.map(gt).forEach((u) => {
3768
+ t = wr(t, u, () => a);
3769
3769
  });
3770
3770
  }
3771
3771
  if (xe(e)) {
3772
3772
  const [n, s] = e;
3773
3773
  n.forEach((a) => {
3774
- t = Er(t, mt(a), () => t);
3775
- }), s && ot(s, r);
3774
+ t = wr(t, gt(a), () => t);
3775
+ }), s && at(s, r);
3776
3776
  } else
3777
- ot(e, r);
3777
+ at(e, r);
3778
3778
  return t;
3779
3779
  }
3780
3780
  const Ko = (t, e) => wt(t) || xe(t) || Et(t) || Rt(t) || fs(t, e);
@@ -3791,10 +3791,10 @@ function zo(t, e) {
3791
3791
  e || (s = s.map((l) => l.map(String)).sort((l, c) => l.length - c.length));
3792
3792
  const [a, ...u] = s;
3793
3793
  a.length === 0 ? n = u.map(tr) : r[tr(a)] = u.map(tr);
3794
- }), n ? wr(r) ? [n] : [n, r] : wr(r) ? void 0 : r;
3794
+ }), n ? vr(r) ? [n] : [n, r] : vr(r) ? void 0 : r;
3795
3795
  }
3796
3796
  const ms = (t, e, r, n, s = [], a = [], u = /* @__PURE__ */ new Map()) => {
3797
- const l = Do(t);
3797
+ const l = _o(t);
3798
3798
  if (!l) {
3799
3799
  Vo(t, s, e);
3800
3800
  const m = u.get(t);
@@ -3804,7 +3804,7 @@ const ms = (t, e, r, n, s = [], a = [], u = /* @__PURE__ */ new Map()) => {
3804
3804
  } : m;
3805
3805
  }
3806
3806
  if (!Ko(t, r)) {
3807
- const m = wn(t, r), R = m ? {
3807
+ const m = vn(t, r), R = m ? {
3808
3808
  transformedValue: m.value,
3809
3809
  annotations: [m.type]
3810
3810
  } : {
@@ -3816,16 +3816,16 @@ const ms = (t, e, r, n, s = [], a = [], u = /* @__PURE__ */ new Map()) => {
3816
3816
  return {
3817
3817
  transformedValue: null
3818
3818
  };
3819
- const c = wn(t, r), d = (c == null ? void 0 : c.value) ?? t, f = xe(d) ? [] : {}, h = {};
3820
- ot(d, (m, R) => {
3819
+ const c = vn(t, r), d = (c == null ? void 0 : c.value) ?? t, f = xe(d) ? [] : {}, h = {};
3820
+ at(d, (m, R) => {
3821
3821
  if (R === "__proto__" || R === "constructor" || R === "prototype")
3822
3822
  throw new Error(`Detected property ${R}. This is a prototype pollution risk, please remove it from your object.`);
3823
3823
  const g = ms(m, e, r, n, [...s, R], [...a, t], u);
3824
- f[R] = g.transformedValue, xe(g.annotations) ? h[R] = g.annotations : wt(g.annotations) && ot(g.annotations, (w, C) => {
3825
- h[as(R) + "." + C] = w;
3824
+ f[R] = g.transformedValue, xe(g.annotations) ? h[R] = g.annotations : wt(g.annotations) && at(g.annotations, (w, A) => {
3825
+ h[as(R) + "." + A] = w;
3826
3826
  });
3827
3827
  });
3828
- const y = wr(h) ? {
3828
+ const y = vr(h) ? {
3829
3829
  transformedValue: f,
3830
3830
  annotations: c ? [c.type] : void 0
3831
3831
  } : {
@@ -3837,7 +3837,7 @@ const ms = (t, e, r, n, s = [], a = [], u = /* @__PURE__ */ new Map()) => {
3837
3837
  function gs(t) {
3838
3838
  return Object.prototype.toString.call(t).slice(8, -1);
3839
3839
  }
3840
- function En(t) {
3840
+ function wn(t) {
3841
3841
  return gs(t) === "Array";
3842
3842
  }
3843
3843
  function Wo(t) {
@@ -3855,20 +3855,20 @@ function Ho(t, e, r, n, s) {
3855
3855
  configurable: !0
3856
3856
  });
3857
3857
  }
3858
- function Or(t, e = {}) {
3859
- if (En(t))
3860
- return t.map((s) => Or(s, e));
3858
+ function Rr(t, e = {}) {
3859
+ if (wn(t))
3860
+ return t.map((s) => Rr(s, e));
3861
3861
  if (!Wo(t))
3862
3862
  return t;
3863
3863
  const r = Object.getOwnPropertyNames(t), n = Object.getOwnPropertySymbols(t);
3864
3864
  return [...r, ...n].reduce((s, a) => {
3865
- if (En(e.props) && !e.props.includes(a))
3865
+ if (wn(e.props) && !e.props.includes(a))
3866
3866
  return s;
3867
- const u = t[a], l = Or(u, e);
3867
+ const u = t[a], l = Rr(u, e);
3868
3868
  return Ho(s, a, l, t, e.nonenumerable), s;
3869
3869
  }, {});
3870
3870
  }
3871
- class F {
3871
+ class x {
3872
3872
  /**
3873
3873
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
3874
3874
  */
@@ -3891,7 +3891,7 @@ class F {
3891
3891
  }
3892
3892
  deserialize(e) {
3893
3893
  const { json: r, meta: n } = e;
3894
- let s = Or(r);
3894
+ let s = Rr(r);
3895
3895
  return n != null && n.values && (s = Qo(s, n.values, this)), n != null && n.referentialEqualities && (s = $o(s, n.referentialEqualities)), s;
3896
3896
  }
3897
3897
  stringify(e) {
@@ -3916,23 +3916,23 @@ class F {
3916
3916
  this.allowedErrorProps.push(...e);
3917
3917
  }
3918
3918
  }
3919
- F.defaultInstance = new F();
3920
- F.serialize = F.defaultInstance.serialize.bind(F.defaultInstance);
3921
- F.deserialize = F.defaultInstance.deserialize.bind(F.defaultInstance);
3922
- F.stringify = F.defaultInstance.stringify.bind(F.defaultInstance);
3923
- F.parse = F.defaultInstance.parse.bind(F.defaultInstance);
3924
- F.registerClass = F.defaultInstance.registerClass.bind(F.defaultInstance);
3925
- F.registerSymbol = F.defaultInstance.registerSymbol.bind(F.defaultInstance);
3926
- F.registerCustom = F.defaultInstance.registerCustom.bind(F.defaultInstance);
3927
- F.allowErrorProps = F.defaultInstance.allowErrorProps.bind(F.defaultInstance);
3928
- F.serialize;
3929
- F.deserialize;
3930
- F.stringify;
3931
- F.parse;
3932
- F.registerClass;
3933
- F.registerCustom;
3934
- F.registerSymbol;
3935
- F.allowErrorProps;
3919
+ x.defaultInstance = new x();
3920
+ x.serialize = x.defaultInstance.serialize.bind(x.defaultInstance);
3921
+ x.deserialize = x.defaultInstance.deserialize.bind(x.defaultInstance);
3922
+ x.stringify = x.defaultInstance.stringify.bind(x.defaultInstance);
3923
+ x.parse = x.defaultInstance.parse.bind(x.defaultInstance);
3924
+ x.registerClass = x.defaultInstance.registerClass.bind(x.defaultInstance);
3925
+ x.registerSymbol = x.defaultInstance.registerSymbol.bind(x.defaultInstance);
3926
+ x.registerCustom = x.defaultInstance.registerCustom.bind(x.defaultInstance);
3927
+ x.allowErrorProps = x.defaultInstance.allowErrorProps.bind(x.defaultInstance);
3928
+ x.serialize;
3929
+ x.deserialize;
3930
+ x.stringify;
3931
+ x.parse;
3932
+ x.registerClass;
3933
+ x.registerCustom;
3934
+ x.registerSymbol;
3935
+ x.allowErrorProps;
3936
3936
  const bs = Ws(null);
3937
3937
  function Bo(t, e) {
3938
3938
  const r = Gi({
@@ -3945,7 +3945,7 @@ function Bo(t, e) {
3945
3945
  headers: () => ({
3946
3946
  Authorization: `Bearer ${e}`
3947
3947
  }),
3948
- transformer: F
3948
+ transformer: x
3949
3949
  })
3950
3950
  ]
3951
3951
  }), n = async (s, a, u = null) => {
@@ -3980,7 +3980,7 @@ function Bo(t, e) {
3980
3980
  metadata: null,
3981
3981
  isArtifact: !1,
3982
3982
  summary: null,
3983
- chunkingStatus: sr.NOT_CHUNKED,
3983
+ chunkingStatus: nr.NOT_CHUNKED,
3984
3984
  isDirectory: !1,
3985
3985
  parentId: u
3986
3986
  })) };
@@ -4053,7 +4053,7 @@ function Bo(t, e) {
4053
4053
  const f = await r.fileRouter.createFile.mutate({
4054
4054
  file: {
4055
4055
  projectId: s,
4056
- mimeType: Pr.DIRECTORY,
4056
+ mimeType: Or.DIRECTORY,
4057
4057
  path: "",
4058
4058
  name: a,
4059
4059
  size: 0,
@@ -4063,7 +4063,7 @@ function Bo(t, e) {
4063
4063
  parentId: null,
4064
4064
  // Always at the root level
4065
4065
  summary: null,
4066
- chunkingStatus: sr.NOT_CHUNKED
4066
+ chunkingStatus: nr.NOT_CHUNKED
4067
4067
  }
4068
4068
  });
4069
4069
  if (l.length === 0)
@@ -4135,10 +4135,10 @@ function Xo({
4135
4135
  }),
4136
4136
  []
4137
4137
  );
4138
- return Zr(() => {
4138
+ return Xr(() => {
4139
4139
  const c = `${e}:${r}`, d = Bo(c, n);
4140
4140
  u(d);
4141
- }, [e, r, n]), Zr(() => {
4141
+ }, [e, r, n]), Xr(() => {
4142
4142
  if (!s) return;
4143
4143
  const c = (f) => {
4144
4144
  s(f.detail);
@@ -4155,15 +4155,15 @@ function Xo({
4155
4155
  c
4156
4156
  ), window.removeEventListener("message", d);
4157
4157
  };
4158
- }, [s]), /* @__PURE__ */ gt.jsx(vi, { client: l, children: /* @__PURE__ */ gt.jsx(bs.Provider, { value: { host: e, port: r, client: a, token: n }, children: t }) });
4158
+ }, [s]), /* @__PURE__ */ We.jsx(vi, { client: l, children: /* @__PURE__ */ We.jsx(bs.Provider, { value: { host: e, port: r, client: a, token: n }, children: t }) });
4159
4159
  }
4160
- function ct() {
4160
+ function lt() {
4161
4161
  const t = Gs(bs);
4162
4162
  if (!t)
4163
4163
  throw new Error("useFolioContext must be used within a FolioProvider");
4164
4164
  return t;
4165
4165
  }
4166
- const { useEffect: rr, useRef: Go, useState: Rn } = z;
4166
+ const { useEffect: En, useRef: Go, useState: Rn } = $;
4167
4167
  function Zo({
4168
4168
  width: t = "100%",
4169
4169
  height: e = "100vh",
@@ -4171,69 +4171,38 @@ function Zo({
4171
4171
  style: n,
4172
4172
  className: s = "",
4173
4173
  iframeProps: a = {},
4174
- debug: u = !1
4174
+ authMethod: u = "postMessage"
4175
4175
  }) {
4176
- const { host: l, port: c, token: d } = ct(), f = Go(null), [h, y] = Rn(), [m, R] = Rn(!1);
4177
- return rr(() => {
4178
- const g = `${l}:${c}`;
4179
- y(g), u && console.log("[FolioEmbed] Setting iframe URL:", g);
4180
- }, [l, c, u]), rr(() => {
4181
- if (!d) return;
4176
+ const { host: l, port: c, token: d } = lt(), f = Go(null), [h, y] = Rn(), [m, R] = Rn(!1);
4177
+ return En(() => {
4178
+ (() => {
4179
+ const w = `${l}:${c}`;
4180
+ u === "url" ? (console.warn(
4181
+ "URL-based authentication is less secure. Consider using postMessage instead."
4182
+ ), y(`${w}?jwt=${encodeURIComponent(d)}`)) : y(w);
4183
+ })();
4184
+ }, [l, c, d, u]), En(() => {
4185
+ if (!f.current || !d || u === "url") return;
4182
4186
  const g = (w) => {
4183
- var C;
4184
- w.data && typeof w.data == "object" && w.data.type === "folio-ready-for-token" && (u && console.log(
4185
- "[FolioEmbed] Received ready-for-token message from iframe"
4186
- ), (C = f.current) != null && C.contentWindow && (u && console.log(
4187
- "[FolioEmbed] Sending token in response to ready message"
4188
- ), f.current.contentWindow.postMessage(
4189
- { type: "folio-jwt", token: d },
4190
- "*"
4191
- ), R(!0)));
4192
- };
4193
- return window.addEventListener("message", g), () => window.removeEventListener("message", g);
4194
- }, [d, u]), rr(() => {
4195
- var S, j, L, V;
4196
- if (!d) {
4197
- u && console.warn("[FolioEmbed] No token available to send");
4198
- return;
4199
- }
4200
- const g = () => {
4201
- var U, M, I, k, re;
4202
- try {
4203
- u && console.log("[FolioEmbed] Sending token to iframe", {
4204
- readyState: (I = (M = (U = f.current) == null ? void 0 : U.contentWindow) == null ? void 0 : M.document) == null ? void 0 : I.readyState,
4205
- tokenLength: d.length
4206
- }), (re = (k = f.current) == null ? void 0 : k.contentWindow) == null || re.postMessage(
4207
- { type: "folio-jwt", token: d },
4208
- "*"
4209
- ), R(!0), u && console.log("[FolioEmbed] Token sent successfully");
4210
- } catch (oe) {
4211
- console.error("[FolioEmbed] Error sending token to iframe:", oe);
4187
+ if (![
4188
+ `${l}:${c}`,
4189
+ l,
4190
+ // Without port for flexibility
4191
+ l.replace("://", "://www.")
4192
+ // With www prefix
4193
+ ].includes(w.origin) && !w.origin.startsWith(l.replace("://", "://www."))) {
4194
+ console.warn(`Ignored message from unexpected origin: ${w.origin}`);
4195
+ return;
4212
4196
  }
4197
+ w.data && w.data.type === "REQUEST_JWT_TOKEN" && f.current && f.current.contentWindow && (f.current.contentWindow.postMessage(
4198
+ { type: "JWT_TOKEN", token: d },
4199
+ w.origin
4200
+ ), R(!0)), w.data && w.data.type === "FOLIO_IFRAME_READY" && R(!0);
4213
4201
  };
4214
- ((L = (j = (S = f.current) == null ? void 0 : S.contentWindow) == null ? void 0 : j.document) == null ? void 0 : L.readyState) === "complete" && (u && console.log(
4215
- "[FolioEmbed] Iframe already loaded, sending token immediately"
4216
- ), g());
4217
- const w = () => {
4218
- u && console.log("[FolioEmbed] Iframe loaded, sending token"), g();
4202
+ return window.addEventListener("message", g), () => {
4203
+ window.removeEventListener("message", g);
4219
4204
  };
4220
- if ((V = f.current) == null || V.addEventListener("load", w), !m && f.current) {
4221
- const U = () => {
4222
- var M, I, k;
4223
- ((k = (I = (M = f.current) == null ? void 0 : M.contentWindow) == null ? void 0 : I.document) == null ? void 0 : k.readyState) === "complete" ? (u && console.log("[FolioEmbed] Sending token on retry check"), g()) : m || setTimeout(U, 100);
4224
- };
4225
- setTimeout(U, 100);
4226
- }
4227
- return [500, 1e3, 2e3, 3e3, 5e3].forEach((U) => {
4228
- m || setTimeout(() => {
4229
- var M;
4230
- !m && ((M = f.current) != null && M.contentWindow) && (u && console.log(`[FolioEmbed] Retry sending token after ${U}ms`), g());
4231
- }, U);
4232
- }), () => {
4233
- var U;
4234
- u && console.log("[FolioEmbed] Cleaning up event listener"), (U = f.current) == null || U.removeEventListener("load", w);
4235
- };
4236
- }, [d, l, c, m, u]), h ? /* @__PURE__ */ gt.jsx(
4205
+ }, [l, c, d, u, f.current]), h ? /* @__PURE__ */ We.jsxs(
4237
4206
  "div",
4238
4207
  {
4239
4208
  className: `folio-embed-container ${s}`,
@@ -4243,29 +4212,50 @@ function Zo({
4243
4212
  overflow: "hidden",
4244
4213
  ...n
4245
4214
  },
4246
- children: /* @__PURE__ */ gt.jsx(
4247
- "iframe",
4248
- {
4249
- ref: f,
4250
- src: h,
4251
- width: "100%",
4252
- height: "100%",
4253
- style: {
4254
- border: "none",
4215
+ children: [
4216
+ /* @__PURE__ */ We.jsx(
4217
+ "iframe",
4218
+ {
4219
+ ref: f,
4220
+ src: h,
4255
4221
  width: "100%",
4256
4222
  height: "100%",
4257
- overflow: "auto"
4258
- },
4259
- allow: r,
4260
- allowFullScreen: !0,
4261
- ...a
4262
- }
4263
- )
4223
+ style: {
4224
+ border: "none",
4225
+ width: "100%",
4226
+ height: "100%",
4227
+ overflow: "auto",
4228
+ opacity: m ? 1 : 0.3,
4229
+ // Visual indication of loading state
4230
+ transition: "opacity 0.3s ease-in-out"
4231
+ },
4232
+ allow: r,
4233
+ allowFullScreen: !0,
4234
+ ...a
4235
+ }
4236
+ ),
4237
+ !m && u !== "url" && /* @__PURE__ */ We.jsx(
4238
+ "div",
4239
+ {
4240
+ style: {
4241
+ position: "absolute",
4242
+ top: "50%",
4243
+ left: "50%",
4244
+ transform: "translate(-50%, -50%)",
4245
+ textAlign: "center",
4246
+ fontFamily: "system-ui, -apple-system, sans-serif",
4247
+ fontSize: "14px",
4248
+ color: "#333"
4249
+ },
4250
+ children: "Loading Folio..."
4251
+ }
4252
+ )
4253
+ ]
4264
4254
  }
4265
4255
  ) : null;
4266
4256
  }
4267
4257
  function ea() {
4268
- const { client: t } = ct(), e = Zn({
4258
+ const { client: t } = lt(), e = Zn({
4269
4259
  queryKey: ["folioProjects"],
4270
4260
  queryFn: async () => {
4271
4261
  if (!t) throw new Error("Folio client not initialized");
@@ -4282,7 +4272,7 @@ function ea() {
4282
4272
  };
4283
4273
  }
4284
4274
  function ta(t) {
4285
- const { client: e } = ct(), r = Zn({
4275
+ const { client: e } = lt(), r = Zn({
4286
4276
  queryKey: ["folioFiles", t],
4287
4277
  queryFn: async () => {
4288
4278
  if (!e) throw new Error("Folio client not initialized");
@@ -4300,7 +4290,7 @@ function ta(t) {
4300
4290
  };
4301
4291
  }
4302
4292
  function ra() {
4303
- const { client: t } = ct(), e = Tt(), r = xr({
4293
+ const { client: t } = lt(), e = Tt(), r = Tr({
4304
4294
  mutationFn: async (n) => {
4305
4295
  if (!t) throw new Error("Folio client not initialized");
4306
4296
  return t.addProjectForUser(n);
@@ -4319,7 +4309,7 @@ function ra() {
4319
4309
  };
4320
4310
  }
4321
4311
  function na(t) {
4322
- const { client: e } = ct(), r = Tt(), n = xr({
4312
+ const { client: e } = lt(), r = Tt(), n = Tr({
4323
4313
  mutationFn: async (s) => {
4324
4314
  if (!e) throw new Error("Folio client not initialized");
4325
4315
  if (!t) throw new Error("Project ID is required");
@@ -4339,7 +4329,7 @@ function na(t) {
4339
4329
  };
4340
4330
  }
4341
4331
  function sa(t) {
4342
- const { client: e } = ct(), r = Tt(), n = xr({
4332
+ const { client: e } = lt(), r = Tt(), n = Tr({
4343
4333
  mutationFn: async (s) => {
4344
4334
  if (!e) throw new Error("Folio client not initialized");
4345
4335
  if (!t) throw new Error("Project ID is required");