diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c5e75e..8144df1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# [5.1.0](https://github.com/techmovie/easy-upload/compare/5.0.2...5.1.0) (2024-05-28) + + +### Bug Fixes + +* regex fix ([68696f6](https://github.com/techmovie/easy-upload/commit/68696f6275460a0faa2164988c5f4315a4d02861)) +* **unit3d:** preview description ([6b2c266](https://github.com/techmovie/easy-upload/commit/6b2c2665ddf4a341502916d5c7997b71125ab6ae)), closes [#196](https://github.com/techmovie/easy-upload/issues/196) + + +### Features + +* **dicmusic:** support to transfer to dic ([95ca202](https://github.com/techmovie/easy-upload/commit/95ca2028bc372f21d643834ce0fa87249f7ab37c)), closes [#127](https://github.com/techmovie/easy-upload/issues/127) [#277](https://github.com/techmovie/easy-upload/issues/277) +* **red:** support to transfer to red ([122ebf7](https://github.com/techmovie/easy-upload/commit/122ebf7bfdbc88cfc9581fbe282c9938f829e600)), closes [#127](https://github.com/techmovie/easy-upload/issues/127) + + + ## [5.0.2](https://github.com/techmovie/easy-upload/compare/5.0.1...5.0.2) (2024-05-27) diff --git a/dist/easy-upload.user.js b/dist/easy-upload.user.js index c706784..7c14112 100644 --- a/dist/easy-upload.user.js +++ b/dist/easy-upload.user.js @@ -2,7 +2,7 @@ // @name EasyUpload PT一键转种 // @name:en EasyUpload - Trackers Transfer Tool // @namespace https://github.com/techmovie/easy-upload -// @version 5.0.2 +// @version 5.1.0 // @description easy uploading torrents to other trackers // @description:en easy uploading torrents to other trackers // @author birdplane @@ -428,612 +428,186 @@ } }); - // (disabled):fs - var require_fs = __commonJS({ - "(disabled):fs"() { + // node_modules/base64-js/index.js + var require_base64_js = __commonJS({ + "node_modules/base64-js/index.js"(exports) { + "use strict"; init_preact_shim(); + exports.byteLength = byteLength; + exports.toByteArray = toByteArray; + exports.fromByteArray = fromByteArray; + var lookup2 = []; + var revLookup = []; + var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array; + var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + for (i3 = 0, len = code.length; i3 < len; ++i3) { + lookup2[i3] = code[i3]; + revLookup[code.charCodeAt(i3)] = i3; + } + var i3; + var len; + revLookup["-".charCodeAt(0)] = 62; + revLookup["_".charCodeAt(0)] = 63; + function getLens(b64) { + var len2 = b64.length; + if (len2 % 4 > 0) { + throw new Error("Invalid string. Length must be a multiple of 4"); + } + var validLen = b64.indexOf("="); + if (validLen === -1) validLen = len2; + var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4; + return [validLen, placeHoldersLen]; + } + function byteLength(b64) { + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; + } + function _byteLength(b64, validLen, placeHoldersLen) { + return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; + } + function toByteArray(b64) { + var tmp; + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)); + var curByte = 0; + var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen; + var i4; + for (i4 = 0; i4 < len2; i4 += 4) { + tmp = revLookup[b64.charCodeAt(i4)] << 18 | revLookup[b64.charCodeAt(i4 + 1)] << 12 | revLookup[b64.charCodeAt(i4 + 2)] << 6 | revLookup[b64.charCodeAt(i4 + 3)]; + arr[curByte++] = tmp >> 16 & 255; + arr[curByte++] = tmp >> 8 & 255; + arr[curByte++] = tmp & 255; + } + if (placeHoldersLen === 2) { + tmp = revLookup[b64.charCodeAt(i4)] << 2 | revLookup[b64.charCodeAt(i4 + 1)] >> 4; + arr[curByte++] = tmp & 255; + } + if (placeHoldersLen === 1) { + tmp = revLookup[b64.charCodeAt(i4)] << 10 | revLookup[b64.charCodeAt(i4 + 1)] << 4 | revLookup[b64.charCodeAt(i4 + 2)] >> 2; + arr[curByte++] = tmp >> 8 & 255; + arr[curByte++] = tmp & 255; + } + return arr; + } + function tripletToBase64(num) { + return lookup2[num >> 18 & 63] + lookup2[num >> 12 & 63] + lookup2[num >> 6 & 63] + lookup2[num & 63]; + } + function encodeChunk(uint8, start, end) { + var tmp; + var output = []; + for (var i4 = start; i4 < end; i4 += 3) { + tmp = (uint8[i4] << 16 & 16711680) + (uint8[i4 + 1] << 8 & 65280) + (uint8[i4 + 2] & 255); + output.push(tripletToBase64(tmp)); + } + return output.join(""); + } + function fromByteArray(uint8) { + var tmp; + var len2 = uint8.length; + var extraBytes = len2 % 3; + var parts = []; + var maxChunkLength = 16383; + for (var i4 = 0, len22 = len2 - extraBytes; i4 < len22; i4 += maxChunkLength) { + parts.push(encodeChunk(uint8, i4, i4 + maxChunkLength > len22 ? len22 : i4 + maxChunkLength)); + } + if (extraBytes === 1) { + tmp = uint8[len2 - 1]; + parts.push( + lookup2[tmp >> 2] + lookup2[tmp << 4 & 63] + "==" + ); + } else if (extraBytes === 2) { + tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1]; + parts.push( + lookup2[tmp >> 10] + lookup2[tmp >> 4 & 63] + lookup2[tmp << 2 & 63] + "=" + ); + } + return parts.join(""); + } } }); - // node_modules/path-browserify/index.js - var require_path_browserify = __commonJS({ - "node_modules/path-browserify/index.js"(exports, module) { - "use strict"; + // node_modules/ieee754/index.js + var require_ieee754 = __commonJS({ + "node_modules/ieee754/index.js"(exports) { init_preact_shim(); - function assertPath(path2) { - if (typeof path2 !== "string") { - throw new TypeError("Path must be a string. Received " + JSON.stringify(path2)); + exports.read = function(buffer, offset, isLE, mLen, nBytes) { + var e4, m3; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = -7; + var i3 = isLE ? nBytes - 1 : 0; + var d3 = isLE ? -1 : 1; + var s3 = buffer[offset + i3]; + i3 += d3; + e4 = s3 & (1 << -nBits) - 1; + s3 >>= -nBits; + nBits += eLen; + for (; nBits > 0; e4 = e4 * 256 + buffer[offset + i3], i3 += d3, nBits -= 8) { } - } - function normalizeStringPosix(path2, allowAboveRoot) { - var res = ""; - var lastSegmentLength = 0; - var lastSlash = -1; - var dots = 0; - var code; - for (var i3 = 0; i3 <= path2.length; ++i3) { - if (i3 < path2.length) - code = path2.charCodeAt(i3); - else if (code === 47) - break; - else - code = 47; - if (code === 47) { - if (lastSlash === i3 - 1 || dots === 1) { - } else if (lastSlash !== i3 - 1 && dots === 2) { - if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) { - if (res.length > 2) { - var lastSlashIndex = res.lastIndexOf("/"); - if (lastSlashIndex !== res.length - 1) { - if (lastSlashIndex === -1) { - res = ""; - lastSegmentLength = 0; - } else { - res = res.slice(0, lastSlashIndex); - lastSegmentLength = res.length - 1 - res.lastIndexOf("/"); - } - lastSlash = i3; - dots = 0; - continue; - } - } else if (res.length === 2 || res.length === 1) { - res = ""; - lastSegmentLength = 0; - lastSlash = i3; - dots = 0; - continue; - } - } - if (allowAboveRoot) { - if (res.length > 0) - res += "/.."; - else - res = ".."; - lastSegmentLength = 2; - } - } else { - if (res.length > 0) - res += "/" + path2.slice(lastSlash + 1, i3); - else - res = path2.slice(lastSlash + 1, i3); - lastSegmentLength = i3 - lastSlash - 1; - } - lastSlash = i3; - dots = 0; - } else if (code === 46 && dots !== -1) { - ++dots; + m3 = e4 & (1 << -nBits) - 1; + e4 >>= -nBits; + nBits += mLen; + for (; nBits > 0; m3 = m3 * 256 + buffer[offset + i3], i3 += d3, nBits -= 8) { + } + if (e4 === 0) { + e4 = 1 - eBias; + } else if (e4 === eMax) { + return m3 ? NaN : (s3 ? -1 : 1) * Infinity; + } else { + m3 = m3 + Math.pow(2, mLen); + e4 = e4 - eBias; + } + return (s3 ? -1 : 1) * m3 * Math.pow(2, e4 - mLen); + }; + exports.write = function(buffer, value, offset, isLE, mLen, nBytes) { + var e4, m3, c3; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; + var i3 = isLE ? 0 : nBytes - 1; + var d3 = isLE ? 1 : -1; + var s3 = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + value = Math.abs(value); + if (isNaN(value) || value === Infinity) { + m3 = isNaN(value) ? 1 : 0; + e4 = eMax; + } else { + e4 = Math.floor(Math.log(value) / Math.LN2); + if (value * (c3 = Math.pow(2, -e4)) < 1) { + e4--; + c3 *= 2; + } + if (e4 + eBias >= 1) { + value += rt / c3; } else { - dots = -1; + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c3 >= 2) { + e4++; + c3 /= 2; + } + if (e4 + eBias >= eMax) { + m3 = 0; + e4 = eMax; + } else if (e4 + eBias >= 1) { + m3 = (value * c3 - 1) * Math.pow(2, mLen); + e4 = e4 + eBias; + } else { + m3 = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e4 = 0; } } - return res; - } - function _format(sep, pathObject) { - var dir = pathObject.dir || pathObject.root; - var base = pathObject.base || (pathObject.name || "") + (pathObject.ext || ""); - if (!dir) { - return base; + for (; mLen >= 8; buffer[offset + i3] = m3 & 255, i3 += d3, m3 /= 256, mLen -= 8) { } - if (dir === pathObject.root) { - return dir + base; - } - return dir + sep + base; - } - var posix = { - // path.resolve([from ...], to) - resolve: function resolve() { - var resolvedPath = ""; - var resolvedAbsolute = false; - var cwd; - for (var i3 = arguments.length - 1; i3 >= -1 && !resolvedAbsolute; i3--) { - var path2; - if (i3 >= 0) - path2 = arguments[i3]; - else { - if (cwd === void 0) - cwd = process.cwd(); - path2 = cwd; - } - assertPath(path2); - if (path2.length === 0) { - continue; - } - resolvedPath = path2 + "/" + resolvedPath; - resolvedAbsolute = path2.charCodeAt(0) === 47; - } - resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute); - if (resolvedAbsolute) { - if (resolvedPath.length > 0) - return "/" + resolvedPath; - else - return "/"; - } else if (resolvedPath.length > 0) { - return resolvedPath; - } else { - return "."; - } - }, - normalize: function normalize(path2) { - assertPath(path2); - if (path2.length === 0) return "."; - var isAbsolute = path2.charCodeAt(0) === 47; - var trailingSeparator = path2.charCodeAt(path2.length - 1) === 47; - path2 = normalizeStringPosix(path2, !isAbsolute); - if (path2.length === 0 && !isAbsolute) path2 = "."; - if (path2.length > 0 && trailingSeparator) path2 += "/"; - if (isAbsolute) return "/" + path2; - return path2; - }, - isAbsolute: function isAbsolute(path2) { - assertPath(path2); - return path2.length > 0 && path2.charCodeAt(0) === 47; - }, - join: function join() { - if (arguments.length === 0) - return "."; - var joined; - for (var i3 = 0; i3 < arguments.length; ++i3) { - var arg = arguments[i3]; - assertPath(arg); - if (arg.length > 0) { - if (joined === void 0) - joined = arg; - else - joined += "/" + arg; - } - } - if (joined === void 0) - return "."; - return posix.normalize(joined); - }, - relative: function relative(from, to) { - assertPath(from); - assertPath(to); - if (from === to) return ""; - from = posix.resolve(from); - to = posix.resolve(to); - if (from === to) return ""; - var fromStart = 1; - for (; fromStart < from.length; ++fromStart) { - if (from.charCodeAt(fromStart) !== 47) - break; - } - var fromEnd = from.length; - var fromLen = fromEnd - fromStart; - var toStart = 1; - for (; toStart < to.length; ++toStart) { - if (to.charCodeAt(toStart) !== 47) - break; - } - var toEnd = to.length; - var toLen = toEnd - toStart; - var length = fromLen < toLen ? fromLen : toLen; - var lastCommonSep = -1; - var i3 = 0; - for (; i3 <= length; ++i3) { - if (i3 === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i3) === 47) { - return to.slice(toStart + i3 + 1); - } else if (i3 === 0) { - return to.slice(toStart + i3); - } - } else if (fromLen > length) { - if (from.charCodeAt(fromStart + i3) === 47) { - lastCommonSep = i3; - } else if (i3 === 0) { - lastCommonSep = 0; - } - } - break; - } - var fromCode = from.charCodeAt(fromStart + i3); - var toCode = to.charCodeAt(toStart + i3); - if (fromCode !== toCode) - break; - else if (fromCode === 47) - lastCommonSep = i3; - } - var out = ""; - for (i3 = fromStart + lastCommonSep + 1; i3 <= fromEnd; ++i3) { - if (i3 === fromEnd || from.charCodeAt(i3) === 47) { - if (out.length === 0) - out += ".."; - else - out += "/.."; - } - } - if (out.length > 0) - return out + to.slice(toStart + lastCommonSep); - else { - toStart += lastCommonSep; - if (to.charCodeAt(toStart) === 47) - ++toStart; - return to.slice(toStart); - } - }, - _makeLong: function _makeLong(path2) { - return path2; - }, - dirname: function dirname(path2) { - assertPath(path2); - if (path2.length === 0) return "."; - var code = path2.charCodeAt(0); - var hasRoot = code === 47; - var end = -1; - var matchedSlash = true; - for (var i3 = path2.length - 1; i3 >= 1; --i3) { - code = path2.charCodeAt(i3); - if (code === 47) { - if (!matchedSlash) { - end = i3; - break; - } - } else { - matchedSlash = false; - } - } - if (end === -1) return hasRoot ? "/" : "."; - if (hasRoot && end === 1) return "//"; - return path2.slice(0, end); - }, - basename: function basename(path2, ext) { - if (ext !== void 0 && typeof ext !== "string") throw new TypeError('"ext" argument must be a string'); - assertPath(path2); - var start = 0; - var end = -1; - var matchedSlash = true; - var i3; - if (ext !== void 0 && ext.length > 0 && ext.length <= path2.length) { - if (ext.length === path2.length && ext === path2) return ""; - var extIdx = ext.length - 1; - var firstNonSlashEnd = -1; - for (i3 = path2.length - 1; i3 >= 0; --i3) { - var code = path2.charCodeAt(i3); - if (code === 47) { - if (!matchedSlash) { - start = i3 + 1; - break; - } - } else { - if (firstNonSlashEnd === -1) { - matchedSlash = false; - firstNonSlashEnd = i3 + 1; - } - if (extIdx >= 0) { - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - end = i3; - } - } else { - extIdx = -1; - end = firstNonSlashEnd; - } - } - } - } - if (start === end) end = firstNonSlashEnd; - else if (end === -1) end = path2.length; - return path2.slice(start, end); - } else { - for (i3 = path2.length - 1; i3 >= 0; --i3) { - if (path2.charCodeAt(i3) === 47) { - if (!matchedSlash) { - start = i3 + 1; - break; - } - } else if (end === -1) { - matchedSlash = false; - end = i3 + 1; - } - } - if (end === -1) return ""; - return path2.slice(start, end); - } - }, - extname: function extname(path2) { - assertPath(path2); - var startDot = -1; - var startPart = 0; - var end = -1; - var matchedSlash = true; - var preDotState = 0; - for (var i3 = path2.length - 1; i3 >= 0; --i3) { - var code = path2.charCodeAt(i3); - if (code === 47) { - if (!matchedSlash) { - startPart = i3 + 1; - break; - } - continue; - } - if (end === -1) { - matchedSlash = false; - end = i3 + 1; - } - if (code === 46) { - if (startDot === -1) - startDot = i3; - else if (preDotState !== 1) - preDotState = 1; - } else if (startDot !== -1) { - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ""; - } - return path2.slice(startDot, end); - }, - format: function format(pathObject) { - if (pathObject === null || typeof pathObject !== "object") { - throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject); - } - return _format("/", pathObject); - }, - parse: function parse(path2) { - assertPath(path2); - var ret = { root: "", dir: "", base: "", ext: "", name: "" }; - if (path2.length === 0) return ret; - var code = path2.charCodeAt(0); - var isAbsolute = code === 47; - var start; - if (isAbsolute) { - ret.root = "/"; - start = 1; - } else { - start = 0; - } - var startDot = -1; - var startPart = 0; - var end = -1; - var matchedSlash = true; - var i3 = path2.length - 1; - var preDotState = 0; - for (; i3 >= start; --i3) { - code = path2.charCodeAt(i3); - if (code === 47) { - if (!matchedSlash) { - startPart = i3 + 1; - break; - } - continue; - } - if (end === -1) { - matchedSlash = false; - end = i3 + 1; - } - if (code === 46) { - if (startDot === -1) startDot = i3; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - if (end !== -1) { - if (startPart === 0 && isAbsolute) ret.base = ret.name = path2.slice(1, end); - else ret.base = ret.name = path2.slice(startPart, end); - } - } else { - if (startPart === 0 && isAbsolute) { - ret.name = path2.slice(1, startDot); - ret.base = path2.slice(1, end); - } else { - ret.name = path2.slice(startPart, startDot); - ret.base = path2.slice(startPart, end); - } - ret.ext = path2.slice(startDot, end); - } - if (startPart > 0) ret.dir = path2.slice(0, startPart - 1); - else if (isAbsolute) ret.dir = "/"; - return ret; - }, - sep: "/", - delimiter: ":", - win32: null, - posix: null - }; - posix.posix = posix; - module.exports = posix; - } - }); - - // node_modules/queue-microtask/index.js - var require_queue_microtask = __commonJS({ - "node_modules/queue-microtask/index.js"(exports, module) { - init_preact_shim(); - var promise; - module.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { - throw err; - }, 0)); - } - }); - - // node_modules/base64-js/index.js - var require_base64_js = __commonJS({ - "node_modules/base64-js/index.js"(exports) { - "use strict"; - init_preact_shim(); - exports.byteLength = byteLength; - exports.toByteArray = toByteArray; - exports.fromByteArray = fromByteArray; - var lookup2 = []; - var revLookup = []; - var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array; - var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - for (i3 = 0, len = code.length; i3 < len; ++i3) { - lookup2[i3] = code[i3]; - revLookup[code.charCodeAt(i3)] = i3; - } - var i3; - var len; - revLookup["-".charCodeAt(0)] = 62; - revLookup["_".charCodeAt(0)] = 63; - function getLens(b64) { - var len2 = b64.length; - if (len2 % 4 > 0) { - throw new Error("Invalid string. Length must be a multiple of 4"); - } - var validLen = b64.indexOf("="); - if (validLen === -1) validLen = len2; - var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4; - return [validLen, placeHoldersLen]; - } - function byteLength(b64) { - var lens = getLens(b64); - var validLen = lens[0]; - var placeHoldersLen = lens[1]; - return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; - } - function _byteLength(b64, validLen, placeHoldersLen) { - return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; - } - function toByteArray(b64) { - var tmp; - var lens = getLens(b64); - var validLen = lens[0]; - var placeHoldersLen = lens[1]; - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)); - var curByte = 0; - var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen; - var i4; - for (i4 = 0; i4 < len2; i4 += 4) { - tmp = revLookup[b64.charCodeAt(i4)] << 18 | revLookup[b64.charCodeAt(i4 + 1)] << 12 | revLookup[b64.charCodeAt(i4 + 2)] << 6 | revLookup[b64.charCodeAt(i4 + 3)]; - arr[curByte++] = tmp >> 16 & 255; - arr[curByte++] = tmp >> 8 & 255; - arr[curByte++] = tmp & 255; - } - if (placeHoldersLen === 2) { - tmp = revLookup[b64.charCodeAt(i4)] << 2 | revLookup[b64.charCodeAt(i4 + 1)] >> 4; - arr[curByte++] = tmp & 255; - } - if (placeHoldersLen === 1) { - tmp = revLookup[b64.charCodeAt(i4)] << 10 | revLookup[b64.charCodeAt(i4 + 1)] << 4 | revLookup[b64.charCodeAt(i4 + 2)] >> 2; - arr[curByte++] = tmp >> 8 & 255; - arr[curByte++] = tmp & 255; - } - return arr; - } - function tripletToBase64(num) { - return lookup2[num >> 18 & 63] + lookup2[num >> 12 & 63] + lookup2[num >> 6 & 63] + lookup2[num & 63]; - } - function encodeChunk(uint8, start, end) { - var tmp; - var output = []; - for (var i4 = start; i4 < end; i4 += 3) { - tmp = (uint8[i4] << 16 & 16711680) + (uint8[i4 + 1] << 8 & 65280) + (uint8[i4 + 2] & 255); - output.push(tripletToBase64(tmp)); - } - return output.join(""); - } - function fromByteArray(uint8) { - var tmp; - var len2 = uint8.length; - var extraBytes = len2 % 3; - var parts = []; - var maxChunkLength = 16383; - for (var i4 = 0, len22 = len2 - extraBytes; i4 < len22; i4 += maxChunkLength) { - parts.push(encodeChunk(uint8, i4, i4 + maxChunkLength > len22 ? len22 : i4 + maxChunkLength)); - } - if (extraBytes === 1) { - tmp = uint8[len2 - 1]; - parts.push( - lookup2[tmp >> 2] + lookup2[tmp << 4 & 63] + "==" - ); - } else if (extraBytes === 2) { - tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1]; - parts.push( - lookup2[tmp >> 10] + lookup2[tmp >> 4 & 63] + lookup2[tmp << 2 & 63] + "=" - ); - } - return parts.join(""); - } - } - }); - - // node_modules/ieee754/index.js - var require_ieee754 = __commonJS({ - "node_modules/ieee754/index.js"(exports) { - init_preact_shim(); - exports.read = function(buffer, offset, isLE, mLen, nBytes) { - var e4, m3; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var nBits = -7; - var i3 = isLE ? nBytes - 1 : 0; - var d3 = isLE ? -1 : 1; - var s3 = buffer[offset + i3]; - i3 += d3; - e4 = s3 & (1 << -nBits) - 1; - s3 >>= -nBits; - nBits += eLen; - for (; nBits > 0; e4 = e4 * 256 + buffer[offset + i3], i3 += d3, nBits -= 8) { - } - m3 = e4 & (1 << -nBits) - 1; - e4 >>= -nBits; - nBits += mLen; - for (; nBits > 0; m3 = m3 * 256 + buffer[offset + i3], i3 += d3, nBits -= 8) { - } - if (e4 === 0) { - e4 = 1 - eBias; - } else if (e4 === eMax) { - return m3 ? NaN : (s3 ? -1 : 1) * Infinity; - } else { - m3 = m3 + Math.pow(2, mLen); - e4 = e4 - eBias; - } - return (s3 ? -1 : 1) * m3 * Math.pow(2, e4 - mLen); - }; - exports.write = function(buffer, value, offset, isLE, mLen, nBytes) { - var e4, m3, c3; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; - var i3 = isLE ? 0 : nBytes - 1; - var d3 = isLE ? 1 : -1; - var s3 = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; - value = Math.abs(value); - if (isNaN(value) || value === Infinity) { - m3 = isNaN(value) ? 1 : 0; - e4 = eMax; - } else { - e4 = Math.floor(Math.log(value) / Math.LN2); - if (value * (c3 = Math.pow(2, -e4)) < 1) { - e4--; - c3 *= 2; - } - if (e4 + eBias >= 1) { - value += rt / c3; - } else { - value += rt * Math.pow(2, 1 - eBias); - } - if (value * c3 >= 2) { - e4++; - c3 /= 2; - } - if (e4 + eBias >= eMax) { - m3 = 0; - e4 = eMax; - } else if (e4 + eBias >= 1) { - m3 = (value * c3 - 1) * Math.pow(2, mLen); - e4 = e4 + eBias; - } else { - m3 = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); - e4 = 0; - } - } - for (; mLen >= 8; buffer[offset + i3] = m3 & 255, i3 += d3, m3 /= 256, mLen -= 8) { - } - e4 = e4 << mLen | m3; - eLen += mLen; - for (; eLen > 0; buffer[offset + i3] = e4 & 255, i3 += d3, e4 /= 256, eLen -= 8) { + e4 = e4 << mLen | m3; + eLen += mLen; + for (; eLen > 0; buffer[offset + i3] = e4 & 255, i3 += d3, e4 /= 256, eLen -= 8) { } buffer[offset + i3 - d3] |= s3 * 128; }; @@ -1048,13 +622,13 @@ var base64 = require_base64_js(); var ieee754 = require_ieee754(); var customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null; - exports.Buffer = Buffer3; + exports.Buffer = Buffer4; exports.SlowBuffer = SlowBuffer; exports.INSPECT_MAX_BYTES = 50; var K_MAX_LENGTH = 2147483647; exports.kMaxLength = K_MAX_LENGTH; - Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport(); - if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") { + Buffer4.TYPED_ARRAY_SUPPORT = typedArraySupport(); + if (!Buffer4.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") { console.error( "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support." ); @@ -1072,17 +646,17 @@ return false; } } - Object.defineProperty(Buffer3.prototype, "parent", { + Object.defineProperty(Buffer4.prototype, "parent", { enumerable: true, get: function() { - if (!Buffer3.isBuffer(this)) return void 0; + if (!Buffer4.isBuffer(this)) return void 0; return this.buffer; } }); - Object.defineProperty(Buffer3.prototype, "offset", { + Object.defineProperty(Buffer4.prototype, "offset", { enumerable: true, get: function() { - if (!Buffer3.isBuffer(this)) return void 0; + if (!Buffer4.isBuffer(this)) return void 0; return this.byteOffset; } }); @@ -1091,10 +665,10 @@ throw new RangeError('The value "' + length + '" is invalid for option "size"'); } var buf = new Uint8Array(length); - Object.setPrototypeOf(buf, Buffer3.prototype); + Object.setPrototypeOf(buf, Buffer4.prototype); return buf; } - function Buffer3(arg, encodingOrOffset, length) { + function Buffer4(arg, encodingOrOffset, length) { if (typeof arg === "number") { if (typeof encodingOrOffset === "string") { throw new TypeError( @@ -1105,7 +679,7 @@ } return from(arg, encodingOrOffset, length); } - Buffer3.poolSize = 8192; + Buffer4.poolSize = 8192; function from(value, encodingOrOffset, length) { if (typeof value === "string") { return fromString(value, encodingOrOffset); @@ -1131,12 +705,12 @@ } var valueOf = value.valueOf && value.valueOf(); if (valueOf != null && valueOf !== value) { - return Buffer3.from(valueOf, encodingOrOffset, length); + return Buffer4.from(valueOf, encodingOrOffset, length); } var b3 = fromObject(value); if (b3) return b3; if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") { - return Buffer3.from( + return Buffer4.from( value[Symbol.toPrimitive]("string"), encodingOrOffset, length @@ -1146,11 +720,11 @@ "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value ); } - Buffer3.from = function(value, encodingOrOffset, length) { + Buffer4.from = function(value, encodingOrOffset, length) { return from(value, encodingOrOffset, length); }; - Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype); - Object.setPrototypeOf(Buffer3, Uint8Array); + Object.setPrototypeOf(Buffer4.prototype, Uint8Array.prototype); + Object.setPrototypeOf(Buffer4, Uint8Array); function assertSize(size) { if (typeof size !== "number") { throw new TypeError('"size" argument must be of type number'); @@ -1168,24 +742,24 @@ } return createBuffer(size); } - Buffer3.alloc = function(size, fill, encoding) { + Buffer4.alloc = function(size, fill, encoding) { return alloc(size, fill, encoding); }; function allocUnsafe(size) { assertSize(size); return createBuffer(size < 0 ? 0 : checked(size) | 0); } - Buffer3.allocUnsafe = function(size) { + Buffer4.allocUnsafe = function(size) { return allocUnsafe(size); }; - Buffer3.allocUnsafeSlow = function(size) { + Buffer4.allocUnsafeSlow = function(size) { return allocUnsafe(size); }; function fromString(string, encoding) { if (typeof encoding !== "string" || encoding === "") { encoding = "utf8"; } - if (!Buffer3.isEncoding(encoding)) { + if (!Buffer4.isEncoding(encoding)) { throw new TypeError("Unknown encoding: " + encoding); } var length = byteLength(string, encoding) | 0; @@ -1226,11 +800,11 @@ } else { buf = new Uint8Array(array, byteOffset, length); } - Object.setPrototypeOf(buf, Buffer3.prototype); + Object.setPrototypeOf(buf, Buffer4.prototype); return buf; } function fromObject(obj) { - if (Buffer3.isBuffer(obj)) { + if (Buffer4.isBuffer(obj)) { var len = checked(obj.length) | 0; var buf = createBuffer(len); if (buf.length === 0) { @@ -1259,15 +833,15 @@ if (+length != length) { length = 0; } - return Buffer3.alloc(+length); + return Buffer4.alloc(+length); } - Buffer3.isBuffer = function isBuffer(b3) { - return b3 != null && b3._isBuffer === true && b3 !== Buffer3.prototype; + Buffer4.isBuffer = function isBuffer(b3) { + return b3 != null && b3._isBuffer === true && b3 !== Buffer4.prototype; }; - Buffer3.compare = function compare(a3, b3) { - if (isInstance(a3, Uint8Array)) a3 = Buffer3.from(a3, a3.offset, a3.byteLength); - if (isInstance(b3, Uint8Array)) b3 = Buffer3.from(b3, b3.offset, b3.byteLength); - if (!Buffer3.isBuffer(a3) || !Buffer3.isBuffer(b3)) { + Buffer4.compare = function compare(a3, b3) { + if (isInstance(a3, Uint8Array)) a3 = Buffer4.from(a3, a3.offset, a3.byteLength); + if (isInstance(b3, Uint8Array)) b3 = Buffer4.from(b3, b3.offset, b3.byteLength); + if (!Buffer4.isBuffer(a3) || !Buffer4.isBuffer(b3)) { throw new TypeError( 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' ); @@ -1286,7 +860,7 @@ if (y3 < x3) return 1; return 0; }; - Buffer3.isEncoding = function isEncoding(encoding) { + Buffer4.isEncoding = function isEncoding(encoding) { switch (String(encoding).toLowerCase()) { case "hex": case "utf8": @@ -1304,12 +878,12 @@ return false; } }; - Buffer3.concat = function concat2(list, length) { + Buffer4.concat = function concat2(list, length) { if (!Array.isArray(list)) { throw new TypeError('"list" argument must be an Array of Buffers'); } if (list.length === 0) { - return Buffer3.alloc(0); + return Buffer4.alloc(0); } var i3; if (length === void 0) { @@ -1318,13 +892,13 @@ length += list[i3].length; } } - var buffer = Buffer3.allocUnsafe(length); + var buffer = Buffer4.allocUnsafe(length); var pos = 0; for (i3 = 0; i3 < list.length; ++i3) { var buf = list[i3]; if (isInstance(buf, Uint8Array)) { if (pos + buf.length > buffer.length) { - Buffer3.from(buf).copy(buffer, pos); + Buffer4.from(buf).copy(buffer, pos); } else { Uint8Array.prototype.set.call( buffer, @@ -1332,7 +906,7 @@ pos ); } - } else if (!Buffer3.isBuffer(buf)) { + } else if (!Buffer4.isBuffer(buf)) { throw new TypeError('"list" argument must be an Array of Buffers'); } else { buf.copy(buffer, pos); @@ -1342,7 +916,7 @@ return buffer; }; function byteLength(string, encoding) { - if (Buffer3.isBuffer(string)) { + if (Buffer4.isBuffer(string)) { return string.length; } if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { @@ -1384,7 +958,7 @@ } } } - Buffer3.byteLength = byteLength; + Buffer4.byteLength = byteLength; function slowToString(encoding, start, end) { var loweredCase = false; if (start === void 0 || start < 0) { @@ -1431,13 +1005,13 @@ } } } - Buffer3.prototype._isBuffer = true; + Buffer4.prototype._isBuffer = true; function swap(b3, n2, m3) { var i3 = b3[n2]; b3[n2] = b3[m3]; b3[m3] = i3; } - Buffer3.prototype.swap16 = function swap16() { + Buffer4.prototype.swap16 = function swap16() { var len = this.length; if (len % 2 !== 0) { throw new RangeError("Buffer size must be a multiple of 16-bits"); @@ -1447,7 +1021,7 @@ } return this; }; - Buffer3.prototype.swap32 = function swap32() { + Buffer4.prototype.swap32 = function swap32() { var len = this.length; if (len % 4 !== 0) { throw new RangeError("Buffer size must be a multiple of 32-bits"); @@ -1458,7 +1032,7 @@ } return this; }; - Buffer3.prototype.swap64 = function swap64() { + Buffer4.prototype.swap64 = function swap64() { var len = this.length; if (len % 8 !== 0) { throw new RangeError("Buffer size must be a multiple of 64-bits"); @@ -1471,19 +1045,19 @@ } return this; }; - Buffer3.prototype.toString = function toString() { + Buffer4.prototype.toString = function toString() { var length = this.length; if (length === 0) return ""; if (arguments.length === 0) return utf8Slice(this, 0, length); return slowToString.apply(this, arguments); }; - Buffer3.prototype.toLocaleString = Buffer3.prototype.toString; - Buffer3.prototype.equals = function equals(b3) { - if (!Buffer3.isBuffer(b3)) throw new TypeError("Argument must be a Buffer"); + Buffer4.prototype.toLocaleString = Buffer4.prototype.toString; + Buffer4.prototype.equals = function equals(b3) { + if (!Buffer4.isBuffer(b3)) throw new TypeError("Argument must be a Buffer"); if (this === b3) return true; - return Buffer3.compare(this, b3) === 0; + return Buffer4.compare(this, b3) === 0; }; - Buffer3.prototype.inspect = function inspect() { + Buffer4.prototype.inspect = function inspect() { var str = ""; var max = exports.INSPECT_MAX_BYTES; str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim(); @@ -1491,13 +1065,13 @@ return ""; }; if (customInspectSymbol) { - Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect; + Buffer4.prototype[customInspectSymbol] = Buffer4.prototype.inspect; } - Buffer3.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { + Buffer4.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { if (isInstance(target, Uint8Array)) { - target = Buffer3.from(target, target.offset, target.byteLength); + target = Buffer4.from(target, target.offset, target.byteLength); } - if (!Buffer3.isBuffer(target)) { + if (!Buffer4.isBuffer(target)) { throw new TypeError( 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target ); @@ -1570,9 +1144,9 @@ else return -1; } if (typeof val === "string") { - val = Buffer3.from(val, encoding); + val = Buffer4.from(val, encoding); } - if (Buffer3.isBuffer(val)) { + if (Buffer4.isBuffer(val)) { if (val.length === 0) { return -1; } @@ -1640,13 +1214,13 @@ } return -1; } - Buffer3.prototype.includes = function includes(val, byteOffset, encoding) { + Buffer4.prototype.includes = function includes(val, byteOffset, encoding) { return this.indexOf(val, byteOffset, encoding) !== -1; }; - Buffer3.prototype.indexOf = function indexOf(val, byteOffset, encoding) { + Buffer4.prototype.indexOf = function indexOf(val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, true); }; - Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { + Buffer4.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, false); }; function hexWrite(buf, string, offset, length) { @@ -1683,7 +1257,7 @@ function ucs2Write(buf, string, offset, length) { return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length); } - Buffer3.prototype.write = function write(string, offset, length, encoding) { + Buffer4.prototype.write = function write(string, offset, length, encoding) { if (offset === void 0) { encoding = "utf8"; length = this.length; @@ -1738,7 +1312,7 @@ } } }; - Buffer3.prototype.toJSON = function toJSON() { + Buffer4.prototype.toJSON = function toJSON() { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) @@ -1861,7 +1435,7 @@ } return res; } - Buffer3.prototype.slice = function slice(start, end) { + Buffer4.prototype.slice = function slice(start, end) { var len = this.length; start = ~~start; end = end === void 0 ? len : ~~end; @@ -1879,14 +1453,14 @@ } if (end < start) end = start; var newBuf = this.subarray(start, end); - Object.setPrototypeOf(newBuf, Buffer3.prototype); + Object.setPrototypeOf(newBuf, Buffer4.prototype); return newBuf; }; function checkOffset(offset, ext, length) { if (offset % 1 !== 0 || offset < 0) throw new RangeError("offset is not uint"); if (offset + ext > length) throw new RangeError("Trying to access beyond buffer length"); } - Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) { + Buffer4.prototype.readUintLE = Buffer4.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) { offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; if (!noAssert) checkOffset(offset, byteLength2, this.length); @@ -1898,7 +1472,7 @@ } return val; }; - Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) { + Buffer4.prototype.readUintBE = Buffer4.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) { offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; if (!noAssert) { @@ -1911,32 +1485,32 @@ } return val; }; - Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = function readUInt8(offset, noAssert) { + Buffer4.prototype.readUint8 = Buffer4.prototype.readUInt8 = function readUInt8(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 1, this.length); return this[offset]; }; - Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { + Buffer4.prototype.readUint16LE = Buffer4.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); return this[offset] | this[offset + 1] << 8; }; - Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { + Buffer4.prototype.readUint16BE = Buffer4.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); return this[offset] << 8 | this[offset + 1]; }; - Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { + Buffer4.prototype.readUint32LE = Buffer4.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216; }; - Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { + Buffer4.prototype.readUint32BE = Buffer4.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); }; - Buffer3.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) { + Buffer4.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) { offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; if (!noAssert) checkOffset(offset, byteLength2, this.length); @@ -1950,7 +1524,7 @@ if (val >= mul) val -= Math.pow(2, 8 * byteLength2); return val; }; - Buffer3.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) { + Buffer4.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) { offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; if (!noAssert) checkOffset(offset, byteLength2, this.length); @@ -1964,60 +1538,60 @@ if (val >= mul) val -= Math.pow(2, 8 * byteLength2); return val; }; - Buffer3.prototype.readInt8 = function readInt8(offset, noAssert) { + Buffer4.prototype.readInt8 = function readInt8(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 1, this.length); if (!(this[offset] & 128)) return this[offset]; return (255 - this[offset] + 1) * -1; }; - Buffer3.prototype.readInt16LE = function readInt16LE(offset, noAssert) { + Buffer4.prototype.readInt16LE = function readInt16LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); var val = this[offset] | this[offset + 1] << 8; return val & 32768 ? val | 4294901760 : val; }; - Buffer3.prototype.readInt16BE = function readInt16BE(offset, noAssert) { + Buffer4.prototype.readInt16BE = function readInt16BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); var val = this[offset + 1] | this[offset] << 8; return val & 32768 ? val | 4294901760 : val; }; - Buffer3.prototype.readInt32LE = function readInt32LE(offset, noAssert) { + Buffer4.prototype.readInt32LE = function readInt32LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; }; - Buffer3.prototype.readInt32BE = function readInt32BE(offset, noAssert) { + Buffer4.prototype.readInt32BE = function readInt32BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; }; - Buffer3.prototype.readFloatLE = function readFloatLE(offset, noAssert) { + Buffer4.prototype.readFloatLE = function readFloatLE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return ieee754.read(this, offset, true, 23, 4); }; - Buffer3.prototype.readFloatBE = function readFloatBE(offset, noAssert) { + Buffer4.prototype.readFloatBE = function readFloatBE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return ieee754.read(this, offset, false, 23, 4); }; - Buffer3.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { + Buffer4.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 8, this.length); return ieee754.read(this, offset, true, 52, 8); }; - Buffer3.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { + Buffer4.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 8, this.length); return ieee754.read(this, offset, false, 52, 8); }; function checkInt(buf, value, offset, ext, max, min) { - if (!Buffer3.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance'); + if (!Buffer4.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance'); if (value > max || value < min) throw new RangeError('"value" argument is out of bounds'); if (offset + ext > buf.length) throw new RangeError("Index out of range"); } - Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) { + Buffer4.prototype.writeUintLE = Buffer4.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) { value = +value; offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; @@ -2033,7 +1607,7 @@ } return offset + byteLength2; }; - Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) { + Buffer4.prototype.writeUintBE = Buffer4.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) { value = +value; offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; @@ -2049,14 +1623,14 @@ } return offset + byteLength2; }; - Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { + Buffer4.prototype.writeUint8 = Buffer4.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 1, 255, 0); this[offset] = value & 255; return offset + 1; }; - Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { + Buffer4.prototype.writeUint16LE = Buffer4.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 2, 65535, 0); @@ -2064,7 +1638,7 @@ this[offset + 1] = value >>> 8; return offset + 2; }; - Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { + Buffer4.prototype.writeUint16BE = Buffer4.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 2, 65535, 0); @@ -2072,7 +1646,7 @@ this[offset + 1] = value & 255; return offset + 2; }; - Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { + Buffer4.prototype.writeUint32LE = Buffer4.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0); @@ -2082,7 +1656,7 @@ this[offset] = value & 255; return offset + 4; }; - Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { + Buffer4.prototype.writeUint32BE = Buffer4.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0); @@ -2092,7 +1666,7 @@ this[offset + 3] = value & 255; return offset + 4; }; - Buffer3.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) { + Buffer4.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { @@ -2111,7 +1685,7 @@ } return offset + byteLength2; }; - Buffer3.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) { + Buffer4.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { @@ -2126,289 +1700,715 @@ if (value < 0 && sub === 0 && this[offset + i3 + 1] !== 0) { sub = 1; } - this[offset + i3] = (value / mul >> 0) - sub & 255; + this[offset + i3] = (value / mul >> 0) - sub & 255; + } + return offset + byteLength2; + }; + Buffer4.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 1, 127, -128); + if (value < 0) value = 255 + value + 1; + this[offset] = value & 255; + return offset + 1; + }; + Buffer4.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768); + this[offset] = value & 255; + this[offset + 1] = value >>> 8; + return offset + 2; + }; + Buffer4.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768); + this[offset] = value >>> 8; + this[offset + 1] = value & 255; + return offset + 2; + }; + Buffer4.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648); + this[offset] = value & 255; + this[offset + 1] = value >>> 8; + this[offset + 2] = value >>> 16; + this[offset + 3] = value >>> 24; + return offset + 4; + }; + Buffer4.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648); + if (value < 0) value = 4294967295 + value + 1; + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 255; + return offset + 4; + }; + function checkIEEE754(buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError("Index out of range"); + if (offset < 0) throw new RangeError("Index out of range"); + } + function writeFloat(buf, value, offset, littleEndian, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 34028234663852886e22, -34028234663852886e22); + } + ieee754.write(buf, value, offset, littleEndian, 23, 4); + return offset + 4; + } + Buffer4.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert); + }; + Buffer4.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert); + }; + function writeDouble(buf, value, offset, littleEndian, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 17976931348623157e292, -17976931348623157e292); + } + ieee754.write(buf, value, offset, littleEndian, 52, 8); + return offset + 8; + } + Buffer4.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert); + }; + Buffer4.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert); + }; + Buffer4.prototype.copy = function copy(target, targetStart, start, end) { + if (!Buffer4.isBuffer(target)) throw new TypeError("argument should be a Buffer"); + if (!start) start = 0; + if (!end && end !== 0) end = this.length; + if (targetStart >= target.length) targetStart = target.length; + if (!targetStart) targetStart = 0; + if (end > 0 && end < start) end = start; + if (end === start) return 0; + if (target.length === 0 || this.length === 0) return 0; + if (targetStart < 0) { + throw new RangeError("targetStart out of bounds"); + } + if (start < 0 || start >= this.length) throw new RangeError("Index out of range"); + if (end < 0) throw new RangeError("sourceEnd out of bounds"); + if (end > this.length) end = this.length; + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start; + } + var len = end - start; + if (this === target && typeof Uint8Array.prototype.copyWithin === "function") { + this.copyWithin(targetStart, start, end); + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ); + } + return len; + }; + Buffer4.prototype.fill = function fill(val, start, end, encoding) { + if (typeof val === "string") { + if (typeof start === "string") { + encoding = start; + start = 0; + end = this.length; + } else if (typeof end === "string") { + encoding = end; + end = this.length; + } + if (encoding !== void 0 && typeof encoding !== "string") { + throw new TypeError("encoding must be a string"); + } + if (typeof encoding === "string" && !Buffer4.isEncoding(encoding)) { + throw new TypeError("Unknown encoding: " + encoding); + } + if (val.length === 1) { + var code = val.charCodeAt(0); + if (encoding === "utf8" && code < 128 || encoding === "latin1") { + val = code; + } + } + } else if (typeof val === "number") { + val = val & 255; + } else if (typeof val === "boolean") { + val = Number(val); + } + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError("Out of range index"); + } + if (end <= start) { + return this; + } + start = start >>> 0; + end = end === void 0 ? this.length : end >>> 0; + if (!val) val = 0; + var i3; + if (typeof val === "number") { + for (i3 = start; i3 < end; ++i3) { + this[i3] = val; + } + } else { + var bytes = Buffer4.isBuffer(val) ? val : Buffer4.from(val, encoding); + var len = bytes.length; + if (len === 0) { + throw new TypeError('The value "' + val + '" is invalid for argument "value"'); + } + for (i3 = 0; i3 < end - start; ++i3) { + this[i3 + start] = bytes[i3 % len]; + } + } + return this; + }; + var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g; + function base64clean(str) { + str = str.split("=")[0]; + str = str.trim().replace(INVALID_BASE64_RE, ""); + if (str.length < 2) return ""; + while (str.length % 4 !== 0) { + str = str + "="; + } + return str; + } + function utf8ToBytes(string, units) { + units = units || Infinity; + var codePoint; + var length = string.length; + var leadSurrogate = null; + var bytes = []; + for (var i3 = 0; i3 < length; ++i3) { + codePoint = string.charCodeAt(i3); + if (codePoint > 55295 && codePoint < 57344) { + if (!leadSurrogate) { + if (codePoint > 56319) { + if ((units -= 3) > -1) bytes.push(239, 191, 189); + continue; + } else if (i3 + 1 === length) { + if ((units -= 3) > -1) bytes.push(239, 191, 189); + continue; + } + leadSurrogate = codePoint; + continue; + } + if (codePoint < 56320) { + if ((units -= 3) > -1) bytes.push(239, 191, 189); + leadSurrogate = codePoint; + continue; + } + codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536; + } else if (leadSurrogate) { + if ((units -= 3) > -1) bytes.push(239, 191, 189); + } + leadSurrogate = null; + if (codePoint < 128) { + if ((units -= 1) < 0) break; + bytes.push(codePoint); + } else if (codePoint < 2048) { + if ((units -= 2) < 0) break; + bytes.push( + codePoint >> 6 | 192, + codePoint & 63 | 128 + ); + } else if (codePoint < 65536) { + if ((units -= 3) < 0) break; + bytes.push( + codePoint >> 12 | 224, + codePoint >> 6 & 63 | 128, + codePoint & 63 | 128 + ); + } else if (codePoint < 1114112) { + if ((units -= 4) < 0) break; + bytes.push( + codePoint >> 18 | 240, + codePoint >> 12 & 63 | 128, + codePoint >> 6 & 63 | 128, + codePoint & 63 | 128 + ); + } else { + throw new Error("Invalid code point"); + } } - return offset + byteLength2; - }; - Buffer3.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { - value = +value; - offset = offset >>> 0; - if (!noAssert) checkInt(this, value, offset, 1, 127, -128); - if (value < 0) value = 255 + value + 1; - this[offset] = value & 255; - return offset + 1; - }; - Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { - value = +value; - offset = offset >>> 0; - if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768); - this[offset] = value & 255; - this[offset + 1] = value >>> 8; - return offset + 2; - }; - Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { - value = +value; - offset = offset >>> 0; - if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768); - this[offset] = value >>> 8; - this[offset + 1] = value & 255; - return offset + 2; - }; - Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { - value = +value; - offset = offset >>> 0; - if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648); - this[offset] = value & 255; - this[offset + 1] = value >>> 8; - this[offset + 2] = value >>> 16; - this[offset + 3] = value >>> 24; - return offset + 4; - }; - Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { - value = +value; - offset = offset >>> 0; - if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648); - if (value < 0) value = 4294967295 + value + 1; - this[offset] = value >>> 24; - this[offset + 1] = value >>> 16; - this[offset + 2] = value >>> 8; - this[offset + 3] = value & 255; - return offset + 4; - }; - function checkIEEE754(buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError("Index out of range"); - if (offset < 0) throw new RangeError("Index out of range"); + return bytes; } - function writeFloat(buf, value, offset, littleEndian, noAssert) { - value = +value; - offset = offset >>> 0; - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 34028234663852886e22, -34028234663852886e22); + function asciiToBytes(str) { + var byteArray = []; + for (var i3 = 0; i3 < str.length; ++i3) { + byteArray.push(str.charCodeAt(i3) & 255); } - ieee754.write(buf, value, offset, littleEndian, 23, 4); - return offset + 4; + return byteArray; } - Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert); - }; - Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert); - }; - function writeDouble(buf, value, offset, littleEndian, noAssert) { - value = +value; - offset = offset >>> 0; - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 17976931348623157e292, -17976931348623157e292); + function utf16leToBytes(str, units) { + var c3, hi, lo; + var byteArray = []; + for (var i3 = 0; i3 < str.length; ++i3) { + if ((units -= 2) < 0) break; + c3 = str.charCodeAt(i3); + hi = c3 >> 8; + lo = c3 % 256; + byteArray.push(lo); + byteArray.push(hi); } - ieee754.write(buf, value, offset, littleEndian, 52, 8); - return offset + 8; + return byteArray; } - Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert); - }; - Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert); - }; - Buffer3.prototype.copy = function copy(target, targetStart, start, end) { - if (!Buffer3.isBuffer(target)) throw new TypeError("argument should be a Buffer"); - if (!start) start = 0; - if (!end && end !== 0) end = this.length; - if (targetStart >= target.length) targetStart = target.length; - if (!targetStart) targetStart = 0; - if (end > 0 && end < start) end = start; - if (end === start) return 0; - if (target.length === 0 || this.length === 0) return 0; - if (targetStart < 0) { - throw new RangeError("targetStart out of bounds"); + function base64ToBytes(str) { + return base64.toByteArray(base64clean(str)); + } + function blitBuffer(src, dst, offset, length) { + for (var i3 = 0; i3 < length; ++i3) { + if (i3 + offset >= dst.length || i3 >= src.length) break; + dst[i3 + offset] = src[i3]; } - if (start < 0 || start >= this.length) throw new RangeError("Index out of range"); - if (end < 0) throw new RangeError("sourceEnd out of bounds"); - if (end > this.length) end = this.length; - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start; + return i3; + } + function isInstance(obj, type) { + return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name; + } + function numberIsNaN(obj) { + return obj !== obj; + } + var hexSliceLookupTable = function() { + var alphabet2 = "0123456789abcdef"; + var table = new Array(256); + for (var i3 = 0; i3 < 16; ++i3) { + var i16 = i3 * 16; + for (var j4 = 0; j4 < 16; ++j4) { + table[i16 + j4] = alphabet2[i3] + alphabet2[j4]; + } } - var len = end - start; - if (this === target && typeof Uint8Array.prototype.copyWithin === "function") { - this.copyWithin(targetStart, start, end); - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, end), - targetStart - ); + return table; + }(); + } + }); + + // (disabled):fs + var require_fs = __commonJS({ + "(disabled):fs"() { + init_preact_shim(); + } + }); + + // node_modules/path-browserify/index.js + var require_path_browserify = __commonJS({ + "node_modules/path-browserify/index.js"(exports, module) { + "use strict"; + init_preact_shim(); + function assertPath(path2) { + if (typeof path2 !== "string") { + throw new TypeError("Path must be a string. Received " + JSON.stringify(path2)); } - return len; - }; - Buffer3.prototype.fill = function fill(val, start, end, encoding) { - if (typeof val === "string") { - if (typeof start === "string") { - encoding = start; - start = 0; - end = this.length; - } else if (typeof end === "string") { - encoding = end; - end = this.length; + } + function normalizeStringPosix(path2, allowAboveRoot) { + var res = ""; + var lastSegmentLength = 0; + var lastSlash = -1; + var dots = 0; + var code; + for (var i3 = 0; i3 <= path2.length; ++i3) { + if (i3 < path2.length) + code = path2.charCodeAt(i3); + else if (code === 47) + break; + else + code = 47; + if (code === 47) { + if (lastSlash === i3 - 1 || dots === 1) { + } else if (lastSlash !== i3 - 1 && dots === 2) { + if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) { + if (res.length > 2) { + var lastSlashIndex = res.lastIndexOf("/"); + if (lastSlashIndex !== res.length - 1) { + if (lastSlashIndex === -1) { + res = ""; + lastSegmentLength = 0; + } else { + res = res.slice(0, lastSlashIndex); + lastSegmentLength = res.length - 1 - res.lastIndexOf("/"); + } + lastSlash = i3; + dots = 0; + continue; + } + } else if (res.length === 2 || res.length === 1) { + res = ""; + lastSegmentLength = 0; + lastSlash = i3; + dots = 0; + continue; + } + } + if (allowAboveRoot) { + if (res.length > 0) + res += "/.."; + else + res = ".."; + lastSegmentLength = 2; + } + } else { + if (res.length > 0) + res += "/" + path2.slice(lastSlash + 1, i3); + else + res = path2.slice(lastSlash + 1, i3); + lastSegmentLength = i3 - lastSlash - 1; + } + lastSlash = i3; + dots = 0; + } else if (code === 46 && dots !== -1) { + ++dots; + } else { + dots = -1; + } + } + return res; + } + function _format(sep, pathObject) { + var dir = pathObject.dir || pathObject.root; + var base = pathObject.base || (pathObject.name || "") + (pathObject.ext || ""); + if (!dir) { + return base; + } + if (dir === pathObject.root) { + return dir + base; + } + return dir + sep + base; + } + var posix = { + // path.resolve([from ...], to) + resolve: function resolve() { + var resolvedPath = ""; + var resolvedAbsolute = false; + var cwd; + for (var i3 = arguments.length - 1; i3 >= -1 && !resolvedAbsolute; i3--) { + var path2; + if (i3 >= 0) + path2 = arguments[i3]; + else { + if (cwd === void 0) + cwd = process.cwd(); + path2 = cwd; + } + assertPath(path2); + if (path2.length === 0) { + continue; + } + resolvedPath = path2 + "/" + resolvedPath; + resolvedAbsolute = path2.charCodeAt(0) === 47; } - if (encoding !== void 0 && typeof encoding !== "string") { - throw new TypeError("encoding must be a string"); + resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute); + if (resolvedAbsolute) { + if (resolvedPath.length > 0) + return "/" + resolvedPath; + else + return "/"; + } else if (resolvedPath.length > 0) { + return resolvedPath; + } else { + return "."; } - if (typeof encoding === "string" && !Buffer3.isEncoding(encoding)) { - throw new TypeError("Unknown encoding: " + encoding); + }, + normalize: function normalize(path2) { + assertPath(path2); + if (path2.length === 0) return "."; + var isAbsolute = path2.charCodeAt(0) === 47; + var trailingSeparator = path2.charCodeAt(path2.length - 1) === 47; + path2 = normalizeStringPosix(path2, !isAbsolute); + if (path2.length === 0 && !isAbsolute) path2 = "."; + if (path2.length > 0 && trailingSeparator) path2 += "/"; + if (isAbsolute) return "/" + path2; + return path2; + }, + isAbsolute: function isAbsolute(path2) { + assertPath(path2); + return path2.length > 0 && path2.charCodeAt(0) === 47; + }, + join: function join() { + if (arguments.length === 0) + return "."; + var joined; + for (var i3 = 0; i3 < arguments.length; ++i3) { + var arg = arguments[i3]; + assertPath(arg); + if (arg.length > 0) { + if (joined === void 0) + joined = arg; + else + joined += "/" + arg; + } } - if (val.length === 1) { - var code = val.charCodeAt(0); - if (encoding === "utf8" && code < 128 || encoding === "latin1") { - val = code; + if (joined === void 0) + return "."; + return posix.normalize(joined); + }, + relative: function relative(from, to) { + assertPath(from); + assertPath(to); + if (from === to) return ""; + from = posix.resolve(from); + to = posix.resolve(to); + if (from === to) return ""; + var fromStart = 1; + for (; fromStart < from.length; ++fromStart) { + if (from.charCodeAt(fromStart) !== 47) + break; + } + var fromEnd = from.length; + var fromLen = fromEnd - fromStart; + var toStart = 1; + for (; toStart < to.length; ++toStart) { + if (to.charCodeAt(toStart) !== 47) + break; + } + var toEnd = to.length; + var toLen = toEnd - toStart; + var length = fromLen < toLen ? fromLen : toLen; + var lastCommonSep = -1; + var i3 = 0; + for (; i3 <= length; ++i3) { + if (i3 === length) { + if (toLen > length) { + if (to.charCodeAt(toStart + i3) === 47) { + return to.slice(toStart + i3 + 1); + } else if (i3 === 0) { + return to.slice(toStart + i3); + } + } else if (fromLen > length) { + if (from.charCodeAt(fromStart + i3) === 47) { + lastCommonSep = i3; + } else if (i3 === 0) { + lastCommonSep = 0; + } + } + break; } + var fromCode = from.charCodeAt(fromStart + i3); + var toCode = to.charCodeAt(toStart + i3); + if (fromCode !== toCode) + break; + else if (fromCode === 47) + lastCommonSep = i3; } - } else if (typeof val === "number") { - val = val & 255; - } else if (typeof val === "boolean") { - val = Number(val); - } - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError("Out of range index"); - } - if (end <= start) { - return this; - } - start = start >>> 0; - end = end === void 0 ? this.length : end >>> 0; - if (!val) val = 0; - var i3; - if (typeof val === "number") { - for (i3 = start; i3 < end; ++i3) { - this[i3] = val; + var out = ""; + for (i3 = fromStart + lastCommonSep + 1; i3 <= fromEnd; ++i3) { + if (i3 === fromEnd || from.charCodeAt(i3) === 47) { + if (out.length === 0) + out += ".."; + else + out += "/.."; + } } - } else { - var bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding); - var len = bytes.length; - if (len === 0) { - throw new TypeError('The value "' + val + '" is invalid for argument "value"'); + if (out.length > 0) + return out + to.slice(toStart + lastCommonSep); + else { + toStart += lastCommonSep; + if (to.charCodeAt(toStart) === 47) + ++toStart; + return to.slice(toStart); + } + }, + _makeLong: function _makeLong(path2) { + return path2; + }, + dirname: function dirname(path2) { + assertPath(path2); + if (path2.length === 0) return "."; + var code = path2.charCodeAt(0); + var hasRoot = code === 47; + var end = -1; + var matchedSlash = true; + for (var i3 = path2.length - 1; i3 >= 1; --i3) { + code = path2.charCodeAt(i3); + if (code === 47) { + if (!matchedSlash) { + end = i3; + break; + } + } else { + matchedSlash = false; + } + } + if (end === -1) return hasRoot ? "/" : "."; + if (hasRoot && end === 1) return "//"; + return path2.slice(0, end); + }, + basename: function basename(path2, ext) { + if (ext !== void 0 && typeof ext !== "string") throw new TypeError('"ext" argument must be a string'); + assertPath(path2); + var start = 0; + var end = -1; + var matchedSlash = true; + var i3; + if (ext !== void 0 && ext.length > 0 && ext.length <= path2.length) { + if (ext.length === path2.length && ext === path2) return ""; + var extIdx = ext.length - 1; + var firstNonSlashEnd = -1; + for (i3 = path2.length - 1; i3 >= 0; --i3) { + var code = path2.charCodeAt(i3); + if (code === 47) { + if (!matchedSlash) { + start = i3 + 1; + break; + } + } else { + if (firstNonSlashEnd === -1) { + matchedSlash = false; + firstNonSlashEnd = i3 + 1; + } + if (extIdx >= 0) { + if (code === ext.charCodeAt(extIdx)) { + if (--extIdx === -1) { + end = i3; + } + } else { + extIdx = -1; + end = firstNonSlashEnd; + } + } + } + } + if (start === end) end = firstNonSlashEnd; + else if (end === -1) end = path2.length; + return path2.slice(start, end); + } else { + for (i3 = path2.length - 1; i3 >= 0; --i3) { + if (path2.charCodeAt(i3) === 47) { + if (!matchedSlash) { + start = i3 + 1; + break; + } + } else if (end === -1) { + matchedSlash = false; + end = i3 + 1; + } + } + if (end === -1) return ""; + return path2.slice(start, end); + } + }, + extname: function extname(path2) { + assertPath(path2); + var startDot = -1; + var startPart = 0; + var end = -1; + var matchedSlash = true; + var preDotState = 0; + for (var i3 = path2.length - 1; i3 >= 0; --i3) { + var code = path2.charCodeAt(i3); + if (code === 47) { + if (!matchedSlash) { + startPart = i3 + 1; + break; + } + continue; + } + if (end === -1) { + matchedSlash = false; + end = i3 + 1; + } + if (code === 46) { + if (startDot === -1) + startDot = i3; + else if (preDotState !== 1) + preDotState = 1; + } else if (startDot !== -1) { + preDotState = -1; + } + } + if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + return ""; + } + return path2.slice(startDot, end); + }, + format: function format(pathObject) { + if (pathObject === null || typeof pathObject !== "object") { + throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject); } - for (i3 = 0; i3 < end - start; ++i3) { - this[i3 + start] = bytes[i3 % len]; + return _format("/", pathObject); + }, + parse: function parse(path2) { + assertPath(path2); + var ret = { root: "", dir: "", base: "", ext: "", name: "" }; + if (path2.length === 0) return ret; + var code = path2.charCodeAt(0); + var isAbsolute = code === 47; + var start; + if (isAbsolute) { + ret.root = "/"; + start = 1; + } else { + start = 0; } - } - return this; - }; - var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g; - function base64clean(str) { - str = str.split("=")[0]; - str = str.trim().replace(INVALID_BASE64_RE, ""); - if (str.length < 2) return ""; - while (str.length % 4 !== 0) { - str = str + "="; - } - return str; - } - function utf8ToBytes(string, units) { - units = units || Infinity; - var codePoint; - var length = string.length; - var leadSurrogate = null; - var bytes = []; - for (var i3 = 0; i3 < length; ++i3) { - codePoint = string.charCodeAt(i3); - if (codePoint > 55295 && codePoint < 57344) { - if (!leadSurrogate) { - if (codePoint > 56319) { - if ((units -= 3) > -1) bytes.push(239, 191, 189); - continue; - } else if (i3 + 1 === length) { - if ((units -= 3) > -1) bytes.push(239, 191, 189); - continue; + var startDot = -1; + var startPart = 0; + var end = -1; + var matchedSlash = true; + var i3 = path2.length - 1; + var preDotState = 0; + for (; i3 >= start; --i3) { + code = path2.charCodeAt(i3); + if (code === 47) { + if (!matchedSlash) { + startPart = i3 + 1; + break; } - leadSurrogate = codePoint; continue; } - if (codePoint < 56320) { - if ((units -= 3) > -1) bytes.push(239, 191, 189); - leadSurrogate = codePoint; - continue; + if (end === -1) { + matchedSlash = false; + end = i3 + 1; + } + if (code === 46) { + if (startDot === -1) startDot = i3; + else if (preDotState !== 1) preDotState = 1; + } else if (startDot !== -1) { + preDotState = -1; } - codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536; - } else if (leadSurrogate) { - if ((units -= 3) > -1) bytes.push(239, 191, 189); } - leadSurrogate = null; - if (codePoint < 128) { - if ((units -= 1) < 0) break; - bytes.push(codePoint); - } else if (codePoint < 2048) { - if ((units -= 2) < 0) break; - bytes.push( - codePoint >> 6 | 192, - codePoint & 63 | 128 - ); - } else if (codePoint < 65536) { - if ((units -= 3) < 0) break; - bytes.push( - codePoint >> 12 | 224, - codePoint >> 6 & 63 | 128, - codePoint & 63 | 128 - ); - } else if (codePoint < 1114112) { - if ((units -= 4) < 0) break; - bytes.push( - codePoint >> 18 | 240, - codePoint >> 12 & 63 | 128, - codePoint >> 6 & 63 | 128, - codePoint & 63 | 128 - ); + if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + if (end !== -1) { + if (startPart === 0 && isAbsolute) ret.base = ret.name = path2.slice(1, end); + else ret.base = ret.name = path2.slice(startPart, end); + } } else { - throw new Error("Invalid code point"); - } - } - return bytes; - } - function asciiToBytes(str) { - var byteArray = []; - for (var i3 = 0; i3 < str.length; ++i3) { - byteArray.push(str.charCodeAt(i3) & 255); - } - return byteArray; - } - function utf16leToBytes(str, units) { - var c3, hi, lo; - var byteArray = []; - for (var i3 = 0; i3 < str.length; ++i3) { - if ((units -= 2) < 0) break; - c3 = str.charCodeAt(i3); - hi = c3 >> 8; - lo = c3 % 256; - byteArray.push(lo); - byteArray.push(hi); - } - return byteArray; - } - function base64ToBytes(str) { - return base64.toByteArray(base64clean(str)); - } - function blitBuffer(src, dst, offset, length) { - for (var i3 = 0; i3 < length; ++i3) { - if (i3 + offset >= dst.length || i3 >= src.length) break; - dst[i3 + offset] = src[i3]; - } - return i3; - } - function isInstance(obj, type) { - return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name; - } - function numberIsNaN(obj) { - return obj !== obj; - } - var hexSliceLookupTable = function() { - var alphabet2 = "0123456789abcdef"; - var table = new Array(256); - for (var i3 = 0; i3 < 16; ++i3) { - var i16 = i3 * 16; - for (var j4 = 0; j4 < 16; ++j4) { - table[i16 + j4] = alphabet2[i3] + alphabet2[j4]; + if (startPart === 0 && isAbsolute) { + ret.name = path2.slice(1, startDot); + ret.base = path2.slice(1, end); + } else { + ret.name = path2.slice(startPart, startDot); + ret.base = path2.slice(startPart, end); + } + ret.ext = path2.slice(startDot, end); } - } - return table; - }(); + if (startPart > 0) ret.dir = path2.slice(0, startPart - 1); + else if (isAbsolute) ret.dir = "/"; + return ret; + }, + sep: "/", + delimiter: ":", + win32: null, + posix: null + }; + posix.posix = posix; + module.exports = posix; + } + }); + + // node_modules/queue-microtask/index.js + var require_queue_microtask = __commonJS({ + "node_modules/queue-microtask/index.js"(exports, module) { + init_preact_shim(); + var promise; + module.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { + throw err; + }, 0)); } }); @@ -4076,13 +4076,16 @@ siteType: "gazelle", icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAB0VBMVEUAAABRyvRWzPVd0PRQyvRdz/V83fiA3/h+3vil7vt32/d/3vhRyfVRyfRQyfVRyPVSy/NNzvBQy/RRyvNdx/BcxvFSzvgA//9RyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRQyvRRyvRRyvRRyvRRyvRRyvRRyvRSy/VUzPRRyvRRyvRRyvR73fiB3/lRyvRRyvRRyvRRyvRUy/Rl0/Z53PiC4PmF4fmF4fmA3/iC4PmF4vqF4fmD4PlRyvRRyvRRyvRQyvRe0PV73fiA3/h+3vh+3vht1vdazvVSyvRs1vZ/3vh+3vhRyvRPyfRQyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyvRRyfRRyvRRyvRQy/RRyvRRyvRRyvNRyfNQyvRSyvRSy/ZRttpRqcdVzPRg0PVq1fZw2Pdz2fd02vd12vh02vh00+90z+ly2ff///+GemWQAAAAh3RSTlMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABLmt8WBYGi/v8w0AJg+iRUDw1GggrWZ72+vTw1WkEGV2y5/JNdNKfAlaZiUlUxv7IDh+OFxWT9eczjK6505EQit33+fv7+/v5/f37/ukOjUNFS1FRUVCB8dtmUDTreOXCPjbxMAskEfiWBXOqAzMzDrfyAAAAAWJLR0SamN9nEgAAAAd0SU1FB+cKGgg3G6bwFqAAAAE1SURBVCjPY2AYHoARBnBIS0hKScvI4lLAKCev0K6opIzVDJCIiqpCe7uauoamljaqPEhSR1dP36AdCAyNjE1MzYDyUFNApLmFpZViOxxY28CkQUDW1k6hHQXYOzAyODo5u6gwMsq5urmjSnZ0engyMXh5KxrY+/j6+QNFurrau2Ggp7cvIJAZ6Jeg9vbgEJD6/gkTJ02eMmXq1ClAMG36jGmhYUC7wyMi2xWjDKJjYuPi4+MTEmdOTooHgeT4lFSQ09KC29MzMrOyc3Jzc/PyC9oLi4pzIaAE5CXJ0nYZRhZWNnZ2dg7OsvKKSi5udgjgBoVHVXVpDTSAeBhr6+p5+fgRoSXAmNHQ2ASXBgJBIaTAFGZsbtHGFYUMDEKtbfWMjLy4pEVEgeaJ4Uwh4kBAv/RIPQAAlh1hyJQd92oAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjMtMTAtMjZUMDg6NTU6MjYrMDA6MDA7po/7AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIzLTEwLTI2VDA4OjU1OjI3KzAwOjAw7Iw88wAAACh0RVh0ZGF0ZTp0aW1lc3RhbXAAMjAyMy0xMC0yNlQwODo1NToyNyswMDowMLuZHSwAAAAASUVORK5CYII=", asSource: true, - asTarget: false, + asTarget: true, uploadPath: "/upload.php", search: { path: "/torrents.php", params: { searchstr: "{name}" } + }, + torrent: { + selector: "#file" } }, DiscFan: { @@ -9291,13 +9294,16 @@ siteType: "gazelle", icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMA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M4LTA1OjAwBIK8/AAAABZ0RVh0eG1wOlBpeGVsWERpbWVuc2lvbgAzMl01lwMAAAAWdEVYdHhtcDpQaXhlbFlEaW1lbnNpb24AMzKAo06GAAAAPnRFWHR4bXBNTTpEZXJpdmVkRnJvbQB4bXAuZGlkOmI1ZGM1Mjk4LTViZDEtNDI2ZS1hODE5LTZmZmM4OTA0ZmJhOThL8L8AAAA9dEVYdHhtcE1NOkRvY3VtZW50SUQAeG1wLmRpZDpiNWRjNTI5OC01YmQxLTQyNmUtYTgxOS02ZmZjODkwNGZiYTkCKwxvAAAAPXRFWHR4bXBNTTpJbnN0YW5jZUlEAHhtcC5paWQ6Mjc3NjNmZDAtYmM5Yi00N2FjLWFjNWItNzAxMGU0ZGE5NGY4ZKHHGQAAAEV0RVh0eG1wTU06T3JpZ2luYWxEb2N1bWVudElEAHhtcC5kaWQ6YjVkYzUyOTgtNWJkMS00MjZlLWE4MTktNmZmYzg5MDRmYmE5DvZinAAAAABJRU5ErkJggg==", asSource: true, - asTarget: false, + asTarget: true, uploadPath: "/upload.php", search: { path: "/torrents.php", params: { searchstr: "{name}" } + }, + torrent: { + selector: "#file" } }, RedLeaves: { @@ -13961,7 +13967,7 @@ ${"\xA0".repeat(6)}`)} return color; }; var htmlToBBCode = (node) => { - var _a3, _b2, _c, _d, _e; + var _a3, _b2, _c, _d, _e, _f, _g; const bbCodes = []; const pre = []; const post = []; @@ -14054,7 +14060,15 @@ ${"\xA0".repeat(6)}`)} break; } case "SPAN": { - pp(null, null); + const { className } = node; + if (className.match(/size/)) { + const matchSize = (_d = (_c = className.match(/size(\d)/)) == null ? void 0 : _c[1]) != null ? _d : ""; + if (matchSize) { + pp(`[size=${matchSize}]`, "[/size]"); + } + } else { + pp(null, null); + } break; } case "BLOCKQUOTE": @@ -14068,7 +14082,7 @@ ${"\xA0".repeat(6)}`)} break; } case "TD": { - if (((_c = CURRENT_SITE_NAME) == null ? void 0 : _c.match(/^(TTG|HDBits|KG|HDSpace)/)) || CURRENT_SITE_NAME === "HDT" || CURRENT_SITE_INFO.siteType === "UNIT3D") { + if (((_e = CURRENT_SITE_NAME) == null ? void 0 : _e.match(/^(TTG|HDBits|KG|HDSpace)/)) || CURRENT_SITE_NAME === "HDT" || CURRENT_SITE_INFO.siteType === "UNIT3D") { pp("[quote]", "[/quote]"); break; } else if (CURRENT_SITE_NAME.match(/EMP|Bdc/)) { @@ -14142,6 +14156,10 @@ ${"\xA0".repeat(6)}`)} pp('[b][size="4"]', "[/size][/b]\n"); break; } + case "STRONG": { + pp("[b]", "[/b]"); + break; + } } const { textAlign, fontWeight, fontStyle, textDecoration, color } = node.style; if (textAlign) { @@ -14169,7 +14187,7 @@ ${"\xA0".repeat(6)}`)} break; } case 3: { - if ((_e = (_d = node == null ? void 0 : node.textContent) == null ? void 0 : _d.trim()) == null ? void 0 : _e.match(/^(引用|Quote|代码|代碼|Show|Hide|Hidden text|Hidden content|\[show\]|\[Show\])/)) { + if ((_g = (_f = node == null ? void 0 : node.textContent) == null ? void 0 : _f.trim()) == null ? void 0 : _g.match(/^(引用|Quote|代码|代碼|Show|Hide|Hidden text|Hidden content|\[show\]|\[Show\])/)) { return ""; } return node.textContent; @@ -15473,6 +15491,9 @@ ${description}`; description = this.getThanksQuote() + description.trim(); } jQuery((_d = this.currentSiteInfo.description) == null ? void 0 : _d.selector).val(description); + if (CURRENT_SITE_INFO.siteType === "UNIT3D" && CURRENT_SITE_INFO.description.selector === "#bbcode-description") { + jQuery(CURRENT_SITE_INFO.description.selector)[0].dispatchEvent(new Event("input")); + } this.info = __spreadProps(__spreadValues({}, this.info), { description }); @@ -16826,6 +16847,123 @@ ${jQuery(description.selector).val()}`); }); } + // src/target/red.ts + init_preact_shim(); + var red_default = async (info) => { + var _a3; + const { musicJson } = info; + if (!musicJson) { + return; + } + document.forms.upload_table.reset = () => { + }; + const { name, year, musicInfo, bbBody, tags, releaseType, categoryId, wikiImage } = musicJson.group; + const groupId = getUrlParam("groupid"); + if (!groupId) { + const url = `/ajax.php?action=browse&searchstr=${name} ${year}`; + const searchResult = await fetch(url); + if (searchResult.status === "success" && searchResult.response.results.length > 0) { + const groupId2 = searchResult.response.results[0].groupId; + const timestampMatchArray2 = location.hash && location.hash.match(/(^|#)timestamp=([^#]*)(#|$)/); + const timestamp = (_a3 = timestampMatchArray2 == null ? void 0 : timestampMatchArray2[2]) != null ? _a3 : ""; + location.href = `${CURRENT_SITE_INFO.url}${CURRENT_SITE_INFO.uploadPath}?groupid=${groupId2}#timestamp=${timestamp}`; + return; + } + jQuery("#categories").val(categoryId - 1); + jQuery("#title").val(name); + jQuery("#year").val(year); + jQuery("#releasetype").val(releaseType); + jQuery("#tags").val(tags.join(", ")); + jQuery("#album_desc").val(bbBody); + jQuery("#image").val(wikiImage); + fillArtistsForm(musicInfo); + } + fillReleaseInfo(musicJson.torrent); + }; + function fillArtistsForm(musicInfo) { + const artistTypeMap = { + artists: "1", + with: "2", + composers: "4", + conductor: "5", + dj: "6", + producer: "7", + remixedBy: "3" + }; + const artists = []; + Object.keys(musicInfo).forEach((key) => { + const typeKey = key; + const values = musicInfo[typeKey].map((value) => { + return __spreadProps(__spreadValues({}, value), { + type: artistTypeMap[typeKey] + }); + }); + artists.push(...values); + }); + for (let i3 = 1; i3 < artists.length; i3++) { + AddArtistField(); + } + artists.forEach((artist, index) => { + const selector = index > 0 ? `#artist_${index}` : "#artist"; + jQuery(selector).val(artist.name).next().val(artist.type || ""); + }); + } + function fillReleaseInfo(info) { + const { remasterYear, remasterRecordLabel, remasterCatalogueNumber, format, encoding, media, description, scene } = info; + jQuery("#remaster_record_label").val(remasterRecordLabel); + jQuery("#remaster_catalogue_number").val(remasterCatalogueNumber); + jQuery("#format").val(format); + jQuery("#bitrate").val(encoding); + jQuery("#media").val(media); + jQuery("#remaster_year").val(remasterYear); + jQuery("#release_desc").val(description); + if (scene) { + jQuery("#scene").attr("checked", "true"); + } + } + + // src/target/dicmusic.ts + init_preact_shim(); + var import_buffer = __toESM(require_buffer(), 1); + var dicmusic_default = async (info) => { + var _a3; + const { musicJson } = info; + if (!musicJson) { + return; + } + const { name, year } = musicJson.group; + const groupId = getUrlParam("groupid"); + if (!groupId) { + const searchResult = await fetch(`/ajax.php?action=browse&searchstr=${name} ${year}`); + if (searchResult.status === "success" && searchResult.response.results.length > 0) { + const groupId2 = searchResult.response.results[0].groupId; + const timestampMatchArray2 = location.hash && location.hash.match(/(^|#)timestamp=([^#]*)(#|$)/); + const timestamp = (_a3 = timestampMatchArray2 == null ? void 0 : timestampMatchArray2[2]) != null ? _a3 : ""; + location.href = `${CURRENT_SITE_INFO.url}${CURRENT_SITE_INFO.uploadPath}?groupid=${groupId2}#timestamp=${timestamp}`; + return; + } + } + fillJsonToUploadTable(musicJson, name); + }; + function fillJsonToUploadTable(musicJson, name) { + const buf = import_buffer.Buffer.from(JSON.stringify({ + status: "success", + response: musicJson + })); + const jsonData = buf.toString("base64"); + const fileInput = jQuery("#torrent-json-file"); + if (jsonData && fileInput.length > 0) { + const blob = base64ToBlob(jsonData, "application/json"); + const torrentFileName = name == null ? void 0 : name.replace(/\s/g, "."); + const file = new File([blob], `${torrentFileName}.json`, { type: "application/json" }); + const dataTransfer = new DataTransfer(); + dataTransfer.items.add(file); + const uploadInput = fileInput[0]; + uploadInput.files = dataTransfer.files; + uploadInput.dispatchEvent(new Event("change", { bubbles: true })); + } + } + // src/target/index.ts var siteHandlers = { PTP: ptp_default, @@ -16837,7 +16975,9 @@ ${jQuery(description.selector).val()}`); BeyondHD: bhd_default, Bdc: bdc_default, ZHUQUE: zhuque_default, - MTeam: mt_default + MTeam: mt_default, + RED: red_default, + DicMusic: dicmusic_default }; var fillTargetForm = (info) => { var _a3; @@ -18584,7 +18724,7 @@ ${doubanPart}`); var parse_torrent_default = parseTorrent; // src/source/helper.ts - var import_buffer = __toESM(require_buffer(), 1); + var import_buffer2 = __toESM(require_buffer(), 1); var getVideoType5 = (videoType) => { if (!videoType) { return ""; @@ -18708,7 +18848,7 @@ ${doubanPart}`); method: "GET", responseType: "arraybuffer" }); - const result = await parse_torrent_default(import_buffer.Buffer.from(file)); + const result = await parse_torrent_default(import_buffer2.Buffer.from(file)); const buf = encodeTorrentFile(__spreadProps(__spreadValues({}, result), { comment: "", announce: [], @@ -20080,9 +20220,9 @@ ${descriptionData}`; }; } - // src/source/red.ts + // src/source/gazelle-music.ts init_preact_shim(); - var red_default = async () => { + var gazelle_music_default = async () => { const torrentId = getUrlParam("torrentid"); if (!torrentId) { return false; @@ -20098,6 +20238,12 @@ ${descriptionData}`; }; async function getTorrentInfo6(torrentId) { const { response } = await fetch(`/ajax.php?action=torrent&id=${torrentId}`); + if (CURRENT_SITE_NAME === "DicMusic" && response.group) { + response.group.name = getUTF8String(response.group.name); + const div2 = document.createElement("div"); + div2.innerHTML = response.group.wikiBody; + response.group.bbBody = htmlToBBCode(div2); + } const { torrent, group } = response; const { name, year, wikiImage, musicInfo, categoryName, bbBody, tags, wikiBody } = group; const { format, media, encoding } = torrent; @@ -20125,6 +20271,7 @@ ${description}`; const logDiv = document.createElement("div"); logDiv.innerHTML = log; const logBBcode = htmlToBBCode(logDiv); + CURRENT_SITE_INFO.torrentLink = jQuery(`#torrent${torrentId} a[href*="action=download"]`).attr("href"); return { title: jQuery(".header h2").text(), subtitle: `${jQuery(`#torrent${torrentId}`).prev().find("strong").contents().last().text().trim()} / ${jQuery(`#torrent${torrentId} td:first-child a[onclick*="$("]`).text()}`, @@ -20141,9 +20288,16 @@ ${description}`; media, encoding, log: logBBcode - } + }, + musicJson: response }; } + function getUTF8String(entityString) { + const tempElement = document.createElement("textarea"); + tempElement.innerHTML = entityString; + const utf8String = tempElement.value; + return utf8String; + } // src/source/mtv.ts init_preact_shim(); @@ -20566,8 +20720,8 @@ ${description}`; GPW: gpw_default2, EMP: emp_default, Bdc: bdc_default2, - RED: red_default, - DicMusic: red_default, + RED: gazelle_music_default, + DicMusic: gazelle_music_default, MTV: mtv_default, SpeedApp: speedapp_default, HH: hh_default, @@ -22416,9 +22570,6 @@ classnames/index.js: http://jedwatson.github.io/classnames *) -queue-microtask/index.js: - (*! queue-microtask. MIT License. Feross Aboukhadijeh *) - ieee754/index.js: (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) @@ -22430,6 +22581,9 @@ buffer/index.js: * @license MIT *) +queue-microtask/index.js: + (*! queue-microtask. MIT License. Feross Aboukhadijeh *) + uint8-util/util.js: (* Common package for dealing with hex/string/uint8 conversions (and sha1 hashing) *