@shiftengineering/folio 0.1.34 → 0.1.36
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.
|
@@ -4,10 +4,10 @@ var sn = (t) => {
|
|
|
4
4
|
};
|
|
5
5
|
var Xs = (t, e, r) => e in t ? Js(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
6
6
|
var tr = (t, e, r) => Xs(t, typeof e != "symbol" ? e + "" : e, r), rr = (t, e, r) => e.has(t) || sn("Cannot " + r);
|
|
7
|
-
var a = (t, e, r) => (rr(t, e, "read from private field"), r ? r.call(t) : e.get(t)),
|
|
7
|
+
var a = (t, e, r) => (rr(t, e, "read from private field"), r ? r.call(t) : e.get(t)), O = (t, e, r) => e.has(t) ? sn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), b = (t, e, r, n) => (rr(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r), C = (t, e, r) => (rr(t, e, "access private method"), r);
|
|
8
8
|
var kt = (t, e, r, n) => ({
|
|
9
9
|
set _(s) {
|
|
10
|
-
|
|
10
|
+
b(t, e, s, r);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
13
|
return a(t, e, n);
|
|
@@ -31,11 +31,11 @@ function ni() {
|
|
|
31
31
|
on = 1;
|
|
32
32
|
var t = Vn, 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, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
33
33
|
function u(l, c, h) {
|
|
34
|
-
var
|
|
35
|
-
h !== void 0 && (
|
|
36
|
-
for (
|
|
37
|
-
if (l && l.defaultProps) for (
|
|
38
|
-
return { $$typeof: e, type: l, key:
|
|
34
|
+
var p, f = {}, d = null, m = null;
|
|
35
|
+
h !== void 0 && (d = "" + h), c.key !== void 0 && (d = "" + c.key), c.ref !== void 0 && (m = c.ref);
|
|
36
|
+
for (p in c) n.call(c, p) && !i.hasOwnProperty(p) && (f[p] = c[p]);
|
|
37
|
+
if (l && l.defaultProps) for (p in c = l.defaultProps, c) f[p] === void 0 && (f[p] = c[p]);
|
|
38
|
+
return { $$typeof: e, type: l, key: d, ref: m, props: f, _owner: s.current };
|
|
39
39
|
}
|
|
40
40
|
return pt.Fragment = r, pt.jsx = u, pt.jsxs = u, pt;
|
|
41
41
|
}
|
|
@@ -52,46 +52,46 @@ var mt = {};
|
|
|
52
52
|
var an;
|
|
53
53
|
function si() {
|
|
54
54
|
return an || (an = 1, process.env.NODE_ENV !== "production" && function() {
|
|
55
|
-
var t = Vn, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"),
|
|
56
|
-
function
|
|
55
|
+
var t = Vn, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), v = Symbol.iterator, g = "@@iterator";
|
|
56
|
+
function R(o) {
|
|
57
57
|
if (o === null || typeof o != "object")
|
|
58
58
|
return null;
|
|
59
|
-
var
|
|
60
|
-
return typeof
|
|
59
|
+
var y = v && o[v] || o[g];
|
|
60
|
+
return typeof y == "function" ? y : null;
|
|
61
61
|
}
|
|
62
|
-
var
|
|
63
|
-
function
|
|
62
|
+
var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
63
|
+
function E(o) {
|
|
64
64
|
{
|
|
65
|
-
for (var
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
for (var y = arguments.length, w = new Array(y > 1 ? y - 1 : 0), S = 1; S < y; S++)
|
|
66
|
+
w[S - 1] = arguments[S];
|
|
67
|
+
x("error", o, w);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function x(o, y, w) {
|
|
71
71
|
{
|
|
72
|
-
var
|
|
73
|
-
D !== "" && (
|
|
74
|
-
var k =
|
|
75
|
-
return String(
|
|
72
|
+
var S = P.ReactDebugCurrentFrame, D = S.getStackAddendum();
|
|
73
|
+
D !== "" && (y += "%s", w = w.concat([D]));
|
|
74
|
+
var k = w.map(function(I) {
|
|
75
|
+
return String(I);
|
|
76
76
|
});
|
|
77
|
-
k.unshift("Warning: " +
|
|
77
|
+
k.unshift("Warning: " + y), Function.prototype.apply.call(console[o], console, k);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
var
|
|
81
|
-
|
|
80
|
+
var j = !1, N = !1, Z = !1, z = !1, U = !1, q;
|
|
81
|
+
q = Symbol.for("react.module.reference");
|
|
82
82
|
function ge(o) {
|
|
83
|
-
return !!(typeof o == "string" || typeof o == "function" || o === n || o === i || U || o === s || o === h || o ===
|
|
83
|
+
return !!(typeof o == "string" || typeof o == "function" || o === n || o === i || U || o === s || o === h || o === p || z || o === m || j || N || Z || typeof o == "object" && o !== null && (o.$$typeof === d || o.$$typeof === f || o.$$typeof === u || o.$$typeof === l || o.$$typeof === c || // This needs to include all possible module reference object
|
|
84
84
|
// types supported by any Flight configuration anywhere since
|
|
85
85
|
// we don't know which Flight build this will end up being used
|
|
86
86
|
// with.
|
|
87
|
-
o.$$typeof ===
|
|
87
|
+
o.$$typeof === q || o.getModuleId !== void 0));
|
|
88
88
|
}
|
|
89
|
-
function ve(o,
|
|
90
|
-
var
|
|
91
|
-
if (
|
|
92
|
-
return
|
|
93
|
-
var D =
|
|
94
|
-
return D !== "" ?
|
|
89
|
+
function ve(o, y, w) {
|
|
90
|
+
var S = o.displayName;
|
|
91
|
+
if (S)
|
|
92
|
+
return S;
|
|
93
|
+
var D = y.displayName || y.name || "";
|
|
94
|
+
return D !== "" ? w + "(" + D + ")" : w;
|
|
95
95
|
}
|
|
96
96
|
function De(o) {
|
|
97
97
|
return o.displayName || "Context";
|
|
@@ -99,7 +99,7 @@ function si() {
|
|
|
99
99
|
function be(o) {
|
|
100
100
|
if (o == null)
|
|
101
101
|
return null;
|
|
102
|
-
if (typeof o.tag == "number" &&
|
|
102
|
+
if (typeof o.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
|
|
103
103
|
return o.displayName || o.name || null;
|
|
104
104
|
if (typeof o == "string")
|
|
105
105
|
return o;
|
|
@@ -114,26 +114,26 @@ function si() {
|
|
|
114
114
|
return "StrictMode";
|
|
115
115
|
case h:
|
|
116
116
|
return "Suspense";
|
|
117
|
-
case
|
|
117
|
+
case p:
|
|
118
118
|
return "SuspenseList";
|
|
119
119
|
}
|
|
120
120
|
if (typeof o == "object")
|
|
121
121
|
switch (o.$$typeof) {
|
|
122
122
|
case l:
|
|
123
|
-
var
|
|
124
|
-
return De(
|
|
123
|
+
var y = o;
|
|
124
|
+
return De(y) + ".Consumer";
|
|
125
125
|
case u:
|
|
126
|
-
var
|
|
127
|
-
return De(
|
|
126
|
+
var w = o;
|
|
127
|
+
return De(w._context) + ".Provider";
|
|
128
128
|
case c:
|
|
129
129
|
return ve(o, o.render, "ForwardRef");
|
|
130
|
-
case
|
|
131
|
-
var
|
|
132
|
-
return
|
|
133
|
-
case
|
|
134
|
-
var D = o, k = D._payload,
|
|
130
|
+
case f:
|
|
131
|
+
var S = o.displayName || null;
|
|
132
|
+
return S !== null ? S : be(o.type) || "Memo";
|
|
133
|
+
case d: {
|
|
134
|
+
var D = o, k = D._payload, I = D._init;
|
|
135
135
|
try {
|
|
136
|
-
return be(
|
|
136
|
+
return be(I(k));
|
|
137
137
|
} catch {
|
|
138
138
|
return null;
|
|
139
139
|
}
|
|
@@ -200,18 +200,18 @@ function si() {
|
|
|
200
200
|
})
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
ht < 0 &&
|
|
203
|
+
ht < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
var
|
|
207
|
-
function xt(o,
|
|
206
|
+
var Wt = P.ReactCurrentDispatcher, Bt;
|
|
207
|
+
function xt(o, y, w) {
|
|
208
208
|
{
|
|
209
209
|
if (Bt === void 0)
|
|
210
210
|
try {
|
|
211
211
|
throw Error();
|
|
212
212
|
} catch (D) {
|
|
213
|
-
var
|
|
214
|
-
Bt =
|
|
213
|
+
var S = D.stack.trim().match(/\n( *(at )?)/);
|
|
214
|
+
Bt = S && S[1] || "";
|
|
215
215
|
}
|
|
216
216
|
return `
|
|
217
217
|
` + Bt + o;
|
|
@@ -222,63 +222,63 @@ function si() {
|
|
|
222
222
|
var Cs = typeof WeakMap == "function" ? WeakMap : Map;
|
|
223
223
|
It = new Cs();
|
|
224
224
|
}
|
|
225
|
-
function Kr(o,
|
|
225
|
+
function Kr(o, y) {
|
|
226
226
|
if (!o || Gt)
|
|
227
227
|
return "";
|
|
228
228
|
{
|
|
229
|
-
var
|
|
230
|
-
if (
|
|
231
|
-
return
|
|
229
|
+
var w = It.get(o);
|
|
230
|
+
if (w !== void 0)
|
|
231
|
+
return w;
|
|
232
232
|
}
|
|
233
|
-
var
|
|
233
|
+
var S;
|
|
234
234
|
Gt = !0;
|
|
235
235
|
var D = Error.prepareStackTrace;
|
|
236
236
|
Error.prepareStackTrace = void 0;
|
|
237
237
|
var k;
|
|
238
|
-
k =
|
|
238
|
+
k = Wt.current, Wt.current = null, Rs();
|
|
239
239
|
try {
|
|
240
|
-
if (
|
|
241
|
-
var
|
|
240
|
+
if (y) {
|
|
241
|
+
var I = function() {
|
|
242
242
|
throw Error();
|
|
243
243
|
};
|
|
244
|
-
if (Object.defineProperty(
|
|
244
|
+
if (Object.defineProperty(I.prototype, "props", {
|
|
245
245
|
set: function() {
|
|
246
246
|
throw Error();
|
|
247
247
|
}
|
|
248
248
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
249
249
|
try {
|
|
250
|
-
Reflect.construct(
|
|
250
|
+
Reflect.construct(I, []);
|
|
251
251
|
} catch (Y) {
|
|
252
|
-
|
|
252
|
+
S = Y;
|
|
253
253
|
}
|
|
254
|
-
Reflect.construct(o, [],
|
|
254
|
+
Reflect.construct(o, [], I);
|
|
255
255
|
} else {
|
|
256
256
|
try {
|
|
257
|
-
|
|
257
|
+
I.call();
|
|
258
258
|
} catch (Y) {
|
|
259
|
-
|
|
259
|
+
S = Y;
|
|
260
260
|
}
|
|
261
|
-
o.call(
|
|
261
|
+
o.call(I.prototype);
|
|
262
262
|
}
|
|
263
263
|
} else {
|
|
264
264
|
try {
|
|
265
265
|
throw Error();
|
|
266
266
|
} catch (Y) {
|
|
267
|
-
|
|
267
|
+
S = Y;
|
|
268
268
|
}
|
|
269
269
|
o();
|
|
270
270
|
}
|
|
271
271
|
} catch (Y) {
|
|
272
|
-
if (Y &&
|
|
272
|
+
if (Y && S && typeof Y.stack == "string") {
|
|
273
273
|
for (var T = Y.stack.split(`
|
|
274
|
-
`),
|
|
275
|
-
`), L = T.length - 1, Q =
|
|
274
|
+
`), H = S.stack.split(`
|
|
275
|
+
`), L = T.length - 1, Q = H.length - 1; L >= 1 && Q >= 0 && T[L] !== H[Q]; )
|
|
276
276
|
Q--;
|
|
277
277
|
for (; L >= 1 && Q >= 0; L--, Q--)
|
|
278
|
-
if (T[L] !==
|
|
278
|
+
if (T[L] !== H[Q]) {
|
|
279
279
|
if (L !== 1 || Q !== 1)
|
|
280
280
|
do
|
|
281
|
-
if (L--, Q--, Q < 0 || T[L] !==
|
|
281
|
+
if (L--, Q--, Q < 0 || T[L] !== H[Q]) {
|
|
282
282
|
var ee = `
|
|
283
283
|
` + T[L].replace(" at new ", " at ");
|
|
284
284
|
return o.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", o.displayName)), typeof o == "function" && It.set(o, ee), ee;
|
|
@@ -288,19 +288,19 @@ function si() {
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
} finally {
|
|
291
|
-
Gt = !1,
|
|
291
|
+
Gt = !1, Wt.current = k, Ss(), Error.prepareStackTrace = D;
|
|
292
292
|
}
|
|
293
293
|
var Be = o ? o.displayName || o.name : "", ke = Be ? xt(Be) : "";
|
|
294
294
|
return typeof o == "function" && It.set(o, ke), ke;
|
|
295
295
|
}
|
|
296
|
-
function Ts(o,
|
|
296
|
+
function Ts(o, y, w) {
|
|
297
297
|
return Kr(o, !1);
|
|
298
298
|
}
|
|
299
299
|
function Fs(o) {
|
|
300
|
-
var
|
|
301
|
-
return !!(
|
|
300
|
+
var y = o.prototype;
|
|
301
|
+
return !!(y && y.isReactComponent);
|
|
302
302
|
}
|
|
303
|
-
function Dt(o,
|
|
303
|
+
function Dt(o, y, w) {
|
|
304
304
|
if (o == null)
|
|
305
305
|
return "";
|
|
306
306
|
if (typeof o == "function")
|
|
@@ -310,49 +310,49 @@ function si() {
|
|
|
310
310
|
switch (o) {
|
|
311
311
|
case h:
|
|
312
312
|
return xt("Suspense");
|
|
313
|
-
case
|
|
313
|
+
case p:
|
|
314
314
|
return xt("SuspenseList");
|
|
315
315
|
}
|
|
316
316
|
if (typeof o == "object")
|
|
317
317
|
switch (o.$$typeof) {
|
|
318
318
|
case c:
|
|
319
319
|
return Ts(o.render);
|
|
320
|
-
case
|
|
321
|
-
return Dt(o.type,
|
|
322
|
-
case
|
|
323
|
-
var
|
|
320
|
+
case f:
|
|
321
|
+
return Dt(o.type, y, w);
|
|
322
|
+
case d: {
|
|
323
|
+
var S = o, D = S._payload, k = S._init;
|
|
324
324
|
try {
|
|
325
|
-
return Dt(k(D),
|
|
325
|
+
return Dt(k(D), y, w);
|
|
326
326
|
} catch {
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
return "";
|
|
331
331
|
}
|
|
332
|
-
var yt = Object.prototype.hasOwnProperty, zr = {}, Vr =
|
|
332
|
+
var yt = Object.prototype.hasOwnProperty, zr = {}, Vr = P.ReactDebugCurrentFrame;
|
|
333
333
|
function _t(o) {
|
|
334
334
|
if (o) {
|
|
335
|
-
var
|
|
336
|
-
Vr.setExtraStackFrame(
|
|
335
|
+
var y = o._owner, w = Dt(o.type, o._source, y ? y.type : null);
|
|
336
|
+
Vr.setExtraStackFrame(w);
|
|
337
337
|
} else
|
|
338
338
|
Vr.setExtraStackFrame(null);
|
|
339
339
|
}
|
|
340
|
-
function As(o,
|
|
340
|
+
function As(o, y, w, S, D) {
|
|
341
341
|
{
|
|
342
342
|
var k = Function.call.bind(yt);
|
|
343
|
-
for (var
|
|
344
|
-
if (k(o,
|
|
343
|
+
for (var I in o)
|
|
344
|
+
if (k(o, I)) {
|
|
345
345
|
var T = void 0;
|
|
346
346
|
try {
|
|
347
|
-
if (typeof o[
|
|
348
|
-
var
|
|
349
|
-
throw
|
|
347
|
+
if (typeof o[I] != "function") {
|
|
348
|
+
var H = Error((S || "React class") + ": " + w + " type `" + I + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[I] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
349
|
+
throw H.name = "Invariant Violation", H;
|
|
350
350
|
}
|
|
351
|
-
T = o[
|
|
351
|
+
T = o[I](y, I, S, w, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
352
352
|
} catch (L) {
|
|
353
353
|
T = L;
|
|
354
354
|
}
|
|
355
|
-
T && !(T instanceof Error) && (_t(D),
|
|
355
|
+
T && !(T instanceof Error) && (_t(D), E("%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).", S || "React class", w, I, typeof T), _t(null)), T instanceof Error && !(T.message in zr) && (zr[T.message] = !0, _t(D), E("Failed %s type: %s", w, T.message), _t(null));
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
}
|
|
@@ -362,25 +362,25 @@ function si() {
|
|
|
362
362
|
}
|
|
363
363
|
function Is(o) {
|
|
364
364
|
{
|
|
365
|
-
var
|
|
366
|
-
return
|
|
365
|
+
var y = typeof Symbol == "function" && Symbol.toStringTag, w = y && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
366
|
+
return w;
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
function Ds(o) {
|
|
370
370
|
try {
|
|
371
|
-
return
|
|
371
|
+
return Hr(o), !1;
|
|
372
372
|
} catch {
|
|
373
373
|
return !0;
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function Hr(o) {
|
|
377
377
|
return "" + o;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function Wr(o) {
|
|
380
380
|
if (Ds(o))
|
|
381
|
-
return
|
|
381
|
+
return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Is(o)), Hr(o);
|
|
382
382
|
}
|
|
383
|
-
var Br =
|
|
383
|
+
var Br = P.ReactCurrentOwner, _s = {
|
|
384
384
|
key: !0,
|
|
385
385
|
ref: !0,
|
|
386
386
|
__self: !0,
|
|
@@ -388,54 +388,54 @@ function si() {
|
|
|
388
388
|
}, Gr, Yr;
|
|
389
389
|
function ks(o) {
|
|
390
390
|
if (yt.call(o, "ref")) {
|
|
391
|
-
var
|
|
392
|
-
if (
|
|
391
|
+
var y = Object.getOwnPropertyDescriptor(o, "ref").get;
|
|
392
|
+
if (y && y.isReactWarning)
|
|
393
393
|
return !1;
|
|
394
394
|
}
|
|
395
395
|
return o.ref !== void 0;
|
|
396
396
|
}
|
|
397
397
|
function js(o) {
|
|
398
398
|
if (yt.call(o, "key")) {
|
|
399
|
-
var
|
|
400
|
-
if (
|
|
399
|
+
var y = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
400
|
+
if (y && y.isReactWarning)
|
|
401
401
|
return !1;
|
|
402
402
|
}
|
|
403
403
|
return o.key !== void 0;
|
|
404
404
|
}
|
|
405
|
-
function qs(o,
|
|
405
|
+
function qs(o, y) {
|
|
406
406
|
typeof o.ref == "string" && Br.current;
|
|
407
407
|
}
|
|
408
|
-
function Us(o,
|
|
408
|
+
function Us(o, y) {
|
|
409
409
|
{
|
|
410
|
-
var
|
|
411
|
-
Gr || (Gr = !0,
|
|
410
|
+
var w = function() {
|
|
411
|
+
Gr || (Gr = !0, E("%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)", y));
|
|
412
412
|
};
|
|
413
|
-
|
|
414
|
-
get:
|
|
413
|
+
w.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
414
|
+
get: w,
|
|
415
415
|
configurable: !0
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function Ms(o,
|
|
419
|
+
function Ms(o, y) {
|
|
420
420
|
{
|
|
421
|
-
var
|
|
422
|
-
Yr || (Yr = !0,
|
|
421
|
+
var w = function() {
|
|
422
|
+
Yr || (Yr = !0, E("%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)", y));
|
|
423
423
|
};
|
|
424
|
-
|
|
425
|
-
get:
|
|
424
|
+
w.isReactWarning = !0, Object.defineProperty(o, "ref", {
|
|
425
|
+
get: w,
|
|
426
426
|
configurable: !0
|
|
427
427
|
});
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
var Ns = function(o,
|
|
430
|
+
var Ns = function(o, y, w, S, D, k, I) {
|
|
431
431
|
var T = {
|
|
432
432
|
// This tag allows us to uniquely identify this as a React Element
|
|
433
433
|
$$typeof: e,
|
|
434
434
|
// Built-in properties that belong on the element
|
|
435
435
|
type: o,
|
|
436
|
-
key:
|
|
437
|
-
ref:
|
|
438
|
-
props:
|
|
436
|
+
key: y,
|
|
437
|
+
ref: w,
|
|
438
|
+
props: I,
|
|
439
439
|
// Record the component responsible for creating this element.
|
|
440
440
|
_owner: k
|
|
441
441
|
};
|
|
@@ -448,7 +448,7 @@ function si() {
|
|
|
448
448
|
configurable: !1,
|
|
449
449
|
enumerable: !1,
|
|
450
450
|
writable: !1,
|
|
451
|
-
value:
|
|
451
|
+
value: S
|
|
452
452
|
}), Object.defineProperty(T, "_source", {
|
|
453
453
|
configurable: !1,
|
|
454
454
|
enumerable: !1,
|
|
@@ -456,29 +456,29 @@ function si() {
|
|
|
456
456
|
value: D
|
|
457
457
|
}), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
|
|
458
458
|
};
|
|
459
|
-
function Ls(o,
|
|
459
|
+
function Ls(o, y, w, S, D) {
|
|
460
460
|
{
|
|
461
|
-
var k,
|
|
462
|
-
|
|
463
|
-
for (k in
|
|
464
|
-
yt.call(
|
|
461
|
+
var k, I = {}, T = null, H = null;
|
|
462
|
+
w !== void 0 && (Wr(w), T = "" + w), js(y) && (Wr(y.key), T = "" + y.key), ks(y) && (H = y.ref, qs(y, D));
|
|
463
|
+
for (k in y)
|
|
464
|
+
yt.call(y, k) && !_s.hasOwnProperty(k) && (I[k] = y[k]);
|
|
465
465
|
if (o && o.defaultProps) {
|
|
466
466
|
var L = o.defaultProps;
|
|
467
467
|
for (k in L)
|
|
468
|
-
|
|
468
|
+
I[k] === void 0 && (I[k] = L[k]);
|
|
469
469
|
}
|
|
470
|
-
if (T ||
|
|
470
|
+
if (T || H) {
|
|
471
471
|
var Q = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
|
|
472
|
-
T && Us(
|
|
472
|
+
T && Us(I, Q), H && Ms(I, Q);
|
|
473
473
|
}
|
|
474
|
-
return Ns(o, T,
|
|
474
|
+
return Ns(o, T, H, D, S, Br.current, I);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var Jt =
|
|
478
|
-
function
|
|
477
|
+
var Jt = P.ReactCurrentOwner, Jr = P.ReactDebugCurrentFrame;
|
|
478
|
+
function We(o) {
|
|
479
479
|
if (o) {
|
|
480
|
-
var
|
|
481
|
-
Jr.setExtraStackFrame(
|
|
480
|
+
var y = o._owner, w = Dt(o.type, o._source, y ? y.type : null);
|
|
481
|
+
Jr.setExtraStackFrame(w);
|
|
482
482
|
} else
|
|
483
483
|
Jr.setExtraStackFrame(null);
|
|
484
484
|
}
|
|
@@ -505,120 +505,120 @@ Check the render method of \`` + o + "`.";
|
|
|
505
505
|
var Zr = {};
|
|
506
506
|
function $s(o) {
|
|
507
507
|
{
|
|
508
|
-
var
|
|
509
|
-
if (!
|
|
510
|
-
var
|
|
511
|
-
|
|
508
|
+
var y = Xr();
|
|
509
|
+
if (!y) {
|
|
510
|
+
var w = typeof o == "string" ? o : o.displayName || o.name;
|
|
511
|
+
w && (y = `
|
|
512
512
|
|
|
513
|
-
Check the top-level render call using <` +
|
|
513
|
+
Check the top-level render call using <` + w + ">.");
|
|
514
514
|
}
|
|
515
|
-
return
|
|
515
|
+
return y;
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
function en(o,
|
|
518
|
+
function en(o, y) {
|
|
519
519
|
{
|
|
520
520
|
if (!o._store || o._store.validated || o.key != null)
|
|
521
521
|
return;
|
|
522
522
|
o._store.validated = !0;
|
|
523
|
-
var
|
|
524
|
-
if (Zr[
|
|
523
|
+
var w = $s(y);
|
|
524
|
+
if (Zr[w])
|
|
525
525
|
return;
|
|
526
|
-
Zr[
|
|
527
|
-
var
|
|
528
|
-
o && o._owner && o._owner !== Jt.current && (
|
|
526
|
+
Zr[w] = !0;
|
|
527
|
+
var S = "";
|
|
528
|
+
o && o._owner && o._owner !== Jt.current && (S = " It was passed a child from " + be(o._owner.type) + "."), We(o), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', w, S), We(null);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
function tn(o,
|
|
531
|
+
function tn(o, y) {
|
|
532
532
|
{
|
|
533
533
|
if (typeof o != "object")
|
|
534
534
|
return;
|
|
535
535
|
if (Yt(o))
|
|
536
|
-
for (var
|
|
537
|
-
var
|
|
538
|
-
Zt(
|
|
536
|
+
for (var w = 0; w < o.length; w++) {
|
|
537
|
+
var S = o[w];
|
|
538
|
+
Zt(S) && en(S, y);
|
|
539
539
|
}
|
|
540
540
|
else if (Zt(o))
|
|
541
541
|
o._store && (o._store.validated = !0);
|
|
542
542
|
else if (o) {
|
|
543
|
-
var D =
|
|
543
|
+
var D = R(o);
|
|
544
544
|
if (typeof D == "function" && D !== o.entries)
|
|
545
|
-
for (var k = D.call(o),
|
|
546
|
-
Zt(
|
|
545
|
+
for (var k = D.call(o), I; !(I = k.next()).done; )
|
|
546
|
+
Zt(I.value) && en(I.value, y);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
function Ks(o) {
|
|
551
551
|
{
|
|
552
|
-
var
|
|
553
|
-
if (
|
|
552
|
+
var y = o.type;
|
|
553
|
+
if (y == null || typeof y == "string")
|
|
554
554
|
return;
|
|
555
|
-
var
|
|
556
|
-
if (typeof
|
|
557
|
-
|
|
558
|
-
else if (typeof
|
|
555
|
+
var w;
|
|
556
|
+
if (typeof y == "function")
|
|
557
|
+
w = y.propTypes;
|
|
558
|
+
else if (typeof y == "object" && (y.$$typeof === c || // Note: Memo only checks outer props here.
|
|
559
559
|
// Inner props are checked in the reconciler.
|
|
560
|
-
|
|
561
|
-
|
|
560
|
+
y.$$typeof === f))
|
|
561
|
+
w = y.propTypes;
|
|
562
562
|
else
|
|
563
563
|
return;
|
|
564
|
-
if (
|
|
565
|
-
var
|
|
566
|
-
As(
|
|
567
|
-
} else if (
|
|
564
|
+
if (w) {
|
|
565
|
+
var S = be(y);
|
|
566
|
+
As(w, o.props, "prop", S, o);
|
|
567
|
+
} else if (y.PropTypes !== void 0 && !Xt) {
|
|
568
568
|
Xt = !0;
|
|
569
|
-
var D = be(
|
|
570
|
-
|
|
569
|
+
var D = be(y);
|
|
570
|
+
E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown");
|
|
571
571
|
}
|
|
572
|
-
typeof
|
|
572
|
+
typeof y.getDefaultProps == "function" && !y.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
function zs(o) {
|
|
576
576
|
{
|
|
577
|
-
for (var
|
|
578
|
-
var
|
|
579
|
-
if (
|
|
580
|
-
|
|
577
|
+
for (var y = Object.keys(o.props), w = 0; w < y.length; w++) {
|
|
578
|
+
var S = y[w];
|
|
579
|
+
if (S !== "children" && S !== "key") {
|
|
580
|
+
We(o), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), We(null);
|
|
581
581
|
break;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
o.ref !== null && (
|
|
584
|
+
o.ref !== null && (We(o), E("Invalid attribute `ref` supplied to `React.Fragment`."), We(null));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
587
|
var rn = {};
|
|
588
|
-
function nn(o,
|
|
588
|
+
function nn(o, y, w, S, D, k) {
|
|
589
589
|
{
|
|
590
|
-
var
|
|
591
|
-
if (!
|
|
590
|
+
var I = ge(o);
|
|
591
|
+
if (!I) {
|
|
592
592
|
var T = "";
|
|
593
593
|
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).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.");
|
|
594
|
-
var
|
|
595
|
-
|
|
594
|
+
var H = Qs();
|
|
595
|
+
H ? T += H : T += Xr();
|
|
596
596
|
var L;
|
|
597
|
-
o === null ? L = "null" : Yt(o) ? L = "array" : o !== void 0 && o.$$typeof === e ? (L = "<" + (be(o.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : L = typeof o,
|
|
597
|
+
o === null ? L = "null" : Yt(o) ? L = "array" : o !== void 0 && o.$$typeof === e ? (L = "<" + (be(o.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : L = typeof o, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", L, T);
|
|
598
598
|
}
|
|
599
|
-
var Q = Ls(o,
|
|
599
|
+
var Q = Ls(o, y, w, D, k);
|
|
600
600
|
if (Q == null)
|
|
601
601
|
return Q;
|
|
602
|
-
if (
|
|
603
|
-
var ee =
|
|
602
|
+
if (I) {
|
|
603
|
+
var ee = y.children;
|
|
604
604
|
if (ee !== void 0)
|
|
605
|
-
if (
|
|
605
|
+
if (S)
|
|
606
606
|
if (Yt(ee)) {
|
|
607
607
|
for (var Be = 0; Be < ee.length; Be++)
|
|
608
608
|
tn(ee[Be], o);
|
|
609
609
|
Object.freeze && Object.freeze(ee);
|
|
610
610
|
} else
|
|
611
|
-
|
|
611
|
+
E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
612
612
|
else
|
|
613
613
|
tn(ee, o);
|
|
614
614
|
}
|
|
615
|
-
if (yt.call(
|
|
616
|
-
var ke = be(o), Y = Object.keys(
|
|
615
|
+
if (yt.call(y, "key")) {
|
|
616
|
+
var ke = be(o), Y = Object.keys(y).filter(function(Ys) {
|
|
617
617
|
return Ys !== "key";
|
|
618
618
|
}), er = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
619
619
|
if (!rn[ke + er]) {
|
|
620
620
|
var Gs = Y.length > 0 ? "{" + Y.join(": ..., ") + ": ...}" : "{}";
|
|
621
|
-
|
|
621
|
+
E(`A props object containing a "key" prop is being spread into JSX:
|
|
622
622
|
let props = %s;
|
|
623
623
|
<%s {...props} />
|
|
624
624
|
React keys must be passed directly to JSX without using spread:
|
|
@@ -629,14 +629,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
629
629
|
return o === n ? zs(Q) : Ks(Q), Q;
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
function Vs(o,
|
|
633
|
-
return nn(o,
|
|
632
|
+
function Vs(o, y, w) {
|
|
633
|
+
return nn(o, y, w, !0);
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
return nn(o,
|
|
635
|
+
function Hs(o, y, w) {
|
|
636
|
+
return nn(o, y, w, !1);
|
|
637
637
|
}
|
|
638
|
-
var
|
|
639
|
-
mt.Fragment = n, mt.jsx =
|
|
638
|
+
var Ws = Hs, Bs = Vs;
|
|
639
|
+
mt.Fragment = n, mt.jsx = Ws, mt.jsxs = Bs;
|
|
640
640
|
}()), mt;
|
|
641
641
|
}
|
|
642
642
|
process.env.NODE_ENV === "production" ? ur.exports = ni() : ur.exports = si();
|
|
@@ -647,7 +647,7 @@ const gt = 4e3 * 1024 * 1024, ii = [
|
|
|
647
647
|
".py",
|
|
648
648
|
".ts",
|
|
649
649
|
".tsx"
|
|
650
|
-
],
|
|
650
|
+
], Hn = {
|
|
651
651
|
"application/pdf": {
|
|
652
652
|
extensions: [".pdf"],
|
|
653
653
|
maxSize: gt
|
|
@@ -669,7 +669,7 @@ const gt = 4e3 * 1024 * 1024, ii = [
|
|
|
669
669
|
maxSize: gt
|
|
670
670
|
}
|
|
671
671
|
};
|
|
672
|
-
Object.entries(
|
|
672
|
+
Object.entries(Hn).reduce(
|
|
673
673
|
(t, [e, r]) => ({
|
|
674
674
|
...t,
|
|
675
675
|
[e]: r.extensions
|
|
@@ -702,7 +702,7 @@ function ai(t, e) {
|
|
|
702
702
|
function lr(t) {
|
|
703
703
|
return typeof t == "number" && t >= 0 && t !== 1 / 0;
|
|
704
704
|
}
|
|
705
|
-
function
|
|
705
|
+
function Wn(t, e) {
|
|
706
706
|
return Math.max(t + (e || 0) - Date.now(), 0);
|
|
707
707
|
}
|
|
708
708
|
function Ye(t, e) {
|
|
@@ -767,8 +767,8 @@ function fr(t, e) {
|
|
|
767
767
|
const n = r ? t : Object.keys(t), s = n.length, i = r ? e : Object.keys(e), u = i.length, l = r ? [] : {};
|
|
768
768
|
let c = 0;
|
|
769
769
|
for (let h = 0; h < u; h++) {
|
|
770
|
-
const
|
|
771
|
-
(!r && n.includes(
|
|
770
|
+
const p = r ? h : i[h];
|
|
771
|
+
(!r && n.includes(p) || r) && t[p] === void 0 && e[p] === void 0 ? (l[p] = void 0, c++) : (l[p] = fr(t[p], e[p]), l[p] === t[p] && t[p] !== void 0 && c++);
|
|
772
772
|
}
|
|
773
773
|
return s === u && c === s ? t : l;
|
|
774
774
|
}
|
|
@@ -835,10 +835,10 @@ function Bn(t, e) {
|
|
|
835
835
|
var qe, Ee, Je, An, fi = (An = class extends ft {
|
|
836
836
|
constructor() {
|
|
837
837
|
super();
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
838
|
+
O(this, qe);
|
|
839
|
+
O(this, Ee);
|
|
840
|
+
O(this, Je);
|
|
841
|
+
b(this, Je, (e) => {
|
|
842
842
|
if (!ze && window.addEventListener) {
|
|
843
843
|
const r = () => e();
|
|
844
844
|
return window.addEventListener("visibilitychange", r, !1), () => {
|
|
@@ -852,16 +852,16 @@ var qe, Ee, Je, An, fi = (An = class extends ft {
|
|
|
852
852
|
}
|
|
853
853
|
onUnsubscribe() {
|
|
854
854
|
var e;
|
|
855
|
-
this.hasListeners() || ((e = a(this, Ee)) == null || e.call(this),
|
|
855
|
+
this.hasListeners() || ((e = a(this, Ee)) == null || e.call(this), b(this, Ee, void 0));
|
|
856
856
|
}
|
|
857
857
|
setEventListener(e) {
|
|
858
858
|
var r;
|
|
859
|
-
|
|
859
|
+
b(this, Je, e), (r = a(this, Ee)) == null || r.call(this), b(this, Ee, e((n) => {
|
|
860
860
|
typeof n == "boolean" ? this.setFocused(n) : this.onFocus();
|
|
861
861
|
}));
|
|
862
862
|
}
|
|
863
863
|
setFocused(e) {
|
|
864
|
-
a(this, qe) !== e && (
|
|
864
|
+
a(this, qe) !== e && (b(this, qe, e), this.onFocus());
|
|
865
865
|
}
|
|
866
866
|
onFocus() {
|
|
867
867
|
const e = this.isFocused();
|
|
@@ -876,10 +876,10 @@ var qe, Ee, Je, An, fi = (An = class extends ft {
|
|
|
876
876
|
}, qe = new WeakMap(), Ee = new WeakMap(), Je = new WeakMap(), An), Dr = new fi(), Xe, Pe, Ze, xn, di = (xn = class extends ft {
|
|
877
877
|
constructor() {
|
|
878
878
|
super();
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
879
|
+
O(this, Xe, !0);
|
|
880
|
+
O(this, Pe);
|
|
881
|
+
O(this, Ze);
|
|
882
|
+
b(this, Ze, (e) => {
|
|
883
883
|
if (!ze && window.addEventListener) {
|
|
884
884
|
const r = () => e(!0), n = () => e(!1);
|
|
885
885
|
return window.addEventListener("online", r, !1), window.addEventListener("offline", n, !1), () => {
|
|
@@ -893,14 +893,14 @@ var qe, Ee, Je, An, fi = (An = class extends ft {
|
|
|
893
893
|
}
|
|
894
894
|
onUnsubscribe() {
|
|
895
895
|
var e;
|
|
896
|
-
this.hasListeners() || ((e = a(this, Pe)) == null || e.call(this),
|
|
896
|
+
this.hasListeners() || ((e = a(this, Pe)) == null || e.call(this), b(this, Pe, void 0));
|
|
897
897
|
}
|
|
898
898
|
setEventListener(e) {
|
|
899
899
|
var r;
|
|
900
|
-
|
|
900
|
+
b(this, Ze, e), (r = a(this, Pe)) == null || r.call(this), b(this, Pe, e(this.setOnline.bind(this)));
|
|
901
901
|
}
|
|
902
902
|
setOnline(e) {
|
|
903
|
-
a(this, Xe) !== e && (
|
|
903
|
+
a(this, Xe) !== e && (b(this, Xe, e), this.listeners.forEach((n) => {
|
|
904
904
|
n(e);
|
|
905
905
|
}));
|
|
906
906
|
}
|
|
@@ -946,48 +946,48 @@ function sr(t) {
|
|
|
946
946
|
}
|
|
947
947
|
function Jn(t) {
|
|
948
948
|
let e = !1, r = 0, n = !1, s;
|
|
949
|
-
const i = yr(), u = (
|
|
950
|
-
var
|
|
951
|
-
n || (
|
|
949
|
+
const i = yr(), u = (g) => {
|
|
950
|
+
var R;
|
|
951
|
+
n || (d(new Yn(g)), (R = t.abort) == null || R.call(t));
|
|
952
952
|
}, l = () => {
|
|
953
953
|
e = !0;
|
|
954
954
|
}, c = () => {
|
|
955
955
|
e = !1;
|
|
956
|
-
}, h = () => Dr.isFocused() && (t.networkMode === "always" || Qt.isOnline()) && t.canRun(),
|
|
957
|
-
var
|
|
958
|
-
n || (n = !0, (
|
|
959
|
-
},
|
|
960
|
-
var
|
|
961
|
-
n || (n = !0, (
|
|
962
|
-
},
|
|
963
|
-
var
|
|
964
|
-
s = (
|
|
965
|
-
(n || h()) &&
|
|
966
|
-
}, (
|
|
956
|
+
}, h = () => Dr.isFocused() && (t.networkMode === "always" || Qt.isOnline()) && t.canRun(), p = () => Gn(t.networkMode) && t.canRun(), f = (g) => {
|
|
957
|
+
var R;
|
|
958
|
+
n || (n = !0, (R = t.onSuccess) == null || R.call(t, g), s == null || s(), i.resolve(g));
|
|
959
|
+
}, d = (g) => {
|
|
960
|
+
var R;
|
|
961
|
+
n || (n = !0, (R = t.onError) == null || R.call(t, g), s == null || s(), i.reject(g));
|
|
962
|
+
}, m = () => new Promise((g) => {
|
|
963
|
+
var R;
|
|
964
|
+
s = (P) => {
|
|
965
|
+
(n || h()) && g(P);
|
|
966
|
+
}, (R = t.onPause) == null || R.call(t);
|
|
967
967
|
}).then(() => {
|
|
968
|
-
var
|
|
969
|
-
s = void 0, n || (
|
|
970
|
-
}),
|
|
968
|
+
var g;
|
|
969
|
+
s = void 0, n || (g = t.onContinue) == null || g.call(t);
|
|
970
|
+
}), v = () => {
|
|
971
971
|
if (n)
|
|
972
972
|
return;
|
|
973
|
-
let
|
|
974
|
-
const
|
|
973
|
+
let g;
|
|
974
|
+
const R = r === 0 ? t.initialPromise : void 0;
|
|
975
975
|
try {
|
|
976
|
-
|
|
977
|
-
} catch (
|
|
978
|
-
|
|
976
|
+
g = R ?? t.fn();
|
|
977
|
+
} catch (P) {
|
|
978
|
+
g = Promise.reject(P);
|
|
979
979
|
}
|
|
980
|
-
Promise.resolve(
|
|
980
|
+
Promise.resolve(g).then(f).catch((P) => {
|
|
981
981
|
var Z;
|
|
982
982
|
if (n)
|
|
983
983
|
return;
|
|
984
|
-
const
|
|
984
|
+
const E = t.retry ?? (ze ? 0 : 3), x = t.retryDelay ?? hi, j = typeof x == "function" ? x(r, P) : x, N = E === !0 || typeof E == "number" && r < E || typeof E == "function" && E(r, P);
|
|
985
985
|
if (e || !N) {
|
|
986
|
-
|
|
986
|
+
d(P);
|
|
987
987
|
return;
|
|
988
988
|
}
|
|
989
|
-
r++, (Z = t.onFail) == null || Z.call(t, r,
|
|
990
|
-
e ?
|
|
989
|
+
r++, (Z = t.onFail) == null || Z.call(t, r, P), ui(j).then(() => h() ? void 0 : m()).then(() => {
|
|
990
|
+
e ? d(P) : v();
|
|
991
991
|
});
|
|
992
992
|
});
|
|
993
993
|
};
|
|
@@ -997,8 +997,8 @@ function Jn(t) {
|
|
|
997
997
|
continue: () => (s == null || s(), i),
|
|
998
998
|
cancelRetry: l,
|
|
999
999
|
continueRetry: c,
|
|
1000
|
-
canStart:
|
|
1001
|
-
start: () => (
|
|
1000
|
+
canStart: p,
|
|
1001
|
+
start: () => (p() ? v() : m().then(v), i)
|
|
1002
1002
|
};
|
|
1003
1003
|
}
|
|
1004
1004
|
function yi() {
|
|
@@ -1062,13 +1062,13 @@ function yi() {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
var $ = yi(), Ue, In, Xn = (In = class {
|
|
1064
1064
|
constructor() {
|
|
1065
|
-
|
|
1065
|
+
O(this, Ue);
|
|
1066
1066
|
}
|
|
1067
1067
|
destroy() {
|
|
1068
1068
|
this.clearGcTimeout();
|
|
1069
1069
|
}
|
|
1070
1070
|
scheduleGc() {
|
|
1071
|
-
this.clearGcTimeout(), lr(this.gcTime) &&
|
|
1071
|
+
this.clearGcTimeout(), lr(this.gcTime) && b(this, Ue, setTimeout(() => {
|
|
1072
1072
|
this.optionalRemove();
|
|
1073
1073
|
}, this.gcTime));
|
|
1074
1074
|
}
|
|
@@ -1079,20 +1079,20 @@ var $ = yi(), Ue, In, Xn = (In = class {
|
|
|
1079
1079
|
);
|
|
1080
1080
|
}
|
|
1081
1081
|
clearGcTimeout() {
|
|
1082
|
-
a(this, Ue) && (clearTimeout(a(this, Ue)),
|
|
1082
|
+
a(this, Ue) && (clearTimeout(a(this, Ue)), b(this, Ue, void 0));
|
|
1083
1083
|
}
|
|
1084
1084
|
}, Ue = new WeakMap(), In), et, tt, te, Me, V, Ct, Ne, se, he, Dn, pi = (Dn = class extends Xn {
|
|
1085
1085
|
constructor(e) {
|
|
1086
1086
|
super();
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1087
|
+
O(this, se);
|
|
1088
|
+
O(this, et);
|
|
1089
|
+
O(this, tt);
|
|
1090
|
+
O(this, te);
|
|
1091
|
+
O(this, Me);
|
|
1092
|
+
O(this, V);
|
|
1093
|
+
O(this, Ct);
|
|
1094
|
+
O(this, Ne);
|
|
1095
|
+
b(this, Ne, !1), b(this, Ct, e.defaultOptions), this.setOptions(e.options), this.observers = [], b(this, Me, e.client), b(this, te, a(this, Me).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, b(this, et, mi(this.options)), this.state = e.state ?? a(this, et), this.scheduleGc();
|
|
1096
1096
|
}
|
|
1097
1097
|
get meta() {
|
|
1098
1098
|
return this.options.meta;
|
|
@@ -1144,7 +1144,7 @@ var $ = yi(), Ue, In, Xn = (In = class {
|
|
|
1144
1144
|
) : this.state.data === void 0;
|
|
1145
1145
|
}
|
|
1146
1146
|
isStaleByTime(e = 0) {
|
|
1147
|
-
return this.state.isInvalidated || this.state.data === void 0 || !
|
|
1147
|
+
return this.state.isInvalidated || this.state.data === void 0 || !Wn(this.state.dataUpdatedAt, e);
|
|
1148
1148
|
}
|
|
1149
1149
|
onFocus() {
|
|
1150
1150
|
var r;
|
|
@@ -1169,7 +1169,7 @@ var $ = yi(), Ue, In, Xn = (In = class {
|
|
|
1169
1169
|
this.state.isInvalidated || C(this, se, he).call(this, { type: "invalidate" });
|
|
1170
1170
|
}
|
|
1171
1171
|
fetch(e, r) {
|
|
1172
|
-
var c, h,
|
|
1172
|
+
var c, h, p;
|
|
1173
1173
|
if (this.state.fetchStatus !== "idle") {
|
|
1174
1174
|
if (this.state.data !== void 0 && (r != null && r.cancelRefetch))
|
|
1175
1175
|
this.cancel({ silent: !0 });
|
|
@@ -1177,28 +1177,28 @@ var $ = yi(), Ue, In, Xn = (In = class {
|
|
|
1177
1177
|
return a(this, V).continueRetry(), a(this, V).promise;
|
|
1178
1178
|
}
|
|
1179
1179
|
if (e && this.setOptions(e), !this.options.queryFn) {
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1180
|
+
const f = this.observers.find((d) => d.options.queryFn);
|
|
1181
|
+
f && this.setOptions(f.options);
|
|
1182
1182
|
}
|
|
1183
1183
|
process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
|
|
1184
1184
|
"As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"
|
|
1185
1185
|
));
|
|
1186
|
-
const n = new AbortController(), s = (
|
|
1187
|
-
Object.defineProperty(
|
|
1186
|
+
const n = new AbortController(), s = (f) => {
|
|
1187
|
+
Object.defineProperty(f, "signal", {
|
|
1188
1188
|
enumerable: !0,
|
|
1189
|
-
get: () => (
|
|
1189
|
+
get: () => (b(this, Ne, !0), n.signal)
|
|
1190
1190
|
});
|
|
1191
1191
|
}, i = () => {
|
|
1192
|
-
const
|
|
1192
|
+
const f = Bn(this.options, r), d = {
|
|
1193
1193
|
client: a(this, Me),
|
|
1194
1194
|
queryKey: this.queryKey,
|
|
1195
1195
|
meta: this.meta
|
|
1196
1196
|
};
|
|
1197
|
-
return s(
|
|
1198
|
-
d,
|
|
1197
|
+
return s(d), b(this, Ne, !1), this.options.persister ? this.options.persister(
|
|
1199
1198
|
f,
|
|
1199
|
+
d,
|
|
1200
1200
|
this
|
|
1201
|
-
) : d
|
|
1201
|
+
) : f(d);
|
|
1202
1202
|
}, u = {
|
|
1203
1203
|
fetchOptions: r,
|
|
1204
1204
|
options: this.options,
|
|
@@ -1210,51 +1210,51 @@ var $ = yi(), Ue, In, Xn = (In = class {
|
|
|
1210
1210
|
s(u), (c = this.options.behavior) == null || c.onFetch(
|
|
1211
1211
|
u,
|
|
1212
1212
|
this
|
|
1213
|
-
),
|
|
1214
|
-
const l = (
|
|
1215
|
-
var
|
|
1216
|
-
sr(
|
|
1213
|
+
), b(this, tt, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((h = u.fetchOptions) == null ? void 0 : h.meta)) && C(this, se, he).call(this, { type: "fetch", meta: (p = u.fetchOptions) == null ? void 0 : p.meta });
|
|
1214
|
+
const l = (f) => {
|
|
1215
|
+
var d, m, v, g;
|
|
1216
|
+
sr(f) && f.silent || C(this, se, he).call(this, {
|
|
1217
1217
|
type: "error",
|
|
1218
|
-
error:
|
|
1219
|
-
}), sr(
|
|
1220
|
-
f,
|
|
1218
|
+
error: f
|
|
1219
|
+
}), sr(f) || ((m = (d = a(this, te).config).onError) == null || m.call(
|
|
1221
1220
|
d,
|
|
1221
|
+
f,
|
|
1222
1222
|
this
|
|
1223
|
-
), (
|
|
1224
|
-
|
|
1223
|
+
), (g = (v = a(this, te).config).onSettled) == null || g.call(
|
|
1224
|
+
v,
|
|
1225
1225
|
this.state.data,
|
|
1226
|
-
|
|
1226
|
+
f,
|
|
1227
1227
|
this
|
|
1228
1228
|
)), this.scheduleGc();
|
|
1229
1229
|
};
|
|
1230
|
-
return
|
|
1230
|
+
return b(this, V, Jn({
|
|
1231
1231
|
initialPromise: r == null ? void 0 : r.initialPromise,
|
|
1232
1232
|
fn: u.fetchFn,
|
|
1233
1233
|
abort: n.abort.bind(n),
|
|
1234
|
-
onSuccess: (
|
|
1235
|
-
var
|
|
1236
|
-
if (
|
|
1234
|
+
onSuccess: (f) => {
|
|
1235
|
+
var d, m, v, g;
|
|
1236
|
+
if (f === void 0) {
|
|
1237
1237
|
process.env.NODE_ENV !== "production" && console.error(
|
|
1238
1238
|
`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
|
|
1239
1239
|
), l(new Error(`${this.queryHash} data is undefined`));
|
|
1240
1240
|
return;
|
|
1241
1241
|
}
|
|
1242
1242
|
try {
|
|
1243
|
-
this.setData(
|
|
1244
|
-
} catch (
|
|
1245
|
-
l(
|
|
1243
|
+
this.setData(f);
|
|
1244
|
+
} catch (R) {
|
|
1245
|
+
l(R);
|
|
1246
1246
|
return;
|
|
1247
1247
|
}
|
|
1248
|
-
(
|
|
1249
|
-
|
|
1250
|
-
|
|
1248
|
+
(m = (d = a(this, te).config).onSuccess) == null || m.call(d, f, this), (g = (v = a(this, te).config).onSettled) == null || g.call(
|
|
1249
|
+
v,
|
|
1250
|
+
f,
|
|
1251
1251
|
this.state.error,
|
|
1252
1252
|
this
|
|
1253
1253
|
), this.scheduleGc();
|
|
1254
1254
|
},
|
|
1255
1255
|
onError: l,
|
|
1256
|
-
onFail: (
|
|
1257
|
-
C(this, se, he).call(this, { type: "failed", failureCount:
|
|
1256
|
+
onFail: (f, d) => {
|
|
1257
|
+
C(this, se, he).call(this, { type: "failed", failureCount: f, error: d });
|
|
1258
1258
|
},
|
|
1259
1259
|
onPause: () => {
|
|
1260
1260
|
C(this, se, he).call(this, { type: "pause" });
|
|
@@ -1369,8 +1369,8 @@ function mi(t) {
|
|
|
1369
1369
|
var ue, _n, gi = (_n = class extends ft {
|
|
1370
1370
|
constructor(e = {}) {
|
|
1371
1371
|
super();
|
|
1372
|
-
|
|
1373
|
-
this.config = e,
|
|
1372
|
+
O(this, ue);
|
|
1373
|
+
this.config = e, b(this, ue, /* @__PURE__ */ new Map());
|
|
1374
1374
|
}
|
|
1375
1375
|
build(e, r, n) {
|
|
1376
1376
|
const s = r.queryKey, i = r.queryHash ?? Ir(s, r);
|
|
@@ -1438,14 +1438,14 @@ var ue, _n, gi = (_n = class extends ft {
|
|
|
1438
1438
|
});
|
|
1439
1439
|
});
|
|
1440
1440
|
}
|
|
1441
|
-
}, ue = new WeakMap(), _n), ce,
|
|
1441
|
+
}, ue = new WeakMap(), _n), ce, W, Le, le, we, kn, vi = (kn = class extends Xn {
|
|
1442
1442
|
constructor(e) {
|
|
1443
1443
|
super();
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
this.mutationId = e.mutationId,
|
|
1444
|
+
O(this, le);
|
|
1445
|
+
O(this, ce);
|
|
1446
|
+
O(this, W);
|
|
1447
|
+
O(this, Le);
|
|
1448
|
+
this.mutationId = e.mutationId, b(this, W, e.mutationCache), b(this, ce, []), this.state = e.state || es(), this.setOptions(e.options), this.scheduleGc();
|
|
1449
1449
|
}
|
|
1450
1450
|
setOptions(e) {
|
|
1451
1451
|
this.options = e, this.updateGcTime(this.options.gcTime);
|
|
@@ -1454,21 +1454,21 @@ var ue, _n, gi = (_n = class extends ft {
|
|
|
1454
1454
|
return this.options.meta;
|
|
1455
1455
|
}
|
|
1456
1456
|
addObserver(e) {
|
|
1457
|
-
a(this, ce).includes(e) || (a(this, ce).push(e), this.clearGcTimeout(), a(this,
|
|
1457
|
+
a(this, ce).includes(e) || (a(this, ce).push(e), this.clearGcTimeout(), a(this, W).notify({
|
|
1458
1458
|
type: "observerAdded",
|
|
1459
1459
|
mutation: this,
|
|
1460
1460
|
observer: e
|
|
1461
1461
|
}));
|
|
1462
1462
|
}
|
|
1463
1463
|
removeObserver(e) {
|
|
1464
|
-
|
|
1464
|
+
b(this, ce, a(this, ce).filter((r) => r !== e)), this.scheduleGc(), a(this, W).notify({
|
|
1465
1465
|
type: "observerRemoved",
|
|
1466
1466
|
mutation: this,
|
|
1467
1467
|
observer: e
|
|
1468
1468
|
});
|
|
1469
1469
|
}
|
|
1470
1470
|
optionalRemove() {
|
|
1471
|
-
a(this, ce).length || (this.state.status === "pending" ? this.scheduleGc() : a(this,
|
|
1471
|
+
a(this, ce).length || (this.state.status === "pending" ? this.scheduleGc() : a(this, W).remove(this));
|
|
1472
1472
|
}
|
|
1473
1473
|
continue() {
|
|
1474
1474
|
var e;
|
|
@@ -1476,11 +1476,11 @@ var ue, _n, gi = (_n = class extends ft {
|
|
|
1476
1476
|
this.execute(this.state.variables);
|
|
1477
1477
|
}
|
|
1478
1478
|
async execute(e) {
|
|
1479
|
-
var s, i, u, l, c, h,
|
|
1480
|
-
|
|
1479
|
+
var s, i, u, l, c, h, p, f, d, m, v, g, R, P, E, x, j, N, Z, z;
|
|
1480
|
+
b(this, Le, Jn({
|
|
1481
1481
|
fn: () => this.options.mutationFn ? this.options.mutationFn(e) : Promise.reject(new Error("No mutationFn found")),
|
|
1482
|
-
onFail: (U,
|
|
1483
|
-
C(this, le, we).call(this, { type: "failed", failureCount: U, error:
|
|
1482
|
+
onFail: (U, q) => {
|
|
1483
|
+
C(this, le, we).call(this, { type: "failed", failureCount: U, error: q });
|
|
1484
1484
|
},
|
|
1485
1485
|
onPause: () => {
|
|
1486
1486
|
C(this, le, we).call(this, { type: "pause" });
|
|
@@ -1491,54 +1491,54 @@ var ue, _n, gi = (_n = class extends ft {
|
|
|
1491
1491
|
retry: this.options.retry ?? 0,
|
|
1492
1492
|
retryDelay: this.options.retryDelay,
|
|
1493
1493
|
networkMode: this.options.networkMode,
|
|
1494
|
-
canRun: () => a(this,
|
|
1494
|
+
canRun: () => a(this, W).canRun(this)
|
|
1495
1495
|
}));
|
|
1496
1496
|
const r = this.state.status === "pending", n = !a(this, Le).canStart();
|
|
1497
1497
|
try {
|
|
1498
1498
|
if (!r) {
|
|
1499
|
-
C(this, le, we).call(this, { type: "pending", variables: e, isPaused: n }), await ((i = (s = a(this,
|
|
1499
|
+
C(this, le, we).call(this, { type: "pending", variables: e, isPaused: n }), await ((i = (s = a(this, W).config).onMutate) == null ? void 0 : i.call(
|
|
1500
1500
|
s,
|
|
1501
1501
|
e,
|
|
1502
1502
|
this
|
|
1503
1503
|
));
|
|
1504
|
-
const
|
|
1505
|
-
|
|
1504
|
+
const q = await ((l = (u = this.options).onMutate) == null ? void 0 : l.call(u, e));
|
|
1505
|
+
q !== this.state.context && C(this, le, we).call(this, {
|
|
1506
1506
|
type: "pending",
|
|
1507
|
-
context:
|
|
1507
|
+
context: q,
|
|
1508
1508
|
variables: e,
|
|
1509
1509
|
isPaused: n
|
|
1510
1510
|
});
|
|
1511
1511
|
}
|
|
1512
1512
|
const U = await a(this, Le).start();
|
|
1513
|
-
return await ((h = (c = a(this,
|
|
1513
|
+
return await ((h = (c = a(this, W).config).onSuccess) == null ? void 0 : h.call(
|
|
1514
1514
|
c,
|
|
1515
1515
|
U,
|
|
1516
1516
|
e,
|
|
1517
1517
|
this.state.context,
|
|
1518
1518
|
this
|
|
1519
|
-
)), await ((
|
|
1520
|
-
|
|
1519
|
+
)), await ((f = (p = this.options).onSuccess) == null ? void 0 : f.call(p, U, e, this.state.context)), await ((m = (d = a(this, W).config).onSettled) == null ? void 0 : m.call(
|
|
1520
|
+
d,
|
|
1521
1521
|
U,
|
|
1522
1522
|
null,
|
|
1523
1523
|
this.state.variables,
|
|
1524
1524
|
this.state.context,
|
|
1525
1525
|
this
|
|
1526
|
-
)), await ((
|
|
1526
|
+
)), await ((g = (v = this.options).onSettled) == null ? void 0 : g.call(v, U, null, e, this.state.context)), C(this, le, we).call(this, { type: "success", data: U }), U;
|
|
1527
1527
|
} catch (U) {
|
|
1528
1528
|
try {
|
|
1529
|
-
throw await ((
|
|
1530
|
-
|
|
1529
|
+
throw await ((P = (R = a(this, W).config).onError) == null ? void 0 : P.call(
|
|
1530
|
+
R,
|
|
1531
1531
|
U,
|
|
1532
1532
|
e,
|
|
1533
1533
|
this.state.context,
|
|
1534
1534
|
this
|
|
1535
|
-
)), await ((
|
|
1536
|
-
|
|
1535
|
+
)), await ((x = (E = this.options).onError) == null ? void 0 : x.call(
|
|
1536
|
+
E,
|
|
1537
1537
|
U,
|
|
1538
1538
|
e,
|
|
1539
1539
|
this.state.context
|
|
1540
|
-
)), await ((N = (
|
|
1541
|
-
|
|
1540
|
+
)), await ((N = (j = a(this, W).config).onSettled) == null ? void 0 : N.call(
|
|
1541
|
+
j,
|
|
1542
1542
|
void 0,
|
|
1543
1543
|
U,
|
|
1544
1544
|
this.state.variables,
|
|
@@ -1555,10 +1555,10 @@ var ue, _n, gi = (_n = class extends ft {
|
|
|
1555
1555
|
C(this, le, we).call(this, { type: "error", error: U });
|
|
1556
1556
|
}
|
|
1557
1557
|
} finally {
|
|
1558
|
-
a(this,
|
|
1558
|
+
a(this, W).runNext(this);
|
|
1559
1559
|
}
|
|
1560
1560
|
}
|
|
1561
|
-
}, ce = new WeakMap(),
|
|
1561
|
+
}, ce = new WeakMap(), W = new WeakMap(), Le = new WeakMap(), le = new WeakSet(), we = function(e) {
|
|
1562
1562
|
const r = (n) => {
|
|
1563
1563
|
switch (e.type) {
|
|
1564
1564
|
case "failed":
|
|
@@ -1615,7 +1615,7 @@ var ue, _n, gi = (_n = class extends ft {
|
|
|
1615
1615
|
this.state = r(this.state), $.batch(() => {
|
|
1616
1616
|
a(this, ce).forEach((n) => {
|
|
1617
1617
|
n.onMutationUpdate(e);
|
|
1618
|
-
}), a(this,
|
|
1618
|
+
}), a(this, W).notify({
|
|
1619
1619
|
mutation: this,
|
|
1620
1620
|
type: "updated",
|
|
1621
1621
|
action: e
|
|
@@ -1638,10 +1638,10 @@ function es() {
|
|
|
1638
1638
|
var ye, ie, Tt, jn, bi = (jn = class extends ft {
|
|
1639
1639
|
constructor(e = {}) {
|
|
1640
1640
|
super();
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
this.config = e,
|
|
1641
|
+
O(this, ye);
|
|
1642
|
+
O(this, ie);
|
|
1643
|
+
O(this, Tt);
|
|
1644
|
+
this.config = e, b(this, ye, /* @__PURE__ */ new Set()), b(this, ie, /* @__PURE__ */ new Map()), b(this, Tt, 0);
|
|
1645
1645
|
}
|
|
1646
1646
|
build(e, r, n) {
|
|
1647
1647
|
const s = new vi({
|
|
@@ -1736,60 +1736,60 @@ function jt(t) {
|
|
|
1736
1736
|
function dn(t) {
|
|
1737
1737
|
return {
|
|
1738
1738
|
onFetch: (e, r) => {
|
|
1739
|
-
var
|
|
1740
|
-
const n = e.options, s = (
|
|
1739
|
+
var p, f, d, m, v;
|
|
1740
|
+
const n = e.options, s = (d = (f = (p = e.fetchOptions) == null ? void 0 : p.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : d.direction, i = ((m = e.state.data) == null ? void 0 : m.pages) || [], u = ((v = e.state.data) == null ? void 0 : v.pageParams) || [];
|
|
1741
1741
|
let l = { pages: [], pageParams: [] }, c = 0;
|
|
1742
1742
|
const h = async () => {
|
|
1743
|
-
let
|
|
1744
|
-
const
|
|
1745
|
-
Object.defineProperty(
|
|
1743
|
+
let g = !1;
|
|
1744
|
+
const R = (x) => {
|
|
1745
|
+
Object.defineProperty(x, "signal", {
|
|
1746
1746
|
enumerable: !0,
|
|
1747
|
-
get: () => (e.signal.aborted ?
|
|
1748
|
-
|
|
1747
|
+
get: () => (e.signal.aborted ? g = !0 : e.signal.addEventListener("abort", () => {
|
|
1748
|
+
g = !0;
|
|
1749
1749
|
}), e.signal)
|
|
1750
1750
|
});
|
|
1751
|
-
},
|
|
1752
|
-
if (
|
|
1751
|
+
}, P = Bn(e.options, e.fetchOptions), E = async (x, j, N) => {
|
|
1752
|
+
if (g)
|
|
1753
1753
|
return Promise.reject();
|
|
1754
|
-
if (
|
|
1755
|
-
return Promise.resolve(
|
|
1754
|
+
if (j == null && x.pages.length)
|
|
1755
|
+
return Promise.resolve(x);
|
|
1756
1756
|
const Z = {
|
|
1757
1757
|
client: e.client,
|
|
1758
1758
|
queryKey: e.queryKey,
|
|
1759
|
-
pageParam:
|
|
1759
|
+
pageParam: j,
|
|
1760
1760
|
direction: N ? "backward" : "forward",
|
|
1761
1761
|
meta: e.options.meta
|
|
1762
1762
|
};
|
|
1763
|
-
|
|
1764
|
-
const z = await
|
|
1763
|
+
R(Z);
|
|
1764
|
+
const z = await P(
|
|
1765
1765
|
Z
|
|
1766
|
-
), { maxPages: U } = e.options,
|
|
1766
|
+
), { maxPages: U } = e.options, q = N ? li : ci;
|
|
1767
1767
|
return {
|
|
1768
|
-
pages:
|
|
1769
|
-
pageParams:
|
|
1768
|
+
pages: q(x.pages, z, U),
|
|
1769
|
+
pageParams: q(x.pageParams, j, U)
|
|
1770
1770
|
};
|
|
1771
1771
|
};
|
|
1772
1772
|
if (s && i.length) {
|
|
1773
|
-
const
|
|
1773
|
+
const x = s === "backward", j = x ? wi : hn, N = {
|
|
1774
1774
|
pages: i,
|
|
1775
1775
|
pageParams: u
|
|
1776
|
-
}, Z =
|
|
1777
|
-
l = await
|
|
1776
|
+
}, Z = j(n, N);
|
|
1777
|
+
l = await E(N, Z, x);
|
|
1778
1778
|
} else {
|
|
1779
|
-
const
|
|
1779
|
+
const x = t ?? i.length;
|
|
1780
1780
|
do {
|
|
1781
|
-
const
|
|
1782
|
-
if (c > 0 &&
|
|
1781
|
+
const j = c === 0 ? u[0] ?? n.initialPageParam : hn(n, l);
|
|
1782
|
+
if (c > 0 && j == null)
|
|
1783
1783
|
break;
|
|
1784
|
-
l = await
|
|
1785
|
-
} while (c <
|
|
1784
|
+
l = await E(l, j), c++;
|
|
1785
|
+
} while (c < x);
|
|
1786
1786
|
}
|
|
1787
1787
|
return l;
|
|
1788
1788
|
};
|
|
1789
1789
|
e.options.persister ? e.fetchFn = () => {
|
|
1790
|
-
var
|
|
1791
|
-
return (
|
|
1792
|
-
|
|
1790
|
+
var g, R;
|
|
1791
|
+
return (R = (g = e.options).persister) == null ? void 0 : R.call(
|
|
1792
|
+
g,
|
|
1793
1793
|
h,
|
|
1794
1794
|
{
|
|
1795
1795
|
client: e.client,
|
|
@@ -1818,26 +1818,26 @@ function wi(t, { pages: e, pageParams: r }) {
|
|
|
1818
1818
|
}
|
|
1819
1819
|
var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
|
|
1820
1820
|
constructor(t = {}) {
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1821
|
+
O(this, M);
|
|
1822
|
+
O(this, Oe);
|
|
1823
|
+
O(this, Re);
|
|
1824
|
+
O(this, rt);
|
|
1825
|
+
O(this, nt);
|
|
1826
|
+
O(this, Se);
|
|
1827
|
+
O(this, st);
|
|
1828
|
+
O(this, it);
|
|
1829
|
+
b(this, M, t.queryCache || new gi()), b(this, Oe, t.mutationCache || new bi()), b(this, Re, t.defaultOptions || {}), b(this, rt, /* @__PURE__ */ new Map()), b(this, nt, /* @__PURE__ */ new Map()), b(this, Se, 0);
|
|
1830
1830
|
}
|
|
1831
1831
|
mount() {
|
|
1832
|
-
kt(this, Se)._++, a(this, Se) === 1 && (
|
|
1832
|
+
kt(this, Se)._++, a(this, Se) === 1 && (b(this, st, Dr.subscribe(async (t) => {
|
|
1833
1833
|
t && (await this.resumePausedMutations(), a(this, M).onFocus());
|
|
1834
|
-
})),
|
|
1834
|
+
})), b(this, it, Qt.subscribe(async (t) => {
|
|
1835
1835
|
t && (await this.resumePausedMutations(), a(this, M).onOnline());
|
|
1836
1836
|
})));
|
|
1837
1837
|
}
|
|
1838
1838
|
unmount() {
|
|
1839
1839
|
var t, e;
|
|
1840
|
-
kt(this, Se)._--, a(this, Se) === 0 && ((t = a(this, st)) == null || t.call(this),
|
|
1840
|
+
kt(this, Se)._--, a(this, Se) === 0 && ((t = a(this, st)) == null || t.call(this), b(this, st, void 0), (e = a(this, it)) == null || e.call(this), b(this, it, void 0));
|
|
1841
1841
|
}
|
|
1842
1842
|
isFetching(t) {
|
|
1843
1843
|
return a(this, M).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
@@ -1964,7 +1964,7 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
|
|
|
1964
1964
|
return a(this, Re);
|
|
1965
1965
|
}
|
|
1966
1966
|
setDefaultOptions(t) {
|
|
1967
|
-
|
|
1967
|
+
b(this, Re, t);
|
|
1968
1968
|
}
|
|
1969
1969
|
setQueryDefaults(t, e) {
|
|
1970
1970
|
a(this, rt).set(Ve(t), {
|
|
@@ -2018,25 +2018,25 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
|
|
|
2018
2018
|
}, M = new WeakMap(), Oe = new WeakMap(), Re = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), Se = new WeakMap(), st = new WeakMap(), it = new WeakMap(), qn), J, F, Ft, B, Qe, ot, Ce, fe, At, at, ut, $e, Ke, Te, ct, _, vt, pr, mr, gr, vr, br, wr, Er, ts, Un, Pi = (Un = class extends ft {
|
|
2019
2019
|
constructor(e, r) {
|
|
2020
2020
|
super();
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2021
|
+
O(this, _);
|
|
2022
|
+
O(this, J);
|
|
2023
|
+
O(this, F);
|
|
2024
|
+
O(this, Ft);
|
|
2025
|
+
O(this, B);
|
|
2026
|
+
O(this, Qe);
|
|
2027
|
+
O(this, ot);
|
|
2028
|
+
O(this, Ce);
|
|
2029
|
+
O(this, fe);
|
|
2030
|
+
O(this, At);
|
|
2031
|
+
O(this, at);
|
|
2032
2032
|
// This property keeps track of the last query with defined data.
|
|
2033
2033
|
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
this.options = r,
|
|
2034
|
+
O(this, ut);
|
|
2035
|
+
O(this, $e);
|
|
2036
|
+
O(this, Ke);
|
|
2037
|
+
O(this, Te);
|
|
2038
|
+
O(this, ct, /* @__PURE__ */ new Set());
|
|
2039
|
+
this.options = r, b(this, J, e), b(this, fe, null), b(this, Ce, yr()), this.options.experimental_prefetchInRender || a(this, Ce).reject(
|
|
2040
2040
|
new Error("experimental_prefetchInRender feature flag is not enabled")
|
|
2041
2041
|
), this.bindMethods(), this.setOptions(r);
|
|
2042
2042
|
}
|
|
@@ -2089,7 +2089,7 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
|
|
|
2089
2089
|
}
|
|
2090
2090
|
getOptimisticResult(e) {
|
|
2091
2091
|
const r = a(this, J).getQueryCache().build(a(this, J), e), n = this.createResult(r, e);
|
|
2092
|
-
return Ri(this, n) && (
|
|
2092
|
+
return Ri(this, n) && (b(this, B, n), b(this, ot, this.options), b(this, Qe, a(this, F).state)), n;
|
|
2093
2093
|
}
|
|
2094
2094
|
getCurrentResult() {
|
|
2095
2095
|
return a(this, B);
|
|
@@ -2127,84 +2127,84 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
|
|
|
2127
2127
|
}
|
|
2128
2128
|
createResult(e, r) {
|
|
2129
2129
|
var U;
|
|
2130
|
-
const n = a(this, F), s = this.options, i = a(this, B), u = a(this, Qe), l = a(this, ot), h = e !== n ? e.state : a(this, Ft), { state:
|
|
2131
|
-
let
|
|
2130
|
+
const n = a(this, F), s = this.options, i = a(this, B), u = a(this, Qe), l = a(this, ot), h = e !== n ? e.state : a(this, Ft), { state: p } = e;
|
|
2131
|
+
let f = { ...p }, d = !1, m;
|
|
2132
2132
|
if (r._optimisticResults) {
|
|
2133
|
-
const
|
|
2134
|
-
(ge || ve) && (
|
|
2135
|
-
...
|
|
2136
|
-
...Zn(
|
|
2137
|
-
}), r._optimisticResults === "isRestoring" && (
|
|
2133
|
+
const q = this.hasListeners(), ge = !q && yn(e, r), ve = q && pn(e, n, r, s);
|
|
2134
|
+
(ge || ve) && (f = {
|
|
2135
|
+
...f,
|
|
2136
|
+
...Zn(p.data, e.options)
|
|
2137
|
+
}), r._optimisticResults === "isRestoring" && (f.fetchStatus = "idle");
|
|
2138
2138
|
}
|
|
2139
|
-
let { error:
|
|
2140
|
-
if (r.select &&
|
|
2141
|
-
if (i &&
|
|
2142
|
-
|
|
2139
|
+
let { error: v, errorUpdatedAt: g, status: R } = f;
|
|
2140
|
+
if (r.select && f.data !== void 0)
|
|
2141
|
+
if (i && f.data === (u == null ? void 0 : u.data) && r.select === a(this, At))
|
|
2142
|
+
m = a(this, at);
|
|
2143
2143
|
else
|
|
2144
2144
|
try {
|
|
2145
|
-
|
|
2146
|
-
} catch (
|
|
2147
|
-
|
|
2145
|
+
b(this, At, r.select), m = r.select(f.data), m = hr(i == null ? void 0 : i.data, m, r), b(this, at, m), b(this, fe, null);
|
|
2146
|
+
} catch (q) {
|
|
2147
|
+
b(this, fe, q);
|
|
2148
2148
|
}
|
|
2149
2149
|
else
|
|
2150
|
-
|
|
2151
|
-
if (r.placeholderData !== void 0 &&
|
|
2152
|
-
let
|
|
2150
|
+
m = f.data;
|
|
2151
|
+
if (r.placeholderData !== void 0 && m === void 0 && R === "pending") {
|
|
2152
|
+
let q;
|
|
2153
2153
|
if (i != null && i.isPlaceholderData && r.placeholderData === (l == null ? void 0 : l.placeholderData))
|
|
2154
|
-
|
|
2155
|
-
else if (
|
|
2154
|
+
q = i.data;
|
|
2155
|
+
else if (q = typeof r.placeholderData == "function" ? r.placeholderData(
|
|
2156
2156
|
(U = a(this, ut)) == null ? void 0 : U.state.data,
|
|
2157
2157
|
a(this, ut)
|
|
2158
|
-
) : r.placeholderData, r.select &&
|
|
2158
|
+
) : r.placeholderData, r.select && q !== void 0)
|
|
2159
2159
|
try {
|
|
2160
|
-
|
|
2160
|
+
q = r.select(q), b(this, fe, null);
|
|
2161
2161
|
} catch (ge) {
|
|
2162
|
-
|
|
2162
|
+
b(this, fe, ge);
|
|
2163
2163
|
}
|
|
2164
|
-
|
|
2164
|
+
q !== void 0 && (R = "success", m = hr(
|
|
2165
2165
|
i == null ? void 0 : i.data,
|
|
2166
|
-
|
|
2166
|
+
q,
|
|
2167
2167
|
r
|
|
2168
|
-
),
|
|
2168
|
+
), d = !0);
|
|
2169
2169
|
}
|
|
2170
|
-
a(this, fe) && (
|
|
2171
|
-
const
|
|
2172
|
-
status:
|
|
2173
|
-
fetchStatus:
|
|
2174
|
-
isPending:
|
|
2175
|
-
isSuccess:
|
|
2176
|
-
isError:
|
|
2177
|
-
isInitialLoading:
|
|
2178
|
-
isLoading:
|
|
2179
|
-
data:
|
|
2180
|
-
dataUpdatedAt:
|
|
2181
|
-
error:
|
|
2182
|
-
errorUpdatedAt:
|
|
2183
|
-
failureCount:
|
|
2184
|
-
failureReason:
|
|
2185
|
-
errorUpdateCount:
|
|
2186
|
-
isFetched:
|
|
2187
|
-
isFetchedAfterMount:
|
|
2188
|
-
isFetching:
|
|
2189
|
-
isRefetching:
|
|
2190
|
-
isLoadingError:
|
|
2191
|
-
isPaused:
|
|
2192
|
-
isPlaceholderData:
|
|
2193
|
-
isRefetchError:
|
|
2170
|
+
a(this, fe) && (v = a(this, fe), m = a(this, at), g = Date.now(), R = "error");
|
|
2171
|
+
const P = f.fetchStatus === "fetching", E = R === "pending", x = R === "error", j = E && P, N = m !== void 0, z = {
|
|
2172
|
+
status: R,
|
|
2173
|
+
fetchStatus: f.fetchStatus,
|
|
2174
|
+
isPending: E,
|
|
2175
|
+
isSuccess: R === "success",
|
|
2176
|
+
isError: x,
|
|
2177
|
+
isInitialLoading: j,
|
|
2178
|
+
isLoading: j,
|
|
2179
|
+
data: m,
|
|
2180
|
+
dataUpdatedAt: f.dataUpdatedAt,
|
|
2181
|
+
error: v,
|
|
2182
|
+
errorUpdatedAt: g,
|
|
2183
|
+
failureCount: f.fetchFailureCount,
|
|
2184
|
+
failureReason: f.fetchFailureReason,
|
|
2185
|
+
errorUpdateCount: f.errorUpdateCount,
|
|
2186
|
+
isFetched: f.dataUpdateCount > 0 || f.errorUpdateCount > 0,
|
|
2187
|
+
isFetchedAfterMount: f.dataUpdateCount > h.dataUpdateCount || f.errorUpdateCount > h.errorUpdateCount,
|
|
2188
|
+
isFetching: P,
|
|
2189
|
+
isRefetching: P && !E,
|
|
2190
|
+
isLoadingError: x && !N,
|
|
2191
|
+
isPaused: f.fetchStatus === "paused",
|
|
2192
|
+
isPlaceholderData: d,
|
|
2193
|
+
isRefetchError: x && N,
|
|
2194
2194
|
isStale: _r(e, r),
|
|
2195
2195
|
refetch: this.refetch,
|
|
2196
2196
|
promise: a(this, Ce)
|
|
2197
2197
|
};
|
|
2198
2198
|
if (this.options.experimental_prefetchInRender) {
|
|
2199
|
-
const
|
|
2199
|
+
const q = (De) => {
|
|
2200
2200
|
z.status === "error" ? De.reject(z.error) : z.data !== void 0 && De.resolve(z.data);
|
|
2201
2201
|
}, ge = () => {
|
|
2202
|
-
const De =
|
|
2203
|
-
|
|
2202
|
+
const De = b(this, Ce, z.promise = yr());
|
|
2203
|
+
q(De);
|
|
2204
2204
|
}, ve = a(this, Ce);
|
|
2205
2205
|
switch (ve.status) {
|
|
2206
2206
|
case "pending":
|
|
2207
|
-
e.queryHash === n.queryHash &&
|
|
2207
|
+
e.queryHash === n.queryHash && q(ve);
|
|
2208
2208
|
break;
|
|
2209
2209
|
case "fulfilled":
|
|
2210
2210
|
(z.status === "error" || z.data !== ve.value) && ge();
|
|
@@ -2218,9 +2218,9 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
|
|
|
2218
2218
|
}
|
|
2219
2219
|
updateResult(e) {
|
|
2220
2220
|
const r = a(this, B), n = this.createResult(a(this, F), this.options);
|
|
2221
|
-
if (
|
|
2221
|
+
if (b(this, Qe, a(this, F).state), b(this, ot, this.options), a(this, Qe).data !== void 0 && b(this, ut, a(this, F)), Nt(n, r))
|
|
2222
2222
|
return;
|
|
2223
|
-
|
|
2223
|
+
b(this, B, n);
|
|
2224
2224
|
const s = {}, i = () => {
|
|
2225
2225
|
if (!r)
|
|
2226
2226
|
return !0;
|
|
@@ -2231,8 +2231,8 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
|
|
|
2231
2231
|
l ?? a(this, ct)
|
|
2232
2232
|
);
|
|
2233
2233
|
return this.options.throwOnError && c.add("error"), Object.keys(a(this, B)).some((h) => {
|
|
2234
|
-
const
|
|
2235
|
-
return a(this, B)[
|
|
2234
|
+
const p = h;
|
|
2235
|
+
return a(this, B)[p] !== r[p] && c.has(p);
|
|
2236
2236
|
});
|
|
2237
2237
|
};
|
|
2238
2238
|
(e == null ? void 0 : e.listeners) !== !1 && i() && (s.listeners = !0), C(this, _, ts).call(this, { ...s, ...e });
|
|
@@ -2255,28 +2255,28 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
|
|
|
2255
2255
|
);
|
|
2256
2256
|
if (ze || a(this, B).isStale || !lr(e))
|
|
2257
2257
|
return;
|
|
2258
|
-
const n =
|
|
2259
|
-
|
|
2258
|
+
const n = Wn(a(this, B).dataUpdatedAt, e) + 1;
|
|
2259
|
+
b(this, $e, setTimeout(() => {
|
|
2260
2260
|
a(this, B).isStale || this.updateResult();
|
|
2261
2261
|
}, n));
|
|
2262
2262
|
}, mr = function() {
|
|
2263
2263
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(a(this, F)) : this.options.refetchInterval) ?? !1;
|
|
2264
2264
|
}, gr = function(e) {
|
|
2265
|
-
C(this, _, wr).call(this),
|
|
2265
|
+
C(this, _, wr).call(this), b(this, Te, e), !(ze || oe(this.options.enabled, a(this, F)) === !1 || !lr(a(this, Te)) || a(this, Te) === 0) && b(this, Ke, setInterval(() => {
|
|
2266
2266
|
(this.options.refetchIntervalInBackground || Dr.isFocused()) && C(this, _, vt).call(this);
|
|
2267
2267
|
}, a(this, Te)));
|
|
2268
2268
|
}, vr = function() {
|
|
2269
2269
|
C(this, _, pr).call(this), C(this, _, gr).call(this, C(this, _, mr).call(this));
|
|
2270
2270
|
}, br = function() {
|
|
2271
|
-
a(this, $e) && (clearTimeout(a(this, $e)),
|
|
2271
|
+
a(this, $e) && (clearTimeout(a(this, $e)), b(this, $e, void 0));
|
|
2272
2272
|
}, wr = function() {
|
|
2273
|
-
a(this, Ke) && (clearInterval(a(this, Ke)),
|
|
2273
|
+
a(this, Ke) && (clearInterval(a(this, Ke)), b(this, Ke, void 0));
|
|
2274
2274
|
}, Er = function() {
|
|
2275
2275
|
const e = a(this, J).getQueryCache().build(a(this, J), this.options);
|
|
2276
2276
|
if (e === a(this, F))
|
|
2277
2277
|
return;
|
|
2278
2278
|
const r = a(this, F);
|
|
2279
|
-
|
|
2279
|
+
b(this, F, e), b(this, Ft, e.state), this.hasListeners() && (r == null || r.removeObserver(this), e.addObserver(this));
|
|
2280
2280
|
}, ts = function(e) {
|
|
2281
2281
|
$.batch(() => {
|
|
2282
2282
|
e.listeners && this.listeners.forEach((r) => {
|
|
@@ -2312,12 +2312,12 @@ function Ri(t, e) {
|
|
|
2312
2312
|
var Fe, Ae, X, pe, me, Ut, Or, Mn, Si = (Mn = class extends ft {
|
|
2313
2313
|
constructor(e, r) {
|
|
2314
2314
|
super();
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2315
|
+
O(this, me);
|
|
2316
|
+
O(this, Fe);
|
|
2317
|
+
O(this, Ae);
|
|
2318
|
+
O(this, X);
|
|
2319
|
+
O(this, pe);
|
|
2320
|
+
b(this, Fe, e), this.setOptions(r), this.bindMethods(), C(this, me, Ut).call(this);
|
|
2321
2321
|
}
|
|
2322
2322
|
bindMethods() {
|
|
2323
2323
|
this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
|
|
@@ -2343,16 +2343,16 @@ var Fe, Ae, X, pe, me, Ut, Or, Mn, Si = (Mn = class extends ft {
|
|
|
2343
2343
|
}
|
|
2344
2344
|
reset() {
|
|
2345
2345
|
var e;
|
|
2346
|
-
(e = a(this, X)) == null || e.removeObserver(this),
|
|
2346
|
+
(e = a(this, X)) == null || e.removeObserver(this), b(this, X, void 0), C(this, me, Ut).call(this), C(this, me, Or).call(this);
|
|
2347
2347
|
}
|
|
2348
2348
|
mutate(e, r) {
|
|
2349
2349
|
var n;
|
|
2350
|
-
return
|
|
2350
|
+
return b(this, pe, r), (n = a(this, X)) == null || n.removeObserver(this), b(this, X, a(this, Fe).getMutationCache().build(a(this, Fe), this.options)), a(this, X).addObserver(this), a(this, X).execute(e);
|
|
2351
2351
|
}
|
|
2352
2352
|
}, Fe = new WeakMap(), Ae = new WeakMap(), X = new WeakMap(), pe = new WeakMap(), me = new WeakSet(), Ut = function() {
|
|
2353
2353
|
var r;
|
|
2354
2354
|
const e = ((r = a(this, X)) == null ? void 0 : r.state) ?? es();
|
|
2355
|
-
|
|
2355
|
+
b(this, Ae, {
|
|
2356
2356
|
...e,
|
|
2357
2357
|
isPending: e.status === "pending",
|
|
2358
2358
|
isSuccess: e.status === "success",
|
|
@@ -2365,17 +2365,17 @@ var Fe, Ae, X, pe, me, Ut, Or, Mn, Si = (Mn = class extends ft {
|
|
|
2365
2365
|
$.batch(() => {
|
|
2366
2366
|
var r, n, s, i, u, l, c, h;
|
|
2367
2367
|
if (a(this, pe) && this.hasListeners()) {
|
|
2368
|
-
const
|
|
2369
|
-
(e == null ? void 0 : e.type) === "success" ? ((n = (r = a(this, pe)).onSuccess) == null || n.call(r, e.data,
|
|
2368
|
+
const p = a(this, Ae).variables, f = a(this, Ae).context;
|
|
2369
|
+
(e == null ? void 0 : e.type) === "success" ? ((n = (r = a(this, pe)).onSuccess) == null || n.call(r, e.data, p, f), (i = (s = a(this, pe)).onSettled) == null || i.call(s, e.data, null, p, f)) : (e == null ? void 0 : e.type) === "error" && ((l = (u = a(this, pe)).onError) == null || l.call(u, e.error, p, f), (h = (c = a(this, pe)).onSettled) == null || h.call(
|
|
2370
2370
|
c,
|
|
2371
2371
|
void 0,
|
|
2372
2372
|
e.error,
|
|
2373
|
-
|
|
2374
|
-
|
|
2373
|
+
p,
|
|
2374
|
+
f
|
|
2375
2375
|
));
|
|
2376
2376
|
}
|
|
2377
|
-
this.listeners.forEach((
|
|
2378
|
-
|
|
2377
|
+
this.listeners.forEach((p) => {
|
|
2378
|
+
p(a(this, Ae));
|
|
2379
2379
|
});
|
|
2380
2380
|
});
|
|
2381
2381
|
}, Mn), rs = K.createContext(
|
|
@@ -2429,14 +2429,14 @@ var Ii = (t, e) => {
|
|
|
2429
2429
|
r.clearReset();
|
|
2430
2430
|
});
|
|
2431
2431
|
function Ui(t, e, r) {
|
|
2432
|
-
var
|
|
2432
|
+
var f, d, m, v, g;
|
|
2433
2433
|
if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
|
|
2434
2434
|
throw new Error(
|
|
2435
2435
|
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
|
2436
2436
|
);
|
|
2437
2437
|
const n = dt(), s = Ti(), i = xi(), u = n.defaultQueryOptions(t);
|
|
2438
|
-
(
|
|
2439
|
-
|
|
2438
|
+
(d = (f = n.getDefaultOptions().queries) == null ? void 0 : f._experimental_beforeQuery) == null || d.call(
|
|
2439
|
+
f,
|
|
2440
2440
|
u
|
|
2441
2441
|
), process.env.NODE_ENV !== "production" && (u.queryFn || console.error(
|
|
2442
2442
|
`[${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`
|
|
@@ -2446,14 +2446,14 @@ function Ui(t, e, r) {
|
|
|
2446
2446
|
n,
|
|
2447
2447
|
u
|
|
2448
2448
|
)
|
|
2449
|
-
), h = c.getOptimisticResult(u),
|
|
2449
|
+
), h = c.getOptimisticResult(u), p = !s && t.subscribed !== !1;
|
|
2450
2450
|
if (K.useSyncExternalStore(
|
|
2451
2451
|
K.useCallback(
|
|
2452
|
-
(
|
|
2453
|
-
const
|
|
2454
|
-
return c.updateResult(),
|
|
2452
|
+
(R) => {
|
|
2453
|
+
const P = p ? c.subscribe($.batchCalls(R)) : Rr;
|
|
2454
|
+
return c.updateResult(), P;
|
|
2455
2455
|
},
|
|
2456
|
-
[c,
|
|
2456
|
+
[c, p]
|
|
2457
2457
|
),
|
|
2458
2458
|
() => c.getCurrentResult(),
|
|
2459
2459
|
() => c.getCurrentResult()
|
|
@@ -2469,19 +2469,19 @@ function Ui(t, e, r) {
|
|
|
2469
2469
|
suspense: u.suspense
|
|
2470
2470
|
}))
|
|
2471
2471
|
throw h.error;
|
|
2472
|
-
if ((
|
|
2473
|
-
|
|
2472
|
+
if ((v = (m = n.getDefaultOptions().queries) == null ? void 0 : m._experimental_afterQuery) == null || v.call(
|
|
2473
|
+
m,
|
|
2474
2474
|
u,
|
|
2475
2475
|
h
|
|
2476
2476
|
), u.experimental_prefetchInRender && !ze && ji(h, s)) {
|
|
2477
|
-
const
|
|
2477
|
+
const R = l ? (
|
|
2478
2478
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
2479
2479
|
mn(u, c, i)
|
|
2480
2480
|
) : (
|
|
2481
2481
|
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
2482
|
-
(
|
|
2482
|
+
(g = n.getQueryCache().get(u.queryHash)) == null ? void 0 : g.promise
|
|
2483
2483
|
);
|
|
2484
|
-
|
|
2484
|
+
R == null || R.catch(Rr).finally(() => {
|
|
2485
2485
|
c.updateResult();
|
|
2486
2486
|
});
|
|
2487
2487
|
}
|
|
@@ -2665,19 +2665,19 @@ function os(t, e, r) {
|
|
|
2665
2665
|
},
|
|
2666
2666
|
apply(u, l, c) {
|
|
2667
2667
|
const h = e[e.length - 1];
|
|
2668
|
-
let
|
|
2668
|
+
let p = {
|
|
2669
2669
|
args: c,
|
|
2670
2670
|
path: e
|
|
2671
2671
|
};
|
|
2672
|
-
return h === "call" ?
|
|
2672
|
+
return h === "call" ? p = {
|
|
2673
2673
|
args: c.length >= 2 ? [
|
|
2674
2674
|
c[1]
|
|
2675
2675
|
] : [],
|
|
2676
2676
|
path: e.slice(0, -1)
|
|
2677
|
-
} : h === "apply" && (
|
|
2677
|
+
} : h === "apply" && (p = {
|
|
2678
2678
|
args: c.length >= 2 ? c[1] : [],
|
|
2679
2679
|
path: e.slice(0, -1)
|
|
2680
|
-
}), gn(
|
|
2680
|
+
}), gn(p.args), gn(p.path), t(p);
|
|
2681
2681
|
}
|
|
2682
2682
|
})), r[i];
|
|
2683
2683
|
}
|
|
@@ -2717,7 +2717,7 @@ class ir extends Error {
|
|
|
2717
2717
|
super("Unable to transform response from server");
|
|
2718
2718
|
}
|
|
2719
2719
|
}
|
|
2720
|
-
function
|
|
2720
|
+
function Hi(t, e) {
|
|
2721
2721
|
let r;
|
|
2722
2722
|
try {
|
|
2723
2723
|
r = Vi(t, e);
|
|
@@ -2744,7 +2744,7 @@ function qt(t, e, r) {
|
|
|
2744
2744
|
writable: !0
|
|
2745
2745
|
}) : t[e] = r, t;
|
|
2746
2746
|
}
|
|
2747
|
-
function
|
|
2747
|
+
function Wi(t) {
|
|
2748
2748
|
return t instanceof xe || /**
|
|
2749
2749
|
* @deprecated
|
|
2750
2750
|
* Delete in next major
|
|
@@ -2760,7 +2760,7 @@ function Gi(t, e) {
|
|
|
2760
2760
|
class xe extends Error {
|
|
2761
2761
|
static from(e, r = {}) {
|
|
2762
2762
|
const n = e;
|
|
2763
|
-
return
|
|
2763
|
+
return Wi(n) ? (r.meta && (n.meta = {
|
|
2764
2764
|
...n.meta,
|
|
2765
2765
|
...r.meta
|
|
2766
2766
|
}), n) : Bi(n) ? new xe(n.error.message, {
|
|
@@ -2913,26 +2913,26 @@ function Pn(t) {
|
|
|
2913
2913
|
clearTimeout(r), r = null, e = null;
|
|
2914
2914
|
};
|
|
2915
2915
|
function s(l) {
|
|
2916
|
-
var
|
|
2916
|
+
var p, f;
|
|
2917
2917
|
const c = [
|
|
2918
2918
|
[]
|
|
2919
2919
|
];
|
|
2920
2920
|
let h = 0;
|
|
2921
2921
|
for (; ; ) {
|
|
2922
|
-
const
|
|
2923
|
-
if (!
|
|
2922
|
+
const d = l[h];
|
|
2923
|
+
if (!d)
|
|
2924
2924
|
break;
|
|
2925
|
-
const
|
|
2926
|
-
if (
|
|
2927
|
-
(
|
|
2925
|
+
const m = c[c.length - 1];
|
|
2926
|
+
if (d.aborted) {
|
|
2927
|
+
(p = d.reject) == null || p.call(d, new Error("Aborted")), h++;
|
|
2928
2928
|
continue;
|
|
2929
2929
|
}
|
|
2930
|
-
if (t.validate(
|
|
2931
|
-
|
|
2930
|
+
if (t.validate(m.concat(d).map((g) => g.key))) {
|
|
2931
|
+
m.push(d), h++;
|
|
2932
2932
|
continue;
|
|
2933
2933
|
}
|
|
2934
|
-
if (
|
|
2935
|
-
(
|
|
2934
|
+
if (m.length === 0) {
|
|
2935
|
+
(f = d.reject) == null || f.call(d, new Error("Input is too big for a single dispatch")), h++;
|
|
2936
2936
|
continue;
|
|
2937
2937
|
}
|
|
2938
2938
|
c.push([]);
|
|
@@ -2948,27 +2948,27 @@ function Pn(t) {
|
|
|
2948
2948
|
const h = {
|
|
2949
2949
|
items: c
|
|
2950
2950
|
};
|
|
2951
|
-
for (const
|
|
2952
|
-
|
|
2953
|
-
t.fetch(h.items.map((
|
|
2954
|
-
var
|
|
2955
|
-
await Promise.all(
|
|
2956
|
-
var
|
|
2957
|
-
const
|
|
2951
|
+
for (const f of c)
|
|
2952
|
+
f.batch = h;
|
|
2953
|
+
t.fetch(h.items.map((f) => f.key)).then(async (f) => {
|
|
2954
|
+
var d;
|
|
2955
|
+
await Promise.all(f.map(async (m, v) => {
|
|
2956
|
+
var R, P;
|
|
2957
|
+
const g = h.items[v];
|
|
2958
2958
|
try {
|
|
2959
|
-
const
|
|
2960
|
-
(
|
|
2961
|
-
} catch (
|
|
2962
|
-
(
|
|
2959
|
+
const E = await Promise.resolve(m);
|
|
2960
|
+
(R = g.resolve) == null || R.call(g, E);
|
|
2961
|
+
} catch (E) {
|
|
2962
|
+
(P = g.reject) == null || P.call(g, E);
|
|
2963
2963
|
}
|
|
2964
|
-
|
|
2964
|
+
g.batch = null, g.reject = null, g.resolve = null;
|
|
2965
2965
|
}));
|
|
2966
|
-
for (const
|
|
2967
|
-
(
|
|
2968
|
-
}).catch((
|
|
2969
|
-
var
|
|
2970
|
-
for (const
|
|
2971
|
-
(
|
|
2966
|
+
for (const m of h.items)
|
|
2967
|
+
(d = m.reject) == null || d.call(m, new Error("Missing result")), m.batch = null;
|
|
2968
|
+
}).catch((f) => {
|
|
2969
|
+
var d;
|
|
2970
|
+
for (const m of h.items)
|
|
2971
|
+
(d = m.reject) == null || d.call(m, f), m.batch = null;
|
|
2972
2972
|
});
|
|
2973
2973
|
}
|
|
2974
2974
|
}
|
|
@@ -2979,8 +2979,8 @@ function Pn(t) {
|
|
|
2979
2979
|
batch: null,
|
|
2980
2980
|
resolve: En,
|
|
2981
2981
|
reject: En
|
|
2982
|
-
}, h = new Promise((
|
|
2983
|
-
c.reject =
|
|
2982
|
+
}, h = new Promise((p, f) => {
|
|
2983
|
+
c.reject = f, c.resolve = p, e || (e = []), e.push(c);
|
|
2984
2984
|
});
|
|
2985
2985
|
return r || (r = setTimeout(i)), h;
|
|
2986
2986
|
}
|
|
@@ -3108,31 +3108,31 @@ function po(t) {
|
|
|
3108
3108
|
validate(c) {
|
|
3109
3109
|
if (r === 1 / 0)
|
|
3110
3110
|
return !0;
|
|
3111
|
-
const h = c.map((
|
|
3111
|
+
const h = c.map((d) => d.path).join(","), p = c.map((d) => d.input);
|
|
3112
3112
|
return us({
|
|
3113
3113
|
...e,
|
|
3114
3114
|
type: l,
|
|
3115
3115
|
path: h,
|
|
3116
|
-
inputs:
|
|
3116
|
+
inputs: p,
|
|
3117
3117
|
signal: null
|
|
3118
3118
|
}).length <= r;
|
|
3119
3119
|
},
|
|
3120
3120
|
async fetch(c) {
|
|
3121
|
-
const h = c.map((
|
|
3121
|
+
const h = c.map((g) => g.path).join(","), p = c.map((g) => g.input), f = no(...c.map((g) => g.signal)), d = await co({
|
|
3122
3122
|
...e,
|
|
3123
3123
|
path: h,
|
|
3124
|
-
inputs:
|
|
3124
|
+
inputs: p,
|
|
3125
3125
|
type: l,
|
|
3126
3126
|
headers() {
|
|
3127
3127
|
return t.headers ? typeof t.headers == "function" ? t.headers({
|
|
3128
3128
|
opList: c
|
|
3129
3129
|
}) : t.headers : {};
|
|
3130
3130
|
},
|
|
3131
|
-
signal:
|
|
3131
|
+
signal: f
|
|
3132
3132
|
});
|
|
3133
|
-
return (Array.isArray(
|
|
3134
|
-
meta:
|
|
3135
|
-
json:
|
|
3133
|
+
return (Array.isArray(d.json) ? d.json : c.map(() => d.json)).map((g) => ({
|
|
3134
|
+
meta: d.meta,
|
|
3135
|
+
json: g
|
|
3136
3136
|
}));
|
|
3137
3137
|
}
|
|
3138
3138
|
}), s = Pn(n("query")), i = Pn(n("mutation")), u = {
|
|
@@ -3143,24 +3143,24 @@ function po(t) {
|
|
|
3143
3143
|
/* istanbul ignore if -- @preserve */
|
|
3144
3144
|
if (l.type === "subscription")
|
|
3145
3145
|
throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");
|
|
3146
|
-
const
|
|
3147
|
-
let
|
|
3148
|
-
return
|
|
3149
|
-
|
|
3150
|
-
const
|
|
3151
|
-
if (!
|
|
3152
|
-
c.error(xe.from(
|
|
3153
|
-
meta:
|
|
3146
|
+
const p = u[l.type].load(l);
|
|
3147
|
+
let f;
|
|
3148
|
+
return p.then((d) => {
|
|
3149
|
+
f = d;
|
|
3150
|
+
const m = Hi(d.json, e.transformer.output);
|
|
3151
|
+
if (!m.ok) {
|
|
3152
|
+
c.error(xe.from(m.error, {
|
|
3153
|
+
meta: d.meta
|
|
3154
3154
|
}));
|
|
3155
3155
|
return;
|
|
3156
3156
|
}
|
|
3157
3157
|
c.next({
|
|
3158
|
-
context:
|
|
3159
|
-
result:
|
|
3158
|
+
context: d.meta,
|
|
3159
|
+
result: m.result
|
|
3160
3160
|
}), c.complete();
|
|
3161
|
-
}).catch((
|
|
3162
|
-
c.error(xe.from(
|
|
3163
|
-
meta:
|
|
3161
|
+
}).catch((d) => {
|
|
3162
|
+
c.error(xe.from(d, {
|
|
3163
|
+
meta: f == null ? void 0 : f.meta
|
|
3164
3164
|
}));
|
|
3165
3165
|
}), () => {
|
|
3166
3166
|
};
|
|
@@ -3565,13 +3565,13 @@ const $o = (t, e) => {
|
|
|
3565
3565
|
} else if (Rt(n)) {
|
|
3566
3566
|
if (i === e.length - 2)
|
|
3567
3567
|
break;
|
|
3568
|
-
const c = +u, h = +e[++i] == 0 ? "key" : "value",
|
|
3568
|
+
const c = +u, h = +e[++i] == 0 ? "key" : "value", p = Ge(n, c);
|
|
3569
3569
|
switch (h) {
|
|
3570
3570
|
case "key":
|
|
3571
|
-
n =
|
|
3571
|
+
n = p;
|
|
3572
3572
|
break;
|
|
3573
3573
|
case "value":
|
|
3574
|
-
n = n.get(
|
|
3574
|
+
n = n.get(p);
|
|
3575
3575
|
break;
|
|
3576
3576
|
}
|
|
3577
3577
|
}
|
|
@@ -3631,11 +3631,11 @@ function zo(t, e) {
|
|
|
3631
3631
|
return t;
|
|
3632
3632
|
}
|
|
3633
3633
|
const Vo = (t, e) => Ot(t) || Ie(t) || Rt(t) || St(t) || ms(t, e);
|
|
3634
|
-
function
|
|
3634
|
+
function Ho(t, e, r) {
|
|
3635
3635
|
const n = r.get(t);
|
|
3636
3636
|
n ? n.push(e) : r.set(t, [e]);
|
|
3637
3637
|
}
|
|
3638
|
-
function
|
|
3638
|
+
function Wo(t, e) {
|
|
3639
3639
|
const r = {};
|
|
3640
3640
|
let n;
|
|
3641
3641
|
return t.forEach((s) => {
|
|
@@ -3649,43 +3649,43 @@ function Ho(t, e) {
|
|
|
3649
3649
|
const Es = (t, e, r, n, s = [], i = [], u = /* @__PURE__ */ new Map()) => {
|
|
3650
3650
|
const l = ko(t);
|
|
3651
3651
|
if (!l) {
|
|
3652
|
-
|
|
3653
|
-
const
|
|
3654
|
-
if (
|
|
3652
|
+
Ho(t, s, e);
|
|
3653
|
+
const m = u.get(t);
|
|
3654
|
+
if (m)
|
|
3655
3655
|
return n ? {
|
|
3656
3656
|
transformedValue: null
|
|
3657
|
-
} :
|
|
3657
|
+
} : m;
|
|
3658
3658
|
}
|
|
3659
3659
|
if (!Vo(t, r)) {
|
|
3660
|
-
const
|
|
3661
|
-
transformedValue:
|
|
3662
|
-
annotations: [
|
|
3660
|
+
const m = Sn(t, r), v = m ? {
|
|
3661
|
+
transformedValue: m.value,
|
|
3662
|
+
annotations: [m.type]
|
|
3663
3663
|
} : {
|
|
3664
3664
|
transformedValue: t
|
|
3665
3665
|
};
|
|
3666
|
-
return l || u.set(t,
|
|
3666
|
+
return l || u.set(t, v), v;
|
|
3667
3667
|
}
|
|
3668
3668
|
if (Mt(i, t))
|
|
3669
3669
|
return {
|
|
3670
3670
|
transformedValue: null
|
|
3671
3671
|
};
|
|
3672
|
-
const c = Sn(t, r), h = (c == null ? void 0 : c.value) ?? t,
|
|
3673
|
-
lt(h, (
|
|
3674
|
-
if (
|
|
3675
|
-
throw new Error(`Detected property ${
|
|
3676
|
-
const
|
|
3677
|
-
|
|
3678
|
-
|
|
3672
|
+
const c = Sn(t, r), h = (c == null ? void 0 : c.value) ?? t, p = Ie(h) ? [] : {}, f = {};
|
|
3673
|
+
lt(h, (m, v) => {
|
|
3674
|
+
if (v === "__proto__" || v === "constructor" || v === "prototype")
|
|
3675
|
+
throw new Error(`Detected property ${v}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3676
|
+
const g = Es(m, e, r, n, [...s, v], [...i, t], u);
|
|
3677
|
+
p[v] = g.transformedValue, Ie(g.annotations) ? f[v] = g.annotations : Ot(g.annotations) && lt(g.annotations, (R, P) => {
|
|
3678
|
+
f[ds(v) + "." + P] = R;
|
|
3679
3679
|
});
|
|
3680
3680
|
});
|
|
3681
|
-
const
|
|
3682
|
-
transformedValue:
|
|
3681
|
+
const d = Sr(f) ? {
|
|
3682
|
+
transformedValue: p,
|
|
3683
3683
|
annotations: c ? [c.type] : void 0
|
|
3684
3684
|
} : {
|
|
3685
|
-
transformedValue:
|
|
3686
|
-
annotations: c ? [c.type,
|
|
3685
|
+
transformedValue: p,
|
|
3686
|
+
annotations: c ? [c.type, f] : f
|
|
3687
3687
|
};
|
|
3688
|
-
return l || u.set(t,
|
|
3688
|
+
return l || u.set(t, d), d;
|
|
3689
3689
|
};
|
|
3690
3690
|
function Ps(t) {
|
|
3691
3691
|
return Object.prototype.toString.call(t).slice(8, -1);
|
|
@@ -3736,7 +3736,7 @@ class A {
|
|
|
3736
3736
|
...s.meta,
|
|
3737
3737
|
values: n.annotations
|
|
3738
3738
|
});
|
|
3739
|
-
const i =
|
|
3739
|
+
const i = Wo(r, this.dedupe);
|
|
3740
3740
|
return i && (s.meta = {
|
|
3741
3741
|
...s.meta,
|
|
3742
3742
|
referentialEqualities: i
|
|
@@ -3786,19 +3786,19 @@ A.registerClass;
|
|
|
3786
3786
|
A.registerCustom;
|
|
3787
3787
|
A.registerSymbol;
|
|
3788
3788
|
A.allowErrorProps;
|
|
3789
|
-
class
|
|
3789
|
+
class Ht extends Error {
|
|
3790
3790
|
constructor(r, n) {
|
|
3791
3791
|
super(r);
|
|
3792
3792
|
tr(this, "context");
|
|
3793
3793
|
tr(this, "originalError");
|
|
3794
|
-
this.name = "FolioError", this.context = n == null ? void 0 : n.context, this.originalError = n == null ? void 0 : n.originalError, Object.setPrototypeOf(this,
|
|
3794
|
+
this.name = "FolioError", this.context = n == null ? void 0 : n.context, this.originalError = n == null ? void 0 : n.originalError, Object.setPrototypeOf(this, Ht.prototype);
|
|
3795
3795
|
}
|
|
3796
3796
|
}
|
|
3797
3797
|
function G(t, e) {
|
|
3798
|
-
return new
|
|
3798
|
+
return new Ht(t, e);
|
|
3799
3799
|
}
|
|
3800
3800
|
function ne(t) {
|
|
3801
|
-
t instanceof
|
|
3801
|
+
t instanceof Ht ? (console.error(`🔴 Folio Error: ${t.message}`), t.context && Object.keys(t.context).length > 0 && console.error("Context:", t.context), t.originalError && console.error("Original error:", t.originalError)) : console.error("🔴 Unexpected error:", t);
|
|
3802
3802
|
}
|
|
3803
3803
|
function de(t, e, r) {
|
|
3804
3804
|
return G(`${t}: ${e}`, {
|
|
@@ -3820,16 +3820,16 @@ function Yo(t, e) {
|
|
|
3820
3820
|
]
|
|
3821
3821
|
}), n = async (s, i, u = null) => {
|
|
3822
3822
|
try {
|
|
3823
|
-
const l = Object.entries(
|
|
3824
|
-
(
|
|
3825
|
-
|
|
3826
|
-
}),
|
|
3823
|
+
const l = Object.entries(Hn).reduce(
|
|
3824
|
+
(d, [m, v]) => (v.extensions.forEach((g) => {
|
|
3825
|
+
d.set(g, m);
|
|
3826
|
+
}), d),
|
|
3827
3827
|
/* @__PURE__ */ new Map()
|
|
3828
|
-
), c = i.map((
|
|
3829
|
-
const
|
|
3830
|
-
return { ...
|
|
3828
|
+
), c = i.map((d) => {
|
|
3829
|
+
const m = d.name.toLowerCase(), v = m.includes(".") ? m.substring(m.lastIndexOf(".")) : "", g = v.startsWith(".") ? v : `.${v}`, R = l.get(g) || null;
|
|
3830
|
+
return { ...d, mimeType: R };
|
|
3831
3831
|
}).filter(
|
|
3832
|
-
(
|
|
3832
|
+
(d) => d.mimeType !== null && oi.has(d.mimeType)
|
|
3833
3833
|
);
|
|
3834
3834
|
if (c.length === 0)
|
|
3835
3835
|
return { filesToCreate: [] };
|
|
@@ -3837,15 +3837,15 @@ function Yo(t, e) {
|
|
|
3837
3837
|
{
|
|
3838
3838
|
projectId: s
|
|
3839
3839
|
}
|
|
3840
|
-
),
|
|
3841
|
-
(
|
|
3840
|
+
), p = c.filter((d) => !h.some(
|
|
3841
|
+
(m) => m.userProvidedId === d.userProvidedId && m.parentId === u
|
|
3842
3842
|
));
|
|
3843
|
-
return
|
|
3843
|
+
return p.length === 0 ? { filesToCreate: [] } : { filesToCreate: p.map((d) => ({
|
|
3844
3844
|
projectId: s,
|
|
3845
|
-
mimeType:
|
|
3846
|
-
path:
|
|
3845
|
+
mimeType: d.mimeType,
|
|
3846
|
+
path: d.blobUrl,
|
|
3847
3847
|
// Map blobUrl back to path for API
|
|
3848
|
-
name:
|
|
3848
|
+
name: d.name,
|
|
3849
3849
|
size: 0,
|
|
3850
3850
|
// You might need to calculate or pass size
|
|
3851
3851
|
metadata: null,
|
|
@@ -3854,7 +3854,7 @@ function Yo(t, e) {
|
|
|
3854
3854
|
chunkingStatus: cr.NOT_CHUNKED,
|
|
3855
3855
|
isDirectory: !1,
|
|
3856
3856
|
parentId: u,
|
|
3857
|
-
userProvidedId:
|
|
3857
|
+
userProvidedId: d.userProvidedId
|
|
3858
3858
|
})) };
|
|
3859
3859
|
} catch (l) {
|
|
3860
3860
|
throw G("Failed to validate and filter files", {
|
|
@@ -3966,23 +3966,30 @@ function Yo(t, e) {
|
|
|
3966
3966
|
try {
|
|
3967
3967
|
const h = await r.fileRouter.getFilesByProject.query({
|
|
3968
3968
|
projectId: s
|
|
3969
|
-
}),
|
|
3969
|
+
}), f = ((P) => {
|
|
3970
|
+
let E = 0;
|
|
3971
|
+
for (let x = 0; x < P.length; x++) {
|
|
3972
|
+
const j = P.charCodeAt(x);
|
|
3973
|
+
E = (E << 5) - E + j, E = E & E;
|
|
3974
|
+
}
|
|
3975
|
+
return Math.abs(E).toString(36).substring(0, 6);
|
|
3976
|
+
})(u), d = c || `directory-${i}-${f}`;
|
|
3970
3977
|
if (h.some(
|
|
3971
|
-
(
|
|
3978
|
+
(P) => P.userProvidedId === d && P.isDirectory === !0 && P.parentId === null
|
|
3972
3979
|
))
|
|
3973
3980
|
return ne(
|
|
3974
3981
|
G("Directory already exists", {
|
|
3975
3982
|
context: {
|
|
3976
3983
|
projectId: s,
|
|
3977
3984
|
directoryName: i,
|
|
3978
|
-
userProvidedId:
|
|
3985
|
+
userProvidedId: d
|
|
3979
3986
|
}
|
|
3980
3987
|
})
|
|
3981
3988
|
), {
|
|
3982
3989
|
directory: null,
|
|
3983
3990
|
files: []
|
|
3984
3991
|
};
|
|
3985
|
-
const
|
|
3992
|
+
const v = await r.fileRouter.createFile.mutate({
|
|
3986
3993
|
file: {
|
|
3987
3994
|
projectId: s,
|
|
3988
3995
|
mimeType: xr.DIRECTORY,
|
|
@@ -3996,67 +4003,67 @@ function Yo(t, e) {
|
|
|
3996
4003
|
// Always at the root level
|
|
3997
4004
|
summary: null,
|
|
3998
4005
|
chunkingStatus: cr.NOT_CHUNKED,
|
|
3999
|
-
userProvidedId:
|
|
4006
|
+
userProvidedId: d
|
|
4000
4007
|
// Use the deduplication-consistent userProvidedId
|
|
4001
4008
|
}
|
|
4002
4009
|
});
|
|
4003
4010
|
if (l.length === 0)
|
|
4004
4011
|
return {
|
|
4005
4012
|
directory: {
|
|
4006
|
-
blobUrl:
|
|
4007
|
-
name:
|
|
4008
|
-
id:
|
|
4009
|
-
parentId:
|
|
4010
|
-
isDirectory:
|
|
4011
|
-
userProvidedId:
|
|
4012
|
-
createdAt:
|
|
4013
|
-
updatedAt:
|
|
4013
|
+
blobUrl: v.path,
|
|
4014
|
+
name: v.name,
|
|
4015
|
+
id: v.id,
|
|
4016
|
+
parentId: v.parentId,
|
|
4017
|
+
isDirectory: v.isDirectory,
|
|
4018
|
+
userProvidedId: v.userProvidedId || d,
|
|
4019
|
+
createdAt: v.createdAt,
|
|
4020
|
+
updatedAt: v.updatedAt
|
|
4014
4021
|
},
|
|
4015
4022
|
files: []
|
|
4016
4023
|
};
|
|
4017
4024
|
const { filesToCreate: g } = await n(
|
|
4018
4025
|
s,
|
|
4019
4026
|
l,
|
|
4020
|
-
|
|
4027
|
+
v.id
|
|
4021
4028
|
// Pass directory ID as parent
|
|
4022
4029
|
);
|
|
4023
4030
|
if (g.length === 0)
|
|
4024
4031
|
return {
|
|
4025
4032
|
directory: {
|
|
4026
|
-
blobUrl:
|
|
4027
|
-
name:
|
|
4028
|
-
id:
|
|
4029
|
-
parentId:
|
|
4030
|
-
isDirectory:
|
|
4031
|
-
userProvidedId:
|
|
4032
|
-
createdAt:
|
|
4033
|
-
updatedAt:
|
|
4033
|
+
blobUrl: v.path,
|
|
4034
|
+
name: v.name,
|
|
4035
|
+
id: v.id,
|
|
4036
|
+
parentId: v.parentId,
|
|
4037
|
+
isDirectory: v.isDirectory,
|
|
4038
|
+
userProvidedId: v.userProvidedId || d,
|
|
4039
|
+
createdAt: v.createdAt,
|
|
4040
|
+
updatedAt: v.updatedAt
|
|
4034
4041
|
},
|
|
4035
4042
|
files: []
|
|
4036
4043
|
};
|
|
4037
|
-
const
|
|
4044
|
+
const R = await r.fileRouter.createFiles.mutate({
|
|
4038
4045
|
files: g
|
|
4039
4046
|
});
|
|
4040
4047
|
return {
|
|
4041
|
-
directory:
|
|
4042
|
-
blobUrl:
|
|
4043
|
-
name:
|
|
4044
|
-
id:
|
|
4045
|
-
parentId:
|
|
4046
|
-
isDirectory:
|
|
4047
|
-
userProvidedId:
|
|
4048
|
-
createdAt:
|
|
4049
|
-
updatedAt:
|
|
4048
|
+
directory: v ? {
|
|
4049
|
+
blobUrl: v.path,
|
|
4050
|
+
name: v.name,
|
|
4051
|
+
id: v.id,
|
|
4052
|
+
parentId: v.parentId,
|
|
4053
|
+
isDirectory: v.isDirectory,
|
|
4054
|
+
userProvidedId: v.userProvidedId || `directory-${i}`,
|
|
4055
|
+
createdAt: v.createdAt,
|
|
4056
|
+
updatedAt: v.updatedAt
|
|
4050
4057
|
} : null,
|
|
4051
|
-
files:
|
|
4052
|
-
blobUrl:
|
|
4053
|
-
name:
|
|
4054
|
-
id:
|
|
4055
|
-
parentId:
|
|
4056
|
-
isDirectory:
|
|
4057
|
-
userProvidedId:
|
|
4058
|
-
createdAt:
|
|
4059
|
-
updatedAt:
|
|
4058
|
+
files: R.map((P) => ({
|
|
4059
|
+
blobUrl: P.path,
|
|
4060
|
+
name: P.name,
|
|
4061
|
+
id: P.id,
|
|
4062
|
+
parentId: P.parentId,
|
|
4063
|
+
isDirectory: P.isDirectory,
|
|
4064
|
+
userProvidedId: P.userProvidedId || "",
|
|
4065
|
+
createdAt: P.createdAt,
|
|
4066
|
+
updatedAt: P.updatedAt
|
|
4060
4067
|
}))
|
|
4061
4068
|
};
|
|
4062
4069
|
} catch (h) {
|
|
@@ -4113,39 +4120,39 @@ function ra({
|
|
|
4113
4120
|
[]
|
|
4114
4121
|
);
|
|
4115
4122
|
return nr(() => {
|
|
4116
|
-
const
|
|
4117
|
-
c(
|
|
4123
|
+
const p = `${e}:${r}`, f = Yo(p, n);
|
|
4124
|
+
c(f);
|
|
4118
4125
|
}, [e, r, n]), nr(() => {
|
|
4119
4126
|
if (!l || !s)
|
|
4120
4127
|
return;
|
|
4121
|
-
const
|
|
4122
|
-
l.updateUserMetadata(
|
|
4128
|
+
const p = JSON.stringify(s);
|
|
4129
|
+
l.updateUserMetadata(p).catch((f) => {
|
|
4123
4130
|
console.error(
|
|
4124
4131
|
"[FolioProvider] Failed to set initial user metadata:",
|
|
4125
|
-
|
|
4132
|
+
f
|
|
4126
4133
|
), ne(
|
|
4127
4134
|
G("Failed to set initial user metadata", {
|
|
4128
|
-
originalError:
|
|
4135
|
+
originalError: f
|
|
4129
4136
|
})
|
|
4130
4137
|
);
|
|
4131
4138
|
});
|
|
4132
4139
|
}, [l, s]), nr(() => {
|
|
4133
4140
|
if (!i)
|
|
4134
4141
|
return;
|
|
4135
|
-
const
|
|
4136
|
-
i(
|
|
4137
|
-
},
|
|
4138
|
-
var
|
|
4139
|
-
((
|
|
4142
|
+
const p = (d) => {
|
|
4143
|
+
i(d.detail);
|
|
4144
|
+
}, f = (d) => {
|
|
4145
|
+
var m;
|
|
4146
|
+
((m = d.data) == null ? void 0 : m.type) === "folio-analytics" && d.data.event && i(d.data.event);
|
|
4140
4147
|
};
|
|
4141
4148
|
return window.addEventListener(
|
|
4142
4149
|
"folio-analytics",
|
|
4143
|
-
|
|
4144
|
-
), window.addEventListener("message",
|
|
4150
|
+
p
|
|
4151
|
+
), window.addEventListener("message", f), () => {
|
|
4145
4152
|
window.removeEventListener(
|
|
4146
4153
|
"folio-analytics",
|
|
4147
|
-
|
|
4148
|
-
), window.removeEventListener("message",
|
|
4154
|
+
p
|
|
4155
|
+
), window.removeEventListener("message", f);
|
|
4149
4156
|
};
|
|
4150
4157
|
}, [i]), /* @__PURE__ */ wt.jsx(Ci, { client: h, children: /* @__PURE__ */ wt.jsx(
|
|
4151
4158
|
Os.Provider,
|
|
@@ -4155,7 +4162,7 @@ function ra({
|
|
|
4155
4162
|
}
|
|
4156
4163
|
) });
|
|
4157
4164
|
}
|
|
4158
|
-
function
|
|
4165
|
+
function He() {
|
|
4159
4166
|
const t = ri(Os);
|
|
4160
4167
|
if (!t)
|
|
4161
4168
|
throw console.error(
|
|
@@ -4189,78 +4196,78 @@ function na({
|
|
|
4189
4196
|
host: l,
|
|
4190
4197
|
port: c,
|
|
4191
4198
|
token: h,
|
|
4192
|
-
passTokenInQueryParam:
|
|
4193
|
-
} =
|
|
4199
|
+
passTokenInQueryParam: p
|
|
4200
|
+
} = He(), f = Xo(null), [d, m] = Zo(), v = `${l}:${c}`, g = u !== void 0 ? u : p;
|
|
4194
4201
|
Fn(() => {
|
|
4195
4202
|
(() => {
|
|
4196
4203
|
try {
|
|
4197
|
-
let
|
|
4198
|
-
|
|
4199
|
-
} catch (
|
|
4200
|
-
console.error("[FolioEmbed] Failed to set up iframe URL:",
|
|
4204
|
+
let E = v;
|
|
4205
|
+
g && (E = `${v}?jwt=${encodeURIComponent(h)}`), m(E);
|
|
4206
|
+
} catch (E) {
|
|
4207
|
+
console.error("[FolioEmbed] Failed to set up iframe URL:", E), ne(
|
|
4201
4208
|
G("Failed to set up iframe URL", {
|
|
4202
4209
|
context: { host: l, port: c },
|
|
4203
|
-
originalError:
|
|
4210
|
+
originalError: E
|
|
4204
4211
|
})
|
|
4205
4212
|
);
|
|
4206
4213
|
}
|
|
4207
4214
|
})();
|
|
4208
|
-
}, [l, c, h,
|
|
4209
|
-
if (
|
|
4215
|
+
}, [l, c, h, v, g]), Fn(() => {
|
|
4216
|
+
if (g)
|
|
4210
4217
|
return;
|
|
4211
|
-
const
|
|
4212
|
-
var
|
|
4218
|
+
const P = (E) => {
|
|
4219
|
+
var x, j;
|
|
4213
4220
|
try {
|
|
4214
|
-
if (((
|
|
4221
|
+
if (((x = E.data) == null ? void 0 : x.type) !== "folio-request-token")
|
|
4215
4222
|
return;
|
|
4216
|
-
if (!
|
|
4223
|
+
if (!E.source || typeof E.source.postMessage != "function") {
|
|
4217
4224
|
console.warn("[FolioEmbed] Invalid event source for token request");
|
|
4218
4225
|
return;
|
|
4219
4226
|
}
|
|
4220
|
-
|
|
4227
|
+
E.source.postMessage(
|
|
4221
4228
|
{ type: Ar, token: h },
|
|
4222
4229
|
"*"
|
|
4223
4230
|
);
|
|
4224
4231
|
} catch (N) {
|
|
4225
4232
|
console.error("[FolioEmbed] Failed to handle iframe message:", N), ne(
|
|
4226
4233
|
G("Failed to handle iframe message", {
|
|
4227
|
-
context: { messageType: (
|
|
4234
|
+
context: { messageType: (j = E == null ? void 0 : E.data) == null ? void 0 : j.type },
|
|
4228
4235
|
originalError: N
|
|
4229
4236
|
})
|
|
4230
4237
|
);
|
|
4231
4238
|
}
|
|
4232
4239
|
};
|
|
4233
|
-
return window.addEventListener("message",
|
|
4234
|
-
window.removeEventListener("message",
|
|
4240
|
+
return window.addEventListener("message", P), () => {
|
|
4241
|
+
window.removeEventListener("message", P);
|
|
4235
4242
|
};
|
|
4236
|
-
}, [h,
|
|
4237
|
-
const
|
|
4238
|
-
var
|
|
4239
|
-
if (
|
|
4243
|
+
}, [h, g]);
|
|
4244
|
+
const R = () => {
|
|
4245
|
+
var E;
|
|
4246
|
+
if (g || !((E = f.current) != null && E.contentWindow))
|
|
4240
4247
|
return;
|
|
4241
|
-
const
|
|
4242
|
-
var
|
|
4243
|
-
if ((
|
|
4248
|
+
const P = (x = 1) => {
|
|
4249
|
+
var j;
|
|
4250
|
+
if ((j = f.current) != null && j.contentWindow)
|
|
4244
4251
|
try {
|
|
4245
|
-
|
|
4252
|
+
f.current.contentWindow.postMessage(
|
|
4246
4253
|
{ type: Ar, token: h },
|
|
4247
4254
|
"*"
|
|
4248
4255
|
);
|
|
4249
4256
|
} catch (N) {
|
|
4250
4257
|
console.error(
|
|
4251
|
-
`[FolioEmbed] Failed to post token message to iframe on load (attempt ${
|
|
4258
|
+
`[FolioEmbed] Failed to post token message to iframe on load (attempt ${x}):`,
|
|
4252
4259
|
N
|
|
4253
4260
|
), ne(
|
|
4254
4261
|
G("Failed to post token message to iframe", {
|
|
4255
4262
|
originalError: N,
|
|
4256
|
-
context: { attemptNumber:
|
|
4263
|
+
context: { attemptNumber: x }
|
|
4257
4264
|
})
|
|
4258
4265
|
);
|
|
4259
4266
|
}
|
|
4260
4267
|
};
|
|
4261
|
-
|
|
4268
|
+
P(1), setTimeout(() => P(2), 100), setTimeout(() => P(3), 500), setTimeout(() => P(4), 1e3);
|
|
4262
4269
|
};
|
|
4263
|
-
return
|
|
4270
|
+
return d ? /* @__PURE__ */ wt.jsx(
|
|
4264
4271
|
"div",
|
|
4265
4272
|
{
|
|
4266
4273
|
className: `folio-embed-container ${s}`,
|
|
@@ -4273,8 +4280,8 @@ function na({
|
|
|
4273
4280
|
children: /* @__PURE__ */ wt.jsx(
|
|
4274
4281
|
"iframe",
|
|
4275
4282
|
{
|
|
4276
|
-
ref:
|
|
4277
|
-
src:
|
|
4283
|
+
ref: f,
|
|
4284
|
+
src: d,
|
|
4278
4285
|
width: "100%",
|
|
4279
4286
|
height: "100%",
|
|
4280
4287
|
style: {
|
|
@@ -4285,7 +4292,7 @@ function na({
|
|
|
4285
4292
|
},
|
|
4286
4293
|
allow: r,
|
|
4287
4294
|
allowFullScreen: !0,
|
|
4288
|
-
onLoad:
|
|
4295
|
+
onLoad: R,
|
|
4289
4296
|
...i
|
|
4290
4297
|
}
|
|
4291
4298
|
)
|
|
@@ -4293,7 +4300,7 @@ function na({
|
|
|
4293
4300
|
) : null;
|
|
4294
4301
|
}
|
|
4295
4302
|
function sa() {
|
|
4296
|
-
const { client: t } =
|
|
4303
|
+
const { client: t } = He(), e = kr({
|
|
4297
4304
|
queryKey: ["folioProjects"],
|
|
4298
4305
|
queryFn: async () => {
|
|
4299
4306
|
if (!t)
|
|
@@ -4318,7 +4325,7 @@ function sa() {
|
|
|
4318
4325
|
};
|
|
4319
4326
|
}
|
|
4320
4327
|
function ia() {
|
|
4321
|
-
const { client: t } =
|
|
4328
|
+
const { client: t } = He(), e = dt(), r = kr({
|
|
4322
4329
|
queryKey: ["folioUserMetadata"],
|
|
4323
4330
|
queryFn: async () => {
|
|
4324
4331
|
if (!t)
|
|
@@ -4363,7 +4370,7 @@ function ia() {
|
|
|
4363
4370
|
};
|
|
4364
4371
|
}
|
|
4365
4372
|
function oa(t) {
|
|
4366
|
-
const { client: e } =
|
|
4373
|
+
const { client: e } = He(), r = kr({
|
|
4367
4374
|
queryKey: ["folioFiles", t],
|
|
4368
4375
|
queryFn: async () => {
|
|
4369
4376
|
if (!e)
|
|
@@ -4387,7 +4394,7 @@ function oa(t) {
|
|
|
4387
4394
|
};
|
|
4388
4395
|
}
|
|
4389
4396
|
function aa() {
|
|
4390
|
-
const { client: t } =
|
|
4397
|
+
const { client: t } = He(), e = dt(), r = Kt({
|
|
4391
4398
|
mutationFn: async (n) => {
|
|
4392
4399
|
if (!t)
|
|
4393
4400
|
throw de(
|
|
@@ -4414,7 +4421,7 @@ function aa() {
|
|
|
4414
4421
|
};
|
|
4415
4422
|
}
|
|
4416
4423
|
function ua(t) {
|
|
4417
|
-
const { client: e } =
|
|
4424
|
+
const { client: e } = He(), r = dt(), n = Kt({
|
|
4418
4425
|
mutationFn: async (s) => {
|
|
4419
4426
|
if (!e)
|
|
4420
4427
|
throw de(
|
|
@@ -4443,7 +4450,7 @@ function ua(t) {
|
|
|
4443
4450
|
};
|
|
4444
4451
|
}
|
|
4445
4452
|
function ca(t) {
|
|
4446
|
-
const { client: e } =
|
|
4453
|
+
const { client: e } = He(), r = dt(), n = Kt({
|
|
4447
4454
|
mutationFn: async (s) => {
|
|
4448
4455
|
if (!e)
|
|
4449
4456
|
throw de(
|