@animaapp/anima-sdk-react 0.2.3 → 0.2.5
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/.turbo/turbo-build.log +15 -13
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +164 -165
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/useAnimaCodegen.ts +2 -3
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var qr = (t, e, n) => e in t ? sa(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
9
9
|
for (var n of Br(e))
|
|
10
10
|
ua.call(e, n) && qr(t, n, e[n]);
|
|
11
11
|
return t;
|
|
12
|
-
},
|
|
12
|
+
}, Hr = (t, e) => aa(t, ia(e));
|
|
13
13
|
var Be = (t, e, n) => new Promise((r, s) => {
|
|
14
14
|
var a = (u) => {
|
|
15
15
|
try {
|
|
@@ -35,7 +35,7 @@ const ya = (t) => {
|
|
|
35
35
|
return btoa(e);
|
|
36
36
|
};
|
|
37
37
|
var ga = Object.defineProperty, _a = (t, e, n) => e in t ? ga(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, tn = (t, e, n) => _a(t, typeof e != "symbol" ? e + "" : e, n);
|
|
38
|
-
class
|
|
38
|
+
class Kr extends Error {
|
|
39
39
|
constructor(e, n) {
|
|
40
40
|
super(e), tn(this, "type"), tn(this, "field"), tn(this, "value"), tn(this, "line"), this.name = "ParseError", this.type = n.type, this.field = n.field, this.value = n.value, this.line = n.line;
|
|
41
41
|
}
|
|
@@ -82,7 +82,7 @@ function va(t) {
|
|
|
82
82
|
break;
|
|
83
83
|
case "retry":
|
|
84
84
|
/^\d+$/.test(v) ? r(parseInt(v, 10)) : n(
|
|
85
|
-
new
|
|
85
|
+
new Kr(`Invalid \`retry\` value: "${v}"`, {
|
|
86
86
|
type: "invalid-retry",
|
|
87
87
|
value: v,
|
|
88
88
|
line: m
|
|
@@ -91,7 +91,7 @@ function va(t) {
|
|
|
91
91
|
break;
|
|
92
92
|
default:
|
|
93
93
|
n(
|
|
94
|
-
new
|
|
94
|
+
new Kr(
|
|
95
95
|
`Unknown field "${l.length > 20 ? `${l.slice(0, 20)}…` : l}"`,
|
|
96
96
|
{ type: "unknown-field", field: l, value: v, line: m }
|
|
97
97
|
)
|
|
@@ -172,8 +172,8 @@ function wa(t) {
|
|
|
172
172
|
const e = globalThis.DOMException;
|
|
173
173
|
return typeof e == "function" ? new e(t, "SyntaxError") : new SyntaxError(t);
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return t instanceof Error ? "errors" in t && Array.isArray(t.errors) ? t.errors.map(
|
|
175
|
+
function Hn(t) {
|
|
176
|
+
return t instanceof Error ? "errors" in t && Array.isArray(t.errors) ? t.errors.map(Hn).join(", ") : "cause" in t && t.cause instanceof Error ? `${t}: ${Hn(t.cause)}` : t.message : `${t}`;
|
|
177
177
|
}
|
|
178
178
|
function Jr(t) {
|
|
179
179
|
return {
|
|
@@ -187,11 +187,11 @@ function Jr(t) {
|
|
|
187
187
|
}
|
|
188
188
|
var Ss = (t) => {
|
|
189
189
|
throw TypeError(t);
|
|
190
|
-
}, Ar = (t, e, n) => e.has(t) || Ss("Cannot " + n), A = (t, e, n) => (Ar(t, e, "read from private field"), n ? n.call(t) : e.get(t)), U = (t, e, n) => e.has(t) ? Ss("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), L = (t, e, n, r) => (Ar(t, e, "write to private field"), e.set(t, n), n), Ce = (t, e, n) => (Ar(t, e, "access private method"), n), re,
|
|
190
|
+
}, Ar = (t, e, n) => e.has(t) || Ss("Cannot " + n), A = (t, e, n) => (Ar(t, e, "read from private field"), n ? n.call(t) : e.get(t)), U = (t, e, n) => e.has(t) ? Ss("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), L = (t, e, n, r) => (Ar(t, e, "write to private field"), e.set(t, n), n), Ce = (t, e, n) => (Ar(t, e, "access private method"), n), re, Ke, ut, on, fn, Nt, ft, Pt, Ze, ct, ht, dt, Et, fe, Kn, Gn, Jn, Xr, Xn, Yn, xt, Qn, er;
|
|
191
191
|
class un extends EventTarget {
|
|
192
192
|
constructor(e, n) {
|
|
193
193
|
var r, s;
|
|
194
|
-
super(), U(this, fe), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, U(this, re), U(this,
|
|
194
|
+
super(), U(this, fe), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, U(this, re), U(this, Ke), U(this, ut), U(this, on), U(this, fn), U(this, Nt), U(this, ft), U(this, Pt, null), U(this, Ze), U(this, ct), U(this, ht, null), U(this, dt, null), U(this, Et, null), U(this, Gn, (a) => Be(this, null, function* () {
|
|
195
195
|
var i;
|
|
196
196
|
A(this, ct).reset();
|
|
197
197
|
const { body: o, redirected: u, status: c, headers: h } = a;
|
|
@@ -222,25 +222,25 @@ class un extends EventTarget {
|
|
|
222
222
|
v && A(this, ct).feed(k.decode(v, { stream: !l })), l && (b = !1, A(this, ct).reset(), Ce(this, fe, Qn).call(this));
|
|
223
223
|
} while (b);
|
|
224
224
|
})), U(this, Jn, (a) => {
|
|
225
|
-
L(this, Ze, void 0), !(a.name === "AbortError" || a.type === "aborted") && Ce(this, fe, Qn).call(this,
|
|
225
|
+
L(this, Ze, void 0), !(a.name === "AbortError" || a.type === "aborted") && Ce(this, fe, Qn).call(this, Hn(a));
|
|
226
226
|
}), U(this, Xn, (a) => {
|
|
227
227
|
typeof a.id == "string" && L(this, Pt, a.id);
|
|
228
228
|
const i = new MessageEvent(a.event || "message", {
|
|
229
229
|
data: a.data,
|
|
230
|
-
origin: A(this, ut) ? A(this, ut).origin : A(this,
|
|
230
|
+
origin: A(this, ut) ? A(this, ut).origin : A(this, Ke).origin,
|
|
231
231
|
lastEventId: a.id || ""
|
|
232
232
|
});
|
|
233
233
|
A(this, dt) && (!a.event || a.event === "message") && A(this, dt).call(this, i), this.dispatchEvent(i);
|
|
234
234
|
}), U(this, Yn, (a) => {
|
|
235
235
|
L(this, Nt, a);
|
|
236
236
|
}), U(this, er, () => {
|
|
237
|
-
L(this, ft, void 0), A(this, re) === this.CONNECTING && Ce(this, fe,
|
|
237
|
+
L(this, ft, void 0), A(this, re) === this.CONNECTING && Ce(this, fe, Kn).call(this);
|
|
238
238
|
});
|
|
239
239
|
try {
|
|
240
240
|
if (e instanceof URL)
|
|
241
|
-
L(this,
|
|
241
|
+
L(this, Ke, e);
|
|
242
242
|
else if (typeof e == "string")
|
|
243
|
-
L(this,
|
|
243
|
+
L(this, Ke, new URL(e, ka()));
|
|
244
244
|
else
|
|
245
245
|
throw new Error("Invalid URL");
|
|
246
246
|
} catch (a) {
|
|
@@ -249,7 +249,7 @@ class un extends EventTarget {
|
|
|
249
249
|
L(this, ct, va({
|
|
250
250
|
onEvent: A(this, Xn),
|
|
251
251
|
onRetry: A(this, Yn)
|
|
252
|
-
})), L(this, re, this.CONNECTING), L(this, Nt, 3e3), L(this, fn, (r = n == null ? void 0 : n.fetch) != null ? r : globalThis.fetch), L(this, on, (s = n == null ? void 0 : n.withCredentials) != null ? s : !1), Ce(this, fe,
|
|
252
|
+
})), L(this, re, this.CONNECTING), L(this, Nt, 3e3), L(this, fn, (r = n == null ? void 0 : n.fetch) != null ? r : globalThis.fetch), L(this, on, (s = n == null ? void 0 : n.withCredentials) != null ? s : !1), Ce(this, fe, Kn).call(this);
|
|
253
253
|
}
|
|
254
254
|
/**
|
|
255
255
|
* Returns the state of this EventSource object's connection. It can have the values described below.
|
|
@@ -272,7 +272,7 @@ class un extends EventTarget {
|
|
|
272
272
|
* @public
|
|
273
273
|
*/
|
|
274
274
|
get url() {
|
|
275
|
-
return A(this,
|
|
275
|
+
return A(this, Ke).href;
|
|
276
276
|
}
|
|
277
277
|
/**
|
|
278
278
|
* Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
|
|
@@ -322,13 +322,13 @@ class un extends EventTarget {
|
|
|
322
322
|
A(this, ft) && clearTimeout(A(this, ft)), A(this, re) !== this.CLOSED && (A(this, Ze) && A(this, Ze).abort(), L(this, re, this.CLOSED), L(this, Ze, void 0));
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
re = /* @__PURE__ */ new WeakMap(),
|
|
325
|
+
re = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), on = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakSet(), /**
|
|
326
326
|
* Connect to the given URL and start receiving events
|
|
327
327
|
*
|
|
328
328
|
* @internal
|
|
329
329
|
*/
|
|
330
|
-
|
|
331
|
-
L(this, re, this.CONNECTING), L(this, Ze, new AbortController()), A(this, fn)(A(this,
|
|
330
|
+
Kn = function() {
|
|
331
|
+
L(this, re, this.CONNECTING), L(this, Ze, new AbortController()), A(this, fn)(A(this, Ke), Ce(this, fe, Xr).call(this)).then(A(this, Gn)).catch(A(this, Jn));
|
|
332
332
|
}, Gn = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), /**
|
|
333
333
|
* Get request options for the `fetch()` request
|
|
334
334
|
*
|
|
@@ -476,7 +476,7 @@ function Sn(t) {
|
|
|
476
476
|
function On(t) {
|
|
477
477
|
return t instanceof Set;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function He(t) {
|
|
480
480
|
return t.copy_ || t.base_;
|
|
481
481
|
}
|
|
482
482
|
function nr(t, e) {
|
|
@@ -524,9 +524,9 @@ function Qe(t) {
|
|
|
524
524
|
const e = Ta[t];
|
|
525
525
|
return e || se(0, t), e;
|
|
526
526
|
}
|
|
527
|
-
var
|
|
527
|
+
var It;
|
|
528
528
|
function Cs() {
|
|
529
|
-
return
|
|
529
|
+
return It;
|
|
530
530
|
}
|
|
531
531
|
function Aa(t, e) {
|
|
532
532
|
return {
|
|
@@ -546,10 +546,10 @@ function rr(t) {
|
|
|
546
546
|
sr(t), t.drafts_.forEach(Ca), t.drafts_ = null;
|
|
547
547
|
}
|
|
548
548
|
function sr(t) {
|
|
549
|
-
t ===
|
|
549
|
+
t === It && (It = t.parent_);
|
|
550
550
|
}
|
|
551
551
|
function es(t) {
|
|
552
|
-
return
|
|
552
|
+
return It = Aa(It, t);
|
|
553
553
|
}
|
|
554
554
|
function Ca(t) {
|
|
555
555
|
const e = t[oe];
|
|
@@ -637,7 +637,7 @@ function Na(t, e) {
|
|
|
637
637
|
isManual_: !1
|
|
638
638
|
};
|
|
639
639
|
let s = r, a = Cr;
|
|
640
|
-
n && (s = [r], a =
|
|
640
|
+
n && (s = [r], a = jt);
|
|
641
641
|
const { revoke: i, proxy: o } = Proxy.revocable(s, a);
|
|
642
642
|
return r.draft_ = o, r.revoke_ = i, o;
|
|
643
643
|
}
|
|
@@ -645,41 +645,41 @@ var Cr = {
|
|
|
645
645
|
get(t, e) {
|
|
646
646
|
if (e === oe)
|
|
647
647
|
return t;
|
|
648
|
-
const n =
|
|
648
|
+
const n = He(t);
|
|
649
649
|
if (!tr(n, e))
|
|
650
650
|
return Pa(t, n, e);
|
|
651
651
|
const r = n[e];
|
|
652
|
-
return t.finalized_ || !Ye(r) ? r : r ===
|
|
652
|
+
return t.finalized_ || !Ye(r) ? r : r === In(t.base_, e) ? (jn(t), t.copy_[e] = ir(r, t)) : r;
|
|
653
653
|
},
|
|
654
654
|
has(t, e) {
|
|
655
|
-
return e in
|
|
655
|
+
return e in He(t);
|
|
656
656
|
},
|
|
657
657
|
ownKeys(t) {
|
|
658
|
-
return Reflect.ownKeys(
|
|
658
|
+
return Reflect.ownKeys(He(t));
|
|
659
659
|
},
|
|
660
660
|
set(t, e, n) {
|
|
661
|
-
const r = Ns(
|
|
661
|
+
const r = Ns(He(t), e);
|
|
662
662
|
if (r != null && r.set)
|
|
663
663
|
return r.set.call(t.draft_, n), !0;
|
|
664
664
|
if (!t.modified_) {
|
|
665
|
-
const s =
|
|
665
|
+
const s = In(He(t), e), a = s == null ? void 0 : s[oe];
|
|
666
666
|
if (a && a.base_ === n)
|
|
667
667
|
return t.copy_[e] = n, t.assigned_[e] = !1, !0;
|
|
668
668
|
if (Sa(n, s) && (n !== void 0 || tr(t.base_, e)))
|
|
669
669
|
return !0;
|
|
670
|
-
|
|
670
|
+
jn(t), ar(t);
|
|
671
671
|
}
|
|
672
672
|
return t.copy_[e] === n && // special case: handle new props with value 'undefined'
|
|
673
673
|
(n !== void 0 || e in t.copy_) || // special case: NaN
|
|
674
674
|
Number.isNaN(n) && Number.isNaN(t.copy_[e]) || (t.copy_[e] = n, t.assigned_[e] = !0), !0;
|
|
675
675
|
},
|
|
676
676
|
deleteProperty(t, e) {
|
|
677
|
-
return
|
|
677
|
+
return In(t.base_, e) !== void 0 || e in t.base_ ? (t.assigned_[e] = !1, jn(t), ar(t)) : delete t.assigned_[e], t.copy_ && delete t.copy_[e], !0;
|
|
678
678
|
},
|
|
679
679
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
680
680
|
// the same guarantee in ES5 mode.
|
|
681
681
|
getOwnPropertyDescriptor(t, e) {
|
|
682
|
-
const n =
|
|
682
|
+
const n = He(t), r = Reflect.getOwnPropertyDescriptor(n, e);
|
|
683
683
|
return r && {
|
|
684
684
|
writable: !0,
|
|
685
685
|
configurable: t.type_ !== 1 || e !== "length",
|
|
@@ -696,21 +696,21 @@ var Cr = {
|
|
|
696
696
|
setPrototypeOf() {
|
|
697
697
|
se(12);
|
|
698
698
|
}
|
|
699
|
-
},
|
|
699
|
+
}, jt = {};
|
|
700
700
|
hn(Cr, (t, e) => {
|
|
701
|
-
|
|
701
|
+
jt[t] = function() {
|
|
702
702
|
return arguments[0] = arguments[0][0], e.apply(this, arguments);
|
|
703
703
|
};
|
|
704
704
|
});
|
|
705
|
-
|
|
706
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(e)) && se(13),
|
|
705
|
+
jt.deleteProperty = function(t, e) {
|
|
706
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(e)) && se(13), jt.set.call(this, t, e, void 0);
|
|
707
707
|
};
|
|
708
|
-
|
|
708
|
+
jt.set = function(t, e, n) {
|
|
709
709
|
return process.env.NODE_ENV !== "production" && e !== "length" && isNaN(parseInt(e)) && se(14), Cr.set.call(this, t[0], e, n, t[0]);
|
|
710
710
|
};
|
|
711
|
-
function
|
|
711
|
+
function In(t, e) {
|
|
712
712
|
const n = t[oe];
|
|
713
|
-
return (n ?
|
|
713
|
+
return (n ? He(n) : t)[e];
|
|
714
714
|
}
|
|
715
715
|
function Pa(t, e, n) {
|
|
716
716
|
var s;
|
|
@@ -735,7 +735,7 @@ function Ns(t, e) {
|
|
|
735
735
|
function ar(t) {
|
|
736
736
|
t.modified_ || (t.modified_ = !0, t.parent_ && ar(t.parent_));
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function jn(t) {
|
|
739
739
|
t.copy_ || (t.copy_ = nr(
|
|
740
740
|
t.base_,
|
|
741
741
|
t.scope_.immer_.useStrictShallowCopy_
|
|
@@ -781,7 +781,7 @@ var Ra = class {
|
|
|
781
781
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
|
782
782
|
}
|
|
783
783
|
createDraft(t) {
|
|
784
|
-
Ye(t) || se(8), yt(t) && (t =
|
|
784
|
+
Ye(t) || se(8), yt(t) && (t = Ia(t));
|
|
785
785
|
const e = es(this), n = ir(t, void 0);
|
|
786
786
|
return n[oe].isManual_ = !0, sr(e), n;
|
|
787
787
|
}
|
|
@@ -828,7 +828,7 @@ function ir(t, e) {
|
|
|
828
828
|
const n = Sn(t) ? Qe("MapSet").proxyMap_(t, e) : On(t) ? Qe("MapSet").proxySet_(t, e) : Na(t, e);
|
|
829
829
|
return (e ? e.scope_ : Cs()).drafts_.push(n), n;
|
|
830
830
|
}
|
|
831
|
-
function
|
|
831
|
+
function Ia(t) {
|
|
832
832
|
return yt(t) || se(10, t), Ps(t);
|
|
833
833
|
}
|
|
834
834
|
function Ps(t) {
|
|
@@ -846,7 +846,7 @@ function Ps(t) {
|
|
|
846
846
|
As(n, r, Ps(s));
|
|
847
847
|
}), e && (e.finalized_ = !1), n;
|
|
848
848
|
}
|
|
849
|
-
var ue = new Ra(),
|
|
849
|
+
var ue = new Ra(), ja = ue.produce;
|
|
850
850
|
ue.produceWithPatches.bind(
|
|
851
851
|
ue
|
|
852
852
|
);
|
|
@@ -860,7 +860,7 @@ function Za(t) {
|
|
|
860
860
|
return Rt(typeof t == "function" ? t() : t, !0);
|
|
861
861
|
}), n = e[1];
|
|
862
862
|
return [e[0], an(function(r) {
|
|
863
|
-
n(typeof r == "function" ?
|
|
863
|
+
n(typeof r == "function" ? ja(r) : Rt(r));
|
|
864
864
|
}, [])];
|
|
865
865
|
}
|
|
866
866
|
const rs = {
|
|
@@ -901,7 +901,7 @@ const rs = {
|
|
|
901
901
|
};
|
|
902
902
|
}
|
|
903
903
|
const o = new un(t, {
|
|
904
|
-
fetch: (g, b) => fetch(g,
|
|
904
|
+
fetch: (g, b) => fetch(g, Hr(Ue({}, b), {
|
|
905
905
|
method: e,
|
|
906
906
|
body: JSON.stringify(a)
|
|
907
907
|
}))
|
|
@@ -935,7 +935,7 @@ const rs = {
|
|
|
935
935
|
l.data
|
|
936
936
|
);
|
|
937
937
|
v.payload.status === "success" && (b.files = v.payload.files), r((m) => {
|
|
938
|
-
m.tasks.codeGeneration.progress = v.payload.progress;
|
|
938
|
+
m.tasks.codeGeneration.progress = v.payload.progress, m.tasks.codeGeneration.status = "running";
|
|
939
939
|
});
|
|
940
940
|
}), o.addEventListener("codegen_completed", () => {
|
|
941
941
|
r((l) => {
|
|
@@ -969,9 +969,7 @@ const rs = {
|
|
|
969
969
|
error: new Error("HTTP error: " + l.message)
|
|
970
970
|
});
|
|
971
971
|
}), o.addEventListener("done", (l) => {
|
|
972
|
-
const v = JSON.parse(
|
|
973
|
-
l.data
|
|
974
|
-
);
|
|
972
|
+
const v = JSON.parse(l.data);
|
|
975
973
|
b.tokenUsage = v.payload.tokenUsage, r((m) => {
|
|
976
974
|
m.status = "success", m.result = b;
|
|
977
975
|
}), g({ result: b, error: null });
|
|
@@ -994,8 +992,8 @@ const rs = {
|
|
|
994
992
|
if (R.status === "fulfilled") {
|
|
995
993
|
const { assetName: D, base64: B } = R.value;
|
|
996
994
|
q[D] = B;
|
|
997
|
-
const
|
|
998
|
-
l.files[
|
|
995
|
+
const I = v ? `${v}/${D}` : D;
|
|
996
|
+
l.files[I] = {
|
|
999
997
|
content: B,
|
|
1000
998
|
isBinary: !0
|
|
1001
999
|
};
|
|
@@ -1135,7 +1133,7 @@ function La() {
|
|
|
1135
1133
|
return os || (os = 1, process.env.NODE_ENV === "production" ? nn.exports = Da() : nn.exports = Ma()), nn.exports;
|
|
1136
1134
|
}
|
|
1137
1135
|
var $a = La();
|
|
1138
|
-
const Rs = 0,
|
|
1136
|
+
const Rs = 0, Is = 1, js = 2, us = 3;
|
|
1139
1137
|
var cs = Object.prototype.hasOwnProperty;
|
|
1140
1138
|
function or(t, e) {
|
|
1141
1139
|
var n, r;
|
|
@@ -1203,10 +1201,10 @@ const za = () => dr, [lr, fr] = Jt && window.addEventListener ? [
|
|
|
1203
1201
|
}, qa = {
|
|
1204
1202
|
isOnline: za,
|
|
1205
1203
|
isVisible: Va
|
|
1206
|
-
},
|
|
1204
|
+
}, Ha = {
|
|
1207
1205
|
initFocus: Ua,
|
|
1208
1206
|
initReconnect: Ba
|
|
1209
|
-
}, ds = !Gt.useId, Zt = !Jt || Fa,
|
|
1207
|
+
}, ds = !Gt.useId, Zt = !Jt || Fa, Ka = (t) => Wa() ? window.requestAnimationFrame(t) : setTimeout(t, 1), Ln = Zt ? la : fa, $n = typeof navigator != "undefined" && navigator.connection, ls = !Zt && $n && ([
|
|
1210
1208
|
"slow-2g",
|
|
1211
1209
|
"2g"
|
|
1212
1210
|
].includes($n.effectiveType) || $n.saveData), sn = /* @__PURE__ */ new WeakMap(), Fn = (t, e) => ur.prototype.toString.call(t) === `[object ${e}]`;
|
|
@@ -1272,14 +1270,14 @@ function Ms(...t) {
|
|
|
1272
1270
|
if (!g) return;
|
|
1273
1271
|
const [b, l] = Ds(e, g), [v, m, z, R] = Pe.get(e), q = () => {
|
|
1274
1272
|
const le = v[g];
|
|
1275
|
-
return (be(a.revalidate) ? a.revalidate(b().data, k) : a.revalidate !== !1) && (delete z[g], delete R[g], le && le[0]) ? le[0](
|
|
1273
|
+
return (be(a.revalidate) ? a.revalidate(b().data, k) : a.revalidate !== !1) && (delete z[g], delete R[g], le && le[0]) ? le[0](js).then(() => b().data) : b().data;
|
|
1276
1274
|
};
|
|
1277
1275
|
if (t.length < 3)
|
|
1278
1276
|
return q();
|
|
1279
1277
|
let D = r, B;
|
|
1280
|
-
const
|
|
1278
|
+
const I = pr();
|
|
1281
1279
|
m[g] = [
|
|
1282
|
-
|
|
1280
|
+
I,
|
|
1283
1281
|
0
|
|
1284
1282
|
];
|
|
1285
1283
|
const $ = !N(u), Se = b(), M = Se.data, rt = Se._c, ze = N(rt) ? M : rt;
|
|
@@ -1295,7 +1293,7 @@ function Ms(...t) {
|
|
|
1295
1293
|
if (D && Zs(D))
|
|
1296
1294
|
if (D = yield D.catch((le) => {
|
|
1297
1295
|
B = le;
|
|
1298
|
-
}),
|
|
1296
|
+
}), I !== m[g][0]) {
|
|
1299
1297
|
if (B) throw B;
|
|
1300
1298
|
return D;
|
|
1301
1299
|
} else B && $ && c(B) && (i = !0, l({
|
|
@@ -1334,7 +1332,7 @@ const fs = (t, e) => {
|
|
|
1334
1332
|
t[n][0] && t[n][0](e);
|
|
1335
1333
|
}, Xa = (t, e) => {
|
|
1336
1334
|
if (!Pe.has(t)) {
|
|
1337
|
-
const n = Me(
|
|
1335
|
+
const n = Me(Ha, e), r = {}, s = Ms.bind(ee, t);
|
|
1338
1336
|
let a = De;
|
|
1339
1337
|
const i = {}, o = (h, p) => {
|
|
1340
1338
|
const k = i[h] || [];
|
|
@@ -1355,7 +1353,7 @@ const fs = (t, e) => {
|
|
|
1355
1353
|
u,
|
|
1356
1354
|
o
|
|
1357
1355
|
]), !Zt)) {
|
|
1358
|
-
const h = n.initFocus(setTimeout.bind(ee, fs.bind(ee, r, Rs))), p = n.initReconnect(setTimeout.bind(ee, fs.bind(ee, r,
|
|
1356
|
+
const h = n.initFocus(setTimeout.bind(ee, fs.bind(ee, r, Rs))), p = n.initReconnect(setTimeout.bind(ee, fs.bind(ee, r, Is)));
|
|
1359
1357
|
a = () => {
|
|
1360
1358
|
h && h(), p && p(), Pe.delete(t);
|
|
1361
1359
|
};
|
|
@@ -1462,29 +1460,29 @@ const Wn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
1462
1460
|
}), zn = {
|
|
1463
1461
|
dedupe: !0
|
|
1464
1462
|
}, hi = (t, e, n) => {
|
|
1465
|
-
const { cache: r, compare: s, suspense: a, fallbackData: i, revalidateOnMount: o, revalidateIfStale: u, refreshInterval: c, refreshWhenHidden: h, refreshWhenOffline: p, keepPreviousData: k } = n, [g, b, l, v] = Pe.get(r), [m, z] = Pr(t), R = qe(!1), q = qe(!1), D = qe(m), B = qe(e),
|
|
1466
|
-
for (const
|
|
1467
|
-
const W =
|
|
1463
|
+
const { cache: r, compare: s, suspense: a, fallbackData: i, revalidateOnMount: o, revalidateIfStale: u, refreshInterval: c, refreshWhenHidden: h, refreshWhenOffline: p, keepPreviousData: k } = n, [g, b, l, v] = Pe.get(r), [m, z] = Pr(t), R = qe(!1), q = qe(!1), D = qe(m), B = qe(e), I = qe(n), $ = () => I.current, Se = () => $().isVisible() && $().isOnline(), [M, rt, ze, le] = Ds(r, m), st = qe({}).current, Yt = N(i) ? N(n.fallback) ? ee : n.fallback[m] : i, Dr = (j, Z) => {
|
|
1464
|
+
for (const G in st) {
|
|
1465
|
+
const W = G;
|
|
1468
1466
|
if (W === "data") {
|
|
1469
|
-
if (!s(
|
|
1467
|
+
if (!s(j[W], Z[W]) && (!N(j[W]) || !s(en, Z[W])))
|
|
1470
1468
|
return !1;
|
|
1471
|
-
} else if (Z[W] !==
|
|
1469
|
+
} else if (Z[W] !== j[W])
|
|
1472
1470
|
return !1;
|
|
1473
1471
|
}
|
|
1474
1472
|
return !0;
|
|
1475
1473
|
}, Mr = pa(() => {
|
|
1476
|
-
const
|
|
1474
|
+
const j = !m || !e ? !1 : N(o) ? $().isPaused() || a ? !1 : u !== !1 : o, Z = (Y) => {
|
|
1477
1475
|
const Oe = Me(Y);
|
|
1478
|
-
return delete Oe._k,
|
|
1476
|
+
return delete Oe._k, j ? Ue({
|
|
1479
1477
|
isValidating: !0,
|
|
1480
1478
|
isLoading: !0
|
|
1481
1479
|
}, Oe) : Oe;
|
|
1482
|
-
},
|
|
1483
|
-
let
|
|
1480
|
+
}, G = M(), W = le(), ye = Z(G), ot = G === W ? ye : Z(W);
|
|
1481
|
+
let H = ye;
|
|
1484
1482
|
return [
|
|
1485
1483
|
() => {
|
|
1486
1484
|
const Y = Z(M());
|
|
1487
|
-
return Dr(Y,
|
|
1485
|
+
return Dr(Y, H) ? (H.data = Y.data, H.isLoading = Y.isLoading, H.isValidating = Y.isValidating, H.error = Y.error, H) : (H = Y, Y);
|
|
1488
1486
|
},
|
|
1489
1487
|
() => ot
|
|
1490
1488
|
];
|
|
@@ -1492,8 +1490,8 @@ const Wn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
1492
1490
|
r,
|
|
1493
1491
|
m
|
|
1494
1492
|
]), at = $a.useSyncExternalStore(an(
|
|
1495
|
-
(
|
|
1496
|
-
Dr(
|
|
1493
|
+
(j) => ze(m, (Z, G) => {
|
|
1494
|
+
Dr(G, Z) || j();
|
|
1497
1495
|
}),
|
|
1498
1496
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1499
1497
|
[
|
|
@@ -1501,12 +1499,12 @@ const Wn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
1501
1499
|
m
|
|
1502
1500
|
]
|
|
1503
1501
|
), Mr[0], Mr[1]), Lr = !R.current, ea = g[m] && g[m].length > 0, it = at.data, Ve = N(it) ? Yt && Zs(Yt) ? Wn(Yt) : Yt : it, Qt = at.error, Cn = qe(Ve), en = k ? N(it) ? N(Cn.current) ? Ve : Cn.current : it : Ve, $r = ea && !N(Qt) ? !1 : Lr && !N(o) ? o : $().isPaused() ? !1 : a ? N(Ve) ? !1 : u : N(Ve) || u, Fr = !!(m && e && Lr && $r), ta = N(at.isValidating) ? Fr : at.isValidating, na = N(at.isLoading) ? Fr : at.isLoading, wt = an(
|
|
1504
|
-
(
|
|
1502
|
+
(j) => Be(void 0, null, function* () {
|
|
1505
1503
|
const Z = B.current;
|
|
1506
1504
|
if (!m || !Z || q.current || $().isPaused())
|
|
1507
1505
|
return !1;
|
|
1508
|
-
let
|
|
1509
|
-
const ot =
|
|
1506
|
+
let G, W, ye = !0;
|
|
1507
|
+
const ot = j || {}, H = !l[m] || !ot.dedupe, Y = () => ds ? !q.current && m === D.current && R.current : m === D.current, Oe = {
|
|
1510
1508
|
isValidating: !1,
|
|
1511
1509
|
isLoading: !1
|
|
1512
1510
|
}, zr = () => {
|
|
@@ -1519,26 +1517,26 @@ const Wn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
1519
1517
|
};
|
|
1520
1518
|
N(M().data) && (Ur.isLoading = !0);
|
|
1521
1519
|
try {
|
|
1522
|
-
if (
|
|
1520
|
+
if (H && (rt(Ur), n.loadingTimeout && N(M().data) && setTimeout(() => {
|
|
1523
1521
|
ye && Y() && $().onLoadingSlow(m, n);
|
|
1524
1522
|
}, n.loadingTimeout), l[m] = [
|
|
1525
1523
|
Z(z),
|
|
1526
1524
|
pr()
|
|
1527
|
-
]), [
|
|
1528
|
-
return
|
|
1525
|
+
]), [G, W] = l[m], G = yield G, H && setTimeout(Vr, n.dedupingInterval), !l[m] || l[m][1] !== W)
|
|
1526
|
+
return H && Y() && $().onDiscarded(m), !1;
|
|
1529
1527
|
Oe.error = ee;
|
|
1530
1528
|
const ce = b[m];
|
|
1531
1529
|
if (!N(ce) && // case 1
|
|
1532
1530
|
(W <= ce[0] || // case 2
|
|
1533
1531
|
W <= ce[1] || // case 3
|
|
1534
1532
|
ce[1] === 0))
|
|
1535
|
-
return zr(),
|
|
1533
|
+
return zr(), H && Y() && $().onDiscarded(m), !1;
|
|
1536
1534
|
const Te = M().data;
|
|
1537
|
-
Oe.data = s(Te,
|
|
1535
|
+
Oe.data = s(Te, G) ? Te : G, H && Y() && $().onSuccess(G, m, n);
|
|
1538
1536
|
} catch (ce) {
|
|
1539
1537
|
Vr();
|
|
1540
1538
|
const Te = $(), { shouldRetryOnError: Nn } = Te;
|
|
1541
|
-
Te.isPaused() || (Oe.error = ce,
|
|
1539
|
+
Te.isPaused() || (Oe.error = ce, H && Y() && (Te.onError(ce, m, Te), (Nn === !0 || be(Nn) && Nn(ce)) && (!$().revalidateOnFocus || !$().revalidateOnReconnect || Se()) && Te.onErrorRetry(ce, m, Te, (ra) => {
|
|
1542
1540
|
const Pn = g[m];
|
|
1543
1541
|
Pn && Pn[0] && Pn[0](us, ra);
|
|
1544
1542
|
}, {
|
|
@@ -1565,24 +1563,24 @@ const Wn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
1565
1563
|
]
|
|
1566
1564
|
), Wr = an(
|
|
1567
1565
|
// Use callback to make sure `keyRef.current` returns latest result every time
|
|
1568
|
-
(...
|
|
1566
|
+
(...j) => Ms(r, D.current, ...j),
|
|
1569
1567
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1570
1568
|
[]
|
|
1571
1569
|
);
|
|
1572
1570
|
if (Ln(() => {
|
|
1573
|
-
B.current = e,
|
|
1571
|
+
B.current = e, I.current = n, N(it) || (Cn.current = it);
|
|
1574
1572
|
}), Ln(() => {
|
|
1575
1573
|
if (!m) return;
|
|
1576
|
-
const
|
|
1574
|
+
const j = wt.bind(ee, zn);
|
|
1577
1575
|
let Z = 0;
|
|
1578
1576
|
const W = fi(m, g, (ye, ot = {}) => {
|
|
1579
1577
|
if (ye == Rs) {
|
|
1580
|
-
const
|
|
1581
|
-
$().revalidateOnFocus &&
|
|
1582
|
-
} else if (ye ==
|
|
1583
|
-
$().revalidateOnReconnect && Se() &&
|
|
1578
|
+
const H = Date.now();
|
|
1579
|
+
$().revalidateOnFocus && H > Z && Se() && (Z = H + $().focusThrottleInterval, j());
|
|
1580
|
+
} else if (ye == Is)
|
|
1581
|
+
$().revalidateOnReconnect && Se() && j();
|
|
1584
1582
|
else {
|
|
1585
|
-
if (ye ==
|
|
1583
|
+
if (ye == js)
|
|
1586
1584
|
return wt();
|
|
1587
1585
|
if (ye == us)
|
|
1588
1586
|
return wt(ot);
|
|
@@ -1590,22 +1588,22 @@ const Wn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
1590
1588
|
});
|
|
1591
1589
|
return q.current = !1, D.current = m, R.current = !0, rt({
|
|
1592
1590
|
_k: z
|
|
1593
|
-
}), $r && (N(Ve) || Zt ?
|
|
1591
|
+
}), $r && (N(Ve) || Zt ? j() : Ka(j)), () => {
|
|
1594
1592
|
q.current = !0, W();
|
|
1595
1593
|
};
|
|
1596
1594
|
}, [
|
|
1597
1595
|
m
|
|
1598
1596
|
]), Ln(() => {
|
|
1599
|
-
let
|
|
1597
|
+
let j;
|
|
1600
1598
|
function Z() {
|
|
1601
1599
|
const W = be(c) ? c(M().data) : c;
|
|
1602
|
-
W &&
|
|
1600
|
+
W && j !== -1 && (j = setTimeout(G, W));
|
|
1603
1601
|
}
|
|
1604
|
-
function
|
|
1602
|
+
function G() {
|
|
1605
1603
|
!M().error && (h || $().isVisible()) && (p || $().isOnline()) ? wt(zn).then(Z) : Z();
|
|
1606
1604
|
}
|
|
1607
1605
|
return Z(), () => {
|
|
1608
|
-
|
|
1606
|
+
j && (clearTimeout(j), j = -1);
|
|
1609
1607
|
};
|
|
1610
1608
|
}, [
|
|
1611
1609
|
c,
|
|
@@ -1615,10 +1613,10 @@ const Wn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
1615
1613
|
]), ma(en), a && N(Ve) && m) {
|
|
1616
1614
|
if (!ds && Zt)
|
|
1617
1615
|
throw new Error("Fallback data is required when using Suspense in SSR.");
|
|
1618
|
-
B.current = e,
|
|
1619
|
-
const
|
|
1620
|
-
if (!N(
|
|
1621
|
-
const Z = Wr(
|
|
1616
|
+
B.current = e, I.current = n, q.current = !1;
|
|
1617
|
+
const j = v[m];
|
|
1618
|
+
if (!N(j)) {
|
|
1619
|
+
const Z = Wr(j);
|
|
1622
1620
|
Wn(Z);
|
|
1623
1621
|
}
|
|
1624
1622
|
if (N(Qt)) {
|
|
@@ -2211,7 +2209,7 @@ class T {
|
|
|
2211
2209
|
}
|
|
2212
2210
|
catch(e) {
|
|
2213
2211
|
const n = typeof e == "function" ? e : () => e;
|
|
2214
|
-
return new
|
|
2212
|
+
return new Ht(x(d({}, O(this._def)), {
|
|
2215
2213
|
innerType: this,
|
|
2216
2214
|
catchValue: n,
|
|
2217
2215
|
typeName: E.ZodCatch
|
|
@@ -2227,7 +2225,7 @@ class T {
|
|
|
2227
2225
|
return Xt.create(this, e);
|
|
2228
2226
|
}
|
|
2229
2227
|
readonly() {
|
|
2230
|
-
return
|
|
2228
|
+
return Kt.create(this);
|
|
2231
2229
|
}
|
|
2232
2230
|
isOptional() {
|
|
2233
2231
|
return this.safeParse(void 0).success;
|
|
@@ -2238,7 +2236,7 @@ class T {
|
|
|
2238
2236
|
}
|
|
2239
2237
|
const Ei = /^c[^\s-]{8,}$/i, xi = /^[0-9a-z]+$/, Si = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Oi = /^[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, Ti = /^[a-z0-9_-]{21}$/i, Ai = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ci = /^[-+]?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, Pi = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
2240
2238
|
let Vn;
|
|
2241
|
-
const Ri = /^(?:(?: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])$/,
|
|
2239
|
+
const Ri = /^(?:(?: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])$/, Ii = /^(?:(?: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])$/, ji = /^(([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]))$/, 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]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Di = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Mi = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, zs = "((\\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])))", Li = new RegExp(`^${zs}$`);
|
|
2242
2240
|
function Vs(t) {
|
|
2243
2241
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
2244
2242
|
return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
@@ -2252,7 +2250,7 @@ function Us(t) {
|
|
|
2252
2250
|
return n.push(t.local ? "Z?" : "Z"), t.offset && n.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${n.join("|")})`, new RegExp(`^${e}$`);
|
|
2253
2251
|
}
|
|
2254
2252
|
function Fi(t, e) {
|
|
2255
|
-
return !!((e === "v4" || !e) && Ri.test(t) || (e === "v6" || !e) &&
|
|
2253
|
+
return !!((e === "v4" || !e) && Ri.test(t) || (e === "v6" || !e) && ji.test(t));
|
|
2256
2254
|
}
|
|
2257
2255
|
function Wi(t, e) {
|
|
2258
2256
|
if (!Ai.test(t))
|
|
@@ -2265,7 +2263,7 @@ function Wi(t, e) {
|
|
|
2265
2263
|
}
|
|
2266
2264
|
}
|
|
2267
2265
|
function zi(t, e) {
|
|
2268
|
-
return !!((e === "v4" || !e) &&
|
|
2266
|
+
return !!((e === "v4" || !e) && Ii.test(t) || (e === "v6" || !e) && Zi.test(t));
|
|
2269
2267
|
}
|
|
2270
2268
|
class he extends T {
|
|
2271
2269
|
_parse(e) {
|
|
@@ -3555,7 +3553,7 @@ Ft.create = (t, e) => new Ft(d({
|
|
|
3555
3553
|
options: t,
|
|
3556
3554
|
typeName: E.ZodUnion
|
|
3557
3555
|
}, O(e)));
|
|
3558
|
-
const
|
|
3556
|
+
const Ie = (t) => t instanceof Vt ? Ie(t.schema) : t instanceof me ? Ie(t.innerType()) : t instanceof Ut ? [t.value] : t instanceof Fe ? t.options : t instanceof Bt ? C.objectValues(t.enum) : t instanceof qt ? Ie(t._def.innerType) : t instanceof Lt ? [void 0] : t instanceof $t ? [null] : t instanceof we ? [void 0, ...Ie(t.unwrap())] : t instanceof We ? [null, ...Ie(t.unwrap())] : t instanceof Rr || t instanceof Kt ? Ie(t.unwrap()) : t instanceof Ht ? Ie(t._def.innerType) : [];
|
|
3559
3557
|
class An extends T {
|
|
3560
3558
|
_parse(e) {
|
|
3561
3559
|
const { ctx: n } = this._processInputParams(e);
|
|
@@ -3600,7 +3598,7 @@ class An extends T {
|
|
|
3600
3598
|
static create(e, n, r) {
|
|
3601
3599
|
const s = /* @__PURE__ */ new Map();
|
|
3602
3600
|
for (const a of n) {
|
|
3603
|
-
const i =
|
|
3601
|
+
const i = Ie(a.shape[e]);
|
|
3604
3602
|
if (!i.length)
|
|
3605
3603
|
throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
|
|
3606
3604
|
for (const o of i) {
|
|
@@ -4253,7 +4251,7 @@ qt.create = (t, e) => new qt(d({
|
|
|
4253
4251
|
typeName: E.ZodDefault,
|
|
4254
4252
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default
|
|
4255
4253
|
}, O(e)));
|
|
4256
|
-
class
|
|
4254
|
+
class Ht extends T {
|
|
4257
4255
|
_parse(e) {
|
|
4258
4256
|
const { ctx: n } = this._processInputParams(e), r = x(d({}, n), {
|
|
4259
4257
|
common: x(d({}, n.common), {
|
|
@@ -4286,7 +4284,7 @@ class Kt extends T {
|
|
|
4286
4284
|
return this._def.innerType;
|
|
4287
4285
|
}
|
|
4288
4286
|
}
|
|
4289
|
-
|
|
4287
|
+
Ht.create = (t, e) => new Ht(d({
|
|
4290
4288
|
innerType: t,
|
|
4291
4289
|
typeName: E.ZodCatch,
|
|
4292
4290
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch
|
|
@@ -4361,7 +4359,7 @@ class Xt extends T {
|
|
|
4361
4359
|
});
|
|
4362
4360
|
}
|
|
4363
4361
|
}
|
|
4364
|
-
class
|
|
4362
|
+
class Kt extends T {
|
|
4365
4363
|
_parse(e) {
|
|
4366
4364
|
const n = this._def.innerType._parse(e), r = (s) => (et(s) && (s.value = Object.freeze(s.value)), s);
|
|
4367
4365
|
return Dt(n) ? n.then((s) => r(s)) : r(n);
|
|
@@ -4370,7 +4368,7 @@ class Ht extends T {
|
|
|
4370
4368
|
return this._def.innerType;
|
|
4371
4369
|
}
|
|
4372
4370
|
}
|
|
4373
|
-
|
|
4371
|
+
Kt.create = (t, e) => new Kt(d({
|
|
4374
4372
|
innerType: t,
|
|
4375
4373
|
typeName: E.ZodReadonly
|
|
4376
4374
|
}, O(e)));
|
|
@@ -4392,7 +4390,7 @@ var E;
|
|
|
4392
4390
|
})(E || (E = {}));
|
|
4393
4391
|
const qi = (t, e = {
|
|
4394
4392
|
message: `Input not instance of ${t.name}`
|
|
4395
|
-
}) => qs((n) => n instanceof t, e),
|
|
4393
|
+
}) => qs((n) => n instanceof t, e), Hs = he.create, Ks = Le.create, Hi = En.create, Ki = $e.create, Gs = Mt.create, Gi = tt.create, Ji = bn.create, Xi = Lt.create, Yi = $t.create, Qi = _t.create, eo = Xe.create, to = Re.create, no = wn.create, ro = pe.create, so = F.create, ao = F.strictCreate, io = Ft.create, oo = An.create, uo = Wt.create, co = xe.create, lo = zt.create, fo = kn.create, ho = nt.create, po = pt.create, mo = Vt.create, yo = Ut.create, go = Fe.create, _o = Bt.create, vo = vt.create, ys = me.create, bo = we.create, wo = We.create, ko = me.createWithPreprocess, Eo = Xt.create, xo = () => Hs().optional(), So = () => Ks().optional(), Oo = () => Gs().optional(), To = {
|
|
4396
4394
|
string: (t) => he.create(x(d({}, t), { coerce: !0 })),
|
|
4397
4395
|
number: (t) => Le.create(x(d({}, t), { coerce: !0 })),
|
|
4398
4396
|
boolean: (t) => Mt.create(x(d({}, t), {
|
|
@@ -4401,7 +4399,7 @@ const qi = (t, e = {
|
|
|
4401
4399
|
bigint: (t) => $e.create(x(d({}, t), { coerce: !0 })),
|
|
4402
4400
|
date: (t) => tt.create(x(d({}, t), { coerce: !0 }))
|
|
4403
4401
|
}, Ao = S;
|
|
4404
|
-
var
|
|
4402
|
+
var K = /* @__PURE__ */ Object.freeze({
|
|
4405
4403
|
__proto__: null,
|
|
4406
4404
|
defaultErrorMap: gt,
|
|
4407
4405
|
setErrorMap: wi,
|
|
@@ -4459,12 +4457,12 @@ var G = /* @__PURE__ */ Object.freeze({
|
|
|
4459
4457
|
ZodOptional: we,
|
|
4460
4458
|
ZodNullable: We,
|
|
4461
4459
|
ZodDefault: qt,
|
|
4462
|
-
ZodCatch:
|
|
4460
|
+
ZodCatch: Ht,
|
|
4463
4461
|
ZodNaN: En,
|
|
4464
4462
|
BRAND: Ui,
|
|
4465
4463
|
ZodBranded: Rr,
|
|
4466
4464
|
ZodPipeline: Xt,
|
|
4467
|
-
ZodReadonly:
|
|
4465
|
+
ZodReadonly: Kt,
|
|
4468
4466
|
custom: qs,
|
|
4469
4467
|
Schema: T,
|
|
4470
4468
|
ZodSchema: T,
|
|
@@ -4475,7 +4473,7 @@ var G = /* @__PURE__ */ Object.freeze({
|
|
|
4475
4473
|
coerce: To,
|
|
4476
4474
|
any: Qi,
|
|
4477
4475
|
array: ro,
|
|
4478
|
-
bigint:
|
|
4476
|
+
bigint: Ki,
|
|
4479
4477
|
boolean: Gs,
|
|
4480
4478
|
date: Gi,
|
|
4481
4479
|
discriminatedUnion: oo,
|
|
@@ -4487,12 +4485,12 @@ var G = /* @__PURE__ */ Object.freeze({
|
|
|
4487
4485
|
lazy: mo,
|
|
4488
4486
|
literal: yo,
|
|
4489
4487
|
map: fo,
|
|
4490
|
-
nan:
|
|
4488
|
+
nan: Hi,
|
|
4491
4489
|
nativeEnum: _o,
|
|
4492
4490
|
never: to,
|
|
4493
4491
|
null: Yi,
|
|
4494
4492
|
nullable: wo,
|
|
4495
|
-
number:
|
|
4493
|
+
number: Ks,
|
|
4496
4494
|
object: so,
|
|
4497
4495
|
oboolean: Oo,
|
|
4498
4496
|
onumber: So,
|
|
@@ -4504,7 +4502,7 @@ var G = /* @__PURE__ */ Object.freeze({
|
|
|
4504
4502
|
record: lo,
|
|
4505
4503
|
set: ho,
|
|
4506
4504
|
strictObject: ao,
|
|
4507
|
-
string:
|
|
4505
|
+
string: Hs,
|
|
4508
4506
|
symbol: Ji,
|
|
4509
4507
|
transformer: ys,
|
|
4510
4508
|
tuple: co,
|
|
@@ -4517,14 +4515,15 @@ var G = /* @__PURE__ */ Object.freeze({
|
|
|
4517
4515
|
quotelessJson: bi,
|
|
4518
4516
|
ZodError: ie
|
|
4519
4517
|
});
|
|
4520
|
-
|
|
4521
|
-
language:
|
|
4518
|
+
K.object({
|
|
4519
|
+
language: K.enum(["typescript", "javascript"]).optional(),
|
|
4520
|
+
disableMarkedForExport: K.boolean().optional()
|
|
4522
4521
|
}).and(
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
framework:
|
|
4526
|
-
model:
|
|
4527
|
-
styling:
|
|
4522
|
+
K.union([
|
|
4523
|
+
K.object({
|
|
4524
|
+
framework: K.literal("react"),
|
|
4525
|
+
model: K.string().optional(),
|
|
4526
|
+
styling: K.enum([
|
|
4528
4527
|
"plain_css",
|
|
4529
4528
|
"css_modules",
|
|
4530
4529
|
"styled_components",
|
|
@@ -4533,29 +4532,29 @@ G.object({
|
|
|
4533
4532
|
"scss",
|
|
4534
4533
|
"inline_styles"
|
|
4535
4534
|
]),
|
|
4536
|
-
uiLibrary:
|
|
4537
|
-
enableUILibraryTheming:
|
|
4538
|
-
enableCompactStructure:
|
|
4539
|
-
enableAutoSplit:
|
|
4540
|
-
autoSplitThreshold:
|
|
4535
|
+
uiLibrary: K.enum(["mui", "antd", "radix", "shadcn"]).optional(),
|
|
4536
|
+
enableUILibraryTheming: K.boolean().optional(),
|
|
4537
|
+
enableCompactStructure: K.boolean().optional(),
|
|
4538
|
+
enableAutoSplit: K.boolean().optional(),
|
|
4539
|
+
autoSplitThreshold: K.number().optional()
|
|
4541
4540
|
}),
|
|
4542
|
-
|
|
4543
|
-
framework:
|
|
4544
|
-
styling:
|
|
4545
|
-
enableTranslation:
|
|
4541
|
+
K.object({
|
|
4542
|
+
framework: K.literal("html"),
|
|
4543
|
+
styling: K.enum(["plain_css", "inline_styles"]),
|
|
4544
|
+
enableTranslation: K.boolean().optional()
|
|
4546
4545
|
})
|
|
4547
4546
|
])
|
|
4548
4547
|
);
|
|
4549
|
-
var Co = Object.defineProperty, No = Object.defineProperties, Po = Object.getOwnPropertyDescriptors, gs = Object.getOwnPropertySymbols, Ro = Object.prototype.hasOwnProperty,
|
|
4548
|
+
var Co = Object.defineProperty, No = Object.defineProperties, Po = Object.getOwnPropertyDescriptors, gs = Object.getOwnPropertySymbols, Ro = Object.prototype.hasOwnProperty, Io = Object.prototype.propertyIsEnumerable, _s = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), Js = (t) => {
|
|
4550
4549
|
throw TypeError(t);
|
|
4551
4550
|
}, vs = (t, e, n) => e in t ? Co(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ae = (t, e) => {
|
|
4552
4551
|
for (var n in e || (e = {}))
|
|
4553
4552
|
Ro.call(e, n) && vs(t, n, e[n]);
|
|
4554
4553
|
if (gs)
|
|
4555
4554
|
for (var n of gs(e))
|
|
4556
|
-
|
|
4555
|
+
Io.call(e, n) && vs(t, n, e[n]);
|
|
4557
4556
|
return t;
|
|
4558
|
-
},
|
|
4557
|
+
}, Ir = (t, e) => No(t, Po(e)), jr = (t, e, n) => e.has(t) || Js("Cannot " + n), P = (t, e, n) => (jr(t, e, "read from private field"), n ? n.call(t) : e.get(t)), de = (t, e, n) => e.has(t) ? Js("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), J = (t, e, n, r) => (jr(t, e, "write to private field"), e.set(t, n), n), ve = (t, e, n) => (jr(t, e, "access private method"), n), V = (t, e, n) => new Promise((r, s) => {
|
|
4559
4558
|
var a = (u) => {
|
|
4560
4559
|
try {
|
|
4561
4560
|
o(n.next(u));
|
|
@@ -4570,7 +4569,7 @@ var Co = Object.defineProperty, No = Object.defineProperties, Po = Object.getOwn
|
|
|
4570
4569
|
}
|
|
4571
4570
|
}, o = (u) => u.done ? r(u.value) : Promise.resolve(u.value).then(a, i);
|
|
4572
4571
|
o((n = n.apply(t, e)).next());
|
|
4573
|
-
}),
|
|
4572
|
+
}), jo = (t, e, n) => (e = t[_s("asyncIterator")]) ? e.call(t) : (t = t[_s("iterator")](), e = {}, n = (r, s) => (s = t[r]) && (e[r] = (a) => new Promise((i, o, u) => (a = s.call(t, a), u = a.done, Promise.resolve(a.value).then((c) => i({ value: c, done: u }), o)))), n("next"), n("return"), e), Zo = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
|
|
4574
4573
|
function Do(t) {
|
|
4575
4574
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
4576
4575
|
}
|
|
@@ -4581,41 +4580,41 @@ function Lo() {
|
|
|
4581
4580
|
t.exports = r();
|
|
4582
4581
|
})(Mo, function() {
|
|
4583
4582
|
var n = typeof Promise == "function", r = typeof self == "object" ? self : Zo, s = typeof Symbol != "undefined", a = typeof Map != "undefined", i = typeof Set != "undefined", o = typeof WeakMap != "undefined", u = typeof WeakSet != "undefined", c = typeof DataView != "undefined", h = s && typeof Symbol.iterator != "undefined", p = s && typeof Symbol.toStringTag != "undefined", k = i && typeof Set.prototype.entries == "function", g = a && typeof Map.prototype.entries == "function", b = k && Object.getPrototypeOf((/* @__PURE__ */ new Set()).entries()), l = g && Object.getPrototypeOf((/* @__PURE__ */ new Map()).entries()), v = h && typeof Array.prototype[Symbol.iterator] == "function", m = v && Object.getPrototypeOf([][Symbol.iterator]()), z = h && typeof String.prototype[Symbol.iterator] == "function", R = z && Object.getPrototypeOf(""[Symbol.iterator]()), q = 8, D = -1;
|
|
4584
|
-
function B(
|
|
4585
|
-
var $ = typeof
|
|
4583
|
+
function B(I) {
|
|
4584
|
+
var $ = typeof I;
|
|
4586
4585
|
if ($ !== "object")
|
|
4587
4586
|
return $;
|
|
4588
|
-
if (
|
|
4587
|
+
if (I === null)
|
|
4589
4588
|
return "null";
|
|
4590
|
-
if (
|
|
4589
|
+
if (I === r)
|
|
4591
4590
|
return "global";
|
|
4592
|
-
if (Array.isArray(
|
|
4591
|
+
if (Array.isArray(I) && (p === !1 || !(Symbol.toStringTag in I)))
|
|
4593
4592
|
return "Array";
|
|
4594
4593
|
if (typeof window == "object" && window !== null) {
|
|
4595
|
-
if (typeof window.location == "object" &&
|
|
4594
|
+
if (typeof window.location == "object" && I === window.location)
|
|
4596
4595
|
return "Location";
|
|
4597
|
-
if (typeof window.document == "object" &&
|
|
4596
|
+
if (typeof window.document == "object" && I === window.document)
|
|
4598
4597
|
return "Document";
|
|
4599
4598
|
if (typeof window.navigator == "object") {
|
|
4600
|
-
if (typeof window.navigator.mimeTypes == "object" &&
|
|
4599
|
+
if (typeof window.navigator.mimeTypes == "object" && I === window.navigator.mimeTypes)
|
|
4601
4600
|
return "MimeTypeArray";
|
|
4602
|
-
if (typeof window.navigator.plugins == "object" &&
|
|
4601
|
+
if (typeof window.navigator.plugins == "object" && I === window.navigator.plugins)
|
|
4603
4602
|
return "PluginArray";
|
|
4604
4603
|
}
|
|
4605
|
-
if ((typeof window.HTMLElement == "function" || typeof window.HTMLElement == "object") &&
|
|
4606
|
-
if (
|
|
4604
|
+
if ((typeof window.HTMLElement == "function" || typeof window.HTMLElement == "object") && I instanceof window.HTMLElement) {
|
|
4605
|
+
if (I.tagName === "BLOCKQUOTE")
|
|
4607
4606
|
return "HTMLQuoteElement";
|
|
4608
|
-
if (
|
|
4607
|
+
if (I.tagName === "TD")
|
|
4609
4608
|
return "HTMLTableDataCellElement";
|
|
4610
|
-
if (
|
|
4609
|
+
if (I.tagName === "TH")
|
|
4611
4610
|
return "HTMLTableHeaderCellElement";
|
|
4612
4611
|
}
|
|
4613
4612
|
}
|
|
4614
|
-
var Se = p &&
|
|
4613
|
+
var Se = p && I[Symbol.toStringTag];
|
|
4615
4614
|
if (typeof Se == "string")
|
|
4616
4615
|
return Se;
|
|
4617
|
-
var M = Object.getPrototypeOf(
|
|
4618
|
-
return M === RegExp.prototype ? "RegExp" : M === Date.prototype ? "Date" : n && M === Promise.prototype ? "Promise" : i && M === Set.prototype ? "Set" : a && M === Map.prototype ? "Map" : u && M === WeakSet.prototype ? "WeakSet" : o && M === WeakMap.prototype ? "WeakMap" : c && M === DataView.prototype ? "DataView" : a && M === l ? "Map Iterator" : i && M === b ? "Set Iterator" : v && M === m ? "Array Iterator" : z && M === R ? "String Iterator" : M === null ? "Object" : Object.prototype.toString.call(
|
|
4616
|
+
var M = Object.getPrototypeOf(I);
|
|
4617
|
+
return M === RegExp.prototype ? "RegExp" : M === Date.prototype ? "Date" : n && M === Promise.prototype ? "Promise" : i && M === Set.prototype ? "Set" : a && M === Map.prototype ? "Map" : u && M === WeakSet.prototype ? "WeakSet" : o && M === WeakMap.prototype ? "WeakMap" : c && M === DataView.prototype ? "DataView" : a && M === l ? "Map Iterator" : i && M === b ? "Set Iterator" : v && M === m ? "Array Iterator" : z && M === R ? "String Iterator" : M === null ? "Object" : Object.prototype.toString.call(I).slice(q, D);
|
|
4619
4618
|
}
|
|
4620
4619
|
return B;
|
|
4621
4620
|
});
|
|
@@ -4719,7 +4718,7 @@ function ws(t, e, n, r = null) {
|
|
|
4719
4718
|
}
|
|
4720
4719
|
return t;
|
|
4721
4720
|
}
|
|
4722
|
-
const qo = typeof globalThis != "undefined" && globalThis !== null && globalThis.Object === Object && globalThis,
|
|
4721
|
+
const qo = typeof globalThis != "undefined" && globalThis !== null && globalThis.Object === Object && globalThis, Ho = typeof global != "undefined" && global !== null && global.Object === Object && global, Ko = typeof self != "undefined" && self !== null && self.Object === Object && self, Un = qo || Ho || Ko || Function("return this")();
|
|
4723
4722
|
function Go(t) {
|
|
4724
4723
|
return t.slice(0);
|
|
4725
4724
|
}
|
|
@@ -4914,7 +4913,7 @@ function lu(t) {
|
|
|
4914
4913
|
return V(this, null, function* () {
|
|
4915
4914
|
const e = new Blob([t]).stream().pipeThrough(new CompressionStream("gzip")), n = [];
|
|
4916
4915
|
try {
|
|
4917
|
-
for (var r =
|
|
4916
|
+
for (var r = jo(e), s, a, i; s = !(a = yield r.next()).done; s = !1) {
|
|
4918
4917
|
const o = a.value;
|
|
4919
4918
|
n.push(o);
|
|
4920
4919
|
}
|
|
@@ -5018,7 +5017,7 @@ class gu {
|
|
|
5018
5017
|
const { overrideBaseAddress: s, overrideDefaultHeaders: a } = r, i = s != null ? s : this.baseAddress;
|
|
5019
5018
|
let o = a != null ? a : this.headers;
|
|
5020
5019
|
const u = kt(P(this, ne));
|
|
5021
|
-
return J(this, ne, {}), u.extraHeaders && (o = ae(ae({}, o), u.extraHeaders)), u.requestValidation && (o =
|
|
5020
|
+
return J(this, ne, {}), u.extraHeaders && (o = ae(ae({}, o), u.extraHeaders)), u.requestValidation && (o = Ir(ae({}, o), { "X-Request-Nonce": Ys(), "X-Request-Timestamp": xr() })), u.async ? yield ve(this, ge, Or).call(this, `${i}${n}`, u.async, { headers: o }) : yield ve(this, ge, Sr).call(this, `${i}${n}`, u, { headers: o });
|
|
5022
5021
|
});
|
|
5023
5022
|
}
|
|
5024
5023
|
post(e, n) {
|
|
@@ -5165,7 +5164,7 @@ Je = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), ge = /*
|
|
|
5165
5164
|
return V(this, null, function* () {
|
|
5166
5165
|
const { overrideBaseAddress: a, overrideDefaultHeaders: i } = r, o = a != null ? a : this.baseAddress;
|
|
5167
5166
|
let u = i != null ? i : this.headers;
|
|
5168
|
-
s.extraHeaders && (u = ae(ae({}, u), s.extraHeaders)), s.requestValidation && (u =
|
|
5167
|
+
s.extraHeaders && (u = ae(ae({}, u), s.extraHeaders)), s.requestValidation && (u = Ir(ae({}, u), { "X-Request-Nonce": Ys(), "X-Request-Timestamp": xr() }));
|
|
5169
5168
|
let c = r.skipBodyJsonStringify ? n : JSON.stringify(n);
|
|
5170
5169
|
return s.compress && du() && (u["Content-Encoding"] = "gzip", c = yield lu(c)), s.async ? yield ve(this, ge, Or).call(this, `${o}${t}`, s.async, {
|
|
5171
5170
|
method: e,
|
|
@@ -5267,7 +5266,7 @@ class ku {
|
|
|
5267
5266
|
}
|
|
5268
5267
|
get(e) {
|
|
5269
5268
|
return V(this, arguments, function* ({ fileKey: n, nodeIds: r, params: s = {} }) {
|
|
5270
|
-
const a =
|
|
5269
|
+
const a = Ir(ae({}, s), {
|
|
5271
5270
|
ids: r.join(",")
|
|
5272
5271
|
}), i = new URLSearchParams(ae({
|
|
5273
5272
|
plugin_data: "857346721138427857"
|
|
@@ -5277,13 +5276,13 @@ class ku {
|
|
|
5277
5276
|
}
|
|
5278
5277
|
}
|
|
5279
5278
|
ln = /* @__PURE__ */ new WeakMap();
|
|
5280
|
-
var
|
|
5279
|
+
var je;
|
|
5281
5280
|
class Eu extends gu {
|
|
5282
5281
|
constructor({
|
|
5283
5282
|
baseAddress: e = "https://api.figma.com/",
|
|
5284
5283
|
fetch: n = globalThis.fetch.bind(globalThis)
|
|
5285
5284
|
} = {}) {
|
|
5286
|
-
super({ fetch: n, baseAddress: e }), de(this,
|
|
5285
|
+
super({ fetch: n, baseAddress: e }), de(this, je, ""), this.cache = {
|
|
5287
5286
|
images: {
|
|
5288
5287
|
entries: /* @__PURE__ */ new Map(),
|
|
5289
5288
|
pendingRequests: /* @__PURE__ */ new Map()
|
|
@@ -5293,19 +5292,19 @@ class Eu extends gu {
|
|
|
5293
5292
|
set token(e) {
|
|
5294
5293
|
if (!e.startsWith("figd_") && !e.startsWith("figu_"))
|
|
5295
5294
|
throw new Error("Invalid Figma access token");
|
|
5296
|
-
J(this,
|
|
5295
|
+
J(this, je, e);
|
|
5297
5296
|
}
|
|
5298
5297
|
get token() {
|
|
5299
|
-
return P(this,
|
|
5298
|
+
return P(this, je);
|
|
5300
5299
|
}
|
|
5301
5300
|
get headers() {
|
|
5302
5301
|
const e = {
|
|
5303
5302
|
"Content-Type": "application/json"
|
|
5304
5303
|
};
|
|
5305
|
-
return P(this,
|
|
5304
|
+
return P(this, je).startsWith("figd_") ? e["X-FIGMA-TOKEN"] = P(this, je) : P(this, je).startsWith("figu_") && (e.Authorization = `Bearer ${P(this, je)}`), e;
|
|
5306
5305
|
}
|
|
5307
5306
|
}
|
|
5308
|
-
|
|
5307
|
+
je = /* @__PURE__ */ new WeakMap();
|
|
5309
5308
|
const xu = (t) => ke(void 0, [t], function* ({
|
|
5310
5309
|
fileKey: e,
|
|
5311
5310
|
authToken: n,
|