// ==UserScript== // @name bilibili-app-recommend // @namespace https://magicdawn.fun // @version 0.4.4 // @author magicdawn // @description 为B站首页添加像App一样的推荐 // @license MIT // @homepageURL https://github.com/magicdawn/bilibili-app-recommend // @supportURL https://github.com/magicdawn/bilibili-app-recommend/issues // @match *://www.bilibili.com/ // @match *://www.bilibili.com/?* // @match https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png // @match https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?* // @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.2.0/umd/react.production.min.js // @require https://unpkg.com/react-dom@18.2.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== // use vite-plugin-monkey@2.1.1 at 2022-09-20T16:35:14.910Z ;(({ css = "" }) => { const style = document.createElement("style"); style.innerText = css; style.dataset.source = "vite-plugin-monkey"; document.head.appendChild(style); })({ "css": "._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}._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}._bili-video-card_15xx7_1{position:relative}._image-wrapper_15xx7_4{border-radius:6px;overflow:hidden}._preview-card-wrapper_15xx7_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}._preview-card-wrapper_15xx7_8 ._preview-card-inner_15xx7_21{width:100%;height:100%}._watch-later_15xx7_25{z-index:3}._badge_15xx7_28{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_15xx7_36{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_15xx7_51{color:default}._btn-dislike_15xx7_54{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_15xx7_54 ._btn-dislike-icon_15xx7_69{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_15xx7_54 ._btn-dislike-tip_15xx7_76{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_15xx7_91{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_15xx7_91{border:1px solid #333}._disliked-wrapper_15xx7_91 ._dislike-content-cover_15xx7_105{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_15xx7_91 ._dislike-content-cover_15xx7_105 ._dislike-content-cover-inner_15xx7_111{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_15xx7_91 ._dislike-content-cover_15xx7_105 ._dislike-content-cover-inner_15xx7_111 ._dislike-icon_15xx7_122{color:inherit}._disliked-wrapper_15xx7_91 ._dislike-content-cover_15xx7_105 ._dislike-content-cover-inner_15xx7_111 ._dislike-reason_15xx7_125{font-size:20px;text-align:center}._disliked-wrapper_15xx7_91 ._dislike-content-cover_15xx7_105 ._dislike-content-cover-inner_15xx7_111 ._dislike-desc_15xx7_129{font-size:16px;text-align:center}._disliked-wrapper_15xx7_91 ._dislike-content-action_15xx7_133{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_15xx7_91 ._dislike-content-action_15xx7_133{border-top:1px solid #333}._disliked-wrapper_15xx7_91 ._dislike-content-action_15xx7_133 button{font-size:18px;color:inherit}._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_20olc_1{color:default}@media (min-width: 2200px){._video-card-list_20olc_5.is-full{grid-column:span 7!important}._video-card-list_20olc_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_20olc_5.is-full .video-card-body.more-class1.more-class2>*{display:block!important}._video-card-list_20olc_5.is-full .video-card-body.more-class1.more-class2>*:nth-of-type(1n + 15){display:none!important}}._expand-btn_20olc_19{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_20olc_19 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_20olc_19 svg._expanded_20olc_30{transform:rotate(0)}.primary-btn[disabled]:active,.primary-btn[disabled]:hover{cursor:wait;background-color:inherit}\n" }); var ph=Object.defineProperty;var mh=(v,V,de)=>V in v?ph(v,V,{enumerable:!0,configurable:!0,writable:!0,value:de}):v[V]=de;var Sn=(v,V,de)=>(mh(v,typeof V!="symbol"?V+"":V,de),de);(function(v,V,de,ms){"use strict";const $e=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},ft=$e(v),gs=$e(V),dt=$e(de),vs=$e(ms);var ys=typeof global=="object"&&global&&global.Object===Object&&global;const Tn=ys;var bs=typeof self=="object"&&self&&self.Object===Object&&self,_s=Tn||bs||Function("return this")();const X=_s;var ws=X.Symbol;const J=ws;var xn=Object.prototype,Ss=xn.hasOwnProperty,Ts=xn.toString,Ce=J?J.toStringTag:void 0;function xs(e){var t=Ss.call(e,Ce),n=e[Ce];try{e[Ce]=void 0;var r=!0}catch{}var i=Ts.call(e);return r&&(t?e[Ce]=n:delete e[Ce]),i}var Es=Object.prototype,Cs=Es.toString;function Os(e){return Cs.call(e)}var As="[object Null]",Ps="[object Undefined]",En=J?J.toStringTag:void 0;function we(e){return e==null?e===void 0?Ps:As:En&&En in Object(e)?xs(e):Os(e)}function Se(e){return e!=null&&typeof e=="object"}var Rs="[object Symbol]";function Be(e){return typeof e=="symbol"||Se(e)&&we(e)==Rs}function Ms(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n0){if(++t>=fo)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function go(e){return function(){return e}}var vo=function(){try{var e=pe(Object,"defineProperty");return e({},"",{}),e}catch{}}();const ze=vo;var yo=ze?function(e,t){return ze(e,"toString",{configurable:!0,enumerable:!1,value:go(t),writable:!0})}:Ys,bo=mo(yo);const _o=bo;var wo=9007199254740991,So=/^(?:0|[1-9]\d*)$/;function vt(e,t){var n=typeof e;return t=t==null?wo:t,!!t&&(n=="number"||n!="symbol"&&So.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Ao}function Po(e){return e!=null&&bt(e.length)&&!Rn(e)}var Ro=Object.prototype;function Mo(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Ro;return e===n}function Do(e,t){for(var n=-1,r=Array(e);++n-1}function Ka(e,t){var n=this.__data__,r=We(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ne(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(a)?t>1?Yn(a,t-1,n,r,i):Hn(i,a):r||(i[i.length]=a)}return i}function fc(e){var t=e==null?0:e.length;return t?Yn(e,1):[]}function dc(e){return _o(Oo(e,void 0,fc),e+"")}function hc(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r=r?e:hc(e,t,n)}var mc="\\ud800-\\udfff",gc="\\u0300-\\u036f",vc="\\ufe20-\\ufe2f",yc="\\u20d0-\\u20ff",bc=gc+vc+yc,_c="\\ufe0e\\ufe0f",wc="\\u200d",Sc=RegExp("["+wc+mc+bc+_c+"]");function Et(e){return Sc.test(e)}function Tc(e){return e.split("")}var Gn="\\ud800-\\udfff",xc="\\u0300-\\u036f",Ec="\\ufe20-\\ufe2f",Cc="\\u20d0-\\u20ff",Oc=xc+Ec+Cc,Ac="\\ufe0e\\ufe0f",Pc="["+Gn+"]",Ct="["+Oc+"]",Ot="\\ud83c[\\udffb-\\udfff]",Rc="(?:"+Ct+"|"+Ot+")",Kn="[^"+Gn+"]",Vn="(?:\\ud83c[\\udde6-\\uddff]){2}",Xn="[\\ud800-\\udbff][\\udc00-\\udfff]",Mc="\\u200d",Jn=Rc+"?",Zn="["+Ac+"]?",Dc="(?:"+Mc+"(?:"+[Kn,Vn,Xn].join("|")+")"+Zn+Jn+")*",Lc=Zn+Jn+Dc,Nc="(?:"+[Kn+Ct+"?",Ct,Vn,Xn,Pc].join("|")+")",kc=RegExp(Ot+"(?="+Ot+")|"+Nc+Lc,"g");function Fc(e){return e.match(kc)||[]}function Ic(e){return Et(e)?Fc(e):Tc(e)}function jc(){this.__data__=new ne,this.size=0}function $c(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Bc(e){return this.__data__.get(e)}function zc(e){return this.__data__.has(e)}var Wc=200;function Hc(e,t){var n=this.__data__;if(n instanceof ne){var r=n.__data__;if(!Pe||r.lengtha))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var f=-1,h=!0,p=n&hl?new Ye:void 0;for(s.set(e,t),s.set(t,e);++f=t||L<0||f&&k>=s}function b(){var T=Dt();if(y(T))return M(T);a=setTimeout(b,g(T))}function M(T){return a=void 0,h&&r?p(T):(r=i=void 0,o)}function D(){a!==void 0&&clearTimeout(a),c=0,r=l=i=a=void 0}function E(){return a===void 0?o:M(Dt())}function x(){var T=Dt(),L=y(T);if(r=arguments,i=this,l=T,L){if(a===void 0)return d(l);if(f)return clearTimeout(a),a=setTimeout(b,t),p(l)}return a===void 0&&(a=setTimeout(b,t)),o}return x.cancel=D,x.flush=E,x}function Yl(e,t){return dr(e,t)}function Gl(e,t,n,r){if(!ae(e))return e;t=Ue(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++iVl)return n;do t%2&&(n+=e),t=Xl(t/2),t&&(e+=e);while(t);return n}var Jl=Bl("length");const Zl=Jl;var mr="\\ud800-\\udfff",Ql="\\u0300-\\u036f",ql="\\ufe20-\\ufe2f",eu="\\u20d0-\\u20ff",tu=Ql+ql+eu,nu="\\ufe0e\\ufe0f",ru="["+mr+"]",Lt="["+tu+"]",Nt="\\ud83c[\\udffb-\\udfff]",iu="(?:"+Lt+"|"+Nt+")",gr="[^"+mr+"]",vr="(?:\\ud83c[\\udde6-\\uddff]){2}",yr="[\\ud800-\\udbff][\\udc00-\\udfff]",su="\\u200d",br=iu+"?",_r="["+nu+"]?",ou="(?:"+su+"(?:"+[gr,vr,yr].join("|")+")"+_r+br+")*",au=_r+br+ou,cu="(?:"+[gr+Lt+"?",Lt,vr,yr,ru].join("|")+")",wr=RegExp(Nt+"(?="+Nt+")|"+cu+au,"g");function lu(e){for(var t=wr.lastIndex=0;wr.test(e);)++t;return t}function Sr(e){return Et(e)?lu(e):Zl(e)}var uu=Math.ceil;function fu(e,t){t=t===void 0?" ":ht(t);var n=t.length;if(n<2)return n?pr(t,e):t;var r=pr(t,uu(e/Sr(t)));return Et(t)?pc(Ic(r),0,e).join(""):r.slice(0,e)}function du(e,t,n){e=Wn(e),t=Us(t);var r=t?Sr(e):0;return t&&re&&(jt.has(e)?jt.get(e):It(e)===Object.prototype||It(e)===Array.prototype),Ke=e=>typeof e=="object"&&e!==null,yu=(e,t)=>{let n=!1;const r=(s,o,a)=>{if(!n){let l=s.a.get(e);l||(l=new Set,s.a.set(e,l)),a&&l.has(kt)||l.add(o)}},i={f:t,get(s,o){return o===Ft?e:(r(this,o),Er(s[o],this.a,this.c))},has(s,o){return o===vu?(n=!0,this.a.delete(e),!0):(r(this,o),o in s)},getOwnPropertyDescriptor(s,o){return r(this,o,!0),Object.getOwnPropertyDescriptor(s,o)},ownKeys(s){return r(this,kt),Reflect.ownKeys(s)}};return t&&(i.set=i.deleteProperty=()=>!1),i},$t=e=>e[Ft]||e,Er=(e,t,n)=>{if(!xr(e))return e;const r=$t(e),i=(o=>Object.isFrozen(o)||Object.values(Object.getOwnPropertyDescriptors(o)).some(a=>!a.writable))(r);let s=n&&n.get(r);return s&&s.f===i||(s=yu(r,i),s.p=new Proxy(i?(o=>{if(Array.isArray(o))return Array.from(o);const a=Object.getOwnPropertyDescriptors(o);return Object.values(a).forEach(l=>{l.configurable=!0}),Object.create(It(o),a)})(r):r,s),n&&n.set(r,s)),s.a=t,s.c=n,s.p},bu=(e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some((i,s)=>i!==r[s])},Cr=(e,t,n,r)=>{if(Object.is(e,t))return!1;if(!Ke(e)||!Ke(t))return!0;const i=n.get($t(e));if(!i)return!0;if(r){const o=r.get(e);if(o&&o.n===t)return o.g;r.set(e,{n:t,g:!1})}let s=null;for(const o of i){const a=o===kt?bu(e,t):Cr(e[o],t[o],n,r);if(a!==!0&&a!==!1||(s=a),s)break}return s===null&&(s=!0),r&&r.set(e,{n:t,g:s}),s},_u=e=>xr(e)&&e[Ft]||null,Or=(e,t=!0)=>{jt.set(e,t)},wu=(e,t)=>{const n=[],r=new WeakSet,i=(s,o)=>{if(r.has(s))return;Ke(s)&&r.add(s);const a=Ke(s)&&t.get($t(s));a?a.forEach(l=>{i(s[l],o?[...o,l]:[l])}):o&&n.push(o)};return i(e),n};var Su=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ar={exports:{}},Pr={};/** * @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 Te=ft.default;function xu(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Eu=typeof Object.is=="function"?Object.is:xu,Cu=Te.useState,Ou=Te.useEffect,Au=Te.useLayoutEffect,Pu=Te.useDebugValue;function Ru(e,t){var n=t(),r=Cu({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Au(function(){i.value=n,i.getSnapshot=t,Bt(i)&&s({inst:i})},[e,n,t]),Ou(function(){return Bt(i)&&s({inst:i}),e(function(){Bt(i)&&s({inst:i})})},[e]),Pu(n),n}function Bt(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Eu(e,n)}catch{return!0}}function Mu(e,t){return t()}var Du=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Mu:Ru;Pr.useSyncExternalStore=Te.useSyncExternalStore!==void 0?Te.useSyncExternalStore:Du,function(e){e.exports=Pr}(Ar);const Lu=Tu(Ar.exports),Nu=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("VERSION"):Symbol(),Z=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("LISTENERS"):Symbol(),Ve=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("SNAPSHOT"):Symbol(),ku=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("HANDLER"):Symbol(),Re=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_RESULT"):Symbol(),Rr=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_ERROR"):Symbol(),Mr=new WeakSet,zt=e=>typeof e=="object"&&e!==null,Fu=e=>zt(e)&&!Mr.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer),Dr=new WeakMap;let Lr=1;const Nr=new WeakMap;function Xe(e={}){if(!zt(e))throw new Error("object required");const t=Dr.get(e);if(t)return t;let n=Lr;const r=new Set,i=(h,p=++Lr)=>{n!==p&&(n=p,r.forEach(d=>d(h,p)))},s=new Map,o=h=>{let p=s.get(h);return p||(p=(d,g)=>{const y=[...d];y[1]=[h,...y[1]],i(y,g)},s.set(h,p)),p},a=h=>{const p=s.get(h);return s.delete(h),p},l=(h,p)=>{const d=Nr.get(p);if((d==null?void 0:d[0])===n)return d[1];const g=Array.isArray(h)?[]:Object.create(Object.getPrototypeOf(h));return Or(g,!0),Nr.set(p,[n,g]),Reflect.ownKeys(h).forEach(y=>{const b=Reflect.get(h,y,p);if(Mr.has(b))Or(b,!1),g[y]=b;else if(b instanceof Promise)if(Re in b)g[y]=b[Re];else{const M=b[Rr]||b;Object.defineProperty(g,y,{get(){if(Re in b)return b[Re];throw M}})}else b!=null&&b[Z]?g[y]=b[Ve]:g[y]=b}),Object.freeze(g),g},c=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e)),u={get(h,p,d){return p===Nu?n:p===Z?r:p===Ve?l(h,d):p===ku?u:Reflect.get(h,p,d)},deleteProperty(h,p){const d=Reflect.get(h,p),g=d==null?void 0:d[Z];g&&g.delete(a(p));const y=Reflect.deleteProperty(h,p);return y&&i(["delete",[p],d]),y},is:Object.is,canProxy:Fu,set(h,p,d,g){var y;const b=Reflect.has(h,p),M=Reflect.get(h,p,g);if(b&&this.is(M,d))return!0;const D=M==null?void 0:M[Z];D&&D.delete(a(p)),zt(d)&&(d=_u(d)||d);let E;return(y=Object.getOwnPropertyDescriptor(h,p))!=null&&y.set?E=d:d instanceof Promise?E=d.then(x=>(E[Re]=x,i(["resolve",[p],x]),x)).catch(x=>{E[Rr]=x,i(["reject",[p],x])}):d!=null&&d[Z]?(E=d,E[Z].add(o(p))):this.canProxy(d)?(E=Xe(d),E[Z].add(o(p))):E=d,Reflect.set(h,p,E,g),i(["set",[p],d,M]),!0}},f=new Proxy(c,u);return Dr.set(e,f),Reflect.ownKeys(e).forEach(h=>{const p=Object.getOwnPropertyDescriptor(e,h);p.get||p.set?Object.defineProperty(c,h,p):f[h]=e[h]}),f}function kr(e,t,n){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[Z])&&console.warn("Please use proxy object");let r;const i=[],s=o=>{if(i.push(o),n){t(i.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,t(i.splice(0))}))};return e[Z].add(s),()=>{e[Z].delete(s)}}function Fr(e){return({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[Ve])&&console.warn("Please use proxy object"),e[Ve]}const{useSyncExternalStore:Iu}=Lu,ju=(e,t)=>{const n=v.useRef();v.useEffect(()=>{n.current=wu(e,t)}),v.useDebugValue(n.current)};function Wt(e,t){const n=t==null?void 0:t.sync,r=v.useRef(),i=v.useRef();let s=!0;const o=Iu(v.useCallback(c=>{const u=kr(e,c,n);return c(),u},[e,n]),()=>{const c=Fr(e);try{if(!s&&r.current&&i.current&&!Cr(r.current,c,i.current,new WeakMap))return r.current}catch{}return c},()=>Fr(e));s=!1;const a=new WeakMap;v.useEffect(()=>{r.current=o,i.current=a}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&ju(o,a);const l=v.useMemo(()=>new WeakMap,[]);return Er(o,a,l)}const Ir={accessKey:"",useNarrowMode:!1,initialShowMore:!1},jr=Object.keys(Ir),Q=Xe(Ir),Ht=function(){return Wt(Q)},$r="bilibili-app-recommend.config";function $u(){const e=GM_getValue($r);e&&typeof e=="object"&&Object.assign(Q,Tr(e,jr)),kr(Q,()=>{Bu()})}function Bu(){GM_setValue($r,Tr(Q,jr))}function Br(e){Object.assign(Q,e)}$u();var Ut={exports:{}};const zu=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),zr=()=>{const e=new Error("Delay aborted");return e.name="AbortError",e},Wr=({clearTimeout:e,setTimeout:t,willResolve:n})=>(r,{value:i,signal:s}={})=>{if(s&&s.aborted)return Promise.reject(zr());let o,a,l;const c=e||clearTimeout,u=()=>{c(o),l(zr())},f=()=>{s&&s.removeEventListener("abort",u)},h=new Promise((p,d)=>{a=()=>{f(),n?p(i):d(i)},l=d,o=(t||setTimeout)(a,r)});return s&&s.addEventListener("abort",u,{once:!0}),h.clear=()=>{c(o),o=null,a()},h},Hr=e=>{const t=Wr({...e,willResolve:!0});return t.reject=Wr({...e,willResolve:!1}),t.range=(n,r,i)=>t(zu(n,r),i),t},Yt=Hr();Yt.createWithTimers=Hr,Ut.exports=Yt,Ut.exports.default=Yt;var Gt,Ur=gs.default;Gt=Ur.createRoot,Ur.hydrateRoot;const Wu="https://api.bilibili.com",Yr="https://app.bilibili.com",Kt=dt.default.create({baseURL:Wu});Kt.interceptors.request.use(function(e){var t;return(t=e.params)!=null&&t._||(e.params={...e.params,_:Date.now()}),e},function(e){return Promise.reject(e)});const Je=dt.default.create({adapter:vs.default});Je.interceptors.request.use(function(e){return e.params={access_key:Q.accessKey||"",...e.params},e},function(e){return Promise.reject(e)}),Je.interceptors.response.use(e=>{if(e.config.responseType==="json"&&e.data&&e.data instanceof ArrayBuffer){const t=new TextDecoder,n=new Uint8Array(e.data),r=t.decode(n);e.data=r;try{e.data=JSON.parse(r)}catch{}}return e});async function Hu(){return(await Je.get(Yr+"/x/feed/index",{responseType:"json",params:{build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)+"0"+(Math.random()*10).toFixed(0)}})).data.data}async function Uu(){return Vt(2)}async function Vt(e){const t=new Array(e).fill(0).map(i=>Hu());let r=(await Promise.all(t)).reduce((i,s)=>i.concat(s),[]);return r=Yu(r),r.map(i=>({...i,uniqId:i.param+"-"+crypto.randomUUID()}))}function Yu(e){const t=new Set;return e=e.filter(n=>{const{param:r}=n;return t.has(r)?(console.log("[bilibili-app-recommend]: [uniqRecList]: duplicate",n),!1):(t.add(r),!0)}),e}const Gr="_toast-container_9119l_1",yh={toastContainer:Gr};function ie(e,t=2e3){const n=document.createElement("div");n.className=Gr,n.innerText=e,document.body.appendChild(n),setTimeout(()=>n.remove(),t)}const Gu="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",Ku="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function Kr(){return ie(Gu)}function Vr(){return ie(Ku)}async function Vu(){var l,c;const t=(await dt.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(!((l=t==null?void 0:t.data)!=null&&l.has_login))return{errmsg:"\u4F60\u5FC5\u987B\u767B\u5F55B\u7AD9\u4E4B\u540E\u624D\u80FD\u4F7F\u7528\u6388\u6743",json:t};if(!((c=t==null?void 0:t.data)!=null&&c.confirm_uri))return{errmsg:"\u65E0\u6CD5\u83B7\u5F97\u6388\u6743\u7F51\u5740",json:t};const n=t.data.confirm_uri;let r;const i=new Promise(u=>{window.addEventListener("message",h=>{if(h.origin!="https://www.mcbbs.net"||!h.data)return;const p=h.data.match(/access_key=([0-9a-z]{32})/);if(!p||!p[1])return u({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});u(p[1])});let f=Number(GM_getValue("authTimeout")||10);isNaN(f)&&(f=10),console.log("[bilibili-app-recommend]: authTimeout = %s(s)",f),r=setTimeout(()=>{u({errmsg:"\u83B7\u53D6\u6388\u6743\u8D85\u65F6"})},f*1e3)}),s=document.createElement("iframe");s.src=n,s.style.display="none",document.body.appendChild(s);function o(){s.remove(),r&&(clearTimeout(r),r=null)}const a=await i;return o(),a}async function Xu(){const e=await Vu();if(typeof e=="object"&&"errmsg"in e){ie(e.errmsg);return}const t=e;return Q.accessKey=t,ie("\u83B7\u53D6\u6210\u529F"),t}function Ju(){Q.accessKey="",ie("\u5DF2\u5220\u9664 access_key")}var Zu=function(t){return function(n,r){var i=v.useRef(!1);t(function(){return function(){i.current=!1}},[]),t(function(){if(!i.current)i.current=!0;else return n()},r)}},Xt=function(t){return typeof t=="function"},Qu=function(t){return typeof t=="string"},Xr=function(t){return typeof t=="number"};function z(e){var t=v.useRef(e);t.current=v.useMemo(function(){return e},[e]);var n=v.useRef();return n.current||(n.current=function(){for(var r=[],i=0;i0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Jr=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t-1&&(s=setTimeout(function(){Qe.delete(t)},n)),Qe.set(t,Ze(Ze({},r),{timer:s}))},rf=function(t){return Qe.get(t)},qe=new Map,sf=function(t){return qe.get(t)},of=function(t,n){qe.set(t,n),n.then(function(r){return qe.delete(t),r}).catch(function(){qe.delete(t)})},ve={},af=function(t,n){ve[t]&&ve[t].forEach(function(r){return r(n)})},Qt=function(t,n){return ve[t]||(ve[t]=[]),ve[t].push(n),function(){var i=ve[t].indexOf(n);ve[t].splice(i,1)}},cf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},lf=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},hf=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},xf=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Lf=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},$f=function(){var t=jf(v.useState({}),2),n=t[1];return v.useCallback(function(){return n({})},[])};const Bf=$f;var le=globalThis&&globalThis.__assign||function(){return le=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},xe=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},ei=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Zf=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function ni(e,t){e===void 0&&(e=!1);var n=Qf(v.useState(e),2),r=n[0],i=n[1],s=v.useMemo(function(){var o=t===void 0?!e:t,a=function(){return i(function(h){return h===e?o:e})},l=function(h){return i(h)},c=function(){return i(e)},u=function(){return i(o)};return{toggle:a,set:l,setLeft:c,setRight:u}},[]);return[r,s]}var qf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function ed(e){e===void 0&&(e=!1);var t=qf(ni(e),2),n=t[0],r=t[1],i=r.toggle,s=r.set,o=v.useMemo(function(){var a=function(){return s(!0)},l=function(){return s(!1)};return{toggle:i,set:function(u){return s(!!u)},setTrue:a,setFalse:l}},[]);return[n,o]}function et(e,t){if(!!Le){if(!e)return t;var n;return Xt(e)?n=e():"current"in e?n=e.current:n=e,n}}var td=function(t){var n=function(i,s,o){var a=v.useRef(!1),l=v.useRef([]),c=v.useRef([]),u=v.useRef();t(function(){var f,h=Array.isArray(o)?o:[o],p=h.map(function(d){return et(d)});if(!a.current){a.current=!0,l.current=p,c.current=s,u.current=i();return}(p.length!==l.current.length||!Zt(p,l.current)||!Zt(s,c.current))&&((f=u.current)===null||f===void 0||f.call(u),l.current=p,c.current=s,u.current=i())}),De(function(){var f;(f=u.current)===null||f===void 0||f.call(u),a.current=!1})};return n},nd=td(v.useEffect);const ri=nd;var ii={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Su,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",l="hour",c="day",u="week",f="month",h="quarter",p="year",d="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,M={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("_")},D=function(P,S,_){var C=String(P);return!C||C.length>=S?P:""+Array(S+1-C.length).join(_)+P},E={s:D,z:function(P){var S=-P.utcOffset(),_=Math.abs(S),C=Math.floor(_/60),w=_%60;return(S<=0?"+":"-")+D(C,2,"0")+":"+D(w,2,"0")},m:function P(S,_){if(S.date()<_.date())return-P(_,S);var C=12*(_.year()-S.year())+(_.month()-S.month()),w=S.clone().add(C,f),O=_-w<0,A=S.clone().add(C+(O?-1:1),f);return+(-(C+(_-w)/(O?w-A:A-w))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:f,y:p,w:u,d:c,D:d,h:l,m:a,s:o,ms:s,Q:h}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},x="en",T={};T[x]=M;var L=function(P){return P instanceof Ee},k=function P(S,_,C){var w;if(!S)return x;if(typeof S=="string"){var O=S.toLowerCase();T[O]&&(w=O),_&&(T[O]=_,w=O);var A=S.split("-");if(!w&&A.length>1)return P(A[0])}else{var N=S.name;T[N]=S,w=N}return!C&&w&&(x=w),w||!C&&x},I=function(P,S){if(L(P))return P.clone();var _=typeof S=="object"?S:{};return _.date=P,_.args=arguments,new Ee(_)},F=E;F.l=k,F.i=L,F.w=function(P,S){return I(P,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var Ee=function(){function P(_){this.$L=k(_.locale,null,!0),this.parse(_)}var S=P.prototype;return S.parse=function(_){this.$d=function(C){var w=C.date,O=C.utc;if(w===null)return new Date(NaN);if(F.u(w))return new Date;if(w instanceof Date)return new Date(w);if(typeof w=="string"&&!/Z$/i.test(w)){var A=w.match(y);if(A){var N=A[2]-1||0,B=(A[7]||"0").substring(0,3);return O?new Date(Date.UTC(A[1],N,A[3]||1,A[4]||0,A[5]||0,A[6]||0,B)):new Date(A[1],N,A[3]||1,A[4]||0,A[5]||0,A[6]||0,B)}}return new Date(w)}(_),this.$x=_.x||{},this.init()},S.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},S.$utils=function(){return F},S.isValid=function(){return this.$d.toString()!==g},S.isSame=function(_,C){var w=I(_);return this.startOf(C)<=w&&w<=this.endOf(C)},S.isAfter=function(_,C){return I(_)0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};const tn=function(e,t){var n=t||{},r=n.onEnter,i=n.onLeave,s=n.onChange,o=rd(ed(!1),2),a=o[0],l=o[1],c=l.setTrue,u=l.setFalse;return tt("mouseenter",function(){r==null||r(),c(),s==null||s(!0)},{target:e}),tt("mouseleave",function(){i==null||i(),u(),s==null||s(!1)},{target:e}),a};var id=function(t,n){return n===void 0&&(n=[]),Yl(t,n)},sd=function(t,n,r){var i=v.useRef(),s=v.useRef(0);id(n,i.current)||(i.current=n,s.current+=1),ri(t,[s.current],r)};const od=sd;var nn=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ad={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},rn={ctrl:function(t){return t.ctrlKey},shift:function(t){return t.shiftKey},alt:function(t){return t.altKey},meta:function(t){return t.metaKey}};function cd(e){var t=Object.keys(rn).reduce(function(n,r){return rn[r](e)?n+1:n},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function oi(e,t,n){var r,i;if(!e.key)return!1;if(Xr(t))return e.keyCode===t;var s=t.split("."),o=0;try{for(var a=nn(s),l=a.next();!l.done;l=a.next()){var c=l.value,u=rn[c],f=ad[c.toLowerCase()];(u&&u(e)||f&&f===e.keyCode)&&o++}}catch(h){r={error:h}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return n?o===s.length&&cd(e)===s.length:o===s.length}function ld(e,t){return Xt(e)?e:Qu(e)||Xr(e)?function(n){return oi(n,e,t)}:Array.isArray(e)?function(n){return e.some(function(r){return oi(n,r,t)})}:e?function(){return!0}:function(){return!1}}var ud=["keydown"];function ye(e,t,n){var r=n||{},i=r.events,s=i===void 0?ud:i,o=r.target,a=r.exactMatch,l=a===void 0?!1:a,c=Me(t),u=Me(e);od(function(){var f,h,p,d=et(o,window);if(!!d){var g=function(E){var x,T=ld(u.current,l);if(T(E))return(x=c.current)===null||x===void 0?void 0:x.call(c,E)};try{for(var y=nn(s),b=y.next();!b.done;b=y.next()){var M=b.value;(p=d==null?void 0:d.addEventListener)===null||p===void 0||p.call(d,M,g)}}catch(D){f={error:D}}finally{try{b&&!b.done&&(h=y.return)&&h.call(y)}finally{if(f)throw f.error}}return function(){var D,E,x;try{for(var T=nn(s),L=T.next();!L.done;L=T.next()){var k=L.value;(x=d==null?void 0:d.removeEventListener)===null||x===void 0||x.call(d,k,g)}}catch(I){D={error:I}}finally{try{L&&!L.done&&(E=T.return)&&E.call(T)}finally{if(D)throw D.error}}}}},[s],o)}var fd=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function dd(e){var t=v.useRef(0),n=fd(v.useState(e),2),r=n[0],i=n[1],s=v.useCallback(function(o){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(o)})},[]);return De(function(){cancelAnimationFrame(t.current)}),[r,s]}var hd=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},pd={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN};const md=function(e){var t=hd(dd(pd),2),n=t[0],r=t[1];return tt("mousemove",function(i){var s=i.screenX,o=i.screenY,a=i.clientX,l=i.clientY,c=i.pageX,u=i.pageY,f={screenX:s,screenY:o,clientX:a,clientY:l,pageX:c,pageY:u,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},h=et(e);if(h){var p=h.getBoundingClientRect(),d=p.left,g=p.top,y=p.width,b=p.height;f.elementPosX=d+window.pageXOffset,f.elementPosY=g+window.pageYOffset,f.elementX=c-f.elementPosX,f.elementY=u-f.elementPosY,f.elementW=y,f.elementH=b}r(f)},{target:function(){return document}}),n};var ai={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;ii,[i]);const s=m("button",{className:U("primary-btn",ci),onClick:i.toggle,children:m("svg",{className:U({[li]:r}),children:m("use",{xlinkHref:"#widget-arrow"})})});return R(it,{children:[s,r&&t]})});var Y={exports:{}},Sd="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Td=Sd,xd=Td;function di(){}function hi(){}hi.resetWarningCache=di;var Ed=function(){function e(r,i,s,o,a,l){if(l!==xd){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:hi,resetWarningCache:di};return n.PropTypes=n,n};Y.exports=Ed();class sn extends v.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const n={get passive(){t=!0}};try{document.addEventListener("test",null,n),document.removeEventListener("test",null,n)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const n=this.props.getScrollParent&&this.props.getScrollParent();return n!=null?n:t&&t.parentNode}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let n=window;this.props.useWindow===!1&&(n=t),n.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),n.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),n.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(t){t.deltaY===1&&!this.isPassiveSupported()&&t.preventDefault()}scrollListener(){const t=this.scrollComponent,n=window,r=this.getParentElement(t);let i;if(this.props.useWindow){const s=document.documentElement||document.body.parentNode||document.body,o=n.pageYOffset!==void 0?n.pageYOffset:s.scrollTop;this.props.isReverse?i=o:i=this.calculateOffset(t,o)}else this.props.isReverse?i=r.scrollTop:i=t.scrollHeight-r.scrollTop-r.clientHeight;i{this.scrollComponent=b,u&&u(b)};const y=[n];return i&&(a?o?y.unshift(a):y.push(a):this.defaultLoader&&(o?y.unshift(this.defaultLoader):y.push(this.defaultLoader))),ft.default.createElement(r,g,y)}}Sn(sn,"propTypes",{children:Y.exports.node.isRequired,element:Y.exports.node,hasMore:Y.exports.bool,initialLoad:Y.exports.bool,isReverse:Y.exports.bool,loader:Y.exports.node,loadMore:Y.exports.func.isRequired,pageStart:Y.exports.number,ref:Y.exports.func,getScrollParent:Y.exports.func,threshold:Y.exports.number,useCapture:Y.exports.bool,useWindow:Y.exports.bool}),Sn(sn,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});let Fe=0;const Cd=()=>{Fe++,document.body.style.overflow="hidden"},Od=()=>{Fe--,Fe<0&&(Fe=0),Fe===0&&(document.body.style.overflow="overlay")},pi=()=>document.body.classList.contains("dark"),mi=Xe({value:pi()}),Ad=function(){return Wt(mi).value};new MutationObserver(function(){mi.value=pi()}).observe(document.body,{attributes:!0,attributeFilter:["class"]});function gi({show:e,onHide:t,children:n,clsModalMask:r,clsModal:i,hideWhenMaskOnClick:s=!1}){v.useLayoutEffect(()=>{e?Cd():Od()},[e]);const o=v.useRef(null),a=Ad(),{bg:l,c}=v.useMemo(()=>{const d=window.getComputedStyle(document.body)["background-color"],g=window.getComputedStyle(document.body).color;return{bg:d,c:g}},[a]),u=v.useMemo(()=>a?{"--bg":l,"--c":c,backgroundColor:l,color:c}:{},[l,c,a]),f=v.useId(),h=v.useMemo(()=>{const d=document.createElement("div");return d.setAttribute("data-id","base-modal-"+f),document.body.appendChild(d),d},[]),p=z(d=>{var g;(g=o.current)!=null&&g.contains(d.target)||s&&t()});return e?V.createPortal(m("div",{className:U(r),onClick:p,children:m("div",{className:U(i),style:u,ref:o,children:n})}),h):null}function Pd(e){const t=Xe({data:Array.from(e||[]),has(n){return this.data.some(r=>r[0]===n)},set(n,r){const i=this.data.find(s=>s[0]===n);return i?i[1]=r:this.data.push([n,r]),this},get(n){var r;return(r=this.data.find(i=>i[0]===n))==null?void 0:r[1]},delete(n){const r=this.data.findIndex(i=>i[0]===n);return r===-1?!1:(this.data.splice(r,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return{}},forEach(n){this.data.forEach(r=>{n(r[1],r[0],this)})},keys(){return this.data.map(n=>n[0]).values()},values(){return this.data.map(n=>n[1]).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(t,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(t),t}function Rd(){var t;const e=(t=document.cookie.match(/bili_jct=([0-9a-fA-F]{32})/))==null?void 0:t[1];if(!e)throw ie("\u627E\u4E0D\u5230 csrf token, \u8BF7\u68C0\u67E5\u662F\u5426\u767B\u5F55"),new Error("\u627E\u4E0D\u5230 csrf token, \u8BF7\u68C0\u67E5\u662F\u5426\u767B\u5F55");return e}const Ie=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,st=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new vi}abort(){this.signal.dispatchEvent("abort")}},Md=typeof AbortSignal=="function",Dd=typeof st.AbortSignal=="function",vi=Md?AbortSignal:Dd?st.AbortController:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(t){if(t==="abort"){this.aborted=!0;const n={type:t,target:this};this.onabort(n),this._listeners.forEach(r=>r(n),this)}}onabort(){}addEventListener(t,n){t==="abort"&&this._listeners.push(n)}removeEventListener(t,n){t==="abort"&&(this._listeners=this._listeners.filter(r=>r!==n))}},on=new Set,an=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;ot(n)&&ln(n,`${e} option`,`options.${t}`,be)},cn=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(ot(n)){const{prototype:r}=be,{get:i}=Object.getOwnPropertyDescriptor(r,e);ln(n,`${e} method`,`cache.${t}()`,i)}},Ld=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(ot(n)){const{prototype:r}=be,{get:i}=Object.getOwnPropertyDescriptor(r,e);ln(n,`${e} property`,`cache.${t}`,i)}},yi=(...e)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...e):console.error(...e)},ot=e=>!on.has(e),ln=(e,t,n,r)=>{on.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;yi(i,"DeprecationWarning",e,r)},ue=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),bi=e=>ue(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?at:null:null;class at extends Array{constructor(t){super(t),this.fill(0)}}class Nd{constructor(t){if(t===0)return[];const n=bi(t);this.heap=new n(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class be{constructor(t={}){const{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:c,disposeAfter:u,noDisposeOnSet:f,noUpdateTTL:h,maxSize:p=0,maxEntrySize:d=0,sizeCalculation:g,fetchMethod:y,fetchContext:b,noDeleteOnFetchRejection:M,noDeleteOnStaleGet:D}=t,{length:E,maxAge:x,stale:T}=t instanceof be?{}:t;if(n!==0&&!ue(n))throw new TypeError("max option must be a nonnegative integer");const L=n?bi(n):Array;if(!L)throw new Error("invalid max value: "+n);if(this.max=n,this.maxSize=p,this.maxEntrySize=d||this.maxSize,this.sizeCalculation=g||E,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=y||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=b,!this.fetchMethod&&b!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(n).fill(null),this.valList=new Array(n).fill(null),this.next=new L(n),this.prev=new L(n),this.head=0,this.tail=0,this.free=new Nd(n),this.initialFill=1,this.size=0,typeof c=="function"&&(this.dispose=c),typeof u=="function"?(this.disposeAfter=u,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!M,this.maxEntrySize!==0){if(this.maxSize!==0&&!ue(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!ue(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!l||!!T,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=ue(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=r||x||0,this.ttl){if(!ue(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const k="LRU_CACHE_UNBOUNDED";ot(k)&&(on.add(k),yi("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",k,be))}T&&an("stale","allowStale"),x&&an("maxAge","ttl"),E&&an("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new at(this.max),this.starts=new at(this.max),this.setItemTTL=(r,i,s=Ie.now())=>{if(this.starts[r]=i!==0?s:0,this.ttls[r]=i,i!==0&&this.ttlAutopurge){const o=setTimeout(()=>{this.isStale(r)&&this.delete(this.keyList[r])},i+1);o.unref&&o.unref()}},this.updateItemAge=r=>{this.starts[r]=this.ttls[r]!==0?Ie.now():0};let t=0;const n=()=>{const r=Ie.now();if(this.ttlResolution>0){t=r;const i=setTimeout(()=>t=0,this.ttlResolution);i.unref&&i.unref()}return r};this.getRemainingTTL=r=>{const i=this.keyMap.get(r);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(t||n())},this.isStale=r=>this.ttls[r]!==0&&this.starts[r]!==0&&(t||n())-this.starts[r]>this.ttls[r]}updateItemAge(t){}setItemTTL(t,n,r){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new at(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,n,r,i)=>{if(!ue(r))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(r=i(n,t),!ue(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer)");return r},this.addItemSize=(t,n)=>{this.sizes[t]=n;const r=this.maxSize-this.sizes[t];for(;this.calculatedSize>r;)this.evict(!0);this.calculatedSize+=this.sizes[t]}}removeItemSize(t){}addItemSize(t,n){}requireSize(t,n,r,i){if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let n=this.tail;!(!this.isValidIndex(n)||((t||!this.isStale(n))&&(yield n),n===this.head));)n=this.prev[n]}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let n=this.head;!(!this.isValidIndex(n)||((t||!this.isStale(n))&&(yield n),n===this.tail));)n=this.next[n]}isValidIndex(t){return this.keyMap.get(this.keyList[t])===t}*entries(){for(const t of this.indexes())yield[this.keyList[t],this.valList[t]]}*rentries(){for(const t of this.rindexes())yield[this.keyList[t],this.valList[t]]}*keys(){for(const t of this.indexes())yield this.keyList[t]}*rkeys(){for(const t of this.rindexes())yield this.keyList[t]}*values(){for(const t of this.indexes())yield this.valList[t]}*rvalues(){for(const t of this.rindexes())yield this.valList[t]}[Symbol.iterator](){return this.entries()}find(t,n={}){for(const r of this.indexes())if(t(this.valList[r],this.keyList[r],this))return this.get(this.keyList[r],n)}forEach(t,n=this){for(const r of this.indexes())t.call(n,this.valList[r],this.keyList[r],this)}rforEach(t,n=this){for(const r of this.rindexes())t.call(n,this.valList[r],this.keyList[r],this)}get prune(){return cn("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;for(const n of this.rindexes({allowStale:!0}))this.isStale(n)&&(this.delete(this.keyList[n]),t=!0);return t}dump(){const t=[];for(const n of this.indexes({allowStale:!0})){const r=this.keyList[n],i=this.valList[n],o={value:this.isBackgroundFetch(i)?i.__staleWhileFetching:i};if(this.ttls){o.ttl=this.ttls[n];const a=Ie.now()-this.starts[n];o.start=Math.floor(Date.now()-a)}this.sizes&&(o.size=this.sizes[n]),t.unshift([r,o])}return t}load(t){this.clear();for(const[n,r]of t){if(r.start){const i=Date.now()-r.start;r.start=Ie.now()-i}this.set(n,r.value,r)}}dispose(t,n,r){}set(t,n,{ttl:r=this.ttl,start:i,noDisposeOnSet:s=this.noDisposeOnSet,size:o=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL}={}){if(o=this.requireSize(t,n,o,a),this.maxEntrySize&&o>this.maxEntrySize)return this;let c=this.size===0?void 0:this.keyMap.get(t);if(c===void 0)c=this.newIndex(),this.keyList[c]=t,this.valList[c]=n,this.keyMap.set(t,c),this.next[this.tail]=c,this.prev[c]=this.tail,this.tail=c,this.size++,this.addItemSize(c,o),l=!1;else{const u=this.valList[c];n!==u&&(this.isBackgroundFetch(u)?u.__abortController.abort():s||(this.dispose(u,t,"set"),this.disposeAfter&&this.disposed.push([u,t,"set"])),this.removeItemSize(c),this.valList[c]=n,this.addItemSize(c,o)),this.moveToTail(c)}if(r!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),l||this.setItemTTL(c,r,i),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(!0),t}}evict(t){const n=this.head,r=this.keyList[n],i=this.valList[n];return this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,r,"evict"),this.disposeAfter&&this.disposed.push([i,r,"evict"])),this.removeItemSize(n),t&&(this.keyList[n]=null,this.valList[n]=null,this.free.push(n)),this.head=this.next[n],this.keyMap.delete(r),this.size--,n}has(t,{updateAgeOnHas:n=this.updateAgeOnHas}={}){const r=this.keyMap.get(t);return r!==void 0&&!this.isStale(r)?(n&&this.updateItemAge(r),!0):!1}peek(t,{allowStale:n=this.allowStale}={}){const r=this.keyMap.get(t);if(r!==void 0&&(n||!this.isStale(r))){const i=this.valList[r];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(t,n,r,i){const s=n===void 0?void 0:this.valList[n];if(this.isBackgroundFetch(s))return s;const o=new st,a={signal:o.signal,options:r,context:i},l=h=>(o.signal.aborted||this.set(t,h,a.options),h),c=h=>{if(this.valList[n]===f&&(!r.noDeleteOnFetchRejection||f.__staleWhileFetching===void 0?this.delete(t):this.valList[n]=f.__staleWhileFetching),f.__returned===f)throw h},u=h=>h(this.fetchMethod(t,s,a)),f=new Promise(u).then(l,c);return f.__abortController=o,f.__staleWhileFetching=s,f.__returned=null,n===void 0?(this.set(t,f,a.options),n=this.keyMap.get(t)):this.valList[n]=f,f}isBackgroundFetch(t){return t&&typeof t=="object"&&typeof t.then=="function"&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(t,"__returned")&&(t.__returned===t||t.__returned===null)}async fetch(t,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,fetchContext:f=this.fetchContext,forceRefresh:h=!1}={}){if(!this.fetchMethod)return this.get(t,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i});const p={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:s,noDisposeOnSet:o,size:a,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:u};let d=this.keyMap.get(t);if(d===void 0){const g=this.backgroundFetch(t,d,p,f);return g.__returned=g}else{const g=this.valList[d];if(this.isBackgroundFetch(g))return n&&g.__staleWhileFetching!==void 0?g.__staleWhileFetching:g.__returned=g;if(!h&&!this.isStale(d))return this.moveToTail(d),r&&this.updateItemAge(d),g;const y=this.backgroundFetch(t,d,p,f);return n&&y.__staleWhileFetching!==void 0?y.__staleWhileFetching:y.__returned=y}}get(t,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet}={}){const s=this.keyMap.get(t);if(s!==void 0){const o=this.valList[s],a=this.isBackgroundFetch(o);return this.isStale(s)?a?n?o.__staleWhileFetching:void 0:(i||this.delete(t),n?o:void 0):a?void 0:(this.moveToTail(s),r&&this.updateItemAge(s),o)}}connect(t,n){this.prev[n]=t,this.next[t]=n}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return cn("del","delete"),this.delete}delete(t){let n=!1;if(this.size!==0){const r=this.keyMap.get(t);if(r!==void 0)if(n=!0,this.size===1)this.clear();else{this.removeItemSize(r);const i=this.valList[r];this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,t,"delete"),this.disposeAfter&&this.disposed.push([i,t,"delete"])),this.keyMap.delete(t),this.keyList[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return n}clear(){for(const t of this.rindexes({allowStale:!0})){const n=this.valList[t];if(this.isBackgroundFetch(n))n.__abortController.abort();else{const r=this.keyList[t];this.dispose(n,r,"delete"),this.disposeAfter&&this.disposed.push([n,r,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return cn("reset","clear"),this.clear}get length(){return Ld("length","size"),this.size}static get AbortController(){return st}static get AbortSignal(){return vi}}var kd=be;const Fd=kd;async function Id(e){return(await Kt.get("/pvideo",{params:{aid:e}})).data.data}async function jd(e){return[]}const un=new Fd({max:200});async function $d(e){if(un.has(e))return un.get(e);const[t,n]=await Promise.all([Id(e),jd()]);return un.set(e,{pvideoData:t,dmData:n}),{pvideoData:t,dmData:n}}function _i(e){return async function(n){const r=new FormData;r.append("aid",n),r.append("csrf",Rd());const s=(await Kt.post("/x/v2/history/toview/"+e,r,{withCredentials:!0})).data;return(s==null?void 0:s.code)===0&&(s==null?void 0:s.message)==="0"}}const Bd=_i("add"),zd=_i("del"),wi=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(n,r){var a;const s=(await Je.get(Yr+t,{params:{goto:n.goto,id:n.param,mid:n.mid,rid:n.tid,tag_id:(a=n.tag)==null?void 0:a.tag_id,reason_id:r,build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)}})).data;return(s==null?void 0:s.code)===0&&(s==null?void 0:s.message)==="0"}},Wd=wi("dislike"),Hd=wi("cancel"),Si="_modal-mask_vh629_1",Ti="_modal_vh629_1",xi="_modal-header_vh629_23",Ei="_modal-title_vh629_30",Ci="_title-desc_vh629_35",Oi="_btn-close_vh629_39",Ai="_modal-body_vh629_57",Pi="_reason-list_vh629_62",Ri="_reason_vh629_62",Th={modalMask:Si,modal:Ti,modalHeader:xi,modalTitle:Ei,titleDesc:Ci,btnClose:Oi,modalBody:Ai,reasonList:Pi,reason:Ri},fn=Pd();function Ud(){return Wt(fn)}function Yd(e){const t=Ud();if(!!e)return t.get(e)}function Gd({show:e,onHide:t,item:n}){const[r,i]=v.useState(!1),s=z(async(a,l)=>{if(!n)return;let c=!1,u=null;try{i(!0),c=await Wd(n,a)}catch(f){u=f}finally{i(!1)}if(u)return console.error(u.stack||u),Kr();c?ie("\u5DF2\u6807\u8BB0\u4E0D\u60F3\u770B"):Vr(),c&&(fn.set(n.param,{id:a,name:l}),t())}),o=v.useMemo(()=>{var a;return[...(a=n==null?void 0:n.dislike_reasons)!=null?a:[],{reason_id:12,reason_name:"\u6B64\u7C7B\u5185\u5BB9\u8FC7\u591A"},{reason_id:13,reason_name:"\u63A8\u8350\u8FC7"}]},[n]);return R(gi,{show:e,onHide:t,clsModalMask:Si,clsModal:Ti,hideWhenMaskOnClick:!0,children:[R("div",{className:xi,children:[R("div",{className:Ei,children:["\u6211\u4E0D\u60F3\u770B",m("span",{className:Ci,children:"(\u9009\u62E9\u540E\u5C06\u51CF\u5C11\u76F8\u4F3C\u5185\u5BB9\u63A8\u8350)"})]}),m("div",{className:"space",style:{flex:1}}),R("button",{className:`primary-btn roll-btn ${Oi}`,onClick:t,children:[m("svg",{style:{transform:"rotate(0deg)"},children:m("use",{xlinkHref:"#widget-close"})}),m("span",{children:"\u5173\u95ED"})]})]}),m("div",{className:Ai,children:m("div",{className:Pi,children:o.map(a=>m("button",{className:Ri,"data-id":a.reason_id,onClick:()=>s(a.reason_id,a.reason_name),disabled:r,children:a.reason_name},a.reason_id))})})]})}const Mi={show:!1,onHide:Di,item:null};function Di(){Li({show:!1,item:null})}function Li(e){Object.assign(Mi,e),Kd().render(m(Gd,{...Mi,onHide:Di}))}let dn;function Kd(){if(!dn){const e=document.createElement("div");e.classList.add("show-dislike-container"),document.body.appendChild(e),dn=Gt(e)}return dn}function Vd(e){Li({show:!0,item:e})}function Xd(e){if(!e)return"00:00";const t=Math.trunc(e/3600);e-=t*3600;const n=Math.trunc(e/60);e-=n*60;const i=[t,n,e];return i[0]===0&&i.shift(),i.map(o=>du(o.toString(),2,"0")).join(":")}function hn(e){if(!e)return"";if(e<=9999)return e.toString();let t=(e/1e4).toFixed(1);return t=t.replace(/\.0$/,""),`${t}\u4E07`}const Ni="_bili-video-card_15xx7_1",ki="_image-wrapper_15xx7_4",Fi="_preview-card-wrapper_15xx7_8",Ii="_preview-card-inner_15xx7_21",ji="_watch-later_15xx7_25",$i="_badge_15xx7_28",Bi="_recommend-reason_15xx7_36",zi="_bangumi-desc_15xx7_51",Wi="_btn-dislike_15xx7_54",Hi="_btn-dislike-icon_15xx7_69",Ui="_btn-dislike-tip_15xx7_76",Yi="_disliked-wrapper_15xx7_91",Gi="_dislike-content-cover_15xx7_105",Ki="_dislike-content-cover-inner_15xx7_111",Jd="_dislike-icon_15xx7_122",Vi="_dislike-reason_15xx7_125",Xi="_dislike-desc_15xx7_129",Ji="_dislike-content-action_15xx7_133",xh={biliVideoCard:Ni,imageWrapper:ki,previewCardWrapper:Fi,previewCardInner:Ii,watchLater:ji,badge:$i,recommendReason:Bi,bangumiDesc:zi,btnDislike:Wi,btnDislikeIcon:Hi,btnDislikeTip:Ui,dislikedWrapper:Yi,dislikeContentCover:Gi,dislikeContentCoverInner:Ki,dislikeIcon:Jd,dislikeReason:Vi,dislikeDesc:Xi,dislikeContentAction:Ji};function pn(e,t){return isNaN(e)?t:e}function Zd({className:e,item:t,pvideo:n,enterCursorState:r}){const i=v.useRef(null),s=md(i),o={item:t,pvideo:n,cursorState:s,elWidth:pn(s.elementW,r.width),elHeight:pn(s.elementH,r.height),relativeX:pn(s.elementX,r.relativeX)};return m("div",{ref:i,className:U(Fi,e),children:n?m(Qd,{...o}):!1})}function Qd({item:e,pvideo:t,elWidth:n,elHeight:r,relativeX:i}){var T;let s=0,o=0;n&&i&&!isNaN(i)&&!isNaN(n)&&(s=i/n,s<0&&(s=0),s>1&&(s=1),o=Math.floor((e.duration||0)*s));let a=v.useMemo(()=>{const L=(t==null?void 0:t.index)||[];let k=eh(L,o);return k!==-1?k:o>L[L.length-1]?(k=Math.floor(L.length*s)-1,k<0&&(k=0),k):0},[t,o]);const{img_x_len:l,img_y_len:c,img_x_size:u,img_y_size:f}=t,h=c*l;a=a+1;const p=Math.floor(a/h),d=a-p*h,g=((T=t.image)==null?void 0:T[p])||"",y=Math.floor(d/l)+1,b=d-(y-1)*l,M=n*l,D=r*c,E=(y-1)*r,x=(b-1)*n;return m("div",{className:Ii,style:{backgroundColor:"black",backgroundImage:`url(${g})`,backgroundPosition:`-${x}px -${E}px`,backgroundSize:`${M}px ${D}px`},children:m(qd,{progress:s})})}function qd({progress:e}){return m("div",{className:"track",style:{position:"absolute",bottom:0,left:0,backgroundColor:"#eee",width:"100%",height:2},children:m("div",{className:"bar",style:{backgroundColor:"#fa6a9d",height:"100%",width:`${e*100}%`}})})}function eh(e,t){var a;let n=0,r=e.length-1,i=-1;for(;n<=r;){const l=Math.floor((n+r)/2),c=e[l];if(t===c)return l;c{if(!e)return"";const t=si.unix(e);return t.format("YYYY")===th?t.format("M-D"):t.format("YY-M-D")},rh=e=>e.replace(/^http:\/\//,"https://"),mn=v.memo(function({style:t,className:n,item:r,loading:i}){i=i!=null?i:!r;const s=R("div",{className:U("bili-video-card__skeleton",{hide:!i}),children:[m("div",{className:"bili-video-card__skeleton--cover"}),m("div",{className:"bili-video-card__skeleton--info",children:R("div",{className:"bili-video-card__skeleton--right",children:[m("p",{className:"bili-video-card__skeleton--text"}),m("p",{className:"bili-video-card__skeleton--text short"}),m("p",{className:"bili-video-card__skeleton--light"})]})})]}),o=Yd(r==null?void 0:r.param);return R("div",{style:t,className:U("bili-video-card",Ni,n),"data-report":"partition_recommend.content",children:[s,!i&&r&&(o?m(ih,{item:r,dislikedReason:o}):m(sh,{item:r}))]})}),ih=v.memo(function({dislikedReason:t,item:n}){const r=z(async()=>{if(!(t!=null&&t.id))return;let i=!1,s=null;try{i=await Hd(n,t.id)}catch(o){s=o}if(s)return console.error(s.stack||s),Kr();i?ie("\u5DF2\u64A4\u9500"):Vr(),i&&fn.delete(n.param)});return R("div",{className:U(Yi),children:[m("div",{className:Gi,children:R("div",{className:Ki,children:[m("div",{className:"icon"}),m("div",{className:Vi,children:t==null?void 0:t.name}),m("div",{className:Xi,children:"\u5C06\u51CF\u5C11\u6B64\u7C7B\u5185\u5BB9\u63A8\u8350"})]})}),m("div",{className:Ji,children:m("button",{onClick:r,children:"\u64A4\u9500"})})]})}),sh=v.memo(function({item:t}){const n=v.useRef(null),[r,i]=v.useState(()=>({width:0,height:0,relativeX:0}));tt("mouseenter",G=>{var ps;const lt=(ps=n.current)==null?void 0:ps.getBoundingClientRect();if(!lt)return;const{width:ut,height:wn,x:hh}=lt;i({width:ut,height:wn,relativeX:G.pageX-window.pageXOffset-hh})},{target:n});const s=tn(n),o=v.useRef(null),a=tn(o),[l,c]=v.useState(!1),{accessKey:u}=Ht(),f=Boolean(u),{param:h,title:p,cover:d,goto:g,play:y,like:b,coin:M,desc:D,danmaku:E,ctime:x,duration:T,name:L,face:k,mid:I,favorite:F,badge:Ee,rcmd_reason:_e}=t,P=v.useMemo(()=>nh(x),[x]),S=v.useMemo(()=>rh(d),[d]),[_,C]=v.useState(null),[w,O]=v.useState(!1),A=z(async()=>{if(!_&&!w)try{O(!0);const G=await $d(h);C(G)}finally{O(!1)}});v.useEffect(()=>{s&&A()},[s]);let N=!1;const B=z(async G=>{if(G.preventDefault(),N)return;N=!0;const lt=l?zd:Bd;let ut=!1;try{ut=await lt(h)}finally{N=!1}ut&&c(wn=>!wn)}),$=v.useRef(null),W=tn($),q=z(G=>{G.stopPropagation(),G.preventDefault(),Vd(t)}),K=t.goto==="bangumi",se=t.goto==="av",oe=se?`/video/av${h}`:t.uri,fe=v.useMemo(()=>Xd(T),[T]),H=v.useMemo(()=>hn(y),[y]),ee=v.useMemo(()=>hn(b),[b]),je=v.useMemo(()=>hn(F),[F]);return R("div",{className:"bili-video-card__wrap __scale-wrap",children:[m("a",{href:oe,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:R("div",{className:"bili-video-card__image __scale-player-wrap",ref:n,children:[R("div",{className:U("bili-video-card__image--wrap",ki),children:[R("picture",{className:"v-img bili-video-card__cover",children:[m("source",{srcSet:`${S}@672w_378h_1c.webp`,type:"image/webp"}),m("img",{src:`${S}@672w_378h_1c.webp`,alt:p,loading:"lazy"})]}),s&&m(Zd,{item:t,pvideo:_==null?void 0:_.pvideoData,enterCursorState:r}),R("div",{className:`bili-watch-later ${ji}`,style:{display:s?"flex":"none"},ref:o,onClick:B,children:[m("svg",{className:"bili-watch-later__icon",children:m("use",{xlinkHref:l?"#widget-watch-save":"#widget-watch-later"})}),m("span",{className:"bili-watch-later__tip",style:{display:a?"block":"none"},children:l?"\u79FB\u9664":"\u7A0D\u540E\u518D\u770B"})]}),f&&R("div",{ref:$,className:Wi,onClick:q,style:{display:s?"flex":"none"},children:[m("svg",{className:Hi,children:m("use",{xlinkHref:"#widget-close"})}),m("span",{className:Ui,style:{display:W?"block":"none"},children:"\u6211\u4E0D\u60F3\u770B"})]})]}),m("div",{className:"bili-video-card__mask",children:R("div",{className:"bili-video-card__stats",children:[R("div",{className:"bili-video-card__stats--left",children:[R("span",{className:"bili-video-card__stats--item",children:[m("svg",{className:"bili-video-card__stats--icon",children:m("use",{xlinkHref:"#widget-play-count"})}),m("span",{className:"bili-video-card__stats--text",children:H})]}),m("span",{className:"bili-video-card__stats--item",children:g==="av"?R(it,{children:[m("svg",{className:"bili-video-card__stats--icon",children:m("use",{xlinkHref:"#widget-agree"})}),m("span",{className:"bili-video-card__stats--text",children:ee})]}):R(it,{children:[m("svg",{className:"bili-video-card__stats--icon",children:m("use",{xlinkHref:"#widget-agree"})}),m("span",{className:"bili-video-card__stats--text",children:je})]})})]}),m("span",{className:"bili-video-card__stats__duration",children:se&&fe})]})})]})}),m("div",{className:"bili-video-card__info __scale-disable",children:R("div",{className:"bili-video-card__info--right",children:[m("a",{href:oe,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:m("h3",{className:"bili-video-card__info--tit",title:p,children:p})}),R("p",{className:"bili-video-card__info--bottom",children:[se&&R("a",{className:"bili-video-card__info--owner",href:`//space.bilibili.com/${I}`,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:[_e!=null&&_e.content?m("span",{className:Bi,children:_e.content}):m("svg",{className:"bili-video-card__info--owner__up",children:m("use",{xlinkHref:"#widget-up"})}),m("span",{className:"bili-video-card__info--author",children:L}),P&&R("span",{className:"bili-video-card__info--date",children:["\xB7 ",P]})]}),K&&R("a",{className:"bili-video-card__info--owner",href:oe,target:"_blank",children:[m("span",{className:$i,children:Ee}),m("span",{className:zi,children:D})]})]})]})})]})}),Zi="_modal-mask_1urmj_1",Qi="_narrow-mode_1urmj_13",qi="_modal_1urmj_1",es="_modal-header_1urmj_38",ts="_modal-title_1urmj_46",ns="_btn-refresh_1urmj_51",rs="_btn-close_1urmj_52",ct="_modal-body_1urmj_68",oh="_list_1urmj_74",gn="_card_1urmj_77",vn="_active_1urmj_85",is="_video-card-list_1urmj_90",yn="_video-card-body_1urmj_1",ss="_loader_1urmj_99",bn="_checkbox_1urmj_104",Eh={modalMask:Zi,narrowMode:Qi,modal:qi,modalHeader:es,modalTitle:ts,btnRefresh:ns,btnClose:rs,modalBody:ct,list:oh,card:gn,active:vn,videoCardList:is,videoCardBody:yn,loader:ss,checkbox:bn};function ah({show:e,refresh:t,minIndex:n=0,maxIndex:r}){const[i,s]=v.useState(null),o=z(()=>{if(i===null)return!1;const g=document.querySelector(`${_n}.${vn}`),y=document.querySelector(`.${ct}`);if(!g||!y)return!1;const b=y.getBoundingClientRect(),M=g.getBoundingClientRect();return!(M.top-b.top<-(b.height+M.height)||M.top-b.top>b.height*2+M.height)}),a=z((g,y)=>{if(!e)return;y==null||y.preventDefault();const b=o()?i+g:ch();if(!(br){cs(r);return}s(b),cs(b)}}),l=v.useCallback(g=>{a(-1,g)},[]),c=v.useCallback(g=>{a(1,g)},[]);ye("leftarrow",l),ye("rightarrow",c);const u=v.useCallback(g=>{a(-us(),g)},[]),f=v.useCallback(g=>{a(us(),g)},[]);ye("uparrow",u),ye("downarrow",f);const h=z(()=>{!i||!e||lh(i)}),p=z(()=>{!e||s(null)});ye("enter",h),ye("esc",p);const d=z(()=>{!e||t()});return ye("r",d,{exactMatch:!0}),{activeIndex:i,clearActiveIndex:p}}function ch(){const e=document.querySelector(`.${ct}`);if(!e)return 0;const t=e.getBoundingClientRect(),n=os();for(let r=0;r=t.top)return r;return 0}const _n=`#${yn} .${gn}`;function os(){return[...document.querySelectorAll(_n)]}function as(e){return os()[e]}function cs(e){var n;const t=as(e);(n=t==null?void 0:t.scrollIntoViewIfNeeded)==null||n.call(t,!1)}function lh(e){const t=as(e);if(!t)return;const n=t.querySelector(".bili-video-card__wrap > a");n==null||n.click()}const ls=new Map;function us(){if(Q.useNarrowMode)return 2;let e=ls.get(window.innerWidth);if(e)return e;const t=document.querySelector(_n);if(!t)throw new Error("expect found first card");e=1;const n=t.getBoundingClientRect().top;let r=t.nextElementSibling;for(;r&&r.getBoundingClientRect().top===n;)e++,r=r.nextElementSibling;return ls.set(window.innerWidth,e),e}function fs(){return v.useMemo(()=>crypto.randomUUID(),[])}const uh=v.memo(function({show:t,onHide:n}){const[r,i]=v.useState([]),[s,o]=v.useState(!1),a=v.useRef(null),l=z(async()=>{a.current&&(a.current.scrollTop=0);try{y(),o(!0),i(await Vt(2)),y()}finally{o(!1)}}),c=z(async D=>{const E=await Vt(2);i(x=>[...x,...E])}),{useNarrowMode:u,initialShowMore:f}=Ht(),h=v.useCallback(D=>{const E=D.target.checked;Br({useNarrowMode:E})},[]),p=v.useCallback(D=>{const E=D.target.checked;Br({initialShowMore:E}),E&&ie("\u5DF2\u5F00\u542F\u81EA\u52A8\u67E5\u770B\u66F4\u591A: \u4E0B\u6B21\u6253\u5F00\u9996\u9875\u65F6\u5C06\u76F4\u63A5\u5C55\u793A\u672C\u63A8\u8350\u5F39\u6846")},[]),d=v.useMemo(()=>({[Qi]:u}),[u]),{activeIndex:g,clearActiveIndex:y}=ah({show:t,refresh:l,maxIndex:r.length-1}),b=fs(),M=fs();return R(gi,{show:t,onHide:n,clsModalMask:U(Zi,d),clsModal:U(qi,d),children:[R("div",{className:es,children:[m("div",{className:ts,children:"\u63A8\u8350"}),m("div",{className:"space",style:{flex:1}}),R(fi,{children:[m("input",{type:"checkbox",className:bn,id:M,checked:f,onChange:p}),m("label",{htmlFor:M,children:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A"}),m("input",{type:"checkbox",className:bn,id:b,checked:u,onChange:h}),m("label",{htmlFor:b,children:"\u542F\u7528\u7A84\u5C4F\u6A21\u5F0F"})]}),R("button",{className:`primary-btn roll-btn ${ns}`,onClick:l,children:[m("svg",{children:m("use",{xlinkHref:"#widget-roll"})}),m("span",{children:"\u6362\u4E00\u6362"})]}),R("button",{className:`primary-btn roll-btn ${rs}`,onClick:n,children:[m("svg",{children:m("use",{xlinkHref:"#widget-close"})}),m("span",{children:"\u5173\u95ED"})]})]}),m("div",{className:ct,ref:a,children:m(sn,{pageStart:0,loadMore:c,hasMore:!0,useWindow:!1,threshold:360,style:{minHeight:"100%"},loader:m("div",{className:ss,children:"\u52A0\u8F7D\u4E2D..."},0),children:m("div",{className:`video-card-list is-full ${is}`,children:m("div",{id:yn,className:U("video-card-body",d),children:r.map((D,E)=>m(mn,{loading:s,item:D,className:U(gn,{[vn]:E===g})},D.uniqId))})})})})]})}),ds="_grid_20olc_1",hs="_video-card-list_20olc_5",Ah={grid:ds,videoCardList:hs,expandBtn:"_expand-btn_20olc_19",expanded:"_expanded_20olc_30"};function fh(){const e=v.useRef(null),{accessKey:t}=Ht(),n=ti(Xu,{manual:!0}),r=z(async()=>{var y;await n.runAsync()&&((y=e.current)==null||y.set(!1))}),i=Ju,s=z(()=>{const g="https://github.com/indefined/UserScripts/tree/master/bilibiliHome#%E6%8E%88%E6%9D%83%E8%AF%B4%E6%98%8E";window.open(g,"_blank")}),o=v.useMemo(()=>new Array(20).fill(0).map(()=>crypto.randomUUID()),[]),{data:a,loading:l,error:c,refresh:u}=ti(Uu);c&&console.error(c.stack||c);const[f,h]=v.useState(()=>Q.initialShowMore),p=v.useCallback(()=>{h(!0)},[]),d=v.useCallback(()=>{h(!1)},[]);return m("section",{className:U("bili-grid no-margin",ds),"data-area":"\u63A8\u8350",children:R("div",{className:`video-card-list is-full ${hs}`,children:[R("div",{className:"area-header",children:[R("div",{className:"left",children:[m("a",{id:"\u5F71\u89C6",className:"the-world area-anchor","data-id":"25"}),m("svg",{className:"icon",children:m("use",{xlinkHref:"#channel-cinephile"})}),m("a",{className:"title",href:"#",children:m("span",{children:"\u63A8\u8350"})})]}),R("div",{className:"right",children:[t?R(fi,{ref:e,children:[m("button",{className:"primary-btn roll-btn",onClick:s,children:m("span",{children:"access_key \u8BF4\u660E"})}),m("button",{className:"primary-btn roll-btn",onClick:()=>r(),disabled:n.loading,children:m("span",{children:"\u91CD\u65B0\u83B7\u53D6 access_key"})}),m("button",{className:"primary-btn roll-btn",onClick:i,children:m("span",{children:"\u5220\u9664 access_key"})})]}):R(it,{children:[m("button",{className:"primary-btn roll-btn",onClick:s,children:m("span",{children:"access_key \u8BF4\u660E"})}),m("button",{className:"primary-btn roll-btn",onClick:r,disabled:n.loading,children:m("span",{children:"\u83B7\u53D6 access_key"})})]}),R("button",{className:"primary-btn roll-btn",onClick:u,children:[m("svg",{style:{transform:"rotate(0deg)"},children:m("use",{xlinkHref:"#widget-roll"})}),m("span",{children:"\u6362\u4E00\u6362"})]}),R("button",{className:"primary-btn see-more",onClick:p,children:[m("span",{children:"\u67E5\u770B\u66F4\u591A"}),m("svg",{children:m("use",{xlinkHref:"#widget-arrow"})})]})]})]}),m(uh,{show:f,onHide:d}),m("div",{className:"video-card-body more-class1 more-class2",children:l||c?o.map(g=>m(mn,{},g)):a.map(g=>m(mn,{item:g},g.uniqId))})]})})}(function(){var t;if(location.href.startsWith("https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?"))return window.stop(),(t=window.top)==null?void 0:t.postMessage(location.href,"https://www.bilibili.com");if(location.pathname==="/")return dh()})();async function dh(){const e=Date.now(),t=10*1e3,n=()=>document.querySelectorAll(".bili-layout > section.bili-grid").length>0;for(;!n()&&Date.now()-e section.bili-grid"),i=document.createElement("section");r==null||r.insertAdjacentElement("afterend",i),Gt(i).render(m(fh,{}))}})(React,ReactDOM,axios,axiosGmxhrAdapter);