@tidbcloud/uikit 2.0.0-beta.103 → 2.0.0-beta.104
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/CHANGELOG.md +6 -0
- package/dist/_virtual/BufferList.cjs +4 -0
- package/dist/_virtual/BufferList.js +4 -0
- package/dist/_virtual/___vite-browser-external.cjs +6 -0
- package/dist/_virtual/___vite-browser-external.js +6 -0
- package/dist/_virtual/__vite-browser-external.cjs +4 -0
- package/dist/_virtual/__vite-browser-external.js +4 -0
- package/dist/_virtual/_commonjsHelpers.cjs +25 -0
- package/dist/_virtual/_commonjsHelpers.js +25 -0
- package/dist/_virtual/index.cjs +2 -2
- package/dist/_virtual/index.js +2 -2
- package/dist/_virtual/index2.cjs +2 -2
- package/dist/_virtual/index2.js +2 -2
- package/dist/_virtual/index3.cjs +4 -0
- package/dist/_virtual/index3.js +4 -0
- package/dist/_virtual/index4.cjs +4 -0
- package/dist/_virtual/index4.js +4 -0
- package/dist/_virtual/index5.cjs +4 -0
- package/dist/_virtual/index5.js +4 -0
- package/dist/_virtual/index6.cjs +4 -0
- package/dist/_virtual/index6.js +4 -0
- package/dist/_virtual/index7.cjs +4 -0
- package/dist/_virtual/index7.js +4 -0
- package/dist/_virtual/inherits_browser.cjs +4 -0
- package/dist/_virtual/inherits_browser.js +4 -0
- package/dist/_virtual/readable-browser.cjs +4 -0
- package/dist/_virtual/readable-browser.js +4 -0
- package/dist/_virtual/readable.cjs +4 -0
- package/dist/_virtual/readable.js +4 -0
- package/dist/_virtual/string_decoder.cjs +4 -0
- package/dist/_virtual/string_decoder.js +4 -0
- package/dist/_virtual/util.cjs +4 -0
- package/dist/_virtual/util.js +4 -0
- package/dist/node_modules/.pnpm/@emotion_server@11.11.0/node_modules/@emotion/server/create-instance/dist/emotion-server-create-instance.browser.esm.cjs +176 -0
- package/dist/node_modules/.pnpm/@emotion_server@11.11.0/node_modules/@emotion/server/create-instance/dist/emotion-server-create-instance.browser.esm.js +176 -0
- package/dist/node_modules/.pnpm/buffer-from@0.1.2/node_modules/buffer-from/index.cjs +46 -0
- package/dist/node_modules/.pnpm/buffer-from@0.1.2/node_modules/buffer-from/index.js +46 -0
- package/dist/node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.cjs +69 -0
- package/dist/node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js +69 -0
- package/dist/node_modules/.pnpm/duplexer2@0.1.4/node_modules/duplexer2/index.cjs +64 -0
- package/dist/node_modules/.pnpm/duplexer2@0.1.4/node_modules/duplexer2/index.js +64 -0
- package/dist/node_modules/.pnpm/html-tokenize@2.0.1/node_modules/html-tokenize/index.cjs +199 -0
- package/dist/node_modules/.pnpm/html-tokenize@2.0.1/node_modules/html-tokenize/index.js +199 -0
- package/dist/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.cjs +31 -0
- package/dist/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js +31 -0
- package/dist/node_modules/.pnpm/isarray@0.0.1/node_modules/isarray/index.cjs +6 -0
- package/dist/node_modules/.pnpm/isarray@0.0.1/node_modules/isarray/index.js +6 -0
- package/dist/node_modules/.pnpm/isarray@1.0.0/node_modules/isarray/index.cjs +7 -0
- package/dist/node_modules/.pnpm/isarray@1.0.0/node_modules/isarray/index.js +7 -0
- package/dist/node_modules/.pnpm/multipipe@1.0.2/node_modules/multipipe/index.cjs +67 -0
- package/dist/node_modules/.pnpm/multipipe@1.0.2/node_modules/multipipe/index.js +67 -0
- package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.cjs +56 -63
- package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js +56 -63
- package/dist/node_modules/.pnpm/process-nextick-args@2.0.1/node_modules/process-nextick-args/index.cjs +43 -0
- package/dist/node_modules/.pnpm/process-nextick-args@2.0.1/node_modules/process-nextick-args/index.js +43 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.cjs +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js +2 -2
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.cjs +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.cjs +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/.pnpm/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_duplex.cjs +54 -0
- package/dist/node_modules/.pnpm/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_duplex.js +54 -0
- package/dist/node_modules/.pnpm/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_passthrough.cjs +20 -0
- package/dist/node_modules/.pnpm/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_passthrough.js +20 -0
- package/dist/node_modules/.pnpm/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_readable.cjs +607 -0
- package/dist/node_modules/.pnpm/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_readable.js +607 -0
- package/dist/node_modules/.pnpm/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_transform.cjs +95 -0
- package/dist/node_modules/.pnpm/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_transform.js +95 -0
- package/dist/node_modules/.pnpm/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_writable.cjs +240 -0
- package/dist/node_modules/.pnpm/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_writable.js +240 -0
- package/dist/node_modules/.pnpm/readable-stream@1.0.34/node_modules/readable-stream/readable.cjs +24 -0
- package/dist/node_modules/.pnpm/readable-stream@1.0.34/node_modules/readable-stream/readable.js +24 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_duplex.cjs +83 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_duplex.js +83 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_passthrough.cjs +19 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_passthrough.js +19 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_readable.cjs +702 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_readable.js +702 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_transform.cjs +100 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_transform.js +100 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_writable.cjs +453 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_writable.js +453 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/BufferList.cjs +85 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/BufferList.js +85 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/destroy.cjs +66 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/destroy.js +66 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/stream-browser.cjs +5 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/stream-browser.js +5 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/readable-browser.cjs +19 -0
- package/dist/node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/readable-browser.js +19 -0
- package/dist/node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.cjs +59 -0
- package/dist/node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js +59 -0
- package/dist/node_modules/.pnpm/string_decoder@0.10.31/node_modules/string_decoder/index.cjs +143 -0
- package/dist/node_modules/.pnpm/string_decoder@0.10.31/node_modules/string_decoder/index.js +143 -0
- package/dist/node_modules/.pnpm/string_decoder@1.1.1/node_modules/string_decoder/lib/string_decoder.cjs +242 -0
- package/dist/node_modules/.pnpm/string_decoder@1.1.1/node_modules/string_decoder/lib/string_decoder.js +242 -0
- package/dist/node_modules/.pnpm/through@2.3.8/node_modules/through/index.cjs +91 -0
- package/dist/node_modules/.pnpm/through@2.3.8/node_modules/through/index.js +91 -0
- package/dist/node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/browser.cjs +35 -0
- package/dist/node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/browser.js +35 -0
- package/dist/utils/emotion.d.cts +1 -0
- package/dist/utils/emotion.d.ts +1 -0
- package/dist/utils/index.cjs +2 -0
- package/dist/utils/index.js +4 -2
- package/package.json +2 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var toString = Object.prototype.toString;
|
|
2
|
+
var isModern = typeof Buffer.alloc === "function" && typeof Buffer.allocUnsafe === "function" && typeof Buffer.from === "function";
|
|
3
|
+
function isArrayBuffer(input) {
|
|
4
|
+
return toString.call(input).slice(8, -1) === "ArrayBuffer";
|
|
5
|
+
}
|
|
6
|
+
function fromArrayBuffer(obj, byteOffset, length) {
|
|
7
|
+
byteOffset >>>= 0;
|
|
8
|
+
var maxLength = obj.byteLength - byteOffset;
|
|
9
|
+
if (maxLength < 0) {
|
|
10
|
+
throw new RangeError("'offset' is out of bounds");
|
|
11
|
+
}
|
|
12
|
+
if (length === void 0) {
|
|
13
|
+
length = maxLength;
|
|
14
|
+
} else {
|
|
15
|
+
length >>>= 0;
|
|
16
|
+
if (length > maxLength) {
|
|
17
|
+
throw new RangeError("'length' is out of bounds");
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return isModern ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length)));
|
|
21
|
+
}
|
|
22
|
+
function fromString(string, encoding) {
|
|
23
|
+
if (typeof encoding !== "string" || encoding === "") {
|
|
24
|
+
encoding = "utf8";
|
|
25
|
+
}
|
|
26
|
+
if (!Buffer.isEncoding(encoding)) {
|
|
27
|
+
throw new TypeError('"encoding" must be a valid string encoding');
|
|
28
|
+
}
|
|
29
|
+
return isModern ? Buffer.from(string, encoding) : new Buffer(string, encoding);
|
|
30
|
+
}
|
|
31
|
+
function bufferFrom(value, encodingOrOffset, length) {
|
|
32
|
+
if (typeof value === "number") {
|
|
33
|
+
throw new TypeError('"value" argument must not be a number');
|
|
34
|
+
}
|
|
35
|
+
if (isArrayBuffer(value)) {
|
|
36
|
+
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
37
|
+
}
|
|
38
|
+
if (typeof value === "string") {
|
|
39
|
+
return fromString(value, encodingOrOffset);
|
|
40
|
+
}
|
|
41
|
+
return isModern ? Buffer.from(value) : new Buffer(value);
|
|
42
|
+
}
|
|
43
|
+
var bufferFrom_1 = bufferFrom;
|
|
44
|
+
export {
|
|
45
|
+
bufferFrom_1 as b
|
|
46
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const util = require("../../../../../../_virtual/util.cjs");
|
|
4
|
+
const ___viteBrowserExternal_commonjsProxy = require("../../../../../../_virtual/___vite-browser-external.cjs");
|
|
5
|
+
function isArray(arg) {
|
|
6
|
+
if (Array.isArray) {
|
|
7
|
+
return Array.isArray(arg);
|
|
8
|
+
}
|
|
9
|
+
return objectToString(arg) === "[object Array]";
|
|
10
|
+
}
|
|
11
|
+
util.__exports.isArray = isArray;
|
|
12
|
+
function isBoolean(arg) {
|
|
13
|
+
return typeof arg === "boolean";
|
|
14
|
+
}
|
|
15
|
+
util.__exports.isBoolean = isBoolean;
|
|
16
|
+
function isNull(arg) {
|
|
17
|
+
return arg === null;
|
|
18
|
+
}
|
|
19
|
+
util.__exports.isNull = isNull;
|
|
20
|
+
function isNullOrUndefined(arg) {
|
|
21
|
+
return arg == null;
|
|
22
|
+
}
|
|
23
|
+
util.__exports.isNullOrUndefined = isNullOrUndefined;
|
|
24
|
+
function isNumber(arg) {
|
|
25
|
+
return typeof arg === "number";
|
|
26
|
+
}
|
|
27
|
+
util.__exports.isNumber = isNumber;
|
|
28
|
+
function isString(arg) {
|
|
29
|
+
return typeof arg === "string";
|
|
30
|
+
}
|
|
31
|
+
util.__exports.isString = isString;
|
|
32
|
+
function isSymbol(arg) {
|
|
33
|
+
return typeof arg === "symbol";
|
|
34
|
+
}
|
|
35
|
+
util.__exports.isSymbol = isSymbol;
|
|
36
|
+
function isUndefined(arg) {
|
|
37
|
+
return arg === void 0;
|
|
38
|
+
}
|
|
39
|
+
util.__exports.isUndefined = isUndefined;
|
|
40
|
+
function isRegExp(re) {
|
|
41
|
+
return objectToString(re) === "[object RegExp]";
|
|
42
|
+
}
|
|
43
|
+
util.__exports.isRegExp = isRegExp;
|
|
44
|
+
function isObject(arg) {
|
|
45
|
+
return typeof arg === "object" && arg !== null;
|
|
46
|
+
}
|
|
47
|
+
util.__exports.isObject = isObject;
|
|
48
|
+
function isDate(d) {
|
|
49
|
+
return objectToString(d) === "[object Date]";
|
|
50
|
+
}
|
|
51
|
+
util.__exports.isDate = isDate;
|
|
52
|
+
function isError(e) {
|
|
53
|
+
return objectToString(e) === "[object Error]" || e instanceof Error;
|
|
54
|
+
}
|
|
55
|
+
util.__exports.isError = isError;
|
|
56
|
+
function isFunction(arg) {
|
|
57
|
+
return typeof arg === "function";
|
|
58
|
+
}
|
|
59
|
+
util.__exports.isFunction = isFunction;
|
|
60
|
+
function isPrimitive(arg) {
|
|
61
|
+
return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol
|
|
62
|
+
typeof arg === "undefined";
|
|
63
|
+
}
|
|
64
|
+
util.__exports.isPrimitive = isPrimitive;
|
|
65
|
+
util.__exports.isBuffer = ___viteBrowserExternal_commonjsProxy.default.Buffer.isBuffer;
|
|
66
|
+
function objectToString(o) {
|
|
67
|
+
return Object.prototype.toString.call(o);
|
|
68
|
+
}
|
|
69
|
+
exports.default = util.__exports;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { __exports as util } from "../../../../../../_virtual/util.js";
|
|
2
|
+
import require$$1 from "../../../../../../_virtual/___vite-browser-external.js";
|
|
3
|
+
function isArray(arg) {
|
|
4
|
+
if (Array.isArray) {
|
|
5
|
+
return Array.isArray(arg);
|
|
6
|
+
}
|
|
7
|
+
return objectToString(arg) === "[object Array]";
|
|
8
|
+
}
|
|
9
|
+
util.isArray = isArray;
|
|
10
|
+
function isBoolean(arg) {
|
|
11
|
+
return typeof arg === "boolean";
|
|
12
|
+
}
|
|
13
|
+
util.isBoolean = isBoolean;
|
|
14
|
+
function isNull(arg) {
|
|
15
|
+
return arg === null;
|
|
16
|
+
}
|
|
17
|
+
util.isNull = isNull;
|
|
18
|
+
function isNullOrUndefined(arg) {
|
|
19
|
+
return arg == null;
|
|
20
|
+
}
|
|
21
|
+
util.isNullOrUndefined = isNullOrUndefined;
|
|
22
|
+
function isNumber(arg) {
|
|
23
|
+
return typeof arg === "number";
|
|
24
|
+
}
|
|
25
|
+
util.isNumber = isNumber;
|
|
26
|
+
function isString(arg) {
|
|
27
|
+
return typeof arg === "string";
|
|
28
|
+
}
|
|
29
|
+
util.isString = isString;
|
|
30
|
+
function isSymbol(arg) {
|
|
31
|
+
return typeof arg === "symbol";
|
|
32
|
+
}
|
|
33
|
+
util.isSymbol = isSymbol;
|
|
34
|
+
function isUndefined(arg) {
|
|
35
|
+
return arg === void 0;
|
|
36
|
+
}
|
|
37
|
+
util.isUndefined = isUndefined;
|
|
38
|
+
function isRegExp(re) {
|
|
39
|
+
return objectToString(re) === "[object RegExp]";
|
|
40
|
+
}
|
|
41
|
+
util.isRegExp = isRegExp;
|
|
42
|
+
function isObject(arg) {
|
|
43
|
+
return typeof arg === "object" && arg !== null;
|
|
44
|
+
}
|
|
45
|
+
util.isObject = isObject;
|
|
46
|
+
function isDate(d) {
|
|
47
|
+
return objectToString(d) === "[object Date]";
|
|
48
|
+
}
|
|
49
|
+
util.isDate = isDate;
|
|
50
|
+
function isError(e) {
|
|
51
|
+
return objectToString(e) === "[object Error]" || e instanceof Error;
|
|
52
|
+
}
|
|
53
|
+
util.isError = isError;
|
|
54
|
+
function isFunction(arg) {
|
|
55
|
+
return typeof arg === "function";
|
|
56
|
+
}
|
|
57
|
+
util.isFunction = isFunction;
|
|
58
|
+
function isPrimitive(arg) {
|
|
59
|
+
return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol
|
|
60
|
+
typeof arg === "undefined";
|
|
61
|
+
}
|
|
62
|
+
util.isPrimitive = isPrimitive;
|
|
63
|
+
util.isBuffer = require$$1.Buffer.isBuffer;
|
|
64
|
+
function objectToString(o) {
|
|
65
|
+
return Object.prototype.toString.call(o);
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
util as default
|
|
69
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index = require("../../../../../_virtual/index3.cjs");
|
|
4
|
+
const readableBrowser = require("../../../readable-stream@2.3.8/node_modules/readable-stream/readable-browser.cjs");
|
|
5
|
+
var stream = readableBrowser.readableBrowserExports;
|
|
6
|
+
function DuplexWrapper(options, writable, readable) {
|
|
7
|
+
if (typeof readable === "undefined") {
|
|
8
|
+
readable = writable;
|
|
9
|
+
writable = options;
|
|
10
|
+
options = null;
|
|
11
|
+
}
|
|
12
|
+
stream.Duplex.call(this, options);
|
|
13
|
+
if (typeof readable.read !== "function") {
|
|
14
|
+
readable = new stream.Readable(options).wrap(readable);
|
|
15
|
+
}
|
|
16
|
+
this._writable = writable;
|
|
17
|
+
this._readable = readable;
|
|
18
|
+
this._waiting = false;
|
|
19
|
+
var self = this;
|
|
20
|
+
writable.once("finish", function() {
|
|
21
|
+
self.end();
|
|
22
|
+
});
|
|
23
|
+
this.once("finish", function() {
|
|
24
|
+
writable.end();
|
|
25
|
+
});
|
|
26
|
+
readable.on("readable", function() {
|
|
27
|
+
if (self._waiting) {
|
|
28
|
+
self._waiting = false;
|
|
29
|
+
self._read();
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
readable.once("end", function() {
|
|
33
|
+
self.push(null);
|
|
34
|
+
});
|
|
35
|
+
if (!options || typeof options.bubbleErrors === "undefined" || options.bubbleErrors) {
|
|
36
|
+
writable.on("error", function(err) {
|
|
37
|
+
self.emit("error", err);
|
|
38
|
+
});
|
|
39
|
+
readable.on("error", function(err) {
|
|
40
|
+
self.emit("error", err);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, { constructor: { value: DuplexWrapper } });
|
|
45
|
+
DuplexWrapper.prototype._write = function _write(input, encoding, done) {
|
|
46
|
+
this._writable.write(input, encoding, done);
|
|
47
|
+
};
|
|
48
|
+
DuplexWrapper.prototype._read = function _read() {
|
|
49
|
+
var buf;
|
|
50
|
+
var reads = 0;
|
|
51
|
+
while ((buf = this._readable.read()) !== null) {
|
|
52
|
+
this.push(buf);
|
|
53
|
+
reads++;
|
|
54
|
+
}
|
|
55
|
+
if (reads === 0) {
|
|
56
|
+
this._waiting = true;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
index.__module.exports = function duplex2(options, writable, readable) {
|
|
60
|
+
return new DuplexWrapper(options, writable, readable);
|
|
61
|
+
};
|
|
62
|
+
index.__module.exports.DuplexWrapper = DuplexWrapper;
|
|
63
|
+
var duplexer2Exports = index.__module.exports;
|
|
64
|
+
exports.duplexer2Exports = duplexer2Exports;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { __module as duplexer2 } from "../../../../../_virtual/index3.js";
|
|
2
|
+
import { r as readableBrowserExports } from "../../../readable-stream@2.3.8/node_modules/readable-stream/readable-browser.js";
|
|
3
|
+
var stream = readableBrowserExports;
|
|
4
|
+
function DuplexWrapper(options, writable, readable) {
|
|
5
|
+
if (typeof readable === "undefined") {
|
|
6
|
+
readable = writable;
|
|
7
|
+
writable = options;
|
|
8
|
+
options = null;
|
|
9
|
+
}
|
|
10
|
+
stream.Duplex.call(this, options);
|
|
11
|
+
if (typeof readable.read !== "function") {
|
|
12
|
+
readable = new stream.Readable(options).wrap(readable);
|
|
13
|
+
}
|
|
14
|
+
this._writable = writable;
|
|
15
|
+
this._readable = readable;
|
|
16
|
+
this._waiting = false;
|
|
17
|
+
var self = this;
|
|
18
|
+
writable.once("finish", function() {
|
|
19
|
+
self.end();
|
|
20
|
+
});
|
|
21
|
+
this.once("finish", function() {
|
|
22
|
+
writable.end();
|
|
23
|
+
});
|
|
24
|
+
readable.on("readable", function() {
|
|
25
|
+
if (self._waiting) {
|
|
26
|
+
self._waiting = false;
|
|
27
|
+
self._read();
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
readable.once("end", function() {
|
|
31
|
+
self.push(null);
|
|
32
|
+
});
|
|
33
|
+
if (!options || typeof options.bubbleErrors === "undefined" || options.bubbleErrors) {
|
|
34
|
+
writable.on("error", function(err) {
|
|
35
|
+
self.emit("error", err);
|
|
36
|
+
});
|
|
37
|
+
readable.on("error", function(err) {
|
|
38
|
+
self.emit("error", err);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, { constructor: { value: DuplexWrapper } });
|
|
43
|
+
DuplexWrapper.prototype._write = function _write(input, encoding, done) {
|
|
44
|
+
this._writable.write(input, encoding, done);
|
|
45
|
+
};
|
|
46
|
+
DuplexWrapper.prototype._read = function _read() {
|
|
47
|
+
var buf;
|
|
48
|
+
var reads = 0;
|
|
49
|
+
while ((buf = this._readable.read()) !== null) {
|
|
50
|
+
this.push(buf);
|
|
51
|
+
reads++;
|
|
52
|
+
}
|
|
53
|
+
if (reads === 0) {
|
|
54
|
+
this._waiting = true;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
duplexer2.exports = function duplex2(options, writable, readable) {
|
|
58
|
+
return new DuplexWrapper(options, writable, readable);
|
|
59
|
+
};
|
|
60
|
+
duplexer2.exports.DuplexWrapper = DuplexWrapper;
|
|
61
|
+
var duplexer2Exports = duplexer2.exports;
|
|
62
|
+
export {
|
|
63
|
+
duplexer2Exports as d
|
|
64
|
+
};
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const _commonjsHelpers = require("../../../../../_virtual/_commonjsHelpers.cjs");
|
|
4
|
+
const index = require("../../../buffer-from@0.1.2/node_modules/buffer-from/index.cjs");
|
|
5
|
+
const readable = require("../../../readable-stream@1.0.34/node_modules/readable-stream/readable.cjs");
|
|
6
|
+
const inherits_browser = require("../../../inherits@2.0.4/node_modules/inherits/inherits_browser.cjs");
|
|
7
|
+
var bufferFrom = index.bufferFrom_1;
|
|
8
|
+
var Transform = readable.readableExports.Transform;
|
|
9
|
+
var inherits = inherits_browser.inherits_browserExports;
|
|
10
|
+
inherits(Tokenize, Transform);
|
|
11
|
+
var htmlTokenize = Tokenize;
|
|
12
|
+
var codes = {
|
|
13
|
+
lt: "<".charCodeAt(0),
|
|
14
|
+
gt: ">".charCodeAt(0),
|
|
15
|
+
slash: "/".charCodeAt(0),
|
|
16
|
+
dquote: '"'.charCodeAt(0),
|
|
17
|
+
squote: "'".charCodeAt(0),
|
|
18
|
+
equal: "=".charCodeAt(0)
|
|
19
|
+
};
|
|
20
|
+
var strings = {
|
|
21
|
+
endScript: bufferFrom("<\/script"),
|
|
22
|
+
endStyle: bufferFrom("</style"),
|
|
23
|
+
endTitle: bufferFrom("</title"),
|
|
24
|
+
comment: bufferFrom("<!--"),
|
|
25
|
+
endComment: bufferFrom("-->"),
|
|
26
|
+
cdata: bufferFrom("<![CDATA["),
|
|
27
|
+
endCdata: bufferFrom("]]>")
|
|
28
|
+
};
|
|
29
|
+
var states = {
|
|
30
|
+
"TagNameState": 1,
|
|
31
|
+
"AttributeNameState": 2,
|
|
32
|
+
"BeforeAttributeValueState": 3,
|
|
33
|
+
"AttributeValueState": 4
|
|
34
|
+
};
|
|
35
|
+
function Tokenize() {
|
|
36
|
+
if (!(this instanceof Tokenize)) return new Tokenize();
|
|
37
|
+
Transform.call(this);
|
|
38
|
+
this._readableState.objectMode = true;
|
|
39
|
+
this.state = "text";
|
|
40
|
+
this.tagState = null;
|
|
41
|
+
this.quoteState = null;
|
|
42
|
+
this.raw = null;
|
|
43
|
+
this.buffers = [];
|
|
44
|
+
this._last = [];
|
|
45
|
+
}
|
|
46
|
+
Tokenize.prototype._transform = function(buf, enc, next) {
|
|
47
|
+
var i = 0;
|
|
48
|
+
var offset = 0;
|
|
49
|
+
if (this._prev) {
|
|
50
|
+
buf = Buffer.concat([this._prev, buf]);
|
|
51
|
+
i = this._prev.length - 1;
|
|
52
|
+
offset = this._offset;
|
|
53
|
+
this._prev = null;
|
|
54
|
+
this._offset = 0;
|
|
55
|
+
}
|
|
56
|
+
for (; i < buf.length; i++) {
|
|
57
|
+
var b = buf[i];
|
|
58
|
+
this._last.push(b);
|
|
59
|
+
if (this._last.length > 9) this._last.shift();
|
|
60
|
+
if (this.raw) {
|
|
61
|
+
var parts = this._testRaw(buf, offset, i);
|
|
62
|
+
if (parts) {
|
|
63
|
+
this.push(["text", parts[0]]);
|
|
64
|
+
if (this.raw === strings.endComment || this.raw === strings.endCdata) {
|
|
65
|
+
this.state = "text";
|
|
66
|
+
this.buffers = [];
|
|
67
|
+
this.push(["close", parts[1]]);
|
|
68
|
+
} else {
|
|
69
|
+
this.state = "open";
|
|
70
|
+
this.buffers = [parts[1]];
|
|
71
|
+
}
|
|
72
|
+
this.raw = null;
|
|
73
|
+
offset = i + 1;
|
|
74
|
+
}
|
|
75
|
+
} else if (this.state === "text" && b === codes.lt && i === buf.length - 1) {
|
|
76
|
+
this._prev = buf;
|
|
77
|
+
this._offset = offset;
|
|
78
|
+
return next();
|
|
79
|
+
} else if (this.state === "text" && b === codes.lt && !isWhiteSpace(buf[i + 1])) {
|
|
80
|
+
if (i > 0 && i - offset > 0) {
|
|
81
|
+
this.buffers.push(buf.slice(offset, i));
|
|
82
|
+
}
|
|
83
|
+
offset = i;
|
|
84
|
+
this.state = "open";
|
|
85
|
+
this.tagState = states.TagNameState;
|
|
86
|
+
this._pushState("text");
|
|
87
|
+
} else if (this.tagState === states.TagNameState && isWhiteSpace(b)) {
|
|
88
|
+
this.tagState = states.AttributeNameState;
|
|
89
|
+
} else if (this.tagState === states.AttributeNameState && b === codes.equal) {
|
|
90
|
+
this.tagState = states.BeforeAttributeValueState;
|
|
91
|
+
} else if (this.tagState === states.BeforeAttributeValueState && isWhiteSpace(b)) ;
|
|
92
|
+
else if (this.tagState === states.BeforeAttributeValueState && b !== codes.gt) {
|
|
93
|
+
this.tagState = states.AttributeValueState;
|
|
94
|
+
if (b === codes.dquote) {
|
|
95
|
+
this.quoteState = "double";
|
|
96
|
+
} else if (b === codes.squote) {
|
|
97
|
+
this.quoteState = "single";
|
|
98
|
+
} else {
|
|
99
|
+
this.quoteState = null;
|
|
100
|
+
}
|
|
101
|
+
} else if (this.tagState === states.AttributeValueState && !this.quoteState && isWhiteSpace(b)) {
|
|
102
|
+
this.tagState = states.AttributeNameState;
|
|
103
|
+
} else if (this.tagState === states.AttributeValueState && this.quoteState === "double" && b === codes.dquote) {
|
|
104
|
+
this.quoteState = null;
|
|
105
|
+
this.tagState = states.AttributeNameState;
|
|
106
|
+
} else if (this.tagState === states.AttributeValueState && this.quoteState === "single" && b === codes.squote) {
|
|
107
|
+
this.quoteState = null;
|
|
108
|
+
this.tagState = states.AttributeNameState;
|
|
109
|
+
} else if (this.state === "open" && b === codes.gt && !this.quoteState) {
|
|
110
|
+
this.buffers.push(buf.slice(offset, i + 1));
|
|
111
|
+
offset = i + 1;
|
|
112
|
+
this.state = "text";
|
|
113
|
+
this.tagState = null;
|
|
114
|
+
if (this._getChar(1) === codes.slash) {
|
|
115
|
+
this._pushState("close");
|
|
116
|
+
} else {
|
|
117
|
+
var tag = this._getTag();
|
|
118
|
+
if (tag === "script") this.raw = strings.endScript;
|
|
119
|
+
if (tag === "style") this.raw = strings.endStyle;
|
|
120
|
+
if (tag === "title") this.raw = strings.endTitle;
|
|
121
|
+
this._pushState("open");
|
|
122
|
+
}
|
|
123
|
+
} else if (this.state === "open" && compare(this._last, strings.comment)) {
|
|
124
|
+
this.buffers.push(buf.slice(offset, i + 1));
|
|
125
|
+
offset = i + 1;
|
|
126
|
+
this.state = "text";
|
|
127
|
+
this.raw = strings.endComment;
|
|
128
|
+
this._pushState("open");
|
|
129
|
+
} else if (this.state === "open" && compare(this._last, strings.cdata)) {
|
|
130
|
+
this.buffers.push(buf.slice(offset, i + 1));
|
|
131
|
+
offset = i + 1;
|
|
132
|
+
this.state = "text";
|
|
133
|
+
this.raw = strings.endCdata;
|
|
134
|
+
this._pushState("open");
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (offset < buf.length) this.buffers.push(buf.slice(offset));
|
|
138
|
+
next();
|
|
139
|
+
};
|
|
140
|
+
Tokenize.prototype._flush = function(next) {
|
|
141
|
+
if (this.state === "text") this._pushState("text");
|
|
142
|
+
this.push(null);
|
|
143
|
+
next();
|
|
144
|
+
};
|
|
145
|
+
Tokenize.prototype._pushState = function(ev) {
|
|
146
|
+
if (this.buffers.length === 0) return;
|
|
147
|
+
var buf = Buffer.concat(this.buffers);
|
|
148
|
+
this.buffers = [];
|
|
149
|
+
this.push([ev, buf]);
|
|
150
|
+
};
|
|
151
|
+
Tokenize.prototype._getChar = function(i) {
|
|
152
|
+
var offset = 0;
|
|
153
|
+
for (var j = 0; j < this.buffers.length; j++) {
|
|
154
|
+
var buf = this.buffers[j];
|
|
155
|
+
if (offset + buf.length > i) {
|
|
156
|
+
return buf[i - offset];
|
|
157
|
+
}
|
|
158
|
+
offset += buf;
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
Tokenize.prototype._getTag = function() {
|
|
162
|
+
var offset = 0;
|
|
163
|
+
var tag = "";
|
|
164
|
+
for (var j = 0; j < this.buffers.length; j++) {
|
|
165
|
+
var buf = this.buffers[j];
|
|
166
|
+
for (var k = 0; k < buf.length; k++) {
|
|
167
|
+
if (offset === 0 && k === 0) continue;
|
|
168
|
+
var c = String.fromCharCode(buf[k]);
|
|
169
|
+
if (/[^\w-!\[\]]/.test(c)) {
|
|
170
|
+
return tag.toLowerCase();
|
|
171
|
+
} else tag += c;
|
|
172
|
+
}
|
|
173
|
+
offset += buf.length;
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
Tokenize.prototype._testRaw = function(buf, offset, index2) {
|
|
177
|
+
var raw = this.raw, last = this._last;
|
|
178
|
+
if (!compare(last, raw)) return;
|
|
179
|
+
this.buffers.push(buf.slice(offset, index2 + 1));
|
|
180
|
+
var buf = Buffer.concat(this.buffers);
|
|
181
|
+
var k = buf.length - raw.length;
|
|
182
|
+
return [buf.slice(0, k), buf.slice(k)];
|
|
183
|
+
};
|
|
184
|
+
function compare(a, b) {
|
|
185
|
+
if (a.length < b.length) return false;
|
|
186
|
+
for (var i = a.length - 1, j = b.length - 1; i >= 0 && j >= 0; i--, j--) {
|
|
187
|
+
if (lower(a[i]) !== lower(b[j])) return false;
|
|
188
|
+
}
|
|
189
|
+
return true;
|
|
190
|
+
}
|
|
191
|
+
function lower(n) {
|
|
192
|
+
if (n >= 65 && n <= 90) return n + 32;
|
|
193
|
+
return n;
|
|
194
|
+
}
|
|
195
|
+
function isWhiteSpace(b) {
|
|
196
|
+
return b === 32 || b === 9 || b === 10 || b === 12 || b === 13;
|
|
197
|
+
}
|
|
198
|
+
const tokenize = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(htmlTokenize);
|
|
199
|
+
exports.default = tokenize;
|