@shiftengineering/folio 0.0.79 → 0.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
var
|
|
1
|
+
import * as Et from "react";
|
|
2
|
+
import br, { createContext as Rt, useState as Ee, useEffect as Pt, useContext as Ot } from "react";
|
|
3
|
+
var Re = { exports: {} }, Y = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.min.js
|
|
@@ -10,19 +10,19 @@ var Pe = { exports: {} }, Y = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var e =
|
|
13
|
+
var er;
|
|
14
|
+
function Tt() {
|
|
15
|
+
if (er) return Y;
|
|
16
|
+
er = 1;
|
|
17
|
+
var e = br, r = Symbol.for("react.element"), t = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
18
|
function u(l, a, f) {
|
|
19
19
|
var m, p = {}, h = null, b = null;
|
|
20
20
|
f !== void 0 && (h = "" + f), a.key !== void 0 && (h = "" + a.key), a.ref !== void 0 && (b = a.ref);
|
|
21
21
|
for (m in a) n.call(a, m) && !s.hasOwnProperty(m) && (p[m] = a[m]);
|
|
22
22
|
if (l && l.defaultProps) for (m in a = l.defaultProps, a) p[m] === void 0 && (p[m] = a[m]);
|
|
23
|
-
return { $$typeof:
|
|
23
|
+
return { $$typeof: r, type: l, key: h, ref: b, props: p, _owner: i.current };
|
|
24
24
|
}
|
|
25
|
-
return Y.Fragment =
|
|
25
|
+
return Y.Fragment = t, Y.jsx = u, Y.jsxs = u, Y;
|
|
26
26
|
}
|
|
27
27
|
var H = {};
|
|
28
28
|
/**
|
|
@@ -34,14 +34,14 @@ var H = {};
|
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
var
|
|
38
|
-
function
|
|
39
|
-
return
|
|
40
|
-
var e =
|
|
37
|
+
var rr;
|
|
38
|
+
function St() {
|
|
39
|
+
return rr || (rr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
40
|
+
var e = br, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), x = Symbol.iterator, R = "@@iterator";
|
|
41
41
|
function L(o) {
|
|
42
42
|
if (o === null || typeof o != "object")
|
|
43
43
|
return null;
|
|
44
|
-
var c = x && o[x] || o[
|
|
44
|
+
var c = x && o[x] || o[R];
|
|
45
45
|
return typeof c == "function" ? c : null;
|
|
46
46
|
}
|
|
47
47
|
var j = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
@@ -49,29 +49,29 @@ function Or() {
|
|
|
49
49
|
{
|
|
50
50
|
for (var c = arguments.length, d = new Array(c > 1 ? c - 1 : 0), y = 1; y < c; y++)
|
|
51
51
|
d[y - 1] = arguments[y];
|
|
52
|
-
|
|
52
|
+
Vr("error", o, d);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Vr(o, c, d) {
|
|
56
56
|
{
|
|
57
57
|
var y = j.ReactDebugCurrentFrame, E = y.getStackAddendum();
|
|
58
58
|
E !== "" && (c += "%s", d = d.concat([E]));
|
|
59
|
-
var
|
|
59
|
+
var P = d.map(function(v) {
|
|
60
60
|
return String(v);
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
P.unshift("Warning: " + c), Function.prototype.apply.call(console[o], console, P);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
var
|
|
65
|
+
var qr = !1, zr = !1, Mr = !1, Wr = !1, Br = !1, ke;
|
|
66
66
|
ke = Symbol.for("react.module.reference");
|
|
67
|
-
function
|
|
68
|
-
return !!(typeof o == "string" || typeof o == "function" || o === n || o === s ||
|
|
67
|
+
function Kr(o) {
|
|
68
|
+
return !!(typeof o == "string" || typeof o == "function" || o === n || o === s || Br || o === i || o === f || o === m || Wr || o === b || qr || zr || Mr || typeof o == "object" && o !== null && (o.$$typeof === h || o.$$typeof === p || o.$$typeof === u || o.$$typeof === l || o.$$typeof === a || // This needs to include all possible module reference object
|
|
69
69
|
// types supported by any Flight configuration anywhere since
|
|
70
70
|
// we don't know which Flight build this will end up being used
|
|
71
71
|
// with.
|
|
72
72
|
o.$$typeof === ke || o.getModuleId !== void 0));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function Yr(o, c, d) {
|
|
75
75
|
var y = o.displayName;
|
|
76
76
|
if (y)
|
|
77
77
|
return y;
|
|
@@ -81,7 +81,7 @@ function Or() {
|
|
|
81
81
|
function Ce(o) {
|
|
82
82
|
return o.displayName || "Context";
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function A(o) {
|
|
85
85
|
if (o == null)
|
|
86
86
|
return null;
|
|
87
87
|
if (typeof o.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
|
|
@@ -91,7 +91,7 @@ function Or() {
|
|
|
91
91
|
switch (o) {
|
|
92
92
|
case n:
|
|
93
93
|
return "Fragment";
|
|
94
|
-
case
|
|
94
|
+
case t:
|
|
95
95
|
return "Portal";
|
|
96
96
|
case s:
|
|
97
97
|
return "Profiler";
|
|
@@ -111,14 +111,14 @@ function Or() {
|
|
|
111
111
|
var d = o;
|
|
112
112
|
return Ce(d._context) + ".Provider";
|
|
113
113
|
case a:
|
|
114
|
-
return
|
|
114
|
+
return Yr(o, o.render, "ForwardRef");
|
|
115
115
|
case p:
|
|
116
116
|
var y = o.displayName || null;
|
|
117
|
-
return y !== null ? y :
|
|
117
|
+
return y !== null ? y : A(o.type) || "Memo";
|
|
118
118
|
case h: {
|
|
119
|
-
var E = o,
|
|
119
|
+
var E = o, P = E._payload, v = E._init;
|
|
120
120
|
try {
|
|
121
|
-
return
|
|
121
|
+
return A(v(P));
|
|
122
122
|
} catch {
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
@@ -126,14 +126,14 @@ function Or() {
|
|
|
126
126
|
}
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
|
-
var
|
|
129
|
+
var N = Object.assign, B = 0, je, Ie, Ae, Fe, De, Ne, $e;
|
|
130
130
|
function Ue() {
|
|
131
131
|
}
|
|
132
132
|
Ue.__reactDisabledLog = !0;
|
|
133
|
-
function
|
|
133
|
+
function Hr() {
|
|
134
134
|
{
|
|
135
135
|
if (B === 0) {
|
|
136
|
-
je = console.log,
|
|
136
|
+
je = console.log, Ie = console.info, Ae = console.warn, Fe = console.error, De = console.group, Ne = console.groupCollapsed, $e = console.groupEnd;
|
|
137
137
|
var o = {
|
|
138
138
|
configurable: !0,
|
|
139
139
|
enumerable: !0,
|
|
@@ -153,7 +153,7 @@ function Or() {
|
|
|
153
153
|
B++;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function Gr() {
|
|
157
157
|
{
|
|
158
158
|
if (B--, B === 0) {
|
|
159
159
|
var o = {
|
|
@@ -162,26 +162,26 @@ function Or() {
|
|
|
162
162
|
writable: !0
|
|
163
163
|
};
|
|
164
164
|
Object.defineProperties(console, {
|
|
165
|
-
log:
|
|
165
|
+
log: N({}, o, {
|
|
166
166
|
value: je
|
|
167
167
|
}),
|
|
168
|
-
info:
|
|
169
|
-
value: Ae
|
|
170
|
-
}),
|
|
171
|
-
warn: $({}, o, {
|
|
168
|
+
info: N({}, o, {
|
|
172
169
|
value: Ie
|
|
173
170
|
}),
|
|
174
|
-
|
|
171
|
+
warn: N({}, o, {
|
|
172
|
+
value: Ae
|
|
173
|
+
}),
|
|
174
|
+
error: N({}, o, {
|
|
175
175
|
value: Fe
|
|
176
176
|
}),
|
|
177
|
-
group:
|
|
177
|
+
group: N({}, o, {
|
|
178
178
|
value: De
|
|
179
179
|
}),
|
|
180
|
-
groupCollapsed:
|
|
181
|
-
value: $e
|
|
182
|
-
}),
|
|
183
|
-
groupEnd: $({}, o, {
|
|
180
|
+
groupCollapsed: N({}, o, {
|
|
184
181
|
value: Ne
|
|
182
|
+
}),
|
|
183
|
+
groupEnd: N({}, o, {
|
|
184
|
+
value: $e
|
|
185
185
|
})
|
|
186
186
|
});
|
|
187
187
|
}
|
|
@@ -202,16 +202,16 @@ function Or() {
|
|
|
202
202
|
` + ce + o;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
var le = !1,
|
|
205
|
+
var le = !1, re;
|
|
206
206
|
{
|
|
207
|
-
var
|
|
208
|
-
|
|
207
|
+
var Xr = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
+
re = new Xr();
|
|
209
209
|
}
|
|
210
210
|
function Le(o, c) {
|
|
211
211
|
if (!o || le)
|
|
212
212
|
return "";
|
|
213
213
|
{
|
|
214
|
-
var d =
|
|
214
|
+
var d = re.get(o);
|
|
215
215
|
if (d !== void 0)
|
|
216
216
|
return d;
|
|
217
217
|
}
|
|
@@ -219,8 +219,8 @@ function Or() {
|
|
|
219
219
|
le = !0;
|
|
220
220
|
var E = Error.prepareStackTrace;
|
|
221
221
|
Error.prepareStackTrace = void 0;
|
|
222
|
-
var
|
|
223
|
-
|
|
222
|
+
var P;
|
|
223
|
+
P = ue.current, ue.current = null, Hr();
|
|
224
224
|
try {
|
|
225
225
|
if (c) {
|
|
226
226
|
var v = function() {
|
|
@@ -257,39 +257,39 @@ function Or() {
|
|
|
257
257
|
if (k && y && typeof k.stack == "string") {
|
|
258
258
|
for (var g = k.stack.split(`
|
|
259
259
|
`), _ = y.stack.split(`
|
|
260
|
-
`),
|
|
261
|
-
|
|
262
|
-
for (;
|
|
263
|
-
if (g[
|
|
264
|
-
if (
|
|
260
|
+
`), O = g.length - 1, T = _.length - 1; O >= 1 && T >= 0 && g[O] !== _[T]; )
|
|
261
|
+
T--;
|
|
262
|
+
for (; O >= 1 && T >= 0; O--, T--)
|
|
263
|
+
if (g[O] !== _[T]) {
|
|
264
|
+
if (O !== 1 || T !== 1)
|
|
265
265
|
do
|
|
266
|
-
if (
|
|
266
|
+
if (O--, T--, T < 0 || g[O] !== _[T]) {
|
|
267
267
|
var C = `
|
|
268
|
-
` + g[
|
|
269
|
-
return o.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", o.displayName)), typeof o == "function" &&
|
|
268
|
+
` + g[O].replace(" at new ", " at ");
|
|
269
|
+
return o.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", o.displayName)), typeof o == "function" && re.set(o, C), C;
|
|
270
270
|
}
|
|
271
|
-
while (
|
|
271
|
+
while (O >= 1 && T >= 0);
|
|
272
272
|
break;
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
} finally {
|
|
276
|
-
le = !1, ue.current =
|
|
276
|
+
le = !1, ue.current = P, Gr(), Error.prepareStackTrace = E;
|
|
277
277
|
}
|
|
278
|
-
var q = o ? o.displayName || o.name : "",
|
|
279
|
-
return typeof o == "function" &&
|
|
278
|
+
var q = o ? o.displayName || o.name : "", $ = q ? ee(q) : "";
|
|
279
|
+
return typeof o == "function" && re.set(o, $), $;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function Jr(o, c, d) {
|
|
282
282
|
return Le(o, !1);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function Zr(o) {
|
|
285
285
|
var c = o.prototype;
|
|
286
286
|
return !!(c && c.isReactComponent);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function te(o, c, d) {
|
|
289
289
|
if (o == null)
|
|
290
290
|
return "";
|
|
291
291
|
if (typeof o == "function")
|
|
292
|
-
return Le(o,
|
|
292
|
+
return Le(o, Zr(o));
|
|
293
293
|
if (typeof o == "string")
|
|
294
294
|
return ee(o);
|
|
295
295
|
switch (o) {
|
|
@@ -301,13 +301,13 @@ function Or() {
|
|
|
301
301
|
if (typeof o == "object")
|
|
302
302
|
switch (o.$$typeof) {
|
|
303
303
|
case a:
|
|
304
|
-
return
|
|
304
|
+
return Jr(o.render);
|
|
305
305
|
case p:
|
|
306
|
-
return
|
|
306
|
+
return te(o.type, c, d);
|
|
307
307
|
case h: {
|
|
308
|
-
var y = o, E = y._payload,
|
|
308
|
+
var y = o, E = y._payload, P = y._init;
|
|
309
309
|
try {
|
|
310
|
-
return
|
|
310
|
+
return te(P(E), c, d);
|
|
311
311
|
} catch {
|
|
312
312
|
}
|
|
313
313
|
}
|
|
@@ -317,16 +317,16 @@ function Or() {
|
|
|
317
317
|
var K = Object.prototype.hasOwnProperty, Ve = {}, qe = j.ReactDebugCurrentFrame;
|
|
318
318
|
function ne(o) {
|
|
319
319
|
if (o) {
|
|
320
|
-
var c = o._owner, d =
|
|
320
|
+
var c = o._owner, d = te(o.type, o._source, c ? c.type : null);
|
|
321
321
|
qe.setExtraStackFrame(d);
|
|
322
322
|
} else
|
|
323
323
|
qe.setExtraStackFrame(null);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function Qr(o, c, d, y, E) {
|
|
326
326
|
{
|
|
327
|
-
var
|
|
327
|
+
var P = Function.call.bind(K);
|
|
328
328
|
for (var v in o)
|
|
329
|
-
if (
|
|
329
|
+
if (P(o, v)) {
|
|
330
330
|
var g = void 0;
|
|
331
331
|
try {
|
|
332
332
|
if (typeof o[v] != "function") {
|
|
@@ -334,24 +334,24 @@ function Or() {
|
|
|
334
334
|
throw _.name = "Invariant Violation", _;
|
|
335
335
|
}
|
|
336
336
|
g = o[v](c, v, y, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
|
-
} catch (
|
|
338
|
-
g =
|
|
337
|
+
} catch (O) {
|
|
338
|
+
g = O;
|
|
339
339
|
}
|
|
340
340
|
g && !(g instanceof Error) && (ne(E), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", y || "React class", d, v, typeof g), ne(null)), g instanceof Error && !(g.message in Ve) && (Ve[g.message] = !0, ne(E), S("Failed %s type: %s", d, g.message), ne(null));
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
var
|
|
344
|
+
var et = Array.isArray;
|
|
345
345
|
function fe(o) {
|
|
346
|
-
return
|
|
346
|
+
return et(o);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function rt(o) {
|
|
349
349
|
{
|
|
350
350
|
var c = typeof Symbol == "function" && Symbol.toStringTag, d = c && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
351
351
|
return d;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function tt(o) {
|
|
355
355
|
try {
|
|
356
356
|
return ze(o), !1;
|
|
357
357
|
} catch {
|
|
@@ -362,16 +362,16 @@ function Or() {
|
|
|
362
362
|
return "" + o;
|
|
363
363
|
}
|
|
364
364
|
function Me(o) {
|
|
365
|
-
if (
|
|
366
|
-
return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
365
|
+
if (tt(o))
|
|
366
|
+
return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rt(o)), ze(o);
|
|
367
367
|
}
|
|
368
|
-
var We = j.ReactCurrentOwner,
|
|
368
|
+
var We = j.ReactCurrentOwner, nt = {
|
|
369
369
|
key: !0,
|
|
370
370
|
ref: !0,
|
|
371
371
|
__self: !0,
|
|
372
372
|
__source: !0
|
|
373
373
|
}, Be, Ke;
|
|
374
|
-
function
|
|
374
|
+
function ot(o) {
|
|
375
375
|
if (K.call(o, "ref")) {
|
|
376
376
|
var c = Object.getOwnPropertyDescriptor(o, "ref").get;
|
|
377
377
|
if (c && c.isReactWarning)
|
|
@@ -379,7 +379,7 @@ function Or() {
|
|
|
379
379
|
}
|
|
380
380
|
return o.ref !== void 0;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function it(o) {
|
|
383
383
|
if (K.call(o, "key")) {
|
|
384
384
|
var c = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
385
385
|
if (c && c.isReactWarning)
|
|
@@ -387,10 +387,10 @@ function Or() {
|
|
|
387
387
|
}
|
|
388
388
|
return o.key !== void 0;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function st(o, c) {
|
|
391
391
|
typeof o.ref == "string" && We.current;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function at(o, c) {
|
|
394
394
|
{
|
|
395
395
|
var d = function() {
|
|
396
396
|
Be || (Be = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
|
|
@@ -401,7 +401,7 @@ function Or() {
|
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function ut(o, c) {
|
|
405
405
|
{
|
|
406
406
|
var d = function() {
|
|
407
407
|
Ke || (Ke = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
|
|
@@ -412,17 +412,17 @@ function Or() {
|
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var
|
|
415
|
+
var ct = function(o, c, d, y, E, P, v) {
|
|
416
416
|
var g = {
|
|
417
417
|
// This tag allows us to uniquely identify this as a React Element
|
|
418
|
-
$$typeof:
|
|
418
|
+
$$typeof: r,
|
|
419
419
|
// Built-in properties that belong on the element
|
|
420
420
|
type: o,
|
|
421
421
|
key: c,
|
|
422
422
|
ref: d,
|
|
423
423
|
props: v,
|
|
424
424
|
// Record the component responsible for creating this element.
|
|
425
|
-
_owner:
|
|
425
|
+
_owner: P
|
|
426
426
|
};
|
|
427
427
|
return g._store = {}, Object.defineProperty(g._store, "validated", {
|
|
428
428
|
configurable: !1,
|
|
@@ -441,28 +441,28 @@ function Or() {
|
|
|
441
441
|
value: E
|
|
442
442
|
}), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
|
|
443
443
|
};
|
|
444
|
-
function
|
|
444
|
+
function lt(o, c, d, y, E) {
|
|
445
445
|
{
|
|
446
|
-
var
|
|
447
|
-
d !== void 0 && (Me(d), g = "" + d),
|
|
448
|
-
for (
|
|
449
|
-
K.call(c,
|
|
446
|
+
var P, v = {}, g = null, _ = null;
|
|
447
|
+
d !== void 0 && (Me(d), g = "" + d), it(c) && (Me(c.key), g = "" + c.key), ot(c) && (_ = c.ref, st(c, E));
|
|
448
|
+
for (P in c)
|
|
449
|
+
K.call(c, P) && !nt.hasOwnProperty(P) && (v[P] = c[P]);
|
|
450
450
|
if (o && o.defaultProps) {
|
|
451
|
-
var
|
|
452
|
-
for (
|
|
453
|
-
v[
|
|
451
|
+
var O = o.defaultProps;
|
|
452
|
+
for (P in O)
|
|
453
|
+
v[P] === void 0 && (v[P] = O[P]);
|
|
454
454
|
}
|
|
455
455
|
if (g || _) {
|
|
456
|
-
var
|
|
457
|
-
g &&
|
|
456
|
+
var T = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
|
|
457
|
+
g && at(v, T), _ && ut(v, T);
|
|
458
458
|
}
|
|
459
|
-
return
|
|
459
|
+
return ct(o, g, _, E, y, We.current, v);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
var de = j.ReactCurrentOwner, Ye = j.ReactDebugCurrentFrame;
|
|
463
463
|
function V(o) {
|
|
464
464
|
if (o) {
|
|
465
|
-
var c = o._owner, d =
|
|
465
|
+
var c = o._owner, d = te(o.type, o._source, c ? c.type : null);
|
|
466
466
|
Ye.setExtraStackFrame(d);
|
|
467
467
|
} else
|
|
468
468
|
Ye.setExtraStackFrame(null);
|
|
@@ -470,12 +470,12 @@ function Or() {
|
|
|
470
470
|
var me;
|
|
471
471
|
me = !1;
|
|
472
472
|
function pe(o) {
|
|
473
|
-
return typeof o == "object" && o !== null && o.$$typeof ===
|
|
473
|
+
return typeof o == "object" && o !== null && o.$$typeof === r;
|
|
474
474
|
}
|
|
475
475
|
function He() {
|
|
476
476
|
{
|
|
477
477
|
if (de.current) {
|
|
478
|
-
var o =
|
|
478
|
+
var o = A(de.current.type);
|
|
479
479
|
if (o)
|
|
480
480
|
return `
|
|
481
481
|
|
|
@@ -484,11 +484,11 @@ Check the render method of \`` + o + "`.";
|
|
|
484
484
|
return "";
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function ft(o) {
|
|
488
488
|
return "";
|
|
489
489
|
}
|
|
490
490
|
var Ge = {};
|
|
491
|
-
function
|
|
491
|
+
function dt(o) {
|
|
492
492
|
{
|
|
493
493
|
var c = He();
|
|
494
494
|
if (!c) {
|
|
@@ -505,12 +505,12 @@ Check the top-level render call using <` + d + ">.");
|
|
|
505
505
|
if (!o._store || o._store.validated || o.key != null)
|
|
506
506
|
return;
|
|
507
507
|
o._store.validated = !0;
|
|
508
|
-
var d =
|
|
508
|
+
var d = dt(c);
|
|
509
509
|
if (Ge[d])
|
|
510
510
|
return;
|
|
511
511
|
Ge[d] = !0;
|
|
512
512
|
var y = "";
|
|
513
|
-
o && o._owner && o._owner !== de.current && (y = " It was passed a child from " +
|
|
513
|
+
o && o._owner && o._owner !== de.current && (y = " It was passed a child from " + A(o._owner.type) + "."), V(o), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, y), V(null);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
function Je(o, c) {
|
|
@@ -527,12 +527,12 @@ Check the top-level render call using <` + d + ">.");
|
|
|
527
527
|
else if (o) {
|
|
528
528
|
var E = L(o);
|
|
529
529
|
if (typeof E == "function" && E !== o.entries)
|
|
530
|
-
for (var
|
|
530
|
+
for (var P = E.call(o), v; !(v = P.next()).done; )
|
|
531
531
|
pe(v.value) && Xe(v.value, c);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function mt(o) {
|
|
536
536
|
{
|
|
537
537
|
var c = o.type;
|
|
538
538
|
if (c == null || typeof c == "string")
|
|
@@ -547,17 +547,17 @@ Check the top-level render call using <` + d + ">.");
|
|
|
547
547
|
else
|
|
548
548
|
return;
|
|
549
549
|
if (d) {
|
|
550
|
-
var y =
|
|
551
|
-
|
|
550
|
+
var y = A(c);
|
|
551
|
+
Qr(d, o.props, "prop", y, o);
|
|
552
552
|
} else if (c.PropTypes !== void 0 && !me) {
|
|
553
553
|
me = !0;
|
|
554
|
-
var E =
|
|
554
|
+
var E = A(c);
|
|
555
555
|
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
|
|
556
556
|
}
|
|
557
557
|
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function pt(o) {
|
|
561
561
|
{
|
|
562
562
|
for (var c = Object.keys(o.props), d = 0; d < c.length; d++) {
|
|
563
563
|
var y = c[d];
|
|
@@ -570,20 +570,20 @@ Check the top-level render call using <` + d + ">.");
|
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
var Ze = {};
|
|
573
|
-
function Qe(o, c, d, y, E,
|
|
573
|
+
function Qe(o, c, d, y, E, P) {
|
|
574
574
|
{
|
|
575
|
-
var v =
|
|
575
|
+
var v = Kr(o);
|
|
576
576
|
if (!v) {
|
|
577
577
|
var g = "";
|
|
578
578
|
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (g += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
-
var _ =
|
|
579
|
+
var _ = ft();
|
|
580
580
|
_ ? g += _ : g += He();
|
|
581
|
-
var
|
|
582
|
-
o === null ?
|
|
581
|
+
var O;
|
|
582
|
+
o === null ? O = "null" : fe(o) ? O = "array" : o !== void 0 && o.$$typeof === r ? (O = "<" + (A(o.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : O = typeof o, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, g);
|
|
583
583
|
}
|
|
584
|
-
var
|
|
585
|
-
if (
|
|
586
|
-
return
|
|
584
|
+
var T = lt(o, c, d, E, P);
|
|
585
|
+
if (T == null)
|
|
586
|
+
return T;
|
|
587
587
|
if (v) {
|
|
588
588
|
var C = c.children;
|
|
589
589
|
if (C !== void 0)
|
|
@@ -598,47 +598,47 @@ Check the top-level render call using <` + d + ">.");
|
|
|
598
598
|
Je(C, o);
|
|
599
599
|
}
|
|
600
600
|
if (K.call(c, "key")) {
|
|
601
|
-
var
|
|
602
|
-
return
|
|
601
|
+
var $ = A(o), k = Object.keys(c).filter(function(vt) {
|
|
602
|
+
return vt !== "key";
|
|
603
603
|
}), ye = k.length > 0 ? "{key: someKey, " + k.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
-
if (!Ze[
|
|
605
|
-
var
|
|
604
|
+
if (!Ze[$ + ye]) {
|
|
605
|
+
var wt = k.length > 0 ? "{" + k.join(": ..., ") + ": ...}" : "{}";
|
|
606
606
|
S(`A props object containing a "key" prop is being spread into JSX:
|
|
607
607
|
let props = %s;
|
|
608
608
|
<%s {...props} />
|
|
609
609
|
React keys must be passed directly to JSX without using spread:
|
|
610
610
|
let props = %s;
|
|
611
|
-
<%s key={someKey} {...props} />`, ye,
|
|
611
|
+
<%s key={someKey} {...props} />`, ye, $, wt, $), Ze[$ + ye] = !0;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
return o === n ?
|
|
614
|
+
return o === n ? pt(T) : mt(T), T;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function yt(o, c, d) {
|
|
618
618
|
return Qe(o, c, d, !0);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function ht(o, c, d) {
|
|
621
621
|
return Qe(o, c, d, !1);
|
|
622
622
|
}
|
|
623
|
-
var
|
|
624
|
-
H.Fragment = n, H.jsx =
|
|
623
|
+
var gt = ht, bt = yt;
|
|
624
|
+
H.Fragment = n, H.jsx = gt, H.jsxs = bt;
|
|
625
625
|
}()), H;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ?
|
|
628
|
-
var
|
|
629
|
-
const he = 4e3 * 1024 * 1024,
|
|
627
|
+
process.env.NODE_ENV === "production" ? Re.exports = Tt() : Re.exports = St();
|
|
628
|
+
var Pe = Re.exports, wr = /* @__PURE__ */ ((e) => (e.NOT_CHUNKED = "NOT_CHUNKED", e.PROCESSING = "PROCESSING", e.CHUNKED = "CHUNKED", e.ERROR_CHUNKING = "ERROR_CHUNKING", e))(wr || {}), _e = /* @__PURE__ */ ((e) => (e.PDF = "application/pdf", e.TXT = "text/plain", e.CSV = "text/csv", e))(_e || {});
|
|
629
|
+
const he = 4e3 * 1024 * 1024, xt = [
|
|
630
630
|
".txt",
|
|
631
631
|
".json",
|
|
632
632
|
".py",
|
|
633
633
|
".ts",
|
|
634
634
|
".tsx"
|
|
635
|
-
],
|
|
635
|
+
], _t = {
|
|
636
636
|
"application/pdf": {
|
|
637
637
|
extensions: [".pdf"],
|
|
638
638
|
maxSize: he
|
|
639
639
|
},
|
|
640
640
|
"text/plain": {
|
|
641
|
-
extensions:
|
|
641
|
+
extensions: xt,
|
|
642
642
|
maxSize: he
|
|
643
643
|
},
|
|
644
644
|
"text/csv": {
|
|
@@ -646,17 +646,17 @@ const he = 4e3 * 1024 * 1024, Sr = [
|
|
|
646
646
|
maxSize: he
|
|
647
647
|
}
|
|
648
648
|
};
|
|
649
|
-
Object.entries(
|
|
650
|
-
(e, [
|
|
649
|
+
Object.entries(_t).reduce(
|
|
650
|
+
(e, [r, t]) => ({
|
|
651
651
|
...e,
|
|
652
|
-
[
|
|
652
|
+
[r]: t.extensions
|
|
653
653
|
}),
|
|
654
654
|
{}
|
|
655
655
|
);
|
|
656
656
|
new Set(Object.values(_e));
|
|
657
657
|
function W(e) {
|
|
658
|
-
const
|
|
659
|
-
subscribe(
|
|
658
|
+
const r = {
|
|
659
|
+
subscribe(t) {
|
|
660
660
|
let n = null, i = !1, s = !1, u = !1;
|
|
661
661
|
function l() {
|
|
662
662
|
if (n === null) {
|
|
@@ -668,38 +668,38 @@ function W(e) {
|
|
|
668
668
|
return n = e({
|
|
669
669
|
next(a) {
|
|
670
670
|
var f;
|
|
671
|
-
i || (f =
|
|
671
|
+
i || (f = t.next) == null || f.call(t, a);
|
|
672
672
|
},
|
|
673
673
|
error(a) {
|
|
674
674
|
var f;
|
|
675
|
-
i || (i = !0, (f =
|
|
675
|
+
i || (i = !0, (f = t.error) == null || f.call(t, a), l());
|
|
676
676
|
},
|
|
677
677
|
complete() {
|
|
678
678
|
var a;
|
|
679
|
-
i || (i = !0, (a =
|
|
679
|
+
i || (i = !0, (a = t.complete) == null || a.call(t), l());
|
|
680
680
|
}
|
|
681
681
|
}), u && l(), {
|
|
682
682
|
unsubscribe: l
|
|
683
683
|
};
|
|
684
684
|
},
|
|
685
|
-
pipe(...
|
|
686
|
-
return
|
|
685
|
+
pipe(...t) {
|
|
686
|
+
return t.reduce(kt, r);
|
|
687
687
|
}
|
|
688
688
|
};
|
|
689
|
-
return
|
|
689
|
+
return r;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
692
|
-
return
|
|
691
|
+
function kt(e, r) {
|
|
692
|
+
return r(e);
|
|
693
693
|
}
|
|
694
|
-
function
|
|
695
|
-
const
|
|
694
|
+
function Ct(e) {
|
|
695
|
+
const r = new AbortController();
|
|
696
696
|
return new Promise((n, i) => {
|
|
697
697
|
let s = !1;
|
|
698
698
|
function u() {
|
|
699
699
|
s || (s = !0, l.unsubscribe());
|
|
700
700
|
}
|
|
701
|
-
|
|
702
|
-
i(
|
|
701
|
+
r.signal.addEventListener("abort", () => {
|
|
702
|
+
i(r.signal.reason);
|
|
703
703
|
});
|
|
704
704
|
const l = e.subscribe({
|
|
705
705
|
next(a) {
|
|
@@ -709,17 +709,17 @@ function kr(e) {
|
|
|
709
709
|
i(a);
|
|
710
710
|
},
|
|
711
711
|
complete() {
|
|
712
|
-
|
|
712
|
+
r.abort(), u();
|
|
713
713
|
}
|
|
714
714
|
});
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
|
-
function
|
|
718
|
-
return (
|
|
719
|
-
let
|
|
717
|
+
function jt(e) {
|
|
718
|
+
return (r) => {
|
|
719
|
+
let t = 0, n = null;
|
|
720
720
|
const i = [];
|
|
721
721
|
function s() {
|
|
722
|
-
n || (n =
|
|
722
|
+
n || (n = r.subscribe({
|
|
723
723
|
next(l) {
|
|
724
724
|
var a;
|
|
725
725
|
for (const f of i)
|
|
@@ -738,114 +738,114 @@ function Cr(e) {
|
|
|
738
738
|
}));
|
|
739
739
|
}
|
|
740
740
|
function u() {
|
|
741
|
-
if (
|
|
741
|
+
if (t === 0 && n) {
|
|
742
742
|
const l = n;
|
|
743
743
|
n = null, l.unsubscribe();
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
|
-
return W((l) => (
|
|
746
|
+
return W((l) => (t++, i.push(l), s(), {
|
|
747
747
|
unsubscribe() {
|
|
748
|
-
|
|
748
|
+
t--, u();
|
|
749
749
|
const a = i.findIndex((f) => f === l);
|
|
750
750
|
a > -1 && i.splice(a, 1);
|
|
751
751
|
}
|
|
752
752
|
}));
|
|
753
753
|
};
|
|
754
754
|
}
|
|
755
|
-
function
|
|
756
|
-
return (
|
|
755
|
+
function It(e) {
|
|
756
|
+
return (r) => W((t) => r.subscribe({
|
|
757
757
|
next(n) {
|
|
758
758
|
var i;
|
|
759
|
-
(i = e.next) == null || i.call(e, n),
|
|
759
|
+
(i = e.next) == null || i.call(e, n), t.next(n);
|
|
760
760
|
},
|
|
761
761
|
error(n) {
|
|
762
762
|
var i;
|
|
763
|
-
(i = e.error) == null || i.call(e, n),
|
|
763
|
+
(i = e.error) == null || i.call(e, n), t.error(n);
|
|
764
764
|
},
|
|
765
765
|
complete() {
|
|
766
766
|
var n;
|
|
767
|
-
(n = e.complete) == null || n.call(e),
|
|
767
|
+
(n = e.complete) == null || n.call(e), t.complete();
|
|
768
768
|
}
|
|
769
769
|
}));
|
|
770
770
|
}
|
|
771
|
-
function
|
|
772
|
-
let
|
|
773
|
-
const
|
|
774
|
-
|
|
771
|
+
function At(e) {
|
|
772
|
+
let r = e;
|
|
773
|
+
const t = [], n = (u) => {
|
|
774
|
+
r !== void 0 && u.next(r), t.push(u);
|
|
775
775
|
}, i = (u) => {
|
|
776
|
-
|
|
776
|
+
t.splice(t.indexOf(u), 1);
|
|
777
777
|
}, s = W((u) => (n(u), () => {
|
|
778
778
|
i(u);
|
|
779
779
|
}));
|
|
780
780
|
return s.next = (u) => {
|
|
781
|
-
if (
|
|
782
|
-
|
|
783
|
-
for (const l of
|
|
781
|
+
if (r !== u) {
|
|
782
|
+
r = u;
|
|
783
|
+
for (const l of t)
|
|
784
784
|
l.next(u);
|
|
785
785
|
}
|
|
786
|
-
}, s.get = () =>
|
|
786
|
+
}, s.get = () => r, s;
|
|
787
787
|
}
|
|
788
|
-
function
|
|
789
|
-
return W((
|
|
790
|
-
function
|
|
788
|
+
function Ft(e) {
|
|
789
|
+
return W((r) => {
|
|
790
|
+
function t(i = 0, s = e.op) {
|
|
791
791
|
const u = e.links[i];
|
|
792
792
|
if (!u)
|
|
793
793
|
throw new Error("No more links to execute - did you forget to add an ending link?");
|
|
794
794
|
return u({
|
|
795
795
|
op: s,
|
|
796
796
|
next(a) {
|
|
797
|
-
return
|
|
797
|
+
return t(i + 1, a);
|
|
798
798
|
}
|
|
799
799
|
});
|
|
800
800
|
}
|
|
801
|
-
return
|
|
801
|
+
return t().subscribe(r);
|
|
802
802
|
});
|
|
803
803
|
}
|
|
804
|
-
const
|
|
805
|
-
},
|
|
804
|
+
const vr = () => {
|
|
805
|
+
}, tr = (e) => {
|
|
806
806
|
Object.freeze && Object.freeze(e);
|
|
807
807
|
};
|
|
808
|
-
function
|
|
808
|
+
function Er(e, r, t) {
|
|
809
809
|
var n, i;
|
|
810
|
-
const s =
|
|
811
|
-
return (n =
|
|
810
|
+
const s = r.join(".");
|
|
811
|
+
return (n = t)[i = s] ?? (n[i] = new Proxy(vr, {
|
|
812
812
|
get(u, l) {
|
|
813
813
|
if (!(typeof l != "string" || l === "then"))
|
|
814
|
-
return
|
|
815
|
-
...
|
|
814
|
+
return Er(e, [
|
|
815
|
+
...r,
|
|
816
816
|
l
|
|
817
|
-
],
|
|
817
|
+
], t);
|
|
818
818
|
},
|
|
819
819
|
apply(u, l, a) {
|
|
820
|
-
const f =
|
|
820
|
+
const f = r[r.length - 1];
|
|
821
821
|
let m = {
|
|
822
822
|
args: a,
|
|
823
|
-
path:
|
|
823
|
+
path: r
|
|
824
824
|
};
|
|
825
825
|
return f === "call" ? m = {
|
|
826
826
|
args: a.length >= 2 ? [
|
|
827
827
|
a[1]
|
|
828
828
|
] : [],
|
|
829
|
-
path:
|
|
829
|
+
path: r.slice(0, -1)
|
|
830
830
|
} : f === "apply" && (m = {
|
|
831
831
|
args: a.length >= 2 ? a[1] : [],
|
|
832
|
-
path:
|
|
833
|
-
}),
|
|
832
|
+
path: r.slice(0, -1)
|
|
833
|
+
}), tr(m.args), tr(m.path), e(m);
|
|
834
834
|
}
|
|
835
|
-
})),
|
|
835
|
+
})), t[s];
|
|
836
836
|
}
|
|
837
|
-
const
|
|
838
|
-
get(
|
|
839
|
-
if (
|
|
840
|
-
return e(
|
|
837
|
+
const Dt = (e) => Er(e, [], /* @__PURE__ */ Object.create(null)), Nt = (e) => new Proxy(vr, {
|
|
838
|
+
get(r, t) {
|
|
839
|
+
if (t !== "then")
|
|
840
|
+
return e(t);
|
|
841
841
|
}
|
|
842
842
|
});
|
|
843
843
|
function X(e) {
|
|
844
844
|
return !!e && !Array.isArray(e) && typeof e == "object";
|
|
845
845
|
}
|
|
846
|
-
function $
|
|
846
|
+
function $t(e, r) {
|
|
847
847
|
if ("error" in e) {
|
|
848
|
-
const n =
|
|
848
|
+
const n = r.deserialize(e.error);
|
|
849
849
|
return {
|
|
850
850
|
ok: !1,
|
|
851
851
|
error: {
|
|
@@ -860,7 +860,7 @@ function $r(e, t) {
|
|
|
860
860
|
...e.result,
|
|
861
861
|
...(!e.result.type || e.result.type === "data") && {
|
|
862
862
|
type: "data",
|
|
863
|
-
data:
|
|
863
|
+
data: r.deserialize(e.result.data)
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
866
|
};
|
|
@@ -870,64 +870,64 @@ class ge extends Error {
|
|
|
870
870
|
super("Unable to transform response from server");
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
|
-
function
|
|
874
|
-
let
|
|
873
|
+
function Ut(e, r) {
|
|
874
|
+
let t;
|
|
875
875
|
try {
|
|
876
|
-
|
|
876
|
+
t = $t(e, r);
|
|
877
877
|
} catch {
|
|
878
878
|
throw new ge();
|
|
879
879
|
}
|
|
880
|
-
if (!
|
|
880
|
+
if (!t.ok && (!X(t.error.error) || typeof t.error.error.code != "number"))
|
|
881
881
|
throw new ge();
|
|
882
|
-
if (
|
|
882
|
+
if (t.ok && !X(t.result))
|
|
883
883
|
throw new ge();
|
|
884
|
-
return
|
|
884
|
+
return t;
|
|
885
885
|
}
|
|
886
|
-
var
|
|
887
|
-
(
|
|
888
|
-
(
|
|
889
|
-
var
|
|
886
|
+
var nr, or;
|
|
887
|
+
(nr = Symbol).dispose ?? (nr.dispose = Symbol());
|
|
888
|
+
(or = Symbol).asyncDispose ?? (or.asyncDispose = Symbol());
|
|
889
|
+
var dr, mr, pr, yr, hr, gr;
|
|
890
890
|
typeof window > "u" || "Deno" in window || // eslint-disable-next-line @typescript-eslint/dot-notation
|
|
891
|
-
((
|
|
892
|
-
function oe(e,
|
|
893
|
-
return
|
|
894
|
-
value:
|
|
891
|
+
((mr = (dr = globalThis.process) == null ? void 0 : dr.env) == null ? void 0 : mr.NODE_ENV) === "test" || (yr = (pr = globalThis.process) == null ? void 0 : pr.env) != null && yr.JEST_WORKER_ID || (gr = (hr = globalThis.process) == null ? void 0 : hr.env) != null && gr.VITEST_WORKER_ID;
|
|
892
|
+
function oe(e, r, t) {
|
|
893
|
+
return r in e ? Object.defineProperty(e, r, {
|
|
894
|
+
value: t,
|
|
895
895
|
enumerable: !0,
|
|
896
896
|
configurable: !0,
|
|
897
897
|
writable: !0
|
|
898
|
-
}) : e[
|
|
898
|
+
}) : e[r] = t, e;
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function Lt(e) {
|
|
901
901
|
return e instanceof F || /**
|
|
902
902
|
* @deprecated
|
|
903
903
|
* Delete in next major
|
|
904
904
|
*/
|
|
905
905
|
e instanceof Error && e.name === "TRPCClientError";
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function Vt(e) {
|
|
908
908
|
return X(e) && X(e.error) && typeof e.error.code == "number" && typeof e.error.message == "string";
|
|
909
909
|
}
|
|
910
|
-
function
|
|
911
|
-
return typeof e == "string" ? e : X(e) && typeof e.message == "string" ? e.message :
|
|
910
|
+
function qt(e, r) {
|
|
911
|
+
return typeof e == "string" ? e : X(e) && typeof e.message == "string" ? e.message : r;
|
|
912
912
|
}
|
|
913
913
|
class F extends Error {
|
|
914
|
-
static from(
|
|
915
|
-
const n =
|
|
916
|
-
return
|
|
914
|
+
static from(r, t = {}) {
|
|
915
|
+
const n = r;
|
|
916
|
+
return Lt(n) ? (t.meta && (n.meta = {
|
|
917
917
|
...n.meta,
|
|
918
|
-
...
|
|
919
|
-
}), n) :
|
|
920
|
-
...
|
|
918
|
+
...t.meta
|
|
919
|
+
}), n) : Vt(n) ? new F(n.error.message, {
|
|
920
|
+
...t,
|
|
921
921
|
result: n
|
|
922
|
-
}) : new F(
|
|
923
|
-
...
|
|
922
|
+
}) : new F(qt(n, "Unknown error"), {
|
|
923
|
+
...t,
|
|
924
924
|
cause: n
|
|
925
925
|
});
|
|
926
926
|
}
|
|
927
|
-
constructor(
|
|
927
|
+
constructor(r, t) {
|
|
928
928
|
var i, s;
|
|
929
|
-
const n =
|
|
930
|
-
super(
|
|
929
|
+
const n = t == null ? void 0 : t.cause;
|
|
930
|
+
super(r, {
|
|
931
931
|
cause: n
|
|
932
932
|
}), // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
933
933
|
// @ts-ignore override doesn't work in all environments due to "This member cannot have an 'override' modifier because it is not declared in the base class 'Error'"
|
|
@@ -935,59 +935,59 @@ class F extends Error {
|
|
|
935
935
|
* Additional meta data about the error
|
|
936
936
|
* In the case of HTTP-errors, we'll have `response` and potentially `responseJSON` here
|
|
937
937
|
*/
|
|
938
|
-
oe(this, "meta", void 0), this.meta =
|
|
938
|
+
oe(this, "meta", void 0), this.meta = t == null ? void 0 : t.meta, this.cause = n, this.shape = (i = t == null ? void 0 : t.result) == null ? void 0 : i.error, this.data = (s = t == null ? void 0 : t.result) == null ? void 0 : s.error.data, this.name = "TRPCClientError", Object.setPrototypeOf(this, F.prototype);
|
|
939
939
|
}
|
|
940
940
|
}
|
|
941
|
-
function be(e,
|
|
942
|
-
return
|
|
943
|
-
value:
|
|
941
|
+
function be(e, r, t) {
|
|
942
|
+
return r in e ? Object.defineProperty(e, r, {
|
|
943
|
+
value: t,
|
|
944
944
|
enumerable: !0,
|
|
945
945
|
configurable: !0,
|
|
946
946
|
writable: !0
|
|
947
|
-
}) : e[
|
|
947
|
+
}) : e[r] = t, e;
|
|
948
948
|
}
|
|
949
|
-
class
|
|
950
|
-
$request(
|
|
951
|
-
return
|
|
949
|
+
class zt {
|
|
950
|
+
$request(r) {
|
|
951
|
+
return Ft({
|
|
952
952
|
links: this.links,
|
|
953
953
|
op: {
|
|
954
|
-
...
|
|
955
|
-
context:
|
|
954
|
+
...r,
|
|
955
|
+
context: r.context ?? {},
|
|
956
956
|
id: ++this.requestId
|
|
957
957
|
}
|
|
958
|
-
}).pipe(
|
|
958
|
+
}).pipe(jt());
|
|
959
959
|
}
|
|
960
|
-
async requestAsPromise(
|
|
960
|
+
async requestAsPromise(r) {
|
|
961
961
|
try {
|
|
962
|
-
const
|
|
963
|
-
return (await
|
|
964
|
-
} catch (
|
|
965
|
-
throw F.from(
|
|
962
|
+
const t = this.$request(r);
|
|
963
|
+
return (await Ct(t)).result.data;
|
|
964
|
+
} catch (t) {
|
|
965
|
+
throw F.from(t);
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
query(
|
|
968
|
+
query(r, t, n) {
|
|
969
969
|
return this.requestAsPromise({
|
|
970
970
|
type: "query",
|
|
971
|
-
path:
|
|
972
|
-
input:
|
|
971
|
+
path: r,
|
|
972
|
+
input: t,
|
|
973
973
|
context: n == null ? void 0 : n.context,
|
|
974
974
|
signal: n == null ? void 0 : n.signal
|
|
975
975
|
});
|
|
976
976
|
}
|
|
977
|
-
mutation(
|
|
977
|
+
mutation(r, t, n) {
|
|
978
978
|
return this.requestAsPromise({
|
|
979
979
|
type: "mutation",
|
|
980
|
-
path:
|
|
981
|
-
input:
|
|
980
|
+
path: r,
|
|
981
|
+
input: t,
|
|
982
982
|
context: n == null ? void 0 : n.context,
|
|
983
983
|
signal: n == null ? void 0 : n.signal
|
|
984
984
|
});
|
|
985
985
|
}
|
|
986
|
-
subscription(
|
|
986
|
+
subscription(r, t, n) {
|
|
987
987
|
return this.$request({
|
|
988
988
|
type: "subscription",
|
|
989
|
-
path:
|
|
990
|
-
input:
|
|
989
|
+
path: r,
|
|
990
|
+
input: t,
|
|
991
991
|
context: n.context,
|
|
992
992
|
signal: n.signal
|
|
993
993
|
}).subscribe({
|
|
@@ -1025,45 +1025,45 @@ class qr {
|
|
|
1025
1025
|
}
|
|
1026
1026
|
});
|
|
1027
1027
|
}
|
|
1028
|
-
constructor(
|
|
1029
|
-
be(this, "links", void 0), be(this, "runtime", void 0), be(this, "requestId", void 0), this.requestId = 0, this.runtime = {}, this.links =
|
|
1028
|
+
constructor(r) {
|
|
1029
|
+
be(this, "links", void 0), be(this, "runtime", void 0), be(this, "requestId", void 0), this.requestId = 0, this.runtime = {}, this.links = r.links.map((t) => t(this.runtime));
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
|
-
const
|
|
1032
|
+
const Mt = Symbol.for("trpc_untypedClient"), Wt = {
|
|
1033
1033
|
query: "query",
|
|
1034
1034
|
mutate: "mutation",
|
|
1035
1035
|
subscribe: "subscription"
|
|
1036
|
-
},
|
|
1037
|
-
function
|
|
1038
|
-
const
|
|
1036
|
+
}, Bt = (e) => Wt[e];
|
|
1037
|
+
function Kt(e) {
|
|
1038
|
+
const r = Dt(({ path: t, args: n }) => {
|
|
1039
1039
|
const i = [
|
|
1040
|
-
...
|
|
1041
|
-
], s =
|
|
1040
|
+
...t
|
|
1041
|
+
], s = Bt(i.pop()), u = i.join(".");
|
|
1042
1042
|
return e[s](u, ...n);
|
|
1043
1043
|
});
|
|
1044
|
-
return
|
|
1044
|
+
return Nt((t) => t === Mt ? e : r[t]);
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1047
|
-
const
|
|
1048
|
-
return
|
|
1046
|
+
function Yt(e) {
|
|
1047
|
+
const r = new zt(e);
|
|
1048
|
+
return Kt(r);
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1051
|
-
function
|
|
1050
|
+
const ir = (e) => typeof e == "function";
|
|
1051
|
+
function Ht(e) {
|
|
1052
1052
|
if (e)
|
|
1053
1053
|
return e;
|
|
1054
|
-
if (typeof window < "u" &&
|
|
1054
|
+
if (typeof window < "u" && ir(window.fetch))
|
|
1055
1055
|
return window.fetch;
|
|
1056
|
-
if (typeof globalThis < "u" &&
|
|
1056
|
+
if (typeof globalThis < "u" && ir(globalThis.fetch))
|
|
1057
1057
|
return globalThis.fetch;
|
|
1058
1058
|
throw new Error("No fetch implementation found");
|
|
1059
1059
|
}
|
|
1060
|
-
const
|
|
1060
|
+
const sr = () => {
|
|
1061
1061
|
throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new");
|
|
1062
1062
|
};
|
|
1063
|
-
function
|
|
1064
|
-
let
|
|
1063
|
+
function ar(e) {
|
|
1064
|
+
let r = null, t = null;
|
|
1065
1065
|
const n = () => {
|
|
1066
|
-
clearTimeout(
|
|
1066
|
+
clearTimeout(t), t = null, r = null;
|
|
1067
1067
|
};
|
|
1068
1068
|
function i(l) {
|
|
1069
1069
|
var m, p;
|
|
@@ -1080,7 +1080,7 @@ function at(e) {
|
|
|
1080
1080
|
(m = h.reject) == null || m.call(h, new Error("Aborted")), f++;
|
|
1081
1081
|
continue;
|
|
1082
1082
|
}
|
|
1083
|
-
if (e.validate(b.concat(h).map((
|
|
1083
|
+
if (e.validate(b.concat(h).map((R) => R.key))) {
|
|
1084
1084
|
b.push(h), f++;
|
|
1085
1085
|
continue;
|
|
1086
1086
|
}
|
|
@@ -1093,7 +1093,7 @@ function at(e) {
|
|
|
1093
1093
|
return a;
|
|
1094
1094
|
}
|
|
1095
1095
|
function s() {
|
|
1096
|
-
const l = i(
|
|
1096
|
+
const l = i(r);
|
|
1097
1097
|
n();
|
|
1098
1098
|
for (const a of l) {
|
|
1099
1099
|
if (!a.length)
|
|
@@ -1107,14 +1107,14 @@ function at(e) {
|
|
|
1107
1107
|
var h;
|
|
1108
1108
|
await Promise.all(p.map(async (b, x) => {
|
|
1109
1109
|
var L, j;
|
|
1110
|
-
const
|
|
1110
|
+
const R = f.items[x];
|
|
1111
1111
|
try {
|
|
1112
1112
|
const S = await Promise.resolve(b);
|
|
1113
|
-
(L =
|
|
1113
|
+
(L = R.resolve) == null || L.call(R, S);
|
|
1114
1114
|
} catch (S) {
|
|
1115
|
-
(j =
|
|
1115
|
+
(j = R.reject) == null || j.call(R, S);
|
|
1116
1116
|
}
|
|
1117
|
-
|
|
1117
|
+
R.batch = null, R.reject = null, R.resolve = null;
|
|
1118
1118
|
}));
|
|
1119
1119
|
for (const b of f.items)
|
|
1120
1120
|
(h = b.reject) == null || h.call(b, new Error("Missing result")), b.batch = null;
|
|
@@ -1130,103 +1130,103 @@ function at(e) {
|
|
|
1130
1130
|
aborted: !1,
|
|
1131
1131
|
key: l,
|
|
1132
1132
|
batch: null,
|
|
1133
|
-
resolve:
|
|
1134
|
-
reject:
|
|
1133
|
+
resolve: sr,
|
|
1134
|
+
reject: sr
|
|
1135
1135
|
}, f = new Promise((m, p) => {
|
|
1136
|
-
a.reject = p, a.resolve = m,
|
|
1136
|
+
a.reject = p, a.resolve = m, r || (r = []), r.push(a);
|
|
1137
1137
|
});
|
|
1138
|
-
return
|
|
1138
|
+
return t || (t = setTimeout(s)), f;
|
|
1139
1139
|
}
|
|
1140
1140
|
return {
|
|
1141
1141
|
load: u
|
|
1142
1142
|
};
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1145
|
-
const
|
|
1144
|
+
function Gt(...e) {
|
|
1145
|
+
const r = new AbortController(), t = e.length;
|
|
1146
1146
|
let n = 0;
|
|
1147
1147
|
const i = () => {
|
|
1148
|
-
++n ===
|
|
1148
|
+
++n === t && r.abort();
|
|
1149
1149
|
};
|
|
1150
1150
|
for (const s of e)
|
|
1151
1151
|
s != null && s.aborted ? i() : s == null || s.addEventListener("abort", i, {
|
|
1152
1152
|
once: !0
|
|
1153
1153
|
});
|
|
1154
|
-
return
|
|
1154
|
+
return r.signal;
|
|
1155
1155
|
}
|
|
1156
|
-
function
|
|
1157
|
-
const
|
|
1158
|
-
return
|
|
1159
|
-
input:
|
|
1160
|
-
output:
|
|
1156
|
+
function Xt(e) {
|
|
1157
|
+
const r = e;
|
|
1158
|
+
return r ? "input" in r ? r : {
|
|
1159
|
+
input: r,
|
|
1160
|
+
output: r
|
|
1161
1161
|
} : {
|
|
1162
1162
|
input: {
|
|
1163
|
-
serialize: (
|
|
1164
|
-
deserialize: (
|
|
1163
|
+
serialize: (t) => t,
|
|
1164
|
+
deserialize: (t) => t
|
|
1165
1165
|
},
|
|
1166
1166
|
output: {
|
|
1167
|
-
serialize: (
|
|
1168
|
-
deserialize: (
|
|
1167
|
+
serialize: (t) => t,
|
|
1168
|
+
deserialize: (t) => t
|
|
1169
1169
|
}
|
|
1170
1170
|
};
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function Jt(e) {
|
|
1173
1173
|
return {
|
|
1174
1174
|
url: e.url.toString(),
|
|
1175
1175
|
fetch: e.fetch,
|
|
1176
|
-
transformer:
|
|
1176
|
+
transformer: Xt(e.transformer),
|
|
1177
1177
|
methodOverride: e.methodOverride
|
|
1178
1178
|
};
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1181
|
-
const
|
|
1182
|
-
for (let
|
|
1183
|
-
const n = e[
|
|
1184
|
-
t
|
|
1180
|
+
function Zt(e) {
|
|
1181
|
+
const r = {};
|
|
1182
|
+
for (let t = 0; t < e.length; t++) {
|
|
1183
|
+
const n = e[t];
|
|
1184
|
+
r[t] = n;
|
|
1185
1185
|
}
|
|
1186
|
-
return
|
|
1186
|
+
return r;
|
|
1187
1187
|
}
|
|
1188
|
-
const
|
|
1188
|
+
const Qt = {
|
|
1189
1189
|
query: "GET",
|
|
1190
1190
|
mutation: "POST",
|
|
1191
1191
|
subscription: "PATCH"
|
|
1192
1192
|
};
|
|
1193
|
-
function
|
|
1194
|
-
return "input" in e ? e.transformer.input.serialize(e.input) :
|
|
1193
|
+
function Rr(e) {
|
|
1194
|
+
return "input" in e ? e.transformer.input.serialize(e.input) : Zt(e.inputs.map((r) => e.transformer.input.serialize(r)));
|
|
1195
1195
|
}
|
|
1196
|
-
const
|
|
1197
|
-
const
|
|
1198
|
-
let n =
|
|
1196
|
+
const Pr = (e) => {
|
|
1197
|
+
const r = e.url.split("?");
|
|
1198
|
+
let n = r[0].replace(/\/$/, "") + "/" + e.path;
|
|
1199
1199
|
const i = [];
|
|
1200
|
-
if (
|
|
1201
|
-
const s =
|
|
1200
|
+
if (r[1] && i.push(r[1]), "inputs" in e && i.push("batch=1"), e.type === "query" || e.type === "subscription") {
|
|
1201
|
+
const s = Rr(e);
|
|
1202
1202
|
s !== void 0 && e.methodOverride !== "POST" && i.push(`input=${encodeURIComponent(JSON.stringify(s))}`);
|
|
1203
1203
|
}
|
|
1204
1204
|
return i.length && (n += "?" + i.join("&")), n;
|
|
1205
|
-
},
|
|
1205
|
+
}, en = (e) => {
|
|
1206
1206
|
if (e.type === "query" && e.methodOverride !== "POST")
|
|
1207
1207
|
return;
|
|
1208
|
-
const
|
|
1209
|
-
return
|
|
1210
|
-
},
|
|
1208
|
+
const r = Rr(e);
|
|
1209
|
+
return r !== void 0 ? JSON.stringify(r) : void 0;
|
|
1210
|
+
}, rn = (e) => sn({
|
|
1211
1211
|
...e,
|
|
1212
1212
|
contentTypeHeader: "application/json",
|
|
1213
|
-
getUrl:
|
|
1214
|
-
getBody:
|
|
1213
|
+
getUrl: Pr,
|
|
1214
|
+
getBody: en
|
|
1215
1215
|
});
|
|
1216
1216
|
class tn extends Error {
|
|
1217
1217
|
constructor() {
|
|
1218
|
-
const
|
|
1219
|
-
super(
|
|
1218
|
+
const r = "AbortError";
|
|
1219
|
+
super(r), this.name = r, this.message = r;
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
|
-
const
|
|
1223
|
-
var
|
|
1222
|
+
const nn = (e) => {
|
|
1223
|
+
var r;
|
|
1224
1224
|
if (e != null && e.aborted)
|
|
1225
|
-
throw (
|
|
1225
|
+
throw (r = e.throwIfAborted) == null || r.call(e), typeof DOMException < "u" ? new DOMException("AbortError", "AbortError") : new tn();
|
|
1226
1226
|
};
|
|
1227
|
-
async function
|
|
1228
|
-
|
|
1229
|
-
const
|
|
1227
|
+
async function on(e) {
|
|
1228
|
+
nn(e.signal);
|
|
1229
|
+
const r = e.getUrl(e), t = e.getBody(e), { type: n } = e, i = await (async () => {
|
|
1230
1230
|
const u = await e.headers();
|
|
1231
1231
|
return Symbol.iterator in u ? Object.fromEntries(u) : u;
|
|
1232
1232
|
})(), s = {
|
|
@@ -1238,41 +1238,41 @@ async function nn(e) {
|
|
|
1238
1238
|
} : void 0,
|
|
1239
1239
|
...i
|
|
1240
1240
|
};
|
|
1241
|
-
return
|
|
1242
|
-
method: e.methodOverride ??
|
|
1241
|
+
return Ht(e.fetch)(r, {
|
|
1242
|
+
method: e.methodOverride ?? Qt[n],
|
|
1243
1243
|
signal: e.signal,
|
|
1244
|
-
body:
|
|
1244
|
+
body: t,
|
|
1245
1245
|
headers: s
|
|
1246
1246
|
});
|
|
1247
1247
|
}
|
|
1248
|
-
async function
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1251
|
-
const n = await
|
|
1252
|
-
return
|
|
1248
|
+
async function sn(e) {
|
|
1249
|
+
const r = {}, t = await on(e);
|
|
1250
|
+
r.response = t;
|
|
1251
|
+
const n = await t.json();
|
|
1252
|
+
return r.responseJSON = n, {
|
|
1253
1253
|
json: n,
|
|
1254
|
-
meta:
|
|
1254
|
+
meta: r
|
|
1255
1255
|
};
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1258
|
-
const
|
|
1257
|
+
function an(e) {
|
|
1258
|
+
const r = Jt(e), t = e.maxURLLength ?? 1 / 0;
|
|
1259
1259
|
return () => {
|
|
1260
1260
|
const n = (l) => ({
|
|
1261
1261
|
validate(a) {
|
|
1262
|
-
if (
|
|
1262
|
+
if (t === 1 / 0)
|
|
1263
1263
|
return !0;
|
|
1264
1264
|
const f = a.map((h) => h.path).join(","), m = a.map((h) => h.input);
|
|
1265
|
-
return
|
|
1266
|
-
...
|
|
1265
|
+
return Pr({
|
|
1266
|
+
...r,
|
|
1267
1267
|
type: l,
|
|
1268
1268
|
path: f,
|
|
1269
1269
|
inputs: m,
|
|
1270
1270
|
signal: null
|
|
1271
|
-
}).length <=
|
|
1271
|
+
}).length <= t;
|
|
1272
1272
|
},
|
|
1273
1273
|
async fetch(a) {
|
|
1274
|
-
const f = a.map((
|
|
1275
|
-
...
|
|
1274
|
+
const f = a.map((R) => R.path).join(","), m = a.map((R) => R.input), p = Gt(...a.map((R) => R.signal)), h = await rn({
|
|
1275
|
+
...r,
|
|
1276
1276
|
path: f,
|
|
1277
1277
|
inputs: m,
|
|
1278
1278
|
type: l,
|
|
@@ -1283,12 +1283,12 @@ function sn(e) {
|
|
|
1283
1283
|
},
|
|
1284
1284
|
signal: p
|
|
1285
1285
|
});
|
|
1286
|
-
return (Array.isArray(h.json) ? h.json : a.map(() => h.json)).map((
|
|
1286
|
+
return (Array.isArray(h.json) ? h.json : a.map(() => h.json)).map((R) => ({
|
|
1287
1287
|
meta: h.meta,
|
|
1288
|
-
json:
|
|
1288
|
+
json: R
|
|
1289
1289
|
}));
|
|
1290
1290
|
}
|
|
1291
|
-
}), i =
|
|
1291
|
+
}), i = ar(n("query")), s = ar(n("mutation")), u = {
|
|
1292
1292
|
query: i,
|
|
1293
1293
|
mutation: s
|
|
1294
1294
|
};
|
|
@@ -1300,7 +1300,7 @@ function sn(e) {
|
|
|
1300
1300
|
let p;
|
|
1301
1301
|
return m.then((h) => {
|
|
1302
1302
|
p = h;
|
|
1303
|
-
const b =
|
|
1303
|
+
const b = Ut(h.json, r.transformer.output);
|
|
1304
1304
|
if (!b.ok) {
|
|
1305
1305
|
a.error(F.from(b.error, {
|
|
1306
1306
|
meta: h.meta
|
|
@@ -1320,7 +1320,7 @@ function sn(e) {
|
|
|
1320
1320
|
});
|
|
1321
1321
|
};
|
|
1322
1322
|
}
|
|
1323
|
-
function
|
|
1323
|
+
function un(e) {
|
|
1324
1324
|
return typeof FormData > "u" ? !1 : e instanceof FormData;
|
|
1325
1325
|
}
|
|
1326
1326
|
const we = {
|
|
@@ -1372,22 +1372,22 @@ const we = {
|
|
|
1372
1372
|
}
|
|
1373
1373
|
}
|
|
1374
1374
|
};
|
|
1375
|
-
function
|
|
1376
|
-
const { direction:
|
|
1375
|
+
function cn(e) {
|
|
1376
|
+
const { direction: r, type: t, withContext: n, path: i, id: s, input: u } = e, l = [], a = [];
|
|
1377
1377
|
if (e.colorMode === "none")
|
|
1378
|
-
l.push(
|
|
1378
|
+
l.push(r === "up" ? ">>" : "<<", t, `#${s}`, i);
|
|
1379
1379
|
else if (e.colorMode === "ansi") {
|
|
1380
|
-
const [f, m] = we.ansi.regular[
|
|
1381
|
-
l.push(
|
|
1380
|
+
const [f, m] = we.ansi.regular[t], [p, h] = we.ansi.bold[t];
|
|
1381
|
+
l.push(r === "up" ? f : m, r === "up" ? ">>" : "<<", t, r === "up" ? p : h, `#${s}`, i, "\x1B[0m");
|
|
1382
1382
|
} else {
|
|
1383
|
-
const [f, m] = we.css[
|
|
1384
|
-
background-color: #${
|
|
1385
|
-
color: ${
|
|
1383
|
+
const [f, m] = we.css[t], p = `
|
|
1384
|
+
background-color: #${r === "up" ? f : m};
|
|
1385
|
+
color: ${r === "up" ? "black" : "white"};
|
|
1386
1386
|
padding: 2px;
|
|
1387
1387
|
`;
|
|
1388
|
-
l.push("%c",
|
|
1388
|
+
l.push("%c", r === "up" ? ">>" : "<<", t, `#${s}`, `%c${i}%c`, "%O"), a.push(p, `${p}; font-weight: bold;`, `${p}; font-weight: normal;`);
|
|
1389
1389
|
}
|
|
1390
|
-
return
|
|
1390
|
+
return r === "up" ? a.push(n ? {
|
|
1391
1391
|
input: u,
|
|
1392
1392
|
context: e.context
|
|
1393
1393
|
} : {
|
|
@@ -1404,25 +1404,25 @@ function un(e) {
|
|
|
1404
1404
|
args: a
|
|
1405
1405
|
};
|
|
1406
1406
|
}
|
|
1407
|
-
const
|
|
1408
|
-
const i = n.input, s =
|
|
1407
|
+
const ln = ({ c: e = console, colorMode: r = "css", withContext: t }) => (n) => {
|
|
1408
|
+
const i = n.input, s = un(i) ? Object.fromEntries(i) : i, { parts: u, args: l } = cn({
|
|
1409
1409
|
...n,
|
|
1410
|
-
colorMode:
|
|
1410
|
+
colorMode: r,
|
|
1411
1411
|
input: s,
|
|
1412
|
-
withContext:
|
|
1412
|
+
withContext: t
|
|
1413
1413
|
}), a = n.direction === "down" && n.result && (n.result instanceof Error || "error" in n.result.result && n.result.result.error) ? "error" : "log";
|
|
1414
1414
|
e[a].apply(null, [
|
|
1415
1415
|
u.join(" ")
|
|
1416
1416
|
].concat(l));
|
|
1417
1417
|
};
|
|
1418
|
-
function
|
|
1419
|
-
const { enabled:
|
|
1418
|
+
function fn(e = {}) {
|
|
1419
|
+
const { enabled: r = () => !0 } = e, t = e.colorMode ?? (typeof window > "u" ? "ansi" : "css"), n = e.withContext ?? t === "css", { logger: i = ln({
|
|
1420
1420
|
c: e.console,
|
|
1421
|
-
colorMode:
|
|
1421
|
+
colorMode: t,
|
|
1422
1422
|
withContext: n
|
|
1423
1423
|
}) } = e;
|
|
1424
1424
|
return () => ({ op: s, next: u }) => W((l) => {
|
|
1425
|
-
|
|
1425
|
+
r({
|
|
1426
1426
|
...s,
|
|
1427
1427
|
direction: "up"
|
|
1428
1428
|
}) && i({
|
|
@@ -1432,7 +1432,7 @@ function ln(e = {}) {
|
|
|
1432
1432
|
const a = Date.now();
|
|
1433
1433
|
function f(m) {
|
|
1434
1434
|
const p = Date.now() - a;
|
|
1435
|
-
|
|
1435
|
+
r({
|
|
1436
1436
|
...s,
|
|
1437
1437
|
direction: "down",
|
|
1438
1438
|
result: m
|
|
@@ -1443,7 +1443,7 @@ function ln(e = {}) {
|
|
|
1443
1443
|
result: m
|
|
1444
1444
|
});
|
|
1445
1445
|
}
|
|
1446
|
-
return u(s).pipe(
|
|
1446
|
+
return u(s).pipe(It({
|
|
1447
1447
|
next(m) {
|
|
1448
1448
|
f(m);
|
|
1449
1449
|
},
|
|
@@ -1453,45 +1453,45 @@ function ln(e = {}) {
|
|
|
1453
1453
|
})).subscribe(l);
|
|
1454
1454
|
});
|
|
1455
1455
|
}
|
|
1456
|
-
const
|
|
1457
|
-
function
|
|
1458
|
-
let e,
|
|
1456
|
+
const dn = (e, ...r) => typeof e == "function" ? e(...r) : e;
|
|
1457
|
+
function mn() {
|
|
1458
|
+
let e, r;
|
|
1459
1459
|
return {
|
|
1460
1460
|
promise: new Promise((n, i) => {
|
|
1461
|
-
e = n,
|
|
1461
|
+
e = n, r = i;
|
|
1462
1462
|
}),
|
|
1463
1463
|
resolve: e,
|
|
1464
|
-
reject:
|
|
1464
|
+
reject: r
|
|
1465
1465
|
};
|
|
1466
1466
|
}
|
|
1467
|
-
async function
|
|
1468
|
-
const
|
|
1469
|
-
if (!e.connectionParams) return
|
|
1470
|
-
const n = `${
|
|
1471
|
-
return
|
|
1467
|
+
async function pn(e) {
|
|
1468
|
+
const r = await dn(e.url);
|
|
1469
|
+
if (!e.connectionParams) return r;
|
|
1470
|
+
const n = `${r.includes("?") ? "&" : "?"}connectionParams=1`;
|
|
1471
|
+
return r + n;
|
|
1472
1472
|
}
|
|
1473
|
-
function U(e,
|
|
1474
|
-
return
|
|
1475
|
-
value:
|
|
1473
|
+
function U(e, r, t) {
|
|
1474
|
+
return r in e ? Object.defineProperty(e, r, {
|
|
1475
|
+
value: t,
|
|
1476
1476
|
enumerable: !0,
|
|
1477
1477
|
configurable: !0,
|
|
1478
1478
|
writable: !0
|
|
1479
|
-
}) : e[
|
|
1479
|
+
}) : e[r] = t, e;
|
|
1480
1480
|
}
|
|
1481
|
-
function
|
|
1482
|
-
const { promise:
|
|
1481
|
+
function yn(e) {
|
|
1482
|
+
const { promise: r, resolve: t, reject: n } = mn();
|
|
1483
1483
|
return e.addEventListener("open", () => {
|
|
1484
|
-
e.removeEventListener("error", n),
|
|
1485
|
-
}), e.addEventListener("error", n),
|
|
1484
|
+
e.removeEventListener("error", n), t();
|
|
1485
|
+
}), e.addEventListener("error", n), r;
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1487
|
+
function hn(e, { intervalMs: r, pongTimeoutMs: t }) {
|
|
1488
1488
|
let n, i;
|
|
1489
1489
|
function s() {
|
|
1490
1490
|
n = setTimeout(() => {
|
|
1491
1491
|
e.send("PING"), i = setTimeout(() => {
|
|
1492
1492
|
e.close();
|
|
1493
|
-
},
|
|
1494
|
-
},
|
|
1493
|
+
}, t);
|
|
1494
|
+
}, r);
|
|
1495
1495
|
}
|
|
1496
1496
|
function u() {
|
|
1497
1497
|
clearTimeout(n), s();
|
|
@@ -1509,8 +1509,8 @@ class se {
|
|
|
1509
1509
|
get ws() {
|
|
1510
1510
|
return this.wsObservable.get();
|
|
1511
1511
|
}
|
|
1512
|
-
set ws(
|
|
1513
|
-
this.wsObservable.next(
|
|
1512
|
+
set ws(r) {
|
|
1513
|
+
this.wsObservable.next(r);
|
|
1514
1514
|
}
|
|
1515
1515
|
/**
|
|
1516
1516
|
* Checks if the WebSocket connection is open and ready to communicate.
|
|
@@ -1527,10 +1527,10 @@ class se {
|
|
|
1527
1527
|
async open() {
|
|
1528
1528
|
if (this.openPromise) return this.openPromise;
|
|
1529
1529
|
this.id = ++se.connectCount;
|
|
1530
|
-
const
|
|
1531
|
-
this.openPromise =
|
|
1532
|
-
|
|
1533
|
-
}), this.keepAliveOpts.enabled &&
|
|
1530
|
+
const r = pn(this.urlOptions).then((t) => new this.WebSocketPonyfill(t));
|
|
1531
|
+
this.openPromise = r.then(yn), this.ws = await r, this.ws.addEventListener("message", function({ data: t }) {
|
|
1532
|
+
t === "PING" && this.send("PONG");
|
|
1533
|
+
}), this.keepAliveOpts.enabled && hn(this.ws, this.keepAliveOpts), this.ws.addEventListener("close", () => {
|
|
1534
1534
|
this.ws = null;
|
|
1535
1535
|
});
|
|
1536
1536
|
try {
|
|
@@ -1544,161 +1544,161 @@ class se {
|
|
|
1544
1544
|
* Waits for any ongoing open operation to complete before closing.
|
|
1545
1545
|
*/
|
|
1546
1546
|
async close() {
|
|
1547
|
-
var
|
|
1547
|
+
var r;
|
|
1548
1548
|
try {
|
|
1549
1549
|
await this.openPromise;
|
|
1550
1550
|
} finally {
|
|
1551
|
-
(
|
|
1551
|
+
(r = this.ws) == null || r.close();
|
|
1552
1552
|
}
|
|
1553
1553
|
}
|
|
1554
|
-
constructor(
|
|
1555
|
-
if (U(this, "id", ++se.connectCount), U(this, "WebSocketPonyfill", void 0), U(this, "urlOptions", void 0), U(this, "keepAliveOpts", void 0), U(this, "wsObservable",
|
|
1554
|
+
constructor(r) {
|
|
1555
|
+
if (U(this, "id", ++se.connectCount), U(this, "WebSocketPonyfill", void 0), U(this, "urlOptions", void 0), U(this, "keepAliveOpts", void 0), U(this, "wsObservable", At(null)), U(this, "openPromise", null), this.WebSocketPonyfill = r.WebSocketPonyfill ?? WebSocket, !this.WebSocketPonyfill)
|
|
1556
1556
|
throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");
|
|
1557
|
-
this.urlOptions =
|
|
1557
|
+
this.urlOptions = r.urlOptions, this.keepAliveOpts = r.keepAlive;
|
|
1558
1558
|
}
|
|
1559
1559
|
}
|
|
1560
1560
|
U(se, "connectCount", 0);
|
|
1561
|
-
class
|
|
1561
|
+
class gn {
|
|
1562
1562
|
constructor() {
|
|
1563
1563
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
1564
1564
|
}
|
|
1565
|
-
set(
|
|
1566
|
-
this.keyToValue.set(
|
|
1565
|
+
set(r, t) {
|
|
1566
|
+
this.keyToValue.set(r, t), this.valueToKey.set(t, r);
|
|
1567
1567
|
}
|
|
1568
|
-
getByKey(
|
|
1569
|
-
return this.keyToValue.get(
|
|
1568
|
+
getByKey(r) {
|
|
1569
|
+
return this.keyToValue.get(r);
|
|
1570
1570
|
}
|
|
1571
|
-
getByValue(
|
|
1572
|
-
return this.valueToKey.get(
|
|
1571
|
+
getByValue(r) {
|
|
1572
|
+
return this.valueToKey.get(r);
|
|
1573
1573
|
}
|
|
1574
1574
|
clear() {
|
|
1575
1575
|
this.keyToValue.clear(), this.valueToKey.clear();
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
1578
|
-
class
|
|
1579
|
-
constructor(
|
|
1580
|
-
this.generateIdentifier =
|
|
1578
|
+
class Or {
|
|
1579
|
+
constructor(r) {
|
|
1580
|
+
this.generateIdentifier = r, this.kv = new gn();
|
|
1581
1581
|
}
|
|
1582
|
-
register(
|
|
1583
|
-
this.kv.getByValue(
|
|
1582
|
+
register(r, t) {
|
|
1583
|
+
this.kv.getByValue(r) || (t || (t = this.generateIdentifier(r)), this.kv.set(t, r));
|
|
1584
1584
|
}
|
|
1585
1585
|
clear() {
|
|
1586
1586
|
this.kv.clear();
|
|
1587
1587
|
}
|
|
1588
|
-
getIdentifier(
|
|
1589
|
-
return this.kv.getByValue(
|
|
1588
|
+
getIdentifier(r) {
|
|
1589
|
+
return this.kv.getByValue(r);
|
|
1590
1590
|
}
|
|
1591
|
-
getValue(
|
|
1592
|
-
return this.kv.getByKey(
|
|
1591
|
+
getValue(r) {
|
|
1592
|
+
return this.kv.getByKey(r);
|
|
1593
1593
|
}
|
|
1594
1594
|
}
|
|
1595
|
-
class
|
|
1595
|
+
class bn extends Or {
|
|
1596
1596
|
constructor() {
|
|
1597
|
-
super((
|
|
1597
|
+
super((r) => r.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
1598
1598
|
}
|
|
1599
|
-
register(
|
|
1600
|
-
typeof
|
|
1599
|
+
register(r, t) {
|
|
1600
|
+
typeof t == "object" ? (t.allowProps && this.classToAllowedProps.set(r, t.allowProps), super.register(r, t.identifier)) : super.register(r, t);
|
|
1601
1601
|
}
|
|
1602
|
-
getAllowedProps(
|
|
1603
|
-
return this.classToAllowedProps.get(
|
|
1602
|
+
getAllowedProps(r) {
|
|
1603
|
+
return this.classToAllowedProps.get(r);
|
|
1604
1604
|
}
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function wn(e) {
|
|
1607
1607
|
if ("values" in Object)
|
|
1608
1608
|
return Object.values(e);
|
|
1609
|
-
const
|
|
1610
|
-
for (const
|
|
1611
|
-
e.hasOwnProperty(
|
|
1612
|
-
return
|
|
1609
|
+
const r = [];
|
|
1610
|
+
for (const t in e)
|
|
1611
|
+
e.hasOwnProperty(t) && r.push(e[t]);
|
|
1612
|
+
return r;
|
|
1613
1613
|
}
|
|
1614
|
-
function
|
|
1615
|
-
const
|
|
1616
|
-
if ("find" in
|
|
1617
|
-
return
|
|
1618
|
-
const n =
|
|
1614
|
+
function vn(e, r) {
|
|
1615
|
+
const t = wn(e);
|
|
1616
|
+
if ("find" in t)
|
|
1617
|
+
return t.find(r);
|
|
1618
|
+
const n = t;
|
|
1619
1619
|
for (let i = 0; i < n.length; i++) {
|
|
1620
1620
|
const s = n[i];
|
|
1621
|
-
if (
|
|
1621
|
+
if (r(s))
|
|
1622
1622
|
return s;
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
|
-
function M(e,
|
|
1626
|
-
Object.entries(e).forEach(([
|
|
1625
|
+
function M(e, r) {
|
|
1626
|
+
Object.entries(e).forEach(([t, n]) => r(n, t));
|
|
1627
1627
|
}
|
|
1628
|
-
function ie(e,
|
|
1629
|
-
return e.indexOf(
|
|
1628
|
+
function ie(e, r) {
|
|
1629
|
+
return e.indexOf(r) !== -1;
|
|
1630
1630
|
}
|
|
1631
|
-
function
|
|
1632
|
-
for (let
|
|
1633
|
-
const n = e[
|
|
1634
|
-
if (
|
|
1631
|
+
function ur(e, r) {
|
|
1632
|
+
for (let t = 0; t < e.length; t++) {
|
|
1633
|
+
const n = e[t];
|
|
1634
|
+
if (r(n))
|
|
1635
1635
|
return n;
|
|
1636
1636
|
}
|
|
1637
1637
|
}
|
|
1638
|
-
class
|
|
1638
|
+
class En {
|
|
1639
1639
|
constructor() {
|
|
1640
1640
|
this.transfomers = {};
|
|
1641
1641
|
}
|
|
1642
|
-
register(
|
|
1643
|
-
this.transfomers[
|
|
1642
|
+
register(r) {
|
|
1643
|
+
this.transfomers[r.name] = r;
|
|
1644
1644
|
}
|
|
1645
|
-
findApplicable(
|
|
1646
|
-
return
|
|
1645
|
+
findApplicable(r) {
|
|
1646
|
+
return vn(this.transfomers, (t) => t.isApplicable(r));
|
|
1647
1647
|
}
|
|
1648
|
-
findByName(
|
|
1649
|
-
return this.transfomers[
|
|
1648
|
+
findByName(r) {
|
|
1649
|
+
return this.transfomers[r];
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
|
-
const
|
|
1653
|
-
const
|
|
1654
|
-
let
|
|
1652
|
+
const Rn = (e) => Object.prototype.toString.call(e).slice(8, -1), Tr = (e) => typeof e > "u", Pn = (e) => e === null, J = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Oe = (e) => J(e) && Object.keys(e).length === 0, D = (e) => Array.isArray(e), On = (e) => typeof e == "string", Tn = (e) => typeof e == "number" && !isNaN(e), Sn = (e) => typeof e == "boolean", xn = (e) => e instanceof RegExp, Z = (e) => e instanceof Map, Q = (e) => e instanceof Set, Sr = (e) => Rn(e) === "Symbol", _n = (e) => e instanceof Date && !isNaN(e.valueOf()), kn = (e) => e instanceof Error, cr = (e) => typeof e == "number" && isNaN(e), Cn = (e) => Sn(e) || Pn(e) || Tr(e) || Tn(e) || On(e) || Sr(e), jn = (e) => typeof e == "bigint", In = (e) => e === 1 / 0 || e === -1 / 0, An = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Fn = (e) => e instanceof URL, xr = (e) => e.replace(/\./g, "\\."), ve = (e) => e.map(String).map(xr).join("."), G = (e) => {
|
|
1653
|
+
const r = [];
|
|
1654
|
+
let t = "";
|
|
1655
1655
|
for (let i = 0; i < e.length; i++) {
|
|
1656
1656
|
let s = e.charAt(i);
|
|
1657
1657
|
if (s === "\\" && e.charAt(i + 1) === ".") {
|
|
1658
|
-
|
|
1658
|
+
t += ".", i++;
|
|
1659
1659
|
continue;
|
|
1660
1660
|
}
|
|
1661
1661
|
if (s === ".") {
|
|
1662
|
-
|
|
1662
|
+
r.push(t), t = "";
|
|
1663
1663
|
continue;
|
|
1664
1664
|
}
|
|
1665
|
-
|
|
1665
|
+
t += s;
|
|
1666
1666
|
}
|
|
1667
|
-
const n =
|
|
1668
|
-
return
|
|
1667
|
+
const n = t;
|
|
1668
|
+
return r.push(n), r;
|
|
1669
1669
|
};
|
|
1670
|
-
function
|
|
1670
|
+
function I(e, r, t, n) {
|
|
1671
1671
|
return {
|
|
1672
1672
|
isApplicable: e,
|
|
1673
|
-
annotation:
|
|
1674
|
-
transform:
|
|
1673
|
+
annotation: r,
|
|
1674
|
+
transform: t,
|
|
1675
1675
|
untransform: n
|
|
1676
1676
|
};
|
|
1677
1677
|
}
|
|
1678
|
-
const
|
|
1679
|
-
|
|
1678
|
+
const _r = [
|
|
1679
|
+
I(Tr, "undefined", () => null, () => {
|
|
1680
1680
|
}),
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
const
|
|
1681
|
+
I(jn, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
|
|
1682
|
+
I(_n, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
1683
|
+
I(kn, "Error", (e, r) => {
|
|
1684
|
+
const t = {
|
|
1685
1685
|
name: e.name,
|
|
1686
1686
|
message: e.message
|
|
1687
1687
|
};
|
|
1688
|
-
return
|
|
1689
|
-
|
|
1690
|
-
}),
|
|
1691
|
-
}, (e,
|
|
1692
|
-
const
|
|
1693
|
-
return
|
|
1694
|
-
|
|
1695
|
-
}),
|
|
1688
|
+
return r.allowedErrorProps.forEach((n) => {
|
|
1689
|
+
t[n] = e[n];
|
|
1690
|
+
}), t;
|
|
1691
|
+
}, (e, r) => {
|
|
1692
|
+
const t = new Error(e.message);
|
|
1693
|
+
return t.name = e.name, t.stack = e.stack, r.allowedErrorProps.forEach((n) => {
|
|
1694
|
+
t[n] = e[n];
|
|
1695
|
+
}), t;
|
|
1696
1696
|
}),
|
|
1697
|
-
|
|
1698
|
-
const
|
|
1699
|
-
return new RegExp(
|
|
1697
|
+
I(xn, "regexp", (e) => "" + e, (e) => {
|
|
1698
|
+
const r = e.slice(1, e.lastIndexOf("/")), t = e.slice(e.lastIndexOf("/") + 1);
|
|
1699
|
+
return new RegExp(r, t);
|
|
1700
1700
|
}),
|
|
1701
|
-
|
|
1701
|
+
I(
|
|
1702
1702
|
Q,
|
|
1703
1703
|
"set",
|
|
1704
1704
|
// (sets only exist in es6+)
|
|
@@ -1706,25 +1706,25 @@ const xt = [
|
|
|
1706
1706
|
(e) => [...e.values()],
|
|
1707
1707
|
(e) => new Set(e)
|
|
1708
1708
|
),
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1709
|
+
I(Z, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
1710
|
+
I((e) => cr(e) || In(e), "number", (e) => cr(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
1711
|
+
I((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
1712
|
+
I(Fn, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
1713
1713
|
];
|
|
1714
|
-
function ae(e,
|
|
1714
|
+
function ae(e, r, t, n) {
|
|
1715
1715
|
return {
|
|
1716
1716
|
isApplicable: e,
|
|
1717
|
-
annotation:
|
|
1718
|
-
transform:
|
|
1717
|
+
annotation: r,
|
|
1718
|
+
transform: t,
|
|
1719
1719
|
untransform: n
|
|
1720
1720
|
};
|
|
1721
1721
|
}
|
|
1722
|
-
const
|
|
1723
|
-
const n =
|
|
1722
|
+
const kr = ae((e, r) => Sr(e) ? !!r.symbolRegistry.getIdentifier(e) : !1, (e, r) => ["symbol", r.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, r, t) => {
|
|
1723
|
+
const n = t.symbolRegistry.getValue(r[1]);
|
|
1724
1724
|
if (!n)
|
|
1725
1725
|
throw new Error("Trying to deserialize unknown symbol");
|
|
1726
1726
|
return n;
|
|
1727
|
-
}),
|
|
1727
|
+
}), Dn = [
|
|
1728
1728
|
Int8Array,
|
|
1729
1729
|
Uint8Array,
|
|
1730
1730
|
Int16Array,
|
|
@@ -1734,79 +1734,79 @@ const _t = ae((e, t) => Ot(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t)
|
|
|
1734
1734
|
Float32Array,
|
|
1735
1735
|
Float64Array,
|
|
1736
1736
|
Uint8ClampedArray
|
|
1737
|
-
].reduce((e,
|
|
1738
|
-
const
|
|
1739
|
-
if (!
|
|
1737
|
+
].reduce((e, r) => (e[r.name] = r, e), {}), Cr = ae(An, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, r) => {
|
|
1738
|
+
const t = Dn[r[1]];
|
|
1739
|
+
if (!t)
|
|
1740
1740
|
throw new Error("Trying to deserialize unknown typed array");
|
|
1741
|
-
return new
|
|
1741
|
+
return new t(e);
|
|
1742
1742
|
});
|
|
1743
|
-
function
|
|
1744
|
-
return e != null && e.constructor ? !!
|
|
1743
|
+
function jr(e, r) {
|
|
1744
|
+
return e != null && e.constructor ? !!r.classRegistry.getIdentifier(e.constructor) : !1;
|
|
1745
1745
|
}
|
|
1746
|
-
const
|
|
1747
|
-
const
|
|
1748
|
-
if (!
|
|
1746
|
+
const Ir = ae(jr, (e, r) => ["class", r.classRegistry.getIdentifier(e.constructor)], (e, r) => {
|
|
1747
|
+
const t = r.classRegistry.getAllowedProps(e.constructor);
|
|
1748
|
+
if (!t)
|
|
1749
1749
|
return { ...e };
|
|
1750
1750
|
const n = {};
|
|
1751
|
-
return
|
|
1751
|
+
return t.forEach((i) => {
|
|
1752
1752
|
n[i] = e[i];
|
|
1753
1753
|
}), n;
|
|
1754
|
-
}, (e,
|
|
1755
|
-
const n =
|
|
1754
|
+
}, (e, r, t) => {
|
|
1755
|
+
const n = t.classRegistry.getValue(r[1]);
|
|
1756
1756
|
if (!n)
|
|
1757
|
-
throw new Error(`Trying to deserialize unknown class '${
|
|
1757
|
+
throw new Error(`Trying to deserialize unknown class '${r[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
|
|
1758
1758
|
return Object.assign(Object.create(n.prototype), e);
|
|
1759
|
-
}),
|
|
1760
|
-
const n =
|
|
1759
|
+
}), Ar = ae((e, r) => !!r.customTransformerRegistry.findApplicable(e), (e, r) => ["custom", r.customTransformerRegistry.findApplicable(e).name], (e, r) => r.customTransformerRegistry.findApplicable(e).serialize(e), (e, r, t) => {
|
|
1760
|
+
const n = t.customTransformerRegistry.findByName(r[1]);
|
|
1761
1761
|
if (!n)
|
|
1762
1762
|
throw new Error("Trying to deserialize unknown custom value");
|
|
1763
1763
|
return n.deserialize(e);
|
|
1764
|
-
}),
|
|
1765
|
-
const
|
|
1766
|
-
if (
|
|
1764
|
+
}), Nn = [Ir, kr, Ar, Cr], lr = (e, r) => {
|
|
1765
|
+
const t = ur(Nn, (i) => i.isApplicable(e, r));
|
|
1766
|
+
if (t)
|
|
1767
1767
|
return {
|
|
1768
|
-
value:
|
|
1769
|
-
type:
|
|
1768
|
+
value: t.transform(e, r),
|
|
1769
|
+
type: t.annotation(e, r)
|
|
1770
1770
|
};
|
|
1771
|
-
const n =
|
|
1771
|
+
const n = ur(_r, (i) => i.isApplicable(e, r));
|
|
1772
1772
|
if (n)
|
|
1773
1773
|
return {
|
|
1774
|
-
value: n.transform(e,
|
|
1774
|
+
value: n.transform(e, r),
|
|
1775
1775
|
type: n.annotation
|
|
1776
1776
|
};
|
|
1777
|
-
},
|
|
1778
|
-
|
|
1779
|
-
|
|
1777
|
+
}, Fr = {};
|
|
1778
|
+
_r.forEach((e) => {
|
|
1779
|
+
Fr[e.annotation] = e;
|
|
1780
1780
|
});
|
|
1781
|
-
const $n = (e,
|
|
1782
|
-
if (D(
|
|
1783
|
-
switch (
|
|
1781
|
+
const $n = (e, r, t) => {
|
|
1782
|
+
if (D(r))
|
|
1783
|
+
switch (r[0]) {
|
|
1784
1784
|
case "symbol":
|
|
1785
|
-
return
|
|
1785
|
+
return kr.untransform(e, r, t);
|
|
1786
1786
|
case "class":
|
|
1787
|
-
return
|
|
1787
|
+
return Ir.untransform(e, r, t);
|
|
1788
1788
|
case "custom":
|
|
1789
|
-
return
|
|
1789
|
+
return Ar.untransform(e, r, t);
|
|
1790
1790
|
case "typed-array":
|
|
1791
|
-
return
|
|
1791
|
+
return Cr.untransform(e, r, t);
|
|
1792
1792
|
default:
|
|
1793
|
-
throw new Error("Unknown transformation: " +
|
|
1793
|
+
throw new Error("Unknown transformation: " + r);
|
|
1794
1794
|
}
|
|
1795
1795
|
else {
|
|
1796
|
-
const n =
|
|
1796
|
+
const n = Fr[r];
|
|
1797
1797
|
if (!n)
|
|
1798
|
-
throw new Error("Unknown transformation: " +
|
|
1799
|
-
return n.untransform(e,
|
|
1798
|
+
throw new Error("Unknown transformation: " + r);
|
|
1799
|
+
return n.untransform(e, t);
|
|
1800
1800
|
}
|
|
1801
|
-
}, z = (e,
|
|
1802
|
-
if (
|
|
1801
|
+
}, z = (e, r) => {
|
|
1802
|
+
if (r > e.size)
|
|
1803
1803
|
throw new Error("index out of bounds");
|
|
1804
|
-
const
|
|
1805
|
-
for (;
|
|
1806
|
-
|
|
1807
|
-
return
|
|
1804
|
+
const t = e.keys();
|
|
1805
|
+
for (; r > 0; )
|
|
1806
|
+
t.next(), r--;
|
|
1807
|
+
return t.next().value;
|
|
1808
1808
|
};
|
|
1809
|
-
function
|
|
1809
|
+
function Dr(e) {
|
|
1810
1810
|
if (ie(e, "__proto__"))
|
|
1811
1811
|
throw new Error("__proto__ is not allowed as a property");
|
|
1812
1812
|
if (ie(e, "prototype"))
|
|
@@ -1814,14 +1814,14 @@ function Ft(e) {
|
|
|
1814
1814
|
if (ie(e, "constructor"))
|
|
1815
1815
|
throw new Error("constructor is not allowed as a property");
|
|
1816
1816
|
}
|
|
1817
|
-
const
|
|
1818
|
-
|
|
1819
|
-
for (let
|
|
1820
|
-
const n = t
|
|
1817
|
+
const Un = (e, r) => {
|
|
1818
|
+
Dr(r);
|
|
1819
|
+
for (let t = 0; t < r.length; t++) {
|
|
1820
|
+
const n = r[t];
|
|
1821
1821
|
if (Q(e))
|
|
1822
1822
|
e = z(e, +n);
|
|
1823
1823
|
else if (Z(e)) {
|
|
1824
|
-
const i = +n, s = +
|
|
1824
|
+
const i = +n, s = +r[++t] == 0 ? "key" : "value", u = z(e, i);
|
|
1825
1825
|
switch (s) {
|
|
1826
1826
|
case "key":
|
|
1827
1827
|
e = u;
|
|
@@ -1834,12 +1834,12 @@ const Nn = (e, t) => {
|
|
|
1834
1834
|
e = e[n];
|
|
1835
1835
|
}
|
|
1836
1836
|
return e;
|
|
1837
|
-
},
|
|
1838
|
-
if (
|
|
1839
|
-
return
|
|
1837
|
+
}, Te = (e, r, t) => {
|
|
1838
|
+
if (Dr(r), r.length === 0)
|
|
1839
|
+
return t(e);
|
|
1840
1840
|
let n = e;
|
|
1841
|
-
for (let s = 0; s <
|
|
1842
|
-
const u =
|
|
1841
|
+
for (let s = 0; s < r.length - 1; s++) {
|
|
1842
|
+
const u = r[s];
|
|
1843
1843
|
if (D(n)) {
|
|
1844
1844
|
const l = +u;
|
|
1845
1845
|
n = n[l];
|
|
@@ -1849,9 +1849,9 @@ const Nn = (e, t) => {
|
|
|
1849
1849
|
const l = +u;
|
|
1850
1850
|
n = z(n, l);
|
|
1851
1851
|
} else if (Z(n)) {
|
|
1852
|
-
if (s ===
|
|
1852
|
+
if (s === r.length - 2)
|
|
1853
1853
|
break;
|
|
1854
|
-
const a = +u, f = +
|
|
1854
|
+
const a = +u, f = +r[++s] == 0 ? "key" : "value", m = z(n, a);
|
|
1855
1855
|
switch (f) {
|
|
1856
1856
|
case "key":
|
|
1857
1857
|
n = m;
|
|
@@ -1862,88 +1862,88 @@ const Nn = (e, t) => {
|
|
|
1862
1862
|
}
|
|
1863
1863
|
}
|
|
1864
1864
|
}
|
|
1865
|
-
const i =
|
|
1866
|
-
if (D(n) ? n[+i] =
|
|
1867
|
-
const s = z(n, +i), u =
|
|
1865
|
+
const i = r[r.length - 1];
|
|
1866
|
+
if (D(n) ? n[+i] = t(n[+i]) : J(n) && (n[i] = t(n[i])), Q(n)) {
|
|
1867
|
+
const s = z(n, +i), u = t(s);
|
|
1868
1868
|
s !== u && (n.delete(s), n.add(u));
|
|
1869
1869
|
}
|
|
1870
1870
|
if (Z(n)) {
|
|
1871
|
-
const s = +
|
|
1871
|
+
const s = +r[r.length - 2], u = z(n, s);
|
|
1872
1872
|
switch (+i == 0 ? "key" : "value") {
|
|
1873
1873
|
case "key": {
|
|
1874
|
-
const a =
|
|
1874
|
+
const a = t(u);
|
|
1875
1875
|
n.set(a, n.get(u)), a !== u && n.delete(u);
|
|
1876
1876
|
break;
|
|
1877
1877
|
}
|
|
1878
1878
|
case "value": {
|
|
1879
|
-
n.set(u,
|
|
1879
|
+
n.set(u, t(n.get(u)));
|
|
1880
1880
|
break;
|
|
1881
1881
|
}
|
|
1882
1882
|
}
|
|
1883
1883
|
}
|
|
1884
1884
|
return e;
|
|
1885
1885
|
};
|
|
1886
|
-
function Se(e,
|
|
1886
|
+
function Se(e, r, t = []) {
|
|
1887
1887
|
if (!e)
|
|
1888
1888
|
return;
|
|
1889
1889
|
if (!D(e)) {
|
|
1890
|
-
M(e, (s, u) => Se(s,
|
|
1890
|
+
M(e, (s, u) => Se(s, r, [...t, ...G(u)]));
|
|
1891
1891
|
return;
|
|
1892
1892
|
}
|
|
1893
1893
|
const [n, i] = e;
|
|
1894
1894
|
i && M(i, (s, u) => {
|
|
1895
|
-
Se(s,
|
|
1896
|
-
}),
|
|
1895
|
+
Se(s, r, [...t, ...G(u)]);
|
|
1896
|
+
}), r(n, t);
|
|
1897
1897
|
}
|
|
1898
|
-
function
|
|
1899
|
-
return Se(
|
|
1900
|
-
e =
|
|
1898
|
+
function Ln(e, r, t) {
|
|
1899
|
+
return Se(r, (n, i) => {
|
|
1900
|
+
e = Te(e, i, (s) => $n(s, n, t));
|
|
1901
1901
|
}), e;
|
|
1902
1902
|
}
|
|
1903
|
-
function
|
|
1904
|
-
function
|
|
1905
|
-
const s =
|
|
1903
|
+
function Vn(e, r) {
|
|
1904
|
+
function t(n, i) {
|
|
1905
|
+
const s = Un(e, G(i));
|
|
1906
1906
|
n.map(G).forEach((u) => {
|
|
1907
|
-
e =
|
|
1907
|
+
e = Te(e, u, () => s);
|
|
1908
1908
|
});
|
|
1909
1909
|
}
|
|
1910
|
-
if (D(
|
|
1911
|
-
const [n, i] =
|
|
1910
|
+
if (D(r)) {
|
|
1911
|
+
const [n, i] = r;
|
|
1912
1912
|
n.forEach((s) => {
|
|
1913
|
-
e =
|
|
1914
|
-
}), i && M(i,
|
|
1913
|
+
e = Te(e, G(s), () => e);
|
|
1914
|
+
}), i && M(i, t);
|
|
1915
1915
|
} else
|
|
1916
|
-
M(
|
|
1916
|
+
M(r, t);
|
|
1917
1917
|
return e;
|
|
1918
1918
|
}
|
|
1919
|
-
const
|
|
1920
|
-
function
|
|
1921
|
-
const n =
|
|
1922
|
-
n ? n.push(
|
|
1919
|
+
const qn = (e, r) => J(e) || D(e) || Z(e) || Q(e) || jr(e, r);
|
|
1920
|
+
function zn(e, r, t) {
|
|
1921
|
+
const n = t.get(e);
|
|
1922
|
+
n ? n.push(r) : t.set(e, [r]);
|
|
1923
1923
|
}
|
|
1924
|
-
function
|
|
1925
|
-
const
|
|
1924
|
+
function Mn(e, r) {
|
|
1925
|
+
const t = {};
|
|
1926
1926
|
let n;
|
|
1927
1927
|
return e.forEach((i) => {
|
|
1928
1928
|
if (i.length <= 1)
|
|
1929
1929
|
return;
|
|
1930
|
-
|
|
1930
|
+
r || (i = i.map((l) => l.map(String)).sort((l, a) => l.length - a.length));
|
|
1931
1931
|
const [s, ...u] = i;
|
|
1932
|
-
s.length === 0 ? n = u.map(ve) :
|
|
1933
|
-
}), n ?
|
|
1932
|
+
s.length === 0 ? n = u.map(ve) : t[ve(s)] = u.map(ve);
|
|
1933
|
+
}), n ? Oe(t) ? [n] : [n, t] : Oe(t) ? void 0 : t;
|
|
1934
1934
|
}
|
|
1935
|
-
const
|
|
1936
|
-
const l =
|
|
1935
|
+
const Nr = (e, r, t, n, i = [], s = [], u = /* @__PURE__ */ new Map()) => {
|
|
1936
|
+
const l = Cn(e);
|
|
1937
1937
|
if (!l) {
|
|
1938
|
-
|
|
1938
|
+
zn(e, i, r);
|
|
1939
1939
|
const b = u.get(e);
|
|
1940
1940
|
if (b)
|
|
1941
1941
|
return n ? {
|
|
1942
1942
|
transformedValue: null
|
|
1943
1943
|
} : b;
|
|
1944
1944
|
}
|
|
1945
|
-
if (!
|
|
1946
|
-
const b =
|
|
1945
|
+
if (!qn(e, t)) {
|
|
1946
|
+
const b = lr(e, t), x = b ? {
|
|
1947
1947
|
transformedValue: b.value,
|
|
1948
1948
|
annotations: [b.type]
|
|
1949
1949
|
} : {
|
|
@@ -1955,16 +1955,16 @@ const Dt = (e, t, r, n, i = [], s = [], u = /* @__PURE__ */ new Map()) => {
|
|
|
1955
1955
|
return {
|
|
1956
1956
|
transformedValue: null
|
|
1957
1957
|
};
|
|
1958
|
-
const a =
|
|
1958
|
+
const a = lr(e, t), f = (a == null ? void 0 : a.value) ?? e, m = D(f) ? [] : {}, p = {};
|
|
1959
1959
|
M(f, (b, x) => {
|
|
1960
1960
|
if (x === "__proto__" || x === "constructor" || x === "prototype")
|
|
1961
1961
|
throw new Error(`Detected property ${x}. This is a prototype pollution risk, please remove it from your object.`);
|
|
1962
|
-
const
|
|
1963
|
-
m[x] =
|
|
1964
|
-
p[
|
|
1962
|
+
const R = Nr(b, r, t, n, [...i, x], [...s, e], u);
|
|
1963
|
+
m[x] = R.transformedValue, D(R.annotations) ? p[x] = R.annotations : J(R.annotations) && M(R.annotations, (L, j) => {
|
|
1964
|
+
p[xr(x) + "." + j] = L;
|
|
1965
1965
|
});
|
|
1966
1966
|
});
|
|
1967
|
-
const h =
|
|
1967
|
+
const h = Oe(p) ? {
|
|
1968
1968
|
transformedValue: m,
|
|
1969
1969
|
annotations: a ? [a.type] : void 0
|
|
1970
1970
|
} : {
|
|
@@ -1973,86 +1973,86 @@ const Dt = (e, t, r, n, i = [], s = [], u = /* @__PURE__ */ new Map()) => {
|
|
|
1973
1973
|
};
|
|
1974
1974
|
return l || u.set(e, h), h;
|
|
1975
1975
|
};
|
|
1976
|
-
function $
|
|
1976
|
+
function $r(e) {
|
|
1977
1977
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1980
|
-
return $
|
|
1979
|
+
function fr(e) {
|
|
1980
|
+
return $r(e) === "Array";
|
|
1981
1981
|
}
|
|
1982
|
-
function
|
|
1983
|
-
if ($
|
|
1982
|
+
function Wn(e) {
|
|
1983
|
+
if ($r(e) !== "Object")
|
|
1984
1984
|
return !1;
|
|
1985
|
-
const
|
|
1986
|
-
return !!
|
|
1985
|
+
const r = Object.getPrototypeOf(e);
|
|
1986
|
+
return !!r && r.constructor === Object && r === Object.prototype;
|
|
1987
1987
|
}
|
|
1988
|
-
function
|
|
1989
|
-
const s = {}.propertyIsEnumerable.call(n,
|
|
1990
|
-
s === "enumerable" && (e[
|
|
1991
|
-
value:
|
|
1988
|
+
function Bn(e, r, t, n, i) {
|
|
1989
|
+
const s = {}.propertyIsEnumerable.call(n, r) ? "enumerable" : "nonenumerable";
|
|
1990
|
+
s === "enumerable" && (e[r] = t), i && s === "nonenumerable" && Object.defineProperty(e, r, {
|
|
1991
|
+
value: t,
|
|
1992
1992
|
enumerable: !1,
|
|
1993
1993
|
writable: !0,
|
|
1994
1994
|
configurable: !0
|
|
1995
1995
|
});
|
|
1996
1996
|
}
|
|
1997
|
-
function xe(e,
|
|
1998
|
-
if (
|
|
1999
|
-
return e.map((i) => xe(i,
|
|
2000
|
-
if (!
|
|
1997
|
+
function xe(e, r = {}) {
|
|
1998
|
+
if (fr(e))
|
|
1999
|
+
return e.map((i) => xe(i, r));
|
|
2000
|
+
if (!Wn(e))
|
|
2001
2001
|
return e;
|
|
2002
|
-
const
|
|
2003
|
-
return [...
|
|
2004
|
-
if (
|
|
2002
|
+
const t = Object.getOwnPropertyNames(e), n = Object.getOwnPropertySymbols(e);
|
|
2003
|
+
return [...t, ...n].reduce((i, s) => {
|
|
2004
|
+
if (fr(r.props) && !r.props.includes(s))
|
|
2005
2005
|
return i;
|
|
2006
|
-
const u = e[s], l = xe(u,
|
|
2007
|
-
return
|
|
2006
|
+
const u = e[s], l = xe(u, r);
|
|
2007
|
+
return Bn(i, s, l, e, r.nonenumerable), i;
|
|
2008
2008
|
}, {});
|
|
2009
2009
|
}
|
|
2010
2010
|
class w {
|
|
2011
2011
|
/**
|
|
2012
2012
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
2013
2013
|
*/
|
|
2014
|
-
constructor({ dedupe:
|
|
2015
|
-
this.classRegistry = new
|
|
2014
|
+
constructor({ dedupe: r = !1 } = {}) {
|
|
2015
|
+
this.classRegistry = new bn(), this.symbolRegistry = new Or((t) => t.description ?? ""), this.customTransformerRegistry = new En(), this.allowedErrorProps = [], this.dedupe = r;
|
|
2016
2016
|
}
|
|
2017
|
-
serialize(
|
|
2018
|
-
const
|
|
2017
|
+
serialize(r) {
|
|
2018
|
+
const t = /* @__PURE__ */ new Map(), n = Nr(r, t, this, this.dedupe), i = {
|
|
2019
2019
|
json: n.transformedValue
|
|
2020
2020
|
};
|
|
2021
2021
|
n.annotations && (i.meta = {
|
|
2022
2022
|
...i.meta,
|
|
2023
2023
|
values: n.annotations
|
|
2024
2024
|
});
|
|
2025
|
-
const s =
|
|
2025
|
+
const s = Mn(t, this.dedupe);
|
|
2026
2026
|
return s && (i.meta = {
|
|
2027
2027
|
...i.meta,
|
|
2028
2028
|
referentialEqualities: s
|
|
2029
2029
|
}), i;
|
|
2030
2030
|
}
|
|
2031
|
-
deserialize(
|
|
2032
|
-
const { json:
|
|
2033
|
-
let i = xe(
|
|
2034
|
-
return n != null && n.values && (i =
|
|
2031
|
+
deserialize(r) {
|
|
2032
|
+
const { json: t, meta: n } = r;
|
|
2033
|
+
let i = xe(t);
|
|
2034
|
+
return n != null && n.values && (i = Ln(i, n.values, this)), n != null && n.referentialEqualities && (i = Vn(i, n.referentialEqualities)), i;
|
|
2035
2035
|
}
|
|
2036
|
-
stringify(
|
|
2037
|
-
return JSON.stringify(this.serialize(
|
|
2036
|
+
stringify(r) {
|
|
2037
|
+
return JSON.stringify(this.serialize(r));
|
|
2038
2038
|
}
|
|
2039
|
-
parse(
|
|
2040
|
-
return this.deserialize(JSON.parse(
|
|
2039
|
+
parse(r) {
|
|
2040
|
+
return this.deserialize(JSON.parse(r));
|
|
2041
2041
|
}
|
|
2042
|
-
registerClass(
|
|
2043
|
-
this.classRegistry.register(
|
|
2042
|
+
registerClass(r, t) {
|
|
2043
|
+
this.classRegistry.register(r, t);
|
|
2044
2044
|
}
|
|
2045
|
-
registerSymbol(
|
|
2046
|
-
this.symbolRegistry.register(
|
|
2045
|
+
registerSymbol(r, t) {
|
|
2046
|
+
this.symbolRegistry.register(r, t);
|
|
2047
2047
|
}
|
|
2048
|
-
registerCustom(
|
|
2048
|
+
registerCustom(r, t) {
|
|
2049
2049
|
this.customTransformerRegistry.register({
|
|
2050
|
-
name:
|
|
2051
|
-
...
|
|
2050
|
+
name: t,
|
|
2051
|
+
...r
|
|
2052
2052
|
});
|
|
2053
2053
|
}
|
|
2054
|
-
allowErrorProps(...
|
|
2055
|
-
this.allowedErrorProps.push(...
|
|
2054
|
+
allowErrorProps(...r) {
|
|
2055
|
+
this.allowedErrorProps.push(...r);
|
|
2056
2056
|
}
|
|
2057
2057
|
}
|
|
2058
2058
|
w.defaultInstance = new w();
|
|
@@ -2072,29 +2072,29 @@ w.registerClass;
|
|
|
2072
2072
|
w.registerCustom;
|
|
2073
2073
|
w.registerSymbol;
|
|
2074
2074
|
w.allowErrorProps;
|
|
2075
|
-
const
|
|
2076
|
-
function
|
|
2077
|
-
const
|
|
2075
|
+
const Ur = Rt(null);
|
|
2076
|
+
function Kn(e, r) {
|
|
2077
|
+
const t = Yt({
|
|
2078
2078
|
links: [
|
|
2079
|
-
|
|
2079
|
+
fn({
|
|
2080
2080
|
enabled: (n) => process.env.NODE_ENV === "development" && typeof window < "u" || n.direction === "down" && n.result instanceof Error
|
|
2081
2081
|
}),
|
|
2082
|
-
|
|
2082
|
+
an({
|
|
2083
2083
|
url: `${e}/trpc`,
|
|
2084
2084
|
headers: async () => ({
|
|
2085
|
-
Authorization: `Bearer ${await
|
|
2085
|
+
Authorization: `Bearer ${await r()}`
|
|
2086
2086
|
}),
|
|
2087
2087
|
transformer: w
|
|
2088
2088
|
})
|
|
2089
2089
|
]
|
|
2090
2090
|
});
|
|
2091
2091
|
return {
|
|
2092
|
-
getProjectsForUser: async () => (await
|
|
2092
|
+
getProjectsForUser: async () => (await t.projectRouter.getAllProjects.query()).map((i) => ({
|
|
2093
2093
|
name: i.name,
|
|
2094
2094
|
id: i.id
|
|
2095
2095
|
})),
|
|
2096
2096
|
addProjectForUser: async (n) => {
|
|
2097
|
-
const i = await
|
|
2097
|
+
const i = await t.projectRouter.createProject.mutate({
|
|
2098
2098
|
name: n
|
|
2099
2099
|
});
|
|
2100
2100
|
return {
|
|
@@ -2105,7 +2105,7 @@ function Yn(e, t) {
|
|
|
2105
2105
|
addFilesToProject: async (n, i) => {
|
|
2106
2106
|
const s = [];
|
|
2107
2107
|
for (const u of i) {
|
|
2108
|
-
const l = await
|
|
2108
|
+
const l = await t.fileRouter.createFile.mutate({
|
|
2109
2109
|
file: {
|
|
2110
2110
|
projectId: n,
|
|
2111
2111
|
mimeType: _e.PDF,
|
|
@@ -2117,7 +2117,8 @@ function Yn(e, t) {
|
|
|
2117
2117
|
// You might need to calculate or pass size
|
|
2118
2118
|
metadata: null,
|
|
2119
2119
|
isArtifact: !1,
|
|
2120
|
-
summary: null
|
|
2120
|
+
summary: null,
|
|
2121
|
+
chunkingStatus: wr.NOT_CHUNKED
|
|
2121
2122
|
}
|
|
2122
2123
|
});
|
|
2123
2124
|
s.push({
|
|
@@ -2129,7 +2130,7 @@ function Yn(e, t) {
|
|
|
2129
2130
|
}
|
|
2130
2131
|
return s;
|
|
2131
2132
|
},
|
|
2132
|
-
getFilesForProject: async (n) => (await
|
|
2133
|
+
getFilesForProject: async (n) => (await t.fileRouter.getFilesByProject.query({
|
|
2133
2134
|
projectId: n
|
|
2134
2135
|
})).map((s) => ({
|
|
2135
2136
|
blobUrl: s.path,
|
|
@@ -2139,47 +2140,47 @@ function Yn(e, t) {
|
|
|
2139
2140
|
}))
|
|
2140
2141
|
};
|
|
2141
2142
|
}
|
|
2142
|
-
function
|
|
2143
|
+
function Jn({
|
|
2143
2144
|
children: e,
|
|
2144
|
-
host:
|
|
2145
|
-
port:
|
|
2146
|
-
getToken: n
|
|
2145
|
+
host: r = "http://localhost",
|
|
2146
|
+
port: t = 5174,
|
|
2147
|
+
getToken: n
|
|
2147
2148
|
}) {
|
|
2148
2149
|
const [i, s] = Ee(null);
|
|
2149
|
-
return
|
|
2150
|
-
const u = `${
|
|
2150
|
+
return Pt(() => {
|
|
2151
|
+
const u = `${r}:${t}`, l = Kn(u, n);
|
|
2151
2152
|
s(l);
|
|
2152
|
-
}, [
|
|
2153
|
+
}, [r, t, n]), /* @__PURE__ */ Pe.jsx(Ur.Provider, { value: { host: r, port: t, client: i }, children: e });
|
|
2153
2154
|
}
|
|
2154
|
-
function
|
|
2155
|
-
const e =
|
|
2155
|
+
function Lr() {
|
|
2156
|
+
const e = Ot(Ur);
|
|
2156
2157
|
if (!e)
|
|
2157
2158
|
throw new Error("useFolioContext must be used within a FolioProvider");
|
|
2158
2159
|
return e;
|
|
2159
2160
|
}
|
|
2160
|
-
const { useEffect:
|
|
2161
|
-
function
|
|
2161
|
+
const { useEffect: Yn, useRef: Hn, useState: Gn } = Et;
|
|
2162
|
+
function Zn({
|
|
2162
2163
|
width: e = "100%",
|
|
2163
|
-
height:
|
|
2164
|
-
allow:
|
|
2164
|
+
height: r = "100vh",
|
|
2165
|
+
allow: t = "camera; microphone; clipboard-read; clipboard-write; fullscreen",
|
|
2165
2166
|
style: n,
|
|
2166
2167
|
className: i = "",
|
|
2167
2168
|
iframeProps: s = {}
|
|
2168
2169
|
}) {
|
|
2169
|
-
const { host: u, port: l } =
|
|
2170
|
-
return
|
|
2170
|
+
const { host: u, port: l } = Lr(), a = Hn(null), [f, m] = Gn();
|
|
2171
|
+
return Yn(() => {
|
|
2171
2172
|
m(`${u}:${l}`);
|
|
2172
|
-
}, [u, l]), f ? /* @__PURE__ */
|
|
2173
|
+
}, [u, l]), f ? /* @__PURE__ */ Pe.jsx(
|
|
2173
2174
|
"div",
|
|
2174
2175
|
{
|
|
2175
2176
|
className: `folio-embed-container ${i}`,
|
|
2176
2177
|
style: {
|
|
2177
2178
|
width: e,
|
|
2178
|
-
height:
|
|
2179
|
+
height: r,
|
|
2179
2180
|
overflow: "hidden",
|
|
2180
2181
|
...n
|
|
2181
2182
|
},
|
|
2182
|
-
children: /* @__PURE__ */
|
|
2183
|
+
children: /* @__PURE__ */ Pe.jsx(
|
|
2183
2184
|
"iframe",
|
|
2184
2185
|
{
|
|
2185
2186
|
ref: a,
|
|
@@ -2192,7 +2193,7 @@ function Qn({
|
|
|
2192
2193
|
height: "100%",
|
|
2193
2194
|
overflow: "auto"
|
|
2194
2195
|
},
|
|
2195
|
-
allow:
|
|
2196
|
+
allow: t,
|
|
2196
2197
|
allowFullScreen: !0,
|
|
2197
2198
|
...s
|
|
2198
2199
|
}
|
|
@@ -2200,63 +2201,63 @@ function Qn({
|
|
|
2200
2201
|
}
|
|
2201
2202
|
) : null;
|
|
2202
2203
|
}
|
|
2203
|
-
function
|
|
2204
|
-
const { client: e } =
|
|
2204
|
+
function Qn() {
|
|
2205
|
+
const { client: e } = Lr(), [r, t] = Ee(!1), [n, i] = Ee(null);
|
|
2205
2206
|
return {
|
|
2206
|
-
isLoading:
|
|
2207
|
+
isLoading: r,
|
|
2207
2208
|
error: n,
|
|
2208
2209
|
getProjectsForUser: async () => {
|
|
2209
2210
|
for (; !e; )
|
|
2210
2211
|
await new Promise((f) => setTimeout(f, 100));
|
|
2211
|
-
|
|
2212
|
+
t(!0), i(null);
|
|
2212
2213
|
try {
|
|
2213
2214
|
return await e.getProjectsForUser();
|
|
2214
2215
|
} catch (f) {
|
|
2215
2216
|
return i(f instanceof Error ? f : new Error(String(f))), [];
|
|
2216
2217
|
} finally {
|
|
2217
|
-
|
|
2218
|
+
t(!1);
|
|
2218
2219
|
}
|
|
2219
2220
|
},
|
|
2220
2221
|
addProjectForUser: async (f) => {
|
|
2221
2222
|
for (; !e; )
|
|
2222
2223
|
await new Promise((m) => setTimeout(m, 100));
|
|
2223
|
-
|
|
2224
|
+
t(!0), i(null);
|
|
2224
2225
|
try {
|
|
2225
2226
|
return await e.addProjectForUser(f);
|
|
2226
2227
|
} catch (m) {
|
|
2227
2228
|
return i(m instanceof Error ? m : new Error(String(m))), null;
|
|
2228
2229
|
} finally {
|
|
2229
|
-
|
|
2230
|
+
t(!1);
|
|
2230
2231
|
}
|
|
2231
2232
|
},
|
|
2232
2233
|
addFilesToProject: async (f, m) => {
|
|
2233
2234
|
for (; !e; )
|
|
2234
2235
|
await new Promise((p) => setTimeout(p, 100));
|
|
2235
|
-
|
|
2236
|
+
t(!0), i(null);
|
|
2236
2237
|
try {
|
|
2237
2238
|
return await e.addFilesToProject(f, m);
|
|
2238
2239
|
} catch (p) {
|
|
2239
2240
|
return i(p instanceof Error ? p : new Error(String(p))), null;
|
|
2240
2241
|
} finally {
|
|
2241
|
-
|
|
2242
|
+
t(!1);
|
|
2242
2243
|
}
|
|
2243
2244
|
},
|
|
2244
2245
|
getFilesForProject: async (f) => {
|
|
2245
2246
|
for (; !e; )
|
|
2246
2247
|
await new Promise((m) => setTimeout(m, 100));
|
|
2247
|
-
|
|
2248
|
+
t(!0), i(null);
|
|
2248
2249
|
try {
|
|
2249
2250
|
return await e.getFilesForProject(f);
|
|
2250
2251
|
} catch (m) {
|
|
2251
2252
|
return i(m instanceof Error ? m : new Error(String(m))), [];
|
|
2252
2253
|
} finally {
|
|
2253
|
-
|
|
2254
|
+
t(!1);
|
|
2254
2255
|
}
|
|
2255
2256
|
}
|
|
2256
2257
|
};
|
|
2257
2258
|
}
|
|
2258
2259
|
export {
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2260
|
+
Zn as FolioEmbed,
|
|
2261
|
+
Jn as FolioProvider,
|
|
2262
|
+
Qn as useFolio
|
|
2262
2263
|
};
|