@animaapp/anima-sdk-react 0.6.3 → 0.6.7
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 +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +206 -206
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var aa = Object.defineProperty, ia = Object.defineProperties;
|
|
2
2
|
var oa = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var zs = Object.getOwnPropertySymbols;
|
|
4
4
|
var ca = Object.prototype.hasOwnProperty, ua = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var Ks = (t, e, n) => e in t ? aa(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Ke = (t, e) => {
|
|
6
6
|
for (var n in e || (e = {}))
|
|
7
|
-
ca.call(e, n) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
10
|
-
ua.call(e, n) &&
|
|
7
|
+
ca.call(e, n) && Ks(t, n, e[n]);
|
|
8
|
+
if (zs)
|
|
9
|
+
for (var n of zs(e))
|
|
10
|
+
ua.call(e, n) && Ks(t, n, e[n]);
|
|
11
11
|
return t;
|
|
12
|
-
},
|
|
12
|
+
}, Bs = (t, e) => ia(t, oa(e));
|
|
13
13
|
var Ie = (t, e, n) => new Promise((s, r) => {
|
|
14
14
|
var a = (c) => {
|
|
15
15
|
try {
|
|
@@ -26,7 +26,7 @@ var Ie = (t, e, n) => new Promise((s, r) => {
|
|
|
26
26
|
}, o = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(a, i);
|
|
27
27
|
o((n = n.apply(t, e)).next());
|
|
28
28
|
});
|
|
29
|
-
import Gt, { useState as da, useCallback as rn, createContext as la, useEffect as fa, useLayoutEffect as ha, useContext as pa, useRef as
|
|
29
|
+
import Gt, { useState as da, useCallback as rn, createContext as la, useEffect as fa, useLayoutEffect as ha, useContext as pa, useRef as Be, useMemo as ma, useDebugValue as ya } from "react";
|
|
30
30
|
const ga = (t) => {
|
|
31
31
|
let e = "";
|
|
32
32
|
const n = new Uint8Array(t), s = n.byteLength;
|
|
@@ -129,7 +129,7 @@ var ja = Object.defineProperty, Za = Object.defineProperties, Da = Object.getOwn
|
|
|
129
129
|
for (var n of Js(e))
|
|
130
130
|
La.call(e, n) && Ys(t, n, e[n]);
|
|
131
131
|
return t;
|
|
132
|
-
}, Ts = (t, e) => Za(t, Da(e)), Cs = (t, e, n) => e.has(t) || Or("Cannot " + n), P = (t, e, n) => (Cs(t, e, "read from private field"), n ? n.call(t) : e.get(t)), de = (t, e, n) => e.has(t) ? Or("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), J = (t, e, n, s) => (Cs(t, e, "write to private field"), e.set(t, n), n), _e = (t, e, n) => (Cs(t, e, "access private method"), n),
|
|
132
|
+
}, Ts = (t, e) => Za(t, Da(e)), Cs = (t, e, n) => e.has(t) || Or("Cannot " + n), P = (t, e, n) => (Cs(t, e, "read from private field"), n ? n.call(t) : e.get(t)), de = (t, e, n) => e.has(t) ? Or("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), J = (t, e, n, s) => (Cs(t, e, "write to private field"), e.set(t, n), n), _e = (t, e, n) => (Cs(t, e, "access private method"), n), K = (t, e, n) => new Promise((s, r) => {
|
|
133
133
|
var a = (c) => {
|
|
134
134
|
try {
|
|
135
135
|
o(n.next(c));
|
|
@@ -144,17 +144,17 @@ var ja = Object.defineProperty, Za = Object.defineProperties, Da = Object.getOwn
|
|
|
144
144
|
}
|
|
145
145
|
}, o = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(a, i);
|
|
146
146
|
o((n = n.apply(t, e)).next());
|
|
147
|
-
}),
|
|
147
|
+
}), Fa = (t, e, n) => (e = t[Xs("asyncIterator")]) ? e.call(t) : (t = t[Xs("iterator")](), e = {}, n = (s, r) => (r = t[s]) && (e[s] = (a) => new Promise((i, o, c) => (a = r.call(t, a), c = a.done, Promise.resolve(a.value).then((u) => i({ value: u, done: c }), o)))), n("next"), n("return"), e), $a = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
|
|
148
148
|
function Wa(t) {
|
|
149
149
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
150
150
|
}
|
|
151
|
-
var
|
|
152
|
-
function
|
|
151
|
+
var Bn = { exports: {} }, Va = Bn.exports, Qs;
|
|
152
|
+
function Ua() {
|
|
153
153
|
return Qs || (Qs = 1, function(t, e) {
|
|
154
154
|
(function(n, s) {
|
|
155
155
|
t.exports = s();
|
|
156
156
|
})(Va, function() {
|
|
157
|
-
var n = typeof Promise == "function", s = typeof self == "object" ? self :
|
|
157
|
+
var n = typeof Promise == "function", s = typeof self == "object" ? self : $a, r = typeof Symbol != "undefined", a = typeof Map != "undefined", i = typeof Set != "undefined", o = typeof WeakMap != "undefined", c = typeof WeakSet != "undefined", u = typeof DataView != "undefined", h = r && typeof Symbol.iterator != "undefined", p = r && typeof Symbol.toStringTag != "undefined", k = i && typeof Set.prototype.entries == "function", v = a && typeof Map.prototype.entries == "function", b = k && Object.getPrototypeOf((/* @__PURE__ */ new Set()).entries()), l = v && Object.getPrototypeOf((/* @__PURE__ */ new Map()).entries()), y = h && typeof Array.prototype[Symbol.iterator] == "function", m = y && Object.getPrototypeOf([][Symbol.iterator]()), W = h && typeof String.prototype[Symbol.iterator] == "function", R = W && Object.getPrototypeOf(""[Symbol.iterator]()), U = 8, L = -1;
|
|
158
158
|
function q(Z) {
|
|
159
159
|
var D = typeof Z;
|
|
160
160
|
if (D !== "object")
|
|
@@ -188,15 +188,15 @@ function za() {
|
|
|
188
188
|
var Se = p && Z[Symbol.toStringTag];
|
|
189
189
|
if (typeof Se == "string")
|
|
190
190
|
return Se;
|
|
191
|
-
var
|
|
192
|
-
return
|
|
191
|
+
var F = Object.getPrototypeOf(Z);
|
|
192
|
+
return F === RegExp.prototype ? "RegExp" : F === Date.prototype ? "Date" : n && F === Promise.prototype ? "Promise" : i && F === Set.prototype ? "Set" : a && F === Map.prototype ? "Map" : c && F === WeakSet.prototype ? "WeakSet" : o && F === WeakMap.prototype ? "WeakMap" : u && F === DataView.prototype ? "DataView" : a && F === l ? "Map Iterator" : i && F === b ? "Set Iterator" : y && F === m ? "Array Iterator" : W && F === R ? "String Iterator" : F === null ? "Object" : Object.prototype.toString.call(Z).slice(U, L);
|
|
193
193
|
}
|
|
194
194
|
return q;
|
|
195
195
|
});
|
|
196
|
-
}(
|
|
196
|
+
}(Bn)), Bn.exports;
|
|
197
197
|
}
|
|
198
|
-
var
|
|
199
|
-
const
|
|
198
|
+
var za = Ua();
|
|
199
|
+
const Ka = /* @__PURE__ */ Wa(za), As = typeof Buffer != "undefined", Ba = As && typeof Buffer.from != "undefined", qa = As ? (
|
|
200
200
|
/**
|
|
201
201
|
* is value is Buffer?
|
|
202
202
|
*
|
|
@@ -217,7 +217,7 @@ const Ba = /* @__PURE__ */ Wa(Ua), As = typeof Buffer != "undefined", Ka = As &&
|
|
|
217
217
|
function() {
|
|
218
218
|
return !1;
|
|
219
219
|
}
|
|
220
|
-
), Ha =
|
|
220
|
+
), Ha = Ba ? (
|
|
221
221
|
/**
|
|
222
222
|
* copy Buffer
|
|
223
223
|
*
|
|
@@ -253,7 +253,7 @@ const Ba = /* @__PURE__ */ Wa(Ua), As = typeof Buffer != "undefined", Ka = As &&
|
|
|
253
253
|
}
|
|
254
254
|
);
|
|
255
255
|
function mt(t) {
|
|
256
|
-
return qa(t) ? "Buffer" :
|
|
256
|
+
return qa(t) ? "Buffer" : Ka(t);
|
|
257
257
|
}
|
|
258
258
|
const Ga = /* @__PURE__ */ new Set([
|
|
259
259
|
"Arguments",
|
|
@@ -466,7 +466,7 @@ class pi {
|
|
|
466
466
|
de(this, Jn), de(this, an), de(this, He), de(this, on), J(this, an, e), J(this, on, n), J(this, He, 0);
|
|
467
467
|
}
|
|
468
468
|
run() {
|
|
469
|
-
return
|
|
469
|
+
return K(this, null, function* () {
|
|
470
470
|
try {
|
|
471
471
|
return yield P(this, on).call(this);
|
|
472
472
|
} catch (e) {
|
|
@@ -485,10 +485,10 @@ function mi() {
|
|
|
485
485
|
return typeof CompressionStream != "undefined";
|
|
486
486
|
}
|
|
487
487
|
function yi(t) {
|
|
488
|
-
return
|
|
488
|
+
return K(this, null, function* () {
|
|
489
489
|
const e = new Blob([t]).stream().pipeThrough(new CompressionStream("gzip")), n = [];
|
|
490
490
|
try {
|
|
491
|
-
for (var s =
|
|
491
|
+
for (var s = Fa(e), r, a, i; r = !(a = yield s.next()).done; r = !1) {
|
|
492
492
|
const o = a.value;
|
|
493
493
|
n.push(o);
|
|
494
494
|
}
|
|
@@ -506,7 +506,7 @@ function yi(t) {
|
|
|
506
506
|
});
|
|
507
507
|
}
|
|
508
508
|
function gi(t) {
|
|
509
|
-
return
|
|
509
|
+
return K(this, null, function* () {
|
|
510
510
|
const e = yield new Blob(t).arrayBuffer();
|
|
511
511
|
return new Uint8Array(e);
|
|
512
512
|
});
|
|
@@ -588,7 +588,7 @@ class ki {
|
|
|
588
588
|
return J(this, ne, e), this;
|
|
589
589
|
}
|
|
590
590
|
get(e) {
|
|
591
|
-
return
|
|
591
|
+
return K(this, arguments, function* (n, s = {}) {
|
|
592
592
|
const { overrideBaseAddress: r, overrideDefaultHeaders: a } = s, i = r != null ? r : this.baseAddress;
|
|
593
593
|
let o = a != null ? a : this.headers;
|
|
594
594
|
const c = kt(P(this, ne));
|
|
@@ -596,33 +596,33 @@ class ki {
|
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
598
|
post(e, n) {
|
|
599
|
-
return
|
|
599
|
+
return K(this, arguments, function* (s, r, a = {}) {
|
|
600
600
|
const i = kt(P(this, ne));
|
|
601
601
|
return J(this, ne, {}), _e(this, ge, Et).call(this, s, "POST", r, a, i);
|
|
602
602
|
});
|
|
603
603
|
}
|
|
604
604
|
put(e, n) {
|
|
605
|
-
return
|
|
605
|
+
return K(this, arguments, function* (s, r, a = {}) {
|
|
606
606
|
const i = kt(P(this, ne));
|
|
607
607
|
return J(this, ne, {}), _e(this, ge, Et).call(this, s, "PUT", r, a, i);
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
610
|
delete(e, n) {
|
|
611
|
-
return
|
|
611
|
+
return K(this, arguments, function* (s, r, a = {}) {
|
|
612
612
|
const i = kt(P(this, ne));
|
|
613
613
|
return J(this, ne, {}), _e(this, ge, Et).call(this, s, "DELETE", r, a, i);
|
|
614
614
|
});
|
|
615
615
|
}
|
|
616
616
|
patch(e, n) {
|
|
617
|
-
return
|
|
617
|
+
return K(this, arguments, function* (s, r, a = {}) {
|
|
618
618
|
const i = kt(P(this, ne));
|
|
619
619
|
return J(this, ne, {}), _e(this, ge, Et).call(this, s, "PATCH", r, a, i);
|
|
620
620
|
});
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
Ge = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakSet(), Yn = function(t, e, n) {
|
|
624
|
-
return
|
|
625
|
-
const s = () =>
|
|
624
|
+
return K(this, null, function* () {
|
|
625
|
+
const s = () => K(this, null, function* () {
|
|
626
626
|
var c, u;
|
|
627
627
|
try {
|
|
628
628
|
return yield P(this, Ge).call(this, t, ae(ae({}, n), e.abortSignal && { signal: e.abortSignal }));
|
|
@@ -632,7 +632,7 @@ Ge = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), ge = /*
|
|
|
632
632
|
}), { headers: r } = n != null ? n : {}, a = (c, u) => {
|
|
633
633
|
var h, p;
|
|
634
634
|
return ((h = c == null ? void 0 : c.headers) == null ? void 0 : h.get(u)) || ((p = c == null ? void 0 : c.headersObject) == null ? void 0 : p[u]) || "";
|
|
635
|
-
}, i = (c) =>
|
|
635
|
+
}, i = (c) => K(this, null, function* () {
|
|
636
636
|
var u;
|
|
637
637
|
if (!c.ok) {
|
|
638
638
|
const p = yield c.text().catch();
|
|
@@ -675,7 +675,7 @@ Ge = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), ge = /*
|
|
|
675
675
|
return yield i(o);
|
|
676
676
|
});
|
|
677
677
|
}, Qn = function(t, e, n) {
|
|
678
|
-
return
|
|
678
|
+
return K(this, null, function* () {
|
|
679
679
|
var s, r;
|
|
680
680
|
const {
|
|
681
681
|
onProgress: a,
|
|
@@ -703,10 +703,10 @@ Ge = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), ge = /*
|
|
|
703
703
|
const k = yield p.json(), { job_id: v } = k;
|
|
704
704
|
if (!v)
|
|
705
705
|
throw new Error("Job ID not found in response");
|
|
706
|
-
return new Promise((b, l) =>
|
|
706
|
+
return new Promise((b, l) => K(this, null, function* () {
|
|
707
707
|
const y = setTimeout(() => {
|
|
708
708
|
l(new Error("Job timed out"));
|
|
709
|
-
}, c), m = (W = 0) =>
|
|
709
|
+
}, c), m = (W = 0) => K(this, null, function* () {
|
|
710
710
|
if (i != null && i.aborted) {
|
|
711
711
|
clearTimeout(y), P(this, Ge).call(this, `${h}/${v}/cancel`, { method: "POST", headers: this.headers }).then(() => {
|
|
712
712
|
l(new xt({ canceled: !0 }));
|
|
@@ -719,14 +719,14 @@ Ge = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), ge = /*
|
|
|
719
719
|
const R = yield (yield P(this, Ge).call(this, `${h}/${v}`, { headers: this.headers })).json();
|
|
720
720
|
if (R.status === "success") {
|
|
721
721
|
clearTimeout(y);
|
|
722
|
-
const
|
|
723
|
-
b(
|
|
722
|
+
const U = R.response_json;
|
|
723
|
+
b(U);
|
|
724
724
|
} else if (R.status === "failed")
|
|
725
725
|
clearTimeout(y), l(new _i(R.response_json));
|
|
726
726
|
else {
|
|
727
727
|
a && a(R.response_json);
|
|
728
|
-
const
|
|
729
|
-
setTimeout(() => m(W + 1),
|
|
728
|
+
const U = o(W);
|
|
729
|
+
setTimeout(() => m(W + 1), U);
|
|
730
730
|
}
|
|
731
731
|
} catch (R) {
|
|
732
732
|
l(R);
|
|
@@ -736,7 +736,7 @@ Ge = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), ge = /*
|
|
|
736
736
|
}));
|
|
737
737
|
});
|
|
738
738
|
}, Et = function(t, e, n, s, r) {
|
|
739
|
-
return
|
|
739
|
+
return K(this, null, function* () {
|
|
740
740
|
const { overrideBaseAddress: a, overrideDefaultHeaders: i } = s, o = a != null ? a : this.baseAddress;
|
|
741
741
|
let c = i != null ? i : this.headers;
|
|
742
742
|
r.extraHeaders && (c = ae(ae({}, c), r.extraHeaders)), r.requestValidation && (c = Ts(ae({}, c), { "X-Request-Nonce": Cr(), "X-Request-Timestamp": Xn() }));
|
|
@@ -775,7 +775,7 @@ class xi {
|
|
|
775
775
|
de(this, St), this.resourceName = "Files", J(this, St, e);
|
|
776
776
|
}
|
|
777
777
|
get(e) {
|
|
778
|
-
return
|
|
778
|
+
return K(this, arguments, function* ({ fileKey: n, params: s = {} }) {
|
|
779
779
|
const r = new URLSearchParams(ae({
|
|
780
780
|
plugin_data: "857346721138427857"
|
|
781
781
|
}, s)).toString(), a = `v1/files/${n}?${r}`;
|
|
@@ -783,7 +783,7 @@ class xi {
|
|
|
783
783
|
});
|
|
784
784
|
}
|
|
785
785
|
getImageFills(e) {
|
|
786
|
-
return
|
|
786
|
+
return K(this, arguments, function* ({ fileKey: n }) {
|
|
787
787
|
var s, r;
|
|
788
788
|
const a = `v1/files/${n}/images`;
|
|
789
789
|
return (r = (s = (yield P(this, St).get(a)).meta) == null ? void 0 : s.images) != null ? r : {};
|
|
@@ -805,7 +805,7 @@ class Oi {
|
|
|
805
805
|
* Note: Use the `file.images` API to get the _source_ images used on the node fills, which has better quality.
|
|
806
806
|
*/
|
|
807
807
|
get(e) {
|
|
808
|
-
return
|
|
808
|
+
return K(this, arguments, function* ({ fileKey: n, nodeIds: s, format: r = "jpg", scale: a }) {
|
|
809
809
|
const i = Ei(n, s, r), o = P(this, ve).cache.images.entries.get(i);
|
|
810
810
|
if (Si(o))
|
|
811
811
|
return o.result;
|
|
@@ -824,7 +824,7 @@ class Oi {
|
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
826
|
ve = /* @__PURE__ */ new WeakMap(), es = /* @__PURE__ */ new WeakSet(), Ar = function(t, e, n, s, r) {
|
|
827
|
-
return
|
|
827
|
+
return K(this, null, function* () {
|
|
828
828
|
const a = yield P(this, ve).get(
|
|
829
829
|
`v1/images/${e}?ids=${n}&format=${s}${r ? `&scale=${r}` : ""}`
|
|
830
830
|
);
|
|
@@ -840,7 +840,7 @@ class Ti {
|
|
|
840
840
|
de(this, cn), this.resourceName = "Nodes", J(this, cn, e);
|
|
841
841
|
}
|
|
842
842
|
get(e) {
|
|
843
|
-
return
|
|
843
|
+
return K(this, arguments, function* ({ fileKey: n, nodeIds: s, params: r = {} }) {
|
|
844
844
|
const a = Ts(ae({}, r), {
|
|
845
845
|
ids: s.join(",")
|
|
846
846
|
}), i = new URLSearchParams(ae({
|
|
@@ -1445,7 +1445,7 @@ class T {
|
|
|
1445
1445
|
}
|
|
1446
1446
|
catch(e) {
|
|
1447
1447
|
const n = typeof e == "function" ? e : () => e;
|
|
1448
|
-
return new
|
|
1448
|
+
return new Ut(E(d({}, O(this._def)), {
|
|
1449
1449
|
innerType: this,
|
|
1450
1450
|
catchValue: n,
|
|
1451
1451
|
typeName: x.ZodCatch
|
|
@@ -1461,7 +1461,7 @@ class T {
|
|
|
1461
1461
|
return Jt.create(this, e);
|
|
1462
1462
|
}
|
|
1463
1463
|
readonly() {
|
|
1464
|
-
return
|
|
1464
|
+
return zt.create(this);
|
|
1465
1465
|
}
|
|
1466
1466
|
isOptional() {
|
|
1467
1467
|
return this.safeParse(void 0).success;
|
|
@@ -1470,9 +1470,9 @@ class T {
|
|
|
1470
1470
|
return this.safeParse(null).success;
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
|
-
const Ii = /^c[^\s-]{8,}$/i, ji = /^[0-9a-z]+$/, Zi = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Di = /^[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, Mi = /^[a-z0-9_-]{21}$/i, Li = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,
|
|
1473
|
+
const Ii = /^c[^\s-]{8,}$/i, ji = /^[0-9a-z]+$/, Zi = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Di = /^[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, Mi = /^[a-z0-9_-]{21}$/i, Li = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Fi = /^[-+]?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)?)??$/, $i = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Wi = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
1474
1474
|
let jn;
|
|
1475
|
-
const Vi = /^(?:(?: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])$/,
|
|
1475
|
+
const Vi = /^(?:(?: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])$/, Ui = /^(?:(?: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])$/, zi = /^(([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]))$/, Ki = /^(([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])$/, Bi = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, qi = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Pr = "((\\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])))", Hi = new RegExp(`^${Pr}$`);
|
|
1476
1476
|
function Ir(t) {
|
|
1477
1477
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
1478
1478
|
return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
@@ -1486,7 +1486,7 @@ function jr(t) {
|
|
|
1486
1486
|
return n.push(t.local ? "Z?" : "Z"), t.offset && n.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${n.join("|")})`, new RegExp(`^${e}$`);
|
|
1487
1487
|
}
|
|
1488
1488
|
function Ji(t, e) {
|
|
1489
|
-
return !!((e === "v4" || !e) && Vi.test(t) || (e === "v6" || !e) &&
|
|
1489
|
+
return !!((e === "v4" || !e) && Vi.test(t) || (e === "v6" || !e) && zi.test(t));
|
|
1490
1490
|
}
|
|
1491
1491
|
function Xi(t, e) {
|
|
1492
1492
|
if (!Li.test(t))
|
|
@@ -1499,7 +1499,7 @@ function Xi(t, e) {
|
|
|
1499
1499
|
}
|
|
1500
1500
|
}
|
|
1501
1501
|
function Yi(t, e) {
|
|
1502
|
-
return !!((e === "v4" || !e) &&
|
|
1502
|
+
return !!((e === "v4" || !e) && Ui.test(t) || (e === "v6" || !e) && Ki.test(t));
|
|
1503
1503
|
}
|
|
1504
1504
|
class pe extends T {
|
|
1505
1505
|
_parse(e) {
|
|
@@ -1550,7 +1550,7 @@ class pe extends T {
|
|
|
1550
1550
|
message: r.message
|
|
1551
1551
|
}), n.dirty());
|
|
1552
1552
|
} else if (r.kind === "email")
|
|
1553
|
-
|
|
1553
|
+
$i.test(e.data) || (s = this._getOrReturnCtx(e, s), g(s, {
|
|
1554
1554
|
validation: "email",
|
|
1555
1555
|
code: f.invalid_string,
|
|
1556
1556
|
message: r.message
|
|
@@ -1629,7 +1629,7 @@ class pe extends T {
|
|
|
1629
1629
|
code: f.invalid_string,
|
|
1630
1630
|
validation: "time",
|
|
1631
1631
|
message: r.message
|
|
1632
|
-
}), n.dirty()) : r.kind === "duration" ?
|
|
1632
|
+
}), n.dirty()) : r.kind === "duration" ? Fi.test(e.data) || (s = this._getOrReturnCtx(e, s), g(s, {
|
|
1633
1633
|
validation: "duration",
|
|
1634
1634
|
code: f.invalid_string,
|
|
1635
1635
|
message: r.message
|
|
@@ -1645,7 +1645,7 @@ class pe extends T {
|
|
|
1645
1645
|
validation: "cidr",
|
|
1646
1646
|
code: f.invalid_string,
|
|
1647
1647
|
message: r.message
|
|
1648
|
-
}), n.dirty()) : r.kind === "base64" ?
|
|
1648
|
+
}), n.dirty()) : r.kind === "base64" ? Bi.test(e.data) || (s = this._getOrReturnCtx(e, s), g(s, {
|
|
1649
1649
|
validation: "base64",
|
|
1650
1650
|
code: f.invalid_string,
|
|
1651
1651
|
message: r.message
|
|
@@ -2045,7 +2045,7 @@ Le.create = (t) => new Le(d({
|
|
|
2045
2045
|
typeName: x.ZodNumber,
|
|
2046
2046
|
coerce: (t == null ? void 0 : t.coerce) || !1
|
|
2047
2047
|
}, O(t)));
|
|
2048
|
-
class
|
|
2048
|
+
class Fe extends T {
|
|
2049
2049
|
constructor() {
|
|
2050
2050
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
2051
2051
|
}
|
|
@@ -2101,7 +2101,7 @@ class $e extends T {
|
|
|
2101
2101
|
return this.setLimit("max", e, !1, w.toString(n));
|
|
2102
2102
|
}
|
|
2103
2103
|
setLimit(e, n, s, r) {
|
|
2104
|
-
return new
|
|
2104
|
+
return new Fe(E(d({}, this._def), {
|
|
2105
2105
|
checks: [
|
|
2106
2106
|
...this._def.checks,
|
|
2107
2107
|
{
|
|
@@ -2114,7 +2114,7 @@ class $e extends T {
|
|
|
2114
2114
|
}));
|
|
2115
2115
|
}
|
|
2116
2116
|
_addCheck(e) {
|
|
2117
|
-
return new
|
|
2117
|
+
return new Fe(E(d({}, this._def), {
|
|
2118
2118
|
checks: [...this._def.checks, e]
|
|
2119
2119
|
}));
|
|
2120
2120
|
}
|
|
@@ -2170,9 +2170,9 @@ class $e extends T {
|
|
|
2170
2170
|
return e;
|
|
2171
2171
|
}
|
|
2172
2172
|
}
|
|
2173
|
-
|
|
2173
|
+
Fe.create = (t) => {
|
|
2174
2174
|
var e;
|
|
2175
|
-
return new
|
|
2175
|
+
return new Fe(d({
|
|
2176
2176
|
checks: [],
|
|
2177
2177
|
typeName: x.ZodBigInt,
|
|
2178
2178
|
coerce: (e = t == null ? void 0 : t.coerce) !== null && e !== void 0 ? e : !1
|
|
@@ -2789,7 +2789,7 @@ Dt.create = (t, e) => new Dt(d({
|
|
|
2789
2789
|
options: t,
|
|
2790
2790
|
typeName: x.ZodUnion
|
|
2791
2791
|
}, O(e)));
|
|
2792
|
-
const Ze = (t) => t instanceof
|
|
2792
|
+
const Ze = (t) => t instanceof Ft ? Ze(t.schema) : t instanceof ye ? Ze(t.innerType()) : t instanceof $t ? [t.value] : t instanceof $e ? t.options : t instanceof Wt ? A.objectValues(t.enum) : t instanceof Vt ? Ze(t._def.innerType) : t instanceof jt ? [void 0] : t instanceof Zt ? [null] : t instanceof we ? [void 0, ...Ze(t.unwrap())] : t instanceof We ? [null, ...Ze(t.unwrap())] : t instanceof Ns || t instanceof zt ? Ze(t.unwrap()) : t instanceof Ut ? Ze(t._def.innerType) : [];
|
|
2793
2793
|
class xn extends T {
|
|
2794
2794
|
_parse(e) {
|
|
2795
2795
|
const { ctx: n } = this._processInputParams(e);
|
|
@@ -3209,7 +3209,7 @@ class ht extends T {
|
|
|
3209
3209
|
}, O(s)));
|
|
3210
3210
|
}
|
|
3211
3211
|
}
|
|
3212
|
-
class
|
|
3212
|
+
class Ft extends T {
|
|
3213
3213
|
get schema() {
|
|
3214
3214
|
return this._def.getter();
|
|
3215
3215
|
}
|
|
@@ -3218,11 +3218,11 @@ class $t extends T {
|
|
|
3218
3218
|
return this._def.getter()._parse({ data: n.data, path: n.path, parent: n });
|
|
3219
3219
|
}
|
|
3220
3220
|
}
|
|
3221
|
-
|
|
3221
|
+
Ft.create = (t, e) => new Ft(d({
|
|
3222
3222
|
getter: t,
|
|
3223
3223
|
typeName: x.ZodLazy
|
|
3224
3224
|
}, O(e)));
|
|
3225
|
-
class
|
|
3225
|
+
class $t extends T {
|
|
3226
3226
|
_parse(e) {
|
|
3227
3227
|
if (e.data !== this._def.value) {
|
|
3228
3228
|
const n = this._getOrReturnCtx(e);
|
|
@@ -3238,17 +3238,17 @@ class Ft extends T {
|
|
|
3238
3238
|
return this._def.value;
|
|
3239
3239
|
}
|
|
3240
3240
|
}
|
|
3241
|
-
|
|
3241
|
+
$t.create = (t, e) => new $t(d({
|
|
3242
3242
|
value: t,
|
|
3243
3243
|
typeName: x.ZodLiteral
|
|
3244
3244
|
}, O(e)));
|
|
3245
3245
|
function Zr(t, e) {
|
|
3246
|
-
return new
|
|
3246
|
+
return new $e(d({
|
|
3247
3247
|
values: t,
|
|
3248
3248
|
typeName: x.ZodEnum
|
|
3249
3249
|
}, O(e)));
|
|
3250
3250
|
}
|
|
3251
|
-
class
|
|
3251
|
+
class $e extends T {
|
|
3252
3252
|
constructor() {
|
|
3253
3253
|
super(...arguments), Ot.set(this, void 0);
|
|
3254
3254
|
}
|
|
@@ -3293,14 +3293,14 @@ class Fe extends T {
|
|
|
3293
3293
|
return e;
|
|
3294
3294
|
}
|
|
3295
3295
|
extract(e, n = this._def) {
|
|
3296
|
-
return
|
|
3296
|
+
return $e.create(e, d(d({}, this._def), n));
|
|
3297
3297
|
}
|
|
3298
3298
|
exclude(e, n = this._def) {
|
|
3299
|
-
return
|
|
3299
|
+
return $e.create(this.options.filter((s) => !e.includes(s)), d(d({}, this._def), n));
|
|
3300
3300
|
}
|
|
3301
3301
|
}
|
|
3302
3302
|
Ot = /* @__PURE__ */ new WeakMap();
|
|
3303
|
-
|
|
3303
|
+
$e.create = Zr;
|
|
3304
3304
|
class Wt extends T {
|
|
3305
3305
|
constructor() {
|
|
3306
3306
|
super(...arguments), Tt.set(this, void 0);
|
|
@@ -3487,7 +3487,7 @@ Vt.create = (t, e) => new Vt(d({
|
|
|
3487
3487
|
typeName: x.ZodDefault,
|
|
3488
3488
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default
|
|
3489
3489
|
}, O(e)));
|
|
3490
|
-
class
|
|
3490
|
+
class Ut extends T {
|
|
3491
3491
|
_parse(e) {
|
|
3492
3492
|
const { ctx: n } = this._processInputParams(e), s = E(d({}, n), {
|
|
3493
3493
|
common: E(d({}, n.common), {
|
|
@@ -3520,7 +3520,7 @@ class zt extends T {
|
|
|
3520
3520
|
return this._def.innerType;
|
|
3521
3521
|
}
|
|
3522
3522
|
}
|
|
3523
|
-
|
|
3523
|
+
Ut.create = (t, e) => new Ut(d({
|
|
3524
3524
|
innerType: t,
|
|
3525
3525
|
typeName: x.ZodCatch,
|
|
3526
3526
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch
|
|
@@ -3595,7 +3595,7 @@ class Jt extends T {
|
|
|
3595
3595
|
});
|
|
3596
3596
|
}
|
|
3597
3597
|
}
|
|
3598
|
-
class
|
|
3598
|
+
class zt extends T {
|
|
3599
3599
|
_parse(e) {
|
|
3600
3600
|
const n = this._def.innerType._parse(e), s = (r) => (Ye(r) && (r.value = Object.freeze(r.value)), r);
|
|
3601
3601
|
return Pt(n) ? n.then((r) => s(r)) : s(n);
|
|
@@ -3604,7 +3604,7 @@ class Ut extends T {
|
|
|
3604
3604
|
return this._def.innerType;
|
|
3605
3605
|
}
|
|
3606
3606
|
}
|
|
3607
|
-
|
|
3607
|
+
zt.create = (t, e) => new zt(d({
|
|
3608
3608
|
innerType: t,
|
|
3609
3609
|
typeName: x.ZodReadonly
|
|
3610
3610
|
}, O(e)));
|
|
@@ -3639,13 +3639,13 @@ var x;
|
|
|
3639
3639
|
})(x || (x = {}));
|
|
3640
3640
|
const no = (t, e = {
|
|
3641
3641
|
message: `Input not instance of ${t.name}`
|
|
3642
|
-
}) => Dr((n) => n instanceof t, e), Mr = pe.create, Lr = Le.create, so = vn.create, ro =
|
|
3642
|
+
}) => Dr((n) => n instanceof t, e), Mr = pe.create, Lr = Le.create, so = vn.create, ro = Fe.create, Fr = It.create, ao = Qe.create, io = mn.create, oo = jt.create, co = Zt.create, uo = gt.create, lo = Xe.create, fo = Pe.create, ho = yn.create, po = me.create, mo = V.create, yo = V.strictCreate, go = Dt.create, vo = xn.create, _o = Mt.create, bo = Ee.create, wo = Lt.create, ko = gn.create, xo = et.create, Eo = ht.create, So = Ft.create, Oo = $t.create, To = $e.create, Co = Wt.create, Ao = vt.create, ir = ye.create, No = we.create, Ro = We.create, Po = ye.createWithPreprocess, Io = Jt.create, jo = () => Mr().optional(), Zo = () => Lr().optional(), Do = () => Fr().optional(), Mo = {
|
|
3643
3643
|
string: (t) => pe.create(E(d({}, t), { coerce: !0 })),
|
|
3644
3644
|
number: (t) => Le.create(E(d({}, t), { coerce: !0 })),
|
|
3645
3645
|
boolean: (t) => It.create(E(d({}, t), {
|
|
3646
3646
|
coerce: !0
|
|
3647
3647
|
})),
|
|
3648
|
-
bigint: (t) =>
|
|
3648
|
+
bigint: (t) => Fe.create(E(d({}, t), { coerce: !0 })),
|
|
3649
3649
|
date: (t) => Qe.create(E(d({}, t), { coerce: !0 }))
|
|
3650
3650
|
}, Lo = S;
|
|
3651
3651
|
var I = /* @__PURE__ */ Object.freeze({
|
|
@@ -3676,7 +3676,7 @@ var I = /* @__PURE__ */ Object.freeze({
|
|
|
3676
3676
|
datetimeRegex: jr,
|
|
3677
3677
|
ZodString: pe,
|
|
3678
3678
|
ZodNumber: Le,
|
|
3679
|
-
ZodBigInt:
|
|
3679
|
+
ZodBigInt: Fe,
|
|
3680
3680
|
ZodBoolean: It,
|
|
3681
3681
|
ZodDate: Qe,
|
|
3682
3682
|
ZodSymbol: mn,
|
|
@@ -3696,9 +3696,9 @@ var I = /* @__PURE__ */ Object.freeze({
|
|
|
3696
3696
|
ZodMap: gn,
|
|
3697
3697
|
ZodSet: et,
|
|
3698
3698
|
ZodFunction: ht,
|
|
3699
|
-
ZodLazy:
|
|
3700
|
-
ZodLiteral:
|
|
3701
|
-
ZodEnum:
|
|
3699
|
+
ZodLazy: Ft,
|
|
3700
|
+
ZodLiteral: $t,
|
|
3701
|
+
ZodEnum: $e,
|
|
3702
3702
|
ZodNativeEnum: Wt,
|
|
3703
3703
|
ZodPromise: vt,
|
|
3704
3704
|
ZodEffects: ye,
|
|
@@ -3706,12 +3706,12 @@ var I = /* @__PURE__ */ Object.freeze({
|
|
|
3706
3706
|
ZodOptional: we,
|
|
3707
3707
|
ZodNullable: We,
|
|
3708
3708
|
ZodDefault: Vt,
|
|
3709
|
-
ZodCatch:
|
|
3709
|
+
ZodCatch: Ut,
|
|
3710
3710
|
ZodNaN: vn,
|
|
3711
3711
|
BRAND: eo,
|
|
3712
3712
|
ZodBranded: Ns,
|
|
3713
3713
|
ZodPipeline: Jt,
|
|
3714
|
-
ZodReadonly:
|
|
3714
|
+
ZodReadonly: zt,
|
|
3715
3715
|
custom: Dr,
|
|
3716
3716
|
Schema: T,
|
|
3717
3717
|
ZodSchema: T,
|
|
@@ -3723,7 +3723,7 @@ var I = /* @__PURE__ */ Object.freeze({
|
|
|
3723
3723
|
any: uo,
|
|
3724
3724
|
array: po,
|
|
3725
3725
|
bigint: ro,
|
|
3726
|
-
boolean:
|
|
3726
|
+
boolean: Fr,
|
|
3727
3727
|
date: ao,
|
|
3728
3728
|
discriminatedUnion: vo,
|
|
3729
3729
|
effect: ir,
|
|
@@ -3812,7 +3812,7 @@ class or extends Error {
|
|
|
3812
3812
|
}
|
|
3813
3813
|
function Zn(t) {
|
|
3814
3814
|
}
|
|
3815
|
-
function
|
|
3815
|
+
function Fo(t) {
|
|
3816
3816
|
if (typeof t == "function")
|
|
3817
3817
|
throw new TypeError(
|
|
3818
3818
|
"`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
|
|
@@ -3820,7 +3820,7 @@ function $o(t) {
|
|
|
3820
3820
|
const { onEvent: e = Zn, onError: n = Zn, onRetry: s = Zn, onComment: r } = t;
|
|
3821
3821
|
let a = "", i = !0, o, c = "", u = "";
|
|
3822
3822
|
function h(l) {
|
|
3823
|
-
const y = i ? l.replace(/^\xEF\xBB\xBF/, "") : l, [m, W] =
|
|
3823
|
+
const y = i ? l.replace(/^\xEF\xBB\xBF/, "") : l, [m, W] = $o(`${a}${y}`);
|
|
3824
3824
|
for (const R of m)
|
|
3825
3825
|
p(R);
|
|
3826
3826
|
a = W, i = !1;
|
|
@@ -3888,7 +3888,7 @@ function $o(t) {
|
|
|
3888
3888
|
}
|
|
3889
3889
|
return { feed: h, reset: b };
|
|
3890
3890
|
}
|
|
3891
|
-
function
|
|
3891
|
+
function $o(t) {
|
|
3892
3892
|
const e = [];
|
|
3893
3893
|
let n = "", s = 0;
|
|
3894
3894
|
for (; s < t.length; ) {
|
|
@@ -3965,13 +3965,13 @@ function ur(t) {
|
|
|
3965
3965
|
timeStamp: t.timeStamp
|
|
3966
3966
|
};
|
|
3967
3967
|
}
|
|
3968
|
-
var
|
|
3968
|
+
var $r = (t) => {
|
|
3969
3969
|
throw TypeError(t);
|
|
3970
|
-
}, Rs = (t, e, n) => e.has(t) ||
|
|
3970
|
+
}, Rs = (t, e, n) => e.has(t) || $r("Cannot " + n), C = (t, e, n) => (Rs(t, e, "read from private field"), n ? n.call(t) : e.get(t)), B = (t, e, n) => e.has(t) ? $r("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), $ = (t, e, n, s) => (Rs(t, e, "write to private field"), e.set(t, n), n), Ae = (t, e, n) => (Rs(t, e, "access private method"), n), se, Je, ut, un, _n, Nt, ft, Rt, De, dt, pt, lt, Ct, he, is, os, cs, dr, us, ds, At, ls, fs;
|
|
3971
3971
|
class dn extends EventTarget {
|
|
3972
3972
|
constructor(e, n) {
|
|
3973
3973
|
var s, r;
|
|
3974
|
-
super(),
|
|
3974
|
+
super(), B(this, he), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, B(this, se), B(this, Je), B(this, ut), B(this, un), B(this, _n), B(this, Nt), B(this, ft), B(this, Rt, null), B(this, De), B(this, dt), B(this, pt, null), B(this, lt, null), B(this, Ct, null), B(this, os, (a) => Ie(this, null, function* () {
|
|
3975
3975
|
var i;
|
|
3976
3976
|
C(this, dt).reset();
|
|
3977
3977
|
const { body: o, redirected: c, status: u, headers: h } = a;
|
|
@@ -3979,7 +3979,7 @@ class dn extends EventTarget {
|
|
|
3979
3979
|
Ae(this, he, At).call(this, "Server sent HTTP 204, not reconnecting", 204), this.close();
|
|
3980
3980
|
return;
|
|
3981
3981
|
}
|
|
3982
|
-
if (c ?
|
|
3982
|
+
if (c ? $(this, ut, new URL(a.url)) : $(this, ut, void 0), u !== 200) {
|
|
3983
3983
|
Ae(this, he, At).call(this, `Non-200 status code (${u})`, u);
|
|
3984
3984
|
return;
|
|
3985
3985
|
}
|
|
@@ -3989,7 +3989,7 @@ class dn extends EventTarget {
|
|
|
3989
3989
|
}
|
|
3990
3990
|
if (C(this, se) === this.CLOSED)
|
|
3991
3991
|
return;
|
|
3992
|
-
|
|
3992
|
+
$(this, se, this.OPEN);
|
|
3993
3993
|
const p = new Event("open");
|
|
3994
3994
|
if ((i = C(this, Ct)) == null || i.call(this, p), this.dispatchEvent(p), typeof o != "object" || !o || !("getReader" in o)) {
|
|
3995
3995
|
Ae(this, he, At).call(this, "Invalid response body, expected a web ReadableStream", u), this.close();
|
|
@@ -4001,35 +4001,35 @@ class dn extends EventTarget {
|
|
|
4001
4001
|
const { done: l, value: y } = yield v.read();
|
|
4002
4002
|
y && C(this, dt).feed(k.decode(y, { stream: !l })), l && (b = !1, C(this, dt).reset(), Ae(this, he, ls).call(this));
|
|
4003
4003
|
} while (b);
|
|
4004
|
-
})),
|
|
4005
|
-
|
|
4006
|
-
}),
|
|
4007
|
-
typeof a.id == "string" &&
|
|
4004
|
+
})), B(this, cs, (a) => {
|
|
4005
|
+
$(this, De, void 0), !(a.name === "AbortError" || a.type === "aborted") && Ae(this, he, ls).call(this, as(a));
|
|
4006
|
+
}), B(this, us, (a) => {
|
|
4007
|
+
typeof a.id == "string" && $(this, Rt, a.id);
|
|
4008
4008
|
const i = new MessageEvent(a.event || "message", {
|
|
4009
4009
|
data: a.data,
|
|
4010
4010
|
origin: C(this, ut) ? C(this, ut).origin : C(this, Je).origin,
|
|
4011
4011
|
lastEventId: a.id || ""
|
|
4012
4012
|
});
|
|
4013
4013
|
C(this, lt) && (!a.event || a.event === "message") && C(this, lt).call(this, i), this.dispatchEvent(i);
|
|
4014
|
-
}),
|
|
4015
|
-
|
|
4016
|
-
}),
|
|
4017
|
-
|
|
4014
|
+
}), B(this, ds, (a) => {
|
|
4015
|
+
$(this, Nt, a);
|
|
4016
|
+
}), B(this, fs, () => {
|
|
4017
|
+
$(this, ft, void 0), C(this, se) === this.CONNECTING && Ae(this, he, is).call(this);
|
|
4018
4018
|
});
|
|
4019
4019
|
try {
|
|
4020
4020
|
if (e instanceof URL)
|
|
4021
|
-
|
|
4021
|
+
$(this, Je, e);
|
|
4022
4022
|
else if (typeof e == "string")
|
|
4023
|
-
|
|
4023
|
+
$(this, Je, new URL(e, Vo()));
|
|
4024
4024
|
else
|
|
4025
4025
|
throw new Error("Invalid URL");
|
|
4026
4026
|
} catch (a) {
|
|
4027
4027
|
throw Wo("An invalid or illegal string was specified");
|
|
4028
4028
|
}
|
|
4029
|
-
|
|
4029
|
+
$(this, dt, Fo({
|
|
4030
4030
|
onEvent: C(this, us),
|
|
4031
4031
|
onRetry: C(this, ds)
|
|
4032
|
-
})),
|
|
4032
|
+
})), $(this, se, this.CONNECTING), $(this, Nt, 3e3), $(this, _n, (s = n == null ? void 0 : n.fetch) != null ? s : globalThis.fetch), $(this, un, (r = n == null ? void 0 : n.withCredentials) != null ? r : !1), Ae(this, he, is).call(this);
|
|
4033
4033
|
}
|
|
4034
4034
|
/**
|
|
4035
4035
|
* Returns the state of this EventSource object's connection. It can have the values described below.
|
|
@@ -4067,21 +4067,21 @@ class dn extends EventTarget {
|
|
|
4067
4067
|
return C(this, pt);
|
|
4068
4068
|
}
|
|
4069
4069
|
set onerror(e) {
|
|
4070
|
-
|
|
4070
|
+
$(this, pt, e);
|
|
4071
4071
|
}
|
|
4072
4072
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
4073
4073
|
get onmessage() {
|
|
4074
4074
|
return C(this, lt);
|
|
4075
4075
|
}
|
|
4076
4076
|
set onmessage(e) {
|
|
4077
|
-
|
|
4077
|
+
$(this, lt, e);
|
|
4078
4078
|
}
|
|
4079
4079
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
4080
4080
|
get onopen() {
|
|
4081
4081
|
return C(this, Ct);
|
|
4082
4082
|
}
|
|
4083
4083
|
set onopen(e) {
|
|
4084
|
-
|
|
4084
|
+
$(this, Ct, e);
|
|
4085
4085
|
}
|
|
4086
4086
|
addEventListener(e, n, s) {
|
|
4087
4087
|
const r = n;
|
|
@@ -4099,7 +4099,7 @@ class dn extends EventTarget {
|
|
|
4099
4099
|
* @public
|
|
4100
4100
|
*/
|
|
4101
4101
|
close() {
|
|
4102
|
-
C(this, ft) && clearTimeout(C(this, ft)), C(this, se) !== this.CLOSED && (C(this, De) && C(this, De).abort(),
|
|
4102
|
+
C(this, ft) && clearTimeout(C(this, ft)), C(this, se) !== this.CLOSED && (C(this, De) && C(this, De).abort(), $(this, se, this.CLOSED), $(this, De, void 0));
|
|
4103
4103
|
}
|
|
4104
4104
|
}
|
|
4105
4105
|
se = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), un = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Rt = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakMap(), Ct = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakSet(), /**
|
|
@@ -4108,7 +4108,7 @@ se = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), ut = /*
|
|
|
4108
4108
|
* @internal
|
|
4109
4109
|
*/
|
|
4110
4110
|
is = function() {
|
|
4111
|
-
|
|
4111
|
+
$(this, se, this.CONNECTING), $(this, De, new AbortController()), C(this, _n)(C(this, Je), Ae(this, he, dr).call(this)).then(C(this, os)).catch(C(this, cs));
|
|
4112
4112
|
}, os = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), /**
|
|
4113
4113
|
* Get request options for the `fetch()` request
|
|
4114
4114
|
*
|
|
@@ -4122,7 +4122,7 @@ dr = function() {
|
|
|
4122
4122
|
// [spec] …will have their mode set to "cors"…
|
|
4123
4123
|
mode: "cors",
|
|
4124
4124
|
redirect: "follow",
|
|
4125
|
-
headers:
|
|
4125
|
+
headers: Ke({ Accept: "text/event-stream" }, C(this, Rt) ? { "Last-Event-ID": C(this, Rt) } : void 0),
|
|
4126
4126
|
cache: "no-store",
|
|
4127
4127
|
signal: (t = C(this, De)) == null ? void 0 : t.signal
|
|
4128
4128
|
};
|
|
@@ -4136,7 +4136,7 @@ dr = function() {
|
|
|
4136
4136
|
*/
|
|
4137
4137
|
At = function(t, e) {
|
|
4138
4138
|
var n;
|
|
4139
|
-
C(this, se) !== this.CLOSED &&
|
|
4139
|
+
C(this, se) !== this.CLOSED && $(this, se, this.CLOSED);
|
|
4140
4140
|
const s = new cr("error", { code: e, message: t });
|
|
4141
4141
|
(n = C(this, pt)) == null || n.call(this, s), this.dispatchEvent(s);
|
|
4142
4142
|
}, /**
|
|
@@ -4150,9 +4150,9 @@ ls = function(t, e) {
|
|
|
4150
4150
|
var n;
|
|
4151
4151
|
if (C(this, se) === this.CLOSED)
|
|
4152
4152
|
return;
|
|
4153
|
-
|
|
4153
|
+
$(this, se, this.CONNECTING);
|
|
4154
4154
|
const s = new cr("error", { code: e, message: t });
|
|
4155
|
-
(n = C(this, pt)) == null || n.call(this, s), this.dispatchEvent(s),
|
|
4155
|
+
(n = C(this, pt)) == null || n.call(this, s), this.dispatchEvent(s), $(this, ft, setTimeout(C(this, fs), C(this, Nt)));
|
|
4156
4156
|
}, fs = /* @__PURE__ */ new WeakMap(), /**
|
|
4157
4157
|
* ReadyState representing an EventSource currently trying to connect
|
|
4158
4158
|
*
|
|
@@ -4173,7 +4173,7 @@ function Vo() {
|
|
|
4173
4173
|
const t = "document" in globalThis ? globalThis.document : void 0;
|
|
4174
4174
|
return t && typeof t == "object" && "baseURI" in t && typeof t.baseURI == "string" ? t.baseURI : void 0;
|
|
4175
4175
|
}
|
|
4176
|
-
var Wr = Symbol.for("immer-nothing"), lr = Symbol.for("immer-draftable"), oe = Symbol.for("immer-state"),
|
|
4176
|
+
var Wr = Symbol.for("immer-nothing"), lr = Symbol.for("immer-draftable"), oe = Symbol.for("immer-state"), Uo = process.env.NODE_ENV !== "production" ? [
|
|
4177
4177
|
// All error codes, starting by 0:
|
|
4178
4178
|
function(t) {
|
|
4179
4179
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
|
@@ -4206,7 +4206,7 @@ var Wr = Symbol.for("immer-nothing"), lr = Symbol.for("immer-draftable"), oe = S
|
|
|
4206
4206
|
] : [];
|
|
4207
4207
|
function re(t, ...e) {
|
|
4208
4208
|
if (process.env.NODE_ENV !== "production") {
|
|
4209
|
-
const n =
|
|
4209
|
+
const n = Uo[t], s = typeof n == "function" ? n.apply(null, e) : n;
|
|
4210
4210
|
throw new Error(`[Immer] ${s}`);
|
|
4211
4211
|
}
|
|
4212
4212
|
throw new Error(
|
|
@@ -4221,7 +4221,7 @@ function tt(t) {
|
|
|
4221
4221
|
var e;
|
|
4222
4222
|
return t ? Vr(t) || Array.isArray(t) || !!t[lr] || !!((e = t.constructor) != null && e[lr]) || Sn(t) || On(t) : !1;
|
|
4223
4223
|
}
|
|
4224
|
-
var
|
|
4224
|
+
var zo = Object.prototype.constructor.toString();
|
|
4225
4225
|
function Vr(t) {
|
|
4226
4226
|
if (!t || typeof t != "object")
|
|
4227
4227
|
return !1;
|
|
@@ -4229,7 +4229,7 @@ function Vr(t) {
|
|
|
4229
4229
|
if (e === null)
|
|
4230
4230
|
return !0;
|
|
4231
4231
|
const n = Object.hasOwnProperty.call(e, "constructor") && e.constructor;
|
|
4232
|
-
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) ===
|
|
4232
|
+
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === zo;
|
|
4233
4233
|
}
|
|
4234
4234
|
function bn(t, e) {
|
|
4235
4235
|
En(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
|
@@ -4243,11 +4243,11 @@ function En(t) {
|
|
|
4243
4243
|
function hs(t, e) {
|
|
4244
4244
|
return En(t) === 2 ? t.has(e) : Object.prototype.hasOwnProperty.call(t, e);
|
|
4245
4245
|
}
|
|
4246
|
-
function
|
|
4246
|
+
function Ur(t, e, n) {
|
|
4247
4247
|
const s = En(t);
|
|
4248
4248
|
s === 2 ? t.set(e, n) : s === 3 ? t.add(n) : t[e] = n;
|
|
4249
4249
|
}
|
|
4250
|
-
function
|
|
4250
|
+
function Ko(t, e) {
|
|
4251
4251
|
return t === e ? t !== 0 || 1 / t === 1 / e : t !== t && e !== e;
|
|
4252
4252
|
}
|
|
4253
4253
|
function Sn(t) {
|
|
@@ -4285,15 +4285,15 @@ function ps(t, e) {
|
|
|
4285
4285
|
} else {
|
|
4286
4286
|
const s = _t(t);
|
|
4287
4287
|
if (s !== null && n)
|
|
4288
|
-
return
|
|
4288
|
+
return Ke({}, t);
|
|
4289
4289
|
const r = Object.create(s);
|
|
4290
4290
|
return Object.assign(r, t);
|
|
4291
4291
|
}
|
|
4292
4292
|
}
|
|
4293
|
-
function
|
|
4294
|
-
return Tn(t) || bt(t) || !tt(t) || (En(t) > 1 && (t.set = t.add = t.clear = t.delete =
|
|
4293
|
+
function Kt(t, e = !1) {
|
|
4294
|
+
return Tn(t) || bt(t) || !tt(t) || (En(t) > 1 && (t.set = t.add = t.clear = t.delete = Bo), Object.freeze(t), e && Object.entries(t).forEach(([n, s]) => Kt(s, !0))), t;
|
|
4295
4295
|
}
|
|
4296
|
-
function
|
|
4296
|
+
function Bo() {
|
|
4297
4297
|
re(2);
|
|
4298
4298
|
}
|
|
4299
4299
|
function Tn(t) {
|
|
@@ -4304,9 +4304,9 @@ function nt(t) {
|
|
|
4304
4304
|
const e = qo[t];
|
|
4305
4305
|
return e || re(0, t), e;
|
|
4306
4306
|
}
|
|
4307
|
-
var
|
|
4308
|
-
function
|
|
4309
|
-
return
|
|
4307
|
+
var Bt;
|
|
4308
|
+
function zr() {
|
|
4309
|
+
return Bt;
|
|
4310
4310
|
}
|
|
4311
4311
|
function Ho(t, e) {
|
|
4312
4312
|
return {
|
|
@@ -4326,10 +4326,10 @@ function ms(t) {
|
|
|
4326
4326
|
ys(t), t.drafts_.forEach(Go), t.drafts_ = null;
|
|
4327
4327
|
}
|
|
4328
4328
|
function ys(t) {
|
|
4329
|
-
t ===
|
|
4329
|
+
t === Bt && (Bt = t.parent_);
|
|
4330
4330
|
}
|
|
4331
4331
|
function hr(t) {
|
|
4332
|
-
return
|
|
4332
|
+
return Bt = Ho(Bt, t);
|
|
4333
4333
|
}
|
|
4334
4334
|
function Go(t) {
|
|
4335
4335
|
const e = t[oe];
|
|
@@ -4378,7 +4378,7 @@ function mr(t, e, n, s, r, a, i) {
|
|
|
4378
4378
|
if (process.env.NODE_ENV !== "production" && r === n && re(5), bt(r)) {
|
|
4379
4379
|
const o = a && e && e.type_ !== 3 && // Set objects are atomic since they have no keys.
|
|
4380
4380
|
!hs(e.assigned_, s) ? a.concat(s) : void 0, c = wn(t, r, o);
|
|
4381
|
-
if (
|
|
4381
|
+
if (Ur(n, s, c), bt(c))
|
|
4382
4382
|
t.canAutoFreeze_ = !1;
|
|
4383
4383
|
else
|
|
4384
4384
|
return;
|
|
@@ -4390,13 +4390,13 @@ function mr(t, e, n, s, r, a, i) {
|
|
|
4390
4390
|
}
|
|
4391
4391
|
}
|
|
4392
4392
|
function kn(t, e, n = !1) {
|
|
4393
|
-
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ &&
|
|
4393
|
+
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && Kt(e, n);
|
|
4394
4394
|
}
|
|
4395
4395
|
function Jo(t, e) {
|
|
4396
4396
|
const n = Array.isArray(t), s = {
|
|
4397
4397
|
type_: n ? 1 : 0,
|
|
4398
4398
|
// Track which produce call this is associated with.
|
|
4399
|
-
scope_: e ? e.scope_ :
|
|
4399
|
+
scope_: e ? e.scope_ : zr(),
|
|
4400
4400
|
// True for both shallow and deep changes.
|
|
4401
4401
|
modified_: !1,
|
|
4402
4402
|
// Used during finalization.
|
|
@@ -4438,14 +4438,14 @@ var Ps = {
|
|
|
4438
4438
|
return Reflect.ownKeys(qe(t));
|
|
4439
4439
|
},
|
|
4440
4440
|
set(t, e, n) {
|
|
4441
|
-
const s =
|
|
4441
|
+
const s = Kr(qe(t), e);
|
|
4442
4442
|
if (s != null && s.set)
|
|
4443
4443
|
return s.set.call(t.draft_, n), !0;
|
|
4444
4444
|
if (!t.modified_) {
|
|
4445
4445
|
const r = Dn(qe(t), e), a = r == null ? void 0 : r[oe];
|
|
4446
4446
|
if (a && a.base_ === n)
|
|
4447
4447
|
return t.copy_[e] = n, t.assigned_[e] = !1, !0;
|
|
4448
|
-
if (
|
|
4448
|
+
if (Ko(n, r) && (n !== void 0 || hs(t.base_, e)))
|
|
4449
4449
|
return !0;
|
|
4450
4450
|
Mn(t), gs(t);
|
|
4451
4451
|
}
|
|
@@ -4494,14 +4494,14 @@ function Dn(t, e) {
|
|
|
4494
4494
|
}
|
|
4495
4495
|
function Xo(t, e, n) {
|
|
4496
4496
|
var r;
|
|
4497
|
-
const s =
|
|
4497
|
+
const s = Kr(e, n);
|
|
4498
4498
|
return s ? "value" in s ? s.value : (
|
|
4499
4499
|
// This is a very special case, if the prop is a getter defined by the
|
|
4500
4500
|
// prototype, we should invoke it with the draft as context!
|
|
4501
4501
|
(r = s.get) == null ? void 0 : r.call(t.draft_)
|
|
4502
4502
|
) : void 0;
|
|
4503
4503
|
}
|
|
4504
|
-
function
|
|
4504
|
+
function Kr(t, e) {
|
|
4505
4505
|
if (!(e in t))
|
|
4506
4506
|
return;
|
|
4507
4507
|
let n = _t(t);
|
|
@@ -4544,7 +4544,7 @@ var Yo = class {
|
|
|
4544
4544
|
}
|
|
4545
4545
|
return fr(a, s), pr(r, a);
|
|
4546
4546
|
} else if (!e || typeof e != "object") {
|
|
4547
|
-
if (r = n(e), r === void 0 && (r = e), r === Wr && (r = void 0), this.autoFreeze_ &&
|
|
4547
|
+
if (r = n(e), r === void 0 && (r = e), r === Wr && (r = void 0), this.autoFreeze_ && Kt(r, !0), s) {
|
|
4548
4548
|
const a = [], i = [];
|
|
4549
4549
|
nt("Patches").generateReplacementPatches_(e, r, a, i), s(a, i);
|
|
4550
4550
|
}
|
|
@@ -4606,12 +4606,12 @@ var Yo = class {
|
|
|
4606
4606
|
};
|
|
4607
4607
|
function vs(t, e) {
|
|
4608
4608
|
const n = Sn(t) ? nt("MapSet").proxyMap_(t, e) : On(t) ? nt("MapSet").proxySet_(t, e) : Jo(t, e);
|
|
4609
|
-
return (e ? e.scope_ :
|
|
4609
|
+
return (e ? e.scope_ : zr()).drafts_.push(n), n;
|
|
4610
4610
|
}
|
|
4611
4611
|
function Qo(t) {
|
|
4612
|
-
return bt(t) || re(10, t),
|
|
4612
|
+
return bt(t) || re(10, t), Br(t);
|
|
4613
4613
|
}
|
|
4614
|
-
function
|
|
4614
|
+
function Br(t) {
|
|
4615
4615
|
if (!tt(t) || Tn(t))
|
|
4616
4616
|
return t;
|
|
4617
4617
|
const e = t[oe];
|
|
@@ -4623,7 +4623,7 @@ function Kr(t) {
|
|
|
4623
4623
|
} else
|
|
4624
4624
|
n = ps(t, !0);
|
|
4625
4625
|
return bn(n, (s, r) => {
|
|
4626
|
-
|
|
4626
|
+
Ur(n, s, Br(r));
|
|
4627
4627
|
}), e && (e.finalized_ = !1), n;
|
|
4628
4628
|
}
|
|
4629
4629
|
var ce = new Yo(), ec = ce.produce;
|
|
@@ -4637,10 +4637,10 @@ ce.createDraft.bind(ce);
|
|
|
4637
4637
|
ce.finishDraft.bind(ce);
|
|
4638
4638
|
function tc(t) {
|
|
4639
4639
|
var e = da(function() {
|
|
4640
|
-
return
|
|
4640
|
+
return Kt(typeof t == "function" ? t() : t, !0);
|
|
4641
4641
|
}), n = e[1];
|
|
4642
4642
|
return [e[0], rn(function(s) {
|
|
4643
|
-
n(typeof s == "function" ? ec(s) :
|
|
4643
|
+
n(typeof s == "function" ? ec(s) : Kt(s));
|
|
4644
4644
|
}, [])];
|
|
4645
4645
|
}
|
|
4646
4646
|
const yr = {
|
|
@@ -4682,7 +4682,7 @@ const yr = {
|
|
|
4682
4682
|
}
|
|
4683
4683
|
let o;
|
|
4684
4684
|
const c = new dn(t, {
|
|
4685
|
-
fetch: (v, b) => (o = fetch(v,
|
|
4685
|
+
fetch: (v, b) => (o = fetch(v, Bs(Ke({}, b), {
|
|
4686
4686
|
method: e,
|
|
4687
4687
|
body: JSON.stringify(a)
|
|
4688
4688
|
})), o)
|
|
@@ -4741,7 +4741,7 @@ const yr = {
|
|
|
4741
4741
|
let y;
|
|
4742
4742
|
try {
|
|
4743
4743
|
l instanceof MessageEvent ? y = JSON.parse(l.data) : y = yield (yield o).json();
|
|
4744
|
-
} catch (
|
|
4744
|
+
} catch (U) {
|
|
4745
4745
|
}
|
|
4746
4746
|
const m = new Gs({
|
|
4747
4747
|
name: (W = y == null ? void 0 : y.payload.name) != null ? W : "Unknown error",
|
|
@@ -4749,15 +4749,15 @@ const yr = {
|
|
|
4749
4749
|
status: y == null ? void 0 : y.payload.status,
|
|
4750
4750
|
detail: y == null ? void 0 : y.payload.detail
|
|
4751
4751
|
});
|
|
4752
|
-
s((
|
|
4753
|
-
|
|
4752
|
+
s((U) => {
|
|
4753
|
+
U.status = "error", U.error = m;
|
|
4754
4754
|
}), v({
|
|
4755
4755
|
result: null,
|
|
4756
4756
|
error: m
|
|
4757
4757
|
});
|
|
4758
4758
|
})), c.addEventListener("done", (l) => {
|
|
4759
4759
|
const y = JSON.parse(l.data);
|
|
4760
|
-
b.tokenUsage = y.payload.tokenUsage, s((m) => {
|
|
4760
|
+
b.tokenUsage = y.payload.tokenUsage, b.sessionId = y.payload.sessionId, s((m) => {
|
|
4761
4761
|
m.status = "success", m.result = b;
|
|
4762
4762
|
}), v({ result: b, error: null });
|
|
4763
4763
|
});
|
|
@@ -4775,10 +4775,10 @@ const yr = {
|
|
|
4775
4775
|
};
|
|
4776
4776
|
})), W = yield Promise.allSettled(m);
|
|
4777
4777
|
for (const R of W) {
|
|
4778
|
-
const
|
|
4778
|
+
const U = {};
|
|
4779
4779
|
if (R.status === "fulfilled") {
|
|
4780
4780
|
const { assetName: L, base64: q } = R.value;
|
|
4781
|
-
|
|
4781
|
+
U[L] = q;
|
|
4782
4782
|
const Z = y ? `${y}/${L}` : L;
|
|
4783
4783
|
l.files[Z] = {
|
|
4784
4784
|
content: q,
|
|
@@ -4849,7 +4849,7 @@ function nc() {
|
|
|
4849
4849
|
var h = typeof window == "undefined" || typeof window.document == "undefined" || typeof window.document.createElement == "undefined" ? u : o;
|
|
4850
4850
|
return Ln.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : h, Ln;
|
|
4851
4851
|
}
|
|
4852
|
-
var
|
|
4852
|
+
var Fn = {};
|
|
4853
4853
|
/**
|
|
4854
4854
|
* @license React
|
|
4855
4855
|
* use-sync-external-store-shim.development.js
|
|
@@ -4909,8 +4909,8 @@ function sc() {
|
|
|
4909
4909
|
}
|
|
4910
4910
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ != "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
4911
4911
|
var r = Gt, a = typeof Object.is == "function" ? Object.is : t, i = r.useState, o = r.useEffect, c = r.useLayoutEffect, u = r.useDebugValue, h = !1, p = !1, k = typeof window == "undefined" || typeof window.document == "undefined" || typeof window.document.createElement == "undefined" ? s : e;
|
|
4912
|
-
|
|
4913
|
-
}()),
|
|
4912
|
+
Fn.useSyncExternalStore = r.useSyncExternalStore !== void 0 ? r.useSyncExternalStore : k, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ != "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
4913
|
+
}()), Fn;
|
|
4914
4914
|
}
|
|
4915
4915
|
var br;
|
|
4916
4916
|
function rc() {
|
|
@@ -4943,22 +4943,22 @@ const Re = /* @__PURE__ */ new WeakMap(), Me = () => {
|
|
|
4943
4943
|
}, ee = (
|
|
4944
4944
|
/*#__NOINLINE__*/
|
|
4945
4945
|
Me()
|
|
4946
|
-
), bs = Object, N = (t) => t === ee, be = (t) => typeof t == "function", Ve = (t, e) =>
|
|
4946
|
+
), bs = Object, N = (t) => t === ee, be = (t) => typeof t == "function", Ve = (t, e) => Ke(Ke({}, t), e), Jr = (t) => be(t.then), $n = {}, nn = {}, Is = "undefined", Xt = typeof window != Is, ws = typeof document != Is, ic = Xt && "Deno" in window, oc = () => Xt && typeof window.requestAnimationFrame != Is, Xr = (t, e) => {
|
|
4947
4947
|
const n = Re.get(t);
|
|
4948
4948
|
return [
|
|
4949
4949
|
// Getter
|
|
4950
|
-
() => !N(e) && t.get(e) ||
|
|
4950
|
+
() => !N(e) && t.get(e) || $n,
|
|
4951
4951
|
// Setter
|
|
4952
4952
|
(s) => {
|
|
4953
4953
|
if (!N(e)) {
|
|
4954
4954
|
const r = t.get(e);
|
|
4955
|
-
e in nn || (nn[e] = r), n[5](e, Ve(r, s), r ||
|
|
4955
|
+
e in nn || (nn[e] = r), n[5](e, Ve(r, s), r || $n);
|
|
4956
4956
|
}
|
|
4957
4957
|
},
|
|
4958
4958
|
// Subscriber
|
|
4959
4959
|
n[6],
|
|
4960
4960
|
// Get server cache snapshot
|
|
4961
|
-
() => !N(e) && e in nn ? nn[e] : !N(e) && t.get(e) ||
|
|
4961
|
+
() => !N(e) && e in nn ? nn[e] : !N(e) && t.get(e) || $n
|
|
4962
4962
|
];
|
|
4963
4963
|
};
|
|
4964
4964
|
let ks = !0;
|
|
@@ -4991,10 +4991,10 @@ const cc = () => ks, [xs, Es] = Xt && window.addEventListener ? [
|
|
|
4991
4991
|
}, xr = !Gt.useId, Ht = !Xt || ic, pc = (t) => oc() ? window.requestAnimationFrame(t) : setTimeout(t, 1), Wn = Ht ? fa : ha, Vn = typeof navigator != "undefined" && navigator.connection, Er = !Ht && Vn && ([
|
|
4992
4992
|
"slow-2g",
|
|
4993
4993
|
"2g"
|
|
4994
|
-
].includes(Vn.effectiveType) || Vn.saveData), sn = /* @__PURE__ */ new WeakMap(),
|
|
4994
|
+
].includes(Vn.effectiveType) || Vn.saveData), sn = /* @__PURE__ */ new WeakMap(), Un = (t, e) => bs.prototype.toString.call(t) === `[object ${e}]`;
|
|
4995
4995
|
let mc = 0;
|
|
4996
4996
|
const Ss = (t) => {
|
|
4997
|
-
const e = typeof t, n =
|
|
4997
|
+
const e = typeof t, n = Un(t, "Date"), s = Un(t, "RegExp"), r = Un(t, "Object");
|
|
4998
4998
|
let a, i;
|
|
4999
4999
|
if (bs(t) === t && !n && !s) {
|
|
5000
5000
|
if (a = sn.get(t), a) return a;
|
|
@@ -5052,25 +5052,25 @@ function Yr(...t) {
|
|
|
5052
5052
|
return Ie(this, null, function* () {
|
|
5053
5053
|
const [v] = js(k);
|
|
5054
5054
|
if (!v) return;
|
|
5055
|
-
const [b, l] = Xr(e, v), [y, m, W, R] = Re.get(e),
|
|
5055
|
+
const [b, l] = Xr(e, v), [y, m, W, R] = Re.get(e), U = () => {
|
|
5056
5056
|
const le = y[v];
|
|
5057
5057
|
return (be(a.revalidate) ? a.revalidate(b().data, k) : a.revalidate !== !1) && (delete W[v], delete R[v], le && le[0]) ? le[0](Gr).then(() => b().data) : b().data;
|
|
5058
5058
|
};
|
|
5059
5059
|
if (t.length < 3)
|
|
5060
|
-
return
|
|
5060
|
+
return U();
|
|
5061
5061
|
let L = s, q;
|
|
5062
5062
|
const Z = Os();
|
|
5063
5063
|
m[v] = [
|
|
5064
5064
|
Z,
|
|
5065
5065
|
0
|
|
5066
5066
|
];
|
|
5067
|
-
const D = !N(c), Se = b(),
|
|
5068
|
-
if (D && (c = be(c) ? c(
|
|
5067
|
+
const D = !N(c), Se = b(), F = Se.data, st = Se._c, Ue = N(st) ? F : st;
|
|
5068
|
+
if (D && (c = be(c) ? c(Ue, F) : c, l({
|
|
5069
5069
|
data: c,
|
|
5070
|
-
_c:
|
|
5070
|
+
_c: Ue
|
|
5071
5071
|
})), be(L))
|
|
5072
5072
|
try {
|
|
5073
|
-
L = L(
|
|
5073
|
+
L = L(Ue);
|
|
5074
5074
|
} catch (le) {
|
|
5075
5075
|
q = le;
|
|
5076
5076
|
}
|
|
@@ -5081,12 +5081,12 @@ function Yr(...t) {
|
|
|
5081
5081
|
if (q) throw q;
|
|
5082
5082
|
return L;
|
|
5083
5083
|
} else q && D && u(q) && (i = !0, l({
|
|
5084
|
-
data:
|
|
5084
|
+
data: Ue,
|
|
5085
5085
|
_c: ee
|
|
5086
5086
|
}));
|
|
5087
5087
|
if (i && !q)
|
|
5088
5088
|
if (be(i)) {
|
|
5089
|
-
const le = i(L,
|
|
5089
|
+
const le = i(L, Ue);
|
|
5090
5090
|
l({
|
|
5091
5091
|
data: le,
|
|
5092
5092
|
error: ee,
|
|
@@ -5098,7 +5098,7 @@ function Yr(...t) {
|
|
|
5098
5098
|
error: ee,
|
|
5099
5099
|
_c: ee
|
|
5100
5100
|
});
|
|
5101
|
-
if (m[v][1] = Os(), Promise.resolve(
|
|
5101
|
+
if (m[v][1] = Os(), Promise.resolve(U()).then(() => {
|
|
5102
5102
|
l({
|
|
5103
5103
|
_c: ee
|
|
5104
5104
|
});
|
|
@@ -5222,7 +5222,7 @@ const Sr = (t, e) => {
|
|
|
5222
5222
|
};
|
|
5223
5223
|
};
|
|
5224
5224
|
Oc();
|
|
5225
|
-
const
|
|
5225
|
+
const zn = Gt.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
|
|
5226
5226
|
// and emitting an error.
|
|
5227
5227
|
// We assume that this is only for the `use(thenable)` case, not `use(context)`.
|
|
5228
5228
|
// https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45
|
|
@@ -5241,31 +5241,31 @@ const Un = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5241
5241
|
t.status = "rejected", t.reason = e;
|
|
5242
5242
|
}), t;
|
|
5243
5243
|
}
|
|
5244
|
-
}),
|
|
5244
|
+
}), Kn = {
|
|
5245
5245
|
dedupe: !0
|
|
5246
5246
|
}, Ic = (t, e, n) => {
|
|
5247
|
-
const { cache: s, compare: r, suspense: a, fallbackData: i, revalidateOnMount: o, revalidateIfStale: c, refreshInterval: u, refreshWhenHidden: h, refreshWhenOffline: p, keepPreviousData: k } = n, [v, b, l, y] = Re.get(s), [m, W] = js(t), R =
|
|
5247
|
+
const { cache: s, compare: r, suspense: a, fallbackData: i, revalidateOnMount: o, revalidateIfStale: c, refreshInterval: u, refreshWhenHidden: h, refreshWhenOffline: p, keepPreviousData: k } = n, [v, b, l, y] = Re.get(s), [m, W] = js(t), R = Be(!1), U = Be(!1), L = Be(m), q = Be(e), Z = Be(n), D = () => Z.current, Se = () => D().isVisible() && D().isOnline(), [F, st, Ue, le] = Xr(s, m), rt = Be({}).current, Yt = N(i) ? N(n.fallback) ? ee : n.fallback[m] : i, Zs = (M, j) => {
|
|
5248
5248
|
for (const G in rt) {
|
|
5249
|
-
const
|
|
5250
|
-
if (
|
|
5251
|
-
if (!r(M[
|
|
5249
|
+
const z = G;
|
|
5250
|
+
if (z === "data") {
|
|
5251
|
+
if (!r(M[z], j[z]) && (!N(M[z]) || !r(en, j[z])))
|
|
5252
5252
|
return !1;
|
|
5253
|
-
} else if (j[
|
|
5253
|
+
} else if (j[z] !== M[z])
|
|
5254
5254
|
return !1;
|
|
5255
5255
|
}
|
|
5256
5256
|
return !0;
|
|
5257
5257
|
}, Ds = ma(() => {
|
|
5258
5258
|
const M = !m || !e ? !1 : N(o) ? D().isPaused() || a ? !1 : c !== !1 : o, j = (Y) => {
|
|
5259
5259
|
const Oe = Ve(Y);
|
|
5260
|
-
return delete Oe._k, M ?
|
|
5260
|
+
return delete Oe._k, M ? Ke({
|
|
5261
5261
|
isValidating: !0,
|
|
5262
5262
|
isLoading: !0
|
|
5263
5263
|
}, Oe) : Oe;
|
|
5264
|
-
}, G =
|
|
5264
|
+
}, G = F(), z = le(), fe = j(G), ot = G === z ? fe : j(z);
|
|
5265
5265
|
let H = fe;
|
|
5266
5266
|
return [
|
|
5267
5267
|
() => {
|
|
5268
|
-
const Y = j(
|
|
5268
|
+
const Y = j(F());
|
|
5269
5269
|
return Zs(Y, H) ? (H.data = Y.data, H.isLoading = Y.isLoading, H.isValidating = Y.isValidating, H.error = Y.error, H) : (H = Y, Y);
|
|
5270
5270
|
},
|
|
5271
5271
|
() => ot
|
|
@@ -5274,7 +5274,7 @@ const Un = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5274
5274
|
s,
|
|
5275
5275
|
m
|
|
5276
5276
|
]), at = ac.useSyncExternalStore(rn(
|
|
5277
|
-
(M) =>
|
|
5277
|
+
(M) => Ue(m, (j, G) => {
|
|
5278
5278
|
Zs(G, j) || M();
|
|
5279
5279
|
}),
|
|
5280
5280
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -5282,40 +5282,40 @@ const Un = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5282
5282
|
s,
|
|
5283
5283
|
m
|
|
5284
5284
|
]
|
|
5285
|
-
), Ds[0], Ds[1]), Ms = !R.current, ta = v[m] && v[m].length > 0, it = at.data,
|
|
5285
|
+
), Ds[0], Ds[1]), Ms = !R.current, ta = v[m] && v[m].length > 0, it = at.data, ze = N(it) ? Yt && Jr(Yt) ? zn(Yt) : Yt : it, Qt = at.error, Cn = Be(ze), en = k ? N(it) ? N(Cn.current) ? ze : Cn.current : it : ze, Ls = ta && !N(Qt) ? !1 : Ms && !N(o) ? o : D().isPaused() ? !1 : a ? N(ze) ? !1 : c : N(ze) || c, Fs = !!(m && e && Ms && Ls), na = N(at.isValidating) ? Fs : at.isValidating, sa = N(at.isLoading) ? Fs : at.isLoading, wt = rn(
|
|
5286
5286
|
(M) => Ie(void 0, null, function* () {
|
|
5287
5287
|
const j = q.current;
|
|
5288
|
-
if (!m || !j ||
|
|
5288
|
+
if (!m || !j || U.current || D().isPaused())
|
|
5289
5289
|
return !1;
|
|
5290
|
-
let G,
|
|
5291
|
-
const ot = M || {}, H = !l[m] || !ot.dedupe, Y = () => xr ? !
|
|
5290
|
+
let G, z, fe = !0;
|
|
5291
|
+
const ot = M || {}, H = !l[m] || !ot.dedupe, Y = () => xr ? !U.current && m === L.current && R.current : m === L.current, Oe = {
|
|
5292
5292
|
isValidating: !1,
|
|
5293
5293
|
isLoading: !1
|
|
5294
5294
|
}, Ws = () => {
|
|
5295
5295
|
st(Oe);
|
|
5296
5296
|
}, Vs = () => {
|
|
5297
5297
|
const ue = l[m];
|
|
5298
|
-
ue && ue[1] ===
|
|
5299
|
-
},
|
|
5298
|
+
ue && ue[1] === z && delete l[m];
|
|
5299
|
+
}, Us = {
|
|
5300
5300
|
isValidating: !0
|
|
5301
5301
|
};
|
|
5302
|
-
N(
|
|
5302
|
+
N(F().data) && (Us.isLoading = !0);
|
|
5303
5303
|
try {
|
|
5304
|
-
if (H && (st(
|
|
5304
|
+
if (H && (st(Us), n.loadingTimeout && N(F().data) && setTimeout(() => {
|
|
5305
5305
|
fe && Y() && D().onLoadingSlow(m, n);
|
|
5306
5306
|
}, n.loadingTimeout), l[m] = [
|
|
5307
5307
|
j(W),
|
|
5308
5308
|
Os()
|
|
5309
|
-
]), [G,
|
|
5309
|
+
]), [G, z] = l[m], G = yield G, H && setTimeout(Vs, n.dedupingInterval), !l[m] || l[m][1] !== z)
|
|
5310
5310
|
return H && Y() && D().onDiscarded(m), !1;
|
|
5311
5311
|
Oe.error = ee;
|
|
5312
5312
|
const ue = b[m];
|
|
5313
5313
|
if (!N(ue) && // case 1
|
|
5314
|
-
(
|
|
5315
|
-
|
|
5314
|
+
(z <= ue[0] || // case 2
|
|
5315
|
+
z <= ue[1] || // case 3
|
|
5316
5316
|
ue[1] === 0))
|
|
5317
5317
|
return Ws(), H && Y() && D().onDiscarded(m), !1;
|
|
5318
|
-
const Te =
|
|
5318
|
+
const Te = F().data;
|
|
5319
5319
|
Oe.data = r(Te, G) ? Te : G, H && Y() && D().onSuccess(G, m, n);
|
|
5320
5320
|
} catch (ue) {
|
|
5321
5321
|
Vs();
|
|
@@ -5345,7 +5345,7 @@ const Un = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5345
5345
|
m,
|
|
5346
5346
|
s
|
|
5347
5347
|
]
|
|
5348
|
-
),
|
|
5348
|
+
), $s = rn(
|
|
5349
5349
|
// Use callback to make sure `keyRef.current` returns latest result every time
|
|
5350
5350
|
(...M) => Yr(s, L.current, ...M),
|
|
5351
5351
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -5355,10 +5355,10 @@ const Un = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5355
5355
|
q.current = e, Z.current = n, N(it) || (Cn.current = it);
|
|
5356
5356
|
}), Wn(() => {
|
|
5357
5357
|
if (!m) return;
|
|
5358
|
-
const M = wt.bind(ee,
|
|
5358
|
+
const M = wt.bind(ee, Kn);
|
|
5359
5359
|
let j = 0;
|
|
5360
5360
|
D().revalidateOnFocus && (j = Date.now() + D().focusThrottleInterval);
|
|
5361
|
-
const
|
|
5361
|
+
const z = Pc(m, v, (fe, ot = {}) => {
|
|
5362
5362
|
if (fe == qr) {
|
|
5363
5363
|
const H = Date.now();
|
|
5364
5364
|
D().revalidateOnFocus && H > j && Se() && (j = H + D().focusThrottleInterval, M());
|
|
@@ -5371,21 +5371,21 @@ const Un = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5371
5371
|
return wt(ot);
|
|
5372
5372
|
}
|
|
5373
5373
|
});
|
|
5374
|
-
return
|
|
5374
|
+
return U.current = !1, L.current = m, R.current = !0, st({
|
|
5375
5375
|
_k: W
|
|
5376
|
-
}), Ls && (N(
|
|
5377
|
-
|
|
5376
|
+
}), Ls && (N(ze) || Ht ? M() : pc(M)), () => {
|
|
5377
|
+
U.current = !0, z();
|
|
5378
5378
|
};
|
|
5379
5379
|
}, [
|
|
5380
5380
|
m
|
|
5381
5381
|
]), Wn(() => {
|
|
5382
5382
|
let M;
|
|
5383
5383
|
function j() {
|
|
5384
|
-
const
|
|
5385
|
-
|
|
5384
|
+
const z = be(u) ? u(F().data) : u;
|
|
5385
|
+
z && M !== -1 && (M = setTimeout(G, z));
|
|
5386
5386
|
}
|
|
5387
5387
|
function G() {
|
|
5388
|
-
|
|
5388
|
+
!F().error && (h || D().isVisible()) && (p || D().isOnline()) ? wt(Kn).then(j) : j();
|
|
5389
5389
|
}
|
|
5390
5390
|
return j(), () => {
|
|
5391
5391
|
M && (clearTimeout(M), M = -1);
|
|
@@ -5395,23 +5395,23 @@ const Un = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5395
5395
|
h,
|
|
5396
5396
|
p,
|
|
5397
5397
|
m
|
|
5398
|
-
]), ya(en), a && N(
|
|
5398
|
+
]), ya(en), a && N(ze) && m) {
|
|
5399
5399
|
if (!xr && Ht)
|
|
5400
5400
|
throw new Error("Fallback data is required when using Suspense in SSR.");
|
|
5401
|
-
q.current = e, Z.current = n,
|
|
5401
|
+
q.current = e, Z.current = n, U.current = !1;
|
|
5402
5402
|
const M = y[m];
|
|
5403
5403
|
if (!N(M)) {
|
|
5404
|
-
const j =
|
|
5405
|
-
|
|
5404
|
+
const j = $s(M);
|
|
5405
|
+
zn(j);
|
|
5406
5406
|
}
|
|
5407
5407
|
if (N(Qt)) {
|
|
5408
|
-
const j = wt(
|
|
5409
|
-
N(en) || (j.status = "fulfilled", j.value = !0),
|
|
5408
|
+
const j = wt(Kn);
|
|
5409
|
+
N(en) || (j.status = "fulfilled", j.value = !0), zn(j);
|
|
5410
5410
|
} else
|
|
5411
5411
|
throw Qt;
|
|
5412
5412
|
}
|
|
5413
5413
|
return {
|
|
5414
|
-
mutate:
|
|
5414
|
+
mutate: $s,
|
|
5415
5415
|
get data() {
|
|
5416
5416
|
return rt.data = !0, en;
|
|
5417
5417
|
},
|
|
@@ -5425,7 +5425,7 @@ const Un = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5425
5425
|
return rt.isLoading = !0, sa;
|
|
5426
5426
|
}
|
|
5427
5427
|
};
|
|
5428
|
-
}, jc = Rc(Ic),
|
|
5428
|
+
}, jc = Rc(Ic), Fc = ({
|
|
5429
5429
|
fileKey: t,
|
|
5430
5430
|
authToken: e,
|
|
5431
5431
|
enabled: n = !0,
|
|
@@ -5452,6 +5452,6 @@ const Un = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5452
5452
|
};
|
|
5453
5453
|
export {
|
|
5454
5454
|
Lc as useAnimaCodegen,
|
|
5455
|
-
|
|
5455
|
+
Fc as useFigmaFile
|
|
5456
5456
|
};
|
|
5457
5457
|
//# sourceMappingURL=index.js.map
|