koishi-plugin-bilibili-notify 0.0.1 → 0.1.0
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/lib/comRegister.d.ts +20 -2
- package/lib/comRegister.js +115 -24
- package/lib/generateImg.d.ts +3 -3
- package/lib/generateImg.js +360 -124
- package/lib/index.d.ts +3 -2
- package/lib/index.js +11 -6
- package/lib/wbi.d.ts +9 -3
- package/lib/wbi.js +12 -4
- package/package.json +1 -1
package/lib/comRegister.d.ts
CHANGED
|
@@ -3,9 +3,27 @@ declare class ComRegister {
|
|
|
3
3
|
static inject: string[];
|
|
4
4
|
logger: Logger;
|
|
5
5
|
config: ComRegister.Config;
|
|
6
|
+
id: number;
|
|
7
|
+
sub: {
|
|
8
|
+
id: number;
|
|
9
|
+
uid: string;
|
|
10
|
+
room_id: string;
|
|
11
|
+
dynamic: number;
|
|
12
|
+
video: 1;
|
|
13
|
+
live: number;
|
|
14
|
+
time: Date;
|
|
15
|
+
};
|
|
16
|
+
subManager: {
|
|
17
|
+
uid: string;
|
|
18
|
+
roomId: string;
|
|
19
|
+
live: boolean;
|
|
20
|
+
dynamic: boolean;
|
|
21
|
+
liveDispose: Function;
|
|
22
|
+
dynamicDispose: Function;
|
|
23
|
+
}[];
|
|
6
24
|
constructor(ctx: Context, config: ComRegister.Config);
|
|
7
|
-
dynamicDetect(ctx: Context, session: Session, uid: string
|
|
8
|
-
liveDetect(ctx: Context, session: Session, roomId: string
|
|
25
|
+
dynamicDetect(ctx: Context, session: Session, uid: string): () => Promise<"账号未登录" | "未知错误">;
|
|
26
|
+
liveDetect(ctx: Context, session: Session, roomId: string): () => Promise<void>;
|
|
9
27
|
checkIfNeedSub(comNeed: boolean, subType: string, session: Session, data?: any): Promise<boolean>;
|
|
10
28
|
}
|
|
11
29
|
declare namespace ComRegister {
|
package/lib/comRegister.js
CHANGED
|
@@ -13,9 +13,12 @@ var LiveType;
|
|
|
13
13
|
LiveType[LiveType["LiveBroadcast"] = 2] = "LiveBroadcast";
|
|
14
14
|
})(LiveType || (LiveType = {}));
|
|
15
15
|
class ComRegister {
|
|
16
|
-
static inject = ['biliAPI', 'gimg', 'wbi'];
|
|
16
|
+
static inject = ['biliAPI', 'gimg', 'wbi', 'database'];
|
|
17
17
|
logger;
|
|
18
18
|
config;
|
|
19
|
+
id = 1;
|
|
20
|
+
sub;
|
|
21
|
+
subManager = [];
|
|
19
22
|
constructor(ctx, config) {
|
|
20
23
|
this.logger = ctx.logger('commandRegister');
|
|
21
24
|
this.config = config;
|
|
@@ -67,6 +70,13 @@ class ComRegister {
|
|
|
67
70
|
const [pic] = await ctx.gimg.generateDynamicImg(data.items[index]);
|
|
68
71
|
return pic;
|
|
69
72
|
});
|
|
73
|
+
ctx.command('test')
|
|
74
|
+
.subcommand('.subm')
|
|
75
|
+
.usage('查看订阅对象状态')
|
|
76
|
+
.example('test subm')
|
|
77
|
+
.action(() => {
|
|
78
|
+
console.log(this.subManager);
|
|
79
|
+
});
|
|
70
80
|
ctx.command('bili', 'bili-notify插件相关指令')
|
|
71
81
|
.subcommand('.login', '登录B站之后才可以进行之后的操作')
|
|
72
82
|
.usage('使用二维码登录,登录B站之后才可以进行之后的操作')
|
|
@@ -126,13 +136,19 @@ class ComRegister {
|
|
|
126
136
|
.option('live', '-l')
|
|
127
137
|
.option('dynamic', '-d')
|
|
128
138
|
.usage('订阅用户动态和直播通知,若需要订阅直播请加上-l,需要订阅动态则加上-d。若没有加任何参数,之后会向你单独询问,<>中为必选参数,[]中为可选参数,目标群号若不填,则默认为当前群聊')
|
|
129
|
-
.example('bili sub 用户uid 目标QQ群号(
|
|
139
|
+
.example('bili sub 用户uid 目标QQ群号(暂不支持) -l -d')
|
|
130
140
|
.action(async ({ session, options }, mid, groupid) => {
|
|
131
141
|
this.logger.info('调用bili.sub指令');
|
|
132
142
|
// 检查必选参数是否有值
|
|
133
143
|
if (mid === undefined) {
|
|
134
144
|
return '请输入用户uid';
|
|
135
145
|
}
|
|
146
|
+
// 判断要订阅的用户是否已经存在于订阅管理对象中
|
|
147
|
+
this.subManager && this.subManager.forEach((sub) => {
|
|
148
|
+
// 已订阅该用户
|
|
149
|
+
if (sub.uid === mid)
|
|
150
|
+
return session.send('已订阅该用户,请勿重复订阅');
|
|
151
|
+
});
|
|
136
152
|
// 定义是否需要直播通知,动态订阅,视频推送
|
|
137
153
|
let liveMsg, dynamicMsg;
|
|
138
154
|
// 获取用户信息
|
|
@@ -163,7 +179,37 @@ class ComRegister {
|
|
|
163
179
|
liveMsg = await this.checkIfNeedSub(options.live, '直播', session, data);
|
|
164
180
|
// 判断是否需要订阅动态
|
|
165
181
|
dynamicMsg = await this.checkIfNeedSub(options.dynamic, '动态', session);
|
|
166
|
-
//
|
|
182
|
+
// 构造订阅对象
|
|
183
|
+
this.sub = {
|
|
184
|
+
id: this.id,
|
|
185
|
+
uid: mid,
|
|
186
|
+
room_id: data.live_room.roomid.toString(),
|
|
187
|
+
dynamic: dynamicMsg ? 1 : 0,
|
|
188
|
+
video: 1,
|
|
189
|
+
live: liveMsg ? 1 : 0,
|
|
190
|
+
time: new Date()
|
|
191
|
+
};
|
|
192
|
+
// 保存到数据库中
|
|
193
|
+
await ctx.database.upsert('bilibili', [this.sub]);
|
|
194
|
+
// 让id自增
|
|
195
|
+
this.id++;
|
|
196
|
+
// 开始订阅
|
|
197
|
+
// 保存新订阅对象
|
|
198
|
+
this.subManager.push({
|
|
199
|
+
uid: mid,
|
|
200
|
+
roomId: data.live_room.roomid.toString(),
|
|
201
|
+
live: liveMsg,
|
|
202
|
+
dynamic: dynamicMsg,
|
|
203
|
+
liveDispose: null,
|
|
204
|
+
dynamicDispose: null
|
|
205
|
+
});
|
|
206
|
+
// 需要订阅直播
|
|
207
|
+
if (liveMsg)
|
|
208
|
+
await session.execute(`bili live ${data.live_room.roomid}`);
|
|
209
|
+
// 需要订阅动态
|
|
210
|
+
if (dynamicMsg)
|
|
211
|
+
await session.execute(`bili dynamic ${mid}`);
|
|
212
|
+
// 发送订阅成功通知
|
|
167
213
|
});
|
|
168
214
|
ctx.command('bili')
|
|
169
215
|
.subcommand('.dynamic <uid:string>')
|
|
@@ -171,23 +217,63 @@ class ComRegister {
|
|
|
171
217
|
.example('bili dynamic 1')
|
|
172
218
|
.action(async ({ session }, uid) => {
|
|
173
219
|
this.logger.info('调用bili.dynamic指令');
|
|
174
|
-
|
|
220
|
+
// 如果uid为空则返回
|
|
221
|
+
if (!uid) {
|
|
222
|
+
await session.send('用户uid不能为空');
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
// 定义订阅对象索引
|
|
226
|
+
let index;
|
|
227
|
+
// 定义要订阅的对象是否存在于订阅管理对象中
|
|
228
|
+
let exist;
|
|
229
|
+
// 保存到订阅管理对象
|
|
230
|
+
this.subManager.forEach((sub, i) => {
|
|
231
|
+
if (sub.uid === uid) {
|
|
232
|
+
exist = true;
|
|
233
|
+
index = i;
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
// 不存在则直接返回
|
|
237
|
+
if (!exist) {
|
|
238
|
+
session.send('请勿直接调用该指令');
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
175
241
|
// 开始循环检测
|
|
176
|
-
dispose = ctx.setInterval(this.dynamicDetect(ctx, session, uid
|
|
242
|
+
const dispose = ctx.setInterval(this.dynamicDetect(ctx, session, uid), 60000);
|
|
243
|
+
// 将销毁函数保存到订阅管理对象
|
|
244
|
+
this.subManager[index].dynamicDispose = dispose;
|
|
177
245
|
});
|
|
178
246
|
ctx.command('bili')
|
|
179
247
|
.subcommand('.live <roomId:string>')
|
|
180
248
|
.usage('订阅主播开播通知')
|
|
181
249
|
.example('bili live 732')
|
|
182
250
|
.action(async ({ session }, roomId) => {
|
|
251
|
+
this.logger.info('调用bili.live指令');
|
|
252
|
+
// 如果room_id为空则返回
|
|
183
253
|
if (!roomId) {
|
|
184
|
-
await session.send('
|
|
254
|
+
await session.send('订阅主播房间号不能为空');
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
// 定义订阅对象索引
|
|
258
|
+
let index;
|
|
259
|
+
// 定义要订阅的对象是否存在于订阅管理对象中
|
|
260
|
+
let exist;
|
|
261
|
+
// 保存到订阅管理对象
|
|
262
|
+
this.subManager.forEach((sub, i) => {
|
|
263
|
+
if (sub.roomId === roomId) {
|
|
264
|
+
exist = true;
|
|
265
|
+
index = i;
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
// 要订阅的对象不在订阅管理对象中,直接返回
|
|
269
|
+
if (!exist) {
|
|
270
|
+
await session.send('请勿直接调用该指令');
|
|
185
271
|
return;
|
|
186
272
|
}
|
|
187
|
-
this.logger.info('调用bili.live指令');
|
|
188
|
-
let dispose;
|
|
189
273
|
// 开始循环检测
|
|
190
|
-
dispose = ctx.setInterval(this.liveDetect(ctx, session, roomId
|
|
274
|
+
const dispose = ctx.setInterval(this.liveDetect(ctx, session, roomId), 5000);
|
|
275
|
+
// 保存销毁函数
|
|
276
|
+
this.subManager[index].liveDispose = dispose;
|
|
191
277
|
});
|
|
192
278
|
ctx.command('bili')
|
|
193
279
|
.subcommand('.status <roomId:string>')
|
|
@@ -206,18 +292,18 @@ class ComRegister {
|
|
|
206
292
|
session.send('未找到该房间!');
|
|
207
293
|
}
|
|
208
294
|
else {
|
|
209
|
-
console.log(content);
|
|
210
295
|
session.send('未知错误,请呼叫管理员检查问题!');
|
|
211
296
|
}
|
|
212
297
|
return;
|
|
213
298
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
LiveType.NotLiveBroadcast
|
|
299
|
+
let liveTime = (new Date(data.live_time).getTime()) / 1000;
|
|
300
|
+
const string = await ctx.gimg.generateLiveImg(data, userData, data.live_status !== 1 ?
|
|
301
|
+
LiveType.NotLiveBroadcast :
|
|
302
|
+
liveTime < Date.now() ? LiveType.LiveBroadcast : LiveType.StartBroadcasting);
|
|
217
303
|
session.send(string);
|
|
218
304
|
});
|
|
219
305
|
}
|
|
220
|
-
dynamicDetect(ctx, session, uid
|
|
306
|
+
dynamicDetect(ctx, session, uid) {
|
|
221
307
|
let firstSubscription = true;
|
|
222
308
|
let timePoint;
|
|
223
309
|
return async () => {
|
|
@@ -228,8 +314,7 @@ class ComRegister {
|
|
|
228
314
|
// 发送订阅消息通知
|
|
229
315
|
session.send(`订阅${userData.info.uname}动态通知!`);
|
|
230
316
|
// 设置第一次的时间点
|
|
231
|
-
timePoint =
|
|
232
|
-
console.log(timePoint);
|
|
317
|
+
timePoint = Date.now();
|
|
233
318
|
// 设置第一次为false
|
|
234
319
|
firstSubscription = false;
|
|
235
320
|
return;
|
|
@@ -256,16 +341,25 @@ class ComRegister {
|
|
|
256
341
|
continue;
|
|
257
342
|
// 寻找发布时间比时间点时间更晚的动态
|
|
258
343
|
if (items[num].modules.module_author.pub_ts > timePoint) {
|
|
259
|
-
//
|
|
260
|
-
timePoint = items[num].modules.module_author.pub_ts
|
|
344
|
+
// 如果这是遍历的最后一条,将时间点设置为这条动态的发布时间
|
|
345
|
+
/* if (num === 1) timePoint = items[num].modules.module_author.pub_ts
|
|
346
|
+
if (num === 0) {
|
|
347
|
+
timePoint = items[num].modules.module_author.pub_ts
|
|
348
|
+
} */
|
|
349
|
+
switch (num) {
|
|
350
|
+
// 如果是置顶动态,则跳过
|
|
351
|
+
case 0: if (items[num].modules.module_tag)
|
|
352
|
+
continue;
|
|
353
|
+
case 1: timePoint = items[num].modules.module_author.pub_ts;
|
|
354
|
+
}
|
|
261
355
|
// 推送该条动态
|
|
262
|
-
const [pic
|
|
356
|
+
const [pic] = await ctx.gimg.generateDynamicImg(items[num]);
|
|
263
357
|
session.send(pic);
|
|
264
358
|
}
|
|
265
359
|
}
|
|
266
360
|
};
|
|
267
361
|
}
|
|
268
|
-
liveDetect(ctx, session, roomId
|
|
362
|
+
liveDetect(ctx, session, roomId) {
|
|
269
363
|
let firstSubscription = true;
|
|
270
364
|
let timer = 0;
|
|
271
365
|
let open = false;
|
|
@@ -286,10 +380,9 @@ class ComRegister {
|
|
|
286
380
|
session.send('未找到该房间!');
|
|
287
381
|
}
|
|
288
382
|
else {
|
|
289
|
-
console.log(content);
|
|
290
383
|
session.send('未知错误,请呼叫管理员检查问题!');
|
|
291
384
|
}
|
|
292
|
-
dispose
|
|
385
|
+
// dispose
|
|
293
386
|
return;
|
|
294
387
|
}
|
|
295
388
|
if (firstSubscription) {
|
|
@@ -337,7 +430,6 @@ class ComRegister {
|
|
|
337
430
|
uData = userData;
|
|
338
431
|
// 发送直播通知
|
|
339
432
|
await session.send(await ctx.gimg.generateLiveImg(data, uData, LiveType.StartBroadcasting));
|
|
340
|
-
await session.send(`https://live.bilibili.com/${roomId}`);
|
|
341
433
|
}
|
|
342
434
|
else { // 还在直播
|
|
343
435
|
if (this.config.pushTime > 0) {
|
|
@@ -350,7 +442,6 @@ class ComRegister {
|
|
|
350
442
|
session.send(await ctx
|
|
351
443
|
.gimg
|
|
352
444
|
.generateLiveImg(data, uData, LiveType.LiveBroadcast));
|
|
353
|
-
await session.send(`https://live.bilibili.com/${roomId}`);
|
|
354
445
|
}
|
|
355
446
|
}
|
|
356
447
|
// 否则继续循环
|
package/lib/generateImg.d.ts
CHANGED
|
@@ -12,13 +12,13 @@ declare class GenerateImg extends Service {
|
|
|
12
12
|
generateLiveImg(data: any, userData: any, liveStatus: number): Promise<string>;
|
|
13
13
|
generateDynamicImg(data: any): Promise<string[]>;
|
|
14
14
|
getLiveStatus(time: string, liveStatus: number): [string, string, boolean];
|
|
15
|
-
getTimeDifference(dateString: string):
|
|
15
|
+
getTimeDifference(dateString: string): string;
|
|
16
16
|
unixTimestampToString(timestamp: number): string;
|
|
17
17
|
}
|
|
18
18
|
declare namespace GenerateImg {
|
|
19
19
|
interface Config {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
cardColorStart: string;
|
|
21
|
+
cardColorEnd: string;
|
|
22
22
|
}
|
|
23
23
|
const Config: Schema<Config>;
|
|
24
24
|
}
|
package/lib/generateImg.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const koishi_1 = require("koishi");
|
|
4
|
+
// 动态类型
|
|
4
5
|
const DYNAMIC_TYPE_NONE = 'DYNAMIC_TYPE_NONE';
|
|
5
6
|
const DYNAMIC_TYPE_FORWARD = 'DYNAMIC_TYPE_FORWARD';
|
|
6
7
|
const DYNAMIC_TYPE_AV = 'DYNAMIC_TYPE_AV';
|
|
@@ -23,8 +24,18 @@ const DYNAMIC_TYPE_LIVE_RCMD = 'DYNAMIC_TYPE_LIVE_RCMD';
|
|
|
23
24
|
const DYNAMIC_TYPE_BANNER = 'DYNAMIC_TYPE_BANNER';
|
|
24
25
|
const DYNAMIC_TYPE_UGC_SEASON = 'DYNAMIC_TYPE_UGC_SEASON';
|
|
25
26
|
const DYNAMIC_TYPE_SUBSCRIPTION_NEW = 'DYNAMIC_TYPE_SUBSCRIPTION_NEW';
|
|
27
|
+
// 内容卡片类型
|
|
28
|
+
const ADDITIONAL_TYPE_NONE = 'ADDITIONAL_TYPE_NONE';
|
|
29
|
+
const ADDITIONAL_TYPE_PGC = 'ADDITIONAL_TYPE_PGC';
|
|
30
|
+
const ADDITIONAL_TYPE_GOODS = 'ADDITIONAL_TYPE_GOODS';
|
|
31
|
+
const ADDITIONAL_TYPE_VOTE = 'ADDITIONAL_TYPE_VOTE';
|
|
32
|
+
const ADDITIONAL_TYPE_COMMON = 'ADDITIONAL_TYPE_COMMON';
|
|
33
|
+
const ADDITIONAL_TYPE_MATCH = 'ADDITIONAL_TYPE_MATCH';
|
|
34
|
+
const ADDITIONAL_TYPE_UP_RCMD = 'ADDITIONAL_TYPE_UP_RCMD';
|
|
35
|
+
const ADDITIONAL_TYPE_UGC = 'ADDITIONAL_TYPE_UGC';
|
|
36
|
+
const ADDITIONAL_TYPE_RESERVE = 'ADDITIONAL_TYPE_RESERVE';
|
|
26
37
|
class GenerateImg extends koishi_1.Service {
|
|
27
|
-
static inject = ['puppeteer'];
|
|
38
|
+
static inject = ['puppeteer', 'biliAPI'];
|
|
28
39
|
config;
|
|
29
40
|
constructor(ctx, config) {
|
|
30
41
|
super(ctx, 'gimg');
|
|
@@ -56,7 +67,7 @@ class GenerateImg extends koishi_1.Service {
|
|
|
56
67
|
.background {
|
|
57
68
|
width: 770px;
|
|
58
69
|
height: auto;
|
|
59
|
-
background: linear-gradient(to right bottom, ${this.config.
|
|
70
|
+
background: linear-gradient(to right bottom, ${this.config.cardColorStart}, ${this.config.cardColorEnd});
|
|
60
71
|
overflow: hidden;
|
|
61
72
|
}
|
|
62
73
|
|
|
@@ -131,6 +142,7 @@ class GenerateImg extends koishi_1.Service {
|
|
|
131
142
|
.card-link {
|
|
132
143
|
text-decoration: none;
|
|
133
144
|
font-size: 20px;
|
|
145
|
+
margin-top: 10px;
|
|
134
146
|
margin-bottom: 10px;
|
|
135
147
|
}
|
|
136
148
|
</style>
|
|
@@ -169,6 +181,7 @@ class GenerateImg extends koishi_1.Service {
|
|
|
169
181
|
const avatarUrl = module_author.face;
|
|
170
182
|
const upName = module_author.name;
|
|
171
183
|
let pubTime = this.unixTimestampToString(module_author.pub_ts);
|
|
184
|
+
// dynamicCard
|
|
172
185
|
let dynamicCardUrl;
|
|
173
186
|
let dynamicCardId;
|
|
174
187
|
let dynamicCardColor;
|
|
@@ -184,16 +197,15 @@ class GenerateImg extends koishi_1.Service {
|
|
|
184
197
|
const like = module_stat.like.count;
|
|
185
198
|
// TOPIC
|
|
186
199
|
const topic = data.modules.module_dynamic.topic ? data.modules.module_dynamic.topic.name : '';
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
const module_dynamic = data.modules.module_dynamic;
|
|
200
|
+
async function getDynamicMajor(dynamicMajorData, forward) {
|
|
201
|
+
// 定义返回值
|
|
202
|
+
let main = '';
|
|
203
|
+
let link = '';
|
|
204
|
+
// 定义forward类型返回值
|
|
205
|
+
let forwardInfo;
|
|
206
|
+
// 最基本的图文处理
|
|
207
|
+
function basicDynamic() {
|
|
208
|
+
const module_dynamic = dynamicMajorData.modules.module_dynamic;
|
|
197
209
|
const richText = module_dynamic.desc.rich_text_nodes.reduce((accumulator, currentValue) => {
|
|
198
210
|
if (currentValue.emoji) {
|
|
199
211
|
return accumulator + `<img style="width:22px; height:22px;" src="${currentValue.emoji.icon_url}"/>`;
|
|
@@ -204,115 +216,250 @@ class GenerateImg extends koishi_1.Service {
|
|
|
204
216
|
}, '');
|
|
205
217
|
// 查找\n
|
|
206
218
|
const text = richText.replace(/\n/g, '<br>');
|
|
219
|
+
// 拼接字符串
|
|
220
|
+
text && (main += `
|
|
221
|
+
<div class="card-details">
|
|
222
|
+
${text}
|
|
223
|
+
</div>
|
|
224
|
+
`);
|
|
225
|
+
// 图片
|
|
207
226
|
let major = '';
|
|
208
|
-
if (module_dynamic.major) {
|
|
227
|
+
if (module_dynamic.major && module_dynamic.major.draw) {
|
|
209
228
|
if (module_dynamic.major.draw.items.length === 1) {
|
|
210
|
-
major
|
|
229
|
+
major += `<img class="single-photo-item" src="${module_dynamic.major.draw.items[0].src}"/>`;
|
|
230
|
+
}
|
|
231
|
+
else if (module_dynamic.major.draw.items.length === 4) {
|
|
232
|
+
major += module_dynamic.major.draw.items.reduce((acc, cV) => {
|
|
233
|
+
return acc + `<img class="four-photo-item" src="${cV.src}"/>`;
|
|
234
|
+
}, '');
|
|
211
235
|
}
|
|
212
236
|
else {
|
|
213
|
-
major
|
|
237
|
+
major += module_dynamic.major.draw.items.reduce((acc, cV) => {
|
|
214
238
|
return acc + `<img class="photo-item" src="${cV.src}"/>`;
|
|
215
239
|
}, '');
|
|
216
240
|
}
|
|
241
|
+
main += `
|
|
242
|
+
<div class="card-major">
|
|
243
|
+
${major}
|
|
244
|
+
</div>
|
|
245
|
+
`;
|
|
217
246
|
}
|
|
218
|
-
main = `
|
|
219
|
-
<div class="card-details">
|
|
220
|
-
${text}
|
|
221
|
-
</div>
|
|
222
|
-
<div class="card-major">
|
|
223
|
-
${major}
|
|
224
|
-
</div>
|
|
225
|
-
`;
|
|
226
|
-
link = `请将$替换为. www$bilibili$com/opus/${data.id_str}`;
|
|
227
|
-
break;
|
|
228
247
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
248
|
+
// 判断动态类型
|
|
249
|
+
switch (dynamicMajorData.type) {
|
|
250
|
+
case DYNAMIC_TYPE_WORD:
|
|
251
|
+
case DYNAMIC_TYPE_DRAW:
|
|
252
|
+
case DYNAMIC_TYPE_FORWARD: {
|
|
253
|
+
// DYNAMIC_TYPE_DRAW 带图动态 DYNAMIC_TYPE_WORD 文字动态 DYNAMIC_TYPE_FORWARD 转发动态
|
|
254
|
+
basicDynamic();
|
|
255
|
+
// 转发动态
|
|
256
|
+
if (dynamicMajorData.type === DYNAMIC_TYPE_FORWARD) {
|
|
257
|
+
// User info
|
|
258
|
+
const forward_module_author = dynamicMajorData.orig.modules.module_author;
|
|
259
|
+
const forwardUserAvatarUrl = forward_module_author.face;
|
|
260
|
+
const forwardUserName = forward_module_author.name;
|
|
261
|
+
// 获取转发的动态
|
|
262
|
+
const [forwardMain, _, forwardInfo] = await getDynamicMajor(dynamicMajorData.orig, true);
|
|
263
|
+
// 拼接main
|
|
264
|
+
main += `
|
|
265
|
+
<div class="card-forward">
|
|
266
|
+
<div class="forward-userinfo">
|
|
267
|
+
<img class="forward-avatar" src="${forwardUserAvatarUrl}" alt="">
|
|
268
|
+
<span class="forward-username">${forwardUserName} ${forwardInfo}</span>
|
|
246
269
|
</div>
|
|
247
|
-
<div class="
|
|
248
|
-
${
|
|
270
|
+
<div class="forward-main">
|
|
271
|
+
${forwardMain}
|
|
249
272
|
</div>
|
|
250
273
|
</div>
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
274
|
+
`;
|
|
275
|
+
}
|
|
276
|
+
// 判断是否有附加信息
|
|
277
|
+
if (dynamicMajorData.modules.module_dynamic.additional) {
|
|
278
|
+
const additional = dynamicMajorData.modules.module_dynamic.additional;
|
|
279
|
+
// 有附加信息,判断类型
|
|
280
|
+
switch (additional.type) {
|
|
281
|
+
case ADDITIONAL_TYPE_RESERVE: { // 预约信息
|
|
282
|
+
const reserve = additional.reserve;
|
|
283
|
+
// 定义按钮
|
|
284
|
+
let button;
|
|
285
|
+
// 判断按钮类型
|
|
286
|
+
if (reserve.button.uncheck.text === '已结束') {
|
|
287
|
+
button = `
|
|
288
|
+
<button class="reserve-button-end">
|
|
289
|
+
<span>${reserve.button.uncheck.text}</span>
|
|
290
|
+
</button>
|
|
291
|
+
`;
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
button = `
|
|
295
|
+
<button class="reserve-button-ing">
|
|
296
|
+
<svg class="bili-dyn-card-reserve__action__icon" style="width: 16px; height: 16px;"
|
|
297
|
+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
298
|
+
viewBox="0 0 16 16" width="16" height="16">
|
|
299
|
+
<path
|
|
300
|
+
d="M3.0000133333333334 6.999199999999999C3.0000133333333334 4.23776 5.2385866666666665 1.9991866666666667 8 1.9991866666666667C10.761433333333333 1.9991866666666667 13 4.23776 13 6.999199999999999L13 9.860933333333332C13 9.923533333333333 13.024899999999999 9.983633333333334 13.069199999999999 10.027933333333333L13.588366666666666 10.5471C14.389533333333333 11.348299999999998 13.914133333333334 12.734533333333333 12.754199999999999 12.8183C11.535999999999998 12.906233333333333 9.818933333333334 12.999199999999998 8 12.999199999999998C6.181073333333334 12.999199999999998 4.464026666666666 12.906233333333333 3.2458266666666664 12.8183C2.0859066666666664 12.734533333333333 1.61046 11.348299999999998 2.4116466666666665 10.547133333333333L2.93084 10.027933333333333C2.975133333333333 9.983633333333334 3.0000133333333334 9.923533333333333 3.0000133333333334 9.860933333333332L3.0000133333333334 6.999199999999999zM8 2.9991866666666667C5.790873333333334 2.9991866666666667 4.000013333333333 4.790046666666666 4.000013333333333 6.999199999999999L4.000013333333333 9.860933333333332C4.000013333333333 10.1888 3.8697733333333333 10.5032 3.6379466666666667 10.735033333333334L3.1187466666666666 11.254233333333334C2.911966666666667 11.461 3.0317600000000002 11.800199999999998 3.317833333333333 11.820899999999998C4.5211266666666665 11.907766666666667 6.212726666666666 11.999199999999998 8 11.999199999999998C9.787266666666666 11.999199999999998 11.4789 11.907733333333333 12.682199999999998 11.820899999999998C12.968233333333332 11.800199999999998 13.088033333333332 11.461 12.881266666666665 11.254233333333334L12.362066666666665 10.735033333333334C12.130233333333333 10.5032 12 10.1888 12 9.860933333333332L12 6.999199999999999C12 4.790046666666666 10.209166666666667 2.9991866666666667 8 2.9991866666666667z"
|
|
301
|
+
fill="currentColor"></path>
|
|
302
|
+
<path
|
|
303
|
+
d="M8.720066666666666 2.0260466666666668C8.720066666666666 2.42372 8.397666666666666 2.746093333333333 8 2.746093333333333C7.602333333333332 2.746093333333333 7.279933333333333 2.42372 7.279933333333333 2.0260466666666668C7.279933333333333 1.6283666666666667 7.602333333333332 1.3059866666666666 8 1.3059866666666666C8.397666666666666 1.3059866666666666 8.720066666666666 1.6283666666666667 8.720066666666666 2.0260466666666668z"
|
|
304
|
+
fill="currentColor"></path>
|
|
305
|
+
<path
|
|
306
|
+
d="M6.791266666666666 12.499199999999998C6.791266666666666 13.173966666666667 7.335266666666667 13.715866666666665 8 13.715866666666665C8.664766666666665 13.715866666666665 9.208733333333333 13.173966666666667 9.208733333333333 12.499199999999998L10.208733333333333 12.499199999999998C10.208733333333333 13.720566666666667 9.2227 14.715866666666665 8 14.715866666666665C6.777346666666666 14.715866666666665 5.791273333333333 13.720566666666667 5.791273333333333 12.499199999999998L6.791266666666666 12.499199999999998z"
|
|
307
|
+
fill="currentColor"></path>
|
|
308
|
+
</svg>
|
|
309
|
+
<span>${reserve.button.uncheck.text}</span>
|
|
310
|
+
</button>
|
|
311
|
+
`;
|
|
312
|
+
}
|
|
313
|
+
main += `
|
|
314
|
+
<div class="card-reserve">
|
|
315
|
+
<div class="reserve-main">
|
|
316
|
+
<div class="reserve-title">
|
|
317
|
+
${reserve.title}
|
|
318
|
+
</div>
|
|
319
|
+
<div class="reserve-desc">
|
|
320
|
+
<div class="reserve-info">
|
|
321
|
+
<span class="reserve-time">${reserve.desc1.text}</span>
|
|
322
|
+
<span class="reserve-num">${reserve.desc2.text}</span>
|
|
323
|
+
</div>
|
|
324
|
+
<div class="reserve-prize">
|
|
325
|
+
<svg class="bili-dyn-card-reserve__lottery__icon"
|
|
326
|
+
style="width: 16px; height: 16px;" xmlns="http://www.w3.org/2000/svg"
|
|
327
|
+
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16" width="16"
|
|
328
|
+
height="16">
|
|
329
|
+
<path
|
|
330
|
+
d="M2.99998 7.785666666666666C3.2761266666666664 7.785666666666666 3.49998 8.0095 3.49998 8.285666666666666L3.49998 12.285666666666666C3.49998 12.719566666666667 3.8517599999999996 13.071333333333332 4.285693333333333 13.071333333333332L11.714266666666667 13.071333333333332C12.1482 13.071333333333332 12.5 12.719566666666667 12.5 12.285666666666666L12.5 8.285666666666666C12.5 8.0095 12.723833333333333 7.785666666666666 13 7.785666666666666C13.276133333333334 7.785666666666666 13.5 8.0095 13.5 8.285666666666666L13.5 12.285666666666666C13.5 13.271866666666668 12.7005 14.071333333333332 11.714266666666667 14.071333333333332L4.285693333333333 14.071333333333332C3.2994733333333333 14.071333333333332 2.49998 13.271866666666668 2.49998 12.285666666666666L2.49998 8.285666666666666C2.49998 8.0095 2.7238399999999996 7.785666666666666 2.99998 7.785666666666666z"
|
|
331
|
+
fill="currentColor"></path>
|
|
332
|
+
<path
|
|
333
|
+
d="M1.9285533333333333 5.857139999999999C1.9285533333333333 5.107613333333333 2.5361666666666665 4.5 3.285693333333333 4.5L12.714266666666667 4.5C13.463799999999999 4.5 14.071399999999999 5.107613333333333 14.071399999999999 5.857139999999999L14.071399999999999 7.134066666666667C14.071399999999999 7.793799999999999 13.590066666666667 8.373766666666667 12.905000000000001 8.4432C12.058933333333332 8.528966666666665 10.470166666666666 8.642866666666666 8 8.642866666666666C5.529819999999999 8.642866666666666 3.9410399999999997 8.528966666666665 3.09498 8.4432C2.4099066666666666 8.373766666666667 1.9285533333333333 7.793799999999999 1.9285533333333333 7.134066666666667L1.9285533333333333 5.857139999999999zM3.285693333333333 5.5C3.088453333333333 5.5 2.9285533333333333 5.6599 2.9285533333333333 5.857139999999999L2.9285533333333333 7.134066666666667C2.9285533333333333 7.3082 3.0432666666666663 7.432833333333333 3.1958066666666665 7.4483C4.00544 7.530366666666667 5.560420000000001 7.6428666666666665 8 7.6428666666666665C10.439566666666666 7.6428666666666665 11.994533333333333 7.530366666666667 12.804133333333333 7.4483C12.9567 7.432833333333333 13.071399999999999 7.3082 13.071399999999999 7.134066666666667L13.071399999999999 5.857139999999999C13.071399999999999 5.6599 12.911499999999998 5.5 12.714266666666667 5.5L3.285693333333333 5.5z"
|
|
334
|
+
fill="currentColor"></path>
|
|
335
|
+
<path
|
|
336
|
+
d="M4.357126666666666 3.5714733333333335C4.357126666666666 2.506353333333333 5.220573333333333 1.6429066666666667 6.285693333333333 1.6429066666666667C7.350833333333332 1.6429066666666667 8.214266666666667 2.506353333333333 8.214266666666667 3.5714733333333335L8.214266666666667 5.500046666666666L6.285693333333333 5.500046666666666C5.220573333333333 5.500046666666666 4.357126666666666 4.636593333333333 4.357126666666666 3.5714733333333335zM6.285693333333333 2.6429066666666667C5.77286 2.6429066666666667 5.357126666666667 3.0586399999999996 5.357126666666667 3.5714733333333335C5.357126666666667 4.084313333333333 5.77286 4.500046666666666 6.285693333333333 4.500046666666666L7.214266666666667 4.500046666666666L7.214266666666667 3.5714733333333335C7.214266666666667 3.0586399999999996 6.798533333333333 2.6429066666666667 6.285693333333333 2.6429066666666667z"
|
|
337
|
+
fill="currentColor"></path>
|
|
338
|
+
<path
|
|
339
|
+
d="M7.785666666666666 3.5714733333333335C7.785666666666666 2.506353333333333 8.649133333333332 1.6429066666666667 9.714266666666667 1.6429066666666667C10.779399999999999 1.6429066666666667 11.642866666666666 2.506353333333333 11.642866666666666 3.5714733333333335C11.642866666666666 4.636593333333333 10.779399999999999 5.500046666666666 9.714266666666667 5.500046666666666L7.785666666666666 5.500046666666666L7.785666666666666 3.5714733333333335zM9.714266666666667 2.6429066666666667C9.201433333333332 2.6429066666666667 8.785666666666666 3.0586399999999996 8.785666666666666 3.5714733333333335L8.785666666666666 4.500046666666666L9.714266666666667 4.500046666666666C10.2271 4.500046666666666 10.642866666666666 4.084313333333333 10.642866666666666 3.5714733333333335C10.642866666666666 3.0586399999999996 10.2271 2.6429066666666667 9.714266666666667 2.6429066666666667z"
|
|
340
|
+
fill="currentColor"></path>
|
|
341
|
+
<path
|
|
342
|
+
d="M8 3.7856466666666666C8.276133333333332 3.7856466666666666 8.5 4.009499999999999 8.5 4.285646666666667L8.5 13.142800000000001C8.5 13.418933333333332 8.276133333333332 13.642800000000001 8 13.642800000000001C7.723833333333333 13.642800000000001 7.5 13.418933333333332 7.5 13.142800000000001L7.5 4.285646666666667C7.5 4.009499999999999 7.723833333333333 3.7856466666666666 8 3.7856466666666666z"
|
|
343
|
+
fill="currentColor"></path>
|
|
344
|
+
</svg>
|
|
345
|
+
<span>${reserve.desc3.text}</span>
|
|
346
|
+
<svg style="width: 12px; height: 12px;" xmlns="http://www.w3.org/2000/svg"
|
|
347
|
+
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 12 12" width="12"
|
|
348
|
+
height="12">
|
|
349
|
+
<path
|
|
350
|
+
d="M4.359835 1.609835C4.21339 1.756285 4.21339 1.99372 4.359835 2.140165L8.0429 5.823225C8.140525 5.920875 8.140525 6.079125 8.0429 6.176775L4.359835 9.859825C4.21339 10.006275 4.21339 10.243725 4.359835 10.390175C4.506285 10.5366 4.743725 10.5366 4.89017 10.390175L8.573225 6.7071C8.96375 6.316575 8.96375 5.683425 8.573225 5.2929L4.89017 1.609835C4.743725 1.46339 4.506285 1.46339 4.359835 1.609835z"
|
|
351
|
+
fill="currentColor"></path>
|
|
352
|
+
</svg>
|
|
353
|
+
</div>
|
|
354
|
+
</div>
|
|
355
|
+
</div>
|
|
356
|
+
<div class="reserve-button">
|
|
357
|
+
${button}
|
|
358
|
+
</div>
|
|
359
|
+
</div>
|
|
360
|
+
`;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
link += `请将$替换为. www$bilibili$com/opus/${dynamicMajorData.id_str}`;
|
|
365
|
+
break;
|
|
366
|
+
}
|
|
367
|
+
case DYNAMIC_TYPE_AV: { // 投稿新视频
|
|
368
|
+
// 处理文字
|
|
369
|
+
basicDynamic();
|
|
370
|
+
const archive = dynamicMajorData.modules.module_dynamic.major.archive;
|
|
371
|
+
if (archive.badge.text === '投稿视频') {
|
|
372
|
+
if (forward) {
|
|
373
|
+
forwardInfo = '投稿了视频';
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
pubTime = `${pubTime} · 投稿了视频`;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
main += `
|
|
380
|
+
<div class="card-video">
|
|
381
|
+
<div class="video-cover">
|
|
382
|
+
<img src="${archive.cover}"
|
|
383
|
+
alt="">
|
|
384
|
+
<div class="cover-mask"></div>
|
|
385
|
+
<span>${archive.duration_text}</span>
|
|
386
|
+
</div>
|
|
387
|
+
<div class="video-info">
|
|
388
|
+
<div class="video-info-header">
|
|
389
|
+
<div class="video-title">
|
|
390
|
+
${archive.title}
|
|
391
|
+
</div>
|
|
392
|
+
<div class="video-introduction">
|
|
393
|
+
${archive.desc}
|
|
394
|
+
</div>
|
|
264
395
|
</div>
|
|
265
|
-
<div class="video-stat
|
|
266
|
-
<
|
|
267
|
-
xmlns
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
396
|
+
<div class="video-stat">
|
|
397
|
+
<div class="video-stat-item">
|
|
398
|
+
<svg style="width: 16px; height: 16px;" xmlns="http://www.w3.org/2000/svg"
|
|
399
|
+
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16" width="16"
|
|
400
|
+
height="16">
|
|
401
|
+
<path
|
|
402
|
+
d="M8 3.3320333333333334C6.321186666666667 3.3320333333333334 4.855333333333333 3.4174399999999996 3.820593333333333 3.5013466666666666C3.1014733333333333 3.5596599999999996 2.5440733333333334 4.109013333333333 2.48 4.821693333333333C2.4040466666666664 5.666533333333334 2.333333333333333 6.780666666666666 2.333333333333333 7.998666666666666C2.333333333333333 9.216733333333334 2.4040466666666664 10.330866666666665 2.48 11.175699999999999C2.5440733333333334 11.888366666666666 3.1014733333333333 12.437733333333334 3.820593333333333 12.496066666666666C4.855333333333333 12.579933333333333 6.321186666666667 12.665333333333333 8 12.665333333333333C9.678999999999998 12.665333333333333 11.144933333333334 12.579933333333333 12.179733333333333 12.496033333333333C12.898733333333332 12.4377 13.456 11.888533333333331 13.520066666666667 11.176033333333333C13.595999999999998 10.331533333333333 13.666666666666666 9.217633333333332 13.666666666666666 7.998666666666666C13.666666666666666 6.779766666666667 13.595999999999998 5.665846666666667 13.520066666666667 4.821366666666666C13.456 4.108866666666666 12.898733333333332 3.55968 12.179733333333333 3.5013666666666663C11.144933333333334 3.417453333333333 9.678999999999998 3.3320333333333334 8 3.3320333333333334zM3.7397666666666667 2.50462C4.794879999999999 2.41906 6.288386666666666 2.3320333333333334 8 2.3320333333333334C9.7118 2.3320333333333334 11.2054 2.4190733333333334 12.260533333333331 2.5046399999999998C13.458733333333331 2.6018133333333333 14.407866666666665 3.5285199999999994 14.516066666666667 4.73182C14.593933333333332 5.597933333333334 14.666666666666666 6.7427 14.666666666666666 7.998666666666666C14.666666666666666 9.2547 14.593933333333332 10.399466666666665 14.516066666666667 11.2656C14.407866666666665 12.468866666666665 13.458733333333331 13.395566666666667 12.260533333333331 13.492766666666665C11.2054 13.578333333333333 9.7118 13.665333333333333 8 13.665333333333333C6.288386666666666 13.665333333333333 4.794879999999999 13.578333333333333 3.7397666666666667 13.492799999999999C2.541373333333333 13.395599999999998 1.5922066666666668 12.468633333333333 1.4840200000000001 11.265266666666665C1.4061199999999998 10.3988 1.3333333333333333 9.253866666666667 1.3333333333333333 7.998666666666666C1.3333333333333333 6.743533333333333 1.4061199999999998 5.598579999999999 1.4840200000000001 4.732153333333333C1.5922066666666668 3.5287466666666667 2.541373333333333 2.601793333333333 3.7397666666666667 2.50462z"
|
|
403
|
+
fill="currentColor"></path>
|
|
404
|
+
<path
|
|
405
|
+
d="M9.8092 7.3125C10.338433333333333 7.618066666666666 10.338433333333333 8.382 9.809166666666666 8.687533333333333L7.690799999999999 9.910599999999999C7.161566666666666 10.216133333333332 6.5 9.8342 6.500006666666666 9.223066666666666L6.500006666666666 6.776999999999999C6.500006666666666 6.165873333333334 7.161566666666666 5.783913333333333 7.690799999999999 6.089479999999999L9.8092 7.3125z"
|
|
406
|
+
fill="currentColor"></path>
|
|
407
|
+
</svg>
|
|
408
|
+
<span>${archive.stat.play}</span>
|
|
409
|
+
</div>
|
|
410
|
+
<div class="video-stat-item">
|
|
411
|
+
<svg style="width: 16px; height: 16px;" xmlns="http://www.w3.org/2000/svg"
|
|
412
|
+
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16" width="16"
|
|
413
|
+
height="16">
|
|
414
|
+
<path
|
|
415
|
+
d="M8 3.3320333333333334C6.321186666666667 3.3320333333333334 4.855333333333333 3.4174399999999996 3.820593333333333 3.5013466666666666C3.1014733333333333 3.5596599999999996 2.5440733333333334 4.109013333333333 2.48 4.821693333333333C2.4040466666666664 5.666533333333334 2.333333333333333 6.780666666666666 2.333333333333333 7.998666666666666C2.333333333333333 9.216733333333334 2.4040466666666664 10.330866666666665 2.48 11.175699999999999C2.5440733333333334 11.888366666666666 3.1014733333333333 12.437733333333334 3.820593333333333 12.496066666666666C4.855333333333333 12.579933333333333 6.321186666666667 12.665333333333333 8 12.665333333333333C9.678999999999998 12.665333333333333 11.144933333333334 12.579933333333333 12.179733333333333 12.496033333333333C12.898733333333332 12.4377 13.456 11.888533333333331 13.520066666666667 11.176033333333333C13.595999999999998 10.331533333333333 13.666666666666666 9.217633333333332 13.666666666666666 7.998666666666666C13.666666666666666 6.779766666666667 13.595999999999998 5.665846666666667 13.520066666666667 4.821366666666666C13.456 4.108866666666666 12.898733333333332 3.55968 12.179733333333333 3.5013666666666663C11.144933333333334 3.417453333333333 9.678999999999998 3.3320333333333334 8 3.3320333333333334zM3.7397666666666667 2.50462C4.794879999999999 2.41906 6.288386666666666 2.3320333333333334 8 2.3320333333333334C9.7118 2.3320333333333334 11.2054 2.4190733333333334 12.260533333333331 2.5046399999999998C13.458733333333331 2.6018133333333333 14.407866666666665 3.5285199999999994 14.516066666666667 4.73182C14.593933333333332 5.597933333333334 14.666666666666666 6.7427 14.666666666666666 7.998666666666666C14.666666666666666 9.2547 14.593933333333332 10.399466666666665 14.516066666666667 11.2656C14.407866666666665 12.468866666666665 13.458733333333331 13.395566666666667 12.260533333333331 13.492766666666665C11.2054 13.578333333333333 9.7118 13.665333333333333 8 13.665333333333333C6.288386666666666 13.665333333333333 4.794879999999999 13.578333333333333 3.7397666666666667 13.492799999999999C2.541373333333333 13.395599999999998 1.5922066666666668 12.468633333333333 1.4840200000000001 11.265266666666665C1.4061199999999998 10.3988 1.3333333333333333 9.253866666666667 1.3333333333333333 7.998666666666666C1.3333333333333333 6.743533333333333 1.4061199999999998 5.598579999999999 1.4840200000000001 4.732153333333333C1.5922066666666668 3.5287466666666667 2.541373333333333 2.601793333333333 3.7397666666666667 2.50462z"
|
|
416
|
+
fill="currentColor"></path>
|
|
417
|
+
<path
|
|
418
|
+
d="M10.583333333333332 7.166666666666666L6.583333333333333 7.166666666666666C6.307193333333332 7.166666666666666 6.083333333333333 6.942799999999999 6.083333333333333 6.666666666666666C6.083333333333333 6.390526666666666 6.307193333333332 6.166666666666666 6.583333333333333 6.166666666666666L10.583333333333332 6.166666666666666C10.859466666666666 6.166666666666666 11.083333333333332 6.390526666666666 11.083333333333332 6.666666666666666C11.083333333333332 6.942799999999999 10.859466666666666 7.166666666666666 10.583333333333332 7.166666666666666z"
|
|
419
|
+
fill="currentColor"></path>
|
|
420
|
+
<path
|
|
421
|
+
d="M11.583333333333332 9.833333333333332L7.583333333333333 9.833333333333332C7.3072 9.833333333333332 7.083333333333333 9.609466666666666 7.083333333333333 9.333333333333332C7.083333333333333 9.0572 7.3072 8.833333333333332 7.583333333333333 8.833333333333332L11.583333333333332 8.833333333333332C11.859466666666666 8.833333333333332 12.083333333333332 9.0572 12.083333333333332 9.333333333333332C12.083333333333332 9.609466666666666 11.859466666666666 9.833333333333332 11.583333333333332 9.833333333333332z"
|
|
422
|
+
fill="currentColor"></path>
|
|
423
|
+
<path
|
|
424
|
+
d="M5.25 6.666666666666666C5.25 6.942799999999999 5.02614 7.166666666666666 4.75 7.166666666666666L4.416666666666666 7.166666666666666C4.140526666666666 7.166666666666666 3.9166666666666665 6.942799999999999 3.9166666666666665 6.666666666666666C3.9166666666666665 6.390526666666666 4.140526666666666 6.166666666666666 4.416666666666666 6.166666666666666L4.75 6.166666666666666C5.02614 6.166666666666666 5.25 6.390526666666666 5.25 6.666666666666666z"
|
|
425
|
+
fill="currentColor"></path>
|
|
426
|
+
<path
|
|
427
|
+
d="M6.25 9.333333333333332C6.25 9.609466666666666 6.02614 9.833333333333332 5.75 9.833333333333332L5.416666666666666 9.833333333333332C5.140526666666666 9.833333333333332 4.916666666666666 9.609466666666666 4.916666666666666 9.333333333333332C4.916666666666666 9.0572 5.140526666666666 8.833333333333332 5.416666666666666 8.833333333333332L5.75 8.833333333333332C6.02614 8.833333333333332 6.25 9.0572 6.25 9.333333333333332z"
|
|
428
|
+
fill="currentColor"></path>
|
|
429
|
+
</svg>
|
|
430
|
+
<span>${archive.stat.danmaku}</span>
|
|
431
|
+
</div>
|
|
286
432
|
</div>
|
|
287
433
|
</div>
|
|
288
434
|
</div>
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
435
|
+
`;
|
|
436
|
+
link = `请将$替换为. www$bilibili$com/video/${archive.bvid}`;
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
case DYNAMIC_TYPE_LIVE: return [`${upName}发起了直播预约,我暂时无法渲染,请自行查看`, link];
|
|
440
|
+
case DYNAMIC_TYPE_MEDIALIST: return [`${upName}分享了收藏夹,我暂时无法渲染,请自行查看`, link];
|
|
441
|
+
case DYNAMIC_TYPE_PGC: return [`${upName}发布了剧集(番剧、电影、纪录片),我暂时无法渲染,请自行查看`, link];
|
|
442
|
+
case DYNAMIC_TYPE_ARTICLE: return [`${upName}投稿了新专栏,我暂时无法渲染,请自行查看`, link];
|
|
443
|
+
case DYNAMIC_TYPE_MUSIC: return [`${upName}发行了新歌,我暂时无法渲染,请自行查看`, link];
|
|
444
|
+
case DYNAMIC_TYPE_COMMON_SQUARE: return [`${upName}发布了装扮|剧集|点评|普通分享,我暂时无法渲染,请自行查看`, link];
|
|
445
|
+
case DYNAMIC_TYPE_COURSES_SEASON: return [`${upName}发布了新课程,我暂时无法渲染,请自行查看`, link];
|
|
446
|
+
case DYNAMIC_TYPE_UGC_SEASON: return [`${upName}更新了合集,我暂时无法渲染,请自行查看`, link];
|
|
447
|
+
case DYNAMIC_TYPE_NONE: return [`${upName}发布了一条无效动态`, link];
|
|
448
|
+
// 直播开播,不做处理
|
|
449
|
+
case DYNAMIC_TYPE_LIVE_RCMD: return ['', ''];
|
|
450
|
+
case DYNAMIC_TYPE_SUBSCRIPTION_NEW:
|
|
451
|
+
case DYNAMIC_TYPE_BANNER:
|
|
452
|
+
case DYNAMIC_TYPE_SUBSCRIPTION:
|
|
453
|
+
case DYNAMIC_TYPE_APPLET:
|
|
454
|
+
case DYNAMIC_TYPE_AD:
|
|
455
|
+
case DYNAMIC_TYPE_COURSES_BATCH:
|
|
456
|
+
case DYNAMIC_TYPE_COURSES:
|
|
457
|
+
case DYNAMIC_TYPE_COMMON_VERTICAL:
|
|
458
|
+
default: return [`${upName}发布了一条我无法识别的动态,请自行查看`, ''];
|
|
459
|
+
}
|
|
460
|
+
return [main, link, forwardInfo];
|
|
315
461
|
}
|
|
462
|
+
const [main, link] = await getDynamicMajor(data, false);
|
|
316
463
|
const pic = await this.ctx.puppeteer.render(`
|
|
317
464
|
<!DOCTYPE html>
|
|
318
465
|
<html>
|
|
@@ -334,7 +481,7 @@ class GenerateImg extends koishi_1.Service {
|
|
|
334
481
|
.background {
|
|
335
482
|
width: 770px;
|
|
336
483
|
height: auto;
|
|
337
|
-
background: linear-gradient(to right bottom, ${this.config.
|
|
484
|
+
background: linear-gradient(to right bottom, ${this.config.cardColorStart}, ${this.config.cardColorEnd});
|
|
338
485
|
overflow: hidden;
|
|
339
486
|
}
|
|
340
487
|
|
|
@@ -451,10 +598,18 @@ class GenerateImg extends koishi_1.Service {
|
|
|
451
598
|
}
|
|
452
599
|
|
|
453
600
|
.card .card-major .single-photo-item {
|
|
454
|
-
max-width:
|
|
455
|
-
|
|
601
|
+
max-width: 500px;
|
|
602
|
+
border-radius: 10px;
|
|
603
|
+
overflow: hidden;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.card .card-major .four-photo-item {
|
|
607
|
+
width: 170px;
|
|
608
|
+
height: 170px;
|
|
609
|
+
object-fit: cover;
|
|
456
610
|
border-radius: 10px;
|
|
457
611
|
overflow: hidden;
|
|
612
|
+
flex-basis: 20%; /* or any value less than 50% */
|
|
458
613
|
}
|
|
459
614
|
|
|
460
615
|
.card .card-stat {
|
|
@@ -476,6 +631,7 @@ class GenerateImg extends koishi_1.Service {
|
|
|
476
631
|
display: flex;
|
|
477
632
|
overflow: hidden;
|
|
478
633
|
border-radius: 5px 0 0 5px;
|
|
634
|
+
margin-top: 10px;
|
|
479
635
|
height: 132px;
|
|
480
636
|
}
|
|
481
637
|
|
|
@@ -515,6 +671,7 @@ class GenerateImg extends koishi_1.Service {
|
|
|
515
671
|
border-left: none;
|
|
516
672
|
border-radius: 0 5px 5px 0;
|
|
517
673
|
padding: 12px 16px 10px;
|
|
674
|
+
background-color: #fff;
|
|
518
675
|
}
|
|
519
676
|
|
|
520
677
|
.card .video-info-header .video-title {
|
|
@@ -547,6 +704,87 @@ class GenerateImg extends koishi_1.Service {
|
|
|
547
704
|
align-items: center;
|
|
548
705
|
gap: 3px;
|
|
549
706
|
}
|
|
707
|
+
|
|
708
|
+
.card .card-forward {
|
|
709
|
+
margin: 0 -15px 0 -85px;
|
|
710
|
+
padding: 12px 15px 14px 85px;
|
|
711
|
+
background-color: #F6F7F8;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.card-forward .forward-userinfo {
|
|
715
|
+
display: flex;
|
|
716
|
+
align-items: center;
|
|
717
|
+
gap: 5px;
|
|
718
|
+
height: 30px;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.forward-userinfo img {
|
|
722
|
+
width: 20px;
|
|
723
|
+
height: 20px;
|
|
724
|
+
border-radius: 50%;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.forward-userinfo span {
|
|
728
|
+
color: #61666D;
|
|
729
|
+
font-size: 15px;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.card .card-reserve {
|
|
733
|
+
display: flex;
|
|
734
|
+
justify-content: space-between;
|
|
735
|
+
align-items: center;
|
|
736
|
+
padding: 10px 20px 10px 20px;
|
|
737
|
+
margin-top: 10px;
|
|
738
|
+
border-radius: 10px;
|
|
739
|
+
background-color: #F6F7F8;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.card-reserve .reserve-title {
|
|
743
|
+
font-size: 14px;
|
|
744
|
+
color: #18191C;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.card-reserve .reserve-desc {
|
|
748
|
+
margin-top: 7px;
|
|
749
|
+
font-size: 12px;
|
|
750
|
+
color: #9499A0;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
.reserve-info .reserve-time {
|
|
754
|
+
margin-right: 7px;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.card-reserve .reserve-prize {
|
|
758
|
+
display: flex;
|
|
759
|
+
align-items: center;
|
|
760
|
+
margin-top: 3px;
|
|
761
|
+
gap: 3px;
|
|
762
|
+
color: #00AEEC;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.card .card-reserve .reserve-button button {
|
|
766
|
+
border: none;
|
|
767
|
+
height: 30px;
|
|
768
|
+
width: 72px;
|
|
769
|
+
font-size: 13px;
|
|
770
|
+
border-radius: 7px;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
.card .card-reserve .reserve-button .reserve-button-end {
|
|
774
|
+
display: flex;
|
|
775
|
+
align-items: center;
|
|
776
|
+
justify-content: center;
|
|
777
|
+
color: #9499A0;
|
|
778
|
+
background-color: #E3E5E7;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
.card .card-reserve .reserve-button .reserve-button-ing {
|
|
782
|
+
display: flex;
|
|
783
|
+
align-items: center;
|
|
784
|
+
justify-content: center;
|
|
785
|
+
color: #FFF;
|
|
786
|
+
background-color: #00A0D8;
|
|
787
|
+
}
|
|
550
788
|
</style>
|
|
551
789
|
</head>
|
|
552
790
|
|
|
@@ -657,27 +895,25 @@ class GenerateImg extends koishi_1.Service {
|
|
|
657
895
|
// 获取Unix时间戳(以毫秒为单位)
|
|
658
896
|
const unixTime = date.getTime();
|
|
659
897
|
// 获取当前Unix时间戳
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
`${hours}小时${minutes.toString().padStart(2, '0')}分钟${seconds.toString().padStart(2, '0')}秒`;
|
|
673
|
-
});
|
|
898
|
+
const now = Date.now();
|
|
899
|
+
// 计算时间差(以秒为单位)
|
|
900
|
+
const differenceInSeconds = Math.floor((now - unixTime) / 1000);
|
|
901
|
+
// 获取yyyy:MM:dd HH:mm:ss
|
|
902
|
+
const days = Math.floor(differenceInSeconds / (24 * 60 * 60));
|
|
903
|
+
const hours = Math.floor((differenceInSeconds % (24 * 60 * 60)) / (60 * 60));
|
|
904
|
+
const minutes = Math.floor((differenceInSeconds % (60 * 60)) / 60);
|
|
905
|
+
const seconds = differenceInSeconds % 60;
|
|
906
|
+
// 返回格式化的字符串
|
|
907
|
+
return days ?
|
|
908
|
+
`${days} 天 ${hours}小时${minutes.toString().padStart(2, '0')}分钟${seconds.toString().padStart(2, '0')}秒` :
|
|
909
|
+
`${hours}小时${minutes.toString().padStart(2, '0')}分钟${seconds.toString().padStart(2, '0')}秒`;
|
|
674
910
|
}
|
|
675
911
|
unixTimestampToString(timestamp) {
|
|
676
912
|
const date = new Date(timestamp * 1000);
|
|
677
913
|
const year = date.getFullYear();
|
|
678
914
|
const month = ("0" + (date.getMonth() + 1)).slice(-2);
|
|
679
915
|
const day = ("0" + date.getDate()).slice(-2);
|
|
680
|
-
const hours = ("0" + date.getHours()).slice(-2);
|
|
916
|
+
const hours = ("0" + (date.getHours())).slice(-2);
|
|
681
917
|
const minutes = ("0" + date.getMinutes()).slice(-2);
|
|
682
918
|
const seconds = ("0" + date.getSeconds()).slice(-2);
|
|
683
919
|
return `${year}年${month}月${day}日 ${hours}:${minutes}:${seconds}`;
|
|
@@ -685,11 +921,11 @@ class GenerateImg extends koishi_1.Service {
|
|
|
685
921
|
}
|
|
686
922
|
(function (GenerateImg) {
|
|
687
923
|
GenerateImg.Config = koishi_1.Schema.object({
|
|
688
|
-
|
|
924
|
+
cardColorStart: koishi_1.Schema.string()
|
|
689
925
|
.pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
|
|
690
926
|
.default('#F38AB5')
|
|
691
927
|
.description('推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/'),
|
|
692
|
-
|
|
928
|
+
cardColorEnd: koishi_1.Schema.string()
|
|
693
929
|
.pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
|
|
694
930
|
.default('#F9CCDF')
|
|
695
931
|
.description('推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/')
|
package/lib/index.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import { Context, Schema } from 'koishi';
|
|
|
2
2
|
export declare const name = "bilibili-notify";
|
|
3
3
|
export interface Config {
|
|
4
4
|
pushTime: number;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
cardColorStart: string;
|
|
6
|
+
cardColorEnd: string;
|
|
7
|
+
key: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const Config: Schema<Config>;
|
|
9
10
|
export declare function apply(ctx: Context, config: Config): void;
|
package/lib/index.js
CHANGED
|
@@ -45,22 +45,27 @@ exports.Config = koishi_1.Schema.object({
|
|
|
45
45
|
.step(1)
|
|
46
46
|
.role('slider')
|
|
47
47
|
.default(1)
|
|
48
|
-
.description('
|
|
49
|
-
|
|
48
|
+
.description('设定隔多长时间推送一次直播状态,单位为半小时,默认为半小时'),
|
|
49
|
+
cardColorStart: koishi_1.Schema.string()
|
|
50
50
|
.pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
|
|
51
51
|
.default('#F38AB5')
|
|
52
52
|
.description('推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/'),
|
|
53
|
-
|
|
53
|
+
cardColorEnd: koishi_1.Schema.string()
|
|
54
54
|
.pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
|
|
55
55
|
.default('#F9CCDF')
|
|
56
|
-
.description('推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/')
|
|
56
|
+
.description('推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/'),
|
|
57
|
+
key: koishi_1.Schema.string()
|
|
58
|
+
.pattern(/^[0-9a-f]{32}$/)
|
|
59
|
+
.role('secret')
|
|
60
|
+
.required()
|
|
61
|
+
.description('请输入一个32位小写字母的十六进制密钥(例如:9b8db7ae562b9864efefe06289cc5530),使用此密钥将你的B站登录信息存储在数据库中,请一定保存好此密钥。如果你忘记了此密钥,必须重新登录。你可以自行生成,或到这个网站生成:https://www.sexauth.com/')
|
|
57
62
|
});
|
|
58
63
|
function apply(ctx, config) {
|
|
59
64
|
// load database
|
|
60
65
|
ctx.plugin(Database);
|
|
61
66
|
// Regist server
|
|
62
|
-
ctx.plugin(wbi_1.default);
|
|
63
|
-
ctx.plugin(generateImg_1.default, {
|
|
67
|
+
ctx.plugin(wbi_1.default, { key: config.key });
|
|
68
|
+
ctx.plugin(generateImg_1.default, { cardColorStart: config.cardColorStart, cardColorEnd: config.cardColorEnd });
|
|
64
69
|
ctx.plugin(biliAPI_1.default);
|
|
65
70
|
// load plugin
|
|
66
71
|
ctx.plugin(comRegister_1.default, { pushTime: config.pushTime });
|
package/lib/wbi.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Context, Service } from "koishi";
|
|
1
|
+
import { Context, Schema, Service } from "koishi";
|
|
2
2
|
declare module 'koishi' {
|
|
3
3
|
interface Context {
|
|
4
4
|
wbi: Wbi;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
declare class Wbi extends Service {
|
|
8
|
-
|
|
8
|
+
config: Wbi.Config;
|
|
9
9
|
mixinKeyEncTab: number[];
|
|
10
|
-
constructor(ctx: Context);
|
|
10
|
+
constructor(ctx: Context, config: Wbi.Config);
|
|
11
11
|
protected start(): void | Promise<void>;
|
|
12
12
|
getMixinKey: (orig: any) => string;
|
|
13
13
|
encWbi(params: any, img_key: any, sub_key: any): string;
|
|
@@ -19,4 +19,10 @@ declare class Wbi extends Service {
|
|
|
19
19
|
encrypt(text: string, secretKey?: string): string;
|
|
20
20
|
decrypt(text: string, secretKey?: string): string;
|
|
21
21
|
}
|
|
22
|
+
declare namespace Wbi {
|
|
23
|
+
interface Config {
|
|
24
|
+
key: string;
|
|
25
|
+
}
|
|
26
|
+
const Config: Schema<Config>;
|
|
27
|
+
}
|
|
22
28
|
export default Wbi;
|
package/lib/wbi.js
CHANGED
|
@@ -7,15 +7,16 @@ const koishi_1 = require("koishi");
|
|
|
7
7
|
const md5_1 = __importDefault(require("md5"));
|
|
8
8
|
const crypto_1 = __importDefault(require("crypto"));
|
|
9
9
|
class Wbi extends koishi_1.Service {
|
|
10
|
-
|
|
10
|
+
config;
|
|
11
11
|
mixinKeyEncTab = [
|
|
12
12
|
46, 47, 18, 2, 53, 8, 23, 32, 15, 50, 10, 31, 58, 3, 45, 35, 27, 43, 5, 49,
|
|
13
13
|
33, 9, 42, 19, 29, 28, 14, 39, 12, 38, 41, 13, 37, 48, 7, 16, 24, 55, 40,
|
|
14
14
|
61, 26, 17, 0, 1, 60, 51, 30, 4, 22, 25, 54, 21, 56, 59, 6, 63, 57, 62, 11,
|
|
15
15
|
36, 20, 34, 44, 52
|
|
16
16
|
];
|
|
17
|
-
constructor(ctx) {
|
|
17
|
+
constructor(ctx, config) {
|
|
18
18
|
super(ctx, 'wbi');
|
|
19
|
+
this.config = config;
|
|
19
20
|
}
|
|
20
21
|
start() {
|
|
21
22
|
this.logger.info('wbi已被注册到Context中');
|
|
@@ -61,7 +62,7 @@ class Wbi extends koishi_1.Service {
|
|
|
61
62
|
}
|
|
62
63
|
encrypt(text, secretKey) {
|
|
63
64
|
const iv = crypto_1.default.randomBytes(16);
|
|
64
|
-
const cipher = crypto_1.default.createCipheriv('aes-256-cbc', Buffer.from(this.key), iv);
|
|
65
|
+
const cipher = crypto_1.default.createCipheriv('aes-256-cbc', Buffer.from(this.config.key), iv);
|
|
65
66
|
const encrypted = Buffer.concat([cipher.update(text), cipher.final()]);
|
|
66
67
|
return iv.toString('hex') + ':' + encrypted.toString('hex');
|
|
67
68
|
}
|
|
@@ -69,9 +70,16 @@ class Wbi extends koishi_1.Service {
|
|
|
69
70
|
let textParts = text.split(':');
|
|
70
71
|
let iv = Buffer.from(textParts.shift(), 'hex');
|
|
71
72
|
let encryptedText = Buffer.from(textParts.join(':'), 'hex');
|
|
72
|
-
let decipher = crypto_1.default.createDecipheriv('aes-256-cbc', Buffer.from(this.key), iv);
|
|
73
|
+
let decipher = crypto_1.default.createDecipheriv('aes-256-cbc', Buffer.from(this.config.key), iv);
|
|
73
74
|
let decrypted = Buffer.concat([decipher.update(encryptedText), decipher.final()]);
|
|
74
75
|
return decrypted.toString();
|
|
75
76
|
}
|
|
76
77
|
}
|
|
78
|
+
(function (Wbi) {
|
|
79
|
+
Wbi.Config = koishi_1.Schema.object({
|
|
80
|
+
key: koishi_1.Schema.string()
|
|
81
|
+
.pattern(/^[0-9a-f]{32}$/)
|
|
82
|
+
.required()
|
|
83
|
+
});
|
|
84
|
+
})(Wbi || (Wbi = {}));
|
|
77
85
|
exports.default = Wbi;
|