| 8329 | }(this._associatedReadableByteStreamController, e3); |
| 8330 | } |
| 8331 | respondWithNewView(e3) { |
| 8332 | if (!fe(this)) throw Be("respondWithNewView"); |
| 8333 | if ($5(e3, 1, "respondWithNewView"), !ArrayBuffer.isView(e3)) throw new TypeError("You can only respond with array buffer views"); |
| 8334 | if (void 0 === this._associatedReadableByteStreamController) throw new TypeError("This BYOB request has been invalidated"); |
| 8335 | e3.buffer, function(e4, t2) { |
| 8336 | const r3 = e4._pendingPullIntos.peek(); |
| 8337 | if ("closed" === e4._controlledReadableByteStream._state) { |
| 8338 | if (0 !== t2.byteLength) throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream"); |
| 8339 | } else if (0 === t2.byteLength) throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream"); |
| 8340 | if (r3.byteOffset + r3.bytesFilled !== t2.byteOffset) throw new RangeError("The region specified by view does not match byobRequest"); |
| 8341 | if (r3.bufferByteLength !== t2.buffer.byteLength) throw new RangeError("The buffer of view has different capacity than byobRequest"); |
| 8342 | if (r3.bytesFilled + t2.byteLength > r3.byteLength) throw new RangeError("The region specified by view is larger than byobRequest"); |
| 8343 | const o3 = t2.byteLength; |
| 8344 | r3.buffer = t2.buffer, qe(e4, o3); |
| 8345 | }(this._associatedReadableByteStreamController, e3); |
| 8346 | } |
| 8347 | }; |
| 8348 | Object.defineProperties(ReadableStreamBYOBRequest.prototype, { respond: { enumerable: true }, respondWithNewView: { enumerable: true }, view: { enumerable: true } }), n(ReadableStreamBYOBRequest.prototype.respond, "respond"), n(ReadableStreamBYOBRequest.prototype.respondWithNewView, "respondWithNewView"), "symbol" == typeof e2.toStringTag && Object.defineProperty(ReadableStreamBYOBRequest.prototype, e2.toStringTag, { value: "ReadableStreamBYOBRequest", configurable: true }); |
| 8349 | ReadableByteStreamController = class { |