@unocss/language-server 66.6.6 → 66.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-C9ebiww4.mjs → chunk-CBBoxR_p.mjs} +8 -14
- package/dist/{dist-Dwf-d4OE.mjs → dist-DJp734Em.mjs} +2 -4
- package/dist/{dist-BUrt6dYo.cjs → dist-FL7p7uq2.cjs} +17 -20
- package/dist/index.d.mts +8 -3
- package/dist/index.mjs +683 -719
- package/dist/jiti-du6HSta6.cjs +4474 -0
- package/dist/{loader-CxlILAbz.mjs → loader-DsXvVy9i.mjs} +4 -19
- package/dist/{multipart-parser-s9tbX9e1.cjs → multipart-parser-DiNB_U8f.cjs} +13 -15
- package/dist/{multipart-parser-D3zGHRx2.mjs → multipart-parser-KkZpcbcp.mjs} +3 -5
- package/dist/{node-B8nS8lcG.cjs → node-3wiZdXIz.cjs} +40 -42
- package/dist/{node-CautW6cw.cjs → node-BM09n__k.cjs} +969 -967
- package/dist/{node-rKyHxxpg.mjs → node-Cd2HRubI.mjs} +930 -928
- package/dist/{node-DvibxqDE.mjs → node-D23LglTq.mjs} +32 -34
- package/dist/{node-loader-BO0uvH6Z.cjs → node-loader-BJV6yUBJ.cjs} +676 -689
- package/dist/{node-loader-DpZIWCu9.mjs → node-loader-ZSa5xzQw.mjs} +440 -453
- package/dist/{prompt-BJqhZQ-_.cjs → prompt-jldWOuck.cjs} +265 -267
- package/dist/server.cjs +14417 -14572
- package/package.json +39 -6
- package/dist/jiti-B459FbZV.cjs +0 -4477
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_server = require(
|
|
1
|
+
const require_server = require("./server.cjs");
|
|
2
2
|
let node_path = require("node:path");
|
|
3
3
|
let node_url = require("node:url");
|
|
4
4
|
let node_util = require("node:util");
|
|
@@ -13,7 +13,6 @@ let node_zlib = require("node:zlib");
|
|
|
13
13
|
node_zlib = require_server.__toESM(node_zlib);
|
|
14
14
|
let node_buffer = require("node:buffer");
|
|
15
15
|
let node_net = require("node:net");
|
|
16
|
-
|
|
17
16
|
//#region ../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs
|
|
18
17
|
var t = Object.defineProperty;
|
|
19
18
|
var o = (e, l) => t(e, "name", {
|
|
@@ -25,33 +24,32 @@ function f(e) {
|
|
|
25
24
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
26
25
|
}
|
|
27
26
|
o(f, "getDefaultExportFromCjs");
|
|
28
|
-
|
|
29
27
|
//#endregion
|
|
30
28
|
//#region ../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs
|
|
31
29
|
var Os = Object.defineProperty;
|
|
32
30
|
var fi = (i) => {
|
|
33
31
|
throw TypeError(i);
|
|
34
32
|
};
|
|
35
|
-
var n = (i, o
|
|
36
|
-
value: o
|
|
33
|
+
var n = (i, o) => Os(i, "name", {
|
|
34
|
+
value: o,
|
|
37
35
|
configurable: !0
|
|
38
36
|
});
|
|
39
|
-
var ci = (i, o
|
|
40
|
-
var O = (i, o
|
|
37
|
+
var ci = (i, o, a) => o.has(i) || fi("Cannot " + a);
|
|
38
|
+
var O = (i, o, a) => (ci(i, o, "read from private field"), a ? a.call(i) : o.get(i)), be = (i, o, a) => o.has(i) ? fi("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(i) : o.set(i, a), X = (i, o, a, f) => (ci(i, o, "write to private field"), f ? f.call(i, a) : o.set(i, a), a);
|
|
41
39
|
var ve, zt, bt, Cr, ze, It, Ft, mt, ee, yt, He, Ve, gt;
|
|
42
40
|
function Us(i) {
|
|
43
41
|
if (!/^data:/i.test(i)) throw new TypeError("`uri` does not appear to be a Data URI (must begin with \"data:\")");
|
|
44
42
|
i = i.replace(/\r?\n/g, "");
|
|
45
|
-
const o
|
|
46
|
-
if (o
|
|
47
|
-
const a = i.substring(5, o
|
|
48
|
-
let f
|
|
43
|
+
const o = i.indexOf(",");
|
|
44
|
+
if (o === -1 || o <= 4) throw new TypeError("malformed data: URI");
|
|
45
|
+
const a = i.substring(5, o).split(";");
|
|
46
|
+
let f = "", l = !1;
|
|
49
47
|
const p = a[0] || "text/plain";
|
|
50
48
|
let h = p;
|
|
51
|
-
for (let A = 1; A < a.length; A++) a[A] === "base64" ? l = !0 : a[A] && (h += `;${a[A]}`, a[A].indexOf("charset=") === 0 && (f
|
|
52
|
-
!a[0] && !f
|
|
53
|
-
const S = l ? "base64" : "ascii", v = unescape(i.substring(o
|
|
54
|
-
return w.type = p, w.typeFull = h, w.charset = f
|
|
49
|
+
for (let A = 1; A < a.length; A++) a[A] === "base64" ? l = !0 : a[A] && (h += `;${a[A]}`, a[A].indexOf("charset=") === 0 && (f = a[A].substring(8)));
|
|
50
|
+
!a[0] && !f.length && (h += ";charset=US-ASCII", f = "US-ASCII");
|
|
51
|
+
const S = l ? "base64" : "ascii", v = unescape(i.substring(o + 1)), w = Buffer.from(v, S);
|
|
52
|
+
return w.type = p, w.typeFull = h, w.charset = f, w;
|
|
55
53
|
}
|
|
56
54
|
n(Us, "dataUriToBuffer");
|
|
57
55
|
var pi = {}, kt = { exports: {} };
|
|
@@ -63,21 +61,21 @@ var pi = {}, kt = { exports: {} };
|
|
|
63
61
|
* SPDX-License-Identifier: MIT
|
|
64
62
|
*/ var xs = kt.exports, bi;
|
|
65
63
|
function Ns() {
|
|
66
|
-
return bi || (bi = 1, function(i, o
|
|
67
|
-
(function(a, f
|
|
68
|
-
f
|
|
64
|
+
return bi || (bi = 1, function(i, o) {
|
|
65
|
+
(function(a, f) {
|
|
66
|
+
f(o);
|
|
69
67
|
})(xs, function(a) {
|
|
70
|
-
function f
|
|
71
|
-
n(f
|
|
68
|
+
function f() {}
|
|
69
|
+
n(f, "noop");
|
|
72
70
|
function l(e) {
|
|
73
71
|
return typeof e == "object" && e !== null || typeof e == "function";
|
|
74
72
|
}
|
|
75
73
|
n(l, "typeIsObject");
|
|
76
|
-
const p = f
|
|
77
|
-
function h(e, t
|
|
74
|
+
const p = f;
|
|
75
|
+
function h(e, t) {
|
|
78
76
|
try {
|
|
79
77
|
Object.defineProperty(e, "name", {
|
|
80
|
-
value: t
|
|
78
|
+
value: t,
|
|
81
79
|
configurable: !0
|
|
82
80
|
});
|
|
83
81
|
} catch {}
|
|
@@ -89,31 +87,31 @@ function Ns() {
|
|
|
89
87
|
}
|
|
90
88
|
n(A, "newPromise");
|
|
91
89
|
function T(e) {
|
|
92
|
-
return A((t
|
|
90
|
+
return A((t) => t(e));
|
|
93
91
|
}
|
|
94
92
|
n(T, "promiseResolvedWith");
|
|
95
93
|
function b(e) {
|
|
96
94
|
return w(e);
|
|
97
95
|
}
|
|
98
96
|
n(b, "promiseRejectedWith");
|
|
99
|
-
function q(e, t
|
|
100
|
-
return v.call(e, t
|
|
97
|
+
function q(e, t, r) {
|
|
98
|
+
return v.call(e, t, r);
|
|
101
99
|
}
|
|
102
100
|
n(q, "PerformPromiseThen");
|
|
103
|
-
function g(e, t
|
|
104
|
-
q(q(e, t
|
|
101
|
+
function g(e, t, r) {
|
|
102
|
+
q(q(e, t, r), void 0, p);
|
|
105
103
|
}
|
|
106
104
|
n(g, "uponPromise");
|
|
107
|
-
function V(e, t
|
|
108
|
-
g(e, t
|
|
105
|
+
function V(e, t) {
|
|
106
|
+
g(e, t);
|
|
109
107
|
}
|
|
110
108
|
n(V, "uponFulfillment");
|
|
111
|
-
function I(e, t
|
|
112
|
-
g(e, void 0, t
|
|
109
|
+
function I(e, t) {
|
|
110
|
+
g(e, void 0, t);
|
|
113
111
|
}
|
|
114
112
|
n(I, "uponRejection");
|
|
115
|
-
function F(e, t
|
|
116
|
-
return q(e, t
|
|
113
|
+
function F(e, t, r) {
|
|
114
|
+
return q(e, t, r);
|
|
117
115
|
}
|
|
118
116
|
n(F, "transformPromiseWith");
|
|
119
117
|
function Q(e) {
|
|
@@ -123,25 +121,25 @@ function Ns() {
|
|
|
123
121
|
let ge = n((e) => {
|
|
124
122
|
if (typeof queueMicrotask == "function") ge = queueMicrotask;
|
|
125
123
|
else {
|
|
126
|
-
const t
|
|
127
|
-
ge = n((r) => q(t
|
|
124
|
+
const t = T(void 0);
|
|
125
|
+
ge = n((r) => q(t, r), "_queueMicrotask");
|
|
128
126
|
}
|
|
129
127
|
return ge(e);
|
|
130
128
|
}, "_queueMicrotask");
|
|
131
|
-
function z(e, t
|
|
129
|
+
function z(e, t, r) {
|
|
132
130
|
if (typeof e != "function") throw new TypeError("Argument is not a function");
|
|
133
|
-
return Function.prototype.apply.call(e, t
|
|
131
|
+
return Function.prototype.apply.call(e, t, r);
|
|
134
132
|
}
|
|
135
133
|
n(z, "reflectCall");
|
|
136
|
-
function j(e, t
|
|
134
|
+
function j(e, t, r) {
|
|
137
135
|
try {
|
|
138
|
-
return T(z(e, t
|
|
136
|
+
return T(z(e, t, r));
|
|
139
137
|
} catch (s) {
|
|
140
138
|
return b(s);
|
|
141
139
|
}
|
|
142
140
|
}
|
|
143
141
|
n(j, "promiseCall");
|
|
144
|
-
const U = 16384, bn = class bn
|
|
142
|
+
const U = 16384, bn = class bn {
|
|
145
143
|
constructor() {
|
|
146
144
|
this._cursor = 0, this._size = 0, this._front = {
|
|
147
145
|
_elements: [],
|
|
@@ -151,46 +149,46 @@ function Ns() {
|
|
|
151
149
|
get length() {
|
|
152
150
|
return this._size;
|
|
153
151
|
}
|
|
154
|
-
push(t
|
|
152
|
+
push(t) {
|
|
155
153
|
const r = this._back;
|
|
156
154
|
let s = r;
|
|
157
155
|
r._elements.length === U - 1 && (s = {
|
|
158
156
|
_elements: [],
|
|
159
157
|
_next: void 0
|
|
160
|
-
}), r._elements.push(t
|
|
158
|
+
}), r._elements.push(t), s !== r && (this._back = s, r._next = s), ++this._size;
|
|
161
159
|
}
|
|
162
160
|
shift() {
|
|
163
|
-
const t
|
|
164
|
-
let r = t
|
|
161
|
+
const t = this._front;
|
|
162
|
+
let r = t;
|
|
165
163
|
const s = this._cursor;
|
|
166
164
|
let u = s + 1;
|
|
167
|
-
const c = t
|
|
168
|
-
return u === U && (r = t
|
|
165
|
+
const c = t._elements, d = c[s];
|
|
166
|
+
return u === U && (r = t._next, u = 0), --this._size, this._cursor = u, t !== r && (this._front = r), c[s] = void 0, d;
|
|
169
167
|
}
|
|
170
|
-
forEach(t
|
|
168
|
+
forEach(t) {
|
|
171
169
|
let r = this._cursor, s = this._front, u = s._elements;
|
|
172
|
-
for (; (r !== u.length || s._next !== void 0) && !(r === u.length && (s = s._next, u = s._elements, r = 0, u.length === 0));) t
|
|
170
|
+
for (; (r !== u.length || s._next !== void 0) && !(r === u.length && (s = s._next, u = s._elements, r = 0, u.length === 0));) t(u[r]), ++r;
|
|
173
171
|
}
|
|
174
172
|
peek() {
|
|
175
|
-
const t
|
|
176
|
-
return t
|
|
173
|
+
const t = this._front, r = this._cursor;
|
|
174
|
+
return t._elements[r];
|
|
177
175
|
}
|
|
178
176
|
};
|
|
179
177
|
n(bn, "SimpleQueue");
|
|
180
178
|
let D = bn;
|
|
181
179
|
const jt = Symbol("[[AbortSteps]]"), Qn = Symbol("[[ErrorSteps]]"), Ar = Symbol("[[CancelSteps]]"), Br = Symbol("[[PullSteps]]"), kr = Symbol("[[ReleaseSteps]]");
|
|
182
|
-
function Yn(e, t
|
|
183
|
-
e._ownerReadableStream = t
|
|
180
|
+
function Yn(e, t) {
|
|
181
|
+
e._ownerReadableStream = t, t._reader = e, t._state === "readable" ? qr(e) : t._state === "closed" ? xi(e) : Gn(e, t._storedError);
|
|
184
182
|
}
|
|
185
183
|
n(Yn, "ReadableStreamReaderGenericInitialize");
|
|
186
|
-
function Wr(e, t
|
|
184
|
+
function Wr(e, t) {
|
|
187
185
|
const r = e._ownerReadableStream;
|
|
188
|
-
return ie(r, t
|
|
186
|
+
return ie(r, t);
|
|
189
187
|
}
|
|
190
188
|
n(Wr, "ReadableStreamReaderGenericCancel");
|
|
191
189
|
function _e(e) {
|
|
192
|
-
const t
|
|
193
|
-
t
|
|
190
|
+
const t = e._ownerReadableStream;
|
|
191
|
+
t._state === "readable" ? Or(e, /* @__PURE__ */ new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")) : Ni(e, /* @__PURE__ */ new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")), t._readableStreamController[kr](), t._reader = void 0, e._ownerReadableStream = void 0;
|
|
194
192
|
}
|
|
195
193
|
n(_e, "ReadableStreamReaderGenericRelease");
|
|
196
194
|
function Lt(e) {
|
|
@@ -198,25 +196,25 @@ function Ns() {
|
|
|
198
196
|
}
|
|
199
197
|
n(Lt, "readerLockException");
|
|
200
198
|
function qr(e) {
|
|
201
|
-
e._closedPromise = A((t
|
|
202
|
-
e._closedPromise_resolve = t
|
|
199
|
+
e._closedPromise = A((t, r) => {
|
|
200
|
+
e._closedPromise_resolve = t, e._closedPromise_reject = r;
|
|
203
201
|
});
|
|
204
202
|
}
|
|
205
203
|
n(qr, "defaultReaderClosedPromiseInitialize");
|
|
206
|
-
function Gn(e, t
|
|
207
|
-
qr(e), Or(e, t
|
|
204
|
+
function Gn(e, t) {
|
|
205
|
+
qr(e), Or(e, t);
|
|
208
206
|
}
|
|
209
207
|
n(Gn, "defaultReaderClosedPromiseInitializeAsRejected");
|
|
210
208
|
function xi(e) {
|
|
211
209
|
qr(e), Zn(e);
|
|
212
210
|
}
|
|
213
211
|
n(xi, "defaultReaderClosedPromiseInitializeAsResolved");
|
|
214
|
-
function Or(e, t
|
|
215
|
-
e._closedPromise_reject !== void 0 && (Q(e._closedPromise), e._closedPromise_reject(t
|
|
212
|
+
function Or(e, t) {
|
|
213
|
+
e._closedPromise_reject !== void 0 && (Q(e._closedPromise), e._closedPromise_reject(t), e._closedPromise_resolve = void 0, e._closedPromise_reject = void 0);
|
|
216
214
|
}
|
|
217
215
|
n(Or, "defaultReaderClosedPromiseReject");
|
|
218
|
-
function Ni(e, t
|
|
219
|
-
Gn(e, t
|
|
216
|
+
function Ni(e, t) {
|
|
217
|
+
Gn(e, t);
|
|
220
218
|
}
|
|
221
219
|
n(Ni, "defaultReaderClosedPromiseResetToRejected");
|
|
222
220
|
function Zn(e) {
|
|
@@ -232,28 +230,28 @@ function Ns() {
|
|
|
232
230
|
return typeof e == "object" || typeof e == "function";
|
|
233
231
|
}
|
|
234
232
|
n(Vi, "isDictionary");
|
|
235
|
-
function ue(e, t
|
|
236
|
-
if (e !== void 0 && !Vi(e)) throw new TypeError(`${t
|
|
233
|
+
function ue(e, t) {
|
|
234
|
+
if (e !== void 0 && !Vi(e)) throw new TypeError(`${t} is not an object.`);
|
|
237
235
|
}
|
|
238
236
|
n(ue, "assertDictionary");
|
|
239
|
-
function Z(e, t
|
|
240
|
-
if (typeof e != "function") throw new TypeError(`${t
|
|
237
|
+
function Z(e, t) {
|
|
238
|
+
if (typeof e != "function") throw new TypeError(`${t} is not a function.`);
|
|
241
239
|
}
|
|
242
240
|
n(Z, "assertFunction");
|
|
243
241
|
function Qi(e) {
|
|
244
242
|
return typeof e == "object" && e !== null || typeof e == "function";
|
|
245
243
|
}
|
|
246
244
|
n(Qi, "isObject");
|
|
247
|
-
function Jn(e, t
|
|
248
|
-
if (!Qi(e)) throw new TypeError(`${t
|
|
245
|
+
function Jn(e, t) {
|
|
246
|
+
if (!Qi(e)) throw new TypeError(`${t} is not an object.`);
|
|
249
247
|
}
|
|
250
248
|
n(Jn, "assertObject");
|
|
251
|
-
function Se(e, t
|
|
252
|
-
if (e === void 0) throw new TypeError(`Parameter ${t
|
|
249
|
+
function Se(e, t, r) {
|
|
250
|
+
if (e === void 0) throw new TypeError(`Parameter ${t} is required in '${r}'.`);
|
|
253
251
|
}
|
|
254
252
|
n(Se, "assertRequiredArgument");
|
|
255
|
-
function zr(e, t
|
|
256
|
-
if (e === void 0) throw new TypeError(`${t
|
|
253
|
+
function zr(e, t, r) {
|
|
254
|
+
if (e === void 0) throw new TypeError(`${t} is required in '${r}'.`);
|
|
257
255
|
}
|
|
258
256
|
n(zr, "assertRequiredField");
|
|
259
257
|
function Ir(e) {
|
|
@@ -268,29 +266,29 @@ function Ns() {
|
|
|
268
266
|
return Xn(Hi(e));
|
|
269
267
|
}
|
|
270
268
|
n(Yi, "integerPart");
|
|
271
|
-
function Fr(e, t
|
|
269
|
+
function Fr(e, t) {
|
|
272
270
|
const s = Number.MAX_SAFE_INTEGER;
|
|
273
271
|
let u = Number(e);
|
|
274
|
-
if (u = Xn(u), !Kn(u)) throw new TypeError(`${t
|
|
275
|
-
if (u = Yi(u), u < 0 || u > s) throw new TypeError(`${t
|
|
272
|
+
if (u = Xn(u), !Kn(u)) throw new TypeError(`${t} is not a finite number`);
|
|
273
|
+
if (u = Yi(u), u < 0 || u > s) throw new TypeError(`${t} is outside the accepted range of 0 to ${s}, inclusive`);
|
|
276
274
|
return !Kn(u) || u === 0 ? 0 : u;
|
|
277
275
|
}
|
|
278
276
|
n(Fr, "convertUnsignedLongLongWithEnforceRange");
|
|
279
|
-
function jr(e, t
|
|
280
|
-
if (!We(e)) throw new TypeError(`${t
|
|
277
|
+
function jr(e, t) {
|
|
278
|
+
if (!We(e)) throw new TypeError(`${t} is not a ReadableStream.`);
|
|
281
279
|
}
|
|
282
280
|
n(jr, "assertReadableStream");
|
|
283
281
|
function Qe(e) {
|
|
284
282
|
return new fe(e);
|
|
285
283
|
}
|
|
286
284
|
n(Qe, "AcquireReadableStreamDefaultReader");
|
|
287
|
-
function eo(e, t
|
|
288
|
-
e._reader._readRequests.push(t
|
|
285
|
+
function eo(e, t) {
|
|
286
|
+
e._reader._readRequests.push(t);
|
|
289
287
|
}
|
|
290
288
|
n(eo, "ReadableStreamAddReadRequest");
|
|
291
|
-
function Lr(e, t
|
|
289
|
+
function Lr(e, t, r) {
|
|
292
290
|
const u = e._reader._readRequests.shift();
|
|
293
|
-
r ? u._closeSteps() : u._chunkSteps(t
|
|
291
|
+
r ? u._closeSteps() : u._chunkSteps(t);
|
|
294
292
|
}
|
|
295
293
|
n(Lr, "ReadableStreamFulfillReadRequest");
|
|
296
294
|
function $t(e) {
|
|
@@ -298,34 +296,34 @@ function Ns() {
|
|
|
298
296
|
}
|
|
299
297
|
n($t, "ReadableStreamGetNumReadRequests");
|
|
300
298
|
function to(e) {
|
|
301
|
-
const t
|
|
302
|
-
return !(t
|
|
299
|
+
const t = e._reader;
|
|
300
|
+
return !(t === void 0 || !Ee(t));
|
|
303
301
|
}
|
|
304
302
|
n(to, "ReadableStreamHasDefaultReader");
|
|
305
|
-
const mn = class mn
|
|
306
|
-
constructor(t
|
|
307
|
-
if (Se(t
|
|
308
|
-
Yn(this, t
|
|
303
|
+
const mn = class mn {
|
|
304
|
+
constructor(t) {
|
|
305
|
+
if (Se(t, 1, "ReadableStreamDefaultReader"), jr(t, "First parameter"), qe(t)) throw new TypeError("This stream has already been locked for exclusive reading by another reader");
|
|
306
|
+
Yn(this, t), this._readRequests = new D();
|
|
309
307
|
}
|
|
310
308
|
get closed() {
|
|
311
309
|
return Ee(this) ? this._closedPromise : b(Dt("closed"));
|
|
312
310
|
}
|
|
313
|
-
cancel(t
|
|
314
|
-
return Ee(this) ? this._ownerReadableStream === void 0 ? b(Lt("cancel")) : Wr(this, t
|
|
311
|
+
cancel(t = void 0) {
|
|
312
|
+
return Ee(this) ? this._ownerReadableStream === void 0 ? b(Lt("cancel")) : Wr(this, t) : b(Dt("cancel"));
|
|
315
313
|
}
|
|
316
314
|
read() {
|
|
317
315
|
if (!Ee(this)) return b(Dt("read"));
|
|
318
316
|
if (this._ownerReadableStream === void 0) return b(Lt("read from"));
|
|
319
|
-
let t
|
|
317
|
+
let t, r;
|
|
320
318
|
const s = A((c, d) => {
|
|
321
|
-
t
|
|
319
|
+
t = c, r = d;
|
|
322
320
|
});
|
|
323
321
|
return _t(this, {
|
|
324
|
-
_chunkSteps: n((c) => t
|
|
322
|
+
_chunkSteps: n((c) => t({
|
|
325
323
|
value: c,
|
|
326
324
|
done: !1
|
|
327
325
|
}), "_chunkSteps"),
|
|
328
|
-
_closeSteps: n(() => t
|
|
326
|
+
_closeSteps: n(() => t({
|
|
329
327
|
value: void 0,
|
|
330
328
|
done: !0
|
|
331
329
|
}), "_closeSteps"),
|
|
@@ -352,9 +350,9 @@ function Ns() {
|
|
|
352
350
|
return !l(e) || !Object.prototype.hasOwnProperty.call(e, "_readRequests") ? !1 : e instanceof fe;
|
|
353
351
|
}
|
|
354
352
|
n(Ee, "IsReadableStreamDefaultReader");
|
|
355
|
-
function _t(e, t
|
|
353
|
+
function _t(e, t) {
|
|
356
354
|
const r = e._ownerReadableStream;
|
|
357
|
-
r._disturbed = !0, r._state === "closed" ? t
|
|
355
|
+
r._disturbed = !0, r._state === "closed" ? t._closeSteps() : r._state === "errored" ? t._errorSteps(r._storedError) : r._readableStreamController[Br](t);
|
|
358
356
|
}
|
|
359
357
|
n(_t, "ReadableStreamDefaultReaderRead");
|
|
360
358
|
function Gi(e) {
|
|
@@ -362,10 +360,10 @@ function Ns() {
|
|
|
362
360
|
ro(e, /* @__PURE__ */ new TypeError("Reader was released"));
|
|
363
361
|
}
|
|
364
362
|
n(Gi, "ReadableStreamDefaultReaderRelease");
|
|
365
|
-
function ro(e, t
|
|
363
|
+
function ro(e, t) {
|
|
366
364
|
const r = e._readRequests;
|
|
367
365
|
e._readRequests = new D(), r.forEach((s) => {
|
|
368
|
-
s._errorSteps(t
|
|
366
|
+
s._errorSteps(t);
|
|
369
367
|
});
|
|
370
368
|
}
|
|
371
369
|
n(ro, "ReadableStreamDefaultReaderErrorReadRequests");
|
|
@@ -373,16 +371,16 @@ function Ns() {
|
|
|
373
371
|
return /* @__PURE__ */ new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`);
|
|
374
372
|
}
|
|
375
373
|
n(Dt, "defaultReaderBrandCheckException");
|
|
376
|
-
const Zi = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {}).prototype), yn = class yn
|
|
377
|
-
constructor(t
|
|
378
|
-
this._ongoingPromise = void 0, this._isFinished = !1, this._reader = t
|
|
374
|
+
const Zi = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {}).prototype), yn = class yn {
|
|
375
|
+
constructor(t, r) {
|
|
376
|
+
this._ongoingPromise = void 0, this._isFinished = !1, this._reader = t, this._preventCancel = r;
|
|
379
377
|
}
|
|
380
378
|
next() {
|
|
381
|
-
const t
|
|
382
|
-
return this._ongoingPromise = this._ongoingPromise ? F(this._ongoingPromise, t
|
|
379
|
+
const t = n(() => this._nextSteps(), "nextSteps");
|
|
380
|
+
return this._ongoingPromise = this._ongoingPromise ? F(this._ongoingPromise, t, t) : t(), this._ongoingPromise;
|
|
383
381
|
}
|
|
384
|
-
return(t
|
|
385
|
-
const r = n(() => this._returnSteps(t
|
|
382
|
+
return(t) {
|
|
383
|
+
const r = n(() => this._returnSteps(t), "returnSteps");
|
|
386
384
|
return this._ongoingPromise ? F(this._ongoingPromise, r, r) : r();
|
|
387
385
|
}
|
|
388
386
|
_nextSteps() {
|
|
@@ -390,12 +388,12 @@ function Ns() {
|
|
|
390
388
|
value: void 0,
|
|
391
389
|
done: !0
|
|
392
390
|
});
|
|
393
|
-
const t
|
|
391
|
+
const t = this._reader;
|
|
394
392
|
let r, s;
|
|
395
393
|
const u = A((d, m) => {
|
|
396
394
|
r = d, s = m;
|
|
397
395
|
});
|
|
398
|
-
return _t(t
|
|
396
|
+
return _t(t, {
|
|
399
397
|
_chunkSteps: n((d) => {
|
|
400
398
|
this._ongoingPromise = void 0, ge(() => r({
|
|
401
399
|
value: d,
|
|
@@ -403,32 +401,32 @@ function Ns() {
|
|
|
403
401
|
}));
|
|
404
402
|
}, "_chunkSteps"),
|
|
405
403
|
_closeSteps: n(() => {
|
|
406
|
-
this._ongoingPromise = void 0, this._isFinished = !0, _e(t
|
|
404
|
+
this._ongoingPromise = void 0, this._isFinished = !0, _e(t), r({
|
|
407
405
|
value: void 0,
|
|
408
406
|
done: !0
|
|
409
407
|
});
|
|
410
408
|
}, "_closeSteps"),
|
|
411
409
|
_errorSteps: n((d) => {
|
|
412
|
-
this._ongoingPromise = void 0, this._isFinished = !0, _e(t
|
|
410
|
+
this._ongoingPromise = void 0, this._isFinished = !0, _e(t), s(d);
|
|
413
411
|
}, "_errorSteps")
|
|
414
412
|
}), u;
|
|
415
413
|
}
|
|
416
|
-
_returnSteps(t
|
|
414
|
+
_returnSteps(t) {
|
|
417
415
|
if (this._isFinished) return Promise.resolve({
|
|
418
|
-
value: t
|
|
416
|
+
value: t,
|
|
419
417
|
done: !0
|
|
420
418
|
});
|
|
421
419
|
this._isFinished = !0;
|
|
422
420
|
const r = this._reader;
|
|
423
421
|
if (!this._preventCancel) {
|
|
424
|
-
const s = Wr(r, t
|
|
422
|
+
const s = Wr(r, t);
|
|
425
423
|
return _e(r), F(s, () => ({
|
|
426
|
-
value: t
|
|
424
|
+
value: t,
|
|
427
425
|
done: !0
|
|
428
426
|
}));
|
|
429
427
|
}
|
|
430
428
|
return _e(r), T({
|
|
431
|
-
value: t
|
|
429
|
+
value: t,
|
|
432
430
|
done: !0
|
|
433
431
|
});
|
|
434
432
|
}
|
|
@@ -444,8 +442,8 @@ function Ns() {
|
|
|
444
442
|
}
|
|
445
443
|
};
|
|
446
444
|
Object.setPrototypeOf(no, Zi);
|
|
447
|
-
function Ki(e, t
|
|
448
|
-
const s = new Mt(Qe(e), t
|
|
445
|
+
function Ki(e, t) {
|
|
446
|
+
const s = new Mt(Qe(e), t), u = Object.create(no);
|
|
449
447
|
return u._asyncIteratorImpl = s, u;
|
|
450
448
|
}
|
|
451
449
|
n(Ki, "AcquireReadableStreamAsyncIterator");
|
|
@@ -470,28 +468,28 @@ function Ns() {
|
|
|
470
468
|
return e.slice();
|
|
471
469
|
}
|
|
472
470
|
n(St, "CreateArrayFromList");
|
|
473
|
-
function so(e, t
|
|
474
|
-
new Uint8Array(e).set(new Uint8Array(r, s, u), t
|
|
471
|
+
function so(e, t, r, s, u) {
|
|
472
|
+
new Uint8Array(e).set(new Uint8Array(r, s, u), t);
|
|
475
473
|
}
|
|
476
474
|
n(so, "CopyDataBlockBytes");
|
|
477
|
-
let we = n((e) => (typeof e.transfer == "function" ? we = n((t
|
|
478
|
-
function lo(e, t
|
|
479
|
-
if (e.slice) return e.slice(t
|
|
480
|
-
const s = r - t
|
|
481
|
-
return so(u, 0, e, t
|
|
475
|
+
let we = n((e) => (typeof e.transfer == "function" ? we = n((t) => t.transfer(), "TransferArrayBuffer") : typeof structuredClone == "function" ? we = n((t) => structuredClone(t, { transfer: [t] }), "TransferArrayBuffer") : we = n((t) => t, "TransferArrayBuffer"), we(e)), "TransferArrayBuffer"), Ae = n((e) => (typeof e.detached == "boolean" ? Ae = n((t) => t.detached, "IsDetachedBuffer") : Ae = n((t) => t.byteLength === 0, "IsDetachedBuffer"), Ae(e)), "IsDetachedBuffer");
|
|
476
|
+
function lo(e, t, r) {
|
|
477
|
+
if (e.slice) return e.slice(t, r);
|
|
478
|
+
const s = r - t, u = new ArrayBuffer(s);
|
|
479
|
+
return so(u, 0, e, t, s), u;
|
|
482
480
|
}
|
|
483
481
|
n(lo, "ArrayBufferSlice");
|
|
484
|
-
function Ut(e, t
|
|
485
|
-
const r = e[t
|
|
482
|
+
function Ut(e, t) {
|
|
483
|
+
const r = e[t];
|
|
486
484
|
if (r != null) {
|
|
487
|
-
if (typeof r != "function") throw new TypeError(`${String(t
|
|
485
|
+
if (typeof r != "function") throw new TypeError(`${String(t)} is not a function`);
|
|
488
486
|
return r;
|
|
489
487
|
}
|
|
490
488
|
}
|
|
491
489
|
n(Ut, "GetMethod");
|
|
492
490
|
function Ji(e) {
|
|
493
|
-
const t
|
|
494
|
-
return yield* t
|
|
491
|
+
const t = { [Symbol.iterator]: () => e.iterator }, r = async function* () {
|
|
492
|
+
return yield* t;
|
|
495
493
|
}();
|
|
496
494
|
return {
|
|
497
495
|
iterator: r,
|
|
@@ -501,8 +499,8 @@ function Ns() {
|
|
|
501
499
|
}
|
|
502
500
|
n(Ji, "CreateAsyncFromSyncIterator");
|
|
503
501
|
const Ur = (Mr = ($r = Symbol.asyncIterator) !== null && $r !== void 0 ? $r : (Dr = Symbol.for) === null || Dr === void 0 ? void 0 : Dr.call(Symbol, "Symbol.asyncIterator")) !== null && Mr !== void 0 ? Mr : "@@asyncIterator";
|
|
504
|
-
function uo(e, t
|
|
505
|
-
if (r === void 0) if (t
|
|
502
|
+
function uo(e, t = "sync", r) {
|
|
503
|
+
if (r === void 0) if (t === "async") {
|
|
506
504
|
if (r = Ut(e, Ur), r === void 0) return Ji(uo(e, "sync", Ut(e, Symbol.iterator)));
|
|
507
505
|
} else r = Ut(e, Symbol.iterator);
|
|
508
506
|
if (r === void 0) throw new TypeError("The object is not iterable");
|
|
@@ -516,9 +514,9 @@ function Ns() {
|
|
|
516
514
|
}
|
|
517
515
|
n(uo, "GetIterator");
|
|
518
516
|
function Xi(e) {
|
|
519
|
-
const t
|
|
520
|
-
if (!l(t
|
|
521
|
-
return t
|
|
517
|
+
const t = z(e.nextMethod, e.iterator, []);
|
|
518
|
+
if (!l(t)) throw new TypeError("The iterator.next() method must return an object");
|
|
519
|
+
return t;
|
|
522
520
|
}
|
|
523
521
|
n(Xi, "IteratorNext");
|
|
524
522
|
function ea(e) {
|
|
@@ -534,19 +532,19 @@ function Ns() {
|
|
|
534
532
|
}
|
|
535
533
|
n(ra, "IsNonNegativeNumber");
|
|
536
534
|
function fo(e) {
|
|
537
|
-
const t
|
|
538
|
-
return new Uint8Array(t
|
|
535
|
+
const t = lo(e.buffer, e.byteOffset, e.byteOffset + e.byteLength);
|
|
536
|
+
return new Uint8Array(t);
|
|
539
537
|
}
|
|
540
538
|
n(fo, "CloneAsUint8Array");
|
|
541
539
|
function xr(e) {
|
|
542
|
-
const t
|
|
543
|
-
return e._queueTotalSize -= t
|
|
540
|
+
const t = e._queue.shift();
|
|
541
|
+
return e._queueTotalSize -= t.size, e._queueTotalSize < 0 && (e._queueTotalSize = 0), t.value;
|
|
544
542
|
}
|
|
545
543
|
n(xr, "DequeueValue");
|
|
546
|
-
function Nr(e, t
|
|
544
|
+
function Nr(e, t, r) {
|
|
547
545
|
if (!ra(r) || r === Infinity) throw new RangeError("Size must be a finite, non-NaN, non-negative number.");
|
|
548
546
|
e._queue.push({
|
|
549
|
-
value: t
|
|
547
|
+
value: t,
|
|
550
548
|
size: r
|
|
551
549
|
}), e._queueTotalSize += r;
|
|
552
550
|
}
|
|
@@ -571,7 +569,7 @@ function Ns() {
|
|
|
571
569
|
return co(e) ? 1 : e.BYTES_PER_ELEMENT;
|
|
572
570
|
}
|
|
573
571
|
n(ia, "arrayBufferViewElementSize");
|
|
574
|
-
const gn = class gn
|
|
572
|
+
const gn = class gn {
|
|
575
573
|
constructor() {
|
|
576
574
|
throw new TypeError("Illegal constructor");
|
|
577
575
|
}
|
|
@@ -579,18 +577,18 @@ function Ns() {
|
|
|
579
577
|
if (!Hr(this)) throw Zr("view");
|
|
580
578
|
return this._view;
|
|
581
579
|
}
|
|
582
|
-
respond(t
|
|
580
|
+
respond(t) {
|
|
583
581
|
if (!Hr(this)) throw Zr("respond");
|
|
584
|
-
if (Se(t
|
|
582
|
+
if (Se(t, 1, "respond"), t = Fr(t, "First parameter"), this._associatedReadableByteStreamController === void 0) throw new TypeError("This BYOB request has been invalidated");
|
|
585
583
|
if (Ae(this._view.buffer)) throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");
|
|
586
|
-
Vt(this._associatedReadableByteStreamController, t
|
|
584
|
+
Vt(this._associatedReadableByteStreamController, t);
|
|
587
585
|
}
|
|
588
|
-
respondWithNewView(t
|
|
586
|
+
respondWithNewView(t) {
|
|
589
587
|
if (!Hr(this)) throw Zr("respondWithNewView");
|
|
590
|
-
if (Se(t
|
|
588
|
+
if (Se(t, 1, "respondWithNewView"), !ArrayBuffer.isView(t)) throw new TypeError("You can only respond with array buffer views");
|
|
591
589
|
if (this._associatedReadableByteStreamController === void 0) throw new TypeError("This BYOB request has been invalidated");
|
|
592
|
-
if (Ae(t
|
|
593
|
-
Qt(this._associatedReadableByteStreamController, t
|
|
590
|
+
if (Ae(t.buffer)) throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");
|
|
591
|
+
Qt(this._associatedReadableByteStreamController, t);
|
|
594
592
|
}
|
|
595
593
|
};
|
|
596
594
|
n(gn, "ReadableStreamBYOBRequest");
|
|
@@ -603,7 +601,7 @@ function Ns() {
|
|
|
603
601
|
value: "ReadableStreamBYOBRequest",
|
|
604
602
|
configurable: !0
|
|
605
603
|
});
|
|
606
|
-
const _n = class _n
|
|
604
|
+
const _n = class _n {
|
|
607
605
|
constructor() {
|
|
608
606
|
throw new TypeError("Illegal constructor");
|
|
609
607
|
}
|
|
@@ -618,33 +616,33 @@ function Ns() {
|
|
|
618
616
|
close() {
|
|
619
617
|
if (!Ie(this)) throw Rt("close");
|
|
620
618
|
if (this._closeRequested) throw new TypeError("The stream has already been closed; do not close it again!");
|
|
621
|
-
const t
|
|
622
|
-
if (t
|
|
619
|
+
const t = this._controlledReadableByteStream._state;
|
|
620
|
+
if (t !== "readable") throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be closed`);
|
|
623
621
|
wt(this);
|
|
624
622
|
}
|
|
625
|
-
enqueue(t
|
|
623
|
+
enqueue(t) {
|
|
626
624
|
if (!Ie(this)) throw Rt("enqueue");
|
|
627
|
-
if (Se(t
|
|
628
|
-
if (t
|
|
629
|
-
if (t
|
|
625
|
+
if (Se(t, 1, "enqueue"), !ArrayBuffer.isView(t)) throw new TypeError("chunk must be an array buffer view");
|
|
626
|
+
if (t.byteLength === 0) throw new TypeError("chunk must have non-zero byteLength");
|
|
627
|
+
if (t.buffer.byteLength === 0) throw new TypeError("chunk's buffer must have non-zero byteLength");
|
|
630
628
|
if (this._closeRequested) throw new TypeError("stream is closed or draining");
|
|
631
629
|
const r = this._controlledReadableByteStream._state;
|
|
632
630
|
if (r !== "readable") throw new TypeError(`The stream (in ${r} state) is not in the readable state and cannot be enqueued to`);
|
|
633
|
-
Ht(this, t
|
|
631
|
+
Ht(this, t);
|
|
634
632
|
}
|
|
635
|
-
error(t
|
|
633
|
+
error(t = void 0) {
|
|
636
634
|
if (!Ie(this)) throw Rt("error");
|
|
637
|
-
K(this, t
|
|
635
|
+
K(this, t);
|
|
638
636
|
}
|
|
639
|
-
[Ar](t
|
|
637
|
+
[Ar](t) {
|
|
640
638
|
ho(this), Be(this);
|
|
641
|
-
const r = this._cancelAlgorithm(t
|
|
639
|
+
const r = this._cancelAlgorithm(t);
|
|
642
640
|
return Nt(this), r;
|
|
643
641
|
}
|
|
644
|
-
[Br](t
|
|
642
|
+
[Br](t) {
|
|
645
643
|
const r = this._controlledReadableByteStream;
|
|
646
644
|
if (this._queueTotalSize > 0) {
|
|
647
|
-
wo(this, t
|
|
645
|
+
wo(this, t);
|
|
648
646
|
return;
|
|
649
647
|
}
|
|
650
648
|
const s = this._autoAllocateChunkSize;
|
|
@@ -653,7 +651,7 @@ function Ns() {
|
|
|
653
651
|
try {
|
|
654
652
|
u = new ArrayBuffer(s);
|
|
655
653
|
} catch (d) {
|
|
656
|
-
t
|
|
654
|
+
t._errorSteps(d);
|
|
657
655
|
return;
|
|
658
656
|
}
|
|
659
657
|
const c = {
|
|
@@ -669,12 +667,12 @@ function Ns() {
|
|
|
669
667
|
};
|
|
670
668
|
this._pendingPullIntos.push(c);
|
|
671
669
|
}
|
|
672
|
-
eo(r, t
|
|
670
|
+
eo(r, t), Fe(this);
|
|
673
671
|
}
|
|
674
672
|
[kr]() {
|
|
675
673
|
if (this._pendingPullIntos.length > 0) {
|
|
676
|
-
const t
|
|
677
|
-
t
|
|
674
|
+
const t = this._pendingPullIntos.peek();
|
|
675
|
+
t.readerType = "none", this._pendingPullIntos = new D(), this._pendingPullIntos.push(t);
|
|
678
676
|
}
|
|
679
677
|
}
|
|
680
678
|
};
|
|
@@ -712,55 +710,55 @@ function Ns() {
|
|
|
712
710
|
Qr(e), e._pendingPullIntos = new D();
|
|
713
711
|
}
|
|
714
712
|
n(ho, "ReadableByteStreamControllerClearPendingPullIntos");
|
|
715
|
-
function Vr(e, t
|
|
713
|
+
function Vr(e, t) {
|
|
716
714
|
let r = !1;
|
|
717
715
|
e._state === "closed" && (r = !0);
|
|
718
|
-
const s = po(t
|
|
719
|
-
t
|
|
716
|
+
const s = po(t);
|
|
717
|
+
t.readerType === "default" ? Lr(e, s, r) : ma(e, s, r);
|
|
720
718
|
}
|
|
721
719
|
n(Vr, "ReadableByteStreamControllerCommitPullIntoDescriptor");
|
|
722
720
|
function po(e) {
|
|
723
|
-
const t
|
|
724
|
-
return new e.viewConstructor(e.buffer, e.byteOffset, t
|
|
721
|
+
const t = e.bytesFilled, r = e.elementSize;
|
|
722
|
+
return new e.viewConstructor(e.buffer, e.byteOffset, t / r);
|
|
725
723
|
}
|
|
726
724
|
n(po, "ReadableByteStreamControllerConvertPullIntoDescriptor");
|
|
727
|
-
function xt(e, t
|
|
725
|
+
function xt(e, t, r, s) {
|
|
728
726
|
e._queue.push({
|
|
729
|
-
buffer: t
|
|
727
|
+
buffer: t,
|
|
730
728
|
byteOffset: r,
|
|
731
729
|
byteLength: s
|
|
732
730
|
}), e._queueTotalSize += s;
|
|
733
731
|
}
|
|
734
732
|
n(xt, "ReadableByteStreamControllerEnqueueChunkToQueue");
|
|
735
|
-
function bo(e, t
|
|
733
|
+
function bo(e, t, r, s) {
|
|
736
734
|
let u;
|
|
737
735
|
try {
|
|
738
|
-
u = lo(t
|
|
736
|
+
u = lo(t, r, r + s);
|
|
739
737
|
} catch (c) {
|
|
740
738
|
throw K(e, c), c;
|
|
741
739
|
}
|
|
742
740
|
xt(e, u, 0, s);
|
|
743
741
|
}
|
|
744
742
|
n(bo, "ReadableByteStreamControllerEnqueueClonedChunkToQueue");
|
|
745
|
-
function mo(e, t
|
|
746
|
-
t
|
|
743
|
+
function mo(e, t) {
|
|
744
|
+
t.bytesFilled > 0 && bo(e, t.buffer, t.byteOffset, t.bytesFilled), Ye(e);
|
|
747
745
|
}
|
|
748
746
|
n(mo, "ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue");
|
|
749
|
-
function yo(e, t
|
|
750
|
-
const r = Math.min(e._queueTotalSize, t
|
|
747
|
+
function yo(e, t) {
|
|
748
|
+
const r = Math.min(e._queueTotalSize, t.byteLength - t.bytesFilled), s = t.bytesFilled + r;
|
|
751
749
|
let u = r, c = !1;
|
|
752
|
-
const m = s - s % t
|
|
753
|
-
m >= t
|
|
750
|
+
const m = s - s % t.elementSize;
|
|
751
|
+
m >= t.minimumFill && (u = m - t.bytesFilled, c = !0);
|
|
754
752
|
const R = e._queue;
|
|
755
753
|
for (; u > 0;) {
|
|
756
|
-
const y = R.peek(), C = Math.min(u, y.byteLength), P = t
|
|
757
|
-
so(t
|
|
754
|
+
const y = R.peek(), C = Math.min(u, y.byteLength), P = t.byteOffset + t.bytesFilled;
|
|
755
|
+
so(t.buffer, P, y.buffer, y.byteOffset, C), y.byteLength === C ? R.shift() : (y.byteOffset += C, y.byteLength -= C), e._queueTotalSize -= C, go(e, C, t), u -= C;
|
|
758
756
|
}
|
|
759
757
|
return c;
|
|
760
758
|
}
|
|
761
759
|
n(yo, "ReadableByteStreamControllerFillPullIntoDescriptorFromQueue");
|
|
762
|
-
function go(e, t
|
|
763
|
-
r.bytesFilled += t
|
|
760
|
+
function go(e, t, r) {
|
|
761
|
+
r.bytesFilled += t;
|
|
764
762
|
}
|
|
765
763
|
n(go, "ReadableByteStreamControllerFillHeadPullIntoDescriptor");
|
|
766
764
|
function _o(e) {
|
|
@@ -774,24 +772,24 @@ function Ns() {
|
|
|
774
772
|
function Yr(e) {
|
|
775
773
|
for (; e._pendingPullIntos.length > 0;) {
|
|
776
774
|
if (e._queueTotalSize === 0) return;
|
|
777
|
-
const t
|
|
778
|
-
yo(e, t
|
|
775
|
+
const t = e._pendingPullIntos.peek();
|
|
776
|
+
yo(e, t) && (Ye(e), Vr(e._controlledReadableByteStream, t));
|
|
779
777
|
}
|
|
780
778
|
}
|
|
781
779
|
n(Yr, "ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue");
|
|
782
780
|
function aa(e) {
|
|
783
|
-
const t
|
|
784
|
-
for (; t
|
|
781
|
+
const t = e._controlledReadableByteStream._reader;
|
|
782
|
+
for (; t._readRequests.length > 0;) {
|
|
785
783
|
if (e._queueTotalSize === 0) return;
|
|
786
|
-
wo(e, t
|
|
784
|
+
wo(e, t._readRequests.shift());
|
|
787
785
|
}
|
|
788
786
|
}
|
|
789
787
|
n(aa, "ReadableByteStreamControllerProcessReadRequestsUsingQueue");
|
|
790
|
-
function sa(e, t
|
|
791
|
-
const u = e._controlledReadableByteStream, c = t
|
|
788
|
+
function sa(e, t, r, s) {
|
|
789
|
+
const u = e._controlledReadableByteStream, c = t.constructor, d = ia(c), { byteOffset: m, byteLength: R } = t, y = r * d;
|
|
792
790
|
let C;
|
|
793
791
|
try {
|
|
794
|
-
C = we(t
|
|
792
|
+
C = we(t.buffer);
|
|
795
793
|
} catch (B) {
|
|
796
794
|
s._errorSteps(B);
|
|
797
795
|
return;
|
|
@@ -831,14 +829,14 @@ function Ns() {
|
|
|
831
829
|
e._pendingPullIntos.push(P), Po(u, s), Fe(e);
|
|
832
830
|
}
|
|
833
831
|
n(sa, "ReadableByteStreamControllerPullInto");
|
|
834
|
-
function la(e, t
|
|
835
|
-
t
|
|
832
|
+
function la(e, t) {
|
|
833
|
+
t.readerType === "none" && Ye(e);
|
|
836
834
|
const r = e._controlledReadableByteStream;
|
|
837
835
|
if (Kr(r)) for (; vo(r) > 0;) Vr(r, Ye(e));
|
|
838
836
|
}
|
|
839
837
|
n(la, "ReadableByteStreamControllerRespondInClosedState");
|
|
840
|
-
function ua(e, t
|
|
841
|
-
if (go(e, t
|
|
838
|
+
function ua(e, t, r) {
|
|
839
|
+
if (go(e, t, r), r.readerType === "none") {
|
|
842
840
|
mo(e, r), Yr(e);
|
|
843
841
|
return;
|
|
844
842
|
}
|
|
@@ -852,9 +850,9 @@ function Ns() {
|
|
|
852
850
|
r.bytesFilled -= s, Vr(e._controlledReadableByteStream, r), Yr(e);
|
|
853
851
|
}
|
|
854
852
|
n(ua, "ReadableByteStreamControllerRespondInReadableState");
|
|
855
|
-
function So(e, t
|
|
853
|
+
function So(e, t) {
|
|
856
854
|
const r = e._pendingPullIntos.peek();
|
|
857
|
-
Qr(e), e._controlledReadableByteStream._state === "closed" ? la(e, r) : ua(e, t
|
|
855
|
+
Qr(e), e._controlledReadableByteStream._state === "closed" ? la(e, r) : ua(e, t, r), Fe(e);
|
|
858
856
|
}
|
|
859
857
|
n(So, "ReadableByteStreamControllerRespondInternal");
|
|
860
858
|
function Ye(e) {
|
|
@@ -862,8 +860,8 @@ function Ns() {
|
|
|
862
860
|
}
|
|
863
861
|
n(Ye, "ReadableByteStreamControllerShiftPendingPullInto");
|
|
864
862
|
function fa(e) {
|
|
865
|
-
const t
|
|
866
|
-
return t
|
|
863
|
+
const t = e._controlledReadableByteStream;
|
|
864
|
+
return t._state !== "readable" || e._closeRequested || !e._started ? !1 : !!(to(t) && $t(t) > 0 || Kr(t) && vo(t) > 0 || Ro(e) > 0);
|
|
867
865
|
}
|
|
868
866
|
n(fa, "ReadableByteStreamControllerShouldCallPull");
|
|
869
867
|
function Nt(e) {
|
|
@@ -871,8 +869,8 @@ function Ns() {
|
|
|
871
869
|
}
|
|
872
870
|
n(Nt, "ReadableByteStreamControllerClearAlgorithms");
|
|
873
871
|
function wt(e) {
|
|
874
|
-
const t
|
|
875
|
-
if (!(e._closeRequested || t
|
|
872
|
+
const t = e._controlledReadableByteStream;
|
|
873
|
+
if (!(e._closeRequested || t._state !== "readable")) {
|
|
876
874
|
if (e._queueTotalSize > 0) {
|
|
877
875
|
e._closeRequested = !0;
|
|
878
876
|
return;
|
|
@@ -884,14 +882,14 @@ function Ns() {
|
|
|
884
882
|
throw K(e, s), s;
|
|
885
883
|
}
|
|
886
884
|
}
|
|
887
|
-
Nt(e), At(t
|
|
885
|
+
Nt(e), At(t);
|
|
888
886
|
}
|
|
889
887
|
}
|
|
890
888
|
n(wt, "ReadableByteStreamControllerClose");
|
|
891
|
-
function Ht(e, t
|
|
889
|
+
function Ht(e, t) {
|
|
892
890
|
const r = e._controlledReadableByteStream;
|
|
893
891
|
if (e._closeRequested || r._state !== "readable") return;
|
|
894
|
-
const { buffer: s, byteOffset: u, byteLength: c } = t
|
|
892
|
+
const { buffer: s, byteOffset: u, byteLength: c } = t;
|
|
895
893
|
if (Ae(s)) throw new TypeError("chunk's buffer is detached and so cannot be enqueued");
|
|
896
894
|
const d = we(s);
|
|
897
895
|
if (e._pendingPullIntos.length > 0) {
|
|
@@ -908,70 +906,70 @@ function Ns() {
|
|
|
908
906
|
Fe(e);
|
|
909
907
|
}
|
|
910
908
|
n(Ht, "ReadableByteStreamControllerEnqueue");
|
|
911
|
-
function K(e, t
|
|
909
|
+
function K(e, t) {
|
|
912
910
|
const r = e._controlledReadableByteStream;
|
|
913
|
-
r._state === "readable" && (ho(e), Be(e), Nt(e), Zo(r, t
|
|
911
|
+
r._state === "readable" && (ho(e), Be(e), Nt(e), Zo(r, t));
|
|
914
912
|
}
|
|
915
913
|
n(K, "ReadableByteStreamControllerError");
|
|
916
|
-
function wo(e, t
|
|
914
|
+
function wo(e, t) {
|
|
917
915
|
const r = e._queue.shift();
|
|
918
916
|
e._queueTotalSize -= r.byteLength, _o(e);
|
|
919
917
|
const s = new Uint8Array(r.buffer, r.byteOffset, r.byteLength);
|
|
920
|
-
t
|
|
918
|
+
t._chunkSteps(s);
|
|
921
919
|
}
|
|
922
920
|
n(wo, "ReadableByteStreamControllerFillReadRequestFromQueue");
|
|
923
921
|
function Gr(e) {
|
|
924
922
|
if (e._byobRequest === null && e._pendingPullIntos.length > 0) {
|
|
925
|
-
const t
|
|
923
|
+
const t = e._pendingPullIntos.peek(), r = new Uint8Array(t.buffer, t.byteOffset + t.bytesFilled, t.byteLength - t.bytesFilled), s = Object.create(Re.prototype);
|
|
926
924
|
da(s, e, r), e._byobRequest = s;
|
|
927
925
|
}
|
|
928
926
|
return e._byobRequest;
|
|
929
927
|
}
|
|
930
928
|
n(Gr, "ReadableByteStreamControllerGetBYOBRequest");
|
|
931
929
|
function Ro(e) {
|
|
932
|
-
const t
|
|
933
|
-
return t
|
|
930
|
+
const t = e._controlledReadableByteStream._state;
|
|
931
|
+
return t === "errored" ? null : t === "closed" ? 0 : e._strategyHWM - e._queueTotalSize;
|
|
934
932
|
}
|
|
935
933
|
n(Ro, "ReadableByteStreamControllerGetDesiredSize");
|
|
936
|
-
function Vt(e, t
|
|
934
|
+
function Vt(e, t) {
|
|
937
935
|
const r = e._pendingPullIntos.peek();
|
|
938
936
|
if (e._controlledReadableByteStream._state === "closed") {
|
|
939
|
-
if (t
|
|
937
|
+
if (t !== 0) throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");
|
|
940
938
|
} else {
|
|
941
|
-
if (t
|
|
942
|
-
if (r.bytesFilled + t
|
|
939
|
+
if (t === 0) throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");
|
|
940
|
+
if (r.bytesFilled + t > r.byteLength) throw new RangeError("bytesWritten out of range");
|
|
943
941
|
}
|
|
944
|
-
r.buffer = we(r.buffer), So(e, t
|
|
942
|
+
r.buffer = we(r.buffer), So(e, t);
|
|
945
943
|
}
|
|
946
944
|
n(Vt, "ReadableByteStreamControllerRespond");
|
|
947
|
-
function Qt(e, t
|
|
945
|
+
function Qt(e, t) {
|
|
948
946
|
const r = e._pendingPullIntos.peek();
|
|
949
947
|
if (e._controlledReadableByteStream._state === "closed") {
|
|
950
|
-
if (t
|
|
951
|
-
} else if (t
|
|
952
|
-
if (r.byteOffset + r.bytesFilled !== t
|
|
953
|
-
if (r.bufferByteLength !== t
|
|
954
|
-
if (r.bytesFilled + t
|
|
955
|
-
const u = t
|
|
956
|
-
r.buffer = we(t
|
|
948
|
+
if (t.byteLength !== 0) throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream");
|
|
949
|
+
} else if (t.byteLength === 0) throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");
|
|
950
|
+
if (r.byteOffset + r.bytesFilled !== t.byteOffset) throw new RangeError("The region specified by view does not match byobRequest");
|
|
951
|
+
if (r.bufferByteLength !== t.buffer.byteLength) throw new RangeError("The buffer of view has different capacity than byobRequest");
|
|
952
|
+
if (r.bytesFilled + t.byteLength > r.byteLength) throw new RangeError("The region specified by view is larger than byobRequest");
|
|
953
|
+
const u = t.byteLength;
|
|
954
|
+
r.buffer = we(t.buffer), So(e, u);
|
|
957
955
|
}
|
|
958
956
|
n(Qt, "ReadableByteStreamControllerRespondWithNewView");
|
|
959
|
-
function To(e, t
|
|
960
|
-
t
|
|
961
|
-
g(T(r()), () => (t
|
|
957
|
+
function To(e, t, r, s, u, c, d) {
|
|
958
|
+
t._controlledReadableByteStream = e, t._pullAgain = !1, t._pulling = !1, t._byobRequest = null, t._queue = t._queueTotalSize = void 0, Be(t), t._closeRequested = !1, t._started = !1, t._strategyHWM = c, t._pullAlgorithm = s, t._cancelAlgorithm = u, t._autoAllocateChunkSize = d, t._pendingPullIntos = new D(), e._readableStreamController = t;
|
|
959
|
+
g(T(r()), () => (t._started = !0, Fe(t), null), (R) => (K(t, R), null));
|
|
962
960
|
}
|
|
963
961
|
n(To, "SetUpReadableByteStreamController");
|
|
964
|
-
function ca(e, t
|
|
962
|
+
function ca(e, t, r) {
|
|
965
963
|
const s = Object.create(te.prototype);
|
|
966
964
|
let u, c, d;
|
|
967
|
-
t
|
|
968
|
-
const m = t
|
|
965
|
+
t.start !== void 0 ? u = n(() => t.start(s), "startAlgorithm") : u = n(() => {}, "startAlgorithm"), t.pull !== void 0 ? c = n(() => t.pull(s), "pullAlgorithm") : c = n(() => T(void 0), "pullAlgorithm"), t.cancel !== void 0 ? d = n((R) => t.cancel(R), "cancelAlgorithm") : d = n(() => T(void 0), "cancelAlgorithm");
|
|
966
|
+
const m = t.autoAllocateChunkSize;
|
|
969
967
|
if (m === 0) throw new TypeError("autoAllocateChunkSize must be greater than 0");
|
|
970
968
|
To(e, s, u, c, d, r, m);
|
|
971
969
|
}
|
|
972
970
|
n(ca, "SetUpReadableByteStreamControllerFromUnderlyingSource");
|
|
973
|
-
function da(e, t
|
|
974
|
-
e._associatedReadableByteStreamController = t
|
|
971
|
+
function da(e, t, r) {
|
|
972
|
+
e._associatedReadableByteStreamController = t, e._view = r;
|
|
975
973
|
}
|
|
976
974
|
n(da, "SetUpReadableStreamBYOBRequest");
|
|
977
975
|
function Zr(e) {
|
|
@@ -982,34 +980,34 @@ function Ns() {
|
|
|
982
980
|
return /* @__PURE__ */ new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`);
|
|
983
981
|
}
|
|
984
982
|
n(Rt, "byteStreamControllerBrandCheckException");
|
|
985
|
-
function ha(e, t
|
|
986
|
-
ue(e, t
|
|
983
|
+
function ha(e, t) {
|
|
984
|
+
ue(e, t);
|
|
987
985
|
const r = e?.mode;
|
|
988
|
-
return { mode: r === void 0 ? void 0 : pa(r, `${t
|
|
986
|
+
return { mode: r === void 0 ? void 0 : pa(r, `${t} has member 'mode' that`) };
|
|
989
987
|
}
|
|
990
988
|
n(ha, "convertReaderOptions");
|
|
991
|
-
function pa(e, t
|
|
992
|
-
if (e = `${e}`, e !== "byob") throw new TypeError(`${t
|
|
989
|
+
function pa(e, t) {
|
|
990
|
+
if (e = `${e}`, e !== "byob") throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);
|
|
993
991
|
return e;
|
|
994
992
|
}
|
|
995
993
|
n(pa, "convertReadableStreamReaderMode");
|
|
996
|
-
function ba(e, t
|
|
994
|
+
function ba(e, t) {
|
|
997
995
|
var r;
|
|
998
|
-
ue(e, t
|
|
999
|
-
return { min: Fr((r = e?.min) !== null && r !== void 0 ? r : 1, `${t
|
|
996
|
+
ue(e, t);
|
|
997
|
+
return { min: Fr((r = e?.min) !== null && r !== void 0 ? r : 1, `${t} has member 'min' that`) };
|
|
1000
998
|
}
|
|
1001
999
|
n(ba, "convertByobReadOptions");
|
|
1002
1000
|
function Co(e) {
|
|
1003
1001
|
return new ce(e);
|
|
1004
1002
|
}
|
|
1005
1003
|
n(Co, "AcquireReadableStreamBYOBReader");
|
|
1006
|
-
function Po(e, t
|
|
1007
|
-
e._reader._readIntoRequests.push(t
|
|
1004
|
+
function Po(e, t) {
|
|
1005
|
+
e._reader._readIntoRequests.push(t);
|
|
1008
1006
|
}
|
|
1009
1007
|
n(Po, "ReadableStreamAddReadIntoRequest");
|
|
1010
|
-
function ma(e, t
|
|
1008
|
+
function ma(e, t, r) {
|
|
1011
1009
|
const u = e._reader._readIntoRequests.shift();
|
|
1012
|
-
r ? u._closeSteps(t
|
|
1010
|
+
r ? u._closeSteps(t) : u._chunkSteps(t);
|
|
1013
1011
|
}
|
|
1014
1012
|
n(ma, "ReadableStreamFulfillReadIntoRequest");
|
|
1015
1013
|
function vo(e) {
|
|
@@ -1017,28 +1015,28 @@ function Ns() {
|
|
|
1017
1015
|
}
|
|
1018
1016
|
n(vo, "ReadableStreamGetNumReadIntoRequests");
|
|
1019
1017
|
function Kr(e) {
|
|
1020
|
-
const t
|
|
1021
|
-
return !(t
|
|
1018
|
+
const t = e._reader;
|
|
1019
|
+
return !(t === void 0 || !je(t));
|
|
1022
1020
|
}
|
|
1023
1021
|
n(Kr, "ReadableStreamHasBYOBReader");
|
|
1024
|
-
const Sn = class Sn
|
|
1025
|
-
constructor(t
|
|
1026
|
-
if (Se(t
|
|
1027
|
-
if (!Ie(t
|
|
1028
|
-
Yn(this, t
|
|
1022
|
+
const Sn = class Sn {
|
|
1023
|
+
constructor(t) {
|
|
1024
|
+
if (Se(t, 1, "ReadableStreamBYOBReader"), jr(t, "First parameter"), qe(t)) throw new TypeError("This stream has already been locked for exclusive reading by another reader");
|
|
1025
|
+
if (!Ie(t._readableStreamController)) throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");
|
|
1026
|
+
Yn(this, t), this._readIntoRequests = new D();
|
|
1029
1027
|
}
|
|
1030
1028
|
get closed() {
|
|
1031
1029
|
return je(this) ? this._closedPromise : b(Yt("closed"));
|
|
1032
1030
|
}
|
|
1033
|
-
cancel(t
|
|
1034
|
-
return je(this) ? this._ownerReadableStream === void 0 ? b(Lt("cancel")) : Wr(this, t
|
|
1031
|
+
cancel(t = void 0) {
|
|
1032
|
+
return je(this) ? this._ownerReadableStream === void 0 ? b(Lt("cancel")) : Wr(this, t) : b(Yt("cancel"));
|
|
1035
1033
|
}
|
|
1036
|
-
read(t
|
|
1034
|
+
read(t, r = {}) {
|
|
1037
1035
|
if (!je(this)) return b(Yt("read"));
|
|
1038
|
-
if (!ArrayBuffer.isView(t
|
|
1039
|
-
if (t
|
|
1040
|
-
if (t
|
|
1041
|
-
if (Ae(t
|
|
1036
|
+
if (!ArrayBuffer.isView(t)) return b(/* @__PURE__ */ new TypeError("view must be an array buffer view"));
|
|
1037
|
+
if (t.byteLength === 0) return b(/* @__PURE__ */ new TypeError("view must have non-zero byteLength"));
|
|
1038
|
+
if (t.buffer.byteLength === 0) return b(/* @__PURE__ */ new TypeError("view's buffer must have non-zero byteLength"));
|
|
1039
|
+
if (Ae(t.buffer)) return b(/* @__PURE__ */ new TypeError("view's buffer has been detached"));
|
|
1042
1040
|
let s;
|
|
1043
1041
|
try {
|
|
1044
1042
|
s = ba(r, "options");
|
|
@@ -1047,15 +1045,15 @@ function Ns() {
|
|
|
1047
1045
|
}
|
|
1048
1046
|
const u = s.min;
|
|
1049
1047
|
if (u === 0) return b(/* @__PURE__ */ new TypeError("options.min must be greater than 0"));
|
|
1050
|
-
if (oa(t
|
|
1051
|
-
if (u > t
|
|
1052
|
-
} else if (u > t
|
|
1048
|
+
if (oa(t)) {
|
|
1049
|
+
if (u > t.byteLength) return b(/* @__PURE__ */ new RangeError("options.min must be less than or equal to view's byteLength"));
|
|
1050
|
+
} else if (u > t.length) return b(/* @__PURE__ */ new RangeError("options.min must be less than or equal to view's length"));
|
|
1053
1051
|
if (this._ownerReadableStream === void 0) return b(Lt("read from"));
|
|
1054
1052
|
let c, d;
|
|
1055
1053
|
const m = A((y, C) => {
|
|
1056
1054
|
c = y, d = C;
|
|
1057
1055
|
});
|
|
1058
|
-
return Eo(this, t
|
|
1056
|
+
return Eo(this, t, u, {
|
|
1059
1057
|
_chunkSteps: n((y) => c({
|
|
1060
1058
|
value: y,
|
|
1061
1059
|
done: !1
|
|
@@ -1087,9 +1085,9 @@ function Ns() {
|
|
|
1087
1085
|
return !l(e) || !Object.prototype.hasOwnProperty.call(e, "_readIntoRequests") ? !1 : e instanceof ce;
|
|
1088
1086
|
}
|
|
1089
1087
|
n(je, "IsReadableStreamBYOBReader");
|
|
1090
|
-
function Eo(e, t
|
|
1088
|
+
function Eo(e, t, r, s) {
|
|
1091
1089
|
const u = e._ownerReadableStream;
|
|
1092
|
-
u._disturbed = !0, u._state === "errored" ? s._errorSteps(u._storedError) : sa(u._readableStreamController, t
|
|
1090
|
+
u._disturbed = !0, u._state === "errored" ? s._errorSteps(u._storedError) : sa(u._readableStreamController, t, r, s);
|
|
1093
1091
|
}
|
|
1094
1092
|
n(Eo, "ReadableStreamBYOBReaderRead");
|
|
1095
1093
|
function ya(e) {
|
|
@@ -1097,10 +1095,10 @@ function Ns() {
|
|
|
1097
1095
|
Ao(e, /* @__PURE__ */ new TypeError("Reader was released"));
|
|
1098
1096
|
}
|
|
1099
1097
|
n(ya, "ReadableStreamBYOBReaderRelease");
|
|
1100
|
-
function Ao(e, t
|
|
1098
|
+
function Ao(e, t) {
|
|
1101
1099
|
const r = e._readIntoRequests;
|
|
1102
1100
|
e._readIntoRequests = new D(), r.forEach((s) => {
|
|
1103
|
-
s._errorSteps(t
|
|
1101
|
+
s._errorSteps(t);
|
|
1104
1102
|
});
|
|
1105
1103
|
}
|
|
1106
1104
|
n(Ao, "ReadableStreamBYOBReaderErrorReadIntoRequests");
|
|
@@ -1108,61 +1106,61 @@ function Ns() {
|
|
|
1108
1106
|
return /* @__PURE__ */ new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`);
|
|
1109
1107
|
}
|
|
1110
1108
|
n(Yt, "byobReaderBrandCheckException");
|
|
1111
|
-
function Tt(e, t
|
|
1109
|
+
function Tt(e, t) {
|
|
1112
1110
|
const { highWaterMark: r } = e;
|
|
1113
|
-
if (r === void 0) return t
|
|
1111
|
+
if (r === void 0) return t;
|
|
1114
1112
|
if (ao(r) || r < 0) throw new RangeError("Invalid highWaterMark");
|
|
1115
1113
|
return r;
|
|
1116
1114
|
}
|
|
1117
1115
|
n(Tt, "ExtractHighWaterMark");
|
|
1118
1116
|
function Gt(e) {
|
|
1119
|
-
const { size: t
|
|
1120
|
-
return t
|
|
1117
|
+
const { size: t } = e;
|
|
1118
|
+
return t || (() => 1);
|
|
1121
1119
|
}
|
|
1122
1120
|
n(Gt, "ExtractSizeAlgorithm");
|
|
1123
|
-
function Zt(e, t
|
|
1124
|
-
ue(e, t
|
|
1121
|
+
function Zt(e, t) {
|
|
1122
|
+
ue(e, t);
|
|
1125
1123
|
const r = e?.highWaterMark, s = e?.size;
|
|
1126
1124
|
return {
|
|
1127
1125
|
highWaterMark: r === void 0 ? void 0 : Ir(r),
|
|
1128
|
-
size: s === void 0 ? void 0 : ga(s, `${t
|
|
1126
|
+
size: s === void 0 ? void 0 : ga(s, `${t} has member 'size' that`)
|
|
1129
1127
|
};
|
|
1130
1128
|
}
|
|
1131
1129
|
n(Zt, "convertQueuingStrategy");
|
|
1132
|
-
function ga(e, t
|
|
1133
|
-
return Z(e, t
|
|
1130
|
+
function ga(e, t) {
|
|
1131
|
+
return Z(e, t), (r) => Ir(e(r));
|
|
1134
1132
|
}
|
|
1135
1133
|
n(ga, "convertQueuingStrategySize");
|
|
1136
|
-
function _a(e, t
|
|
1137
|
-
ue(e, t
|
|
1134
|
+
function _a(e, t) {
|
|
1135
|
+
ue(e, t);
|
|
1138
1136
|
const r = e?.abort, s = e?.close, u = e?.start, c = e?.type, d = e?.write;
|
|
1139
1137
|
return {
|
|
1140
|
-
abort: r === void 0 ? void 0 : Sa(r, e, `${t
|
|
1141
|
-
close: s === void 0 ? void 0 : wa(s, e, `${t
|
|
1142
|
-
start: u === void 0 ? void 0 : Ra(u, e, `${t
|
|
1143
|
-
write: d === void 0 ? void 0 : Ta(d, e, `${t
|
|
1138
|
+
abort: r === void 0 ? void 0 : Sa(r, e, `${t} has member 'abort' that`),
|
|
1139
|
+
close: s === void 0 ? void 0 : wa(s, e, `${t} has member 'close' that`),
|
|
1140
|
+
start: u === void 0 ? void 0 : Ra(u, e, `${t} has member 'start' that`),
|
|
1141
|
+
write: d === void 0 ? void 0 : Ta(d, e, `${t} has member 'write' that`),
|
|
1144
1142
|
type: c
|
|
1145
1143
|
};
|
|
1146
1144
|
}
|
|
1147
1145
|
n(_a, "convertUnderlyingSink");
|
|
1148
|
-
function Sa(e, t
|
|
1149
|
-
return Z(e, r), (s) => j(e, t
|
|
1146
|
+
function Sa(e, t, r) {
|
|
1147
|
+
return Z(e, r), (s) => j(e, t, [s]);
|
|
1150
1148
|
}
|
|
1151
1149
|
n(Sa, "convertUnderlyingSinkAbortCallback");
|
|
1152
|
-
function wa(e, t
|
|
1153
|
-
return Z(e, r), () => j(e, t
|
|
1150
|
+
function wa(e, t, r) {
|
|
1151
|
+
return Z(e, r), () => j(e, t, []);
|
|
1154
1152
|
}
|
|
1155
1153
|
n(wa, "convertUnderlyingSinkCloseCallback");
|
|
1156
|
-
function Ra(e, t
|
|
1157
|
-
return Z(e, r), (s) => z(e, t
|
|
1154
|
+
function Ra(e, t, r) {
|
|
1155
|
+
return Z(e, r), (s) => z(e, t, [s]);
|
|
1158
1156
|
}
|
|
1159
1157
|
n(Ra, "convertUnderlyingSinkStartCallback");
|
|
1160
|
-
function Ta(e, t
|
|
1161
|
-
return Z(e, r), (s, u) => j(e, t
|
|
1158
|
+
function Ta(e, t, r) {
|
|
1159
|
+
return Z(e, r), (s, u) => j(e, t, [s, u]);
|
|
1162
1160
|
}
|
|
1163
1161
|
n(Ta, "convertUnderlyingSinkWriteCallback");
|
|
1164
|
-
function Bo(e, t
|
|
1165
|
-
if (!Ge(e)) throw new TypeError(`${t
|
|
1162
|
+
function Bo(e, t) {
|
|
1163
|
+
if (!Ge(e)) throw new TypeError(`${t} is not a WritableStream.`);
|
|
1166
1164
|
}
|
|
1167
1165
|
n(Bo, "assertWritableStream");
|
|
1168
1166
|
function Ca(e) {
|
|
@@ -1179,10 +1177,10 @@ function Ns() {
|
|
|
1179
1177
|
if (Pa) return new AbortController();
|
|
1180
1178
|
}
|
|
1181
1179
|
n(va, "createAbortController");
|
|
1182
|
-
const wn = class wn
|
|
1183
|
-
constructor(t
|
|
1184
|
-
t
|
|
1185
|
-
const s = Zt(r, "Second parameter"), u = _a(t
|
|
1180
|
+
const wn = class wn {
|
|
1181
|
+
constructor(t = {}, r = {}) {
|
|
1182
|
+
t === void 0 ? t = null : Jn(t, "First parameter");
|
|
1183
|
+
const s = Zt(r, "Second parameter"), u = _a(t, "First parameter");
|
|
1186
1184
|
if (Wo(this), u.type !== void 0) throw new RangeError("Invalid type is specified");
|
|
1187
1185
|
const d = Gt(s), m = Tt(s, 1);
|
|
1188
1186
|
Da(this, u, m, d);
|
|
@@ -1191,8 +1189,8 @@ function Ns() {
|
|
|
1191
1189
|
if (!Ge(this)) throw tr("locked");
|
|
1192
1190
|
return Ze(this);
|
|
1193
1191
|
}
|
|
1194
|
-
abort(t
|
|
1195
|
-
return Ge(this) ? Ze(this) ? b(/* @__PURE__ */ new TypeError("Cannot abort a stream that already has a writer")) : Kt(this, t
|
|
1192
|
+
abort(t = void 0) {
|
|
1193
|
+
return Ge(this) ? Ze(this) ? b(/* @__PURE__ */ new TypeError("Cannot abort a stream that already has a writer")) : Kt(this, t) : b(tr("abort"));
|
|
1196
1194
|
}
|
|
1197
1195
|
close() {
|
|
1198
1196
|
return Ge(this) ? Ze(this) ? b(/* @__PURE__ */ new TypeError("Cannot close a stream that already has a writer")) : he(this) ? b(/* @__PURE__ */ new TypeError("Cannot close an already-closing stream")) : qo(this) : b(tr("close"));
|
|
@@ -1217,10 +1215,10 @@ function Ns() {
|
|
|
1217
1215
|
return new re(e);
|
|
1218
1216
|
}
|
|
1219
1217
|
n(ko, "AcquireWritableStreamDefaultWriter");
|
|
1220
|
-
function Ea(e, t
|
|
1218
|
+
function Ea(e, t, r, s, u = 1, c = () => 1) {
|
|
1221
1219
|
const d = Object.create(de.prototype);
|
|
1222
1220
|
Wo(d);
|
|
1223
|
-
return Lo(d, Object.create(ke.prototype), e, t
|
|
1221
|
+
return Lo(d, Object.create(ke.prototype), e, t, r, s, u, c), d;
|
|
1224
1222
|
}
|
|
1225
1223
|
n(Ea, "CreateWritableStream");
|
|
1226
1224
|
function Wo(e) {
|
|
@@ -1235,37 +1233,37 @@ function Ns() {
|
|
|
1235
1233
|
return e._writer !== void 0;
|
|
1236
1234
|
}
|
|
1237
1235
|
n(Ze, "IsWritableStreamLocked");
|
|
1238
|
-
function Kt(e, t
|
|
1236
|
+
function Kt(e, t) {
|
|
1239
1237
|
var r;
|
|
1240
1238
|
if (e._state === "closed" || e._state === "errored") return T(void 0);
|
|
1241
|
-
e._writableStreamController._abortReason = t
|
|
1239
|
+
e._writableStreamController._abortReason = t, (r = e._writableStreamController._abortController) === null || r === void 0 || r.abort(t);
|
|
1242
1240
|
const s = e._state;
|
|
1243
1241
|
if (s === "closed" || s === "errored") return T(void 0);
|
|
1244
1242
|
if (e._pendingAbortRequest !== void 0) return e._pendingAbortRequest._promise;
|
|
1245
1243
|
let u = !1;
|
|
1246
|
-
s === "erroring" && (u = !0, t
|
|
1244
|
+
s === "erroring" && (u = !0, t = void 0);
|
|
1247
1245
|
const c = A((d, m) => {
|
|
1248
1246
|
e._pendingAbortRequest = {
|
|
1249
1247
|
_promise: void 0,
|
|
1250
1248
|
_resolve: d,
|
|
1251
1249
|
_reject: m,
|
|
1252
|
-
_reason: t
|
|
1250
|
+
_reason: t,
|
|
1253
1251
|
_wasAlreadyErroring: u
|
|
1254
1252
|
};
|
|
1255
1253
|
});
|
|
1256
|
-
return e._pendingAbortRequest._promise = c, u || Xr(e, t
|
|
1254
|
+
return e._pendingAbortRequest._promise = c, u || Xr(e, t), c;
|
|
1257
1255
|
}
|
|
1258
1256
|
n(Kt, "WritableStreamAbort");
|
|
1259
1257
|
function qo(e) {
|
|
1260
|
-
const t
|
|
1261
|
-
if (t
|
|
1258
|
+
const t = e._state;
|
|
1259
|
+
if (t === "closed" || t === "errored") return b(/* @__PURE__ */ new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));
|
|
1262
1260
|
const r = A((u, c) => {
|
|
1263
1261
|
e._closeRequest = {
|
|
1264
1262
|
_resolve: u,
|
|
1265
1263
|
_reject: c
|
|
1266
1264
|
};
|
|
1267
1265
|
}), s = e._writer;
|
|
1268
|
-
return s !== void 0 && e._backpressure && t
|
|
1266
|
+
return s !== void 0 && e._backpressure && t === "writable" && ln(s), Ma(e._writableStreamController), r;
|
|
1269
1267
|
}
|
|
1270
1268
|
n(qo, "WritableStreamClose");
|
|
1271
1269
|
function Aa(e) {
|
|
@@ -1278,33 +1276,33 @@ function Ns() {
|
|
|
1278
1276
|
});
|
|
1279
1277
|
}
|
|
1280
1278
|
n(Aa, "WritableStreamAddWriteRequest");
|
|
1281
|
-
function Jr(e, t
|
|
1279
|
+
function Jr(e, t) {
|
|
1282
1280
|
if (e._state === "writable") {
|
|
1283
|
-
Xr(e, t
|
|
1281
|
+
Xr(e, t);
|
|
1284
1282
|
return;
|
|
1285
1283
|
}
|
|
1286
1284
|
en(e);
|
|
1287
1285
|
}
|
|
1288
1286
|
n(Jr, "WritableStreamDealWithRejection");
|
|
1289
|
-
function Xr(e, t
|
|
1287
|
+
function Xr(e, t) {
|
|
1290
1288
|
const r = e._writableStreamController;
|
|
1291
|
-
e._state = "erroring", e._storedError = t
|
|
1289
|
+
e._state = "erroring", e._storedError = t;
|
|
1292
1290
|
const s = e._writer;
|
|
1293
|
-
s !== void 0 && zo(s, t
|
|
1291
|
+
s !== void 0 && zo(s, t), !Oa(e) && r._started && en(e);
|
|
1294
1292
|
}
|
|
1295
1293
|
n(Xr, "WritableStreamStartErroring");
|
|
1296
1294
|
function en(e) {
|
|
1297
1295
|
e._state = "errored", e._writableStreamController[Qn]();
|
|
1298
|
-
const t
|
|
1296
|
+
const t = e._storedError;
|
|
1299
1297
|
if (e._writeRequests.forEach((u) => {
|
|
1300
|
-
u._reject(t
|
|
1298
|
+
u._reject(t);
|
|
1301
1299
|
}), e._writeRequests = new D(), e._pendingAbortRequest === void 0) {
|
|
1302
1300
|
Jt(e);
|
|
1303
1301
|
return;
|
|
1304
1302
|
}
|
|
1305
1303
|
const r = e._pendingAbortRequest;
|
|
1306
1304
|
if (e._pendingAbortRequest = void 0, r._wasAlreadyErroring) {
|
|
1307
|
-
r._reject(t
|
|
1305
|
+
r._reject(t), Jt(e);
|
|
1308
1306
|
return;
|
|
1309
1307
|
}
|
|
1310
1308
|
g(e._writableStreamController[jt](r._reason), () => (r._resolve(), Jt(e), null), (u) => (r._reject(u), Jt(e), null));
|
|
@@ -1314,8 +1312,8 @@ function Ns() {
|
|
|
1314
1312
|
e._inFlightWriteRequest._resolve(void 0), e._inFlightWriteRequest = void 0;
|
|
1315
1313
|
}
|
|
1316
1314
|
n(Ba, "WritableStreamFinishInFlightWrite");
|
|
1317
|
-
function ka(e, t
|
|
1318
|
-
e._inFlightWriteRequest._reject(t
|
|
1315
|
+
function ka(e, t) {
|
|
1316
|
+
e._inFlightWriteRequest._reject(t), e._inFlightWriteRequest = void 0, Jr(e, t);
|
|
1319
1317
|
}
|
|
1320
1318
|
n(ka, "WritableStreamFinishInFlightWriteWithError");
|
|
1321
1319
|
function Wa(e) {
|
|
@@ -1324,8 +1322,8 @@ function Ns() {
|
|
|
1324
1322
|
r !== void 0 && Uo(r);
|
|
1325
1323
|
}
|
|
1326
1324
|
n(Wa, "WritableStreamFinishInFlightClose");
|
|
1327
|
-
function qa(e, t
|
|
1328
|
-
e._inFlightCloseRequest._reject(t
|
|
1325
|
+
function qa(e, t) {
|
|
1326
|
+
e._inFlightCloseRequest._reject(t), e._inFlightCloseRequest = void 0, e._pendingAbortRequest !== void 0 && (e._pendingAbortRequest._reject(t), e._pendingAbortRequest = void 0), Jr(e, t);
|
|
1329
1327
|
}
|
|
1330
1328
|
n(qa, "WritableStreamFinishInFlightCloseWithError");
|
|
1331
1329
|
function he(e) {
|
|
@@ -1346,25 +1344,25 @@ function Ns() {
|
|
|
1346
1344
|
n(Ia, "WritableStreamMarkFirstWriteRequestInFlight");
|
|
1347
1345
|
function Jt(e) {
|
|
1348
1346
|
e._closeRequest !== void 0 && (e._closeRequest._reject(e._storedError), e._closeRequest = void 0);
|
|
1349
|
-
const t
|
|
1350
|
-
t
|
|
1347
|
+
const t = e._writer;
|
|
1348
|
+
t !== void 0 && an(t, e._storedError);
|
|
1351
1349
|
}
|
|
1352
1350
|
n(Jt, "WritableStreamRejectCloseAndClosedPromiseIfNeeded");
|
|
1353
|
-
function tn(e, t
|
|
1351
|
+
function tn(e, t) {
|
|
1354
1352
|
const r = e._writer;
|
|
1355
|
-
r !== void 0 && t
|
|
1353
|
+
r !== void 0 && t !== e._backpressure && (t ? Ya(r) : ln(r)), e._backpressure = t;
|
|
1356
1354
|
}
|
|
1357
1355
|
n(tn, "WritableStreamUpdateBackpressure");
|
|
1358
|
-
const Rn = class Rn
|
|
1359
|
-
constructor(t
|
|
1360
|
-
if (Se(t
|
|
1361
|
-
this._ownerWritableStream = t
|
|
1362
|
-
const r = t
|
|
1363
|
-
if (r === "writable") !he(t
|
|
1364
|
-
else if (r === "erroring") sn(this, t
|
|
1356
|
+
const Rn = class Rn {
|
|
1357
|
+
constructor(t) {
|
|
1358
|
+
if (Se(t, 1, "WritableStreamDefaultWriter"), Bo(t, "First parameter"), Ze(t)) throw new TypeError("This stream has already been locked for exclusive writing by another writer");
|
|
1359
|
+
this._ownerWritableStream = t, t._writer = this;
|
|
1360
|
+
const r = t._state;
|
|
1361
|
+
if (r === "writable") !he(t) && t._backpressure ? nr(this) : xo(this), rr(this);
|
|
1362
|
+
else if (r === "erroring") sn(this, t._storedError), rr(this);
|
|
1365
1363
|
else if (r === "closed") xo(this), Va(this);
|
|
1366
1364
|
else {
|
|
1367
|
-
const s = t
|
|
1365
|
+
const s = t._storedError;
|
|
1368
1366
|
sn(this, s), Mo(this, s);
|
|
1369
1367
|
}
|
|
1370
1368
|
}
|
|
@@ -1379,20 +1377,20 @@ function Ns() {
|
|
|
1379
1377
|
get ready() {
|
|
1380
1378
|
return Le(this) ? this._readyPromise : b($e("ready"));
|
|
1381
1379
|
}
|
|
1382
|
-
abort(t
|
|
1383
|
-
return Le(this) ? this._ownerWritableStream === void 0 ? b(Pt("abort")) : Fa(this, t
|
|
1380
|
+
abort(t = void 0) {
|
|
1381
|
+
return Le(this) ? this._ownerWritableStream === void 0 ? b(Pt("abort")) : Fa(this, t) : b($e("abort"));
|
|
1384
1382
|
}
|
|
1385
1383
|
close() {
|
|
1386
1384
|
if (!Le(this)) return b($e("close"));
|
|
1387
|
-
const t
|
|
1388
|
-
return t
|
|
1385
|
+
const t = this._ownerWritableStream;
|
|
1386
|
+
return t === void 0 ? b(Pt("close")) : he(t) ? b(/* @__PURE__ */ new TypeError("Cannot close an already-closing stream")) : Oo(this);
|
|
1389
1387
|
}
|
|
1390
1388
|
releaseLock() {
|
|
1391
1389
|
if (!Le(this)) throw $e("releaseLock");
|
|
1392
1390
|
this._ownerWritableStream !== void 0 && Io(this);
|
|
1393
1391
|
}
|
|
1394
|
-
write(t
|
|
1395
|
-
return Le(this) ? this._ownerWritableStream === void 0 ? b(Pt("write to")) : Fo(this, t
|
|
1392
|
+
write(t = void 0) {
|
|
1393
|
+
return Le(this) ? this._ownerWritableStream === void 0 ? b(Pt("write to")) : Fo(this, t) : b($e("write"));
|
|
1396
1394
|
}
|
|
1397
1395
|
};
|
|
1398
1396
|
n(Rn, "WritableStreamDefaultWriter");
|
|
@@ -1413,51 +1411,51 @@ function Ns() {
|
|
|
1413
1411
|
return !l(e) || !Object.prototype.hasOwnProperty.call(e, "_ownerWritableStream") ? !1 : e instanceof re;
|
|
1414
1412
|
}
|
|
1415
1413
|
n(Le, "IsWritableStreamDefaultWriter");
|
|
1416
|
-
function Fa(e, t
|
|
1414
|
+
function Fa(e, t) {
|
|
1417
1415
|
const r = e._ownerWritableStream;
|
|
1418
|
-
return Kt(r, t
|
|
1416
|
+
return Kt(r, t);
|
|
1419
1417
|
}
|
|
1420
1418
|
n(Fa, "WritableStreamDefaultWriterAbort");
|
|
1421
1419
|
function Oo(e) {
|
|
1422
|
-
const t
|
|
1423
|
-
return qo(t
|
|
1420
|
+
const t = e._ownerWritableStream;
|
|
1421
|
+
return qo(t);
|
|
1424
1422
|
}
|
|
1425
1423
|
n(Oo, "WritableStreamDefaultWriterClose");
|
|
1426
1424
|
function ja(e) {
|
|
1427
|
-
const t
|
|
1428
|
-
return he(t
|
|
1425
|
+
const t = e._ownerWritableStream, r = t._state;
|
|
1426
|
+
return he(t) || r === "closed" ? T(void 0) : r === "errored" ? b(t._storedError) : Oo(e);
|
|
1429
1427
|
}
|
|
1430
1428
|
n(ja, "WritableStreamDefaultWriterCloseWithErrorPropagation");
|
|
1431
|
-
function La(e, t
|
|
1432
|
-
e._closedPromiseState === "pending" ? an(e, t
|
|
1429
|
+
function La(e, t) {
|
|
1430
|
+
e._closedPromiseState === "pending" ? an(e, t) : Qa(e, t);
|
|
1433
1431
|
}
|
|
1434
1432
|
n(La, "WritableStreamDefaultWriterEnsureClosedPromiseRejected");
|
|
1435
|
-
function zo(e, t
|
|
1436
|
-
e._readyPromiseState === "pending" ? No(e, t
|
|
1433
|
+
function zo(e, t) {
|
|
1434
|
+
e._readyPromiseState === "pending" ? No(e, t) : Ga(e, t);
|
|
1437
1435
|
}
|
|
1438
1436
|
n(zo, "WritableStreamDefaultWriterEnsureReadyPromiseRejected");
|
|
1439
1437
|
function $a(e) {
|
|
1440
|
-
const t
|
|
1441
|
-
return r === "errored" || r === "erroring" ? null : r === "closed" ? 0 : $o(t
|
|
1438
|
+
const t = e._ownerWritableStream, r = t._state;
|
|
1439
|
+
return r === "errored" || r === "erroring" ? null : r === "closed" ? 0 : $o(t._writableStreamController);
|
|
1442
1440
|
}
|
|
1443
1441
|
n($a, "WritableStreamDefaultWriterGetDesiredSize");
|
|
1444
1442
|
function Io(e) {
|
|
1445
|
-
const t
|
|
1446
|
-
zo(e, r), La(e, r), t
|
|
1443
|
+
const t = e._ownerWritableStream, r = /* @__PURE__ */ new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");
|
|
1444
|
+
zo(e, r), La(e, r), t._writer = void 0, e._ownerWritableStream = void 0;
|
|
1447
1445
|
}
|
|
1448
1446
|
n(Io, "WritableStreamDefaultWriterRelease");
|
|
1449
|
-
function Fo(e, t
|
|
1450
|
-
const r = e._ownerWritableStream, s = r._writableStreamController, u = Ua(s, t
|
|
1447
|
+
function Fo(e, t) {
|
|
1448
|
+
const r = e._ownerWritableStream, s = r._writableStreamController, u = Ua(s, t);
|
|
1451
1449
|
if (r !== e._ownerWritableStream) return b(Pt("write to"));
|
|
1452
1450
|
const c = r._state;
|
|
1453
1451
|
if (c === "errored") return b(r._storedError);
|
|
1454
1452
|
if (he(r) || c === "closed") return b(/* @__PURE__ */ new TypeError("The stream is closing or closed and cannot be written to"));
|
|
1455
1453
|
if (c === "erroring") return b(r._storedError);
|
|
1456
1454
|
const d = Aa(r);
|
|
1457
|
-
return xa(s, t
|
|
1455
|
+
return xa(s, t, u), d;
|
|
1458
1456
|
}
|
|
1459
1457
|
n(Fo, "WritableStreamDefaultWriterWrite");
|
|
1460
|
-
const jo = {}, Tn = class Tn
|
|
1458
|
+
const jo = {}, Tn = class Tn {
|
|
1461
1459
|
constructor() {
|
|
1462
1460
|
throw new TypeError("Illegal constructor");
|
|
1463
1461
|
}
|
|
@@ -1470,12 +1468,12 @@ function Ns() {
|
|
|
1470
1468
|
if (this._abortController === void 0) throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");
|
|
1471
1469
|
return this._abortController.signal;
|
|
1472
1470
|
}
|
|
1473
|
-
error(t
|
|
1471
|
+
error(t = void 0) {
|
|
1474
1472
|
if (!rn(this)) throw on("error");
|
|
1475
|
-
this._controlledWritableStream._state === "writable" && Do(this, t
|
|
1473
|
+
this._controlledWritableStream._state === "writable" && Do(this, t);
|
|
1476
1474
|
}
|
|
1477
|
-
[jt](t
|
|
1478
|
-
const r = this._abortAlgorithm(t
|
|
1475
|
+
[jt](t) {
|
|
1476
|
+
const r = this._abortAlgorithm(t);
|
|
1479
1477
|
return Xt(this), r;
|
|
1480
1478
|
}
|
|
1481
1479
|
[Qn]() {
|
|
@@ -1496,16 +1494,16 @@ function Ns() {
|
|
|
1496
1494
|
return !l(e) || !Object.prototype.hasOwnProperty.call(e, "_controlledWritableStream") ? !1 : e instanceof ke;
|
|
1497
1495
|
}
|
|
1498
1496
|
n(rn, "IsWritableStreamDefaultController");
|
|
1499
|
-
function Lo(e, t
|
|
1500
|
-
t
|
|
1501
|
-
tn(e, nn(t
|
|
1502
|
-
g(T(r()), () => (t
|
|
1497
|
+
function Lo(e, t, r, s, u, c, d, m) {
|
|
1498
|
+
t._controlledWritableStream = e, e._writableStreamController = t, t._queue = void 0, t._queueTotalSize = void 0, Be(t), t._abortReason = void 0, t._abortController = va(), t._started = !1, t._strategySizeAlgorithm = m, t._strategyHWM = d, t._writeAlgorithm = s, t._closeAlgorithm = u, t._abortAlgorithm = c;
|
|
1499
|
+
tn(e, nn(t));
|
|
1500
|
+
g(T(r()), () => (t._started = !0, er(t), null), (P) => (t._started = !0, Jr(e, P), null));
|
|
1503
1501
|
}
|
|
1504
1502
|
n(Lo, "SetUpWritableStreamDefaultController");
|
|
1505
|
-
function Da(e, t
|
|
1503
|
+
function Da(e, t, r, s) {
|
|
1506
1504
|
const u = Object.create(ke.prototype);
|
|
1507
1505
|
let c, d, m, R;
|
|
1508
|
-
t
|
|
1506
|
+
t.start !== void 0 ? c = n(() => t.start(u), "startAlgorithm") : c = n(() => {}, "startAlgorithm"), t.write !== void 0 ? d = n((y) => t.write(y, u), "writeAlgorithm") : d = n(() => T(void 0), "writeAlgorithm"), t.close !== void 0 ? m = n(() => t.close(), "closeAlgorithm") : m = n(() => T(void 0), "closeAlgorithm"), t.abort !== void 0 ? R = n((y) => t.abort(y), "abortAlgorithm") : R = n(() => T(void 0), "abortAlgorithm"), Lo(e, u, c, d, m, R, r, s);
|
|
1509
1507
|
}
|
|
1510
1508
|
n(Da, "SetUpWritableStreamDefaultControllerFromUnderlyingSink");
|
|
1511
1509
|
function Xt(e) {
|
|
@@ -1516,9 +1514,9 @@ function Ns() {
|
|
|
1516
1514
|
Nr(e, jo, 0), er(e);
|
|
1517
1515
|
}
|
|
1518
1516
|
n(Ma, "WritableStreamDefaultControllerClose");
|
|
1519
|
-
function Ua(e, t
|
|
1517
|
+
function Ua(e, t) {
|
|
1520
1518
|
try {
|
|
1521
|
-
return e._strategySizeAlgorithm(t
|
|
1519
|
+
return e._strategySizeAlgorithm(t);
|
|
1522
1520
|
} catch (r) {
|
|
1523
1521
|
return Ct(e, r), 1;
|
|
1524
1522
|
}
|
|
@@ -1528,9 +1526,9 @@ function Ns() {
|
|
|
1528
1526
|
return e._strategyHWM - e._queueTotalSize;
|
|
1529
1527
|
}
|
|
1530
1528
|
n($o, "WritableStreamDefaultControllerGetDesiredSize");
|
|
1531
|
-
function xa(e, t
|
|
1529
|
+
function xa(e, t, r) {
|
|
1532
1530
|
try {
|
|
1533
|
-
Nr(e, t
|
|
1531
|
+
Nr(e, t, r);
|
|
1534
1532
|
} catch (u) {
|
|
1535
1533
|
Ct(e, u);
|
|
1536
1534
|
return;
|
|
@@ -1541,10 +1539,10 @@ function Ns() {
|
|
|
1541
1539
|
}
|
|
1542
1540
|
n(xa, "WritableStreamDefaultControllerWrite");
|
|
1543
1541
|
function er(e) {
|
|
1544
|
-
const t
|
|
1545
|
-
if (!e._started || t
|
|
1546
|
-
if (t
|
|
1547
|
-
en(t
|
|
1542
|
+
const t = e._controlledWritableStream;
|
|
1543
|
+
if (!e._started || t._inFlightWriteRequest !== void 0) return;
|
|
1544
|
+
if (t._state === "erroring") {
|
|
1545
|
+
en(t);
|
|
1548
1546
|
return;
|
|
1549
1547
|
}
|
|
1550
1548
|
if (e._queue.length === 0) return;
|
|
@@ -1552,21 +1550,21 @@ function Ns() {
|
|
|
1552
1550
|
s === jo ? Na(e) : Ha(e, s);
|
|
1553
1551
|
}
|
|
1554
1552
|
n(er, "WritableStreamDefaultControllerAdvanceQueueIfNeeded");
|
|
1555
|
-
function Ct(e, t
|
|
1556
|
-
e._controlledWritableStream._state === "writable" && Do(e, t
|
|
1553
|
+
function Ct(e, t) {
|
|
1554
|
+
e._controlledWritableStream._state === "writable" && Do(e, t);
|
|
1557
1555
|
}
|
|
1558
1556
|
n(Ct, "WritableStreamDefaultControllerErrorIfNeeded");
|
|
1559
1557
|
function Na(e) {
|
|
1560
|
-
const t
|
|
1561
|
-
za(t
|
|
1558
|
+
const t = e._controlledWritableStream;
|
|
1559
|
+
za(t), xr(e);
|
|
1562
1560
|
const r = e._closeAlgorithm();
|
|
1563
|
-
Xt(e), g(r, () => (Wa(t
|
|
1561
|
+
Xt(e), g(r, () => (Wa(t), null), (s) => (qa(t, s), null));
|
|
1564
1562
|
}
|
|
1565
1563
|
n(Na, "WritableStreamDefaultControllerProcessClose");
|
|
1566
|
-
function Ha(e, t
|
|
1564
|
+
function Ha(e, t) {
|
|
1567
1565
|
const r = e._controlledWritableStream;
|
|
1568
1566
|
Ia(r);
|
|
1569
|
-
g(e._writeAlgorithm(t
|
|
1567
|
+
g(e._writeAlgorithm(t), () => {
|
|
1570
1568
|
Ba(r);
|
|
1571
1569
|
const u = r._state;
|
|
1572
1570
|
if (xr(e), !he(r) && u === "writable") tn(r, nn(e));
|
|
@@ -1578,9 +1576,9 @@ function Ns() {
|
|
|
1578
1576
|
return $o(e) <= 0;
|
|
1579
1577
|
}
|
|
1580
1578
|
n(nn, "WritableStreamDefaultControllerGetBackpressure");
|
|
1581
|
-
function Do(e, t
|
|
1579
|
+
function Do(e, t) {
|
|
1582
1580
|
const r = e._controlledWritableStream;
|
|
1583
|
-
Xt(e), Xr(r, t
|
|
1581
|
+
Xt(e), Xr(r, t);
|
|
1584
1582
|
}
|
|
1585
1583
|
n(Do, "WritableStreamDefaultControllerError");
|
|
1586
1584
|
function tr(e) {
|
|
@@ -1600,25 +1598,25 @@ function Ns() {
|
|
|
1600
1598
|
}
|
|
1601
1599
|
n(Pt, "defaultWriterLockException");
|
|
1602
1600
|
function rr(e) {
|
|
1603
|
-
e._closedPromise = A((t
|
|
1604
|
-
e._closedPromise_resolve = t
|
|
1601
|
+
e._closedPromise = A((t, r) => {
|
|
1602
|
+
e._closedPromise_resolve = t, e._closedPromise_reject = r, e._closedPromiseState = "pending";
|
|
1605
1603
|
});
|
|
1606
1604
|
}
|
|
1607
1605
|
n(rr, "defaultWriterClosedPromiseInitialize");
|
|
1608
|
-
function Mo(e, t
|
|
1609
|
-
rr(e), an(e, t
|
|
1606
|
+
function Mo(e, t) {
|
|
1607
|
+
rr(e), an(e, t);
|
|
1610
1608
|
}
|
|
1611
1609
|
n(Mo, "defaultWriterClosedPromiseInitializeAsRejected");
|
|
1612
1610
|
function Va(e) {
|
|
1613
1611
|
rr(e), Uo(e);
|
|
1614
1612
|
}
|
|
1615
1613
|
n(Va, "defaultWriterClosedPromiseInitializeAsResolved");
|
|
1616
|
-
function an(e, t
|
|
1617
|
-
e._closedPromise_reject !== void 0 && (Q(e._closedPromise), e._closedPromise_reject(t
|
|
1614
|
+
function an(e, t) {
|
|
1615
|
+
e._closedPromise_reject !== void 0 && (Q(e._closedPromise), e._closedPromise_reject(t), e._closedPromise_resolve = void 0, e._closedPromise_reject = void 0, e._closedPromiseState = "rejected");
|
|
1618
1616
|
}
|
|
1619
1617
|
n(an, "defaultWriterClosedPromiseReject");
|
|
1620
|
-
function Qa(e, t
|
|
1621
|
-
Mo(e, t
|
|
1618
|
+
function Qa(e, t) {
|
|
1619
|
+
Mo(e, t);
|
|
1622
1620
|
}
|
|
1623
1621
|
n(Qa, "defaultWriterClosedPromiseResetToRejected");
|
|
1624
1622
|
function Uo(e) {
|
|
@@ -1626,29 +1624,29 @@ function Ns() {
|
|
|
1626
1624
|
}
|
|
1627
1625
|
n(Uo, "defaultWriterClosedPromiseResolve");
|
|
1628
1626
|
function nr(e) {
|
|
1629
|
-
e._readyPromise = A((t
|
|
1630
|
-
e._readyPromise_resolve = t
|
|
1627
|
+
e._readyPromise = A((t, r) => {
|
|
1628
|
+
e._readyPromise_resolve = t, e._readyPromise_reject = r;
|
|
1631
1629
|
}), e._readyPromiseState = "pending";
|
|
1632
1630
|
}
|
|
1633
1631
|
n(nr, "defaultWriterReadyPromiseInitialize");
|
|
1634
|
-
function sn(e, t
|
|
1635
|
-
nr(e), No(e, t
|
|
1632
|
+
function sn(e, t) {
|
|
1633
|
+
nr(e), No(e, t);
|
|
1636
1634
|
}
|
|
1637
1635
|
n(sn, "defaultWriterReadyPromiseInitializeAsRejected");
|
|
1638
1636
|
function xo(e) {
|
|
1639
1637
|
nr(e), ln(e);
|
|
1640
1638
|
}
|
|
1641
1639
|
n(xo, "defaultWriterReadyPromiseInitializeAsResolved");
|
|
1642
|
-
function No(e, t
|
|
1643
|
-
e._readyPromise_reject !== void 0 && (Q(e._readyPromise), e._readyPromise_reject(t
|
|
1640
|
+
function No(e, t) {
|
|
1641
|
+
e._readyPromise_reject !== void 0 && (Q(e._readyPromise), e._readyPromise_reject(t), e._readyPromise_resolve = void 0, e._readyPromise_reject = void 0, e._readyPromiseState = "rejected");
|
|
1644
1642
|
}
|
|
1645
1643
|
n(No, "defaultWriterReadyPromiseReject");
|
|
1646
1644
|
function Ya(e) {
|
|
1647
1645
|
nr(e);
|
|
1648
1646
|
}
|
|
1649
1647
|
n(Ya, "defaultWriterReadyPromiseReset");
|
|
1650
|
-
function Ga(e, t
|
|
1651
|
-
sn(e, t
|
|
1648
|
+
function Ga(e, t) {
|
|
1649
|
+
sn(e, t);
|
|
1652
1650
|
}
|
|
1653
1651
|
n(Ga, "defaultWriterReadyPromiseResetToRejected");
|
|
1654
1652
|
function ln(e) {
|
|
@@ -1688,8 +1686,8 @@ function Ns() {
|
|
|
1688
1686
|
}
|
|
1689
1687
|
n(Xa, "createPolyfill");
|
|
1690
1688
|
const es = Ja() || Xa();
|
|
1691
|
-
function Ho(e, t
|
|
1692
|
-
const d = Qe(e), m = ko(t
|
|
1689
|
+
function Ho(e, t, r, s, u, c) {
|
|
1690
|
+
const d = Qe(e), m = ko(t);
|
|
1693
1691
|
e._disturbed = !0;
|
|
1694
1692
|
let R = !1, y = T(void 0);
|
|
1695
1693
|
return A((C, P) => {
|
|
@@ -1697,7 +1695,7 @@ function Ns() {
|
|
|
1697
1695
|
if (c !== void 0) {
|
|
1698
1696
|
if (B = n(() => {
|
|
1699
1697
|
const _ = c.reason !== void 0 ? c.reason : new es("Aborted", "AbortError"), E = [];
|
|
1700
|
-
s || E.push(() => t
|
|
1698
|
+
s || E.push(() => t._state === "writable" ? Kt(t, _) : T(void 0)), u || E.push(() => e._state === "readable" ? ie(e, _) : T(void 0)), N(() => Promise.all(E.map((k) => k())), !0, _);
|
|
1701
1699
|
}, "abortAlgorithm"), c.aborted) {
|
|
1702
1700
|
B();
|
|
1703
1701
|
return;
|
|
@@ -1717,14 +1715,14 @@ function Ns() {
|
|
|
1717
1715
|
return R ? T(!0) : q(m._readyPromise, () => A((_, E) => {
|
|
1718
1716
|
_t(d, {
|
|
1719
1717
|
_chunkSteps: n((k) => {
|
|
1720
|
-
y = q(Fo(m, k), void 0, f
|
|
1718
|
+
y = q(Fo(m, k), void 0, f), _(!1);
|
|
1721
1719
|
}, "_chunkSteps"),
|
|
1722
1720
|
_closeSteps: n(() => _(!0), "_closeSteps"),
|
|
1723
1721
|
_errorSteps: E
|
|
1724
1722
|
});
|
|
1725
1723
|
}));
|
|
1726
1724
|
}
|
|
1727
|
-
if (n(nt, "pipeStep"), Te(e, d._closedPromise, (_) => (s ? J(!0, _) : N(() => Kt(t
|
|
1725
|
+
if (n(nt, "pipeStep"), Te(e, d._closedPromise, (_) => (s ? J(!0, _) : N(() => Kt(t, _), !0, _), null)), Te(t, m._closedPromise, (_) => (u ? J(!0, _) : N(() => ie(e, _), !0, _), null)), x(e, d._closedPromise, () => (r ? J() : N(() => ja(m)), null)), he(t) || t._state === "closed") {
|
|
1728
1726
|
const _ = /* @__PURE__ */ new TypeError("the destination writable stream closed before all data could be piped to it");
|
|
1729
1727
|
u ? J(!0, _) : N(() => ie(e, _), !0, _);
|
|
1730
1728
|
}
|
|
@@ -1744,7 +1742,7 @@ function Ns() {
|
|
|
1744
1742
|
n(x, "isOrBecomesClosed");
|
|
1745
1743
|
function N(_, E, k) {
|
|
1746
1744
|
if (R) return;
|
|
1747
|
-
R = !0, t
|
|
1745
|
+
R = !0, t._state === "writable" && !he(t) ? V(Oe(), Y) : Y();
|
|
1748
1746
|
function Y() {
|
|
1749
1747
|
return g(_(), () => Ce(E, k), (ot) => Ce(!0, ot)), null;
|
|
1750
1748
|
}
|
|
@@ -1752,7 +1750,7 @@ function Ns() {
|
|
|
1752
1750
|
}
|
|
1753
1751
|
n(N, "shutdownWithAction");
|
|
1754
1752
|
function J(_, E) {
|
|
1755
|
-
R || (R = !0, t
|
|
1753
|
+
R || (R = !0, t._state === "writable" && !he(t) ? V(Oe(), () => Ce(_, E)) : Ce(_, E));
|
|
1756
1754
|
}
|
|
1757
1755
|
n(J, "shutdown");
|
|
1758
1756
|
function Ce(_, E) {
|
|
@@ -1762,7 +1760,7 @@ function Ns() {
|
|
|
1762
1760
|
});
|
|
1763
1761
|
}
|
|
1764
1762
|
n(Ho, "ReadableStreamPipeTo");
|
|
1765
|
-
const Cn = class Cn
|
|
1763
|
+
const Cn = class Cn {
|
|
1766
1764
|
constructor() {
|
|
1767
1765
|
throw new TypeError("Illegal constructor");
|
|
1768
1766
|
}
|
|
@@ -1775,26 +1773,26 @@ function Ns() {
|
|
|
1775
1773
|
if (!Je(this)) throw new TypeError("The stream is not in a state that permits close");
|
|
1776
1774
|
De(this);
|
|
1777
1775
|
}
|
|
1778
|
-
enqueue(t
|
|
1776
|
+
enqueue(t = void 0) {
|
|
1779
1777
|
if (!or(this)) throw ar("enqueue");
|
|
1780
1778
|
if (!Je(this)) throw new TypeError("The stream is not in a state that permits enqueue");
|
|
1781
|
-
return Ke(this, t
|
|
1779
|
+
return Ke(this, t);
|
|
1782
1780
|
}
|
|
1783
|
-
error(t
|
|
1781
|
+
error(t = void 0) {
|
|
1784
1782
|
if (!or(this)) throw ar("error");
|
|
1785
|
-
oe(this, t
|
|
1783
|
+
oe(this, t);
|
|
1786
1784
|
}
|
|
1787
|
-
[Ar](t
|
|
1785
|
+
[Ar](t) {
|
|
1788
1786
|
Be(this);
|
|
1789
|
-
const r = this._cancelAlgorithm(t
|
|
1787
|
+
const r = this._cancelAlgorithm(t);
|
|
1790
1788
|
return ir(this), r;
|
|
1791
1789
|
}
|
|
1792
|
-
[Br](t
|
|
1790
|
+
[Br](t) {
|
|
1793
1791
|
const r = this._controlledReadableStream;
|
|
1794
1792
|
if (this._queue.length > 0) {
|
|
1795
1793
|
const s = xr(this);
|
|
1796
|
-
this._closeRequested && this._queue.length === 0 ? (ir(this), At(r)) : vt(this), t
|
|
1797
|
-
} else eo(r, t
|
|
1794
|
+
this._closeRequested && this._queue.length === 0 ? (ir(this), At(r)) : vt(this), t._chunkSteps(s);
|
|
1795
|
+
} else eo(r, t), vt(this);
|
|
1798
1796
|
}
|
|
1799
1797
|
[kr]() {}
|
|
1800
1798
|
};
|
|
@@ -1824,8 +1822,8 @@ function Ns() {
|
|
|
1824
1822
|
}
|
|
1825
1823
|
n(vt, "ReadableStreamDefaultControllerCallPullIfNeeded");
|
|
1826
1824
|
function Vo(e) {
|
|
1827
|
-
const t
|
|
1828
|
-
return !Je(e) || !e._started ? !1 : !!(qe(t
|
|
1825
|
+
const t = e._controlledReadableStream;
|
|
1826
|
+
return !Je(e) || !e._started ? !1 : !!(qe(t) && $t(t) > 0 || fn(e) > 0);
|
|
1829
1827
|
}
|
|
1830
1828
|
n(Vo, "ReadableStreamDefaultControllerShouldCallPull");
|
|
1831
1829
|
function ir(e) {
|
|
@@ -1834,23 +1832,23 @@ function Ns() {
|
|
|
1834
1832
|
n(ir, "ReadableStreamDefaultControllerClearAlgorithms");
|
|
1835
1833
|
function De(e) {
|
|
1836
1834
|
if (!Je(e)) return;
|
|
1837
|
-
const t
|
|
1838
|
-
e._closeRequested = !0, e._queue.length === 0 && (ir(e), At(t
|
|
1835
|
+
const t = e._controlledReadableStream;
|
|
1836
|
+
e._closeRequested = !0, e._queue.length === 0 && (ir(e), At(t));
|
|
1839
1837
|
}
|
|
1840
1838
|
n(De, "ReadableStreamDefaultControllerClose");
|
|
1841
|
-
function Ke(e, t
|
|
1839
|
+
function Ke(e, t) {
|
|
1842
1840
|
if (!Je(e)) return;
|
|
1843
1841
|
const r = e._controlledReadableStream;
|
|
1844
|
-
if (qe(r) && $t(r) > 0) Lr(r, t
|
|
1842
|
+
if (qe(r) && $t(r) > 0) Lr(r, t, !1);
|
|
1845
1843
|
else {
|
|
1846
1844
|
let s;
|
|
1847
1845
|
try {
|
|
1848
|
-
s = e._strategySizeAlgorithm(t
|
|
1846
|
+
s = e._strategySizeAlgorithm(t);
|
|
1849
1847
|
} catch (u) {
|
|
1850
1848
|
throw oe(e, u), u;
|
|
1851
1849
|
}
|
|
1852
1850
|
try {
|
|
1853
|
-
Nr(e, t
|
|
1851
|
+
Nr(e, t, s);
|
|
1854
1852
|
} catch (u) {
|
|
1855
1853
|
throw oe(e, u), u;
|
|
1856
1854
|
}
|
|
@@ -1858,14 +1856,14 @@ function Ns() {
|
|
|
1858
1856
|
vt(e);
|
|
1859
1857
|
}
|
|
1860
1858
|
n(Ke, "ReadableStreamDefaultControllerEnqueue");
|
|
1861
|
-
function oe(e, t
|
|
1859
|
+
function oe(e, t) {
|
|
1862
1860
|
const r = e._controlledReadableStream;
|
|
1863
|
-
r._state === "readable" && (Be(e), ir(e), Zo(r, t
|
|
1861
|
+
r._state === "readable" && (Be(e), ir(e), Zo(r, t));
|
|
1864
1862
|
}
|
|
1865
1863
|
n(oe, "ReadableStreamDefaultControllerError");
|
|
1866
1864
|
function fn(e) {
|
|
1867
|
-
const t
|
|
1868
|
-
return t
|
|
1865
|
+
const t = e._controlledReadableStream._state;
|
|
1866
|
+
return t === "errored" ? null : t === "closed" ? 0 : e._strategyHWM - e._queueTotalSize;
|
|
1869
1867
|
}
|
|
1870
1868
|
n(fn, "ReadableStreamDefaultControllerGetDesiredSize");
|
|
1871
1869
|
function ts(e) {
|
|
@@ -1873,30 +1871,30 @@ function Ns() {
|
|
|
1873
1871
|
}
|
|
1874
1872
|
n(ts, "ReadableStreamDefaultControllerHasBackpressure");
|
|
1875
1873
|
function Je(e) {
|
|
1876
|
-
const t
|
|
1877
|
-
return !e._closeRequested && t
|
|
1874
|
+
const t = e._controlledReadableStream._state;
|
|
1875
|
+
return !e._closeRequested && t === "readable";
|
|
1878
1876
|
}
|
|
1879
1877
|
n(Je, "ReadableStreamDefaultControllerCanCloseOrEnqueue");
|
|
1880
|
-
function Qo(e, t
|
|
1881
|
-
t
|
|
1882
|
-
g(T(r()), () => (t
|
|
1878
|
+
function Qo(e, t, r, s, u, c, d) {
|
|
1879
|
+
t._controlledReadableStream = e, t._queue = void 0, t._queueTotalSize = void 0, Be(t), t._started = !1, t._closeRequested = !1, t._pullAgain = !1, t._pulling = !1, t._strategySizeAlgorithm = d, t._strategyHWM = c, t._pullAlgorithm = s, t._cancelAlgorithm = u, e._readableStreamController = t;
|
|
1880
|
+
g(T(r()), () => (t._started = !0, vt(t), null), (R) => (oe(t, R), null));
|
|
1883
1881
|
}
|
|
1884
1882
|
n(Qo, "SetUpReadableStreamDefaultController");
|
|
1885
|
-
function rs(e, t
|
|
1883
|
+
function rs(e, t, r, s) {
|
|
1886
1884
|
const u = Object.create(ne.prototype);
|
|
1887
1885
|
let c, d, m;
|
|
1888
|
-
t
|
|
1886
|
+
t.start !== void 0 ? c = n(() => t.start(u), "startAlgorithm") : c = n(() => {}, "startAlgorithm"), t.pull !== void 0 ? d = n(() => t.pull(u), "pullAlgorithm") : d = n(() => T(void 0), "pullAlgorithm"), t.cancel !== void 0 ? m = n((R) => t.cancel(R), "cancelAlgorithm") : m = n(() => T(void 0), "cancelAlgorithm"), Qo(e, u, c, d, m, r, s);
|
|
1889
1887
|
}
|
|
1890
1888
|
n(rs, "SetUpReadableStreamDefaultControllerFromUnderlyingSource");
|
|
1891
1889
|
function ar(e) {
|
|
1892
1890
|
return /* @__PURE__ */ new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`);
|
|
1893
1891
|
}
|
|
1894
1892
|
n(ar, "defaultControllerBrandCheckException$1");
|
|
1895
|
-
function ns(e, t
|
|
1893
|
+
function ns(e, t) {
|
|
1896
1894
|
return Ie(e._readableStreamController) ? is(e) : os(e);
|
|
1897
1895
|
}
|
|
1898
1896
|
n(ns, "ReadableStreamTee");
|
|
1899
|
-
function os(e, t
|
|
1897
|
+
function os(e, t) {
|
|
1900
1898
|
const r = Qe(e);
|
|
1901
1899
|
let s = !1, u = !1, c = !1, d = !1, m, R, y, C, P;
|
|
1902
1900
|
const B = A((x) => {
|
|
@@ -1941,16 +1939,16 @@ function Ns() {
|
|
|
1941
1939
|
}
|
|
1942
1940
|
n(os, "ReadableStreamDefaultTee");
|
|
1943
1941
|
function is(e) {
|
|
1944
|
-
let t
|
|
1942
|
+
let t = Qe(e), r = !1, s = !1, u = !1, c = !1, d = !1, m, R, y, C, P;
|
|
1945
1943
|
const B = A((_) => {
|
|
1946
1944
|
P = _;
|
|
1947
1945
|
});
|
|
1948
1946
|
function ae(_) {
|
|
1949
|
-
I(_._closedPromise, (E) => (_ !== t
|
|
1947
|
+
I(_._closedPromise, (E) => (_ !== t || (K(y._readableStreamController, E), K(C._readableStreamController, E), (!c || !d) && P(void 0)), null));
|
|
1950
1948
|
}
|
|
1951
1949
|
n(ae, "forwardReaderError");
|
|
1952
1950
|
function nt() {
|
|
1953
|
-
je(t
|
|
1951
|
+
je(t) && (_e(t), t = Qe(e), ae(t)), _t(t, {
|
|
1954
1952
|
_chunkSteps: n((E) => {
|
|
1955
1953
|
ge(() => {
|
|
1956
1954
|
s = !1, u = !1;
|
|
@@ -1975,9 +1973,9 @@ function Ns() {
|
|
|
1975
1973
|
}
|
|
1976
1974
|
n(nt, "pullWithDefaultReader");
|
|
1977
1975
|
function Oe(_, E) {
|
|
1978
|
-
Ee(t
|
|
1976
|
+
Ee(t) && (_e(t), t = Co(e), ae(t));
|
|
1979
1977
|
const k = E ? C : y, Y = E ? y : C;
|
|
1980
|
-
Eo(t
|
|
1978
|
+
Eo(t, _, 1, {
|
|
1981
1979
|
_chunkSteps: n((it) => {
|
|
1982
1980
|
ge(() => {
|
|
1983
1981
|
s = !1, u = !1;
|
|
@@ -2038,7 +2036,7 @@ function Ns() {
|
|
|
2038
2036
|
}
|
|
2039
2037
|
n(J, "cancel2Algorithm");
|
|
2040
2038
|
function Ce() {}
|
|
2041
|
-
return n(Ce, "startAlgorithm"), y = Go(Ce, Te, N), C = Go(Ce, x, J), ae(t
|
|
2039
|
+
return n(Ce, "startAlgorithm"), y = Go(Ce, Te, N), C = Go(Ce, x, J), ae(t), [y, C];
|
|
2042
2040
|
}
|
|
2043
2041
|
n(is, "ReadableByteStreamTee");
|
|
2044
2042
|
function as(e) {
|
|
@@ -2050,8 +2048,8 @@ function Ns() {
|
|
|
2050
2048
|
}
|
|
2051
2049
|
n(ss, "ReadableStreamFrom");
|
|
2052
2050
|
function ls(e) {
|
|
2053
|
-
let t
|
|
2054
|
-
const r = uo(e, "async"), s = f
|
|
2051
|
+
let t;
|
|
2052
|
+
const r = uo(e, "async"), s = f;
|
|
2055
2053
|
function u() {
|
|
2056
2054
|
let d;
|
|
2057
2055
|
try {
|
|
@@ -2061,10 +2059,10 @@ function Ns() {
|
|
|
2061
2059
|
}
|
|
2062
2060
|
return F(T(d), (R) => {
|
|
2063
2061
|
if (!l(R)) throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");
|
|
2064
|
-
if (ea(R)) De(t
|
|
2062
|
+
if (ea(R)) De(t._readableStreamController);
|
|
2065
2063
|
else {
|
|
2066
2064
|
const C = ta(R);
|
|
2067
|
-
Ke(t
|
|
2065
|
+
Ke(t._readableStreamController, C);
|
|
2068
2066
|
}
|
|
2069
2067
|
});
|
|
2070
2068
|
}
|
|
@@ -2088,12 +2086,12 @@ function Ns() {
|
|
|
2088
2086
|
if (!l(P)) throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object");
|
|
2089
2087
|
});
|
|
2090
2088
|
}
|
|
2091
|
-
return n(c, "cancelAlgorithm"), t
|
|
2089
|
+
return n(c, "cancelAlgorithm"), t = Et(s, u, c, 0), t;
|
|
2092
2090
|
}
|
|
2093
2091
|
n(ls, "ReadableStreamFromIterable");
|
|
2094
2092
|
function us(e) {
|
|
2095
|
-
let t
|
|
2096
|
-
const r = f
|
|
2093
|
+
let t;
|
|
2094
|
+
const r = f;
|
|
2097
2095
|
function s() {
|
|
2098
2096
|
let c;
|
|
2099
2097
|
try {
|
|
@@ -2103,10 +2101,10 @@ function Ns() {
|
|
|
2103
2101
|
}
|
|
2104
2102
|
return F(c, (d) => {
|
|
2105
2103
|
if (!l(d)) throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");
|
|
2106
|
-
if (d.done) De(t
|
|
2104
|
+
if (d.done) De(t._readableStreamController);
|
|
2107
2105
|
else {
|
|
2108
2106
|
const m = d.value;
|
|
2109
|
-
Ke(t
|
|
2107
|
+
Ke(t._readableStreamController, m);
|
|
2110
2108
|
}
|
|
2111
2109
|
});
|
|
2112
2110
|
}
|
|
@@ -2118,46 +2116,46 @@ function Ns() {
|
|
|
2118
2116
|
return b(d);
|
|
2119
2117
|
}
|
|
2120
2118
|
}
|
|
2121
|
-
return n(u, "cancelAlgorithm"), t
|
|
2119
|
+
return n(u, "cancelAlgorithm"), t = Et(r, s, u, 0), t;
|
|
2122
2120
|
}
|
|
2123
2121
|
n(us, "ReadableStreamFromDefaultReader");
|
|
2124
|
-
function fs(e, t
|
|
2125
|
-
ue(e, t
|
|
2122
|
+
function fs(e, t) {
|
|
2123
|
+
ue(e, t);
|
|
2126
2124
|
const r = e, s = r?.autoAllocateChunkSize, u = r?.cancel, c = r?.pull, d = r?.start, m = r?.type;
|
|
2127
2125
|
return {
|
|
2128
|
-
autoAllocateChunkSize: s === void 0 ? void 0 : Fr(s, `${t
|
|
2129
|
-
cancel: u === void 0 ? void 0 : cs(u, r, `${t
|
|
2130
|
-
pull: c === void 0 ? void 0 : ds(c, r, `${t
|
|
2131
|
-
start: d === void 0 ? void 0 : hs(d, r, `${t
|
|
2132
|
-
type: m === void 0 ? void 0 : ps(m, `${t
|
|
2126
|
+
autoAllocateChunkSize: s === void 0 ? void 0 : Fr(s, `${t} has member 'autoAllocateChunkSize' that`),
|
|
2127
|
+
cancel: u === void 0 ? void 0 : cs(u, r, `${t} has member 'cancel' that`),
|
|
2128
|
+
pull: c === void 0 ? void 0 : ds(c, r, `${t} has member 'pull' that`),
|
|
2129
|
+
start: d === void 0 ? void 0 : hs(d, r, `${t} has member 'start' that`),
|
|
2130
|
+
type: m === void 0 ? void 0 : ps(m, `${t} has member 'type' that`)
|
|
2133
2131
|
};
|
|
2134
2132
|
}
|
|
2135
2133
|
n(fs, "convertUnderlyingDefaultOrByteSource");
|
|
2136
|
-
function cs(e, t
|
|
2137
|
-
return Z(e, r), (s) => j(e, t
|
|
2134
|
+
function cs(e, t, r) {
|
|
2135
|
+
return Z(e, r), (s) => j(e, t, [s]);
|
|
2138
2136
|
}
|
|
2139
2137
|
n(cs, "convertUnderlyingSourceCancelCallback");
|
|
2140
|
-
function ds(e, t
|
|
2141
|
-
return Z(e, r), (s) => j(e, t
|
|
2138
|
+
function ds(e, t, r) {
|
|
2139
|
+
return Z(e, r), (s) => j(e, t, [s]);
|
|
2142
2140
|
}
|
|
2143
2141
|
n(ds, "convertUnderlyingSourcePullCallback");
|
|
2144
|
-
function hs(e, t
|
|
2145
|
-
return Z(e, r), (s) => z(e, t
|
|
2142
|
+
function hs(e, t, r) {
|
|
2143
|
+
return Z(e, r), (s) => z(e, t, [s]);
|
|
2146
2144
|
}
|
|
2147
2145
|
n(hs, "convertUnderlyingSourceStartCallback");
|
|
2148
|
-
function ps(e, t
|
|
2149
|
-
if (e = `${e}`, e !== "bytes") throw new TypeError(`${t
|
|
2146
|
+
function ps(e, t) {
|
|
2147
|
+
if (e = `${e}`, e !== "bytes") throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);
|
|
2150
2148
|
return e;
|
|
2151
2149
|
}
|
|
2152
2150
|
n(ps, "convertReadableStreamType");
|
|
2153
|
-
function bs(e, t
|
|
2154
|
-
return ue(e, t
|
|
2151
|
+
function bs(e, t) {
|
|
2152
|
+
return ue(e, t), { preventCancel: !!e?.preventCancel };
|
|
2155
2153
|
}
|
|
2156
2154
|
n(bs, "convertIteratorOptions");
|
|
2157
|
-
function Yo(e, t
|
|
2158
|
-
ue(e, t
|
|
2155
|
+
function Yo(e, t) {
|
|
2156
|
+
ue(e, t);
|
|
2159
2157
|
const r = e?.preventAbort, s = e?.preventCancel, u = e?.preventClose, c = e?.signal;
|
|
2160
|
-
return c !== void 0 && ms(c, `${t
|
|
2158
|
+
return c !== void 0 && ms(c, `${t} has member 'signal' that`), {
|
|
2161
2159
|
preventAbort: !!r,
|
|
2162
2160
|
preventCancel: !!s,
|
|
2163
2161
|
preventClose: !!u,
|
|
@@ -2165,25 +2163,25 @@ function Ns() {
|
|
|
2165
2163
|
};
|
|
2166
2164
|
}
|
|
2167
2165
|
n(Yo, "convertPipeOptions");
|
|
2168
|
-
function ms(e, t
|
|
2169
|
-
if (!Ca(e)) throw new TypeError(`${t
|
|
2166
|
+
function ms(e, t) {
|
|
2167
|
+
if (!Ca(e)) throw new TypeError(`${t} is not an AbortSignal.`);
|
|
2170
2168
|
}
|
|
2171
2169
|
n(ms, "assertAbortSignal");
|
|
2172
|
-
function ys(e, t
|
|
2173
|
-
ue(e, t
|
|
2170
|
+
function ys(e, t) {
|
|
2171
|
+
ue(e, t);
|
|
2174
2172
|
const r = e?.readable;
|
|
2175
|
-
zr(r, "readable", "ReadableWritablePair"), jr(r, `${t
|
|
2173
|
+
zr(r, "readable", "ReadableWritablePair"), jr(r, `${t} has member 'readable' that`);
|
|
2176
2174
|
const s = e?.writable;
|
|
2177
|
-
return zr(s, "writable", "ReadableWritablePair"), Bo(s, `${t
|
|
2175
|
+
return zr(s, "writable", "ReadableWritablePair"), Bo(s, `${t} has member 'writable' that`), {
|
|
2178
2176
|
readable: r,
|
|
2179
2177
|
writable: s
|
|
2180
2178
|
};
|
|
2181
2179
|
}
|
|
2182
2180
|
n(ys, "convertReadableWritablePair");
|
|
2183
|
-
const Pn = class Pn
|
|
2184
|
-
constructor(t
|
|
2185
|
-
t
|
|
2186
|
-
const s = Zt(r, "Second parameter"), u = fs(t
|
|
2181
|
+
const Pn = class Pn {
|
|
2182
|
+
constructor(t = {}, r = {}) {
|
|
2183
|
+
t === void 0 ? t = null : Jn(t, "First parameter");
|
|
2184
|
+
const s = Zt(r, "Second parameter"), u = fs(t, "First parameter");
|
|
2187
2185
|
if (cn(this), u.type === "bytes") {
|
|
2188
2186
|
if (s.size !== void 0) throw new RangeError("The strategy for a byte stream cannot have a size function");
|
|
2189
2187
|
const c = Tt(s, 0);
|
|
@@ -2197,47 +2195,47 @@ function Ns() {
|
|
|
2197
2195
|
if (!We(this)) throw Me("locked");
|
|
2198
2196
|
return qe(this);
|
|
2199
2197
|
}
|
|
2200
|
-
cancel(t
|
|
2201
|
-
return We(this) ? qe(this) ? b(/* @__PURE__ */ new TypeError("Cannot cancel a stream that already has a reader")) : ie(this, t
|
|
2198
|
+
cancel(t = void 0) {
|
|
2199
|
+
return We(this) ? qe(this) ? b(/* @__PURE__ */ new TypeError("Cannot cancel a stream that already has a reader")) : ie(this, t) : b(Me("cancel"));
|
|
2202
2200
|
}
|
|
2203
|
-
getReader(t
|
|
2201
|
+
getReader(t = void 0) {
|
|
2204
2202
|
if (!We(this)) throw Me("getReader");
|
|
2205
|
-
return ha(t
|
|
2203
|
+
return ha(t, "First parameter").mode === void 0 ? Qe(this) : Co(this);
|
|
2206
2204
|
}
|
|
2207
|
-
pipeThrough(t
|
|
2205
|
+
pipeThrough(t, r = {}) {
|
|
2208
2206
|
if (!We(this)) throw Me("pipeThrough");
|
|
2209
|
-
Se(t
|
|
2210
|
-
const s = ys(t
|
|
2207
|
+
Se(t, 1, "pipeThrough");
|
|
2208
|
+
const s = ys(t, "First parameter"), u = Yo(r, "Second parameter");
|
|
2211
2209
|
if (qe(this)) throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");
|
|
2212
2210
|
if (Ze(s.writable)) throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");
|
|
2213
2211
|
return Q(Ho(this, s.writable, u.preventClose, u.preventAbort, u.preventCancel, u.signal)), s.readable;
|
|
2214
2212
|
}
|
|
2215
|
-
pipeTo(t
|
|
2213
|
+
pipeTo(t, r = {}) {
|
|
2216
2214
|
if (!We(this)) return b(Me("pipeTo"));
|
|
2217
|
-
if (t
|
|
2218
|
-
if (!Ge(t
|
|
2215
|
+
if (t === void 0) return b("Parameter 1 is required in 'pipeTo'.");
|
|
2216
|
+
if (!Ge(t)) return b(/* @__PURE__ */ new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));
|
|
2219
2217
|
let s;
|
|
2220
2218
|
try {
|
|
2221
2219
|
s = Yo(r, "Second parameter");
|
|
2222
2220
|
} catch (u) {
|
|
2223
2221
|
return b(u);
|
|
2224
2222
|
}
|
|
2225
|
-
return qe(this) ? b(/* @__PURE__ */ new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")) : Ze(t
|
|
2223
|
+
return qe(this) ? b(/* @__PURE__ */ new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")) : Ze(t) ? b(/* @__PURE__ */ new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")) : Ho(this, t, s.preventClose, s.preventAbort, s.preventCancel, s.signal);
|
|
2226
2224
|
}
|
|
2227
2225
|
tee() {
|
|
2228
2226
|
if (!We(this)) throw Me("tee");
|
|
2229
2227
|
return St(ns(this));
|
|
2230
2228
|
}
|
|
2231
|
-
values(t
|
|
2229
|
+
values(t = void 0) {
|
|
2232
2230
|
if (!We(this)) throw Me("values");
|
|
2233
|
-
const r = bs(t
|
|
2231
|
+
const r = bs(t, "First parameter");
|
|
2234
2232
|
return Ki(this, r.preventCancel);
|
|
2235
2233
|
}
|
|
2236
|
-
[Ur](t
|
|
2237
|
-
return this.values(t
|
|
2234
|
+
[Ur](t) {
|
|
2235
|
+
return this.values(t);
|
|
2238
2236
|
}
|
|
2239
|
-
static from(t
|
|
2240
|
-
return ss(t
|
|
2237
|
+
static from(t) {
|
|
2238
|
+
return ss(t);
|
|
2241
2239
|
}
|
|
2242
2240
|
};
|
|
2243
2241
|
n(Pn, "ReadableStream");
|
|
@@ -2258,16 +2256,16 @@ function Ns() {
|
|
|
2258
2256
|
writable: !0,
|
|
2259
2257
|
configurable: !0
|
|
2260
2258
|
});
|
|
2261
|
-
function Et(e, t
|
|
2259
|
+
function Et(e, t, r, s = 1, u = () => 1) {
|
|
2262
2260
|
const c = Object.create(L.prototype);
|
|
2263
2261
|
cn(c);
|
|
2264
|
-
return Qo(c, Object.create(ne.prototype), e, t
|
|
2262
|
+
return Qo(c, Object.create(ne.prototype), e, t, r, s, u), c;
|
|
2265
2263
|
}
|
|
2266
2264
|
n(Et, "CreateReadableStream");
|
|
2267
|
-
function Go(e, t
|
|
2265
|
+
function Go(e, t, r) {
|
|
2268
2266
|
const s = Object.create(L.prototype);
|
|
2269
2267
|
cn(s);
|
|
2270
|
-
return To(s, Object.create(te.prototype), e, t
|
|
2268
|
+
return To(s, Object.create(te.prototype), e, t, r, 0, void 0), s;
|
|
2271
2269
|
}
|
|
2272
2270
|
n(Go, "CreateReadableByteStream");
|
|
2273
2271
|
function cn(e) {
|
|
@@ -2282,7 +2280,7 @@ function Ns() {
|
|
|
2282
2280
|
return e._reader !== void 0;
|
|
2283
2281
|
}
|
|
2284
2282
|
n(qe, "IsReadableStreamLocked");
|
|
2285
|
-
function ie(e, t
|
|
2283
|
+
function ie(e, t) {
|
|
2286
2284
|
if (e._disturbed = !0, e._state === "closed") return T(void 0);
|
|
2287
2285
|
if (e._state === "errored") return b(e._storedError);
|
|
2288
2286
|
At(e);
|
|
@@ -2293,41 +2291,41 @@ function Ns() {
|
|
|
2293
2291
|
c._closeSteps(void 0);
|
|
2294
2292
|
});
|
|
2295
2293
|
}
|
|
2296
|
-
return F(e._readableStreamController[Ar](t
|
|
2294
|
+
return F(e._readableStreamController[Ar](t), f);
|
|
2297
2295
|
}
|
|
2298
2296
|
n(ie, "ReadableStreamCancel");
|
|
2299
2297
|
function At(e) {
|
|
2300
2298
|
e._state = "closed";
|
|
2301
|
-
const t
|
|
2302
|
-
if (t
|
|
2303
|
-
const r = t
|
|
2304
|
-
t
|
|
2299
|
+
const t = e._reader;
|
|
2300
|
+
if (t !== void 0 && (Zn(t), Ee(t))) {
|
|
2301
|
+
const r = t._readRequests;
|
|
2302
|
+
t._readRequests = new D(), r.forEach((s) => {
|
|
2305
2303
|
s._closeSteps();
|
|
2306
2304
|
});
|
|
2307
2305
|
}
|
|
2308
2306
|
}
|
|
2309
2307
|
n(At, "ReadableStreamClose");
|
|
2310
|
-
function Zo(e, t
|
|
2311
|
-
e._state = "errored", e._storedError = t
|
|
2308
|
+
function Zo(e, t) {
|
|
2309
|
+
e._state = "errored", e._storedError = t;
|
|
2312
2310
|
const r = e._reader;
|
|
2313
|
-
r !== void 0 && (Or(r, t
|
|
2311
|
+
r !== void 0 && (Or(r, t), Ee(r) ? ro(r, t) : Ao(r, t));
|
|
2314
2312
|
}
|
|
2315
2313
|
n(Zo, "ReadableStreamError");
|
|
2316
2314
|
function Me(e) {
|
|
2317
2315
|
return /* @__PURE__ */ new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`);
|
|
2318
2316
|
}
|
|
2319
2317
|
n(Me, "streamBrandCheckException$1");
|
|
2320
|
-
function Ko(e, t
|
|
2321
|
-
ue(e, t
|
|
2318
|
+
function Ko(e, t) {
|
|
2319
|
+
ue(e, t);
|
|
2322
2320
|
const r = e?.highWaterMark;
|
|
2323
2321
|
return zr(r, "highWaterMark", "QueuingStrategyInit"), { highWaterMark: Ir(r) };
|
|
2324
2322
|
}
|
|
2325
2323
|
n(Ko, "convertQueuingStrategyInit");
|
|
2326
2324
|
const Jo = n((e) => e.byteLength, "byteLengthSizeFunction");
|
|
2327
2325
|
h(Jo, "size");
|
|
2328
|
-
const vn = class vn
|
|
2329
|
-
constructor(t
|
|
2330
|
-
Se(t
|
|
2326
|
+
const vn = class vn {
|
|
2327
|
+
constructor(t) {
|
|
2328
|
+
Se(t, 1, "ByteLengthQueuingStrategy"), t = Ko(t, "First parameter"), this._byteLengthQueuingStrategyHighWaterMark = t.highWaterMark;
|
|
2331
2329
|
}
|
|
2332
2330
|
get highWaterMark() {
|
|
2333
2331
|
if (!ei(this)) throw Xo("highWaterMark");
|
|
@@ -2357,9 +2355,9 @@ function Ns() {
|
|
|
2357
2355
|
n(ei, "IsByteLengthQueuingStrategy");
|
|
2358
2356
|
const ti = n(() => 1, "countSizeFunction");
|
|
2359
2357
|
h(ti, "size");
|
|
2360
|
-
const En = class En
|
|
2361
|
-
constructor(t
|
|
2362
|
-
Se(t
|
|
2358
|
+
const En = class En {
|
|
2359
|
+
constructor(t) {
|
|
2360
|
+
Se(t, 1, "CountQueuingStrategy"), t = Ko(t, "First parameter"), this._countQueuingStrategyHighWaterMark = t.highWaterMark;
|
|
2363
2361
|
}
|
|
2364
2362
|
get highWaterMark() {
|
|
2365
2363
|
if (!ni(this)) throw ri("highWaterMark");
|
|
@@ -2387,39 +2385,39 @@ function Ns() {
|
|
|
2387
2385
|
return !l(e) || !Object.prototype.hasOwnProperty.call(e, "_countQueuingStrategyHighWaterMark") ? !1 : e instanceof et;
|
|
2388
2386
|
}
|
|
2389
2387
|
n(ni, "IsCountQueuingStrategy");
|
|
2390
|
-
function gs(e, t
|
|
2391
|
-
ue(e, t
|
|
2388
|
+
function gs(e, t) {
|
|
2389
|
+
ue(e, t);
|
|
2392
2390
|
const r = e?.cancel, s = e?.flush, u = e?.readableType, c = e?.start, d = e?.transform, m = e?.writableType;
|
|
2393
2391
|
return {
|
|
2394
|
-
cancel: r === void 0 ? void 0 : Rs(r, e, `${t
|
|
2395
|
-
flush: s === void 0 ? void 0 : _s(s, e, `${t
|
|
2392
|
+
cancel: r === void 0 ? void 0 : Rs(r, e, `${t} has member 'cancel' that`),
|
|
2393
|
+
flush: s === void 0 ? void 0 : _s(s, e, `${t} has member 'flush' that`),
|
|
2396
2394
|
readableType: u,
|
|
2397
|
-
start: c === void 0 ? void 0 : Ss(c, e, `${t
|
|
2398
|
-
transform: d === void 0 ? void 0 : ws(d, e, `${t
|
|
2395
|
+
start: c === void 0 ? void 0 : Ss(c, e, `${t} has member 'start' that`),
|
|
2396
|
+
transform: d === void 0 ? void 0 : ws(d, e, `${t} has member 'transform' that`),
|
|
2399
2397
|
writableType: m
|
|
2400
2398
|
};
|
|
2401
2399
|
}
|
|
2402
2400
|
n(gs, "convertTransformer");
|
|
2403
|
-
function _s(e, t
|
|
2404
|
-
return Z(e, r), (s) => j(e, t
|
|
2401
|
+
function _s(e, t, r) {
|
|
2402
|
+
return Z(e, r), (s) => j(e, t, [s]);
|
|
2405
2403
|
}
|
|
2406
2404
|
n(_s, "convertTransformerFlushCallback");
|
|
2407
|
-
function Ss(e, t
|
|
2408
|
-
return Z(e, r), (s) => z(e, t
|
|
2405
|
+
function Ss(e, t, r) {
|
|
2406
|
+
return Z(e, r), (s) => z(e, t, [s]);
|
|
2409
2407
|
}
|
|
2410
2408
|
n(Ss, "convertTransformerStartCallback");
|
|
2411
|
-
function ws(e, t
|
|
2412
|
-
return Z(e, r), (s, u) => j(e, t
|
|
2409
|
+
function ws(e, t, r) {
|
|
2410
|
+
return Z(e, r), (s, u) => j(e, t, [s, u]);
|
|
2413
2411
|
}
|
|
2414
2412
|
n(ws, "convertTransformerTransformCallback");
|
|
2415
|
-
function Rs(e, t
|
|
2416
|
-
return Z(e, r), (s) => j(e, t
|
|
2413
|
+
function Rs(e, t, r) {
|
|
2414
|
+
return Z(e, r), (s) => j(e, t, [s]);
|
|
2417
2415
|
}
|
|
2418
2416
|
n(Rs, "convertTransformerCancelCallback");
|
|
2419
|
-
const An = class An
|
|
2420
|
-
constructor(t
|
|
2421
|
-
t
|
|
2422
|
-
const u = Zt(r, "Second parameter"), c = Zt(s, "Third parameter"), d = gs(t
|
|
2417
|
+
const An = class An {
|
|
2418
|
+
constructor(t = {}, r = {}, s = {}) {
|
|
2419
|
+
t === void 0 && (t = null);
|
|
2420
|
+
const u = Zt(r, "Second parameter"), c = Zt(s, "Third parameter"), d = gs(t, "First parameter");
|
|
2423
2421
|
if (d.readableType !== void 0) throw new RangeError("Invalid readableType specified");
|
|
2424
2422
|
if (d.writableType !== void 0) throw new RangeError("Invalid writableType specified");
|
|
2425
2423
|
const m = Tt(c, 0), R = Gt(c), y = Tt(u, 1), C = Gt(u);
|
|
@@ -2447,9 +2445,9 @@ function Ns() {
|
|
|
2447
2445
|
value: "TransformStream",
|
|
2448
2446
|
configurable: !0
|
|
2449
2447
|
});
|
|
2450
|
-
function Ts(e, t
|
|
2448
|
+
function Ts(e, t, r, s, u, c) {
|
|
2451
2449
|
function d() {
|
|
2452
|
-
return t
|
|
2450
|
+
return t;
|
|
2453
2451
|
}
|
|
2454
2452
|
n(d, "startAlgorithm");
|
|
2455
2453
|
function m(B) {
|
|
@@ -2478,40 +2476,40 @@ function Ns() {
|
|
|
2478
2476
|
return !l(e) || !Object.prototype.hasOwnProperty.call(e, "_transformStreamController") ? !1 : e instanceof tt;
|
|
2479
2477
|
}
|
|
2480
2478
|
n(oi, "IsTransformStream");
|
|
2481
|
-
function ii(e, t
|
|
2482
|
-
oe(e._readable._readableStreamController, t
|
|
2479
|
+
function ii(e, t) {
|
|
2480
|
+
oe(e._readable._readableStreamController, t), dn(e, t);
|
|
2483
2481
|
}
|
|
2484
2482
|
n(ii, "TransformStreamError");
|
|
2485
|
-
function dn(e, t
|
|
2486
|
-
ur(e._transformStreamController), Ct(e._writable._writableStreamController, t
|
|
2483
|
+
function dn(e, t) {
|
|
2484
|
+
ur(e._transformStreamController), Ct(e._writable._writableStreamController, t), hn(e);
|
|
2487
2485
|
}
|
|
2488
2486
|
n(dn, "TransformStreamErrorWritableAndUnblockWrite");
|
|
2489
2487
|
function hn(e) {
|
|
2490
2488
|
e._backpressure && sr(e, !1);
|
|
2491
2489
|
}
|
|
2492
2490
|
n(hn, "TransformStreamUnblockWrite");
|
|
2493
|
-
function sr(e, t
|
|
2491
|
+
function sr(e, t) {
|
|
2494
2492
|
e._backpressureChangePromise !== void 0 && e._backpressureChangePromise_resolve(), e._backpressureChangePromise = A((r) => {
|
|
2495
2493
|
e._backpressureChangePromise_resolve = r;
|
|
2496
|
-
}), e._backpressure = t
|
|
2494
|
+
}), e._backpressure = t;
|
|
2497
2495
|
}
|
|
2498
2496
|
n(sr, "TransformStreamSetBackpressure");
|
|
2499
|
-
const Bn = class Bn
|
|
2497
|
+
const Bn = class Bn {
|
|
2500
2498
|
constructor() {
|
|
2501
2499
|
throw new TypeError("Illegal constructor");
|
|
2502
2500
|
}
|
|
2503
2501
|
get desiredSize() {
|
|
2504
2502
|
if (!lr(this)) throw fr("desiredSize");
|
|
2505
|
-
const t
|
|
2506
|
-
return fn(t
|
|
2503
|
+
const t = this._controlledTransformStream._readable._readableStreamController;
|
|
2504
|
+
return fn(t);
|
|
2507
2505
|
}
|
|
2508
|
-
enqueue(t
|
|
2506
|
+
enqueue(t = void 0) {
|
|
2509
2507
|
if (!lr(this)) throw fr("enqueue");
|
|
2510
|
-
ai(this, t
|
|
2508
|
+
ai(this, t);
|
|
2511
2509
|
}
|
|
2512
|
-
error(t
|
|
2510
|
+
error(t = void 0) {
|
|
2513
2511
|
if (!lr(this)) throw fr("error");
|
|
2514
|
-
vs(this, t
|
|
2512
|
+
vs(this, t);
|
|
2515
2513
|
}
|
|
2516
2514
|
terminate() {
|
|
2517
2515
|
if (!lr(this)) throw fr("terminate");
|
|
@@ -2533,101 +2531,101 @@ function Ns() {
|
|
|
2533
2531
|
return !l(e) || !Object.prototype.hasOwnProperty.call(e, "_controlledTransformStream") ? !1 : e instanceof pe;
|
|
2534
2532
|
}
|
|
2535
2533
|
n(lr, "IsTransformStreamDefaultController");
|
|
2536
|
-
function Cs(e, t
|
|
2537
|
-
t
|
|
2534
|
+
function Cs(e, t, r, s, u) {
|
|
2535
|
+
t._controlledTransformStream = e, e._transformStreamController = t, t._transformAlgorithm = r, t._flushAlgorithm = s, t._cancelAlgorithm = u, t._finishPromise = void 0, t._finishPromise_resolve = void 0, t._finishPromise_reject = void 0;
|
|
2538
2536
|
}
|
|
2539
2537
|
n(Cs, "SetUpTransformStreamDefaultController");
|
|
2540
|
-
function Ps(e, t
|
|
2538
|
+
function Ps(e, t) {
|
|
2541
2539
|
const r = Object.create(pe.prototype);
|
|
2542
2540
|
let s, u, c;
|
|
2543
|
-
t
|
|
2541
|
+
t.transform !== void 0 ? s = n((d) => t.transform(d, r), "transformAlgorithm") : s = n((d) => {
|
|
2544
2542
|
try {
|
|
2545
2543
|
return ai(r, d), T(void 0);
|
|
2546
2544
|
} catch (m) {
|
|
2547
2545
|
return b(m);
|
|
2548
2546
|
}
|
|
2549
|
-
}, "transformAlgorithm"), t
|
|
2547
|
+
}, "transformAlgorithm"), t.flush !== void 0 ? u = n(() => t.flush(r), "flushAlgorithm") : u = n(() => T(void 0), "flushAlgorithm"), t.cancel !== void 0 ? c = n((d) => t.cancel(d), "cancelAlgorithm") : c = n(() => T(void 0), "cancelAlgorithm"), Cs(e, r, s, u, c);
|
|
2550
2548
|
}
|
|
2551
2549
|
n(Ps, "SetUpTransformStreamDefaultControllerFromTransformer");
|
|
2552
2550
|
function ur(e) {
|
|
2553
2551
|
e._transformAlgorithm = void 0, e._flushAlgorithm = void 0, e._cancelAlgorithm = void 0;
|
|
2554
2552
|
}
|
|
2555
2553
|
n(ur, "TransformStreamDefaultControllerClearAlgorithms");
|
|
2556
|
-
function ai(e, t
|
|
2554
|
+
function ai(e, t) {
|
|
2557
2555
|
const r = e._controlledTransformStream, s = r._readable._readableStreamController;
|
|
2558
2556
|
if (!Je(s)) throw new TypeError("Readable side is not in a state that permits enqueue");
|
|
2559
2557
|
try {
|
|
2560
|
-
Ke(s, t
|
|
2558
|
+
Ke(s, t);
|
|
2561
2559
|
} catch (c) {
|
|
2562
2560
|
throw dn(r, c), r._readable._storedError;
|
|
2563
2561
|
}
|
|
2564
2562
|
ts(s) !== r._backpressure && sr(r, !0);
|
|
2565
2563
|
}
|
|
2566
2564
|
n(ai, "TransformStreamDefaultControllerEnqueue");
|
|
2567
|
-
function vs(e, t
|
|
2568
|
-
ii(e._controlledTransformStream, t
|
|
2565
|
+
function vs(e, t) {
|
|
2566
|
+
ii(e._controlledTransformStream, t);
|
|
2569
2567
|
}
|
|
2570
2568
|
n(vs, "TransformStreamDefaultControllerError");
|
|
2571
|
-
function si(e, t
|
|
2572
|
-
return F(e._transformAlgorithm(t
|
|
2569
|
+
function si(e, t) {
|
|
2570
|
+
return F(e._transformAlgorithm(t), void 0, (s) => {
|
|
2573
2571
|
throw ii(e._controlledTransformStream, s), s;
|
|
2574
2572
|
});
|
|
2575
2573
|
}
|
|
2576
2574
|
n(si, "TransformStreamDefaultControllerPerformTransform");
|
|
2577
2575
|
function Es(e) {
|
|
2578
|
-
const t
|
|
2576
|
+
const t = e._controlledTransformStream, r = t._readable._readableStreamController;
|
|
2579
2577
|
De(r);
|
|
2580
|
-
dn(t
|
|
2578
|
+
dn(t, /* @__PURE__ */ new TypeError("TransformStream terminated"));
|
|
2581
2579
|
}
|
|
2582
2580
|
n(Es, "TransformStreamDefaultControllerTerminate");
|
|
2583
|
-
function As(e, t
|
|
2581
|
+
function As(e, t) {
|
|
2584
2582
|
const r = e._transformStreamController;
|
|
2585
2583
|
if (e._backpressure) {
|
|
2586
2584
|
const s = e._backpressureChangePromise;
|
|
2587
2585
|
return F(s, () => {
|
|
2588
2586
|
const u = e._writable;
|
|
2589
2587
|
if (u._state === "erroring") throw u._storedError;
|
|
2590
|
-
return si(r, t
|
|
2588
|
+
return si(r, t);
|
|
2591
2589
|
});
|
|
2592
2590
|
}
|
|
2593
|
-
return si(r, t
|
|
2591
|
+
return si(r, t);
|
|
2594
2592
|
}
|
|
2595
2593
|
n(As, "TransformStreamDefaultSinkWriteAlgorithm");
|
|
2596
|
-
function Bs(e, t
|
|
2594
|
+
function Bs(e, t) {
|
|
2597
2595
|
const r = e._transformStreamController;
|
|
2598
2596
|
if (r._finishPromise !== void 0) return r._finishPromise;
|
|
2599
2597
|
const s = e._readable;
|
|
2600
2598
|
r._finishPromise = A((c, d) => {
|
|
2601
2599
|
r._finishPromise_resolve = c, r._finishPromise_reject = d;
|
|
2602
2600
|
});
|
|
2603
|
-
const u = r._cancelAlgorithm(t
|
|
2604
|
-
return ur(r), g(u, () => (s._state === "errored" ? rt(r, s._storedError) : (oe(s._readableStreamController, t
|
|
2601
|
+
const u = r._cancelAlgorithm(t);
|
|
2602
|
+
return ur(r), g(u, () => (s._state === "errored" ? rt(r, s._storedError) : (oe(s._readableStreamController, t), pn(r)), null), (c) => (oe(s._readableStreamController, c), rt(r, c), null)), r._finishPromise;
|
|
2605
2603
|
}
|
|
2606
2604
|
n(Bs, "TransformStreamDefaultSinkAbortAlgorithm");
|
|
2607
2605
|
function ks(e) {
|
|
2608
|
-
const t
|
|
2609
|
-
if (t
|
|
2606
|
+
const t = e._transformStreamController;
|
|
2607
|
+
if (t._finishPromise !== void 0) return t._finishPromise;
|
|
2610
2608
|
const r = e._readable;
|
|
2611
|
-
t
|
|
2612
|
-
t
|
|
2609
|
+
t._finishPromise = A((u, c) => {
|
|
2610
|
+
t._finishPromise_resolve = u, t._finishPromise_reject = c;
|
|
2613
2611
|
});
|
|
2614
|
-
const s = t
|
|
2615
|
-
return ur(t
|
|
2612
|
+
const s = t._flushAlgorithm();
|
|
2613
|
+
return ur(t), g(s, () => (r._state === "errored" ? rt(t, r._storedError) : (De(r._readableStreamController), pn(t)), null), (u) => (oe(r._readableStreamController, u), rt(t, u), null)), t._finishPromise;
|
|
2616
2614
|
}
|
|
2617
2615
|
n(ks, "TransformStreamDefaultSinkCloseAlgorithm");
|
|
2618
2616
|
function Ws(e) {
|
|
2619
2617
|
return sr(e, !1), e._backpressureChangePromise;
|
|
2620
2618
|
}
|
|
2621
2619
|
n(Ws, "TransformStreamDefaultSourcePullAlgorithm");
|
|
2622
|
-
function qs(e, t
|
|
2620
|
+
function qs(e, t) {
|
|
2623
2621
|
const r = e._transformStreamController;
|
|
2624
2622
|
if (r._finishPromise !== void 0) return r._finishPromise;
|
|
2625
2623
|
const s = e._writable;
|
|
2626
2624
|
r._finishPromise = A((c, d) => {
|
|
2627
2625
|
r._finishPromise_resolve = c, r._finishPromise_reject = d;
|
|
2628
2626
|
});
|
|
2629
|
-
const u = r._cancelAlgorithm(t
|
|
2630
|
-
return ur(r), g(u, () => (s._state === "errored" ? rt(r, s._storedError) : (Ct(s._writableStreamController, t
|
|
2627
|
+
const u = r._cancelAlgorithm(t);
|
|
2628
|
+
return ur(r), g(u, () => (s._state === "errored" ? rt(r, s._storedError) : (Ct(s._writableStreamController, t), hn(e), pn(r)), null), (c) => (Ct(s._writableStreamController, c), hn(e), rt(r, c), null)), r._finishPromise;
|
|
2631
2629
|
}
|
|
2632
2630
|
n(qs, "TransformStreamDefaultSourceCancelAlgorithm");
|
|
2633
2631
|
function fr(e) {
|
|
@@ -2638,8 +2636,8 @@ function Ns() {
|
|
|
2638
2636
|
e._finishPromise_resolve !== void 0 && (e._finishPromise_resolve(), e._finishPromise_resolve = void 0, e._finishPromise_reject = void 0);
|
|
2639
2637
|
}
|
|
2640
2638
|
n(pn, "defaultControllerFinishPromiseResolve");
|
|
2641
|
-
function rt(e, t
|
|
2642
|
-
e._finishPromise_reject !== void 0 && (Q(e._finishPromise), e._finishPromise_reject(t
|
|
2639
|
+
function rt(e, t) {
|
|
2640
|
+
e._finishPromise_reject !== void 0 && (Q(e._finishPromise), e._finishPromise_reject(t), e._finishPromise_resolve = void 0, e._finishPromise_reject = void 0);
|
|
2643
2641
|
}
|
|
2644
2642
|
n(rt, "defaultControllerFinishPromiseReject");
|
|
2645
2643
|
function li(e) {
|
|
@@ -2656,18 +2654,18 @@ function Hs() {
|
|
|
2656
2654
|
mi = 1;
|
|
2657
2655
|
const i = 65536;
|
|
2658
2656
|
if (!globalThis.ReadableStream) try {
|
|
2659
|
-
const o
|
|
2657
|
+
const o = require("node:process"), { emitWarning: a } = o;
|
|
2660
2658
|
try {
|
|
2661
|
-
o
|
|
2662
|
-
} catch (f
|
|
2663
|
-
throw o
|
|
2659
|
+
o.emitWarning = () => {}, Object.assign(globalThis, require("node:stream/web")), o.emitWarning = a;
|
|
2660
|
+
} catch (f) {
|
|
2661
|
+
throw o.emitWarning = a, f;
|
|
2664
2662
|
}
|
|
2665
2663
|
} catch {
|
|
2666
2664
|
Object.assign(globalThis, Ns());
|
|
2667
2665
|
}
|
|
2668
2666
|
try {
|
|
2669
|
-
const { Blob: o
|
|
2670
|
-
o
|
|
2667
|
+
const { Blob: o } = require("buffer");
|
|
2668
|
+
o && !o.prototype.stream && (o.prototype.stream = n(function(f) {
|
|
2671
2669
|
let l = 0;
|
|
2672
2670
|
const p = this;
|
|
2673
2671
|
return new ReadableStream({
|
|
@@ -2683,39 +2681,39 @@ function Hs() {
|
|
|
2683
2681
|
}
|
|
2684
2682
|
n(Hs, "requireStreams"), Hs();
|
|
2685
2683
|
/*! fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */ const yi = 65536;
|
|
2686
|
-
async function* Wn(i, o
|
|
2684
|
+
async function* Wn(i, o = !0) {
|
|
2687
2685
|
for (const a of i) if ("stream" in a) yield* a.stream();
|
|
2688
|
-
else if (ArrayBuffer.isView(a)) if (o
|
|
2689
|
-
let f
|
|
2686
|
+
else if (ArrayBuffer.isView(a)) if (o) {
|
|
2687
|
+
let f = a.byteOffset;
|
|
2690
2688
|
const l = a.byteOffset + a.byteLength;
|
|
2691
|
-
for (; f
|
|
2692
|
-
const p = Math.min(l - f
|
|
2693
|
-
f
|
|
2689
|
+
for (; f !== l;) {
|
|
2690
|
+
const p = Math.min(l - f, yi), h = a.buffer.slice(f, f + p);
|
|
2691
|
+
f += h.byteLength, yield new Uint8Array(h);
|
|
2694
2692
|
}
|
|
2695
2693
|
} else yield a;
|
|
2696
2694
|
else {
|
|
2697
|
-
let f
|
|
2698
|
-
for (; f
|
|
2699
|
-
const h = await l.slice(f
|
|
2700
|
-
f
|
|
2695
|
+
let f = 0, l = a;
|
|
2696
|
+
for (; f !== l.size;) {
|
|
2697
|
+
const h = await l.slice(f, Math.min(l.size, f + yi)).arrayBuffer();
|
|
2698
|
+
f += h.byteLength, yield new Uint8Array(h);
|
|
2701
2699
|
}
|
|
2702
2700
|
}
|
|
2703
2701
|
}
|
|
2704
2702
|
n(Wn, "toIterator");
|
|
2705
2703
|
const gi = (ze = class {
|
|
2706
|
-
constructor(o
|
|
2704
|
+
constructor(o = [], a = {}) {
|
|
2707
2705
|
be(this, ve, []);
|
|
2708
2706
|
be(this, zt, "");
|
|
2709
2707
|
be(this, bt, 0);
|
|
2710
2708
|
be(this, Cr, "transparent");
|
|
2711
|
-
if (typeof o
|
|
2712
|
-
if (typeof o
|
|
2709
|
+
if (typeof o != "object" || o === null) throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");
|
|
2710
|
+
if (typeof o[Symbol.iterator] != "function") throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");
|
|
2713
2711
|
if (typeof a != "object" && typeof a != "function") throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");
|
|
2714
2712
|
a === null && (a = {});
|
|
2715
|
-
const f
|
|
2716
|
-
for (const p of o
|
|
2713
|
+
const f = new TextEncoder();
|
|
2714
|
+
for (const p of o) {
|
|
2717
2715
|
let h;
|
|
2718
|
-
ArrayBuffer.isView(p) ? h = new Uint8Array(p.buffer.slice(p.byteOffset, p.byteOffset + p.byteLength)) : p instanceof ArrayBuffer ? h = new Uint8Array(p.slice(0)) : p instanceof ze ? h = p : h = f
|
|
2716
|
+
ArrayBuffer.isView(p) ? h = new Uint8Array(p.buffer.slice(p.byteOffset, p.byteOffset + p.byteLength)) : p instanceof ArrayBuffer ? h = new Uint8Array(p.slice(0)) : p instanceof ze ? h = p : h = f.encode(`${p}`), X(this, bt, O(this, bt) + (ArrayBuffer.isView(h) ? h.byteLength : h.size)), O(this, ve).push(h);
|
|
2719
2717
|
}
|
|
2720
2718
|
X(this, Cr, `${a.endings === void 0 ? "transparent" : a.endings}`);
|
|
2721
2719
|
const l = a.type === void 0 ? "" : String(a.type);
|
|
@@ -2728,33 +2726,33 @@ const gi = (ze = class {
|
|
|
2728
2726
|
return O(this, zt);
|
|
2729
2727
|
}
|
|
2730
2728
|
async text() {
|
|
2731
|
-
const o
|
|
2729
|
+
const o = new TextDecoder();
|
|
2732
2730
|
let a = "";
|
|
2733
|
-
for await (const f
|
|
2734
|
-
return a += o
|
|
2731
|
+
for await (const f of Wn(O(this, ve), !1)) a += o.decode(f, { stream: !0 });
|
|
2732
|
+
return a += o.decode(), a;
|
|
2735
2733
|
}
|
|
2736
2734
|
async arrayBuffer() {
|
|
2737
|
-
const o
|
|
2735
|
+
const o = new Uint8Array(this.size);
|
|
2738
2736
|
let a = 0;
|
|
2739
|
-
for await (const f
|
|
2740
|
-
return o
|
|
2737
|
+
for await (const f of Wn(O(this, ve), !1)) o.set(f, a), a += f.length;
|
|
2738
|
+
return o.buffer;
|
|
2741
2739
|
}
|
|
2742
2740
|
stream() {
|
|
2743
|
-
const o
|
|
2741
|
+
const o = Wn(O(this, ve), !0);
|
|
2744
2742
|
return new globalThis.ReadableStream({
|
|
2745
2743
|
type: "bytes",
|
|
2746
2744
|
async pull(a) {
|
|
2747
|
-
const f
|
|
2748
|
-
f
|
|
2745
|
+
const f = await o.next();
|
|
2746
|
+
f.done ? a.close() : a.enqueue(f.value);
|
|
2749
2747
|
},
|
|
2750
2748
|
async cancel() {
|
|
2751
|
-
await o
|
|
2749
|
+
await o.return();
|
|
2752
2750
|
}
|
|
2753
2751
|
});
|
|
2754
2752
|
}
|
|
2755
|
-
slice(o
|
|
2753
|
+
slice(o = 0, a = this.size, f = "") {
|
|
2756
2754
|
const { size: l } = this;
|
|
2757
|
-
let p = o
|
|
2755
|
+
let p = o < 0 ? Math.max(l + o, 0) : Math.min(o, l), h = a < 0 ? Math.max(l + a, 0) : Math.min(a, l);
|
|
2758
2756
|
const S = Math.max(h - p, 0), v = O(this, ve), w = [];
|
|
2759
2757
|
let A = 0;
|
|
2760
2758
|
for (const b of v) {
|
|
@@ -2766,14 +2764,14 @@ const gi = (ze = class {
|
|
|
2766
2764
|
ArrayBuffer.isView(b) ? (g = b.subarray(p, Math.min(q, h)), A += g.byteLength) : (g = b.slice(p, Math.min(q, h)), A += g.size), h -= q, w.push(g), p = 0;
|
|
2767
2765
|
}
|
|
2768
2766
|
}
|
|
2769
|
-
const T = new ze([], { type: String(f
|
|
2767
|
+
const T = new ze([], { type: String(f).toLowerCase() });
|
|
2770
2768
|
return X(T, bt, S), X(T, ve, w), T;
|
|
2771
2769
|
}
|
|
2772
2770
|
get [Symbol.toStringTag]() {
|
|
2773
2771
|
return "Blob";
|
|
2774
2772
|
}
|
|
2775
|
-
static [Symbol.hasInstance](o
|
|
2776
|
-
return o
|
|
2773
|
+
static [Symbol.hasInstance](o) {
|
|
2774
|
+
return o && typeof o == "object" && typeof o.constructor == "function" && (typeof o.stream == "function" || typeof o.arrayBuffer == "function") && /^(Blob|File)$/.test(o[Symbol.toStringTag]);
|
|
2777
2775
|
}
|
|
2778
2776
|
}, ve = /* @__PURE__ */ new WeakMap(), zt = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), Cr = /* @__PURE__ */ new WeakMap(), n(ze, "Blob"), ze);
|
|
2779
2777
|
Object.defineProperties(gi.prototype, {
|
|
@@ -2782,14 +2780,14 @@ Object.defineProperties(gi.prototype, {
|
|
|
2782
2780
|
slice: { enumerable: !0 }
|
|
2783
2781
|
});
|
|
2784
2782
|
const ut = gi, qn = (mt = class extends ut {
|
|
2785
|
-
constructor(a, f
|
|
2783
|
+
constructor(a, f, l = {}) {
|
|
2786
2784
|
if (arguments.length < 2) throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);
|
|
2787
2785
|
super(a, l);
|
|
2788
2786
|
be(this, It, 0);
|
|
2789
2787
|
be(this, Ft, "");
|
|
2790
2788
|
l === null && (l = {});
|
|
2791
2789
|
const p = l.lastModified === void 0 ? Date.now() : Number(l.lastModified);
|
|
2792
|
-
Number.isNaN(p) || X(this, It, p), X(this, Ft, String(f
|
|
2790
|
+
Number.isNaN(p) || X(this, It, p), X(this, Ft, String(f));
|
|
2793
2791
|
}
|
|
2794
2792
|
get name() {
|
|
2795
2793
|
return O(this, Ft);
|
|
@@ -2804,14 +2802,14 @@ const ut = gi, qn = (mt = class extends ut {
|
|
|
2804
2802
|
return !!a && a instanceof ut && /^(File)$/.test(a[Symbol.toStringTag]);
|
|
2805
2803
|
}
|
|
2806
2804
|
}, It = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(), n(mt, "File"), mt);
|
|
2807
|
-
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */ var { toStringTag: Wt, iterator: Qs, hasInstance: Ys } = Symbol, _i = Math.random, Gs = "append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","), Si = n((i, o
|
|
2808
|
-
`)).replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), "e$1"), Ue = n((i, o
|
|
2809
|
-
if (o
|
|
2805
|
+
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */ var { toStringTag: Wt, iterator: Qs, hasInstance: Ys } = Symbol, _i = Math.random, Gs = "append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","), Si = n((i, o, a) => (i += "", /^(Blob|File)$/.test(o && o[Wt]) ? [(a = a !== void 0 ? a + "" : o[Wt] == "File" ? o.name : "blob", i), o.name !== a || o[Wt] == "blob" ? new qn([o], a, o) : o] : [i, o + ""]), "f"), On = n((i, o) => (o ? i : i.replace(/\r?\n|\r/g, `\r
|
|
2806
|
+
`)).replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), "e$1"), Ue = n((i, o, a) => {
|
|
2807
|
+
if (o.length < a) throw new TypeError(`Failed to execute '${i}' on 'FormData': ${a} arguments required, but only ${o.length} present.`);
|
|
2810
2808
|
}, "x");
|
|
2811
2809
|
const br = (yt = class {
|
|
2812
|
-
constructor(...o
|
|
2810
|
+
constructor(...o) {
|
|
2813
2811
|
be(this, ee, []);
|
|
2814
|
-
if (o
|
|
2812
|
+
if (o.length) throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.");
|
|
2815
2813
|
}
|
|
2816
2814
|
get [Wt]() {
|
|
2817
2815
|
return "FormData";
|
|
@@ -2819,64 +2817,64 @@ const br = (yt = class {
|
|
|
2819
2817
|
[Qs]() {
|
|
2820
2818
|
return this.entries();
|
|
2821
2819
|
}
|
|
2822
|
-
static [Ys](o
|
|
2823
|
-
return o
|
|
2820
|
+
static [Ys](o) {
|
|
2821
|
+
return o && typeof o == "object" && o[Wt] === "FormData" && !Gs.some((a) => typeof o[a] != "function");
|
|
2824
2822
|
}
|
|
2825
|
-
append(...o
|
|
2826
|
-
Ue("append", arguments, 2), O(this, ee).push(Si(...o
|
|
2823
|
+
append(...o) {
|
|
2824
|
+
Ue("append", arguments, 2), O(this, ee).push(Si(...o));
|
|
2827
2825
|
}
|
|
2828
|
-
delete(o
|
|
2829
|
-
Ue("delete", arguments, 1), o
|
|
2826
|
+
delete(o) {
|
|
2827
|
+
Ue("delete", arguments, 1), o += "", X(this, ee, O(this, ee).filter(([a]) => a !== o));
|
|
2830
2828
|
}
|
|
2831
|
-
get(o
|
|
2832
|
-
Ue("get", arguments, 1), o
|
|
2833
|
-
for (var a = O(this, ee), f
|
|
2829
|
+
get(o) {
|
|
2830
|
+
Ue("get", arguments, 1), o += "";
|
|
2831
|
+
for (var a = O(this, ee), f = a.length, l = 0; l < f; l++) if (a[l][0] === o) return a[l][1];
|
|
2834
2832
|
return null;
|
|
2835
2833
|
}
|
|
2836
|
-
getAll(o
|
|
2837
|
-
return Ue("getAll", arguments, 1), a = [], o
|
|
2834
|
+
getAll(o, a) {
|
|
2835
|
+
return Ue("getAll", arguments, 1), a = [], o += "", O(this, ee).forEach((f) => f[0] === o && a.push(f[1])), a;
|
|
2838
2836
|
}
|
|
2839
|
-
has(o
|
|
2840
|
-
return Ue("has", arguments, 1), o
|
|
2837
|
+
has(o) {
|
|
2838
|
+
return Ue("has", arguments, 1), o += "", O(this, ee).some((a) => a[0] === o);
|
|
2841
2839
|
}
|
|
2842
|
-
forEach(o
|
|
2840
|
+
forEach(o, a) {
|
|
2843
2841
|
Ue("forEach", arguments, 1);
|
|
2844
|
-
for (var [f
|
|
2842
|
+
for (var [f, l] of this) o.call(a, l, f, this);
|
|
2845
2843
|
}
|
|
2846
|
-
set(...o
|
|
2844
|
+
set(...o) {
|
|
2847
2845
|
Ue("set", arguments, 2);
|
|
2848
|
-
var a = [], f
|
|
2849
|
-
o
|
|
2850
|
-
l[0] === o
|
|
2851
|
-
}), f
|
|
2846
|
+
var a = [], f = !0;
|
|
2847
|
+
o = Si(...o), O(this, ee).forEach((l) => {
|
|
2848
|
+
l[0] === o[0] ? f && (f = !a.push(o)) : a.push(l);
|
|
2849
|
+
}), f && a.push(o), X(this, ee, a);
|
|
2852
2850
|
}
|
|
2853
2851
|
*entries() {
|
|
2854
2852
|
yield* O(this, ee);
|
|
2855
2853
|
}
|
|
2856
2854
|
*keys() {
|
|
2857
|
-
for (var [o
|
|
2855
|
+
for (var [o] of this) yield o;
|
|
2858
2856
|
}
|
|
2859
2857
|
*values() {
|
|
2860
|
-
for (var [, o
|
|
2858
|
+
for (var [, o] of this) yield o;
|
|
2861
2859
|
}
|
|
2862
2860
|
}, ee = /* @__PURE__ */ new WeakMap(), n(yt, "FormData"), yt);
|
|
2863
|
-
function Zs(i, o
|
|
2864
|
-
var a = `${_i()}${_i()}`.replace(/\./g, "").slice(-28).padStart(32, "-"), f
|
|
2861
|
+
function Zs(i, o = ut) {
|
|
2862
|
+
var a = `${_i()}${_i()}`.replace(/\./g, "").slice(-28).padStart(32, "-"), f = [], l = `--${a}\r
|
|
2865
2863
|
Content-Disposition: form-data; name="`;
|
|
2866
|
-
return i.forEach((p, h) => typeof p == "string" ? f
|
|
2864
|
+
return i.forEach((p, h) => typeof p == "string" ? f.push(l + On(h) + `"\r
|
|
2867
2865
|
\r
|
|
2868
2866
|
${p.replace(/\r(?!\n)|(?<!\r)\n/g, `\r
|
|
2869
2867
|
`)}\r
|
|
2870
|
-
`) : f
|
|
2868
|
+
`) : f.push(l + On(h) + `"; filename="${On(p.name, 1)}"\r
|
|
2871
2869
|
Content-Type: ${p.type || "application/octet-stream"}\r
|
|
2872
2870
|
\r
|
|
2873
2871
|
`, p, `\r
|
|
2874
|
-
`)), f
|
|
2872
|
+
`)), f.push(`--${a}--`), new o(f, { type: "multipart/form-data; boundary=" + a });
|
|
2875
2873
|
}
|
|
2876
2874
|
n(Zs, "formDataToBlob");
|
|
2877
|
-
const Un = class Un
|
|
2878
|
-
constructor(o
|
|
2879
|
-
super(o
|
|
2875
|
+
const Un = class Un extends Error {
|
|
2876
|
+
constructor(o, a) {
|
|
2877
|
+
super(o), Error.captureStackTrace(this, this.constructor), this.type = a;
|
|
2880
2878
|
}
|
|
2881
2879
|
get name() {
|
|
2882
2880
|
return this.constructor.name;
|
|
@@ -2887,30 +2885,30 @@ const Un = class Un$1 extends Error {
|
|
|
2887
2885
|
};
|
|
2888
2886
|
n(Un, "FetchBaseError");
|
|
2889
2887
|
let ft = Un;
|
|
2890
|
-
const xn = class xn
|
|
2891
|
-
constructor(o
|
|
2892
|
-
super(o
|
|
2888
|
+
const xn = class xn extends ft {
|
|
2889
|
+
constructor(o, a, f) {
|
|
2890
|
+
super(o, a), f && (this.code = this.errno = f.code, this.erroredSysCall = f.syscall);
|
|
2893
2891
|
}
|
|
2894
2892
|
};
|
|
2895
2893
|
n(xn, "FetchError");
|
|
2896
2894
|
let G = xn;
|
|
2897
|
-
const mr = Symbol.toStringTag, wi = n((i) => typeof i == "object" && typeof i.append == "function" && typeof i.delete == "function" && typeof i.get == "function" && typeof i.getAll == "function" && typeof i.has == "function" && typeof i.set == "function" && typeof i.sort == "function" && i[mr] === "URLSearchParams", "isURLSearchParameters"), yr = n((i) => i && typeof i == "object" && typeof i.arrayBuffer == "function" && typeof i.type == "string" && typeof i.stream == "function" && typeof i.constructor == "function" && /^(Blob|File)$/.test(i[mr]), "isBlob"), Ks = n((i) => typeof i == "object" && (i[mr] === "AbortSignal" || i[mr] === "EventTarget"), "isAbortSignal"), Js = n((i, o
|
|
2898
|
-
const a = new URL(o
|
|
2899
|
-
return a === f
|
|
2900
|
-
}, "isDomainOrSubdomain"), Xs = n((i, o
|
|
2901
|
-
return new URL(o
|
|
2902
|
-
}, "isSameProtocol"), el = (0, node_util.promisify)(node_stream.default.pipeline), H = Symbol("Body internals"), Nn = class Nn
|
|
2903
|
-
constructor(o
|
|
2904
|
-
let f
|
|
2905
|
-
o
|
|
2906
|
-
let l = o
|
|
2907
|
-
node_buffer.Buffer.isBuffer(o
|
|
2908
|
-
body: o
|
|
2895
|
+
const mr = Symbol.toStringTag, wi = n((i) => typeof i == "object" && typeof i.append == "function" && typeof i.delete == "function" && typeof i.get == "function" && typeof i.getAll == "function" && typeof i.has == "function" && typeof i.set == "function" && typeof i.sort == "function" && i[mr] === "URLSearchParams", "isURLSearchParameters"), yr = n((i) => i && typeof i == "object" && typeof i.arrayBuffer == "function" && typeof i.type == "string" && typeof i.stream == "function" && typeof i.constructor == "function" && /^(Blob|File)$/.test(i[mr]), "isBlob"), Ks = n((i) => typeof i == "object" && (i[mr] === "AbortSignal" || i[mr] === "EventTarget"), "isAbortSignal"), Js = n((i, o) => {
|
|
2896
|
+
const a = new URL(o).hostname, f = new URL(i).hostname;
|
|
2897
|
+
return a === f || a.endsWith(`.${f}`);
|
|
2898
|
+
}, "isDomainOrSubdomain"), Xs = n((i, o) => {
|
|
2899
|
+
return new URL(o).protocol === new URL(i).protocol;
|
|
2900
|
+
}, "isSameProtocol"), el = (0, node_util.promisify)(node_stream.default.pipeline), H = Symbol("Body internals"), Nn = class Nn {
|
|
2901
|
+
constructor(o, { size: a = 0 } = {}) {
|
|
2902
|
+
let f = null;
|
|
2903
|
+
o === null ? o = null : wi(o) ? o = node_buffer.Buffer.from(o.toString()) : yr(o) || node_buffer.Buffer.isBuffer(o) || (node_util.types.isAnyArrayBuffer(o) ? o = node_buffer.Buffer.from(o) : ArrayBuffer.isView(o) ? o = node_buffer.Buffer.from(o.buffer, o.byteOffset, o.byteLength) : o instanceof node_stream.default || (o instanceof br ? (o = Zs(o), f = o.type.split("=")[1]) : o = node_buffer.Buffer.from(String(o))));
|
|
2904
|
+
let l = o;
|
|
2905
|
+
node_buffer.Buffer.isBuffer(o) ? l = node_stream.default.Readable.from(o) : yr(o) && (l = node_stream.default.Readable.from(o.stream())), this[H] = {
|
|
2906
|
+
body: o,
|
|
2909
2907
|
stream: l,
|
|
2910
|
-
boundary: f
|
|
2908
|
+
boundary: f,
|
|
2911
2909
|
disturbed: !1,
|
|
2912
2910
|
error: null
|
|
2913
|
-
}, this.size = a, o
|
|
2911
|
+
}, this.size = a, o instanceof node_stream.default && o.on("error", (p) => {
|
|
2914
2912
|
const h = p instanceof ft ? p : new G(`Invalid response body while trying to fetch ${this.url}: ${p.message}`, "system", p);
|
|
2915
2913
|
this[H].error = h;
|
|
2916
2914
|
});
|
|
@@ -2922,30 +2920,30 @@ const mr = Symbol.toStringTag, wi = n((i) => typeof i == "object" && typeof i.ap
|
|
|
2922
2920
|
return this[H].disturbed;
|
|
2923
2921
|
}
|
|
2924
2922
|
async arrayBuffer() {
|
|
2925
|
-
const { buffer: o
|
|
2926
|
-
return o
|
|
2923
|
+
const { buffer: o, byteOffset: a, byteLength: f } = await zn(this);
|
|
2924
|
+
return o.slice(a, a + f);
|
|
2927
2925
|
}
|
|
2928
2926
|
async formData() {
|
|
2929
|
-
const o
|
|
2930
|
-
if (o
|
|
2931
|
-
const f
|
|
2932
|
-
for (const [p, h] of l) f
|
|
2933
|
-
return f
|
|
2927
|
+
const o = this.headers.get("content-type");
|
|
2928
|
+
if (o.startsWith("application/x-www-form-urlencoded")) {
|
|
2929
|
+
const f = new br(), l = new URLSearchParams(await this.text());
|
|
2930
|
+
for (const [p, h] of l) f.append(p, h);
|
|
2931
|
+
return f;
|
|
2934
2932
|
}
|
|
2935
|
-
const { toFormData: a } = await Promise.resolve().then(() => require("./multipart-parser-
|
|
2936
|
-
return a(this.body, o
|
|
2933
|
+
const { toFormData: a } = await Promise.resolve().then(() => require("./multipart-parser-DiNB_U8f.cjs"));
|
|
2934
|
+
return a(this.body, o);
|
|
2937
2935
|
}
|
|
2938
2936
|
async blob() {
|
|
2939
|
-
const o
|
|
2940
|
-
return new ut([await this.arrayBuffer()], { type: o
|
|
2937
|
+
const o = this.headers && this.headers.get("content-type") || this[H].body && this[H].body.type || "";
|
|
2938
|
+
return new ut([await this.arrayBuffer()], { type: o });
|
|
2941
2939
|
}
|
|
2942
2940
|
async json() {
|
|
2943
|
-
const o
|
|
2944
|
-
return JSON.parse(o
|
|
2941
|
+
const o = await this.text();
|
|
2942
|
+
return JSON.parse(o);
|
|
2945
2943
|
}
|
|
2946
2944
|
async text() {
|
|
2947
|
-
const o
|
|
2948
|
-
return new TextDecoder().decode(o
|
|
2945
|
+
const o = await zn(this);
|
|
2946
|
+
return new TextDecoder().decode(o);
|
|
2949
2947
|
}
|
|
2950
2948
|
buffer() {
|
|
2951
2949
|
return zn(this);
|
|
@@ -2965,61 +2963,61 @@ xe.prototype.buffer = (0, node_util.deprecate)(xe.prototype.buffer, "Please use
|
|
|
2965
2963
|
async function zn(i) {
|
|
2966
2964
|
if (i[H].disturbed) throw new TypeError(`body used already for: ${i.url}`);
|
|
2967
2965
|
if (i[H].disturbed = !0, i[H].error) throw i[H].error;
|
|
2968
|
-
const { body: o
|
|
2969
|
-
if (o
|
|
2970
|
-
if (!(o
|
|
2966
|
+
const { body: o } = i;
|
|
2967
|
+
if (o === null) return node_buffer.Buffer.alloc(0);
|
|
2968
|
+
if (!(o instanceof node_stream.default)) return node_buffer.Buffer.alloc(0);
|
|
2971
2969
|
const a = [];
|
|
2972
|
-
let f
|
|
2970
|
+
let f = 0;
|
|
2973
2971
|
try {
|
|
2974
|
-
for await (const l of o
|
|
2975
|
-
if (i.size > 0 && f
|
|
2972
|
+
for await (const l of o) {
|
|
2973
|
+
if (i.size > 0 && f + l.length > i.size) {
|
|
2976
2974
|
const p = new G(`content size at ${i.url} over limit: ${i.size}`, "max-size");
|
|
2977
|
-
throw o
|
|
2975
|
+
throw o.destroy(p), p;
|
|
2978
2976
|
}
|
|
2979
|
-
f
|
|
2977
|
+
f += l.length, a.push(l);
|
|
2980
2978
|
}
|
|
2981
2979
|
} catch (l) {
|
|
2982
2980
|
throw l instanceof ft ? l : new G(`Invalid response body while trying to fetch ${i.url}: ${l.message}`, "system", l);
|
|
2983
2981
|
}
|
|
2984
|
-
if (o
|
|
2985
|
-
return a.every((l) => typeof l == "string") ? node_buffer.Buffer.from(a.join("")) : node_buffer.Buffer.concat(a, f
|
|
2982
|
+
if (o.readableEnded === !0 || o._readableState.ended === !0) try {
|
|
2983
|
+
return a.every((l) => typeof l == "string") ? node_buffer.Buffer.from(a.join("")) : node_buffer.Buffer.concat(a, f);
|
|
2986
2984
|
} catch (l) {
|
|
2987
2985
|
throw new G(`Could not create Buffer from response body for ${i.url}: ${l.message}`, "system", l);
|
|
2988
2986
|
}
|
|
2989
2987
|
else throw new G(`Premature close of server response while trying to fetch ${i.url}`);
|
|
2990
2988
|
}
|
|
2991
2989
|
n(zn, "consumeBody");
|
|
2992
|
-
const In = n((i, o
|
|
2993
|
-
let a, f
|
|
2990
|
+
const In = n((i, o) => {
|
|
2991
|
+
let a, f, { body: l } = i[H];
|
|
2994
2992
|
if (i.bodyUsed) throw new Error("cannot clone body after it is used");
|
|
2995
|
-
return l instanceof node_stream.default && typeof l.getBoundary != "function" && (a = new node_stream.PassThrough({ highWaterMark: o
|
|
2996
|
-
}, "clone"), tl = (0, node_util.deprecate)((i) => i.getBoundary(), "form-data doesn't follow the spec and requires special treatment. Use alternative package", "https://github.com/node-fetch/node-fetch/issues/1167"), Ri = n((i, o
|
|
2997
|
-
const { body: o
|
|
2998
|
-
return o
|
|
2999
|
-
}, "getTotalBytes"), nl = n(async (i, { body: o
|
|
3000
|
-
o
|
|
2993
|
+
return l instanceof node_stream.default && typeof l.getBoundary != "function" && (a = new node_stream.PassThrough({ highWaterMark: o }), f = new node_stream.PassThrough({ highWaterMark: o }), l.pipe(a), l.pipe(f), i[H].stream = a, l = f), l;
|
|
2994
|
+
}, "clone"), tl = (0, node_util.deprecate)((i) => i.getBoundary(), "form-data doesn't follow the spec and requires special treatment. Use alternative package", "https://github.com/node-fetch/node-fetch/issues/1167"), Ri = n((i, o) => i === null ? null : typeof i == "string" ? "text/plain;charset=UTF-8" : wi(i) ? "application/x-www-form-urlencoded;charset=UTF-8" : yr(i) ? i.type || null : node_buffer.Buffer.isBuffer(i) || node_util.types.isAnyArrayBuffer(i) || ArrayBuffer.isView(i) ? null : i instanceof br ? `multipart/form-data; boundary=${o[H].boundary}` : i && typeof i.getBoundary == "function" ? `multipart/form-data;boundary=${tl(i)}` : i instanceof node_stream.default ? null : "text/plain;charset=UTF-8", "extractContentType"), rl = n((i) => {
|
|
2995
|
+
const { body: o } = i[H];
|
|
2996
|
+
return o === null ? 0 : yr(o) ? o.size : node_buffer.Buffer.isBuffer(o) ? o.length : o && typeof o.getLengthSync == "function" && o.hasKnownLength && o.hasKnownLength() ? o.getLengthSync() : null;
|
|
2997
|
+
}, "getTotalBytes"), nl = n(async (i, { body: o }) => {
|
|
2998
|
+
o === null ? i.end() : await el(o, i);
|
|
3001
2999
|
}, "writeToStream"), gr = typeof node_http.default.validateHeaderName == "function" ? node_http.default.validateHeaderName : (i) => {
|
|
3002
3000
|
if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(i)) {
|
|
3003
|
-
const o
|
|
3004
|
-
throw Object.defineProperty(o
|
|
3001
|
+
const o = /* @__PURE__ */ new TypeError(`Header name must be a valid HTTP token [${i}]`);
|
|
3002
|
+
throw Object.defineProperty(o, "code", { value: "ERR_INVALID_HTTP_TOKEN" }), o;
|
|
3005
3003
|
}
|
|
3006
|
-
}, Fn = typeof node_http.default.validateHeaderValue == "function" ? node_http.default.validateHeaderValue : (i, o
|
|
3007
|
-
if (/[^\t\u0020-\u007E\u0080-\u00FF]/.test(o
|
|
3004
|
+
}, Fn = typeof node_http.default.validateHeaderValue == "function" ? node_http.default.validateHeaderValue : (i, o) => {
|
|
3005
|
+
if (/[^\t\u0020-\u007E\u0080-\u00FF]/.test(o)) {
|
|
3008
3006
|
const a = /* @__PURE__ */ new TypeError(`Invalid character in header content ["${i}"]`);
|
|
3009
3007
|
throw Object.defineProperty(a, "code", { value: "ERR_INVALID_CHAR" }), a;
|
|
3010
3008
|
}
|
|
3011
|
-
}, Pr = class Pr
|
|
3012
|
-
constructor(o
|
|
3009
|
+
}, Pr = class Pr extends URLSearchParams {
|
|
3010
|
+
constructor(o) {
|
|
3013
3011
|
let a = [];
|
|
3014
|
-
if (o
|
|
3015
|
-
const f
|
|
3016
|
-
for (const [l, p] of Object.entries(f
|
|
3017
|
-
} else if (o
|
|
3018
|
-
const f
|
|
3019
|
-
if (f
|
|
3012
|
+
if (o instanceof Pr) {
|
|
3013
|
+
const f = o.raw();
|
|
3014
|
+
for (const [l, p] of Object.entries(f)) a.push(...p.map((h) => [l, h]));
|
|
3015
|
+
} else if (o != null) if (typeof o == "object" && !node_util.types.isBoxedPrimitive(o)) {
|
|
3016
|
+
const f = o[Symbol.iterator];
|
|
3017
|
+
if (f == null) a.push(...Object.entries(o));
|
|
3020
3018
|
else {
|
|
3021
|
-
if (typeof f
|
|
3022
|
-
a = [...o
|
|
3019
|
+
if (typeof f != "function") throw new TypeError("Header pairs must be iterable");
|
|
3020
|
+
a = [...o].map((l) => {
|
|
3023
3021
|
if (typeof l != "object" || node_util.types.isBoxedPrimitive(l)) throw new TypeError("Each header pair must be an iterable object");
|
|
3024
3022
|
return [...l];
|
|
3025
3023
|
}).map((l) => {
|
|
@@ -3028,15 +3026,15 @@ const In = n((i, o$1) => {
|
|
|
3028
3026
|
});
|
|
3029
3027
|
}
|
|
3030
3028
|
} else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");
|
|
3031
|
-
return a = a.length > 0 ? a.map(([f
|
|
3029
|
+
return a = a.length > 0 ? a.map(([f, l]) => (gr(f), Fn(f, String(l)), [String(f).toLowerCase(), String(l)])) : void 0, super(a), new Proxy(this, { get(f, l, p) {
|
|
3032
3030
|
switch (l) {
|
|
3033
3031
|
case "append":
|
|
3034
|
-
case "set": return (h, S) => (gr(h), Fn(h, String(S)), URLSearchParams.prototype[l].call(f
|
|
3032
|
+
case "set": return (h, S) => (gr(h), Fn(h, String(S)), URLSearchParams.prototype[l].call(f, String(h).toLowerCase(), String(S)));
|
|
3035
3033
|
case "delete":
|
|
3036
3034
|
case "has":
|
|
3037
|
-
case "getAll": return (h) => (gr(h), URLSearchParams.prototype[l].call(f
|
|
3038
|
-
case "keys": return () => (f
|
|
3039
|
-
default: return Reflect.get(f
|
|
3035
|
+
case "getAll": return (h) => (gr(h), URLSearchParams.prototype[l].call(f, String(h).toLowerCase()));
|
|
3036
|
+
case "keys": return () => (f.sort(), new Set(URLSearchParams.prototype.keys.call(f)).keys());
|
|
3037
|
+
default: return Reflect.get(f, l, p);
|
|
3040
3038
|
}
|
|
3041
3039
|
} });
|
|
3042
3040
|
}
|
|
@@ -3046,35 +3044,35 @@ const In = n((i, o$1) => {
|
|
|
3046
3044
|
toString() {
|
|
3047
3045
|
return Object.prototype.toString.call(this);
|
|
3048
3046
|
}
|
|
3049
|
-
get(o
|
|
3050
|
-
const a = this.getAll(o
|
|
3047
|
+
get(o) {
|
|
3048
|
+
const a = this.getAll(o);
|
|
3051
3049
|
if (a.length === 0) return null;
|
|
3052
|
-
let f
|
|
3053
|
-
return /^content-encoding$/i.test(o
|
|
3050
|
+
let f = a.join(", ");
|
|
3051
|
+
return /^content-encoding$/i.test(o) && (f = f.toLowerCase()), f;
|
|
3054
3052
|
}
|
|
3055
|
-
forEach(o
|
|
3056
|
-
for (const f
|
|
3057
|
-
this.get(f
|
|
3058
|
-
f
|
|
3053
|
+
forEach(o, a = void 0) {
|
|
3054
|
+
for (const f of this.keys()) Reflect.apply(o, a, [
|
|
3055
|
+
this.get(f),
|
|
3056
|
+
f,
|
|
3059
3057
|
this
|
|
3060
3058
|
]);
|
|
3061
3059
|
}
|
|
3062
3060
|
*values() {
|
|
3063
|
-
for (const o
|
|
3061
|
+
for (const o of this.keys()) yield this.get(o);
|
|
3064
3062
|
}
|
|
3065
3063
|
*entries() {
|
|
3066
|
-
for (const o
|
|
3064
|
+
for (const o of this.keys()) yield [o, this.get(o)];
|
|
3067
3065
|
}
|
|
3068
3066
|
[Symbol.iterator]() {
|
|
3069
3067
|
return this.entries();
|
|
3070
3068
|
}
|
|
3071
3069
|
raw() {
|
|
3072
|
-
return [...this.keys()].reduce((o
|
|
3070
|
+
return [...this.keys()].reduce((o, a) => (o[a] = this.getAll(a), o), {});
|
|
3073
3071
|
}
|
|
3074
3072
|
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
3075
|
-
return [...this.keys()].reduce((o
|
|
3076
|
-
const f
|
|
3077
|
-
return a === "host" ? o
|
|
3073
|
+
return [...this.keys()].reduce((o, a) => {
|
|
3074
|
+
const f = this.getAll(a);
|
|
3075
|
+
return a === "host" ? o[a] = f[0] : o[a] = f.length > 1 ? f : f[0], o;
|
|
3078
3076
|
}, {});
|
|
3079
3077
|
}
|
|
3080
3078
|
};
|
|
@@ -3085,11 +3083,11 @@ Object.defineProperties(ye.prototype, [
|
|
|
3085
3083
|
"entries",
|
|
3086
3084
|
"forEach",
|
|
3087
3085
|
"values"
|
|
3088
|
-
].reduce((i, o
|
|
3086
|
+
].reduce((i, o) => (i[o] = { enumerable: !0 }, i), {}));
|
|
3089
3087
|
function ol(i = []) {
|
|
3090
|
-
return new ye(i.reduce((o
|
|
3088
|
+
return new ye(i.reduce((o, a, f, l) => (f % 2 === 0 && o.push(l.slice(f, f + 2)), o), []).filter(([o, a]) => {
|
|
3091
3089
|
try {
|
|
3092
|
-
return gr(o
|
|
3090
|
+
return gr(o), Fn(o, String(a)), !0;
|
|
3093
3091
|
} catch {
|
|
3094
3092
|
return !1;
|
|
3095
3093
|
}
|
|
@@ -3102,18 +3100,18 @@ const il = new Set([
|
|
|
3102
3100
|
303,
|
|
3103
3101
|
307,
|
|
3104
3102
|
308
|
|
3105
|
-
]), jn = n((i) => il.has(i), "isRedirect"), se = Symbol("Response internals"), Ne = class Ne
|
|
3106
|
-
constructor(o
|
|
3107
|
-
super(o
|
|
3108
|
-
const f
|
|
3109
|
-
if (o
|
|
3110
|
-
const p = Ri(o
|
|
3103
|
+
]), jn = n((i) => il.has(i), "isRedirect"), se = Symbol("Response internals"), Ne = class Ne extends xe {
|
|
3104
|
+
constructor(o = null, a = {}) {
|
|
3105
|
+
super(o, a);
|
|
3106
|
+
const f = a.status != null ? a.status : 200, l = new ye(a.headers);
|
|
3107
|
+
if (o !== null && !l.has("Content-Type")) {
|
|
3108
|
+
const p = Ri(o, this);
|
|
3111
3109
|
p && l.append("Content-Type", p);
|
|
3112
3110
|
}
|
|
3113
3111
|
this[se] = {
|
|
3114
3112
|
type: "default",
|
|
3115
3113
|
url: a.url,
|
|
3116
|
-
status: f
|
|
3114
|
+
status: f,
|
|
3117
3115
|
statusText: a.statusText || "",
|
|
3118
3116
|
headers: l,
|
|
3119
3117
|
counter: a.counter,
|
|
@@ -3145,7 +3143,7 @@ const il = new Set([
|
|
|
3145
3143
|
return this[se].highWaterMark;
|
|
3146
3144
|
}
|
|
3147
3145
|
clone() {
|
|
3148
|
-
return new Ne
|
|
3146
|
+
return new Ne(In(this, this.highWaterMark), {
|
|
3149
3147
|
type: this.type,
|
|
3150
3148
|
url: this.url,
|
|
3151
3149
|
status: this.status,
|
|
@@ -3157,25 +3155,25 @@ const il = new Set([
|
|
|
3157
3155
|
highWaterMark: this.highWaterMark
|
|
3158
3156
|
});
|
|
3159
3157
|
}
|
|
3160
|
-
static redirect(o
|
|
3158
|
+
static redirect(o, a = 302) {
|
|
3161
3159
|
if (!jn(a)) throw new RangeError("Failed to execute \"redirect\" on \"response\": Invalid status code");
|
|
3162
|
-
return new Ne
|
|
3163
|
-
headers: { location: new URL(o
|
|
3160
|
+
return new Ne(null, {
|
|
3161
|
+
headers: { location: new URL(o).toString() },
|
|
3164
3162
|
status: a
|
|
3165
3163
|
});
|
|
3166
3164
|
}
|
|
3167
3165
|
static error() {
|
|
3168
|
-
const o
|
|
3166
|
+
const o = new Ne(null, {
|
|
3169
3167
|
status: 0,
|
|
3170
3168
|
statusText: ""
|
|
3171
3169
|
});
|
|
3172
|
-
return o
|
|
3170
|
+
return o[se].type = "error", o;
|
|
3173
3171
|
}
|
|
3174
|
-
static json(o
|
|
3175
|
-
const f
|
|
3176
|
-
if (f
|
|
3172
|
+
static json(o = void 0, a = {}) {
|
|
3173
|
+
const f = JSON.stringify(o);
|
|
3174
|
+
if (f === void 0) throw new TypeError("data is not JSON serializable");
|
|
3177
3175
|
const l = new ye(a && a.headers);
|
|
3178
|
-
return l.has("content-type") || l.set("content-type", "application/json"), new Ne
|
|
3176
|
+
return l.has("content-type") || l.set("content-type", "application/json"), new Ne(f, {
|
|
3179
3177
|
...a,
|
|
3180
3178
|
headers: l
|
|
3181
3179
|
});
|
|
@@ -3198,11 +3196,11 @@ Object.defineProperties(le.prototype, {
|
|
|
3198
3196
|
});
|
|
3199
3197
|
const al = n((i) => {
|
|
3200
3198
|
if (i.search) return i.search;
|
|
3201
|
-
const o
|
|
3202
|
-
return i.href[o
|
|
3199
|
+
const o = i.href.length - 1, a = i.hash || (i.href[o] === "#" ? "#" : "");
|
|
3200
|
+
return i.href[o - a.length] === "?" ? "?" : "";
|
|
3203
3201
|
}, "getSearch");
|
|
3204
|
-
function Ti(i, o
|
|
3205
|
-
return i == null || (i = new URL(i), /^(about|blob|data):$/.test(i.protocol)) ? "no-referrer" : (i.username = "", i.password = "", i.hash = "", o
|
|
3202
|
+
function Ti(i, o = !1) {
|
|
3203
|
+
return i == null || (i = new URL(i), /^(about|blob|data):$/.test(i.protocol)) ? "no-referrer" : (i.username = "", i.password = "", i.hash = "", o && (i.pathname = "", i.search = ""), i);
|
|
3206
3204
|
}
|
|
3207
3205
|
n(Ti, "stripURLForUseAsAReferrer");
|
|
3208
3206
|
const Ci = new Set([
|
|
@@ -3223,23 +3221,23 @@ function ll(i) {
|
|
|
3223
3221
|
n(ll, "validateReferrerPolicy");
|
|
3224
3222
|
function ul(i) {
|
|
3225
3223
|
if (/^(http|ws)s:$/.test(i.protocol)) return !0;
|
|
3226
|
-
const o
|
|
3227
|
-
return a === 4 && /^127\./.test(o
|
|
3224
|
+
const o = i.host.replace(/(^\[)|(]$)/g, ""), a = (0, node_net.isIP)(o);
|
|
3225
|
+
return a === 4 && /^127\./.test(o) || a === 6 && /^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(o) ? !0 : i.host === "localhost" || i.host.endsWith(".localhost") ? !1 : i.protocol === "file:";
|
|
3228
3226
|
}
|
|
3229
3227
|
n(ul, "isOriginPotentiallyTrustworthy");
|
|
3230
3228
|
function ct(i) {
|
|
3231
3229
|
return /^about:(blank|srcdoc)$/.test(i) || i.protocol === "data:" || /^(blob|filesystem):$/.test(i.protocol) ? !0 : ul(i);
|
|
3232
3230
|
}
|
|
3233
3231
|
n(ct, "isUrlPotentiallyTrustworthy");
|
|
3234
|
-
function fl(i, { referrerURLCallback: o
|
|
3232
|
+
function fl(i, { referrerURLCallback: o, referrerOriginCallback: a } = {}) {
|
|
3235
3233
|
if (i.referrer === "no-referrer" || i.referrerPolicy === "") return null;
|
|
3236
|
-
const f
|
|
3234
|
+
const f = i.referrerPolicy;
|
|
3237
3235
|
if (i.referrer === "about:client") return "no-referrer";
|
|
3238
3236
|
const l = i.referrer;
|
|
3239
3237
|
let p = Ti(l), h = Ti(l, !0);
|
|
3240
|
-
p.toString().length > 4096 && (p = h), o
|
|
3238
|
+
p.toString().length > 4096 && (p = h), o && (p = o(p)), a && (h = a(h));
|
|
3241
3239
|
const S = new URL(i.url);
|
|
3242
|
-
switch (f
|
|
3240
|
+
switch (f) {
|
|
3243
3241
|
case "no-referrer": return "no-referrer";
|
|
3244
3242
|
case "origin": return h;
|
|
3245
3243
|
case "unsafe-url": return p;
|
|
@@ -3248,33 +3246,33 @@ function fl(i, { referrerURLCallback: o$1, referrerOriginCallback: a } = {}) {
|
|
|
3248
3246
|
case "same-origin": return p.origin === S.origin ? p : "no-referrer";
|
|
3249
3247
|
case "origin-when-cross-origin": return p.origin === S.origin ? p : h;
|
|
3250
3248
|
case "no-referrer-when-downgrade": return ct(p) && !ct(S) ? "no-referrer" : p;
|
|
3251
|
-
default: throw new TypeError(`Invalid referrerPolicy: ${f
|
|
3249
|
+
default: throw new TypeError(`Invalid referrerPolicy: ${f}`);
|
|
3252
3250
|
}
|
|
3253
3251
|
}
|
|
3254
3252
|
n(fl, "determineRequestsReferrer");
|
|
3255
3253
|
function cl(i) {
|
|
3256
|
-
const o
|
|
3254
|
+
const o = (i.get("referrer-policy") || "").split(/[,\s]+/);
|
|
3257
3255
|
let a = "";
|
|
3258
|
-
for (const f
|
|
3256
|
+
for (const f of o) f && Ci.has(f) && (a = f);
|
|
3259
3257
|
return a;
|
|
3260
3258
|
}
|
|
3261
3259
|
n(cl, "parseReferrerPolicyFromHeader");
|
|
3262
|
-
const $ = Symbol("Request internals"), qt = n((i) => typeof i == "object" && typeof i[$] == "object", "isRequest"), dl = (0, node_util.deprecate)(() => {}, ".data is not a valid RequestInit property, use .body instead", "https://github.com/node-fetch/node-fetch/issues/1000 (request)"), vr = class vr
|
|
3263
|
-
constructor(o
|
|
3264
|
-
let f
|
|
3265
|
-
if (qt(o
|
|
3266
|
-
let l = a.method || o
|
|
3267
|
-
if (/^(delete|get|head|options|post|put)$/i.test(l) && (l = l.toUpperCase()), !qt(a) && "data" in a && dl(), (a.body != null || qt(o
|
|
3268
|
-
const p = a.body ? a.body : qt(o
|
|
3269
|
-
super(p, { size: a.size || o
|
|
3270
|
-
const h = new ye(a.headers || o
|
|
3260
|
+
const $ = Symbol("Request internals"), qt = n((i) => typeof i == "object" && typeof i[$] == "object", "isRequest"), dl = (0, node_util.deprecate)(() => {}, ".data is not a valid RequestInit property, use .body instead", "https://github.com/node-fetch/node-fetch/issues/1000 (request)"), vr = class vr extends xe {
|
|
3261
|
+
constructor(o, a = {}) {
|
|
3262
|
+
let f;
|
|
3263
|
+
if (qt(o) ? f = new URL(o.url) : (f = new URL(o), o = {}), f.username !== "" || f.password !== "") throw new TypeError(`${f} is an url with embedded credentials.`);
|
|
3264
|
+
let l = a.method || o.method || "GET";
|
|
3265
|
+
if (/^(delete|get|head|options|post|put)$/i.test(l) && (l = l.toUpperCase()), !qt(a) && "data" in a && dl(), (a.body != null || qt(o) && o.body !== null) && (l === "GET" || l === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body");
|
|
3266
|
+
const p = a.body ? a.body : qt(o) && o.body !== null ? In(o) : null;
|
|
3267
|
+
super(p, { size: a.size || o.size || 0 });
|
|
3268
|
+
const h = new ye(a.headers || o.headers || {});
|
|
3271
3269
|
if (p !== null && !h.has("Content-Type")) {
|
|
3272
3270
|
const w = Ri(p, this);
|
|
3273
3271
|
w && h.set("Content-Type", w);
|
|
3274
3272
|
}
|
|
3275
|
-
let S = qt(o
|
|
3273
|
+
let S = qt(o) ? o.signal : null;
|
|
3276
3274
|
if ("signal" in a && (S = a.signal), S != null && !Ks(S)) throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");
|
|
3277
|
-
let v = a.referrer == null ? o
|
|
3275
|
+
let v = a.referrer == null ? o.referrer : a.referrer;
|
|
3278
3276
|
if (v === "") v = "no-referrer";
|
|
3279
3277
|
else if (v) {
|
|
3280
3278
|
const w = new URL(v);
|
|
@@ -3282,12 +3280,12 @@ const $ = Symbol("Request internals"), qt = n((i) => typeof i == "object" && typ
|
|
|
3282
3280
|
} else v = void 0;
|
|
3283
3281
|
this[$] = {
|
|
3284
3282
|
method: l,
|
|
3285
|
-
redirect: a.redirect || o
|
|
3283
|
+
redirect: a.redirect || o.redirect || "follow",
|
|
3286
3284
|
headers: h,
|
|
3287
|
-
parsedURL: f
|
|
3285
|
+
parsedURL: f,
|
|
3288
3286
|
signal: S,
|
|
3289
3287
|
referrer: v
|
|
3290
|
-
}, this.follow = a.follow === void 0 ? o
|
|
3288
|
+
}, this.follow = a.follow === void 0 ? o.follow === void 0 ? 20 : o.follow : a.follow, this.compress = a.compress === void 0 ? o.compress === void 0 ? !0 : o.compress : a.compress, this.counter = a.counter || o.counter || 0, this.agent = a.agent || o.agent, this.highWaterMark = a.highWaterMark || o.highWaterMark || 16384, this.insecureHTTPParser = a.insecureHTTPParser || o.insecureHTTPParser || !1, this.referrerPolicy = a.referrerPolicy || o.referrerPolicy || "";
|
|
3291
3289
|
}
|
|
3292
3290
|
get method() {
|
|
3293
3291
|
return this[$].method;
|
|
@@ -3312,11 +3310,11 @@ const $ = Symbol("Request internals"), qt = n((i) => typeof i == "object" && typ
|
|
|
3312
3310
|
get referrerPolicy() {
|
|
3313
3311
|
return this[$].referrerPolicy;
|
|
3314
3312
|
}
|
|
3315
|
-
set referrerPolicy(o
|
|
3316
|
-
this[$].referrerPolicy = ll(o
|
|
3313
|
+
set referrerPolicy(o) {
|
|
3314
|
+
this[$].referrerPolicy = ll(o);
|
|
3317
3315
|
}
|
|
3318
3316
|
clone() {
|
|
3319
|
-
return new vr
|
|
3317
|
+
return new vr(this);
|
|
3320
3318
|
}
|
|
3321
3319
|
get [Symbol.toStringTag]() {
|
|
3322
3320
|
return "Request";
|
|
@@ -3335,30 +3333,30 @@ Object.defineProperties(dt.prototype, {
|
|
|
3335
3333
|
referrerPolicy: { enumerable: !0 }
|
|
3336
3334
|
});
|
|
3337
3335
|
const hl = n((i) => {
|
|
3338
|
-
const { parsedURL: o
|
|
3336
|
+
const { parsedURL: o } = i[$], a = new ye(i[$].headers);
|
|
3339
3337
|
a.has("Accept") || a.set("Accept", "*/*");
|
|
3340
|
-
let f
|
|
3341
|
-
if (i.body === null && /^(post|put)$/i.test(i.method) && (f
|
|
3338
|
+
let f = null;
|
|
3339
|
+
if (i.body === null && /^(post|put)$/i.test(i.method) && (f = "0"), i.body !== null) {
|
|
3342
3340
|
const S = rl(i);
|
|
3343
|
-
typeof S == "number" && !Number.isNaN(S) && (f
|
|
3341
|
+
typeof S == "number" && !Number.isNaN(S) && (f = String(S));
|
|
3344
3342
|
}
|
|
3345
|
-
f
|
|
3343
|
+
f && a.set("Content-Length", f), i.referrerPolicy === "" && (i.referrerPolicy = sl), i.referrer && i.referrer !== "no-referrer" ? i[$].referrer = fl(i) : i[$].referrer = "no-referrer", i[$].referrer instanceof URL && a.set("Referer", i.referrer), a.has("User-Agent") || a.set("User-Agent", "node-fetch"), i.compress && !a.has("Accept-Encoding") && a.set("Accept-Encoding", "gzip, deflate, br");
|
|
3346
3344
|
let { agent: l } = i;
|
|
3347
|
-
typeof l == "function" && (l = l(o
|
|
3348
|
-
const p = al(o
|
|
3345
|
+
typeof l == "function" && (l = l(o));
|
|
3346
|
+
const p = al(o);
|
|
3349
3347
|
return {
|
|
3350
|
-
parsedURL: o
|
|
3348
|
+
parsedURL: o,
|
|
3351
3349
|
options: {
|
|
3352
|
-
path: o
|
|
3350
|
+
path: o.pathname + p,
|
|
3353
3351
|
method: i.method,
|
|
3354
3352
|
headers: a[Symbol.for("nodejs.util.inspect.custom")](),
|
|
3355
3353
|
insecureHTTPParser: i.insecureHTTPParser,
|
|
3356
3354
|
agent: l
|
|
3357
3355
|
}
|
|
3358
3356
|
};
|
|
3359
|
-
}, "getNodeRequestOptions"), Hn = class Hn
|
|
3360
|
-
constructor(o
|
|
3361
|
-
super(o
|
|
3357
|
+
}, "getNodeRequestOptions"), Hn = class Hn extends ft {
|
|
3358
|
+
constructor(o, a = "aborted") {
|
|
3359
|
+
super(o, a);
|
|
3362
3360
|
}
|
|
3363
3361
|
};
|
|
3364
3362
|
n(Hn, "AbortError");
|
|
@@ -3367,44 +3365,49 @@ let _r = Hn;
|
|
|
3367
3365
|
function pl() {
|
|
3368
3366
|
if (Pi) return Ln;
|
|
3369
3367
|
if (Pi = 1, !globalThis.DOMException) try {
|
|
3370
|
-
const { MessageChannel: i } = require("worker_threads"), o
|
|
3371
|
-
o
|
|
3368
|
+
const { MessageChannel: i } = require("worker_threads"), o = new i().port1, a = /* @__PURE__ */ new ArrayBuffer();
|
|
3369
|
+
o.postMessage(a, [a, a]);
|
|
3372
3370
|
} catch (i) {
|
|
3373
3371
|
i.constructor.name === "DOMException" && (globalThis.DOMException = i.constructor);
|
|
3374
3372
|
}
|
|
3375
3373
|
return Ln = globalThis.DOMException, Ln;
|
|
3376
3374
|
}
|
|
3377
3375
|
n(pl, "requireNodeDomexception");
|
|
3378
|
-
const ml = f(pl()), { stat: $n } = node_fs.promises
|
|
3379
|
-
|
|
3376
|
+
const ml = f(pl()), { stat: $n } = node_fs.promises;
|
|
3377
|
+
n((i, o) => vi((0, node_fs.statSync)(i), i, o), "blobFromSync");
|
|
3378
|
+
n((i, o) => $n(i).then((a) => vi(a, i, o)), "blobFrom");
|
|
3379
|
+
n((i, o) => $n(i).then((a) => Ei(a, i, o)), "fileFrom");
|
|
3380
|
+
n((i, o) => Ei((0, node_fs.statSync)(i), i, o), "fileFromSync");
|
|
3381
|
+
const vi = n((i, o, a = "") => new ut([new Sr({
|
|
3382
|
+
path: o,
|
|
3380
3383
|
size: i.size,
|
|
3381
3384
|
lastModified: i.mtimeMs,
|
|
3382
3385
|
start: 0
|
|
3383
|
-
})], { type: a }), "fromBlob"), Ei = n((i, o
|
|
3384
|
-
path: o
|
|
3386
|
+
})], { type: a }), "fromBlob"), Ei = n((i, o, a = "") => new qn([new Sr({
|
|
3387
|
+
path: o,
|
|
3385
3388
|
size: i.size,
|
|
3386
3389
|
lastModified: i.mtimeMs,
|
|
3387
3390
|
start: 0
|
|
3388
|
-
})], (0, node_path.basename)(o
|
|
3391
|
+
})], (0, node_path.basename)(o), {
|
|
3389
3392
|
type: a,
|
|
3390
3393
|
lastModified: i.mtimeMs
|
|
3391
|
-
}), "fromFile"), Er = class Er
|
|
3392
|
-
constructor(o
|
|
3394
|
+
}), "fromFile"), Er = class Er {
|
|
3395
|
+
constructor(o) {
|
|
3393
3396
|
be(this, He);
|
|
3394
3397
|
be(this, Ve);
|
|
3395
|
-
X(this, He, o
|
|
3398
|
+
X(this, He, o.path), X(this, Ve, o.start), this.size = o.size, this.lastModified = o.lastModified;
|
|
3396
3399
|
}
|
|
3397
|
-
slice(o
|
|
3398
|
-
return new Er
|
|
3400
|
+
slice(o, a) {
|
|
3401
|
+
return new Er({
|
|
3399
3402
|
path: O(this, He),
|
|
3400
3403
|
lastModified: this.lastModified,
|
|
3401
|
-
size: a - o
|
|
3402
|
-
start: O(this, Ve) + o
|
|
3404
|
+
size: a - o,
|
|
3405
|
+
start: O(this, Ve) + o
|
|
3403
3406
|
});
|
|
3404
3407
|
}
|
|
3405
3408
|
async *stream() {
|
|
3406
|
-
const { mtimeMs: o
|
|
3407
|
-
if (o
|
|
3409
|
+
const { mtimeMs: o } = await $n(O(this, He));
|
|
3410
|
+
if (o > this.lastModified) throw new ml("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.", "NotReadableError");
|
|
3408
3411
|
yield* (0, node_fs.createReadStream)(O(this, He), {
|
|
3409
3412
|
start: O(this, Ve),
|
|
3410
3413
|
end: O(this, Ve) + this.size - 1
|
|
@@ -3421,9 +3424,9 @@ const wl = new Set([
|
|
|
3421
3424
|
"http:",
|
|
3422
3425
|
"https:"
|
|
3423
3426
|
]);
|
|
3424
|
-
async function Ai(i, o
|
|
3425
|
-
return new Promise((a, f
|
|
3426
|
-
const l = new dt(i, o
|
|
3427
|
+
async function Ai(i, o) {
|
|
3428
|
+
return new Promise((a, f) => {
|
|
3429
|
+
const l = new dt(i, o), { parsedURL: p, options: h } = hl(l);
|
|
3427
3430
|
if (!wl.has(p.protocol)) throw new TypeError(`node-fetch cannot load ${i}. URL scheme "${p.protocol.replace(/:$/, "")}" is not supported.`);
|
|
3428
3431
|
if (p.protocol === "data:") {
|
|
3429
3432
|
const g = Us(l.url);
|
|
@@ -3434,7 +3437,7 @@ async function Ai(i, o$1) {
|
|
|
3434
3437
|
let w = null;
|
|
3435
3438
|
const A = n(() => {
|
|
3436
3439
|
const g = new _r("The operation was aborted.");
|
|
3437
|
-
f
|
|
3440
|
+
f(g), l.body && l.body instanceof node_stream.default.Readable && l.body.destroy(g), !(!w || !w.body) && w.body.emit("error", g);
|
|
3438
3441
|
}, "abort");
|
|
3439
3442
|
if (v && v.aborted) {
|
|
3440
3443
|
A();
|
|
@@ -3448,7 +3451,7 @@ async function Ai(i, o$1) {
|
|
|
3448
3451
|
b.abort(), v && v.removeEventListener("abort", T);
|
|
3449
3452
|
}, "finalize");
|
|
3450
3453
|
b.on("error", (g) => {
|
|
3451
|
-
f
|
|
3454
|
+
f(new G(`request to ${l.url} failed, reason: ${g.message}`, "system", g)), q();
|
|
3452
3455
|
}), Rl(b, (g) => {
|
|
3453
3456
|
w && w.body && w.body.destroy(g);
|
|
3454
3457
|
}), process.version < "v14" && b.on("socket", (g) => {
|
|
@@ -3471,19 +3474,19 @@ async function Ai(i, o$1) {
|
|
|
3471
3474
|
j = z === null ? null : new URL(z, l.url);
|
|
3472
3475
|
} catch {
|
|
3473
3476
|
if (l.redirect !== "manual") {
|
|
3474
|
-
f
|
|
3477
|
+
f(new G(`uri requested responds with an invalid redirect URL: ${z}`, "invalid-redirect")), q();
|
|
3475
3478
|
return;
|
|
3476
3479
|
}
|
|
3477
3480
|
}
|
|
3478
3481
|
switch (l.redirect) {
|
|
3479
3482
|
case "error":
|
|
3480
|
-
f
|
|
3483
|
+
f(new G(`uri requested responds with a redirect, redirect mode is set to error: ${l.url}`, "no-redirect")), q();
|
|
3481
3484
|
return;
|
|
3482
3485
|
case "manual": break;
|
|
3483
3486
|
case "follow": {
|
|
3484
3487
|
if (j === null) break;
|
|
3485
3488
|
if (l.counter >= l.follow) {
|
|
3486
|
-
f
|
|
3489
|
+
f(new G(`maximum redirect reached at: ${l.url}`, "max-redirect")), q();
|
|
3487
3490
|
return;
|
|
3488
3491
|
}
|
|
3489
3492
|
const U = {
|
|
@@ -3505,8 +3508,8 @@ async function Ai(i, o$1) {
|
|
|
3505
3508
|
"cookie",
|
|
3506
3509
|
"cookie2"
|
|
3507
3510
|
]) U.headers.delete(jt);
|
|
3508
|
-
if (g.statusCode !== 303 && l.body && o
|
|
3509
|
-
f
|
|
3511
|
+
if (g.statusCode !== 303 && l.body && o.body instanceof node_stream.default.Readable) {
|
|
3512
|
+
f(new G("Cannot follow redirect with body being a readable stream", "unsupported-redirect")), q();
|
|
3510
3513
|
return;
|
|
3511
3514
|
}
|
|
3512
3515
|
(g.statusCode === 303 || (g.statusCode === 301 || g.statusCode === 302) && l.method === "POST") && (U.method = "GET", U.body = void 0, U.headers.delete("content-length"));
|
|
@@ -3514,14 +3517,14 @@ async function Ai(i, o$1) {
|
|
|
3514
3517
|
D && (U.referrerPolicy = D), a(Ai(new dt(j, U))), q();
|
|
3515
3518
|
return;
|
|
3516
3519
|
}
|
|
3517
|
-
default: return f
|
|
3520
|
+
default: return f(/* @__PURE__ */ new TypeError(`Redirect option '${l.redirect}' is not a valid value of RequestRedirect`));
|
|
3518
3521
|
}
|
|
3519
3522
|
}
|
|
3520
3523
|
v && g.once("end", () => {
|
|
3521
3524
|
v.removeEventListener("abort", T);
|
|
3522
3525
|
});
|
|
3523
3526
|
let I = (0, node_stream.pipeline)(g, new node_stream.PassThrough(), (z) => {
|
|
3524
|
-
z && f
|
|
3527
|
+
z && f(z);
|
|
3525
3528
|
});
|
|
3526
3529
|
process.version < "v12.10" && g.on("aborted", T);
|
|
3527
3530
|
const F = {
|
|
@@ -3543,19 +3546,19 @@ async function Ai(i, o$1) {
|
|
|
3543
3546
|
};
|
|
3544
3547
|
if (Q === "gzip" || Q === "x-gzip") {
|
|
3545
3548
|
I = (0, node_stream.pipeline)(I, node_zlib.default.createGunzip(ge), (z) => {
|
|
3546
|
-
z && f
|
|
3549
|
+
z && f(z);
|
|
3547
3550
|
}), w = new le(I, F), a(w);
|
|
3548
3551
|
return;
|
|
3549
3552
|
}
|
|
3550
3553
|
if (Q === "deflate" || Q === "x-deflate") {
|
|
3551
3554
|
const z = (0, node_stream.pipeline)(g, new node_stream.PassThrough(), (j) => {
|
|
3552
|
-
j && f
|
|
3555
|
+
j && f(j);
|
|
3553
3556
|
});
|
|
3554
3557
|
z.once("data", (j) => {
|
|
3555
3558
|
(j[0] & 15) === 8 ? I = (0, node_stream.pipeline)(I, node_zlib.default.createInflate(), (U) => {
|
|
3556
|
-
U && f
|
|
3559
|
+
U && f(U);
|
|
3557
3560
|
}) : I = (0, node_stream.pipeline)(I, node_zlib.default.createInflateRaw(), (U) => {
|
|
3558
|
-
U && f
|
|
3561
|
+
U && f(U);
|
|
3559
3562
|
}), w = new le(I, F), a(w);
|
|
3560
3563
|
}), z.once("end", () => {
|
|
3561
3564
|
w || (w = new le(I, F), a(w));
|
|
@@ -3564,28 +3567,28 @@ async function Ai(i, o$1) {
|
|
|
3564
3567
|
}
|
|
3565
3568
|
if (Q === "br") {
|
|
3566
3569
|
I = (0, node_stream.pipeline)(I, node_zlib.default.createBrotliDecompress(), (z) => {
|
|
3567
|
-
z && f
|
|
3570
|
+
z && f(z);
|
|
3568
3571
|
}), w = new le(I, F), a(w);
|
|
3569
3572
|
return;
|
|
3570
3573
|
}
|
|
3571
3574
|
w = new le(I, F), a(w);
|
|
3572
|
-
}), nl(b, l).catch(f
|
|
3575
|
+
}), nl(b, l).catch(f);
|
|
3573
3576
|
});
|
|
3574
3577
|
}
|
|
3575
3578
|
n(Ai, "fetch$1");
|
|
3576
|
-
function Rl(i, o
|
|
3579
|
+
function Rl(i, o) {
|
|
3577
3580
|
const a = node_buffer.Buffer.from(`0\r
|
|
3578
3581
|
\r
|
|
3579
3582
|
`);
|
|
3580
|
-
let f
|
|
3583
|
+
let f = !1, l = !1, p;
|
|
3581
3584
|
i.on("response", (h) => {
|
|
3582
3585
|
const { headers: S } = h;
|
|
3583
|
-
f
|
|
3586
|
+
f = S["transfer-encoding"] === "chunked" && !S["content-length"];
|
|
3584
3587
|
}), i.on("socket", (h) => {
|
|
3585
3588
|
const S = n(() => {
|
|
3586
|
-
if (f
|
|
3589
|
+
if (f && !l) {
|
|
3587
3590
|
const w = /* @__PURE__ */ new Error("Premature close");
|
|
3588
|
-
w.code = "ERR_STREAM_PREMATURE_CLOSE", o
|
|
3591
|
+
w.code = "ERR_STREAM_PREMATURE_CLOSE", o(w);
|
|
3589
3592
|
}
|
|
3590
3593
|
}, "onSocketClose"), v = n((w) => {
|
|
3591
3594
|
l = node_buffer.Buffer.compare(w.slice(-5), a) === 0, !l && p && (l = node_buffer.Buffer.compare(p.slice(-3), a.slice(0, 3)) === 0 && node_buffer.Buffer.compare(w.slice(-2), a.slice(3)) === 0), p = w;
|
|
@@ -3598,8 +3601,8 @@ function Rl(i, o$1) {
|
|
|
3598
3601
|
n(Rl, "fixResponseChunkedTransferBadEnding");
|
|
3599
3602
|
const Bi = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap();
|
|
3600
3603
|
function W(i) {
|
|
3601
|
-
const o
|
|
3602
|
-
return console.assert(o
|
|
3604
|
+
const o = Bi.get(i);
|
|
3605
|
+
return console.assert(o != null, "'this' is expected an Event object, but got", i), o;
|
|
3603
3606
|
}
|
|
3604
3607
|
n(W, "pd");
|
|
3605
3608
|
function ki(i) {
|
|
@@ -3610,24 +3613,24 @@ function ki(i) {
|
|
|
3610
3613
|
i.event.cancelable && (i.canceled = !0, typeof i.event.preventDefault == "function" && i.event.preventDefault());
|
|
3611
3614
|
}
|
|
3612
3615
|
n(ki, "setCancelFlag");
|
|
3613
|
-
function ht(i, o
|
|
3616
|
+
function ht(i, o) {
|
|
3614
3617
|
Bi.set(this, {
|
|
3615
3618
|
eventTarget: i,
|
|
3616
|
-
event: o
|
|
3619
|
+
event: o,
|
|
3617
3620
|
eventPhase: 2,
|
|
3618
3621
|
currentTarget: i,
|
|
3619
3622
|
canceled: !1,
|
|
3620
3623
|
stopped: !1,
|
|
3621
3624
|
immediateStopped: !1,
|
|
3622
3625
|
passiveListener: null,
|
|
3623
|
-
timeStamp: o
|
|
3626
|
+
timeStamp: o.timeStamp || Date.now()
|
|
3624
3627
|
}), Object.defineProperty(this, "isTrusted", {
|
|
3625
3628
|
value: !1,
|
|
3626
3629
|
enumerable: !0
|
|
3627
3630
|
});
|
|
3628
|
-
const a = Object.keys(o
|
|
3629
|
-
for (let f
|
|
3630
|
-
const l = a[f
|
|
3631
|
+
const a = Object.keys(o);
|
|
3632
|
+
for (let f = 0; f < a.length; ++f) {
|
|
3633
|
+
const l = a[f];
|
|
3631
3634
|
l in this || Object.defineProperty(this, l, Wi(l));
|
|
3632
3635
|
}
|
|
3633
3636
|
}
|
|
@@ -3694,8 +3697,8 @@ n(ht, "Event"), ht.prototype = {
|
|
|
3694
3697
|
},
|
|
3695
3698
|
set cancelBubble(i) {
|
|
3696
3699
|
if (!i) return;
|
|
3697
|
-
const o
|
|
3698
|
-
o
|
|
3700
|
+
const o = W(this);
|
|
3701
|
+
o.stopped = !0, typeof o.event.cancelBubble == "boolean" && (o.event.cancelBubble = !0);
|
|
3699
3702
|
},
|
|
3700
3703
|
get returnValue() {
|
|
3701
3704
|
return !W(this).canceled;
|
|
@@ -3714,8 +3717,8 @@ function Wi(i) {
|
|
|
3714
3717
|
get() {
|
|
3715
3718
|
return W(this).event[i];
|
|
3716
3719
|
},
|
|
3717
|
-
set(o
|
|
3718
|
-
W(this).event[i] = o
|
|
3720
|
+
set(o) {
|
|
3721
|
+
W(this).event[i] = o;
|
|
3719
3722
|
},
|
|
3720
3723
|
configurable: !0,
|
|
3721
3724
|
enumerable: !0
|
|
@@ -3725,59 +3728,59 @@ n(Wi, "defineRedirectDescriptor");
|
|
|
3725
3728
|
function Tl(i) {
|
|
3726
3729
|
return {
|
|
3727
3730
|
value() {
|
|
3728
|
-
const o
|
|
3729
|
-
return o
|
|
3731
|
+
const o = W(this).event;
|
|
3732
|
+
return o[i].apply(o, arguments);
|
|
3730
3733
|
},
|
|
3731
3734
|
configurable: !0,
|
|
3732
3735
|
enumerable: !0
|
|
3733
3736
|
};
|
|
3734
3737
|
}
|
|
3735
3738
|
n(Tl, "defineCallDescriptor");
|
|
3736
|
-
function Cl(i, o
|
|
3737
|
-
const a = Object.keys(o
|
|
3739
|
+
function Cl(i, o) {
|
|
3740
|
+
const a = Object.keys(o);
|
|
3738
3741
|
if (a.length === 0) return i;
|
|
3739
|
-
function f
|
|
3742
|
+
function f(l, p) {
|
|
3740
3743
|
i.call(this, l, p);
|
|
3741
3744
|
}
|
|
3742
|
-
n(f
|
|
3743
|
-
value: f
|
|
3745
|
+
n(f, "CustomEvent"), f.prototype = Object.create(i.prototype, { constructor: {
|
|
3746
|
+
value: f,
|
|
3744
3747
|
configurable: !0,
|
|
3745
3748
|
writable: !0
|
|
3746
3749
|
} });
|
|
3747
3750
|
for (let l = 0; l < a.length; ++l) {
|
|
3748
3751
|
const p = a[l];
|
|
3749
3752
|
if (!(p in i.prototype)) {
|
|
3750
|
-
const S = typeof Object.getOwnPropertyDescriptor(o
|
|
3751
|
-
Object.defineProperty(f
|
|
3753
|
+
const S = typeof Object.getOwnPropertyDescriptor(o, p).value == "function";
|
|
3754
|
+
Object.defineProperty(f.prototype, p, S ? Tl(p) : Wi(p));
|
|
3752
3755
|
}
|
|
3753
3756
|
}
|
|
3754
|
-
return f
|
|
3757
|
+
return f;
|
|
3755
3758
|
}
|
|
3756
3759
|
n(Cl, "defineWrapper");
|
|
3757
3760
|
function qi(i) {
|
|
3758
3761
|
if (i == null || i === Object.prototype) return ht;
|
|
3759
|
-
let o
|
|
3760
|
-
return o
|
|
3762
|
+
let o = Dn.get(i);
|
|
3763
|
+
return o ?? (o = Cl(qi(Object.getPrototypeOf(i)), i), Dn.set(i, o)), o;
|
|
3761
3764
|
}
|
|
3762
3765
|
n(qi, "getWrapper");
|
|
3763
|
-
function Pl(i, o
|
|
3764
|
-
return new (qi(Object.getPrototypeOf(o
|
|
3766
|
+
function Pl(i, o) {
|
|
3767
|
+
return new (qi(Object.getPrototypeOf(o)))(i, o);
|
|
3765
3768
|
}
|
|
3766
3769
|
n(Pl, "wrapEvent");
|
|
3767
3770
|
function vl(i) {
|
|
3768
3771
|
return W(i).immediateStopped;
|
|
3769
3772
|
}
|
|
3770
3773
|
n(vl, "isStopped");
|
|
3771
|
-
function El(i, o
|
|
3772
|
-
W(i).eventPhase = o
|
|
3774
|
+
function El(i, o) {
|
|
3775
|
+
W(i).eventPhase = o;
|
|
3773
3776
|
}
|
|
3774
3777
|
n(El, "setEventPhase");
|
|
3775
|
-
function Al(i, o
|
|
3776
|
-
W(i).currentTarget = o
|
|
3778
|
+
function Al(i, o) {
|
|
3779
|
+
W(i).currentTarget = o;
|
|
3777
3780
|
}
|
|
3778
3781
|
n(Al, "setCurrentTarget");
|
|
3779
|
-
function Oi(i, o
|
|
3780
|
-
W(i).passiveListener = o
|
|
3782
|
+
function Oi(i, o) {
|
|
3783
|
+
W(i).passiveListener = o;
|
|
3781
3784
|
}
|
|
3782
3785
|
n(Oi, "setPassiveListener");
|
|
3783
3786
|
const zi = /* @__PURE__ */ new WeakMap(), Ii = 1, Fi = 2, wr = 3;
|
|
@@ -3786,9 +3789,9 @@ function Rr(i) {
|
|
|
3786
3789
|
}
|
|
3787
3790
|
n(Rr, "isObject");
|
|
3788
3791
|
function Ot(i) {
|
|
3789
|
-
const o
|
|
3790
|
-
if (o
|
|
3791
|
-
return o
|
|
3792
|
+
const o = zi.get(i);
|
|
3793
|
+
if (o == null) throw new TypeError("'this' is expected an EventTarget object, but got another value.");
|
|
3794
|
+
return o;
|
|
3792
3795
|
}
|
|
3793
3796
|
n(Ot, "getListeners");
|
|
3794
3797
|
function Bl(i) {
|
|
@@ -3801,20 +3804,20 @@ function Bl(i) {
|
|
|
3801
3804
|
}
|
|
3802
3805
|
return null;
|
|
3803
3806
|
},
|
|
3804
|
-
set(o
|
|
3805
|
-
typeof o
|
|
3807
|
+
set(o) {
|
|
3808
|
+
typeof o != "function" && !Rr(o) && (o = null);
|
|
3806
3809
|
const a = Ot(this);
|
|
3807
|
-
let f
|
|
3808
|
-
for (; l != null;) l.listenerType === wr ? f
|
|
3809
|
-
if (o
|
|
3810
|
+
let f = null, l = a.get(i);
|
|
3811
|
+
for (; l != null;) l.listenerType === wr ? f !== null ? f.next = l.next : l.next !== null ? a.set(i, l.next) : a.delete(i) : f = l, l = l.next;
|
|
3812
|
+
if (o !== null) {
|
|
3810
3813
|
const p = {
|
|
3811
|
-
listener: o
|
|
3814
|
+
listener: o,
|
|
3812
3815
|
listenerType: wr,
|
|
3813
3816
|
passive: !1,
|
|
3814
3817
|
once: !1,
|
|
3815
3818
|
next: null
|
|
3816
3819
|
};
|
|
3817
|
-
f
|
|
3820
|
+
f === null ? a.set(i, p) : f.next = p;
|
|
3818
3821
|
}
|
|
3819
3822
|
},
|
|
3820
3823
|
configurable: !0,
|
|
@@ -3822,21 +3825,21 @@ function Bl(i) {
|
|
|
3822
3825
|
};
|
|
3823
3826
|
}
|
|
3824
3827
|
n(Bl, "defineEventAttributeDescriptor");
|
|
3825
|
-
function ji(i, o
|
|
3826
|
-
Object.defineProperty(i, `on${o
|
|
3828
|
+
function ji(i, o) {
|
|
3829
|
+
Object.defineProperty(i, `on${o}`, Bl(o));
|
|
3827
3830
|
}
|
|
3828
3831
|
n(ji, "defineEventAttribute");
|
|
3829
3832
|
function Li(i) {
|
|
3830
|
-
function o
|
|
3833
|
+
function o() {
|
|
3831
3834
|
Pe.call(this);
|
|
3832
3835
|
}
|
|
3833
|
-
n(o
|
|
3834
|
-
value: o
|
|
3836
|
+
n(o, "CustomEventTarget"), o.prototype = Object.create(Pe.prototype, { constructor: {
|
|
3837
|
+
value: o,
|
|
3835
3838
|
configurable: !0,
|
|
3836
3839
|
writable: !0
|
|
3837
3840
|
} });
|
|
3838
|
-
for (let a = 0; a < i.length; ++a) ji(o
|
|
3839
|
-
return o
|
|
3841
|
+
for (let a = 0; a < i.length; ++a) ji(o.prototype, i[a]);
|
|
3842
|
+
return o;
|
|
3840
3843
|
}
|
|
3841
3844
|
n(Li, "defineCustomEventTarget");
|
|
3842
3845
|
function Pe() {
|
|
@@ -3847,41 +3850,41 @@ function Pe() {
|
|
|
3847
3850
|
if (arguments.length === 1 && Array.isArray(arguments[0])) return Li(arguments[0]);
|
|
3848
3851
|
if (arguments.length > 0) {
|
|
3849
3852
|
const i = new Array(arguments.length);
|
|
3850
|
-
for (let o
|
|
3853
|
+
for (let o = 0; o < arguments.length; ++o) i[o] = arguments[o];
|
|
3851
3854
|
return Li(i);
|
|
3852
3855
|
}
|
|
3853
3856
|
throw new TypeError("Cannot call a class as a function");
|
|
3854
3857
|
}
|
|
3855
3858
|
n(Pe, "EventTarget"), Pe.prototype = {
|
|
3856
|
-
addEventListener(i, o
|
|
3857
|
-
if (o
|
|
3858
|
-
if (typeof o
|
|
3859
|
-
const f
|
|
3860
|
-
listener: o
|
|
3859
|
+
addEventListener(i, o, a) {
|
|
3860
|
+
if (o == null) return;
|
|
3861
|
+
if (typeof o != "function" && !Rr(o)) throw new TypeError("'listener' should be a function or an object.");
|
|
3862
|
+
const f = Ot(this), l = Rr(a), h = (l ? !!a.capture : !!a) ? Ii : Fi, S = {
|
|
3863
|
+
listener: o,
|
|
3861
3864
|
listenerType: h,
|
|
3862
3865
|
passive: l && !!a.passive,
|
|
3863
3866
|
once: l && !!a.once,
|
|
3864
3867
|
next: null
|
|
3865
3868
|
};
|
|
3866
|
-
let v = f
|
|
3869
|
+
let v = f.get(i);
|
|
3867
3870
|
if (v === void 0) {
|
|
3868
|
-
f
|
|
3871
|
+
f.set(i, S);
|
|
3869
3872
|
return;
|
|
3870
3873
|
}
|
|
3871
3874
|
let w = null;
|
|
3872
3875
|
for (; v != null;) {
|
|
3873
|
-
if (v.listener === o
|
|
3876
|
+
if (v.listener === o && v.listenerType === h) return;
|
|
3874
3877
|
w = v, v = v.next;
|
|
3875
3878
|
}
|
|
3876
3879
|
w.next = S;
|
|
3877
3880
|
},
|
|
3878
|
-
removeEventListener(i, o
|
|
3879
|
-
if (o
|
|
3880
|
-
const f
|
|
3881
|
-
let h = null, S = f
|
|
3881
|
+
removeEventListener(i, o, a) {
|
|
3882
|
+
if (o == null) return;
|
|
3883
|
+
const f = Ot(this), p = (Rr(a) ? !!a.capture : !!a) ? Ii : Fi;
|
|
3884
|
+
let h = null, S = f.get(i);
|
|
3882
3885
|
for (; S != null;) {
|
|
3883
|
-
if (S.listener === o
|
|
3884
|
-
h !== null ? h.next = S.next : S.next !== null ? f
|
|
3886
|
+
if (S.listener === o && S.listenerType === p) {
|
|
3887
|
+
h !== null ? h.next = S.next : S.next !== null ? f.set(i, S.next) : f.delete(i);
|
|
3885
3888
|
return;
|
|
3886
3889
|
}
|
|
3887
3890
|
h = S, S = S.next;
|
|
@@ -3889,20 +3892,20 @@ n(Pe, "EventTarget"), Pe.prototype = {
|
|
|
3889
3892
|
},
|
|
3890
3893
|
dispatchEvent(i) {
|
|
3891
3894
|
if (i == null || typeof i.type != "string") throw new TypeError("\"event.type\" should be a string.");
|
|
3892
|
-
const o
|
|
3893
|
-
let f
|
|
3894
|
-
if (f
|
|
3895
|
+
const o = Ot(this), a = i.type;
|
|
3896
|
+
let f = o.get(a);
|
|
3897
|
+
if (f == null) return !0;
|
|
3895
3898
|
const l = Pl(this, i);
|
|
3896
3899
|
let p = null;
|
|
3897
|
-
for (; f
|
|
3898
|
-
if (f
|
|
3899
|
-
f
|
|
3900
|
+
for (; f != null;) {
|
|
3901
|
+
if (f.once ? p !== null ? p.next = f.next : f.next !== null ? o.set(a, f.next) : o.delete(a) : p = f, Oi(l, f.passive ? f.listener : null), typeof f.listener == "function") try {
|
|
3902
|
+
f.listener.call(this, l);
|
|
3900
3903
|
} catch (h) {
|
|
3901
3904
|
typeof console < "u" && typeof console.error == "function" && console.error(h);
|
|
3902
3905
|
}
|
|
3903
|
-
else f
|
|
3906
|
+
else f.listenerType !== wr && typeof f.listener.handleEvent == "function" && f.listener.handleEvent(l);
|
|
3904
3907
|
if (vl(l)) break;
|
|
3905
|
-
f
|
|
3908
|
+
f = f.next;
|
|
3906
3909
|
}
|
|
3907
3910
|
return Oi(l, null), El(l, 0), Al(l, null), !l.defaultPrevented;
|
|
3908
3911
|
}
|
|
@@ -3911,14 +3914,14 @@ n(Pe, "EventTarget"), Pe.prototype = {
|
|
|
3911
3914
|
configurable: !0,
|
|
3912
3915
|
writable: !0
|
|
3913
3916
|
}), typeof window < "u" && typeof window.EventTarget < "u" && Object.setPrototypeOf(Pe.prototype, window.EventTarget.prototype);
|
|
3914
|
-
const Vn = class Vn
|
|
3917
|
+
const Vn = class Vn extends Pe {
|
|
3915
3918
|
constructor() {
|
|
3916
3919
|
throw super(), /* @__PURE__ */ new TypeError("AbortSignal cannot be constructed directly");
|
|
3917
3920
|
}
|
|
3918
3921
|
get aborted() {
|
|
3919
|
-
const o
|
|
3920
|
-
if (typeof o
|
|
3921
|
-
return o
|
|
3922
|
+
const o = Tr.get(this);
|
|
3923
|
+
if (typeof o != "boolean") throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`);
|
|
3924
|
+
return o;
|
|
3922
3925
|
}
|
|
3923
3926
|
};
|
|
3924
3927
|
n(Vn, "AbortSignal");
|
|
@@ -3951,9 +3954,9 @@ let Mn = (gt = class {
|
|
|
3951
3954
|
}, n(gt, "AbortController"), gt);
|
|
3952
3955
|
const $i = /* @__PURE__ */ new WeakMap();
|
|
3953
3956
|
function Di(i) {
|
|
3954
|
-
const o
|
|
3955
|
-
if (o
|
|
3956
|
-
return o
|
|
3957
|
+
const o = $i.get(i);
|
|
3958
|
+
if (o == null) throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${i === null ? "null" : typeof i}`);
|
|
3959
|
+
return o;
|
|
3957
3960
|
}
|
|
3958
3961
|
n(Di, "getSignal"), Object.defineProperties(Mn.prototype, {
|
|
3959
3962
|
signal: { enumerable: !0 },
|
|
@@ -3962,8 +3965,8 @@ n(Di, "getSignal"), Object.defineProperties(Mn.prototype, {
|
|
|
3962
3965
|
configurable: !0,
|
|
3963
3966
|
value: "AbortController"
|
|
3964
3967
|
});
|
|
3965
|
-
var ql = Object.defineProperty, Ol = n((i, o
|
|
3966
|
-
value: o
|
|
3968
|
+
var ql = Object.defineProperty, Ol = n((i, o) => ql(i, "name", {
|
|
3969
|
+
value: o,
|
|
3967
3970
|
configurable: !0
|
|
3968
3971
|
}), "e");
|
|
3969
3972
|
const Mi = Ai;
|
|
@@ -3972,53 +3975,52 @@ function Ui() {
|
|
|
3972
3975
|
!globalThis.process?.versions?.node && !globalThis.process?.env?.DISABLE_NODE_FETCH_NATIVE_WARN && console.warn("[node-fetch-native] Node.js compatible build of `node-fetch-native` is being used in a non-Node.js environment. Please make sure you are using proper export conditions or report this issue to https://github.com/unjs/node-fetch-native. You can set `process.env.DISABLE_NODE_FETCH_NATIVE_WARN` to disable this warning.");
|
|
3973
3976
|
}
|
|
3974
3977
|
n(Ui, "s"), Ol(Ui, "checkNodeEnvironment");
|
|
3975
|
-
|
|
3976
3978
|
//#endregion
|
|
3977
|
-
Object.defineProperty(exports,
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3979
|
+
Object.defineProperty(exports, "Mi", {
|
|
3980
|
+
enumerable: true,
|
|
3981
|
+
get: function() {
|
|
3982
|
+
return Mi;
|
|
3983
|
+
}
|
|
3982
3984
|
});
|
|
3983
|
-
Object.defineProperty(exports,
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3985
|
+
Object.defineProperty(exports, "Mn", {
|
|
3986
|
+
enumerable: true,
|
|
3987
|
+
get: function() {
|
|
3988
|
+
return Mn;
|
|
3989
|
+
}
|
|
3988
3990
|
});
|
|
3989
|
-
Object.defineProperty(exports,
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3991
|
+
Object.defineProperty(exports, "br", {
|
|
3992
|
+
enumerable: true,
|
|
3993
|
+
get: function() {
|
|
3994
|
+
return br;
|
|
3995
|
+
}
|
|
3994
3996
|
});
|
|
3995
|
-
Object.defineProperty(exports,
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
3997
|
+
Object.defineProperty(exports, "dt", {
|
|
3998
|
+
enumerable: true,
|
|
3999
|
+
get: function() {
|
|
4000
|
+
return dt;
|
|
4001
|
+
}
|
|
4000
4002
|
});
|
|
4001
|
-
Object.defineProperty(exports,
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4003
|
+
Object.defineProperty(exports, "le", {
|
|
4004
|
+
enumerable: true,
|
|
4005
|
+
get: function() {
|
|
4006
|
+
return le;
|
|
4007
|
+
}
|
|
4006
4008
|
});
|
|
4007
|
-
Object.defineProperty(exports,
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4009
|
+
Object.defineProperty(exports, "qn", {
|
|
4010
|
+
enumerable: true,
|
|
4011
|
+
get: function() {
|
|
4012
|
+
return qn;
|
|
4013
|
+
}
|
|
4014
|
+
});
|
|
4015
|
+
Object.defineProperty(exports, "ut", {
|
|
4016
|
+
enumerable: true,
|
|
4017
|
+
get: function() {
|
|
4018
|
+
return ut;
|
|
4019
|
+
}
|
|
4012
4020
|
});
|
|
4013
|
-
Object.defineProperty(exports,
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4021
|
+
Object.defineProperty(exports, "ye", {
|
|
4022
|
+
enumerable: true,
|
|
4023
|
+
get: function() {
|
|
4024
|
+
return ye;
|
|
4025
|
+
}
|
|
4018
4026
|
});
|
|
4019
|
-
Object.defineProperty(exports, 'ye', {
|
|
4020
|
-
enumerable: true,
|
|
4021
|
-
get: function () {
|
|
4022
|
-
return ye;
|
|
4023
|
-
}
|
|
4024
|
-
});
|