koishi-plugin-bilibili-notify 3.2.7-alpha.1 → 3.2.8-alpha.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/index.js CHANGED
@@ -51,6 +51,94 @@ const tough_cookie = __toESM$1(require("tough-cookie"));
51
51
  const jsdom = __toESM$1(require("jsdom"));
52
52
  const __akokko_blive_message_listener = __toESM$1(require("@akokko/blive-message-listener"));
53
53
 
54
+ //#region src/config.ts
55
+ const BAConfigSchema = koishi.Schema.object({
56
+ require: koishi.Schema.object({}).description("必填设置"),
57
+ key: koishi.Schema.string().pattern(/^[0-9a-f]{32}$/).role("secret").required().description("请输入一个32位小写字母的十六进制密钥(例如:9b8db7ae562b9864efefe06289cc5530),使用此密钥将你的B站登录信息存储在数据库中,请一定保存好此密钥。如果你忘记了此密钥,必须重新登录。你可以自行生成,或到这个网站生成:https://www.sexauth.com/"),
58
+ master: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启主人账号功能,如果您的机器人没有私聊权限请不要开启此功能。开启后如果机器人运行错误会向您进行报告") }).description("主人账号"), koishi.Schema.union([koishi.Schema.object({
59
+ enable: koishi.Schema.const(true).required(),
60
+ platform: koishi.Schema.union([
61
+ "qq",
62
+ "qqguild",
63
+ "onebot",
64
+ "discord",
65
+ "red",
66
+ "telegram",
67
+ "satori",
68
+ "chronocat",
69
+ "lark"
70
+ ]).description("请选择您的私人机器人平台,目前支持QQ、QQ群、OneBot、Discord、RedBot、Telegram、Satori、ChronoCat、Lark。从2.0版本开始,只能在一个平台下使用本插件"),
71
+ masterAccount: koishi.Schema.string().role("secret").required().description("主人账号,在Q群使用可直接使用QQ号,若在其他平台使用,请使用inspect插件获取自身ID"),
72
+ masterAccountGuildId: koishi.Schema.string().role("secret").description("主人账号所在的群组ID,只有在QQ频道、Discord这样的环境才需要填写,请使用inspect插件获取群组ID")
73
+ }), koishi.Schema.object({})])]),
74
+ basicSettings: koishi.Schema.object({}).description("基本设置"),
75
+ userAgent: koishi.Schema.string().description("设置请求头User-Agen,请求出现-352时可以尝试修改,UA获取方法可参考:https://blog.csdn.net/qq_44503987/article/details/104929111"),
76
+ subTitle: koishi.Schema.object({}).description("订阅配置"),
77
+ sub: koishi.Schema.array(koishi.Schema.object({
78
+ name: koishi.Schema.string().description("订阅用户昵称,只是给你自己看的(相当于备注),可填可不填"),
79
+ uid: koishi.Schema.string().required().description("订阅用户UID"),
80
+ dynamic: koishi.Schema.boolean().default(false).description("是否订阅用户动态"),
81
+ live: koishi.Schema.boolean().default(false).description("是否订阅用户直播"),
82
+ target: koishi.Schema.array(koishi.Schema.object({
83
+ platform: koishi.Schema.string().required().description("推送平台,例如onebot、qq、discord"),
84
+ channelArr: koishi.Schema.array(koishi.Schema.object({
85
+ channelId: koishi.Schema.string().required().description("频道/群组号"),
86
+ dynamic: koishi.Schema.boolean().default(false).description("该频道/群组是否推送动态信息"),
87
+ live: koishi.Schema.boolean().default(false).description("该频道/群组是否推送直播通知"),
88
+ liveGuardBuy: koishi.Schema.boolean().default(false).description("该频道/群组是否推送上舰消息"),
89
+ atAll: koishi.Schema.boolean().default(false).description("推送开播通知时是否艾特全体成员"),
90
+ bot: koishi.Schema.string().description("若您有多个相同平台机器人,可在此填写当前群聊执行推送的机器人账号。不填则默认第一个")
91
+ })).role("table").required().description("需推送的频道/群组详细设置")
92
+ })).description("订阅用户需要发送的平台和频道/群组信息(一个平台下可以推送多个频道/群组)"),
93
+ liveMsg: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启个性化直播消息设置") }), koishi.Schema.union([koishi.Schema.object({
94
+ enable: koishi.Schema.const(true).required(),
95
+ customLiveStart: koishi.Schema.string().default("-name开播啦,当前粉丝数:-follower\\n-link").description("自定义开播提示语,-name代表UP昵称,-follower代表当前粉丝数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name开播啦,会发送为xxxUP开播啦"),
96
+ customLive: koishi.Schema.string().default("-name正在直播,目前已播-time,累计观看人数:-watched\\n-link").description("自定义直播中提示语,-name代表UP昵称,-time代表开播时长,-watched代表累计观看人数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name正在直播,会发送为xxxUP正在直播xxx"),
97
+ customLiveEnd: koishi.Schema.string().default("-name下播啦,本次直播了-time,粉丝数变化-follower_change").description("自定义下播提示语,-name代表UP昵称,-follower_change代表本场直播粉丝数变,-time代表开播时长,\\n为换行。例如-name下播啦,本次直播了-time,会发送为xxxUP下播啦,直播时长为xx小时xx分钟xx秒")
98
+ }), koishi.Schema.object({})])]),
99
+ card: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启自定义卡片颜色") }), koishi.Schema.union([koishi.Schema.object({
100
+ enable: koishi.Schema.const(true).required(),
101
+ cardColorStart: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/"),
102
+ cardColorEnd: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/"),
103
+ cardBasePlateColor: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片底板颜色,请填入16进制颜色代码"),
104
+ cardBasePlateBorder: koishi.Schema.string().pattern(/\d*\.?\d+(?:px|em|rem|%|vh|vw|vmin|vmax)/).description("推送卡片底板边框宽度,请填入css单位,例如1px,12.5rem,100%")
105
+ }), koishi.Schema.object({})])])
106
+ }).collapse()).collapse().description("输入订阅信息,自定义订阅内容; uid: 订阅用户UID,dynamic: 是否需要订阅动态,live: 是否需要订阅直播"),
107
+ dynamic: koishi.Schema.object({}).description("动态推送设置"),
108
+ dynamicUrl: koishi.Schema.boolean().default(false).description("发送动态时是否同时发送链接。注意:如果使用的是QQ官方机器人不能开启此项!"),
109
+ dynamicCron: koishi.Schema.string().default("*/2 * * * *").description("动态监测时间,请填入cron表达式,请勿填入过短时间"),
110
+ dynamicVideoUrlToBV: koishi.Schema.boolean().default(false).description("如果推送的动态是视频动态,且开启了发送链接选项,开启此选项则会将链接转换为BV号以便其他用途"),
111
+ pushImgsInDynamic: koishi.Schema.boolean().default(false).description("是否推送动态中的图片,默认不开启。开启后会单独推送动态中的图片,该功能容易导致QQ风控"),
112
+ live: koishi.Schema.object({}).description("直播推送设置"),
113
+ liveDetectType: koishi.Schema.union([koishi.Schema.const("WS").description("使用WebSocket连接到B站消息服务器进行直播检测,推荐使用"), koishi.Schema.const("API").description("通过轮询API发送请求监测直播状态,此模式理论可无限订阅,但容易产生其他问题,功能没有WS模式全面").experimental()]).role("radio").default("WS").description("直播检测方式,WS为连接到B站消息服务器,API为通过轮询发送请求监测,默认使用WS检测"),
114
+ restartPush: koishi.Schema.boolean().default(true).description("插件重启后,如果订阅的主播正在直播,是否进行一次推送,默认开启"),
115
+ pushTime: koishi.Schema.number().min(0).max(12).step(.5).default(1).description("设定间隔多长时间推送一次直播状态,单位为小时,默认为一小时"),
116
+ customLiveStart: koishi.Schema.string().default("-name开播啦,当前粉丝数:-follower\\n-link").description("自定义开播提示语,-name代表UP昵称,-follower代表当前粉丝数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name开播啦,会发送为xxxUP开播啦"),
117
+ customLive: koishi.Schema.string().default("-name正在直播,目前已播-time,累计观看人数:-watched\\n-link").description("自定义直播中提示语,-name代表UP昵称,-time代表开播时长,-watched代表累计观看人数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name正在直播,会发送为xxxUP正在直播xxx"),
118
+ customLiveEnd: koishi.Schema.string().default("-name下播啦,本次直播了-time,粉丝数变化-follower_change").description("自定义下播提示语,-name代表UP昵称,-follower_change代表本场直播粉丝数变,-time代表开播时长,\\n为换行。例如-name下播啦,本次直播了-time,会发送为xxxUP下播啦,直播时长为xx小时xx分钟xx秒"),
119
+ followerDisplay: koishi.Schema.boolean().default(true).description("粉丝数变化和累积观看本场直播的人数是否显示在推送卡片中"),
120
+ hideDesc: koishi.Schema.boolean().default(false).description("是否隐藏UP主直播间简介,开启后推送的直播卡片将不再展示简介"),
121
+ style: koishi.Schema.object({}).description("美化设置"),
122
+ removeBorder: koishi.Schema.boolean().default(false).description("移除推送卡片边框"),
123
+ cardColorStart: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#F38AB5").description("推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/"),
124
+ cardColorEnd: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#F9CCDF").description("推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/"),
125
+ cardBasePlateColor: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#FFF5EE").description("推送卡片底板颜色,请填入16进制颜色代码"),
126
+ cardBasePlateBorder: koishi.Schema.string().pattern(/\d*\.?\d+(?:px|em|rem|%|vh|vw|vmin|vmax)/).default("15px").description("推送卡片底板边框宽度,请填入css单位,例如1px,12.5rem,100%"),
127
+ enableLargeFont: koishi.Schema.boolean().default(false).description("是否开启动态推送卡片大字体模式,默认为小字体。小字体更漂亮,但阅读比较吃力,大字体更易阅读,但相对没这么好看"),
128
+ font: koishi.Schema.string().description("推送卡片的字体样式,如果你想用你自己的字体可以在此填写,例如:Microsoft YaHei"),
129
+ filter: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启动态屏蔽功能") }).description("屏蔽设置"), koishi.Schema.union([koishi.Schema.object({
130
+ enable: koishi.Schema.const(true).required().experimental(),
131
+ notify: koishi.Schema.boolean().default(false).description("动态被屏蔽是否发送提示"),
132
+ regex: koishi.Schema.string().description("正则表达式屏蔽"),
133
+ keywords: koishi.Schema.array(String).description("关键字屏蔽,一个关键字为一项"),
134
+ forward: koishi.Schema.boolean().default(false).description("是否屏蔽转发动态"),
135
+ article: koishi.Schema.boolean().default(false).description("是否屏蔽专栏")
136
+ }), koishi.Schema.object({})])]),
137
+ debug: koishi.Schema.object({}).description("调试设置"),
138
+ dynamicDebugMode: koishi.Schema.boolean().default(false).description("动态调试模式,开启后会在控制台输出动态推送的详细信息,用于调试")
139
+ });
140
+
141
+ //#endregion
54
142
  //#region node_modules/@koishijs/plugin-notifier/lib/index.mjs
55
143
  var __defProp$5 = Object.defineProperty;
56
144
  var __name$3 = (target, value) => __defProp$5(target, "name", {
@@ -741,16 +829,29 @@ var ComRegister = class {
741
829
  initManager() {
742
830
  for (const sub of this.subManager) {
743
831
  if (sub.dynamic) this.dynamicTimelineManager.set(sub.uid, Math.floor(luxon.DateTime.now().toSeconds()));
744
- if (sub.live) this.liveStatusManager.set(sub.uid, {
745
- roomId: sub.roomId,
746
- live: false,
747
- liveRoomInfo: void 0,
748
- masterInfo: void 0,
749
- watchedNum: "0",
750
- liveStartTime: "",
751
- liveStartTimeInit: false,
752
- push: 0
753
- });
832
+ if (sub.live) {
833
+ const liveMsg = {
834
+ customLiveStart: this.config.customLiveStart || "",
835
+ customLive: this.config.customLive || "",
836
+ customLiveEnd: this.config.customLiveEnd || ""
837
+ };
838
+ if (sub.liveMsg.enable) {
839
+ liveMsg.customLiveStart = sub.liveMsg.customLiveStart || this.config.customLiveStart;
840
+ liveMsg.customLive = sub.liveMsg.customLive || this.config.customLive;
841
+ liveMsg.customLiveEnd = sub.liveMsg.customLiveEnd || this.config.customLiveEnd;
842
+ }
843
+ this.liveStatusManager.set(sub.uid, {
844
+ roomId: sub.roomId,
845
+ live: false,
846
+ liveRoomInfo: void 0,
847
+ masterInfo: void 0,
848
+ watchedNum: "0",
849
+ liveStartTime: "",
850
+ liveStartTimeInit: false,
851
+ push: 0,
852
+ liveMsg
853
+ });
854
+ }
754
855
  }
755
856
  }
756
857
  getBot(pf, selfId) {
@@ -1129,6 +1230,7 @@ var ComRegister = class {
1129
1230
  let liveRoomInfo;
1130
1231
  let masterInfo;
1131
1232
  let watchedNum;
1233
+ const liveStatusObj = this.liveStatusManager.get(uid);
1132
1234
  const pushAtTimeFunc = async () => {
1133
1235
  if (!await useMasterAndLiveRoomInfo(LiveType.LiveBroadcast)) {
1134
1236
  await this.sendPrivateMsg("获取直播间信息失败,推送直播卡片失败!");
@@ -1142,7 +1244,7 @@ var ComRegister = class {
1142
1244
  }
1143
1245
  liveTime = liveRoomInfo.live_time;
1144
1246
  const watched = watchedNum || "暂未获取到";
1145
- const liveMsg = this.config.customLive ? this.config.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`) : null;
1247
+ const liveMsg = liveStatusObj?.liveMsg?.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
1146
1248
  await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
1147
1249
  liveRoomInfo,
1148
1250
  masterInfo,
@@ -1204,7 +1306,7 @@ var ComRegister = class {
1204
1306
  }
1205
1307
  liveTime = liveRoomInfo.live_time;
1206
1308
  const follower = masterInfo.liveOpenFollowerNum >= 1e4 ? `${(masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : masterInfo.liveOpenFollowerNum.toString();
1207
- const liveStartMsg = this.config.customLiveStart ? this.config.customLiveStart.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower", follower).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`) : null;
1309
+ const liveStartMsg = liveStatusObj?.liveMsg?.customLiveStart.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower", follower).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
1208
1310
  await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
1209
1311
  liveRoomInfo,
1210
1312
  masterInfo,
@@ -1224,7 +1326,7 @@ var ComRegister = class {
1224
1326
  if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
1225
1327
  return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
1226
1328
  })();
1227
- const liveEndMsg = this.config.customLiveEnd ? this.config.customLiveEnd.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower_change", followerChange).replace("\\n", "\n") : null;
1329
+ const liveEndMsg = liveStatusObj?.liveMsg?.customLiveEnd.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-follower_change", followerChange).replace("\\n", "\n");
1228
1330
  await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
1229
1331
  liveRoomInfo,
1230
1332
  masterInfo,
@@ -1239,7 +1341,7 @@ var ComRegister = class {
1239
1341
  if (liveRoomInfo.live_status === 1) {
1240
1342
  liveTime = liveRoomInfo.live_time;
1241
1343
  const watched = watchedNum || "暂未获取到";
1242
- const liveMsg = this.config.customLive ? this.config.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`) : null;
1344
+ const liveMsg = liveStatusObj?.liveMsg?.customLive.replace("-name", masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveTime)).replace("-watched", watched).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveRoomInfo.short_id === 0 ? liveRoomInfo.room_id : liveRoomInfo.short_id}`);
1243
1345
  if (this.config.restartPush) await this.sendLiveNotifyCard(LiveType.LiveBroadcast, watched, {
1244
1346
  liveRoomInfo,
1245
1347
  masterInfo,
@@ -1290,7 +1392,7 @@ var ComRegister = class {
1290
1392
  liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
1291
1393
  liveStatus.liveStartTimeInit = true;
1292
1394
  }
1293
- const liveMsg = this.config.customLive ? this.config.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`) : null;
1395
+ const liveMsg = liveStatus.liveMsg?.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
1294
1396
  await this.sendLiveNotifyCard(LiveType.LiveBroadcast, "API", {
1295
1397
  liveRoomInfo: liveStatus.liveRoomInfo,
1296
1398
  masterInfo: liveStatus.masterInfo,
@@ -1322,7 +1424,7 @@ var ComRegister = class {
1322
1424
  if (liveFollowerChangeNum > 0) return liveFollowerChangeNum >= 1e4 ? `+${liveFollowerChangeNum.toFixed(1)}万` : `+${liveFollowerChangeNum}`;
1323
1425
  return liveFollowerChangeNum <= -1e4 ? `${liveFollowerChangeNum.toFixed(1)}万` : liveFollowerChangeNum.toString();
1324
1426
  })();
1325
- const liveEndMsg = this.config.customLiveEnd ? this.config.customLiveEnd.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower_change", followerChange).replace("\\n", "\n") : null;
1427
+ const liveEndMsg = liveStatus.liveMsg?.customLiveEnd.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower_change", followerChange).replace("\\n", "\n");
1326
1428
  await this.sendLiveNotifyCard(LiveType.StopBroadcast, followerChange, {
1327
1429
  liveRoomInfo: liveStatus.liveRoomInfo,
1328
1430
  masterInfo: liveStatus.masterInfo,
@@ -1341,7 +1443,7 @@ var ComRegister = class {
1341
1443
  liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
1342
1444
  liveStatus.liveStartTimeInit = true;
1343
1445
  const follower = liveStatus.masterInfo.liveOpenFollowerNum >= 1e4 ? `${(liveStatus.masterInfo.liveOpenFollowerNum / 1e4).toFixed(1)}万` : liveStatus.masterInfo.liveOpenFollowerNum.toString();
1344
- const liveStartMsg = this.config.customLiveStart ? this.config.customLiveStart.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower", follower).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`) : null;
1446
+ const liveStartMsg = liveStatus.liveMsg?.customLiveStart.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-follower", follower).replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
1345
1447
  await this.sendLiveNotifyCard(LiveType.StartBroadcasting, follower, {
1346
1448
  liveRoomInfo: liveStatus.liveRoomInfo,
1347
1449
  masterInfo: liveStatus.masterInfo,
@@ -1362,7 +1464,7 @@ var ComRegister = class {
1362
1464
  liveStatus.liveStartTime = liveStatus.liveRoomInfo.live_time;
1363
1465
  liveStatus.liveStartTimeInit = true;
1364
1466
  }
1365
- const liveMsg = this.config.customLive ? this.config.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`) : null;
1467
+ const liveMsg = liveStatus.liveMsg?.customLive.replace("-name", liveStatus.masterInfo.username).replace("-time", await this.ctx.gi.getTimeDifference(liveStatus.liveStartTime)).replace("-watched", "API模式无法获取").replace("\\n", "\n").replace("-link", `https://live.bilibili.com/${liveStatus.liveRoomInfo.short_id === 0 ? liveStatus.liveRoomInfo.room_id : liveStatus.liveRoomInfo.short_id}`);
1366
1468
  await this.sendLiveNotifyCard(LiveType.LiveBroadcast, "API", {
1367
1469
  liveRoomInfo: liveStatus.liveRoomInfo,
1368
1470
  masterInfo: liveStatus.masterInfo,
@@ -1573,7 +1675,8 @@ var ComRegister = class {
1573
1675
  platform: "",
1574
1676
  live: sub.live,
1575
1677
  dynamic: sub.dynamic,
1576
- card: sub.card
1678
+ card: sub.card,
1679
+ liveMsg: sub.liveMsg
1577
1680
  });
1578
1681
  this.logger.info(`UID:${sub.uid}订阅加载完毕!`);
1579
1682
  const randomDelay = Math.floor(Math.random() * 3) + 1;
@@ -1633,7 +1736,13 @@ var ComRegister = class {
1633
1736
  cardColorEnd: koishi.Schema.string(),
1634
1737
  cardBasePlateColor: koishi.Schema.string(),
1635
1738
  cardBasePlateBorder: koishi.Schema.string()
1636
- }).description("自定义推送卡片颜色,默认使用插件内置的颜色,设置后会覆盖插件内置的颜色")
1739
+ }).description("自定义推送卡片颜色,默认使用插件内置的颜色,设置后会覆盖插件内置的颜色"),
1740
+ liveMsg: koishi.Schema.object({
1741
+ enable: koishi.Schema.boolean(),
1742
+ customLiveStart: koishi.Schema.string(),
1743
+ customLive: koishi.Schema.string(),
1744
+ customLiveEnd: koishi.Schema.string()
1745
+ })
1637
1746
  })).role("table").description("手动输入订阅信息,方便自定义订阅内容,这里的订阅内容不会存入数据库。uid: 订阅用户UID,dynamic: 是否需要订阅动态,live: 是否需要订阅直播"),
1638
1747
  master: koishi.Schema.object({
1639
1748
  enable: koishi.Schema.boolean(),
@@ -1703,7 +1812,7 @@ var require_rxjs = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/third_par
1703
1812
  function createErrorClass(createImpl) {
1704
1813
  var _super = function(instance) {
1705
1814
  Error.call(instance);
1706
- instance.stack = new Error().stack;
1815
+ instance.stack = (/* @__PURE__ */ new Error()).stack;
1707
1816
  };
1708
1817
  var ctorFunc = createImpl(_super);
1709
1818
  ctorFunc.prototype = Object.create(Error.prototype);
@@ -3167,7 +3276,7 @@ var require_rxjs = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/third_par
3167
3276
  return void 0;
3168
3277
  };
3169
3278
  AsyncAction2.prototype.execute = function(state, delay) {
3170
- if (this.closed) return new Error("executing a cancelled action");
3279
+ if (this.closed) return /* @__PURE__ */ new Error("executing a cancelled action");
3171
3280
  this.pending = false;
3172
3281
  var error = this._execute(state, delay);
3173
3282
  if (error) return error;
@@ -3180,7 +3289,7 @@ var require_rxjs = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/third_par
3180
3289
  this.work(state);
3181
3290
  } catch (e$1) {
3182
3291
  errored = true;
3183
- errorValue = e$1 ? e$1 : new Error("Scheduled action threw falsy error");
3292
+ errorValue = e$1 ? e$1 : /* @__PURE__ */ new Error("Scheduled action threw falsy error");
3184
3293
  }
3185
3294
  if (errored) {
3186
3295
  this.unsubscribe();
@@ -3874,7 +3983,7 @@ var require_rxjs = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/third_par
3874
3983
  Object.defineProperty(exports2, "__esModule", { value: true });
3875
3984
  exports2.createInvalidObservableTypeError = void 0;
3876
3985
  function createInvalidObservableTypeError(input) {
3877
- return new TypeError("You provided " + (input !== null && typeof input === "object" ? "an invalid object" : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
3986
+ return /* @__PURE__ */ new TypeError("You provided " + (input !== null && typeof input === "object" ? "an invalid object" : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
3878
3987
  }
3879
3988
  exports2.createInvalidObservableTypeError = createInvalidObservableTypeError;
3880
3989
  } });
@@ -12073,7 +12182,7 @@ var require_util$5 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppete
12073
12182
  Error.prepareStackTrace = (_$2, stack) => {
12074
12183
  return stack[2];
12075
12184
  };
12076
- const site = new Error().stack;
12185
+ const site = (/* @__PURE__ */ new Error()).stack;
12077
12186
  Error.prepareStackTrace = original;
12078
12187
  return Object.assign(object, { [SOURCE_URL]: PuppeteerURL.fromCallSite(functionName, site) });
12079
12188
  };
@@ -12547,7 +12656,7 @@ var require_Deferred$1 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/pup
12547
12656
  });
12548
12657
  return await Promise.race(promises);
12549
12658
  } finally {
12550
- for (const deferred of deferredWithTimeout) deferred.reject(new Error("Timeout cleared"));
12659
+ for (const deferred of deferredWithTimeout) deferred.reject(/* @__PURE__ */ new Error("Timeout cleared"));
12551
12660
  }
12552
12661
  }
12553
12662
  #isResolved = false;
@@ -16539,7 +16648,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
16539
16648
  };
16540
16649
  #click(options) {
16541
16650
  const signal = options?.signal;
16542
- const cause = new Error("Locator.click");
16651
+ const cause = /* @__PURE__ */ new Error("Locator.click");
16543
16652
  return this._wait(options).pipe(this.operators.conditions([
16544
16653
  this.#ensureElementIsInTheViewportIfNeeded,
16545
16654
  this.#waitForStableBoundingBoxIfNeeded,
@@ -16555,7 +16664,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
16555
16664
  }
16556
16665
  #fill(value, options) {
16557
16666
  const signal = options?.signal;
16558
- const cause = new Error("Locator.fill");
16667
+ const cause = /* @__PURE__ */ new Error("Locator.fill");
16559
16668
  return this._wait(options).pipe(this.operators.conditions([
16560
16669
  this.#ensureElementIsInTheViewportIfNeeded,
16561
16670
  this.#waitForStableBoundingBoxIfNeeded,
@@ -16619,7 +16728,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
16619
16728
  }
16620
16729
  #hover(options) {
16621
16730
  const signal = options?.signal;
16622
- const cause = new Error("Locator.hover");
16731
+ const cause = /* @__PURE__ */ new Error("Locator.hover");
16623
16732
  return this._wait(options).pipe(this.operators.conditions([this.#ensureElementIsInTheViewportIfNeeded, this.#waitForStableBoundingBoxIfNeeded], signal), (0, rxjs_js_1$7.tap)(() => {
16624
16733
  return this.emit(LocatorEvent.Action, void 0);
16625
16734
  }), (0, rxjs_js_1$7.mergeMap)((handle) => {
@@ -16631,7 +16740,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
16631
16740
  }
16632
16741
  #scroll(options) {
16633
16742
  const signal = options?.signal;
16634
- const cause = new Error("Locator.scroll");
16743
+ const cause = /* @__PURE__ */ new Error("Locator.scroll");
16635
16744
  return this._wait(options).pipe(this.operators.conditions([this.#ensureElementIsInTheViewportIfNeeded, this.#waitForStableBoundingBoxIfNeeded], signal), (0, rxjs_js_1$7.tap)(() => {
16636
16745
  return this.emit(LocatorEvent.Action, void 0);
16637
16746
  }), (0, rxjs_js_1$7.mergeMap)((handle) => {
@@ -16656,7 +16765,7 @@ var require_locators = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
16656
16765
  * @public
16657
16766
  */
16658
16767
  async waitHandle(options) {
16659
- const cause = new Error("Locator.waitHandle");
16768
+ const cause = /* @__PURE__ */ new Error("Locator.waitHandle");
16660
16769
  return await (0, rxjs_js_1$7.firstValueFrom)(this._wait(options).pipe(this.operators.retryAndRaceWithSignalAndTimer(options?.signal, cause)));
16661
16770
  }
16662
16771
  /**
@@ -20494,7 +20603,7 @@ var require_WaitTask = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppe
20494
20603
  */
20495
20604
  getBadError(error) {
20496
20605
  if ((0, ErrorLike_js_1$12.isErrorLike)(error)) {
20497
- if (error.message.includes("Execution context is not available in detached frame")) return new Error("Waiting failed: Frame detached");
20606
+ if (error.message.includes("Execution context is not available in detached frame")) return /* @__PURE__ */ new Error("Waiting failed: Frame detached");
20498
20607
  if (error.message.includes("Execution context was destroyed")) return;
20499
20608
  if (error.message.includes("Cannot find context with specified id")) return;
20500
20609
  if (error.message.includes("AbortError: Actor 'MessageHandlerFrame' destroyed")) return;
@@ -20567,7 +20676,7 @@ var require_Realm$3 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppet
20567
20676
  /** @internal */
20568
20677
  dispose() {
20569
20678
  this.#disposed = true;
20570
- this.taskManager.terminateAll(new Error("waitForFunction failed: frame got detached."));
20679
+ this.taskManager.terminateAll(/* @__PURE__ */ new Error("waitForFunction failed: frame got detached."));
20571
20680
  }
20572
20681
  /** @internal */
20573
20682
  [disposable_js_1$19.disposeSymbol]() {
@@ -21456,7 +21565,7 @@ var require_CallbackRegistry = __commonJS$1({ "node_modules/puppeteer-core/lib/c
21456
21565
  */
21457
21566
  getPendingProtocolErrors() {
21458
21567
  const result = [];
21459
- for (const callback of this.#callbacks.values()) result.push(new Error(`${callback.label} timed out. Trace: ${callback.error.stack}`));
21568
+ for (const callback of this.#callbacks.values()) result.push(/* @__PURE__ */ new Error(`${callback.label} timed out. Trace: ${callback.error.stack}`));
21460
21569
  return result;
21461
21570
  }
21462
21571
  };
@@ -21867,7 +21976,7 @@ var require_Connection$1 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/p
21867
21976
  * @internal
21868
21977
  */
21869
21978
  _rawSend(callbacks, method, params, sessionId, options) {
21870
- if (this.#closed) return Promise.reject(new Error("Protocol error: Connection closed."));
21979
+ if (this.#closed) return Promise.reject(/* @__PURE__ */ new Error("Protocol error: Connection closed."));
21871
21980
  return callbacks.create(method, options?.timeout ?? this.#timeout, (id) => {
21872
21981
  const stringifiedMessage = JSON.stringify({
21873
21982
  method,
@@ -24389,7 +24498,7 @@ var require_LifecycleWatcher = __commonJS$1({ "node_modules/puppeteer-core/lib/c
24389
24498
  }
24390
24499
  #onFrameDetached(frame) {
24391
24500
  if (this.#frame === frame) {
24392
- this.#terminationDeferred.resolve(new Error("Navigating frame was detached"));
24501
+ this.#terminationDeferred.resolve(/* @__PURE__ */ new Error("Navigating frame was detached"));
24393
24502
  return;
24394
24503
  }
24395
24504
  this.#checkLifecycleComplete();
@@ -24435,7 +24544,7 @@ var require_LifecycleWatcher = __commonJS$1({ "node_modules/puppeteer-core/lib/c
24435
24544
  }
24436
24545
  dispose() {
24437
24546
  this.#subscriptions.dispose();
24438
- this.#terminationDeferred.resolve(new Error("LifecycleWatcher disposed"));
24547
+ this.#terminationDeferred.resolve(/* @__PURE__ */ new Error("LifecycleWatcher disposed"));
24439
24548
  }
24440
24549
  };
24441
24550
  exports.LifecycleWatcher = LifecycleWatcher;
@@ -24684,7 +24793,7 @@ var require_Frame$1 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppet
24684
24793
  });
24685
24794
  ensureNewDocumentNavigation = !!response.loaderId;
24686
24795
  if (response.errorText === "net::ERR_HTTP_RESPONSE_CODE_FAILURE") return null;
24687
- return response.errorText ? new Error(`${response.errorText} at ${url$1}`) : null;
24796
+ return response.errorText ? /* @__PURE__ */ new Error(`${response.errorText} at ${url$1}`) : null;
24688
24797
  } catch (error$1) {
24689
24798
  if ((0, ErrorLike_js_1$6.isErrorLike)(error$1)) return error$1;
24690
24799
  throw error$1;
@@ -25607,7 +25716,7 @@ var require_NetworkManager = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs
25607
25716
  const response = new HTTPResponse_js_1$2.CdpHTTPResponse(client, request, responsePayload, extraInfo);
25608
25717
  request._response = response;
25609
25718
  request._redirectChain.push(request);
25610
- response._resolveBody(new Error("Response body is unavailable for redirect responses"));
25719
+ response._resolveBody(/* @__PURE__ */ new Error("Response body is unavailable for redirect responses"));
25611
25720
  this.#forgetRequest(request, false);
25612
25721
  this.emit(NetworkManagerEvents_js_1$1.NetworkManagerEvent.Response, response);
25613
25722
  this.emit(NetworkManagerEvents_js_1$1.NetworkManagerEvent.RequestFinished, request);
@@ -25616,7 +25725,7 @@ var require_NetworkManager = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs
25616
25725
  const request = this.#networkEventManager.getRequest(responseReceived.requestId);
25617
25726
  if (!request) return;
25618
25727
  const extraInfos = this.#networkEventManager.responseExtraInfo(responseReceived.requestId);
25619
- if (extraInfos.length) (0, util_js_1$22.debugError)(new Error("Unexpected extraInfo events for request " + responseReceived.requestId));
25728
+ if (extraInfos.length) (0, util_js_1$22.debugError)(/* @__PURE__ */ new Error("Unexpected extraInfo events for request " + responseReceived.requestId));
25620
25729
  if (responseReceived.response.fromDiskCache) extraInfo = null;
25621
25730
  const response = new HTTPResponse_js_1$2.CdpHTTPResponse(client, request, responseReceived.response, extraInfo);
25622
25731
  request._response = response;
@@ -27952,7 +28061,7 @@ var require_Tracing = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppet
27952
28061
  contentDeferred.resolve(buffer ?? void 0);
27953
28062
  } catch (error) {
27954
28063
  if ((0, ErrorLike_js_1$4.isErrorLike)(error)) contentDeferred.reject(error);
27955
- else contentDeferred.reject(new Error(`Unknown error: ${error}`));
28064
+ else contentDeferred.reject(/* @__PURE__ */ new Error(`Unknown error: ${error}`));
27956
28065
  }
27957
28066
  });
27958
28067
  await this.#client.send("Tracing.end");
@@ -28367,7 +28476,7 @@ var require_Page$1 = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs/puppete
28367
28476
  return this.#primaryTarget.browserContext();
28368
28477
  }
28369
28478
  #onTargetCrashed() {
28370
- this.emit("error", new Error("Page crashed!"));
28479
+ this.emit("error", /* @__PURE__ */ new Error("Page crashed!"));
28371
28480
  }
28372
28481
  #onLogEntryAdded(event) {
28373
28482
  const { level, text, args, source, url, lineNumber } = event.entry;
@@ -31927,7 +32036,7 @@ var require_ErrorResponse = __commonJS$1({ "node_modules/chromium-bidi/lib/cjs/p
31927
32036
  };
31928
32037
  exports.UnknownCommandException = UnknownCommandException;
31929
32038
  var UnknownErrorException = class extends Exception {
31930
- constructor(message$1, stacktrace = new Error().stack) {
32039
+ constructor(message$1, stacktrace = (/* @__PURE__ */ new Error()).stack) {
31931
32040
  super("unknown error", message$1, stacktrace);
31932
32041
  }
31933
32042
  };
@@ -36773,7 +36882,7 @@ var require_SharedId = __commonJS$1({ "node_modules/chromium-bidi/lib/cjs/bidiMa
36773
36882
  return `f.${frameId}.d.${documentId}.e.${backendNodeId}`;
36774
36883
  }
36775
36884
  function parseLegacySharedId(sharedId) {
36776
- const match = sharedId.match(new RegExp(`(.*)${SHARED_ID_DIVIDER}(.*)`));
36885
+ const match = sharedId.match(/* @__PURE__ */ new RegExp(`(.*)${SHARED_ID_DIVIDER}(.*)`));
36777
36886
  if (!match) return null;
36778
36887
  const documentId = match[1];
36779
36888
  const elementId = match[2];
@@ -47037,7 +47146,7 @@ var require_permessage_deflate = __commonJS$1({ "node_modules/ws/lib/permessage-
47037
47146
  const callback = this._deflate[kCallback];
47038
47147
  this._deflate.close();
47039
47148
  this._deflate = null;
47040
- if (callback) callback(new Error("The deflate stream was closed while data was being processed"));
47149
+ if (callback) callback(/* @__PURE__ */ new Error("The deflate stream was closed while data was being processed"));
47041
47150
  }
47042
47151
  }
47043
47152
  /**
@@ -47243,7 +47352,7 @@ var require_permessage_deflate = __commonJS$1({ "node_modules/ws/lib/permessage-
47243
47352
  this[kBuffers].push(chunk);
47244
47353
  return;
47245
47354
  }
47246
- this[kError$1] = new RangeError("Max payload size exceeded");
47355
+ this[kError$1] = /* @__PURE__ */ new RangeError("Max payload size exceeded");
47247
47356
  this[kError$1].code = "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH";
47248
47357
  this[kError$1][kStatusCode$2] = 1009;
47249
47358
  this.removeListener("data", inflateOnData);
@@ -48298,7 +48407,7 @@ var require_sender = __commonJS$1({ "node_modules/ws/lib/sender.js"(exports, mod
48298
48407
  this._state = GET_BLOB_DATA;
48299
48408
  blob.arrayBuffer().then((arrayBuffer) => {
48300
48409
  if (this._socket.destroyed) {
48301
- const err = new Error("The socket was closed while the blob was being read");
48410
+ const err = /* @__PURE__ */ new Error("The socket was closed while the blob was being read");
48302
48411
  process.nextTick(callCallbacks, this, err, cb);
48303
48412
  return;
48304
48413
  }
@@ -48346,7 +48455,7 @@ var require_sender = __commonJS$1({ "node_modules/ws/lib/sender.js"(exports, mod
48346
48455
  this._state = DEFLATING;
48347
48456
  perMessageDeflate.compress(data$1, options.fin, (_$2, buf) => {
48348
48457
  if (this._socket.destroyed) {
48349
- const err = new Error("The socket was closed while data was being compressed");
48458
+ const err = /* @__PURE__ */ new Error("The socket was closed while data was being compressed");
48350
48459
  callCallbacks(this, err, cb);
48351
48460
  return;
48352
48461
  }
@@ -49433,7 +49542,7 @@ var require_websocket = __commonJS$1({ "node_modules/ws/lib/websocket.js"(export
49433
49542
  try {
49434
49543
  addr = new URL$1(location, address);
49435
49544
  } catch (e$1) {
49436
- const err = new SyntaxError(`Invalid URL: ${location}`);
49545
+ const err = /* @__PURE__ */ new SyntaxError(`Invalid URL: ${location}`);
49437
49546
  emitErrorAndClose(websocket, err);
49438
49547
  return;
49439
49548
  }
@@ -49581,7 +49690,7 @@ var require_websocket = __commonJS$1({ "node_modules/ws/lib/websocket.js"(export
49581
49690
  else websocket._bufferedAmount += length;
49582
49691
  }
49583
49692
  if (cb) {
49584
- const err = new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`);
49693
+ const err = /* @__PURE__ */ new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`);
49585
49694
  process.nextTick(cb, err);
49586
49695
  }
49587
49696
  }
@@ -50047,7 +50156,7 @@ var require_websocket_server = __commonJS$1({ "node_modules/ws/lib/websocket-ser
50047
50156
  close(cb) {
50048
50157
  if (this._state === CLOSED) {
50049
50158
  if (cb) this.once("close", () => {
50050
- cb(new Error("The server is not running"));
50159
+ cb(/* @__PURE__ */ new Error("The server is not running"));
50051
50160
  });
50052
50161
  process.nextTick(emitClose, this);
50053
50162
  return;
@@ -52290,7 +52399,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
52290
52399
  constructor() {
52291
52400
  this.signal = new AS();
52292
52401
  }
52293
- abort(reason = new Error("This operation was aborted")) {
52402
+ abort(reason = /* @__PURE__ */ new Error("This operation was aborted")) {
52294
52403
  this.signal.reason = this.signal.reason || reason;
52295
52404
  this.signal.aborted = true;
52296
52405
  this.signal.dispatchEvent({
@@ -52676,7 +52785,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
52676
52785
  this.moveToTail(index);
52677
52786
  const oldVal = this.valList[index];
52678
52787
  if (v$2 !== oldVal) {
52679
- if (this.isBackgroundFetch(oldVal)) oldVal.__abortController.abort(new Error("replaced"));
52788
+ if (this.isBackgroundFetch(oldVal)) oldVal.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
52680
52789
  else if (!noDisposeOnSet) {
52681
52790
  this.dispose(oldVal, k$2, "set");
52682
52791
  if (this.disposeAfter) this.disposed.push([
@@ -52718,7 +52827,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
52718
52827
  const head$1 = this.head;
52719
52828
  const k$2 = this.keyList[head$1];
52720
52829
  const v$2 = this.valList[head$1];
52721
- if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(new Error("evicted"));
52830
+ if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(/* @__PURE__ */ new Error("evicted"));
52722
52831
  else {
52723
52832
  this.dispose(v$2, k$2, "evict");
52724
52833
  if (this.disposeAfter) this.disposed.push([
@@ -52945,7 +53054,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
52945
53054
  else {
52946
53055
  this.removeItemSize(index);
52947
53056
  const v$2 = this.valList[index];
52948
- if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(new Error("deleted"));
53057
+ if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
52949
53058
  else {
52950
53059
  this.dispose(v$2, k$2, "delete");
52951
53060
  if (this.disposeAfter) this.disposed.push([
@@ -52974,7 +53083,7 @@ var require_lru_cache = __commonJS$1({ "node_modules/proxy-agent/node_modules/lr
52974
53083
  clear() {
52975
53084
  for (const index of this.rindexes({ allowStale: true })) {
52976
53085
  const v$2 = this.valList[index];
52977
- if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(new Error("deleted"));
53086
+ if (this.isBackgroundFetch(v$2)) v$2.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
52978
53087
  else {
52979
53088
  const k$2 = this.keyList[index];
52980
53089
  this.dispose(v$2, k$2, "delete");
@@ -53148,7 +53257,7 @@ var require_dist$10 = __commonJS$1({ "node_modules/agent-base/dist/index.js"(exp
53148
53257
  if (typeof options.secureEndpoint === "boolean") return options.secureEndpoint;
53149
53258
  if (typeof options.protocol === "string") return options.protocol === "https:";
53150
53259
  }
53151
- const { stack } = new Error();
53260
+ const { stack } = /* @__PURE__ */ new Error();
53152
53261
  if (typeof stack !== "string") return false;
53153
53262
  return stack.split("\n").some((l$1) => l$1.indexOf("(https.js:") !== -1 || l$1.indexOf("node:https:") !== -1);
53154
53263
  }
@@ -53439,7 +53548,7 @@ var require_parse_proxy_response = __commonJS$1({ "node_modules/https-proxy-agen
53439
53548
  function onend() {
53440
53549
  cleanup();
53441
53550
  debug$10("onend");
53442
- reject(new Error("Proxy connection ended before receiving CONNECT response"));
53551
+ reject(/* @__PURE__ */ new Error("Proxy connection ended before receiving CONNECT response"));
53443
53552
  }
53444
53553
  function onerror(err) {
53445
53554
  cleanup();
@@ -53460,7 +53569,7 @@ var require_parse_proxy_response = __commonJS$1({ "node_modules/https-proxy-agen
53460
53569
  const firstLine = headerParts.shift();
53461
53570
  if (!firstLine) {
53462
53571
  socket.destroy();
53463
- return reject(new Error("No header received from proxy CONNECT response"));
53572
+ return reject(/* @__PURE__ */ new Error("No header received from proxy CONNECT response"));
53464
53573
  }
53465
53574
  const firstLineParts = firstLine.split(" ");
53466
53575
  const statusCode = +firstLineParts[1];
@@ -53471,7 +53580,7 @@ var require_parse_proxy_response = __commonJS$1({ "node_modules/https-proxy-agen
53471
53580
  const firstColon = header.indexOf(":");
53472
53581
  if (firstColon === -1) {
53473
53582
  socket.destroy();
53474
- return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
53583
+ return reject(/* @__PURE__ */ new Error(`Invalid header from proxy CONNECT response: "${header}"`));
53475
53584
  }
53476
53585
  const key = header.slice(0, firstColon).toLowerCase();
53477
53586
  const value = header.slice(firstColon + 1).trimStart();
@@ -56994,8 +57103,8 @@ var require_constants$1 = __commonJS$1({ "node_modules/ip-address/dist/v6/consta
56994
57103
  * @static
56995
57104
  */
56996
57105
  exports.RE_ZONE_STRING = /%.*$/;
56997
- exports.RE_URL = new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);
56998
- exports.RE_URL_WITH_PORT = new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/);
57106
+ exports.RE_URL = /* @__PURE__ */ new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);
57107
+ exports.RE_URL_WITH_PORT = /* @__PURE__ */ new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/);
56999
57108
  } });
57000
57109
 
57001
57110
  //#endregion
@@ -59174,7 +59283,7 @@ var require_parseControlResponse = __commonJS$1({ "node_modules/basic-ftp/dist/p
59174
59283
  if (!tokenRegex) {
59175
59284
  if (isMultiline(line)) {
59176
59285
  const token = line.substr(0, 3);
59177
- tokenRegex = new RegExp(`^${token}(?:$| )`);
59286
+ tokenRegex = /* @__PURE__ */ new RegExp(`^${token}(?:$| )`);
59178
59287
  startAt = i$1;
59179
59288
  } else if (isSingleLine(line)) messages.push(line);
59180
59289
  } else if (tokenRegex.test(line)) {
@@ -59321,9 +59430,9 @@ var require_FtpContext = __commonJS$1({ "node_modules/basic-ftp/dist/FtpContext.
59321
59430
  socket.setEncoding(this._encoding);
59322
59431
  socket.setKeepAlive(true);
59323
59432
  socket.on("data", (data$1) => this._onControlSocketData(data$1));
59324
- socket.on("end", () => this.closeWithError(new Error("Server sent FIN packet unexpectedly, closing connection.")));
59433
+ socket.on("end", () => this.closeWithError(/* @__PURE__ */ new Error("Server sent FIN packet unexpectedly, closing connection.")));
59325
59434
  socket.on("close", (hadError) => {
59326
- if (!hadError) this.closeWithError(new Error("Server closed connection unexpectedly."));
59435
+ if (!hadError) this.closeWithError(/* @__PURE__ */ new Error("Server closed connection unexpectedly."));
59327
59436
  });
59328
59437
  this._setupDefaultErrorHandlers(socket, "control socket");
59329
59438
  }
@@ -59387,13 +59496,13 @@ var require_FtpContext = __commonJS$1({ "node_modules/basic-ftp/dist/FtpContext.
59387
59496
  */
59388
59497
  handle(command, responseHandler) {
59389
59498
  if (this._task) {
59390
- const err = new Error("User launched a task while another one is still running. Forgot to use 'await' or '.then()'?");
59499
+ const err = /* @__PURE__ */ new Error("User launched a task while another one is still running. Forgot to use 'await' or '.then()'?");
59391
59500
  err.stack += `\nRunning task launched at: ${this._task.stack}`;
59392
59501
  this.closeWithError(err);
59393
59502
  }
59394
59503
  return new Promise((resolveTask, rejectTask) => {
59395
59504
  this._task = {
59396
- stack: new Error().stack || "Unknown call stack",
59505
+ stack: (/* @__PURE__ */ new Error()).stack || "Unknown call stack",
59397
59506
  responseHandler,
59398
59507
  resolver: {
59399
59508
  resolve: (arg) => {
@@ -59407,7 +59516,7 @@ var require_FtpContext = __commonJS$1({ "node_modules/basic-ftp/dist/FtpContext.
59407
59516
  }
59408
59517
  };
59409
59518
  if (this._closingError) {
59410
- const err = new Error(`Client is closed because ${this._closingError.message}`);
59519
+ const err = /* @__PURE__ */ new Error(`Client is closed because ${this._closingError.message}`);
59411
59520
  err.stack += `\nClosing reason: ${this._closingError.stack}`;
59412
59521
  err.code = this._closingError.code !== void 0 ? this._closingError.code : "0";
59413
59522
  this._passToHandler(err);
@@ -59476,11 +59585,11 @@ var require_FtpContext = __commonJS$1({ "node_modules/basic-ftp/dist/FtpContext.
59476
59585
  this.closeWithError(error);
59477
59586
  });
59478
59587
  socket.once("close", (hadError) => {
59479
- if (hadError) this.closeWithError(new Error(`Socket closed due to transmission error (${identifier})`));
59588
+ if (hadError) this.closeWithError(/* @__PURE__ */ new Error(`Socket closed due to transmission error (${identifier})`));
59480
59589
  });
59481
59590
  socket.once("timeout", () => {
59482
59591
  socket.destroy();
59483
- this.closeWithError(new Error(`Timeout (${identifier})`));
59592
+ this.closeWithError(/* @__PURE__ */ new Error(`Timeout (${identifier})`));
59484
59593
  });
59485
59594
  }
59486
59595
  /**
@@ -59636,7 +59745,7 @@ var require_parseListDOS = __commonJS$1({ "node_modules/basic-ftp/dist/parseList
59636
59745
  *
59637
59746
  * https://github.com/apache/commons-net/blob/master/src/main/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java
59638
59747
  */
59639
- const RE_LINE$1 = new RegExp("(\\S+)\\s+(\\S+)\\s+(?:(<DIR>)|([0-9]+))\\s+(\\S.*)");
59748
+ const RE_LINE$1 = /* @__PURE__ */ new RegExp("(\\S+)\\s+(\\S+)\\s+(?:(<DIR>)|([0-9]+))\\s+(\\S.*)");
59640
59749
  /**
59641
59750
  * Returns true if a given line might be a DOS-style listing.
59642
59751
  *
@@ -59712,7 +59821,7 @@ var require_parseListUnix = __commonJS$1({ "node_modules/basic-ftp/dist/parseLis
59712
59821
  * this is not allowed for here as does not appear to be shown by FTP servers
59713
59822
  * {@code @} file has extended attributes
59714
59823
  */
59715
- const RE_LINE = new RegExp("([bcdelfmpSs-])(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?\\s*(\\d+)\\s+(?:(\\S+(?:\\s\\S+)*?)\\s+)?(?:(\\S+(?:\\s\\S+)*)\\s+)?(\\d+(?:,\\s*\\d+)?)\\s+((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S{3}\\s+\\d{1,2})|(?:\\d{1,2}\\s+\\S{3})|(?:\\d{1,2}" + JA_MONTH + "\\s+\\d{1,2}" + JA_DAY + "))\\s+((?:\\d+(?::\\d+)?)|(?:\\d{4}" + JA_YEAR + "))\\s(.*)");
59824
+ const RE_LINE = /* @__PURE__ */ new RegExp("([bcdelfmpSs-])(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?\\s*(\\d+)\\s+(?:(\\S+(?:\\s\\S+)*?)\\s+)?(?:(\\S+(?:\\s\\S+)*)\\s+)?(\\d+(?:,\\s*\\d+)?)\\s+((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S{3}\\s+\\d{1,2})|(?:\\d{1,2}\\s+\\S{3})|(?:\\d{1,2}" + JA_MONTH + "\\s+\\d{1,2}" + JA_DAY + "))\\s+((?:\\d+(?::\\d+)?)|(?:\\d{4}" + JA_YEAR + "))\\s(.*)");
59716
59825
  /**
59717
59826
  * Returns true if a given line might be a Unix-style listing.
59718
59827
  *
@@ -60083,7 +60192,7 @@ var require_StringWriter = __commonJS$1({ "node_modules/basic-ftp/dist/StringWri
60083
60192
  if (chunk instanceof Buffer) {
60084
60193
  this.buf = Buffer.concat([this.buf, chunk]);
60085
60194
  callback(null);
60086
- } else callback(new Error("StringWriter expects chunks of type 'Buffer'."));
60195
+ } else callback(/* @__PURE__ */ new Error("StringWriter expects chunks of type 'Buffer'."));
60087
60196
  }
60088
60197
  getText(encoding) {
60089
60198
  return this.buf.toString(encoding);
@@ -60217,7 +60326,7 @@ var require_transfer = __commonJS$1({ "node_modules/basic-ftp/dist/transfer.js"(
60217
60326
  };
60218
60327
  const handleTimeout = function() {
60219
60328
  socket.destroy();
60220
- reject(new Error(`Timeout when trying to open data connection to ${host}:${port}`));
60329
+ reject(/* @__PURE__ */ new Error(`Timeout when trying to open data connection to ${host}:${port}`));
60221
60330
  };
60222
60331
  socket.setTimeout(ftp$1.timeout);
60223
60332
  socket.on("error", handleConnErr);
@@ -60301,7 +60410,7 @@ var require_transfer = __commonJS$1({ "node_modules/basic-ftp/dist/transfer.js"(
60301
60410
  * the FTP server is now caught up in a state we can't resolve.
60302
60411
  */
60303
60412
  onUnexpectedRequest(response) {
60304
- const err = new Error(`Unexpected FTP response is requesting an answer: ${response.message}`);
60413
+ const err = /* @__PURE__ */ new Error(`Unexpected FTP response is requesting an answer: ${response.message}`);
60305
60414
  this.ftp.closeWithError(err);
60306
60415
  }
60307
60416
  tryResolve(task) {
@@ -60320,7 +60429,7 @@ var require_transfer = __commonJS$1({ "node_modules/basic-ftp/dist/transfer.js"(
60320
60429
  else if (res.code === 150 || res.code === 125) {
60321
60430
  const dataSocket = config.ftp.dataSocket;
60322
60431
  if (!dataSocket) {
60323
- resolver.onError(task, new Error("Upload should begin but no data connection is available."));
60432
+ resolver.onError(task, /* @__PURE__ */ new Error("Upload should begin but no data connection is available."));
60324
60433
  return;
60325
60434
  }
60326
60435
  const canUpload = "getCipher" in dataSocket ? dataSocket.getCipher() !== void 0 : true;
@@ -60345,7 +60454,7 @@ var require_transfer = __commonJS$1({ "node_modules/basic-ftp/dist/transfer.js"(
60345
60454
  else if (res.code === 150 || res.code === 125) {
60346
60455
  const dataSocket = config.ftp.dataSocket;
60347
60456
  if (!dataSocket) {
60348
- resolver.onError(task, new Error("Download should begin but no data connection is available."));
60457
+ resolver.onError(task, /* @__PURE__ */ new Error("Download should begin but no data connection is available."));
60349
60458
  return;
60350
60459
  }
60351
60460
  config.ftp.log(`Downloading from ${(0, netUtils_1$1.describeAddress)(dataSocket)} (${(0, netUtils_1$1.describeTLS)(dataSocket)})`);
@@ -75013,7 +75122,7 @@ var require_myIpAddress = __commonJS$1({ "node_modules/pac-resolver/dist/myIpAdd
75013
75122
  socket.destroy();
75014
75123
  if (typeof addr === "string") resolve$4(addr);
75015
75124
  else if (addr.address) resolve$4(addr.address);
75016
- else reject(new Error("Expected a `string`"));
75125
+ else reject(/* @__PURE__ */ new Error("Expected a `string`"));
75017
75126
  });
75018
75127
  });
75019
75128
  }
@@ -75057,7 +75166,7 @@ var require_shExpMatch = __commonJS$1({ "node_modules/pac-resolver/dist/shExpMat
75057
75166
  */
75058
75167
  function toRegExp(str) {
75059
75168
  str = String(str).replace(/\./g, "\\.").replace(/\?/g, ".").replace(/\*/g, ".*");
75060
- return new RegExp(`^${str}$`);
75169
+ return /* @__PURE__ */ new RegExp(`^${str}$`);
75061
75170
  }
75062
75171
  } });
75063
75172
 
@@ -75468,7 +75577,7 @@ var require_lifetime = __commonJS$1({ "node_modules/@tootallnate/quickjs-emscrip
75468
75577
  this.disposer = disposer;
75469
75578
  this._owner = _owner;
75470
75579
  this._alive = true;
75471
- this._constructorStack = debug_1$8.QTS_DEBUG ? new Error("Lifetime constructed").stack : void 0;
75580
+ this._constructorStack = debug_1$8.QTS_DEBUG ? (/* @__PURE__ */ new Error("Lifetime constructed")).stack : void 0;
75472
75581
  }
75473
75582
  get alive() {
75474
75583
  return this._alive;
@@ -77635,7 +77744,7 @@ var require_emscripten_module_WASM_RELEASE_SYNC = __commonJS$1({ "node_modules/@
77635
77744
  ]);
77636
77745
  },
77637
77746
  l: function(b$2, c$1) {
77638
- b$2 = new Date(1e3 * (L$1[b$2 >> 2] + 4294967296 * K$2[b$2 + 4 >> 2]));
77747
+ b$2 = /* @__PURE__ */ new Date(1e3 * (L$1[b$2 >> 2] + 4294967296 * K$2[b$2 + 4 >> 2]));
77639
77748
  K$2[c$1 >> 2] = b$2.getSeconds();
77640
77749
  K$2[c$1 + 4 >> 2] = b$2.getMinutes();
77641
77750
  K$2[c$1 + 8 >> 2] = b$2.getHours();
@@ -78848,7 +78957,7 @@ var require_httpUtil = __commonJS$1({ "node_modules/@puppeteer/browsers/lib/cjs/
78848
78957
  }
78849
78958
  const request = httpRequest(url, "GET", (response) => {
78850
78959
  if (response.statusCode !== 200) {
78851
- const error = new Error(`Download failed: server returned code ${response.statusCode}. URL: ${url}`);
78960
+ const error = /* @__PURE__ */ new Error(`Download failed: server returned code ${response.statusCode}. URL: ${url}`);
78852
78961
  response.resume();
78853
78962
  reject(error);
78854
78963
  return;
@@ -78883,7 +78992,7 @@ var require_httpUtil = __commonJS$1({ "node_modules/@puppeteer/browsers/lib/cjs/
78883
78992
  return new Promise((resolve$4, reject) => {
78884
78993
  const request = httpRequest(url, "GET", (response) => {
78885
78994
  let data$1 = "";
78886
- if (response.statusCode && response.statusCode >= 400) return reject(new Error(`Got status code ${response.statusCode}`));
78995
+ if (response.statusCode && response.statusCode >= 400) return reject(/* @__PURE__ */ new Error(`Got status code ${response.statusCode}`));
78887
78996
  response.on("data", (chunk) => {
78888
78997
  data$1 += chunk;
78889
78998
  });
@@ -78891,7 +79000,7 @@ var require_httpUtil = __commonJS$1({ "node_modules/@puppeteer/browsers/lib/cjs/
78891
79000
  try {
78892
79001
  return resolve$4(String(data$1));
78893
79002
  } catch {
78894
- return reject(new Error("Chrome version not found"));
79003
+ return reject(/* @__PURE__ */ new Error("Chrome version not found"));
78895
79004
  }
78896
79005
  });
78897
79006
  }, false);
@@ -80315,7 +80424,7 @@ var require_end_of_stream = __commonJS$1({ "node_modules/end-of-stream/index.js"
80315
80424
  if (!writable) callback.call(stream$3);
80316
80425
  };
80317
80426
  var onexit = function(exitCode) {
80318
- callback.call(stream$3, exitCode ? new Error("exited with error code: " + exitCode) : null);
80427
+ callback.call(stream$3, exitCode ? /* @__PURE__ */ new Error("exited with error code: " + exitCode) : null);
80319
80428
  };
80320
80429
  var onerror = function(err) {
80321
80430
  callback.call(stream$3, err);
@@ -80325,8 +80434,8 @@ var require_end_of_stream = __commonJS$1({ "node_modules/end-of-stream/index.js"
80325
80434
  };
80326
80435
  var onclosenexttick = function() {
80327
80436
  if (cancelled) return;
80328
- if (readable && !(rs && rs.ended && !rs.destroyed)) return callback.call(stream$3, new Error("premature close"));
80329
- if (writable && !(ws && ws.ended && !ws.destroyed)) return callback.call(stream$3, new Error("premature close"));
80437
+ if (readable && !(rs && rs.ended && !rs.destroyed)) return callback.call(stream$3, /* @__PURE__ */ new Error("premature close"));
80438
+ if (writable && !(ws && ws.ended && !ws.destroyed)) return callback.call(stream$3, /* @__PURE__ */ new Error("premature close"));
80330
80439
  };
80331
80440
  var onrequest = function() {
80332
80441
  stream$3.req.on("finish", onfinish);
@@ -80407,7 +80516,7 @@ var require_pump = __commonJS$1({ "node_modules/pump/index.js"(exports, module)
80407
80516
  if (isFS(stream$3)) return stream$3.close(noop$4);
80408
80517
  if (isRequest(stream$3)) return stream$3.abort();
80409
80518
  if (isFn(stream$3.destroy)) return stream$3.destroy();
80410
- callback(err || new Error("stream was destroyed"));
80519
+ callback(err || /* @__PURE__ */ new Error("stream was destroyed"));
80411
80520
  };
80412
80521
  };
80413
80522
  var call = function(fn) {
@@ -80482,7 +80591,7 @@ var require_get_stream = __commonJS$1({ "node_modules/get-stream/index.js"(expor
80482
80591
  }
80483
80592
  };
80484
80593
  async function getStream$1(inputStream, options) {
80485
- if (!inputStream) return Promise.reject(new Error("Expected a stream"));
80594
+ if (!inputStream) return Promise.reject(/* @__PURE__ */ new Error("Expected a stream"));
80486
80595
  options = {
80487
80596
  maxBuffer: Infinity,
80488
80597
  ...options
@@ -80671,7 +80780,7 @@ var require_fd_slicer = __commonJS$1({ "node_modules/fd-slicer/index.js"(exports
80671
80780
  };
80672
80781
  ReadStream.prototype.destroy = function(err) {
80673
80782
  if (this.destroyed) return;
80674
- err = err || new Error("stream destroyed");
80783
+ err = err || /* @__PURE__ */ new Error("stream destroyed");
80675
80784
  this.destroyed = true;
80676
80785
  this.emit("error", err);
80677
80786
  this.context.unref();
@@ -80693,7 +80802,7 @@ var require_fd_slicer = __commonJS$1({ "node_modules/fd-slicer/index.js"(exports
80693
80802
  var self$1 = this;
80694
80803
  if (self$1.destroyed) return;
80695
80804
  if (self$1.pos + buffer.length > self$1.endOffset) {
80696
- var err = new Error("maximum file length exceeded");
80805
+ var err = /* @__PURE__ */ new Error("maximum file length exceeded");
80697
80806
  err.code = "ETOOBIG";
80698
80807
  self$1.destroy();
80699
80808
  callback(err);
@@ -80781,7 +80890,7 @@ var require_fd_slicer = __commonJS$1({ "node_modules/fd-slicer/index.js"(exports
80781
80890
  if (writeStream.destroyed) return;
80782
80891
  var end = writeStream.pos + buffer.length;
80783
80892
  if (end > writeStream.endOffset) {
80784
- var err = new Error("maximum file length exceeded");
80893
+ var err = /* @__PURE__ */ new Error("maximum file length exceeded");
80785
80894
  err.code = "ETOOBIG";
80786
80895
  writeStream.destroyed = true;
80787
80896
  callback(err);
@@ -81207,24 +81316,24 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
81207
81316
  if (buffer.readUInt32LE(i$1) !== 101010256) continue;
81208
81317
  var eocdrBuffer = buffer.slice(i$1);
81209
81318
  var diskNumber = eocdrBuffer.readUInt16LE(4);
81210
- if (diskNumber !== 0) return callback(new Error("multi-disk zip files are not supported: found disk number: " + diskNumber));
81319
+ if (diskNumber !== 0) return callback(/* @__PURE__ */ new Error("multi-disk zip files are not supported: found disk number: " + diskNumber));
81211
81320
  var entryCount = eocdrBuffer.readUInt16LE(10);
81212
81321
  var centralDirectoryOffset = eocdrBuffer.readUInt32LE(16);
81213
81322
  var commentLength = eocdrBuffer.readUInt16LE(20);
81214
81323
  var expectedCommentLength = eocdrBuffer.length - eocdrWithoutCommentSize;
81215
- if (commentLength !== expectedCommentLength) return callback(new Error("invalid comment length. expected: " + expectedCommentLength + ". found: " + commentLength));
81324
+ if (commentLength !== expectedCommentLength) return callback(/* @__PURE__ */ new Error("invalid comment length. expected: " + expectedCommentLength + ". found: " + commentLength));
81216
81325
  var comment = decodeStrings ? decodeBuffer(eocdrBuffer, 22, eocdrBuffer.length, false) : eocdrBuffer.slice(22);
81217
81326
  if (!(entryCount === 65535 || centralDirectoryOffset === 4294967295)) return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames));
81218
81327
  var zip64EocdlBuffer = newBuffer(20);
81219
81328
  var zip64EocdlOffset = bufferReadStart + i$1 - zip64EocdlBuffer.length;
81220
81329
  readAndAssertNoEof(reader, zip64EocdlBuffer, 0, zip64EocdlBuffer.length, zip64EocdlOffset, function(err$1) {
81221
81330
  if (err$1) return callback(err$1);
81222
- if (zip64EocdlBuffer.readUInt32LE(0) !== 117853008) return callback(new Error("invalid zip64 end of central directory locator signature"));
81331
+ if (zip64EocdlBuffer.readUInt32LE(0) !== 117853008) return callback(/* @__PURE__ */ new Error("invalid zip64 end of central directory locator signature"));
81223
81332
  var zip64EocdrOffset = readUInt64LE(zip64EocdlBuffer, 8);
81224
81333
  var zip64EocdrBuffer = newBuffer(56);
81225
81334
  readAndAssertNoEof(reader, zip64EocdrBuffer, 0, zip64EocdrBuffer.length, zip64EocdrOffset, function(err$2) {
81226
81335
  if (err$2) return callback(err$2);
81227
- if (zip64EocdrBuffer.readUInt32LE(0) !== 101075792) return callback(new Error("invalid zip64 end of central directory record signature"));
81336
+ if (zip64EocdrBuffer.readUInt32LE(0) !== 101075792) return callback(/* @__PURE__ */ new Error("invalid zip64 end of central directory record signature"));
81228
81337
  entryCount = readUInt64LE(zip64EocdrBuffer, 32);
81229
81338
  centralDirectoryOffset = readUInt64LE(zip64EocdrBuffer, 48);
81230
81339
  return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames));
@@ -81232,7 +81341,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
81232
81341
  });
81233
81342
  return;
81234
81343
  }
81235
- callback(new Error("end of central directory record signature not found"));
81344
+ callback(/* @__PURE__ */ new Error("end of central directory record signature not found"));
81236
81345
  });
81237
81346
  }
81238
81347
  util$2.inherits(ZipFile, EventEmitter$1);
@@ -81295,7 +81404,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
81295
81404
  if (self$1.emittedError) return;
81296
81405
  var entry = new Entry();
81297
81406
  var signature = buffer.readUInt32LE(0);
81298
- if (signature !== 33639248) return emitErrorAndAutoClose(self$1, new Error("invalid central directory file header signature: 0x" + signature.toString(16)));
81407
+ if (signature !== 33639248) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("invalid central directory file header signature: 0x" + signature.toString(16)));
81299
81408
  entry.versionMadeBy = buffer.readUInt16LE(4);
81300
81409
  entry.versionNeededToExtract = buffer.readUInt16LE(6);
81301
81410
  entry.generalPurposeBitFlag = buffer.readUInt16LE(8);
@@ -81311,7 +81420,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
81311
81420
  entry.internalFileAttributes = buffer.readUInt16LE(36);
81312
81421
  entry.externalFileAttributes = buffer.readUInt32LE(38);
81313
81422
  entry.relativeOffsetOfLocalHeader = buffer.readUInt32LE(42);
81314
- if (entry.generalPurposeBitFlag & 64) return emitErrorAndAutoClose(self$1, new Error("strong encryption is not supported"));
81423
+ if (entry.generalPurposeBitFlag & 64) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("strong encryption is not supported"));
81315
81424
  self$1.readEntryCursor += 46;
81316
81425
  buffer = newBuffer(entry.fileNameLength + entry.extraFieldLength + entry.fileCommentLength);
81317
81426
  readAndAssertNoEof(self$1.reader, buffer, 0, buffer.length, self$1.readEntryCursor, function(err$1) {
@@ -81328,7 +81437,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
81328
81437
  var dataSize = extraFieldBuffer.readUInt16LE(i$1 + 2);
81329
81438
  var dataStart = i$1 + 4;
81330
81439
  var dataEnd = dataStart + dataSize;
81331
- if (dataEnd > extraFieldBuffer.length) return emitErrorAndAutoClose(self$1, new Error("extra field length exceeds extra field buffer size"));
81440
+ if (dataEnd > extraFieldBuffer.length) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("extra field length exceeds extra field buffer size"));
81332
81441
  var dataBuffer = newBuffer(dataSize);
81333
81442
  extraFieldBuffer.copy(dataBuffer, 0, dataStart, dataEnd);
81334
81443
  entry.extraFields.push({
@@ -81350,20 +81459,20 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
81350
81459
  break;
81351
81460
  }
81352
81461
  }
81353
- if (zip64EiefBuffer == null) return emitErrorAndAutoClose(self$1, new Error("expected zip64 extended information extra field"));
81462
+ if (zip64EiefBuffer == null) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("expected zip64 extended information extra field"));
81354
81463
  var index = 0;
81355
81464
  if (entry.uncompressedSize === 4294967295) {
81356
- if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, new Error("zip64 extended information extra field does not include uncompressed size"));
81465
+ if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("zip64 extended information extra field does not include uncompressed size"));
81357
81466
  entry.uncompressedSize = readUInt64LE(zip64EiefBuffer, index);
81358
81467
  index += 8;
81359
81468
  }
81360
81469
  if (entry.compressedSize === 4294967295) {
81361
- if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, new Error("zip64 extended information extra field does not include compressed size"));
81470
+ if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("zip64 extended information extra field does not include compressed size"));
81362
81471
  entry.compressedSize = readUInt64LE(zip64EiefBuffer, index);
81363
81472
  index += 8;
81364
81473
  }
81365
81474
  if (entry.relativeOffsetOfLocalHeader === 4294967295) {
81366
- if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, new Error("zip64 extended information extra field does not include relative header offset"));
81475
+ if (index + 8 > zip64EiefBuffer.length) return emitErrorAndAutoClose(self$1, /* @__PURE__ */ new Error("zip64 extended information extra field does not include relative header offset"));
81367
81476
  entry.relativeOffsetOfLocalHeader = readUInt64LE(zip64EiefBuffer, index);
81368
81477
  index += 8;
81369
81478
  }
@@ -81432,9 +81541,9 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
81432
81541
  if (relativeEnd < relativeStart) throw new Error("options.end < options.start");
81433
81542
  }
81434
81543
  }
81435
- if (!self$1.isOpen) return callback(new Error("closed"));
81544
+ if (!self$1.isOpen) return callback(/* @__PURE__ */ new Error("closed"));
81436
81545
  if (entry.isEncrypted()) {
81437
- if (options.decrypt !== false) return callback(new Error("entry is encrypted, and options.decrypt !== false"));
81546
+ if (options.decrypt !== false) return callback(/* @__PURE__ */ new Error("entry is encrypted, and options.decrypt !== false"));
81438
81547
  }
81439
81548
  self$1.reader.ref();
81440
81549
  var buffer = newBuffer(30);
@@ -81442,18 +81551,18 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
81442
81551
  try {
81443
81552
  if (err) return callback(err);
81444
81553
  var signature = buffer.readUInt32LE(0);
81445
- if (signature !== 67324752) return callback(new Error("invalid local file header signature: 0x" + signature.toString(16)));
81554
+ if (signature !== 67324752) return callback(/* @__PURE__ */ new Error("invalid local file header signature: 0x" + signature.toString(16)));
81446
81555
  var fileNameLength = buffer.readUInt16LE(26);
81447
81556
  var extraFieldLength = buffer.readUInt16LE(28);
81448
81557
  var localFileHeaderEnd = entry.relativeOffsetOfLocalHeader + buffer.length + fileNameLength + extraFieldLength;
81449
81558
  var decompress;
81450
81559
  if (entry.compressionMethod === 0) decompress = false;
81451
81560
  else if (entry.compressionMethod === 8) decompress = options.decompress != null ? options.decompress : true;
81452
- else return callback(new Error("unsupported compression method: " + entry.compressionMethod));
81561
+ else return callback(/* @__PURE__ */ new Error("unsupported compression method: " + entry.compressionMethod));
81453
81562
  var fileDataStart = localFileHeaderEnd;
81454
81563
  var fileDataEnd = fileDataStart + entry.compressedSize;
81455
81564
  if (entry.compressedSize !== 0) {
81456
- if (fileDataEnd > self$1.fileSize) return callback(new Error("file data overflows file bounds: " + fileDataStart + " + " + entry.compressedSize + " > " + self$1.fileSize));
81565
+ if (fileDataEnd > self$1.fileSize) return callback(/* @__PURE__ */ new Error("file data overflows file bounds: " + fileDataStart + " + " + entry.compressedSize + " > " + self$1.fileSize));
81457
81566
  }
81458
81567
  var readStream = self$1.reader.createReadStream({
81459
81568
  start: fileDataStart + relativeStart,
@@ -81523,7 +81632,7 @@ var require_yauzl = __commonJS$1({ "node_modules/yauzl/index.js"(exports) {
81523
81632
  });
81524
81633
  reader.read(buffer, offset, length, position, function(err, bytesRead) {
81525
81634
  if (err) return callback(err);
81526
- if (bytesRead < length) return callback(new Error("unexpected EOF"));
81635
+ if (bytesRead < length) return callback(/* @__PURE__ */ new Error("unexpected EOF"));
81527
81636
  callback();
81528
81637
  });
81529
81638
  }
@@ -82190,8 +82299,8 @@ var require_text_decoder = __commonJS$1({ "node_modules/text-decoder/index.js"(e
82190
82299
  //#region node_modules/streamx/index.js
82191
82300
  var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, module) {
82192
82301
  const { EventEmitter } = require("events");
82193
- const STREAM_DESTROYED = new Error("Stream was destroyed");
82194
- const PREMATURE_CLOSE = new Error("Premature close");
82302
+ const STREAM_DESTROYED = /* @__PURE__ */ new Error("Stream was destroyed");
82303
+ const PREMATURE_CLOSE = /* @__PURE__ */ new Error("Premature close");
82195
82304
  const FIFO$1 = require_fast_fifo();
82196
82305
  const TextDecoder$1 = require_text_decoder();
82197
82306
  const qmt = typeof queueMicrotask === "undefined" ? (fn) => global.process.nextTick(fn) : queueMicrotask;
@@ -82555,14 +82664,14 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
82555
82664
  if (stream$3 === this.to) {
82556
82665
  this.to = null;
82557
82666
  if (this.from !== null) {
82558
- if ((this.from._duplexState & READ_DONE) === 0 || !this.pipeToFinished) this.from.destroy(this.error || new Error("Writable stream closed prematurely"));
82667
+ if ((this.from._duplexState & READ_DONE) === 0 || !this.pipeToFinished) this.from.destroy(this.error || /* @__PURE__ */ new Error("Writable stream closed prematurely"));
82559
82668
  return;
82560
82669
  }
82561
82670
  }
82562
82671
  if (stream$3 === this.from) {
82563
82672
  this.from = null;
82564
82673
  if (this.to !== null) {
82565
- if ((stream$3._duplexState & READ_DONE) === 0) this.to.destroy(this.error || new Error("Readable stream closed before ending"));
82674
+ if ((stream$3._duplexState & READ_DONE) === 0) this.to.destroy(this.error || /* @__PURE__ */ new Error("Readable stream closed before ending"));
82566
82675
  return;
82567
82676
  }
82568
82677
  }
@@ -83100,7 +83209,7 @@ var require_streamx = __commonJS$1({ "node_modules/streamx/index.js"(exports, mo
83100
83209
  }
83101
83210
  function noop$3() {}
83102
83211
  function abort() {
83103
- this.destroy(new Error("Stream aborted."));
83212
+ this.destroy(/* @__PURE__ */ new Error("Stream aborted."));
83104
83213
  }
83105
83214
  function isWritev(s$2) {
83106
83215
  return s$2._writev !== Writable$2.prototype._writev && s$2._writev !== Duplex.prototype._writev;
@@ -83236,7 +83345,7 @@ var require_headers = __commonJS$1({ "node_modules/tar-stream/headers.js"(export
83236
83345
  uid,
83237
83346
  gid,
83238
83347
  size,
83239
- mtime: new Date(1e3 * mtime),
83348
+ mtime: /* @__PURE__ */ new Date(1e3 * mtime),
83240
83349
  type,
83241
83350
  linkname,
83242
83351
  uname,
@@ -83589,7 +83698,7 @@ var require_extract = __commonJS$1({ "node_modules/tar-stream/extract.js"(export
83589
83698
  }
83590
83699
  _final(cb) {
83591
83700
  this._finished = this._missing === 0 && this._buffer.buffered === 0;
83592
- cb(this._finished ? null : new Error("Unexpected end of data"));
83701
+ cb(this._finished ? null : /* @__PURE__ */ new Error("Unexpected end of data"));
83593
83702
  }
83594
83703
  _predestroy() {
83595
83704
  this._continueWrite(null);
@@ -83762,8 +83871,8 @@ var require_pack = __commonJS$1({ "node_modules/tar-stream/pack.js"(exports, mod
83762
83871
  const cb = this._openCallback;
83763
83872
  this._openCallback = null;
83764
83873
  if (cb === null) return;
83765
- if (this._pack.destroying) return cb(new Error("pack stream destroyed"));
83766
- if (this._pack._finalized) return cb(new Error("pack stream is already finalized"));
83874
+ if (this._pack.destroying) return cb(/* @__PURE__ */ new Error("pack stream destroyed"));
83875
+ if (this._pack._finalized) return cb(/* @__PURE__ */ new Error("pack stream is already finalized"));
83767
83876
  this._pack._stream = this;
83768
83877
  if (!this._isLinkname) this._pack._encode(this.header);
83769
83878
  if (this._isVoid) {
@@ -83778,7 +83887,7 @@ var require_pack = __commonJS$1({ "node_modules/tar-stream/pack.js"(exports, mod
83778
83887
  return cb(null);
83779
83888
  }
83780
83889
  if (this._isVoid) {
83781
- if (data$1.byteLength > 0) return cb(new Error("No body allowed for this entry"));
83890
+ if (data$1.byteLength > 0) return cb(/* @__PURE__ */ new Error("No body allowed for this entry"));
83782
83891
  return cb();
83783
83892
  }
83784
83893
  this.written += data$1.byteLength;
@@ -83796,12 +83905,12 @@ var require_pack = __commonJS$1({ "node_modules/tar-stream/pack.js"(exports, mod
83796
83905
  this._pack._done(this);
83797
83906
  }
83798
83907
  _final(cb) {
83799
- if (this.written !== this.header.size) return cb(new Error("Size mismatch"));
83908
+ if (this.written !== this.header.size) return cb(/* @__PURE__ */ new Error("Size mismatch"));
83800
83909
  this._finish();
83801
83910
  cb(null);
83802
83911
  }
83803
83912
  _getError() {
83804
- return getStreamError(this) || new Error("tar entry destroyed");
83913
+ return getStreamError(this) || /* @__PURE__ */ new Error("tar entry destroyed");
83805
83914
  }
83806
83915
  _predestroy() {
83807
83916
  this._pack.destroy(this._getError());
@@ -84018,7 +84127,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
84018
84127
  }
84019
84128
  header = map(header) || header;
84020
84129
  if (!stat.isFile()) {
84021
- if (strict) return pack$1.destroy(new Error("unsupported type for " + filename));
84130
+ if (strict) return pack$1.destroy(/* @__PURE__ */ new Error("unsupported type for " + filename));
84022
84131
  return onnextentry();
84023
84132
  }
84024
84133
  const entry = pack$1.entry(header, onnextentry);
@@ -84085,7 +84194,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
84085
84194
  const dir = path$4.join(name$3, ".") === path$4.join(cwd, ".") ? cwd : path$4.dirname(name$3);
84086
84195
  validate(xfs, dir, path$4.join(cwd, "."), function(err, valid$2) {
84087
84196
  if (err) return next(err);
84088
- if (!valid$2) return next(new Error(dir + " is not a valid path"));
84197
+ if (!valid$2) return next(/* @__PURE__ */ new Error(dir + " is not a valid path"));
84089
84198
  if (header.type === "directory") {
84090
84199
  stack.push([name$3, header.mtime]);
84091
84200
  return mkdirfix(name$3, {
@@ -84109,7 +84218,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
84109
84218
  case "link": return onlink();
84110
84219
  case "symlink": return onsymlink();
84111
84220
  }
84112
- if (strict) return next(new Error("unsupported type for " + name$3 + " (" + header.type + ")"));
84221
+ if (strict) return next(/* @__PURE__ */ new Error("unsupported type for " + name$3 + " (" + header.type + ")"));
84113
84222
  stream$3.resume();
84114
84223
  next();
84115
84224
  });
@@ -84126,7 +84235,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
84126
84235
  if (win32$1) return next();
84127
84236
  xfs.unlink(name$3, function() {
84128
84237
  const dst = path$4.resolve(path$4.dirname(name$3), header.linkname);
84129
- if (!inCwd(dst)) return next(new Error(name$3 + " is not a valid symlink"));
84238
+ if (!inCwd(dst)) return next(/* @__PURE__ */ new Error(name$3 + " is not a valid symlink"));
84130
84239
  xfs.symlink(header.linkname, name$3, stat);
84131
84240
  });
84132
84241
  }
@@ -84135,7 +84244,7 @@ var require_tar_fs = __commonJS$1({ "node_modules/tar-fs/index.js"(exports) {
84135
84244
  xfs.unlink(name$3, function() {
84136
84245
  const link$1 = path$4.join(cwd, path$4.join("/", header.linkname));
84137
84246
  fs$3.realpath(link$1, function(err, dst) {
84138
- if (err || !inCwd(dst)) return next(new Error(name$3 + " is not a valid hardlink"));
84247
+ if (err || !inCwd(dst)) return next(/* @__PURE__ */ new Error(name$3 + " is not a valid hardlink"));
84139
84248
  xfs.link(dst, name$3, function(err$1) {
84140
84249
  if (err$1 && err$1.code === "EPERM" && opts.hardlinkAsFilesFallback) {
84141
84250
  stream$3 = xfs.createReadStream(dst);
@@ -84335,9 +84444,9 @@ var require_bzip2 = __commonJS$1({ "node_modules/unbzip2-stream/lib/bzip2.js"(ex
84335
84444
  function Bzip2Error(message$1) {
84336
84445
  this.name = "Bzip2Error";
84337
84446
  this.message = message$1;
84338
- this.stack = new Error().stack;
84447
+ this.stack = (/* @__PURE__ */ new Error()).stack;
84339
84448
  }
84340
- Bzip2Error.prototype = new Error();
84449
+ Bzip2Error.prototype = /* @__PURE__ */ new Error();
84341
84450
  var message = { Error: function(message$1) {
84342
84451
  throw new Bzip2Error(message$1);
84343
84452
  } };
@@ -84943,7 +85052,7 @@ var require_unbzip2_stream = __commonJS$1({ "node_modules/unbzip2-stream/index.j
84943
85052
  }, function end(x$2) {
84944
85053
  while (!broken && bitReader && hasBytes > bitReader.bytesRead) decompressAndQueue(this);
84945
85054
  if (!broken) {
84946
- if (streamCRC !== null) this.emit("error", new Error("input stream ended prematurely"));
85055
+ if (streamCRC !== null) this.emit("error", /* @__PURE__ */ new Error("input stream ended prematurely"));
84947
85056
  this.queue(null);
84948
85057
  }
84949
85058
  });
@@ -85724,7 +85833,7 @@ var require_build$2 = __commonJS$1({ "node_modules/yargs-parser/build/index.cjs"
85724
85833
  keys: []
85725
85834
  };
85726
85835
  const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/;
85727
- const negatedBoolean = new RegExp("^--" + configuration["negation-prefix"] + "(.+)");
85836
+ const negatedBoolean = /* @__PURE__ */ new RegExp("^--" + configuration["negation-prefix"] + "(.+)");
85728
85837
  [].concat(opts.array || []).filter(Boolean).forEach(function(opt) {
85729
85838
  const key = typeof opt === "object" ? opt.key : opt;
85730
85839
  const assignment = Object.keys(opt).map(function(key$1) {
@@ -88341,7 +88450,7 @@ var require_wrap_ansi = __commonJS$1({ "node_modules/wrap-ansi/index.js"(exports
88341
88450
  for (const [index, character] of pre.entries()) {
88342
88451
  returnValue += character;
88343
88452
  if (ESCAPES.has(character)) {
88344
- const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join("")) || { groups: {} };
88453
+ const { groups } = (/* @__PURE__ */ new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`)).exec(pre.slice(index).join("")) || { groups: {} };
88345
88454
  if (groups.code !== void 0) {
88346
88455
  const code$1 = Number.parseFloat(groups.code);
88347
88456
  escapeCode = code$1 === END_CODE ? void 0 : code$1;
@@ -88620,7 +88729,7 @@ var require_get_caller_file = __commonJS$1({ "node_modules/get-caller-file/index
88620
88729
  Error.prepareStackTrace = function(_$2, stack$1) {
88621
88730
  return stack$1;
88622
88731
  };
88623
- var stack = new Error().stack;
88732
+ var stack = (/* @__PURE__ */ new Error()).stack;
88624
88733
  Error.prepareStackTrace = oldPrepareStackTrace;
88625
88734
  if (stack !== null && typeof stack === "object") return stack[position] ? stack[position].getFileName() : void 0;
88626
88735
  };
@@ -91548,7 +91657,7 @@ var require_ChromeLauncher = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs
91548
91657
  return options.filter((s$2) => {
91549
91658
  return s$2.startsWith(flag.endsWith("=") ? flag : `${flag}=`);
91550
91659
  }).map((s$2) => {
91551
- return s$2.split(new RegExp(`${flag}=\\s*`))[1]?.trim();
91660
+ return s$2.split(/* @__PURE__ */ new RegExp(`${flag}=\\s*`))[1]?.trim();
91552
91661
  }).filter((s$2) => {
91553
91662
  return s$2;
91554
91663
  });
@@ -91561,7 +91670,7 @@ var require_ChromeLauncher = __commonJS$1({ "node_modules/puppeteer-core/lib/cjs
91561
91670
  * @internal
91562
91671
  */
91563
91672
  function removeMatchingFlags(array, flag) {
91564
- const regex = new RegExp(`^${flag}=.*`);
91673
+ const regex = /* @__PURE__ */ new RegExp(`^${flag}=.*`);
91565
91674
  let i$1 = 0;
91566
91675
  while (i$1 < array.length) if (regex.test(array[i$1])) array.splice(i$1, 1);
91567
91676
  else i$1++;
@@ -92200,31 +92309,31 @@ var require_darwin = __commonJS$1({ "node_modules/puppeteer-finder/lib/darwin.js
92200
92309
  });
92201
92310
  const priorities = [
92202
92311
  {
92203
- regex: new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge.app`),
92312
+ regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge.app`),
92204
92313
  weight: 46
92205
92314
  },
92206
92315
  {
92207
- regex: new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge Dev.app`),
92316
+ regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge Dev.app`),
92208
92317
  weight: 47
92209
92318
  },
92210
92319
  {
92211
- regex: new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge Canary.app`),
92320
+ regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Microsoft Edge Canary.app`),
92212
92321
  weight: 48
92213
92322
  },
92214
92323
  {
92215
- regex: new RegExp(`^${process.env.HOME}/Applications/.*Chromium.app`),
92324
+ regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Chromium.app`),
92216
92325
  weight: 49
92217
92326
  },
92218
92327
  {
92219
- regex: new RegExp(`^${process.env.HOME}/Applications/.*Chrome.app`),
92328
+ regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Chrome.app`),
92220
92329
  weight: 50
92221
92330
  },
92222
92331
  {
92223
- regex: new RegExp(`^${process.env.HOME}/Applications/.*Chrome Dev.app`),
92332
+ regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Chrome Dev.app`),
92224
92333
  weight: 51
92225
92334
  },
92226
92335
  {
92227
- regex: new RegExp(`^${process.env.HOME}/Applications/.*Chrome Canary.app`),
92336
+ regex: /* @__PURE__ */ new RegExp(`^${process.env.HOME}/Applications/.*Chrome Canary.app`),
92228
92337
  weight: 52
92229
92338
  },
92230
92339
  {
@@ -92397,8 +92506,8 @@ var require_lib$2 = __commonJS$1({ "node_modules/puppeteer-finder/lib/index.js"(
92397
92506
  const win32_1 = __importDefault(require_win32());
92398
92507
  const darwin_1 = __importDefault(require_darwin());
92399
92508
  const linux_1 = __importDefault(require_linux());
92400
- const ERROR_PLATFORM_NOT_SUPPORT = new Error("platform not support");
92401
- const ERROR_NO_INSTALLATIONS_FOUND = new Error("no chrome installations found");
92509
+ const ERROR_PLATFORM_NOT_SUPPORT = /* @__PURE__ */ new Error("platform not support");
92510
+ const ERROR_NO_INSTALLATIONS_FOUND = /* @__PURE__ */ new Error("no chrome installations found");
92402
92511
  function findChromes() {
92403
92512
  switch (process.platform) {
92404
92513
  case "win32": return (0, win32_1.default)();
@@ -94263,7 +94372,7 @@ var GenerateImg = class extends koishi.Service {
94263
94372
  return parts.length > 0 ? `${sign}${parts.join("")}` : "0秒";
94264
94373
  }
94265
94374
  unixTimestampToString(timestamp) {
94266
- const date = new Date(timestamp * 1e3);
94375
+ const date = /* @__PURE__ */ new Date(timestamp * 1e3);
94267
94376
  const year = date.getFullYear();
94268
94377
  const month = `0${date.getMonth() + 1}`.slice(-2);
94269
94378
  const day = `0${date.getDate()}`.slice(-2);
@@ -94454,7 +94563,7 @@ var BiliAPI = class extends koishi.Service {
94454
94563
  getMixinKey = (orig) => mixinKeyEncTab.map((n$2) => orig[n$2]).join("").slice(0, 32);
94455
94564
  encWbi(params, img_key, sub_key) {
94456
94565
  const mixin_key = this.getMixinKey(img_key + sub_key);
94457
- const curr_time = Math.round(Date.now() / 1e3);
94566
+ const curr_time = Math.round(luxon.DateTime.now().toSeconds() / 1e3);
94458
94567
  const chr_filter = /[!'()*]/g;
94459
94568
  Object.assign(params, { wts: curr_time });
94460
94569
  const query = Object.keys(params).sort().map((key) => {
@@ -94627,7 +94736,7 @@ var BiliAPI = class extends koishi.Service {
94627
94736
  * @returns {Promise<any>} Promise of the ticket response in JSON format
94628
94737
  */
94629
94738
  async getBiliTicket(csrf) {
94630
- const ts = Math.floor(Date.now() / 1e3);
94739
+ const ts = Math.floor(luxon.DateTime.now().toSeconds() / 1e3);
94631
94740
  const hexSign = this.hmacSha256("XgwSnGZ1p", `ts${ts}`);
94632
94741
  const params = new URLSearchParams({
94633
94742
  key_id: "ec02",
@@ -94658,8 +94767,16 @@ var BiliAPI = class extends koishi.Service {
94658
94767
  }));
94659
94768
  }
94660
94769
  getCookies() {
94661
- const cookies = JSON.stringify(this.jar.serializeSync().cookies);
94662
- return cookies;
94770
+ try {
94771
+ const cookies = this.jar.serializeSync().cookies.map((cookie) => {
94772
+ if (!cookie.expires) cookie.expires = "Infinity";
94773
+ return cookie;
94774
+ });
94775
+ return JSON.stringify(cookies);
94776
+ } catch (e$1) {
94777
+ console.error("获取cookies失败:", e$1);
94778
+ return void 0;
94779
+ }
94663
94780
  }
94664
94781
  async getCookiesForHeader() {
94665
94782
  try {
@@ -94725,7 +94842,7 @@ var BiliAPI = class extends koishi.Service {
94725
94842
  for (const cookieData of cookies) {
94726
94843
  if (cookieData.key === "bili_jct") {
94727
94844
  csrf = cookieData.value;
94728
- expires = new Date(cookieData.expires);
94845
+ expires = cookieData.expires ? luxon.DateTime.fromISO(cookieData.expires).toJSDate() : "Infinity";
94729
94846
  domain = cookieData.domain;
94730
94847
  path$6 = cookieData.path;
94731
94848
  secure = cookieData.secure;
@@ -94735,14 +94852,14 @@ var BiliAPI = class extends koishi.Service {
94735
94852
  const cookie = new tough_cookie.Cookie({
94736
94853
  key: cookieData.key,
94737
94854
  value: cookieData.value,
94738
- expires: new Date(cookieData.expires),
94855
+ expires: cookieData.expires ? luxon.DateTime.fromISO(cookieData.expires).toJSDate() : "Infinity",
94739
94856
  domain: cookieData.domain,
94740
94857
  path: cookieData.path,
94741
94858
  secure: cookieData.secure,
94742
94859
  httpOnly: cookieData.httpOnly,
94743
94860
  sameSite: cookieData.sameSite
94744
94861
  });
94745
- this.jar.setCookieSync(cookie, `http${cookie.secure ? "s" : ""}://${cookie.domain}${cookie.path}`, {});
94862
+ this.jar.setCookieSync(cookie, `http${cookie.secure ? "s" : ""}://${cookie.domain}${cookie.path}`);
94746
94863
  }
94747
94864
  const buvid3Cookie = new tough_cookie.Cookie({
94748
94865
  key: "buvid3",
@@ -94754,7 +94871,7 @@ var BiliAPI = class extends koishi.Service {
94754
94871
  httpOnly,
94755
94872
  sameSite
94756
94873
  });
94757
- this.jar.setCookieSync(buvid3Cookie, `http${buvid3Cookie.secure ? "s" : ""}://${buvid3Cookie.domain}${buvid3Cookie.path}`, {});
94874
+ this.jar.setCookieSync(buvid3Cookie, `http${buvid3Cookie.secure ? "s" : ""}://${buvid3Cookie.domain}${buvid3Cookie.path}`);
94758
94875
  this.loginInfoIsLoaded = true;
94759
94876
  this.checkIfTokenNeedRefresh(refresh_token, csrf);
94760
94877
  this.enableRefreshCookiesDetect();
@@ -94801,7 +94918,7 @@ var BiliAPI = class extends koishi.Service {
94801
94918
  const encrypted = new Uint8Array(await node_crypto.default.subtle.encrypt({ name: "RSA-OAEP" }, publicKey, data$1));
94802
94919
  return encrypted.reduce((str, c$1) => str + c$1.toString(16).padStart(2, "0"), "");
94803
94920
  }
94804
- const ts = Date.now();
94921
+ const ts = luxon.DateTime.now().toSeconds();
94805
94922
  const correspondPath = await getCorrespondPath(ts);
94806
94923
  const { data: refreshCsrfHtml } = await this.client.get(`https://www.bilibili.com/correspond/1/${correspondPath}`);
94807
94924
  const { document: document$1 } = new jsdom.JSDOM(refreshCsrfHtml).window;
@@ -95139,85 +95256,7 @@ function apply(ctx, config) {
95139
95256
  return next();
95140
95257
  });
95141
95258
  }
95142
- const Config = koishi.Schema.object({
95143
- require: koishi.Schema.object({}).description("必填设置"),
95144
- key: koishi.Schema.string().pattern(/^[0-9a-f]{32}$/).role("secret").required().description("请输入一个32位小写字母的十六进制密钥(例如:9b8db7ae562b9864efefe06289cc5530),使用此密钥将你的B站登录信息存储在数据库中,请一定保存好此密钥。如果你忘记了此密钥,必须重新登录。你可以自行生成,或到这个网站生成:https://www.sexauth.com/"),
95145
- master: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启主人账号功能,如果您的机器人没有私聊权限请不要开启此功能。开启后如果机器人运行错误会向您进行报告") }).description("主人账号"), koishi.Schema.union([koishi.Schema.object({
95146
- enable: koishi.Schema.const(true).required(),
95147
- platform: koishi.Schema.union([
95148
- "qq",
95149
- "qqguild",
95150
- "onebot",
95151
- "discord",
95152
- "red",
95153
- "telegram",
95154
- "satori",
95155
- "chronocat",
95156
- "lark"
95157
- ]).description("请选择您的私人机器人平台,目前支持QQ、QQ群、OneBot、Discord、RedBot、Telegram、Satori、ChronoCat、Lark。从2.0版本开始,只能在一个平台下使用本插件"),
95158
- masterAccount: koishi.Schema.string().role("secret").required().description("主人账号,在Q群使用可直接使用QQ号,若在其他平台使用,请使用inspect插件获取自身ID"),
95159
- masterAccountGuildId: koishi.Schema.string().role("secret").description("主人账号所在的群组ID,只有在QQ频道、Discord这样的环境才需要填写,请使用inspect插件获取群组ID")
95160
- }), koishi.Schema.object({})])]),
95161
- basicSettings: koishi.Schema.object({}).description("基本设置"),
95162
- userAgent: koishi.Schema.string().description("设置请求头User-Agen,请求出现-352时可以尝试修改,UA获取方法可参考:https://blog.csdn.net/qq_44503987/article/details/104929111"),
95163
- subTitle: koishi.Schema.object({}).description("订阅配置"),
95164
- sub: koishi.Schema.array(koishi.Schema.object({
95165
- name: koishi.Schema.string().description("订阅用户昵称,只是给你自己看的(相当于备注),可填可不填"),
95166
- uid: koishi.Schema.string().required().description("订阅用户UID"),
95167
- dynamic: koishi.Schema.boolean().default(false).description("是否订阅用户动态"),
95168
- live: koishi.Schema.boolean().default(false).description("是否订阅用户直播"),
95169
- target: koishi.Schema.array(koishi.Schema.object({
95170
- platform: koishi.Schema.string().required().description("推送平台,例如onebot、qq、discord"),
95171
- channelArr: koishi.Schema.array(koishi.Schema.object({
95172
- channelId: koishi.Schema.string().required().description("频道/群组号"),
95173
- dynamic: koishi.Schema.boolean().default(false).description("该频道/群组是否推送动态信息"),
95174
- live: koishi.Schema.boolean().default(false).description("该频道/群组是否推送直播通知"),
95175
- liveGuardBuy: koishi.Schema.boolean().default(false).description("该频道/群组是否推送上舰消息"),
95176
- atAll: koishi.Schema.boolean().default(false).description("推送开播通知时是否艾特全体成员"),
95177
- bot: koishi.Schema.string().description("若您有多个相同平台机器人,可在此填写当前群聊执行推送的机器人账号。不填则默认第一个")
95178
- })).role("table").required().description("需推送的频道/群组详细设置")
95179
- })).description("订阅用户需要发送的平台和频道/群组信息(一个平台下可以推送多个频道/群组)"),
95180
- card: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启自定义卡片颜色") }), koishi.Schema.union([koishi.Schema.object({
95181
- enable: koishi.Schema.const(true).required(),
95182
- cardColorStart: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/"),
95183
- cardColorEnd: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/"),
95184
- cardBasePlateColor: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).description("推送卡片底板颜色,请填入16进制颜色代码"),
95185
- cardBasePlateBorder: koishi.Schema.string().pattern(/\d*\.?\d+(?:px|em|rem|%|vh|vw|vmin|vmax)/).description("推送卡片底板边框宽度,请填入css单位,例如1px,12.5rem,100%")
95186
- }), koishi.Schema.object({})])])
95187
- }).collapse()).collapse().description("输入订阅信息,自定义订阅内容; uid: 订阅用户UID,dynamic: 是否需要订阅动态,live: 是否需要订阅直播"),
95188
- dynamic: koishi.Schema.object({}).description("动态推送设置"),
95189
- dynamicUrl: koishi.Schema.boolean().default(false).description("发送动态时是否同时发送链接。注意:如果使用的是QQ官方机器人不能开启此项!"),
95190
- dynamicCron: koishi.Schema.string().default("*/2 * * * *").description("动态监测时间,请填入cron表达式,请勿填入过短时间"),
95191
- dynamicVideoUrlToBV: koishi.Schema.boolean().default(false).description("如果推送的动态是视频动态,且开启了发送链接选项,开启此选项则会将链接转换为BV号以便其他用途"),
95192
- pushImgsInDynamic: koishi.Schema.boolean().default(false).description("是否推送动态中的图片,默认不开启。开启后会单独推送动态中的图片,该功能容易导致QQ风控"),
95193
- live: koishi.Schema.object({}).description("直播推送设置"),
95194
- liveDetectType: koishi.Schema.union([koishi.Schema.const("WS").description("使用WebSocket连接到B站消息服务器进行直播检测,推荐使用"), koishi.Schema.const("API").description("通过轮询API发送请求监测直播状态,此模式理论可无限订阅,但容易产生其他问题,功能没有WS模式全面").experimental()]).role("radio").default("WS").description("直播检测方式,WS为连接到B站消息服务器,API为通过轮询发送请求监测,默认使用WS检测"),
95195
- restartPush: koishi.Schema.boolean().default(true).description("插件重启后,如果订阅的主播正在直播,是否进行一次推送,默认开启"),
95196
- pushTime: koishi.Schema.number().min(0).max(12).step(.5).default(1).description("设定间隔多长时间推送一次直播状态,单位为小时,默认为一小时"),
95197
- customLiveStart: koishi.Schema.string().default("-name开播啦,当前粉丝数:-follower\\n-link").description("自定义开播提示语,-name代表UP昵称,-follower代表当前粉丝数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name开播啦,会发送为xxxUP开播啦"),
95198
- customLive: koishi.Schema.string().default("-name正在直播,目前已播-time,累计观看人数:-watched\\n-link").description("自定义直播中提示语,-name代表UP昵称,-time代表开播时长,-watched代表累计观看人数,-link代表直播间链接(如果使用的是QQ官方机器人,请不要使用),\\n为换行。例如-name正在直播,会发送为xxxUP正在直播xxx"),
95199
- customLiveEnd: koishi.Schema.string().default("-name下播啦,本次直播了-time,粉丝数变化-follower_change").description("自定义下播提示语,-name代表UP昵称,-follower_change代表本场直播粉丝数变,-time代表开播时长,\\n为换行。例如-name下播啦,本次直播了-time,会发送为xxxUP下播啦,直播时长为xx小时xx分钟xx秒"),
95200
- followerDisplay: koishi.Schema.boolean().default(true).description("粉丝数变化和累积观看本场直播的人数是否显示在推送卡片中"),
95201
- hideDesc: koishi.Schema.boolean().default(false).description("是否隐藏UP主直播间简介,开启后推送的直播卡片将不再展示简介"),
95202
- style: koishi.Schema.object({}).description("美化设置"),
95203
- removeBorder: koishi.Schema.boolean().default(false).description("移除推送卡片边框"),
95204
- cardColorStart: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#F38AB5").description("推送卡片的开始渐变背景色,请填入16进制颜色代码,参考网站:https://webkul.github.io/coolhue/"),
95205
- cardColorEnd: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#F9CCDF").description("推送卡片的结束渐变背景色,请填入16进制颜色代码,参考网站:https://colorate.azurewebsites.net/"),
95206
- cardBasePlateColor: koishi.Schema.string().pattern(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/).default("#FFF5EE").description("推送卡片底板颜色,请填入16进制颜色代码"),
95207
- cardBasePlateBorder: koishi.Schema.string().pattern(/\d*\.?\d+(?:px|em|rem|%|vh|vw|vmin|vmax)/).default("15px").description("推送卡片底板边框宽度,请填入css单位,例如1px,12.5rem,100%"),
95208
- enableLargeFont: koishi.Schema.boolean().default(false).description("是否开启动态推送卡片大字体模式,默认为小字体。小字体更漂亮,但阅读比较吃力,大字体更易阅读,但相对没这么好看"),
95209
- font: koishi.Schema.string().description("推送卡片的字体样式,如果你想用你自己的字体可以在此填写,例如:Microsoft YaHei"),
95210
- filter: koishi.Schema.intersect([koishi.Schema.object({ enable: koishi.Schema.boolean().default(false).description("是否开启动态屏蔽功能") }).description("屏蔽设置"), koishi.Schema.union([koishi.Schema.object({
95211
- enable: koishi.Schema.const(true).required().experimental(),
95212
- notify: koishi.Schema.boolean().default(false).description("动态被屏蔽是否发送提示"),
95213
- regex: koishi.Schema.string().description("正则表达式屏蔽"),
95214
- keywords: koishi.Schema.array(String).description("关键字屏蔽,一个关键字为一项"),
95215
- forward: koishi.Schema.boolean().default(false).description("是否屏蔽转发动态"),
95216
- article: koishi.Schema.boolean().default(false).description("是否屏蔽专栏")
95217
- }), koishi.Schema.object({})])]),
95218
- debug: koishi.Schema.object({}).description("调试设置"),
95219
- dynamicDebugMode: koishi.Schema.boolean().default(false).description("动态调试模式,开启后会在控制台输出动态推送的详细信息,用于调试")
95220
- });
95259
+ const Config = BAConfigSchema;
95221
95260
 
95222
95261
  //#endregion
95223
95262
  exports.Config = Config;