You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
11 KiB
JavaScript
25 lines
11 KiB
JavaScript
|
9 months ago
|
"use strict";
|
||
|
|
/*
|
||
|
|
* ATTENTION: An "eval-source-map" devtool has been used.
|
||
|
|
* This devtool is neither made for production nor for readable output files.
|
||
|
|
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||
|
|
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||
|
|
* or disable the default devtool with "devtool: false".
|
||
|
|
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||
|
|
*/
|
||
|
|
exports.id = "vendor-chunks/delayed-stream";
|
||
|
|
exports.ids = ["vendor-chunks/delayed-stream"];
|
||
|
|
exports.modules = {
|
||
|
|
|
||
|
|
/***/ "(ssr)/./node_modules/delayed-stream/lib/delayed_stream.js":
|
||
|
|
/*!***********************************************************!*\
|
||
|
|
!*** ./node_modules/delayed-stream/lib/delayed_stream.js ***!
|
||
|
|
\***********************************************************/
|
||
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||
|
|
|
||
|
|
eval("\nvar Stream = (__webpack_require__(/*! stream */ \"stream\").Stream);\nvar util = __webpack_require__(/*! util */ \"util\");\nmodule.exports = DelayedStream;\nfunction DelayedStream() {\n this.source = null;\n this.dataSize = 0;\n this.maxDataSize = 1024 * 1024;\n this.pauseStream = true;\n this._maxDataSizeExceeded = false;\n this._released = false;\n this._bufferedEvents = [];\n}\nutil.inherits(DelayedStream, Stream);\nDelayedStream.create = function(source, options) {\n var delayedStream = new this();\n options = options || {};\n for(var option in options){\n delayedStream[option] = options[option];\n }\n delayedStream.source = source;\n var realEmit = source.emit;\n source.emit = function() {\n delayedStream._handleEmit(arguments);\n return realEmit.apply(source, arguments);\n };\n source.on(\"error\", function() {});\n if (delayedStream.pauseStream) {\n source.pause();\n }\n return delayedStream;\n};\nObject.defineProperty(DelayedStream.prototype, \"readable\", {\n configurable: true,\n enumerable: true,\n get: function() {\n return this.source.readable;\n }\n});\nDelayedStream.prototype.setEncoding = function() {\n return this.source.setEncoding.apply(this.source, arguments);\n};\nDelayedStream.prototype.resume = function() {\n if (!this._released) {\n this.release();\n }\n this.source.resume();\n};\nDelayedStream.prototype.pause = function() {\n this.source.pause();\n};\nDelayedStream.prototype.release = function() {\n this._released = true;\n this._bufferedEvents.forEach((function(args) {\n this.emit.apply(this, args);\n }).bind(this));\n this._bufferedEvents = [];\n};\nDelayedStream.prototype.pipe = function() {\n var r = Stream.prototype.pipe.apply(this, arguments);\n this.resume();\n return r;\n};\nDelayedStream.prototype._handleEmit = function(args) {\n if (this._released) {\n this.emit.apply(this, args);\n return;\n }\n if (args[0] === \"data\") {\n this.dataSize += args[1].length;\n this._checkIfMaxDataSizeExceeded();\n }\n this._bufferedEvents.push(args);\n};\nDelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {\n if (this._maxDataSizeExceeded) {\n return;\n }\n if (this.dataSize <= this.maxDataSize) {\n return;\n }\n this._maxDataSizeExceeded = true;\n var message = \"DelayedStream#maxDataSize of \" + this.maxDataSize + \" bytes exceeded.\";\n this.emit(\"error\", new Error(message));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHNzcikvLi9ub2RlX21vZHVsZXMvZGVsYXllZC1zdHJlYW0vbGliL2RlbGF5ZWRfc3RyZWFtLmpzIiwibWFwcGluZ3MiOiI7QUFBQSxJQUFJQSxTQUFTQyxvREFBd0I7QUFDckMsSUFBSUMsT0FBT0QsbUJBQU9BLENBQUM7QUFFbkJFLE9BQU9DLE9BQU8sR0FBR0M7QUFDakIsU0FBU0E7SUFDUCxJQUFJLENBQUNDLE1BQU0sR0FBRztJQUNkLElBQUksQ0FBQ0MsUUFBUSxHQUFHO0lBQ2hCLElBQUksQ0FBQ0MsV0FBVyxHQUFHLE9BQU87SUFD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