@animaapp/anima-sdk-react 0.6.33 → 0.6.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +285 -285
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11,19 +11,19 @@ var _r = (n, e, t) => e in n ? ks(n, e, { enumerable: !0, configurable: !0, writ
|
|
|
11
11
|
return n;
|
|
12
12
|
}, br = (n, e) => xs(n, Es(e));
|
|
13
13
|
var Ze = (n, e, t) => new Promise((r, s) => {
|
|
14
|
-
var a = (
|
|
14
|
+
var a = (c) => {
|
|
15
15
|
try {
|
|
16
|
-
o(t.next(
|
|
17
|
-
} catch (
|
|
18
|
-
s(
|
|
16
|
+
o(t.next(c));
|
|
17
|
+
} catch (u) {
|
|
18
|
+
s(u);
|
|
19
19
|
}
|
|
20
|
-
}, i = (
|
|
20
|
+
}, i = (c) => {
|
|
21
21
|
try {
|
|
22
|
-
o(t.throw(
|
|
23
|
-
} catch (
|
|
24
|
-
s(
|
|
22
|
+
o(t.throw(c));
|
|
23
|
+
} catch (u) {
|
|
24
|
+
s(u);
|
|
25
25
|
}
|
|
26
|
-
}, o = (
|
|
26
|
+
}, o = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(a, i);
|
|
27
27
|
o((t = t.apply(n, e)).next());
|
|
28
28
|
});
|
|
29
29
|
import Dt, { useState as Ts, useCallback as Bt, createContext as As, useEffect as Cs, useLayoutEffect as Rs, useContext as js, useRef as qe, useMemo as Ns, useDebugValue as Is } from "react";
|
|
@@ -35,19 +35,19 @@ var Zs = Object.defineProperty, Ls = Object.defineProperties, Ps = Object.getOwn
|
|
|
35
35
|
Ds.call(e, t) && kr(n, t, e[t]);
|
|
36
36
|
return n;
|
|
37
37
|
}, S = (n, e) => Ls(n, Ps(e)), xe = (n, e, t) => new Promise((r, s) => {
|
|
38
|
-
var a = (
|
|
38
|
+
var a = (c) => {
|
|
39
39
|
try {
|
|
40
|
-
o(t.next(
|
|
41
|
-
} catch (
|
|
42
|
-
s(
|
|
40
|
+
o(t.next(c));
|
|
41
|
+
} catch (u) {
|
|
42
|
+
s(u);
|
|
43
43
|
}
|
|
44
|
-
}, i = (
|
|
44
|
+
}, i = (c) => {
|
|
45
45
|
try {
|
|
46
|
-
o(t.throw(
|
|
47
|
-
} catch (
|
|
48
|
-
s(
|
|
46
|
+
o(t.throw(c));
|
|
47
|
+
} catch (u) {
|
|
48
|
+
s(u);
|
|
49
49
|
}
|
|
50
|
-
}, o = (
|
|
50
|
+
}, o = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(a, i);
|
|
51
51
|
o((t = t.apply(n, e)).next());
|
|
52
52
|
});
|
|
53
53
|
class fn extends Error {
|
|
@@ -123,21 +123,21 @@ var Js = Object.defineProperty, Xs = Object.defineProperties, Ys = Object.getOwn
|
|
|
123
123
|
ea.call(e, t) && Sr(n, t, e[t]);
|
|
124
124
|
return n;
|
|
125
125
|
}, nr = (n, e) => Xs(n, Ys(e)), rr = (n, e, t) => e.has(n) || Hr("Cannot " + t), I = (n, e, t) => (rr(n, e, "read from private field"), t ? t.call(n) : e.get(n)), le = (n, e, t) => e.has(n) ? Hr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), Y = (n, e, t, r) => (rr(n, e, "write to private field"), e.set(n, t), t), be = (n, e, t) => (rr(n, e, "access private method"), t), z = (n, e, t) => new Promise((r, s) => {
|
|
126
|
-
var a = (
|
|
126
|
+
var a = (c) => {
|
|
127
127
|
try {
|
|
128
|
-
o(t.next(
|
|
129
|
-
} catch (
|
|
130
|
-
s(
|
|
128
|
+
o(t.next(c));
|
|
129
|
+
} catch (u) {
|
|
130
|
+
s(u);
|
|
131
131
|
}
|
|
132
|
-
}, i = (
|
|
132
|
+
}, i = (c) => {
|
|
133
133
|
try {
|
|
134
|
-
o(t.throw(
|
|
135
|
-
} catch (
|
|
136
|
-
s(
|
|
134
|
+
o(t.throw(c));
|
|
135
|
+
} catch (u) {
|
|
136
|
+
s(u);
|
|
137
137
|
}
|
|
138
|
-
}, o = (
|
|
138
|
+
}, o = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(a, i);
|
|
139
139
|
o((t = t.apply(n, e)).next());
|
|
140
|
-
}), ta = (n, e, t) => (e = n[Er("asyncIterator")]) ? e.call(n) : (n = n[Er("iterator")](), e = {}, t = (r, s) => (s = n[r]) && (e[r] = (a) => new Promise((i, o,
|
|
140
|
+
}), ta = (n, e, t) => (e = n[Er("asyncIterator")]) ? e.call(n) : (n = n[Er("iterator")](), e = {}, t = (r, s) => (s = n[r]) && (e[r] = (a) => new Promise((i, o, c) => (a = s.call(n, a), c = a.done, Promise.resolve(a.value).then((u) => i({ value: u, done: c }), o)))), t("next"), t("return"), e), na = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
|
|
141
141
|
function ra(n) {
|
|
142
142
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
143
143
|
}
|
|
@@ -147,7 +147,7 @@ function aa() {
|
|
|
147
147
|
(function(t, r) {
|
|
148
148
|
n.exports = r();
|
|
149
149
|
})(sa, function() {
|
|
150
|
-
var t = typeof Promise == "function", r = typeof self == "object" ? self : na, s = typeof Symbol != "undefined", a = typeof Map != "undefined", i = typeof Set != "undefined", o = typeof WeakMap != "undefined",
|
|
150
|
+
var t = typeof Promise == "function", r = typeof self == "object" ? self : na, s = typeof Symbol != "undefined", a = typeof Map != "undefined", i = typeof Set != "undefined", o = typeof WeakMap != "undefined", c = typeof WeakSet != "undefined", u = typeof DataView != "undefined", f = s && typeof Symbol.iterator != "undefined", p = s && typeof Symbol.toStringTag != "undefined", w = i && typeof Set.prototype.entries == "function", _ = a && typeof Map.prototype.entries == "function", b = w && Object.getPrototypeOf((/* @__PURE__ */ new Set()).entries()), m = _ && Object.getPrototypeOf((/* @__PURE__ */ new Map()).entries()), v = f && typeof Array.prototype[Symbol.iterator] == "function", h = v && Object.getPrototypeOf([][Symbol.iterator]()), x = f && typeof String.prototype[Symbol.iterator] == "function", P = x && Object.getPrototypeOf(""[Symbol.iterator]()), V = 8, $ = -1;
|
|
151
151
|
function q(M) {
|
|
152
152
|
var Z = typeof M;
|
|
153
153
|
if (Z !== "object")
|
|
@@ -178,18 +178,18 @@ function aa() {
|
|
|
178
178
|
return "HTMLTableHeaderCellElement";
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
var
|
|
182
|
-
if (typeof
|
|
183
|
-
return
|
|
181
|
+
var ce = p && M[Symbol.toStringTag];
|
|
182
|
+
if (typeof ce == "string")
|
|
183
|
+
return ce;
|
|
184
184
|
var L = Object.getPrototypeOf(M);
|
|
185
|
-
return L === RegExp.prototype ? "RegExp" : L === Date.prototype ? "Date" : t && L === Promise.prototype ? "Promise" : i && L === Set.prototype ? "Set" : a && L === Map.prototype ? "Map" :
|
|
185
|
+
return L === RegExp.prototype ? "RegExp" : L === Date.prototype ? "Date" : t && L === Promise.prototype ? "Promise" : i && L === Set.prototype ? "Set" : a && L === Map.prototype ? "Map" : c && L === WeakSet.prototype ? "WeakSet" : o && L === WeakMap.prototype ? "WeakMap" : u && L === DataView.prototype ? "DataView" : a && L === m ? "Map Iterator" : i && L === b ? "Set Iterator" : v && L === h ? "Array Iterator" : x && L === P ? "String Iterator" : L === null ? "Object" : Object.prototype.toString.call(M).slice(V, $);
|
|
186
186
|
}
|
|
187
187
|
return q;
|
|
188
188
|
});
|
|
189
189
|
}(Tn)), Tn.exports;
|
|
190
190
|
}
|
|
191
191
|
var ia = aa();
|
|
192
|
-
const oa = /* @__PURE__ */ ra(ia), sr = typeof Buffer != "undefined",
|
|
192
|
+
const oa = /* @__PURE__ */ ra(ia), sr = typeof Buffer != "undefined", ca = sr && typeof Buffer.from != "undefined", ua = sr ? (
|
|
193
193
|
/**
|
|
194
194
|
* is value is Buffer?
|
|
195
195
|
*
|
|
@@ -210,7 +210,7 @@ const oa = /* @__PURE__ */ ra(ia), sr = typeof Buffer != "undefined", ua = sr &&
|
|
|
210
210
|
function() {
|
|
211
211
|
return !1;
|
|
212
212
|
}
|
|
213
|
-
), da =
|
|
213
|
+
), da = ca ? (
|
|
214
214
|
/**
|
|
215
215
|
* copy Buffer
|
|
216
216
|
*
|
|
@@ -245,8 +245,8 @@ const oa = /* @__PURE__ */ ra(ia), sr = typeof Buffer != "undefined", ua = sr &&
|
|
|
245
245
|
return n;
|
|
246
246
|
}
|
|
247
247
|
);
|
|
248
|
-
function
|
|
249
|
-
return
|
|
248
|
+
function ut(n) {
|
|
249
|
+
return ua(n) ? "Buffer" : oa(n);
|
|
250
250
|
}
|
|
251
251
|
const la = /* @__PURE__ */ new Set([
|
|
252
252
|
"Arguments",
|
|
@@ -256,7 +256,7 @@ const la = /* @__PURE__ */ new Set([
|
|
|
256
256
|
"Set"
|
|
257
257
|
]);
|
|
258
258
|
function ha(n, e, t = null) {
|
|
259
|
-
switch (t ||
|
|
259
|
+
switch (t || ut(n)) {
|
|
260
260
|
case "Arguments":
|
|
261
261
|
case "Array":
|
|
262
262
|
case "Object":
|
|
@@ -271,7 +271,7 @@ function An(n) {
|
|
|
271
271
|
return la.has(n);
|
|
272
272
|
}
|
|
273
273
|
function Tr(n, e, t, r = null) {
|
|
274
|
-
switch (r ||
|
|
274
|
+
switch (r || ut(n)) {
|
|
275
275
|
case "Arguments":
|
|
276
276
|
case "Array":
|
|
277
277
|
case "Object":
|
|
@@ -390,7 +390,7 @@ function Aa() {
|
|
|
390
390
|
}
|
|
391
391
|
function Cn(n, e = null, t = Aa) {
|
|
392
392
|
arguments.length === 2 && typeof e == "function" && (t = e, e = null);
|
|
393
|
-
const r = e ||
|
|
393
|
+
const r = e || ut(n), s = Ta.get(r);
|
|
394
394
|
if (r === "Object") {
|
|
395
395
|
const a = t(n, r);
|
|
396
396
|
if (a !== void 0)
|
|
@@ -407,14 +407,14 @@ function pt(n, e = {}) {
|
|
|
407
407
|
customizer: t
|
|
408
408
|
// TODO: max depth
|
|
409
409
|
// depth = Infinity,
|
|
410
|
-
} = e, r =
|
|
410
|
+
} = e, r = ut(n);
|
|
411
411
|
if (!An(r))
|
|
412
412
|
return Rn(n, null, null, null);
|
|
413
413
|
const s = Cn(n, r, t), a = new WeakMap([[n, s]]), i = new WeakSet([n]);
|
|
414
414
|
return Rn(n, s, a, i);
|
|
415
415
|
}
|
|
416
416
|
function Rn(n, e, t, r, s) {
|
|
417
|
-
const a =
|
|
417
|
+
const a = ut(n), i = Cn(n, a);
|
|
418
418
|
if (!An(a))
|
|
419
419
|
return i;
|
|
420
420
|
let o;
|
|
@@ -431,17 +431,17 @@ function Rn(n, e, t, r, s) {
|
|
|
431
431
|
o = n.keys();
|
|
432
432
|
break;
|
|
433
433
|
}
|
|
434
|
-
for (let
|
|
435
|
-
const
|
|
436
|
-
if (r.has(
|
|
437
|
-
Tr(e,
|
|
434
|
+
for (let c of o) {
|
|
435
|
+
const u = ha(n, c, a);
|
|
436
|
+
if (r.has(u))
|
|
437
|
+
Tr(e, c, t.get(u), a);
|
|
438
438
|
else {
|
|
439
|
-
const f =
|
|
440
|
-
An(f) && (t.set(
|
|
439
|
+
const f = ut(u), p = Cn(u, f);
|
|
440
|
+
An(f) && (t.set(u, p), r.add(u)), Tr(
|
|
441
441
|
e,
|
|
442
|
-
|
|
442
|
+
c,
|
|
443
443
|
Rn(
|
|
444
|
-
|
|
444
|
+
u,
|
|
445
445
|
p,
|
|
446
446
|
t,
|
|
447
447
|
r
|
|
@@ -509,10 +509,10 @@ class Za extends Error {
|
|
|
509
509
|
if (super(`API Error on resource "${e}" at api "${t}"`), this.causeProperties = {}, this.name = "API Error", this.resource = e, this.api = t, this.cause = s, this.args = r, s instanceof Error)
|
|
510
510
|
for (const [i, o] of Object.entries(s))
|
|
511
511
|
if (typeof Headers != "undefined" && o instanceof Headers) {
|
|
512
|
-
const
|
|
513
|
-
o.forEach((
|
|
514
|
-
|
|
515
|
-
}), this.causeProperties[i] =
|
|
512
|
+
const c = {};
|
|
513
|
+
o.forEach((u, f) => {
|
|
514
|
+
c[f] = u;
|
|
515
|
+
}), this.causeProperties[i] = c;
|
|
516
516
|
} else
|
|
517
517
|
this.causeProperties[i] = o;
|
|
518
518
|
const a = this.causeProperties.body;
|
|
@@ -584,8 +584,8 @@ class Da {
|
|
|
584
584
|
return z(this, arguments, function* (t, r = {}) {
|
|
585
585
|
const { overrideBaseAddress: s, overrideDefaultHeaders: a } = r, i = s != null ? s : this.baseAddress;
|
|
586
586
|
let o = a != null ? a : this.headers;
|
|
587
|
-
const
|
|
588
|
-
return Y(this, se, {}),
|
|
587
|
+
const c = pt(I(this, se));
|
|
588
|
+
return Y(this, se, {}), c.extraHeaders && (o = ie(ie({}, o), c.extraHeaders)), c.requestValidation && (o = nr(ie({}, o), { "X-Request-Nonce": Jr(), "X-Request-Timestamp": Nn() })), c.async ? yield be(this, ve, Zn).call(this, `${i}${t}`, c.async, { headers: o }) : yield be(this, ve, In).call(this, `${i}${t}`, c, { headers: o });
|
|
589
589
|
});
|
|
590
590
|
}
|
|
591
591
|
post(e, t) {
|
|
@@ -616,41 +616,41 @@ class Da {
|
|
|
616
616
|
Be = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakSet(), In = function(n, e, t) {
|
|
617
617
|
return z(this, null, function* () {
|
|
618
618
|
const r = () => z(this, null, function* () {
|
|
619
|
-
var
|
|
619
|
+
var c, u;
|
|
620
620
|
try {
|
|
621
621
|
return yield I(this, Be).call(this, n, ie(ie({}, t), e.abortSignal && { signal: e.abortSignal }));
|
|
622
622
|
} catch (f) {
|
|
623
|
-
throw f instanceof Error && f.name === "AbortError" ? new mt({ canceled: (
|
|
623
|
+
throw f instanceof Error && f.name === "AbortError" ? new mt({ canceled: (u = (c = e.abortSignal) == null ? void 0 : c.aborted) != null ? u : !1 }) : f;
|
|
624
624
|
}
|
|
625
|
-
}), { headers: s } = t != null ? t : {}, a = (
|
|
625
|
+
}), { headers: s } = t != null ? t : {}, a = (c, u) => {
|
|
626
626
|
var f, p;
|
|
627
|
-
return ((f =
|
|
628
|
-
}, i = (
|
|
629
|
-
var
|
|
630
|
-
if (!
|
|
631
|
-
const p = yield
|
|
627
|
+
return ((f = c == null ? void 0 : c.headers) == null ? void 0 : f.get(u)) || ((p = c == null ? void 0 : c.headersObject) == null ? void 0 : p[u]) || "";
|
|
628
|
+
}, i = (c) => z(this, null, function* () {
|
|
629
|
+
var u;
|
|
630
|
+
if (!c.ok) {
|
|
631
|
+
const p = yield c.text().catch();
|
|
632
632
|
throw new Cr({
|
|
633
633
|
url: n,
|
|
634
|
-
method: (
|
|
635
|
-
statusCode:
|
|
634
|
+
method: (u = t == null ? void 0 : t.method) != null ? u : "GET",
|
|
635
|
+
statusCode: c.status,
|
|
636
636
|
requestHeaders: s,
|
|
637
|
-
responseHeaders:
|
|
637
|
+
responseHeaders: c.headers,
|
|
638
638
|
body: p
|
|
639
639
|
});
|
|
640
640
|
}
|
|
641
641
|
if (e.requestValidation && process.env.UI_TESTS !== !0)
|
|
642
642
|
try {
|
|
643
|
-
const p = a(
|
|
643
|
+
const p = a(c, "x-response-nonce"), w = s == null ? void 0 : s["X-Request-Nonce"];
|
|
644
644
|
if (!p || p !== w)
|
|
645
645
|
throw new mn("Response nonce mismatch");
|
|
646
|
-
const _ = Number(a(
|
|
646
|
+
const _ = Number(a(c, "x-response-timestamp")), b = Number(Nn()), m = 60 * 60 * 24;
|
|
647
647
|
if (isNaN(_) || Math.abs(b - _) > m)
|
|
648
648
|
throw new mn("Invalid response timestamp");
|
|
649
649
|
} catch (p) {
|
|
650
650
|
const w = p instanceof Error ? p.message : "Request validation failed";
|
|
651
651
|
throw new mn(w);
|
|
652
652
|
}
|
|
653
|
-
let f = yield
|
|
653
|
+
let f = yield c.text();
|
|
654
654
|
try {
|
|
655
655
|
f = JSON.parse(f);
|
|
656
656
|
} catch (p) {
|
|
@@ -658,11 +658,11 @@ Be = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ve = /*
|
|
|
658
658
|
return f;
|
|
659
659
|
});
|
|
660
660
|
if (e.retry) {
|
|
661
|
-
const
|
|
661
|
+
const c = yield new Ra({
|
|
662
662
|
maxAttempts: e.retry,
|
|
663
663
|
func: r
|
|
664
664
|
}).run();
|
|
665
|
-
return yield i(
|
|
665
|
+
return yield i(c);
|
|
666
666
|
}
|
|
667
667
|
const o = yield r();
|
|
668
668
|
return yield i(o);
|
|
@@ -674,11 +674,11 @@ Be = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ve = /*
|
|
|
674
674
|
onProgress: a,
|
|
675
675
|
abortSignal: i,
|
|
676
676
|
pollingInterval: o = () => Ma,
|
|
677
|
-
maxTimeout:
|
|
678
|
-
} = e,
|
|
677
|
+
maxTimeout: c = Pa
|
|
678
|
+
} = e, u = `${n}/async`, f = `${n}/async/job`;
|
|
679
679
|
let p;
|
|
680
680
|
try {
|
|
681
|
-
p = yield I(this, Be).call(this,
|
|
681
|
+
p = yield I(this, Be).call(this, u, ie(ie({}, t), i && { signal: i }));
|
|
682
682
|
} catch (b) {
|
|
683
683
|
throw b instanceof Error && b.name === "AbortError" ? new mt({ canceled: (r = i == null ? void 0 : i.aborted) != null ? r : !1 }) : b;
|
|
684
684
|
}
|
|
@@ -699,7 +699,7 @@ Be = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ve = /*
|
|
|
699
699
|
return new Promise((b, m) => z(this, null, function* () {
|
|
700
700
|
const v = setTimeout(() => {
|
|
701
701
|
m(new Error("Job timed out"));
|
|
702
|
-
},
|
|
702
|
+
}, c), h = (x = 0) => z(this, null, function* () {
|
|
703
703
|
if (i != null && i.aborted) {
|
|
704
704
|
clearTimeout(v), I(this, Be).call(this, `${f}/${_}/cancel`, { method: "POST", headers: this.headers }).then(() => {
|
|
705
705
|
m(new mt({ canceled: !0 }));
|
|
@@ -731,14 +731,14 @@ Be = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ve = /*
|
|
|
731
731
|
}, yt = function(n, e, t, r, s) {
|
|
732
732
|
return z(this, null, function* () {
|
|
733
733
|
const { overrideBaseAddress: a, overrideDefaultHeaders: i } = r, o = a != null ? a : this.baseAddress;
|
|
734
|
-
let
|
|
735
|
-
s.extraHeaders && (
|
|
736
|
-
let
|
|
737
|
-
return typeof FormData != "undefined" && t instanceof FormData ? delete
|
|
734
|
+
let c = i != null ? i : this.headers;
|
|
735
|
+
s.extraHeaders && (c = ie(ie({}, c), s.extraHeaders)), s.requestValidation && (c = nr(ie({}, c), { "X-Request-Nonce": Jr(), "X-Request-Timestamp": Nn() }));
|
|
736
|
+
let u = t;
|
|
737
|
+
return typeof FormData != "undefined" && t instanceof FormData ? delete c["Content-Type"] : (u = r.skipBodyJsonStringify ? t : JSON.stringify(t), s.compress && ja() && (c["Content-Encoding"] = "gzip", u = yield Na(u))), s.async ? yield be(this, ve, Zn).call(this, `${o}${n}`, s.async, {
|
|
738
738
|
method: e,
|
|
739
|
-
headers:
|
|
740
|
-
body:
|
|
741
|
-
}) : yield be(this, ve, In).call(this, `${o}${n}`, s, { method: e, headers:
|
|
739
|
+
headers: c,
|
|
740
|
+
body: u
|
|
741
|
+
}) : yield be(this, ve, In).call(this, `${o}${n}`, s, { method: e, headers: c, body: u });
|
|
742
742
|
});
|
|
743
743
|
};
|
|
744
744
|
const Rr = (n, e, t, r) => n instanceof mt ? n : new Za({ resource: e, api: String(t), args: r, cause: n }), yn = (n, e) => new Proxy(e, {
|
|
@@ -746,9 +746,9 @@ const Rr = (n, e, t, r) => n instanceof mt ? n : new Za({ resource: e, api: Stri
|
|
|
746
746
|
return (...s) => {
|
|
747
747
|
var a;
|
|
748
748
|
for (const o of n.plugins) {
|
|
749
|
-
const
|
|
750
|
-
if (
|
|
751
|
-
return
|
|
749
|
+
const c = (a = o.beforeApi) == null ? void 0 : a.call(o, { resource: t.resourceName, api: r, args: s });
|
|
750
|
+
if (c !== void 0)
|
|
751
|
+
return c;
|
|
752
752
|
}
|
|
753
753
|
let i;
|
|
754
754
|
try {
|
|
@@ -803,13 +803,13 @@ class Va {
|
|
|
803
803
|
if (Wa(o))
|
|
804
804
|
return o.result;
|
|
805
805
|
o && I(this, _e).cache.images.entries.delete(i);
|
|
806
|
-
const
|
|
807
|
-
if (
|
|
808
|
-
return
|
|
809
|
-
const
|
|
810
|
-
I(this, _e).cache.images.pendingRequests.set(i,
|
|
806
|
+
const c = I(this, _e).cache.images.pendingRequests.get(i);
|
|
807
|
+
if (c)
|
|
808
|
+
return c;
|
|
809
|
+
const u = be(this, Ln, Xr).call(this, i, t, r, s, a);
|
|
810
|
+
I(this, _e).cache.images.pendingRequests.set(i, u);
|
|
811
811
|
try {
|
|
812
|
-
return yield
|
|
812
|
+
return yield u;
|
|
813
813
|
} finally {
|
|
814
814
|
I(this, _e).cache.images.pendingRequests.delete(i);
|
|
815
815
|
}
|
|
@@ -1019,10 +1019,10 @@ class oe extends Error {
|
|
|
1019
1019
|
else if (i.path.length === 0)
|
|
1020
1020
|
r._errors.push(t(i));
|
|
1021
1021
|
else {
|
|
1022
|
-
let o = r,
|
|
1023
|
-
for (;
|
|
1024
|
-
const
|
|
1025
|
-
|
|
1022
|
+
let o = r, c = 0;
|
|
1023
|
+
for (; c < i.path.length; ) {
|
|
1024
|
+
const u = i.path[c];
|
|
1025
|
+
c === i.path.length - 1 ? (o[u] = o[u] || { _errors: [] }, o[u]._errors.push(t(i))) : o[u] = o[u] || { _errors: [] }, o = o[u], c++;
|
|
1026
1026
|
}
|
|
1027
1027
|
}
|
|
1028
1028
|
};
|
|
@@ -1125,9 +1125,9 @@ const en = (n) => {
|
|
|
1125
1125
|
message: s.message
|
|
1126
1126
|
});
|
|
1127
1127
|
let o = "";
|
|
1128
|
-
const
|
|
1129
|
-
for (const
|
|
1130
|
-
o =
|
|
1128
|
+
const c = r.filter((u) => !!u).slice().reverse();
|
|
1129
|
+
for (const u of c)
|
|
1130
|
+
o = u(i, { data: e, defaultError: o }).message;
|
|
1131
1131
|
return S(d({}, s), {
|
|
1132
1132
|
path: a,
|
|
1133
1133
|
message: o
|
|
@@ -1240,9 +1240,9 @@ function T(n) {
|
|
|
1240
1240
|
if (e && (t || r))
|
|
1241
1241
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
1242
1242
|
return e ? { errorMap: e, description: s } : { errorMap: (a, i) => {
|
|
1243
|
-
var o,
|
|
1244
|
-
const { message:
|
|
1245
|
-
return a.code === "invalid_enum_value" ? { message:
|
|
1243
|
+
var o, c;
|
|
1244
|
+
const { message: u } = n;
|
|
1245
|
+
return a.code === "invalid_enum_value" ? { message: u != null ? u : i.defaultError } : typeof i.data == "undefined" ? { message: (o = u != null ? u : r) !== null && o !== void 0 ? o : i.defaultError } : a.code !== "invalid_type" ? { message: i.defaultError } : { message: (c = u != null ? u : t) !== null && c !== void 0 ? c : i.defaultError };
|
|
1246
1246
|
}, description: s };
|
|
1247
1247
|
}
|
|
1248
1248
|
class A {
|
|
@@ -1371,7 +1371,7 @@ class A {
|
|
|
1371
1371
|
const i = e(s), o = () => a.addIssue(d({
|
|
1372
1372
|
code: l.custom
|
|
1373
1373
|
}, r(s)));
|
|
1374
|
-
return typeof Promise != "undefined" && i instanceof Promise ? i.then((
|
|
1374
|
+
return typeof Promise != "undefined" && i instanceof Promise ? i.then((c) => c ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
|
|
1375
1375
|
});
|
|
1376
1376
|
}
|
|
1377
1377
|
refinement(e, t) {
|
|
@@ -1465,7 +1465,7 @@ class A {
|
|
|
1465
1465
|
}
|
|
1466
1466
|
const Ga = /^c[^\s-]{8,}$/i, Ja = /^[0-9a-z]+$/, Xa = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Ya = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Qa = /^[a-z0-9_-]{21}$/i, ei = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, ti = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, ni = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ri = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
1467
1467
|
let gn;
|
|
1468
|
-
const si = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ai = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, ii = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, oi = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,
|
|
1468
|
+
const si = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ai = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, ii = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, oi = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ci = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ui = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, es = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", di = new RegExp(`^${es}$`);
|
|
1469
1469
|
function ts(n) {
|
|
1470
1470
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
1471
1471
|
return n.precision ? e = `${e}\\.\\d{${n.precision}}` : n.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
@@ -1638,11 +1638,11 @@ class pe extends A {
|
|
|
1638
1638
|
validation: "cidr",
|
|
1639
1639
|
code: l.invalid_string,
|
|
1640
1640
|
message: s.message
|
|
1641
|
-
}), t.dirty()) : s.kind === "base64" ?
|
|
1641
|
+
}), t.dirty()) : s.kind === "base64" ? ci.test(e.data) || (r = this._getOrReturnCtx(e, r), y(r, {
|
|
1642
1642
|
validation: "base64",
|
|
1643
1643
|
code: l.invalid_string,
|
|
1644
1644
|
message: s.message
|
|
1645
|
-
}), t.dirty()) : s.kind === "base64url" ?
|
|
1645
|
+
}), t.dirty()) : s.kind === "base64url" ? ui.test(e.data) || (r = this._getOrReturnCtx(e, r), y(r, {
|
|
1646
1646
|
validation: "base64url",
|
|
1647
1647
|
code: l.invalid_string,
|
|
1648
1648
|
message: s.message
|
|
@@ -2458,66 +2458,66 @@ class U extends A {
|
|
|
2458
2458
|
}
|
|
2459
2459
|
_parse(e) {
|
|
2460
2460
|
if (this._getType(e) !== g.object) {
|
|
2461
|
-
const
|
|
2462
|
-
return y(
|
|
2461
|
+
const c = this._getOrReturnCtx(e);
|
|
2462
|
+
return y(c, {
|
|
2463
2463
|
code: l.invalid_type,
|
|
2464
2464
|
expected: g.object,
|
|
2465
|
-
received:
|
|
2465
|
+
received: c.parsedType
|
|
2466
2466
|
}), O;
|
|
2467
2467
|
}
|
|
2468
2468
|
const { status: t, ctx: r } = this._processInputParams(e), { shape: s, keys: a } = this._getCached(), i = [];
|
|
2469
2469
|
if (!(this._def.catchall instanceof Ie && this._def.unknownKeys === "strip"))
|
|
2470
|
-
for (const
|
|
2471
|
-
a.includes(
|
|
2470
|
+
for (const c in r.data)
|
|
2471
|
+
a.includes(c) || i.push(c);
|
|
2472
2472
|
const o = [];
|
|
2473
|
-
for (const
|
|
2474
|
-
const
|
|
2473
|
+
for (const c of a) {
|
|
2474
|
+
const u = s[c], f = r.data[c];
|
|
2475
2475
|
o.push({
|
|
2476
|
-
key: { status: "valid", value:
|
|
2477
|
-
value:
|
|
2478
|
-
alwaysSet:
|
|
2476
|
+
key: { status: "valid", value: c },
|
|
2477
|
+
value: u._parse(new Ee(r, f, r.path, c)),
|
|
2478
|
+
alwaysSet: c in r.data
|
|
2479
2479
|
});
|
|
2480
2480
|
}
|
|
2481
2481
|
if (this._def.catchall instanceof Ie) {
|
|
2482
|
-
const
|
|
2483
|
-
if (
|
|
2484
|
-
for (const
|
|
2482
|
+
const c = this._def.unknownKeys;
|
|
2483
|
+
if (c === "passthrough")
|
|
2484
|
+
for (const u of i)
|
|
2485
2485
|
o.push({
|
|
2486
|
-
key: { status: "valid", value:
|
|
2487
|
-
value: { status: "valid", value: r.data[
|
|
2486
|
+
key: { status: "valid", value: u },
|
|
2487
|
+
value: { status: "valid", value: r.data[u] }
|
|
2488
2488
|
});
|
|
2489
|
-
else if (
|
|
2489
|
+
else if (c === "strict")
|
|
2490
2490
|
i.length > 0 && (y(r, {
|
|
2491
2491
|
code: l.unrecognized_keys,
|
|
2492
2492
|
keys: i
|
|
2493
2493
|
}), t.dirty());
|
|
2494
|
-
else if (
|
|
2494
|
+
else if (c !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
2495
2495
|
} else {
|
|
2496
|
-
const
|
|
2497
|
-
for (const
|
|
2498
|
-
const f = r.data[
|
|
2496
|
+
const c = this._def.catchall;
|
|
2497
|
+
for (const u of i) {
|
|
2498
|
+
const f = r.data[u];
|
|
2499
2499
|
o.push({
|
|
2500
|
-
key: { status: "valid", value:
|
|
2501
|
-
value:
|
|
2502
|
-
new Ee(r, f, r.path,
|
|
2500
|
+
key: { status: "valid", value: u },
|
|
2501
|
+
value: c._parse(
|
|
2502
|
+
new Ee(r, f, r.path, u)
|
|
2503
2503
|
//, ctx.child(key), value, getParsedType(value)
|
|
2504
2504
|
),
|
|
2505
|
-
alwaysSet:
|
|
2505
|
+
alwaysSet: u in r.data
|
|
2506
2506
|
});
|
|
2507
2507
|
}
|
|
2508
2508
|
}
|
|
2509
2509
|
return r.common.async ? Promise.resolve().then(() => xe(this, null, function* () {
|
|
2510
|
-
const
|
|
2511
|
-
for (const
|
|
2512
|
-
const f = yield
|
|
2513
|
-
|
|
2510
|
+
const c = [];
|
|
2511
|
+
for (const u of o) {
|
|
2512
|
+
const f = yield u.key, p = yield u.value;
|
|
2513
|
+
c.push({
|
|
2514
2514
|
key: f,
|
|
2515
2515
|
value: p,
|
|
2516
|
-
alwaysSet:
|
|
2516
|
+
alwaysSet: u.alwaysSet
|
|
2517
2517
|
});
|
|
2518
2518
|
}
|
|
2519
|
-
return
|
|
2520
|
-
})).then((
|
|
2519
|
+
return c;
|
|
2520
|
+
})).then((c) => Q.mergeObjectSync(t, c)) : Q.mergeObjectSync(t, o);
|
|
2521
2521
|
}
|
|
2522
2522
|
get shape() {
|
|
2523
2523
|
return this._def.shape();
|
|
@@ -2528,11 +2528,11 @@ class U extends A {
|
|
|
2528
2528
|
}), e !== void 0 ? {
|
|
2529
2529
|
errorMap: (t, r) => {
|
|
2530
2530
|
var s, a, i, o;
|
|
2531
|
-
const
|
|
2531
|
+
const c = (i = (a = (s = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(s, t, r).message) !== null && i !== void 0 ? i : r.defaultError;
|
|
2532
2532
|
return t.code === "unrecognized_keys" ? {
|
|
2533
|
-
message: (o = k.errToObj(e).message) !== null && o !== void 0 ? o :
|
|
2533
|
+
message: (o = k.errToObj(e).message) !== null && o !== void 0 ? o : c
|
|
2534
2534
|
} : {
|
|
2535
|
-
message:
|
|
2535
|
+
message: c
|
|
2536
2536
|
};
|
|
2537
2537
|
}
|
|
2538
2538
|
} : {}));
|
|
@@ -2750,24 +2750,24 @@ class At extends A {
|
|
|
2750
2750
|
{
|
|
2751
2751
|
let a;
|
|
2752
2752
|
const i = [];
|
|
2753
|
-
for (const
|
|
2754
|
-
const
|
|
2753
|
+
for (const c of r) {
|
|
2754
|
+
const u = S(d({}, t), {
|
|
2755
2755
|
common: S(d({}, t.common), {
|
|
2756
2756
|
issues: []
|
|
2757
2757
|
}),
|
|
2758
2758
|
parent: null
|
|
2759
|
-
}), f =
|
|
2759
|
+
}), f = c._parseSync({
|
|
2760
2760
|
data: t.data,
|
|
2761
2761
|
path: t.path,
|
|
2762
|
-
parent:
|
|
2762
|
+
parent: u
|
|
2763
2763
|
});
|
|
2764
2764
|
if (f.status === "valid")
|
|
2765
2765
|
return f;
|
|
2766
|
-
f.status === "dirty" && !a && (a = { result: f, ctx:
|
|
2766
|
+
f.status === "dirty" && !a && (a = { result: f, ctx: u }), u.common.issues.length && i.push(u.common.issues);
|
|
2767
2767
|
}
|
|
2768
2768
|
if (a)
|
|
2769
2769
|
return t.common.issues.push(...a.ctx.common.issues), a.result;
|
|
2770
|
-
const o = i.map((
|
|
2770
|
+
const o = i.map((c) => new oe(c));
|
|
2771
2771
|
return y(t, {
|
|
2772
2772
|
code: l.invalid_union,
|
|
2773
2773
|
unionErrors: o
|
|
@@ -2783,7 +2783,7 @@ At.create = (n, e) => new At(d({
|
|
|
2783
2783
|
typeName: E.ZodUnion
|
|
2784
2784
|
}, T(e)));
|
|
2785
2785
|
const Pe = (n) => n instanceof jt ? Pe(n.schema) : n instanceof ye ? Pe(n.innerType()) : n instanceof Nt ? [n.value] : n instanceof We ? n.options : n instanceof It ? R.objectValues(n.enum) : n instanceof Zt ? Pe(n._def.innerType) : n instanceof Ot ? [void 0] : n instanceof Tt ? [null] : n instanceof ke ? [void 0, ...Pe(n.unwrap())] : n instanceof Ve ? [null, ...Pe(n.unwrap())] : n instanceof ar || n instanceof Pt ? Pe(n.unwrap()) : n instanceof Lt ? Pe(n._def.innerType) : [];
|
|
2786
|
-
class
|
|
2786
|
+
class un extends A {
|
|
2787
2787
|
_parse(e) {
|
|
2788
2788
|
const { ctx: t } = this._processInputParams(e);
|
|
2789
2789
|
if (t.parsedType !== g.object)
|
|
@@ -2836,7 +2836,7 @@ class cn extends A {
|
|
|
2836
2836
|
s.set(o, a);
|
|
2837
2837
|
}
|
|
2838
2838
|
}
|
|
2839
|
-
return new
|
|
2839
|
+
return new un(d({
|
|
2840
2840
|
typeName: E.ZodDiscriminatedUnion,
|
|
2841
2841
|
discriminator: e,
|
|
2842
2842
|
options: t,
|
|
@@ -2851,10 +2851,10 @@ function $n(n, e) {
|
|
|
2851
2851
|
if (t === g.object && r === g.object) {
|
|
2852
2852
|
const s = R.objectKeys(e), a = R.objectKeys(n).filter((o) => s.indexOf(o) !== -1), i = d(d({}, n), e);
|
|
2853
2853
|
for (const o of a) {
|
|
2854
|
-
const
|
|
2855
|
-
if (!
|
|
2854
|
+
const c = $n(n[o], e[o]);
|
|
2855
|
+
if (!c.valid)
|
|
2856
2856
|
return { valid: !1 };
|
|
2857
|
-
i[o] =
|
|
2857
|
+
i[o] = c.data;
|
|
2858
2858
|
}
|
|
2859
2859
|
return { valid: !0, data: i };
|
|
2860
2860
|
} else if (t === g.array && r === g.array) {
|
|
@@ -2862,10 +2862,10 @@ function $n(n, e) {
|
|
|
2862
2862
|
return { valid: !1 };
|
|
2863
2863
|
const s = [];
|
|
2864
2864
|
for (let a = 0; a < n.length; a++) {
|
|
2865
|
-
const i = n[a], o = e[a],
|
|
2866
|
-
if (!
|
|
2865
|
+
const i = n[a], o = e[a], c = $n(i, o);
|
|
2866
|
+
if (!c.valid)
|
|
2867
2867
|
return { valid: !1 };
|
|
2868
|
-
s.push(
|
|
2868
|
+
s.push(c.data);
|
|
2869
2869
|
}
|
|
2870
2870
|
return { valid: !0, data: s };
|
|
2871
2871
|
} else return t === g.date && r === g.date && +n == +e ? { valid: !0, data: n } : { valid: !1 };
|
|
@@ -3009,28 +3009,28 @@ class an extends A {
|
|
|
3009
3009
|
expected: g.map,
|
|
3010
3010
|
received: r.parsedType
|
|
3011
3011
|
}), O;
|
|
3012
|
-
const s = this._def.keyType, a = this._def.valueType, i = [...r.data.entries()].map(([o,
|
|
3013
|
-
key: s._parse(new Ee(r, o, r.path, [
|
|
3014
|
-
value: a._parse(new Ee(r,
|
|
3012
|
+
const s = this._def.keyType, a = this._def.valueType, i = [...r.data.entries()].map(([o, c], u) => ({
|
|
3013
|
+
key: s._parse(new Ee(r, o, r.path, [u, "key"])),
|
|
3014
|
+
value: a._parse(new Ee(r, c, r.path, [u, "value"]))
|
|
3015
3015
|
}));
|
|
3016
3016
|
if (r.common.async) {
|
|
3017
3017
|
const o = /* @__PURE__ */ new Map();
|
|
3018
3018
|
return Promise.resolve().then(() => xe(this, null, function* () {
|
|
3019
|
-
for (const
|
|
3020
|
-
const
|
|
3021
|
-
if (
|
|
3019
|
+
for (const c of i) {
|
|
3020
|
+
const u = yield c.key, f = yield c.value;
|
|
3021
|
+
if (u.status === "aborted" || f.status === "aborted")
|
|
3022
3022
|
return O;
|
|
3023
|
-
(
|
|
3023
|
+
(u.status === "dirty" || f.status === "dirty") && t.dirty(), o.set(u.value, f.value);
|
|
3024
3024
|
}
|
|
3025
3025
|
return { status: t.value, value: o };
|
|
3026
3026
|
}));
|
|
3027
3027
|
} else {
|
|
3028
3028
|
const o = /* @__PURE__ */ new Map();
|
|
3029
|
-
for (const
|
|
3030
|
-
const
|
|
3031
|
-
if (
|
|
3029
|
+
for (const c of i) {
|
|
3030
|
+
const u = c.key, f = c.value;
|
|
3031
|
+
if (u.status === "aborted" || f.status === "aborted")
|
|
3032
3032
|
return O;
|
|
3033
|
-
(
|
|
3033
|
+
(u.status === "dirty" || f.status === "dirty") && t.dirty(), o.set(u.value, f.value);
|
|
3034
3034
|
}
|
|
3035
3035
|
return { status: t.value, value: o };
|
|
3036
3036
|
}
|
|
@@ -3067,17 +3067,17 @@ class Ye extends A {
|
|
|
3067
3067
|
message: s.maxSize.message
|
|
3068
3068
|
}), t.dirty());
|
|
3069
3069
|
const a = this._def.valueType;
|
|
3070
|
-
function i(
|
|
3071
|
-
const
|
|
3072
|
-
for (const f of
|
|
3070
|
+
function i(c) {
|
|
3071
|
+
const u = /* @__PURE__ */ new Set();
|
|
3072
|
+
for (const f of c) {
|
|
3073
3073
|
if (f.status === "aborted")
|
|
3074
3074
|
return O;
|
|
3075
|
-
f.status === "dirty" && t.dirty(),
|
|
3075
|
+
f.status === "dirty" && t.dirty(), u.add(f.value);
|
|
3076
3076
|
}
|
|
3077
|
-
return { status: t.value, value:
|
|
3077
|
+
return { status: t.value, value: u };
|
|
3078
3078
|
}
|
|
3079
|
-
const o = [...r.data.values()].map((
|
|
3080
|
-
return r.common.async ? Promise.all(o).then((
|
|
3079
|
+
const o = [...r.data.values()].map((c, u) => a._parse(new Ee(r, c, r.path, u)));
|
|
3080
|
+
return r.common.async ? Promise.all(o).then((c) => i(c)) : i(o);
|
|
3081
3081
|
}
|
|
3082
3082
|
min(e, t) {
|
|
3083
3083
|
return new Ye(S(d({}, this._def), {
|
|
@@ -3114,7 +3114,7 @@ class ot extends A {
|
|
|
3114
3114
|
expected: g.function,
|
|
3115
3115
|
received: t.parsedType
|
|
3116
3116
|
}), O;
|
|
3117
|
-
function r(o,
|
|
3117
|
+
function r(o, c) {
|
|
3118
3118
|
return en({
|
|
3119
3119
|
data: o,
|
|
3120
3120
|
path: t.path,
|
|
@@ -3123,14 +3123,14 @@ class ot extends A {
|
|
|
3123
3123
|
t.schemaErrorMap,
|
|
3124
3124
|
Qt(),
|
|
3125
3125
|
dt
|
|
3126
|
-
].filter((
|
|
3126
|
+
].filter((u) => !!u),
|
|
3127
3127
|
issueData: {
|
|
3128
3128
|
code: l.invalid_arguments,
|
|
3129
|
-
argumentsError:
|
|
3129
|
+
argumentsError: c
|
|
3130
3130
|
}
|
|
3131
3131
|
});
|
|
3132
3132
|
}
|
|
3133
|
-
function s(o,
|
|
3133
|
+
function s(o, c) {
|
|
3134
3134
|
return en({
|
|
3135
3135
|
data: o,
|
|
3136
3136
|
path: t.path,
|
|
@@ -3139,33 +3139,33 @@ class ot extends A {
|
|
|
3139
3139
|
t.schemaErrorMap,
|
|
3140
3140
|
Qt(),
|
|
3141
3141
|
dt
|
|
3142
|
-
].filter((
|
|
3142
|
+
].filter((u) => !!u),
|
|
3143
3143
|
issueData: {
|
|
3144
3144
|
code: l.invalid_return_type,
|
|
3145
|
-
returnTypeError:
|
|
3145
|
+
returnTypeError: c
|
|
3146
3146
|
}
|
|
3147
3147
|
});
|
|
3148
3148
|
}
|
|
3149
3149
|
const a = { errorMap: t.common.contextualErrorMap }, i = t.data;
|
|
3150
3150
|
if (this._def.returns instanceof ht) {
|
|
3151
3151
|
const o = this;
|
|
3152
|
-
return re(function(...
|
|
3152
|
+
return re(function(...c) {
|
|
3153
3153
|
return xe(this, null, function* () {
|
|
3154
|
-
const
|
|
3155
|
-
throw
|
|
3154
|
+
const u = new oe([]), f = yield o._def.args.parseAsync(c, a).catch((w) => {
|
|
3155
|
+
throw u.addIssue(r(c, w)), u;
|
|
3156
3156
|
}), p = yield Reflect.apply(i, this, f);
|
|
3157
3157
|
return yield o._def.returns._def.type.parseAsync(p, a).catch((w) => {
|
|
3158
|
-
throw
|
|
3158
|
+
throw u.addIssue(s(p, w)), u;
|
|
3159
3159
|
});
|
|
3160
3160
|
});
|
|
3161
3161
|
});
|
|
3162
3162
|
} else {
|
|
3163
3163
|
const o = this;
|
|
3164
|
-
return re(function(...
|
|
3165
|
-
const
|
|
3166
|
-
if (!
|
|
3167
|
-
throw new oe([r(
|
|
3168
|
-
const f = Reflect.apply(i, this,
|
|
3164
|
+
return re(function(...c) {
|
|
3165
|
+
const u = o._def.args.safeParse(c, a);
|
|
3166
|
+
if (!u.success)
|
|
3167
|
+
throw new oe([r(c, u.error)]);
|
|
3168
|
+
const f = Reflect.apply(i, this, u.data), p = o._def.returns.safeParse(f, a);
|
|
3169
3169
|
if (!p.success)
|
|
3170
3170
|
throw new oe([s(f, p.error)]);
|
|
3171
3171
|
return p.data;
|
|
@@ -3372,12 +3372,12 @@ class ye extends A {
|
|
|
3372
3372
|
return Promise.resolve(i).then((o) => xe(this, null, function* () {
|
|
3373
3373
|
if (t.value === "aborted")
|
|
3374
3374
|
return O;
|
|
3375
|
-
const
|
|
3375
|
+
const c = yield this._def.schema._parseAsync({
|
|
3376
3376
|
data: o,
|
|
3377
3377
|
path: r.path,
|
|
3378
3378
|
parent: r
|
|
3379
3379
|
});
|
|
3380
|
-
return
|
|
3380
|
+
return c.status === "aborted" ? O : c.status === "dirty" || t.value === "dirty" ? tn(c.value) : c;
|
|
3381
3381
|
}));
|
|
3382
3382
|
{
|
|
3383
3383
|
if (t.value === "aborted")
|
|
@@ -3392,10 +3392,10 @@ class ye extends A {
|
|
|
3392
3392
|
}
|
|
3393
3393
|
if (s.type === "refinement") {
|
|
3394
3394
|
const i = (o) => {
|
|
3395
|
-
const
|
|
3395
|
+
const c = s.refinement(o, a);
|
|
3396
3396
|
if (r.common.async)
|
|
3397
|
-
return Promise.resolve(
|
|
3398
|
-
if (
|
|
3397
|
+
return Promise.resolve(c);
|
|
3398
|
+
if (c instanceof Promise)
|
|
3399
3399
|
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
3400
3400
|
return o;
|
|
3401
3401
|
};
|
|
@@ -3610,16 +3610,16 @@ function ss(n, e = {}, t) {
|
|
|
3610
3610
|
var a, i;
|
|
3611
3611
|
const o = n(r);
|
|
3612
3612
|
if (o instanceof Promise)
|
|
3613
|
-
return o.then((
|
|
3614
|
-
var
|
|
3615
|
-
if (!
|
|
3616
|
-
const p = Nr(e, r), w = (f = (
|
|
3613
|
+
return o.then((c) => {
|
|
3614
|
+
var u, f;
|
|
3615
|
+
if (!c) {
|
|
3616
|
+
const p = Nr(e, r), w = (f = (u = p.fatal) !== null && u !== void 0 ? u : t) !== null && f !== void 0 ? f : !0;
|
|
3617
3617
|
s.addIssue(S(d({ code: "custom" }, p), { fatal: w }));
|
|
3618
3618
|
}
|
|
3619
3619
|
});
|
|
3620
3620
|
if (!o) {
|
|
3621
|
-
const
|
|
3622
|
-
s.addIssue(S(d({ code: "custom" },
|
|
3621
|
+
const c = Nr(e, r), u = (i = (a = c.fatal) !== null && a !== void 0 ? a : t) !== null && i !== void 0 ? i : !0;
|
|
3622
|
+
s.addIssue(S(d({ code: "custom" }, c), { fatal: u }));
|
|
3623
3623
|
}
|
|
3624
3624
|
}) : lt.create();
|
|
3625
3625
|
}
|
|
@@ -3632,7 +3632,7 @@ var E;
|
|
|
3632
3632
|
})(E || (E = {}));
|
|
3633
3633
|
const vi = (n, e = {
|
|
3634
3634
|
message: `Input not instance of ${n.name}`
|
|
3635
|
-
}) => ss((t) => t instanceof n, e), as = pe.create, is = $e.create, _i = on.create, bi = Fe.create, os = St.create, wi = Xe.create, ki = rn.create, xi = Ot.create, Ei = Tt.create, Si = lt.create, Oi = Ge.create, Ti = Ie.create, Ai = sn.create, Ci = me.create, Ri = U.create, ji = U.strictCreate, Ni = At.create, Ii =
|
|
3635
|
+
}) => ss((t) => t instanceof n, e), as = pe.create, is = $e.create, _i = on.create, bi = Fe.create, os = St.create, wi = Xe.create, ki = rn.create, xi = Ot.create, Ei = Tt.create, Si = lt.create, Oi = Ge.create, Ti = Ie.create, Ai = sn.create, Ci = me.create, Ri = U.create, ji = U.strictCreate, Ni = At.create, Ii = un.create, Zi = Ct.create, Li = Se.create, Pi = Rt.create, Mi = an.create, Di = Ye.create, $i = ot.create, Fi = jt.create, Wi = Nt.create, Vi = We.create, Ui = It.create, Ki = ht.create, Ir = ye.create, qi = ke.create, zi = Ve.create, Bi = ye.createWithPreprocess, Hi = $t.create, Gi = () => as().optional(), Ji = () => is().optional(), Xi = () => os().optional(), Yi = {
|
|
3636
3636
|
string: (n) => pe.create(S(d({}, n), { coerce: !0 })),
|
|
3637
3637
|
number: (n) => $e.create(S(d({}, n), { coerce: !0 })),
|
|
3638
3638
|
boolean: (n) => St.create(S(d({}, n), {
|
|
@@ -3682,7 +3682,7 @@ var N = /* @__PURE__ */ Object.freeze({
|
|
|
3682
3682
|
ZodArray: me,
|
|
3683
3683
|
ZodObject: U,
|
|
3684
3684
|
ZodUnion: At,
|
|
3685
|
-
ZodDiscriminatedUnion:
|
|
3685
|
+
ZodDiscriminatedUnion: un,
|
|
3686
3686
|
ZodIntersection: Ct,
|
|
3687
3687
|
ZodTuple: Se,
|
|
3688
3688
|
ZodRecord: Rt,
|
|
@@ -3814,7 +3814,7 @@ function eo(n) {
|
|
|
3814
3814
|
"`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
|
|
3815
3815
|
);
|
|
3816
3816
|
const { onEvent: e = vn, onError: t = vn, onRetry: r = vn, onComment: s } = n;
|
|
3817
|
-
let a = "", i = !0, o,
|
|
3817
|
+
let a = "", i = !0, o, c = "", u = "";
|
|
3818
3818
|
function f(m) {
|
|
3819
3819
|
const v = i ? m.replace(/^\xEF\xBB\xBF/, "") : m, [h, x] = to(`${a}${v}`);
|
|
3820
3820
|
for (const P of h)
|
|
@@ -3841,10 +3841,10 @@ function eo(n) {
|
|
|
3841
3841
|
function w(m, v, h) {
|
|
3842
3842
|
switch (m) {
|
|
3843
3843
|
case "event":
|
|
3844
|
-
|
|
3844
|
+
u = v;
|
|
3845
3845
|
break;
|
|
3846
3846
|
case "data":
|
|
3847
|
-
|
|
3847
|
+
c = `${c}${v}
|
|
3848
3848
|
`;
|
|
3849
3849
|
break;
|
|
3850
3850
|
case "id":
|
|
@@ -3870,17 +3870,17 @@ function eo(n) {
|
|
|
3870
3870
|
}
|
|
3871
3871
|
}
|
|
3872
3872
|
function _() {
|
|
3873
|
-
|
|
3873
|
+
c.length > 0 && e({
|
|
3874
3874
|
id: o,
|
|
3875
|
-
event:
|
|
3875
|
+
event: u || void 0,
|
|
3876
3876
|
// If the data buffer's last character is a U+000A LINE FEED (LF) character,
|
|
3877
3877
|
// then remove the last character from the data buffer.
|
|
3878
|
-
data:
|
|
3879
|
-
`) ?
|
|
3880
|
-
}), o = void 0,
|
|
3878
|
+
data: c.endsWith(`
|
|
3879
|
+
`) ? c.slice(0, -1) : c
|
|
3880
|
+
}), o = void 0, c = "", u = "";
|
|
3881
3881
|
}
|
|
3882
3882
|
function b(m = {}) {
|
|
3883
|
-
a && m.consume && p(a), i = !0, o = void 0,
|
|
3883
|
+
a && m.consume && p(a), i = !0, o = void 0, c = "", u = "", a = "";
|
|
3884
3884
|
}
|
|
3885
3885
|
return { feed: f, reset: b };
|
|
3886
3886
|
}
|
|
@@ -3961,26 +3961,26 @@ function Pr(n) {
|
|
|
3961
3961
|
timeStamp: n.timeStamp
|
|
3962
3962
|
};
|
|
3963
3963
|
}
|
|
3964
|
-
var
|
|
3964
|
+
var cs = (n) => {
|
|
3965
3965
|
throw TypeError(n);
|
|
3966
|
-
}, ir = (n, e, t) => e.has(n) ||
|
|
3966
|
+
}, ir = (n, e, t) => e.has(n) || cs("Cannot " + t), C = (n, e, t) => (ir(n, e, "read from private field"), t ? t.call(n) : e.get(n)), H = (n, e, t) => e.has(n) ? cs("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), W = (n, e, t, r) => (ir(n, e, "write to private field"), e.set(n, t), t), Re = (n, e, t) => (ir(n, e, "access private method"), t), ae, He, rt, Xt, cn, kt, it, xt, Me, st, ct, at, bt, fe, Wn, Vn, Un, Mr, Kn, qn, wt, zn, Bn;
|
|
3967
3967
|
class Yt extends EventTarget {
|
|
3968
3968
|
constructor(e, t) {
|
|
3969
3969
|
var r, s;
|
|
3970
|
-
super(), H(this, fe), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, H(this, ae), H(this, He), H(this, rt), H(this, Xt), H(this,
|
|
3970
|
+
super(), H(this, fe), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, H(this, ae), H(this, He), H(this, rt), H(this, Xt), H(this, cn), H(this, kt), H(this, it), H(this, xt, null), H(this, Me), H(this, st), H(this, ct, null), H(this, at, null), H(this, bt, null), H(this, Vn, (a) => Ze(this, null, function* () {
|
|
3971
3971
|
var i;
|
|
3972
3972
|
C(this, st).reset();
|
|
3973
|
-
const { body: o, redirected:
|
|
3974
|
-
if (
|
|
3973
|
+
const { body: o, redirected: c, status: u, headers: f } = a;
|
|
3974
|
+
if (u === 204) {
|
|
3975
3975
|
Re(this, fe, wt).call(this, "Server sent HTTP 204, not reconnecting", 204), this.close();
|
|
3976
3976
|
return;
|
|
3977
3977
|
}
|
|
3978
|
-
if (
|
|
3979
|
-
Re(this, fe, wt).call(this, `Non-200 status code (${
|
|
3978
|
+
if (c ? W(this, rt, new URL(a.url)) : W(this, rt, void 0), u !== 200) {
|
|
3979
|
+
Re(this, fe, wt).call(this, `Non-200 status code (${u})`, u);
|
|
3980
3980
|
return;
|
|
3981
3981
|
}
|
|
3982
3982
|
if (!(f.get("content-type") || "").startsWith("text/event-stream")) {
|
|
3983
|
-
Re(this, fe, wt).call(this, 'Invalid content type, expected "text/event-stream"',
|
|
3983
|
+
Re(this, fe, wt).call(this, 'Invalid content type, expected "text/event-stream"', u);
|
|
3984
3984
|
return;
|
|
3985
3985
|
}
|
|
3986
3986
|
if (C(this, ae) === this.CLOSED)
|
|
@@ -3988,7 +3988,7 @@ class Yt extends EventTarget {
|
|
|
3988
3988
|
W(this, ae, this.OPEN);
|
|
3989
3989
|
const p = new Event("open");
|
|
3990
3990
|
if ((i = C(this, bt)) == null || i.call(this, p), this.dispatchEvent(p), typeof o != "object" || !o || !("getReader" in o)) {
|
|
3991
|
-
Re(this, fe, wt).call(this, "Invalid response body, expected a web ReadableStream",
|
|
3991
|
+
Re(this, fe, wt).call(this, "Invalid response body, expected a web ReadableStream", u), this.close();
|
|
3992
3992
|
return;
|
|
3993
3993
|
}
|
|
3994
3994
|
const w = new TextDecoder(), _ = o.getReader();
|
|
@@ -4025,7 +4025,7 @@ class Yt extends EventTarget {
|
|
|
4025
4025
|
W(this, st, eo({
|
|
4026
4026
|
onEvent: C(this, Kn),
|
|
4027
4027
|
onRetry: C(this, qn)
|
|
4028
|
-
})), W(this, ae, this.CONNECTING), W(this, kt, 3e3), W(this,
|
|
4028
|
+
})), W(this, ae, this.CONNECTING), W(this, kt, 3e3), W(this, cn, (r = t == null ? void 0 : t.fetch) != null ? r : globalThis.fetch), W(this, Xt, (s = t == null ? void 0 : t.withCredentials) != null ? s : !1), Re(this, fe, Wn).call(this);
|
|
4029
4029
|
}
|
|
4030
4030
|
/**
|
|
4031
4031
|
* Returns the state of this EventSource object's connection. It can have the values described below.
|
|
@@ -4060,10 +4060,10 @@ class Yt extends EventTarget {
|
|
|
4060
4060
|
}
|
|
4061
4061
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
4062
4062
|
get onerror() {
|
|
4063
|
-
return C(this,
|
|
4063
|
+
return C(this, ct);
|
|
4064
4064
|
}
|
|
4065
4065
|
set onerror(e) {
|
|
4066
|
-
W(this,
|
|
4066
|
+
W(this, ct, e);
|
|
4067
4067
|
}
|
|
4068
4068
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
4069
4069
|
get onmessage() {
|
|
@@ -4098,13 +4098,13 @@ class Yt extends EventTarget {
|
|
|
4098
4098
|
C(this, it) && clearTimeout(C(this, it)), C(this, ae) !== this.CLOSED && (C(this, Me) && C(this, Me).abort(), W(this, ae, this.CLOSED), W(this, Me, void 0));
|
|
4099
4099
|
}
|
|
4100
4100
|
}
|
|
4101
|
-
ae = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(),
|
|
4101
|
+
ae = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), cn = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakSet(), /**
|
|
4102
4102
|
* Connect to the given URL and start receiving events
|
|
4103
4103
|
*
|
|
4104
4104
|
* @internal
|
|
4105
4105
|
*/
|
|
4106
4106
|
Wn = function() {
|
|
4107
|
-
W(this, ae, this.CONNECTING), W(this, Me, new AbortController()), C(this,
|
|
4107
|
+
W(this, ae, this.CONNECTING), W(this, Me, new AbortController()), C(this, cn)(C(this, He), Re(this, fe, Mr).call(this)).then(C(this, Vn)).catch(C(this, Un));
|
|
4108
4108
|
}, Vn = /* @__PURE__ */ new WeakMap(), Un = /* @__PURE__ */ new WeakMap(), /**
|
|
4109
4109
|
* Get request options for the `fetch()` request
|
|
4110
4110
|
*
|
|
@@ -4134,7 +4134,7 @@ wt = function(n, e) {
|
|
|
4134
4134
|
var t;
|
|
4135
4135
|
C(this, ae) !== this.CLOSED && W(this, ae, this.CLOSED);
|
|
4136
4136
|
const r = new Lr("error", { code: e, message: n });
|
|
4137
|
-
(t = C(this,
|
|
4137
|
+
(t = C(this, ct)) == null || t.call(this, r), this.dispatchEvent(r);
|
|
4138
4138
|
}, /**
|
|
4139
4139
|
* Schedules a reconnection attempt against the EventSource endpoint.
|
|
4140
4140
|
*
|
|
@@ -4148,7 +4148,7 @@ zn = function(n, e) {
|
|
|
4148
4148
|
return;
|
|
4149
4149
|
W(this, ae, this.CONNECTING);
|
|
4150
4150
|
const r = new Lr("error", { code: e, message: n });
|
|
4151
|
-
(t = C(this,
|
|
4151
|
+
(t = C(this, ct)) == null || t.call(this, r), this.dispatchEvent(r), W(this, it, setTimeout(C(this, Bn), C(this, kt)));
|
|
4152
4152
|
}, Bn = /* @__PURE__ */ new WeakMap(), /**
|
|
4153
4153
|
* ReadyState representing an EventSource currently trying to connect
|
|
4154
4154
|
*
|
|
@@ -4175,7 +4175,7 @@ const so = (n) => {
|
|
|
4175
4175
|
for (let s = 0; s < r; s++)
|
|
4176
4176
|
e += String.fromCharCode(t[s]);
|
|
4177
4177
|
return btoa(e);
|
|
4178
|
-
},
|
|
4178
|
+
}, us = {
|
|
4179
4179
|
status: "idle",
|
|
4180
4180
|
error: null,
|
|
4181
4181
|
result: null,
|
|
@@ -4195,11 +4195,11 @@ const so = (n) => {
|
|
|
4195
4195
|
filePath: n.filePath.replace(/^\//, ""),
|
|
4196
4196
|
referencePath: n.referencePath === "/" ? "" : n.referencePath
|
|
4197
4197
|
}, ao = (n, e, t, r) => Ze(void 0, null, function* () {
|
|
4198
|
-
var
|
|
4199
|
-
const s = structuredClone(
|
|
4198
|
+
var u, f, p;
|
|
4199
|
+
const s = structuredClone(us);
|
|
4200
4200
|
s.status = "pending", r(B({}, s));
|
|
4201
4201
|
const a = structuredClone(t);
|
|
4202
|
-
if (((
|
|
4202
|
+
if (((u = t.assetsStorage) == null ? void 0 : u.strategy) === "local") {
|
|
4203
4203
|
const { referencePath: w } = $r(
|
|
4204
4204
|
t.assetsStorage
|
|
4205
4205
|
);
|
|
@@ -4214,7 +4214,7 @@ const so = (n) => {
|
|
|
4214
4214
|
method: e,
|
|
4215
4215
|
body: JSON.stringify(t)
|
|
4216
4216
|
})), i)
|
|
4217
|
-
}),
|
|
4217
|
+
}), c = new Promise((w, _) => {
|
|
4218
4218
|
const b = {};
|
|
4219
4219
|
o.addEventListener("start", (v) => {
|
|
4220
4220
|
const h = JSON.parse(v.data);
|
|
@@ -4266,15 +4266,15 @@ const so = (n) => {
|
|
|
4266
4266
|
});
|
|
4267
4267
|
let m = 0;
|
|
4268
4268
|
o.addEventListener("error", (v) => Ze(void 0, null, function* () {
|
|
4269
|
-
var q, M, Z,
|
|
4269
|
+
var q, M, Z, ce, L, Oe, ge;
|
|
4270
4270
|
const h = yield i;
|
|
4271
4271
|
if (!h.ok) {
|
|
4272
4272
|
let G = "";
|
|
4273
4273
|
try {
|
|
4274
4274
|
G = yield h.text();
|
|
4275
|
-
const
|
|
4276
|
-
(q =
|
|
4277
|
-
} catch (
|
|
4275
|
+
const ue = JSON.parse(G);
|
|
4276
|
+
(q = ue == null ? void 0 : ue.payload) != null && q.message && (G = ue.payload.message);
|
|
4277
|
+
} catch (ue) {
|
|
4278
4278
|
}
|
|
4279
4279
|
_(
|
|
4280
4280
|
new fn({
|
|
@@ -4296,7 +4296,7 @@ const so = (n) => {
|
|
|
4296
4296
|
x = JSON.parse(v.data);
|
|
4297
4297
|
} catch (G) {
|
|
4298
4298
|
}
|
|
4299
|
-
(((M = x == null ? void 0 : x.payload) == null ? void 0 : M.name) === "Task Crashed" || ((Z = x == null ? void 0 : x.payload) == null ? void 0 : Z.name) === "TimeoutError" || ((
|
|
4299
|
+
(((M = x == null ? void 0 : x.payload) == null ? void 0 : M.name) === "Task Crashed" || ((Z = x == null ? void 0 : x.payload) == null ? void 0 : Z.name) === "TimeoutError" || ((ce = x == null ? void 0 : x.payload) == null ? void 0 : ce.name) === "Error" || ((L = x == null ? void 0 : x.payload) == null ? void 0 : L.name) === "Unknown error") && (P = !0);
|
|
4300
4300
|
const V = new fn({
|
|
4301
4301
|
name: (Oe = x == null ? void 0 : x.payload.name) != null ? Oe : "Unknown error",
|
|
4302
4302
|
reason: (ge = x == null ? void 0 : x.payload.message) != null ? ge : "Unknown",
|
|
@@ -4315,7 +4315,7 @@ const so = (n) => {
|
|
|
4315
4315
|
});
|
|
4316
4316
|
});
|
|
4317
4317
|
try {
|
|
4318
|
-
const { result: w, error: _ } = yield
|
|
4318
|
+
const { result: w, error: _ } = yield c, b = structuredClone(w);
|
|
4319
4319
|
if (((f = a.assetsStorage) == null ? void 0 : f.strategy) === "local" && ((p = b == null ? void 0 : b.assets) != null && p.length)) {
|
|
4320
4320
|
const { filePath: m } = $r(
|
|
4321
4321
|
a.assetsStorage
|
|
@@ -4347,7 +4347,7 @@ const so = (n) => {
|
|
|
4347
4347
|
url: n,
|
|
4348
4348
|
method: e = "POST"
|
|
4349
4349
|
}) => {
|
|
4350
|
-
const [t, r] = Ts(
|
|
4350
|
+
const [t, r] = Ts(us);
|
|
4351
4351
|
return {
|
|
4352
4352
|
getCode: Bt(
|
|
4353
4353
|
(a) => ao(n, e, a, r),
|
|
@@ -4385,19 +4385,19 @@ function io() {
|
|
|
4385
4385
|
var _ = w(), b = r({ inst: { value: _, getSnapshot: w } }), m = b[0].inst, v = b[1];
|
|
4386
4386
|
return a(
|
|
4387
4387
|
function() {
|
|
4388
|
-
m.value = _, m.getSnapshot = w,
|
|
4388
|
+
m.value = _, m.getSnapshot = w, c(m) && v({ inst: m });
|
|
4389
4389
|
},
|
|
4390
4390
|
[p, _, w]
|
|
4391
4391
|
), s(
|
|
4392
4392
|
function() {
|
|
4393
|
-
return
|
|
4394
|
-
|
|
4393
|
+
return c(m) && v({ inst: m }), p(function() {
|
|
4394
|
+
c(m) && v({ inst: m });
|
|
4395
4395
|
});
|
|
4396
4396
|
},
|
|
4397
4397
|
[p]
|
|
4398
4398
|
), i(_), _;
|
|
4399
4399
|
}
|
|
4400
|
-
function
|
|
4400
|
+
function c(p) {
|
|
4401
4401
|
var w = p.getSnapshot;
|
|
4402
4402
|
p = p.value;
|
|
4403
4403
|
try {
|
|
@@ -4407,10 +4407,10 @@ function io() {
|
|
|
4407
4407
|
return !0;
|
|
4408
4408
|
}
|
|
4409
4409
|
}
|
|
4410
|
-
function
|
|
4410
|
+
function u(p, w) {
|
|
4411
4411
|
return w();
|
|
4412
4412
|
}
|
|
4413
|
-
var f = typeof window == "undefined" || typeof window.document == "undefined" || typeof window.document.createElement == "undefined" ?
|
|
4413
|
+
var f = typeof window == "undefined" || typeof window.document == "undefined" || typeof window.document.createElement == "undefined" ? u : o;
|
|
4414
4414
|
return _n.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : f, _n;
|
|
4415
4415
|
}
|
|
4416
4416
|
var bn = {};
|
|
@@ -4444,7 +4444,7 @@ function oo() {
|
|
|
4444
4444
|
inst: { value: m, getSnapshot: b }
|
|
4445
4445
|
});
|
|
4446
4446
|
var h = v[0].inst, x = v[1];
|
|
4447
|
-
return
|
|
4447
|
+
return c(
|
|
4448
4448
|
function() {
|
|
4449
4449
|
h.value = m, h.getSnapshot = b, t(h) && x({ inst: h });
|
|
4450
4450
|
},
|
|
@@ -4456,7 +4456,7 @@ function oo() {
|
|
|
4456
4456
|
});
|
|
4457
4457
|
},
|
|
4458
4458
|
[_]
|
|
4459
|
-
),
|
|
4459
|
+
), u(m), m;
|
|
4460
4460
|
}
|
|
4461
4461
|
function t(_) {
|
|
4462
4462
|
var b = _.getSnapshot;
|
|
@@ -4472,15 +4472,15 @@ function oo() {
|
|
|
4472
4472
|
return b();
|
|
4473
4473
|
}
|
|
4474
4474
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ != "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
4475
|
-
var s = Dt, a = typeof Object.is == "function" ? Object.is : n, i = s.useState, o = s.useEffect,
|
|
4475
|
+
var s = Dt, a = typeof Object.is == "function" ? Object.is : n, i = s.useState, o = s.useEffect, c = s.useLayoutEffect, u = s.useDebugValue, f = !1, p = !1, w = typeof window == "undefined" || typeof window.document == "undefined" || typeof window.document.createElement == "undefined" ? r : e;
|
|
4476
4476
|
bn.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : w, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ != "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
4477
4477
|
}()), bn;
|
|
4478
4478
|
}
|
|
4479
4479
|
var Vr;
|
|
4480
|
-
function
|
|
4480
|
+
function co() {
|
|
4481
4481
|
return Vr || (Vr = 1, process.env.NODE_ENV === "production" ? Kt.exports = io() : Kt.exports = oo()), Kt.exports;
|
|
4482
4482
|
}
|
|
4483
|
-
var
|
|
4483
|
+
var uo = co();
|
|
4484
4484
|
const ds = 0, ls = 1, hs = 2, Ur = 3;
|
|
4485
4485
|
var Kr = Object.prototype.hasOwnProperty;
|
|
4486
4486
|
function Hn(n, e) {
|
|
@@ -4577,7 +4577,7 @@ const er = (n) => {
|
|
|
4577
4577
|
} else
|
|
4578
4578
|
a = t ? n.toJSON() : e == "symbol" ? n.toString() : e == "string" ? JSON.stringify(n) : "" + n;
|
|
4579
4579
|
return a;
|
|
4580
|
-
},
|
|
4580
|
+
}, cr = (n) => {
|
|
4581
4581
|
if (we(n))
|
|
4582
4582
|
try {
|
|
4583
4583
|
n = n();
|
|
@@ -4602,8 +4602,8 @@ function ms(...n) {
|
|
|
4602
4602
|
} : s || {});
|
|
4603
4603
|
let i = a.populateCache;
|
|
4604
4604
|
const o = a.rollbackOnError;
|
|
4605
|
-
let
|
|
4606
|
-
const
|
|
4605
|
+
let c = a.optimisticData;
|
|
4606
|
+
const u = (w) => typeof o == "function" ? o(w) : o !== !1, f = a.throwOnError;
|
|
4607
4607
|
if (we(t)) {
|
|
4608
4608
|
const w = t, _ = [], b = e.keys();
|
|
4609
4609
|
for (const m of b)
|
|
@@ -4614,7 +4614,7 @@ function ms(...n) {
|
|
|
4614
4614
|
return p(t);
|
|
4615
4615
|
function p(w) {
|
|
4616
4616
|
return Ze(this, null, function* () {
|
|
4617
|
-
const [_] =
|
|
4617
|
+
const [_] = cr(w);
|
|
4618
4618
|
if (!_) return;
|
|
4619
4619
|
const [b, m] = ps(e, _), [v, h, x, P] = Ne.get(e), V = () => {
|
|
4620
4620
|
const G = v[_];
|
|
@@ -4628,9 +4628,9 @@ function ms(...n) {
|
|
|
4628
4628
|
M,
|
|
4629
4629
|
0
|
|
4630
4630
|
];
|
|
4631
|
-
const Z = !j(
|
|
4632
|
-
if (Z && (
|
|
4633
|
-
data:
|
|
4631
|
+
const Z = !j(c), ce = b(), L = ce.data, Oe = ce._c, ge = j(Oe) ? L : Oe;
|
|
4632
|
+
if (Z && (c = we(c) ? c(ge, L) : c, m({
|
|
4633
|
+
data: c,
|
|
4634
4634
|
_c: ge
|
|
4635
4635
|
})), we($))
|
|
4636
4636
|
try {
|
|
@@ -4644,7 +4644,7 @@ function ms(...n) {
|
|
|
4644
4644
|
}), M !== h[_][0]) {
|
|
4645
4645
|
if (q) throw q;
|
|
4646
4646
|
return $;
|
|
4647
|
-
} else q && Z &&
|
|
4647
|
+
} else q && Z && u(q) && (i = !0, m({
|
|
4648
4648
|
data: ge,
|
|
4649
4649
|
_c: ne
|
|
4650
4650
|
}));
|
|
@@ -4685,20 +4685,20 @@ const Br = (n, e) => {
|
|
|
4685
4685
|
const i = /* @__PURE__ */ Object.create(null), o = (f, p) => {
|
|
4686
4686
|
const w = i[f] || [];
|
|
4687
4687
|
return i[f] = w, w.push(p), () => w.splice(w.indexOf(p), 1);
|
|
4688
|
-
},
|
|
4688
|
+
}, c = (f, p, w) => {
|
|
4689
4689
|
n.set(f, p);
|
|
4690
4690
|
const _ = i[f];
|
|
4691
4691
|
if (_)
|
|
4692
4692
|
for (const b of _)
|
|
4693
4693
|
b(p, w);
|
|
4694
|
-
},
|
|
4694
|
+
}, u = () => {
|
|
4695
4695
|
if (!Ne.has(n) && (Ne.set(n, [
|
|
4696
4696
|
r,
|
|
4697
4697
|
/* @__PURE__ */ Object.create(null),
|
|
4698
4698
|
/* @__PURE__ */ Object.create(null),
|
|
4699
4699
|
/* @__PURE__ */ Object.create(null),
|
|
4700
4700
|
s,
|
|
4701
|
-
|
|
4701
|
+
c,
|
|
4702
4702
|
o
|
|
4703
4703
|
]), !Mt)) {
|
|
4704
4704
|
const f = t.initFocus(setTimeout.bind(ne, Br.bind(ne, r, ds))), p = t.initReconnect(setTimeout.bind(ne, Br.bind(ne, r, ls)));
|
|
@@ -4707,10 +4707,10 @@ const Br = (n, e) => {
|
|
|
4707
4707
|
};
|
|
4708
4708
|
}
|
|
4709
4709
|
};
|
|
4710
|
-
return
|
|
4710
|
+
return u(), [
|
|
4711
4711
|
n,
|
|
4712
4712
|
s,
|
|
4713
|
-
|
|
4713
|
+
u,
|
|
4714
4714
|
a
|
|
4715
4715
|
];
|
|
4716
4716
|
}
|
|
@@ -4766,18 +4766,18 @@ const Br = (n, e) => {
|
|
|
4766
4766
|
null,
|
|
4767
4767
|
(n[1] === null ? n[2] : n[1]) || {}
|
|
4768
4768
|
], Io = () => Ue(Oo, js(Ao)), Zo = (n) => (e, t, r) => n(e, t && ((...a) => {
|
|
4769
|
-
const [i] =
|
|
4769
|
+
const [i] = cr(e), [, , , o] = Ne.get(ys);
|
|
4770
4770
|
if (i.startsWith(Co))
|
|
4771
4771
|
return t(...a);
|
|
4772
|
-
const
|
|
4773
|
-
return j(
|
|
4772
|
+
const c = o[i];
|
|
4773
|
+
return j(c) ? t(...a) : (delete o[i], c);
|
|
4774
4774
|
}), r), Lo = Ro.concat(Zo), Po = (n) => function(...t) {
|
|
4775
4775
|
const r = Io(), [s, a, i] = No(t), o = To(r, i);
|
|
4776
|
-
let
|
|
4777
|
-
const { use:
|
|
4776
|
+
let c = n;
|
|
4777
|
+
const { use: u } = o, f = (u || []).concat(Lo);
|
|
4778
4778
|
for (let p = f.length; p--; )
|
|
4779
|
-
|
|
4780
|
-
return
|
|
4779
|
+
c = f[p](c);
|
|
4780
|
+
return c(s, a || o.fetcher || null, o);
|
|
4781
4781
|
}, Mo = (n, e, t) => {
|
|
4782
4782
|
const r = e[n] || (e[n] = []);
|
|
4783
4783
|
return r.push(t), () => {
|
|
@@ -4808,8 +4808,8 @@ const Sn = Dt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
4808
4808
|
}), On = {
|
|
4809
4809
|
dedupe: !0
|
|
4810
4810
|
}, Do = (n, e, t) => {
|
|
4811
|
-
const { cache: r, compare: s, suspense: a, fallbackData: i, revalidateOnMount: o, revalidateIfStale:
|
|
4812
|
-
for (const X in
|
|
4811
|
+
const { cache: r, compare: s, suspense: a, fallbackData: i, revalidateOnMount: o, revalidateIfStale: c, refreshInterval: u, refreshWhenHidden: f, refreshWhenOffline: p, keepPreviousData: w } = t, [_, b, m, v] = Ne.get(r), [h, x] = cr(n), P = qe(!1), V = qe(!1), $ = qe(h), q = qe(e), M = qe(t), Z = () => M.current, ce = () => Z().isVisible() && Z().isOnline(), [L, Oe, ge, G] = ps(r, h), ue = qe({}).current, Wt = j(i) ? j(t.fallback) ? ne : t.fallback[h] : i, ur = (F, D) => {
|
|
4812
|
+
for (const X in ue) {
|
|
4813
4813
|
const K = X;
|
|
4814
4814
|
if (K === "data") {
|
|
4815
4815
|
if (!s(F[K], D[K]) && (!j(F[K]) || !s(Ut, D[K])))
|
|
@@ -4819,7 +4819,7 @@ const Sn = Dt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
4819
4819
|
}
|
|
4820
4820
|
return !0;
|
|
4821
4821
|
}, dr = Ns(() => {
|
|
4822
|
-
const F = !h || !e ? !1 : j(o) ? Z().isPaused() || a ? !1 :
|
|
4822
|
+
const F = !h || !e ? !1 : j(o) ? Z().isPaused() || a ? !1 : c !== !1 : o, D = (ee) => {
|
|
4823
4823
|
const Te = Ue(ee);
|
|
4824
4824
|
return delete Te._k, F ? B({
|
|
4825
4825
|
isValidating: !0,
|
|
@@ -4830,23 +4830,23 @@ const Sn = Dt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
4830
4830
|
return [
|
|
4831
4831
|
() => {
|
|
4832
4832
|
const ee = D(L());
|
|
4833
|
-
return
|
|
4833
|
+
return ur(ee, J) ? (J.data = ee.data, J.isLoading = ee.isLoading, J.isValidating = ee.isValidating, J.error = ee.error, J) : (J = ee, ee);
|
|
4834
4834
|
},
|
|
4835
4835
|
() => tt
|
|
4836
4836
|
];
|
|
4837
4837
|
}, [
|
|
4838
4838
|
r,
|
|
4839
4839
|
h
|
|
4840
|
-
]), Qe =
|
|
4840
|
+
]), Qe = uo.useSyncExternalStore(Bt(
|
|
4841
4841
|
(F) => ge(h, (D, X) => {
|
|
4842
|
-
|
|
4842
|
+
ur(X, D) || F();
|
|
4843
4843
|
}),
|
|
4844
4844
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4845
4845
|
[
|
|
4846
4846
|
r,
|
|
4847
4847
|
h
|
|
4848
4848
|
]
|
|
4849
|
-
), dr[0], dr[1]), lr = !P.current, vs = _[h] && _[h].length > 0, et = Qe.data, Ke = j(et) ? Wt && fs(Wt) ? Sn(Wt) : Wt : et, Vt = Qe.error, dn = qe(Ke), Ut = w ? j(et) ? j(dn.current) ? Ke : dn.current : et : Ke, hr = vs && !j(Vt) ? !1 : lr && !j(o) ? o : Z().isPaused() ? !1 : a ? j(Ke) ? !1 :
|
|
4849
|
+
), dr[0], dr[1]), lr = !P.current, vs = _[h] && _[h].length > 0, et = Qe.data, Ke = j(et) ? Wt && fs(Wt) ? Sn(Wt) : Wt : et, Vt = Qe.error, dn = qe(Ke), Ut = w ? j(et) ? j(dn.current) ? Ke : dn.current : et : Ke, hr = vs && !j(Vt) ? !1 : lr && !j(o) ? o : Z().isPaused() ? !1 : a ? j(Ke) ? !1 : c : j(Ke) || c, fr = !!(h && e && lr && hr), _s = j(Qe.isValidating) ? fr : Qe.isValidating, bs = j(Qe.isLoading) ? fr : Qe.isLoading, ft = Bt(
|
|
4850
4850
|
(F) => Ze(void 0, null, function* () {
|
|
4851
4851
|
const D = q.current;
|
|
4852
4852
|
if (!h || !D || V.current || Z().isPaused())
|
|
@@ -4884,7 +4884,7 @@ const Sn = Dt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
4884
4884
|
} catch (de) {
|
|
4885
4885
|
yr();
|
|
4886
4886
|
const Ae = Z(), { shouldRetryOnError: ln } = Ae;
|
|
4887
|
-
Ae.isPaused() || (Te.error = de, J && ee() && (Ae.onError(de, h, Ae), (ln === !0 || we(ln) && ln(de)) && (!Z().revalidateOnFocus || !Z().revalidateOnReconnect ||
|
|
4887
|
+
Ae.isPaused() || (Te.error = de, J && ee() && (Ae.onError(de, h, Ae), (ln === !0 || we(ln) && ln(de)) && (!Z().revalidateOnFocus || !Z().revalidateOnReconnect || ce()) && Ae.onErrorRetry(de, h, Ae, (ws) => {
|
|
4888
4888
|
const hn = _[h];
|
|
4889
4889
|
hn && hn[0] && hn[0](Ur, ws);
|
|
4890
4890
|
}, {
|
|
@@ -4925,9 +4925,9 @@ const Sn = Dt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
4925
4925
|
const K = Mo(h, _, (he, tt = {}) => {
|
|
4926
4926
|
if (he == ds) {
|
|
4927
4927
|
const J = Date.now();
|
|
4928
|
-
Z().revalidateOnFocus && J > D &&
|
|
4928
|
+
Z().revalidateOnFocus && J > D && ce() && (D = J + Z().focusThrottleInterval, F());
|
|
4929
4929
|
} else if (he == ls)
|
|
4930
|
-
Z().revalidateOnReconnect &&
|
|
4930
|
+
Z().revalidateOnReconnect && ce() && F();
|
|
4931
4931
|
else {
|
|
4932
4932
|
if (he == hs)
|
|
4933
4933
|
return ft();
|
|
@@ -4945,7 +4945,7 @@ const Sn = Dt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
4945
4945
|
]), kn(() => {
|
|
4946
4946
|
let F;
|
|
4947
4947
|
function D() {
|
|
4948
|
-
const K = we(
|
|
4948
|
+
const K = we(u) ? u(L().data) : u;
|
|
4949
4949
|
K && F !== -1 && (F = setTimeout(X, K));
|
|
4950
4950
|
}
|
|
4951
4951
|
function X() {
|
|
@@ -4955,7 +4955,7 @@ const Sn = Dt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
4955
4955
|
F && (clearTimeout(F), F = -1);
|
|
4956
4956
|
};
|
|
4957
4957
|
}, [
|
|
4958
|
-
|
|
4958
|
+
u,
|
|
4959
4959
|
f,
|
|
4960
4960
|
p,
|
|
4961
4961
|
h
|
|
@@ -4977,16 +4977,16 @@ const Sn = Dt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
4977
4977
|
return {
|
|
4978
4978
|
mutate: pr,
|
|
4979
4979
|
get data() {
|
|
4980
|
-
return
|
|
4980
|
+
return ue.data = !0, Ut;
|
|
4981
4981
|
},
|
|
4982
4982
|
get error() {
|
|
4983
|
-
return
|
|
4983
|
+
return ue.error = !0, Vt;
|
|
4984
4984
|
},
|
|
4985
4985
|
get isValidating() {
|
|
4986
|
-
return
|
|
4986
|
+
return ue.isValidating = !0, _s;
|
|
4987
4987
|
},
|
|
4988
4988
|
get isLoading() {
|
|
4989
|
-
return
|
|
4989
|
+
return ue.isLoading = !0, bs;
|
|
4990
4990
|
}
|
|
4991
4991
|
};
|
|
4992
4992
|
}, $o = Po(Do), Ko = ({
|
|
@@ -5016,7 +5016,7 @@ const Sn = Dt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5016
5016
|
};
|
|
5017
5017
|
export {
|
|
5018
5018
|
ao as createJob,
|
|
5019
|
-
|
|
5019
|
+
us as initialProgress,
|
|
5020
5020
|
Uo as useAnimaCodegen,
|
|
5021
5021
|
Ko as useFigmaFile
|
|
5022
5022
|
};
|