// ==UserScript== // @name bilibili-app-recommend // @namespace https://magicdawn.fun // @version 0.3.3 // @author magicdawn // @description 为B站首页添加像App一样的推荐 // @license MIT // @homepageURL https://github.com/magicdawn/bilibili-app-recommend // @supportURL https://github.com/magicdawn/bilibili-app-recommend/issues // @include https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?* // @match *://www.bilibili.com/* // @require https://unpkg.com/jquery@3.6.0/dist/jquery.min.js // @require https://unpkg.com/axios@0.27.2/dist/axios.min.js // @require https://unpkg.com/axios-userscript-adapter@0.2.0/dist/axiosGmxhrAdapter.min.js // @require https://unpkg.com/react@18.1.0/umd/react.production.min.js // @require https://unpkg.com/react-dom@18.1.0/umd/react-dom.production.min.js // @connect app.bilibili.com // @connect passport.bilibili.com // @connect link.acg.tv // @connect www.mcbbs.net // @grant GM.xmlHttpRequest // @grant GM_xmlhttpRequest // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // @grant unsafeWindow // @downloadURL none // ==/UserScript== ;(({ cssTextList = [] }) => { cssTextList.forEach((s) => { const style = document.createElement("style"); style.innerText = s; style.dataset.source = "vite-plugin-monkey"; document.head.appendChild(style); }); })({ "cssTextList": [ "._toast-container_9119l_1{position:fixed;top:50%;left:50%;z-index:999999;padding:12px 24px;font-size:14px;width:240px;margin-left:-120px;background:#ffb243;color:#fff;border-radius:6px}._expand-btn_wdzp9_1{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_wdzp9_1 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_wdzp9_1 svg._expanded_wdzp9_12{transform:rotate(0)}body.dark ._expand-btn_wdzp9_1{color:#eee!important;border-color:transparent!important;background-color:#333!important}body.dark ._expand-btn_wdzp9_1:hover{background-color:#555!important}._bili-video-card_14zjz_1{position:relative}._image-wrapper_14zjz_4{border-radius:6px;overflow:hidden}._preview-card-wrapper_14zjz_8{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;overflow:hidden;border-top-left-radius:inherit;border-top-right-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}._watch-later_14zjz_21{z-index:3}._badge_14zjz_24{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_14zjz_32{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:inline-block;color:var(--Or5);background-color:var(--Or1);border-radius:4px;margin-right:4px;font-size:var(--follow-icon-font-size);line-height:var(--follow-icon-line-height);height:var(--follow-icon-line-height);padding:0 4px;cursor:default}._bangumi-desc_14zjz_47{color:default}._btn-dislike_14zjz_50{display:flex;align-items:center;justify-content:center;position:absolute;top:8px;left:8px;width:28px;height:28px;border-radius:6px;cursor:pointer;background-color:#212121cc;z-index:9;transform:translateZ(0)}._btn-dislike_14zjz_50 ._btn-dislike-icon_14zjz_65{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_14zjz_50 ._btn-dislike-tip_14zjz_72{pointer-events:none;user-select:none;position:absolute;bottom:-6px;left:-5px;transform:translateY(100%);font-size:12px;color:#fff;border-radius:4px;line-height:18px;padding:4px 8px;background-color:#000c;white-space:nowrap}._disliked-wrapper_14zjz_87{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;border-radius:6px;border:1px solid #eee}body.dark ._disliked-wrapper_14zjz_87{border:1px solid #333}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101 ._dislike-content-cover-inner_14zjz_107{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101 ._dislike-content-cover-inner_14zjz_107 ._dislike-icon_14zjz_118{color:inherit}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101 ._dislike-content-cover-inner_14zjz_107 ._dislike-reason_14zjz_121{font-size:20px;text-align:center}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101 ._dislike-content-cover-inner_14zjz_107 ._dislike-desc_14zjz_125{font-size:16px;text-align:center}._disliked-wrapper_14zjz_87 ._dislike-content-action_14zjz_129{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_14zjz_87 ._dislike-content-action_14zjz_129{border-top:1px solid #333}._disliked-wrapper_14zjz_87 ._dislike-content-action_14zjz_129 button{font-size:18px;color:inherit}._modal-mask_vh629_1{position:fixed;left:0;top:0;right:0;bottom:0;background-color:#00000080;z-index:11003;display:flex;align-items:center;justify-content:center}._modal_vh629_1{width:500px;max-height:calc(80vh - 50px);border-radius:10px;overflow:hidden;background-color:#fff;padding:0 15px 15px;display:flex;flex-direction:column}._modal_vh629_1 ._modal-header_vh629_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal_vh629_1 ._modal-header_vh629_23 ._modal-title_vh629_30{font-size:1.5rem;margin-bottom:0;line-height:1.5}._modal_vh629_1 ._modal-header_vh629_23 ._title-desc_vh629_35{margin-left:5px;font-size:40%}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{margin-left:10px}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_vh629_1 ._modal-body_vh629_57{padding-top:0;flex-grow:1;overflow-y:scroll}._reason-list_vh629_62{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}._reason_vh629_62{color:inherit;width:45%;text-align:center;line-height:20px;border:1px solid #eee;margin-top:8px;margin-bottom:8px;padding-top:5px;padding-bottom:5px}body.dark ._reason_vh629_62{border:1px solid #333}._modal-mask_1urmj_1{position:fixed;left:0;top:0;right:0;bottom:0;z-index:11000;background-color:#00000080;display:flex;align-items:center;justify-content:center}._modal-mask_1urmj_1._narrow-mode_1urmj_13{background-color:#000000e6}._modal_1urmj_1{width:calc(100vw - 30px);height:calc(100vh - 30px);border-radius:10px;overflow:hidden;background-color:#fff;padding:0 0 15px 15px;display:flex;flex-direction:column}body.dark ._modal_1urmj_1{border:1px solid #fb7299}._modal_1urmj_1._narrow-mode_1urmj_13{width:606px;height:calc(100vh - 10px);border:none}body.dark ._modal_1urmj_1._narrow-mode_1urmj_13{border:none}._modal_1urmj_1 ._modal-header_1urmj_38{padding-top:10px;padding-bottom:10px;border-bottom:none;padding-right:15px;display:flex;align-items:center}._modal_1urmj_1 ._modal-header_1urmj_38 ._modal-title_1urmj_46{font-size:1.5rem;margin-bottom:0;line-height:1.5}body.dark ._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-refresh_1urmj_51,body.dark ._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-close_1urmj_52{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-close_1urmj_52{margin-left:10px}._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-close_1urmj_52 svg{width:10px;height:10px}._modal_1urmj_1 ._modal-body_1urmj_68{padding-top:0;flex-grow:1;overflow-y:scroll;padding-right:15px}._list_1urmj_74{color:inherit}._card_1urmj_77{border:2px solid transparent}._card_1urmj_77 .bili-video-card__info{padding-left:2px;padding-bottom:1px;margin-top:calc(var(--info-margin-top) - 1px)}._card_1urmj_77._active_1urmj_85{border-color:#fb7299;border-radius:6px;overflow:hidden}._video-card-list_1urmj_90{display:block!important}#_video-card-body_1urmj_1>*{display:block!important}#_video-card-body_1urmj_1._narrow-mode_1urmj_13{grid-template-columns:repeat(2,1fr)}._loader_1urmj_99{text-align:center;line-height:60px;font-size:120%}._checkbox_1urmj_104{margin-left:5px;margin-top:1px;cursor:pointer;outline:none}._checkbox_1urmj_104+label{margin-left:2px;user-select:none;cursor:pointer}._grid_p5dvw_1{color:default}@media (min-width: 2200px){._video-card-list_p5dvw_5.is-full{grid-column:span 7!important}._video-card-list_p5dvw_5.is-full .video-card-body.more-class1.more-class2{grid-column:span 7!important;grid-template-columns:repeat(7,1fr)!important}._video-card-list_p5dvw_5.is-full .video-card-body.more-class1.more-class2>*{display:block!important}._video-card-list_p5dvw_5.is-full .video-card-body.more-class1.more-class2>*:nth-of-type(1n + 15){display:none!important}}._expand-btn_p5dvw_19{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_p5dvw_19 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_p5dvw_19 svg._expanded_p5dvw_30{transform:rotate(0)}\n" ] }); var QE=Object.defineProperty,qE=Object.defineProperties;var eO=Object.getOwnPropertyDescriptors;var Ri=Object.getOwnPropertySymbols;var lh=Object.prototype.hasOwnProperty,ch=Object.prototype.propertyIsEnumerable;var eo=(O,Re,De)=>Re in O?QE(O,Re,{enumerable:!0,configurable:!0,writable:!0,value:De}):O[Re]=De,vn=(O,Re)=>{for(var De in Re||(Re={}))lh.call(Re,De)&&eo(O,De,Re[De]);if(Ri)for(var De of Ri(Re))ch.call(Re,De)&&eo(O,De,Re[De]);return O},kn=(O,Re)=>qE(O,eO(Re));var fh=(O,Re)=>{var De={};for(var vt in O)lh.call(O,vt)&&Re.indexOf(vt)<0&&(De[vt]=O[vt]);if(O!=null&&Ri)for(var vt of Ri(O))Re.indexOf(vt)<0&&ch.call(O,vt)&&(De[vt]=O[vt]);return De};var to=(O,Re,De)=>(eo(O,typeof Re!="symbol"?Re+"":Re,De),De);(function(O,Re,De,vt,hh){"use strict";function Un(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var Li=Un(O),zn=Un(Re),dh=Un(De),Pi=Un(vt),ph=Un(hh);const Mi=Symbol(),gh=Symbol(),Di=Symbol(),Ii=Object.getPrototypeOf,Ni=new WeakMap,no=i=>i&&(Ni.has(i)?Ni.get(i):Ii(i)===Object.prototype||Ii(i)===Array.prototype),$i=i=>typeof i=="object"&&i!==null,vh=(i,a)=>{let r=!1;const o=(c,d,g)=>{if(!r){let y=c.a.get(i);y||(y=new Set,c.a.set(i,y)),g&&y.has(Mi)||y.add(d)}},u={f:a,get(c,d){return d===Di?i:(o(this,d),ro(c[d],this.a,this.c))},has(c,d){return d===gh?(r=!0,this.a.delete(i),!0):(o(this,d),d in c)},getOwnPropertyDescriptor(c,d){return o(this,d,!0),Object.getOwnPropertyDescriptor(c,d)},ownKeys(c){return o(this,Mi),Reflect.ownKeys(c)}};return a&&(u.set=u.deleteProperty=()=>!1),u},ro=(i,a,r)=>{if(!no(i))return i;const o=i[Di]||i,u=(d=>Object.isFrozen(d)||Object.values(Object.getOwnPropertyDescriptors(d)).some(g=>!g.writable))(o);let c=r&&r.get(o);return c&&c.f===u||(c=vh(o,u),c.p=new Proxy(u?(d=>{if(Array.isArray(d))return Array.from(d);const g=Object.getOwnPropertyDescriptors(d);return Object.values(g).forEach(y=>{y.configurable=!0}),Object.create(Ii(d),g)})(o):o,c),r&&r.set(o,c)),c.a=a,c.c=r,c.p},_h=(i,a)=>{const r=Reflect.ownKeys(i),o=Reflect.ownKeys(a);return r.length!==o.length||r.some((u,c)=>u!==o[c])},io=(i,a,r,o)=>{if(Object.is(i,a))return!1;if(!$i(i)||!$i(a))return!0;const u=r.get(i);if(!u)return!0;if(o){const d=o.get(i);if(d&&d.n===a)return d.g;o.set(i,{n:a,g:!1})}let c=null;for(const d of u){const g=d===Mi?_h(i,a):io(i[d],a[d],r,o);if(g!==!0&&g!==!1||(c=g),c)break}return c===null&&(c=!0),o&&o.set(i,{n:a,g:c}),c},mh=i=>no(i)&&i[Di]||null,ao=(i,a)=>{Ni.set(i,a)},yh=(i,a)=>{const r=[],o=new WeakSet,u=(c,d)=>{if(o.has(c))return;$i(c)&&o.add(c);const g=a.get(c);g?g.forEach(y=>{u(c[y],d?[...d,y]:[y])}):d&&r.push(d)};return u(i),r};var xt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},so={exports:{}},oo={};/** * @license React * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var _n=Li.default;function bh(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var wh=typeof Object.is=="function"?Object.is:bh,Sh=_n.useState,xh=_n.useEffect,Th=_n.useLayoutEffect,Ah=_n.useDebugValue;function Ch(i,a){var r=a(),o=Sh({inst:{value:r,getSnapshot:a}}),u=o[0].inst,c=o[1];return Th(function(){u.value=r,u.getSnapshot=a,Fi(u)&&c({inst:u})},[i,r,a]),xh(function(){return Fi(u)&&c({inst:u}),i(function(){Fi(u)&&c({inst:u})})},[i]),Ah(r),r}function Fi(i){var a=i.getSnapshot;i=i.value;try{var r=a();return!wh(i,r)}catch{return!0}}function Eh(i,a){return a()}var Oh=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?Eh:Ch;oo.useSyncExternalStore=_n.useSyncExternalStore!==void 0?_n.useSyncExternalStore:Oh,so.exports=oo;var Rh=so.exports;const Lh=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("VERSION"):Symbol(),Tt=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("LISTENERS"):Symbol(),yr=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("SNAPSHOT"):Symbol(),Ph=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("HANDLER"):Symbol(),Hn=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_RESULT"):Symbol(),uo=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_ERROR"):Symbol(),lo=new WeakSet,Bi=i=>typeof i=="object"&&i!==null,Mh=i=>Bi(i)&&!lo.has(i)&&(Array.isArray(i)||!(Symbol.iterator in i))&&!(i instanceof WeakMap)&&!(i instanceof WeakSet)&&!(i instanceof Error)&&!(i instanceof Number)&&!(i instanceof Date)&&!(i instanceof String)&&!(i instanceof RegExp)&&!(i instanceof ArrayBuffer),co=new WeakMap;let fo=1;const ho=new WeakMap;function br(i={}){if(!Bi(i))throw new Error("object required");const a=co.get(i);if(a)return a;let r=fo;const o=new Set,u=(C,E=++fo)=>{r!==E&&(r=E,o.forEach(T=>T(C,E)))},c=new Map,d=C=>{let E=c.get(C);return E||(E=(T,I)=>{const M=[...T];M[1]=[C,...M[1]],u(M,I)},c.set(C,E)),E},g=C=>{const E=c.get(C);return c.delete(C),E},y=(C,E)=>{const T=ho.get(E);if((T==null?void 0:T[0])===r)return T[1];const I=Array.isArray(C)?[]:Object.create(Object.getPrototypeOf(C));return ao(I,!0),ho.set(E,[r,I]),Reflect.ownKeys(C).forEach(M=>{const N=Reflect.get(C,M,E);if(lo.has(N))ao(N,!1),I[M]=N;else if(N instanceof Promise)if(Hn in N)I[M]=N[Hn];else{const q=N[uo]||N;Object.defineProperty(I,M,{get(){if(Hn in N)return N[Hn];throw q}})}else N!=null&&N[Tt]?I[M]=N[yr]:I[M]=N}),Object.freeze(I),I},v=Array.isArray(i)?[]:Object.create(Object.getPrototypeOf(i)),w={get(C,E,T){return E===Lh?r:E===Tt?o:E===yr?y(C,T):E===Ph?w:Reflect.get(C,E,T)},deleteProperty(C,E){const T=Reflect.get(C,E),I=T==null?void 0:T[Tt];I&&I.delete(g(E));const M=Reflect.deleteProperty(C,E);return M&&u(["delete",[E],T]),M},is:Object.is,canProxy:Mh,set(C,E,T,I){var M;const N=Reflect.has(C,E),q=Reflect.get(C,E,I);if(N&&this.is(q,T))return!0;const X=q==null?void 0:q[Tt];X&&X.delete(g(E)),Bi(T)&&(T=mh(T)||T);let G;return(M=Object.getOwnPropertyDescriptor(C,E))!=null&&M.set?G=T:T instanceof Promise?G=T.then(H=>(G[Hn]=H,u(["resolve",[E],H]),H)).catch(H=>{G[uo]=H,u(["reject",[E],H])}):T!=null&&T[Tt]?(G=T,G[Tt].add(d(E))):this.canProxy(T)?(G=br(T),G[Tt].add(d(E))):G=T,Reflect.set(C,E,G,I),u(["set",[E],T,q]),!0}},S=new Proxy(v,w);return co.set(i,S),Reflect.ownKeys(i).forEach(C=>{const E=Object.getOwnPropertyDescriptor(i,C);E.get||E.set?Object.defineProperty(v,C,E):S[C]=i[C]}),S}function Dh(i,a,r){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(i!=null&&i[Tt])&&console.warn("Please use proxy object");let o;const u=[],c=d=>{if(u.push(d),r){a(u.splice(0));return}o||(o=Promise.resolve().then(()=>{o=void 0,a(u.splice(0))}))};return i[Tt].add(c),()=>{i[Tt].delete(c)}}function po(i){return({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(i!=null&&i[yr])&&console.warn("Please use proxy object"),i[yr]}const{useSyncExternalStore:Ih}=Rh,Nh=(i,a)=>{const r=O.useRef();O.useEffect(()=>{r.current=yh(i,a)}),O.useDebugValue(r.current)};function Wi(i,a){const r=a==null?void 0:a.sync,o=O.useRef(),u=O.useRef();let c=!0;const d=Ih(O.useCallback(v=>{const w=Dh(i,v,r);return v(),w},[i,r]),()=>{const v=po(i);try{if(!c&&o.current&&u.current&&!io(o.current,v,u.current,new WeakMap))return o.current}catch{}return v},()=>po(i));c=!1;const g=new WeakMap;O.useEffect(()=>{o.current=d,u.current=g}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&Nh(d,g);const y=O.useMemo(()=>new WeakMap,[]);return ro(d,g,y)}const qt=br({accessKey:"",useNarrowMode:!1,initialShowMore:!1}),ki=function(){return Wi(qt)},go="bilibili-app-recommend.config";function $h(){const i=GM_getValue(go);i&&typeof i=="object"&&Object.assign(qt,i)}function Fh(){GM_setValue(go,qt)}function wr(i){Object.assign(qt,i),Fh()}$h();var Ui={exports:{}};const Bh=(i,a)=>Math.floor(Math.random()*(a-i+1)+i),vo=()=>{const i=new Error("Delay aborted");return i.name="AbortError",i},_o=({clearTimeout:i,setTimeout:a,willResolve:r})=>(o,{value:u,signal:c}={})=>{if(c&&c.aborted)return Promise.reject(vo());let d,g,y;const v=i||clearTimeout,w=()=>{v(d),y(vo())},S=()=>{c&&c.removeEventListener("abort",w)},C=new Promise((E,T)=>{g=()=>{S(),r?E(u):T(u)},y=T,d=(a||setTimeout)(g,o)});return c&&c.addEventListener("abort",w,{once:!0}),C.clear=()=>{v(d),d=null,g()},C},mo=i=>{const a=_o(kn(vn({},i),{willResolve:!0}));return a.reject=_o(kn(vn({},i),{willResolve:!1})),a.range=(r,o,u)=>a(Bh(r,o),u),a},zi=mo();zi.createWithTimers=mo,Ui.exports=zi,Ui.exports.default=zi;var yo=Ui.exports,Hi,Wh=dh.default;Hi=Wh.createRoot;var kh=function(a){return function(r,o){var u=O.useRef(!1);a(function(){return function(){u.current=!1}},[]),a(function(){if(!u.current)u.current=!0;else return r()},o)}},Gi=function(a){return typeof a=="function"},Uh=function(a){return typeof a=="string"},bo=function(a){return typeof a=="number"};function Le(i){var a=O.useRef(i);a.current=O.useMemo(function(){return i},[i]);var r=O.useRef();return r.current||(r.current=function(){for(var o=[],u=0;u0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},wo=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a-1&&(c=setTimeout(function(){xr.delete(a)},r)),xr.set(a,Sr(Sr({},o),{timer:c}))},Kh=function(a){return xr.get(a)},Tr=new Map,Yh=function(a){return Tr.get(a)},Xh=function(a,r){Tr.set(a,r),r.then(function(o){return Tr.delete(a),o}).catch(function(){Tr.delete(a)})},en={},Zh=function(a,r){en[a]&&en[a].forEach(function(o){return o(r)})},Yi=function(a,r){return en[a]||(en[a]=[]),en[a].push(r),function(){var u=en[a].indexOf(r);en[a].splice(u,1)}},Jh=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},Vh=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a=a||fe<0||S&&_e>=c}function N(){var j=Zi();if(M(j))return q(j);g=setTimeout(N,I(j))}function q(j){return g=void 0,C&&o?E(j):(o=u=void 0,d)}function X(){g!==void 0&&clearTimeout(g),v=0,o=y=u=g=void 0}function G(){return g===void 0?d:q(Zi())}function H(){var j=Zi(),fe=M(j);if(o=arguments,u=this,y=j,fe){if(g===void 0)return T(y);if(S)return clearTimeout(g),g=setTimeout(N,a),E(y)}return g===void 0&&(g=setTimeout(N,a)),d}return H.cancel=X,H.flush=G,H}var Mo=Xd,Zd=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},Jd=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},sp=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},bp=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},Cp=function(){var a=Ap(O.useState({}),2),r=a[1];return O.useCallback(function(){return r({})},[])},Ep=Cp,Ht=globalThis&&globalThis.__assign||function(){return Ht=Object.assign||function(i){for(var a,r=1,o=arguments.length;r0&&c[c.length-1])&&(v[0]===6||v[0]===2)){r=0;continue}if(v[0]===3&&(!c||v[1]>c[0]&&v[1]0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},mn=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},Io=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},Bp=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c};function No(i,a){i===void 0&&(i=!1);var r=kp(O.useState(i),2),o=r[0],u=r[1],c=O.useMemo(function(){var d=a===void 0?!i:a,g=function(){return u(function(C){return C===i?d:i})},y=function(C){return u(C)},v=function(){return u(i)},w=function(){return u(d)};return{toggle:g,set:y,setLeft:v,setRight:w}},[]);return[o,c]}var Up=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c};function zp(i){i===void 0&&(i=!1);var a=Up(No(i),2),r=a[0],o=a[1],u=o.toggle,c=o.set,d=O.useMemo(function(){var g=function(){return c(!0)},y=function(){return c(!1)};return{toggle:u,set:function(w){return c(!!w)},setTrue:g,setFalse:y}},[]);return[r,d]}var Hp=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Gp=Hp;function Cr(i,a){if(!!Gp){if(!i)return a;var r;return Gi(i)?r=i():"current"in i?r=i.current:r=i,r}}var jp=function(a){var r=function(u,c,d){var g=O.useRef(!1),y=O.useRef([]),v=O.useRef([]),w=O.useRef();a(function(){var S,C=Array.isArray(d)?d:[d],E=C.map(function(T){return Cr(T)});if(!g.current){g.current=!0,y.current=E,v.current=c,w.current=u();return}(E.length!==y.current.length||!Ki(E,y.current)||!Ki(c,v.current))&&((S=w.current)===null||S===void 0||S.call(w),y.current=E,v.current=c,w.current=u())}),jn(function(){var S;(S=w.current)===null||S===void 0||S.call(w),g.current=!1})};return r},Kp=jp,Yp=Kp(O.useEffect),$o=Yp,Fo={exports:{}};(function(i,a){(function(r,o){i.exports=o()})(xt,function(){var r=1e3,o=6e4,u=36e5,c="millisecond",d="second",g="minute",y="hour",v="day",w="week",S="month",C="quarter",E="year",T="date",I="Invalid Date",M=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,N=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,q={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},X=function(V,U,W){var Q=String(V);return!Q||Q.length>=U?V:""+Array(U+1-Q.length).join(W)+V},G={s:X,z:function(V){var U=-V.utcOffset(),W=Math.abs(U),Q=Math.floor(W/60),F=W%60;return(U<=0?"+":"-")+X(Q,2,"0")+":"+X(F,2,"0")},m:function V(U,W){if(U.date()1)return V(ee[0])}else{var le=U.name;j[le]=U,F=le}return!Q&&F&&(H=F),F||!Q&&H},pe=function(V,U){if(fe(V))return V.clone();var W=typeof U=="object"?U:{};return W.date=V,W.args=arguments,new Ue(W)},se=G;se.l=_e,se.i=fe,se.w=function(V,U){return pe(V,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var Ue=function(){function V(W){this.$L=_e(W.locale,null,!0),this.parse(W)}var U=V.prototype;return U.parse=function(W){this.$d=function(Q){var F=Q.date,K=Q.utc;if(F===null)return new Date(NaN);if(se.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var ee=F.match(M);if(ee){var le=ee[2]-1||0,de=(ee[7]||"0").substring(0,3);return K?new Date(Date.UTC(ee[1],le,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,de)):new Date(ee[1],le,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,de)}}return new Date(F)}(W),this.$x=W.x||{},this.init()},U.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},U.$utils=function(){return se},U.isValid=function(){return this.$d.toString()!==I},U.isSame=function(W,Q){var F=pe(W);return this.startOf(Q)<=F&&F<=this.endOf(Q)},U.isAfter=function(W,Q){return pe(W)-1}var lg=ug,cg=Er;function fg(i,a){var r=this.__data__,o=cg(r,i);return o<0?(++this.size,r.push([i,a])):r[o][1]=a,this}var hg=fg,dg=Zp,pg=rg,gg=sg,vg=lg,_g=hg;function yn(i){var a=-1,r=i==null?0:i.length;for(this.clear();++ag))return!1;var v=c.get(i),w=c.get(a);if(v&&w)return v==a&&w==i;var S=-1,C=!0,E=r&F_?new D_:void 0;for(c.set(i,a),c.set(a,i);++S-1&&i%1==0&&i-1&&i%1==0&&i<=Km}var qo=Ym,Xm=Xn,Zm=qo,Jm=Zn,Vm="[object Arguments]",Qm="[object Array]",qm="[object Boolean]",e0="[object Date]",t0="[object Error]",n0="[object Function]",r0="[object Map]",i0="[object Number]",a0="[object Object]",s0="[object RegExp]",o0="[object Set]",u0="[object String]",l0="[object WeakMap]",c0="[object ArrayBuffer]",f0="[object DataView]",h0="[object Float32Array]",d0="[object Float64Array]",p0="[object Int8Array]",g0="[object Int16Array]",v0="[object Int32Array]",_0="[object Uint8Array]",m0="[object Uint8ClampedArray]",y0="[object Uint16Array]",b0="[object Uint32Array]",Se={};Se[h0]=Se[d0]=Se[p0]=Se[g0]=Se[v0]=Se[_0]=Se[m0]=Se[y0]=Se[b0]=!0,Se[Vm]=Se[Qm]=Se[c0]=Se[qm]=Se[f0]=Se[e0]=Se[t0]=Se[n0]=Se[r0]=Se[i0]=Se[a0]=Se[s0]=Se[o0]=Se[u0]=Se[l0]=!1;function w0(i){return Jm(i)&&Zm(i.length)&&!!Se[Xm(i)]}var S0=w0;function x0(i){return function(a){return i(a)}}var T0=x0,na={exports:{}};(function(i,a){var r=To,o=a&&!a.nodeType&&a,u=o&&!0&&i&&!i.nodeType&&i,c=u&&u.exports===o,d=c&&r.process,g=function(){try{var y=u&&u.require&&u.require("util").types;return y||d&&d.binding&&d.binding("util")}catch{}}();i.exports=g})(na,na.exports);var A0=S0,C0=T0,eu=na.exports,tu=eu&&eu.isTypedArray,E0=tu?C0(tu):A0,nu=E0,O0=Rm,R0=Wm,L0=ta,P0=Mr.exports,M0=jm,D0=nu,I0=Object.prototype,N0=I0.hasOwnProperty;function $0(i,a){var r=L0(i),o=!r&&R0(i),u=!r&&!o&&P0(i),c=!r&&!o&&!u&&D0(i),d=r||o||u||c,g=d?O0(i.length,String):[],y=g.length;for(var v in i)(a||N0.call(i,v))&&!(d&&(v=="length"||u&&(v=="offset"||v=="parent")||c&&(v=="buffer"||v=="byteLength"||v=="byteOffset")||M0(v,y)))&&g.push(v);return g}var F0=$0,B0=Object.prototype;function W0(i){var a=i&&i.constructor,r=typeof a=="function"&&a.prototype||B0;return i===r}var k0=W0;function U0(i,a){return function(r){return i(a(r))}}var z0=U0,H0=z0,G0=H0(Object.keys,Object),j0=G0,K0=k0,Y0=j0,X0=Object.prototype,Z0=X0.hasOwnProperty;function J0(i){if(!K0(i))return Y0(i);var a=[];for(var r in Object(i))Z0.call(i,r)&&r!="constructor"&&a.push(r);return a}var V0=J0,Q0=ko,q0=qo;function e1(i){return i!=null&&q0(i.length)&&!Q0(i)}var t1=e1,n1=F0,r1=V0,i1=t1;function a1(i){return i1(i)?n1(i):r1(i)}var s1=a1,o1=_m,u1=Em,l1=s1;function c1(i){return o1(i,l1,u1)}var f1=c1,ru=f1,h1=1,d1=Object.prototype,p1=d1.hasOwnProperty;function g1(i,a,r,o,u,c){var d=r&h1,g=ru(i),y=g.length,v=ru(a),w=v.length;if(y!=w&&!d)return!1;for(var S=y;S--;){var C=g[S];if(!(d?C in a:p1.call(a,C)))return!1}var E=c.get(i),T=c.get(a);if(E&&T)return E==a&&T==i;var I=!0;c.set(i,a),c.set(a,i);for(var M=d;++S0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},ca=function(i,a){var r=a||{},o=r.onEnter,u=r.onLeave,c=q1(zp(!1),2),d=c[0],g=c[1],y=g.setTrue,v=g.setFalse;return la("mouseenter",function(){o==null||o(),y()},{target:i}),la("mouseleave",function(){u==null||u(),v()},{target:i}),d},ey=function(a,r){return r===void 0&&(r=[]),Q1(a,r)},ty=function(a,r,o){var u=O.useRef(),c=O.useRef(0);ey(r,u.current)||(u.current=r,c.current+=1),$o(a,[c.current],o)},ny=ty,fa=globalThis&&globalThis.__values||function(i){var a=typeof Symbol=="function"&&Symbol.iterator,r=a&&i[a],o=0;if(r)return r.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&o>=i.length&&(i=void 0),{value:i&&i[o++],done:!i}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},ry={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},ha={ctrl:function(a){return a.ctrlKey},shift:function(a){return a.shiftKey},alt:function(a){return a.altKey},meta:function(a){return a.metaKey}};function iy(i){var a=Object.keys(ha).reduce(function(r,o){return ha[o](i)?r+1:r},0);return[16,17,18,91,92].includes(i.keyCode)?a:a+1}function mu(i,a,r){var o,u;if(!i.key)return!1;if(bo(a))return i.keyCode===a;var c=a.split("."),d=0;try{for(var g=fa(c),y=g.next();!y.done;y=g.next()){var v=y.value,w=ha[v],S=ry[v.toLowerCase()];(w&&w(i)||S&&S===i.keyCode)&&d++}}catch(C){o={error:C}}finally{try{y&&!y.done&&(u=g.return)&&u.call(g)}finally{if(o)throw o.error}}return r?d===c.length&&iy(i)===c.length:d===c.length}function ay(i,a){return Gi(i)?i:Uh(i)||bo(i)?function(r){return mu(r,i,a)}:Array.isArray(i)?function(r){return i.some(function(o){return mu(r,o,a)})}:i?function(){return!0}:function(){return!1}}var sy=["keydown"];function nn(i,a,r){var o=r||{},u=o.events,c=u===void 0?sy:u,d=o.target,g=o.exactMatch,y=g===void 0?!1:g,v=Gn(a),w=Gn(i);ny(function(){var S,C,E,T=Cr(d,window);if(!!T){var I=function(G){var H,j=ay(w.current,y);if(j(G))return(H=v.current)===null||H===void 0?void 0:H.call(v,G)};try{for(var M=fa(c),N=M.next();!N.done;N=M.next()){var q=N.value;(E=T==null?void 0:T.addEventListener)===null||E===void 0||E.call(T,q,I)}}catch(X){S={error:X}}finally{try{N&&!N.done&&(C=M.return)&&C.call(M)}finally{if(S)throw S.error}}return function(){var X,G,H;try{for(var j=fa(c),fe=j.next();!fe.done;fe=j.next()){var _e=fe.value;(H=T==null?void 0:T.removeEventListener)===null||H===void 0||H.call(T,_e,I)}}catch(pe){X={error:pe}}finally{try{fe&&!fe.done&&(G=j.return)&&G.call(j)}finally{if(X)throw X.error}}}}},[c],d)}var oy=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c};function uy(i){var a=O.useRef(0),r=oy(O.useState(i),2),o=r[0],u=r[1],c=O.useCallback(function(d){cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){u(d)})},[]);return jn(function(){cancelAnimationFrame(a.current)}),[o,c]}var ly=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},cy={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},fy=function(i){var a=ly(uy(cy),2),r=a[0],o=a[1];return la("mousemove",function(u){var c=u.screenX,d=u.screenY,g=u.clientX,y=u.clientY,v=u.pageX,w=u.pageY,S={screenX:c,screenY:d,clientX:g,clientY:y,pageX:v,pageY:w,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},C=Cr(i);if(C){var E=C.getBoundingClientRect(),T=E.left,I=E.top,M=E.width,N=E.height;S.elementPosX=T+window.pageXOffset,S.elementPosY=I+window.pageYOffset,S.elementX=v-S.elementPosX,S.elementY=w-S.elementPosY,S.elementW=M,S.elementH=N}o(S)},{target:function(){return document}}),r},yu={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(i){(function(){var a={}.hasOwnProperty;function r(){for(var o=[],u=0;udy());let o=(await Promise.all(a)).reduce((u,c)=>u.concat(c),[]);return o=gy(o),o.map(u=>kn(vn({},u),{uniqId:u.param+"-"+crypto.randomUUID()}))}function gy(i){const a=new Set;return i=i.filter(r=>{const{param:o}=r;return a.has(o)?(console.log("[bilibili-app-recommend]: [uniqRecList]: duplicate",r),!1):(a.add(o),!0)}),i}const wu="_toast-container_9119l_1";var nO={toastContainer:wu};function Lt(i,a=2e3){const r=zn.default(`
${i}
`);r.appendTo(document.body),setTimeout(()=>r.remove(),a)}const vy="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",_y="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function Su(){return Lt(vy)}function xu(){return Lt(_y)}async function my(){var y,v;const a=(await Pi.default.get("https://passport.bilibili.com/login/app/third",{params:{appkey:"27eb53fc9058f8c3",api:"https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png",sign:"04224646d1fea004e79606d3b038c84a"},withCredentials:!0})).data;if(!((y=a==null?void 0:a.data)!=null&&y.has_login))return{errmsg:"\u4F60\u5FC5\u987B\u767B\u5F55B\u7AD9\u4E4B\u540E\u624D\u80FD\u4F7F\u7528\u6388\u6743",json:a};if(!((v=a==null?void 0:a.data)!=null&&v.confirm_uri))return{errmsg:"\u65E0\u6CD5\u83B7\u5F97\u6388\u6743\u7F51\u5740",json:a};const r=a.data.confirm_uri;let o;const u=new Promise(w=>{window.addEventListener("message",S=>{if(S.origin!="https://www.mcbbs.net"||!S.data)return;const C=S.data.match(/access_key=([0-9a-z]{32})/);if(!C||!C[1])return w({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});w(C[1])}),o=setTimeout(()=>{w({errmsg:"\u83B7\u53D6\u6388\u6743\u8D85\u65F6"})},5e3)}),c=zn.default(`