@dan-uni/dan-any 1.1.1 → 1.2.5
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/README.md +1 -0
- package/dist/browser/17.min.js +13286 -0
- package/dist/browser/705.min.js +77 -0
- package/dist/browser/898.min.js +10 -0
- package/dist/browser/index.min.js +1 -13248
- package/dist/browser/plugins/bili.min.js +1 -0
- package/dist/browser/plugins/index.min.js +2 -1
- package/dist/browser/plugins/stats.min.js +1 -0
- package/dist/browser/src/index.d.ts +1 -4
- package/dist/browser/src/plugins/bili/dedupe.d.ts +3 -0
- package/dist/browser/src/plugins/bili/history-danmaku-fast-forward.d.ts +18 -0
- package/dist/browser/src/plugins/bili/index.d.ts +2 -0
- package/dist/browser/src/plugins/index.d.ts +2 -2
- package/dist/browser/src/plugins/stats/getLatestDan.d.ts +6 -0
- package/dist/browser/src/plugins/stats/index.d.ts +1 -0
- package/dist/node/17.js +1861 -0
- package/dist/node/705.js +77 -0
- package/dist/node/898.js +10 -0
- package/dist/node/index.js +1 -1823
- package/dist/node/plugins/bili.js +1 -0
- package/dist/node/plugins/index.js +2 -1
- package/dist/node/plugins/stats.js +1 -0
- package/dist/node/src/index.d.ts +1 -4
- package/dist/node/src/plugins/bili/dedupe.d.ts +3 -0
- package/dist/node/src/plugins/bili/history-danmaku-fast-forward.d.ts +18 -0
- package/dist/node/src/plugins/bili/index.d.ts +2 -0
- package/dist/node/src/plugins/index.d.ts +2 -2
- package/dist/node/src/plugins/stats/getLatestDan.d.ts +6 -0
- package/dist/node/src/plugins/stats/index.d.ts +1 -0
- package/dist/node/src/plugins/stats/index.test.d.ts +1 -0
- package/dist/umd/index.umd.min.js +73 -68
- package/dist/umd/plugins/bili.umd.min.js +29639 -0
- package/dist/umd/plugins/bili.umd.min.js.LICENSE.txt +34 -0
- package/dist/umd/plugins/index.umd.min.js +29584 -23
- package/dist/umd/plugins/index.umd.min.js.LICENSE.txt +34 -0
- package/dist/umd/plugins/stats.umd.min.js +39 -0
- package/dist/umd/src/index.d.ts +1 -4
- package/dist/umd/src/plugins/bili/dedupe.d.ts +3 -0
- package/dist/umd/src/plugins/bili/history-danmaku-fast-forward.d.ts +18 -0
- package/dist/umd/src/plugins/bili/index.d.ts +2 -0
- package/dist/umd/src/plugins/bili/index.test.d.ts +1 -0
- package/dist/umd/src/plugins/index.d.ts +2 -2
- package/dist/umd/src/plugins/stats/getLatestDan.d.ts +6 -0
- package/dist/umd/src/plugins/stats/index.d.ts +1 -0
- package/dist/umd/src/plugins/stats/index.test.d.ts +1 -0
- package/package.json +4 -2
- package/rslib.config.ts +2 -1
- package/src/index.ts +1 -7
- package/src/plugins/bili/README.md +87 -0
- package/src/plugins/{bili-dedupe/index.ts → bili/dedupe.ts} +13 -3
- package/src/plugins/bili/history-danmaku-fast-forward.ts +86 -0
- package/src/plugins/bili/index.test.ts +129 -0
- package/src/plugins/bili/index.ts +2 -0
- package/src/plugins/index.ts +2 -3
- package/src/plugins/stats/README.md +44 -0
- package/src/plugins/stats/getLatestDan.ts +13 -0
- package/src/plugins/{bili-dedupe → stats}/index.test.ts +10 -11
- package/src/plugins/stats/index.ts +1 -0
- package/dist/browser/157.min.js +0 -14
- package/dist/browser/42.min.js +0 -45
- package/dist/browser/plugins/bili-dedupe.min.js +0 -1
- package/dist/browser/src/plugins/bili-dedupe/index.d.ts +0 -5
- package/dist/node/157.js +0 -14
- package/dist/node/42.js +0 -45
- package/dist/node/plugins/bili-dedupe.js +0 -1
- package/dist/node/src/plugins/bili-dedupe/index.d.ts +0 -5
- package/dist/umd/plugins/bili-dedupe.umd.min.js +0 -79
- package/dist/umd/src/plugins/bili-dedupe/index.d.ts +0 -5
- /package/dist/browser/{index.min.js.LICENSE.txt → 17.min.js.LICENSE.txt} +0 -0
- /package/dist/browser/src/plugins/{bili-dedupe → bili}/index.test.d.ts +0 -0
- /package/dist/{node/src/plugins/bili-dedupe → browser/src/plugins/stats}/index.test.d.ts +0 -0
- /package/dist/{umd/src/plugins/bili-dedupe → node/src/plugins/bili}/index.test.d.ts +0 -0
package/dist/browser/157.min.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { platform_PlatformVideoSource } from "./42.min.js";
|
|
2
|
-
function bili_dedupe(that) {
|
|
3
|
-
that.dans.forEach((d)=>{
|
|
4
|
-
if (d.platform !== platform_PlatformVideoSource.Bilibili) throw new Error('bili-dedupe: 仅支持B站(主站)的弹幕');
|
|
5
|
-
if (!d.extra.bili?.dmid) throw new Error('bili-dedupe: 弹幕缺少bili extra dmid字段');
|
|
6
|
-
});
|
|
7
|
-
const map = new Map();
|
|
8
|
-
that.dans.forEach((d)=>map.set(d.extra.bili.dmid, d));
|
|
9
|
-
that.dans = [
|
|
10
|
-
...map.values()
|
|
11
|
-
];
|
|
12
|
-
return that;
|
|
13
|
-
}
|
|
14
|
-
export { bili_dedupe };
|
package/dist/browser/42.min.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { __webpack_require__ } from "./rslib-runtime.min.js";
|
|
2
|
-
var platform_namespaceObject = {};
|
|
3
|
-
__webpack_require__.r(platform_namespaceObject);
|
|
4
|
-
__webpack_require__.d(platform_namespaceObject, {
|
|
5
|
-
PlatformDanmakuOnlySource: ()=>platform_PlatformDanmakuOnlySource,
|
|
6
|
-
PlatformDanmakuOnlySources: ()=>PlatformDanmakuOnlySources,
|
|
7
|
-
PlatformDanmakuSources: ()=>PlatformDanmakuSources,
|
|
8
|
-
PlatformInfoSource: ()=>platform_PlatformInfoSource,
|
|
9
|
-
PlatformInfoSources: ()=>PlatformInfoSources,
|
|
10
|
-
PlatformSources: ()=>PlatformSources,
|
|
11
|
-
PlatformVideoSource: ()=>platform_PlatformVideoSource,
|
|
12
|
-
PlatformVideoSources: ()=>PlatformVideoSources
|
|
13
|
-
});
|
|
14
|
-
var platform_PlatformInfoSource = /*#__PURE__*/ function(PlatformInfoSource) {
|
|
15
|
-
PlatformInfoSource["Bangumi"] = "bgm";
|
|
16
|
-
PlatformInfoSource["TMDB"] = "tmdb";
|
|
17
|
-
return PlatformInfoSource;
|
|
18
|
-
}({});
|
|
19
|
-
const PlatformInfoSources = Object.values(platform_PlatformInfoSource);
|
|
20
|
-
var platform_PlatformVideoSource = /*#__PURE__*/ function(PlatformVideoSource) {
|
|
21
|
-
PlatformVideoSource["Acfun"] = "acfun";
|
|
22
|
-
PlatformVideoSource["Baha"] = "baha";
|
|
23
|
-
PlatformVideoSource["Bilibili"] = "bili";
|
|
24
|
-
PlatformVideoSource["BilibiliGlobal"] = "bglobal";
|
|
25
|
-
PlatformVideoSource["Iqiyi"] = "iqiyi";
|
|
26
|
-
PlatformVideoSource["Tencent"] = "tencent";
|
|
27
|
-
PlatformVideoSource["Youku"] = "youku";
|
|
28
|
-
return PlatformVideoSource;
|
|
29
|
-
}({});
|
|
30
|
-
const PlatformVideoSources = Object.values(platform_PlatformVideoSource);
|
|
31
|
-
var platform_PlatformDanmakuOnlySource = /*#__PURE__*/ function(PlatformDanmakuOnlySource) {
|
|
32
|
-
PlatformDanmakuOnlySource["DanDanPlay"] = "ddplay";
|
|
33
|
-
PlatformDanmakuOnlySource["TuCao"] = "tucao";
|
|
34
|
-
return PlatformDanmakuOnlySource;
|
|
35
|
-
}({});
|
|
36
|
-
const PlatformDanmakuOnlySources = Object.values(platform_PlatformDanmakuOnlySource);
|
|
37
|
-
const PlatformDanmakuSources = [
|
|
38
|
-
...PlatformVideoSources,
|
|
39
|
-
...PlatformDanmakuOnlySources
|
|
40
|
-
];
|
|
41
|
-
const PlatformSources = [
|
|
42
|
-
...PlatformInfoSources,
|
|
43
|
-
...PlatformDanmakuSources
|
|
44
|
-
];
|
|
45
|
-
export { PlatformDanmakuSources, platform_PlatformDanmakuOnlySource, platform_PlatformVideoSource, platform_namespaceObject as platform };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { bili_dedupe as default } from "../157.min.js";
|
package/dist/node/157.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { platform_PlatformVideoSource } from "./42.js";
|
|
2
|
-
function bili_dedupe(that) {
|
|
3
|
-
that.dans.forEach((d)=>{
|
|
4
|
-
if (d.platform !== platform_PlatformVideoSource.Bilibili) throw new Error('bili-dedupe: 仅支持B站(主站)的弹幕');
|
|
5
|
-
if (!d.extra.bili?.dmid) throw new Error('bili-dedupe: 弹幕缺少bili extra dmid字段');
|
|
6
|
-
});
|
|
7
|
-
const map = new Map();
|
|
8
|
-
that.dans.forEach((d)=>map.set(d.extra.bili.dmid, d));
|
|
9
|
-
that.dans = [
|
|
10
|
-
...map.values()
|
|
11
|
-
];
|
|
12
|
-
return that;
|
|
13
|
-
}
|
|
14
|
-
export { bili_dedupe };
|
package/dist/node/42.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
|
-
var platform_namespaceObject = {};
|
|
3
|
-
__webpack_require__.r(platform_namespaceObject);
|
|
4
|
-
__webpack_require__.d(platform_namespaceObject, {
|
|
5
|
-
PlatformDanmakuOnlySource: ()=>platform_PlatformDanmakuOnlySource,
|
|
6
|
-
PlatformDanmakuOnlySources: ()=>PlatformDanmakuOnlySources,
|
|
7
|
-
PlatformDanmakuSources: ()=>PlatformDanmakuSources,
|
|
8
|
-
PlatformInfoSource: ()=>platform_PlatformInfoSource,
|
|
9
|
-
PlatformInfoSources: ()=>PlatformInfoSources,
|
|
10
|
-
PlatformSources: ()=>PlatformSources,
|
|
11
|
-
PlatformVideoSource: ()=>platform_PlatformVideoSource,
|
|
12
|
-
PlatformVideoSources: ()=>PlatformVideoSources
|
|
13
|
-
});
|
|
14
|
-
var platform_PlatformInfoSource = /*#__PURE__*/ function(PlatformInfoSource) {
|
|
15
|
-
PlatformInfoSource["Bangumi"] = "bgm";
|
|
16
|
-
PlatformInfoSource["TMDB"] = "tmdb";
|
|
17
|
-
return PlatformInfoSource;
|
|
18
|
-
}({});
|
|
19
|
-
const PlatformInfoSources = Object.values(platform_PlatformInfoSource);
|
|
20
|
-
var platform_PlatformVideoSource = /*#__PURE__*/ function(PlatformVideoSource) {
|
|
21
|
-
PlatformVideoSource["Acfun"] = "acfun";
|
|
22
|
-
PlatformVideoSource["Baha"] = "baha";
|
|
23
|
-
PlatformVideoSource["Bilibili"] = "bili";
|
|
24
|
-
PlatformVideoSource["BilibiliGlobal"] = "bglobal";
|
|
25
|
-
PlatformVideoSource["Iqiyi"] = "iqiyi";
|
|
26
|
-
PlatformVideoSource["Tencent"] = "tencent";
|
|
27
|
-
PlatformVideoSource["Youku"] = "youku";
|
|
28
|
-
return PlatformVideoSource;
|
|
29
|
-
}({});
|
|
30
|
-
const PlatformVideoSources = Object.values(platform_PlatformVideoSource);
|
|
31
|
-
var platform_PlatformDanmakuOnlySource = /*#__PURE__*/ function(PlatformDanmakuOnlySource) {
|
|
32
|
-
PlatformDanmakuOnlySource["DanDanPlay"] = "ddplay";
|
|
33
|
-
PlatformDanmakuOnlySource["TuCao"] = "tucao";
|
|
34
|
-
return PlatformDanmakuOnlySource;
|
|
35
|
-
}({});
|
|
36
|
-
const PlatformDanmakuOnlySources = Object.values(platform_PlatformDanmakuOnlySource);
|
|
37
|
-
const PlatformDanmakuSources = [
|
|
38
|
-
...PlatformVideoSources,
|
|
39
|
-
...PlatformDanmakuOnlySources
|
|
40
|
-
];
|
|
41
|
-
const PlatformSources = [
|
|
42
|
-
...PlatformInfoSources,
|
|
43
|
-
...PlatformDanmakuSources
|
|
44
|
-
];
|
|
45
|
-
export { PlatformDanmakuSources, platform_PlatformDanmakuOnlySource, platform_PlatformVideoSource, platform_namespaceObject as platform };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { bili_dedupe as default } from "../157.js";
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
(function(root, factory) {
|
|
2
|
-
if ('object' == typeof exports && 'object' == typeof module) module.exports = factory();
|
|
3
|
-
else if ('function' == typeof define && define.amd) define([], factory);
|
|
4
|
-
else if ('object' == typeof exports) exports["@dan-uni/dan-any"] = factory();
|
|
5
|
-
else root["@dan-uni/dan-any"] = factory();
|
|
6
|
-
})(globalThis, ()=>(()=>{
|
|
7
|
-
"use strict";
|
|
8
|
-
var __webpack_require__ = {};
|
|
9
|
-
(()=>{
|
|
10
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
11
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: definition[key]
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
(()=>{
|
|
18
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
19
|
-
})();
|
|
20
|
-
(()=>{
|
|
21
|
-
__webpack_require__.r = (exports1)=>{
|
|
22
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
23
|
-
value: 'Module'
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
26
|
-
value: true
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
|
-
var __webpack_exports__ = {};
|
|
31
|
-
__webpack_require__.r(__webpack_exports__);
|
|
32
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
33
|
-
default: ()=>bili_dedupe
|
|
34
|
-
});
|
|
35
|
-
var platform_PlatformInfoSource = /*#__PURE__*/ function(PlatformInfoSource) {
|
|
36
|
-
PlatformInfoSource["Bangumi"] = "bgm";
|
|
37
|
-
PlatformInfoSource["TMDB"] = "tmdb";
|
|
38
|
-
return PlatformInfoSource;
|
|
39
|
-
}({});
|
|
40
|
-
const PlatformInfoSources = Object.values(platform_PlatformInfoSource);
|
|
41
|
-
var platform_PlatformVideoSource = /*#__PURE__*/ function(PlatformVideoSource) {
|
|
42
|
-
PlatformVideoSource["Acfun"] = "acfun";
|
|
43
|
-
PlatformVideoSource["Baha"] = "baha";
|
|
44
|
-
PlatformVideoSource["Bilibili"] = "bili";
|
|
45
|
-
PlatformVideoSource["BilibiliGlobal"] = "bglobal";
|
|
46
|
-
PlatformVideoSource["Iqiyi"] = "iqiyi";
|
|
47
|
-
PlatformVideoSource["Tencent"] = "tencent";
|
|
48
|
-
PlatformVideoSource["Youku"] = "youku";
|
|
49
|
-
return PlatformVideoSource;
|
|
50
|
-
}({});
|
|
51
|
-
const PlatformVideoSources = Object.values(platform_PlatformVideoSource);
|
|
52
|
-
var platform_PlatformDanmakuOnlySource = /*#__PURE__*/ function(PlatformDanmakuOnlySource) {
|
|
53
|
-
PlatformDanmakuOnlySource["DanDanPlay"] = "ddplay";
|
|
54
|
-
PlatformDanmakuOnlySource["TuCao"] = "tucao";
|
|
55
|
-
return PlatformDanmakuOnlySource;
|
|
56
|
-
}({});
|
|
57
|
-
const PlatformDanmakuOnlySources = Object.values(platform_PlatformDanmakuOnlySource);
|
|
58
|
-
const PlatformDanmakuSources = [
|
|
59
|
-
...PlatformVideoSources,
|
|
60
|
-
...PlatformDanmakuOnlySources
|
|
61
|
-
];
|
|
62
|
-
[
|
|
63
|
-
...PlatformInfoSources,
|
|
64
|
-
...PlatformDanmakuSources
|
|
65
|
-
];
|
|
66
|
-
function bili_dedupe(that) {
|
|
67
|
-
that.dans.forEach((d)=>{
|
|
68
|
-
if (d.platform !== platform_PlatformVideoSource.Bilibili) throw new Error('bili-dedupe: 仅支持B站(主站)的弹幕');
|
|
69
|
-
if (!d.extra.bili?.dmid) throw new Error('bili-dedupe: 弹幕缺少bili extra dmid字段');
|
|
70
|
-
});
|
|
71
|
-
const map = new Map();
|
|
72
|
-
that.dans.forEach((d)=>map.set(d.extra.bili.dmid, d));
|
|
73
|
-
that.dans = [
|
|
74
|
-
...map.values()
|
|
75
|
-
];
|
|
76
|
-
return that;
|
|
77
|
-
}
|
|
78
|
-
return __webpack_exports__;
|
|
79
|
-
})());
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|