@pi-oxide/extension-js 0.12.3 → 0.12.4
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/content-script.js +3 -3
- package/extension_js.d.ts +2 -2
- package/extension_js.js +16718 -16717
- package/index.js +16 -0
- package/package.json +1 -1
- package/worker.js +196 -180
package/worker.js
CHANGED
|
@@ -463,7 +463,7 @@ class $ {
|
|
|
463
463
|
const n = [];
|
|
464
464
|
for (const s of r) {
|
|
465
465
|
if (s.status === "aborted")
|
|
466
|
-
return
|
|
466
|
+
return k;
|
|
467
467
|
s.status === "dirty" && e.dirty(), n.push(s.value);
|
|
468
468
|
}
|
|
469
469
|
return { status: e.value, value: n };
|
|
@@ -484,13 +484,13 @@ class $ {
|
|
|
484
484
|
for (const s of r) {
|
|
485
485
|
const { key: i, value: c } = s;
|
|
486
486
|
if (i.status === "aborted" || c.status === "aborted")
|
|
487
|
-
return
|
|
487
|
+
return k;
|
|
488
488
|
i.status === "dirty" && e.dirty(), c.status === "dirty" && e.dirty(), i.value !== "__proto__" && (typeof c.value < "u" || s.alwaysSet) && (n[i.value] = c.value);
|
|
489
489
|
}
|
|
490
490
|
return { status: e.value, value: n };
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
|
-
const
|
|
493
|
+
const k = Object.freeze({
|
|
494
494
|
status: "aborted"
|
|
495
495
|
}), ve = (t) => ({ status: "dirty", value: t }), L = (t) => ({ status: "valid", value: t }), vt = (t) => t.status === "aborted", kt = (t) => t.status === "dirty", pe = (t) => t.status === "valid", De = (t) => typeof Promise < "u" && t instanceof Promise;
|
|
496
496
|
var y;
|
|
@@ -660,9 +660,9 @@ class S {
|
|
|
660
660
|
return this._refinement((n, s) => e(n) ? !0 : (s.addIssue(typeof r == "function" ? r(n, s) : r), !1));
|
|
661
661
|
}
|
|
662
662
|
_refinement(e) {
|
|
663
|
-
return new
|
|
663
|
+
return new K({
|
|
664
664
|
schema: this,
|
|
665
|
-
typeName:
|
|
665
|
+
typeName: w.ZodEffects,
|
|
666
666
|
effect: { type: "refinement", refinement: e }
|
|
667
667
|
});
|
|
668
668
|
}
|
|
@@ -698,10 +698,10 @@ class S {
|
|
|
698
698
|
return Re.create(this, e, this._def);
|
|
699
699
|
}
|
|
700
700
|
transform(e) {
|
|
701
|
-
return new
|
|
701
|
+
return new K({
|
|
702
702
|
...T(this._def),
|
|
703
703
|
schema: this,
|
|
704
|
-
typeName:
|
|
704
|
+
typeName: w.ZodEffects,
|
|
705
705
|
effect: { type: "transform", transform: e }
|
|
706
706
|
});
|
|
707
707
|
}
|
|
@@ -711,12 +711,12 @@ class S {
|
|
|
711
711
|
...T(this._def),
|
|
712
712
|
innerType: this,
|
|
713
713
|
defaultValue: r,
|
|
714
|
-
typeName:
|
|
714
|
+
typeName: w.ZodDefault
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
717
|
brand() {
|
|
718
718
|
return new ut({
|
|
719
|
-
typeName:
|
|
719
|
+
typeName: w.ZodBranded,
|
|
720
720
|
type: this,
|
|
721
721
|
...T(this._def)
|
|
722
722
|
});
|
|
@@ -727,7 +727,7 @@ class S {
|
|
|
727
727
|
...T(this._def),
|
|
728
728
|
innerType: this,
|
|
729
729
|
catchValue: r,
|
|
730
|
-
typeName:
|
|
730
|
+
typeName: w.ZodCatch
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
733
|
describe(e) {
|
|
@@ -794,7 +794,7 @@ class B extends S {
|
|
|
794
794
|
code: u.invalid_type,
|
|
795
795
|
expected: g.string,
|
|
796
796
|
received: i.parsedType
|
|
797
|
-
}),
|
|
797
|
+
}), k;
|
|
798
798
|
}
|
|
799
799
|
const n = new $();
|
|
800
800
|
let s;
|
|
@@ -1165,7 +1165,7 @@ class B extends S {
|
|
|
1165
1165
|
}
|
|
1166
1166
|
B.create = (t) => new B({
|
|
1167
1167
|
checks: [],
|
|
1168
|
-
typeName:
|
|
1168
|
+
typeName: w.ZodString,
|
|
1169
1169
|
coerce: (t == null ? void 0 : t.coerce) ?? !1,
|
|
1170
1170
|
...T(t)
|
|
1171
1171
|
});
|
|
@@ -1184,7 +1184,7 @@ class oe extends S {
|
|
|
1184
1184
|
code: u.invalid_type,
|
|
1185
1185
|
expected: g.number,
|
|
1186
1186
|
received: i.parsedType
|
|
1187
|
-
}),
|
|
1187
|
+
}), k;
|
|
1188
1188
|
}
|
|
1189
1189
|
let n;
|
|
1190
1190
|
const s = new $();
|
|
@@ -1341,7 +1341,7 @@ class oe extends S {
|
|
|
1341
1341
|
}
|
|
1342
1342
|
oe.create = (t) => new oe({
|
|
1343
1343
|
checks: [],
|
|
1344
|
-
typeName:
|
|
1344
|
+
typeName: w.ZodNumber,
|
|
1345
1345
|
coerce: (t == null ? void 0 : t.coerce) || !1,
|
|
1346
1346
|
...T(t)
|
|
1347
1347
|
});
|
|
@@ -1386,7 +1386,7 @@ class ce extends S {
|
|
|
1386
1386
|
code: u.invalid_type,
|
|
1387
1387
|
expected: g.bigint,
|
|
1388
1388
|
received: r.parsedType
|
|
1389
|
-
}),
|
|
1389
|
+
}), k;
|
|
1390
1390
|
}
|
|
1391
1391
|
gte(e, r) {
|
|
1392
1392
|
return this.setLimit("min", e, !0, y.toString(r));
|
|
@@ -1474,7 +1474,7 @@ class ce extends S {
|
|
|
1474
1474
|
}
|
|
1475
1475
|
ce.create = (t) => new ce({
|
|
1476
1476
|
checks: [],
|
|
1477
|
-
typeName:
|
|
1477
|
+
typeName: w.ZodBigInt,
|
|
1478
1478
|
coerce: (t == null ? void 0 : t.coerce) ?? !1,
|
|
1479
1479
|
...T(t)
|
|
1480
1480
|
});
|
|
@@ -1486,13 +1486,13 @@ class Ze extends S {
|
|
|
1486
1486
|
code: u.invalid_type,
|
|
1487
1487
|
expected: g.boolean,
|
|
1488
1488
|
received: n.parsedType
|
|
1489
|
-
}),
|
|
1489
|
+
}), k;
|
|
1490
1490
|
}
|
|
1491
1491
|
return L(e.data);
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
1494
|
Ze.create = (t) => new Ze({
|
|
1495
|
-
typeName:
|
|
1495
|
+
typeName: w.ZodBoolean,
|
|
1496
1496
|
coerce: (t == null ? void 0 : t.coerce) || !1,
|
|
1497
1497
|
...T(t)
|
|
1498
1498
|
});
|
|
@@ -1504,13 +1504,13 @@ class Se extends S {
|
|
|
1504
1504
|
code: u.invalid_type,
|
|
1505
1505
|
expected: g.date,
|
|
1506
1506
|
received: i.parsedType
|
|
1507
|
-
}),
|
|
1507
|
+
}), k;
|
|
1508
1508
|
}
|
|
1509
1509
|
if (Number.isNaN(e.data.getTime())) {
|
|
1510
1510
|
const i = this._getOrReturnCtx(e);
|
|
1511
1511
|
return p(i, {
|
|
1512
1512
|
code: u.invalid_date
|
|
1513
|
-
}),
|
|
1513
|
+
}), k;
|
|
1514
1514
|
}
|
|
1515
1515
|
const n = new $();
|
|
1516
1516
|
let s;
|
|
@@ -1571,7 +1571,7 @@ class Se extends S {
|
|
|
1571
1571
|
Se.create = (t) => new Se({
|
|
1572
1572
|
checks: [],
|
|
1573
1573
|
coerce: (t == null ? void 0 : t.coerce) || !1,
|
|
1574
|
-
typeName:
|
|
1574
|
+
typeName: w.ZodDate,
|
|
1575
1575
|
...T(t)
|
|
1576
1576
|
});
|
|
1577
1577
|
class Tt extends S {
|
|
@@ -1582,13 +1582,13 @@ class Tt extends S {
|
|
|
1582
1582
|
code: u.invalid_type,
|
|
1583
1583
|
expected: g.symbol,
|
|
1584
1584
|
received: n.parsedType
|
|
1585
|
-
}),
|
|
1585
|
+
}), k;
|
|
1586
1586
|
}
|
|
1587
1587
|
return L(e.data);
|
|
1588
1588
|
}
|
|
1589
1589
|
}
|
|
1590
1590
|
Tt.create = (t) => new Tt({
|
|
1591
|
-
typeName:
|
|
1591
|
+
typeName: w.ZodSymbol,
|
|
1592
1592
|
...T(t)
|
|
1593
1593
|
});
|
|
1594
1594
|
class We extends S {
|
|
@@ -1599,13 +1599,13 @@ class We extends S {
|
|
|
1599
1599
|
code: u.invalid_type,
|
|
1600
1600
|
expected: g.undefined,
|
|
1601
1601
|
received: n.parsedType
|
|
1602
|
-
}),
|
|
1602
|
+
}), k;
|
|
1603
1603
|
}
|
|
1604
1604
|
return L(e.data);
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
1607
|
We.create = (t) => new We({
|
|
1608
|
-
typeName:
|
|
1608
|
+
typeName: w.ZodUndefined,
|
|
1609
1609
|
...T(t)
|
|
1610
1610
|
});
|
|
1611
1611
|
class Ie extends S {
|
|
@@ -1616,13 +1616,13 @@ class Ie extends S {
|
|
|
1616
1616
|
code: u.invalid_type,
|
|
1617
1617
|
expected: g.null,
|
|
1618
1618
|
received: n.parsedType
|
|
1619
|
-
}),
|
|
1619
|
+
}), k;
|
|
1620
1620
|
}
|
|
1621
1621
|
return L(e.data);
|
|
1622
1622
|
}
|
|
1623
1623
|
}
|
|
1624
1624
|
Ie.create = (t) => new Ie({
|
|
1625
|
-
typeName:
|
|
1625
|
+
typeName: w.ZodNull,
|
|
1626
1626
|
...T(t)
|
|
1627
1627
|
});
|
|
1628
1628
|
class et extends S {
|
|
@@ -1634,7 +1634,7 @@ class et extends S {
|
|
|
1634
1634
|
}
|
|
1635
1635
|
}
|
|
1636
1636
|
et.create = (t) => new et({
|
|
1637
|
-
typeName:
|
|
1637
|
+
typeName: w.ZodAny,
|
|
1638
1638
|
...T(t)
|
|
1639
1639
|
});
|
|
1640
1640
|
class ae extends S {
|
|
@@ -1646,7 +1646,7 @@ class ae extends S {
|
|
|
1646
1646
|
}
|
|
1647
1647
|
}
|
|
1648
1648
|
ae.create = (t) => new ae({
|
|
1649
|
-
typeName:
|
|
1649
|
+
typeName: w.ZodUnknown,
|
|
1650
1650
|
...T(t)
|
|
1651
1651
|
});
|
|
1652
1652
|
class re extends S {
|
|
@@ -1656,11 +1656,11 @@ class re extends S {
|
|
|
1656
1656
|
code: u.invalid_type,
|
|
1657
1657
|
expected: g.never,
|
|
1658
1658
|
received: r.parsedType
|
|
1659
|
-
}),
|
|
1659
|
+
}), k;
|
|
1660
1660
|
}
|
|
1661
1661
|
}
|
|
1662
1662
|
re.create = (t) => new re({
|
|
1663
|
-
typeName:
|
|
1663
|
+
typeName: w.ZodNever,
|
|
1664
1664
|
...T(t)
|
|
1665
1665
|
});
|
|
1666
1666
|
class tt extends S {
|
|
@@ -1671,13 +1671,13 @@ class tt extends S {
|
|
|
1671
1671
|
code: u.invalid_type,
|
|
1672
1672
|
expected: g.void,
|
|
1673
1673
|
received: n.parsedType
|
|
1674
|
-
}),
|
|
1674
|
+
}), k;
|
|
1675
1675
|
}
|
|
1676
1676
|
return L(e.data);
|
|
1677
1677
|
}
|
|
1678
1678
|
}
|
|
1679
1679
|
tt.create = (t) => new tt({
|
|
1680
|
-
typeName:
|
|
1680
|
+
typeName: w.ZodVoid,
|
|
1681
1681
|
...T(t)
|
|
1682
1682
|
});
|
|
1683
1683
|
class W extends S {
|
|
@@ -1688,7 +1688,7 @@ class W extends S {
|
|
|
1688
1688
|
code: u.invalid_type,
|
|
1689
1689
|
expected: g.array,
|
|
1690
1690
|
received: r.parsedType
|
|
1691
|
-
}),
|
|
1691
|
+
}), k;
|
|
1692
1692
|
if (s.exactLength !== null) {
|
|
1693
1693
|
const c = r.data.length > s.exactLength.value, a = r.data.length < s.exactLength.value;
|
|
1694
1694
|
(c || a) && (p(r, {
|
|
@@ -1750,7 +1750,7 @@ W.create = (t, e) => new W({
|
|
|
1750
1750
|
minLength: null,
|
|
1751
1751
|
maxLength: null,
|
|
1752
1752
|
exactLength: null,
|
|
1753
|
-
typeName:
|
|
1753
|
+
typeName: w.ZodArray,
|
|
1754
1754
|
...T(e)
|
|
1755
1755
|
});
|
|
1756
1756
|
function ue(t) {
|
|
@@ -1786,7 +1786,7 @@ class A extends S {
|
|
|
1786
1786
|
code: u.invalid_type,
|
|
1787
1787
|
expected: g.object,
|
|
1788
1788
|
received: d.parsedType
|
|
1789
|
-
}),
|
|
1789
|
+
}), k;
|
|
1790
1790
|
}
|
|
1791
1791
|
const { status: n, ctx: s } = this._processInputParams(e), { shape: i, keys: c } = this._getCached(), a = [];
|
|
1792
1792
|
if (!(this._def.catchall instanceof re && this._def.unknownKeys === "strip"))
|
|
@@ -1913,7 +1913,7 @@ class A extends S {
|
|
|
1913
1913
|
...this._def.shape(),
|
|
1914
1914
|
...e._def.shape()
|
|
1915
1915
|
}),
|
|
1916
|
-
typeName:
|
|
1916
|
+
typeName: w.ZodObject
|
|
1917
1917
|
});
|
|
1918
1918
|
}
|
|
1919
1919
|
// merge<
|
|
@@ -2040,21 +2040,21 @@ A.create = (t, e) => new A({
|
|
|
2040
2040
|
shape: () => t,
|
|
2041
2041
|
unknownKeys: "strip",
|
|
2042
2042
|
catchall: re.create(),
|
|
2043
|
-
typeName:
|
|
2043
|
+
typeName: w.ZodObject,
|
|
2044
2044
|
...T(e)
|
|
2045
2045
|
});
|
|
2046
2046
|
A.strictCreate = (t, e) => new A({
|
|
2047
2047
|
shape: () => t,
|
|
2048
2048
|
unknownKeys: "strict",
|
|
2049
2049
|
catchall: re.create(),
|
|
2050
|
-
typeName:
|
|
2050
|
+
typeName: w.ZodObject,
|
|
2051
2051
|
...T(e)
|
|
2052
2052
|
});
|
|
2053
2053
|
A.lazycreate = (t, e) => new A({
|
|
2054
2054
|
shape: t,
|
|
2055
2055
|
unknownKeys: "strip",
|
|
2056
2056
|
catchall: re.create(),
|
|
2057
|
-
typeName:
|
|
2057
|
+
typeName: w.ZodObject,
|
|
2058
2058
|
...T(e)
|
|
2059
2059
|
});
|
|
2060
2060
|
class Ee extends S {
|
|
@@ -2071,7 +2071,7 @@ class Ee extends S {
|
|
|
2071
2071
|
return p(r, {
|
|
2072
2072
|
code: u.invalid_union,
|
|
2073
2073
|
unionErrors: c
|
|
2074
|
-
}),
|
|
2074
|
+
}), k;
|
|
2075
2075
|
}
|
|
2076
2076
|
if (r.common.async)
|
|
2077
2077
|
return Promise.all(n.map(async (i) => {
|
|
@@ -2118,7 +2118,7 @@ class Ee extends S {
|
|
|
2118
2118
|
return p(r, {
|
|
2119
2119
|
code: u.invalid_union,
|
|
2120
2120
|
unionErrors: a
|
|
2121
|
-
}),
|
|
2121
|
+
}), k;
|
|
2122
2122
|
}
|
|
2123
2123
|
}
|
|
2124
2124
|
get options() {
|
|
@@ -2127,10 +2127,10 @@ class Ee extends S {
|
|
|
2127
2127
|
}
|
|
2128
2128
|
Ee.create = (t, e) => new Ee({
|
|
2129
2129
|
options: t,
|
|
2130
|
-
typeName:
|
|
2130
|
+
typeName: w.ZodUnion,
|
|
2131
2131
|
...T(e)
|
|
2132
2132
|
});
|
|
2133
|
-
const
|
|
2133
|
+
const Y = (t) => t instanceof Ce ? Y(t.schema) : t instanceof K ? Y(t.innerType()) : t instanceof Oe ? [t.value] : t instanceof ne ? t.options : t instanceof st ? E.objectValues(t.enum) : t instanceof Ne ? Y(t._def.innerType) : t instanceof We ? [void 0] : t instanceof Ie ? [null] : t instanceof V ? [void 0, ...Y(t.unwrap())] : t instanceof se ? [null, ...Y(t.unwrap())] : t instanceof ut || t instanceof Pe ? Y(t.unwrap()) : t instanceof Me ? Y(t._def.innerType) : [];
|
|
2134
2134
|
class ze extends S {
|
|
2135
2135
|
_parse(e) {
|
|
2136
2136
|
const { ctx: r } = this._processInputParams(e);
|
|
@@ -2139,7 +2139,7 @@ class ze extends S {
|
|
|
2139
2139
|
code: u.invalid_type,
|
|
2140
2140
|
expected: g.object,
|
|
2141
2141
|
received: r.parsedType
|
|
2142
|
-
}),
|
|
2142
|
+
}), k;
|
|
2143
2143
|
const n = this.discriminator, s = r.data[n], i = this.optionsMap.get(s);
|
|
2144
2144
|
return i ? r.common.async ? i._parseAsync({
|
|
2145
2145
|
data: r.data,
|
|
@@ -2153,7 +2153,7 @@ class ze extends S {
|
|
|
2153
2153
|
code: u.invalid_union_discriminator,
|
|
2154
2154
|
options: Array.from(this.optionsMap.keys()),
|
|
2155
2155
|
path: [n]
|
|
2156
|
-
}),
|
|
2156
|
+
}), k);
|
|
2157
2157
|
}
|
|
2158
2158
|
get discriminator() {
|
|
2159
2159
|
return this._def.discriminator;
|
|
@@ -2175,7 +2175,7 @@ class ze extends S {
|
|
|
2175
2175
|
static create(e, r, n) {
|
|
2176
2176
|
const s = /* @__PURE__ */ new Map();
|
|
2177
2177
|
for (const i of r) {
|
|
2178
|
-
const c =
|
|
2178
|
+
const c = Y(i.shape[e]);
|
|
2179
2179
|
if (!c.length)
|
|
2180
2180
|
throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
|
|
2181
2181
|
for (const a of c) {
|
|
@@ -2185,7 +2185,7 @@ class ze extends S {
|
|
|
2185
2185
|
}
|
|
2186
2186
|
}
|
|
2187
2187
|
return new ze({
|
|
2188
|
-
typeName:
|
|
2188
|
+
typeName: w.ZodDiscriminatedUnion,
|
|
2189
2189
|
discriminator: e,
|
|
2190
2190
|
options: r,
|
|
2191
2191
|
optionsMap: s,
|
|
@@ -2223,11 +2223,11 @@ class Re extends S {
|
|
|
2223
2223
|
_parse(e) {
|
|
2224
2224
|
const { status: r, ctx: n } = this._processInputParams(e), s = (i, c) => {
|
|
2225
2225
|
if (vt(i) || vt(c))
|
|
2226
|
-
return
|
|
2226
|
+
return k;
|
|
2227
2227
|
const a = rt(i.value, c.value);
|
|
2228
2228
|
return a.valid ? ((kt(i) || kt(c)) && r.dirty(), { status: r.value, value: a.data }) : (p(n, {
|
|
2229
2229
|
code: u.invalid_intersection_types
|
|
2230
|
-
}),
|
|
2230
|
+
}), k);
|
|
2231
2231
|
};
|
|
2232
2232
|
return n.common.async ? Promise.all([
|
|
2233
2233
|
this._def.left._parseAsync({
|
|
@@ -2254,7 +2254,7 @@ class Re extends S {
|
|
|
2254
2254
|
Re.create = (t, e, r) => new Re({
|
|
2255
2255
|
left: t,
|
|
2256
2256
|
right: e,
|
|
2257
|
-
typeName:
|
|
2257
|
+
typeName: w.ZodIntersection,
|
|
2258
2258
|
...T(r)
|
|
2259
2259
|
});
|
|
2260
2260
|
class q extends S {
|
|
@@ -2265,7 +2265,7 @@ class q extends S {
|
|
|
2265
2265
|
code: u.invalid_type,
|
|
2266
2266
|
expected: g.array,
|
|
2267
2267
|
received: n.parsedType
|
|
2268
|
-
}),
|
|
2268
|
+
}), k;
|
|
2269
2269
|
if (n.data.length < this._def.items.length)
|
|
2270
2270
|
return p(n, {
|
|
2271
2271
|
code: u.too_small,
|
|
@@ -2273,7 +2273,7 @@ class q extends S {
|
|
|
2273
2273
|
inclusive: !0,
|
|
2274
2274
|
exact: !1,
|
|
2275
2275
|
type: "array"
|
|
2276
|
-
}),
|
|
2276
|
+
}), k;
|
|
2277
2277
|
!this._def.rest && n.data.length > this._def.items.length && (p(n, {
|
|
2278
2278
|
code: u.too_big,
|
|
2279
2279
|
maximum: this._def.items.length,
|
|
@@ -2302,7 +2302,7 @@ q.create = (t, e) => {
|
|
|
2302
2302
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2303
2303
|
return new q({
|
|
2304
2304
|
items: t,
|
|
2305
|
-
typeName:
|
|
2305
|
+
typeName: w.ZodTuple,
|
|
2306
2306
|
rest: null,
|
|
2307
2307
|
...T(e)
|
|
2308
2308
|
});
|
|
@@ -2321,7 +2321,7 @@ class Ae extends S {
|
|
|
2321
2321
|
code: u.invalid_type,
|
|
2322
2322
|
expected: g.object,
|
|
2323
2323
|
received: n.parsedType
|
|
2324
|
-
}),
|
|
2324
|
+
}), k;
|
|
2325
2325
|
const s = [], i = this._def.keyType, c = this._def.valueType;
|
|
2326
2326
|
for (const a in n.data)
|
|
2327
2327
|
s.push({
|
|
@@ -2338,12 +2338,12 @@ class Ae extends S {
|
|
|
2338
2338
|
return r instanceof S ? new Ae({
|
|
2339
2339
|
keyType: e,
|
|
2340
2340
|
valueType: r,
|
|
2341
|
-
typeName:
|
|
2341
|
+
typeName: w.ZodRecord,
|
|
2342
2342
|
...T(n)
|
|
2343
2343
|
}) : new Ae({
|
|
2344
2344
|
keyType: B.create(),
|
|
2345
2345
|
valueType: e,
|
|
2346
|
-
typeName:
|
|
2346
|
+
typeName: w.ZodRecord,
|
|
2347
2347
|
...T(r)
|
|
2348
2348
|
});
|
|
2349
2349
|
}
|
|
@@ -2362,7 +2362,7 @@ class nt extends S {
|
|
|
2362
2362
|
code: u.invalid_type,
|
|
2363
2363
|
expected: g.map,
|
|
2364
2364
|
received: n.parsedType
|
|
2365
|
-
}),
|
|
2365
|
+
}), k;
|
|
2366
2366
|
const s = this._def.keyType, i = this._def.valueType, c = [...n.data.entries()].map(([a, h], d) => ({
|
|
2367
2367
|
key: s._parse(new z(n, a, n.path, [d, "key"])),
|
|
2368
2368
|
value: i._parse(new z(n, h, n.path, [d, "value"]))
|
|
@@ -2373,7 +2373,7 @@ class nt extends S {
|
|
|
2373
2373
|
for (const h of c) {
|
|
2374
2374
|
const d = await h.key, m = await h.value;
|
|
2375
2375
|
if (d.status === "aborted" || m.status === "aborted")
|
|
2376
|
-
return
|
|
2376
|
+
return k;
|
|
2377
2377
|
(d.status === "dirty" || m.status === "dirty") && r.dirty(), a.set(d.value, m.value);
|
|
2378
2378
|
}
|
|
2379
2379
|
return { status: r.value, value: a };
|
|
@@ -2383,7 +2383,7 @@ class nt extends S {
|
|
|
2383
2383
|
for (const h of c) {
|
|
2384
2384
|
const d = h.key, m = h.value;
|
|
2385
2385
|
if (d.status === "aborted" || m.status === "aborted")
|
|
2386
|
-
return
|
|
2386
|
+
return k;
|
|
2387
2387
|
(d.status === "dirty" || m.status === "dirty") && r.dirty(), a.set(d.value, m.value);
|
|
2388
2388
|
}
|
|
2389
2389
|
return { status: r.value, value: a };
|
|
@@ -2393,7 +2393,7 @@ class nt extends S {
|
|
|
2393
2393
|
nt.create = (t, e, r) => new nt({
|
|
2394
2394
|
valueType: e,
|
|
2395
2395
|
keyType: t,
|
|
2396
|
-
typeName:
|
|
2396
|
+
typeName: w.ZodMap,
|
|
2397
2397
|
...T(r)
|
|
2398
2398
|
});
|
|
2399
2399
|
class me extends S {
|
|
@@ -2404,7 +2404,7 @@ class me extends S {
|
|
|
2404
2404
|
code: u.invalid_type,
|
|
2405
2405
|
expected: g.set,
|
|
2406
2406
|
received: n.parsedType
|
|
2407
|
-
}),
|
|
2407
|
+
}), k;
|
|
2408
2408
|
const s = this._def;
|
|
2409
2409
|
s.minSize !== null && n.data.size < s.minSize.value && (p(n, {
|
|
2410
2410
|
code: u.too_small,
|
|
@@ -2426,7 +2426,7 @@ class me extends S {
|
|
|
2426
2426
|
const d = /* @__PURE__ */ new Set();
|
|
2427
2427
|
for (const m of h) {
|
|
2428
2428
|
if (m.status === "aborted")
|
|
2429
|
-
return
|
|
2429
|
+
return k;
|
|
2430
2430
|
m.status === "dirty" && r.dirty(), d.add(m.value);
|
|
2431
2431
|
}
|
|
2432
2432
|
return { status: r.value, value: d };
|
|
@@ -2457,7 +2457,7 @@ me.create = (t, e) => new me({
|
|
|
2457
2457
|
valueType: t,
|
|
2458
2458
|
minSize: null,
|
|
2459
2459
|
maxSize: null,
|
|
2460
|
-
typeName:
|
|
2460
|
+
typeName: w.ZodSet,
|
|
2461
2461
|
...T(e)
|
|
2462
2462
|
});
|
|
2463
2463
|
class we extends S {
|
|
@@ -2471,7 +2471,7 @@ class we extends S {
|
|
|
2471
2471
|
code: u.invalid_type,
|
|
2472
2472
|
expected: g.function,
|
|
2473
2473
|
received: r.parsedType
|
|
2474
|
-
}),
|
|
2474
|
+
}), k;
|
|
2475
2475
|
function n(a, h) {
|
|
2476
2476
|
return Xe({
|
|
2477
2477
|
data: a,
|
|
@@ -2546,7 +2546,7 @@ class we extends S {
|
|
|
2546
2546
|
return new we({
|
|
2547
2547
|
args: e || q.create([]).rest(ae.create()),
|
|
2548
2548
|
returns: r || ae.create(),
|
|
2549
|
-
typeName:
|
|
2549
|
+
typeName: w.ZodFunction,
|
|
2550
2550
|
...T(n)
|
|
2551
2551
|
});
|
|
2552
2552
|
}
|
|
@@ -2562,7 +2562,7 @@ class Ce extends S {
|
|
|
2562
2562
|
}
|
|
2563
2563
|
Ce.create = (t, e) => new Ce({
|
|
2564
2564
|
getter: t,
|
|
2565
|
-
typeName:
|
|
2565
|
+
typeName: w.ZodLazy,
|
|
2566
2566
|
...T(e)
|
|
2567
2567
|
});
|
|
2568
2568
|
class Oe extends S {
|
|
@@ -2573,7 +2573,7 @@ class Oe extends S {
|
|
|
2573
2573
|
received: r.data,
|
|
2574
2574
|
code: u.invalid_literal,
|
|
2575
2575
|
expected: this._def.value
|
|
2576
|
-
}),
|
|
2576
|
+
}), k;
|
|
2577
2577
|
}
|
|
2578
2578
|
return { status: "valid", value: e.data };
|
|
2579
2579
|
}
|
|
@@ -2583,13 +2583,13 @@ class Oe extends S {
|
|
|
2583
2583
|
}
|
|
2584
2584
|
Oe.create = (t, e) => new Oe({
|
|
2585
2585
|
value: t,
|
|
2586
|
-
typeName:
|
|
2586
|
+
typeName: w.ZodLiteral,
|
|
2587
2587
|
...T(e)
|
|
2588
2588
|
});
|
|
2589
2589
|
function $t(t, e) {
|
|
2590
2590
|
return new ne({
|
|
2591
2591
|
values: t,
|
|
2592
|
-
typeName:
|
|
2592
|
+
typeName: w.ZodEnum,
|
|
2593
2593
|
...T(e)
|
|
2594
2594
|
});
|
|
2595
2595
|
}
|
|
@@ -2601,7 +2601,7 @@ class ne extends S {
|
|
|
2601
2601
|
expected: E.joinValues(n),
|
|
2602
2602
|
received: r.parsedType,
|
|
2603
2603
|
code: u.invalid_type
|
|
2604
|
-
}),
|
|
2604
|
+
}), k;
|
|
2605
2605
|
}
|
|
2606
2606
|
if (this._cache || (this._cache = new Set(this._def.values)), !this._cache.has(e.data)) {
|
|
2607
2607
|
const r = this._getOrReturnCtx(e), n = this._def.values;
|
|
@@ -2609,7 +2609,7 @@ class ne extends S {
|
|
|
2609
2609
|
received: r.data,
|
|
2610
2610
|
code: u.invalid_enum_value,
|
|
2611
2611
|
options: n
|
|
2612
|
-
}),
|
|
2612
|
+
}), k;
|
|
2613
2613
|
}
|
|
2614
2614
|
return L(e.data);
|
|
2615
2615
|
}
|
|
@@ -2657,7 +2657,7 @@ class st extends S {
|
|
|
2657
2657
|
expected: E.joinValues(s),
|
|
2658
2658
|
received: n.parsedType,
|
|
2659
2659
|
code: u.invalid_type
|
|
2660
|
-
}),
|
|
2660
|
+
}), k;
|
|
2661
2661
|
}
|
|
2662
2662
|
if (this._cache || (this._cache = new Set(E.getValidEnumValues(this._def.values))), !this._cache.has(e.data)) {
|
|
2663
2663
|
const s = E.objectValues(r);
|
|
@@ -2665,7 +2665,7 @@ class st extends S {
|
|
|
2665
2665
|
received: n.data,
|
|
2666
2666
|
code: u.invalid_enum_value,
|
|
2667
2667
|
options: s
|
|
2668
|
-
}),
|
|
2668
|
+
}), k;
|
|
2669
2669
|
}
|
|
2670
2670
|
return L(e.data);
|
|
2671
2671
|
}
|
|
@@ -2675,7 +2675,7 @@ class st extends S {
|
|
|
2675
2675
|
}
|
|
2676
2676
|
st.create = (t, e) => new st({
|
|
2677
2677
|
values: t,
|
|
2678
|
-
typeName:
|
|
2678
|
+
typeName: w.ZodNativeEnum,
|
|
2679
2679
|
...T(e)
|
|
2680
2680
|
});
|
|
2681
2681
|
class ge extends S {
|
|
@@ -2689,7 +2689,7 @@ class ge extends S {
|
|
|
2689
2689
|
code: u.invalid_type,
|
|
2690
2690
|
expected: g.promise,
|
|
2691
2691
|
received: r.parsedType
|
|
2692
|
-
}),
|
|
2692
|
+
}), k;
|
|
2693
2693
|
const n = r.parsedType === g.promise ? r.data : Promise.resolve(r.data);
|
|
2694
2694
|
return L(n.then((s) => this._def.type.parseAsync(s, {
|
|
2695
2695
|
path: r.path,
|
|
@@ -2699,15 +2699,15 @@ class ge extends S {
|
|
|
2699
2699
|
}
|
|
2700
2700
|
ge.create = (t, e) => new ge({
|
|
2701
2701
|
type: t,
|
|
2702
|
-
typeName:
|
|
2702
|
+
typeName: w.ZodPromise,
|
|
2703
2703
|
...T(e)
|
|
2704
2704
|
});
|
|
2705
|
-
class
|
|
2705
|
+
class K extends S {
|
|
2706
2706
|
innerType() {
|
|
2707
2707
|
return this._def.schema;
|
|
2708
2708
|
}
|
|
2709
2709
|
sourceType() {
|
|
2710
|
-
return this._def.schema._def.typeName ===
|
|
2710
|
+
return this._def.schema._def.typeName === w.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
2711
2711
|
}
|
|
2712
2712
|
_parse(e) {
|
|
2713
2713
|
const { status: r, ctx: n } = this._processInputParams(e), s = this._def.effect || null, i = {
|
|
@@ -2723,23 +2723,23 @@ class Y extends S {
|
|
|
2723
2723
|
if (n.common.async)
|
|
2724
2724
|
return Promise.resolve(c).then(async (a) => {
|
|
2725
2725
|
if (r.value === "aborted")
|
|
2726
|
-
return
|
|
2726
|
+
return k;
|
|
2727
2727
|
const h = await this._def.schema._parseAsync({
|
|
2728
2728
|
data: a,
|
|
2729
2729
|
path: n.path,
|
|
2730
2730
|
parent: n
|
|
2731
2731
|
});
|
|
2732
|
-
return h.status === "aborted" ?
|
|
2732
|
+
return h.status === "aborted" ? k : h.status === "dirty" || r.value === "dirty" ? ve(h.value) : h;
|
|
2733
2733
|
});
|
|
2734
2734
|
{
|
|
2735
2735
|
if (r.value === "aborted")
|
|
2736
|
-
return
|
|
2736
|
+
return k;
|
|
2737
2737
|
const a = this._def.schema._parseSync({
|
|
2738
2738
|
data: c,
|
|
2739
2739
|
path: n.path,
|
|
2740
2740
|
parent: n
|
|
2741
2741
|
});
|
|
2742
|
-
return a.status === "aborted" ?
|
|
2742
|
+
return a.status === "aborted" ? k : a.status === "dirty" || r.value === "dirty" ? ve(a.value) : a;
|
|
2743
2743
|
}
|
|
2744
2744
|
}
|
|
2745
2745
|
if (s.type === "refinement") {
|
|
@@ -2757,9 +2757,9 @@ class Y extends S {
|
|
|
2757
2757
|
path: n.path,
|
|
2758
2758
|
parent: n
|
|
2759
2759
|
});
|
|
2760
|
-
return a.status === "aborted" ?
|
|
2760
|
+
return a.status === "aborted" ? k : (a.status === "dirty" && r.dirty(), c(a.value), { status: r.value, value: a.value });
|
|
2761
2761
|
} else
|
|
2762
|
-
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((a) => a.status === "aborted" ?
|
|
2762
|
+
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((a) => a.status === "aborted" ? k : (a.status === "dirty" && r.dirty(), c(a.value).then(() => ({ status: r.value, value: a.value }))));
|
|
2763
2763
|
}
|
|
2764
2764
|
if (s.type === "transform")
|
|
2765
2765
|
if (n.common.async === !1) {
|
|
@@ -2769,7 +2769,7 @@ class Y extends S {
|
|
|
2769
2769
|
parent: n
|
|
2770
2770
|
});
|
|
2771
2771
|
if (!pe(c))
|
|
2772
|
-
return
|
|
2772
|
+
return k;
|
|
2773
2773
|
const a = s.transform(c.value, i);
|
|
2774
2774
|
if (a instanceof Promise)
|
|
2775
2775
|
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
@@ -2778,20 +2778,20 @@ class Y extends S {
|
|
|
2778
2778
|
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((c) => pe(c) ? Promise.resolve(s.transform(c.value, i)).then((a) => ({
|
|
2779
2779
|
status: r.value,
|
|
2780
2780
|
value: a
|
|
2781
|
-
})) :
|
|
2781
|
+
})) : k);
|
|
2782
2782
|
E.assertNever(s);
|
|
2783
2783
|
}
|
|
2784
2784
|
}
|
|
2785
|
-
|
|
2785
|
+
K.create = (t, e, r) => new K({
|
|
2786
2786
|
schema: t,
|
|
2787
|
-
typeName:
|
|
2787
|
+
typeName: w.ZodEffects,
|
|
2788
2788
|
effect: e,
|
|
2789
2789
|
...T(r)
|
|
2790
2790
|
});
|
|
2791
|
-
|
|
2791
|
+
K.createWithPreprocess = (t, e, r) => new K({
|
|
2792
2792
|
schema: e,
|
|
2793
2793
|
effect: { type: "preprocess", transform: t },
|
|
2794
|
-
typeName:
|
|
2794
|
+
typeName: w.ZodEffects,
|
|
2795
2795
|
...T(r)
|
|
2796
2796
|
});
|
|
2797
2797
|
class V extends S {
|
|
@@ -2804,7 +2804,7 @@ class V extends S {
|
|
|
2804
2804
|
}
|
|
2805
2805
|
V.create = (t, e) => new V({
|
|
2806
2806
|
innerType: t,
|
|
2807
|
-
typeName:
|
|
2807
|
+
typeName: w.ZodOptional,
|
|
2808
2808
|
...T(e)
|
|
2809
2809
|
});
|
|
2810
2810
|
class se extends S {
|
|
@@ -2817,7 +2817,7 @@ class se extends S {
|
|
|
2817
2817
|
}
|
|
2818
2818
|
se.create = (t, e) => new se({
|
|
2819
2819
|
innerType: t,
|
|
2820
|
-
typeName:
|
|
2820
|
+
typeName: w.ZodNullable,
|
|
2821
2821
|
...T(e)
|
|
2822
2822
|
});
|
|
2823
2823
|
class Ne extends S {
|
|
@@ -2836,7 +2836,7 @@ class Ne extends S {
|
|
|
2836
2836
|
}
|
|
2837
2837
|
Ne.create = (t, e) => new Ne({
|
|
2838
2838
|
innerType: t,
|
|
2839
|
-
typeName:
|
|
2839
|
+
typeName: w.ZodDefault,
|
|
2840
2840
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
2841
2841
|
...T(e)
|
|
2842
2842
|
});
|
|
@@ -2879,7 +2879,7 @@ class Me extends S {
|
|
|
2879
2879
|
}
|
|
2880
2880
|
Me.create = (t, e) => new Me({
|
|
2881
2881
|
innerType: t,
|
|
2882
|
-
typeName:
|
|
2882
|
+
typeName: w.ZodCatch,
|
|
2883
2883
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
2884
2884
|
...T(e)
|
|
2885
2885
|
});
|
|
@@ -2891,13 +2891,13 @@ class it extends S {
|
|
|
2891
2891
|
code: u.invalid_type,
|
|
2892
2892
|
expected: g.nan,
|
|
2893
2893
|
received: n.parsedType
|
|
2894
|
-
}),
|
|
2894
|
+
}), k;
|
|
2895
2895
|
}
|
|
2896
2896
|
return { status: "valid", value: e.data };
|
|
2897
2897
|
}
|
|
2898
2898
|
}
|
|
2899
2899
|
it.create = (t) => new it({
|
|
2900
|
-
typeName:
|
|
2900
|
+
typeName: w.ZodNaN,
|
|
2901
2901
|
...T(t)
|
|
2902
2902
|
});
|
|
2903
2903
|
class ut extends S {
|
|
@@ -2923,7 +2923,7 @@ class qe extends S {
|
|
|
2923
2923
|
path: n.path,
|
|
2924
2924
|
parent: n
|
|
2925
2925
|
});
|
|
2926
|
-
return i.status === "aborted" ?
|
|
2926
|
+
return i.status === "aborted" ? k : i.status === "dirty" ? (r.dirty(), ve(i.value)) : this._def.out._parseAsync({
|
|
2927
2927
|
data: i.value,
|
|
2928
2928
|
path: n.path,
|
|
2929
2929
|
parent: n
|
|
@@ -2935,7 +2935,7 @@ class qe extends S {
|
|
|
2935
2935
|
path: n.path,
|
|
2936
2936
|
parent: n
|
|
2937
2937
|
});
|
|
2938
|
-
return s.status === "aborted" ?
|
|
2938
|
+
return s.status === "aborted" ? k : s.status === "dirty" ? (r.dirty(), {
|
|
2939
2939
|
status: "dirty",
|
|
2940
2940
|
value: s.value
|
|
2941
2941
|
}) : this._def.out._parseSync({
|
|
@@ -2949,7 +2949,7 @@ class qe extends S {
|
|
|
2949
2949
|
return new qe({
|
|
2950
2950
|
in: e,
|
|
2951
2951
|
out: r,
|
|
2952
|
-
typeName:
|
|
2952
|
+
typeName: w.ZodPipeline
|
|
2953
2953
|
});
|
|
2954
2954
|
}
|
|
2955
2955
|
}
|
|
@@ -2964,14 +2964,14 @@ class Pe extends S {
|
|
|
2964
2964
|
}
|
|
2965
2965
|
Pe.create = (t, e) => new Pe({
|
|
2966
2966
|
innerType: t,
|
|
2967
|
-
typeName:
|
|
2967
|
+
typeName: w.ZodReadonly,
|
|
2968
2968
|
...T(e)
|
|
2969
2969
|
});
|
|
2970
|
-
var
|
|
2970
|
+
var w;
|
|
2971
2971
|
(function(t) {
|
|
2972
2972
|
t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
|
|
2973
|
-
})(
|
|
2974
|
-
const o = B.create, f = oe.create,
|
|
2973
|
+
})(w || (w = {}));
|
|
2974
|
+
const o = B.create, f = oe.create, G = ce.create, v = Ze.create, Lt = Ie.create, _ = ae.create;
|
|
2975
2975
|
re.create;
|
|
2976
2976
|
const I = W.create, l = A.create, x = Ee.create, jr = ze.create;
|
|
2977
2977
|
Re.create;
|
|
@@ -2979,7 +2979,7 @@ const Dr = q.create, b = Ae.create, Zr = Ce.create, Te = Oe.create, $e = ne.crea
|
|
|
2979
2979
|
ge.create;
|
|
2980
2980
|
V.create;
|
|
2981
2981
|
se.create;
|
|
2982
|
-
const Q =
|
|
2982
|
+
const Q = K.createWithPreprocess;
|
|
2983
2983
|
function M(t, e = 0, r = 2) {
|
|
2984
2984
|
if (e > r) return "...";
|
|
2985
2985
|
if (t instanceof A) {
|
|
@@ -3010,7 +3010,7 @@ function M(t, e = 0, r = 2) {
|
|
|
3010
3010
|
);
|
|
3011
3011
|
return n === "unknown" || n === "any" ? "{ [key: string]: unknown }" : `{ [key: string]: ${n} }`;
|
|
3012
3012
|
}
|
|
3013
|
-
return t instanceof V ? `${M(t.unwrap(), e, r)}?` : t instanceof Oe ? JSON.stringify(t.value) : t instanceof ne ? t.options.map((n) => `"${n}"`).join(" | ") : t instanceof et ? "any" : t instanceof ae ? "unknown" : t instanceof tt ? "void" : t instanceof We ? "undefined" : t instanceof
|
|
3013
|
+
return t instanceof V ? `${M(t.unwrap(), e, r)}?` : t instanceof Oe ? JSON.stringify(t.value) : t instanceof ne ? t.options.map((n) => `"${n}"`).join(" | ") : t instanceof et ? "any" : t instanceof ae ? "unknown" : t instanceof tt ? "void" : t instanceof We ? "undefined" : t instanceof K ? M(t.innerType(), e, r) : t instanceof Ne ? M(t.removeDefault(), e, r) : t instanceof se ? `${M(t.unwrap(), e, r)} | null` : t instanceof Ce ? "lazy" : t instanceof ge ? `Promise<${M(t.unwrap(), e + 1, r)}>` : t instanceof we ? "function" : t instanceof Se ? "Date" : t instanceof nt ? "Map" : t instanceof me ? "Set" : t instanceof Re ? `${M(t._def.left, e, r)} & ${M(t._def.right, e, r)}` : t instanceof ze ? t.options.map((n) => M(n, e, r)).join(" or ") : t instanceof ut ? M(t.unwrap(), e, r) : t instanceof it ? "NaN" : t instanceof Me ? M(t.removeCatch(), e, r) : t instanceof qe ? M(t._def.in, e, r) : t instanceof Pe ? `readonly ${M(t.unwrap(), e, r)}` : "unknown";
|
|
3014
3014
|
}
|
|
3015
3015
|
function Wr(t) {
|
|
3016
3016
|
return t === null ? "null" : t === void 0 ? "undefined" : Array.isArray(t) ? "array" : typeof t;
|
|
@@ -3059,7 +3059,7 @@ function Yr(t) {
|
|
|
3059
3059
|
for (const e of t)
|
|
3060
3060
|
Br(e.action, Jr(e.action, e.owner));
|
|
3061
3061
|
}
|
|
3062
|
-
const D = () => x([
|
|
3062
|
+
const D = () => x([G(), f().finite()]).transform((t) => BigInt(t));
|
|
3063
3063
|
l({
|
|
3064
3064
|
key: o().describe("Storage key to retrieve")
|
|
3065
3065
|
});
|
|
@@ -3103,7 +3103,7 @@ l({
|
|
|
3103
3103
|
headers: b(o()).default({}).describe("Request headers as key-value pairs"),
|
|
3104
3104
|
body: o().nullable().default(null).describe("Request body string"),
|
|
3105
3105
|
timeout: D().default(30000n).describe("Timeout in milliseconds"),
|
|
3106
|
-
store:
|
|
3106
|
+
store: v().optional().describe(
|
|
3107
3107
|
"When true, store binary responses as a handle instead of returning body bytes"
|
|
3108
3108
|
),
|
|
3109
3109
|
options: l({}).passthrough().optional().describe("Fetch options")
|
|
@@ -3111,7 +3111,7 @@ l({
|
|
|
3111
3111
|
l({
|
|
3112
3112
|
duration: D().describe("Duration to sleep in milliseconds")
|
|
3113
3113
|
});
|
|
3114
|
-
const
|
|
3114
|
+
const H = () => o().regex(/^(?:f\d+_)?e\d+$/), en = 'use { refId: "e2" } or { label: "..." } object form, not positional arguments', ft = (t, e) => {
|
|
3115
3115
|
if (t.__invalidPositional !== void 0) {
|
|
3116
3116
|
e.addIssue({
|
|
3117
3117
|
code: u.custom,
|
|
@@ -3129,18 +3129,18 @@ const K = () => o().regex(/^(?:f\d+_)?e\d+$/), en = 'use { refId: "e2" } or { la
|
|
|
3129
3129
|
(e) => typeof e == "string" || typeof e == "number" ? { __invalidPositional: e } : e,
|
|
3130
3130
|
l({
|
|
3131
3131
|
__invalidPositional: x([o(), f()]).optional().describe("Internal flag for positional argument rejection"),
|
|
3132
|
-
refId:
|
|
3132
|
+
refId: H().optional().describe("Element reference ID (e.g. e2)"),
|
|
3133
3133
|
label: o().optional().describe("Human-readable element label"),
|
|
3134
3134
|
...t
|
|
3135
3135
|
}).superRefine(ft)
|
|
3136
3136
|
), be = {
|
|
3137
|
-
tabId: x([f(),
|
|
3137
|
+
tabId: x([f(), G()]).optional().describe("Target tab ID")
|
|
3138
3138
|
}, F = (t) => Q(
|
|
3139
3139
|
(e) => typeof e == "string" || typeof e == "number" ? { __invalidPositional: e } : e,
|
|
3140
3140
|
l({
|
|
3141
3141
|
__invalidPositional: x([o(), f()]).optional().describe("Internal flag for positional argument rejection"),
|
|
3142
3142
|
...be,
|
|
3143
|
-
refId:
|
|
3143
|
+
refId: H().optional().describe("Element reference ID (e.g. e2)"),
|
|
3144
3144
|
label: o().optional().describe("Human-readable element label"),
|
|
3145
3145
|
...t
|
|
3146
3146
|
}).superRefine(ft)
|
|
@@ -3204,7 +3204,7 @@ O({
|
|
|
3204
3204
|
text: o().describe("Text to append into the element")
|
|
3205
3205
|
});
|
|
3206
3206
|
l({
|
|
3207
|
-
refId:
|
|
3207
|
+
refId: H().optional().describe(
|
|
3208
3208
|
"Element reference ID to dispatch the key on (e.g. e2). Omit to dispatch on document."
|
|
3209
3209
|
),
|
|
3210
3210
|
label: o().optional().describe("Human-readable element label. Omit to dispatch on document."),
|
|
@@ -3224,7 +3224,7 @@ O({
|
|
|
3224
3224
|
)
|
|
3225
3225
|
});
|
|
3226
3226
|
O({
|
|
3227
|
-
checked:
|
|
3227
|
+
checked: v().optional().describe("Desired checked state (true to check, false to uncheck)")
|
|
3228
3228
|
});
|
|
3229
3229
|
l({
|
|
3230
3230
|
name: o().min(1).describe("The `name` attribute of the radio group to pick from"),
|
|
@@ -3241,7 +3241,7 @@ Q(
|
|
|
3241
3241
|
(t) => typeof t == "string" || typeof t == "number" ? { __invalidPositional: t } : t,
|
|
3242
3242
|
l({
|
|
3243
3243
|
__invalidPositional: x([o(), f()]).optional().describe("Internal flag for positional argument rejection"),
|
|
3244
|
-
refId:
|
|
3244
|
+
refId: H().optional().describe("Element reference ID (e.g. e2)"),
|
|
3245
3245
|
label: o().optional().describe("Human-readable element label"),
|
|
3246
3246
|
x: f().optional().describe("X coordinate to scroll to"),
|
|
3247
3247
|
y: f().optional().describe("Y coordinate to scroll to")
|
|
@@ -3254,7 +3254,7 @@ l({
|
|
|
3254
3254
|
l({
|
|
3255
3255
|
selector: o().describe("CSS selector for the root element(s) to introspect"),
|
|
3256
3256
|
depth: f().int().min(0).max(10).default(2).describe("How many descendant levels to include (0 = root only)"),
|
|
3257
|
-
includeHidden:
|
|
3257
|
+
includeHidden: v().default(!0).describe(
|
|
3258
3258
|
"Include elements hidden by CSS/aria (default true — this tool's purpose is to see what the curated snapshot filters out)"
|
|
3259
3259
|
)
|
|
3260
3260
|
});
|
|
@@ -3276,15 +3276,15 @@ x([
|
|
|
3276
3276
|
]);
|
|
3277
3277
|
l({});
|
|
3278
3278
|
l({
|
|
3279
|
-
active:
|
|
3280
|
-
currentWindow:
|
|
3279
|
+
active: v().optional().describe("Whether the tabs are active"),
|
|
3280
|
+
currentWindow: v().optional().describe("Whether the tabs are in the current window"),
|
|
3281
3281
|
url: o().optional().describe("URL pattern to match tabs against")
|
|
3282
3282
|
}).passthrough();
|
|
3283
3283
|
Q(
|
|
3284
3284
|
(t) => typeof t == "string" ? { url: t } : t,
|
|
3285
3285
|
l({
|
|
3286
3286
|
url: o().optional().describe("URL to open in the new tab"),
|
|
3287
|
-
active:
|
|
3287
|
+
active: v().optional().describe("Whether to focus the new tab")
|
|
3288
3288
|
})
|
|
3289
3289
|
);
|
|
3290
3290
|
x([
|
|
@@ -3317,7 +3317,7 @@ Q(
|
|
|
3317
3317
|
l({
|
|
3318
3318
|
__invalidPositional: x([o(), f()]).optional().describe("Internal flag for positional argument rejection"),
|
|
3319
3319
|
...be,
|
|
3320
|
-
refId:
|
|
3320
|
+
refId: H().optional().describe("Element reference ID (e.g. e2)"),
|
|
3321
3321
|
label: o().optional().describe("Human-readable element label"),
|
|
3322
3322
|
x: f().optional().describe("X coordinate to scroll to"),
|
|
3323
3323
|
y: f().optional().describe("Y coordinate to scroll to")
|
|
@@ -3339,7 +3339,7 @@ F({
|
|
|
3339
3339
|
)
|
|
3340
3340
|
});
|
|
3341
3341
|
F({
|
|
3342
|
-
checked:
|
|
3342
|
+
checked: v().optional().describe("Desired checked state (true to check, false to uncheck)")
|
|
3343
3343
|
});
|
|
3344
3344
|
F();
|
|
3345
3345
|
F();
|
|
@@ -3358,38 +3358,38 @@ l({
|
|
|
3358
3358
|
});
|
|
3359
3359
|
F();
|
|
3360
3360
|
l({
|
|
3361
|
-
tabId: x([f(),
|
|
3361
|
+
tabId: x([f(), G()]).optional().describe("Target tab ID"),
|
|
3362
3362
|
script: o().optional().describe("Script to evaluate"),
|
|
3363
3363
|
code: o().optional().describe("Alternative script code"),
|
|
3364
3364
|
js: o().optional().describe("Alternative JS code")
|
|
3365
3365
|
}).passthrough();
|
|
3366
3366
|
l({
|
|
3367
|
-
tabId: x([f(),
|
|
3367
|
+
tabId: x([f(), G()]).optional().describe("Target tab ID")
|
|
3368
3368
|
}).passthrough();
|
|
3369
3369
|
l({
|
|
3370
|
-
tabId: x([f(),
|
|
3370
|
+
tabId: x([f(), G()]).optional().describe("Target tab ID")
|
|
3371
3371
|
}).passthrough();
|
|
3372
3372
|
l({
|
|
3373
|
-
tabId: x([f(),
|
|
3373
|
+
tabId: x([f(), G()]).optional().describe("Target tab ID"),
|
|
3374
3374
|
timeout: f().optional().describe("Timeout in milliseconds")
|
|
3375
3375
|
}).passthrough();
|
|
3376
3376
|
l({
|
|
3377
|
-
tabId: x([f(),
|
|
3377
|
+
tabId: x([f(), G()]).optional().describe("Target tab ID"),
|
|
3378
3378
|
url: o().optional().describe("URL to fetch"),
|
|
3379
3379
|
options: l({}).passthrough().optional().describe("Fetch options")
|
|
3380
3380
|
}).passthrough();
|
|
3381
3381
|
l({
|
|
3382
|
-
tabId: x([f(),
|
|
3382
|
+
tabId: x([f(), G()]).optional().describe("Target tab ID"),
|
|
3383
3383
|
max_nodes: f().optional().describe("Maximum nodes to include"),
|
|
3384
3384
|
options: l({}).passthrough().optional().describe("Snapshot options")
|
|
3385
3385
|
}).passthrough();
|
|
3386
3386
|
l({
|
|
3387
|
-
tabId: x([f(),
|
|
3387
|
+
tabId: x([f(), G()]).optional().describe("Target tab ID"),
|
|
3388
3388
|
max_nodes: f().optional().describe("Maximum nodes to include"),
|
|
3389
3389
|
options: l({}).passthrough().optional().describe("Snapshot options")
|
|
3390
3390
|
}).passthrough();
|
|
3391
3391
|
l({
|
|
3392
|
-
tabId: x([f(),
|
|
3392
|
+
tabId: x([f(), G()]).optional().describe("Target tab ID"),
|
|
3393
3393
|
max_nodes: f().optional().describe("Maximum nodes to include"),
|
|
3394
3394
|
options: l({}).passthrough().optional().describe("Snapshot options")
|
|
3395
3395
|
}).passthrough();
|
|
@@ -3408,7 +3408,7 @@ O({
|
|
|
3408
3408
|
value: o().optional().describe("Value to select in the dropdown")
|
|
3409
3409
|
});
|
|
3410
3410
|
O({
|
|
3411
|
-
checked:
|
|
3411
|
+
checked: v().optional().describe("Desired checked state (true to check, false to uncheck)")
|
|
3412
3412
|
});
|
|
3413
3413
|
O();
|
|
3414
3414
|
l({});
|
|
@@ -3426,19 +3426,19 @@ l({
|
|
|
3426
3426
|
duration: D().default(1000n).describe("Duration to wait in milliseconds")
|
|
3427
3427
|
});
|
|
3428
3428
|
l({
|
|
3429
|
-
interactive_only:
|
|
3429
|
+
interactive_only: v().default(!1).describe("Only include interactive elements"),
|
|
3430
3430
|
max_nodes: D().default(500n).describe("Maximum number of nodes to include in snapshot")
|
|
3431
3431
|
});
|
|
3432
3432
|
l({
|
|
3433
|
-
interactive_only:
|
|
3433
|
+
interactive_only: v().default(!1).describe("Only include interactive elements"),
|
|
3434
3434
|
max_nodes: D().default(500n).describe("Maximum number of nodes to include in snapshot")
|
|
3435
3435
|
});
|
|
3436
3436
|
l({
|
|
3437
|
-
interactive_only:
|
|
3437
|
+
interactive_only: v().default(!1).describe("Only include interactive elements"),
|
|
3438
3438
|
max_nodes: D().default(500n).describe("Maximum number of nodes to include in snapshot")
|
|
3439
3439
|
});
|
|
3440
3440
|
l({
|
|
3441
|
-
interactive_only:
|
|
3441
|
+
interactive_only: v().default(!1).describe("Only include interactive elements"),
|
|
3442
3442
|
max_nodes: D().default(500n).describe("Maximum number of nodes to include in snapshot")
|
|
3443
3443
|
});
|
|
3444
3444
|
l({
|
|
@@ -3462,7 +3462,7 @@ const an = l({
|
|
|
3462
3462
|
tag: x([o(), I(o())]).optional().describe("Filter by HTML tag"),
|
|
3463
3463
|
text: o().optional().describe("Filter by text content (case-insensitive substring)"),
|
|
3464
3464
|
name: o().optional().describe("Filter by accessible name (case-insensitive substring)"),
|
|
3465
|
-
interactiveOnly:
|
|
3465
|
+
interactiveOnly: v().optional().describe("Only include interactive elements"),
|
|
3466
3466
|
href: o().optional().describe("Filter by href pattern (case-insensitive substring)"),
|
|
3467
3467
|
src: o().optional().describe("Filter by src pattern (case-insensitive substring)"),
|
|
3468
3468
|
limit: f().positive().optional().describe("Maximum filtered nodes to return")
|
|
@@ -3612,7 +3612,7 @@ l({
|
|
|
3612
3612
|
x([
|
|
3613
3613
|
o(),
|
|
3614
3614
|
f(),
|
|
3615
|
-
|
|
3615
|
+
v(),
|
|
3616
3616
|
Lt(),
|
|
3617
3617
|
I(_()),
|
|
3618
3618
|
b(_())
|
|
@@ -3620,17 +3620,33 @@ x([
|
|
|
3620
3620
|
const un = l({
|
|
3621
3621
|
ok: Te(!0).describe("Whether the action succeeded"),
|
|
3622
3622
|
action: o().describe("Action identifier (e.g. 'page_fill')"),
|
|
3623
|
-
refId:
|
|
3623
|
+
refId: H().optional().describe("Element reference ID that was acted upon (e.g. e2)"),
|
|
3624
3624
|
tag: o().optional().describe("HTML tag name of the element"),
|
|
3625
3625
|
role: o().optional().describe("ARIA role of the element"),
|
|
3626
3626
|
name: o().optional().describe("Accessible name of the element"),
|
|
3627
3627
|
value: x([o(), I(o())]).optional().describe(
|
|
3628
3628
|
"Final value of the element after the action (string, or string[] for multi-select)"
|
|
3629
3629
|
),
|
|
3630
|
-
checked:
|
|
3631
|
-
disabled:
|
|
3632
|
-
readOnly:
|
|
3630
|
+
checked: v().optional().describe("Checked state after the action"),
|
|
3631
|
+
disabled: v().optional().describe("Whether the element is disabled"),
|
|
3632
|
+
readOnly: v().optional().describe("Whether the element is read-only"),
|
|
3633
|
+
required: v().optional().describe("Whether the element is required"),
|
|
3634
|
+
valid: v().optional().describe("HTML constraint validity after the action, when available"),
|
|
3635
|
+
invalid: v().optional().describe("Inverse validity / aria-invalid state after the action"),
|
|
3636
|
+
validationMessage: o().optional().describe("Browser validation message when the element is invalid"),
|
|
3637
|
+
invalidControls: I(
|
|
3638
|
+
l({
|
|
3639
|
+
refId: H().optional(),
|
|
3640
|
+
tag: o(),
|
|
3641
|
+
role: o().optional(),
|
|
3642
|
+
name: o().optional(),
|
|
3643
|
+
value: o().optional(),
|
|
3644
|
+
required: v().optional(),
|
|
3645
|
+
validationMessage: o().optional()
|
|
3646
|
+
})
|
|
3647
|
+
).optional().describe("Invalid form controls after submit, when available"),
|
|
3633
3648
|
text: o().optional().describe("Text content of the element"),
|
|
3649
|
+
selectedText: o().optional().describe("Visible option text selected by select_option"),
|
|
3634
3650
|
key: o().optional().describe("Key that was pressed (for press actions)"),
|
|
3635
3651
|
direction: o().optional().describe("Scroll direction (for scroll actions)"),
|
|
3636
3652
|
amount: f().optional().describe("Scroll amount in pixels (for scroll actions)"),
|
|
@@ -3649,7 +3665,7 @@ const un = l({
|
|
|
3649
3665
|
x([un, Lt()]);
|
|
3650
3666
|
l({
|
|
3651
3667
|
status: f().describe("HTTP response status code"),
|
|
3652
|
-
ok:
|
|
3668
|
+
ok: v().describe("Whether the response status is 2xx"),
|
|
3653
3669
|
headers: b(o()).describe("Response headers as key-value pairs"),
|
|
3654
3670
|
body: o().optional().describe("Response body (omitted when bodyEncoding is handle)"),
|
|
3655
3671
|
bodyEncoding: $e(["text", "base64", "handle"]).describe("Encoding of the body field"),
|
|
@@ -3669,26 +3685,26 @@ l({
|
|
|
3669
3685
|
title: o(),
|
|
3670
3686
|
contentScript: $e(["connected", "missing"]),
|
|
3671
3687
|
domApis: $e(["ok", "blocked"]),
|
|
3672
|
-
mutationsReady:
|
|
3688
|
+
mutationsReady: v(),
|
|
3673
3689
|
hint: o().optional(),
|
|
3674
3690
|
recovery: I(o()).optional()
|
|
3675
3691
|
});
|
|
3676
3692
|
const fn = l({
|
|
3677
|
-
refId:
|
|
3693
|
+
refId: H().describe("Element reference ID (e.g. e2)"),
|
|
3678
3694
|
role: o().describe("ARIA role of the element"),
|
|
3679
3695
|
tag: o().describe("HTML tag name"),
|
|
3680
3696
|
name: o().optional().describe("Accessible name of the element"),
|
|
3681
3697
|
text: o().optional().describe("Visible text content of the element"),
|
|
3682
3698
|
value: o().optional().describe("Element value"),
|
|
3683
|
-
checked:
|
|
3684
|
-
disabled:
|
|
3685
|
-
readOnly:
|
|
3686
|
-
selected:
|
|
3699
|
+
checked: v().optional().describe("Checked state"),
|
|
3700
|
+
disabled: v().optional().describe("Whether the element is disabled"),
|
|
3701
|
+
readOnly: v().optional().describe("Whether the element is read-only"),
|
|
3702
|
+
selected: v().optional().describe("For <option>: selected state"),
|
|
3687
3703
|
href: o().optional().describe("Absolute URL for link elements"),
|
|
3688
3704
|
src: o().optional().describe("Absolute URL for image elements"),
|
|
3689
3705
|
alt: o().optional().describe("Alternative text for image elements"),
|
|
3690
3706
|
title: o().optional().describe("Title attribute"),
|
|
3691
|
-
parentRefId:
|
|
3707
|
+
parentRefId: H().optional().describe("Reference ID of the parent container element"),
|
|
3692
3708
|
postId: o().optional().describe("Stable post identifier from data-post-id attribute"),
|
|
3693
3709
|
permalink: o().optional().describe("Stable permalink URL from anchor element"),
|
|
3694
3710
|
imageUrls: I(o()).optional().describe("Image URLs contained within this element")
|
|
@@ -3707,13 +3723,13 @@ l({
|
|
|
3707
3723
|
)
|
|
3708
3724
|
});
|
|
3709
3725
|
const Vt = l({
|
|
3710
|
-
refId:
|
|
3726
|
+
refId: H().optional(),
|
|
3711
3727
|
tag: o(),
|
|
3712
3728
|
role: o().optional(),
|
|
3713
3729
|
name: o().optional(),
|
|
3714
3730
|
text: o().optional(),
|
|
3715
3731
|
attributes: b(o()).optional().describe("All HTML attributes (raw)"),
|
|
3716
|
-
hidden:
|
|
3732
|
+
hidden: v().optional(),
|
|
3717
3733
|
hiddenReason: $e([
|
|
3718
3734
|
"display-none",
|
|
3719
3735
|
"visibility-hidden",
|
|
@@ -3723,10 +3739,10 @@ const Vt = l({
|
|
|
3723
3739
|
"inert"
|
|
3724
3740
|
]).optional(),
|
|
3725
3741
|
value: o().optional(),
|
|
3726
|
-
checked:
|
|
3727
|
-
disabled:
|
|
3728
|
-
readOnly:
|
|
3729
|
-
selected:
|
|
3742
|
+
checked: v().optional(),
|
|
3743
|
+
disabled: v().optional(),
|
|
3744
|
+
readOnly: v().optional(),
|
|
3745
|
+
selected: v().optional().describe("For <option>: selected state"),
|
|
3730
3746
|
href: o().optional(),
|
|
3731
3747
|
src: o().optional(),
|
|
3732
3748
|
alt: o().optional(),
|
|
@@ -3747,22 +3763,22 @@ const Ft = l({
|
|
|
3747
3763
|
url: o().optional().describe("Tab URL"),
|
|
3748
3764
|
title: o().optional().describe("Tab title"),
|
|
3749
3765
|
status: o().optional().describe("Tab status (loading or complete)"),
|
|
3750
|
-
active:
|
|
3751
|
-
pinned:
|
|
3752
|
-
highlighted:
|
|
3753
|
-
incognito:
|
|
3766
|
+
active: v().optional().describe("Whether the tab is active"),
|
|
3767
|
+
pinned: v().optional().describe("Whether the tab is pinned"),
|
|
3768
|
+
highlighted: v().optional().describe("Whether the tab is highlighted"),
|
|
3769
|
+
incognito: v().optional().describe("Whether the tab is incognito"),
|
|
3754
3770
|
favIconUrl: o().optional().describe("Favicon URL"),
|
|
3755
|
-
audible:
|
|
3771
|
+
audible: v().optional().describe("Whether the tab is audible"),
|
|
3756
3772
|
groupId: f().optional().describe("Group ID"),
|
|
3757
3773
|
openerTabId: f().optional().describe("Opener tab ID"),
|
|
3758
|
-
discarded:
|
|
3759
|
-
autoDiscardable:
|
|
3774
|
+
discarded: v().optional().describe("Whether the tab is discarded"),
|
|
3775
|
+
autoDiscardable: v().optional().describe("Whether the tab is auto-discardable"),
|
|
3760
3776
|
width: f().optional().describe("Tab width"),
|
|
3761
3777
|
height: f().optional().describe("Tab height"),
|
|
3762
3778
|
sessionId: o().optional().describe("Session ID")
|
|
3763
3779
|
}).passthrough(), hn = I(Ft), Ut = l({
|
|
3764
3780
|
id: f().optional().describe("Window ID"),
|
|
3765
|
-
focused:
|
|
3781
|
+
focused: v().optional().describe("Whether the window is focused"),
|
|
3766
3782
|
top: f().optional().describe("Window top position"),
|
|
3767
3783
|
left: f().optional().describe("Window left position"),
|
|
3768
3784
|
width: f().optional().describe("Window width"),
|
|
@@ -3770,10 +3786,10 @@ const Ft = l({
|
|
|
3770
3786
|
tabs: hn.optional().describe(
|
|
3771
3787
|
"Array of tabs in the window"
|
|
3772
3788
|
),
|
|
3773
|
-
incognito:
|
|
3789
|
+
incognito: v().optional().describe("Whether the window is incognito"),
|
|
3774
3790
|
type: o().optional().describe("Window type"),
|
|
3775
3791
|
state: o().optional().describe("Window state"),
|
|
3776
|
-
alwaysOnTop:
|
|
3792
|
+
alwaysOnTop: v().optional().describe("Whether the window is always on top"),
|
|
3777
3793
|
sessionId: o().optional().describe("Session ID")
|
|
3778
3794
|
}).passthrough();
|
|
3779
3795
|
I(Ut);
|
|
@@ -3781,12 +3797,12 @@ const pn = l({
|
|
|
3781
3797
|
name: o().describe("Cookie name"),
|
|
3782
3798
|
value: o().describe("Cookie value"),
|
|
3783
3799
|
domain: o().optional().describe("Cookie domain"),
|
|
3784
|
-
hostOnly:
|
|
3800
|
+
hostOnly: v().optional().describe("Whether the cookie is host-only"),
|
|
3785
3801
|
path: o().optional().describe("Cookie path"),
|
|
3786
|
-
secure:
|
|
3787
|
-
httpOnly:
|
|
3802
|
+
secure: v().optional().describe("Whether the cookie is secure"),
|
|
3803
|
+
httpOnly: v().optional().describe("Whether the cookie is HTTP-only"),
|
|
3788
3804
|
sameSite: o().optional().describe("SameSite policy"),
|
|
3789
|
-
session:
|
|
3805
|
+
session: v().optional().describe("Whether the cookie is a session cookie"),
|
|
3790
3806
|
expirationDate: f().optional().describe("Expiration date as Unix timestamp"),
|
|
3791
3807
|
storeId: o().optional().describe("Store ID")
|
|
3792
3808
|
}).nullable();
|
|
@@ -3819,12 +3835,12 @@ const yn = l({
|
|
|
3819
3835
|
});
|
|
3820
3836
|
I(yn);
|
|
3821
3837
|
o();
|
|
3822
|
-
|
|
3838
|
+
v();
|
|
3823
3839
|
x([o(), f()]);
|
|
3824
|
-
|
|
3840
|
+
v();
|
|
3825
3841
|
const bn = l({
|
|
3826
3842
|
id: f().optional().describe("Group ID"),
|
|
3827
|
-
collapsed:
|
|
3843
|
+
collapsed: v().optional().describe("Whether the group is collapsed"),
|
|
3828
3844
|
color: o().optional().describe("Group color"),
|
|
3829
3845
|
title: o().optional().describe("Group title"),
|
|
3830
3846
|
windowId: f().optional().describe("Window ID")
|
|
@@ -3847,13 +3863,13 @@ const wn = l({
|
|
|
3847
3863
|
endTime: o().optional().describe("End time"),
|
|
3848
3864
|
state: o().optional().describe("Download state"),
|
|
3849
3865
|
danger: o().optional().describe("Danger type"),
|
|
3850
|
-
paused:
|
|
3866
|
+
paused: v().optional().describe("Whether the download is paused"),
|
|
3851
3867
|
error: o().optional().describe("Error message"),
|
|
3852
3868
|
bytesReceived: f().optional().describe("Bytes received"),
|
|
3853
3869
|
totalBytes: f().optional().describe("Total bytes"),
|
|
3854
3870
|
fileSize: f().optional().describe("File size"),
|
|
3855
3871
|
mime: o().optional().describe("MIME type"),
|
|
3856
|
-
incognito:
|
|
3872
|
+
incognito: v().optional().describe("Whether the download is incognito"),
|
|
3857
3873
|
referrer: o().optional().describe("Referrer URL"),
|
|
3858
3874
|
byExtensionId: o().optional().describe("Extension ID"),
|
|
3859
3875
|
byExtensionName: o().optional().describe("Extension name")
|
|
@@ -4193,8 +4209,8 @@ function Yt(t) {
|
|
|
4193
4209
|
return new Promise((d, m) => {
|
|
4194
4210
|
var bt;
|
|
4195
4211
|
if ((bt = a == null ? void 0 : a.signal) != null && bt.aborted) {
|
|
4196
|
-
const
|
|
4197
|
-
|
|
4212
|
+
const J = new Error(`Relay aborted for action: ${r}`);
|
|
4213
|
+
J.code = "E_ABORT", m(J);
|
|
4198
4214
|
return;
|
|
4199
4215
|
}
|
|
4200
4216
|
const R = Dn(e);
|
|
@@ -4212,21 +4228,21 @@ function Yt(t) {
|
|
|
4212
4228
|
}
|
|
4213
4229
|
const P = $n();
|
|
4214
4230
|
let X = !1;
|
|
4215
|
-
const de = (
|
|
4216
|
-
X || (X = !0, clearTimeout(mt), a != null && a.signal && a.signal.removeEventListener("abort", He), fe.delete(P),
|
|
4231
|
+
const de = (J) => {
|
|
4232
|
+
X || (X = !0, clearTimeout(mt), a != null && a.signal && a.signal.removeEventListener("abort", He), fe.delete(P), J());
|
|
4217
4233
|
}, pt = () => {
|
|
4218
4234
|
Gt(P, e, R);
|
|
4219
4235
|
}, He = () => {
|
|
4220
4236
|
pt();
|
|
4221
|
-
const
|
|
4222
|
-
|
|
4237
|
+
const J = new Error(`Relay aborted for action: ${r}`);
|
|
4238
|
+
J.code = "E_ABORT", de(() => m(J));
|
|
4223
4239
|
};
|
|
4224
4240
|
a != null && a.signal && a.signal.addEventListener("abort", He);
|
|
4225
4241
|
const mt = setTimeout(() => {
|
|
4226
4242
|
pt(), de(() => m(new Error(`Relay timeout for action: ${r}`)));
|
|
4227
4243
|
}, h);
|
|
4228
4244
|
fe.set(P, {
|
|
4229
|
-
settle: (
|
|
4245
|
+
settle: (J) => de(() => d(J)),
|
|
4230
4246
|
timeoutId: mt,
|
|
4231
4247
|
abort: He,
|
|
4232
4248
|
owner: e,
|