From b69c2f3decb60f72f75923c2caf2c608502a87f1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 15:22:26 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Automated=20build:=20v7.1.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/bilibili-live-tasks-helper.min.user.js | 6 +- dist/bilibili-live-tasks-helper.user.js | 73 +++++++++++++-------- 2 files changed, 47 insertions(+), 32 deletions(-) diff --git a/dist/bilibili-live-tasks-helper.min.user.js b/dist/bilibili-live-tasks-helper.min.user.js index eb49e26..7ce94cf 100644 --- a/dist/bilibili-live-tasks-helper.min.user.js +++ b/dist/bilibili-live-tasks-helper.min.user.js @@ -3,7 +3,7 @@ // @name:en Bilibili Live Tasks Helper // @name:zh Bilibili Live Tasks Helper // @namespace https://github.com/andywang425 -// @version 7.1.5 +// @version 7.1.6 // @author andywang425 // @description Enhancing the experience of watching Bilibili live streaming. // @description:en Enhancing the experience of watching Bilibili live streaming. @@ -33,7 +33,7 @@ // @match *://live.bilibili.com/blanc/7* // @match *://live.bilibili.com/blanc/8* // @match *://live.bilibili.com/blanc/9* -// @require https://unpkg.com/vue@3.4.31/dist/vue.global.prod.js +// @require https://unpkg.com/vue@3.4.33/dist/vue.global.prod.js // @require data:application/javascript,%3Bwindow.Vue%3DVue%3Bwindow.VueDemi%3DVue%3B // @require https://unpkg.com/element-plus@2.7.7/dist/index.full.min.js // @require https://unpkg.com/@element-plus/icons-vue@2.3.1/dist/index.iife.min.js @@ -57,4 +57,4 @@ // @grant unsafeWindow // @run-at document-start // ==/UserScript== -(e=>{if("function"==typeof GM_addStyle)return void GM_addStyle(e);const t=document.createElement("style");t.textContent=e,document.head.append(t)})(" .title[data-v-a28e87fa]{padding-left:20px;align-items:baseline;display:flex}.header-big-text[data-v-a28e87fa]{font-size:var(--big-text-size);align-self:unset}.header-small-text[data-v-a28e87fa]{font-size:var(--small-text-size);align-self:unset;margin-left:10px;--small-text-size: 18px}.collapse-btn[data-v-a28e87fa]{display:flex;justify-content:center;align-items:center;height:100%;float:left;cursor:pointer}.avatar-wrap[data-v-d7c74163]{width:80px;height:80px}.avatar[data-v-d7c74163]{display:flex;justify-content:center;align-items:center;border-radius:50%}.base[data-v-3884f5fc]{z-index:1003;position:absolute;background-color:#fff;border-bottom:1px solid #e3e5e7;border-left:1px solid #e3e5e7;border-right:1px solid #e3e5e7}.header[data-v-3884f5fc]{position:relative;box-sizing:border-box;width:100%;font-size:var(--big-text-size);align-items:center;display:flex;border-bottom:1px solid #e3e5e7;height:60px;--big-text-size: 25px}.aside[data-v-3884f5fc]{width:auto}.aside #aside-el-menu[data-v-3884f5fc]:not(.el-menu--collapse){width:150px}.main[data-v-3884f5fc]{--main-top-botton-padding: calc(var(--el-main-padding) * .625);padding-top:var(--main-top-botton-padding);padding-bottom:var(--main-top-botton-padding)}.fade-enter-active[data-v-3884f5fc],.fade-leave-active[data-v-3884f5fc]{transition:opacity .1s ease}.fade-enter-from[data-v-3884f5fc],.fade-leave-to[data-v-3884f5fc]{opacity:0}.info-icon[data-v-5cc8821e]{font-size:var(--el-font-size-base);cursor:pointer}.status-icon[data-v-41b10222]{font-size:var(--el-font-size-base)}.blth_btn{background-color:#23ade5;font-size:small;margin-inline-start:5px;color:#fff;border-radius:4px;border:none;padding:5px;cursor:pointer;box-shadow:0 0 2px #00000075;line-height:10px;margin-left:15px}.blth_btn:hover{background-color:#1097cc}.blth_btn:hover:active{background-color:#0e86b6;position:relative;top:1px} "),async function(e,t,o,i,n,a,s,r){"use strict";function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const c=l(i);var d,u=Object.defineProperty,m=(e,t,o)=>((e,t,o)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o)(e,"symbol"!=typeof t?t+"":t,o),h=(()=>"undefined"!=typeof GM_addStyle?GM_addStyle:void 0)(),g=(()=>"undefined"!=typeof GM_getValue?GM_getValue:void 0)(),f=(()=>"undefined"!=typeof GM_setValue?GM_setValue:void 0)(),p=(()=>"undefined"!=typeof GM_xmlhttpRequest?GM_xmlhttpRequest:void 0)(),v=(()=>"undefined"!=typeof unsafeWindow?unsafeWindow:void 0)();const w={ui:{isCollapse:!1,isShowPanel:!0,activeMenuIndex:"MainSiteTasks"},modules:{DailyTasks:{MainSiteTasks:{login:{enabled:!1,_lastCompleteTime:0},watch:{enabled:!1,_lastCompleteTime:0},coin:{enabled:!1,num:1,_lastCompleteTime:0},share:{enabled:!1,_lastCompleteTime:0}},LiveTasks:{sign:{enabled:!1,_lastCompleteTime:0},medalTasks:{danmu:{enabled:!1,includeHighLevelMedals:!1,list:["(⌒▽⌒)","( ̄▽ ̄)","(=・ω・=)","(`・ω・´)","(〜 ̄△ ̄)〜","(・∀・)","(°∀°)ノ","╮( ̄▽ ̄)╭","_(:3」∠)_","(^・ω・^ )","(● ̄(エ) ̄●)","ε=ε=(ノ≧∇≦)ノ","⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄","←◡←","(●'◡'●)ノ♥"],_lastCompleteTime:0},like:{enabled:!1,_lastCompleteTime:0},watch:{enabled:!1,time:70,_watchedSecondsToday:0,_lastWatchTime:0,_lastCompleteTime:0},isWhiteList:!1,roomidList:[]}},OtherTasks:{groupSign:{enabled:!1,_lastCompleteTime:0},silverToCoin:{enabled:!1,_lastCompleteTime:0},coinToSilver:{enabled:!1,num:1,_lastCompleteTime:0},getYearVipPrivilege:{enabled:!1,_nextReceiveTime:0}}},EnhanceExperience:{switchLiveStreamQuality:{enabled:!1,qualityDesc:"原画"},banp2p:{enabled:!1},noReport:{enabled:!1},noSleep:{enabled:!1},invisibility:{enabled:!1},showContributionUserNum:{enabled:!1}},RemoveElement:{removePKBox:{enabled:!1},removeLiveWaterMark:{enabled:!1},removeShopPopover:{enabled:!1},removeGameParty:{enabled:!1},removeGiftPopover:{enabled:!1},removeMicPopover:{enabled:!1},removeComboCard:{enabled:!1},removeRank:{enabled:!1},removeGiftPlanet:{enabled:!1},removeActivityBanner:{enabled:!1},removePKBanner:{enabled:!1},removeFlipView:{enabled:!1},removeRecommendRoom:{enabled:!1},removeLiveMosaic:{enabled:!1}}},cache:{lastAliveHeartBeatTime:0}};class y{static mergeConfigs(e,t){const i=o.difference(o.keys(e),o.keys(t));e=o.omit(e,i);const n=o.difference(o.keys(t),o.keys(e));o.assign(e,o.pick(t,n));for(const[i,a]of Object.entries(e).filter((e=>!n.includes(e[0]))))o.isPlainObject(a)&&(e[i]=this.mergeConfigs(a,t[i]));return e}static setUiConfig(e){f("ui",e)}static getUiConfig(){return this.mergeConfigs(g("ui",{}),w.ui)}static setModuleConfig(e){f("modules",e)}static getModuleConfig(){return this.mergeConfigs(g("modules",{}),w.modules)}static setCache(e){f("cache",e)}static getCache(){return this.mergeConfigs(g("cache",{}),w.cache)}}const _=t.defineStore("ui",(()=>{const t=e.reactive(y.getUiConfig()),i=e.computed((()=>({MainSiteTasks:"主站任务",LiveTasks:"直播任务",OtherTasks:"其它任务",EnhanceExperience:"体验优化",RemoveElement:"移除元素"}[t.activeMenuIndex]))),n=e.reactive({top:0,left:0,height:0,width:0}),a=e.computed((()=>({top:n.top.toString()+"px",left:n.left.toString()+"px",height:n.height.toString()+"px",width:n.width.toString()+"px"}))),s=e.computed((()=>t.isShowPanel?"隐藏控制面板":"显示控制面板")),r=e.computed((()=>(n.height-60).toString()+"px"));return e.watch(t,o.debounce((e=>y.setUiConfig(e)),350)),{isShowPanelButtonText:s,activeMenuName:i,baseStyleValue:n,baseStyle:a,scrollBarHeight:r,uiConfig:t,changeCollapse:function(){t.isCollapse=!t.isCollapse},changeShowPanel:function(){t.isShowPanel=!t.isShowPanel},setActiveMenuIndex:function(e){t.activeMenuIndex=e}}})),x={class:"title"},b=(e,t)=>{const o=e.__vccOpts||e;for(const[e,i]of t)o[e]=i;return o},k=b(e.defineComponent({__name:"PanelHeader",setup(t){const o=_();return(t,n)=>{const a=e.resolveComponent("el-icon"),s=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"collapse-btn",onClick:n[0]||(n[0]=(...t)=>e.unref(o).changeCollapse&&e.unref(o).changeCollapse(...t))},[e.unref(o).uiConfig.isCollapse?(e.openBlock(),e.createBlock(a,{key:0},{default:e.withCtx((()=>[e.createVNode(e.unref(i.Expand))])),_:1})):(e.openBlock(),e.createBlock(a,{key:1},{default:e.withCtx((()=>[e.createVNode(e.unref(i.Fold))])),_:1}))]),e.createElementVNode("div",x,[e.createVNode(s,{tag:"b",class:"header-big-text"},{default:e.withCtx((()=>[e.createTextVNode("控制面板")])),_:1}),e.createVNode(s,{class:"header-small-text"},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(e.unref(o).activeMenuName),1)])),_:1})])],64)}}}),[["__scopeId","data-v-a28e87fa"]]),T=e.defineComponent({__name:"PanelAside",setup(t){const o=_(),i=[{icon:"Tasks",title:"每日任务",index:"DailyTasks",subs:[{title:"主站任务",index:"MainSiteTasks"},{title:"直播任务",index:"LiveTasks"},{title:"其它任务",index:"OtherTasks"}]},{icon:"Monitor",title:"体验优化",index:"EnhanceExperience"},{icon:"Scissor",title:"移除元素",index:"RemoveElement"}];return(t,n)=>{const a=e.resolveComponent("el-icon"),s=e.resolveComponent("el-menu-item"),r=e.resolveComponent("el-sub-menu"),l=e.resolveComponent("el-menu");return e.openBlock(),e.createBlock(l,{"default-active":e.unref(o).uiConfig.activeMenuIndex,style:e.normalizeStyle({"min-height":e.unref(o).scrollBarHeight}),collapse:e.unref(o).uiConfig.isCollapse,"unique-opened":"",onSelect:e.unref(o).setActiveMenuIndex,id:"aside-el-menu"},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,(t=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.subs?(e.openBlock(),e.createBlock(r,{index:t.index,key:t.index},{title:e.withCtx((()=>[e.createVNode(a,null,{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))])),_:2},1024),e.createElementVNode("span",null,e.toDisplayString(t.title),1)])),default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subs,(t=>(e.openBlock(),e.createBlock(s,{index:t.index,key:t.index},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.title),1)])),_:2},1032,["index"])))),128))])),_:2},1032,["index"])):(e.openBlock(),e.createBlock(s,{index:t.index,key:t.index},{title:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.title),1)])),default:e.withCtx((()=>[e.createVNode(a,null,{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))])),_:2},1024)])),_:2},1032,["index"]))],64)))),64))])),_:1},8,["default-active","style","collapse","onSelect"])}}}),C=t.defineStore("bili",(()=>{const t=e.ref(null),o=e.ref(null),i=e.ref(null),n=e.ref(null),a=e.ref(null),s=e.ref(null),r=e.ref(null),l=e.computed((()=>{var e;return(null==(e=r.value)?void 0:e.filter((e=>0!==e.room_info.room_id)))??null}));return{BilibiliLive:t,userInfo:i,giftConfig:n,cookies:o,dailyRewardInfo:a,dynamicVideos:s,fansMedals:r,filteredFansMedals:l}}));let V=class{constructor(e,t){m(this,"url_prefix"),m(this,"origin"),this.url_prefix=e??"",this.origin=t??"https://bilibili.com"}get(e,t,i){return new Promise(((n,a)=>{const s={method:"GET",url:this.url_prefix+e+(t?"?"+new URLSearchParams(t).toString():""),responseType:"json",headers:{Accept:"application/json, text/plain, */*",Referer:this.origin,Origin:this.origin,"Sec-Fetch-Site":"same-site"},onload:function(e){n(e.response)},onerror:function(e){a(e)}},r=o.defaultsDeep(i,s);p(r)}))}post(e,t,i){return new Promise(((n,a)=>{const s={method:"POST",url:this.url_prefix.concat(e),data:new URLSearchParams(t).toString(),responseType:"json",headers:{Accept:"application/json, text/plain, */*",Referer:this.origin,Origin:this.origin,"Sec-Fetch-Site":"same-site","Content-Type":"application/x-www-form-urlencoded"},onload:function(e){n(e.response)},onerror:function(e){a(e)}},r=o.defaultsDeep(i,s);"multipart/form-data"===r.headers["Content-Type"]&&delete r.headers["Content-Type"],p(r)}))}};function S(e){return new Promise((t=>setTimeout(t,e)))}function N(e){const t=new FormData;return o.forEach(e,((e,o)=>t.append(o,e.toString()))),t}function P(e,t,i){o.forOwn(e,(function(e,n){const a=i?i+"."+n:n;o.isPlainObject(e)&&!o.isEmpty(e)?P(e,t,a):t(e,a)}))}function E(e){switch(e){case"document-start":return Promise.resolve();case"document-head":return new Promise((e=>{if(document.head)e();else{const t=new MutationObserver((()=>{document.head&&(t.disconnect(),e())}));t.observe(document.documentElement,{childList:!0})}}));case"document-body":return new Promise((e=>{if(document.body)e();else{const t=new MutationObserver((()=>{document.body&&(t.disconnect(),e())}));t.observe(document.documentElement,{childList:!0})}}));case"document-end":return new Promise((e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",(()=>e()))}));case"window-load":return new Promise((e=>{"complete"===document.readyState?e():window.addEventListener("load",(()=>e()))}));default:return Promise.reject("Illegal moment")}}function R(e,t=0,o=5){const i=n.DateTime.fromMillis(e),a=n.DateTime.now().set({hour:t,minute:o,second:0,millisecond:0}),s=a.plus({days:1}),r=a.minus({days:1});return n.DateTime.now()>=a?i>=a&&i=r&&ii&&(i=i.plus({days:1}));const a=i.diff(o);return{ms:a.toMillis(),str:a.toFormat("h小时m分钟s秒").replace(/^0小时/,"").replace(/^0分钟/,"")}}function B(e,t,o,i){const a=n.DateTime.now(),s=n.DateTime.local(a.year,a.month,a.day,e,t),r=n.DateTime.local(a.year,a.month,a.day,o,i);return a>=s&&aL.live.get("/xlive/web-room/v1/giftPanel/roomGiftConfig",{platform:i,room_id:e,area_parent_id:t,area_id:o}),doSign:()=>L.live.get("/xlive/web-ucenter/v1/sign/DoSign"),getSignInfo:()=>L.live.get("/xlive/web-ucenter/v1/sign/WebGetSignInfo"),fansMedalPanel:(e,t=10)=>L.live.get("/xlive/app-ucenter/v1/fansMedal/panel",{page:e,page_size:t}),sendMsg:(e,t,o=0,i=1,n=0,a=25,s=16777215,r=0)=>{const l=C().cookies.bili_jct;return L.live.post("/msg/send",void 0,{data:N({roomid:t,room_type:o,rnd:D(),msg:e,mode:i,jumpfrom:n,fontsize:a,csrf:l,csrf_token:l,color:s,bubble:r}),headers:{"Content-Type":"multipart/form-data"}})},likeReport:(e,t,o=1,i="")=>{var n;const a=C(),s=a.cookies.bili_jct,r=null==(n=a.BilibiliLive)?void 0:n.UID;return L.live.post("/xlive/app-ucenter/v1/like_info_v3/like/likeReportV3",{click_time:o,room_id:e,anchor_id:t,uid:r,ts:D(),csrf:s,csrf_token:s,visit_id:i})},getInfoByRoom:e=>L.live.get("/xlive/web-room/v1/index/getInfoByRoom",{room_id:e}),getUserTaskProgress:(e=11153765)=>{const t=C().cookies.bili_jct;return L.live.get("/xlive/app-ucenter/v1/userTask/GetUserTaskProgress",{target_id:e,csrf:t,ts:D()})},userTaskReceiveRewards:(e=11153765)=>{const t=C().cookies.bili_jct;return L.live.post("/xlive/app-ucenter/v1/userTask/UserTaskReceiveRewards",{actionKey:"csrf",target_id:e,csrf:t,ts:D()})},silver2coin:(e="")=>{const t=C().cookies.bili_jct;return L.live.post("/xlive/revenue/v1/wallet/silver2coin",{csrf:t,csrf_token:t,visit_id:e})},coin2silver:(e,t="pc",o="")=>{const i=C().cookies.bili_jct;return L.live.post("/xlive/revenue/v1/wallet/coin2silver",{num:e,csrf:i,csrf_token:i,platform:t,visit_id:o})},queryContributionRank:(e,t,o,i,n="online_rank",a="contribution_rank")=>L.live.get("/xlive/general-interface/v1/rank/queryContributionRank",{ruid:e,room_id:t,page:o,page_size:i,type:n,switch:a}),wearMedal:(e,t="")=>{const o=C().cookies.bili_jct;return L.live.post("/xlive/web-room/v1/fansMedal/wear",{medal_id:e,csrf_token:o,csrf:o,visit_id:t})}},A={E:(e,t,o,i=0,n=[],a="")=>{const s=C().cookies.bili_jct;return L.liveTrace.post("/xlive/data-interface/v1/x25Kn/E",{id:JSON.stringify(e),device:JSON.stringify(t),ruid:o,ts:I(),is_patch:i,heart_beat:JSON.stringify(n),ua:navigator.userAgent,csrf_token:s,csrf:s,visit_id:a})},X:(e,t,o,i,n,a,s,r,l="")=>{const c=C().cookies.bili_jct;return L.liveTrace.post("/xlive/data-interface/v1/x25Kn/X",{s:e,id:JSON.stringify(t),device:JSON.stringify(o),ruid:i,ets:n,benchmark:a,time:s,ts:r,ua:navigator.userAgent,csrf_token:c,csrf:c,visit_id:l})}},$={nav:()=>L.main.get("/x/web-interface/nav"),reward:()=>L.main.get("/x/member/web/exp/reward"),dynamicAll:(e,t=1,o=-480,i="itemOpusStyle")=>L.main.get("/x/polymer/web-dynamic/v1/feed/all",{timezone_offset:o,type:e,page:t,features:i}),videoHeartbeat:(e,t="",o=0,i=0,n=0,a="https://t.bilibili.com/?spm_id_from=444.3.0.0",s=116,r=100,l=3,c=0,d=0,u=2,m=0,h=0,g="333.488.0.0",f="333.31.list.card_archive.click",p='{"player_version":"4.1.21-rc.1727.0"}')=>{var v;const w=C();return L.main.post("/x/click-interface/web/heartbeat",{start_ts:D(),mid:null==(v=C().userInfo)?void 0:v.mid,aid:e,cid:t,type:l,sub_type:c,dt:u,play_type:d,realtime:o,played_time:i,real_played_time:n,refer_url:a,quality:s,video_duration:r,last_play_progress_time:m,max_play_progress_time:h,spmid:g,from_spmid:f,extra:p,csrf:w.cookies.bili_jct})},share:(e,t="pc_client_normal",o=2,i=0,n=1)=>{const a=C().cookies.bili_jct;return L.main.post("/x/web-interface/share/add",{aid:e,eab_x:o,ramval:i,source:t,ga:n,csrf:a})},coinAdd:(e,t,o=0,i=!0,n=2,a=6,s="web_normal",r=1)=>{const l=C().cookies.bili_jct;return L.main.post("/x/web-interface/coin/add ",{aid:e,multiply:t,select_like:o,cross_domain:i,eab_x:n,ramval:a,source:s,ga:r,csrf:l})},videoRelation:(e,t="")=>L.main.get("/x/web-interface/archive/relation",{aid:e,bvid:t}),vip:{myPrivilege:()=>{const e=C().cookies.bili_jct;return L.main.get("/x/vip/privilege/my",{csrf:e},{headers:{Referer:"https://account.bilibili.com/account/big/myPackage",Origin:"https://account.bilibili.com/account/big/myPackage"}})},receivePrivilege:(e,t="web")=>{const o=C().cookies.bili_jct;return L.main.post("/x/vip/privilege/receive",{type:e,platform:t,csrf:o},{headers:{Referer:"https://account.bilibili.com/account/big/myPackage",Origin:"https://account.bilibili.com"}})},addExperience:()=>{var e,t,o;const i=C(),n=null==(e=i.BilibiliLive)?void 0:e.UID,a=null==(t=i.cookies)?void 0:t.buvid3,s=null==(o=i.cookies)?void 0:o.bili_jct;return L.main.post("/x/vip/experience/add",{mid:n,buvid:a,csrf:s},{headers:{Referer:"https://account.bilibili.com/big",Origin:"https://account.bilibili.com"}})}}},U={myGroups:(e=0,t="web")=>L.vc.get("/link_group/v1/member/my_groups",{build:e,mobi_app:t}),signIn:(e,t)=>L.vc.get("/link_setting/v1/link_setting/sign_in",{group_id:e,owner_id:t})};class j{constructor(e){m(this,"NAME","BLTH"),m(this,"prefix_title_str"),m(this,"title"),this.title=e,this.prefix_title_str=e.split("_").join("][")}get prefix(){return[`%c${this.NAME}%c[${(new Date).toLocaleString()}]%c[${this.prefix_title_str}]%c:`,"font-weight: bold; color: white; background-color: #23ade5; padding: 1px 4px; border-radius: 4px;","font-weight: bold; color: #0920e6;","font-weight: bold;",""]}log(...e){console.log(...this.prefix,...e)}error(...e){console.error(...this.prefix,...e)}warn(...e){console.warn(...this.prefix,...e)}}class H{constructor(e){m(this,"moduleName"),m(this,"logger"),m(this,"moduleStore",We()),m(this,"config"),this.moduleName=e,this.logger=new j(this.moduleName)}set status(e){throw new Error("Method not implemented.")}run(){throw new Error("Method not implemented.")}}m(H,"runOnMultiplePages",!1),m(H,"runAt","document-body"),m(H,"onFrame","target"),m(H,"runAfterDefault",!0);function F(e,t=200,o=1e4){return new Promise(((i,n)=>{const a=Date.now(),s=new Set(e),r={},l=setInterval((()=>{Object.assign(r,function(e){const t={},o=new Set(e);for(const e of o)t[e]=null;for(const e of document.cookie.split("; ")){const[i,...n]=e.split("="),a=n.join("=");if(o.has(i)&&(t[i]=decodeURIComponent(a),o.delete(i),0===o.size))break}return t}(s));for(const e in r)null!==r[e]&&s.delete(e);0===s.size?(clearInterval(l),i(r)):-1!==o&&Date.now()-a>o&&(clearInterval(l),n("获取以下Cookies超时: "+[...s]))}),t)}))}class G extends H{getBilibiliLive(){return this.logger.log("unsafeWindow.BilibiliLive",v.BilibiliLive),new Promise((e=>{0===v.BilibiliLive.UID?v.BilibiliLive=new Proxy(v.BilibiliLive,{set:(t,o,i)=>(t[o]=i,"UID"===o&&(v.BilibiliLive=t,e(v.BilibiliLive)),!0)}):e(v.BilibiliLive)}))}async run(){C().BilibiliLive=await this.getBilibiliLive()}}m(G,"runOnMultiplePages",!0);const q=Object.freeze(Object.defineProperty({__proto__:null,Default_BilibiliLive:G,Default_Cookies:class extends H{getCookies(){return F(["bili_jct","LIVE_BUVID","buvid3"])}async run(){C().cookies=await this.getCookies()}},Default_DailyRewardInfo:class extends H{async getDailyRewardInfo(){const e=this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks;if(!Object.values(e).some((e=>e.enabled&&!R(e._lastCompleteTime))))return Promise.resolve(null);try{const e=await $.reward();return this.logger.log("BAPI.main.reward response",e),0===e.code?Promise.resolve(e.data):(this.logger.error("获取主站每日任务完成情况失败",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取主站每日任务完成情况出错",e),Promise.reject(e)}}async run(){const e=C();e.dailyRewardInfo=await this.getDailyRewardInfo(),setTimeout((async()=>{e.dailyRewardInfo=await this.getDailyRewardInfo()}),M(0,4).ms)}},Default_DynamicVideos:class extends H{async getDynamicVideos(){const e=this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks;if(!Object.entries(e).filter((([e])=>["watch","share","coin"].includes(e))).some((e=>e[1].enabled&&!R(e[1]._lastCompleteTime))))return Promise.resolve(null);try{const e=await $.dynamicAll("video");return this.logger.log("BAPI.main.dynamicAll response",e),0===e.code?Promise.resolve(e.data.items):(this.logger.error("获取主站每日任务完成情况失败",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取主站每日任务完成情况出错",e),Promise.reject(e)}}async run(){const e=C();e.dynamicVideos=await this.getDynamicVideos(),setTimeout((async()=>{e.dynamicVideos=await this.getDynamicVideos()}),M(0,4).ms)}},Default_FansMetals:class extends H{async getFansMetals(e=1/0,t=!1){const o=this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks;if(!t&&!Object.entries(o).filter((([e])=>["danmu","like","watch"].includes(e))).some((e=>e[1].enabled&&!R(e[1]._lastCompleteTime))))return Promise.resolve(null);{const t=[];let o=1;try{const i=await O.fansMedalPanel(1);if(this.logger.log("BAPI.live.fansMedalPanel(1) response",i),0!==i.code)return this.logger.error("获取粉丝勋章列表第1页失败",i.message),Promise.reject(i.message);o=i.data.page_info.total_page,t.push(...i.data.special_list,...i.data.list);for(let n=2;n<=Math.min(o,e);n++){const e=await O.fansMedalPanel(n);if(this.logger.log(`BAPI.live.fansMedalPanel(${n}) response`,e),0!==i.code)return this.logger.error(`获取粉丝勋章列表第${n}页失败`,i.message),t;t.push(...e.data.list),await S(250)}return Promise.resolve(t)}catch(e){return this.logger.error("获取粉丝勋章列表出错",e),Promise.reject(e)}}}async run(){const e=C();e.fansMedals=await this.getFansMetals(),setTimeout((async()=>{const t=await this.getFansMetals(1,!0);null==t||t.forEach((t=>{var o;(null==(o=e.fansMedals)?void 0:o.every((e=>e.medal.target_id!==t.medal.target_id)))&&e.fansMedals.push(t)}))}),M(0,4).ms),We().emitter.on("Default_FansMedals",(async()=>{e.fansMedals=await this.getFansMetals(1/0,!0)}))}},Default_UserInfo:class extends H{async getUserInfo(){try{const e=await $.nav();return this.logger.log("BAPI.main.nav response",e),0===e.code?Promise.resolve(e.data):(this.logger.error("获取用户信息失败",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取用户信息出错",e),Promise.reject(e)}}async run(){const e=C();e.userInfo=await this.getUserInfo(),setTimeout((async()=>{e.userInfo=await this.getUserInfo()}),M(0,4).ms)}}},Symbol.toStringTag,{value:"Module"}));const z=document.querySelector.bind(document);document.querySelectorAll.bind(document);const K=document.createElement.bind(document);const W=()=>v.self===v.top;class X{constructor(e,t,o,i,n,a=!1){m(this,"logger",new j("RoomHeart")),m(this,"config"),m(this,"isLast"),m(this,"watchedSeconds"),m(this,"timer"),m(this,"stop",!1),m(this,"areaID"),m(this,"parentID"),m(this,"roomID"),m(this,"ruid"),m(this,"seq",0),m(this,"buvid",(null==(d=C().cookies)?void 0:d.LIVE_BUVID)??function(e){const t=`; ${document.cookie}`.split(`; ${e}=`);return 2===t.length?t.pop().split(";").shift():null}("LIVE_BUVID")),m(this,"uuid","xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))),m(this,"device",[this.buvid,this.uuid]),m(this,"ua",navigator.userAgent),m(this,"heartBeatInterval"),m(this,"secretKey"),m(this,"secretRule"),m(this,"timestamp"),this.roomID=e,this.areaID=t,this.parentID=o,this.ruid=i,this.watchedSeconds=n,this.isLast=a,this.config=We().moduleConfig.DailyTasks.LiveTasks.medalTasks.watch}set status(e){We().moduleStatus.DailyTasks.LiveTasks.medalTasks.watch=e}get id(){return[this.parentID,this.areaID,this.seq,this.roomID]}start(){if(this.buvid)return this.timer=setTimeout((()=>this.stop=!0),M(0,0).ms),this.E();this.logger.error(`缺少buvid,无法为直播间 ${this.roomID} 执行观看直播任务,请尝试刷新页面`)}async E(){if(this.stop)this.status="";else try{const e=await A.E(this.id,this.device,this.ruid);this.logger.log(`BAPI.liveTrace.E(${this.id}, ${this.device}, ${this.ruid}) response`,e),0===e.code?(this.seq+=1,({heartbeat_interval:this.heartBeatInterval,secret_key:this.secretKey,secret_rule:this.secretRule,timestamp:this.timestamp}=e.data),setTimeout((()=>this.X()),1e3*this.heartBeatInterval)):this.logger.error(`BAPI.liveTrace.E(${this.id}, ${this.device}, ${this.ruid}) 失败`,e.message)}catch(e){this.logger.error(`BAPI.liveTrace.E(${this.id}, ${this.device}, ${this.ruid}) 出错`,e)}}async X(){if(this.stop)this.status="";else try{const e={id:JSON.stringify(this.id),device:JSON.stringify(this.device),ets:this.timestamp,benchmark:this.secretKey,time:this.heartBeatInterval,ts:I(),ua:this.ua},t=this.sypder(JSON.stringify(e),this.secretRule),o=await A.X(t,this.id,this.device,this.ruid,this.timestamp,this.secretKey,this.heartBeatInterval,e.ts);if(this.logger.log(`BAPI.liveTrace.X(${t}, ${this.id}, ${this.device}, ${this.ruid}, ${this.timestamp}, ${this.secretKey}, ${this.heartBeatInterval}, ${e.ts}) response`,o),0===o.code){if(this.seq+=1,this.watchedSeconds+=this.heartBeatInterval,this.isLast&&(this.config._watchedSecondsToday=this.watchedSeconds),this.watchedSeconds>=60*this.config.time)return this.isLast&&(this.config._lastCompleteTime=I(),this.logger.log("观看直播任务已完成"),this.status="done"),void clearTimeout(this.timer);({heartbeat_interval:this.heartBeatInterval,secret_key:this.secretKey,secret_rule:this.secretRule,timestamp:this.timestamp}=o.data),setTimeout((()=>this.X()),1e3*this.heartBeatInterval)}else this.logger.error(`BAPI.liveTrace.X(${t}, ${this.id}, ${this.device}, ${this.ruid}, ${this.timestamp}, ${this.secretKey}, ${this.heartBeatInterval}) 失败`,o.message)}catch(e){this.logger.error(`BAPI.liveTrace.X(s, ${this.id}, ${this.device}, ${this.ruid}, ${this.timestamp}, ${this.secretKey}, ${this.heartBeatInterval}) 出错`,e)}}sypder(e,t){const o=JSON.parse(e),[i,n,s,r]=JSON.parse(o.id),[l,c]=JSON.parse(o.device),d=o.benchmark,u={platform:"web",parent_id:i,area_id:n,seq_id:s,room_id:r,buvid:l,uuid:c,ets:o.ets,time:o.time,ts:o.ts};let m=JSON.stringify(u);for(const e of t)switch(e){case 0:default:m=a.HmacMD5(m,d).toString(a.enc.Hex);break;case 1:m=a.HmacSHA1(m,d).toString(a.enc.Hex);break;case 2:m=a.HmacSHA256(m,d).toString(a.enc.Hex);break;case 3:m=a.HmacSHA224(m,d).toString(a.enc.Hex);break;case 4:m=a.HmacSHA512(m,d).toString(a.enc.Hex);break;case 5:m=a.HmacSHA384(m,d).toString(a.enc.Hex)}return m}}class J extends H{constructor(){super(...arguments),m(this,"medalTasksConfig",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks),m(this,"config",this.medalTasksConfig.watch)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.medalTasks.watch=e}getRoomidUidList(){const e=C();return e.filteredFansMedals?e.filteredFansMedals.filter((e=>e.medal.level<20&&(this.medalTasksConfig.isWhiteList?this.medalTasksConfig.roomidList.includes(e.room_info.room_id):!this.medalTasksConfig.roomidList.includes(e.room_info.room_id)))).map((e=>[e.room_info.room_id,e.medal.target_id])).slice(0,199):null}async getAreaInfo(e){try{const t=await O.getInfoByRoom(e);if(this.logger.log(`BAPI.live.getInfoByRoom(${e}) response`,t),0===t.code){const e=t.data.room_info;return[e.area_id,e.parent_area_id]}return[-1,-1]}catch(t){return this.logger.error(`获取指定直播间的 area_id 和 parent_area_id(roomid = ${e}) 出错`,t),[-1,-1]}}async run(){if(this.logger.log("观看直播模块开始运行"),this.config.enabled)if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的观看直播任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过观看直播任务了"),this.status="done");else{this.status="running",R(this.config._lastWatchTime,0,0)?this.config._watchedSecondsToday-=this.config._watchedSecondsToday%300:this.config._watchedSecondsToday=0,this.config._lastWatchTime=I();const e=this.getRoomidUidList();if(e)if(0===e.length)this.status="done",this.config._lastCompleteTime=I();else for(let t=0;t0&&a>0&&new X(o,n,a,i,this.config._watchedSecondsToday,t===e.length-1).start(),await S(3e3)}}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离观看直播模块下次运行时间:",e.str)}}m(J,"runAt","window-load");class Q extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.switchLiveStreamQuality)}async waitForPlayer(){return new Promise(((e,t)=>{const o=v.top?v.top:v,i=setInterval((()=>{o.livePlayer&&Object.prototype.hasOwnProperty.call(o.livePlayer,"switchQuality")&&Object.prototype.hasOwnProperty.call(o.livePlayer,"getPlayerInfo")&&(clearInterval(i),clearTimeout(n),e(o.livePlayer))}),200),n=setTimeout((()=>{clearInterval(i),clearTimeout(n),t("等待播放器超时")}),1e4)}))}async switchQuality(e){const t=e.getPlayerInfo();0===t.liveStatus?this.logger.log("当前直播间未开播,无需切换画质"):setTimeout((()=>{const o=t.qualityCandidates.find((({desc:e})=>e===this.config.qualityDesc));o?t.quality!==o.qn?(e.switchQuality(o.qn),this.logger.log(`已将画质切换为${this.config.qualityDesc}`,o)):this.logger.log("当前画质已经是目标画质了,无需切换画质"):this.logger.log("当前直播不支持目标画质,保持默认画质")}),W()?2500:5e3)}async run(){if(this.logger.log("自动切换画质模块开始运行"),this.config.enabled)try{const e=await this.waitForPlayer();this.switchQuality(e)}catch(e){this.logger.error("自动切换画质模块出错",e)}}}m(Q,"runOnMultiplePages",!0),m(Q,"runAt","window-load"),m(Q,"runAfterDefault",!1);class Y extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.banp2p)}banP2P(){const e=["RTCPeerConnection","mozRTCPeerConnection","webkitRTCPeerConnection"];for(const t of e)Object.prototype.hasOwnProperty.call(v,t)&&Object.defineProperty(v,t,{value:class{constructor(){}addEventListener(){}removeEventListener(){}createDataChannel(){return{close:function(){}}}createOffer(){return Promise.resolve()}setLocalDescription(){return Promise.resolve()}close(){}setRemoteDescription(){return Promise.resolve()}createAnswer(){}},enumerable:!1,writable:!1,configurable:!1})}run(){if(this.logger.log("禁用P2P模块开始运行"),this.config.enabled)try{this.banP2P()}catch(e){this.logger.error("禁用P2P失败",e)}}}m(Y,"runOnMultiplePages",!0),m(Y,"runAt","document-start"),m(Y,"onFrame","all"),m(Y,"runAfterDefault",!1);var Z=["load","loadend","timeout","error","readystatechange","abort"],ee="__origin_xhr";function te(e,t){var o={};for(var i in e)o[i]=e[i];return o.target=o.currentTarget=t,o}var oe=Z[0],ie=Z[1],ne=Z[2],ae=Z[3],se=Z[4],re=Z[5],le="prototype";function ce(e,t){return function(e,t){var o=e.onRequest,i=e.onResponse,n=e.onError;function a(e){var t=e.responseType;if(!t||"text"===t)return e.responseText;var o=e.response;if("json"===t&&!o)try{return JSON.parse(e.responseText)}catch(e){console.warn(e)}return o}function s(e,t){var o=new fe(e),n={response:a(t),status:t.status,statusText:t.statusText,config:e.config,headers:e.resHeader||e.getAllResponseHeaders().split("\r\n").reduce((function(e,t){if(""===t)return e;var o=t.split(":");return e[o.shift()]=function(e){return e.replace(/^\s+|\s+$/g,"")}(o.join(":")),e}),{})};if(!i)return o.resolve(n);i(n,o)}function r(e,t,o,i){var a=new pe(e);o={config:e.config,error:o,type:i},n?n(o,a):a.next(o)}function l(){return!0}function c(e){return function(t,o){return r(t,this,o,e),!0}}function d(e,t){return 4===e.readyState&&0!==e.status?s(e,t):4!==e.readyState&&ue(e,se),!0}var{originXhr:u,unHook:m}=function(e,t){var o=(t=t||window).XMLHttpRequest,i=!0,n=function(){for(var e=new o,t=0;t(e.onRequest&&xe.push(e.onRequest),e.onResponse&&be.push(e.onResponse),_e||((e=>{e.fetch=async(e,t)=>{for(const o of xe){const i=new we;if(await o.apply(v,[{input:e,init:t},i]),i._resolve)return i._resolve;if(i._error)throw i._error;if(!i._next)break;e=i._input,t=i._init}let o=await ve.apply(v,[e,t]);for(const e of be){const t=new ye;if(await e.apply(v,[o,t]),t._resolve)return t._resolve;if(t._error)throw t._error;if(!t._next)break;o=t._response}return o}})(t),_e=!0),{unProxy:()=>{e.onRequest&&xe.splice(xe.findIndex((t=>t===e.onRequest)),1),e.onResponse&&be.splice(be.findIndex((t=>t===e.onResponse)),1)},unHook:()=>{t.fetch=ve,xe=[],be=[]},originFetch:ve}),Te=class e extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.noReport)}static isTargetURL(e){return!(!e.includes("//data.bilibili.com")&&!e.includes("//data.bilivideo.com"))}hookProperties(e){Object.defineProperty(e.navigator,"sendBeacon",{value:()=>!0}),Object.defineProperties(e,{reportObserver:{get:()=>({reportCustomData:function(){}}),set(){}},reportConfig:{get:()=>({}),set(){}}})}async ajaxHook(){const t={onRequest:(t,o)=>{e.isTargetURL(t.url)?o.resolve({config:t,status:200,headers:{"Content-Type":"text/plain; charset=utf-8"},response:"ok"}):o.next(t)}},o={onRequest(t,o){const i="string"==typeof(n=t.input)?n:n instanceof URL?n.toString():n instanceof Request?n.url:"Incorrect input";var n;e.isTargetURL(i)?o.resolve(new Response("ok")):o.next(t)},onResponse(e,t){t.next(e)}};this.hookProperties(v),ce(t,v),ke(o,v)}run(){if(this.logger.log("拦截日志数据上报模块开始运行"),this.config.enabled)try{this.ajaxHook()}catch(e){this.logger.error("拦截日志数据上报失败",e)}}};m(Te,"runOnMultiplePages",!0),m(Te,"runAt","document-start"),m(Te,"onFrame","all"),m(Te,"runAfterDefault",!1);let Ce=Te;class Ve extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.noSleep)}run(){this.logger.log("屏蔽挂机检测模块开始运行"),this.config.enabled&&setInterval((()=>{document.dispatchEvent(new MouseEvent("mousemove"))}),3e5)}}m(Ve,"runOnMultiplePages",!0),m(Ve,"runAt","window-load"),m(Ve,"runAfterDefault",!1);class Se extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.invisibility)}run(){this.logger.log("隐身入场模块开始运行"),this.config.enabled&&ce({onRequest:(e,t)=>{e.url.includes("//api.live.bilibili.com/xlive/web-room/v1/index/getInfoByUser")&&(e.url=e.url.replace("not_mock_enter_effect=0","not_mock_enter_effect=1")),t.next(e)}},v)}}m(Se,"runOnMultiplePages",!0),m(Se,"runAt","document-start"),m(Se,"runAfterDefault",!1),m(Se,"onFrame","all");class Ne extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.showContributionUserNum)}async getContributionUserNum(e,t,o=1,i=100){return O.queryContributionRank(e,t,o,i).then((n=>(this.logger.log(`BAPI.live.queryContributionRank(${e}, ${t}, ${o}, ${i})`,n),0===n.code?n.data.count:(this.logger.error("获取高能用户数量失败",n.message),-1))))}async updateNumber(e,t,i){const n=await this.getContributionUserNum(t,i,1,100);-1!==n?(e.innerText=`高能用户(${n})`,setTimeout((()=>this.updateNumber(e,t,i)),o.random(5e4,7e4))):e.innerText="高能用户"}run(){var e;if(this.logger.log("显示高能用户数量模块开始运行"),this.config.enabled){const t=C(),o=t.BilibiliLive.ANCHOR_UID,i=t.BilibiliLive.ROOMID,n=null==(e=z("#rank-list-ctnr-box .tab-list"))?void 0:e.firstChild;n?this.updateNumber(n,o,i):this.logger.error("未找到高能用户标签")}}}m(Ne,"runOnMultiplePages",!0),m(Ne,"runAt","window-load");class Pe extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removePKBox)}removePKNode(){h("#awesome-pk-vm { display: none !important }")}removePKToast(){const e=["主播即将结束PK","连线断开中"];new MutationObserver((t=>{for(const o of t)o.addedNodes.forEach((t=>{t instanceof HTMLElement&&t.classList.contains("link-toast")&&e.some((e=>{var o;return null==(o=t.textContent)?void 0:o.includes(e)}))&&(t.style.display="none")}))})).observe(document.body,{childList:!0})}async run(){this.logger.log("移除大乱斗元素模块开始运行"),this.config.enabled&&(this.removePKNode(),this.removePKToast())}}m(Pe,"runOnMultiplePages",!0);class Ee extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeLiveWaterMark)}async run(){this.logger.log("移除直播间水印模块开始运行"),this.config.enabled&&h(".web-player-icon-roomStatus { display: none !important }")}}m(Ee,"runOnMultiplePages",!0);class Re extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeShopPopover)}async run(){this.logger.log("移除直播间小黄车弹窗模块开始运行"),this.config.enabled&&h(".shop-popover { display: none !important }")}}m(Re,"runOnMultiplePages",!0);class Me extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeGameParty)}async run(){this.logger.log("移除直播间幻星派对标志模块开始运行"),this.config.enabled&&h("#game-id { display: none !important }")}}m(Me,"runMultiple",!0);class Be extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeGiftPopover)}async run(){this.logger.log("移除礼物赠送提示弹窗模块开始运行"),this.config.enabled&&h(".function-card { display: none !important }")}}m(Be,"runOnMultiplePages",!0);class De extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeMicPopover)}async run(){this.logger.log("移除连麦状态提示模块开始运行"),this.config.enabled&&h(".lin-mic-cntr { display: none !important }")}}m(De,"runOnMultiplePages",!0);class Ie extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeComboCard)}async run(){this.logger.log("移除直播间相同弹幕连续提示模块开始运行"),this.config.enabled&&h("#combo-card { display: none !important }")}}m(Ie,"runOnMultiplePages",!0);class Le extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeRank)}async run(){this.logger.log("移除排行榜模块开始运行"),this.config.enabled&&h(".popular-and-hot-rank { display: none !important }")}}m(Le,"runOnMultiplePages",!0);class Oe extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeGiftPlanet)}async run(){this.logger.log("移除礼物星球模块开始运行"),this.config.enabled&&h(".gift-planet-entry { display: none !important }")}}m(Oe,"runOnMultiplePages",!0);class Ae extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeActivityBanner)}async run(){this.logger.log("移除活动入口模块开始运行"),this.config.enabled&&h(".activity-gather-entry .task-box:nth-child(1) { display: none !important }")}}m(Ae,"runOnMultiplePages",!0);class $e extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removePKBanner)}async run(){this.logger.log("移除大乱斗入口模块开始运行"),this.config.enabled&&h(".activity-gather-entry .task-box:nth-child(2) { display: none !important }")}}m($e,"runOnMultiplePages",!0);class Ue extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeFlipView)}async run(){this.logger.log("移除礼物栏下方广告模块开始运行"),this.config.enabled&&h(".flip-view { display: none !important }")}}m(Ue,"runOnMultiplePages",!0);class je extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeRecommendRoom)}async run(){this.logger.log("移除礼物栏下方推荐直播间模块开始运行"),this.config.enabled&&h(".room-info-ctnr { display: none !important }")}}m(je,"runOnMultiplePages",!0);class He extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeLiveMosaic)}async run(){this.logger.log("移除直播间马赛克模块开始运行"),this.config.enabled&&h("#web-player-module-area-mask-panel { opacity: 0 !important }")}}m(He,"runOnMultiplePages",!0);const Fe=Object.freeze(Object.defineProperty({__proto__:null,DailyTask_LiveTask_DanmuTask:class extends H{constructor(){super(...arguments),m(this,"medalTasksConfig",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks),m(this,"config",this.medalTasksConfig.danmu)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.medalTasks.danmu=e}getRoomidList(){const e=C();return e.filteredFansMedals?e.filteredFansMedals.filter((e=>(!!this.config.includeHighLevelMedals||e.medal.level<20)&&910884!=e.room_info.room_id&&(this.medalTasksConfig.isWhiteList?this.medalTasksConfig.roomidList.includes(e.room_info.room_id):!this.medalTasksConfig.roomidList.includes(e.room_info.room_id)))).map((e=>e.room_info.room_id)).slice(0,199):(this.status="error",null)}async sendDanmu(e,t){try{const o=await O.sendMsg(e,t);this.logger.log(`BAPI.live.sendMsg(${e}, ${t})`,o),0===o.code?this.logger.log(`在直播间 ${t} 发送弹幕 ${e} 成功`):this.logger.error(`在直播间 ${t} 发送弹幕 ${e} 失败`,o.message)}catch(o){this.logger.error(`在直播间 ${t} 发送弹幕 ${e} 出错`,o)}}async run(){if(this.logger.log("发送弹幕模块开始运行"),this.config.enabled)if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的发送弹幕任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过发送弹幕任务了"),this.status="done");else{this.status="running";const e=this.getRoomidList();if(e){const t=this.config.list;for(let o=0;othis.run()),e.ms),this.logger.log("距离发送弹幕模块下次运行时间:",e.str)}},DailyTask_LiveTask_LikeTask:class extends H{constructor(){super(...arguments),m(this,"medalTasksConfig",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks),m(this,"config",this.medalTasksConfig.like)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.medalTasks.like=e}getRoomidUidList(){const e=C();return e.filteredFansMedals?e.filteredFansMedals.filter((e=>e.medal.level<20&&(this.medalTasksConfig.isWhiteList?this.medalTasksConfig.roomidList.includes(e.room_info.room_id):!this.medalTasksConfig.roomidList.includes(e.room_info.room_id)))).map((e=>[e.room_info.room_id,e.medal.target_id])).slice(0,199):(this.status="error",null)}async like(e,t){try{const o=await O.likeReport(e,t);this.logger.log(`BAPI.live.likeReport(${e}, ${t})`,o),0===o.code?this.logger.log(`给主播点赞 房间号 = ${e} 主播UID = ${t} 成功`):this.logger.error(`给主播点赞 房间号 = ${e} 主播UID = ${t} 失败`,o.message)}catch(o){this.logger.error(`给主播点赞 房间号 = ${e} 主播UID = ${t} 出错`,o)}}async run(){if(this.logger.log("给主播点赞模块开始运行"),this.config.enabled)if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的给主播点赞任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过给主播点赞任务了"),this.status="done");else{this.status="running";const e=this.getRoomidUidList();if(e){for(const[t,o]of e)await this.like(t,o),await S(2e3);this.config._lastCompleteTime=I(),this.status="done",this.logger.log("给主播点赞任务已完成")}}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离给主播点赞模块下次运行时间:",e.str)}},DailyTask_LiveTask_SignTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.sign)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.sign=e}async getSignInfo(){try{const e=await O.getSignInfo();return this.logger.log("BAPI.live.getSignInfo response",e),0===e.code?e.data:(this.logger.error("获取直播签到信息失败",e.message),null)}catch(e){return this.logger.error("获取直播签到信息出错",e),null}}async sign(){try{const e=await O.doSign();if(this.logger.log("BAPI.live.doSign response",e),0===e.code){this.logger.log("直播签到成功,获得奖励:",e.data.text),this.config._lastCompleteTime=I(),this.status="done",this.logger.log("直播签到任务已完成");const t=z(".checkin-btn");t&&t.remove()}else this.logger.error("直播签到失败",e.message),this.status="error"}catch(e){this.logger.error("执行直播签到任务出错",e),this.status="error"}}async run(){if(this.logger.log("直播签到模块开始运行"),this.config.enabled)if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的直播签到任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过直播签到任务了"),this.status="done");else{this.status="running";const e=await this.getSignInfo();e?0===e.status?await this.sign():(this.config._lastCompleteTime=I(),this.status="done"):await this.sign()}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离直播签到模块下次运行时间:",e.str)}},DailyTask_LiveTask_WatchTask:J,DailyTask_MainSiteTask_CoinTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.coin),m(this,"MAX_COIN",1)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.coin=e}getDynamicVideoIds(){const e=C();return e.dynamicVideos?e.dynamicVideos.map((e=>{const t=e.modules.module_dynamic.major.archive;return{aid:t.aid,bvid:t.bvid}})):(this.status="error",null)}async getVideoCoinInfo(e,t){try{const o=await $.videoRelation(e,t);return this.logger.log(`BAPI.main.videoRelation(${e}, ${t}) response`,o),0===o.code?o.data.coin:(this.logger.error(`获取视频投币信息失败 aid = ${e} bvid = ${t}`,o.message),0)}catch(o){return this.logger.error(`获取视频投币信息出错 aid = ${e} bvid = ${t}`,o),0}}async coinDynamicVideos(e){const t=this.getDynamicVideoIds();if(t)for(const{aid:o,bvid:i}of t){const t=await this.getVideoCoinInfo(o,i),n=this.MAX_COIN-t;if(n>0){const t=Math.min(n,e),i=await this.coin(o,t);if(0===i){if(0===(e-=t)){this.logger.log("每日投币任务已完成"),this.config._lastCompleteTime=I(),this.status="done";break}}else if(1===i){this.status="error";break}}}}async coin(e,t){try{const o=await $.coinAdd(e,t);return this.logger.log(`BAPI.main.coinAdd(${e}) response`,o),0===o.code?(this.logger.log(`投币成功 视频aid = ${e} 投币数量num = ${t}`),0):-104===o.code?(this.logger.warn("硬币余额不足,每日投币任务终止"),1):(this.logger.error(`投币失败 视频aid = ${e} 投币数量num = ${t}`,o.message),2)}catch(o){return this.logger.error(`投币出错 视频aid = ${e} 投币数量num = ${t}`,o),3}}async run(){if(this.logger.log("每日投币模块开始运行"),this.config.enabled){const e=C();if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的每日投币任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日投币任务了"),this.status="done");else if(this.status="running",e.dailyRewardInfo){const t=e.dailyRewardInfo.coins/10;if(t(C().userInfo.money??5)?(this.logger.log("硬币余额不足,不执行每日投币任务"),this.status="done"):await this.coinDynamicVideos(e)}else this.config._lastCompleteTime=I(),this.status="done",this.logger.log("每日投币任务已完成")}}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日投币模块下次运行时间:",e.str)}},DailyTask_MainSiteTask_LoginTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.login)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.login=e}async login(){return this.logger.log("每日登录任务已完成"),this.config._lastCompleteTime=I(),this.status="done",Promise.resolve()}async run(){if(this.logger.log("每日登录模块开始运行"),this.config.enabled){const e=C();R(this.config._lastCompleteTime)?B(0,0,0,5)?this.logger.log("昨天的每日登录任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日登录任务了"),this.status="done"):(this.status="running",e.dailyRewardInfo&&!e.dailyRewardInfo.login?await this.login():(this.config._lastCompleteTime=I(),this.status="done"))}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日登录模块下次运行时间:",e.str)}},DailyTask_MainSiteTask_ShareTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.share)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.share=e}getAid(){const e=C();return e.dynamicVideos?e.dynamicVideos[0].modules.module_dynamic.major.archive.aid:"2"}async share(e){try{const t=await $.share(e);this.logger.log(`BAPI.main.share(${e}) response`,t),0===t.code||71e3===t.code?(this.logger.log("每日分享视频任务已完成"),this.config._lastCompleteTime=I(),this.status="done"):(this.logger.error("分享视频失败",t.message),this.status="error")}catch(e){this.logger.error("执行每日分享视频任务出错",e),this.status="error"}}async run(){if(this.logger.log("每日分享视频模块开始运行"),this.config.enabled){const e=C();if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的每日分享任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日分享任务了"),this.status="done");else if(this.status="running",e.dailyRewardInfo&&!e.dailyRewardInfo.share){const e=this.getAid();await this.share(e)}else this.config._lastCompleteTime=I(),this.status="done",this.logger.log("每日分享视频任务已完成")}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日分享视频模块下次运行时间:",e.str)}},DailyTask_MainSiteTask_WatchTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.watch)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.watch=e}getAid(){const e=C();return o.isEmpty(e.dynamicVideos)?"2":e.dynamicVideos[0].modules.module_dynamic.major.archive.aid}async watch(e){try{const t=await $.videoHeartbeat(e);this.logger.log(`BAPI.main.videoHeartbeat(${e}) response`,t),0===t.code?(this.logger.log("每日观看视频任务已完成"),this.config._lastCompleteTime=I(),this.status="done"):(this.logger.error("发送观看视频心跳失败",t.message),this.status="error")}catch(e){this.logger.error("执行每日观看视频任务出错",e),this.status="error"}}async run(){if(this.logger.log("每日观看视频模块开始运行"),this.config.enabled){const e=C();if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的每日观看视频任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日观看视频任务了"),this.status="done");else if(this.status="running",e.dailyRewardInfo&&!e.dailyRewardInfo.watch){const e=this.getAid();await this.watch(e)}else this.config._lastCompleteTime=I(),this.status="done",this.logger.log("每日观看视频任务已完成")}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日观看视频模块下次运行时间:",e.str)}},DailyTask_OtherTask_CoinToSilverTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.coinToSilver)}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.coinToSilver=e}async exchange(){try{const e=await O.coin2silver(this.config.num);this.logger.log(`BAPI.live.coin2silver{${this.config.num}} response`,e),0===e.code?(this.logger.log("硬币换银瓜子已完成,获得银瓜子:",e.data.silver),this.config._lastCompleteTime=I(),this.status="done"):(this.logger.error("硬币换银瓜子失败",e.message),this.status="error")}catch(e){this.logger.error("硬币换银瓜子出错",e),this.status="error"}}async run(){this.logger.log("硬币换银瓜子模块开始运行"),this.config.enabled&&(R(this.config._lastCompleteTime)?B(0,0,0,5)?this.logger.log("昨天的硬币换银瓜子任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过硬币换银瓜子任务了"),this.status="done"):(this.status="running",await this.exchange()));const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("硬币换银瓜子模块下次运行时间:",e.str)}},DailyTask_OtherTask_GetYearVipPrivilegeTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.getYearVipPrivilege),m(this,"type2Name",{1:"年度专享B币赠送",2:"年度专享会员购优惠券",3:"年度专享漫画礼包 - 漫画福利券",4:"大会员专享会员购包邮券",5:"年度专享漫画礼包 - 漫画商城优惠券",6:"大会员专享会员体验卡",7:"大会员专享课堂优惠券"})}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.getYearVipPrivilege=e}async myPrivilege(){try{const e=await $.vip.myPrivilege();if(this.logger.log("BAPI.main.vip.myPrivilege response",e),0===e.code)return e.data.list;this.logger.error("获取年度大会员权益信息失败",e.message),this.status="error"}catch(e){this.logger.error("获取年度大会员权益信息出错",e),this.status="error"}}async receivePrivilege(e){try{const t=await $.vip.receivePrivilege(e);this.logger.log(`BAPI.main.vip.receivePrivilege(${e}) response`,t),0===t.code?this.logger.log(`领取年度大会员权益(type = ${e}, ${this.type2Name[e]})成功`):this.logger.error(`领取年度大会员权益(type = ${e}, ${this.type2Name[e]})失败`,t.message)}catch(t){this.logger.error(`领取年度大会员权益(type = ${e}, ${this.type2Name[e]})出错`,t)}}async addExperience(){try{const e=await $.vip.addExperience();this.logger.log("BAPI.main.vip.addExperience response",e),0===e.code?this.logger.log("领取年度大会员权益(type = 9,专属等级加速包(10主站经验))成功"):this.logger.error("领取年度大会员权益(type = 9,专属等级加速包(10主站经验))失败",e.message)}catch(e){this.logger.error("领取年度大会员权益(type = 9,专属等级加速包(10主站经验))出错",e)}}isYearVip(){const e=C().userInfo;return!(!e||1!==e.vip.status||2!==e.vip.type)||(this.logger.log("当前账号不是年度大会员,不领取权益"),!1)}async run(){if(this.logger.log("领取年度大会员权益模块开始运行"),this.config.enabled){if(this.isYearVip()){if(D()>=this.config._nextReceiveTime){this.status="running";const t=await this.myPrivilege();if(t){for(const o of t)if(8!==o.type&&14!==o.type){if(0===o.state)9===o.type?await this.addExperience():await this.receivePrivilege(o.type);else if(1===o.state)this.logger.log(`该权益(type = ${o.type})已经领取过了`);else if(9===o.type){const t=this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.watch;t.enabled?e.watch((()=>t._lastCompleteTime),(()=>this.addExperience()),{once:!0}):this.logger.warn("领取专属等级加速包(10主站经验)前需要观看任意一个视频,请打开【主站任务】中的【每日观看视频】,或是在运行脚本前手动观看")}await S(200)}this.status="done",this.config._nextReceiveTime=Math.min(...t.map((e=>e.period_end_unix)))}}const t=this.config._nextReceiveTime-D();t<86400?(this.logger.log("领取年度大会员权益模块下次运行时间:",n.DateTime.fromSeconds(this.config._nextReceiveTime).toJSDate()),setTimeout((()=>this.run()),1e3*t)):this.logger.log("距离下次领取年度大会员权益的时间超过一天,不计划下次运行")}}else{const e=M(0);setTimeout((()=>this.run()),e.ms),this.logger.log("领取年度大会员权益模块下次运行时间:",e.str)}}},DailyTask_OtherTask_GroupSignTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.groupSign)}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.groupSign=e}async getGroupidOwneruidList(){try{const e=await U.myGroups();if(this.logger.log("BAPI.vc.myGroups response",e),0===e.code)return e.data.list.map((e=>[e.group_id,e.owner_uid]));this.logger.error("获取应援团信息失败",e.message),this.status="error"}catch(e){this.logger.error("获取应援团信息出错",e),this.status="error"}}async sign(e,t){try{const o=await U.signIn(e,t);this.logger.log(`BAPI.vc.signIn(${e}, ${t}) response`,o),0===o.code?this.logger.log(`应援团签到 应援团ID = ${e} 拥有者UID = ${t} 成功, 粉丝勋章亲密度+${o.data.add_num}`):this.logger.error(`应援团签到 应援团ID = ${e} 拥有者UID = ${t} 失败`,o.message)}catch(o){this.logger.error(`应援团签到 应援团ID = ${e} 拥有者UID = ${t} 出错`,o)}}async run(){if(this.logger.log("应援团签到模块开始运行"),this.config.enabled)if(R(this.config._lastCompleteTime,8,5))B(0,0,8,5)?this.logger.log("昨天的应援团签到任务已经完成过了,等到今天早上八点零五分再次执行"):(this.logger.log("今天已经完成过应援团签到任务了"),this.status="done");else{this.status="running";const e=await this.getGroupidOwneruidList();if(e){for(const[t,o]of e)await this.sign(t,o),await S(2e3);this.config._lastCompleteTime=I(),this.logger.log("应援团签到任务已完成"),this.status="done"}}const e=M(8,5);setTimeout((()=>this.run()),e.ms),this.logger.log("距离应援团签到模块下次运行时间:",e.str)}},DailyTask_OtherTask_SilverToCoinTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.silverToCoin)}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.silverToCoin=e}async exchange(){try{const e=await O.silver2coin();this.logger.log("BAPI.live.silver2coin response",e),0===e.code?(this.logger.log("银瓜子换硬币已完成,获得硬币:",e.data.coin),this.config._lastCompleteTime=I(),this.status="done"):403===e.code?(this.logger.log("每天最多只能用银瓜子兑换1个硬币"),this.config._lastCompleteTime=I(),this.status="done"):(this.logger.error("银瓜子换硬币失败",e.message),this.status="error")}catch(e){this.logger.error("银瓜子换硬币出错",e),this.status="error"}}run(){this.logger.log("银瓜子换硬币模块开始运行"),this.config.enabled&&(R(this.config._lastCompleteTime)?B(0,0,0,5)?this.logger.log("昨天的银瓜子换硬币任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过银瓜子换硬币任务了"),this.status="done"):(this.status="running",this.exchange()));const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("银瓜子换硬币模块下次运行时间:",e.str)}},EnhanceExperience_BanP2P:Y,EnhanceExperience_Invisibility:Se,EnhanceExperience_NoReport:Ce,EnhanceExperience_NoSleep:Ve,EnhanceExperience_ShowContributionUserNum:Ne,EnhanceExperience_SwitchLiveStreamQuality:Q,RemoveElement_RemoveActivityBanner:Ae,RemoveElement_RemoveComboCard:Ie,RemoveElement_RemoveFlipView:Ue,RemoveElement_RemoveGameParty:Me,RemoveElement_RemoveGiftPlanet:Oe,RemoveElement_RemoveGiftPopover:Be,RemoveElement_RemoveLiveMosaic:He,RemoveElement_RemoveLiveWaterMark:Ee,RemoveElement_RemoveMicPopover:De,RemoveElement_RemovePKBanner:$e,RemoveElement_RemovePKBox:Pe,RemoveElement_RemoveRank:Le,RemoveElement_RemoveRecommendRoom:je,RemoveElement_RemoveShopPopover:Re},Symbol.toStringTag,{value:"Module"}));function Ge(e){const t={all:o=(o=e)||new Map,on:function(e,t){var i=o.get(e);i?i.push(t):o.set(e,[t])},off:function(e,t){var i=o.get(e);i&&(t?i.splice(i.indexOf(t)>>>0,1):o.set(e,[]))},emit:function(e,t){var i=o.get(e);i&&i.slice().map((function(e){e(t)})),(i=o.get("*"))&&i.slice().map((function(o){o(e,t)}))}};var o;return{...t,once(e,o){t.on(e,(function i(n){t.off(e,i),o(n)}))}}}const qe=t.defineStore("cache",(()=>{const t=e.reactive(y.getCache()),o=e.ref("Main");return e.watch(t,(e=>y.setCache(e))),{cache:t,currentScriptType:o,startMainBLTHAliveHeartBeat:function(){t.lastAliveHeartBeatTime=Date.now();const e=setInterval((()=>t.lastAliveHeartBeatTime=Date.now()),5e3);window.addEventListener("unload",(()=>{clearInterval(e),t.lastAliveHeartBeatTime=0}))},checkCurrentScriptType:function(){0!==t.lastAliveHeartBeatTime&&Date.now()-t.lastAliveHeartBeatTime<8e3?null===sessionStorage.getItem("main_blth_flag")?o.value="Other":o.value="SubMain":(o.value="Main",sessionStorage.setItem("main_blth_flag","🚩"))}}})),ze={DailyTasks:{MainSiteTasks:{login:"",watch:"",coin:"",share:""},LiveTasks:{sign:"",medalTasks:{danmu:"",like:"",watch:""}},OtherTasks:{groupSign:"",silverToCoin:"",coinToSilver:"",getYearVipPrivilege:""}}},Ke=[],We=t.defineStore("module",(()=>{const t=e.reactive(y.getModuleConfig()),i=Ge(),n=e.reactive(ze);return e.watch(t,o.debounce((e=>y.setModuleConfig(e)),250,{leading:!0,trailing:!0})),function e(){setTimeout((()=>{P(n,((e,t)=>{o.set(n,t,"")})),e()}),M(0,0).ms)}(),{moduleConfig:t,emitter:i,moduleStatus:n,loadModules:function(e){const t=qe(),o=new j("ModuleStore_LoadModules");if("unknown"===e)for(const[e,o]of Object.entries(Fe))("all"===o.onFrame||"top"===o.onFrame&&W())&&(o.runOnMultiplePages||"Other"!==t.currentScriptType)&&(o.runAfterDefault||(E(o.runAt).then((()=>new o(e).run())),Ke.push(e)));else{const e=function(){const e=qe(),t=[];for(const[o,i]of Object.entries(q))(i.runOnMultiplePages||"Other"!==e.currentScriptType)&&t.push(new i(o).run());return Promise.all(t)}();for(const[i,n]of Object.entries(Fe))("target"===n.onFrame||"top"===n.onFrame&&W()&&!Ke.includes(i)||"all"===n.onFrame&&!Ke.includes(i))&&(n.runOnMultiplePages||"Other"!==t.currentScriptType)&&E(n.runAt).then((async()=>{try{n.runAfterDefault&&await e,new n(i).run()}catch(e){o.error(`运行默认模块时出错,模块 ${i} 不运行:`,e)}}))}}}})),Xe=e.defineComponent({__name:"MainSiteTasks",setup(t){const o=We(),i=o.moduleConfig.DailyTasks.MainSiteTasks,n=o.moduleStatus.DailyTasks.MainSiteTasks;return(t,o)=>{const a=e.resolveComponent("el-switch"),s=e.resolveComponent("Info"),r=e.resolveComponent("TaskStatus"),l=e.resolveComponent("el-space"),c=e.resolveComponent("el-row"),d=e.resolveComponent("el-option"),u=e.resolveComponent("el-select"),m=e.resolveComponent("el-text"),h=e.resolveComponent("el-divider"),g=e.resolveComponent("el-link");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).login.enabled,"onUpdate:modelValue":o[0]||(o[0]=t=>e.unref(i).login.enabled=t),"active-text":"每日登录"},null,8,["modelValue"]),e.createVNode(s,{id:"DailyTasks.MainSiteTasks.login"}),e.createVNode(r,{status:e.unref(n).login},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).watch.enabled,"onUpdate:modelValue":o[1]||(o[1]=t=>e.unref(i).watch.enabled=t),"active-text":"每日观看视频"},null,8,["modelValue"]),e.createVNode(s,{id:"DailyTasks.MainSiteTasks.watch"}),e.createVNode(r,{status:e.unref(n).watch},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).coin.enabled,"onUpdate:modelValue":o[2]||(o[2]=t=>e.unref(i).coin.enabled=t),"active-text":"每日投币"},null,8,["modelValue"]),e.createVNode(u,{modelValue:e.unref(i).coin.num,"onUpdate:modelValue":o[3]||(o[3]=t=>e.unref(i).coin.num=t),placeholder:"Select",style:{width:"64px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,(t=>e.createVNode(d,{key:t,label:t,value:t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("个")])),_:1}),e.createVNode(s,{id:"DailyTasks.MainSiteTasks.coin"}),e.createVNode(r,{status:e.unref(n).coin},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).share.enabled,"onUpdate:modelValue":o[4]||(o[4]=t=>e.unref(i).share.enabled=t),"active-text":"每日分享视频"},null,8,["modelValue"]),e.createVNode(s,{id:"DailyTasks.MainSiteTasks.share"}),e.createVNode(r,{status:e.unref(n).share},null,8,["status"])])),_:1})])),_:1}),e.createVNode(h),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(m,null,{default:e.withCtx((()=>[e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("  主站每日任务的完成情况可在")])),_:1}),e.createVNode(g,{rel:"noreferrer",type:"primary",href:"https://account.bilibili.com/account/home",target:"_blank",style:{"vertical-align":"unset"}},{default:e.withCtx((()=>[e.createTextVNode("个人中心")])),_:1}),e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("查看。")])),_:1}),e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("数据更新可能有一定的延时。")])),_:1})])),_:1})])),_:1})])}}}),Je=(t=>(e.pushScopeId("data-v-d7c74163"),t=t(),e.popScopeId(),t))((()=>e.createElementVNode("br",null,null,-1))),Qe={class:"avatar-wrap"},Ye=b(e.defineComponent({__name:"LiveTasks",setup(t){const o=We(),n=C(),a=o.moduleConfig.DailyTasks.LiveTasks,r=o.moduleStatus.DailyTasks.LiveTasks,l=e.ref(!1),c=e.computed((()=>a.medalTasks.danmu.list.map((e=>({content:e}))))),d=()=>{s.ElMessageBox.prompt("请输入新增的弹幕内容","新增弹幕",{confirmButtonText:"确认",cancelButtonText:"取消",inputPattern:/^.{1,30}$/,inputErrorMessage:"弹幕内容不得为空且长度不能超过30",lockScroll:!1}).then((({value:e})=>{a.medalTasks.danmu.list.push(e)})).catch((()=>{}))},u=e.ref(!1),m=e.computed((()=>{var e;return null==(e=n.filteredFansMedals)?void 0:e.map((e=>({avatar:e.anchor_info.avatar,nick_name:e.anchor_info.nick_name,medal_name:e.medal.medal_name,medal_level:e.medal.level,roomid:e.room_info.room_id})))})),h=e.ref(!1);let g=!0;const f=async()=>{u.value=!0,g&&(g=!1,await e.nextTick(),n.fansMedals?v(m.value):(h.value=!0,e.watch(m,(e=>{v(e),h.value=!1}),{once:!0}),o.emitter.emit("Default_FansMedals",{module:"LiveTasks"})))},p=e.ref(),v=e=>{e&&a.medalTasks.roomidList.forEach((t=>{var o;return null==(o=p.value)?void 0:o.toggleRowSelection(e.find((e=>e.roomid===t)),!0)}))};function w(e){a.medalTasks.roomidList=e.map((e=>e.roomid))}function y(e,t,o){var i;o.target.className.startsWith("el-link")||null==(i=p.value)||i.toggleRowSelection(e,void 0)}return(t,o)=>{const n=e.resolveComponent("el-switch"),g=e.resolveComponent("Info"),v=e.resolveComponent("TaskStatus"),_=e.resolveComponent("el-space"),x=e.resolveComponent("el-row"),b=e.resolveComponent("el-divider"),k=e.resolveComponent("el-button"),T=e.resolveComponent("SemiSelect"),C=e.resolveComponent("el-icon"),V=e.resolveComponent("el-option"),S=e.resolveComponent("el-select"),N=e.resolveComponent("el-text"),P=e.resolveComponent("el-link"),E=e.resolveComponent("el-table-column"),R=e.resolveComponent("el-dialog"),M=e.resolveComponent("el-image"),B=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(_,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).sign.enabled,"onUpdate:modelValue":o[0]||(o[0]=t=>e.unref(a).sign.enabled=t),"active-text":"直播签到"},null,8,["modelValue"]),e.createVNode(g,{id:"DailyTasks.LiveTasks.sign"}),e.createVNode(v,{status:e.unref(r).sign},null,8,["status"])])),_:1})])),_:1}),e.createVNode(b),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(_,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.like.enabled,"onUpdate:modelValue":o[1]||(o[1]=t=>e.unref(a).medalTasks.like.enabled=t),"active-text":"给主播点赞"},null,8,["modelValue"]),e.createVNode(g,{id:"DailyTasks.LiveTasks.medalTasks.like"}),e.createVNode(v,{status:e.unref(r).medalTasks.like},null,8,["status"])])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(_,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.danmu.enabled,"onUpdate:modelValue":o[2]||(o[2]=t=>e.unref(a).medalTasks.danmu.enabled=t),"active-text":"发送弹幕"},null,8,["modelValue"]),e.createVNode(k,{type:"primary",size:"small",icon:e.unref(i.Edit),onClick:o[3]||(o[3]=e=>l.value=!l.value)},{default:e.withCtx((()=>[e.createTextVNode("编辑弹幕")])),_:1},8,["icon"]),e.createVNode(g,{id:"DailyTasks.LiveTasks.medalTasks.danmu"}),e.createVNode(v,{status:e.unref(r).medalTasks.danmu},null,8,["status"])])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(_,{wrap:""},{default:e.withCtx((()=>[e.createVNode(C,null,{default:e.withCtx((()=>[e.createVNode(T)])),_:1}),e.createVNode(n,{modelValue:e.unref(a).medalTasks.danmu.includeHighLevelMedals,"onUpdate:modelValue":o[4]||(o[4]=t=>e.unref(a).medalTasks.danmu.includeHighLevelMedals=t),"active-text":"包含等级≥20的粉丝勋章"},null,8,["modelValue"])])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(_,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.watch.enabled,"onUpdate:modelValue":o[5]||(o[5]=t=>e.unref(a).medalTasks.watch.enabled=t),"active-text":"观看直播"},null,8,["modelValue"]),e.createVNode(S,{modelValue:e.unref(a).medalTasks.watch.time,"onUpdate:modelValue":o[6]||(o[6]=t=>e.unref(a).medalTasks.watch.time=t),placeholder:"Select",style:{width:"70px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(24,(t=>e.createVNode(V,{key:t,label:5*t,value:5*t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(N,null,{default:e.withCtx((()=>[e.createTextVNode("分钟")])),_:1}),e.createVNode(g,{id:"DailyTasks.LiveTasks.medalTasks.watch"}),e.createVNode(v,{status:e.unref(r).medalTasks.watch},null,8,["status"])])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(_,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.isWhiteList,"onUpdate:modelValue":o[7]||(o[7]=t=>e.unref(a).medalTasks.isWhiteList=t),"active-text":"白名单","inactive-text":"黑名单"},null,8,["modelValue"]),e.createVNode(k,{type:"primary",size:"small",icon:e.unref(i.Edit),onClick:f},{default:e.withCtx((()=>[e.createTextVNode("编辑名单")])),_:1},8,["icon"]),e.createVNode(g,{id:"DailyTasks.LiveTasks.medalTasks.list"})])),_:1})])),_:1}),e.createVNode(b),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(N,null,{default:e.withCtx((()=>[e.createTextVNode("直播任务相关信息可在")])),_:1}),e.createVNode(P,{rel:"noreferrer",type:"primary",href:"https://link.bilibili.com/p/help/index#/audience-fans-medal",target:"_blank"},{default:e.withCtx((()=>[e.createTextVNode("帮助中心")])),_:1}),e.createVNode(N,null,{default:e.withCtx((()=>[e.createTextVNode("查看。")])),_:1})])),_:1}),Je,e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(N,{tag:"b"},{default:e.withCtx((()=>[e.createTextVNode("注意:")])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(N,null,{default:e.withCtx((()=>[e.createTextVNode("  由于每天能通过完成任务获得亲密度的粉丝勋章数量有限,脚本默认仅为最多199个等级小于20的粉丝勋章完成给主播点赞,发送弹幕,观看直播任务。在脚本执行任务期间观看未执行任务的粉丝勋章对应直播间直播可能导致今天无法获取任何亲密度。")])),_:1})])),_:1}),e.createVNode(R,{modelValue:l.value,"onUpdate:modelValue":o[8]||(o[8]=e=>l.value=e),title:"编辑弹幕内容","lock-scroll":!1,width:"40%"},{footer:e.withCtx((()=>[e.createVNode(k,{type:"primary",onClick:d},{default:e.withCtx((()=>[e.createTextVNode("新增弹幕")])),_:1})])),default:e.withCtx((()=>[e.createVNode(e.unref(s.ElTable),{data:c.value,"max-height":"500"},{default:e.withCtx((()=>[e.createVNode(E,{type:"index",width:"50"}),e.createVNode(E,{prop:"content",label:"弹幕内容"}),e.createVNode(E,{label:"操作",width:"220",align:"center"},{default:e.withCtx((t=>[e.createVNode(k,{text:"",icon:e.unref(i.Edit),onClick:e=>{return o=t.$index,i=t.row,void s.ElMessageBox.prompt("请输入新的弹幕内容","修改弹幕",{confirmButtonText:"确认",cancelButtonText:"取消",inputPattern:/^.{1,30}$/,inputErrorMessage:"弹幕内容不得为空且长度不能超过30",inputValue:i.content,lockScroll:!1}).then((({value:e})=>{a.medalTasks.danmu.list[o]=e})).catch((()=>{}));var o,i}},{default:e.withCtx((()=>[e.createTextVNode(" 修改 ")])),_:2},1032,["icon","onClick"]),e.createVNode(k,{text:"",icon:e.unref(i.Delete),type:"danger",onClick:e=>{return o=t.$index,void(1!==a.medalTasks.danmu.list.length?a.medalTasks.danmu.list.splice(o,1):s.ElMessage.warning({message:"至少要有一条弹幕",appendTo:".el-dialog"}));var o}},{default:e.withCtx((()=>[e.createTextVNode(" 删除 ")])),_:2},1032,["icon","onClick"])])),_:1})])),_:1},8,["data"])])),_:1},8,["modelValue"]),e.createVNode(R,{modelValue:u.value,"onUpdate:modelValue":o[9]||(o[9]=e=>u.value=e),title:"编辑粉丝勋章名单","lock-scroll":!1,width:"40%"},{default:e.withCtx((()=>[e.withDirectives((e.openBlock(),e.createBlock(e.unref(s.ElTable),{ref_key:"medalInfoTableRef",ref:p,data:m.value,"max-height":"500","empty-text":"没有粉丝勋章",onSelectionChange:w,onRowClick:y},{default:e.withCtx((()=>[e.createVNode(E,{type:"selection",align:"center",width:"55"}),e.createVNode(E,{prop:"avatar",label:"头像",width:"100"},{default:e.withCtx((t=>[e.createElementVNode("div",Qe,[e.createVNode(M,{src:t.row.avatar,loading:"lazy",referrerpolicy:"origin",class:"avatar"},{error:e.withCtx((()=>[e.createVNode(M,{src:"//i0.hdslb.com/bfs/face/member/noface.jpg",referrerpolicy:"origin",class:"avatar"})])),_:2},1032,["src"])])])),_:1}),e.createVNode(E,{prop:"nick_name",label:"昵称"}),e.createVNode(E,{prop:"medal_name",label:"粉丝勋章"}),e.createVNode(E,{prop:"medal_level",label:"等级",width:"80",sortable:""}),e.createVNode(E,{prop:"roomid",label:"房间号"},{default:e.withCtx((t=>[e.createVNode(P,{href:"https://live.bilibili.com/"+t.row.roomid+"?visit_id=",rel:"noreferrer",type:"primary",target:"_blank"},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.row.roomid),1)])),_:2},1032,["href"])])),_:1})])),_:1},8,["data"])),[[B,h.value]])])),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-d7c74163"]]),Ze=e.defineComponent({__name:"OtherTasks",setup(t){const o=We(),i=o.moduleConfig.DailyTasks.OtherTasks,n=o.moduleStatus.DailyTasks.OtherTasks;return(t,o)=>{const a=e.resolveComponent("el-switch"),s=e.resolveComponent("Info"),r=e.resolveComponent("TaskStatus"),l=e.resolveComponent("el-space"),c=e.resolveComponent("el-row"),d=e.resolveComponent("el-text"),u=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),h=e.resolveComponent("el-divider");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).groupSign.enabled,"onUpdate:modelValue":o[0]||(o[0]=t=>e.unref(i).groupSign.enabled=t),"active-text":"应援团签到"},null,8,["modelValue"]),e.createVNode(s,{id:"DailyTasks.OtherTasks.groupSign"}),e.createVNode(r,{status:e.unref(n).groupSign},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).silverToCoin.enabled,"onUpdate:modelValue":o[1]||(o[1]=t=>e.unref(i).silverToCoin.enabled=t),"active-text":"银瓜子换硬币"},null,8,["modelValue"]),e.createVNode(s,{id:"DailyTasks.OtherTasks.silverToCoin"}),e.createVNode(r,{status:e.unref(n).silverToCoin},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).coinToSilver.enabled,"onUpdate:modelValue":o[2]||(o[2]=t=>e.unref(i).coinToSilver.enabled=t),"active-text":"硬币换银瓜子"},null,8,["modelValue"]),e.createVNode(d,null,{default:e.withCtx((()=>[e.createTextVNode("花费硬币")])),_:1}),e.createVNode(m,{modelValue:e.unref(i).coinToSilver.num,"onUpdate:modelValue":o[3]||(o[3]=t=>e.unref(i).coinToSilver.num=t),placeholder:"Select",style:{width:"64px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(50,(t=>e.createVNode(u,{key:t,label:t,value:t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(d,null,{default:e.withCtx((()=>[e.createTextVNode("个")])),_:1}),e.createVNode(s,{id:"DailyTasks.OtherTasks.coinToSilver"}),e.createVNode(r,{status:e.unref(n).coinToSilver},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).getYearVipPrivilege.enabled,"onUpdate:modelValue":o[4]||(o[4]=t=>e.unref(i).getYearVipPrivilege.enabled=t),"active-text":"领取年度大会员权益"},null,8,["modelValue"]),e.createVNode(s,{id:"DailyTasks.OtherTasks.getYearVipPrivilege"}),e.createVNode(r,{status:e.unref(n).getYearVipPrivilege},null,8,["status"])])),_:1})])),_:1}),e.createVNode(h)])}}}),et=e.defineComponent({__name:"EnhanceExperience",setup(t){const o=We().moduleConfig.EnhanceExperience,i=["原画","蓝光PRO","蓝光","超清PRO","超清","高清"];return(t,n)=>{const a=e.resolveComponent("el-switch"),s=e.resolveComponent("el-option"),r=e.resolveComponent("el-select"),l=e.resolveComponent("Info"),c=e.resolveComponent("el-space"),d=e.resolveComponent("el-row"),u=e.resolveComponent("el-divider");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).switchLiveStreamQuality.enabled,"onUpdate:modelValue":n[0]||(n[0]=t=>e.unref(o).switchLiveStreamQuality.enabled=t),"active-text":"自动切换画质"},null,8,["modelValue"]),e.createVNode(r,{modelValue:e.unref(o).switchLiveStreamQuality.qualityDesc,"onUpdate:modelValue":n[1]||(n[1]=t=>e.unref(o).switchLiveStreamQuality.qualityDesc=t),placeholder:"Select",style:{width:"110px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,(t=>e.createVNode(s,{key:t,label:t,value:t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(l,{id:"EnhanceExperience.switchLiveStreamQuality"})])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).banp2p.enabled,"onUpdate:modelValue":n[2]||(n[2]=t=>e.unref(o).banp2p.enabled=t),"active-text":"禁用P2P"},null,8,["modelValue"]),e.createVNode(l,{id:"EnhanceExperience.banp2p"})])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).noReport.enabled,"onUpdate:modelValue":n[3]||(n[3]=t=>e.unref(o).noReport.enabled=t),"active-text":"拦截日志数据上报"},null,8,["modelValue"]),e.createVNode(l,{id:"EnhanceExperience.noReport"})])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).noSleep.enabled,"onUpdate:modelValue":n[4]||(n[4]=t=>e.unref(o).noSleep.enabled=t),"active-text":"屏蔽挂机检测"},null,8,["modelValue"]),e.createVNode(l,{id:"EnhanceExperience.noSleep"})])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).invisibility.enabled,"onUpdate:modelValue":n[5]||(n[5]=t=>e.unref(o).invisibility.enabled=t),"active-text":"隐身入场"},null,8,["modelValue"]),e.createVNode(l,{id:"EnhanceExperience.invisibility"})])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).showContributionUserNum.enabled,"onUpdate:modelValue":n[6]||(n[6]=t=>e.unref(o).showContributionUserNum.enabled=t),"active-text":"显示高能用户数量"},null,8,["modelValue"]),e.createVNode(l,{id:"EnhanceExperience.showContributionUserNum"})])),_:1})])),_:1}),e.createVNode(u)])}}}),tt=e.defineComponent({__name:"RemoveElement",setup(t){const o=We().moduleConfig.RemoveElement;return(t,i)=>{const n=e.resolveComponent("el-switch"),a=e.resolveComponent("Info"),s=e.resolveComponent("el-space"),r=e.resolveComponent("el-row"),l=e.resolveComponent("el-divider");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removePKBox.enabled,"onUpdate:modelValue":i[0]||(i[0]=t=>e.unref(o).removePKBox.enabled=t),"active-text":"移除大乱斗元素"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removePKBox"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeLiveWaterMark.enabled,"onUpdate:modelValue":i[1]||(i[1]=t=>e.unref(o).removeLiveWaterMark.enabled=t),"active-text":"移除直播间水印"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeLiveWaterMark"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeShopPopover.enabled,"onUpdate:modelValue":i[2]||(i[2]=t=>e.unref(o).removeShopPopover.enabled=t),"active-text":"移除直播间小黄车弹窗"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeShopPopover"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeGameParty.enabled,"onUpdate:modelValue":i[3]||(i[3]=t=>e.unref(o).removeGameParty.enabled=t),"active-text":"移除直播间幻星派对标志"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeGameParty"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeGiftPopover.enabled,"onUpdate:modelValue":i[4]||(i[4]=t=>e.unref(o).removeGiftPopover.enabled=t),"active-text":"移除礼物赠送提示弹窗"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeGiftPopover"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeMicPopover.enabled,"onUpdate:modelValue":i[5]||(i[5]=t=>e.unref(o).removeMicPopover.enabled=t),"active-text":"移除连麦状态提示"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeMicPopover"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeComboCard.enabled,"onUpdate:modelValue":i[6]||(i[6]=t=>e.unref(o).removeComboCard.enabled=t),"active-text":"移除直播间相同弹幕连续提示"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeComboCard"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeRank.enabled,"onUpdate:modelValue":i[7]||(i[7]=t=>e.unref(o).removeRank.enabled=t),"active-text":"移除排行榜"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeRank"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeGiftPlanet.enabled,"onUpdate:modelValue":i[8]||(i[8]=t=>e.unref(o).removeGiftPlanet.enabled=t),"active-text":"移除礼物星球"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeGiftPlanet"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeActivityBanner.enabled,"onUpdate:modelValue":i[9]||(i[9]=t=>e.unref(o).removeActivityBanner.enabled=t),"active-text":"移除活动入口"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeActivityBanner"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removePKBanner.enabled,"onUpdate:modelValue":i[10]||(i[10]=t=>e.unref(o).removePKBanner.enabled=t),"active-text":"移除大乱斗入口"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removePKBanner"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeFlipView.enabled,"onUpdate:modelValue":i[11]||(i[11]=t=>e.unref(o).removeFlipView.enabled=t),"active-text":"移除礼物栏下方广告"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeFlipView"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeRecommendRoom.enabled,"onUpdate:modelValue":i[12]||(i[12]=t=>e.unref(o).removeRecommendRoom.enabled=t),"active-text":"移除礼物栏下方推荐直播间"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeRecommendRoom"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeLiveMosaic.enabled,"onUpdate:modelValue":i[13]||(i[13]=t=>e.unref(o).removeLiveMosaic.enabled=t),"active-text":"移除直播间马赛克"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeLiveMosaic"})])),_:1})])),_:1}),e.createVNode(l)])}}}),ot=e.defineComponent({components:{MainSiteTasks:Xe,LiveTasks:Ye,OtherTasks:Ze,EnhanceExperience:et,RemoveElement:tt}}),it=e.defineComponent({...ot,__name:"PanelMain",setup(t){const o=_();return(t,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).uiConfig.activeMenuIndex)))}}),nt=b(e.defineComponent({__name:"App",setup(t){const i=_(),n=new j("App.vue");let a,s,l=i.uiConfig.isShowPanel;function c(){const e=a.getBoundingClientRect();i.baseStyleValue.top=e.top+window.scrollY,i.baseStyleValue.left=e.left+window.scrollX,i.baseStyleValue.height=e.height,i.baseStyleValue.width=.4*e.width}i.uiConfig.isShowPanel=!1;const d=o.throttle((function(){i.changeShowPanel(),s.innerText=i.isShowPanelButtonText}),300);if(a=z("#live-player-ctnr"),a){c(),function(e,t,o=5e3){return new Promise(((i,n)=>{const a=e.querySelector(t);if(a)return void i(a);const s=new MutationObserver((()=>{const o=e.querySelector(t);o&&(clearTimeout(r),s.disconnect(),i(o))}));s.observe(e,{childList:!0,subtree:!0});const r=setTimeout((()=>{s.disconnect(),n(new Error(`无法在${o}毫秒内找到${e.localName}的子节点${t}`))}),o)}))}(z("#player-ctnr"),".left-ctnr.left-header-area",1e4).then((e=>{var t,o;s=K("button"),s.setAttribute("class","blth_btn"),s.onclick=d,s.innerText=i.isShowPanelButtonText,e.append(s),W()||r("alt+b",{element:null==(o=null==(t=v.top)?void 0:t.document)?void 0:o.documentElement},d),r("alt+b",d)})).catch((e=>n.error(e))),window.addEventListener("resize",(()=>c()));const e=new MutationObserver((()=>c()));e.observe(document.documentElement,{attributes:!0}),e.observe(document.body,{attributes:!0}),l&&(i.uiConfig.isShowPanel=!0)}else n.error("livePlayer not found");return(t,o)=>{const n=e.resolveComponent("el-header"),a=e.resolveComponent("el-aside"),s=e.resolveComponent("el-main"),r=e.resolveComponent("el-container"),l=e.resolveComponent("el-scrollbar"),c=e.resolveComponent("el-collapse-transition");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx((()=>[e.withDirectives(e.createVNode(r,{style:e.normalizeStyle(e.unref(i).baseStyle),class:"base"},{default:e.withCtx((()=>[e.createVNode(n,{class:"header"},{default:e.withCtx((()=>[e.createVNode(k)])),_:1}),e.createVNode(l,{height:e.unref(i).scrollBarHeight},{default:e.withCtx((()=>[e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(a,{class:"aside"},{default:e.withCtx((()=>[e.createVNode(T)])),_:1}),e.createVNode(s,{class:"main"},{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx((()=>[e.createVNode(it)])),_:1})],1024))])),_:1})])),_:1})])),_:1},8,["height"])])),_:1},8,["style"]),[[e.vShow,e.unref(i).uiConfig.isShowPanel]])])),_:1})}}}),[["__scopeId","data-v-3884f5fc"]]);(e=>{const t=GM_getResourceText(e);GM_addStyle(t)})("element-plus/dist/index.css");const at={},st={xmlns:"http://www.w3.org/2000/svg",width:"128",height:"128",class:"icon",viewBox:"0 0 1024 1024"},rt=[e.createElementVNode("path",{d:"M831.825 63.94H191.94c-70.692 0-128 57.308-128 128v639.885c0 70.692 57.308 128 128 128h639.885c70.692 0 128-57.308 128-128V191.94c0-70.692-57.308-128-128-128zM895.885 832a63.835 63.835 0 0 1-63.973 63.886H192.088c-17.112 0-33.27-6.575-45.372-18.676S127.88 849.112 127.88 832V192a64.236 64.236 0 0 1 64.208-64.12h639.824A64.038 64.038 0 0 1 895.885 192v640z"},null,-1),e.createElementVNode("path",{d:"M791.998 351.852H536a31.97 31.97 0 0 0 0 63.94h256a31.97 31.97 0 0 0 0-63.94zm0 256.121H536a31.97 31.97 0 0 0 0 63.94h256a31.97 31.97 0 0 0 0-63.94zm-447.996-79.975c-61.856 0-111.986 50.144-111.986 111.985S282.16 751.97 344.002 751.97s111.985-50.144 111.985-111.986-50.13-111.985-111.985-111.985zm33.982 145.982a48.045 48.045 0 1 1 14.088-33.982 47.746 47.746 0 0 1-14.088 33.986zm39.412-376.586L311.999 402.787l-41.391-41.395a31.97 31.97 0 1 0-45.213 45.213l63.997 64.002a31.97 31.97 0 0 0 45.214 0l128-128a31.97 31.97 0 0 0-45.21-45.213z"},null,-1)];const lt=b(at,[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",st,rt)}]]),ct={DailyTasks:{MainSiteTasks:{login:{title:"每日登录",message:"完成主站的每日登录任务。"},watch:{title:"每日观看视频",message:e.h("p",[e.h("div","完成主站的每日观看视频任务。"),e.h("div","从动态中选取视频观看,会产生观看历史记录。")])},coin:{title:"每日投币",message:e.h("p",[e.h("div","完成主站的每日投币任务。"),e.h("div","从动态中选取视频投币,会根据你今天已经投过的币的数量计算还要投几个币。")])},share:{title:"每日分享视频",message:e.h("p",[e.h("div","完成主站的每日分享视频任务。"),e.h("div","不会真的分享到某处。")])}},LiveTasks:{sign:{title:"直播签到",message:e.h("p",[e.h("div","完成直播签到任务。"),e.h("div","完成后会移除当前直播间右上角签到窗口中的签到按钮。")])},medalTasks:{list:{title:"黑白名单",message:e.h("p",[e.h("div","为更精细地控制为哪些粉丝勋章执行任务,你可以使用黑名单或白名单模式。"),e.h("div",[e.h("li",[e.h("span","黑名单:仅为"),e.h("strong","不在"),e.h("span","名单中的粉丝勋章执行任务。")]),e.h("li",[e.h("span","白名单:仅为"),e.h("strong","在"),e.h("span","名单中的粉丝勋章执行任务。")])]),e.h("div","点击编辑名单按钮,然后使用第一列的多选框即可编辑名单中的粉丝勋章。")])},like:{title:"给主播点赞",message:e.h("p",[e.h("div","在你的每个粉丝勋章对应的直播间给主播点赞。"),e.h("div","部分直播间无法完成该任务,原因未知。")])},danmu:{title:"发送弹幕",message:e.h("p",[e.h("div","在你的每个粉丝勋章对应的直播间发送一条弹幕。"),e.h("div",[e.h("span","点击编辑弹幕按钮编辑发送的弹幕,脚本会从中按顺序循环抽取弹幕发送。"),e.h("span","如果有点亮高等级勋章的需求,请勾选“包含等级≥20的粉丝勋章”选项。"),e.h("span","部分直播间无法完成该任务,可能的原因有:"),e.h("li","你被禁言了"),e.h("li","发言有粉丝勋章等级要求"),e.h("li",[e.h("span","特殊直播间(比如"),e.h("a",{href:"https://live.bilibili.com/54",rel:"noreferrer",target:"_blank"},"54"),e.h("span",")")])])])},watch:{title:"观看直播",message:e.h("p",[e.h("div","完成观看持有粉丝勋章对应主播直播的任务。"),e.h("div","部分直播间因为没有设置直播分区导致任务无法完成。主播当前是否开播不会影响该任务的完成。")])}}},OtherTasks:{groupSign:{title:"应援团签到",message:"完成应援团签到任务。"},silverToCoin:{title:"银瓜子换硬币",message:e.h("p",[e.h("div","把银瓜子兑换为硬币。"),e.h("div","具体兑换规则请点击直播间页面的“立即充值→银瓜子商店”查看。")])},coinToSilver:{title:"硬币换银瓜子",message:e.h("p",[e.h("div","把硬币兑换为银瓜子。"),e.h("div","具体兑换规则请点击直播间页面的“立即充值→银瓜子商店”查看。")])},getYearVipPrivilege:{title:"领取年度大会员权益",message:e.h("p",[e.h("div","自动领取年度大会员权益。"),e.h("div",[e.h("span","具体权益请前往"),e.h("a",{href:"https://account.bilibili.com/account/big/myPackage",rel:"noreferrer",target:"_blank"},"卡券包"),e.h("span","查看。")])])}}},EnhanceExperience:{switchLiveStreamQuality:{title:"自动切换画质",message:e.h("p",[e.h("div","打开直播间后自动把播放器切换到指定画质。"),e.h("div","如果指定画质不存在,则还是使用B站的默认画质。")])},banp2p:{title:"禁用P2P",message:e.h("p",[e.h("div","禁用直播流的P2P上传/下载"),e.h("div","B站使用WebRTC技术把许多浏览器点对点(P2P)地连接起来,实现视频流和音频流的传输。这样做是为了减轻B站服务器的压力,但是会占用你一定的上行带宽(大约几百kb每秒)。如果你不想被占用上行带宽,可以开启该功能。若开启后发现观看直播时有明显卡顿,请关闭。")])},noReport:{title:"拦截日志数据上报",message:e.h("p",[e.h("div","禁止B站上报日志数据。"),e.h("div",[e.h("span","B站会实时地上报大量日志信息,比如直播观看情况、代码报错等等。开启本功能后绝大多数日志上报都会被拦截并返回一个成功的响应。如果追求更好的效果和性能表现建议使用带有广告拦截功能的浏览器拓展,比如"),e.h("a",{href:"https://github.com/gorhill/uBlock",rel:"noreferrer",target:"_blank"},"uBlock Origin"),e.h("span","。")])])},noSleep:{title:"屏蔽挂机检测",message:e.h("p",[e.h("div","屏蔽B站直播间的挂机检测。"),e.h("div","如果长时间没有操作,会提示“检测到您已离开当前屏幕,倒计时后即将暂停播放”。开启本功能后即可避免这种情况。")])},invisibility:{title:"隐身入场",message:e.h("p",[e.h("div","进入直播间时其他人不会收到提示,但还是会出现在高能用户榜单上。")])},showContributionUserNum:{title:"显示高能用户数量",message:e.h("p",[e.h("div","在高能用户标签上显示当前直播间的高能用户数量,每分钟更新一次数据。")])}},RemoveElement:{removePKBox:{title:"移除大乱斗元素",message:"移除直播间的大乱斗元素(进度条,弹出的提示等)。"},removeLiveWaterMark:{title:"移除直播间水印",message:"移除直播画面左上角的水印。"},removeShopPopover:{title:"移除直播间小黄车弹窗",message:"移除直播间左上角的小黄车弹窗。"},removeGameParty:{title:"移除直播间幻星派对标志",message:"移除直播间右下角的幻星派对标志。"},removeGiftPopover:{title:"移除礼物赠送提示弹窗",message:"移除直播间右下角的礼物赠送提示弹窗(赠送一个牛蛙牛蛙支持主播)。"},removeMicPopover:{title:"移除连麦状态提示",message:"移除直播间左上角的连麦提示弹窗(连线功能只能在手机端使用,快使用手机登录吧~)。"},removeComboCard:{title:"移除直播间相同弹幕连续提示",message:"移除直播间相同弹幕连续提示。"},removeRank:{title:"移除排行榜",message:"移除直播画面上方的人气榜/航海榜,赠送人气票的入口也在这里。"},removeGiftPlanet:{title:"移除礼物星球",message:"移除直播画面上方的礼物星球。"},removeActivityBanner:{title:"移除活动入口",message:"移除直播画面上方的活动入口,当前活动内容会滚动切换。"},removePKBanner:{title:"移除大乱斗入口",message:"移除直播画面上方的大乱斗入口,这里在有BLS的时候也会成为BLS的入口,和大乱斗的入口滚动切换。"},removeFlipView:{title:"移除礼物栏下方广告",message:"移除礼物栏下方广告。"},removeRecommendRoom:{title:"移除礼物栏下方推荐直播间",message:"移除礼物栏下方推荐直播间。"},removeLiveMosaic:{title:"移除直播间马赛克",message:"移除部分直播间特有的马赛克。"}}},dt=(t=>(e.pushScopeId("data-v-5cc8821e"),t=t(),e.popScopeId(),t))((()=>e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"128",height:"128",class:"icon",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"#276BC0",d:"M512.67 959.47c-246.343 0-446.76-200.632-446.76-447.24S266.326 64.98 512.67 64.98s446.76 200.642 446.76 447.25-200.416 447.24-446.76 447.24zm0-829.04c-210.291 0-381.38 171.283-381.38 381.8s171.089 381.79 381.38 381.79 381.381-171.273 381.381-381.79-171.09-381.8-381.38-381.8z"}),e.createElementVNode("path",{fill:"#276BC0",d:"M447.29 317.172a63.891 63.959 0 1 0 130.76 0 63.891 63.959 0 1 0-130.76 0Zm64.907 503.047c-30.093 0-54.235-24.416-54.235-54.541V482.062c0-30.126 24.142-54.541 54.235-54.541 30.094 0 54.236 24.416 54.236 54.541v283.616c0 30.125-24.142 54.54-54.236 54.54z"})],-1))),ut=b(e.defineComponent({__name:"InfoIcon",props:{id:{}},setup(t){const i=t,n=()=>{const{title:e,message:t}=o.get(ct,i.id,{title:"无",message:"无"});s.ElMessageBox({title:e,message:t,lockScroll:!1,autofocus:!0,confirmButtonText:"OK"}).catch((()=>{}))};return(t,o)=>{const i=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(i,{class:"info-icon",onClick:n},{default:e.withCtx((()=>[dt])),_:1})}}}),[["__scopeId","data-v-5cc8821e"]]),mt=b(e.defineComponent({__name:"TaskStatusIcon",props:{status:{}},setup:t=>(t,o)=>{const i=e.resolveComponent("Loading"),n=e.resolveComponent("el-icon"),a=e.resolveComponent("Select"),s=e.resolveComponent("CloseBold");return"running"===t.status?(e.openBlock(),e.createBlock(n,{key:0,class:"status-icon is-loading"},{default:e.withCtx((()=>[e.createVNode(i)])),_:1})):"done"===t.status?(e.openBlock(),e.createBlock(n,{key:1,class:"status-icon",style:{color:"#1ab059"}},{default:e.withCtx((()=>[e.createVNode(a)])),_:1})):"error"===t.status?(e.openBlock(),e.createBlock(n,{key:2,class:"status-icon",style:{color:"#ff6464"}},{default:e.withCtx((()=>[e.createVNode(s)])),_:1})):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-41b10222"]]),ht=Object.freeze(Object.defineProperty({__proto__:null,Info:ut,TaskStatus:mt,Tasks:lt},Symbol.toStringTag,{value:"Module"})),gt=new j("Main");gt.log("document.readyState",document.readyState);const ft=t.createPinia(),pt=qe(ft),vt=We(ft);if(pt.checkCurrentScriptType(),gt.log("当前脚本的类型为",pt.currentScriptType),"Main"===pt.currentScriptType&&pt.startMainBLTHAliveHeartBeat(),vt.loadModules("unknown"),await E("document-body"),document.head.innerHTML.includes("BilibiliLive")){const t=e.createApp(nt);t.use(s),t.use(ft);for(const[e,o]of Object.entries(c))t.component(e,o);for(const[e,o]of Object.entries(ht))t.component(e,o);vt.loadModules("yes"),await E("document-end");const o=K("div");o.id="BLTH",document.body.append(o),t.mount(o)}}(Vue,Pinia,_,ElementPlusIconsVue,luxon,CryptoJS,ElementPlus,hotkeys); \ No newline at end of file +(e=>{if("function"==typeof GM_addStyle)return void GM_addStyle(e);const t=document.createElement("style");t.textContent=e,document.head.append(t)})(" .title[data-v-a28e87fa]{padding-left:20px;align-items:baseline;display:flex}.header-big-text[data-v-a28e87fa]{font-size:var(--big-text-size);align-self:unset}.header-small-text[data-v-a28e87fa]{font-size:var(--small-text-size);align-self:unset;margin-left:10px;--small-text-size: 18px}.collapse-btn[data-v-a28e87fa]{display:flex;justify-content:center;align-items:center;height:100%;float:left;cursor:pointer}.avatar-wrap[data-v-268e1b13]{width:80px;height:80px}.avatar[data-v-268e1b13]{display:flex;justify-content:center;align-items:center;border-radius:50%}.base[data-v-3884f5fc]{z-index:1003;position:absolute;background-color:#fff;border-bottom:1px solid #e3e5e7;border-left:1px solid #e3e5e7;border-right:1px solid #e3e5e7}.header[data-v-3884f5fc]{position:relative;box-sizing:border-box;width:100%;font-size:var(--big-text-size);align-items:center;display:flex;border-bottom:1px solid #e3e5e7;height:60px;--big-text-size: 25px}.aside[data-v-3884f5fc]{width:auto}.aside #aside-el-menu[data-v-3884f5fc]:not(.el-menu--collapse){width:150px}.main[data-v-3884f5fc]{--main-top-botton-padding: calc(var(--el-main-padding) * .625);padding-top:var(--main-top-botton-padding);padding-bottom:var(--main-top-botton-padding)}.fade-enter-active[data-v-3884f5fc],.fade-leave-active[data-v-3884f5fc]{transition:opacity .1s ease}.fade-enter-from[data-v-3884f5fc],.fade-leave-to[data-v-3884f5fc]{opacity:0}.info-icon[data-v-5cc8821e]{font-size:var(--el-font-size-base);cursor:pointer}.status-icon[data-v-41b10222]{font-size:var(--el-font-size-base)}.blth_btn{background-color:#23ade5;font-size:small;margin-inline-start:5px;color:#fff;border-radius:4px;border:none;padding:5px;cursor:pointer;box-shadow:0 0 2px #00000075;line-height:10px;margin-left:15px}.blth_btn:hover{background-color:#1097cc}.blth_btn:hover:active{background-color:#0e86b6;position:relative;top:1px} "),async function(e,t,o,i,n,a,s,r){"use strict";function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const c=l(i);var d,u=Object.defineProperty,m=(e,t,o)=>((e,t,o)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o)(e,"symbol"!=typeof t?t+"":t,o),h=(()=>"undefined"!=typeof GM_addStyle?GM_addStyle:void 0)(),g=(()=>"undefined"!=typeof GM_getValue?GM_getValue:void 0)(),f=(()=>"undefined"!=typeof GM_setValue?GM_setValue:void 0)(),p=(()=>"undefined"!=typeof GM_xmlhttpRequest?GM_xmlhttpRequest:void 0)(),v=(()=>"undefined"!=typeof unsafeWindow?unsafeWindow:void 0)();const w={ui:{isCollapse:!1,isShowPanel:!0,activeMenuIndex:"MainSiteTasks"},modules:{DailyTasks:{MainSiteTasks:{login:{enabled:!1,_lastCompleteTime:0},watch:{enabled:!1,_lastCompleteTime:0},coin:{enabled:!1,num:1,_lastCompleteTime:0},share:{enabled:!1,_lastCompleteTime:0}},LiveTasks:{sign:{enabled:!1,_lastCompleteTime:0},medalTasks:{danmu:{enabled:!1,includeHighLevelMedals:!1,list:["(⌒▽⌒)","( ̄▽ ̄)","(=・ω・=)","(`・ω・´)","(〜 ̄△ ̄)〜","(・∀・)","(°∀°)ノ","╮( ̄▽ ̄)╭","_(:3」∠)_","(^・ω・^ )","(● ̄(エ) ̄●)","ε=ε=(ノ≧∇≦)ノ","⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄","←◡←","(●'◡'●)ノ♥"],_lastCompleteTime:0},like:{enabled:!1,_lastCompleteTime:0},watch:{enabled:!1,time:20,_watchedSecondsToday:0,_lastWatchTime:0,_lastCompleteTime:0},isWhiteList:!1,roomidList:[]}},OtherTasks:{groupSign:{enabled:!1,_lastCompleteTime:0},silverToCoin:{enabled:!1,_lastCompleteTime:0},coinToSilver:{enabled:!1,num:1,_lastCompleteTime:0},getYearVipPrivilege:{enabled:!1,_nextReceiveTime:0}}},EnhanceExperience:{switchLiveStreamQuality:{enabled:!1,qualityDesc:"原画"},banp2p:{enabled:!1},noReport:{enabled:!1},noSleep:{enabled:!1},invisibility:{enabled:!1},showContributionUserNum:{enabled:!1}},RemoveElement:{removePKBox:{enabled:!1},removeLiveWaterMark:{enabled:!1},removeShopPopover:{enabled:!1},removeGameParty:{enabled:!1},removeGiftPopover:{enabled:!1},removeMicPopover:{enabled:!1},removeComboCard:{enabled:!1},removeRank:{enabled:!1},removeGiftPlanet:{enabled:!1},removeActivityBanner:{enabled:!1},removePKBanner:{enabled:!1},removeFlipView:{enabled:!1},removeRecommendRoom:{enabled:!1},removeLiveMosaic:{enabled:!1}}},cache:{lastAliveHeartBeatTime:0}};class y{static mergeConfigs(e,t){const i=o.difference(o.keys(e),o.keys(t));e=o.omit(e,i);const n=o.difference(o.keys(t),o.keys(e));o.assign(e,o.pick(t,n));for(const[i,a]of Object.entries(e).filter((e=>!n.includes(e[0]))))o.isPlainObject(a)&&(e[i]=this.mergeConfigs(a,t[i]));return e}static setUiConfig(e){f("ui",e)}static getUiConfig(){return this.mergeConfigs(g("ui",{}),w.ui)}static setModuleConfig(e){f("modules",e)}static getModuleConfig(){return this.mergeConfigs(g("modules",{}),w.modules)}static setCache(e){f("cache",e)}static getCache(){return this.mergeConfigs(g("cache",{}),w.cache)}}const _=t.defineStore("ui",(()=>{const t=e.reactive(y.getUiConfig()),i=e.computed((()=>({MainSiteTasks:"主站任务",LiveTasks:"直播任务",OtherTasks:"其它任务",EnhanceExperience:"体验优化",RemoveElement:"移除元素"}[t.activeMenuIndex]))),n=e.reactive({top:0,left:0,height:0,width:0}),a=e.computed((()=>({top:n.top.toString()+"px",left:n.left.toString()+"px",height:n.height.toString()+"px",width:n.width.toString()+"px"}))),s=e.computed((()=>t.isShowPanel?"隐藏控制面板":"显示控制面板")),r=e.computed((()=>(n.height-60).toString()+"px"));return e.watch(t,o.debounce((e=>y.setUiConfig(e)),350)),{isShowPanelButtonText:s,activeMenuName:i,baseStyleValue:n,baseStyle:a,scrollBarHeight:r,uiConfig:t,changeCollapse:function(){t.isCollapse=!t.isCollapse},changeShowPanel:function(){t.isShowPanel=!t.isShowPanel},setActiveMenuIndex:function(e){t.activeMenuIndex=e}}})),x={class:"title"},b=(e,t)=>{const o=e.__vccOpts||e;for(const[e,i]of t)o[e]=i;return o},k=b(e.defineComponent({__name:"PanelHeader",setup(t){const o=_();return(t,n)=>{const a=e.resolveComponent("el-icon"),s=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"collapse-btn",onClick:n[0]||(n[0]=(...t)=>e.unref(o).changeCollapse&&e.unref(o).changeCollapse(...t))},[e.unref(o).uiConfig.isCollapse?(e.openBlock(),e.createBlock(a,{key:0},{default:e.withCtx((()=>[e.createVNode(e.unref(i.Expand))])),_:1})):(e.openBlock(),e.createBlock(a,{key:1},{default:e.withCtx((()=>[e.createVNode(e.unref(i.Fold))])),_:1}))]),e.createElementVNode("div",x,[e.createVNode(s,{tag:"b",class:"header-big-text"},{default:e.withCtx((()=>[e.createTextVNode("控制面板")])),_:1}),e.createVNode(s,{class:"header-small-text"},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(e.unref(o).activeMenuName),1)])),_:1})])],64)}}}),[["__scopeId","data-v-a28e87fa"]]),T=e.defineComponent({__name:"PanelAside",setup(t){const o=_(),i=[{icon:"Tasks",title:"每日任务",index:"DailyTasks",subs:[{title:"主站任务",index:"MainSiteTasks"},{title:"直播任务",index:"LiveTasks"},{title:"其它任务",index:"OtherTasks"}]},{icon:"Monitor",title:"体验优化",index:"EnhanceExperience"},{icon:"Scissor",title:"移除元素",index:"RemoveElement"}];return(t,n)=>{const a=e.resolveComponent("el-icon"),s=e.resolveComponent("el-menu-item"),r=e.resolveComponent("el-sub-menu"),l=e.resolveComponent("el-menu");return e.openBlock(),e.createBlock(l,{"default-active":e.unref(o).uiConfig.activeMenuIndex,style:e.normalizeStyle({"min-height":e.unref(o).scrollBarHeight}),collapse:e.unref(o).uiConfig.isCollapse,"unique-opened":"",onSelect:e.unref(o).setActiveMenuIndex,id:"aside-el-menu"},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,(t=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.subs?(e.openBlock(),e.createBlock(r,{index:t.index,key:t.index},{title:e.withCtx((()=>[e.createVNode(a,null,{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))])),_:2},1024),e.createElementVNode("span",null,e.toDisplayString(t.title),1)])),default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subs,(t=>(e.openBlock(),e.createBlock(s,{index:t.index,key:t.index},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.title),1)])),_:2},1032,["index"])))),128))])),_:2},1032,["index"])):(e.openBlock(),e.createBlock(s,{index:t.index,key:t.index},{title:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.title),1)])),default:e.withCtx((()=>[e.createVNode(a,null,{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))])),_:2},1024)])),_:2},1032,["index"]))],64)))),64))])),_:1},8,["default-active","style","collapse","onSelect"])}}}),C=t.defineStore("bili",(()=>{const t=e.ref(null),o=e.ref(null),i=e.ref(null),n=e.ref(null),a=e.ref(null),s=e.ref(null),r=e.ref(null),l=e.computed((()=>{var e;return(null==(e=r.value)?void 0:e.filter((e=>0!==e.room_info.room_id)))??null}));return{BilibiliLive:t,userInfo:i,giftConfig:n,cookies:o,dailyRewardInfo:a,dynamicVideos:s,fansMedals:r,filteredFansMedals:l}}));let V=class{constructor(e,t){m(this,"url_prefix"),m(this,"origin"),this.url_prefix=e??"",this.origin=t??"https://bilibili.com"}get(e,t,i){return new Promise(((n,a)=>{const s={method:"GET",url:this.url_prefix+e+(t?"?"+new URLSearchParams(t).toString():""),responseType:"json",headers:{Accept:"application/json, text/plain, */*",Referer:this.origin,Origin:this.origin,"Sec-Fetch-Site":"same-site"},onload:function(e){n(e.response)},onerror:function(e){a(e)}},r=o.defaultsDeep(i,s);p(r)}))}post(e,t,i){return new Promise(((n,a)=>{const s={method:"POST",url:this.url_prefix.concat(e),data:new URLSearchParams(t).toString(),responseType:"json",headers:{Accept:"application/json, text/plain, */*",Referer:this.origin,Origin:this.origin,"Sec-Fetch-Site":"same-site","Content-Type":"application/x-www-form-urlencoded"},onload:function(e){n(e.response)},onerror:function(e){a(e)}},r=o.defaultsDeep(i,s);"multipart/form-data"===r.headers["Content-Type"]&&delete r.headers["Content-Type"],p(r)}))}};function S(e){return new Promise((t=>setTimeout(t,e)))}function N(e){const t=new FormData;return o.forEach(e,((e,o)=>t.append(o,e.toString()))),t}function P(e,t,i){o.forOwn(e,(function(e,n){const a=i?i+"."+n:n;o.isPlainObject(e)&&!o.isEmpty(e)?P(e,t,a):t(e,a)}))}function E(e){switch(e){case"document-start":return Promise.resolve();case"document-head":return new Promise((e=>{if(document.head)e();else{const t=new MutationObserver((()=>{document.head&&(t.disconnect(),e())}));t.observe(document.documentElement,{childList:!0})}}));case"document-body":return new Promise((e=>{if(document.body)e();else{const t=new MutationObserver((()=>{document.body&&(t.disconnect(),e())}));t.observe(document.documentElement,{childList:!0})}}));case"document-end":return new Promise((e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",(()=>e()))}));case"window-load":return new Promise((e=>{"complete"===document.readyState?e():window.addEventListener("load",(()=>e()))}));default:return Promise.reject("Illegal moment")}}function R(e,t=0,o=5){const i=n.DateTime.fromMillis(e),a=n.DateTime.now().set({hour:t,minute:o,second:0,millisecond:0}),s=a.plus({days:1}),r=a.minus({days:1});return n.DateTime.now()>=a?i>=a&&i=r&&ii&&(i=i.plus({days:1}));const a=i.diff(o);return{ms:a.toMillis(),str:a.toFormat("h小时m分钟s秒").replace(/^0小时/,"").replace(/^0分钟/,"")}}function B(e,t,o,i){const a=n.DateTime.now(),s=n.DateTime.local(a.year,a.month,a.day,e,t),r=n.DateTime.local(a.year,a.month,a.day,o,i);return a>=s&&aL.live.get("/xlive/web-room/v1/giftPanel/roomGiftConfig",{platform:i,room_id:e,area_parent_id:t,area_id:o}),doSign:()=>L.live.get("/xlive/web-ucenter/v1/sign/DoSign"),getSignInfo:()=>L.live.get("/xlive/web-ucenter/v1/sign/WebGetSignInfo"),fansMedalPanel:(e,t=10)=>L.live.get("/xlive/app-ucenter/v1/fansMedal/panel",{page:e,page_size:t}),sendMsg:(e,t,o=0,i=1,n=0,a=25,s=16777215,r=0)=>{const l=C().cookies.bili_jct;return L.live.post("/msg/send",void 0,{data:N({roomid:t,room_type:o,rnd:D(),msg:e,mode:i,jumpfrom:n,fontsize:a,csrf:l,csrf_token:l,color:s,bubble:r}),headers:{"Content-Type":"multipart/form-data"}})},likeReport:(e,t,o=1,i="")=>{var n;const a=C(),s=a.cookies.bili_jct,r=null==(n=a.BilibiliLive)?void 0:n.UID;return L.live.post("/xlive/app-ucenter/v1/like_info_v3/like/likeReportV3",{click_time:o,room_id:e,anchor_id:t,uid:r,ts:D(),csrf:s,csrf_token:s,visit_id:i})},getInfoByRoom:e=>L.live.get("/xlive/web-room/v1/index/getInfoByRoom",{room_id:e}),getUserTaskProgress:(e=11153765)=>{const t=C().cookies.bili_jct;return L.live.get("/xlive/app-ucenter/v1/userTask/GetUserTaskProgress",{target_id:e,csrf:t,ts:D()})},userTaskReceiveRewards:(e=11153765)=>{const t=C().cookies.bili_jct;return L.live.post("/xlive/app-ucenter/v1/userTask/UserTaskReceiveRewards",{actionKey:"csrf",target_id:e,csrf:t,ts:D()})},silver2coin:(e="")=>{const t=C().cookies.bili_jct;return L.live.post("/xlive/revenue/v1/wallet/silver2coin",{csrf:t,csrf_token:t,visit_id:e})},coin2silver:(e,t="pc",o="")=>{const i=C().cookies.bili_jct;return L.live.post("/xlive/revenue/v1/wallet/coin2silver",{num:e,csrf:i,csrf_token:i,platform:t,visit_id:o})},queryContributionRank:(e,t,o,i,n="online_rank",a="contribution_rank")=>L.live.get("/xlive/general-interface/v1/rank/queryContributionRank",{ruid:e,room_id:t,page:o,page_size:i,type:n,switch:a}),wearMedal:(e,t="")=>{const o=C().cookies.bili_jct;return L.live.post("/xlive/web-room/v1/fansMedal/wear",{medal_id:e,csrf_token:o,csrf:o,visit_id:t})}},$={E:(e,t,o,i=0,n=[],a="")=>{const s=C().cookies.bili_jct;return L.liveTrace.post("/xlive/data-interface/v1/x25Kn/E",{id:JSON.stringify(e),device:JSON.stringify(t),ruid:o,ts:I(),is_patch:i,heart_beat:JSON.stringify(n),ua:navigator.userAgent,csrf_token:s,csrf:s,visit_id:a})},X:(e,t,o,i,n,a,s,r,l="")=>{const c=C().cookies.bili_jct;return L.liveTrace.post("/xlive/data-interface/v1/x25Kn/X",{s:e,id:JSON.stringify(t),device:JSON.stringify(o),ruid:i,ets:n,benchmark:a,time:s,ts:r,ua:navigator.userAgent,csrf_token:c,csrf:c,visit_id:l})}},A={nav:()=>L.main.get("/x/web-interface/nav"),reward:()=>L.main.get("/x/member/web/exp/reward"),dynamicAll:(e,t=1,o=-480,i="itemOpusStyle")=>L.main.get("/x/polymer/web-dynamic/v1/feed/all",{timezone_offset:o,type:e,page:t,features:i}),videoHeartbeat:(e,t="",o=0,i=0,n=0,a="https://t.bilibili.com/?spm_id_from=444.3.0.0",s=116,r=100,l=3,c=0,d=0,u=2,m=0,h=0,g="333.488.0.0",f="333.31.list.card_archive.click",p='{"player_version":"4.1.21-rc.1727.0"}')=>{var v;const w=C();return L.main.post("/x/click-interface/web/heartbeat",{start_ts:D(),mid:null==(v=C().userInfo)?void 0:v.mid,aid:e,cid:t,type:l,sub_type:c,dt:u,play_type:d,realtime:o,played_time:i,real_played_time:n,refer_url:a,quality:s,video_duration:r,last_play_progress_time:m,max_play_progress_time:h,spmid:g,from_spmid:f,extra:p,csrf:w.cookies.bili_jct})},share:(e,t="pc_client_normal",o=2,i=0,n=1)=>{const a=C().cookies.bili_jct;return L.main.post("/x/web-interface/share/add",{aid:e,eab_x:o,ramval:i,source:t,ga:n,csrf:a})},coinAdd:(e,t,o=0,i=!0,n=2,a=6,s="web_normal",r=1)=>{const l=C().cookies.bili_jct;return L.main.post("/x/web-interface/coin/add ",{aid:e,multiply:t,select_like:o,cross_domain:i,eab_x:n,ramval:a,source:s,ga:r,csrf:l})},videoRelation:(e,t="")=>L.main.get("/x/web-interface/archive/relation",{aid:e,bvid:t}),vip:{myPrivilege:()=>{const e=C().cookies.bili_jct;return L.main.get("/x/vip/privilege/my",{csrf:e},{headers:{Referer:"https://account.bilibili.com/account/big/myPackage",Origin:"https://account.bilibili.com/account/big/myPackage"}})},receivePrivilege:(e,t="web")=>{const o=C().cookies.bili_jct;return L.main.post("/x/vip/privilege/receive",{type:e,platform:t,csrf:o},{headers:{Referer:"https://account.bilibili.com/account/big/myPackage",Origin:"https://account.bilibili.com"}})},addExperience:()=>{var e,t,o;const i=C(),n=null==(e=i.BilibiliLive)?void 0:e.UID,a=null==(t=i.cookies)?void 0:t.buvid3,s=null==(o=i.cookies)?void 0:o.bili_jct;return L.main.post("/x/vip/experience/add",{mid:n,buvid:a,csrf:s},{headers:{Referer:"https://account.bilibili.com/big",Origin:"https://account.bilibili.com"}})}}},U={myGroups:(e=0,t="web")=>L.vc.get("/link_group/v1/member/my_groups",{build:e,mobi_app:t}),signIn:(e,t)=>L.vc.get("/link_setting/v1/link_setting/sign_in",{group_id:e,owner_id:t})};class j{constructor(e){m(this,"NAME","BLTH"),m(this,"prefix_title_str"),m(this,"title"),this.title=e,this.prefix_title_str=e.split("_").join("][")}get prefix(){return[`%c${this.NAME}%c[${(new Date).toLocaleString()}]%c[${this.prefix_title_str}]%c:`,"font-weight: bold; color: white; background-color: #23ade5; padding: 1px 4px; border-radius: 4px;","font-weight: bold; color: #0920e6;","font-weight: bold;",""]}log(...e){console.log(...this.prefix,...e)}error(...e){console.error(...this.prefix,...e)}warn(...e){console.warn(...this.prefix,...e)}}class H{constructor(e){m(this,"moduleName"),m(this,"logger"),m(this,"moduleStore",We()),m(this,"config"),this.moduleName=e,this.logger=new j(this.moduleName)}set status(e){throw new Error("Method not implemented.")}run(){throw new Error("Method not implemented.")}}m(H,"runOnMultiplePages",!1),m(H,"runAt","document-body"),m(H,"onFrame","target"),m(H,"runAfterDefault",!0);function F(e,t=200,o=1e4){return new Promise(((i,n)=>{const a=Date.now(),s=new Set(e),r={},l=setInterval((()=>{Object.assign(r,function(e){const t={},o=new Set(e);for(const e of o)t[e]=null;for(const e of document.cookie.split("; ")){const[i,...n]=e.split("="),a=n.join("=");if(o.has(i)&&(t[i]=decodeURIComponent(a),o.delete(i),0===o.size))break}return t}(s));for(const e in r)null!==r[e]&&s.delete(e);0===s.size?(clearInterval(l),i(r)):-1!==o&&Date.now()-a>o&&(clearInterval(l),n("获取以下Cookies超时: "+[...s]))}),t)}))}class G extends H{getBilibiliLive(){return this.logger.log("unsafeWindow.BilibiliLive",v.BilibiliLive),new Promise((e=>{0===v.BilibiliLive.UID?v.BilibiliLive=new Proxy(v.BilibiliLive,{set:(t,o,i)=>(t[o]=i,"UID"===o&&(v.BilibiliLive=t,e(v.BilibiliLive)),!0)}):e(v.BilibiliLive)}))}async run(){C().BilibiliLive=await this.getBilibiliLive()}}m(G,"runOnMultiplePages",!0);const q=Object.freeze(Object.defineProperty({__proto__:null,Default_BilibiliLive:G,Default_Cookies:class extends H{getCookies(){return F(["bili_jct","LIVE_BUVID","buvid3"])}async run(){C().cookies=await this.getCookies()}},Default_DailyRewardInfo:class extends H{async getDailyRewardInfo(){const e=this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks;if(!Object.values(e).some((e=>e.enabled&&!R(e._lastCompleteTime))))return Promise.resolve(null);try{const e=await A.reward();return this.logger.log("BAPI.main.reward response",e),0===e.code?Promise.resolve(e.data):(this.logger.error("获取主站每日任务完成情况失败",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取主站每日任务完成情况出错",e),Promise.reject(e)}}async run(){const e=C();e.dailyRewardInfo=await this.getDailyRewardInfo(),setTimeout((async()=>{e.dailyRewardInfo=await this.getDailyRewardInfo()}),M(0,4).ms)}},Default_DynamicVideos:class extends H{async getDynamicVideos(){const e=this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks;if(!Object.entries(e).filter((([e])=>["watch","share","coin"].includes(e))).some((e=>e[1].enabled&&!R(e[1]._lastCompleteTime))))return Promise.resolve(null);try{const e=await A.dynamicAll("video");return this.logger.log("BAPI.main.dynamicAll response",e),0===e.code?Promise.resolve(e.data.items):(this.logger.error("获取主站每日任务完成情况失败",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取主站每日任务完成情况出错",e),Promise.reject(e)}}async run(){const e=C();e.dynamicVideos=await this.getDynamicVideos(),setTimeout((async()=>{e.dynamicVideos=await this.getDynamicVideos()}),M(0,4).ms)}},Default_FansMetals:class extends H{async getFansMetals(e=1/0,t=!1){const o=this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks;if(!t&&!Object.entries(o).filter((([e])=>["danmu","like","watch"].includes(e))).some((e=>e[1].enabled&&!R(e[1]._lastCompleteTime))))return Promise.resolve(null);{const t=[];let o=1;try{const i=await O.fansMedalPanel(1);if(this.logger.log("BAPI.live.fansMedalPanel(1) response",i),0!==i.code)return this.logger.error("获取粉丝勋章列表第1页失败",i.message),Promise.reject(i.message);o=i.data.page_info.total_page,t.push(...i.data.special_list,...i.data.list);for(let n=2;n<=Math.min(o,e);n++){const e=await O.fansMedalPanel(n);if(this.logger.log(`BAPI.live.fansMedalPanel(${n}) response`,e),0!==i.code)return this.logger.error(`获取粉丝勋章列表第${n}页失败`,i.message),t;t.push(...e.data.list),await S(250)}return Promise.resolve(t)}catch(e){return this.logger.error("获取粉丝勋章列表出错",e),Promise.reject(e)}}}async run(){const e=C();e.fansMedals=await this.getFansMetals(),setTimeout((async()=>{const t=await this.getFansMetals(1,!0);null==t||t.forEach((t=>{var o;(null==(o=e.fansMedals)?void 0:o.every((e=>e.medal.target_id!==t.medal.target_id)))&&e.fansMedals.push(t)}))}),M(0,4).ms),We().emitter.on("Default_FansMedals",(async()=>{e.fansMedals=await this.getFansMetals(1/0,!0)}))}},Default_UserInfo:class extends H{async getUserInfo(){try{const e=await A.nav();return this.logger.log("BAPI.main.nav response",e),0===e.code?Promise.resolve(e.data):(this.logger.error("获取用户信息失败",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取用户信息出错",e),Promise.reject(e)}}async run(){const e=C();e.userInfo=await this.getUserInfo(),setTimeout((async()=>{e.userInfo=await this.getUserInfo()}),M(0,4).ms)}}},Symbol.toStringTag,{value:"Module"}));const z=document.querySelector.bind(document);document.querySelectorAll.bind(document);const K=document.createElement.bind(document);const W=()=>v.self===v.top;class X{constructor(e,t,o,i,n,a=!1){m(this,"logger",new j("RoomHeart")),m(this,"config"),m(this,"isLast"),m(this,"watchedSeconds"),m(this,"timer"),m(this,"stop",!1),m(this,"areaID"),m(this,"parentID"),m(this,"roomID"),m(this,"ruid"),m(this,"seq",0),m(this,"buvid",(null==(d=C().cookies)?void 0:d.LIVE_BUVID)??function(e){const t=`; ${document.cookie}`.split(`; ${e}=`);return 2===t.length?t.pop().split(";").shift():null}("LIVE_BUVID")),m(this,"uuid","xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))),m(this,"device",[this.buvid,this.uuid]),m(this,"ua",navigator.userAgent),m(this,"heartBeatInterval"),m(this,"secretKey"),m(this,"secretRule"),m(this,"timestamp"),this.roomID=e,this.areaID=t,this.parentID=o,this.ruid=i,this.watchedSeconds=n,this.isLast=a,this.config=We().moduleConfig.DailyTasks.LiveTasks.medalTasks.watch}set status(e){We().moduleStatus.DailyTasks.LiveTasks.medalTasks.watch=e}get id(){return[this.parentID,this.areaID,this.seq,this.roomID]}start(){if(this.buvid)return this.timer=setTimeout((()=>this.stop=!0),M(0,0).ms),this.E();this.logger.error(`缺少buvid,无法为直播间 ${this.roomID} 执行观看直播任务,请尝试刷新页面`)}async E(){if(this.stop)this.status="";else try{const e=await $.E(this.id,this.device,this.ruid);this.logger.log(`BAPI.liveTrace.E(${this.id}, ${this.device}, ${this.ruid}) response`,e),0===e.code?(this.seq+=1,({heartbeat_interval:this.heartBeatInterval,secret_key:this.secretKey,secret_rule:this.secretRule,timestamp:this.timestamp}=e.data),setTimeout((()=>this.X()),1e3*this.heartBeatInterval)):this.logger.error(`BAPI.liveTrace.E(${this.id}, ${this.device}, ${this.ruid}) 失败`,e.message)}catch(e){this.logger.error(`BAPI.liveTrace.E(${this.id}, ${this.device}, ${this.ruid}) 出错`,e)}}async X(){if(this.stop)this.status="";else try{const e={id:JSON.stringify(this.id),device:JSON.stringify(this.device),ets:this.timestamp,benchmark:this.secretKey,time:this.heartBeatInterval,ts:I(),ua:this.ua},t=this.sypder(JSON.stringify(e),this.secretRule),o=await $.X(t,this.id,this.device,this.ruid,this.timestamp,this.secretKey,this.heartBeatInterval,e.ts);if(this.logger.log(`BAPI.liveTrace.X(${t}, ${this.id}, ${this.device}, ${this.ruid}, ${this.timestamp}, ${this.secretKey}, ${this.heartBeatInterval}, ${e.ts}) response`,o),0===o.code){if(this.seq+=1,this.watchedSeconds+=this.heartBeatInterval,this.isLast&&(this.config._watchedSecondsToday=this.watchedSeconds),this.watchedSeconds>=60*this.config.time)return this.isLast&&(this.config._lastCompleteTime=I(),this.logger.log("观看直播任务已完成"),this.status="done"),void clearTimeout(this.timer);({heartbeat_interval:this.heartBeatInterval,secret_key:this.secretKey,secret_rule:this.secretRule,timestamp:this.timestamp}=o.data),setTimeout((()=>this.X()),1e3*this.heartBeatInterval)}else this.logger.error(`BAPI.liveTrace.X(${t}, ${this.id}, ${this.device}, ${this.ruid}, ${this.timestamp}, ${this.secretKey}, ${this.heartBeatInterval}) 失败`,o.message)}catch(e){this.logger.error(`BAPI.liveTrace.X(s, ${this.id}, ${this.device}, ${this.ruid}, ${this.timestamp}, ${this.secretKey}, ${this.heartBeatInterval}) 出错`,e)}}sypder(e,t){const o=JSON.parse(e),[i,n,s,r]=JSON.parse(o.id),[l,c]=JSON.parse(o.device),d=o.benchmark,u={platform:"web",parent_id:i,area_id:n,seq_id:s,room_id:r,buvid:l,uuid:c,ets:o.ets,time:o.time,ts:o.ts};let m=JSON.stringify(u);for(const e of t)switch(e){case 0:default:m=a.HmacMD5(m,d).toString(a.enc.Hex);break;case 1:m=a.HmacSHA1(m,d).toString(a.enc.Hex);break;case 2:m=a.HmacSHA256(m,d).toString(a.enc.Hex);break;case 3:m=a.HmacSHA224(m,d).toString(a.enc.Hex);break;case 4:m=a.HmacSHA512(m,d).toString(a.enc.Hex);break;case 5:m=a.HmacSHA384(m,d).toString(a.enc.Hex)}return m}}class J extends H{constructor(){super(...arguments),m(this,"medalTasksConfig",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks),m(this,"config",this.medalTasksConfig.watch)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.medalTasks.watch=e}getRoomidUidList(){const e=C();return e.filteredFansMedals?e.filteredFansMedals.filter((e=>e.medal.level<20&&(this.medalTasksConfig.isWhiteList?this.medalTasksConfig.roomidList.includes(e.room_info.room_id):!this.medalTasksConfig.roomidList.includes(e.room_info.room_id)))).map((e=>[e.room_info.room_id,e.medal.target_id])).slice(0,199):null}async getAreaInfo(e){try{const t=await O.getInfoByRoom(e);if(this.logger.log(`BAPI.live.getInfoByRoom(${e}) response`,t),0===t.code){const e=t.data.room_info;return[e.area_id,e.parent_area_id]}return[-1,-1]}catch(t){return this.logger.error(`获取指定直播间的 area_id 和 parent_area_id(roomid = ${e}) 出错`,t),[-1,-1]}}async run(){if(this.logger.log("观看直播模块开始运行"),this.config.enabled)if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的观看直播任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过观看直播任务了"),this.status="done");else{this.status="running",R(this.config._lastWatchTime,0,0)?this.config._watchedSecondsToday-=this.config._watchedSecondsToday%300:this.config._watchedSecondsToday=0,this.config._lastWatchTime=I();const e=this.getRoomidUidList();if(e)if(0===e.length)this.status="done",this.config._lastCompleteTime=I();else for(let t=0;t0&&a>0&&new X(o,n,a,i,this.config._watchedSecondsToday,t===e.length-1).start(),await S(3e3)}}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离观看直播模块下次运行时间:",e.str)}}m(J,"runAt","window-load");class Q extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.switchLiveStreamQuality)}async waitForPlayer(){return new Promise(((e,t)=>{const o=v.top?v.top:v,i=setInterval((()=>{o.livePlayer&&Object.prototype.hasOwnProperty.call(o.livePlayer,"switchQuality")&&Object.prototype.hasOwnProperty.call(o.livePlayer,"getPlayerInfo")&&(clearInterval(i),clearTimeout(n),e(o.livePlayer))}),200),n=setTimeout((()=>{clearInterval(i),clearTimeout(n),t("等待播放器超时")}),1e4)}))}async switchQuality(e){const t=e.getPlayerInfo();0===t.liveStatus?this.logger.log("当前直播间未开播,无需切换画质"):setTimeout((()=>{const o=t.qualityCandidates.find((({desc:e})=>e===this.config.qualityDesc));o?t.quality!==o.qn?(e.switchQuality(o.qn),this.logger.log(`已将画质切换为${this.config.qualityDesc}`,o)):this.logger.log("当前画质已经是目标画质了,无需切换画质"):this.logger.log("当前直播不支持目标画质,保持默认画质")}),W()?2500:5e3)}async run(){if(this.logger.log("自动切换画质模块开始运行"),this.config.enabled)try{const e=await this.waitForPlayer();this.switchQuality(e)}catch(e){this.logger.error("自动切换画质模块出错",e)}}}m(Q,"runOnMultiplePages",!0),m(Q,"runAt","window-load"),m(Q,"runAfterDefault",!1);class Y extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.banp2p)}banP2P(){const e=["RTCPeerConnection","mozRTCPeerConnection","webkitRTCPeerConnection"];for(const t of e)Object.prototype.hasOwnProperty.call(v,t)&&Object.defineProperty(v,t,{value:class{constructor(){}addEventListener(){}removeEventListener(){}createDataChannel(){return{close:function(){}}}createOffer(){return Promise.resolve()}setLocalDescription(){return Promise.resolve()}close(){}setRemoteDescription(){return Promise.resolve()}createAnswer(){}},enumerable:!1,writable:!1,configurable:!1})}run(){if(this.logger.log("禁用P2P模块开始运行"),this.config.enabled)try{this.banP2P()}catch(e){this.logger.error("禁用P2P失败",e)}}}m(Y,"runOnMultiplePages",!0),m(Y,"runAt","document-start"),m(Y,"onFrame","all"),m(Y,"runAfterDefault",!1);var Z=["load","loadend","timeout","error","readystatechange","abort"],ee="__origin_xhr";function te(e,t){var o={};for(var i in e)o[i]=e[i];return o.target=o.currentTarget=t,o}var oe=Z[0],ie=Z[1],ne=Z[2],ae=Z[3],se=Z[4],re=Z[5],le="prototype";function ce(e,t){return function(e,t){var o=e.onRequest,i=e.onResponse,n=e.onError;function a(e){var t=e.responseType;if(!t||"text"===t)return e.responseText;var o=e.response;if("json"===t&&!o)try{return JSON.parse(e.responseText)}catch(e){console.warn(e)}return o}function s(e,t){var o=new fe(e),n={response:a(t),status:t.status,statusText:t.statusText,config:e.config,headers:e.resHeader||e.getAllResponseHeaders().split("\r\n").reduce((function(e,t){if(""===t)return e;var o=t.split(":");return e[o.shift()]=function(e){return e.replace(/^\s+|\s+$/g,"")}(o.join(":")),e}),{})};if(!i)return o.resolve(n);i(n,o)}function r(e,t,o,i){var a=new pe(e);o={config:e.config,error:o,type:i},n?n(o,a):a.next(o)}function l(){return!0}function c(e){return function(t,o){return r(t,this,o,e),!0}}function d(e,t){return 4===e.readyState&&0!==e.status?s(e,t):4!==e.readyState&&ue(e,se),!0}var{originXhr:u,unHook:m}=function(e,t){var o=(t=t||window).XMLHttpRequest,i=!0,n=function(){for(var e=new o,t=0;t(e.onRequest&&xe.push(e.onRequest),e.onResponse&&be.push(e.onResponse),_e||((e=>{e.fetch=async(e,t)=>{for(const o of xe){const i=new we;if(await o.apply(v,[{input:e,init:t},i]),i._resolve)return i._resolve;if(i._error)throw i._error;if(!i._next)break;e=i._input,t=i._init}let o=await ve.apply(v,[e,t]);for(const e of be){const t=new ye;if(await e.apply(v,[o,t]),t._resolve)return t._resolve;if(t._error)throw t._error;if(!t._next)break;o=t._response}return o}})(t),_e=!0),{unProxy:()=>{e.onRequest&&xe.splice(xe.findIndex((t=>t===e.onRequest)),1),e.onResponse&&be.splice(be.findIndex((t=>t===e.onResponse)),1)},unHook:()=>{t.fetch=ve,xe=[],be=[]},originFetch:ve}),Te=class e extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.noReport)}static isTargetURL(e){return!(!e.includes("//data.bilibili.com")&&!e.includes("//data.bilivideo.com"))}hookProperties(e){Object.defineProperty(e.navigator,"sendBeacon",{value:()=>!0}),Object.defineProperties(e,{reportObserver:{get:()=>({reportCustomData:function(){}}),set(){}},reportConfig:{get:()=>({}),set(){}}})}async ajaxHook(){const t={onRequest:(t,o)=>{e.isTargetURL(t.url)?o.resolve({config:t,status:200,headers:{"Content-Type":"text/plain; charset=utf-8"},response:"ok"}):o.next(t)}},o={onRequest(t,o){const i="string"==typeof(n=t.input)?n:n instanceof URL?n.toString():n instanceof Request?n.url:"Incorrect input";var n;e.isTargetURL(i)?o.resolve(new Response("ok")):o.next(t)},onResponse(e,t){t.next(e)}};this.hookProperties(v),ce(t,v),ke(o,v)}run(){if(this.logger.log("拦截日志数据上报模块开始运行"),this.config.enabled)try{this.ajaxHook()}catch(e){this.logger.error("拦截日志数据上报失败",e)}}};m(Te,"runOnMultiplePages",!0),m(Te,"runAt","document-start"),m(Te,"onFrame","all"),m(Te,"runAfterDefault",!1);let Ce=Te;class Ve extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.noSleep)}run(){this.logger.log("屏蔽挂机检测模块开始运行"),this.config.enabled&&setInterval((()=>{document.dispatchEvent(new MouseEvent("mousemove"))}),3e5)}}m(Ve,"runOnMultiplePages",!0),m(Ve,"runAt","window-load"),m(Ve,"runAfterDefault",!1);class Se extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.invisibility)}run(){this.logger.log("隐身入场模块开始运行"),this.config.enabled&&ce({onRequest:(e,t)=>{e.url.includes("//api.live.bilibili.com/xlive/web-room/v1/index/getInfoByUser")&&(e.url=e.url.replace("not_mock_enter_effect=0","not_mock_enter_effect=1")),t.next(e)}},v)}}m(Se,"runOnMultiplePages",!0),m(Se,"runAt","document-start"),m(Se,"runAfterDefault",!1),m(Se,"onFrame","all");class Ne extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.showContributionUserNum)}async getContributionUserNum(e,t,o=1,i=100){return O.queryContributionRank(e,t,o,i).then((n=>(this.logger.log(`BAPI.live.queryContributionRank(${e}, ${t}, ${o}, ${i})`,n),0===n.code?n.data.count:(this.logger.error("获取高能用户数量失败",n.message),-1))))}async updateNumber(e,t,i){const n=await this.getContributionUserNum(t,i,1,100);-1!==n?(e.innerText=`高能用户(${n})`,setTimeout((()=>this.updateNumber(e,t,i)),o.random(5e4,7e4))):e.innerText="高能用户"}run(){var e;if(this.logger.log("显示高能用户数量模块开始运行"),this.config.enabled){const t=C(),o=t.BilibiliLive.ANCHOR_UID,i=t.BilibiliLive.ROOMID,n=null==(e=z("#rank-list-ctnr-box .tab-list"))?void 0:e.firstChild;n?this.updateNumber(n,o,i):this.logger.error("未找到高能用户标签")}}}m(Ne,"runOnMultiplePages",!0),m(Ne,"runAt","window-load");class Pe extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removePKBox)}removePKNode(){h("#awesome-pk-vm { display: none !important }")}removePKToast(){const e=["主播即将结束PK","连线断开中"];new MutationObserver((t=>{for(const o of t)o.addedNodes.forEach((t=>{t instanceof HTMLElement&&t.classList.contains("link-toast")&&e.some((e=>{var o;return null==(o=t.textContent)?void 0:o.includes(e)}))&&(t.style.display="none")}))})).observe(document.body,{childList:!0})}async run(){this.logger.log("移除大乱斗元素模块开始运行"),this.config.enabled&&(this.removePKNode(),this.removePKToast())}}m(Pe,"runOnMultiplePages",!0);class Ee extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeLiveWaterMark)}async run(){this.logger.log("移除直播间水印模块开始运行"),this.config.enabled&&h(".web-player-icon-roomStatus { display: none !important }")}}m(Ee,"runOnMultiplePages",!0);class Re extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeShopPopover)}async run(){this.logger.log("移除直播间小黄车弹窗模块开始运行"),this.config.enabled&&h(".shop-popover { display: none !important }")}}m(Re,"runOnMultiplePages",!0);class Me extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeGameParty)}async run(){this.logger.log("移除直播间幻星派对标志模块开始运行"),this.config.enabled&&h("#game-id { display: none !important }")}}m(Me,"runMultiple",!0);class Be extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeGiftPopover)}async run(){this.logger.log("移除礼物赠送提示弹窗模块开始运行"),this.config.enabled&&h(".function-card { display: none !important }")}}m(Be,"runOnMultiplePages",!0);class De extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeMicPopover)}async run(){this.logger.log("移除连麦状态提示模块开始运行"),this.config.enabled&&h(".lin-mic-cntr { display: none !important }")}}m(De,"runOnMultiplePages",!0);class Ie extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeComboCard)}async run(){this.logger.log("移除直播间相同弹幕连续提示模块开始运行"),this.config.enabled&&h("#combo-card { display: none !important }")}}m(Ie,"runOnMultiplePages",!0);class Le extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeRank)}async run(){this.logger.log("移除排行榜模块开始运行"),this.config.enabled&&h(".popular-and-hot-rank { display: none !important }")}}m(Le,"runOnMultiplePages",!0);class Oe extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeGiftPlanet)}async run(){this.logger.log("移除礼物星球模块开始运行"),this.config.enabled&&h(".gift-planet-entry { display: none !important }")}}m(Oe,"runOnMultiplePages",!0);class $e extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeActivityBanner)}async run(){this.logger.log("移除活动入口模块开始运行"),this.config.enabled&&h(".activity-gather-entry .task-box:nth-child(1) { display: none !important }")}}m($e,"runOnMultiplePages",!0);class Ae extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removePKBanner)}async run(){this.logger.log("移除大乱斗入口模块开始运行"),this.config.enabled&&h(".activity-gather-entry .task-box:nth-child(2) { display: none !important }")}}m(Ae,"runOnMultiplePages",!0);class Ue extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeFlipView)}async run(){this.logger.log("移除礼物栏下方广告模块开始运行"),this.config.enabled&&h(".flip-view { display: none !important }")}}m(Ue,"runOnMultiplePages",!0);class je extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeRecommendRoom)}async run(){this.logger.log("移除礼物栏下方推荐直播间模块开始运行"),this.config.enabled&&h(".room-info-ctnr { display: none !important }")}}m(je,"runOnMultiplePages",!0);class He extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeLiveMosaic)}async run(){this.logger.log("移除直播间马赛克模块开始运行"),this.config.enabled&&h("#web-player-module-area-mask-panel { opacity: 0 !important }")}}m(He,"runOnMultiplePages",!0);const Fe=Object.freeze(Object.defineProperty({__proto__:null,DailyTask_LiveTask_DanmuTask:class extends H{constructor(){super(...arguments),m(this,"medalTasksConfig",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks),m(this,"config",this.medalTasksConfig.danmu)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.medalTasks.danmu=e}getRoomidList(){const e=C();return e.filteredFansMedals?e.filteredFansMedals.filter((e=>(!!this.config.includeHighLevelMedals||e.medal.level<20)&&910884!=e.room_info.room_id&&(this.medalTasksConfig.isWhiteList?this.medalTasksConfig.roomidList.includes(e.room_info.room_id):!this.medalTasksConfig.roomidList.includes(e.room_info.room_id)))).map((e=>e.room_info.room_id)).slice(0,199):(this.status="error",null)}async sendDanmu(e,t){try{const o=await O.sendMsg(e,t);this.logger.log(`BAPI.live.sendMsg(${e}, ${t})`,o),0===o.code?this.logger.log(`在直播间 ${t} 发送弹幕 ${e} 成功`):this.logger.error(`在直播间 ${t} 发送弹幕 ${e} 失败`,o.message)}catch(o){this.logger.error(`在直播间 ${t} 发送弹幕 ${e} 出错`,o)}}async run(){if(this.logger.log("发送弹幕模块开始运行"),this.config.enabled)if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的发送弹幕任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过发送弹幕任务了"),this.status="done");else{this.status="running";const e=this.getRoomidList();if(e){const t=this.config.list;for(let o=0;othis.run()),e.ms),this.logger.log("距离发送弹幕模块下次运行时间:",e.str)}},DailyTask_LiveTask_LikeTask:class extends H{constructor(){super(...arguments),m(this,"medalTasksConfig",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks),m(this,"config",this.medalTasksConfig.like)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.medalTasks.like=e}getRoomidUidList(){const e=C();return e.filteredFansMedals?e.filteredFansMedals.filter((e=>e.medal.level<20&&(this.medalTasksConfig.isWhiteList?this.medalTasksConfig.roomidList.includes(e.room_info.room_id):!this.medalTasksConfig.roomidList.includes(e.room_info.room_id))&&1===e.room_info.living_status)).map((e=>[e.room_info.room_id,e.medal.target_id])).slice(0,199):(this.status="error",null)}async like(e,t,o){try{const i=await O.likeReport(e,t,o);this.logger.log(`BAPI.live.likeReport(${e}, ${t}, ${o})`,i),0===i.code?this.logger.log(`给主播点赞 房间号 = ${e} 主播UID = ${t} 点赞次数 = ${o} 成功`):this.logger.error(`给主播点赞 房间号 = ${e} 主播UID = ${t} 点赞次数 = ${o} 失败`,i.message)}catch(i){this.logger.error(`给主播点赞 房间号 = ${e} 主播UID = ${t} 点赞次数 = ${o} 出错`,i)}}async run(){if(this.logger.log("给主播点赞模块开始运行"),this.config.enabled)if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的给主播点赞任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过给主播点赞任务了"),this.status="done");else{this.status="running";const e=this.getRoomidUidList();if(e){for(const[t,i]of e)await this.like(t,i,o.random(50,55)),await S(2e3);this.config._lastCompleteTime=I(),this.status="done",this.logger.log("给主播点赞任务已完成")}}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离给主播点赞模块下次运行时间:",e.str)}},DailyTask_LiveTask_SignTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.sign)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.sign=e}async getSignInfo(){try{const e=await O.getSignInfo();return this.logger.log("BAPI.live.getSignInfo response",e),0===e.code?e.data:(this.logger.error("获取直播签到信息失败",e.message),null)}catch(e){return this.logger.error("获取直播签到信息出错",e),null}}async sign(){try{const e=await O.doSign();if(this.logger.log("BAPI.live.doSign response",e),0===e.code){this.logger.log("直播签到成功,获得奖励:",e.data.text),this.config._lastCompleteTime=I(),this.status="done",this.logger.log("直播签到任务已完成");const t=z(".checkin-btn");t&&t.remove()}else this.logger.error("直播签到失败",e.message),this.status="error"}catch(e){this.logger.error("执行直播签到任务出错",e),this.status="error"}}async run(){if(this.logger.log("直播签到模块开始运行"),this.config.enabled)if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的直播签到任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过直播签到任务了"),this.status="done");else{this.status="running";const e=await this.getSignInfo();e?0===e.status?await this.sign():(this.config._lastCompleteTime=I(),this.status="done"):await this.sign()}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离直播签到模块下次运行时间:",e.str)}},DailyTask_LiveTask_WatchTask:J,DailyTask_MainSiteTask_CoinTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.coin),m(this,"MAX_COIN",1)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.coin=e}getDynamicVideoIds(){const e=C();return e.dynamicVideos?e.dynamicVideos.map((e=>{const t=e.modules.module_dynamic.major.archive;return{aid:t.aid,bvid:t.bvid}})):(this.status="error",null)}async getVideoCoinInfo(e,t){try{const o=await A.videoRelation(e,t);return this.logger.log(`BAPI.main.videoRelation(${e}, ${t}) response`,o),0===o.code?o.data.coin:(this.logger.error(`获取视频投币信息失败 aid = ${e} bvid = ${t}`,o.message),0)}catch(o){return this.logger.error(`获取视频投币信息出错 aid = ${e} bvid = ${t}`,o),0}}async coinDynamicVideos(e){const t=this.getDynamicVideoIds();if(t)for(const{aid:o,bvid:i}of t){const t=await this.getVideoCoinInfo(o,i),n=this.MAX_COIN-t;if(n>0){const t=Math.min(n,e),i=await this.coin(o,t);if(0===i){if(0===(e-=t)){this.logger.log("每日投币任务已完成"),this.config._lastCompleteTime=I(),this.status="done";break}}else if(1===i){this.status="error";break}}}}async coin(e,t){try{const o=await A.coinAdd(e,t);return this.logger.log(`BAPI.main.coinAdd(${e}) response`,o),0===o.code?(this.logger.log(`投币成功 视频aid = ${e} 投币数量num = ${t}`),0):-104===o.code?(this.logger.warn("硬币余额不足,每日投币任务终止"),1):(this.logger.error(`投币失败 视频aid = ${e} 投币数量num = ${t}`,o.message),2)}catch(o){return this.logger.error(`投币出错 视频aid = ${e} 投币数量num = ${t}`,o),3}}async run(){if(this.logger.log("每日投币模块开始运行"),this.config.enabled){const e=C();if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的每日投币任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日投币任务了"),this.status="done");else if(this.status="running",e.dailyRewardInfo){const t=e.dailyRewardInfo.coins/10;if(t(C().userInfo.money??5)?(this.logger.log("硬币余额不足,不执行每日投币任务"),this.status="done"):await this.coinDynamicVideos(e)}else this.config._lastCompleteTime=I(),this.status="done",this.logger.log("每日投币任务已完成")}}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日投币模块下次运行时间:",e.str)}},DailyTask_MainSiteTask_LoginTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.login)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.login=e}async login(){return this.logger.log("每日登录任务已完成"),this.config._lastCompleteTime=I(),this.status="done",Promise.resolve()}async run(){if(this.logger.log("每日登录模块开始运行"),this.config.enabled){const e=C();R(this.config._lastCompleteTime)?B(0,0,0,5)?this.logger.log("昨天的每日登录任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日登录任务了"),this.status="done"):(this.status="running",e.dailyRewardInfo&&!e.dailyRewardInfo.login?await this.login():(this.config._lastCompleteTime=I(),this.status="done"))}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日登录模块下次运行时间:",e.str)}},DailyTask_MainSiteTask_ShareTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.share)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.share=e}getAid(){const e=C();return e.dynamicVideos?e.dynamicVideos[0].modules.module_dynamic.major.archive.aid:"2"}async share(e){try{const t=await A.share(e);this.logger.log(`BAPI.main.share(${e}) response`,t),0===t.code||71e3===t.code?(this.logger.log("每日分享视频任务已完成"),this.config._lastCompleteTime=I(),this.status="done"):(this.logger.error("分享视频失败",t.message),this.status="error")}catch(e){this.logger.error("执行每日分享视频任务出错",e),this.status="error"}}async run(){if(this.logger.log("每日分享视频模块开始运行"),this.config.enabled){const e=C();if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的每日分享任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日分享任务了"),this.status="done");else if(this.status="running",e.dailyRewardInfo&&!e.dailyRewardInfo.share){const e=this.getAid();await this.share(e)}else this.config._lastCompleteTime=I(),this.status="done",this.logger.log("每日分享视频任务已完成")}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日分享视频模块下次运行时间:",e.str)}},DailyTask_MainSiteTask_WatchTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.watch)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.watch=e}getAid(){const e=C();return o.isEmpty(e.dynamicVideos)?"2":e.dynamicVideos[0].modules.module_dynamic.major.archive.aid}async watch(e){try{const t=await A.videoHeartbeat(e);this.logger.log(`BAPI.main.videoHeartbeat(${e}) response`,t),0===t.code?(this.logger.log("每日观看视频任务已完成"),this.config._lastCompleteTime=I(),this.status="done"):(this.logger.error("发送观看视频心跳失败",t.message),this.status="error")}catch(e){this.logger.error("执行每日观看视频任务出错",e),this.status="error"}}async run(){if(this.logger.log("每日观看视频模块开始运行"),this.config.enabled){const e=C();if(R(this.config._lastCompleteTime))B(0,0,0,5)?this.logger.log("昨天的每日观看视频任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日观看视频任务了"),this.status="done");else if(this.status="running",e.dailyRewardInfo&&!e.dailyRewardInfo.watch){const e=this.getAid();await this.watch(e)}else this.config._lastCompleteTime=I(),this.status="done",this.logger.log("每日观看视频任务已完成")}const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日观看视频模块下次运行时间:",e.str)}},DailyTask_OtherTask_CoinToSilverTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.coinToSilver)}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.coinToSilver=e}async exchange(){try{const e=await O.coin2silver(this.config.num);this.logger.log(`BAPI.live.coin2silver{${this.config.num}} response`,e),0===e.code?(this.logger.log("硬币换银瓜子已完成,获得银瓜子:",e.data.silver),this.config._lastCompleteTime=I(),this.status="done"):(this.logger.error("硬币换银瓜子失败",e.message),this.status="error")}catch(e){this.logger.error("硬币换银瓜子出错",e),this.status="error"}}async run(){this.logger.log("硬币换银瓜子模块开始运行"),this.config.enabled&&(R(this.config._lastCompleteTime)?B(0,0,0,5)?this.logger.log("昨天的硬币换银瓜子任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过硬币换银瓜子任务了"),this.status="done"):(this.status="running",await this.exchange()));const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("硬币换银瓜子模块下次运行时间:",e.str)}},DailyTask_OtherTask_GetYearVipPrivilegeTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.getYearVipPrivilege),m(this,"type2Name",{1:"年度专享B币赠送",2:"年度专享会员购优惠券",3:"年度专享漫画礼包 - 漫画福利券",4:"大会员专享会员购包邮券",5:"年度专享漫画礼包 - 漫画商城优惠券",6:"大会员专享会员体验卡",7:"大会员专享课堂优惠券"})}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.getYearVipPrivilege=e}async myPrivilege(){try{const e=await A.vip.myPrivilege();if(this.logger.log("BAPI.main.vip.myPrivilege response",e),0===e.code)return e.data.list;this.logger.error("获取年度大会员权益信息失败",e.message),this.status="error"}catch(e){this.logger.error("获取年度大会员权益信息出错",e),this.status="error"}}async receivePrivilege(e){try{const t=await A.vip.receivePrivilege(e);this.logger.log(`BAPI.main.vip.receivePrivilege(${e}) response`,t),0===t.code?this.logger.log(`领取年度大会员权益(type = ${e}, ${this.type2Name[e]})成功`):this.logger.error(`领取年度大会员权益(type = ${e}, ${this.type2Name[e]})失败`,t.message)}catch(t){this.logger.error(`领取年度大会员权益(type = ${e}, ${this.type2Name[e]})出错`,t)}}async addExperience(){try{const e=await A.vip.addExperience();this.logger.log("BAPI.main.vip.addExperience response",e),0===e.code?this.logger.log("领取年度大会员权益(type = 9,专属等级加速包(10主站经验))成功"):this.logger.error("领取年度大会员权益(type = 9,专属等级加速包(10主站经验))失败",e.message)}catch(e){this.logger.error("领取年度大会员权益(type = 9,专属等级加速包(10主站经验))出错",e)}}isYearVip(){const e=C().userInfo;return!(!e||1!==e.vip.status||2!==e.vip.type)||(this.logger.log("当前账号不是年度大会员,不领取权益"),!1)}async run(){if(this.logger.log("领取年度大会员权益模块开始运行"),this.config.enabled){if(this.isYearVip()){if(D()>=this.config._nextReceiveTime){this.status="running";const t=await this.myPrivilege();if(t){for(const o of t)if(8!==o.type&&14!==o.type){if(0===o.state)9===o.type?await this.addExperience():await this.receivePrivilege(o.type);else if(1===o.state)this.logger.log(`该权益(type = ${o.type})已经领取过了`);else if(9===o.type){const t=this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.watch;t.enabled?e.watch((()=>t._lastCompleteTime),(()=>this.addExperience()),{once:!0}):this.logger.warn("领取专属等级加速包(10主站经验)前需要观看任意一个视频,请打开【主站任务】中的【每日观看视频】,或是在运行脚本前手动观看")}await S(200)}this.status="done",this.config._nextReceiveTime=Math.min(...t.map((e=>e.period_end_unix)))}}const t=this.config._nextReceiveTime-D();t<86400?(this.logger.log("领取年度大会员权益模块下次运行时间:",n.DateTime.fromSeconds(this.config._nextReceiveTime).toJSDate()),setTimeout((()=>this.run()),1e3*t)):this.logger.log("距离下次领取年度大会员权益的时间超过一天,不计划下次运行")}}else{const e=M(0);setTimeout((()=>this.run()),e.ms),this.logger.log("领取年度大会员权益模块下次运行时间:",e.str)}}},DailyTask_OtherTask_GroupSignTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.groupSign)}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.groupSign=e}async getGroupidOwneruidList(){try{const e=await U.myGroups();if(this.logger.log("BAPI.vc.myGroups response",e),0===e.code)return e.data.list.map((e=>[e.group_id,e.owner_uid]));this.logger.error("获取应援团信息失败",e.message),this.status="error"}catch(e){this.logger.error("获取应援团信息出错",e),this.status="error"}}async sign(e,t){try{const o=await U.signIn(e,t);this.logger.log(`BAPI.vc.signIn(${e}, ${t}) response`,o),0===o.code?this.logger.log(`应援团签到 应援团ID = ${e} 拥有者UID = ${t} 成功, 粉丝勋章亲密度+${o.data.add_num}`):this.logger.error(`应援团签到 应援团ID = ${e} 拥有者UID = ${t} 失败`,o.message)}catch(o){this.logger.error(`应援团签到 应援团ID = ${e} 拥有者UID = ${t} 出错`,o)}}async run(){if(this.logger.log("应援团签到模块开始运行"),this.config.enabled)if(R(this.config._lastCompleteTime,8,5))B(0,0,8,5)?this.logger.log("昨天的应援团签到任务已经完成过了,等到今天早上八点零五分再次执行"):(this.logger.log("今天已经完成过应援团签到任务了"),this.status="done");else{this.status="running";const e=await this.getGroupidOwneruidList();if(e){for(const[t,o]of e)await this.sign(t,o),await S(2e3);this.config._lastCompleteTime=I(),this.logger.log("应援团签到任务已完成"),this.status="done"}}const e=M(8,5);setTimeout((()=>this.run()),e.ms),this.logger.log("距离应援团签到模块下次运行时间:",e.str)}},DailyTask_OtherTask_SilverToCoinTask:class extends H{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.silverToCoin)}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.silverToCoin=e}async exchange(){try{const e=await O.silver2coin();this.logger.log("BAPI.live.silver2coin response",e),0===e.code?(this.logger.log("银瓜子换硬币已完成,获得硬币:",e.data.coin),this.config._lastCompleteTime=I(),this.status="done"):403===e.code?(this.logger.log("每天最多只能用银瓜子兑换1个硬币"),this.config._lastCompleteTime=I(),this.status="done"):(this.logger.error("银瓜子换硬币失败",e.message),this.status="error")}catch(e){this.logger.error("银瓜子换硬币出错",e),this.status="error"}}run(){this.logger.log("银瓜子换硬币模块开始运行"),this.config.enabled&&(R(this.config._lastCompleteTime)?B(0,0,0,5)?this.logger.log("昨天的银瓜子换硬币任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过银瓜子换硬币任务了"),this.status="done"):(this.status="running",this.exchange()));const e=M();setTimeout((()=>this.run()),e.ms),this.logger.log("银瓜子换硬币模块下次运行时间:",e.str)}},EnhanceExperience_BanP2P:Y,EnhanceExperience_Invisibility:Se,EnhanceExperience_NoReport:Ce,EnhanceExperience_NoSleep:Ve,EnhanceExperience_ShowContributionUserNum:Ne,EnhanceExperience_SwitchLiveStreamQuality:Q,RemoveElement_RemoveActivityBanner:$e,RemoveElement_RemoveComboCard:Ie,RemoveElement_RemoveFlipView:Ue,RemoveElement_RemoveGameParty:Me,RemoveElement_RemoveGiftPlanet:Oe,RemoveElement_RemoveGiftPopover:Be,RemoveElement_RemoveLiveMosaic:He,RemoveElement_RemoveLiveWaterMark:Ee,RemoveElement_RemoveMicPopover:De,RemoveElement_RemovePKBanner:Ae,RemoveElement_RemovePKBox:Pe,RemoveElement_RemoveRank:Le,RemoveElement_RemoveRecommendRoom:je,RemoveElement_RemoveShopPopover:Re},Symbol.toStringTag,{value:"Module"}));function Ge(e){const t={all:o=(o=e)||new Map,on:function(e,t){var i=o.get(e);i?i.push(t):o.set(e,[t])},off:function(e,t){var i=o.get(e);i&&(t?i.splice(i.indexOf(t)>>>0,1):o.set(e,[]))},emit:function(e,t){var i=o.get(e);i&&i.slice().map((function(e){e(t)})),(i=o.get("*"))&&i.slice().map((function(o){o(e,t)}))}};var o;return{...t,once(e,o){t.on(e,(function i(n){t.off(e,i),o(n)}))}}}const qe=t.defineStore("cache",(()=>{const t=e.reactive(y.getCache()),o=e.ref("Main");return e.watch(t,(e=>y.setCache(e))),{cache:t,currentScriptType:o,startMainBLTHAliveHeartBeat:function(){t.lastAliveHeartBeatTime=Date.now();const e=setInterval((()=>t.lastAliveHeartBeatTime=Date.now()),5e3);window.addEventListener("unload",(()=>{clearInterval(e),t.lastAliveHeartBeatTime=0}))},checkCurrentScriptType:function(){0!==t.lastAliveHeartBeatTime&&Date.now()-t.lastAliveHeartBeatTime<8e3?null===sessionStorage.getItem("main_blth_flag")?o.value="Other":o.value="SubMain":(o.value="Main",sessionStorage.setItem("main_blth_flag","🚩"))}}})),ze={DailyTasks:{MainSiteTasks:{login:"",watch:"",coin:"",share:""},LiveTasks:{sign:"",medalTasks:{danmu:"",like:"",watch:""}},OtherTasks:{groupSign:"",silverToCoin:"",coinToSilver:"",getYearVipPrivilege:""}}},Ke=[],We=t.defineStore("module",(()=>{const t=e.reactive(y.getModuleConfig()),i=Ge(),n=e.reactive(ze);return e.watch(t,o.debounce((e=>y.setModuleConfig(e)),250,{leading:!0,trailing:!0})),function e(){setTimeout((()=>{P(n,((e,t)=>{o.set(n,t,"")})),e()}),M(0,0).ms)}(),{moduleConfig:t,emitter:i,moduleStatus:n,loadModules:function(e){const t=qe(),o=new j("ModuleStore_LoadModules");if("unknown"===e)for(const[e,o]of Object.entries(Fe))("all"===o.onFrame||"top"===o.onFrame&&W())&&(o.runOnMultiplePages||"Other"!==t.currentScriptType)&&(o.runAfterDefault||(E(o.runAt).then((()=>new o(e).run())),Ke.push(e)));else{const e=function(){const e=qe(),t=[];for(const[o,i]of Object.entries(q))(i.runOnMultiplePages||"Other"!==e.currentScriptType)&&t.push(new i(o).run());return Promise.all(t)}();for(const[i,n]of Object.entries(Fe))("target"===n.onFrame||"top"===n.onFrame&&W()&&!Ke.includes(i)||"all"===n.onFrame&&!Ke.includes(i))&&(n.runOnMultiplePages||"Other"!==t.currentScriptType)&&E(n.runAt).then((async()=>{try{n.runAfterDefault&&await e,new n(i).run()}catch(e){o.error(`运行默认模块时出错,模块 ${i} 不运行:`,e)}}))}}}})),Xe=e.defineComponent({__name:"MainSiteTasks",setup(t){const o=We(),i=o.moduleConfig.DailyTasks.MainSiteTasks,n=o.moduleStatus.DailyTasks.MainSiteTasks;return(t,o)=>{const a=e.resolveComponent("el-switch"),s=e.resolveComponent("Info"),r=e.resolveComponent("TaskStatus"),l=e.resolveComponent("el-space"),c=e.resolveComponent("el-row"),d=e.resolveComponent("el-option"),u=e.resolveComponent("el-select"),m=e.resolveComponent("el-text"),h=e.resolveComponent("el-divider"),g=e.resolveComponent("el-link");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).login.enabled,"onUpdate:modelValue":o[0]||(o[0]=t=>e.unref(i).login.enabled=t),"active-text":"每日登录"},null,8,["modelValue"]),e.createVNode(s,{id:"DailyTasks.MainSiteTasks.login"}),e.createVNode(r,{status:e.unref(n).login},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).watch.enabled,"onUpdate:modelValue":o[1]||(o[1]=t=>e.unref(i).watch.enabled=t),"active-text":"每日观看视频"},null,8,["modelValue"]),e.createVNode(s,{id:"DailyTasks.MainSiteTasks.watch"}),e.createVNode(r,{status:e.unref(n).watch},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).coin.enabled,"onUpdate:modelValue":o[2]||(o[2]=t=>e.unref(i).coin.enabled=t),"active-text":"每日投币"},null,8,["modelValue"]),e.createVNode(u,{modelValue:e.unref(i).coin.num,"onUpdate:modelValue":o[3]||(o[3]=t=>e.unref(i).coin.num=t),placeholder:"Select",style:{width:"64px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,(t=>e.createVNode(d,{key:t,label:t,value:t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("个")])),_:1}),e.createVNode(s,{id:"DailyTasks.MainSiteTasks.coin"}),e.createVNode(r,{status:e.unref(n).coin},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).share.enabled,"onUpdate:modelValue":o[4]||(o[4]=t=>e.unref(i).share.enabled=t),"active-text":"每日分享视频"},null,8,["modelValue"]),e.createVNode(s,{id:"DailyTasks.MainSiteTasks.share"}),e.createVNode(r,{status:e.unref(n).share},null,8,["status"])])),_:1})])),_:1}),e.createVNode(h),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(m,null,{default:e.withCtx((()=>[e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("  主站每日任务的完成情况可在")])),_:1}),e.createVNode(g,{rel:"noreferrer",type:"primary",href:"https://account.bilibili.com/account/home",target:"_blank",style:{"vertical-align":"unset"}},{default:e.withCtx((()=>[e.createTextVNode("个人中心")])),_:1}),e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("查看。")])),_:1}),e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("数据更新可能有一定的延时。")])),_:1})])),_:1})])),_:1})])}}}),Je=(t=>(e.pushScopeId("data-v-268e1b13"),t=t(),e.popScopeId(),t))((()=>e.createElementVNode("br",null,null,-1))),Qe={class:"avatar-wrap"},Ye=b(e.defineComponent({__name:"LiveTasks",setup(t){const o=We(),n=C(),a=o.moduleConfig.DailyTasks.LiveTasks,r=o.moduleStatus.DailyTasks.LiveTasks,l=e.ref(!1),c=e.computed((()=>a.medalTasks.danmu.list.map((e=>({content:e}))))),d=()=>{s.ElMessageBox.prompt("请输入新增的弹幕内容","新增弹幕",{confirmButtonText:"确认",cancelButtonText:"取消",inputPattern:/^.{1,30}$/,inputErrorMessage:"弹幕内容不得为空且长度不能超过30",lockScroll:!1}).then((({value:e})=>{a.medalTasks.danmu.list.push(e)})).catch((()=>{}))},u=e.ref(!1),m=e.computed((()=>{var e;return null==(e=n.filteredFansMedals)?void 0:e.map((e=>({avatar:e.anchor_info.avatar,nick_name:e.anchor_info.nick_name,medal_name:e.medal.medal_name,medal_level:e.medal.level,roomid:e.room_info.room_id})))})),h=e.ref(!1);let g=!0;const f=async()=>{u.value=!0,g&&(g=!1,await e.nextTick(),n.fansMedals?v(m.value):(h.value=!0,e.watch(m,(e=>{v(e),h.value=!1}),{once:!0}),o.emitter.emit("Default_FansMedals",{module:"LiveTasks"})))},p=e.ref(),v=e=>{e&&a.medalTasks.roomidList.forEach(((t,o)=>{var i;const n=e.find((e=>e.roomid===t));n?null==(i=p.value)||i.toggleRowSelection(n,!0):a.medalTasks.roomidList.splice(o,1)}))};function w(e){a.medalTasks.roomidList=e.map((e=>e.roomid))}function y(e,t,o){var i;o.target.className.startsWith("el-link")||null==(i=p.value)||i.toggleRowSelection(e,void 0)}return(t,o)=>{const n=e.resolveComponent("el-switch"),g=e.resolveComponent("Info"),v=e.resolveComponent("TaskStatus"),_=e.resolveComponent("el-space"),x=e.resolveComponent("el-row"),b=e.resolveComponent("el-divider"),k=e.resolveComponent("el-button"),T=e.resolveComponent("SemiSelect"),C=e.resolveComponent("el-icon"),V=e.resolveComponent("el-option"),S=e.resolveComponent("el-select"),N=e.resolveComponent("el-text"),P=e.resolveComponent("el-link"),E=e.resolveComponent("el-table-column"),R=e.resolveComponent("el-dialog"),M=e.resolveComponent("el-image"),B=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(_,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).sign.enabled,"onUpdate:modelValue":o[0]||(o[0]=t=>e.unref(a).sign.enabled=t),"active-text":"直播签到"},null,8,["modelValue"]),e.createVNode(g,{id:"DailyTasks.LiveTasks.sign"}),e.createVNode(v,{status:e.unref(r).sign},null,8,["status"])])),_:1})])),_:1}),e.createVNode(b),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(_,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.like.enabled,"onUpdate:modelValue":o[1]||(o[1]=t=>e.unref(a).medalTasks.like.enabled=t),"active-text":"给主播点赞"},null,8,["modelValue"]),e.createVNode(g,{id:"DailyTasks.LiveTasks.medalTasks.like"}),e.createVNode(v,{status:e.unref(r).medalTasks.like},null,8,["status"])])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(_,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.danmu.enabled,"onUpdate:modelValue":o[2]||(o[2]=t=>e.unref(a).medalTasks.danmu.enabled=t),"active-text":"发送弹幕"},null,8,["modelValue"]),e.createVNode(k,{type:"primary",size:"small",icon:e.unref(i.Edit),onClick:o[3]||(o[3]=e=>l.value=!l.value)},{default:e.withCtx((()=>[e.createTextVNode("编辑弹幕")])),_:1},8,["icon"]),e.createVNode(g,{id:"DailyTasks.LiveTasks.medalTasks.danmu"}),e.createVNode(v,{status:e.unref(r).medalTasks.danmu},null,8,["status"])])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(_,{wrap:""},{default:e.withCtx((()=>[e.createVNode(C,null,{default:e.withCtx((()=>[e.createVNode(T)])),_:1}),e.createVNode(n,{modelValue:e.unref(a).medalTasks.danmu.includeHighLevelMedals,"onUpdate:modelValue":o[4]||(o[4]=t=>e.unref(a).medalTasks.danmu.includeHighLevelMedals=t),"active-text":"包含等级≥20的粉丝勋章"},null,8,["modelValue"])])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(_,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.watch.enabled,"onUpdate:modelValue":o[5]||(o[5]=t=>e.unref(a).medalTasks.watch.enabled=t),"active-text":"观看直播"},null,8,["modelValue"]),e.createVNode(S,{modelValue:e.unref(a).medalTasks.watch.time,"onUpdate:modelValue":o[6]||(o[6]=t=>e.unref(a).medalTasks.watch.time=t),placeholder:"Select",style:{width:"70px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(24,(t=>e.createVNode(V,{key:t,label:5*t,value:5*t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(N,null,{default:e.withCtx((()=>[e.createTextVNode("分钟")])),_:1}),e.createVNode(g,{id:"DailyTasks.LiveTasks.medalTasks.watch"}),e.createVNode(v,{status:e.unref(r).medalTasks.watch},null,8,["status"])])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(_,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.isWhiteList,"onUpdate:modelValue":o[7]||(o[7]=t=>e.unref(a).medalTasks.isWhiteList=t),"active-text":"白名单","inactive-text":"黑名单"},null,8,["modelValue"]),e.createVNode(k,{type:"primary",size:"small",icon:e.unref(i.Edit),onClick:f},{default:e.withCtx((()=>[e.createTextVNode("编辑名单")])),_:1},8,["icon"]),e.createVNode(g,{id:"DailyTasks.LiveTasks.medalTasks.list"})])),_:1})])),_:1}),e.createVNode(b),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(N,null,{default:e.withCtx((()=>[e.createTextVNode("直播任务相关信息可在")])),_:1}),e.createVNode(P,{rel:"noreferrer",type:"primary",href:"https://link.bilibili.com/p/help/index#/audience-fans-medal",target:"_blank"},{default:e.withCtx((()=>[e.createTextVNode("帮助中心")])),_:1}),e.createVNode(N,null,{default:e.withCtx((()=>[e.createTextVNode("查看。")])),_:1})])),_:1}),Je,e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(N,{tag:"b"},{default:e.withCtx((()=>[e.createTextVNode("注意:")])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(N,null,{default:e.withCtx((()=>[e.createTextVNode("  由于每天能通过完成任务获得亲密度的粉丝勋章数量有限,脚本默认仅为最多199个等级小于20的粉丝勋章完成给主播点赞,发送弹幕,观看直播任务。在脚本执行任务期间观看未执行任务的粉丝勋章对应直播间直播可能导致今天无法获取任何亲密度。")])),_:1})])),_:1}),e.createVNode(R,{modelValue:l.value,"onUpdate:modelValue":o[8]||(o[8]=e=>l.value=e),title:"编辑弹幕内容","lock-scroll":!1,width:"40%"},{footer:e.withCtx((()=>[e.createVNode(k,{type:"primary",onClick:d},{default:e.withCtx((()=>[e.createTextVNode("新增弹幕")])),_:1})])),default:e.withCtx((()=>[e.createVNode(e.unref(s.ElTable),{data:c.value,"max-height":"500"},{default:e.withCtx((()=>[e.createVNode(E,{type:"index",width:"50"}),e.createVNode(E,{prop:"content",label:"弹幕内容"}),e.createVNode(E,{label:"操作",width:"220",align:"center"},{default:e.withCtx((t=>[e.createVNode(k,{text:"",icon:e.unref(i.Edit),onClick:e=>{return o=t.$index,i=t.row,void s.ElMessageBox.prompt("请输入新的弹幕内容","修改弹幕",{confirmButtonText:"确认",cancelButtonText:"取消",inputPattern:/^.{1,30}$/,inputErrorMessage:"弹幕内容不得为空且长度不能超过30",inputValue:i.content,lockScroll:!1}).then((({value:e})=>{a.medalTasks.danmu.list[o]=e})).catch((()=>{}));var o,i}},{default:e.withCtx((()=>[e.createTextVNode(" 修改 ")])),_:2},1032,["icon","onClick"]),e.createVNode(k,{text:"",icon:e.unref(i.Delete),type:"danger",onClick:e=>{return o=t.$index,void(1!==a.medalTasks.danmu.list.length?a.medalTasks.danmu.list.splice(o,1):s.ElMessage.warning({message:"至少要有一条弹幕",appendTo:".el-dialog"}));var o}},{default:e.withCtx((()=>[e.createTextVNode(" 删除 ")])),_:2},1032,["icon","onClick"])])),_:1})])),_:1},8,["data"])])),_:1},8,["modelValue"]),e.createVNode(R,{modelValue:u.value,"onUpdate:modelValue":o[9]||(o[9]=e=>u.value=e),title:"编辑粉丝勋章名单","lock-scroll":!1,width:"40%"},{default:e.withCtx((()=>[e.withDirectives((e.openBlock(),e.createBlock(e.unref(s.ElTable),{ref_key:"medalInfoTableRef",ref:p,data:m.value,"max-height":"500","empty-text":"没有粉丝勋章",onSelectionChange:w,onRowClick:y},{default:e.withCtx((()=>[e.createVNode(E,{type:"selection",align:"center",width:"55"}),e.createVNode(E,{prop:"avatar",label:"头像",width:"100"},{default:e.withCtx((t=>[e.createElementVNode("div",Qe,[e.createVNode(M,{src:t.row.avatar,loading:"lazy",referrerpolicy:"origin",class:"avatar"},{error:e.withCtx((()=>[e.createVNode(M,{src:"//i0.hdslb.com/bfs/face/member/noface.jpg",referrerpolicy:"origin",class:"avatar"})])),_:2},1032,["src"])])])),_:1}),e.createVNode(E,{prop:"nick_name",label:"昵称"}),e.createVNode(E,{prop:"medal_name",label:"粉丝勋章"}),e.createVNode(E,{prop:"medal_level",label:"等级",width:"80",sortable:""}),e.createVNode(E,{prop:"roomid",label:"房间号"},{default:e.withCtx((t=>[e.createVNode(P,{href:"https://live.bilibili.com/"+t.row.roomid+"?visit_id=",rel:"noreferrer",type:"primary",target:"_blank"},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.row.roomid),1)])),_:2},1032,["href"])])),_:1})])),_:1},8,["data"])),[[B,h.value]])])),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-268e1b13"]]),Ze=e.defineComponent({__name:"OtherTasks",setup(t){const o=We(),i=o.moduleConfig.DailyTasks.OtherTasks,n=o.moduleStatus.DailyTasks.OtherTasks;return(t,o)=>{const a=e.resolveComponent("el-switch"),s=e.resolveComponent("Info"),r=e.resolveComponent("TaskStatus"),l=e.resolveComponent("el-space"),c=e.resolveComponent("el-row"),d=e.resolveComponent("el-text"),u=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),h=e.resolveComponent("el-divider");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).groupSign.enabled,"onUpdate:modelValue":o[0]||(o[0]=t=>e.unref(i).groupSign.enabled=t),"active-text":"应援团签到"},null,8,["modelValue"]),e.createVNode(s,{id:"DailyTasks.OtherTasks.groupSign"}),e.createVNode(r,{status:e.unref(n).groupSign},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).silverToCoin.enabled,"onUpdate:modelValue":o[1]||(o[1]=t=>e.unref(i).silverToCoin.enabled=t),"active-text":"银瓜子换硬币"},null,8,["modelValue"]),e.createVNode(s,{id:"DailyTasks.OtherTasks.silverToCoin"}),e.createVNode(r,{status:e.unref(n).silverToCoin},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).coinToSilver.enabled,"onUpdate:modelValue":o[2]||(o[2]=t=>e.unref(i).coinToSilver.enabled=t),"active-text":"硬币换银瓜子"},null,8,["modelValue"]),e.createVNode(d,null,{default:e.withCtx((()=>[e.createTextVNode("花费硬币")])),_:1}),e.createVNode(m,{modelValue:e.unref(i).coinToSilver.num,"onUpdate:modelValue":o[3]||(o[3]=t=>e.unref(i).coinToSilver.num=t),placeholder:"Select",style:{width:"64px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(50,(t=>e.createVNode(u,{key:t,label:t,value:t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(d,null,{default:e.withCtx((()=>[e.createTextVNode("个")])),_:1}),e.createVNode(s,{id:"DailyTasks.OtherTasks.coinToSilver"}),e.createVNode(r,{status:e.unref(n).coinToSilver},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).getYearVipPrivilege.enabled,"onUpdate:modelValue":o[4]||(o[4]=t=>e.unref(i).getYearVipPrivilege.enabled=t),"active-text":"领取年度大会员权益"},null,8,["modelValue"]),e.createVNode(s,{id:"DailyTasks.OtherTasks.getYearVipPrivilege"}),e.createVNode(r,{status:e.unref(n).getYearVipPrivilege},null,8,["status"])])),_:1})])),_:1}),e.createVNode(h)])}}}),et=e.defineComponent({__name:"EnhanceExperience",setup(t){const o=We().moduleConfig.EnhanceExperience,i=["原画","蓝光PRO","蓝光","超清PRO","超清","高清"];return(t,n)=>{const a=e.resolveComponent("el-switch"),s=e.resolveComponent("el-option"),r=e.resolveComponent("el-select"),l=e.resolveComponent("Info"),c=e.resolveComponent("el-space"),d=e.resolveComponent("el-row"),u=e.resolveComponent("el-divider");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).switchLiveStreamQuality.enabled,"onUpdate:modelValue":n[0]||(n[0]=t=>e.unref(o).switchLiveStreamQuality.enabled=t),"active-text":"自动切换画质"},null,8,["modelValue"]),e.createVNode(r,{modelValue:e.unref(o).switchLiveStreamQuality.qualityDesc,"onUpdate:modelValue":n[1]||(n[1]=t=>e.unref(o).switchLiveStreamQuality.qualityDesc=t),placeholder:"Select",style:{width:"110px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,(t=>e.createVNode(s,{key:t,label:t,value:t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(l,{id:"EnhanceExperience.switchLiveStreamQuality"})])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).banp2p.enabled,"onUpdate:modelValue":n[2]||(n[2]=t=>e.unref(o).banp2p.enabled=t),"active-text":"禁用P2P"},null,8,["modelValue"]),e.createVNode(l,{id:"EnhanceExperience.banp2p"})])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).noReport.enabled,"onUpdate:modelValue":n[3]||(n[3]=t=>e.unref(o).noReport.enabled=t),"active-text":"拦截日志数据上报"},null,8,["modelValue"]),e.createVNode(l,{id:"EnhanceExperience.noReport"})])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).noSleep.enabled,"onUpdate:modelValue":n[4]||(n[4]=t=>e.unref(o).noSleep.enabled=t),"active-text":"屏蔽挂机检测"},null,8,["modelValue"]),e.createVNode(l,{id:"EnhanceExperience.noSleep"})])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).invisibility.enabled,"onUpdate:modelValue":n[5]||(n[5]=t=>e.unref(o).invisibility.enabled=t),"active-text":"隐身入场"},null,8,["modelValue"]),e.createVNode(l,{id:"EnhanceExperience.invisibility"})])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).showContributionUserNum.enabled,"onUpdate:modelValue":n[6]||(n[6]=t=>e.unref(o).showContributionUserNum.enabled=t),"active-text":"显示高能用户数量"},null,8,["modelValue"]),e.createVNode(l,{id:"EnhanceExperience.showContributionUserNum"})])),_:1})])),_:1}),e.createVNode(u)])}}}),tt=e.defineComponent({__name:"RemoveElement",setup(t){const o=We().moduleConfig.RemoveElement;return(t,i)=>{const n=e.resolveComponent("el-switch"),a=e.resolveComponent("Info"),s=e.resolveComponent("el-space"),r=e.resolveComponent("el-row"),l=e.resolveComponent("el-divider");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removePKBox.enabled,"onUpdate:modelValue":i[0]||(i[0]=t=>e.unref(o).removePKBox.enabled=t),"active-text":"移除大乱斗元素"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removePKBox"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeLiveWaterMark.enabled,"onUpdate:modelValue":i[1]||(i[1]=t=>e.unref(o).removeLiveWaterMark.enabled=t),"active-text":"移除直播间水印"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeLiveWaterMark"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeShopPopover.enabled,"onUpdate:modelValue":i[2]||(i[2]=t=>e.unref(o).removeShopPopover.enabled=t),"active-text":"移除直播间小黄车弹窗"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeShopPopover"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeGameParty.enabled,"onUpdate:modelValue":i[3]||(i[3]=t=>e.unref(o).removeGameParty.enabled=t),"active-text":"移除直播间幻星派对标志"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeGameParty"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeGiftPopover.enabled,"onUpdate:modelValue":i[4]||(i[4]=t=>e.unref(o).removeGiftPopover.enabled=t),"active-text":"移除礼物赠送提示弹窗"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeGiftPopover"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeMicPopover.enabled,"onUpdate:modelValue":i[5]||(i[5]=t=>e.unref(o).removeMicPopover.enabled=t),"active-text":"移除连麦状态提示"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeMicPopover"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeComboCard.enabled,"onUpdate:modelValue":i[6]||(i[6]=t=>e.unref(o).removeComboCard.enabled=t),"active-text":"移除直播间相同弹幕连续提示"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeComboCard"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeRank.enabled,"onUpdate:modelValue":i[7]||(i[7]=t=>e.unref(o).removeRank.enabled=t),"active-text":"移除排行榜"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeRank"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeGiftPlanet.enabled,"onUpdate:modelValue":i[8]||(i[8]=t=>e.unref(o).removeGiftPlanet.enabled=t),"active-text":"移除礼物星球"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeGiftPlanet"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeActivityBanner.enabled,"onUpdate:modelValue":i[9]||(i[9]=t=>e.unref(o).removeActivityBanner.enabled=t),"active-text":"移除活动入口"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeActivityBanner"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removePKBanner.enabled,"onUpdate:modelValue":i[10]||(i[10]=t=>e.unref(o).removePKBanner.enabled=t),"active-text":"移除大乱斗入口"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removePKBanner"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeFlipView.enabled,"onUpdate:modelValue":i[11]||(i[11]=t=>e.unref(o).removeFlipView.enabled=t),"active-text":"移除礼物栏下方广告"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeFlipView"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeRecommendRoom.enabled,"onUpdate:modelValue":i[12]||(i[12]=t=>e.unref(o).removeRecommendRoom.enabled=t),"active-text":"移除礼物栏下方推荐直播间"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeRecommendRoom"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeLiveMosaic.enabled,"onUpdate:modelValue":i[13]||(i[13]=t=>e.unref(o).removeLiveMosaic.enabled=t),"active-text":"移除直播间马赛克"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeLiveMosaic"})])),_:1})])),_:1}),e.createVNode(l)])}}}),ot=e.defineComponent({components:{MainSiteTasks:Xe,LiveTasks:Ye,OtherTasks:Ze,EnhanceExperience:et,RemoveElement:tt}}),it=e.defineComponent({...ot,__name:"PanelMain",setup(t){const o=_();return(t,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).uiConfig.activeMenuIndex)))}}),nt=b(e.defineComponent({__name:"App",setup(t){const i=_(),n=new j("App.vue");let a,s,l=i.uiConfig.isShowPanel;function c(){const e=a.getBoundingClientRect();i.baseStyleValue.top=e.top+window.scrollY,i.baseStyleValue.left=e.left+window.scrollX,i.baseStyleValue.height=e.height,i.baseStyleValue.width=.4*e.width}i.uiConfig.isShowPanel=!1;const d=o.throttle((function(){i.changeShowPanel(),s.innerText=i.isShowPanelButtonText}),300);if(a=z("#live-player-ctnr"),a){c(),function(e,t,o=5e3){return new Promise(((i,n)=>{const a=e.querySelector(t);if(a)return void i(a);const s=new MutationObserver((()=>{const o=e.querySelector(t);o&&(clearTimeout(r),s.disconnect(),i(o))}));s.observe(e,{childList:!0,subtree:!0});const r=setTimeout((()=>{s.disconnect(),n(new Error(`无法在${o}毫秒内找到${e.localName}的子节点${t}`))}),o)}))}(z("#player-ctnr"),".left-ctnr.left-header-area",1e4).then((e=>{var t,o;s=K("button"),s.setAttribute("class","blth_btn"),s.onclick=d,s.innerText=i.isShowPanelButtonText,e.append(s),W()||r("alt+b",{element:null==(o=null==(t=v.top)?void 0:t.document)?void 0:o.documentElement},d),r("alt+b",d)})).catch((e=>n.error(e))),window.addEventListener("resize",(()=>c()));const e=new MutationObserver((()=>c()));e.observe(document.documentElement,{attributes:!0}),e.observe(document.body,{attributes:!0}),l&&(i.uiConfig.isShowPanel=!0)}else n.error("livePlayer not found");return(t,o)=>{const n=e.resolveComponent("el-header"),a=e.resolveComponent("el-aside"),s=e.resolveComponent("el-main"),r=e.resolveComponent("el-container"),l=e.resolveComponent("el-scrollbar"),c=e.resolveComponent("el-collapse-transition");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx((()=>[e.withDirectives(e.createVNode(r,{style:e.normalizeStyle(e.unref(i).baseStyle),class:"base"},{default:e.withCtx((()=>[e.createVNode(n,{class:"header"},{default:e.withCtx((()=>[e.createVNode(k)])),_:1}),e.createVNode(l,{height:e.unref(i).scrollBarHeight},{default:e.withCtx((()=>[e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(a,{class:"aside"},{default:e.withCtx((()=>[e.createVNode(T)])),_:1}),e.createVNode(s,{class:"main"},{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx((()=>[e.createVNode(it)])),_:1})],1024))])),_:1})])),_:1})])),_:1},8,["height"])])),_:1},8,["style"]),[[e.vShow,e.unref(i).uiConfig.isShowPanel]])])),_:1})}}}),[["__scopeId","data-v-3884f5fc"]]);(e=>{const t=GM_getResourceText(e);GM_addStyle(t)})("element-plus/dist/index.css");const at={},st={xmlns:"http://www.w3.org/2000/svg",width:"128",height:"128",class:"icon",viewBox:"0 0 1024 1024"},rt=[e.createElementVNode("path",{d:"M831.825 63.94H191.94c-70.692 0-128 57.308-128 128v639.885c0 70.692 57.308 128 128 128h639.885c70.692 0 128-57.308 128-128V191.94c0-70.692-57.308-128-128-128zM895.885 832a63.835 63.835 0 0 1-63.973 63.886H192.088c-17.112 0-33.27-6.575-45.372-18.676S127.88 849.112 127.88 832V192a64.236 64.236 0 0 1 64.208-64.12h639.824A64.038 64.038 0 0 1 895.885 192v640z"},null,-1),e.createElementVNode("path",{d:"M791.998 351.852H536a31.97 31.97 0 0 0 0 63.94h256a31.97 31.97 0 0 0 0-63.94zm0 256.121H536a31.97 31.97 0 0 0 0 63.94h256a31.97 31.97 0 0 0 0-63.94zm-447.996-79.975c-61.856 0-111.986 50.144-111.986 111.985S282.16 751.97 344.002 751.97s111.985-50.144 111.985-111.986-50.13-111.985-111.985-111.985zm33.982 145.982a48.045 48.045 0 1 1 14.088-33.982 47.746 47.746 0 0 1-14.088 33.986zm39.412-376.586L311.999 402.787l-41.391-41.395a31.97 31.97 0 1 0-45.213 45.213l63.997 64.002a31.97 31.97 0 0 0 45.214 0l128-128a31.97 31.97 0 0 0-45.21-45.213z"},null,-1)];const lt=b(at,[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",st,rt)}]]),ct={DailyTasks:{MainSiteTasks:{login:{title:"每日登录",message:"完成主站的每日登录任务。"},watch:{title:"每日观看视频",message:e.h("p",[e.h("div","完成主站的每日观看视频任务。"),e.h("div","从动态中选取视频观看,会产生观看历史记录。")])},coin:{title:"每日投币",message:e.h("p",[e.h("div","完成主站的每日投币任务。"),e.h("div","从动态中选取视频投币,会根据你今天已经投过的币的数量计算还要投几个币。")])},share:{title:"每日分享视频",message:e.h("p",[e.h("div","完成主站的每日分享视频任务。"),e.h("div","不会真的分享到某处。")])}},LiveTasks:{sign:{title:"直播签到",message:e.h("p",[e.h("div","完成直播签到任务。"),e.h("div","完成后会移除当前直播间右上角签到窗口中的签到按钮。")])},medalTasks:{list:{title:"黑白名单",message:e.h("p",[e.h("div","为更精细地控制为哪些粉丝勋章执行任务,你可以使用黑名单或白名单模式。"),e.h("div",[e.h("li",[e.h("span","黑名单:仅为"),e.h("strong","不在"),e.h("span","名单中的粉丝勋章执行任务。")]),e.h("li",[e.h("span","白名单:仅为"),e.h("strong","在"),e.h("span","名单中的粉丝勋章执行任务。")])]),e.h("div","点击编辑名单按钮,然后使用第一列的多选框即可编辑名单中的粉丝勋章。")])},like:{title:"给主播点赞",message:e.h("p",[e.h("div","在你的每个粉丝勋章对应的直播间给主播点赞。"),e.h("div",""),e.h("div",[e.h("li",[e.h("span","仅在开播的直播间点赞(经测试在不开播的直播间点赞不增加亲密度)。")]),e.h("li",[e.h("span","点赞次数为50~55次之间的随机值。")]),e.h("li",[e.h("span","部分直播间无法完成该任务,原因未知。")])])])},danmu:{title:"发送弹幕",message:e.h("p",[e.h("div","在你的每个粉丝勋章对应的直播间发送10条弹幕。"),e.h("div",[e.h("span","点击编辑弹幕按钮编辑发送的弹幕,脚本会从中按顺序循环抽取弹幕发送。"),e.h("span","如果有点亮高等级勋章的需求,请勾选“包含等级≥20的粉丝勋章”选项。"),e.h("span","部分直播间无法完成该任务,可能的原因有:"),e.h("li","你被禁言了"),e.h("li","发言有粉丝勋章等级要求"),e.h("li",[e.h("span","特殊直播间(比如"),e.h("a",{href:"https://live.bilibili.com/54",rel:"noreferrer",target:"_blank"},"54"),e.h("span",")")])])])},watch:{title:"观看直播",message:e.h("p",[e.h("div","完成观看持有粉丝勋章对应主播直播的任务。"),e.h("div","部分直播间因为没有设置直播分区导致任务无法完成。主播当前是否开播不会影响该任务的完成。目前该功能尚未适配新版粉丝勋章亲密度机制,会同时观看所有粉丝勋章的直播,但据测试粉丝勋章的亲密度是逐个增加的(即每20分钟获取完一个粉丝勋章的单日亲密度上限80)。")])}}},OtherTasks:{groupSign:{title:"应援团签到",message:"完成应援团签到任务。"},silverToCoin:{title:"银瓜子换硬币",message:e.h("p",[e.h("div","把银瓜子兑换为硬币。"),e.h("div","具体兑换规则请点击直播间页面的“立即充值→银瓜子商店”查看。")])},coinToSilver:{title:"硬币换银瓜子",message:e.h("p",[e.h("div","把硬币兑换为银瓜子。"),e.h("div","具体兑换规则请点击直播间页面的“立即充值→银瓜子商店”查看。")])},getYearVipPrivilege:{title:"领取年度大会员权益",message:e.h("p",[e.h("div","自动领取年度大会员权益。"),e.h("div",[e.h("span","具体权益请前往"),e.h("a",{href:"https://account.bilibili.com/account/big/myPackage",rel:"noreferrer",target:"_blank"},"卡券包"),e.h("span","查看。")])])}}},EnhanceExperience:{switchLiveStreamQuality:{title:"自动切换画质",message:e.h("p",[e.h("div","打开直播间后自动把播放器切换到指定画质。"),e.h("div","如果指定画质不存在,则还是使用B站的默认画质。")])},banp2p:{title:"禁用P2P",message:e.h("p",[e.h("div","禁用直播流的P2P上传/下载"),e.h("div","B站使用WebRTC技术把许多浏览器点对点(P2P)地连接起来,实现视频流和音频流的传输。这样做是为了减轻B站服务器的压力,但是会占用你一定的上行带宽(大约几百kb每秒)。如果你不想被占用上行带宽,可以开启该功能。若开启后发现观看直播时有明显卡顿,请关闭。")])},noReport:{title:"拦截日志数据上报",message:e.h("p",[e.h("div","禁止B站上报日志数据。"),e.h("div",[e.h("span","B站会实时地上报大量日志信息,比如直播观看情况、代码报错等等。开启本功能后绝大多数日志上报都会被拦截并返回一个成功的响应。如果追求更好的效果和性能表现建议使用带有广告拦截功能的浏览器拓展,比如"),e.h("a",{href:"https://github.com/gorhill/uBlock",rel:"noreferrer",target:"_blank"},"uBlock Origin"),e.h("span","。")])])},noSleep:{title:"屏蔽挂机检测",message:e.h("p",[e.h("div","屏蔽B站直播间的挂机检测。"),e.h("div","如果长时间没有操作,会提示“检测到您已离开当前屏幕,倒计时后即将暂停播放”。开启本功能后即可避免这种情况。")])},invisibility:{title:"隐身入场",message:e.h("p",[e.h("div","进入直播间时其他人不会收到提示,但还是会出现在高能用户榜单上。")])},showContributionUserNum:{title:"显示高能用户数量",message:e.h("p",[e.h("div","在高能用户标签上显示当前直播间的高能用户数量,每分钟更新一次数据。")])}},RemoveElement:{removePKBox:{title:"移除大乱斗元素",message:"移除直播间的大乱斗元素(进度条,弹出的提示等)。"},removeLiveWaterMark:{title:"移除直播间水印",message:"移除直播画面左上角的水印。"},removeShopPopover:{title:"移除直播间小黄车弹窗",message:"移除直播间左上角的小黄车弹窗。"},removeGameParty:{title:"移除直播间幻星派对标志",message:"移除直播间右下角的幻星派对标志。"},removeGiftPopover:{title:"移除礼物赠送提示弹窗",message:"移除直播间右下角的礼物赠送提示弹窗(赠送一个牛蛙牛蛙支持主播)。"},removeMicPopover:{title:"移除连麦状态提示",message:"移除直播间左上角的连麦提示弹窗(连线功能只能在手机端使用,快使用手机登录吧~)。"},removeComboCard:{title:"移除直播间相同弹幕连续提示",message:"移除直播间相同弹幕连续提示。"},removeRank:{title:"移除排行榜",message:"移除直播画面上方的人气榜/航海榜,赠送人气票的入口也在这里。"},removeGiftPlanet:{title:"移除礼物星球",message:"移除直播画面上方的礼物星球。"},removeActivityBanner:{title:"移除活动入口",message:"移除直播画面上方的活动入口,当前活动内容会滚动切换。"},removePKBanner:{title:"移除大乱斗入口",message:"移除直播画面上方的大乱斗入口,这里在有BLS的时候也会成为BLS的入口,和大乱斗的入口滚动切换。"},removeFlipView:{title:"移除礼物栏下方广告",message:"移除礼物栏下方广告。"},removeRecommendRoom:{title:"移除礼物栏下方推荐直播间",message:"移除礼物栏下方推荐直播间。"},removeLiveMosaic:{title:"移除直播间马赛克",message:"移除部分直播间特有的马赛克。"}}},dt=(t=>(e.pushScopeId("data-v-5cc8821e"),t=t(),e.popScopeId(),t))((()=>e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"128",height:"128",class:"icon",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"#276BC0",d:"M512.67 959.47c-246.343 0-446.76-200.632-446.76-447.24S266.326 64.98 512.67 64.98s446.76 200.642 446.76 447.25-200.416 447.24-446.76 447.24zm0-829.04c-210.291 0-381.38 171.283-381.38 381.8s171.089 381.79 381.38 381.79 381.381-171.273 381.381-381.79-171.09-381.8-381.38-381.8z"}),e.createElementVNode("path",{fill:"#276BC0",d:"M447.29 317.172a63.891 63.959 0 1 0 130.76 0 63.891 63.959 0 1 0-130.76 0Zm64.907 503.047c-30.093 0-54.235-24.416-54.235-54.541V482.062c0-30.126 24.142-54.541 54.235-54.541 30.094 0 54.236 24.416 54.236 54.541v283.616c0 30.125-24.142 54.54-54.236 54.54z"})],-1))),ut=b(e.defineComponent({__name:"InfoIcon",props:{id:{}},setup(t){const i=t,n=()=>{const{title:e,message:t}=o.get(ct,i.id,{title:"无",message:"无"});s.ElMessageBox({title:e,message:t,lockScroll:!1,autofocus:!0,confirmButtonText:"OK"}).catch((()=>{}))};return(t,o)=>{const i=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(i,{class:"info-icon",onClick:n},{default:e.withCtx((()=>[dt])),_:1})}}}),[["__scopeId","data-v-5cc8821e"]]),mt=b(e.defineComponent({__name:"TaskStatusIcon",props:{status:{}},setup:t=>(t,o)=>{const i=e.resolveComponent("Loading"),n=e.resolveComponent("el-icon"),a=e.resolveComponent("Select"),s=e.resolveComponent("CloseBold");return"running"===t.status?(e.openBlock(),e.createBlock(n,{key:0,class:"status-icon is-loading"},{default:e.withCtx((()=>[e.createVNode(i)])),_:1})):"done"===t.status?(e.openBlock(),e.createBlock(n,{key:1,class:"status-icon",style:{color:"#1ab059"}},{default:e.withCtx((()=>[e.createVNode(a)])),_:1})):"error"===t.status?(e.openBlock(),e.createBlock(n,{key:2,class:"status-icon",style:{color:"#ff6464"}},{default:e.withCtx((()=>[e.createVNode(s)])),_:1})):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-41b10222"]]),ht=Object.freeze(Object.defineProperty({__proto__:null,Info:ut,TaskStatus:mt,Tasks:lt},Symbol.toStringTag,{value:"Module"})),gt=new j("Main");gt.log("document.readyState",document.readyState);const ft=t.createPinia(),pt=qe(ft),vt=We(ft);if(pt.checkCurrentScriptType(),gt.log("当前脚本的类型为",pt.currentScriptType),"Main"===pt.currentScriptType&&pt.startMainBLTHAliveHeartBeat(),vt.loadModules("unknown"),await E("document-body"),document.head.innerHTML.includes("BilibiliLive")){const t=e.createApp(nt);t.use(s),t.use(ft);for(const[e,o]of Object.entries(c))t.component(e,o);for(const[e,o]of Object.entries(ht))t.component(e,o);vt.loadModules("yes"),await E("document-end");const o=K("div");o.id="BLTH",document.body.append(o),t.mount(o)}}(Vue,Pinia,_,ElementPlusIconsVue,luxon,CryptoJS,ElementPlus,hotkeys); \ No newline at end of file diff --git a/dist/bilibili-live-tasks-helper.user.js b/dist/bilibili-live-tasks-helper.user.js index 4c77e0a..1c69bb3 100644 --- a/dist/bilibili-live-tasks-helper.user.js +++ b/dist/bilibili-live-tasks-helper.user.js @@ -3,7 +3,7 @@ // @name:en Bilibili Live Tasks Helper // @name:zh Bilibili Live Tasks Helper // @namespace https://github.com/andywang425 -// @version 7.1.5 +// @version 7.1.6 // @author andywang425 // @description Enhancing the experience of watching Bilibili live streaming. // @description:en Enhancing the experience of watching Bilibili live streaming. @@ -33,7 +33,7 @@ // @match *://live.bilibili.com/blanc/7* // @match *://live.bilibili.com/blanc/8* // @match *://live.bilibili.com/blanc/9* -// @require https://unpkg.com/vue@3.4.31/dist/vue.global.prod.js +// @require https://unpkg.com/vue@3.4.33/dist/vue.global.prod.js // @require data:application/javascript,%3Bwindow.Vue%3DVue%3Bwindow.VueDemi%3DVue%3B // @require https://unpkg.com/element-plus@2.7.7/dist/index.full.min.js // @require https://unpkg.com/@element-plus/icons-vue@2.3.1/dist/index.iife.min.js @@ -58,7 +58,7 @@ // @run-at document-start // ==/UserScript== -(e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const t=document.createElement("style");t.textContent=e,document.head.append(t)})(" .title[data-v-a28e87fa]{padding-left:20px;align-items:baseline;display:flex}.header-big-text[data-v-a28e87fa]{font-size:var(--big-text-size);align-self:unset}.header-small-text[data-v-a28e87fa]{font-size:var(--small-text-size);align-self:unset;margin-left:10px;--small-text-size: 18px}.collapse-btn[data-v-a28e87fa]{display:flex;justify-content:center;align-items:center;height:100%;float:left;cursor:pointer}.avatar-wrap[data-v-d7c74163]{width:80px;height:80px}.avatar[data-v-d7c74163]{display:flex;justify-content:center;align-items:center;border-radius:50%}.base[data-v-3884f5fc]{z-index:1003;position:absolute;background-color:#fff;border-bottom:1px solid #e3e5e7;border-left:1px solid #e3e5e7;border-right:1px solid #e3e5e7}.header[data-v-3884f5fc]{position:relative;box-sizing:border-box;width:100%;font-size:var(--big-text-size);align-items:center;display:flex;border-bottom:1px solid #e3e5e7;height:60px;--big-text-size: 25px}.aside[data-v-3884f5fc]{width:auto}.aside #aside-el-menu[data-v-3884f5fc]:not(.el-menu--collapse){width:150px}.main[data-v-3884f5fc]{--main-top-botton-padding: calc(var(--el-main-padding) * .625);padding-top:var(--main-top-botton-padding);padding-bottom:var(--main-top-botton-padding)}.fade-enter-active[data-v-3884f5fc],.fade-leave-active[data-v-3884f5fc]{transition:opacity .1s ease}.fade-enter-from[data-v-3884f5fc],.fade-leave-to[data-v-3884f5fc]{opacity:0}.info-icon[data-v-5cc8821e]{font-size:var(--el-font-size-base);cursor:pointer}.status-icon[data-v-41b10222]{font-size:var(--el-font-size-base)}.blth_btn{background-color:#23ade5;font-size:small;margin-inline-start:5px;color:#fff;border-radius:4px;border:none;padding:5px;cursor:pointer;box-shadow:0 0 2px #00000075;line-height:10px;margin-left:15px}.blth_btn:hover{background-color:#1097cc}.blth_btn:hover:active{background-color:#0e86b6;position:relative;top:1px} "); +(e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const t=document.createElement("style");t.textContent=e,document.head.append(t)})(" .title[data-v-a28e87fa]{padding-left:20px;align-items:baseline;display:flex}.header-big-text[data-v-a28e87fa]{font-size:var(--big-text-size);align-self:unset}.header-small-text[data-v-a28e87fa]{font-size:var(--small-text-size);align-self:unset;margin-left:10px;--small-text-size: 18px}.collapse-btn[data-v-a28e87fa]{display:flex;justify-content:center;align-items:center;height:100%;float:left;cursor:pointer}.avatar-wrap[data-v-268e1b13]{width:80px;height:80px}.avatar[data-v-268e1b13]{display:flex;justify-content:center;align-items:center;border-radius:50%}.base[data-v-3884f5fc]{z-index:1003;position:absolute;background-color:#fff;border-bottom:1px solid #e3e5e7;border-left:1px solid #e3e5e7;border-right:1px solid #e3e5e7}.header[data-v-3884f5fc]{position:relative;box-sizing:border-box;width:100%;font-size:var(--big-text-size);align-items:center;display:flex;border-bottom:1px solid #e3e5e7;height:60px;--big-text-size: 25px}.aside[data-v-3884f5fc]{width:auto}.aside #aside-el-menu[data-v-3884f5fc]:not(.el-menu--collapse){width:150px}.main[data-v-3884f5fc]{--main-top-botton-padding: calc(var(--el-main-padding) * .625);padding-top:var(--main-top-botton-padding);padding-bottom:var(--main-top-botton-padding)}.fade-enter-active[data-v-3884f5fc],.fade-leave-active[data-v-3884f5fc]{transition:opacity .1s ease}.fade-enter-from[data-v-3884f5fc],.fade-leave-to[data-v-3884f5fc]{opacity:0}.info-icon[data-v-5cc8821e]{font-size:var(--el-font-size-base);cursor:pointer}.status-icon[data-v-41b10222]{font-size:var(--el-font-size-base)}.blth_btn{background-color:#23ade5;font-size:small;margin-inline-start:5px;color:#fff;border-radius:4px;border:none;padding:5px;cursor:pointer;box-shadow:0 0 2px #00000075;line-height:10px;margin-left:15px}.blth_btn:hover{background-color:#1097cc}.blth_btn:hover:active{background-color:#0e86b6;position:relative;top:1px} "); (async function (vue, pinia$1, _, ElementPlusIconsVue, luxon, CryptoJS, ElementPlus, hotkeys) { 'use strict'; @@ -152,7 +152,7 @@ }, watch: { enabled: false, - time: 70, + time: 20, _watchedSecondsToday: 0, _lastWatchTime: 0, _lastCompleteTime: 0 @@ -1875,14 +1875,15 @@ this.moduleStore.moduleStatus.DailyTasks.LiveTasks.medalTasks.like = s; } /** - * 获取粉丝勋章的房间号和主播uid,过滤等级大于等于20或不符合黑白名单要求的粉丝勋章 + * 获取粉丝勋章的房间号和主播uid,过滤等级大于等于20、不符合黑白名单要求以及主播没开播的粉丝勋章 * @returns 数组,数组中的每个元素都是数组:[房间号,主播uid] */ getRoomidUidList() { const biliStore = useBiliStore(); if (biliStore.filteredFansMedals) { return biliStore.filteredFansMedals.filter( - (medal) => medal.medal.level < 20 && (this.medalTasksConfig.isWhiteList ? this.medalTasksConfig.roomidList.includes(medal.room_info.room_id) : !this.medalTasksConfig.roomidList.includes(medal.room_info.room_id)) + (medal) => medal.medal.level < 20 && (this.medalTasksConfig.isWhiteList ? this.medalTasksConfig.roomidList.includes(medal.room_info.room_id) : !this.medalTasksConfig.roomidList.includes(medal.room_info.room_id)) && // 只有给正在直播的房间点赞才能获得粉丝勋章亲密度 + medal.room_info.living_status === 1 ).map((medal) => [medal.room_info.room_id, medal.medal.target_id]).slice(0, 199); } else { this.status = "error"; @@ -1894,20 +1895,25 @@ * @param roomid 直播间号 * @param target_id 主播UID */ - async like(roomid, target_id) { + async like(roomid, target_id, click_time) { try { - const response = await BAPI.live.likeReport(roomid, target_id); - this.logger.log(`BAPI.live.likeReport(${roomid}, ${target_id})`, response); + const response = await BAPI.live.likeReport(roomid, target_id, click_time); + this.logger.log(`BAPI.live.likeReport(${roomid}, ${target_id}, ${click_time})`, response); if (response.code === 0) { - this.logger.log(`给主播点赞 房间号 = ${roomid} 主播UID = ${target_id} 成功`); + this.logger.log( + `给主播点赞 房间号 = ${roomid} 主播UID = ${target_id} 点赞次数 = ${click_time} 成功` + ); } else { this.logger.error( - `给主播点赞 房间号 = ${roomid} 主播UID = ${target_id} 失败`, + `给主播点赞 房间号 = ${roomid} 主播UID = ${target_id} 点赞次数 = ${click_time} 失败`, response.message ); } } catch (error) { - this.logger.error(`给主播点赞 房间号 = ${roomid} 主播UID = ${target_id} 出错`, error); + this.logger.error( + `给主播点赞 房间号 = ${roomid} 主播UID = ${target_id} 点赞次数 = ${click_time} 出错`, + error + ); } } async run() { @@ -1918,7 +1924,7 @@ const idList = this.getRoomidUidList(); if (idList) { for (const [roomid, target_id] of idList) { - await this.like(roomid, target_id); + await this.like(roomid, target_id, _.random(50, 55)); await sleep(2e3); } this.config._lastCompleteTime = tsm(); @@ -2294,9 +2300,11 @@ if (roomIdList) { const danmuList = this.config.list; for (let i = 0; i < roomIdList.length; i++) { - const danmu = danmuList[i % danmuList.length]; - await this.sendDanmu(danmu, roomIdList[i]); - await sleep(2e3); + for (let j = 0; j < 10; j++) { + const danmu = danmuList[(i * 10 + j) % danmuList.length]; + await this.sendDanmu(danmu, roomIdList[i]); + await sleep(2e3); + } } this.config._lastCompleteTime = tsm(); this.status = "done"; @@ -3928,7 +3936,7 @@ }; } }); - const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-d7c74163"), n = n(), vue.popScopeId(), n); + const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-268e1b13"), n = n(), vue.popScopeId(), n); const _hoisted_1$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("br", null, null, -1)); const _hoisted_2$1 = { class: "avatar-wrap" }; const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({ @@ -4020,15 +4028,15 @@ const medalInfoTableRef = vue.ref(); const initSelection = (rows) => { if (rows) { - config.medalTasks.roomidList.forEach( - (roomid) => { - var _a2; - return (_a2 = medalInfoTableRef.value) == null ? void 0 : _a2.toggleRowSelection( - rows.find((row) => row.roomid === roomid), - true - ); + config.medalTasks.roomidList.forEach((roomid, index) => { + var _a2; + const row = rows.find((row2) => row2.roomid === roomid); + if (row) { + (_a2 = medalInfoTableRef.value) == null ? void 0 : _a2.toggleRowSelection(row, true); + } else { + config.medalTasks.roomidList.splice(index, 1); } - ); + }); } }; function handleSelectionChange(selectedRows) { @@ -4433,7 +4441,7 @@ }; } }); - const LiveTasks = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-d7c74163"]]); + const LiveTasks = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-268e1b13"]]); const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({ __name: "OtherTasks", setup(__props) { @@ -5155,13 +5163,20 @@ title: "给主播点赞", message: vue.h("p", [ vue.h("div", "在你的每个粉丝勋章对应的直播间给主播点赞。"), - vue.h("div", "部分直播间无法完成该任务,原因未知。") + vue.h("div", ""), + vue.h("div", [ + vue.h("li", [ + vue.h("span", "仅在开播的直播间点赞(经测试在不开播的直播间点赞不增加亲密度)。") + ]), + vue.h("li", [vue.h("span", "点赞次数为50~55次之间的随机值。")]), + vue.h("li", [vue.h("span", "部分直播间无法完成该任务,原因未知。")]) + ]) ]) }, danmu: { title: "发送弹幕", message: vue.h("p", [ - vue.h("div", "在你的每个粉丝勋章对应的直播间发送一条弹幕。"), + vue.h("div", "在你的每个粉丝勋章对应的直播间发送10条弹幕。"), vue.h("div", [ vue.h("span", "点击编辑弹幕按钮编辑发送的弹幕,脚本会从中按顺序循环抽取弹幕发送。"), vue.h("span", "如果有点亮高等级勋章的需求,请勾选“包含等级≥20的粉丝勋章”选项。"), @@ -5186,7 +5201,7 @@ vue.h("div", "完成观看持有粉丝勋章对应主播直播的任务。"), vue.h( "div", - "部分直播间因为没有设置直播分区导致任务无法完成。主播当前是否开播不会影响该任务的完成。" + "部分直播间因为没有设置直播分区导致任务无法完成。主播当前是否开播不会影响该任务的完成。目前该功能尚未适配新版粉丝勋章亲密度机制,会同时观看所有粉丝勋章的直播,但据测试粉丝勋章的亲密度是逐个增加的(即每20分钟获取完一个粉丝勋章的单日亲密度上限80)。" ) ]) }